@ui5/webcomponents-base 1.9.3 → 1.10.0
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 +1 -0
- package/CHANGELOG.md +0 -8
- package/bundle.esm.js +4 -1
- 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 +8 -0
- package/dist/Boot.js +29 -48
- 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 +53 -83
- 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 +107 -146
- 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 -94
- 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 +373 -0
- package/dist/UI5Element.js +928 -1006
- 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 -1
- package/dist/asset-registries/Icons.d.ts +30 -0
- package/dist/asset-registries/Icons.js +85 -118
- package/dist/asset-registries/Icons.js.map +1 -0
- package/dist/asset-registries/Illustrations.d.ts +17 -0
- package/dist/asset-registries/Illustrations.js +37 -50
- 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 -126
- package/dist/asset-registries/LocaleData.js.map +1 -0
- package/dist/asset-registries/Themes.d.ts +10 -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/bundle.esm.3d967c4e.js +56 -0
- package/dist/assets-meta/IconCollectionsAlias.d.ts +17 -0
- package/dist/assets-meta/IconCollectionsAlias.js +4 -4
- 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 +11 -0
- package/dist/config/FormatSettings.js +10 -8
- package/dist/config/FormatSettings.js.map +1 -0
- package/dist/config/Icons.d.ts +30 -0
- package/dist/config/Icons.js +28 -32
- 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 +23 -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 +18 -29
- package/dist/config/ThemeRoots.js.map +1 -0
- package/dist/decorators/customElement.d.ts +8 -0
- package/dist/decorators/customElement.js +16 -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 +24 -0
- package/dist/delegate/ResizeHandler.js +68 -91
- package/dist/delegate/ResizeHandler.js.map +1 -0
- package/dist/delegate/ScrollEnablement.d.ts +48 -0
- package/dist/delegate/ScrollEnablement.js +157 -180
- package/dist/delegate/ScrollEnablement.js.map +1 -0
- package/dist/features/F6Navigation.d.ts +16 -0
- package/dist/features/F6Navigation.js +105 -109
- package/dist/features/F6Navigation.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 +23 -0
- package/dist/features/OpenUI5Support.js +91 -120
- package/dist/features/OpenUI5Support.js.map +1 -0
- package/dist/generated/VersionInfo.js +4 -4
- package/dist/getSharedResource.d.ts +11 -0
- package/dist/getSharedResource.js +12 -16
- package/dist/getSharedResource.js.map +1 -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 +29 -43
- 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 +59 -68
- 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 +6 -7
- package/dist/types/CSSColor.js.map +1 -0
- package/dist/types/CalendarType.d.ts +37 -0
- package/dist/types/CalendarType.js +33 -53
- package/dist/types/CalendarType.js.map +1 -0
- package/dist/types/DOMReference.d.ts +17 -0
- package/dist/types/DOMReference.js +12 -15
- package/dist/types/DOMReference.js.map +1 -0
- package/dist/types/DataType.d.ts +25 -0
- package/dist/types/DataType.js +33 -32
- package/dist/types/DataType.js.map +1 -0
- package/dist/types/Float.d.ts +18 -0
- package/dist/types/Float.js +9 -12
- package/dist/types/Float.js.map +1 -0
- package/dist/types/Integer.d.ts +18 -0
- package/dist/types/Integer.js +9 -11
- package/dist/types/Integer.js.map +1 -0
- package/dist/types/InvisibleMessageMode.d.ts +25 -0
- package/dist/types/InvisibleMessageMode.js +19 -38
- 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 +38 -58
- 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 +21 -16
- package/dist/updateShadowRoot.js.map +1 -0
- package/dist/util/AriaLabelHelper.d.ts +6 -0
- package/dist/util/AriaLabelHelper.js +34 -46
- 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 +54 -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 -17
- 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 +400 -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 +44 -56
- 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 +41 -52
- package/dist/validateThemeRoot.js.map +1 -0
- package/global.d.ts +44 -0
- package/package-scripts.js +14 -5
- package/package.json +4 -4
- package/src/{AssetRegistry.js → AssetRegistry.ts} +0 -0
- package/src/Boot.ts +61 -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.js → Device.ts} +17 -14
- 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} +33 -12
- 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/{StaticArea.js → StaticArea.ts} +0 -0
- package/src/{StaticAreaItem.js → StaticAreaItem.ts} +26 -22
- package/src/{SystemCSSVars.js → SystemCSSVars.ts} +0 -0
- package/src/{Theming.js → Theming.ts} +0 -0
- package/src/{UI5Element.js → UI5Element.ts} +263 -153
- 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.js → Icons.ts} +63 -38
- package/src/asset-registries/Illustrations.ts +75 -0
- package/src/asset-registries/{LocaleData.js → LocaleData.ts} +35 -21
- package/src/asset-registries/{Themes.js → Themes.ts} +14 -29
- package/src/asset-registries/{i18n.js → i18n.ts} +18 -23
- package/src/assets-meta/{IconCollectionsAlias.js → IconCollectionsAlias.ts} +0 -0
- package/src/config/AnimationMode.ts +33 -0
- package/src/config/{CalendarType.js → CalendarType.ts} +8 -3
- package/src/config/FormatSettings.ts +21 -0
- package/src/config/{Icons.js → Icons.ts} +19 -12
- package/src/config/{Language.js → Language.ts} +22 -18
- package/src/config/NoConflict.ts +67 -0
- package/src/config/{RTL.js → RTL.ts} +14 -4
- package/src/config/Theme.ts +64 -0
- package/src/config/{ThemeRoots.js → ThemeRoots.ts} +9 -7
- package/src/decorators/customElement.ts +17 -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.js → ResizeHandler.ts} +25 -36
- package/src/delegate/ScrollEnablement.ts +221 -0
- package/src/features/{F6Navigation.js → F6Navigation.ts} +50 -25
- package/src/features/OpenUI5Element.ts +11 -0
- package/src/features/OpenUI5Enablement.ts +117 -0
- package/src/features/OpenUI5Support.ts +148 -0
- package/src/{getSharedResource.js → getSharedResource.ts} +3 -3
- 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} +11 -9
- package/src/theming/{ThemeLoaded.js → ThemeLoaded.ts} +6 -4
- package/src/theming/{applyTheme.js → applyTheme.ts} +16 -10
- 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} +3 -3
- package/src/types/CalendarType.ts +38 -0
- package/src/types/{DOMReference.js → DOMReference.ts} +4 -4
- package/src/types/DataType.ts +51 -0
- package/src/types/{Float.js → Float.ts} +5 -5
- package/src/types/{Integer.js → Integer.ts} +5 -4
- 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 +37 -0
- package/src/util/AriaLabelHelper.ts +63 -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 +82 -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} +6 -5
- 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/{getActiveElement.js → getActiveElement.ts} +0 -0
- 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/{getEffectiveScrollbarStyle.js → getEffectiveScrollbarStyle.ts} +0 -0
- package/src/util/{getFastNavigationGroups.js → getFastNavigationGroups.ts} +10 -10
- 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.js → validateThemeRoot.ts} +4 -4
- package/tsconfig.json +13 -0
- package/dist/RenderScheduler.js +0 -44
- package/dist/animations/config.js +0 -5
- package/dist/assets/bundle.esm.e2bd78ba.js +0 -55
- package/dist/types/CSSSize.js +0 -20
- package/dist/types/PopupState.js +0 -57
- 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/src/Boot.js +0 -63
- package/src/DOMObserver.js +0 -65
- 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/Illustrations.js +0 -59
- package/src/config/AnimationMode.js +0 -23
- package/src/config/FormatSettings.js +0 -13
- package/src/config/NoConflict.js +0 -51
- package/src/config/Theme.js +0 -53
- package/src/delegate/ScrollEnablement.js +0 -188
- package/src/features/OpenUI5Enablement.js +0 -119
- package/src/features/OpenUI5Support.js +0 -126
- 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 -20
- package/src/types/CalendarType.js +0 -59
- package/src/types/DataType.js +0 -43
- package/src/types/InvisibleMessageMode.js +0 -46
- package/src/types/ItemNavigationBehavior.js +0 -16
- package/src/types/NavigationMode.js +0 -7
- package/src/types/PopupState.js +0 -57
- package/src/types/ValueState.js +0 -64
- package/src/updateShadowRoot.js +0 -29
- package/src/util/AriaLabelHelper.js +0 -56
- 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
|
@@ -1,327 +1,291 @@
|
|
|
1
|
-
import DataType from "./types/DataType.js";
|
|
2
|
-
import isDescendantOf from "./util/isDescendantOf.js";
|
|
3
1
|
import { camelToKebabCase } from "./util/StringHelper.js";
|
|
4
|
-
import {
|
|
2
|
+
import { getSlottedNodes } from "./util/SlotsHelper.js";
|
|
5
3
|
import { getEffectiveScopingSuffixForTag } from "./CustomElementsScopeUtils.js";
|
|
6
|
-
|
|
7
4
|
/**
|
|
8
5
|
*
|
|
9
6
|
* @class
|
|
10
7
|
* @public
|
|
11
8
|
*/
|
|
12
9
|
class UI5ElementMetadata {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
if (typeof config.properties === "boolean") {
|
|
264
|
-
return config.properties;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
// The config object has the complex format: properties: [...]
|
|
268
|
-
if (Array.isArray(config.properties)) {
|
|
269
|
-
return config.properties.includes(name);
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
throw new Error("Wrong format for invalidateOnChildChange.properties: boolean or array is expected");
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
// A slot was changed
|
|
276
|
-
if (type === "slot") {
|
|
277
|
-
// The config object does not have a slots field
|
|
278
|
-
if (config.slots === undefined) {
|
|
279
|
-
return false;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
// The config object has the short format: slots: true/false
|
|
283
|
-
if (typeof config.slots === "boolean") {
|
|
284
|
-
return config.slots;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
// The config object has the complex format: slots: [...]
|
|
288
|
-
if (Array.isArray(config.slots)) {
|
|
289
|
-
return config.slots.includes(name);
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
throw new Error("Wrong format for invalidateOnChildChange.slots: boolean or array is expected");
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
throw new Error("Wrong format for invalidateOnChildChange: boolean or object is expected");
|
|
297
|
-
}
|
|
10
|
+
constructor(metadata) {
|
|
11
|
+
this.metadata = metadata;
|
|
12
|
+
}
|
|
13
|
+
getInitialState() {
|
|
14
|
+
if (Object.prototype.hasOwnProperty.call(this, "_initialState")) {
|
|
15
|
+
return this._initialState;
|
|
16
|
+
}
|
|
17
|
+
const initialState = {};
|
|
18
|
+
const slotsAreManaged = this.slotsAreManaged();
|
|
19
|
+
// Initialize properties
|
|
20
|
+
const props = this.getProperties();
|
|
21
|
+
for (const propName in props) { // eslint-disable-line
|
|
22
|
+
const propType = props[propName].type;
|
|
23
|
+
const propDefaultValue = props[propName].defaultValue;
|
|
24
|
+
if (propType === Boolean) {
|
|
25
|
+
initialState[propName] = false;
|
|
26
|
+
if (propDefaultValue !== undefined) {
|
|
27
|
+
console.warn("The 'defaultValue' metadata key is ignored for all booleans properties, they would be initialized with 'false' by default"); // eslint-disable-line
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
else if (props[propName].multiple) {
|
|
31
|
+
initialState[propName] = [];
|
|
32
|
+
}
|
|
33
|
+
else if (propType === Object) {
|
|
34
|
+
initialState[propName] = "defaultValue" in props[propName] ? props[propName].defaultValue : {};
|
|
35
|
+
}
|
|
36
|
+
else if (propType === String) {
|
|
37
|
+
initialState[propName] = "defaultValue" in props[propName] ? props[propName].defaultValue : "";
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
initialState[propName] = propDefaultValue;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
// Initialize slots
|
|
44
|
+
if (slotsAreManaged) {
|
|
45
|
+
const slots = this.getSlots();
|
|
46
|
+
for (const [slotName, slotData] of Object.entries(slots)) { // eslint-disable-line
|
|
47
|
+
const propertyName = slotData.propertyName || slotName;
|
|
48
|
+
initialState[propertyName] = [];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
this._initialState = initialState;
|
|
52
|
+
return initialState;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Validates the property's value and returns it if correct
|
|
56
|
+
* or returns the default value if not.
|
|
57
|
+
* <b>Note:</b> Only intended for use by UI5Element.js
|
|
58
|
+
* @public
|
|
59
|
+
*/
|
|
60
|
+
static validatePropertyValue(value, propData) {
|
|
61
|
+
const isMultiple = propData.multiple;
|
|
62
|
+
if (isMultiple && value) {
|
|
63
|
+
return value.map((propValue) => validateSingleProperty(propValue, propData));
|
|
64
|
+
}
|
|
65
|
+
return validateSingleProperty(value, propData);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Validates the slot's value and returns it if correct
|
|
69
|
+
* or throws an exception if not.
|
|
70
|
+
* <b>Note:</b> Only intended for use by UI5Element.js
|
|
71
|
+
* @pubic
|
|
72
|
+
*/
|
|
73
|
+
static validateSlotValue(value, slotData) {
|
|
74
|
+
return validateSingleSlot(value, slotData);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Returns the tag of the UI5 Element without the scope
|
|
78
|
+
* @public
|
|
79
|
+
*/
|
|
80
|
+
getPureTag() {
|
|
81
|
+
return this.metadata.tag || "";
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Returns the tag of the UI5 Element
|
|
85
|
+
* @public
|
|
86
|
+
*/
|
|
87
|
+
getTag() {
|
|
88
|
+
const pureTag = this.metadata.tag;
|
|
89
|
+
if (!pureTag) {
|
|
90
|
+
return "";
|
|
91
|
+
}
|
|
92
|
+
const suffix = getEffectiveScopingSuffixForTag(pureTag);
|
|
93
|
+
if (!suffix) {
|
|
94
|
+
return pureTag;
|
|
95
|
+
}
|
|
96
|
+
return `${pureTag}-${suffix}`;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Determines whether a property should have an attribute counterpart
|
|
100
|
+
* @public
|
|
101
|
+
* @param propName
|
|
102
|
+
* @returns {boolean}
|
|
103
|
+
*/
|
|
104
|
+
hasAttribute(propName) {
|
|
105
|
+
const propData = this.getProperties()[propName];
|
|
106
|
+
return propData.type !== Object && !propData.noAttribute && !propData.multiple;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Returns an array with the properties of the UI5 Element (in camelCase)
|
|
110
|
+
* @public
|
|
111
|
+
* @returns {string[]}
|
|
112
|
+
*/
|
|
113
|
+
getPropertiesList() {
|
|
114
|
+
return Object.keys(this.getProperties());
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Returns an array with the attributes of the UI5 Element (in kebab-case)
|
|
118
|
+
* @public
|
|
119
|
+
* @returns {string[]}
|
|
120
|
+
*/
|
|
121
|
+
getAttributesList() {
|
|
122
|
+
return this.getPropertiesList().filter(this.hasAttribute.bind(this)).map(camelToKebabCase);
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Determines whether this UI5 Element has a default slot of type Node, therefore can slot text
|
|
126
|
+
* @returns {boolean}
|
|
127
|
+
*/
|
|
128
|
+
canSlotText() {
|
|
129
|
+
const defaultSlot = this.getSlots().default;
|
|
130
|
+
return defaultSlot && defaultSlot.type === Node;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Determines whether this UI5 Element supports any slots
|
|
134
|
+
* @public
|
|
135
|
+
*/
|
|
136
|
+
hasSlots() {
|
|
137
|
+
return !!Object.entries(this.getSlots()).length;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Determines whether this UI5 Element supports any slots with "individualSlots: true"
|
|
141
|
+
* @public
|
|
142
|
+
*/
|
|
143
|
+
hasIndividualSlots() {
|
|
144
|
+
return this.slotsAreManaged() && Object.values(this.getSlots()).some(slotData => slotData.individualSlots);
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Determines whether this UI5 Element needs to invalidate if children are added/removed/changed
|
|
148
|
+
* @public
|
|
149
|
+
*/
|
|
150
|
+
slotsAreManaged() {
|
|
151
|
+
return !!this.metadata.managedSlots;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Determines whether this control supports F6 fast navigation
|
|
155
|
+
* @public
|
|
156
|
+
*/
|
|
157
|
+
supportsF6FastNavigation() {
|
|
158
|
+
return !!this.metadata.fastNavigation;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Returns an object with key-value pairs of properties and their metadata definitions
|
|
162
|
+
* @public
|
|
163
|
+
*/
|
|
164
|
+
getProperties() {
|
|
165
|
+
if (!this.metadata.properties) {
|
|
166
|
+
this.metadata.properties = {};
|
|
167
|
+
}
|
|
168
|
+
return this.metadata.properties;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Returns an object with key-value pairs of events and their metadata definitions
|
|
172
|
+
* @public
|
|
173
|
+
*/
|
|
174
|
+
getEvents() {
|
|
175
|
+
if (!this.metadata.events) {
|
|
176
|
+
this.metadata.events = {};
|
|
177
|
+
}
|
|
178
|
+
return this.metadata.events;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Returns an object with key-value pairs of slots and their metadata definitions
|
|
182
|
+
* @public
|
|
183
|
+
*/
|
|
184
|
+
getSlots() {
|
|
185
|
+
if (!this.metadata.slots) {
|
|
186
|
+
this.metadata.slots = {};
|
|
187
|
+
}
|
|
188
|
+
return this.metadata.slots;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Determines whether this UI5 Element has any translatable texts (needs to be invalidated upon language change)
|
|
192
|
+
* @returns {boolean}
|
|
193
|
+
*/
|
|
194
|
+
isLanguageAware() {
|
|
195
|
+
return !!this.metadata.languageAware;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Determines whether this UI5 Element has any theme dependant carachteristics.
|
|
199
|
+
* @returns {boolean}
|
|
200
|
+
*/
|
|
201
|
+
isThemeAware() {
|
|
202
|
+
return !!this.metadata.themeAware;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Matches a changed entity (property/slot) with the given name against the "invalidateOnChildChange" configuration
|
|
206
|
+
* and determines whether this should cause and invalidation
|
|
207
|
+
*
|
|
208
|
+
* @param slotName the name of the slot in which a child was changed
|
|
209
|
+
* @param type the type of change in the child: "property" or "slot"
|
|
210
|
+
* @param name the name of the property/slot that changed
|
|
211
|
+
* @returns {boolean}
|
|
212
|
+
*/
|
|
213
|
+
shouldInvalidateOnChildChange(slotName, type, name) {
|
|
214
|
+
const config = this.getSlots()[slotName].invalidateOnChildChange;
|
|
215
|
+
// invalidateOnChildChange was not set in the slot metadata - by default child changes do not affect the component
|
|
216
|
+
if (config === undefined) {
|
|
217
|
+
return false;
|
|
218
|
+
}
|
|
219
|
+
// The simple format was used: invalidateOnChildChange: true/false;
|
|
220
|
+
if (typeof config === "boolean") {
|
|
221
|
+
return config;
|
|
222
|
+
}
|
|
223
|
+
// The complex format was used: invalidateOnChildChange: { properties, slots }
|
|
224
|
+
if (typeof config === "object") {
|
|
225
|
+
// A property was changed
|
|
226
|
+
if (type === "property") {
|
|
227
|
+
// The config object does not have a properties field
|
|
228
|
+
if (config.properties === undefined) {
|
|
229
|
+
return false;
|
|
230
|
+
}
|
|
231
|
+
// The config object has the short format: properties: true/false
|
|
232
|
+
if (typeof config.properties === "boolean") {
|
|
233
|
+
return config.properties;
|
|
234
|
+
}
|
|
235
|
+
// The config object has the complex format: properties: [...]
|
|
236
|
+
if (Array.isArray(config.properties)) {
|
|
237
|
+
return config.properties.includes(name);
|
|
238
|
+
}
|
|
239
|
+
throw new Error("Wrong format for invalidateOnChildChange.properties: boolean or array is expected");
|
|
240
|
+
}
|
|
241
|
+
// A slot was changed
|
|
242
|
+
if (type === "slot") {
|
|
243
|
+
// The config object does not have a slots field
|
|
244
|
+
if (config.slots === undefined) {
|
|
245
|
+
return false;
|
|
246
|
+
}
|
|
247
|
+
// The config object has the short format: slots: true/false
|
|
248
|
+
if (typeof config.slots === "boolean") {
|
|
249
|
+
return config.slots;
|
|
250
|
+
}
|
|
251
|
+
// The config object has the complex format: slots: [...]
|
|
252
|
+
if (Array.isArray(config.slots)) {
|
|
253
|
+
return config.slots.includes(name);
|
|
254
|
+
}
|
|
255
|
+
throw new Error("Wrong format for invalidateOnChildChange.slots: boolean or array is expected");
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
throw new Error("Wrong format for invalidateOnChildChange: boolean or object is expected");
|
|
259
|
+
}
|
|
298
260
|
}
|
|
299
|
-
|
|
300
261
|
const validateSingleProperty = (value, propData) => {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
262
|
+
const propertyType = propData.type;
|
|
263
|
+
let propertyValidator = propData.validator;
|
|
264
|
+
if (propertyType && propertyType.isDataTypeClass) {
|
|
265
|
+
propertyValidator = propertyType;
|
|
266
|
+
}
|
|
267
|
+
if (propertyValidator) {
|
|
268
|
+
return propertyValidator.isValid(value) ? value : propData.defaultValue;
|
|
269
|
+
}
|
|
270
|
+
if (!propertyType || propertyType === String) {
|
|
271
|
+
return (typeof value === "string" || typeof value === "undefined" || value === null) ? value : value.toString();
|
|
272
|
+
}
|
|
273
|
+
if (propertyType === Boolean) {
|
|
274
|
+
return typeof value === "boolean" ? value : false;
|
|
275
|
+
}
|
|
276
|
+
if (propertyType === Object) {
|
|
277
|
+
return typeof value === "object" ? value : propData.defaultValue;
|
|
278
|
+
}
|
|
279
|
+
// Check if "value" is part of the enum (propertyType) values and return the defaultValue if not found.
|
|
280
|
+
return value in propertyType ? value : propData.defaultValue;
|
|
315
281
|
};
|
|
316
|
-
|
|
317
282
|
const validateSingleSlot = (value, slotData) => {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
return value;
|
|
283
|
+
value && getSlottedNodes(value).forEach(el => {
|
|
284
|
+
if (!(el instanceof slotData.type)) {
|
|
285
|
+
throw new Error(`The element is not of type ${slotData.type.toString()}`);
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
return value;
|
|
325
289
|
};
|
|
326
|
-
|
|
327
290
|
export default UI5ElementMetadata;
|
|
291
|
+
//# sourceMappingURL=UI5ElementMetadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UI5ElementMetadata.js","sourceRoot":"","sources":["../src/UI5ElementMetadata.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,+BAA+B,EAAE,MAAM,+BAA+B,CAAC;AA2ChF;;;;GAIG;AACH,MAAM,kBAAkB;IAIvB,YAAY,QAAkB;QAC7B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC1B,CAAC;IAED,eAAe;QACd,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,eAAe,CAAC,EAAE;YAChE,OAAO,IAAI,CAAC,aAAc,CAAC;SAC3B;QACD,MAAM,YAAY,GAAU,EAAE,CAAC;QAC/B,MAAM,eAAe,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QAE/C,wBAAwB;QACxB,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QACnC,KAAK,MAAM,QAAQ,IAAI,KAAK,EAAE,EAAE,sBAAsB;YACrD,MAAM,QAAQ,GAAG,K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AAO,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,WAAW,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;KAChH;IAED,IAAI,YAAY,KAAK,OAAO,EAAE;QAC7B,OAAO,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;KAClD;IAED,IAAI,YAAY,KAAK,MAAM,EAAE;QAC5B,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC;KACjE;IAED,uGAAuG;IACvG,OAAO,KAAe,IAAI,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC;AACxE,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,KAAW,EAAE,QAAc,EAAE,EAAE;IAC1D,KAAK,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE;QAC5C,IAAI,CAAC,CAAC,EAAE,YAAY,QAAQ,CAAC,IAAI,CAAC,EAAE;YACnC,MAAM,IAAI,KAAK,CAAC,8BAA8B,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;SAC1E;IACF,CAAC,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC;AACd,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type TaskType = () => Promise<void>;
|
|
2
|
+
declare class AnimationQueue {
|
|
3
|
+
static get tasks(): WeakMap<HTMLElement, TaskType[]>;
|
|
4
|
+
static enqueue(element: HTMLElement, task: TaskType): void;
|
|
5
|
+
static run(element: HTMLElement, task: TaskType): Promise<void>;
|
|
6
|
+
static push(element: HTMLElement, task: TaskType): void;
|
|
7
|
+
}
|
|
8
|
+
export default AnimationQueue;
|