@ui5/webcomponents-tools 1.23.0-rc.5 → 1.23.1-rc.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/CHANGELOG.md +19 -0
- package/lib/create-illustrations/index.js +25 -8
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,25 @@
|
|
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
|
+
## [1.23.1-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.23.0...v1.23.1-rc.0) (2024-03-07)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @ui5/webcomponents-tools
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
# [1.23.0](https://github.com/SAP/ui5-webcomponents/compare/v1.23.0-rc.5...v1.23.0) (2024-03-06)
|
15
|
+
|
16
|
+
|
17
|
+
### Features
|
18
|
+
|
19
|
+
* **ui5-illustrated-message:** introduced "Dot" size ([#8343](https://github.com/SAP/ui5-webcomponents/issues/8343)) ([9c88f36](https://github.com/SAP/ui5-webcomponents/commit/9c88f36112888c1a766875611eb2a0aecbbc6f23)), closes [#8328](https://github.com/SAP/ui5-webcomponents/issues/8328)
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
|
6
25
|
# [1.23.0-rc.5](https://github.com/SAP/ui5-webcomponents/compare/v1.23.0-rc.4...v1.23.0-rc.5) (2024-02-29)
|
7
26
|
|
8
27
|
|
@@ -62,6 +62,8 @@ const generate = async () => {
|
|
62
62
|
// collect each illustration name because each one should have Sample.js file
|
63
63
|
const fileNames = new Set();
|
64
64
|
|
65
|
+
let dotIllustrationNames = [];
|
66
|
+
|
65
67
|
try {
|
66
68
|
await fs.access(srcPath);
|
67
69
|
} catch (error) {
|
@@ -77,8 +79,14 @@ const generate = async () => {
|
|
77
79
|
const svgToJs = async fileName => {
|
78
80
|
const svg = await fs.readFile(path.join(srcPath, fileName), { encoding: "utf-8" });
|
79
81
|
const fileContent = svgImportTemplate(svg);
|
82
|
+
const fileNameSplitArr = fileName.split('-');
|
80
83
|
fileName = fileName.replace(/\.svg$/, ".js");
|
81
84
|
|
85
|
+
if (fileNameSplitArr[1] === 'Dot') {
|
86
|
+
// we keep the Dot illustration names to import them later. If no Dot is present, Spot will be used
|
87
|
+
dotIllustrationNames.push(fileNameSplitArr[2].split('.')[0]);
|
88
|
+
}
|
89
|
+
|
82
90
|
return fs.writeFile(path.join(destPath, fileName), fileContent);
|
83
91
|
};
|
84
92
|
const illustrationImportTemplate = illustrationName => {
|
@@ -93,11 +101,14 @@ const generate = async () => {
|
|
93
101
|
}
|
94
102
|
|
95
103
|
const illustrationNameUpperCase = illustrationNameForTranslation.toUpperCase();
|
104
|
+
// If no Dot is present, Spot will be imported as Dot
|
105
|
+
const hasDot = dotIllustrationNames.indexOf(illustrationName) !== -1 ? 'Dot' : 'Spot';
|
96
106
|
|
97
107
|
return `import { registerIllustration } from "@ui5/webcomponents-base/dist/asset-registries/Illustrations.js";
|
98
108
|
import dialogSvg from "./${illustrationsPrefix}-Dialog-${illustrationName}.js";
|
99
109
|
import sceneSvg from "./${illustrationsPrefix}-Scene-${illustrationName}.js";
|
100
|
-
import spotSvg from "./${illustrationsPrefix}-Spot-${illustrationName}.js"
|
110
|
+
import spotSvg from "./${illustrationsPrefix}-Spot-${illustrationName}.js";
|
111
|
+
import dotSvg from "./${illustrationsPrefix}-${hasDot}-${illustrationName}.js";${
|
101
112
|
defaultText ? `import {
|
102
113
|
IM_TITLE_${illustrationNameUpperCase},
|
103
114
|
IM_SUBTITLE_${illustrationNameUpperCase},
|
@@ -112,7 +123,8 @@ const subtitle = IM_SUBTITLE_${illustrationNameUpperCase};` : ``}
|
|
112
123
|
registerIllustration(name, {
|
113
124
|
dialogSvg,
|
114
125
|
sceneSvg,
|
115
|
-
spotSvg
|
126
|
+
spotSvg,
|
127
|
+
dotSvg,${defaultText ? `
|
116
128
|
title,
|
117
129
|
subtitle,` : ``}
|
118
130
|
set,
|
@@ -124,6 +136,7 @@ export {
|
|
124
136
|
dialogSvg,
|
125
137
|
sceneSvg,
|
126
138
|
spotSvg,
|
139
|
+
dotSvg,
|
127
140
|
};`
|
128
141
|
};
|
129
142
|
|
@@ -131,10 +144,11 @@ export {
|
|
131
144
|
return `declare const dialogSvg: string;
|
132
145
|
declare const sceneSvg: string;
|
133
146
|
declare const spotSvg: string;
|
147
|
+
declare const dotSvg: string;
|
134
148
|
declare const _default: "${illustrationSet === "fiori" ? "" : `${illustrationSet}/`}${illustrationName}";
|
135
149
|
|
136
150
|
export default _default;
|
137
|
-
export { dialogSvg, sceneSvg, spotSvg };`
|
151
|
+
export { dialogSvg, sceneSvg, spotSvg, dotSvg };`
|
138
152
|
};
|
139
153
|
|
140
154
|
await fs.mkdir(destPath, { recursive: true });
|
@@ -152,12 +166,15 @@ export { dialogSvg, sceneSvg, spotSvg };`
|
|
152
166
|
}
|
153
167
|
});
|
154
168
|
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
169
|
+
return Promise.all(promises).then(() => {
|
170
|
+
const nestedPromises = [];
|
171
|
+
for (let illustrationName of fileNames) {
|
172
|
+
nestedPromises.push(fs.writeFile(path.join(destPath, `${illustrationName}.js`), illustrationImportTemplate(illustrationName)));
|
173
|
+
nestedPromises.push(fs.writeFile(path.join(destPath, `${illustrationName}.d.ts`), illustrationTypeDefinition(illustrationName)));
|
174
|
+
}
|
159
175
|
|
160
|
-
|
176
|
+
return Promise.all(nestedPromises);
|
177
|
+
});
|
161
178
|
};
|
162
179
|
|
163
180
|
generate().then(() => {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ui5/webcomponents-tools",
|
3
|
-
"version": "1.23.
|
3
|
+
"version": "1.23.1-rc.0",
|
4
4
|
"description": "UI5 Web Components: webcomponents.tools",
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
6
6
|
"license": "Apache-2.0",
|
@@ -79,5 +79,5 @@
|
|
79
79
|
"esbuild": "^0.19.9",
|
80
80
|
"yargs": "^17.5.1"
|
81
81
|
},
|
82
|
-
"gitHead": "
|
82
|
+
"gitHead": "33cfce9ec9ae9b4e086b976b98e0a77bc75a2e06"
|
83
83
|
}
|