@design-factory/design-factory 21.0.0-next.0 → 21.0.0-next.1

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.
@@ -0,0 +1,7 @@
1
+ import { Rule } from '@angular-devkit/schematics';
2
+ /**
3
+ * This migration
4
+ *
5
+ * @returns the Rule to migrate the classes
6
+ */
7
+ export default function deletedSassVars(): Rule;
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = deletedSassVars;
4
+ const schematics_1 = require("@angular-devkit/schematics");
5
+ const project_tsconfig_paths_1 = require("../../utils/project_tsconfig_paths");
6
+ const compiler_host_1 = require("../../utils/typescript/compiler_host");
7
+ const style_updater_1 = require("../../utils/style-updater");
8
+ const fs_1 = require("fs");
9
+ const path_1 = require("path");
10
+ const core_1 = require("@angular-devkit/core");
11
+ const removedWithWarning = new Set(JSON.parse((0, fs_1.readFileSync)(__dirname + '/files/removed-vars.json', { encoding: 'utf-8' })));
12
+ const removedWithValue = JSON.parse((0, fs_1.readFileSync)(__dirname + '/files/vars-with-value.json', { encoding: 'utf-8' }));
13
+ const regexDefinition = /\s*(\$[a-z-]+)\s*:\s*([^;]+);\s*/g;
14
+ const regexUse = /(#\{\s*)?(\$[a-z-]+)\}?/g;
15
+ /**
16
+ * This migration
17
+ *
18
+ * @returns the Rule to migrate the classes
19
+ */
20
+ function deletedSassVars() {
21
+ return async (tree, context) => {
22
+ const { buildPaths, testPaths } = await (0, project_tsconfig_paths_1.getProjectTsConfigPaths)(tree);
23
+ const basePath = process.cwd();
24
+ const allPaths = [...buildPaths, ...testPaths];
25
+ if (!allPaths.length) {
26
+ throw new schematics_1.SchematicsException('Could not find any tsconfig file. Cannot run the `deletedSassVars` migration.');
27
+ }
28
+ const varsMap = new Map();
29
+ for (const rename of removedWithValue) {
30
+ varsMap.set(rename.name, rename.value);
31
+ }
32
+ // first we search for re-declaration of the values... normally should be in main scss files
33
+ tree.visit((_, entry) => {
34
+ const path = entry?.path;
35
+ if (path && path.endsWith('.scss')) {
36
+ const styleText = entry.content.toString('utf-8');
37
+ let match;
38
+ while ((match = regexDefinition.exec(styleText)) !== null) {
39
+ const varName = match[1];
40
+ const varValue = match[2];
41
+ if (varsMap.has(varName)) {
42
+ // we found a re-declaration, we update the value in the map
43
+ varsMap.set(varName, varValue);
44
+ }
45
+ }
46
+ regexDefinition.lastIndex = 0; // reset regex state
47
+ }
48
+ });
49
+ const replaceStyleContent = (content, filePath) => {
50
+ return content
51
+ .replace(regexDefinition, (match, grp1) => (varsMap.has(grp1) ? '' : match))
52
+ .replace(regexUse, (match, _grp1, grp2) => {
53
+ if (varsMap.has(grp2)) {
54
+ return varsMap.get(grp2);
55
+ }
56
+ else {
57
+ if (removedWithWarning.has(grp2)) {
58
+ context.logger.warn(`Sass var ${grp2} used in ${filePath} was removed in the new version of Design Factory.`);
59
+ }
60
+ return match;
61
+ }
62
+ });
63
+ };
64
+ const templateUpdater = new style_updater_1.StyleUpdater(tree, replaceStyleContent);
65
+ for (const tsconfigPath of allPaths) {
66
+ const program = (0, compiler_host_1.createMigrationProgram)(tree, tsconfigPath, basePath);
67
+ const sourceFiles = program
68
+ .getSourceFiles()
69
+ .filter((sourceFile) => (0, compiler_host_1.canMigrateFile)(basePath, sourceFile, program));
70
+ for (const sourceFile of sourceFiles) {
71
+ templateUpdater.update(sourceFile, program.getTypeChecker());
72
+ }
73
+ }
74
+ tree.visit((_, entry) => {
75
+ const path = entry?.path;
76
+ if (path && path.endsWith('.scss')) {
77
+ const normalizedPath = (0, core_1.normalize)(path_1.posix.resolve(path.toString().substring(1)));
78
+ if (templateUpdater['_analyzedFiles'].has(normalizedPath)) {
79
+ return;
80
+ }
81
+ const styleText = entry.content.toString();
82
+ const modifiedText = replaceStyleContent(styleText, path.toString().substring(1));
83
+ if (modifiedText !== styleText) {
84
+ tree.overwrite(path, modifiedText);
85
+ }
86
+ templateUpdater['_analyzedFiles'].add(normalizedPath);
87
+ }
88
+ });
89
+ };
90
+ }
@@ -1,39 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = styleImportPackage;
4
+ const schematics_1 = require("@angular-devkit/schematics");
4
5
  const workspace_1 = require("@schematics/angular/utility/workspace");
5
- const importRegex = /@import\s+(['"])(@design-factory\/design-factory\/[^'"]+)\1;/g;
6
- const replaceImport = (match, _quote, importPath) => {
7
- const modifiedImport = transformImport(importPath);
8
- if (modifiedImport) {
9
- return `@import "${modifiedImport}";`;
10
- }
11
- return match;
12
- };
6
+ const add_dependencies_1 = require("../../utils/add-dependencies");
7
+ const importRegex = /(['"])(@design-factory\/design-factory\/[^'"]+)\1/g;
13
8
  const cssBundleRegex = /^@design-factory\/design-factory\/design-factory\.css$/;
14
9
  const scssBundleRegex = /^@design-factory\/design-factory\/design-factory(\.scss)?$/;
15
10
  const scssUtilitiesRegex = /^@design-factory\/design-factory\/design-factory-utilities(\.scss)?$/;
16
11
  const scssNamespaceRegex = /^@design-factory\/design-factory\/styles\/scss\/df-styles-namespace(\.scss)?$/;
17
12
  const scssFolderRegex = /^@design-factory\/design-factory\/styles\/scss\/(.*)$/;
18
- const transformImport = (importPath, forceExtension = false) => {
19
- if (cssBundleRegex.test(importPath)) {
20
- return `@design-factory/styles/bundle${forceExtension ? '.css' : ''}`;
21
- }
22
- if (scssBundleRegex.test(importPath)) {
23
- return `@design-factory/styles/scss/bundle${forceExtension ? '.scss' : ''}`;
24
- }
25
- if (scssUtilitiesRegex.test(importPath)) {
26
- return `@design-factory/styles/scss/utilities${forceExtension ? '.scss' : ''}`;
27
- }
28
- if (scssNamespaceRegex.test(importPath)) {
29
- return `@design-factory/styles/scss/namespace${forceExtension ? '.scss' : ''}`;
30
- }
31
- const match = scssFolderRegex.exec(importPath);
32
- if (match && match[1]) {
33
- return `@design-factory/styles/scss/${match[1]}`;
34
- }
35
- return null;
36
- };
13
+ const assetsFolderRegex = /^@design-factory\/design-factory\/assets\/(.*)$/;
14
+ const scssTheme2023Regex = /@(import|use)\s+['"]@design-factory\/design-factory\/styles\/scss\/themes\/brand2023\/variables(\.scss)?['"][^\n]*\n?/;
37
15
  /**
38
16
  * This migration updates the global styles to import the correct package of design factory styles.
39
17
  *
@@ -41,24 +19,67 @@ const transformImport = (importPath, forceExtension = false) => {
41
19
  */
42
20
  function styleImportPackage() {
43
21
  return (tree, _context) => {
22
+ const forcePackages = new Set();
23
+ const useScss = () => {
24
+ forcePackages.add('bootstrap');
25
+ forcePackages.add('@agnos-ui/core-bootstrap');
26
+ };
27
+ const transformImport = (importPath, forceExtension = false) => {
28
+ if (cssBundleRegex.test(importPath)) {
29
+ return `@design-factory/styles/bundle${forceExtension ? '.css' : ''}`;
30
+ }
31
+ if (scssBundleRegex.test(importPath)) {
32
+ useScss();
33
+ return `@design-factory/styles/scss/bundle${forceExtension ? '.scss' : ''}`;
34
+ }
35
+ if (scssUtilitiesRegex.test(importPath)) {
36
+ useScss();
37
+ return `@design-factory/styles/scss/utilities${forceExtension ? '.scss' : ''}`;
38
+ }
39
+ if (scssNamespaceRegex.test(importPath)) {
40
+ useScss();
41
+ return `@design-factory/styles/scss/namespace${forceExtension ? '.scss' : ''}`;
42
+ }
43
+ const scssFolderMatch = scssFolderRegex.exec(importPath);
44
+ if (scssFolderMatch && scssFolderMatch[1]) {
45
+ useScss();
46
+ return `@design-factory/styles/scss/${scssFolderMatch[1]}`;
47
+ }
48
+ const assetsFolderMatch = assetsFolderRegex.exec(importPath);
49
+ if (assetsFolderMatch && assetsFolderMatch[1]) {
50
+ return `@design-factory/styles/assets/${assetsFolderMatch[1]}`;
51
+ }
52
+ return null;
53
+ };
54
+ const replaceImport = (match, quotes, importPath) => {
55
+ const modifiedImport = transformImport(importPath);
56
+ if (modifiedImport) {
57
+ return `${quotes}${modifiedImport}${quotes}`;
58
+ }
59
+ return match;
60
+ };
44
61
  tree.visit((_, entry) => {
45
62
  const path = entry?.path;
46
63
  if (path && (path.endsWith('.scss') || path.endsWith('.css'))) {
47
64
  const styleText = entry.content.toString();
48
- const modifiedText = styleText.replace(importRegex, replaceImport);
65
+ const modifiedText = styleText.replace(scssTheme2023Regex, '').replace(importRegex, replaceImport);
49
66
  if (modifiedText !== styleText) {
50
67
  tree.overwrite(path, modifiedText);
51
68
  }
52
69
  }
53
70
  });
54
- return (0, workspace_1.updateWorkspace)((workspace) => {
55
- for (const project of workspace.projects.values()) {
56
- for (const target of project.targets.values()) {
57
- if (Array.isArray(target.options?.['styles'])) {
58
- target.options['styles'] = target.options['styles'].map((style) => typeof style === 'string' ? (transformImport(style, true) ?? style) : style);
71
+ return (0, schematics_1.chain)([
72
+ (0, workspace_1.updateWorkspace)((workspace) => {
73
+ for (const project of workspace.projects.values()) {
74
+ for (const target of project.targets.values()) {
75
+ if (Array.isArray(target.options?.['styles'])) {
76
+ target.options['styles'] = target.options['styles'].map((style) => typeof style === 'string' ? (transformImport(style, true) ?? style) : style);
77
+ }
59
78
  }
60
79
  }
61
- }
62
- });
80
+ }),
81
+ (0, add_dependencies_1.addDependencies)(forcePackages),
82
+ (0, add_dependencies_1.install)()
83
+ ]);
63
84
  };
64
85
  }
@@ -0,0 +1,2 @@
1
+ import { Rule } from '@angular-devkit/schematics';
2
+ export default function toastClassesUpdate(): Rule;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = toastClassesUpdate;
4
+ const schematics_1 = require("@angular-devkit/schematics");
5
+ const project_tsconfig_paths_1 = require("../../utils/project_tsconfig_paths");
6
+ const template_updater_1 = require("../../utils/template-updater");
7
+ const compiler_host_1 = require("../../utils/typescript/compiler_host");
8
+ const regexDismissible = /df-toast-dismissible/g;
9
+ const regexBtnOutline = /(<ngb-toast(?:(?!df-toast-subtle)[\s\S])*?>[\s\S]*?<button[\s\S]*?class="[^"]*\b)(btn-outline-neutral)(\b[^"]*)/g;
10
+ const regexBtnClose = /(<ngb-toast[\s\S]*?<button[\s\S]*?class="[^"]*\b)(btn-close)(\b[^"]*)/g;
11
+ function replaceHtmlContent(content) {
12
+ content = content.replace(regexDismissible, ''); //remove df-toast-dismissible class
13
+ content = content.replace(regexBtnOutline, (_, g1, _1, g3) => `${g1}df-btn-outline-neutral-mirror${g3}`); // uses appropriate class on subtale toast
14
+ content = content.replace(regexBtnClose, (_, g1, _1, g3) => `${g1}df-btn-icononly fal fa-xmark ms-5${g3}`); //removes btn close
15
+ return content;
16
+ }
17
+ function toastClassesUpdate() {
18
+ return async (tree) => {
19
+ const { buildPaths, testPaths } = await (0, project_tsconfig_paths_1.getProjectTsConfigPaths)(tree);
20
+ const basePath = process.cwd();
21
+ const allPaths = [...buildPaths, ...testPaths];
22
+ if (!allPaths.length) {
23
+ throw new schematics_1.SchematicsException('Could not find any tsconfig file. Cannot run the `ToastClassesUpdate` migration.');
24
+ }
25
+ const templateUpdater = new template_updater_1.TemplateUpdater(tree, replaceHtmlContent);
26
+ for (const tsconfigPath of allPaths) {
27
+ const program = (0, compiler_host_1.createMigrationProgram)(tree, tsconfigPath, basePath);
28
+ const sourceFiles = program
29
+ .getSourceFiles()
30
+ .filter((sourceFile) => (0, compiler_host_1.canMigrateFile)(basePath, sourceFile, program));
31
+ for (const sourceFile of sourceFiles) {
32
+ templateUpdater.update(sourceFile, program.getTypeChecker());
33
+ }
34
+ }
35
+ };
36
+ }
@@ -80,6 +80,21 @@
80
80
  "description": "The package from which Design Factory styles are imported has changed.",
81
81
  "version": "21.0.0",
82
82
  "factory": "./21_0_0/style-import-package"
83
+ },
84
+ "ag-grid-zebra-header-class": {
85
+ "description": "The class `df-table-white-header` is replaced by `df-table-neutral-alt-header`",
86
+ "version": "21.0.0",
87
+ "factory": "./21_0_0/ag-grid-neutral-header"
88
+ },
89
+ "toast-classes-21.0": {
90
+ "description": "As of Design Factory version 21, some css classes for the toast have been renamed.",
91
+ "version": "21.0.0",
92
+ "factory": "./21_0_0/toast-classes-21.0"
93
+ },
94
+ "deleted-sass-vars": {
95
+ "description": "As of Design Factory version 21, some deprecated sass variables have been removed. This migration helps you identify and fix usages of these variables in your codebase.",
96
+ "version": "21.0.0",
97
+ "factory": "./21_0_0/deleted-sass-vars"
83
98
  }
84
99
  }
85
100
  }
@@ -0,0 +1,3 @@
1
+ import { Rule } from '@angular-devkit/schematics';
2
+ export declare function addDependencies(forcePackages?: Set<string>): Rule;
3
+ export declare function install(): Rule;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addDependencies = addDependencies;
4
+ exports.install = install;
5
+ const tasks_1 = require("@angular-devkit/schematics/tasks");
6
+ const dependencies_1 = require("@schematics/angular/utility/dependencies");
7
+ const fs_1 = require("fs");
8
+ const path_1 = require("path");
9
+ const listPeerDependencies = function* (pkgJson) {
10
+ for (const [name, version] of Object.entries(pkgJson.peerDependencies)) {
11
+ yield { name, version, required: !pkgJson['peerDependenciesMeta']?.[name]?.optional };
12
+ }
13
+ };
14
+ // Explicitly add the peer dependencies as main dependencies.
15
+ function addDependencies(forcePackages) {
16
+ return (tree) => {
17
+ const treePackageJson = JSON.parse(tree.read('package.json').toString('utf-8'));
18
+ const dfPackageJson = JSON.parse((0, fs_1.readFileSync)((0, path_1.resolve)(__dirname, '..', '..', '..', 'package.json'), { encoding: 'utf-8' }));
19
+ const dfStylesPackageJson = JSON.parse((0, fs_1.readFileSync)((0, path_1.resolve)(__dirname, '..', '..', '..', '..', 'styles', 'package.json'), { encoding: 'utf-8' }));
20
+ for (const { name, version, required } of [
21
+ ...listPeerDependencies(dfStylesPackageJson),
22
+ ...listPeerDependencies(dfPackageJson)
23
+ ]) {
24
+ if (required || !!treePackageJson.dependencies?.[name] || forcePackages?.has(name)) {
25
+ (0, dependencies_1.addPackageJsonDependency)(tree, {
26
+ type: dependencies_1.NodeDependencyType.Default,
27
+ name,
28
+ version,
29
+ overwrite: !name.startsWith('@angular/')
30
+ });
31
+ }
32
+ }
33
+ };
34
+ }
35
+ // Schedule a package install, also installing the dependencies set up in the above step.
36
+ function install() {
37
+ return (tree, context) => {
38
+ context.addTask(new tasks_1.NodePackageInstallTask());
39
+ return tree;
40
+ };
41
+ }
@@ -19,6 +19,8 @@ export interface ResolvedResource {
19
19
  inline: boolean;
20
20
  /** Path to the file that contains this resource. */
21
21
  filePath: string;
22
+ /** Absolute path to the file that contains this resource. */
23
+ absFilePath: string;
22
24
  /**
23
25
  * Gets the character and line of a given position index in the resource.
24
26
  * If the resource is declared inline within a TypeScript source file, the line and
@@ -39,6 +41,6 @@ export declare class ComponentResourceCollector {
39
41
  visitNode(node: ts.Node): void;
40
42
  private _visitClassDeclaration;
41
43
  /** Resolves an external stylesheet by reading its content and computing line mappings. */
42
- resolveExternalStylesheet(filePath: string, container: ts.ClassDeclaration | null): ResolvedResource | null;
44
+ resolveExternalStylesheet(filePath: string, absFilePath: string, container: ts.ClassDeclaration | null): ResolvedResource | null;
43
45
  private _trackExternalStylesheet;
44
46
  }
@@ -76,6 +76,7 @@ class ComponentResourceCollector {
76
76
  const content = stripBom(el.getText().slice(1, -1));
77
77
  this.resolvedStylesheets.push({
78
78
  filePath,
79
+ absFilePath,
79
80
  container: node,
80
81
  content,
81
82
  inline: true,
@@ -93,6 +94,7 @@ class ComponentResourceCollector {
93
94
  const templateStartIdx = property.initializer.getStart() + 1;
94
95
  this.resolvedTemplates.push({
95
96
  filePath,
97
+ absFilePath,
96
98
  container: node,
97
99
  content: property.initializer.getText().slice(1, -1),
98
100
  inline: true,
@@ -124,6 +126,7 @@ class ComponentResourceCollector {
124
126
  const lineStartsMap = (0, line_mappings_1.computeLineStartsMap)(fileContent);
125
127
  this.resolvedTemplates.push({
126
128
  filePath: templatePath,
129
+ absFilePath: absTemplatePath,
127
130
  container: node,
128
131
  content: fileContent,
129
132
  inline: false,
@@ -135,7 +138,7 @@ class ComponentResourceCollector {
135
138
  });
136
139
  }
137
140
  /** Resolves an external stylesheet by reading its content and computing line mappings. */
138
- resolveExternalStylesheet(filePath, container) {
141
+ resolveExternalStylesheet(filePath, absFilePath, container) {
139
142
  // Strip the BOM to avoid issues with the Sass compiler. See:
140
143
  // https://github.com/angular/components/issues/24227#issuecomment-1200934258
141
144
  const fileContent = stripBom(this.tree.readText(filePath) || '');
@@ -144,7 +147,8 @@ class ComponentResourceCollector {
144
147
  }
145
148
  const lineStartsMap = (0, line_mappings_1.computeLineStartsMap)(fileContent);
146
149
  return {
147
- filePath: filePath,
150
+ filePath,
151
+ absFilePath,
148
152
  container: container,
149
153
  content: fileContent,
150
154
  inline: false,
@@ -153,8 +157,9 @@ class ComponentResourceCollector {
153
157
  };
154
158
  }
155
159
  _trackExternalStylesheet(sourceFileDirPath, node, container) {
156
- const stylesheetPath = path_1.posix.relative((0, core_1.normalize)(process.cwd()), (0, core_1.normalize)(path_1.posix.resolve('/', (0, core_1.normalize)(sourceFileDirPath), (0, core_1.normalize)(node.text))));
157
- const stylesheet = this.resolveExternalStylesheet(stylesheetPath, container);
160
+ const absFilePath = (0, core_1.normalize)(path_1.posix.resolve('/', (0, core_1.normalize)(sourceFileDirPath), (0, core_1.normalize)(node.text)));
161
+ const stylesheetPath = path_1.posix.relative((0, core_1.normalize)(process.cwd()), absFilePath);
162
+ const stylesheet = this.resolveExternalStylesheet(stylesheetPath, absFilePath, container);
158
163
  if (stylesheet) {
159
164
  this.resolvedStylesheets.push(stylesheet);
160
165
  }
@@ -25,7 +25,7 @@ class StyleUpdater {
25
25
  };
26
26
  visitNodeAndCollectResources(file);
27
27
  for (const styleSheet of resourceCollector.resolvedStylesheets) {
28
- if (styleSheet.inline || !this._analyzedFiles.has(styleSheet.filePath)) {
28
+ if (styleSheet.inline || !this._analyzedFiles.has(styleSheet.absFilePath)) {
29
29
  const content = this.replaceContent(styleSheet.content, styleSheet.filePath);
30
30
  if (content !== styleSheet.content) {
31
31
  const recorder = this.tree.beginUpdate(styleSheet.filePath);
@@ -33,7 +33,7 @@ class StyleUpdater {
33
33
  recorder.insertRight(styleSheet.start, content);
34
34
  this.tree.commitUpdate(recorder);
35
35
  }
36
- this._analyzedFiles.add(styleSheet.filePath);
36
+ this._analyzedFiles.add(styleSheet.absFilePath);
37
37
  }
38
38
  }
39
39
  }
@@ -25,7 +25,7 @@ class TemplateUpdater {
25
25
  };
26
26
  visitNodeAndCollectResources(file);
27
27
  for (const template of resourceCollector.resolvedTemplates) {
28
- if (template.inline || !this._analyzedFiles.has(template.filePath)) {
28
+ if (template.inline || !this._analyzedFiles.has(template.absFilePath)) {
29
29
  const content = this.replaceContent(template.content);
30
30
  if (content !== template.content) {
31
31
  const recorder = this.tree.beginUpdate(template.filePath);
@@ -33,7 +33,7 @@ class TemplateUpdater {
33
33
  recorder.insertRight(template.start, content);
34
34
  this.tree.commitUpdate(recorder);
35
35
  }
36
- this._analyzedFiles.add(template.filePath);
36
+ this._analyzedFiles.add(template.absFilePath);
37
37
  }
38
38
  }
39
39
  }
@@ -3,32 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = ngAdd;
4
4
  const schematics_1 = require("@angular-devkit/schematics");
5
5
  const tasks_1 = require("@angular-devkit/schematics/tasks");
6
- const dependencies_1 = require("@schematics/angular/utility/dependencies");
7
6
  const workspace_1 = require("@schematics/angular/utility/workspace");
8
- const path_1 = require("path");
9
- const fs_1 = require("fs");
10
- // Explicitly add the peer dependencies as main dependencies.
11
- function addDependencies() {
12
- return (tree) => {
13
- const dfDependencies = JSON.parse((0, fs_1.readFileSync)((0, path_1.resolve)(__dirname, '..', '..', 'package.json'), { encoding: 'utf-8' })).peerDependencies;
14
- for (const dependency in dfDependencies) {
15
- if (Object.prototype.hasOwnProperty.call(dfDependencies, dependency)) {
16
- (0, dependencies_1.addPackageJsonDependency)(tree, {
17
- type: dependencies_1.NodeDependencyType.Default,
18
- name: dependency,
19
- version: dfDependencies[dependency]
20
- });
21
- }
22
- }
23
- };
24
- }
25
- // Schedule a package install, also installing the dependencies set up in the above step.
26
- function install() {
27
- return (tree, context) => {
28
- context.addTask(new tasks_1.NodePackageInstallTask());
29
- return tree;
30
- };
31
- }
7
+ const add_dependencies_1 = require("../migrations/utils/add-dependencies");
32
8
  // Add DF styles to the main styles file. If no styles.scss found, add DF styles to the workspace.
33
9
  function addDFStyles(options) {
34
10
  return async (tree, context) => {
@@ -60,6 +36,6 @@ ${foundCss ? '@import' : '@use'} '@design-factory/styles/bundle';
60
36
  function ngAdd(options) {
61
37
  return (_tree, context) => {
62
38
  context.addTask(new tasks_1.RunSchematicTask('@angular/localize', 'ng-add', options.project ? { project: options.project } : {}));
63
- return (0, schematics_1.chain)([addDependencies(), install(), addDFStyles(options)]);
39
+ return (0, schematics_1.chain)([(0, add_dependencies_1.addDependencies)(), (0, add_dependencies_1.install)(), addDFStyles(options)]);
64
40
  };
65
41
  }
@@ -1245,6 +1245,7 @@ interface DfStepperStep {
1245
1245
  ariaControl: string;
1246
1246
  warningLabel?: string;
1247
1247
  optionalLabel?: string;
1248
+ id: string;
1248
1249
  }
1249
1250
  type DfStepType = 'warning' | 'completed' | 'future' | 'visited';
1250
1251
  interface DfStepperNormalizedStep extends DfStepperStep {