@taiga-ui/cdk 4.2.0 → 4.4.0-canary.6e6e993

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 (83) hide show
  1. package/classes/control.d.ts +2 -1
  2. package/constants/used-icons.d.ts +1 -1
  3. package/constants/version.d.ts +1 -1
  4. package/constants/version.js +1 -1
  5. package/directives/platform/platform.directive.d.ts +1 -1
  6. package/esm2022/classes/control.mjs +9 -11
  7. package/esm2022/constants/used-icons.mjs +2 -1
  8. package/esm2022/constants/version.mjs +2 -2
  9. package/esm2022/directives/active-zone/active-zone.directive.mjs +2 -2
  10. package/esm2022/directives/copy-processor/copy-processor.directive.mjs +5 -5
  11. package/esm2022/directives/focus-trap/focus-trap.directive.mjs +4 -6
  12. package/esm2022/directives/media/media.directive.mjs +14 -28
  13. package/esm2022/directives/native-validator/native-validator.directive.mjs +5 -5
  14. package/esm2022/directives/platform/platform.directive.mjs +7 -9
  15. package/esm2022/directives/resizer/resizer.directive.mjs +10 -16
  16. package/esm2022/observables/control-value.mjs +2 -13
  17. package/esm2022/tokens/active-element.mjs +5 -3
  18. package/esm2022/tokens/fallback-value.mjs +3 -3
  19. package/esm2022/utils/miscellaneous/count-filled-controls.mjs +13 -0
  20. package/esm2022/utils/miscellaneous/index.mjs +3 -1
  21. package/esm2022/utils/miscellaneous/is-control-empty.mjs +4 -0
  22. package/fesm2022/taiga-ui-cdk-classes.mjs +9 -11
  23. package/fesm2022/taiga-ui-cdk-classes.mjs.map +1 -1
  24. package/fesm2022/taiga-ui-cdk-constants.mjs +2 -1
  25. package/fesm2022/taiga-ui-cdk-constants.mjs.map +1 -1
  26. package/fesm2022/taiga-ui-cdk-directives-active-zone.mjs +1 -1
  27. package/fesm2022/taiga-ui-cdk-directives-active-zone.mjs.map +1 -1
  28. package/fesm2022/taiga-ui-cdk-directives-copy-processor.mjs +4 -4
  29. package/fesm2022/taiga-ui-cdk-directives-copy-processor.mjs.map +1 -1
  30. package/fesm2022/taiga-ui-cdk-directives-focus-trap.mjs +3 -5
  31. package/fesm2022/taiga-ui-cdk-directives-focus-trap.mjs.map +1 -1
  32. package/fesm2022/taiga-ui-cdk-directives-media.mjs +13 -27
  33. package/fesm2022/taiga-ui-cdk-directives-media.mjs.map +1 -1
  34. package/fesm2022/taiga-ui-cdk-directives-native-validator.mjs +4 -4
  35. package/fesm2022/taiga-ui-cdk-directives-native-validator.mjs.map +1 -1
  36. package/fesm2022/taiga-ui-cdk-directives-platform.mjs +6 -8
  37. package/fesm2022/taiga-ui-cdk-directives-platform.mjs.map +1 -1
  38. package/fesm2022/taiga-ui-cdk-directives-resizer.mjs +9 -15
  39. package/fesm2022/taiga-ui-cdk-directives-resizer.mjs.map +1 -1
  40. package/fesm2022/taiga-ui-cdk-observables.mjs +2 -13
  41. package/fesm2022/taiga-ui-cdk-observables.mjs.map +1 -1
  42. package/fesm2022/taiga-ui-cdk-tokens.mjs +7 -4
  43. package/fesm2022/taiga-ui-cdk-tokens.mjs.map +1 -1
  44. package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs +17 -2
  45. package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs.map +1 -1
  46. package/observables/control-value.d.ts +0 -3
  47. package/package.json +356 -356
  48. package/schematics/migration.json +8 -3
  49. package/schematics/ng-add/index.js +3 -0
  50. package/schematics/ng-add/steps/add-taiga-modules.js +3 -1
  51. package/schematics/ng-add/steps/wrap-with-tui-root.js +11 -7
  52. package/schematics/ng-update/steps/replace-package-name.js +3 -2
  53. package/schematics/ng-update/v4/index.js +1 -0
  54. package/schematics/ng-update/v4/migrate-addon-doc/index.d.ts +3 -0
  55. package/schematics/ng-update/v4/migrate-addon-doc/index.js +52 -0
  56. package/schematics/ng-update/v4/migrate-addon-doc/replace-symbols.d.ts +2 -0
  57. package/schematics/ng-update/v4/migrate-addon-doc/replace-symbols.js +139 -0
  58. package/schematics/ng-update/v4/migrate-icons/index.js +2 -1
  59. package/schematics/ng-update/v4/migrate-icons/rename-proprietary-icons.js +4 -3
  60. package/schematics/ng-update/v4/steps/constants/identifiers-to-replace.js +0 -127
  61. package/schematics/ng-update/v4/steps/constants/types.js +0 -9
  62. package/schematics/ng-update/v4/steps/index.d.ts +1 -0
  63. package/schematics/ng-update/v4/steps/index.js +1 -0
  64. package/schematics/ng-update/v4/steps/migrate-alert-service.js +7 -9
  65. package/schematics/ng-update/v4/steps/migrate-destroy-service.js +5 -3
  66. package/schematics/ng-update/v4/steps/migrate-proprietary.js +9 -8
  67. package/schematics/ng-update/v4/steps/migrate-root.js +2 -1
  68. package/schematics/ng-update/v4/steps/migrate-templates.js +3 -0
  69. package/schematics/ng-update/v4/steps/remove-duplicates.d.ts +2 -0
  70. package/schematics/ng-update/v4/steps/remove-duplicates.js +41 -0
  71. package/schematics/ng-update/v4/steps/templates/migrate-badge.js +3 -2
  72. package/schematics/ng-update/v4/steps/templates/migrate-money.js +8 -3
  73. package/schematics/ng-update/v4/steps/update-packages.d.ts +4 -0
  74. package/schematics/ng-update/v4/steps/update-packages.js +14 -6
  75. package/schematics/utils/add-import-to-closest-module.d.ts +1 -0
  76. package/schematics/utils/add-import-to-closest-module.js +24 -17
  77. package/schematics/utils/add-unique-import.js +2 -0
  78. package/schematics/utils/create-angular-json.d.ts +0 -1
  79. package/schematics/utils/create-angular-json.js +1 -27
  80. package/tokens/fallback-value.d.ts +1 -2
  81. package/utils/miscellaneous/count-filled-controls.d.ts +2 -0
  82. package/utils/miscellaneous/index.d.ts +2 -0
  83. package/utils/miscellaneous/is-control-empty.d.ts +2 -0
@@ -53,7 +53,8 @@ function addProviders(callExpression, fileSystem) {
53
53
  array.addElement('NG_EVENT_PLUGINS');
54
54
  (0, add_unique_import_1.addUniqueImport)(array.getSourceFile().getFilePath(), 'NG_EVENT_PLUGINS', '@taiga-ui/event-plugins');
55
55
  (0, ng_morph_1.getActiveProject)();
56
- const proprietary = (0, ng_morph_1.getPackageJsonDependency)(fileSystem.tree, '@taiga-ui/proprietary-core');
56
+ const proprietary = (0, ng_morph_1.getPackageJsonDependency)(fileSystem.tree, '@taiga-ui/proprietary-core') ||
57
+ (0, ng_morph_1.getPackageJsonDependency)(fileSystem.tree, '@taiga-ui/proprietary');
57
58
  if (proprietary) {
58
59
  array.addElement('TBANK_PROVIDERS');
59
60
  (0, add_unique_import_1.addUniqueImport)(array.getSourceFile().getFilePath(), 'TBANK_PROVIDERS', '@taiga-ui/proprietary');
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.migrateTemplates = void 0;
4
4
  const constants_1 = require("../../../constants");
5
+ const add_import_to_closest_module_1 = require("../../../utils/add-import-to-closest-module");
5
6
  const colored_log_1 = require("../../../utils/colored-log");
6
7
  const progress_1 = require("../../../utils/progress");
7
8
  const get_component_templates_1 = require("../../../utils/templates/get-component-templates");
@@ -64,6 +65,8 @@ function migrateTemplates(fileSystem, options) {
64
65
  action({ resource, fileSystem, recorder });
65
66
  });
66
67
  });
68
+ fileSystem.commitEdits();
69
+ (0, add_import_to_closest_module_1.saveAddedImports)();
67
70
  !options['skip-logs'] &&
68
71
  (0, colored_log_1.successLog)(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} templates migrated \n`);
69
72
  }
@@ -0,0 +1,2 @@
1
+ import type { TuiSchema } from '../../../ng-add/schema';
2
+ export declare function removeDuplicates(options: TuiSchema): void;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.removeDuplicates = void 0;
4
+ const ng_morph_1 = require("ng-morph");
5
+ const constants_1 = require("../../../constants");
6
+ const colored_log_1 = require("../../../utils/colored-log");
7
+ function removeDuplicates(options) {
8
+ !options['skip-logs'] &&
9
+ (0, colored_log_1.infoLog)(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} removing duplicates...`);
10
+ const classes = (0, ng_morph_1.getClasses)(constants_1.ALL_TS_FILES);
11
+ const modules = (0, ng_morph_1.getDecorators)(classes, { name: 'NgModule' });
12
+ const components = (0, ng_morph_1.getDecorators)(classes, { name: 'Component' });
13
+ [...modules, ...components].forEach((decorator) => {
14
+ const [metadata] = decorator.getArguments();
15
+ if (!metadata || !ng_morph_1.Node.isObjectLiteralExpression(metadata)) {
16
+ return;
17
+ }
18
+ const property = metadata.getProperty('imports');
19
+ if (!ng_morph_1.Node.isPropertyAssignment(property)) {
20
+ return;
21
+ }
22
+ const importsInitializer = property.getInitializer();
23
+ if (!importsInitializer || !ng_morph_1.Node.isArrayLiteralExpression(importsInitializer)) {
24
+ return;
25
+ }
26
+ const indexToRemove = [];
27
+ const existingImports = new Set();
28
+ importsInitializer.getElements().forEach((el, index) => {
29
+ if (existingImports.has(el.getText())) {
30
+ indexToRemove.push(index);
31
+ }
32
+ else {
33
+ existingImports.add(el.getText());
34
+ }
35
+ });
36
+ indexToRemove.forEach((index, i) => importsInitializer.removeElement(index - i));
37
+ });
38
+ !options['skip-logs'] &&
39
+ (0, colored_log_1.successLog)(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} duplicates removed \n`);
40
+ }
41
+ exports.removeDuplicates = removeDuplicates;
@@ -59,9 +59,10 @@ function migrateBadgeValue({ valueAttr, sourceCodeLocation, recorder, templateOf
59
59
  if (!attrValue || !insertTo) {
60
60
  return;
61
61
  }
62
+ const closeTag = selfClosing ? '</tui-badge>' : '';
62
63
  recorder.insertRight(insertTo + templateOffset, valueAttr.name === 'value'
63
- ? attrValue
64
- : `{{ ${attrValue} }}${selfClosing ? '</tui-badge>' : ''}`);
64
+ ? `${attrValue}${closeTag}`
65
+ : `{{ ${attrValue} }}${closeTag}`);
65
66
  const attrOffset = (_c = sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.attrs) === null || _c === void 0 ? void 0 : _c[valueAttr.name];
66
67
  if (attrOffset) {
67
68
  const { startOffset, endOffset } = attrOffset;
@@ -12,7 +12,7 @@ function migrateMoney({ resource, recorder, fileSystem, }) {
12
12
  const templateOffset = (0, template_resource_1.getTemplateOffset)(resource);
13
13
  const elements = (0, elements_1.findElementsByTagName)(template, 'tui-money');
14
14
  elements.forEach(({ attrs, sourceCodeLocation }) => {
15
- var _a, _b, _c;
15
+ var _a, _b, _c, _d, _e;
16
16
  if (!sourceCodeLocation) {
17
17
  return;
18
18
  }
@@ -21,15 +21,16 @@ function migrateMoney({ resource, recorder, fileSystem, }) {
21
21
  const decimalAttr = (0, inputs_1.findAttr)(attrs, 'decimal');
22
22
  const precisionAttr = (0, inputs_1.findAttr)(attrs, 'precision');
23
23
  const signAttr = (0, inputs_1.findAttr)(attrs, 'sign');
24
+ const selfClosing = !(sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.endTag);
24
25
  if (!valueAttr) {
25
26
  return;
26
27
  }
27
- const insertTo = (_b = (_a = sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.endTag) === null || _a === void 0 ? void 0 : _a.startOffset) !== null && _b !== void 0 ? _b : 0;
28
+ const insertTo = (_b = (_a = sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.startTag) === null || _a === void 0 ? void 0 : _a.endOffset) !== null && _b !== void 0 ? _b : 0;
28
29
  const value = (0, inputs_1.isBinding)(valueAttr) ? valueAttr.value : `'${valueAttr.value}'`;
29
30
  const currency = currencyAttr && (0, inputs_1.isBinding)(currencyAttr)
30
31
  ? currencyAttr === null || currencyAttr === void 0 ? void 0 : currencyAttr.value
31
32
  : `'${currencyAttr === null || currencyAttr === void 0 ? void 0 : currencyAttr.value}'`;
32
- recorder.insertRight(templateOffset + insertTo, `{{ ${value} | tuiAmount ${currencyAttr ? `: ${currency}` : ': "RUB"'} | async }}`);
33
+ recorder.insertRight(templateOffset + insertTo, `{{ ${value} | tuiAmount ${currencyAttr ? `: ${currency}` : ': "RUB"'} | async }}${selfClosing ? '</span>' : ''}`);
33
34
  if (decimalAttr || precisionAttr) {
34
35
  (0, add_import_to_closest_module_1.addImportToClosestModule)(resource.componentPath, 'TuiNumberFormat', '@taiga-ui/core');
35
36
  const format = JSON.stringify((0, clean_object_1.cleanObject)({
@@ -48,6 +49,10 @@ function migrateMoney({ resource, recorder, fileSystem, }) {
48
49
  signAttr,
49
50
  ].filter((attr) => attr !== undefined);
50
51
  (0, remove_attrs_1.removeAttrs)(attrsToRemove, sourceCodeLocation, recorder, templateOffset);
52
+ if (selfClosing) {
53
+ recorder.remove(templateOffset + ((_e = (_d = sourceCodeLocation.startTag) === null || _d === void 0 ? void 0 : _d.endOffset) !== null && _e !== void 0 ? _e : 2) - 2, 1);
54
+ }
55
+ (0, add_import_to_closest_module_1.addImportToClosestModule)(resource.componentPath, 'AsyncPipe', '@angular/common');
51
56
  });
52
57
  }
53
58
  exports.migrateMoney = migrateMoney;
@@ -1,4 +1,8 @@
1
1
  /// <reference lib="es2021" />
2
2
  import type { DevkitFileSystem } from 'ng-morph';
3
3
  import type { TuiSchema } from '../../../ng-add/schema';
4
+ export declare const TUI_POLYMORPHEUS_VERSION = "^4.6.4";
5
+ export declare const TUI_DOMPURIFY_VERSION = "^4.1.2";
6
+ export declare const TUI_EVENT_PLUGINS_VERSION = "^4.0.1";
7
+ export declare const TUI_EDITOR_VERSION = "^2.5.0";
4
8
  export declare function updatePackages({ tree }: DevkitFileSystem, _: TuiSchema): void;
@@ -1,10 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updatePackages = void 0;
3
+ exports.updatePackages = exports.TUI_EDITOR_VERSION = exports.TUI_EVENT_PLUGINS_VERSION = exports.TUI_DOMPURIFY_VERSION = exports.TUI_POLYMORPHEUS_VERSION = void 0;
4
4
  const ng_morph_1 = require("ng-morph");
5
5
  const version_1 = require("../../../../constants/version");
6
6
  const constants_1 = require("../../../constants");
7
7
  const steps_1 = require("../../steps");
8
+ exports.TUI_POLYMORPHEUS_VERSION = '^4.6.4';
9
+ exports.TUI_DOMPURIFY_VERSION = '^4.1.2';
10
+ exports.TUI_EVENT_PLUGINS_VERSION = '^4.0.1';
11
+ exports.TUI_EDITOR_VERSION = '^2.5.0';
8
12
  function updatePackages({ tree }, _) {
9
13
  const packagesToRemove = ['@taiga-ui/addon-tablebars', '@taiga-ui/addon-preview'];
10
14
  packagesToRemove.forEach((pkg) => {
@@ -12,36 +16,40 @@ function updatePackages({ tree }, _) {
12
16
  });
13
17
  (0, steps_1.replacePackageName)('@tinkoff/ng-polymorpheus', {
14
18
  name: '@taiga-ui/polymorpheus',
15
- version: '^4.6.4',
19
+ version: exports.TUI_POLYMORPHEUS_VERSION,
16
20
  }, tree);
17
21
  (0, steps_1.replacePackageName)('@tinkoff/ng-dompurify', {
18
22
  name: '@taiga-ui/dompurify',
19
- version: '^4.1.2',
23
+ version: exports.TUI_DOMPURIFY_VERSION,
20
24
  }, tree);
21
25
  (0, steps_1.replacePackageName)('@tinkoff/ng-event-plugins', {
22
26
  name: '@taiga-ui/event-plugins',
23
- version: '^4.0.1',
27
+ version: exports.TUI_EVENT_PLUGINS_VERSION,
24
28
  }, tree);
25
29
  (0, steps_1.replacePackageName)('@tinkoff/tui-editor', {
26
30
  name: '@taiga-ui/editor',
27
- version: '^2.5.0',
31
+ version: exports.TUI_EDITOR_VERSION,
28
32
  }, tree);
33
+ const cdk = (0, ng_morph_1.getPackageJsonDependency)(tree, '@taiga-ui/cdk');
29
34
  if (!(0, ng_morph_1.getPackageJsonDependency)(tree, '@taiga-ui/event-plugins')) {
30
35
  (0, ng_morph_1.addPackageJsonDependency)(tree, {
31
36
  name: '@taiga-ui/event-plugins',
32
- version: '^4.0.1',
37
+ version: exports.TUI_EVENT_PLUGINS_VERSION,
38
+ type: cdk === null || cdk === void 0 ? void 0 : cdk.type,
33
39
  });
34
40
  }
35
41
  if ((0, ng_morph_1.getImports)(constants_1.ALL_TS_FILES, { moduleSpecifier: '@taiga-ui/layout' }).length) {
36
42
  (0, ng_morph_1.addPackageJsonDependency)(tree, {
37
43
  name: '@taiga-ui/layout',
38
44
  version: version_1.TUI_VERSION,
45
+ type: cdk === null || cdk === void 0 ? void 0 : cdk.type,
39
46
  });
40
47
  }
41
48
  if ((0, ng_morph_1.getImports)(constants_1.ALL_TS_FILES, { moduleSpecifier: '@taiga-ui/legacy' }).length) {
42
49
  (0, ng_morph_1.addPackageJsonDependency)(tree, {
43
50
  name: '@taiga-ui/legacy',
44
51
  version: version_1.TUI_VERSION,
52
+ type: cdk === null || cdk === void 0 ? void 0 : cdk.type,
45
53
  });
46
54
  }
47
55
  }
@@ -1 +1,2 @@
1
1
  export declare function addImportToClosestModule(componentPath: string, moduleName: string, moduleSpecifier: string): void;
2
+ export declare function saveAddedImports(): void;
@@ -1,25 +1,32 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.addImportToClosestModule = void 0;
3
+ exports.saveAddedImports = exports.addImportToClosestModule = void 0;
4
4
  const ng_morph_1 = require("ng-morph");
5
5
  const file_globs_1 = require("../constants/file-globs");
6
6
  const add_unique_import_1 = require("./add-unique-import");
7
+ const importsToAdd = [];
7
8
  function addImportToClosestModule(componentPath, moduleName, moduleSpecifier) {
8
- const [ngComponent] = (0, ng_morph_1.getNgComponents)(componentPath);
9
- if (!ngComponent) {
10
- return;
11
- }
12
- if ((0, ng_morph_1.isStandaloneComponent)(ngComponent)) {
13
- (0, ng_morph_1.addImportToComponent)(ngComponent, moduleName, { unique: true });
14
- (0, add_unique_import_1.addUniqueImport)(ngComponent.getSourceFile().getFilePath(), moduleName, moduleSpecifier);
15
- return;
16
- }
17
- const ngModule = (0, ng_morph_1.findNgModule)(ngComponent, file_globs_1.ALL_TS_FILES);
18
- if (ngModule) {
19
- (0, ng_morph_1.addImportToNgModule)(ngModule, moduleName, {
20
- unique: true,
21
- });
22
- (0, add_unique_import_1.addUniqueImport)(ngModule.getSourceFile().getFilePath(), moduleName, moduleSpecifier);
23
- }
9
+ importsToAdd.push({ componentPath, moduleName, moduleSpecifier });
24
10
  }
25
11
  exports.addImportToClosestModule = addImportToClosestModule;
12
+ function saveAddedImports() {
13
+ importsToAdd.forEach(({ componentPath, moduleName, moduleSpecifier }) => {
14
+ const [ngComponent] = (0, ng_morph_1.getNgComponents)(componentPath);
15
+ if (!ngComponent) {
16
+ return;
17
+ }
18
+ if ((0, ng_morph_1.isStandaloneComponent)(ngComponent)) {
19
+ (0, ng_morph_1.addImportToComponent)(ngComponent, moduleName, { unique: true });
20
+ (0, add_unique_import_1.addUniqueImport)(ngComponent.getSourceFile().getFilePath(), moduleName, moduleSpecifier);
21
+ return;
22
+ }
23
+ const ngModule = (0, ng_morph_1.findNgModule)(ngComponent, file_globs_1.ALL_TS_FILES);
24
+ if (ngModule) {
25
+ (0, ng_morph_1.addImportToNgModule)(ngModule, moduleName, {
26
+ unique: true,
27
+ });
28
+ (0, add_unique_import_1.addUniqueImport)(ngModule.getSourceFile().getFilePath(), moduleName, moduleSpecifier);
29
+ }
30
+ });
31
+ }
32
+ exports.saveAddedImports = saveAddedImports;
@@ -19,12 +19,14 @@ function addUniqueImport(filePath, namedImport, moduleSpecifier) {
19
19
  .map((namedImport) => namedImport.getText());
20
20
  (0, ng_morph_1.editImports)(existingDeclaration[0], () => ({
21
21
  namedImports: [...modules, namedImport],
22
+ isTypeOnly: false,
22
23
  }));
23
24
  return;
24
25
  }
25
26
  (0, ng_morph_1.addImports)(filePath, {
26
27
  moduleSpecifier,
27
28
  namedImports: [namedImport],
29
+ isTypeOnly: false,
28
30
  });
29
31
  }
30
32
  exports.addUniqueImport = addUniqueImport;
@@ -1,4 +1,3 @@
1
1
  export declare function createAngularJson({ stylesExist }?: {
2
2
  stylesExist: boolean;
3
3
  }): void;
4
- export declare function createAngularJsonWithAssets(): void;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createAngularJsonWithAssets = exports.createAngularJson = void 0;
3
+ exports.createAngularJson = void 0;
4
4
  const ng_morph_1 = require("ng-morph");
5
5
  function createAngularJson({ stylesExist } = { stylesExist: false }) {
6
6
  (0, ng_morph_1.createSourceFile)('angular.json', `
@@ -27,29 +27,3 @@ function createAngularJson({ stylesExist } = { stylesExist: false }) {
27
27
  }`, { overwrite: true });
28
28
  }
29
29
  exports.createAngularJson = createAngularJson;
30
- function createAngularJsonWithAssets() {
31
- (0, ng_morph_1.createSourceFile)('angular.json', `
32
- {
33
- "version": 1,
34
- "projects": {
35
- "demo": {
36
- "root": "",
37
- "architect": {
38
- "build": {
39
- "options": {
40
- "main": "test/main.ts",
41
- "assets": [
42
- {
43
- "glob": "**/*",
44
- "input": "node_modules/@taiga-ui/icons/src",
45
- "output": "assets/taiga-ui/icons"
46
- }
47
- ]
48
- }
49
- }
50
- }
51
- }
52
- }
53
- }`, { overwrite: true });
54
- }
55
- exports.createAngularJsonWithAssets = createAngularJsonWithAssets;
@@ -1,4 +1,3 @@
1
1
  import type { ValueProvider } from '@angular/core';
2
- import { InjectionToken } from '@angular/core';
3
- export declare const TUI_FALLBACK_VALUE: InjectionToken<unknown>;
2
+ export declare const TUI_FALLBACK_VALUE: import("@angular/core").InjectionToken<any>;
4
3
  export declare function tuiFallbackValueProvider<T>(useValue: T): ValueProvider;
@@ -0,0 +1,2 @@
1
+ import type { AbstractControl } from '@angular/forms';
2
+ export declare function tuiCountFilledControls(control: AbstractControl): number;
@@ -2,6 +2,7 @@ export * from './array-remove';
2
2
  export * from './array-shallow-equals';
3
3
  export * from './array-toggle';
4
4
  export * from './change-date-separator';
5
+ export * from './count-filled-controls';
5
6
  export * from './create-token';
6
7
  export * from './default-sort';
7
8
  export * from './directive-binding';
@@ -10,6 +11,7 @@ export * from './distance-between-touches';
10
11
  export * from './ease-in-out-quad';
11
12
  export * from './flat-length';
12
13
  export * from './get-original-array-from-query-list';
14
+ export * from './is-control-empty';
13
15
  export * from './is-falsy';
14
16
  export * from './is-number';
15
17
  export * from './is-object';
@@ -0,0 +1,2 @@
1
+ import type { AbstractControl } from '@angular/forms';
2
+ export declare function tuiIsControlEmpty({ value }: AbstractControl): boolean;