@taiga-ui/cdk 2.37.1 → 2.40.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 (121) hide show
  1. package/abstract/dialog.service.d.ts +1 -1
  2. package/abstract/interactive.d.ts +8 -0
  3. package/abstract/multiple-control.d.ts +2 -2
  4. package/abstract/taiga-ui-cdk-abstract.metadata.json +1 -1
  5. package/bundles/taiga-ui-cdk-abstract.umd.js +9 -0
  6. package/bundles/taiga-ui-cdk-abstract.umd.js.map +1 -1
  7. package/bundles/taiga-ui-cdk-abstract.umd.min.js.map +1 -1
  8. package/bundles/taiga-ui-cdk-components-dialog-host.umd.js +5 -9
  9. package/bundles/taiga-ui-cdk-components-dialog-host.umd.js.map +1 -1
  10. package/bundles/taiga-ui-cdk-components-dialog-host.umd.min.js +2 -2
  11. package/bundles/taiga-ui-cdk-components-dialog-host.umd.min.js.map +1 -1
  12. package/bundles/taiga-ui-cdk-directives-active-zone.umd.js.map +1 -1
  13. package/bundles/taiga-ui-cdk-directives-active-zone.umd.min.js.map +1 -1
  14. package/bundles/taiga-ui-cdk-directives-resize.umd.js.map +1 -1
  15. package/bundles/taiga-ui-cdk-directives-resize.umd.min.js.map +1 -1
  16. package/bundles/taiga-ui-cdk-observables.umd.js.map +1 -1
  17. package/bundles/taiga-ui-cdk-observables.umd.min.js.map +1 -1
  18. package/bundles/taiga-ui-cdk-services.umd.js.map +1 -1
  19. package/bundles/taiga-ui-cdk-services.umd.min.js.map +1 -1
  20. package/bundles/taiga-ui-cdk-tokens.umd.js.map +1 -1
  21. package/bundles/taiga-ui-cdk-tokens.umd.min.js.map +1 -1
  22. package/bundles/taiga-ui-cdk-utils-dom.umd.js.map +1 -1
  23. package/bundles/taiga-ui-cdk-utils-dom.umd.min.js.map +1 -1
  24. package/bundles/taiga-ui-cdk-utils-focus.umd.js.map +1 -1
  25. package/bundles/taiga-ui-cdk-utils-focus.umd.min.js.map +1 -1
  26. package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.js.map +1 -1
  27. package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.min.js.map +1 -1
  28. package/components/dialog-host/taiga-ui-cdk-components-dialog-host.metadata.json +1 -1
  29. package/directives/resize/resize.directive.d.ts +2 -2
  30. package/directives/resize/taiga-ui-cdk-directives-resize.metadata.json +1 -1
  31. package/esm2015/abstract/dialog.service.js +1 -1
  32. package/esm2015/abstract/interactive.js +10 -1
  33. package/esm2015/abstract/multiple-control.js +1 -1
  34. package/esm2015/components/dialog-host/dialog-host.component.js +4 -9
  35. package/esm2015/directives/active-zone/active-zone.directive.js +1 -1
  36. package/esm2015/directives/resize/resize.directive.js +1 -1
  37. package/esm2015/observables/items-query-list-observable.js +1 -1
  38. package/esm2015/services/obscured.service.js +1 -1
  39. package/esm2015/services/parents-scroll.service.js +1 -1
  40. package/esm2015/tokens/dialogs.js +1 -1
  41. package/esm2015/utils/dom/get-element-obscurers.js +1 -1
  42. package/esm2015/utils/focus/move-focus.js +1 -1
  43. package/esm2015/utils/miscellaneous/flat-length.js +1 -1
  44. package/esm2015/utils/miscellaneous/get-original-array-from-query-list.js +1 -1
  45. package/esm2015/utils/miscellaneous/uniq-by.js +1 -1
  46. package/esm5/abstract/dialog.service.js +1 -1
  47. package/esm5/abstract/interactive.js +10 -1
  48. package/esm5/abstract/multiple-control.js +1 -1
  49. package/esm5/components/dialog-host/dialog-host.component.js +4 -9
  50. package/esm5/directives/active-zone/active-zone.directive.js +1 -1
  51. package/esm5/directives/resize/resize.directive.js +1 -1
  52. package/esm5/observables/items-query-list-observable.js +1 -1
  53. package/esm5/services/obscured.service.js +1 -1
  54. package/esm5/services/parents-scroll.service.js +1 -1
  55. package/esm5/tokens/dialogs.js +1 -1
  56. package/esm5/utils/dom/get-element-obscurers.js +1 -1
  57. package/esm5/utils/focus/move-focus.js +1 -1
  58. package/esm5/utils/miscellaneous/flat-length.js +1 -1
  59. package/esm5/utils/miscellaneous/get-original-array-from-query-list.js +1 -1
  60. package/esm5/utils/miscellaneous/uniq-by.js +1 -1
  61. package/fesm2015/taiga-ui-cdk-abstract.js +9 -0
  62. package/fesm2015/taiga-ui-cdk-abstract.js.map +1 -1
  63. package/fesm2015/taiga-ui-cdk-components-dialog-host.js +3 -8
  64. package/fesm2015/taiga-ui-cdk-components-dialog-host.js.map +1 -1
  65. package/fesm2015/taiga-ui-cdk-directives-active-zone.js.map +1 -1
  66. package/fesm2015/taiga-ui-cdk-directives-resize.js.map +1 -1
  67. package/fesm2015/taiga-ui-cdk-observables.js.map +1 -1
  68. package/fesm2015/taiga-ui-cdk-services.js.map +1 -1
  69. package/fesm2015/taiga-ui-cdk-tokens.js.map +1 -1
  70. package/fesm2015/taiga-ui-cdk-utils-dom.js.map +1 -1
  71. package/fesm2015/taiga-ui-cdk-utils-focus.js.map +1 -1
  72. package/fesm2015/taiga-ui-cdk-utils-miscellaneous.js.map +1 -1
  73. package/fesm5/taiga-ui-cdk-abstract.js +9 -0
  74. package/fesm5/taiga-ui-cdk-abstract.js.map +1 -1
  75. package/fesm5/taiga-ui-cdk-components-dialog-host.js +3 -8
  76. package/fesm5/taiga-ui-cdk-components-dialog-host.js.map +1 -1
  77. package/fesm5/taiga-ui-cdk-directives-active-zone.js.map +1 -1
  78. package/fesm5/taiga-ui-cdk-directives-resize.js.map +1 -1
  79. package/fesm5/taiga-ui-cdk-observables.js.map +1 -1
  80. package/fesm5/taiga-ui-cdk-services.js.map +1 -1
  81. package/fesm5/taiga-ui-cdk-tokens.js.map +1 -1
  82. package/fesm5/taiga-ui-cdk-utils-dom.js.map +1 -1
  83. package/fesm5/taiga-ui-cdk-utils-focus.js.map +1 -1
  84. package/fesm5/taiga-ui-cdk-utils-miscellaneous.js.map +1 -1
  85. package/observables/items-query-list-observable.d.ts +1 -1
  86. package/package.json +20 -1
  87. package/schematics/collection.json +16 -0
  88. package/schematics/migration.json +10 -0
  89. package/schematics/ng-add/constants/modules.d.ts +8 -0
  90. package/schematics/ng-add/constants/modules.js +34 -0
  91. package/schematics/ng-add/constants/packages.d.ts +2 -0
  92. package/schematics/ng-add/constants/packages.js +13 -0
  93. package/schematics/ng-add/constants/versions.d.ts +4 -0
  94. package/schematics/ng-add/constants/versions.js +7 -0
  95. package/schematics/ng-add/index.d.ts +3 -0
  96. package/schematics/ng-add/index.js +66 -0
  97. package/schematics/ng-add/schema.d.ts +7 -0
  98. package/schematics/ng-add/schema.js +2 -0
  99. package/schematics/ng-add/schema.json +86 -0
  100. package/schematics/ng-add/setup-project.d.ts +3 -0
  101. package/schematics/ng-add/setup-project.js +16 -0
  102. package/schematics/ng-add/steps/add-taiga-icons.d.ts +5 -0
  103. package/schematics/ng-add/steps/add-taiga-icons.js +40 -0
  104. package/schematics/ng-add/steps/add-taiga-modules.d.ts +3 -0
  105. package/schematics/ng-add/steps/add-taiga-modules.js +76 -0
  106. package/schematics/ng-add/steps/add-taiga-styles.d.ts +5 -0
  107. package/schematics/ng-add/steps/add-taiga-styles.js +38 -0
  108. package/schematics/ng-add/steps/wrap-with-tui-root.d.ts +3 -0
  109. package/schematics/ng-add/steps/wrap-with-tui-root.js +82 -0
  110. package/schematics/ng-update/index.d.ts +3 -0
  111. package/schematics/ng-update/index.js +18 -0
  112. package/schematics/utils/get-project-target-options.d.ts +2 -0
  113. package/schematics/utils/get-project-target-options.js +12 -0
  114. package/schematics/utils/get-project.d.ts +3 -0
  115. package/schematics/utils/get-project.js +12 -0
  116. package/services/obscured.service.d.ts +1 -1
  117. package/utils/dom/get-element-obscurers.d.ts +1 -1
  118. package/utils/focus/move-focus.d.ts +1 -1
  119. package/utils/miscellaneous/flat-length.d.ts +1 -1
  120. package/utils/miscellaneous/get-original-array-from-query-list.d.ts +1 -1
  121. package/utils/miscellaneous/uniq-by.d.ts +1 -1
@@ -0,0 +1,5 @@
1
+ import { workspaces } from '@angular-devkit/core';
2
+ import { Rule } from '@angular-devkit/schematics';
3
+ import { Schema } from '../schema';
4
+ export declare function addTaigaIcons(options: Schema): Rule;
5
+ export declare function addTaigaStylesToAngularJson(workspace: workspaces.WorkspaceDefinition, project: workspaces.ProjectDefinition): Rule;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const workspace_1 = require("@schematics/angular/utility/workspace");
13
+ const workspace_2 = require("@schematics/angular/utility/workspace");
14
+ const get_project_1 = require("../../utils/get-project");
15
+ const get_project_target_options_1 = require("../../utils/get-project-target-options");
16
+ const ICON_ASSETS = {
17
+ glob: '**/*',
18
+ input: 'node_modules/@taiga-ui/icons/src',
19
+ output: 'assets/taiga-ui/icons',
20
+ };
21
+ function addTaigaIcons(options) {
22
+ return (tree) => __awaiter(this, void 0, void 0, function* () {
23
+ const workspace = yield workspace_2.getWorkspace(tree);
24
+ const project = get_project_1.getProject(options, workspace);
25
+ return addTaigaStylesToAngularJson(workspace, project);
26
+ });
27
+ }
28
+ exports.addTaigaIcons = addTaigaIcons;
29
+ function addTaigaStylesToAngularJson(workspace, project) {
30
+ const targetOptions = get_project_target_options_1.getProjectTargetOptions(project, 'build');
31
+ const assets = targetOptions.assets;
32
+ if (!assets) {
33
+ targetOptions.assets = [ICON_ASSETS];
34
+ }
35
+ else {
36
+ targetOptions.assets = [...assets, ICON_ASSETS];
37
+ }
38
+ return workspace_1.updateWorkspace(workspace);
39
+ }
40
+ exports.addTaigaStylesToAngularJson = addTaigaStylesToAngularJson;
@@ -0,0 +1,3 @@
1
+ import { Rule } from '@angular-devkit/schematics';
2
+ import { Schema } from '../schema';
3
+ export declare function addTaigaModules(options: Schema): Rule;
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const workspace_1 = require("@schematics/angular/utility/workspace");
13
+ const ng_morph_1 = require("ng-morph");
14
+ const get_project_1 = require("../../utils/get-project");
15
+ const get_project_target_options_1 = require("../../utils/get-project-target-options");
16
+ const modules_1 = require("../constants/modules");
17
+ function addTaigaModules(options) {
18
+ return (tree, context) => __awaiter(this, void 0, void 0, function* () {
19
+ const workspace = yield workspace_1.getWorkspace(tree);
20
+ const project = get_project_1.getProject(options, workspace);
21
+ const buildOptions = get_project_target_options_1.getProjectTargetOptions(project, 'build');
22
+ ng_morph_1.setActiveProject(ng_morph_1.createProject(tree, '/', ['**/*.ts', '**/*.json']));
23
+ const mainModule = ng_morph_1.getMainModule(buildOptions.main);
24
+ addTuiModules(mainModule, options, context);
25
+ addTuiProviders(mainModule, options);
26
+ ng_morph_1.saveActiveProject();
27
+ });
28
+ }
29
+ exports.addTaigaModules = addTaigaModules;
30
+ function addTuiModules(mainModule, options, context) {
31
+ const modules = [
32
+ ...modules_1.MAIN_MODULES,
33
+ ...(options.addDialogsModule ? modules_1.DIALOG_MODULES : []),
34
+ ...(options.addNotificationsModule ? modules_1.NOTIFICATION_MODULES : []),
35
+ ];
36
+ const mainModulePath = mainModule.getSourceFile().getFilePath();
37
+ modules.forEach(module => {
38
+ ng_morph_1.addImportToNgModule(mainModule, module.name, { unique: true });
39
+ addUniqueImport(mainModulePath, module.name, module.packageName);
40
+ });
41
+ context.logger.info(`${modules.map(module => module.name)} was added to ${mainModulePath}`);
42
+ }
43
+ function addTuiProviders(mainModule, options) {
44
+ if (!options.addSanitizer) {
45
+ return;
46
+ }
47
+ ng_morph_1.addProviderToNgModule(mainModule, '{provide: TUI_SANITIZER, useClass: NgDompurifySanitizer}', { unique: true });
48
+ modules_1.SANITIZER_MODULES.forEach(module => {
49
+ addUniqueImport(mainModule.getSourceFile().getFilePath(), module.name, module.packageName);
50
+ });
51
+ }
52
+ function addUniqueImport(filePath, namedImport, packageName) {
53
+ const existingNamedImport = ng_morph_1.getImports(filePath, {
54
+ namedImports: namedImport,
55
+ moduleSpecifier: packageName,
56
+ });
57
+ if (existingNamedImport.length) {
58
+ return;
59
+ }
60
+ const existingDeclaration = ng_morph_1.getImports(filePath, {
61
+ moduleSpecifier: packageName,
62
+ });
63
+ if (existingDeclaration.length) {
64
+ const modules = existingDeclaration[0]
65
+ .getNamedImports()
66
+ .map(namedImport => namedImport.getText());
67
+ ng_morph_1.editImports(existingDeclaration, () => ({
68
+ namedImports: [...modules, namedImport],
69
+ }));
70
+ return;
71
+ }
72
+ ng_morph_1.addImports(filePath, {
73
+ moduleSpecifier: packageName,
74
+ namedImports: [namedImport],
75
+ });
76
+ }
@@ -0,0 +1,5 @@
1
+ import { workspaces } from '@angular-devkit/core';
2
+ import { Rule } from '@angular-devkit/schematics';
3
+ import { Schema } from '../schema';
4
+ export declare function addTaigaStyles(options: Schema): Rule;
5
+ export declare function addTaigaStylesToAngularJson(workspace: workspaces.WorkspaceDefinition, project: workspaces.ProjectDefinition): Rule;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const workspace_1 = require("@schematics/angular/utility/workspace");
13
+ const workspace_2 = require("@schematics/angular/utility/workspace");
14
+ const get_project_1 = require("../../utils/get-project");
15
+ const get_project_target_options_1 = require("../../utils/get-project-target-options");
16
+ const TAIGA_GLOBAL_STYLE = 'node_modules/@taiga-ui/core/styles/taiga-ui-global.less';
17
+ const TAIGA_THEME_STYLE = 'node_modules/@taiga-ui/core/styles/taiga-ui-theme.less';
18
+ function addTaigaStyles(options) {
19
+ return (tree) => __awaiter(this, void 0, void 0, function* () {
20
+ const workspace = yield workspace_2.getWorkspace(tree);
21
+ const project = get_project_1.getProject(options, workspace);
22
+ return addTaigaStylesToAngularJson(workspace, project);
23
+ });
24
+ }
25
+ exports.addTaigaStyles = addTaigaStyles;
26
+ function addTaigaStylesToAngularJson(workspace, project) {
27
+ const targetOptions = get_project_target_options_1.getProjectTargetOptions(project, 'build');
28
+ const styles = targetOptions.styles;
29
+ const taigaStyles = [TAIGA_GLOBAL_STYLE, TAIGA_THEME_STYLE];
30
+ if (!styles) {
31
+ targetOptions.styles = taigaStyles;
32
+ }
33
+ else {
34
+ targetOptions.styles = Array.from(new Set([...taigaStyles, ...styles]));
35
+ }
36
+ return workspace_1.updateWorkspace(workspace);
37
+ }
38
+ exports.addTaigaStylesToAngularJson = addTaigaStylesToAngularJson;
@@ -0,0 +1,3 @@
1
+ import { Rule } from '@angular-devkit/schematics';
2
+ import { Schema } from '../schema';
3
+ export declare function wrapWithTuiRootComponent(options: Schema): Rule;
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const workspace_1 = require("@schematics/angular/utility/workspace");
13
+ const ng_morph_1 = require("ng-morph");
14
+ const get_project_1 = require("../../utils/get-project");
15
+ const get_project_target_options_1 = require("../../utils/get-project-target-options");
16
+ function wrapWithTuiRootComponent(options) {
17
+ return (tree, context) => __awaiter(this, void 0, void 0, function* () {
18
+ const workspace = yield workspace_1.getWorkspace(tree);
19
+ const project = get_project_1.getProject(options, workspace);
20
+ const buildOptions = get_project_target_options_1.getProjectTargetOptions(project, 'build');
21
+ const appTemplatePath = getAppTemplatePath(tree, buildOptions.main);
22
+ if (!appTemplatePath) {
23
+ context.logger.error('Could not find the default main template file for this project.');
24
+ context.logger.info('Consider manually wrapping content of your app with tui-root');
25
+ context.logger.info('More information at https://taiga-ui.dev/getting-started');
26
+ return;
27
+ }
28
+ addTuiRootComponent(appTemplatePath, context, tree);
29
+ });
30
+ }
31
+ exports.wrapWithTuiRootComponent = wrapWithTuiRootComponent;
32
+ function addTuiRootComponent(filePath, context, tree) {
33
+ const buffer = tree.read(filePath);
34
+ if (!buffer) {
35
+ context.logger.error(`Could not read the default template file within the project ${filePath}`);
36
+ context.logger.info('Consider manually wrapping content of your app with tui-root');
37
+ return;
38
+ }
39
+ const htmlContent = buffer.toString();
40
+ const openTag = '<tui-root>' + '\n';
41
+ const closeTag = '\n' + '</tui-root>';
42
+ if (htmlContent.includes(openTag)) {
43
+ return;
44
+ }
45
+ const recorder = tree.beginUpdate(filePath);
46
+ recorder.insertLeft(0, openTag);
47
+ recorder.insertLeft(htmlContent.length, closeTag);
48
+ tree.commitUpdate(recorder);
49
+ context.logger.info(`Content of the app was wrapped with tui-root component in ${filePath}`);
50
+ }
51
+ function getAppTemplatePath(tree, mainPath) {
52
+ ng_morph_1.setActiveProject(ng_morph_1.createProject(tree, '/', ['**/*.ts', '**/*.json']));
53
+ const mainModule = ng_morph_1.getMainModule(mainPath);
54
+ const mainInitializer = getInitializer(mainModule, 'NgModule', 'declarations');
55
+ if (!ng_morph_1.Node.isArrayLiteralExpression(mainInitializer)) {
56
+ return;
57
+ }
58
+ const appIdentifier = mainInitializer.getElements()[0];
59
+ const appComponent = appIdentifier.getDefinitionNodes()[0];
60
+ const templateInitializer = getInitializer(appComponent, 'Component', 'templateUrl');
61
+ const appComponentPath = appComponent.getSourceFile().getFilePath().split('/');
62
+ const templateUrlPath = `${appComponentPath
63
+ .splice(0, appComponentPath.length - 1)
64
+ .join('/')}/${templateInitializer === null || templateInitializer === void 0 ? void 0 : templateInitializer.getText().replace(/['"]/g, '')}`;
65
+ ng_morph_1.saveActiveProject();
66
+ return templateUrlPath;
67
+ }
68
+ function getInitializer(classDeclaration, decoratorName, propertyName) {
69
+ const decorator = classDeclaration.getDecorator(decoratorName);
70
+ if (!decorator) {
71
+ return;
72
+ }
73
+ const [metadata] = decorator.getArguments();
74
+ if (!ng_morph_1.Node.isObjectLiteralExpression(metadata)) {
75
+ return;
76
+ }
77
+ const property = metadata.getProperty(propertyName);
78
+ if (!ng_morph_1.Node.isPropertyAssignment(property)) {
79
+ return;
80
+ }
81
+ return property.getInitializer();
82
+ }
@@ -0,0 +1,3 @@
1
+ import { SchematicContext } from '@angular-devkit/schematics';
2
+ import { Schema } from '../ng-add/schema';
3
+ export declare function updateToV3(_: Schema): (_: any, context: SchematicContext) => Promise<void>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const versions_1 = require("../ng-add/constants/versions");
13
+ function updateToV3(_) {
14
+ return (_, context) => __awaiter(this, void 0, void 0, function* () {
15
+ context.logger.info(`taiga packages will be updated to ${versions_1.TAIGA_VERSION}`);
16
+ });
17
+ }
18
+ exports.updateToV3 = updateToV3;
@@ -0,0 +1,2 @@
1
+ import { JsonArray, JsonObject, workspaces } from '@angular-devkit/core';
2
+ export declare function getProjectTargetOptions(project: workspaces.ProjectDefinition, buildTarget: string): Record<string, string | number | boolean | JsonArray | JsonObject | undefined | null>;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const schematics_1 = require("@angular-devkit/schematics");
4
+ function getProjectTargetOptions(project, buildTarget) {
5
+ var _a;
6
+ const buildTargetObject = (_a = project.targets) === null || _a === void 0 ? void 0 : _a.get(buildTarget);
7
+ if (buildTargetObject && buildTargetObject.options) {
8
+ return buildTargetObject.options;
9
+ }
10
+ throw new schematics_1.SchematicsException(`Cannot determine project target configuration for: ${buildTarget}.`);
11
+ }
12
+ exports.getProjectTargetOptions = getProjectTargetOptions;
@@ -0,0 +1,3 @@
1
+ import { workspaces } from '@angular-devkit/core';
2
+ import { Schema } from '../ng-add/schema';
3
+ export declare function getProject(options: Schema, workspace: workspaces.WorkspaceDefinition): workspaces.ProjectDefinition;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const schematics_1 = require("@angular-devkit/schematics");
4
+ function getProject(options, workspace) {
5
+ const projectName = options.project || workspace.extensions.defaultProject.toString();
6
+ const project = workspace.projects.get(projectName);
7
+ if (!project) {
8
+ throw new schematics_1.SchematicsException(`Unable to find project '${projectName}' in the workspace`);
9
+ }
10
+ return project;
11
+ }
12
+ exports.getProject = getProject;
@@ -6,7 +6,7 @@ import { TuiParentsScrollService } from './parents-scroll.service';
6
6
  * and polling with set interval, returns either null or an array
7
7
  * of elements that overlap given element edges
8
8
  */
9
- export declare class TuiObscuredService extends Observable<null | ReadonlyArray<Element>> {
9
+ export declare class TuiObscuredService extends Observable<null | readonly Element[]> {
10
10
  private readonly obscured$;
11
11
  constructor(parentsScroll$: TuiParentsScrollService, { nativeElement }: ElementRef<Element>, ngZone: NgZone, windowRef: Window, destroy$: Observable<void>, animationFrame$: Observable<number>);
12
12
  }
@@ -3,4 +3,4 @@
3
3
  *
4
4
  * CAUTION: Empty array means element if offscreen i.e. covered by no elements, rather than not covered
5
5
  */
6
- export declare function getElementObscurers(element: Element): ReadonlyArray<Element> | null;
6
+ export declare function getElementObscurers(element: Element): readonly Element[] | null;
@@ -5,4 +5,4 @@
5
5
  * @param elements array of focusable elements
6
6
  * @param step a step to move focus by, typically -1 or 1
7
7
  */
8
- export declare function moveFocus(currentIndex: number, elements: ReadonlyArray<HTMLElement>, step: number): void;
8
+ export declare function moveFocus(currentIndex: number, elements: readonly HTMLElement[], step: number): void;
@@ -3,4 +3,4 @@
3
3
  *
4
4
  * @param array twi dimensional array
5
5
  */
6
- export declare function flatLength(array: ReadonlyArray<ReadonlyArray<unknown>>): number;
6
+ export declare function flatLength(array: ReadonlyArray<readonly unknown[]>): number;
@@ -5,4 +5,4 @@ import { QueryList } from '@angular/core';
5
5
  * @param queryList
6
6
  * @returns original array from {@link QueryList}.
7
7
  */
8
- export declare function getOriginalArrayFromQueryList<T>(queryList: QueryList<T>): ReadonlyArray<T>;
8
+ export declare function getOriginalArrayFromQueryList<T>(queryList: QueryList<T>): readonly T[];
@@ -1 +1 @@
1
- export declare function uniqBy<T extends object>(array: ReadonlyArray<T>, key: keyof T): ReadonlyArray<T>;
1
+ export declare function uniqBy<T extends object>(array: readonly T[], key: keyof T): readonly T[];