@ui5/webcomponents-base 0.0.0-47cc17a26 → 0.0.0-49bade48d
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/AGENTS.md +195 -0
- package/CHANGELOG.md +362 -1
- package/CLAUDE.md +1 -0
- package/dist/.tsbuildinfobuild +1 -1
- package/dist/Boot.d.ts +2 -1
- package/dist/Boot.js +42 -14
- package/dist/Boot.js.map +1 -1
- package/dist/CustomElementsScopeUtils.d.ts +11 -4
- package/dist/CustomElementsScopeUtils.js +15 -5
- package/dist/CustomElementsScopeUtils.js.map +1 -1
- package/dist/FontFace.css +36 -0
- package/dist/InitialConfiguration.d.ts +2 -1
- package/dist/InitialConfiguration.js +10 -11
- package/dist/InitialConfiguration.js.map +1 -1
- package/dist/ManagedStyles.js +1 -1
- package/dist/ManagedStyles.js.map +1 -1
- package/dist/Render.d.ts +9 -1
- package/dist/Render.js +15 -3
- package/dist/Render.js.map +1 -1
- package/dist/Runtimes.d.ts +6 -1
- package/dist/Runtimes.js +25 -24
- package/dist/Runtimes.js.map +1 -1
- package/dist/SystemCSSVars.js +2 -4
- package/dist/SystemCSSVars.js.map +1 -1
- package/dist/UI5Element.d.ts +33 -7
- package/dist/UI5Element.js +73 -25
- package/dist/UI5Element.js.map +1 -1
- package/dist/UI5ElementMetadata.js +1 -1
- package/dist/UI5ElementMetadata.js.map +1 -1
- package/dist/asset-registries/Icons.d.ts +1 -0
- package/dist/asset-registries/Icons.js +1 -0
- package/dist/asset-registries/Icons.js.map +1 -1
- package/dist/asset-registries/Themes.d.ts +5 -2
- package/dist/asset-registries/Themes.js +3 -3
- package/dist/asset-registries/Themes.js.map +1 -1
- package/dist/config/ConfigurationSync.d.ts +16 -0
- package/dist/config/ConfigurationSync.js +42 -0
- package/dist/config/ConfigurationSync.js.map +1 -0
- package/dist/config/Language.js +13 -1
- package/dist/config/Language.js.map +1 -1
- package/dist/config/Theme.d.ts +13 -1
- package/dist/config/Theme.js +27 -2
- package/dist/config/Theme.js.map +1 -1
- package/dist/config/ThemeRoot.js +12 -7
- package/dist/config/ThemeRoot.js.map +1 -1
- package/dist/config/UrlParams.d.ts +20 -0
- package/dist/config/UrlParams.js +30 -0
- package/dist/config/UrlParams.js.map +1 -0
- package/dist/createReactComponent.d.ts +26 -0
- package/dist/createReactComponent.js +51 -0
- package/dist/createReactComponent.js.map +1 -0
- package/dist/css/OpenUI5PopupStyles.css +5 -0
- package/dist/css/SystemCSSVars.css +28 -3
- package/dist/custom-elements-internal.json +402 -309
- package/dist/custom-elements.json +346 -253
- package/dist/decorators/slot-strict.d.ts +27 -0
- package/dist/decorators/slot-strict.js +54 -0
- package/dist/decorators/slot-strict.js.map +1 -0
- package/dist/decorators/slot.d.ts +18 -0
- package/dist/decorators/slot.js +18 -0
- package/dist/decorators/slot.js.map +1 -1
- package/dist/decorators.d.ts +2 -1
- package/dist/decorators.js +2 -1
- package/dist/decorators.js.map +1 -1
- package/dist/features/F6Navigation.d.ts +1 -0
- package/dist/features/F6Navigation.js +4 -0
- package/dist/features/F6Navigation.js.map +1 -1
- package/dist/features/InputElementsFormSupport.d.ts +1 -1
- package/dist/features/InputElementsFormSupport.js +26 -4
- package/dist/features/InputElementsFormSupport.js.map +1 -1
- package/dist/features/OpenUI5Support.d.ts +12 -6
- package/dist/features/OpenUI5Support.js +55 -24
- package/dist/features/OpenUI5Support.js.map +1 -1
- package/dist/features/patchPatcher.d.ts +7 -6
- package/dist/features/patchPatcher.js +14 -4
- package/dist/features/patchPatcher.js.map +1 -1
- package/dist/features/patchPopup.d.ts +17 -12
- package/dist/features/patchPopup.js +99 -27
- package/dist/features/patchPopup.js.map +1 -1
- package/dist/generated/AssetParameters.js +1 -1
- package/dist/generated/AssetParameters.js.map +1 -1
- package/dist/generated/VersionInfo.js +3 -3
- package/dist/generated/VersionInfo.js.map +1 -1
- package/dist/generated/assets/i18n/messagebundle_ar.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_bg.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_ca.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_cnr.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_cs.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_cy.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_da.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_de.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_el.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_es.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_et.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_fi.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_fr.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_hi.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_hr.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_hu.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_id.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_it.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_iw.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_ja.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_kk.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_ko.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_lt.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_lv.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_mk.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_ms.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_nl.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_no.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_pl.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_pt.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_ro.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_ru.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_sh.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_sk.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_sl.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_sr.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_sv.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_th.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_tr.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_uk.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_vi.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -0
- package/dist/generated/css/FontFace.css.d.ts +1 -1
- package/dist/generated/css/FontFace.css.js +36 -36
- package/dist/generated/css/FontFace.css.js.map +1 -1
- package/dist/generated/css/OpenUI5PopupStyles.css.d.ts +1 -1
- package/dist/generated/css/OpenUI5PopupStyles.css.js +1 -1
- package/dist/generated/css/OpenUI5PopupStyles.css.js.map +1 -1
- package/dist/generated/css/SystemCSSVars.css.d.ts +1 -1
- package/dist/generated/css/SystemCSSVars.css.js +1 -1
- package/dist/generated/css/SystemCSSVars.css.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/prod/Boot.js +1 -1
- package/dist/prod/Boot.js.map +3 -3
- package/dist/prod/CustomElementsScopeUtils.js +1 -1
- package/dist/prod/CustomElementsScopeUtils.js.map +3 -3
- package/dist/prod/InitialConfiguration.js +1 -1
- package/dist/prod/InitialConfiguration.js.map +3 -3
- package/dist/prod/ManagedStyles.js +1 -1
- package/dist/prod/ManagedStyles.js.map +2 -2
- package/dist/prod/Render.js +1 -1
- package/dist/prod/Render.js.map +3 -3
- package/dist/prod/Runtimes.js +1 -1
- package/dist/prod/Runtimes.js.map +3 -3
- package/dist/prod/SystemCSSVars.js +1 -1
- package/dist/prod/SystemCSSVars.js.map +3 -3
- package/dist/prod/UI5Element.js +1 -1
- package/dist/prod/UI5Element.js.map +3 -3
- package/dist/prod/UI5ElementMetadata.js +1 -1
- package/dist/prod/UI5ElementMetadata.js.map +2 -2
- package/dist/prod/asset-registries/Icons.js +1 -1
- package/dist/prod/asset-registries/Icons.js.map +2 -2
- package/dist/prod/asset-registries/Themes.js +1 -1
- package/dist/prod/asset-registries/Themes.js.map +3 -3
- package/dist/prod/config/ConfigurationSync.js +2 -0
- package/dist/prod/config/ConfigurationSync.js.map +7 -0
- package/dist/prod/config/Language.js +1 -1
- package/dist/prod/config/Language.js.map +3 -3
- package/dist/prod/config/Theme.js +1 -1
- package/dist/prod/config/Theme.js.map +3 -3
- package/dist/prod/config/ThemeRoot.js +1 -1
- package/dist/prod/config/ThemeRoot.js.map +3 -3
- package/dist/prod/config/UrlParams.js +2 -0
- package/dist/prod/config/UrlParams.js.map +7 -0
- package/dist/prod/createReactComponent.js +2 -0
- package/dist/prod/createReactComponent.js.map +7 -0
- package/dist/prod/decorators/slot-strict.js +2 -0
- package/dist/prod/decorators/slot-strict.js.map +7 -0
- package/dist/prod/decorators/slot.js.map +2 -2
- package/dist/prod/decorators.js +1 -1
- package/dist/prod/decorators.js.map +3 -3
- package/dist/prod/features/F6Navigation.js +1 -1
- package/dist/prod/features/F6Navigation.js.map +2 -2
- package/dist/prod/features/InputElementsFormSupport.js +1 -1
- package/dist/prod/features/InputElementsFormSupport.js.map +3 -3
- package/dist/prod/features/OpenUI5Support.js +1 -1
- package/dist/prod/features/OpenUI5Support.js.map +3 -3
- package/dist/prod/features/patchPatcher.js +1 -1
- package/dist/prod/features/patchPatcher.js.map +3 -3
- package/dist/prod/features/patchPopup.js +1 -1
- package/dist/prod/features/patchPopup.js.map +3 -3
- package/dist/prod/generated/AssetParameters.js +1 -1
- package/dist/prod/generated/AssetParameters.js.map +2 -2
- package/dist/prod/generated/VersionInfo.js +1 -1
- package/dist/prod/generated/VersionInfo.js.map +1 -1
- package/dist/prod/generated/assets/i18n/messagebundle_ar.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_bg.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_ca.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_cnr.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_cs.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_cy.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_da.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_de.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_el.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_en_GB.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_es.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_es_MX.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_et.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_fi.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_fr.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_fr_CA.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_hi.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_hr.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_hu.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_id.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_it.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_iw.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_ja.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_kk.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_ko.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_lt.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_lv.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_mk.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_ms.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_nl.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_no.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_pl.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_pt.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_pt_PT.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_ro.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_ru.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_sh.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_sk.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_sl.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_sr.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_sv.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_th.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_tr.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_uk.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_vi.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_zh_CN.json +1 -0
- package/dist/prod/generated/assets/i18n/messagebundle_zh_TW.json +1 -0
- package/dist/prod/generated/css/FontFace.css.js +36 -36
- package/dist/prod/generated/css/FontFace.css.js.map +1 -1
- package/dist/prod/generated/css/OpenUI5PopupStyles.css.js +1 -1
- package/dist/prod/generated/css/OpenUI5PopupStyles.css.js.map +1 -1
- package/dist/prod/generated/css/SystemCSSVars.css.js +1 -1
- package/dist/prod/generated/css/SystemCSSVars.css.js.map +1 -1
- package/dist/prod/index.js +1 -1
- package/dist/prod/index.js.map +3 -3
- package/dist/prod/sap/base/Log.js +15 -29
- package/dist/prod/sap/base/assert.js +1 -1
- package/dist/prod/sap/base/config/MemoryConfigurationProvider.js +1 -1
- package/dist/prod/sap/base/security/URLListValidator.js +9 -5
- package/dist/prod/sap/base/security/encodeCSS.js +1 -1
- package/dist/prod/sap/base/security/encodeXML.js +1 -1
- package/dist/prod/sap/base/security/sanitizeHTML.js +1 -1
- package/dist/prod/sap/base/strings/toHex.js +1 -1
- package/dist/prod/sap/base/util/now.js +7 -13
- package/dist/prod/sap/base/util/uid.js +1 -1
- package/dist/prod/sap/ui/thirdparty/caja-html-sanitizer.js +15 -3
- package/dist/prod/theming/applyTheme.js +1 -1
- package/dist/prod/theming/applyTheme.js.map +3 -3
- package/dist/prod/theming/componentStyles.js +3 -0
- package/dist/prod/theming/componentStyles.js.map +7 -0
- package/dist/prod/thirdparty/preact/preact.module.js +1 -1
- package/dist/prod/updateShadowRoot.js +1 -1
- package/dist/prod/updateShadowRoot.js.map +3 -3
- package/dist/prod/util/SelectionAssistant.js.map +1 -1
- package/dist/prod/util/createInstanceChecker.js +2 -0
- package/dist/prod/util/createInstanceChecker.js.map +7 -0
- package/dist/prod/util/createMultiInstanceChecker.js +2 -0
- package/dist/prod/util/createMultiInstanceChecker.js.map +7 -0
- package/dist/prod/util/dragAndDrop/DragRegistry.js +1 -1
- package/dist/prod/util/dragAndDrop/DragRegistry.js.map +3 -3
- package/dist/prod/util/generateHighlightedMarkupFirstMatch.js +2 -0
- package/dist/prod/util/generateHighlightedMarkupFirstMatch.js.map +7 -0
- package/dist/prod/validateThemeRoot.js +1 -1
- package/dist/prod/validateThemeRoot.js.map +3 -3
- package/dist/react18/createReactComponent.d.ts +38 -0
- package/dist/react18/createReactComponent.js +112 -0
- package/dist/react18/createReactComponent.js.map +1 -0
- package/dist/sap/base/Log.js +15 -29
- package/dist/sap/base/assert.js +1 -1
- package/dist/sap/base/config/MemoryConfigurationProvider.js +1 -1
- package/dist/sap/base/security/URLListValidator.js +9 -5
- package/dist/sap/base/security/encodeCSS.js +1 -1
- package/dist/sap/base/security/encodeXML.js +1 -1
- package/dist/sap/base/security/sanitizeHTML.js +1 -1
- package/dist/sap/base/strings/toHex.js +1 -1
- package/dist/sap/base/util/now.js +7 -13
- package/dist/sap/base/util/uid.js +1 -1
- package/dist/sap/ui/thirdparty/caja-html-sanitizer.js +15 -3
- package/dist/theming/applyTheme.js +14 -4
- package/dist/theming/applyTheme.js.map +1 -1
- package/dist/theming/componentStyles.d.ts +3 -0
- package/dist/theming/componentStyles.js +15 -0
- package/dist/theming/componentStyles.js.map +1 -0
- package/dist/thirdparty/preact/preact.module.js +1 -1
- package/dist/types.d.ts +3 -0
- package/dist/types.js.map +1 -1
- package/dist/updateShadowRoot.js +2 -1
- package/dist/updateShadowRoot.js.map +1 -1
- package/dist/util/SelectionAssistant.js.map +1 -1
- package/dist/util/createInstanceChecker.d.ts +2 -0
- package/dist/util/createInstanceChecker.js +8 -0
- package/dist/util/createInstanceChecker.js.map +1 -0
- package/dist/util/createMultiInstanceChecker.d.ts +2 -0
- package/dist/util/createMultiInstanceChecker.js +19 -0
- package/dist/util/createMultiInstanceChecker.js.map +1 -0
- package/dist/util/dragAndDrop/DragRegistry.d.ts +1 -1
- package/dist/util/dragAndDrop/DragRegistry.js +5 -1
- package/dist/util/dragAndDrop/DragRegistry.js.map +1 -1
- package/dist/util/generateHighlightedMarkupFirstMatch.d.ts +10 -0
- package/dist/util/generateHighlightedMarkupFirstMatch.js +36 -0
- package/dist/util/generateHighlightedMarkupFirstMatch.js.map +1 -0
- package/dist/util/getClassCopy.d.ts +2 -1
- package/dist/validateThemeRoot.js +18 -11
- package/dist/validateThemeRoot.js.map +1 -1
- package/dist/vscode.html-custom-data.json +1 -1
- package/package-scripts.cjs +6 -6
- package/package.json +17 -10
- package/src/css/OpenUI5PopupStyles.css +5 -0
- package/src/css/SystemCSSVars.css +28 -3
- package/src/i18n/messagebundle_ar.properties +2 -0
- package/src/i18n/messagebundle_bg.properties +2 -0
- package/src/i18n/messagebundle_ca.properties +2 -0
- package/src/i18n/messagebundle_cnr.properties +2 -0
- package/src/i18n/messagebundle_cs.properties +2 -0
- package/src/i18n/messagebundle_cy.properties +2 -0
- package/src/i18n/messagebundle_da.properties +2 -0
- package/src/i18n/messagebundle_de.properties +2 -0
- package/src/i18n/messagebundle_el.properties +2 -0
- package/src/i18n/messagebundle_en_GB.properties +2 -0
- package/src/i18n/messagebundle_es.properties +2 -0
- package/src/i18n/messagebundle_es_MX.properties +2 -0
- package/src/i18n/messagebundle_et.properties +2 -0
- package/src/i18n/messagebundle_fi.properties +2 -0
- package/src/i18n/messagebundle_fr.properties +2 -0
- package/src/i18n/messagebundle_fr_CA.properties +2 -0
- package/src/i18n/messagebundle_hi.properties +2 -0
- package/src/i18n/messagebundle_hr.properties +2 -0
- package/src/i18n/messagebundle_hu.properties +2 -0
- package/src/i18n/messagebundle_id.properties +2 -0
- package/src/i18n/messagebundle_it.properties +2 -0
- package/src/i18n/messagebundle_iw.properties +2 -0
- package/src/i18n/messagebundle_ja.properties +2 -0
- package/src/i18n/messagebundle_kk.properties +2 -0
- package/src/i18n/messagebundle_ko.properties +2 -0
- package/src/i18n/messagebundle_lt.properties +2 -0
- package/src/i18n/messagebundle_lv.properties +2 -0
- package/src/i18n/messagebundle_mk.properties +2 -0
- package/src/i18n/messagebundle_ms.properties +2 -0
- package/src/i18n/messagebundle_nl.properties +2 -0
- package/src/i18n/messagebundle_no.properties +2 -0
- package/src/i18n/messagebundle_pl.properties +2 -0
- package/src/i18n/messagebundle_pt.properties +2 -0
- package/src/i18n/messagebundle_pt_PT.properties +2 -0
- package/src/i18n/messagebundle_ro.properties +2 -0
- package/src/i18n/messagebundle_ru.properties +2 -0
- package/src/i18n/messagebundle_sh.properties +2 -0
- package/src/i18n/messagebundle_sk.properties +2 -0
- package/src/i18n/messagebundle_sl.properties +2 -0
- package/src/i18n/messagebundle_sr.properties +2 -0
- package/src/i18n/messagebundle_sv.properties +2 -0
- package/src/i18n/messagebundle_th.properties +2 -0
- package/src/i18n/messagebundle_tr.properties +2 -0
- package/src/i18n/messagebundle_uk.properties +2 -0
- package/src/i18n/messagebundle_vi.properties +2 -0
- package/src/i18n/messagebundle_zh_CN.properties +2 -0
- package/src/i18n/messagebundle_zh_TW.properties +2 -0
- package/src/react18/createReactComponent.tsx +140 -0
- package/src/thirdparty/preact/preact.module.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyTheme.js","sourceRoot":"","sources":["../../src/theming/applyTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAC7G,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,qBAAqB,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,6BAA6B,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"applyTheme.js","sourceRoot":"","sources":["../../src/theming/applyTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAC7G,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,qBAAqB,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,6BAA6B,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC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CAAC,KAAK,CAAC,CAAC;IAElD,kHAAkH;IAClH,IAAI,CAAC,QAAQ,IAAI,KAAK,KAAK,QAAQ,CAAC,SAAS,EAAE,CAAC;QAC/C,MAAM,aAAa,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;SAAM,CAAC;QACP,eAAe,EAAE,CAAC;IACnB,CAAC;IAED,wGAAwG;IACxG,MAAM,iBAAiB,GAAG,QAAQ,IAAI,QAAQ,CAAC,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;IACvF,MAAM,aAAa,GAAG,QAAQ,IAAI,QAAQ,CAAC,aAAa,CAAC;IACzD,MAAM,kBAAkB,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,aAAa,IAAI,aAAa,CAAC,CAAC;IAE/F,MAAM,qBAAqB,CAAC,kBAAkB,EAAE,iBAAiB,CAAC,CAAC;IAEnE,YAAY,CAAC,aAAa,CAAC,CAAC;IAC5B,eAAe,CAAC,KAAK,CAAC,CAAC;AACxB,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import { getThemeProperties, getRegisteredPackages, isThemeRegistered } from \"../asset-registries/Themes.js\";\nimport { removeStyle, createOrUpdateStyle } from \"../ManagedStyles.js\";\nimport getThemeDesignerTheme from \"./getThemeDesignerTheme.js\";\nimport { fireThemeLoaded } from \"./ThemeLoaded.js\";\nimport { getFeature } from \"../FeaturesRegistry.js\";\nimport { attachCustomThemeStylesToHead, getThemeRoot } from \"../config/ThemeRoot.js\";\nimport { setBaseTheme } from \"../config/Theme.js\";\nimport type OpenUI5Support from \"../features/OpenUI5Support.js\";\nimport { DEFAULT_THEME } from \"../generated/AssetParameters.js\";\nimport { getCurrentRuntimeIndex } from \"../Runtimes.js\";\nimport { updateComponentStyles } from \"./componentStyles.js\";\n\n// eslint-disable-next-line\nexport let _lib = \"ui5\";\n// eslint-disable-next-line\nexport let _package = \"webcomponents-theming\";\n// eslint-disable-next-line\nconst BASE_THEME_PACKAGE = \"@\" + _lib + \"/\" + _package;\n\nconst isThemeBaseRegistered = () => {\n\tconst registeredPackages = getRegisteredPackages();\n\treturn registeredPackages.has(BASE_THEME_PACKAGE);\n};\n\nconst loadThemeBase = async (theme: string) => {\n\tif (!isThemeBaseRegistered()) {\n\t\treturn;\n\t}\n\n\tconst cssData = await getThemeProperties(BASE_THEME_PACKAGE, theme);\n\tif (cssData) {\n\t\tcreateOrUpdateStyle(cssData, \"data-ui5-theme-properties\", BASE_THEME_PACKAGE, theme);\n\t}\n};\n\nconst deleteThemeBase = () => {\n\tremoveStyle(\"data-ui5-theme-properties\", BASE_THEME_PACKAGE);\n};\n\nconst loadComponentPackages = async (theme: string, externalThemeName?: string) => {\n\tconst registeredPackages = getRegisteredPackages();\n\n\tconst packagesStylesPromises = [...registeredPackages.entries()].map(async ([packageName, { cssVariablesTarget }]) => {\n\t\tif (packageName === BASE_THEME_PACKAGE) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst cssData = await getThemeProperties(packageName, theme, externalThemeName);\n\t\tif (cssData) {\n\t\t\tif (cssVariablesTarget === \"root\") {\n\t\t\t\tcreateOrUpdateStyle(cssData, `data-ui5-component-properties-${getCurrentRuntimeIndex()}`, packageName);\n\t\t\t} else if (cssVariablesTarget === \"host\") {\n\t\t\t\tupdateComponentStyles(packageName, cssData);\n\t\t\t}\n\t\t}\n\t});\n\n\treturn Promise.all(packagesStylesPromises);\n};\n\nconst detectExternalTheme = async (theme: string) => {\n\t// If theme designer theme is detected, use this\n\tconst extTheme = getThemeDesignerTheme();\n\tif (extTheme) {\n\t\treturn extTheme;\n\t}\n\n\t// If OpenUI5Support is enabled, try to find out if it loaded variables\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\tif (openUI5Support && openUI5Support.isOpenUI5Detected()) {\n\t\tconst varsLoaded = openUI5Support.cssVariablesLoaded();\n\t\tif (varsLoaded) {\n\t\t\treturn {\n\t\t\t\tthemeName: openUI5Support.getConfigurationSettingsObject()?.theme, // just themeName\n\t\t\t\tbaseThemeName: \"\", // baseThemeName is only relevant for custom themes\n\t\t\t};\n\t\t}\n\t} else if (getThemeRoot()) {\n\t\tawait attachCustomThemeStylesToHead(theme);\n\n\t\treturn getThemeDesignerTheme();\n\t}\n};\n\nconst applyTheme = async (theme: string) => {\n\tconst extTheme = await detectExternalTheme(theme);\n\n\t// Only load theme_base properties if there is no externally loaded theme, or there is, but it is not being loaded\n\tif (!extTheme || theme !== extTheme.themeName) {\n\t\tawait loadThemeBase(theme);\n\t} else {\n\t\tdeleteThemeBase();\n\t}\n\n\t// Always load component packages properties. For non-registered themes, try with the base theme, if any\n\tconst externalThemeName = extTheme && extTheme.themeName === theme ? theme : undefined;\n\tconst baseThemeName = extTheme && extTheme.baseThemeName;\n\tconst effectiveThemeName = isThemeRegistered(theme) ? theme : (baseThemeName || DEFAULT_THEME);\n\n\tawait loadComponentPackages(effectiveThemeName, externalThemeName);\n\n\tsetBaseTheme(baseThemeName);\n\tfireThemeLoaded(theme);\n};\n\nexport default applyTheme;\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const packageMap = new Map();
|
|
2
|
+
let componentsStyleSheet;
|
|
3
|
+
const getComponentStyles = () => {
|
|
4
|
+
if (!componentsStyleSheet) {
|
|
5
|
+
componentsStyleSheet = new CSSStyleSheet();
|
|
6
|
+
}
|
|
7
|
+
return componentsStyleSheet;
|
|
8
|
+
};
|
|
9
|
+
const updateComponentStyles = (packageName, content) => {
|
|
10
|
+
packageMap.set(packageName, content);
|
|
11
|
+
const combinedStyles = Array.from(packageMap.values()).join("\n");
|
|
12
|
+
getComponentStyles().replaceSync(combinedStyles);
|
|
13
|
+
};
|
|
14
|
+
export { getComponentStyles, updateComponentStyles, };
|
|
15
|
+
//# sourceMappingURL=componentStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"componentStyles.js","sourceRoot":"","sources":["../../src/theming/componentStyles.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,GAAG,IAAI,GAAG,EAAkB,CAAC;AAC7C,IAAI,oBAAmC,CAAC;AAExC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC/B,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC3B,oBAAoB,GAAG,IAAI,aAAa,EAAE,CAAC;IAC5C,CAAC;IAED,OAAO,oBAAoB,CAAC;AAC7B,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAG,CAAC,WAAmB,EAAE,OAAe,EAAE,EAAE;IACtE,UAAU,CAAC,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAErC,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClE,kBAAkB,EAAE,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;AAClD,CAAC,CAAC;AAEF,OAAO,EACN,kBAAkB,EAClB,qBAAqB,GACrB,CAAC","sourcesContent":["const packageMap = new Map<string, string>();\nlet componentsStyleSheet: CSSStyleSheet;\n\nconst getComponentStyles = () => {\n\tif (!componentsStyleSheet) {\n\t\tcomponentsStyleSheet = new CSSStyleSheet();\n\t}\n\n\treturn componentsStyleSheet;\n};\n\nconst updateComponentStyles = (packageName: string, content: string) => {\n\tpackageMap.set(packageName, content);\n\n\tconst combinedStyles = Array.from(packageMap.values()).join(\"\\n\");\n\tgetComponentStyles().replaceSync(combinedStyles);\n};\n\nexport {\n\tgetComponentStyles,\n\tupdateComponentStyles,\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var n,l,t,u,i,o,r,e,f,c,s,a,h,p={},v=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,d=Array.isArray;function w(n,l){for(var t in l)n[t]=l[t];return n}function _(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function g(l,t,u){var i,o,r,e={};for(r in t)"key"==r?i=t[r]:"ref"==r?o=t[r]:e[r]=t[r];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):u),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===e[r]&&(e[r]=l.defaultProps[r]);return m(l,e,i,o,null)}function m(n,u,i,o,r){var e={type:n,props:u,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==r?++t:r,__i:-1,__u:0};return null==r&&null!=l.vnode&&l.vnode(e),e}function b(){return{current:null}}function k(n){return n.children}function x(n,l){this.props=n,this.context=l}function C(n,l){if(null==l)return n.__?C(n.__,n.__i+1):null;for(var t;l<n.__k.length;l++)if(null!=(t=n.__k[l])&&null!=t.__e)return t.__e;return"function"==typeof n.type?C(n):null}function S(n){var l,t;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(t=n.__k[l])&&null!=t.__e){n.__e=n.__c.base=t.__e;break}return S(n)}}function M(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!P.__r++||o!==l.debounceRendering)&&((o=l.debounceRendering)||r)(P)}function P(){var n,t,u,o,r,f,c,s;for(i.sort(e);n=i.shift();)n.__d&&(t=i.length,o=void 0,f=(r=(u=n).__v).__e,c=[],s=[],u.__P&&((o=w({},r)).__v=r.__v+1,l.vnode&&l.vnode(o),F(u.__P,o,r,u.__n,u.__P.namespaceURI,32&r.__u?[f]:null,c,null==f?C(r):f,!!(32&r.__u),s),o.__v=r.__v,o.__.__k[o.__i]=o,z(c,o,s),o.__e!=f&&S(o)),i.length>t&&i.sort(e));P.__r=0}function $(n,l,t,u,i,o,r,e,f,c,s){var a,h,y,d,w,_,g=u&&u.__k||v,m=l.length;for(f=I(t,l,g,f),a=0;a<m;a++)null!=(y=t.__k[a])&&(h=-1===y.__i?p:g[y.__i]||p,y.__i=a,_=F(n,y,h,i,o,r,e,f,c,s),d=y.__e,y.ref&&h.ref!=y.ref&&(h.ref&&V(h.ref,null,y),s.push(y.ref,y.__c||d,y)),null==w&&null!=d&&(w=d),4&y.__u||h.__k===y.__k?f=H(y,f,n):"function"==typeof y.type&&void 0!==_?f=_:d&&(f=d.nextSibling),y.__u&=-7);return t.__e=w,f}function I(n,l,t,u){var i,o,r,e,f,c=l.length,s=t.length,a=s,h=0;for(n.__k=[],i=0;i<c;i++)null!=(o=l[i])&&"boolean"!=typeof o&&"function"!=typeof o?(e=i+h,(o=n.__k[i]="string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?m(null,o,null,null,null):d(o)?m(k,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?m(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=n,o.__b=n.__b+1,r=null,-1!==(f=o.__i=O(o,t,e,a))&&(a--,(r=t[f])&&(r.__u|=2)),null==r||null===r.__v?(-1==f&&h--,"function"!=typeof o.type&&(o.__u|=4)):f!==e&&(f==e-1?h--:f==e+1?h++:(f>e?h--:h++,o.__u|=4))):o=n.__k[i]=null;if(a)for(i=0;i<s;i++)null!=(r=t[i])&&0==(2&r.__u)&&(r.__e==u&&(u=C(r)),q(r,r));return u}function H(n,l,t){var u,i;if("function"==typeof n.type){for(u=n.__k,i=0;u&&i<u.length;i++)u[i]&&(u[i].__=n,l=H(u[i],l,t));return l}n.__e!=l&&(l&&n.type&&!t.contains(l)&&(l=C(n)),t.insertBefore(n.__e,l||null),l=n.__e);do{l=l&&l.nextSibling}while(null!=l&&8===l.nodeType);return l}function L(n,l){return l=l||[],null==n||"boolean"==typeof n||(d(n)?n.some(function(n){L(n,l)}):l.push(n)),l}function O(n,l,t,u){var i=n.key,o=n.type,r=t-1,e=t+1,f=l[t];if(null===f||f&&i==f.key&&o===f.type&&0==(2&f.__u))return t;if(("function"!=typeof o||o===k||i)&&u>(null!=f&&0==(2&f.__u)?1:0))for(;r>=0||e<l.length;){if(r>=0){if((f=l[r])&&0==(2&f.__u)&&i==f.key&&o===f.type)return r;r--}if(e<l.length){if((f=l[e])&&0==(2&f.__u)&&i==f.key&&o===f.type)return e;e++}}return-1}function T(n,l,t){"-"===l[0]?n.setProperty(l,null==t?"":t):n[l]=null==t?"":"number"!=typeof t||y.test(l)?t:t+"px"}function j(n,l,t,u,i){var o,r;n:if("style"===l)if("string"==typeof t)n.style.cssText=t;else{if("string"==typeof u&&(n.style.cssText=u=""),u)for(l in u)t&&l in t||T(n.style,l,"");if(t)for(l in t)u&&t[l]===u[l]||T(n.style,l,t[l])}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(f,"$1")),l=l.toLowerCase()in n||"onFocusOut"===l||"onFocusIn"===l?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=t,t?u?t.t=u.t:(t.t=c,n.addEventListener(l,o?a:s,o)):n.removeEventListener(l,o?a:s,o);else{if("http://www.w3.org/2000/svg"==i)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=l&&"height"!=l&&"href"!=l&&"list"!=l&&"form"!=l&&"tabIndex"!=l&&"download"!=l&&"rowSpan"!=l&&"colSpan"!=l&&"role"!=l&&"popover"!=l&&l in n)try{r=n.tagName&&n.tagName.includes("-"),t!==u&&(n[l]=null!=t||r?t:"");break n}catch(n){}"function"==typeof t||(null==t||!1===t&&"-"!==l[4]?n.removeAttribute(l):n.setAttribute(l,"popover"==l&&1==t?"":t))}}function A(n){return function(t){if(this.l){var u=this.l[t.type+n];if(null==t.u)t.u=c++;else if(t.u<u.t)return;return u(l.event?l.event(t):t)}}}function F(n,t,u,i,o,r,e,f,c,s){var a,h,p,v,y,g,m,b,C,S,M,P,I,H,L,O,T,j=t.type;if(void 0!==t.constructor)return null;128&u.__u&&(c=!!(32&u.__u),r=[f=t.__e=u.__e]),(a=l.__b)&&a(t);n:if("function"==typeof j)try{if(b=t.props,C="prototype"in j&&j.prototype.render,S=(a=j.contextType)&&i[a.__c],M=a?S?S.props.value:a.__:i,u.__c?m=(h=t.__c=u.__c).__=h.__E:(C?t.__c=h=new j(b,M):(t.__c=h=new x(b,M),h.constructor=j,h.render=B),S&&S.sub(h),h.props=b,h.state||(h.state={}),h.context=M,h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),C&&null==h.__s&&(h.__s=h.state),C&&null!=j.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=w({},h.__s)),w(h.__s,j.getDerivedStateFromProps(b,h.__s))),v=h.props,y=h.state,h.__v=t,p)C&&null==j.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),C&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(C&&null==j.getDerivedStateFromProps&&b!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(b,M),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(b,h.__s,M)||t.__v===u.__v)){for(t.__v!==u.__v&&(h.props=b,h.state=h.__s,h.__d=!1),t.__e=u.__e,t.__k=u.__k,t.__k.some(function(n){n&&(n.__=t)}),P=0;P<h._sb.length;P++)h.__h.push(h._sb[P]);h._sb=[],h.__h.length&&e.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(b,h.__s,M),C&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,y,g)})}if(h.context=M,h.props=b,h.__P=n,h.__e=!1,I=l.__r,H=0,C){for(h.state=h.__s,h.__d=!1,I&&I(t),a=h.render(h.props,h.state,h.context),L=0;L<h._sb.length;L++)h.__h.push(h._sb[L]);h._sb=[]}else do{h.__d=!1,I&&I(t),a=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++H<25);h.state=h.__s,null!=h.getChildContext&&(i=w(w({},i),h.getChildContext())),C&&!p&&null!=h.getSnapshotBeforeUpdate&&(g=h.getSnapshotBeforeUpdate(v,y)),f=$(n,d(O=null!=a&&a.type===k&&null==a.key?a.props.children:a)?O:[O],t,u,i,o,r,e,f,c,s),h.base=t.__e,t.__u&=-161,h.__h.length&&e.push(h),m&&(h.__E=h.__=null)}catch(n){if(t.__v=null,c||null!=r)if(n.then){for(t.__u|=c?160:128;f&&8===f.nodeType&&f.nextSibling;)f=f.nextSibling;r[r.indexOf(f)]=null,t.__e=f}else for(T=r.length;T--;)_(r[T]);else t.__e=u.__e,t.__k=u.__k;l.__e(n,t,u)}else null==r&&t.__v===u.__v?(t.__k=u.__k,t.__e=u.__e):f=t.__e=N(u.__e,t,u,i,o,r,e,c,s);return(a=l.diffed)&&a(t),128&t.__u?void 0:f}function z(n,t,u){for(var i=0;i<u.length;i++)V(u[i],u[++i],u[++i]);l.__c&&l.__c(t,n),n.some(function(t){try{n=t.__h,t.__h=[],n.some(function(n){n.call(t)})}catch(n){l.__e(n,t.__v)}})}function N(t,u,i,o,r,e,f,c,s){var a,h,v,y,w,g,m,b,k=i.props,x=u.props,S=u.type;if("svg"===S?r="http://www.w3.org/2000/svg":"math"===S?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),null!=e)for(a=0;a<e.length;a++)if((w=e[a])&&"setAttribute"in w==!!S&&(S?w.localName===S:3===w.nodeType)){t=w,e[a]=null;break}if(null==t){if(null===S)return document.createTextNode(x);t=document.createElementNS(r,S,x.is&&x),c&&(l.__m&&l.__m(u,e),c=!1),e=null}if(null===S)k===x||c&&t.data===x||(t.data=x);else{if(e=e&&n.call(t.childNodes),k=i.props||p,!c&&null!=e)for(k={},a=0;a<t.attributes.length;a++)k[(w=t.attributes[a]).name]=w.value;for(a in k)if(w=k[a],"children"==a);else if("dangerouslySetInnerHTML"==a)v=w;else if(!(a in x)){if("value"==a&&"defaultValue"in x||"checked"==a&&"defaultChecked"in x)continue;j(t,a,null,w,r)}for(a in x)w=x[a],"children"==a?y=w:"dangerouslySetInnerHTML"==a?h=w:"value"==a?g=w:"checked"==a?m=w:c&&"function"!=typeof w||k[a]===w||((a.startsWith("on")||"ref"===a&&"function"==typeof w)&&(b=o[Object.keys(o)[0]])&&(w=w.bind(b.props.value)),j(t,a,w,k[a],r));if(h)c||v&&(h.__html===v.__html||h.__html===t.innerHTML)||(t.innerHTML=h.__html),u.__k=[];else if(v&&(t.innerHTML=""),$(t,d(y)?y:[y],u,i,o,"foreignObject"===S?"http://www.w3.org/1999/xhtml":r,e,f,e?e[0]:i.__k&&C(i,0),c,s),null!=e)for(a=e.length;a--;)_(e[a]);c||(a="value","progress"===S&&null==g?t.removeAttribute("value"):void 0!==g&&(g!==t[a]||"progress"===S&&!g||"option"===S&&g!==k[a])&&j(t,a,g,k[a],r),a="checked",void 0!==m&&m!==t[a]&&j(t,a,m,k[a],r))}return t}function V(n,t,u){try{if("function"==typeof n){var i="function"==typeof n.__u;i&&n.__u(),i&&null==t||(n.__u=n(t))}else n.current=t}catch(n){l.__e(n,u)}}function q(n,t,u){var i,o;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||V(i,null,t)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,t)}i.base=i.__P=null}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&q(i[o],t,u||"function"!=typeof n.type);u||_(n.__e),n.__c=n.__=n.__e=void 0}function B(n,l,t){return this.constructor(n,t)}function D(t,u,i){var o,r,e,f;u===document&&(u=document.documentElement),l.__&&l.__(t,u),r=(o="function"==typeof i)?null:i&&i.__k||u.__k,e=[],f=[],F(u,t=(!o&&i||u).__k=g(k,null,[t]),r||p,p,u.namespaceURI,!o&&i?[i]:r?null:u.firstChild?n.call(u.childNodes):null,e,!o&&i?i:r?r.__e:u.firstChild,o,f),z(e,t,f)}function E(n,l){D(n,l,E)}function G(l,t,u){var i,o,r,e,f=w({},l.props);for(r in l.type&&l.type.defaultProps&&(e=l.type.defaultProps),t)"key"==r?i=t[r]:"ref"==r?o=t[r]:f[r]=void 0===t[r]&&void 0!==e?e[r]:t[r];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):u),m(l.type,f,i||l.key,o||l.ref,null)}function J(n,l){var t={__c:l="__cC"+h++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var t,u;return this.getChildContext||(t=new Set,(u={})[l]=this,this.getChildContext=function(){return u},this.componentWillUnmount=function(){t=null},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&t.forEach(function(n){n.__e=!0,M(n)})},this.sub=function(n){t.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){t&&t.delete(n),l&&l.call(n)}}),n.children}};return t.Provider.__=t.Consumer.contextType=t}n=v.slice,l={__e:function(n,l,t,u){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,u||{}),r=i.__d),r)return i.__E=i}catch(l){n=l}throw n}},t=0,u=function(n){return null!=n&&null==n.constructor},x.prototype.setState=function(n,l){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=w({},this.state),"function"==typeof n&&(n=n(w({},t),this.props)),n&&w(t,n),null!=n&&this.__v&&(l&&this._sb.push(l),M(this))},x.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),M(this))},x.prototype.render=k,i=[],r="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e=function(n,l){return n.__v.__b-l.__v.__b},P.__r=0,f=/(PointerCapture)$|Capture$/i,c=0,s=A(!1),a=A(!0),h=0;export{x as Component,k as Fragment,G as cloneElement,J as createContext,g as createElement,b as createRef,g as h,E as hydrate,u as isValidElement,l as options,D as render,L as toChildArray};
|
|
1
|
+
var n,l,t,u,i,o,r,e,f,c,s,a,h,p={},v=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,d=Array.isArray;function w(n,l){for(var t in l)n[t]=l[t];return n}function _(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function g(l,t,u){var i,o,r,e={};for(r in t)"key"==r?i=t[r]:"ref"==r?o=t[r]:e[r]=t[r];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):u),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===e[r]&&(e[r]=l.defaultProps[r]);return m(l,e,i,o,null)}function m(n,u,i,o,r){var e={type:n,props:u,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==r?++t:r,__i:-1,__u:0};return null==r&&null!=l.vnode&&l.vnode(e),e}function b(){return{current:null}}function k(n){return n.children}function x(n,l){this.props=n,this.context=l}function C(n,l){if(null==l)return n.__?C(n.__,n.__i+1):null;for(var t;l<n.__k.length;l++)if(null!=(t=n.__k[l])&&null!=t.__e)return t.__e;return"function"==typeof n.type?C(n):null}function S(n){var l,t;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(t=n.__k[l])&&null!=t.__e){n.__e=n.__c.base=t.__e;break}return S(n)}}function M(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!P.__r++||o!==l.debounceRendering)&&((o=l.debounceRendering)||r)(P)}function P(){var n,t,u,o,r,f,c,s;for(i.sort(e);n=i.shift();)n.__d&&(t=i.length,o=void 0,f=(r=(u=n).__v).__e,c=[],s=[],u.__P&&((o=w({},r)).__v=r.__v+1,l.vnode&&l.vnode(o),F(u.__P,o,r,u.__n,u.__P.namespaceURI,32&r.__u?[f]:null,c,null==f?C(r):f,!!(32&r.__u),s),o.__v=r.__v,o.__.__k[o.__i]=o,z(c,o,s),o.__e!=f&&S(o)),i.length>t&&i.sort(e));P.__r=0}function $(n,l,t,u,i,o,r,e,f,c,s){var a,h,y,d,w,_,g=u&&u.__k||v,m=l.length;for(f=I(t,l,g,f),a=0;a<m;a++)null!=(y=t.__k[a])&&(h=-1===y.__i?p:g[y.__i]||p,y.__i=a,_=F(n,y,h,i,o,r,e,f,c,s),d=y.__e,y.ref&&h.ref!=y.ref&&(h.ref&&V(h.ref,null,y),s.push(y.ref,y.__c||d,y)),null==w&&null!=d&&(w=d),4&y.__u||h.__k===y.__k?f=H(y,f,n):"function"==typeof y.type&&void 0!==_?f=_:d&&(f=d.nextSibling),y.__u&=-7);return t.__e=w,f}function I(n,l,t,u){var i,o,r,e,f,c=l.length,s=t.length,a=s,h=0;for(n.__k=[],i=0;i<c;i++)null!=(o=l[i])&&"boolean"!=typeof o&&"function"!=typeof o?(e=i+h,(o=n.__k[i]="string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?m(null,o,null,null,null):d(o)?m(k,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?m(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=n,o.__b=n.__b+1,r=null,-1!==(f=o.__i=O(o,t,e,a))&&(a--,(r=t[f])&&(r.__u|=2)),null==r||null===r.__v?(-1==f&&h--,"function"!=typeof o.type&&(o.__u|=4)):f!==e&&(f==e-1?h--:f==e+1?h++:(f>e?h--:h++,o.__u|=4))):o=n.__k[i]=null;if(a)for(i=0;i<s;i++)null!=(r=t[i])&&0==(2&r.__u)&&(r.__e==u&&(u=C(r)),q(r,r));return u}function H(n,l,t){var u,i;if("function"==typeof n.type){for(u=n.__k,i=0;u&&i<u.length;i++)u[i]&&(u[i].__=n,l=H(u[i],l,t));return l}n.__e!=l&&(l&&n.type&&!t.contains(l)&&(l=C(n)),t.insertBefore(n.__e,l||null),l=n.__e);do{l=l&&l.nextSibling}while(null!=l&&8===l.nodeType);return l}function L(n,l){return l=l||[],null==n||"boolean"==typeof n||(d(n)?n.some(function(n){L(n,l)}):l.push(n)),l}function O(n,l,t,u){var i=n.key,o=n.type,r=t-1,e=t+1,f=l[t];if(null===f||f&&i==f.key&&o===f.type&&0==(2&f.__u))return t;if(("function"!=typeof o||o===k||i)&&u>(null!=f&&0==(2&f.__u)?1:0))for(;r>=0||e<l.length;){if(r>=0){if((f=l[r])&&0==(2&f.__u)&&i==f.key&&o===f.type)return r;r--}if(e<l.length){if((f=l[e])&&0==(2&f.__u)&&i==f.key&&o===f.type)return e;e++}}return-1}function T(n,l,t){"-"===l[0]?n.setProperty(l,null==t?"":t):n[l]=null==t?"":"number"!=typeof t||y.test(l)?t:t+"px"}function j(n,l,t,u,i){var o,r;n:if("style"===l)if("string"==typeof t)n.style.cssText=t;else{if("string"==typeof u&&(n.style.cssText=u=""),u)for(l in u)t&&l in t||T(n.style,l,"");if(t)for(l in t)u&&t[l]===u[l]||T(n.style,l,t[l])}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(f,"$1")),l=l.toLowerCase()in n||"onFocusOut"===l||"onFocusIn"===l?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=t,t?u?t.t=u.t:(t.t=c,n.addEventListener(l,o?a:s,o)):n.removeEventListener(l,o?a:s,o);else{if("http://www.w3.org/2000/svg"==i)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=l&&"height"!=l&&"href"!=l&&"list"!=l&&"form"!=l&&"tabIndex"!=l&&"download"!=l&&"rowSpan"!=l&&"colSpan"!=l&&"role"!=l&&"popover"!=l&&l in n)try{r=n.tagName&&n.tagName.includes("-"),/*t!==u&&*/(n[l]=null!=t||r?t:"");break n}catch(n){}"function"==typeof t||(null==t||!1===t&&"-"!==l[4]?n.removeAttribute(l):n.setAttribute(l,"popover"==l&&1==t?"":t))}}function A(n){return function(t){if(this.l){var u=this.l[t.type+n];if(null==t.u)t.u=c++;else if(t.u<u.t)return;return u(l.event?l.event(t):t)}}}function F(n,t,u,i,o,r,e,f,c,s){var a,h,p,v,y,g,m,b,C,S,M,P,I,H,L,O,T,j=t.type;if(void 0!==t.constructor)return null;128&u.__u&&(c=!!(32&u.__u),r=[f=t.__e=u.__e]),(a=l.__b)&&a(t);n:if("function"==typeof j)try{if(b=t.props,C="prototype"in j&&j.prototype.render,S=(a=j.contextType)&&i[a.__c],M=a?S?S.props.value:a.__:i,u.__c?m=(h=t.__c=u.__c).__=h.__E:(C?t.__c=h=new j(b,M):(t.__c=h=new x(b,M),h.constructor=j,h.render=B),S&&S.sub(h),h.props=b,h.state||(h.state={}),h.context=M,h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),C&&null==h.__s&&(h.__s=h.state),C&&null!=j.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=w({},h.__s)),w(h.__s,j.getDerivedStateFromProps(b,h.__s))),v=h.props,y=h.state,h.__v=t,p)C&&null==j.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),C&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(C&&null==j.getDerivedStateFromProps&&b!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(b,M),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(b,h.__s,M)||t.__v===u.__v)){for(t.__v!==u.__v&&(h.props=b,h.state=h.__s,h.__d=!1),t.__e=u.__e,t.__k=u.__k,t.__k.some(function(n){n&&(n.__=t)}),P=0;P<h._sb.length;P++)h.__h.push(h._sb[P]);h._sb=[],h.__h.length&&e.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(b,h.__s,M),C&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,y,g)})}if(h.context=M,h.props=b,h.__P=n,h.__e=!1,I=l.__r,H=0,C){for(h.state=h.__s,h.__d=!1,I&&I(t),a=h.render(h.props,h.state,h.context),L=0;L<h._sb.length;L++)h.__h.push(h._sb[L]);h._sb=[]}else do{h.__d=!1,I&&I(t),a=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++H<25);h.state=h.__s,null!=h.getChildContext&&(i=w(w({},i),h.getChildContext())),C&&!p&&null!=h.getSnapshotBeforeUpdate&&(g=h.getSnapshotBeforeUpdate(v,y)),f=$(n,d(O=null!=a&&a.type===k&&null==a.key?a.props.children:a)?O:[O],t,u,i,o,r,e,f,c,s),h.base=t.__e,t.__u&=-161,h.__h.length&&e.push(h),m&&(h.__E=h.__=null)}catch(n){if(t.__v=null,c||null!=r)if(n.then){for(t.__u|=c?160:128;f&&8===f.nodeType&&f.nextSibling;)f=f.nextSibling;r[r.indexOf(f)]=null,t.__e=f}else for(T=r.length;T--;)_(r[T]);else t.__e=u.__e,t.__k=u.__k;l.__e(n,t,u)}else null==r&&t.__v===u.__v?(t.__k=u.__k,t.__e=u.__e):f=t.__e=N(u.__e,t,u,i,o,r,e,c,s);return(a=l.diffed)&&a(t),128&t.__u?void 0:f}function z(n,t,u){for(var i=0;i<u.length;i++)V(u[i],u[++i],u[++i]);l.__c&&l.__c(t,n),n.some(function(t){try{n=t.__h,t.__h=[],n.some(function(n){n.call(t)})}catch(n){l.__e(n,t.__v)}})}function N(t,u,i,o,r,e,f,c,s){var a,h,v,y,w,g,m,b,k=i.props,x=u.props,S=u.type;if("svg"===S?r="http://www.w3.org/2000/svg":"math"===S?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),null!=e)for(a=0;a<e.length;a++)if((w=e[a])&&"setAttribute"in w==!!S&&(S?w.localName===S:3===w.nodeType)){t=w,e[a]=null;break}if(null==t){if(null===S)return document.createTextNode(x);t=document.createElementNS(r,S,x.is&&x),c&&(l.__m&&l.__m(u,e),c=!1),e=null}if(null===S)k===x||c&&t.data===x||(t.data=x);else{if(e=e&&n.call(t.childNodes),k=i.props||p,!c&&null!=e)for(k={},a=0;a<t.attributes.length;a++)k[(w=t.attributes[a]).name]=w.value;for(a in k)if(w=k[a],"children"==a);else if("dangerouslySetInnerHTML"==a)v=w;else if(!(a in x)){if("value"==a&&"defaultValue"in x||"checked"==a&&"defaultChecked"in x)continue;j(t,a,null,w,r)}for(a in x)w=x[a],"children"==a?y=w:"dangerouslySetInnerHTML"==a?h=w:"value"==a?g=w:"checked"==a?m=w:c&&"function"!=typeof w||k[a]===w||((a.startsWith("on")||"ref"===a&&"function"==typeof w)&&(b=o[Object.keys(o)[0]])&&(w=w.bind(b.props.value)),j(t,a,w,k[a],r));if(h)c||v&&(h.__html===v.__html||h.__html===t.innerHTML)||(t.innerHTML=h.__html),u.__k=[];else if(v&&(t.innerHTML=""),$(t,d(y)?y:[y],u,i,o,"foreignObject"===S?"http://www.w3.org/1999/xhtml":r,e,f,e?e[0]:i.__k&&C(i,0),c,s),null!=e)for(a=e.length;a--;)_(e[a]);c||(a="value","progress"===S&&null==g?t.removeAttribute("value"):void 0!==g&&(g!==t[a]||"progress"===S&&!g||"option"===S&&g!==k[a])&&j(t,a,g,k[a],r),a="checked",void 0!==m&&m!==t[a]&&j(t,a,m,k[a],r))}return t}function V(n,t,u){try{if("function"==typeof n){var i="function"==typeof n.__u;i&&n.__u(),i&&null==t||(n.__u=n(t))}else n.current=t}catch(n){l.__e(n,u)}}function q(n,t,u){var i,o;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||V(i,null,t)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,t)}i.base=i.__P=null}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&q(i[o],t,u||"function"!=typeof n.type);u||_(n.__e),n.__c=n.__=n.__e=void 0}function B(n,l,t){return this.constructor(n,t)}function D(t,u,i){var o,r,e,f;u===document&&(u=document.documentElement),l.__&&l.__(t,u),r=(o="function"==typeof i)?null:i&&i.__k||u.__k,e=[],f=[],F(u,t=(!o&&i||u).__k=g(k,null,[t]),r||p,p,u.namespaceURI,!o&&i?[i]:r?null:u.firstChild?n.call(u.childNodes):null,e,!o&&i?i:r?r.__e:u.firstChild,o,f),z(e,t,f)}function E(n,l){D(n,l,E)}function G(l,t,u){var i,o,r,e,f=w({},l.props);for(r in l.type&&l.type.defaultProps&&(e=l.type.defaultProps),t)"key"==r?i=t[r]:"ref"==r?o=t[r]:f[r]=void 0===t[r]&&void 0!==e?e[r]:t[r];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):u),m(l.type,f,i||l.key,o||l.ref,null)}function J(n,l){var t={__c:l="__cC"+h++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var t,u;return this.getChildContext||(t=new Set,(u={})[l]=this,this.getChildContext=function(){return u},this.componentWillUnmount=function(){t=null},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&t.forEach(function(n){n.__e=!0,M(n)})},this.sub=function(n){t.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){t&&t.delete(n),l&&l.call(n)}}),n.children}};return t.Provider.__=t.Consumer.contextType=t}n=v.slice,l={__e:function(n,l,t,u){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,u||{}),r=i.__d),r)return i.__E=i}catch(l){n=l}throw n}},t=0,u=function(n){return null!=n&&null==n.constructor},x.prototype.setState=function(n,l){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=w({},this.state),"function"==typeof n&&(n=n(w({},t),this.props)),n&&w(t,n),null!=n&&this.__v&&(l&&this._sb.push(l),M(this))},x.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),M(this))},x.prototype.render=k,i=[],r="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e=function(n,l){return n.__v.__b-l.__v.__b},P.__r=0,f=/(PointerCapture)$|Capture$/i,c=0,s=A(!1),a=A(!0),h=0;export{x as Component,k as Fragment,G as cloneElement,J as createContext,g as createElement,b as createRef,g as h,E as hydrate,u as isValidElement,l as options,D as render,L as toChildArray};
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { JSX } from "./jsx-runtime.d.ts";
|
|
2
|
+
import type { Slot, DefaultSlot } from "./UI5Element.js";
|
|
2
3
|
export type LowercaseString<T> = T extends string ? Lowercase<T> : never;
|
|
4
|
+
export type { Slot, DefaultSlot, };
|
|
3
5
|
export type PromiseResolve = (value: void | PromiseLike<void>) => void;
|
|
4
6
|
export type Timeout = ReturnType<typeof setTimeout>;
|
|
5
7
|
export type Interval = ReturnType<typeof setInterval>;
|
|
@@ -24,6 +26,7 @@ export type AccessibilityInfo = {
|
|
|
24
26
|
role?: AriaRole;
|
|
25
27
|
type?: string;
|
|
26
28
|
description?: string;
|
|
29
|
+
label?: string;
|
|
27
30
|
disabled?: boolean;
|
|
28
31
|
readonly?: boolean;
|
|
29
32
|
required?: boolean;
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { JSX } from \"./jsx-runtime.d.ts\";\n\n// General utils\nexport type LowercaseString<T> = T extends string ? Lowercase<T> : never;\n\n// Core Framework types\nexport type PromiseResolve = (value: void | PromiseLike<void>) => void;\nexport type Timeout = ReturnType<typeof setTimeout>;\nexport type Interval = ReturnType<typeof setInterval>;\n\nexport type StyleData = string;\n\nexport type ComponentStylesData = Array<ComponentStylesData> | string;\nexport type ClassMapValue = Record<string, boolean>\n\nexport type ClassMap = { [x: string] : ClassMapValue | ClassMap };\n\nexport type PassiveEventListenerObject = EventListenerObject & { passive: boolean };\n\n// Accessibility\nexport type AriaRole = JSX.AriaRole;\nexport type AriaDisabled = JSX.AriaAttributes[\"aria-disabled\"];\nexport type AriaChecked = JSX.AriaAttributes[\"aria-checked\"];\nexport type AriaReadonly = JSX.AriaAttributes[\"aria-readonly\"];\nexport type AriaHasPopup = \"dialog\" | \"grid\" | \"listbox\" | \"menu\" | \"tree\" | \"false\";\nexport type AriaCurrent = \"page\" | \"step\" | \"location\" | \"date\" | \"time\" | \"true\" | \"false\" | boolean | undefined;\nexport type AriaAutoComplete = \"list\" | \"none\" | \"inline\" | \"both\" | undefined;\nexport type AriaLandmarkRole = \"none\" | \"banner\" | \"main\" | \"region\" | \"navigation\" | \"search\" | \"complementary\" | \"form\" | \"contentinfo\"\n\nexport type AccessibilityInfo = {\n\t// The WAI-ARIA role of the component.\n\trole?: AriaRole,\n\n\t// A translated text that represents the component type.\n\ttype?: string,\n\n\t// A translated text that represents relevant component description/state - value, placeholder,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { JSX } from \"./jsx-runtime.d.ts\";\nimport type { Slot, DefaultSlot } from \"./UI5Element.js\";\n\n// General utils\nexport type LowercaseString<T> = T extends string ? Lowercase<T> : never;\n\n// Core Framework types\nexport type {\n\tSlot,\n\tDefaultSlot,\n};\n\nexport type PromiseResolve = (value: void | PromiseLike<void>) => void;\nexport type Timeout = ReturnType<typeof setTimeout>;\nexport type Interval = ReturnType<typeof setInterval>;\n\nexport type StyleData = string;\n\nexport type ComponentStylesData = Array<ComponentStylesData> | string;\nexport type ClassMapValue = Record<string, boolean>\n\nexport type ClassMap = { [x: string] : ClassMapValue | ClassMap };\n\nexport type PassiveEventListenerObject = EventListenerObject & { passive: boolean };\n\n// Accessibility\nexport type AriaRole = JSX.AriaRole;\nexport type AriaDisabled = JSX.AriaAttributes[\"aria-disabled\"];\nexport type AriaChecked = JSX.AriaAttributes[\"aria-checked\"];\nexport type AriaReadonly = JSX.AriaAttributes[\"aria-readonly\"];\nexport type AriaHasPopup = \"dialog\" | \"grid\" | \"listbox\" | \"menu\" | \"tree\" | \"false\";\nexport type AriaCurrent = \"page\" | \"step\" | \"location\" | \"date\" | \"time\" | \"true\" | \"false\" | boolean | undefined;\nexport type AriaAutoComplete = \"list\" | \"none\" | \"inline\" | \"both\" | undefined;\nexport type AriaLandmarkRole = \"none\" | \"banner\" | \"main\" | \"region\" | \"navigation\" | \"search\" | \"complementary\" | \"form\" | \"contentinfo\"\n\nexport type AccessibilityInfo = {\n\t// The WAI-ARIA role of the component.\n\trole?: AriaRole,\n\n\t// A translated text that represents the component type.\n\ttype?: string,\n\n\t// A translated text that represents relevant component description/state - value, placeholder, etc.\n\tdescription?: string,\n\n\t// Label of the component, e.g. `accessible-name` or `accessible-name-ref` for form elements.\n\tlabel?: string,\n\n\t// Disabled state of the component.\n\tdisabled?: boolean,\n\n\t// Readonly state of the component.\n\treadonly?: boolean,\n\n\t// Required state of the component.\n\trequired?: boolean,\n\n\t// An array of nodes, aggregated by the component\n\t// **Note:** Children should only be provided when it is helpful to understand the accessibility context.\n\tchildren?: Array<Node>,\n}\n\nexport type AccessibilityAttributes = {\n\tariaSetsize?: number,\n\tariaPosinset?: number,\n\tariaLabel?: string,\n\tcontrols?: LowercaseString<string>\n\texpanded?: \"true\" | \"false\" | boolean,\n\thasPopup?: AriaHasPopup,\n\tname?: string,\n\trole?: AriaRole,\n\tariaKeyShortcuts?: string,\n\tariaCurrent?: AriaCurrent,\n\tcurrent?: AriaCurrent,\n\troleDescription?: string,\n\ttitle?: string,\n}\n"]}
|
package/dist/updateShadowRoot.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import getConstructableStyle from "./theming/getConstructableStyle.js";
|
|
2
|
+
import { getComponentStyles } from "./theming/componentStyles.js";
|
|
2
3
|
/**
|
|
3
4
|
* Updates the shadow root of a UI5Element or its static area item
|
|
4
5
|
* @param element
|
|
@@ -10,7 +11,7 @@ const updateShadowRoot = (element) => {
|
|
|
10
11
|
console.warn(`There is no shadow root to update`); // eslint-disable-line
|
|
11
12
|
return;
|
|
12
13
|
}
|
|
13
|
-
shadowRoot.adoptedStyleSheets = getConstructableStyle(ctor);
|
|
14
|
+
shadowRoot.adoptedStyleSheets = [getComponentStyles(), ...getConstructableStyle(ctor)];
|
|
14
15
|
ctor.renderer(element, shadowRoot);
|
|
15
16
|
};
|
|
16
17
|
export default updateShadowRoot;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateShadowRoot.js","sourceRoot":"","sources":["../src/updateShadowRoot.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"updateShadowRoot.js","sourceRoot":"","sources":["../src/updateShadowRoot.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAGlE;;;GAGG;AACH,MAAM,gBAAgB,GAAG,CAAC,OAAmB,EAAE,EAAE;IAChD,MAAM,IAAI,GAAG,OAAO,CAAC,WAAgC,CAAC;IACtD,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAEtC,IAAI,CAAC,UAAU,EAAE,CAAC;QACjB,OAAO,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC,CAAC,sBAAsB;QACzE,OAAO;IACR,CAAC;IAED,UAAU,CAAC,kBAAkB,GAAG,CAAC,kBAAkB,EAAE,EAAE,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC;IACvF,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AACpC,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["import getConstructableStyle from \"./theming/getConstructableStyle.js\";\nimport { getComponentStyles } from \"./theming/componentStyles.js\";\nimport type UI5Element from \"./UI5Element.js\";\n\n/**\n * Updates the shadow root of a UI5Element or its static area item\n * @param element\n */\nconst updateShadowRoot = (element: UI5Element) => {\n\tconst ctor = element.constructor as typeof UI5Element;\n\tconst shadowRoot = element.shadowRoot;\n\n\tif (!shadowRoot) {\n\t\tconsole.warn(`There is no shadow root to update`); // eslint-disable-line\n\t\treturn;\n\t}\n\n\tshadowRoot.adoptedStyleSheets = [getComponentStyles(), ...getConstructableStyle(ctor)];\n\tctor.renderer(element, shadowRoot);\n};\n\nexport default updateShadowRoot;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectionAssistant.js","sourceRoot":"","sources":["../../src/util/SelectionAssistant.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KAAK;QACtB,MAAM,EAAE,SAAS,CAAC,MAAM;QACxB,IAAI,EAAE,SAAS,CAAC,IAAI;KACpB,CAAC;IAEF,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAElC,OAAO,EAAE,GAAG,UAAU,EAAE,YAAY,EAAE,CAAC;AACxC,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,CAAC,OAAoB,EAAE,EAAE;IACpD,MAAM,YAAY,GAAG,OAAO,CAAC,UAAW,CAAC,aAAa,CAAC,UAAU,CAAC;WAC9D,OAAO,CAAC,UAAW,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAE/C,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,sBAAsB,CAAC,EAAE,CAAC;QACtD,UAAU,EAAE,CAAC;IACd,CAAC;IAED,MAAM,aAAa,GAAG,QAAQ,CAAC,cAAc,CAC5C,sBAAsB,CACrB,CAAC;IAEH,aAAa,CAAC,WAAW,GAAG,YAAa,CAAC,KAAK,CAAC;IAEhD,IAAI,YAAY,EAAE,CAAC;QAClB,kBAAkB,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;IACjD,CAAC;IAED,OAAO,uBAAuB,CAAC,YAAa,EAAE,aAA+B,CAAC,CAAC;AAChF,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC","sourcesContent":["const copyAndApplyStyles = (element: HTMLElement, copiedElement: HTMLElement) => {\n\tconst computedStyles = getComputedStyle(element);\n\n\tfor (let i = 0; i < computedStyles.length; i++) {\n\t\tconst propertyName = computedStyles[i];\n\t\tcopiedElement.style.setProperty(propertyName, computedStyles.getPropertyValue(propertyName));\n\t}\n\n\telement.tagName === \"INPUT\" && setInputSpecificStyles(copiedElement);\n\n\tcopiedElement.style.position = \"absolute\";\n\tcopiedElement.style.left = `${element.getBoundingClientRect().left}px`;\n\tcopiedElement.style.top = `${element.getBoundingClientRect().top}px`;\n\n\tsetUnInteractableStyles(copiedElement);\n\n\tdocument.body.appendChild(copiedElement);\n};\n\nconst setUnInteractableStyles = (element: HTMLElement) => {\n\telement.style.position = \"absolute\";\n\telement.style.userSelect = \"none\";\n\telement.style.pointerEvents = \"none\";\n\telement.style.zIndex = \"-1\";\n\telement.style.opacity = \"0\";\n};\n\nconst setInputSpecificStyles = (element: HTMLElement) => {\n\telement.style.whiteSpace = \"nowrap\";\n\telement.style.overflowX = \"auto\";\n\telement.style.overflowY = \"hidden\";\n};\n\nconst createCopy = () => {\n\tconst copiedElement = document.createElement(\"div\");\n\n\tcopiedElement.id = \"ui5-selection-mirror\";\n\tcopiedElement.contentEditable = \"true\";\n\n\tdocument.body.appendChild(copiedElement);\n};\n\nconst applyScrollPosition = (element: HTMLElement, copiedElement: HTMLElement) => {\n\tcopiedElement.scrollTop = element.scrollTop;\n\tcopiedElement.scrollLeft = element.scrollLeft;\n};\n\nconst getSelectionCoordinates = (element: HTMLInputElement | HTMLTextAreaElement, mirror: HTMLDivElement) => {\n\tconst { selectionStart, selectionEnd } = element;\n\tconst selectedText = element.value.slice(\n\t\tselectionStart!,\n\t\telement.selectionEnd!,\n\t);\n\tconst range = document.createRange();\n\n\trange.setStart(mirror.firstChild!, selectionEnd! - 1);\n\trange.setEnd(mirror.firstChild!, selectionEnd!);\n\n\tapplyScrollPosition(element, mirror);\n\n\tconst rangeRect = range.getBoundingClientRect();\n\tconst rectObject = {\n\t\tx: rangeRect.x,\n\t\ty: rangeRect.y,\n\t\twidth: rangeRect.width,\n\t\theight: rangeRect.height,\n\t\ttop: rangeRect.top,\n\t\tright: rangeRect.right,\n\t\tbottom: rangeRect.bottom,\n\t\tleft: rangeRect.left,\n\t};\n\n\tdocument.body.removeChild(mirror);\n\n\treturn { ...rectObject, selectedText };\n};\n\nconst getElementSelection = (element: HTMLElement) => {\n\tconst innerElement = element.shadowRoot!.querySelector(\"textarea\")\n\t\t|| element.shadowRoot!.querySelector(\"input\");\n\n\tif (!document.getElementById(\"ui5-selection-mirror\")) {\n\t\tcreateCopy();\n\t}\n\n\tconst copiedElement = document.getElementById(\n\t\t\"ui5-selection-mirror\",\n\t)!;\n\n\tcopiedElement.textContent = innerElement!.value;\n\n\tif (innerElement) {\n\t\tcopyAndApplyStyles(innerElement, copiedElement);\n\t}\n\n\treturn getSelectionCoordinates(innerElement!, copiedElement as HTMLDivElement);\n};\n\nexport default getElementSelection;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createInstanceChecker.js","sourceRoot":"","sources":["../../src/util/createInstanceChecker.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,SAAS,aAAa,CAAiC,IAAO;IAC7D,OAAO,CAAC,MAAW,EAAe,EAAE;QACnC,OAAO,MAAM,KAAK,SAAS,IAAI,IAAI,IAAI,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IACxE,CAAC,CAAC;AACH,CAAC;AAED,eAAe,aAAa,CAAC","sourcesContent":["// createInstanceChecker<A>(\"isAItem\")\nfunction createChecker<T, P extends keyof T = keyof T>(prop: P) {\n\treturn (object: any): object is T => {\n\t\treturn object !== undefined && prop in object && object[prop] === true;\n\t};\n}\n\nexport default createChecker;\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Allows filtering of multiple types at once
|
|
2
|
+
// const isInstanceOfAOrB = createMultiInstanceChecker<A | B>(["isAItem", "isBItem"])
|
|
3
|
+
// const filteredItems = items.filter(isInstanceOfAOrB)
|
|
4
|
+
//
|
|
5
|
+
// Alternatively, use "createInstanceChecker" and filter separately:
|
|
6
|
+
// const isInstanceOfA = createInstanceChecker<A>("isAItem");
|
|
7
|
+
// const isInstanceOfB = createInstanceChecker<A>("isBItem")
|
|
8
|
+
// const filteredItems = [...items.filter(isInstanceOfA), ...items.filter(isInstanceOfB)];
|
|
9
|
+
export const createMultiInstanceChecker = (props) => {
|
|
10
|
+
return (object) => {
|
|
11
|
+
if (!object) {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
const propsArray = Array.isArray(props) ? props : [props];
|
|
15
|
+
return propsArray.some(prop => prop in object && object[prop] === true);
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export default createMultiInstanceChecker;
|
|
19
|
+
//# sourceMappingURL=createMultiInstanceChecker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createMultiInstanceChecker.js","sourceRoot":"","sources":["../../src/util/createMultiInstanceChecker.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qFAAqF;AACrF,uDAAuD;AACvD,EAAE;AACF,oEAAoE;AACpE,6DAA6D;AAC7D,4DAA4D;AAC5D,0FAA0F;AAC1F,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAI,KAAwB,EAAE,EAAE;IACzE,OAAO,CAAC,MAAW,EAAe,EAAE;QACnC,IAAI,CAAC,MAAM,EAAE,CAAC;YACb,OAAO,KAAK,CAAC;QACd,CAAC;QAED,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QAC1D,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;IACzE,CAAC,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,0BAA0B,CAAC","sourcesContent":["// Allows filtering of multiple types at once\n// const isInstanceOfAOrB = createMultiInstanceChecker<A | B>([\"isAItem\", \"isBItem\"])\n// const filteredItems = items.filter(isInstanceOfAOrB)\n//\n// Alternatively, use \"createInstanceChecker\" and filter separately:\n// const isInstanceOfA = createInstanceChecker<A>(\"isAItem\");\n// const isInstanceOfB = createInstanceChecker<A>(\"isBItem\")\n// const filteredItems = [...items.filter(isInstanceOfA), ...items.filter(isInstanceOfB)];\nexport const createMultiInstanceChecker = <T>(props: string[] | string) => {\n\treturn (object: any): object is T => {\n\t\tif (!object) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst propsArray = Array.isArray(props) ? props : [props];\n\t\treturn propsArray.some(prop => prop in object && object[prop] === true);\n\t};\n};\n\nexport default createMultiInstanceChecker;\n"]}
|
|
@@ -29,7 +29,7 @@ type MoveEventDetail = {
|
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
declare const DragRegistry: {
|
|
32
|
-
setDraggedElement: (element: HTMLElement | null) => void;
|
|
32
|
+
setDraggedElement: (element: HTMLElement | null, e?: DragEvent) => void;
|
|
33
33
|
clearDraggedElement: () => void;
|
|
34
34
|
getDraggedElement: () => HTMLElement | null;
|
|
35
35
|
startMultipleDrag: (count: number, e: DragEvent) => Promise<void>;
|
|
@@ -3,8 +3,12 @@ import { getI18nBundle } from "../../i18nBundle.js";
|
|
|
3
3
|
import { DRAG_DROP_MULTIPLE_TEXT, } from "../../generated/i18n/i18n-defaults.js";
|
|
4
4
|
const MIN_MULTI_DRAG_COUNT = 2;
|
|
5
5
|
let draggedElement = null;
|
|
6
|
-
const setDraggedElement = (element) => {
|
|
6
|
+
const setDraggedElement = (element, e) => {
|
|
7
7
|
draggedElement = element;
|
|
8
|
+
// Store the dragged element's ID in the dataTransfer object to ensure
|
|
9
|
+
// the drag operation is recognized across different browsers and contexts.
|
|
10
|
+
// Without this, Safari browser in iOS may not recognize the drag operation.
|
|
11
|
+
e?.dataTransfer?.setData("text/plain", element ? element.id : "");
|
|
8
12
|
};
|
|
9
13
|
const clearDraggedElement = () => {
|
|
10
14
|
draggedElement = null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DragRegistry.js","sourceRoot":"","sources":["../../../src/util/dragAndDrop/DragRegistry.ts"],"names":[],"mappings":"AACA,OAAO,oBAAoB,MAAM,8CAA8C,CAAC;AAEhF,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EACN,uBAAuB,GACvB,MAAM,uCAAu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Aa,EAAE,CAAC;IACnC,MAAM,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC;IAEzC,iBAAiB,CAAC,kBAAkB,GAAG,CAAC,MAAM,CAAC,CAAC;IAChD,iBAAiB,CAAC,WAAW,GAAG,UAAU,CAAC,OAAO,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC;IAEnF,OAAO,WAAW,CAAC;AACpB,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,iBAAiB,GAAG,KAAK,EAAE,KAAa,EAAE,CAAY,EAAE,EAAE;IAC/D,IAAI,KAAK,GAAG,oBAAoB,EAAE,CAAC;QAClC,OAAO,CAAC,IAAI,CAAC,yCAAyC,KAAK,gBAAgB,oBAAoB,GAAG,CAAC,CAAC,CAAC,sBAAsB;QAC3H,OAAO;IACR,CAAC;IAED,IAAI,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC;QACrB,OAAO;IACR,CAAC;IAED,MAAM,iBAAiB,GAAG,MAAM,6BAA6B,CAAC,KAAK,CAAC,CAAC;IAErE,mCAAmC;IACnC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAE7C,CAAC,CAAC,YAAY,CAAC,YAAY,CAAC,iBAAiB,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAErD,iEAAiE;IACjE,qBAAqB,CAAC,GAAG,EAAE;QAC1B,iBAAiB,CAAC,MAAM,EAAE,CAAC;IAC5B,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAwBF,MAAM,YAAY,GAAG;IACpB,iBAAiB;IACjB,mBAAmB;IACnB,iBAAiB;IACjB,iBAAiB;CACjB,CAAC;AAEF,eAAe,YAAY,CAAC;AAC5B,OAAO,EACN,iBAAiB,GACjB,CAAC","sourcesContent":["import type MovePlacement from \"../../types/MovePlacement.js\";\nimport MultipleDragGhostCss from \"../../generated/css/MultipleDragGhost.css.js\";\n\nimport { getI18nBundle } from \"../../i18nBundle.js\";\n\nimport {\n\tDRAG_DROP_MULTIPLE_TEXT,\n} from \"../../generated/i18n/i18n-defaults.js\";\n\nconst MIN_MULTI_DRAG_COUNT = 2;\n\nlet draggedElement: HTMLElement | null = null;\n\nconst setDraggedElement = (element: HTMLElement | null, e?: DragEvent) => {\n\tdraggedElement = element;\n\n\t// Store the dragged element's ID in the dataTransfer object to ensure\n\t// the drag operation is recognized across different browsers and contexts.\n\t// Without this, Safari browser in iOS may not recognize the drag operation.\n\te?.dataTransfer?.setData(\"text/plain\", element ? element.id : \"\");\n};\n\nconst clearDraggedElement = () => {\n\tdraggedElement = null;\n};\n\nconst getDraggedElement = () => {\n\treturn draggedElement;\n};\n\nconst createDefaultMultiDragElement = async (count: number): Promise<HTMLElement> => {\n\tconst dragElement = document.createElement(\"div\");\n\tconst i18nBundle = await getI18nBundle(\"@ui5/webcomponents-base\");\n\n\tconst dragElementShadow = dragElement.attachShadow({ mode: \"open\" });\n\n\tconst styles = new CSSStyleSheet();\n\tstyles.replaceSync(MultipleDragGhostCss);\n\n\tdragElementShadow.adoptedStyleSheets = [styles];\n\tdragElementShadow.textContent = i18nBundle.getText(DRAG_DROP_MULTIPLE_TEXT, count);\n\n\treturn dragElement;\n};\n\n/**\n * Starts a multiple drag operation by creating a drag ghost element.\n * The drag ghost will be displayed when dragging multiple items.\n *\n * @param {number} count - The number of items being dragged.\n * @param {DragEvent} e - The drag event that triggered the operation.\n * @public\n */\nconst startMultipleDrag = async (count: number, e: DragEvent) => {\n\tif (count < MIN_MULTI_DRAG_COUNT) {\n\t\tconsole.warn(`Cannot start multiple drag with count ${count}. Minimum is ${MIN_MULTI_DRAG_COUNT}.`); // eslint-disable-line\n\t\treturn;\n\t}\n\n\tif (!e.dataTransfer) {\n\t\treturn;\n\t}\n\n\tconst customDragElement = await createDefaultMultiDragElement(count);\n\n\t// Add to document body temporarily\n\tdocument.body.appendChild(customDragElement);\n\n\te.dataTransfer.setDragImage(customDragElement, 0, 0);\n\n\t// Clean up the temporary element after the drag operation starts\n\trequestAnimationFrame(() => {\n\t\tcustomDragElement.remove();\n\t});\n};\n\ntype DragAndDropSettings = {\n\t/**\n\t * Allow cross-browser and file drag and drop.\n\t */\n\tcrossDnD?: boolean;\n\t/**\n\t * Pass the original event in the event parameters.\n\t */\n\toriginalEvent?: boolean;\n};\n\ntype MoveEventDetail = {\n\toriginalEvent: Event,\n\tsource: {\n\t\telement: HTMLElement,\n\t},\n\tdestination: {\n\t\telement: HTMLElement,\n\t\tplacement: `${MovePlacement}`,\n\t}\n};\n\nconst DragRegistry = {\n\tsetDraggedElement,\n\tclearDraggedElement,\n\tgetDraggedElement,\n\tstartMultipleDrag,\n};\n\nexport default DragRegistry;\nexport {\n\tstartMultipleDrag,\n};\n\nexport type {\n\tDragAndDropSettings,\n\tMoveEventDetail,\n};\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate markup for a raw string where the first match following StartsWithPerTerm pattern is wrapped with `<b>` tag.
|
|
3
|
+
* StartsWithPerTerm pattern: finds the first word (at start or after whitespace) that starts with the search text.
|
|
4
|
+
* All inputs to this function are considered literal text, and special characters will always be escaped.
|
|
5
|
+
* @param {string} text The text to add highlighting to
|
|
6
|
+
* @param {string} textToHighlight The text which should be highlighted (case-insensitive)
|
|
7
|
+
* @return {string} the markup HTML which contains the first match surrounded with a `<b>` tag.
|
|
8
|
+
*/
|
|
9
|
+
declare function generateHighlightedMarkupFirstMatch(text: string, textToHighlight: string): string;
|
|
10
|
+
export default generateHighlightedMarkupFirstMatch;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import escapeRegex from "./escapeRegex.js";
|
|
2
|
+
// @ts-expect-error
|
|
3
|
+
import encodeXML from "../sap/base/security/encodeXML.js";
|
|
4
|
+
/**
|
|
5
|
+
* Generate markup for a raw string where the first match following StartsWithPerTerm pattern is wrapped with `<b>` tag.
|
|
6
|
+
* StartsWithPerTerm pattern: finds the first word (at start or after whitespace) that starts with the search text.
|
|
7
|
+
* All inputs to this function are considered literal text, and special characters will always be escaped.
|
|
8
|
+
* @param {string} text The text to add highlighting to
|
|
9
|
+
* @param {string} textToHighlight The text which should be highlighted (case-insensitive)
|
|
10
|
+
* @return {string} the markup HTML which contains the first match surrounded with a `<b>` tag.
|
|
11
|
+
*/
|
|
12
|
+
function generateHighlightedMarkupFirstMatch(text, textToHighlight) {
|
|
13
|
+
const normalizedText = text || "";
|
|
14
|
+
if (!normalizedText || !textToHighlight) {
|
|
15
|
+
return encodeXML(normalizedText);
|
|
16
|
+
}
|
|
17
|
+
const filterValue = textToHighlight.toLowerCase();
|
|
18
|
+
const lowerText = normalizedText.toLowerCase();
|
|
19
|
+
const matchLength = textToHighlight.length;
|
|
20
|
+
// Find the first word that starts with textToHighlight (StartsWithPerTerm pattern)
|
|
21
|
+
let matchIndex = lowerText.search(new RegExp(`(^|\\s)${escapeRegex(filterValue)}`));
|
|
22
|
+
if (matchIndex !== -1 && lowerText[matchIndex] === " ") {
|
|
23
|
+
matchIndex++; // Skip the space
|
|
24
|
+
}
|
|
25
|
+
// If no match found, return encoded text
|
|
26
|
+
if (matchIndex === -1) {
|
|
27
|
+
return encodeXML(normalizedText);
|
|
28
|
+
}
|
|
29
|
+
// Build highlighted markup with only the first match
|
|
30
|
+
const beforeMatch = encodeXML(normalizedText.substring(0, matchIndex));
|
|
31
|
+
const match = encodeXML(normalizedText.substring(matchIndex, matchIndex + matchLength));
|
|
32
|
+
const afterMatch = encodeXML(normalizedText.substring(matchIndex + matchLength));
|
|
33
|
+
return `${beforeMatch}<b>${match}</b>${afterMatch}`;
|
|
34
|
+
}
|
|
35
|
+
export default generateHighlightedMarkupFirstMatch;
|
|
36
|
+
//# sourceMappingURL=generateHighlightedMarkupFirstMatch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateHighlightedMarkupFirstMatch.js","sourceRoot":"","sources":["../../src/util/generateHighlightedMarkupFirstMatch.ts"],"names":[],"mappings":"AAAA,OAAO,WAA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AAC;AAED,eAAe,mCAAmC,CAAC","sourcesContent":["import escapeRegex from \"./escapeRegex.js\";\n// @ts-expect-error\nimport encodeXML from \"../sap/base/security/encodeXML.js\";\n\n/**\n * Generate markup for a raw string where the first match following StartsWithPerTerm pattern is wrapped with `<b>` tag.\n * StartsWithPerTerm pattern: finds the first word (at start or after whitespace) that starts with the search text.\n * All inputs to this function are considered literal text, and special characters will always be escaped.\n * @param {string} text The text to add highlighting to\n * @param {string} textToHighlight The text which should be highlighted (case-insensitive)\n * @return {string} the markup HTML which contains the first match surrounded with a `<b>` tag.\n */\nfunction generateHighlightedMarkupFirstMatch(text: string, textToHighlight: string): string {\n\tconst normalizedText = text || \"\";\n\n\tif (!normalizedText || !textToHighlight) {\n\t\treturn encodeXML(normalizedText) as string;\n\t}\n\n\tconst filterValue = textToHighlight.toLowerCase();\n\tconst lowerText = normalizedText.toLowerCase();\n\tconst matchLength = textToHighlight.length;\n\n\t// Find the first word that starts with textToHighlight (StartsWithPerTerm pattern)\n\tlet matchIndex = lowerText.search(new RegExp(`(^|\\\\s)${escapeRegex(filterValue)}`));\n\tif (matchIndex !== -1 && lowerText[matchIndex] === \" \") {\n\t\tmatchIndex++; // Skip the space\n\t}\n\n\t// If no match found, return encoded text\n\tif (matchIndex === -1) {\n\t\treturn encodeXML(normalizedText) as string;\n\t}\n\n\t// Build highlighted markup with only the first match\n\tconst beforeMatch = encodeXML(normalizedText.substring(0, matchIndex)) as string;\n\tconst match = encodeXML(normalizedText.substring(matchIndex, matchIndex + matchLength)) as string;\n\tconst afterMatch = encodeXML(normalizedText.substring(matchIndex + matchLength)) as string;\n\n\treturn `${beforeMatch}<b>${match}</b>${afterMatch}`;\n}\n\nexport default generateHighlightedMarkupFirstMatch;\n"]}
|
|
@@ -32,6 +32,7 @@ declare const getClassCopy: (klass: typeof UI5Element, constructorCallback: () =
|
|
|
32
32
|
readonly _id: string;
|
|
33
33
|
render(): object;
|
|
34
34
|
connectedCallback(): Promise<void>;
|
|
35
|
+
readonly definePromise: Promise<void>;
|
|
35
36
|
disconnectedCallback(): void;
|
|
36
37
|
onBeforeRendering(): void;
|
|
37
38
|
onAfterRendering(): void;
|
|
@@ -433,7 +434,7 @@ declare const getClassCopy: (klass: typeof UI5Element, constructorCallback: () =
|
|
|
433
434
|
fetchI18nBundles(): Promise<import("../i18nBundle.js").default[]>;
|
|
434
435
|
fetchCLDR(): Promise<void>;
|
|
435
436
|
asyncFinished: boolean;
|
|
436
|
-
|
|
437
|
+
_definePromise: Promise<void> | undefined;
|
|
437
438
|
i18nBundleStorage: Record<string, import("../i18nBundle.js").default>;
|
|
438
439
|
readonly i18nBundles: Record<string, import("../i18nBundle.js").default>;
|
|
439
440
|
define(): typeof UI5Element;
|
|
@@ -3,41 +3,47 @@ const getMetaTagValue = (metaTagName) => {
|
|
|
3
3
|
const metaTag = document.querySelector(`META[name="${metaTagName}"]`), metaTagContent = metaTag && metaTag.getAttribute("content");
|
|
4
4
|
return metaTagContent;
|
|
5
5
|
};
|
|
6
|
-
const validateThemeOrigin = (origin) => {
|
|
6
|
+
const validateThemeOrigin = (origin, isSameOrigin = false) => {
|
|
7
7
|
const allowedOrigins = getMetaTagValue("sap-allowed-theme-origins") ?? getMetaTagValue("sap-allowedThemeOrigins"); // Prioritize the new meta tag name
|
|
8
8
|
// If no allowed origins are specified, block.
|
|
9
9
|
if (!allowedOrigins) {
|
|
10
10
|
return false;
|
|
11
11
|
}
|
|
12
|
+
// If it's same-origin (relative URL resolved to current page), allow it when there's any meta tag present
|
|
13
|
+
// The presence of the meta tag indicates the user wants to use theme roots
|
|
14
|
+
if (isSameOrigin) {
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
12
17
|
return allowedOrigins.split(",").some(allowedOrigin => {
|
|
13
18
|
return allowedOrigin === "*" || origin === allowedOrigin.trim();
|
|
14
19
|
});
|
|
15
20
|
};
|
|
16
|
-
const buildCorrectUrl = (oldUrl, newOrigin) => {
|
|
17
|
-
const oldUrlPath = new URL(oldUrl).pathname;
|
|
18
|
-
return new URL(oldUrlPath, newOrigin).toString();
|
|
19
|
-
};
|
|
20
21
|
const validateThemeRoot = (themeRoot) => {
|
|
21
22
|
let resultUrl;
|
|
23
|
+
let isSameOrigin = false;
|
|
22
24
|
try {
|
|
23
|
-
if (themeRoot.startsWith(".") || themeRoot.startsWith("/")) {
|
|
25
|
+
if (themeRoot.startsWith(".") || (themeRoot.startsWith("/") && !themeRoot.startsWith("//"))) {
|
|
24
26
|
// Handle relative url
|
|
25
27
|
// new URL("/newExmPath", "http://example.com/exmPath") => http://example.com/newExmPath
|
|
26
28
|
// new URL("./newExmPath", "http://example.com/exmPath") => http://example.com/exmPath/newExmPath
|
|
27
29
|
// new URL("../newExmPath", "http://example.com/exmPath") => http://example.com/newExmPath
|
|
28
30
|
resultUrl = new URL(themeRoot, getLocationHref()).toString();
|
|
31
|
+
isSameOrigin = true;
|
|
29
32
|
}
|
|
30
33
|
else {
|
|
31
|
-
|
|
34
|
+
// Protocol-relative URLs (//host/path) need a base to resolve the protocol
|
|
35
|
+
const themeRootURL = themeRoot.startsWith("//") ? new URL(themeRoot, getLocationHref()) : new URL(themeRoot);
|
|
32
36
|
const origin = themeRootURL.origin;
|
|
33
|
-
|
|
37
|
+
const currentOrigin = new URL(getLocationHref()).origin;
|
|
38
|
+
// Check if the absolute URL is same-origin
|
|
39
|
+
isSameOrigin = origin === currentOrigin;
|
|
40
|
+
if (origin && validateThemeOrigin(origin, isSameOrigin)) {
|
|
34
41
|
// If origin is allowed, use it
|
|
35
42
|
resultUrl = themeRootURL.toString();
|
|
36
43
|
}
|
|
37
44
|
else {
|
|
38
|
-
// If origin is not
|
|
39
|
-
|
|
40
|
-
resultUrl = buildCorrectUrl(themeRootURL.toString(), getLocationHref());
|
|
45
|
+
// If origin is not allowed, return undefined to indicate validation failed
|
|
46
|
+
return undefined;
|
|
41
47
|
}
|
|
42
48
|
}
|
|
43
49
|
if (!resultUrl.endsWith("/")) {
|
|
@@ -47,6 +53,7 @@ const validateThemeRoot = (themeRoot) => {
|
|
|
47
53
|
}
|
|
48
54
|
catch (e) {
|
|
49
55
|
// Catch if URL is not correct
|
|
56
|
+
return undefined;
|
|
50
57
|
}
|
|
51
58
|
};
|
|
52
59
|
export default validateThemeRoot;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateThemeRoot.js","sourceRoot":"","sources":["../src/validateThemeRoot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,eAAe,GAAG,CAAC,WAAmB,EAAE,EAAE;IAC/C,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,cAAc,WAAW,IAAI,CAAC,EACpE,cAAc,GAAG,OAAO,IAAI,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IAE7D,OAAO,cAAc,CAAC;AACvB,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,CAAC,MAAc,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"validateThemeRoot.js","sourceRoot":"","sources":["../src/validateThemeRoot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,eAAe,GAAG,CAAC,WAAmB,EAAE,EAAE;IAC/C,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,cAAc,WAAW,IAAI,CAAC,EACpE,cAAc,GAAG,OAAO,IAAI,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IAE7D,OAAO,cAAc,CAAC;AACvB,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,CAAC,MAAc,EAAE,eAAwB,KAAK,EAAE,EAAE;IAC7E,MAAM,cAAc,GAAG,eAAe,CAAC,2BAA2B,CAAC,IAAI,eAAe,CAAC,yBAAyB,CAAC,CAAC,CAAC,mCAAmC;IAEtJ,8CAA8C;IAC9C,IAAI,CAAC,cAAc,EAAE,CAAC;QACrB,OAAO,KAAK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AC,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC;gBACzD,+BAA+B;gBAC/B,SAAS,GAAG,YAAY,CAAC,QAAQ,EAAE,CAAC;YACrC,CAAC;iBAAM,CAAC;gBACP,2EAA2E;gBAC3E,OAAO,SAAS,CAAC;YAClB,CAAC;QACF,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAC9B,SAAS,GAAG,GAAG,SAAS,GAAG,CAAC;QAC7B,CAAC;QAED,OAAO,GAAG,SAAS,MAAM,CAAC;IAC3B,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACZ,8BAA8B;QAC9B,OAAO,SAAS,CAAC;IAClB,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["import { getLocationHref } from \"./Location.js\";\n\nconst getMetaTagValue = (metaTagName: string) => {\n\tconst metaTag = document.querySelector(`META[name=\"${metaTagName}\"]`),\n\t\tmetaTagContent = metaTag && metaTag.getAttribute(\"content\");\n\n\treturn metaTagContent;\n};\n\nconst validateThemeOrigin = (origin: string, isSameOrigin: boolean = false) => {\n\tconst allowedOrigins = getMetaTagValue(\"sap-allowed-theme-origins\") ?? getMetaTagValue(\"sap-allowedThemeOrigins\"); // Prioritize the new meta tag name\n\n\t// If no allowed origins are specified, block.\n\tif (!allowedOrigins) {\n\t\treturn false;\n\t}\n\n\t// If it's same-origin (relative URL resolved to current page), allow it when there's any meta tag present\n\t// The presence of the meta tag indicates the user wants to use theme roots\n\tif (isSameOrigin) {\n\t\treturn true;\n\t}\n\n\treturn allowedOrigins.split(\",\").some(allowedOrigin => {\n\t\treturn allowedOrigin === \"*\" || origin === allowedOrigin.trim();\n\t});\n};\n\nconst validateThemeRoot = (themeRoot: string) => {\n\tlet resultUrl;\n\tlet isSameOrigin = false;\n\n\ttry {\n\t\tif (themeRoot.startsWith(\".\") || (themeRoot.startsWith(\"/\") && !themeRoot.startsWith(\"//\"))) {\n\t\t\t// Handle relative url\n\t\t\t// new URL(\"/newExmPath\", \"http://example.com/exmPath\") => http://example.com/newExmPath\n\t\t\t// new URL(\"./newExmPath\", \"http://example.com/exmPath\") => http://example.com/exmPath/newExmPath\n\t\t\t// new URL(\"../newExmPath\", \"http://example.com/exmPath\") => http://example.com/newExmPath\n\t\t\tresultUrl = new URL(themeRoot, getLocationHref()).toString();\n\t\t\tisSameOrigin = true;\n\t\t} else {\n\t\t\t// Protocol-relative URLs (//host/path) need a base to resolve the protocol\n\t\t\tconst themeRootURL = themeRoot.startsWith(\"//\") ? new URL(themeRoot, getLocationHref()) : new URL(themeRoot);\n\t\t\tconst origin = themeRootURL.origin;\n\t\t\tconst currentOrigin = new URL(getLocationHref()).origin;\n\n\t\t\t// Check if the absolute URL is same-origin\n\t\t\tisSameOrigin = origin === currentOrigin;\n\n\t\t\tif (origin && validateThemeOrigin(origin, isSameOrigin)) {\n\t\t\t\t// If origin is allowed, use it\n\t\t\t\tresultUrl = themeRootURL.toString();\n\t\t\t} else {\n\t\t\t\t// If origin is not allowed, return undefined to indicate validation failed\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t}\n\n\t\tif (!resultUrl.endsWith(\"/\")) {\n\t\t\tresultUrl = `${resultUrl}/`;\n\t\t}\n\n\t\treturn `${resultUrl}UI5/`;\n\t} catch (e) {\n\t\t// Catch if URL is not correct\n\t\treturn undefined;\n\t}\n};\n\nexport default validateThemeRoot;\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"tags": [
|
|
4
4
|
{
|
|
5
5
|
"name": "ui5element",
|
|
6
|
-
"description": "Base class for all UI5 Web Components\n\n\n---\n\n\n\n\n### **Methods:**\n - **
|
|
6
|
+
"description": "Base class for all UI5 Web Components\n\n\n---\n\n\n\n\n### **Methods:**\n - **attachComponentStateFinalized(callback: _() => void_): _void_** - Attach a callback that will be executed whenever the component's state is finalized\n- **attachInvalidate(callback: _(param: InvalidationInfo) => void_): _void_** - Attach a callback that will be executed whenever the component is invalidated\n- **define(): _typeof UI5Element_** - Registers a UI5 Web Component in the browser window object\n- **detachComponentStateFinalized(callback: _() => void_): _void_** - Detach the callback that is executed whenever the component's state is finalized\n- **detachInvalidate(callback: _(param: InvalidationInfo) => void_): _void_** - Detach the callback that is executed whenever the component is invalidated\n- **fireDecoratorEvent(data: _this[\"eventDetails\"][N] | undefined_, name: _N_): _boolean_** - Fires a custom event, configured via the \"event\" decorator.\n- **focus(focusOptions: _FocusOptions_): _Promise<void>_** - Set the focus to the element, returned by \"getFocusDomRef()\" (marked by \"data-sap-focus-ref\")\n- **getDomRef(): _HTMLElement | undefined_** - Returns the DOM Element inside the Shadow Root that corresponds to the opening tag in the UI5 Web Component's template\n*Note:* For logical (abstract) elements (items, options, etc...), returns the part of the parent's DOM that represents this option\nUse this method instead of \"this.shadowRoot\" to read the Shadow DOM, if ever necessary\n- **getFocusDomRef(): _HTMLElement | undefined_** - Returns the DOM Element marked with \"data-sap-focus-ref\" inside the template.\nThis is the element that will receive the focus by default.\n- **getFocusDomRefAsync(): _Promise<HTMLElement | undefined>_** - Waits for dom ref and then returns the DOM Element marked with \"data-sap-focus-ref\" inside the template.\nThis is the element that will receive the focus by default.\n- **getMetadata(): _UI5ElementMetadata_** - Returns an instance of UI5ElementMetadata.js representing this UI5 Web Component's full metadata (its and its parents')\nNote: not to be confused with the \"get metadata()\" method, which returns an object for this class's metadata only\n- **getSlottedNodes(): _Array<T>_** - Returns the actual children, associated with a slot.\nUseful when there are transitive slots in nested component scenarios and you don't want to get a list of the slots, but rather of their content.\n- **getUniqueDependencies(): _Array<typeof UI5Element>_** - Returns a list of the unique dependencies for this UI5 Web Component\n- **onAfterRendering(): _void_** - Called every time after the component renders.\n- **onBeforeRendering(): _void_** - Called every time before the component renders.\n- **onEnterDOM(): _void_** - Called on connectedCallback - added to the DOM.\n- **onExitDOM(): _void_** - Called on disconnectedCallback - removed from the DOM.\n- **onInvalidation(changeInfo: _ChangeInfo_): _void_** - A callback that is executed each time an already rendered component is invalidated (scheduled for re-rendering)",
|
|
7
7
|
"attributes": [
|
|
8
8
|
{
|
|
9
9
|
"name": "effective-dir",
|
package/package-scripts.cjs
CHANGED
|
@@ -24,7 +24,7 @@ const scripts = {
|
|
|
24
24
|
"generated": `ui5nps-script "${LIB}/rimraf/rimraf.js src/generated`,
|
|
25
25
|
"dist": `ui5nps-script "${LIB}/rimraf/rimraf.js dist`,
|
|
26
26
|
},
|
|
27
|
-
lint: `eslint
|
|
27
|
+
lint: `ui5nps-script "${LIB}/eslint/eslint.js"`,
|
|
28
28
|
generate: "ui5nps clean build.i18n integrate copy generateAssetParameters generateVersionInfo generateStyles generateFontFace build.jsonImports",
|
|
29
29
|
prepare: "ui5nps clean build.i18n integrate copy generateAssetParameters generateVersionInfo generateStyles generateFontFace typescript integrate.no-remaining-require build.jsonImports",
|
|
30
30
|
typescript: "tsc -b",
|
|
@@ -41,7 +41,7 @@ const scripts = {
|
|
|
41
41
|
},
|
|
42
42
|
build: {
|
|
43
43
|
default: `ui5nps prepare`,
|
|
44
|
-
bundle: `vite
|
|
44
|
+
bundle: `ui5nps-script "${LIB}/vite-bundler/vite-bundler.mjs" ${viteConfig}`,
|
|
45
45
|
i18n: {
|
|
46
46
|
default: "ui5nps build.i18n.defaultsjs build.i18n.json",
|
|
47
47
|
defaultsjs: `ui5nps-script "${LIB}/i18n/defaults.js" src/i18n src/generated/i18n`,
|
|
@@ -70,19 +70,19 @@ const scripts = {
|
|
|
70
70
|
"ui5": `ui5nps-script "${LIB}copy-and-watch/index.js" "dist/sap/**/*" dist/prod/sap/`,
|
|
71
71
|
"preact": `ui5nps-script "${LIB}copy-and-watch/index.js" "dist/thirdparty/preact/**/*.js" dist/prod/thirdparty/preact/`,
|
|
72
72
|
"assets": `ui5nps-script "${LIB}copy-and-watch/index.js" "dist/generated/assets/**/*.json" dist/prod/generated/assets/`,
|
|
73
|
-
|
|
74
|
-
},
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
75
|
generateAPI: {
|
|
76
|
-
default: "ui5nps generateAPI.generateCEM generateAPI.validateCEM",
|
|
77
76
|
generateCEM: `ui5nps-script "${LIB}/cem/cem.js" analyze --config "${LIB}cem/custom-elements-manifest.config.mjs"`,
|
|
78
77
|
validateCEM: `ui5nps-script "${LIB}/cem/validate.js"`,
|
|
78
|
+
mergeCEM: `ui5nps-script "${LIB}cem/merge.mjs"`,
|
|
79
79
|
},
|
|
80
80
|
watch: {
|
|
81
81
|
default: 'ui5nps-p watch.src watch.styles', // concurently
|
|
82
82
|
withBundle: 'ui5nps-p watch.src watch.bundle watch.styles', // concurently
|
|
83
83
|
src: 'ui5nps copy.srcWithWatch',
|
|
84
84
|
bundle: `ui5nps-script ${LIB}/dev-server/dev-server.mjs ${viteConfig}`,
|
|
85
|
-
styles:
|
|
85
|
+
styles: `ui5nps-script "${LIB}/chokidar/chokidar.js" "src/css/*.css" "ui5nps generateStyles"`
|
|
86
86
|
},
|
|
87
87
|
test: {
|
|
88
88
|
default: 'ui5nps-p test.ssr test.ssr2 test.test-cy-ci', // concurently
|