@ui5/webcomponents-tools 2.20.1 → 2.21.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -1
- package/lib/create-illustrations/index.js +37 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
# [2.21.0-rc.1](https://github.com/UI5/webcomponents/compare/v2.21.0-rc.0...v2.21.0-rc.1) (2026-03-19)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @ui5/webcomponents-tools
|
|
9
9
|
|
|
@@ -11,6 +11,17 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
# [2.21.0-rc.0](https://github.com/UI5/webcomponents/compare/v2.20.0...v2.21.0-rc.0) (2026-03-12)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **ui5-illustrated-message:** add v5 loader in tnt illustrations ([#13160](https://github.com/UI5/webcomponents/issues/13160)) ([3dc4694](https://github.com/UI5/webcomponents/commit/3dc4694ecbb9ca3c2e8061fccaf917bfa211861a)), closes [#8145](https://github.com/UI5/webcomponents/issues/8145) [#8145](https://github.com/UI5/webcomponents/issues/8145)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
14
25
|
# [2.20.0](https://github.com/UI5/webcomponents/compare/v2.20.0-rc.3...v2.20.0) (2026-03-05)
|
|
15
26
|
|
|
16
27
|
**Note:** Version bump only for package @ui5/webcomponents-tools
|
|
@@ -80,6 +80,7 @@ const generate = async (argv) => {
|
|
|
80
80
|
const fileNames = new Set();
|
|
81
81
|
|
|
82
82
|
let dotIllustrationNames = [];
|
|
83
|
+
let v5IllustrationNames = new Set();
|
|
83
84
|
|
|
84
85
|
try {
|
|
85
86
|
await fs.access(srcPath);
|
|
@@ -90,6 +91,24 @@ const generate = async (argv) => {
|
|
|
90
91
|
return Promise.resolve(null);
|
|
91
92
|
}
|
|
92
93
|
|
|
94
|
+
// For V4 TNT illustrations, check which ones have V5 versions available
|
|
95
|
+
// so we only register V5 loaders for illustrations that actually exist
|
|
96
|
+
if (collection === "V4" && illustrationSet === "tnt") {
|
|
97
|
+
const v5Path = srcPath.replace("/illustrations/", "/illustrations-v5/");
|
|
98
|
+
try {
|
|
99
|
+
const v5Files = await fs.readdir(path.normalize(v5Path));
|
|
100
|
+
const v5Pattern = new RegExp(`${illustrationsPrefix}-.+-(.+).svg`);
|
|
101
|
+
v5Files.forEach(file => {
|
|
102
|
+
const match = file.match(v5Pattern);
|
|
103
|
+
if (match) {
|
|
104
|
+
v5IllustrationNames.add(match[1]);
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
} catch (error) {
|
|
108
|
+
// V5 path doesn't exist, no V5 illustrations available
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
93
112
|
if (process.env.UI5_VERBOSE === "true") {
|
|
94
113
|
console.log(`Generating illustrations from ${srcPath} to ${destPath}`);
|
|
95
114
|
}
|
|
@@ -125,6 +144,23 @@ const generate = async (argv) => {
|
|
|
125
144
|
// If no Dot is present, Spot will be imported as Dot
|
|
126
145
|
const hasDot = dotIllustrationNames.indexOf(illustrationName) !== -1 ? 'Dot' : 'Spot';
|
|
127
146
|
|
|
147
|
+
// For V4 TNT illustrations that have V5 versions, register loaders for V5 and V5/HC
|
|
148
|
+
// so that when the illustration is imported directly (e.g., "@ui5/webcomponents-fiori/dist/illustrations/tnt/NoApplications.js")
|
|
149
|
+
// and Horizon themes are used, the correct V5 illustration is loaded dynamically.
|
|
150
|
+
// Note: Only TNT set has V5 illustrations, and not all TNT illustrations have V5 versions.
|
|
151
|
+
// The dynamic imports ensure that V5 SVGs are loaded lazily only when actually needed.
|
|
152
|
+
const hasV5Version = v5IllustrationNames.has(illustrationName);
|
|
153
|
+
const v5LoaderRegistration = collection === "V4" && illustrationSet === "tnt" && hasV5Version ? `
|
|
154
|
+
import { registerIllustrationLoader } from "@ui5/webcomponents-base/dist/asset-registries/Illustrations.js";
|
|
155
|
+
|
|
156
|
+
registerIllustrationLoader("${illustrationSet}/V5/${illustrationName}", async function loadIllustrationV5() {
|
|
157
|
+
return (await import("../../illustrations-v5/${illustrationSet}/${illustrationName}.js")).default;
|
|
158
|
+
});
|
|
159
|
+
registerIllustrationLoader("${illustrationSet}/V5/HC/${illustrationName}", async function loadIllustrationV5HC() {
|
|
160
|
+
return (await import("../../illustrations-v5/${illustrationSet}/hc/${illustrationName}.js")).default;
|
|
161
|
+
});
|
|
162
|
+
` : '';
|
|
163
|
+
|
|
128
164
|
return `import { unsafeRegisterIllustration } from "@ui5/webcomponents-base/dist/asset-registries/Illustrations.js";
|
|
129
165
|
import dialogSvg from "./${illustrationsPrefix}-Dialog-${illustrationName}.js";
|
|
130
166
|
import sceneSvg from "./${illustrationsPrefix}-Scene-${illustrationName}.js";
|
|
@@ -132,7 +168,7 @@ import spotSvg from "./${illustrationsPrefix}-Spot-${illustrationName}.js";
|
|
|
132
168
|
import dotSvg from "./${illustrationsPrefix}-${hasDot}-${illustrationName}.js";${defaultText ? `import {
|
|
133
169
|
IM_TITLE_${illustrationNameUpperCase},
|
|
134
170
|
IM_SUBTITLE_${illustrationNameUpperCase},
|
|
135
|
-
} from "../generated/i18n/i18n-defaults.js";` : ``}
|
|
171
|
+
} from "../generated/i18n/i18n-defaults.js";` : ``}${v5LoaderRegistration}
|
|
136
172
|
|
|
137
173
|
const name = "${illustrationName}";
|
|
138
174
|
const set = "${illustrationSet}";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ui5/webcomponents-tools",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.21.0-rc.1",
|
|
4
4
|
"description": "UI5 Web Components: webcomponents.tools",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"esbuild": "^0.25.0",
|
|
83
83
|
"yargs": "^17.5.1"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "ca81ad3bb0594ea51472c46d517d34d7e0a719b8"
|
|
86
86
|
}
|