@ui5/webcomponents-base 0.0.0-07d38e78e → 0.0.0-093de5dd1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1187 -0
- package/LICENSE.txt +201 -0
- package/README.md +7 -10
- package/cypress.config.js +3 -0
- package/dist/.tsbuildinfobuild +1 -0
- 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.js +5 -1
- package/dist/Boot.js.map +1 -1
- package/dist/CustomElementsRegistry.d.ts +2 -1
- package/dist/CustomElementsRegistry.js +5 -2
- package/dist/CustomElementsRegistry.js.map +1 -1
- package/dist/CustomElementsScopeUtils.d.ts +4 -2
- package/dist/CustomElementsScopeUtils.js +8 -1
- package/dist/CustomElementsScopeUtils.js.map +1 -1
- package/dist/DOMObserver.js.map +1 -1
- package/dist/Device.d.ts +16 -1
- package/dist/Device.js +6 -3
- package/dist/Device.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/EventProvider.js.map +1 -1
- package/dist/FontFace.js +6 -9
- package/dist/FontFace.js.map +1 -1
- package/dist/IgnoreCustomElements.js.map +1 -1
- package/dist/InitialConfiguration.d.ts +9 -2
- package/dist/InitialConfiguration.js +33 -4
- package/dist/InitialConfiguration.js.map +1 -1
- package/dist/Keys.d.ts +5 -1
- package/dist/Keys.js +5 -1
- package/dist/Keys.js.map +1 -1
- package/dist/Location.d.ts +11 -0
- package/dist/Location.js +49 -0
- package/dist/Location.js.map +1 -0
- package/dist/ManagedStyles.d.ts +4 -6
- package/dist/ManagedStyles.js +6 -16
- package/dist/ManagedStyles.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 +11 -0
- package/dist/Runtimes.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.map +1 -1
- package/dist/UI5Element.d.ts +94 -36
- package/dist/UI5Element.js +272 -160
- package/dist/UI5Element.js.map +1 -1
- package/dist/UI5ElementMetadata.d.ts +25 -16
- package/dist/UI5ElementMetadata.js +15 -71
- 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/slideUp.js.map +1 -1
- package/dist/asset-registries/Icons.d.ts +43 -9
- 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 +3 -6
- package/dist/asset-registries/Themes.js +1 -2
- package/dist/asset-registries/Themes.js.map +1 -1
- package/dist/asset-registries/i18n.js.map +1 -1
- package/dist/asset-registries/util/IconCollectionsAlias.js.map +1 -1
- package/dist/asset-registries/util/IconCollectionsByTheme.js.map +1 -1
- package/dist/asset-registries/util/getIconCollectionByTheme.js.map +1 -1
- package/dist/config/AnimationMode.js +4 -0
- package/dist/config/AnimationMode.js.map +1 -1
- package/dist/config/CalendarType.js +5 -0
- package/dist/config/CalendarType.js.map +1 -1
- package/dist/config/ConfigurationReset.d.ts +4 -0
- package/dist/config/ConfigurationReset.js +11 -0
- package/dist/config/ConfigurationReset.js.map +1 -0
- package/dist/config/Fonts.d.ts +16 -0
- package/dist/config/Fonts.js +30 -0
- package/dist/config/Fonts.js.map +1 -0
- package/dist/config/FormatSettings.js +4 -0
- package/dist/config/FormatSettings.js.map +1 -1
- package/dist/config/Language.d.ts +2 -1
- package/dist/config/Language.js +19 -3
- package/dist/config/Language.js.map +1 -1
- package/dist/config/NoConflict.js +4 -0
- package/dist/config/NoConflict.js.map +1 -1
- package/dist/config/Theme.js +5 -2
- package/dist/config/Theme.js.map +1 -1
- package/dist/config/ThemeRoot.d.ts +3 -1
- package/dist/config/ThemeRoot.js +7 -1
- package/dist/config/ThemeRoot.js.map +1 -1
- package/dist/config/Timezone.js +4 -0
- package/dist/config/Timezone.js.map +1 -1
- package/dist/config/Tooltips.d.ts +19 -0
- package/dist/config/Tooltips.js +29 -0
- package/dist/config/Tooltips.js.map +1 -0
- package/dist/connectToComponent.js.map +1 -1
- package/dist/converters/DOMReference.d.ts +5 -0
- package/dist/converters/DOMReference.js +13 -0
- package/dist/converters/DOMReference.js.map +1 -0
- package/dist/css/MultipleDragGhost.css +17 -0
- package/dist/css/OpenUI5PopupStyles.css +10 -0
- package/dist/css/ScrollbarStyles.css +3 -0
- package/dist/custom-elements-internal.json +1882 -1950
- package/dist/custom-elements.json +1315 -1317
- package/dist/decorators/bound.d.ts +1 -0
- package/dist/decorators/bound.js +34 -0
- package/dist/decorators/bound.js.map +1 -0
- package/dist/decorators/customElement.d.ts +40 -0
- package/dist/decorators/customElement.js +4 -1
- package/dist/decorators/customElement.js.map +1 -1
- package/dist/decorators/event-strict.d.ts +15 -0
- package/dist/decorators/event-strict.js +26 -0
- package/dist/decorators/event-strict.js.map +1 -0
- package/dist/decorators/event.d.ts +4 -1
- package/dist/decorators/event.js +3 -0
- package/dist/decorators/event.js.map +1 -1
- package/dist/decorators/i18n.d.ts +17 -0
- package/dist/decorators/i18n.js +32 -0
- package/dist/decorators/i18n.js.map +1 -0
- package/dist/decorators/property.d.ts +1 -1
- package/dist/decorators/property.js +1 -1
- package/dist/decorators/property.js.map +1 -1
- package/dist/decorators/query.d.ts +25 -0
- package/dist/decorators/query.js +32 -0
- package/dist/decorators/query.js.map +1 -0
- package/dist/decorators/queryAll.d.ts +27 -0
- package/dist/decorators/queryAll.js +34 -0
- package/dist/decorators/queryAll.js.map +1 -0
- package/dist/decorators/slot.d.ts +1 -1
- package/dist/decorators/slot.js.map +1 -1
- package/dist/decorators.d.ts +4 -1
- package/dist/decorators.js +4 -1
- package/dist/decorators.js.map +1 -1
- package/dist/delegate/ItemNavigation.d.ts +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.d.ts +4 -3
- package/dist/features/F6Navigation.js +62 -19
- package/dist/features/F6Navigation.js.map +1 -1
- package/dist/features/InputElementsFormSupport.d.ts +7 -10
- package/dist/features/InputElementsFormSupport.js +2 -3
- package/dist/features/InputElementsFormSupport.js.map +1 -1
- package/dist/features/LegacyDateFormats.js.map +1 -1
- package/dist/features/OpenUI5Enablement.d.ts +2 -2
- package/dist/features/OpenUI5Enablement.js.map +1 -1
- package/dist/features/OpenUI5Support.d.ts +8 -3
- package/dist/features/OpenUI5Support.js +47 -31
- 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 +27 -8
- package/dist/features/patchPopup.js +132 -19
- package/dist/features/patchPopup.js.map +1 -1
- package/dist/generated/AssetParameters.js +1 -1
- package/dist/generated/AssetParameters.js.map +1 -1
- package/dist/generated/VersionInfo.js +4 -4
- 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/BusyIndicator.css.d.ts +2 -3
- package/dist/generated/css/BusyIndicator.css.js +1 -6
- package/dist/generated/css/BusyIndicator.css.js.map +1 -1
- package/dist/generated/css/FontFace.css.d.ts +2 -3
- package/dist/generated/css/FontFace.css.js +36 -6
- 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 +2 -3
- package/dist/generated/css/SystemCSSVars.css.js +1 -6
- 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/getSharedResource.js.map +1 -1
- package/dist/i18nBundle.js.map +1 -1
- package/dist/index.d.ts +49 -0
- package/dist/index.js +91 -0
- package/dist/index.js.map +1 -0
- package/dist/jsx-dev-runtime.d.ts +4 -0
- package/dist/jsx-dev-runtime.js +43 -0
- package/dist/jsx-dev-runtime.js.map +1 -0
- package/dist/jsx-runtime.d.ts +51 -0
- package/dist/jsx-runtime.js +27 -0
- package/dist/jsx-runtime.js.map +1 -0
- package/dist/jsx-utils.d.ts +3 -0
- package/dist/jsx-utils.js +48 -0
- package/dist/jsx-utils.js.map +1 -0
- package/dist/locale/Locale.js.map +1 -1
- package/dist/locale/getEffectiveDir.js.map +1 -1
- package/dist/locale/getLocale.js.map +1 -1
- package/dist/locale/nextFallbackLocale.js +6 -2
- package/dist/locale/nextFallbackLocale.js.map +1 -1
- package/dist/locale/normalizeLocale.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 +3 -3
- package/dist/prod/CustomElementsScopeUtils.js +1 -1
- package/dist/prod/CustomElementsScopeUtils.js.map +3 -3
- package/dist/prod/Device.js +1 -1
- package/dist/prod/Device.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 +3 -3
- package/dist/prod/Keys.js +1 -1
- package/dist/prod/Keys.js.map +3 -3
- package/dist/prod/Location.js +2 -0
- package/dist/prod/Location.js.map +7 -0
- package/dist/prod/ManagedStyles.js +1 -1
- package/dist/prod/ManagedStyles.js.map +3 -3
- package/dist/prod/Render.js +1 -1
- package/dist/prod/Render.js.map +1 -1
- package/dist/prod/Runtimes.js +1 -1
- package/dist/prod/Runtimes.js.map +3 -3
- package/dist/prod/ScrollbarStyles.js +2 -0
- package/dist/prod/ScrollbarStyles.js.map +7 -0
- 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 +3 -3
- 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 +2 -2
- package/dist/prod/config/AnimationMode.js +1 -1
- package/dist/prod/config/AnimationMode.js.map +3 -3
- package/dist/prod/config/CalendarType.js +1 -1
- package/dist/prod/config/CalendarType.js.map +3 -3
- package/dist/prod/config/ConfigurationReset.js +2 -0
- package/dist/prod/config/ConfigurationReset.js.map +7 -0
- package/dist/prod/config/Fonts.js +2 -0
- package/dist/prod/config/Fonts.js.map +7 -0
- package/dist/prod/config/FormatSettings.js +1 -1
- package/dist/prod/config/FormatSettings.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/NoConflict.js +1 -1
- package/dist/prod/config/NoConflict.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 +1 -1
- package/dist/prod/config/ThemeRoot.js.map +3 -3
- package/dist/prod/config/Timezone.js +1 -1
- package/dist/prod/config/Timezone.js.map +3 -3
- package/dist/prod/config/Tooltips.js +2 -0
- package/dist/prod/config/Tooltips.js.map +7 -0
- package/dist/prod/connectToComponent.js +1 -1
- package/dist/prod/connectToComponent.js.map +1 -1
- package/dist/prod/converters/DOMReference.js +2 -0
- package/dist/prod/converters/DOMReference.js.map +7 -0
- package/dist/prod/decorators/bound.js +2 -0
- package/dist/prod/decorators/bound.js.map +7 -0
- package/dist/prod/decorators/customElement.js +1 -1
- package/dist/prod/decorators/customElement.js.map +3 -3
- package/dist/prod/decorators/event-strict.js +2 -0
- package/dist/prod/decorators/event-strict.js.map +7 -0
- package/dist/prod/decorators/event.js +1 -1
- package/dist/prod/decorators/event.js.map +2 -2
- package/dist/prod/decorators/i18n.js +2 -0
- package/dist/prod/decorators/i18n.js.map +7 -0
- package/dist/prod/decorators/property.js +1 -1
- package/dist/prod/decorators/property.js.map +2 -2
- package/dist/prod/decorators/query.js +2 -0
- package/dist/prod/decorators/query.js.map +7 -0
- package/dist/prod/decorators/queryAll.js +2 -0
- package/dist/prod/decorators/queryAll.js.map +7 -0
- package/dist/prod/decorators/slot.js +1 -1
- package/dist/prod/decorators/slot.js.map +1 -1
- package/dist/prod/decorators.js +1 -1
- package/dist/prod/decorators.js.map +3 -3
- package/dist/prod/delegate/ItemNavigation.js.map +1 -1
- 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/OpenUI5Enablement.js.map +1 -1
- 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/AssetParameters.js +1 -1
- package/dist/prod/generated/AssetParameters.js.map +2 -2
- 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/BusyIndicator.css.js +1 -1
- package/dist/prod/generated/css/BusyIndicator.css.js.map +3 -3
- package/dist/prod/generated/css/FontFace.css.js +36 -1
- package/dist/prod/generated/css/FontFace.css.js.map +3 -3
- 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 +3 -3
- 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 +2 -0
- package/dist/prod/index.js.map +7 -0
- package/dist/prod/jsx-dev-runtime.js +2 -0
- package/dist/prod/jsx-dev-runtime.js.map +7 -0
- package/dist/prod/jsx-runtime.js +2 -0
- package/dist/prod/jsx-runtime.js.map +7 -0
- package/dist/prod/jsx-utils.js +2 -0
- package/dist/prod/jsx-utils.js.map +7 -0
- package/dist/prod/locale/nextFallbackLocale.js +1 -1
- package/dist/prod/locale/nextFallbackLocale.js.map +3 -3
- package/dist/prod/renderer/JsxRenderer.js +2 -0
- package/dist/prod/renderer/JsxRenderer.js.map +7 -0
- package/dist/prod/renderer/LitRenderer.js +1 -1
- package/dist/prod/renderer/LitRenderer.js.map +3 -3
- package/dist/prod/renderer/executeTemplate.js +1 -1
- package/dist/prod/renderer/executeTemplate.js.map +3 -3
- package/dist/prod/sap/ui/thirdparty/caja-html-sanitizer.js +1 -1
- package/dist/prod/ssr-dom-shim.js +1 -1
- package/dist/prod/ssr-dom-shim.js.map +3 -3
- package/dist/prod/theming/applyTheme.js +1 -1
- package/dist/prod/theming/applyTheme.js.map +2 -2
- package/dist/prod/theming/getConstructableStyle.js +1 -1
- package/dist/prod/theming/getConstructableStyle.js.map +1 -1
- package/dist/prod/theming/getEffectiveStyle.js +1 -1
- package/dist/prod/theming/getEffectiveStyle.js.map +1 -1
- package/dist/prod/theming/getStylesString.js +1 -1
- package/dist/prod/theming/getStylesString.js.map +2 -2
- package/dist/prod/theming/getThemeDesignerTheme.js +1 -1
- package/dist/prod/theming/getThemeDesignerTheme.js.map +3 -3
- package/dist/prod/thirdparty/preact/jsx.d.js +2 -0
- package/dist/prod/thirdparty/preact/jsx.d.js.map +7 -0
- package/dist/prod/thirdparty/preact/jsxRuntime.module.d.js +2 -0
- package/dist/prod/thirdparty/preact/jsxRuntime.module.d.js.map +7 -0
- package/dist/prod/thirdparty/preact/jsxRuntime.module.js +1 -0
- package/dist/prod/thirdparty/preact/preact.module.d.js +2 -0
- package/dist/prod/thirdparty/preact/preact.module.d.js.map +7 -0
- package/dist/prod/thirdparty/preact/preact.module.js +1 -0
- package/dist/prod/types/SortOrder.js +2 -0
- package/dist/prod/types/SortOrder.js.map +7 -0
- package/dist/prod/updateShadowRoot.js +1 -1
- package/dist/prod/updateShadowRoot.js.map +3 -3
- package/dist/prod/util/AccessibilityTextsHelper.js +2 -0
- package/dist/prod/util/AccessibilityTextsHelper.js.map +7 -0
- package/dist/prod/util/ColorConversion.js +1 -1
- package/dist/prod/util/ColorConversion.js.map +3 -3
- package/dist/prod/util/FocusableElements.js +1 -1
- package/dist/prod/util/FocusableElements.js.map +3 -3
- package/dist/prod/util/HTMLSanitizer.js.map +1 -1
- package/dist/prod/util/SelectionAssistant.js +2 -0
- package/dist/prod/util/SelectionAssistant.js.map +7 -0
- package/dist/prod/util/StringHelper.js +1 -1
- package/dist/prod/util/StringHelper.js.map +3 -3
- package/dist/prod/util/TabbableElements.js +1 -1
- package/dist/prod/util/TabbableElements.js.map +3 -3
- package/dist/prod/util/debounce.js +1 -1
- package/dist/prod/util/debounce.js.map +1 -1
- package/dist/prod/util/dragAndDrop/DragRegistry.js +1 -1
- package/dist/prod/util/dragAndDrop/DragRegistry.js.map +3 -3
- package/dist/prod/util/dragAndDrop/findClosestPosition.js +1 -1
- package/dist/prod/util/dragAndDrop/findClosestPosition.js.map +3 -3
- package/dist/prod/util/dragAndDrop/handleDragOver.js +2 -0
- package/dist/prod/util/dragAndDrop/handleDragOver.js.map +7 -0
- package/dist/prod/util/dragAndDrop/handleDrop.js +2 -0
- package/dist/prod/util/dragAndDrop/handleDrop.js.map +7 -0
- package/dist/prod/util/fixSafariActiveState.js +2 -0
- package/dist/prod/util/fixSafariActiveState.js.map +7 -0
- package/dist/prod/util/getFastNavigationGroups.js +1 -1
- package/dist/prod/util/getFastNavigationGroups.js.map +2 -2
- package/dist/prod/util/getParentElement.js +1 -1
- package/dist/prod/util/getParentElement.js.map +3 -3
- package/dist/prod/util/hash2str.js +2 -0
- package/dist/prod/util/hash2str.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/isElementTabbable.js +1 -1
- package/dist/prod/util/isElementTabbable.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/throttle.js +2 -0
- package/dist/prod/util/throttle.js.map +7 -0
- package/dist/prod/util/toLowercaseEnumValue.js +2 -0
- package/dist/prod/util/toLowercaseEnumValue.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 +3 -3
- package/dist/renderer/JsxRenderer.d.ts +3 -0
- package/dist/renderer/JsxRenderer.js +26 -0
- package/dist/renderer/JsxRenderer.js.map +1 -0
- package/dist/renderer/LitRenderer.d.ts +1 -1
- package/dist/renderer/LitRenderer.js +4 -3
- package/dist/renderer/LitRenderer.js.map +1 -1
- package/dist/renderer/directives/style-map.js.map +1 -1
- package/dist/renderer/executeTemplate.d.ts +3 -12
- package/dist/renderer/executeTemplate.js +1 -20
- package/dist/renderer/executeTemplate.js.map +1 -1
- package/dist/sap/ui/thirdparty/caja-html-sanitizer.js +1 -1
- package/dist/ssr-dom-shim.js +52 -1
- package/dist/ssr-dom-shim.js.map +1 -1
- package/dist/ssr-dom.d.ts +1 -0
- package/dist/ssr-dom.js +3 -0
- package/dist/ssr-dom.js.map +1 -0
- package/dist/theming/CustomStyle.js.map +1 -1
- package/dist/theming/applyTheme.d.ts +2 -0
- package/dist/theming/applyTheme.js +7 -2
- package/dist/theming/applyTheme.js.map +1 -1
- package/dist/theming/getConstructableStyle.d.ts +1 -1
- package/dist/theming/getConstructableStyle.js.map +1 -1
- package/dist/theming/getEffectiveStyle.js.map +1 -1
- package/dist/theming/getStylesString.js +2 -4
- package/dist/theming/getStylesString.js.map +1 -1
- package/dist/theming/getThemeDesignerTheme.js +2 -1
- package/dist/theming/getThemeDesignerTheme.js.map +1 -1
- package/dist/thirdparty/_merge.js.map +1 -1
- package/dist/thirdparty/isPlainObject.js.map +1 -1
- package/dist/thirdparty/preact/jsx.d.ts +2616 -0
- package/dist/thirdparty/preact/jsxRuntime.module.d.ts +62 -0
- package/dist/thirdparty/preact/jsxRuntime.module.js +1 -0
- package/dist/thirdparty/preact/preact.module.d.ts +398 -0
- package/dist/thirdparty/preact/preact.module.js +1 -0
- package/dist/types/SortOrder.d.ts +24 -0
- package/dist/types/SortOrder.js +26 -0
- package/dist/types/SortOrder.js.map +1 -0
- package/dist/types.d.ts +32 -26
- package/dist/types.js.map +1 -1
- package/dist/updateShadowRoot.js +1 -2
- package/dist/updateShadowRoot.js.map +1 -1
- package/dist/util/{AriaLabelHelper.d.ts → AccessibilityTextsHelper.d.ts} +4 -2
- package/dist/util/{AriaLabelHelper.js → AccessibilityTextsHelper.js} +36 -8
- package/dist/util/AccessibilityTextsHelper.js.map +1 -0
- package/dist/util/Caret.js.map +1 -1
- package/dist/util/ColorConversion.d.ts +2 -1
- package/dist/util/ColorConversion.js +35 -23
- package/dist/util/ColorConversion.js.map +1 -1
- package/dist/util/FetchHelper.js.map +1 -1
- package/dist/util/FocusableElements.js +43 -15
- package/dist/util/FocusableElements.js.map +1 -1
- package/dist/util/HTMLSanitizer.d.ts +2 -0
- package/dist/util/HTMLSanitizer.js +2 -2
- 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/SelectionAssistant.d.ts +12 -0
- package/dist/util/SelectionAssistant.js +71 -0
- package/dist/util/SelectionAssistant.js.map +1 -0
- package/dist/util/SlotsHelper.js.map +1 -1
- package/dist/util/StringHelper.d.ts +3 -1
- package/dist/util/StringHelper.js +15 -1
- package/dist/util/StringHelper.js.map +1 -1
- package/dist/util/TabbableElements.js +5 -12
- package/dist/util/TabbableElements.js.map +1 -1
- package/dist/util/arraysAreEqual.js.map +1 -1
- package/dist/util/createLinkInHead.js.map +1 -1
- package/dist/util/debounce.js.map +1 -1
- package/dist/util/detectNavigatorLanguage.js.map +1 -1
- package/dist/util/dragAndDrop/DragRegistry.d.ts +35 -8
- package/dist/util/dragAndDrop/DragRegistry.js +42 -52
- package/dist/util/dragAndDrop/DragRegistry.js.map +1 -1
- package/dist/util/dragAndDrop/findClosestPosition.d.ts +6 -1
- package/dist/util/dragAndDrop/findClosestPosition.js +48 -1
- package/dist/util/dragAndDrop/findClosestPosition.js.map +1 -1
- package/dist/util/dragAndDrop/handleDragOver.d.ts +16 -0
- package/dist/util/dragAndDrop/handleDragOver.js +42 -0
- package/dist/util/dragAndDrop/handleDragOver.js.map +1 -0
- package/dist/util/dragAndDrop/handleDrop.d.ts +5 -0
- package/dist/util/dragAndDrop/handleDrop.js +22 -0
- package/dist/util/dragAndDrop/handleDrop.js.map +1 -0
- package/dist/util/dragAndDrop/longDragOverHandler.js.map +1 -1
- package/dist/util/fixSafariActiveState.d.ts +2 -0
- package/dist/util/fixSafariActiveState.js +11 -0
- package/dist/util/fixSafariActiveState.js.map +1 -0
- 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.d.ts +107 -86
- package/dist/util/getFastNavigationGroups.js +6 -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/getParentElement.d.ts +1 -1
- package/dist/util/getParentElement.js +2 -2
- package/dist/util/getParentElement.js.map +1 -1
- package/dist/util/getSingletonElementInstance.js.map +1 -1
- package/dist/util/hash2str.d.ts +1 -0
- package/dist/util/hash2str.js +14 -0
- package/dist/util/hash2str.js.map +1 -0
- package/dist/util/isElementClickable.js.map +1 -1
- package/dist/util/isElementHidden.js +2 -1
- package/dist/util/isElementHidden.js.map +1 -1
- package/dist/util/isElementTabbable.js +2 -2
- package/dist/util/isElementTabbable.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/isValidPropertyName.js.map +1 -1
- package/dist/util/throttle.d.ts +2 -0
- package/dist/util/throttle.js +20 -0
- package/dist/util/throttle.js.map +1 -0
- package/dist/util/toLowercaseEnumValue.d.ts +3 -0
- package/dist/util/toLowercaseEnumValue.js +4 -0
- package/dist/util/toLowercaseEnumValue.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/util/whenDOMReady.js.map +1 -1
- package/dist/validateThemeRoot.js +9 -4
- package/dist/validateThemeRoot.js.map +1 -1
- package/dist/vscode.html-custom-data.json +1 -1
- package/package-scripts.cjs +64 -33
- package/package.json +41 -25
- package/src/css/MultipleDragGhost.css +17 -0
- package/src/css/OpenUI5PopupStyles.css +10 -0
- package/src/css/ScrollbarStyles.css +3 -0
- 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/jsxRuntime.module.js +1 -0
- package/src/thirdparty/preact/preact.module.js +1 -0
- package/src/thirdparty/preact/version.txt +1 -0
- package/tsconfig.json +18 -19
- package/config/wdio.conf.cjs +0 -392
- package/dist/.tsbuildinfo +0 -1
- package/dist/MarkedEvents.d.ts +0 -9
- package/dist/MarkedEvents.js +0 -15
- package/dist/MarkedEvents.js.map +0 -1
- package/dist/css/FontFace.css +0 -96
- package/dist/css/OverrideFontFace.css +0 -32
- package/dist/generated/css/OverrideFontFace.css.d.ts +0 -3
- package/dist/generated/css/OverrideFontFace.css.js +0 -7
- package/dist/generated/css/OverrideFontFace.css.js.map +0 -1
- package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.d.ts +0 -4
- package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.js +0 -9
- package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.js.map +0 -1
- package/dist/prod/MarkedEvents.js +0 -2
- package/dist/prod/MarkedEvents.js.map +0 -7
- package/dist/prod/generated/css/OverrideFontFace.css.js +0 -2
- package/dist/prod/generated/css/OverrideFontFace.css.js.map +0 -7
- package/dist/prod/generated/templates/elements/WithComplexTemplateTemplate.lit.js +0 -2
- package/dist/prod/generated/templates/elements/WithComplexTemplateTemplate.lit.js.map +0 -7
- package/dist/prod/types/AriaHasPopup.js +0 -2
- package/dist/prod/types/AriaHasPopup.js.map +0 -7
- package/dist/prod/types/AriaLandmarkRole.js +0 -2
- package/dist/prod/types/AriaLandmarkRole.js.map +0 -7
- package/dist/prod/types/AriaRole.js +0 -2
- package/dist/prod/types/AriaRole.js.map +0 -7
- package/dist/prod/types/CSSColor.js +0 -2
- package/dist/prod/types/CSSColor.js.map +0 -7
- package/dist/prod/types/CSSSize.js +0 -2
- package/dist/prod/types/CSSSize.js.map +0 -7
- package/dist/prod/types/DOMReference.js +0 -2
- package/dist/prod/types/DOMReference.js.map +0 -7
- package/dist/prod/types/DataType.js +0 -2
- package/dist/prod/types/DataType.js.map +0 -7
- package/dist/prod/types/Float.js +0 -2
- package/dist/prod/types/Float.js.map +0 -7
- package/dist/prod/types/Integer.js +0 -2
- package/dist/prod/types/Integer.js.map +0 -7
- package/dist/prod/util/AriaLabelHelper.js +0 -2
- package/dist/prod/util/AriaLabelHelper.js.map +0 -7
- package/dist/prod/util/getEffectiveScrollbarStyle.js +0 -2
- package/dist/prod/util/getEffectiveScrollbarStyle.js.map +0 -7
- package/dist/prod/util/isElementContainingBlock.js +0 -2
- package/dist/prod/util/isElementContainingBlock.js.map +0 -7
- package/dist/types/AriaHasPopup.d.ts +0 -32
- package/dist/types/AriaHasPopup.js +0 -34
- package/dist/types/AriaHasPopup.js.map +0 -1
- package/dist/types/AriaLandmarkRole.d.ts +0 -79
- package/dist/types/AriaLandmarkRole.js +0 -81
- package/dist/types/AriaLandmarkRole.js.map +0 -1
- package/dist/types/AriaRole.d.ts +0 -27
- package/dist/types/AriaRole.js +0 -29
- package/dist/types/AriaRole.js.map +0 -1
- package/dist/types/CSSColor.d.ts +0 -11
- package/dist/types/CSSColor.js +0 -14
- package/dist/types/CSSColor.js.map +0 -1
- package/dist/types/CSSSize.d.ts +0 -11
- package/dist/types/CSSSize.js +0 -14
- package/dist/types/CSSSize.js.map +0 -1
- package/dist/types/DOMReference.d.ts +0 -13
- package/dist/types/DOMReference.js +0 -21
- package/dist/types/DOMReference.js.map +0 -1
- package/dist/types/DataType.d.ts +0 -20
- package/dist/types/DataType.js +0 -39
- package/dist/types/DataType.js.map +0 -1
- package/dist/types/Float.d.ts +0 -14
- package/dist/types/Float.js +0 -18
- package/dist/types/Float.js.map +0 -1
- package/dist/types/Integer.d.ts +0 -14
- package/dist/types/Integer.js +0 -18
- package/dist/types/Integer.js.map +0 -1
- package/dist/util/AriaLabelHelper.js.map +0 -1
- package/dist/util/getEffectiveScrollbarStyle.d.ts +0 -2
- package/dist/util/getEffectiveScrollbarStyle.js +0 -4
- package/dist/util/getEffectiveScrollbarStyle.js.map +0 -1
- package/dist/util/isElementContainingBlock.d.ts +0 -2
- package/dist/util/isElementContainingBlock.js +0 -11
- package/dist/util/isElementContainingBlock.js.map +0 -1
- package/index.js +0 -214
- package/src/css/FontFace.css +0 -96
- package/src/css/OverrideFontFace.css +0 -32
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/asset-registries/Illustrations.ts"],
|
|
4
|
-
"sourcesContent": ["import getSharedResource from \"../getSharedResource.js\";\nimport type { I18nText } from \"../i18nBundle.js\";\nimport { getTheme } from \"../config/Theme.js\";\n\ntype IllustrationLoader = (illustrationName: string) => Promise<
|
|
5
|
-
"mappings": "aAAA,OAAOA,MAAuB,0BAE9B,OAAS,YAAAC,MAAgB,
|
|
6
|
-
"names": ["getSharedResource", "getTheme", "IllustrationCollections", "FALLBACK_COLLECTION", "loaders", "registry", "illustrationPromises", "getCollection", "theme", "processName", "name", "collection", "set", "illustrationName", "registryKey", "registerIllustration", "data", "registerIllustrationLoader", "loader", "_loadIllustrationOnce", "illustrationPath", "loadIllustrations", "getIllustrationDataSync", "getIllustrationData"]
|
|
4
|
+
"sourcesContent": ["import getSharedResource from \"../getSharedResource.js\";\nimport type { I18nText } from \"../i18nBundle.js\";\nimport { getTheme } from \"../config/Theme.js\";\nimport type { TemplateFunction } from \"../renderer/executeTemplate.js\";\n\n/**\n * Loader function for lazy-loading illustration data.\n */\ntype IllustrationLoader = (illustrationName: string) => Promise<UnsafeIllustrationData>;\n\n/**\n * Database properties shared by all illustration types.\n */\ntype IllustrationDatabase = {\n\t/** The illustration title text (supports i18n) */\n\ttitle: I18nText,\n\t/** The illustration subtitle text (supports i18n) */\n\tsubtitle: I18nText,\n};\n\n/**\n * Illustration properties using template functions (recommended).\n *\n * @public\n */\ntype IllustrationProperties = IllustrationDatabase & {\n\t/** Template function for the medium variant (M breakpoint, \u2264 681px) */\n\tdialogTemplate?: TemplateFunction,\n\t/** Template function for the large variant (L breakpoint, > 681px) */\n\tsceneTemplate?: TemplateFunction,\n\t/** Template function for the small variant (S breakpoint, \u2264 360px) */\n\tspotTemplate?: TemplateFunction,\n\t/** Template function for the extra small variant (XS breakpoint, \u2264 260px) */\n\tdotTemplate?: TemplateFunction,\n};\n\n/**\n * Illustration properties using raw SVG strings (unsafe).\n *\n * @public\n */\ntype UnsafeIllustrationProperties = IllustrationDatabase & {\n\t/** SVG content for the medium variant (M breakpoint, \u2264 681px) */\n\tdialogSvg: string,\n\t/** SVG content for the large variant (L breakpoint, > 681px) */\n\tsceneSvg: string,\n\t/** SVG content for the small variant (S breakpoint, \u2264 360px) */\n\tspotSvg: string,\n\t/** SVG content for the extra small variant (XS breakpoint, \u2264 260px) */\n\tdotSvg: string,\n};\n\n/**\n * Complete illustration data for registration (recommended).\n *\n * @public\n */\ntype IllustrationData = IllustrationProperties & {\n\t/** The illustration set identifier (e.g., \"custom\") */\n\tset: string,\n\t/** Collection identifier (defaults to \"V4\") */\n\tcollection?: string,\n};\n\n/**\n * Complete unsafe illustration data for registration.\n *\n * @public\n */\ntype UnsafeIllustrationData = UnsafeIllustrationProperties & {\n\t/** The illustration set identifier (e.g., \"custom\") */\n\tset: string,\n\t/** Collection identifier (defaults to \"V4\") */\n\tcollection?: string,\n};\n\nconst IllustrationCollections = new Map([\n\t[\"sap_horizon\", \"V5\"],\n\t[\"sap_horizon_dark\", \"V5\"],\n\t[\"sap_horizon_hcb\", \"V5/HC\"],\n\t[\"sap_horizon_hcw\", \"V5/HC\"],\n]);\n\nconst FALLBACK_COLLECTION = \"V4\";\n\nconst loaders = new Map<string, IllustrationLoader>();\nconst registry = getSharedResource<Map<string, IllustrationProperties | UnsafeIllustrationProperties>>(\"SVGIllustration.registry\", new Map());\nconst illustrationPromises = getSharedResource<Map<string, Promise<UnsafeIllustrationData>>>(\"SVGIllustration.promises\", new Map());\n\nconst getCollection = () => {\n\tconst theme = getTheme();\n\n\tif (IllustrationCollections.has(theme)) {\n\t\treturn IllustrationCollections.get(theme);\n\t}\n\n\treturn FALLBACK_COLLECTION;\n};\n\n/**\n * Processes the name of the illustration\n * The name is used to generate the registry key and the loader key\n * The registry key is used to store and get the illustration data from the registry\n * The loader key is used to store and get the illustration loader from the loaders map\n * The function generates the correct registry key and loader key based on whether an loader exists for the illustration\n * If there is no loader registered for the collection, it falls back to the default collection\n */\nconst processName = (name: string) => {\n\tlet collection = getCollection();\n\tconst [set, illustrationName] = name.split(\"/\");\n\tlet registryKey = `${set}/${collection}/${illustrationName}`;\n\n\tif (!loaders.has(registryKey) && collection !== FALLBACK_COLLECTION) {\n\t\tcollection = FALLBACK_COLLECTION;\n\t\tregistryKey = `${set}/${collection}/${illustrationName}`;\n\t}\n\n\treturn {\n\t\tregistryKey,\n\t\tcollection,\n\t};\n};\n\n/**\n * Registers a custom illustration in the global registry using template functions.\n *\n * This is the recommended way to register illustrations as it accepts template functions\n * instead of raw SVG strings, preventing XSS vulnerabilities.\n *\n * @param name - The name of the illustration (without set prefix)\n * @param data - The illustration data (see {@link IllustrationData})\n *\n * @public\n * @since 2.17.0\n * @example\n * ```js\n * import { registerIllustration } from \"@ui5/webcomponents-base/dist/asset-registries/Illustrations.js\";\n *\n * registerIllustration(\"EmptyCart\", {\n * sceneTemplate: (component) => <svg>...</svg>,\n * dialogTemplate: (component) => <svg>...</svg>,\n * spotTemplate: (component) => <svg>...</svg>,\n * dotTemplate: (component) => <svg>...</svg>,\n * title: \"Your cart is empty\",\n * subtitle: \"Add items to get started\",\n * set: \"custom\"\n * });\n * ```\n */\nconst registerIllustration = (name: string, data: IllustrationData) => {\n\tconst collection = data.collection || FALLBACK_COLLECTION;\n\tregistry.set(`${data.set}/${collection}/${name}`, {\n\t\tdialogTemplate: data.dialogTemplate,\n\t\tsceneTemplate: data.sceneTemplate,\n\t\tspotTemplate: data.spotTemplate,\n\t\tdotTemplate: data.dotTemplate,\n\t\ttitle: data.title,\n\t\tsubtitle: data.subtitle,\n\t});\n};\n\n/**\n * Registers a custom illustration in the global registry.\n *\n * <b>Note:</b> This method is unsafe as it allows the SVG content to be passed as raw strings\n * through the `dialogSvg`, `sceneSvg`, `spotSvg`, and `dotSvg` properties of the `data`.\n * Ensure that the SVG content is properly validated.\n * Improperly sanitized SVG strings can lead to security vulnerabilities such as XSS (Cross-Site Scripting).\n *\n * @param name - The name of the illustration (without set prefix)\n * @param data - The illustration data (see {@link UnsafeIllustrationData})\n *\n * @public\n * @since 2.17.0\n * @example\n * ```js\n * import { unsafeRegisterIllustration } from \"@ui5/webcomponents-base/dist/asset-registries/Illustrations.js\";\n *\n * unsafeRegisterIllustration(\"EmptyCart\", {\n * sceneSvg: \"<svg>...</svg>\",\n * dialogSvg: \"<svg>...</svg>\",\n * spotSvg: \"<svg>...</svg>\",\n * dotSvg: \"<svg>...</svg>\",\n * title: \"Your cart is empty\",\n * subtitle: \"Add items to get started\",\n * set: \"custom\"\n * });\n * ```\n */\nconst unsafeRegisterIllustration = (name: string, data: UnsafeIllustrationData) => {\n\tconst collection = data.collection || FALLBACK_COLLECTION;\n\tregistry.set(`${data.set}/${collection}/${name}`, {\n\t\tdialogSvg: data.dialogSvg,\n\t\tsceneSvg: data.sceneSvg,\n\t\tspotSvg: data.spotSvg,\n\t\tdotSvg: data.dotSvg,\n\t\ttitle: data.title,\n\t\tsubtitle: data.subtitle,\n\t});\n};\n\nconst registerIllustrationLoader = (illustrationName: string, loader: IllustrationLoader) => {\n\tloaders.set(illustrationName, loader);\n};\n\nconst _loadIllustrationOnce = (illustrationName: string) => {\n\tconst { registryKey } = processName(illustrationName);\n\tif (!illustrationPromises.has(registryKey)) {\n\t\tif (!loaders.has(registryKey)) {\n\t\t\tconst illustrationPath = illustrationName.startsWith(\"fiori/\") ? illustrationName.replace(\"fiori/\", \"\") : illustrationName;\n\t\t\tthrow new Error(`No loader registered for the ${illustrationName} illustration. Probably you forgot to import the \"@ui5/webcomponents-fiori/dist/illustrations/${illustrationPath}.js\" module. Or you can import the \"@ui5/webcomponents-fiori/dist/illustrations/AllIllustrations.js\" module that will make all illustrations available, but fetch only the ones used.`);\n\t\t}\n\n\t\tconst loadIllustrations = loaders.get(registryKey)!;\n\t\tillustrationPromises.set(registryKey, loadIllustrations(registryKey));\n\t}\n\treturn illustrationPromises.get(registryKey);\n};\n\n/**\n * Synchronously retrieves illustration data from the registry.\n *\n * @param illustrationName - The illustration identifier in format \"set/name\"\n * @returns The illustration properties or undefined if not available\n *\n * @public\n */\nconst getIllustrationDataSync = (illustrationName: string) => {\n\tconst { registryKey } = processName(illustrationName);\n\treturn registry.get(registryKey);\n};\n\n/**\n * Asynchronously retrieves illustration data, loading it if necessary.\n *\n * @param illustrationName - The illustration identifier in format \"set/name\"\n * @returns Promise resolving to illustration properties or undefined\n *\n * @public\n */\nconst getIllustrationData = async (illustrationName: string) => {\n\tconst { registryKey } = processName(illustrationName);\n\n\tawait _loadIllustrationOnce(illustrationName);\n\treturn registry.get(registryKey);\n};\n\nexport {\n\tgetIllustrationDataSync,\n\tregisterIllustration,\n\tunsafeRegisterIllustration,\n\tregisterIllustrationLoader,\n\tgetIllustrationData,\n};\n\nexport type {\n\tIllustrationData,\n\tUnsafeIllustrationData,\n\tIllustrationProperties,\n\tUnsafeIllustrationProperties,\n};\n"],
|
|
5
|
+
"mappings": "aAAA,OAAOA,MAAuB,0BAE9B,OAAS,YAAAC,MAAgB,qBA0EzB,MAAMC,EAA0B,IAAI,IAAI,CACvC,CAAC,cAAe,IAAI,EACpB,CAAC,mBAAoB,IAAI,EACzB,CAAC,kBAAmB,OAAO,EAC3B,CAAC,kBAAmB,OAAO,CAC5B,CAAC,EAEKC,EAAsB,KAEtBC,EAAU,IAAI,IACdC,EAAWL,EAAsF,2BAA4B,IAAI,GAAK,EACtIM,EAAuBN,EAAgE,2BAA4B,IAAI,GAAK,EAE5HO,EAAgB,IAAM,CAC3B,MAAMC,EAAQP,EAAS,EAEvB,OAAIC,EAAwB,IAAIM,CAAK,EAC7BN,EAAwB,IAAIM,CAAK,EAGlCL,CACR,EAUMM,EAAeC,GAAiB,CACrC,IAAIC,EAAaJ,EAAc,EAC/B,KAAM,CAACK,EAAKC,CAAgB,EAAIH,EAAK,MAAM,GAAG,EAC9C,IAAII,EAAc,GAAGF,CAAG,IAAID,CAAU,IAAIE,CAAgB,GAE1D,MAAI,CAACT,EAAQ,IAAIU,CAAW,GAAKH,IAAeR,IAC/CQ,EAAaR,EACbW,EAAc,GAAGF,CAAG,IAAID,CAAU,IAAIE,CAAgB,IAGhD,CACN,YAAAC,EACA,WAAAH,CACD,CACD,EA4BMI,EAAuB,CAACL,EAAcM,IAA2B,CACtE,MAAML,EAAaK,EAAK,YAAcb,EACtCE,EAAS,IAAI,GAAGW,EAAK,GAAG,IAAIL,CAAU,IAAID,CAAI,GAAI,CACjD,eAAgBM,EAAK,eACrB,cAAeA,EAAK,cACpB,aAAcA,EAAK,aACnB,YAAaA,EAAK,YAClB,MAAOA,EAAK,MACZ,SAAUA,EAAK,QAChB,CAAC,CACF,EA8BMC,EAA6B,CAACP,EAAcM,IAAiC,CAClF,MAAML,EAAaK,EAAK,YAAcb,EACtCE,EAAS,IAAI,GAAGW,EAAK,GAAG,IAAIL,CAAU,IAAID,CAAI,GAAI,CACjD,UAAWM,EAAK,UAChB,SAAUA,EAAK,SACf,QAASA,EAAK,QACd,OAAQA,EAAK,OACb,MAAOA,EAAK,MACZ,SAAUA,EAAK,QAChB,CAAC,CACF,EAEME,EAA6B,CAACL,EAA0BM,IAA+B,CAC5Ff,EAAQ,IAAIS,EAAkBM,CAAM,CACrC,EAEMC,EAAyBP,GAA6B,CAC3D,KAAM,CAAE,YAAAC,CAAY,EAAIL,EAAYI,CAAgB,EACpD,GAAI,CAACP,EAAqB,IAAIQ,CAAW,EAAG,CAC3C,GAAI,CAACV,EAAQ,IAAIU,CAAW,EAAG,CAC9B,MAAMO,EAAmBR,EAAiB,WAAW,QAAQ,EAAIA,EAAiB,QAAQ,SAAU,EAAE,EAAIA,EAC1G,MAAM,IAAI,MAAM,gCAAgCA,CAAgB,iGAAiGQ,CAAgB,uLAAuL,CACzW,CAEA,MAAMC,EAAoBlB,EAAQ,IAAIU,CAAW,EACjDR,EAAqB,IAAIQ,EAAaQ,EAAkBR,CAAW,CAAC,CACrE,CACA,OAAOR,EAAqB,IAAIQ,CAAW,CAC5C,EAUMS,EAA2BV,GAA6B,CAC7D,KAAM,CAAE,YAAAC,CAAY,EAAIL,EAAYI,CAAgB,EACpD,OAAOR,EAAS,IAAIS,CAAW,CAChC,EAUMU,EAAsB,MAAOX,GAA6B,CAC/D,KAAM,CAAE,YAAAC,CAAY,EAAIL,EAAYI,CAAgB,EAEpD,aAAMO,EAAsBP,CAAgB,EACrCR,EAAS,IAAIS,CAAW,CAChC,EAEA,OACCS,KAAA,wBACAR,KAAA,qBACAE,KAAA,2BACAC,KAAA,2BACAM,KAAA",
|
|
6
|
+
"names": ["getSharedResource", "getTheme", "IllustrationCollections", "FALLBACK_COLLECTION", "loaders", "registry", "illustrationPromises", "getCollection", "theme", "processName", "name", "collection", "set", "illustrationName", "registryKey", "registerIllustration", "data", "unsafeRegisterIllustration", "registerIllustrationLoader", "loader", "_loadIllustrationOnce", "illustrationPath", "loadIllustrations", "getIllustrationDataSync", "getIllustrationData"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import{attachLanguageChange as
|
|
1
|
+
"use strict";import{attachLanguageChange as C}from"../locale/languageChange.js";import h from"../locale/getLocale.js";import{DEFAULT_LOCALE as a,SUPPORTED_LOCALES as l}from"../generated/AssetParameters.js";import{getFeature as w}from"../FeaturesRegistry.js";const f=new Map,s=new Map,i=new Map,L=new Set;let d=!1;const O={iw:"he",ji:"yi",in:"id"},D=t=>{d||(console.warn(`[LocaleData] Supported locale "${t}" not configured, import the "Assets.js" module from the webcomponents package you are using.`),d=!0)},y=(t,e,n)=>{t=t&&O[t]||t,t==="no"&&(t="nb"),t==="zh"&&!e&&(n==="Hans"?e="CN":n==="Hant"&&(e="TW")),(t==="sh"||t==="sr"&&n==="Latn")&&(t="sr",e="Latn");let o=`${t}_${e}`;return l.includes(o)?s.has(o)?o:(D(o),a):(o=t,l.includes(o)?s.has(o)?o:(D(o),a):a)},u=(t,e)=>{f.set(t,e)},R=t=>{s.has(t)||(t=a);const e=f.get(t);if(!e)throw new Error(`CLDR data for locale ${t} is not loaded!`);return e},S=t=>{if(!i.get(t)){const e=s.get(t);if(!e)throw new Error(`CLDR data for locale ${t} is not loaded!`);i.set(t,e(t))}return i.get(t)},g=async(t,e,n)=>{const o=y(t,e,n),p=w("OpenUI5Support");if(p){const r=p.getLocaleDataObject();if(r){u(o,r);return}}try{const r=await S(o);u(o,r)}catch(r){const c=r;L.has(c.message)||(L.add(c.message),console.error(c.message))}},m=(t,e)=>{s.set(t,e)};m("en",async()=>(console.warn('[LocaleData] Falling back to loading "en" locale data from CDN.','For production usage, please configure locale data loading via the "Assets.js" module of the webcomponents package you are using.'),(await fetch("https://cdn.jsdelivr.net/npm/@openui5/sap.ui.core@1.120.17/src/sap/ui/core/cldr/en.json")).json())),C(()=>{const t=h();return g(t.getLanguage(),t.getRegion(),t.getScript())});export{m as registerLocaleDataLoader,g as fetchCldr,R as getLocaleData};
|
|
2
2
|
//# sourceMappingURL=LocaleData.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/asset-registries/LocaleData.ts"],
|
|
4
|
-
"sourcesContent": ["import { attachLanguageChange } from \"../locale/languageChange.js\";\nimport getLocale from \"../locale/getLocale.js\";\nimport { DEFAULT_LOCALE, SUPPORTED_LOCALES } from \"../generated/AssetParameters.js\";\nimport { getFeature } from \"../FeaturesRegistry.js\";\nimport type OpenUI5Support from \"../features/OpenUI5Support.js\";\n\ntype LocaleDataLoader = (locale: string) => Promise<CLDRData>;\ntype CLDRData = Record<string, object | boolean | string>;\n\nconst localeDataMap = new Map<string, CLDRData>();\nconst loaders = new Map<string, LocaleDataLoader>();\nconst cldrPromises = new Map<string, Promise<CLDRData>>();\nconst reportedErrors = new Set<string>();\nlet warningShown = false;\n\nconst M_ISO639_OLD_TO_NEW = {\n\t\"iw\": \"he\",\n\t\"ji\": \"yi\",\n\t\"in\": \"id\",\n};\n\nconst _showAssetsWarningOnce = (localeId: string) => {\n\tif (warningShown) {\n\t\treturn;\n\t}\n\n\tconsole.warn(`[LocaleData] Supported locale \"${localeId}\" not configured, import the \"Assets.js\" module from the webcomponents package you are using.`); /* eslint-disable-line */\n\n\twarningShown = true;\n};\n\nconst calcLocale = (language: string, region: string, script: string) => {\n\t// normalize language and handle special cases\n\tlanguage = (language && M_ISO639_OLD_TO_NEW[language as keyof typeof M_ISO639_OLD_TO_NEW]) || language;\n\t// Special case 1: in an SAP context, the inclusive language code \"no\" always means Norwegian Bokmal (\"nb\")\n\tif (language === \"no\") {\n\t\tlanguage = \"nb\";\n\t}\n\t// Special case 2: for Chinese, derive a default region from the script (this behavior is inherited from Java)\n\tif (language === \"zh\" && !region) {\n\t\tif (script === \"Hans\") {\n\t\t\tregion = \"CN\";\n\t\t} else if (script === \"Hant\") {\n\t\t\tregion = \"TW\";\n\t\t}\n\t}\n\n\t// Special case 3: for Serbian, there are cyrillic and latin scripts, \"sh\" and \"sr-latn\" map to \"latin\", \"sr\" maps to cyrillic.\n\tif (language === \"sh\" || (language === \"sr\" && script === \"Latn\")) {\n\t\tlanguage = \"sr\";\n\t\tregion = \"Latn\";\n\t}\n\n\t// try language + region\n\tlet localeId = `${language}_${region}`;\n\tif (SUPPORTED_LOCALES.includes(localeId)) {\n\t\tif (loaders.has(localeId)) {\n\t\t\t// supported and has loader\n\t\t\treturn localeId;\n\t\t}\n\n\t\t// supported, no loader - fallback to default and warn\n\t\t_showAssetsWarningOnce(localeId);\n\t\treturn DEFAULT_LOCALE;\n\t}\n\n\t// not supported, try language only\n\tlocaleId = language;\n\tif (SUPPORTED_LOCALES.includes(localeId)) {\n\t\tif (loaders.has(localeId)) {\n\t\t\t// supported and has loader\n\t\t\treturn localeId;\n\t\t}\n\n\t\t// supported, no loader - fallback to default and warn\n\t\t_showAssetsWarningOnce(localeId);\n\t\treturn DEFAULT_LOCALE;\n\t}\n\n\t// not supported - fallback to default locale\n\treturn DEFAULT_LOCALE;\n};\n\n// internal set data\nconst setLocaleData = (localeId: string, content: CLDRData) => {\n\tlocaleDataMap.set(localeId, content);\n};\n\n// external getSync\nconst getLocaleData = (localeId: string) => {\n\t// if there is no loader, the default fallback was fetched and a warning was given - use default locale instead\n\tif (!loaders.has(localeId)) {\n\t\tlocaleId = DEFAULT_LOCALE;\n\t}\n\n\tconst content = localeDataMap.get(localeId);\n\tif (!content) {\n\t\tthrow new Error(`CLDR data for locale ${localeId} is not loaded!`);\n\t}\n\n\treturn content;\n};\n\n// load bundle over the network once\nconst _loadCldrOnce = (localeId: string) => {\n\tif (!cldrPromises.get(localeId)) {\n\t\tconst loadCldr = loaders.get(localeId);\n\n\t\tif (!loadCldr) {\n\t\t\tthrow new Error(`CLDR data for locale ${localeId} is not loaded!`);\n\t\t}\n\n\t\tcldrPromises.set(localeId, loadCldr(localeId));\n\t}\n\n\treturn cldrPromises.get(localeId);\n};\n\n// external getAsync\nconst fetchCldr = async (language: string, region: string, script: string) => {\n\tconst localeId = calcLocale(language, region, script);\n\n\t// reuse OpenUI5 CLDR if present\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\tif (openUI5Support) {\n\t\tconst cldrContent = openUI5Support.getLocaleDataObject();\n\t\tif (cldrContent) {\n\t\t\t// only if openui5 actually returned valid content\n\t\t\tsetLocaleData(localeId, cldrContent);\n\t\t\treturn;\n\t\t}\n\t}\n\n\t// fetch it\n\ttry {\n\t\tconst cldrContent = await _loadCldrOnce(localeId);\n\t\tsetLocaleData(localeId, cldrContent as CLDRData);\n\t} catch (error: unknown) {\n\t\tconst e = error as Error;\n\t\tif (!reportedErrors.has(e.message)) {\n\t\t\treportedErrors.add(e.message);\n\t\t\tconsole.error(e.message); /* eslint-disable-line */\n\t\t}\n\t}\n};\n\nconst registerLocaleDataLoader = (localeId: string, loader: LocaleDataLoader) => {\n\tloaders.set(localeId, loader);\n};\n\n// register default loader for \"en\" from ui5 CDN (dev workflow without assets)\nregisterLocaleDataLoader(\"en\", async () => {\n\tconst cldrContent = await fetch(`https://
|
|
5
|
-
"mappings": "aAAA,OAAS,wBAAAA,MAA4B,8BACrC,OAAOC,MAAe,yBACtB,OAAS,kBAAAC,EAAgB,qBAAAC,MAAyB,kCAClD,OAAS,cAAAC,MAAkB,yBAM3B,MAAMC,EAAgB,IAAI,IACpBC,EAAU,IAAI,IACdC,EAAe,IAAI,IACnBC,EAAiB,IAAI,IAC3B,IAAIC,EAAe,GAEnB,MAAMC,EAAsB,CAC3B,GAAM,KACN,GAAM,KACN,GAAM,IACP,EAEMC,EAA0BC,GAAqB,CAChDH,IAIJ,QAAQ,KAAK,kCAAkCG,CAAQ,+FAA+F,EAEtJH,EAAe,GAChB,EAEMI,EAAa,CAACC,EAAkBC,EAAgBC,IAAmB,CAExEF,EAAYA,GAAYJ,EAAoBI,CAA4C,GAAMA,EAE1FA,IAAa,OAChBA,EAAW,MAGRA,IAAa,MAAQ,CAACC,IACrBC,IAAW,OACdD,EAAS,KACCC,IAAW,SACrBD,EAAS,QAKPD,IAAa,MAASA,IAAa,MAAQE,IAAW,UACzDF,EAAW,KACXC,EAAS,QAIV,IAAIH,EAAW,GAAGE,CAAQ,IAAIC,CAAM,GACpC,OAAIZ,EAAkB,SAASS,CAAQ,EAClCN,EAAQ,IAAIM,CAAQ,EAEhBA,GAIRD,EAAuBC,CAAQ,EACxBV,IAIRU,EAAWE,EACPX,EAAkB,SAASS,CAAQ,EAClCN,EAAQ,IAAIM,CAAQ,EAEhBA,GAIRD,EAAuBC,CAAQ,EACxBV,GAIDA,EACR,EAGMe,EAAgB,CAACL,EAAkBM,IAAsB,CAC9Db,EAAc,IAAIO,EAAUM,CAAO,CACpC,EAGMC,EAAiBP,GAAqB,CAEtCN,EAAQ,IAAIM,CAAQ,IACxBA,EAAWV,GAGZ,MAAMgB,EAAUb,EAAc,IAAIO,CAAQ,EAC1C,GAAI,CAACM,EACJ,MAAM,IAAI,MAAM,wBAAwBN,CAAQ,iBAAiB,EAGlE,OAAOM,CACR,EAGME,EAAiBR,GAAqB,CAC3C,GAAI,CAACL,EAAa,IAAIK,CAAQ,EAAG,CAChC,MAAMS,EAAWf,EAAQ,IAAIM,CAAQ,EAErC,GAAI,CAACS,EACJ,MAAM,IAAI,MAAM,wBAAwBT,CAAQ,iBAAiB,EAGlEL,EAAa,IAAIK,EAAUS,EAAST,CAAQ,CAAC,CAC9C,CAEA,OAAOL,EAAa,IAAIK,CAAQ,CACjC,EAGMU,EAAY,MAAOR,EAAkBC,EAAgBC,IAAmB,CAC7E,MAAMJ,EAAWC,EAAWC,EAAUC,EAAQC,CAAM,EAG9CO,EAAiBnB,EAAkC,gBAAgB,EACzE,GAAImB,EAAgB,CACnB,MAAMC,EAAcD,EAAe,oBAAoB,EACvD,GAAIC,EAAa,CAEhBP,EAAcL,EAAUY,CAAW,EACnC,MACD,CACD,CAGA,GAAI,CACH,MAAMA,EAAc,MAAMJ,EAAcR,CAAQ,EAChDK,EAAcL,EAAUY,CAAuB,CAChD,OAASC,EAAgB,CACxB,MAAMC,EAAID,EACLjB,EAAe,IAAIkB,EAAE,OAAO,IAChClB,EAAe,IAAIkB,EAAE,OAAO,EAC5B,QAAQ,MAAMA,EAAE,OAAO,EAEzB,CACD,EAEMC,EAA2B,CAACf,EAAkBgB,IAA6B,CAChFtB,EAAQ,IAAIM,EAAUgB,CAAM,CAC7B,EAGAD,EAAyB,KAAM,
|
|
4
|
+
"sourcesContent": ["import { attachLanguageChange } from \"../locale/languageChange.js\";\nimport getLocale from \"../locale/getLocale.js\";\nimport { DEFAULT_LOCALE, SUPPORTED_LOCALES } from \"../generated/AssetParameters.js\";\nimport { getFeature } from \"../FeaturesRegistry.js\";\nimport type OpenUI5Support from \"../features/OpenUI5Support.js\";\n\ntype LocaleDataLoader = (locale: string) => Promise<CLDRData>;\ntype CLDRData = Record<string, object | boolean | string>;\n\nconst localeDataMap = new Map<string, CLDRData>();\nconst loaders = new Map<string, LocaleDataLoader>();\nconst cldrPromises = new Map<string, Promise<CLDRData>>();\nconst reportedErrors = new Set<string>();\nlet warningShown = false;\n\nconst M_ISO639_OLD_TO_NEW = {\n\t\"iw\": \"he\",\n\t\"ji\": \"yi\",\n\t\"in\": \"id\",\n};\n\nconst _showAssetsWarningOnce = (localeId: string) => {\n\tif (warningShown) {\n\t\treturn;\n\t}\n\n\tconsole.warn(`[LocaleData] Supported locale \"${localeId}\" not configured, import the \"Assets.js\" module from the webcomponents package you are using.`); /* eslint-disable-line */\n\n\twarningShown = true;\n};\n\nconst calcLocale = (language: string, region: string, script: string) => {\n\t// normalize language and handle special cases\n\tlanguage = (language && M_ISO639_OLD_TO_NEW[language as keyof typeof M_ISO639_OLD_TO_NEW]) || language;\n\t// Special case 1: in an SAP context, the inclusive language code \"no\" always means Norwegian Bokmal (\"nb\")\n\tif (language === \"no\") {\n\t\tlanguage = \"nb\";\n\t}\n\t// Special case 2: for Chinese, derive a default region from the script (this behavior is inherited from Java)\n\tif (language === \"zh\" && !region) {\n\t\tif (script === \"Hans\") {\n\t\t\tregion = \"CN\";\n\t\t} else if (script === \"Hant\") {\n\t\t\tregion = \"TW\";\n\t\t}\n\t}\n\n\t// Special case 3: for Serbian, there are cyrillic and latin scripts, \"sh\" and \"sr-latn\" map to \"latin\", \"sr\" maps to cyrillic.\n\tif (language === \"sh\" || (language === \"sr\" && script === \"Latn\")) {\n\t\tlanguage = \"sr\";\n\t\tregion = \"Latn\";\n\t}\n\n\t// try language + region\n\tlet localeId = `${language}_${region}`;\n\tif (SUPPORTED_LOCALES.includes(localeId)) {\n\t\tif (loaders.has(localeId)) {\n\t\t\t// supported and has loader\n\t\t\treturn localeId;\n\t\t}\n\n\t\t// supported, no loader - fallback to default and warn\n\t\t_showAssetsWarningOnce(localeId);\n\t\treturn DEFAULT_LOCALE;\n\t}\n\n\t// not supported, try language only\n\tlocaleId = language;\n\tif (SUPPORTED_LOCALES.includes(localeId)) {\n\t\tif (loaders.has(localeId)) {\n\t\t\t// supported and has loader\n\t\t\treturn localeId;\n\t\t}\n\n\t\t// supported, no loader - fallback to default and warn\n\t\t_showAssetsWarningOnce(localeId);\n\t\treturn DEFAULT_LOCALE;\n\t}\n\n\t// not supported - fallback to default locale\n\treturn DEFAULT_LOCALE;\n};\n\n// internal set data\nconst setLocaleData = (localeId: string, content: CLDRData) => {\n\tlocaleDataMap.set(localeId, content);\n};\n\n// external getSync\nconst getLocaleData = (localeId: string) => {\n\t// if there is no loader, the default fallback was fetched and a warning was given - use default locale instead\n\tif (!loaders.has(localeId)) {\n\t\tlocaleId = DEFAULT_LOCALE;\n\t}\n\n\tconst content = localeDataMap.get(localeId);\n\tif (!content) {\n\t\tthrow new Error(`CLDR data for locale ${localeId} is not loaded!`);\n\t}\n\n\treturn content;\n};\n\n// load bundle over the network once\nconst _loadCldrOnce = (localeId: string) => {\n\tif (!cldrPromises.get(localeId)) {\n\t\tconst loadCldr = loaders.get(localeId);\n\n\t\tif (!loadCldr) {\n\t\t\tthrow new Error(`CLDR data for locale ${localeId} is not loaded!`);\n\t\t}\n\n\t\tcldrPromises.set(localeId, loadCldr(localeId));\n\t}\n\n\treturn cldrPromises.get(localeId);\n};\n\n// external getAsync\nconst fetchCldr = async (language: string, region: string, script: string) => {\n\tconst localeId = calcLocale(language, region, script);\n\n\t// reuse OpenUI5 CLDR if present\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\tif (openUI5Support) {\n\t\tconst cldrContent = openUI5Support.getLocaleDataObject();\n\t\tif (cldrContent) {\n\t\t\t// only if openui5 actually returned valid content\n\t\t\tsetLocaleData(localeId, cldrContent);\n\t\t\treturn;\n\t\t}\n\t}\n\n\t// fetch it\n\ttry {\n\t\tconst cldrContent = await _loadCldrOnce(localeId);\n\t\tsetLocaleData(localeId, cldrContent as CLDRData);\n\t} catch (error: unknown) {\n\t\tconst e = error as Error;\n\t\tif (!reportedErrors.has(e.message)) {\n\t\t\treportedErrors.add(e.message);\n\t\t\tconsole.error(e.message); /* eslint-disable-line */\n\t\t}\n\t}\n};\n\nconst registerLocaleDataLoader = (localeId: string, loader: LocaleDataLoader) => {\n\tloaders.set(localeId, loader);\n};\n\n// register default loader for \"en\" from ui5 CDN (dev workflow without assets)\nregisterLocaleDataLoader(\"en\", async () => {\n\tconsole.warn(`[LocaleData] Falling back to loading \"en\" locale data from CDN.`, /* eslint-disable-line */\n\t\t`For production usage, please configure locale data loading via the \"Assets.js\" module of the webcomponents package you are using.`); /* eslint-disable-line */\n\tconst cldrContent = await fetch(`https://cdn.jsdelivr.net/npm/@openui5/sap.ui.core@1.120.17/src/sap/ui/core/cldr/en.json`);\n\treturn cldrContent.json() as Promise<CLDRData>;\n});\n\n// When the language changes dynamically (the user calls setLanguage),\n// re-fetch the required CDRD data.\nattachLanguageChange(() => {\n\tconst locale = getLocale();\n\treturn fetchCldr(locale.getLanguage(), locale.getRegion(), locale.getScript());\n});\n\nexport {\n\tregisterLocaleDataLoader,\n\tfetchCldr,\n\tgetLocaleData,\n};\n\nexport type {\n\tCLDRData,\n};\n"],
|
|
5
|
+
"mappings": "aAAA,OAAS,wBAAAA,MAA4B,8BACrC,OAAOC,MAAe,yBACtB,OAAS,kBAAAC,EAAgB,qBAAAC,MAAyB,kCAClD,OAAS,cAAAC,MAAkB,yBAM3B,MAAMC,EAAgB,IAAI,IACpBC,EAAU,IAAI,IACdC,EAAe,IAAI,IACnBC,EAAiB,IAAI,IAC3B,IAAIC,EAAe,GAEnB,MAAMC,EAAsB,CAC3B,GAAM,KACN,GAAM,KACN,GAAM,IACP,EAEMC,EAA0BC,GAAqB,CAChDH,IAIJ,QAAQ,KAAK,kCAAkCG,CAAQ,+FAA+F,EAEtJH,EAAe,GAChB,EAEMI,EAAa,CAACC,EAAkBC,EAAgBC,IAAmB,CAExEF,EAAYA,GAAYJ,EAAoBI,CAA4C,GAAMA,EAE1FA,IAAa,OAChBA,EAAW,MAGRA,IAAa,MAAQ,CAACC,IACrBC,IAAW,OACdD,EAAS,KACCC,IAAW,SACrBD,EAAS,QAKPD,IAAa,MAASA,IAAa,MAAQE,IAAW,UACzDF,EAAW,KACXC,EAAS,QAIV,IAAIH,EAAW,GAAGE,CAAQ,IAAIC,CAAM,GACpC,OAAIZ,EAAkB,SAASS,CAAQ,EAClCN,EAAQ,IAAIM,CAAQ,EAEhBA,GAIRD,EAAuBC,CAAQ,EACxBV,IAIRU,EAAWE,EACPX,EAAkB,SAASS,CAAQ,EAClCN,EAAQ,IAAIM,CAAQ,EAEhBA,GAIRD,EAAuBC,CAAQ,EACxBV,GAIDA,EACR,EAGMe,EAAgB,CAACL,EAAkBM,IAAsB,CAC9Db,EAAc,IAAIO,EAAUM,CAAO,CACpC,EAGMC,EAAiBP,GAAqB,CAEtCN,EAAQ,IAAIM,CAAQ,IACxBA,EAAWV,GAGZ,MAAMgB,EAAUb,EAAc,IAAIO,CAAQ,EAC1C,GAAI,CAACM,EACJ,MAAM,IAAI,MAAM,wBAAwBN,CAAQ,iBAAiB,EAGlE,OAAOM,CACR,EAGME,EAAiBR,GAAqB,CAC3C,GAAI,CAACL,EAAa,IAAIK,CAAQ,EAAG,CAChC,MAAMS,EAAWf,EAAQ,IAAIM,CAAQ,EAErC,GAAI,CAACS,EACJ,MAAM,IAAI,MAAM,wBAAwBT,CAAQ,iBAAiB,EAGlEL,EAAa,IAAIK,EAAUS,EAAST,CAAQ,CAAC,CAC9C,CAEA,OAAOL,EAAa,IAAIK,CAAQ,CACjC,EAGMU,EAAY,MAAOR,EAAkBC,EAAgBC,IAAmB,CAC7E,MAAMJ,EAAWC,EAAWC,EAAUC,EAAQC,CAAM,EAG9CO,EAAiBnB,EAAkC,gBAAgB,EACzE,GAAImB,EAAgB,CACnB,MAAMC,EAAcD,EAAe,oBAAoB,EACvD,GAAIC,EAAa,CAEhBP,EAAcL,EAAUY,CAAW,EACnC,MACD,CACD,CAGA,GAAI,CACH,MAAMA,EAAc,MAAMJ,EAAcR,CAAQ,EAChDK,EAAcL,EAAUY,CAAuB,CAChD,OAASC,EAAgB,CACxB,MAAMC,EAAID,EACLjB,EAAe,IAAIkB,EAAE,OAAO,IAChClB,EAAe,IAAIkB,EAAE,OAAO,EAC5B,QAAQ,MAAMA,EAAE,OAAO,EAEzB,CACD,EAEMC,EAA2B,CAACf,EAAkBgB,IAA6B,CAChFtB,EAAQ,IAAIM,EAAUgB,CAAM,CAC7B,EAGAD,EAAyB,KAAM,UAC9B,QAAQ,KAAK,kEACZ,mIAAmI,GAChH,MAAM,MAAM,yFAAyF,GACtG,KAAK,EACxB,EAID3B,EAAqB,IAAM,CAC1B,MAAM6B,EAAS5B,EAAU,EACzB,OAAOqB,EAAUO,EAAO,YAAY,EAAGA,EAAO,UAAU,EAAGA,EAAO,UAAU,CAAC,CAC9E,CAAC,EAED,OACCF,KAAA,yBACAL,KAAA,UACAH,KAAA",
|
|
6
6
|
"names": ["attachLanguageChange", "getLocale", "DEFAULT_LOCALE", "SUPPORTED_LOCALES", "getFeature", "localeDataMap", "loaders", "cldrPromises", "reportedErrors", "warningShown", "M_ISO639_OLD_TO_NEW", "_showAssetsWarningOnce", "localeId", "calcLocale", "language", "region", "script", "setLocaleData", "content", "getLocaleData", "_loadCldrOnce", "loadCldr", "fetchCldr", "openUI5Support", "cldrContent", "error", "e", "registerLocaleDataLoader", "loader", "locale"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import{DEFAULT_THEME as
|
|
1
|
+
"use strict";import{DEFAULT_THEME as c}from"../generated/AssetParameters.js";import{mergeStyles as f}from"../ManagedStyles.js";import{fireThemeRegistered as y}from"../theming/ThemeRegistered.js";const l=new Map,h=new Map,u=new Map,T=new Set,i=new Set,p=(e,r,t)=>{h.set(`${e}/${r}`,t),T.add(e),i.add(r),y(r)},L=(e,r,t)=>{u.set(`${e}/${r}`,t)},m=async(e,r,t)=>{const g=`${e}_${r}_${t||""}`,s=l.get(g);if(s!==void 0)return s;if(!i.has(r)){const $=[...i.values()].join(", ");return console.warn(`You have requested a non-registered theme ${r} - falling back to ${c}. Registered themes are: ${$}`),a(e,c)}const[n,d]=await Promise.all([a(e,r),t?a(e,t,!0):void 0]),o=f(n,d);return o&&l.set(g,o),o},a=async(e,r,t=!1)=>{const s=(t?u:h).get(`${e}/${r}`);if(!s){t||console.error(`Theme [${r}] not registered for package [${e}]`);return}let n;try{n=await s(r)}catch(d){console.error(e,d.message);return}return n},w=()=>T,P=e=>i.has(e);export{p as registerThemePropertiesLoader,L as registerCustomThemePropertiesLoader,m as getThemeProperties,w as getRegisteredPackages,P as isThemeRegistered};
|
|
2
2
|
//# sourceMappingURL=Themes.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/asset-registries/Themes.ts"],
|
|
4
|
-
"sourcesContent": ["import { DEFAULT_THEME } from \"../generated/AssetParameters.js\";\nimport
|
|
5
|
-
"mappings": "aAAA,OAAS,iBAAAA,MAAqB,
|
|
4
|
+
"sourcesContent": ["import { DEFAULT_THEME } from \"../generated/AssetParameters.js\";\nimport { mergeStyles } from \"../ManagedStyles.js\";\nimport { fireThemeRegistered } from \"../theming/ThemeRegistered.js\";\n\ntype ThemeData = string;\ntype ThemeLoader = (themeName: string) => Promise<string>;\n\nconst themeStyles = new Map<string, string>();\nconst loaders = new Map<string, ThemeLoader>();\nconst customLoaders = new Map<string, ThemeLoader>();\nconst registeredPackages = new Set<string>();\nconst registeredThemes = new Set<string>();\n\nconst registerThemePropertiesLoader = (packageName: string, themeName: string, loader: ThemeLoader) => {\n\tloaders.set(`${packageName}/${themeName}`, loader);\n\tregisteredPackages.add(packageName);\n\tregisteredThemes.add(themeName);\n\tfireThemeRegistered(themeName);\n};\n\nconst registerCustomThemePropertiesLoader = (packageName: string, themeName: string, loader: ThemeLoader) => {\n\tcustomLoaders.set(`${packageName}/${themeName}`, loader);\n};\n\nconst getThemeProperties = async (packageName: string, themeName: string, externalThemeName?: string) => {\n\tconst cacheKey = `${packageName}_${themeName}_${externalThemeName || \"\"}`;\n\tconst cachedStyleData = themeStyles.get(cacheKey);\n\tif (cachedStyleData !== undefined) { // it's valid for style to be an empty string\n\t\treturn cachedStyleData;\n\t}\n\n\tif (!registeredThemes.has(themeName)) {\n\t\tconst regThemesStr = [...registeredThemes.values()].join(\", \");\n\t\tconsole.warn(`You have requested a non-registered theme ${themeName} - falling back to ${DEFAULT_THEME}. Registered themes are: ${regThemesStr}`); /* eslint-disable-line */\n\t\treturn _getThemeProperties(packageName, DEFAULT_THEME);\n\t}\n\n\tconst [style, customStyle] = await Promise.all([\n\t\t_getThemeProperties(packageName, themeName),\n\t\texternalThemeName ? _getThemeProperties(packageName, externalThemeName, true) : undefined,\n\t]);\n\n\tconst styleData = mergeStyles(style, customStyle);\n\tif (styleData) {\n\t\tthemeStyles.set(cacheKey, styleData);\n\t}\n\n\treturn styleData;\n};\n\nconst _getThemeProperties = async (packageName: string, themeName: string, forCustomTheme = false) => {\n\tconst loadersMap = forCustomTheme ? customLoaders : loaders;\n\tconst loader = loadersMap.get(`${packageName}/${themeName}`);\n\tif (!loader) {\n\t\t// no themes for package\n\t\tif (!forCustomTheme) {\n\t\t\tconsole.error(`Theme [${themeName}] not registered for package [${packageName}]`); /* eslint-disable-line */\n\t\t}\n\t\treturn;\n\t}\n\tlet data;\n\ttry {\n\t\tdata = await loader(themeName);\n\t} catch (error: unknown) {\n\t\tconst e = error as Error;\n\t\tconsole.error(packageName, e.message); /* eslint-disable-line */\n\t\treturn;\n\t}\n\n\treturn data;\n};\n\nconst getRegisteredPackages = () => {\n\treturn registeredPackages;\n};\n\nconst isThemeRegistered = (theme: string) => {\n\treturn registeredThemes.has(theme);\n};\n\nexport {\n\tregisterThemePropertiesLoader,\n\tregisterCustomThemePropertiesLoader,\n\tgetThemeProperties,\n\tgetRegisteredPackages,\n\tisThemeRegistered,\n};\n\nexport type {\n\tThemeData,\n\tThemeLoader,\n};\n"],
|
|
5
|
+
"mappings": "aAAA,OAAS,iBAAAA,MAAqB,kCAC9B,OAAS,eAAAC,MAAmB,sBAC5B,OAAS,uBAAAC,MAA2B,gCAKpC,MAAMC,EAAc,IAAI,IAClBC,EAAU,IAAI,IACdC,EAAgB,IAAI,IACpBC,EAAqB,IAAI,IACzBC,EAAmB,IAAI,IAEvBC,EAAgC,CAACC,EAAqBC,EAAmBC,IAAwB,CACtGP,EAAQ,IAAI,GAAGK,CAAW,IAAIC,CAAS,GAAIC,CAAM,EACjDL,EAAmB,IAAIG,CAAW,EAClCF,EAAiB,IAAIG,CAAS,EAC9BR,EAAoBQ,CAAS,CAC9B,EAEME,EAAsC,CAACH,EAAqBC,EAAmBC,IAAwB,CAC5GN,EAAc,IAAI,GAAGI,CAAW,IAAIC,CAAS,GAAIC,CAAM,CACxD,EAEME,EAAqB,MAAOJ,EAAqBC,EAAmBI,IAA+B,CACxG,MAAMC,EAAW,GAAGN,CAAW,IAAIC,CAAS,IAAII,GAAqB,EAAE,GACjEE,EAAkBb,EAAY,IAAIY,CAAQ,EAChD,GAAIC,IAAoB,OACvB,OAAOA,EAGR,GAAI,CAACT,EAAiB,IAAIG,CAAS,EAAG,CACrC,MAAMO,EAAe,CAAC,GAAGV,EAAiB,OAAO,CAAC,EAAE,KAAK,IAAI,EAC7D,eAAQ,KAAK,6CAA6CG,CAAS,sBAAsBV,CAAa,4BAA4BiB,CAAY,EAAE,EACzIC,EAAoBT,EAAaT,CAAa,CACtD,CAEA,KAAM,CAACmB,EAAOC,CAAW,EAAI,MAAM,QAAQ,IAAI,CAC9CF,EAAoBT,EAAaC,CAAS,EAC1CI,EAAoBI,EAAoBT,EAAaK,EAAmB,EAAI,EAAI,MACjF,CAAC,EAEKO,EAAYpB,EAAYkB,EAAOC,CAAW,EAChD,OAAIC,GACHlB,EAAY,IAAIY,EAAUM,CAAS,EAG7BA,CACR,EAEMH,EAAsB,MAAOT,EAAqBC,EAAmBY,EAAiB,KAAU,CAErG,MAAMX,GADaW,EAAiBjB,EAAgBD,GAC1B,IAAI,GAAGK,CAAW,IAAIC,CAAS,EAAE,EAC3D,GAAI,CAACC,EAAQ,CAEPW,GACJ,QAAQ,MAAM,UAAUZ,CAAS,iCAAiCD,CAAW,GAAG,EAEjF,MACD,CACA,IAAIc,EACJ,GAAI,CACHA,EAAO,MAAMZ,EAAOD,CAAS,CAC9B,OAASc,EAAgB,CAExB,QAAQ,MAAMf,EADJe,EACmB,OAAO,EACpC,MACD,CAEA,OAAOD,CACR,EAEME,EAAwB,IACtBnB,EAGFoB,EAAqBC,GACnBpB,EAAiB,IAAIoB,CAAK,EAGlC,OACCnB,KAAA,8BACAI,KAAA,oCACAC,KAAA,mBACAY,KAAA,sBACAC,KAAA",
|
|
6
6
|
"names": ["DEFAULT_THEME", "mergeStyles", "fireThemeRegistered", "themeStyles", "loaders", "customLoaders", "registeredPackages", "registeredThemes", "registerThemePropertiesLoader", "packageName", "themeName", "loader", "registerCustomThemePropertiesLoader", "getThemeProperties", "externalThemeName", "cacheKey", "cachedStyleData", "regThemesStr", "_getThemeProperties", "style", "customStyle", "styleData", "forCustomTheme", "data", "error", "getRegisteredPackages", "isThemeRegistered", "theme"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import{getAnimationMode as i}from"../InitialConfiguration.js";import t from"../types/AnimationMode.js";let
|
|
1
|
+
"use strict";import{getAnimationMode as i}from"../InitialConfiguration.js";import t from"../types/AnimationMode.js";import{attachConfigurationReset as e}from"./ConfigurationReset.js";let n;e(()=>{n=void 0});const d=()=>(n===void 0&&(n=i()),n),m=o=>{Object.values(t).includes(o)&&(n=o)};export{d as getAnimationMode,m as setAnimationMode};
|
|
2
2
|
//# sourceMappingURL=AnimationMode.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/config/AnimationMode.ts"],
|
|
4
|
-
"sourcesContent": ["import { getAnimationMode as getConfiguredAnimationMode } from \"../InitialConfiguration.js\";\nimport AnimationMode from \"../types/AnimationMode.js\";\n\nlet curAnimationMode: `${AnimationMode}
|
|
5
|
-
"mappings": "aAAA,OAAS,oBAAoBA,MAAkC,6BAC/D,OAAOC,MAAmB,
|
|
6
|
-
"names": ["getConfiguredAnimationMode", "AnimationMode", "curAnimationMode", "getAnimationMode", "setAnimationMode", "animationMode"]
|
|
4
|
+
"sourcesContent": ["import { getAnimationMode as getConfiguredAnimationMode } from \"../InitialConfiguration.js\";\nimport AnimationMode from \"../types/AnimationMode.js\";\nimport { attachConfigurationReset } from \"./ConfigurationReset.js\";\n\nlet curAnimationMode: `${AnimationMode}` | undefined;\n\nattachConfigurationReset(() => {\n\tcurAnimationMode = undefined;\n});\n\n/**\n * Returns the animation mode - \"full\", \"basic\", \"minimal\" or \"none\".\n * @public\n * @returns { AnimationMode }\n */\nconst getAnimationMode = (): `${AnimationMode}` => {\n\tif (curAnimationMode === undefined) {\n\t\tcurAnimationMode = getConfiguredAnimationMode();\n\t}\n\n\treturn curAnimationMode;\n};\n\n/**\n * Sets the animation mode - \"full\", \"basic\", \"minimal\" or \"none\".\n * @public\n * @param { AnimationMode } animationMode\n */\nconst setAnimationMode = (animationMode: `${AnimationMode}`) => {\n\tconst options: string[] = Object.values(AnimationMode);\n\tif (options.includes(animationMode)) {\n\t\tcurAnimationMode = animationMode;\n\t}\n};\n\nexport {\n\tgetAnimationMode,\n\tsetAnimationMode,\n};\n"],
|
|
5
|
+
"mappings": "aAAA,OAAS,oBAAoBA,MAAkC,6BAC/D,OAAOC,MAAmB,4BAC1B,OAAS,4BAAAC,MAAgC,0BAEzC,IAAIC,EAEJD,EAAyB,IAAM,CAC9BC,EAAmB,MACpB,CAAC,EAOD,MAAMC,EAAmB,KACpBD,IAAqB,SACxBA,EAAmBH,EAA2B,GAGxCG,GAQFE,EAAoBC,GAAsC,CACrC,OAAO,OAAOL,CAAa,EACzC,SAASK,CAAa,IACjCH,EAAmBG,EAErB,EAEA,OACCF,KAAA,iBACAC,KAAA",
|
|
6
|
+
"names": ["getConfiguredAnimationMode", "AnimationMode", "attachConfigurationReset", "curAnimationMode", "getAnimationMode", "setAnimationMode", "animationMode"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import r from"../types/CalendarType.js";import{getCalendarType as a,getSecondaryCalendarType as d}from"../InitialConfiguration.js";let n,e;const
|
|
1
|
+
"use strict";import r from"../types/CalendarType.js";import{getCalendarType as a,getSecondaryCalendarType as d}from"../InitialConfiguration.js";import{attachConfigurationReset as t}from"./ConfigurationReset.js";let n,e;t(()=>{n=void 0,e=void 0});const i=()=>(n===void 0&&(n=a()),n&&n in r?n:r.Gregorian),o=()=>(e===void 0&&(e=d()),e&&e in r,e);export{i as getCalendarType,o as getSecondaryCalendarType};
|
|
2
2
|
//# sourceMappingURL=CalendarType.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/config/CalendarType.ts"],
|
|
4
|
-
"sourcesContent": ["import CalendarType from \"../types/CalendarType.js\";\nimport {\n\tgetCalendarType as getConfiguredCalendarType,\n\tgetSecondaryCalendarType as getConfiguredSecondaryCalendarType,\n} from \"../InitialConfiguration.js\";\n\nlet calendarType: CalendarType | undefined;\nlet secondaryCalendarType: CalendarType | undefined;\n\n/**\n * Returns the configured or default calendar type.\n * @public\n * @returns { CalendarType } the effective calendar type\n */\nconst getCalendarType = (): CalendarType => {\n\tif (calendarType === undefined) {\n\t\tcalendarType = getConfiguredCalendarType();\n\t}\n\n\tif (calendarType && calendarType in CalendarType) {\n\t\treturn calendarType;\n\t}\n\n\treturn CalendarType.Gregorian;\n};\n\n/**\n * Returns the configured secondary calendar type.\n * @public\n * @returns { CalendarType | undefined } the effective calendar type\n * @since 1.18.0\n */\nconst getSecondaryCalendarType = (): CalendarType | undefined => {\n\tif (secondaryCalendarType === undefined) {\n\t\tsecondaryCalendarType = getConfiguredSecondaryCalendarType();\n\t}\n\n\tif (secondaryCalendarType && secondaryCalendarType in CalendarType) {\n\t\treturn secondaryCalendarType;\n\t}\n\n\treturn secondaryCalendarType;\n};\n\nexport {\n\tgetCalendarType,\n\tgetSecondaryCalendarType,\n};\n"],
|
|
5
|
-
"mappings": "aAAA,OAAOA,MAAkB,2BACzB,OACC,mBAAmBC,EACnB,4BAA4BC,MACtB,
|
|
6
|
-
"names": ["CalendarType", "getConfiguredCalendarType", "getConfiguredSecondaryCalendarType", "calendarType", "secondaryCalendarType", "getCalendarType", "getSecondaryCalendarType"]
|
|
4
|
+
"sourcesContent": ["import CalendarType from \"../types/CalendarType.js\";\nimport {\n\tgetCalendarType as getConfiguredCalendarType,\n\tgetSecondaryCalendarType as getConfiguredSecondaryCalendarType,\n} from \"../InitialConfiguration.js\";\nimport { attachConfigurationReset } from \"./ConfigurationReset.js\";\n\nlet calendarType: CalendarType | undefined;\nlet secondaryCalendarType: CalendarType | undefined;\n\nattachConfigurationReset(() => {\n\tcalendarType = undefined;\n\tsecondaryCalendarType = undefined;\n});\n\n/**\n * Returns the configured or default calendar type.\n * @public\n * @returns { CalendarType } the effective calendar type\n */\nconst getCalendarType = (): CalendarType => {\n\tif (calendarType === undefined) {\n\t\tcalendarType = getConfiguredCalendarType();\n\t}\n\n\tif (calendarType && calendarType in CalendarType) {\n\t\treturn calendarType;\n\t}\n\n\treturn CalendarType.Gregorian;\n};\n\n/**\n * Returns the configured secondary calendar type.\n * @public\n * @returns { CalendarType | undefined } the effective calendar type\n * @since 1.18.0\n */\nconst getSecondaryCalendarType = (): CalendarType | undefined => {\n\tif (secondaryCalendarType === undefined) {\n\t\tsecondaryCalendarType = getConfiguredSecondaryCalendarType();\n\t}\n\n\tif (secondaryCalendarType && secondaryCalendarType in CalendarType) {\n\t\treturn secondaryCalendarType;\n\t}\n\n\treturn secondaryCalendarType;\n};\n\nexport {\n\tgetCalendarType,\n\tgetSecondaryCalendarType,\n};\n"],
|
|
5
|
+
"mappings": "aAAA,OAAOA,MAAkB,2BACzB,OACC,mBAAmBC,EACnB,4BAA4BC,MACtB,6BACP,OAAS,4BAAAC,MAAgC,0BAEzC,IAAIC,EACAC,EAEJF,EAAyB,IAAM,CAC9BC,EAAe,OACfC,EAAwB,MACzB,CAAC,EAOD,MAAMC,EAAkB,KACnBF,IAAiB,SACpBA,EAAeH,EAA0B,GAGtCG,GAAgBA,KAAgBJ,EAC5BI,EAGDJ,EAAa,WASfO,EAA2B,KAC5BF,IAA0B,SAC7BA,EAAwBH,EAAmC,GAGxDG,GAAyBA,KAAyBL,EAC9CK,GAMT,OACCC,KAAA,gBACAC,KAAA",
|
|
6
|
+
"names": ["CalendarType", "getConfiguredCalendarType", "getConfiguredSecondaryCalendarType", "attachConfigurationReset", "calendarType", "secondaryCalendarType", "getCalendarType", "getSecondaryCalendarType"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/config/ConfigurationReset.ts"],
|
|
4
|
+
"sourcesContent": ["import EventProvider from \"../EventProvider.js\";\n\nconst eventProvider = new EventProvider<undefined, void>();\nconst CONFIGURATION_RESET = \"configurationReset\";\ntype ConfigurationResetCallback = () => void;\n\nconst attachConfigurationReset = (listener: ConfigurationResetCallback) => {\n\teventProvider.attachEvent(CONFIGURATION_RESET, listener);\n};\n\nconst resetConfiguration = () => {\n\teventProvider.fireEvent(CONFIGURATION_RESET, undefined);\n};\n\nexport {\n\tattachConfigurationReset,\n\tresetConfiguration,\n};\n"],
|
|
5
|
+
"mappings": "aAAA,OAAOA,MAAmB,sBAE1B,MAAMC,EAAgB,IAAID,EACpBE,EAAsB,qBAGtBC,EAA4BC,GAAyC,CAC1EH,EAAc,YAAYC,EAAqBE,CAAQ,CACxD,EAEMC,EAAqB,IAAM,CAChCJ,EAAc,UAAUC,EAAqB,MAAS,CACvD,EAEA,OACCC,KAAA,yBACAE,KAAA",
|
|
6
|
+
"names": ["EventProvider", "eventProvider", "CONFIGURATION_RESET", "attachConfigurationReset", "listener", "resetConfiguration"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";import{getDefaultFontLoading as t}from"../InitialConfiguration.js";import{attachConfigurationReset as e}from"./ConfigurationReset.js";let o;e(()=>{o=void 0});const a=()=>(o===void 0&&(o=t()),o),i=n=>{o=n};export{a as getDefaultFontLoading,i as setDefaultFontLoading};
|
|
2
|
+
//# sourceMappingURL=Fonts.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/config/Fonts.ts"],
|
|
4
|
+
"sourcesContent": ["import { getDefaultFontLoading as getConfiguredDefaultFontLoading } from \"../InitialConfiguration.js\";\nimport { attachConfigurationReset } from \"./ConfigurationReset.js\";\n\nlet defaultFontLoading: boolean | undefined;\n\nattachConfigurationReset(() => {\n\tdefaultFontLoading = undefined;\n});\n\n/**\n * Returns if the \"defaultFontLoading\" configuration is set.\n * @public\n * @returns { boolean }\n */\nconst getDefaultFontLoading = (): boolean => {\n\tif (defaultFontLoading === undefined) {\n\t\tdefaultFontLoading = getConfiguredDefaultFontLoading();\n\t}\n\n\treturn defaultFontLoading;\n};\n\n/**\n * Defines the \"defaultFontLoading\" setting.\n *\n * - When set to \"true\" (default), all used font faces are fetched over the network.\n * - When set to \"false\", default font faces are not fetched automatically and must be managed separately.\n * @public\n * @param { boolean } defaultFontLoadingData\n */\nconst setDefaultFontLoading = (defaultFontLoadingData: boolean) => {\n\tdefaultFontLoading = defaultFontLoadingData;\n};\n\nexport {\n\tgetDefaultFontLoading,\n\tsetDefaultFontLoading,\n};\n"],
|
|
5
|
+
"mappings": "aAAA,OAAS,yBAAyBA,MAAuC,6BACzE,OAAS,4BAAAC,MAAgC,0BAEzC,IAAIC,EAEJD,EAAyB,IAAM,CAC9BC,EAAqB,MACtB,CAAC,EAOD,MAAMC,EAAwB,KACzBD,IAAuB,SAC1BA,EAAqBF,EAAgC,GAG/CE,GAWFE,EAAyBC,GAAoC,CAClEH,EAAqBG,CACtB,EAEA,OACCF,KAAA,sBACAC,KAAA",
|
|
6
|
+
"names": ["getConfiguredDefaultFontLoading", "attachConfigurationReset", "defaultFontLoading", "getDefaultFontLoading", "setDefaultFontLoading", "defaultFontLoadingData"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import
|
|
1
|
+
"use strict";import t from"../features/LegacyDateFormats.js";import{getFormatSettings as a}from"../InitialConfiguration.js";import{getFeature as r}from"../FeaturesRegistry.js";import{attachConfigurationReset as o}from"./ConfigurationReset.js";let e;o(()=>{e=void 0});const n=()=>(e===void 0&&(e=a()),e.firstDayOfWeek),i=r("LegacyDateFormats"),m=i?t.getLegacyDateCalendarCustomizing:()=>[];export{n as getFirstDayOfWeek,m as getLegacyDateCalendarCustomizing};
|
|
2
2
|
//# sourceMappingURL=FormatSettings.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/config/FormatSettings.ts"],
|
|
4
|
-
"sourcesContent": ["import LegacyDateFormats from \"../features/LegacyDateFormats.js\";\nimport type { LegacyDateCalendarCustomizing } from \"../features/LegacyDateFormats.js\";\nimport { getFormatSettings } from \"../InitialConfiguration.js\";\nimport { getFeature } from \"../FeaturesRegistry.js\";\n\ntype FormatSettings = {\n\tfirstDayOfWeek?: number,\n\tlegacyDateCalendarCustomizing?: LegacyDateCalendarCustomizing,\n};\n\nlet formatSettings: FormatSettings;\n\n/**\n * Returns the first day of the week from the configured format settings or based on the current locale.\n * @public\n * @returns {Number} 0 (Sunday) through 6 (Saturday)\n */\nconst getFirstDayOfWeek = (): number | undefined => {\n\tif (formatSettings === undefined) {\n\t\tformatSettings = getFormatSettings();\n\t}\n\n\treturn formatSettings.firstDayOfWeek;\n};\n\nconst legacyDateFormats = getFeature<typeof LegacyDateFormats>(\"LegacyDateFormats\");\n\nconst getLegacyDateCalendarCustomizing = legacyDateFormats ? LegacyDateFormats.getLegacyDateCalendarCustomizing : () => { return []; };\n\nexport {\n\tgetFirstDayOfWeek,\n\tgetLegacyDateCalendarCustomizing,\n};\n\nexport type { FormatSettings };\n"],
|
|
5
|
-
"mappings": "aAAA,OAAOA,MAAuB,mCAE9B,OAAS,qBAAAC,MAAyB,6BAClC,OAAS,cAAAC,MAAkB,
|
|
6
|
-
"names": ["LegacyDateFormats", "getFormatSettings", "getFeature", "formatSettings", "getFirstDayOfWeek", "legacyDateFormats", "getLegacyDateCalendarCustomizing"]
|
|
4
|
+
"sourcesContent": ["import LegacyDateFormats from \"../features/LegacyDateFormats.js\";\nimport type { LegacyDateCalendarCustomizing } from \"../features/LegacyDateFormats.js\";\nimport { getFormatSettings } from \"../InitialConfiguration.js\";\nimport { getFeature } from \"../FeaturesRegistry.js\";\nimport { attachConfigurationReset } from \"./ConfigurationReset.js\";\n\ntype FormatSettings = {\n\tfirstDayOfWeek?: number,\n\tlegacyDateCalendarCustomizing?: LegacyDateCalendarCustomizing,\n};\n\nlet formatSettings: FormatSettings | undefined;\n\nattachConfigurationReset(() => {\n\tformatSettings = undefined;\n});\n\n/**\n * Returns the first day of the week from the configured format settings or based on the current locale.\n * @public\n * @returns {Number} 0 (Sunday) through 6 (Saturday)\n */\nconst getFirstDayOfWeek = (): number | undefined => {\n\tif (formatSettings === undefined) {\n\t\tformatSettings = getFormatSettings();\n\t}\n\n\treturn formatSettings.firstDayOfWeek;\n};\n\nconst legacyDateFormats = getFeature<typeof LegacyDateFormats>(\"LegacyDateFormats\");\n\nconst getLegacyDateCalendarCustomizing = legacyDateFormats ? LegacyDateFormats.getLegacyDateCalendarCustomizing : () => { return []; };\n\nexport {\n\tgetFirstDayOfWeek,\n\tgetLegacyDateCalendarCustomizing,\n};\n\nexport type { FormatSettings };\n"],
|
|
5
|
+
"mappings": "aAAA,OAAOA,MAAuB,mCAE9B,OAAS,qBAAAC,MAAyB,6BAClC,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,4BAAAC,MAAgC,0BAOzC,IAAIC,EAEJD,EAAyB,IAAM,CAC9BC,EAAiB,MAClB,CAAC,EAOD,MAAMC,EAAoB,KACrBD,IAAmB,SACtBA,EAAiBH,EAAkB,GAG7BG,EAAe,gBAGjBE,EAAoBJ,EAAqC,mBAAmB,EAE5EK,EAAmCD,EAAoBN,EAAkB,iCAAmC,IAAe,CAAC,EAElI,OACCK,KAAA,kBACAE,KAAA",
|
|
6
|
+
"names": ["LegacyDateFormats", "getFormatSettings", "getFeature", "attachConfigurationReset", "formatSettings", "getFirstDayOfWeek", "legacyDateFormats", "getLegacyDateCalendarCustomizing"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import{getLanguage as g,getFetchDefaultLanguage as r}from"../InitialConfiguration.js";import{fireLanguageChange as u}from"../locale/languageChange.js";import{reRenderAllUI5Elements as
|
|
1
|
+
"use strict";import{getLanguage as g,getFetchDefaultLanguage as r}from"../InitialConfiguration.js";import{fireLanguageChange as u}from"../locale/languageChange.js";import{reRenderAllUI5Elements as i}from"../Render.js";import{DEFAULT_LANGUAGE as o}from"../generated/AssetParameters.js";import{isBooted as f}from"../Boot.js";import{attachConfigurationReset as d}from"./ConfigurationReset.js";let e,t;d(()=>{e=void 0,t=void 0});let a=!1;const s=()=>a,l=()=>(e===void 0&&(e=g()),e),L=async n=>{e!==n&&(a=!0,e=n,await u(n),a=!1,f()&&await i({languageAware:!0}))},c=()=>o,m=n=>{t=n},h=()=>(t===void 0&&(t=r()),t);export{l as getLanguage,L as setLanguage,c as getDefaultLanguage,m as setFetchDefaultLanguage,h as getFetchDefaultLanguage,s as getLanguageChangePending};
|
|
2
2
|
//# sourceMappingURL=Language.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/config/Language.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n\tgetLanguage as getConfiguredLanguage,\n\tgetFetchDefaultLanguage as getConfiguredFetchDefaultLanguage,\n} from \"../InitialConfiguration.js\";\nimport { fireLanguageChange } from \"../locale/languageChange.js\";\nimport { reRenderAllUI5Elements } from \"../Render.js\";\nimport { DEFAULT_LANGUAGE } from \"../generated/AssetParameters.js\";\nimport { isBooted } from \"../Boot.js\";\n\nlet curLanguage: string | undefined;\nlet fetchDefaultLanguage: boolean;\n\n/**\n * Returns the currently configured language, or the browser language as a fallback.\n * @public\n * @returns {string}\n */\nconst getLanguage = (): string | undefined => {\n\tif (curLanguage === undefined) {\n\t\tcurLanguage = getConfiguredLanguage();\n\t}\n\treturn curLanguage;\n};\n\n/**\n * Changes the current language, re-fetches all message bundles, updates all language-aware components\n * and returns a promise that resolves when all rendering is done.\n *\n * @param {string} language\n * @public\n * @returns {Promise<void>}\n */\nconst setLanguage = async (language: string): Promise<void> => {\n\tif (curLanguage === language) {\n\t\treturn;\n\t}\n\n\tcurLanguage = language;\n\n\tif (isBooted()) {\n\t\tawait
|
|
5
|
-
"mappings": "aAAA,OACC,eAAeA,EACf,2BAA2BC,MACrB,6BACP,OAAS,sBAAAC,MAA0B,8BACnC,OAAS,0BAAAC,MAA8B,eACvC,OAAS,oBAAAC,MAAwB,kCACjC,OAAS,YAAAC,MAAgB,
|
|
6
|
-
"names": ["getConfiguredLanguage", "getConfiguredFetchDefaultLanguage", "fireLanguageChange", "reRenderAllUI5Elements", "DEFAULT_LANGUAGE", "isBooted", "curLanguage", "fetchDefaultLanguage", "getLanguage", "setLanguage", "language", "getDefaultLanguage", "setFetchDefaultLanguage", "fetchDefaultLang", "getFetchDefaultLanguage"]
|
|
4
|
+
"sourcesContent": ["import {\n\tgetLanguage as getConfiguredLanguage,\n\tgetFetchDefaultLanguage as getConfiguredFetchDefaultLanguage,\n} from \"../InitialConfiguration.js\";\nimport { fireLanguageChange } from \"../locale/languageChange.js\";\nimport { reRenderAllUI5Elements } from \"../Render.js\";\nimport { DEFAULT_LANGUAGE } from \"../generated/AssetParameters.js\";\nimport { isBooted } from \"../Boot.js\";\nimport { attachConfigurationReset } from \"./ConfigurationReset.js\";\n\nlet curLanguage: string | undefined;\nlet fetchDefaultLanguage: boolean | undefined;\n\nattachConfigurationReset(() => {\n\tcurLanguage = undefined;\n\tfetchDefaultLanguage = undefined;\n});\n\n// Flag indicating that a language change is in progress and not yet complete.\n// While this flag is true, language-aware components will not re-render.\n// These components may rely on language-specific data (e.g., CLDR, language bundles),\n// which might be unavailable during the loading phase.\n// During this phase, all re-rendering is postponed.\n// Once all necessary language data has been loaded, the language change\n// will trigger a re-render of all language-aware components.\nlet languageChangePending = false;\n\nconst getLanguageChangePending = () => languageChangePending;\n\n/**\n * Returns the currently configured language, or the browser language as a fallback.\n * @public\n * @returns {string}\n */\nconst getLanguage = (): string | undefined => {\n\tif (curLanguage === undefined) {\n\t\tcurLanguage = getConfiguredLanguage();\n\t}\n\treturn curLanguage;\n};\n\n/**\n * Changes the current language, re-fetches all message bundles, updates all language-aware components\n * and returns a promise that resolves when all rendering is done.\n *\n * @param {string} language\n * @public\n * @returns {Promise<void>}\n */\nconst setLanguage = async (language: string): Promise<void> => {\n\tif (curLanguage === language) {\n\t\treturn;\n\t}\n\n\tlanguageChangePending = true;\n\tcurLanguage = language;\n\n\tawait fireLanguageChange(language);\n\n\tlanguageChangePending = false;\n\n\tif (isBooted()) {\n\t\tawait reRenderAllUI5Elements({ languageAware: true });\n\t}\n};\n\n/**\n * Returns the default languague.\n *\n * Note: Default language might be different than the configurated one.\n *\n * @public\n * @returns {string}\n */\nconst getDefaultLanguage = (): string => {\n\treturn DEFAULT_LANGUAGE;\n};\n\n/**\n * Defines if the default language, that is inlined, should be\n * fetched over the network instead of using the inlined one.\n * **Note:** By default the language will not be fetched.\n *\n * @public\n * @param {boolean} fetchDefaultLang\n */\nconst setFetchDefaultLanguage = (fetchDefaultLang: boolean) => {\n\tfetchDefaultLanguage = fetchDefaultLang;\n};\n\n/**\n * Returns if the default language, that is inlined, should be fetched over the network.\n * @public\n * @returns {boolean}\n */\nconst getFetchDefaultLanguage = (): boolean => {\n\tif (fetchDefaultLanguage === undefined) {\n\t\tfetchDefaultLanguage = getConfiguredFetchDefaultLanguage();\n\t}\n\n\treturn fetchDefaultLanguage;\n};\n\nexport {\n\tgetLanguage,\n\tsetLanguage,\n\tgetDefaultLanguage,\n\tsetFetchDefaultLanguage,\n\tgetFetchDefaultLanguage,\n\tgetLanguageChangePending,\n};\n"],
|
|
5
|
+
"mappings": "aAAA,OACC,eAAeA,EACf,2BAA2BC,MACrB,6BACP,OAAS,sBAAAC,MAA0B,8BACnC,OAAS,0BAAAC,MAA8B,eACvC,OAAS,oBAAAC,MAAwB,kCACjC,OAAS,YAAAC,MAAgB,aACzB,OAAS,4BAAAC,MAAgC,0BAEzC,IAAIC,EACAC,EAEJF,EAAyB,IAAM,CAC9BC,EAAc,OACdC,EAAuB,MACxB,CAAC,EASD,IAAIC,EAAwB,GAE5B,MAAMC,EAA2B,IAAMD,EAOjCE,EAAc,KACfJ,IAAgB,SACnBA,EAAcP,EAAsB,GAE9BO,GAWFK,EAAc,MAAOC,GAAoC,CAC1DN,IAAgBM,IAIpBJ,EAAwB,GACxBF,EAAcM,EAEd,MAAMX,EAAmBW,CAAQ,EAEjCJ,EAAwB,GAEpBJ,EAAS,GACZ,MAAMF,EAAuB,CAAE,cAAe,EAAK,CAAC,EAEtD,EAUMW,EAAqB,IACnBV,EAWFW,EAA2BC,GAA8B,CAC9DR,EAAuBQ,CACxB,EAOMC,EAA0B,KAC3BT,IAAyB,SAC5BA,EAAuBP,EAAkC,GAGnDO,GAGR,OACCG,KAAA,YACAC,KAAA,YACAE,KAAA,mBACAC,KAAA,wBACAE,KAAA,wBACAP,KAAA",
|
|
6
|
+
"names": ["getConfiguredLanguage", "getConfiguredFetchDefaultLanguage", "fireLanguageChange", "reRenderAllUI5Elements", "DEFAULT_LANGUAGE", "isBooted", "attachConfigurationReset", "curLanguage", "fetchDefaultLanguage", "languageChangePending", "getLanguageChangePending", "getLanguage", "setLanguage", "language", "getDefaultLanguage", "setFetchDefaultLanguage", "fetchDefaultLang", "getFetchDefaultLanguage"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import{getNoConflict as i}from"../InitialConfiguration.js";const
|
|
1
|
+
"use strict";import{getNoConflict as i}from"../InitialConfiguration.js";import{attachConfigurationReset as r}from"./ConfigurationReset.js";const c=["value-changed","click"];let e;r(()=>{e=void 0});const s=t=>c.includes(t),l=t=>{const n=o();return!(typeof n!="boolean"&&n.events&&n.events.includes&&n.events.includes(t))},o=()=>(e===void 0&&(e=i()),e),f=t=>{e=t},a=t=>{const n=o();return s(t)?!1:n===!0?!0:!l(t)};export{o as getNoConflict,f as setNoConflict,a as skipOriginalEvent};
|
|
2
2
|
//# sourceMappingURL=NoConflict.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/config/NoConflict.ts"],
|
|
4
|
-
"sourcesContent": ["import { getNoConflict as getConfiguredNoConflict } from \"../InitialConfiguration.js\";\n\n// Fire these events even with noConflict: true\nconst excludeList = [\n\t\"value-changed\",\n\t\"click\",\n];\n\ntype NoConflictData = boolean | { events: Array<string>};\n\nlet noConflict: NoConflictData;\n\nconst shouldFireOriginalEvent = (eventName: string) => {\n\treturn excludeList.includes(eventName);\n};\n\nconst shouldNotFireOriginalEvent = (eventName: string) => {\n\tconst nc = getNoConflict();\n\t// return !(nc.events && nc.events.includes && nc.events.includes(eventName));\n\treturn !(typeof nc !== \"boolean\" && nc.events && nc.events.includes && nc.events.includes(eventName));\n};\n\n/**\n * Returns if the \"noConflict\" configuration is set.\n * @public\n * @returns { NoConflictData }\n */\nconst getNoConflict = (): NoConflictData => {\n\tif (noConflict === undefined) {\n\t\tnoConflict = getConfiguredNoConflict();\n\t}\n\n\treturn noConflict;\n};\n\n/**\n * Sets the \"noConflict\" mode.\n * - When \"false\" (default value), all custom events are fired with and without the \"ui5-\" prefix.\n * - When \"true\", all custom events are fired with the \"ui5-\" prefix only.\n * - When an object is supplied, just the specified events will be fired with the \"ui5-\" prefix.\n * @public\n * @param { NoConflictData } noConflictData\n */\nconst setNoConflict = (noConflictData: NoConflictData) => {\n\tnoConflict = noConflictData;\n};\n\nconst skipOriginalEvent = (eventName: string) => {\n\tconst nc = getNoConflict();\n\n\t// Always fire these events\n\tif (shouldFireOriginalEvent(eventName)) {\n\t\treturn false;\n\t}\n\n\t// Read from the configuration\n\tif (nc === true) {\n\t\treturn true;\n\t}\n\n\treturn !shouldNotFireOriginalEvent(eventName);\n};\n\nexport {\n\tgetNoConflict,\n\tsetNoConflict,\n\tskipOriginalEvent,\n};\n"],
|
|
5
|
-
"mappings": "aAAA,OAAS,iBAAiBA,MAA+B,
|
|
6
|
-
"names": ["getConfiguredNoConflict", "excludeList", "noConflict", "shouldFireOriginalEvent", "eventName", "shouldNotFireOriginalEvent", "nc", "getNoConflict", "setNoConflict", "noConflictData", "skipOriginalEvent"]
|
|
4
|
+
"sourcesContent": ["import { getNoConflict as getConfiguredNoConflict } from \"../InitialConfiguration.js\";\nimport { attachConfigurationReset } from \"./ConfigurationReset.js\";\n\n// Fire these events even with noConflict: true\nconst excludeList = [\n\t\"value-changed\",\n\t\"click\",\n];\n\ntype NoConflictData = boolean | { events: Array<string>};\n\nlet noConflict: NoConflictData | undefined;\n\nattachConfigurationReset(() => {\n\tnoConflict = undefined;\n});\n\nconst shouldFireOriginalEvent = (eventName: string) => {\n\treturn excludeList.includes(eventName);\n};\n\nconst shouldNotFireOriginalEvent = (eventName: string) => {\n\tconst nc = getNoConflict();\n\t// return !(nc.events && nc.events.includes && nc.events.includes(eventName));\n\treturn !(typeof nc !== \"boolean\" && nc.events && nc.events.includes && nc.events.includes(eventName));\n};\n\n/**\n * Returns if the \"noConflict\" configuration is set.\n * @public\n * @returns { NoConflictData }\n */\nconst getNoConflict = (): NoConflictData => {\n\tif (noConflict === undefined) {\n\t\tnoConflict = getConfiguredNoConflict();\n\t}\n\n\treturn noConflict;\n};\n\n/**\n * Sets the \"noConflict\" mode.\n * - When \"false\" (default value), all custom events are fired with and without the \"ui5-\" prefix.\n * - When \"true\", all custom events are fired with the \"ui5-\" prefix only.\n * - When an object is supplied, just the specified events will be fired with the \"ui5-\" prefix.\n * @public\n * @param { NoConflictData } noConflictData\n */\nconst setNoConflict = (noConflictData: NoConflictData) => {\n\tnoConflict = noConflictData;\n};\n\nconst skipOriginalEvent = (eventName: string) => {\n\tconst nc = getNoConflict();\n\n\t// Always fire these events\n\tif (shouldFireOriginalEvent(eventName)) {\n\t\treturn false;\n\t}\n\n\t// Read from the configuration\n\tif (nc === true) {\n\t\treturn true;\n\t}\n\n\treturn !shouldNotFireOriginalEvent(eventName);\n};\n\nexport {\n\tgetNoConflict,\n\tsetNoConflict,\n\tskipOriginalEvent,\n};\n"],
|
|
5
|
+
"mappings": "aAAA,OAAS,iBAAiBA,MAA+B,6BACzD,OAAS,4BAAAC,MAAgC,0BAGzC,MAAMC,EAAc,CACnB,gBACA,OACD,EAIA,IAAIC,EAEJF,EAAyB,IAAM,CAC9BE,EAAa,MACd,CAAC,EAED,MAAMC,EAA2BC,GACzBH,EAAY,SAASG,CAAS,EAGhCC,EAA8BD,GAAsB,CACzD,MAAME,EAAKC,EAAc,EAEzB,MAAO,EAAE,OAAOD,GAAO,WAAaA,EAAG,QAAUA,EAAG,OAAO,UAAYA,EAAG,OAAO,SAASF,CAAS,EACpG,EAOMG,EAAgB,KACjBL,IAAe,SAClBA,EAAaH,EAAwB,GAG/BG,GAWFM,EAAiBC,GAAmC,CACzDP,EAAaO,CACd,EAEMC,EAAqBN,GAAsB,CAChD,MAAME,EAAKC,EAAc,EAGzB,OAAIJ,EAAwBC,CAAS,EAC7B,GAIJE,IAAO,GACH,GAGD,CAACD,EAA2BD,CAAS,CAC7C,EAEA,OACCG,KAAA,cACAC,KAAA,cACAE,KAAA",
|
|
6
|
+
"names": ["getConfiguredNoConflict", "attachConfigurationReset", "excludeList", "noConflict", "shouldFireOriginalEvent", "eventName", "shouldNotFireOriginalEvent", "nc", "getNoConflict", "setNoConflict", "noConflictData", "skipOriginalEvent"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import{getTheme as
|
|
1
|
+
"use strict";import{getTheme as i}from"../InitialConfiguration.js";import{reRenderAllUI5Elements as o}from"../Render.js";import s from"../theming/applyTheme.js";import m from"../theming/getThemeDesignerTheme.js";import{DEFAULT_THEME as a,SUPPORTED_THEMES as h}from"../generated/AssetParameters.js";import{boot as T,isBooted as c}from"../Boot.js";import{attachConfigurationReset as f}from"./ConfigurationReset.js";let t;f(()=>{t=void 0});const r=()=>(t===void 0&&(t=i()),t),u=async e=>{t!==e&&(t=e,c()&&(await s(t),await o({themeAware:!0})))},g=()=>a,p=e=>r()===e,n=()=>{const e=r();return l(e)?!e.startsWith("sap_horizon"):!m()?.baseThemeName?.startsWith("sap_horizon")},d=async()=>(await T(),n()),l=e=>h.includes(e);export{r as getTheme,u as setTheme,p as isTheme,n as isLegacyThemeFamily,d as isLegacyThemeFamilyAsync,g as getDefaultTheme};
|
|
2
2
|
//# sourceMappingURL=Theme.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/config/Theme.ts"],
|
|
4
|
-
"sourcesContent": ["import { getTheme as getConfiguredTheme } from \"../InitialConfiguration.js\";\nimport { reRenderAllUI5Elements } from \"../Render.js\";\nimport applyTheme from \"../theming/applyTheme.js\";\nimport getThemeDesignerTheme from \"../theming/getThemeDesignerTheme.js\";\nimport { DEFAULT_THEME, SUPPORTED_THEMES } from \"../generated/AssetParameters.js\";\nimport { boot, isBooted } from \"../Boot.js\";\n\nlet curTheme: string;\n\n/**\n * Returns the current theme.\n * @public\n * @returns {string} the current theme name\n */\nconst getTheme = (): string => {\n\tif (curTheme === undefined) {\n\t\tcurTheme = getConfiguredTheme();\n\t}\n\n\treturn curTheme;\n};\n\n/**\n * Applies a new theme after fetching its assets from the network.\n * @public\n * @param {string} theme the name of the new theme\n * @returns {Promise<void>} a promise that is resolved when the new theme assets have been fetched and applied to the DOM\n */\nconst setTheme = async (theme: string): Promise<void> => {\n\tif (curTheme === theme) {\n\t\treturn;\n\t}\n\n\tcurTheme = theme;\n\n\tif (isBooted()) {\n\t\t// Update CSS Custom Properties\n\t\tawait applyTheme(curTheme);\n\t\tawait reRenderAllUI5Elements({ themeAware: true });\n\t}\n};\n\n/**\n * Returns the default theme.\n *\n * Note: Default theme might be different than the configurated one.\n *\n * @public\n * @returns {string}\n */\nconst getDefaultTheme = (): string => {\n\treturn DEFAULT_THEME;\n};\n\n/**\n * Returns if the given theme name is the one currently applied.\n * @private\n * @param {string} theme\n * @returns {boolean}\n */\nconst isTheme = (theme: string) => {\n\
|
|
5
|
-
"mappings": "aAAA,OAAS,YAAYA,MAA0B,6BAC/C,OAAS,0BAAAC,MAA8B,eACvC,OAAOC,MAAgB,2BACvB,OAAOC,MAA2B,sCAClC,OAAS,iBAAAC,EAAe,oBAAAC,MAAwB,kCAChD,OAAS,QAAAC,EAAM,YAAAC,MAAgB,
|
|
6
|
-
"names": ["getConfiguredTheme", "reRenderAllUI5Elements", "applyTheme", "getThemeDesignerTheme", "DEFAULT_THEME", "SUPPORTED_THEMES", "boot", "isBooted", "curTheme", "getTheme", "setTheme", "theme", "getDefaultTheme", "isTheme", "
|
|
4
|
+
"sourcesContent": ["import { getTheme as getConfiguredTheme } from \"../InitialConfiguration.js\";\nimport { reRenderAllUI5Elements } from \"../Render.js\";\nimport applyTheme from \"../theming/applyTheme.js\";\nimport getThemeDesignerTheme from \"../theming/getThemeDesignerTheme.js\";\nimport { DEFAULT_THEME, SUPPORTED_THEMES } from \"../generated/AssetParameters.js\";\nimport { boot, isBooted } from \"../Boot.js\";\nimport { attachConfigurationReset } from \"./ConfigurationReset.js\";\n\nlet curTheme: string | undefined;\n\nattachConfigurationReset(() => {\n\tcurTheme = undefined;\n});\n\n/**\n * Returns the current theme.\n * @public\n * @returns {string} the current theme name\n */\nconst getTheme = (): string => {\n\tif (curTheme === undefined) {\n\t\tcurTheme = getConfiguredTheme();\n\t}\n\n\treturn curTheme;\n};\n\n/**\n * Applies a new theme after fetching its assets from the network.\n * @public\n * @param {string} theme the name of the new theme\n * @returns {Promise<void>} a promise that is resolved when the new theme assets have been fetched and applied to the DOM\n */\nconst setTheme = async (theme: string): Promise<void> => {\n\tif (curTheme === theme) {\n\t\treturn;\n\t}\n\n\tcurTheme = theme;\n\n\tif (isBooted()) {\n\t\t// Update CSS Custom Properties\n\t\tawait applyTheme(curTheme);\n\t\tawait reRenderAllUI5Elements({ themeAware: true });\n\t}\n};\n\n/**\n * Returns the default theme.\n *\n * Note: Default theme might be different than the configurated one.\n *\n * @public\n * @returns {string}\n */\nconst getDefaultTheme = (): string => {\n\treturn DEFAULT_THEME;\n};\n\n/**\n * Returns if the given theme name is the one currently applied.\n * @private\n * @param {string} theme\n * @returns {boolean}\n */\nconst isTheme = (theme: string) => {\n\treturn getTheme() === theme;\n};\n\n/**\n * Returns if the currently set theme is part of legacy theme families (\"sap_fiori_3\").\n * **Note**: in addition, the method checks the base theme of a custom theme, built via the ThemeDesigner.\n *\n * @private\n * @returns { boolean }\n */\nconst isLegacyThemeFamily = () => {\n\tconst currentTheme = getTheme();\n\n\tif (!isKnownTheme(currentTheme)) {\n\t\treturn !getThemeDesignerTheme()?.baseThemeName?.startsWith(\"sap_horizon\");\n\t}\n\n\treturn !currentTheme.startsWith(\"sap_horizon\");\n};\n\nconst isLegacyThemeFamilyAsync = async () => {\n\tawait boot();\n\treturn isLegacyThemeFamily();\n};\n\nconst isKnownTheme = (theme: string) => SUPPORTED_THEMES.includes(theme);\n\nexport {\n\tgetTheme,\n\tsetTheme,\n\tisTheme,\n\tisLegacyThemeFamily,\n\tisLegacyThemeFamilyAsync,\n\tgetDefaultTheme,\n};\n"],
|
|
5
|
+
"mappings": "aAAA,OAAS,YAAYA,MAA0B,6BAC/C,OAAS,0BAAAC,MAA8B,eACvC,OAAOC,MAAgB,2BACvB,OAAOC,MAA2B,sCAClC,OAAS,iBAAAC,EAAe,oBAAAC,MAAwB,kCAChD,OAAS,QAAAC,EAAM,YAAAC,MAAgB,aAC/B,OAAS,4BAAAC,MAAgC,0BAEzC,IAAIC,EAEJD,EAAyB,IAAM,CAC9BC,EAAW,MACZ,CAAC,EAOD,MAAMC,EAAW,KACZD,IAAa,SAChBA,EAAWT,EAAmB,GAGxBS,GASFE,EAAW,MAAOC,GAAiC,CACpDH,IAAaG,IAIjBH,EAAWG,EAEPL,EAAS,IAEZ,MAAML,EAAWO,CAAQ,EACzB,MAAMR,EAAuB,CAAE,WAAY,EAAK,CAAC,GAEnD,EAUMY,EAAkB,IAChBT,EASFU,EAAWF,GACTF,EAAS,IAAME,EAUjBG,EAAsB,IAAM,CACjC,MAAMC,EAAeN,EAAS,EAE9B,OAAKO,EAAaD,CAAY,EAIvB,CAACA,EAAa,WAAW,aAAa,EAHrC,CAACb,EAAsB,GAAG,eAAe,WAAW,aAAa,CAI1E,EAEMe,EAA2B,UAChC,MAAMZ,EAAK,EACJS,EAAoB,GAGtBE,EAAgBL,GAAkBP,EAAiB,SAASO,CAAK,EAEvE,OACCF,KAAA,SACAC,KAAA,SACAG,KAAA,QACAC,KAAA,oBACAG,KAAA,yBACAL,KAAA",
|
|
6
|
+
"names": ["getConfiguredTheme", "reRenderAllUI5Elements", "applyTheme", "getThemeDesignerTheme", "DEFAULT_THEME", "SUPPORTED_THEMES", "boot", "isBooted", "attachConfigurationReset", "curTheme", "getTheme", "setTheme", "theme", "getDefaultTheme", "isTheme", "isLegacyThemeFamily", "currentTheme", "isKnownTheme", "isLegacyThemeFamilyAsync"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import r from"../util/createLinkInHead.js";import s from"../validateThemeRoot.js";import{getThemeRoot as
|
|
1
|
+
"use strict";import r from"../util/createLinkInHead.js";import s from"../validateThemeRoot.js";import{getThemeRoot as a}from"../InitialConfiguration.js";import{getTheme as m}from"./Theme.js";import{attachConfigurationReset as d}from"./ConfigurationReset.js";let t;d(()=>{t=void 0});const n=()=>(t===void 0&&(t=a()),t),c=e=>{if(t!==e){if(t=e,!s(e)){console.warn(`The ${e} is not valid. Check the allowed origins as suggested in the "setThemeRoot" description.`);return}return i(m())}},u=e=>`${n()}Base/baseLib/${e}/css_variables.css`,i=async e=>{const o=document.querySelector(`[sap-ui-webcomponents-theme="${e}"]`);o&&document.head.removeChild(o),await r(u(e),{"sap-ui-webcomponents-theme":e})};export{n as getThemeRoot,c as setThemeRoot,i as attachCustomThemeStylesToHead};
|
|
2
2
|
//# sourceMappingURL=ThemeRoot.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/config/ThemeRoot.ts"],
|
|
4
|
-
"sourcesContent": ["import createLinkInHead from \"../util/createLinkInHead.js\";\nimport validateThemeRoot from \"../validateThemeRoot.js\";\nimport { getThemeRoot as getConfiguredThemeRoot } from \"../InitialConfiguration.js\";\nimport { getTheme } from \"./Theme.js\";\n\nlet currThemeRoot: string | undefined;\n\n/**\n * Returns the current theme root.\n *\n * @public\n * @since 1.14.0\n * @returns { string } the current theme root\n */\nconst getThemeRoot = (): string | undefined => {\n\tif (currThemeRoot === undefined) {\n\t\tcurrThemeRoot = getConfiguredThemeRoot();\n\t}\n\n\treturn currThemeRoot;\n};\n\n/**\n * Sets theme root for the current theme.\n * When set, the framework will validate the theme root and fetch the theme styles (CSS variables) from this location.\n *\n * **Note:** The feature is specific to custom themes, created with the `UI Theme Designer`.\n * The provided theme root is used only as a base to construct the actual location of the theme styles: `{themeRoot}/.../css_variables.css`.\n *\n * **Note:** Certain security restrictions will apply before fetching the theme assets.\n * Absolute URLs to a different origin than the current page will result in using the current page as an origin.\n * To allow specific origins
|
|
5
|
-
"mappings": "aAAA,OAAOA,MAAsB,8BAC7B,OAAOC,MAAuB,0BAC9B,OAAS,gBAAgBC,MAA8B,6BACvD,OAAS,YAAAC,MAAgB,
|
|
6
|
-
"names": ["createLinkInHead", "validateThemeRoot", "getConfiguredThemeRoot", "getTheme", "currThemeRoot", "getThemeRoot", "setThemeRoot", "themeRoot", "attachCustomThemeStylesToHead", "formatThemeLink", "theme", "link"]
|
|
4
|
+
"sourcesContent": ["import createLinkInHead from \"../util/createLinkInHead.js\";\nimport validateThemeRoot from \"../validateThemeRoot.js\";\nimport { getThemeRoot as getConfiguredThemeRoot } from \"../InitialConfiguration.js\";\nimport { getTheme } from \"./Theme.js\";\nimport { attachConfigurationReset } from \"./ConfigurationReset.js\";\n\nlet currThemeRoot: string | undefined;\n\nattachConfigurationReset(() => {\n\tcurrThemeRoot = undefined;\n});\n\n/**\n * Returns the current theme root.\n *\n * @public\n * @since 1.14.0\n * @returns { string } the current theme root\n */\nconst getThemeRoot = (): string | undefined => {\n\tif (currThemeRoot === undefined) {\n\t\tcurrThemeRoot = getConfiguredThemeRoot();\n\t}\n\n\treturn currThemeRoot;\n};\n\n/**\n * Sets theme root for the current theme.\n * When set, the framework will validate the theme root and fetch the theme styles (CSS variables) from this location.\n *\n * **Note:** The feature is specific to custom themes, created with the `UI Theme Designer`.\n * The provided theme root is used only as a base to construct the actual location of the theme styles: `{themeRoot}/.../css_variables.css`.\n *\n * **Note:** Certain security restrictions will apply before fetching the theme assets.\n * Absolute URLs to a different origin than the current page will result in using the current page as an origin.\n *\n * **Important:** To use this feature you must explicitly allow specific origins by using <meta name=\"sap-allowed-theme-origins\" content=\"https://my-example-host.com/\"> tag inside the <head> of the page.\n * Failing to do so will result in a warning in the console and the theme root will not be set.\n *\n * @public\n * @since 1.14.0\n * @param { string } themeRoot the new theme root\n * @returns { Promise<void> }\n */\nconst setThemeRoot = (themeRoot: string): Promise<void> | undefined => {\n\tif (currThemeRoot === themeRoot) {\n\t\treturn;\n\t}\n\n\tcurrThemeRoot = themeRoot;\n\n\tif (!validateThemeRoot(themeRoot)) {\n\t\tconsole.warn(`The ${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 attachCustomThemeStylesToHead(getTheme());\n};\n\nconst formatThemeLink = (theme: string) => {\n\treturn `${getThemeRoot()!}Base/baseLib/${theme}/css_variables.css`; // theme root is always set at this point.\n};\n\nconst attachCustomThemeStylesToHead = async (theme: string): Promise<void> => {\n\tconst link = document.querySelector(`[sap-ui-webcomponents-theme=\"${theme}\"]`);\n\n\tif (link) {\n\t\tdocument.head.removeChild(link);\n\t}\n\n\tawait createLinkInHead(formatThemeLink(theme), { \"sap-ui-webcomponents-theme\": theme });\n};\n\nexport {\n\tgetThemeRoot,\n\tsetThemeRoot,\n\tattachCustomThemeStylesToHead,\n};\n"],
|
|
5
|
+
"mappings": "aAAA,OAAOA,MAAsB,8BAC7B,OAAOC,MAAuB,0BAC9B,OAAS,gBAAgBC,MAA8B,6BACvD,OAAS,YAAAC,MAAgB,aACzB,OAAS,4BAAAC,MAAgC,0BAEzC,IAAIC,EAEJD,EAAyB,IAAM,CAC9BC,EAAgB,MACjB,CAAC,EASD,MAAMC,EAAe,KAChBD,IAAkB,SACrBA,EAAgBH,EAAuB,GAGjCG,GAqBFE,EAAgBC,GAAiD,CACtE,GAAIH,IAAkBG,EAMtB,IAFAH,EAAgBG,EAEZ,CAACP,EAAkBO,CAAS,EAAG,CAClC,QAAQ,KAAK,OAAOA,CAAS,0FAA0F,EACvH,MACD,CAEA,OAAOC,EAA8BN,EAAS,CAAC,EAChD,EAEMO,EAAmBC,GACjB,GAAGL,EAAa,CAAE,gBAAgBK,CAAK,qBAGzCF,EAAgC,MAAOE,GAAiC,CAC7E,MAAMC,EAAO,SAAS,cAAc,gCAAgCD,CAAK,IAAI,EAEzEC,GACH,SAAS,KAAK,YAAYA,CAAI,EAG/B,MAAMZ,EAAiBU,EAAgBC,CAAK,EAAG,CAAE,6BAA8BA,CAAM,CAAC,CACvF,EAEA,OACCL,KAAA,aACAC,KAAA,aACAE,KAAA",
|
|
6
|
+
"names": ["createLinkInHead", "validateThemeRoot", "getConfiguredThemeRoot", "getTheme", "attachConfigurationReset", "currThemeRoot", "getThemeRoot", "setThemeRoot", "themeRoot", "attachCustomThemeStylesToHead", "formatThemeLink", "theme", "link"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import{getTimezone as i}from"../InitialConfiguration.js";let e;const r=()=>(e===void 0&&(e=i()),e),
|
|
1
|
+
"use strict";import{getTimezone as i}from"../InitialConfiguration.js";import{attachConfigurationReset as t}from"./ConfigurationReset.js";let e;t(()=>{e=void 0});const r=()=>(e===void 0&&(e=i()),e),o=n=>{e!==n&&(e=n)};export{r as getTimezone,o as setTimezone};
|
|
2
2
|
//# sourceMappingURL=Timezone.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/config/Timezone.ts"],
|
|
4
|
-
"sourcesContent": ["import { getTimezone as getConfiguredTimezone } from \"../InitialConfiguration.js\";\n\nlet currTimezone: string | undefined;\n\n/**\n * Returns the configured IANA timezone ID.\n *\n * @private\n * @returns {string}\n */\nconst getTimezone = (): string | undefined => {\n\tif (currTimezone === undefined) {\n\t\tcurrTimezone = getConfiguredTimezone();\n\t}\n\treturn currTimezone;\n};\n\n/**\n * Sets the IANA timezone ID.\n * **For example:** \"America/New_York\", \"Europe/London\", \"Australia/Sydney\", \"Asia/Bishkek\", etc.\n *>\n * @param {string} timezone\n * @private\n * @returns { Promise<void> }\n */\nconst setTimezone = (timezone: string) => {\n\tif (currTimezone === timezone) {\n\t\treturn;\n\t}\n\n\tcurrTimezone = timezone;\n};\n\nexport {\n\tgetTimezone,\n\tsetTimezone,\n};\n"],
|
|
5
|
-
"mappings": "aAAA,OAAS,eAAeA,MAA6B,
|
|
6
|
-
"names": ["getConfiguredTimezone", "currTimezone", "getTimezone", "setTimezone", "timezone"]
|
|
4
|
+
"sourcesContent": ["import { getTimezone as getConfiguredTimezone } from \"../InitialConfiguration.js\";\nimport { attachConfigurationReset } from \"./ConfigurationReset.js\";\n\nlet currTimezone: string | undefined;\n\nattachConfigurationReset(() => {\n\tcurrTimezone = undefined;\n});\n\n/**\n * Returns the configured IANA timezone ID.\n *\n * @private\n * @returns {string}\n */\nconst getTimezone = (): string | undefined => {\n\tif (currTimezone === undefined) {\n\t\tcurrTimezone = getConfiguredTimezone();\n\t}\n\treturn currTimezone;\n};\n\n/**\n * Sets the IANA timezone ID.\n * **For example:** \"America/New_York\", \"Europe/London\", \"Australia/Sydney\", \"Asia/Bishkek\", etc.\n *>\n * @param {string} timezone\n * @private\n * @returns { Promise<void> }\n */\nconst setTimezone = (timezone: string) => {\n\tif (currTimezone === timezone) {\n\t\treturn;\n\t}\n\n\tcurrTimezone = timezone;\n};\n\nexport {\n\tgetTimezone,\n\tsetTimezone,\n};\n"],
|
|
5
|
+
"mappings": "aAAA,OAAS,eAAeA,MAA6B,6BACrD,OAAS,4BAAAC,MAAgC,0BAEzC,IAAIC,EAEJD,EAAyB,IAAM,CAC9BC,EAAe,MAChB,CAAC,EAQD,MAAMC,EAAc,KACfD,IAAiB,SACpBA,EAAeF,EAAsB,GAE/BE,GAWFE,EAAeC,GAAqB,CACrCH,IAAiBG,IAIrBH,EAAeG,EAChB,EAEA,OACCF,KAAA,YACAC,KAAA",
|
|
6
|
+
"names": ["getConfiguredTimezone", "attachConfigurationReset", "currTimezone", "getTimezone", "setTimezone", "timezone"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/config/Tooltips.ts"],
|
|
4
|
+
"sourcesContent": ["import { getEnableDefaultTooltips as getConfiguredEnableDefaultTooltips } from \"../InitialConfiguration.js\";\n\nlet _enableDefaultTooltips: boolean;\n\n/**\n * Returns if the \"enableDefaultTooltips\" configuration is set.\n * @public\n * @since 2.1.0\n * @returns { boolean }\n */\nconst getEnableDefaultTooltips = (): boolean => {\n\tif (_enableDefaultTooltips === undefined) {\n\t\t_enableDefaultTooltips = getConfiguredEnableDefaultTooltips();\n\t}\n\n\treturn _enableDefaultTooltips;\n};\n\n/**\n * Defines the \"enableDefaultTooltips\" setting.\n *\n * - When set to \"true\" (default), the components will display default tooltips.\n * - When set to \"false\", the components will NOT display default tooltips.\n *\n * @public\n * @since 2.1.0\n * @param { boolean } enableDefaultTooltips\n */\nconst setEnableDefaultTooltips = (enableDefaultTooltips: boolean) => {\n\t_enableDefaultTooltips = enableDefaultTooltips;\n};\n\nexport {\n\tgetEnableDefaultTooltips,\n\tsetEnableDefaultTooltips,\n};\n"],
|
|
5
|
+
"mappings": "aAAA,OAAS,4BAA4BA,MAA0C,6BAE/E,IAAIC,EAQJ,MAAMC,EAA2B,KAC5BD,IAA2B,SAC9BA,EAAyBD,EAAmC,GAGtDC,GAaFE,EAA4BC,GAAmC,CACpEH,EAAyBG,CAC1B,EAEA,OACCF,KAAA,yBACAC,KAAA",
|
|
6
|
+
"names": ["getConfiguredEnableDefaultTooltips", "_enableDefaultTooltips", "getEnableDefaultTooltips", "setEnableDefaultTooltips", "enableDefaultTooltips"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import{renderDeferred as m}from"./Render.js";const a=500,i=new Map,c=new Map,E=n=>{const
|
|
1
|
+
"use strict";import{renderDeferred as m}from"./Render.js";const a=500,i=new Map,c=new Map,E=n=>{const s=n.host,l=n.propName,t=s[l];let o;if(t===void 0||t==="")o=void 0;else if(t instanceof HTMLElement)o=t;else{const d=s.getRootNode();o=d.getElementById&&d.getElementById(t)||void 0}const e=`${s._id}-${l}`,r=i.get(e);if(!o){if(r&&(n.onDisconnect&&n.onDisconnect(r),i.delete(e)),typeof t=="string"&&t&&!c.has(e)){const d=setInterval(()=>{const f=s.getRootNode();f.getElementById&&f.getElementById(t)&&(clearInterval(c.get(e)),c.delete(e),m(s))},a);c.set(e,d)}return}return c.has(e)&&(clearInterval(c.get(e)),c.delete(e)),r!==o&&(r&&n.onDisconnect&&n.onDisconnect(r),n.onConnect&&n.onConnect(o),i.set(e,o)),i.get(e)};export default E;
|
|
2
2
|
//# sourceMappingURL=connectToComponent.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/connectToComponent.ts"],
|
|
4
|
-
"sourcesContent": ["import type UI5Element from \"./UI5Element.js\";\nimport { renderDeferred } from \"./Render.js\";\nimport { Interval } from \"./types.js\";\n\nconst MISSING_ELEMENT_POLL_TIMEOUT = 500; // how often to poll for not-yet-in-DOM friend elements\nconst connections = new Map<string, HTMLElement>();\nconst intervals = new Map<string, Interval>();\n\ntype ConnectOptions = {\n\thost: UI5Element;\n\tpropName: string;\n\tonConnect?: (friend: HTMLElement) => void;\n\tonDisconnect?: (friend: HTMLElement) => void;\n}\n\nconst connectToComponent = (options: ConnectOptions): HTMLElement | undefined => {\n\tconst host = options.host;\n\tconst propName = options.propName;\n\tconst friend = host[propName as keyof typeof host] as HTMLElement | string | undefined;\n\n\tlet connectedTo: HTMLElement | undefined;\n\tif (friend === undefined || friend === \"\") {\n\t\tconnectedTo = undefined; // do not return early even if a \"menu\" property is not set - it may have been set before and cleanup must run\n\t} else if (friend instanceof HTMLElement) {\n\t\tconnectedTo = friend;\n\t} else {\n\t\tconst rootNode = host.getRootNode() as Document;\n\t\tconnectedTo = (rootNode.getElementById && rootNode.getElementById(friend)) || undefined;\n\t}\n\n\tconst key = `${host._id}-${propName}`;\n\tconst prevConnectedTo = connections.get(key);\n\n\t// Not connected - return undefined\n\tif (!connectedTo) {\n\t\tif (prevConnectedTo) { // but first disconnect, if needed\n\t\t\toptions.onDisconnect && options.onDisconnect(prevConnectedTo);\n\t\t\tconnections.delete(key);\n\t\t}\n\n\t\t// if friend element not in DOM yet, start polling\n\t\tif (typeof friend === \"string\" && friend && !intervals.has(key)) {\n\t\t\tconst interval = setInterval(() => {\n\t\t\t\tconst rootNode = host.getRootNode() as Document;\n\t\t\t\tconst found = (rootNode.getElementById && rootNode.getElementById(friend));\n\n\t\t\t\tif (found) {\n\t\t\t\t\tclearInterval(intervals.get(key));\n\t\t\t\t\tintervals.delete(key);\n\t\t\t\t\trenderDeferred(host);\n\t\t\t\t}\n\t\t\t}, MISSING_ELEMENT_POLL_TIMEOUT);\n\t\t\tintervals.set(key, interval);\n\t\t}\n\n\t\treturn;\n\t}\n\n\t// If connected, but still polling, stop polling\n\tif (intervals.has(key)) {\n\t\tclearInterval(intervals.get(key));\n\t\tintervals.delete(key);\n\t}\n\n\t// Connected - either for the first time, or to something else\n\tif (prevConnectedTo !== connectedTo) {\n\t\tif (prevConnectedTo) {\n\t\t\toptions.onDisconnect && options.onDisconnect(prevConnectedTo);\n\t\t}\n\t\toptions.onConnect && options.onConnect(connectedTo);\n\t\tconnections.set(key, connectedTo);\n\t}\n\n\treturn connections.get(key);\n};\n\nexport default connectToComponent;\n"],
|
|
4
|
+
"sourcesContent": ["import type UI5Element from \"./UI5Element.js\";\nimport { renderDeferred } from \"./Render.js\";\nimport type { Interval } from \"./types.js\";\n\nconst MISSING_ELEMENT_POLL_TIMEOUT = 500; // how often to poll for not-yet-in-DOM friend elements\nconst connections = new Map<string, HTMLElement>();\nconst intervals = new Map<string, Interval>();\n\ntype ConnectOptions = {\n\thost: UI5Element;\n\tpropName: string;\n\tonConnect?: (friend: HTMLElement) => void;\n\tonDisconnect?: (friend: HTMLElement) => void;\n}\n\nconst connectToComponent = (options: ConnectOptions): HTMLElement | undefined => {\n\tconst host = options.host;\n\tconst propName = options.propName;\n\tconst friend = host[propName as keyof typeof host] as HTMLElement | string | undefined;\n\n\tlet connectedTo: HTMLElement | undefined;\n\tif (friend === undefined || friend === \"\") {\n\t\tconnectedTo = undefined; // do not return early even if a \"menu\" property is not set - it may have been set before and cleanup must run\n\t} else if (friend instanceof HTMLElement) {\n\t\tconnectedTo = friend;\n\t} else {\n\t\tconst rootNode = host.getRootNode() as Document;\n\t\tconnectedTo = (rootNode.getElementById && rootNode.getElementById(friend)) || undefined;\n\t}\n\n\tconst key = `${host._id}-${propName}`;\n\tconst prevConnectedTo = connections.get(key);\n\n\t// Not connected - return undefined\n\tif (!connectedTo) {\n\t\tif (prevConnectedTo) { // but first disconnect, if needed\n\t\t\toptions.onDisconnect && options.onDisconnect(prevConnectedTo);\n\t\t\tconnections.delete(key);\n\t\t}\n\n\t\t// if friend element not in DOM yet, start polling\n\t\tif (typeof friend === \"string\" && friend && !intervals.has(key)) {\n\t\t\tconst interval = setInterval(() => {\n\t\t\t\tconst rootNode = host.getRootNode() as Document;\n\t\t\t\tconst found = (rootNode.getElementById && rootNode.getElementById(friend));\n\n\t\t\t\tif (found) {\n\t\t\t\t\tclearInterval(intervals.get(key));\n\t\t\t\t\tintervals.delete(key);\n\t\t\t\t\trenderDeferred(host);\n\t\t\t\t}\n\t\t\t}, MISSING_ELEMENT_POLL_TIMEOUT);\n\t\t\tintervals.set(key, interval);\n\t\t}\n\n\t\treturn;\n\t}\n\n\t// If connected, but still polling, stop polling\n\tif (intervals.has(key)) {\n\t\tclearInterval(intervals.get(key));\n\t\tintervals.delete(key);\n\t}\n\n\t// Connected - either for the first time, or to something else\n\tif (prevConnectedTo !== connectedTo) {\n\t\tif (prevConnectedTo) {\n\t\t\toptions.onDisconnect && options.onDisconnect(prevConnectedTo);\n\t\t}\n\t\toptions.onConnect && options.onConnect(connectedTo);\n\t\tconnections.set(key, connectedTo);\n\t}\n\n\treturn connections.get(key);\n};\n\nexport default connectToComponent;\n"],
|
|
5
5
|
"mappings": "aACA,OAAS,kBAAAA,MAAsB,cAG/B,MAAMC,EAA+B,IAC/BC,EAAc,IAAI,IAClBC,EAAY,IAAI,IAShBC,EAAsBC,GAAqD,CAChF,MAAMC,EAAOD,EAAQ,KACfE,EAAWF,EAAQ,SACnBG,EAASF,EAAKC,CAA6B,EAEjD,IAAIE,EACJ,GAAID,IAAW,QAAaA,IAAW,GACtCC,EAAc,eACJD,aAAkB,YAC5BC,EAAcD,MACR,CACN,MAAME,EAAWJ,EAAK,YAAY,EAClCG,EAAeC,EAAS,gBAAkBA,EAAS,eAAeF,CAAM,GAAM,MAC/E,CAEA,MAAMG,EAAM,GAAGL,EAAK,GAAG,IAAIC,CAAQ,GAC7BK,EAAkBV,EAAY,IAAIS,CAAG,EAG3C,GAAI,CAACF,EAAa,CAOjB,GANIG,IACHP,EAAQ,cAAgBA,EAAQ,aAAaO,CAAe,EAC5DV,EAAY,OAAOS,CAAG,GAInB,OAAOH,GAAW,UAAYA,GAAU,CAACL,EAAU,IAAIQ,CAAG,EAAG,CAChE,MAAME,EAAW,YAAY,IAAM,CAClC,MAAMH,EAAWJ,EAAK,YAAY,EACnBI,EAAS,gBAAkBA,EAAS,eAAeF,CAAM,IAGvE,cAAcL,EAAU,IAAIQ,CAAG,CAAC,EAChCR,EAAU,OAAOQ,CAAG,EACpBX,EAAeM,CAAI,EAErB,EAAGL,CAA4B,EAC/BE,EAAU,IAAIQ,EAAKE,CAAQ,CAC5B,CAEA,MACD,CAGA,OAAIV,EAAU,IAAIQ,CAAG,IACpB,cAAcR,EAAU,IAAIQ,CAAG,CAAC,EAChCR,EAAU,OAAOQ,CAAG,GAIjBC,IAAoBH,IACnBG,GACHP,EAAQ,cAAgBA,EAAQ,aAAaO,CAAe,EAE7DP,EAAQ,WAAaA,EAAQ,UAAUI,CAAW,EAClDP,EAAY,IAAIS,EAAKF,CAAW,GAG1BP,EAAY,IAAIS,CAAG,CAC3B,EAEA,eAAeP",
|
|
6
6
|
"names": ["renderDeferred", "MISSING_ELEMENT_POLL_TIMEOUT", "connections", "intervals", "connectToComponent", "options", "host", "propName", "friend", "connectedTo", "rootNode", "key", "prevConnectedTo", "interval"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/converters/DOMReference.ts"],
|
|
4
|
+
"sourcesContent": ["const DOMReferenceConverter = {\n\ttoAttribute(propertyValue: string | HTMLElement) {\n\t\tif (propertyValue instanceof HTMLElement) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn propertyValue;\n\t},\n\tfromAttribute(value: string | null) {\n\t\treturn value;\n\t},\n};\n\nexport default DOMReferenceConverter;\n"],
|
|
5
|
+
"mappings": "aAAA,MAAMA,EAAwB,CAC7B,YAAYC,EAAqC,CAChD,OAAIA,aAAyB,YACrB,KAGDA,CACR,EACA,cAAcC,EAAsB,CACnC,OAAOA,CACR,CACD,EAEA,eAAeF",
|
|
6
|
+
"names": ["DOMReferenceConverter", "propertyValue", "value"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";export default function u(r,n,o){if(typeof r[n]!="function")throw new Error(`@bound decorator can only be applied to methods, received ${String(n)}: ${typeof r[n]}`);let e=o.value;return{configurable:!0,get(){if(!(this instanceof r.constructor)||Object.hasOwnProperty.call(this,n))return e;let t=e.bind(this);return Object.defineProperty(this,n,{configurable:!0,get(){return t},set(i){t=i}}),t},set(t){e=t}}}
|
|
2
|
+
//# sourceMappingURL=bound.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/decorators/bound.ts"],
|
|
4
|
+
"sourcesContent": ["export default function bound(target: any, key: string | symbol, descriptor: any): any {\n\tif (!(typeof target[key] === \"function\")) {\n\t\tthrow new Error(`@bound decorator can only be applied to methods, received ${String(key)}: ${typeof target[key]}`);\n\t}\n\n\tlet fn = descriptor.value;\n\treturn {\n\t\tconfigurable: true,\n\t\tget(): any {\n\t\t\tif (!(this instanceof target.constructor)) {\n\t\t\t\treturn fn;\n\t\t\t}\n\n\t\t\t// if the property is already defined on the instance, then this call is a super call\n\t\t\tif (Object.hasOwnProperty.call(this, key)) {\n\t\t\t\treturn fn;\n\t\t\t}\n\n\t\t\tlet boundFn = fn.bind(this);\n\n\t\t\tObject.defineProperty(this, key, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tget(): any {\n\t\t\t\t\treturn boundFn;\n\t\t\t\t},\n\t\t\t\tset(value: any): void {\n\t\t\t\t\t// setting a value on the instance means they overwrite the default behaviour\n\t\t\t\t\tboundFn = value;\n\t\t\t\t},\n\t\t\t});\n\t\t\treturn boundFn;\n\t\t},\n\t\tset(value: any): void {\n\t\t\tfn = value;\n\t\t},\n\t};\n}\n"],
|
|
5
|
+
"mappings": "aAAA,wBAAwBA,EAAMC,EAAaC,EAAsBC,EAAsB,CACtF,GAAM,OAAOF,EAAOC,CAAG,GAAM,WAC5B,MAAM,IAAI,MAAM,6DAA6D,OAAOA,CAAG,CAAC,KAAK,OAAOD,EAAOC,CAAG,CAAC,EAAE,EAGlH,IAAIE,EAAKD,EAAW,MACpB,MAAO,CACN,aAAc,GACd,KAAW,CAMV,GALI,EAAE,gBAAgBF,EAAO,cAKzB,OAAO,eAAe,KAAK,KAAMC,CAAG,EACvC,OAAOE,EAGR,IAAIC,EAAUD,EAAG,KAAK,IAAI,EAE1B,cAAO,eAAe,KAAMF,EAAK,CAChC,aAAc,GACd,KAAW,CACV,OAAOG,CACR,EACA,IAAIC,EAAkB,CAErBD,EAAUC,CACX,CACD,CAAC,EACMD,CACR,EACA,IAAIC,EAAkB,CACrBF,EAAKE,CACN,CACD,CACD",
|
|
6
|
+
"names": ["bound", "target", "key", "descriptor", "fn", "boundFn", "value"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const m=(a={})=>e=>{if(Object.prototype.hasOwnProperty.call(e,"metadata")||(e.metadata={}),typeof a=="string"){e.metadata.tag=a;return}const{tag:i,languageAware:o,themeAware:s,fastNavigation:
|
|
1
|
+
"use strict";const m=(a={})=>e=>{if(Object.prototype.hasOwnProperty.call(e,"metadata")||(e.metadata={}),typeof a=="string"){e.metadata.tag=a;return}const{tag:i,languageAware:o,themeAware:r,cldr:s,fastNavigation:l,formAssociated:n,shadowRootOptions:d}=a;e.metadata.tag=i,o&&(e.metadata.languageAware=o),s&&(e.metadata.cldr=s),r&&(e.metadata.themeAware=r),l&&(e.metadata.fastNavigation=l),n&&(e.metadata.formAssociated=n),d&&(e.metadata.shadowRootOptions=d),["renderer","template","styles","dependencies"].forEach(t=>{a[t]&&Object.defineProperty(e,t,{get:()=>a[t]})})};export default m;
|
|
2
2
|
//# sourceMappingURL=customElement.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/decorators/customElement.ts"],
|
|
4
|
-
"sourcesContent": ["import type UI5Element from \"../UI5Element.js\";\nimport type { Renderer } from \"../UI5Element.js\";\nimport type { TemplateFunction as Template } from \"../renderer/executeTemplate.js\";\nimport type { ComponentStylesData as Styles } from \"../types.js\";\n\n/**\n * Returns a custom element class decorator.\n *\n * @param { string | object } tagNameOrComponentSettings\n * @returns { ClassDecorator }\n */\nconst customElement = (tagNameOrComponentSettings: string | {\n\ttag?: string,\n\trenderer?: Renderer,\n\tstyles?: Styles,\n\ttemplate?: Template,\n\tdependencies?: Array<typeof UI5Element>,\n\tlanguageAware?: boolean,\n\tthemeAware?: boolean,\n\tfastNavigation?: boolean,\n\tformAssociated?: boolean,\n\tshadowRootOptions?: Partial<ShadowRootInit>,\n} = {}): ClassDecorator => {\n\treturn (target: any) => {\n\t\tif (!Object.prototype.hasOwnProperty.call(target, \"metadata\")) {\n\t\t\ttarget.metadata = {};\n\t\t}\n\n\t\tif (typeof tagNameOrComponentSettings === \"string\") {\n\t\t\ttarget.metadata.tag = tagNameOrComponentSettings;\n\t\t\treturn;\n\t\t}\n\n\t\tconst {\n\t\t\ttag,\n\t\t\tlanguageAware,\n\t\t\tthemeAware,\n\t\t\tfastNavigation,\n\t\t\tformAssociated,\n\t\t\tshadowRootOptions,\n\t\t } = tagNameOrComponentSettings;\n\n\t\ttarget.metadata.tag = tag;\n\t\tif (languageAware) {\n\t\t\ttarget.metadata.languageAware = languageAware;\n\t\t}\n\t\tif (themeAware) {\n\t\t\ttarget.metadata.themeAware = themeAware;\n\t\t}\n\t\tif (fastNavigation) {\n\t\t\ttarget.metadata.fastNavigation = fastNavigation;\n\t\t}\n\t\tif (formAssociated) {\n\t\t\ttarget.metadata.formAssociated = formAssociated;\n\t\t}\n\n\t\tif (shadowRootOptions) {\n\t\t\ttarget.metadata.shadowRootOptions = shadowRootOptions;\n\t\t}\n\n\t\t[\"renderer\", \"template\", \"styles\", \"dependencies\"].forEach((customElementEntity: string) => {\n\t\t\tconst customElementEntityValue = tagNameOrComponentSettings[customElementEntity as keyof typeof tag];\n\n\t\t\tcustomElementEntityValue && Object.defineProperty(target, customElementEntity, {\n\t\t\t\tget: () => tagNameOrComponentSettings[customElementEntity as keyof typeof tag],\n\t\t\t});\n\t\t});\n\t};\n};\n\nexport default customElement;\n"],
|
|
5
|
-
"mappings": "aAWA,MAAMA,EAAgB,CAACC,
|
|
6
|
-
"names": ["customElement", "tagNameOrComponentSettings", "target", "tag", "languageAware", "themeAware", "fastNavigation", "formAssociated", "shadowRootOptions", "customElementEntity"]
|
|
4
|
+
"sourcesContent": ["import type UI5Element from \"../UI5Element.js\";\nimport type { Renderer } from \"../UI5Element.js\";\nimport type { TemplateFunction as Template } from \"../renderer/executeTemplate.js\";\nimport type { ComponentStylesData as Styles } from \"../types.js\";\n\n/**\n * Returns a custom element class decorator.\n *\n * @param { string | object } tagNameOrComponentSettings\n * @returns { ClassDecorator }\n */\nconst customElement = (tagNameOrComponentSettings: string | {\n\t/**\n\t * The tag name of the custom element (will be suffixed if the scoping feature is used).\n\t */\n\ttag?: string,\n\t/**\n\t * The renderer of the custom element - officially supported are: jsxRenderer and litRender (deprecated).\n\t */\n\trenderer?: Renderer,\n\t/**\n\t * The styles to be injected into the shadow root of the custom element.\n\t */\n\tstyles?: Styles,\n\t/**\n\t * The template function of the custom element - must match the renderer.\n\t */\n\ttemplate?: Template,\n\t/**\n\t * Other custom elements used in the shadow root of the custom element.\n\t * @deprecated no longer necessary for jsxRenderer-enabled components\n\t */\n\tdependencies?: Array<typeof UI5Element>,\n\t/**\n\t * Whether the custom element should be re-rendered when the language changes.\n\t */\n\tlanguageAware?: boolean,\n\t/**\n\t * Whether the custom element should be re-rendered when the theme changes.\n\t */\n\tthemeAware?: boolean,\n\t/**\n\t * Whether the custom element needs the CLDR assets.\n\t */\n\tcldr?: boolean,\n\t/**\n\t * Whether the custom element supports the F6 Fast navigation feature (is a fast-navigation group).\n\t */\n\tfastNavigation?: boolean,\n\t/**\n\t * Whether the custom element is form-associated and implements form-relevant features.\n\t */\n\tformAssociated?: boolean,\n\t/**\n\t * The shadow root options of the custom element.\n\t */\n\tshadowRootOptions?: Partial<ShadowRootInit>,\n\t/**\n\t * A list of all features, supported by the custom element.\n\t * @deprecated no longer necessary for jsxRenderer-enabled components\n\t */\n\tfeatures?: Array<string>,\n} = {}): ClassDecorator => {\n\treturn (target: any) => {\n\t\tif (!Object.prototype.hasOwnProperty.call(target, \"metadata\")) {\n\t\t\ttarget.metadata = {};\n\t\t}\n\n\t\tif (typeof tagNameOrComponentSettings === \"string\") {\n\t\t\ttarget.metadata.tag = tagNameOrComponentSettings;\n\t\t\treturn;\n\t\t}\n\n\t\tconst {\n\t\t\ttag,\n\t\t\tlanguageAware,\n\t\t\tthemeAware,\n\t\t\tcldr,\n\t\t\tfastNavigation,\n\t\t\tformAssociated,\n\t\t\tshadowRootOptions,\n\t\t } = tagNameOrComponentSettings;\n\n\t\ttarget.metadata.tag = tag;\n\t\tif (languageAware) {\n\t\t\ttarget.metadata.languageAware = languageAware;\n\t\t}\n\t\tif (cldr) {\n\t\t\ttarget.metadata.cldr = cldr;\n\t\t}\n\n\t\tif (themeAware) {\n\t\t\ttarget.metadata.themeAware = themeAware;\n\t\t}\n\t\tif (fastNavigation) {\n\t\t\ttarget.metadata.fastNavigation = fastNavigation;\n\t\t}\n\t\tif (formAssociated) {\n\t\t\ttarget.metadata.formAssociated = formAssociated;\n\t\t}\n\n\t\tif (shadowRootOptions) {\n\t\t\ttarget.metadata.shadowRootOptions = shadowRootOptions;\n\t\t}\n\n\t\t[\"renderer\", \"template\", \"styles\", \"dependencies\"].forEach((customElementEntity: string) => {\n\t\t\tconst customElementEntityValue = tagNameOrComponentSettings[customElementEntity as keyof typeof tag];\n\n\t\t\tcustomElementEntityValue && Object.defineProperty(target, customElementEntity, {\n\t\t\t\tget: () => tagNameOrComponentSettings[customElementEntity as keyof typeof tag],\n\t\t\t});\n\t\t});\n\t};\n};\n\nexport default customElement;\n"],
|
|
5
|
+
"mappings": "aAWA,MAAMA,EAAgB,CAACC,EAmDnB,CAAC,IACIC,GAAgB,CAKvB,GAJK,OAAO,UAAU,eAAe,KAAKA,EAAQ,UAAU,IAC3DA,EAAO,SAAW,CAAC,GAGhB,OAAOD,GAA+B,SAAU,CACnDC,EAAO,SAAS,IAAMD,EACtB,MACD,CAEA,KAAM,CACL,IAAAE,EACA,cAAAC,EACA,WAAAC,EACA,KAAAC,EACA,eAAAC,EACA,eAAAC,EACA,kBAAAC,CACA,EAAIR,EAELC,EAAO,SAAS,IAAMC,EAClBC,IACHF,EAAO,SAAS,cAAgBE,GAE7BE,IACHJ,EAAO,SAAS,KAAOI,GAGpBD,IACHH,EAAO,SAAS,WAAaG,GAE1BE,IACHL,EAAO,SAAS,eAAiBK,GAE9BC,IACHN,EAAO,SAAS,eAAiBM,GAG9BC,IACHP,EAAO,SAAS,kBAAoBO,GAGrC,CAAC,WAAY,WAAY,SAAU,cAAc,EAAE,QAASC,GAAgC,CAC1DT,EAA2BS,CAAuC,GAEvE,OAAO,eAAeR,EAAQQ,EAAqB,CAC9E,IAAK,IAAMT,EAA2BS,CAAuC,CAC9E,CAAC,CACF,CAAC,CACF,EAGD,eAAeV",
|
|
6
|
+
"names": ["customElement", "tagNameOrComponentSettings", "target", "tag", "languageAware", "themeAware", "cldr", "fastNavigation", "formAssociated", "shadowRootOptions", "customElementEntity"]
|
|
7
7
|
}
|