@ui5/webcomponents 2.20.0-rc.3 → 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.
@@ -9,7 +9,7 @@ import BreadcrumbsDesign from "./types/BreadcrumbsDesign.js";
9
9
  import "./BreadcrumbsItem.js";
10
10
  import type BreadcrumbsItem from "./BreadcrumbsItem.js";
11
11
  import type BreadcrumbsSeparator from "./types/BreadcrumbsSeparator.js";
12
- import type { IOverflowToolbarItem } from "./ToolbarItem.js";
12
+ import type { IToolbarItemContent } from "./ToolbarItem.js";
13
13
  import type Link from "./Link.js";
14
14
  import type { LinkClickEventDetail } from "./Link.js";
15
15
  import type Label from "./Label.js";
@@ -52,11 +52,11 @@ type FocusAdaptor = ITabbable & {
52
52
  * - [End] - Navigates to the last item.
53
53
  * @constructor
54
54
  * @extends UI5Element
55
- * @implements {IOverflowToolbarItem}
55
+ * @implements {IToolbarItemContent}
56
56
  * @public
57
57
  * @since 1.0.0-rc.15
58
58
  */
59
- declare class Breadcrumbs extends UI5Element implements IOverflowToolbarItem {
59
+ declare class Breadcrumbs extends UI5Element implements IToolbarItemContent {
60
60
  eventDetails: {
61
61
  "item-click": BreadcrumbsItemClickEventDetail;
62
62
  };
@@ -52,7 +52,7 @@ import breadcrumbsPopoverCss from "./generated/themes/BreadcrumbsPopover.css.js"
52
52
  * - [End] - Navigates to the last item.
53
53
  * @constructor
54
54
  * @extends UI5Element
55
- * @implements {IOverflowToolbarItem}
55
+ * @implements {IToolbarItemContent}
56
56
  * @public
57
57
  * @since 1.0.0-rc.15
58
58
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumbs.js","sourceRoot":"","sources":["../src/Breadcrumbs.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,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iB,CAAC,IAAI,CAAC;IAChE,CAAC;IAED,IAAI,mBAAmB;QACtB,OAAO,aAAW,CAAC,UAAU,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAC/D,CAAC;IAED,IAAI,gCAAgC;QACnC,OAAO,aAAW,CAAC,UAAU,CAAC,OAAO,CAAC,+BAA+B,CAAC,CAAC;IACxE,CAAC;IAED,IAAI,iBAAiB;QACpB,OAAO,aAAW,CAAC,UAAU,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAClE,CAAC;IACD,IAAI,WAAW;QACd,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAA;AA1gBA;IADC,QAAQ,EAAE;2CACiC;AAQ5C;IADC,QAAQ,EAAE;+CACqC;AAQhD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;kDAC5B;AASlB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,uBAAuB,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;0CACvC;AAY9B;IADN,IAAI,CAAC,oBAAoB,CAAC;qCACG;AAnDzB,WAAW;IAtBhB,aAAa,CAAC;QACd,GAAG,EAAE,iBAAiB;QACtB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,mBAAmB;QAC7B,MAAM,EAAE,CAAC,cAAc,EAAE,qBAAqB,CAAC;KAC/C,CAAC;IACF;;;;;;;;;;OAUG;;IACF,KAAK,CAAC,YAAY,EAAE;QACpB,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,IAAI;KAChB,CAAC;GACI,WAAW,CAwhBhB;AAED,WAAW,CAAC,MAAM,EAAE,CAAC;AAErB,eAAe,WAAW,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { ChangeInfo, DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport ItemNavigation from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport type { ITabbable } from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport { locationOpen } from \"@ui5/webcomponents-base/dist/Location.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport type { AccessibilityAttributes } from \"@ui5/webcomponents-base/dist/types.js\";\nimport {\n\tisSpace,\n\tisShow,\n\tisEnter,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport NavigationMode from \"@ui5/webcomponents-base/dist/types/NavigationMode.js\";\nimport BreadcrumbsDesign from \"./types/BreadcrumbsDesign.js\";\nimport \"./BreadcrumbsItem.js\";\nimport type BreadcrumbsItem from \"./BreadcrumbsItem.js\";\nimport type BreadcrumbsSeparator from \"./types/BreadcrumbsSeparator.js\";\nimport type { IOverflowToolbarItem } from \"./ToolbarItem.js\";\n\nimport {\n\tBREADCRUMB_ITEM_POS,\n\tBREADCRUMBS_ARIA_LABEL,\n\tBREADCRUMBS_OVERFLOW_ARIA_LABEL,\n\tBREADCRUMBS_CANCEL_BUTTON,\n\tFORM_SELECTABLE_AVALIABLE_VALUES,\n} from \"./generated/i18n/i18n-defaults.js\";\nimport type Link from \"./Link.js\";\nimport type { LinkClickEventDetail } from \"./Link.js\";\nimport type Label from \"./Label.js\";\nimport type ResponsivePopover from \"./ResponsivePopover.js\";\nimport type { ListSelectionChangeEventDetail } from \"./List.js\";\n\n// Templates\nimport BreadcrumbsTemplate from \"./BreadcrumbsTemplate.js\";\n\n// Styles\nimport breadcrumbsCss from \"./generated/themes/Breadcrumbs.css.js\";\nimport breadcrumbsPopoverCss from \"./generated/themes/BreadcrumbsPopover.css.js\";\n\ntype BreadcrumbsItemClickEventDetail = {\n\titem: BreadcrumbsItem;\n\taltKey?: boolean;\n\tctrlKey?: boolean;\n\tmetaKey?: boolean;\n\tshiftKey?: boolean;\n}\n\ntype FocusAdaptor = ITabbable & {\n\tgetlabelWrapper: () => Element | null;\n\tforcedTabIndex: string;\n}\n\n/**\n * @class\n *\n * ### Overview\n * Enables users to navigate between items by providing a list of links to previous steps in the user's navigation path.\n * It helps the user to be aware of their location within the application and allows faster navigation.\n *\n * The last three steps can be accessed as links directly, while the remaining links prior to them are available\n * in a drop-down menu.\n *\n * You can choose the type of separator to be used from a number of predefined options.\n *\n * ### Keyboard Handling\n * The `ui5-breadcrumbs` provides advanced keyboard handling.\n *\n * - [F4], [Alt] + [Up], [Alt] + [Down], [Space], or [Enter] - If the dropdown arrow is focused - opens/closes the drop-down.\n * - [Space],[Enter] - Activates the focused item and triggers the `item-click` event.\n * - [Escape] - Closes the drop-down.\n * - [Left] - If the drop-down is closed - navigates one item to the left.\n * - [Right] - If the drop-down is closed - navigates one item to the right.\n * - [Up] - If the drop-down is open - moves focus to the next item.\n * - [Down] - If the drop-down is open - moves focus to the previous item.\n * - [Home] - Navigates to the first item.\n * - [End] - Navigates to the last item.\n * @constructor\n * @extends UI5Element\n * @implements {IOverflowToolbarItem}\n * @public\n * @since 1.0.0-rc.15\n */\n@customElement({\n\ttag: \"ui5-breadcrumbs\",\n\tlanguageAware: true,\n\trenderer: jsxRenderer,\n\ttemplate: BreadcrumbsTemplate,\n\tstyles: [breadcrumbsCss, breadcrumbsPopoverCss],\n})\n/**\n * Fires when a `BreadcrumbsItem` is clicked.\n *\n * **Note:** You can prevent browser location change by calling `event.preventDefault()`.\n * @param {HTMLElement} item The clicked item.\n * @param {Boolean} altKey Returns whether the \"ALT\" key was pressed when the event was triggered.\n * @param {Boolean} ctrlKey Returns whether the \"CTRL\" key was pressed when the event was triggered.\n * @param {Boolean} metaKey Returns whether the \"META\" key was pressed when the event was triggered.\n * @param {Boolean} shiftKey Returns whether the \"SHIFT\" key was pressed when the event was triggered.\n * @public\n */\n@event(\"item-click\", {\n\tbubbles: true,\n\tcancelable: true,\n})\nclass Breadcrumbs extends UI5Element implements IOverflowToolbarItem {\n\teventDetails!: {\n\t\t\"item-click\": BreadcrumbsItemClickEventDetail,\n\t}\n\t/**\n\t * Defines the visual appearance of the last BreadcrumbsItem.\n\t *\n\t * The Breadcrumbs supports two visual appearances for the last BreadcrumbsItem:\n\t * - \"Standard\" - displaying the last item as \"current page\" (bold and without separator)\n\t * - \"NoCurrentPage\" - displaying the last item as a regular BreadcrumbsItem, followed by separator\n\t * @default \"Standard\"\n\t * @public\n\t*/\n\t@property()\n\tdesign: `${BreadcrumbsDesign}` = \"Standard\";\n\n\t/**\n\t * Determines the visual style of the separator between the breadcrumb items.\n\t * @default \"Slash\"\n\t * @public\n\t */\n\t@property()\n\tseparators: `${BreadcrumbsSeparator}` = \"Slash\";\n\n\t/**\n\t * Holds the number of items in the overflow.\n\t * @default 0\n\t * @private\n\t */\n\t@property({ type: Number, noAttribute: true })\n\t_overflowSize = 0;\n\n\t/**\n\t * Defines the component items.\n\t *\n\t * **Note:** Use the `ui5-breadcrumbs-item` component to define the desired items.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, invalidateOnChildChange: true, \"default\": true })\n\titems!: DefaultSlot<BreadcrumbsItem>;\n\n\t_itemNavigation: ItemNavigation\n\t_onResizeHandler: ResizeObserverCallback;\n\n\t// maps items to their widths\n\t_breadcrumbItemWidths = new WeakMap<BreadcrumbsItem, number>();\n\t// the width of the interactive element that opens the overflow\n\t_dropdownArrowLinkWidth = 0;\n\t_labelFocusAdaptor: FocusAdaptor;\n\tresponsivePopover?: ResponsivePopover;\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._itemNavigation = new ItemNavigation(this, {\n\t\t\tnavigationMode: NavigationMode.Auto,\n\t\t\tgetItemsCallback: () => this._getFocusableItems(),\n\t\t});\n\n\t\tthis._onResizeHandler = this._updateOverflow.bind(this);\n\n\t\tthis._labelFocusAdaptor = {\n\t\t\tid: `${this._id}-labelWrapper`,\n\t\t\tgetlabelWrapper: this.getCurrentLocationLabelWrapper.bind(this),\n\t\t\tset forcedTabIndex(value: string) {\n\t\t\t\tconst wrapper = this.getlabelWrapper();\n\t\t\t\twrapper && wrapper.setAttribute(\"tabindex\", value);\n\t\t\t},\n\t\t\tget forcedTabIndex() {\n\t\t\t\tconst wrapper = this.getlabelWrapper();\n\t\t\t\treturn wrapper?.getAttribute(\"tabindex\") || \"\";\n\t\t\t},\n\t\t};\n\t}\n\n\tonInvalidation(changeInfo: ChangeInfo) {\n\t\tif (changeInfo.reason === \"childchange\") {\n\t\t\tconst itemIndex = this._getItems().indexOf(changeInfo.child as BreadcrumbsItem),\n\t\t\t\tisInOverflow = itemIndex < this._overflowSize;\n\t\t\tif (isInOverflow) {\n\t\t\t\t// the content of an overflowing item has changed\n\t\t\t\t// => need to render the item outside the overflow to obtain its new width\n\t\t\t\t// => lower-down the `_overfowSize` to exclude that item from the overflow\n\t\t\t\tthis._overflowSize = itemIndex;\n\t\t\t}\n\t\t}\n\t}\n\n\t_getItems() {\n\t\treturn this.getSlottedNodes<BreadcrumbsItem>(\"items\");\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._preprocessItems();\n\t}\n\n\tasync onAfterRendering() {\n\t\tawait renderFinished();\n\n\t\tthis._cacheWidths();\n\t\tthis._updateOverflow();\n\t}\n\n\tonEnterDOM() {\n\t\tResizeHandler.register(this, this._onResizeHandler);\n\t}\n\n\tonExitDOM() {\n\t\tResizeHandler.deregister(this, this._onResizeHandler);\n\t}\n\n\t_initItemNavigation() {\n\t\tif (!this._itemNavigation) {\n\t\t\tthis._itemNavigation = new ItemNavigation(this, {\n\t\t\t\tnavigationMode: NavigationMode.Auto,\n\t\t\t\tgetItemsCallback: () => this._getFocusableItems(),\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Obtains the items for navigation via keyboard\n\t * @private\n\t */\n\t_getFocusableItems() {\n\t\tconst items: Array<ITabbable> = this._links;\n\n\t\tif (!this._isOverflowEmpty) {\n\t\t\titems.unshift(this._dropdownArrowLink);\n\t\t}\n\n\t\tif (this._endsWithCurrentLocation && !this._endsWithCurrentLinkItem) {\n\t\t\titems.push(this._labelFocusAdaptor);\n\t\t}\n\n\t\treturn items;\n\t}\n\n\tgetFocusDomRef() {\n\t\treturn this._itemNavigation._getCurrentItem();\n\t}\n\n\t/**\n\t * Returns the translatable accessible name for the popover\n\t * @private\n\t */\n\tget _accessibleNamePopover() {\n\t\treturn Breadcrumbs.i18nBundle.getText(FORM_SELECTABLE_AVALIABLE_VALUES);\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tconst target = e.target,\n\t\t\tlabelWrapper = this.getCurrentLocationLabelWrapper(),\n\t\t\tcurrentItem = (target === labelWrapper) ? this._labelFocusAdaptor : target as Link;\n\n\t\tthis._itemNavigation.setCurrentItem(currentItem);\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tconst isDropdownArrowFocused = this._isDropdownArrowFocused;\n\n\t\tif (isShow(e) && isDropdownArrowFocused && !this._isOverflowEmpty) {\n\t\t\te.preventDefault();\n\t\t\tthis._toggleRespPopover();\n\t\t\treturn;\n\t\t}\n\t\tif (isSpace(e) && isDropdownArrowFocused && !this._isOverflowEmpty && !this._isPickerOpen) {\n\t\t\te.preventDefault();\n\t\t\treturn;\n\t\t}\n\t\tif ((isEnter(e) || isSpace(e)) && this._isCurrentLocationLabelFocused) {\n\t\t\tthis._onLabelPress(e);\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (this._isDropdownArrowFocused && isSpace(e) && !this._isOverflowEmpty && !this._isPickerOpen) {\n\t\t\tthis._openRespPopover();\n\t\t}\n\t}\n\n\t/**\n\t * Caches the space required to render the content\n\t * @private\n\t */\n\t_cacheWidths() {\n\t\tconst map = this._breadcrumbItemWidths,\n\t\t\t items = this._getItems(),\n\t\t\t label = this._currentLocationLabel;\n\n\t\tfor (let i = this._overflowSize; i < items.length; i++) {\n\t\t\tconst item = items[i],\n\t\t\t\tlink = this.shadowRoot!.querySelector<HTMLElement>(`#${item._id}-link-wrapper`)!;\n\t\t\tmap.set(item, this._getElementWidth(link));\n\t\t}\n\n\t\tif (items.length && this._endsWithCurrentLocation && label) {\n\t\t\tconst item = items[items.length - 1];\n\n\t\t\tmap.set(item, this._getElementWidth(label));\n\t\t}\n\n\t\tif (!this._isOverflowEmpty) {\n\t\t\tconst arrow = this.shadowRoot!.querySelector<HTMLElement>(\".ui5-breadcrumbs-dropdown-arrow-link-wrapper\")!;\n\t\t\tthis._dropdownArrowLinkWidth = this._getElementWidth(arrow);\n\t\t}\n\t}\n\n\t_updateOverflow() {\n\t\tconst items = this._getItems(),\n\t\t\tavailableWidth = this.shadowRoot!.querySelector<HTMLElement>(\".ui5-breadcrumbs-root\")!.offsetWidth;\n\t\tlet requiredWidth = this._getTotalContentWidth(),\n\t\t\toverflowSize = 0;\n\n\t\tif (requiredWidth > availableWidth) {\n\t\t\t// need to show the component that opens the overflow\n\t\t\trequiredWidth += this._dropdownArrowLinkWidth;\n\t\t}\n\n\t\twhile ((requiredWidth >= availableWidth) && (overflowSize < this._maxAllowedOverflowSize)) {\n\t\t\tconst itemToOverflow = items[overflowSize];\n\t\t\tlet itemWidth = 0;\n\n\t\t\tif (this._isItemVisible(itemToOverflow)) {\n\t\t\t\titemWidth = this._breadcrumbItemWidths.get(itemToOverflow) || 0;\n\t\t\t}\n\n\t\t\t// move the item to the overflow\n\t\t\trequiredWidth -= itemWidth;\n\t\t\toverflowSize++;\n\t\t}\n\n\t\tthis._overflowSize = overflowSize;\n\n\t\t// if overflow was emptied while picker was open => close redundant popup\n\t\tif (this._isOverflowEmpty && this._isPickerOpen) {\n\t\t\tthis.responsivePopover!.open = false;\n\t\t}\n\n\t\t// if the last focused link has done into the overflow =>\n\t\t// ensure the first visible link is focusable\n\t\tconst focusableItems = this._getFocusableItems();\n\t\tif (!focusableItems.some(x => x.forcedTabIndex === \"0\")) {\n\t\t\tthis._itemNavigation.setCurrentItem(focusableItems[0]);\n\t\t}\n\t}\n\n\t_getElementWidth(element: HTMLElement) {\n\t\tif (element) {\n\t\t\treturn Math.ceil(element.getBoundingClientRect().width);\n\t\t}\n\n\t\treturn 0;\n\t}\n\n\t_getTotalContentWidth() {\n\t\tconst items = this._getItems(),\n\t\t\twidthsMap = this._breadcrumbItemWidths,\n\t\t\ttotalLinksWidth = items.reduce((sum, link) => sum + widthsMap.get(link)!, 0);\n\n\t\treturn totalLinksWidth;\n\t}\n\n\t_onLinkPress(e: CustomEvent<LinkClickEventDetail>) {\n\t\tconst link = e.target as Link,\n\t\t\titems = this._getItems(),\n\t\t\titem = items.find(x => `${x._id}-link` === link.id)!,\n\t\t\t{\n\t\t\t\taltKey,\n\t\t\t\tctrlKey,\n\t\t\t\tmetaKey,\n\t\t\t\tshiftKey,\n\t\t\t} = e.detail;\n\n\t\tif (!this.fireDecoratorEvent(\"item-click\", {\n\t\t\titem,\n\t\t\taltKey,\n\t\t\tctrlKey,\n\t\t\tmetaKey,\n\t\t\tshiftKey,\n\t\t})) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_onLabelPress(e: MouseEvent | KeyboardEvent) {\n\t\tconst items = this._getItems(),\n\t\t\titem = items[items.length - 1],\n\t\t\t{\n\t\t\t\taltKey,\n\t\t\t\tctrlKey,\n\t\t\t\tmetaKey,\n\t\t\t\tshiftKey,\n\t\t\t} = e;\n\n\t\tthis.fireDecoratorEvent(\"item-click\", {\n\t\t\titem,\n\t\t\taltKey,\n\t\t\tctrlKey,\n\t\t\tmetaKey,\n\t\t\tshiftKey,\n\t\t});\n\t}\n\n\t_onOverflowListItemSelect(e: CustomEvent<ListSelectionChangeEventDetail>) {\n\t\tconst listItem = e.detail.selectedItems[0],\n\t\t\titems = this._getItems(),\n\t\t\titem = items.find(x => `${x._id}-li` === listItem.id)!;\n\n\t\tif (this.fireDecoratorEvent(\"item-click\", { item })) {\n\t\t\tlocationOpen(item.href, item.target || \"_self\", \"noopener,noreferrer\");\n\t\t\tthis.responsivePopover!.open = false;\n\t\t}\n\t}\n\n\t_respPopover() {\n\t\treturn this.shadowRoot!.querySelector<ResponsivePopover>(\"[ui5-responsive-popover]\")!;\n\t}\n\n\t_toggleRespPopover() {\n\t\tthis.responsivePopover = this._respPopover();\n\n\t\tif (this._isPickerOpen) {\n\t\t\tthis._closeRespPopover();\n\t\t} else {\n\t\t\tthis._openRespPopover();\n\t\t}\n\t}\n\n\t_closeRespPopover() {\n\t\tif (this.responsivePopover) {\n\t\t\tthis.responsivePopover.open = false;\n\t\t}\n\t}\n\n\t_openRespPopover() {\n\t\tthis.responsivePopover = this._respPopover();\n\t\tthis.responsivePopover.opener = this._dropdownArrowLink;\n\t\tthis.responsivePopover.open = true;\n\t}\n\n\t_isItemVisible(item: BreadcrumbsItem) {\n\t\treturn !item.hidden && this._hasVisibleContent(item);\n\t}\n\n\t_hasVisibleContent(item: BreadcrumbsItem) {\n\t\t// the check is not complete but may be extended in the future if needed to cover\n\t\t// cases besides the standard (UX-recommended) ones\n\t\treturn item.innerText || Array.from(item.children).some(child => !(child as HTMLElement).hidden);\n\t}\n\n\t_preprocessItems() {\n\t\tthis.items.forEach(item => {\n\t\t\titem._getRealDomRef = () => this.getDomRef()!.querySelector(`[data-ui5-stable*=${item.stableDomRef}]`)!;\n\t\t});\n\t}\n\n\t_getItemPositionText(position: number, size: number) {\n\t\treturn Breadcrumbs.i18nBundle.getText(BREADCRUMB_ITEM_POS, position, size);\n\t}\n\n\t_getItemAccessibleName(item: BreadcrumbsItem, position: number, size: number) {\n\t\tconst positionText = this._getItemPositionText(position, size);\n\t\tconst itemsText = item.textContent || \"\";\n\n\t\t// innerText is needed as it is no longer read out when label is set\n\t\tlet text = \"\";\n\t\tif (item.accessibleName) {\n\t\t\ttext = `${itemsText.trim()} ${item.accessibleName} ${positionText}`;\n\t\t} else {\n\t\t\ttext = `${itemsText.trim()} ${positionText}`;\n\t\t}\n\n\t\treturn text;\n\t}\n\n\tgetCurrentLocationLabelWrapper() {\n\t\treturn this.shadowRoot!.querySelector<HTMLElement>(\".ui5-breadcrumbs-current-location > span\");\n\t}\n\n\tget _visibleItems() {\n\t\treturn this._getItems()\n\t\t\t.slice(this._overflowSize)\n\t\t\t.filter(i => this._isItemVisible(i));\n\t}\n\n\tget _endsWithCurrentLinkItem() {\n\t\tconst items = this._getItems();\n\t\treturn (items.length && items[items.length - 1].href);\n\t}\n\n\tget _endsWithCurrentLocation() {\n\t\treturn this.design === BreadcrumbsDesign.Standard;\n\t}\n\n\tget _currentLocationText() {\n\t\tconst items = this._getItems();\n\t\tif (this._endsWithCurrentLocation && items.length) {\n\t\t\tconst item = items[items.length - 1];\n\t\t\tif (this._isItemVisible(item)) {\n\t\t\t\treturn item.innerText;\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}\n\n\tget _currentLocationLabel() {\n\t\treturn this.shadowRoot!.querySelector<Label>(\".ui5-breadcrumbs-current-location [ui5-label]\");\n\t}\n\n\tget _isDropdownArrowFocused() {\n\t\treturn this._dropdownArrowLink.forcedTabIndex === \"0\";\n\t}\n\n\tget _isCurrentLocationLabelFocused() {\n\t\tconst label = this.getCurrentLocationLabelWrapper();\n\t\treturn label && label.tabIndex === 0;\n\t}\n\n\t/**\n\t * Returns the maximum allowed count of items in the overflow\n\t * with respect to the UX requirement to never overflow the last visible item\n\t */\n\tget _maxAllowedOverflowSize() {\n\t\tconst items = this._getItems().filter(item => this._isItemVisible(item));\n\t\t// all items except tha last visible one are allowed to overflow by UX requirement\n\t\treturn items.length - 1;\n\t}\n\n\t/**\n\t * Getter for the interactive element that opens the overflow\n\t * @private\n\t */\n\tget _dropdownArrowLink() {\n\t\treturn this.shadowRoot!.querySelector<Link>(\".ui5-breadcrumbs-dropdown-arrow-link-wrapper [ui5-link]\")!;\n\t}\n\n\t/**\n\t * Getter for the list of abstract breadcrumb items to be rendered as list-items inside the overflow\n\t */\n\tget _overflowItemsData() {\n\t\treturn this._getItems()\n\t\t\t.slice(0, this._overflowSize)\n\t\t\t.filter(item => this._isItemVisible(item))\n\t\t\t.reverse();\n\t}\n\n\t/**\n\t * Returns all items that should be displayed in the popover on mobile devices\n\t * @private\n\t */\n\tget _mobilePopoverItems() {\n\t\treturn this._getItems()\n\t\t\t.filter(item => this._isItemVisible(item))\n\t\t\t.reverse();\n\t}\n\n\t/**\n\t * Getter for the list of abstract breadcrumb items to be rendered as links outside the overflow\n\t */\n\tget _linksData() {\n\t\tconst items = this._visibleItems;\n\t\tconst itemsCount = items.length; // get size before removing of current location\n\n\t\tif (this._endsWithCurrentLocation && !this._endsWithCurrentLinkItem) {\n\t\t\titems.pop();\n\t\t}\n\n\t\treturn items\n\t\t\t.map((item, index) => {\n\t\t\t\titem._accessibleNameText = this._getItemAccessibleName(item, index + 1, itemsCount);\n\t\t\t\titem._isCurrentPageItem = index === (itemsCount - 1) && this._endsWithCurrentLocation;\n\t\t\t\titem._needsSeparator = !item._isCurrentPageItem;\n\t\t\t\treturn item;\n\t\t\t});\n\t}\n\n\t/**\n\t * Getter for accessible name of the current location. Includes the position of the current location and the size of the breadcrumbs\n\t */\n\tget _currentLocationAccName() {\n\t\tconst items = this._visibleItems;\n\n\t\tconst positionText = this._getItemPositionText(items.length, items.length);\n\t\tconst lastItem = items[items.length - 1];\n\n\t\tif (!lastItem) {\n\t\t\treturn positionText;\n\t\t}\n\n\t\tconst lastItemText = lastItem.textContent || \"\";\n\n\t\tif (lastItem.accessibleName) {\n\t\t\treturn `${lastItemText.trim()} ${lastItem.accessibleName} ${positionText}`;\n\t\t}\n\n\t\treturn `${lastItemText.trim()} ${positionText}`;\n\t}\n\n\t/**\n\t * Getter for the list of links corresponding to the abstract breadcrumb items\n\t */\n\tget _links() {\n\t\treturn Array.from(this.shadowRoot!.querySelectorAll<Link>(\".ui5-breadcrumbs-link-wrapper [ui5-link]\"));\n\t}\n\n\tget _isOverflowEmpty() {\n\t\treturn this._overflowItemsData.length === 0;\n\t}\n\n\tget linkAccessibilityAttributes(): Pick<AccessibilityAttributes, \"hasPopup\"> {\n\t\treturn {\n\t\t\thasPopup: this._isOverflowEmpty ? undefined : \"listbox\",\n\t\t};\n\t}\n\n\tget _isPickerOpen() {\n\t\treturn !!this.responsivePopover && this.responsivePopover.open;\n\t}\n\n\tget _accessibleNameText() {\n\t\treturn Breadcrumbs.i18nBundle.getText(BREADCRUMBS_ARIA_LABEL);\n\t}\n\n\tget _dropdownArrowAccessibleNameText() {\n\t\treturn Breadcrumbs.i18nBundle.getText(BREADCRUMBS_OVERFLOW_ARIA_LABEL);\n\t}\n\n\tget _cancelButtonText() {\n\t\treturn Breadcrumbs.i18nBundle.getText(BREADCRUMBS_CANCEL_BUTTON);\n\t}\n\tget hasOverflow() {\n\t\treturn true;\n\t}\n}\n\nBreadcrumbs.define();\n\nexport default Breadcrumbs;\nexport type {\n\tBreadcrumbsItemClickEventDetail,\n};\n"]}
1
+ {"version":3,"file":"Breadcrumbs.js","sourceRoot":"","sources":["../src/Breadcrumbs.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAC1E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,IAAI,MAAM,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AC,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAC/D,CAAC;IAED,IAAI,gCAAgC;QACnC,OAAO,aAAW,CAAC,UAAU,CAAC,OAAO,CAAC,+BAA+B,CAAC,CAAC;IACxE,CAAC;IAED,IAAI,iBAAiB;QACpB,OAAO,aAAW,CAAC,UAAU,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAClE,CAAC;IACD,IAAI,WAAW;QACd,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAA;AA1gBA;IADC,QAAQ,EAAE;2CACiC;AAQ5C;IADC,QAAQ,EAAE;+CACqC;AAQhD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;kDAC5B;AASlB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,uBAAuB,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;0CACvC;AAY9B;IADN,IAAI,CAAC,oBAAoB,CAAC;qCACG;AAnDzB,WAAW;IAtBhB,aAAa,CAAC;QACd,GAAG,EAAE,iBAAiB;QACtB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,mBAAmB;QAC7B,MAAM,EAAE,CAAC,cAAc,EAAE,qBAAqB,CAAC;KAC/C,CAAC;IACF;;;;;;;;;;OAUG;;IACF,KAAK,CAAC,YAAY,EAAE;QACpB,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,IAAI;KAChB,CAAC;GACI,WAAW,CAwhBhB;AAED,WAAW,CAAC,MAAM,EAAE,CAAC;AAErB,eAAe,WAAW,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { ChangeInfo, DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport ItemNavigation from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport type { ITabbable } from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport { locationOpen } from \"@ui5/webcomponents-base/dist/Location.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport type { AccessibilityAttributes } from \"@ui5/webcomponents-base/dist/types.js\";\nimport {\n\tisSpace,\n\tisShow,\n\tisEnter,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport NavigationMode from \"@ui5/webcomponents-base/dist/types/NavigationMode.js\";\nimport BreadcrumbsDesign from \"./types/BreadcrumbsDesign.js\";\nimport \"./BreadcrumbsItem.js\";\nimport type BreadcrumbsItem from \"./BreadcrumbsItem.js\";\nimport type BreadcrumbsSeparator from \"./types/BreadcrumbsSeparator.js\";\nimport type { IToolbarItemContent } from \"./ToolbarItem.js\";\n\nimport {\n\tBREADCRUMB_ITEM_POS,\n\tBREADCRUMBS_ARIA_LABEL,\n\tBREADCRUMBS_OVERFLOW_ARIA_LABEL,\n\tBREADCRUMBS_CANCEL_BUTTON,\n\tFORM_SELECTABLE_AVALIABLE_VALUES,\n} from \"./generated/i18n/i18n-defaults.js\";\nimport type Link from \"./Link.js\";\nimport type { LinkClickEventDetail } from \"./Link.js\";\nimport type Label from \"./Label.js\";\nimport type ResponsivePopover from \"./ResponsivePopover.js\";\nimport type { ListSelectionChangeEventDetail } from \"./List.js\";\n\n// Templates\nimport BreadcrumbsTemplate from \"./BreadcrumbsTemplate.js\";\n\n// Styles\nimport breadcrumbsCss from \"./generated/themes/Breadcrumbs.css.js\";\nimport breadcrumbsPopoverCss from \"./generated/themes/BreadcrumbsPopover.css.js\";\n\ntype BreadcrumbsItemClickEventDetail = {\n\titem: BreadcrumbsItem;\n\taltKey?: boolean;\n\tctrlKey?: boolean;\n\tmetaKey?: boolean;\n\tshiftKey?: boolean;\n}\n\ntype FocusAdaptor = ITabbable & {\n\tgetlabelWrapper: () => Element | null;\n\tforcedTabIndex: string;\n}\n\n/**\n * @class\n *\n * ### Overview\n * Enables users to navigate between items by providing a list of links to previous steps in the user's navigation path.\n * It helps the user to be aware of their location within the application and allows faster navigation.\n *\n * The last three steps can be accessed as links directly, while the remaining links prior to them are available\n * in a drop-down menu.\n *\n * You can choose the type of separator to be used from a number of predefined options.\n *\n * ### Keyboard Handling\n * The `ui5-breadcrumbs` provides advanced keyboard handling.\n *\n * - [F4], [Alt] + [Up], [Alt] + [Down], [Space], or [Enter] - If the dropdown arrow is focused - opens/closes the drop-down.\n * - [Space],[Enter] - Activates the focused item and triggers the `item-click` event.\n * - [Escape] - Closes the drop-down.\n * - [Left] - If the drop-down is closed - navigates one item to the left.\n * - [Right] - If the drop-down is closed - navigates one item to the right.\n * - [Up] - If the drop-down is open - moves focus to the next item.\n * - [Down] - If the drop-down is open - moves focus to the previous item.\n * - [Home] - Navigates to the first item.\n * - [End] - Navigates to the last item.\n * @constructor\n * @extends UI5Element\n * @implements {IToolbarItemContent}\n * @public\n * @since 1.0.0-rc.15\n */\n@customElement({\n\ttag: \"ui5-breadcrumbs\",\n\tlanguageAware: true,\n\trenderer: jsxRenderer,\n\ttemplate: BreadcrumbsTemplate,\n\tstyles: [breadcrumbsCss, breadcrumbsPopoverCss],\n})\n/**\n * Fires when a `BreadcrumbsItem` is clicked.\n *\n * **Note:** You can prevent browser location change by calling `event.preventDefault()`.\n * @param {HTMLElement} item The clicked item.\n * @param {Boolean} altKey Returns whether the \"ALT\" key was pressed when the event was triggered.\n * @param {Boolean} ctrlKey Returns whether the \"CTRL\" key was pressed when the event was triggered.\n * @param {Boolean} metaKey Returns whether the \"META\" key was pressed when the event was triggered.\n * @param {Boolean} shiftKey Returns whether the \"SHIFT\" key was pressed when the event was triggered.\n * @public\n */\n@event(\"item-click\", {\n\tbubbles: true,\n\tcancelable: true,\n})\nclass Breadcrumbs extends UI5Element implements IToolbarItemContent {\n\teventDetails!: {\n\t\t\"item-click\": BreadcrumbsItemClickEventDetail,\n\t}\n\t/**\n\t * Defines the visual appearance of the last BreadcrumbsItem.\n\t *\n\t * The Breadcrumbs supports two visual appearances for the last BreadcrumbsItem:\n\t * - \"Standard\" - displaying the last item as \"current page\" (bold and without separator)\n\t * - \"NoCurrentPage\" - displaying the last item as a regular BreadcrumbsItem, followed by separator\n\t * @default \"Standard\"\n\t * @public\n\t*/\n\t@property()\n\tdesign: `${BreadcrumbsDesign}` = \"Standard\";\n\n\t/**\n\t * Determines the visual style of the separator between the breadcrumb items.\n\t * @default \"Slash\"\n\t * @public\n\t */\n\t@property()\n\tseparators: `${BreadcrumbsSeparator}` = \"Slash\";\n\n\t/**\n\t * Holds the number of items in the overflow.\n\t * @default 0\n\t * @private\n\t */\n\t@property({ type: Number, noAttribute: true })\n\t_overflowSize = 0;\n\n\t/**\n\t * Defines the component items.\n\t *\n\t * **Note:** Use the `ui5-breadcrumbs-item` component to define the desired items.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, invalidateOnChildChange: true, \"default\": true })\n\titems!: DefaultSlot<BreadcrumbsItem>;\n\n\t_itemNavigation: ItemNavigation\n\t_onResizeHandler: ResizeObserverCallback;\n\n\t// maps items to their widths\n\t_breadcrumbItemWidths = new WeakMap<BreadcrumbsItem, number>();\n\t// the width of the interactive element that opens the overflow\n\t_dropdownArrowLinkWidth = 0;\n\t_labelFocusAdaptor: FocusAdaptor;\n\tresponsivePopover?: ResponsivePopover;\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._itemNavigation = new ItemNavigation(this, {\n\t\t\tnavigationMode: NavigationMode.Auto,\n\t\t\tgetItemsCallback: () => this._getFocusableItems(),\n\t\t});\n\n\t\tthis._onResizeHandler = this._updateOverflow.bind(this);\n\n\t\tthis._labelFocusAdaptor = {\n\t\t\tid: `${this._id}-labelWrapper`,\n\t\t\tgetlabelWrapper: this.getCurrentLocationLabelWrapper.bind(this),\n\t\t\tset forcedTabIndex(value: string) {\n\t\t\t\tconst wrapper = this.getlabelWrapper();\n\t\t\t\twrapper && wrapper.setAttribute(\"tabindex\", value);\n\t\t\t},\n\t\t\tget forcedTabIndex() {\n\t\t\t\tconst wrapper = this.getlabelWrapper();\n\t\t\t\treturn wrapper?.getAttribute(\"tabindex\") || \"\";\n\t\t\t},\n\t\t};\n\t}\n\n\tonInvalidation(changeInfo: ChangeInfo) {\n\t\tif (changeInfo.reason === \"childchange\") {\n\t\t\tconst itemIndex = this._getItems().indexOf(changeInfo.child as BreadcrumbsItem),\n\t\t\t\tisInOverflow = itemIndex < this._overflowSize;\n\t\t\tif (isInOverflow) {\n\t\t\t\t// the content of an overflowing item has changed\n\t\t\t\t// => need to render the item outside the overflow to obtain its new width\n\t\t\t\t// => lower-down the `_overfowSize` to exclude that item from the overflow\n\t\t\t\tthis._overflowSize = itemIndex;\n\t\t\t}\n\t\t}\n\t}\n\n\t_getItems() {\n\t\treturn this.getSlottedNodes<BreadcrumbsItem>(\"items\");\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._preprocessItems();\n\t}\n\n\tasync onAfterRendering() {\n\t\tawait renderFinished();\n\n\t\tthis._cacheWidths();\n\t\tthis._updateOverflow();\n\t}\n\n\tonEnterDOM() {\n\t\tResizeHandler.register(this, this._onResizeHandler);\n\t}\n\n\tonExitDOM() {\n\t\tResizeHandler.deregister(this, this._onResizeHandler);\n\t}\n\n\t_initItemNavigation() {\n\t\tif (!this._itemNavigation) {\n\t\t\tthis._itemNavigation = new ItemNavigation(this, {\n\t\t\t\tnavigationMode: NavigationMode.Auto,\n\t\t\t\tgetItemsCallback: () => this._getFocusableItems(),\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Obtains the items for navigation via keyboard\n\t * @private\n\t */\n\t_getFocusableItems() {\n\t\tconst items: Array<ITabbable> = this._links;\n\n\t\tif (!this._isOverflowEmpty) {\n\t\t\titems.unshift(this._dropdownArrowLink);\n\t\t}\n\n\t\tif (this._endsWithCurrentLocation && !this._endsWithCurrentLinkItem) {\n\t\t\titems.push(this._labelFocusAdaptor);\n\t\t}\n\n\t\treturn items;\n\t}\n\n\tgetFocusDomRef() {\n\t\treturn this._itemNavigation._getCurrentItem();\n\t}\n\n\t/**\n\t * Returns the translatable accessible name for the popover\n\t * @private\n\t */\n\tget _accessibleNamePopover() {\n\t\treturn Breadcrumbs.i18nBundle.getText(FORM_SELECTABLE_AVALIABLE_VALUES);\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tconst target = e.target,\n\t\t\tlabelWrapper = this.getCurrentLocationLabelWrapper(),\n\t\t\tcurrentItem = (target === labelWrapper) ? this._labelFocusAdaptor : target as Link;\n\n\t\tthis._itemNavigation.setCurrentItem(currentItem);\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tconst isDropdownArrowFocused = this._isDropdownArrowFocused;\n\n\t\tif (isShow(e) && isDropdownArrowFocused && !this._isOverflowEmpty) {\n\t\t\te.preventDefault();\n\t\t\tthis._toggleRespPopover();\n\t\t\treturn;\n\t\t}\n\t\tif (isSpace(e) && isDropdownArrowFocused && !this._isOverflowEmpty && !this._isPickerOpen) {\n\t\t\te.preventDefault();\n\t\t\treturn;\n\t\t}\n\t\tif ((isEnter(e) || isSpace(e)) && this._isCurrentLocationLabelFocused) {\n\t\t\tthis._onLabelPress(e);\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (this._isDropdownArrowFocused && isSpace(e) && !this._isOverflowEmpty && !this._isPickerOpen) {\n\t\t\tthis._openRespPopover();\n\t\t}\n\t}\n\n\t/**\n\t * Caches the space required to render the content\n\t * @private\n\t */\n\t_cacheWidths() {\n\t\tconst map = this._breadcrumbItemWidths,\n\t\t\t items = this._getItems(),\n\t\t\t label = this._currentLocationLabel;\n\n\t\tfor (let i = this._overflowSize; i < items.length; i++) {\n\t\t\tconst item = items[i],\n\t\t\t\tlink = this.shadowRoot!.querySelector<HTMLElement>(`#${item._id}-link-wrapper`)!;\n\t\t\tmap.set(item, this._getElementWidth(link));\n\t\t}\n\n\t\tif (items.length && this._endsWithCurrentLocation && label) {\n\t\t\tconst item = items[items.length - 1];\n\n\t\t\tmap.set(item, this._getElementWidth(label));\n\t\t}\n\n\t\tif (!this._isOverflowEmpty) {\n\t\t\tconst arrow = this.shadowRoot!.querySelector<HTMLElement>(\".ui5-breadcrumbs-dropdown-arrow-link-wrapper\")!;\n\t\t\tthis._dropdownArrowLinkWidth = this._getElementWidth(arrow);\n\t\t}\n\t}\n\n\t_updateOverflow() {\n\t\tconst items = this._getItems(),\n\t\t\tavailableWidth = this.shadowRoot!.querySelector<HTMLElement>(\".ui5-breadcrumbs-root\")!.offsetWidth;\n\t\tlet requiredWidth = this._getTotalContentWidth(),\n\t\t\toverflowSize = 0;\n\n\t\tif (requiredWidth > availableWidth) {\n\t\t\t// need to show the component that opens the overflow\n\t\t\trequiredWidth += this._dropdownArrowLinkWidth;\n\t\t}\n\n\t\twhile ((requiredWidth >= availableWidth) && (overflowSize < this._maxAllowedOverflowSize)) {\n\t\t\tconst itemToOverflow = items[overflowSize];\n\t\t\tlet itemWidth = 0;\n\n\t\t\tif (this._isItemVisible(itemToOverflow)) {\n\t\t\t\titemWidth = this._breadcrumbItemWidths.get(itemToOverflow) || 0;\n\t\t\t}\n\n\t\t\t// move the item to the overflow\n\t\t\trequiredWidth -= itemWidth;\n\t\t\toverflowSize++;\n\t\t}\n\n\t\tthis._overflowSize = overflowSize;\n\n\t\t// if overflow was emptied while picker was open => close redundant popup\n\t\tif (this._isOverflowEmpty && this._isPickerOpen) {\n\t\t\tthis.responsivePopover!.open = false;\n\t\t}\n\n\t\t// if the last focused link has done into the overflow =>\n\t\t// ensure the first visible link is focusable\n\t\tconst focusableItems = this._getFocusableItems();\n\t\tif (!focusableItems.some(x => x.forcedTabIndex === \"0\")) {\n\t\t\tthis._itemNavigation.setCurrentItem(focusableItems[0]);\n\t\t}\n\t}\n\n\t_getElementWidth(element: HTMLElement) {\n\t\tif (element) {\n\t\t\treturn Math.ceil(element.getBoundingClientRect().width);\n\t\t}\n\n\t\treturn 0;\n\t}\n\n\t_getTotalContentWidth() {\n\t\tconst items = this._getItems(),\n\t\t\twidthsMap = this._breadcrumbItemWidths,\n\t\t\ttotalLinksWidth = items.reduce((sum, link) => sum + widthsMap.get(link)!, 0);\n\n\t\treturn totalLinksWidth;\n\t}\n\n\t_onLinkPress(e: CustomEvent<LinkClickEventDetail>) {\n\t\tconst link = e.target as Link,\n\t\t\titems = this._getItems(),\n\t\t\titem = items.find(x => `${x._id}-link` === link.id)!,\n\t\t\t{\n\t\t\t\taltKey,\n\t\t\t\tctrlKey,\n\t\t\t\tmetaKey,\n\t\t\t\tshiftKey,\n\t\t\t} = e.detail;\n\n\t\tif (!this.fireDecoratorEvent(\"item-click\", {\n\t\t\titem,\n\t\t\taltKey,\n\t\t\tctrlKey,\n\t\t\tmetaKey,\n\t\t\tshiftKey,\n\t\t})) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_onLabelPress(e: MouseEvent | KeyboardEvent) {\n\t\tconst items = this._getItems(),\n\t\t\titem = items[items.length - 1],\n\t\t\t{\n\t\t\t\taltKey,\n\t\t\t\tctrlKey,\n\t\t\t\tmetaKey,\n\t\t\t\tshiftKey,\n\t\t\t} = e;\n\n\t\tthis.fireDecoratorEvent(\"item-click\", {\n\t\t\titem,\n\t\t\taltKey,\n\t\t\tctrlKey,\n\t\t\tmetaKey,\n\t\t\tshiftKey,\n\t\t});\n\t}\n\n\t_onOverflowListItemSelect(e: CustomEvent<ListSelectionChangeEventDetail>) {\n\t\tconst listItem = e.detail.selectedItems[0],\n\t\t\titems = this._getItems(),\n\t\t\titem = items.find(x => `${x._id}-li` === listItem.id)!;\n\n\t\tif (this.fireDecoratorEvent(\"item-click\", { item })) {\n\t\t\tlocationOpen(item.href, item.target || \"_self\", \"noopener,noreferrer\");\n\t\t\tthis.responsivePopover!.open = false;\n\t\t}\n\t}\n\n\t_respPopover() {\n\t\treturn this.shadowRoot!.querySelector<ResponsivePopover>(\"[ui5-responsive-popover]\")!;\n\t}\n\n\t_toggleRespPopover() {\n\t\tthis.responsivePopover = this._respPopover();\n\n\t\tif (this._isPickerOpen) {\n\t\t\tthis._closeRespPopover();\n\t\t} else {\n\t\t\tthis._openRespPopover();\n\t\t}\n\t}\n\n\t_closeRespPopover() {\n\t\tif (this.responsivePopover) {\n\t\t\tthis.responsivePopover.open = false;\n\t\t}\n\t}\n\n\t_openRespPopover() {\n\t\tthis.responsivePopover = this._respPopover();\n\t\tthis.responsivePopover.opener = this._dropdownArrowLink;\n\t\tthis.responsivePopover.open = true;\n\t}\n\n\t_isItemVisible(item: BreadcrumbsItem) {\n\t\treturn !item.hidden && this._hasVisibleContent(item);\n\t}\n\n\t_hasVisibleContent(item: BreadcrumbsItem) {\n\t\t// the check is not complete but may be extended in the future if needed to cover\n\t\t// cases besides the standard (UX-recommended) ones\n\t\treturn item.innerText || Array.from(item.children).some(child => !(child as HTMLElement).hidden);\n\t}\n\n\t_preprocessItems() {\n\t\tthis.items.forEach(item => {\n\t\t\titem._getRealDomRef = () => this.getDomRef()!.querySelector(`[data-ui5-stable*=${item.stableDomRef}]`)!;\n\t\t});\n\t}\n\n\t_getItemPositionText(position: number, size: number) {\n\t\treturn Breadcrumbs.i18nBundle.getText(BREADCRUMB_ITEM_POS, position, size);\n\t}\n\n\t_getItemAccessibleName(item: BreadcrumbsItem, position: number, size: number) {\n\t\tconst positionText = this._getItemPositionText(position, size);\n\t\tconst itemsText = item.textContent || \"\";\n\n\t\t// innerText is needed as it is no longer read out when label is set\n\t\tlet text = \"\";\n\t\tif (item.accessibleName) {\n\t\t\ttext = `${itemsText.trim()} ${item.accessibleName} ${positionText}`;\n\t\t} else {\n\t\t\ttext = `${itemsText.trim()} ${positionText}`;\n\t\t}\n\n\t\treturn text;\n\t}\n\n\tgetCurrentLocationLabelWrapper() {\n\t\treturn this.shadowRoot!.querySelector<HTMLElement>(\".ui5-breadcrumbs-current-location > span\");\n\t}\n\n\tget _visibleItems() {\n\t\treturn this._getItems()\n\t\t\t.slice(this._overflowSize)\n\t\t\t.filter(i => this._isItemVisible(i));\n\t}\n\n\tget _endsWithCurrentLinkItem() {\n\t\tconst items = this._getItems();\n\t\treturn (items.length && items[items.length - 1].href);\n\t}\n\n\tget _endsWithCurrentLocation() {\n\t\treturn this.design === BreadcrumbsDesign.Standard;\n\t}\n\n\tget _currentLocationText() {\n\t\tconst items = this._getItems();\n\t\tif (this._endsWithCurrentLocation && items.length) {\n\t\t\tconst item = items[items.length - 1];\n\t\t\tif (this._isItemVisible(item)) {\n\t\t\t\treturn item.innerText;\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}\n\n\tget _currentLocationLabel() {\n\t\treturn this.shadowRoot!.querySelector<Label>(\".ui5-breadcrumbs-current-location [ui5-label]\");\n\t}\n\n\tget _isDropdownArrowFocused() {\n\t\treturn this._dropdownArrowLink.forcedTabIndex === \"0\";\n\t}\n\n\tget _isCurrentLocationLabelFocused() {\n\t\tconst label = this.getCurrentLocationLabelWrapper();\n\t\treturn label && label.tabIndex === 0;\n\t}\n\n\t/**\n\t * Returns the maximum allowed count of items in the overflow\n\t * with respect to the UX requirement to never overflow the last visible item\n\t */\n\tget _maxAllowedOverflowSize() {\n\t\tconst items = this._getItems().filter(item => this._isItemVisible(item));\n\t\t// all items except tha last visible one are allowed to overflow by UX requirement\n\t\treturn items.length - 1;\n\t}\n\n\t/**\n\t * Getter for the interactive element that opens the overflow\n\t * @private\n\t */\n\tget _dropdownArrowLink() {\n\t\treturn this.shadowRoot!.querySelector<Link>(\".ui5-breadcrumbs-dropdown-arrow-link-wrapper [ui5-link]\")!;\n\t}\n\n\t/**\n\t * Getter for the list of abstract breadcrumb items to be rendered as list-items inside the overflow\n\t */\n\tget _overflowItemsData() {\n\t\treturn this._getItems()\n\t\t\t.slice(0, this._overflowSize)\n\t\t\t.filter(item => this._isItemVisible(item))\n\t\t\t.reverse();\n\t}\n\n\t/**\n\t * Returns all items that should be displayed in the popover on mobile devices\n\t * @private\n\t */\n\tget _mobilePopoverItems() {\n\t\treturn this._getItems()\n\t\t\t.filter(item => this._isItemVisible(item))\n\t\t\t.reverse();\n\t}\n\n\t/**\n\t * Getter for the list of abstract breadcrumb items to be rendered as links outside the overflow\n\t */\n\tget _linksData() {\n\t\tconst items = this._visibleItems;\n\t\tconst itemsCount = items.length; // get size before removing of current location\n\n\t\tif (this._endsWithCurrentLocation && !this._endsWithCurrentLinkItem) {\n\t\t\titems.pop();\n\t\t}\n\n\t\treturn items\n\t\t\t.map((item, index) => {\n\t\t\t\titem._accessibleNameText = this._getItemAccessibleName(item, index + 1, itemsCount);\n\t\t\t\titem._isCurrentPageItem = index === (itemsCount - 1) && this._endsWithCurrentLocation;\n\t\t\t\titem._needsSeparator = !item._isCurrentPageItem;\n\t\t\t\treturn item;\n\t\t\t});\n\t}\n\n\t/**\n\t * Getter for accessible name of the current location. Includes the position of the current location and the size of the breadcrumbs\n\t */\n\tget _currentLocationAccName() {\n\t\tconst items = this._visibleItems;\n\n\t\tconst positionText = this._getItemPositionText(items.length, items.length);\n\t\tconst lastItem = items[items.length - 1];\n\n\t\tif (!lastItem) {\n\t\t\treturn positionText;\n\t\t}\n\n\t\tconst lastItemText = lastItem.textContent || \"\";\n\n\t\tif (lastItem.accessibleName) {\n\t\t\treturn `${lastItemText.trim()} ${lastItem.accessibleName} ${positionText}`;\n\t\t}\n\n\t\treturn `${lastItemText.trim()} ${positionText}`;\n\t}\n\n\t/**\n\t * Getter for the list of links corresponding to the abstract breadcrumb items\n\t */\n\tget _links() {\n\t\treturn Array.from(this.shadowRoot!.querySelectorAll<Link>(\".ui5-breadcrumbs-link-wrapper [ui5-link]\"));\n\t}\n\n\tget _isOverflowEmpty() {\n\t\treturn this._overflowItemsData.length === 0;\n\t}\n\n\tget linkAccessibilityAttributes(): Pick<AccessibilityAttributes, \"hasPopup\"> {\n\t\treturn {\n\t\t\thasPopup: this._isOverflowEmpty ? undefined : \"listbox\",\n\t\t};\n\t}\n\n\tget _isPickerOpen() {\n\t\treturn !!this.responsivePopover && this.responsivePopover.open;\n\t}\n\n\tget _accessibleNameText() {\n\t\treturn Breadcrumbs.i18nBundle.getText(BREADCRUMBS_ARIA_LABEL);\n\t}\n\n\tget _dropdownArrowAccessibleNameText() {\n\t\treturn Breadcrumbs.i18nBundle.getText(BREADCRUMBS_OVERFLOW_ARIA_LABEL);\n\t}\n\n\tget _cancelButtonText() {\n\t\treturn Breadcrumbs.i18nBundle.getText(BREADCRUMBS_CANCEL_BUTTON);\n\t}\n\tget hasOverflow() {\n\t\treturn true;\n\t}\n}\n\nBreadcrumbs.define();\n\nexport default Breadcrumbs;\nexport type {\n\tBreadcrumbsItemClickEventDetail,\n};\n"]}
package/dist/Toolbar.d.ts CHANGED
@@ -5,7 +5,7 @@ import "@ui5/webcomponents-icons/dist/overflow.js";
5
5
  import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
6
6
  import type ToolbarAlign from "./types/ToolbarAlign.js";
7
7
  import type ToolbarDesign from "./types/ToolbarDesign.js";
8
- import type ToolbarItem from "./ToolbarItem.js";
8
+ import type ToolbarItemBase from "./ToolbarItemBase.js";
9
9
  import type Button from "./Button.js";
10
10
  import type Popover from "./Popover.js";
11
11
  type ToolbarMinWidthChangeEventDetail = {
@@ -86,10 +86,10 @@ declare class Toolbar extends UI5Element {
86
86
  * **Note:** Currently only `ui5-toolbar-button`, `ui5-toolbar-select`, `ui5-toolbar-separator` and `ui5-toolbar-spacer` are allowed here.
87
87
  * @public
88
88
  */
89
- items: DefaultSlot<ToolbarItem>;
89
+ items: DefaultSlot<ToolbarItemBase>;
90
90
  _onResize: ResizeObserverCallback;
91
91
  _onCloseOverflow: EventListener;
92
- itemsToOverflow: Array<ToolbarItem>;
92
+ itemsToOverflow: Array<ToolbarItemBase>;
93
93
  itemsWidth: number;
94
94
  minContentWidth: number;
95
95
  ITEMS_WIDTH_MAP: Map<string, number>;
@@ -100,12 +100,12 @@ declare class Toolbar extends UI5Element {
100
100
  */
101
101
  get overflowButtonSize(): number;
102
102
  get padding(): number;
103
- get alwaysOverflowItems(): ToolbarItem[];
104
- get movableItems(): ToolbarItem[];
105
- get overflowItems(): ToolbarItem[];
106
- get standardItems(): ToolbarItem[];
103
+ get alwaysOverflowItems(): ToolbarItemBase[];
104
+ get movableItems(): ToolbarItemBase[];
105
+ get overflowItems(): ToolbarItemBase[];
106
+ get standardItems(): ToolbarItemBase[];
107
107
  get hideOverflowButton(): boolean;
108
- get interactiveItems(): ToolbarItem[];
108
+ get interactiveItems(): ToolbarItemBase[];
109
109
  /**
110
110
  * Accessibility
111
111
  */
@@ -142,7 +142,7 @@ declare class Toolbar extends UI5Element {
142
142
  onInvalidation(changeInfo: ChangeInfo): void;
143
143
  onBeforeRendering(): void;
144
144
  onAfterRendering(): Promise<void>;
145
- addItemsAdditionalProperties(item: ToolbarItem): void;
145
+ addItemsAdditionalProperties(item: ToolbarItemBase): void;
146
146
  /**
147
147
  * Returns if the overflow popup is open.
148
148
  * @public
@@ -160,7 +160,7 @@ declare class Toolbar extends UI5Element {
160
160
  distributeItems(overflowSpace?: number): void;
161
161
  distributeItemsThatAlwaysOverflow(): void;
162
162
  setSeperatorsVisibilityInOverflow(): void;
163
- shouldShowSeparatorInOverflow(separatorIdx: number, overflowItems: Array<ToolbarItem>): boolean;
163
+ shouldShowSeparatorInOverflow(separatorIdx: number, overflowItems: Array<ToolbarItemBase>): boolean;
164
164
  /**
165
165
  * Adds AlwaysOverflow items to overflow to ensure they are never rendered outside overflow (and visual flash is prevented)
166
166
  */
@@ -177,7 +177,7 @@ declare class Toolbar extends UI5Element {
177
177
  attachListeners(): void;
178
178
  detachListeners(): void;
179
179
  onToolbarItemChange(): void;
180
- getItemWidth(item: ToolbarItem): number;
180
+ getItemWidth(item: ToolbarItemBase): number;
181
181
  getCachedItemWidth(id: string): number | undefined;
182
182
  }
183
183
  export default Toolbar;
package/dist/Toolbar.js CHANGED
@@ -96,10 +96,10 @@ let Toolbar = Toolbar_1 = class Toolbar extends UI5Element {
96
96
  + calculateCSSREMValue(toolbarComputedStyle, "--_ui5-toolbar-padding-right");
97
97
  }
98
98
  get alwaysOverflowItems() {
99
- return this.items.filter((item) => item.overflowPriority === ToolbarItemOverflowBehavior.AlwaysOverflow);
99
+ return this.items.filter(item => item.overflowPriority === ToolbarItemOverflowBehavior.AlwaysOverflow);
100
100
  }
101
101
  get movableItems() {
102
- return this.items.filter((item) => item.overflowPriority !== ToolbarItemOverflowBehavior.AlwaysOverflow && item.overflowPriority !== ToolbarItemOverflowBehavior.NeverOverflow);
102
+ return this.items.filter(item => item.overflowPriority !== ToolbarItemOverflowBehavior.AlwaysOverflow && item.overflowPriority !== ToolbarItemOverflowBehavior.NeverOverflow);
103
103
  }
104
104
  get overflowItems() {
105
105
  // spacers are ignored
@@ -257,7 +257,7 @@ let Toolbar = Toolbar_1 = class Toolbar extends UI5Element {
257
257
  }
258
258
  storeItemsWidth() {
259
259
  let totalWidth = 0, minWidth = 0;
260
- this.items.forEach((item) => {
260
+ this.items.forEach(item => {
261
261
  const itemWidth = this.getItemWidth(item);
262
262
  totalWidth += itemWidth;
263
263
  if (item.overflowPriority === ToolbarItemOverflowBehavior.NeverOverflow) {
@@ -1 +1 @@
1
- {"version":3,"file":"Toolbar.js","sourceRoot":"","sources":["../src/Toolbar.ts"],"names":[],"mappings":";;;;;;;A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AM,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\tToolbarMinWidthChangeEventDetail,\n};\n"]}
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,Q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Slot } 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"]}
@@ -1,6 +1,8 @@
1
1
  import type { ButtonAccessibilityAttributes } from "./Button.js";
2
2
  import type ButtonDesign from "./types/ButtonDesign.js";
3
- import ToolbarItem from "./ToolbarItem.js";
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 ToolbarItem
18
+ * @extends ToolbarItemBase
17
19
  * @public
18
20
  * @since 1.17.0
19
21
  */
20
- declare class ToolbarButton extends ToolbarItem {
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
  *
@@ -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 ToolbarItem from "./ToolbarItem.js";
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 ToolbarItem
25
+ * @extends ToolbarItemBase
26
26
  * @public
27
27
  * @since 1.17.0
28
28
  */
29
- let ToolbarButton = class ToolbarButton extends ToolbarItem {
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;AAI5E,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,qBAAqB,MAAM,4BAA4B,CAAC;AAC/D,OAAO,gBAAgB,MAAM,yCAAyC,CAAC;AAIvE;;;;;;;;;;;;;;GAcG;AAoBH,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,WAAW;IAAvC;;QACC;;;;;;WAMG;QAEH,aAAQ,GAAG,KAAK,CAAC;Q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;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;AA3HV,aAAa;IAnBlB,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;GACI,aAAa,CAwKlB;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\";\n\nimport ToolbarItem from \"./ToolbarItem.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 ToolbarItem\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})\nclass ToolbarButton extends ToolbarItem {\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"]}
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;QAuDtC;;;;;;;;;;;;;;;;WAgBG;QAEH,4BAAuB,G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gBb;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"]}