@ui5/webcomponents-base 0.0.0-cf50976ce → 0.0.0-d4d43327a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +2 -0
- package/CHANGELOG.md +167 -0
- package/bundle.esm.js +8 -2
- package/dist/AssetRegistry.d.ts +5 -0
- package/dist/AssetRegistry.js +2 -7
- package/dist/AssetRegistry.js.map +1 -0
- package/dist/Boot.d.ts +9 -0
- package/dist/Boot.js +43 -45
- package/dist/Boot.js.map +1 -0
- package/dist/CSP.d.ts +30 -0
- package/dist/CSP.js +16 -24
- package/dist/CSP.js.map +1 -0
- package/dist/CustomElementsRegistry.d.ts +5 -0
- package/dist/CustomElementsRegistry.js +66 -83
- package/dist/CustomElementsRegistry.js.map +1 -0
- package/dist/CustomElementsScope.d.ts +7 -0
- package/dist/CustomElementsScope.js +10 -29
- package/dist/CustomElementsScope.js.map +1 -0
- package/dist/CustomElementsScopeUtils.d.ts +55 -0
- package/dist/CustomElementsScopeUtils.js +34 -52
- package/dist/CustomElementsScopeUtils.js.map +1 -0
- package/dist/DOMObserver.d.ts +11 -0
- package/dist/DOMObserver.js +12 -54
- package/dist/DOMObserver.js.map +1 -0
- package/dist/Device.d.ts +12 -0
- package/dist/Device.js +145 -100
- package/dist/Device.js.map +1 -0
- package/dist/EventProvider.d.ts +25 -0
- package/dist/EventProvider.js +67 -82
- package/dist/EventProvider.js.map +1 -0
- package/dist/FeaturesRegistry.d.ts +3 -0
- package/dist/FeaturesRegistry.js +5 -10
- package/dist/FeaturesRegistry.js.map +1 -0
- package/dist/FontFace.d.ts +2 -0
- package/dist/FontFace.js +14 -19
- package/dist/FontFace.js.map +1 -0
- package/dist/InitialConfiguration.d.ts +22 -0
- package/dist/InitialConfiguration.js +112 -131
- package/dist/InitialConfiguration.js.map +1 -0
- package/dist/Keys.d.ts +57 -0
- package/dist/Keys.js +174 -291
- package/dist/Keys.js.map +1 -0
- package/dist/ManagedStyles.d.ts +8 -0
- package/dist/ManagedStyles.js +62 -68
- package/dist/ManagedStyles.js.map +1 -0
- package/dist/MarkedEvents.d.ts +9 -0
- package/dist/MarkedEvents.js +15 -0
- package/dist/MarkedEvents.js.map +1 -0
- package/dist/MediaRange.d.ts +37 -0
- package/dist/MediaRange.js +54 -65
- package/dist/MediaRange.js.map +1 -0
- package/dist/PropertiesFileFormat.d.ts +8 -0
- package/dist/PropertiesFileFormat.js +72 -82
- package/dist/PropertiesFileFormat.js.map +1 -0
- package/dist/Render.d.ts +47 -0
- package/dist/Render.js +81 -113
- package/dist/Render.js.map +1 -0
- package/dist/RenderQueue.d.ts +19 -0
- package/dist/RenderQueue.js +52 -62
- package/dist/RenderQueue.js.map +1 -0
- package/dist/Runtimes.d.ts +27 -0
- package/dist/Runtimes.js +49 -70
- package/dist/Runtimes.js.map +1 -0
- package/dist/StaticArea.d.ts +0 -0
- package/dist/StaticArea.js +4 -1
- package/dist/StaticArea.js.map +1 -0
- package/dist/StaticAreaItem.d.ts +36 -0
- package/dist/StaticAreaItem.js +84 -86
- package/dist/StaticAreaItem.js.map +1 -0
- package/dist/SystemCSSVars.d.ts +2 -0
- package/dist/SystemCSSVars.js +4 -5
- package/dist/SystemCSSVars.js.map +1 -0
- package/dist/Theming.d.ts +3 -0
- package/dist/Theming.js +1 -1
- package/dist/Theming.js.map +1 -0
- package/dist/UI5Element.d.ts +378 -0
- package/dist/UI5Element.js +917 -1007
- package/dist/UI5Element.js.map +1 -0
- package/dist/UI5ElementMetadata.d.ts +150 -0
- package/dist/UI5ElementMetadata.js +277 -313
- package/dist/UI5ElementMetadata.js.map +1 -0
- package/dist/animations/AnimationQueue.d.ts +8 -0
- package/dist/animations/AnimationQueue.js +31 -38
- package/dist/animations/AnimationQueue.js.map +1 -0
- package/dist/animations/animate.d.ts +14 -0
- package/dist/animations/animate.js +46 -51
- package/dist/animations/animate.js.map +1 -0
- package/dist/animations/scroll.d.ts +5 -0
- package/dist/animations/scroll.js +18 -27
- package/dist/animations/scroll.js.map +1 -0
- package/dist/animations/slideDown.d.ts +5 -0
- package/dist/animations/slideDown.js +53 -78
- package/dist/animations/slideDown.js.map +1 -0
- package/dist/animations/slideUp.d.ts +5 -0
- package/dist/animations/slideUp.js +49 -70
- package/dist/animations/slideUp.js.map +1 -0
- package/dist/api.json +1 -0
- package/dist/asset-registries/Icons.d.ts +30 -0
- package/dist/asset-registries/Icons.js +88 -119
- package/dist/asset-registries/Icons.js.map +1 -0
- package/dist/asset-registries/Illustrations.d.ts +17 -0
- package/dist/asset-registries/Illustrations.js +41 -25
- package/dist/asset-registries/Illustrations.js.map +1 -0
- package/dist/asset-registries/LocaleData.d.ts +7 -0
- package/dist/asset-registries/LocaleData.js +104 -132
- package/dist/asset-registries/LocaleData.js.map +1 -0
- package/dist/asset-registries/Themes.d.ts +11 -0
- package/dist/asset-registries/Themes.js +36 -68
- package/dist/asset-registries/Themes.js.map +1 -0
- package/dist/asset-registries/i18n.d.ts +23 -0
- package/dist/asset-registries/i18n.js +52 -80
- package/dist/asset-registries/i18n.js.map +1 -0
- package/dist/assets/Boot.4539908a.js +9 -0
- package/dist/assets/Boot.6335ce08.css +1 -0
- package/dist/assets/bundle.esm.a14a2ceb.js +52 -0
- package/dist/assets-meta/IconCollectionsAlias.d.ts +31 -0
- package/dist/assets-meta/IconCollectionsAlias.js +30 -10
- package/dist/assets-meta/IconCollectionsAlias.js.map +1 -0
- package/dist/config/AnimationMode.d.ts +14 -0
- package/dist/config/AnimationMode.js +21 -18
- package/dist/config/AnimationMode.js.map +1 -0
- package/dist/config/CalendarType.d.ts +8 -0
- package/dist/config/CalendarType.js +13 -12
- package/dist/config/CalendarType.js.map +1 -0
- package/dist/config/FormatSettings.d.ts +15 -0
- package/dist/config/FormatSettings.js +15 -9
- package/dist/config/FormatSettings.js.map +1 -0
- package/dist/config/Icons.d.ts +55 -0
- package/dist/config/Icons.js +88 -37
- package/dist/config/Icons.js.map +1 -0
- package/dist/config/Language.d.ts +31 -0
- package/dist/config/Language.js +31 -43
- package/dist/config/Language.js.map +1 -0
- package/dist/config/NoConflict.d.ts +20 -0
- package/dist/config/NoConflict.js +40 -41
- package/dist/config/NoConflict.js.map +1 -0
- package/dist/config/RTL.d.ts +7 -0
- package/dist/config/RTL.js +26 -20
- package/dist/config/RTL.js.map +1 -0
- package/dist/config/Theme.d.ts +28 -0
- package/dist/config/Theme.js +34 -36
- package/dist/config/Theme.js.map +1 -0
- package/dist/config/ThemeRoots.d.ts +4 -0
- package/dist/config/ThemeRoots.js +28 -0
- package/dist/config/ThemeRoots.js.map +1 -0
- package/dist/decorators/customElement.d.ts +23 -0
- package/dist/decorators/customElement.js +31 -0
- package/dist/decorators/customElement.js.map +1 -0
- package/dist/decorators/event.d.ts +10 -0
- package/dist/decorators/event.js +24 -0
- package/dist/decorators/event.js.map +1 -0
- package/dist/decorators/fastNavigation.d.ts +7 -0
- package/dist/decorators/fastNavigation.js +13 -0
- package/dist/decorators/fastNavigation.js.map +1 -0
- package/dist/decorators/languageAware.d.ts +7 -0
- package/dist/decorators/languageAware.js +13 -0
- package/dist/decorators/languageAware.js.map +1 -0
- package/dist/decorators/property.d.ts +9 -0
- package/dist/decorators/property.js +24 -0
- package/dist/decorators/property.js.map +1 -0
- package/dist/decorators/slot.d.ts +9 -0
- package/dist/decorators/slot.js +37 -0
- package/dist/decorators/slot.js.map +1 -0
- package/dist/decorators/themeAware.d.ts +7 -0
- package/dist/decorators/themeAware.js +13 -0
- package/dist/decorators/themeAware.js.map +1 -0
- package/dist/delegate/ItemNavigation.d.ts +113 -0
- package/dist/delegate/ItemNavigation.js +277 -317
- package/dist/delegate/ItemNavigation.js.map +1 -0
- package/dist/delegate/ResizeHandler.d.ts +25 -0
- package/dist/delegate/ResizeHandler.js +70 -91
- package/dist/delegate/ResizeHandler.js.map +1 -0
- package/dist/delegate/ScrollEnablement.d.ts +49 -0
- package/dist/delegate/ScrollEnablement.js +157 -180
- package/dist/delegate/ScrollEnablement.js.map +1 -0
- package/dist/features/F6Navigation.d.ts +19 -0
- package/dist/features/F6Navigation.js +145 -104
- package/dist/features/F6Navigation.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.d.ts +9 -0
- package/dist/features/OpenUI5Element.js +5 -0
- package/dist/features/OpenUI5Element.js.map +1 -0
- package/dist/features/OpenUI5Enablement.d.ts +11 -0
- package/dist/features/OpenUI5Enablement.js +89 -112
- package/dist/features/OpenUI5Enablement.js.map +1 -0
- package/dist/features/OpenUI5Support.d.ts +25 -0
- package/dist/features/OpenUI5Support.js +92 -119
- package/dist/features/OpenUI5Support.js.map +1 -0
- package/dist/generated/VersionInfo.js +3 -3
- package/dist/generated/css/BusyIndicator.css.d.ts +3 -0
- package/dist/generated/css/BusyIndicator.css.js +7 -5
- package/dist/generated/css/BusyIndicator.css.js.map +1 -0
- package/dist/generated/css/FontFace.css.d.ts +3 -0
- package/dist/generated/css/FontFace.css.js +7 -5
- package/dist/generated/css/FontFace.css.js.map +1 -0
- package/dist/generated/css/OverrideFontFace.css.d.ts +3 -0
- package/dist/generated/css/OverrideFontFace.css.js +7 -5
- package/dist/generated/css/OverrideFontFace.css.js.map +1 -0
- package/dist/generated/css/SystemCSSVars.css.d.ts +3 -0
- package/dist/generated/css/SystemCSSVars.css.js +7 -5
- package/dist/generated/css/SystemCSSVars.css.js.map +1 -0
- package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.js +11 -0
- package/dist/getSharedResource.d.ts +11 -0
- package/dist/getSharedResource.js +21 -17
- package/dist/getSharedResource.js.map +1 -0
- package/dist/global.d.ts +38 -0
- package/dist/i18nBundle.d.ts +43 -0
- package/dist/i18nBundle.js +56 -64
- package/dist/i18nBundle.js.map +1 -0
- package/dist/locale/Locale.d.ts +22 -0
- package/dist/locale/Locale.js +75 -87
- package/dist/locale/Locale.js.map +1 -0
- package/dist/locale/RTLAwareRegistry.d.ts +4 -0
- package/dist/locale/RTLAwareRegistry.js +6 -11
- package/dist/locale/RTLAwareRegistry.js.map +1 -0
- package/dist/locale/applyDirection.d.ts +10 -0
- package/dist/locale/applyDirection.js +7 -7
- package/dist/locale/applyDirection.js.map +1 -0
- package/dist/locale/directionChange.d.ts +15 -0
- package/dist/locale/directionChange.js +7 -15
- package/dist/locale/directionChange.js.map +1 -0
- package/dist/locale/getEffectiveDir.d.ts +2 -0
- package/dist/locale/getEffectiveDir.js +20 -24
- package/dist/locale/getEffectiveDir.js.map +1 -0
- package/dist/locale/getLocale.d.ts +7 -0
- package/dist/locale/getLocale.js +26 -29
- package/dist/locale/getLocale.js.map +1 -0
- package/dist/locale/languageChange.d.ts +5 -0
- package/dist/locale/languageChange.js +8 -16
- package/dist/locale/languageChange.js.map +1 -0
- package/dist/locale/nextFallbackLocale.d.ts +8 -0
- package/dist/locale/nextFallbackLocale.js +15 -19
- package/dist/locale/nextFallbackLocale.js.map +1 -0
- package/dist/locale/normalizeLocale.d.ts +7 -0
- package/dist/locale/normalizeLocale.js +34 -41
- package/dist/locale/normalizeLocale.js.map +1 -0
- package/dist/renderer/LitRenderer.d.ts +14 -0
- package/dist/renderer/LitRenderer.js +28 -39
- package/dist/renderer/LitRenderer.js.map +1 -0
- package/dist/renderer/executeTemplate.d.ts +13 -0
- package/dist/renderer/executeTemplate.js +12 -16
- package/dist/renderer/executeTemplate.js.map +1 -0
- package/dist/sap/base/Log.js +28 -29
- package/dist/sap/base/assert.js +5 -6
- package/dist/sap/base/security/URLListValidator.js +13 -2
- package/dist/theming/CustomStyle.d.ts +6 -0
- package/dist/theming/CustomStyle.js +33 -45
- package/dist/theming/CustomStyle.js.map +1 -0
- package/dist/theming/ThemeLoaded.d.ts +5 -0
- package/dist/theming/ThemeLoaded.js +8 -16
- package/dist/theming/ThemeLoaded.js.map +1 -0
- package/dist/theming/applyTheme.d.ts +2 -0
- package/dist/theming/applyTheme.js +60 -64
- package/dist/theming/applyTheme.js.map +1 -0
- package/dist/theming/getConstructableStyle.d.ts +9 -0
- package/dist/theming/getConstructableStyle.js +12 -17
- package/dist/theming/getConstructableStyle.js.map +1 -0
- package/dist/theming/getEffectiveLinksHrefs.d.ts +3 -0
- package/dist/theming/getEffectiveLinksHrefs.js +12 -22
- package/dist/theming/getEffectiveLinksHrefs.js.map +1 -0
- package/dist/theming/getEffectiveStyle.d.ts +3 -0
- package/dist/theming/getEffectiveStyle.js +24 -31
- package/dist/theming/getEffectiveStyle.js.map +1 -0
- package/dist/theming/getStylesString.d.ts +3 -0
- package/dist/theming/getStylesString.js +9 -13
- package/dist/theming/getStylesString.js.map +1 -0
- package/dist/theming/getThemeDesignerTheme.d.ts +7 -0
- package/dist/theming/getThemeDesignerTheme.js +72 -79
- package/dist/theming/getThemeDesignerTheme.js.map +1 -0
- package/dist/theming/preloadLinks.d.ts +3 -0
- package/dist/theming/preloadLinks.js +13 -17
- package/dist/theming/preloadLinks.js.map +1 -0
- package/dist/thirdparty/_merge.d.ts +2 -0
- package/dist/thirdparty/_merge.js +7 -4
- package/dist/thirdparty/_merge.js.map +1 -0
- package/dist/thirdparty/isPlainObject.d.ts +2 -0
- package/dist/thirdparty/isPlainObject.js +11 -10
- package/dist/thirdparty/isPlainObject.js.map +1 -0
- package/dist/thirdparty/merge.d.ts +2 -0
- package/dist/thirdparty/merge.js +4 -8
- package/dist/thirdparty/merge.js.map +1 -0
- package/dist/types/AnimationMode.d.ts +32 -0
- package/dist/types/AnimationMode.js +33 -6
- package/dist/types/AnimationMode.js.map +1 -0
- package/dist/types/CSSColor.d.ts +16 -0
- package/dist/types/CSSColor.js +15 -5
- package/dist/types/CSSColor.js.map +1 -0
- package/dist/types/CalendarType.d.ts +37 -0
- package/dist/types/CalendarType.js +35 -18
- package/dist/types/CalendarType.js.map +1 -0
- package/dist/types/DOMReference.d.ts +17 -0
- package/dist/types/DOMReference.js +14 -13
- package/dist/types/DOMReference.js.map +1 -0
- package/dist/types/DataType.d.ts +25 -0
- package/dist/types/DataType.js +33 -26
- package/dist/types/DataType.js.map +1 -0
- package/dist/types/Float.d.ts +18 -0
- package/dist/types/Float.js +18 -10
- package/dist/types/Float.js.map +1 -0
- package/dist/types/Integer.d.ts +18 -0
- package/dist/types/Integer.js +18 -9
- package/dist/types/Integer.js.map +1 -0
- package/dist/types/InvisibleMessageMode.d.ts +25 -0
- package/dist/types/InvisibleMessageMode.js +20 -23
- package/dist/types/InvisibleMessageMode.js.map +1 -0
- package/dist/types/ItemNavigationBehavior.d.ts +24 -0
- package/dist/types/ItemNavigationBehavior.js +22 -12
- package/dist/types/ItemNavigationBehavior.js.map +1 -0
- package/dist/types/NavigationMode.d.ts +32 -0
- package/dist/types/NavigationMode.js +33 -6
- package/dist/types/NavigationMode.js.map +1 -0
- package/dist/types/ValueState.d.ts +42 -0
- package/dist/types/ValueState.js +41 -19
- package/dist/types/ValueState.js.map +1 -0
- package/dist/types.d.ts +18 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/updateShadowRoot.d.ts +8 -0
- package/dist/updateShadowRoot.js +25 -16
- package/dist/updateShadowRoot.js.map +1 -0
- package/dist/util/AriaLabelHelper.d.ts +15 -0
- package/dist/util/AriaLabelHelper.js +166 -34
- package/dist/util/AriaLabelHelper.js.map +1 -0
- package/dist/util/Caret.d.ts +7 -0
- package/dist/util/Caret.js +16 -25
- package/dist/util/Caret.js.map +1 -0
- package/dist/util/ColorConversion.d.ts +30 -0
- package/dist/util/ColorConversion.js +311 -372
- package/dist/util/ColorConversion.js.map +1 -0
- package/dist/util/FetchHelper.d.ts +3 -0
- package/dist/util/FetchHelper.js +19 -25
- package/dist/util/FetchHelper.js.map +1 -0
- package/dist/util/FocusableElements.d.ts +4 -0
- package/dist/util/FocusableElements.js +63 -71
- package/dist/util/FocusableElements.js.map +1 -0
- package/dist/util/HTMLSanitizer.d.ts +3 -0
- package/dist/util/HTMLSanitizer.js +4 -5
- package/dist/util/HTMLSanitizer.js.map +1 -0
- package/dist/util/InvisibleMessage.d.ts +10 -0
- package/dist/util/InvisibleMessage.js +40 -53
- package/dist/util/InvisibleMessage.js.map +1 -0
- package/dist/util/PopupUtils.d.ts +7 -0
- package/dist/util/PopupUtils.js +58 -77
- package/dist/util/PopupUtils.js.map +1 -0
- package/dist/util/SlotsHelper.d.ts +9 -0
- package/dist/util/SlotsHelper.js +22 -35
- package/dist/util/SlotsHelper.js.map +1 -0
- package/dist/util/StringHelper.d.ts +3 -0
- package/dist/util/StringHelper.js +17 -20
- package/dist/util/StringHelper.js.map +1 -0
- package/dist/util/TabbableElements.d.ts +17 -0
- package/dist/util/TabbableElements.js +53 -47
- package/dist/util/TabbableElements.js.map +1 -0
- package/dist/util/arraysAreEqual.d.ts +2 -0
- package/dist/util/arraysAreEqual.js +10 -12
- package/dist/util/arraysAreEqual.js.map +1 -0
- package/dist/util/clamp.d.ts +9 -0
- package/dist/util/clamp.js +2 -2
- package/dist/util/clamp.js.map +1 -0
- package/dist/util/createLinkInHead.d.ts +7 -0
- package/dist/util/createLinkInHead.js +14 -12
- package/dist/util/createLinkInHead.js.map +1 -0
- package/dist/util/createStyleInHead.d.ts +8 -0
- package/dist/util/createStyleInHead.js +10 -10
- package/dist/util/createStyleInHead.js.map +1 -0
- package/dist/util/debounce.d.ts +2 -0
- package/dist/util/debounce.js +6 -8
- package/dist/util/debounce.js.map +1 -0
- package/dist/util/detectNavigatorLanguage.d.ts +2 -0
- package/dist/util/detectNavigatorLanguage.js +7 -10
- package/dist/util/detectNavigatorLanguage.js.map +1 -0
- package/dist/util/escapeRegex.d.ts +8 -0
- package/dist/util/escapeRegex.js +8 -7
- package/dist/util/escapeRegex.js.map +1 -0
- package/dist/util/formatMessage.d.ts +2 -0
- package/dist/util/formatMessage.js +15 -19
- package/dist/util/formatMessage.js.map +1 -0
- package/dist/util/generateHighlightedMarkup.d.ts +9 -0
- package/dist/util/generateHighlightedMarkup.js +26 -27
- package/dist/util/generateHighlightedMarkup.js.map +1 -0
- package/dist/util/getActiveElement.d.ts +2 -0
- package/dist/util/getActiveElement.js +6 -8
- package/dist/util/getActiveElement.js.map +1 -0
- package/dist/util/getClassCopy.d.ts +398 -0
- package/dist/util/getClassCopy.js +7 -7
- package/dist/util/getClassCopy.js.map +1 -0
- package/dist/util/getDesigntimePropertyAsArray.d.ts +2 -0
- package/dist/util/getDesigntimePropertyAsArray.js +4 -3
- package/dist/util/getDesigntimePropertyAsArray.js.map +1 -0
- package/dist/util/getEffectiveContentDensity.d.ts +2 -0
- package/dist/util/getEffectiveContentDensity.js +2 -3
- package/dist/util/getEffectiveContentDensity.js.map +1 -0
- package/dist/util/getEffectiveScrollbarStyle.d.ts +2 -0
- package/dist/util/getEffectiveScrollbarStyle.js +1 -2
- package/dist/util/getEffectiveScrollbarStyle.js.map +1 -0
- package/dist/util/getFastNavigationGroups.d.ts +2 -0
- package/dist/util/getFastNavigationGroups.js +51 -0
- package/dist/util/getFastNavigationGroups.js.map +1 -0
- package/dist/util/getFileExtension.d.ts +12 -0
- package/dist/util/getFileExtension.js +9 -11
- package/dist/util/getFileExtension.js.map +1 -0
- package/dist/util/getNormalizedTarget.d.ts +7 -0
- package/dist/util/getNormalizedTarget.js +7 -9
- package/dist/util/getNormalizedTarget.js.map +1 -0
- package/dist/util/getSingletonElementInstance.d.ts +2 -0
- package/dist/util/getSingletonElementInstance.js +7 -10
- package/dist/util/getSingletonElementInstance.js.map +1 -0
- package/dist/util/isElementClickable.d.ts +2 -0
- package/dist/util/isElementClickable.js +16 -0
- package/dist/util/isElementClickable.js.map +1 -0
- package/dist/util/isElementHidden.d.ts +2 -0
- package/dist/util/isElementHidden.js +8 -0
- package/dist/util/isElementHidden.js.map +1 -0
- package/dist/util/isElementInView.d.ts +6 -0
- package/dist/util/isElementInView.js +6 -9
- package/dist/util/isElementInView.js.map +1 -0
- package/dist/util/isElementTabbable.d.ts +9 -0
- package/dist/util/isElementTabbable.js +30 -0
- package/dist/util/isElementTabbable.js.map +1 -0
- package/dist/util/isValidPropertyName.d.ts +8 -0
- package/dist/util/isValidPropertyName.js +16 -17
- package/dist/util/isValidPropertyName.js.map +1 -0
- package/dist/util/whenDOMReady.d.ts +2 -0
- package/dist/util/whenDOMReady.js +11 -10
- package/dist/util/whenDOMReady.js.map +1 -0
- package/dist/util/willShowContent.d.ts +2 -0
- package/dist/util/willShowContent.js +7 -0
- package/dist/util/willShowContent.js.map +1 -0
- package/dist/validateThemeRoot.d.ts +2 -0
- package/dist/validateThemeRoot.js +47 -0
- package/dist/validateThemeRoot.js.map +1 -0
- package/lib/generate-styles/index.js +10 -5
- package/package-scripts.js +22 -7
- package/package.json +4 -4
- package/src/Boot.ts +76 -0
- package/src/{CSP.js → CSP.ts} +14 -7
- package/src/{CustomElementsRegistry.js → CustomElementsRegistry.ts} +19 -16
- package/src/{CustomElementsScope.js → CustomElementsScope.ts} +8 -5
- package/src/{CustomElementsScopeUtils.js → CustomElementsScopeUtils.ts} +14 -7
- package/src/DOMObserver.ts +28 -0
- package/src/Device.ts +203 -0
- package/src/{EventProvider.js → EventProvider.ts} +9 -7
- package/src/FeaturesRegistry.ts +14 -0
- package/src/{FontFace.js → FontFace.ts} +3 -2
- package/src/{InitialConfiguration.js → InitialConfiguration.ts} +54 -13
- package/src/Keys.ts +295 -0
- package/src/ManagedStyles.ts +92 -0
- package/src/MarkedEvents.ts +20 -0
- package/src/{MediaRange.js → MediaRange.ts} +54 -53
- package/src/{PropertiesFileFormat.js → PropertiesFileFormat.ts} +8 -8
- package/src/{Render.js → Render.ts} +25 -20
- package/src/{RenderQueue.js → RenderQueue.ts} +10 -5
- package/src/{Runtimes.js → Runtimes.ts} +15 -8
- package/src/{StaticAreaItem.js → StaticAreaItem.ts} +30 -18
- package/src/{UI5Element.js → UI5Element.ts} +280 -166
- package/src/{UI5ElementMetadata.js → UI5ElementMetadata.ts} +120 -58
- package/src/animations/{AnimationQueue.js → AnimationQueue.ts} +8 -7
- package/src/animations/animate.ts +64 -0
- package/src/animations/scroll.ts +21 -0
- package/src/animations/{slideDown.js → slideDown.ts} +27 -34
- package/src/animations/{slideUp.js → slideUp.ts} +28 -32
- package/src/asset-registries/Icons.ts +161 -0
- package/src/asset-registries/Illustrations.ts +75 -0
- package/src/asset-registries/{LocaleData.js → LocaleData.ts} +36 -28
- package/src/asset-registries/{Themes.js → Themes.ts} +19 -29
- package/src/asset-registries/{i18n.js → i18n.ts} +18 -23
- package/src/assets-meta/IconCollectionsAlias.ts +41 -0
- package/src/config/AnimationMode.ts +33 -0
- package/src/config/{CalendarType.js → CalendarType.ts} +8 -3
- package/src/config/FormatSettings.ts +35 -0
- package/src/config/Icons.ts +126 -0
- package/src/config/{Language.js → Language.ts} +22 -18
- package/src/config/NoConflict.ts +67 -0
- package/src/config/{RTL.js → RTL.ts} +18 -4
- package/src/config/Theme.ts +64 -0
- package/src/config/ThemeRoots.ts +41 -0
- package/src/decorators/customElement.ts +57 -0
- package/src/decorators/event.ts +28 -0
- package/src/decorators/fastNavigation.ts +14 -0
- package/src/decorators/languageAware.ts +14 -0
- package/src/decorators/property.ts +30 -0
- package/src/decorators/slot.ts +49 -0
- package/src/decorators/themeAware.ts +14 -0
- package/src/delegate/{ItemNavigation.js → ItemNavigation.ts} +56 -19
- package/src/delegate/ResizeHandler.ts +100 -0
- package/src/delegate/ScrollEnablement.ts +224 -0
- package/src/features/F6Navigation.ts +195 -0
- package/src/features/LegacyDateFormats.ts +40 -0
- package/src/features/OpenUI5Element.ts +11 -0
- package/src/features/OpenUI5Enablement.ts +117 -0
- package/src/features/OpenUI5Support.ts +153 -0
- package/src/generated/css/BusyIndicator.css.ts +9 -0
- package/src/generated/css/FontFace.css.ts +9 -0
- package/src/generated/css/OverrideFontFace.css.ts +9 -0
- package/src/generated/css/SystemCSSVars.css.ts +9 -0
- package/src/{getSharedResource.js → getSharedResource.ts} +13 -4
- package/src/global.d.ts +38 -0
- package/src/{i18nBundle.js → i18nBundle.ts} +45 -23
- package/src/locale/{Locale.js → Locale.ts} +15 -5
- package/src/locale/RTLAwareRegistry.ts +16 -0
- package/src/locale/{applyDirection.js → applyDirection.ts} +4 -3
- package/src/locale/{directionChange.js → directionChange.ts} +6 -4
- package/src/locale/{getEffectiveDir.js → getEffectiveDir.ts} +1 -1
- package/src/locale/{getLocale.js → getLocale.ts} +12 -7
- package/src/locale/languageChange.ts +24 -0
- package/src/locale/{nextFallbackLocale.js → nextFallbackLocale.ts} +1 -1
- package/src/locale/{normalizeLocale.js → normalizeLocale.ts} +5 -3
- package/src/renderer/LitRenderer.ts +60 -0
- package/src/renderer/{executeTemplate.js → executeTemplate.ts} +11 -5
- package/src/theming/{CustomStyle.js → CustomStyle.ts} +16 -12
- package/src/theming/{ThemeLoaded.js → ThemeLoaded.ts} +6 -4
- package/src/theming/{applyTheme.js → applyTheme.ts} +22 -11
- package/src/theming/{getConstructableStyle.js → getConstructableStyle.ts} +5 -4
- package/src/theming/getEffectiveLinksHrefs.ts +26 -0
- package/src/theming/{getEffectiveStyle.js → getEffectiveStyle.ts} +9 -7
- package/src/theming/getStylesString.ts +15 -0
- package/src/theming/{getThemeDesignerTheme.js → getThemeDesignerTheme.ts} +22 -8
- package/src/theming/{preloadLinks.js → preloadLinks.ts} +3 -2
- package/src/thirdparty/{_merge.js → _merge.ts} +2 -2
- package/src/thirdparty/{isPlainObject.js → isPlainObject.ts} +1 -1
- package/src/thirdparty/merge.ts +5 -0
- package/src/types/AnimationMode.ts +33 -0
- package/src/types/{CSSColor.js → CSSColor.ts} +12 -1
- package/src/types/CalendarType.ts +38 -0
- package/src/types/{DOMReference.js → DOMReference.ts} +6 -2
- package/src/types/DataType.ts +51 -0
- package/src/types/Float.ts +25 -0
- package/src/types/Integer.ts +25 -0
- package/src/types/InvisibleMessageMode.ts +27 -0
- package/src/types/ItemNavigationBehavior.ts +26 -0
- package/src/types/NavigationMode.ts +33 -0
- package/src/types/ValueState.ts +47 -0
- package/src/types.ts +30 -0
- package/src/updateShadowRoot.ts +42 -0
- package/src/util/AriaLabelHelper.ts +218 -0
- package/src/util/{Caret.js → Caret.ts} +5 -9
- package/src/util/{ColorConversion.js → ColorConversion.ts} +183 -182
- package/src/util/{FetchHelper.js → FetchHelper.ts} +7 -7
- package/src/util/FocusableElements.ts +92 -0
- package/src/util/{HTMLSanitizer.js → HTMLSanitizer.ts} +2 -0
- package/src/util/{InvisibleMessage.js → InvisibleMessage.ts} +6 -6
- package/src/util/PopupUtils.ts +112 -0
- package/src/util/{SlotsHelper.js → SlotsHelper.ts} +9 -13
- package/src/util/{StringHelper.js → StringHelper.ts} +7 -7
- package/src/util/TabbableElements.ts +70 -0
- package/src/util/{arraysAreEqual.js → arraysAreEqual.ts} +1 -1
- package/src/util/{clamp.js → clamp.ts} +1 -1
- package/src/util/{createLinkInHead.js → createLinkInHead.ts} +10 -4
- package/src/util/{createStyleInHead.js → createStyleInHead.ts} +4 -2
- package/src/util/{debounce.js → debounce.ts} +5 -4
- package/src/util/{detectNavigatorLanguage.js → detectNavigatorLanguage.ts} +1 -1
- package/src/util/escapeRegex.ts +11 -0
- package/src/util/{formatMessage.js → formatMessage.ts} +4 -3
- package/src/util/{generateHighlightedMarkup.js → generateHighlightedMarkup.ts} +7 -6
- package/src/util/{getClassCopy.js → getClassCopy.ts} +3 -1
- package/src/util/{getDesigntimePropertyAsArray.js → getDesigntimePropertyAsArray.ts} +1 -1
- package/src/util/getEffectiveContentDensity.ts +5 -0
- package/src/util/getFastNavigationGroups.ts +63 -0
- package/src/util/{getFileExtension.js → getFileExtension.ts} +3 -3
- package/src/util/{getNormalizedTarget.js → getNormalizedTarget.ts} +2 -2
- package/src/util/{getSingletonElementInstance.js → getSingletonElementInstance.ts} +1 -1
- package/src/util/isElementClickable.ts +19 -0
- package/src/util/isElementHidden.ts +9 -0
- package/src/util/{isElementInView.js → isElementInView.ts} +1 -1
- package/src/util/isElementTabbable.ts +37 -0
- package/src/util/{isValidPropertyName.js → isValidPropertyName.ts} +1 -1
- package/src/util/{whenDOMReady.js → whenDOMReady.ts} +1 -1
- package/src/util/willShowContent.ts +7 -0
- package/src/validateThemeRoot.ts +58 -0
- package/tsconfig.json +13 -0
- package/dist/RenderScheduler.js +0 -44
- package/dist/animations/config.js +0 -5
- package/dist/assets/bundle.esm.83f057b4.js +0 -43
- package/dist/types/CSSSize.js +0 -9
- package/dist/types/PopupState.js +0 -37
- package/dist/util/isDefaultSlotProvided.js +0 -11
- package/dist/util/isDescendantOf.js +0 -15
- package/dist/util/isNodeClickable.js +0 -19
- package/dist/util/isNodeHidden.js +0 -9
- package/dist/util/isNodeTabbable.js +0 -28
- package/dist/util/setToArray.js +0 -10
- package/hash.txt +0 -1
- package/src/Boot.js +0 -59
- package/src/DOMObserver.js +0 -65
- package/src/Device.js +0 -121
- package/src/FeaturesRegistry.js +0 -14
- package/src/Keys.js +0 -295
- package/src/ManagedStyles.js +0 -83
- package/src/RenderScheduler.js +0 -44
- package/src/animations/animate.js +0 -53
- package/src/animations/config.js +0 -5
- package/src/animations/scroll.js +0 -28
- package/src/asset-registries/Icons.js +0 -135
- package/src/asset-registries/Illustrations.js +0 -30
- package/src/assets-meta/IconCollectionsAlias.js +0 -18
- package/src/config/AnimationMode.js +0 -23
- package/src/config/FormatSettings.js +0 -13
- package/src/config/Icons.js +0 -52
- package/src/config/NoConflict.js +0 -51
- package/src/config/Theme.js +0 -53
- package/src/delegate/ResizeHandler.js +0 -106
- package/src/delegate/ScrollEnablement.js +0 -188
- package/src/features/F6Navigation.js +0 -110
- package/src/features/OpenUI5Enablement.js +0 -119
- package/src/features/OpenUI5Support.js +0 -125
- package/src/locale/RTLAwareRegistry.js +0 -14
- package/src/locale/languageChange.js +0 -22
- package/src/renderer/LitRenderer.js +0 -52
- package/src/theming/getEffectiveLinksHrefs.js +0 -27
- package/src/theming/getStylesString.js +0 -15
- package/src/thirdparty/merge.js +0 -10
- package/src/types/AnimationMode.js +0 -7
- package/src/types/CSSSize.js +0 -9
- package/src/types/CalendarType.js +0 -22
- package/src/types/DataType.js +0 -37
- package/src/types/Float.js +0 -14
- package/src/types/Integer.js +0 -13
- package/src/types/InvisibleMessageMode.js +0 -30
- package/src/types/ItemNavigationBehavior.js +0 -16
- package/src/types/NavigationMode.js +0 -7
- package/src/types/PopupState.js +0 -37
- package/src/types/ValueState.js +0 -22
- package/src/updateShadowRoot.js +0 -29
- package/src/util/AriaLabelHelper.js +0 -39
- package/src/util/FocusableElements.js +0 -79
- package/src/util/PopupUtils.js +0 -93
- package/src/util/TabbableElements.js +0 -51
- package/src/util/escapeRegex.js +0 -10
- package/src/util/getEffectiveContentDensity.js +0 -5
- package/src/util/isDefaultSlotProvided.js +0 -11
- package/src/util/isDescendantOf.js +0 -15
- package/src/util/isNodeClickable.js +0 -19
- package/src/util/isNodeHidden.js +0 -9
- package/src/util/isNodeTabbable.js +0 -28
- package/src/util/setToArray.js +0 -10
- /package/src/{AssetRegistry.js → AssetRegistry.ts} +0 -0
- /package/src/{StaticArea.js → StaticArea.ts} +0 -0
- /package/src/{SystemCSSVars.js → SystemCSSVars.ts} +0 -0
- /package/src/{Theming.js → Theming.ts} +0 -0
- /package/src/util/{getActiveElement.js → getActiveElement.ts} +0 -0
- /package/src/util/{getEffectiveScrollbarStyle.js → getEffectiveScrollbarStyle.ts} +0 -0
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import getSharedResource from "../getSharedResource.js";
|
|
2
|
-
import IconCollectionsAlias from "../assets-meta/IconCollectionsAlias.js";
|
|
3
|
-
import { getEffectiveDefaultIconCollection } from "../config/Icons.js";
|
|
4
|
-
|
|
5
|
-
const loaders = new Map();
|
|
6
|
-
const registry = getSharedResource("SVGIcons.registry", new Map());
|
|
7
|
-
const iconCollectionPromises = getSharedResource("SVGIcons.promises", new Map());
|
|
8
|
-
|
|
9
|
-
const ICON_NOT_FOUND = "ICON_NOT_FOUND";
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated
|
|
13
|
-
*/
|
|
14
|
-
const registerIconBundle = async (collectionName, bundleData) => {
|
|
15
|
-
throw new Error("This method has been removed. Use `registerIconLoader` instead.");
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const registerIconLoader = async (collectionName, loader) => {
|
|
19
|
-
loaders.set(collectionName, loader);
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const _loadIconCollectionOnce = async collectionName => {
|
|
23
|
-
if (!iconCollectionPromises.has(collectionName)) {
|
|
24
|
-
if (!loaders.has(collectionName)) {
|
|
25
|
-
throw new Error(`No loader registered for the ${collectionName} icons collection. Probably you forgot to import the "AllIcons.js" module for the respective package.`);
|
|
26
|
-
}
|
|
27
|
-
const loadIcons = loaders.get(collectionName);
|
|
28
|
-
iconCollectionPromises.set(collectionName, loadIcons(collectionName));
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return iconCollectionPromises.get(collectionName);
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const _fillRegistry = bundleData => {
|
|
35
|
-
Object.keys(bundleData.data).forEach(iconName => {
|
|
36
|
-
const iconData = bundleData.data[iconName];
|
|
37
|
-
|
|
38
|
-
registerIcon(iconName, {
|
|
39
|
-
pathData: iconData.path || iconData.paths,
|
|
40
|
-
ltr: iconData.ltr,
|
|
41
|
-
accData: iconData.acc,
|
|
42
|
-
collection: bundleData.collection,
|
|
43
|
-
packageName: bundleData.packageName,
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
// set
|
|
49
|
-
const registerIcon = (name, { pathData, ltr, accData, collection, packageName } = {}) => { // eslint-disable-line
|
|
50
|
-
if (!collection) {
|
|
51
|
-
collection = getEffectiveDefaultIconCollection();
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const key = `${collection}/${name}`;
|
|
55
|
-
registry.set(key, {
|
|
56
|
-
pathData,
|
|
57
|
-
ltr,
|
|
58
|
-
accData,
|
|
59
|
-
packageName,
|
|
60
|
-
});
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
const _parseName = name => {
|
|
64
|
-
// silently support ui5-compatible URIs
|
|
65
|
-
if (name.startsWith("sap-icon://")) {
|
|
66
|
-
name = name.replace("sap-icon://", "");
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
let collection;
|
|
70
|
-
[name, collection] = name.split("/").reverse();
|
|
71
|
-
collection = collection || getEffectiveDefaultIconCollection();
|
|
72
|
-
|
|
73
|
-
// Normalize collection name.
|
|
74
|
-
// - resolve `SAP-icons-TNT` to `tnt`.
|
|
75
|
-
// - resolve `BusinessSuiteInAppSymbols` to `business-suite`.
|
|
76
|
-
// - resolve `horizon` to `SAP-icons-v5`,
|
|
77
|
-
// Note: aliases can be made as a feature, if more collections need it or more aliases are needed.
|
|
78
|
-
collection = _normalizeCollection(collection);
|
|
79
|
-
name = name.replace("icon-", "");
|
|
80
|
-
|
|
81
|
-
const registryKey = `${collection}/${name}`;
|
|
82
|
-
return { name, collection, registryKey };
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
const getIconDataSync = nameProp => {
|
|
86
|
-
const { registryKey } = _parseName(nameProp);
|
|
87
|
-
return registry.get(registryKey);
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
const getIconData = async nameProp => {
|
|
91
|
-
const { collection, registryKey } = _parseName(nameProp);
|
|
92
|
-
|
|
93
|
-
let iconData = ICON_NOT_FOUND;
|
|
94
|
-
try {
|
|
95
|
-
iconData = await _loadIconCollectionOnce(collection);
|
|
96
|
-
} catch (e) {
|
|
97
|
-
console.error(e.message); /* eslint-disable-line */
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if (iconData === ICON_NOT_FOUND) {
|
|
101
|
-
return iconData;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
if (!registry.has(registryKey)) {
|
|
105
|
-
// not filled by another await. many getters will await on the same loader, but fill only once
|
|
106
|
-
_fillRegistry(iconData);
|
|
107
|
-
}
|
|
108
|
-
return registry.get(registryKey);
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
// test page usage only
|
|
112
|
-
const _getRegisteredNames = async () => {
|
|
113
|
-
// fetch one icon of each collection to trigger the bundle load
|
|
114
|
-
await getIconData("edit");
|
|
115
|
-
await getIconData("tnt/arrow");
|
|
116
|
-
await getIconData("business-suite/3d");
|
|
117
|
-
return Array.from(registry.keys());
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
const _normalizeCollection = collectionName => {
|
|
121
|
-
if (IconCollectionsAlias[collectionName]) {
|
|
122
|
-
return IconCollectionsAlias[collectionName];
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
return collectionName;
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
export {
|
|
129
|
-
registerIconBundle,
|
|
130
|
-
registerIconLoader,
|
|
131
|
-
getIconData,
|
|
132
|
-
getIconDataSync,
|
|
133
|
-
registerIcon,
|
|
134
|
-
_getRegisteredNames,
|
|
135
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import getSharedResource from "../getSharedResource.js";
|
|
2
|
-
|
|
3
|
-
const registry = getSharedResource("SVGIllustration.registry", new Map());
|
|
4
|
-
const ILLUSTRATION_NOT_FOUND = "ILLUSTRATION_NOT_FOUND";
|
|
5
|
-
|
|
6
|
-
const registerIllustration = (name, { dialogSvg, sceneSvg, spotSvg, set, title, subtitle } = {}) => { // eslint-disable-line
|
|
7
|
-
registry.set(`${set}/${name}`, {
|
|
8
|
-
dialogSvg,
|
|
9
|
-
sceneSvg,
|
|
10
|
-
spotSvg,
|
|
11
|
-
title,
|
|
12
|
-
subtitle,
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const getIllustrationDataSync = nameProp => {
|
|
17
|
-
let set = "fiori";
|
|
18
|
-
|
|
19
|
-
if (nameProp.startsWith("Tnt")) {
|
|
20
|
-
set = "tnt";
|
|
21
|
-
nameProp = nameProp.replace(/^Tnt/, "");
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return registry.get(`${set}/${nameProp}`) || ILLUSTRATION_NOT_FOUND;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export {
|
|
28
|
-
getIllustrationDataSync,
|
|
29
|
-
registerIllustration,
|
|
30
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Supported icon collection names and aliases.
|
|
3
|
-
*
|
|
4
|
-
* Users might specify a collection, using both the key and the value in the following key-value pairs,
|
|
5
|
-
* e.g the following pairs are completely exchangeable:
|
|
6
|
-
* "SAP-icons-TNT/actor" and "tnt/actor", "BusinessSuiteInAppSymbols/3d" and "business-suite/3d",
|
|
7
|
-
* "SAP-icons-v5/accept" and "horizon/accept".
|
|
8
|
-
*
|
|
9
|
-
* Note: technically, in the code we maintain the collections under the "value" name - "tnt", "business-suite",
|
|
10
|
-
* SAP-icons-v5" and "SAP-icons"(which does not have an alias).
|
|
11
|
-
*/
|
|
12
|
-
const IconCollectionsAlias = {
|
|
13
|
-
"SAP-icons-TNT": "tnt",
|
|
14
|
-
"BusinessSuiteInAppSymbols": "business-suite",
|
|
15
|
-
"horizon": "SAP-icons-v5",
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export default IconCollectionsAlias;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { getAnimationMode as getConfiguredAnimationMode } from "../InitialConfiguration.js";
|
|
2
|
-
import AnimationMode from "../types/AnimationMode.js";
|
|
3
|
-
|
|
4
|
-
let animationMode;
|
|
5
|
-
|
|
6
|
-
const getAnimationMode = () => {
|
|
7
|
-
if (animationMode === undefined) {
|
|
8
|
-
animationMode = getConfiguredAnimationMode();
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
return animationMode;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const setAnimationMode = newAnimationMode => {
|
|
15
|
-
if (Object.values(AnimationMode).includes(newAnimationMode)) {
|
|
16
|
-
animationMode = newAnimationMode;
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export {
|
|
21
|
-
getAnimationMode,
|
|
22
|
-
setAnimationMode,
|
|
23
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { getFormatSettings } from "../InitialConfiguration.js";
|
|
2
|
-
|
|
3
|
-
let formatSettings;
|
|
4
|
-
|
|
5
|
-
const getFirstDayOfWeek = () => {
|
|
6
|
-
if (formatSettings === undefined) {
|
|
7
|
-
formatSettings = getFormatSettings();
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
return formatSettings.firstDayOfWeek;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export { getFirstDayOfWeek }; // eslint-disable-line
|
package/src/config/Icons.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { getTheme, isThemeFamily } from "./Theme.js";
|
|
2
|
-
|
|
3
|
-
const IconCollectionConfiguration = new Map();
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Sets the default icon collection (v4 or v5) per theme,
|
|
7
|
-
* which will be applied in case icon collection is not specified.
|
|
8
|
-
*
|
|
9
|
-
* Note: by default SAP-icons-v5 is used in SAP Horizon and SAP-icons-v4 for all the rest.
|
|
10
|
-
* @param {String} theme
|
|
11
|
-
* @param {String} collectionName
|
|
12
|
-
*/
|
|
13
|
-
const setDefaultIconCollection = (theme, collectionName) => {
|
|
14
|
-
if (collectionName === "horizon") {
|
|
15
|
-
collectionName = "SAP-icons-v5";
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
IconCollectionConfiguration.set(theme, collectionName);
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Returns the default icon collection (v4 or v5) for given theme,
|
|
23
|
-
* that is configured.
|
|
24
|
-
*
|
|
25
|
-
* @param {String} theme
|
|
26
|
-
* @returns {String}
|
|
27
|
-
*/
|
|
28
|
-
const getDefaultIconCollection = theme => {
|
|
29
|
-
return IconCollectionConfiguration.get(theme);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Returns the effective icon collection that will be applied for icon web components
|
|
34
|
-
* whenever namespace is not specified.
|
|
35
|
-
* @returns {String}
|
|
36
|
-
*/
|
|
37
|
-
const getEffectiveDefaultIconCollection = () => {
|
|
38
|
-
const currentTheme = getTheme();
|
|
39
|
-
const currentThemeConfiguration = IconCollectionConfiguration.get(currentTheme);
|
|
40
|
-
|
|
41
|
-
if (currentThemeConfiguration) {
|
|
42
|
-
return currentThemeConfiguration;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return isThemeFamily("sap_horizon") ? "SAP-icons-v5" : "SAP-icons";
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export {
|
|
49
|
-
setDefaultIconCollection,
|
|
50
|
-
getDefaultIconCollection,
|
|
51
|
-
getEffectiveDefaultIconCollection,
|
|
52
|
-
};
|
package/src/config/NoConflict.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { getNoConflict as getConfiguredNoConflict } from "../InitialConfiguration.js";
|
|
2
|
-
|
|
3
|
-
// Fire these events even with noConflict: true
|
|
4
|
-
const excludeList = [
|
|
5
|
-
"value-changed",
|
|
6
|
-
];
|
|
7
|
-
|
|
8
|
-
const shouldFireOriginalEvent = eventName => {
|
|
9
|
-
return excludeList.includes(eventName);
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
let noConflict;
|
|
13
|
-
|
|
14
|
-
const shouldNotFireOriginalEvent = eventName => {
|
|
15
|
-
const nc = getNoConflict();
|
|
16
|
-
return !(nc.events && nc.events.includes && nc.events.includes(eventName));
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const getNoConflict = () => {
|
|
20
|
-
if (noConflict === undefined) {
|
|
21
|
-
noConflict = getConfiguredNoConflict();
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return noConflict;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const skipOriginalEvent = eventName => {
|
|
28
|
-
const nc = getNoConflict();
|
|
29
|
-
|
|
30
|
-
// Always fire these events
|
|
31
|
-
if (shouldFireOriginalEvent(eventName)) {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// Read from the configuration
|
|
36
|
-
if (nc === true) {
|
|
37
|
-
return true;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return !shouldNotFireOriginalEvent(eventName);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const setNoConflict = noConflictData => {
|
|
44
|
-
noConflict = noConflictData;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export {
|
|
48
|
-
getNoConflict,
|
|
49
|
-
setNoConflict,
|
|
50
|
-
skipOriginalEvent,
|
|
51
|
-
};
|
package/src/config/Theme.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { getTheme as getConfiguredTheme } from "../InitialConfiguration.js";
|
|
2
|
-
import { reRenderAllUI5Elements } from "../Render.js";
|
|
3
|
-
import applyTheme from "../theming/applyTheme.js";
|
|
4
|
-
|
|
5
|
-
let theme;
|
|
6
|
-
|
|
7
|
-
const getTheme = () => {
|
|
8
|
-
if (theme === undefined) {
|
|
9
|
-
theme = getConfiguredTheme();
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
return theme;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const setTheme = async newTheme => {
|
|
16
|
-
if (theme === newTheme) {
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
theme = newTheme;
|
|
21
|
-
|
|
22
|
-
// Update CSS Custom Properties
|
|
23
|
-
await applyTheme(theme);
|
|
24
|
-
await reRenderAllUI5Elements({ themeAware: true });
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Returns if the given theme name is the one currently applied.
|
|
29
|
-
* @private
|
|
30
|
-
* @param {String}
|
|
31
|
-
* @returns {boolean}
|
|
32
|
-
*/
|
|
33
|
-
const isTheme = _theme => {
|
|
34
|
-
const currentTheme = getTheme();
|
|
35
|
-
return currentTheme === _theme || currentTheme === `${_theme}_exp`;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Returns if the current theme is part of given theme family
|
|
40
|
-
* @private
|
|
41
|
-
* @param {String} the theme family
|
|
42
|
-
* @returns {boolean}
|
|
43
|
-
*/
|
|
44
|
-
const isThemeFamily = _theme => {
|
|
45
|
-
return getTheme().startsWith(_theme);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export {
|
|
49
|
-
getTheme,
|
|
50
|
-
setTheme,
|
|
51
|
-
isTheme,
|
|
52
|
-
isThemeFamily,
|
|
53
|
-
};
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
let resizeObserver;
|
|
2
|
-
const observedElements = new Map();
|
|
3
|
-
|
|
4
|
-
const getResizeObserver = () => {
|
|
5
|
-
if (!resizeObserver) {
|
|
6
|
-
resizeObserver = new window.ResizeObserver(entries => {
|
|
7
|
-
entries.forEach(entry => {
|
|
8
|
-
const callbacks = observedElements.get(entry.target);
|
|
9
|
-
callbacks.forEach(callback => callback());
|
|
10
|
-
});
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
return resizeObserver;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
let observe = (element, callback) => {
|
|
17
|
-
const callbacks = observedElements.get(element) || [];
|
|
18
|
-
|
|
19
|
-
// if no callbacks have been added for this element - start observing it
|
|
20
|
-
if (!callbacks.length) {
|
|
21
|
-
getResizeObserver().observe(element);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// save the callbacks in an array
|
|
25
|
-
observedElements.set(element, [...callbacks, callback]);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
let unobserve = (element, callback) => {
|
|
29
|
-
const callbacks = observedElements.get(element) || [];
|
|
30
|
-
if (callbacks.length === 0) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const filteredCallbacks = callbacks.filter(fn => fn !== callback);
|
|
35
|
-
if (filteredCallbacks.length === 0) {
|
|
36
|
-
getResizeObserver().unobserve(element);
|
|
37
|
-
observedElements.delete(element);
|
|
38
|
-
} else {
|
|
39
|
-
observedElements.set(element, filteredCallbacks);
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Allows to register/deregister resize observers for a DOM element
|
|
45
|
-
*
|
|
46
|
-
* @public
|
|
47
|
-
* @class
|
|
48
|
-
*/
|
|
49
|
-
class ResizeHandler {
|
|
50
|
-
/**
|
|
51
|
-
* @static
|
|
52
|
-
* @public
|
|
53
|
-
* @param {*} element UI5 Web Component or DOM Element to be observed
|
|
54
|
-
* @param {*} callback Callback to be executed
|
|
55
|
-
*/
|
|
56
|
-
static register(element, callback) {
|
|
57
|
-
if (element.isUI5Element) {
|
|
58
|
-
element = element.getDomRef();
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
if (element instanceof HTMLElement) {
|
|
62
|
-
observe(element, callback);
|
|
63
|
-
} else {
|
|
64
|
-
console.warn("Cannot register ResizeHandler for element", element); // eslint-disable-line
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* @static
|
|
70
|
-
* @public
|
|
71
|
-
* @param {*} element UI5 Web Component or DOM Element to be unobserved
|
|
72
|
-
* @param {*} callback Callback to be removed
|
|
73
|
-
*/
|
|
74
|
-
static deregister(element, callback) {
|
|
75
|
-
if (element.isUI5Element) {
|
|
76
|
-
element = element.getDomRef();
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
if (element instanceof HTMLElement) {
|
|
80
|
-
unobserve(element, callback);
|
|
81
|
-
} else {
|
|
82
|
-
console.warn("Cannot deregister ResizeHandler for element", element); // eslint-disable-line
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Set a function to be executed whenever a DOM node needs to be observed for size change.
|
|
89
|
-
* @public
|
|
90
|
-
* @param fn
|
|
91
|
-
*/
|
|
92
|
-
const setResizeHandlerObserveFn = fn => {
|
|
93
|
-
observe = fn;
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Set a function to be executed whenever a DOM node needs to no longer be observed for size changes
|
|
98
|
-
* @public
|
|
99
|
-
* @param fn
|
|
100
|
-
*/
|
|
101
|
-
const setResizeHandlerUnobserveFn = fn => {
|
|
102
|
-
unobserve = fn;
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
export default ResizeHandler;
|
|
106
|
-
export { setResizeHandlerObserveFn, setResizeHandlerUnobserveFn };
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
import { supportsTouch } from "../Device.js";
|
|
2
|
-
import EventProvider from "../EventProvider.js";
|
|
3
|
-
import scroll from "../animations/scroll.js";
|
|
4
|
-
|
|
5
|
-
const scrollEventName = "scroll";
|
|
6
|
-
const touchEndEventName = supportsTouch() ? "touchend" : "mouseup";
|
|
7
|
-
|
|
8
|
-
class ScrollEnablement extends EventProvider {
|
|
9
|
-
constructor(containerComponent) {
|
|
10
|
-
super();
|
|
11
|
-
this.containerComponent = containerComponent;
|
|
12
|
-
this.mouseMove = this.ontouchmove.bind(this);
|
|
13
|
-
this.mouseUp = this.ontouchend.bind(this);
|
|
14
|
-
this.touchStart = this.ontouchstart.bind(this);
|
|
15
|
-
|
|
16
|
-
this.supportsTouch = supportsTouch();
|
|
17
|
-
|
|
18
|
-
// On Android devices touchmove is thrown one more time than neccessary (together with touchend)
|
|
19
|
-
// so we have to cache the previus coordinates in order to provide correct parameters in the
|
|
20
|
-
// event for Android
|
|
21
|
-
this.cachedValue = {};
|
|
22
|
-
|
|
23
|
-
// In components like Carousel you need to know if the user has clicked on something or swiped
|
|
24
|
-
// in order to throw the needed event or not
|
|
25
|
-
this.startX = 0;
|
|
26
|
-
this.startY = 0;
|
|
27
|
-
|
|
28
|
-
if (this.supportsTouch) {
|
|
29
|
-
containerComponent.addEventListener("touchstart", this.touchStart, { passive: true });
|
|
30
|
-
containerComponent.addEventListener("touchmove", this.mouseMove, { passive: true });
|
|
31
|
-
containerComponent.addEventListener("touchend", this.mouseUp, { passive: true });
|
|
32
|
-
} else {
|
|
33
|
-
containerComponent.addEventListener("mousedown", this.touchStart, { passive: true });
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
set scrollContainer(container) {
|
|
38
|
-
this._container = container;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
get scrollContainer() {
|
|
42
|
-
return this._container;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Scrolls the container to the left/top position, retrying retryCount times, if the container is not yet painted
|
|
47
|
-
*
|
|
48
|
-
* @param left
|
|
49
|
-
* @param top
|
|
50
|
-
* @param retryCount
|
|
51
|
-
* @param retryInterval
|
|
52
|
-
* @returns {Promise<void>} resolved when scrolled successfully
|
|
53
|
-
*/
|
|
54
|
-
async scrollTo(left, top, retryCount = 0, retryInterval = 0) {
|
|
55
|
-
let containerPainted = this.scrollContainer.clientHeight > 0 && this.scrollContainer.clientWidth > 0;
|
|
56
|
-
|
|
57
|
-
/* eslint-disable no-loop-func, no-await-in-loop */
|
|
58
|
-
while (!containerPainted && retryCount > 0) {
|
|
59
|
-
await new Promise(resolve => {
|
|
60
|
-
setTimeout(() => {
|
|
61
|
-
containerPainted = this.scrollContainer.clientHeight > 0 && this.scrollContainer.clientWidth > 0;
|
|
62
|
-
retryCount--;
|
|
63
|
-
resolve();
|
|
64
|
-
}, retryInterval);
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
/* eslint-disable no-loop-func, no-await-in-loop */
|
|
68
|
-
|
|
69
|
-
this._container.scrollLeft = left;
|
|
70
|
-
this._container.scrollTop = top;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
move(dx, dy, disableAnimation) {
|
|
74
|
-
if (disableAnimation) {
|
|
75
|
-
this._container.scrollLeft += dx;
|
|
76
|
-
this._container.scrollTop += dy;
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
return scroll({
|
|
81
|
-
element: this._container,
|
|
82
|
-
dx,
|
|
83
|
-
dy,
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
getScrollLeft() {
|
|
88
|
-
return this._container.scrollLeft;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
getScrollTop() {
|
|
92
|
-
return this._container.scrollTop;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
_isTouchInside(touch) {
|
|
96
|
-
const rect = this._container.getBoundingClientRect();
|
|
97
|
-
const x = this.supportsTouch ? touch.clientX : touch.x;
|
|
98
|
-
const y = this.supportsTouch ? touch.clientY : touch.y;
|
|
99
|
-
|
|
100
|
-
return x >= rect.left && x <= rect.right
|
|
101
|
-
&& y >= rect.top && y <= rect.bottom;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
ontouchstart(event) {
|
|
105
|
-
const touch = this.supportsTouch ? event.touches[0] : null;
|
|
106
|
-
|
|
107
|
-
if (!this.supportsTouch) {
|
|
108
|
-
document.addEventListener("mouseup", this.mouseUp, { passive: true });
|
|
109
|
-
document.addEventListener("mousemove", this.mouseMove, { passive: true });
|
|
110
|
-
} else {
|
|
111
|
-
// Needed only on mobile
|
|
112
|
-
this.startX = touch.pageX;
|
|
113
|
-
this.startY = touch.pageY;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
this._prevDragX = this.supportsTouch ? touch.pageX : event.x;
|
|
117
|
-
this._prevDragY = this.supportsTouch ? touch.pageY : event.y;
|
|
118
|
-
|
|
119
|
-
this._canScroll = this._isTouchInside(this.supportsTouch ? touch : event);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
ontouchmove(event) {
|
|
123
|
-
if (!this._canScroll) {
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
const container = this._container;
|
|
128
|
-
const touch = this.supportsTouch ? event.touches[0] : null;
|
|
129
|
-
|
|
130
|
-
const dragX = this.supportsTouch ? touch.pageX : event.x;
|
|
131
|
-
const dragY = this.supportsTouch ? touch.pageY : event.y;
|
|
132
|
-
|
|
133
|
-
container.scrollLeft += this._prevDragX - dragX;
|
|
134
|
-
container.scrollTop += this._prevDragY - dragY;
|
|
135
|
-
|
|
136
|
-
this.fireEvent(scrollEventName, {
|
|
137
|
-
isLeft: dragX > this._prevDragX,
|
|
138
|
-
isRight: dragX < this._prevDragX,
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
this.cachedValue.dragX = this._prevDragX;
|
|
142
|
-
this.cachedValue.dragY = this._prevDragY;
|
|
143
|
-
|
|
144
|
-
this._prevDragX = dragX;
|
|
145
|
-
this._prevDragY = dragY;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
ontouchend(event) {
|
|
149
|
-
if (this.supportsTouch) {
|
|
150
|
-
const deltaX = Math.abs(event.changedTouches[0].pageX - this.startX);
|
|
151
|
-
const deltaY = Math.abs(event.changedTouches[0].pageY - this.startY);
|
|
152
|
-
|
|
153
|
-
if (deltaX < 10 && deltaY < 10) {
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
if (!this._canScroll) {
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
const container = this._container;
|
|
163
|
-
const dragX = this.supportsTouch ? event.changedTouches[0].pageX : event.x;
|
|
164
|
-
const dragY = this.supportsTouch ? event.changedTouches[0].pageY : event.y;
|
|
165
|
-
|
|
166
|
-
container.scrollLeft += this._prevDragX - dragX;
|
|
167
|
-
container.scrollTop += this._prevDragY - dragY;
|
|
168
|
-
|
|
169
|
-
const useCachedValues = dragX === this._prevDragX;
|
|
170
|
-
const _dragX = useCachedValues ? this.cachedValue.dragX : dragX;
|
|
171
|
-
// const _dragY = useCachedValues ? this.cachedValue.dragY : dragY; add if needed
|
|
172
|
-
|
|
173
|
-
this.fireEvent(touchEndEventName, {
|
|
174
|
-
isLeft: _dragX < this._prevDragX,
|
|
175
|
-
isRight: _dragX > this._prevDragX,
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
this._prevDragX = dragX;
|
|
179
|
-
this._prevDragY = dragY;
|
|
180
|
-
|
|
181
|
-
if (!this.supportsTouch) {
|
|
182
|
-
document.removeEventListener("mousemove", this.mouseMove, { passive: true });
|
|
183
|
-
document.removeEventListener("mouseup", this.mouseUp);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
export default ScrollEnablement;
|