@ui5/webcomponents-base 0.0.0-8e1845415 → 0.0.0-90f690396
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 +4 -4
- package/.eslintrc.cjs +3 -0
- package/.npsrc.json +3 -0
- package/CHANGELOG.md +35 -0
- package/bundle.esm.js +2 -0
- package/config/wdio.conf.cjs +400 -0
- package/dist/AssetRegistry.js.map +1 -1
- package/dist/Boot.js +15 -7
- package/dist/Boot.js.map +1 -1
- package/dist/CSP.js.map +1 -1
- package/dist/CustomElementsRegistry.js.map +1 -1
- package/dist/CustomElementsScope.js.map +1 -1
- package/dist/CustomElementsScopeUtils.js.map +1 -1
- package/dist/DOMObserver.js.map +1 -1
- package/dist/Device.js.map +1 -1
- package/dist/EventProvider.js.map +1 -1
- package/dist/FeaturesRegistry.js.map +1 -1
- package/dist/FontFace.js.map +1 -1
- package/dist/InitialConfiguration.js.map +1 -1
- package/dist/Keys.js.map +1 -1
- package/dist/ManagedStyles.js.map +1 -1
- package/dist/MarkedEvents.js.map +1 -1
- package/dist/MediaRange.js.map +1 -1
- package/dist/PropertiesFileFormat.js.map +1 -1
- package/dist/Render.js.map +1 -1
- package/dist/RenderQueue.js.map +1 -1
- package/dist/Runtimes.js.map +1 -1
- package/dist/StaticArea.js.map +1 -1
- package/dist/StaticAreaItem.js.map +1 -1
- package/dist/SystemCSSVars.js.map +1 -1
- package/dist/Theming.js.map +1 -1
- package/dist/UI5Element.js.map +1 -1
- package/dist/UI5ElementMetadata.js.map +1 -1
- package/dist/animations/AnimationQueue.js.map +1 -1
- package/dist/animations/animate.js.map +1 -1
- package/dist/animations/scroll.js.map +1 -1
- package/dist/animations/slideDown.js.map +1 -1
- package/dist/animations/slideUp.js.map +1 -1
- package/dist/asset-registries/Icons.d.ts +17 -9
- package/dist/asset-registries/Icons.js +20 -2
- package/dist/asset-registries/Icons.js.map +1 -1
- package/dist/asset-registries/Illustrations.js.map +1 -1
- package/dist/asset-registries/LocaleData.js.map +1 -1
- package/dist/asset-registries/Themes.js +1 -2
- package/dist/asset-registries/Themes.js.map +1 -1
- package/dist/asset-registries/i18n.js +9 -3
- package/dist/asset-registries/i18n.js.map +1 -1
- package/dist/assets/Boot.34b7cea0.css +1 -0
- package/dist/assets/Boot.65c46afc.js +9 -0
- package/dist/assets/bundle.esm.46fe57b1.js +52 -0
- package/dist/assets-meta/IconCollectionsAlias.js.map +1 -1
- package/dist/config/AnimationMode.js.map +1 -1
- package/dist/config/CalendarType.js.map +1 -1
- package/dist/config/FormatSettings.js.map +1 -1
- package/dist/config/Icons.js +5 -5
- package/dist/config/Icons.js.map +1 -1
- package/dist/config/Language.d.ts +10 -1
- package/dist/config/Language.js +13 -1
- package/dist/config/Language.js.map +1 -1
- package/dist/config/NoConflict.js.map +1 -1
- package/dist/config/RTL.js.map +1 -1
- package/dist/config/Theme.d.ts +15 -5
- package/dist/config/Theme.js +25 -6
- package/dist/config/Theme.js.map +1 -1
- package/dist/config/ThemeRoots.js.map +1 -1
- package/dist/decorators/customElement.js.map +1 -1
- package/dist/decorators/event.js.map +1 -1
- package/dist/decorators/property.js.map +1 -1
- package/dist/decorators/slot.js +2 -2
- package/dist/decorators/slot.js.map +1 -1
- package/dist/delegate/ItemNavigation.js.map +1 -1
- package/dist/delegate/ResizeHandler.js.map +1 -1
- package/dist/delegate/ScrollEnablement.js.map +1 -1
- package/dist/features/F6Navigation.js.map +1 -1
- package/dist/features/LegacyDateFormats.js.map +1 -1
- package/dist/features/OpenUI5Element.js.map +1 -1
- package/dist/features/OpenUI5Enablement.js.map +1 -1
- package/dist/features/OpenUI5Support.js.map +1 -1
- package/dist/generated/AssetParameters.js +2 -0
- package/dist/generated/VersionInfo.js +3 -3
- package/dist/generated/css/BusyIndicator.css.js.map +1 -1
- package/dist/generated/css/FontFace.css.js.map +1 -1
- package/dist/generated/css/OverrideFontFace.css.js.map +1 -1
- package/dist/generated/css/SystemCSSVars.css.js.map +1 -1
- package/dist/getSharedResource.js.map +1 -1
- package/dist/global.d.ts +2 -0
- package/dist/i18nBundle.js.map +1 -1
- package/dist/locale/Locale.js.map +1 -1
- package/dist/locale/RTLAwareRegistry.js.map +1 -1
- package/dist/locale/applyDirection.js.map +1 -1
- package/dist/locale/directionChange.js.map +1 -1
- package/dist/locale/getEffectiveDir.js.map +1 -1
- package/dist/locale/getLocale.js.map +1 -1
- package/dist/locale/languageChange.js.map +1 -1
- package/dist/locale/nextFallbackLocale.js.map +1 -1
- package/dist/locale/normalizeLocale.js.map +1 -1
- package/dist/renderer/LitRenderer.js.map +1 -1
- package/dist/renderer/executeTemplate.js.map +1 -1
- package/dist/theming/CustomStyle.js.map +1 -1
- package/dist/theming/ThemeLoaded.js.map +1 -1
- package/dist/theming/ThemeRegistered.d.ts +1 -2
- package/dist/theming/ThemeRegistered.js +1 -4
- package/dist/theming/ThemeRegistered.js.map +1 -1
- package/dist/theming/applyTheme.js +0 -1
- package/dist/theming/applyTheme.js.map +1 -1
- package/dist/theming/getConstructableStyle.js.map +1 -1
- package/dist/theming/getEffectiveLinksHrefs.js.map +1 -1
- package/dist/theming/getEffectiveStyle.js.map +1 -1
- package/dist/theming/getStylesString.js.map +1 -1
- package/dist/theming/getThemeDesignerTheme.js.map +1 -1
- package/dist/theming/preloadLinks.js.map +1 -1
- package/dist/thirdparty/_merge.js.map +1 -1
- package/dist/thirdparty/isPlainObject.js.map +1 -1
- package/dist/thirdparty/merge.js.map +1 -1
- package/dist/types/AnimationMode.js.map +1 -1
- package/dist/types/CSSColor.js.map +1 -1
- package/dist/types/CalendarType.js.map +1 -1
- package/dist/types/DOMReference.js.map +1 -1
- package/dist/types/DataType.js.map +1 -1
- package/dist/types/Float.js.map +1 -1
- package/dist/types/Integer.js.map +1 -1
- package/dist/types/InvisibleMessageMode.js.map +1 -1
- package/dist/types/ItemNavigationBehavior.js.map +1 -1
- package/dist/types/NavigationMode.js.map +1 -1
- package/dist/types/ValueState.js.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/updateShadowRoot.js.map +1 -1
- package/dist/util/AriaLabelHelper.js.map +1 -1
- package/dist/util/Caret.js.map +1 -1
- package/dist/util/ColorConversion.js.map +1 -1
- package/dist/util/FetchHelper.js.map +1 -1
- package/dist/util/FocusableElements.js.map +1 -1
- package/dist/util/HTMLSanitizer.js.map +1 -1
- package/dist/util/InvisibleMessage.js.map +1 -1
- package/dist/util/PopupUtils.js.map +1 -1
- package/dist/util/SlotsHelper.js.map +1 -1
- package/dist/util/StringHelper.js.map +1 -1
- package/dist/util/TabbableElements.js.map +1 -1
- package/dist/util/arraysAreEqual.js.map +1 -1
- package/dist/util/clamp.js.map +1 -1
- package/dist/util/createLinkInHead.js.map +1 -1
- package/dist/util/createStyleInHead.js.map +1 -1
- package/dist/util/debounce.js.map +1 -1
- package/dist/util/detectNavigatorLanguage.js.map +1 -1
- package/dist/util/escapeRegex.js.map +1 -1
- package/dist/util/formatMessage.js.map +1 -1
- package/dist/util/generateHighlightedMarkup.js.map +1 -1
- package/dist/util/getActiveElement.js.map +1 -1
- package/dist/util/getClassCopy.js.map +1 -1
- package/dist/util/getDesigntimePropertyAsArray.js.map +1 -1
- package/dist/util/getEffectiveContentDensity.js.map +1 -1
- package/dist/util/getEffectiveScrollbarStyle.js.map +1 -1
- package/dist/util/getFastNavigationGroups.js.map +1 -1
- package/dist/util/getFileExtension.js.map +1 -1
- package/dist/util/getNormalizedTarget.js.map +1 -1
- package/dist/util/getSingletonElementInstance.js.map +1 -1
- package/dist/util/isElementClickable.js.map +1 -1
- package/dist/util/isElementHidden.js.map +1 -1
- package/dist/util/isElementInView.js.map +1 -1
- package/dist/util/isElementTabbable.js.map +1 -1
- package/dist/util/isValidPropertyName.js.map +1 -1
- package/dist/util/whenDOMReady.js.map +1 -1
- package/dist/util/willShowContent.js.map +1 -1
- package/dist/validateThemeRoot.js +14 -13
- package/dist/validateThemeRoot.js.map +1 -1
- package/index.js +227 -1
- package/lib/generate-asset-parameters/index.js +4 -2
- package/lib/generate-styles/index.js +3 -3
- package/lib/generate-version-info/index.js +1 -1
- package/{package-scripts.js → package-scripts.cjs} +3 -3
- package/package.json +4 -3
- package/tsconfig.json +1 -0
- package/config/wdio.conf.js +0 -1
- package/dist/assets/Boot.6335ce08.css +0 -1
- package/dist/assets/bundle.esm.f40d91c9.js +0 -24
- package/dist/assets/i18nBundle.cf399e86.js +0 -37
- package/src/AssetRegistry.ts +0 -11
- package/src/Boot.ts +0 -82
- package/src/CSP.ts +0 -66
- package/src/CustomElementsRegistry.ts +0 -98
- package/src/CustomElementsScope.ts +0 -33
- package/src/CustomElementsScopeUtils.ts +0 -115
- package/src/DOMObserver.ts +0 -28
- package/src/Device.ts +0 -203
- package/src/EventProvider.ts +0 -87
- package/src/FeaturesRegistry.ts +0 -14
- package/src/FontFace.ts +0 -31
- package/src/InitialConfiguration.ts +0 -207
- package/src/Keys.ts +0 -295
- package/src/ManagedStyles.ts +0 -92
- package/src/MarkedEvents.ts +0 -20
- package/src/MediaRange.ts +0 -110
- package/src/PropertiesFileFormat.ts +0 -95
- package/src/Render.ts +0 -180
- package/src/RenderQueue.ts +0 -71
- package/src/Runtimes.ts +0 -114
- package/src/StaticArea.ts +0 -3
- package/src/StaticAreaItem.ts +0 -113
- package/src/SystemCSSVars.ts +0 -10
- package/src/Theming.ts +0 -4
- package/src/UI5Element.ts +0 -1159
- package/src/UI5ElementMetadata.ts +0 -389
- package/src/animations/AnimationQueue.ts +0 -43
- package/src/animations/animate.ts +0 -64
- package/src/animations/scroll.ts +0 -21
- package/src/animations/slideDown.ts +0 -72
- package/src/animations/slideUp.ts +0 -67
- package/src/asset-registries/Icons.ts +0 -161
- package/src/asset-registries/Illustrations.ts +0 -75
- package/src/asset-registries/LocaleData.ts +0 -172
- package/src/asset-registries/Themes.ts +0 -75
- package/src/asset-registries/i18n.ts +0 -118
- package/src/assets-meta/IconCollectionsAlias.ts +0 -41
- package/src/config/AnimationMode.ts +0 -33
- package/src/config/CalendarType.ts +0 -23
- package/src/config/FormatSettings.ts +0 -35
- package/src/config/Icons.ts +0 -126
- package/src/config/Language.ts +0 -72
- package/src/config/NoConflict.ts +0 -67
- package/src/config/RTL.ts +0 -45
- package/src/config/Theme.ts +0 -64
- package/src/config/ThemeRoots.ts +0 -41
- package/src/decorators/customElement.ts +0 -57
- package/src/decorators/event.ts +0 -28
- package/src/decorators/property.ts +0 -30
- package/src/decorators/slot.ts +0 -49
- package/src/delegate/ItemNavigation.ts +0 -393
- package/src/delegate/ResizeHandler.ts +0 -100
- package/src/delegate/ScrollEnablement.ts +0 -224
- package/src/features/F6Navigation.ts +0 -195
- package/src/features/LegacyDateFormats.ts +0 -40
- package/src/features/OpenUI5Element.ts +0 -11
- package/src/features/OpenUI5Enablement.ts +0 -117
- package/src/features/OpenUI5Support.ts +0 -153
- package/src/generated/css/BusyIndicator.css.ts +0 -9
- package/src/generated/css/FontFace.css.ts +0 -9
- package/src/generated/css/OverrideFontFace.css.ts +0 -9
- package/src/generated/css/SystemCSSVars.css.ts +0 -9
- package/src/getSharedResource.ts +0 -39
- package/src/global.d.ts +0 -38
- package/src/i18nBundle.ts +0 -108
- package/src/locale/Locale.ts +0 -101
- package/src/locale/RTLAwareRegistry.ts +0 -16
- package/src/locale/applyDirection.ts +0 -18
- package/src/locale/directionChange.ts +0 -34
- package/src/locale/getEffectiveDir.ts +0 -28
- package/src/locale/getLocale.ts +0 -46
- package/src/locale/languageChange.ts +0 -24
- package/src/locale/nextFallbackLocale.ts +0 -28
- package/src/locale/normalizeLocale.ts +0 -56
- package/src/renderer/LitRenderer.ts +0 -60
- package/src/renderer/executeTemplate.ts +0 -40
- package/src/theming/CustomStyle.ts +0 -64
- package/src/theming/ThemeLoaded.ts +0 -24
- package/src/theming/ThemeRegistered.ts +0 -24
- package/src/theming/applyTheme.ts +0 -91
- package/src/theming/getConstructableStyle.ts +0 -31
- package/src/theming/getEffectiveLinksHrefs.ts +0 -26
- package/src/theming/getEffectiveStyle.ts +0 -41
- package/src/theming/getStylesString.ts +0 -15
- package/src/theming/getThemeDesignerTheme.ts +0 -101
- package/src/theming/preloadLinks.ts +0 -24
- package/src/thirdparty/_merge.ts +0 -32
- package/src/thirdparty/isPlainObject.ts +0 -18
- package/src/thirdparty/merge.ts +0 -5
- package/src/types/AnimationMode.ts +0 -33
- package/src/types/CSSColor.ts +0 -19
- package/src/types/CalendarType.ts +0 -38
- package/src/types/DOMReference.ts +0 -28
- package/src/types/DataType.ts +0 -51
- package/src/types/Float.ts +0 -24
- package/src/types/Integer.ts +0 -24
- package/src/types/InvisibleMessageMode.ts +0 -27
- package/src/types/ItemNavigationBehavior.ts +0 -26
- package/src/types/NavigationMode.ts +0 -33
- package/src/types/ValueState.ts +0 -47
- package/src/types.ts +0 -30
- package/src/updateShadowRoot.ts +0 -42
- package/src/util/AriaLabelHelper.ts +0 -218
- package/src/util/Caret.ts +0 -28
- package/src/util/ColorConversion.ts +0 -399
- package/src/util/FetchHelper.ts +0 -31
- package/src/util/FocusableElements.ts +0 -92
- package/src/util/HTMLSanitizer.ts +0 -9
- package/src/util/InvisibleMessage.ts +0 -69
- package/src/util/PopupUtils.ts +0 -112
- package/src/util/SlotsHelper.ts +0 -39
- package/src/util/StringHelper.ts +0 -26
- package/src/util/TabbableElements.ts +0 -70
- package/src/util/arraysAreEqual.ts +0 -15
- package/src/util/clamp.ts +0 -12
- package/src/util/createLinkInHead.ts +0 -25
- package/src/util/createStyleInHead.ts +0 -20
- package/src/util/debounce.ts +0 -18
- package/src/util/detectNavigatorLanguage.ts +0 -13
- package/src/util/escapeRegex.ts +0 -11
- package/src/util/formatMessage.ts +0 -24
- package/src/util/generateHighlightedMarkup.ts +0 -43
- package/src/util/getActiveElement.ts +0 -11
- package/src/util/getClassCopy.ts +0 -12
- package/src/util/getDesigntimePropertyAsArray.ts +0 -4
- package/src/util/getEffectiveContentDensity.ts +0 -5
- package/src/util/getEffectiveScrollbarStyle.ts +0 -5
- package/src/util/getFastNavigationGroups.ts +0 -63
- package/src/util/getFileExtension.ts +0 -21
- package/src/util/getNormalizedTarget.ts +0 -16
- package/src/util/getSingletonElementInstance.ts +0 -13
- package/src/util/isElementClickable.ts +0 -19
- package/src/util/isElementHidden.ts +0 -9
- package/src/util/isElementInView.ts +0 -15
- package/src/util/isElementTabbable.ts +0 -37
- package/src/util/isValidPropertyName.ts +0 -29
- package/src/util/whenDOMReady.ts +0 -13
- package/src/util/willShowContent.ts +0 -7
- package/src/validateThemeRoot.ts +0 -58
package/.eslintignore
CHANGED
|
@@ -8,9 +8,9 @@ src/thirdparty
|
|
|
8
8
|
bundle.esm.js
|
|
9
9
|
bundle.es5.js
|
|
10
10
|
rollup.config*.js
|
|
11
|
-
wdio.conf.
|
|
12
|
-
postcss.config.
|
|
13
|
-
package-scripts.
|
|
14
|
-
.eslintrc.
|
|
11
|
+
wdio.conf.cjs
|
|
12
|
+
postcss.config.cjs
|
|
13
|
+
package-scripts.cjs
|
|
14
|
+
.eslintrc.cjs
|
|
15
15
|
src/renderer/directives/style-map.js
|
|
16
16
|
src/util/metaUrl.js
|
package/.eslintrc.cjs
ADDED
package/.npsrc.json
ADDED
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,41 @@
|
|
|
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.12.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.12.0-rc.2...v1.12.0-rc.3) (2023-03-30)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @ui5/webcomponents-base
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [1.12.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.12.0-rc.1...v1.12.0-rc.2) (2023-03-23)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* fix eslint for JS 3rd party projects ([#6725](https://github.com/SAP/ui5-webcomponents/issues/6725)) ([215a888](https://github.com/SAP/ui5-webcomponents/commit/215a888b006e46d431edd6324812b9d39249aef4))
|
|
20
|
+
* **framework:** apply theme after every theme props registration ([#6718](https://github.com/SAP/ui5-webcomponents/issues/6718)) ([9b6c414](https://github.com/SAP/ui5-webcomponents/commit/9b6c414e7ae625d835a7d14c3761d2c235b750ff)), closes [#6666](https://github.com/SAP/ui5-webcomponents/issues/6666)
|
|
21
|
+
* **i18n:** use correct i18n text bundle ([#6720](https://github.com/SAP/ui5-webcomponents/issues/6720)) ([9636000](https://github.com/SAP/ui5-webcomponents/commit/963600046d1847133512f8a2a7a8f9087bfcd3f2))
|
|
22
|
+
* inline sources in the .map file so the src folder is not mandatory ([#6732](https://github.com/SAP/ui5-webcomponents/issues/6732)) ([16771a6](https://github.com/SAP/ui5-webcomponents/commit/16771a64d7b13f418af9afa1a03b224fe3762775))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* **framework:** add default values for language/theme ([#6738](https://github.com/SAP/ui5-webcomponents/issues/6738)) ([36d3636](https://github.com/SAP/ui5-webcomponents/commit/36d3636be27b785ccfe7210d1da65c628623c28d))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# [1.12.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.12.0-rc.0...v1.12.0-rc.1) (2023-03-16)
|
|
34
|
+
|
|
35
|
+
**Note:** Version bump only for package @ui5/webcomponents-base
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
6
41
|
# [1.12.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.11.0...v1.12.0-rc.0) (2023-03-09)
|
|
7
42
|
|
|
8
43
|
**Note:** Version bump only for package @ui5/webcomponents-base
|
package/bundle.esm.js
CHANGED
|
@@ -31,6 +31,7 @@ import { getAnimationMode } from "./dist/config/AnimationMode.js";
|
|
|
31
31
|
import { getLanguage, setLanguage } from "./dist/config/Language.js";
|
|
32
32
|
import { getCalendarType } from "./dist/config/CalendarType.js";
|
|
33
33
|
import { getTheme, setTheme } from "./dist/config/Theme.js";
|
|
34
|
+
import { getThemeRoot } from "./dist/config/ThemeRoots";
|
|
34
35
|
import { getNoConflict, setNoConflict } from "./dist/config/NoConflict.js";
|
|
35
36
|
import { getRTL } from "./dist/config/RTL.js";
|
|
36
37
|
import { getFirstDayOfWeek, getLegacyDateCalendarCustomizing } from "./dist/config/FormatSettings.js";
|
|
@@ -44,6 +45,7 @@ window["sap-ui-webcomponents-bundle"] = {
|
|
|
44
45
|
getLanguage,
|
|
45
46
|
setLanguage,
|
|
46
47
|
getTheme,
|
|
48
|
+
getThemeRoot,
|
|
47
49
|
setTheme,
|
|
48
50
|
getNoConflict,
|
|
49
51
|
setNoConflict,
|
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
exports.config = {
|
|
2
|
+
//
|
|
3
|
+
// ====================
|
|
4
|
+
// Runner Configuration
|
|
5
|
+
// ====================
|
|
6
|
+
//
|
|
7
|
+
// WebdriverIO allows it to run your tests in arbitrary locations (e.g. locally or
|
|
8
|
+
// on a remote machine).
|
|
9
|
+
runner: 'local',
|
|
10
|
+
|
|
11
|
+
//
|
|
12
|
+
// ==================
|
|
13
|
+
// Specify Test Files
|
|
14
|
+
// ==================
|
|
15
|
+
// Define which test specs should run. The pattern is relative to the directory
|
|
16
|
+
// from which `wdio` was called. Notice that, if you are calling `wdio` from an
|
|
17
|
+
// NPM script (see https://docs.npmjs.com/cli/run-script) then the current working
|
|
18
|
+
// directory is where your package.json resides, so `wdio` will be called from there.
|
|
19
|
+
//
|
|
20
|
+
specs: [
|
|
21
|
+
'./test/specs/**/*.js'
|
|
22
|
+
],
|
|
23
|
+
// Patterns to exclude.
|
|
24
|
+
exclude: [
|
|
25
|
+
// 'path/to/excluded/files'
|
|
26
|
+
],
|
|
27
|
+
//
|
|
28
|
+
// ============
|
|
29
|
+
// Capabilities
|
|
30
|
+
// ============
|
|
31
|
+
// Define your capabilities here. WebdriverIO can run multiple capabilities at the same
|
|
32
|
+
// time. Depending on the number of capabilities, WebdriverIO launches several test
|
|
33
|
+
// sessions. Within your capabilities you can overwrite the spec and exclude options in
|
|
34
|
+
// order to group specific specs to a specific capability.
|
|
35
|
+
//
|
|
36
|
+
// First, you can define how many instances should be started at the same time. Let's
|
|
37
|
+
// say you have 3 different capabilities (Chrome, Firefox, and Safari) and you have
|
|
38
|
+
// set maxInstances to 1; wdio will spawn 3 processes. Therefore, if you have 10 spec
|
|
39
|
+
// files and you set maxInstances to 10, all spec files will get tested at the same time
|
|
40
|
+
// and 30 processes will get spawned. The property handles how many capabilities
|
|
41
|
+
// from the same test should run tests.
|
|
42
|
+
//
|
|
43
|
+
maxInstances: 10,
|
|
44
|
+
//
|
|
45
|
+
// If you have trouble getting all important capabilities together, check out the
|
|
46
|
+
// Sauce Labs platform configurator - a great tool to configure your capabilities:
|
|
47
|
+
// https://docs.saucelabs.com/reference/platforms-configurator
|
|
48
|
+
//
|
|
49
|
+
capabilities: [{
|
|
50
|
+
// maxInstances can get overwritten per capability. So if you have an in-house Selenium
|
|
51
|
+
// grid with only 5 firefox instances available you can make sure that not more than
|
|
52
|
+
// 5 instances get started at a time.
|
|
53
|
+
maxInstances: 5,
|
|
54
|
+
//
|
|
55
|
+
browserName: 'chrome',
|
|
56
|
+
'goog:chromeOptions': {
|
|
57
|
+
// to run chrome headless the following flags are required
|
|
58
|
+
// (see https://developers.google.com/web/updates/2017/04/headless-chrome)
|
|
59
|
+
args: [
|
|
60
|
+
'headless', // start in headless mode
|
|
61
|
+
'start-maximized', // maximize the window
|
|
62
|
+
'no-sandbox', // disable sandbox isolation
|
|
63
|
+
'disable-infobars', // disable the infos
|
|
64
|
+
'disable-gpu', // on windows disable gpu hw acceleration
|
|
65
|
+
'disable-extensions', // disable extensions
|
|
66
|
+
'disable-dev-shm-usage' // disable /dev/shm in CI
|
|
67
|
+
],
|
|
68
|
+
}
|
|
69
|
+
}],
|
|
70
|
+
//
|
|
71
|
+
// port to find chromedriver
|
|
72
|
+
port: 9515, // default
|
|
73
|
+
// ===================
|
|
74
|
+
// Test Configurations
|
|
75
|
+
// ===================
|
|
76
|
+
// Define all options that are relevant for the WebdriverIO instance here
|
|
77
|
+
//
|
|
78
|
+
// Level of logging verbosity: trace | debug | info | warn | error
|
|
79
|
+
logLevel: 'error',
|
|
80
|
+
//
|
|
81
|
+
// Warns when a deprecated command is used
|
|
82
|
+
deprecationWarnings: true,
|
|
83
|
+
//
|
|
84
|
+
// If you only want to run your tests until a specific amount of tests have failed use
|
|
85
|
+
// bail (default is 0 - don't bail, run all tests).
|
|
86
|
+
bail: 0,
|
|
87
|
+
//
|
|
88
|
+
// Set a base URL in order to shorten url command calls. If your `url` parameter starts
|
|
89
|
+
// with `/`, the base url gets prepended, not including the path portion of your baseUrl.
|
|
90
|
+
// If your `url` parameter starts without a scheme or `/` (like `some/path`), the base url
|
|
91
|
+
// gets prepended directly.
|
|
92
|
+
baseUrl: 'http://localhost:4567', // This is important since WDIO 7+ does not accept an empty string for baseUrl
|
|
93
|
+
path: '',
|
|
94
|
+
//
|
|
95
|
+
// Default timeout for all waitFor* commands.
|
|
96
|
+
waitforTimeout: 10000,
|
|
97
|
+
//
|
|
98
|
+
// Default timeout in milliseconds for request
|
|
99
|
+
// if Selenium Grid doesn't send response
|
|
100
|
+
connectionRetryTimeout: 90000,
|
|
101
|
+
//
|
|
102
|
+
// Default request retries count
|
|
103
|
+
connectionRetryCount: 3,
|
|
104
|
+
//
|
|
105
|
+
// Test runner services
|
|
106
|
+
// Services take over a specific job you don't want to take care of. They enhance
|
|
107
|
+
// your test setup with almost no effort. Unlike plugins, they don't add new
|
|
108
|
+
// commands. Instead, they hook themselves up into the test process.
|
|
109
|
+
services: ['chromedriver', 'devtools',
|
|
110
|
+
['static-server', {
|
|
111
|
+
folders: [
|
|
112
|
+
{ mount: '/', path: './dist' },
|
|
113
|
+
],
|
|
114
|
+
port: '4567',
|
|
115
|
+
}],
|
|
116
|
+
],
|
|
117
|
+
// options
|
|
118
|
+
chromeDriverArgs: ['--port=9515'], // default
|
|
119
|
+
// Framework you want to run your specs with.
|
|
120
|
+
// The following are supported: Mocha, Jasmine, and Cucumber
|
|
121
|
+
// see also: https://webdriver.io/docs/frameworks.html
|
|
122
|
+
//
|
|
123
|
+
// Make sure you have the wdio adapter package for the specific framework installed
|
|
124
|
+
// before running any tests.
|
|
125
|
+
framework: 'mocha',
|
|
126
|
+
//
|
|
127
|
+
// Test reporter for stdout.
|
|
128
|
+
// The only one supported by default is 'dot'
|
|
129
|
+
// see also: https://webdriver.io/docs/dot-reporter.html
|
|
130
|
+
reporters: ['dot', 'spec'],
|
|
131
|
+
|
|
132
|
+
//
|
|
133
|
+
// Options to be passed to Mocha.
|
|
134
|
+
// See the full list at http://mochajs.org/
|
|
135
|
+
mochaOpts: {
|
|
136
|
+
ui: 'bdd',
|
|
137
|
+
timeout: 60000
|
|
138
|
+
},
|
|
139
|
+
//
|
|
140
|
+
// =====
|
|
141
|
+
// Hooks
|
|
142
|
+
// =====
|
|
143
|
+
// WebdriverIO provides several hooks you can use to interfere with the test process in order to enhance
|
|
144
|
+
// it and to build services around it. You can either apply a single function or an array of
|
|
145
|
+
// methods to it. If one of them returns with a promise, WebdriverIO will wait until that promise got
|
|
146
|
+
// resolved to continue.
|
|
147
|
+
/**
|
|
148
|
+
* Gets executed once before all workers get launched.
|
|
149
|
+
* @param {Object} config wdio configuration object
|
|
150
|
+
* @param {Array.<Object>} capabilities list of capabilities details
|
|
151
|
+
*/
|
|
152
|
+
// onPrepare: function (config, capabilities) {
|
|
153
|
+
// },
|
|
154
|
+
/**
|
|
155
|
+
* Gets executed just before initialising the webdriver session and test framework. It allows you
|
|
156
|
+
* to manipulate configurations depending on the capability or spec.
|
|
157
|
+
* @param {Object} config wdio configuration object
|
|
158
|
+
* @param {Array.<Object>} capabilities list of capabilities details
|
|
159
|
+
* @param {Array.<String>} specs List of spec file paths that are to be run
|
|
160
|
+
*/
|
|
161
|
+
// beforeSession: function (config, capabilities, specs) {
|
|
162
|
+
// },
|
|
163
|
+
/**
|
|
164
|
+
* Gets executed before test execution begins. At this point you can access to all global
|
|
165
|
+
* variables like `browser`. It is the perfect place to define custom commands.
|
|
166
|
+
* @param {Array.<Object>} capabilities list of capabilities details
|
|
167
|
+
* @param {Array.<String>} specs List of spec file paths that are to be run
|
|
168
|
+
*/
|
|
169
|
+
before: async function (capabilities, specs) {
|
|
170
|
+
await browser.addCommand("isFocusedDeep", async function () {
|
|
171
|
+
return browser.executeAsync(function (elem, done) {
|
|
172
|
+
let activeElement = document.activeElement;
|
|
173
|
+
|
|
174
|
+
while (activeElement.shadowRoot) {
|
|
175
|
+
if (activeElement.shadowRoot.activeElement) {
|
|
176
|
+
activeElement = activeElement.shadowRoot.activeElement;
|
|
177
|
+
} else {
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
done(elem === activeElement);
|
|
182
|
+
}, this);
|
|
183
|
+
}, true);
|
|
184
|
+
|
|
185
|
+
await browser.addCommand("isFocusedDeepElement", async function (element) {
|
|
186
|
+
return browser.executeAsync(function (elem, element, done) {
|
|
187
|
+
let activeElement = document.activeElement;
|
|
188
|
+
|
|
189
|
+
while (activeElement.shadowRoot) {
|
|
190
|
+
if (activeElement.shadowRoot.activeElement) {
|
|
191
|
+
activeElement = activeElement.shadowRoot.activeElement;
|
|
192
|
+
} else {
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
done(element === activeElement);
|
|
197
|
+
}, this, element);
|
|
198
|
+
}, true);
|
|
199
|
+
|
|
200
|
+
await browser.addCommand("setProperty", async function(property, value) {
|
|
201
|
+
return browser.executeAsync((elem, property, value, done) => {
|
|
202
|
+
elem[property] = value;
|
|
203
|
+
done();
|
|
204
|
+
}, this, property, value);
|
|
205
|
+
}, true);
|
|
206
|
+
|
|
207
|
+
await browser.addCommand("setAttribute", async function(attribute, value) {
|
|
208
|
+
return browser.executeAsync((elem, attribute, value, done) => {
|
|
209
|
+
elem.setAttribute(attribute, value);
|
|
210
|
+
done();
|
|
211
|
+
}, this, attribute, value);
|
|
212
|
+
}, true);
|
|
213
|
+
|
|
214
|
+
await browser.addCommand("removeAttribute", async function(attribute) {
|
|
215
|
+
return browser.executeAsync((elem, attribute, done) => {
|
|
216
|
+
elem.removeAttribute(attribute);
|
|
217
|
+
done();
|
|
218
|
+
}, this, attribute);
|
|
219
|
+
}, true);
|
|
220
|
+
|
|
221
|
+
await browser.addCommand("hasClass", async function(className) {
|
|
222
|
+
return browser.executeAsync((elem, className, done) => {
|
|
223
|
+
done(elem.classList.contains(className));
|
|
224
|
+
}, this, className);
|
|
225
|
+
}, true);
|
|
226
|
+
|
|
227
|
+
await browser.addCommand("hasAttribute", async function(attrName) {
|
|
228
|
+
return browser.executeAsync((elem, attrName, done) => {
|
|
229
|
+
done(elem.hasAttribute(attrName));
|
|
230
|
+
}, this, attrName);
|
|
231
|
+
}, true);
|
|
232
|
+
|
|
233
|
+
await browser.addCommand("getStaticAreaItemClassName", async function(selector) {
|
|
234
|
+
return browser.executeAsync(async (selector, done) => {
|
|
235
|
+
const staticAreaItem = await document.querySelector(selector).getStaticAreaItemDomRef();
|
|
236
|
+
done(staticAreaItem.host.classList[0]);
|
|
237
|
+
}, selector);
|
|
238
|
+
}, false);
|
|
239
|
+
|
|
240
|
+
await browser.addLocatorStrategy('activeElement', (selector) => {
|
|
241
|
+
return document.querySelector(selector).shadowRoot.activeElement;
|
|
242
|
+
});
|
|
243
|
+
},
|
|
244
|
+
/**
|
|
245
|
+
* Runs before a WebdriverIO command gets executed.
|
|
246
|
+
* @param {String} commandName hook command name
|
|
247
|
+
* @param {Array} args arguments that command would receive
|
|
248
|
+
*/
|
|
249
|
+
beforeCommand: async function (commandName, args) {
|
|
250
|
+
const waitFor = [
|
|
251
|
+
"$",
|
|
252
|
+
"$$",
|
|
253
|
+
"getAttribute",
|
|
254
|
+
"hasAttribute", // custom
|
|
255
|
+
"getCSSProperty",
|
|
256
|
+
"getHTML",
|
|
257
|
+
"getProperty",
|
|
258
|
+
"getSize",
|
|
259
|
+
"getStaticAreaItemClassName", // custom
|
|
260
|
+
"getText",
|
|
261
|
+
"getValue",
|
|
262
|
+
"hasClass", // custom
|
|
263
|
+
"isDisplayed",
|
|
264
|
+
"isDisplayedInViewport",
|
|
265
|
+
"isEnabled",
|
|
266
|
+
"isExisting",
|
|
267
|
+
"isFocused",
|
|
268
|
+
"isFocusedDeep", // custom
|
|
269
|
+
"isFocusedDeepElement", // custom
|
|
270
|
+
"shadow$",
|
|
271
|
+
"shadow$$",
|
|
272
|
+
];
|
|
273
|
+
if (waitFor.includes(commandName)) {
|
|
274
|
+
await browser.executeAsync(function (done) {
|
|
275
|
+
window["sap-ui-webcomponents-bundle"].renderFinished().then(done);
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Hook that gets executed before the suite starts
|
|
282
|
+
* @param {Object} suite suite details
|
|
283
|
+
*/
|
|
284
|
+
// beforeSuite: function (suite) {
|
|
285
|
+
// },
|
|
286
|
+
/**
|
|
287
|
+
* Function to be executed before a test (in Mocha/Jasmine) or a step (in Cucumber) starts.
|
|
288
|
+
* @param {Object} test test details
|
|
289
|
+
*/
|
|
290
|
+
// beforeTest: function (test) {
|
|
291
|
+
// },
|
|
292
|
+
/**
|
|
293
|
+
* Hook that gets executed _before_ a hook within the suite starts (e.g. runs before calling
|
|
294
|
+
* beforeEach in Mocha)
|
|
295
|
+
*/
|
|
296
|
+
// beforeHook: function () {
|
|
297
|
+
// },
|
|
298
|
+
/**
|
|
299
|
+
* Hook that gets executed _after_ a hook within the suite starts (e.g. runs after calling
|
|
300
|
+
* afterEach in Mocha)
|
|
301
|
+
*/
|
|
302
|
+
// afterHook: function () {
|
|
303
|
+
// },
|
|
304
|
+
/**
|
|
305
|
+
* Function to be executed after a test (in Mocha/Jasmine) or a step (in Cucumber) starts.
|
|
306
|
+
* @param {Object} test test details
|
|
307
|
+
*/
|
|
308
|
+
// afterTest: function (test) {
|
|
309
|
+
// },
|
|
310
|
+
/**
|
|
311
|
+
* Hook that gets executed after the suite has ended
|
|
312
|
+
* @param {Object} suite suite details
|
|
313
|
+
*/
|
|
314
|
+
// afterSuite: function (suite) {
|
|
315
|
+
// },
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Runs after a WebdriverIO command gets executed
|
|
319
|
+
* @param {String} commandName hook command name
|
|
320
|
+
* @param {Array} args arguments that command would receive
|
|
321
|
+
* @param {Number} result 0 - command success, 1 - command error
|
|
322
|
+
* @param {Object} error error object if any
|
|
323
|
+
*/
|
|
324
|
+
afterCommand: async function (commandName, args, result, error) {
|
|
325
|
+
|
|
326
|
+
// url -> set configuration first
|
|
327
|
+
if (commandName === "url" && !args[0].includes("do-not-change-configuration")) {
|
|
328
|
+
await browser.executeAsync(function(done) {
|
|
329
|
+
window["sap-ui-webcomponents-bundle"].configuration.setNoConflict(true);
|
|
330
|
+
done();
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
const waitFor = [
|
|
335
|
+
"addValue",
|
|
336
|
+
"clearValue",
|
|
337
|
+
"click",
|
|
338
|
+
"doubleClick",
|
|
339
|
+
"dragAndDrop",
|
|
340
|
+
"pause",
|
|
341
|
+
"removeAttribute", // custom
|
|
342
|
+
"scrollIntoView",
|
|
343
|
+
"setAttribute", // custom
|
|
344
|
+
"setProperty", // custom
|
|
345
|
+
"setValue",
|
|
346
|
+
"setWindowSize",
|
|
347
|
+
"touchAction",
|
|
348
|
+
"url",
|
|
349
|
+
];
|
|
350
|
+
|
|
351
|
+
const waitForWithDelay = [
|
|
352
|
+
"keys",
|
|
353
|
+
];
|
|
354
|
+
|
|
355
|
+
if (waitFor.includes(commandName)) {
|
|
356
|
+
await browser.executeAsync(function (done) {
|
|
357
|
+
window["sap-ui-webcomponents-bundle"].renderFinished().then(done);
|
|
358
|
+
});
|
|
359
|
+
} else if (waitForWithDelay.includes(commandName)) {
|
|
360
|
+
await browser.executeAsync(function (done) {
|
|
361
|
+
setTimeout(() => {
|
|
362
|
+
window["sap-ui-webcomponents-bundle"].renderFinished().then(done);
|
|
363
|
+
}, 10);
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
/**
|
|
368
|
+
* Gets executed after all tests are done. You still have access to all global variables from
|
|
369
|
+
* the test.
|
|
370
|
+
* @param {Number} result 0 - test pass, 1 - test fail
|
|
371
|
+
* @param {Array.<Object>} capabilities list of capabilities details
|
|
372
|
+
* @param {Array.<String>} specs List of spec file paths that ran
|
|
373
|
+
*/
|
|
374
|
+
// after: function (result, capabilities, specs) {
|
|
375
|
+
// },
|
|
376
|
+
/**
|
|
377
|
+
* Gets executed right after terminating the webdriver session.
|
|
378
|
+
* @param {Object} config wdio configuration object
|
|
379
|
+
* @param {Array.<Object>} capabilities list of capabilities details
|
|
380
|
+
* @param {Array.<String>} specs List of spec file paths that ran
|
|
381
|
+
*/
|
|
382
|
+
// afterSession: function (config, capabilities, specs) {
|
|
383
|
+
// },
|
|
384
|
+
/**
|
|
385
|
+
* Gets executed after all workers got shut down and the process is about to exit.
|
|
386
|
+
* @param {Object} exitCode 0 - success, 1 - fail
|
|
387
|
+
* @param {Object} config wdio configuration object
|
|
388
|
+
* @param {Array.<Object>} capabilities list of capabilities details
|
|
389
|
+
* @param {<Object>} results object containing test results
|
|
390
|
+
*/
|
|
391
|
+
// onComplete: function(exitCode, config, capabilities, results) {
|
|
392
|
+
// },
|
|
393
|
+
/**
|
|
394
|
+
* Gets executed when a refresh happens.
|
|
395
|
+
* @param {String} oldSessionId session ID of the old session
|
|
396
|
+
* @param {String} newSessionId session ID of the new session
|
|
397
|
+
*/
|
|
398
|
+
//onReload: function(oldSessionId, newSessionId) {
|
|
399
|
+
//}
|
|
400
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssetRegistry.js","sourceRoot":"","sources":["../src/AssetRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EACN,kBAAkB,EAClB,wBAAwB,EACxB,6BAA6B,EAC7B,kBAAkB,GAClB,CAAC"}
|
|
1
|
+
{"version":3,"file":"AssetRegistry.js","sourceRoot":"","sources":["../src/AssetRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EACN,kBAAkB,EAClB,wBAAwB,EACxB,6BAA6B,EAC7B,kBAAkB,GAClB,CAAC","sourcesContent":["import { registerI18nLoader } from \"./asset-registries/i18n.js\";\nimport { registerLocaleDataLoader } from \"./asset-registries/LocaleData.js\";\nimport { registerThemePropertiesLoader } from \"./asset-registries/Themes.js\";\nimport { registerIconLoader } from \"./asset-registries/Icons.js\";\n\nexport {\n\tregisterI18nLoader,\n\tregisterLocaleDataLoader,\n\tregisterThemePropertiesLoader,\n\tregisterIconLoader,\n};\n"]}
|
package/dist/Boot.js
CHANGED
|
@@ -4,9 +4,9 @@ import insertFontFace from "./FontFace.js";
|
|
|
4
4
|
import insertSystemCSSVars from "./SystemCSSVars.js";
|
|
5
5
|
import { getTheme } from "./config/Theme.js";
|
|
6
6
|
import applyTheme from "./theming/applyTheme.js";
|
|
7
|
-
import { attachThemeRegistered } from "./theming/ThemeRegistered.js";
|
|
8
7
|
import { registerCurrentRuntime } from "./Runtimes.js";
|
|
9
8
|
import { getFeature } from "./FeaturesRegistry.js";
|
|
9
|
+
import { attachThemeRegistered } from "./theming/ThemeRegistered.js";
|
|
10
10
|
let booted = false;
|
|
11
11
|
let bootPromise;
|
|
12
12
|
const eventProvider = new EventProvider();
|
|
@@ -32,10 +32,7 @@ const boot = async () => {
|
|
|
32
32
|
resolve();
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
|
-
attachThemeRegistered(
|
|
36
|
-
console.log("apply theme on theme registered"); // eslint-disable-line
|
|
37
|
-
applyTheme(getTheme());
|
|
38
|
-
});
|
|
35
|
+
attachThemeRegistered(onThemeRegistered);
|
|
39
36
|
registerCurrentRuntime();
|
|
40
37
|
const openUI5Support = getFeature("OpenUI5Support");
|
|
41
38
|
const isOpenUI5Loaded = openUI5Support ? openUI5Support.isLoaded() : false;
|
|
@@ -47,8 +44,7 @@ const boot = async () => {
|
|
|
47
44
|
f6Navigation.init();
|
|
48
45
|
}
|
|
49
46
|
await whenDOMReady();
|
|
50
|
-
|
|
51
|
-
// await applyTheme(getTheme());
|
|
47
|
+
await applyTheme(getTheme());
|
|
52
48
|
openUI5Support && openUI5Support.attachListeners();
|
|
53
49
|
insertFontFace();
|
|
54
50
|
insertSystemCSSVars();
|
|
@@ -59,5 +55,17 @@ const boot = async () => {
|
|
|
59
55
|
bootPromise = new Promise(bootExecutor);
|
|
60
56
|
return bootPromise;
|
|
61
57
|
};
|
|
58
|
+
/**
|
|
59
|
+
* Callback, executed after theme properties registration
|
|
60
|
+
* to apply the newly registered theme.
|
|
61
|
+
* @private
|
|
62
|
+
* @param { string } theme
|
|
63
|
+
*/
|
|
64
|
+
const onThemeRegistered = (theme) => {
|
|
65
|
+
const currentTheme = getTheme();
|
|
66
|
+
if (booted && theme === currentTheme) {
|
|
67
|
+
applyTheme(currentTheme);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
62
70
|
export { boot, attachBoot, };
|
|
63
71
|
//# sourceMappingURL=Boot.js.map
|
package/dist/Boot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Boot.js","sourceRoot":"","sources":["../src/Boot.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,cAAc,MAAM,eAAe,CAAC;AAC3C,OAAO,mBAAmB,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Boot.js","sourceRoot":"","sources":["../src/Boot.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,cAAc,MAAM,eAAe,CAAC;AAC3C,OAAO,mBAAmB,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAInD,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,IAAI,MAAM,GAAG,KAAK,CAAC;AACnB,IAAI,WAA0B,CAAC;AAC/B,MAAM,aAAa,GAAG,IAAI,aAAa,EAAc,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,UAAU,GAAG,CAAC,QAAoB,EAAE,EAAE;IAC3C,IAAI,CAAC,MAAM,EAAE;QACZ,aAAa,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC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YAAY,GAAG,QAAQ,EAAE,CAAC;IAChC,IAAI,MAAM,IAAI,KAAK,KAAK,YAAY,EAAE;QACrC,UAAU,CAAC,YAAY,CAAC,CAAC;KACzB;AACF,CAAC,CAAC;AAEF,OAAO,EACN,IAAI,EACJ,UAAU,GACV,CAAC","sourcesContent":["import whenDOMReady from \"./util/whenDOMReady.js\";\nimport EventProvider from \"./EventProvider.js\";\nimport insertFontFace from \"./FontFace.js\";\nimport insertSystemCSSVars from \"./SystemCSSVars.js\";\nimport { getTheme } from \"./config/Theme.js\";\nimport applyTheme from \"./theming/applyTheme.js\";\nimport { registerCurrentRuntime } from \"./Runtimes.js\";\nimport { getFeature } from \"./FeaturesRegistry.js\";\nimport type OpenUI5Support from \"./features/OpenUI5Support.js\";\nimport type F6Navigation from \"./features/F6Navigation.js\";\nimport { PromiseResolve } from \"./types.js\";\nimport { attachThemeRegistered } from \"./theming/ThemeRegistered.js\";\n\nlet booted = false;\nlet bootPromise: Promise<void>;\nconst eventProvider = new EventProvider<void, void>();\n\n/**\n * Attaches a callback that will be executed after boot finishes.\n * <b>Note:</b> If the framework already booted, the callback will be immediately executed.\n * @public\n * @param { Function } listener\n */\nconst attachBoot = (listener: () => void) => {\n\tif (!booted) {\n\t\teventProvider.attachEvent(\"boot\", listener);\n\t\treturn;\n\t}\n\n\tlistener();\n};\n\nconst boot = async (): Promise<void> => {\n\tif (bootPromise !== undefined) {\n\t\treturn bootPromise;\n\t}\n\n\tconst bootExecutor = async (resolve: PromiseResolve) => {\n\t\tif (typeof document === \"undefined\") {\n\t\t\tresolve();\n\t\t\treturn;\n\t\t}\n\n\t\tattachThemeRegistered(onThemeRegistered);\n\n\t\tregisterCurrentRuntime();\n\n\t\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\t\tconst isOpenUI5Loaded = openUI5Support ? openUI5Support.isLoaded() : false;\n\t\tconst f6Navigation = getFeature<typeof F6Navigation>(\"F6Navigation\");\n\n\t\tif (openUI5Support) {\n\t\t\tawait openUI5Support.init();\n\t\t}\n\n\t\tif (f6Navigation && !isOpenUI5Loaded) {\n\t\t\tf6Navigation.init();\n\t\t}\n\n\t\tawait whenDOMReady();\n\t\tawait applyTheme(getTheme());\n\t\topenUI5Support && openUI5Support.attachListeners();\n\t\tinsertFontFace();\n\t\tinsertSystemCSSVars();\n\n\t\tresolve();\n\n\t\tbooted = true;\n\t\tawait eventProvider.fireEventAsync(\"boot\");\n\t};\n\n\tbootPromise = new Promise(bootExecutor as (resolve: PromiseResolve) => void);\n\treturn bootPromise;\n};\n\n/**\n * Callback, executed after theme properties registration\n * to apply the newly registered theme.\n * @private\n * @param { string } theme\n */\nconst onThemeRegistered = (theme: string) => {\n\tconst currentTheme = getTheme();\n\tif (booted && theme === currentTheme) {\n\t\tapplyTheme(currentTheme);\n\t}\n};\n\nexport {\n\tboot,\n\tattachBoot,\n};\n"]}
|
package/dist/CSP.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CSP.js","sourceRoot":"","sources":["../src/CSP.ts"],"names":[],"mappings":"AAAA,MAAM,KAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;AACxC,IAAI,QAAQ,GAAG,KAAK,CAAC;AACrB,IAAI,YAAY,GAAG,IAAI,CAAC;AAExB;;;;;;GAMG;AACH,MAAM,iBAAiB,GAAG,CAAC,WAAmB,EAAE,IAAY,EAAE,EAAE;IAC/D,KAAK,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;AAC9B,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,CAAC,WAAmB,EAAE,IAAY,EAAE,EAAE;IACpD,MAAM,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAE9C,IAAI,CAAC,cAAc,EAAE;QACpB,OAAO,CAAC,IAAI,CAAC,kCAAkC,WAAW,8DAA8D,CAAC,CAAC,CAAC,sBAAsB;QACjJ,OAAO,EAAE,CAAC;KACV;IAED,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AAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,WAAW,GAAG,CAAC,GAAY,EAAE,EAAE;IACpC,QAAQ,GAAG,GAAG,CAAC;AAChB,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,eAAe,GAAG,CAAC,OAAgB,EAAE,EAAE;IAC5C,YAAY,GAAG,OAAO,CAAC;AACxB,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,GAAG,EAAE;IAC3B,OAAO,QAAQ,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC/B,OAAO,YAAY,CAAC;AACrB,CAAC,CAAC;AAEF,OAAO,EACN,iBAAiB,EACjB,MAAM,EACN,WAAW,EACX,eAAe,EACf,cAAc,EACd,kBAAkB,GAClB,CAAC","sourcesContent":["const roots = new Map<string, string>();\nlet useLinks = false;\nlet preloadLinks = true;\n\n/**\n * Use this function to provide the path to the directory where the css resources for the given package will be served from.\n *\n * @public\n * @param packageName name of the package that is being configured\n * @param root path, accessible by the server that will serve the css resources\n */\nconst setPackageCSSRoot = (packageName: string, root: string) => {\n\troots.set(packageName, root);\n};\n\nconst getUrl = (packageName: string, path: string) => {\n\tconst packageCSSRoot = roots.get(packageName);\n\n\tif (!packageCSSRoot) {\n\t\tconsole.warn(`Root path to the CSS resources ${packageName} not provided - use \"setPackageCSSRoot\" to provide the root.`); // eslint-disable-line\n\t\treturn \"\";\n\t}\n\n\treturn `${packageCSSRoot}${path}`;\n};\n\n/**\n * Call this function to enable or disable the usage of <link> tags instead of <style> tags to achieve CSP compliance\n * Example: \"setUseLinks(true)\" will unconditionally use <link> tags for all browsers;\n * Example: \"setUseLinks(!document.adoptedStyleSheets) will only enable the usage of <link> tags for browsers that do not support constructable stylesheets.\n *\n * @public\n * @param use whether links will be used\n */\nconst setUseLinks = (use: boolean) => {\n\tuseLinks = use;\n};\n\n/**\n * Call this function to enable or disable the preloading of <link> tags.\n * Note: only taken into account when <link> tags are being used.\n * Note: links are being preloaded by default, so call \"setPreloadLinks(false)\" to opt out of this.\n *\n * @public\n * @param preload\n */\nconst setPreloadLinks = (preload: boolean) => {\n\tpreloadLinks = preload;\n};\n\nconst shouldUseLinks = () => {\n\treturn useLinks;\n};\n\nconst shouldPreloadLinks = () => {\n\treturn preloadLinks;\n};\n\nexport {\n\tsetPackageCSSRoot,\n\tgetUrl,\n\tsetUseLinks,\n\tsetPreloadLinks,\n\tshouldUseLinks,\n\tshouldPreloadLinks,\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomElementsRegistry.js","sourceRoot":"","sources":["../src/CustomElementsRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGxF,MAAM,IAAI,GAAG,iBAAiB,CAAsB,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;AACvE,MAAM,WAAW,GAAG,IAAI,GAAG,EAAU,CAAC;AAEtC,IAAI,QAAQ,GAAG,IAAI,GAAG,EAAuB,CAAC;AAC9C,IAAI,cAAmC,CAAC;AAExC,MAAM,eAAe,GAAG,CAAC,CAAC,CAAC;AAE3B,MAAM,WAAW,GAAG,CAAC,GAAW,EAAE,EAAE;IACnC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACrB,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,sBAAsB,EAAE,CAAC,CAAC;AACzC,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,GAAW,EAAE,EAAE;IACvC,OAAO,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAC7B,CAAC,CAAC;AAEF,MAAM,oBAAoB,GAAG,GAAG,EAAE;IACjC,OAAO,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC;AAClC,CAAC,CAAC;AAEF,MAAM,4BAA4B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C;SACzB;aAAM,IAAI,UAAU,GAAG,CAAC,EAAE;YAC1B,WAAW,GAAG,SAAS,CAAC;SACxB;aAAM;YACN,WAAW,GAAG,UAAU,CAAC;SACzB;QACD,OAAO,GAAG,GAAG,OAAO,QAAQ,cAAc,CAAC,WAAW,sBAAsB,QAAQ,CAAC,GAAG,CAAC,iBAAiB,CAAE,CAAC,IAAI,gDAAgD,WAAW,aAAa,YAAY,CAAC,WAAW,MAAM,CAAC,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,iBAAiB,CAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;QAEpR,IAAI,UAAU,GAAG,CAAC,EAAE;YACnB,OAAO,GAAG,GAAG,OAAO,qFAAqF,YAAY,CAAC,WAAW,kCAAkC,CAAC;SACpK;aAAM;YACN,OAAO,GAAG,GAAG,OAAO,+HAA+H,CAAC;SACpJ;IACF,CAAC,CAAC,CAAC;IAEH,OAAO,GAAG,GAAG,OAAO,oNAAoN,CAAC;IAEzO,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,sBAAsB;AAC9C,CAAC,CAAC;AAEF,OAAO,EACN,WAAW,EACX,eAAe,EACf,oBAAoB,EACpB,4BAA4B,GAC5B,CAAC","sourcesContent":["import getSharedResource from \"./getSharedResource.js\";\nimport { getCurrentRuntimeIndex, compareRuntimes, getAllRuntimes } from \"./Runtimes.js\";\nimport { Timeout } from \"./types.js\";\n\nconst Tags = getSharedResource<Map<string, number>>(\"Tags\", new Map());\nconst Definitions = new Set<string>();\n\nlet Failures = new Map<number, Set<string>>();\nlet failureTimeout: Timeout | undefined;\n\nconst UNKNOWN_RUNTIME = -1;\n\nconst registerTag = (tag: string) => {\n\tDefinitions.add(tag);\n\tTags.set(tag, getCurrentRuntimeIndex());\n};\n\nconst isTagRegistered = (tag: string) => {\n\treturn Definitions.has(tag);\n};\n\nconst getAllRegisteredTags = () => {\n\treturn [...Definitions.values()];\n};\n\nconst recordTagRegistrationFailure = (tag: string) => {\n\tlet tagRegRuntimeIndex = Tags.get(tag);\n\tif (tagRegRuntimeIndex === undefined) {\n\t\ttagRegRuntimeIndex = UNKNOWN_RUNTIME; // If the tag is taken, but not registered in Tags, then a version before 1.1.0 defined it => use the \"unknown\" key\n\t}\n\n\tif (!Failures.has(tagRegRuntimeIndex)) {\n\t\tFailures.set(tagRegRuntimeIndex, new Set());\n\t}\n\tFailures.get(tagRegRuntimeIndex)!.add(tag);\n\n\tif (!failureTimeout) {\n\t\tfailureTimeout = setTimeout(() => {\n\t\t\tdisplayFailedRegistrations();\n\t\t\tFailures = new Map();\n\t\t\tfailureTimeout = undefined;\n\t\t}, 1000);\n\t}\n};\n\nconst displayFailedRegistrations = () => {\n\tconst allRuntimes = getAllRuntimes();\n\tconst currentRuntimeIndex = getCurrentRuntimeIndex();\n\tconst currentRuntime = allRuntimes[currentRuntimeIndex];\n\n\tlet message = `Multiple UI5 Web Components instances detected.`;\n\n\tif (allRuntimes.length > 1) {\n\t\tmessage = `${message}\\nLoading order (versions before 1.1.0 not listed): ${allRuntimes.map(runtime => `\\n${runtime.description}`).join(\"\")}`;\n\t}\n\n\t[...Failures.keys()].forEach(otherRuntimeIndex => {\n\t\tlet comparison: number;\n\t\tlet otherRuntime;\n\n\t\tif (otherRuntimeIndex === UNKNOWN_RUNTIME) { // version < 1.1.0 defined the tag\n\t\t\tcomparison = 1; // the current runtime is considered newer\n\t\t\totherRuntime = {\n\t\t\t\tdescription: `Older unknown runtime`,\n\t\t\t};\n\t\t} else {\n\t\t\tcomparison = compareRuntimes(currentRuntimeIndex, otherRuntimeIndex);\n\t\t\totherRuntime = allRuntimes[otherRuntimeIndex];\n\t\t}\n\n\t\tlet compareWord;\n\t\tif (comparison > 0) {\n\t\t\tcompareWord = \"an older\";\n\t\t} else if (comparison < 0) {\n\t\t\tcompareWord = \"a newer\";\n\t\t} else {\n\t\t\tcompareWord = \"the same\";\n\t\t}\n\t\tmessage = `${message}\\n\\n\"${currentRuntime.description}\" failed to define ${Failures.get(otherRuntimeIndex)!.size} tag(s) as they were defined by a runtime of ${compareWord} version \"${otherRuntime.description}\": ${([...Failures.get(otherRuntimeIndex)!]).sort().join(\", \")}.`;\n\n\t\tif (comparison > 0) {\n\t\t\tmessage = `${message}\\nWARNING! If your code uses features of the above web components, unavailable in ${otherRuntime.description}, it might not work as expected!`;\n\t\t} else {\n\t\t\tmessage = `${message}\\nSince the above web components were defined by the same or newer version runtime, they should be compatible with your code.`;\n\t\t}\n\t});\n\n\tmessage = `${message}\\n\\nTo prevent other runtimes from defining tags that you use, consider using scoping or have third-party libraries use scoping: https://github.com/SAP/ui5-webcomponents/blob/main/docs/2-advanced/03-scoping.md.`;\n\n\tconsole.warn(message); // eslint-disable-line\n};\n\nexport {\n\tregisterTag,\n\tisTagRegistered,\n\tgetAllRegisteredTags,\n\trecordTagRegistrationFailure,\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomElementsScope.js","sourceRoot":"","sources":["../src/CustomElementsScope.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,IAAI,EACJ,GAAG,EACH,YAAY,GACZ,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACN,8BAA8B,EAC9B,8BAA8B,EAC9B,6BAA6B,EAC7B,6BAA6B,EAC7B,wBAAwB,EACxB,+BAA+B,GAC/B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,SAAS;;AACP,cAAI,GAAG,IAAI,CAAC;AACZ,aAAG,GAAG,GAAG,CAAC;AACV,sBAAY,GAA8B,YAAY,CAAC;AAG/D,eAAe,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;AAExC,OAAO,EACN,SAAS,EACT,8BAA8B,EAC9B,8BAA8B,EAC9B,6BAA6B,EAC7B,6BAA6B,EAC7B,wBAAwB,EACxB,+BAA+B,GAC/B,CAAC"}
|
|
1
|
+
{"version":3,"file":"CustomElementsScope.js","sourceRoot":"","sources":["../src/CustomElementsScope.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,IAAI,EACJ,GAAG,EACH,YAAY,GACZ,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACN,8BAA8B,EAC9B,8BAA8B,EAC9B,6BAA6B,EAC7B,6BAA6B,EAC7B,wBAAwB,EACxB,+BAA+B,GAC/B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,SAAS;;AACP,cAAI,GAAG,IAAI,CAAC;AACZ,aAAG,GAAG,GAAG,CAAC;AACV,sBAAY,GAA8B,YAAY,CAAC;AAG/D,eAAe,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;AAExC,OAAO,EACN,SAAS,EACT,8BAA8B,EAC9B,8BAA8B,EAC9B,6BAA6B,EAC7B,6BAA6B,EAC7B,wBAAwB,EACxB,+BAA+B,GAC/B,CAAC","sourcesContent":["import {\n\thtml,\n\tsvg,\n\tunsafeStatic,\n} from \"lit-html/static.js\";\n\nimport {\n\tsetCustomElementsScopingSuffix,\n\tgetCustomElementsScopingSuffix,\n\tsetCustomElementsScopingRules,\n\tgetCustomElementsScopingRules,\n\tshouldScopeCustomElement,\n\tgetEffectiveScopingSuffixForTag,\n} from \"./CustomElementsScopeUtils.js\";\nimport { registerFeature } from \"./FeaturesRegistry.js\";\n\nclass LitStatic {\n\tstatic html = html;\n\tstatic svg = svg;\n\tstatic unsafeStatic: (value: string) => object = unsafeStatic;\n}\n\nregisterFeature(\"LitStatic\", LitStatic);\n\nexport {\n\tLitStatic,\n\tsetCustomElementsScopingSuffix,\n\tgetCustomElementsScopingSuffix,\n\tsetCustomElementsScopingRules,\n\tgetCustomElementsScopingRules,\n\tshouldScopeCustomElement,\n\tgetEffectiveScopingSuffixForTag,\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomElementsScop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C,OAAO,IAAI,EAAE,CAAC;IACpC,QAAQ,GAAG,KAAK,CAAC;IACjB,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,yCAAyC;AAC7D,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,6BAA6B,GAAG,GAAG,EAAE;IAC1C,OAAO,QAAQ,CAAC;AACjB,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,wBAAwB,GAAG,CAAC,GAAW,EAAE,EAAE;IAChD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACxB,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QACjH,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;KAC3B;IAED,OAAO,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAC3B,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,+BAA+B,GAAG,CAAC,GAAW,EAAE,EAAE;IACvD,IAAI,wBAAwB,CAAC,GAAG,CAAC,EAAE;QAClC,OAAO,8BAA8B,EAAE,CAAC;KACxC;AACF,CAAC,CAAC;AAEF,OAAO,EACN,8BAA8B,EAC9B,8BAA8B,EAC9B,6BAA6B,EAC7B,6BAA6B,EAC7B,wBAAwB,EACxB,+BAA+B,GAC/B,CAAC","sourcesContent":["let suf: string;\n\ntype Rules = {\n\tinclude: Array<RegExp>,\n\texclude: Array<RegExp>,\n};\n\nlet rulesObj: Rules = {\n\tinclude: [/^ui5-/],\n\texclude: [],\n};\n\nconst tagsCache = new Map<string, boolean>(); // true/false means the tag should/should not be cached, undefined means not known yet.\n\n/**\n * Sets the suffix to be used for custom elements scoping, f.e. pass \"demo\" to get tags such as \"ui5-button-demo\".\n * Note: by default all tags starting with \"ui5-\" will be scoped, unless you change this by calling \"setCustomElementsScopingRules\"\n *\n * @public\n * @param suffix The scoping suffix\n */\nconst setCustomElementsScopingSuffix = (suffix: string) => {\n\tif (!suffix.match(/^[a-zA-Z0-9_-]+$/)) {\n\t\tthrow new Error(\"Only alphanumeric characters and dashes allowed for the scoping suffix\");\n\t}\n\n\tsuf = suffix;\n};\n\n/**\n * Returns the currently set scoping suffix, or undefined if not set.\n *\n * @public\n * @returns {String|undefined}\n */\nconst getCustomElementsScopingSuffix = () => {\n\treturn suf;\n};\n\n/**\n * Sets the rules, governing which custom element tags to scope and which not, f.e.\n * setCustomElementsScopingRules({include: [/^ui5-/]}, exclude: [/^ui5-mylib-/, /^ui5-carousel$/]);\n * will scope all elements starting with \"ui5-\" but not the ones starting with \"ui5-mylib-\" and not \"ui5-carousel\".\n *\n * @public\n * @param rules Object with \"include\" and \"exclude\" properties, both arrays of regular expressions. Note that \"include\"\n * rules are applied first and \"exclude\" rules second.\n */\nconst setCustomElementsScopingRules = (rules: Rules) => {\n\tif (!rules || !rules.include) {\n\t\tthrow new Error(`\"rules\" must be an object with at least an \"include\" property`);\n\t}\n\n\tif (!Array.isArray(rules.include) || rules.include.some(rule => !(rule instanceof RegExp))) {\n\t\tthrow new Error(`\"rules.include\" must be an array of regular expressions`);\n\t}\n\n\tif (rules.exclude && (!Array.isArray(rules.exclude) || rules.exclude.some(rule => !(rule instanceof RegExp)))) {\n\t\tthrow new Error(`\"rules.exclude\" must be an array of regular expressions`);\n\t}\n\n\trules.exclude = rules.exclude || [];\n\trulesObj = rules;\n\ttagsCache.clear(); // reset the cache upon setting new rules\n};\n\n/**\n * Returns the rules, governing which custom element tags to scope and which not. By default, all elements\n * starting with \"ui5-\" are scoped. The default rules are: {include: [/^ui5-/]}.\n *\n * @public\n * @returns {Object}\n */\nconst getCustomElementsScopingRules = () => {\n\treturn rulesObj;\n};\n\n/**\n * Determines whether custom elements with the given tag should be scoped or not.\n * The tag is first matched against the \"include\" rules and then against the \"exclude\" rules and the\n * result is cached until new rules are set.\n *\n * @public\n * @param tag\n */\nconst shouldScopeCustomElement = (tag: string) => {\n\tif (!tagsCache.has(tag)) {\n\t\tconst result = rulesObj.include.some(rule => tag.match(rule)) && !rulesObj.exclude.some(rule => tag.match(rule));\n\t\ttagsCache.set(tag, result);\n\t}\n\n\treturn tagsCache.get(tag);\n};\n\n/**\n * Returns the currently set scoping suffix, if any and if the tag should be scoped, or undefined otherwise.\n *\n * @public\n * @param tag\n * @returns {String}\n */\nconst getEffectiveScopingSuffixForTag = (tag: string) => {\n\tif (shouldScopeCustomElement(tag)) {\n\t\treturn getCustomElementsScopingSuffix();\n\t}\n};\n\nexport {\n\tsetCustomElementsScopingSuffix,\n\tgetCustomElementsScopingSuffix,\n\tsetCustomElementsScopingRules,\n\tgetCustomElementsScopingRules,\n\tshouldScopeCustomElement,\n\tgetEffectiveScopingSuffixForTag,\n};\n"]}
|
package/dist/DOMObserver.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DOMObserver.js","sourceRoot":"","sources":["../src/DOMObserver.ts"],"names":[],"mappings":"AAAA,MAAM,SAAS,GAAG,IAAI,OAAO,EAA0B,CAAC;AAExD;;;;GAIG;AACH,MAAM,cAAc,GAAG,CAAC,IAAU,EAAE,QAA0B,EAAE,OAA8B,EAAE,EAAE;IACjG,MAAM,QAAQ,GAAG,IAAI,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAChD,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC9B,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACjC,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,gBAAgB,GAAG,CAAC,IAAU,EAAE,EAAE;IACvC,MAAM,QAAQ,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACrC,IAAI,QAAQ,EAAE;QACb,QAAQ,CAAC,UAAU,EAAE,CAAC;QACtB,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;KACvB;AACF,CAAC,CAAC;AAEF,OAAO,EACN,cAAc,EACd,gBAAgB,GAChB,CAAC"}
|
|
1
|
+
{"version":3,"file":"DOMObserver.js","sourceRoot":"","sources":["../src/DOMObserver.ts"],"names":[],"mappings":"AAAA,MAAM,SAAS,GAAG,IAAI,OAAO,EAA0B,CAAC;AAExD;;;;GAIG;AACH,MAAM,cAAc,GAAG,CAAC,IAAU,EAAE,QAA0B,EAAE,OAA8B,EAAE,EAAE;IACjG,MAAM,QAAQ,GAAG,IAAI,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAChD,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC9B,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACjC,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,gBAAgB,GAAG,CAAC,IAAU,EAAE,EAAE;IACvC,MAAM,QAAQ,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACrC,IAAI,QAAQ,EAAE;QACb,QAAQ,CAAC,UAAU,EAAE,CAAC;QACtB,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;KACvB;AACF,CAAC,CAAC;AAEF,OAAO,EACN,cAAc,EACd,gBAAgB,GAChB,CAAC","sourcesContent":["const observers = new WeakMap<Node, MutationObserver>();\n\n/**\n * @param node\n * @param callback\n * @param options\n */\nconst observeDOMNode = (node: Node, callback: MutationCallback, options?: MutationObserverInit) => {\n\tconst observer = new MutationObserver(callback);\n\tobservers.set(node, observer);\n\tobserver.observe(node, options);\n};\n\n/**\n * @param node\n */\nconst unobserveDOMNode = (node: Node) => {\n\tconst observer = observers.get(node);\n\tif (observer) {\n\t\tobserver.disconnect();\n\t\tobservers.delete(node);\n\t}\n};\n\nexport {\n\tobserveDOMNode,\n\tunobserveDOMNode,\n};\n"]}
|