@ui5/webcomponents-base 0.0.0-6895c16dd → 0.0.0-6cb3eb0db
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/.eslintignore +2 -0
- package/CHANGELOG.md +39 -0
- package/README.md +26 -1
- package/bundle.esm.js +5 -0
- package/dist/Boot.js +15 -20
- package/dist/Device.js +2 -0
- package/dist/EventProvider.js +19 -25
- package/dist/InitialConfiguration.js +20 -15
- package/dist/Keys.js +15 -0
- package/dist/MediaRange.js +0 -1
- package/dist/Render.js +0 -1
- package/dist/StaticArea.js +3 -0
- package/dist/StaticAreaItem.js +30 -3
- package/dist/UI5Element.js +37 -43
- package/dist/UI5ElementMetadata.js +1 -1
- package/dist/asset-registries/Icons.js +10 -0
- package/dist/asset-registries/Illustrations.js +30 -0
- package/dist/delegate/ItemNavigation.js +66 -0
- package/dist/delegate/ScrollEnablement.js +7 -1
- package/dist/features/OpenUI5Support.js +41 -6
- package/dist/generated/AssetParameters.js +1 -1
- package/dist/i18nBundle.js +4 -0
- package/dist/renderer/LitRenderer.js +19 -18
- package/dist/resources/bundle.esm.js +17 -101
- package/dist/resources/bundle.esm.js.map +1 -1
- package/dist/sap/base/Log.js +241 -0
- package/dist/sap/base/assert.js +8 -0
- package/dist/sap/base/security/URLListValidator.js +148 -0
- package/dist/sap/base/security/sanitizeHTML.js +16 -0
- package/dist/sap/base/util/now.js +7 -0
- package/dist/sap/ui/thirdparty/caja-html-sanitizer.js +3585 -0
- package/dist/test-resources/elements/WithStaticArea.js +2 -1
- package/dist/test-resources/pages/AllTestElements.html +3 -0
- package/dist/test-resources/specs/ConfigurationChange.spec.js +10 -8
- package/dist/test-resources/specs/ConfigurationScript.spec.js +25 -23
- package/dist/test-resources/specs/ConfigurationURL.spec.js +65 -17
- package/dist/test-resources/specs/CustomTheme.spec.js +6 -4
- package/dist/test-resources/specs/EventProvider.spec.js +63 -0
- package/dist/test-resources/specs/StaticArea.spec.js +56 -12
- package/dist/test-resources/specs/Theming.spec.js +9 -7
- package/dist/test-resources/specs/UI5ElementInvalidation.js +30 -28
- package/dist/test-resources/specs/UI5ElementLifecycle.js +12 -10
- package/dist/test-resources/specs/UI5ElementListenForChildPropChanges.spec.js +12 -10
- package/dist/test-resources/specs/UI5ElementMetadataExt.js +9 -7
- package/dist/test-resources/specs/UI5ElementPropertyValidation.js +7 -5
- package/dist/test-resources/specs/UI5ElementPropsAndAttrs.spec.js +37 -35
- package/dist/test-resources/specs/UI5ElementShadowDOM.js +10 -8
- package/dist/test-resources/specs/UI5ElementSlots.js +10 -8
- package/dist/types/DataType.js +12 -0
- package/dist/types/Float.js +4 -0
- package/dist/types/Integer.js +4 -0
- package/dist/types/InvisibleMessageMode.js +30 -0
- package/dist/updateShadowRoot.js +1 -1
- package/dist/util/AriaLabelHelper.js +4 -4
- package/dist/util/FocusableElements.js +5 -1
- package/dist/util/HTMLSanitizer.js +7 -0
- package/dist/util/InvisibleMessage.js +58 -0
- package/dist/util/PopupUtils.js +93 -0
- package/dist/util/TabbableElements.js +1 -1
- package/dist/util/clamp.js +12 -0
- package/dist/util/getClassCopy.js +10 -0
- package/dist/util/isElementInView.js +15 -0
- package/dist/util/isNodeTabbable.js +4 -4
- package/hash.txt +1 -0
- package/index.js +1 -1
- package/package-scripts.js +30 -14
- package/package.json +20 -9
- package/src/Boot.js +15 -20
- package/src/Device.js +2 -0
- package/src/EventProvider.js +19 -25
- package/src/InitialConfiguration.js +20 -15
- package/src/Keys.js +15 -0
- package/src/MediaRange.js +0 -1
- package/src/Render.js +0 -1
- package/src/StaticArea.js +3 -0
- package/src/StaticAreaItem.js +30 -3
- package/src/UI5Element.js +37 -43
- package/src/UI5ElementMetadata.js +1 -1
- package/src/asset-registries/Icons.js +10 -0
- package/src/asset-registries/Illustrations.js +30 -0
- package/src/delegate/ItemNavigation.js +66 -0
- package/src/delegate/ScrollEnablement.js +7 -1
- package/src/features/OpenUI5Support.js +41 -6
- package/src/i18nBundle.js +4 -0
- package/src/renderer/LitRenderer.js +19 -18
- package/src/types/DataType.js +12 -0
- package/src/types/Float.js +4 -0
- package/src/types/Integer.js +4 -0
- package/src/types/InvisibleMessageMode.js +30 -0
- package/src/updateShadowRoot.js +1 -1
- package/src/util/AriaLabelHelper.js +4 -4
- package/src/util/FocusableElements.js +5 -1
- package/src/util/HTMLSanitizer.js +7 -0
- package/src/util/InvisibleMessage.js +58 -0
- package/src/util/PopupUtils.js +93 -0
- package/src/util/TabbableElements.js +1 -1
- package/src/util/clamp.js +12 -0
- package/src/util/getClassCopy.js +10 -0
- package/src/util/isElementInView.js +15 -0
- package/src/util/isNodeTabbable.js +4 -4
- package/used-modules.txt +7 -0
- package/dist/config/AssetsPath.js +0 -17
- package/dist/renderer/ifDefined.js +0 -21
- package/dist/renderer/scopeHTML.js +0 -32
- package/src/config/AssetsPath.js +0 -17
- package/src/renderer/ifDefined.js +0 -21
- package/src/renderer/scopeHTML.js +0 -32
package/.eslintignore
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Note: Changes to this file also must be applied to the top level .eslintignore file.
|
|
2
2
|
test
|
|
3
3
|
lib
|
|
4
|
+
overlay
|
|
4
5
|
dist
|
|
5
6
|
src/thirdparty
|
|
6
7
|
bundle.esm.js
|
|
@@ -9,3 +10,4 @@ rollup.config*.js
|
|
|
9
10
|
wdio.conf.js
|
|
10
11
|
postcss.config.js
|
|
11
12
|
package-scripts.js
|
|
13
|
+
.eslintrc.js
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,45 @@
|
|
|
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.0.0-rc.15](https://github.com/SAP/ui5-webcomponents/compare/v1.0.0-rc.14...v1.0.0-rc.15) (2021-07-23)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **framework:** expose dist paths as root paths via package.json export field ([#3274](https://github.com/SAP/ui5-webcomponents/issues/3274)) ([bd34a5e](https://github.com/SAP/ui5-webcomponents/commit/bd34a5e))
|
|
12
|
+
* **framework:** support sap-* config URL params ([#3138](https://github.com/SAP/ui5-webcomponents/issues/3138)) ([5d9cdb9](https://github.com/SAP/ui5-webcomponents/commit/5d9cdb9)), closes [#3114](https://github.com/SAP/ui5-webcomponents/issues/3114)
|
|
13
|
+
* **framework:** introduce InvisibleMessage util ([#3192](https://github.com/SAP/ui5-webcomponents/issues/3192)) ([0a33c40](https://github.com/SAP/ui5-webcomponents/commit/0a33c40))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# [1.0.0-rc.13](https://github.com/SAP/ui5-webcomponents/compare/v1.0.0-rc.12...v1.0.0-rc.13) (2021-03-26)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* **framework:** adapt ie11 package for usage in modern browsers ([#2878](https://github.com/SAP/ui5-webcomponents/issues/2878)) ([70bbfbb](https://github.com/SAP/ui5-webcomponents/commit/70bbfbb))
|
|
22
|
+
* **framework:** add fallback for CLDR dev use case ([#2844](https://github.com/SAP/ui5-webcomponents/issues/2844)) ([deb173a](https://github.com/SAP/ui5-webcomponents/commit/deb173a))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* **framework:** Create attachDirectionChange function ([#2646](https://github.com/SAP/ui5-webcomponents/issues/2646)) ([b4f836a](https://github.com/SAP/ui5-webcomponents/commit/b4f836a))
|
|
28
|
+
* **framework:** ItemNavigation cyclic behavior implemented for multiple rows ([#2780](https://github.com/SAP/ui5-webcomponents/issues/2780)) ([b7ad1ea](https://github.com/SAP/ui5-webcomponents/commit/b7ad1ea))
|
|
29
|
+
* **framework:** Maintain a common z-index for all UI5 Web Components instances and OpenUI5 ([#2980](https://github.com/SAP/ui5-webcomponents/issues/2980)) ([13bdc02](https://github.com/SAP/ui5-webcomponents/commit/13bdc02))
|
|
30
|
+
* **ui5-color-palette:** initial implementation ([#2731](https://github.com/SAP/ui5-webcomponents/issues/2731)) ([772424e](https://github.com/SAP/ui5-webcomponents/commit/772424e))
|
|
31
|
+
* **ui5-color-picker:** initial implementation ([#2769](https://github.com/SAP/ui5-webcomponents/issues/2769)) ([6a70e5a](https://github.com/SAP/ui5-webcomponents/commit/6a70e5a))
|
|
32
|
+
* **ui5-list:** introduce "growing" property ([#2950](https://github.com/SAP/ui5-webcomponents/issues/2950)) ([6fbbb21](https://github.com/SAP/ui5-webcomponents/commit/6fbbb21)), closes [#2882](https://github.com/SAP/ui5-webcomponents/issues/2882) [#2882](https://github.com/SAP/ui5-webcomponents/issues/2882)
|
|
33
|
+
* **ui5-step-input:** inintial implementation ([#2804](https://github.com/SAP/ui5-webcomponents/issues/2804)) ([d80420e](https://github.com/SAP/ui5-webcomponents/commit/d80420e)), closes [#2640](https://github.com/SAP/ui5-webcomponents/issues/2640)
|
|
34
|
+
* **ui5-tabcontainer:** support responsive paddings ([#2775](https://github.com/SAP/ui5-webcomponents/issues/2775)) ([19392ff](https://github.com/SAP/ui5-webcomponents/commit/19392ff)), closes [#2539](https://github.com/SAP/ui5-webcomponents/issues/2539)
|
|
35
|
+
* add dynamic imports for .json assets ([#2740](https://github.com/SAP/ui5-webcomponents/issues/2740)) ([46e38fb](https://github.com/SAP/ui5-webcomponents/commit/46e38fb))
|
|
36
|
+
* **ui5-table:** add growing on scroll ([#2593](https://github.com/SAP/ui5-webcomponents/issues/2593)) ([87520c2](https://github.com/SAP/ui5-webcomponents/commit/87520c2)), closes [#2589](https://github.com/SAP/ui5-webcomponents/issues/2589) [#2570](https://github.com/SAP/ui5-webcomponents/issues/2570)
|
|
37
|
+
* create @ui5/webcomponents-ie11 package ([#2686](https://github.com/SAP/ui5-webcomponents/issues/2686)) ([1d3b37e](https://github.com/SAP/ui5-webcomponents/commit/1d3b37e))
|
|
38
|
+
* **ui5-slider:** focus and keyboard handling implementation ([#2614](https://github.com/SAP/ui5-webcomponents/issues/2614)) ([7b78c16](https://github.com/SAP/ui5-webcomponents/commit/7b78c16))
|
|
39
|
+
* refactoring and new features for pickers ([#2598](https://github.com/SAP/ui5-webcomponents/issues/2598)) ([3e684b4](https://github.com/SAP/ui5-webcomponents/commit/3e684b4))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
6
45
|
# [1.0.0-rc.12](https://github.com/SAP/ui5-webcomponents/compare/v1.0.0-rc.11...v1.0.0-rc.12) (2021-02-18)
|
|
7
46
|
|
|
8
47
|
|
package/README.md
CHANGED
|
@@ -7,7 +7,32 @@
|
|
|
7
7
|
|
|
8
8
|
Contains the base files for all Web Components, most notably `@ui5/webcomponents-base/dist/UI5Element.js`.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## Provided APIs for applications
|
|
11
|
+
|
|
12
|
+
### `Boot.js`
|
|
13
|
+
|
|
14
|
+
- `attachBoot`
|
|
15
|
+
|
|
16
|
+
### `CustomElementsScope.js`
|
|
17
|
+
|
|
18
|
+
- `setCustomElementsScopingSuffix`
|
|
19
|
+
- `getCustomElementsScopingSuffix`
|
|
20
|
+
- `setCustomElementsScopingRules`
|
|
21
|
+
- `getCustomElementsScopingRules`
|
|
22
|
+
|
|
23
|
+
### `i18nBundle.js`
|
|
24
|
+
|
|
25
|
+
- `registerI18nLoader`
|
|
26
|
+
- `fetchI18nBundle`
|
|
27
|
+
- `getI18nBundleData`
|
|
28
|
+
|
|
29
|
+
### `PropertiesFileFormat.js`
|
|
30
|
+
|
|
31
|
+
- `parseProperties`
|
|
32
|
+
|
|
33
|
+
### `Render.js`
|
|
34
|
+
|
|
35
|
+
- `renderFinished`
|
|
11
36
|
|
|
12
37
|
## Resources
|
|
13
38
|
- [UI5 Web Components - README.md](https://github.com/SAP/ui5-webcomponents/blob/master/README.md)
|
package/bundle.esm.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { registerThemePropertiesLoader } from "./dist/AssetRegistry.js";
|
|
2
|
+
import EventProvider from "./dist/EventProvider.js";
|
|
2
3
|
|
|
3
4
|
// ESM bundle targets browsers with native support
|
|
4
5
|
import "./dist/features/OpenUI5Support.js";
|
|
@@ -34,6 +35,8 @@ import { getNoConflict, setNoConflict } from "./dist/config/NoConflict.js";
|
|
|
34
35
|
import { getRTL } from "./dist/config/RTL.js";
|
|
35
36
|
import { getFirstDayOfWeek } from "./dist/config/FormatSettings.js";
|
|
36
37
|
import { _getRegisteredNames as getIconNames } from "./dist/asset-registries/Icons.js"
|
|
38
|
+
import applyDirection from "./dist/locale/applyDirection.js";
|
|
39
|
+
|
|
37
40
|
window["sap-ui-webcomponents-bundle"] = {
|
|
38
41
|
configuration : {
|
|
39
42
|
getAnimationMode,
|
|
@@ -51,4 +54,6 @@ window["sap-ui-webcomponents-bundle"] = {
|
|
|
51
54
|
fetchI18nBundle,
|
|
52
55
|
getI18nBundle,
|
|
53
56
|
renderFinished,
|
|
57
|
+
applyDirection,
|
|
58
|
+
EventProvider,
|
|
54
59
|
};
|
package/dist/Boot.js
CHANGED
|
@@ -6,7 +6,7 @@ import { getTheme } from "./config/Theme.js";
|
|
|
6
6
|
import applyTheme from "./theming/applyTheme.js";
|
|
7
7
|
import { getFeature } from "./FeaturesRegistry.js";
|
|
8
8
|
|
|
9
|
-
let
|
|
9
|
+
let booted = false;
|
|
10
10
|
const eventProvider = new EventProvider();
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -18,28 +18,23 @@ const attachBoot = listener => {
|
|
|
18
18
|
eventProvider.attachEvent("boot", listener);
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
const boot = () => {
|
|
22
|
-
if (
|
|
23
|
-
return
|
|
21
|
+
const boot = async () => {
|
|
22
|
+
if (booted) {
|
|
23
|
+
return;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
await whenDOMReady();
|
|
33
|
-
await applyTheme(getTheme());
|
|
34
|
-
OpenUI5Support && OpenUI5Support.attachListeners();
|
|
35
|
-
insertFontFace();
|
|
36
|
-
insertSystemCSSVars();
|
|
37
|
-
await eventProvider.fireEventAsync("boot");
|
|
38
|
-
|
|
39
|
-
resolve();
|
|
40
|
-
});
|
|
26
|
+
const OpenUI5Support = getFeature("OpenUI5Support");
|
|
27
|
+
if (OpenUI5Support) {
|
|
28
|
+
await OpenUI5Support.init();
|
|
29
|
+
}
|
|
41
30
|
|
|
42
|
-
|
|
31
|
+
await whenDOMReady();
|
|
32
|
+
await applyTheme(getTheme());
|
|
33
|
+
OpenUI5Support && OpenUI5Support.attachListeners();
|
|
34
|
+
insertFontFace();
|
|
35
|
+
insertSystemCSSVars();
|
|
36
|
+
await eventProvider.fireEventAsync("boot");
|
|
37
|
+
booted = true;
|
|
43
38
|
};
|
|
44
39
|
|
|
45
40
|
export {
|
package/dist/Device.js
CHANGED
|
@@ -75,6 +75,7 @@ const detectTablet = () => {
|
|
|
75
75
|
const supportsTouch = () => touch;
|
|
76
76
|
const isIE = () => ie;
|
|
77
77
|
const isSafari = () => safari;
|
|
78
|
+
const isChrome = () => chrome;
|
|
78
79
|
|
|
79
80
|
const isTablet = () => {
|
|
80
81
|
detectTablet();
|
|
@@ -94,6 +95,7 @@ export {
|
|
|
94
95
|
supportsTouch,
|
|
95
96
|
isIE,
|
|
96
97
|
isSafari,
|
|
98
|
+
isChrome,
|
|
97
99
|
isPhone,
|
|
98
100
|
isTablet,
|
|
99
101
|
isDesktop,
|
package/dist/EventProvider.js
CHANGED
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
class EventProvider {
|
|
2
2
|
constructor() {
|
|
3
|
-
this._eventRegistry =
|
|
3
|
+
this._eventRegistry = new Map();
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
attachEvent(eventName, fnFunction) {
|
|
7
7
|
const eventRegistry = this._eventRegistry;
|
|
8
|
-
|
|
8
|
+
const eventListeners = eventRegistry.get(eventName);
|
|
9
9
|
|
|
10
10
|
if (!Array.isArray(eventListeners)) {
|
|
11
|
-
eventRegistry
|
|
12
|
-
|
|
11
|
+
eventRegistry.set(eventName, [fnFunction]);
|
|
12
|
+
return;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
eventListeners.
|
|
16
|
-
|
|
17
|
-
}
|
|
15
|
+
if (!eventListeners.includes(fnFunction)) {
|
|
16
|
+
eventListeners.push(fnFunction);
|
|
17
|
+
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
detachEvent(eventName, fnFunction) {
|
|
21
21
|
const eventRegistry = this._eventRegistry;
|
|
22
|
-
|
|
22
|
+
const eventListeners = eventRegistry.get(eventName);
|
|
23
23
|
|
|
24
24
|
if (!eventListeners) {
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
|
+
const indexOfFnToDetach = eventListeners.indexOf(fnFunction);
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
29
|
+
if (indexOfFnToDetach !== -1) {
|
|
30
|
+
eventListeners.splice(indexOfFnToDetach, 1);
|
|
31
|
+
}
|
|
31
32
|
|
|
32
33
|
if (eventListeners.length === 0) {
|
|
33
|
-
delete
|
|
34
|
+
eventRegistry.delete(eventName);
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
|
|
@@ -43,14 +44,14 @@ class EventProvider {
|
|
|
43
44
|
*/
|
|
44
45
|
fireEvent(eventName, data) {
|
|
45
46
|
const eventRegistry = this._eventRegistry;
|
|
46
|
-
const eventListeners = eventRegistry
|
|
47
|
+
const eventListeners = eventRegistry.get(eventName);
|
|
47
48
|
|
|
48
49
|
if (!eventListeners) {
|
|
49
50
|
return [];
|
|
50
51
|
}
|
|
51
52
|
|
|
52
|
-
return eventListeners.map(
|
|
53
|
-
return
|
|
53
|
+
return eventListeners.map(fn => {
|
|
54
|
+
return fn.call(this, data); // eslint-disable-line
|
|
54
55
|
});
|
|
55
56
|
}
|
|
56
57
|
|
|
@@ -67,24 +68,17 @@ class EventProvider {
|
|
|
67
68
|
|
|
68
69
|
isHandlerAttached(eventName, fnFunction) {
|
|
69
70
|
const eventRegistry = this._eventRegistry;
|
|
70
|
-
const eventListeners = eventRegistry
|
|
71
|
+
const eventListeners = eventRegistry.get(eventName);
|
|
71
72
|
|
|
72
73
|
if (!eventListeners) {
|
|
73
74
|
return false;
|
|
74
75
|
}
|
|
75
76
|
|
|
76
|
-
|
|
77
|
-
const event = eventListeners[i];
|
|
78
|
-
if (event["function"] === fnFunction) { // eslint-disable-line
|
|
79
|
-
return true;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
return false;
|
|
77
|
+
return eventListeners.includes(fnFunction);
|
|
84
78
|
}
|
|
85
79
|
|
|
86
80
|
hasListeners(eventName) {
|
|
87
|
-
return !!this._eventRegistry
|
|
81
|
+
return !!this._eventRegistry.get(eventName);
|
|
88
82
|
}
|
|
89
83
|
}
|
|
90
84
|
|
|
@@ -13,7 +13,6 @@ let initialConfig = {
|
|
|
13
13
|
noConflict: false, // no URL
|
|
14
14
|
formatSettings: {},
|
|
15
15
|
fetchDefaultLanguage: false,
|
|
16
|
-
assetsPath: "",
|
|
17
16
|
};
|
|
18
17
|
|
|
19
18
|
/* General settings */
|
|
@@ -62,11 +61,6 @@ const getFormatSettings = () => {
|
|
|
62
61
|
return initialConfig.formatSettings;
|
|
63
62
|
};
|
|
64
63
|
|
|
65
|
-
const getAssetsPath = () => {
|
|
66
|
-
initConfiguration();
|
|
67
|
-
return initialConfig.assetsPath;
|
|
68
|
-
};
|
|
69
|
-
|
|
70
64
|
const booleanMapping = new Map();
|
|
71
65
|
booleanMapping.set("true", true);
|
|
72
66
|
booleanMapping.set("false", false);
|
|
@@ -92,23 +86,36 @@ const parseConfigurationScript = () => {
|
|
|
92
86
|
const parseURLParameters = () => {
|
|
93
87
|
const params = new URLSearchParams(window.location.search);
|
|
94
88
|
|
|
89
|
+
// Process "sap-*" params first
|
|
95
90
|
params.forEach((value, key) => {
|
|
96
|
-
|
|
91
|
+
const parts = key.split("sap-").length;
|
|
92
|
+
if (parts === 0 || parts === key.split("sap-ui-").length) {
|
|
97
93
|
return;
|
|
98
94
|
}
|
|
99
95
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
const param = key.split("sap-ui-")[1];
|
|
96
|
+
applyURLParam(key, value, "sap");
|
|
97
|
+
});
|
|
103
98
|
|
|
104
|
-
|
|
105
|
-
|
|
99
|
+
// Process "sap-ui-*" params
|
|
100
|
+
params.forEach((value, key) => {
|
|
101
|
+
if (!key.startsWith("sap-ui")) {
|
|
102
|
+
return;
|
|
106
103
|
}
|
|
107
104
|
|
|
108
|
-
|
|
105
|
+
applyURLParam(key, value, "sap-ui");
|
|
109
106
|
});
|
|
110
107
|
};
|
|
111
108
|
|
|
109
|
+
const applyURLParam = (key, value, paramType) => {
|
|
110
|
+
const lowerCaseValue = value.toLowerCase();
|
|
111
|
+
const param = key.split(`${paramType}-`)[1];
|
|
112
|
+
|
|
113
|
+
if (booleanMapping.has(value)) {
|
|
114
|
+
value = booleanMapping.get(lowerCaseValue);
|
|
115
|
+
}
|
|
116
|
+
initialConfig[param] = value;
|
|
117
|
+
};
|
|
118
|
+
|
|
112
119
|
const applyOpenUI5Configuration = () => {
|
|
113
120
|
const OpenUI5Support = getFeature("OpenUI5Support");
|
|
114
121
|
if (!OpenUI5Support || !OpenUI5Support.isLoaded()) {
|
|
@@ -119,7 +126,6 @@ const applyOpenUI5Configuration = () => {
|
|
|
119
126
|
initialConfig = merge(initialConfig, OpenUI5Config);
|
|
120
127
|
};
|
|
121
128
|
|
|
122
|
-
|
|
123
129
|
const initConfiguration = () => {
|
|
124
130
|
if (initialized) {
|
|
125
131
|
return;
|
|
@@ -146,5 +152,4 @@ export {
|
|
|
146
152
|
getNoConflict,
|
|
147
153
|
getCalendarType,
|
|
148
154
|
getFormatSettings,
|
|
149
|
-
getAssetsPath,
|
|
150
155
|
};
|
package/dist/Keys.js
CHANGED
|
@@ -131,6 +131,10 @@ const isUpShift = event => (event.key ? (event.key === "ArrowUp" || event.key ==
|
|
|
131
131
|
|
|
132
132
|
const isDownShift = event => (event.key ? (event.key === "ArrowDown" || event.key === "Down") : event.keyCode === KeyCodes.ARROW_DOWN) && checkModifierKeys(event, false, false, true);
|
|
133
133
|
|
|
134
|
+
const isLeftShift = event => (event.key ? (event.key === "ArrowLeft" || event.key === "Left") : event.keyCode === KeyCodes.ARROW_LEFT) && checkModifierKeys(event, false, false, true);
|
|
135
|
+
|
|
136
|
+
const isRightShift = event => (event.key ? (event.key === "ArrowRight" || event.key === "Right") : event.keyCode === KeyCodes.ARROW_RIGHT) && checkModifierKeys(event, false, false, true);
|
|
137
|
+
|
|
134
138
|
const isUpShiftCtrl = event => (event.key ? (event.key === "ArrowUp" || event.key === "Up") : event.keyCode === KeyCodes.ARROW_UP) && checkModifierKeys(event, true, false, true);
|
|
135
139
|
|
|
136
140
|
const isDownShiftCtrl = event => (event.key ? (event.key === "ArrowDown" || event.key === "Down") : event.keyCode === KeyCodes.ARROW_DOWN) && checkModifierKeys(event, true, false, true);
|
|
@@ -159,8 +163,12 @@ const isPageDown = event => (event.key ? event.key === "PageDown" : event.keyCod
|
|
|
159
163
|
|
|
160
164
|
const isPageUpShift = event => (event.key ? event.key === "PageUp" : event.keyCode === KeyCodes.PAGE_UP) && checkModifierKeys(event, false, false, true);
|
|
161
165
|
|
|
166
|
+
const isPageUpAlt = event => (event.key ? event.key === "PageUp" : event.keyCode === KeyCodes.PAGE_UP) && checkModifierKeys(event, false, true, false);
|
|
167
|
+
|
|
162
168
|
const isPageDownShift = event => (event.key ? event.key === "PageDown" : event.keyCode === KeyCodes.PAGE_DOWN) && checkModifierKeys(event, false, false, true);
|
|
163
169
|
|
|
170
|
+
const isPageDownAlt = event => (event.key ? event.key === "PageDown" : event.keyCode === KeyCodes.PAGE_DOWN) && checkModifierKeys(event, false, true, false);
|
|
171
|
+
|
|
164
172
|
const isPageUpShiftCtrl = event => (event.key ? event.key === "PageUp" : event.keyCode === KeyCodes.PAGE_UP) && checkModifierKeys(event, true, false, true);
|
|
165
173
|
|
|
166
174
|
const isPageDownShiftCtrl = event => (event.key ? event.key === "PageDown" : event.keyCode === KeyCodes.PAGE_DOWN) && checkModifierKeys(event, true, false, true);
|
|
@@ -183,6 +191,8 @@ const isF4 = event => {
|
|
|
183
191
|
|
|
184
192
|
const isF4Shift = event => (event.key ? event.key === "F4" : event.keyCode === KeyCodes.F4) && checkModifierKeys(event, false, false, true);
|
|
185
193
|
|
|
194
|
+
const isF7 = event => (event.key ? event.key === "F7" : event.keyCode === KeyCodes.F7) && !hasModifierKeys(event);
|
|
195
|
+
|
|
186
196
|
const isShowByArrows = event => {
|
|
187
197
|
return ((event.key === "ArrowDown" || event.key === "Down") || (event.key === "ArrowUp" || event.key === "Up")) && checkModifierKeys(event, /* Ctrl */ false, /* Alt */ true, /* Shift */ false);
|
|
188
198
|
};
|
|
@@ -208,6 +218,8 @@ export {
|
|
|
208
218
|
isDownCtrl,
|
|
209
219
|
isUpShift,
|
|
210
220
|
isDownShift,
|
|
221
|
+
isLeftShift,
|
|
222
|
+
isRightShift,
|
|
211
223
|
isUpShiftCtrl,
|
|
212
224
|
isDownShiftCtrl,
|
|
213
225
|
isHome,
|
|
@@ -224,10 +236,13 @@ export {
|
|
|
224
236
|
isShow,
|
|
225
237
|
isF4,
|
|
226
238
|
isF4Shift,
|
|
239
|
+
isF7,
|
|
227
240
|
isPageUp,
|
|
228
241
|
isPageDown,
|
|
229
242
|
isPageUpShift,
|
|
243
|
+
isPageUpAlt,
|
|
230
244
|
isPageDownShift,
|
|
245
|
+
isPageDownAlt,
|
|
231
246
|
isPageUpShiftCtrl,
|
|
232
247
|
isPageDownShiftCtrl,
|
|
233
248
|
};
|
package/dist/MediaRange.js
CHANGED
package/dist/Render.js
CHANGED
package/dist/StaticAreaItem.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import "./StaticArea.js";
|
|
1
2
|
import updateShadowRoot from "./updateShadowRoot.js";
|
|
2
3
|
import { renderFinished } from "./Render.js";
|
|
3
4
|
import getEffectiveContentDensity from "./util/getEffectiveContentDensity.js";
|
|
5
|
+
import { getEffectiveScopingSuffixForTag } from "./CustomElementsScope.js";
|
|
6
|
+
import getEffectiveDir from "./locale/getEffectiveDir.js";
|
|
4
7
|
|
|
5
8
|
/**
|
|
6
9
|
*
|
|
@@ -31,6 +34,7 @@ class StaticAreaItem extends HTMLElement {
|
|
|
31
34
|
update() {
|
|
32
35
|
if (this._rendered) {
|
|
33
36
|
this._updateContentDensity();
|
|
37
|
+
this._updateDirection();
|
|
34
38
|
updateShadowRoot(this.ownerElement, true);
|
|
35
39
|
}
|
|
36
40
|
}
|
|
@@ -49,6 +53,15 @@ class StaticAreaItem extends HTMLElement {
|
|
|
49
53
|
}
|
|
50
54
|
}
|
|
51
55
|
|
|
56
|
+
_updateDirection() {
|
|
57
|
+
const dir = getEffectiveDir(this.ownerElement);
|
|
58
|
+
if (dir) {
|
|
59
|
+
this.setAttribute("dir", dir);
|
|
60
|
+
} else {
|
|
61
|
+
this.removeAttribute("dir");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
52
65
|
/**
|
|
53
66
|
* @protected
|
|
54
67
|
* Returns reference to the DOM element where the current fragment is added.
|
|
@@ -71,10 +84,24 @@ class StaticAreaItem extends HTMLElement {
|
|
|
71
84
|
getStableDomRef(refName) {
|
|
72
85
|
return this.shadowRoot.querySelector(`[data-ui5-stable=${refName}]`);
|
|
73
86
|
}
|
|
74
|
-
}
|
|
75
87
|
|
|
76
|
-
|
|
77
|
-
|
|
88
|
+
static getTag() {
|
|
89
|
+
const pureTag = "ui5-static-area-item";
|
|
90
|
+
const suffix = getEffectiveScopingSuffixForTag(pureTag);
|
|
91
|
+
if (!suffix) {
|
|
92
|
+
return pureTag;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return `${pureTag}-${suffix}`;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
static createInstance() {
|
|
99
|
+
if (!customElements.get(StaticAreaItem.getTag())) {
|
|
100
|
+
customElements.define(StaticAreaItem.getTag(), StaticAreaItem);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return document.createElement(this.getTag());
|
|
104
|
+
}
|
|
78
105
|
}
|
|
79
106
|
|
|
80
107
|
export default StaticAreaItem;
|