@taiga-ui/cdk 4.19.0 → 4.20.0-canary.bd53957
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/classes/value-transformer.d.ts +4 -0
- package/constants/allow-signal-writes.d.ts +2 -0
- package/constants/index.d.ts +1 -0
- package/constants/used-icons.d.ts +1 -1
- package/constants/version.d.ts +1 -1
- package/constants/version.js +1 -1
- package/date-time/time.d.ts +1 -0
- package/esm2022/classes/value-transformer.mjs +8 -1
- package/esm2022/constants/allow-signal-writes.mjs +3 -0
- package/esm2022/constants/index.mjs +2 -1
- package/esm2022/constants/used-icons.mjs +2 -2
- package/esm2022/constants/version.mjs +2 -2
- package/esm2022/date-time/time.mjs +14 -17
- package/esm2022/utils/miscellaneous/directive-binding.mjs +4 -8
- package/fesm2022/taiga-ui-cdk-classes.mjs +7 -1
- package/fesm2022/taiga-ui-cdk-classes.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-constants.mjs +6 -4
- package/fesm2022/taiga-ui-cdk-constants.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-date-time.mjs +12 -15
- package/fesm2022/taiga-ui-cdk-date-time.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs +3 -7
- package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs.map +1 -1
- package/package.json +1 -1
- package/schematics/ng-update/v4/index.js +1 -1
- package/schematics/ng-update/v4/migrate-addon-doc/index.js +1 -1
- package/schematics/ng-update/v4/migrate-icons/rename-icons.js +4 -0
- package/schematics/ng-update/v4/steps/constants/attr-to-directive-replace.js +1 -0
- package/schematics/ng-update/v4/steps/constants/attr-with-values-to-replace.js +5 -0
- package/schematics/ng-update/v4/steps/constants/attrs-to-replace.js +9 -0
- package/schematics/ng-update/v4/steps/constants/html-comments.js +6 -0
- package/schematics/ng-update/v4/steps/constants/identifiers-to-replace.js +99 -11
- package/schematics/ng-update/v4/steps/constants/inputs-to-remove.js +6 -0
- package/schematics/ng-update/v4/steps/constants/types.js +6 -0
- package/schematics/ng-update/v4/steps/migrate-editor.d.ts +1 -1
- package/schematics/ng-update/v4/steps/migrate-editor.js +38 -1
- package/schematics/ng-update/v4/steps/migrate-providers-from.js +2 -0
- package/schematics/ng-update/v4/steps/migrate-root.js +3 -1
- package/schematics/ng-update/v4/steps/templates/migrate-badged-content.js +2 -1
- package/schematics/ng-update/v4/steps/templates/migrate-blocked.js +2 -1
- package/schematics/ng-update/v4/steps/templates/migrate-expandable.js +3 -1
@@ -295,6 +295,26 @@ exports.IDENTIFIERS_TO_REPLACE = [
|
|
295
295
|
from: { name: 'TuiTreeModule', moduleSpecifier: '@taiga-ui/kit' },
|
296
296
|
to: { name: 'TuiTree', moduleSpecifier: '@taiga-ui/kit', spreadInModule: true },
|
297
297
|
},
|
298
|
+
{
|
299
|
+
from: { name: 'TuiTreeItemComponent', moduleSpecifier: '@taiga-ui/kit' },
|
300
|
+
to: { name: 'TuiTreeItem', moduleSpecifier: '@taiga-ui/kit' },
|
301
|
+
},
|
302
|
+
{
|
303
|
+
from: { name: 'TuiTreeItemContentComponent', moduleSpecifier: '@taiga-ui/kit' },
|
304
|
+
to: { name: 'TuiTreeItemContent', moduleSpecifier: '@taiga-ui/kit' },
|
305
|
+
},
|
306
|
+
{
|
307
|
+
from: { name: 'TuiTreeChildrenDirective', moduleSpecifier: '@taiga-ui/kit' },
|
308
|
+
to: { name: 'TuiTreeChildren', moduleSpecifier: '@taiga-ui/kit' },
|
309
|
+
},
|
310
|
+
{
|
311
|
+
from: { name: 'TuiTreeItemControllerDirective', moduleSpecifier: '@taiga-ui/kit' },
|
312
|
+
to: { name: 'TuiTreeItemController', moduleSpecifier: '@taiga-ui/kit' },
|
313
|
+
},
|
314
|
+
{
|
315
|
+
from: { name: 'TuiTreeNodeDirective', moduleSpecifier: '@taiga-ui/kit' },
|
316
|
+
to: { name: 'TuiTreeNode', moduleSpecifier: '@taiga-ui/kit' },
|
317
|
+
},
|
298
318
|
{
|
299
319
|
from: {
|
300
320
|
name: 'TuiDataListDropdownManagerModule',
|
@@ -335,7 +355,10 @@ exports.IDENTIFIERS_TO_REPLACE = [
|
|
335
355
|
},
|
336
356
|
{
|
337
357
|
from: { name: 'TuiFieldErrorPipeModule', moduleSpecifier: '@taiga-ui/kit' },
|
338
|
-
to:
|
358
|
+
to: [
|
359
|
+
{ name: 'TuiFieldErrorPipe', moduleSpecifier: '@taiga-ui/kit' },
|
360
|
+
{ name: 'TuiFieldErrorContentPipe', moduleSpecifier: '@taiga-ui/kit' },
|
361
|
+
],
|
339
362
|
},
|
340
363
|
{
|
341
364
|
from: { name: 'TuiThumbnailCardModule', moduleSpecifier: '@taiga-ui/experimental' },
|
@@ -366,6 +389,14 @@ exports.IDENTIFIERS_TO_REPLACE = [
|
|
366
389
|
from: { name: 'TuiPrimitiveTextfieldComponent', moduleSpecifier: '@taiga-ui/core' },
|
367
390
|
to: { name: 'TuiPrimitiveTextfieldComponent', moduleSpecifier: '@taiga-ui/legacy' },
|
368
391
|
},
|
392
|
+
{
|
393
|
+
from: { name: 'TUI_TEXTFIELD_SIZE', moduleSpecifier: '@taiga-ui/core' },
|
394
|
+
to: { name: 'TUI_TEXTFIELD_SIZE', moduleSpecifier: '@taiga-ui/legacy' },
|
395
|
+
},
|
396
|
+
{
|
397
|
+
from: { name: 'TuiTextfieldSizeDirective', moduleSpecifier: '@taiga-ui/core' },
|
398
|
+
to: { name: 'TuiTextfieldSizeDirective', moduleSpecifier: '@taiga-ui/legacy' },
|
399
|
+
},
|
369
400
|
{
|
370
401
|
from: { name: 'TuiOptionComponent', moduleSpecifier: '@taiga-ui/core' },
|
371
402
|
to: { name: 'TuiOption', moduleSpecifier: '@taiga-ui/core' },
|
@@ -470,6 +501,10 @@ exports.IDENTIFIERS_TO_REPLACE = [
|
|
470
501
|
from: { name: 'TuiTextAreaDirective', moduleSpecifier: '@taiga-ui/kit' },
|
471
502
|
to: { name: 'TuiTextareaDirective', moduleSpecifier: '@taiga-ui/legacy' },
|
472
503
|
},
|
504
|
+
{
|
505
|
+
from: { name: 'TuiStatus', moduleSpecifier: '@taiga-ui/kit' },
|
506
|
+
to: { name: 'TuiStatus', moduleSpecifier: '@taiga-ui/legacy' },
|
507
|
+
},
|
473
508
|
{
|
474
509
|
from: { name: 'TuiTextAreaComponent', moduleSpecifier: '@taiga-ui/kit' },
|
475
510
|
to: { name: 'TuiTextareaComponent', moduleSpecifier: '@taiga-ui/legacy' },
|
@@ -479,11 +514,17 @@ exports.IDENTIFIERS_TO_REPLACE = [
|
|
479
514
|
{ name: 'TuiBadgedContentModule', moduleSpecifier: '@taiga-ui/experimental' },
|
480
515
|
{ name: 'TuiBadgedContentModule', moduleSpecifier: '@taiga-ui/kit' },
|
481
516
|
],
|
482
|
-
to:
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
517
|
+
to: [
|
518
|
+
{
|
519
|
+
name: 'TuiBadgedContent',
|
520
|
+
moduleSpecifier: '@taiga-ui/kit',
|
521
|
+
spreadInModule: true,
|
522
|
+
},
|
523
|
+
{
|
524
|
+
name: 'TuiBadgeNotification',
|
525
|
+
moduleSpecifier: '@taiga-ui/kit',
|
526
|
+
},
|
527
|
+
],
|
487
528
|
},
|
488
529
|
{
|
489
530
|
from: {
|
@@ -523,7 +564,10 @@ exports.IDENTIFIERS_TO_REPLACE = [
|
|
523
564
|
{ name: 'TuiScrollbarModule', moduleSpecifier: '@taiga-ui/core' },
|
524
565
|
{ name: 'TuiScrollbarComponent', moduleSpecifier: '@taiga-ui/core' },
|
525
566
|
],
|
526
|
-
to:
|
567
|
+
to: [
|
568
|
+
{ name: 'TuiScrollbar', moduleSpecifier: '@taiga-ui/core' },
|
569
|
+
{ name: 'TuiScrollable', moduleSpecifier: '@taiga-ui/core' },
|
570
|
+
],
|
527
571
|
},
|
528
572
|
{
|
529
573
|
from: [
|
@@ -716,6 +760,16 @@ exports.IDENTIFIERS_TO_REPLACE = [
|
|
716
760
|
from: { name: 'TuiChipModule', moduleSpecifier: '@taiga-ui/experimental' },
|
717
761
|
to: { name: 'TuiChip', moduleSpecifier: '@taiga-ui/kit' },
|
718
762
|
},
|
763
|
+
{
|
764
|
+
from: {
|
765
|
+
name: 'TuiTablePagination',
|
766
|
+
moduleSpecifier: '@taiga-ui/addon-table',
|
767
|
+
},
|
768
|
+
to: {
|
769
|
+
name: 'TuiTablePaginationEvent',
|
770
|
+
moduleSpecifier: '@taiga-ui/addon-table',
|
771
|
+
},
|
772
|
+
},
|
719
773
|
{
|
720
774
|
from: {
|
721
775
|
name: 'TuiTablePaginationModule',
|
@@ -726,6 +780,16 @@ exports.IDENTIFIERS_TO_REPLACE = [
|
|
726
780
|
moduleSpecifier: '@taiga-ui/addon-table',
|
727
781
|
},
|
728
782
|
},
|
783
|
+
{
|
784
|
+
from: {
|
785
|
+
name: 'TuiTablePaginationComponent',
|
786
|
+
moduleSpecifier: '@taiga-ui/addon-table',
|
787
|
+
},
|
788
|
+
to: {
|
789
|
+
name: 'TuiTablePagination',
|
790
|
+
moduleSpecifier: '@taiga-ui/addon-table',
|
791
|
+
},
|
792
|
+
},
|
729
793
|
{
|
730
794
|
from: { name: 'TuiCardModule', moduleSpecifier: '@taiga-ui/experimental' },
|
731
795
|
to: [
|
@@ -764,10 +828,23 @@ exports.IDENTIFIERS_TO_REPLACE = [
|
|
764
828
|
},
|
765
829
|
{
|
766
830
|
from: { name: 'TUI_ARROW', moduleSpecifier: '@taiga-ui/kit' },
|
767
|
-
to: {
|
768
|
-
|
769
|
-
|
770
|
-
},
|
831
|
+
to: { name: 'TUI_ARROW', moduleSpecifier: '@taiga-ui/legacy' },
|
832
|
+
},
|
833
|
+
{
|
834
|
+
from: { name: 'TUI_ARROW_MODE', moduleSpecifier: '@taiga-ui/kit' },
|
835
|
+
to: { name: 'TUI_ARROW_MODE', moduleSpecifier: '@taiga-ui/legacy' },
|
836
|
+
},
|
837
|
+
{
|
838
|
+
from: { name: 'TuiArrowMode', moduleSpecifier: '@taiga-ui/kit' },
|
839
|
+
to: { name: 'TuiArrowMode', moduleSpecifier: '@taiga-ui/legacy' },
|
840
|
+
},
|
841
|
+
{
|
842
|
+
from: { name: 'TuiComboBoxComponent', moduleSpecifier: '@taiga-ui/kit' },
|
843
|
+
to: { name: 'TuiComboBoxComponent', moduleSpecifier: '@taiga-ui/legacy' },
|
844
|
+
},
|
845
|
+
{
|
846
|
+
from: { name: 'TuiSelectComponent', moduleSpecifier: '@taiga-ui/kit' },
|
847
|
+
to: { name: 'TuiSelectComponent', moduleSpecifier: '@taiga-ui/legacy' },
|
771
848
|
},
|
772
849
|
{
|
773
850
|
from: { name: 'TuiArrowComponent', moduleSpecifier: '@taiga-ui/kit' },
|
@@ -2513,4 +2590,15 @@ exports.IDENTIFIERS_TO_REPLACE = [
|
|
2513
2590
|
from: { name: 'TuiObscuredModule', moduleSpecifier: '@taiga-ui/cdk' },
|
2514
2591
|
to: { name: 'TuiObscured', moduleSpecifier: '@taiga-ui/cdk' },
|
2515
2592
|
},
|
2593
|
+
{
|
2594
|
+
from: { name: 'TuiResizerModule', moduleSpecifier: '@taiga-ui/cdk' },
|
2595
|
+
to: [
|
2596
|
+
{ name: 'TuiResizable', moduleSpecifier: '@taiga-ui/cdk' },
|
2597
|
+
{ name: 'TuiResizer', moduleSpecifier: '@taiga-ui/cdk' },
|
2598
|
+
],
|
2599
|
+
},
|
2600
|
+
{
|
2601
|
+
from: { name: 'TuiResizeableDirective', moduleSpecifier: '@taiga-ui/cdk' },
|
2602
|
+
to: { name: 'TuiResizable', moduleSpecifier: '@taiga-ui/cdk' },
|
2603
|
+
},
|
2516
2604
|
];
|
@@ -13,4 +13,10 @@ exports.INPUTS_TO_REMOVE = [
|
|
13
13
|
tags: ['button', 'a'],
|
14
14
|
filterFn: (el) => (0, elements_1.hasElementAttribute)(el, 'tuiLink'),
|
15
15
|
},
|
16
|
+
{
|
17
|
+
inputName: 'disabled',
|
18
|
+
tags: ['a'],
|
19
|
+
filterFn: (el) => (0, elements_1.hasElementAttribute)(el, 'tuiIconButton') ||
|
20
|
+
(0, elements_1.hasElementAttribute)(el, 'tuiButton'),
|
21
|
+
},
|
16
22
|
];
|
@@ -8,6 +8,12 @@ exports.TYPES_TO_RENAME = [
|
|
8
8
|
moduleSpecifier: ['@taiga-ui/core'],
|
9
9
|
removeImport: true,
|
10
10
|
},
|
11
|
+
{
|
12
|
+
from: 'TuiStepState',
|
13
|
+
to: "'error' | 'normal' | 'pass'",
|
14
|
+
moduleSpecifier: ['@taiga-ui/kit'],
|
15
|
+
removeImport: true,
|
16
|
+
},
|
11
17
|
{
|
12
18
|
from: 'TuiIllustrationName',
|
13
19
|
moduleSpecifier: ['@taiga-ui/proprietary-icons'],
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/// <reference lib="es2021" />
|
2
2
|
import type { DevkitFileSystem } from 'ng-morph';
|
3
3
|
import type { TuiSchema } from '../../../ng-add/schema';
|
4
|
-
export declare const TUI_EDITOR_VERSION = "^4.
|
4
|
+
export declare const TUI_EDITOR_VERSION = "^4.21.0";
|
5
5
|
export declare function migrateEditor(fileSystem: DevkitFileSystem, options: TuiSchema): void;
|
@@ -3,9 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.migrateEditor = exports.TUI_EDITOR_VERSION = void 0;
|
4
4
|
const ng_morph_1 = require("ng-morph");
|
5
5
|
const file_globs_1 = require("../../../constants/file-globs");
|
6
|
+
const add_unique_import_1 = require("../../../utils/add-unique-import");
|
7
|
+
const get_named_import_references_1 = require("../../../utils/get-named-import-references");
|
6
8
|
const replace_identifier_1 = require("../../steps/replace-identifier");
|
7
9
|
const replace_package_name_1 = require("../../steps/replace-package-name");
|
8
|
-
exports.TUI_EDITOR_VERSION = '^4.
|
10
|
+
exports.TUI_EDITOR_VERSION = '^4.21.0';
|
9
11
|
function migrateEditor(fileSystem, options) {
|
10
12
|
const moduleSpecifier = ['@tinkoff/tui-editor', '@taiga-ui/addon-editor'];
|
11
13
|
const hasEditor = moduleSpecifier.every((pkg) => !(0, ng_morph_1.getPackageJsonDependency)(fileSystem.tree, pkg));
|
@@ -14,6 +16,7 @@ function migrateEditor(fileSystem, options) {
|
|
14
16
|
}
|
15
17
|
!options['skip-logs'] &&
|
16
18
|
(0, ng_morph_1.infoLog)(`${ng_morph_1.SMALL_TAB_SYMBOL}${ng_morph_1.REPLACE_SYMBOL} migrating editor...`);
|
19
|
+
addProprietaryProviders(fileSystem);
|
17
20
|
(0, replace_identifier_1.replaceIdentifiers)(options, [
|
18
21
|
{
|
19
22
|
from: { name: 'TuiEditorModule', moduleSpecifier },
|
@@ -73,3 +76,37 @@ function migrateEditor(fileSystem, options) {
|
|
73
76
|
!options['skip-logs'] && (0, ng_morph_1.titleLog)(`${ng_morph_1.FINISH_SYMBOL} successfully migrated \n`);
|
74
77
|
}
|
75
78
|
exports.migrateEditor = migrateEditor;
|
79
|
+
function addProprietaryProviders(fileSystem) {
|
80
|
+
var _a;
|
81
|
+
const proprietary = (0, ng_morph_1.getPackageJsonDependency)(fileSystem.tree, '@taiga-ui/proprietary-core') ||
|
82
|
+
(0, ng_morph_1.getPackageJsonDependency)(fileSystem.tree, '@taiga-ui/proprietary');
|
83
|
+
if (!proprietary) {
|
84
|
+
return;
|
85
|
+
}
|
86
|
+
const refs = [
|
87
|
+
...(0, get_named_import_references_1.getNamedImportReferences)('TuiEditorModule', '@tinkoff/tui-editor'),
|
88
|
+
...(0, get_named_import_references_1.getNamedImportReferences)('TuiEditorModule', '@taiga-ui/addon-editor'),
|
89
|
+
];
|
90
|
+
for (const ref of refs) {
|
91
|
+
if (ref.wasForgotten()) {
|
92
|
+
return;
|
93
|
+
}
|
94
|
+
const parent = ref.getParent();
|
95
|
+
const filePath = (_a = parent === null || parent === void 0 ? void 0 : parent.getSourceFile().getFilePath()) !== null && _a !== void 0 ? _a : '';
|
96
|
+
if (ng_morph_1.Node.isImportSpecifier(parent)) {
|
97
|
+
(0, add_unique_import_1.addUniqueImport)(filePath, 'tuiEditorOptionsProvider', '@taiga-ui/editor');
|
98
|
+
(0, add_unique_import_1.addUniqueImport)(filePath, 'TUI_PROPRIETARY_EDITOR_ICONS', '@taiga-ui/proprietary');
|
99
|
+
}
|
100
|
+
else if (ng_morph_1.Node.isArrayLiteralExpression(parent)) {
|
101
|
+
const componentClass = (0, ng_morph_1.getNgComponents)(filePath)[0];
|
102
|
+
const moduleClass = (0, ng_morph_1.getNgModules)(filePath)[0];
|
103
|
+
const provider = 'tuiEditorOptionsProvider({icons: TUI_PROPRIETARY_EDITOR_ICONS})';
|
104
|
+
if (componentClass) {
|
105
|
+
(0, ng_morph_1.addProviderToComponent)(componentClass, provider);
|
106
|
+
}
|
107
|
+
if (moduleClass) {
|
108
|
+
(0, ng_morph_1.addProviderToNgModule)(moduleClass, provider);
|
109
|
+
}
|
110
|
+
}
|
111
|
+
}
|
112
|
+
}
|
@@ -12,6 +12,8 @@ function migrateImportProvidersFrom(options) {
|
|
12
12
|
...(0, get_named_import_references_1.getNamedImportReferences)('TuiPushModule', '@taiga-ui/kit'),
|
13
13
|
...(0, get_named_import_references_1.getNamedImportReferences)('TuiPdfViewerModule', '@taiga-ui/kit'),
|
14
14
|
...(0, get_named_import_references_1.getNamedImportReferences)('TuiPreviewModule', '@taiga-ui/addon-preview'),
|
15
|
+
...(0, get_named_import_references_1.getNamedImportReferences)('TuiEditor', '@taiga-ui/editor'),
|
16
|
+
...(0, get_named_import_references_1.getNamedImportReferences)('TuiEditorSocket', '@taiga-ui/editor'),
|
15
17
|
];
|
16
18
|
for (const ref of refs) {
|
17
19
|
if (ref.wasForgotten()) {
|
@@ -61,7 +61,9 @@ function addProviders({ callExpression, fileSystem, modulePath, }) {
|
|
61
61
|
else if (module) {
|
62
62
|
(0, ng_morph_1.addProviderToNgModule)(module, 'NG_EVENT_PLUGINS', { unique: true });
|
63
63
|
}
|
64
|
-
|
64
|
+
const shouldAddImport = (providersArray || module) &&
|
65
|
+
!(0, ng_morph_1.getImports)(path, { moduleSpecifier: '@tinkoff/ng-event-plugins' }).length;
|
66
|
+
if (shouldAddImport) {
|
65
67
|
(0, add_unique_import_1.addUniqueImport)(path, 'NG_EVENT_PLUGINS', '@taiga-ui/event-plugins');
|
66
68
|
}
|
67
69
|
(0, ng_morph_1.getActiveProject)();
|
@@ -80,10 +80,11 @@ function migrateColor({ attr, sourceCodeLocation, recorder, templateOffset, slot
|
|
80
80
|
}
|
81
81
|
const value = attr.value;
|
82
82
|
const insertTo = (_b = (_a = sourceCodeLocation.startTag) === null || _a === void 0 ? void 0 : _a.endOffset) !== null && _b !== void 0 ? _b : 0;
|
83
|
+
const hasBinding = Boolean(attr) && (0, inputs_1.isBinding)(attr);
|
83
84
|
recorder.insertRight(insertTo + templateOffset + 1, `<tui-badge-notification
|
84
85
|
size="xs"
|
85
86
|
tuiSlot="${slot}"
|
86
|
-
[style.color]="'${value}'"
|
87
|
+
[style.color]="${hasBinding ? value : `'${value}'`}"
|
87
88
|
></tui-badge-notification>\n`);
|
88
89
|
}
|
89
90
|
function migrateContent({ attr, colorAttr, sourceCodeLocation, recorder, templateOffset, slot, size, }) {
|
@@ -23,7 +23,8 @@ function migrateBlocked({ resource, recorder, fileSystem, }) {
|
|
23
23
|
const [, contentAlignAttrLocation] = Object.entries(sourceCodeLocation.attrs || {}).find(([name]) => name.includes('contentalign')) || [];
|
24
24
|
const sizeAttr = (0, inputs_1.findAttr)(attrs, 'size');
|
25
25
|
const ngForAttr = (0, inputs_1.findAttr)(attrs, '*ngFor');
|
26
|
-
const
|
26
|
+
const tuiBlock = sizeAttr && (0, inputs_1.isBinding)(sizeAttr) ? '[tuiBlock]' : 'tuiBlock';
|
27
|
+
const newBlockAttr = `${tuiBlock}${sizeAttr ? `="${sizeAttr.value === 'xs' ? 's' : sizeAttr.value}"` : ''}`;
|
27
28
|
recorder.insertRight(templateOffset + (((_a = sourceCodeLocation.startTag) === null || _a === void 0 ? void 0 : _a.startOffset) || 1) - 1, `<label${ngForAttr ? ` *ngFor="${ngForAttr.value}"` : ''} ${newBlockAttr}${hideIconAttrLocation ? ' appearance=""' : ''}>`);
|
28
29
|
recorder.remove(templateOffset + ((_c = (_b = sourceCodeLocation.endTag) === null || _b === void 0 ? void 0 : _b.startOffset) !== null && _c !== void 0 ? _c : 0), `<${tagName}/>`.length);
|
29
30
|
recorder.insertRight(templateOffset + (((_d = sourceCodeLocation.endTag) === null || _d === void 0 ? void 0 : _d.startOffset) || 1), '</label>');
|
@@ -20,7 +20,9 @@ function migrateExpandable({ resource, recorder, fileSystem, }) {
|
|
20
20
|
if (expandableValue === 'false') {
|
21
21
|
const rowsAttr = (0, inputs_1.findAttr)(attrs, 'rows');
|
22
22
|
const insertTo = ((_h = (_g = sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.startTag) === null || _g === void 0 ? void 0 : _g.endOffset) !== null && _h !== void 0 ? _h : 0) - 1;
|
23
|
-
|
23
|
+
const insertOffset = templateOffset + insertTo;
|
24
|
+
const selfClosing = template[insertOffset - 1] === '/';
|
25
|
+
recorder.insertRight(selfClosing ? insertOffset - 1 : insertOffset, rowsAttr ? '' : '[rows]="1"');
|
24
26
|
}
|
25
27
|
if (expandableValue !== 'false' && expandableValue !== 'true') {
|
26
28
|
recorder.insertRight(templateOffset + ((_k = (_j = sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.startTag) === null || _j === void 0 ? void 0 : _j.startOffset) !== null && _k !== void 0 ? _k : 0), '<!-- Taiga migration TODO: "expandable" property has been removed. Use "rows" property instead -->\n');
|