@ui5/webcomponents-tools 1.0.0 → 1.1.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
CHANGED
@@ -3,6 +3,39 @@
|
|
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.1.1](https://github.com/SAP/ui5-webcomponents/compare/v1.1.0...v1.1.1) (2022-01-24)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @ui5/webcomponents-tools
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
# [1.1.0](https://github.com/SAP/ui5-webcomponents/compare/v1.0.2...v1.1.0) (2022-01-21)
|
15
|
+
|
16
|
+
|
17
|
+
**Note:** Version bump only for package @ui5/webcomponents-tools
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
## [1.0.2](https://github.com/SAP/ui5-webcomponents/compare/v1.0.1...v1.0.2) (2021-11-29)
|
24
|
+
|
25
|
+
**Note:** Version bump only for package @ui5/webcomponents-tools
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
## [1.0.1](https://github.com/SAP/ui5-webcomponents/compare/v1.0.0...v1.0.1) (2021-11-10)
|
32
|
+
|
33
|
+
**Note:** Version bump only for package @ui5/webcomponents-tools
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
|
6
39
|
# [1.0.0](https://github.com/SAP/ui5-webcomponents/compare/v1.0.0-rc.16...v1.0.0) (2021-11-10)
|
7
40
|
|
8
41
|
|
@@ -168,6 +168,21 @@ exports.config = {
|
|
168
168
|
}, this);
|
169
169
|
}, true);
|
170
170
|
|
171
|
+
await browser.addCommand("isFocusedDeepElement", async function (element) {
|
172
|
+
return browser.executeAsync(function (elem, element, done) {
|
173
|
+
let activeElement = document.activeElement;
|
174
|
+
|
175
|
+
while (activeElement.shadowRoot) {
|
176
|
+
if (activeElement.shadowRoot.activeElement) {
|
177
|
+
activeElement = activeElement.shadowRoot.activeElement;
|
178
|
+
} else {
|
179
|
+
break;
|
180
|
+
}
|
181
|
+
}
|
182
|
+
done(element === activeElement);
|
183
|
+
}, this, element);
|
184
|
+
}, true);
|
185
|
+
|
171
186
|
await browser.addCommand("setProperty", async function(property, value) {
|
172
187
|
return browser.executeAsync((elem, property, value, done) => {
|
173
188
|
elem[property] = value;
|
@@ -230,6 +245,7 @@ exports.config = {
|
|
230
245
|
"isExisting",
|
231
246
|
"isFocused",
|
232
247
|
"isFocusedDeep", // custom
|
248
|
+
"isFocusedDeepElement", // custom
|
233
249
|
"shadow$",
|
234
250
|
"shadow$$",
|
235
251
|
];
|
@@ -168,6 +168,21 @@ exports.config = {
|
|
168
168
|
}, this);
|
169
169
|
}, true);
|
170
170
|
|
171
|
+
browser.addCommand("isFocusedDeepElement", function (element) {
|
172
|
+
return browser.execute(function (elem, element, done) {
|
173
|
+
let activeElement = document.activeElement;
|
174
|
+
|
175
|
+
while (activeElement.shadowRoot) {
|
176
|
+
if (activeElement.shadowRoot.activeElement) {
|
177
|
+
activeElement = activeElement.shadowRoot.activeElement;
|
178
|
+
} else {
|
179
|
+
break;
|
180
|
+
}
|
181
|
+
}
|
182
|
+
done(element === activeElement);
|
183
|
+
}, this, element);
|
184
|
+
}, true);
|
185
|
+
|
171
186
|
browser.addCommand("setProperty", function(property, value) {
|
172
187
|
return browser.execute((elem, property, value) => {
|
173
188
|
return elem[property] = value;
|
@@ -223,6 +238,7 @@ exports.config = {
|
|
223
238
|
"isExisting",
|
224
239
|
"isFocused",
|
225
240
|
"isFocusedDeep", // custom
|
241
|
+
"isFocusedDeepElement", // custom
|
226
242
|
"shadow$",
|
227
243
|
"shadow$$",
|
228
244
|
];
|
@@ -6,6 +6,51 @@ if (process.argv.length < 7) {
|
|
6
6
|
return;
|
7
7
|
}
|
8
8
|
|
9
|
+
const ORIGINAL_TEXTS = {
|
10
|
+
UnableToLoad: "UnableToLoad",
|
11
|
+
UnableToUpload: "UnableToUpload",
|
12
|
+
NoActivities: "NoActivities",
|
13
|
+
BeforeSearch: "BeforeSearch",
|
14
|
+
NoSearchResults: "NoSearchResults",
|
15
|
+
NoEntries: "NoEntries",
|
16
|
+
NoData: "NoData",
|
17
|
+
NoNotifications: "NoNotifications",
|
18
|
+
BalloonSky: "BalloonSky",
|
19
|
+
SuccessScreen: "SuccessScreen",
|
20
|
+
NoMail: "NoMail",
|
21
|
+
NoSavedItems: "NoSavedItems",
|
22
|
+
NoTasks: "NoTasks"
|
23
|
+
};
|
24
|
+
|
25
|
+
const FALLBACK_TEXTS = {
|
26
|
+
ReloadScreen: ORIGINAL_TEXTS.UnableToLoad,
|
27
|
+
Connection: ORIGINAL_TEXTS.UnableToLoad,
|
28
|
+
ErrorScreen: ORIGINAL_TEXTS.UnableToUpload,
|
29
|
+
EmptyCalendar: ORIGINAL_TEXTS.NoActivities,
|
30
|
+
SearchEarth: ORIGINAL_TEXTS.BeforeSearch,
|
31
|
+
SearchFolder: ORIGINAL_TEXTS.NoSearchResults,
|
32
|
+
EmptyList: ORIGINAL_TEXTS.NoEntries,
|
33
|
+
Tent: ORIGINAL_TEXTS.NoData,
|
34
|
+
SleepingBell: ORIGINAL_TEXTS.NoNotifications,
|
35
|
+
SimpleBalloon: ORIGINAL_TEXTS.BalloonSky,
|
36
|
+
SimpleBell: ORIGINAL_TEXTS.NoNotifications,
|
37
|
+
SimpleCalendar: ORIGINAL_TEXTS.NoActivities,
|
38
|
+
SimpleCheckMark: ORIGINAL_TEXTS.SuccessScreen,
|
39
|
+
SimpleConnection: ORIGINAL_TEXTS.UnableToLoad,
|
40
|
+
SimpleEmptyDoc: ORIGINAL_TEXTS.NoData,
|
41
|
+
SimpleEmptyList: ORIGINAL_TEXTS.NoEntries,
|
42
|
+
SimpleError: ORIGINAL_TEXTS.UnableToUpload,
|
43
|
+
SimpleMagnifier: ORIGINAL_TEXTS.BeforeSearch,
|
44
|
+
SimpleMail: ORIGINAL_TEXTS.NoMail,
|
45
|
+
SimpleNoSavedItems: ORIGINAL_TEXTS.NoSavedItems,
|
46
|
+
SimpleNotFoundMagnifier: ORIGINAL_TEXTS.NoSearchResults,
|
47
|
+
SimpleReload: ORIGINAL_TEXTS.UnableToLoad,
|
48
|
+
SimpleTask: ORIGINAL_TEXTS.NoTasks,
|
49
|
+
SuccessBalloon: ORIGINAL_TEXTS.BalloonSky,
|
50
|
+
SuccessCheckMark: ORIGINAL_TEXTS.SuccessScreen,
|
51
|
+
SuccessHighFive: ORIGINAL_TEXTS.BalloonSky
|
52
|
+
};
|
53
|
+
|
9
54
|
const srcPath = process.argv[2];
|
10
55
|
const defaultText = process.argv[3] === "true";
|
11
56
|
const illustrationsPrefix = process.argv[4];
|
@@ -24,21 +69,31 @@ const svgToJs = fileName => {
|
|
24
69
|
fs.writeFileSync(path.join(destPath, fileName), fileContent);
|
25
70
|
};
|
26
71
|
const illustrationImportTemplate = illustrationName => {
|
27
|
-
|
72
|
+
let illustrationNameForTranslation = illustrationName;
|
73
|
+
|
74
|
+
if (defaultText) {
|
75
|
+
if (FALLBACK_TEXTS[illustrationNameForTranslation]) {
|
76
|
+
illustrationNameForTranslation = FALLBACK_TEXTS[illustrationNameForTranslation];
|
77
|
+
} else if (illustrationName.indexOf("_v") !== -1) {
|
78
|
+
illustrationNameForTranslation = illustrationNameForTranslation.substr(0, illustrationNameForTranslation.indexOf('_v'));
|
79
|
+
}
|
80
|
+
}
|
28
81
|
|
82
|
+
const illustrationNameUpperCase = illustrationNameForTranslation.toUpperCase();
|
83
|
+
|
29
84
|
return defaultText ? `import { registerIllustration } from "@ui5/webcomponents-base/dist/asset-registries/Illustrations.js";
|
30
85
|
import dialogSvg from "./${illustrationsPrefix}-Dialog-${illustrationName}.js";
|
31
86
|
import sceneSvg from "./${illustrationsPrefix}-Scene-${illustrationName}.js";
|
32
87
|
import spotSvg from "./${illustrationsPrefix}-Spot-${illustrationName}.js";
|
33
88
|
import {
|
34
|
-
IM_TITLE_${
|
35
|
-
IM_SUBTITLE_${
|
89
|
+
IM_TITLE_${illustrationNameUpperCase},
|
90
|
+
IM_SUBTITLE_${illustrationNameUpperCase},
|
36
91
|
} from "../generated/i18n/i18n-defaults.js";
|
37
92
|
|
38
93
|
const name = "${illustrationName}";
|
39
94
|
const set = "${illustrationSet}";
|
40
|
-
const title = IM_TITLE_${
|
41
|
-
const subtitle = IM_SUBTITLE_${
|
95
|
+
const title = IM_TITLE_${illustrationNameUpperCase};
|
96
|
+
const subtitle = IM_SUBTITLE_${illustrationNameUpperCase};
|
42
97
|
|
43
98
|
registerIllustration(name, {
|
44
99
|
dialogSvg,
|
@@ -33,6 +33,6 @@ module.exports = {
|
|
33
33
|
<a class="separator" href="https://www.sap.com/about/legal/privacy.html" target="_blank">Privacy Policy</a>
|
34
34
|
<a href="https://www.sap.com/about/legal/impressum.html" target="_blank">Legal</a>
|
35
35
|
</div>
|
36
|
-
<img src="
|
36
|
+
<img src="../../../assets/images/sap-logo-svg.svg" alt="Sap Logo" />
|
37
37
|
</footer>`
|
38
38
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ui5/webcomponents-tools",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.1.1",
|
4
4
|
"description": "UI5 Web Components: webcomponents.tools",
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
6
6
|
"license": "Apache-2.0",
|
@@ -79,4 +79,4 @@
|
|
79
79
|
"peerDependencies": {
|
80
80
|
"chromedriver": "*"
|
81
81
|
}
|
82
|
-
}
|
82
|
+
}
|