@ihk-gfi/lux-components-update 18.5.2 → 19.0.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 (90) hide show
  1. package/README.md +3 -3
  2. package/collection.json +22 -57
  3. package/package.json +15 -34
  4. package/src/update-dependencies/index.js +89 -0
  5. package/{update-en-messages → src/update-en-messages}/index.js +4 -4
  6. package/src/update-standalone-imports/index.js +677 -0
  7. package/src/update-standalone-imports/schema.json +20 -0
  8. package/src/updates/19.0.0/index.js +345 -0
  9. package/{utility → src/utility}/dependencies.js +5 -7
  10. package/{utility → src/utility}/files.js +9 -1
  11. package/{utility → src/utility}/html/hit.js +5 -0
  12. package/{utility → src/utility}/html/html-manipulator.js +6 -4
  13. package/{utility → src/utility}/json.js +21 -4
  14. package/{utility → src/utility}/replace-item.js +17 -2
  15. package/{utility → src/utility}/typescript.js +125 -46
  16. package/{utility → src/utility}/util.js +0 -22
  17. package/{utility → src/utility}/validation.js +1 -2
  18. package/add-lux-components/files/app/app-routing.module.ts +0 -21
  19. package/add-lux-components/files/app/app.component.html +0 -34
  20. package/add-lux-components/files/app/app.component.scss +0 -4
  21. package/add-lux-components/files/app/app.component.spec.ts +0 -21
  22. package/add-lux-components/files/app/app.component.ts +0 -24
  23. package/add-lux-components/files/app/app.module.ts +0 -63
  24. package/add-lux-components/files/app/base/license-hint/license-hint.component.html +0 -11
  25. package/add-lux-components/files/app/base/license-hint/license-hint.component.ts +0 -24
  26. package/add-lux-components/files/app/error/error.component.html +0 -10
  27. package/add-lux-components/files/app/error/error.component.scss +0 -3
  28. package/add-lux-components/files/app/error/error.component.spec.ts +0 -51
  29. package/add-lux-components/files/app/error/error.component.ts +0 -17
  30. package/add-lux-components/files/app/home/home.component.html +0 -10
  31. package/add-lux-components/files/app/home/home.component.scss +0 -3
  32. package/add-lux-components/files/app/home/home.component.ts +0 -13
  33. package/add-lux-components/files/app/profil/profil.component.html +0 -1
  34. package/add-lux-components/files/app/profil/profil.component.scss +0 -0
  35. package/add-lux-components/files/app/profil/profil.component.spec.ts +0 -24
  36. package/add-lux-components/files/app/profil/profil.component.ts +0 -11
  37. package/add-lux-components/files/assets/svg/Example.svg +0 -6
  38. package/add-lux-components/files/assets/svg/android.svg +0 -2
  39. package/add-lux-components/files/assets/svg/box.svg +0 -690
  40. package/add-lux-components/files/assets/svg/demoAppLogo.svg +0 -1
  41. package/add-lux-components/files/assets/svg/red_power_button.svg +0 -67
  42. package/add-lux-components/files/assets/svg/svg2009.svg +0 -57457
  43. package/add-lux-components/files/environments/environment.prod.ts +0 -4
  44. package/add-lux-components/files/environments/environment.ts +0 -17
  45. package/add-lux-components/files/locale/messages.en.xlf +0 -1373
  46. package/add-lux-components/files/locale/messages.xlf +0 -1220
  47. package/add-lux-components/files/root/move-de-files.js +0 -15
  48. package/add-lux-components/files/src/index.html +0 -29
  49. package/add-lux-components/files/src/main.ts +0 -12
  50. package/add-lux-components/index.d.ts +0 -10
  51. package/add-lux-components/index.js +0 -232
  52. package/add-lux-components/schema.json +0 -23
  53. package/update-dependencies/index.d.ts +0 -6
  54. package/update-dependencies/index.js +0 -89
  55. package/update-en-messages/index.d.ts +0 -2
  56. package/updates/18.0.0/index.d.ts +0 -13
  57. package/updates/18.0.0/index.js +0 -125
  58. package/updates/18.1.0/index.d.ts +0 -2
  59. package/updates/18.1.0/index.js +0 -19
  60. package/updates/18.1.0/schema.json +0 -23
  61. package/updates/18.2.0/index.d.ts +0 -5
  62. package/updates/18.2.0/index.js +0 -44
  63. package/updates/18.2.0/schema.json +0 -23
  64. package/updates/18.3.0/index.d.ts +0 -5
  65. package/updates/18.3.0/index.js +0 -59
  66. package/updates/18.3.0/schema.json +0 -23
  67. package/updates/18.4.0/index.d.ts +0 -7
  68. package/updates/18.4.0/index.js +0 -76
  69. package/updates/18.4.0/schema.json +0 -23
  70. package/updates/18.5.0/index.d.ts +0 -5
  71. package/updates/18.5.0/index.js +0 -53
  72. package/updates/18.5.0/schema.json +0 -23
  73. package/utility/dependencies.d.ts +0 -45
  74. package/utility/files.d.ts +0 -66
  75. package/utility/html/hit.d.ts +0 -21
  76. package/utility/html/html-manipulator.d.ts +0 -71
  77. package/utility/html/manipulator-functions.d.ts +0 -99
  78. package/utility/json.d.ts +0 -82
  79. package/utility/logging.d.ts +0 -32
  80. package/utility/replace-item.d.ts +0 -18
  81. package/utility/test.d.ts +0 -10
  82. package/utility/typescript.d.ts +0 -22
  83. package/utility/util.d.ts +0 -37
  84. package/utility/validation.d.ts +0 -10
  85. /package/{update-dependencies → src/update-dependencies}/schema.json +0 -0
  86. /package/{update-en-messages → src/update-en-messages}/schema.json +0 -0
  87. /package/{updates/18.0.0 → src/updates/19.0.0}/schema.json +0 -0
  88. /package/{utility → src/utility}/html/manipulator-functions.js +0 -0
  89. /package/{utility → src/utility}/logging.js +0 -0
  90. /package/{utility → src/utility}/test.js +0 -0
@@ -1,15 +0,0 @@
1
- const fse = require('fs-extra');
2
- const del = require('del');
3
-
4
- console.log('> Script "move-de-files.js" started...');
5
- fse.pathExists('dist/de').then((exists) => {
6
- if (exists) {
7
- console.log('> Move files (locale "de") to root folder...');
8
- fse.copySync('dist/de', 'dist', { overwrite: true });
9
- del.sync(['dist/de']);
10
- } else {
11
- console.log('> No folder "de" found. Nothing is to do.');
12
- }
13
- console.log('> Success!');
14
- });
15
- console.log('> Script "move-de-files.js" finished.');
@@ -1,29 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="de">
3
- <head>
4
- <meta charset="utf-8" />
5
- <title>Change Me</title>
6
- <base href="/" />
7
- <meta name="viewport" content="width=device-width, initial-scale=1" />
8
- <link rel="icon" type="image/x-icon" href="favicon.ico" />
9
-
10
- <style>
11
- .lux-no-js {
12
- color: red;
13
- font-size: 20px;
14
- border: 1px solid red;
15
- padding: 10px;
16
- }
17
- </style>
18
- </head>
19
- <body style="margin: 0">
20
- <noscript>
21
- <div id="no-js" class="lux-no-js">
22
- <p><b>Achtung, Javascript ist deaktiviert.</b></p>
23
- <p>Bitte aktivieren Sie Javascript in Ihrem Browser, damit die Applikation funktionsf&auml;hig ist.</p>
24
- </div>
25
- </noscript>
26
-
27
- <app-root></app-root>
28
- </body>
29
- </html>
@@ -1,12 +0,0 @@
1
- import { enableProdMode } from '@angular/core';
2
- import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3
- import { AppModule } from './app/app.module';
4
- import { environment } from './environments/environment';
5
-
6
- if (environment.production) {
7
- enableProdMode();
8
- }
9
-
10
- platformBrowserDynamic()
11
- .bootstrapModule(AppModule)
12
- .catch((err) => console.log(err));
@@ -1,10 +0,0 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
- export declare function addLuxComponents(options: any): Rule;
3
- /**
4
- * Prüft ob die Versionen des Projekts mit den erforderlichen Versionen dieses Updates übereinstimmen.
5
- */
6
- export declare function check(): Rule;
7
- export declare function updatePackageJson(_options: any): Rule;
8
- export declare function updateIndexHtml(options: any): Rule;
9
- export declare function copyAppFiles(options: any): Rule;
10
- export declare function updateApp(options: any): Rule;
@@ -1,232 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.addLuxComponents = addLuxComponents;
4
- exports.check = check;
5
- exports.updatePackageJson = updatePackageJson;
6
- exports.updateIndexHtml = updateIndexHtml;
7
- exports.copyAppFiles = copyAppFiles;
8
- exports.updateApp = updateApp;
9
- const schematics_1 = require("@angular-devkit/schematics");
10
- const chalk = require("chalk");
11
- const jsonc_parser_1 = require("jsonc-parser");
12
- const index_1 = require("../update-dependencies/index");
13
- const index_2 = require("../updates/18.0.0/index");
14
- const files_1 = require("../utility/files");
15
- const json_1 = require("../utility/json");
16
- const logging_1 = require("../utility/logging");
17
- const util_1 = require("../utility/util");
18
- const validation_1 = require("../utility/validation");
19
- function addLuxComponents(options) {
20
- return (_tree, _context) => {
21
- var _a;
22
- const jsonPathAllowedCommonJS = ['projects', options.project, 'architect', 'build', 'options', 'allowedCommonJsDependencies'];
23
- const jsonPathBudget = ['projects', options.project, 'architect', 'build', 'configurations', 'production', 'budgets'];
24
- const budgetValue = {
25
- type: 'initial',
26
- maximumWarning: '1mb',
27
- maximumError: '2mb'
28
- };
29
- const jsonPathPolyfillsBuild = ['projects', options.project, 'architect', 'build', 'options', 'polyfills'];
30
- const jsonPathPolyfillsTest = ['projects', options.project, 'architect', 'test', 'options', 'polyfills'];
31
- const polyfillsValue = '@angular/localize/init';
32
- const jsonPathAssetsBuild = ['projects', options.project, 'architect', 'build', 'options', 'assets'];
33
- const jsonPathAssetsTest = ['projects', options.project, 'architect', 'test', 'options', 'assets'];
34
- const assetsValues = [
35
- 'src/assets',
36
- {
37
- glob: '*(*min.css|*min.css.map)',
38
- input: './node_modules/@ihk-gfi/lux-components-theme/prebuilt-themes',
39
- output: './assets/themes'
40
- },
41
- {
42
- glob: '**/*',
43
- input: './node_modules/@ihk-gfi/lux-components-icons-and-fonts/assets/icons/',
44
- output: './assets/icons'
45
- }
46
- ];
47
- const jsonPathOptimization = ['projects', options.project, 'architect', 'build', 'configurations', 'production', 'optimization'];
48
- const jsonValueOptimization = {
49
- scripts: true,
50
- styles: {
51
- minify: true,
52
- inlineCritical: false
53
- },
54
- fonts: true
55
- };
56
- const jsonPathLang = ['projects', options.project, 'i18n'];
57
- const jsonValueLang = {
58
- sourceLocale: {
59
- code: 'de',
60
- baseHref: '/'
61
- },
62
- locales: {
63
- en: 'src/locale/messages.en.xlf'
64
- }
65
- };
66
- const findBudgetFn = (node) => (0, json_1.findObjectPropertyInArray)(node, 'type', 'initial');
67
- return (0, schematics_1.chain)([
68
- check(),
69
- copyAppFiles(options),
70
- updatePackageJson(options),
71
- (0, index_1.updateDependencies)(),
72
- updateIndexHtml(options),
73
- updateApp(options),
74
- (0, json_1.updateJsonValue)('/tsconfig.json', ['compilerOptions', 'strict'], true),
75
- (0, json_1.updateJsonValue)('/angular.json', jsonPathLang, jsonValueLang),
76
- (0, json_1.updateJsonValue)('/angular.json', jsonPathOptimization, jsonValueOptimization),
77
- (0, json_1.updateJsonArray)('/angular.json', jsonPathBudget, budgetValue, true, findBudgetFn),
78
- (0, json_1.updateJsonArray)('/angular.json', jsonPathAssetsBuild, assetsValues[0]),
79
- (0, json_1.updateJsonArray)('/angular.json', jsonPathAssetsTest, assetsValues[0]),
80
- (0, json_1.updateJsonArray)('/angular.json', jsonPathAssetsBuild, assetsValues[1]),
81
- (0, json_1.updateJsonArray)('/angular.json', jsonPathAssetsTest, assetsValues[1]),
82
- (0, json_1.updateJsonArray)('/angular.json', jsonPathAssetsBuild, assetsValues[2]),
83
- (0, json_1.updateJsonArray)('/angular.json', jsonPathAssetsTest, assetsValues[2]),
84
- (0, json_1.updateJsonArray)('/angular.json', jsonPathPolyfillsBuild, polyfillsValue),
85
- (0, json_1.updateJsonArray)('/angular.json', jsonPathPolyfillsTest, polyfillsValue),
86
- (0, json_1.updateJsonArray)('/angular.json', jsonPathAllowedCommonJS, 'hammerjs'),
87
- (0, json_1.updateJsonArray)('/angular.json', jsonPathAllowedCommonJS, 'ng2-pdf-viewer'),
88
- (0, json_1.updateJsonArray)('/angular.json', jsonPathAllowedCommonJS, 'pdfjs-dist'),
89
- (0, json_1.updateJsonArray)('/angular.json', jsonPathAllowedCommonJS, 'dompurify'),
90
- (0, files_1.deleteFile)(options, ((_a = options.path) !== null && _a !== void 0 ? _a : '') + '/package-lock.json'),
91
- (0, util_1.finish)(true, `Die LUX-Components ${index_2.updateMajorVersion} wurden erfolgreich eingerichtet.`, `${chalk.yellowBright('Fertig!')}`)
92
- ]);
93
- };
94
- }
95
- /**
96
- * Prüft ob die Versionen des Projekts mit den erforderlichen Versionen dieses Updates übereinstimmen.
97
- */
98
- function check() {
99
- return (tree, context) => {
100
- return (0, util_1.waitForTreeCallback)(tree, () => {
101
- (0, validation_1.validateAngularVersion)(tree, `^${+index_2.updateMajorVersion}.0.0`);
102
- (0, validation_1.validateNodeVersion)(context, index_2.updateNodeMinVersion);
103
- return tree;
104
- });
105
- };
106
- }
107
- function updatePackageJson(_options) {
108
- return (0, schematics_1.chain)([
109
- (0, util_1.messageInfoRule)(`package.json wird aktualisiert...`),
110
- (tree, _context) => {
111
- const filePath = `/package.json`;
112
- const newValuesArr = [
113
- {
114
- path: ['scripts', 'build-prod'],
115
- value: 'ng build --configuration production --localize && npm run move-de-files',
116
- message: `Skript "build-prod" hinzugefügt.`
117
- },
118
- {
119
- path: ['scripts', 'test-headless'],
120
- value: 'ng test --watch=false --browsers=ChromeHeadless --code-coverage=true',
121
- message: `Skript "test-headless" hinzugefügt.`
122
- },
123
- {
124
- path: ['scripts', 'smoketest'],
125
- value: 'npm run build-prod && npm run test-headless && npm run xi18n',
126
- message: `Skript "smoketest" hinzugefügt.`
127
- },
128
- {
129
- path: ['scripts', 'move-de-files'],
130
- value: 'node move-de-files.js',
131
- message: `Skript "move-de-files" hinzugefügt.`
132
- },
133
- {
134
- path: ['scripts', 'xi18n'],
135
- value: 'ng extract-i18n --output-path src/locale',
136
- message: `Skript "xi18n" hinzugefügt.`
137
- }
138
- ];
139
- newValuesArr.forEach((change) => {
140
- const tsConfigJson = (0, json_1.readJsonAsString)(tree, filePath);
141
- const edits = (0, jsonc_parser_1.modify)(tsConfigJson, change.path, change.value, {
142
- formattingOptions: json_1.jsonFormattingOptions
143
- });
144
- tree.overwrite(filePath, (0, jsonc_parser_1.applyEdits)(tsConfigJson, edits));
145
- (0, logging_1.logInfo)(change.message);
146
- });
147
- return tree;
148
- },
149
- (0, util_1.messageSuccessRule)(`package.json wurde aktualisiert.`)
150
- ]);
151
- }
152
- function updateIndexHtml(options) {
153
- return (0, schematics_1.chain)([
154
- (0, util_1.messageInfoRule)(`index.html wird aktualisiert...`),
155
- (tree, _context) => {
156
- (0, files_1.iterateFilesAndModifyContent)(tree, options.path, (filePath, content) => {
157
- let modifiedContent = (0, util_1.replaceAll)(content, '<body>', '<body style="margin: 0">');
158
- if (content !== modifiedContent) {
159
- tree.overwrite(filePath, modifiedContent);
160
- }
161
- }, 'index.html');
162
- },
163
- (0, util_1.messageSuccessRule)(`index.html wurde aktualisiert.`)
164
- ]);
165
- }
166
- function copyAppFiles(options) {
167
- return (0, schematics_1.chain)([
168
- (0, util_1.messageInfoRule)(`App-Dateien werden angelegt...`),
169
- (0, files_1.moveFilesToDirectory)(options, 'files/app', 'src/app'),
170
- (0, files_1.moveFilesToDirectory)(options, 'files/assets', 'src/assets'),
171
- (0, files_1.moveFilesToDirectory)(options, 'files/environments', 'src/environments'),
172
- (0, files_1.moveFilesToDirectory)(options, 'files/locale', '/src/locale'),
173
- (0, files_1.moveFilesToDirectory)(options, 'files/root', '/'),
174
- (0, files_1.moveFilesToDirectory)(options, 'files/src', '/src'),
175
- (0, util_1.messageSuccessRule)(`App-Dateien wurden angelegt.`)
176
- ]);
177
- }
178
- function updateApp(options) {
179
- return (0, schematics_1.chain)([
180
- (0, util_1.messageInfoRule)(`App-Dateien wird angepasst...`),
181
- (tree, _context) => {
182
- const filePath = `/package.json`;
183
- const newValuesArr = [
184
- {
185
- path: ['scripts', 'move-de-files'],
186
- value: 'node move-de-files.js',
187
- message: `Skript "move-de-files" hinzugefügt.`
188
- },
189
- {
190
- path: ['scripts', 'build'],
191
- value: 'ng build --aot --localize && npm run move-de-files',
192
- message: `Skript "build" angepasst.`
193
- },
194
- { path: ['scripts', 'build-aot'], value: undefined, message: `` },
195
- { path: ['scripts', 'buildzentral'], value: undefined, message: `` },
196
- { path: ['devDependencies', 'fs-extra'], value: '^10.0.0', message: `devDependencies "fs-extra" hinzugefügt.` },
197
- { path: ['devDependencies', 'del'], value: '^6.0.0', message: `devDependencies "del" hinzugefügt.` }
198
- ];
199
- newValuesArr.forEach((change) => {
200
- const tsConfigJson = (0, json_1.readJsonAsString)(tree, filePath);
201
- const edits = (0, jsonc_parser_1.modify)(tsConfigJson, change.path, change.value, {
202
- formattingOptions: json_1.jsonFormattingOptions
203
- });
204
- tree.overwrite(filePath, (0, jsonc_parser_1.applyEdits)(tsConfigJson, edits));
205
- (0, logging_1.logInfo)(change.message);
206
- });
207
- (0, json_1.readJson)(tree, filePath);
208
- return tree;
209
- },
210
- (tree, _context) => {
211
- const filePath = `/angular.json`;
212
- const newValuesArr = [
213
- {
214
- path: ['projects', options.project, 'architect', 'build', 'options', 'outputPath'],
215
- value: 'dist',
216
- message: `Property "outputPath" auf "dist" gesetzt.`
217
- }
218
- ];
219
- newValuesArr.forEach((change) => {
220
- const tsConfigJson = (0, json_1.readJsonAsString)(tree, filePath);
221
- const edits = (0, jsonc_parser_1.modify)(tsConfigJson, change.path, change.value, {
222
- formattingOptions: json_1.jsonFormattingOptions
223
- });
224
- tree.overwrite(filePath, (0, jsonc_parser_1.applyEdits)(tsConfigJson, edits));
225
- (0, logging_1.logInfo)(change.message);
226
- });
227
- (0, json_1.readJson)(tree, filePath);
228
- return tree;
229
- },
230
- (0, util_1.messageSuccessRule)(`App wurde angepasst.`)
231
- ]);
232
- }
@@ -1,23 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/schema",
3
- "$id": "addLuxComponentsSchema",
4
- "title": "Fügt die LUX-Components zum Projekt hinzu",
5
- "type": "object",
6
- "description": "Fügt die LUX-Components zum Projekt hinzu",
7
- "properties": {
8
- "project": {
9
- "type": "string",
10
- "description": "Der Projektname",
11
- "$default": {
12
- "$source": "projectName"
13
- }
14
- },
15
- "verbose": {
16
- "type": "boolean",
17
- "description": "Generiert mehr Logausgaben",
18
- "default": false
19
- }
20
- },
21
- "required": [],
22
- "additionalProperties": false
23
- }
@@ -1,6 +0,0 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
- export declare function updateDependencies(): Rule;
3
- export declare function updateDep(name: string, version: string, onlyUpdate: boolean): Rule;
4
- export declare function deleteDep(name: string): Rule;
5
- export declare function updateDevDep(name: string, version: string | null, onlyUpdate: boolean): Rule;
6
- export declare function deleteDevDep(name: string): Rule;
@@ -1,89 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateDependencies = updateDependencies;
4
- exports.updateDep = updateDep;
5
- exports.deleteDep = deleteDep;
6
- exports.updateDevDep = updateDevDep;
7
- exports.deleteDevDep = deleteDevDep;
8
- const schematics_1 = require("@angular-devkit/schematics");
9
- const dependencies_1 = require("../utility/dependencies");
10
- const json_1 = require("../utility/json");
11
- const util_1 = require("../utility/util");
12
- const addOrUpdate = false;
13
- const updateIfExists = true;
14
- function updateDependencies() {
15
- return (0, schematics_1.chain)([
16
- (0, util_1.messageInfoRule)(`Abhängigkeiten in der Datei "package.json" werden aktualisiert...`),
17
- deleteDep('@ihk-gfi/lux-stammdaten'),
18
- deleteDep('@angular/flex-layout'),
19
- deleteDevDep('node-sass'),
20
- updateDep('@ihk-gfi/lux-components', '18.0.0', addOrUpdate),
21
- updateDep('@ihk-gfi/lux-components-theme', '18.0.0', addOrUpdate),
22
- updateDep('@ihk-gfi/lux-components-icons-and-fonts', '1.8.0', addOrUpdate),
23
- updateDep('@angular/animations', '^18.2.6', addOrUpdate),
24
- updateDep('@angular/common', '^18.2.6', addOrUpdate),
25
- updateDep('@angular/core', '^18.2.6', addOrUpdate),
26
- updateDep('@angular/compiler', '^18.2.6', addOrUpdate),
27
- updateDep('@angular/localize', '^18.2.6', addOrUpdate),
28
- updateDep('@angular/forms', '^18.2.6', addOrUpdate),
29
- updateDep('@angular/platform-browser', '^18.2.6', addOrUpdate),
30
- updateDep('@angular/platform-browser-dynamic', '^18.2.6', addOrUpdate),
31
- updateDep('@angular/router', '^18.2.6', addOrUpdate),
32
- updateDep('@angular/cdk', '^18.2.6', addOrUpdate),
33
- updateDep('@angular/material', '^18.2.6', addOrUpdate),
34
- updateDep('rxjs', '~7.8.1', addOrUpdate),
35
- updateDep('dompurify', '~3.1.6', addOrUpdate),
36
- updateDep('marked', '4.0.15', addOrUpdate),
37
- updateDep('zone.js', '~0.14.10', addOrUpdate),
38
- updateDep('tslib', '^2.3.0', updateIfExists),
39
- updateDep('hammerjs', '2.0.8', addOrUpdate),
40
- updateDep('ng2-pdf-viewer', '10.3.1', addOrUpdate),
41
- updateDep('pdfjs-dist', '4.6.82', addOrUpdate),
42
- updateDep('ngx-cookie-service', '^18.0.0', addOrUpdate),
43
- updateDep('ngx-build-plus', '^18.0.0', addOrUpdate),
44
- updateDevDep('@ihk-gfi/lux-components-update', '^18.0.0', addOrUpdate),
45
- updateDevDep('@angular-eslint/builder', '^18.3.1', updateIfExists),
46
- updateDevDep('@angular-eslint/eslint-plugin', '^18.3.1', updateIfExists),
47
- updateDevDep('@angular-eslint/eslint-plugin-template', '^18.3.1', updateIfExists),
48
- updateDevDep('@angular-eslint/schematics', '^18.3.1', updateIfExists),
49
- updateDevDep('@angular-eslint/template-parser', '^18.3.1', updateIfExists),
50
- updateDevDep('@typescript-eslint/eslint-plugin', '^7.2.0', updateIfExists),
51
- updateDevDep('@typescript-eslint/parser', '^7.2.0', updateIfExists),
52
- updateDevDep('eslint', '^8.57.0', updateIfExists),
53
- updateDevDep('eslint-plugin-import', '2.29.1', updateIfExists),
54
- updateDevDep('eslint-plugin-jsdoc', '48.2.2', updateIfExists),
55
- updateDevDep('eslint-plugin-prefer-arrow', '1.2.3', updateIfExists),
56
- updateDevDep('@angular-devkit/build-angular', '^18.2.4', addOrUpdate),
57
- updateDevDep('@angular/compiler-cli', '^18.2.6', addOrUpdate),
58
- updateDevDep('@angular/cli', '^18.2.6', addOrUpdate),
59
- updateDevDep('@angular/language-service', '^18.2.6', addOrUpdate),
60
- updateDevDep('@angular/elements', '^18.2.6', addOrUpdate),
61
- updateDevDep('@compodoc/compodoc', '^1.1.25', updateIfExists),
62
- updateDevDep('@types/jasmine', '~5.1.0', addOrUpdate),
63
- updateDevDep('@types/marked', '4.0.3', addOrUpdate),
64
- updateDevDep('jasmine-core', '~5.2.0', addOrUpdate),
65
- updateDevDep('karma', '~6.4.0', addOrUpdate),
66
- updateDevDep('karma-coverage', '~2.2.0', addOrUpdate),
67
- updateDevDep('karma-chrome-launcher', '~3.2.0', addOrUpdate),
68
- updateDevDep('karma-firefox-launcher', '2.1.3', updateIfExists),
69
- updateDevDep('karma-jasmine', '~5.1.0', addOrUpdate),
70
- updateDevDep('karma-jasmine-html-reporter', '~2.1.0', addOrUpdate),
71
- updateDevDep('karma-safari-launcher', '1.0.0', updateIfExists),
72
- updateDevDep('typescript', '~5.5.2', addOrUpdate),
73
- updateDevDep('fs-extra', '11.2.0', updateIfExists),
74
- updateDevDep('del', '6.0.0', updateIfExists),
75
- (0, util_1.messageSuccessRule)(`Abhängigkeiten in der Datei "package.json" wurden aktualisiert.`)
76
- ]);
77
- }
78
- function updateDep(name, version, onlyUpdate) {
79
- return (0, json_1.updateJsonValue)('/package.json', [dependencies_1.NodeDependencyType.Default, name], version, onlyUpdate);
80
- }
81
- function deleteDep(name) {
82
- return (0, json_1.updateJsonValue)('/package.json', [dependencies_1.NodeDependencyType.Default, name], void 0, true);
83
- }
84
- function updateDevDep(name, version, onlyUpdate) {
85
- return (0, json_1.updateJsonValue)('/package.json', [dependencies_1.NodeDependencyType.Dev, name], version, onlyUpdate);
86
- }
87
- function deleteDevDep(name) {
88
- return (0, json_1.updateJsonValue)('/package.json', [dependencies_1.NodeDependencyType.Dev, name], void 0, true);
89
- }
@@ -1,2 +0,0 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
- export declare function updateEnMessages(): Rule;
@@ -1,13 +0,0 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
- export declare const updateMajorVersion = "18";
3
- export declare const updateMinVersion = "16.6.0";
4
- export declare const updateNodeMinVersion = "18.0.0";
5
- export declare function update180000(options: any): Rule;
6
- export declare function updateProject(options: any): Rule;
7
- export declare function updateFormControls(options: any): Rule;
8
- export declare function updateTabs(options: any): Rule;
9
- export declare function updateChips(options: any): Rule;
10
- export declare function updateSlider(options: any): Rule;
11
- export declare function updateAngularJson(options: any): Rule;
12
- export declare function updateStylesScss(options: any): Rule;
13
- export declare function updateStylesCss(options: any): Rule;
@@ -1,125 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateNodeMinVersion = exports.updateMinVersion = exports.updateMajorVersion = void 0;
4
- exports.update180000 = update180000;
5
- exports.updateProject = updateProject;
6
- exports.updateFormControls = updateFormControls;
7
- exports.updateTabs = updateTabs;
8
- exports.updateChips = updateChips;
9
- exports.updateSlider = updateSlider;
10
- exports.updateAngularJson = updateAngularJson;
11
- exports.updateStylesScss = updateStylesScss;
12
- exports.updateStylesCss = updateStylesCss;
13
- const schematics_1 = require("@angular-devkit/schematics");
14
- const chalk = require("chalk");
15
- const index_1 = require("../../update-dependencies/index");
16
- const logging_1 = require("../../utility/logging");
17
- const util_1 = require("../../utility/util");
18
- const validation_1 = require("../../utility/validation");
19
- const files_1 = require("../../utility/files");
20
- const replace_item_1 = require("../../utility/replace-item");
21
- exports.updateMajorVersion = '18';
22
- exports.updateMinVersion = '16.6.0';
23
- exports.updateNodeMinVersion = '18.0.0';
24
- function update180000(options) {
25
- return (_tree, _context) => {
26
- return (0, schematics_1.chain)([
27
- check(options),
28
- (0, util_1.applyRuleIf)(exports.updateMinVersion, updateProject(options)),
29
- (0, util_1.finish)(false, ``, `${chalk.yellowBright('Nur für JAST-Apps')}`, `${chalk.yellowBright('----------------------------------------------------------------------')}`, `${chalk.yellowBright('1. Bitte die Node-Version 22 verwenden.')}`, `${chalk.yellowBright('2. Bitte die pipeline.yaml anpassen:')}`, `${chalk.yellowBright(' a. Den Parameter --no-optional entfernen.')}`, `${chalk.yellowBright(' b. Das Image von "node:18-alpine" auf "node:22-alpine" ändern.')}`, ``, `${chalk.greenBright('Fertig!')}`)
30
- ]);
31
- };
32
- }
33
- function updateProject(options) {
34
- return (_tree, _context) => {
35
- return (0, schematics_1.chain)([
36
- (0, util_1.messageInfoRule)(`LUX-Components ${exports.updateMajorVersion} werden aktualisiert...`),
37
- (0, index_1.updateDependencies)(),
38
- updateFormControls(options),
39
- updateTabs(options),
40
- updateChips(options),
41
- updateSlider(options),
42
- updateAngularJson(options),
43
- updateStylesScss(options),
44
- updateStylesCss(options),
45
- (0, util_1.messageSuccessRule)(`LUX-Components ${exports.updateMajorVersion} wurden aktualisiert.`)
46
- ]);
47
- };
48
- }
49
- function check(_options) {
50
- return (tree, _context) => {
51
- (0, logging_1.logInfoWithDescriptor)(`Vorbedingungen werden geprüft...`);
52
- (0, validation_1.validateNodeVersion)(_context, exports.updateNodeMinVersion);
53
- (0, validation_1.validateLuxComponentsVersion)(tree, `${exports.updateMinVersion} || ^${exports.updateMajorVersion}.0.0`);
54
- (0, logging_1.logSuccess)(`Vorbedingungen wurden geprüft.`);
55
- return tree;
56
- };
57
- }
58
- function updateFormControls(options) {
59
- return (_tree, _context) => {
60
- return (0, schematics_1.chain)([
61
- (0, util_1.messageInfoRule)(`FormControls werden angepasst...`),
62
- (0, files_1.replaceRule)(options, 'Attribut "luxOptionMultiline" wird entfernt...', 'Attribut "luxOptionMultiline" wurde entfernt.', '.html', new replace_item_1.RemoveHtmlAttributeItem('luxOptionMultiline')),
63
- (0, util_1.messageSuccessRule)(`FormControls wurden angepasst.`)
64
- ]);
65
- };
66
- }
67
- function updateTabs(options) {
68
- return (_tree, _context) => {
69
- return (0, schematics_1.chain)([
70
- (0, util_1.messageInfoRule)(`Tabs werden angepasst...`),
71
- (0, files_1.replaceRule)(options, 'Attribut "luxTabAnimationActive" wird entfernt...', 'Attribut "luxTabAnimationActive" wurde entfernt.', '.html', new replace_item_1.RemoveHtmlTagAttributeItem('lux-tabs', 'luxTabAnimationActive')),
72
- (0, util_1.messageSuccessRule)(`Tabs wurden angepasst.`)
73
- ]);
74
- };
75
- }
76
- function updateChips(options) {
77
- return (_tree, _context) => {
78
- return (0, schematics_1.chain)([
79
- (0, util_1.messageInfoRule)(`Chips werden angepasst...`),
80
- (0, files_1.replaceRule)(options, 'Attribut "luxMultiple" wird entfernt...', 'Attribut "luxMultiple" wurde entfernt.', '.html', new replace_item_1.RemoveHtmlTagAttributeItem('lux-chips-ac', 'luxMultiple')),
81
- (0, files_1.replaceRule)(options, 'Attribut "luxSelected" wird entfernt...', 'Attribut "luxSelected" wurde entfernt.', '.html', new replace_item_1.RemoveHtmlTagAttributeItem('lux-chip-ac-group', 'luxSelected')),
82
- (0, files_1.replaceRule)(options, 'Attribut "luxChipSelected" wird entfernt...', 'Attribut "luxChipSelected" wurde entfernt.', '.html', new replace_item_1.RemoveHtmlTagAttributeItem('lux-chip-ac-group', 'luxChipSelected')),
83
- (0, util_1.messageSuccessRule)(`Chips wurden angepasst.`)
84
- ]);
85
- };
86
- }
87
- function updateSlider(options) {
88
- return (_tree, _context) => {
89
- return (0, schematics_1.chain)([
90
- (0, util_1.messageInfoRule)(`Slider werden angepasst...`),
91
- (0, files_1.replaceRule)(options, 'Attribut "luxShowThumbLabelAlways" wird entfernt...', 'Attribut "luxShowThumbLabelAlways" wurde entfernt.', '.html', new replace_item_1.RemoveHtmlTagAttributeItem('lux-slider-ac', 'luxShowThumbLabelAlways')),
92
- (0, files_1.replaceRule)(options, 'Attribut "luxVertical" wird entfernt...', 'Attribut "luxVertical" wurde entfernt.', '.html', new replace_item_1.RemoveHtmlTagAttributeItem('lux-slider-ac', 'luxVertical')),
93
- (0, files_1.replaceRule)(options, 'Attribut "luxInvert" wird entfernt...', 'Attribut "luxInvert" wurde entfernt.', '.html', new replace_item_1.RemoveHtmlTagAttributeItem('lux-slider-ac', 'luxInvert')),
94
- (0, files_1.replaceRule)(options, 'Attribut "luxTickInterval" wird entfernt...', 'Attribut "luxTickInterval" wurde entfernt.', '.html', new replace_item_1.RemoveHtmlTagAttributeItem('lux-slider-ac', 'luxTickInterval')),
95
- (0, util_1.messageSuccessRule)(`Slider wurden angepasst.`)
96
- ]);
97
- };
98
- }
99
- function updateAngularJson(options) {
100
- return (_tree, _context) => {
101
- return (0, schematics_1.chain)([
102
- (0, util_1.messageInfoRule)(`angular.json wird angepasst...`),
103
- (0, files_1.replaceRule)(options, 'Attribut "browserTarget" wird umbenannt in "buildTarget"...', 'Attribut "luxOptionMultiline" wurde entfernt.', 'angular.json', new replace_item_1.ReplaceItem('browserTarget', 'buildTarget', true)),
104
- (0, util_1.messageSuccessRule)(`angular.json wurde angepasst.`)
105
- ]);
106
- };
107
- }
108
- function updateStylesScss(options) {
109
- return (_tree, _context) => {
110
- return (0, schematics_1.chain)([
111
- (0, util_1.messageInfoRule)(`styles.scss wird angepasst...`),
112
- (0, files_1.replaceRule)(options, 'Import wird geprüft...', 'Import wurde geprüft.', 'styles.scss', new replace_item_1.ReplaceItem(`@import '@ihk-gfi`, `@import '../node_modules/@ihk-gfi`, true), new replace_item_1.ReplaceItem(`@import "@ihk-gfi`, `@import "../node_modules/@ihk-gfi`, true)),
113
- (0, util_1.messageSuccessRule)(`styles.scss wurde angepasst.`)
114
- ]);
115
- };
116
- }
117
- function updateStylesCss(options) {
118
- return (_tree, _context) => {
119
- return (0, schematics_1.chain)([
120
- (0, util_1.messageInfoRule)(`styles.css wird angepasst...`),
121
- (0, files_1.replaceRule)(options, 'Import wird geprüft...', 'Import wurde geprüft.', 'styles.css', new replace_item_1.ReplaceItem(`@import '@ihk-gfi`, `@import '../node_modules/@ihk-gfi`, true), new replace_item_1.ReplaceItem(`@import "@ihk-gfi`, `@import "../node_modules/@ihk-gfi`, true)),
122
- (0, util_1.messageSuccessRule)(`styles.css wurde angepasst.`)
123
- ]);
124
- };
125
- }
@@ -1,2 +0,0 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
- export declare function update180100(_options: any, runNpmInstall?: boolean): Rule;
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.update180100 = update180100;
4
- const schematics_1 = require("@angular-devkit/schematics");
5
- const chalk = require("chalk");
6
- const index_1 = require("../../update-dependencies/index");
7
- const util_1 = require("../../utility/util");
8
- function update180100(_options, runNpmInstall = true) {
9
- return (_tree, _context) => {
10
- return (0, schematics_1.chain)([
11
- (0, util_1.messageInfoRule)(`Die LUX-Components werden auf die Version 18.1.0 aktualisiert...`),
12
- (0, util_1.messageInfoRule)(`Die Datei "package.json" wird angepasst...`),
13
- (0, index_1.updateDep)('@ihk-gfi/lux-components', '18.1.0', false),
14
- (0, index_1.updateDep)('@ihk-gfi/lux-components-theme', '18.1.0', false),
15
- (0, util_1.messageSuccessRule)(`Die LUX-Components wurden auf die Version 18.1.0 aktualisiert.`),
16
- (0, util_1.finish)(runNpmInstall, `${chalk.yellowBright('Fertig!')}`)
17
- ]);
18
- };
19
- }
@@ -1,23 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/schema",
3
- "$id": "luxupdate180100Schema",
4
- "title": "Aktualisiert das LUX-Componentsprojekt",
5
- "type": "object",
6
- "description": "Aktualisiert das LUX-Componentsprojekt",
7
- "properties": {
8
- "project": {
9
- "type": "string",
10
- "description": "Der Projektname",
11
- "$default": {
12
- "$source": "projectName"
13
- }
14
- },
15
- "verbose": {
16
- "type": "boolean",
17
- "description": "Generiert mehr Logausgaben",
18
- "default": false
19
- }
20
- },
21
- "required": [],
22
- "additionalProperties": false
23
- }
@@ -1,5 +0,0 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
- export declare function update180200(_options: any, runNpmInstall?: boolean): Rule;
3
- export declare function updateI18NFiles(): Rule;
4
- export declare const i18nDe = "<trans-unit id=\"luxc.progress.arialabel\" datatype=\"html\">\n <source>Ladeanzeige</source>\n <context-group purpose=\"location\">\n <context context-type=\"sourcefile\">node_modules/@ihk-gfi/src/app/modules/lux-common/lux-progress/lux-progress.component.ts</context>\n <context context-type=\"linenumber\">24</context>\n </context-group>\n </trans-unit>";
5
- export declare const i18nEn = "<trans-unit id=\"luxc.progress.arialabel\" datatype=\"html\">\n <source>Ladeanzeige</source>\n <target>Loading indicator</target>\n <context-group purpose=\"location\">\n <context context-type=\"sourcefile\">node_modules/@ihk-gfi/src/app/modules/lux-common/lux-progress/lux-progress.component.ts</context>\n <context context-type=\"linenumber\">24</context>\n </context-group>\n </trans-unit>";