Skip to content

Commit

Permalink
chore: fix block migration
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimirpotekhin committed Dec 16, 2024
1 parent 9ec1e7b commit 47daaf0
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
12 changes: 11 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,17 @@
"import": ["@taiga-ui/cspell-config/cspell.config.js"],
"files": ["*/*.*"],
"ignorePaths": ["**/projects/i18n/languages/**", "**/addon-commerce/utils/get-currency-symbol.ts"],
"ignoreWords": ["Wachovia", "bottomsheet", "appbar", "qwertypgj_", "antialiasing", "xxxs", "significand"],
"ignoreWords": [
"Wachovia",
"bottomsheet",
"appbar",
"qwertypgj_",
"antialiasing",
"xxxs",
"significand",
"hidecheckbox",
"hideradio"
],
"ignoreRegExpList": ["\\(https?://.*?\\)", "\\/{1}.+\\/{1}", "\\%2F.+", "\\%2C.+", "\\ɵ.+", "\\ыва.+"],
"overrides": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,29 @@ export const TAGS_TO_REPLACE: ReplacementTag[] = [
to: 'input',
addAttributes: ['tuiRadio', 'type="radio"'],
},
{
from: 'tui-checkbox-block',
to: 'input',
addAttributes: ['tuiCheckbox', 'type="checkbox"', 'tuiBlock'],
filterFn: (el) => el.attrs.some((attr) => attr.name === '[hidecheckbox]'),
},
{
from: 'tui-checkbox-block',
to: 'input',
addAttributes: ['tuiCheckbox', 'type="checkbox"'],
filterFn: (el) => !el.attrs.some((attr) => attr.name === '[hidecheckbox]'),
},
{
from: 'tui-radio-block',
to: 'input',
addAttributes: ['tuiRadio', 'type="radio"', 'tuiBlock'],
filterFn: (el) => el.attrs.some((attr) => attr.name === '[hideradio]'),
},
{
from: 'tui-radio-block',
to: 'input',
addAttributes: ['tuiRadio', 'type="radio"'],
filterFn: (el) => !el.attrs.some((attr) => attr.name === '[hideradio]'),
},
{
from: 'tui-hosted-dropdown',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const TEMPLATE_AFTER = `
</label>
</form>
<label *ngFor="let block of blocks" tuiBlock="m" appearance="">
<input tuiCheckbox type="checkbox"
<input tuiCheckbox type="checkbox" tuiBlock
${''}
${''}
${''}
Expand All @@ -122,15 +122,15 @@ const TEMPLATE_AFTER = `
{{ block.name }}
</label>
<label tuiBlock="s" appearance="">
<input tuiCheckbox type="checkbox"
<input tuiCheckbox type="checkbox" tuiBlock
formControlName="testValue3"
${''}
${''}
>
Pineapples
</label>
<label tuiBlock="l" appearance="">
<input tuiRadio type="radio"
<input tuiRadio type="radio" tuiBlock
formControlName="testValue"
${''}
${''}
Expand Down

0 comments on commit 47daaf0

Please sign in to comment.