@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
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Slot, DefaultSlot } from "../UI5Element.js";
|
|
2
|
+
import type { Slot as SlotMetadata } from "../UI5ElementMetadata.js";
|
|
3
|
+
/**
|
|
4
|
+
* Decorator for declaring a slot in a UI5 Web Component.
|
|
5
|
+
* It adds the slot metadata to the component's constructor.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
* @since 2.19.0
|
|
9
|
+
* @param { SlotMetadata } slotData - Optional metadata for the slot, including type and default flag.
|
|
10
|
+
*
|
|
11
|
+
* Example usage:
|
|
12
|
+
* ```ts
|
|
13
|
+
* import slot from "@ui5/webcomponents-base/dist/decorators/slot-strict.js";
|
|
14
|
+
* import type { DefaultSlot, Slot } from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
15
|
+
*
|
|
16
|
+
* class MyComponent extends UI5Element {
|
|
17
|
+
*
|
|
18
|
+
* @slot()
|
|
19
|
+
* header!: Slot<HTMLElement>;
|
|
20
|
+
*
|
|
21
|
+
* @slot({ type: HTMLElement, default: true })
|
|
22
|
+
* items!: DefaultSlot<HTMLElement>;
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
declare function slot<T extends Record<K, Slot<unknown> | DefaultSlot<unknown>>, K extends string>(slotData?: SlotMetadata): (target: T, prop: K) => void;
|
|
27
|
+
export default slot;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decorator for declaring a slot in a UI5 Web Component.
|
|
3
|
+
* It adds the slot metadata to the component's constructor.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
* @since 2.19.0
|
|
7
|
+
* @param { SlotMetadata } slotData - Optional metadata for the slot, including type and default flag.
|
|
8
|
+
*
|
|
9
|
+
* Example usage:
|
|
10
|
+
* ```ts
|
|
11
|
+
* import slot from "@ui5/webcomponents-base/dist/decorators/slot-strict.js";
|
|
12
|
+
* import type { DefaultSlot, Slot } from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
13
|
+
*
|
|
14
|
+
* class MyComponent extends UI5Element {
|
|
15
|
+
*
|
|
16
|
+
* @slot()
|
|
17
|
+
* header!: Slot<HTMLElement>;
|
|
18
|
+
*
|
|
19
|
+
* @slot({ type: HTMLElement, default: true })
|
|
20
|
+
* items!: DefaultSlot<HTMLElement>;
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
function slot(slotData) {
|
|
25
|
+
return (target, slotKey) => {
|
|
26
|
+
const ctor = target.constructor;
|
|
27
|
+
if (!Object.prototype.hasOwnProperty.call(ctor, "metadata")) {
|
|
28
|
+
ctor.metadata = {};
|
|
29
|
+
}
|
|
30
|
+
const metadata = ctor.metadata;
|
|
31
|
+
if (!metadata.slots) {
|
|
32
|
+
metadata.slots = {};
|
|
33
|
+
}
|
|
34
|
+
const slotMetadata = metadata.slots;
|
|
35
|
+
if (slotData && slotData.default && slotMetadata.default) {
|
|
36
|
+
throw new Error("Only one slot can be the default slot.");
|
|
37
|
+
}
|
|
38
|
+
const key = slotData && slotData.default ? "default" : slotKey;
|
|
39
|
+
slotData = slotData || { type: HTMLElement };
|
|
40
|
+
if (!slotData.type) {
|
|
41
|
+
slotData.type = HTMLElement;
|
|
42
|
+
}
|
|
43
|
+
if (!slotMetadata[key]) {
|
|
44
|
+
slotMetadata[key] = slotData;
|
|
45
|
+
}
|
|
46
|
+
if (slotData.default) {
|
|
47
|
+
delete slotMetadata.default.default;
|
|
48
|
+
slotMetadata.default.propertyName = slotKey;
|
|
49
|
+
}
|
|
50
|
+
ctor.metadata.managedSlots = true;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export default slot;
|
|
54
|
+
//# sourceMappingURL=slot-strict.js.map
|
|
@@ -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YAAY,CAAC,OAAO,CAAC,OAAO,CAAC;YACpC,YAAY,CAAC,OAAO,CAAC,YAAY,GAAG,OAAiB,CAAC;QACvD,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,YAAY,GAAG,IAAI,CAAC;IACnC,CAAC,CAAC;AACH,CAAC;AAED,eAAe,IAAI,CAAC","sourcesContent":["import type UI5Element from \"../UI5Element.js\";\nimport type { Slot, DefaultSlot } from \"../UI5Element.js\";\nimport type { Slot as SlotMetadata } from \"../UI5ElementMetadata.js\";\n\n/**\n * Decorator for declaring a slot in a UI5 Web Component.\n * It adds the slot metadata to the component's constructor.\n *\n * @public\n * @since 2.19.0\n * @param { SlotMetadata } slotData - Optional metadata for the slot, including type and default flag.\n *\n * Example usage:\n * ```ts\n * import slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\n * import type { DefaultSlot, Slot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\n *\n * class MyComponent extends UI5Element {\n *\n * @slot()\n * header!: Slot<HTMLElement>;\n *\n * @slot({ type: HTMLElement, default: true })\n * items!: DefaultSlot<HTMLElement>;\n * }\n * ```\n */\nfunction slot<\n\tT extends Record<K, Slot<unknown> | DefaultSlot<unknown>>,\n\tK extends string\n>(slotData?: SlotMetadata): (target: T, prop: K) => void {\n\treturn (target: any, slotKey: string | symbol) => {\n\t\tconst ctor = target.constructor as typeof UI5Element;\n\n\t\tif (!Object.prototype.hasOwnProperty.call(ctor, \"metadata\")) {\n\t\t\tctor.metadata = {};\n\t\t}\n\n\t\tconst metadata = ctor.metadata;\n\t\tif (!metadata.slots) {\n\t\t\tmetadata.slots = {};\n\t\t}\n\n\t\tconst slotMetadata = metadata.slots;\n\n\t\tif (slotData && slotData.default && slotMetadata.default) {\n\t\t\tthrow new Error(\"Only one slot can be the default slot.\");\n\t\t}\n\n\t\tconst key = slotData && slotData.default ? \"default\" : (slotKey as string);\n\t\tslotData = slotData || { type: HTMLElement };\n\n\t\tif (!slotData.type) {\n\t\t\tslotData.type = HTMLElement;\n\t\t}\n\n\t\tif (!slotMetadata[key]) {\n\t\t\tslotMetadata[key] = slotData;\n\t\t}\n\n\t\tif (slotData.default) {\n\t\t\tdelete slotMetadata.default.default;\n\t\t\tslotMetadata.default.propertyName = slotKey as string;\n\t\t}\n\n\t\tctor.metadata.managedSlots = true;\n\t};\n}\n\nexport default slot;\n"]}
|
|
@@ -3,6 +3,24 @@ import type { Slot } from "../UI5ElementMetadata.js";
|
|
|
3
3
|
* Returns a slot decorator.
|
|
4
4
|
*
|
|
5
5
|
* @param { Slot } slotData
|
|
6
|
+
* @deprecated since 2.19.0, please use the `@ui5/webcomponents-base/dist/decorators/slot-strict.js` decorator instead.
|
|
7
|
+
* For Example:
|
|
8
|
+
* ```ts
|
|
9
|
+
* // If you previously used the `slot` decorator:
|
|
10
|
+
* import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
|
11
|
+
*
|
|
12
|
+
* // Now use `slot-strict` decorator + `DefaultSlot` and `Slot` types for slot members:
|
|
13
|
+
* import slot from "@ui5/webcomponents-base/dist/decorators/slot-strict.js";
|
|
14
|
+
* import type { DefaultSlot, Slot } from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
15
|
+
*
|
|
16
|
+
* class MyComponent extends UI5Element {
|
|
17
|
+
* @slot()
|
|
18
|
+
* header!: Slot<T> // Array<T> -> Slot<T>
|
|
19
|
+
*
|
|
20
|
+
* @slot({ type: HTMLElement, default: true })
|
|
21
|
+
* items!: DefaultSlot<T>; // Array<T> -> DefaultSlot<T>
|
|
22
|
+
* }
|
|
23
|
+
* ```
|
|
6
24
|
* @returns { PropertyDecorator }
|
|
7
25
|
*/
|
|
8
26
|
declare const slot: (slotData?: Slot) => PropertyDecorator;
|
package/dist/decorators/slot.js
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
* Returns a slot decorator.
|
|
3
3
|
*
|
|
4
4
|
* @param { Slot } slotData
|
|
5
|
+
* @deprecated since 2.19.0, please use the `@ui5/webcomponents-base/dist/decorators/slot-strict.js` decorator instead.
|
|
6
|
+
* For Example:
|
|
7
|
+
* ```ts
|
|
8
|
+
* // If you previously used the `slot` decorator:
|
|
9
|
+
* import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
|
10
|
+
*
|
|
11
|
+
* // Now use `slot-strict` decorator + `DefaultSlot` and `Slot` types for slot members:
|
|
12
|
+
* import slot from "@ui5/webcomponents-base/dist/decorators/slot-strict.js";
|
|
13
|
+
* import type { DefaultSlot, Slot } from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
14
|
+
*
|
|
15
|
+
* class MyComponent extends UI5Element {
|
|
16
|
+
* @slot()
|
|
17
|
+
* header!: Slot<T> // Array<T> -> Slot<T>
|
|
18
|
+
*
|
|
19
|
+
* @slot({ type: HTMLElement, default: true })
|
|
20
|
+
* items!: DefaultSlot<T>; // Array<T> -> DefaultSlot<T>
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
5
23
|
* @returns { PropertyDecorator }
|
|
6
24
|
*/
|
|
7
25
|
const slot = (slotData) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slot.js","sourceRoot":"","sources":["../../src/decorators/slot.ts"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"slot.js","sourceRoot":"","sources":["../../src/decorators/slot.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,IAAI,GAAG,CAAC,QAAe,EAAqB,EAAE;IACnD,OAAO,CAAC,MAAW,EAAE,OAAwB,EAAE,EAAE;QAChD,MAAM,IAAI,GAAG,MAAM,CAAC,WAAgC,CAAC;QAErD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE,CAAC;YAC7D,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACpB,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;YACrB,QAAQ,CAAC,KAAK,GAAG,EAAE,CAAC;QACrB,CAAC;QAED,MAAM,YAAY,GAAG,QAAQ,CAAC,KAAK,CAAC;QAEpC,IAAI,QAAQ,IAAI,QAAQ,CAAC,OAAO,IAAI,YAAY,CAAC,OAAO,EAAE,CAAC;YAC1D,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC3D,CAAC;QAED,MAAM,GAAG,GAAG,QAAQ,IAAI,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAiB,CAAC;QACzE,QAAQ,GAAG,QAAQ,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;QAE7C,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACpB,QAAQ,CAAC,IAAI,GAAG,WAAW,CAAC;QAC7B,CAAC;QAED,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;YACxB,YAAY,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;QAC9B,CAAC;QAED,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;YACtB,OAAO,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC;YACpC,YAAY,CAAC,OAAO,CAAC,YAAY,GAAG,OAAiB,CAAC;QACvD,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,YAAY,GAAG,IAAI,CAAC;IACnC,CAAC,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC","sourcesContent":["import type UI5Element from \"../UI5Element.js\";\nimport type { Slot } from \"../UI5ElementMetadata.js\";\n\n/**\n * Returns a slot decorator.\n *\n * @param { Slot } slotData\n * @deprecated since 2.19.0, please use the `@ui5/webcomponents-base/dist/decorators/slot-strict.js` decorator instead.\n * For Example:\n * ```ts\n * // If you previously used the `slot` decorator:\n * import slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\n *\n * // Now use `slot-strict` decorator + `DefaultSlot` and `Slot` types for slot members:\n * import slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\n * import type { DefaultSlot, Slot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\n *\n * class MyComponent extends UI5Element {\n * @slot()\n * header!: Slot<T> // Array<T> -> Slot<T>\n *\n * @slot({ type: HTMLElement, default: true })\n * items!: DefaultSlot<T>; // Array<T> -> DefaultSlot<T>\n * }\n * ```\n * @returns { PropertyDecorator }\n */\nconst slot = (slotData?: Slot): PropertyDecorator => {\n\treturn (target: any, slotKey: string | symbol) => {\n\t\tconst ctor = target.constructor as typeof UI5Element;\n\n\t\tif (!Object.prototype.hasOwnProperty.call(ctor, \"metadata\")) {\n\t\t\tctor.metadata = {};\n\t\t}\n\n\t\tconst metadata = ctor.metadata;\n\t\tif (!metadata.slots) {\n\t\t\tmetadata.slots = {};\n\t\t}\n\n\t\tconst slotMetadata = metadata.slots;\n\n\t\tif (slotData && slotData.default && slotMetadata.default) {\n\t\t\tthrow new Error(\"Only one slot can be the default slot.\");\n\t\t}\n\n\t\tconst key = slotData && slotData.default ? \"default\" : slotKey as string;\n\t\tslotData = slotData || { type: HTMLElement };\n\n\t\tif (!slotData.type) {\n\t\t\tslotData.type = HTMLElement;\n\t\t}\n\n\t\tif (!slotMetadata[key]) {\n\t\t\tslotMetadata[key] = slotData;\n\t\t}\n\n\t\tif (slotData.default) {\n\t\t\tdelete slotMetadata.default.default;\n\t\t\tslotMetadata.default.propertyName = slotKey as string;\n\t\t}\n\n\t\tctor.metadata.managedSlots = true;\n\t};\n};\n\nexport default slot;\n"]}
|
package/dist/decorators.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import event from "./decorators/event.js";
|
|
|
3
3
|
import eventStrict from "./decorators/event-strict.js";
|
|
4
4
|
import property from "./decorators/property.js";
|
|
5
5
|
import slot from "./decorators/slot.js";
|
|
6
|
+
import slotStrict from "./decorators/slot-strict.js";
|
|
6
7
|
import bound from "./decorators/bound.js";
|
|
7
8
|
import i18n from "./decorators/i18n.js";
|
|
8
|
-
export { customElement, event, eventStrict, property, slot, bound, i18n, };
|
|
9
|
+
export { customElement, event, eventStrict, property, slot, slotStrict, bound, i18n, };
|
package/dist/decorators.js
CHANGED
|
@@ -3,7 +3,8 @@ import event from "./decorators/event.js";
|
|
|
3
3
|
import eventStrict from "./decorators/event-strict.js";
|
|
4
4
|
import property from "./decorators/property.js";
|
|
5
5
|
import slot from "./decorators/slot.js";
|
|
6
|
+
import slotStrict from "./decorators/slot-strict.js";
|
|
6
7
|
import bound from "./decorators/bound.js";
|
|
7
8
|
import i18n from "./decorators/i18n.js";
|
|
8
|
-
export { customElement, event, eventStrict, property, slot, bound, i18n, };
|
|
9
|
+
export { customElement, event, eventStrict, property, slot, slotStrict, bound, i18n, };
|
|
9
10
|
//# sourceMappingURL=decorators.js.map
|
package/dist/decorators.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../src/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,+BAA+B,CAAC;AAC1D,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAC1C,OAAO,WAAW,MAAM,8BAA8B,CAAC;AACvD,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,IAAI,MAAM,sBAAsB,CAAC;AACxC,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAC1C,OAAO,IAAI,MAAM,sBAAsB,CAAC;AAExC,OAAO,EACN,aAAa,EACb,KAAK,EACL,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,IAAI,GACJ,CAAC","sourcesContent":["import customElement from \"./decorators/customElement.js\";\nimport event from \"./decorators/event.js\";\nimport eventStrict from \"./decorators/event-strict.js\";\nimport property from \"./decorators/property.js\";\nimport slot from \"./decorators/slot.js\";\nimport bound from \"./decorators/bound.js\";\nimport i18n from \"./decorators/i18n.js\";\n\nexport {\n\tcustomElement,\n\tevent,\n\teventStrict,\n\tproperty,\n\tslot,\n\tbound,\n\ti18n,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../src/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,+BAA+B,CAAC;AAC1D,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAC1C,OAAO,WAAW,MAAM,8BAA8B,CAAC;AACvD,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,IAAI,MAAM,sBAAsB,CAAC;AACxC,OAAO,UAAU,MAAM,6BAA6B,CAAC;AACrD,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAC1C,OAAO,IAAI,MAAM,sBAAsB,CAAC;AAExC,OAAO,EACN,aAAa,EACb,KAAK,EACL,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,UAAU,EACV,KAAK,EACL,IAAI,GACJ,CAAC","sourcesContent":["import customElement from \"./decorators/customElement.js\";\nimport event from \"./decorators/event.js\";\nimport eventStrict from \"./decorators/event-strict.js\";\nimport property from \"./decorators/property.js\";\nimport slot from \"./decorators/slot.js\";\nimport slotStrict from \"./decorators/slot-strict.js\";\nimport bound from \"./decorators/bound.js\";\nimport i18n from \"./decorators/i18n.js\";\n\nexport {\n\tcustomElement,\n\tevent,\n\teventStrict,\n\tproperty,\n\tslot,\n\tslotStrict,\n\tbound,\n\ti18n,\n};\n"]}
|
|
@@ -188,6 +188,10 @@ class F6Navigation {
|
|
|
188
188
|
f6Registry.instance = new F6Navigation();
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
+
static destroy() {
|
|
192
|
+
const f6Registry = getSharedResource("F6Registry", {});
|
|
193
|
+
f6Registry.instance?.destroy();
|
|
194
|
+
}
|
|
191
195
|
}
|
|
192
196
|
registerFeature("F6Navigation", F6Navigation);
|
|
193
197
|
export default F6Navigation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"F6Navigation.js","s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,IAAI,CAAC,aAAa,GAAG,OAAsB,CAAC;IAC7C,CAAC;IAED,UAAU,CAAC,IAA0B;QACpC,IAAI,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC;YACpD,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QACvD,CAAC;QAED,OAAO,IAAI,CAAC,aAAa,CAAC;IAC3B,CAAC;IAED,OAAO;QACN,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC7B,CAAC;IAED,IAAI,gBAAgB;QACnB,OAAO,mBAAmB,CAAC;IAC5B,CAAC;IAED,MAAM,CAAC,IAAI;QACV,MAAM,UAAU,GAAG,iBAAiB,CAAa,YAAY,EAAE,EAAE,CAAC,CAAC;QAEnE,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;YAC1B,UAAU,CAAC,QAAQ,GAAG,IAAI,YAAY,EAAE,CAAC;QAC1C,CAAC;aAAM,IAAI,YAAY,CAAC,UAAU,CAAC,QAAQ,EAAE,gBAAgB,CAAC,EAAE,CAAC;YAChE,UAAU,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC;YAC/B,UAAU,CAAC,QAAQ,GAAG,IAAI,YAAY,EAAE,CAAC;QAC1C,CAAC;IACF,CAAC;CACD;AAED,eAAe,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;AAE9C,eAAe,YAAY,CAAC","sourcesContent":["import { getFeature, registerFeature } from \"../FeaturesRegistry.js\";\nimport { isF6Next, isF6Previous } from \"../Keys.js\";\nimport { getFirstFocusableElement } from \"../util/FocusableElements.js\";\nimport getFastNavigationGroups from \"../util/getFastNavigationGroups.js\";\nimport isElementClickable from \"../util/isElementClickable.js\";\nimport { getCurrentRuntimeIndex, compareRuntimes } from \"../Runtimes.js\";\nimport getSharedResource from \"../getSharedResource.js\";\nimport type OpenUI5Support from \"./OpenUI5Support.js\";\nimport getParentElement from \"../util/getParentElement.js\";\n\ntype F6Registry = {\n\tinstance?: F6Navigation,\n}\n\nconst currentRuntimeINdex = getCurrentRuntimeIndex();\n\nconst shouldUpdate = (runtimeIndex: number | undefined) => {\n\tif (runtimeIndex === undefined) {\n\t\treturn true;\n\t}\n\treturn compareRuntimes(currentRuntimeINdex, runtimeIndex) === 1; // 1 means the current is newer, 0 means the same, -1 means the resource's runtime is newer\n};\n\nclass F6Navigation {\n\tkeydownHandler: (event: KeyboardEvent) => void;\n\tselectedGroup: HTMLElement | null = null;\n\tgroups: Array<HTMLElement> = [];\n\n\tconstructor() {\n\t\tthis.keydownHandler = this._keydownHandler.bind(this) as (event: KeyboardEvent) => void;\n\t\tthis.attachEventListeners();\n\t}\n\n\tattachEventListeners() {\n\t\tdocument.addEventListener(\"keydown\", this.keydownHandler);\n\t}\n\n\tremoveEventListeners() {\n\t\tdocument.removeEventListener(\"keydown\", this.keydownHandler);\n\t}\n\n\tasync groupElementToFocus(nextElement: HTMLElement) {\n\t\tif (nextElement) {\n\t\t\tif (isElementClickable(nextElement)) {\n\t\t\t\treturn nextElement;\n\t\t\t}\n\n\t\t\tconst elementToFocus = await getFirstFocusableElement(nextElement);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\treturn elementToFocus;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync findNextFocusableGroupElement(currentIndex: number) {\n\t\tlet elementToFocus;\n\n\t\t/* eslint-disable no-await-in-loop */\n\t\tfor (let index = 0; index < this.groups.length; index++) {\n\t\t\tlet nextElement;\n\n\t\t\tif (currentIndex > -1) {\n\t\t\t\tif (currentIndex + 1 >= this.groups.length) {\n\t\t\t\t\tcurrentIndex = 0;\n\t\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t\t} else {\n\t\t\t\t\tcurrentIndex += 1;\n\t\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcurrentIndex = 0;\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t}\n\n\t\t\telementToFocus = await this.groupElementToFocus(nextElement);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t/* eslint-enable no-await-in-loop */\n\n\t\treturn elementToFocus;\n\t}\n\n\tasync findPreviousFocusableGroupElement(currentIndex: number) {\n\t\tlet elementToFocus;\n\n\t\t/* eslint-disable no-await-in-loop */\n\t\tfor (let index = 0; index < this.groups.length; index++) {\n\t\t\tlet nextElement;\n\n\t\t\tif (currentIndex > 0) {\n\t\t\t\t// Handle the situation where the first focusable element of two neighbor groups is the same\n\t\t\t\t// For example:\n\t\t\t\t// <ui5-flexible-column-layout>\n\t\t\t\t// <ui5-list>\n\t\t\t\t// <ui5-li>List Item</ui5-li>\n\t\t\t\t// </ui5-list>\n\t\t\t\t// </ui5-flexible-column-layout>\n\t\t\t\t// Here for both FCL & List the firstFoccusableElement is the same (the ui5-li)\n\t\t\t\tconst currentGroupFocusable = await this.groupElementToFocus(this.groups[currentIndex]);\n\t\t\t\tlet distanceToNextGroup = 1;\n\n\t\t\t\tfor (let distanceIndex = 1; distanceIndex < this.groups.length; distanceIndex++) {\n\t\t\t\t\tconst firstFocusable = await this.groupElementToFocus(this.groups[currentIndex - distanceIndex]);\n\n\t\t\t\t\tif (firstFocusable === currentGroupFocusable) {\n\t\t\t\t\t\tdistanceToNextGroup++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcurrentIndex -= distanceToNextGroup;\n\n\t\t\t\tif (currentIndex < 0) {\n\t\t\t\t\tcurrentIndex = this.groups.length - 1;\n\t\t\t\t}\n\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t} else {\n\t\t\t\tcurrentIndex = this.groups.length - 1;\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t}\n\n\t\t\telementToFocus = await this.groupElementToFocus(nextElement);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t/* eslint-enable no-await-in-loop */\n\n\t\treturn elementToFocus;\n\t}\n\n\tasync _keydownHandler(event: KeyboardEvent) {\n\t\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\t\tconst isOpenUI5Detected = openUI5Support && openUI5Support.isOpenUI5Detected();\n\n\t\tif (isOpenUI5Detected) {\n\t\t\tthis.destroy();\n\t\t\treturn;\n\t\t}\n\n\t\tconst forward = isF6Next(event);\n\t\tconst backward = isF6Previous(event);\n\t\tif (!(forward || backward)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.updateGroups();\n\n\t\tif (this.groups.length < 1) {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\n\t\tlet elementToFocus;\n\n\t\tif (this.groups.length === 0) {\n\t\t\telementToFocus = await this.groupElementToFocus(this.groups[0]);\n\n\t\t\treturn elementToFocus?.focus();\n\t\t}\n\n\t\tlet currentIndex = -1;\n\n\t\tif (this.selectedGroup) {\n\t\t\tcurrentIndex = this.groups.indexOf(this.selectedGroup);\n\t\t}\n\n\t\tif (forward) {\n\t\t\telementToFocus = await this.findNextFocusableGroupElement(currentIndex);\n\t\t}\n\n\t\tif (backward) {\n\t\t\telementToFocus = await this.findPreviousFocusableGroupElement(currentIndex);\n\t\t}\n\n\t\telementToFocus?.focus();\n\t}\n\n\tupdateGroups() {\n\t\tconst container = this.findContainer();\n\n\t\tthis.setSelectedGroup();\n\t\tthis.groups = getFastNavigationGroups(container);\n\t}\n\n\tfindContainer() {\n\t\tconst htmlElement = window.document.querySelector(\"html\");\n\t\tlet element = this.deepActive(window.document);\n\n\t\twhile (element && element !== htmlElement) {\n\t\t\tconst closestScopeEl = element.closest<HTMLElement>(\"[data-sap-ui-fastnavgroup-container='true']\");\n\n\t\t\tif (closestScopeEl) {\n\t\t\t\treturn closestScopeEl;\n\t\t\t}\n\n\t\t\telement = getParentElement(element);\n\t\t}\n\n\t\treturn document.body;\n\t}\n\n\tsetSelectedGroup(root: DocumentOrShadowRoot = window.document) {\n\t\tconst htmlElement = window.document.querySelector(\"html\");\n\t\tlet element: Element | null = this.deepActive(root);\n\n\t\twhile (element && element.getAttribute(\"data-sap-ui-fastnavgroup\") !== \"true\" && element !== htmlElement) {\n\t\t\telement = getParentElement(element);\n\t\t}\n\n\t\tthis.selectedGroup = element as HTMLElement;\n\t}\n\n\tdeepActive(root: DocumentOrShadowRoot): Element | null {\n\t\tif (root?.activeElement?.shadowRoot?.activeElement) {\n\t\t\treturn this.deepActive(root.activeElement.shadowRoot);\n\t\t}\n\n\t\treturn root.activeElement;\n\t}\n\n\tdestroy() {\n\t\tthis.removeEventListeners();\n\t}\n\n\tget _ui5RuntimeIndex() {\n\t\treturn currentRuntimeINdex;\n\t}\n\n\tstatic init() {\n\t\tconst f6Registry = getSharedResource<F6Registry>(\"F6Registry\", {});\n\n\t\tif (!f6Registry.instance) {\n\t\t\tf6Registry.instance = new F6Navigation();\n\t\t} else if (shouldUpdate(f6Registry.instance?._ui5RuntimeIndex)) {\n\t\t\tf6Registry.instance?.destroy();\n\t\t\tf6Registry.instance = new F6Navigation();\n\t\t}\n\t}\n}\n\nregisterFeature(\"F6Navigation\", F6Navigation);\n\nexport default F6Navigation;\n"]}
|
|
1
|
+
{"version":3,"file":"F6Navigation.js","sourceRoot":"","sources":["../../src/features/F6Navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,uBAAuB,MAAM,oCAAoC,CAAC;AACzE,OAAO,kBAAkB,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,iBAAiB,MAAM,yBAAyB,CAAC;AAExD,OAAO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ACV,MAAM,UAAU,GAAG,iBAAiB,CAAa,YAAY,EAAE,EAAE,CAAC,CAAC;QAEnE,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;YAC1B,UAAU,CAAC,QAAQ,GAAG,IAAI,YAAY,EAAE,CAAC;QAC1C,CAAC;aAAM,IAAI,YAAY,CAAC,UAAU,CAAC,QAAQ,EAAE,gBAAgB,CAAC,EAAE,CAAC;YAChE,UAAU,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC;YAC/B,UAAU,CAAC,QAAQ,GAAG,IAAI,YAAY,EAAE,CAAC;QAC1C,CAAC;IACF,CAAC;IAED,MAAM,CAAC,OAAO;QACb,MAAM,UAAU,GAAG,iBAAiB,CAAa,YAAY,EAAE,EAAE,CAAC,CAAC;QACnE,UAAU,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC;IAChC,CAAC;CACD;AAED,eAAe,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;AAE9C,eAAe,YAAY,CAAC","sourcesContent":["import { getFeature, registerFeature } from \"../FeaturesRegistry.js\";\nimport { isF6Next, isF6Previous } from \"../Keys.js\";\nimport { getFirstFocusableElement } from \"../util/FocusableElements.js\";\nimport getFastNavigationGroups from \"../util/getFastNavigationGroups.js\";\nimport isElementClickable from \"../util/isElementClickable.js\";\nimport { getCurrentRuntimeIndex, compareRuntimes } from \"../Runtimes.js\";\nimport getSharedResource from \"../getSharedResource.js\";\nimport type OpenUI5Support from \"./OpenUI5Support.js\";\nimport getParentElement from \"../util/getParentElement.js\";\n\ntype F6Registry = {\n\tinstance?: F6Navigation,\n}\n\nconst currentRuntimeINdex = getCurrentRuntimeIndex();\n\nconst shouldUpdate = (runtimeIndex: number | undefined) => {\n\tif (runtimeIndex === undefined) {\n\t\treturn true;\n\t}\n\treturn compareRuntimes(currentRuntimeINdex, runtimeIndex) === 1; // 1 means the current is newer, 0 means the same, -1 means the resource's runtime is newer\n};\n\nclass F6Navigation {\n\tkeydownHandler: (event: KeyboardEvent) => void;\n\tselectedGroup: HTMLElement | null = null;\n\tgroups: Array<HTMLElement> = [];\n\n\tconstructor() {\n\t\tthis.keydownHandler = this._keydownHandler.bind(this) as (event: KeyboardEvent) => void;\n\t\tthis.attachEventListeners();\n\t}\n\n\tattachEventListeners() {\n\t\tdocument.addEventListener(\"keydown\", this.keydownHandler);\n\t}\n\n\tremoveEventListeners() {\n\t\tdocument.removeEventListener(\"keydown\", this.keydownHandler);\n\t}\n\n\tasync groupElementToFocus(nextElement: HTMLElement) {\n\t\tif (nextElement) {\n\t\t\tif (isElementClickable(nextElement)) {\n\t\t\t\treturn nextElement;\n\t\t\t}\n\n\t\t\tconst elementToFocus = await getFirstFocusableElement(nextElement);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\treturn elementToFocus;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync findNextFocusableGroupElement(currentIndex: number) {\n\t\tlet elementToFocus;\n\n\t\t/* eslint-disable no-await-in-loop */\n\t\tfor (let index = 0; index < this.groups.length; index++) {\n\t\t\tlet nextElement;\n\n\t\t\tif (currentIndex > -1) {\n\t\t\t\tif (currentIndex + 1 >= this.groups.length) {\n\t\t\t\t\tcurrentIndex = 0;\n\t\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t\t} else {\n\t\t\t\t\tcurrentIndex += 1;\n\t\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcurrentIndex = 0;\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t}\n\n\t\t\telementToFocus = await this.groupElementToFocus(nextElement);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t/* eslint-enable no-await-in-loop */\n\n\t\treturn elementToFocus;\n\t}\n\n\tasync findPreviousFocusableGroupElement(currentIndex: number) {\n\t\tlet elementToFocus;\n\n\t\t/* eslint-disable no-await-in-loop */\n\t\tfor (let index = 0; index < this.groups.length; index++) {\n\t\t\tlet nextElement;\n\n\t\t\tif (currentIndex > 0) {\n\t\t\t\t// Handle the situation where the first focusable element of two neighbor groups is the same\n\t\t\t\t// For example:\n\t\t\t\t// <ui5-flexible-column-layout>\n\t\t\t\t// <ui5-list>\n\t\t\t\t// <ui5-li>List Item</ui5-li>\n\t\t\t\t// </ui5-list>\n\t\t\t\t// </ui5-flexible-column-layout>\n\t\t\t\t// Here for both FCL & List the firstFoccusableElement is the same (the ui5-li)\n\t\t\t\tconst currentGroupFocusable = await this.groupElementToFocus(this.groups[currentIndex]);\n\t\t\t\tlet distanceToNextGroup = 1;\n\n\t\t\t\tfor (let distanceIndex = 1; distanceIndex < this.groups.length; distanceIndex++) {\n\t\t\t\t\tconst firstFocusable = await this.groupElementToFocus(this.groups[currentIndex - distanceIndex]);\n\n\t\t\t\t\tif (firstFocusable === currentGroupFocusable) {\n\t\t\t\t\t\tdistanceToNextGroup++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcurrentIndex -= distanceToNextGroup;\n\n\t\t\t\tif (currentIndex < 0) {\n\t\t\t\t\tcurrentIndex = this.groups.length - 1;\n\t\t\t\t}\n\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t} else {\n\t\t\t\tcurrentIndex = this.groups.length - 1;\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t}\n\n\t\t\telementToFocus = await this.groupElementToFocus(nextElement);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t/* eslint-enable no-await-in-loop */\n\n\t\treturn elementToFocus;\n\t}\n\n\tasync _keydownHandler(event: KeyboardEvent) {\n\t\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\t\tconst isOpenUI5Detected = openUI5Support && openUI5Support.isOpenUI5Detected();\n\n\t\tif (isOpenUI5Detected) {\n\t\t\tthis.destroy();\n\t\t\treturn;\n\t\t}\n\n\t\tconst forward = isF6Next(event);\n\t\tconst backward = isF6Previous(event);\n\t\tif (!(forward || backward)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.updateGroups();\n\n\t\tif (this.groups.length < 1) {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\n\t\tlet elementToFocus;\n\n\t\tif (this.groups.length === 0) {\n\t\t\telementToFocus = await this.groupElementToFocus(this.groups[0]);\n\n\t\t\treturn elementToFocus?.focus();\n\t\t}\n\n\t\tlet currentIndex = -1;\n\n\t\tif (this.selectedGroup) {\n\t\t\tcurrentIndex = this.groups.indexOf(this.selectedGroup);\n\t\t}\n\n\t\tif (forward) {\n\t\t\telementToFocus = await this.findNextFocusableGroupElement(currentIndex);\n\t\t}\n\n\t\tif (backward) {\n\t\t\telementToFocus = await this.findPreviousFocusableGroupElement(currentIndex);\n\t\t}\n\n\t\telementToFocus?.focus();\n\t}\n\n\tupdateGroups() {\n\t\tconst container = this.findContainer();\n\n\t\tthis.setSelectedGroup();\n\t\tthis.groups = getFastNavigationGroups(container);\n\t}\n\n\tfindContainer() {\n\t\tconst htmlElement = window.document.querySelector(\"html\");\n\t\tlet element = this.deepActive(window.document);\n\n\t\twhile (element && element !== htmlElement) {\n\t\t\tconst closestScopeEl = element.closest<HTMLElement>(\"[data-sap-ui-fastnavgroup-container='true']\");\n\n\t\t\tif (closestScopeEl) {\n\t\t\t\treturn closestScopeEl;\n\t\t\t}\n\n\t\t\telement = getParentElement(element);\n\t\t}\n\n\t\treturn document.body;\n\t}\n\n\tsetSelectedGroup(root: DocumentOrShadowRoot = window.document) {\n\t\tconst htmlElement = window.document.querySelector(\"html\");\n\t\tlet element: Element | null = this.deepActive(root);\n\n\t\twhile (element && element.getAttribute(\"data-sap-ui-fastnavgroup\") !== \"true\" && element !== htmlElement) {\n\t\t\telement = getParentElement(element);\n\t\t}\n\n\t\tthis.selectedGroup = element as HTMLElement;\n\t}\n\n\tdeepActive(root: DocumentOrShadowRoot): Element | null {\n\t\tif (root?.activeElement?.shadowRoot?.activeElement) {\n\t\t\treturn this.deepActive(root.activeElement.shadowRoot);\n\t\t}\n\n\t\treturn root.activeElement;\n\t}\n\n\tdestroy() {\n\t\tthis.removeEventListeners();\n\t}\n\n\tget _ui5RuntimeIndex() {\n\t\treturn currentRuntimeINdex;\n\t}\n\n\tstatic init() {\n\t\tconst f6Registry = getSharedResource<F6Registry>(\"F6Registry\", {});\n\n\t\tif (!f6Registry.instance) {\n\t\t\tf6Registry.instance = new F6Navigation();\n\t\t} else if (shouldUpdate(f6Registry.instance?._ui5RuntimeIndex)) {\n\t\t\tf6Registry.instance?.destroy();\n\t\t\tf6Registry.instance = new F6Navigation();\n\t\t}\n\t}\n\n\tstatic destroy() {\n\t\tconst f6Registry = getSharedResource<F6Registry>(\"F6Registry\", {});\n\t\tf6Registry.instance?.destroy();\n\t}\n}\n\nregisterFeature(\"F6Navigation\", F6Navigation);\n\nexport default F6Navigation;\n"]}
|
|
@@ -9,7 +9,7 @@ interface IFormInputElement extends UI5Element {
|
|
|
9
9
|
declare const updateFormValue: (element: IFormInputElement | UI5Element) => void;
|
|
10
10
|
declare const setFormValue: (element: IFormInputElement) => void;
|
|
11
11
|
declare const setFormValidity: (element: IFormInputElement) => Promise<void>;
|
|
12
|
-
declare const submitForm: (element: UI5Element) => void
|
|
12
|
+
declare const submitForm: (element: UI5Element) => Promise<void>;
|
|
13
13
|
declare const resetForm: (element: UI5Element) => void;
|
|
14
14
|
export { updateFormValue, setFormValue, setFormValidity, submitForm, resetForm, };
|
|
15
15
|
export type { IFormInputElement, };
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets the associated form for an element.
|
|
3
|
+
* If the element has a `form` attribute, it looks up the form by ID.
|
|
4
|
+
* Otherwise, it falls back to the form associated via ElementInternals.
|
|
5
|
+
*/
|
|
6
|
+
const getAssociatedForm = (element) => {
|
|
7
|
+
const formAttribute = element.getAttribute("form");
|
|
8
|
+
if (formAttribute) {
|
|
9
|
+
const form = document.getElementById(formAttribute);
|
|
10
|
+
return form instanceof HTMLFormElement ? form : null;
|
|
11
|
+
}
|
|
12
|
+
return element._internals?.form ?? null;
|
|
13
|
+
};
|
|
1
14
|
const updateFormValue = (element) => {
|
|
2
15
|
if (isInputElement(element)) {
|
|
3
16
|
setFormValue(element);
|
|
@@ -15,9 +28,11 @@ const setFormValue = (element) => {
|
|
|
15
28
|
element._internals.setFormValue(element.formFormattedValue);
|
|
16
29
|
};
|
|
17
30
|
const setFormValidity = async (element) => {
|
|
18
|
-
if (!element._internals?.form) {
|
|
31
|
+
if (!element.isUI5Element || !element._internals?.form) {
|
|
19
32
|
return;
|
|
20
33
|
}
|
|
34
|
+
element._internals.setValidity({ customError: true }, " "); // treat the form as invalid until CLDR and message bundles are loaded
|
|
35
|
+
await element.definePromise;
|
|
21
36
|
if (element.formValidity && Object.keys(element.formValidity).some(key => key)) {
|
|
22
37
|
const focusRef = await element.formElementAnchor?.();
|
|
23
38
|
element._internals.setValidity(element.formValidity, element.formValidityMessage, focusRef);
|
|
@@ -26,11 +41,18 @@ const setFormValidity = async (element) => {
|
|
|
26
41
|
element._internals.setValidity({});
|
|
27
42
|
}
|
|
28
43
|
};
|
|
29
|
-
const submitForm = (element) => {
|
|
30
|
-
|
|
44
|
+
const submitForm = async (element) => {
|
|
45
|
+
const form = getAssociatedForm(element);
|
|
46
|
+
if (!form) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const elements = [...form.elements];
|
|
50
|
+
await Promise.all(elements.map(el => { return isInputElement(el) ? setFormValidity(el) : Promise.resolve(); }));
|
|
51
|
+
form.requestSubmit();
|
|
31
52
|
};
|
|
32
53
|
const resetForm = (element) => {
|
|
33
|
-
|
|
54
|
+
const form = getAssociatedForm(element);
|
|
55
|
+
form?.reset();
|
|
34
56
|
};
|
|
35
57
|
const isInputElement = (element) => {
|
|
36
58
|
return "formFormattedValue" in element && "name" in element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputElementsFormSupport.js","sourceRoot":"","sources":["../../src/features/InputElementsFormSupport.ts"],"names":[],"mappings":"AAUA,MAAM,eAAe,GAAG,CAAC,OAAuC,EAAE,EAAE;IACnE,IAAI,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;QAC7B,YAAY,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,OAA0B,EAAE,EAAE;IACnD,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC;QAC/B,OAAO;IACR,CAAC;IAED,eAAe,CAAC,OAAO,CAAC,CAAC;IAEzB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QACnB,OAAO,CAAC,UAAU,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;QACvC,OAAO;IACR,CAAC;IAED,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAC7D,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,KAAK,EAAE,OAA0B,EAAE,EAAE;IAC5D,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"InputElementsFormSupport.js","sourceRoot":"","sources":["../../src/features/InputElementsFormSupport.ts"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,MAAM,iBAAiB,GAAG,CAAC,OAAmB,EAA0B,EAAE;IACzE,MAAM,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IAEnD,IAAI,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,GAAG,QAAQ,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;QACpD,OAAO,IAAI,YAAY,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACtD,CAAC;IAED,OAAO,OAAO,CAAC,UAAU,EAAE,IAAI,IAAI,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AC;IAC7F,CAAC;SAAM,CAAC;QACP,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;IACpC,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,KAAK,EAAE,OAAmB,EAAE,EAAE;IAChD,MAAM,IAAI,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAExC,IAAI,CAAC,IAAI,EAAE,CAAC;QACX,OAAO;IACR,CAAC;IAED,MAAM,QAAQ,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,CAA0C,CAAC;IAE7E,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,GAAG,OAAO,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEhH,IAAI,CAAC,aAAa,EAAE,CAAC;AACtB,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,OAAmB,EAAE,EAAE;IACzC,MAAM,IAAI,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;IACxC,IAAI,EAAE,KAAK,EAAE,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,OAAuC,EAAgC,EAAE;IAChG,OAAO,oBAAoB,IAAI,OAAO,IAAI,MAAM,IAAI,OAAO,CAAC;AAC7D,CAAC,CAAC;AAEF,OAAO,EACN,eAAe,EACf,YAAY,EACZ,eAAe,EACf,UAAU,EACV,SAAS,GACT,CAAC","sourcesContent":["import type UI5Element from \"../UI5Element.js\";\n\ninterface IFormInputElement extends UI5Element {\n\tname?: string;\n\tformFormattedValue: FormData | string | null;\n\tformValidityMessage?: string;\n\tformValidity?: ValidityStateFlags;\n\tformElementAnchor?: () => HTMLElement | undefined | Promise<HTMLElement | undefined>;\n}\n\n/**\n * Gets the associated form for an element.\n * If the element has a `form` attribute, it looks up the form by ID.\n * Otherwise, it falls back to the form associated via ElementInternals.\n */\nconst getAssociatedForm = (element: UI5Element): HTMLFormElement | null => {\n\tconst formAttribute = element.getAttribute(\"form\");\n\n\tif (formAttribute) {\n\t\tconst form = document.getElementById(formAttribute);\n\t\treturn form instanceof HTMLFormElement ? form : null;\n\t}\n\n\treturn element._internals?.form ?? null;\n};\n\nconst updateFormValue = (element: IFormInputElement | UI5Element) => {\n\tif (isInputElement(element)) {\n\t\tsetFormValue(element);\n\t}\n};\n\nconst setFormValue = (element: IFormInputElement) => {\n\tif (!element._internals?.form) {\n\t\treturn;\n\t}\n\n\tsetFormValidity(element);\n\n\tif (!element.name) {\n\t\telement._internals?.setFormValue(null);\n\t\treturn;\n\t}\n\n\telement._internals.setFormValue(element.formFormattedValue);\n};\n\nconst setFormValidity = async (element: IFormInputElement) => {\n\tif (!element.isUI5Element || !element._internals?.form) {\n\t\treturn;\n\t}\n\n\telement._internals.setValidity({ customError: true }, \" \"); // treat the form as invalid until CLDR and message bundles are loaded\n\tawait element.definePromise;\n\n\tif (element.formValidity && Object.keys(element.formValidity).some(key => key)) {\n\t\tconst focusRef = await element.formElementAnchor?.();\n\t\telement._internals.setValidity(element.formValidity, element.formValidityMessage, focusRef);\n\t} else {\n\t\telement._internals.setValidity({});\n\t}\n};\n\nconst submitForm = async (element: UI5Element) => {\n\tconst form = getAssociatedForm(element);\n\n\tif (!form) {\n\t\treturn;\n\t}\n\n\tconst elements = [...form.elements] as Array<IFormInputElement | UI5Element>;\n\n\tawait Promise.all(elements.map(el => { return isInputElement(el) ? setFormValidity(el) : Promise.resolve(); }));\n\n\tform.requestSubmit();\n};\n\nconst resetForm = (element: UI5Element) => {\n\tconst form = getAssociatedForm(element);\n\tform?.reset();\n};\n\nconst isInputElement = (element: IFormInputElement | UI5Element): element is IFormInputElement => {\n\treturn \"formFormattedValue\" in element && \"name\" in element;\n};\n\nexport {\n\tupdateFormValue,\n\tsetFormValue,\n\tsetFormValidity,\n\tsubmitForm,\n\tresetForm,\n};\n\nexport type {\n\tIFormInputElement,\n};\n"]}
|
|
@@ -2,10 +2,16 @@ import type { PopupInfo } from "./patchPopup.js";
|
|
|
2
2
|
import type { CLDRData } from "../asset-registries/LocaleData.js";
|
|
3
3
|
import type { LegacyDateCalendarCustomizing } from "../features/LegacyDateFormats.js";
|
|
4
4
|
declare class OpenUI5Support {
|
|
5
|
-
static
|
|
5
|
+
static enablePolling: boolean;
|
|
6
|
+
static isAtLeastVersion(minor: number): boolean;
|
|
6
7
|
static isOpenUI5Detected(): boolean;
|
|
7
8
|
static initPromise?: Promise<void>;
|
|
8
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Important - if OpenUI5 is loaded after UI5 Web Components, configuration is not synchronized and it's up to the app to initialize OpenUI5 with the same settings as UI5 Web Components for consistency.
|
|
11
|
+
*/
|
|
12
|
+
static OpenUI5DelayedInit: () => Promise<void>;
|
|
13
|
+
static awaitForOpenUI5(): void;
|
|
14
|
+
static init(): void | Promise<void>;
|
|
9
15
|
static getConfigurationSettingsObject(): {
|
|
10
16
|
animationMode?: undefined;
|
|
11
17
|
language?: undefined;
|
|
@@ -19,9 +25,9 @@ declare class OpenUI5Support {
|
|
|
19
25
|
animationMode: string;
|
|
20
26
|
language: string;
|
|
21
27
|
theme: string;
|
|
22
|
-
themeRoot: string;
|
|
28
|
+
themeRoot: string | undefined;
|
|
23
29
|
rtl: string;
|
|
24
|
-
timezone: string;
|
|
30
|
+
timezone: string | undefined;
|
|
25
31
|
calendarType: string;
|
|
26
32
|
formatSettings: {
|
|
27
33
|
firstDayOfWeek: number | undefined;
|
|
@@ -30,10 +36,10 @@ declare class OpenUI5Support {
|
|
|
30
36
|
};
|
|
31
37
|
static getLocaleDataObject(): CLDRData | undefined;
|
|
32
38
|
static _listenForThemeChange(): void;
|
|
33
|
-
static attachListeners():
|
|
39
|
+
static attachListeners(): boolean;
|
|
34
40
|
static cssVariablesLoaded(): boolean | undefined;
|
|
35
41
|
static addOpenedPopup(popupInfo: PopupInfo): void;
|
|
36
42
|
static removeOpenedPopup(popup: object): void;
|
|
37
|
-
static getTopmostPopup(): object;
|
|
43
|
+
static getTopmostPopup(): object | null;
|
|
38
44
|
}
|
|
39
45
|
export default OpenUI5Support;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
var _a;
|
|
1
2
|
import patchPatcher from "./patchPatcher.js";
|
|
2
3
|
import { patchPopup, addOpenedPopup, removeOpenedPopup, getTopmostPopup, } from "./patchPopup.js";
|
|
3
4
|
import { registerFeature } from "../FeaturesRegistry.js";
|
|
4
5
|
import { setTheme } from "../config/Theme.js";
|
|
6
|
+
import { secondaryBoot } from "../Boot.js";
|
|
7
|
+
const OPENUI5_POLLING_INTERVAL = 100;
|
|
5
8
|
class OpenUI5Support {
|
|
6
|
-
static
|
|
9
|
+
static isAtLeastVersion(minor) {
|
|
7
10
|
if (!window.sap.ui.version) {
|
|
8
11
|
return true; // sap.ui.version will be removed in newer OpenUI5 versions
|
|
9
12
|
}
|
|
@@ -12,21 +15,36 @@ class OpenUI5Support {
|
|
|
12
15
|
if (!parts || parts.length < 2) {
|
|
13
16
|
return false;
|
|
14
17
|
}
|
|
15
|
-
return parseInt(parts[0]) > 1 || parseInt(parts[1]) >=
|
|
18
|
+
return parseInt(parts[0]) > 1 || parseInt(parts[1]) >= minor;
|
|
16
19
|
}
|
|
17
20
|
static isOpenUI5Detected() {
|
|
18
21
|
return typeof window.sap?.ui?.require === "function";
|
|
19
22
|
}
|
|
23
|
+
static awaitForOpenUI5() {
|
|
24
|
+
if (_a.enablePolling) {
|
|
25
|
+
const interval = setInterval(() => {
|
|
26
|
+
if (_a.isOpenUI5Detected()) {
|
|
27
|
+
clearInterval(interval);
|
|
28
|
+
_a.OpenUI5DelayedInit();
|
|
29
|
+
}
|
|
30
|
+
}, OPENUI5_POLLING_INTERVAL);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
document.addEventListener("sap-ui-core-ready", () => {
|
|
34
|
+
_a.OpenUI5DelayedInit();
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
20
38
|
static init() {
|
|
21
|
-
if (!
|
|
22
|
-
return
|
|
39
|
+
if (!_a.isOpenUI5Detected()) {
|
|
40
|
+
return _a.awaitForOpenUI5();
|
|
23
41
|
}
|
|
24
|
-
if (!
|
|
25
|
-
|
|
42
|
+
if (!_a.initPromise) {
|
|
43
|
+
_a.initPromise = new Promise(resolve => {
|
|
26
44
|
window.sap.ui.require(["sap/ui/core/Core"], async (Core) => {
|
|
27
45
|
const callback = () => {
|
|
28
|
-
let deps = ["sap/ui/core/Popup", "sap/m/Dialog", "sap/
|
|
29
|
-
if (
|
|
46
|
+
let deps = ["sap/ui/core/Popup", "sap/m/Dialog", "sap/ui/core/Patcher", "sap/ui/core/LocaleData"];
|
|
47
|
+
if (_a.isAtLeastVersion(116)) { // for versions since 1.116.0 and onward, use the modular core
|
|
30
48
|
deps = [
|
|
31
49
|
...deps,
|
|
32
50
|
"sap/base/i18n/Formatting",
|
|
@@ -36,13 +54,13 @@ class OpenUI5Support {
|
|
|
36
54
|
"sap/ui/core/date/CalendarUtils",
|
|
37
55
|
];
|
|
38
56
|
}
|
|
39
|
-
window.sap.ui.require(deps, (Popup, Dialog,
|
|
57
|
+
window.sap.ui.require(deps, (Popup, Dialog, Patcher) => {
|
|
40
58
|
patchPatcher(Patcher);
|
|
41
|
-
patchPopup(Popup, Dialog
|
|
59
|
+
patchPopup(Popup, Dialog);
|
|
42
60
|
resolve();
|
|
43
61
|
});
|
|
44
62
|
};
|
|
45
|
-
if (
|
|
63
|
+
if (_a.isAtLeastVersion(116)) {
|
|
46
64
|
await Core.ready();
|
|
47
65
|
callback();
|
|
48
66
|
}
|
|
@@ -52,13 +70,13 @@ class OpenUI5Support {
|
|
|
52
70
|
});
|
|
53
71
|
});
|
|
54
72
|
}
|
|
55
|
-
return
|
|
73
|
+
return _a.initPromise;
|
|
56
74
|
}
|
|
57
75
|
static getConfigurationSettingsObject() {
|
|
58
|
-
if (!
|
|
76
|
+
if (!_a.isOpenUI5Detected()) {
|
|
59
77
|
return {};
|
|
60
78
|
}
|
|
61
|
-
if (
|
|
79
|
+
if (_a.isAtLeastVersion(116)) {
|
|
62
80
|
const ControlBehavior = window.sap.ui.require("sap/ui/core/ControlBehavior");
|
|
63
81
|
const Localization = window.sap.ui.require("sap/base/i18n/Localization");
|
|
64
82
|
const Theming = window.sap.ui.require("sap/ui/core/Theming");
|
|
@@ -86,9 +104,9 @@ class OpenUI5Support {
|
|
|
86
104
|
animationMode: config.getAnimationMode(),
|
|
87
105
|
language: config.getLanguage(),
|
|
88
106
|
theme: config.getTheme(),
|
|
89
|
-
themeRoot: config.getThemeRoot(),
|
|
107
|
+
themeRoot: typeof config.getThemeRoot === "function" ? config.getThemeRoot() : undefined,
|
|
90
108
|
rtl: config.getRTL(),
|
|
91
|
-
timezone: config.getTimezone(),
|
|
109
|
+
timezone: typeof config.getTimezone === "function" ? config.getTimezone() : undefined,
|
|
92
110
|
calendarType: config.getCalendarType(),
|
|
93
111
|
formatSettings: {
|
|
94
112
|
firstDayOfWeek: LocaleData ? LocaleData.getInstance(config.getLocale()).getFirstDayOfWeek() : undefined,
|
|
@@ -97,11 +115,11 @@ class OpenUI5Support {
|
|
|
97
115
|
};
|
|
98
116
|
}
|
|
99
117
|
static getLocaleDataObject() {
|
|
100
|
-
if (!
|
|
118
|
+
if (!_a.isOpenUI5Detected()) {
|
|
101
119
|
return;
|
|
102
120
|
}
|
|
103
121
|
const LocaleData = window.sap.ui.require("sap/ui/core/LocaleData");
|
|
104
|
-
if (
|
|
122
|
+
if (_a.isAtLeastVersion(116)) {
|
|
105
123
|
const Localization = window.sap.ui.require("sap/base/i18n/Localization");
|
|
106
124
|
return LocaleData.getInstance(Localization.getLanguageTag())._get();
|
|
107
125
|
}
|
|
@@ -110,7 +128,7 @@ class OpenUI5Support {
|
|
|
110
128
|
return LocaleData.getInstance(config.getLocale())._get();
|
|
111
129
|
}
|
|
112
130
|
static _listenForThemeChange() {
|
|
113
|
-
if (
|
|
131
|
+
if (_a.isAtLeastVersion(116)) {
|
|
114
132
|
const Theming = window.sap.ui.require("sap/ui/core/Theming");
|
|
115
133
|
Theming.attachApplied(() => {
|
|
116
134
|
setTheme(Theming.getTheme());
|
|
@@ -125,13 +143,14 @@ class OpenUI5Support {
|
|
|
125
143
|
}
|
|
126
144
|
}
|
|
127
145
|
static attachListeners() {
|
|
128
|
-
if (!
|
|
129
|
-
return;
|
|
146
|
+
if (!_a.isOpenUI5Detected()) {
|
|
147
|
+
return false;
|
|
130
148
|
}
|
|
131
|
-
|
|
149
|
+
_a._listenForThemeChange();
|
|
150
|
+
return true;
|
|
132
151
|
}
|
|
133
152
|
static cssVariablesLoaded() {
|
|
134
|
-
if (!
|
|
153
|
+
if (!_a.isOpenUI5Detected()) {
|
|
135
154
|
return;
|
|
136
155
|
}
|
|
137
156
|
const link = [...document.head.children].find(el => el.id === "sap-ui-theme-sap.ui.core"); // more reliable than querySelector early
|
|
@@ -139,7 +158,10 @@ class OpenUI5Support {
|
|
|
139
158
|
return false;
|
|
140
159
|
}
|
|
141
160
|
// The file name is "css_variables.css" until 1.127 and "library.css" from 1.127 onwards
|
|
142
|
-
|
|
161
|
+
if (_a.isAtLeastVersion(127)) {
|
|
162
|
+
return !!link.href.match(/\/css(-|_)variables\.css/) || !!link.href.match(/\/library\.css/);
|
|
163
|
+
}
|
|
164
|
+
return !!link.href.match(/\/css(-|_)variables\.css/);
|
|
143
165
|
}
|
|
144
166
|
static addOpenedPopup(popupInfo) {
|
|
145
167
|
addOpenedPopup(popupInfo);
|
|
@@ -151,6 +173,15 @@ class OpenUI5Support {
|
|
|
151
173
|
return getTopmostPopup();
|
|
152
174
|
}
|
|
153
175
|
}
|
|
176
|
+
_a = OpenUI5Support;
|
|
177
|
+
OpenUI5Support.enablePolling = false; // set to true for old OpenUI5 versions
|
|
178
|
+
/**
|
|
179
|
+
* Important - if OpenUI5 is loaded after UI5 Web Components, configuration is not synchronized and it's up to the app to initialize OpenUI5 with the same settings as UI5 Web Components for consistency.
|
|
180
|
+
*/
|
|
181
|
+
OpenUI5Support.OpenUI5DelayedInit = async () => {
|
|
182
|
+
_a.init(); // This ensures patchPopover and patchPatcher are called; and from this point OpenUI5 CSS vars start being detected
|
|
183
|
+
await secondaryBoot(); // Re-run the parts of boot that were skipped due to OpenUI5 not having been loaded
|
|
184
|
+
};
|
|
154
185
|
registerFeature("OpenUI5Support", OpenUI5Support);
|
|
155
186
|
export default OpenUI5Support;
|
|
156
187
|
//# sourceMappingURL=OpenUI5Support.js.map
|