@eui/core 22.0.0-alpha.63 → 22.0.0-alpha.65

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/core",
3
- "version": "22.0.0-alpha.63",
3
+ "version": "22.0.0-alpha.65",
4
4
  "tag": "next",
5
5
  "description": "eUI core package - holding UI components for Desktop applications",
6
6
  "homepage": "https://eui.ecdevops.eu",
@@ -10,7 +10,7 @@
10
10
  "url": "https://sdlc.webcloud.ec.europa.eu/csdr/eui/eui.git"
11
11
  },
12
12
  "peerDependencies": {
13
- "@eui/base": "22.0.0-alpha.63",
13
+ "@eui/base": "22.0.0-alpha.65",
14
14
  "rxjs": "^7.8.0",
15
15
  "extend": "^3.0.2",
16
16
  "localforage": "^1.10.0",
@@ -119,6 +119,12 @@
119
119
  "factory": "./migrate-to-signals/index#migrateToSignals",
120
120
  "schema": "./migrate-to-signals/schema.json"
121
121
  },
122
+ "migrate-ecl": {
123
+ "description": "Runs all eUI-ECL migration schematics in sequence to fully migrate an eUI-ECL app (per-component ECL migrations, signal access migration, import additions, cleanup).",
124
+ "factory": "./migrate-ecl/index#migrateEcl",
125
+ "schema": "./migrate-ecl/schema.json",
126
+ "aliases": ["ecl-migrate-all"]
127
+ },
122
128
  "migrate-ecl-breadcrumb": {
123
129
  "description": "Migrates the removed ecl-breadcrumb element selector to nav[eclBreadcrumb].",
124
130
  "factory": "./migrate-ecl-breadcrumb/index#migrateEclBreadcrumb",
@@ -11,8 +11,8 @@ function migrate(options) {
11
11
  return (tree, context) => {
12
12
  const version = (0, utils_1.detectEuiVersion)(tree);
13
13
  context.logger.info(`Detected eUI version: ${version || 'unknown'}`);
14
- if (!version || !version.startsWith('21')) {
15
- context.logger.warn(`This migration schematic targets eUI 21.x. Detected: ${version || 'unknown'}. Skipping.`);
14
+ if (!version || !version.startsWith('22')) {
15
+ context.logger.warn(`This migration schematic targets eUI 22.x. Detected: ${version || 'unknown'}. Skipping.`);
16
16
  return tree;
17
17
  }
18
18
  const scanPath = options.path || './src';
@@ -0,0 +1,24 @@
1
+ import { Rule } from '@angular-devkit/schematics';
2
+ export interface MigrateEclSchema {
3
+ path?: string;
4
+ dryRun?: boolean;
5
+ useClassArray?: boolean;
6
+ }
7
+ /**
8
+ * Runs the full set of ECL (eUI-ECL) migration schematics needed to migrate an
9
+ * eUI-ECL application from v21 to v22, in the correct order:
10
+ *
11
+ * 1. Per-component ECL selector / input / structural migrations (migrate-ecl-*).
12
+ * 2. migrate-ecl-removed-components — report-only warnings for members that
13
+ * require manual migration.
14
+ * 3. migrate-to-signals — rewrites programmatic `comp.prop` accesses to
15
+ * `comp.prop()` for signal-migrated components (the engine is shared with
16
+ * eUI but covers ECL via its ECL signal map).
17
+ * 4. add-eui-imports — adds the required EUI_ECL_* imports to standalone
18
+ * components / declaring NgModules based on template selector usage.
19
+ * 5. fix-no-multiple-empty-lines — cosmetic cleanup after the edits above.
20
+ *
21
+ * It deliberately excludes the eUI (Material) migrations (`migrate`,
22
+ * `migrate-eui-*`, `migrate-to-standalone`), which do not apply to eUI-ECL apps.
23
+ */
24
+ export declare function migrateEcl(options: MigrateEclSchema): Rule;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.migrateEcl = migrateEcl;
4
+ const schematics_1 = require("@angular-devkit/schematics");
5
+ /**
6
+ * Runs the full set of ECL (eUI-ECL) migration schematics needed to migrate an
7
+ * eUI-ECL application from v21 to v22, in the correct order:
8
+ *
9
+ * 1. Per-component ECL selector / input / structural migrations (migrate-ecl-*).
10
+ * 2. migrate-ecl-removed-components — report-only warnings for members that
11
+ * require manual migration.
12
+ * 3. migrate-to-signals — rewrites programmatic `comp.prop` accesses to
13
+ * `comp.prop()` for signal-migrated components (the engine is shared with
14
+ * eUI but covers ECL via its ECL signal map).
15
+ * 4. add-eui-imports — adds the required EUI_ECL_* imports to standalone
16
+ * components / declaring NgModules based on template selector usage.
17
+ * 5. fix-no-multiple-empty-lines — cosmetic cleanup after the edits above.
18
+ *
19
+ * It deliberately excludes the eUI (Material) migrations (`migrate`,
20
+ * `migrate-eui-*`, `migrate-to-standalone`), which do not apply to eUI-ECL apps.
21
+ */
22
+ function migrateEcl(options) {
23
+ const base = { path: options.path || './src', dryRun: options.dryRun || false };
24
+ return (0, schematics_1.chain)([
25
+ (0, schematics_1.schematic)('migrate-ecl-breadcrumb', base),
26
+ (0, schematics_1.schematic)('migrate-ecl-page-header', base),
27
+ (0, schematics_1.schematic)('migrate-ecl-page-summary', base),
28
+ (0, schematics_1.schematic)('migrate-ecl-site-footer', base),
29
+ (0, schematics_1.schematic)('migrate-ecl-timeline', base),
30
+ (0, schematics_1.schematic)('migrate-ecl-pagination', base),
31
+ (0, schematics_1.schematic)('migrate-ecl-inpage-navigation', base),
32
+ (0, schematics_1.schematic)('migrate-ecl-tabs', base),
33
+ (0, schematics_1.schematic)('migrate-ecl-file', base),
34
+ (0, schematics_1.schematic)('migrate-ecl-quiz', base),
35
+ (0, schematics_1.schematic)('migrate-ecl-link', base),
36
+ (0, schematics_1.schematic)('migrate-ecl-icon', base),
37
+ (0, schematics_1.schematic)('migrate-to-signals', base),
38
+ (0, schematics_1.schematic)('migrate-ecl-removed-components', base),
39
+ (0, schematics_1.schematic)('add-eui-imports', { ...base, useClassArray: options.useClassArray || false }),
40
+ (0, schematics_1.schematic)('fix-no-multiple-empty-lines', base),
41
+ ]);
42
+ }
43
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/migrate-ecl/index.ts"],"names":[],"mappings":";;AAyBA,gCAqBC;AA9CD,2DAAoE;AAQpE;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,UAAU,CAAC,OAAyB;IAClD,MAAM,IAAI,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,KAAK,EAAE,CAAC;IAEhF,OAAO,IAAA,kBAAK,EAAC;QACX,IAAA,sBAAS,EAAC,wBAAwB,EAAE,IAAI,CAAC;QACzC,IAAA,sBAAS,EAAC,yBAAyB,EAAE,IAAI,CAAC;QAC1C,IAAA,sBAAS,EAAC,0BAA0B,EAAE,IAAI,CAAC;QAC3C,IAAA,sBAAS,EAAC,yBAAyB,EAAE,IAAI,CAAC;QAC1C,IAAA,sBAAS,EAAC,sBAAsB,EAAE,IAAI,CAAC;QACvC,IAAA,sBAAS,EAAC,wBAAwB,EAAE,IAAI,CAAC;QACzC,IAAA,sBAAS,EAAC,+BAA+B,EAAE,IAAI,CAAC;QAChD,IAAA,sBAAS,EAAC,kBAAkB,EAAE,IAAI,CAAC;QACnC,IAAA,sBAAS,EAAC,kBAAkB,EAAE,IAAI,CAAC;QACnC,IAAA,sBAAS,EAAC,kBAAkB,EAAE,IAAI,CAAC;QACnC,IAAA,sBAAS,EAAC,kBAAkB,EAAE,IAAI,CAAC;QACnC,IAAA,sBAAS,EAAC,kBAAkB,EAAE,IAAI,CAAC;QACnC,IAAA,sBAAS,EAAC,oBAAoB,EAAE,IAAI,CAAC;QACrC,IAAA,sBAAS,EAAC,gCAAgC,EAAE,IAAI,CAAC;QACjD,IAAA,sBAAS,EAAC,iBAAiB,EAAE,EAAE,GAAG,IAAI,EAAE,aAAa,EAAE,OAAO,CAAC,aAAa,IAAI,KAAK,EAAE,CAAC;QACxF,IAAA,sBAAS,EAAC,6BAA6B,EAAE,IAAI,CAAC;KAC/C,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,25 @@
1
+ {
2
+ "$id": "MigrateEclSchema",
3
+ "title": "Migrate eUI-ECL application",
4
+ "description": "Runs all eUI-ECL migration schematics in sequence to fully migrate an eUI-ECL app (per-component ECL migrations, signal access migration, import additions, cleanup).",
5
+ "type": "object",
6
+ "properties": {
7
+ "path": {
8
+ "type": "string",
9
+ "description": "The path to scan for files to migrate.",
10
+ "default": "./src",
11
+ "visible": true
12
+ },
13
+ "dryRun": {
14
+ "type": "boolean",
15
+ "default": false,
16
+ "description": "Whether to run in dry-run mode without making actual changes."
17
+ },
18
+ "useClassArray": {
19
+ "type": "boolean",
20
+ "default": false,
21
+ "description": "When true, uses spread CLASS arrays (e.g. ...EUI_ECL_BUTTON) instead of individual class names for add-eui-imports."
22
+ }
23
+ },
24
+ "required": []
25
+ }
@@ -0,0 +1,18 @@
1
+ import { Rule } from '@angular-devkit/schematics';
2
+ interface Schema {
3
+ path?: string;
4
+ dryRun?: boolean;
5
+ }
6
+ /**
7
+ * Advisory migration for the eui-datepicker moment-locale breaking change.
8
+ *
9
+ * `eui-datepicker` no longer bundles the moment locale data (the internal
10
+ * `import 'moment/min/locales'` was removed). Apps that relied on the datepicker
11
+ * implicitly registering every moment locale must now import the locales they use
12
+ * themselves, e.g. `import 'moment/locale/fr';`. This schematic cannot know which
13
+ * locales an app needs (and auto-importing all of them would reintroduce the bundle
14
+ * cost the change removed), so it only reports the files that use `eui-datepicker`
15
+ * and the manual action required.
16
+ */
17
+ export declare function migrateEuiDatepicker(options?: Schema): Rule;
18
+ export {};
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.migrateEuiDatepicker = migrateEuiDatepicker;
4
+ const compiler_1 = require("@angular/compiler");
5
+ const dry_run_1 = require("../utils/dry-run");
6
+ /**
7
+ * Advisory migration for the eui-datepicker moment-locale breaking change.
8
+ *
9
+ * `eui-datepicker` no longer bundles the moment locale data (the internal
10
+ * `import 'moment/min/locales'` was removed). Apps that relied on the datepicker
11
+ * implicitly registering every moment locale must now import the locales they use
12
+ * themselves, e.g. `import 'moment/locale/fr';`. This schematic cannot know which
13
+ * locales an app needs (and auto-importing all of them would reintroduce the bundle
14
+ * cost the change removed), so it only reports the files that use `eui-datepicker`
15
+ * and the manual action required.
16
+ */
17
+ function migrateEuiDatepicker(options = {}) {
18
+ return (tree, context) => {
19
+ const scanPath = options.path ? '/' + options.path.replace(/^\.?\//, '').replace(/\/$/, '') : '';
20
+ const matches = [];
21
+ const dir = tree.getDir(scanPath || '/');
22
+ visitDir(dir, (path) => {
23
+ const buffer = tree.read(path);
24
+ if (!buffer)
25
+ return;
26
+ const content = buffer.toString('utf-8');
27
+ if (!content.includes('eui-datepicker'))
28
+ return;
29
+ const usesDatepicker = path.endsWith('.html')
30
+ ? templateUsesDatepicker(content)
31
+ : inlineTemplateUsesDatepicker(content);
32
+ if (usesDatepicker) {
33
+ matches.push(path);
34
+ }
35
+ });
36
+ if (matches.length === 0) {
37
+ context.logger.info('No eui-datepicker usage found; no moment-locale action required.');
38
+ return tree;
39
+ }
40
+ context.logger.warn('Breaking change: eui-datepicker no longer bundles moment locale data. '
41
+ + 'Import the moment locales your app uses (e.g. `import \'moment/locale/fr\';`) '
42
+ + 'in the module/bootstrap where the datepicker is used; otherwise dates fall back '
43
+ + 'to the active moment locale and may format incorrectly.');
44
+ for (const path of matches) {
45
+ context.logger.warn(` Manual action needed: ${path} uses eui-datepicker — ensure the required moment locale(s) are imported.`);
46
+ }
47
+ context.logger.info(`eui-datepicker moment-locale check: ${matches.length} file(s) use eui-datepicker.`);
48
+ if (options.dryRun) {
49
+ (0, dry_run_1.logDryRunNote)(context);
50
+ }
51
+ return tree;
52
+ };
53
+ }
54
+ function visitDir(dir, callback) {
55
+ for (const file of dir.subfiles) {
56
+ if (file.endsWith('.d.ts'))
57
+ continue;
58
+ if (!file.endsWith('.html') && !file.endsWith('.ts'))
59
+ continue;
60
+ callback(`${dir.path}/${file}`);
61
+ }
62
+ for (const sub of dir.subdirs) {
63
+ if (sub === 'node_modules' || sub === 'dist')
64
+ continue;
65
+ visitDir(dir.dir(sub), callback);
66
+ }
67
+ }
68
+ function templateUsesDatepicker(source) {
69
+ try {
70
+ const parsed = (0, compiler_1.parseTemplate)(source, '', { preserveWhitespaces: true });
71
+ return nodesContainDatepicker(parsed.nodes);
72
+ }
73
+ catch {
74
+ // Fall back to a substring check if the template cannot be parsed.
75
+ return source.includes('eui-datepicker');
76
+ }
77
+ }
78
+ function inlineTemplateUsesDatepicker(source) {
79
+ const templateRegex = /template\s*:\s*`([^`]*)`/gs;
80
+ let match;
81
+ while ((match = templateRegex.exec(source)) !== null) {
82
+ if (match[1].includes('eui-datepicker') && templateUsesDatepicker(match[1])) {
83
+ return true;
84
+ }
85
+ }
86
+ return false;
87
+ }
88
+ function nodesContainDatepicker(nodes) {
89
+ for (const node of nodes) {
90
+ if (node instanceof compiler_1.TmplAstElement) {
91
+ if (node.name === 'eui-datepicker') {
92
+ return true;
93
+ }
94
+ if (nodesContainDatepicker(node.children)) {
95
+ return true;
96
+ }
97
+ }
98
+ }
99
+ return false;
100
+ }
101
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/migrate-eui-datepicker/index.ts"],"names":[],"mappings":";;AAoBA,oDA2CC;AA/DD,gDAA+E;AAE/E,8CAAiD;AAOjD;;;;;;;;;;GAUG;AACH,SAAgB,oBAAoB,CAAC,UAAkB,EAAE;IACvD,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAC/C,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACjG,MAAM,OAAO,GAAa,EAAE,CAAC;QAE7B,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,GAAG,CAAC,CAAC;QACzC,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE;YACrB,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC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;IAClD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAI,YAAY,yBAAc,EAAE,CAAC;YACnC,IAAI,IAAI,CAAC,IAAI,KAAK,gBAAgB,EAAE,CAAC;gBACnC,OAAO,IAAI,CAAC;YACd,CAAC;YACD,IAAI,sBAAsB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAC1C,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "$id": "MigrateEuiDatepickerSchema",
4
+ "title": "Migrate EUI datepicker moment-locale breaking change",
5
+ "type": "object",
6
+ "properties": {
7
+ "path": {
8
+ "type": "string",
9
+ "description": "The path to scan for files.",
10
+ "default": "./",
11
+ "visible": true
12
+ },
13
+ "dryRun": {
14
+ "type": "boolean",
15
+ "default": false,
16
+ "description": "Whether to run in dry-run mode without making actual changes."
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "$id": "MigrateEuiTooltipSchema",
4
+ "title": "Migrate EUI tooltip deprecated EuiTooltipConfig class to EuiTooltipInterface",
5
+ "type": "object",
6
+ "properties": {
7
+ "path": {
8
+ "type": "string",
9
+ "description": "The path to scan for files.",
10
+ "default": "./",
11
+ "visible": true
12
+ },
13
+ "dryRun": {
14
+ "type": "boolean",
15
+ "default": false,
16
+ "description": "Whether to run in dry-run mode without making actual changes."
17
+ }
18
+ }
19
+ }