@ui5/webcomponents-base 0.0.0-b132dd7b9 → 0.0.0-b3a4f8020
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/AGENTS.md +195 -0
- package/CHANGELOG.md +563 -0
- package/CLAUDE.md +1 -0
- package/LICENSE.txt +201 -0
- package/README.md +7 -7
- package/dist/.tsbuildinfobuild +1 -1
- package/dist/Assets-fetch.d.ts +1 -0
- package/dist/Assets-fetch.js +3 -0
- package/dist/Assets-fetch.js.map +1 -0
- package/dist/Assets-node.d.ts +12 -0
- package/dist/Assets-node.js +14 -0
- package/dist/Assets-node.js.map +1 -0
- package/dist/Assets.d.ts +1 -0
- package/dist/Assets.js +3 -0
- package/dist/Assets.js.map +1 -0
- package/dist/Boot.d.ts +2 -1
- package/dist/Boot.js +44 -14
- package/dist/Boot.js.map +1 -1
- package/dist/CustomElementsRegistry.js +1 -1
- package/dist/CustomElementsRegistry.js.map +1 -1
- package/dist/CustomElementsScopeUtils.d.ts +10 -3
- package/dist/CustomElementsScopeUtils.js +13 -3
- package/dist/CustomElementsScopeUtils.js.map +1 -1
- package/dist/DragAndDrop.d.ts +2 -0
- package/dist/DragAndDrop.js +5 -0
- package/dist/DragAndDrop.js.map +1 -0
- package/dist/FontFace.css +36 -0
- package/dist/FontFace.js +0 -8
- package/dist/FontFace.js.map +1 -1
- package/dist/InitialConfiguration.js +7 -0
- package/dist/InitialConfiguration.js.map +1 -1
- package/dist/Keys.d.ts +4 -1
- package/dist/Keys.js +4 -1
- package/dist/Keys.js.map +1 -1
- package/dist/ManagedStyles.js +1 -1
- package/dist/ManagedStyles.js.map +1 -1
- package/dist/ScrollbarStyles.d.ts +2 -0
- package/dist/ScrollbarStyles.js +9 -0
- package/dist/ScrollbarStyles.js.map +1 -0
- package/dist/SystemCSSVars.js +2 -4
- package/dist/SystemCSSVars.js.map +1 -1
- package/dist/UI5Element.d.ts +35 -9
- package/dist/UI5Element.js +59 -27
- package/dist/UI5Element.js.map +1 -1
- package/dist/UI5ElementMetadata.d.ts +1 -1
- package/dist/UI5ElementMetadata.js.map +1 -1
- package/dist/asset-registries/Icons.d.ts +42 -8
- package/dist/asset-registries/Icons.js +51 -8
- package/dist/asset-registries/Icons.js.map +1 -1
- package/dist/asset-registries/Illustrations.d.ts +133 -8
- package/dist/asset-registries/Illustrations.js +82 -1
- package/dist/asset-registries/Illustrations.js.map +1 -1
- package/dist/asset-registries/LocaleData.js +2 -1
- package/dist/asset-registries/LocaleData.js.map +1 -1
- package/dist/asset-registries/Themes.d.ts +5 -2
- package/dist/asset-registries/Themes.js +3 -3
- package/dist/asset-registries/Themes.js.map +1 -1
- package/dist/config/Language.d.ts +2 -1
- package/dist/config/Language.js +12 -1
- package/dist/config/Language.js.map +1 -1
- package/dist/config/Theme.d.ts +13 -1
- package/dist/config/Theme.js +18 -1
- package/dist/config/Theme.js.map +1 -1
- package/dist/config/ThemeRoot.d.ts +3 -1
- package/dist/config/ThemeRoot.js +3 -1
- package/dist/config/ThemeRoot.js.map +1 -1
- package/dist/css/MultipleDragGhost.css +17 -0
- package/dist/css/OpenUI5PopupStyles.css +10 -0
- package/dist/css/ScrollbarStyles.css +3 -0
- package/dist/css/SystemCSSVars.css +28 -3
- package/dist/custom-elements-internal.json +1855 -1738
- package/dist/custom-elements.json +1462 -1345
- package/dist/decorators/slot-strict.d.ts +27 -0
- package/dist/decorators/slot-strict.js +54 -0
- package/dist/decorators/slot-strict.js.map +1 -0
- package/dist/decorators/slot.d.ts +18 -0
- package/dist/decorators/slot.js +18 -0
- package/dist/decorators/slot.js.map +1 -1
- package/dist/decorators.d.ts +2 -1
- package/dist/decorators.js +2 -1
- package/dist/decorators.js.map +1 -1
- package/dist/features/F6Navigation.d.ts +1 -0
- package/dist/features/F6Navigation.js +23 -14
- package/dist/features/F6Navigation.js.map +1 -1
- package/dist/features/InputElementsFormSupport.d.ts +1 -1
- package/dist/features/InputElementsFormSupport.js +6 -2
- package/dist/features/InputElementsFormSupport.js.map +1 -1
- package/dist/features/OpenUI5Support.d.ts +15 -4
- package/dist/features/OpenUI5Support.js +83 -42
- package/dist/features/OpenUI5Support.js.map +1 -1
- package/dist/features/insertOpenUI5PopupStyles.d.ts +2 -0
- package/dist/features/insertOpenUI5PopupStyles.js +9 -0
- package/dist/features/insertOpenUI5PopupStyles.js.map +1 -0
- package/dist/features/patchPatcher.d.ts +7 -6
- package/dist/features/patchPatcher.js +14 -4
- package/dist/features/patchPatcher.js.map +1 -1
- package/dist/features/patchPopup.d.ts +26 -8
- package/dist/features/patchPopup.js +118 -25
- package/dist/features/patchPopup.js.map +1 -1
- package/dist/generated/VersionInfo.js +6 -6
- package/dist/generated/VersionInfo.js.map +1 -1
- package/dist/generated/assets/i18n/messagebundle_en.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -0
- package/dist/generated/css/FontFace.css.d.ts +1 -1
- package/dist/generated/css/FontFace.css.js +36 -1
- package/dist/generated/css/FontFace.css.js.map +1 -1
- package/dist/generated/css/MultipleDragGhost.css.d.ts +2 -0
- package/dist/generated/css/MultipleDragGhost.css.js +2 -0
- package/dist/generated/css/MultipleDragGhost.css.js.map +1 -0
- package/dist/generated/css/OpenUI5PopupStyles.css.d.ts +2 -0
- package/dist/generated/css/OpenUI5PopupStyles.css.js +2 -0
- package/dist/generated/css/OpenUI5PopupStyles.css.js.map +1 -0
- package/dist/generated/css/ScrollbarStyles.css.d.ts +2 -0
- package/dist/generated/css/ScrollbarStyles.css.js +2 -0
- package/dist/generated/css/ScrollbarStyles.css.js.map +1 -0
- package/dist/generated/css/SystemCSSVars.css.d.ts +1 -1
- package/dist/generated/css/SystemCSSVars.css.js +1 -1
- package/dist/generated/css/SystemCSSVars.css.js.map +1 -1
- package/dist/generated/i18n/i18n-defaults.d.ts +3 -0
- package/dist/generated/i18n/i18n-defaults.js +3 -0
- package/dist/generated/i18n/i18n-defaults.js.map +1 -0
- package/dist/generated/json-imports/i18n-fetch.d.ts +1 -0
- package/dist/generated/json-imports/i18n-fetch.js +2 -0
- package/dist/generated/json-imports/i18n-fetch.js.map +1 -0
- package/dist/generated/json-imports/i18n-node.d.ts +1 -0
- package/dist/generated/json-imports/i18n-node.js +2 -0
- package/dist/generated/json-imports/i18n-node.js.map +1 -0
- package/dist/generated/json-imports/i18n.d.ts +1 -0
- package/dist/generated/json-imports/i18n.js +2 -0
- package/dist/generated/json-imports/i18n.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/jsx-runtime.d.ts +1 -0
- package/dist/jsx-runtime.js.map +1 -1
- package/dist/prod/Assets-fetch.js +2 -0
- package/dist/prod/Assets-fetch.js.map +7 -0
- package/dist/prod/Assets-node.js +2 -0
- package/dist/prod/Assets-node.js.map +7 -0
- package/dist/prod/Assets.js +2 -0
- package/dist/prod/Assets.js.map +7 -0
- package/dist/prod/Boot.js +1 -1
- package/dist/prod/Boot.js.map +3 -3
- package/dist/prod/CustomElementsRegistry.js +5 -5
- package/dist/prod/CustomElementsRegistry.js.map +2 -2
- package/dist/prod/CustomElementsScopeUtils.js +1 -1
- package/dist/prod/CustomElementsScopeUtils.js.map +3 -3
- package/dist/prod/DragAndDrop.js +2 -0
- package/dist/prod/DragAndDrop.js.map +7 -0
- package/dist/prod/FontFace.js +1 -1
- package/dist/prod/FontFace.js.map +3 -3
- package/dist/prod/InitialConfiguration.js +1 -1
- package/dist/prod/InitialConfiguration.js.map +2 -2
- package/dist/prod/Keys.js +1 -1
- package/dist/prod/Keys.js.map +3 -3
- package/dist/prod/ManagedStyles.js +1 -1
- package/dist/prod/ManagedStyles.js.map +2 -2
- package/dist/prod/ScrollbarStyles.js +2 -0
- package/dist/prod/ScrollbarStyles.js.map +7 -0
- package/dist/prod/SystemCSSVars.js +1 -1
- package/dist/prod/SystemCSSVars.js.map +3 -3
- package/dist/prod/UI5Element.js +1 -1
- package/dist/prod/UI5Element.js.map +3 -3
- package/dist/prod/UI5ElementMetadata.js +1 -1
- package/dist/prod/UI5ElementMetadata.js.map +1 -1
- package/dist/prod/asset-registries/Icons.js +1 -1
- package/dist/prod/asset-registries/Icons.js.map +3 -3
- package/dist/prod/asset-registries/Illustrations.js +1 -1
- package/dist/prod/asset-registries/Illustrations.js.map +3 -3
- package/dist/prod/asset-registries/LocaleData.js +1 -1
- package/dist/prod/asset-registries/LocaleData.js.map +2 -2
- package/dist/prod/asset-registries/Themes.js +1 -1
- package/dist/prod/asset-registries/Themes.js.map +3 -3
- package/dist/prod/config/Language.js +1 -1
- package/dist/prod/config/Language.js.map +3 -3
- package/dist/prod/config/Theme.js +1 -1
- package/dist/prod/config/Theme.js.map +3 -3
- package/dist/prod/config/ThemeRoot.js.map +2 -2
- package/dist/prod/decorators/slot-strict.js +2 -0
- package/dist/prod/decorators/slot-strict.js.map +7 -0
- package/dist/prod/decorators/slot.js.map +2 -2
- package/dist/prod/decorators.js +1 -1
- package/dist/prod/decorators.js.map +3 -3
- package/dist/prod/features/F6Navigation.js +1 -1
- package/dist/prod/features/F6Navigation.js.map +3 -3
- package/dist/prod/features/InputElementsFormSupport.js +1 -1
- package/dist/prod/features/InputElementsFormSupport.js.map +3 -3
- package/dist/prod/features/OpenUI5Support.js +1 -1
- package/dist/prod/features/OpenUI5Support.js.map +3 -3
- package/dist/prod/features/insertOpenUI5PopupStyles.js +2 -0
- package/dist/prod/features/insertOpenUI5PopupStyles.js.map +7 -0
- package/dist/prod/features/patchPatcher.js +1 -1
- package/dist/prod/features/patchPatcher.js.map +3 -3
- package/dist/prod/features/patchPopup.js +1 -1
- package/dist/prod/features/patchPopup.js.map +3 -3
- package/dist/prod/generated/VersionInfo.js +1 -1
- package/dist/prod/generated/VersionInfo.js.map +2 -2
- package/dist/prod/generated/assets/i18n/messagebundle_en.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -0
- package/dist/prod/generated/css/FontFace.css.js +36 -1
- package/dist/prod/generated/css/FontFace.css.js.map +2 -2
- package/dist/prod/generated/css/MultipleDragGhost.css.js +2 -0
- package/dist/prod/generated/css/MultipleDragGhost.css.js.map +7 -0
- package/dist/prod/generated/css/OpenUI5PopupStyles.css.js +2 -0
- package/dist/prod/generated/css/OpenUI5PopupStyles.css.js.map +7 -0
- package/dist/prod/generated/css/ScrollbarStyles.css.js +2 -0
- package/dist/prod/generated/css/ScrollbarStyles.css.js.map +7 -0
- package/dist/prod/generated/css/SystemCSSVars.css.js +1 -1
- package/dist/prod/generated/css/SystemCSSVars.css.js.map +1 -1
- package/dist/prod/generated/i18n/i18n-defaults.js +2 -0
- package/dist/prod/generated/i18n/i18n-defaults.js.map +7 -0
- package/dist/prod/generated/json-imports/i18n-fetch.js +2 -0
- package/dist/prod/generated/json-imports/i18n-fetch.js.map +7 -0
- package/dist/prod/generated/json-imports/i18n-node.js +2 -0
- package/dist/prod/generated/json-imports/i18n-node.js.map +7 -0
- package/dist/prod/generated/json-imports/i18n.js +2 -0
- package/dist/prod/generated/json-imports/i18n.js.map +7 -0
- package/dist/prod/index.js +1 -1
- package/dist/prod/index.js.map +3 -3
- package/dist/prod/jsx-runtime.js.map +2 -2
- package/dist/prod/ssr-dom-shim.js +1 -1
- package/dist/prod/ssr-dom-shim.js.map +2 -2
- package/dist/prod/theming/applyTheme.js +1 -1
- package/dist/prod/theming/applyTheme.js.map +3 -3
- package/dist/prod/theming/componentStyles.js +3 -0
- package/dist/prod/theming/componentStyles.js.map +7 -0
- package/dist/prod/thirdparty/preact/preact.module.js +1 -1
- package/dist/prod/updateShadowRoot.js +1 -1
- package/dist/prod/updateShadowRoot.js.map +3 -3
- package/dist/prod/util/FocusableElements.js +1 -1
- package/dist/prod/util/FocusableElements.js.map +2 -2
- package/dist/prod/util/SelectionAssistant.js +1 -1
- package/dist/prod/util/SelectionAssistant.js.map +3 -3
- package/dist/prod/util/TabbableElements.js +1 -1
- package/dist/prod/util/TabbableElements.js.map +2 -2
- package/dist/prod/util/createInstanceChecker.js +2 -0
- package/dist/prod/util/createInstanceChecker.js.map +7 -0
- package/dist/prod/util/createMultiInstanceChecker.js +2 -0
- package/dist/prod/util/createMultiInstanceChecker.js.map +7 -0
- package/dist/prod/util/dragAndDrop/DragRegistry.js +1 -1
- package/dist/prod/util/dragAndDrop/DragRegistry.js.map +3 -3
- package/dist/prod/util/getParentElement.js +2 -0
- package/dist/prod/util/getParentElement.js.map +7 -0
- package/dist/prod/util/isElementHidden.js +1 -1
- package/dist/prod/util/isElementHidden.js.map +3 -3
- package/dist/prod/util/isEventMarked.js +2 -0
- package/dist/prod/util/isEventMarked.js.map +7 -0
- package/dist/prod/util/valueStateNavigation.js +2 -0
- package/dist/prod/util/valueStateNavigation.js.map +7 -0
- package/dist/prod/validateThemeRoot.js +1 -1
- package/dist/prod/validateThemeRoot.js.map +2 -2
- package/dist/ssr-dom-shim.js +2 -1
- package/dist/ssr-dom-shim.js.map +1 -1
- package/dist/theming/applyTheme.d.ts +2 -0
- package/dist/theming/applyTheme.js +20 -5
- package/dist/theming/applyTheme.js.map +1 -1
- package/dist/theming/componentStyles.d.ts +3 -0
- package/dist/theming/componentStyles.js +15 -0
- package/dist/theming/componentStyles.js.map +1 -0
- package/dist/thirdparty/preact/preact.module.js +1 -1
- package/dist/types.d.ts +11 -3
- package/dist/types.js.map +1 -1
- package/dist/updateShadowRoot.js +2 -1
- package/dist/updateShadowRoot.js.map +1 -1
- package/dist/util/FocusableElements.js +3 -3
- package/dist/util/FocusableElements.js.map +1 -1
- package/dist/util/SelectionAssistant.js +0 -8
- package/dist/util/SelectionAssistant.js.map +1 -1
- package/dist/util/TabbableElements.js +2 -2
- package/dist/util/TabbableElements.js.map +1 -1
- package/dist/util/createInstanceChecker.d.ts +2 -0
- package/dist/util/createInstanceChecker.js +8 -0
- package/dist/util/createInstanceChecker.js.map +1 -0
- package/dist/util/createMultiInstanceChecker.d.ts +2 -0
- package/dist/util/createMultiInstanceChecker.js +19 -0
- package/dist/util/createMultiInstanceChecker.js.map +1 -0
- package/dist/util/dragAndDrop/DragRegistry.d.ts +14 -8
- package/dist/util/dragAndDrop/DragRegistry.js +46 -50
- package/dist/util/dragAndDrop/DragRegistry.js.map +1 -1
- package/dist/util/getClassCopy.d.ts +4 -3
- package/dist/util/getParentElement.d.ts +2 -0
- package/dist/util/getParentElement.js +5 -0
- package/dist/util/getParentElement.js.map +1 -0
- package/dist/util/isElementHidden.js +2 -1
- package/dist/util/isElementHidden.js.map +1 -1
- package/dist/util/isEventMarked.d.ts +2 -0
- package/dist/util/isEventMarked.js +6 -0
- package/dist/util/isEventMarked.js.map +1 -0
- package/dist/util/valueStateNavigation.d.ts +8 -0
- package/dist/util/valueStateNavigation.js +40 -0
- package/dist/util/valueStateNavigation.js.map +1 -0
- package/dist/validateThemeRoot.js +6 -2
- package/dist/validateThemeRoot.js.map +1 -1
- package/package-scripts.cjs +64 -33
- package/package.json +27 -22
- package/src/css/MultipleDragGhost.css +17 -0
- package/src/css/OpenUI5PopupStyles.css +10 -0
- package/src/css/ScrollbarStyles.css +3 -0
- package/src/css/SystemCSSVars.css +28 -3
- package/src/i18n/messagebundle.properties +5 -0
- package/src/i18n/messagebundle_en.properties +2 -0
- package/src/i18n/messagebundle_en_US_sappsd.properties +2 -0
- package/src/i18n/messagebundle_en_US_saprigi.properties +2 -0
- package/src/i18n/messagebundle_en_US_saptrc.properties +2 -0
- package/src/thirdparty/preact/preact.module.js +1 -1
- package/cypress/specs/Accessor.cy.tsx +0 -79
- package/cypress/specs/Boot.cy.tsx +0 -19
- package/cypress/specs/ConfigurationChange.cy.tsx +0 -41
- package/cypress/specs/ConfigurationScript.cy.tsx +0 -133
- package/cypress/specs/ConfigurationURL.cy.tsx +0 -201
- package/cypress/specs/CustomMount.cy.tsx +0 -9
- package/cypress/specs/CustomTheme.cy.tsx +0 -36
- package/cypress/specs/EventProvider.cy.tsx +0 -59
- package/cypress/specs/Events.cy.tsx +0 -28
- package/cypress/specs/SystemDOMElements.cy.tsx +0 -8
- package/cypress/specs/Theming.cy.tsx +0 -74
- package/cypress/specs/UI5ElementInvalidation.cy.tsx +0 -252
- package/cypress/specs/UI5ElementLifecycle.cy.tsx +0 -82
- package/cypress/specs/UI5ElementListenForChildPropChanges.cy.tsx +0 -83
- package/cypress/specs/UI5ElementMetadataExt.cy.tsx +0 -42
- package/cypress/specs/UI5ElementPropertyValidation.cy.tsx +0 -16
- package/cypress/specs/UI5ElementPropsAndAttrs.cy.tsx +0 -113
- package/cypress/specs/UI5ElementShadowDOM.cy.tsx +0 -30
- package/cypress/specs/UI5ElementSlots.cy.tsx +0 -136
- package/cypress/specs/WithComplexTemplate.cy.tsx +0 -32
- package/cypress/specs/i18n_texts.cy.tsx +0 -129
- package/cypress/specs/util/FocusableElements.cy.tsx +0 -48
- package/cypress/support/commands.ts +0 -39
- package/cypress/support/component-index.html +0 -12
- package/cypress/support/component.ts +0 -17
- package/cypress/tsconfig.json +0 -21
- package/dist/css/FontFace.css +0 -96
- package/dist/css/OverrideFontFace.css +0 -32
- package/dist/generated/css/OverrideFontFace.css.d.ts +0 -2
- package/dist/generated/css/OverrideFontFace.css.js +0 -2
- package/dist/generated/css/OverrideFontFace.css.js.map +0 -1
- package/dist/prod/generated/css/OverrideFontFace.css.js +0 -2
- package/dist/prod/generated/css/OverrideFontFace.css.js.map +0 -7
- package/dist/prod/util/getEffectiveScrollbarStyle.js +0 -28
- package/dist/prod/util/getEffectiveScrollbarStyle.js.map +0 -7
- package/dist/util/getEffectiveScrollbarStyle.d.ts +0 -2
- package/dist/util/getEffectiveScrollbarStyle.js +0 -36
- package/dist/util/getEffectiveScrollbarStyle.js.map +0 -1
- package/src/css/FontFace.css +0 -96
- package/src/css/OverrideFontFace.css +0 -32
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./generated/json-imports/i18n-fetch.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Assets-fetch.js","sourceRoot":"","sources":["../src/Assets-fetch.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,OAAO,wCAAwC,CAAC","sourcesContent":["// own base package assets\nimport \"./generated/json-imports/i18n-fetch.js\";\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `Assets-node` entry point is used to import all CLDR, theming, and i18n assets.
|
|
3
|
+
*
|
|
4
|
+
* It serves as an alternative to the `Assets` and `Assets-fetch` modules and supports the
|
|
5
|
+
* `with: { type: 'json' }` import attribute for loading JSON files.
|
|
6
|
+
*
|
|
7
|
+
* This import attribute is required in some environments, such as Node.js with server-side rendering (SSR).
|
|
8
|
+
*
|
|
9
|
+
* Example usage:
|
|
10
|
+
* await import("../assets/i18n/messagebundle_bg.json", { with: { type: 'json' } })
|
|
11
|
+
*/
|
|
12
|
+
import "./generated/json-imports/i18n-node.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `Assets-node` entry point is used to import all CLDR, theming, and i18n assets.
|
|
3
|
+
*
|
|
4
|
+
* It serves as an alternative to the `Assets` and `Assets-fetch` modules and supports the
|
|
5
|
+
* `with: { type: 'json' }` import attribute for loading JSON files.
|
|
6
|
+
*
|
|
7
|
+
* This import attribute is required in some environments, such as Node.js with server-side rendering (SSR).
|
|
8
|
+
*
|
|
9
|
+
* Example usage:
|
|
10
|
+
* await import("../assets/i18n/messagebundle_bg.json", { with: { type: 'json' } })
|
|
11
|
+
*/
|
|
12
|
+
// own base package assets
|
|
13
|
+
import "./generated/json-imports/i18n-node.js";
|
|
14
|
+
//# sourceMappingURL=Assets-node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Assets-node.js","sourceRoot":"","sources":["../src/Assets-node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,0BAA0B;AAC1B,OAAO,uCAAuC,CAAC","sourcesContent":["/**\n * The `Assets-node` entry point is used to import all CLDR, theming, and i18n assets.\n *\n * It serves as an alternative to the `Assets` and `Assets-fetch` modules and supports the\n * `with: { type: 'json' }` import attribute for loading JSON files.\n *\n * This import attribute is required in some environments, such as Node.js with server-side rendering (SSR).\n *\n * Example usage:\n * await import(\"../assets/i18n/messagebundle_bg.json\", { with: { type: 'json' } })\n */\n\n// own base package assets\nimport \"./generated/json-imports/i18n-node.js\";\n"]}
|
package/dist/Assets.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./generated/json-imports/i18n.js";
|
package/dist/Assets.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Assets.js","sourceRoot":"","sources":["../src/Assets.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,OAAO,kCAAkC,CAAC","sourcesContent":["// own base package assets\nimport \"./generated/json-imports/i18n.js\";\n"]}
|
package/dist/Boot.d.ts
CHANGED
|
@@ -7,4 +7,5 @@ declare const isBooted: () => boolean;
|
|
|
7
7
|
*/
|
|
8
8
|
declare const attachBoot: (listener: () => void) => void;
|
|
9
9
|
declare const boot: () => Promise<void>;
|
|
10
|
-
|
|
10
|
+
declare const secondaryBoot: () => Promise<void>;
|
|
11
|
+
export { boot, secondaryBoot, attachBoot, isBooted, };
|
package/dist/Boot.js
CHANGED
|
@@ -2,7 +2,8 @@ import whenDOMReady from "./util/whenDOMReady.js";
|
|
|
2
2
|
import EventProvider from "./EventProvider.js";
|
|
3
3
|
import insertFontFace from "./FontFace.js";
|
|
4
4
|
import insertSystemCSSVars from "./SystemCSSVars.js";
|
|
5
|
-
import
|
|
5
|
+
import insertScrollbarStyles from "./ScrollbarStyles.js";
|
|
6
|
+
import { getTheme, getBaseTheme } from "./config/Theme.js";
|
|
6
7
|
import applyTheme from "./theming/applyTheme.js";
|
|
7
8
|
import { registerCurrentRuntime } from "./Runtimes.js";
|
|
8
9
|
import { getFeature } from "./FeaturesRegistry.js";
|
|
@@ -10,6 +11,7 @@ import { attachThemeRegistered } from "./theming/ThemeRegistered.js";
|
|
|
10
11
|
import fixSafariActiveState from "./util/fixSafariActiveState.js";
|
|
11
12
|
let booted = false;
|
|
12
13
|
let bootPromise;
|
|
14
|
+
let openUI5ListenersAttached = false;
|
|
13
15
|
const eventProvider = new EventProvider();
|
|
14
16
|
const isBooted = () => {
|
|
15
17
|
return booted;
|
|
@@ -27,6 +29,31 @@ const attachBoot = (listener) => {
|
|
|
27
29
|
}
|
|
28
30
|
listener();
|
|
29
31
|
};
|
|
32
|
+
/**
|
|
33
|
+
* This function may now be called twice - once without OpenUI5Support, and then later again, when OpenUI5 is loaded dynamically
|
|
34
|
+
* In this case, deregister the UI5 Web Components listener
|
|
35
|
+
*/
|
|
36
|
+
const initF6Navigation = async () => {
|
|
37
|
+
const openUI5Support = getFeature("OpenUI5Support");
|
|
38
|
+
const isOpenUI5Loaded = openUI5Support ? openUI5Support.isOpenUI5Detected() : false;
|
|
39
|
+
const f6Navigation = getFeature("F6Navigation");
|
|
40
|
+
if (openUI5Support) {
|
|
41
|
+
f6Navigation && f6Navigation.destroy(); // F6Navigation is not needed when OpenUI5 is used
|
|
42
|
+
await openUI5Support.init();
|
|
43
|
+
}
|
|
44
|
+
if (f6Navigation && !isOpenUI5Loaded) {
|
|
45
|
+
f6Navigation.init();
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const attachOpenUI5SupportListeners = () => {
|
|
49
|
+
if (openUI5ListenersAttached) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const openUI5Support = getFeature("OpenUI5Support");
|
|
53
|
+
if (openUI5Support) {
|
|
54
|
+
openUI5ListenersAttached = openUI5Support.attachListeners(); // listeners will be attached (return true) only if OpenUI5 is loaded
|
|
55
|
+
}
|
|
56
|
+
};
|
|
30
57
|
const boot = async () => {
|
|
31
58
|
if (bootPromise !== undefined) {
|
|
32
59
|
return bootPromise;
|
|
@@ -38,20 +65,13 @@ const boot = async () => {
|
|
|
38
65
|
return;
|
|
39
66
|
}
|
|
40
67
|
attachThemeRegistered(onThemeRegistered);
|
|
41
|
-
|
|
42
|
-
const isOpenUI5Loaded = openUI5Support ? openUI5Support.isOpenUI5Detected() : false;
|
|
43
|
-
const f6Navigation = getFeature("F6Navigation");
|
|
44
|
-
if (openUI5Support) {
|
|
45
|
-
await openUI5Support.init();
|
|
46
|
-
}
|
|
47
|
-
if (f6Navigation && !isOpenUI5Loaded) {
|
|
48
|
-
f6Navigation.init();
|
|
49
|
-
}
|
|
68
|
+
await initF6Navigation(); // depends on OpenUI5Support
|
|
50
69
|
await whenDOMReady();
|
|
51
70
|
await applyTheme(getTheme());
|
|
52
|
-
|
|
71
|
+
attachOpenUI5SupportListeners(); // depends on OpenUI5Support
|
|
53
72
|
insertFontFace();
|
|
54
73
|
insertSystemCSSVars();
|
|
74
|
+
insertScrollbarStyles();
|
|
55
75
|
fixSafariActiveState();
|
|
56
76
|
resolve();
|
|
57
77
|
booted = true;
|
|
@@ -60,6 +80,11 @@ const boot = async () => {
|
|
|
60
80
|
bootPromise = new Promise(bootExecutor);
|
|
61
81
|
return bootPromise;
|
|
62
82
|
};
|
|
83
|
+
const secondaryBoot = async () => {
|
|
84
|
+
await boot(); // make sure we're not in the middle of boot before re-running the skipped parts
|
|
85
|
+
await initF6Navigation();
|
|
86
|
+
attachOpenUI5SupportListeners();
|
|
87
|
+
};
|
|
63
88
|
/**
|
|
64
89
|
* Callback, executed after theme properties registration
|
|
65
90
|
* to apply the newly registered theme.
|
|
@@ -67,9 +92,14 @@ const boot = async () => {
|
|
|
67
92
|
* @param { string } theme
|
|
68
93
|
*/
|
|
69
94
|
const onThemeRegistered = (theme) => {
|
|
70
|
-
if (booted
|
|
71
|
-
|
|
95
|
+
if (!booted) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
const currentTheme = getTheme();
|
|
99
|
+
const currentBaseTheme = getBaseTheme();
|
|
100
|
+
if (theme === currentTheme || theme === currentBaseTheme) {
|
|
101
|
+
applyTheme(currentTheme);
|
|
72
102
|
}
|
|
73
103
|
};
|
|
74
|
-
export { boot, attachBoot, isBooted, };
|
|
104
|
+
export { boot, secondaryBoot, attachBoot, isBooted, };
|
|
75
105
|
//# 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;
|
|
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,qBAAqB,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC3D,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;AACrE,OAAO,oBAAoB,MAAM,gCAAgC,CAAC;AAElE,IAAI,MAAM,GAAG,KAAK,CAAC;AACnB,IAAI,WAA0B,CA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KAAK,KAAK,gBAAgB,EAAE,CAAC;QAC1D,UAAU,CAAC,YAAY,CAAC,CAAC;IAC1B,CAAC;AACF,CAAC,CAAC;AAEF,OAAO,EACN,IAAI,EACJ,aAAa,EACb,UAAU,EACV,QAAQ,GACR,CAAC","sourcesContent":["import whenDOMReady from \"./util/whenDOMReady.js\";\nimport EventProvider from \"./EventProvider.js\";\nimport insertFontFace from \"./FontFace.js\";\nimport insertSystemCSSVars from \"./SystemCSSVars.js\";\nimport insertScrollbarStyles from \"./ScrollbarStyles.js\";\nimport { getTheme, getBaseTheme } 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 type { PromiseResolve } from \"./types.js\";\nimport { attachThemeRegistered } from \"./theming/ThemeRegistered.js\";\nimport fixSafariActiveState from \"./util/fixSafariActiveState.js\";\n\nlet booted = false;\nlet bootPromise: Promise<void>;\nlet openUI5ListenersAttached = false;\nconst eventProvider = new EventProvider<void, void>();\n\nconst isBooted = (): boolean => {\n\treturn booted;\n};\n\n/**\n * Attaches a callback that will be executed after boot finishes.\n * **Note:** 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\n/**\n * This function may now be called twice - once without OpenUI5Support, and then later again, when OpenUI5 is loaded dynamically\n * In this case, deregister the UI5 Web Components listener\n */\nconst initF6Navigation = async () => {\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\tconst isOpenUI5Loaded = openUI5Support ? openUI5Support.isOpenUI5Detected() : false;\n\tconst f6Navigation = getFeature<typeof F6Navigation>(\"F6Navigation\");\n\n\tif (openUI5Support) {\n\t\tf6Navigation && f6Navigation.destroy(); // F6Navigation is not needed when OpenUI5 is used\n\t\tawait openUI5Support.init();\n\t}\n\n\tif (f6Navigation && !isOpenUI5Loaded) {\n\t\tf6Navigation.init();\n\t}\n};\n\nconst attachOpenUI5SupportListeners = () => {\n\tif (openUI5ListenersAttached) {\n\t\treturn;\n\t}\n\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\tif (openUI5Support) {\n\t\topenUI5ListenersAttached = openUI5Support.attachListeners(); // listeners will be attached (return true) only if OpenUI5 is loaded\n\t}\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\tregisterCurrentRuntime();\n\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\tawait initF6Navigation(); // depends on OpenUI5Support\n\t\tawait whenDOMReady();\n\t\tawait applyTheme(getTheme());\n\t\tattachOpenUI5SupportListeners(); // depends on OpenUI5Support\n\t\tinsertFontFace();\n\t\tinsertSystemCSSVars();\n\t\tinsertScrollbarStyles();\n\t\tfixSafariActiveState();\n\n\t\tresolve();\n\n\t\tbooted = true;\n\t\teventProvider.fireEvent(\"boot\");\n\t};\n\n\tbootPromise = new Promise(bootExecutor as (resolve: PromiseResolve) => void);\n\treturn bootPromise;\n};\n\nconst secondaryBoot = async (): Promise<void> => {\n\tawait boot(); // make sure we're not in the middle of boot before re-running the skipped parts\n\tawait initF6Navigation();\n\tattachOpenUI5SupportListeners();\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\tif (!booted) {\n\t\treturn;\n\t}\n\n\tconst currentTheme = getTheme();\n\tconst currentBaseTheme = getBaseTheme();\n\n\tif (theme === currentTheme || theme === currentBaseTheme) {\n\t\tapplyTheme(currentTheme);\n\t}\n};\n\nexport {\n\tboot,\n\tsecondaryBoot,\n\tattachBoot,\n\tisBooted,\n};\n"]}
|
|
@@ -74,7 +74,7 @@ const displayFailedRegistrations = () => {
|
|
|
74
74
|
message = `${message}\nSince the above web components were defined by the same or newer version runtime, they should be compatible with your code.`;
|
|
75
75
|
}
|
|
76
76
|
});
|
|
77
|
-
message = `${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/
|
|
77
|
+
message = `${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/UI5/webcomponents/blob/main/docs/2-advanced/06-scoping.md.`;
|
|
78
78
|
console.warn(message); // eslint-disable-line
|
|
79
79
|
};
|
|
80
80
|
export { registerTag, isTagRegistered, hasRegisteredTags, getAllRegisteredTags, recordTagRegistrationFailure, };
|
|
@@ -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,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AI,CAAC,OAAO,CAAC,CAAC,CAAC,sBAAsB;AAC9C,CAAC,CAAC;AAEF,OAAO,EACN,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,4BAA4B,GAC5B,CAAC","sourcesContent":["import getSharedResource from \"./getSharedResource.js\";\nimport { getCurrentRuntimeIndex, compareRuntimes, getAllRuntimes } from \"./Runtimes.js\";\nimport type { 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 hasRegisteredTags = () => {\n\treturn Definitions.size > 0;\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/UI5/webcomponents/blob/main/docs/2-advanced/06-scoping.md.`;\n\n\tconsole.warn(message); // eslint-disable-line\n};\n\nexport {\n\tregisterTag,\n\tisTagRegistered,\n\thasRegisteredTags,\n\tgetAllRegisteredTags,\n\trecordTagRegistrationFailure,\n};\n"]}
|
|
@@ -18,7 +18,7 @@ declare const setCustomElementsScopingSuffix: (suffix: string) => void;
|
|
|
18
18
|
* @public
|
|
19
19
|
* @returns {String|undefined}
|
|
20
20
|
*/
|
|
21
|
-
declare const getCustomElementsScopingSuffix: () => string;
|
|
21
|
+
declare const getCustomElementsScopingSuffix: () => string | undefined;
|
|
22
22
|
/**
|
|
23
23
|
* Sets the rules, governing which custom element tags to scope and which not, f.e.
|
|
24
24
|
* setCustomElementsScopingRules({include: [/^ui5-/]}, exclude: [/^ui5-mylib-/, /^ui5-carousel$/]);
|
|
@@ -57,8 +57,15 @@ declare const getEffectiveScopingSuffixForTag: (tag: string) => string | undefin
|
|
|
57
57
|
/**
|
|
58
58
|
* @public
|
|
59
59
|
* Used for getting a scoped name for a CSS variable using the same transformation used in the build
|
|
60
|
-
* @name the name of the css variable as written in the code
|
|
60
|
+
* @param name the name of the css variable as written in the code
|
|
61
|
+
* @param withVersion whether to include the version in the scoped name
|
|
61
62
|
* @returns a variable name with the current version inserted as available at runtime
|
|
63
|
+
* @deprecated As of version 2.19.0 this method is no longer required. Variables can now be defined at the component level
|
|
64
|
+
* and are automatically encapsulated within each component’s Shadow DOM.
|
|
65
|
+
* As a result, runtime scoping logic is no longer necessary.
|
|
66
|
+
*
|
|
67
|
+
* It is still needed for third-party packages that have not yet migrated to the
|
|
68
|
+
* component-level variable approach.
|
|
62
69
|
*/
|
|
63
|
-
declare const getScopedVarName: (name: string) => string;
|
|
70
|
+
declare const getScopedVarName: (name: string, withVersion?: boolean) => string;
|
|
64
71
|
export { setCustomElementsScopingSuffix, getCustomElementsScopingSuffix, setCustomElementsScopingRules, getCustomElementsScopingRules, shouldScopeCustomElement, getEffectiveScopingSuffixForTag, getScopedVarName, };
|
|
@@ -21,7 +21,7 @@ const setCustomElementsScopingSuffix = (suffix) => {
|
|
|
21
21
|
}
|
|
22
22
|
if (hasRegisteredTags()) {
|
|
23
23
|
// eslint-disable-next-line no-console
|
|
24
|
-
console.warn("Setting the scoping suffix must be done before importing any components. For proper usage, read the scoping section: https://github.com/
|
|
24
|
+
console.warn("Setting the scoping suffix must be done before importing any components. For proper usage, read the scoping section: https://github.com/UI5/webcomponents/blob/main/docs/2-advanced/06-scoping.md.");
|
|
25
25
|
}
|
|
26
26
|
suf = suffix;
|
|
27
27
|
};
|
|
@@ -97,10 +97,20 @@ const getEffectiveScopingSuffixForTag = (tag) => {
|
|
|
97
97
|
/**
|
|
98
98
|
* @public
|
|
99
99
|
* Used for getting a scoped name for a CSS variable using the same transformation used in the build
|
|
100
|
-
* @name the name of the css variable as written in the code
|
|
100
|
+
* @param name the name of the css variable as written in the code
|
|
101
|
+
* @param withVersion whether to include the version in the scoped name
|
|
101
102
|
* @returns a variable name with the current version inserted as available at runtime
|
|
103
|
+
* @deprecated As of version 2.19.0 this method is no longer required. Variables can now be defined at the component level
|
|
104
|
+
* and are automatically encapsulated within each component’s Shadow DOM.
|
|
105
|
+
* As a result, runtime scoping logic is no longer necessary.
|
|
106
|
+
*
|
|
107
|
+
* It is still needed for third-party packages that have not yet migrated to the
|
|
108
|
+
* component-level variable approach.
|
|
102
109
|
*/
|
|
103
|
-
const getScopedVarName = (name) => {
|
|
110
|
+
const getScopedVarName = (name, withVersion = false) => {
|
|
111
|
+
if (!withVersion) {
|
|
112
|
+
return name;
|
|
113
|
+
}
|
|
104
114
|
const versionStr = `v${VersionInfo.version.replaceAll(".", "-")}`;
|
|
105
115
|
const expr = /(--_?ui5)([^,:)\s]+)/g;
|
|
106
116
|
return name.replaceAll(expr, `$1-${versionStr}$2`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomElementsScopeUtils.js","sourceRoot":"","sources":["../src/CustomElementsScopeUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,WAAW,MAAM,4BAA4B,CAAC;AAErD,IAAI,GAAW,CAAC;AAOhB,IAAI,QAAQ,GAAU;IACrB,OAAO,EAAE,CAAC,OAA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,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;IAC5B,CAAC;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,CAAC;QACnC,OAAO,8BAA8B,EAAE,CAAC;IACzC,CAAC;AACF,CAAC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAAE,cAAuB,KAAK,EAAE,EAAE;IACvE,IAAI,CAAC,WAAW,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,MAAM,UAAU,GAAG,IAAI,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;IAClE,MAAM,IAAI,GAAG,uBAAuB,CAAC;IACrC,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,UAAU,IAAI,CAAC,CAAC;AACpD,CAAC,CAAC;AAEF,OAAO,EACN,8BAA8B,EAC9B,8BAA8B,EAC9B,6BAA6B,EAC7B,6BAA6B,EAC7B,wBAAwB,EACxB,+BAA+B,EAC/B,gBAAgB,GAChB,CAAC","sourcesContent":["import { hasRegisteredTags } from \"./CustomElementsRegistry.js\";\nimport VersionInfo from \"./generated/VersionInfo.js\";\n\nlet 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 *\n * **Note:** By default all tags starting with \"ui5-\" will be scoped, unless you change this by calling \"setCustomElementsScopingRules\"\n * **Note:** Setting the scoping suffix must be done before importing any components.\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\tif (hasRegisteredTags()) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.warn(\"Setting the scoping suffix must be done before importing any components. For proper usage, read the scoping section: https://github.com/UI5/webcomponents/blob/main/docs/2-advanced/06-scoping.md.\");\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 = (): string | undefined => {\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\n/**\n * @public\n * Used for getting a scoped name for a CSS variable using the same transformation used in the build\n * @param name the name of the css variable as written in the code\n * @param withVersion whether to include the version in the scoped name\n * @returns a variable name with the current version inserted as available at runtime\n * @deprecated As of version 2.19.0 this method is no longer required. Variables can now be defined at the component level\n * and are automatically encapsulated within each component’s Shadow DOM.\n * As a result, runtime scoping logic is no longer necessary.\n *\n * It is still needed for third-party packages that have not yet migrated to the\n * component-level variable approach.\n */\nconst getScopedVarName = (name: string, withVersion: boolean = false) => {\n\tif (!withVersion) {\n\t\treturn name;\n\t}\n\n\tconst versionStr = `v${VersionInfo.version.replaceAll(\".\", \"-\")}`;\n\tconst expr = /(--_?ui5)([^,:)\\s]+)/g;\n\treturn name.replaceAll(expr, `$1-${versionStr}$2`);\n};\n\nexport {\n\tsetCustomElementsScopingSuffix,\n\tgetCustomElementsScopingSuffix,\n\tsetCustomElementsScopingRules,\n\tgetCustomElementsScopingRules,\n\tshouldScopeCustomElement,\n\tgetEffectiveScopingSuffixForTag,\n\tgetScopedVarName,\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DragAndDrop.js","sourceRoot":"","sources":["../src/DragAndDrop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAEvE,OAAO;AACN,wDAAwD;AACxD,iBAAiB,GACjB,CAAC","sourcesContent":["import { startMultipleDrag } from \"./util/dragAndDrop/DragRegistry.js\";\n\nexport {\n\t// eslint-disable-next-line import/prefer-default-export\n\tstartMultipleDrag,\n};\n"]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@font-face{font-family:"72";font-style:normal;font-weight:400;src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Regular.woff2) format("woff2"),local("72");unicode-range:U+00,U+0D,U+20-7E,U+A0-FF,U+131,U+152-153,U+161,U+178,U+17D-17E,U+192,U+237,U+2C6,U+2DC,U+3BC,U+1E9E,U+2013-2014,U+2018-201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2044,U+20AC,U+2122}
|
|
2
|
+
@font-face{font-family:"72full";font-style:normal;font-weight:400;src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Regular-full.woff2) format("woff2")}
|
|
3
|
+
@font-face{font-family:"72-Bold";src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Bold.woff2) format("woff2"),local("72-Bold");unicode-range:U+00,U+0D,U+20-7E,U+A0-FF,U+131,U+152-153,U+161,U+178,U+17D-17E,U+192,U+237,U+2C6,U+2DC,U+3BC,U+1E9E,U+2013-2014,U+2018-201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2044,U+20AC,U+2122}
|
|
4
|
+
@font-face{font-family:"72";font-style:normal;font-weight:700;src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Bold.woff2) format("woff2"),local("72-Bold");unicode-range:U+00,U+0D,U+20-7E,U+A0-FF,U+131,U+152-153,U+161,U+178,U+17D-17E,U+192,U+237,U+2C6,U+2DC,U+3BC,U+1E9E,U+2013-2014,U+2018-201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2044,U+20AC,U+2122}
|
|
5
|
+
@font-face{font-family:"72-Boldfull";src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Bold-full.woff2) format("woff2")}
|
|
6
|
+
@font-face{font-family:"72full";font-style:normal;font-weight:700;src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Bold-full.woff2) format("woff2")}
|
|
7
|
+
@font-face{font-family:"72-Semibold";src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Semibold.woff2) format("woff2"),local("72-Semibold");unicode-range:U+00,U+0D,U+20-7E,U+A0-FF,U+131,U+152-153,U+161,U+178,U+17D-17E,U+192,U+237,U+2C6,U+2DC,U+3BC,U+1E9E,U+2013-2014,U+2018-201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2044,U+20AC,U+2122}
|
|
8
|
+
@font-face{font-family:"72";font-style:normal;font-weight:600;src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Semibold.woff2) format("woff2"),local("72-Semibold");unicode-range:U+00,U+0D,U+20-7E,U+A0-FF,U+131,U+152-153,U+161,U+178,U+17D-17E,U+192,U+237,U+2C6,U+2DC,U+3BC,U+1E9E,U+2013-2014,U+2018-201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2044,U+20AC,U+2122}
|
|
9
|
+
@font-face{font-family:"72-Semiboldfull";src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Semibold-full.woff2) format("woff2")}
|
|
10
|
+
@font-face{font-family:"72full";font-style:normal;font-weight:600;src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Semibold-full.woff2) format("woff2")}
|
|
11
|
+
@font-face{font-family:"72-SemiboldDuplex";src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-SemiboldDuplex.woff2) format("woff2"),local("72-SemiboldDuplex");unicode-range:U+00,U+0D,U+20-7E,U+A0-FF,U+131,U+152-153,U+161,U+178,U+17D-17E,U+192,U+237,U+2C6,U+2DC,U+3BC,U+1E9E,U+2013-2014,U+2018-201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2044,U+20AC,U+2122}
|
|
12
|
+
@font-face{font-family:"72-SemiboldDuplexfull";src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-SemiboldDuplex-full.woff2) format("woff2")}
|
|
13
|
+
@font-face{font-family:"72-Light";src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Light.woff2) format("woff2"),local("72-Light");unicode-range:U+00,U+0D,U+20-7E,U+A0-FF,U+131,U+152-153,U+161,U+178,U+17D-17E,U+192,U+237,U+2C6,U+2DC,U+3BC,U+1E9E,U+2013-2014,U+2018-201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2044,U+20AC,U+2122}
|
|
14
|
+
@font-face{font-family:"72";font-style:normal;font-weight:300;src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Light.woff2) format("woff2"),local("72-Light");unicode-range:U+00,U+0D,U+20-7E,U+A0-FF,U+131,U+152-153,U+161,U+178,U+17D-17E,U+192,U+237,U+2C6,U+2DC,U+3BC,U+1E9E,U+2013-2014,U+2018-201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2044,U+20AC,U+2122}
|
|
15
|
+
@font-face{font-family:"72-Lightfull";src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Light-full.woff2) format("woff2")}
|
|
16
|
+
@font-face{font-family:"72full";font-style:normal;font-weight:300;src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Light-full.woff2) format("woff2")}
|
|
17
|
+
@font-face{font-family:"72Black";src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Black.woff2) format("woff2"),local("72Black");unicode-range:U+00,U+0D,U+20-7E,U+A0-FF,U+131,U+152-153,U+160-161,U+178,U+17D-17E,U+192,U+237,U+2C6-2C7,U+2DC,U+3BC,U+1E0E,U+2013-2014,U+2018-2019,U+201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2044,U+20AC,U+2122}
|
|
18
|
+
@font-face{font-family:"72";font-style:normal;font-weight:900;src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Black.woff2) format("woff2"),local("72Black");unicode-range:U+00,U+0D,U+20-7E,U+A0-FF,U+131,U+152-153,U+160-161,U+178,U+17D-17E,U+192,U+237,U+2C6-2C7,U+2DC,U+3BC,U+1E0E,U+2013-2014,U+2018-2019,U+201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2044,U+20AC,U+2122}
|
|
19
|
+
@font-face{font-family:"72Blackfull";src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Black-full.woff2) format("woff2")}
|
|
20
|
+
@font-face{font-family:"72full";font-style:normal;font-weight:900;src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Black-full.woff2) format("woff2")}
|
|
21
|
+
@font-face{font-family:"72-BoldItalic";src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-BoldItalic.woff2) format("woff2"),local("72-BoldItalic");unicode-range:U+00,U+0D,U+20-7E,U+A0-FF,U+131,U+152-153,U+161,U+178,U+17D-17E,U+192,U+237,U+2C6,U+2DC,U+3BC,U+1E9E,U+2013-2014,U+2018-201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2044,U+20AC,U+2122}
|
|
22
|
+
@font-face{font-family:"72";font-style:italic;font-weight:700;src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-BoldItalic.woff2) format("woff2"),local("72-BoldItalic");unicode-range:U+00,U+0D,U+20-7E,U+A0-FF,U+131,U+152-153,U+161,U+178,U+17D-17E,U+192,U+237,U+2C6,U+2DC,U+3BC,U+1E9E,U+2013-2014,U+2018-201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2044,U+20AC,U+2122}
|
|
23
|
+
@font-face{font-family:"72full";font-style:italic;font-weight:700;src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-BoldItalic-full.woff2) format("woff2")}
|
|
24
|
+
@font-face{font-family:"72-Condensed";src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Condensed.woff2) format("woff2"),local("72-Condensed");unicode-range:U+00,U+0D,U+20-7E,U+A0-FF,U+131,U+152-153,U+161,U+178,U+17D-17E,U+192,U+237,U+2C6,U+2DC,U+3BC,U+1E9E,U+2013-2014,U+2018-201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2044,U+20AC,U+2122}
|
|
25
|
+
@font-face{font-family:"72";font-style:normal;font-weight:400;font-stretch:condensed;src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Condensed.woff2) format("woff2"),local("72-Condensed");unicode-range:U+00,U+0D,U+20-7E,U+A0-FF,U+131,U+152-153,U+161,U+178,U+17D-17E,U+192,U+237,U+2C6,U+2DC,U+3BC,U+1E9E,U+2013-2014,U+2018-201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2044,U+20AC,U+2122}
|
|
26
|
+
@font-face{font-family:"72";font-style:normal;font-weight:400;font-stretch:condensed;src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Condensed-full.woff2) format("woff2");unicode-range:U+00,U+0D,U+20-7E,U+A0-FF,U+131,U+152-153,U+161,U+178,U+17D-17E,U+192,U+237,U+2C6,U+2DC,U+3BC,U+1E9E,U+2013-2014,U+2018-201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2044,U+20AC,U+2122}
|
|
27
|
+
@font-face{font-family:"72-CondensedBold";src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-CondensedBold.woff2) format("woff2"),local("72-CondensedBold");unicode-range:U+00,U+0D,U+20-7E,U+A0-FF,U+131,U+152-153,U+161,U+178,U+17D-17E,U+192,U+237,U+2C6,U+2DC,U+3BC,U+1E9E,U+2013-2014,U+2018-201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2044,U+20AC,U+2122}
|
|
28
|
+
@font-face{font-family:"72";font-style:normal;font-weight:700;font-stretch:condensed;src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-CondensedBold.woff2) format("woff2"),local("72-CondensedBold");unicode-range:U+00,U+0D,U+20-7E,U+A0-FF,U+131,U+152-153,U+161,U+178,U+17D-17E,U+192,U+237,U+2C6,U+2DC,U+3BC,U+1E9E,U+2013-2014,U+2018-201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2044,U+20AC,U+2122}
|
|
29
|
+
@font-face{font-family:"72full";font-style:normal;font-weight:700;font-stretch:condensed;src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-CondensedBold-full.woff2) format("woff2")}
|
|
30
|
+
@font-face{font-family:"72-Italic";src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Italic.woff2) format("woff2"),local("72-Italic");unicode-range:U+00,U+0D,U+20-7E,U+A0-FF,U+131,U+152-153,U+161,U+178,U+17D-17E,U+192,U+237,U+2C6,U+2DC,U+3BC,U+1E9E,U+2013-2014,U+2018-201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2044,U+20AC,U+2122}
|
|
31
|
+
@font-face{font-family:"72";font-style:italic;font-weight:400;src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Italic.woff2) format("woff2"),local("72-Italic");unicode-range:U+00,U+0D,U+20-7E,U+A0-FF,U+131,U+152-153,U+161,U+178,U+17D-17E,U+192,U+237,U+2C6,U+2DC,U+3BC,U+1E9E,U+2013-2014,U+2018-201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2044,U+20AC,U+2122}
|
|
32
|
+
@font-face{font-family:"72full";font-style:italic;font-weight:400;src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Italic-full.woff2) format("woff2")}
|
|
33
|
+
@font-face{font-family:"72Mono";src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72Mono-Regular.woff2) format("woff2"),local("72Mono");unicode-range:U+00,U+0D,U+20-7E,U+A0-FF,U+131,U+152-153,U+161,U+178,U+17D-17E,U+192,U+237,U+2C6,U+2DC,U+3BC,U+1E9E,U+2013-2014,U+2018-201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2044,U+20AC,U+2122}
|
|
34
|
+
@font-face{font-family:"72Monofull";src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72Mono-Regular-full.woff2) format("woff2")}
|
|
35
|
+
@font-face{font-family:"72Mono-Bold";src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72Mono-Bold.woff2) format("woff2"),local("72Mono-Bold");unicode-range:U+00,U+0D,U+20-7E,U+A0-FF,U+131,U+152-153,U+161,U+178,U+17D-17E,U+192,U+237,U+2C6,U+2DC,U+3BC,U+1E9E,U+2013-2014,U+2018-201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2044,U+20AC,U+2122}
|
|
36
|
+
@font-face{font-family:"72Mono-Boldfull";src:url(@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72Mono-Bold-full.woff2) format("woff2")}
|
package/dist/FontFace.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { hasStyle, createStyle } from "./ManagedStyles.js";
|
|
2
2
|
import { getFeature } from "./FeaturesRegistry.js";
|
|
3
3
|
import fontFaceCSS from "./generated/css/FontFace.css.js";
|
|
4
|
-
import overrideFontFaceCSS from "./generated/css/OverrideFontFace.css.js";
|
|
5
4
|
import { getDefaultFontLoading } from "./config/Fonts.js";
|
|
6
5
|
const insertFontFace = () => {
|
|
7
6
|
const openUI5Support = getFeature("OpenUI5Support");
|
|
@@ -9,8 +8,6 @@ const insertFontFace = () => {
|
|
|
9
8
|
if ((!openUI5Support || !openUI5Support.isOpenUI5Detected())) {
|
|
10
9
|
insertMainFontFace();
|
|
11
10
|
}
|
|
12
|
-
// Always set the override font - OpenUI5 in CSS Vars mode does not set it, unlike the main font
|
|
13
|
-
insertOverrideFontFace();
|
|
14
11
|
};
|
|
15
12
|
const insertMainFontFace = () => {
|
|
16
13
|
const hasFontStyles = document.querySelector("head>style[data-ui5-font-face]");
|
|
@@ -21,10 +18,5 @@ const insertMainFontFace = () => {
|
|
|
21
18
|
createStyle(fontFaceCSS, "data-ui5-font-face");
|
|
22
19
|
}
|
|
23
20
|
};
|
|
24
|
-
const insertOverrideFontFace = () => {
|
|
25
|
-
if (!hasStyle("data-ui5-font-face-override")) {
|
|
26
|
-
createStyle(overrideFontFaceCSS, "data-ui5-font-face-override");
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
21
|
export default insertFontFace;
|
|
30
22
|
//# sourceMappingURL=FontFace.js.map
|
package/dist/FontFace.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FontFace.js","sourceRoot":"","sources":["../src/FontFace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,WAAW,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"FontFace.js","sourceRoot":"","sources":["../src/FontFace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,WAAW,MAAM,iCAAiC,CAAC;AAE1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,MAAM,cAAc,GAAG,GAAG,EAAE;IAC3B,MAAM,cAAc,GAAG,UAAU,CAAwB,gBAAgB,CAAC,CAAC;IAE3E,gGAAgG;IAChG,IAAI,CAAC,CAAC,cAAc,IAAI,CAAC,cAAc,CAAC,iBAAiB,EAAE,CAAC,EAAE,CAAC;QAC9D,kBAAkB,EAAE,CAAC;IACtB,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC/B,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC,gCAAgC,CAAC,CAAC;IAE/E,IAAI,CAAC,qBAAqB,EAAE,IAAI,aAAa,EAAE,CAAC;QAC/C,OAAO;IACR,CAAC;IAED,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,CAAC;QACrC,WAAW,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAC;IAChD,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { hasStyle, createStyle } from \"./ManagedStyles.js\";\nimport { getFeature } from \"./FeaturesRegistry.js\";\nimport fontFaceCSS from \"./generated/css/FontFace.css.js\";\nimport type OpenUI5Support from \"./features/OpenUI5Support.js\";\nimport { getDefaultFontLoading } from \"./config/Fonts.js\";\n\nconst insertFontFace = () => {\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\n\t// Only set the main font if there is no OpenUI5 support, or there is, but OpenUI5 is not loaded\n\tif ((!openUI5Support || !openUI5Support.isOpenUI5Detected())) {\n\t\tinsertMainFontFace();\n\t}\n};\n\nconst insertMainFontFace = () => {\n\tconst hasFontStyles = document.querySelector(\"head>style[data-ui5-font-face]\");\n\n\tif (!getDefaultFontLoading() || hasFontStyles) {\n\t\treturn;\n\t}\n\n\tif (!hasStyle(\"data-ui5-font-face\")) {\n\t\tcreateStyle(fontFaceCSS, \"data-ui5-font-face\");\n\t}\n};\n\nexport default insertFontFace;\n"]}
|
|
@@ -32,6 +32,13 @@ const getTheme = () => {
|
|
|
32
32
|
};
|
|
33
33
|
const getThemeRoot = () => {
|
|
34
34
|
initConfiguration();
|
|
35
|
+
if (initialConfig.themeRoot === undefined) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (!validateThemeRoot(initialConfig.themeRoot)) {
|
|
39
|
+
console.warn(`The ${initialConfig.themeRoot} is not valid. Check the allowed origins as suggested in the "setThemeRoot" description.`); // eslint-disable-line
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
35
42
|
return initialConfig.themeRoot;
|
|
36
43
|
};
|
|
37
44
|
const getLanguage = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InitialConfiguration.js","sourceRoot":"","sources":["../src/InitialConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AAGvD,OAAO,aAAa,MAAM,0BAA0B,CAAC;AAErD,OAAO,EAAE,kBAAkB,IAAI,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAC5F,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD,IAAI,WAAW,GAAG,KAAK,CAAC;AAkBxB,IAAI,aAAa,GAAkB;IAClC,aAAa,EAAE,aAAa,CAAC,IA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KAAK,WAAW,IAAI,WAAW,EAAE,CAAC;QACpD,OAAO;IACR,CAAC;IAED,kBAAkB,EAAE,CAAC;IAErB,WAAW,GAAG,IAAI,CAAC;AACpB,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,kBAAkB,GAAG,CAAC,OAAiB,EAAE,EAAE;IAChD,IAAI,OAAO,EAAE,CAAC;QACb,oBAAoB,EAAE,CAAC;IACxB,CAAC;IACD,4CAA4C;IAC5C,wBAAwB,EAAE,CAAC;IAE3B,8DAA8D;IAC9D,kBAAkB,EAAE,CAAC;IAErB,yDAAyD;IACzD,yBAAyB,EAAE,CAAC;AAC7B,CAAC,CAAC;AAEF,OAAO,EACN,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,uBAAuB,EACvB,aAAa,EACb,eAAe,EACf,wBAAwB,EACxB,WAAW,EACX,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,wBAAwB,GACxB,CAAC","sourcesContent":["import merge from \"./thirdparty/merge.js\";\nimport { getFeature } from \"./FeaturesRegistry.js\";\nimport { DEFAULT_THEME } from \"./generated/AssetParameters.js\";\nimport validateThemeRoot from \"./validateThemeRoot.js\";\nimport type OpenUI5Support from \"./features/OpenUI5Support.js\";\nimport type { FormatSettings } from \"./config/FormatSettings.js\";\nimport AnimationMode from \"./types/AnimationMode.js\";\nimport type CalendarType from \"./types/CalendarType.js\";\nimport { resetConfiguration as resetConfigurationFn } from \"./config/ConfigurationReset.js\";\nimport { getLocationSearch } from \"./Location.js\";\n\nlet initialized = false;\n\ntype InitialConfig = {\n\t[key: string]: any,\n\tanimationMode: AnimationMode,\n\ttheme: string,\n\tthemeRoot: string | undefined,\n\tlanguage: string | undefined,\n\tcalendarType: CalendarType | undefined,\n\tsecondaryCalendarType: CalendarType | undefined,\n\ttimezone: string | undefined,\n\tnoConflict: boolean,\n\tformatSettings: FormatSettings,\n\tfetchDefaultLanguage: boolean,\n\tdefaultFontLoading: boolean,\n\tenableDefaultTooltips: boolean,\n};\n\nlet initialConfig: InitialConfig = {\n\tanimationMode: AnimationMode.Full,\n\ttheme: DEFAULT_THEME,\n\tthemeRoot: undefined,\n\trtl: undefined,\n\tlanguage: undefined,\n\ttimezone: undefined,\n\tcalendarType: undefined,\n\tsecondaryCalendarType: undefined,\n\tnoConflict: false, // no URL\n\tformatSettings: {},\n\tfetchDefaultLanguage: false,\n\tdefaultFontLoading: true,\n\tenableDefaultTooltips: true,\n};\n\n/* General settings */\nconst getAnimationMode = () => {\n\tinitConfiguration();\n\treturn initialConfig.animationMode;\n};\n\nconst getTheme = () => {\n\tinitConfiguration();\n\treturn initialConfig.theme;\n};\n\nconst getThemeRoot = () => {\n\tinitConfiguration();\n\treturn initialConfig.themeRoot;\n};\n\nconst getLanguage = () => {\n\tinitConfiguration();\n\treturn initialConfig.language;\n};\n\n/**\n * Returns if the default language, that is inlined at build time,\n * should be fetched over the network instead.\n * @returns {Boolean}\n */\nconst getFetchDefaultLanguage = () => {\n\tinitConfiguration();\n\treturn initialConfig.fetchDefaultLanguage;\n};\n\nconst getNoConflict = () => {\n\tinitConfiguration();\n\treturn initialConfig.noConflict;\n};\n\nconst getDefaultFontLoading = () => {\n\tinitConfiguration();\n\treturn initialConfig.defaultFontLoading;\n};\n\nconst getEnableDefaultTooltips = () => {\n\tinitConfiguration();\n\treturn initialConfig.enableDefaultTooltips;\n};\n\n/**\n * Get the configured calendar type\n * @returns { String } the name of the configured calendar type\n */\nconst getCalendarType = () => {\n\tinitConfiguration();\n\treturn initialConfig.calendarType;\n};\n\nconst getSecondaryCalendarType = () => {\n\tinitConfiguration();\n\treturn initialConfig.secondaryCalendarType;\n};\n\n/**\n * Returns the configured IANA timezone ID.\n * @returns { String } the configured IANA timezone ID, e.g. \"America/New_York\"\n */\nconst getTimezone = () => {\n\tinitConfiguration();\n\treturn initialConfig.timezone;\n};\n\nconst getFormatSettings = () => {\n\tinitConfiguration();\n\treturn initialConfig.formatSettings;\n};\n\nconst booleanMapping = new Map();\nbooleanMapping.set(\"true\", true);\nbooleanMapping.set(\"false\", false);\n\nconst parseConfigurationScript = () => {\n\tconst configScript = document.querySelector(\"[data-ui5-config]\") || document.querySelector(\"[data-id='sap-ui-config']\"); // for backward compatibility\n\n\tlet configJSON;\n\n\tif (configScript) {\n\t\ttry {\n\t\t\tconfigJSON = JSON.parse(configScript.innerHTML);\n\t\t} catch (err) {\n\t\t\tconsole.warn(\"Incorrect data-sap-ui-config format. Please use JSON\"); /* eslint-disable-line */\n\t\t}\n\n\t\tif (configJSON) {\n\t\t\tinitialConfig = merge(initialConfig, configJSON);\n\t\t}\n\t}\n};\n\nconst parseURLParameters = () => {\n\tconst params = new URLSearchParams(getLocationSearch());\n\n\t// Process \"sap-*\" params first\n\tparams.forEach((value, key) => {\n\t\tconst parts = key.split(\"sap-\").length;\n\t\tif (parts === 0 || parts === key.split(\"sap-ui-\").length) {\n\t\t\treturn;\n\t\t}\n\n\t\tapplyURLParam(key, value, \"sap\");\n\t});\n\n\t// Process \"sap-ui-*\" params\n\tparams.forEach((value, key) => {\n\t\tif (!key.startsWith(\"sap-ui\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tapplyURLParam(key, value, \"sap-ui\");\n\t});\n};\n\nconst normalizeThemeRootParamValue = (value: string) => {\n\tconst themeRoot = value.split(\"@\")[1];\n\n\treturn validateThemeRoot(themeRoot);\n};\n\nconst normalizeThemeParamValue = (param: string, value: string) => {\n\tif (param === \"theme\" && value.includes(\"@\")) { // the theme parameter might have @<URL-TO-THEME> in the value - strip this\n\t\treturn value.split(\"@\")[0];\n\t}\n\n\treturn value;\n};\n\nconst applyURLParam = (key: string, value: string, paramType: string) => {\n\tconst lowerCaseValue = value.toLowerCase();\n\tconst param = key.split(`${paramType}-`)[1];\n\n\tif (booleanMapping.has(value)) {\n\t\tvalue = booleanMapping.get(lowerCaseValue);\n\t}\n\n\tif (param === \"theme\") {\n\t\tinitialConfig.theme = normalizeThemeParamValue(param, value);\n\n\t\tif (value && value.includes(\"@\")) {\n\t\t\tinitialConfig.themeRoot = normalizeThemeRootParamValue(value);\n\t\t}\n\t} else {\n\t\tinitialConfig[param] = value;\n\t}\n};\n\nconst applyOpenUI5Configuration = () => {\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\tif (!openUI5Support || !openUI5Support.isOpenUI5Detected()) {\n\t\treturn;\n\t}\n\n\tconst OpenUI5Config = openUI5Support.getConfigurationSettingsObject();\n\tinitialConfig = merge(initialConfig, OpenUI5Config);\n};\n\nconst initConfiguration = () => {\n\tif (typeof document === \"undefined\" || initialized) {\n\t\treturn;\n\t}\n\n\tresetConfiguration();\n\n\tinitialized = true;\n};\n\n/**\n * Internaly exposed method to enable configurations in tests.\n * @private\n */\nconst resetConfiguration = (testEnv?: boolean) => {\n\tif (testEnv) {\n\t\tresetConfigurationFn();\n\t}\n\t// 1. Lowest priority - configuration script\n\tparseConfigurationScript();\n\n\t// 2. URL parameters overwrite configuration script parameters\n\tparseURLParameters();\n\n\t// 3. If OpenUI5 is detected, it has the highest priority\n\tapplyOpenUI5Configuration();\n};\n\nexport {\n\tgetAnimationMode,\n\tgetTheme,\n\tgetThemeRoot,\n\tgetLanguage,\n\tgetFetchDefaultLanguage,\n\tgetNoConflict,\n\tgetCalendarType,\n\tgetSecondaryCalendarType,\n\tgetTimezone,\n\tgetFormatSettings,\n\tgetDefaultFontLoading,\n\tresetConfiguration,\n\tgetEnableDefaultTooltips,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"InitialConfiguration.js","sourceRoot":"","sources":["../src/InitialConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AAGvD,OAAO,aAAa,MAAM,0BAA0B,CAAC;AAErD,OA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AAa,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;IAC9B,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,yBAAyB,GAAG,GAAG,EAAE;IACtC,MAAM,cAAc,GAAG,UAAU,CAAwB,gBAAgB,CAAC,CAAC;IAC3E,IAAI,CAAC,cAAc,IAAI,CAAC,cAAc,CAAC,iBAAiB,EAAE,EAAE,CAAC;QAC5D,OAAO;IACR,CAAC;IAED,MAAM,aAAa,GAAG,cAAc,CAAC,8BAA8B,EAAE,CAAC;IACtE,aAAa,GAAG,KAAK,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;AACrD,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,GAAG,EAAE;IAC9B,IAAI,OAAO,QAAQ,KAAK,WAAW,IAAI,WAAW,EAAE,CAAC;QACpD,OAAO;IACR,CAAC;IAED,kBAAkB,EAAE,CAAC;IAErB,WAAW,GAAG,IAAI,CAAC;AACpB,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,kBAAkB,GAAG,CAAC,OAAiB,EAAE,EAAE;IAChD,IAAI,OAAO,EAAE,CAAC;QACb,oBAAoB,EAAE,CAAC;IACxB,CAAC;IACD,4CAA4C;IAC5C,wBAAwB,EAAE,CAAC;IAE3B,8DAA8D;IAC9D,kBAAkB,EAAE,CAAC;IAErB,yDAAyD;IACzD,yBAAyB,EAAE,CAAC;AAC7B,CAAC,CAAC;AAEF,OAAO,EACN,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,uBAAuB,EACvB,aAAa,EACb,eAAe,EACf,wBAAwB,EACxB,WAAW,EACX,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,wBAAwB,GACxB,CAAC","sourcesContent":["import merge from \"./thirdparty/merge.js\";\nimport { getFeature } from \"./FeaturesRegistry.js\";\nimport { DEFAULT_THEME } from \"./generated/AssetParameters.js\";\nimport validateThemeRoot from \"./validateThemeRoot.js\";\nimport type OpenUI5Support from \"./features/OpenUI5Support.js\";\nimport type { FormatSettings } from \"./config/FormatSettings.js\";\nimport AnimationMode from \"./types/AnimationMode.js\";\nimport type CalendarType from \"./types/CalendarType.js\";\nimport { resetConfiguration as resetConfigurationFn } from \"./config/ConfigurationReset.js\";\nimport { getLocationSearch } from \"./Location.js\";\n\nlet initialized = false;\n\ntype InitialConfig = {\n\t[key: string]: any,\n\tanimationMode: AnimationMode,\n\ttheme: string,\n\tthemeRoot: string | undefined,\n\tlanguage: string | undefined,\n\tcalendarType: CalendarType | undefined,\n\tsecondaryCalendarType: CalendarType | undefined,\n\ttimezone: string | undefined,\n\tnoConflict: boolean,\n\tformatSettings: FormatSettings,\n\tfetchDefaultLanguage: boolean,\n\tdefaultFontLoading: boolean,\n\tenableDefaultTooltips: boolean,\n};\n\nlet initialConfig: InitialConfig = {\n\tanimationMode: AnimationMode.Full,\n\ttheme: DEFAULT_THEME,\n\tthemeRoot: undefined,\n\trtl: undefined,\n\tlanguage: undefined,\n\ttimezone: undefined,\n\tcalendarType: undefined,\n\tsecondaryCalendarType: undefined,\n\tnoConflict: false, // no URL\n\tformatSettings: {},\n\tfetchDefaultLanguage: false,\n\tdefaultFontLoading: true,\n\tenableDefaultTooltips: true,\n};\n\n/* General settings */\nconst getAnimationMode = () => {\n\tinitConfiguration();\n\treturn initialConfig.animationMode;\n};\n\nconst getTheme = () => {\n\tinitConfiguration();\n\treturn initialConfig.theme;\n};\n\nconst getThemeRoot = () => {\n\tinitConfiguration();\n\n\tif (initialConfig.themeRoot === undefined) {\n\t\treturn;\n\t}\n\n\tif (!validateThemeRoot(initialConfig.themeRoot)) {\n\t\tconsole.warn(`The ${initialConfig.themeRoot} is not valid. Check the allowed origins as suggested in the \"setThemeRoot\" description.`); // eslint-disable-line\n\t\treturn;\n\t}\n\n\treturn initialConfig.themeRoot;\n};\n\nconst getLanguage = () => {\n\tinitConfiguration();\n\treturn initialConfig.language;\n};\n\n/**\n * Returns if the default language, that is inlined at build time,\n * should be fetched over the network instead.\n * @returns {Boolean}\n */\nconst getFetchDefaultLanguage = () => {\n\tinitConfiguration();\n\treturn initialConfig.fetchDefaultLanguage;\n};\n\nconst getNoConflict = () => {\n\tinitConfiguration();\n\treturn initialConfig.noConflict;\n};\n\nconst getDefaultFontLoading = () => {\n\tinitConfiguration();\n\treturn initialConfig.defaultFontLoading;\n};\n\nconst getEnableDefaultTooltips = () => {\n\tinitConfiguration();\n\treturn initialConfig.enableDefaultTooltips;\n};\n\n/**\n * Get the configured calendar type\n * @returns { String } the name of the configured calendar type\n */\nconst getCalendarType = () => {\n\tinitConfiguration();\n\treturn initialConfig.calendarType;\n};\n\nconst getSecondaryCalendarType = () => {\n\tinitConfiguration();\n\treturn initialConfig.secondaryCalendarType;\n};\n\n/**\n * Returns the configured IANA timezone ID.\n * @returns { String } the configured IANA timezone ID, e.g. \"America/New_York\"\n */\nconst getTimezone = () => {\n\tinitConfiguration();\n\treturn initialConfig.timezone;\n};\n\nconst getFormatSettings = () => {\n\tinitConfiguration();\n\treturn initialConfig.formatSettings;\n};\n\nconst booleanMapping = new Map();\nbooleanMapping.set(\"true\", true);\nbooleanMapping.set(\"false\", false);\n\nconst parseConfigurationScript = () => {\n\tconst configScript = document.querySelector(\"[data-ui5-config]\") || document.querySelector(\"[data-id='sap-ui-config']\"); // for backward compatibility\n\n\tlet configJSON;\n\n\tif (configScript) {\n\t\ttry {\n\t\t\tconfigJSON = JSON.parse(configScript.innerHTML);\n\t\t} catch (err) {\n\t\t\tconsole.warn(\"Incorrect data-sap-ui-config format. Please use JSON\"); /* eslint-disable-line */\n\t\t}\n\n\t\tif (configJSON) {\n\t\t\tinitialConfig = merge(initialConfig, configJSON);\n\t\t}\n\t}\n};\n\nconst parseURLParameters = () => {\n\tconst params = new URLSearchParams(getLocationSearch());\n\n\t// Process \"sap-*\" params first\n\tparams.forEach((value, key) => {\n\t\tconst parts = key.split(\"sap-\").length;\n\t\tif (parts === 0 || parts === key.split(\"sap-ui-\").length) {\n\t\t\treturn;\n\t\t}\n\n\t\tapplyURLParam(key, value, \"sap\");\n\t});\n\n\t// Process \"sap-ui-*\" params\n\tparams.forEach((value, key) => {\n\t\tif (!key.startsWith(\"sap-ui\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tapplyURLParam(key, value, \"sap-ui\");\n\t});\n};\n\nconst normalizeThemeRootParamValue = (value: string) => {\n\tconst themeRoot = value.split(\"@\")[1];\n\n\treturn validateThemeRoot(themeRoot);\n};\n\nconst normalizeThemeParamValue = (param: string, value: string) => {\n\tif (param === \"theme\" && value.includes(\"@\")) { // the theme parameter might have @<URL-TO-THEME> in the value - strip this\n\t\treturn value.split(\"@\")[0];\n\t}\n\n\treturn value;\n};\n\nconst applyURLParam = (key: string, value: string, paramType: string) => {\n\tconst lowerCaseValue = value.toLowerCase();\n\tconst param = key.split(`${paramType}-`)[1];\n\n\tif (booleanMapping.has(value)) {\n\t\tvalue = booleanMapping.get(lowerCaseValue);\n\t}\n\n\tif (param === \"theme\") {\n\t\tinitialConfig.theme = normalizeThemeParamValue(param, value);\n\n\t\tif (value && value.includes(\"@\")) {\n\t\t\tinitialConfig.themeRoot = normalizeThemeRootParamValue(value);\n\t\t}\n\t} else {\n\t\tinitialConfig[param] = value;\n\t}\n};\n\nconst applyOpenUI5Configuration = () => {\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\tif (!openUI5Support || !openUI5Support.isOpenUI5Detected()) {\n\t\treturn;\n\t}\n\n\tconst OpenUI5Config = openUI5Support.getConfigurationSettingsObject();\n\tinitialConfig = merge(initialConfig, OpenUI5Config);\n};\n\nconst initConfiguration = () => {\n\tif (typeof document === \"undefined\" || initialized) {\n\t\treturn;\n\t}\n\n\tresetConfiguration();\n\n\tinitialized = true;\n};\n\n/**\n * Internaly exposed method to enable configurations in tests.\n * @private\n */\nconst resetConfiguration = (testEnv?: boolean) => {\n\tif (testEnv) {\n\t\tresetConfigurationFn();\n\t}\n\t// 1. Lowest priority - configuration script\n\tparseConfigurationScript();\n\n\t// 2. URL parameters overwrite configuration script parameters\n\tparseURLParameters();\n\n\t// 3. If OpenUI5 is detected, it has the highest priority\n\tapplyOpenUI5Configuration();\n};\n\nexport {\n\tgetAnimationMode,\n\tgetTheme,\n\tgetThemeRoot,\n\tgetLanguage,\n\tgetFetchDefaultLanguage,\n\tgetNoConflict,\n\tgetCalendarType,\n\tgetSecondaryCalendarType,\n\tgetTimezone,\n\tgetFormatSettings,\n\tgetDefaultFontLoading,\n\tresetConfiguration,\n\tgetEnableDefaultTooltips,\n};\n"]}
|
package/dist/Keys.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
declare const isEnter: (event: KeyboardEvent) => boolean;
|
|
2
|
+
declare const isEnterCtrl: (event: KeyboardEvent) => boolean;
|
|
3
|
+
declare const isEnterAlt: (event: KeyboardEvent) => boolean;
|
|
2
4
|
declare const isEnterShift: (event: KeyboardEvent) => boolean;
|
|
3
5
|
declare const isCtrl: (event: KeyboardEvent) => boolean;
|
|
4
6
|
declare const isSpace: (event: KeyboardEvent) => boolean;
|
|
@@ -54,6 +56,7 @@ declare const isF10Shift: (event: KeyboardEvent) => boolean;
|
|
|
54
56
|
declare const isF6Next: (event: KeyboardEvent) => boolean;
|
|
55
57
|
declare const isF6Previous: (event: KeyboardEvent) => boolean;
|
|
56
58
|
declare const isF7: (event: KeyboardEvent) => boolean;
|
|
59
|
+
declare const isCtrlAltF8: (event: KeyboardEvent) => boolean;
|
|
57
60
|
declare const isShift: (event: KeyboardEvent) => boolean;
|
|
58
61
|
declare const isCtrlA: (event: KeyboardEvent) => boolean;
|
|
59
62
|
declare const isCtrlV: (event: KeyboardEvent) => boolean;
|
|
@@ -61,4 +64,4 @@ declare const isKeyA: (event: KeyboardEvent) => boolean;
|
|
|
61
64
|
declare const isKeyP: (event: KeyboardEvent) => boolean;
|
|
62
65
|
declare const isNumber: (event: KeyboardEvent) => boolean;
|
|
63
66
|
declare const isColon: (event: KeyboardEvent) => boolean;
|
|
64
|
-
export { isEnter, isEnterShift, isCtrl, isSpace, isSpaceShift, isSpaceCtrl, isLeft, isRight, isUp, isDown, isLeftCtrl, isRightCtrl, isUpCtrl, isDownCtrl, isUpShift, isDownShift, isUpAlt, isDownAlt, isLeftShift, isRightShift, isLeftShiftCtrl, isRightShiftCtrl, isUpShiftCtrl, isDownShiftCtrl, isHome, isEnd, isPlus, isMinus, isHomeCtrl, isEndCtrl, isHomeShift, isEndShift, isEscape, isTabNext, isTabPrevious, isBackSpace, isDelete, isShow, isF2, isF4, isF4Shift, isF10Shift, isF6Previous, isF6Next, isF7, isPageUp, isPageDown, isPageUpShift, isPageUpAlt, isPageDownShift, isPageDownAlt, isPageUpShiftCtrl, isPageDownShiftCtrl, isShift, isCtrlA, isCtrlV, isKeyA, isKeyP, isDeleteShift, isInsertShift, isInsertCtrl, isNumber, isColon, };
|
|
67
|
+
export { isEnter, isEnterCtrl, isEnterAlt, isEnterShift, isCtrl, isSpace, isSpaceShift, isSpaceCtrl, isLeft, isRight, isUp, isDown, isLeftCtrl, isRightCtrl, isUpCtrl, isDownCtrl, isUpShift, isDownShift, isUpAlt, isDownAlt, isLeftShift, isRightShift, isLeftShiftCtrl, isRightShiftCtrl, isUpShiftCtrl, isDownShiftCtrl, isHome, isEnd, isPlus, isMinus, isHomeCtrl, isEndCtrl, isHomeShift, isEndShift, isEscape, isTabNext, isTabPrevious, isBackSpace, isDelete, isShow, isF2, isF4, isF4Shift, isF10Shift, isF6Previous, isF6Next, isF7, isPageUp, isPageDown, isPageUpShift, isPageUpAlt, isPageDownShift, isPageDownAlt, isPageUpShiftCtrl, isPageDownShiftCtrl, isShift, isCtrlA, isCtrlV, isKeyA, isKeyP, isDeleteShift, isInsertShift, isInsertCtrl, isNumber, isColon, isCtrlAltF8, };
|
package/dist/Keys.js
CHANGED
|
@@ -103,6 +103,8 @@ const KeyCodes = {
|
|
|
103
103
|
BACKSLASH: 226,
|
|
104
104
|
};
|
|
105
105
|
const isEnter = (event) => (event.key ? event.key === "Enter" : event.keyCode === KeyCodes.ENTER) && !hasModifierKeys(event);
|
|
106
|
+
const isEnterCtrl = (event) => (event.key ? event.key === "Enter" : event.keyCode === KeyCodes.ENTER) && checkModifierKeys(event, true, false, false);
|
|
107
|
+
const isEnterAlt = (event) => (event.key ? event.key === "Enter" : event.keyCode === KeyCodes.ENTER) && checkModifierKeys(event, false, true, false);
|
|
106
108
|
const isEnterShift = (event) => (event.key ? event.key === "Enter" : event.keyCode === KeyCodes.ENTER) && checkModifierKeys(event, false, false, true);
|
|
107
109
|
const isCtrl = (event) => checkModifierKeys(event, true, false, false);
|
|
108
110
|
const isSpace = (event) => (event.key ? (event.key === "Spacebar" || event.key === " ") : event.keyCode === KeyCodes.SPACE) && !hasModifierKeys(event);
|
|
@@ -169,6 +171,7 @@ const isF6Next = (event) => ((event.key ? event.key === "F6" : event.keyCode ===
|
|
|
169
171
|
const isF6Previous = (event) => ((event.key ? event.key === "F6" : event.keyCode === KeyCodes.F6) && checkModifierKeys(event, false, false, true))
|
|
170
172
|
|| ((event.key ? (event.key === "ArrowUp" || event.key === "Up") : event.keyCode === KeyCodes.ARROW_UP) && checkModifierKeys(event, true, true, false));
|
|
171
173
|
const isF7 = (event) => (event.key ? event.key === "F7" : event.keyCode === KeyCodes.F7) && !hasModifierKeys(event);
|
|
174
|
+
const isCtrlAltF8 = (event) => (event.key ? event.key === "F8" : event.keyCode === KeyCodes.F8) && checkModifierKeys(event, true, true, false);
|
|
172
175
|
const isShowByArrows = (event) => {
|
|
173
176
|
return ((event.key === "ArrowDown" || event.key === "Down") || (event.key === "ArrowUp" || event.key === "Up")) && checkModifierKeys(event, /* Ctrl */ false, /* Alt */ true, /* Shift */ false);
|
|
174
177
|
};
|
|
@@ -182,5 +185,5 @@ const getCtrlKey = (event) => !!(event.metaKey || event.ctrlKey); // double nega
|
|
|
182
185
|
const checkModifierKeys = (event, bCtrlKey, bAltKey, bShiftKey) => event.shiftKey === bShiftKey && event.altKey === bAltKey && getCtrlKey(event) === bCtrlKey;
|
|
183
186
|
const isNumber = (event) => ((event.key ? "0123456789".indexOf(event.key) !== -1 : event.keyCode >= KeyCodes.DIGIT_0 && event.keyCode <= KeyCodes.DIGIT_9) && checkModifierKeys(event, false, false, false));
|
|
184
187
|
const isColon = (event) => ((event.key ? event.key === ":" : event.keyCode === KeyCodes.COLON) && checkModifierKeys(event, false, false, true));
|
|
185
|
-
export { isEnter, isEnterShift, isCtrl, isSpace, isSpaceShift, isSpaceCtrl, isLeft, isRight, isUp, isDown, isLeftCtrl, isRightCtrl, isUpCtrl, isDownCtrl, isUpShift, isDownShift, isUpAlt, isDownAlt, isLeftShift, isRightShift, isLeftShiftCtrl, isRightShiftCtrl, isUpShiftCtrl, isDownShiftCtrl, isHome, isEnd, isPlus, isMinus, isHomeCtrl, isEndCtrl, isHomeShift, isEndShift, isEscape, isTabNext, isTabPrevious, isBackSpace, isDelete, isShow, isF2, isF4, isF4Shift, isF10Shift, isF6Previous, isF6Next, isF7, isPageUp, isPageDown, isPageUpShift, isPageUpAlt, isPageDownShift, isPageDownAlt, isPageUpShiftCtrl, isPageDownShiftCtrl, isShift, isCtrlA, isCtrlV, isKeyA, isKeyP, isDeleteShift, isInsertShift, isInsertCtrl, isNumber, isColon, };
|
|
188
|
+
export { isEnter, isEnterCtrl, isEnterAlt, isEnterShift, isCtrl, isSpace, isSpaceShift, isSpaceCtrl, isLeft, isRight, isUp, isDown, isLeftCtrl, isRightCtrl, isUpCtrl, isDownCtrl, isUpShift, isDownShift, isUpAlt, isDownAlt, isLeftShift, isRightShift, isLeftShiftCtrl, isRightShiftCtrl, isUpShiftCtrl, isDownShiftCtrl, isHome, isEnd, isPlus, isMinus, isHomeCtrl, isEndCtrl, isHomeShift, isEndShift, isEscape, isTabNext, isTabPrevious, isBackSpace, isDelete, isShow, isF2, isF4, isF4Shift, isF10Shift, isF6Previous, isF6Next, isF7, isPageUp, isPageDown, isPageUpShift, isPageUpAlt, isPageDownShift, isPageDownAlt, isPageUpShiftCtrl, isPageDownShiftCtrl, isShift, isCtrlA, isCtrlV, isKeyA, isKeyP, isDeleteShift, isInsertShift, isInsertCtrl, isNumber, isColon, isCtrlAltF8, };
|
|
186
189
|
//# sourceMappingURL=Keys.js.map
|