@taiga-ui/cdk 4.37.0 → 4.38.0

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 (50) hide show
  1. package/constants/version.d.ts +1 -1
  2. package/constants/version.js +1 -1
  3. package/esm2022/constants/version.mjs +2 -2
  4. package/esm2022/pipes/index.mjs +2 -1
  5. package/esm2022/pipes/obfuscate/index.mjs +3 -0
  6. package/esm2022/pipes/obfuscate/obfuscate.options.mjs +10 -0
  7. package/esm2022/pipes/obfuscate/obfuscate.pipe.mjs +44 -0
  8. package/esm2022/pipes/obfuscate/taiga-ui-cdk-pipes-obfuscate.mjs +5 -0
  9. package/esm2022/utils/dom/index.mjs +2 -1
  10. package/esm2022/utils/dom/value-binding.mjs +2 -1
  11. package/esm2022/utils/dom/value.mjs +71 -0
  12. package/esm2022/utils/miscellaneous/index.mjs +2 -1
  13. package/esm2022/utils/miscellaneous/obfuscate.mjs +53 -0
  14. package/fesm2022/taiga-ui-cdk-constants.mjs +1 -1
  15. package/fesm2022/taiga-ui-cdk-constants.mjs.map +1 -1
  16. package/fesm2022/taiga-ui-cdk-pipes-obfuscate.mjs +59 -0
  17. package/fesm2022/taiga-ui-cdk-pipes-obfuscate.mjs.map +1 -0
  18. package/fesm2022/taiga-ui-cdk-pipes.mjs +1 -0
  19. package/fesm2022/taiga-ui-cdk-pipes.mjs.map +1 -1
  20. package/fesm2022/taiga-ui-cdk-utils-dom.mjs +73 -2
  21. package/fesm2022/taiga-ui-cdk-utils-dom.mjs.map +1 -1
  22. package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs +54 -1
  23. package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs.map +1 -1
  24. package/package.json +7 -1
  25. package/pipes/index.d.ts +1 -0
  26. package/pipes/obfuscate/index.d.ts +2 -0
  27. package/pipes/obfuscate/obfuscate.options.d.ts +19 -0
  28. package/pipes/obfuscate/obfuscate.pipe.d.ts +16 -0
  29. package/schematics/collection.json +5 -0
  30. package/schematics/migrate-tui-let/index.d.ts +3 -0
  31. package/schematics/migrate-tui-let/index.js +71 -0
  32. package/schematics/ng-update/steps/index.d.ts +1 -1
  33. package/schematics/ng-update/steps/index.js +1 -1
  34. package/schematics/ng-update/v4/migrate-addon-doc/index.js +1 -1
  35. package/schematics/ng-update/v4/migrate-css-vars/palette.d.ts +1 -1
  36. package/schematics/ng-update/v4/migrate-css-vars/palette.js +1 -1
  37. package/schematics/ng-update/v4/steps/templates/migrate-badge.js +1 -1
  38. package/schematics/ng-update/v4/steps/templates/migrate-badged-content.js +1 -1
  39. package/schematics/ng-update/v4/steps/templates/migrate-button-appearance.js +1 -1
  40. package/schematics/ng-update/v4/steps/templates/migrate-expandable.js +1 -1
  41. package/schematics/ng-update/v4/steps/templates/migrate-overscroll.js +1 -1
  42. package/schematics/utils/create-angular-json.d.ts +3 -2
  43. package/schematics/utils/create-angular-json.js +2 -2
  44. package/schematics/utils/get-projects.d.ts +1 -1
  45. package/schematics/{ng-update/steps → utils}/remove-module.d.ts +2 -2
  46. package/schematics/{ng-update/steps → utils}/remove-module.js +2 -2
  47. package/utils/dom/index.d.ts +1 -0
  48. package/utils/dom/value.d.ts +4 -0
  49. package/utils/miscellaneous/index.d.ts +1 -0
  50. package/utils/miscellaneous/obfuscate.d.ts +14 -0
@@ -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...`);
@@ -15,4 +15,5 @@ export * from './is-inside-iframe';
15
15
  export * from './is-node-in';
16
16
  export * from './point-to-client-rect';
17
17
  export * from './retarget-boundary-crossing';
18
+ export * from './value';
18
19
  export * from './value-binding';
@@ -0,0 +1,4 @@
1
+ import type { ElementRef, Signal, WritableSignal } from '@angular/core';
2
+ type WithValue = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;
3
+ export declare function tuiValue(input: ElementRef<WithValue> | Signal<ElementRef<WithValue> | undefined> | Signal<WithValue | undefined> | WithValue, injector?: import("@angular/core").Injector): WritableSignal<string>;
4
+ export {};
@@ -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;