@ihk-gfi/lux-components-update 13.3.0 → 14.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.
- package/README.md +2 -2
- package/package.json +10 -8
- package/src/add-lux-components/files/app/app-routing.module.ts +2 -0
- package/src/add-lux-components/files/app/app.component.html +7 -2
- package/src/add-lux-components/files/app/app.component.ts +9 -1
- package/src/add-lux-components/files/app/app.module.ts +6 -1
- package/src/add-lux-components/files/app/base/license-hint/license-hint.component.html +7 -0
- package/src/add-lux-components/files/app/base/license-hint/license-hint.component.ts +18 -0
- package/src/add-lux-components/files/app/home/home.component.scss +3 -0
- package/src/add-lux-components/files/assets/svg/Example.svg +6 -0
- package/src/add-lux-components/files/assets/svg/android.svg +2 -0
- package/src/add-lux-components/files/assets/svg/box.svg +690 -0
- package/src/add-lux-components/files/assets/svg/demoAppLogo.svg +1 -0
- package/src/add-lux-components/files/assets/svg/red_power_button.svg +67 -0
- package/src/add-lux-components/files/assets/svg/svg2009.svg +57457 -0
- package/src/add-lux-components/files/environments/environment.ts +2 -2
- package/src/add-lux-components/files/locale/messages.en.xlf +544 -373
- package/src/add-lux-components/files/locale/messages.xlf +517 -352
- package/src/add-lux-components/files/src/polyfills.ts +29 -39
- package/src/add-lux-components/index.d.ts +1 -1
- package/src/add-lux-components/index.js +47 -26
- package/src/add-lux-components/index.js.map +1 -1
- package/src/add-lux-components/index.ts +50 -31
- package/src/add-lux-components/index_spec.js +3 -3
- package/src/add-lux-components/index_spec.ts +1 -1
- package/src/collection.json +13 -19
- package/src/theme/change-theme-to-authentic/index.d.ts +4 -0
- package/src/theme/change-theme-to-authentic/index.js +129 -0
- package/src/theme/change-theme-to-authentic/index.js.map +1 -0
- package/src/theme/change-theme-to-authentic/index.ts +131 -0
- package/src/{updates/update130000 → theme/change-theme-to-authentic}/index_spec.d.ts +0 -0
- package/src/theme/change-theme-to-authentic/index_spec.js +300 -0
- package/src/theme/change-theme-to-authentic/index_spec.js.map +1 -0
- package/src/theme/change-theme-to-authentic/index_spec.ts +321 -0
- package/src/{updates/update130300 → theme/change-theme-to-authentic}/schema.json +3 -3
- package/src/theme/change-to-lux-icons/index.d.ts +7 -0
- package/src/theme/change-to-lux-icons/index.js +395 -0
- package/src/theme/change-to-lux-icons/index.js.map +1 -0
- package/src/theme/change-to-lux-icons/index.ts +406 -0
- package/src/{updates/update130100 → theme/change-to-lux-icons}/index_spec.d.ts +0 -0
- package/src/theme/change-to-lux-icons/index_spec.js +214 -0
- package/src/theme/change-to-lux-icons/index_spec.js.map +1 -0
- package/src/theme/change-to-lux-icons/index_spec.ts +220 -0
- package/src/{updates/update130200 → theme/change-to-lux-icons}/schema.json +3 -3
- package/src/update-dependencies/index.d.ts +0 -3
- package/src/update-dependencies/index.js +68 -116
- package/src/update-dependencies/index.js.map +1 -1
- package/src/update-dependencies/index.ts +73 -122
- package/src/update-en-messages/index.js +18 -15
- package/src/update-en-messages/index.js.map +1 -1
- package/src/update-en-messages/index.ts +22 -16
- package/src/updates/update140000/files/src/polyfills.ts +70 -0
- package/src/updates/update140000/index.d.ts +8 -0
- package/src/updates/update140000/index.js +83 -0
- package/src/updates/update140000/index.js.map +1 -0
- package/src/updates/update140000/index.ts +97 -0
- package/src/updates/{update130200 → update140000}/index_spec.d.ts +0 -0
- package/src/updates/update140000/index_spec.js +77 -0
- package/src/updates/update140000/index_spec.js.map +1 -0
- package/src/updates/update140000/index_spec.ts +79 -0
- package/src/updates/{update130000 → update140000}/schema.json +0 -0
- package/src/utility/files.d.ts +2 -2
- package/src/utility/files.js +5 -5
- package/src/utility/files.js.map +1 -1
- package/src/utility/files.ts +5 -5
- package/src/utility/html/hit.d.ts +21 -0
- package/src/utility/html/hit.js +27 -0
- package/src/utility/html/hit.js.map +1 -0
- package/src/utility/html/hit.ts +28 -0
- package/src/utility/html/html-manipulator.d.ts +71 -0
- package/src/utility/html/html-manipulator.js +136 -0
- package/src/utility/html/html-manipulator.js.map +1 -0
- package/src/utility/html/html-manipulator.ts +156 -0
- package/src/utility/{html_spec.d.ts → html/html_spec.d.ts} +0 -0
- package/src/utility/{html_spec.js → html/html_spec.js} +232 -100
- package/src/utility/html/html_spec.js.map +1 -0
- package/src/utility/{html_spec.ts → html/html_spec.ts} +282 -106
- package/src/utility/html/manipulator-functions.d.ts +99 -0
- package/src/utility/html/manipulator-functions.js +147 -0
- package/src/utility/html/manipulator-functions.js.map +1 -0
- package/src/utility/html/manipulator-functions.ts +149 -0
- package/src/utility/json.d.ts +2 -2
- package/src/utility/json.js +11 -7
- package/src/utility/json.js.map +1 -1
- package/src/utility/json.ts +42 -26
- package/src/utility/json_spec.js +18 -18
- package/src/utility/json_spec.js.map +1 -1
- package/src/utility/json_spec.ts +136 -66
- package/src/utility/typescript.d.ts +3 -3
- package/src/utility/typescript.js +2 -2
- package/src/utility/typescript.js.map +1 -1
- package/src/utility/typescript.ts +3 -3
- package/src/utility/typescript_spec.js +0 -1
- package/src/utility/typescript_spec.js.map +1 -1
- package/src/utility/typescript_spec.ts +0 -2
- package/src/utility/util.d.ts +7 -6
- package/src/utility/util.js +12 -8
- package/src/utility/util.js.map +1 -1
- package/src/utility/util.ts +13 -10
- package/src/utility/validation.d.ts +2 -3
- package/src/utility/validation.js +2 -3
- package/src/utility/validation.js.map +1 -1
- package/src/utility/validation.ts +2 -3
- package/tsconfig.json +5 -7
- package/src/add-lux-components/files/scripts/.browserslistrc +0 -20
- package/src/updates/update130000/files/root/.browserslistrc +0 -20
- package/src/updates/update130000/index.d.ts +0 -27
- package/src/updates/update130000/index.js +0 -310
- package/src/updates/update130000/index.js.map +0 -1
- package/src/updates/update130000/index.ts +0 -362
- package/src/updates/update130000/index_spec.js +0 -584
- package/src/updates/update130000/index_spec.js.map +0 -1
- package/src/updates/update130000/index_spec.ts +0 -675
- package/src/updates/update130100/index.d.ts +0 -2
- package/src/updates/update130100/index.js +0 -27
- package/src/updates/update130100/index.js.map +0 -1
- package/src/updates/update130100/index.ts +0 -27
- package/src/updates/update130100/index_spec.js +0 -65
- package/src/updates/update130100/index_spec.js.map +0 -1
- package/src/updates/update130100/index_spec.ts +0 -69
- package/src/updates/update130100/schema.json +0 -23
- package/src/updates/update130200/index.d.ts +0 -2
- package/src/updates/update130200/index.js +0 -43
- package/src/updates/update130200/index.js.map +0 -1
- package/src/updates/update130200/index.ts +0 -41
- package/src/updates/update130200/index_spec.js +0 -106
- package/src/updates/update130200/index_spec.js.map +0 -1
- package/src/updates/update130200/index_spec.ts +0 -110
- package/src/updates/update130300/index.d.ts +0 -2
- package/src/updates/update130300/index.js +0 -35
- package/src/updates/update130300/index.js.map +0 -1
- package/src/updates/update130300/index.ts +0 -32
- package/src/updates/update130300/index_spec.d.ts +0 -1
- package/src/updates/update130300/index_spec.js +0 -85
- package/src/updates/update130300/index_spec.js.map +0 -1
- package/src/updates/update130300/index_spec.ts +0 -89
- package/src/utility/html.d.ts +0 -49
- package/src/utility/html.js +0 -246
- package/src/utility/html.js.map +0 -1
- package/src/utility/html.ts +0 -288
- package/src/utility/html_spec.js.map +0 -1
|
@@ -13,56 +13,46 @@ import '@angular/localize/init';
|
|
|
13
13
|
* file.
|
|
14
14
|
*
|
|
15
15
|
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
|
16
|
-
* automatically update themselves. This includes
|
|
17
|
-
* Edge
|
|
16
|
+
* automatically update themselves. This includes recent versions of Safari, Chrome (including
|
|
17
|
+
* Opera), Edge on the desktop, and iOS and Chrome on mobile.
|
|
18
18
|
*
|
|
19
19
|
* Learn more in https://angular.io/guide/browser-support
|
|
20
20
|
*/
|
|
21
|
+
|
|
21
22
|
/***************************************************************************************************
|
|
22
23
|
* BROWSER POLYFILLS
|
|
23
24
|
*/
|
|
24
|
-
import 'core-js/es/array';
|
|
25
|
-
import 'core-js/es/date';
|
|
26
|
-
import 'core-js/es/function';
|
|
27
|
-
import 'core-js/es/map';
|
|
28
|
-
import 'core-js/es/math';
|
|
29
|
-
import 'core-js/es/number';
|
|
30
|
-
import 'core-js/es/object';
|
|
31
|
-
import 'core-js/es/parse-float';
|
|
32
|
-
import 'core-js/es/parse-int';
|
|
33
|
-
import 'core-js/es/reflect';
|
|
34
|
-
/** Evergreen browsers require these. */
|
|
35
|
-
import 'core-js/es/regexp';
|
|
36
|
-
import 'core-js/es/set';
|
|
37
|
-
import 'core-js/es/string';
|
|
38
|
-
/** IE9, IE10 and IE11 requires all of the following polyfills. */
|
|
39
|
-
import 'core-js/es/symbol';
|
|
40
|
-
import 'core-js/es/weak-map';
|
|
41
|
-
import 'core-js/es/weak-set';
|
|
42
|
-
/***************************************************************************************************
|
|
43
|
-
* Zone JS is required by Angular itself.
|
|
44
|
-
*/
|
|
45
|
-
import 'zone.js/dist/zone'; // Included with Angular CLI.
|
|
46
|
-
|
|
47
|
-
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
|
|
48
|
-
// import 'classlist.js'; // Run `npm install --save classlist.js`.
|
|
49
25
|
|
|
50
26
|
/**
|
|
51
|
-
*
|
|
52
|
-
*
|
|
27
|
+
* By default, zone.js will patch all possible macroTask and DomEvents
|
|
28
|
+
* user can disable parts of macroTask/DomEvents patch by setting following flags
|
|
29
|
+
* because those flags need to be set before `zone.js` being loaded, and webpack
|
|
30
|
+
* will put import in the top of bundle, so user need to create a separate file
|
|
31
|
+
* in this directory (for example: zone-flags.ts), and put the following flags
|
|
32
|
+
* into that file, and then add the following code before importing zone.js.
|
|
33
|
+
* import './zone-flags';
|
|
34
|
+
*
|
|
35
|
+
* The flags allowed in zone-flags.ts are listed here.
|
|
36
|
+
*
|
|
37
|
+
* The following flags will work for all browsers.
|
|
38
|
+
*
|
|
39
|
+
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
|
|
40
|
+
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
|
|
41
|
+
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
|
|
42
|
+
*
|
|
43
|
+
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
|
|
44
|
+
* with the following flag, it will bypass `zone.js` patch for IE/Edge
|
|
45
|
+
*
|
|
46
|
+
* (window as any).__Zone_enable_cross_context_check = true;
|
|
47
|
+
*
|
|
53
48
|
*/
|
|
54
|
-
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
|
55
49
|
|
|
56
50
|
/***************************************************************************************************
|
|
57
|
-
*
|
|
51
|
+
* Zone JS is required by default for Angular itself.
|
|
58
52
|
*/
|
|
53
|
+
import 'zone.js'; // Included with Angular CLI.
|
|
59
54
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
*
|
|
63
|
-
*/
|
|
64
|
-
// import 'intl'; // Run `npm install --save intl`.
|
|
65
|
-
/**
|
|
66
|
-
* Need to import at least one locale-data with intl.
|
|
55
|
+
|
|
56
|
+
/***************************************************************************************************
|
|
57
|
+
* APPLICATION IMPORTS
|
|
67
58
|
*/
|
|
68
|
-
// import 'intl/locale-data/jsonp/en';
|
|
@@ -4,7 +4,7 @@ export declare function addLuxComponents(options: any): Rule;
|
|
|
4
4
|
* Prüft ob die Versionen des Projekts mit den erforderlichen Versionen dieses Updates übereinstimmen.
|
|
5
5
|
*/
|
|
6
6
|
export declare function check(): Rule;
|
|
7
|
-
export declare function updatePackageJson(
|
|
7
|
+
export declare function updatePackageJson(_options: any): Rule;
|
|
8
8
|
export declare function updateIndexHtml(options: any): Rule;
|
|
9
9
|
export declare function copyAppFiles(options: any): Rule;
|
|
10
10
|
export declare function updateApp(options: any): Rule;
|
|
@@ -5,14 +5,14 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
|
5
5
|
const chalk = require("chalk");
|
|
6
6
|
const jsonc_parser_1 = require("jsonc-parser");
|
|
7
7
|
const index_1 = require("../update-dependencies/index");
|
|
8
|
-
const index_2 = require("../updates/
|
|
8
|
+
const index_2 = require("../updates/update140000/index");
|
|
9
9
|
const files_1 = require("../utility/files");
|
|
10
10
|
const json_1 = require("../utility/json");
|
|
11
11
|
const logging_1 = require("../utility/logging");
|
|
12
12
|
const util_1 = require("../utility/util");
|
|
13
13
|
const validation_1 = require("../utility/validation");
|
|
14
14
|
function addLuxComponents(options) {
|
|
15
|
-
return (
|
|
15
|
+
return (_tree, _context) => {
|
|
16
16
|
const jsonPathAllowedCommonJS = ['projects', options.project, 'architect', 'build', 'options', 'allowedCommonJsDependencies'];
|
|
17
17
|
const jsonPathBudget = ['projects', options.project, 'architect', 'build', 'configurations', 'production', 'budgets'];
|
|
18
18
|
const budgetValue = {
|
|
@@ -47,6 +47,11 @@ function addLuxComponents(options) {
|
|
|
47
47
|
glob: "*(*.eot|*.ttf|*.woff|*.woff2)",
|
|
48
48
|
input: "./node_modules/material-design-icons-iconfont/dist/fonts",
|
|
49
49
|
output: "./assets/icons/material-icons/fonts"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
glob: "**/*",
|
|
53
|
+
input: "./node_modules/@ihk-gfi/lux-components-icons-and-fonts/assets/icons/",
|
|
54
|
+
output: "./assets/icons"
|
|
50
55
|
}
|
|
51
56
|
];
|
|
52
57
|
const jsonPathOptimization = ['projects', options.project, 'architect', 'build', 'configurations', 'production', 'optimization'];
|
|
@@ -58,6 +63,16 @@ function addLuxComponents(options) {
|
|
|
58
63
|
},
|
|
59
64
|
"fonts": true
|
|
60
65
|
};
|
|
66
|
+
const jsonPathLang = ['projects', options.project, 'i18n'];
|
|
67
|
+
const jsonValueLang = {
|
|
68
|
+
"sourceLocale": {
|
|
69
|
+
"code": "de",
|
|
70
|
+
"baseHref": "/"
|
|
71
|
+
},
|
|
72
|
+
"locales": {
|
|
73
|
+
"en": "src/locale/messages.en.xlf"
|
|
74
|
+
}
|
|
75
|
+
};
|
|
61
76
|
const findBudgetFn = (node) => (0, json_1.findObjectPropertyInArray)(node, 'type', 'initial');
|
|
62
77
|
return (0, schematics_1.chain)([
|
|
63
78
|
check(),
|
|
@@ -65,25 +80,28 @@ function addLuxComponents(options) {
|
|
|
65
80
|
updatePackageJson(options),
|
|
66
81
|
(0, index_1.updateDependencies)(),
|
|
67
82
|
updateIndexHtml(options),
|
|
68
|
-
(0, index_2.copyFiles)(options),
|
|
69
83
|
updateApp(options),
|
|
70
|
-
(0, json_1.updateJsonValue)(
|
|
71
|
-
(0, json_1.updateJsonValue)(
|
|
72
|
-
(0, json_1.
|
|
73
|
-
(0, json_1.updateJsonArray)(
|
|
74
|
-
(0, json_1.updateJsonArray)(
|
|
75
|
-
(0, json_1.updateJsonArray)(
|
|
76
|
-
(0, json_1.updateJsonArray)(
|
|
77
|
-
(0, json_1.updateJsonArray)(
|
|
78
|
-
(0, json_1.updateJsonArray)(
|
|
79
|
-
(0, json_1.updateJsonArray)(
|
|
80
|
-
(0, json_1.updateJsonArray)(
|
|
81
|
-
(0, json_1.updateJsonArray)(
|
|
82
|
-
(0, json_1.updateJsonArray)(
|
|
83
|
-
(0, json_1.updateJsonArray)(
|
|
84
|
-
(0, json_1.updateJsonArray)(
|
|
85
|
-
(0, json_1.updateJsonArray)(
|
|
86
|
-
(0,
|
|
84
|
+
(0, json_1.updateJsonValue)('/tsconfig.json', ['compilerOptions', 'strict'], true),
|
|
85
|
+
(0, json_1.updateJsonValue)('/angular.json', jsonPathLang, jsonValueLang),
|
|
86
|
+
(0, json_1.updateJsonValue)('/angular.json', jsonPathOptimization, jsonValueOptimization),
|
|
87
|
+
(0, json_1.updateJsonArray)('/angular.json', jsonPathBudget, budgetValue, true, findBudgetFn),
|
|
88
|
+
(0, json_1.updateJsonArray)('/angular.json', jsonPathAssetsBuild, assetsValues[0]),
|
|
89
|
+
(0, json_1.updateJsonArray)('/angular.json', jsonPathAssetsTest, assetsValues[0]),
|
|
90
|
+
(0, json_1.updateJsonArray)('/angular.json', jsonPathAssetsBuild, assetsValues[1]),
|
|
91
|
+
(0, json_1.updateJsonArray)('/angular.json', jsonPathAssetsTest, assetsValues[1]),
|
|
92
|
+
(0, json_1.updateJsonArray)('/angular.json', jsonPathAssetsBuild, assetsValues[2]),
|
|
93
|
+
(0, json_1.updateJsonArray)('/angular.json', jsonPathAssetsTest, assetsValues[2]),
|
|
94
|
+
(0, json_1.updateJsonArray)('/angular.json', jsonPathAssetsBuild, assetsValues[3]),
|
|
95
|
+
(0, json_1.updateJsonArray)('/angular.json', jsonPathAssetsTest, assetsValues[3]),
|
|
96
|
+
(0, json_1.updateJsonArray)('/angular.json', jsonPathAssetsBuild, assetsValues[4]),
|
|
97
|
+
(0, json_1.updateJsonArray)('/angular.json', jsonPathAssetsTest, assetsValues[4]),
|
|
98
|
+
(0, json_1.updateJsonArray)('/angular.json', jsonPathAssetsBuild, assetsValues[5]),
|
|
99
|
+
(0, json_1.updateJsonArray)('/angular.json', jsonPathAssetsTest, assetsValues[5]),
|
|
100
|
+
(0, json_1.updateJsonArray)('/angular.json', jsonPathAllowedCommonJS, 'hammerjs'),
|
|
101
|
+
(0, json_1.updateJsonArray)('/angular.json', jsonPathAllowedCommonJS, 'ng2-pdf-viewer'),
|
|
102
|
+
(0, json_1.updateJsonArray)('/angular.json', jsonPathAllowedCommonJS, 'pdfjs-dist'),
|
|
103
|
+
(0, json_1.updateJsonArray)('/angular.json', jsonPathAllowedCommonJS, 'dompurify'),
|
|
104
|
+
(0, util_1.finish)(false, `Die LUX-Components ${index_2.updateMajorVersion} wurden erfolgreich eingerichtet.`, `${chalk.yellowBright('Fertig!')}`)
|
|
87
105
|
]);
|
|
88
106
|
};
|
|
89
107
|
}
|
|
@@ -94,17 +112,17 @@ exports.addLuxComponents = addLuxComponents;
|
|
|
94
112
|
function check() {
|
|
95
113
|
return (tree, context) => {
|
|
96
114
|
return (0, util_1.waitForTreeCallback)(tree, () => {
|
|
97
|
-
(0, validation_1.validateAngularVersion)(tree,
|
|
115
|
+
(0, validation_1.validateAngularVersion)(tree, `^${+index_2.updateMajorVersion}.0.0`);
|
|
98
116
|
(0, validation_1.validateNodeVersion)(context, index_2.updateNodeMinVersion);
|
|
99
117
|
return tree;
|
|
100
118
|
});
|
|
101
119
|
};
|
|
102
120
|
}
|
|
103
121
|
exports.check = check;
|
|
104
|
-
function updatePackageJson(
|
|
122
|
+
function updatePackageJson(_options) {
|
|
105
123
|
return (0, schematics_1.chain)([
|
|
106
124
|
(0, util_1.messageInfoRule)(`package.json wird aktualisiert...`),
|
|
107
|
-
(tree,
|
|
125
|
+
(tree, _context) => {
|
|
108
126
|
const filePath = `/package.json`;
|
|
109
127
|
const newValuesArr = [
|
|
110
128
|
{
|
|
@@ -150,7 +168,7 @@ exports.updatePackageJson = updatePackageJson;
|
|
|
150
168
|
function updateIndexHtml(options) {
|
|
151
169
|
return (0, schematics_1.chain)([
|
|
152
170
|
(0, util_1.messageInfoRule)(`index.html wird aktualisiert...`),
|
|
153
|
-
(tree,
|
|
171
|
+
(tree, _context) => {
|
|
154
172
|
(0, files_1.iterateFilesAndModifyContent)(tree, options.path, (filePath, content) => {
|
|
155
173
|
let modifiedContent = (0, util_1.replaceAll)(content, '<body>', '<body style="margin: 0">');
|
|
156
174
|
if (content !== modifiedContent) {
|
|
@@ -166,7 +184,10 @@ function copyAppFiles(options) {
|
|
|
166
184
|
return (0, schematics_1.chain)([
|
|
167
185
|
(0, util_1.messageInfoRule)(`App-Dateien werden angelegt...`),
|
|
168
186
|
(0, files_1.moveFilesToDirectory)(options, 'files/app', 'src/app'),
|
|
187
|
+
(0, files_1.moveFilesToDirectory)(options, 'files/assets', 'src/assets'),
|
|
169
188
|
(0, files_1.moveFilesToDirectory)(options, 'files/environments', 'src/environments'),
|
|
189
|
+
(0, files_1.moveFilesToDirectory)(options, 'files/locale', '/src/locale'),
|
|
190
|
+
(0, files_1.moveFilesToDirectory)(options, 'files/root', '/'),
|
|
170
191
|
(0, files_1.moveFilesToDirectory)(options, 'files/scripts', '/'),
|
|
171
192
|
(0, files_1.moveFilesToDirectory)(options, 'files/src', '/src'),
|
|
172
193
|
(0, util_1.messageSuccessRule)(`App-Dateien wurden angelegt.`)
|
|
@@ -176,7 +197,7 @@ exports.copyAppFiles = copyAppFiles;
|
|
|
176
197
|
function updateApp(options) {
|
|
177
198
|
return (0, schematics_1.chain)([
|
|
178
199
|
(0, util_1.messageInfoRule)(`App-Dateien wird angepasst...`),
|
|
179
|
-
(tree,
|
|
200
|
+
(tree, _context) => {
|
|
180
201
|
const filePath = `/package.json`;
|
|
181
202
|
const newValuesArr = [
|
|
182
203
|
{
|
|
@@ -205,7 +226,7 @@ function updateApp(options) {
|
|
|
205
226
|
(0, json_1.readJson)(tree, filePath);
|
|
206
227
|
return tree;
|
|
207
228
|
},
|
|
208
|
-
(tree,
|
|
229
|
+
(tree, _context) => {
|
|
209
230
|
const filePath = `/angular.json`;
|
|
210
231
|
const newValuesArr = [
|
|
211
232
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,2DAAiF;AACjF,+BAA+B;AAC/B,+
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,2DAAiF;AACjF,+BAA+B;AAC/B,+CAA8D;AAC9D,wDAAkE;AAClE,yDAGuC;AACvC,4CAAsF;AACtF,0CAOyB;AACzB,gDAA6C;AAC7C,0CAA+G;AAC/G,sDAAoF;AAEpF,SAAgB,gBAAgB,CAAC,OAAY;IAC3C,OAAO,CAAC,KAAW,EAAE,QAA0B,EAAE,EAAE;QACjD,MAAM,uBAAuB,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,6BAA6B,CAAC,CAAC;QAC9H,MAAM,cAAc,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;QACtH,MAAM,WAAW,GAAG;YAClB,MAAM,EAAE,SAAS;YACjB,gBAAgB,EAAE,KAAK;YACvB,cAAc,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AC1B,CAAC,CAAC,CAAC;YAEH,IAAA,eAAQ,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;YAEzB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IAAA,yBAAkB,EAAC,sBAAsB,CAAC;KAC3C,CAAC,CAAC;AACL,CAAC;AAlED,8BAkEC"}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { chain, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
|
|
2
2
|
import * as chalk from 'chalk';
|
|
3
|
-
import { applyEdits, Edit, modify } from 'jsonc-parser';
|
|
3
|
+
import { applyEdits, Edit, modify, Node } from 'jsonc-parser';
|
|
4
4
|
import { updateDependencies } from '../update-dependencies/index';
|
|
5
5
|
import {
|
|
6
|
-
updateBuildThemeAssets,
|
|
7
|
-
copyFiles,
|
|
8
6
|
updateMajorVersion,
|
|
9
7
|
updateNodeMinVersion,
|
|
10
|
-
|
|
11
|
-
} from '../updates/update130000/index';
|
|
8
|
+
} from '../updates/update140000/index';
|
|
12
9
|
import { iterateFilesAndModifyContent, moveFilesToDirectory } from '../utility/files';
|
|
13
10
|
import {
|
|
14
11
|
findObjectPropertyInArray,
|
|
@@ -23,7 +20,7 @@ import { finish, messageInfoRule, messageSuccessRule, replaceAll, waitForTreeCal
|
|
|
23
20
|
import { validateAngularVersion, validateNodeVersion } from '../utility/validation';
|
|
24
21
|
|
|
25
22
|
export function addLuxComponents(options: any): Rule {
|
|
26
|
-
return (
|
|
23
|
+
return (_tree: Tree, _context: SchematicContext) => {
|
|
27
24
|
const jsonPathAllowedCommonJS = ['projects', options.project, 'architect', 'build', 'options', 'allowedCommonJsDependencies'];
|
|
28
25
|
const jsonPathBudget = ['projects', options.project, 'architect', 'build', 'configurations', 'production', 'budgets'];
|
|
29
26
|
const budgetValue = {
|
|
@@ -59,6 +56,11 @@ export function addLuxComponents(options: any): Rule {
|
|
|
59
56
|
glob: "*(*.eot|*.ttf|*.woff|*.woff2)",
|
|
60
57
|
input: "./node_modules/material-design-icons-iconfont/dist/fonts",
|
|
61
58
|
output: "./assets/icons/material-icons/fonts"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
glob: "**/*",
|
|
62
|
+
input: "./node_modules/@ihk-gfi/lux-components-icons-and-fonts/assets/icons/",
|
|
63
|
+
output: "./assets/icons"
|
|
62
64
|
}
|
|
63
65
|
];
|
|
64
66
|
|
|
@@ -72,7 +74,18 @@ export function addLuxComponents(options: any): Rule {
|
|
|
72
74
|
"fonts": true
|
|
73
75
|
};
|
|
74
76
|
|
|
75
|
-
const
|
|
77
|
+
const jsonPathLang = ['projects', options.project, 'i18n'];
|
|
78
|
+
const jsonValueLang = {
|
|
79
|
+
"sourceLocale": {
|
|
80
|
+
"code": "de",
|
|
81
|
+
"baseHref": "/"
|
|
82
|
+
},
|
|
83
|
+
"locales": {
|
|
84
|
+
"en": "src/locale/messages.en.xlf"
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const findBudgetFn = (node: Node) => findObjectPropertyInArray(node, 'type', 'initial');
|
|
76
89
|
|
|
77
90
|
return chain([
|
|
78
91
|
check(),
|
|
@@ -81,26 +94,29 @@ export function addLuxComponents(options: any): Rule {
|
|
|
81
94
|
updateDependencies(),
|
|
82
95
|
|
|
83
96
|
updateIndexHtml(options),
|
|
84
|
-
copyFiles(options),
|
|
85
97
|
updateApp(options),
|
|
86
|
-
updateJsonValue(
|
|
87
|
-
updateJsonValue(
|
|
88
|
-
|
|
89
|
-
updateJsonArray(
|
|
90
|
-
updateJsonArray(
|
|
91
|
-
updateJsonArray(
|
|
92
|
-
updateJsonArray(
|
|
93
|
-
updateJsonArray(
|
|
94
|
-
updateJsonArray(
|
|
95
|
-
updateJsonArray(
|
|
96
|
-
updateJsonArray(
|
|
97
|
-
updateJsonArray(
|
|
98
|
-
updateJsonArray(
|
|
99
|
-
updateJsonArray(
|
|
100
|
-
updateJsonArray(
|
|
101
|
-
updateJsonArray(
|
|
98
|
+
updateJsonValue('/tsconfig.json', ['compilerOptions', 'strict'], true),
|
|
99
|
+
updateJsonValue('/angular.json', jsonPathLang, jsonValueLang),
|
|
100
|
+
updateJsonValue('/angular.json', jsonPathOptimization, jsonValueOptimization),
|
|
101
|
+
updateJsonArray('/angular.json', jsonPathBudget, budgetValue, true, findBudgetFn),
|
|
102
|
+
updateJsonArray('/angular.json', jsonPathAssetsBuild, assetsValues[0]),
|
|
103
|
+
updateJsonArray('/angular.json', jsonPathAssetsTest, assetsValues[0]),
|
|
104
|
+
updateJsonArray('/angular.json', jsonPathAssetsBuild, assetsValues[1]),
|
|
105
|
+
updateJsonArray('/angular.json', jsonPathAssetsTest, assetsValues[1]),
|
|
106
|
+
updateJsonArray('/angular.json', jsonPathAssetsBuild, assetsValues[2]),
|
|
107
|
+
updateJsonArray('/angular.json', jsonPathAssetsTest, assetsValues[2]),
|
|
108
|
+
updateJsonArray('/angular.json', jsonPathAssetsBuild, assetsValues[3]),
|
|
109
|
+
updateJsonArray('/angular.json', jsonPathAssetsTest, assetsValues[3]),
|
|
110
|
+
updateJsonArray('/angular.json', jsonPathAssetsBuild, assetsValues[4]),
|
|
111
|
+
updateJsonArray('/angular.json', jsonPathAssetsTest, assetsValues[4]),
|
|
112
|
+
updateJsonArray('/angular.json', jsonPathAssetsBuild, assetsValues[5]),
|
|
113
|
+
updateJsonArray('/angular.json', jsonPathAssetsTest, assetsValues[5]),
|
|
114
|
+
updateJsonArray('/angular.json', jsonPathAllowedCommonJS, 'hammerjs'),
|
|
115
|
+
updateJsonArray('/angular.json', jsonPathAllowedCommonJS, 'ng2-pdf-viewer'),
|
|
116
|
+
updateJsonArray('/angular.json', jsonPathAllowedCommonJS, 'pdfjs-dist'),
|
|
117
|
+
updateJsonArray('/angular.json', jsonPathAllowedCommonJS, 'dompurify'),
|
|
102
118
|
finish(
|
|
103
|
-
|
|
119
|
+
false,
|
|
104
120
|
`Die LUX-Components ${updateMajorVersion} wurden erfolgreich eingerichtet.`,
|
|
105
121
|
`${chalk.yellowBright('Fertig!')}`
|
|
106
122
|
)
|
|
@@ -114,7 +130,7 @@ export function addLuxComponents(options: any): Rule {
|
|
|
114
130
|
export function check(): Rule {
|
|
115
131
|
return (tree: Tree, context: SchematicContext) => {
|
|
116
132
|
return waitForTreeCallback(tree, () => {
|
|
117
|
-
validateAngularVersion(tree,
|
|
133
|
+
validateAngularVersion(tree, `^${ +updateMajorVersion }.0.0`);
|
|
118
134
|
validateNodeVersion(context, updateNodeMinVersion);
|
|
119
135
|
|
|
120
136
|
return tree;
|
|
@@ -122,10 +138,10 @@ export function check(): Rule {
|
|
|
122
138
|
};
|
|
123
139
|
}
|
|
124
140
|
|
|
125
|
-
export function updatePackageJson(
|
|
141
|
+
export function updatePackageJson(_options: any): Rule {
|
|
126
142
|
return chain([
|
|
127
143
|
messageInfoRule(`package.json wird aktualisiert...`),
|
|
128
|
-
(tree: Tree,
|
|
144
|
+
(tree: Tree, _context: SchematicContext) => {
|
|
129
145
|
const filePath = `/package.json`;
|
|
130
146
|
|
|
131
147
|
const newValuesArr = [
|
|
@@ -176,7 +192,7 @@ export function updatePackageJson(options: any): Rule {
|
|
|
176
192
|
export function updateIndexHtml(options: any): Rule {
|
|
177
193
|
return chain([
|
|
178
194
|
messageInfoRule(`index.html wird aktualisiert...`),
|
|
179
|
-
(tree: Tree,
|
|
195
|
+
(tree: Tree, _context: SchematicContext) => {
|
|
180
196
|
iterateFilesAndModifyContent(
|
|
181
197
|
tree,
|
|
182
198
|
options.path,
|
|
@@ -198,7 +214,10 @@ export function copyAppFiles(options: any): Rule {
|
|
|
198
214
|
return chain([
|
|
199
215
|
messageInfoRule(`App-Dateien werden angelegt...`),
|
|
200
216
|
moveFilesToDirectory(options, 'files/app', 'src/app'),
|
|
217
|
+
moveFilesToDirectory(options, 'files/assets', 'src/assets'),
|
|
201
218
|
moveFilesToDirectory(options, 'files/environments', 'src/environments'),
|
|
219
|
+
moveFilesToDirectory(options, 'files/locale', '/src/locale'),
|
|
220
|
+
moveFilesToDirectory(options, 'files/root', '/'),
|
|
202
221
|
moveFilesToDirectory(options, 'files/scripts', '/'),
|
|
203
222
|
moveFilesToDirectory(options, 'files/src', '/src'),
|
|
204
223
|
messageSuccessRule(`App-Dateien wurden angelegt.`)
|
|
@@ -208,7 +227,7 @@ export function copyAppFiles(options: any): Rule {
|
|
|
208
227
|
export function updateApp(options: any): Rule {
|
|
209
228
|
return chain([
|
|
210
229
|
messageInfoRule(`App-Dateien wird angepasst...`),
|
|
211
|
-
(tree: Tree,
|
|
230
|
+
(tree: Tree, _context: SchematicContext) => {
|
|
212
231
|
const filePath = `/package.json`;
|
|
213
232
|
|
|
214
233
|
const newValuesArr = [
|
|
@@ -243,7 +262,7 @@ export function updateApp(options: any): Rule {
|
|
|
243
262
|
|
|
244
263
|
return tree;
|
|
245
264
|
},
|
|
246
|
-
(tree: Tree,
|
|
265
|
+
(tree: Tree, _context: SchematicContext) => {
|
|
247
266
|
const filePath = `/angular.json`;
|
|
248
267
|
|
|
249
268
|
const newValuesArr = [
|
|
@@ -13,7 +13,7 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
|
13
13
|
const testing_1 = require("@angular-devkit/schematics/testing");
|
|
14
14
|
const path = require("path");
|
|
15
15
|
const rxjs_1 = require("rxjs");
|
|
16
|
-
const
|
|
16
|
+
const update140000_1 = require("../updates/update140000");
|
|
17
17
|
const dependencies_1 = require("../utility/dependencies");
|
|
18
18
|
const test_1 = require("../utility/test");
|
|
19
19
|
const util_1 = require("../utility/util");
|
|
@@ -40,9 +40,9 @@ describe('add-lux-components', () => {
|
|
|
40
40
|
}));
|
|
41
41
|
describe('[Rule] addLuxComponents', () => {
|
|
42
42
|
it('Sollte die LUX-Components im Projekt eingerichtet haben', (done) => {
|
|
43
|
-
(0, dependencies_1.updatePackageJsonDependency)(appTree, { type: dependencies_1.NodeDependencyType.Default, version:
|
|
43
|
+
(0, dependencies_1.updatePackageJsonDependency)(appTree, { type: dependencies_1.NodeDependencyType.Default, version: update140000_1.updateMajorVersion + '.0.0', name: '@angular/common' });
|
|
44
44
|
(0, schematics_1.callRule)((0, index_1.addLuxComponents)(testOptions), (0, rxjs_1.of)(appTree), context).subscribe(() => {
|
|
45
|
-
expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components').version).toContain(
|
|
45
|
+
expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components').version).toContain(update140000_1.updateMajorVersion);
|
|
46
46
|
done();
|
|
47
47
|
}, (reason) => expect(reason).toBeUndefined());
|
|
48
48
|
});
|
|
@@ -2,7 +2,7 @@ import { callRule, SchematicContext } from '@angular-devkit/schematics';
|
|
|
2
2
|
import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
|
|
3
3
|
import * as path from 'path';
|
|
4
4
|
import { of as observableOf } from 'rxjs';
|
|
5
|
-
import { updateMajorVersion } from '../updates/
|
|
5
|
+
import { updateMajorVersion } from '../updates/update140000';
|
|
6
6
|
import { getPackageJsonDependency, NodeDependencyType, updatePackageJsonDependency } from '../utility/dependencies';
|
|
7
7
|
import { appOptions, workspaceOptions } from '../utility/test';
|
|
8
8
|
import { UtilConfig } from '../utility/util';
|
package/src/collection.json
CHANGED
|
@@ -2,24 +2,9 @@
|
|
|
2
2
|
"$schema": "../node_modules/@angular-devkit/schematics/collection-schema.json",
|
|
3
3
|
"schematics": {
|
|
4
4
|
"update": {
|
|
5
|
-
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version
|
|
6
|
-
"factory": "./updates/
|
|
7
|
-
"schema": "./updates/
|
|
8
|
-
},
|
|
9
|
-
"update-13.3.0": {
|
|
10
|
-
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 13.3.0",
|
|
11
|
-
"factory": "./updates/update130300/index#update130300",
|
|
12
|
-
"schema": "./updates/update130300/schema.json"
|
|
13
|
-
},
|
|
14
|
-
"update-13.2.0": {
|
|
15
|
-
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 13.2.0",
|
|
16
|
-
"factory": "./updates/update130200/index#update130200",
|
|
17
|
-
"schema": "./updates/update130200/schema.json"
|
|
18
|
-
},
|
|
19
|
-
"update-13.1.0": {
|
|
20
|
-
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 13.1.0",
|
|
21
|
-
"factory": "./updates/update130100/index#update130100",
|
|
22
|
-
"schema": "./updates/update130100/schema.json"
|
|
5
|
+
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 14.0.0",
|
|
6
|
+
"factory": "./updates/update140000/index#update",
|
|
7
|
+
"schema": "./updates/update140000/schema.json"
|
|
23
8
|
},
|
|
24
9
|
"update-dependencies": {
|
|
25
10
|
"description": "Aktualisiert die Abhängigkeiten im LUX-Componentsprojekt",
|
|
@@ -28,13 +13,22 @@
|
|
|
28
13
|
},
|
|
29
14
|
"update-en-messages": {
|
|
30
15
|
"description": "Aktualisiert die englischen Übersetzungen im Projekt",
|
|
31
|
-
"factory": "./update-en-messages/index#updateEnMessages",
|
|
32
16
|
"schema": "./update-en-messages/schema.json"
|
|
33
17
|
},
|
|
34
18
|
"add-lux-components": {
|
|
35
19
|
"description": "Fügt die LUX-Components zum Projekt hinzu",
|
|
36
20
|
"factory": "./add-lux-components/index#addLuxComponents",
|
|
37
21
|
"schema": "./add-lux-components/schema.json"
|
|
22
|
+
},
|
|
23
|
+
"change-theme-to-authentic": {
|
|
24
|
+
"description": "Wechselt zum Authentic-Theme",
|
|
25
|
+
"factory": "./theme/change-theme-to-authentic/index#changeToThemeAuthentic",
|
|
26
|
+
"schema": "./theme/change-theme-to-authentic/schema.json"
|
|
27
|
+
},
|
|
28
|
+
"change-to-lux-icons": {
|
|
29
|
+
"description": "Die neuen LUX-Icons werden im Projekt eingerichtet",
|
|
30
|
+
"factory": "./theme/change-to-lux-icons/index#changeToLuxIcons",
|
|
31
|
+
"schema": "./theme/change-to-lux-icons/schema.json"
|
|
38
32
|
}
|
|
39
33
|
}
|
|
40
34
|
}
|