@taiga-ui/cdk 3.51.0-canary.2b8d4a0 → 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.
- package/bundles/taiga-ui-cdk-components-alert-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-constants.umd.js +2 -2
- package/bundles/taiga-ui-cdk-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-filter.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-mapper.umd.js.map +1 -1
- package/components/alert-host/alert-host.component.d.ts +2 -2
- package/constants/used-icons.d.ts +1 -1
- package/constants/version.d.ts +1 -1
- package/constants/version.js +1 -1
- package/esm2015/components/alert-host/alert-host.component.js +1 -1
- package/esm2015/constants/used-icons.js +2 -2
- package/esm2015/constants/version.js +2 -2
- package/esm2015/pipes/filter/filter.pipe.js +1 -1
- package/esm2015/pipes/mapper/mapper.pipe.js +1 -1
- package/esm2015/types/mapper.js +1 -1
- package/esm2015/types/matcher.js +1 -1
- package/fesm2015/taiga-ui-cdk-components-alert-host.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-constants.js +2 -2
- package/fesm2015/taiga-ui-cdk-constants.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-pipes-filter.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-pipes-mapper.js.map +1 -1
- package/package.json +5 -5
- package/pipes/filter/filter.pipe.d.ts +1 -1
- package/pipes/mapper/mapper.pipe.d.ts +1 -1
- package/schematics/index.d.ts +0 -1
- package/schematics/index.js +0 -1
- package/schematics/ng-update/{v3/interfaces → interfaces}/replaceable-tag.d.ts +1 -1
- package/schematics/ng-update/steps/rename-types.js +1 -1
- package/schematics/ng-update/steps/replace-enums.js +2 -2
- package/schematics/ng-update/steps/{replace-const.d.ts → replace-identifier.d.ts} +1 -1
- package/schematics/ng-update/steps/{replace-const.js → replace-identifier.js} +4 -4
- package/schematics/ng-update/steps/replace-services.js +1 -1
- package/schematics/ng-update/utils/templates/remove-inputs.d.ts +10 -0
- package/schematics/ng-update/utils/templates/remove-inputs.js +19 -0
- package/schematics/ng-update/utils/templates/replace-attr-values.d.ts +1 -1
- package/schematics/ng-update/utils/templates/replace-tags.d.ts +10 -0
- package/schematics/ng-update/utils/templates/replace-tags.js +19 -0
- package/schematics/ng-update/v3/constants/templates.d.ts +3 -3
- package/schematics/ng-update/v3/index.d.ts +0 -1
- package/schematics/ng-update/v3/index.js +3 -15
- package/schematics/ng-update/v3/steps/migrate-polymorpheus.js +1 -1
- package/schematics/ng-update/v3/steps/migrate-templates.js +9 -26
- package/schematics/ng-update/v3/steps/miscellaneous.js +1 -1
- package/schematics/ng-update/v3-40/index.js +1 -1
- package/schematics/ng-update/v4/index.js +15 -3
- package/schematics/ng-update/v4/steps/replace-thumbnail-card.d.ts +3 -2
- package/schematics/ng-update/v4/steps/replace-thumbnail-card.js +62 -34
- package/schematics/ng-update/v4/steps/restore-tui-mapper.d.ts +1 -2
- package/schematics/ng-update/v4/steps/restore-tui-mapper.js +23 -67
- package/schematics/ng-update/v4/steps/restore-tui-matcher.d.ts +1 -2
- package/schematics/ng-update/v4/steps/restore-tui-matcher.js +23 -67
- package/schematics/utils/add-import-to-component.js +2 -2
- package/types/mapper.d.ts +2 -1
- package/types/matcher.d.ts +3 -2
- /package/schematics/ng-update/{v3/interfaces → interfaces}/removable-input.d.ts +0 -0
- /package/schematics/ng-update/{v3/interfaces → interfaces}/removable-input.js +0 -0
- /package/schematics/ng-update/{v3/interfaces → interfaces}/replaceable-attribute-value.d.ts +0 -0
- /package/schematics/ng-update/{v3/interfaces → interfaces}/replaceable-attribute-value.js +0 -0
- /package/schematics/ng-update/{v3/interfaces → interfaces}/replaceable-tag.js +0 -0
- /package/schematics/{utils → ng-update/utils/templates}/replace-tag.d.ts +0 -0
- /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
|
13
|
-
const
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
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
|
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
|
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
|
-
|
33
|
-
|
34
|
-
|
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
|
43
|
-
|
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:
|
48
|
-
|
47
|
+
from: {
|
48
|
+
attrName: `brandLogo`,
|
49
|
+
withTagNames: [`tui-card`, `tui-thumbnail-card`],
|
50
|
+
},
|
51
|
+
to: { attrName: `iconLeft` },
|
49
52
|
},
|
50
53
|
{
|
51
|
-
from:
|
52
|
-
|
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;
|
@@ -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
|
9
|
-
const
|
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
|
-
|
13
|
-
|
14
|
-
|
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
|
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
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
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
|
41
|
-
if (
|
42
|
-
|
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
|
-
|
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
|
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
|
-
|
58
|
-
|
59
|
-
|
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
|
}
|
@@ -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
|
9
|
-
const
|
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
|
-
|
13
|
-
|
14
|
-
|
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
|
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
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
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
|
41
|
-
if (
|
42
|
-
|
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
|
-
|
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
|
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
|
-
|
58
|
-
|
59
|
-
|
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
|
4
|
+
const ng_morph_1 = require("ng-morph");
|
5
5
|
function addImportToComponent(classDeclaration, moduleName, { unique = true } = {}) {
|
6
|
-
|
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
|
1
|
+
export declare type TuiMapper<T, G> = (item: T, ...args: any[]) => G;
|
2
|
+
export declare type TuiTypedMapper<T extends unknown[], G> = (...args: T) => G;
|
package/types/matcher.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import { TuiStringHandler } from './handler';
|
2
|
-
import { TuiMapper } from './mapper';
|
3
|
-
export declare type TuiMatcher<I
|
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;
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|