@taiga-ui/cdk 2.58.1 → 2.59.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/cdk",
3
- "version": "2.58.1",
3
+ "version": "2.59.0",
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",
@@ -21,7 +21,7 @@
21
21
  "@tinkoff/ng-event-plugins": "^2.5.1",
22
22
  "@tinkoff/ng-polymorpheus": "^3.1.12",
23
23
  "@types/resize-observer-browser": "^0.1.7",
24
- "ng-morph": "^2.0.0",
24
+ "ng-morph": "^2.1.0",
25
25
  "parse5": "^6.0.1",
26
26
  "tslib": "^1.10.0"
27
27
  },
@@ -1,3 +1,3 @@
1
- import { DevkitFileSystem } from 'ng-morph/project/classes/devkit-file-system';
1
+ import { DevkitFileSystem } from 'ng-morph';
2
2
  export declare const DEPRECATED_PROGRESS_PIPES_REG: RegExp;
3
3
  export declare function migrateProgress(fileSystem: DevkitFileSystem): void;
@@ -9,7 +9,7 @@ exports.DEPRECATED_PROGRESS_PIPES_REG = /\s*\|\s*tuiProgressColorSegments(Async\
9
9
  const PROPERTY_FOR_DEPRECATED_PIPES = '[color]';
10
10
  function migrateProgress(fileSystem) {
11
11
  colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} migrating progress bars...`);
12
- const templateResources = get_component_templates_1.getComponentTemplates('**/**');
12
+ const templateResources = get_component_templates_1.getComponentTemplates('**/**.ts');
13
13
  for (const templateResource of templateResources) {
14
14
  replaceProgressColorSegmentsPipe(templateResource, fileSystem);
15
15
  }
@@ -1,2 +1,2 @@
1
- import { DevkitFileSystem } from 'ng-morph/project/classes/devkit-file-system';
1
+ import { DevkitFileSystem } from 'ng-morph';
2
2
  export declare function migrateSliders(fileSystem: DevkitFileSystem): void;
@@ -1,2 +1,2 @@
1
- import { DevkitFileSystem } from 'ng-morph/project/classes/devkit-file-system';
1
+ import { DevkitFileSystem } from 'ng-morph';
2
2
  export declare function migrateInputRange(fileSystem: DevkitFileSystem): void;
@@ -8,7 +8,7 @@ const add_unique_import_1 = require("../../../utils/add-unique-import");
8
8
  const MIN_LABELS_MIGRATION_METHOD_NAME = 'tuiMigrationInputRangeMinLabel';
9
9
  const MAX_LABELS_MIGRATION_METHOD_NAME = 'tuiMigrationInputRangeMaxLabel';
10
10
  function migrateInputRange(fileSystem) {
11
- const templateResources = get_component_templates_1.getComponentTemplates('**/**');
11
+ const templateResources = get_component_templates_1.getComponentTemplates('**/**.ts');
12
12
  const COMPONENTS_WITH_MIN_LABELS = new Set();
13
13
  const COMPONENTS_WITH_MAX_LABELS = new Set();
14
14
  for (const templateResource of templateResources) {
@@ -1,2 +1,2 @@
1
- import { DevkitFileSystem } from 'ng-morph/project/classes/devkit-file-system';
1
+ import { DevkitFileSystem } from 'ng-morph';
2
2
  export declare function migrateInputSlider(fileSystem: DevkitFileSystem): void;
@@ -7,7 +7,7 @@ const add_unique_import_1 = require("../../../utils/add-unique-import");
7
7
  const get_component_templates_1 = require("../../../utils/templates/get-component-templates");
8
8
  const elements_1 = require("../../../utils/templates/elements");
9
9
  function migrateInputSlider(fileSystem) {
10
- const templateResources = get_component_templates_1.getComponentTemplates('**/**');
10
+ const templateResources = get_component_templates_1.getComponentTemplates('**/**.ts');
11
11
  const COMPONENTS_WITH_MIN_MAX_LABELS = new Set();
12
12
  for (const templateResource of templateResources) {
13
13
  replaceMinMaxLabels(templateResource, fileSystem, COMPONENTS_WITH_MIN_MAX_LABELS);
@@ -1,2 +1,2 @@
1
- import { DevkitFileSystem } from 'ng-morph/project/classes/devkit-file-system';
1
+ import { DevkitFileSystem } from 'ng-morph';
2
2
  export declare function migrateTemplates(fileSystem: DevkitFileSystem): void;
@@ -5,7 +5,7 @@ const colored_log_1 = require("../../utils/colored-log");
5
5
  const DEEP_REGEX = /(@taiga-ui\/\w+)\/.*/;
6
6
  function replaceDeepImports() {
7
7
  colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} replacing deep imports...`);
8
- const deepImports = ng_morph_1.getImports('**/**').filter(imp => DEEP_REGEX.test(imp.getModuleSpecifier().getLiteralValue()));
8
+ const deepImports = ng_morph_1.getImports('**/**.ts').filter(imp => DEEP_REGEX.test(imp.getModuleSpecifier().getLiteralValue()));
9
9
  ng_morph_1.editImports(deepImports, deepImport => {
10
10
  const specifier = deepImport.moduleSpecifier.replace(DEEP_REGEX, '$1');
11
11
  return { moduleSpecifier: specifier };
@@ -1,3 +1,2 @@
1
- import { ClassDeclaration, Pattern, Query } from 'ng-morph';
2
- import { StructureType } from 'ng-morph/utils/types/structure-type';
1
+ import { ClassDeclaration, Pattern, Query, StructureType } from 'ng-morph';
3
2
  export declare function getNgComponents(pattern: Pattern, query?: Query<Omit<StructureType<ClassDeclaration>, 'kind'>>): ClassDeclaration[];
@@ -1,5 +1,4 @@
1
- import { ClassDeclaration, Pattern, Query } from 'ng-morph';
2
- import { StructureType } from 'ng-morph/utils/types/structure-type';
1
+ import { ClassDeclaration, Pattern, Query, StructureType } from 'ng-morph';
3
2
  export declare function getNgModules(pattern: Pattern, query?: Query<Omit<StructureType<ClassDeclaration>, 'kind'>>): ClassDeclaration[];
4
3
  /**
5
4
  * Find NgModule where the component was declared.
@@ -9,7 +9,7 @@ exports.getNgModules = getNgModules;
9
9
  * Find NgModule where the component was declared.
10
10
  */
11
11
  function findNgModule(ngComponent) {
12
- const allNgModules = getNgModules('**/**');
12
+ const allNgModules = getNgModules('**/**.ts');
13
13
  return (allNgModules.find(module => {
14
14
  const moduleFile = module.getSourceFile();
15
15
  const imports = ng_morph_1.getImports(moduleFile.getFilePath(), {
@@ -1,4 +1,3 @@
1
- import { ClassDeclaration, Pattern, Query } from 'ng-morph';
2
- import { StructureType } from 'ng-morph/utils/types/structure-type';
1
+ import { ClassDeclaration, Pattern, Query, StructureType } from 'ng-morph';
3
2
  import { TemplateResource } from '../../ng-update/interfaces/template-resourse';
4
3
  export declare function getComponentTemplates(pattern: Pattern, query?: Query<Omit<StructureType<ClassDeclaration>, 'kind'>>): TemplateResource[];
@@ -1,6 +1,6 @@
1
- import { DevkitFileSystem } from 'ng-morph/project/classes/devkit-file-system';
2
1
  import { Element } from 'parse5';
3
2
  import { TemplateResource } from '../../ng-update/interfaces/template-resourse';
3
+ import { DevkitFileSystem } from 'ng-morph';
4
4
  /**
5
5
  * Replace component input property by new value
6
6
  * ___
@@ -1,5 +1,5 @@
1
1
  import { TemplateResource } from '../../ng-update/interfaces/template-resourse';
2
- import { DevkitFileSystem } from 'ng-morph/project/classes/devkit-file-system';
2
+ import { DevkitFileSystem } from 'ng-morph';
3
3
  export declare function getTemplateFromTemplateResource(templateRes: TemplateResource, fileSystem: DevkitFileSystem): string;
4
4
  export declare function getPathFromTemplateResource(templateRes: TemplateResource): string;
5
5
  export declare function getTemplateOffset(templateRes: TemplateResource): number;