@taiga-ui/cdk 4.8.1 → 4.10.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 (79) hide show
  1. package/classes/control.d.ts +1 -2
  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/esm2022/classes/control.mjs +4 -5
  6. package/esm2022/constants/used-icons.mjs +3 -2
  7. package/esm2022/constants/version.mjs +2 -2
  8. package/esm2022/observables/zone.mjs +2 -3
  9. package/esm2022/pipes/index.mjs +2 -1
  10. package/esm2022/pipes/repeat-times/index.mjs +19 -0
  11. package/esm2022/pipes/repeat-times/taiga-ui-cdk-pipes-repeat-times.mjs +5 -0
  12. package/esm2022/tokens/window-size.mjs +23 -24
  13. package/esm2022/utils/miscellaneous/is-valid-url.mjs +7 -5
  14. package/fesm2022/taiga-ui-cdk-classes.mjs +3 -4
  15. package/fesm2022/taiga-ui-cdk-classes.mjs.map +1 -1
  16. package/fesm2022/taiga-ui-cdk-constants.mjs +3 -2
  17. package/fesm2022/taiga-ui-cdk-constants.mjs.map +1 -1
  18. package/fesm2022/taiga-ui-cdk-observables.mjs.map +1 -1
  19. package/fesm2022/taiga-ui-cdk-pipes-repeat-times.mjs +25 -0
  20. package/fesm2022/taiga-ui-cdk-pipes-repeat-times.mjs.map +1 -0
  21. package/fesm2022/taiga-ui-cdk-pipes.mjs +1 -0
  22. package/fesm2022/taiga-ui-cdk-pipes.mjs.map +1 -1
  23. package/fesm2022/taiga-ui-cdk-tokens.mjs +21 -23
  24. package/fesm2022/taiga-ui-cdk-tokens.mjs.map +1 -1
  25. package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs +6 -4
  26. package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs.map +1 -1
  27. package/observables/zone.d.ts +1 -1
  28. package/package.json +13 -7
  29. package/pipes/index.d.ts +1 -0
  30. package/pipes/repeat-times/index.d.ts +7 -0
  31. package/schematics/index.d.ts +0 -1
  32. package/schematics/index.js +0 -1
  33. package/schematics/ng-update/steps/icons/replace-imports.js +1 -2
  34. package/schematics/ng-update/steps/remove-module.js +2 -3
  35. package/schematics/ng-update/steps/rename-types.js +2 -3
  36. package/schematics/ng-update/steps/replace-deep-import.js +2 -3
  37. package/schematics/ng-update/steps/replace-enums.js +2 -3
  38. package/schematics/ng-update/steps/replace-identifier.js +2 -3
  39. package/schematics/ng-update/steps/replace-services.js +3 -4
  40. package/schematics/ng-update/v4/index.js +5 -3
  41. package/schematics/ng-update/v4/migrate-addon-doc/index.js +2 -3
  42. package/schematics/ng-update/v4/migrate-css-vars/index.js +2 -3
  43. package/schematics/ng-update/v4/migrate-css-vars/palette.js +7 -7
  44. package/schematics/ng-update/v4/migrate-css-vars/rename-css-vars.js +11 -2
  45. package/schematics/ng-update/v4/migrate-icons/index.js +2 -3
  46. package/schematics/ng-update/v4/steps/constants/attr-to-directive-replace.js +9 -0
  47. package/schematics/ng-update/v4/steps/constants/attr-with-values-to-replace.js +5 -0
  48. package/schematics/ng-update/v4/steps/constants/attrs-to-replace.js +0 -9
  49. package/schematics/ng-update/v4/steps/constants/functions.d.ts +2 -0
  50. package/schematics/ng-update/v4/steps/constants/functions.js +10 -0
  51. package/schematics/ng-update/v4/steps/drop-universal-mock.js +2 -3
  52. package/schematics/ng-update/v4/steps/migrate-alert-service.js +2 -3
  53. package/schematics/ng-update/v4/steps/migrate-all-country-iso-codes.js +2 -3
  54. package/schematics/ng-update/v4/steps/migrate-destroy-service.js +2 -3
  55. package/schematics/ng-update/v4/steps/migrate-editor.d.ts +2 -2
  56. package/schematics/ng-update/v4/steps/migrate-editor.js +6 -9
  57. package/schematics/ng-update/v4/steps/migrate-legacy-mask.js +4 -5
  58. package/schematics/ng-update/v4/steps/migrate-month-context.js +2 -3
  59. package/schematics/ng-update/v4/steps/migrate-number-format-settings.js +2 -3
  60. package/schematics/ng-update/v4/steps/migrate-option-providers.js +3 -4
  61. package/schematics/ng-update/v4/steps/migrate-proprietary.js +1 -2
  62. package/schematics/ng-update/v4/steps/migrate-providers-from.js +1 -2
  63. package/schematics/ng-update/v4/steps/migrate-root.d.ts +1 -1
  64. package/schematics/ng-update/v4/steps/migrate-root.js +1 -2
  65. package/schematics/ng-update/v4/steps/migrate-templates.js +3 -3
  66. package/schematics/ng-update/v4/steps/remove-duplicates.js +2 -3
  67. package/schematics/ng-update/v4/steps/replace-functions.d.ts +2 -0
  68. package/schematics/ng-update/v4/steps/replace-functions.js +19 -0
  69. package/schematics/ng-update/v4/steps/restore-tui-mapper.js +3 -4
  70. package/schematics/ng-update/v4/steps/restore-tui-matcher.js +3 -4
  71. package/schematics/ng-update/v4/steps/templates/migrate-label.js +16 -6
  72. package/schematics/ng-update/v4/steps/update-packages.d.ts +3 -3
  73. package/schematics/ng-update/v4/steps/update-packages.js +4 -5
  74. package/schematics/ng-update/v4/steps/utils/replace-modules-with-providers.js +2 -3
  75. package/schematics/utils/progress.js +3 -3
  76. package/tokens/window-size.d.ts +1 -2
  77. package/utils/miscellaneous/is-valid-url.d.ts +3 -0
  78. package/schematics/utils/colored-log.d.ts +0 -11
  79. package/schematics/utils/colored-log.js +0 -29
@@ -1,3 +1,3 @@
1
- import { type DevkitFileSystem } from 'ng-morph';
1
+ import type { DevkitFileSystem } from 'ng-morph';
2
2
  import type { TuiSchema } from '../../../ng-add/schema';
3
3
  export declare function migrateRoot(fileSystem: DevkitFileSystem, options: TuiSchema): void;
@@ -3,12 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.migrateRoot = void 0;
4
4
  const ng_morph_1 = require("ng-morph");
5
5
  const add_unique_import_1 = require("../../../utils/add-unique-import");
6
- const colored_log_1 = require("../../../utils/colored-log");
7
6
  const get_named_import_references_1 = require("../../../utils/get-named-import-references");
8
7
  const import_manipulations_1 = require("../../../utils/import-manipulations");
9
8
  function migrateRoot(fileSystem, options) {
10
9
  !options['skip-logs'] &&
11
- (0, colored_log_1.infoLog)(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} updating TuiRoot`);
10
+ (0, ng_morph_1.infoLog)(`${ng_morph_1.SMALL_TAB_SYMBOL}${ng_morph_1.REPLACE_SYMBOL} updating TuiRoot`);
12
11
  const refs = [
13
12
  ...(0, get_named_import_references_1.getNamedImportReferences)('TuiRootModule', '@taiga-ui/core'),
14
13
  ...(0, get_named_import_references_1.getNamedImportReferences)('TuiProprietaryRootModule', '@taiga-ui/proprietary-core'),
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.migrateTemplates = void 0;
4
+ const ng_morph_1 = require("ng-morph");
4
5
  const constants_1 = require("../../../constants");
5
6
  const add_import_to_closest_module_1 = require("../../../utils/add-import-to-closest-module");
6
- const colored_log_1 = require("../../../utils/colored-log");
7
7
  const progress_1 = require("../../../utils/progress");
8
8
  const get_component_templates_1 = require("../../../utils/templates/get-component-templates");
9
9
  const template_resource_1 = require("../../../utils/templates/template-resource");
@@ -18,7 +18,7 @@ function getAction({ action, requiredData, }) {
18
18
  }
19
19
  function migrateTemplates(fileSystem, options) {
20
20
  !options['skip-logs'] &&
21
- (0, colored_log_1.infoLog)(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} migrating templates...`);
21
+ (0, ng_morph_1.infoLog)(`${ng_morph_1.SMALL_TAB_SYMBOL}${ng_morph_1.REPLACE_SYMBOL} migrating templates...`);
22
22
  const componentWithTemplatesPaths = (0, get_component_templates_1.getComponentTemplates)(constants_1.ALL_TS_FILES);
23
23
  const actions = [
24
24
  getAction({ action: templates_1.addHTMLCommentTags, requiredData: constants_2.HTML_COMMENTS }),
@@ -69,6 +69,6 @@ function migrateTemplates(fileSystem, options) {
69
69
  fileSystem.commitEdits();
70
70
  (0, add_import_to_closest_module_1.saveAddedImports)();
71
71
  !options['skip-logs'] &&
72
- (0, colored_log_1.successLog)(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} templates migrated \n`);
72
+ (0, ng_morph_1.successLog)(`${ng_morph_1.SMALL_TAB_SYMBOL}${ng_morph_1.SUCCESS_SYMBOL} templates migrated \n`);
73
73
  }
74
74
  exports.migrateTemplates = migrateTemplates;
@@ -3,10 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.removeDuplicates = void 0;
4
4
  const ng_morph_1 = require("ng-morph");
5
5
  const constants_1 = require("../../../constants");
6
- const colored_log_1 = require("../../../utils/colored-log");
7
6
  function removeDuplicates(options) {
8
7
  !options['skip-logs'] &&
9
- (0, colored_log_1.infoLog)(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} removing duplicates...`);
8
+ (0, ng_morph_1.infoLog)(`${ng_morph_1.SMALL_TAB_SYMBOL}${ng_morph_1.REPLACE_SYMBOL} removing duplicates...`);
10
9
  const classes = (0, ng_morph_1.getClasses)(constants_1.ALL_TS_FILES);
11
10
  const modules = (0, ng_morph_1.getDecorators)(classes, { name: 'NgModule' });
12
11
  const components = (0, ng_morph_1.getDecorators)(classes, { name: 'Component' });
@@ -36,6 +35,6 @@ function removeDuplicates(options) {
36
35
  indexToRemove.forEach((index, i) => importsInitializer.removeElement(index - i));
37
36
  });
38
37
  !options['skip-logs'] &&
39
- (0, colored_log_1.successLog)(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} duplicates removed \n`);
38
+ (0, ng_morph_1.successLog)(`${ng_morph_1.SMALL_TAB_SYMBOL}${ng_morph_1.SUCCESS_SYMBOL} duplicates removed \n`);
40
39
  }
41
40
  exports.removeDuplicates = removeDuplicates;
@@ -0,0 +1,2 @@
1
+ import type { ReplacementType } from '../../interfaces/replacement-type';
2
+ export declare function replaceFunctions(functions: readonly ReplacementType[]): void;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.replaceFunctions = void 0;
4
+ const ng_morph_1 = require("ng-morph");
5
+ const get_named_import_references_1 = require("../../../utils/get-named-import-references");
6
+ function replaceFunctions(functions) {
7
+ functions.forEach(({ from, to, moduleSpecifier }) => {
8
+ (0, get_named_import_references_1.getNamedImportReferences)(from, moduleSpecifier).forEach((ref) => {
9
+ if (ref.wasForgotten()) {
10
+ return;
11
+ }
12
+ const parent = ref.getParent();
13
+ if (ng_morph_1.Node.isImportSpecifier(parent) || ng_morph_1.Node.isCallExpression(parent)) {
14
+ parent === null || parent === void 0 ? void 0 : parent.replaceWithText(parent === null || parent === void 0 ? void 0 : parent.getText({ includeJsDocComments: false }).trim().replace(from, to !== null && to !== void 0 ? to : from));
15
+ }
16
+ });
17
+ });
18
+ }
19
+ exports.replaceFunctions = replaceFunctions;
@@ -2,12 +2,11 @@
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 colored_log_1 = require("../../../utils/colored-log");
6
5
  const get_named_import_references_1 = require("../../../utils/get-named-import-references");
7
6
  const replace_identifier_1 = require("../../steps/replace-identifier");
8
7
  function updateTuiMapper(options) {
9
8
  !options['skip-logs'] &&
10
- (0, colored_log_1.infoLog)(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} updating TuiMapper typing to the typed version`);
9
+ (0, ng_morph_1.infoLog)(`${ng_morph_1.SMALL_TAB_SYMBOL}${ng_morph_1.REPLACE_SYMBOL} updating TuiMapper typing to the typed version`);
11
10
  const refs = (0, get_named_import_references_1.getNamedImportReferences)('TuiMapper', '@taiga-ui/cdk');
12
11
  for (const ref of refs) {
13
12
  if (ref.wasForgotten()) {
@@ -26,7 +25,7 @@ function updateTuiMapper(options) {
26
25
  }
27
26
  function renameTuiTypedMapper(options) {
28
27
  !options['skip-logs'] &&
29
- (0, colored_log_1.infoLog)(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} renaming TuiTypedMapper to TuiMapper`);
28
+ (0, ng_morph_1.infoLog)(`${ng_morph_1.SMALL_TAB_SYMBOL}${ng_morph_1.REPLACE_SYMBOL} renaming TuiTypedMapper to TuiMapper`);
30
29
  (0, replace_identifier_1.replaceIdentifier)({
31
30
  from: { name: 'TuiTypedMapper', moduleSpecifier: '@taiga-ui/cdk' },
32
31
  to: { name: 'TuiMapper', moduleSpecifier: '@taiga-ui/cdk' },
@@ -35,6 +34,6 @@ function renameTuiTypedMapper(options) {
35
34
  function restoreTuiMapper(options) {
36
35
  updateTuiMapper(options);
37
36
  renameTuiTypedMapper(options);
38
- !options['skip-logs'] && (0, colored_log_1.titleLog)(`${colored_log_1.FINISH_SYMBOL} successfully migrated \n`);
37
+ !options['skip-logs'] && (0, ng_morph_1.titleLog)(`${ng_morph_1.FINISH_SYMBOL} successfully migrated \n`);
39
38
  }
40
39
  exports.restoreTuiMapper = restoreTuiMapper;
@@ -2,12 +2,11 @@
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 colored_log_1 = require("../../../utils/colored-log");
6
5
  const get_named_import_references_1 = require("../../../utils/get-named-import-references");
7
6
  const replace_identifier_1 = require("../../steps/replace-identifier");
8
7
  function updateTuiMatcher(options) {
9
8
  !options['skip-logs'] &&
10
- (0, colored_log_1.infoLog)(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} updating TuiMatcher typing to the typed version`);
9
+ (0, ng_morph_1.infoLog)(`${ng_morph_1.SMALL_TAB_SYMBOL}${ng_morph_1.REPLACE_SYMBOL} updating TuiMatcher typing to the typed version`);
11
10
  const refs = (0, get_named_import_references_1.getNamedImportReferences)('TuiMatcher', '@taiga-ui/cdk');
12
11
  for (const ref of refs) {
13
12
  if (ref.wasForgotten()) {
@@ -26,7 +25,7 @@ function updateTuiMatcher(options) {
26
25
  }
27
26
  function renameTuiTypedMatcher(options) {
28
27
  !options['skip-logs'] &&
29
- (0, colored_log_1.infoLog)(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} renaming TuiTypedMatcher to TuiMatcher`);
28
+ (0, ng_morph_1.infoLog)(`${ng_morph_1.SMALL_TAB_SYMBOL}${ng_morph_1.REPLACE_SYMBOL} renaming TuiTypedMatcher to TuiMatcher`);
30
29
  (0, replace_identifier_1.replaceIdentifier)({
31
30
  from: { name: 'TuiTypedMatcher', moduleSpecifier: '@taiga-ui/cdk' },
32
31
  to: { name: 'TuiMatcher', moduleSpecifier: '@taiga-ui/cdk' },
@@ -35,6 +34,6 @@ function renameTuiTypedMatcher(options) {
35
34
  function restoreTuiMatcher(options) {
36
35
  updateTuiMatcher(options);
37
36
  renameTuiTypedMatcher(options);
38
- !options['skip-logs'] && (0, colored_log_1.titleLog)(`${colored_log_1.FINISH_SYMBOL} successfully migrated \n`);
37
+ !options['skip-logs'] && (0, ng_morph_1.titleLog)(`${ng_morph_1.FINISH_SYMBOL} successfully migrated \n`);
39
38
  }
40
39
  exports.restoreTuiMatcher = restoreTuiMatcher;
@@ -8,7 +8,7 @@ function migrateLabel({ resource, recorder, fileSystem, }) {
8
8
  const template = (0, template_resource_1.getTemplateFromTemplateResource)(resource, fileSystem);
9
9
  const templateOffset = (0, template_resource_1.getTemplateOffset)(resource);
10
10
  const labelElements = (0, elements_1.findElementsByTagName)(template, 'label', ({ attrs }) => attrs.some(({ name }) => name === 'tuilabel' || name === '[tuilabel]'));
11
- labelElements.forEach(({ attrs, sourceCodeLocation }) => {
11
+ labelElements.forEach(({ attrs, sourceCodeLocation, childNodes }) => {
12
12
  const labelAttr = (0, inputs_1.findAttr)(attrs, 'tuilabel');
13
13
  if (!labelAttr || !sourceCodeLocation) {
14
14
  return;
@@ -18,19 +18,29 @@ function migrateLabel({ resource, recorder, fileSystem, }) {
18
18
  sourceCodeLocation,
19
19
  recorder,
20
20
  templateOffset,
21
+ childNodes,
21
22
  });
22
23
  });
23
24
  }
24
25
  exports.migrateLabel = migrateLabel;
25
- function migrateValue({ valueAttr, sourceCodeLocation, recorder, templateOffset, }) {
26
- var _a, _b, _c;
26
+ function migrateValue({ valueAttr, sourceCodeLocation, recorder, templateOffset, childNodes, }) {
27
+ var _a;
27
28
  const attrValue = valueAttr === null || valueAttr === void 0 ? void 0 : valueAttr.value;
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;
29
+ const { startTag, endTag } = sourceCodeLocation;
30
+ const insertTo = startTag === null || startTag === void 0 ? void 0 : startTag.endOffset;
29
31
  if (!attrValue || !insertTo) {
30
32
  return;
31
33
  }
32
- recorder.insertRight(insertTo + templateOffset, valueAttr.name === 'tuilabel' ? attrValue : `{{ ${attrValue} }}`);
33
- const attrOffset = (_c = sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.attrs) === null || _c === void 0 ? void 0 : _c[valueAttr.name];
34
+ const onlyTextContent = childNodes.length && childNodes.every((node) => node.nodeName === '#text');
35
+ if (onlyTextContent && startTag && endTag) {
36
+ const content = `<span tuiTitle><span tuiSubtitle>${valueAttr.name === 'tuilabel' ? attrValue : `{{ ${attrValue} }}`}</span>`;
37
+ recorder.insertRight(templateOffset + insertTo, content);
38
+ recorder.insertLeft(templateOffset + endTag.startOffset, '</span>');
39
+ }
40
+ else {
41
+ recorder.insertRight(insertTo + templateOffset, valueAttr.name === 'tuilabel' ? attrValue : `{{ ${attrValue} }}`);
42
+ }
43
+ const attrOffset = (_a = sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.attrs) === null || _a === void 0 ? void 0 : _a[valueAttr.name];
34
44
  if (attrOffset) {
35
45
  const { startOffset, endOffset } = attrOffset;
36
46
  recorder.remove(templateOffset + startOffset, endOffset - startOffset);
@@ -1,6 +1,6 @@
1
1
  /// <reference lib="es2021" />
2
2
  import type { DevkitFileSystem } from 'ng-morph';
3
- export declare const TUI_POLYMORPHEUS_VERSION = "^4.6.4";
4
- export declare const TUI_DOMPURIFY_VERSION = "^4.1.2";
5
- export declare const TUI_EVENT_PLUGINS_VERSION = "^4.0.1";
3
+ export declare const TUI_POLYMORPHEUS_VERSION = "^4.7.3";
4
+ export declare const TUI_DOMPURIFY_VERSION = "^4.1.7";
5
+ export declare const TUI_EVENT_PLUGINS_VERSION = "^4.2.3";
6
6
  export declare function updatePackages({ tree }: DevkitFileSystem): void;
@@ -4,11 +4,10 @@ exports.updatePackages = exports.TUI_EVENT_PLUGINS_VERSION = exports.TUI_DOMPURI
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
- const colored_log_1 = require("../../../utils/colored-log");
8
7
  const steps_1 = require("../../steps");
9
- exports.TUI_POLYMORPHEUS_VERSION = '^4.6.4';
10
- exports.TUI_DOMPURIFY_VERSION = '^4.1.2';
11
- exports.TUI_EVENT_PLUGINS_VERSION = '^4.0.1';
8
+ exports.TUI_POLYMORPHEUS_VERSION = '^4.7.3';
9
+ exports.TUI_DOMPURIFY_VERSION = '^4.1.7';
10
+ exports.TUI_EVENT_PLUGINS_VERSION = '^4.2.3';
12
11
  function updatePackages({ tree }) {
13
12
  const packagesToRemove = ['@taiga-ui/addon-tablebars', '@taiga-ui/addon-preview'];
14
13
  packagesToRemove.forEach((pkg) => {
@@ -47,7 +46,7 @@ function updatePackages({ tree }) {
47
46
  }
48
47
  catch (e) {
49
48
  const error = e;
50
- (0, colored_log_1.errorLog)(`ATTENTION: An error occurred during migration: ${error.message}\n${error.stack}`);
49
+ (0, ng_morph_1.errorLog)(`ATTENTION: An error occurred during migration: ${error.message}\n${error.stack}`);
51
50
  }
52
51
  }
53
52
  exports.updatePackages = updatePackages;
@@ -3,15 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.replaceModulesWithProviders = void 0;
4
4
  const ng_morph_1 = require("ng-morph");
5
5
  const add_unique_import_1 = require("../../../../utils/add-unique-import");
6
- const colored_log_1 = require("../../../../utils/colored-log");
7
6
  const get_named_import_references_1 = require("../../../../utils/get-named-import-references");
8
7
  const import_manipulations_1 = require("../../../../utils/import-manipulations");
9
8
  const replaceModulesWithProviders = (options, list) => {
10
9
  !options['skip-logs'] &&
11
- (0, colored_log_1.infoLog)(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} replacing modules with providers...`);
10
+ (0, ng_morph_1.infoLog)(`${ng_morph_1.SMALL_TAB_SYMBOL}${ng_morph_1.REPLACE_SYMBOL} replacing modules with providers...`);
12
11
  list.forEach(replaceModule);
13
12
  !options['skip-logs'] &&
14
- (0, colored_log_1.successLog)(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} modules replaced \n`);
13
+ (0, ng_morph_1.successLog)(`${ng_morph_1.SMALL_TAB_SYMBOL}${ng_morph_1.SUCCESS_SYMBOL} modules replaced \n`);
15
14
  };
16
15
  exports.replaceModulesWithProviders = replaceModulesWithProviders;
17
16
  function replaceModule({ from, to }) {
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.setupProgressLogger = void 0;
4
4
  /// <reference types="node" />
5
5
  const node_readline_1 = require("node:readline");
6
- const colored_log_1 = require("./colored-log");
6
+ const ng_morph_1 = require("ng-morph");
7
7
  const is_ci_1 = require("./is-ci");
8
8
  function setupProgressLogger({ total, prefix = '', tabs = 2, }) {
9
9
  let i = 1;
@@ -12,11 +12,11 @@ function setupProgressLogger({ total, prefix = '', tabs = 2, }) {
12
12
  return;
13
13
  }
14
14
  const isLast = i === total;
15
- const progressLog = `(${i} / ${total}) ${prefix} ${isLast ? colored_log_1.SUCCESS_SYMBOL : message}`;
15
+ const progressLog = `(${i} / ${total}) ${prefix} ${isLast ? ng_morph_1.SUCCESS_SYMBOL : message}`;
16
16
  i = incrementIndex ? i + 1 : i;
17
17
  (0, node_readline_1.clearLine)(process.stdout, 0);
18
18
  (0, node_readline_1.cursorTo)(process.stdout, 0);
19
- process.stdout.write(colored_log_1.SMALL_TAB_SYMBOL.repeat(tabs) + progressLog);
19
+ process.stdout.write(ng_morph_1.SMALL_TAB_SYMBOL.repeat(tabs) + progressLog);
20
20
  if (isLast && incrementIndex) {
21
21
  process.stdout.write('\n');
22
22
  }
@@ -1,3 +1,2 @@
1
- import { InjectionToken } from '@angular/core';
2
1
  import type { Observable } from 'rxjs';
3
- export declare const TUI_WINDOW_SIZE: InjectionToken<Observable<DOMRect>>;
2
+ export declare const TUI_WINDOW_SIZE: import("@angular/core").InjectionToken<Observable<DOMRect>>;
@@ -1 +1,4 @@
1
+ /**
2
+ * @deprecated: drop in v5.0
3
+ */
1
4
  export declare function tuiIsValidUrl(url: string): boolean;
@@ -1,11 +0,0 @@
1
- export declare function processLog(message: string): void;
2
- export declare function errorLog(message: string): void;
3
- export declare function successLog(message: string): void;
4
- export declare function infoLog(message: string): void;
5
- export declare function titleLog(message: string): void;
6
- export declare const SMALL_TAB_SYMBOL = " ";
7
- export declare const START_SYMBOL = "\uD83D\uDE80";
8
- export declare const FINISH_SYMBOL = "\uD83C\uDFC6";
9
- export declare const REPLACE_SYMBOL = "\u26A1\uFE0F";
10
- export declare const PROCESSING_SYMBOL = "> ";
11
- export declare const SUCCESS_SYMBOL = "\u2705 ";
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SUCCESS_SYMBOL = exports.PROCESSING_SYMBOL = exports.REPLACE_SYMBOL = exports.FINISH_SYMBOL = exports.START_SYMBOL = exports.SMALL_TAB_SYMBOL = exports.titleLog = exports.infoLog = exports.successLog = exports.errorLog = exports.processLog = void 0;
4
- function processLog(message) {
5
- console.info('\x1B[36m%s\x1B[0m', message);
6
- }
7
- exports.processLog = processLog;
8
- function errorLog(message) {
9
- console.info('\x1B[31m%s\x1B[0m', message);
10
- }
11
- exports.errorLog = errorLog;
12
- function successLog(message) {
13
- console.info('\x1B[32m%s\x1B[0m', message);
14
- }
15
- exports.successLog = successLog;
16
- function infoLog(message) {
17
- console.info('\x1B[34m%s\x1B[0m', message);
18
- }
19
- exports.infoLog = infoLog;
20
- function titleLog(message) {
21
- console.info('\x1B[35m', message);
22
- }
23
- exports.titleLog = titleLog;
24
- exports.SMALL_TAB_SYMBOL = ' '; // @note: if you use \t then we have big gaps
25
- exports.START_SYMBOL = '🚀';
26
- exports.FINISH_SYMBOL = '🏆';
27
- exports.REPLACE_SYMBOL = '⚡️';
28
- exports.PROCESSING_SYMBOL = '> ';
29
- exports.SUCCESS_SYMBOL = '✅ ';