@ui5/webcomponents 2.20.0-rc.2 → 2.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/Avatar.d.ts +4 -0
- package/dist/Avatar.js.map +1 -1
- package/dist/Breadcrumbs.d.ts +3 -3
- package/dist/Breadcrumbs.js +1 -1
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/Carousel.d.ts +2 -2
- package/dist/Carousel.js +1 -1
- package/dist/Carousel.js.map +1 -1
- package/dist/ComboBox.d.ts +37 -8
- package/dist/ComboBox.js +39 -10
- package/dist/ComboBox.js.map +1 -1
- package/dist/ComboBoxItem.d.ts +5 -1
- package/dist/ComboBoxItem.js.map +1 -1
- package/dist/DatePicker.d.ts +7 -0
- package/dist/DatePicker.js +10 -0
- package/dist/DatePicker.js.map +1 -1
- package/dist/DatePickerInputTemplate.js +1 -1
- package/dist/DatePickerInputTemplate.js.map +1 -1
- package/dist/DateTimeInput.d.ts +1 -0
- package/dist/DateTimeInput.js +1 -0
- package/dist/DateTimeInput.js.map +1 -1
- package/dist/DayPicker.js +6 -6
- package/dist/DayPicker.js.map +1 -1
- package/dist/Icon.js +1 -1
- package/dist/Icon.js.map +1 -1
- package/dist/Input.js +1 -1
- package/dist/Input.js.map +1 -1
- package/dist/Link.js +1 -1
- package/dist/Link.js.map +1 -1
- package/dist/List.d.ts +1 -0
- package/dist/List.js +17 -2
- package/dist/List.js.map +1 -1
- package/dist/ListItemCustom.d.ts +2 -2
- package/dist/ListItemCustom.js +2 -2
- package/dist/ListItemCustom.js.map +1 -1
- package/dist/MonthPicker.js +2 -2
- package/dist/MonthPicker.js.map +1 -1
- package/dist/MultiComboBox.d.ts +19 -1
- package/dist/MultiComboBox.js +52 -7
- package/dist/MultiComboBox.js.map +1 -1
- package/dist/MultiComboBoxItem.d.ts +12 -0
- package/dist/MultiComboBoxItem.js +3 -0
- package/dist/MultiComboBoxItem.js.map +1 -1
- package/dist/Option.d.ts +2 -0
- package/dist/Option.js.map +1 -1
- package/dist/RatingIndicator.d.ts +2 -4
- package/dist/RatingIndicator.js +18 -9
- package/dist/RatingIndicator.js.map +1 -1
- package/dist/RatingIndicatorTemplate.js +6 -6
- package/dist/RatingIndicatorTemplate.js.map +1 -1
- package/dist/TabContainer.js +1 -1
- package/dist/TabContainer.js.map +1 -1
- package/dist/Table.js +2 -2
- package/dist/Table.js.map +1 -1
- package/dist/TableCell.js +2 -0
- package/dist/TableCell.js.map +1 -1
- package/dist/TableHeaderCell.js +1 -0
- package/dist/TableHeaderCell.js.map +1 -1
- package/dist/TableRow.d.ts +2 -2
- package/dist/TableRow.js +19 -7
- package/dist/TableRow.js.map +1 -1
- package/dist/TableRowActionBase.d.ts +2 -2
- package/dist/TableRowActionBase.js.map +1 -1
- package/dist/TableRowActionNavigation.d.ts +4 -0
- package/dist/TableRowActionNavigation.js +4 -0
- package/dist/TableRowActionNavigation.js.map +1 -1
- package/dist/TableRowTemplate.js +1 -1
- package/dist/TableRowTemplate.js.map +1 -1
- package/dist/TextArea.js +1 -1
- package/dist/TextArea.js.map +1 -1
- package/dist/TimePickerClock.js +1 -1
- package/dist/TimePickerClock.js.map +1 -1
- package/dist/TimePickerInternals.js +2 -2
- package/dist/TimePickerInternals.js.map +1 -1
- package/dist/Toolbar.d.ts +11 -11
- package/dist/Toolbar.js +3 -3
- package/dist/Toolbar.js.map +1 -1
- package/dist/ToolbarButton.d.ts +22 -3
- package/dist/ToolbarButton.js +23 -3
- package/dist/ToolbarButton.js.map +1 -1
- package/dist/ToolbarItem.d.ts +37 -73
- package/dist/ToolbarItem.js +25 -108
- package/dist/ToolbarItem.js.map +1 -1
- package/dist/ToolbarItemBase.d.ts +69 -0
- package/dist/ToolbarItemBase.js +142 -0
- package/dist/ToolbarItemBase.js.map +1 -0
- package/dist/ToolbarSelect.d.ts +6 -5
- package/dist/ToolbarSelect.js +3 -3
- package/dist/ToolbarSelect.js.map +1 -1
- package/dist/ToolbarSeparator.d.ts +3 -3
- package/dist/ToolbarSeparator.js +3 -3
- package/dist/ToolbarSeparator.js.map +1 -1
- package/dist/ToolbarSpacer.d.ts +3 -3
- package/dist/ToolbarSpacer.js +3 -5
- package/dist/ToolbarSpacer.js.map +1 -1
- package/dist/ToolbarTemplate.js +2 -1
- package/dist/ToolbarTemplate.js.map +1 -1
- package/dist/YearPicker.js +2 -2
- package/dist/YearPicker.js.map +1 -1
- package/dist/YearRangePicker.js +2 -2
- package/dist/YearRangePicker.js.map +1 -1
- package/dist/css/themes/DatePicker.css +1 -1
- package/dist/css/themes/DateTimePicker.css +1 -1
- package/dist/css/themes/TableCellBase.css +1 -1
- package/dist/css/themes/TableRow.css +1 -1
- package/dist/css/themes/Toolbar.css +1 -1
- package/dist/custom-elements-internal.json +18783 -18252
- package/dist/custom-elements.json +15659 -15394
- package/dist/dynamic-date-range-options/DateRange.d.ts +1 -0
- package/dist/dynamic-date-range-options/DateRange.js +1 -0
- package/dist/dynamic-date-range-options/DateRange.js.map +1 -1
- package/dist/dynamic-date-range-options/DateTimeRange.d.ts +1 -0
- package/dist/dynamic-date-range-options/DateTimeRange.js +1 -0
- package/dist/dynamic-date-range-options/DateTimeRange.js.map +1 -1
- package/dist/dynamic-date-range-options/FromDateTime.d.ts +1 -0
- package/dist/dynamic-date-range-options/FromDateTime.js +1 -0
- package/dist/dynamic-date-range-options/FromDateTime.js.map +1 -1
- package/dist/dynamic-date-range-options/LastOptions.d.ts +1 -0
- package/dist/dynamic-date-range-options/LastOptions.js +1 -0
- package/dist/dynamic-date-range-options/LastOptions.js.map +1 -1
- package/dist/dynamic-date-range-options/NextOptions.d.ts +1 -0
- package/dist/dynamic-date-range-options/NextOptions.js +1 -0
- package/dist/dynamic-date-range-options/NextOptions.js.map +1 -1
- package/dist/dynamic-date-range-options/SingleDate.d.ts +1 -0
- package/dist/dynamic-date-range-options/SingleDate.js +1 -0
- package/dist/dynamic-date-range-options/SingleDate.js.map +1 -1
- package/dist/dynamic-date-range-options/ToDateTime.d.ts +1 -0
- package/dist/dynamic-date-range-options/ToDateTime.js +1 -0
- package/dist/dynamic-date-range-options/ToDateTime.js.map +1 -1
- package/dist/dynamic-date-range-options/Today.d.ts +1 -0
- package/dist/dynamic-date-range-options/Today.js +1 -0
- package/dist/dynamic-date-range-options/Today.js.map +1 -1
- package/dist/dynamic-date-range-options/Tomorrow.d.ts +1 -0
- package/dist/dynamic-date-range-options/Tomorrow.js +1 -0
- package/dist/dynamic-date-range-options/Tomorrow.js.map +1 -1
- package/dist/dynamic-date-range-options/Yesterday.d.ts +1 -0
- package/dist/dynamic-date-range-options/Yesterday.js +1 -0
- package/dist/dynamic-date-range-options/Yesterday.js.map +1 -1
- package/dist/generated/assets/i18n/messagebundle_ar.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_bg.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ca.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cnr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cs.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cy.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_da.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_de.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_el.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_et.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hu.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_id.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_it.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_iw.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ja.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_kk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ko.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_mk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ms.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_nl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_no.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ro.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ru.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sh.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_th.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_tr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_uk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_vi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -1
- package/dist/generated/i18n/i18n-defaults.d.ts +2 -1
- package/dist/generated/i18n/i18n-defaults.js +3 -2
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/themes/DatePicker.css.d.ts +1 -1
- package/dist/generated/themes/DatePicker.css.js +1 -1
- package/dist/generated/themes/DatePicker.css.js.map +1 -1
- package/dist/generated/themes/DateTimePicker.css.d.ts +1 -1
- package/dist/generated/themes/DateTimePicker.css.js +1 -1
- package/dist/generated/themes/DateTimePicker.css.js.map +1 -1
- package/dist/generated/themes/TableCellBase.css.d.ts +1 -1
- package/dist/generated/themes/TableCellBase.css.js +1 -1
- package/dist/generated/themes/TableCellBase.css.js.map +1 -1
- package/dist/generated/themes/TableRow.css.d.ts +1 -1
- package/dist/generated/themes/TableRow.css.js +1 -1
- package/dist/generated/themes/TableRow.css.js.map +1 -1
- package/dist/generated/themes/Toolbar.css.d.ts +1 -1
- package/dist/generated/themes/Toolbar.css.js +1 -1
- package/dist/generated/themes/Toolbar.css.js.map +1 -1
- package/dist/types/AvatarMode.d.ts +1 -3
- package/dist/types/AvatarMode.js +1 -3
- package/dist/types/AvatarMode.js.map +1 -1
- package/dist/types/TableOverflowMode.d.ts +1 -2
- package/dist/types/TableOverflowMode.js +1 -2
- package/dist/types/TableOverflowMode.js.map +1 -1
- package/dist/vscode.html-custom-data.json +2725 -1977
- package/dist/web-types.json +5793 -4396
- package/package.json +12 -10
- package/src/DatePickerInputTemplate.tsx +1 -0
- package/src/RatingIndicatorTemplate.tsx +6 -6
- package/src/TableRowTemplate.tsx +0 -1
- package/src/ToolbarTemplate.tsx +2 -1
- package/src/i18n/messagebundle.properties +3 -0
- package/src/i18n/messagebundle_ar.properties +3 -3
- package/src/i18n/messagebundle_bg.properties +3 -3
- package/src/i18n/messagebundle_ca.properties +3 -3
- package/src/i18n/messagebundle_cnr.properties +3 -3
- package/src/i18n/messagebundle_cs.properties +3 -3
- package/src/i18n/messagebundle_cy.properties +3 -3
- package/src/i18n/messagebundle_da.properties +3 -3
- package/src/i18n/messagebundle_de.properties +3 -3
- package/src/i18n/messagebundle_el.properties +3 -3
- package/src/i18n/messagebundle_en.properties +3 -3
- package/src/i18n/messagebundle_en_GB.properties +3 -3
- package/src/i18n/messagebundle_es.properties +3 -3
- package/src/i18n/messagebundle_es_MX.properties +3 -3
- package/src/i18n/messagebundle_et.properties +3 -3
- package/src/i18n/messagebundle_fi.properties +3 -3
- package/src/i18n/messagebundle_fr.properties +3 -3
- package/src/i18n/messagebundle_fr_CA.properties +3 -3
- package/src/i18n/messagebundle_hi.properties +3 -3
- package/src/i18n/messagebundle_hr.properties +3 -3
- package/src/i18n/messagebundle_hu.properties +3 -3
- package/src/i18n/messagebundle_id.properties +3 -3
- package/src/i18n/messagebundle_it.properties +3 -3
- package/src/i18n/messagebundle_iw.properties +3 -3
- package/src/i18n/messagebundle_ja.properties +3 -3
- package/src/i18n/messagebundle_kk.properties +4 -4
- package/src/i18n/messagebundle_ko.properties +3 -3
- package/src/i18n/messagebundle_lt.properties +3 -3
- package/src/i18n/messagebundle_lv.properties +3 -3
- package/src/i18n/messagebundle_mk.properties +3 -3
- package/src/i18n/messagebundle_ms.properties +3 -3
- package/src/i18n/messagebundle_nl.properties +3 -3
- package/src/i18n/messagebundle_no.properties +3 -3
- package/src/i18n/messagebundle_pl.properties +3 -3
- package/src/i18n/messagebundle_pt.properties +3 -3
- package/src/i18n/messagebundle_pt_PT.properties +3 -3
- package/src/i18n/messagebundle_ro.properties +3 -3
- package/src/i18n/messagebundle_ru.properties +3 -3
- package/src/i18n/messagebundle_sh.properties +3 -3
- package/src/i18n/messagebundle_sk.properties +3 -3
- package/src/i18n/messagebundle_sl.properties +3 -3
- package/src/i18n/messagebundle_sr.properties +3 -3
- package/src/i18n/messagebundle_sv.properties +8 -8
- package/src/i18n/messagebundle_th.properties +3 -3
- package/src/i18n/messagebundle_tr.properties +3 -3
- package/src/i18n/messagebundle_uk.properties +3 -3
- package/src/i18n/messagebundle_vi.properties +3 -3
- package/src/i18n/messagebundle_zh_CN.properties +3 -3
- package/src/i18n/messagebundle_zh_TW.properties +3 -3
- package/src/themes/DatePicker.css +2 -2
- package/src/themes/DateTimePicker.css +2 -0
- package/src/themes/TableCellBase.css +2 -1
- package/src/themes/TableRow.css +4 -6
- package/src/themes/Toolbar.css +6 -0
package/dist/Toolbar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbar.js","sourceRoot":"","sources":["../src/Toolbar.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAC1E,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,aAAa,MAAM,wDAAwD,CAAC;AAEnF,OAAO,EAAE,yBAAyB,EAAE,MAAM,+DAA+D,CAAC;AAC1G,OAAO,2CAA2C,CAAC;AAEnD,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,EACN,kCAAkC,EAClC,gCAAgC,GAChC,MAAM,mCAAmC,CAAC;AAE3C,OAAO,eAAe,MAAM,sBAAsB,CAAC;AACnD,OAAO,UAAU,MAAM,mCAAmC,CAAC;AAE3D,OAAO,iBAAiB,MAAM,0CAA0C,CAAC;AAIzE,OAAO,2BAA2B,MAAM,wCAAwC,CAAC;AAOjF,OAAO,gBAAgB,MAAM,uDAAuD,CAAC;AAMrF,SAAS,oBAAoB,CAAC,QAA6B,EAAE,YAAoB;IAChF,OAAO,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,GAAG,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC,CAAC;AACrJ,CAAC;AAED,SAAS,YAAY,CAAC,QAA6B,EA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ClB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,eAAe;KACzB,CAAC;IACF;;MAEE;;IACD,KAAK,CAAC,2BAA2B,EAAE;QACnC,OAAO,EAAE,IAAI;KACb,CAAC;GAEI,OAAO,CA2cZ;AAED,OAAO,CAAC,MAAM,EAAE,CAAC;AAEjB,eAAe,OAAO,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { ChangeInfo, DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport \"@ui5/webcomponents-icons/dist/overflow.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\n\nimport {\n\tTOOLBAR_OVERFLOW_BUTTON_ARIA_LABEL,\n\tTOOLBAR_POPOVER_AVAILABLE_VALUES,\n} from \"./generated/i18n/i18n-defaults.js\";\n\nimport ToolbarTemplate from \"./ToolbarTemplate.js\";\nimport ToolbarCss from \"./generated/themes/Toolbar.css.js\";\n\nimport ToolbarPopoverCss from \"./generated/themes/ToolbarPopover.css.js\";\n\nimport type ToolbarAlign from \"./types/ToolbarAlign.js\";\nimport type ToolbarDesign from \"./types/ToolbarDesign.js\";\nimport ToolbarItemOverflowBehavior from \"./types/ToolbarItemOverflowBehavior.js\";\n\nimport type ToolbarItem from \"./ToolbarItem.js\";\nimport type ToolbarSeparator from \"./ToolbarSeparator.js\";\n\nimport type Button from \"./Button.js\";\nimport type Popover from \"./Popover.js\";\nimport getActiveElement from \"@ui5/webcomponents-base/dist/util/getActiveElement.js\";\n\ntype ToolbarMinWidthChangeEventDetail = {\n\tminWidth: number,\n};\n\nfunction calculateCSSREMValue(styleSet: CSSStyleDeclaration, propertyName: string): number {\n\treturn Number(styleSet.getPropertyValue(propertyName).replace(\"rem\", \"\")) * parseInt(getComputedStyle(document.body).getPropertyValue(\"font-size\"));\n}\n\nfunction parsePxValue(styleSet: CSSStyleDeclaration, propertyName: string): number {\n\treturn Number(styleSet.getPropertyValue(propertyName).replace(\"px\", \"\"));\n}\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-toolbar` component is used to create a horizontal layout with items.\n * The items can be overflowing in a popover, when the space is not enough to show all of them.\n *\n * ### Keyboard Handling\n * The `ui5-toolbar` provides advanced keyboard handling.\n *\n * - The control is not interactive, but can contain of interactive elements\n * - [Tab] - iterates through elements\n *\n * ### ES6 Module Import\n * `import \"@ui5/webcomponents/dist/Toolbar.js\";`\n * @constructor\n * @extends UI5Element\n * @public\n * @since 1.17.0\n */\n@customElement({\n\ttag: \"ui5-toolbar\",\n\tlanguageAware: true,\n\trenderer: jsxRenderer,\n\ttemplate: ToolbarTemplate,\n})\n/**\n * @private\n*/\n@event(\"_min-content-width-change\", {\n\tbubbles: true,\n})\n\nclass Toolbar extends UI5Element {\n\teventDetails!: {\n\t\t\"_min-content-width-change\": ToolbarMinWidthChangeEventDetail\n\t}\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\t/**\n\t * Indicated the direction in which the Toolbar items will be aligned.\n\t * @public\n\t * @default \"End\"\n\t */\n\t@property()\n\talignContent: `${ToolbarAlign}` = \"End\";\n\n\t/**\n\t * Calculated width of the whole toolbar.\n\t * @private\n\t * @default undefined\n\t */\n\t@property({ type: Number })\n\twidth?: number;\n\n\t/**\n\t * Calculated width of the toolbar content.\n\t * @private\n\t * @default undefined\n\t */\n\t@property({ type: Number })\n\tcontentWidth?: number;\n\n\t/**\n\t * Notifies the toolbar if it should show the items in a reverse way if Toolbar Popover needs to be placed on \"Top\" position.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\treverseOverflow = false;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that label the input.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Defines the toolbar design.\n\t * @public\n\t * @default \"Solid\"\n\t * @since 2.0.0\n\t */\n\t@property()\n\tdesign: `${ToolbarDesign}` = \"Solid\"\n\n\t@property({ type: Boolean })\n\tpopoverOpen = false;\n\n\t/**\n\t * Defines the items of the component.\n\t *\n\t * **Note:** Currently only `ui5-toolbar-button`, `ui5-toolbar-select`, `ui5-toolbar-separator` and `ui5-toolbar-spacer` are allowed here.\n\t * @public\n\t */\n\t@slot({\n\t\t\"default\": true, type: HTMLElement, invalidateOnChildChange: true, individualSlots: true,\n\t})\n\titems!: DefaultSlot<ToolbarItem>\n\n\t_onResize!: ResizeObserverCallback;\n\t_onCloseOverflow!: EventListener;\n\titemsToOverflow: Array<ToolbarItem> = [];\n\titemsWidth = 0;\n\tminContentWidth = 0;\n\n\tITEMS_WIDTH_MAP: Map<string, number> = new Map();\n\n\tstatic get styles() {\n\t\treturn [\n\t\t\tToolbarCss,\n\t\t\tToolbarPopoverCss,\n\t\t];\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._onResize = this.onResize.bind(this);\n\t\tthis._onCloseOverflow = this.closeOverflow.bind(this);\n\t}\n\n\t/**\n\t * Read-only members\n\t */\n\n\tget overflowButtonSize(): number {\n\t\treturn this.overflowButtonDOM?.getBoundingClientRect().width || 0;\n\t}\n\n\tget padding(): number {\n\t\tconst toolbarComputedStyle = getComputedStyle(this.getDomRef()!);\n\t\treturn calculateCSSREMValue(toolbarComputedStyle, \"--_ui5-toolbar-padding-left\")\n\t\t\t+ calculateCSSREMValue(toolbarComputedStyle, \"--_ui5-toolbar-padding-right\");\n\t}\n\n\tget alwaysOverflowItems() {\n\t\treturn this.items.filter((item: ToolbarItem) => item.overflowPriority === ToolbarItemOverflowBehavior.AlwaysOverflow);\n\t}\n\n\tget movableItems() {\n\t\treturn this.items.filter((item: ToolbarItem) => item.overflowPriority !== ToolbarItemOverflowBehavior.AlwaysOverflow && item.overflowPriority !== ToolbarItemOverflowBehavior.NeverOverflow);\n\t}\n\n\tget overflowItems() {\n\t\t// spacers are ignored\n\t\tconst overflowItems = this.itemsToOverflow.filter(item => !item.ignoreSpace);\n\t\treturn this.reverseOverflow ? overflowItems.reverse() : overflowItems;\n\t}\n\n\tget standardItems() {\n\t\treturn this.items.filter(item => this.itemsToOverflow.indexOf(item) === -1);\n\t}\n\n\tget hideOverflowButton() {\n\t\treturn this.itemsToOverflow.filter(item => !(item.ignoreSpace || item.isSeparator)).length === 0;\n\t}\n\n\tget interactiveItems() {\n\t\treturn this.items.filter((item: ToolbarItem) => item.isInteractive);\n\t}\n\n\t/**\n\t * Accessibility\n\t */\n\n\tget hasAriaSemantics() {\n\t\treturn this.interactiveItems.length > 1;\n\t}\n\n\tget accessibleRole() {\n\t\treturn this.hasAriaSemantics ? \"toolbar\" as const : undefined;\n\t}\n\n\tget ariaLabelText() {\n\t\treturn this.hasAriaSemantics ? getEffectiveAriaLabelText(this) : undefined;\n\t}\n\n\tget accInfo() {\n\t\treturn {\n\t\t\troot: {\n\t\t\t\trole: this.accessibleRole,\n\t\t\t\taccessibleName: this.ariaLabelText,\n\t\t\t},\n\t\t\toverflowButton: {\n\t\t\t\taccessibleName: Toolbar.i18nBundle.getText(TOOLBAR_OVERFLOW_BUTTON_ARIA_LABEL),\n\t\t\t\ttooltip: Toolbar.i18nBundle.getText(TOOLBAR_OVERFLOW_BUTTON_ARIA_LABEL),\n\t\t\t\taccessibilityAttributes: {\n\t\t\t\t\texpanded: this.popoverOpen,\n\t\t\t\t\thasPopup: \"menu\" as const,\n\t\t\t\t},\n\t\t\t},\n\t\t\tpopover: {\n\t\t\t\taccessibleName: Toolbar.i18nBundle.getText(TOOLBAR_POPOVER_AVAILABLE_VALUES),\n\t\t\t},\n\t\t};\n\t}\n\n\t/**\n\t * Toolbar Overflow Popover\n\t */\n\n\tget overflowButtonDOM(): Button | null {\n\t\treturn this.shadowRoot!.querySelector(\".ui5-tb-overflow-btn\");\n\t}\n\n\tget hasFlexibleSpacers() {\n\t\treturn this.items.some((item: ToolbarItem) => item.hasFlexibleWidth);\n\t}\n\n\t/**\n\t * Lifecycle methods\n\t */\n\tonEnterDOM() {\n\t\tResizeHandler.register(this, this._onResize);\n\t}\n\n\tonExitDOM() {\n\t\tResizeHandler.deregister(this, this._onResize);\n\t}\n\n\tonInvalidation(changeInfo: ChangeInfo) {\n\t\tif (changeInfo.reason === \"childchange\") {\n\t\t\tconst currentItemsWidth = this.items.reduce((total, item) => total + this.getItemWidth(item), 0);\n\t\t\tif (currentItemsWidth !== this.itemsWidth) {\n\t\t\t\tthis.onToolbarItemChange();\n\t\t\t}\n\t\t}\n\t}\n\n\tonBeforeRendering() {\n\t\tthis.detachListeners();\n\t\tthis.attachListeners();\n\t\tif (getActiveElement() === this.overflowButtonDOM?.getFocusDomRef() && this.hideOverflowButton) {\n\t\t\tconst lastItem = this.interactiveItems.at(-1);\n\t\t\tlastItem?.focus();\n\t\t}\n\t\tthis.prePopulateAlwaysOverflowItems();\n\t}\n\n\tasync onAfterRendering() {\n\t\tawait renderFinished();\n\t\tthis.storeItemsWidth();\n\t\tthis.processOverflowLayout();\n\t\tthis.items.forEach(item => {\n\t\t\tthis.addItemsAdditionalProperties(item);\n\t\t});\n\t}\n\n\taddItemsAdditionalProperties(item: ToolbarItem) {\n\t\titem.isOverflowed = this.overflowItems.indexOf(item) !== -1;\n\t\tconst itemWrapper = this.shadowRoot!.querySelector(`#${item._individualSlot}`) as HTMLElement;\n\t\tif (item.hasOverflow && !item.isOverflowed && itemWrapper) {\n\t\t\t// We need to set the max-width to the self-overflow element in order ot prevent it from taking all the available space,\n\t\t\t// since, unlike the other items, it is allowed to grow and shrink\n\t\t\t// We need to set the max-width to none and its position to absolute to allow the item to grow and measure its width,\n\t\t\t// then when set, the max-width will be cached and we will set its highest value to not cut it when the Toolbar shrinks it\n\t\t\t// on rendering and then we resize it manually.\n\t\t\titemWrapper.style.maxWidth = `none`;\n\t\t\titemWrapper?.classList.add(\"ui5-tb-self-overflow-grow\");\n\t\t\titem._maxWidth = Math.max(this.getItemWidth(item), item._maxWidth);\n\t\t\titemWrapper.style.maxWidth = `${item._maxWidth}px`;\n\t\t\titemWrapper?.classList.remove(\"ui5-tb-self-overflow-grow\");\n\t\t}\n\t}\n\n\t/**\n\t * Returns if the overflow popup is open.\n\t * @public\n\t */\n\tisOverflowOpen(): boolean {\n\t\tconst overflowPopover = this.getOverflowPopover();\n\t\treturn overflowPopover.open;\n\t}\n\n\topenOverflow(): void {\n\t\tconst overflowPopover = this.getOverflowPopover();\n\t\toverflowPopover.opener = this.overflowButtonDOM!;\n\t\toverflowPopover.open = true;\n\t\tthis.reverseOverflow = overflowPopover.actualPlacement === \"Top\";\n\t}\n\n\tcloseOverflow() {\n\t\tconst overflowPopover = this.getOverflowPopover();\n\t\toverflowPopover.open = false;\n\t}\n\n\ttoggleOverflow() {\n\t\tif (this.popoverOpen) {\n\t\t\tthis.closeOverflow();\n\t\t} else {\n\t\t\tthis.openOverflow();\n\t\t}\n\t}\n\n\tgetOverflowPopover(): Popover {\n\t\treturn this.shadowRoot!.querySelector<Popover>(\".ui5-overflow-popover\")!;\n\t}\n\n\t/**\n\t * Layout management\n\t */\n\n\tprocessOverflowLayout() {\n\t\tif (this.offsetWidth === 0) {\n\t\t\treturn;\n\t\t}\n\t\tconst containerWidth = this.offsetWidth - this.padding;\n\t\tconst contentWidth = this.itemsWidth;\n\t\tlet overflowSpace = contentWidth - containerWidth + this.overflowButtonSize;\n\n\t\tif (contentWidth <= containerWidth) {\n\t\t\toverflowSpace = 0;\n\t\t}\n\n\t\t// skip calculation if the width has not been changed or if the items width has not been changed\n\t\tif (this.width === containerWidth && this.contentWidth === contentWidth) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.distributeItems(overflowSpace);\n\t\tthis.width = containerWidth;\n\t\tthis.contentWidth = contentWidth;\n\t}\n\n\tstoreItemsWidth() {\n\t\tlet totalWidth = 0,\n\t\t\tminWidth = 0;\n\n\t\tthis.items.forEach((item: ToolbarItem) => {\n\t\t\tconst itemWidth = this.getItemWidth(item);\n\t\t\ttotalWidth += itemWidth;\n\t\t\tif (item.overflowPriority === ToolbarItemOverflowBehavior.NeverOverflow) {\n\t\t\t\tminWidth += itemWidth;\n\t\t\t}\n\t\t\tthis.ITEMS_WIDTH_MAP.set(item._id, itemWidth);\n\t\t});\n\n\t\tif (minWidth !== this.minContentWidth) {\n\t\t\tconst spaceAroundContent = this.offsetWidth - this.getDomRef()!.offsetWidth;\n\t\t\tthis.fireDecoratorEvent(\"_min-content-width-change\", {\n\t\t\t\tminWidth: minWidth + spaceAroundContent + this.overflowButtonSize,\n\t\t\t});\n\t\t}\n\n\t\tthis.itemsWidth = totalWidth;\n\t\tthis.minContentWidth = minWidth;\n\t}\n\n\tdistributeItems(overflowSpace = 0) {\n\t\tconst movableItems = this.movableItems.reverse();\n\t\tlet index = 0;\n\t\tlet currentItem = movableItems[index];\n\n\t\tthis.itemsToOverflow = [];\n\n\t\t// distribute items that always overflow\n\t\tthis.distributeItemsThatAlwaysOverflow();\n\n\t\twhile (overflowSpace > 0 && currentItem) {\n\t\t\tthis.itemsToOverflow.unshift(currentItem);\n\t\t\toverflowSpace -= this.getCachedItemWidth(currentItem?._id) || 0;\n\t\t\tindex++;\n\t\t\tcurrentItem = movableItems[index];\n\t\t}\n\n\t\t// If the last bar item is a spacer, force it to the overflow even if there is enough space for it\n\t\tif (index < movableItems.length) {\n\t\t\tlet lastItem = movableItems[index];\n\t\t\twhile (index <= movableItems.length - 1 && lastItem.isSeparator) {\n\t\t\t\tthis.itemsToOverflow.unshift(lastItem);\n\t\t\t\tindex++;\n\t\t\t\tlastItem = movableItems[index];\n\t\t\t}\n\t\t}\n\n\t\tthis.setSeperatorsVisibilityInOverflow();\n\t}\n\n\tdistributeItemsThatAlwaysOverflow() {\n\t\tthis.alwaysOverflowItems.forEach((item: ToolbarItem) => {\n\t\t\tthis.itemsToOverflow.push(item);\n\t\t});\n\t}\n\n\tsetSeperatorsVisibilityInOverflow() {\n\t\tthis.itemsToOverflow.forEach((item, idx, items) => {\n\t\t\tif (item.isSeparator) {\n\t\t\t\t(item as ToolbarSeparator).visible = this.shouldShowSeparatorInOverflow(idx, items);\n\t\t\t}\n\t\t});\n\t}\n\n\tshouldShowSeparatorInOverflow(separatorIdx: number, overflowItems: Array<ToolbarItem>) {\n\t\tlet foundPrevNonSeparatorItem = false;\n\t\tlet foundNextNonSeperatorItem = false;\n\n\t\t// search for non-separator item before and after the seperator\n\t\toverflowItems.forEach((item, idx) => {\n\t\t\tif (idx < separatorIdx && !item.isSeparator) {\n\t\t\t\tfoundPrevNonSeparatorItem = true;\n\t\t\t}\n\t\t\tif (idx > separatorIdx && !item.isSeparator) {\n\t\t\t\tfoundNextNonSeperatorItem = true;\n\t\t\t}\n\t\t});\n\n\t\treturn foundPrevNonSeparatorItem && foundNextNonSeperatorItem;\n\t}\n\n\t/**\n\t * Adds AlwaysOverflow items to overflow to ensure they are never rendered outside overflow (and visual flash is prevented)\n\t */\n\tprePopulateAlwaysOverflowItems() {\n\t\tthis.alwaysOverflowItems.forEach(item => {\n\t\t\tif (!this.itemsToOverflow.includes(item)) {\n\t\t\t\tthis.itemsToOverflow.push(item);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Event Handlers\n\t */\n\n\tonOverflowPopoverClosed() {\n\t\tthis.popoverOpen = false;\n\t}\n\n\tonOverflowPopoverOpened() {\n\t\tthis.popoverOpen = true;\n\t}\n\n\tonResize() {\n\t\tthis.closeOverflow();\n\t\tthis.storeItemsWidth();\n\t\tthis.processOverflowLayout();\n\t}\n\n\t/**\n\t * Private members\n\t */\n\n\tattachListeners() {\n\t\tthis.addEventListener(\"ui5-close-overflow\", this._onCloseOverflow);\n\t}\n\n\tdetachListeners() {\n\t\tthis.removeEventListener(\"ui5-close-overflow\", this._onCloseOverflow);\n\t}\n\n\tonToolbarItemChange() {\n\t\t// some items were updated reset the cache and trigger a re-render\n\t\tthis.itemsToOverflow = [];\n\t\tthis.contentWidth = 0; // re-render\n\t}\n\n\tgetItemWidth(item: ToolbarItem): number {\n\t\t// Spacer width - always 0 for flexible spacers, so that they shrink, otherwise - measure the width normally\n\t\tif (item.ignoreSpace || item.isSeparator) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst id: string = item._id;\n\t\t// Measure rendered width for spacers with width, and for normal items\n\t\tconst renderedItem = this.shadowRoot!.querySelector<HTMLElement>(`#${item._individualSlot}`);\n\n\t\tlet itemWidth = 0;\n\n\t\tif (renderedItem && !renderedItem.classList.contains(\"ui5-tb-popover-item\") && renderedItem.offsetWidth && item._isRendering === false) {\n\t\t\tconst ItemCSSStyleSet = getComputedStyle(renderedItem);\n\t\t\titemWidth = renderedItem.offsetWidth + parsePxValue(ItemCSSStyleSet, \"margin-inline-end\")\n\t\t\t\t+ parsePxValue(ItemCSSStyleSet, \"margin-inline-start\");\n\t\t} else {\n\t\t\titemWidth = this.getCachedItemWidth(id) || 0;\n\t\t}\n\n\t\treturn Math.ceil(itemWidth);\n\t}\n\n\tgetCachedItemWidth(id: string) {\n\t\treturn this.ITEMS_WIDTH_MAP.get(id);\n\t}\n}\n\nToolbar.define();\n\nexport default Toolbar;\nexport type {\n\t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K,CAAC,2BAA2B,EAAE;QACnC,OAAO,EAAE,IAAI;KACb,CAAC;GAEI,OAAO,CA2cZ;AAED,OAAO,CAAC,MAAM,EAAE,CAAC;AAEjB,eAAe,OAAO,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { ChangeInfo, DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport \"@ui5/webcomponents-icons/dist/overflow.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\n\nimport {\n\tTOOLBAR_OVERFLOW_BUTTON_ARIA_LABEL,\n\tTOOLBAR_POPOVER_AVAILABLE_VALUES,\n} from \"./generated/i18n/i18n-defaults.js\";\n\nimport ToolbarTemplate from \"./ToolbarTemplate.js\";\nimport ToolbarCss from \"./generated/themes/Toolbar.css.js\";\n\nimport ToolbarPopoverCss from \"./generated/themes/ToolbarPopover.css.js\";\n\nimport type ToolbarAlign from \"./types/ToolbarAlign.js\";\nimport type ToolbarDesign from \"./types/ToolbarDesign.js\";\nimport ToolbarItemOverflowBehavior from \"./types/ToolbarItemOverflowBehavior.js\";\n\nimport type ToolbarItemBase from \"./ToolbarItemBase.js\";\nimport type ToolbarSeparator from \"./ToolbarSeparator.js\";\n\nimport type Button from \"./Button.js\";\nimport type Popover from \"./Popover.js\";\nimport getActiveElement from \"@ui5/webcomponents-base/dist/util/getActiveElement.js\";\n\ntype ToolbarMinWidthChangeEventDetail = {\n\tminWidth: number,\n};\n\nfunction calculateCSSREMValue(styleSet: CSSStyleDeclaration, propertyName: string): number {\n\treturn Number(styleSet.getPropertyValue(propertyName).replace(\"rem\", \"\")) * parseInt(getComputedStyle(document.body).getPropertyValue(\"font-size\"));\n}\n\nfunction parsePxValue(styleSet: CSSStyleDeclaration, propertyName: string): number {\n\treturn Number(styleSet.getPropertyValue(propertyName).replace(\"px\", \"\"));\n}\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-toolbar` component is used to create a horizontal layout with items.\n * The items can be overflowing in a popover, when the space is not enough to show all of them.\n *\n * ### Keyboard Handling\n * The `ui5-toolbar` provides advanced keyboard handling.\n *\n * - The control is not interactive, but can contain of interactive elements\n * - [Tab] - iterates through elements\n *\n * ### ES6 Module Import\n * `import \"@ui5/webcomponents/dist/Toolbar.js\";`\n * @constructor\n * @extends UI5Element\n * @public\n * @since 1.17.0\n */\n@customElement({\n\ttag: \"ui5-toolbar\",\n\tlanguageAware: true,\n\trenderer: jsxRenderer,\n\ttemplate: ToolbarTemplate,\n})\n/**\n * @private\n*/\n@event(\"_min-content-width-change\", {\n\tbubbles: true,\n})\n\nclass Toolbar extends UI5Element {\n\teventDetails!: {\n\t\t\"_min-content-width-change\": ToolbarMinWidthChangeEventDetail\n\t}\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\t/**\n\t * Indicated the direction in which the Toolbar items will be aligned.\n\t * @public\n\t * @default \"End\"\n\t */\n\t@property()\n\talignContent: `${ToolbarAlign}` = \"End\";\n\n\t/**\n\t * Calculated width of the whole toolbar.\n\t * @private\n\t * @default undefined\n\t */\n\t@property({ type: Number })\n\twidth?: number;\n\n\t/**\n\t * Calculated width of the toolbar content.\n\t * @private\n\t * @default undefined\n\t */\n\t@property({ type: Number })\n\tcontentWidth?: number;\n\n\t/**\n\t * Notifies the toolbar if it should show the items in a reverse way if Toolbar Popover needs to be placed on \"Top\" position.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\treverseOverflow = false;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that label the input.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Defines the toolbar design.\n\t * @public\n\t * @default \"Solid\"\n\t * @since 2.0.0\n\t */\n\t@property()\n\tdesign: `${ToolbarDesign}` = \"Solid\"\n\n\t@property({ type: Boolean })\n\tpopoverOpen = false;\n\n\t/**\n\t * Defines the items of the component.\n\t *\n\t * **Note:** Currently only `ui5-toolbar-button`, `ui5-toolbar-select`, `ui5-toolbar-separator` and `ui5-toolbar-spacer` are allowed here.\n\t * @public\n\t */\n\t@slot({\n\t\t\"default\": true, type: HTMLElement, invalidateOnChildChange: true, individualSlots: true,\n\t})\n\titems!: DefaultSlot<ToolbarItemBase>\n\n\t_onResize!: ResizeObserverCallback;\n\t_onCloseOverflow!: EventListener;\n\titemsToOverflow: Array<ToolbarItemBase> = [];\n\titemsWidth = 0;\n\tminContentWidth = 0;\n\n\tITEMS_WIDTH_MAP: Map<string, number> = new Map();\n\n\tstatic get styles() {\n\t\treturn [\n\t\t\tToolbarCss,\n\t\t\tToolbarPopoverCss,\n\t\t];\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._onResize = this.onResize.bind(this);\n\t\tthis._onCloseOverflow = this.closeOverflow.bind(this);\n\t}\n\n\t/**\n\t * Read-only members\n\t */\n\n\tget overflowButtonSize(): number {\n\t\treturn this.overflowButtonDOM?.getBoundingClientRect().width || 0;\n\t}\n\n\tget padding(): number {\n\t\tconst toolbarComputedStyle = getComputedStyle(this.getDomRef()!);\n\t\treturn calculateCSSREMValue(toolbarComputedStyle, \"--_ui5-toolbar-padding-left\")\n\t\t\t+ calculateCSSREMValue(toolbarComputedStyle, \"--_ui5-toolbar-padding-right\");\n\t}\n\n\tget alwaysOverflowItems() {\n\t\treturn this.items.filter(item => item.overflowPriority === ToolbarItemOverflowBehavior.AlwaysOverflow);\n\t}\n\n\tget movableItems() {\n\t\treturn this.items.filter(item => item.overflowPriority !== ToolbarItemOverflowBehavior.AlwaysOverflow && item.overflowPriority !== ToolbarItemOverflowBehavior.NeverOverflow);\n\t}\n\n\tget overflowItems() {\n\t\t// spacers are ignored\n\t\tconst overflowItems = this.itemsToOverflow.filter(item => !item.ignoreSpace);\n\t\treturn this.reverseOverflow ? overflowItems.reverse() : overflowItems;\n\t}\n\n\tget standardItems() {\n\t\treturn this.items.filter(item => this.itemsToOverflow.indexOf(item) === -1);\n\t}\n\n\tget hideOverflowButton() {\n\t\treturn this.itemsToOverflow.filter(item => !(item.ignoreSpace || item.isSeparator)).length === 0;\n\t}\n\n\tget interactiveItems() {\n\t\treturn this.items.filter((item: ToolbarItemBase) => item.isInteractive);\n\t}\n\n\t/**\n\t * Accessibility\n\t */\n\n\tget hasAriaSemantics() {\n\t\treturn this.interactiveItems.length > 1;\n\t}\n\n\tget accessibleRole() {\n\t\treturn this.hasAriaSemantics ? \"toolbar\" as const : undefined;\n\t}\n\n\tget ariaLabelText() {\n\t\treturn this.hasAriaSemantics ? getEffectiveAriaLabelText(this) : undefined;\n\t}\n\n\tget accInfo() {\n\t\treturn {\n\t\t\troot: {\n\t\t\t\trole: this.accessibleRole,\n\t\t\t\taccessibleName: this.ariaLabelText,\n\t\t\t},\n\t\t\toverflowButton: {\n\t\t\t\taccessibleName: Toolbar.i18nBundle.getText(TOOLBAR_OVERFLOW_BUTTON_ARIA_LABEL),\n\t\t\t\ttooltip: Toolbar.i18nBundle.getText(TOOLBAR_OVERFLOW_BUTTON_ARIA_LABEL),\n\t\t\t\taccessibilityAttributes: {\n\t\t\t\t\texpanded: this.popoverOpen,\n\t\t\t\t\thasPopup: \"menu\" as const,\n\t\t\t\t},\n\t\t\t},\n\t\t\tpopover: {\n\t\t\t\taccessibleName: Toolbar.i18nBundle.getText(TOOLBAR_POPOVER_AVAILABLE_VALUES),\n\t\t\t},\n\t\t};\n\t}\n\n\t/**\n\t * Toolbar Overflow Popover\n\t */\n\n\tget overflowButtonDOM(): Button | null {\n\t\treturn this.shadowRoot!.querySelector(\".ui5-tb-overflow-btn\");\n\t}\n\n\tget hasFlexibleSpacers() {\n\t\treturn this.items.some((item: ToolbarItemBase) => item.hasFlexibleWidth);\n\t}\n\n\t/**\n\t * Lifecycle methods\n\t */\n\tonEnterDOM() {\n\t\tResizeHandler.register(this, this._onResize);\n\t}\n\n\tonExitDOM() {\n\t\tResizeHandler.deregister(this, this._onResize);\n\t}\n\n\tonInvalidation(changeInfo: ChangeInfo) {\n\t\tif (changeInfo.reason === \"childchange\") {\n\t\t\tconst currentItemsWidth = this.items.reduce((total, item) => total + this.getItemWidth(item), 0);\n\t\t\tif (currentItemsWidth !== this.itemsWidth) {\n\t\t\t\tthis.onToolbarItemChange();\n\t\t\t}\n\t\t}\n\t}\n\n\tonBeforeRendering() {\n\t\tthis.detachListeners();\n\t\tthis.attachListeners();\n\t\tif (getActiveElement() === this.overflowButtonDOM?.getFocusDomRef() && this.hideOverflowButton) {\n\t\t\tconst lastItem = this.interactiveItems.at(-1);\n\t\t\tlastItem?.focus();\n\t\t}\n\t\tthis.prePopulateAlwaysOverflowItems();\n\t}\n\n\tasync onAfterRendering() {\n\t\tawait renderFinished();\n\t\tthis.storeItemsWidth();\n\t\tthis.processOverflowLayout();\n\t\tthis.items.forEach(item => {\n\t\t\tthis.addItemsAdditionalProperties(item);\n\t\t});\n\t}\n\n\taddItemsAdditionalProperties(item: ToolbarItemBase) {\n\t\titem.isOverflowed = this.overflowItems.indexOf(item) !== -1;\n\t\tconst itemWrapper = this.shadowRoot!.querySelector(`#${item._individualSlot}`) as HTMLElement;\n\t\tif (item.hasOverflow && !item.isOverflowed && itemWrapper) {\n\t\t\t// We need to set the max-width to the self-overflow element in order ot prevent it from taking all the available space,\n\t\t\t// since, unlike the other items, it is allowed to grow and shrink\n\t\t\t// We need to set the max-width to none and its position to absolute to allow the item to grow and measure its width,\n\t\t\t// then when set, the max-width will be cached and we will set its highest value to not cut it when the Toolbar shrinks it\n\t\t\t// on rendering and then we resize it manually.\n\t\t\titemWrapper.style.maxWidth = `none`;\n\t\t\titemWrapper?.classList.add(\"ui5-tb-self-overflow-grow\");\n\t\t\titem._maxWidth = Math.max(this.getItemWidth(item), item._maxWidth);\n\t\t\titemWrapper.style.maxWidth = `${item._maxWidth}px`;\n\t\t\titemWrapper?.classList.remove(\"ui5-tb-self-overflow-grow\");\n\t\t}\n\t}\n\n\t/**\n\t * Returns if the overflow popup is open.\n\t * @public\n\t */\n\tisOverflowOpen(): boolean {\n\t\tconst overflowPopover = this.getOverflowPopover();\n\t\treturn overflowPopover.open;\n\t}\n\n\topenOverflow(): void {\n\t\tconst overflowPopover = this.getOverflowPopover();\n\t\toverflowPopover.opener = this.overflowButtonDOM!;\n\t\toverflowPopover.open = true;\n\t\tthis.reverseOverflow = overflowPopover.actualPlacement === \"Top\";\n\t}\n\n\tcloseOverflow() {\n\t\tconst overflowPopover = this.getOverflowPopover();\n\t\toverflowPopover.open = false;\n\t}\n\n\ttoggleOverflow() {\n\t\tif (this.popoverOpen) {\n\t\t\tthis.closeOverflow();\n\t\t} else {\n\t\t\tthis.openOverflow();\n\t\t}\n\t}\n\n\tgetOverflowPopover(): Popover {\n\t\treturn this.shadowRoot!.querySelector<Popover>(\".ui5-overflow-popover\")!;\n\t}\n\n\t/**\n\t * Layout management\n\t */\n\n\tprocessOverflowLayout() {\n\t\tif (this.offsetWidth === 0) {\n\t\t\treturn;\n\t\t}\n\t\tconst containerWidth = this.offsetWidth - this.padding;\n\t\tconst contentWidth = this.itemsWidth;\n\t\tlet overflowSpace = contentWidth - containerWidth + this.overflowButtonSize;\n\n\t\tif (contentWidth <= containerWidth) {\n\t\t\toverflowSpace = 0;\n\t\t}\n\n\t\t// skip calculation if the width has not been changed or if the items width has not been changed\n\t\tif (this.width === containerWidth && this.contentWidth === contentWidth) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.distributeItems(overflowSpace);\n\t\tthis.width = containerWidth;\n\t\tthis.contentWidth = contentWidth;\n\t}\n\n\tstoreItemsWidth() {\n\t\tlet totalWidth = 0,\n\t\t\tminWidth = 0;\n\n\t\tthis.items.forEach(item => {\n\t\t\tconst itemWidth = this.getItemWidth(item);\n\t\t\ttotalWidth += itemWidth;\n\t\t\tif (item.overflowPriority === ToolbarItemOverflowBehavior.NeverOverflow) {\n\t\t\t\tminWidth += itemWidth;\n\t\t\t}\n\t\t\tthis.ITEMS_WIDTH_MAP.set(item._id, itemWidth);\n\t\t});\n\n\t\tif (minWidth !== this.minContentWidth) {\n\t\t\tconst spaceAroundContent = this.offsetWidth - this.getDomRef()!.offsetWidth;\n\t\t\tthis.fireDecoratorEvent(\"_min-content-width-change\", {\n\t\t\t\tminWidth: minWidth + spaceAroundContent + this.overflowButtonSize,\n\t\t\t});\n\t\t}\n\n\t\tthis.itemsWidth = totalWidth;\n\t\tthis.minContentWidth = minWidth;\n\t}\n\n\tdistributeItems(overflowSpace = 0) {\n\t\tconst movableItems = this.movableItems.reverse();\n\t\tlet index = 0;\n\t\tlet currentItem = movableItems[index];\n\n\t\tthis.itemsToOverflow = [];\n\n\t\t// distribute items that always overflow\n\t\tthis.distributeItemsThatAlwaysOverflow();\n\n\t\twhile (overflowSpace > 0 && currentItem) {\n\t\t\tthis.itemsToOverflow.unshift(currentItem);\n\t\t\toverflowSpace -= this.getCachedItemWidth(currentItem?._id) || 0;\n\t\t\tindex++;\n\t\t\tcurrentItem = movableItems[index];\n\t\t}\n\n\t\t// If the last bar item is a spacer, force it to the overflow even if there is enough space for it\n\t\tif (index < movableItems.length) {\n\t\t\tlet lastItem = movableItems[index];\n\t\t\twhile (index <= movableItems.length - 1 && lastItem.isSeparator) {\n\t\t\t\tthis.itemsToOverflow.unshift(lastItem);\n\t\t\t\tindex++;\n\t\t\t\tlastItem = movableItems[index];\n\t\t\t}\n\t\t}\n\n\t\tthis.setSeperatorsVisibilityInOverflow();\n\t}\n\n\tdistributeItemsThatAlwaysOverflow() {\n\t\tthis.alwaysOverflowItems.forEach((item: ToolbarItemBase) => {\n\t\t\tthis.itemsToOverflow.push(item);\n\t\t});\n\t}\n\n\tsetSeperatorsVisibilityInOverflow() {\n\t\tthis.itemsToOverflow.forEach((item, idx, items) => {\n\t\t\tif (item.isSeparator) {\n\t\t\t\t(item as ToolbarSeparator).visible = this.shouldShowSeparatorInOverflow(idx, items);\n\t\t\t}\n\t\t});\n\t}\n\n\tshouldShowSeparatorInOverflow(separatorIdx: number, overflowItems: Array<ToolbarItemBase>) {\n\t\tlet foundPrevNonSeparatorItem = false;\n\t\tlet foundNextNonSeperatorItem = false;\n\n\t\t// search for non-separator item before and after the seperator\n\t\toverflowItems.forEach((item, idx) => {\n\t\t\tif (idx < separatorIdx && !item.isSeparator) {\n\t\t\t\tfoundPrevNonSeparatorItem = true;\n\t\t\t}\n\t\t\tif (idx > separatorIdx && !item.isSeparator) {\n\t\t\t\tfoundNextNonSeperatorItem = true;\n\t\t\t}\n\t\t});\n\n\t\treturn foundPrevNonSeparatorItem && foundNextNonSeperatorItem;\n\t}\n\n\t/**\n\t * Adds AlwaysOverflow items to overflow to ensure they are never rendered outside overflow (and visual flash is prevented)\n\t */\n\tprePopulateAlwaysOverflowItems() {\n\t\tthis.alwaysOverflowItems.forEach(item => {\n\t\t\tif (!this.itemsToOverflow.includes(item)) {\n\t\t\t\tthis.itemsToOverflow.push(item);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Event Handlers\n\t */\n\n\tonOverflowPopoverClosed() {\n\t\tthis.popoverOpen = false;\n\t}\n\n\tonOverflowPopoverOpened() {\n\t\tthis.popoverOpen = true;\n\t}\n\n\tonResize() {\n\t\tthis.closeOverflow();\n\t\tthis.storeItemsWidth();\n\t\tthis.processOverflowLayout();\n\t}\n\n\t/**\n\t * Private members\n\t */\n\n\tattachListeners() {\n\t\tthis.addEventListener(\"ui5-close-overflow\", this._onCloseOverflow);\n\t}\n\n\tdetachListeners() {\n\t\tthis.removeEventListener(\"ui5-close-overflow\", this._onCloseOverflow);\n\t}\n\n\tonToolbarItemChange() {\n\t\t// some items were updated reset the cache and trigger a re-render\n\t\tthis.itemsToOverflow = [];\n\t\tthis.contentWidth = 0; // re-render\n\t}\n\n\tgetItemWidth(item: ToolbarItemBase): number {\n\t\t// Spacer width - always 0 for flexible spacers, so that they shrink, otherwise - measure the width normally\n\t\tif (item.ignoreSpace || item.isSeparator) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst id: string = item._id;\n\t\t// Measure rendered width for spacers with width, and for normal items\n\t\tconst renderedItem = this.shadowRoot!.querySelector<HTMLElement>(`#${item._individualSlot}`);\n\n\t\tlet itemWidth = 0;\n\n\t\tif (renderedItem && !renderedItem.classList.contains(\"ui5-tb-popover-item\") && renderedItem.offsetWidth && item._isRendering === false) {\n\t\t\tconst ItemCSSStyleSet = getComputedStyle(renderedItem);\n\t\t\titemWidth = renderedItem.offsetWidth + parsePxValue(ItemCSSStyleSet, \"margin-inline-end\")\n\t\t\t\t+ parsePxValue(ItemCSSStyleSet, \"margin-inline-start\");\n\t\t} else {\n\t\t\titemWidth = this.getCachedItemWidth(id) || 0;\n\t\t}\n\n\t\treturn Math.ceil(itemWidth);\n\t}\n\n\tgetCachedItemWidth(id: string) {\n\t\treturn this.ITEMS_WIDTH_MAP.get(id);\n\t}\n}\n\nToolbar.define();\n\nexport default Toolbar;\nexport type {\n\tToolbarMinWidthChangeEventDetail,\n};\n"]}
|
package/dist/ToolbarButton.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { ButtonAccessibilityAttributes } from "./Button.js";
|
|
2
2
|
import type ButtonDesign from "./types/ButtonDesign.js";
|
|
3
|
-
import
|
|
3
|
+
import type ToolbarItemOverflowBehavior from "./types/ToolbarItemOverflowBehavior.js";
|
|
4
|
+
import ToolbarItemBase from "./ToolbarItemBase.js";
|
|
5
|
+
import type { ToolbarItemEventDetail } from "./ToolbarItemBase.js";
|
|
4
6
|
type ToolbarButtonAccessibilityAttributes = ButtonAccessibilityAttributes;
|
|
5
7
|
/**
|
|
6
8
|
* @class
|
|
@@ -13,11 +15,28 @@ type ToolbarButtonAccessibilityAttributes = ButtonAccessibilityAttributes;
|
|
|
13
15
|
* `import "@ui5/webcomponents/dist/ToolbarButton.js";`
|
|
14
16
|
* @constructor
|
|
15
17
|
* @abstract
|
|
16
|
-
* @extends
|
|
18
|
+
* @extends ToolbarItemBase
|
|
17
19
|
* @public
|
|
18
20
|
* @since 1.17.0
|
|
19
21
|
*/
|
|
20
|
-
declare class ToolbarButton extends
|
|
22
|
+
declare class ToolbarButton extends ToolbarItemBase {
|
|
23
|
+
eventDetails: ToolbarItemBase["eventDetails"] & {
|
|
24
|
+
click: ToolbarItemEventDetail;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Property used to define the access of the item to the overflow Popover. If "NeverOverflow" option is set,
|
|
28
|
+
* the item never goes in the Popover, if "AlwaysOverflow" - it never comes out of it.
|
|
29
|
+
* @public
|
|
30
|
+
* @default "Default"
|
|
31
|
+
*/
|
|
32
|
+
overflowPriority: `${ToolbarItemOverflowBehavior}`;
|
|
33
|
+
/**
|
|
34
|
+
* Defines if the toolbar overflow popup should close upon interaction with the item.
|
|
35
|
+
* It will close by default.
|
|
36
|
+
* @default false
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
preventOverflowClosing: boolean;
|
|
21
40
|
/**
|
|
22
41
|
* Defines if the action is disabled.
|
|
23
42
|
*
|
package/dist/ToolbarButton.js
CHANGED
|
@@ -8,7 +8,7 @@ import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
|
|
|
8
8
|
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
9
9
|
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
10
10
|
import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
|
|
11
|
-
import
|
|
11
|
+
import ToolbarItemBase from "./ToolbarItemBase.js";
|
|
12
12
|
import ToolbarButtonTemplate from "./ToolbarButtonTemplate.js";
|
|
13
13
|
import ToolbarButtonCss from "./generated/themes/ToolbarButton.css.js";
|
|
14
14
|
/**
|
|
@@ -22,13 +22,27 @@ import ToolbarButtonCss from "./generated/themes/ToolbarButton.css.js";
|
|
|
22
22
|
* `import "@ui5/webcomponents/dist/ToolbarButton.js";`
|
|
23
23
|
* @constructor
|
|
24
24
|
* @abstract
|
|
25
|
-
* @extends
|
|
25
|
+
* @extends ToolbarItemBase
|
|
26
26
|
* @public
|
|
27
27
|
* @since 1.17.0
|
|
28
28
|
*/
|
|
29
|
-
let ToolbarButton = class ToolbarButton extends
|
|
29
|
+
let ToolbarButton = class ToolbarButton extends ToolbarItemBase {
|
|
30
30
|
constructor() {
|
|
31
31
|
super(...arguments);
|
|
32
|
+
/**
|
|
33
|
+
* Property used to define the access of the item to the overflow Popover. If "NeverOverflow" option is set,
|
|
34
|
+
* the item never goes in the Popover, if "AlwaysOverflow" - it never comes out of it.
|
|
35
|
+
* @public
|
|
36
|
+
* @default "Default"
|
|
37
|
+
*/
|
|
38
|
+
this.overflowPriority = "Default";
|
|
39
|
+
/**
|
|
40
|
+
* Defines if the toolbar overflow popup should close upon interaction with the item.
|
|
41
|
+
* It will close by default.
|
|
42
|
+
* @default false
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
this.preventOverflowClosing = false;
|
|
32
46
|
/**
|
|
33
47
|
* Defines if the action is disabled.
|
|
34
48
|
*
|
|
@@ -116,6 +130,12 @@ let ToolbarButton = class ToolbarButton extends ToolbarItem {
|
|
|
116
130
|
};
|
|
117
131
|
}
|
|
118
132
|
};
|
|
133
|
+
__decorate([
|
|
134
|
+
property()
|
|
135
|
+
], ToolbarButton.prototype, "overflowPriority", void 0);
|
|
136
|
+
__decorate([
|
|
137
|
+
property({ type: Boolean })
|
|
138
|
+
], ToolbarButton.prototype, "preventOverflowClosing", void 0);
|
|
119
139
|
__decorate([
|
|
120
140
|
property({ type: Boolean })
|
|
121
141
|
], ToolbarButton.prototype, "disabled", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarButton.js","sourceRoot":"","sources":["../src/ToolbarButton.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,yDAAyD,CAAC;
|
|
1
|
+
{"version":3,"file":"ToolbarButton.js","sourceRoot":"","sources":["../src/ToolbarButton.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAK5E,OAAO,eAAe,MAAM,sBAAsB,CAAC;AAEnD,OAAO,qBAAqB,MAAM,4BAA4B,CAAC;AAC/D,OAAO,gBAAgB,MAAM,yCAAyC,CAAC;AAIvE;;;;;;;;;;;;;;GAcG;AAqBH,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,eAAe;IAA3C;;QAKC;;;;;UAKE;QAEF,qBAAgB,GAAqC,SAAS,CAAC;QAE/D;;;;;WAKG;QAEH,2BAAsB,GAAG,KAAK,CAAC;QAE/B;;;;;;WAMG;QAEH,aAAQ,GAAG,KAAK,CAAC;QAEjB;;;;WAIG;QAEH,WAAM,GAAsB,SAAS,CAAC;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,EAAE;6CAC2B;AAWtC;IADC,QAAQ,EAAE;2CACE;AAgBb;IADC,QAAQ,EAAE;8CACM;AAUjB;IADC,QAAQ,EAAE;8CACK;AAQhB;IADC,QAAQ,EAAE;qDACa;AAQxB;IADC,QAAQ,EAAE;wDACgB;AAoB3B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8DACwC;AAQnE;IADC,QAAQ,EAAE;2CACG;AAed;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uDACH;AAUzB;IADC,QAAQ,EAAE;4CACI;AAjJV,aAAa;IApBlB,aAAa,CAAC;QACd,GAAG,EAAE,oBAAoB;QACzB,QAAQ,EAAE,qBAAqB;QAC/B,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,CAAC,gBAAgB,CAAC;KAC1B,CAAC;IAEF;;;;;;;OAOG;;IACF,KAAK,CAAC,OAAO,EAAE;QACf,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,IAAI;KAChB,CAAC;GAEI,aAAa,CA8LlB;AAED,aAAa,CAAC,MAAM,EAAE,CAAC;AAEvB,eAAe,aAAa,CAAC","sourcesContent":["import jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport type { ButtonAccessibilityAttributes } from \"./Button.js\";\nimport type ButtonDesign from \"./types/ButtonDesign.js\";\nimport type ToolbarItemOverflowBehavior from \"./types/ToolbarItemOverflowBehavior.js\";\n\nimport ToolbarItemBase from \"./ToolbarItemBase.js\";\nimport type { ToolbarItemEventDetail } from \"./ToolbarItemBase.js\";\nimport ToolbarButtonTemplate from \"./ToolbarButtonTemplate.js\";\nimport ToolbarButtonCss from \"./generated/themes/ToolbarButton.css.js\";\n\ntype ToolbarButtonAccessibilityAttributes = ButtonAccessibilityAttributes;\n\n/**\n * @class\n *\n * ### Overview\n * The `ui5-toolbar-button` represents an abstract action,\n * used in the `ui5-toolbar`.\n *\n * ### ES6 Module Import\n * `import \"@ui5/webcomponents/dist/ToolbarButton.js\";`\n * @constructor\n * @abstract\n * @extends ToolbarItemBase\n * @public\n * @since 1.17.0\n */\n@customElement({\n\ttag: \"ui5-toolbar-button\",\n\ttemplate: ToolbarButtonTemplate,\n\trenderer: jsxRenderer,\n\tstyles: [ToolbarButtonCss],\n})\n\n/**\n * Fired when the component is activated either with a\n * mouse/tap or by using the Enter or Space key.\n *\n * **Note:** The event will not be fired if the `disabled`\n * property is set to `true`.\n * @public\n */\n@event(\"click\", {\n\tbubbles: true,\n\tcancelable: true,\n})\n\nclass ToolbarButton extends ToolbarItemBase {\n\teventDetails!: ToolbarItemBase[\"eventDetails\"] & {\n\t\tclick: ToolbarItemEventDetail,\n\t}\n\n\t/**\n\t* Property used to define the access of the item to the overflow Popover. If \"NeverOverflow\" option is set,\n\t* the item never goes in the Popover, if \"AlwaysOverflow\" - it never comes out of it.\n\t* @public\n\t* @default \"Default\"\n\t*/\n\t@property()\n\toverflowPriority: `${ToolbarItemOverflowBehavior}` = \"Default\";\n\n\t/**\n\t * Defines if the toolbar overflow popup should close upon interaction with the item.\n\t * It will close by default.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tpreventOverflowClosing = false;\n\n\t/**\n\t * Defines if the action is disabled.\n\t *\n\t * **Note:** a disabled action can't be pressed or focused, and it is not in the tab chain.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Defines the action design.\n\t * @default \"Default\"\n\t * @public\n\t */\n\t@property()\n\tdesign: `${ButtonDesign}` = \"Default\";\n\n\t/**\n\t * Defines the `icon` source URI.\n\t *\n\t * **Note:** SAP-icons font provides numerous buil-in icons. To find all the available icons, see the\n\t * [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\ticon?: string\n\n\t/**\n\t * Defines the icon, displayed as graphical element within the component after the button text.\n\t *\n\t * **Note:** It is highly recommended to use `endIcon` property only together with `icon` and/or `text` properties.\n\t * Usage of `endIcon` only should be avoided.\n\t *\n\t * The SAP-icons font provides numerous options.\n\t *\n\t * Example:\n\t * See all the available icons within the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tendIcon?: string;\n\n\t/**\n\t * Defines the tooltip of the component.\n\t *\n\t * **Note:** A tooltip attribute should be provided for icon-only buttons, in order to represent their exact meaning/function.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\ttooltip?: string\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that label the component.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Defines the additional accessibility attributes that will be applied to the component.\n\t *\n\t * The following fields are supported:\n\t *\n\t * - **expanded**: Indicates whether the button, or another grouping element it controls, is currently expanded or collapsed.\n\t * Accepts the following string values: `true` or `false`\n\t *\n\t * - **hasPopup**: Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by the button.\n\t * Accepts the following string values: `dialog`, `grid`, `listbox`, `menu` or `tree`.\n\t *\n\t * - **controls**: Identifies the element (or elements) whose contents or presence are controlled by the button element.\n\t * Accepts a lowercase string value.\n\t *\n\t * @default {}\n\t * @public\n\t */\n\t@property({ type: Object })\n\taccessibilityAttributes: ToolbarButtonAccessibilityAttributes = {};\n\n\t/**\n\t * Button text\n\t * @public\n\t * @default undefined\n\t */\n\t@property()\n\ttext?: string;\n\n\t/**\n\t * Defines whether the button text should only be displayed in the overflow popover.\n\t *\n\t * When set to `true`, the button appears as icon-only in the main toolbar,\n\t * but shows both icon and text when moved to the overflow popover.\n\t *\n\t * **Note:** This property only takes effect when the `text` property is also set.\n\t *\n\t * @default false\n\t * @public\n\t * @since 2.17.0\n\t */\n\t@property({ type: Boolean })\n\tshowOverflowText = false;\n\n\t/**\n\t * Defines the width of the button.\n\t *\n\t * **Note:** all CSS sizes are supported - 'percentage', 'px', 'rem', 'auto', etc.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\twidth?: string;\n\n\tget styles() {\n\t\treturn {\n\t\t\twidth: this.width,\n\t\t\tdisplay: this.hidden ? \"none\" : \"inline-block\",\n\t\t};\n\t}\n\n\t/**\n\t * Returns the effective text to display based on overflow state and showOverflowText property.\n\t *\n\t * When showOverflowText is true:\n\t * - Normal state: returns empty string (icon-only)\n\t * - Overflow state: returns text\n\t *\n\t * When showOverflowText is false:\n\t * - Returns text in both states (normal behavior)\n\t */\n\tget effectiveText(): string | undefined {\n\t\tif (this.showOverflowText) {\n\t\t\treturn this.isOverflowed ? this.text : \"\";\n\t\t}\n\t\treturn this.text;\n\t}\n\n\tonClick(e: Event) {\n\t\te.stopImmediatePropagation();\n\t\tconst prevented = !this.fireDecoratorEvent(\"click\", { targetRef: e.target as HTMLElement });\n\t\tif (!prevented && !this.preventOverflowClosing) {\n\t\t\tthis.fireDecoratorEvent(\"close-overflow\");\n\t\t}\n\t}\n\n\t/**\n\t * @override\n\t */\n\tget classes() {\n\t\treturn {\n\t\t\troot: {\n\t\t\t\t...super.classes.root,\n\t\t\t\t\"ui5-tb-button\": true,\n\t\t\t},\n\t\t};\n\t}\n}\n\nToolbarButton.define();\n\nexport default ToolbarButton;\n\nexport type {\n\tToolbarButtonAccessibilityAttributes,\n};\n"]}
|
package/dist/ToolbarItem.d.ts
CHANGED
|
@@ -1,47 +1,42 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import ToolbarItemBase from "./ToolbarItemBase.js";
|
|
2
|
+
import type { DefaultSlot } from "@ui5/webcomponents-base";
|
|
3
|
+
/**
|
|
4
|
+
* Interface for the slotted item in `ui5-toolbar-item`.
|
|
5
|
+
*
|
|
6
|
+
* It could be any HTMLElement or UI5 Web Component with option to specify custom overflow closing events and overflow behavior.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
* @since 2.20.0
|
|
10
|
+
*/
|
|
11
|
+
interface IToolbarItemContent extends HTMLElement {
|
|
12
|
+
overflowCloseEvents?: string[];
|
|
13
|
+
hasOverflow?: boolean;
|
|
12
14
|
}
|
|
13
15
|
/**
|
|
14
|
-
*
|
|
16
|
+
* @class
|
|
17
|
+
*
|
|
18
|
+
* ### Overview
|
|
19
|
+
* The `ui5-toolbar-item` is a wrapper component used to integrate UI5 Web Components into the `ui5-toolbar`.
|
|
20
|
+
* It renders within the toolbar's shadow DOM and manages the lifecycle
|
|
21
|
+
* and overflow behavior of its child component.
|
|
22
|
+
*
|
|
23
|
+
* ### Structure
|
|
24
|
+
* The toolbar item wraps a single UI5 Web Component (such as CheckBox, Title, etc.) and handles:
|
|
25
|
+
* - Overflow management (determining if the item should be displayed in the main toolbar or overflow popover)
|
|
26
|
+
* - Automatic popover closing on interaction
|
|
27
|
+
* - CSS custom state exposure for styling based on overflow state
|
|
28
|
+
*
|
|
29
|
+
* ### Usage
|
|
30
|
+
* The `ui5-toolbar-item` is typically used implicitly when adding components to a toolbar,
|
|
31
|
+
* but specialized wrappers like `ui5-toolbar-button` provide
|
|
32
|
+
* component-specific functionality and should be preferred when available.
|
|
33
|
+
*
|
|
34
|
+
* @constructor
|
|
35
|
+
* @extends ToolbarItemBase
|
|
15
36
|
* @public
|
|
16
|
-
* @since
|
|
37
|
+
* @since 2.20.0
|
|
17
38
|
*/
|
|
18
|
-
declare class ToolbarItem extends
|
|
19
|
-
eventDetails: {
|
|
20
|
-
click: ToolbarItemEventDetail;
|
|
21
|
-
"close-overflow": void;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Property used to define the access of the item to the overflow Popover. If "NeverOverflow" option is set,
|
|
25
|
-
* the item never goes in the Popover, if "AlwaysOverflow" - it never comes out of it.
|
|
26
|
-
* @public
|
|
27
|
-
* @default "Default"
|
|
28
|
-
*/
|
|
29
|
-
overflowPriority: `${ToolbarItemOverflowBehavior}`;
|
|
30
|
-
/**
|
|
31
|
-
* Defines if the toolbar overflow popup should close upon intereaction with the item.
|
|
32
|
-
* It will close by default.
|
|
33
|
-
* @default false
|
|
34
|
-
* @public
|
|
35
|
-
*/
|
|
36
|
-
preventOverflowClosing: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Defines if the toolbar item is overflowed.
|
|
39
|
-
* @default false
|
|
40
|
-
* @protected
|
|
41
|
-
* @since 2.11.0
|
|
42
|
-
*/
|
|
43
|
-
isOverflowed: boolean;
|
|
44
|
-
_isRendering: boolean;
|
|
39
|
+
declare class ToolbarItem extends ToolbarItemBase {
|
|
45
40
|
_maxWidth: number;
|
|
46
41
|
_wrapperChecked: boolean;
|
|
47
42
|
fireCloseOverflowRef: () => void;
|
|
@@ -58,51 +53,20 @@ declare class ToolbarItem extends UI5Element {
|
|
|
58
53
|
"ui5-select": string;
|
|
59
54
|
};
|
|
60
55
|
onBeforeRendering(): void;
|
|
61
|
-
onAfterRendering(): void;
|
|
62
56
|
onExitDOM(): void;
|
|
63
57
|
/**
|
|
64
58
|
* Wrapped component slot.
|
|
65
59
|
* @public
|
|
66
60
|
* @since 2.20.0
|
|
67
61
|
*/
|
|
68
|
-
item:
|
|
62
|
+
item: DefaultSlot<IToolbarItemContent>;
|
|
69
63
|
checkForWrapper(): void;
|
|
70
64
|
getClosingEvents(): string[];
|
|
71
65
|
attachCloseOverflowHandlers(): void;
|
|
72
66
|
detachCloseOverflowHandlers(): void;
|
|
73
67
|
fireCloseOverflow(): void;
|
|
74
|
-
/**
|
|
75
|
-
* Defines if the width of the item should be ignored in calculating the whole width of the toolbar
|
|
76
|
-
* @protected
|
|
77
|
-
*/
|
|
78
|
-
get ignoreSpace(): boolean;
|
|
79
|
-
/**
|
|
80
|
-
* Returns if the item is flexible. An item that is returning true for this property will make
|
|
81
|
-
* the toolbar expand to fill the 100% width of its container.
|
|
82
|
-
* @protected
|
|
83
|
-
*/
|
|
84
|
-
get hasFlexibleWidth(): boolean;
|
|
85
|
-
/**
|
|
86
|
-
* Returns if the item is interactive.
|
|
87
|
-
* This value is used to determinate if the toolbar should have its accessibility role and attributes set.
|
|
88
|
-
* At least two interactive items are needed for the toolbar to have the role="toolbar" attribute set.
|
|
89
|
-
* @protected
|
|
90
|
-
*/
|
|
91
|
-
get isInteractive(): boolean;
|
|
92
68
|
get itemTagName(): string;
|
|
93
69
|
get hasOverflow(): boolean;
|
|
94
|
-
/**
|
|
95
|
-
* Returns if the item is separator.
|
|
96
|
-
* @protected
|
|
97
|
-
*/
|
|
98
|
-
get isSeparator(): boolean;
|
|
99
|
-
get stableDomRef(): string;
|
|
100
|
-
get classes(): {
|
|
101
|
-
root: {
|
|
102
|
-
"ui5-tb-popover-item": boolean;
|
|
103
|
-
"ui5-tb-item": boolean;
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
70
|
}
|
|
107
|
-
export type {
|
|
71
|
+
export type { IToolbarItemContent, };
|
|
108
72
|
export default ToolbarItem;
|
package/dist/ToolbarItem.js
CHANGED
|
@@ -4,55 +4,40 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
|
|
8
|
-
import
|
|
9
|
-
import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
|
|
10
|
-
import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
|
7
|
+
var ToolbarItem_1;
|
|
8
|
+
import slot from "@ui5/webcomponents-base/dist/decorators/slot-strict.js";
|
|
11
9
|
import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
|
|
12
10
|
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
13
11
|
import ToolbarItemTemplate from "./ToolbarItemTemplate.js";
|
|
14
12
|
import ToolbarItemCss from "./generated/themes/ToolbarItem.css.js";
|
|
15
|
-
|
|
16
|
-
* Fired when the overflow popover is closed.
|
|
17
|
-
* @public
|
|
18
|
-
* @since 1.17.0
|
|
19
|
-
*/
|
|
20
|
-
let ToolbarItem =
|
|
13
|
+
import ToolbarItemBase from "./ToolbarItemBase.js";
|
|
21
14
|
/**
|
|
22
15
|
* @class
|
|
23
16
|
*
|
|
24
|
-
*
|
|
17
|
+
* ### Overview
|
|
18
|
+
* The `ui5-toolbar-item` is a wrapper component used to integrate UI5 Web Components into the `ui5-toolbar`.
|
|
19
|
+
* It renders within the toolbar's shadow DOM and manages the lifecycle
|
|
20
|
+
* and overflow behavior of its child component.
|
|
21
|
+
*
|
|
22
|
+
* ### Structure
|
|
23
|
+
* The toolbar item wraps a single UI5 Web Component (such as CheckBox, Title, etc.) and handles:
|
|
24
|
+
* - Overflow management (determining if the item should be displayed in the main toolbar or overflow popover)
|
|
25
|
+
* - Automatic popover closing on interaction
|
|
26
|
+
* - CSS custom state exposure for styling based on overflow state
|
|
27
|
+
*
|
|
28
|
+
* ### Usage
|
|
29
|
+
* The `ui5-toolbar-item` is typically used implicitly when adding components to a toolbar,
|
|
30
|
+
* but specialized wrappers like `ui5-toolbar-button` provide
|
|
31
|
+
* component-specific functionality and should be preferred when available.
|
|
32
|
+
*
|
|
25
33
|
* @constructor
|
|
26
|
-
* @extends
|
|
34
|
+
* @extends ToolbarItemBase
|
|
27
35
|
* @public
|
|
28
|
-
* @
|
|
29
|
-
* @since 1.17.0
|
|
36
|
+
* @since 2.20.0
|
|
30
37
|
*/
|
|
31
|
-
class ToolbarItem extends
|
|
38
|
+
let ToolbarItem = ToolbarItem_1 = class ToolbarItem extends ToolbarItemBase {
|
|
32
39
|
constructor() {
|
|
33
40
|
super(...arguments);
|
|
34
|
-
/**
|
|
35
|
-
* Property used to define the access of the item to the overflow Popover. If "NeverOverflow" option is set,
|
|
36
|
-
* the item never goes in the Popover, if "AlwaysOverflow" - it never comes out of it.
|
|
37
|
-
* @public
|
|
38
|
-
* @default "Default"
|
|
39
|
-
*/
|
|
40
|
-
this.overflowPriority = "Default";
|
|
41
|
-
/**
|
|
42
|
-
* Defines if the toolbar overflow popup should close upon intereaction with the item.
|
|
43
|
-
* It will close by default.
|
|
44
|
-
* @default false
|
|
45
|
-
* @public
|
|
46
|
-
*/
|
|
47
|
-
this.preventOverflowClosing = false;
|
|
48
|
-
/**
|
|
49
|
-
* Defines if the toolbar item is overflowed.
|
|
50
|
-
* @default false
|
|
51
|
-
* @protected
|
|
52
|
-
* @since 2.11.0
|
|
53
|
-
*/
|
|
54
|
-
this.isOverflowed = false;
|
|
55
|
-
this._isRendering = true;
|
|
56
41
|
this._maxWidth = 0;
|
|
57
42
|
this._wrapperChecked = false;
|
|
58
43
|
this.fireCloseOverflowRef = this.fireCloseOverflow.bind(this);
|
|
@@ -73,9 +58,6 @@ class ToolbarItem extends UI5Element {
|
|
|
73
58
|
this.checkForWrapper();
|
|
74
59
|
this.attachCloseOverflowHandlers();
|
|
75
60
|
}
|
|
76
|
-
onAfterRendering() {
|
|
77
|
-
this._isRendering = false;
|
|
78
|
-
}
|
|
79
61
|
onExitDOM() {
|
|
80
62
|
this.detachCloseOverflowHandlers();
|
|
81
63
|
}
|
|
@@ -96,12 +78,12 @@ class ToolbarItem extends UI5Element {
|
|
|
96
78
|
}
|
|
97
79
|
// We want to close the overflow popover, when closing event is being executed
|
|
98
80
|
getClosingEvents() {
|
|
99
|
-
const item =
|
|
81
|
+
const item = this.item[0];
|
|
100
82
|
const closeEvents = this.closeOverflowSet[this.itemTagName] || [];
|
|
101
83
|
if (!item) {
|
|
102
84
|
return [...closeEvents];
|
|
103
85
|
}
|
|
104
|
-
const overflowCloseEvents =
|
|
86
|
+
const overflowCloseEvents = item.overflowCloseEvents ? item.overflowCloseEvents : [];
|
|
105
87
|
return [...closeEvents, ...overflowCloseEvents];
|
|
106
88
|
}
|
|
107
89
|
attachCloseOverflowHandlers() {
|
|
@@ -121,30 +103,6 @@ class ToolbarItem extends UI5Element {
|
|
|
121
103
|
fireCloseOverflow() {
|
|
122
104
|
this.fireDecoratorEvent("close-overflow");
|
|
123
105
|
}
|
|
124
|
-
/**
|
|
125
|
-
* Defines if the width of the item should be ignored in calculating the whole width of the toolbar
|
|
126
|
-
* @protected
|
|
127
|
-
*/
|
|
128
|
-
get ignoreSpace() {
|
|
129
|
-
return false;
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Returns if the item is flexible. An item that is returning true for this property will make
|
|
133
|
-
* the toolbar expand to fill the 100% width of its container.
|
|
134
|
-
* @protected
|
|
135
|
-
*/
|
|
136
|
-
get hasFlexibleWidth() {
|
|
137
|
-
return false;
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Returns if the item is interactive.
|
|
141
|
-
* This value is used to determinate if the toolbar should have its accessibility role and attributes set.
|
|
142
|
-
* At least two interactive items are needed for the toolbar to have the role="toolbar" attribute set.
|
|
143
|
-
* @protected
|
|
144
|
-
*/
|
|
145
|
-
get isInteractive() {
|
|
146
|
-
return true;
|
|
147
|
-
}
|
|
148
106
|
get itemTagName() {
|
|
149
107
|
const ctor = this.getSlottedNodes("item")[0]?.constructor;
|
|
150
108
|
return ctor?.getMetadata ? ctor.getMetadata().getPureTag() : this.getSlottedNodes("item")[0]?.tagName;
|
|
@@ -152,44 +110,13 @@ class ToolbarItem extends UI5Element {
|
|
|
152
110
|
get hasOverflow() {
|
|
153
111
|
return this.item[0]?.hasOverflow ?? false;
|
|
154
112
|
}
|
|
155
|
-
/**
|
|
156
|
-
* Returns if the item is separator.
|
|
157
|
-
* @protected
|
|
158
|
-
*/
|
|
159
|
-
get isSeparator() {
|
|
160
|
-
return false;
|
|
161
|
-
}
|
|
162
|
-
get stableDomRef() {
|
|
163
|
-
return this.getAttribute("stable-dom-ref") || `${this._id}-stable-dom-ref`;
|
|
164
|
-
}
|
|
165
|
-
get classes() {
|
|
166
|
-
return {
|
|
167
|
-
root: {
|
|
168
|
-
"ui5-tb-popover-item": this.isOverflowed,
|
|
169
|
-
"ui5-tb-item": true,
|
|
170
|
-
},
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
113
|
};
|
|
174
|
-
__decorate([
|
|
175
|
-
property()
|
|
176
|
-
], ToolbarItem.prototype, "overflowPriority", void 0);
|
|
177
|
-
__decorate([
|
|
178
|
-
property({ type: Boolean })
|
|
179
|
-
], ToolbarItem.prototype, "preventOverflowClosing", void 0);
|
|
180
|
-
__decorate([
|
|
181
|
-
property({ type: Boolean })
|
|
182
|
-
], ToolbarItem.prototype, "isOverflowed", void 0);
|
|
183
114
|
__decorate([
|
|
184
115
|
slot({
|
|
185
116
|
"default": true, type: HTMLElement, invalidateOnChildChange: true,
|
|
186
117
|
})
|
|
187
118
|
], ToolbarItem.prototype, "item", void 0);
|
|
188
|
-
ToolbarItem = __decorate([
|
|
189
|
-
event("close-overflow", {
|
|
190
|
-
bubbles: true,
|
|
191
|
-
cancelable: true,
|
|
192
|
-
}),
|
|
119
|
+
ToolbarItem = ToolbarItem_1 = __decorate([
|
|
193
120
|
customElement({
|
|
194
121
|
tag: "ui5-toolbar-item",
|
|
195
122
|
languageAware: true,
|
|
@@ -197,16 +124,6 @@ ToolbarItem = __decorate([
|
|
|
197
124
|
template: ToolbarItemTemplate,
|
|
198
125
|
styles: ToolbarItemCss,
|
|
199
126
|
})
|
|
200
|
-
/**
|
|
201
|
-
* @class
|
|
202
|
-
*
|
|
203
|
-
* Represents an abstract class for items, used in the `ui5-toolbar`.
|
|
204
|
-
* @constructor
|
|
205
|
-
* @extends UI5Element
|
|
206
|
-
* @public
|
|
207
|
-
* @experimental This module is experimental and its API might change significantly in future.
|
|
208
|
-
* @since 1.17.0
|
|
209
|
-
*/
|
|
210
127
|
], ToolbarItem);
|
|
211
128
|
ToolbarItem.define();
|
|
212
129
|
export default ToolbarItem;
|