@ui5/webcomponents-base 0.0.0-4b9b0ab7c → 0.0.0-4e88b8243
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.npsrc.json +3 -0
- package/CHANGELOG.md +1672 -0
- package/README.md +6 -12
- package/cypress/specs/Accessor.cy.ts +79 -0
- package/cypress/specs/Boot.cy.ts +19 -0
- package/cypress/specs/ConfigurationChange.cy.ts +41 -0
- package/cypress/specs/ConfigurationScript.cy.ts +116 -0
- package/cypress/specs/ConfigurationURL.cy.ts +182 -0
- package/cypress/specs/CustomMount.cy.ts +34 -0
- package/cypress/specs/CustomTheme.cy.ts +36 -0
- package/cypress/specs/EventProvider.cy.ts +59 -0
- package/cypress/specs/SystemDOMElements.cy.ts +8 -0
- package/cypress/specs/Theming.cy.ts +74 -0
- package/cypress/specs/UI5ElementInvalidation.cy.ts +207 -0
- package/cypress/specs/UI5ElementLifecycle.cy.ts +82 -0
- package/cypress/specs/UI5ElementListenForChildPropChanges.cy.ts +62 -0
- package/cypress/specs/UI5ElementMetadataExt.cy.ts +42 -0
- package/cypress/specs/UI5ElementPropertyValidation.cy.ts +16 -0
- package/cypress/specs/UI5ElementPropsAndAttrs.cy.ts +113 -0
- package/cypress/specs/UI5ElementShadowDOM.cy.ts +30 -0
- package/cypress/specs/UI5ElementSlots.cy.ts +116 -0
- package/cypress/specs/WithComplexTemplate.cy.ts +32 -0
- package/cypress/tsconfig.json +20 -0
- package/cypress.config.js +3 -0
- package/dist/.tsbuildinfobuild +1 -0
- package/dist/AssetRegistry.d.ts +2 -2
- package/dist/AssetRegistry.js +2 -2
- package/dist/AssetRegistry.js.map +1 -1
- package/dist/Boot.d.ts +3 -2
- package/dist/Boot.js +22 -12
- package/dist/Boot.js.map +1 -1
- package/dist/CustomElementsRegistry.js +1 -1
- package/dist/CustomElementsRegistry.js.map +1 -1
- package/dist/CustomElementsScope.d.ts +4 -4
- package/dist/CustomElementsScope.js +2 -2
- package/dist/CustomElementsScope.js.map +1 -1
- package/dist/CustomElementsScopeUtils.d.ts +8 -1
- package/dist/CustomElementsScopeUtils.js +13 -1
- package/dist/CustomElementsScopeUtils.js.map +1 -1
- package/dist/DOMObserver.js.map +1 -1
- package/dist/Device.d.ts +17 -2
- package/dist/Device.js +19 -14
- package/dist/Device.js.map +1 -1
- package/dist/EventProvider.js +1 -1
- package/dist/EventProvider.js.map +1 -1
- package/dist/FeaturesRegistry.d.ts +16 -1
- package/dist/FeaturesRegistry.js +37 -1
- package/dist/FeaturesRegistry.js.map +1 -1
- package/dist/FontFace.js +6 -1
- package/dist/FontFace.js.map +1 -1
- package/dist/IgnoreCustomElements.d.ts +25 -0
- package/dist/IgnoreCustomElements.js +37 -0
- package/dist/IgnoreCustomElements.js.map +1 -0
- package/dist/InitialConfiguration.d.ts +15 -3
- package/dist/InitialConfiguration.js +41 -9
- package/dist/InitialConfiguration.js.map +1 -1
- package/dist/Keys.d.ts +8 -1
- package/dist/Keys.js +114 -106
- package/dist/Keys.js.map +1 -1
- package/dist/Location.d.ts +11 -0
- package/dist/Location.js +49 -0
- package/dist/Location.js.map +1 -0
- package/dist/ManagedStyles.d.ts +5 -6
- package/dist/ManagedStyles.js +45 -53
- package/dist/ManagedStyles.js.map +1 -1
- package/dist/MediaRange.d.ts +6 -12
- package/dist/MediaRange.js +21 -31
- package/dist/MediaRange.js.map +1 -1
- package/dist/PropertiesFileFormat.js.map +1 -1
- package/dist/Render.js.map +1 -1
- package/dist/RenderQueue.js.map +1 -1
- package/dist/Runtimes.js +11 -0
- package/dist/Runtimes.js.map +1 -1
- package/dist/SystemCSSVars.js.map +1 -1
- package/dist/Theming.js.map +1 -1
- package/dist/UI5Element.d.ts +111 -75
- package/dist/UI5Element.js +394 -229
- package/dist/UI5Element.js.map +1 -1
- package/dist/UI5ElementMetadata.d.ts +41 -27
- package/dist/UI5ElementMetadata.js +34 -72
- package/dist/UI5ElementMetadata.js.map +1 -1
- package/dist/animations/AnimationQueue.js.map +1 -1
- package/dist/animations/animate.js.map +1 -1
- package/dist/animations/scroll.js.map +1 -1
- package/dist/animations/slideDown.js.map +1 -1
- package/dist/animations/slideUp.js.map +1 -1
- package/dist/asset-registries/Icons.d.ts +21 -12
- package/dist/asset-registries/Icons.js +51 -19
- package/dist/asset-registries/Icons.js.map +1 -1
- package/dist/asset-registries/Illustrations.d.ts +2 -0
- package/dist/asset-registries/Illustrations.js +51 -20
- package/dist/asset-registries/Illustrations.js.map +1 -1
- package/dist/asset-registries/LocaleData.js +1 -1
- package/dist/asset-registries/LocaleData.js.map +1 -1
- package/dist/asset-registries/Themes.d.ts +5 -7
- package/dist/asset-registries/Themes.js +28 -13
- package/dist/asset-registries/Themes.js.map +1 -1
- package/dist/asset-registries/i18n.d.ts +2 -2
- package/dist/asset-registries/i18n.js +12 -5
- package/dist/asset-registries/i18n.js.map +1 -1
- package/dist/{assets-meta → asset-registries/util}/IconCollectionsAlias.d.ts +1 -2
- package/dist/{assets-meta → asset-registries/util}/IconCollectionsAlias.js +1 -2
- package/dist/asset-registries/util/IconCollectionsAlias.js.map +1 -0
- package/dist/asset-registries/util/IconCollectionsByTheme.d.ts +20 -0
- package/dist/asset-registries/util/IconCollectionsByTheme.js +42 -0
- package/dist/asset-registries/util/IconCollectionsByTheme.js.map +1 -0
- package/dist/asset-registries/util/getIconCollectionByTheme.d.ts +13 -0
- package/dist/asset-registries/util/getIconCollectionByTheme.js +29 -0
- package/dist/asset-registries/util/getIconCollectionByTheme.js.map +1 -0
- package/dist/config/AnimationMode.d.ts +2 -2
- package/dist/config/AnimationMode.js +6 -1
- package/dist/config/AnimationMode.js.map +1 -1
- package/dist/config/CalendarType.d.ts +8 -1
- package/dist/config/CalendarType.js +23 -2
- package/dist/config/CalendarType.js.map +1 -1
- package/dist/config/ConfigurationReset.d.ts +4 -0
- package/dist/config/ConfigurationReset.js +11 -0
- package/dist/config/ConfigurationReset.js.map +1 -0
- package/dist/config/Fonts.d.ts +16 -0
- package/dist/config/Fonts.js +30 -0
- package/dist/config/Fonts.js.map +1 -0
- package/dist/config/FormatSettings.js +4 -0
- package/dist/config/FormatSettings.js.map +1 -1
- package/dist/config/Icons.d.ts +9 -24
- package/dist/config/Icons.js +8 -67
- package/dist/config/Icons.js.map +1 -1
- package/dist/config/Language.d.ts +11 -2
- package/dist/config/Language.js +24 -4
- package/dist/config/Language.js.map +1 -1
- package/dist/config/NoConflict.js +5 -0
- package/dist/config/NoConflict.js.map +1 -1
- package/dist/config/Theme.d.ts +16 -5
- package/dist/config/Theme.js +39 -9
- package/dist/config/Theme.js.map +1 -1
- package/dist/config/ThemeRoot.d.ts +27 -0
- package/dist/config/ThemeRoot.js +61 -0
- package/dist/config/ThemeRoot.js.map +1 -0
- package/dist/config/Timezone.d.ts +17 -0
- package/dist/config/Timezone.js +34 -0
- package/dist/config/Timezone.js.map +1 -0
- package/dist/config/Tooltips.d.ts +19 -0
- package/dist/config/Tooltips.js +29 -0
- package/dist/config/Tooltips.js.map +1 -0
- package/dist/connectToComponent.d.ts +9 -0
- package/dist/connectToComponent.js +59 -0
- package/dist/connectToComponent.js.map +1 -0
- package/dist/converters/DOMReference.d.ts +5 -0
- package/dist/converters/DOMReference.js +13 -0
- package/dist/converters/DOMReference.js.map +1 -0
- package/dist/css/FontFace.css +47 -17
- package/dist/css/SystemCSSVars.css +0 -8
- package/dist/decorators/bound.d.ts +1 -0
- package/dist/decorators/bound.js +34 -0
- package/dist/decorators/bound.js.map +1 -0
- package/dist/decorators/customElement.d.ts +42 -3
- package/dist/decorators/customElement.js +26 -9
- package/dist/decorators/customElement.js.map +1 -1
- package/dist/decorators/event-strict.d.ts +15 -0
- package/dist/decorators/event-strict.js +26 -0
- package/dist/decorators/event-strict.js.map +1 -0
- package/dist/decorators/event.d.ts +8 -2
- package/dist/decorators/event.js +3 -0
- package/dist/decorators/event.js.map +1 -1
- package/dist/decorators/i18n.d.ts +17 -0
- package/dist/decorators/i18n.js +26 -0
- package/dist/decorators/i18n.js.map +1 -0
- package/dist/decorators/property.d.ts +1 -1
- package/dist/decorators/property.js +1 -1
- package/dist/decorators/property.js.map +1 -1
- package/dist/decorators/query.d.ts +25 -0
- package/dist/decorators/query.js +32 -0
- package/dist/decorators/query.js.map +1 -0
- package/dist/decorators/queryAll.d.ts +27 -0
- package/dist/decorators/queryAll.js +34 -0
- package/dist/decorators/queryAll.js.map +1 -0
- package/dist/decorators/slot.d.ts +1 -1
- package/dist/decorators/slot.js +2 -2
- package/dist/decorators/slot.js.map +1 -1
- package/dist/decorators.d.ts +8 -0
- package/dist/decorators.js +9 -0
- package/dist/decorators.js.map +1 -0
- package/dist/delegate/ItemNavigation.d.ts +9 -8
- package/dist/delegate/ItemNavigation.js +13 -14
- package/dist/delegate/ItemNavigation.js.map +1 -1
- package/dist/delegate/ResizeHandler.d.ts +4 -6
- package/dist/delegate/ResizeHandler.js +11 -11
- package/dist/delegate/ResizeHandler.js.map +1 -1
- package/dist/delegate/ScrollEnablement.js +2 -2
- package/dist/delegate/ScrollEnablement.js.map +1 -1
- package/dist/features/F6Navigation.d.ts +3 -3
- package/dist/features/F6Navigation.js +27 -8
- package/dist/features/F6Navigation.js.map +1 -1
- package/dist/features/InputElementsFormSupport.d.ts +15 -0
- package/dist/features/InputElementsFormSupport.js +39 -0
- package/dist/features/InputElementsFormSupport.js.map +1 -0
- package/dist/features/LegacyDateFormats.js.map +1 -1
- package/dist/features/OpenUI5Element.js.map +1 -1
- package/dist/features/OpenUI5Enablement.d.ts +3 -3
- package/dist/features/OpenUI5Enablement.js.map +1 -1
- package/dist/features/OpenUI5Support.d.ts +15 -6
- package/dist/features/OpenUI5Support.js +91 -46
- package/dist/features/OpenUI5Support.js.map +1 -1
- package/dist/features/patchPatcher.d.ts +11 -0
- package/dist/features/patchPatcher.js +11 -0
- package/dist/features/patchPatcher.js.map +1 -0
- package/dist/features/patchPopup.d.ts +15 -0
- package/dist/features/patchPopup.js +61 -0
- package/dist/features/patchPopup.js.map +1 -0
- package/dist/generated/AssetParameters.d.ts +6 -0
- package/dist/generated/AssetParameters.js +4 -9
- package/dist/generated/AssetParameters.js.map +1 -0
- package/dist/generated/VersionInfo.d.ts +10 -0
- package/dist/generated/VersionInfo.js +9 -8
- package/dist/generated/VersionInfo.js.map +1 -0
- package/dist/generated/css/BusyIndicator.css.d.ts +2 -3
- package/dist/generated/css/BusyIndicator.css.js +1 -6
- package/dist/generated/css/BusyIndicator.css.js.map +1 -1
- package/dist/generated/css/FontFace.css.d.ts +2 -3
- package/dist/generated/css/FontFace.css.js +1 -6
- package/dist/generated/css/FontFace.css.js.map +1 -1
- package/dist/generated/css/OverrideFontFace.css.d.ts +2 -3
- package/dist/generated/css/OverrideFontFace.css.js +1 -6
- package/dist/generated/css/OverrideFontFace.css.js.map +1 -1
- package/dist/generated/css/SystemCSSVars.css.d.ts +2 -3
- package/dist/generated/css/SystemCSSVars.css.js +1 -6
- package/dist/generated/css/SystemCSSVars.css.js.map +1 -1
- package/dist/getSharedResource.d.ts +1 -1
- package/dist/getSharedResource.js +8 -2
- package/dist/getSharedResource.js.map +1 -1
- package/dist/global.d.ts +2 -0
- package/dist/i18nBundle.d.ts +2 -4
- package/dist/i18nBundle.js +3 -5
- package/dist/i18nBundle.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/jsx-dev-runtime.d.ts +4 -0
- package/dist/jsx-dev-runtime.js +43 -0
- package/dist/jsx-dev-runtime.js.map +1 -0
- package/dist/jsx-runtime.d.ts +50 -0
- package/dist/jsx-runtime.js +27 -0
- package/dist/jsx-runtime.js.map +1 -0
- package/dist/jsx-utils.d.ts +3 -0
- package/dist/jsx-utils.js +39 -0
- package/dist/jsx-utils.js.map +1 -0
- package/dist/locale/Locale.js.map +1 -1
- package/dist/locale/RTLAwareRegistry.d.ts +1 -1
- package/dist/locale/RTLAwareRegistry.js.map +1 -1
- package/dist/locale/applyDirection.d.ts +3 -2
- package/dist/locale/applyDirection.js +3 -2
- package/dist/locale/applyDirection.js.map +1 -1
- package/dist/locale/directionChange.js.map +1 -1
- package/dist/locale/getEffectiveDir.d.ts +1 -1
- package/dist/locale/getEffectiveDir.js +3 -19
- package/dist/locale/getEffectiveDir.js.map +1 -1
- package/dist/locale/getLocale.js.map +1 -1
- package/dist/locale/languageChange.js.map +1 -1
- package/dist/locale/nextFallbackLocale.js.map +1 -1
- package/dist/locale/normalizeLocale.js.map +1 -1
- package/dist/renderer/JsxRenderer.d.ts +3 -0
- package/dist/renderer/JsxRenderer.js +16 -0
- package/dist/renderer/JsxRenderer.js.map +1 -0
- package/dist/renderer/LitRenderer.d.ts +3 -3
- package/dist/renderer/LitRenderer.js +5 -10
- package/dist/renderer/LitRenderer.js.map +1 -1
- package/dist/renderer/directives/style-map.d.ts +13 -0
- package/dist/renderer/directives/style-map.js +59 -59
- package/dist/renderer/directives/style-map.js.map +1 -0
- package/dist/renderer/executeTemplate.d.ts +3 -4
- package/dist/renderer/executeTemplate.js +1 -19
- package/dist/renderer/executeTemplate.js.map +1 -1
- package/dist/sap/base/Log.js +698 -188
- package/dist/sap/base/assert.js +28 -1
- package/dist/sap/base/config/MemoryConfigurationProvider.js +20 -0
- package/dist/sap/base/security/URLListValidator.js +253 -6
- package/dist/sap/base/security/encodeCSS.js +34 -8
- package/dist/sap/base/security/encodeXML.js +47 -17
- package/dist/sap/base/security/sanitizeHTML.js +35 -13
- package/dist/sap/base/strings/toHex.js +27 -2
- package/dist/sap/base/util/now.js +24 -3
- package/dist/sap/base/util/uid.js +27 -0
- package/dist/sap/ui/thirdparty/caja-html-sanitizer.js +113 -98
- package/dist/ssr-dom-shim.d.ts +1 -0
- package/dist/ssr-dom-shim.js +12 -0
- package/dist/ssr-dom-shim.js.map +1 -0
- package/dist/ssr-dom.d.ts +1 -0
- package/dist/ssr-dom.js +3 -0
- package/dist/ssr-dom.js.map +1 -0
- package/dist/theming/CustomStyle.js.map +1 -1
- package/dist/theming/ThemeLoaded.js.map +1 -1
- package/dist/theming/ThemeRegistered.d.ts +1 -2
- package/dist/theming/ThemeRegistered.js +1 -4
- package/dist/theming/ThemeRegistered.js.map +1 -1
- package/dist/theming/applyTheme.js +9 -9
- package/dist/theming/applyTheme.js.map +1 -1
- package/dist/theming/getConstructableStyle.d.ts +2 -2
- package/dist/theming/getConstructableStyle.js +3 -3
- package/dist/theming/getConstructableStyle.js.map +1 -1
- package/dist/theming/getEffectiveStyle.d.ts +1 -1
- package/dist/theming/getEffectiveStyle.js +5 -12
- package/dist/theming/getEffectiveStyle.js.map +1 -1
- package/dist/theming/getStylesString.js +2 -4
- package/dist/theming/getStylesString.js.map +1 -1
- package/dist/theming/getThemeDesignerTheme.js +2 -1
- package/dist/theming/getThemeDesignerTheme.js.map +1 -1
- package/dist/thirdparty/_merge.js.map +1 -1
- package/dist/thirdparty/isPlainObject.js.map +1 -1
- package/dist/thirdparty/merge.js.map +1 -1
- package/dist/thirdparty/preact/jsx.d.ts +2616 -0
- package/dist/thirdparty/preact/jsxRuntime.module.d.ts +62 -0
- package/dist/thirdparty/preact/jsxRuntime.module.js +2 -0
- package/dist/thirdparty/preact/preact.module.d.ts +398 -0
- package/dist/thirdparty/preact/preact.module.js +2 -0
- package/dist/types/AnimationMode.d.ts +0 -8
- package/dist/types/AnimationMode.js +0 -8
- package/dist/types/AnimationMode.js.map +1 -1
- package/dist/types/CalendarType.d.ts +0 -9
- package/dist/types/CalendarType.js +0 -9
- package/dist/types/CalendarType.js.map +1 -1
- package/dist/types/InvisibleMessageMode.d.ts +5 -10
- package/dist/types/InvisibleMessageMode.js +4 -11
- package/dist/types/InvisibleMessageMode.js.map +1 -1
- package/dist/types/ItemNavigationBehavior.d.ts +0 -6
- package/dist/types/ItemNavigationBehavior.js +0 -6
- package/dist/types/ItemNavigationBehavior.js.map +1 -1
- package/dist/types/MovePlacement.d.ts +20 -0
- package/dist/types/MovePlacement.js +22 -0
- package/dist/types/MovePlacement.js.map +1 -0
- package/dist/types/NavigationMode.d.ts +0 -8
- package/dist/types/NavigationMode.js +0 -8
- package/dist/types/NavigationMode.js.map +1 -1
- package/dist/types/Orientation.d.ts +16 -0
- package/dist/types/Orientation.js +18 -0
- package/dist/types/Orientation.js.map +1 -0
- package/dist/types/ValueState.d.ts +3 -17
- package/dist/types/ValueState.js +3 -17
- package/dist/types/ValueState.js.map +1 -1
- package/dist/types.d.ts +37 -14
- package/dist/types.js.map +1 -1
- package/dist/updateShadowRoot.d.ts +1 -2
- package/dist/updateShadowRoot.js +4 -25
- package/dist/updateShadowRoot.js.map +1 -1
- package/dist/util/{AriaLabelHelper.d.ts → AccessibilityTextsHelper.d.ts} +4 -2
- package/dist/util/{AriaLabelHelper.js → AccessibilityTextsHelper.js} +36 -8
- package/dist/util/AccessibilityTextsHelper.js.map +1 -0
- package/dist/util/Caret.js.map +1 -1
- package/dist/util/ColorConversion.d.ts +2 -1
- package/dist/util/ColorConversion.js +212 -197
- package/dist/util/ColorConversion.js.map +1 -1
- package/dist/util/FetchHelper.js.map +1 -1
- package/dist/util/FocusableElements.js +18 -15
- package/dist/util/FocusableElements.js.map +1 -1
- package/dist/util/HTMLSanitizer.js.map +1 -1
- package/dist/util/InvisibleMessage.js +2 -2
- package/dist/util/InvisibleMessage.js.map +1 -1
- package/dist/util/PopupUtils.d.ts +1 -3
- package/dist/util/PopupUtils.js +1 -15
- package/dist/util/PopupUtils.js.map +1 -1
- package/dist/util/SelectionAssistant.d.ts +12 -0
- package/dist/util/SelectionAssistant.js +79 -0
- package/dist/util/SelectionAssistant.js.map +1 -0
- package/dist/util/SlotsHelper.js.map +1 -1
- package/dist/util/StringHelper.d.ts +3 -1
- package/dist/util/StringHelper.js +15 -1
- package/dist/util/StringHelper.js.map +1 -1
- package/dist/util/TabbableElements.js +3 -10
- package/dist/util/TabbableElements.js.map +1 -1
- package/dist/util/arraysAreEqual.js.map +1 -1
- package/dist/util/clamp.js +2 -1
- package/dist/util/clamp.js.map +1 -1
- package/dist/util/createLinkInHead.d.ts +1 -1
- package/dist/util/createLinkInHead.js +1 -1
- package/dist/util/createLinkInHead.js.map +1 -1
- package/dist/util/debounce.js.map +1 -1
- package/dist/util/detectNavigatorLanguage.d.ts +2 -2
- package/dist/util/detectNavigatorLanguage.js +6 -1
- package/dist/util/detectNavigatorLanguage.js.map +1 -1
- package/dist/util/dragAndDrop/DragRegistry.d.ts +33 -0
- package/dist/util/dragAndDrop/DragRegistry.js +66 -0
- package/dist/util/dragAndDrop/DragRegistry.js.map +1 -0
- package/dist/util/dragAndDrop/findClosestPosition.d.ts +11 -0
- package/dist/util/dragAndDrop/findClosestPosition.js +102 -0
- package/dist/util/dragAndDrop/findClosestPosition.js.map +1 -0
- package/dist/util/dragAndDrop/handleDragOver.d.ts +16 -0
- package/dist/util/dragAndDrop/handleDragOver.js +42 -0
- package/dist/util/dragAndDrop/handleDragOver.js.map +1 -0
- package/dist/util/dragAndDrop/handleDrop.d.ts +5 -0
- package/dist/util/dragAndDrop/handleDrop.js +22 -0
- package/dist/util/dragAndDrop/handleDrop.js.map +1 -0
- package/dist/util/dragAndDrop/longDragOverHandler.d.ts +2 -0
- package/dist/util/dragAndDrop/longDragOverHandler.js +25 -0
- package/dist/util/dragAndDrop/longDragOverHandler.js.map +1 -0
- package/dist/util/escapeRegex.js.map +1 -1
- package/dist/util/fixSafariActiveState.d.ts +2 -0
- package/dist/util/fixSafariActiveState.js +11 -0
- package/dist/util/fixSafariActiveState.js.map +1 -0
- package/dist/util/formatMessage.js.map +1 -1
- package/dist/util/generateHighlightedMarkup.js.map +1 -1
- package/dist/util/getActiveElement.js.map +1 -1
- package/dist/util/getClassCopy.d.ts +142 -102
- package/dist/util/getClassCopy.js.map +1 -1
- package/dist/util/getDesigntimePropertyAsArray.d.ts +2 -2
- package/dist/util/getDesigntimePropertyAsArray.js +2 -1
- package/dist/util/getDesigntimePropertyAsArray.js.map +1 -1
- package/dist/util/getEffectiveContentDensity.js.map +1 -1
- package/dist/util/getEffectiveScrollbarStyle.d.ts +1 -1
- package/dist/util/getEffectiveScrollbarStyle.js +31 -1
- package/dist/util/getEffectiveScrollbarStyle.js.map +1 -1
- package/dist/util/getFastNavigationGroups.js.map +1 -1
- package/dist/util/getFileExtension.js.map +1 -1
- package/dist/util/getNormalizedTarget.js.map +1 -1
- package/dist/util/getSingletonElementInstance.d.ts +10 -1
- package/dist/util/getSingletonElementInstance.js +11 -2
- package/dist/util/getSingletonElementInstance.js.map +1 -1
- package/dist/util/hash2str.d.ts +1 -0
- package/dist/util/hash2str.js +14 -0
- package/dist/util/hash2str.js.map +1 -0
- package/dist/util/isElementClickable.js.map +1 -1
- package/dist/util/isElementHidden.js.map +1 -1
- package/dist/util/isElementInView.js.map +1 -1
- package/dist/util/isElementTabbable.js +2 -2
- package/dist/util/isElementTabbable.js.map +1 -1
- package/dist/util/isValidPropertyName.js.map +1 -1
- package/dist/util/toLowercaseEnumValue.d.ts +3 -0
- package/dist/util/toLowercaseEnumValue.js +4 -0
- package/dist/util/toLowercaseEnumValue.js.map +1 -0
- package/dist/util/whenDOMReady.js.map +1 -1
- package/dist/util/willShowContent.js.map +1 -1
- package/dist/validateThemeRoot.js +15 -13
- package/dist/validateThemeRoot.js.map +1 -1
- package/index.js +205 -1
- package/package-scripts.cjs +74 -0
- package/package.json +31 -9
- package/src/css/FontFace.css +47 -17
- package/src/css/SystemCSSVars.css +0 -8
- package/src/thirdparty/preact/jsxRuntime.module.js +2 -0
- package/src/thirdparty/preact/preact.module.js +2 -0
- package/src/thirdparty/preact/version.txt +1 -0
- package/tsconfig.json +19 -12
- package/.eslintignore +0 -16
- package/bundle.esm.js +0 -62
- package/config/wdio.conf.js +0 -1
- package/dist/CSP.d.ts +0 -30
- package/dist/CSP.js +0 -51
- package/dist/CSP.js.map +0 -1
- package/dist/MarkedEvents.d.ts +0 -9
- package/dist/MarkedEvents.js +0 -15
- package/dist/MarkedEvents.js.map +0 -1
- package/dist/StaticArea.d.ts +0 -0
- package/dist/StaticArea.js +0 -6
- package/dist/StaticArea.js.map +0 -1
- package/dist/StaticAreaItem.d.ts +0 -36
- package/dist/StaticAreaItem.js +0 -99
- package/dist/StaticAreaItem.js.map +0 -1
- package/dist/api.json +0 -1
- package/dist/assets/Boot.6335ce08.css +0 -1
- package/dist/assets/Boot.e74b2a49.js +0 -9
- package/dist/assets/bundle.esm.abaf0306.js +0 -52
- package/dist/assets-meta/IconCollectionsAlias.js.map +0 -1
- package/dist/config/RTL.d.ts +0 -7
- package/dist/config/RTL.js +0 -37
- package/dist/config/RTL.js.map +0 -1
- package/dist/config/ThemeRoots.d.ts +0 -4
- package/dist/config/ThemeRoots.js +0 -28
- package/dist/config/ThemeRoots.js.map +0 -1
- package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.js +0 -11
- package/dist/theming/getEffectiveLinksHrefs.d.ts +0 -3
- package/dist/theming/getEffectiveLinksHrefs.js +0 -17
- package/dist/theming/getEffectiveLinksHrefs.js.map +0 -1
- package/dist/theming/preloadLinks.d.ts +0 -3
- package/dist/theming/preloadLinks.js +0 -19
- package/dist/theming/preloadLinks.js.map +0 -1
- package/dist/types/CSSColor.d.ts +0 -15
- package/dist/types/CSSColor.js +0 -18
- package/dist/types/CSSColor.js.map +0 -1
- package/dist/types/DOMReference.d.ts +0 -17
- package/dist/types/DOMReference.js +0 -25
- package/dist/types/DOMReference.js.map +0 -1
- package/dist/types/DataType.d.ts +0 -25
- package/dist/types/DataType.js +0 -44
- package/dist/types/DataType.js.map +0 -1
- package/dist/types/Float.d.ts +0 -17
- package/dist/types/Float.js +0 -21
- package/dist/types/Float.js.map +0 -1
- package/dist/types/Integer.d.ts +0 -17
- package/dist/types/Integer.js +0 -21
- package/dist/types/Integer.js.map +0 -1
- package/dist/util/AriaLabelHelper.js.map +0 -1
- package/dist/util/createStyleInHead.d.ts +0 -8
- package/dist/util/createStyleInHead.js +0 -18
- package/dist/util/createStyleInHead.js.map +0 -1
- package/lib/generate-asset-parameters/index.js +0 -25
- package/lib/generate-styles/index.js +0 -31
- package/lib/generate-version-info/index.js +0 -32
- package/package-scripts.js +0 -71
- package/src/AssetRegistry.ts +0 -11
- package/src/Boot.ts +0 -85
- package/src/CSP.ts +0 -66
- package/src/CustomElementsRegistry.ts +0 -98
- package/src/CustomElementsScope.ts +0 -33
- package/src/CustomElementsScopeUtils.ts +0 -115
- package/src/DOMObserver.ts +0 -28
- package/src/Device.ts +0 -203
- package/src/EventProvider.ts +0 -87
- package/src/FeaturesRegistry.ts +0 -14
- package/src/FontFace.ts +0 -31
- package/src/InitialConfiguration.ts +0 -207
- package/src/Keys.ts +0 -295
- package/src/ManagedStyles.ts +0 -92
- package/src/MarkedEvents.ts +0 -20
- package/src/MediaRange.ts +0 -110
- package/src/PropertiesFileFormat.ts +0 -95
- package/src/Render.ts +0 -180
- package/src/RenderQueue.ts +0 -71
- package/src/Runtimes.ts +0 -114
- package/src/StaticArea.ts +0 -3
- package/src/StaticAreaItem.ts +0 -113
- package/src/SystemCSSVars.ts +0 -10
- package/src/Theming.ts +0 -4
- package/src/UI5Element.ts +0 -1159
- package/src/UI5ElementMetadata.ts +0 -389
- package/src/animations/AnimationQueue.ts +0 -43
- package/src/animations/animate.ts +0 -64
- package/src/animations/scroll.ts +0 -21
- package/src/animations/slideDown.ts +0 -72
- package/src/animations/slideUp.ts +0 -67
- package/src/asset-registries/Icons.ts +0 -161
- package/src/asset-registries/Illustrations.ts +0 -75
- package/src/asset-registries/LocaleData.ts +0 -172
- package/src/asset-registries/Themes.ts +0 -74
- package/src/asset-registries/i18n.ts +0 -118
- package/src/assets-meta/IconCollectionsAlias.ts +0 -41
- package/src/config/AnimationMode.ts +0 -33
- package/src/config/CalendarType.ts +0 -23
- package/src/config/FormatSettings.ts +0 -35
- package/src/config/Icons.ts +0 -126
- package/src/config/Language.ts +0 -72
- package/src/config/NoConflict.ts +0 -67
- package/src/config/RTL.ts +0 -45
- package/src/config/Theme.ts +0 -64
- package/src/config/ThemeRoots.ts +0 -41
- package/src/decorators/customElement.ts +0 -57
- package/src/decorators/event.ts +0 -28
- package/src/decorators/property.ts +0 -30
- package/src/decorators/slot.ts +0 -49
- package/src/delegate/ItemNavigation.ts +0 -393
- package/src/delegate/ResizeHandler.ts +0 -100
- package/src/delegate/ScrollEnablement.ts +0 -224
- package/src/features/F6Navigation.ts +0 -195
- package/src/features/LegacyDateFormats.ts +0 -40
- package/src/features/OpenUI5Element.ts +0 -11
- package/src/features/OpenUI5Enablement.ts +0 -117
- package/src/features/OpenUI5Support.ts +0 -153
- package/src/generated/css/BusyIndicator.css.ts +0 -9
- package/src/generated/css/FontFace.css.ts +0 -9
- package/src/generated/css/OverrideFontFace.css.ts +0 -9
- package/src/generated/css/SystemCSSVars.css.ts +0 -9
- package/src/getSharedResource.ts +0 -39
- package/src/global.d.ts +0 -38
- package/src/i18nBundle.ts +0 -108
- package/src/locale/Locale.ts +0 -101
- package/src/locale/RTLAwareRegistry.ts +0 -16
- package/src/locale/applyDirection.ts +0 -18
- package/src/locale/directionChange.ts +0 -34
- package/src/locale/getEffectiveDir.ts +0 -28
- package/src/locale/getLocale.ts +0 -46
- package/src/locale/languageChange.ts +0 -24
- package/src/locale/nextFallbackLocale.ts +0 -28
- package/src/locale/normalizeLocale.ts +0 -56
- package/src/renderer/LitRenderer.ts +0 -60
- package/src/renderer/directives/style-map.js +0 -72
- package/src/renderer/executeTemplate.ts +0 -40
- package/src/theming/CustomStyle.ts +0 -64
- package/src/theming/ThemeLoaded.ts +0 -24
- package/src/theming/ThemeRegistered.ts +0 -24
- package/src/theming/applyTheme.ts +0 -92
- package/src/theming/getConstructableStyle.ts +0 -31
- package/src/theming/getEffectiveLinksHrefs.ts +0 -26
- package/src/theming/getEffectiveStyle.ts +0 -41
- package/src/theming/getStylesString.ts +0 -15
- package/src/theming/getThemeDesignerTheme.ts +0 -101
- package/src/theming/preloadLinks.ts +0 -24
- package/src/thirdparty/_merge.ts +0 -32
- package/src/thirdparty/isPlainObject.ts +0 -18
- package/src/thirdparty/merge.ts +0 -5
- package/src/types/AnimationMode.ts +0 -33
- package/src/types/CSSColor.ts +0 -19
- package/src/types/CalendarType.ts +0 -38
- package/src/types/DOMReference.ts +0 -28
- package/src/types/DataType.ts +0 -51
- package/src/types/Float.ts +0 -24
- package/src/types/Integer.ts +0 -24
- package/src/types/InvisibleMessageMode.ts +0 -27
- package/src/types/ItemNavigationBehavior.ts +0 -26
- package/src/types/NavigationMode.ts +0 -33
- package/src/types/ValueState.ts +0 -47
- package/src/types.ts +0 -30
- package/src/updateShadowRoot.ts +0 -42
- package/src/util/AriaLabelHelper.ts +0 -218
- package/src/util/Caret.ts +0 -28
- package/src/util/ColorConversion.ts +0 -399
- package/src/util/FetchHelper.ts +0 -31
- package/src/util/FocusableElements.ts +0 -92
- package/src/util/HTMLSanitizer.ts +0 -9
- package/src/util/InvisibleMessage.ts +0 -69
- package/src/util/PopupUtils.ts +0 -112
- package/src/util/SlotsHelper.ts +0 -39
- package/src/util/StringHelper.ts +0 -26
- package/src/util/TabbableElements.ts +0 -70
- package/src/util/arraysAreEqual.ts +0 -15
- package/src/util/clamp.ts +0 -12
- package/src/util/createLinkInHead.ts +0 -25
- package/src/util/createStyleInHead.ts +0 -20
- package/src/util/debounce.ts +0 -18
- package/src/util/detectNavigatorLanguage.ts +0 -13
- package/src/util/escapeRegex.ts +0 -11
- package/src/util/formatMessage.ts +0 -24
- package/src/util/generateHighlightedMarkup.ts +0 -43
- package/src/util/getActiveElement.ts +0 -11
- package/src/util/getClassCopy.ts +0 -12
- package/src/util/getDesigntimePropertyAsArray.ts +0 -4
- package/src/util/getEffectiveContentDensity.ts +0 -5
- package/src/util/getEffectiveScrollbarStyle.ts +0 -5
- package/src/util/getFastNavigationGroups.ts +0 -63
- package/src/util/getFileExtension.ts +0 -21
- package/src/util/getNormalizedTarget.ts +0 -16
- package/src/util/getSingletonElementInstance.ts +0 -13
- package/src/util/isElementClickable.ts +0 -19
- package/src/util/isElementHidden.ts +0 -9
- package/src/util/isElementInView.ts +0 -15
- package/src/util/isElementTabbable.ts +0 -37
- package/src/util/isValidPropertyName.ts +0 -29
- package/src/util/whenDOMReady.ts +0 -13
- package/src/util/willShowContent.ts +0 -7
- package/src/validateThemeRoot.ts +0 -58
- package/used-modules.txt +0 -10
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
const fs = require('fs').promises;
|
|
2
|
-
const assets = require('@ui5/webcomponents-tools/assets-meta.js');
|
|
3
|
-
|
|
4
|
-
const fileContent = `const assetParameters = ${JSON.stringify(assets)};
|
|
5
|
-
|
|
6
|
-
const DEFAULT_THEME = assetParameters.themes.default;
|
|
7
|
-
const DEFAULT_LANGUAGE = assetParameters.languages.default;
|
|
8
|
-
const DEFAULT_LOCALE = assetParameters.locales.default;
|
|
9
|
-
const SUPPORTED_LOCALES = assetParameters.locales.all;
|
|
10
|
-
|
|
11
|
-
export {
|
|
12
|
-
DEFAULT_THEME,
|
|
13
|
-
DEFAULT_LANGUAGE,
|
|
14
|
-
DEFAULT_LOCALE,
|
|
15
|
-
SUPPORTED_LOCALES,
|
|
16
|
-
};`;
|
|
17
|
-
|
|
18
|
-
const generate = async () => {
|
|
19
|
-
await fs.mkdir("dist/generated/", { recursive: true });
|
|
20
|
-
return fs.writeFile("dist/generated/AssetParameters.js", fileContent);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
generate().then(() => {
|
|
24
|
-
console.log("Assets parameters generated.");
|
|
25
|
-
});
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
const fs = require('fs').promises;
|
|
2
|
-
const path = require('path');
|
|
3
|
-
const CleanCSS = require('clean-css');
|
|
4
|
-
|
|
5
|
-
const generate = async () => {
|
|
6
|
-
await fs.mkdir("src/generated/css/", {recursive: true});
|
|
7
|
-
|
|
8
|
-
const files = (await fs.readdir("src/css/")).filter(file => file.endsWith(".css"));
|
|
9
|
-
const filesPromises = files.map(async file => {
|
|
10
|
-
let content = await fs.readFile(path.join("src/css/", file));
|
|
11
|
-
const res = new CleanCSS().minify(`${content}`);
|
|
12
|
-
content = `import type { StyleData } from "../../types.js";
|
|
13
|
-
|
|
14
|
-
const styleData: StyleData = {
|
|
15
|
-
packageName: "@ui5/webcomponents-base",
|
|
16
|
-
fileName: "${file}",
|
|
17
|
-
content: \`${res.styles}\`,
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export default styleData;
|
|
21
|
-
`;
|
|
22
|
-
|
|
23
|
-
return fs.writeFile(path.join("src/generated/css/", `${file}.ts`), content);
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
return Promise.all(filesPromises);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
generate().then(() => {
|
|
30
|
-
console.log("Styles files generated.");
|
|
31
|
-
});
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
const fs = require('fs').promises;
|
|
2
|
-
|
|
3
|
-
const generate = async () => {
|
|
4
|
-
const version = JSON.parse(await fs.readFile("package.json")).version;
|
|
5
|
-
|
|
6
|
-
// Parse version
|
|
7
|
-
const matches = version.match(/^([0-9]+)\.([0-9]+)\.([0-9]+)(.*)$/);
|
|
8
|
-
if (!matches) {
|
|
9
|
-
throw new Error("Unsupported version format");
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const isNext = version.match(/[a-f0-9]{9}$/);
|
|
13
|
-
const buildTime = Math.floor(new Date().getTime() / 1000);
|
|
14
|
-
|
|
15
|
-
const fileContent = `const VersionInfo = {
|
|
16
|
-
version: "${version}",
|
|
17
|
-
major: ${matches[1]},
|
|
18
|
-
minor: ${matches[2]},
|
|
19
|
-
patch: ${matches[3]},
|
|
20
|
-
suffix: "${matches[4]}",
|
|
21
|
-
isNext: ${isNext ? "true" : "false"},
|
|
22
|
-
buildTime: ${buildTime},
|
|
23
|
-
};
|
|
24
|
-
export default VersionInfo;`;
|
|
25
|
-
|
|
26
|
-
await fs.mkdir("dist/generated/", { recursive: true });
|
|
27
|
-
await fs.writeFile("dist/generated/VersionInfo.js", fileContent);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
generate().then(() => {
|
|
31
|
-
console.log("Version info file generated.");
|
|
32
|
-
});
|
package/package-scripts.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
const resolve = require("resolve");
|
|
2
|
-
const path = require("path");
|
|
3
|
-
|
|
4
|
-
const assetParametersScript = resolve.sync("@ui5/webcomponents-base/lib/generate-asset-parameters/index.js");
|
|
5
|
-
const stylesScript = resolve.sync("@ui5/webcomponents-base/lib/generate-styles/index.js");
|
|
6
|
-
const versionScript = resolve.sync("@ui5/webcomponents-base/lib/generate-version-info/index.js");
|
|
7
|
-
const copyUsedModules = resolve.sync("@ui5/webcomponents-tools/lib/copy-list/index.js");
|
|
8
|
-
const esmAbsToRel = resolve.sync("@ui5/webcomponents-tools/lib/esm-abs-to-rel/index.js");
|
|
9
|
-
const preprocessJSDocScript = resolve.sync("@ui5/webcomponents-tools/lib/jsdoc/preprocess.js");
|
|
10
|
-
|
|
11
|
-
const LIB = path.join(__dirname, `../tools/lib/`);
|
|
12
|
-
|
|
13
|
-
const viteConfig = `-c "${require.resolve("@ui5/webcomponents-tools/components-package/vite.config.js")}"`;
|
|
14
|
-
const eslintConfig = `--config ${require.resolve("@ui5/webcomponents-tools/components-package/eslint.js")}`;
|
|
15
|
-
|
|
16
|
-
const scripts = {
|
|
17
|
-
clean: "rimraf jsdoc-dist && rimraf src/generated && rimraf dist && rimraf .port",
|
|
18
|
-
lint: `eslint . ${eslintConfig}`,
|
|
19
|
-
prepare: "cross-env UI5_TS=true nps clean integrate copy generateAssetParameters generateVersionInfo generateStyles generateTemplates typescript generateAPI",
|
|
20
|
-
typescript: "tsc",
|
|
21
|
-
integrate: {
|
|
22
|
-
default: "nps integrate.copy-used-modules integrate.replace-amd integrate.amd-to-es6 integrate.esm-abs-to-rel integrate.third-party",
|
|
23
|
-
"copy-used-modules": `node "${copyUsedModules}" ./used-modules.txt dist/`,
|
|
24
|
-
"replace-amd": "replace-in-file sap.ui.define define dist/**/*.js",
|
|
25
|
-
"amd-to-es6": "amdtoes6 --src=dist/ --replace --glob=**/*.js",
|
|
26
|
-
"esm-abs-to-rel": `node "${esmAbsToRel}" dist/ dist/`,
|
|
27
|
-
"third-party": {
|
|
28
|
-
default: "nps integrate.third-party.copy integrate.third-party.fix",
|
|
29
|
-
copy: "mkdirp dist/sap/ui/thirdparty/ && copy-and-watch ../../node_modules/@openui5/sap.ui.core/src/sap/ui/thirdparty/caja-html-sanitizer.js dist/sap/ui/thirdparty/",
|
|
30
|
-
fix: "replace-in-file 240 xA0 dist/sap/ui/thirdparty/caja-html-sanitizer.js"
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
build: {
|
|
34
|
-
default: `nps prepare lint build.bundle`,
|
|
35
|
-
bundle: `vite build ${viteConfig}`,
|
|
36
|
-
},
|
|
37
|
-
copy: {
|
|
38
|
-
default: "nps copy.src",
|
|
39
|
-
src: `copy-and-watch "src/**/*.{js,css,d.ts}" dist/`,
|
|
40
|
-
},
|
|
41
|
-
generateAssetParameters: `node "${assetParametersScript}"`,
|
|
42
|
-
generateVersionInfo: `node "${versionScript}"`,
|
|
43
|
-
generateStyles: `node "${stylesScript}"`,
|
|
44
|
-
generateTemplates: `mkdirp dist/generated/templates && node "${LIB}/hbs2ui5/index.js" -d test/elements -o dist/generated/templates`,
|
|
45
|
-
generateAPI: {
|
|
46
|
-
default: "nps generateAPI.prepare generateAPI.preprocess generateAPI.jsdoc generateAPI.cleanup",
|
|
47
|
-
prepare: `copy-and-watch "dist/**/*.js" jsdoc-dist/`,
|
|
48
|
-
preprocess: `node "${preprocessJSDocScript}" jsdoc-dist/`,
|
|
49
|
-
jsdoc: `jsdoc -c "${LIB}/jsdoc/configTypescript.json"`,
|
|
50
|
-
cleanup: "rimraf jsdoc-dist/"
|
|
51
|
-
},
|
|
52
|
-
watch: {
|
|
53
|
-
default: 'concurrently "nps watch.src" "nps watch.styles" "nps watch.typescript"',
|
|
54
|
-
withBundle: 'concurrently "nps watch.src" "nps watch.bundle" "nps watch.styles" "nps watch.typescript"',
|
|
55
|
-
src: 'nps "copy.src --watch --skip-initial-copy"',
|
|
56
|
-
typescript: 'tsc --watch',
|
|
57
|
-
bundle: `node ${LIB}/dev-server/dev-server.js ${viteConfig}`,
|
|
58
|
-
styles: 'chokidar "src/css/*.css" -c "nps generateStyles"'
|
|
59
|
-
},
|
|
60
|
-
start: "nps prepare watch.withBundle",
|
|
61
|
-
test: {
|
|
62
|
-
default: 'concurrently "nps test.wdio"',
|
|
63
|
-
ssr: `mocha test/ssr`,
|
|
64
|
-
wdio: `node "${LIB}/test-runner/test-runner.js"`
|
|
65
|
-
},
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
module.exports = {
|
|
70
|
-
scripts,
|
|
71
|
-
};
|
package/src/AssetRegistry.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { registerI18nLoader } from "./asset-registries/i18n.js";
|
|
2
|
-
import { registerLocaleDataLoader } from "./asset-registries/LocaleData.js";
|
|
3
|
-
import { registerThemePropertiesLoader } from "./asset-registries/Themes.js";
|
|
4
|
-
import { registerIconLoader } from "./asset-registries/Icons.js";
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
registerI18nLoader,
|
|
8
|
-
registerLocaleDataLoader,
|
|
9
|
-
registerThemePropertiesLoader,
|
|
10
|
-
registerIconLoader,
|
|
11
|
-
};
|
package/src/Boot.ts
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import whenDOMReady from "./util/whenDOMReady.js";
|
|
2
|
-
import EventProvider from "./EventProvider.js";
|
|
3
|
-
import insertFontFace from "./FontFace.js";
|
|
4
|
-
import insertSystemCSSVars from "./SystemCSSVars.js";
|
|
5
|
-
import { getTheme } from "./config/Theme.js";
|
|
6
|
-
import applyTheme from "./theming/applyTheme.js";
|
|
7
|
-
import { registerCurrentRuntime } from "./Runtimes.js";
|
|
8
|
-
import { getFeature } from "./FeaturesRegistry.js";
|
|
9
|
-
import type OpenUI5Support from "./features/OpenUI5Support.js";
|
|
10
|
-
import type F6Navigation from "./features/F6Navigation.js";
|
|
11
|
-
import { PromiseResolve } from "./types.js";
|
|
12
|
-
import { attachThemeRegistered } from "./theming/ThemeRegistered.js";
|
|
13
|
-
|
|
14
|
-
let booted = false;
|
|
15
|
-
let bootPromise: Promise<void>;
|
|
16
|
-
const eventProvider = new EventProvider<void, void>();
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Attaches a callback that will be executed after boot finishes.
|
|
20
|
-
* <b>Note:</b> If the framework already booted, the callback will be immediately executed.
|
|
21
|
-
* @public
|
|
22
|
-
* @param { Function } listener
|
|
23
|
-
*/
|
|
24
|
-
const attachBoot = (listener: () => void) => {
|
|
25
|
-
if (!booted) {
|
|
26
|
-
eventProvider.attachEvent("boot", listener);
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
listener();
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
const boot = async (): Promise<void> => {
|
|
34
|
-
if (bootPromise !== undefined) {
|
|
35
|
-
return bootPromise;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const bootExecutor = async (resolve: PromiseResolve) => {
|
|
39
|
-
if (typeof document === "undefined") {
|
|
40
|
-
resolve();
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
attachThemeRegistered(() => {
|
|
45
|
-
if (!booted) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
console.log("apply theme when theme registered after boot"); // eslint-disable-line
|
|
49
|
-
applyTheme(getTheme());
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
registerCurrentRuntime();
|
|
53
|
-
|
|
54
|
-
const openUI5Support = getFeature<typeof OpenUI5Support>("OpenUI5Support");
|
|
55
|
-
const isOpenUI5Loaded = openUI5Support ? openUI5Support.isLoaded() : false;
|
|
56
|
-
const f6Navigation = getFeature<typeof F6Navigation>("F6Navigation");
|
|
57
|
-
|
|
58
|
-
if (openUI5Support) {
|
|
59
|
-
await openUI5Support.init();
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
if (f6Navigation && !isOpenUI5Loaded) {
|
|
63
|
-
f6Navigation.init();
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
await whenDOMReady();
|
|
67
|
-
await applyTheme(getTheme());
|
|
68
|
-
openUI5Support && openUI5Support.attachListeners();
|
|
69
|
-
insertFontFace();
|
|
70
|
-
insertSystemCSSVars();
|
|
71
|
-
|
|
72
|
-
resolve();
|
|
73
|
-
|
|
74
|
-
booted = true;
|
|
75
|
-
await eventProvider.fireEventAsync("boot");
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
bootPromise = new Promise(bootExecutor as (resolve: PromiseResolve) => void);
|
|
79
|
-
return bootPromise;
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
export {
|
|
83
|
-
boot,
|
|
84
|
-
attachBoot,
|
|
85
|
-
};
|
package/src/CSP.ts
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
const roots = new Map<string, string>();
|
|
2
|
-
let useLinks = false;
|
|
3
|
-
let preloadLinks = true;
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Use this function to provide the path to the directory where the css resources for the given package will be served from.
|
|
7
|
-
*
|
|
8
|
-
* @public
|
|
9
|
-
* @param packageName name of the package that is being configured
|
|
10
|
-
* @param root path, accessible by the server that will serve the css resources
|
|
11
|
-
*/
|
|
12
|
-
const setPackageCSSRoot = (packageName: string, root: string) => {
|
|
13
|
-
roots.set(packageName, root);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const getUrl = (packageName: string, path: string) => {
|
|
17
|
-
const packageCSSRoot = roots.get(packageName);
|
|
18
|
-
|
|
19
|
-
if (!packageCSSRoot) {
|
|
20
|
-
console.warn(`Root path to the CSS resources ${packageName} not provided - use "setPackageCSSRoot" to provide the root.`); // eslint-disable-line
|
|
21
|
-
return "";
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return `${packageCSSRoot}${path}`;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Call this function to enable or disable the usage of <link> tags instead of <style> tags to achieve CSP compliance
|
|
29
|
-
* Example: "setUseLinks(true)" will unconditionally use <link> tags for all browsers;
|
|
30
|
-
* Example: "setUseLinks(!document.adoptedStyleSheets) will only enable the usage of <link> tags for browsers that do not support constructable stylesheets.
|
|
31
|
-
*
|
|
32
|
-
* @public
|
|
33
|
-
* @param use whether links will be used
|
|
34
|
-
*/
|
|
35
|
-
const setUseLinks = (use: boolean) => {
|
|
36
|
-
useLinks = use;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Call this function to enable or disable the preloading of <link> tags.
|
|
41
|
-
* Note: only taken into account when <link> tags are being used.
|
|
42
|
-
* Note: links are being preloaded by default, so call "setPreloadLinks(false)" to opt out of this.
|
|
43
|
-
*
|
|
44
|
-
* @public
|
|
45
|
-
* @param preload
|
|
46
|
-
*/
|
|
47
|
-
const setPreloadLinks = (preload: boolean) => {
|
|
48
|
-
preloadLinks = preload;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const shouldUseLinks = () => {
|
|
52
|
-
return useLinks;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
const shouldPreloadLinks = () => {
|
|
56
|
-
return preloadLinks;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export {
|
|
60
|
-
setPackageCSSRoot,
|
|
61
|
-
getUrl,
|
|
62
|
-
setUseLinks,
|
|
63
|
-
setPreloadLinks,
|
|
64
|
-
shouldUseLinks,
|
|
65
|
-
shouldPreloadLinks,
|
|
66
|
-
};
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import getSharedResource from "./getSharedResource.js";
|
|
2
|
-
import { getCurrentRuntimeIndex, compareRuntimes, getAllRuntimes } from "./Runtimes.js";
|
|
3
|
-
import { Timeout } from "./types.js";
|
|
4
|
-
|
|
5
|
-
const Tags = getSharedResource<Map<string, number>>("Tags", new Map());
|
|
6
|
-
const Definitions = new Set<string>();
|
|
7
|
-
|
|
8
|
-
let Failures = new Map<number, Set<string>>();
|
|
9
|
-
let failureTimeout: Timeout | undefined;
|
|
10
|
-
|
|
11
|
-
const UNKNOWN_RUNTIME = -1;
|
|
12
|
-
|
|
13
|
-
const registerTag = (tag: string) => {
|
|
14
|
-
Definitions.add(tag);
|
|
15
|
-
Tags.set(tag, getCurrentRuntimeIndex());
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const isTagRegistered = (tag: string) => {
|
|
19
|
-
return Definitions.has(tag);
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const getAllRegisteredTags = () => {
|
|
23
|
-
return [...Definitions.values()];
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const recordTagRegistrationFailure = (tag: string) => {
|
|
27
|
-
let tagRegRuntimeIndex = Tags.get(tag);
|
|
28
|
-
if (tagRegRuntimeIndex === undefined) {
|
|
29
|
-
tagRegRuntimeIndex = UNKNOWN_RUNTIME; // If the tag is taken, but not registered in Tags, then a version before 1.1.0 defined it => use the "unknown" key
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
if (!Failures.has(tagRegRuntimeIndex)) {
|
|
33
|
-
Failures.set(tagRegRuntimeIndex, new Set());
|
|
34
|
-
}
|
|
35
|
-
Failures.get(tagRegRuntimeIndex)!.add(tag);
|
|
36
|
-
|
|
37
|
-
if (!failureTimeout) {
|
|
38
|
-
failureTimeout = setTimeout(() => {
|
|
39
|
-
displayFailedRegistrations();
|
|
40
|
-
Failures = new Map();
|
|
41
|
-
failureTimeout = undefined;
|
|
42
|
-
}, 1000);
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
const displayFailedRegistrations = () => {
|
|
47
|
-
const allRuntimes = getAllRuntimes();
|
|
48
|
-
const currentRuntimeIndex = getCurrentRuntimeIndex();
|
|
49
|
-
const currentRuntime = allRuntimes[currentRuntimeIndex];
|
|
50
|
-
|
|
51
|
-
let message = `Multiple UI5 Web Components instances detected.`;
|
|
52
|
-
|
|
53
|
-
if (allRuntimes.length > 1) {
|
|
54
|
-
message = `${message}\nLoading order (versions before 1.1.0 not listed): ${allRuntimes.map(runtime => `\n${runtime.description}`).join("")}`;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
[...Failures.keys()].forEach(otherRuntimeIndex => {
|
|
58
|
-
let comparison: number;
|
|
59
|
-
let otherRuntime;
|
|
60
|
-
|
|
61
|
-
if (otherRuntimeIndex === UNKNOWN_RUNTIME) { // version < 1.1.0 defined the tag
|
|
62
|
-
comparison = 1; // the current runtime is considered newer
|
|
63
|
-
otherRuntime = {
|
|
64
|
-
description: `Older unknown runtime`,
|
|
65
|
-
};
|
|
66
|
-
} else {
|
|
67
|
-
comparison = compareRuntimes(currentRuntimeIndex, otherRuntimeIndex);
|
|
68
|
-
otherRuntime = allRuntimes[otherRuntimeIndex];
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
let compareWord;
|
|
72
|
-
if (comparison > 0) {
|
|
73
|
-
compareWord = "an older";
|
|
74
|
-
} else if (comparison < 0) {
|
|
75
|
-
compareWord = "a newer";
|
|
76
|
-
} else {
|
|
77
|
-
compareWord = "the same";
|
|
78
|
-
}
|
|
79
|
-
message = `${message}\n\n"${currentRuntime.description}" failed to define ${Failures.get(otherRuntimeIndex)!.size} tag(s) as they were defined by a runtime of ${compareWord} version "${otherRuntime.description}": ${([...Failures.get(otherRuntimeIndex)!]).sort().join(", ")}.`;
|
|
80
|
-
|
|
81
|
-
if (comparison > 0) {
|
|
82
|
-
message = `${message}\nWARNING! If your code uses features of the above web components, unavailable in ${otherRuntime.description}, it might not work as expected!`;
|
|
83
|
-
} else {
|
|
84
|
-
message = `${message}\nSince the above web components were defined by the same or newer version runtime, they should be compatible with your code.`;
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
message = `${message}\n\nTo prevent other runtimes from defining tags that you use, consider using scoping or have third-party libraries use scoping: https://github.com/SAP/ui5-webcomponents/blob/main/docs/2-advanced/03-scoping.md.`;
|
|
89
|
-
|
|
90
|
-
console.warn(message); // eslint-disable-line
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export {
|
|
94
|
-
registerTag,
|
|
95
|
-
isTagRegistered,
|
|
96
|
-
getAllRegisteredTags,
|
|
97
|
-
recordTagRegistrationFailure,
|
|
98
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
html,
|
|
3
|
-
svg,
|
|
4
|
-
unsafeStatic,
|
|
5
|
-
} from "lit-html/static.js";
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
setCustomElementsScopingSuffix,
|
|
9
|
-
getCustomElementsScopingSuffix,
|
|
10
|
-
setCustomElementsScopingRules,
|
|
11
|
-
getCustomElementsScopingRules,
|
|
12
|
-
shouldScopeCustomElement,
|
|
13
|
-
getEffectiveScopingSuffixForTag,
|
|
14
|
-
} from "./CustomElementsScopeUtils.js";
|
|
15
|
-
import { registerFeature } from "./FeaturesRegistry.js";
|
|
16
|
-
|
|
17
|
-
class LitStatic {
|
|
18
|
-
static html = html;
|
|
19
|
-
static svg = svg;
|
|
20
|
-
static unsafeStatic: (value: string) => object = unsafeStatic;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
registerFeature("LitStatic", LitStatic);
|
|
24
|
-
|
|
25
|
-
export {
|
|
26
|
-
LitStatic,
|
|
27
|
-
setCustomElementsScopingSuffix,
|
|
28
|
-
getCustomElementsScopingSuffix,
|
|
29
|
-
setCustomElementsScopingRules,
|
|
30
|
-
getCustomElementsScopingRules,
|
|
31
|
-
shouldScopeCustomElement,
|
|
32
|
-
getEffectiveScopingSuffixForTag,
|
|
33
|
-
};
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
let suf: string;
|
|
2
|
-
|
|
3
|
-
type Rules = {
|
|
4
|
-
include: Array<RegExp>,
|
|
5
|
-
exclude: Array<RegExp>,
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
let rulesObj: Rules = {
|
|
9
|
-
include: [/^ui5-/],
|
|
10
|
-
exclude: [],
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const tagsCache = new Map<string, boolean>(); // true/false means the tag should/should not be cached, undefined means not known yet.
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Sets the suffix to be used for custom elements scoping, f.e. pass "demo" to get tags such as "ui5-button-demo".
|
|
17
|
-
* Note: by default all tags starting with "ui5-" will be scoped, unless you change this by calling "setCustomElementsScopingRules"
|
|
18
|
-
*
|
|
19
|
-
* @public
|
|
20
|
-
* @param suffix The scoping suffix
|
|
21
|
-
*/
|
|
22
|
-
const setCustomElementsScopingSuffix = (suffix: string) => {
|
|
23
|
-
if (!suffix.match(/^[a-zA-Z0-9_-]+$/)) {
|
|
24
|
-
throw new Error("Only alphanumeric characters and dashes allowed for the scoping suffix");
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
suf = suffix;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Returns the currently set scoping suffix, or undefined if not set.
|
|
32
|
-
*
|
|
33
|
-
* @public
|
|
34
|
-
* @returns {String|undefined}
|
|
35
|
-
*/
|
|
36
|
-
const getCustomElementsScopingSuffix = () => {
|
|
37
|
-
return suf;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Sets the rules, governing which custom element tags to scope and which not, f.e.
|
|
42
|
-
* setCustomElementsScopingRules({include: [/^ui5-/]}, exclude: [/^ui5-mylib-/, /^ui5-carousel$/]);
|
|
43
|
-
* will scope all elements starting with "ui5-" but not the ones starting with "ui5-mylib-" and not "ui5-carousel".
|
|
44
|
-
*
|
|
45
|
-
* @public
|
|
46
|
-
* @param rules Object with "include" and "exclude" properties, both arrays of regular expressions. Note that "include"
|
|
47
|
-
* rules are applied first and "exclude" rules second.
|
|
48
|
-
*/
|
|
49
|
-
const setCustomElementsScopingRules = (rules: Rules) => {
|
|
50
|
-
if (!rules || !rules.include) {
|
|
51
|
-
throw new Error(`"rules" must be an object with at least an "include" property`);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if (!Array.isArray(rules.include) || rules.include.some(rule => !(rule instanceof RegExp))) {
|
|
55
|
-
throw new Error(`"rules.include" must be an array of regular expressions`);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
if (rules.exclude && (!Array.isArray(rules.exclude) || rules.exclude.some(rule => !(rule instanceof RegExp)))) {
|
|
59
|
-
throw new Error(`"rules.exclude" must be an array of regular expressions`);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
rules.exclude = rules.exclude || [];
|
|
63
|
-
rulesObj = rules;
|
|
64
|
-
tagsCache.clear(); // reset the cache upon setting new rules
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Returns the rules, governing which custom element tags to scope and which not. By default, all elements
|
|
69
|
-
* starting with "ui5-" are scoped. The default rules are: {include: [/^ui5-/]}.
|
|
70
|
-
*
|
|
71
|
-
* @public
|
|
72
|
-
* @returns {Object}
|
|
73
|
-
*/
|
|
74
|
-
const getCustomElementsScopingRules = () => {
|
|
75
|
-
return rulesObj;
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Determines whether custom elements with the given tag should be scoped or not.
|
|
80
|
-
* The tag is first matched against the "include" rules and then against the "exclude" rules and the
|
|
81
|
-
* result is cached until new rules are set.
|
|
82
|
-
*
|
|
83
|
-
* @public
|
|
84
|
-
* @param tag
|
|
85
|
-
*/
|
|
86
|
-
const shouldScopeCustomElement = (tag: string) => {
|
|
87
|
-
if (!tagsCache.has(tag)) {
|
|
88
|
-
const result = rulesObj.include.some(rule => tag.match(rule)) && !rulesObj.exclude.some(rule => tag.match(rule));
|
|
89
|
-
tagsCache.set(tag, result);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
return tagsCache.get(tag);
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Returns the currently set scoping suffix, if any and if the tag should be scoped, or undefined otherwise.
|
|
97
|
-
*
|
|
98
|
-
* @public
|
|
99
|
-
* @param tag
|
|
100
|
-
* @returns {String}
|
|
101
|
-
*/
|
|
102
|
-
const getEffectiveScopingSuffixForTag = (tag: string) => {
|
|
103
|
-
if (shouldScopeCustomElement(tag)) {
|
|
104
|
-
return getCustomElementsScopingSuffix();
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
export {
|
|
109
|
-
setCustomElementsScopingSuffix,
|
|
110
|
-
getCustomElementsScopingSuffix,
|
|
111
|
-
setCustomElementsScopingRules,
|
|
112
|
-
getCustomElementsScopingRules,
|
|
113
|
-
shouldScopeCustomElement,
|
|
114
|
-
getEffectiveScopingSuffixForTag,
|
|
115
|
-
};
|
package/src/DOMObserver.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
const observers = new WeakMap<Node, MutationObserver>();
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @param node
|
|
5
|
-
* @param callback
|
|
6
|
-
* @param options
|
|
7
|
-
*/
|
|
8
|
-
const observeDOMNode = (node: Node, callback: MutationCallback, options?: MutationObserverInit) => {
|
|
9
|
-
const observer = new MutationObserver(callback);
|
|
10
|
-
observers.set(node, observer);
|
|
11
|
-
observer.observe(node, options);
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* @param node
|
|
16
|
-
*/
|
|
17
|
-
const unobserveDOMNode = (node: Node) => {
|
|
18
|
-
const observer = observers.get(node);
|
|
19
|
-
if (observer) {
|
|
20
|
-
observer.disconnect();
|
|
21
|
-
observers.delete(node);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export {
|
|
26
|
-
observeDOMNode,
|
|
27
|
-
unobserveDOMNode,
|
|
28
|
-
};
|