@ui5/webcomponents-base 2.0.0-rc.3 → 2.0.0-rc.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/README.md +1 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/Boot.js +1 -1
- package/dist/Boot.js.map +1 -1
- package/dist/Keys.d.ts +2 -1
- package/dist/Keys.js +2 -1
- package/dist/Keys.js.map +1 -1
- package/dist/UI5Element.d.ts +9 -1
- package/dist/UI5Element.js +73 -12
- package/dist/UI5Element.js.map +1 -1
- package/dist/UI5ElementMetadata.d.ts +5 -0
- package/dist/UI5ElementMetadata.js +6 -0
- package/dist/UI5ElementMetadata.js.map +1 -1
- package/dist/config/AnimationMode.js +2 -1
- package/dist/config/AnimationMode.js.map +1 -1
- package/dist/custom-elements-internal.json +6 -15
- package/dist/custom-elements.json +6 -15
- package/dist/decorators/customElement.d.ts +1 -0
- package/dist/decorators/customElement.js +5 -2
- package/dist/decorators/customElement.js.map +1 -1
- package/dist/features/InputElementsFormSupport.d.ts +18 -0
- package/dist/features/InputElementsFormSupport.js +40 -0
- package/dist/features/InputElementsFormSupport.js.map +1 -0
- package/dist/generated/VersionInfo.js +3 -3
- package/dist/generated/VersionInfo.js.map +1 -1
- package/dist/prod/AssetRegistry.js +2 -0
- package/dist/prod/AssetRegistry.js.map +7 -0
- package/dist/prod/Boot.js +2 -0
- package/dist/prod/Boot.js.map +7 -0
- package/dist/prod/CustomElementsRegistry.js +10 -0
- package/dist/prod/CustomElementsRegistry.js.map +7 -0
- package/dist/prod/CustomElementsScope.js +2 -0
- package/dist/prod/CustomElementsScope.js.map +7 -0
- package/dist/prod/CustomElementsScopeUtils.js +2 -0
- package/dist/prod/CustomElementsScopeUtils.js.map +7 -0
- package/dist/prod/DOMObserver.js +2 -0
- package/dist/prod/DOMObserver.js.map +7 -0
- package/dist/prod/Device.js +2 -0
- package/dist/prod/Device.js.map +7 -0
- package/dist/prod/EventProvider.js +2 -0
- package/dist/prod/EventProvider.js.map +7 -0
- package/dist/prod/FeaturesRegistry.js +2 -0
- package/dist/prod/FeaturesRegistry.js.map +7 -0
- package/dist/prod/FontFace.js +2 -0
- package/dist/prod/FontFace.js.map +7 -0
- package/dist/prod/IgnoreCustomElements.js +2 -0
- package/dist/prod/IgnoreCustomElements.js.map +7 -0
- package/dist/prod/InitialConfiguration.js +2 -0
- package/dist/prod/InitialConfiguration.js.map +7 -0
- package/dist/prod/Keys.js +2 -0
- package/dist/prod/Keys.js.map +7 -0
- package/dist/prod/ManagedStyles.js +2 -0
- package/dist/prod/ManagedStyles.js.map +7 -0
- package/dist/prod/MarkedEvents.js +2 -0
- package/dist/prod/MarkedEvents.js.map +7 -0
- package/dist/prod/MediaRange.js +2 -0
- package/dist/prod/MediaRange.js.map +7 -0
- package/dist/prod/PropertiesFileFormat.js +3 -0
- package/dist/prod/PropertiesFileFormat.js.map +7 -0
- package/dist/prod/Render.js +2 -0
- package/dist/prod/Render.js.map +7 -0
- package/dist/prod/RenderQueue.js +2 -0
- package/dist/prod/RenderQueue.js.map +7 -0
- package/dist/prod/Runtimes.js +2 -0
- package/dist/prod/Runtimes.js.map +7 -0
- package/dist/prod/SystemCSSVars.js +2 -0
- package/dist/prod/SystemCSSVars.js.map +7 -0
- package/dist/prod/Theming.js +2 -0
- package/dist/prod/Theming.js.map +7 -0
- package/dist/prod/UI5Element.js +2 -0
- package/dist/prod/UI5Element.js.map +7 -0
- package/dist/prod/UI5ElementMetadata.js +2 -0
- package/dist/prod/UI5ElementMetadata.js.map +7 -0
- package/dist/prod/animations/AnimationQueue.js +2 -0
- package/dist/prod/animations/AnimationQueue.js.map +7 -0
- package/dist/prod/animations/animate.js +2 -0
- package/dist/prod/animations/animate.js.map +7 -0
- package/dist/prod/animations/scroll.js +2 -0
- package/dist/prod/animations/scroll.js.map +7 -0
- package/dist/prod/animations/slideDown.js +2 -0
- package/dist/prod/animations/slideDown.js.map +7 -0
- package/dist/prod/animations/slideUp.js +2 -0
- package/dist/prod/animations/slideUp.js.map +7 -0
- package/dist/prod/asset-registries/Icons.js +2 -0
- package/dist/prod/asset-registries/Icons.js.map +7 -0
- package/dist/prod/asset-registries/Illustrations.js +2 -0
- package/dist/prod/asset-registries/Illustrations.js.map +7 -0
- package/dist/prod/asset-registries/LocaleData.js +2 -0
- package/dist/prod/asset-registries/LocaleData.js.map +7 -0
- package/dist/prod/asset-registries/Themes.js +2 -0
- package/dist/prod/asset-registries/Themes.js.map +7 -0
- package/dist/prod/asset-registries/i18n.js +2 -0
- package/dist/prod/asset-registries/i18n.js.map +7 -0
- package/dist/prod/asset-registries/util/IconCollectionsAlias.js +2 -0
- package/dist/prod/asset-registries/util/IconCollectionsAlias.js.map +7 -0
- package/dist/prod/asset-registries/util/IconCollectionsByTheme.js +2 -0
- package/dist/prod/asset-registries/util/IconCollectionsByTheme.js.map +7 -0
- package/dist/prod/asset-registries/util/getIconCollectionByTheme.js +2 -0
- package/dist/prod/asset-registries/util/getIconCollectionByTheme.js.map +7 -0
- package/dist/prod/config/AnimationMode.js +2 -0
- package/dist/prod/config/AnimationMode.js.map +7 -0
- package/dist/prod/config/CalendarType.js +2 -0
- package/dist/prod/config/CalendarType.js.map +7 -0
- package/dist/prod/config/FormatSettings.js +2 -0
- package/dist/prod/config/FormatSettings.js.map +7 -0
- package/dist/prod/config/Icons.js +2 -0
- package/dist/prod/config/Icons.js.map +7 -0
- package/dist/prod/config/Language.js +2 -0
- package/dist/prod/config/Language.js.map +7 -0
- package/dist/prod/config/NoConflict.js +2 -0
- package/dist/prod/config/NoConflict.js.map +7 -0
- package/dist/prod/config/Theme.js +2 -0
- package/dist/prod/config/Theme.js.map +7 -0
- package/dist/prod/config/ThemeRoot.js +2 -0
- package/dist/prod/config/ThemeRoot.js.map +7 -0
- package/dist/prod/config/Timezone.js +2 -0
- package/dist/prod/config/Timezone.js.map +7 -0
- package/dist/prod/connectToComponent.js +2 -0
- package/dist/prod/connectToComponent.js.map +7 -0
- package/dist/prod/decorators/customElement.js +2 -0
- package/dist/prod/decorators/customElement.js.map +7 -0
- package/dist/prod/decorators/event.js +2 -0
- package/dist/prod/decorators/event.js.map +7 -0
- package/dist/prod/decorators/property.js +2 -0
- package/dist/prod/decorators/property.js.map +7 -0
- package/dist/prod/decorators/slot.js +2 -0
- package/dist/prod/decorators/slot.js.map +7 -0
- package/dist/prod/decorators.js +2 -0
- package/dist/prod/decorators.js.map +7 -0
- package/dist/prod/delegate/ItemNavigation.js +2 -0
- package/dist/prod/delegate/ItemNavigation.js.map +7 -0
- package/dist/prod/delegate/ResizeHandler.js +2 -0
- package/dist/prod/delegate/ResizeHandler.js.map +7 -0
- package/dist/prod/delegate/ScrollEnablement.js +2 -0
- package/dist/prod/delegate/ScrollEnablement.js.map +7 -0
- package/dist/prod/features/F6Navigation.js +2 -0
- package/dist/prod/features/F6Navigation.js.map +7 -0
- package/dist/prod/features/InputElementsFormSupport.js +2 -0
- package/dist/prod/features/InputElementsFormSupport.js.map +7 -0
- package/dist/prod/features/LegacyDateFormats.js +2 -0
- package/dist/prod/features/LegacyDateFormats.js.map +7 -0
- package/dist/prod/features/OpenUI5Element.js +2 -0
- package/dist/prod/features/OpenUI5Element.js.map +7 -0
- package/dist/prod/features/OpenUI5Enablement.js +21 -0
- package/dist/prod/features/OpenUI5Enablement.js.map +7 -0
- package/dist/prod/features/OpenUI5Support.js +2 -0
- package/dist/prod/features/OpenUI5Support.js.map +7 -0
- package/dist/prod/features/patchPatcher.js +2 -0
- package/dist/prod/features/patchPatcher.js.map +7 -0
- package/dist/prod/features/patchPopup.js +2 -0
- package/dist/prod/features/patchPopup.js.map +7 -0
- package/dist/prod/generated/AssetParameters.js +2 -0
- package/dist/prod/generated/AssetParameters.js.map +7 -0
- package/dist/prod/generated/VersionInfo.js +2 -0
- package/dist/prod/generated/VersionInfo.js.map +7 -0
- package/dist/prod/generated/css/BusyIndicator.css.js +2 -0
- package/dist/prod/generated/css/BusyIndicator.css.js.map +7 -0
- package/dist/prod/generated/css/FontFace.css.js +2 -0
- package/dist/prod/generated/css/FontFace.css.js.map +7 -0
- package/dist/prod/generated/css/OverrideFontFace.css.js +2 -0
- package/dist/prod/generated/css/OverrideFontFace.css.js.map +7 -0
- package/dist/prod/generated/css/SystemCSSVars.css.js +2 -0
- package/dist/prod/generated/css/SystemCSSVars.css.js.map +7 -0
- package/dist/prod/generated/templates/elements/WithComplexTemplateTemplate.lit.js +2 -0
- package/dist/prod/generated/templates/elements/WithComplexTemplateTemplate.lit.js.map +7 -0
- package/dist/prod/getSharedResource.js +2 -0
- package/dist/prod/getSharedResource.js.map +7 -0
- package/dist/prod/global.d.js +2 -0
- package/dist/prod/global.d.js.map +7 -0
- package/dist/prod/i18nBundle.js +2 -0
- package/dist/prod/i18nBundle.js.map +7 -0
- package/dist/prod/locale/Locale.js +2 -0
- package/dist/prod/locale/Locale.js.map +7 -0
- package/dist/prod/locale/RTLAwareRegistry.js +2 -0
- package/dist/prod/locale/RTLAwareRegistry.js.map +7 -0
- package/dist/prod/locale/applyDirection.js +2 -0
- package/dist/prod/locale/applyDirection.js.map +7 -0
- package/dist/prod/locale/directionChange.js +2 -0
- package/dist/prod/locale/directionChange.js.map +7 -0
- package/dist/prod/locale/getEffectiveDir.js +2 -0
- package/dist/prod/locale/getEffectiveDir.js.map +7 -0
- package/dist/prod/locale/getLocale.js +2 -0
- package/dist/prod/locale/getLocale.js.map +7 -0
- package/dist/prod/locale/languageChange.js +2 -0
- package/dist/prod/locale/languageChange.js.map +7 -0
- package/dist/prod/locale/nextFallbackLocale.js +2 -0
- package/dist/prod/locale/nextFallbackLocale.js.map +7 -0
- package/dist/prod/locale/normalizeLocale.js +2 -0
- package/dist/prod/locale/normalizeLocale.js.map +7 -0
- package/dist/prod/renderer/LitRenderer.js +2 -0
- package/dist/prod/renderer/LitRenderer.js.map +7 -0
- package/dist/prod/renderer/directives/style-map.js +6 -0
- package/dist/prod/renderer/directives/style-map.js.map +7 -0
- package/dist/prod/renderer/executeTemplate.js +2 -0
- package/dist/prod/renderer/executeTemplate.js.map +7 -0
- package/dist/prod/sap/base/Log.js +750 -0
- package/dist/prod/sap/base/assert.js +34 -0
- package/dist/prod/sap/base/config/MemoryConfigurationProvider.js +20 -0
- package/dist/prod/sap/base/security/URLListValidator.js +406 -0
- package/dist/prod/sap/base/security/encodeCSS.js +40 -0
- package/dist/prod/sap/base/security/encodeXML.js +53 -0
- package/dist/prod/sap/base/security/sanitizeHTML.js +38 -0
- package/dist/prod/sap/base/strings/toHex.js +33 -0
- package/dist/prod/sap/base/util/now.js +28 -0
- package/dist/prod/sap/base/util/uid.js +27 -0
- package/dist/prod/sap/ui/thirdparty/caja-html-sanitizer.js +3600 -0
- package/dist/prod/ssr-dom-shim.js +2 -0
- package/dist/prod/ssr-dom-shim.js.map +7 -0
- package/dist/prod/ssr-dom.js +2 -0
- package/dist/prod/ssr-dom.js.map +7 -0
- package/dist/prod/theming/CustomStyle.js +2 -0
- package/dist/prod/theming/CustomStyle.js.map +7 -0
- package/dist/prod/theming/ThemeLoaded.js +2 -0
- package/dist/prod/theming/ThemeLoaded.js.map +7 -0
- package/dist/prod/theming/ThemeRegistered.js +2 -0
- package/dist/prod/theming/ThemeRegistered.js.map +7 -0
- package/dist/prod/theming/applyTheme.js +2 -0
- package/dist/prod/theming/applyTheme.js.map +7 -0
- package/dist/prod/theming/getConstructableStyle.js +2 -0
- package/dist/prod/theming/getConstructableStyle.js.map +7 -0
- package/dist/prod/theming/getEffectiveStyle.js +2 -0
- package/dist/prod/theming/getEffectiveStyle.js.map +7 -0
- package/dist/prod/theming/getStylesString.js +2 -0
- package/dist/prod/theming/getStylesString.js.map +7 -0
- package/dist/prod/theming/getThemeDesignerTheme.js +2 -0
- package/dist/prod/theming/getThemeDesignerTheme.js.map +7 -0
- package/dist/prod/thirdparty/_merge.js +2 -0
- package/dist/prod/thirdparty/_merge.js.map +7 -0
- package/dist/prod/thirdparty/isPlainObject.js +2 -0
- package/dist/prod/thirdparty/isPlainObject.js.map +7 -0
- package/dist/prod/thirdparty/merge.js +2 -0
- package/dist/prod/thirdparty/merge.js.map +7 -0
- package/dist/prod/types/AnimationMode.js +2 -0
- package/dist/prod/types/AnimationMode.js.map +7 -0
- package/dist/prod/types/AriaHasPopup.js +2 -0
- package/dist/prod/types/AriaHasPopup.js.map +7 -0
- package/dist/prod/types/AriaLandmarkRole.js +2 -0
- package/dist/prod/types/AriaLandmarkRole.js.map +7 -0
- package/dist/prod/types/AriaRole.js +2 -0
- package/dist/prod/types/AriaRole.js.map +7 -0
- package/dist/prod/types/CSSColor.js +2 -0
- package/dist/prod/types/CSSColor.js.map +7 -0
- package/dist/prod/types/CSSSize.js +2 -0
- package/dist/prod/types/CSSSize.js.map +7 -0
- package/dist/prod/types/CalendarType.js +2 -0
- package/dist/prod/types/CalendarType.js.map +7 -0
- package/dist/prod/types/DOMReference.js +2 -0
- package/dist/prod/types/DOMReference.js.map +7 -0
- package/dist/prod/types/DataType.js +2 -0
- package/dist/prod/types/DataType.js.map +7 -0
- package/dist/prod/types/Float.js +2 -0
- package/dist/prod/types/Float.js.map +7 -0
- package/dist/prod/types/Integer.js +2 -0
- package/dist/prod/types/Integer.js.map +7 -0
- package/dist/prod/types/InvisibleMessageMode.js +2 -0
- package/dist/prod/types/InvisibleMessageMode.js.map +7 -0
- package/dist/prod/types/ItemNavigationBehavior.js +2 -0
- package/dist/prod/types/ItemNavigationBehavior.js.map +7 -0
- package/dist/prod/types/MovePlacement.js +2 -0
- package/dist/prod/types/MovePlacement.js.map +7 -0
- package/dist/prod/types/NavigationMode.js +2 -0
- package/dist/prod/types/NavigationMode.js.map +7 -0
- package/dist/prod/types/Orientation.js +2 -0
- package/dist/prod/types/Orientation.js.map +7 -0
- package/dist/prod/types/ValueState.js +2 -0
- package/dist/prod/types/ValueState.js.map +7 -0
- package/dist/prod/types.js +2 -0
- package/dist/prod/types.js.map +7 -0
- package/dist/prod/updateShadowRoot.js +2 -0
- package/dist/prod/updateShadowRoot.js.map +7 -0
- package/dist/prod/util/AriaLabelHelper.js +2 -0
- package/dist/prod/util/AriaLabelHelper.js.map +7 -0
- package/dist/prod/util/Caret.js +2 -0
- package/dist/prod/util/Caret.js.map +7 -0
- package/dist/prod/util/ColorConversion.js +2 -0
- package/dist/prod/util/ColorConversion.js.map +7 -0
- package/dist/prod/util/FetchHelper.js +2 -0
- package/dist/prod/util/FetchHelper.js.map +7 -0
- package/dist/prod/util/FocusableElements.js +2 -0
- package/dist/prod/util/FocusableElements.js.map +7 -0
- package/dist/prod/util/HTMLSanitizer.js +2 -0
- package/dist/prod/util/HTMLSanitizer.js.map +7 -0
- package/dist/prod/util/InvisibleMessage.js +2 -0
- package/dist/prod/util/InvisibleMessage.js.map +7 -0
- package/dist/prod/util/PopupUtils.js +2 -0
- package/dist/prod/util/PopupUtils.js.map +7 -0
- package/dist/prod/util/SlotsHelper.js +2 -0
- package/dist/prod/util/SlotsHelper.js.map +7 -0
- package/dist/prod/util/StringHelper.js +2 -0
- package/dist/prod/util/StringHelper.js.map +7 -0
- package/dist/prod/util/TabbableElements.js +2 -0
- package/dist/prod/util/TabbableElements.js.map +7 -0
- package/dist/prod/util/arraysAreEqual.js +2 -0
- package/dist/prod/util/arraysAreEqual.js.map +7 -0
- package/dist/prod/util/clamp.js +2 -0
- package/dist/prod/util/clamp.js.map +7 -0
- package/dist/prod/util/createLinkInHead.js +2 -0
- package/dist/prod/util/createLinkInHead.js.map +7 -0
- package/dist/prod/util/debounce.js +2 -0
- package/dist/prod/util/debounce.js.map +7 -0
- package/dist/prod/util/detectNavigatorLanguage.js +2 -0
- package/dist/prod/util/detectNavigatorLanguage.js.map +7 -0
- package/dist/prod/util/dragAndDrop/DragRegistry.js +2 -0
- package/dist/prod/util/dragAndDrop/DragRegistry.js.map +7 -0
- package/dist/prod/util/dragAndDrop/findClosestPosition.js +2 -0
- package/dist/prod/util/dragAndDrop/findClosestPosition.js.map +7 -0
- package/dist/prod/util/dragAndDrop/longDragOverHandler.js +2 -0
- package/dist/prod/util/dragAndDrop/longDragOverHandler.js.map +7 -0
- package/dist/prod/util/escapeRegex.js +2 -0
- package/dist/prod/util/escapeRegex.js.map +7 -0
- package/dist/prod/util/formatMessage.js +2 -0
- package/dist/prod/util/formatMessage.js.map +7 -0
- package/dist/prod/util/generateHighlightedMarkup.js +2 -0
- package/dist/prod/util/generateHighlightedMarkup.js.map +7 -0
- package/dist/prod/util/getActiveElement.js +2 -0
- package/dist/prod/util/getActiveElement.js.map +7 -0
- package/dist/prod/util/getClassCopy.js +2 -0
- package/dist/prod/util/getClassCopy.js.map +7 -0
- package/dist/prod/util/getDesigntimePropertyAsArray.js +2 -0
- package/dist/prod/util/getDesigntimePropertyAsArray.js.map +7 -0
- package/dist/prod/util/getEffectiveContentDensity.js +2 -0
- package/dist/prod/util/getEffectiveContentDensity.js.map +7 -0
- package/dist/prod/util/getEffectiveScrollbarStyle.js +2 -0
- package/dist/prod/util/getEffectiveScrollbarStyle.js.map +7 -0
- package/dist/prod/util/getFastNavigationGroups.js +2 -0
- package/dist/prod/util/getFastNavigationGroups.js.map +7 -0
- package/dist/prod/util/getFileExtension.js +2 -0
- package/dist/prod/util/getFileExtension.js.map +7 -0
- package/dist/prod/util/getNormalizedTarget.js +2 -0
- package/dist/prod/util/getNormalizedTarget.js.map +7 -0
- package/dist/prod/util/getParentElement.js +2 -0
- package/dist/prod/util/getParentElement.js.map +7 -0
- package/dist/prod/util/getSingletonElementInstance.js +2 -0
- package/dist/prod/util/getSingletonElementInstance.js.map +7 -0
- package/dist/prod/util/isElementClickable.js +2 -0
- package/dist/prod/util/isElementClickable.js.map +7 -0
- package/dist/prod/util/isElementContainingBlock.js +2 -0
- package/dist/prod/util/isElementContainingBlock.js.map +7 -0
- package/dist/prod/util/isElementHidden.js +2 -0
- package/dist/prod/util/isElementHidden.js.map +7 -0
- package/dist/prod/util/isElementInView.js +2 -0
- package/dist/prod/util/isElementInView.js.map +7 -0
- package/dist/prod/util/isElementTabbable.js +2 -0
- package/dist/prod/util/isElementTabbable.js.map +7 -0
- package/dist/prod/util/isValidPropertyName.js +2 -0
- package/dist/prod/util/isValidPropertyName.js.map +7 -0
- package/dist/prod/util/whenDOMReady.js +2 -0
- package/dist/prod/util/whenDOMReady.js.map +7 -0
- package/dist/prod/util/willShowContent.js +2 -0
- package/dist/prod/util/willShowContent.js.map +7 -0
- package/dist/prod/validateThemeRoot.js +2 -0
- package/dist/prod/validateThemeRoot.js.map +7 -0
- package/dist/renderer/executeTemplate.d.ts +8 -0
- package/dist/renderer/executeTemplate.js +1 -0
- package/dist/renderer/executeTemplate.js.map +1 -1
- package/dist/util/InvisibleMessage.js +2 -2
- package/dist/util/InvisibleMessage.js.map +1 -1
- package/dist/util/getClassCopy.d.ts +9 -1
- package/package-scripts.cjs +5 -0
- package/package.json +11 -5
- package/dist/StaticArea.d.ts +0 -3
- package/dist/StaticArea.js +0 -7
- package/dist/StaticArea.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customElement.js","sourceRoot":"","sources":["../../src/decorators/customElement.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,MAAM,aAAa,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"customElement.js","sourceRoot":"","sources":["../../src/decorators/customElement.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,MAAM,aAAa,GAAG,CAAC,6BAWnB,EAAE,EAAkB,EAAE;IACzB,OAAO,CAAC,MAAW,EAAE,EAAE;QACtB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE;YAC9D,MAAM,CAAC,QAAQ,GAAG,EAAE,CAAC;SACrB;QAED,IAAI,OAAO,0BAA0B,KAAK,QAAQ,EAAE;YACnD,MAAM,CAAC,QAAQ,CAAC,GAAG,GAAG,0BAA0B,CAAC;YACjD,OAAO;SACP;QAED,MAAM,EACL,GAAG,EACH,aAAa,EACb,UAAU,EACV,cAAc,EACd,cAAc,EACd,iBAAiB,GAChB,GAAG,0BAA0B,CAAC;QAEhC,MAAM,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,CAAC;QAC1B,IAAI,aAAa,EAAE;YAClB,MAAM,CAAC,QAAQ,CAAC,aAAa,GAAG,aAAa,CAAC;SAC9C;QACD,IAAI,UAAU,EAAE;YACf,MAAM,CAAC,QAAQ,CAAC,UAAU,GAAG,UAAU,CAAC;SACxC;QACD,IAAI,cAAc,EAAE;YACnB,MAAM,CAAC,QAAQ,CAAC,cAAc,GAAG,cAAc,CAAC;SAChD;QACD,IAAI,cAAc,EAAE;YACnB,MAAM,CAAC,QAAQ,CAAC,cAAc,GAAG,cAAc,CAAC;SAChD;QAED,IAAI,iBAAiB,EAAE;YACtB,MAAM,CAAC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;SACtD;QAED,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,mBAA2B,EAAE,EAAE;YAC1F,MAAM,wBAAwB,GAAG,0BAA0B,CAAC,mBAAuC,CAAC,CAAC;YAErG,wBAAwB,IAAI,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,mBAAmB,EAAE;gBAC9E,GAAG,EAAE,GAAG,EAAE,CAAC,0BAA0B,CAAC,mBAAuC,CAAC;aAC9E,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import type UI5Element from \"../UI5Element.js\";\nimport type { Renderer } from \"../UI5Element.js\";\nimport type { TemplateFunction as Template } from \"../renderer/executeTemplate.js\";\nimport type { ComponentStylesData as Styles } from \"../types.js\";\n\n/**\n * Returns a custom element class decorator.\n *\n * @param { string | object } tagNameOrComponentSettings\n * @returns { ClassDecorator }\n */\nconst customElement = (tagNameOrComponentSettings: string | {\n\ttag?: string,\n\trenderer?: Renderer,\n\tstyles?: Styles,\n\ttemplate?: Template,\n\tdependencies?: Array<typeof UI5Element>,\n\tlanguageAware?: boolean,\n\tthemeAware?: boolean,\n\tfastNavigation?: boolean,\n\tformAssociated?: boolean,\n\tshadowRootOptions?: Partial<ShadowRootInit>,\n} = {}): ClassDecorator => {\n\treturn (target: any) => {\n\t\tif (!Object.prototype.hasOwnProperty.call(target, \"metadata\")) {\n\t\t\ttarget.metadata = {};\n\t\t}\n\n\t\tif (typeof tagNameOrComponentSettings === \"string\") {\n\t\t\ttarget.metadata.tag = tagNameOrComponentSettings;\n\t\t\treturn;\n\t\t}\n\n\t\tconst {\n\t\t\ttag,\n\t\t\tlanguageAware,\n\t\t\tthemeAware,\n\t\t\tfastNavigation,\n\t\t\tformAssociated,\n\t\t\tshadowRootOptions,\n\t\t } = tagNameOrComponentSettings;\n\n\t\ttarget.metadata.tag = tag;\n\t\tif (languageAware) {\n\t\t\ttarget.metadata.languageAware = languageAware;\n\t\t}\n\t\tif (themeAware) {\n\t\t\ttarget.metadata.themeAware = themeAware;\n\t\t}\n\t\tif (fastNavigation) {\n\t\t\ttarget.metadata.fastNavigation = fastNavigation;\n\t\t}\n\t\tif (formAssociated) {\n\t\t\ttarget.metadata.formAssociated = formAssociated;\n\t\t}\n\n\t\tif (shadowRootOptions) {\n\t\t\ttarget.metadata.shadowRootOptions = shadowRootOptions;\n\t\t}\n\n\t\t[\"renderer\", \"template\", \"styles\", \"dependencies\"].forEach((customElementEntity: string) => {\n\t\t\tconst customElementEntityValue = tagNameOrComponentSettings[customElementEntity as keyof typeof tag];\n\n\t\t\tcustomElementEntityValue && Object.defineProperty(target, customElementEntity, {\n\t\t\t\tget: () => tagNameOrComponentSettings[customElementEntity as keyof typeof tag],\n\t\t\t});\n\t\t});\n\t};\n};\n\nexport default customElement;\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type UI5Element from "../UI5Element.js";
|
|
2
|
+
interface IFormElement extends UI5Element {
|
|
3
|
+
_internals?: ElementInternals;
|
|
4
|
+
}
|
|
5
|
+
interface IFormInputElement extends IFormElement {
|
|
6
|
+
name: string;
|
|
7
|
+
formFormattedValue: FormData | string | null;
|
|
8
|
+
formValidityMessage?: string;
|
|
9
|
+
formValidity?: ValidityStateFlags;
|
|
10
|
+
formElementAnchor?: () => HTMLElement | undefined | Promise<HTMLElement | undefined>;
|
|
11
|
+
}
|
|
12
|
+
declare const attachFormElementInternals: (element: IFormInputElement | IFormElement) => void;
|
|
13
|
+
declare const setFormValue: (element: IFormInputElement) => void;
|
|
14
|
+
declare const setFormValidity: (element: IFormInputElement) => Promise<void>;
|
|
15
|
+
declare const submitForm: (element: IFormElement) => void;
|
|
16
|
+
declare const resetForm: (element: IFormElement) => void;
|
|
17
|
+
export { attachFormElementInternals, setFormValue, setFormValidity, submitForm, resetForm, };
|
|
18
|
+
export type { IFormInputElement, IFormElement, };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const attachFormElementInternals = (element) => {
|
|
2
|
+
element._internals = element.attachInternals();
|
|
3
|
+
if (isInputElement(element)) {
|
|
4
|
+
setFormValue(element);
|
|
5
|
+
}
|
|
6
|
+
};
|
|
7
|
+
const setFormValue = (element) => {
|
|
8
|
+
if (!element._internals?.form) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
setFormValidity(element);
|
|
12
|
+
if (!element.name) {
|
|
13
|
+
element._internals?.setFormValue(null);
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
element._internals.setFormValue(element.formFormattedValue);
|
|
17
|
+
};
|
|
18
|
+
const setFormValidity = async (element) => {
|
|
19
|
+
if (!element._internals?.form) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
if (element.formValidity && Object.keys(element.formValidity).some(key => key)) {
|
|
23
|
+
const focusRef = await element.formElementAnchor?.();
|
|
24
|
+
element._internals.setValidity(element.formValidity, element.formValidityMessage, focusRef);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
element._internals.setValidity({});
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const submitForm = (element) => {
|
|
31
|
+
element._internals?.form?.requestSubmit();
|
|
32
|
+
};
|
|
33
|
+
const resetForm = (element) => {
|
|
34
|
+
element._internals?.form?.reset();
|
|
35
|
+
};
|
|
36
|
+
const isInputElement = (element) => {
|
|
37
|
+
return "formFormattedValue" in element && "name" in element;
|
|
38
|
+
};
|
|
39
|
+
export { attachFormElementInternals, setFormValue, setFormValidity, submitForm, resetForm, };
|
|
40
|
+
//# sourceMappingURL=InputElementsFormSupport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputElementsFormSupport.js","sourceRoot":"","sources":["../../src/features/InputElementsFormSupport.ts"],"names":[],"mappings":"AAcA,MAAM,0BAA0B,GAAG,CAAC,OAAyC,EAAE,EAAE;IAChF,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAE/C,IAAI,cAAc,CAAC,OAAO,CAAC,EAAE;QAC5B,YAAY,CAAC,OAAO,CAAC,CAAC;KACtB;AACF,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,OAA0B,EAAE,EAAE;IACnD,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE;QAC9B,OAAO;KACP;IAED,eAAe,CAAC,OAAO,CAAC,CAAC;IAEzB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;QAClB,OAAO,CAAC,UAAU,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;QACvC,OAAO;KACP;IAED,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAC7D,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,KAAK,EAAE,OAA0B,EAAE,EAAE;IAC5D,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE;QAC9B,OAAO;KACP;IACD,IAAI,OAAO,CAAC,YAAY,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE;QAC/E,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC;QACrD,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC,mBAAmB,EAAE,QAAQ,CAAC,CAAC;KAC5F;SAAM;QACN,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;KACnC;AACF,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,OAAqB,EAAE,EAAE;IAC5C,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;AAC3C,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,OAAqB,EAAE,EAAE;IAC3C,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AACnC,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,OAAyC,EAAgC,EAAE;IAClG,OAAO,oBAAoB,IAAI,OAAO,IAAI,MAAM,IAAI,OAAO,CAAC;AAC7D,CAAC,CAAC;AAEF,OAAO,EACN,0BAA0B,EAC1B,YAAY,EACZ,eAAe,EACf,UAAU,EACV,SAAS,GACT,CAAC","sourcesContent":["import type UI5Element from \"../UI5Element.js\";\n\ninterface IFormElement extends UI5Element {\n\t_internals?: ElementInternals;\n}\n\ninterface IFormInputElement extends IFormElement {\n\tname: string;\n\tformFormattedValue: FormData | string | null;\n\tformValidityMessage?: string;\n\tformValidity?: ValidityStateFlags;\n\tformElementAnchor?: () => HTMLElement | undefined | Promise<HTMLElement | undefined>;\n}\n\nconst attachFormElementInternals = (element: IFormInputElement | IFormElement) => {\n\telement._internals = element.attachInternals();\n\n\tif (isInputElement(element)) {\n\t\tsetFormValue(element);\n\t}\n};\n\nconst setFormValue = (element: IFormInputElement) => {\n\tif (!element._internals?.form) {\n\t\treturn;\n\t}\n\n\tsetFormValidity(element);\n\n\tif (!element.name) {\n\t\telement._internals?.setFormValue(null);\n\t\treturn;\n\t}\n\n\telement._internals.setFormValue(element.formFormattedValue);\n};\n\nconst setFormValidity = async (element: IFormInputElement) => {\n\tif (!element._internals?.form) {\n\t\treturn;\n\t}\n\tif (element.formValidity && Object.keys(element.formValidity).some(key => key)) {\n\t\tconst focusRef = await element.formElementAnchor?.();\n\t\telement._internals.setValidity(element.formValidity, element.formValidityMessage, focusRef);\n\t} else {\n\t\telement._internals.setValidity({});\n\t}\n};\n\nconst submitForm = (element: IFormElement) => {\n\telement._internals?.form?.requestSubmit();\n};\n\nconst resetForm = (element: IFormElement) => {\n\telement._internals?.form?.reset();\n};\n\nconst isInputElement = (element: IFormInputElement | IFormElement): element is IFormInputElement => {\n\treturn \"formFormattedValue\" in element && \"name\" in element;\n};\n\nexport {\n\tattachFormElementInternals,\n\tsetFormValue,\n\tsetFormValidity,\n\tsubmitForm,\n\tresetForm,\n};\n\nexport type {\n\tIFormInputElement,\n\tIFormElement,\n};\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const VersionInfo = {
|
|
2
|
-
version: "2.0.0-rc.
|
|
2
|
+
version: "2.0.0-rc.5",
|
|
3
3
|
major: 2,
|
|
4
4
|
minor: 0,
|
|
5
5
|
patch: 0,
|
|
6
|
-
suffix: "-rc.
|
|
6
|
+
suffix: "-rc.5",
|
|
7
7
|
isNext: false,
|
|
8
|
-
buildTime:
|
|
8
|
+
buildTime: 1717680065,
|
|
9
9
|
};
|
|
10
10
|
export default VersionInfo;
|
|
11
11
|
//# sourceMappingURL=VersionInfo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VersionInfo.js","sourceRoot":"","sources":["../../src/generated/VersionInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IACnB,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,OAAO;IACf,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,UAAU;CACrB,CAAC;AACF,eAAe,WAAW,CAAC","sourcesContent":["const VersionInfo = {\n\tversion: \"2.0.0-rc.
|
|
1
|
+
{"version":3,"file":"VersionInfo.js","sourceRoot":"","sources":["../../src/generated/VersionInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IACnB,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,OAAO;IACf,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,UAAU;CACrB,CAAC;AACF,eAAe,WAAW,CAAC","sourcesContent":["const VersionInfo = {\n\tversion: \"2.0.0-rc.5\",\n\tmajor: 2,\n\tminor: 0,\n\tpatch: 0,\n\tsuffix: \"-rc.5\",\n\tisNext: false,\n\tbuildTime: 1717680065,\n};\nexport default VersionInfo;"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";import{registerI18nLoader as r}from"./asset-registries/i18n.js";import{registerLocaleDataLoader as e}from"./asset-registries/LocaleData.js";import{registerThemePropertiesLoader as o,registerCustomThemePropertiesLoader as t}from"./asset-registries/Themes.js";import{registerIconLoader as i}from"./asset-registries/Icons.js";export{r as registerI18nLoader,e as registerLocaleDataLoader,o as registerThemePropertiesLoader,t as registerCustomThemePropertiesLoader,i as registerIconLoader};
|
|
2
|
+
//# sourceMappingURL=AssetRegistry.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/AssetRegistry.ts"],
|
|
4
|
+
"sourcesContent": ["import { registerI18nLoader } from \"./asset-registries/i18n.js\";\nimport { registerLocaleDataLoader } from \"./asset-registries/LocaleData.js\";\nimport { registerThemePropertiesLoader, registerCustomThemePropertiesLoader } from \"./asset-registries/Themes.js\";\nimport { registerIconLoader } from \"./asset-registries/Icons.js\";\n\nexport {\n\tregisterI18nLoader,\n\tregisterLocaleDataLoader,\n\tregisterThemePropertiesLoader,\n\tregisterCustomThemePropertiesLoader,\n\tregisterIconLoader,\n};\n"],
|
|
5
|
+
"mappings": "aAAA,OAAS,sBAAAA,MAA0B,6BACnC,OAAS,4BAAAC,MAAgC,mCACzC,OAAS,iCAAAC,EAA+B,uCAAAC,MAA2C,+BACnF,OAAS,sBAAAC,MAA0B,8BAEnC,OACCJ,KAAA,mBACAC,KAAA,yBACAC,KAAA,8BACAC,KAAA,oCACAC,KAAA",
|
|
6
|
+
"names": ["registerI18nLoader", "registerLocaleDataLoader", "registerThemePropertiesLoader", "registerCustomThemePropertiesLoader", "registerIconLoader"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";import d from"./util/whenDOMReady.js";import c from"./EventProvider.js";import u from"./FontFace.js";import v from"./SystemCSSVars.js";import{getTheme as i}from"./config/Theme.js";import a from"./theming/applyTheme.js";import{registerCurrentRuntime as g}from"./Runtimes.js";import{getFeature as m}from"./FeaturesRegistry.js";import{attachThemeRegistered as y}from"./theming/ThemeRegistered.js";let o=!1,r;const p=new c,h=()=>o,P=e=>{if(!o){p.attachEvent("boot",e);return}e()},l=async()=>{if(r!==void 0)return r;const e=async n=>{if(g(),typeof document>"u"){n();return}y(S);const t=m("OpenUI5Support"),f=t?t.isOpenUI5Detected():!1,s=m("F6Navigation");t&&await t.init(),s&&!f&&s.init(),await d(),await a(i()),t&&t.attachListeners(),u(),v(),n(),o=!0,await p.fireEventAsync("boot")};return r=new Promise(e),r},S=e=>{o&&e===i()&&a(i())};export{l as boot,P as attachBoot,h as isBooted};
|
|
2
|
+
//# sourceMappingURL=Boot.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Boot.ts"],
|
|
4
|
+
"sourcesContent": ["import whenDOMReady from \"./util/whenDOMReady.js\";\nimport EventProvider from \"./EventProvider.js\";\nimport insertFontFace from \"./FontFace.js\";\nimport insertSystemCSSVars from \"./SystemCSSVars.js\";\nimport { getTheme } from \"./config/Theme.js\";\nimport applyTheme from \"./theming/applyTheme.js\";\nimport { registerCurrentRuntime } from \"./Runtimes.js\";\nimport { getFeature } from \"./FeaturesRegistry.js\";\nimport type OpenUI5Support from \"./features/OpenUI5Support.js\";\nimport type F6Navigation from \"./features/F6Navigation.js\";\nimport { PromiseResolve } from \"./types.js\";\nimport { attachThemeRegistered } from \"./theming/ThemeRegistered.js\";\n\nlet booted = false;\nlet bootPromise: Promise<void>;\nconst eventProvider = new EventProvider<void, void>();\n\nconst isBooted = (): boolean => {\n\treturn booted;\n};\n\n/**\n * Attaches a callback that will be executed after boot finishes.\n * **Note:** If the framework already booted, the callback will be immediately executed.\n * @public\n * @param { Function } listener\n */\nconst attachBoot = (listener: () => void) => {\n\tif (!booted) {\n\t\teventProvider.attachEvent(\"boot\", listener);\n\t\treturn;\n\t}\n\n\tlistener();\n};\n\nconst boot = async (): Promise<void> => {\n\tif (bootPromise !== undefined) {\n\t\treturn bootPromise;\n\t}\n\n\tconst bootExecutor = async (resolve: PromiseResolve) => {\n\t\tregisterCurrentRuntime();\n\n\t\tif (typeof document === \"undefined\") {\n\t\t\tresolve();\n\t\t\treturn;\n\t\t}\n\n\t\tattachThemeRegistered(onThemeRegistered);\n\n\t\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\t\tconst isOpenUI5Loaded = openUI5Support ? openUI5Support.isOpenUI5Detected() : false;\n\t\tconst f6Navigation = getFeature<typeof F6Navigation>(\"F6Navigation\");\n\n\t\tif (openUI5Support) {\n\t\t\tawait openUI5Support.init();\n\t\t}\n\n\t\tif (f6Navigation && !isOpenUI5Loaded) {\n\t\t\tf6Navigation.init();\n\t\t}\n\n\t\tawait whenDOMReady();\n\t\tawait applyTheme(getTheme());\n\t\topenUI5Support && openUI5Support.attachListeners();\n\t\tinsertFontFace();\n\t\tinsertSystemCSSVars();\n\n\t\tresolve();\n\n\t\tbooted = true;\n\t\tawait eventProvider.fireEventAsync(\"boot\");\n\t};\n\n\tbootPromise = new Promise(bootExecutor as (resolve: PromiseResolve) => void);\n\treturn bootPromise;\n};\n\n/**\n * Callback, executed after theme properties registration\n * to apply the newly registered theme.\n * @private\n * @param { string } theme\n */\nconst onThemeRegistered = (theme: string) => {\n\tif (booted && theme === getTheme()) { // getTheme should only be called if \"booted\" is true\n\t\tapplyTheme(getTheme());\n\t}\n};\n\nexport {\n\tboot,\n\tattachBoot,\n\tisBooted,\n};\n"],
|
|
5
|
+
"mappings": "aAAA,OAAOA,MAAkB,yBACzB,OAAOC,MAAmB,qBAC1B,OAAOC,MAAoB,gBAC3B,OAAOC,MAAyB,qBAChC,OAAS,YAAAC,MAAgB,oBACzB,OAAOC,MAAgB,0BACvB,OAAS,0BAAAC,MAA8B,gBACvC,OAAS,cAAAC,MAAkB,wBAI3B,OAAS,yBAAAC,MAA6B,+BAEtC,IAAIC,EAAS,GACTC,EACJ,MAAMC,EAAgB,IAAIV,EAEpBW,EAAW,IACTH,EASFI,EAAcC,GAAyB,CAC5C,GAAI,CAACL,EAAQ,CACZE,EAAc,YAAY,OAAQG,CAAQ,EAC1C,MACD,CAEAA,EAAS,CACV,EAEMC,EAAO,SAA2B,CACvC,GAAIL,IAAgB,OACnB,OAAOA,EAGR,MAAMM,EAAe,MAAOC,GAA4B,CAGvD,GAFAX,EAAuB,EAEnB,OAAO,SAAa,IAAa,CACpCW,EAAQ,EACR,MACD,CAEAT,EAAsBU,CAAiB,EAEvC,MAAMC,EAAiBZ,EAAkC,gBAAgB,EACnEa,EAAkBD,EAAiBA,EAAe,kBAAkB,EAAI,GACxEE,EAAed,EAAgC,cAAc,EAE/DY,GACH,MAAMA,EAAe,KAAK,EAGvBE,GAAgB,CAACD,GACpBC,EAAa,KAAK,EAGnB,MAAMrB,EAAa,EACnB,MAAMK,EAAWD,EAAS,CAAC,EAC3Be,GAAkBA,EAAe,gBAAgB,EACjDjB,EAAe,EACfC,EAAoB,EAEpBc,EAAQ,EAERR,EAAS,GACT,MAAME,EAAc,eAAe,MAAM,CAC1C,EAEA,OAAAD,EAAc,IAAI,QAAQM,CAAiD,EACpEN,CACR,EAQMQ,EAAqBI,GAAkB,CACxCb,GAAUa,IAAUlB,EAAS,GAChCC,EAAWD,EAAS,CAAC,CAEvB,EAEA,OACCW,KAAA,KACAF,KAAA,WACAD,KAAA",
|
|
6
|
+
"names": ["whenDOMReady", "EventProvider", "insertFontFace", "insertSystemCSSVars", "getTheme", "applyTheme", "registerCurrentRuntime", "getFeature", "attachThemeRegistered", "booted", "bootPromise", "eventProvider", "isBooted", "attachBoot", "listener", "boot", "bootExecutor", "resolve", "onThemeRegistered", "openUI5Support", "isOpenUI5Loaded", "f6Navigation", "theme"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";import p from"./getSharedResource.js";import{getCurrentRuntimeIndex as u,compareRuntimes as f,getAllRuntimes as b}from"./Runtimes.js";const m=p("Tags",new Map),d=new Set;let s=new Map,c;const g=-1,h=e=>{d.add(e),m.set(e,u())},w=e=>d.has(e),$=()=>[...d.values()],R=e=>{let n=m.get(e);n===void 0&&(n=g),s.has(n)||s.set(n,new Set),s.get(n).add(e),c||(c=setTimeout(()=>{T(),s=new Map,c=void 0},1e3))},T=()=>{const e=b(),n=u(),l=e[n];let t="Multiple UI5 Web Components instances detected.";e.length>1&&(t=`${t}
|
|
2
|
+
Loading order (versions before 1.1.0 not listed): ${e.map(i=>`
|
|
3
|
+
${i.description}`).join("")}`),[...s.keys()].forEach(i=>{let o,r;i===g?(o=1,r={description:"Older unknown runtime"}):(o=f(n,i),r=e[i]);let a;o>0?a="an older":o<0?a="a newer":a="the same",t=`${t}
|
|
4
|
+
|
|
5
|
+
"${l.description}" failed to define ${s.get(i).size} tag(s) as they were defined by a runtime of ${a} version "${r.description}": ${[...s.get(i)].sort().join(", ")}.`,o>0?t=`${t}
|
|
6
|
+
WARNING! If your code uses features of the above web components, unavailable in ${r.description}, it might not work as expected!`:t=`${t}
|
|
7
|
+
Since the above web components were defined by the same or newer version runtime, they should be compatible with your code.`}),t=`${t}
|
|
8
|
+
|
|
9
|
+
To 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.`,console.warn(t)};export{h as registerTag,w as isTagRegistered,$ as getAllRegisteredTags,R as recordTagRegistrationFailure};
|
|
10
|
+
//# sourceMappingURL=CustomElementsRegistry.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/CustomElementsRegistry.ts"],
|
|
4
|
+
"sourcesContent": ["import getSharedResource from \"./getSharedResource.js\";\nimport { getCurrentRuntimeIndex, compareRuntimes, getAllRuntimes } from \"./Runtimes.js\";\nimport { Timeout } from \"./types.js\";\n\nconst Tags = getSharedResource<Map<string, number>>(\"Tags\", new Map());\nconst Definitions = new Set<string>();\n\nlet Failures = new Map<number, Set<string>>();\nlet failureTimeout: Timeout | undefined;\n\nconst UNKNOWN_RUNTIME = -1;\n\nconst registerTag = (tag: string) => {\n\tDefinitions.add(tag);\n\tTags.set(tag, getCurrentRuntimeIndex());\n};\n\nconst isTagRegistered = (tag: string) => {\n\treturn Definitions.has(tag);\n};\n\nconst getAllRegisteredTags = () => {\n\treturn [...Definitions.values()];\n};\n\nconst recordTagRegistrationFailure = (tag: string) => {\n\tlet tagRegRuntimeIndex = Tags.get(tag);\n\tif (tagRegRuntimeIndex === undefined) {\n\t\ttagRegRuntimeIndex = 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\n\t}\n\n\tif (!Failures.has(tagRegRuntimeIndex)) {\n\t\tFailures.set(tagRegRuntimeIndex, new Set());\n\t}\n\tFailures.get(tagRegRuntimeIndex)!.add(tag);\n\n\tif (!failureTimeout) {\n\t\tfailureTimeout = setTimeout(() => {\n\t\t\tdisplayFailedRegistrations();\n\t\t\tFailures = new Map();\n\t\t\tfailureTimeout = undefined;\n\t\t}, 1000);\n\t}\n};\n\nconst displayFailedRegistrations = () => {\n\tconst allRuntimes = getAllRuntimes();\n\tconst currentRuntimeIndex = getCurrentRuntimeIndex();\n\tconst currentRuntime = allRuntimes[currentRuntimeIndex];\n\n\tlet message = `Multiple UI5 Web Components instances detected.`;\n\n\tif (allRuntimes.length > 1) {\n\t\tmessage = `${message}\\nLoading order (versions before 1.1.0 not listed): ${allRuntimes.map(runtime => `\\n${runtime.description}`).join(\"\")}`;\n\t}\n\n\t[...Failures.keys()].forEach(otherRuntimeIndex => {\n\t\tlet comparison: number;\n\t\tlet otherRuntime;\n\n\t\tif (otherRuntimeIndex === UNKNOWN_RUNTIME) { // version < 1.1.0 defined the tag\n\t\t\tcomparison = 1; // the current runtime is considered newer\n\t\t\totherRuntime = {\n\t\t\t\tdescription: `Older unknown runtime`,\n\t\t\t};\n\t\t} else {\n\t\t\tcomparison = compareRuntimes(currentRuntimeIndex, otherRuntimeIndex);\n\t\t\totherRuntime = allRuntimes[otherRuntimeIndex];\n\t\t}\n\n\t\tlet compareWord;\n\t\tif (comparison > 0) {\n\t\t\tcompareWord = \"an older\";\n\t\t} else if (comparison < 0) {\n\t\t\tcompareWord = \"a newer\";\n\t\t} else {\n\t\t\tcompareWord = \"the same\";\n\t\t}\n\t\tmessage = `${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(\", \")}.`;\n\n\t\tif (comparison > 0) {\n\t\t\tmessage = `${message}\\nWARNING! If your code uses features of the above web components, unavailable in ${otherRuntime.description}, it might not work as expected!`;\n\t\t} else {\n\t\t\tmessage = `${message}\\nSince the above web components were defined by the same or newer version runtime, they should be compatible with your code.`;\n\t\t}\n\t});\n\n\tmessage = `${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.`;\n\n\tconsole.warn(message); // eslint-disable-line\n};\n\nexport {\n\tregisterTag,\n\tisTagRegistered,\n\tgetAllRegisteredTags,\n\trecordTagRegistrationFailure,\n};\n"],
|
|
5
|
+
"mappings": "aAAA,OAAOA,MAAuB,yBAC9B,OAAS,0BAAAC,EAAwB,mBAAAC,EAAiB,kBAAAC,MAAsB,gBAGxE,MAAMC,EAAOJ,EAAuC,OAAQ,IAAI,GAAK,EAC/DK,EAAc,IAAI,IAExB,IAAIC,EAAW,IAAI,IACfC,EAEJ,MAAMC,EAAkB,GAElBC,EAAeC,GAAgB,CACpCL,EAAY,IAAIK,CAAG,EACnBN,EAAK,IAAIM,EAAKT,EAAuB,CAAC,CACvC,EAEMU,EAAmBD,GACjBL,EAAY,IAAIK,CAAG,EAGrBE,EAAuB,IACrB,CAAC,GAAGP,EAAY,OAAO,CAAC,EAG1BQ,EAAgCH,GAAgB,CACrD,IAAII,EAAqBV,EAAK,IAAIM,CAAG,EACjCI,IAAuB,SAC1BA,EAAqBN,GAGjBF,EAAS,IAAIQ,CAAkB,GACnCR,EAAS,IAAIQ,EAAoB,IAAI,GAAK,EAE3CR,EAAS,IAAIQ,CAAkB,EAAG,IAAIJ,CAAG,EAEpCH,IACJA,EAAiB,WAAW,IAAM,CACjCQ,EAA2B,EAC3BT,EAAW,IAAI,IACfC,EAAiB,MAClB,EAAG,GAAI,EAET,EAEMQ,EAA6B,IAAM,CACxC,MAAMC,EAAcb,EAAe,EAC7Bc,EAAsBhB,EAAuB,EAC7CiB,EAAiBF,EAAYC,CAAmB,EAEtD,IAAIE,EAAU,kDAEVH,EAAY,OAAS,IACxBG,EAAU,GAAGA,CAAO;AAAA,oDAAuDH,EAAY,IAAII,GAAW;AAAA,EAAKA,EAAQ,WAAW,EAAE,EAAE,KAAK,EAAE,CAAC,IAG3I,CAAC,GAAGd,EAAS,KAAK,CAAC,EAAE,QAAQe,GAAqB,CACjD,IAAIC,EACAC,EAEAF,IAAsBb,GACzBc,EAAa,EACbC,EAAe,CACd,YAAa,uBACd,IAEAD,EAAapB,EAAgBe,EAAqBI,CAAiB,EACnEE,EAAeP,EAAYK,CAAiB,GAG7C,IAAIG,EACAF,EAAa,EAChBE,EAAc,WACJF,EAAa,EACvBE,EAAc,UAEdA,EAAc,WAEfL,EAAU,GAAGA,CAAO;AAAA;AAAA,GAAQD,EAAe,WAAW,sBAAsBZ,EAAS,IAAIe,CAAiB,EAAG,IAAI,gDAAgDG,CAAW,aAAaD,EAAa,WAAW,MAAO,CAAC,GAAGjB,EAAS,IAAIe,CAAiB,CAAE,EAAG,KAAK,EAAE,KAAK,IAAI,CAAC,IAE5QC,EAAa,EAChBH,EAAU,GAAGA,CAAO;AAAA,kFAAqFI,EAAa,WAAW,mCAEjIJ,EAAU,GAAGA,CAAO;AAAA,4HAEtB,CAAC,EAEDA,EAAU,GAAGA,CAAO;AAAA;AAAA,gNAEpB,QAAQ,KAAKA,CAAO,CACrB,EAEA,OACCV,KAAA,YACAE,KAAA,gBACAC,KAAA,qBACAC,KAAA",
|
|
6
|
+
"names": ["getSharedResource", "getCurrentRuntimeIndex", "compareRuntimes", "getAllRuntimes", "Tags", "Definitions", "Failures", "failureTimeout", "UNKNOWN_RUNTIME", "registerTag", "tag", "isTagRegistered", "getAllRegisteredTags", "recordTagRegistrationFailure", "tagRegRuntimeIndex", "displayFailedRegistrations", "allRuntimes", "currentRuntimeIndex", "currentRuntime", "message", "runtime", "otherRuntimeIndex", "comparison", "otherRuntime", "compareWord"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";import{html as e,svg as s,unsafeStatic as i}from"lit-html/static.js";import{setCustomElementsScopingSuffix as o,getCustomElementsScopingSuffix as m,setCustomElementsScopingRules as c,getCustomElementsScopingRules as a,shouldScopeCustomElement as u,getEffectiveScopingSuffixForTag as g,getScopedVarName as S}from"./CustomElementsScopeUtils.js";import{registerFeature as f}from"./FeaturesRegistry.js";class t{static{this.html=e}static{this.svg=s}static{this.unsafeStatic=i}}f("LitStatic",t);export{t as LitStatic,o as setCustomElementsScopingSuffix,m as getCustomElementsScopingSuffix,c as setCustomElementsScopingRules,a as getCustomElementsScopingRules,u as shouldScopeCustomElement,g as getEffectiveScopingSuffixForTag,S as getScopedVarName};
|
|
2
|
+
//# sourceMappingURL=CustomElementsScope.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/CustomElementsScope.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n\thtml,\n\tsvg,\n\tunsafeStatic,\n} from \"lit-html/static.js\";\n\nimport {\n\tsetCustomElementsScopingSuffix,\n\tgetCustomElementsScopingSuffix,\n\tsetCustomElementsScopingRules,\n\tgetCustomElementsScopingRules,\n\tshouldScopeCustomElement,\n\tgetEffectiveScopingSuffixForTag,\n\tgetScopedVarName,\n} from \"./CustomElementsScopeUtils.js\";\nimport { registerFeature } from \"./FeaturesRegistry.js\";\n\nclass LitStatic {\n\tstatic html = html;\n\tstatic svg = svg;\n\tstatic unsafeStatic: (value: string) => object = unsafeStatic;\n}\n\nregisterFeature(\"LitStatic\", LitStatic);\n\nexport {\n\tLitStatic,\n\tsetCustomElementsScopingSuffix,\n\tgetCustomElementsScopingSuffix,\n\tsetCustomElementsScopingRules,\n\tgetCustomElementsScopingRules,\n\tshouldScopeCustomElement,\n\tgetEffectiveScopingSuffixForTag,\n\tgetScopedVarName,\n};\n"],
|
|
5
|
+
"mappings": "aAAA,OACC,QAAAA,EACA,OAAAC,EACA,gBAAAC,MACM,qBAEP,OACC,kCAAAC,EACA,kCAAAC,EACA,iCAAAC,EACA,iCAAAC,EACA,4BAAAC,EACA,mCAAAC,EACA,oBAAAC,MACM,gCACP,OAAS,mBAAAC,MAAuB,wBAEhC,MAAMC,CAAU,CACf,YAAO,KAAOX,EACd,YAAO,IAAMC,EACb,YAAO,aAA0CC,EAClD,CAEAQ,EAAgB,YAAaC,CAAS,EAEtC,OACCA,KAAA,UACAR,KAAA,+BACAC,KAAA,+BACAC,KAAA,8BACAC,KAAA,8BACAC,KAAA,yBACAC,KAAA,gCACAC,KAAA",
|
|
6
|
+
"names": ["html", "svg", "unsafeStatic", "setCustomElementsScopingSuffix", "getCustomElementsScopingSuffix", "setCustomElementsScopingRules", "getCustomElementsScopingRules", "shouldScopeCustomElement", "getEffectiveScopingSuffixForTag", "getScopedVarName", "registerFeature", "LitStatic"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";import l from"./generated/VersionInfo.js";let o,t={include:[/^ui5-/],exclude:[]};const s=new Map,u=e=>{if(!e.match(/^[a-zA-Z0-9_-]+$/))throw new Error("Only alphanumeric characters and dashes allowed for the scoping suffix");o=e},c=()=>o,a=e=>{if(!e||!e.include)throw new Error('"rules" must be an object with at least an "include" property');if(!Array.isArray(e.include)||e.include.some(r=>!(r instanceof RegExp)))throw new Error('"rules.include" must be an array of regular expressions');if(e.exclude&&(!Array.isArray(e.exclude)||e.exclude.some(r=>!(r instanceof RegExp))))throw new Error('"rules.exclude" must be an array of regular expressions');e.exclude=e.exclude||[],t=e,s.clear()},m=()=>t,i=e=>{if(!s.has(e)){const r=t.include.some(n=>e.match(n))&&!t.exclude.some(n=>e.match(n));s.set(e,r)}return s.get(e)},p=e=>{if(i(e))return c()},d=e=>{const r=`v${l.version.replaceAll(".","-")}`,n=/(--_?ui5)([^,:)\s]+)/g;return e.replaceAll(n,`$1-${r}$2`)};export{u as setCustomElementsScopingSuffix,c as getCustomElementsScopingSuffix,a as setCustomElementsScopingRules,m as getCustomElementsScopingRules,i as shouldScopeCustomElement,p as getEffectiveScopingSuffixForTag,d as getScopedVarName};
|
|
2
|
+
//# sourceMappingURL=CustomElementsScopeUtils.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/CustomElementsScopeUtils.ts"],
|
|
4
|
+
"sourcesContent": ["import VersionInfo from \"./generated/VersionInfo.js\";\n\nlet suf: string;\n\ntype Rules = {\n\tinclude: Array<RegExp>,\n\texclude: Array<RegExp>,\n};\n\nlet rulesObj: Rules = {\n\tinclude: [/^ui5-/],\n\texclude: [],\n};\n\nconst tagsCache = new Map<string, boolean>(); // true/false means the tag should/should not be cached, undefined means not known yet.\n\n/**\n * Sets the suffix to be used for custom elements scoping, f.e. pass \"demo\" to get tags such as \"ui5-button-demo\".\n * Note: by default all tags starting with \"ui5-\" will be scoped, unless you change this by calling \"setCustomElementsScopingRules\"\n *\n * @public\n * @param suffix The scoping suffix\n */\nconst setCustomElementsScopingSuffix = (suffix: string) => {\n\tif (!suffix.match(/^[a-zA-Z0-9_-]+$/)) {\n\t\tthrow new Error(\"Only alphanumeric characters and dashes allowed for the scoping suffix\");\n\t}\n\n\tsuf = suffix;\n};\n\n/**\n * Returns the currently set scoping suffix, or undefined if not set.\n *\n * @public\n * @returns {String|undefined}\n */\nconst getCustomElementsScopingSuffix = () => {\n\treturn suf;\n};\n\n/**\n * Sets the rules, governing which custom element tags to scope and which not, f.e.\n * setCustomElementsScopingRules({include: [/^ui5-/]}, exclude: [/^ui5-mylib-/, /^ui5-carousel$/]);\n * will scope all elements starting with \"ui5-\" but not the ones starting with \"ui5-mylib-\" and not \"ui5-carousel\".\n *\n * @public\n * @param rules Object with \"include\" and \"exclude\" properties, both arrays of regular expressions. Note that \"include\"\n * rules are applied first and \"exclude\" rules second.\n */\nconst setCustomElementsScopingRules = (rules: Rules) => {\n\tif (!rules || !rules.include) {\n\t\tthrow new Error(`\"rules\" must be an object with at least an \"include\" property`);\n\t}\n\n\tif (!Array.isArray(rules.include) || rules.include.some(rule => !(rule instanceof RegExp))) {\n\t\tthrow new Error(`\"rules.include\" must be an array of regular expressions`);\n\t}\n\n\tif (rules.exclude && (!Array.isArray(rules.exclude) || rules.exclude.some(rule => !(rule instanceof RegExp)))) {\n\t\tthrow new Error(`\"rules.exclude\" must be an array of regular expressions`);\n\t}\n\n\trules.exclude = rules.exclude || [];\n\trulesObj = rules;\n\ttagsCache.clear(); // reset the cache upon setting new rules\n};\n\n/**\n * Returns the rules, governing which custom element tags to scope and which not. By default, all elements\n * starting with \"ui5-\" are scoped. The default rules are: {include: [/^ui5-/]}.\n *\n * @public\n * @returns {Object}\n */\nconst getCustomElementsScopingRules = () => {\n\treturn rulesObj;\n};\n\n/**\n * Determines whether custom elements with the given tag should be scoped or not.\n * The tag is first matched against the \"include\" rules and then against the \"exclude\" rules and the\n * result is cached until new rules are set.\n *\n * @public\n * @param tag\n */\nconst shouldScopeCustomElement = (tag: string) => {\n\tif (!tagsCache.has(tag)) {\n\t\tconst result = rulesObj.include.some(rule => tag.match(rule)) && !rulesObj.exclude.some(rule => tag.match(rule));\n\t\ttagsCache.set(tag, result);\n\t}\n\n\treturn tagsCache.get(tag);\n};\n\n/**\n * Returns the currently set scoping suffix, if any and if the tag should be scoped, or undefined otherwise.\n *\n * @public\n * @param tag\n * @returns {String}\n */\nconst getEffectiveScopingSuffixForTag = (tag: string) => {\n\tif (shouldScopeCustomElement(tag)) {\n\t\treturn getCustomElementsScopingSuffix();\n\t}\n};\n\n/**\n * @public\n * Used for getting a scoped name for a CSS variable using the same transformation used in the build\n * @name the name of the css variable as written in the code\n * @returns a variable name with the current version inserted as available at runtime\n */\nconst getScopedVarName = (name: string) => {\n\tconst versionStr = `v${VersionInfo.version.replaceAll(\".\", \"-\")}`;\n\tconst expr = /(--_?ui5)([^,:)\\s]+)/g;\n\treturn name.replaceAll(expr, `$1-${versionStr}$2`);\n};\n\nexport {\n\tsetCustomElementsScopingSuffix,\n\tgetCustomElementsScopingSuffix,\n\tsetCustomElementsScopingRules,\n\tgetCustomElementsScopingRules,\n\tshouldScopeCustomElement,\n\tgetEffectiveScopingSuffixForTag,\n\tgetScopedVarName,\n};\n"],
|
|
5
|
+
"mappings": "aAAA,OAAOA,MAAiB,6BAExB,IAAIC,EAOAC,EAAkB,CACrB,QAAS,CAAC,OAAO,EACjB,QAAS,CAAC,CACX,EAEA,MAAMC,EAAY,IAAI,IAShBC,EAAkCC,GAAmB,CAC1D,GAAI,CAACA,EAAO,MAAM,kBAAkB,EACnC,MAAM,IAAI,MAAM,wEAAwE,EAGzFJ,EAAMI,CACP,EAQMC,EAAiC,IAC/BL,EAYFM,EAAiCC,GAAiB,CACvD,GAAI,CAACA,GAAS,CAACA,EAAM,QACpB,MAAM,IAAI,MAAM,+DAA+D,EAGhF,GAAI,CAAC,MAAM,QAAQA,EAAM,OAAO,GAAKA,EAAM,QAAQ,KAAKC,GAAQ,EAAEA,aAAgB,OAAO,EACxF,MAAM,IAAI,MAAM,yDAAyD,EAG1E,GAAID,EAAM,UAAY,CAAC,MAAM,QAAQA,EAAM,OAAO,GAAKA,EAAM,QAAQ,KAAKC,GAAQ,EAAEA,aAAgB,OAAO,GAC1G,MAAM,IAAI,MAAM,yDAAyD,EAG1ED,EAAM,QAAUA,EAAM,SAAW,CAAC,EAClCN,EAAWM,EACXL,EAAU,MAAM,CACjB,EASMO,EAAgC,IAC9BR,EAWFS,EAA4BC,GAAgB,CACjD,GAAI,CAACT,EAAU,IAAIS,CAAG,EAAG,CACxB,MAAMC,EAASX,EAAS,QAAQ,KAAKO,GAAQG,EAAI,MAAMH,CAAI,CAAC,GAAK,CAACP,EAAS,QAAQ,KAAKO,GAAQG,EAAI,MAAMH,CAAI,CAAC,EAC/GN,EAAU,IAAIS,EAAKC,CAAM,CAC1B,CAEA,OAAOV,EAAU,IAAIS,CAAG,CACzB,EASME,EAAmCF,GAAgB,CACxD,GAAID,EAAyBC,CAAG,EAC/B,OAAON,EAA+B,CAExC,EAQMS,EAAoBC,GAAiB,CAC1C,MAAMC,EAAa,IAAIjB,EAAY,QAAQ,WAAW,IAAK,GAAG,CAAC,GACzDkB,EAAO,wBACb,OAAOF,EAAK,WAAWE,EAAM,MAAMD,CAAU,IAAI,CAClD,EAEA,OACCb,KAAA,+BACAE,KAAA,+BACAC,KAAA,8BACAG,KAAA,8BACAC,KAAA,yBACAG,KAAA,gCACAC,KAAA",
|
|
6
|
+
"names": ["VersionInfo", "suf", "rulesObj", "tagsCache", "setCustomElementsScopingSuffix", "suffix", "getCustomElementsScopingSuffix", "setCustomElementsScopingRules", "rules", "rule", "getCustomElementsScopingRules", "shouldScopeCustomElement", "tag", "result", "getEffectiveScopingSuffixForTag", "getScopedVarName", "name", "versionStr", "expr"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/DOMObserver.ts"],
|
|
4
|
+
"sourcesContent": ["const observers = new WeakMap<Node, MutationObserver>();\n\n/**\n * @param node\n * @param callback\n * @param options\n */\nconst observeDOMNode = (node: Node, callback: MutationCallback, options?: MutationObserverInit) => {\n\tconst observer = new MutationObserver(callback);\n\tobservers.set(node, observer);\n\tobserver.observe(node, options);\n};\n\n/**\n * @param node\n */\nconst unobserveDOMNode = (node: Node) => {\n\tconst observer = observers.get(node);\n\tif (observer) {\n\t\tobserver.disconnect();\n\t\tobservers.delete(node);\n\t}\n};\n\nexport {\n\tobserveDOMNode,\n\tunobserveDOMNode,\n};\n"],
|
|
5
|
+
"mappings": "aAAA,MAAMA,EAAY,IAAI,QAOhBC,EAAiB,CAACC,EAAYC,EAA4BC,IAAmC,CAClG,MAAMC,EAAW,IAAI,iBAAiBF,CAAQ,EAC9CH,EAAU,IAAIE,EAAMG,CAAQ,EAC5BA,EAAS,QAAQH,EAAME,CAAO,CAC/B,EAKME,EAAoBJ,GAAe,CACxC,MAAMG,EAAWL,EAAU,IAAIE,CAAI,EAC/BG,IACHA,EAAS,WAAW,EACpBL,EAAU,OAAOE,CAAI,EAEvB,EAEA,OACCD,KAAA,eACAK,KAAA",
|
|
6
|
+
"names": ["observers", "observeDOMNode", "node", "callback", "options", "observer", "unobserveDOMNode"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const t=typeof document>"u",e={get userAgent(){return t?"":navigator.userAgent},get touch(){return t?!1:"ontouchstart"in window||navigator.maxTouchPoints>0},get chrome(){return t?!1:/(Chrome|CriOS)/.test(e.userAgent)},get firefox(){return t?!1:/Firefox/.test(e.userAgent)},get safari(){return t?!1:!e.chrome&&/(Version|PhantomJS)\/(\d+\.\d+).*Safari/.test(e.userAgent)},get webkit(){return t?!1:/webkit/.test(e.userAgent)},get windows(){return t?!1:navigator.platform.indexOf("Win")!==-1},get macOS(){return t?!1:!!navigator.userAgent.match(/Macintosh|Mac OS X/i)},get iOS(){return t?!1:!!navigator.platform.match(/iPhone|iPad|iPod/)||!!(e.userAgent.match(/Mac/)&&"ontouchend"in document)},get android(){return t?!1:!e.windows&&/Android/.test(e.userAgent)},get androidPhone(){return t?!1:e.android&&/(?=android)(?=.*mobile)/i.test(e.userAgent)},get ipad(){return t?!1:/ipad/i.test(e.userAgent)||/Macintosh/i.test(e.userAgent)&&"ontouchend"in document}};let o,i,r;const s=()=>{if(t||!e.windows)return!1;if(o===void 0){const n=e.userAgent.match(/Windows NT (\d+).(\d)/);o=n?parseFloat(n[1]):0}return o>=8},c=()=>{if(t||!e.webkit)return!1;if(i===void 0){const n=e.userAgent.match(/(webkit)[ /]([\w.]+)/);i=n?parseFloat(n[1]):0}return i>=537.1},u=()=>{if(t)return!1;if(r===void 0){if(e.ipad){r=!0;return}if(e.touch){if(s()){r=!0;return}if(e.chrome&&e.android){r=!/Mobile Safari\/[.0-9]+/.test(e.userAgent);return}let n=window.devicePixelRatio?window.devicePixelRatio:1;e.android&&c()&&(n=1),r=Math.min(window.screen.width/n,window.screen.height/n)>=600;return}r=e.userAgent.indexOf("Touch")!==-1||e.android&&!e.androidPhone}},l=()=>e.touch,h=()=>e.safari,g=()=>e.chrome,b=()=>e.firefox,a=()=>(u(),(e.touch||s())&&r),d=()=>(u(),e.touch&&!r),f=()=>t?!1:!a()&&!d()||s(),m=()=>a()&&f(),w=()=>e.iOS,A=()=>e.macOS,S=()=>e.android||e.androidPhone;export{l as supportsTouch,h as isSafari,g as isChrome,b as isFirefox,d as isPhone,a as isTablet,f as isDesktop,m as isCombi,w as isIOS,S as isAndroid,A as isMac};
|
|
2
|
+
//# sourceMappingURL=Device.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Device.ts"],
|
|
4
|
+
"sourcesContent": ["const isSSR = typeof document === \"undefined\";\n\nconst internals = {\n\tget userAgent() {\n\t\tif (isSSR) {\n\t\t\treturn \"\";\n\t\t}\n\t\treturn navigator.userAgent;\n\t},\n\tget touch() {\n\t\tif (isSSR) {\n\t\t\treturn false;\n\t\t}\n\t\treturn \"ontouchstart\" in window || navigator.maxTouchPoints > 0;\n\t},\n\n\tget chrome() {\n\t\tif (isSSR) {\n\t\t\treturn false;\n\t\t}\n\t\treturn /(Chrome|CriOS)/.test(internals.userAgent);\n\t},\n\tget firefox() {\n\t\tif (isSSR) {\n\t\t\treturn false;\n\t\t}\n\t\treturn /Firefox/.test(internals.userAgent);\n\t},\n\tget safari() {\n\t\tif (isSSR) {\n\t\t\treturn false;\n\t\t}\n\t\treturn !internals.chrome && /(Version|PhantomJS)\\/(\\d+\\.\\d+).*Safari/.test(internals.userAgent);\n\t},\n\tget webkit() {\n\t\tif (isSSR) {\n\t\t\treturn false;\n\t\t}\n\t\treturn /webkit/.test(internals.userAgent);\n\t},\n\tget windows() {\n\t\tif (isSSR) {\n\t\t\treturn false;\n\t\t}\n\t\treturn navigator.platform.indexOf(\"Win\") !== -1;\n\t},\n\tget macOS() {\n\t\tif (isSSR) {\n\t\t\treturn false;\n\t\t}\n\t\treturn !!navigator.userAgent.match(/Macintosh|Mac OS X/i);\n\t},\n\tget iOS() {\n\t\tif (isSSR) {\n\t\t\treturn false;\n\t\t}\n\t\treturn !!(navigator.platform.match(/iPhone|iPad|iPod/)) || !!(internals.userAgent.match(/Mac/) && \"ontouchend\" in document);\n\t},\n\tget android() {\n\t\tif (isSSR) {\n\t\t\treturn false;\n\t\t}\n\t\treturn !internals.windows && /Android/.test(internals.userAgent);\n\t},\n\tget androidPhone() {\n\t\tif (isSSR) {\n\t\t\treturn false;\n\t\t}\n\t\treturn internals.android && /(?=android)(?=.*mobile)/i.test(internals.userAgent);\n\t},\n\tget ipad() {\n\t\tif (isSSR) {\n\t\t\treturn false;\n\t\t}\n\t\t// With iOS 13 the string 'iPad' was removed from the user agent string through a browser setting, which is applied on all sites by default:\n\t\t// \"Request Desktop Website -> All websites\" (for more infos see: https://forums.developer.apple.com/thread/119186).\n\t\t// Therefore the OS is detected as MACINTOSH instead of iOS and the device is a tablet if the Device.support.touch is true.\n\t\treturn /ipad/i.test(internals.userAgent) || (/Macintosh/i.test(internals.userAgent) && \"ontouchend\" in document);\n\t},\n};\n\nlet windowsVersion: number;\nlet webkitVersion: number;\nlet tablet: boolean;\n\nconst isWindows8OrAbove = () => {\n\tif (isSSR) {\n\t\treturn false;\n\t}\n\n\tif (!internals.windows) {\n\t\treturn false;\n\t}\n\n\tif (windowsVersion === undefined) {\n\t\tconst matches = internals.userAgent.match(/Windows NT (\\d+).(\\d)/);\n\t\twindowsVersion = matches ? parseFloat(matches[1]) : 0;\n\t}\n\n\treturn windowsVersion >= 8;\n};\n\nconst isWebkit537OrAbove = () => {\n\tif (isSSR) {\n\t\treturn false;\n\t}\n\n\tif (!internals.webkit) {\n\t\treturn false;\n\t}\n\n\tif (webkitVersion === undefined) {\n\t\tconst matches = internals.userAgent.match(/(webkit)[ /]([\\w.]+)/);\n\t\twebkitVersion = matches ? parseFloat(matches[1]) : 0;\n\t}\n\n\treturn webkitVersion >= 537.10;\n};\n\nconst detectTablet = () => {\n\tif (isSSR) {\n\t\treturn false;\n\t}\n\n\tif (tablet !== undefined) {\n\t\treturn;\n\t}\n\n\tif (internals.ipad) {\n\t\ttablet = true;\n\t\treturn;\n\t}\n\n\tif (internals.touch) {\n\t\tif (isWindows8OrAbove()) {\n\t\t\ttablet = true;\n\t\t\treturn;\n\t\t}\n\n\t\tif (internals.chrome && internals.android) {\n\t\t\ttablet = !/Mobile Safari\\/[.0-9]+/.test(internals.userAgent);\n\t\t\treturn;\n\t\t}\n\n\t\tlet densityFactor = window.devicePixelRatio ? window.devicePixelRatio : 1; // may be undefined in Windows Phone devices\n\t\tif (internals.android && isWebkit537OrAbove()) {\n\t\t\tdensityFactor = 1;\n\t\t}\n\n\t\ttablet = (Math.min(window.screen.width / densityFactor, window.screen.height / densityFactor) >= 600);\n\t\treturn;\n\t}\n\n\ttablet = internals.userAgent.indexOf(\"Touch\") !== -1 || (internals.android && !internals.androidPhone);\n};\n\nconst supportsTouch = (): boolean => internals.touch;\nconst isSafari = (): boolean => internals.safari;\nconst isChrome = (): boolean => internals.chrome;\nconst isFirefox = (): boolean => internals.firefox;\n\nconst isTablet = (): boolean => {\n\tdetectTablet();\n\treturn (internals.touch || isWindows8OrAbove()) && tablet;\n};\n\nconst isPhone = (): boolean => {\n\tdetectTablet();\n\treturn internals.touch && !tablet;\n};\n\nconst isDesktop = (): boolean => {\n\tif (isSSR) {\n\t\treturn false;\n\t}\n\treturn (!isTablet() && !isPhone()) || isWindows8OrAbove();\n};\n\nconst isCombi = (): boolean => {\n\treturn isTablet() && isDesktop();\n};\n\nconst isIOS = (): boolean => {\n\treturn internals.iOS;\n};\n\nconst isMac = (): boolean => {\n\treturn internals.macOS;\n};\n\nconst isAndroid = (): boolean => {\n\treturn internals.android || internals.androidPhone;\n};\n\nexport {\n\tsupportsTouch,\n\tisSafari,\n\tisChrome,\n\tisFirefox,\n\tisPhone,\n\tisTablet,\n\tisDesktop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V,EAAkB,EAGnDY,EAAU,IACRH,EAAS,GAAKE,EAAU,EAG1BE,EAAQ,IACNjB,EAAU,IAGZkB,EAAQ,IACNlB,EAAU,MAGZmB,EAAY,IACVnB,EAAU,SAAWA,EAAU,aAGvC,OACCS,KAAA,cACAC,KAAA,SACAC,KAAA,SACAC,KAAA,UACAE,KAAA,QACAD,KAAA,SACAE,KAAA,UACAC,KAAA,QACAC,KAAA,MACAE,KAAA,UACAD,KAAA",
|
|
6
|
+
"names": ["isSSR", "internals", "windowsVersion", "webkitVersion", "tablet", "isWindows8OrAbove", "matches", "isWebkit537OrAbove", "detectTablet", "densityFactor", "supportsTouch", "isSafari", "isChrome", "isFirefox", "isTablet", "isPhone", "isDesktop", "isCombi", "isIOS", "isMac", "isAndroid"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";class i{constructor(){this._eventRegistry=new Map}attachEvent(t,r){const n=this._eventRegistry,e=n.get(t);if(!Array.isArray(e)){n.set(t,[r]);return}e.includes(r)||e.push(r)}detachEvent(t,r){const n=this._eventRegistry,e=n.get(t);if(!e)return;const s=e.indexOf(r);s!==-1&&e.splice(s,1),e.length===0&&n.delete(t)}fireEvent(t,r){const e=this._eventRegistry.get(t);return e?e.map(s=>s.call(this,r)):[]}fireEventAsync(t,r){return Promise.all(this.fireEvent(t,r))}isHandlerAttached(t,r){const e=this._eventRegistry.get(t);return e?e.includes(r):!1}hasListeners(t){return!!this._eventRegistry.get(t)}}export default i;
|
|
2
|
+
//# sourceMappingURL=EventProvider.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/EventProvider.ts"],
|
|
4
|
+
"sourcesContent": ["class EventProvider<EventListenerParam, EventListenerReturn> {\n\t_eventRegistry: Map<string, Array<(param: EventListenerParam) => EventListenerReturn>>;\n\n\tconstructor() {\n\t\tthis._eventRegistry = new Map();\n\t}\n\n\tattachEvent(eventName: string, fnFunction: (param: EventListenerParam) => EventListenerReturn) {\n\t\tconst eventRegistry = this._eventRegistry;\n\t\tconst eventListeners = eventRegistry.get(eventName);\n\n\t\tif (!Array.isArray(eventListeners)) {\n\t\t\teventRegistry.set(eventName, [fnFunction]);\n\t\t\treturn;\n\t\t}\n\n\t\tif (!eventListeners.includes(fnFunction)) {\n\t\t\teventListeners.push(fnFunction);\n\t\t}\n\t}\n\n\tdetachEvent(eventName: string, fnFunction: (param: EventListenerParam) => EventListenerReturn) {\n\t\tconst eventRegistry = this._eventRegistry;\n\t\tconst eventListeners = eventRegistry.get(eventName);\n\n\t\tif (!eventListeners) {\n\t\t\treturn;\n\t\t}\n\t\tconst indexOfFnToDetach = eventListeners.indexOf(fnFunction);\n\n\t\tif (indexOfFnToDetach !== -1) {\n\t\t\teventListeners.splice(indexOfFnToDetach, 1);\n\t\t}\n\n\t\tif (eventListeners.length === 0) {\n\t\t\teventRegistry.delete(eventName);\n\t\t}\n\t}\n\n\t/**\n\t * Fires an event and returns the results of all event listeners as an array.\n\t *\n\t * @param eventName the event to fire\n\t * @param data optional data to pass to each event listener\n\t * @returns {Array} an array with the results of all event listeners\n\t */\n\tfireEvent(eventName: string, data: EventListenerParam) {\n\t\tconst eventRegistry = this._eventRegistry;\n\t\tconst eventListeners = eventRegistry.get(eventName);\n\n\t\tif (!eventListeners) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn eventListeners.map(fn => {\n\t\t\treturn fn.call(this, data);\n\t\t});\n\t}\n\n\t/**\n\t * Fires an event and returns a promise that will resolve once all listeners have resolved.\n\t *\n\t * @param eventName the event to fire\n\t * @param data optional data to pass to each event listener\n\t * @returns {Promise} a promise that will resolve when all listeners have resolved\n\t */\n\tfireEventAsync(eventName: string, data: EventListenerParam) {\n\t\treturn Promise.all(this.fireEvent(eventName, data));\n\t}\n\n\tisHandlerAttached(eventName: string, fnFunction: (param: EventListenerParam) => EventListenerReturn) {\n\t\tconst eventRegistry = this._eventRegistry;\n\t\tconst eventListeners = eventRegistry.get(eventName);\n\n\t\tif (!eventListeners) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn eventListeners.includes(fnFunction);\n\t}\n\n\thasListeners(eventName: string) {\n\t\treturn !!this._eventRegistry.get(eventName);\n\t}\n}\n\nexport default EventProvider;\n"],
|
|
5
|
+
"mappings": "aAAA,MAAMA,CAAuD,CAG5D,aAAc,CACb,KAAK,eAAiB,IAAI,GAC3B,CAEA,YAAYC,EAAmBC,EAAgE,CAC9F,MAAMC,EAAgB,KAAK,eACrBC,EAAiBD,EAAc,IAAIF,CAAS,EAElD,GAAI,CAAC,MAAM,QAAQG,CAAc,EAAG,CACnCD,EAAc,IAAIF,EAAW,CAACC,CAAU,CAAC,EACzC,MACD,CAEKE,EAAe,SAASF,CAAU,GACtCE,EAAe,KAAKF,CAAU,CAEhC,CAEA,YAAYD,EAAmBC,EAAgE,CAC9F,MAAMC,EAAgB,KAAK,eACrBC,EAAiBD,EAAc,IAAIF,CAAS,EAElD,GAAI,CAACG,EACJ,OAED,MAAMC,EAAoBD,EAAe,QAAQF,CAAU,EAEvDG,IAAsB,IACzBD,EAAe,OAAOC,EAAmB,CAAC,EAGvCD,EAAe,SAAW,GAC7BD,EAAc,OAAOF,CAAS,CAEhC,CASA,UAAUA,EAAmBK,EAA0B,CAEtD,MAAMF,EADgB,KAAK,eACU,IAAIH,CAAS,EAElD,OAAKG,EAIEA,EAAe,IAAIG,GAClBA,EAAG,KAAK,KAAMD,CAAI,CACzB,EALO,CAAC,CAMV,CASA,eAAeL,EAAmBK,EAA0B,CAC3D,OAAO,QAAQ,IAAI,KAAK,UAAUL,EAAWK,CAAI,CAAC,CACnD,CAEA,kBAAkBL,EAAmBC,EAAgE,CAEpG,MAAME,EADgB,KAAK,eACU,IAAIH,CAAS,EAElD,OAAKG,EAIEA,EAAe,SAASF,CAAU,EAHjC,EAIT,CAEA,aAAaD,EAAmB,CAC/B,MAAO,CAAC,CAAC,KAAK,eAAe,IAAIA,CAAS,CAC3C,CACD,CAEA,eAAeD",
|
|
6
|
+
"names": ["EventProvider", "eventName", "fnFunction", "eventRegistry", "eventListeners", "indexOfFnToDetach", "data", "fn"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/FeaturesRegistry.ts"],
|
|
4
|
+
"sourcesContent": ["const features = new Map<string, any>();\n\nconst registerFeature = (name: string, feature: object) => {\n\tfeatures.set(name, feature);\n};\n\nconst getFeature = <T>(name: string): T => {\n\treturn features.get(name) as T;\n};\n\nexport {\n\tregisterFeature,\n\tgetFeature,\n};\n"],
|
|
5
|
+
"mappings": "aAAA,MAAMA,EAAW,IAAI,IAEfC,EAAkB,CAACC,EAAcC,IAAoB,CAC1DH,EAAS,IAAIE,EAAMC,CAAO,CAC3B,EAEMC,EAAiBF,GACfF,EAAS,IAAIE,CAAI,EAGzB,OACCD,KAAA,gBACAG,KAAA",
|
|
6
|
+
"names": ["features", "registerFeature", "name", "feature", "getFeature"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";import{hasStyle as t,createStyle as o}from"./ManagedStyles.js";import{getFeature as r}from"./FeaturesRegistry.js";import p from"./generated/css/FontFace.css.js";import a from"./generated/css/OverrideFontFace.css.js";const n=()=>{const e=r("OpenUI5Support");(!e||!e.isOpenUI5Detected())&&i(),f()},i=()=>{t("data-ui5-font-face")||o(p,"data-ui5-font-face")},f=()=>{t("data-ui5-font-face-override")||o(a,"data-ui5-font-face-override")};export default n;
|
|
2
|
+
//# sourceMappingURL=FontFace.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/FontFace.ts"],
|
|
4
|
+
"sourcesContent": ["import { hasStyle, createStyle } from \"./ManagedStyles.js\";\nimport { getFeature } from \"./FeaturesRegistry.js\";\nimport fontFaceCSS from \"./generated/css/FontFace.css.js\";\nimport overrideFontFaceCSS from \"./generated/css/OverrideFontFace.css.js\";\nimport type OpenUI5Support from \"./features/OpenUI5Support.js\";\n\nconst insertFontFace = () => {\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\n\t// Only set the main font if there is no OpenUI5 support, or there is, but OpenUI5 is not loaded\n\tif (!openUI5Support || !openUI5Support.isOpenUI5Detected()) {\n\t\tinsertMainFontFace();\n\t}\n\n\t// Always set the override font - OpenUI5 in CSS Vars mode does not set it, unlike the main font\n\tinsertOverrideFontFace();\n};\n\nconst insertMainFontFace = () => {\n\tif (!hasStyle(\"data-ui5-font-face\")) {\n\t\tcreateStyle(fontFaceCSS, \"data-ui5-font-face\");\n\t}\n};\n\nconst insertOverrideFontFace = () => {\n\tif (!hasStyle(\"data-ui5-font-face-override\")) {\n\t\tcreateStyle(overrideFontFaceCSS, \"data-ui5-font-face-override\");\n\t}\n};\n\nexport default insertFontFace;\n"],
|
|
5
|
+
"mappings": "aAAA,OAAS,YAAAA,EAAU,eAAAC,MAAmB,qBACtC,OAAS,cAAAC,MAAkB,wBAC3B,OAAOC,MAAiB,kCACxB,OAAOC,MAAyB,0CAGhC,MAAMC,EAAiB,IAAM,CAC5B,MAAMC,EAAiBJ,EAAkC,gBAAgB,GAGrE,CAACI,GAAkB,CAACA,EAAe,kBAAkB,IACxDC,EAAmB,EAIpBC,EAAuB,CACxB,EAEMD,EAAqB,IAAM,CAC3BP,EAAS,oBAAoB,GACjCC,EAAYE,EAAa,oBAAoB,CAE/C,EAEMK,EAAyB,IAAM,CAC/BR,EAAS,6BAA6B,GAC1CC,EAAYG,EAAqB,6BAA6B,CAEhE,EAEA,eAAeC",
|
|
6
|
+
"names": ["hasStyle", "createStyle", "getFeature", "fontFaceCSS", "overrideFontFaceCSS", "insertFontFace", "openUI5Support", "insertMainFontFace", "insertOverrideFontFace"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const r=[],n=t=>{if(typeof t!="string"||!t.length)throw new Error("Only string characters for a tag prefix.");r.push(t)},o=t=>r.some(s=>t.startsWith(s));export{n as ignoreCustomElements,o as shouldIgnoreCustomElement};
|
|
2
|
+
//# sourceMappingURL=IgnoreCustomElements.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/IgnoreCustomElements.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * The tag prefixes to be ignored.\n */\nconst tagPrefixes: Array<string> = [];\n\n/**\n * Ignores all custom HTML elements with a given tag prefix to improve the rendering performance of the UI5 Web Components.\n *\n * **When used:** the UI5 Web Components framework treats all custom HTML elements,\n * starting with the given prefix as if they are standard HTML elements, such as: `div`, `span`, etc, without additional processing.\n *\n * **When not used:** the framework waits for the slotted children to be defined and registered first,\n * because the state or visual appearance of the parent may rely on the slotted elements/children.\n *\n * **Note:** We recommend using `ignoreCustomElements` when slotting custom HTML elements (with only semantic purpose)\n * inside UI5 Web Components, to improve the time to render.\n *\n * @public\n * @since 1.14.0\n * @param { string } tagPrefix\n */\nconst ignoreCustomElements = (tagPrefix: string) => {\n\tif (typeof tagPrefix !== \"string\" || !tagPrefix.length) {\n\t\tthrow new Error(\"Only string characters for a tag prefix.\");\n\t}\n\n\ttagPrefixes.push(tagPrefix);\n};\n\n/**\n * Determines whether custom elements with the given tag should be ignored.\n *\n * @private\n * @param { string } tag\n */\nconst shouldIgnoreCustomElement = (tag: string): boolean => {\n\treturn tagPrefixes.some(pref => tag.startsWith(pref));\n};\n\nexport {\n\tignoreCustomElements,\n\tshouldIgnoreCustomElement,\n};\n"],
|
|
5
|
+
"mappings": "aAGA,MAAMA,EAA6B,CAAC,EAkB9BC,EAAwBC,GAAsB,CACnD,GAAI,OAAOA,GAAc,UAAY,CAACA,EAAU,OAC/C,MAAM,IAAI,MAAM,0CAA0C,EAG3DF,EAAY,KAAKE,CAAS,CAC3B,EAQMC,EAA6BC,GAC3BJ,EAAY,KAAKK,GAAQD,EAAI,WAAWC,CAAI,CAAC,EAGrD,OACCJ,KAAA,qBACAE,KAAA",
|
|
6
|
+
"names": ["tagPrefixes", "ignoreCustomElements", "tagPrefix", "shouldIgnoreCustomElement", "tag", "pref"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";import p from"./thirdparty/merge.js";import{getFeature as g}from"./FeaturesRegistry.js";import{DEFAULT_THEME as u}from"./generated/AssetParameters.js";import m from"./validateThemeRoot.js";import d from"./types/AnimationMode.js";let f=!1,t={animationMode:d.Full,theme:u,themeRoot:void 0,rtl:void 0,language:void 0,timezone:void 0,calendarType:void 0,secondaryCalendarType:void 0,noConflict:!1,formatSettings:{},fetchDefaultLanguage:!1};const l=()=>(o(),t.animationMode),h=()=>(o(),t.theme),y=()=>(o(),t.themeRoot),C=()=>(o(),t.language),S=()=>(o(),t.fetchDefaultLanguage),T=()=>(o(),t.noConflict),U=()=>(o(),t.calendarType),I=()=>(o(),t.secondaryCalendarType),L=()=>(o(),t.timezone),O=()=>(o(),t.formatSettings),i=new Map;i.set("true",!0),i.set("false",!1);const R=()=>{const n=document.querySelector("[data-ui5-config]")||document.querySelector("[data-id='sap-ui-config']");let e;if(n){try{e=JSON.parse(n.innerHTML)}catch{console.warn("Incorrect data-sap-ui-config format. Please use JSON")}e&&(t=p(t,e))}},M=()=>{const n=new URLSearchParams(window.location.search);n.forEach((e,r)=>{const a=r.split("sap-").length;a===0||a===r.split("sap-ui-").length||c(r,e,"sap")}),n.forEach((e,r)=>{r.startsWith("sap-ui")&&c(r,e,"sap-ui")})},F=n=>{const e=n.split("@")[1];return m(e)},w=(n,e)=>n==="theme"&&e.includes("@")?e.split("@")[0]:e,c=(n,e,r)=>{const a=e.toLowerCase(),s=n.split(`${r}-`)[1];i.has(e)&&(e=i.get(a)),s==="theme"?(t.theme=w(s,e),e&&e.includes("@")&&(t.themeRoot=F(e))):t[s]=e},z=()=>{const n=g("OpenUI5Support");if(!n||!n.isOpenUI5Detected())return;const e=n.getConfigurationSettingsObject();t=p(t,e)},o=()=>{typeof document>"u"||f||(R(),M(),z(),f=!0)};export{l as getAnimationMode,h as getTheme,y as getThemeRoot,C as getLanguage,S as getFetchDefaultLanguage,T as getNoConflict,U as getCalendarType,I as getSecondaryCalendarType,L as getTimezone,O as getFormatSettings};
|
|
2
|
+
//# sourceMappingURL=InitialConfiguration.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/InitialConfiguration.ts"],
|
|
4
|
+
"sourcesContent": ["import merge from \"./thirdparty/merge.js\";\nimport { getFeature } from \"./FeaturesRegistry.js\";\nimport { DEFAULT_THEME } from \"./generated/AssetParameters.js\";\nimport validateThemeRoot from \"./validateThemeRoot.js\";\nimport type OpenUI5Support from \"./features/OpenUI5Support.js\";\nimport type { FormatSettings } from \"./config/FormatSettings.js\";\nimport AnimationMode from \"./types/AnimationMode.js\";\nimport CalendarType from \"./types/CalendarType.js\";\n\nlet initialized = false;\n\ntype InitialConfig = {\n\t[key: string]: any,\n\tanimationMode: AnimationMode,\n\ttheme: string,\n\tthemeRoot: string | undefined,\n\tlanguage: string | undefined,\n\tcalendarType: CalendarType | undefined,\n\tsecondaryCalendarType: CalendarType | undefined,\n\ttimezone: string | undefined,\n\tnoConflict: boolean,\n\tformatSettings: FormatSettings,\n\tfetchDefaultLanguage: boolean,\n};\n\nlet initialConfig: InitialConfig = {\n\tanimationMode: AnimationMode.Full,\n\ttheme: DEFAULT_THEME,\n\tthemeRoot: undefined,\n\trtl: undefined,\n\tlanguage: undefined,\n\ttimezone: undefined,\n\tcalendarType: undefined,\n\tsecondaryCalendarType: undefined,\n\tnoConflict: false, // no URL\n\tformatSettings: {},\n\tfetchDefaultLanguage: false,\n};\n\n/* General settings */\nconst getAnimationMode = () => {\n\tinitConfiguration();\n\treturn initialConfig.animationMode;\n};\n\nconst getTheme = () => {\n\tinitConfiguration();\n\treturn initialConfig.theme;\n};\n\nconst getThemeRoot = () => {\n\tinitConfiguration();\n\treturn initialConfig.themeRoot;\n};\n\nconst getLanguage = () => {\n\tinitConfiguration();\n\treturn initialConfig.language;\n};\n\n/**\n * Returns if the default language, that is inlined at build time,\n * should be fetched over the network instead.\n * @returns {Boolean}\n */\nconst getFetchDefaultLanguage = () => {\n\tinitConfiguration();\n\treturn initialConfig.fetchDefaultLanguage;\n};\n\nconst getNoConflict = () => {\n\tinitConfiguration();\n\treturn initialConfig.noConflict;\n};\n\n/**\n * Get the configured calendar type\n * @returns { String } the name of the configured calendar type\n */\nconst getCalendarType = () => {\n\tinitConfiguration();\n\treturn initialConfig.calendarType;\n};\n\nconst getSecondaryCalendarType = () => {\n\tinitConfiguration();\n\treturn initialConfig.secondaryCalendarType;\n};\n\n/**\n * Returns the configured IANA timezone ID.\n * @returns { String } the configured IANA timezone ID, e.g. \"America/New_York\"\n */\nconst getTimezone = () => {\n\tinitConfiguration();\n\treturn initialConfig.timezone;\n};\n\nconst getFormatSettings = () => {\n\tinitConfiguration();\n\treturn initialConfig.formatSettings;\n};\n\nconst booleanMapping = new Map();\nbooleanMapping.set(\"true\", true);\nbooleanMapping.set(\"false\", false);\n\nconst parseConfigurationScript = () => {\n\tconst configScript = document.querySelector(\"[data-ui5-config]\") || document.querySelector(\"[data-id='sap-ui-config']\"); // for backward compatibility\n\n\tlet configJSON;\n\n\tif (configScript) {\n\t\ttry {\n\t\t\tconfigJSON = JSON.parse(configScript.innerHTML);\n\t\t} catch (err) {\n\t\t\tconsole.warn(\"Incorrect data-sap-ui-config format. Please use JSON\"); /* eslint-disable-line */\n\t\t}\n\n\t\tif (configJSON) {\n\t\t\tinitialConfig = merge(initialConfig, configJSON);\n\t\t}\n\t}\n};\n\nconst parseURLParameters = () => {\n\tconst params = new URLSearchParams(window.location.search);\n\n\t// Process \"sap-*\" params first\n\tparams.forEach((value, key) => {\n\t\tconst parts = key.split(\"sap-\").length;\n\t\tif (parts === 0 || parts === key.split(\"sap-ui-\").length) {\n\t\t\treturn;\n\t\t}\n\n\t\tapplyURLParam(key, value, \"sap\");\n\t});\n\n\t// Process \"sap-ui-*\" params\n\tparams.forEach((value, key) => {\n\t\tif (!key.startsWith(\"sap-ui\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tapplyURLParam(key, value, \"sap-ui\");\n\t});\n};\n\nconst normalizeThemeRootParamValue = (value: string) => {\n\tconst themeRoot = value.split(\"@\")[1];\n\n\treturn validateThemeRoot(themeRoot);\n};\n\nconst normalizeThemeParamValue = (param: string, value: string) => {\n\tif (param === \"theme\" && value.includes(\"@\")) { // the theme parameter might have @<URL-TO-THEME> in the value - strip this\n\t\treturn value.split(\"@\")[0];\n\t}\n\n\treturn value;\n};\n\nconst applyURLParam = (key: string, value: string, paramType: string) => {\n\tconst lowerCaseValue = value.toLowerCase();\n\tconst param = key.split(`${paramType}-`)[1];\n\n\tif (booleanMapping.has(value)) {\n\t\tvalue = booleanMapping.get(lowerCaseValue);\n\t}\n\n\tif (param === \"theme\") {\n\t\tinitialConfig.theme = normalizeThemeParamValue(param, value);\n\n\t\tif (value && value.includes(\"@\")) {\n\t\t\tinitialConfig.themeRoot = normalizeThemeRootParamValue(value);\n\t\t}\n\t} else {\n\t\tinitialConfig[param] = value;\n\t}\n};\n\nconst applyOpenUI5Configuration = () => {\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\tif (!openUI5Support || !openUI5Support.isOpenUI5Detected()) {\n\t\treturn;\n\t}\n\n\tconst OpenUI5Config = openUI5Support.getConfigurationSettingsObject();\n\tinitialConfig = merge(initialConfig, OpenUI5Config);\n};\n\nconst initConfiguration = () => {\n\tif (typeof document === \"undefined\" || initialized) {\n\t\treturn;\n\t}\n\n\t// 1. Lowest priority - configuration script\n\tparseConfigurationScript();\n\n\t// 2. URL parameters overwrite configuration script parameters\n\tparseURLParameters();\n\n\t// 3. If OpenUI5 is detected, it has the highest priority\n\tapplyOpenUI5Configuration();\n\n\tinitialized = true;\n};\n\nexport {\n\tgetAnimationMode,\n\tgetTheme,\n\tgetThemeRoot,\n\tgetLanguage,\n\tgetFetchDefaultLanguage,\n\tgetNoConflict,\n\tgetCalendarType,\n\tgetSecondaryCalendarType,\n\tgetTimezone,\n\tgetFormatSettings,\n};\n"],
|
|
5
|
+
"mappings": "aAAA,OAAOA,MAAW,wBAClB,OAAS,cAAAC,MAAkB,wBAC3B,OAAS,iBAAAC,MAAqB,iCAC9B,OAAOC,MAAuB,yBAG9B,OAAOC,MAAmB,2BAG1B,IAAIC,EAAc,GAgBdC,EAA+B,CAClC,cAAeF,EAAc,KAC7B,MAAOF,EACP,UAAW,OACX,IAAK,OACL,SAAU,OACV,SAAU,OACV,aAAc,OACd,sBAAuB,OACvB,WAAY,GACZ,eAAgB,CAAC,EACjB,qBAAsB,EACvB,EAGA,MAAMK,EAAmB,KACxBC,EAAkB,EACXF,EAAc,eAGhBG,EAAW,KAChBD,EAAkB,EACXF,EAAc,OAGhBI,EAAe,KACpBF,EAAkB,EACXF,EAAc,WAGhBK,EAAc,KACnBH,EAAkB,EACXF,EAAc,UAQhBM,EAA0B,KAC/BJ,EAAkB,EACXF,EAAc,sBAGhBO,EAAgB,KACrBL,EAAkB,EACXF,EAAc,YAOhBQ,EAAkB,KACvBN,EAAkB,EACXF,EAAc,cAGhBS,EAA2B,KAChCP,EAAkB,EACXF,EAAc,uBAOhBU,EAAc,KACnBR,EAAkB,EACXF,EAAc,UAGhBW,EAAoB,KACzBT,EAAkB,EACXF,EAAc,gBAGhBY,EAAiB,IAAI,IAC3BA,EAAe,IAAI,OAAQ,EAAI,EAC/BA,EAAe,IAAI,QAAS,EAAK,EAEjC,MAAMC,EAA2B,IAAM,CACtC,MAAMC,EAAe,SAAS,cAAc,mBAAmB,GAAK,SAAS,cAAc,2BAA2B,EAEtH,IAAIC,EAEJ,GAAID,EAAc,CACjB,GAAI,CACHC,EAAa,KAAK,MAAMD,EA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7B,EAAgBN,EAAMM,EAAe8B,CAAa,CACnD,EAEM5B,EAAoB,IAAM,CAC3B,OAAO,SAAa,KAAeH,IAKvCc,EAAyB,EAGzBG,EAAmB,EAGnBY,EAA0B,EAE1B7B,EAAc,GACf,EAEA,OACCE,KAAA,iBACAE,KAAA,SACAC,KAAA,aACAC,KAAA,YACAC,KAAA,wBACAC,KAAA,cACAC,KAAA,gBACAC,KAAA,yBACAC,KAAA,YACAC,KAAA",
|
|
6
|
+
"names": ["merge", "getFeature", "DEFAULT_THEME", "validateThemeRoot", "AnimationMode", "initialized", "initialConfig", "getAnimationMode", "initConfiguration", "getTheme", "getThemeRoot", "getLanguage", "getFetchDefaultLanguage", "getNoConflict", "getCalendarType", "getSecondaryCalendarType", "getTimezone", "getFormatSettings", "booleanMapping", "parseConfigurationScript", "configScript", "configJSON", "parseURLParameters", "params", "value", "key", "parts", "applyURLParam", "normalizeThemeRootParamValue", "themeRoot", "normalizeThemeParamValue", "param", "paramType", "lowerCaseValue", "applyOpenUI5Configuration", "openUI5Support", "OpenUI5Config"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const y={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CONTROL:17,ALT:18,BREAK:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40,PRINT:44,INSERT:45,DELETE:46,DIGIT_0:48,DIGIT_1:49,DIGIT_2:50,DIGIT_3:51,DIGIT_4:52,DIGIT_5:53,DIGIT_6:54,DIGIT_7:55,DIGIT_8:56,DIGIT_9:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,WINDOWS:91,CONTEXT_MENU:93,TURN_OFF:94,SLEEP:95,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_ASTERISK:106,NUMPAD_PLUS:107,NUMPAD_MINUS:109,NUMPAD_COMMA:110,NUMPAD_SLASH:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUM_LOCK:144,SCROLL_LOCK:145,COLON:186,PLUS:187,COMMA:188,SLASH:189,DOT:190,PIPE:191,SEMICOLON:192,MINUS:219,GREAT_ACCENT:220,EQUALS:221,SINGLE_QUOTE:222,BACKSLASH:226},b=o=>(o.key?o.key==="Enter":o.keyCode===y.ENTER)&&!e(o),d=o=>(o.key?o.key==="Enter":o.keyCode===y.ENTER)&&a(o,!1,!1,!0),f=o=>(o.key?o.key==="Spacebar"||o.key===" ":o.keyCode===y.SPACE)&&!e(o),i=o=>(o.key?o.key==="Spacebar"||o.key===" ":o.keyCode===y.SPACE)&&a(o,!1,!1,!0),A=o=>(o.key?o.key==="Spacebar"||o.key===" ":o.keyCode===y.SPACE)&&a(o,!0,!1,!1),C=o=>(o.key?o.key==="ArrowLeft"||o.key==="Left":o.keyCode===y.ARROW_LEFT)&&!e(o),K=o=>(o.key?o.key==="ArrowRight"||o.key==="Right":o.keyCode===y.ARROW_RIGHT)&&!e(o),c=o=>(o.key?o.key==="ArrowUp"||o.key==="Up":o.keyCode===y.ARROW_UP)&&!e(o),D=o=>(o.key?o.key==="ArrowDown"||o.key==="Down":o.keyCode===y.ARROW_DOWN)&&!e(o),P=o=>(o.key?o.key==="ArrowLeft"||o.key==="Left":o.keyCode===y.ARROW_LEFT)&&a(o,!0,!1,!1),R=o=>(o.key?o.key==="ArrowRight"||o.key==="Right":o.keyCode===y.ARROW_RIGHT)&&a(o,!0,!1,!1),_=o=>(o.key?o.key==="ArrowUp"||o.key==="Up":o.keyCode===y.ARROW_UP)&&a(o,!0,!1,!1),U=o=>(o.key?o.key==="ArrowDown"||o.key==="Down":o.keyCode===y.ARROW_DOWN)&&a(o,!0,!1,!1),S=o=>(o.key?o.key==="ArrowUp"||o.key==="Up":o.keyCode===y.ARROW_UP)&&a(o,!1,!1,!0),O=o=>(o.key?o.key==="ArrowDown"||o.key==="Down":o.keyCode===y.ARROW_DOWN)&&a(o,!1,!1,!0),u=o=>(o.key?o.key==="ArrowUp"||o.key==="Up":o.keyCode===y.ARROW_UP)&&a(o,!1,!0,!1),N=o=>(o.key?o.key==="ArrowDown"||o.key==="Down":o.keyCode===y.ARROW_DOWN)&&a(o,!1,!0,!1),w=o=>(o.key?o.key==="ArrowLeft"||o.key==="Left":o.keyCode===y.ARROW_LEFT)&&a(o,!1,!1,!0),t=o=>(o.key?o.key==="ArrowRight"||o.key==="Right":o.keyCode===y.ARROW_RIGHT)&&a(o,!1,!1,!0),T=o=>(o.key?o.key==="ArrowLeft"||o.key==="Left":o.keyCode===y.ARROW_LEFT)&&a(o,!0,!1,!0),h=o=>(o.key?o.key==="ArrowRight"||o.key==="Right":o.keyCode===y.ARROW_RIGHT)&&a(o,!0,!1,!0),I=o=>(o.key?o.key==="ArrowUp"||o.key==="Up":o.keyCode===y.ARROW_UP)&&a(o,!0,!1,!0),L=o=>(o.key?o.key==="ArrowDown"||o.key==="Down":o.keyCode===y.ARROW_DOWN)&&a(o,!0,!1,!0),p=o=>(o.key?o.key==="Home":o.keyCode===y.HOME)&&!e(o),F=o=>(o.key?o.key==="End":o.keyCode===y.END)&&!e(o),W=o=>(o.key?o.key==="Home":o.keyCode===y.HOME)&&a(o,!0,!1,!1),M=o=>(o.key?o.key==="Home":o.keyCode===y.HOME)&&a(o,!1,!1,!0),G=o=>(o.key?o.key==="End":o.keyCode===y.END)&&a(o,!0,!1,!1),g=o=>(o.key?o.key==="End":o.keyCode===y.END)&&a(o,!1,!1,!0),n=o=>(o.key?o.key==="Escape"||o.key==="Esc":o.keyCode===y.ESCAPE)&&!e(o),H=o=>(o.key?o.key==="Tab":o.keyCode===y.TAB)&&!e(o),B=o=>(o.key?o.key==="Tab":o.keyCode===y.TAB)&&a(o,!1,!1,!0),m=o=>(o.key?o.key==="Backspace":o.keyCode===y.BACKSPACE)&&!e(o),x=o=>(o.key?o.key==="Delete":o.keyCode===y.DELETE)&&!e(o),V=o=>(o.key?o.key==="Delete":o.keyCode===y.DELETE)&&a(o,!1,!1,!0),Q=o=>(o.key?o.key==="Insert":o.keyCode===y.DELETE)&&a(o,!1,!1,!0),X=o=>(o.key?o.key==="Insert":o.keyCode===y.DELETE)&&a(o,!0,!1,!1),J=o=>(o.key?o.key==="PageUp":o.keyCode===y.PAGE_UP)&&!e(o),Y=o=>(o.key?o.key==="PageDown":o.keyCode===y.PAGE_DOWN)&&!e(o),Z=o=>(o.key?o.key==="PageUp":o.keyCode===y.PAGE_UP)&&a(o,!1,!1,!0),j=o=>(o.key?o.key==="PageUp":o.keyCode===y.PAGE_UP)&&a(o,!1,!0,!1),q=o=>(o.key?o.key==="PageDown":o.keyCode===y.PAGE_DOWN)&&a(o,!1,!1,!0),z=o=>(o.key?o.key==="PageDown":o.keyCode===y.PAGE_DOWN)&&a(o,!1,!0,!1),$=o=>(o.key?o.key==="PageUp":o.keyCode===y.PAGE_UP)&&a(o,!0,!1,!0),v=o=>(o.key?o.key==="PageDown":o.keyCode===y.PAGE_DOWN)&&a(o,!0,!1,!0),oo=o=>(o.key?o.key==="+":o.keyCode===y.PLUS)||o.keyCode===y.NUMPAD_PLUS&&!e(o),yo=o=>(o.key?o.key==="-":o.keyCode===y.MINUS)||o.keyCode===y.NUMPAD_MINUS&&!e(o),ao=o=>o.key?s(o)||bo(o):o.keyCode===y.F4&&!e(o)||o.keyCode===y.ARROW_DOWN&&a(o,!1,!0,!1),eo=o=>o.key==="F2"&&!e(o),s=o=>o.key==="F4"&&!e(o),so=o=>(o.key?o.key==="F4":o.keyCode===y.F4)&&a(o,!1,!1,!0),ko=o=>(o.key?o.key==="F10":o.keyCode===y.F10)&&a(o,!1,!1,!0),ro=o=>(o.key?o.key==="F6":o.keyCode===y.F6)&&a(o,!1,!1,!1)||(o.key?o.key==="ArrowDown"||o.key==="Down":o.keyCode===y.ARROW_DOWN)&&a(o,!0,!0,!1),lo=o=>(o.key?o.key==="F6":o.keyCode===y.F6)&&a(o,!1,!1,!0)||(o.key?o.key==="ArrowUp"||o.key==="Up":o.keyCode===y.ARROW_UP)&&a(o,!0,!0,!1),Eo=o=>(o.key?o.key==="F7":o.keyCode===y.F7)&&!e(o),bo=o=>(o.key==="ArrowDown"||o.key==="Down"||o.key==="ArrowUp"||o.key==="Up")&&a(o,!1,!0,!1),fo=o=>o.key==="Shift"||o.keyCode===y.SHIFT,io=o=>(o.key==="A"||o.key==="a"||o.which===y.A)&&a(o,!0,!1,!1),Ao=o=>(o.key==="V"||o.key==="v"||o.which===y.V)&&a(o,!0,!1,!1),Co=o=>(o.key==="A"||o.key==="a"||o.which===y.A)&&a(o,!1,!1,!1),Ko=o=>(o.key==="P"||o.key==="p"||o.which===y.P)&&a(o,!1,!1,!1),e=o=>o.shiftKey||o.altKey||k(o),k=o=>!!(o.metaKey||o.ctrlKey),a=(o,r,l,E)=>o.shiftKey===E&&o.altKey===l&&k(o)===r,co=o=>(o.key?"0123456789".indexOf(o.key)!==-1:o.keyCode>=y.DIGIT_0&&o.keyCode<=y.DIGIT_9)&&a(o,!1,!1,!1),Do=o=>(o.key?o.key===":":o.keyCode===y.COLON)&&a(o,!1,!1,!0);export{b as isEnter,d as isEnterShift,f as isSpace,i as isSpaceShift,A as isSpaceCtrl,C as isLeft,K as isRight,c as isUp,D as isDown,P as isLeftCtrl,R as isRightCtrl,_ as isUpCtrl,U as isDownCtrl,S as isUpShift,O as isDownShift,u as isUpAlt,N as isDownAlt,w as isLeftShift,t as isRightShift,T as isLeftShiftCtrl,h as isRightShiftCtrl,I as isUpShiftCtrl,L as isDownShiftCtrl,p as isHome,F as isEnd,oo as isPlus,yo as isMinus,W as isHomeCtrl,G as isEndCtrl,M as isHomeShift,g as isEndShift,n as isEscape,H as isTabNext,B as isTabPrevious,m as isBackSpace,x as isDelete,ao as isShow,eo as isF2,s as isF4,so as isF4Shift,ko as isF10Shift,lo as isF6Previous,ro as isF6Next,Eo as isF7,J as isPageUp,Y as isPageDown,Z as isPageUpShift,j as isPageUpAlt,q as isPageDownShift,z as isPageDownAlt,$ as isPageUpShiftCtrl,v as isPageDownShiftCtrl,fo as isShift,io as isCtrlA,Ao as isCtrlV,Co as isKeyA,Ko as isKeyP,V as isDeleteShift,Q as isInsertShift,X as isInsertCtrl,co as isNumber,Do as isColon};
|
|
2
|
+
//# sourceMappingURL=Keys.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Keys.ts"],
|
|
4
|
+
"sourcesContent": ["const KeyCodes = {\n\tBACKSPACE: 8,\n\tTAB: 9,\n\tENTER: 13,\n\tSHIFT: 16,\n\tCONTROL: 17,\n\tALT: 18,\n\tBREAK: 19,\n\tCAPS_LOCK: 20,\n\tESCAPE: 27,\n\tSPACE: 32,\n\tPAGE_UP: 33,\n\tPAGE_DOWN: 34,\n\tEND: 35,\n\tHOME: 36,\n\tARROW_LEFT: 37,\n\tARROW_UP: 38,\n\tARROW_RIGHT: 39,\n\tARROW_DOWN: 40,\n\tPRINT: 44,\n\tINSERT: 45,\n\tDELETE: 46,\n\tDIGIT_0: 48,\n\tDIGIT_1: 49,\n\tDIGIT_2: 50,\n\tDIGIT_3: 51,\n\tDIGIT_4: 52,\n\tDIGIT_5: 53,\n\tDIGIT_6: 54,\n\tDIGIT_7: 55,\n\tDIGIT_8: 56,\n\tDIGIT_9: 57,\n\tA: 65,\n\tB: 66,\n\tC: 67,\n\tD: 68,\n\tE: 69,\n\tF: 70,\n\tG: 71,\n\tH: 72,\n\tI: 73,\n\tJ: 74,\n\tK: 75,\n\tL: 76,\n\tM: 77,\n\tN: 78,\n\tO: 79,\n\tP: 80,\n\tQ: 81,\n\tR: 82,\n\tS: 83,\n\tT: 84,\n\tU: 85,\n\tV: 86,\n\tW: 87,\n\tX: 88,\n\tY: 89,\n\tZ: 90,\n\tWINDOWS: 91,\n\tCONTEXT_MENU: 93,\n\tTURN_OFF: 94,\n\tSLEEP: 95,\n\tNUMPAD_0: 96,\n\tNUMPAD_1: 97,\n\tNUMPAD_2: 98,\n\tNUMPAD_3: 99,\n\tNUMPAD_4: 100,\n\tNUMPAD_5: 101,\n\tNUMPAD_6: 102,\n\tNUMPAD_7: 103,\n\tNUMPAD_8: 104,\n\tNUMPAD_9: 105,\n\tNUMPAD_ASTERISK: 106,\n\tNUMPAD_PLUS: 107,\n\tNUMPAD_MINUS: 109,\n\tNUMPAD_COMMA: 110,\n\tNUMPAD_SLASH: 111,\n\tF1: 112,\n\tF2: 113,\n\tF3: 114,\n\tF4: 115,\n\tF5: 116,\n\tF6: 117,\n\tF7: 118,\n\tF8: 119,\n\tF9: 120,\n\tF10: 121,\n\tF11: 122,\n\tF12: 123,\n\tNUM_LOCK: 144,\n\tSCROLL_LOCK: 145,\n\tCOLON: 186,\n\tPLUS: 187,\n\tCOMMA: 188,\n\tSLASH: 189,\n\tDOT: 190,\n\tPIPE: 191,\n\tSEMICOLON: 192,\n\tMINUS: 219,\n\tGREAT_ACCENT: 220,\n\tEQUALS: 221,\n\tSINGLE_QUOTE: 222,\n\tBACKSLASH: 226,\n} as const;\ntype KeyCodes = typeof KeyCodes[keyof typeof KeyCodes];\n\nconst isEnter = (event: KeyboardEvent): boolean => (event.key ? event.key === \"Enter\" : event.keyCode === KeyCodes.ENTER) && !hasModifierKeys(event);\n\nconst isEnterShift = (event: KeyboardEvent): boolean => (event.key ? event.key === \"Enter\" : event.keyCode === KeyCodes.ENTER) && checkModifierKeys(event, false, false, true);\n\nconst isSpace = (event: KeyboardEvent): boolean => (event.key ? (event.key === \"Spacebar\" || event.key === \" \") : event.keyCode === KeyCodes.SPACE) && !hasModifierKeys(event);\n\nconst isSpaceShift = (event: KeyboardEvent): boolean => (event.key ? (event.key === \"Spacebar\" || event.key === \" \") : event.keyCode === KeyCodes.SPACE) && checkModifierKeys(event, false, false, true);\n\nconst isSpaceCtrl = (event: KeyboardEvent): boolean => (event.key ? (event.key === \"Spacebar\" || event.key === \" \") : event.keyCode === KeyCodes.SPACE) && checkModifierKeys(event, true, false, false);\n\nconst isLeft = (event: KeyboardEvent): boolean => (event.key ? (event.key === \"ArrowLeft\" || event.key === \"Left\") : event.keyCode === KeyCodes.ARROW_LEFT) && !hasModifierKeys(event);\n\nconst isRight = (event: KeyboardEvent): boolean => (event.key ? (event.key === \"ArrowRight\" || event.key === \"Right\") : event.keyCode === KeyCodes.ARROW_RIGHT) && !hasModifierKeys(event);\n\nconst isUp = (event: KeyboardEvent): boolean => (event.key ? (event.key === \"ArrowUp\" || event.key === \"Up\") : event.keyCode === KeyCodes.ARROW_UP) && !hasModifierKeys(event);\n\nconst isDown = (event: KeyboardEvent): boolean => (event.key ? (event.key === \"ArrowDown\" || event.key === \"Down\") : event.keyCode === KeyCodes.ARROW_DOWN) && !hasModifierKeys(event);\n\nconst isLeftCtrl = (event: KeyboardEvent): boolean => (event.key ? (event.key === \"ArrowLeft\" || event.key === \"Left\") : event.keyCode === KeyCodes.ARROW_LEFT) && checkModifierKeys(event, true, false, false);\n\nconst isRightCtrl = (event: KeyboardEvent): boolean => (event.key ? (event.key === \"ArrowRight\" || event.key === \"Right\") : event.keyCode === KeyCodes.ARROW_RIGHT) && checkModifierKeys(event, true, false, false);\n\nconst isUpCtrl = (event: KeyboardEvent): boolean => (event.key ? (event.key === \"ArrowUp\" || event.key === \"Up\") : event.keyCode === KeyCodes.ARROW_UP) && checkModifierKeys(event, true, false, false);\n\nconst isDownCtrl = (event: KeyboardEvent): boolean => (event.key ? (event.key === \"ArrowDown\" || event.key === \"Down\") : event.keyCode === KeyCodes.ARROW_DOWN) && checkModifierKeys(event, true, false, false);\n\nconst isUpShift = (event: KeyboardEvent): boolean => (event.key ? (event.key === \"ArrowUp\" || event.key === \"Up\") : event.keyCode === KeyCodes.ARROW_UP) && checkModifierKeys(event, false, false, true);\n\nconst isDownShift = (event: KeyboardEvent): boolean => (event.key ? (event.key === \"ArrowDown\" || event.key === \"Down\") : event.keyCode === KeyCodes.ARROW_DOWN) && checkModifierKeys(event, false, false, true);\n\nconst isUpAlt = (event: KeyboardEvent): boolean => (event.key ? (event.key === \"ArrowUp\" || event.key === \"Up\") : event.keyCode === KeyCodes.ARROW_UP) && checkModifierKeys(event, false, true, false);\n\nconst isDownAlt = (event: KeyboardEvent): boolean => (event.key ? (event.key === \"ArrowDown\" || event.key === \"Down\") : event.keyCode === KeyCodes.ARROW_DOWN) && checkModifierKeys(event, false, true, false);\n\nconst isLeftShift = (event: KeyboardEvent): boolean => (event.key ? (event.key === \"ArrowLeft\" || event.key === \"Left\") : event.keyCode === KeyCodes.ARROW_LEFT) && checkModifierKeys(event, false, false, true);\n\nconst isRightShift = (event: KeyboardEvent): boolean => (event.key ? (event.key === \"ArrowRight\" || event.key === \"Right\") : event.keyCode === KeyCodes.ARROW_RIGHT) && checkModifierKeys(event, false, false, true);\n\nconst isLeftShiftCtrl = (event: KeyboardEvent): boolean => (event.key ? (event.key === \"ArrowLeft\" || event.key === \"Left\") : event.keyCode === KeyCodes.ARROW_LEFT) && checkModifierKeys(event, true, false, true);\n\nconst isRightShiftCtrl = (event: KeyboardEvent): boolean => (event.key ? (event.key === \"ArrowRight\" || event.key === \"Right\") : event.keyCode === KeyCodes.ARROW_RIGHT) && checkModifierKeys(event, true, false, true);\n\nconst isUpShiftCtrl = (event: KeyboardEvent): boolean => (event.key ? (event.key === \"ArrowUp\" || event.key === \"Up\") : event.keyCode === KeyCodes.ARROW_UP) && checkModifierKeys(event, true, false, true);\n\nconst isDownShiftCtrl = (event: KeyboardEvent): boolean => (event.key ? (event.key === \"ArrowDown\" || event.key === \"Down\") : event.keyCode === KeyCodes.ARROW_DOWN) && checkModifierKeys(event, true, false, true);\n\nconst isHome = (event: KeyboardEvent): boolean => (event.key ? event.key === \"Home\" : event.keyCode === KeyCodes.HOME) && !hasModifierKeys(event);\n\nconst isEnd = (event: KeyboardEvent): boolean => (event.key ? event.key === \"End\" : event.keyCode === KeyCodes.END) && !hasModifierKeys(event);\n\nconst isHomeCtrl = (event: KeyboardEvent): boolean => (event.key ? event.key === \"Home\" : event.keyCode === KeyCodes.HOME) && checkModifierKeys(event, true, false, false);\n\nconst isHomeShift = (event: KeyboardEvent): boolean => (event.key ? event.key === \"Home\" : event.keyCode === KeyCodes.HOME) && checkModifierKeys(event, false, false, true);\n\nconst isEndCtrl = (event: KeyboardEvent): boolean => (event.key ? event.key === \"End\" : event.keyCode === KeyCodes.END) && checkModifierKeys(event, true, false, false);\n\nconst isEndShift = (event: KeyboardEvent): boolean => (event.key ? event.key === \"End\" : event.keyCode === KeyCodes.END) && checkModifierKeys(event, false, false, true);\n\nconst isEscape = (event: KeyboardEvent): boolean => (event.key ? event.key === \"Escape\" || event.key === \"Esc\" : event.keyCode === KeyCodes.ESCAPE) && !hasModifierKeys(event);\n\nconst isTabNext = (event: KeyboardEvent): boolean => (event.key ? event.key === \"Tab\" : event.keyCode === KeyCodes.TAB) && !hasModifierKeys(event);\n\nconst isTabPrevious = (event: KeyboardEvent): boolean => (event.key ? event.key === \"Tab\" : event.keyCode === KeyCodes.TAB) && checkModifierKeys(event, /* Ctrl */ false, /* Alt */ false, /* Shift */ true);\n\nconst isBackSpace = (event: KeyboardEvent): boolean => (event.key ? event.key === \"Backspace\" : event.keyCode === KeyCodes.BACKSPACE) && !hasModifierKeys(event);\n\nconst isDelete = (event: KeyboardEvent): boolean => (event.key ? event.key === \"Delete\" : event.keyCode === KeyCodes.DELETE) && !hasModifierKeys(event);\n\nconst isDeleteShift = (event: KeyboardEvent): boolean => (event.key ? event.key === \"Delete\" : event.keyCode === KeyCodes.DELETE) && checkModifierKeys(event, false, false, true);\n\nconst isInsertShift = (event: KeyboardEvent): boolean => (event.key ? event.key === \"Insert\" : event.keyCode === KeyCodes.DELETE) && checkModifierKeys(event, false, false, true);\n\nconst isInsertCtrl = (event: KeyboardEvent): boolean => (event.key ? event.key === \"Insert\" : event.keyCode === KeyCodes.DELETE) && checkModifierKeys(event, true, false, false);\n\nconst isPageUp = (event: KeyboardEvent): boolean => (event.key ? event.key === \"PageUp\" : event.keyCode === KeyCodes.PAGE_UP) && !hasModifierKeys(event);\n\nconst isPageDown = (event: KeyboardEvent): boolean => (event.key ? event.key === \"PageDown\" : event.keyCode === KeyCodes.PAGE_DOWN) && !hasModifierKeys(event);\n\nconst isPageUpShift = (event: KeyboardEvent): boolean => (event.key ? event.key === \"PageUp\" : event.keyCode === KeyCodes.PAGE_UP) && checkModifierKeys(event, false, false, true);\n\nconst isPageUpAlt = (event: KeyboardEvent): boolean => (event.key ? event.key === \"PageUp\" : event.keyCode === KeyCodes.PAGE_UP) && checkModifierKeys(event, false, true, false);\n\nconst isPageDownShift = (event: KeyboardEvent): boolean => (event.key ? event.key === \"PageDown\" : event.keyCode === KeyCodes.PAGE_DOWN) && checkModifierKeys(event, false, false, true);\n\nconst isPageDownAlt = (event: KeyboardEvent): boolean => (event.key ? event.key === \"PageDown\" : event.keyCode === KeyCodes.PAGE_DOWN) && checkModifierKeys(event, false, true, false);\n\nconst isPageUpShiftCtrl = (event: KeyboardEvent): boolean => (event.key ? event.key === \"PageUp\" : event.keyCode === KeyCodes.PAGE_UP) && checkModifierKeys(event, true, false, true);\n\nconst isPageDownShiftCtrl = (event: KeyboardEvent): boolean => (event.key ? event.key === \"PageDown\" : event.keyCode === KeyCodes.PAGE_DOWN) && checkModifierKeys(event, true, false, true);\n\nconst isPlus = (event: KeyboardEvent): boolean => (event.key ? event.key === \"+\" : event.keyCode === KeyCodes.PLUS) || (event.keyCode === KeyCodes.NUMPAD_PLUS && !hasModifierKeys(event));\n\nconst isMinus = (event: KeyboardEvent): boolean => (event.key ? event.key === \"-\" : event.keyCode === KeyCodes.MINUS) || (event.keyCode === KeyCodes.NUMPAD_MINUS && !hasModifierKeys(event));\n\nconst isShow = (event: KeyboardEvent): boolean => {\n\tif (event.key) {\n\t\treturn isF4(event) || isShowByArrows(event);\n\t}\n\n\treturn (event.keyCode === KeyCodes.F4 && !hasModifierKeys(event)) || (event.keyCode === KeyCodes.ARROW_DOWN && checkModifierKeys(event, /* Ctrl */ false, /* Alt */ true, /* Shift */ false));\n};\n\nconst isF2 = (event: KeyboardEvent): boolean => {\n\treturn event.key === \"F2\" && !hasModifierKeys(event);\n};\n\nconst isF4 = (event: KeyboardEvent): boolean => {\n\treturn event.key === \"F4\" && !hasModifierKeys(event);\n};\n\nconst isF4Shift = (event: KeyboardEvent): boolean => (event.key ? event.key === \"F4\" : event.keyCode === KeyCodes.F4) && checkModifierKeys(event, false, false, true);\n\nconst isF10Shift = (event: KeyboardEvent): boolean => (event.key ? event.key === \"F10\" : event.keyCode === KeyCodes.F10) && checkModifierKeys(event, false, false, true);\n\nconst isF6Next = (event: KeyboardEvent): boolean => ((event.key ? event.key === \"F6\" : event.keyCode === KeyCodes.F6) && checkModifierKeys(event, false, false, false))\n\t|| ((event.key ? (event.key === \"ArrowDown\" || event.key === \"Down\") : event.keyCode === KeyCodes.ARROW_DOWN) && checkModifierKeys(event, true, true, false));\n\nconst isF6Previous = (event: KeyboardEvent): boolean => ((event.key ? event.key === \"F6\" : event.keyCode === KeyCodes.F6) && checkModifierKeys(event, false, false, true))\n\t|| ((event.key ? (event.key === \"ArrowUp\" || event.key === \"Up\") : event.keyCode === KeyCodes.ARROW_UP) && checkModifierKeys(event, true, true, false));\n\nconst isF7 = (event: KeyboardEvent): boolean => (event.key ? event.key === \"F7\" : event.keyCode === KeyCodes.F7) && !hasModifierKeys(event);\n\nconst isShowByArrows = (event: KeyboardEvent): boolean => {\n\treturn ((event.key === \"ArrowDown\" || event.key === \"Down\") || (event.key === \"ArrowUp\" || event.key === \"Up\")) && checkModifierKeys(event, /* Ctrl */ false, /* Alt */ true, /* Shift */ false);\n};\n\nconst isShift = (event: KeyboardEvent): boolean => event.key === \"Shift\" || event.keyCode === KeyCodes.SHIFT;\n\nconst isCtrlA = (event: KeyboardEvent): boolean => ((event.key === \"A\" || event.key === \"a\") || event.which === KeyCodes.A) && checkModifierKeys(event, true, false, false);\n\nconst isCtrlV = (event: KeyboardEvent): boolean => ((event.key === \"V\" || event.key === \"v\") || event.which === KeyCodes.V) && checkModifierKeys(event, true, false, false);\n\nconst isKeyA = (event: KeyboardEvent): boolean => ((event.key === \"A\" || event.key === \"a\") || event.which === KeyCodes.A) && checkModifierKeys(event, false, false, false);\n\nconst isKeyP = (event: KeyboardEvent): boolean => ((event.key === \"P\" || event.key === \"p\") || event.which === KeyCodes.P) && checkModifierKeys(event, false, false, false);\n\nconst hasModifierKeys = (event: KeyboardEvent): boolean => event.shiftKey || event.altKey || getCtrlKey(event);\n\nconst getCtrlKey = (event: KeyboardEvent): boolean => !!(event.metaKey || event.ctrlKey); // double negation doesn't have effect on boolean but ensures null and undefined are equivalent to false.\n\nconst checkModifierKeys = (event: KeyboardEvent, bCtrlKey: boolean, bAltKey: boolean, bShiftKey: boolean):boolean => event.shiftKey === bShiftKey && event.altKey === bAltKey && getCtrlKey(event) === bCtrlKey;\n\nconst isNumber = (event: KeyboardEvent): boolean => ((event.key ? \"0123456789\".indexOf(event.key) !== -1 : event.keyCode >= KeyCodes.DIGIT_0 && event.keyCode <= KeyCodes.DIGIT_9) && checkModifierKeys(event, false, false, false));\n\nconst isColon = (event: KeyboardEvent): boolean => ((event.key ? event.key === \":\" : event.keyCode === KeyCodes.COLON) && checkModifierKeys(event, false, false, true));\n\nexport {\n\tisEnter,\n\tisEnterShift,\n\tisSpace,\n\tisSpaceShift,\n\tisSpaceCtrl,\n\tisLeft,\n\tisRight,\n\tisUp,\n\tisDown,\n\tisLeftCtrl,\n\tisRightCtrl,\n\tisUpCtrl,\n\tisDownCtrl,\n\tisUpShift,\n\tisDownShift,\n\tisUpAlt,\n\tisDownAlt,\n\tisLeftShift,\n\tisRightShift,\n\tisLeftShiftCtrl,\n\tisRightShiftCtrl,\n\tisUpShiftCtrl,\n\tisDownShiftCtrl,\n\tisHome,\n\tisEnd,\n\tisPlus,\n\tisMinus,\n\tisHomeCtrl,\n\tisEndCtrl,\n\tisHomeShift,\n\tisEndShift,\n\tisEscape,\n\tisTabNext,\n\tisTabPrevious,\n\tisBackSpace,\n\tisDelete,\n\tisShow,\n\tisF2,\n\tisF4,\n\tisF4Shift,\n\tisF10Shift,\n\tisF6Previous,\n\tisF6Next,\n\tisF7,\n\tisPageUp,\n\tisPageDown,\n\tisPageUpShift,\n\tisPageUpAlt,\n\tisPageDownShift,\n\tisPageDownAlt,\n\tisPageUpShiftCtrl,\n\tisPageDownShiftCtrl,\n\tisShift,\n\tisCtrlA,\n\tisCtrlV,\n\tisKeyA,\n\tisKeyP,\n\tisDeleteShift,\n\tisInsertShift,\n\tisInsertCtrl,\n\tisNumber,\n\tisColon,\n};\n"],
|
|
5
|
+
"mappings": "aAAA,MAAMA,EAAW,CAChB,UAAW,EACX,IAAK,EACL,MAAO,GACP,MAAO,GACP,QAAS,GACT,IAAK,GACL,MAAO,GACP,UAAW,GACX,OAAQ,GACR,MAAO,GACP,QAAS,GACT,UAAW,GACX,IAAK,GACL,KAAM,GACN,WAAY,GACZ,SAAU,GACV,YAAa,GACb,WAAY,GACZ,MAAO,GACP,OAAQ,GACR,OAAQ,GACR,QAAS,GACT,QAAS,GACT,QAAS,GACT,QAAS,GACT,QAAS,GACT,QAAS,GACT,QAAS,GACT,QAAS,GACT,QAAS,GACT,QAAS,GACT,EAAG,GACH,EAAG,GACH,EAAG,GACH,EAAG,GACH,EAAG,GACH,EAAG,GACH,EAAG,GACH,EAAG,GACH,EAAG,GACH,EAAG,GACH,EAAG,GACH,EAAG,GACH,EAAG,GACH,EAAG,GACH,EAAG,GACH,EAAG,GACH,EAAG,GACH,EAAG,GACH,EAAG,GACH,EAAG,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IAAM,GAAKA,EAAM,SAAWF,EAAS,SAAWE,EAAM,SAAWF,EAAS,UAAYK,EAAkBH,EAAO,GAAO,GAAO,EAAK,EAE5NoE,GAAWpE,IAAoCA,EAAM,IAAMA,EAAM,MAAQ,IAAMA,EAAM,UAAYF,EAAS,QAAUK,EAAkBH,EAAO,GAAO,GAAO,EAAI,EAErK,OACCD,KAAA,QACAG,KAAA,aACAE,KAAA,QACAC,KAAA,aACAC,KAAA,YACAC,KAAA,OACAC,KAAA,QACAC,KAAA,KACAC,KAAA,OACAC,KAAA,WACAC,KAAA,YACAC,KAAA,SACAC,KAAA,WACAC,KAAA,UACAC,KAAA,YACAC,KAAA,QACAC,KAAA,UACAC,KAAA,YACAC,KAAA,aACAC,KAAA,gBACAC,KAAA,iBACAC,KAAA,cACAC,KAAA,gBACAC,KAAA,OACAC,KAAA,MACAqB,MAAA,OACAC,MAAA,QACArB,KAAA,WACAE,KAAA,UACAD,KAAA,YACAE,KAAA,WACAC,KAAA,SACAC,KAAA,UACAC,KAAA,cACAC,KAAA,YACAC,KAAA,SACAc,MAAA,OACAG,MAAA,KACAF,KAAA,KACAG,MAAA,UACAC,MAAA,WACAE,MAAA,aACAD,MAAA,SACAE,MAAA,KACAlB,KAAA,SACAC,KAAA,WACAC,KAAA,cACAC,KAAA,YACAC,KAAA,gBACAC,KAAA,cACAC,KAAA,kBACAC,KAAA,oBACAY,MAAA,QACAC,MAAA,QACAC,MAAA,QACAC,MAAA,OACAC,MAAA,OACA1B,KAAA,cACAC,KAAA,cACAC,KAAA,aACA6B,MAAA,SACAC,MAAA",
|
|
6
|
+
"names": ["KeyCodes", "isEnter", "event", "hasModifierKeys", "isEnterShift", "checkModifierKeys", "isSpace", "isSpaceShift", "isSpaceCtrl", "isLeft", "isRight", "isUp", "isDown", "isLeftCtrl", "isRightCtrl", "isUpCtrl", "isDownCtrl", "isUpShift", "isDownShift", "isUpAlt", "isDownAlt", "isLeftShift", "isRightShift", "isLeftShiftCtrl", "isRightShiftCtrl", "isUpShiftCtrl", "isDownShiftCtrl", "isHome", "isEnd", "isHomeCtrl", "isHomeShift", "isEndCtrl", "isEndShift", "isEscape", "isTabNext", "isTabPrevious", "isBackSpace", "isDelete", "isDeleteShift", "isInsertShift", "isInsertCtrl", "isPageUp", "isPageDown", "isPageUpShift", "isPageUpAlt", "isPageDownShift", "isPageDownAlt", "isPageUpShiftCtrl", "isPageDownShiftCtrl", "isPlus", "isMinus", "isShow", "isF4", "isShowByArrows", "isF2", "isF4Shift", "isF10Shift", "isF6Next", "isF6Previous", "isF7", "isShift", "isCtrlA", "isCtrlV", "isKeyA", "isKeyP", "getCtrlKey", "bCtrlKey", "bAltKey", "bShiftKey", "isNumber", "isColon"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";import{getCurrentRuntimeIndex as a,compareRuntimes as g}from"./Runtimes.js";const l=typeof document>"u",o=(e,t)=>t?`${e}|${t}`:e,f=e=>e===void 0?!0:g(a(),parseInt(e))===1,u=(e,t,n="",i)=>{const s=typeof e=="string"?e:e.content,c=a(),r=new CSSStyleSheet;r.replaceSync(s),r._ui5StyleId=o(t,n),i&&(r._ui5RuntimeIndex=c,r._ui5Theme=i),document.adoptedStyleSheets=[...document.adoptedStyleSheets,r]},S=(e,t,n="",i)=>{const s=typeof e=="string"?e:e.content,c=a(),r=document.adoptedStyleSheets.find(d=>d._ui5StyleId===o(t,n));if(r)if(!i)r.replaceSync(s||"");else{const d=r._ui5RuntimeIndex;(r._ui5Theme!==i||f(d))&&(r.replaceSync(s||""),r._ui5RuntimeIndex=String(c),r._ui5Theme=i)}},y=(e,t="")=>l?!0:!!document.adoptedStyleSheets.find(n=>n._ui5StyleId===o(e,t)),p=(e,t="")=>{document.adoptedStyleSheets=document.adoptedStyleSheets.filter(n=>n._ui5StyleId!==o(e,t))},m=(e,t,n="",i)=>{y(t,n)?S(e,t,n,i):u(e,t,n,i)},R=(e,t)=>{if(e===void 0)return t;if(t===void 0)return e;const n=typeof t=="string"?t:t.content;return typeof e=="string"?`${e} ${n}`:{content:`${e.content} ${n}`,packageName:e.packageName,fileName:e.fileName}};export{u as createStyle,y as hasStyle,S as updateStyle,p as removeStyle,m as createOrUpdateStyle,R as mergeStyles};
|
|
2
|
+
//# sourceMappingURL=ManagedStyles.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/ManagedStyles.ts"],
|
|
4
|
+
"sourcesContent": ["import { StyleData, StyleDataCSP } from \"./types.js\";\nimport { getCurrentRuntimeIndex, compareRuntimes } from \"./Runtimes.js\";\n\nconst isSSR = typeof document === \"undefined\";\n\nconst getStyleId = (name: string, value: string) => {\n\treturn value ? `${name}|${value}` : name;\n};\n\nconst shouldUpdate = (runtimeIndex: string | undefined) => {\n\tif (runtimeIndex === undefined) {\n\t\treturn true;\n\t}\n\treturn compareRuntimes(getCurrentRuntimeIndex(), parseInt(runtimeIndex)) === 1; // 1 means the current is newer, 0 means the same, -1 means the resource's runtime is newer\n};\n\nconst createStyle = (data: StyleData, name: string, value = \"\", theme?: string) => {\n\tconst content = typeof data === \"string\" ? data : data.content;\n\tconst currentRuntimeIndex = getCurrentRuntimeIndex();\n\n\tconst stylesheet = new CSSStyleSheet();\n\tstylesheet.replaceSync(content);\n\t(stylesheet as Record<string, any>)._ui5StyleId = getStyleId(name, value); // set an id so that we can find the style later\n\tif (theme) {\n\t\t(stylesheet as Record<string, any>)._ui5RuntimeIndex = currentRuntimeIndex;\n\t\t(stylesheet as Record<string, any>)._ui5Theme = theme;\n\t}\n\tdocument.adoptedStyleSheets = [...document.adoptedStyleSheets, stylesheet];\n};\n\nconst updateStyle = (data: StyleData, name: string, value = \"\", theme?: string) => {\n\tconst content = typeof data === \"string\" ? data : data.content;\n\tconst currentRuntimeIndex = getCurrentRuntimeIndex();\n\n\tconst stylesheet = document.adoptedStyleSheets.find(sh => (sh as Record<string, any>)._ui5StyleId === getStyleId(name, value));\n\tif (!stylesheet) {\n\t\treturn;\n\t}\n\n\tif (!theme) {\n\t\tstylesheet.replaceSync(content || \"\");\n\t} else {\n\t\tconst stylesheetRuntimeIndex: string | undefined = (stylesheet as Record<string, any>)._ui5RuntimeIndex;\n\t\tconst stylesheetTheme: string | undefined = (stylesheet as Record<string, any>)._ui5Theme;\n\t\tif (stylesheetTheme !== theme || shouldUpdate(stylesheetRuntimeIndex)) {\n\t\t\tstylesheet.replaceSync(content || \"\");\n\t\t\t(stylesheet as Record<string, any>)._ui5RuntimeIndex = String(currentRuntimeIndex);\n\t\t\t(stylesheet as Record<string, any>)._ui5Theme = theme;\n\t\t}\n\t}\n};\n\nconst hasStyle = (name: string, value = \"\"): boolean => {\n\tif (isSSR) {\n\t\treturn true;\n\t}\n\n\treturn !!document.adoptedStyleSheets.find(sh => (sh as Record<string, any>)._ui5StyleId === getStyleId(name, value));\n};\n\nconst removeStyle = (name: string, value = \"\") => {\n\tdocument.adoptedStyleSheets = document.adoptedStyleSheets.filter(sh => (sh as Record<string, any>)._ui5StyleId !== getStyleId(name, value));\n};\n\nconst createOrUpdateStyle = (data: StyleData, name: string, value = \"\", theme?: string) => {\n\tif (hasStyle(name, value)) {\n\t\tupdateStyle(data, name, value, theme);\n\t} else {\n\t\tcreateStyle(data, name, value, theme);\n\t}\n};\n\nconst mergeStyles = (style1?: StyleData, style2?: StyleData) => {\n\tif (style1 === undefined) {\n\t\treturn style2;\n\t}\n\tif (style2 === undefined) {\n\t\treturn style1;\n\t}\n\tconst style2Content = typeof style2 === \"string\" ? style2 : style2.content;\n\tif (typeof style1 === \"string\") {\n\t\treturn `${style1} ${style2Content}`;\n\t}\n\treturn {\n\t\tcontent: `${style1.content} ${style2Content}`,\n\t\tpackageName: style1.packageName,\n\t\tfileName: style1.fileName,\n\t};\n};\n\nexport {\n\tcreateStyle,\n\thasStyle,\n\tupdateStyle,\n\tremoveStyle,\n\tcreateOrUpdateStyle,\n\tmergeStyles,\n};\n\nexport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,CAAK,CAAC,EAG9Ga,EAAc,CAACd,EAAcC,EAAQ,KAAO,CACjD,SAAS,mBAAqB,SAAS,mBAAmB,OAAOU,GAAOA,EAA2B,cAAgBZ,EAAWC,EAAMC,CAAK,CAAC,CAC3I,EAEMc,EAAsB,CAACV,EAAiBL,EAAcC,EAAQ,GAAIK,IAAmB,CACtFO,EAASb,EAAMC,CAAK,EACvBS,EAAYL,EAAML,EAAMC,EAAOK,CAAK,EAEpCF,EAAYC,EAAML,EAAMC,EAAOK,CAAK,CAEtC,EAEMU,EAAc,CAACC,EAAoBC,IAAuB,CAC/D,GAAID,IAAW,OACd,OAAOC,EAER,GAAIA,IAAW,OACd,OAAOD,EAER,MAAME,EAAgB,OAAOD,GAAW,SAAWA,EAASA,EAAO,QACnE,OAAI,OAAOD,GAAW,SACd,GAAGA,CAAM,IAAIE,CAAa,GAE3B,CACN,QAAS,GAAGF,EAAO,OAAO,IAAIE,CAAa,GAC3C,YAAaF,EAAO,YACpB,SAAUA,EAAO,QAClB,CACD,EAEA,OACCb,KAAA,YACAS,KAAA,SACAH,KAAA,YACAI,KAAA,YACAC,KAAA,oBACAC,KAAA",
|
|
6
|
+
"names": ["getCurrentRuntimeIndex", "compareRuntimes", "isSSR", "getStyleId", "name", "value", "shouldUpdate", "runtimeIndex", "createStyle", "data", "theme", "content", "currentRuntimeIndex", "stylesheet", "updateStyle", "sh", "stylesheetRuntimeIndex", "hasStyle", "removeStyle", "createOrUpdateStyle", "mergeStyles", "style1", "style2", "style2Content"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/MarkedEvents.ts"],
|
|
4
|
+
"sourcesContent": ["const markedEvents = new WeakMap<Event, string>();\n\n/**\n * Marks the given event with random marker.\n */\nconst markEvent = (event: Event, value: string) => {\n\tmarkedEvents.set(event, value);\n};\n\n/**\n * Returns the marker for the given event.\n */\nconst getEventMark = (event: Event): string | undefined => {\n\treturn markedEvents.get(event);\n};\n\nexport {\n\tmarkEvent,\n\tgetEventMark,\n};\n"],
|
|
5
|
+
"mappings": "aAAA,MAAMA,EAAe,IAAI,QAKnBC,EAAY,CAACC,EAAcC,IAAkB,CAClDH,EAAa,IAAIE,EAAOC,CAAK,CAC9B,EAKMC,EAAgBF,GACdF,EAAa,IAAIE,CAAK,EAG9B,OACCD,KAAA,UACAG,KAAA",
|
|
6
|
+
"names": ["markedEvents", "markEvent", "event", "value", "getEventMark"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const a=new Map,t=new Map;t.set("S",[0,599]),t.set("M",[600,1023]),t.set("L",[1024,1439]),t.set("XL",[1440,1/0]);var S=(e=>(e.RANGE_4STEPS="4Step",e))(S||{});const o=(r,e)=>{a.set(r,e)},c=(r,e=window.innerWidth)=>{let n=a.get(r);n||(n=a.get("4Step"));let g;const s=Math.floor(e);return n.forEach((R,E)=>{s>=R[0]&&s<=R[1]&&(g=E)}),g||[...n.keys()][0]},i={RANGESETS:S,initRangeSet:o,getCurrentRange:c};i.initRangeSet(i.RANGESETS.RANGE_4STEPS,t);export default i;
|
|
2
|
+
//# sourceMappingURL=MediaRange.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/MediaRange.ts"],
|
|
4
|
+
"sourcesContent": ["type Range = Map<string, Array<number>>;\n\nconst mediaRanges = new Map<string, Range>();\n\nconst DEAFULT_RANGE_SET: Range = new Map<string, Array<number>>();\nDEAFULT_RANGE_SET.set(\"S\", [0, 599]);\nDEAFULT_RANGE_SET.set(\"M\", [600, 1023]);\nDEAFULT_RANGE_SET.set(\"L\", [1024, 1439]);\nDEAFULT_RANGE_SET.set(\"XL\", [1440, Infinity]);\n\n/**\n * Enumeration containing the names and settings of predefined screen width media query range sets.\n *\n * @public\n */\n enum RANGESETS {\n\t/**\n\t * A 4-step range set (S-M-L-XL).\n\t *\n\t * The ranges of this set are:\n\t *\n\t * - `\"S\"`: For screens smaller than 600 pixels.\n\t * - `\"M\"`: For screens greater than or equal to 600 pixels and smaller than 1024 pixels.\n\t * - `\"L\"`: For screens greater than or equal to 1024 pixels and smaller than 1440 pixels.\n\t * - `\"XL\"`: For screens greater than or equal to 1440 pixels.\n\t *\n\t *\n\t * @public\n\t */\n\tRANGE_4STEPS = \"4Step\",\n}\n\n/**\n * Initializes a screen width media query range set.\n *\n * This initialization step makes the range set ready to be used for one of the other functions in namespace `MediaRange`.\n *\n * A range set can be defined as shown in the following example:\n * ```\n * MediaRange.initRangeSet(\"MyRangeSet\", [200, 400], [\"Small\", \"Medium\", \"Large\"]);\n * ```\n * This example defines the following named ranges:\n *\n * - `\"Small\"`: For screens smaller than 200 pixels.\n * - `\"Medium\"`: For screens greater than or equal to 200 pixels and smaller than 400 pixels.\n * - `\"Large\"`: For screens greater than or equal to 400 pixels.\n *\n *\n * @param name The name of the range set to be initialized.\n * The name must be a valid id and consist only of letters and numeric digits.\n * @param range The given range set.\n */\nconst initRangeSet = (name: string, range: Range) => {\n\tmediaRanges.set(name, range);\n};\n\n/**\n * Returns information about the current active range of the range set with the given name.\n *\n * If the optional parameter `width` is given, the active range will be determined for that width,\n * otherwise it is determined for the current window size.\n *\n * @param name The name of the range set. The range set must be initialized beforehand ({@link MediaRange.initRangeSet})\n * @param [width] An optional width, based on which the range should be determined;\n * If `width` is not provided, the window size will be used.\n * @returns The name of the current active interval of the range set.\n * @public\n */\nconst getCurrentRange = (name: string, width = window.innerWidth): string => {\n\tlet rangeSet = mediaRanges.get(name);\n\n\tif (!rangeSet) {\n\t\trangeSet = mediaRanges.get(RANGESETS.RANGE_4STEPS)!;\n\t}\n\n\tlet currentRangeName;\n\tconst effectiveWidth = Math.floor(width);\n\n\trangeSet.forEach((value, key) => {\n\t\tif (effectiveWidth >= value[0] && effectiveWidth <= value[1]) {\n\t\t\tcurrentRangeName = key;\n\t\t}\n\t});\n\n\treturn currentRangeName || [...rangeSet.keys()][0];\n};\n\n/**\n * API for screen width changes.\n */\nconst MediaRange = {\n\tRANGESETS,\n\tinitRangeSet,\n\tgetCurrentRange,\n};\n\nMediaRange.initRangeSet(MediaRange.RANGESETS.RANGE_4STEPS, DEAFULT_RANGE_SET);\n\nexport default MediaRange;\n"],
|
|
5
|
+
"mappings": "aAEA,MAAMA,EAAc,IAAI,IAElBC,EAA2B,IAAI,IACrCA,EAAkB,IAAI,IAAK,CAAC,EAAG,GAAG,CAAC,EACnCA,EAAkB,IAAI,IAAK,CAAC,IAAK,IAAI,CAAC,EACtCA,EAAkB,IAAI,IAAK,CAAC,KAAM,IAAI,CAAC,EACvCA,EAAkB,IAAI,KAAM,CAAC,KAAM,GAAQ,CAAC,EAO3C,IAAKC,OAcLA,EAAA,aAAe,QAdVA,OAAA,IAqCN,MAAMC,EAAe,CAACC,EAAcC,IAAiB,CACpDL,EAAY,IAAII,EAAMC,CAAK,CAC5B,EAcMC,EAAkB,CAACF,EAAcG,EAAQ,OAAO,aAAuB,CAC5E,IAAIC,EAAWR,EAAY,IAAII,CAAI,EAE9BI,IACJA,EAAWR,EAAY,IAAI,OAAsB,GAGlD,IAAIS,EACJ,MAAMC,EAAiB,KAAK,MAAMH,CAAK,EAEvC,OAAAC,EAAS,QAAQ,CAACG,EAAOC,IAAQ,CAC5BF,GAAkBC,EAAM,CAAC,GAAKD,GAAkBC,EAAM,CAAC,IAC1DF,EAAmBG,EAErB,CAAC,EAEMH,GAAoB,CAAC,GAAGD,EAAS,KAAK,CAAC,EAAE,CAAC,CAClD,EAKMK,EAAa,CAClB,UAAAX,EACA,aAAAC,EACA,gBAAAG,CACD,EAEAO,EAAW,aAAaA,EAAW,UAAU,aAAcZ,CAAiB,EAE5E,eAAeY",
|
|
6
|
+
"names": ["mediaRanges", "DEAFULT_RANGE_SET", "RANGESETS", "initRangeSet", "name", "range", "getCurrentRange", "width", "rangeSet", "currentRangeName", "effectiveWidth", "value", "key", "MediaRange"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";const g=typeof window.chrome=="object"||typeof window.v8=="object"?(i,o)=>(o>2&&40*o>i.length&&Number(i),i):i=>i,u=/(?:\r\n|\r|\n|^)[ \t\f]*/,h=/(\\u[0-9a-fA-F]{0,4})|(\\.)|(\\$)|([ \t\f]*[ \t\f:=][ \t\f]*)/g,x=/(\\u[0-9a-fA-F]{0,4})|(\\.)|(\\$)/g,m={"\\f":"\f","\\n":`
|
|
2
|
+
`,"\\r":"\r","\\t":" "},w=i=>{const o={},f=i.split(u);let n,r,c,t,l,e,s,p;const a=d=>{t?(t=`${t}${d}`,p++):(t=d,p=0)};for(l=0;l<f.length;l++)if(n=f[l],!(n===""||n.charAt(0)==="#"||n.charAt(0)==="!")){for(r=h,s=0,r.lastIndex=s,c=null,t="",e=r.exec(n);e!==null;){if(s<e.index&&a(n.slice(s,e.index)),s=r.lastIndex,e[1]){if(e[1].length!==6)throw new Error(`Incomplete Unicode Escape '${e[1]}'`);a(String.fromCharCode(parseInt(e[1].slice(2),16)))}else e[2]?a(m[e[2]]||e[2].slice(1)):e[3]?(n=f[++l],s=0,r.lastIndex=s):e[4]&&(c=t,t="",r=x,r.lastIndex=s);e=r.exec(n)}s<n.length&&a(n.slice(s)),c==null&&(c=t,t=""),o[c]=g(t,t?p:0)}return o};export default w;
|
|
3
|
+
//# sourceMappingURL=PropertiesFileFormat.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/PropertiesFileFormat.ts"],
|
|
4
|
+
"sourcesContent": ["const flatstr = typeof window.chrome === \"object\" || typeof window.v8 === \"object\" ? (s: string, iConcatOps: number) => {\n\tif (iConcatOps > 2 && 40 * iConcatOps > s.length) {\n\t\tNumber(s);\n\t}\n\treturn s;\n} : (s: string) => s;\n\nconst rLines = /(?:\\r\\n|\\r|\\n|^)[ \\t\\f]*/;\nconst rEscapesOrSeparator = /(\\\\u[0-9a-fA-F]{0,4})|(\\\\.)|(\\\\$)|([ \\t\\f]*[ \\t\\f:=][ \\t\\f]*)/g;\nconst rEscapes = /(\\\\u[0-9a-fA-F]{0,4})|(\\\\.)|(\\\\$)/g;\nconst mEscapes = {\n\t\"\\\\f\": \"\\f\",\n\t\"\\\\n\": \"\\n\",\n\t\"\\\\r\": \"\\r\",\n\t\"\\\\t\": \"\\t\",\n};\n\n/**\n * Parses a .properties format\n * @param {string} sText the contents a of a .properties file\n * @returns a object with key/value pairs parsed from the .properties file format\n * @public\n */\nconst parseProperties = (sText: string) => {\n\tconst properties = {},\n\t\taLines = sText.split(rLines);\n\n\tlet sLine,\n\t\trMatcher,\n\t\tsKey,\n\t\tsValue: string,\n\t\ti,\n\t\tm,\n\t\tiLastIndex,\n\t\tiConcatOps: number;\n\n\tconst append = (s: string) => {\n\t\tif (sValue) {\n\t\t\tsValue = `${sValue}${s}`;\n\t\t\tiConcatOps++;\n\t\t} else {\n\t\t\tsValue = s;\n\t\t\tiConcatOps = 0;\n\t\t}\n\t};\n\n\tfor (i = 0; i < aLines.length; i++) {\n\t\tsLine = aLines[i];\n\t\tconst skipLine = sLine === \"\" || sLine.charAt(0) === \"#\" || sLine.charAt(0) === \"!\";\n\n\t\tif (!skipLine) {\n\t\t\trMatcher = rEscapesOrSeparator;\n\t\t\tiLastIndex = 0;\n\t\t\trMatcher.lastIndex = iLastIndex;\n\t\t\tsKey = null;\n\t\t\tsValue = \"\";\n\t\t\tm = rMatcher.exec(sLine);\n\t\t\twhile (m !== null) {\n\t\t\t\tif (iLastIndex < m.index) {\n\t\t\t\t\tappend(sLine.slice(iLastIndex, m.index));\n\t\t\t\t}\n\t\t\t\tiLastIndex = rMatcher.lastIndex;\n\t\t\t\tif (m[1]) {\n\t\t\t\t\tif (m[1].length !== 6) {\n\t\t\t\t\t\tthrow new Error(`Incomplete Unicode Escape '${m[1]}'`);\n\t\t\t\t\t}\n\t\t\t\t\tappend(String.fromCharCode(parseInt(m[1].slice(2), 16)));\n\t\t\t\t} else if (m[2]) {\n\t\t\t\t\tappend(mEscapes[m[2] as keyof typeof mEscapes] || m[2].slice(1));\n\t\t\t\t} else if (m[3]) {\n\t\t\t\t\tsLine = aLines[++i];\n\t\t\t\t\tiLastIndex = 0;\n\t\t\t\t\trMatcher.lastIndex = iLastIndex;\n\t\t\t\t} else if (m[4]) {\n\t\t\t\t\tsKey = sValue;\n\t\t\t\t\tsValue = \"\";\n\t\t\t\t\trMatcher = rEscapes;\n\t\t\t\t\trMatcher.lastIndex = iLastIndex;\n\t\t\t\t}\n\t\t\t\tm = rMatcher.exec(sLine);\n\t\t\t}\n\t\t\tif (iLastIndex < sLine.length) {\n\t\t\t\tappend(sLine.slice(iLastIndex));\n\t\t\t}\n\t\t\tif (sKey == null) {\n\t\t\t\tsKey = sValue;\n\t\t\t\tsValue = \"\";\n\t\t\t}\n\t\t\t(properties as Record<string, any>)[sKey] = flatstr(sValue, sValue ? iConcatOps! : 0);\n\t\t}\n\t}\n\treturn properties;\n};\n\nexport default parseProperties;\n"],
|
|
5
|
+
"mappings": "aAAA,MAAMA,EAAU,OAAO,OAAO,QAAW,UAAY,OAAO,OAAO,IAAO,SAAW,CAACC,EAAWC,KAC5FA,EAAa,GAAK,GAAKA,EAAaD,EAAE,QACzC,OAAOA,CAAC,EAEFA,GACHA,GAAcA,EAEbE,EAAS,2BACTC,EAAsB,iEACtBC,EAAW,qCACXC,EAAW,CAChB,MAAO,KACP,MAAO;AAAA,EACP,MAAO,KACP,MAAO,GACR,EAQMC,EAAmBC,GAAkB,CAC1C,MAAMC,EAAa,CAAC,EACnBC,EAASF,EAAM,MAAML,CAAM,EAE5B,IAAIQ,EACHC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAf,EAED,MAAMgB,EAAUjB,GAAc,CACzBa,GACHA,EAAS,GAAGA,CAAM,GAAGb,CAAC,GACtBC,MAEAY,EAASb,EACTC,EAAa,EAEf,EAEA,IAAKa,EAAI,EAAGA,EAAIL,EAAO,OAAQK,IAI9B,GAHAJ,EAAQD,EAAOK,CAAC,EAGZ,EAFaJ,IAAU,IAAMA,EAAM,OAAO,CAAC,IAAM,KAAOA,EAAM,OAAO,CAAC,IAAM,KAEjE,CAOd,IANAC,EAAWR,EACXa,EAAa,EACbL,EAAS,UAAYK,EACrBJ,EAAO,KACPC,EAAS,GACTE,EAAIJ,EAAS,KAAKD,CAAK,EAChBK,IAAM,MAAM,CAKlB,GAJIC,EAAaD,EAAE,OAClBE,EAAOP,EAAM,MAAMM,EAAYD,EAAE,KAAK,CAAC,EAExCC,EAAaL,EAAS,UAClBI,EAAE,CAAC,EAAG,CACT,GAAIA,EAAE,CAAC,EAAE,SAAW,EACnB,MAAM,IAAI,MAAM,8BAA8BA,EAAE,CAAC,CAAC,GAAG,EAEtDE,EAAO,OAAO,aAAa,SAASF,EAAE,CAAC,EAAE,MAAM,CAAC,EAAG,EAAE,CAAC,CAAC,CACxD,MAAWA,EAAE,CAAC,EACbE,EAAOZ,EAASU,EAAE,CAAC,CAA0B,GAAKA,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,EACrDA,EAAE,CAAC,GACbL,EAAQD,EAAO,EAAEK,CAAC,EAClBE,EAAa,EACbL,EAAS,UAAYK,GACXD,EAAE,CAAC,IACbH,EAAOC,EACPA,EAAS,GACTF,EAAWP,EACXO,EAAS,UAAYK,GAEtBD,EAAIJ,EAAS,KAAKD,CAAK,CACxB,CACIM,EAAaN,EAAM,QACtBO,EAAOP,EAAM,MAAMM,CAAU,CAAC,EAE3BJ,GAAQ,OACXA,EAAOC,EACPA,EAAS,IAETL,EAAmCI,CAAI,EAAIb,EAAQc,EAAQA,EAASZ,EAAc,CAAC,CACrF,CAED,OAAOO,CACR,EAEA,eAAeF",
|
|
6
|
+
"names": ["flatstr", "s", "iConcatOps", "rLines", "rEscapesOrSeparator", "rEscapes", "mEscapes", "parseProperties", "sText", "properties", "aLines", "sLine", "rMatcher", "sKey", "sValue", "i", "m", "iLastIndex", "append"]
|
|
7
|
+
}
|