@taiga-ui/cdk 3.51.0-canary.4016f4d → 3.51.0-canary.6291033

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.
Files changed (61) hide show
  1. package/bundles/taiga-ui-cdk-components-alert-host.umd.js.map +1 -1
  2. package/bundles/taiga-ui-cdk-constants.umd.js +2 -2
  3. package/bundles/taiga-ui-cdk-constants.umd.js.map +1 -1
  4. package/bundles/taiga-ui-cdk-pipes-filter.umd.js.map +1 -1
  5. package/bundles/taiga-ui-cdk-pipes-mapper.umd.js.map +1 -1
  6. package/components/alert-host/alert-host.component.d.ts +2 -2
  7. package/constants/used-icons.d.ts +1 -1
  8. package/constants/version.d.ts +1 -1
  9. package/constants/version.js +1 -1
  10. package/esm2015/components/alert-host/alert-host.component.js +1 -1
  11. package/esm2015/constants/used-icons.js +2 -2
  12. package/esm2015/constants/version.js +2 -2
  13. package/esm2015/pipes/filter/filter.pipe.js +1 -1
  14. package/esm2015/pipes/mapper/mapper.pipe.js +1 -1
  15. package/esm2015/types/mapper.js +1 -1
  16. package/esm2015/types/matcher.js +1 -1
  17. package/fesm2015/taiga-ui-cdk-components-alert-host.js.map +1 -1
  18. package/fesm2015/taiga-ui-cdk-constants.js +2 -2
  19. package/fesm2015/taiga-ui-cdk-constants.js.map +1 -1
  20. package/fesm2015/taiga-ui-cdk-pipes-filter.js.map +1 -1
  21. package/fesm2015/taiga-ui-cdk-pipes-mapper.js.map +1 -1
  22. package/package.json +5 -5
  23. package/pipes/filter/filter.pipe.d.ts +1 -1
  24. package/pipes/mapper/mapper.pipe.d.ts +1 -1
  25. package/schematics/index.d.ts +0 -1
  26. package/schematics/index.js +0 -1
  27. package/schematics/ng-update/{v3/interfaces → interfaces}/replaceable-tag.d.ts +1 -1
  28. package/schematics/ng-update/steps/rename-types.js +1 -1
  29. package/schematics/ng-update/steps/replace-enums.js +2 -2
  30. package/schematics/ng-update/steps/{replace-const.d.ts → replace-identifier.d.ts} +1 -1
  31. package/schematics/ng-update/steps/{replace-const.js → replace-identifier.js} +4 -4
  32. package/schematics/ng-update/steps/replace-services.js +1 -1
  33. package/schematics/ng-update/utils/templates/remove-inputs.d.ts +10 -0
  34. package/schematics/ng-update/utils/templates/remove-inputs.js +19 -0
  35. package/schematics/ng-update/utils/templates/replace-attr-values.d.ts +1 -1
  36. package/schematics/ng-update/utils/templates/replace-tags.d.ts +10 -0
  37. package/schematics/ng-update/utils/templates/replace-tags.js +19 -0
  38. package/schematics/ng-update/v3/constants/templates.d.ts +3 -3
  39. package/schematics/ng-update/v3/index.d.ts +0 -1
  40. package/schematics/ng-update/v3/index.js +3 -15
  41. package/schematics/ng-update/v3/steps/migrate-polymorpheus.js +1 -1
  42. package/schematics/ng-update/v3/steps/migrate-templates.js +9 -26
  43. package/schematics/ng-update/v3/steps/miscellaneous.js +1 -1
  44. package/schematics/ng-update/v3-40/index.js +1 -1
  45. package/schematics/ng-update/v4/index.js +15 -3
  46. package/schematics/ng-update/v4/steps/replace-thumbnail-card.d.ts +3 -2
  47. package/schematics/ng-update/v4/steps/replace-thumbnail-card.js +62 -34
  48. package/schematics/ng-update/v4/steps/restore-tui-mapper.d.ts +1 -2
  49. package/schematics/ng-update/v4/steps/restore-tui-mapper.js +23 -67
  50. package/schematics/ng-update/v4/steps/restore-tui-matcher.d.ts +1 -2
  51. package/schematics/ng-update/v4/steps/restore-tui-matcher.js +23 -67
  52. package/schematics/utils/add-import-to-component.js +2 -2
  53. package/types/mapper.d.ts +2 -1
  54. package/types/matcher.d.ts +3 -2
  55. /package/schematics/ng-update/{v3/interfaces → interfaces}/removable-input.d.ts +0 -0
  56. /package/schematics/ng-update/{v3/interfaces → interfaces}/removable-input.js +0 -0
  57. /package/schematics/ng-update/{v3/interfaces → interfaces}/replaceable-attribute-value.d.ts +0 -0
  58. /package/schematics/ng-update/{v3/interfaces → interfaces}/replaceable-attribute-value.js +0 -0
  59. /package/schematics/ng-update/{v3/interfaces → interfaces}/replaceable-tag.js +0 -0
  60. /package/schematics/{utils → ng-update/utils/templates}/replace-tag.d.ts +0 -0
  61. /package/schematics/{utils → ng-update/utils/templates}/replace-tag.js +0 -0
@@ -1,58 +1,86 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.replaceThumbnailCard = void 0;
4
- const ng_morph_1 = require("ng-morph");
3
+ exports.replaceReferenceTypes = exports.replaceThumbnailCard = void 0;
5
4
  const constants_1 = require("../../../constants");
6
5
  const colored_log_1 = require("../../../utils/colored-log");
7
- const project_root_1 = require("../../../utils/project-root");
8
- const replace_tag_1 = require("../../../utils/replace-tag");
9
6
  const elements_1 = require("../../../utils/templates/elements");
10
7
  const get_component_templates_1 = require("../../../utils/templates/get-component-templates");
11
8
  const template_resource_1 = require("../../../utils/templates/template-resource");
12
- const get_file_system_1 = require("../../utils/get-file-system");
13
- const replace_text_1 = require("../../utils/replace-text");
14
- function replaceThumbnailCard(options) {
15
- return (tree, _) => {
16
- const fileSystem = get_file_system_1.getFileSystem(tree);
17
- replaceCardTag(options, fileSystem);
18
- replaceReferenceTypes(options, fileSystem);
19
- !options[`skip-logs`] && colored_log_1.titleLog(`${colored_log_1.FINISH_SYMBOL} successfully migrated \n`);
20
- };
9
+ const replace_identifier_1 = require("../../steps/replace-identifier");
10
+ const remove_inputs_1 = require("../../utils/templates/remove-inputs");
11
+ const replace_tags_1 = require("../../utils/templates/replace-tags");
12
+ function replaceThumbnailCard(options, fileSystem) {
13
+ replaceCardTemplate(options, fileSystem);
14
+ replaceReferenceTypes(options);
15
+ !options[`skip-logs`] && colored_log_1.titleLog(`${colored_log_1.FINISH_SYMBOL} successfully migrated \n`);
21
16
  }
22
17
  exports.replaceThumbnailCard = replaceThumbnailCard;
23
- function replaceCardTag(options, fileSystem) {
18
+ function replaceCardTemplate(options, fileSystem) {
24
19
  !options[`skip-logs`] &&
25
20
  colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} replacing <tui-card /> to <tui-thumbnail-card />`);
26
21
  const templateResources = get_component_templates_1.getComponentTemplates(constants_1.ALL_TS_FILES);
27
22
  for (const resource of templateResources) {
28
23
  const template = template_resource_1.getTemplateFromTemplateResource(resource, fileSystem);
29
- const elements = elements_1.findElementsByTagName(template, `tui-card`);
24
+ const templateOffset = template_resource_1.getTemplateOffset(resource);
30
25
  const path = fileSystem.resolve(template_resource_1.getPathFromTemplateResource(resource));
31
26
  const recorder = fileSystem.edit(path);
32
- elements.forEach(({ sourceCodeLocation }) => {
33
- if (sourceCodeLocation) {
34
- replace_tag_1.replaceTag(recorder, sourceCodeLocation, `tui-card`, `tui-thumbnail-card`);
35
- }
27
+ replace_tags_1.replaceTags({
28
+ resource,
29
+ recorder,
30
+ fileSystem,
31
+ replaceableItems: [{ from: `tui-card`, to: `tui-thumbnail-card` }],
32
+ });
33
+ replaceCardInputs({ template, recorder, templateOffset });
34
+ remove_inputs_1.removeInputs({
35
+ resource,
36
+ recorder,
37
+ fileSystem,
38
+ replaceableItems: [
39
+ { inputName: `active`, tags: [`tui-card`, `tui-thumbnail-card`] },
40
+ ],
36
41
  });
37
42
  }
38
- fileSystem.commitEdits();
39
- ng_morph_1.saveActiveProject();
40
- ng_morph_1.setActiveProject(ng_morph_1.createProject(fileSystem.tree, project_root_1.projectRoot(), constants_1.ALL_FILES));
41
43
  }
42
- function replaceReferenceTypes(options, fileSystem) {
43
- !options[`skip-logs`] &&
44
- colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} replacing TuiCard(Module|Component) to TuiThumbnailCard(Module|Component)`);
45
- replace_text_1.replaceText([
44
+ function replaceCardInputs({ template, recorder, templateOffset, }) {
45
+ const attrsToReplace = [
46
46
  {
47
- from: `TuiCardModule`,
48
- to: `TuiThumbnailCardModule`,
47
+ from: {
48
+ attrName: `brandLogo`,
49
+ withTagNames: [`tui-card`, `tui-thumbnail-card`],
50
+ },
51
+ to: { attrName: `iconLeft` },
49
52
  },
50
53
  {
51
- from: `TuiCardComponent`,
52
- to: `TuiThumbnailCardComponent`,
54
+ from: {
55
+ attrName: `[brandLogo]`,
56
+ withTagNames: [`tui-card`, `tui-thumbnail-card`],
57
+ },
58
+ to: { attrName: `[iconLeft]` },
59
+ },
60
+ ];
61
+ for (const { from, to } of attrsToReplace) {
62
+ const offsets = [
63
+ ...elements_1.findAttributeOnElementWithTag(template, from.attrName, from.withTagNames || []),
64
+ ];
65
+ offsets.forEach(offset => {
66
+ recorder.remove(offset + templateOffset, from.attrName.length);
67
+ recorder.insertRight(offset + templateOffset, to.attrName);
68
+ });
69
+ }
70
+ }
71
+ function replaceReferenceTypes(options) {
72
+ !options[`skip-logs`] &&
73
+ colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} replacing TuiCard(Module|Component) to TuiThumbnailCard(Module|Component)`);
74
+ replace_identifier_1.replaceIdentifier({
75
+ from: { name: `TuiCardModule`, moduleSpecifier: `@taiga-ui/addon-commerce` },
76
+ to: { name: `TuiThumbnailCardModule`, moduleSpecifier: `@taiga-ui/addon-commerce` },
77
+ });
78
+ replace_identifier_1.replaceIdentifier({
79
+ from: { name: `TuiCardComponent`, moduleSpecifier: `@taiga-ui/addon-commerce` },
80
+ to: {
81
+ name: `TuiThumbnailCardComponent`,
82
+ moduleSpecifier: `@taiga-ui/addon-commerce`,
53
83
  },
54
- ]);
55
- fileSystem.commitEdits();
56
- ng_morph_1.saveActiveProject();
57
- ng_morph_1.setActiveProject(ng_morph_1.createProject(fileSystem.tree, project_root_1.projectRoot(), constants_1.ALL_FILES));
84
+ });
58
85
  }
86
+ exports.replaceReferenceTypes = replaceReferenceTypes;
@@ -1,3 +1,2 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
1
  import { TuiSchema } from '../../../ng-add/schema';
3
- export declare function restoreTuiMapper(options: TuiSchema): Rule;
2
+ export declare function restoreTuiMapper(options: TuiSchema): void;
@@ -2,83 +2,39 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.restoreTuiMapper = void 0;
4
4
  const ng_morph_1 = require("ng-morph");
5
- const ts_morph_1 = require("ts-morph");
6
- const constants_1 = require("../../../constants");
7
5
  const colored_log_1 = require("../../../utils/colored-log");
8
- const project_root_1 = require("../../../utils/project-root");
9
- const get_file_system_1 = require("../../utils/get-file-system");
10
- const replace_substrings_1 = require("./utils/replace-substrings");
6
+ const get_named_import_references_1 = require("../../../utils/get-named-import-references");
7
+ const replace_identifier_1 = require("../../steps/replace-identifier");
11
8
  function restoreTuiMapper(options) {
12
- return (tree, _) => {
13
- const fileSystem = get_file_system_1.getFileSystem(tree);
14
- updateTuiMapper(options, fileSystem);
15
- renameTuiTypedMapper(options, fileSystem);
16
- !options[`skip-logs`] && colored_log_1.titleLog(`${colored_log_1.FINISH_SYMBOL} successfully migrated \n`);
17
- };
9
+ updateTuiMapper(options);
10
+ renameTuiTypedMapper(options);
11
+ !options[`skip-logs`] && colored_log_1.titleLog(`${colored_log_1.FINISH_SYMBOL} successfully migrated \n`);
18
12
  }
19
13
  exports.restoreTuiMapper = restoreTuiMapper;
20
- function updateTuiMapper(options, fileSystem) {
14
+ function updateTuiMapper(options) {
21
15
  !options[`skip-logs`] &&
22
16
  colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} updating TuiMapper typing to the typed version`);
23
- ng_morph_1.getSourceFiles(constants_1.ALL_TS_FILES).forEach(sourceFile => {
24
- const replacements = findTuiMapperFirstTypeArgReplacements(sourceFile);
25
- const sourceText = sourceFile.getFullText();
26
- const transformed = replace_substrings_1.replaceSubstrings(sourceText, replacements);
27
- sourceFile.replaceWithText(transformed);
28
- });
29
- fileSystem.commitEdits();
30
- ng_morph_1.saveActiveProject();
31
- ng_morph_1.setActiveProject(ng_morph_1.createProject(fileSystem.tree, project_root_1.projectRoot(), constants_1.ALL_FILES));
32
- }
33
- function findTuiMapperFirstTypeArgReplacements(sourceFile) {
34
- const replacements = [];
35
- sourceFile.transform(traversal => {
36
- const node = traversal.visitChildren();
37
- if (!ts_morph_1.ts.isTypeReferenceNode(node) || node.typeName.getText() !== `TuiMapper`) {
38
- return node;
17
+ const refs = get_named_import_references_1.getNamedImportReferences(`TuiMapper`, `@taiga-ui/cdk`);
18
+ for (const ref of refs) {
19
+ if (ref.wasForgotten()) {
20
+ return;
39
21
  }
40
- const typeArguments = node.typeArguments;
41
- if (!typeArguments || typeArguments.length !== 2) {
42
- return node;
22
+ const parent = ref.getParent();
23
+ if (ng_morph_1.Node.isTypeReference(parent)) {
24
+ const typeArguments = parent.getTypeArguments();
25
+ if (!typeArguments || typeArguments.length !== 2) {
26
+ return;
27
+ }
28
+ const [inputType] = typeArguments;
29
+ inputType.replaceWithText(`[${inputType.getText()}, ...any]`);
43
30
  }
44
- const [inputType] = typeArguments;
45
- replacements.push({
46
- start: inputType.getStart(),
47
- from: inputType.getText(),
48
- to: `[${inputType.getText()}, ...any]`,
49
- });
50
- return node;
51
- });
52
- return replacements;
31
+ }
53
32
  }
54
- function renameTuiTypedMapper(options, fileSystem) {
33
+ function renameTuiTypedMapper(options) {
55
34
  !options[`skip-logs`] &&
56
35
  colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} renaming TuiTypedMapper to TuiMapper`);
57
- ng_morph_1.getSourceFiles(constants_1.ALL_TS_FILES).forEach(sourceFile => {
58
- const replacements = findTuiTypedMapperReplacements(sourceFile);
59
- const sourceText = sourceFile.getFullText();
60
- const transformed = replace_substrings_1.replaceSubstrings(sourceText, replacements);
61
- sourceFile.replaceWithText(transformed);
62
- sourceFile.organizeImports();
63
- });
64
- fileSystem.commitEdits();
65
- ng_morph_1.saveActiveProject();
66
- ng_morph_1.setActiveProject(ng_morph_1.createProject(fileSystem.tree, project_root_1.projectRoot(), constants_1.ALL_FILES));
67
- }
68
- function findTuiTypedMapperReplacements(sourceFile) {
69
- const replacements = [];
70
- sourceFile.transform(traversal => {
71
- const node = traversal.visitChildren();
72
- if (!ts_morph_1.ts.isTypeReferenceNode(node) ||
73
- node.typeName.getText() !== `TuiTypedMapper`) {
74
- return node;
75
- }
76
- replacements.push({
77
- start: node.getStart(),
78
- from: `TuiTypedMapper`,
79
- to: `TuiMapper`,
80
- });
81
- return node;
36
+ replace_identifier_1.replaceIdentifier({
37
+ from: { name: `TuiTypedMapper`, moduleSpecifier: `@taiga-ui/cdk` },
38
+ to: { name: `TuiMapper`, moduleSpecifier: `@taiga-ui/cdk` },
82
39
  });
83
- return replacements;
84
40
  }
@@ -1,3 +1,2 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
1
  import { TuiSchema } from '../../../ng-add/schema';
3
- export declare function restoreTuiMatcher(options: TuiSchema): Rule;
2
+ export declare function restoreTuiMatcher(options: TuiSchema): void;
@@ -2,83 +2,39 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.restoreTuiMatcher = void 0;
4
4
  const ng_morph_1 = require("ng-morph");
5
- const ts_morph_1 = require("ts-morph");
6
- const constants_1 = require("../../../constants");
7
5
  const colored_log_1 = require("../../../utils/colored-log");
8
- const project_root_1 = require("../../../utils/project-root");
9
- const get_file_system_1 = require("../../utils/get-file-system");
10
- const replace_substrings_1 = require("./utils/replace-substrings");
6
+ const get_named_import_references_1 = require("../../../utils/get-named-import-references");
7
+ const replace_identifier_1 = require("../../steps/replace-identifier");
11
8
  function restoreTuiMatcher(options) {
12
- return (tree, _) => {
13
- const fileSystem = get_file_system_1.getFileSystem(tree);
14
- updateTuiMatcher(options, fileSystem);
15
- renameTuiTypedMatcher(options, fileSystem);
16
- !options[`skip-logs`] && colored_log_1.titleLog(`${colored_log_1.FINISH_SYMBOL} successfully migrated \n`);
17
- };
9
+ updateTuiMatcher(options);
10
+ renameTuiTypedMatcher(options);
11
+ !options[`skip-logs`] && colored_log_1.titleLog(`${colored_log_1.FINISH_SYMBOL} successfully migrated \n`);
18
12
  }
19
13
  exports.restoreTuiMatcher = restoreTuiMatcher;
20
- function updateTuiMatcher(options, fileSystem) {
14
+ function updateTuiMatcher(options) {
21
15
  !options[`skip-logs`] &&
22
16
  colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} updating TuiMatcher typing to the typed version`);
23
- ng_morph_1.getSourceFiles(constants_1.ALL_TS_FILES).forEach(sourceFile => {
24
- const replacements = findTuiMatcherFirstTypeArgReplacements(sourceFile);
25
- const sourceText = sourceFile.getFullText();
26
- const transformed = replace_substrings_1.replaceSubstrings(sourceText, replacements);
27
- sourceFile.replaceWithText(transformed);
28
- });
29
- fileSystem.commitEdits();
30
- ng_morph_1.saveActiveProject();
31
- ng_morph_1.setActiveProject(ng_morph_1.createProject(fileSystem.tree, project_root_1.projectRoot(), constants_1.ALL_FILES));
32
- }
33
- function findTuiMatcherFirstTypeArgReplacements(sourceFile) {
34
- const replacements = [];
35
- sourceFile.transform(traversal => {
36
- const node = traversal.visitChildren();
37
- if (!ts_morph_1.ts.isTypeReferenceNode(node) || node.typeName.getText() !== `TuiMatcher`) {
38
- return node;
17
+ const refs = get_named_import_references_1.getNamedImportReferences(`TuiMatcher`, `@taiga-ui/cdk`);
18
+ for (const ref of refs) {
19
+ if (ref.wasForgotten()) {
20
+ return;
39
21
  }
40
- const typeArguments = node.typeArguments;
41
- if (!typeArguments || typeArguments.length !== 1) {
42
- return node;
22
+ const parent = ref.getParent();
23
+ if (ng_morph_1.Node.isTypeReference(parent)) {
24
+ const typeArguments = parent.getTypeArguments();
25
+ if (!typeArguments || typeArguments.length !== 1) {
26
+ return;
27
+ }
28
+ const [inputType] = typeArguments;
29
+ inputType.replaceWithText(`[${inputType.getText()}, ...any]`);
43
30
  }
44
- const [inputType] = typeArguments;
45
- replacements.push({
46
- start: inputType.getStart(),
47
- from: inputType.getText(),
48
- to: `[${inputType.getText()}, ...any]`,
49
- });
50
- return node;
51
- });
52
- return replacements;
31
+ }
53
32
  }
54
- function renameTuiTypedMatcher(options, fileSystem) {
33
+ function renameTuiTypedMatcher(options) {
55
34
  !options[`skip-logs`] &&
56
35
  colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} renaming TuiTypedMatcher to TuiMatcher`);
57
- ng_morph_1.getSourceFiles(constants_1.ALL_TS_FILES).forEach(sourceFile => {
58
- const replacements = findTuiTypedMatcherReplacements(sourceFile);
59
- const sourceText = sourceFile.getFullText();
60
- const transformed = replace_substrings_1.replaceSubstrings(sourceText, replacements);
61
- sourceFile.replaceWithText(transformed);
62
- sourceFile.organizeImports();
63
- });
64
- fileSystem.commitEdits();
65
- ng_morph_1.saveActiveProject();
66
- ng_morph_1.setActiveProject(ng_morph_1.createProject(fileSystem.tree, project_root_1.projectRoot(), constants_1.ALL_FILES));
67
- }
68
- function findTuiTypedMatcherReplacements(sourceFile) {
69
- const replacements = [];
70
- sourceFile.transform(traversal => {
71
- const node = traversal.visitChildren();
72
- if (!ts_morph_1.ts.isTypeReferenceNode(node) ||
73
- node.typeName.getText() !== `TuiTypedMatcher`) {
74
- return node;
75
- }
76
- replacements.push({
77
- start: node.getStart(),
78
- from: `TuiTypedMatcher`,
79
- to: `TuiMatcher`,
80
- });
81
- return node;
36
+ replace_identifier_1.replaceIdentifier({
37
+ from: { name: `TuiTypedMatcher`, moduleSpecifier: `@taiga-ui/cdk` },
38
+ to: { name: `TuiMatcher`, moduleSpecifier: `@taiga-ui/cdk` },
82
39
  });
83
- return replacements;
84
40
  }
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addImportToComponent = void 0;
4
- const push_to_array_property_1 = require("ng-morph/ng/helpers/push-to-array-property");
4
+ const ng_morph_1 = require("ng-morph");
5
5
  function addImportToComponent(classDeclaration, moduleName, { unique = true } = {}) {
6
- push_to_array_property_1.pushToArrayProperty(classDeclaration, `Component`, `imports`, moduleName, {
6
+ ng_morph_1.pushToDecoratorArrayProperty(classDeclaration, `Component`, `imports`, moduleName, {
7
7
  unique,
8
8
  forceToArray: true,
9
9
  });
package/types/mapper.d.ts CHANGED
@@ -1 +1,2 @@
1
- export declare type TuiMapper<T extends unknown[], G> = (...args: T) => G;
1
+ export declare type TuiMapper<T, G> = (item: T, ...args: any[]) => G;
2
+ export declare type TuiTypedMapper<T extends unknown[], G> = (...args: T) => G;
@@ -1,5 +1,6 @@
1
1
  import { TuiStringHandler } from './handler';
2
- import { TuiMapper } from './mapper';
3
- export declare type TuiMatcher<I extends unknown[]> = TuiMapper<I, boolean>;
2
+ import { TuiMapper, TuiTypedMapper } from './mapper';
3
+ export declare type TuiMatcher<I> = TuiMapper<I, boolean>;
4
+ export declare type TuiTypedMatcher<I extends unknown[]> = TuiTypedMapper<I, boolean>;
4
5
  export declare type TuiStringMatcher<I> = (item: I, matchValue: string, stringify: TuiStringHandler<I>) => boolean;
5
6
  export declare type TuiIdentityMatcher<I> = (item1: I, item2: I) => boolean;