@taiga-ui/cdk 3.24.0-dev.main-94f283d → 3.24.0-dev.main-cf04d14
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/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@taiga-ui/cdk",
|
3
|
-
"version": "3.24.0-dev.main-
|
3
|
+
"version": "3.24.0-dev.main-cf04d14",
|
4
4
|
"description": "Base library for creating Angular components and applications using Taiga UI principles regarding of actual visual appearance",
|
5
5
|
"keywords": [
|
6
6
|
"angular",
|
@@ -19,7 +19,7 @@
|
|
19
19
|
"@ng-web-apis/mutation-observer": "2.0.0",
|
20
20
|
"@ng-web-apis/resize-observer": "2.0.0",
|
21
21
|
"@tinkoff/ng-event-plugins": "3.1.0",
|
22
|
-
"@tinkoff/ng-polymorpheus": "4.0
|
22
|
+
"@tinkoff/ng-polymorpheus": "4.1.0",
|
23
23
|
"tslib": "2.5.0"
|
24
24
|
},
|
25
25
|
"peerDependencies": {
|
@@ -357,11 +357,6 @@ exports.DEPRECATED_FUNCTIONS = [
|
|
357
357
|
to: `tuiMoveFocus`,
|
358
358
|
moduleSpecifier: [`@taiga-ui/cdk`],
|
359
359
|
},
|
360
|
-
{
|
361
|
-
from: `setNativeFocused`,
|
362
|
-
to: `tuiSetNativeFocused`,
|
363
|
-
moduleSpecifier: [`@taiga-ui/cdk`],
|
364
|
-
},
|
365
360
|
{
|
366
361
|
from: `setNativeMouseFocused`,
|
367
362
|
to: `tuiSetNativeMouseFocused`,
|
@@ -87,7 +87,8 @@ function main(options) {
|
|
87
87
|
}
|
88
88
|
function addTaigaStyles(options) {
|
89
89
|
return (tree, context) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
90
|
-
const
|
90
|
+
const proprietary = ng_morph_1.getPackageJsonDependency(tree, `@taiga-ui/proprietary-core`);
|
91
|
+
const taigaStyles = proprietary ? [] : [taiga_styles_1.TAIGA_THEME_FONTS];
|
91
92
|
const stylesToReplace = {
|
92
93
|
from: taiga_styles_1.TAIGA_GLOBAL_OLD_STYLE,
|
93
94
|
to: [taiga_styles_1.TAIGA_GLOBAL_NEW_STYLE],
|
@@ -13,6 +13,10 @@ function replaceFunctions(options) {
|
|
13
13
|
replaceFallbackValue(get_named_import_references_1.getNamedImportReferences(`fallbackValue`, `@taiga-ui/cdk`));
|
14
14
|
replaceCustomEvent(get_named_import_references_1.getNamedImportReferences(`tuiCustomEvent`, `@taiga-ui/cdk`));
|
15
15
|
replaceClosestElement(get_named_import_references_1.getNamedImportReferences(`getClosestElement`, `@taiga-ui/cdk`));
|
16
|
+
replaceNativeFocused([
|
17
|
+
...get_named_import_references_1.getNamedImportReferences(`tuiSetNativeFocused`, `@taiga-ui/cdk`),
|
18
|
+
...get_named_import_references_1.getNamedImportReferences(`setNativeFocused`, `@taiga-ui/cdk`),
|
19
|
+
]);
|
16
20
|
replaceDeprecatedFunction();
|
17
21
|
modifyFormatNumberArgs();
|
18
22
|
modifyClosestFocusable();
|
@@ -46,6 +50,21 @@ function replacePadStart(references) {
|
|
46
50
|
}
|
47
51
|
});
|
48
52
|
}
|
53
|
+
function replaceNativeFocused(references) {
|
54
|
+
references.forEach(ref => {
|
55
|
+
const parent = ref.getParent();
|
56
|
+
if (ng_morph_1.Node.isImportSpecifier(parent)) {
|
57
|
+
import_manipulations_1.removeImport(parent);
|
58
|
+
}
|
59
|
+
else if (ng_morph_1.Node.isCallExpression(parent)) {
|
60
|
+
const [targetString, focusedArg, preventScroll] = parent.getArguments();
|
61
|
+
const setFocused = !focusedArg || focusedArg.getText() === `true`;
|
62
|
+
const focus = `${targetString.getText()}.focus(${(preventScroll === null || preventScroll === void 0 ? void 0 : preventScroll.getText()) ? `{preventScroll: true}` : ``})`;
|
63
|
+
const blur = `${targetString.getText()}.blur()`;
|
64
|
+
parent.replaceWithText(setFocused ? focus : blur);
|
65
|
+
}
|
66
|
+
});
|
67
|
+
}
|
49
68
|
function replaceClosestElement(references) {
|
50
69
|
references.forEach(ref => {
|
51
70
|
const parent = ref.getParent();
|