@taiga-ui/cdk 4.37.0-canary.e7da31c → 4.38.0-canary.507d44d

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 (56) hide show
  1. package/constants/version.d.ts +1 -1
  2. package/constants/version.js +1 -1
  3. package/directives/animated/animated-parent.directive.d.ts +10 -0
  4. package/directives/animated/animated.directive.d.ts +14 -0
  5. package/directives/animated/index.d.ts +2 -0
  6. package/directives/index.d.ts +1 -0
  7. package/esm2022/constants/version.mjs +2 -2
  8. package/esm2022/directives/animated/animated-parent.directive.mjs +39 -0
  9. package/esm2022/directives/animated/animated.directive.mjs +81 -0
  10. package/esm2022/directives/animated/index.mjs +3 -0
  11. package/esm2022/directives/animated/taiga-ui-cdk-directives-animated.mjs +5 -0
  12. package/esm2022/directives/index.mjs +2 -1
  13. package/esm2022/pipes/index.mjs +2 -1
  14. package/esm2022/pipes/obfuscate/index.mjs +3 -0
  15. package/esm2022/pipes/obfuscate/obfuscate.options.mjs +10 -0
  16. package/esm2022/pipes/obfuscate/obfuscate.pipe.mjs +44 -0
  17. package/esm2022/pipes/obfuscate/taiga-ui-cdk-pipes-obfuscate.mjs +5 -0
  18. package/esm2022/utils/miscellaneous/index.mjs +2 -1
  19. package/esm2022/utils/miscellaneous/obfuscate.mjs +53 -0
  20. package/fesm2022/taiga-ui-cdk-constants.mjs +1 -1
  21. package/fesm2022/taiga-ui-cdk-constants.mjs.map +1 -1
  22. package/fesm2022/taiga-ui-cdk-directives-animated.mjs +120 -0
  23. package/fesm2022/taiga-ui-cdk-directives-animated.mjs.map +1 -0
  24. package/fesm2022/taiga-ui-cdk-directives.mjs +1 -0
  25. package/fesm2022/taiga-ui-cdk-directives.mjs.map +1 -1
  26. package/fesm2022/taiga-ui-cdk-pipes-obfuscate.mjs +59 -0
  27. package/fesm2022/taiga-ui-cdk-pipes-obfuscate.mjs.map +1 -0
  28. package/fesm2022/taiga-ui-cdk-pipes.mjs +1 -0
  29. package/fesm2022/taiga-ui-cdk-pipes.mjs.map +1 -1
  30. package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs +54 -1
  31. package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs.map +1 -1
  32. package/package.json +19 -7
  33. package/pipes/index.d.ts +1 -0
  34. package/pipes/obfuscate/index.d.ts +2 -0
  35. package/pipes/obfuscate/obfuscate.options.d.ts +19 -0
  36. package/pipes/obfuscate/obfuscate.pipe.d.ts +16 -0
  37. package/schematics/collection.json +5 -0
  38. package/schematics/migrate-tui-let/index.d.ts +3 -0
  39. package/schematics/migrate-tui-let/index.js +71 -0
  40. package/schematics/ng-update/steps/index.d.ts +1 -1
  41. package/schematics/ng-update/steps/index.js +1 -1
  42. package/schematics/ng-update/v4/migrate-addon-doc/index.js +1 -1
  43. package/schematics/ng-update/v4/migrate-css-vars/palette.d.ts +1 -1
  44. package/schematics/ng-update/v4/migrate-css-vars/palette.js +1 -1
  45. package/schematics/ng-update/v4/steps/templates/migrate-badge.js +1 -1
  46. package/schematics/ng-update/v4/steps/templates/migrate-badged-content.js +1 -1
  47. package/schematics/ng-update/v4/steps/templates/migrate-button-appearance.js +1 -1
  48. package/schematics/ng-update/v4/steps/templates/migrate-expandable.js +1 -1
  49. package/schematics/ng-update/v4/steps/templates/migrate-overscroll.js +1 -1
  50. package/schematics/utils/create-angular-json.d.ts +3 -2
  51. package/schematics/utils/create-angular-json.js +2 -2
  52. package/schematics/utils/get-projects.d.ts +1 -1
  53. package/schematics/{ng-update/steps → utils}/remove-module.d.ts +2 -2
  54. package/schematics/{ng-update/steps → utils}/remove-module.js +2 -2
  55. package/utils/miscellaneous/index.d.ts +1 -0
  56. package/utils/miscellaneous/obfuscate.d.ts +14 -0
@@ -106,7 +106,7 @@ function migrateContent({ attr, colorAttr, sourceCodeLocation, recorder, templat
106
106
  ></tui-icon>\n`);
107
107
  }
108
108
  else if (Number.isNaN(Number(value))) {
109
- recorder.insertRight(templateOffset + ((_d = (_c = sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.startTag) === null || _c === void 0 ? void 0 : _c.startOffset) !== null && _d !== void 0 ? _d : 0), '<!-- Taiga migration TODO: contentTop and contentBottom inputs has been removed. Use ng-content, see taiga-ui.dev/components/badged-content -->\n');
109
+ recorder.insertRight(templateOffset + ((_d = (_c = sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.startTag) === null || _c === void 0 ? void 0 : _c.startOffset) !== null && _d !== void 0 ? _d : 0), '<!-- TODO: (Taiga UI migration) contentTop and contentBottom inputs has been removed. Use ng-content, see taiga-ui.dev/components/badged-content -->\n');
110
110
  }
111
111
  else {
112
112
  recorder.insertRight(insertTo + templateOffset, `<tui-badge-notification
@@ -37,5 +37,5 @@ function migrateButtonAppearance({ resource, recorder, fileSystem, }) {
37
37
  }
38
38
  exports.migrateButtonAppearance = migrateButtonAppearance;
39
39
  function addTodo(recorder, templateOffset) {
40
- recorder.insertRight(templateOffset, '<!-- Taiga migration TODO: tuiButton "whiteblock-active" appearance is no longer available. Use \'appearance="outline-grayscale" tuiAppearanceMode="checked"\' -->\n');
40
+ recorder.insertRight(templateOffset, '<!-- TODO: (Taiga UI migration) tuiButton "whiteblock-active" appearance is no longer available. Use \'appearance="outline-grayscale" tuiAppearanceMode="checked"\' -->\n');
41
41
  }
@@ -25,7 +25,7 @@ function migrateExpandable({ resource, recorder, fileSystem, }) {
25
25
  recorder.insertRight(selfClosing ? insertOffset - 1 : insertOffset, rowsAttr ? '' : '[rows]="1"');
26
26
  }
27
27
  if (expandableValue !== 'false' && expandableValue !== 'true') {
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');
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), '<!-- TODO: (Taiga UI migration) "expandable" property has been removed. Use "rows" property instead -->\n');
29
29
  }
30
30
  recorder.remove(templateOffset + expandableStart, expandableEnd - expandableStart);
31
31
  });
@@ -27,5 +27,5 @@ function migrateOverscroll({ resource, recorder, fileSystem, }) {
27
27
  exports.migrateOverscroll = migrateOverscroll;
28
28
  function addTodo(recorder, sourceCodeLocation, templateOffset) {
29
29
  var _a, _b;
30
- recorder.insertRight(templateOffset + ((_b = (_a = sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.startTag) === null || _a === void 0 ? void 0 : _a.startOffset) !== null && _b !== void 0 ? _b : 0), '<!-- Taiga migration TODO: use "overscroll-behavior" ccs property instead of "tuiOverscroll" directive -->\n');
30
+ recorder.insertRight(templateOffset + ((_b = (_a = sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.startTag) === null || _a === void 0 ? void 0 : _a.startOffset) !== null && _b !== void 0 ? _b : 0), '<!-- TODO: (Taiga UI migration) use "overscroll-behavior" ccs property instead of "tuiOverscroll" directive -->\n');
31
31
  }
@@ -1,3 +1,4 @@
1
- export declare function createAngularJson({ stylesExist }?: {
2
- stylesExist: boolean;
1
+ export declare function createAngularJson({ stylesExist, root, }?: {
2
+ stylesExist?: boolean;
3
+ root?: string;
3
4
  }): void;
@@ -2,13 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createAngularJson = void 0;
4
4
  const ng_morph_1 = require("ng-morph");
5
- function createAngularJson({ stylesExist } = { stylesExist: false }) {
5
+ function createAngularJson({ stylesExist = false, root = '', } = {}) {
6
6
  (0, ng_morph_1.createSourceFile)('angular.json', `
7
7
  {
8
8
  "version": 1,
9
9
  "projects": {
10
10
  "demo": {
11
- "root": "",
11
+ "root": "${root}",
12
12
  "architect": {
13
13
  "build": {
14
14
  "options": {
@@ -1,3 +1,3 @@
1
1
  import type { workspaces } from '@angular-devkit/core';
2
2
  import type { TuiSchema } from '../ng-add/schema';
3
- export declare function getProjects(options: TuiSchema, workspace: workspaces.WorkspaceDefinition): workspaces.ProjectDefinition[];
3
+ export declare function getProjects(options: Pick<TuiSchema, 'project'>, workspace: workspaces.WorkspaceDefinition): workspaces.ProjectDefinition[];
@@ -1,4 +1,4 @@
1
- import type { TuiSchema } from '../../ng-add/schema';
2
- import type { RemovedModule } from '../interfaces/removed-module';
1
+ import type { TuiSchema } from '../ng-add/schema';
2
+ import type { RemovedModule } from '../ng-update/interfaces/removed-module';
3
3
  export declare function removeModules(options: TuiSchema, modules: readonly RemovedModule[]): void;
4
4
  export declare function removeModule(name: string, moduleSpecifier: string): void;
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.removeModule = exports.removeModules = void 0;
4
4
  const ng_morph_1 = require("ng-morph");
5
- const get_named_import_references_1 = require("../../utils/get-named-import-references");
6
- const import_manipulations_1 = require("../../utils/import-manipulations");
5
+ const get_named_import_references_1 = require("./get-named-import-references");
6
+ const import_manipulations_1 = require("./import-manipulations");
7
7
  function removeModules(options, modules) {
8
8
  !options['skip-logs'] &&
9
9
  (0, ng_morph_1.infoLog)(`${ng_morph_1.SMALL_TAB_SYMBOL}${ng_morph_1.REPLACE_SYMBOL} removing modules...`);
@@ -21,6 +21,7 @@ export * from './is-string';
21
21
  export * from './is-valid-url';
22
22
  export * from './mark-control-as-touched-and-validate';
23
23
  export * from './nullable-same';
24
+ export * from './obfuscate';
24
25
  export * from './provide';
25
26
  export * from './provide-options';
26
27
  export * from './pure';
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Obfuscates a string by replacing certain characters with a symbol.
3
+ *
4
+ * @param value the input string to obfuscate
5
+ * @param symbol the symbol for obfuscation
6
+ * @return the obfuscated string
7
+ *
8
+ * The function determines which characters to obfuscate using a regular expression and the string's length:
9
+ * - 8 or more: show first 2 and last 2 characters
10
+ * - 4 to 7: show first and last character
11
+ * - less than 4: obfuscate all characters
12
+ * - obfuscates only alphanumeric characters
13
+ */
14
+ export declare function tuiObfuscate(value: string, symbol: string): string;