@ui5/webcomponents-base 0.0.0-e55c2cec6 → 0.0.0-e5b03d3e8
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/.npsrc.json +3 -0
- package/CHANGELOG.md +1965 -0
- package/README.md +6 -12
- package/cypress/specs/Accessor.cy.tsx +79 -0
- package/cypress/specs/Boot.cy.tsx +19 -0
- package/cypress/specs/ConfigurationChange.cy.tsx +41 -0
- package/cypress/specs/ConfigurationScript.cy.tsx +133 -0
- package/cypress/specs/ConfigurationURL.cy.tsx +201 -0
- package/cypress/specs/CustomMount.cy.tsx +9 -0
- package/cypress/specs/CustomTheme.cy.tsx +36 -0
- package/cypress/specs/EventProvider.cy.tsx +59 -0
- package/cypress/specs/Events.cy.tsx +28 -0
- package/cypress/specs/SystemDOMElements.cy.tsx +8 -0
- package/cypress/specs/Theming.cy.tsx +74 -0
- package/cypress/specs/UI5ElementInvalidation.cy.tsx +252 -0
- package/cypress/specs/UI5ElementLifecycle.cy.tsx +82 -0
- package/cypress/specs/UI5ElementListenForChildPropChanges.cy.tsx +83 -0
- package/cypress/specs/UI5ElementMetadataExt.cy.tsx +42 -0
- package/cypress/specs/UI5ElementPropertyValidation.cy.tsx +16 -0
- package/cypress/specs/UI5ElementPropsAndAttrs.cy.tsx +113 -0
- package/cypress/specs/UI5ElementShadowDOM.cy.tsx +30 -0
- package/cypress/specs/UI5ElementSlots.cy.tsx +136 -0
- package/cypress/specs/WithComplexTemplate.cy.tsx +32 -0
- package/cypress/specs/i18n_texts.cy.tsx +129 -0
- package/cypress/specs/util/FocusableElements.cy.tsx +48 -0
- package/cypress/support/commands.ts +39 -0
- package/cypress/support/component-index.html +12 -0
- package/cypress/support/component.ts +36 -0
- package/cypress/tsconfig.json +21 -0
- package/cypress.config.js +3 -0
- package/dist/.tsbuildinfobuild +1 -0
- package/dist/AssetRegistry.d.ts +2 -2
- package/dist/AssetRegistry.js +2 -2
- package/dist/AssetRegistry.js.map +1 -1
- package/dist/Boot.d.ts +6 -4
- package/dist/Boot.js +37 -6
- 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/CustomElementsScope.d.ts +4 -4
- package/dist/CustomElementsScope.js +2 -2
- package/dist/CustomElementsScope.js.map +1 -1
- package/dist/CustomElementsScopeUtils.d.ts +11 -2
- package/dist/CustomElementsScopeUtils.js +21 -2
- package/dist/CustomElementsScopeUtils.js.map +1 -1
- package/dist/DOMObserver.js.map +1 -1
- package/dist/Device.d.ts +17 -2
- package/dist/Device.js +116 -36
- package/dist/Device.js.map +1 -1
- package/dist/EventProvider.js +1 -1
- package/dist/EventProvider.js.map +1 -1
- package/dist/FeaturesRegistry.js.map +1 -1
- package/dist/FontFace.js +6 -1
- package/dist/FontFace.js.map +1 -1
- package/dist/IgnoreCustomElements.d.ts +25 -0
- package/dist/IgnoreCustomElements.js +37 -0
- package/dist/IgnoreCustomElements.js.map +1 -0
- package/dist/InitialConfiguration.d.ts +15 -3
- package/dist/InitialConfiguration.js +42 -10
- package/dist/InitialConfiguration.js.map +1 -1
- package/dist/Keys.d.ts +8 -1
- package/dist/Keys.js +114 -106
- 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 +5 -6
- package/dist/ManagedStyles.js +45 -53
- package/dist/ManagedStyles.js.map +1 -1
- package/dist/MediaRange.d.ts +6 -12
- package/dist/MediaRange.js +21 -31
- 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/SystemCSSVars.js.map +1 -1
- package/dist/Theming.js.map +1 -1
- package/dist/UI5Element.d.ts +124 -73
- package/dist/UI5Element.js +406 -251
- package/dist/UI5Element.js.map +1 -1
- package/dist/UI5ElementMetadata.d.ts +36 -27
- package/dist/UI5ElementMetadata.js +27 -72
- package/dist/UI5ElementMetadata.js.map +1 -1
- package/dist/animations/AnimationQueue.js.map +1 -1
- package/dist/animations/animate.js.map +1 -1
- package/dist/animations/scroll.js.map +1 -1
- package/dist/animations/slideDown.js.map +1 -1
- package/dist/animations/slideUp.js.map +1 -1
- package/dist/asset-registries/Icons.d.ts +22 -13
- package/dist/asset-registries/Icons.js +63 -31
- package/dist/asset-registries/Icons.js.map +1 -1
- package/dist/asset-registries/Illustrations.d.ts +3 -1
- package/dist/asset-registries/Illustrations.js +51 -20
- package/dist/asset-registries/Illustrations.js.map +1 -1
- package/dist/asset-registries/LocaleData.js +1 -1
- package/dist/asset-registries/LocaleData.js.map +1 -1
- package/dist/asset-registries/Themes.d.ts +6 -7
- package/dist/asset-registries/Themes.js +29 -12
- package/dist/asset-registries/Themes.js.map +1 -1
- package/dist/asset-registries/i18n.d.ts +2 -2
- package/dist/asset-registries/i18n.js +12 -5
- package/dist/asset-registries/i18n.js.map +1 -1
- package/dist/asset-registries/util/IconCollectionsAlias.d.ts +30 -0
- package/dist/asset-registries/util/IconCollectionsAlias.js +37 -0
- package/dist/asset-registries/util/IconCollectionsAlias.js.map +1 -0
- package/dist/asset-registries/util/IconCollectionsByTheme.d.ts +20 -0
- package/dist/asset-registries/util/IconCollectionsByTheme.js +42 -0
- package/dist/asset-registries/util/IconCollectionsByTheme.js.map +1 -0
- package/dist/asset-registries/util/getIconCollectionByTheme.d.ts +13 -0
- package/dist/asset-registries/util/getIconCollectionByTheme.js +29 -0
- package/dist/asset-registries/util/getIconCollectionByTheme.js.map +1 -0
- package/dist/config/AnimationMode.d.ts +2 -2
- package/dist/config/AnimationMode.js +6 -1
- package/dist/config/AnimationMode.js.map +1 -1
- package/dist/config/CalendarType.d.ts +8 -1
- package/dist/config/CalendarType.js +23 -2
- 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.d.ts +5 -1
- package/dist/config/FormatSettings.js +9 -1
- package/dist/config/FormatSettings.js.map +1 -1
- package/dist/config/Icons.d.ts +31 -21
- package/dist/config/Icons.js +28 -32
- package/dist/config/Icons.js.map +1 -1
- package/dist/config/Language.d.ts +11 -2
- package/dist/config/Language.js +24 -4
- package/dist/config/Language.js.map +1 -1
- package/dist/config/NoConflict.js +5 -0
- package/dist/config/NoConflict.js.map +1 -1
- package/dist/config/Theme.d.ts +16 -5
- package/dist/config/Theme.js +40 -11
- package/dist/config/Theme.js.map +1 -1
- package/dist/config/ThemeRoot.d.ts +27 -0
- package/dist/config/ThemeRoot.js +61 -0
- package/dist/config/ThemeRoot.js.map +1 -0
- package/dist/config/Timezone.d.ts +17 -0
- package/dist/config/Timezone.js +34 -0
- package/dist/config/Timezone.js.map +1 -0
- 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.d.ts +9 -0
- package/dist/connectToComponent.js +59 -0
- package/dist/connectToComponent.js.map +1 -0
- 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/FontFace.css +47 -17
- package/dist/css/SystemCSSVars.css +0 -8
- package/dist/custom-elements-internal.json +2788 -0
- package/dist/custom-elements.json +2485 -0
- 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 +57 -2
- package/dist/decorators/customElement.js +34 -5
- 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 +8 -2
- package/dist/decorators/event.js +9 -6
- 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 +7 -7
- 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 +9 -9
- package/dist/decorators/slot.js.map +1 -1
- package/dist/decorators.d.ts +8 -0
- package/dist/decorators.js +9 -0
- package/dist/decorators.js.map +1 -0
- package/dist/delegate/ItemNavigation.d.ts +9 -8
- package/dist/delegate/ItemNavigation.js +13 -14
- package/dist/delegate/ItemNavigation.js.map +1 -1
- package/dist/delegate/ResizeHandler.d.ts +6 -7
- package/dist/delegate/ResizeHandler.js +11 -9
- package/dist/delegate/ResizeHandler.js.map +1 -1
- package/dist/delegate/ScrollEnablement.d.ts +4 -3
- package/dist/delegate/ScrollEnablement.js +2 -2
- package/dist/delegate/ScrollEnablement.js.map +1 -1
- package/dist/features/F6Navigation.d.ts +7 -3
- package/dist/features/F6Navigation.js +116 -45
- package/dist/features/F6Navigation.js.map +1 -1
- package/dist/features/InputElementsFormSupport.d.ts +15 -0
- package/dist/features/InputElementsFormSupport.js +39 -0
- package/dist/features/InputElementsFormSupport.js.map +1 -0
- package/dist/features/LegacyDateFormats.d.ts +18 -0
- package/dist/features/LegacyDateFormats.js +20 -0
- package/dist/features/LegacyDateFormats.js.map +1 -0
- package/dist/features/OpenUI5Element.js.map +1 -1
- package/dist/features/OpenUI5Enablement.d.ts +3 -3
- package/dist/features/OpenUI5Enablement.js.map +1 -1
- package/dist/features/OpenUI5Support.d.ts +17 -6
- package/dist/features/OpenUI5Support.js +92 -46
- package/dist/features/OpenUI5Support.js.map +1 -1
- package/dist/features/patchPatcher.d.ts +11 -0
- package/dist/features/patchPatcher.js +11 -0
- package/dist/features/patchPatcher.js.map +1 -0
- package/dist/features/patchPopup.d.ts +15 -0
- package/dist/features/patchPopup.js +70 -0
- package/dist/features/patchPopup.js.map +1 -0
- package/dist/generated/AssetParameters.d.ts +6 -0
- package/dist/generated/AssetParameters.js +4 -9
- package/dist/generated/AssetParameters.js.map +1 -0
- package/dist/generated/VersionInfo.d.ts +10 -0
- package/dist/generated/VersionInfo.js +9 -8
- package/dist/generated/VersionInfo.js.map +1 -0
- package/dist/generated/css/BusyIndicator.css.d.ts +2 -0
- package/dist/generated/css/BusyIndicator.css.js +2 -5
- package/dist/generated/css/BusyIndicator.css.js.map +1 -0
- package/dist/generated/css/FontFace.css.d.ts +2 -0
- package/dist/generated/css/FontFace.css.js +2 -5
- package/dist/generated/css/FontFace.css.js.map +1 -0
- package/dist/generated/css/OverrideFontFace.css.d.ts +2 -0
- package/dist/generated/css/OverrideFontFace.css.js +2 -5
- package/dist/generated/css/OverrideFontFace.css.js.map +1 -0
- package/dist/generated/css/SystemCSSVars.css.d.ts +2 -0
- package/dist/generated/css/SystemCSSVars.css.js +2 -5
- package/dist/generated/css/SystemCSSVars.css.js.map +1 -0
- package/dist/getSharedResource.d.ts +1 -1
- package/dist/getSharedResource.js +16 -2
- package/dist/getSharedResource.js.map +1 -1
- package/{global.d.ts → dist/global.d.ts} +2 -6
- package/dist/i18nBundle.d.ts +2 -4
- package/dist/i18nBundle.js +3 -5
- package/dist/i18nBundle.js.map +1 -1
- package/dist/index.d.ts +12 -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 +50 -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/RTLAwareRegistry.d.ts +1 -1
- package/dist/locale/RTLAwareRegistry.js.map +1 -1
- package/dist/locale/applyDirection.d.ts +3 -2
- package/dist/locale/applyDirection.js +3 -2
- package/dist/locale/applyDirection.js.map +1 -1
- package/dist/locale/directionChange.js.map +1 -1
- package/dist/locale/getEffectiveDir.d.ts +1 -1
- package/dist/locale/getEffectiveDir.js +3 -19
- package/dist/locale/getEffectiveDir.js.map +1 -1
- package/dist/locale/getLocale.js.map +1 -1
- package/dist/locale/languageChange.js.map +1 -1
- package/dist/locale/nextFallbackLocale.js.map +1 -1
- package/dist/locale/normalizeLocale.js.map +1 -1
- package/dist/prod/AssetRegistry.js +2 -0
- package/dist/prod/AssetRegistry.js.map +7 -0
- package/dist/prod/Boot.js +2 -0
- package/dist/prod/Boot.js.map +7 -0
- package/dist/prod/CustomElementsRegistry.js +10 -0
- package/dist/prod/CustomElementsRegistry.js.map +7 -0
- package/dist/prod/CustomElementsScope.js +2 -0
- package/dist/prod/CustomElementsScope.js.map +7 -0
- package/dist/prod/CustomElementsScopeUtils.js +2 -0
- package/dist/prod/CustomElementsScopeUtils.js.map +7 -0
- package/dist/prod/DOMObserver.js +2 -0
- package/dist/prod/DOMObserver.js.map +7 -0
- package/dist/prod/Device.js +2 -0
- package/dist/prod/Device.js.map +7 -0
- package/dist/prod/EventProvider.js +2 -0
- package/dist/prod/EventProvider.js.map +7 -0
- package/dist/prod/FeaturesRegistry.js +2 -0
- package/dist/prod/FeaturesRegistry.js.map +7 -0
- package/dist/prod/FontFace.js +2 -0
- package/dist/prod/FontFace.js.map +7 -0
- package/dist/prod/IgnoreCustomElements.js +2 -0
- package/dist/prod/IgnoreCustomElements.js.map +7 -0
- package/dist/prod/InitialConfiguration.js +2 -0
- package/dist/prod/InitialConfiguration.js.map +7 -0
- package/dist/prod/Keys.js +2 -0
- package/dist/prod/Keys.js.map +7 -0
- package/dist/prod/Location.js +2 -0
- package/dist/prod/Location.js.map +7 -0
- package/dist/prod/ManagedStyles.js +2 -0
- package/dist/prod/ManagedStyles.js.map +7 -0
- package/dist/prod/MediaRange.js +2 -0
- package/dist/prod/MediaRange.js.map +7 -0
- package/dist/prod/PropertiesFileFormat.js +3 -0
- package/dist/prod/PropertiesFileFormat.js.map +7 -0
- package/dist/prod/Render.js +2 -0
- package/dist/prod/Render.js.map +7 -0
- package/dist/prod/RenderQueue.js +2 -0
- package/dist/prod/RenderQueue.js.map +7 -0
- package/dist/prod/Runtimes.js +2 -0
- package/dist/prod/Runtimes.js.map +7 -0
- package/dist/prod/SystemCSSVars.js +2 -0
- package/dist/prod/SystemCSSVars.js.map +7 -0
- package/dist/prod/Theming.js +2 -0
- package/dist/prod/Theming.js.map +7 -0
- package/dist/prod/UI5Element.js +2 -0
- package/dist/prod/UI5Element.js.map +7 -0
- package/dist/prod/UI5ElementMetadata.js +2 -0
- package/dist/prod/UI5ElementMetadata.js.map +7 -0
- package/dist/prod/animations/AnimationQueue.js +2 -0
- package/dist/prod/animations/AnimationQueue.js.map +7 -0
- package/dist/prod/animations/animate.js +2 -0
- package/dist/prod/animations/animate.js.map +7 -0
- package/dist/prod/animations/scroll.js +2 -0
- package/dist/prod/animations/scroll.js.map +7 -0
- package/dist/prod/animations/slideDown.js +2 -0
- package/dist/prod/animations/slideDown.js.map +7 -0
- package/dist/prod/animations/slideUp.js +2 -0
- package/dist/prod/animations/slideUp.js.map +7 -0
- package/dist/prod/asset-registries/Icons.js +2 -0
- package/dist/prod/asset-registries/Icons.js.map +7 -0
- package/dist/prod/asset-registries/Illustrations.js +2 -0
- package/dist/prod/asset-registries/Illustrations.js.map +7 -0
- package/dist/prod/asset-registries/LocaleData.js +2 -0
- package/dist/prod/asset-registries/LocaleData.js.map +7 -0
- package/dist/prod/asset-registries/Themes.js +2 -0
- package/dist/prod/asset-registries/Themes.js.map +7 -0
- package/dist/prod/asset-registries/i18n.js +2 -0
- package/dist/prod/asset-registries/i18n.js.map +7 -0
- package/dist/prod/asset-registries/util/IconCollectionsAlias.js +2 -0
- package/dist/prod/asset-registries/util/IconCollectionsAlias.js.map +7 -0
- package/dist/prod/asset-registries/util/IconCollectionsByTheme.js +2 -0
- package/dist/prod/asset-registries/util/IconCollectionsByTheme.js.map +7 -0
- package/dist/prod/asset-registries/util/getIconCollectionByTheme.js +2 -0
- package/dist/prod/asset-registries/util/getIconCollectionByTheme.js.map +7 -0
- package/dist/prod/config/AnimationMode.js +2 -0
- package/dist/prod/config/AnimationMode.js.map +7 -0
- package/dist/prod/config/CalendarType.js +2 -0
- package/dist/prod/config/CalendarType.js.map +7 -0
- 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 +2 -0
- package/dist/prod/config/FormatSettings.js.map +7 -0
- package/dist/prod/config/Icons.js +2 -0
- package/dist/prod/config/Icons.js.map +7 -0
- package/dist/prod/config/Language.js +2 -0
- package/dist/prod/config/Language.js.map +7 -0
- package/dist/prod/config/NoConflict.js +2 -0
- package/dist/prod/config/NoConflict.js.map +7 -0
- package/dist/prod/config/Theme.js +2 -0
- package/dist/prod/config/Theme.js.map +7 -0
- package/dist/prod/config/ThemeRoot.js +2 -0
- package/dist/prod/config/ThemeRoot.js.map +7 -0
- package/dist/prod/config/Timezone.js +2 -0
- package/dist/prod/config/Timezone.js.map +7 -0
- package/dist/prod/config/Tooltips.js +2 -0
- package/dist/prod/config/Tooltips.js.map +7 -0
- package/dist/prod/connectToComponent.js +2 -0
- package/dist/prod/connectToComponent.js.map +7 -0
- 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 +2 -0
- package/dist/prod/decorators/customElement.js.map +7 -0
- 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 +2 -0
- package/dist/prod/decorators/event.js.map +7 -0
- package/dist/prod/decorators/i18n.js +2 -0
- package/dist/prod/decorators/i18n.js.map +7 -0
- package/dist/prod/decorators/property.js +2 -0
- package/dist/prod/decorators/property.js.map +7 -0
- 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 +2 -0
- package/dist/prod/decorators/slot.js.map +7 -0
- package/dist/prod/decorators.js +2 -0
- package/dist/prod/decorators.js.map +7 -0
- package/dist/prod/delegate/ItemNavigation.js +2 -0
- package/dist/prod/delegate/ItemNavigation.js.map +7 -0
- package/dist/prod/delegate/ResizeHandler.js +2 -0
- package/dist/prod/delegate/ResizeHandler.js.map +7 -0
- package/dist/prod/delegate/ScrollEnablement.js +2 -0
- package/dist/prod/delegate/ScrollEnablement.js.map +7 -0
- package/dist/prod/features/F6Navigation.js +2 -0
- package/dist/prod/features/F6Navigation.js.map +7 -0
- package/dist/prod/features/InputElementsFormSupport.js +2 -0
- package/dist/prod/features/InputElementsFormSupport.js.map +7 -0
- package/dist/prod/features/LegacyDateFormats.js +2 -0
- package/dist/prod/features/LegacyDateFormats.js.map +7 -0
- package/dist/prod/features/OpenUI5Element.js +2 -0
- package/dist/prod/features/OpenUI5Element.js.map +7 -0
- package/dist/prod/features/OpenUI5Enablement.js +21 -0
- package/dist/prod/features/OpenUI5Enablement.js.map +7 -0
- package/dist/prod/features/OpenUI5Support.js +2 -0
- package/dist/prod/features/OpenUI5Support.js.map +7 -0
- package/dist/prod/features/patchPatcher.js +2 -0
- package/dist/prod/features/patchPatcher.js.map +7 -0
- package/dist/prod/features/patchPopup.js +2 -0
- package/dist/prod/features/patchPopup.js.map +7 -0
- package/dist/prod/generated/AssetParameters.js +2 -0
- package/dist/prod/generated/AssetParameters.js.map +7 -0
- package/dist/prod/generated/VersionInfo.js +2 -0
- package/dist/prod/generated/VersionInfo.js.map +7 -0
- package/dist/prod/generated/css/BusyIndicator.css.js +2 -0
- package/dist/prod/generated/css/BusyIndicator.css.js.map +7 -0
- package/dist/prod/generated/css/FontFace.css.js +2 -0
- package/dist/prod/generated/css/FontFace.css.js.map +7 -0
- package/dist/prod/generated/css/OverrideFontFace.css.js +2 -0
- package/dist/prod/generated/css/OverrideFontFace.css.js.map +7 -0
- package/dist/prod/generated/css/SystemCSSVars.css.js +2 -0
- package/dist/prod/generated/css/SystemCSSVars.css.js.map +7 -0
- package/dist/prod/getSharedResource.js +2 -0
- package/dist/prod/getSharedResource.js.map +7 -0
- package/dist/prod/global.d.js +2 -0
- package/dist/prod/global.d.js.map +7 -0
- package/dist/prod/i18nBundle.js +2 -0
- package/dist/prod/i18nBundle.js.map +7 -0
- package/dist/prod/index.d.js +2 -0
- package/dist/prod/index.d.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/Locale.js +2 -0
- package/dist/prod/locale/Locale.js.map +7 -0
- package/dist/prod/locale/RTLAwareRegistry.js +2 -0
- package/dist/prod/locale/RTLAwareRegistry.js.map +7 -0
- package/dist/prod/locale/applyDirection.js +2 -0
- package/dist/prod/locale/applyDirection.js.map +7 -0
- package/dist/prod/locale/directionChange.js +2 -0
- package/dist/prod/locale/directionChange.js.map +7 -0
- package/dist/prod/locale/getEffectiveDir.js +2 -0
- package/dist/prod/locale/getEffectiveDir.js.map +7 -0
- package/dist/prod/locale/getLocale.js +2 -0
- package/dist/prod/locale/getLocale.js.map +7 -0
- package/dist/prod/locale/languageChange.js +2 -0
- package/dist/prod/locale/languageChange.js.map +7 -0
- package/dist/prod/locale/nextFallbackLocale.js +2 -0
- package/dist/prod/locale/nextFallbackLocale.js.map +7 -0
- package/dist/prod/locale/normalizeLocale.js +2 -0
- package/dist/prod/locale/normalizeLocale.js.map +7 -0
- package/dist/prod/renderer/JsxRenderer.js +2 -0
- package/dist/prod/renderer/JsxRenderer.js.map +7 -0
- package/dist/prod/renderer/LitRenderer.js +2 -0
- package/dist/prod/renderer/LitRenderer.js.map +7 -0
- package/dist/prod/renderer/directives/style-map.js +6 -0
- package/dist/prod/renderer/directives/style-map.js.map +7 -0
- package/dist/prod/renderer/executeTemplate.js +2 -0
- package/dist/prod/renderer/executeTemplate.js.map +7 -0
- package/dist/prod/sap/base/Log.js +750 -0
- package/dist/prod/sap/base/assert.js +34 -0
- package/dist/prod/sap/base/config/MemoryConfigurationProvider.js +20 -0
- package/dist/prod/sap/base/security/URLListValidator.js +406 -0
- package/dist/prod/sap/base/security/encodeCSS.js +40 -0
- package/dist/prod/sap/base/security/encodeXML.js +53 -0
- package/dist/prod/sap/base/security/sanitizeHTML.js +38 -0
- package/dist/prod/sap/base/strings/toHex.js +33 -0
- package/dist/prod/sap/base/util/now.js +28 -0
- package/dist/prod/sap/base/util/uid.js +27 -0
- package/dist/prod/sap/ui/thirdparty/caja-html-sanitizer.js +3600 -0
- package/dist/prod/ssr-dom-shim.js +2 -0
- package/dist/prod/ssr-dom-shim.js.map +7 -0
- package/dist/prod/ssr-dom.js +2 -0
- package/dist/prod/ssr-dom.js.map +7 -0
- package/dist/prod/theming/CustomStyle.js +2 -0
- package/dist/prod/theming/CustomStyle.js.map +7 -0
- package/dist/prod/theming/ThemeLoaded.js +2 -0
- package/dist/prod/theming/ThemeLoaded.js.map +7 -0
- package/dist/prod/theming/ThemeRegistered.js +2 -0
- package/dist/prod/theming/ThemeRegistered.js.map +7 -0
- package/dist/prod/theming/applyTheme.js +2 -0
- package/dist/prod/theming/applyTheme.js.map +7 -0
- package/dist/prod/theming/getConstructableStyle.js +2 -0
- package/dist/prod/theming/getConstructableStyle.js.map +7 -0
- package/dist/prod/theming/getEffectiveStyle.js +2 -0
- package/dist/prod/theming/getEffectiveStyle.js.map +7 -0
- package/dist/prod/theming/getStylesString.js +2 -0
- package/dist/prod/theming/getStylesString.js.map +7 -0
- package/dist/prod/theming/getThemeDesignerTheme.js +2 -0
- package/dist/prod/theming/getThemeDesignerTheme.js.map +7 -0
- package/dist/prod/thirdparty/_merge.js +2 -0
- package/dist/prod/thirdparty/_merge.js.map +7 -0
- package/dist/prod/thirdparty/isPlainObject.js +2 -0
- package/dist/prod/thirdparty/isPlainObject.js.map +7 -0
- package/dist/prod/thirdparty/merge.js +2 -0
- package/dist/prod/thirdparty/merge.js.map +7 -0
- 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/AnimationMode.js +2 -0
- package/dist/prod/types/AnimationMode.js.map +7 -0
- package/dist/prod/types/CalendarType.js +2 -0
- package/dist/prod/types/CalendarType.js.map +7 -0
- package/dist/prod/types/InvisibleMessageMode.js +2 -0
- package/dist/prod/types/InvisibleMessageMode.js.map +7 -0
- package/dist/prod/types/ItemNavigationBehavior.js +2 -0
- package/dist/prod/types/ItemNavigationBehavior.js.map +7 -0
- package/dist/prod/types/MovePlacement.js +2 -0
- package/dist/prod/types/MovePlacement.js.map +7 -0
- package/dist/prod/types/NavigationMode.js +2 -0
- package/dist/prod/types/NavigationMode.js.map +7 -0
- package/dist/prod/types/Orientation.js +2 -0
- package/dist/prod/types/Orientation.js.map +7 -0
- package/dist/prod/types/SortOrder.js +2 -0
- package/dist/prod/types/SortOrder.js.map +7 -0
- package/dist/prod/types/ValueState.js +2 -0
- package/dist/prod/types/ValueState.js.map +7 -0
- package/dist/prod/types.js +2 -0
- package/dist/prod/types.js.map +7 -0
- package/dist/prod/updateShadowRoot.js +2 -0
- package/dist/prod/updateShadowRoot.js.map +7 -0
- package/dist/prod/util/AccessibilityTextsHelper.js +2 -0
- package/dist/prod/util/AccessibilityTextsHelper.js.map +7 -0
- package/dist/prod/util/Caret.js +2 -0
- package/dist/prod/util/Caret.js.map +7 -0
- package/dist/prod/util/ColorConversion.js +2 -0
- package/dist/prod/util/ColorConversion.js.map +7 -0
- package/dist/prod/util/FetchHelper.js +2 -0
- package/dist/prod/util/FetchHelper.js.map +7 -0
- package/dist/prod/util/FocusableElements.js +2 -0
- package/dist/prod/util/FocusableElements.js.map +7 -0
- package/dist/prod/util/HTMLSanitizer.js +2 -0
- package/dist/prod/util/HTMLSanitizer.js.map +7 -0
- package/dist/prod/util/InvisibleMessage.js +2 -0
- package/dist/prod/util/InvisibleMessage.js.map +7 -0
- package/dist/prod/util/PopupUtils.js +2 -0
- package/dist/prod/util/PopupUtils.js.map +7 -0
- package/dist/prod/util/SelectionAssistant.js +2 -0
- package/dist/prod/util/SelectionAssistant.js.map +7 -0
- package/dist/prod/util/SlotsHelper.js +2 -0
- package/dist/prod/util/SlotsHelper.js.map +7 -0
- package/dist/prod/util/StringHelper.js +2 -0
- package/dist/prod/util/StringHelper.js.map +7 -0
- package/dist/prod/util/TabbableElements.js +2 -0
- package/dist/prod/util/TabbableElements.js.map +7 -0
- package/dist/prod/util/arraysAreEqual.js +2 -0
- package/dist/prod/util/arraysAreEqual.js.map +7 -0
- package/dist/prod/util/clamp.js +2 -0
- package/dist/prod/util/clamp.js.map +7 -0
- package/dist/prod/util/createLinkInHead.js +2 -0
- package/dist/prod/util/createLinkInHead.js.map +7 -0
- package/dist/prod/util/debounce.js +2 -0
- package/dist/prod/util/debounce.js.map +7 -0
- package/dist/prod/util/detectNavigatorLanguage.js +2 -0
- package/dist/prod/util/detectNavigatorLanguage.js.map +7 -0
- package/dist/prod/util/dragAndDrop/DragRegistry.js +2 -0
- package/dist/prod/util/dragAndDrop/DragRegistry.js.map +7 -0
- package/dist/prod/util/dragAndDrop/findClosestPosition.js +2 -0
- package/dist/prod/util/dragAndDrop/findClosestPosition.js.map +7 -0
- 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/dragAndDrop/longDragOverHandler.js +2 -0
- package/dist/prod/util/dragAndDrop/longDragOverHandler.js.map +7 -0
- package/dist/prod/util/escapeRegex.js +2 -0
- package/dist/prod/util/escapeRegex.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/formatMessage.js +2 -0
- package/dist/prod/util/formatMessage.js.map +7 -0
- package/dist/prod/util/generateHighlightedMarkup.js +2 -0
- package/dist/prod/util/generateHighlightedMarkup.js.map +7 -0
- package/dist/prod/util/getActiveElement.js +2 -0
- package/dist/prod/util/getActiveElement.js.map +7 -0
- package/dist/prod/util/getClassCopy.js +2 -0
- package/dist/prod/util/getClassCopy.js.map +7 -0
- package/dist/prod/util/getDesigntimePropertyAsArray.js +2 -0
- package/dist/prod/util/getDesigntimePropertyAsArray.js.map +7 -0
- package/dist/prod/util/getEffectiveContentDensity.js +2 -0
- package/dist/prod/util/getEffectiveContentDensity.js.map +7 -0
- package/dist/prod/util/getEffectiveScrollbarStyle.js +26 -0
- package/dist/prod/util/getEffectiveScrollbarStyle.js.map +7 -0
- package/dist/prod/util/getFastNavigationGroups.js +2 -0
- package/dist/prod/util/getFastNavigationGroups.js.map +7 -0
- package/dist/prod/util/getFileExtension.js +2 -0
- package/dist/prod/util/getFileExtension.js.map +7 -0
- package/dist/prod/util/getNormalizedTarget.js +2 -0
- package/dist/prod/util/getNormalizedTarget.js.map +7 -0
- package/dist/prod/util/getSingletonElementInstance.js +2 -0
- package/dist/prod/util/getSingletonElementInstance.js.map +7 -0
- package/dist/prod/util/hash2str.js +2 -0
- package/dist/prod/util/hash2str.js.map +7 -0
- package/dist/prod/util/isElementClickable.js +2 -0
- package/dist/prod/util/isElementClickable.js.map +7 -0
- package/dist/prod/util/isElementHidden.js +2 -0
- package/dist/prod/util/isElementHidden.js.map +7 -0
- package/dist/prod/util/isElementInView.js +2 -0
- package/dist/prod/util/isElementInView.js.map +7 -0
- package/dist/prod/util/isElementTabbable.js +2 -0
- package/dist/prod/util/isElementTabbable.js.map +7 -0
- package/dist/prod/util/isValidPropertyName.js +2 -0
- package/dist/prod/util/isValidPropertyName.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/whenDOMReady.js +2 -0
- package/dist/prod/util/whenDOMReady.js.map +7 -0
- package/dist/prod/util/willShowContent.js +2 -0
- package/dist/prod/util/willShowContent.js.map +7 -0
- package/dist/prod/validateThemeRoot.js +2 -0
- package/dist/prod/validateThemeRoot.js.map +7 -0
- package/dist/renderer/JsxRenderer.d.ts +3 -0
- package/dist/renderer/JsxRenderer.js +16 -0
- package/dist/renderer/JsxRenderer.js.map +1 -0
- package/dist/renderer/LitRenderer.d.ts +5 -5
- package/dist/renderer/LitRenderer.js +5 -10
- package/dist/renderer/LitRenderer.js.map +1 -1
- package/dist/renderer/directives/style-map.d.ts +13 -0
- package/dist/renderer/directives/style-map.js +59 -59
- package/dist/renderer/directives/style-map.js.map +1 -0
- package/dist/renderer/executeTemplate.d.ts +3 -4
- package/dist/renderer/executeTemplate.js +1 -19
- package/dist/renderer/executeTemplate.js.map +1 -1
- package/dist/sap/base/Log.js +698 -188
- package/dist/sap/base/assert.js +28 -1
- package/dist/sap/base/config/MemoryConfigurationProvider.js +20 -0
- package/dist/sap/base/security/URLListValidator.js +253 -6
- package/dist/sap/base/security/encodeCSS.js +34 -8
- package/dist/sap/base/security/encodeXML.js +47 -17
- package/dist/sap/base/security/sanitizeHTML.js +35 -13
- package/dist/sap/base/strings/toHex.js +27 -2
- package/dist/sap/base/util/now.js +24 -3
- package/dist/sap/base/util/uid.js +27 -0
- package/dist/sap/ui/thirdparty/caja-html-sanitizer.js +113 -98
- package/dist/ssr-dom-shim.d.ts +1 -0
- package/dist/ssr-dom-shim.js +62 -0
- package/dist/ssr-dom-shim.js.map +1 -0
- 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 +7 -5
- package/dist/theming/CustomStyle.js.map +1 -1
- package/dist/theming/ThemeLoaded.js.map +1 -1
- package/dist/theming/ThemeRegistered.d.ts +4 -0
- package/dist/theming/ThemeRegistered.js +11 -0
- package/dist/theming/ThemeRegistered.js.map +1 -0
- package/dist/theming/applyTheme.js +9 -8
- package/dist/theming/applyTheme.js.map +1 -1
- package/dist/theming/getConstructableStyle.d.ts +2 -2
- package/dist/theming/getConstructableStyle.js +3 -3
- package/dist/theming/getConstructableStyle.js.map +1 -1
- package/dist/theming/getEffectiveStyle.d.ts +1 -1
- package/dist/theming/getEffectiveStyle.js +5 -12
- package/dist/theming/getEffectiveStyle.js.map +1 -1
- package/dist/theming/getStylesString.d.ts +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/merge.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/AnimationMode.d.ts +0 -8
- package/dist/types/AnimationMode.js +0 -8
- package/dist/types/AnimationMode.js.map +1 -1
- package/dist/types/CalendarType.d.ts +0 -9
- package/dist/types/CalendarType.js +0 -9
- package/dist/types/CalendarType.js.map +1 -1
- package/dist/types/InvisibleMessageMode.d.ts +5 -10
- package/dist/types/InvisibleMessageMode.js +4 -11
- package/dist/types/InvisibleMessageMode.js.map +1 -1
- package/dist/types/ItemNavigationBehavior.d.ts +0 -6
- package/dist/types/ItemNavigationBehavior.js +0 -6
- package/dist/types/ItemNavigationBehavior.js.map +1 -1
- package/dist/types/MovePlacement.d.ts +20 -0
- package/dist/types/MovePlacement.js +22 -0
- package/dist/types/MovePlacement.js.map +1 -0
- package/dist/types/NavigationMode.d.ts +0 -8
- package/dist/types/NavigationMode.js +0 -8
- package/dist/types/NavigationMode.js.map +1 -1
- package/dist/types/Orientation.d.ts +16 -0
- package/dist/types/Orientation.js +18 -0
- package/dist/types/Orientation.js.map +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/ValueState.d.ts +3 -17
- package/dist/types/ValueState.js +3 -17
- package/dist/types/ValueState.js.map +1 -1
- package/dist/types.d.ts +37 -14
- package/dist/types.js.map +1 -1
- package/dist/updateShadowRoot.d.ts +1 -2
- package/dist/updateShadowRoot.js +4 -21
- package/dist/updateShadowRoot.js.map +1 -1
- package/dist/util/AccessibilityTextsHelper.d.ts +17 -0
- package/dist/util/AccessibilityTextsHelper.js +199 -0
- 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 +233 -216
- package/dist/util/ColorConversion.js.map +1 -1
- package/dist/util/FetchHelper.js.map +1 -1
- package/dist/util/FocusableElements.js +52 -14
- package/dist/util/FocusableElements.js.map +1 -1
- package/dist/util/HTMLSanitizer.js.map +1 -1
- package/dist/util/InvisibleMessage.js +2 -2
- package/dist/util/InvisibleMessage.js.map +1 -1
- package/dist/util/PopupUtils.d.ts +2 -4
- package/dist/util/PopupUtils.js +7 -21
- package/dist/util/PopupUtils.js.map +1 -1
- package/dist/util/SelectionAssistant.d.ts +12 -0
- package/dist/util/SelectionAssistant.js +79 -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 +3 -10
- package/dist/util/TabbableElements.js.map +1 -1
- package/dist/util/arraysAreEqual.js.map +1 -1
- package/dist/util/clamp.js +2 -1
- package/dist/util/clamp.js.map +1 -1
- package/dist/util/createLinkInHead.d.ts +1 -1
- package/dist/util/createLinkInHead.js +1 -1
- package/dist/util/createLinkInHead.js.map +1 -1
- package/dist/util/debounce.js.map +1 -1
- package/dist/util/detectNavigatorLanguage.d.ts +2 -2
- package/dist/util/detectNavigatorLanguage.js +6 -1
- package/dist/util/detectNavigatorLanguage.js.map +1 -1
- package/dist/util/dragAndDrop/DragRegistry.d.ts +33 -0
- package/dist/util/dragAndDrop/DragRegistry.js +66 -0
- package/dist/util/dragAndDrop/DragRegistry.js.map +1 -0
- package/dist/util/dragAndDrop/findClosestPosition.d.ts +12 -0
- package/dist/util/dragAndDrop/findClosestPosition.js +106 -0
- package/dist/util/dragAndDrop/findClosestPosition.js.map +1 -0
- 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.d.ts +2 -0
- package/dist/util/dragAndDrop/longDragOverHandler.js +25 -0
- package/dist/util/dragAndDrop/longDragOverHandler.js.map +1 -0
- package/dist/util/escapeRegex.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 +145 -104
- package/dist/util/getClassCopy.js.map +1 -1
- package/dist/util/getDesigntimePropertyAsArray.d.ts +2 -2
- package/dist/util/getDesigntimePropertyAsArray.js +2 -1
- package/dist/util/getDesigntimePropertyAsArray.js.map +1 -1
- package/dist/util/getEffectiveContentDensity.js.map +1 -1
- package/dist/util/getEffectiveScrollbarStyle.d.ts +1 -1
- package/dist/util/getEffectiveScrollbarStyle.js +31 -1
- package/dist/util/getEffectiveScrollbarStyle.js.map +1 -1
- 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/getSingletonElementInstance.d.ts +10 -1
- package/dist/util/getSingletonElementInstance.js +11 -2
- 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.map +1 -1
- package/dist/util/isElementInView.js.map +1 -1
- package/dist/util/isElementTabbable.js +2 -2
- package/dist/util/isElementTabbable.js.map +1 -1
- 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/whenDOMReady.js.map +1 -1
- package/dist/util/willShowContent.js.map +1 -1
- package/dist/validateThemeRoot.js +15 -13
- package/dist/validateThemeRoot.js.map +1 -1
- package/dist/vscode.html-custom-data.json +22 -0
- package/index.js +205 -1
- package/package-scripts.cjs +74 -0
- package/package.json +37 -10
- package/src/css/FontFace.css +47 -17
- package/src/css/SystemCSSVars.css +0 -8
- 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 -12
- package/.eslintignore +0 -15
- package/bundle.esm.js +0 -60
- package/config/wdio.conf.js +0 -1
- package/dist/CSP.d.ts +0 -30
- package/dist/CSP.js +0 -51
- package/dist/CSP.js.map +0 -1
- package/dist/MarkedEvents.d.ts +0 -9
- package/dist/MarkedEvents.js +0 -15
- package/dist/MarkedEvents.js.map +0 -1
- package/dist/StaticArea.d.ts +0 -0
- package/dist/StaticArea.js +0 -6
- package/dist/StaticArea.js.map +0 -1
- package/dist/StaticAreaItem.d.ts +0 -36
- package/dist/StaticAreaItem.js +0 -99
- package/dist/StaticAreaItem.js.map +0 -1
- package/dist/api.json +0 -1
- package/dist/assets/bundle.esm.ffad994a.js +0 -56
- package/dist/assets-meta/IconCollectionsAlias.d.ts +0 -17
- package/dist/assets-meta/IconCollectionsAlias.js +0 -18
- package/dist/assets-meta/IconCollectionsAlias.js.map +0 -1
- package/dist/config/RTL.d.ts +0 -7
- package/dist/config/RTL.js +0 -34
- package/dist/config/RTL.js.map +0 -1
- package/dist/config/ThemeRoots.d.ts +0 -4
- package/dist/config/ThemeRoots.js +0 -28
- package/dist/config/ThemeRoots.js.map +0 -1
- package/dist/decorators/fastNavigation.d.ts +0 -7
- package/dist/decorators/fastNavigation.js +0 -13
- package/dist/decorators/fastNavigation.js.map +0 -1
- package/dist/decorators/languageAware.d.ts +0 -7
- package/dist/decorators/languageAware.js +0 -13
- package/dist/decorators/languageAware.js.map +0 -1
- package/dist/decorators/themeAware.d.ts +0 -7
- package/dist/decorators/themeAware.js +0 -13
- package/dist/decorators/themeAware.js.map +0 -1
- package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.js +0 -11
- package/dist/theming/getEffectiveLinksHrefs.d.ts +0 -3
- package/dist/theming/getEffectiveLinksHrefs.js +0 -17
- package/dist/theming/getEffectiveLinksHrefs.js.map +0 -1
- package/dist/theming/preloadLinks.d.ts +0 -3
- package/dist/theming/preloadLinks.js +0 -19
- package/dist/theming/preloadLinks.js.map +0 -1
- package/dist/types/CSSColor.d.ts +0 -16
- package/dist/types/CSSColor.js +0 -19
- package/dist/types/CSSColor.js.map +0 -1
- package/dist/types/DOMReference.d.ts +0 -17
- package/dist/types/DOMReference.js +0 -25
- package/dist/types/DOMReference.js.map +0 -1
- package/dist/types/DataType.d.ts +0 -25
- package/dist/types/DataType.js +0 -44
- package/dist/types/DataType.js.map +0 -1
- package/dist/types/Float.d.ts +0 -18
- package/dist/types/Float.js +0 -22
- package/dist/types/Float.js.map +0 -1
- package/dist/types/Integer.d.ts +0 -18
- package/dist/types/Integer.js +0 -22
- package/dist/types/Integer.js.map +0 -1
- package/dist/util/AriaLabelHelper.d.ts +0 -6
- package/dist/util/AriaLabelHelper.js +0 -44
- package/dist/util/AriaLabelHelper.js.map +0 -1
- package/dist/util/createStyleInHead.d.ts +0 -8
- package/dist/util/createStyleInHead.js +0 -18
- package/dist/util/createStyleInHead.js.map +0 -1
- package/lib/generate-asset-parameters/index.js +0 -25
- package/lib/generate-styles/index.js +0 -26
- package/lib/generate-version-info/index.js +0 -32
- package/package-scripts.js +0 -67
- package/src/AssetRegistry.ts +0 -11
- package/src/Boot.ts +0 -61
- package/src/CSP.ts +0 -66
- package/src/CustomElementsRegistry.ts +0 -98
- package/src/CustomElementsScope.ts +0 -33
- package/src/CustomElementsScopeUtils.ts +0 -115
- package/src/DOMObserver.ts +0 -28
- package/src/Device.ts +0 -124
- package/src/EventProvider.ts +0 -87
- package/src/FeaturesRegistry.ts +0 -14
- package/src/FontFace.ts +0 -31
- package/src/InitialConfiguration.ts +0 -207
- package/src/Keys.ts +0 -295
- package/src/ManagedStyles.ts +0 -92
- package/src/MarkedEvents.ts +0 -20
- package/src/MediaRange.ts +0 -110
- package/src/PropertiesFileFormat.ts +0 -95
- package/src/Render.ts +0 -180
- package/src/RenderQueue.ts +0 -71
- package/src/Runtimes.ts +0 -114
- package/src/StaticArea.ts +0 -3
- package/src/StaticAreaItem.ts +0 -113
- package/src/SystemCSSVars.ts +0 -10
- package/src/Theming.ts +0 -4
- package/src/UI5Element.ts +0 -1155
- package/src/UI5ElementMetadata.ts +0 -389
- package/src/animations/AnimationQueue.ts +0 -43
- package/src/animations/animate.ts +0 -64
- package/src/animations/scroll.ts +0 -21
- package/src/animations/slideDown.ts +0 -72
- package/src/animations/slideUp.ts +0 -67
- package/src/asset-registries/Icons.ts +0 -162
- package/src/asset-registries/Illustrations.ts +0 -75
- package/src/asset-registries/LocaleData.ts +0 -172
- package/src/asset-registries/Themes.ts +0 -67
- package/src/asset-registries/i18n.ts +0 -118
- package/src/assets-meta/IconCollectionsAlias.ts +0 -18
- package/src/config/AnimationMode.ts +0 -33
- package/src/config/CalendarType.ts +0 -23
- package/src/config/FormatSettings.ts +0 -21
- package/src/config/Icons.ts +0 -59
- package/src/config/Language.ts +0 -72
- package/src/config/NoConflict.ts +0 -67
- package/src/config/RTL.ts +0 -41
- package/src/config/Theme.ts +0 -64
- package/src/config/ThemeRoots.ts +0 -41
- package/src/decorators/customElement.ts +0 -17
- package/src/decorators/event.ts +0 -28
- package/src/decorators/fastNavigation.ts +0 -14
- package/src/decorators/languageAware.ts +0 -14
- package/src/decorators/property.ts +0 -30
- package/src/decorators/slot.ts +0 -49
- package/src/decorators/themeAware.ts +0 -14
- package/src/delegate/ItemNavigation.ts +0 -393
- package/src/delegate/ResizeHandler.ts +0 -95
- package/src/delegate/ScrollEnablement.ts +0 -221
- package/src/features/F6Navigation.ts +0 -141
- package/src/features/OpenUI5Element.ts +0 -11
- package/src/features/OpenUI5Enablement.ts +0 -117
- package/src/features/OpenUI5Support.ts +0 -148
- package/src/getSharedResource.ts +0 -30
- package/src/i18nBundle.ts +0 -108
- package/src/locale/Locale.ts +0 -101
- package/src/locale/RTLAwareRegistry.ts +0 -16
- package/src/locale/applyDirection.ts +0 -18
- package/src/locale/directionChange.ts +0 -34
- package/src/locale/getEffectiveDir.ts +0 -28
- package/src/locale/getLocale.ts +0 -46
- package/src/locale/languageChange.ts +0 -24
- package/src/locale/nextFallbackLocale.ts +0 -28
- package/src/locale/normalizeLocale.ts +0 -56
- package/src/renderer/LitRenderer.ts +0 -60
- package/src/renderer/directives/style-map.js +0 -72
- package/src/renderer/executeTemplate.ts +0 -40
- package/src/theming/CustomStyle.ts +0 -62
- package/src/theming/ThemeLoaded.ts +0 -24
- package/src/theming/applyTheme.ts +0 -90
- package/src/theming/getConstructableStyle.ts +0 -31
- package/src/theming/getEffectiveLinksHrefs.ts +0 -26
- package/src/theming/getEffectiveStyle.ts +0 -41
- package/src/theming/getStylesString.ts +0 -15
- package/src/theming/getThemeDesignerTheme.ts +0 -101
- package/src/theming/preloadLinks.ts +0 -24
- package/src/thirdparty/_merge.ts +0 -32
- package/src/thirdparty/isPlainObject.ts +0 -18
- package/src/thirdparty/merge.ts +0 -5
- package/src/types/AnimationMode.ts +0 -33
- package/src/types/CSSColor.ts +0 -20
- package/src/types/CalendarType.ts +0 -38
- package/src/types/DOMReference.ts +0 -28
- package/src/types/DataType.ts +0 -51
- package/src/types/Float.ts +0 -25
- package/src/types/Integer.ts +0 -25
- package/src/types/InvisibleMessageMode.ts +0 -27
- package/src/types/ItemNavigationBehavior.ts +0 -26
- package/src/types/NavigationMode.ts +0 -33
- package/src/types/ValueState.ts +0 -47
- package/src/types.ts +0 -30
- package/src/updateShadowRoot.ts +0 -37
- package/src/util/AriaLabelHelper.ts +0 -63
- package/src/util/Caret.ts +0 -28
- package/src/util/ColorConversion.ts +0 -399
- package/src/util/FetchHelper.ts +0 -31
- package/src/util/FocusableElements.ts +0 -82
- package/src/util/HTMLSanitizer.ts +0 -9
- package/src/util/InvisibleMessage.ts +0 -69
- package/src/util/PopupUtils.ts +0 -114
- package/src/util/SlotsHelper.ts +0 -39
- package/src/util/StringHelper.ts +0 -26
- package/src/util/TabbableElements.ts +0 -70
- package/src/util/arraysAreEqual.ts +0 -15
- package/src/util/clamp.ts +0 -12
- package/src/util/createLinkInHead.ts +0 -25
- package/src/util/createStyleInHead.ts +0 -20
- package/src/util/debounce.ts +0 -18
- package/src/util/detectNavigatorLanguage.ts +0 -13
- package/src/util/escapeRegex.ts +0 -11
- package/src/util/formatMessage.ts +0 -24
- package/src/util/generateHighlightedMarkup.ts +0 -43
- package/src/util/getActiveElement.ts +0 -11
- package/src/util/getClassCopy.ts +0 -12
- package/src/util/getDesigntimePropertyAsArray.ts +0 -4
- package/src/util/getEffectiveContentDensity.ts +0 -5
- package/src/util/getEffectiveScrollbarStyle.ts +0 -5
- package/src/util/getFastNavigationGroups.ts +0 -63
- package/src/util/getFileExtension.ts +0 -21
- package/src/util/getNormalizedTarget.ts +0 -16
- package/src/util/getSingletonElementInstance.ts +0 -13
- package/src/util/isElementClickable.ts +0 -19
- package/src/util/isElementHidden.ts +0 -9
- package/src/util/isElementInView.ts +0 -15
- package/src/util/isElementTabbable.ts +0 -37
- package/src/util/isValidPropertyName.ts +0 -29
- package/src/util/whenDOMReady.ts +0 -13
- package/src/util/willShowContent.ts +0 -7
- package/src/validateThemeRoot.ts +0 -58
- package/used-modules.txt +0 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"F6Navigation.js","sourceRoot":"","sources":["../../src/features/F6Navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,uBAAuB,MAAM,oCAAoC,CAAC;AAEzE,MAAM,YAAY;IAMjB;QAHA,kBAAa,GAAuB,IAAI,CAAC;QACzC,WAAM,GAAuB,EAAE,CAAC;QAG/B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAmC,CAAC;QACxF,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC7B,CAAC;IAED,oBAAoB;QACnB,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;IAC3D,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,KAAoB;QACzC,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;YACpB,IAAI,CAAC,YAAY,EAAE,CAAC;YAEpB,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC3B,OAAO;aACP;YAED,KAAK,CAAC,cAAc,EAAE,CAAC;YAEvB,IAAI,SAAS,GAAG,CAAC,CAAC,CAAC;YACnB,IAAI,WAAW,CAAC;YAChB,IAAI,IAAI,CAAC,aAAa,EAAE;gBACvB,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;aACpD;YAED,IAAI,SAAS,GAAG,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AAC;YAC1B,UAAU,CAAC,QAAQ,GAAG,IAAI,YAAY,EAAE,CAAC;QAC1C,CAAC;aAAM,IAAI,YAAY,CAAC,UAAU,CAAC,QAAQ,EAAE,gBAAgB,CAAC,EAAE,CAAC;YAChE,UAAU,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC;YAC/B,UAAU,CAAC,QAAQ,GAAG,IAAI,YAAY,EAAE,CAAC;QAC1C,CAAC;IACF,CAAC;CACD;AAED,eAAe,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;AAE9C,eAAe,YAAY,CAAC","sourcesContent":["import { registerFeature } from \"../FeaturesRegistry.js\";\nimport { isF6Next, isF6Previous } from \"../Keys.js\";\nimport { instanceOfUI5Element } from \"../UI5Element.js\";\nimport { getFirstFocusableElement } from \"../util/FocusableElements.js\";\nimport getFastNavigationGroups from \"../util/getFastNavigationGroups.js\";\nimport isElementClickable from \"../util/isElementClickable.js\";\nimport { getCurrentRuntimeIndex, compareRuntimes } from \"../Runtimes.js\";\nimport getSharedResource from \"../getSharedResource.js\";\n\ntype F6Registry = {\n\tinstance?: F6Navigation,\n}\n\nconst currentRuntimeINdex = getCurrentRuntimeIndex();\n\nconst shouldUpdate = (runtimeIndex: number | undefined) => {\n\tif (runtimeIndex === undefined) {\n\t\treturn true;\n\t}\n\treturn compareRuntimes(currentRuntimeINdex, runtimeIndex) === 1; // 1 means the current is newer, 0 means the same, -1 means the resource's runtime is newer\n};\n\nclass F6Navigation {\n\tkeydownHandler: (event: KeyboardEvent) => void;\n\tselectedGroup: HTMLElement | null = null;\n\tgroups: Array<HTMLElement> = [];\n\n\tconstructor() {\n\t\tthis.keydownHandler = this._keydownHandler.bind(this) as (event: KeyboardEvent) => void;\n\t\tthis.attachEventListeners();\n\t}\n\n\tattachEventListeners() {\n\t\tdocument.addEventListener(\"keydown\", this.keydownHandler);\n\t}\n\n\tremoveEventListeners() {\n\t\tdocument.removeEventListener(\"keydown\", this.keydownHandler);\n\t}\n\n\tasync groupElementToFocus(nextElement: HTMLElement) {\n\t\tlet nextElementDomRef = nextElement;\n\n\t\tif (instanceOfUI5Element(nextElement)) {\n\t\t\tnextElementDomRef = nextElement.getDomRef() || nextElement.firstElementChild as HTMLElement;\n\t\t}\n\n\t\tif (nextElementDomRef) {\n\t\t\tif (isElementClickable(nextElementDomRef)) {\n\t\t\t\treturn nextElementDomRef;\n\t\t\t}\n\n\t\t\tconst elementToFocus = await getFirstFocusableElement(nextElementDomRef);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\treturn elementToFocus;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync findNextFocusableGroupElement(currentIndex: number) {\n\t\tlet elementToFocus;\n\n\t\t/* eslint-disable no-await-in-loop */\n\t\tfor (let index = 0; index < this.groups.length; index++) {\n\t\t\tlet nextElement;\n\n\t\t\tif (currentIndex > -1) {\n\t\t\t\tif (currentIndex + 1 >= this.groups.length) {\n\t\t\t\t\tcurrentIndex = 0;\n\t\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t\t} else {\n\t\t\t\t\tcurrentIndex += 1;\n\t\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcurrentIndex = 0;\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t}\n\n\t\t\telementToFocus = await this.groupElementToFocus(nextElement);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t/* eslint-enable no-await-in-loop */\n\n\t\treturn elementToFocus;\n\t}\n\n\tasync findPreviousFocusableGroupElement(currentIndex: number) {\n\t\tlet elementToFocus;\n\n\t\t/* eslint-disable no-await-in-loop */\n\t\tfor (let index = 0; index < this.groups.length; index++) {\n\t\t\tlet nextElement;\n\n\t\t\tif (currentIndex > 0) {\n\t\t\t\t// Handle the situation where the first focusable element of two neighbor groups is the same\n\t\t\t\t// For example:\n\t\t\t\t// <ui5-flexible-column-layout>\n\t\t\t\t// <ui5-list>\n\t\t\t\t// <ui5-li>List Item</ui5-li>\n\t\t\t\t// </ui5-list>\n\t\t\t\t// </ui5-flexible-column-layout>\n\t\t\t\t// Here for both FCL & List the firstFoccusableElement is the same (the ui5-li)\n\t\t\t\tconst firstFocusable = await this.groupElementToFocus(this.groups[currentIndex - 1]);\n\t\t\t\tconst shouldSkipParent = firstFocusable === await this.groupElementToFocus(this.groups[currentIndex]);\n\n\t\t\t\tcurrentIndex = shouldSkipParent ? currentIndex - 2 : currentIndex - 1;\n\n\t\t\t\tif (currentIndex < 0) {\n\t\t\t\t\tcurrentIndex = this.groups.length - 1;\n\t\t\t\t}\n\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t} else {\n\t\t\t\tcurrentIndex = this.groups.length - 1;\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t}\n\n\t\t\telementToFocus = await this.groupElementToFocus(nextElement);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t/* eslint-enable no-await-in-loop */\n\n\t\treturn elementToFocus;\n\t}\n\n\tasync _keydownHandler(event: KeyboardEvent) {\n\t\tconst forward = isF6Next(event);\n\t\tconst backward = isF6Previous(event);\n\t\tif (!(forward || backward)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.updateGroups();\n\n\t\tif (this.groups.length < 1) {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\n\t\tlet elementToFocus;\n\n\t\tif (this.groups.length === 0) {\n\t\t\telementToFocus = await this.groupElementToFocus(this.groups[0]);\n\n\t\t\treturn elementToFocus?.focus();\n\t\t}\n\n\t\tlet currentIndex = -1;\n\n\t\tif (this.selectedGroup) {\n\t\t\tcurrentIndex = this.groups.indexOf(this.selectedGroup);\n\t\t}\n\n\t\tif (forward) {\n\t\t\telementToFocus = await this.findNextFocusableGroupElement(currentIndex);\n\t\t}\n\n\t\tif (backward) {\n\t\t\telementToFocus = await this.findPreviousFocusableGroupElement(currentIndex);\n\t\t}\n\n\t\telementToFocus?.focus();\n\t}\n\n\tupdateGroups() {\n\t\tconst container = this.findContainer();\n\n\t\tthis.setSelectedGroup();\n\t\tthis.groups = getFastNavigationGroups(container);\n\t}\n\n\tfindContainer() {\n\t\tconst htmlElement = window.document.querySelector(\"html\");\n\t\tlet element = this.deepActive(window.document);\n\n\t\twhile (element && element !== htmlElement) {\n\t\t\tconst closestScopeEl = element.closest<HTMLElement>(\"[data-sap-ui-fastnavgroup-container='true']\");\n\n\t\t\tif (closestScopeEl) {\n\t\t\t\treturn closestScopeEl;\n\t\t\t}\n\n\t\t\telement = element.parentElement ? element.parentElement : (element.parentNode as ShadowRoot).host;\n\t\t}\n\n\t\treturn document.body;\n\t}\n\n\tsetSelectedGroup(root: DocumentOrShadowRoot = window.document) {\n\t\tconst htmlElement = window.document.querySelector(\"html\");\n\t\tlet element: Element | null | ParentNode = this.deepActive(root);\n\n\t\twhile (element && (element as Element).getAttribute(\"data-sap-ui-fastnavgroup\") !== \"true\" && element !== htmlElement) {\n\t\t\telement = element.parentElement ? element.parentNode : (element.parentNode as ShadowRoot).host;\n\t\t}\n\n\t\tthis.selectedGroup = element as HTMLElement;\n\t}\n\n\tdeepActive(root: DocumentOrShadowRoot): Element | null {\n\t\tif (root?.activeElement?.shadowRoot?.activeElement) {\n\t\t\treturn this.deepActive(root.activeElement.shadowRoot);\n\t\t}\n\n\t\treturn root.activeElement;\n\t}\n\n\tdestroy() {\n\t\tthis.removeEventListeners();\n\t}\n\n\tget _ui5RuntimeIndex() {\n\t\treturn currentRuntimeINdex;\n\t}\n\n\tstatic init() {\n\t\tconst f6Registry = getSharedResource<F6Registry>(\"F6Registry\", {});\n\n\t\tif (!f6Registry.instance) {\n\t\t\tf6Registry.instance = new F6Navigation();\n\t\t} else if (shouldUpdate(f6Registry.instance?._ui5RuntimeIndex)) {\n\t\t\tf6Registry.instance?.destroy();\n\t\t\tf6Registry.instance = new F6Navigation();\n\t\t}\n\t}\n}\n\nregisterFeature(\"F6Navigation\", F6Navigation);\n\nexport default F6Navigation;\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type UI5Element from "../UI5Element.js";
|
|
2
|
+
interface IFormInputElement extends UI5Element {
|
|
3
|
+
name?: string;
|
|
4
|
+
formFormattedValue: FormData | string | null;
|
|
5
|
+
formValidityMessage?: string;
|
|
6
|
+
formValidity?: ValidityStateFlags;
|
|
7
|
+
formElementAnchor?: () => HTMLElement | undefined | Promise<HTMLElement | undefined>;
|
|
8
|
+
}
|
|
9
|
+
declare const updateFormValue: (element: IFormInputElement | UI5Element) => void;
|
|
10
|
+
declare const setFormValue: (element: IFormInputElement) => void;
|
|
11
|
+
declare const setFormValidity: (element: IFormInputElement) => Promise<void>;
|
|
12
|
+
declare const submitForm: (element: UI5Element) => void;
|
|
13
|
+
declare const resetForm: (element: UI5Element) => void;
|
|
14
|
+
export { updateFormValue, setFormValue, setFormValidity, submitForm, resetForm, };
|
|
15
|
+
export type { IFormInputElement, };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const updateFormValue = (element) => {
|
|
2
|
+
if (isInputElement(element)) {
|
|
3
|
+
setFormValue(element);
|
|
4
|
+
}
|
|
5
|
+
};
|
|
6
|
+
const setFormValue = (element) => {
|
|
7
|
+
if (!element._internals?.form) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
setFormValidity(element);
|
|
11
|
+
if (!element.name) {
|
|
12
|
+
element._internals?.setFormValue(null);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
element._internals.setFormValue(element.formFormattedValue);
|
|
16
|
+
};
|
|
17
|
+
const setFormValidity = async (element) => {
|
|
18
|
+
if (!element._internals?.form) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (element.formValidity && Object.keys(element.formValidity).some(key => key)) {
|
|
22
|
+
const focusRef = await element.formElementAnchor?.();
|
|
23
|
+
element._internals.setValidity(element.formValidity, element.formValidityMessage, focusRef);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
element._internals.setValidity({});
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const submitForm = (element) => {
|
|
30
|
+
element._internals?.form?.requestSubmit();
|
|
31
|
+
};
|
|
32
|
+
const resetForm = (element) => {
|
|
33
|
+
element._internals?.form?.reset();
|
|
34
|
+
};
|
|
35
|
+
const isInputElement = (element) => {
|
|
36
|
+
return "formFormattedValue" in element && "name" in element;
|
|
37
|
+
};
|
|
38
|
+
export { updateFormValue, setFormValue, setFormValidity, submitForm, resetForm, };
|
|
39
|
+
//# sourceMappingURL=InputElementsFormSupport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputElementsFormSupport.js","sourceRoot":"","sources":["../../src/features/InputElementsFormSupport.ts"],"names":[],"mappings":"AAUA,MAAM,eAAe,GAAG,CAAC,OAAuC,EAAE,EAAE;IACnE,IAAI,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;QAC7B,YAAY,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,OAA0B,EAAE,EAAE;IACnD,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC;QAC/B,OAAO;IACR,CAAC;IAED,eAAe,CAAC,OAAO,CAAC,CAAC;IAEzB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QACnB,OAAO,CAAC,UAAU,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;QACvC,OAAO;IACR,CAAC;IAED,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAC7D,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,KAAK,EAAE,OAA0B,EAAE,EAAE;IAC5D,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC;QAC/B,OAAO;IACR,CAAC;IACD,IAAI,OAAO,CAAC,YAAY,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;QAChF,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC;QACrD,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC,mBAAmB,EAAE,QAAQ,CAAC,CAAC;IAC7F,CAAC;SAAM,CAAC;QACP,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;IACpC,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,OAAmB,EAAE,EAAE;IAC1C,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;AAC3C,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,OAAmB,EAAE,EAAE;IACzC,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AACnC,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,OAAuC,EAAgC,EAAE;IAChG,OAAO,oBAAoB,IAAI,OAAO,IAAI,MAAM,IAAI,OAAO,CAAC;AAC7D,CAAC,CAAC;AAEF,OAAO,EACN,eAAe,EACf,YAAY,EACZ,eAAe,EACf,UAAU,EACV,SAAS,GACT,CAAC","sourcesContent":["import type UI5Element from \"../UI5Element.js\";\n\ninterface IFormInputElement extends UI5Element {\n\tname?: string;\n\tformFormattedValue: FormData | string | null;\n\tformValidityMessage?: string;\n\tformValidity?: ValidityStateFlags;\n\tformElementAnchor?: () => HTMLElement | undefined | Promise<HTMLElement | undefined>;\n}\n\nconst updateFormValue = (element: IFormInputElement | UI5Element) => {\n\tif (isInputElement(element)) {\n\t\tsetFormValue(element);\n\t}\n};\n\nconst setFormValue = (element: IFormInputElement) => {\n\tif (!element._internals?.form) {\n\t\treturn;\n\t}\n\n\tsetFormValidity(element);\n\n\tif (!element.name) {\n\t\telement._internals?.setFormValue(null);\n\t\treturn;\n\t}\n\n\telement._internals.setFormValue(element.formFormattedValue);\n};\n\nconst setFormValidity = async (element: IFormInputElement) => {\n\tif (!element._internals?.form) {\n\t\treturn;\n\t}\n\tif (element.formValidity && Object.keys(element.formValidity).some(key => key)) {\n\t\tconst focusRef = await element.formElementAnchor?.();\n\t\telement._internals.setValidity(element.formValidity, element.formValidityMessage, focusRef);\n\t} else {\n\t\telement._internals.setValidity({});\n\t}\n};\n\nconst submitForm = (element: UI5Element) => {\n\telement._internals?.form?.requestSubmit();\n};\n\nconst resetForm = (element: UI5Element) => {\n\telement._internals?.form?.reset();\n};\n\nconst isInputElement = (element: IFormInputElement | UI5Element): element is IFormInputElement => {\n\treturn \"formFormattedValue\" in element && \"name\" in element;\n};\n\nexport {\n\tupdateFormValue,\n\tsetFormValue,\n\tsetFormValidity,\n\tsubmitForm,\n\tresetForm,\n};\n\nexport type {\n\tIFormInputElement,\n};\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { FormatSettings } from "../config/FormatSettings.js";
|
|
2
|
+
type IslamicToGregorianMapping = {
|
|
3
|
+
dateFormat: string;
|
|
4
|
+
islamicMonthStart: string;
|
|
5
|
+
gregDate: string;
|
|
6
|
+
};
|
|
7
|
+
type LegacyDateCalendarCustomizing = Array<IslamicToGregorianMapping>;
|
|
8
|
+
declare class LegacyDateFormats {
|
|
9
|
+
/**
|
|
10
|
+
* Returns the currently set customizing data for Islamic calendar support
|
|
11
|
+
*
|
|
12
|
+
* @return {object[]} Returns an array that contains the customizing data.
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
static getLegacyDateCalendarCustomizing(this: void): LegacyDateCalendarCustomizing;
|
|
16
|
+
}
|
|
17
|
+
export default LegacyDateFormats;
|
|
18
|
+
export type { FormatSettings, LegacyDateCalendarCustomizing, };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { getFormatSettings } from "../InitialConfiguration.js";
|
|
2
|
+
import { registerFeature } from "../FeaturesRegistry.js";
|
|
3
|
+
let formatSettings;
|
|
4
|
+
class LegacyDateFormats {
|
|
5
|
+
/**
|
|
6
|
+
* Returns the currently set customizing data for Islamic calendar support
|
|
7
|
+
*
|
|
8
|
+
* @return {object[]} Returns an array that contains the customizing data.
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
static getLegacyDateCalendarCustomizing() {
|
|
12
|
+
if (formatSettings === undefined) {
|
|
13
|
+
formatSettings = getFormatSettings();
|
|
14
|
+
}
|
|
15
|
+
return formatSettings.legacyDateCalendarCustomizing || [];
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
registerFeature("LegacyDateFormats", LegacyDateFormats);
|
|
19
|
+
export default LegacyDateFormats;
|
|
20
|
+
//# sourceMappingURL=LegacyDateFormats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegacyDateFormats.js","sourceRoot":"","sources":["../../src/features/LegacyDateFormats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAazD,IAAI,cAA8B,CAAC;AAEnC,MAAM,iBAAiB;IACtB;;;;;OAKG;IACH,MAAM,CAAC,gCAAgC;QACtC,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YAClC,cAAc,GAAG,iBAAiB,EAAE,CAAC;QACtC,CAAC;QAED,OAAO,cAAc,CAAC,6BAA6B,IAAI,EAAE,CAAC;IAC3D,CAAC;CACD;AAED,eAAe,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,CAAC;AAExD,eAAe,iBAAiB,CAAC","sourcesContent":["import { getFormatSettings } from \"../InitialConfiguration.js\";\nimport type { FormatSettings } from \"../config/FormatSettings.js\";\nimport { registerFeature } from \"../FeaturesRegistry.js\";\n\n// Allows specifying the customizing data for Islamic calendar support\n// dateFormat - The date format\n// islamicMonthStart - The Islamic date in string format // 14360101\n// gregDate - Corresponding Gregorian date to the Islamic one in string format // 20141024\ntype IslamicToGregorianMapping = {\n\tdateFormat: string,\n\tislamicMonthStart: string,\n\tgregDate: string,\n};\ntype LegacyDateCalendarCustomizing = Array<IslamicToGregorianMapping>;\n\nlet formatSettings: FormatSettings;\n\nclass LegacyDateFormats {\n\t/**\n\t * Returns the currently set customizing data for Islamic calendar support\n\t *\n\t * @return {object[]} Returns an array that contains the customizing data.\n\t * @public\n\t */\n\tstatic getLegacyDateCalendarCustomizing(this: void): LegacyDateCalendarCustomizing {\n\t\tif (formatSettings === undefined) {\n\t\t\tformatSettings = getFormatSettings();\n\t\t}\n\n\t\treturn formatSettings.legacyDateCalendarCustomizing || [];\n\t}\n}\n\nregisterFeature(\"LegacyDateFormats\", LegacyDateFormats);\n\nexport default LegacyDateFormats;\nexport type {\n\tFormatSettings,\n\tLegacyDateCalendarCustomizing,\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenUI5Element.js","sourceRoot":"","sources":["../../src/features/OpenUI5Element.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAE1C,MAAM,cAAe,SAAQ,UAAU;CAMtC;AAED,eAAe,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"OpenUI5Element.js","sourceRoot":"","sources":["../../src/features/OpenUI5Element.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAE1C,MAAM,cAAe,SAAQ,UAAU;CAMtC;AAED,eAAe,cAAc,CAAC","sourcesContent":["import UI5Element from \"../UI5Element.js\";\n\nclass OpenUI5Element extends UI5Element {\n\t__isBusy?: boolean;\n\tisOpenUI5Component?: boolean;\n\t__suppressFocusIn?: () => void;\n\t__suppressFocusBack?: (e: KeyboardEvent) => void;\n\t__redirectFocus?: boolean;\n}\n\nexport default OpenUI5Element;\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { TemplateResult } from "lit-html";
|
|
1
|
+
import type { TemplateResult } from "lit-html";
|
|
2
2
|
import type UI5Element from "../UI5Element.js";
|
|
3
3
|
import type OpenUI5Element from "./OpenUI5Element.js";
|
|
4
4
|
declare class OpenUI5Enablement {
|
|
5
|
-
static wrapTemplateResultInBusyMarkup(html: (strings: TemplateStringsArray, ...values: Array<unknown>) => TemplateResult, host: OpenUI5Element, templateResult: TemplateResult): TemplateResult
|
|
5
|
+
static wrapTemplateResultInBusyMarkup(html: (strings: TemplateStringsArray, ...values: Array<unknown>) => TemplateResult, host: OpenUI5Element, templateResult: TemplateResult): TemplateResult;
|
|
6
6
|
static enrichBusyIndicatorSettings(klass: typeof UI5Element): void;
|
|
7
7
|
static enrichBusyIndicatorMetadata(klass: typeof UI5Element): void;
|
|
8
8
|
static enrichBusyIndicatorMethods(UI5ElementPrototype: typeof OpenUI5Element.prototype): void;
|
|
9
|
-
static getBusyIndicatorStyles():
|
|
9
|
+
static getBusyIndicatorStyles(): string;
|
|
10
10
|
}
|
|
11
11
|
export default OpenUI5Enablement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenUI5Enablement.js","sourceRoot":"","sources":["../../src/features/OpenUI5Enablement.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,mBAAmB,MAAM,uCAAuC,CAAC;AACxE,OAAO,KAAK,MAAM,wBAAwB,CAAC;AAC3C,OAAO,EACN,aAAa,GACb,MAAM,YAAY,CAAC;AAKpB,MAAM,qBAAqB,GAAG;IAC7B,UAAU,EAAE;QACX,QAAQ,EAAE;YACT,IAAI,EAAE,OAAO;SACb;KACD;CACD,CAAC;AAEF,MAAM,iBAAiB;IACtB,MAAM,CAAC,8BAA8B,CAAC,IAAkF,EAAE,IAAoB,EAAE,cAA8B;QAC7K,IAAI,IAAI,CAAC,kBAAkB,IAAI,IAAI,CA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EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;YAE7G,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC3B,OAAO,CAAC,IAAI,CAAC,sBAAuB,IAAI,CAAC,WAAiC,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,uFAAuF,CAAC,CAAC,CAAC,sBAAsB;YAClN,CAAC;YAED,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACnB,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,0HAA0H,CAAgB,CAAC;YAC7K,CAAC;YAED,OAAO,QAAQ,CAAC,CAAC,CAAgB,CAAC;QACnC,CAAC,CAAC;IACH,CAAC;IAED,MAAM,CAAC,sBAAsB;QAC5B,OAAO,mBAAmB,CAAC;IAC5B,CAAC;CACD;AAED,eAAe,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,CAAC;AAExD,eAAe,iBAAiB,CAAC","sourcesContent":["import type { TemplateResult } from \"lit-html\";\nimport { registerFeature } from \"../FeaturesRegistry.js\";\nimport BusyIndicatorStyles from \"../generated/css/BusyIndicator.css.js\";\nimport merge from \"../thirdparty/merge.js\";\nimport {\n\tisTabPrevious,\n} from \"../Keys.js\";\n\nimport type UI5Element from \"../UI5Element.js\";\nimport type OpenUI5Element from \"./OpenUI5Element.js\";\n\nconst busyIndicatorMetadata = {\n\tproperties: {\n\t\t__isBusy: {\n\t\t\ttype: Boolean,\n\t\t},\n\t},\n};\n\nclass OpenUI5Enablement {\n\tstatic wrapTemplateResultInBusyMarkup(html: (strings: TemplateStringsArray, ...values: Array<unknown>) => TemplateResult, host: OpenUI5Element, templateResult: TemplateResult) {\n\t\tif (host.isOpenUI5Component && host.__isBusy) {\n\t\t\ttemplateResult = html`\n\t\t\t<div class=\"busy-indicator-wrapper\">\n\t\t\t\t<span tabindex=\"0\" busy-indicator-before-span @focusin=${host.__suppressFocusIn}></span>\n\t\t\t\t${templateResult}\n\t\t\t\t<div class=\"busy-indicator-overlay\"></div>\n\t\t\t\t<div busy-indicator\n\t\t\t\t\tclass=\"busy-indicator-busy-area\"\n\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\trole=\"progressbar\"\n\t\t\t\t\t@keydown=${host.__suppressFocusBack}\n\t\t\t\t\taria-valuemin=\"0\"\n\t\t\t\t\taria-valuemax=\"100\"\n\t\t\t\t\taria-valuetext=\"Busy\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"busy-indicator-circle circle-animation-0\"></div>\n\t\t\t\t\t\t<div class=\"busy-indicator-circle circle-animation-1\"></div>\n\t\t\t\t\t\t<div class=\"busy-indicator-circle circle-animation-2\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>`;\n\t\t}\n\n\t\treturn templateResult;\n\t}\n\n\tstatic enrichBusyIndicatorSettings(klass: typeof UI5Element) {\n\t\tOpenUI5Enablement.enrichBusyIndicatorMetadata(klass);\n\t\tOpenUI5Enablement.enrichBusyIndicatorMethods(klass.prototype);\n\t}\n\n\tstatic enrichBusyIndicatorMetadata(klass: typeof UI5Element) {\n\t\tklass.metadata = merge(klass.metadata, busyIndicatorMetadata);\n\t}\n\n\tstatic enrichBusyIndicatorMethods(UI5ElementPrototype: typeof OpenUI5Element.prototype) {\n\t\tObject.defineProperties(UI5ElementPrototype, {\n\t\t\t\"__redirectFocus\": { value: true, writable: true },\n\t\t\t\"__suppressFocusBack\": {\n\t\t\t\tget() {\n\t\t\t\t\treturn {\n\t\t\t\t\t\thandleEvent: (e: KeyboardEvent) => {\n\t\t\t\t\t\t\tif (isTabPrevious(e)) {\n\t\t\t\t\t\t\t\tconst beforeElem = this.shadowRoot.querySelector(\"[busy-indicator-before-span]\");\n\t\t\t\t\t\t\t\tthis.__redirectFocus = false;\n\t\t\t\t\t\t\t\tbeforeElem.focus();\n\t\t\t\t\t\t\t\tthis.__redirectFocus = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\tcapture: true,\n\t\t\t\t\t\tpassive: false,\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"isOpenUI5Component\": { get: () => { return true; } },\n\t\t});\n\n\t\tUI5ElementPrototype.__suppressFocusIn = function handleFocusIn() {\n\t\t\tconst busyIndicator = this.shadowRoot?.querySelector(\"[busy-indicator]\") as HTMLElement;\n\t\t\tif (busyIndicator && this.__redirectFocus) {\n\t\t\t\tbusyIndicator.focus();\n\t\t\t}\n\t\t};\n\n\t\tUI5ElementPrototype.getDomRef = function getDomRef() {\n\t\t\t// If a component set _getRealDomRef to its children, use the return value of this function\n\t\t\tif (typeof this._getRealDomRef === \"function\") {\n\t\t\t\treturn this._getRealDomRef();\n\t\t\t}\n\n\t\t\tif (!this.shadowRoot || this.shadowRoot.children.length === 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst children = [...this.shadowRoot.children].filter(child => ![\"link\", \"style\"].includes(child.localName));\n\n\t\t\tif (children.length !== 1) {\n\t\t\t\tconsole.warn(`The shadow DOM for ${(this.constructor as typeof UI5Element).getMetadata().getTag()} does not have a top level element, the getDomRef() method might not work as expected`); // eslint-disable-line\n\t\t\t}\n\n\t\t\tif (this.__isBusy) {\n\t\t\t\treturn children[0].querySelector(\".busy-indicator-wrapper > :not([busy-indicator-before-span]):not(.busy-indicator-overlay):not(.busy-indicator-busy-area)\") as HTMLElement;\n\t\t\t}\n\n\t\t\treturn children[0] as HTMLElement;\n\t\t};\n\t}\n\n\tstatic getBusyIndicatorStyles() {\n\t\treturn BusyIndicatorStyles;\n\t}\n}\n\nregisterFeature(\"OpenUI5Enablement\", OpenUI5Enablement);\n\nexport default OpenUI5Enablement;\n"]}
|
|
@@ -1,23 +1,34 @@
|
|
|
1
|
-
import { CLDRData } from "../asset-registries/LocaleData.js";
|
|
1
|
+
import type { CLDRData } from "../asset-registries/LocaleData.js";
|
|
2
|
+
import type { LegacyDateCalendarCustomizing } from "../features/LegacyDateFormats.js";
|
|
2
3
|
declare class OpenUI5Support {
|
|
3
|
-
static
|
|
4
|
+
static isAtLeastVersion116(): boolean;
|
|
5
|
+
static isOpenUI5Detected(): boolean;
|
|
4
6
|
static init(): Promise<void>;
|
|
5
7
|
static getConfigurationSettingsObject(): {
|
|
8
|
+
animationMode?: undefined;
|
|
9
|
+
language?: undefined;
|
|
10
|
+
theme?: undefined;
|
|
11
|
+
themeRoot?: undefined;
|
|
12
|
+
rtl?: undefined;
|
|
13
|
+
timezone?: undefined;
|
|
14
|
+
calendarType?: undefined;
|
|
15
|
+
formatSettings?: undefined;
|
|
16
|
+
} | {
|
|
6
17
|
animationMode: string;
|
|
7
18
|
language: string;
|
|
8
19
|
theme: string;
|
|
9
20
|
themeRoot: string;
|
|
10
21
|
rtl: string;
|
|
22
|
+
timezone: string;
|
|
11
23
|
calendarType: string;
|
|
12
24
|
formatSettings: {
|
|
13
|
-
firstDayOfWeek:
|
|
25
|
+
firstDayOfWeek: number | undefined;
|
|
26
|
+
legacyDateCalendarCustomizing: LegacyDateCalendarCustomizing;
|
|
14
27
|
};
|
|
15
|
-
}
|
|
28
|
+
};
|
|
16
29
|
static getLocaleDataObject(): CLDRData | undefined;
|
|
17
30
|
static _listenForThemeChange(): void;
|
|
18
31
|
static attachListeners(): void;
|
|
19
32
|
static cssVariablesLoaded(): boolean | undefined;
|
|
20
|
-
static getNextZIndex(): number | undefined;
|
|
21
|
-
static setInitialZIndex(): void;
|
|
22
33
|
}
|
|
23
34
|
export default OpenUI5Support;
|
|
@@ -1,33 +1,83 @@
|
|
|
1
|
+
import patchPatcher from "./patchPatcher.js";
|
|
2
|
+
import patchPopup from "./patchPopup.js";
|
|
1
3
|
import { registerFeature } from "../FeaturesRegistry.js";
|
|
2
4
|
import { setTheme } from "../config/Theme.js";
|
|
3
|
-
import { getCurrentZIndex } from "../util/PopupUtils.js";
|
|
4
|
-
const getCore = () => {
|
|
5
|
-
return window.sap?.ui?.getCore?.();
|
|
6
|
-
};
|
|
7
5
|
class OpenUI5Support {
|
|
8
|
-
static
|
|
9
|
-
|
|
6
|
+
static isAtLeastVersion116() {
|
|
7
|
+
if (!window.sap.ui.version) {
|
|
8
|
+
return true; // sap.ui.version will be removed in newer OpenUI5 versions
|
|
9
|
+
}
|
|
10
|
+
const version = window.sap.ui.version;
|
|
11
|
+
const parts = version.split(".");
|
|
12
|
+
if (!parts || parts.length < 2) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
return parseInt(parts[0]) > 1 || parseInt(parts[1]) >= 116;
|
|
16
|
+
}
|
|
17
|
+
static isOpenUI5Detected() {
|
|
18
|
+
return typeof window.sap?.ui?.require === "function";
|
|
10
19
|
}
|
|
11
20
|
static init() {
|
|
12
|
-
|
|
13
|
-
if (!core) {
|
|
21
|
+
if (!OpenUI5Support.isOpenUI5Detected()) {
|
|
14
22
|
return Promise.resolve();
|
|
15
23
|
}
|
|
16
24
|
return new Promise(resolve => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Popup
|
|
20
|
-
|
|
21
|
-
|
|
25
|
+
window.sap.ui.require(["sap/ui/core/Core"], async (Core) => {
|
|
26
|
+
const callback = () => {
|
|
27
|
+
let deps = ["sap/ui/core/Popup", "sap/ui/core/Patcher", "sap/ui/core/LocaleData"];
|
|
28
|
+
if (OpenUI5Support.isAtLeastVersion116()) { // for versions since 1.116.0 and onward, use the modular core
|
|
29
|
+
deps = [
|
|
30
|
+
...deps,
|
|
31
|
+
"sap/base/i18n/Formatting",
|
|
32
|
+
"sap/base/i18n/Localization",
|
|
33
|
+
"sap/ui/core/ControlBehavior",
|
|
34
|
+
"sap/ui/core/Theming",
|
|
35
|
+
"sap/ui/core/date/CalendarUtils",
|
|
36
|
+
];
|
|
37
|
+
}
|
|
38
|
+
window.sap.ui.require(deps, (Popup, Patcher) => {
|
|
39
|
+
patchPatcher(Patcher);
|
|
40
|
+
patchPopup(Popup);
|
|
41
|
+
resolve();
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
if (OpenUI5Support.isAtLeastVersion116()) {
|
|
45
|
+
await Core.ready();
|
|
46
|
+
callback();
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
Core.attachInit(callback);
|
|
50
|
+
}
|
|
22
51
|
});
|
|
23
52
|
});
|
|
24
53
|
}
|
|
25
54
|
static getConfigurationSettingsObject() {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
55
|
+
if (!OpenUI5Support.isOpenUI5Detected()) {
|
|
56
|
+
return {};
|
|
57
|
+
}
|
|
58
|
+
if (OpenUI5Support.isAtLeastVersion116()) {
|
|
59
|
+
const ControlBehavior = window.sap.ui.require("sap/ui/core/ControlBehavior");
|
|
60
|
+
const Localization = window.sap.ui.require("sap/base/i18n/Localization");
|
|
61
|
+
const Theming = window.sap.ui.require("sap/ui/core/Theming");
|
|
62
|
+
const Formatting = window.sap.ui.require("sap/base/i18n/Formatting");
|
|
63
|
+
const CalendarUtils = window.sap.ui.require("sap/ui/core/date/CalendarUtils");
|
|
64
|
+
return {
|
|
65
|
+
animationMode: ControlBehavior.getAnimationMode(),
|
|
66
|
+
language: Localization.getLanguage(),
|
|
67
|
+
theme: Theming.getTheme(),
|
|
68
|
+
themeRoot: Theming.getThemeRoot(),
|
|
69
|
+
rtl: Localization.getRTL(),
|
|
70
|
+
timezone: Localization.getTimezone(),
|
|
71
|
+
calendarType: Formatting.getCalendarType(),
|
|
72
|
+
formatSettings: {
|
|
73
|
+
firstDayOfWeek: CalendarUtils.getWeekConfigurationValues().firstDayOfWeek,
|
|
74
|
+
legacyDateCalendarCustomizing: Formatting.getCustomIslamicCalendarData?.()
|
|
75
|
+
?? Formatting.getLegacyDateCalendarCustomizing?.(),
|
|
76
|
+
},
|
|
77
|
+
};
|
|
29
78
|
}
|
|
30
|
-
const
|
|
79
|
+
const Core = window.sap.ui.require("sap/ui/core/Core");
|
|
80
|
+
const config = Core.getConfiguration();
|
|
31
81
|
const LocaleData = window.sap.ui.require("sap/ui/core/LocaleData");
|
|
32
82
|
return {
|
|
33
83
|
animationMode: config.getAnimationMode(),
|
|
@@ -35,62 +85,58 @@ class OpenUI5Support {
|
|
|
35
85
|
theme: config.getTheme(),
|
|
36
86
|
themeRoot: config.getThemeRoot(),
|
|
37
87
|
rtl: config.getRTL(),
|
|
88
|
+
timezone: config.getTimezone(),
|
|
38
89
|
calendarType: config.getCalendarType(),
|
|
39
90
|
formatSettings: {
|
|
40
91
|
firstDayOfWeek: LocaleData ? LocaleData.getInstance(config.getLocale()).getFirstDayOfWeek() : undefined,
|
|
92
|
+
legacyDateCalendarCustomizing: config.getFormatSettings().getLegacyDateCalendarCustomizing(),
|
|
41
93
|
},
|
|
42
94
|
};
|
|
43
95
|
}
|
|
44
96
|
static getLocaleDataObject() {
|
|
45
|
-
|
|
46
|
-
if (!core) {
|
|
97
|
+
if (!OpenUI5Support.isOpenUI5Detected()) {
|
|
47
98
|
return;
|
|
48
99
|
}
|
|
49
|
-
const config = core.getConfiguration();
|
|
50
100
|
const LocaleData = window.sap.ui.require("sap/ui/core/LocaleData");
|
|
101
|
+
if (OpenUI5Support.isAtLeastVersion116()) {
|
|
102
|
+
const Localization = window.sap.ui.require("sap/base/i18n/Localization");
|
|
103
|
+
return LocaleData.getInstance(Localization.getLanguageTag())._get();
|
|
104
|
+
}
|
|
105
|
+
const Core = window.sap.ui.require("sap/ui/core/Core");
|
|
106
|
+
const config = Core.getConfiguration();
|
|
51
107
|
return LocaleData.getInstance(config.getLocale())._get();
|
|
52
108
|
}
|
|
53
109
|
static _listenForThemeChange() {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
110
|
+
if (OpenUI5Support.isAtLeastVersion116()) {
|
|
111
|
+
const Theming = window.sap.ui.require("sap/ui/core/Theming");
|
|
112
|
+
Theming.attachApplied(() => {
|
|
113
|
+
setTheme(Theming.getTheme());
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
const Core = window.sap.ui.require("sap/ui/core/Core");
|
|
118
|
+
const config = Core.getConfiguration();
|
|
119
|
+
Core.attachThemeChanged(() => {
|
|
120
|
+
setTheme(config.getTheme());
|
|
121
|
+
});
|
|
122
|
+
}
|
|
59
123
|
}
|
|
60
124
|
static attachListeners() {
|
|
61
|
-
|
|
62
|
-
if (!core) {
|
|
125
|
+
if (!OpenUI5Support.isOpenUI5Detected()) {
|
|
63
126
|
return;
|
|
64
127
|
}
|
|
65
128
|
OpenUI5Support._listenForThemeChange();
|
|
66
129
|
}
|
|
67
130
|
static cssVariablesLoaded() {
|
|
68
|
-
|
|
69
|
-
if (!core) {
|
|
131
|
+
if (!OpenUI5Support.isOpenUI5Detected()) {
|
|
70
132
|
return;
|
|
71
133
|
}
|
|
72
134
|
const link = [...document.head.children].find(el => el.id === "sap-ui-theme-sap.ui.core"); // more reliable than querySelector early
|
|
73
135
|
if (!link) {
|
|
74
|
-
return;
|
|
136
|
+
return false;
|
|
75
137
|
}
|
|
76
138
|
return !!link.href.match(/\/css(-|_)variables\.css/);
|
|
77
139
|
}
|
|
78
|
-
static getNextZIndex() {
|
|
79
|
-
const core = getCore();
|
|
80
|
-
if (!core) {
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
const Popup = window.sap.ui.require("sap/ui/core/Popup");
|
|
84
|
-
return Popup.getNextZIndex();
|
|
85
|
-
}
|
|
86
|
-
static setInitialZIndex() {
|
|
87
|
-
const core = getCore();
|
|
88
|
-
if (!core) {
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
const Popup = window.sap.ui.require("sap/ui/core/Popup");
|
|
92
|
-
Popup.setInitialZIndex(getCurrentZIndex());
|
|
93
|
-
}
|
|
94
140
|
}
|
|
95
141
|
registerFeature("OpenUI5Support", OpenUI5Support);
|
|
96
142
|
export default OpenUI5Support;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenUI5Support.js","source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GAAG,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,kBAAkB,CAAgB,CAAC;YACtE,MAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACvC,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE;gBAC5B,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC7B,CAAC,CAAC,CAAC;QACJ,CAAC;IACF,CAAC;IAED,MAAM,CAAC,eAAe;QACrB,IAAI,CAAC,cAAc,CAAC,iBAAiB,EAAE,EAAE,CAAC;YACzC,OAAO;QACR,CAAC;QAED,cAAc,CAAC,qBAAqB,EAAE,CAAC;IACxC,CAAC;IAED,MAAM,CAAC,kBAAkB;QACxB,IAAI,CAAC,cAAc,CAAC,iBAAiB,EAAE,EAAE,CAAC;YACzC,OAAO;QACR,CAAC;QAED,MAAM,IAAI,GAAG,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,0BAA0B,CAAoB,CAAC,CAAC,yCAAyC;QACvJ,IAAI,CAAC,IAAI,EAAE,CAAC;YACX,OAAO,KAAK,CAAC;QACd,CAAC;QAED,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;IACtD,CAAC;CACD;AAED,eAAe,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;AAElD,eAAe,cAAc,CAAC","sourcesContent":["import patchPatcher from \"./patchPatcher.js\";\nimport type { OpenUI5Patcher } from \"./patchPatcher.js\";\nimport patchPopup from \"./patchPopup.js\";\nimport type { OpenUI5Popup } from \"./patchPopup.js\";\nimport { registerFeature } from \"../FeaturesRegistry.js\";\nimport { setTheme } from \"../config/Theme.js\";\nimport type { CLDRData } from \"../asset-registries/LocaleData.js\";\nimport type { LegacyDateCalendarCustomizing } from \"../features/LegacyDateFormats.js\";\n\ntype OpenUI5Core = {\n\tattachInit: (callback: () => void) => void,\n\tready: () => Promise<void>,\n\tattachThemeChanged: (callback: () => void) => void,\n\tgetConfiguration: () => OpenUI5CoreConfiguration,\n};\n\ntype OpenUI5CoreConfiguration = {\n\tgetAnimationMode: () => string,\n\tgetLanguage: () => string,\n\tgetTheme: () => string,\n\tgetThemeRoot: () => string,\n\tgetRTL: () => string,\n\tgetTimezone: () => string,\n\tgetCalendarType: () => string,\n\tgetLocale: () => string,\n\tgetFormatSettings: () => {\n\t\tgetLegacyDateCalendarCustomizing: () => LegacyDateCalendarCustomizing;\n\t}\n};\n\ntype ControlBehavior = {\n\tgetAnimationMode: () => string,\n}\n\ntype Localization = {\n\tgetLanguage: () => string,\n\tgetLanguageTag: () => string,\n\tgetRTL: () => string,\n\tgetTimezone: () => string,\n}\n\ntype LocaleData = {\n\tgetInstance: (locale: string) => Locale,\n}\n\ntype Theming = {\n\tgetThemeRoot: () => string,\n\tgetTheme: () => string,\n\tattachApplied: (callback: () => void) => void,\n}\n\ntype Formatting = {\n\tgetCalendarType: () => string,\n\tgetLegacyDateCalendarCustomizing: () => LegacyDateCalendarCustomizing,\n\tgetCustomIslamicCalendarData?: () => LegacyDateCalendarCustomizing,\n}\n\ntype CalendarUtils = {\n\tgetWeekConfigurationValues: () => {\n\t\tfirstDayOfWeek: number | undefined,\n\t},\n}\n\ntype Locale = {\n\tgetFirstDayOfWeek: () => number,\n\t_get: () => CLDRData,\n};\n\nclass OpenUI5Support {\n\tstatic isAtLeastVersion116() {\n\t\tif (!window.sap.ui!.version) {\n\t\t\treturn true; // sap.ui.version will be removed in newer OpenUI5 versions\n\t\t}\n\t\tconst version = window.sap.ui!.version as string;\n\t\tconst parts = version.split(\".\");\n\t\tif (!parts || parts.length < 2) {\n\t\t\treturn false;\n\t\t}\n\t\treturn parseInt(parts[0]) > 1 || parseInt(parts[1]) >= 116;\n\t}\n\n\tstatic isOpenUI5Detected() {\n\t\treturn typeof window.sap?.ui?.require === \"function\";\n\t}\n\n\tstatic init() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn Promise.resolve();\n\t\t}\n\n\t\treturn new Promise<void>(resolve => {\n\t\t\twindow.sap.ui.require([\"sap/ui/core/Core\"], async (Core: OpenUI5Core) => {\n\t\t\t\tconst callback = () => {\n\t\t\t\t\tlet deps: Array<string> = [\"sap/ui/core/Popup\", \"sap/ui/core/Patcher\", \"sap/ui/core/LocaleData\"];\n\t\t\t\t\tif (OpenUI5Support.isAtLeastVersion116()) { // for versions since 1.116.0 and onward, use the modular core\n\t\t\t\t\t\tdeps = [\n\t\t\t\t\t\t\t...deps,\n\t\t\t\t\t\t\t\"sap/base/i18n/Formatting\",\n\t\t\t\t\t\t\t\"sap/base/i18n/Localization\",\n\t\t\t\t\t\t\t\"sap/ui/core/ControlBehavior\",\n\t\t\t\t\t\t\t\"sap/ui/core/Theming\",\n\t\t\t\t\t\t\t\"sap/ui/core/date/CalendarUtils\",\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t\twindow.sap.ui.require(deps, (Popup: OpenUI5Popup, Patcher: OpenUI5Patcher) => {\n\t\t\t\t\t\tpatchPatcher(Patcher);\n\t\t\t\t\t\tpatchPopup(Popup);\n\t\t\t\t\t\tresolve();\n\t\t\t\t\t});\n\t\t\t\t};\n\t\t\t\tif (OpenUI5Support.isAtLeastVersion116()) {\n\t\t\t\t\tawait Core.ready();\n\t\t\t\t\tcallback();\n\t\t\t\t} else {\n\t\t\t\t\tCore.attachInit(callback);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\tstatic getConfigurationSettingsObject() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn {};\n\t\t}\n\n\t\tif (OpenUI5Support.isAtLeastVersion116()) {\n\t\t\tconst ControlBehavior = window.sap.ui.require(\"sap/ui/core/ControlBehavior\") as ControlBehavior;\n\t\t\tconst Localization = window.sap.ui.require(\"sap/base/i18n/Localization\") as Localization;\n\t\t\tconst Theming = window.sap.ui.require(\"sap/ui/core/Theming\") as Theming;\n\t\t\tconst Formatting = window.sap.ui.require(\"sap/base/i18n/Formatting\") as Formatting;\n\t\t\tconst CalendarUtils = window.sap.ui.require(\"sap/ui/core/date/CalendarUtils\") as CalendarUtils;\n\n\t\t\treturn {\n\t\t\t\tanimationMode: ControlBehavior.getAnimationMode(),\n\t\t\t\tlanguage: Localization.getLanguage(),\n\t\t\t\ttheme: Theming.getTheme(),\n\t\t\t\tthemeRoot: Theming.getThemeRoot(),\n\t\t\t\trtl: Localization.getRTL(),\n\t\t\t\ttimezone: Localization.getTimezone(),\n\t\t\t\tcalendarType: Formatting.getCalendarType(),\n\t\t\t\tformatSettings: {\n\t\t\t\t\tfirstDayOfWeek: CalendarUtils.getWeekConfigurationValues().firstDayOfWeek,\n\t\t\t\t\tlegacyDateCalendarCustomizing: Formatting.getCustomIslamicCalendarData?.()\n\t\t\t\t\t\t\t\t\t\t\t\t?? Formatting.getLegacyDateCalendarCustomizing?.(),\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\n\t\tconst Core = window.sap.ui.require(\"sap/ui/core/Core\") as OpenUI5Core;\n\t\tconst config = Core.getConfiguration();\n\t\tconst LocaleData = window.sap.ui.require(\"sap/ui/core/LocaleData\") as LocaleData;\n\n\t\treturn {\n\t\t\tanimationMode: config.getAnimationMode(),\n\t\t\tlanguage: config.getLanguage(),\n\t\t\ttheme: config.getTheme(),\n\t\t\tthemeRoot: config.getThemeRoot(),\n\t\t\trtl: config.getRTL(),\n\t\t\ttimezone: config.getTimezone(),\n\t\t\tcalendarType: config.getCalendarType(),\n\t\t\tformatSettings: {\n\t\t\t\tfirstDayOfWeek: LocaleData ? LocaleData.getInstance(config.getLocale()).getFirstDayOfWeek() : undefined,\n\t\t\t\tlegacyDateCalendarCustomizing: config.getFormatSettings().getLegacyDateCalendarCustomizing(),\n\t\t\t},\n\t\t};\n\t}\n\n\tstatic getLocaleDataObject() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst LocaleData = window.sap.ui.require(\"sap/ui/core/LocaleData\") as LocaleData;\n\n\t\tif (OpenUI5Support.isAtLeastVersion116()) {\n\t\t\tconst Localization = window.sap.ui.require(\"sap/base/i18n/Localization\") as Localization;\n\t\t\treturn LocaleData.getInstance(Localization.getLanguageTag())._get();\n\t\t}\n\n\t\tconst Core = window.sap.ui.require(\"sap/ui/core/Core\") as OpenUI5Core;\n\t\tconst config = Core.getConfiguration();\n\t\treturn LocaleData.getInstance(config.getLocale())._get();\n\t}\n\n\tstatic _listenForThemeChange() {\n\t\tif (OpenUI5Support.isAtLeastVersion116()) {\n\t\t\tconst Theming: Theming = window.sap.ui.require(\"sap/ui/core/Theming\");\n\t\t\tTheming.attachApplied(() => {\n\t\t\t\tsetTheme(Theming.getTheme());\n\t\t\t});\n\t\t} else {\n\t\t\tconst Core = window.sap.ui.require(\"sap/ui/core/Core\") as OpenUI5Core;\n\t\t\tconst config = Core.getConfiguration();\n\t\t\tCore.attachThemeChanged(() => {\n\t\t\t\tsetTheme(config.getTheme());\n\t\t\t});\n\t\t}\n\t}\n\n\tstatic attachListeners() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn;\n\t\t}\n\n\t\tOpenUI5Support._listenForThemeChange();\n\t}\n\n\tstatic cssVariablesLoaded() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst link = [...document.head.children].find(el => el.id === \"sap-ui-theme-sap.ui.core\") as HTMLLinkElement; // more reliable than querySelector early\n\t\tif (!link) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn !!link.href.match(/\\/css(-|_)variables\\.css/);\n\t}\n}\n\nregisterFeature(\"OpenUI5Support\", OpenUI5Support);\n\nexport default OpenUI5Support;\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type OpenUI5Patcher = {
|
|
2
|
+
prototype: {
|
|
3
|
+
_mAttributes: {
|
|
4
|
+
[key: string]: string;
|
|
5
|
+
};
|
|
6
|
+
openEnd: () => OpenUI5Patcher;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
declare const patchPatcher: (Patcher: OpenUI5Patcher) => void;
|
|
10
|
+
export default patchPatcher;
|
|
11
|
+
export type { OpenUI5Patcher };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const patchPatcher = (Patcher) => {
|
|
2
|
+
const origOpenEnd = Patcher.prototype.openEnd;
|
|
3
|
+
Patcher.prototype.openEnd = function openEnd() {
|
|
4
|
+
if (this._mAttributes.popover) {
|
|
5
|
+
delete this._mAttributes.popover; // The "popover" attribute will be managed externally, don't let Patcher remove it
|
|
6
|
+
}
|
|
7
|
+
return origOpenEnd.apply(this);
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default patchPatcher;
|
|
11
|
+
//# sourceMappingURL=patchPatcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patchPatcher.js","sourceRoot":"","sources":["../../src/features/patchPatcher.ts"],"names":[],"mappings":"AAOA,MAAM,YAAY,GAAG,CAAC,OAAuB,EAAE,EAAE;IAChD,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC;IAC9C,OAAO,CAAC,SAAS,CAAC,OAAO,GAAG,SAAS,OAAO;QAC3C,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;YAC/B,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,kFAAkF;QACrH,CAAC;QACD,OAAO,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["type OpenUI5Patcher = {\n\tprototype: {\n\t\t_mAttributes: { [key: string]: string },\n\t\topenEnd: () => OpenUI5Patcher,\n\t}\n};\n\nconst patchPatcher = (Patcher: OpenUI5Patcher) => {\n\tconst origOpenEnd = Patcher.prototype.openEnd;\n\tPatcher.prototype.openEnd = function openEnd() {\n\t\tif (this._mAttributes.popover) {\n\t\t\tdelete this._mAttributes.popover; // The \"popover\" attribute will be managed externally, don't let Patcher remove it\n\t\t}\n\t\treturn origOpenEnd.apply(this);\n\t};\n};\n\nexport default patchPatcher;\nexport type { OpenUI5Patcher };\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type Control = {
|
|
2
|
+
getDomRef: () => HTMLElement | null;
|
|
3
|
+
};
|
|
4
|
+
type OpenUI5Popup = {
|
|
5
|
+
prototype: {
|
|
6
|
+
open: (...args: any[]) => void;
|
|
7
|
+
_closed: (...args: any[]) => void;
|
|
8
|
+
getOpenState: () => "CLOSED" | "CLOSING" | "OPEN" | "OPENING";
|
|
9
|
+
getContent: () => Control | HTMLElement | null;
|
|
10
|
+
onFocusEvent: (e: FocusEvent) => void;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
declare const patchPopup: (Popup: OpenUI5Popup) => void;
|
|
14
|
+
export default patchPopup;
|
|
15
|
+
export type { OpenUI5Popup };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
const openNativePopover = (domRef) => {
|
|
2
|
+
domRef.setAttribute("popover", "manual");
|
|
3
|
+
domRef.showPopover();
|
|
4
|
+
};
|
|
5
|
+
const closeNativePopover = (domRef) => {
|
|
6
|
+
if (domRef.hasAttribute("popover")) {
|
|
7
|
+
domRef.hidePopover();
|
|
8
|
+
domRef.removeAttribute("popover");
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
const isNativePopoverOpen = (root = document) => {
|
|
12
|
+
if (root.querySelector(":popover-open")) {
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
return Array.from(root.querySelectorAll("*")).some(element => {
|
|
16
|
+
const shadowRoot = element.shadowRoot;
|
|
17
|
+
return shadowRoot && isNativePopoverOpen(shadowRoot);
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
const patchOpen = (Popup) => {
|
|
21
|
+
const origOpen = Popup.prototype.open;
|
|
22
|
+
Popup.prototype.open = function open(...args) {
|
|
23
|
+
origOpen.apply(this, args); // call open first to initiate opening
|
|
24
|
+
const topLayerAlreadyInUse = isNativePopoverOpen();
|
|
25
|
+
const openingInitiated = ["OPENING", "OPEN"].includes(this.getOpenState());
|
|
26
|
+
if (openingInitiated && topLayerAlreadyInUse) {
|
|
27
|
+
const element = this.getContent();
|
|
28
|
+
if (element) {
|
|
29
|
+
const domRef = element instanceof HTMLElement ? element : element?.getDomRef();
|
|
30
|
+
if (domRef) {
|
|
31
|
+
openNativePopover(domRef);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
const patchClosed = (Popup) => {
|
|
38
|
+
const _origClosed = Popup.prototype._closed;
|
|
39
|
+
Popup.prototype._closed = function _closed(...args) {
|
|
40
|
+
const element = this.getContent();
|
|
41
|
+
const domRef = element instanceof HTMLElement ? element : element?.getDomRef();
|
|
42
|
+
_origClosed.apply(this, args); // only then call _close
|
|
43
|
+
if (domRef) {
|
|
44
|
+
closeNativePopover(domRef); // unset the popover attribute and close the native popover, but only if still in DOM
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
const patchFocusEvent = (Popup) => {
|
|
49
|
+
const origFocusEvent = Popup.prototype.onFocusEvent;
|
|
50
|
+
Popup.prototype.onFocusEvent = function onFocusEvent(e) {
|
|
51
|
+
const isTypeFocus = e.type === "focus" || e.type === "activate";
|
|
52
|
+
const target = e.target;
|
|
53
|
+
if (!isTypeFocus || !target.closest("[ui5-popover],[ui5-responsive-popover],[ui5-dialog]")) {
|
|
54
|
+
origFocusEvent.call(this, e);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
const createGlobalStyles = () => {
|
|
59
|
+
const stylesheet = new CSSStyleSheet();
|
|
60
|
+
stylesheet.replaceSync(`.sapMPopup-CTX:popover-open { inset: unset; }`);
|
|
61
|
+
document.adoptedStyleSheets = [...document.adoptedStyleSheets, stylesheet];
|
|
62
|
+
};
|
|
63
|
+
const patchPopup = (Popup) => {
|
|
64
|
+
patchOpen(Popup); // Popup.prototype.open
|
|
65
|
+
patchClosed(Popup); // Popup.prototype._closed
|
|
66
|
+
createGlobalStyles(); // Ensures correct popover positioning by OpenUI5 (otherwise 0,0 is the center of the screen)
|
|
67
|
+
patchFocusEvent(Popup); // Popup.prototype.onFocusEvent
|
|
68
|
+
};
|
|
69
|
+
export default patchPopup;
|
|
70
|
+
//# sourceMappingURL=patchPopup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patchPopup.js","sourceRoot":"","sources":["../../src/features/patchPopup.ts"],"names":[],"mappings":"AAgBA,MAAM,iBAAiB,GAAG,CAAC,MAAmB,EAAE,EAAE;IACjD,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IACzC,MAAM,CAAC,WAAW,EAAE,CAAC;AACtB,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,MAAmB,EAAE,EAAE;IAClD,IAAI,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,CAAC;QACpC,MAAM,CAAC,WAAW,EAAE,CAAC;QACrB,MAAM,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,CAAC,OAA8B,QAAQ,EAAW,EAAE;IAC/E,IAAI,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC;IACb,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;QAC5D,MAAM,UAAU,GA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AAC,KAAK,CAAC,CAAC,CAAA,+BAA+B;AACvD,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["// OpenUI5's Control.js subset\ntype Control = {\n\tgetDomRef: () => HTMLElement | null,\n}\n\n// The lifecycle of Popup.js is open -> _opened -> close -> _closed, we're interested in the first (open) and last (_closed)\ntype OpenUI5Popup = {\n\tprototype: {\n\t\topen: (...args: any[]) => void,\n\t\t_closed: (...args: any[]) => void,\n\t\tgetOpenState: () => \"CLOSED\" | \"CLOSING\" | \"OPEN\" | \"OPENING\",\n\t\tgetContent: () => Control | HTMLElement | null, // this is the OpenUI5 Element/Control instance that opens the Popup (usually sap.m.Popover/sap.m.Dialog)\n\t\tonFocusEvent: (e: FocusEvent) => void,\n\t}\n};\n\nconst openNativePopover = (domRef: HTMLElement) => {\n\tdomRef.setAttribute(\"popover\", \"manual\");\n\tdomRef.showPopover();\n};\n\nconst closeNativePopover = (domRef: HTMLElement) => {\n\tif (domRef.hasAttribute(\"popover\")) {\n\t\tdomRef.hidePopover();\n\t\tdomRef.removeAttribute(\"popover\");\n\t}\n};\n\nconst isNativePopoverOpen = (root: Document | ShadowRoot = document): boolean => {\n\tif (root.querySelector(\":popover-open\")) {\n\t\treturn true;\n\t}\n\n\treturn Array.from(root.querySelectorAll(\"*\")).some(element => {\n\t\tconst shadowRoot = element.shadowRoot;\n\t\treturn shadowRoot && isNativePopoverOpen(shadowRoot);\n\t});\n};\n\nconst patchOpen = (Popup: OpenUI5Popup) => {\n\tconst origOpen = Popup.prototype.open;\n\tPopup.prototype.open = function open(...args: any[]) {\n\t\torigOpen.apply(this, args); // call open first to initiate opening\n\t\tconst topLayerAlreadyInUse = isNativePopoverOpen();\n\t\tconst openingInitiated = [\"OPENING\", \"OPEN\"].includes(this.getOpenState());\n\t\tif (openingInitiated && topLayerAlreadyInUse) {\n\t\t\tconst element = this.getContent();\n\t\t\tif (element) {\n\t\t\t\tconst domRef = element instanceof HTMLElement ? element : element?.getDomRef();\n\t\t\t\tif (domRef) {\n\t\t\t\t\topenNativePopover(domRef);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n};\n\nconst patchClosed = (Popup: OpenUI5Popup) => {\n\tconst _origClosed = Popup.prototype._closed;\n\tPopup.prototype._closed = function _closed(...args: any[]) {\n\t\tconst element = this.getContent();\n\t\tconst domRef = element instanceof HTMLElement ? element : element?.getDomRef();\n\t\t_origClosed.apply(this, args); // only then call _close\n\t\tif (domRef) {\n\t\t\tcloseNativePopover(domRef); // unset the popover attribute and close the native popover, but only if still in DOM\n\t\t}\n\t};\n};\n\nconst patchFocusEvent = (Popup: OpenUI5Popup) => {\n\tconst origFocusEvent = Popup.prototype.onFocusEvent;\n\tPopup.prototype.onFocusEvent = function onFocusEvent(e: FocusEvent) {\n\t\tconst isTypeFocus = e.type === \"focus\" || e.type === \"activate\";\n\t\tconst target = e.target as HTMLElement;\n\t\tif (!isTypeFocus || !target.closest(\"[ui5-popover],[ui5-responsive-popover],[ui5-dialog]\")) {\n\t\t\torigFocusEvent.call(this, e);\n\t\t}\n\t};\n};\n\nconst createGlobalStyles = () => {\n\tconst stylesheet = new CSSStyleSheet();\n\tstylesheet.replaceSync(`.sapMPopup-CTX:popover-open { inset: unset; }`);\n\tdocument.adoptedStyleSheets = [...document.adoptedStyleSheets, stylesheet];\n};\n\nconst patchPopup = (Popup: OpenUI5Popup) => {\n\tpatchOpen(Popup); // Popup.prototype.open\n\tpatchClosed(Popup); // Popup.prototype._closed\n\tcreateGlobalStyles(); // Ensures correct popover positioning by OpenUI5 (otherwise 0,0 is the center of the screen)\n\tpatchFocusEvent(Popup);// Popup.prototype.onFocusEvent\n};\n\nexport default patchPopup;\nexport type { OpenUI5Popup };\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const DEFAULT_THEME: string;
|
|
2
|
+
declare const SUPPORTED_THEMES: string[];
|
|
3
|
+
declare const DEFAULT_LANGUAGE: string;
|
|
4
|
+
declare const DEFAULT_LOCALE: string;
|
|
5
|
+
declare const SUPPORTED_LOCALES: string[];
|
|
6
|
+
export { DEFAULT_THEME, SUPPORTED_THEMES, DEFAULT_LANGUAGE, DEFAULT_LOCALE, SUPPORTED_LOCALES, };
|