@ihk-gfi/lux-components-update 14.8.0 → 15.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 +4 -2
- package/add-lux-components/files/app/app.component.html +34 -0
- package/{src/add-lux-components → add-lux-components}/files/app/app.component.spec.ts +4 -2
- package/{src/add-lux-components → add-lux-components}/files/app/app.component.ts +1 -1
- package/add-lux-components/files/src/main.ts +17 -0
- package/{src/add-lux-components → add-lux-components}/index.js +29 -30
- package/add-lux-components/schema.json +23 -0
- package/collection.json +35 -0
- package/package.json +27 -27
- package/{src/theme → theme}/change-theme-to-authentic/index.js +0 -1
- package/theme/change-theme-to-authentic/schema.json +23 -0
- package/{src/theme → theme}/change-to-lux-icons/index.js +0 -1
- package/theme/change-to-lux-icons/schema.json +23 -0
- package/{src/update-dependencies → update-dependencies}/index.d.ts +1 -0
- package/update-dependencies/index.js +92 -0
- package/update-dependencies/schema.json +23 -0
- package/{src/update-en-messages → update-en-messages}/index.js +0 -1
- package/update-en-messages/schema.json +23 -0
- package/updates/15.0.0/index.d.ts +8 -0
- package/updates/15.0.0/index.js +109 -0
- package/updates/15.0.0/schema.json +23 -0
- package/{src/utility → utility}/dependencies.js +0 -1
- package/{src/utility → utility}/files.js +0 -1
- package/{src/utility → utility}/html/hit.js +0 -1
- package/{src/utility → utility}/html/html-manipulator.js +0 -1
- package/{src/utility → utility}/html/manipulator-functions.js +0 -1
- package/{src/utility → utility}/json.d.ts +2 -0
- package/{src/utility → utility}/json.js +16 -8
- package/{src/utility → utility}/logging.js +0 -1
- package/{src/utility → utility}/test.js +0 -1
- package/{src/utility → utility}/typescript.js +0 -1
- package/{src/utility → utility}/util.js +0 -1
- package/{src/utility → utility}/validation.js +0 -1
- package/src/add-lux-components/files/app/app.component.html +0 -32
- package/src/add-lux-components/files/app/base/license-hint/license-hint.component.html +0 -7
- package/src/add-lux-components/files/app/base/license-hint/license-hint.component.ts +0 -18
- package/src/add-lux-components/files/app/error/error.component.html +0 -10
- package/src/add-lux-components/files/app/error/error.component.scss +0 -3
- package/src/add-lux-components/files/app/error/error.component.spec.ts +0 -49
- package/src/add-lux-components/files/app/error/error.component.ts +0 -17
- package/src/add-lux-components/files/app/home/home.component.html +0 -7
- package/src/add-lux-components/files/app/home/home.component.scss +0 -3
- package/src/add-lux-components/files/app/home/home.component.ts +0 -13
- package/src/add-lux-components/files/app/profil/profil.component.html +0 -1
- package/src/add-lux-components/files/app/profil/profil.component.scss +0 -0
- package/src/add-lux-components/files/app/profil/profil.component.spec.ts +0 -24
- package/src/add-lux-components/files/app/profil/profil.component.ts +0 -11
- package/src/add-lux-components/files/assets/svg/Example.svg +0 -6
- package/src/add-lux-components/files/assets/svg/android.svg +0 -2
- package/src/add-lux-components/files/assets/svg/box.svg +0 -690
- package/src/add-lux-components/files/assets/svg/demoAppLogo.svg +0 -1
- package/src/add-lux-components/files/assets/svg/red_power_button.svg +0 -67
- package/src/add-lux-components/files/assets/svg/svg2009.svg +0 -57457
- package/src/add-lux-components/files/src/polyfills.ts +0 -58
- package/src/add-lux-components/index.js.map +0 -1
- package/src/add-lux-components/index.ts +0 -293
- package/src/add-lux-components/index_spec.d.ts +0 -1
- package/src/add-lux-components/index_spec.js +0 -51
- package/src/add-lux-components/index_spec.js.map +0 -1
- package/src/add-lux-components/index_spec.ts +0 -55
- package/src/add-lux-components/schema.json +0 -23
- package/src/collection.json +0 -75
- package/src/theme/change-theme-to-authentic/index.js.map +0 -1
- package/src/theme/change-theme-to-authentic/index.ts +0 -131
- package/src/theme/change-theme-to-authentic/index_spec.d.ts +0 -1
- package/src/theme/change-theme-to-authentic/index_spec.js +0 -300
- package/src/theme/change-theme-to-authentic/index_spec.js.map +0 -1
- package/src/theme/change-theme-to-authentic/index_spec.ts +0 -321
- package/src/theme/change-theme-to-authentic/schema.json +0 -23
- package/src/theme/change-to-lux-icons/index.js.map +0 -1
- package/src/theme/change-to-lux-icons/index.ts +0 -392
- package/src/theme/change-to-lux-icons/index_spec.d.ts +0 -1
- package/src/theme/change-to-lux-icons/index_spec.js +0 -128
- package/src/theme/change-to-lux-icons/index_spec.js.map +0 -1
- package/src/theme/change-to-lux-icons/index_spec.ts +0 -130
- package/src/theme/change-to-lux-icons/schema.json +0 -23
- package/src/update-dependencies/index.js +0 -88
- package/src/update-dependencies/index.js.map +0 -1
- package/src/update-dependencies/index.ts +0 -86
- package/src/update-dependencies/schema.json +0 -23
- package/src/update-en-messages/index.js.map +0 -1
- package/src/update-en-messages/index.ts +0 -83
- package/src/update-en-messages/index_spec.d.ts +0 -1
- package/src/update-en-messages/index_spec.js +0 -174
- package/src/update-en-messages/index_spec.js.map +0 -1
- package/src/update-en-messages/index_spec.ts +0 -182
- package/src/update-en-messages/schema.json +0 -23
- package/src/updates/update140000/files/src/polyfills.ts +0 -70
- package/src/updates/update140000/index.d.ts +0 -14
- package/src/updates/update140000/index.js +0 -95
- package/src/updates/update140000/index.js.map +0 -1
- package/src/updates/update140000/index.ts +0 -110
- package/src/updates/update140000/index_spec.d.ts +0 -1
- package/src/updates/update140000/index_spec.js +0 -165
- package/src/updates/update140000/index_spec.js.map +0 -1
- package/src/updates/update140000/index_spec.ts +0 -171
- package/src/updates/update140000/schema.json +0 -23
- package/src/updates/update140100/index.d.ts +0 -5
- package/src/updates/update140100/index.js +0 -62
- package/src/updates/update140100/index.js.map +0 -1
- package/src/updates/update140100/index.ts +0 -60
- package/src/updates/update140100/index_spec.d.ts +0 -1
- package/src/updates/update140100/index_spec.js +0 -124
- package/src/updates/update140100/index_spec.js.map +0 -1
- package/src/updates/update140100/index_spec.ts +0 -137
- package/src/updates/update140100/schema.json +0 -23
- package/src/updates/update140200/index.d.ts +0 -8
- package/src/updates/update140200/index.js +0 -40
- package/src/updates/update140200/index.js.map +0 -1
- package/src/updates/update140200/index.ts +0 -38
- package/src/updates/update140200/index_spec.d.ts +0 -1
- package/src/updates/update140200/index_spec.js +0 -75
- package/src/updates/update140200/index_spec.js.map +0 -1
- package/src/updates/update140200/index_spec.ts +0 -81
- package/src/updates/update140200/schema.json +0 -23
- package/src/updates/update140300/index.d.ts +0 -10
- package/src/updates/update140300/index.js +0 -85
- package/src/updates/update140300/index.js.map +0 -1
- package/src/updates/update140300/index.ts +0 -86
- package/src/updates/update140300/index_spec.d.ts +0 -1
- package/src/updates/update140300/index_spec.js +0 -145
- package/src/updates/update140300/index_spec.js.map +0 -1
- package/src/updates/update140300/index_spec.ts +0 -177
- package/src/updates/update140300/schema.json +0 -23
- package/src/updates/update140400/index.d.ts +0 -2
- package/src/updates/update140400/index.js +0 -22
- package/src/updates/update140400/index.js.map +0 -1
- package/src/updates/update140400/index.ts +0 -18
- package/src/updates/update140400/index_spec.d.ts +0 -1
- package/src/updates/update140400/index_spec.js +0 -75
- package/src/updates/update140400/index_spec.js.map +0 -1
- package/src/updates/update140400/index_spec.ts +0 -81
- package/src/updates/update140400/schema.json +0 -23
- package/src/updates/update140500/index.d.ts +0 -2
- package/src/updates/update140500/index.js +0 -21
- package/src/updates/update140500/index.js.map +0 -1
- package/src/updates/update140500/index.ts +0 -17
- package/src/updates/update140500/index_spec.d.ts +0 -1
- package/src/updates/update140500/index_spec.js +0 -73
- package/src/updates/update140500/index_spec.js.map +0 -1
- package/src/updates/update140500/index_spec.ts +0 -78
- package/src/updates/update140500/schema.json +0 -23
- package/src/updates/update140600/index.d.ts +0 -2
- package/src/updates/update140600/index.js +0 -39
- package/src/updates/update140600/index.js.map +0 -1
- package/src/updates/update140600/index.ts +0 -35
- package/src/updates/update140600/index_spec.d.ts +0 -1
- package/src/updates/update140600/index_spec.js +0 -71
- package/src/updates/update140600/index_spec.js.map +0 -1
- package/src/updates/update140600/index_spec.ts +0 -75
- package/src/updates/update140600/schema.json +0 -23
- package/src/updates/update140700/index.d.ts +0 -2
- package/src/updates/update140700/index.js +0 -22
- package/src/updates/update140700/index.js.map +0 -1
- package/src/updates/update140700/index.ts +0 -18
- package/src/updates/update140700/index_spec.d.ts +0 -1
- package/src/updates/update140700/index_spec.js +0 -75
- package/src/updates/update140700/index_spec.js.map +0 -1
- package/src/updates/update140700/index_spec.ts +0 -79
- package/src/updates/update140700/schema.json +0 -23
- package/src/updates/update140800/index.d.ts +0 -2
- package/src/updates/update140800/index.js +0 -22
- package/src/updates/update140800/index.js.map +0 -1
- package/src/updates/update140800/index.ts +0 -18
- package/src/updates/update140800/index_spec.d.ts +0 -1
- package/src/updates/update140800/index_spec.js +0 -76
- package/src/updates/update140800/index_spec.js.map +0 -1
- package/src/updates/update140800/index_spec.ts +0 -82
- package/src/updates/update140800/schema.json +0 -23
- package/src/utility/dependencies.js.map +0 -1
- package/src/utility/dependencies.ts +0 -144
- package/src/utility/files.js.map +0 -1
- package/src/utility/files.ts +0 -368
- package/src/utility/html/hit.js.map +0 -1
- package/src/utility/html/hit.ts +0 -28
- package/src/utility/html/html-manipulator.js.map +0 -1
- package/src/utility/html/html-manipulator.ts +0 -156
- package/src/utility/html/html_spec.d.ts +0 -1
- package/src/utility/html/html_spec.js +0 -692
- package/src/utility/html/html_spec.js.map +0 -1
- package/src/utility/html/html_spec.ts +0 -751
- package/src/utility/html/manipulator-functions.js.map +0 -1
- package/src/utility/html/manipulator-functions.ts +0 -149
- package/src/utility/json.js.map +0 -1
- package/src/utility/json.ts +0 -288
- package/src/utility/json_spec.d.ts +0 -1
- package/src/utility/json_spec.js +0 -326
- package/src/utility/json_spec.js.map +0 -1
- package/src/utility/json_spec.ts +0 -446
- package/src/utility/logging.js.map +0 -1
- package/src/utility/logging.ts +0 -80
- package/src/utility/test.js.map +0 -1
- package/src/utility/test.ts +0 -24
- package/src/utility/typescript.js.map +0 -1
- package/src/utility/typescript.ts +0 -598
- package/src/utility/typescript_spec.d.ts +0 -1
- package/src/utility/typescript_spec.js +0 -1005
- package/src/utility/typescript_spec.js.map +0 -1
- package/src/utility/typescript_spec.ts +0 -1265
- package/src/utility/util.js.map +0 -1
- package/src/utility/util.ts +0 -145
- package/src/utility/validation.js.map +0 -1
- package/src/utility/validation.ts +0 -48
- package/tsconfig.json +0 -35
- /package/{src/add-lux-components → add-lux-components}/files/app/app-routing.module.ts +0 -0
- /package/{src/add-lux-components → add-lux-components}/files/app/app.module.ts +0 -0
- /package/{src/add-lux-components → add-lux-components}/files/environments/environment.prod.ts +0 -0
- /package/{src/add-lux-components → add-lux-components}/files/environments/environment.ts +0 -0
- /package/{src/add-lux-components → add-lux-components}/files/locale/messages.en.xlf +0 -0
- /package/{src/add-lux-components → add-lux-components}/files/locale/messages.xlf +0 -0
- /package/{src/add-lux-components → add-lux-components}/files/src/index.html +0 -0
- /package/{src/add-lux-components → add-lux-components}/index.d.ts +0 -0
- /package/{src/theme → theme}/change-theme-to-authentic/index.d.ts +0 -0
- /package/{src/theme → theme}/change-to-lux-icons/index.d.ts +0 -0
- /package/{src/update-en-messages → update-en-messages}/index.d.ts +0 -0
- /package/{src/utility → utility}/dependencies.d.ts +0 -0
- /package/{src/utility → utility}/files.d.ts +0 -0
- /package/{src/utility → utility}/html/hit.d.ts +0 -0
- /package/{src/utility → utility}/html/html-manipulator.d.ts +0 -0
- /package/{src/utility → utility}/html/manipulator-functions.d.ts +0 -0
- /package/{src/utility → utility}/logging.d.ts +0 -0
- /package/{src/utility → utility}/test.d.ts +0 -0
- /package/{src/utility → utility}/typescript.d.ts +0 -0
- /package/{src/utility → utility}/util.d.ts +0 -0
- /package/{src/utility → utility}/validation.d.ts +0 -0
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import { callRule, SchematicContext } from '@angular-devkit/schematics';
|
|
2
|
-
import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
|
|
3
|
-
import * as path from 'path';
|
|
4
|
-
import { of as observableOf } from 'rxjs';
|
|
5
|
-
import { appOptions, workspaceOptions } from '../utility/test';
|
|
6
|
-
import { UtilConfig } from '../utility/util';
|
|
7
|
-
import { updateEnMessages } from './index';
|
|
8
|
-
|
|
9
|
-
describe('updateEnMessages', () => {
|
|
10
|
-
let appTree: UnitTestTree;
|
|
11
|
-
let runner: SchematicTestRunner;
|
|
12
|
-
let context: SchematicContext;
|
|
13
|
-
|
|
14
|
-
const testOptions: { project: string; path: string; verbose: boolean } = {
|
|
15
|
-
project: '',
|
|
16
|
-
path: '/',
|
|
17
|
-
verbose: false
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
beforeEach(async () => {
|
|
21
|
-
const collectionPath = path.join(__dirname, '../collection.json');
|
|
22
|
-
runner = new SchematicTestRunner('schematics', collectionPath);
|
|
23
|
-
|
|
24
|
-
const collection = '@schematics/angular';
|
|
25
|
-
appTree = await runner.runExternalSchematicAsync(collection, 'workspace', workspaceOptions).toPromise();
|
|
26
|
-
appTree = await runner.runExternalSchematicAsync(collection, 'application', appOptions, appTree).toPromise();
|
|
27
|
-
|
|
28
|
-
context = runner.engine.createContext(
|
|
29
|
-
runner.engine.createSchematic('update-en-messages', runner.engine.createCollection(collectionPath))
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
UtilConfig.defaultWaitMS = 0;
|
|
33
|
-
|
|
34
|
-
testOptions.project = appOptions.name;
|
|
35
|
-
testOptions.path = workspaceOptions.newProjectRoot + '/' + appOptions.name;
|
|
36
|
-
testOptions.verbose = true;
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
describe('[Rule] updateEnMessages', () => {
|
|
40
|
-
it('Sollte die englische Übersetzungen aktualisieren', (done) => {
|
|
41
|
-
const filePathDe = '/src/locale/messages.xlf';
|
|
42
|
-
const filePathEn = '/src/locale/messages.en.xlf';
|
|
43
|
-
|
|
44
|
-
appTree.create(filePathDe, i18nDeApp);
|
|
45
|
-
appTree.create(filePathEn, i18nEnApp);
|
|
46
|
-
|
|
47
|
-
const filePathLCEn = '/node_modules/@ihk-gfi/lux-components/src/locale/messages.en.xlf';
|
|
48
|
-
const filePathSDEn = '/node_modules/@ihk-gfi/lux-stammdaten/src/locale/messages.en.xlf';
|
|
49
|
-
|
|
50
|
-
appTree.create(filePathLCEn, i18nEnLuxC);
|
|
51
|
-
appTree.create(filePathSDEn, i18nEnStamm);
|
|
52
|
-
|
|
53
|
-
callRule(updateEnMessages(), observableOf(appTree), context).subscribe({
|
|
54
|
-
next: (success) => {
|
|
55
|
-
|
|
56
|
-
expect(success.exists(filePathDe)).toBeTrue();
|
|
57
|
-
expect(success.exists(filePathEn)).toBeTrue();
|
|
58
|
-
expect(success.exists(filePathLCEn)).toBeTrue();
|
|
59
|
-
expect(success.exists(filePathSDEn)).toBeTrue();
|
|
60
|
-
|
|
61
|
-
expect(success.read(filePathEn)?.toString()).toEqual(i18nEnAppResult);
|
|
62
|
-
|
|
63
|
-
done();
|
|
64
|
-
},
|
|
65
|
-
error: (reason) => expect(reason).toBeUndefined()
|
|
66
|
-
});
|
|
67
|
-
})});
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
const i18nDeApp = `<?xml version="1.0" encoding="UTF-8" ?>
|
|
71
|
-
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
|
|
72
|
-
<file source-language="de" datatype="plaintext" original="ng2.template">
|
|
73
|
-
<body>
|
|
74
|
-
<trans-unit id="luxc.menu.trigger.btn" datatype="html">
|
|
75
|
-
<source>Menü</source>
|
|
76
|
-
<context-group purpose="location">
|
|
77
|
-
<context context-type="sourcefile">node_modules/@ihk-gfi/src/app/modules/lux-action/lux-menu/lux-menu.component.ts</context>
|
|
78
|
-
<context context-type="linenumber">64</context>
|
|
79
|
-
</context-group>
|
|
80
|
-
</trans-unit>
|
|
81
|
-
<trans-unit id="luxsd.contact.email" datatype="html">
|
|
82
|
-
<source>E-Mail</source>
|
|
83
|
-
<context-group purpose="location">
|
|
84
|
-
<context context-type="sourcefile">src/app/modules/lux-stammdaten/lux-stammdaten-kontakt/lux-stammdaten-kontakt.component.ts</context>
|
|
85
|
-
<context context-type="linenumber">42</context>
|
|
86
|
-
</context-group>
|
|
87
|
-
</trans-unit>
|
|
88
|
-
<trans-unit id="test.001" datatype="html">
|
|
89
|
-
<source>test 001 De</source>
|
|
90
|
-
<context-group purpose="location">
|
|
91
|
-
<context context-type="sourcefile">node_modules/@ihk-gfi/src/app/modules/lux-action/lux-menu/lux-menu.component.ts</context>
|
|
92
|
-
<context context-type="linenumber">64</context>
|
|
93
|
-
</context-group>
|
|
94
|
-
</trans-unit>
|
|
95
|
-
</body>
|
|
96
|
-
</file>
|
|
97
|
-
</xliff>
|
|
98
|
-
`;
|
|
99
|
-
|
|
100
|
-
const i18nEnApp = `<?xml version="1.0" encoding="UTF-8" ?>
|
|
101
|
-
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
|
|
102
|
-
<file source-language="en" datatype="plaintext" original="ng2.template">
|
|
103
|
-
<body>
|
|
104
|
-
<trans-unit id="test.001" datatype="html">
|
|
105
|
-
<source>test 001 De</source>
|
|
106
|
-
<target>test 001 En</target>
|
|
107
|
-
<context-group purpose="location">
|
|
108
|
-
<context context-type="sourcefile">node_modules/@ihk-gfi/src/app/modules/lux-action/lux-menu/lux-menu.component.ts</context>
|
|
109
|
-
<context context-type="linenumber">64</context>
|
|
110
|
-
</context-group>
|
|
111
|
-
</trans-unit>
|
|
112
|
-
</body>
|
|
113
|
-
</file>
|
|
114
|
-
</xliff>
|
|
115
|
-
`;
|
|
116
|
-
|
|
117
|
-
const i18nEnStamm = `<?xml version="1.0" encoding="UTF-8" ?>
|
|
118
|
-
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
|
|
119
|
-
<file source-language="en" datatype="plaintext" original="ng2.template">
|
|
120
|
-
<body>
|
|
121
|
-
<trans-unit id="luxsd.contact.email" datatype="html">
|
|
122
|
-
<source>E-Mail</source>
|
|
123
|
-
<target>E-mail</target>
|
|
124
|
-
<context-group purpose="location">
|
|
125
|
-
<context context-type="sourcefile">src/app/modules/lux-stammdaten/lux-stammdaten-kontakt/lux-stammdaten-kontakt.component.ts</context>
|
|
126
|
-
<context context-type="linenumber">42</context>
|
|
127
|
-
</context-group>
|
|
128
|
-
</trans-unit>
|
|
129
|
-
</body>
|
|
130
|
-
</file>
|
|
131
|
-
</xliff>
|
|
132
|
-
`;
|
|
133
|
-
|
|
134
|
-
const i18nEnLuxC = `<?xml version="1.0" encoding="UTF-8" ?>
|
|
135
|
-
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
|
|
136
|
-
<file source-language="en" datatype="plaintext" original="ng2.template">
|
|
137
|
-
<body>
|
|
138
|
-
<trans-unit id="luxc.menu.trigger.btn" datatype="html">
|
|
139
|
-
<source>Menü</source>
|
|
140
|
-
<target>Menu</target>
|
|
141
|
-
<context-group purpose="location">
|
|
142
|
-
<context context-type="sourcefile">node_modules/@ihk-gfi/src/app/modules/lux-action/lux-menu/lux-menu.component.ts</context>
|
|
143
|
-
<context context-type="linenumber">64</context>
|
|
144
|
-
</context-group>
|
|
145
|
-
</trans-unit>
|
|
146
|
-
</body>
|
|
147
|
-
</file>
|
|
148
|
-
</xliff>
|
|
149
|
-
`;
|
|
150
|
-
|
|
151
|
-
const i18nEnAppResult = `<?xml version="1.0" encoding="UTF-8" ?>
|
|
152
|
-
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
|
|
153
|
-
<file source-language="en" datatype="plaintext" original="ng2.template">
|
|
154
|
-
<body>
|
|
155
|
-
<trans-unit id="luxc.menu.trigger.btn" datatype="html">
|
|
156
|
-
<source>Menü</source>
|
|
157
|
-
<target>Menu</target>
|
|
158
|
-
<context-group purpose="location">
|
|
159
|
-
<context context-type="sourcefile">node_modules/@ihk-gfi/src/app/modules/lux-action/lux-menu/lux-menu.component.ts</context>
|
|
160
|
-
<context context-type="linenumber">64</context>
|
|
161
|
-
</context-group>
|
|
162
|
-
</trans-unit>
|
|
163
|
-
<trans-unit id="luxsd.contact.email" datatype="html">
|
|
164
|
-
<source>E-Mail</source>
|
|
165
|
-
<target>E-mail</target>
|
|
166
|
-
<context-group purpose="location">
|
|
167
|
-
<context context-type="sourcefile">src/app/modules/lux-stammdaten/lux-stammdaten-kontakt/lux-stammdaten-kontakt.component.ts</context>
|
|
168
|
-
<context context-type="linenumber">42</context>
|
|
169
|
-
</context-group>
|
|
170
|
-
</trans-unit>
|
|
171
|
-
<trans-unit id="test.001" datatype="html">
|
|
172
|
-
<source>test 001 De</source>
|
|
173
|
-
<target>test 001 En</target>
|
|
174
|
-
<context-group purpose="location">
|
|
175
|
-
<context context-type="sourcefile">node_modules/@ihk-gfi/src/app/modules/lux-action/lux-menu/lux-menu.component.ts</context>
|
|
176
|
-
<context context-type="linenumber">64</context>
|
|
177
|
-
</context-group>
|
|
178
|
-
</trans-unit>
|
|
179
|
-
</body>
|
|
180
|
-
</file>
|
|
181
|
-
</xliff>
|
|
182
|
-
`;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/schema",
|
|
3
|
-
"$id": "updateEnMessagesSchema",
|
|
4
|
-
"title": "Aktualisiert die englischen Übersetzungen im Projekt.",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"description": "Aktualisiert die englischen Übersetzungen im Projekt.",
|
|
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,70 +0,0 @@
|
|
|
1
|
-
/***************************************************************************************************
|
|
2
|
-
* Load `$localize` onto the global scope - used if i18n tags appear in Angular templates.
|
|
3
|
-
*/
|
|
4
|
-
import '@angular/localize/init';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* This file includes polyfills needed by Angular and is loaded before the app.
|
|
8
|
-
* You can add your own extra polyfills to this file.
|
|
9
|
-
*
|
|
10
|
-
* This file is divided into 2 sections:
|
|
11
|
-
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
|
|
12
|
-
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
|
|
13
|
-
* file.
|
|
14
|
-
*
|
|
15
|
-
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
|
16
|
-
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
|
|
17
|
-
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
|
|
18
|
-
*
|
|
19
|
-
* Learn more in https://angular.io/guide/browser-support
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
/***************************************************************************************************
|
|
23
|
-
* BROWSER POLYFILLS
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* IE11 requires the following for NgClass support on SVG elements
|
|
28
|
-
*/
|
|
29
|
-
// import 'classlist.js'; // Run `npm install --save classlist.js`.
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Web Animations `@angular/platform-browser/animations`
|
|
33
|
-
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
|
|
34
|
-
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
|
|
35
|
-
*/
|
|
36
|
-
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* By default, zone.js will patch all possible macroTask and DomEvents
|
|
40
|
-
* user can disable parts of macroTask/DomEvents patch by setting following flags
|
|
41
|
-
* because those flags need to be set before `zone.js` being loaded, and webpack
|
|
42
|
-
* will put import in the top of bundle, so user need to create a separate file
|
|
43
|
-
* in this directory (for example: zone-flags.ts), and put the following flags
|
|
44
|
-
* into that file, and then add the following code before importing zone.js.
|
|
45
|
-
* import './zone-flags';
|
|
46
|
-
*
|
|
47
|
-
* The flags allowed in zone-flags.ts are listed here.
|
|
48
|
-
*
|
|
49
|
-
* The following flags will work for all browsers.
|
|
50
|
-
*
|
|
51
|
-
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
|
|
52
|
-
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
|
|
53
|
-
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
|
|
54
|
-
*
|
|
55
|
-
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
|
|
56
|
-
* with the following flag, it will bypass `zone.js` patch for IE/Edge
|
|
57
|
-
*
|
|
58
|
-
* (window as any).__Zone_enable_cross_context_check = true;
|
|
59
|
-
*
|
|
60
|
-
*/
|
|
61
|
-
|
|
62
|
-
/***************************************************************************************************
|
|
63
|
-
* Zone JS is required by default for Angular itself.
|
|
64
|
-
*/
|
|
65
|
-
import 'zone.js'; // Included with Angular CLI.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
/***************************************************************************************************
|
|
69
|
-
* APPLICATION IMPORTS
|
|
70
|
-
*/
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
-
export declare const updateMajorVersion = "14";
|
|
3
|
-
export declare const updateMinVersion = "13.3.0";
|
|
4
|
-
export declare const updateNodeMinVersion = "16.0.0";
|
|
5
|
-
export declare const iconAssetBlock: {
|
|
6
|
-
glob: string;
|
|
7
|
-
input: string;
|
|
8
|
-
output: string;
|
|
9
|
-
};
|
|
10
|
-
export declare function update(options: any): Rule;
|
|
11
|
-
export declare function updateProject(options: any): Rule;
|
|
12
|
-
export declare function addIconAssets(options: any): Rule;
|
|
13
|
-
export declare function renameLuxSelectedFiles(options: any): Rule;
|
|
14
|
-
export declare function copyFiles(options: any): Rule;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.copyFiles = exports.renameLuxSelectedFiles = exports.addIconAssets = exports.updateProject = exports.update = exports.iconAssetBlock = exports.updateNodeMinVersion = exports.updateMinVersion = exports.updateMajorVersion = void 0;
|
|
4
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
-
const chalk = require("chalk");
|
|
6
|
-
const index_1 = require("../../update-dependencies/index");
|
|
7
|
-
const files_1 = require("../../utility/files");
|
|
8
|
-
const html_manipulator_1 = require("../../utility/html/html-manipulator");
|
|
9
|
-
const manipulator_functions_1 = require("../../utility/html/manipulator-functions");
|
|
10
|
-
const json_1 = require("../../utility/json");
|
|
11
|
-
const logging_1 = require("../../utility/logging");
|
|
12
|
-
const util_1 = require("../../utility/util");
|
|
13
|
-
const validation_1 = require("../../utility/validation");
|
|
14
|
-
exports.updateMajorVersion = '14';
|
|
15
|
-
exports.updateMinVersion = '13.3.0';
|
|
16
|
-
exports.updateNodeMinVersion = '16.0.0';
|
|
17
|
-
exports.iconAssetBlock = {
|
|
18
|
-
"glob": "**/*",
|
|
19
|
-
"input": "./node_modules/@ihk-gfi/lux-components-icons-and-fonts/assets/icons/",
|
|
20
|
-
"output": "./assets/icons"
|
|
21
|
-
};
|
|
22
|
-
function update(options) {
|
|
23
|
-
return (_tree, _context) => {
|
|
24
|
-
return (0, schematics_1.chain)([
|
|
25
|
-
check(options),
|
|
26
|
-
(0, util_1.applyRuleIf)(exports.updateMinVersion, updateProject(options)),
|
|
27
|
-
(0, util_1.finish)(false, `${chalk.yellowBright('Wichtig!!!')} Hinweise im Update Guide beachten -> https://github.com/IHK-GfI/lux-components/wiki/update-guide-${exports.updateMajorVersion}`)
|
|
28
|
-
]);
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
exports.update = update;
|
|
32
|
-
function updateProject(options) {
|
|
33
|
-
return (_tree, _context) => {
|
|
34
|
-
return (0, schematics_1.chain)([
|
|
35
|
-
(0, util_1.messageInfoRule)(`LUX-Components ${exports.updateMajorVersion} werden aktualisiert...`),
|
|
36
|
-
addIconAssets(options),
|
|
37
|
-
copyFiles(options),
|
|
38
|
-
renameLuxSelectedFiles(options),
|
|
39
|
-
(0, index_1.updateDependencies)(),
|
|
40
|
-
(0, util_1.messageSuccessRule)(`LUX-Components ${exports.updateMajorVersion} wurden aktualisiert.`)
|
|
41
|
-
]);
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
exports.updateProject = updateProject;
|
|
45
|
-
function addIconAssets(options) {
|
|
46
|
-
const assetPath = ['projects', options.project, 'architect', 'build', 'options', 'assets'];
|
|
47
|
-
const testAssetPath = ['projects', options.project, 'architect', 'test', 'options', 'assets'];
|
|
48
|
-
return (0, schematics_1.chain)([
|
|
49
|
-
(0, util_1.messageInfoRule)(`Die LUX-Iconpfade werden in den Asset-Abschnitten ergänzt...`),
|
|
50
|
-
(0, json_1.updateJsonArray)('/angular.json', assetPath, exports.iconAssetBlock),
|
|
51
|
-
(0, json_1.updateJsonArray)('/angular.json', testAssetPath, exports.iconAssetBlock),
|
|
52
|
-
(0, util_1.messageSuccessRule)(`Die LUX-Iconpfade wurden in den Asset-Abschnitten ergänzt.`),
|
|
53
|
-
]);
|
|
54
|
-
}
|
|
55
|
-
exports.addIconAssets = addIconAssets;
|
|
56
|
-
function renameLuxSelectedFiles(options) {
|
|
57
|
-
return (0, schematics_1.chain)([
|
|
58
|
-
(0, util_1.messageInfoRule)(`Das Attribut "luxSelectedFiles" wird umbenannt in "luxSelected"...`),
|
|
59
|
-
(tree, _context) => {
|
|
60
|
-
(0, files_1.iterateFilesAndModifyContent)(tree, options.path, (filePath, content) => {
|
|
61
|
-
let result = content;
|
|
62
|
-
result = html_manipulator_1.HtmlManipulator.transform(result, 'lux-file-input', (0, manipulator_functions_1.renameAttrFn)('luxSelectedFiles', 'luxSelected'));
|
|
63
|
-
result = html_manipulator_1.HtmlManipulator.transform(result, 'lux-file-list', (0, manipulator_functions_1.renameAttrFn)('luxSelectedFiles', 'luxSelected'));
|
|
64
|
-
result = html_manipulator_1.HtmlManipulator.transform(result, 'lux-file-upload', (0, manipulator_functions_1.renameAttrFn)('luxSelectedFiles', 'luxSelected'));
|
|
65
|
-
result = html_manipulator_1.HtmlManipulator.transform(result, 'lux-file-input', (0, manipulator_functions_1.renameAttrFn)('luxSelectedFilesChange', 'luxSelectedChange'));
|
|
66
|
-
result = html_manipulator_1.HtmlManipulator.transform(result, 'lux-file-list', (0, manipulator_functions_1.renameAttrFn)('luxSelectedFilesChange', 'luxSelectedChange'));
|
|
67
|
-
result = html_manipulator_1.HtmlManipulator.transform(result, 'lux-file-upload', (0, manipulator_functions_1.renameAttrFn)('luxSelectedFilesChange', 'luxSelectedChange'));
|
|
68
|
-
if (content !== result) {
|
|
69
|
-
(0, logging_1.logInfo)(filePath + ' wurde angepasst.');
|
|
70
|
-
tree.overwrite(filePath, result);
|
|
71
|
-
}
|
|
72
|
-
}, '.component.html');
|
|
73
|
-
},
|
|
74
|
-
(0, util_1.messageSuccessRule)(`Das Attribut "luxSelectedFiles" wurde umbenannt in "luxSelected".`)
|
|
75
|
-
]);
|
|
76
|
-
}
|
|
77
|
-
exports.renameLuxSelectedFiles = renameLuxSelectedFiles;
|
|
78
|
-
function copyFiles(options) {
|
|
79
|
-
return (0, schematics_1.chain)([
|
|
80
|
-
(0, util_1.messageInfoRule)(`Dateien werden kopiert...`),
|
|
81
|
-
(0, files_1.moveFilesToDirectory)(options, 'files/src', '/src'),
|
|
82
|
-
(0, util_1.messageSuccessRule)(`Dateien wurden kopiert.`)
|
|
83
|
-
]);
|
|
84
|
-
}
|
|
85
|
-
exports.copyFiles = copyFiles;
|
|
86
|
-
function check(_options) {
|
|
87
|
-
return (tree, _context) => {
|
|
88
|
-
(0, logging_1.logInfoWithDescriptor)(`Vorbedingungen werden geprüft...`);
|
|
89
|
-
(0, validation_1.validateNodeVersion)(_context, exports.updateNodeMinVersion);
|
|
90
|
-
(0, validation_1.validateLuxComponentsVersion)(tree, `${exports.updateMinVersion} || ^${exports.updateMajorVersion}.0.0`);
|
|
91
|
-
(0, logging_1.logSuccess)(`Vorbedingungen wurden geprüft.`);
|
|
92
|
-
return tree;
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { chain, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
|
|
2
|
-
import * as chalk from 'chalk';
|
|
3
|
-
import { updateDependencies } from '../../update-dependencies/index';
|
|
4
|
-
import { iterateFilesAndModifyContent, moveFilesToDirectory } from '../../utility/files';
|
|
5
|
-
import { HtmlManipulator as Html } from '../../utility/html/html-manipulator';
|
|
6
|
-
import { renameAttrFn } from '../../utility/html/manipulator-functions';
|
|
7
|
-
import { updateJsonArray } from '../../utility/json';
|
|
8
|
-
import { logInfo, logInfoWithDescriptor, logSuccess } from '../../utility/logging';
|
|
9
|
-
import { applyRuleIf, finish, messageInfoRule, messageSuccessRule } from '../../utility/util';
|
|
10
|
-
import { validateLuxComponentsVersion, validateNodeVersion } from '../../utility/validation';
|
|
11
|
-
|
|
12
|
-
export const updateMajorVersion = '14';
|
|
13
|
-
export const updateMinVersion = '13.3.0';
|
|
14
|
-
export const updateNodeMinVersion = '16.0.0';
|
|
15
|
-
|
|
16
|
-
export const iconAssetBlock = {
|
|
17
|
-
"glob": "**/*",
|
|
18
|
-
"input": "./node_modules/@ihk-gfi/lux-components-icons-and-fonts/assets/icons/",
|
|
19
|
-
"output": "./assets/icons"
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export function update(options: any): Rule {
|
|
23
|
-
return (_tree: Tree, _context: SchematicContext) => {
|
|
24
|
-
return chain([
|
|
25
|
-
check(options),
|
|
26
|
-
applyRuleIf(updateMinVersion, updateProject(options)),
|
|
27
|
-
finish(
|
|
28
|
-
false,
|
|
29
|
-
`${chalk.yellowBright(
|
|
30
|
-
'Wichtig!!!'
|
|
31
|
-
)} Hinweise im Update Guide beachten -> https://github.com/IHK-GfI/lux-components/wiki/update-guide-${updateMajorVersion}`
|
|
32
|
-
)
|
|
33
|
-
]);
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export function updateProject(options: any): Rule {
|
|
38
|
-
return (_tree: Tree, _context: SchematicContext) => {
|
|
39
|
-
return chain([
|
|
40
|
-
messageInfoRule(`LUX-Components ${updateMajorVersion} werden aktualisiert...`),
|
|
41
|
-
addIconAssets(options),
|
|
42
|
-
copyFiles(options),
|
|
43
|
-
renameLuxSelectedFiles(options),
|
|
44
|
-
updateDependencies(),
|
|
45
|
-
messageSuccessRule(`LUX-Components ${updateMajorVersion} wurden aktualisiert.`)
|
|
46
|
-
]);
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export function addIconAssets(options: any): Rule {
|
|
51
|
-
const assetPath = ['projects', options.project, 'architect', 'build', 'options', 'assets'];
|
|
52
|
-
const testAssetPath = ['projects', options.project, 'architect', 'test', 'options', 'assets'];
|
|
53
|
-
|
|
54
|
-
return chain([
|
|
55
|
-
messageInfoRule(`Die LUX-Iconpfade werden in den Asset-Abschnitten ergänzt...`),
|
|
56
|
-
updateJsonArray('/angular.json', assetPath, iconAssetBlock),
|
|
57
|
-
updateJsonArray('/angular.json', testAssetPath, iconAssetBlock),
|
|
58
|
-
messageSuccessRule(`Die LUX-Iconpfade wurden in den Asset-Abschnitten ergänzt.`),
|
|
59
|
-
]);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export function renameLuxSelectedFiles(options: any): Rule {
|
|
63
|
-
return chain([
|
|
64
|
-
messageInfoRule(`Das Attribut "luxSelectedFiles" wird umbenannt in "luxSelected"...`),
|
|
65
|
-
(tree: Tree, _context: SchematicContext) => {
|
|
66
|
-
iterateFilesAndModifyContent(
|
|
67
|
-
tree,
|
|
68
|
-
options.path,
|
|
69
|
-
(filePath: string, content: string) => {
|
|
70
|
-
let result = content;
|
|
71
|
-
result = Html.transform(result, 'lux-file-input', renameAttrFn('luxSelectedFiles', 'luxSelected'));
|
|
72
|
-
result = Html.transform(result, 'lux-file-list', renameAttrFn('luxSelectedFiles', 'luxSelected'));
|
|
73
|
-
result = Html.transform(result, 'lux-file-upload', renameAttrFn('luxSelectedFiles', 'luxSelected'));
|
|
74
|
-
|
|
75
|
-
result = Html.transform(result, 'lux-file-input', renameAttrFn('luxSelectedFilesChange', 'luxSelectedChange'));
|
|
76
|
-
result = Html.transform(result, 'lux-file-list', renameAttrFn('luxSelectedFilesChange', 'luxSelectedChange'));
|
|
77
|
-
result = Html.transform(result, 'lux-file-upload', renameAttrFn('luxSelectedFilesChange', 'luxSelectedChange'));
|
|
78
|
-
|
|
79
|
-
if (content !== result) {
|
|
80
|
-
logInfo(filePath + ' wurde angepasst.');
|
|
81
|
-
tree.overwrite(filePath, result);
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
'.component.html'
|
|
85
|
-
);
|
|
86
|
-
},
|
|
87
|
-
messageSuccessRule(`Das Attribut "luxSelectedFiles" wurde umbenannt in "luxSelected".`)
|
|
88
|
-
]);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export function copyFiles(options: any): Rule {
|
|
92
|
-
return chain([
|
|
93
|
-
messageInfoRule(`Dateien werden kopiert...`),
|
|
94
|
-
moveFilesToDirectory(options, 'files/src', '/src'),
|
|
95
|
-
messageSuccessRule(`Dateien wurden kopiert.`)
|
|
96
|
-
]);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
function check(_options: any): Rule {
|
|
100
|
-
return (tree: Tree, _context: SchematicContext) => {
|
|
101
|
-
logInfoWithDescriptor(`Vorbedingungen werden geprüft...`);
|
|
102
|
-
|
|
103
|
-
validateNodeVersion(_context, updateNodeMinVersion);
|
|
104
|
-
validateLuxComponentsVersion(tree, `${updateMinVersion} || ^${updateMajorVersion}.0.0`);
|
|
105
|
-
|
|
106
|
-
logSuccess(`Vorbedingungen wurden geprüft.`);
|
|
107
|
-
|
|
108
|
-
return tree;
|
|
109
|
-
};
|
|
110
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|