@sapudex/web-components 0.230.0 → 0.230.2
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/dist/Assets.js +31 -0
- package/dist/Assets.js.map +1 -1
- package/dist/CountrySelector.d.ts +0 -3
- package/dist/CountrySelector.js +0 -4
- package/dist/CountrySelector.js.map +1 -1
- package/dist/MastheadCountrySelector.d.ts +6 -0
- package/dist/MastheadCountrySelector.js +26 -3
- package/dist/MastheadCountrySelector.js.map +1 -1
- package/dist/MastheadItem.d.ts +22 -9
- package/dist/MastheadItem.js +27 -15
- package/dist/MastheadItem.js.map +1 -1
- package/dist/MastheadMenu.d.ts +3 -0
- package/dist/MastheadMenu.js +9 -0
- package/dist/MastheadMenu.js.map +1 -1
- package/dist/MastheadMenuItem.d.ts +1 -1
- package/dist/MastheadMenuItem.js +1 -1
- package/dist/MastheadMenuItem.js.map +1 -1
- package/dist/MastheadMobileMenu.d.ts +4 -0
- package/dist/MastheadMobileMenu.js +25 -2
- package/dist/MastheadMobileMenu.js.map +1 -1
- package/dist/MastheadProfileMenu.d.ts +4 -4
- package/dist/MastheadProfileMenu.js +22 -0
- package/dist/MastheadProfileMenu.js.map +1 -1
- package/dist/MastheadShell.d.ts +18 -0
- package/dist/MastheadShell.js +32 -17
- package/dist/MastheadShell.js.map +1 -1
- package/dist/SearchableListBase.js +5 -1
- package/dist/SearchableListBase.js.map +1 -1
- package/dist/assets/{bundle.esm-8241e0d1.js → bundle.esm-edd066ac.js} +199 -196
- package/dist/assets/messagebundle_en-d0c2d2d4.js +1 -0
- package/dist/css/themes/Modal.css +1 -1
- package/dist/css/themes/RatingIndicator.css +1 -1
- package/dist/css/themes/Slider.css +1 -1
- package/dist/css/themes/TabInOverflow.css +1 -1
- package/dist/custom-elements-internal.json +93 -80
- package/dist/custom-elements.json +92 -79
- package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
- package/dist/generated/i18n/i18n-defaults.d.ts +2 -1
- package/dist/generated/i18n/i18n-defaults.js +2 -1
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/templates/MastheadItemTemplate.lit.js +25 -22
- package/dist/generated/templates/MastheadItemTemplate.lit.js.map +1 -1
- package/dist/generated/templates/MastheadMenuItemTemplate.lit.js +1 -1
- package/dist/generated/templates/MastheadMenuItemTemplate.lit.js.map +1 -1
- package/dist/generated/templates/MastheadMobileMenuTemplate.lit.js +8 -8
- package/dist/generated/templates/MastheadMobileMenuTemplate.lit.js.map +1 -1
- package/dist/generated/themes/Modal.css.js +1 -1
- package/dist/generated/themes/Modal.css.js.map +1 -1
- package/dist/generated/themes/RatingIndicator.css.js +1 -1
- package/dist/generated/themes/RatingIndicator.css.js.map +1 -1
- package/dist/generated/themes/Slider.css.js +1 -1
- package/dist/generated/themes/Slider.css.js.map +1 -1
- package/dist/generated/themes/TabInOverflow.css.js +1 -1
- package/dist/generated/themes/TabInOverflow.css.js.map +1 -1
- package/dist/i18n/messagebundle.properties +3 -0
- package/dist/i18n/messagebundle_en.properties +1 -0
- package/dist/types/AnalyticsName.d.ts +5 -0
- package/dist/types/AnalyticsName.js +7 -0
- package/dist/types/AnalyticsName.js.map +1 -0
- package/dist/vscode.html-custom-data.json +5 -5
- package/dist/web-types.json +11 -11
- package/package.json +1 -1
- package/src/Assets.ts +29 -0
- package/src/CountrySelector.ts +0 -8
- package/src/MastheadCountrySelector.ts +31 -4
- package/src/MastheadItem.hbs +8 -0
- package/src/MastheadItem.ts +41 -30
- package/src/MastheadMenu.ts +11 -1
- package/src/MastheadMenuItem.hbs +1 -1
- package/src/MastheadMenuItem.ts +2 -2
- package/src/MastheadMobileMenu.hbs +8 -8
- package/src/MastheadMobileMenu.ts +29 -3
- package/src/MastheadProfileMenu.ts +29 -8
- package/src/MastheadShell.ts +34 -17
- package/src/SearchableListBase.ts +6 -1
- package/src/generated/i18n/i18n-defaults.ts +2 -2
- package/src/generated/templates/MastheadItemTemplate.lit.ts +25 -22
- package/src/generated/templates/MastheadMenuItemTemplate.lit.ts +1 -1
- package/src/generated/templates/MastheadMobileMenuTemplate.lit.ts +8 -8
- package/src/generated/themes/Modal.css.ts +1 -1
- package/src/generated/themes/RatingIndicator.css.ts +1 -1
- package/src/generated/themes/Slider.css.ts +1 -1
- package/src/generated/themes/TabInOverflow.css.ts +1 -1
- package/src/i18n/messagebundle.properties +3 -0
- package/src/i18n/messagebundle_en.properties +1 -0
- package/src/themes/Modal.css +4 -4
- package/src/themes/TabInOverflow.css +1 -1
- package/src/types/AnalyticsName.ts +6 -0
- package/dist/assets/messagebundle_en-f0b5e0d9.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.css.js","sourceRoot":"","sources":["../../../src/generated/themes/Slider.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yDAAyD,CAAC;AAExG,OAAO,gBAAgB,MAAM,uFAAuF,CAAC;AACrH,OAAO,YAAY,MAAM,wCAAwC,CAAC;AAElE,6BAA6B,CAAC,4BAA4B,EAAE,aAAa,EAAE,KAAK,IAAI,EAAE,CAAC,gBAAgB,CAAC,CAAC;AACzG,6BAA6B,CAAC,yBAAyB,EAAE,aAAa,EAAE,KAAK,IAAI,EAAE,CAAC,YAAY,CAAC,CAAC;AAElG,MAAM,SAAS,GAAc,EAAC,WAAW,EAAC,yBAAyB,EAAC,QAAQ,EAAC,sBAAsB,EAAC,OAAO,EAAC;CAC3G,EAAC,CAAC;AACH,eAAe,SAAS,CAAC","sourcesContent":["import type { StyleData } from \"@ui5/webcomponents-base/dist/types.js\";\nimport { registerThemePropertiesLoader } from \"@ui5/webcomponents-base/dist/asset-registries/Themes.js\";\n\nimport defaultThemeBase from \"@ui5/webcomponents-theming/dist/generated/themes/sap_horizon/parameters-bundle.css.js\";\nimport defaultTheme from \"./sap_horizon/parameters-bundle.css.js\";\n\nregisterThemePropertiesLoader(\"@ui5/webcomponents-theming\", \"sap_horizon\", async () => defaultThemeBase);\nregisterThemePropertiesLoader(\"@sapudex/web-components\", \"sap_horizon\", async () => defaultTheme);\n\nconst styleData: StyleData = {packageName:\"@sapudex/web-components\",fileName:\"themes/Slider.css.ts\",content:`:host{--udex-slider-color-track-start-point: var( --sapSlider_Selected_Background, #0070f2 );--udex-slider-color-track-active: var( --sapSlider_Selected_Background, #0070f2 );--udex-slider-color-handle-focus-range: var( --sapSlider_Selected_BorderColor, #0070f2 );--udex-slider-color-handle-active-background: var( --sapSlider_Active_HandleBackground, #ffffff );--udex-slider-color-handle-default-icon: var( --sapContent_Selected_ForegroundColor, #0040b0 );--udex-slider-radius-range-size: var(---udexRadiusM, .5rem)}:host{font-family:var(--sapFontFamily);font-weight:var(--udexTypographyFontWeightRegular, 400);font-size:var(--udexTypographyNavigationRegularMFontSize, 14px);line-height:var(--udexTypographyHeadingLineHeight, 1.1);color:var(--sapContent_MeasureIndicatorColor, #5b738b);height:74px}.ui5-slider-progress-container:before{background-color:var(--udex-slider-color-track-start-point)}.ui5-slider-progress{background-color:var(--udex-slider-color-track-active)}.ui5-slider-progress:focus:after{border:2px solid var(--udex-slider-color-handle-focus-range);border-radius:var(--udex-slider-radius-range-size)}:host([desktop]) .ui5-slider-handle:focus,.ui5-slider-handle:focus-visible{background-color:var(--_ui5-v0-230-
|
|
1
|
+
{"version":3,"file":"Slider.css.js","sourceRoot":"","sources":["../../../src/generated/themes/Slider.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yDAAyD,CAAC;AAExG,OAAO,gBAAgB,MAAM,uFAAuF,CAAC;AACrH,OAAO,YAAY,MAAM,wCAAwC,CAAC;AAElE,6BAA6B,CAAC,4BAA4B,EAAE,aAAa,EAAE,KAAK,IAAI,EAAE,CAAC,gBAAgB,CAAC,CAAC;AACzG,6BAA6B,CAAC,yBAAyB,EAAE,aAAa,EAAE,KAAK,IAAI,EAAE,CAAC,YAAY,CAAC,CAAC;AAElG,MAAM,SAAS,GAAc,EAAC,WAAW,EAAC,yBAAyB,EAAC,QAAQ,EAAC,sBAAsB,EAAC,OAAO,EAAC;CAC3G,EAAC,CAAC;AACH,eAAe,SAAS,CAAC","sourcesContent":["import type { StyleData } from \"@ui5/webcomponents-base/dist/types.js\";\nimport { registerThemePropertiesLoader } from \"@ui5/webcomponents-base/dist/asset-registries/Themes.js\";\n\nimport defaultThemeBase from \"@ui5/webcomponents-theming/dist/generated/themes/sap_horizon/parameters-bundle.css.js\";\nimport defaultTheme from \"./sap_horizon/parameters-bundle.css.js\";\n\nregisterThemePropertiesLoader(\"@ui5/webcomponents-theming\", \"sap_horizon\", async () => defaultThemeBase);\nregisterThemePropertiesLoader(\"@sapudex/web-components\", \"sap_horizon\", async () => defaultTheme);\n\nconst styleData: StyleData = {packageName:\"@sapudex/web-components\",fileName:\"themes/Slider.css.ts\",content:`:host{--udex-slider-color-track-start-point: var( --sapSlider_Selected_Background, #0070f2 );--udex-slider-color-track-active: var( --sapSlider_Selected_Background, #0070f2 );--udex-slider-color-handle-focus-range: var( --sapSlider_Selected_BorderColor, #0070f2 );--udex-slider-color-handle-active-background: var( --sapSlider_Active_HandleBackground, #ffffff );--udex-slider-color-handle-default-icon: var( --sapContent_Selected_ForegroundColor, #0040b0 );--udex-slider-radius-range-size: var(---udexRadiusM, .5rem)}:host{font-family:var(--sapFontFamily);font-weight:var(--udexTypographyFontWeightRegular, 400);font-size:var(--udexTypographyNavigationRegularMFontSize, 14px);line-height:var(--udexTypographyHeadingLineHeight, 1.1);color:var(--sapContent_MeasureIndicatorColor, #5b738b);height:74px}.ui5-slider-progress-container:before{background-color:var(--udex-slider-color-track-start-point)}.ui5-slider-progress{background-color:var(--udex-slider-color-track-active)}.ui5-slider-progress:focus:after{border:2px solid var(--udex-slider-color-handle-focus-range);border-radius:var(--udex-slider-radius-range-size)}:host([desktop]) .ui5-slider-handle:focus,.ui5-slider-handle:focus-visible{background-color:var(--_ui5-v0-230-2_range_slider_handle_background_focus)}:host .ui5-slider-inner .ui5-slider-labels{top:34px}:host .ui5-slider-inner .ui5-slider-labels li{height:1.375rem;font-family:var(--sapFontFamily);font-size:var(--udexTypographyNavigationRegularMFontSize, 14px)}[slider-icon]{color:var(--udex-slider-color-handle-default-icon)}\n`};\nexport default styleData;\n\t"]}
|
|
@@ -3,7 +3,7 @@ import defaultThemeBase from "@ui5/webcomponents-theming/dist/generated/themes/s
|
|
|
3
3
|
import defaultTheme from "./sap_horizon/parameters-bundle.css.js";
|
|
4
4
|
registerThemePropertiesLoader("@ui5/webcomponents-theming", "sap_horizon", async () => defaultThemeBase);
|
|
5
5
|
registerThemePropertiesLoader("@sapudex/web-components", "sap_horizon", async () => defaultTheme);
|
|
6
|
-
const styleData = { packageName: "@sapudex/web-components", fileName: "themes/TabInOverflow.css.ts", content: `:host{--udex-tab-overflow-button-font-size: var(--sapFontSize, var(--udexTypographyNavigationRegularXLFontSize));--udex-tab-overflow-button-font-weight: var(--udexTypographyFontWeightRegular, 400);--udex-tab-overflow-button-badge-background: var(--sapAccentColor2, var(--udexColorRed7));--udex-tab-overflow-button-font-family: var(--sapFontFamily, sans-serif);--udex-tab-overflow-button-line-height: var(--sapContent_LineHeight, var(--udexTypographyBodyLineHeight))}[ui5-popover]{margin-top:1px;box-shadow:0 2px 8px #2235484d;border:1px solid var(--udexColorGrey6)}[ui5-popover]::part(content){padding:0}.tab-navigation-popover{display:flex;flex-direction:column;min-width:150px}.udex-tab-overflow__button{padding:var(--udexSpacer8) var(--udexSpacer12);display:flex;background:none;border:0;border-radius:0;cursor:pointer;text-align:start;color:var(--udexColorGrey9);font-family:var(--udex-tab-overflow-button-font-family);font-size:var(--udex-tab-overflow-button-font-size);font-weight:var(--udex-tab-overflow-button-font-weight);line-height:var(--udex-tab-overflow-button-line-height);text-decoration:none;text-transform:capitalize}.udex-tab-overflow__button:hover{background-color:var(--udexColorGrey1)}.udex-tab-overflow__button:focus{outline:2px solid var(--udexColorBlue7, #0070F2);outline-offset:-2px}.udex-tab-overflow__button:active{background-color:var(--
|
|
6
|
+
const styleData = { packageName: "@sapudex/web-components", fileName: "themes/TabInOverflow.css.ts", content: `:host{--udex-tab-overflow-button-font-size: var(--sapFontSize, var(--udexTypographyNavigationRegularXLFontSize));--udex-tab-overflow-button-font-weight: var(--udexTypographyFontWeightRegular, 400);--udex-tab-overflow-button-badge-background: var(--sapAccentColor2, var(--udexColorRed7));--udex-tab-overflow-button-font-family: var(--sapFontFamily, sans-serif);--udex-tab-overflow-button-line-height: var(--sapContent_LineHeight, var(--udexTypographyBodyLineHeight))}[ui5-popover]{margin-top:1px;box-shadow:0 2px 8px #2235484d;border:1px solid var(--udexColorGrey6)}[ui5-popover]::part(content){padding:0}.tab-navigation-popover{display:flex;flex-direction:column;min-width:150px}.udex-tab-overflow__button{padding:var(--udexSpacer8) var(--udexSpacer12);display:flex;background:none;border:0;border-radius:0;cursor:pointer;text-align:start;color:var(--udexColorGrey9);font-family:var(--udex-tab-overflow-button-font-family);font-size:var(--udex-tab-overflow-button-font-size);font-weight:var(--udex-tab-overflow-button-font-weight);line-height:var(--udex-tab-overflow-button-line-height);text-decoration:none;text-transform:capitalize}.udex-tab-overflow__button:hover{background-color:var(--udexColorGrey1)}.udex-tab-overflow__button:focus{outline:2px solid var(--udexColorBlue7, #0070F2);outline-offset:-2px}.udex-tab-overflow__button:active{background-color:var(--udexColorGrey2)}.udex-tab-overflow__button-icon{margin-inline-end:var(--udexSpacer8);position:relative;z-index:0}.udex-tab-overflow__button-badge{margin-block-start:-2px;margin-inline-start:2px;display:inline-flex;width:6px;height:6px;border:1px solid #fff;border-radius:50%;background-color:var(--udex-tab-overflow-button-badge-background)}.udex-tab-overflow__button-icon .udex-tab-overflow__button-badge{margin-block-start:0;margin-inline-start:0;position:absolute;z-index:1;inset-block-start:-4px;inset-inline-end:-6px}
|
|
7
7
|
` };
|
|
8
8
|
export default styleData;
|
|
9
9
|
//# sourceMappingURL=TabInOverflow.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabInOverflow.css.js","sourceRoot":"","sources":["../../../src/generated/themes/TabInOverflow.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yDAAyD,CAAC;AAExG,OAAO,gBAAgB,MAAM,uFAAuF,CAAC;AACrH,OAAO,YAAY,MAAM,wCAAwC,CAAC;AAElE,6BAA6B,CAAC,4BAA4B,EAAE,aAAa,EAAE,KAAK,IAAI,EAAE,CAAC,gBAAgB,CAAC,CAAC;AACzG,6BAA6B,CAAC,yBAAyB,EAAE,aAAa,EAAE,KAAK,IAAI,EAAE,CAAC,YAAY,CAAC,CAAC;AAElG,MAAM,SAAS,GAAc,EAAC,WAAW,EAAC,yBAAyB,EAAC,QAAQ,EAAC,6BAA6B,EAAC,OAAO,EAAC;CAClH,EAAC,CAAC;AACH,eAAe,SAAS,CAAC","sourcesContent":["import type { StyleData } from \"@ui5/webcomponents-base/dist/types.js\";\nimport { registerThemePropertiesLoader } from \"@ui5/webcomponents-base/dist/asset-registries/Themes.js\";\n\nimport defaultThemeBase from \"@ui5/webcomponents-theming/dist/generated/themes/sap_horizon/parameters-bundle.css.js\";\nimport defaultTheme from \"./sap_horizon/parameters-bundle.css.js\";\n\nregisterThemePropertiesLoader(\"@ui5/webcomponents-theming\", \"sap_horizon\", async () => defaultThemeBase);\nregisterThemePropertiesLoader(\"@sapudex/web-components\", \"sap_horizon\", async () => defaultTheme);\n\nconst styleData: StyleData = {packageName:\"@sapudex/web-components\",fileName:\"themes/TabInOverflow.css.ts\",content:`:host{--udex-tab-overflow-button-font-size: var(--sapFontSize, var(--udexTypographyNavigationRegularXLFontSize));--udex-tab-overflow-button-font-weight: var(--udexTypographyFontWeightRegular, 400);--udex-tab-overflow-button-badge-background: var(--sapAccentColor2, var(--udexColorRed7));--udex-tab-overflow-button-font-family: var(--sapFontFamily, sans-serif);--udex-tab-overflow-button-line-height: var(--sapContent_LineHeight, var(--udexTypographyBodyLineHeight))}[ui5-popover]{margin-top:1px;box-shadow:0 2px 8px #2235484d;border:1px solid var(--udexColorGrey6)}[ui5-popover]::part(content){padding:0}.tab-navigation-popover{display:flex;flex-direction:column;min-width:150px}.udex-tab-overflow__button{padding:var(--udexSpacer8) var(--udexSpacer12);display:flex;background:none;border:0;border-radius:0;cursor:pointer;text-align:start;color:var(--udexColorGrey9);font-family:var(--udex-tab-overflow-button-font-family);font-size:var(--udex-tab-overflow-button-font-size);font-weight:var(--udex-tab-overflow-button-font-weight);line-height:var(--udex-tab-overflow-button-line-height);text-decoration:none;text-transform:capitalize}.udex-tab-overflow__button:hover{background-color:var(--udexColorGrey1)}.udex-tab-overflow__button:focus{outline:2px solid var(--udexColorBlue7, #0070F2);outline-offset:-2px}.udex-tab-overflow__button:active{background-color:var(--
|
|
1
|
+
{"version":3,"file":"TabInOverflow.css.js","sourceRoot":"","sources":["../../../src/generated/themes/TabInOverflow.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yDAAyD,CAAC;AAExG,OAAO,gBAAgB,MAAM,uFAAuF,CAAC;AACrH,OAAO,YAAY,MAAM,wCAAwC,CAAC;AAElE,6BAA6B,CAAC,4BAA4B,EAAE,aAAa,EAAE,KAAK,IAAI,EAAE,CAAC,gBAAgB,CAAC,CAAC;AACzG,6BAA6B,CAAC,yBAAyB,EAAE,aAAa,EAAE,KAAK,IAAI,EAAE,CAAC,YAAY,CAAC,CAAC;AAElG,MAAM,SAAS,GAAc,EAAC,WAAW,EAAC,yBAAyB,EAAC,QAAQ,EAAC,6BAA6B,EAAC,OAAO,EAAC;CAClH,EAAC,CAAC;AACH,eAAe,SAAS,CAAC","sourcesContent":["import type { StyleData } from \"@ui5/webcomponents-base/dist/types.js\";\nimport { registerThemePropertiesLoader } from \"@ui5/webcomponents-base/dist/asset-registries/Themes.js\";\n\nimport defaultThemeBase from \"@ui5/webcomponents-theming/dist/generated/themes/sap_horizon/parameters-bundle.css.js\";\nimport defaultTheme from \"./sap_horizon/parameters-bundle.css.js\";\n\nregisterThemePropertiesLoader(\"@ui5/webcomponents-theming\", \"sap_horizon\", async () => defaultThemeBase);\nregisterThemePropertiesLoader(\"@sapudex/web-components\", \"sap_horizon\", async () => defaultTheme);\n\nconst styleData: StyleData = {packageName:\"@sapudex/web-components\",fileName:\"themes/TabInOverflow.css.ts\",content:`:host{--udex-tab-overflow-button-font-size: var(--sapFontSize, var(--udexTypographyNavigationRegularXLFontSize));--udex-tab-overflow-button-font-weight: var(--udexTypographyFontWeightRegular, 400);--udex-tab-overflow-button-badge-background: var(--sapAccentColor2, var(--udexColorRed7));--udex-tab-overflow-button-font-family: var(--sapFontFamily, sans-serif);--udex-tab-overflow-button-line-height: var(--sapContent_LineHeight, var(--udexTypographyBodyLineHeight))}[ui5-popover]{margin-top:1px;box-shadow:0 2px 8px #2235484d;border:1px solid var(--udexColorGrey6)}[ui5-popover]::part(content){padding:0}.tab-navigation-popover{display:flex;flex-direction:column;min-width:150px}.udex-tab-overflow__button{padding:var(--udexSpacer8) var(--udexSpacer12);display:flex;background:none;border:0;border-radius:0;cursor:pointer;text-align:start;color:var(--udexColorGrey9);font-family:var(--udex-tab-overflow-button-font-family);font-size:var(--udex-tab-overflow-button-font-size);font-weight:var(--udex-tab-overflow-button-font-weight);line-height:var(--udex-tab-overflow-button-line-height);text-decoration:none;text-transform:capitalize}.udex-tab-overflow__button:hover{background-color:var(--udexColorGrey1)}.udex-tab-overflow__button:focus{outline:2px solid var(--udexColorBlue7, #0070F2);outline-offset:-2px}.udex-tab-overflow__button:active{background-color:var(--udexColorGrey2)}.udex-tab-overflow__button-icon{margin-inline-end:var(--udexSpacer8);position:relative;z-index:0}.udex-tab-overflow__button-badge{margin-block-start:-2px;margin-inline-start:2px;display:inline-flex;width:6px;height:6px;border:1px solid #fff;border-radius:50%;background-color:var(--udex-tab-overflow-button-badge-background)}.udex-tab-overflow__button-icon .udex-tab-overflow__button-badge{margin-block-start:0;margin-inline-start:0;position:absolute;z-index:1;inset-block-start:-4px;inset-inline-end:-6px}\n`};\nexport default styleData;\n\t"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnalyticsName.js","sourceRoot":"","sources":["../../src/types/AnalyticsName.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,kCAAmB,CAAA;IACnB,0CAA2B,CAAA;AAC7B,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB;AAED,eAAe,aAAa,CAAC","sourcesContent":["export enum AnalyticsName {\n \"Header\" = \"header\",\n \"Header-sub\" = \"header-sub\",\n}\n\nexport default AnalyticsName;\n"]}
|
|
@@ -1610,11 +1610,6 @@
|
|
|
1610
1610
|
"description": "Defines a title for sub menu items",
|
|
1611
1611
|
"values": []
|
|
1612
1612
|
},
|
|
1613
|
-
{
|
|
1614
|
-
"name": "text",
|
|
1615
|
-
"description": "Defines the text of item.",
|
|
1616
|
-
"values": []
|
|
1617
|
-
},
|
|
1618
1613
|
{
|
|
1619
1614
|
"name": "selected",
|
|
1620
1615
|
"description": "Defines the selected item.",
|
|
@@ -1669,6 +1664,11 @@
|
|
|
1669
1664
|
"name": "hide-active-border",
|
|
1670
1665
|
"description": "Hide active border for item",
|
|
1671
1666
|
"values": []
|
|
1667
|
+
},
|
|
1668
|
+
{
|
|
1669
|
+
"name": "label",
|
|
1670
|
+
"description": "Defines the label for analytics",
|
|
1671
|
+
"values": []
|
|
1672
1672
|
}
|
|
1673
1673
|
],
|
|
1674
1674
|
"references": []
|
package/dist/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@sapudex/web-components",
|
|
4
|
-
"version": "0.230.
|
|
4
|
+
"version": "0.230.2",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -3210,11 +3210,6 @@
|
|
|
3210
3210
|
"description": "Defines a title for sub menu items",
|
|
3211
3211
|
"value": { "type": "string", "default": "\"\"" }
|
|
3212
3212
|
},
|
|
3213
|
-
{
|
|
3214
|
-
"name": "text",
|
|
3215
|
-
"description": "Defines the text of item.",
|
|
3216
|
-
"value": { "type": "string", "default": "\"\"" }
|
|
3217
|
-
},
|
|
3218
3213
|
{
|
|
3219
3214
|
"name": "selected",
|
|
3220
3215
|
"description": "Defines the selected item.",
|
|
@@ -3269,6 +3264,11 @@
|
|
|
3269
3264
|
"name": "hide-active-border",
|
|
3270
3265
|
"description": "Hide active border for item",
|
|
3271
3266
|
"value": { "type": "boolean", "default": "\"\"" }
|
|
3267
|
+
},
|
|
3268
|
+
{
|
|
3269
|
+
"name": "label",
|
|
3270
|
+
"description": "Defines the label for analytics",
|
|
3271
|
+
"value": { "type": "string" }
|
|
3272
3272
|
}
|
|
3273
3273
|
],
|
|
3274
3274
|
"slots": [
|
|
@@ -3301,11 +3301,6 @@
|
|
|
3301
3301
|
"description": "Defines a title for sub menu items",
|
|
3302
3302
|
"value": { "type": "string" }
|
|
3303
3303
|
},
|
|
3304
|
-
{
|
|
3305
|
-
"name": "text",
|
|
3306
|
-
"description": "Defines the text of item.",
|
|
3307
|
-
"value": { "type": "string" }
|
|
3308
|
-
},
|
|
3309
3304
|
{
|
|
3310
3305
|
"name": "selected",
|
|
3311
3306
|
"description": "Defines the selected item.",
|
|
@@ -3360,6 +3355,11 @@
|
|
|
3360
3355
|
"name": "hide-active-border",
|
|
3361
3356
|
"description": "Hide active border for item",
|
|
3362
3357
|
"value": { "type": "boolean" }
|
|
3358
|
+
},
|
|
3359
|
+
{
|
|
3360
|
+
"name": "label",
|
|
3361
|
+
"description": "Defines the label for analytics",
|
|
3362
|
+
"value": { "type": "string" }
|
|
3363
3363
|
}
|
|
3364
3364
|
],
|
|
3365
3365
|
"events": [
|
package/package.json
CHANGED
package/src/Assets.ts
CHANGED
|
@@ -13,3 +13,32 @@ const customThemeLoader = async () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
registerCustomThemePropertiesLoader("@ui5/webcomponents", "sap_glow", customThemeLoader);
|
|
16
|
+
|
|
17
|
+
(function checkThemeCSSLink() {
|
|
18
|
+
if (typeof document === "undefined") { return; }
|
|
19
|
+
|
|
20
|
+
const runCheck = () => {
|
|
21
|
+
const cssLoaded = Array.from(document.styleSheets).some(sheet => {
|
|
22
|
+
try {
|
|
23
|
+
if (sheet.href && sheet.href.includes("css_variables.css")) { return true; }
|
|
24
|
+
return Array.from(sheet.cssRules || []).some(rule => rule.cssText.includes(".sapThemeMetaData-Base-baseLib"));
|
|
25
|
+
} catch {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
if (!cssLoaded) {
|
|
31
|
+
const msg = `Required theme CSS not found.
|
|
32
|
+
Please add:
|
|
33
|
+
<link rel="stylesheet" href="path/to/@sapudex/design-tokens/dist/themes/sap_glow/css_variables.css">
|
|
34
|
+
or import '@sapudex/design-tokens/dist/themes/sap_glow/css_variables.css'`;
|
|
35
|
+
console.warn(msg);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
if (document.readyState === "loading") {
|
|
40
|
+
document.addEventListener("DOMContentLoaded", runCheck);
|
|
41
|
+
} else {
|
|
42
|
+
runCheck();
|
|
43
|
+
}
|
|
44
|
+
})();
|
package/src/CountrySelector.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
2
2
|
import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
|
|
3
3
|
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
4
|
-
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
5
|
-
import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
6
4
|
import executeTemplate from "@ui5/webcomponents-base/dist/renderer/executeTemplate.js";
|
|
7
5
|
import {
|
|
8
6
|
isEscape,
|
|
@@ -273,12 +271,6 @@ class UDExCountrySelector extends UDExSearchableListBase {
|
|
|
273
271
|
_search!: Search;
|
|
274
272
|
_handleResizeBound: ResizeObserverCallback;
|
|
275
273
|
|
|
276
|
-
static i18nBundle: I18nBundle;
|
|
277
|
-
|
|
278
|
-
static async onDefine() {
|
|
279
|
-
UDExCountrySelector.i18nBundle = await getI18nBundle("@sapudex/web-components");
|
|
280
|
-
}
|
|
281
|
-
|
|
282
274
|
constructor() {
|
|
283
275
|
super();
|
|
284
276
|
this._shouldFilterItems = false;
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
} from "@ui5/webcomponents-base/dist/Keys.js";
|
|
12
12
|
import UDExMastheadMenuItem from "./MastheadMenuItem.js";
|
|
13
13
|
import UDExSearch, { Mode as UDExSearchMode } from "./Search.js";
|
|
14
|
-
|
|
15
14
|
import MastheadCountrySelectorTemplate from "./generated/templates/MastheadCountrySelectorTemplate.lit.js";
|
|
15
|
+
import AnalyticsName from "./types/AnalyticsName.js";
|
|
16
16
|
|
|
17
17
|
// Styles
|
|
18
18
|
import MastheadCountrySelectorCss from "./generated/themes/MastheadCountrySelector.css.js";
|
|
@@ -23,6 +23,8 @@ export type RegionItemClickEventDetail = {
|
|
|
23
23
|
countries: Array<Country>,
|
|
24
24
|
},
|
|
25
25
|
originalEvent: Event,
|
|
26
|
+
analyticsName: AnalyticsName,
|
|
27
|
+
sourceNode: HTMLElement,
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
export type CountryItemClickEventDetail = {
|
|
@@ -32,10 +34,13 @@ export type CountryItemClickEventDetail = {
|
|
|
32
34
|
url: string,
|
|
33
35
|
},
|
|
34
36
|
originalEvent: Event,
|
|
37
|
+
analyticsName: AnalyticsName,
|
|
38
|
+
sourceNode: HTMLElement,
|
|
35
39
|
}
|
|
36
40
|
|
|
37
41
|
export type SearchEventDetail = {
|
|
38
42
|
value: string,
|
|
43
|
+
analyticsName: AnalyticsName,
|
|
39
44
|
}
|
|
40
45
|
|
|
41
46
|
export type Region = {
|
|
@@ -87,6 +92,12 @@ export type Country = {
|
|
|
87
92
|
originalEvent: {
|
|
88
93
|
type: Event,
|
|
89
94
|
},
|
|
95
|
+
analyticsName: {
|
|
96
|
+
type: AnalyticsName,
|
|
97
|
+
},
|
|
98
|
+
sourceNode: {
|
|
99
|
+
type: HTMLElement,
|
|
100
|
+
},
|
|
90
101
|
},
|
|
91
102
|
})
|
|
92
103
|
|
|
@@ -103,6 +114,12 @@ export type Country = {
|
|
|
103
114
|
originalEvent: {
|
|
104
115
|
type: Event,
|
|
105
116
|
},
|
|
117
|
+
analyticsName: {
|
|
118
|
+
type: AnalyticsName,
|
|
119
|
+
},
|
|
120
|
+
sourceNode: {
|
|
121
|
+
type: HTMLElement,
|
|
122
|
+
},
|
|
106
123
|
},
|
|
107
124
|
})
|
|
108
125
|
|
|
@@ -113,7 +130,12 @@ export type Country = {
|
|
|
113
130
|
*/
|
|
114
131
|
@event("country-selector-search", {
|
|
115
132
|
detail: {
|
|
116
|
-
value: {
|
|
133
|
+
value: {
|
|
134
|
+
type: String,
|
|
135
|
+
},
|
|
136
|
+
analyticsName: {
|
|
137
|
+
type: AnalyticsName,
|
|
138
|
+
},
|
|
117
139
|
},
|
|
118
140
|
})
|
|
119
141
|
|
|
@@ -304,6 +326,7 @@ class UDExMastheadCountrySelector extends UI5Element {
|
|
|
304
326
|
this._shouldFocusBackBtn = false;
|
|
305
327
|
this.fireEvent<SearchEventDetail>("country-selector-search", {
|
|
306
328
|
value: e.detail.value,
|
|
329
|
+
analyticsName: AnalyticsName.Header,
|
|
307
330
|
});
|
|
308
331
|
this.refreshRendering();
|
|
309
332
|
}
|
|
@@ -429,14 +452,16 @@ class UDExMastheadCountrySelector extends UI5Element {
|
|
|
429
452
|
}
|
|
430
453
|
|
|
431
454
|
fireEventRegionItemClick(e: CustomEvent | KeyboardEvent): void {
|
|
432
|
-
const
|
|
455
|
+
const item = e.target as UDExMastheadMenuItem;
|
|
433
456
|
|
|
434
457
|
this.fireEvent<RegionItemClickEventDetail>("region-item-click", {
|
|
435
458
|
item: {
|
|
436
|
-
title: label,
|
|
459
|
+
title: item.label,
|
|
437
460
|
countries: this._activeRegion?.countries || [],
|
|
438
461
|
},
|
|
439
462
|
originalEvent: e,
|
|
463
|
+
analyticsName: AnalyticsName.Header,
|
|
464
|
+
sourceNode: item.shadowRoot?.querySelector(".udex-masthead-menu-item") as HTMLElement,
|
|
440
465
|
});
|
|
441
466
|
}
|
|
442
467
|
|
|
@@ -451,6 +476,8 @@ class UDExMastheadCountrySelector extends UI5Element {
|
|
|
451
476
|
url: url || "",
|
|
452
477
|
},
|
|
453
478
|
originalEvent: e,
|
|
479
|
+
analyticsName: AnalyticsName.Header,
|
|
480
|
+
sourceNode: item.shadowRoot?.querySelector(".udex-masthead-menu-item") as HTMLElement,
|
|
454
481
|
});
|
|
455
482
|
}
|
|
456
483
|
|
package/src/MastheadItem.hbs
CHANGED
|
@@ -64,8 +64,16 @@
|
|
|
64
64
|
{{else if image}}
|
|
65
65
|
<img
|
|
66
66
|
class="udex-masthead-item__image"
|
|
67
|
+
id="{{this._id}}_image-alt"
|
|
67
68
|
src="{{image}}"
|
|
68
69
|
alt="{{imageAlt}}"/>
|
|
70
|
+
{{#if imageAlt}}
|
|
71
|
+
<span
|
|
72
|
+
id="image-desc"
|
|
73
|
+
class="udex-masthead-hidden-text">
|
|
74
|
+
{{imageAlt}}
|
|
75
|
+
</span>
|
|
76
|
+
{{/if}}
|
|
69
77
|
{{else}}
|
|
70
78
|
<span class="udex-masthead-item__text">
|
|
71
79
|
<slot></slot>
|
package/src/MastheadItem.ts
CHANGED
|
@@ -11,7 +11,7 @@ import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
|
|
|
11
11
|
import { isEscape } from "@ui5/webcomponents-base/dist/Keys.js";
|
|
12
12
|
import { isDesktop } from "@ui5/webcomponents-base/dist/Device.js";
|
|
13
13
|
import {
|
|
14
|
-
OPENS_IN_A_NEW_WINDOW, PROFILE, CART, COUNTRY_SELECTOR, SUPPORT,
|
|
14
|
+
OPENS_IN_A_NEW_WINDOW, PROFILE, CART, COUNTRY_SELECTOR, SUPPORT, SEARCH,
|
|
15
15
|
} from "./generated/i18n/i18n-defaults.js";
|
|
16
16
|
import UDExMastheadMenu from "./MastheadMenu.js";
|
|
17
17
|
import UDExAvatar from "./Avatar.js";
|
|
@@ -20,6 +20,8 @@ import UDExMastheadShell from "./MastheadShell.js";
|
|
|
20
20
|
import MastheadItemTemplate from "./generated/templates/MastheadItemTemplate.lit.js";
|
|
21
21
|
import { Target } from "./types/common.js";
|
|
22
22
|
import { BreakpointUtils } from "./utils/Breakpoints.js";
|
|
23
|
+
import AnalyticsName from "./types/AnalyticsName.js";
|
|
24
|
+
|
|
23
25
|
// Styles
|
|
24
26
|
import MastheadItemCss from "./generated/themes/MastheadItem.css.js";
|
|
25
27
|
|
|
@@ -30,7 +32,6 @@ export enum DropdownItemAction {
|
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
export interface IMastheadItem {
|
|
33
|
-
text?: string;
|
|
34
35
|
selected?: boolean;
|
|
35
36
|
icon?: string;
|
|
36
37
|
avatar?: Array<HTMLElement>;
|
|
@@ -57,11 +58,14 @@ export type MenuItem = {
|
|
|
57
58
|
export type ItemClickEventDetail = {
|
|
58
59
|
originalEvent: Event,
|
|
59
60
|
item: UDExMastheadItem,
|
|
61
|
+
analyticsName: AnalyticsName,
|
|
62
|
+
sourceNode: HTMLElement,
|
|
60
63
|
}
|
|
61
64
|
|
|
62
65
|
export type DropdownEventDetail = {
|
|
63
66
|
title: string,
|
|
64
67
|
action: DropdownItemAction,
|
|
68
|
+
analyticsName: AnalyticsName,
|
|
65
69
|
}
|
|
66
70
|
|
|
67
71
|
export const DropdownBaseEventDetail = {
|
|
@@ -79,6 +83,12 @@ export const ItemBaseEvent = {
|
|
|
79
83
|
originalEvent: {
|
|
80
84
|
type: Event,
|
|
81
85
|
},
|
|
86
|
+
analyticsName: {
|
|
87
|
+
type: AnalyticsName,
|
|
88
|
+
},
|
|
89
|
+
sourceNode: {
|
|
90
|
+
type: HTMLElement,
|
|
91
|
+
},
|
|
82
92
|
},
|
|
83
93
|
};
|
|
84
94
|
|
|
@@ -99,6 +109,7 @@ export const ItemBaseEvent = {
|
|
|
99
109
|
* @extends UI5Element
|
|
100
110
|
* @public
|
|
101
111
|
*/
|
|
112
|
+
|
|
102
113
|
@customElement({
|
|
103
114
|
tag: "udex-masthead-item",
|
|
104
115
|
renderer: litRender,
|
|
@@ -154,15 +165,6 @@ class UDExMastheadItem extends UI5Element implements IMastheadItem {
|
|
|
154
165
|
@property({ type: String })
|
|
155
166
|
menuTitle!: string;
|
|
156
167
|
|
|
157
|
-
/**
|
|
158
|
-
* Defines the text of item.
|
|
159
|
-
*
|
|
160
|
-
* @public
|
|
161
|
-
* @default ""
|
|
162
|
-
*/
|
|
163
|
-
@property({ type: String })
|
|
164
|
-
text!: string;
|
|
165
|
-
|
|
166
168
|
/**
|
|
167
169
|
* Defines the selected item.
|
|
168
170
|
*
|
|
@@ -276,6 +278,14 @@ class UDExMastheadItem extends UI5Element implements IMastheadItem {
|
|
|
276
278
|
@property({ type: Boolean })
|
|
277
279
|
_isMobileMode!: boolean;
|
|
278
280
|
|
|
281
|
+
/**
|
|
282
|
+
* Defines the label for analytics
|
|
283
|
+
*
|
|
284
|
+
* @public
|
|
285
|
+
*/
|
|
286
|
+
@property({ type: String })
|
|
287
|
+
label!: string;
|
|
288
|
+
|
|
279
289
|
/**
|
|
280
290
|
* Slot for the dropdown
|
|
281
291
|
*
|
|
@@ -310,6 +320,10 @@ class UDExMastheadItem extends UI5Element implements IMastheadItem {
|
|
|
310
320
|
}
|
|
311
321
|
}
|
|
312
322
|
|
|
323
|
+
onBeforeRendering(): void {
|
|
324
|
+
this.label = this.eventItemTitle;
|
|
325
|
+
}
|
|
326
|
+
|
|
313
327
|
onAfterRendering(): void {
|
|
314
328
|
this._profileAvatar = this.profileAvatar;
|
|
315
329
|
this._mastheadShell = this.mastheadShell;
|
|
@@ -396,17 +410,19 @@ class UDExMastheadItem extends UI5Element implements IMastheadItem {
|
|
|
396
410
|
}
|
|
397
411
|
|
|
398
412
|
fireDropdownCloseEvent(title: string, action: DropdownItemAction): void {
|
|
399
|
-
this.fireEvent<DropdownEventDetail>("dropdown-closed", { title, action });
|
|
413
|
+
this.fireEvent<DropdownEventDetail>("dropdown-closed", { title, action, analyticsName: AnalyticsName.Header });
|
|
400
414
|
}
|
|
401
415
|
|
|
402
416
|
fireDropdownOpenEvent(title: string, action: DropdownItemAction): void {
|
|
403
|
-
this.fireEvent<DropdownEventDetail>("dropdown-opened", { title, action });
|
|
417
|
+
this.fireEvent<DropdownEventDetail>("dropdown-opened", { title, action, analyticsName: AnalyticsName.Header });
|
|
404
418
|
}
|
|
405
419
|
|
|
406
420
|
fireItemClickEvent(e: Event): void {
|
|
407
421
|
this.fireEvent<ItemClickEventDetail>("item-click", {
|
|
408
422
|
item: this,
|
|
409
423
|
originalEvent: e,
|
|
424
|
+
analyticsName: AnalyticsName.Header,
|
|
425
|
+
sourceNode: e.currentTarget as HTMLElement,
|
|
410
426
|
});
|
|
411
427
|
}
|
|
412
428
|
|
|
@@ -509,22 +525,18 @@ class UDExMastheadItem extends UI5Element implements IMastheadItem {
|
|
|
509
525
|
return this.selected ? " udex-masthead-item__button--active" : "";
|
|
510
526
|
}
|
|
511
527
|
|
|
512
|
-
get ariaDescribedBy(): string {
|
|
528
|
+
get ariaDescribedBy(): string | undefined {
|
|
513
529
|
const labels = [];
|
|
514
530
|
|
|
515
|
-
if (this.text) {
|
|
516
|
-
labels.push(`${this.__id}-text`);
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
if (this.icon) {
|
|
520
|
-
labels.push(`${this.__id}-icon`);
|
|
521
|
-
}
|
|
522
|
-
|
|
523
531
|
if (this.isTargetBlank) {
|
|
524
532
|
labels.push(`new-win-desc`);
|
|
525
533
|
}
|
|
526
534
|
|
|
527
|
-
|
|
535
|
+
if (this.imageAlt) {
|
|
536
|
+
labels.push(`image-desc`);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
return labels.length ? labels.join(" ").trim() : undefined;
|
|
528
540
|
}
|
|
529
541
|
|
|
530
542
|
get isDropdownOpened(): boolean {
|
|
@@ -555,6 +567,10 @@ class UDExMastheadItem extends UI5Element implements IMastheadItem {
|
|
|
555
567
|
return this.getAttribute("slot") === "cart";
|
|
556
568
|
}
|
|
557
569
|
|
|
570
|
+
get isSearchBtn(): boolean {
|
|
571
|
+
return this.icon === "search";
|
|
572
|
+
}
|
|
573
|
+
|
|
558
574
|
get isSupportBtn(): boolean {
|
|
559
575
|
return this.getAttribute("slot") === "support";
|
|
560
576
|
}
|
|
@@ -574,24 +590,19 @@ class UDExMastheadItem extends UI5Element implements IMastheadItem {
|
|
|
574
590
|
get openInNewWindowText(): string {
|
|
575
591
|
return UDExMastheadItem.i18nBundle.getText(OPENS_IN_A_NEW_WINDOW);
|
|
576
592
|
}
|
|
577
|
-
|
|
578
593
|
get eventItemTitle(): string {
|
|
579
|
-
if (this.
|
|
580
|
-
return
|
|
594
|
+
if (this.isSearchBtn) {
|
|
595
|
+
return UDExMastheadItem.i18nBundle.getText(SEARCH);
|
|
581
596
|
}
|
|
582
|
-
|
|
583
597
|
if (this.isCartBtn) {
|
|
584
598
|
return UDExMastheadItem.i18nBundle.getText(CART);
|
|
585
599
|
}
|
|
586
|
-
|
|
587
600
|
if (this.isProfileBtn) {
|
|
588
601
|
return UDExMastheadItem.i18nBundle.getText(PROFILE);
|
|
589
602
|
}
|
|
590
|
-
|
|
591
603
|
if (this.isCountrySelectorBtn) {
|
|
592
604
|
return UDExMastheadItem.i18nBundle.getText(COUNTRY_SELECTOR);
|
|
593
605
|
}
|
|
594
|
-
|
|
595
606
|
if (this.isSupportBtn) {
|
|
596
607
|
return UDExMastheadItem.i18nBundle.getText(SUPPORT);
|
|
597
608
|
}
|
package/src/MastheadMenu.ts
CHANGED
|
@@ -11,6 +11,7 @@ import UDExBadge from "./Badge.js";
|
|
|
11
11
|
import UDExMastheadMenuItem, { ItemType } from "./MastheadMenuItem.js";
|
|
12
12
|
import UDExDivider from "./Divider.js";
|
|
13
13
|
import MastheadMenuTemplate from "./generated/templates/MastheadMenuTemplate.lit.js";
|
|
14
|
+
import AnalyticsName from "./types/AnalyticsName.js";
|
|
14
15
|
|
|
15
16
|
// Styles
|
|
16
17
|
import MastheadMenuCss from "./generated/themes/MastheadMenu.css.js";
|
|
@@ -38,6 +39,8 @@ export type MenuItemClickEventDetail = {
|
|
|
38
39
|
category?: string,
|
|
39
40
|
originalEvent: Event,
|
|
40
41
|
item: UDExMastheadMenuItem,
|
|
42
|
+
analyticsName: AnalyticsName,
|
|
43
|
+
sourceNode: HTMLElement,
|
|
41
44
|
}
|
|
42
45
|
|
|
43
46
|
/**
|
|
@@ -82,6 +85,12 @@ export type MenuItemClickEventDetail = {
|
|
|
82
85
|
originalEvent: {
|
|
83
86
|
type: Event,
|
|
84
87
|
},
|
|
88
|
+
analyticsName: {
|
|
89
|
+
type: AnalyticsName,
|
|
90
|
+
},
|
|
91
|
+
sourceNode: {
|
|
92
|
+
type: HTMLElement,
|
|
93
|
+
},
|
|
85
94
|
},
|
|
86
95
|
})
|
|
87
96
|
|
|
@@ -136,10 +145,11 @@ class UDExMastheadMenu extends UI5Element {
|
|
|
136
145
|
handleMenuItemClick(e: Event): void {
|
|
137
146
|
const item = e.target as UDExMastheadMenuItem;
|
|
138
147
|
const { url, type } = item;
|
|
139
|
-
|
|
140
148
|
if (url?.length) {
|
|
141
149
|
const list = item.closest(".udex-masthead-menu__list") as HTMLElement;
|
|
142
150
|
this.fireEvent<MenuItemClickEventDetail>("menu-item-click", {
|
|
151
|
+
sourceNode: item.shadowRoot?.querySelector(".udex-masthead-menu-item") as HTMLElement,
|
|
152
|
+
analyticsName: AnalyticsName.Header,
|
|
143
153
|
item,
|
|
144
154
|
originalEvent: e,
|
|
145
155
|
...(type !== ItemType.Heading && { category: list?.getAttribute("category") || "" }),
|
package/src/MastheadMenuItem.hbs
CHANGED
package/src/MastheadMenuItem.ts
CHANGED
|
@@ -226,8 +226,8 @@ class UDExMastheadMenuItem extends UI5Element {
|
|
|
226
226
|
return this.externalLink ? "new-win-desc" : null;
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
get accessibleRoleText(): string
|
|
230
|
-
return this.accessibleRole ? this.accessibleRole :
|
|
229
|
+
get accessibleRoleText(): string {
|
|
230
|
+
return this.accessibleRole ? this.accessibleRole : "menuitem";
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
get partAttr(): string {
|