@ui5/webcomponents-fiori 2.24.0-rc.0 → 2.24.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/BarcodeScannerDialog.d.ts +4 -2
- package/dist/BarcodeScannerDialog.js +4 -2
- package/dist/BarcodeScannerDialog.js.map +1 -1
- package/dist/DynamicPage.js +17 -6
- package/dist/DynamicPage.js.map +1 -1
- package/dist/IllustratedMessageTemplate.js +1 -1
- package/dist/IllustratedMessageTemplate.js.map +1 -1
- package/dist/Search.d.ts +1 -0
- package/dist/Search.js +1 -0
- package/dist/Search.js.map +1 -1
- package/dist/SearchPopoverTemplate.js +1 -1
- package/dist/SearchPopoverTemplate.js.map +1 -1
- package/dist/ShellBar.d.ts +9 -0
- package/dist/ShellBar.js +15 -4
- package/dist/ShellBar.js.map +1 -1
- package/dist/ShellBarItem.d.ts +2 -0
- package/dist/ShellBarItem.js +5 -0
- package/dist/ShellBarItem.js.map +1 -1
- package/dist/ShellBarTemplate.js +1 -1
- package/dist/ShellBarTemplate.js.map +1 -1
- package/dist/Timeline.d.ts +3 -3
- package/dist/Timeline.js +1 -1
- package/dist/Timeline.js.map +1 -1
- package/dist/UserMenu.d.ts +10 -0
- package/dist/UserMenu.js +6 -0
- package/dist/UserMenu.js.map +1 -1
- package/dist/UserMenuTemplate.js +2 -1
- package/dist/UserMenuTemplate.js.map +1 -1
- package/dist/css/themes/HeroBanner.css +1 -1
- package/dist/css/themes/IllustratedMessage.css +1 -1
- package/dist/css/themes/Search.css +1 -1
- package/dist/css/themes/UserMenu.css +1 -1
- package/dist/css/themes/sap_fiori_3/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_auto/parameters-bundle.css +1 -12
- package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -12
- package/dist/css/themes/sap_horizon_dark_exp/parameters-bundle.css +0 -12
- package/dist/css/themes/sap_horizon_exp/parameters-bundle.css +0 -12
- package/dist/css/themes/sap_horizon_hc_auto/parameters-bundle.css +1 -12
- package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -12
- package/dist/css/themes/sap_horizon_hcb_exp/parameters-bundle.css +0 -12
- package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -12
- package/dist/css/themes/sap_horizon_hcw_exp/parameters-bundle.css +0 -12
- package/dist/custom-elements-internal.json +39 -10
- package/dist/custom-elements.json +23 -7
- package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_auto/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hc_auto/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/themes/HeroBanner.css.d.ts +1 -1
- package/dist/generated/themes/HeroBanner.css.js +1 -1
- package/dist/generated/themes/HeroBanner.css.js.map +1 -1
- package/dist/generated/themes/IllustratedMessage.css.d.ts +1 -1
- package/dist/generated/themes/IllustratedMessage.css.js +1 -1
- package/dist/generated/themes/IllustratedMessage.css.js.map +1 -1
- package/dist/generated/themes/Search.css.d.ts +1 -1
- package/dist/generated/themes/Search.css.js +1 -1
- package/dist/generated/themes/Search.css.js.map +1 -1
- package/dist/generated/themes/UserMenu.css.d.ts +1 -1
- package/dist/generated/themes/UserMenu.css.js +1 -1
- package/dist/generated/themes/UserMenu.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js +1 -12
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -12
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark_exp/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_dark_exp/parameters-bundle.css.js +0 -12
- package/dist/generated/themes/sap_horizon_dark_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js +0 -12
- package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.js +1 -12
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -12
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb_exp/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcb_exp/parameters-bundle.css.js +0 -12
- package/dist/generated/themes/sap_horizon_hcb_exp/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -12
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw_exp/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcw_exp/parameters-bundle.css.js +0 -12
- package/dist/generated/themes/sap_horizon_hcw_exp/parameters-bundle.css.js.map +1 -1
- package/dist/vscode.html-custom-data.json +3 -3
- package/dist/web-types.json +14 -6
- package/package.json +7 -7
- package/src/IllustratedMessageTemplate.tsx +1 -1
- package/src/SearchPopoverTemplate.tsx +1 -0
- package/src/ShellBarTemplate.tsx +1 -1
- package/src/UserMenuTemplate.tsx +6 -0
- package/src/themes/HeroBanner.css +22 -19
- package/src/themes/IllustratedMessage.css +14 -14
- package/src/themes/Search.css +1 -0
- package/src/themes/UserMenu.css +19 -1
- package/src/themes/base/HeroBanner-parameters.css +0 -1
- package/src/themes/base/Search-parameters.css +1 -0
- package/src/themes/sap_fiori_3/parameters-bundle.css +0 -1
- package/src/themes/sap_fiori_3_dark/parameters-bundle.css +0 -1
- package/src/themes/sap_fiori_3_hcb/parameters-bundle.css +0 -1
- package/src/themes/sap_fiori_3_hcw/parameters-bundle.css +0 -1
- package/src/themes/sap_horizon/parameters-bundle.css +0 -1
- package/src/themes/sap_horizon_dark/parameters-bundle.css +0 -1
- package/src/themes/sap_horizon_dark_exp/parameters-bundle.css +0 -1
- package/src/themes/sap_horizon_exp/parameters-bundle.css +0 -1
- package/src/themes/sap_horizon_hcb/parameters-bundle.css +0 -1
- package/src/themes/sap_horizon_hcb_exp/parameters-bundle.css +0 -1
- package/src/themes/sap_horizon_hcw/parameters-bundle.css +0 -1
- package/src/themes/sap_horizon_hcw_exp/parameters-bundle.css +0 -1
- package/src/themes/base/IllustratedMessage-parameters.css +0 -13
package/dist/ShellBarItem.js
CHANGED
|
@@ -9,6 +9,7 @@ import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
|
9
9
|
import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
|
|
10
10
|
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
11
11
|
import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
|
|
12
|
+
import createInstanceChecker from "@ui5/webcomponents-base/dist/util/createInstanceChecker.js";
|
|
12
13
|
import Button from "@ui5/webcomponents/dist/Button.js";
|
|
13
14
|
import ButtonBadge from "@ui5/webcomponents/dist/ButtonBadge.js";
|
|
14
15
|
import ListItemStandard from "@ui5/webcomponents/dist/ListItemStandard.js";
|
|
@@ -58,6 +59,9 @@ let ShellBarItem = class ShellBarItem extends UI5Element {
|
|
|
58
59
|
get stableDomRef() {
|
|
59
60
|
return this.getAttribute("stable-dom-ref") || `${this._id}-stable-dom-ref`;
|
|
60
61
|
}
|
|
62
|
+
get isShellBarItem() {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
61
65
|
hasListItems() {
|
|
62
66
|
return this.inOverflow;
|
|
63
67
|
}
|
|
@@ -110,4 +114,5 @@ ShellBarItem = __decorate([
|
|
|
110
114
|
], ShellBarItem);
|
|
111
115
|
ShellBarItem.define();
|
|
112
116
|
export default ShellBarItem;
|
|
117
|
+
export const isInstanceOfShellBarItem = createInstanceChecker("isShellBarItem");
|
|
113
118
|
//# sourceMappingURL=ShellBarItem.js.map
|
package/dist/ShellBarItem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShellBarItem.js","sourceRoot":"","sources":["../src/ShellBarItem.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,WAAW,MAAM,sDAAsD,CAAC;
|
|
1
|
+
{"version":3,"file":"ShellBarItem.js","sourceRoot":"","sources":["../src/ShellBarItem.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,aAAa,MA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AAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6DACuC;AAQlE;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDACT;AA7Dd,YAAY;IAhBjB,aAAa,CAAC;QACd,GAAG,EAAE,mBAAmB;QACxB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,oBAAoB;QAC9B,MAAM,EAAE,oBAAoB;QAC5B,YAAY,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,gBAAgB,CAAC;KACrD,CAAC;IACF;;;;OAIG;;IACF,KAAK,CAAC,OAAO,EAAE;QACf,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,IAAI;KAChB,CAAC;GACI,YAAY,CAwFjB;AAED,YAAY,CAAC,MAAM,EAAE,CAAC;AAEtB,eAAe,YAAY,CAAC;AAC5B,MAAM,CAAC,MAAM,wBAAwB,GAAG,qBAAqB,CAAe,gBAAgB,CAAC,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.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 createInstanceChecker from \"@ui5/webcomponents-base/dist/util/createInstanceChecker.js\";\nimport type { AccessibilityAttributes, UI5CustomEvent } from \"@ui5/webcomponents-base\";\nimport Button from \"@ui5/webcomponents/dist/Button.js\";\nimport ButtonBadge from \"@ui5/webcomponents/dist/ButtonBadge.js\";\nimport ListItemStandard from \"@ui5/webcomponents/dist/ListItemStandard.js\";\nimport ShellBarItemTemplate from \"./ShellBarItemTemplate.js\";\nimport shellBarV2ItemStyles from \"./generated/themes/ShellBarItem.css.js\";\n\ntype ShellBarItemClickEventDetail = {\n\ttargetRef: HTMLElement,\n};\n\ntype ShellBarItemAccessibilityAttributes = Pick<AccessibilityAttributes, \"expanded\" | \"hasPopup\" | \"controls\">;\n\n/**\n * @class\n * The `ui5-shellbar-item` represents a custom item for `ui5-shellbar`.\n *\n * ### ES6 Module Import\n * `import \"@ui5/webcomponents-fiori/dist/ShellBarItem.js\";`\n * @constructor\n * @extends UI5Element\n * @public\n */\n@customElement({\n\ttag: \"ui5-shellbar-item\",\n\trenderer: jsxRenderer,\n\ttemplate: ShellBarItemTemplate,\n\tstyles: shellBarV2ItemStyles,\n\tdependencies: [Button, ButtonBadge, ListItemStandard],\n})\n/**\n * Fired when the item is clicked.\n * @param {HTMLElement} targetRef DOM ref of the clicked element\n * @public\n */\n@event(\"click\", {\n\tbubbles: true,\n\tcancelable: true,\n})\nclass ShellBarItem extends UI5Element {\n\teventDetails!: {\n\t\tclick: ShellBarItemClickEventDetail,\n\t}\n\n\t/**\n\t * Defines the item's icon.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\ticon?: string;\n\n\t/**\n\t * Defines the item text.\n\t *\n\t * **Note:** The text is only displayed inside the overflow popover list view.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\ttext?: string;\n\n\t/**\n\t * Defines the count displayed in badge.\n\t * @default undefined\n\t * @since 1.0.0-rc.6\n\t * @public\n\t */\n\t@property()\n\tcount?: string;\n\n\t/**\n\t * Defines additional accessibility attributes on Shellbar Items.\n\t *\n\t * The accessibility attributes support the following values:\n\t *\n\t * - **expanded**: Indicates whether the button, or another grouping element it controls,\n\t * 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,\n\t * such as menu or dialog, that can be triggered by the button.\n\t *\n\t * - **controls**: Identifies the element (or elements) whose contents\n\t * or presence are controlled by the component.\n\t * Accepts a lowercase string value, referencing the ID of the element it controls.\n\t *\n\t * @default {}\n\t * @public\n\t * @since 2.9.0\n\t */\n\t@property({ type: Object })\n\taccessibilityAttributes: ShellBarItemAccessibilityAttributes = {};\n\n\t/**\n\t * Indicates if item is in overflow popover.\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tinOverflow = false;\n\n\tget stableDomRef() {\n\t\treturn this.getAttribute(\"stable-dom-ref\") || `${this._id}-stable-dom-ref`;\n\t}\n\n\tget isShellBarItem(): boolean {\n\t\treturn true;\n\t}\n\n\thasListItems() {\n\t\treturn this.inOverflow;\n\t}\n\n\tget listItems() {\n\t\tconst domRef = this.getDomRef();\n\t\tif (!domRef || !this.inOverflow) {\n\t\t\treturn [];\n\t\t}\n\t\treturn [domRef];\n\t}\n\n\tfireClickEvent(e: UI5CustomEvent<Button, \"click\">) {\n\t\treturn this.fireDecoratorEvent(\"click\", {\n\t\t\ttargetRef: (e.target as HTMLElement),\n\t\t});\n\t}\n}\n\nShellBarItem.define();\n\nexport default ShellBarItem;\nexport const isInstanceOfShellBarItem = createInstanceChecker<ShellBarItem>(\"isShellBarItem\");\nexport type { ShellBarItemClickEventDetail, ShellBarItemAccessibilityAttributes };\n"]}
|
package/dist/ShellBarTemplate.js
CHANGED
|
@@ -37,7 +37,7 @@ export default function ShellBarTemplate() {
|
|
|
37
37
|
}, children: _jsx("slot", { name: "assistant" }) })), notificationsAction && (_jsx(Button, { "data-ui5-stable": notificationsAction.stableDomRef, class: {
|
|
38
38
|
"ui5-shellbar-bell-button ui5-shellbar-action-button ui5-shellbar-gap-start": true,
|
|
39
39
|
"ui5-shellbar-hidden": this.isHidden("notifications")
|
|
40
|
-
}, icon: notificationsAction.icon, design: "Transparent", onClick: this.handleNotificationsClick, tooltip: actionsAccInfo.notifications.title, accessibilityAttributes: actionsAccInfo.notifications.accessibilityAttributes, children: notificationsAction?.count && (_jsx(ButtonBadge, { slot: "badge", design: "OverlayText", text: notificationsAction?.count })) })), this.
|
|
40
|
+
}, icon: notificationsAction.icon, design: "Transparent", onClick: this.handleNotificationsClick, tooltip: actionsAccInfo.notifications.title, accessibilityAttributes: actionsAccInfo.notifications.accessibilityAttributes, children: notificationsAction?.count && (_jsx(ButtonBadge, { slot: "badge", design: "OverlayText", text: notificationsAction?.count })) })), this._validItems.map(item => (_jsx("div", { class: {
|
|
41
41
|
"ui5-shellbar-custom-item ui5-shellbar-gap-start": true,
|
|
42
42
|
"ui5-shellbar-hidden": this.isHidden(item._id),
|
|
43
43
|
}, "data-ui5-stable": item.stableDomRef, children: !item.inOverflow ? _jsx("slot", { name: item._individualSlot }) : null }, item._id))), overflowAction && (_jsx(Button, { "data-ui5-stable": overflowAction.stableDomRef, id: "ui5-shellbar-overflow-button", class: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShellBarTemplate.js","sourceRoot":"","sources":["../src/ShellBarTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,mCAAmC,CAAC;AACvD,OAAO,WAAW,MAAM,wCAAwC,CAAC;AACjE,OAAO,OAAO,MAAM,oCAAoC,CAAC;AACzD,OAAO,IAAI,MAAM,iCAAiC,CAAC;AAEnD,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EACN,mBAAmB,EACnB,4BAA4B,EAC5B,MAAM,gDAAgD,CAAC;AAExD,OAAO,EACN,mBAAmB,IAAI,yBAAyB,EAChD,oBAAoB,IAAI,0BAA0B,EAClD,4BAA4B,IAAI,kCAAkC,GAClE,MAAM,sDAAsD,CAAC;AAE9D,OAAO,EACN,0BAA0B,GAC1B,MAAM,gDAAgD,CAAC;AAExD,MAAM,CAAC,OAAO,UAAU,gBAAgB;IACvC,MAAM,cAAc,GAAG,CAAC,IAAI,CAAC,uBAAuB,CAAC;IAErD,MAAM,mBAAmB,GAAG,cAAc,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,mBAAmB,CAAC;IAC7F,MAAM,uBAAuB,GAAG,cAAc,CAAC,CAAC,CAAC,kCAAkC,CAAC,CAAC,CAAC,4BAA4B,CAAC;IAEnH,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IACh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\"@ui5/webcomponents/dist/ButtonBadge.js\";\nimport Popover from \"@ui5/webcomponents/dist/Popover.js\";\nimport List from \"@ui5/webcomponents/dist/List.js\";\nimport type ShellBar from \"./ShellBar.js\";\nimport ShellBarItem from \"./ShellBarItem.js\";\n\nimport {\n\tShellBarSearchField,\n\tShellBarSearchFieldFullWidth\n} from \"./shellbar/templates/ShellBarSearchTemplate.js\";\n\nimport {\n\tShellBarSearchField as ShellBarSearchFieldLegacy,\n\tShellBarSearchButton as ShellBarSearchButtonLegacy,\n\tShellBarSearchFieldFullWidth as ShellBarSearchFieldFullWidthLegacy,\n} from \"./shellbar/templates/ShellBarSearchLegacyTemplate.js\";\n\nimport {\n\tShellBarLegacyBrandingArea,\n} from \"./shellbar/templates/ShellBarLegacyTemplate.js\";\n\nexport default function ShellBarTemplate(this: ShellBar) {\n\tconst isLegacySearch = !this.isSelfCollapsibleSearch;\n\n\tconst SearchInBarTemplate = isLegacySearch ? ShellBarSearchFieldLegacy : ShellBarSearchField;\n\tconst SearchFullWidthTemplate = isLegacySearch ? ShellBarSearchFieldFullWidthLegacy : ShellBarSearchFieldFullWidth;\n\n\tconst profileAction = this.getAction(\"profile\");\n\tconst overflowAction = this.getAction(\"overflow\");\n\tconst assistantAction = this.getAction(\"assistant\");\n\tconst notificationsAction = this.getAction(\"notifications\");\n\tconst productSwitchAction = this.getAction(\"products\");\n\n\tconst actionsAccInfo = this.actionsAccessibilityInfo;\n\n\treturn (\n\t\t<>\n\t\t\t<header class=\"ui5-shellbar-root\" part=\"root\" onKeyDown={this._onKeyDown} aria-label={this.texts.shellbar}>\n\t\t\t\t{/* Full-width search overlay */}\n\t\t\t\t{this.showFullWidthSearch && SearchFullWidthTemplate.call(this)}\n\n\t\t\t\t{this.enabledFeatures.startButton && (\n\t\t\t\t\t<div class=\"ui5-shellbar-start-button ui5-shellbar-gap-end\">\n\t\t\t\t\t\t<slot name=\"startButton\"></slot>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{this.enabledFeatures.branding && (\n\t\t\t\t\t<div class=\"ui5-shellbar-branding-area\">\n\t\t\t\t\t\t<slot name=\"branding\"></slot>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{/* Legacy branding (logo + primaryTitle) when no menu items */}\n\t\t\t\t{!this.enabledFeatures.branding && ShellBarLegacyBrandingArea.call(this)}\n\n\t\t\t\t<div class=\"ui5-shellbar-overflow-container\">\n\t\t\t\t\t<div class=\"ui5-shellbar-overflow-container-inner\">\n\n\t\t\t\t\t\t{this.enabledFeatures.content && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass=\"ui5-shellbar-content-area ui5-shellbar-content-items\"\n\t\t\t\t\t\t\t\trole={this.contentRole}\n\t\t\t\t\t\t\t\taria-label={this.texts.contentItems}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{/* Start separator */}\n\t\t\t\t\t\t\t\t{this.separatorConfig.showStartSeparator && (\n\t\t\t\t\t\t\t\t\t<div class=\"ui5-shellbar-separator ui5-shellbar-separator-start\"></div>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{/* Start content items */}\n\t\t\t\t\t\t\t\t{this.startContent.map(item => {\n\t\t\t\t\t\t\t\t\tconst itemId = (item as any)._individualSlot as string;\n\t\t\t\t\t\t\t\t\tconst packedSep = this.getPackedSeparatorInfo(item, true);\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tkey={itemId}\n\t\t\t\t\t\t\t\t\t\t\tid={itemId}\n\t\t\t\t\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\t\t\t\t\"ui5-shellbar-content-item ui5-shellbar-gap-start\": true,\n\t\t\t\t\t\t\t\t\t\t\t\t\"ui5-shellbar-hidden\": this.isHidden(itemId),\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{packedSep.shouldPack && (\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ui5-shellbar-separator ui5-shellbar-separator-start\"></div>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t<slot name={(item as any)._individualSlot}></slot>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t})}\n\n\t\t\t\t\t\t\t\t{/* Spacer: Grows to fill available space, used to measure if space is tight, should be in DOM always */}\n\t\t\t\t\t\t\t\t<div class=\"ui5-shellbar-spacer\"></div>\n\n\t\t\t\t\t\t\t\t{/* End content items */}\n\t\t\t\t\t\t\t\t{this.endContent.map(item => {\n\t\t\t\t\t\t\t\t\tconst itemId = (item as any)._individualSlot as string;\n\t\t\t\t\t\t\t\t\tconst packedSep = this.getPackedSeparatorInfo(item, false);\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tkey={itemId}\n\t\t\t\t\t\t\t\t\t\t\tid={itemId}\n\t\t\t\t\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\t\t\t\t\"ui5-shellbar-content-item ui5-shellbar-gap-start\": true,\n\t\t\t\t\t\t\t\t\t\t\t\t\"ui5-shellbar-hidden\": this.isHidden(itemId),\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<slot name={itemId}></slot>\n\t\t\t\t\t\t\t\t\t\t\t{packedSep.shouldPack && (\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ui5-shellbar-separator ui5-shellbar-separator-end ui5-shellbar-gap-start\"></div>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t})}\n\n\t\t\t\t\t\t\t\t{/* End separator */}\n\t\t\t\t\t\t\t\t{this.separatorConfig.showEndSeparator && (\n\t\t\t\t\t\t\t\t\t<div class=\"ui5-shellbar-separator ui5-shellbar-separator-end ui5-shellbar-gap-start\"></div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{this.enabledFeatures.search && SearchInBarTemplate.call(this)}\n\t\t\t\t\t\t{this.enabledFeatures.search && isLegacySearch && ShellBarSearchButtonLegacy.call(this)}\n\n\t\t\t\t\t\t{assistantAction && (\n\t\t\t\t\t\t\t<div class={{\n\t\t\t\t\t\t\t\t\"ui5-shellbar-assistant-button ui5-shellbar-gap-start\": true,\n\t\t\t\t\t\t\t\t\"ui5-shellbar-hidden\": this.isHidden(\"assistant\")\n\t\t\t\t\t\t\t}}>\n\t\t\t\t\t\t\t\t<slot name=\"assistant\"></slot>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{notificationsAction && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tdata-ui5-stable={notificationsAction.stableDomRef}\n\t\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\t\"ui5-shellbar-bell-button ui5-shellbar-action-button ui5-shellbar-gap-start\": true,\n\t\t\t\t\t\t\t\t\t\"ui5-shellbar-hidden\": this.isHidden(\"notifications\")\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\ticon={notificationsAction.icon}\n\t\t\t\t\t\t\t\tdesign=\"Transparent\"\n\t\t\t\t\t\t\t\tonClick={this.handleNotificationsClick}\n\t\t\t\t\t\t\t\ttooltip={actionsAccInfo.notifications.title}\n\t\t\t\t\t\t\t\taccessibilityAttributes={actionsAccInfo.notifications.accessibilityAttributes}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{notificationsAction?.count && (\n\t\t\t\t\t\t\t\t\t<ButtonBadge slot=\"badge\" design=\"OverlayText\" text={notificationsAction?.count} />\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{/* Custom Items */}\n\t\t\t\t\t\t{this.items.map(item => (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tkey={item._id}\n\t\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\t\"ui5-shellbar-custom-item ui5-shellbar-gap-start\": true,\n\t\t\t\t\t\t\t\t\t\"ui5-shellbar-hidden\": this.isHidden(item._id),\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tdata-ui5-stable={item.stableDomRef}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{!item.inOverflow ? <slot name={(item as any)._individualSlot}></slot> : null}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t))}\n\n\t\t\t\t\t\t{overflowAction && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tdata-ui5-stable={overflowAction.stableDomRef}\n\t\t\t\t\t\t\t\tid=\"ui5-shellbar-overflow-button\"\n\t\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\t\"ui5-shellbar-overflow-button ui5-shellbar-action-button ui5-shellbar-gap-start\": true,\n\t\t\t\t\t\t\t\t\t\"ui5-shellbar-hidden\": this.isHidden(\"overflow\")\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\ticon={overflowAction.icon}\n\t\t\t\t\t\t\t\tdesign=\"Transparent\"\n\t\t\t\t\t\t\t\tonClick={this.handleOverflowClick}\n\t\t\t\t\t\t\t\ttooltip={actionsAccInfo.overflow.title}\n\t\t\t\t\t\t\t\taccessibilityAttributes={actionsAccInfo.overflow.accessibilityAttributes}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this.overflowBadge && (\n\t\t\t\t\t\t\t\t\t<ButtonBadge\n\t\t\t\t\t\t\t\t\t\tslot=\"badge\"\n\t\t\t\t\t\t\t\t\t\tdesign={this.overflowBadge === \" \" ? \"AttentionDot\" : \"OverlayText\"}\n\t\t\t\t\t\t\t\t\t\ttext={this.overflowBadge === \" \" ? \"\" : this.overflowBadge}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{profileAction && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tdata-profile-btn\n\t\t\t\t\t\t\t\tdata-ui5-stable={profileAction.stableDomRef}\n\t\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\t\"ui5-shellbar-image-button ui5-shellbar-action-button ui5-shellbar-gap-start\": true,\n\t\t\t\t\t\t\t\t\t\"ui5-shellbar-hidden\": this.isHidden(\"profile\")\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tdesign=\"Transparent\"\n\t\t\t\t\t\t\t\tonClick={this.handleProfileClick}\n\t\t\t\t\t\t\t\ttooltip={actionsAccInfo.profile.title}\n\t\t\t\t\t\t\t\taccessibilityAttributes={actionsAccInfo.profile.accessibilityAttributes}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<slot name=\"profile\"></slot>\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{productSwitchAction && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tdata-ui5-stable={productSwitchAction.stableDomRef}\n\t\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\t\"ui5-shellbar-button-product-switch ui5-shellbar-action-button ui5-shellbar-gap-start\": true,\n\t\t\t\t\t\t\t\t\t\"ui5-shellbar-hidden\": this.isHidden(\"products\")\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\ticon={productSwitchAction.icon}\n\t\t\t\t\t\t\t\tdesign=\"Transparent\"\n\t\t\t\t\t\t\t\tonClick={this.handleProductSwitchClick}\n\t\t\t\t\t\t\t\ttooltip={actionsAccInfo.products.title}\n\t\t\t\t\t\t\t\taccessibilityAttributes={actionsAccInfo.products.accessibilityAttributes}\n\t\t\t\t\t\t\t></Button>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</header>\n\n\t\t\t{/* Overflow Popover */}\n\t\t\t<Popover\n\t\t\t\tclass=\"ui5-shellbar-overflow-popover\"\n\t\t\t\topen={this.overflowPopoverOpen}\n\t\t\t\tonClose={this.onPopoverClose}\n\t\t\t\topener=\"ui5-shellbar-overflow-button\"\n\t\t\t\tplacement=\"Bottom\"\n\t\t\t\thideArrow={true}\n\t\t\t\thorizontalAlign={this.popoverHorizontalAlign} // TODO: add test\n\t\t\t>\n\t\t\t\t<List separators=\"None\" onClick={this.handleOverflowItemClick}>\n\t\t\t\t\t{this.overflowItems.map(item => {\n\t\t\t\t\t\tif (item.type === \"action\") {\n\t\t\t\t\t\t\tconst actionData = item.data;\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<ShellBarItem\n\t\t\t\t\t\t\t\t\tkey={item.id}\n\t\t\t\t\t\t\t\t\ticon={actionData.icon ? `sap-icon://${actionData.icon}` : \"\"}\n\t\t\t\t\t\t\t\t\tdata-action-id={item.id}\n\t\t\t\t\t\t\t\t\tcount={actionData.count}\n\t\t\t\t\t\t\t\t\tinOverflow={true}\n\t\t\t\t\t\t\t\t\ttext={this.getActionOverflowText(item.id)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn <slot key={item.id} name={item.data._individualSlot}></slot>;\n\t\t\t\t\t})}\n\t\t\t\t</List>\n\t\t\t</Popover>\n\t\t</>\n\t);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ShellBarTemplate.js","sourceRoot":"","sources":["../src/ShellBarTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,mCAAmC,CAAC;AACvD,OAAO,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AC,uBAAuB,YAC3D,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;wBAC9B,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;4BAC5B,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC;4BAC7B,OAAO,CACN,KAAC,YAAY,IAEZ,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,oBAC5C,IAAI,CAAC,EAAE,EACvB,KAAK,EAAE,UAAU,CAAC,KAAK,EACvB,UAAU,EAAE,IAAI,EAChB,IAAI,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,CAAC,IALpC,IAAI,CAAC,EAAE,CAMX,CACF,CAAC;wBACH,CAAC;wBACD,OAAO,eAAoB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,eAAe,IAAxC,IAAI,CAAC,EAAE,CAA0C,CAAC;oBACrE,CAAC,CAAC,GACI,GACE,IACR,CACH,CAAC;AACH,CAAC","sourcesContent":["import Button from \"@ui5/webcomponents/dist/Button.js\";\nimport ButtonBadge from \"@ui5/webcomponents/dist/ButtonBadge.js\";\nimport Popover from \"@ui5/webcomponents/dist/Popover.js\";\nimport List from \"@ui5/webcomponents/dist/List.js\";\nimport type ShellBar from \"./ShellBar.js\";\nimport ShellBarItem from \"./ShellBarItem.js\";\n\nimport {\n\tShellBarSearchField,\n\tShellBarSearchFieldFullWidth\n} from \"./shellbar/templates/ShellBarSearchTemplate.js\";\n\nimport {\n\tShellBarSearchField as ShellBarSearchFieldLegacy,\n\tShellBarSearchButton as ShellBarSearchButtonLegacy,\n\tShellBarSearchFieldFullWidth as ShellBarSearchFieldFullWidthLegacy,\n} from \"./shellbar/templates/ShellBarSearchLegacyTemplate.js\";\n\nimport {\n\tShellBarLegacyBrandingArea,\n} from \"./shellbar/templates/ShellBarLegacyTemplate.js\";\n\nexport default function ShellBarTemplate(this: ShellBar) {\n\tconst isLegacySearch = !this.isSelfCollapsibleSearch;\n\n\tconst SearchInBarTemplate = isLegacySearch ? ShellBarSearchFieldLegacy : ShellBarSearchField;\n\tconst SearchFullWidthTemplate = isLegacySearch ? ShellBarSearchFieldFullWidthLegacy : ShellBarSearchFieldFullWidth;\n\n\tconst profileAction = this.getAction(\"profile\");\n\tconst overflowAction = this.getAction(\"overflow\");\n\tconst assistantAction = this.getAction(\"assistant\");\n\tconst notificationsAction = this.getAction(\"notifications\");\n\tconst productSwitchAction = this.getAction(\"products\");\n\n\tconst actionsAccInfo = this.actionsAccessibilityInfo;\n\n\treturn (\n\t\t<>\n\t\t\t<header class=\"ui5-shellbar-root\" part=\"root\" onKeyDown={this._onKeyDown} aria-label={this.texts.shellbar}>\n\t\t\t\t{/* Full-width search overlay */}\n\t\t\t\t{this.showFullWidthSearch && SearchFullWidthTemplate.call(this)}\n\n\t\t\t\t{this.enabledFeatures.startButton && (\n\t\t\t\t\t<div class=\"ui5-shellbar-start-button ui5-shellbar-gap-end\">\n\t\t\t\t\t\t<slot name=\"startButton\"></slot>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{this.enabledFeatures.branding && (\n\t\t\t\t\t<div class=\"ui5-shellbar-branding-area\">\n\t\t\t\t\t\t<slot name=\"branding\"></slot>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{/* Legacy branding (logo + primaryTitle) when no menu items */}\n\t\t\t\t{!this.enabledFeatures.branding && ShellBarLegacyBrandingArea.call(this)}\n\n\t\t\t\t<div class=\"ui5-shellbar-overflow-container\">\n\t\t\t\t\t<div class=\"ui5-shellbar-overflow-container-inner\">\n\n\t\t\t\t\t\t{this.enabledFeatures.content && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass=\"ui5-shellbar-content-area ui5-shellbar-content-items\"\n\t\t\t\t\t\t\t\trole={this.contentRole}\n\t\t\t\t\t\t\t\taria-label={this.texts.contentItems}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{/* Start separator */}\n\t\t\t\t\t\t\t\t{this.separatorConfig.showStartSeparator && (\n\t\t\t\t\t\t\t\t\t<div class=\"ui5-shellbar-separator ui5-shellbar-separator-start\"></div>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{/* Start content items */}\n\t\t\t\t\t\t\t\t{this.startContent.map(item => {\n\t\t\t\t\t\t\t\t\tconst itemId = (item as any)._individualSlot as string;\n\t\t\t\t\t\t\t\t\tconst packedSep = this.getPackedSeparatorInfo(item, true);\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tkey={itemId}\n\t\t\t\t\t\t\t\t\t\t\tid={itemId}\n\t\t\t\t\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\t\t\t\t\"ui5-shellbar-content-item ui5-shellbar-gap-start\": true,\n\t\t\t\t\t\t\t\t\t\t\t\t\"ui5-shellbar-hidden\": this.isHidden(itemId),\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{packedSep.shouldPack && (\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ui5-shellbar-separator ui5-shellbar-separator-start\"></div>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t<slot name={(item as any)._individualSlot}></slot>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t})}\n\n\t\t\t\t\t\t\t\t{/* Spacer: Grows to fill available space, used to measure if space is tight, should be in DOM always */}\n\t\t\t\t\t\t\t\t<div class=\"ui5-shellbar-spacer\"></div>\n\n\t\t\t\t\t\t\t\t{/* End content items */}\n\t\t\t\t\t\t\t\t{this.endContent.map(item => {\n\t\t\t\t\t\t\t\t\tconst itemId = (item as any)._individualSlot as string;\n\t\t\t\t\t\t\t\t\tconst packedSep = this.getPackedSeparatorInfo(item, false);\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tkey={itemId}\n\t\t\t\t\t\t\t\t\t\t\tid={itemId}\n\t\t\t\t\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\t\t\t\t\"ui5-shellbar-content-item ui5-shellbar-gap-start\": true,\n\t\t\t\t\t\t\t\t\t\t\t\t\"ui5-shellbar-hidden\": this.isHidden(itemId),\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<slot name={itemId}></slot>\n\t\t\t\t\t\t\t\t\t\t\t{packedSep.shouldPack && (\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ui5-shellbar-separator ui5-shellbar-separator-end ui5-shellbar-gap-start\"></div>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t})}\n\n\t\t\t\t\t\t\t\t{/* End separator */}\n\t\t\t\t\t\t\t\t{this.separatorConfig.showEndSeparator && (\n\t\t\t\t\t\t\t\t\t<div class=\"ui5-shellbar-separator ui5-shellbar-separator-end ui5-shellbar-gap-start\"></div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{this.enabledFeatures.search && SearchInBarTemplate.call(this)}\n\t\t\t\t\t\t{this.enabledFeatures.search && isLegacySearch && ShellBarSearchButtonLegacy.call(this)}\n\n\t\t\t\t\t\t{assistantAction && (\n\t\t\t\t\t\t\t<div class={{\n\t\t\t\t\t\t\t\t\"ui5-shellbar-assistant-button ui5-shellbar-gap-start\": true,\n\t\t\t\t\t\t\t\t\"ui5-shellbar-hidden\": this.isHidden(\"assistant\")\n\t\t\t\t\t\t\t}}>\n\t\t\t\t\t\t\t\t<slot name=\"assistant\"></slot>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{notificationsAction && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tdata-ui5-stable={notificationsAction.stableDomRef}\n\t\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\t\"ui5-shellbar-bell-button ui5-shellbar-action-button ui5-shellbar-gap-start\": true,\n\t\t\t\t\t\t\t\t\t\"ui5-shellbar-hidden\": this.isHidden(\"notifications\")\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\ticon={notificationsAction.icon}\n\t\t\t\t\t\t\t\tdesign=\"Transparent\"\n\t\t\t\t\t\t\t\tonClick={this.handleNotificationsClick}\n\t\t\t\t\t\t\t\ttooltip={actionsAccInfo.notifications.title}\n\t\t\t\t\t\t\t\taccessibilityAttributes={actionsAccInfo.notifications.accessibilityAttributes}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{notificationsAction?.count && (\n\t\t\t\t\t\t\t\t\t<ButtonBadge slot=\"badge\" design=\"OverlayText\" text={notificationsAction?.count} />\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{/* Custom Items */}\n\t\t\t\t\t\t{this._validItems.map(item => (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tkey={item._id}\n\t\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\t\"ui5-shellbar-custom-item ui5-shellbar-gap-start\": true,\n\t\t\t\t\t\t\t\t\t\"ui5-shellbar-hidden\": this.isHidden(item._id),\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tdata-ui5-stable={item.stableDomRef}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{!item.inOverflow ? <slot name={(item as any)._individualSlot}></slot> : null}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t))}\n\n\t\t\t\t\t\t{overflowAction && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tdata-ui5-stable={overflowAction.stableDomRef}\n\t\t\t\t\t\t\t\tid=\"ui5-shellbar-overflow-button\"\n\t\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\t\"ui5-shellbar-overflow-button ui5-shellbar-action-button ui5-shellbar-gap-start\": true,\n\t\t\t\t\t\t\t\t\t\"ui5-shellbar-hidden\": this.isHidden(\"overflow\")\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\ticon={overflowAction.icon}\n\t\t\t\t\t\t\t\tdesign=\"Transparent\"\n\t\t\t\t\t\t\t\tonClick={this.handleOverflowClick}\n\t\t\t\t\t\t\t\ttooltip={actionsAccInfo.overflow.title}\n\t\t\t\t\t\t\t\taccessibilityAttributes={actionsAccInfo.overflow.accessibilityAttributes}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this.overflowBadge && (\n\t\t\t\t\t\t\t\t\t<ButtonBadge\n\t\t\t\t\t\t\t\t\t\tslot=\"badge\"\n\t\t\t\t\t\t\t\t\t\tdesign={this.overflowBadge === \" \" ? \"AttentionDot\" : \"OverlayText\"}\n\t\t\t\t\t\t\t\t\t\ttext={this.overflowBadge === \" \" ? \"\" : this.overflowBadge}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{profileAction && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tdata-profile-btn\n\t\t\t\t\t\t\t\tdata-ui5-stable={profileAction.stableDomRef}\n\t\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\t\"ui5-shellbar-image-button ui5-shellbar-action-button ui5-shellbar-gap-start\": true,\n\t\t\t\t\t\t\t\t\t\"ui5-shellbar-hidden\": this.isHidden(\"profile\")\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tdesign=\"Transparent\"\n\t\t\t\t\t\t\t\tonClick={this.handleProfileClick}\n\t\t\t\t\t\t\t\ttooltip={actionsAccInfo.profile.title}\n\t\t\t\t\t\t\t\taccessibilityAttributes={actionsAccInfo.profile.accessibilityAttributes}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<slot name=\"profile\"></slot>\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{productSwitchAction && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tdata-ui5-stable={productSwitchAction.stableDomRef}\n\t\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\t\"ui5-shellbar-button-product-switch ui5-shellbar-action-button ui5-shellbar-gap-start\": true,\n\t\t\t\t\t\t\t\t\t\"ui5-shellbar-hidden\": this.isHidden(\"products\")\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\ticon={productSwitchAction.icon}\n\t\t\t\t\t\t\t\tdesign=\"Transparent\"\n\t\t\t\t\t\t\t\tonClick={this.handleProductSwitchClick}\n\t\t\t\t\t\t\t\ttooltip={actionsAccInfo.products.title}\n\t\t\t\t\t\t\t\taccessibilityAttributes={actionsAccInfo.products.accessibilityAttributes}\n\t\t\t\t\t\t\t></Button>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</header>\n\n\t\t\t{/* Overflow Popover */}\n\t\t\t<Popover\n\t\t\t\tclass=\"ui5-shellbar-overflow-popover\"\n\t\t\t\topen={this.overflowPopoverOpen}\n\t\t\t\tonClose={this.onPopoverClose}\n\t\t\t\topener=\"ui5-shellbar-overflow-button\"\n\t\t\t\tplacement=\"Bottom\"\n\t\t\t\thideArrow={true}\n\t\t\t\thorizontalAlign={this.popoverHorizontalAlign} // TODO: add test\n\t\t\t>\n\t\t\t\t<List separators=\"None\" onClick={this.handleOverflowItemClick}>\n\t\t\t\t\t{this.overflowItems.map(item => {\n\t\t\t\t\t\tif (item.type === \"action\") {\n\t\t\t\t\t\t\tconst actionData = item.data;\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<ShellBarItem\n\t\t\t\t\t\t\t\t\tkey={item.id}\n\t\t\t\t\t\t\t\t\ticon={actionData.icon ? `sap-icon://${actionData.icon}` : \"\"}\n\t\t\t\t\t\t\t\t\tdata-action-id={item.id}\n\t\t\t\t\t\t\t\t\tcount={actionData.count}\n\t\t\t\t\t\t\t\t\tinOverflow={true}\n\t\t\t\t\t\t\t\t\ttext={this.getActionOverflowText(item.id)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn <slot key={item.id} name={item.data._individualSlot}></slot>;\n\t\t\t\t\t})}\n\t\t\t\t</List>\n\t\t\t</Popover>\n\t\t</>\n\t);\n}\n"]}
|
package/dist/Timeline.d.ts
CHANGED
|
@@ -118,7 +118,7 @@ declare class Timeline extends UI5Element {
|
|
|
118
118
|
*
|
|
119
119
|
* @default false
|
|
120
120
|
* @public
|
|
121
|
-
* @since 2.
|
|
121
|
+
* @since 2.24.0
|
|
122
122
|
*/
|
|
123
123
|
stickyHeader: boolean;
|
|
124
124
|
/**
|
|
@@ -136,7 +136,7 @@ declare class Timeline extends UI5Element {
|
|
|
136
136
|
* Typically a `ui5-toolbar` with search, sort, and filter controls.
|
|
137
137
|
*
|
|
138
138
|
* @public
|
|
139
|
-
* @since 2.
|
|
139
|
+
* @since 2.24.0
|
|
140
140
|
*/
|
|
141
141
|
header: Slot<HTMLElement>;
|
|
142
142
|
/**
|
|
@@ -144,7 +144,7 @@ declare class Timeline extends UI5Element {
|
|
|
144
144
|
* and above the items. Use for status display (applied filters, sort direction, counts).
|
|
145
145
|
*
|
|
146
146
|
* @public
|
|
147
|
-
* @since 2.
|
|
147
|
+
* @since 2.24.0
|
|
148
148
|
*/
|
|
149
149
|
infoBar: Slot<HTMLElement>;
|
|
150
150
|
timelineEndMarker: HTMLElement;
|
package/dist/Timeline.js
CHANGED
package/dist/Timeline.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Timeline.js","sourceRoot":"","sources":["../src/Timeline.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,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAE/E,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EACN,OAAO,EACP,OAAO,EACP,IAAI,EACJ,MAAM,EACN,MAAM,EACN,OAAO,EACP,IAAI,GACJ,MAAM,sCAAsC,CAAC;AAG9C,OAAO,mBAAmB,CAAC;AAC3B,OAAO,cAAc,MAAM,yDAAyD,CAAC;AACrF,OAAO,cAAc,MAAM,sDAAsD,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,8BAA8B,EAAE,MAAM,mCAAmC,CAAC;AACxG,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,QAAQ,MAAM,+CAA+C,CAAC;AACrE,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,OAAO,MAAM,0CAA0C,CAAC;AAC/D,OAAO,SAAS,MAAM,6CAA6C,CAAC;AACpE,SAAS;AACT,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAC7D,OAAO,cAAc,MAAM,2BAA2B,CAAC;AACvD,OAAO;AACP,OAAO,mBAAmB,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AAClG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B,QAAQ,EAAE,gBAAgB;KAC1B,CAAC;IAEF;;;;;;OAMG;;IACF,KAAK,CAAC,WAAW,EAAE;QACnB,OAAO,EAAE,IAAI;KACb,CAAC;GAEI,QAAQ,CAwbb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { DefaultSlot, Slot } 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 i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport {\n\tisSpace,\n\tisEnter,\n\tisUp,\n\tisDown,\n\tisLeft,\n\tisRight,\n\tisF2,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport type { ITabbable } from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport type ToggleButton from \"@ui5/webcomponents/dist/ToggleButton.js\";\nimport \"./TimelineItem.js\";\nimport ItemNavigation from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport NavigationMode from \"@ui5/webcomponents-base/dist/types/NavigationMode.js\";\nimport { TIMELINE_ARIA_LABEL, TIMELINE_LOAD_MORE_BUTTON_TEXT } from \"./generated/i18n/i18n-defaults.js\";\nimport TimelineTemplate from \"./TimelineTemplate.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport debounce from \"@ui5/webcomponents-base/dist/util/debounce.js\";\nimport query from \"@ui5/webcomponents-base/dist/decorators/query.js\";\nimport process from \"@ui5/webcomponents-icons/dist/process.js\";\nimport drillDown from \"@ui5/webcomponents-icons/dist/drill-down.js\";\n// Styles\nimport TimelineCss from \"./generated/themes/Timeline.css.js\";\nimport TimelineLayout from \"./types/TimelineLayout.js\";\n// Mode\nimport TimelineGrowingMode from \"./types/TimelineGrowingMode.js\";\nimport { getFirstFocusableElement } from \"@ui5/webcomponents-base/dist/util/FocusableElements.js\";\nimport getActiveElement from \"@ui5/webcomponents-base/dist/util/getActiveElement.js\";\n\n/**\n * Interface for components that may be slotted inside `ui5-timeline` as items\n * @public\n */\ninterface ITimelineItem extends UI5Element, ITabbable {\n\tlayout: `${TimelineLayout}`;\n\tisGroupItem: boolean;\n\tforcedLineWidth?: string;\n\ticon?: string;\n\tnameClickable?: boolean;\n\tpositionInGroup?: number;\n\tcollapsed?: boolean;\n\titems?: Array<ITimelineItem>;\n\tfocusLink?(): void;\n\tlastItem: boolean;\n\tisNextItemGroup?: boolean;\n\tfirstItemInTimeline?: boolean;\n\teffectiveRole?: string;\n}\n\nconst SHORT_LINE_WIDTH = \"ShortLineWidth\";\nconst LARGE_LINE_WIDTH = \"LargeLineWidth\";\nconst GROWING_WITH_SCROLL_DEBOUNCE_RATE = 250; // ms\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-timeline` component shows entries (such as objects, events, or posts) in chronological order.\n * A common use case is to provide information about changes to an object, or events related to an object.\n * These entries can be generated by the system (for example, value XY changed from A to B), or added manually.\n * There are two distinct variants of the timeline: basic and social. The basic timeline is read-only,\n * while the social timeline offers a high level of interaction and collaboration, and is integrated within SAP Jam.\n *\n * ### Header and Info Bar Slots\n *\n * The Timeline exposes two named slots above the items area:\n *\n * - `header` — for a controls bar (search field, filter trigger, sort toggle, etc.).\n * The most common pattern is to place a `ui5-toolbar` containing a search input and buttons that open\n * a filter dialog or toggle sort direction. The Timeline itself performs no filtering, sorting, or\n * searching — the application listens for events from its own controls and reorders, hides, or\n * adds items in the default slot accordingly.\n *\n * - `infoBar` — for a status bar that reflects the result of the controls (active filters,\n * applied sort, current search query). Typically contains tokens, labels, or a `ui5-bar`.\n *\n * The Timeline itself does not filter, sort, or search — the application owns that logic.\n * Use `stickyHeader` to pin both bars while the Timeline's items scroll. Give the Timeline\n * a constrained height in this mode so it owns its scrollbar.\n * @constructor\n * @extends UI5Element\n * @public\n * @since 0.8.0\n */\n@customElement({\n\ttag: \"ui5-timeline\",\n\tlanguageAware: true,\n\trenderer: jsxRenderer,\n\tstyles: TimelineCss,\n\ttemplate: TimelineTemplate,\n})\n\n/**\n * Fired when the user presses the `More` button or scrolls to the Timeline's end.\n *\n * **Note:** The event will be fired if `growing` is set to `Button` or `Scroll`.\n * @public\n * @since 2.7.0\n */\n@event(\"load-more\", {\n\tbubbles: true,\n})\n\nclass Timeline extends UI5Element {\n\teventDetails!: {\n\t\t\"load-more\": void,\n\t}\n\t/**\n\t * Defines the items orientation.\n\t * @default \"Vertical\"\n\t * @since 1.0.0-rc.15\n\t * @public\n\t */\n\t@property()\n\tlayout: `${TimelineLayout}` = \"Vertical\";\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.2.0\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines if the component should display a loading indicator over the Timeline.\n\t *\n\t * @default false\n\t * @since 2.7.0\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tloading = false;\n\n\t/**\n\t * Defines the delay in milliseconds, after which the loading indicator will show up for this component.\n\t * @default 1000\n\t * @public\n\t */\n\t@property({ type: Number })\n\tloadingDelay = 1000;\n\n\t/**\n\t * Defines whether the Timeline will have growing capability either by pressing a \"More\" button,\n\t * or via user scroll. In both cases a `load-more` event is fired.\n\t *\n\t * Available options:\n\t *\n\t * `Button` - Displays a button at the end of the Timeline, which when pressed triggers the `load-more` event.\n\t *\n\t * `Scroll` -Triggers the `load-more` event when the user scrolls to the end of the Timeline.\n\t *\n\t * `None` (default) - The growing functionality is off.\n\t *\n\t * @default \"None\"\n\t * @since 2.7.0\n\t * @public\n\t */\n\t@property()\n\tgrowing: `${TimelineGrowingMode}` = \"None\";\n\n\t/**\n\t * Defines whether the content of the `header` and `infoBar` slots remains visible when the user scrolls the Timeline.\n\t *\n\t * **Note:** The bars pin to the Timeline's own scrollport. Give the Timeline a\n\t * constrained height (for example `style=\"height: 32rem\"`) so its items scroll\n\t * inside it. Placing the Timeline inside an externally scrolling ancestor while\n\t * leaving the Timeline itself unsized is not supported in this mode — the bars\n\t * will scroll away with the ancestor.\n\t *\n\t * @default false\n\t * @public\n\t * @since 2.22.0\n\t */\n\t@property({ type: Boolean })\n\tstickyHeader = false;\n\n\t/**\n\t * Defines the active state of the `More` button.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_loadMoreActive = false;\n\n\t/**\n\t * Determines the content of the `ui5-timeline`.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, individualSlots: true, \"default\": true })\n\titems!: DefaultSlot<ITimelineItem>;\n\n\t/**\n\t * Defines the content of the Timeline's header area, displayed above the items.\n\t * Typically a `ui5-toolbar` with search, sort, and filter controls.\n\t *\n\t * @public\n\t * @since 2.22.0\n\t */\n\t@slot()\n\theader!: Slot<HTMLElement>;\n\n\t/**\n\t * Defines the content of the Timeline's info bar area, displayed below the header\n\t * and above the items. Use for status display (applied filters, sort direction, counts).\n\t *\n\t * @public\n\t * @since 2.22.0\n\t */\n\t@slot()\n\tinfoBar!: Slot<HTMLElement>;\n\n\t@query(\".ui5-timeline-end-marker\")\n\ttimelineEndMarker!: HTMLElement;\n\n\t@query((`[id=\"ui5-timeline-growing-btn\"]`))\n\tgrowingButton!: HTMLElement;\n\n\t@query(\".ui5-timeline-scroll-container\")\n\t_scrollContainer!: HTMLElement;\n\n\t@i18n(\"@ui5/webcomponents-fiori\")\n\tstatic i18nBundle: I18nBundle;\n\n\t_itemNavigation: ItemNavigation;\n\tgrowingIntersectionObserver?: IntersectionObserver | null;\n\ttimeLineEndObserved = false;\n\tinitialIntersection = true;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._itemNavigation = new ItemNavigation(this, {\n\t\t\tgetItemsCallback: () => this._navigableItems,\n\t\t});\n\t}\n\n\tget ariaLabel() {\n\t\treturn this.accessibleName\n\t\t\t? `${Timeline.i18nBundle.getText(TIMELINE_ARIA_LABEL)} ${this.accessibleName}`\n\t\t\t: Timeline.i18nBundle.getText(TIMELINE_ARIA_LABEL);\n\t}\n\n\tget _hasHeader(): boolean {\n\t\treturn this.header.length > 0;\n\t}\n\n\tget _hasInfoBar(): boolean {\n\t\treturn this.infoBar.length > 0;\n\t}\n\n\tget showBusyIndicatorOverlay() {\n\t\treturn !this.growsWithButton && this.loading;\n\t}\n\n\tget growsOnScroll(): boolean {\n\t\treturn this.growing === TimelineGrowingMode.Scroll;\n\t}\n\n\tget growingButtonIcon() {\n\t\treturn this.layout === TimelineLayout.Horizontal ? process : drillDown;\n\t}\n\n\tget growingButtonText() {\n\t\treturn Timeline.i18nBundle.getText(TIMELINE_LOAD_MORE_BUTTON_TEXT);\n\t}\n\n\tget growsWithButton(): boolean {\n\t\treturn this.growing === TimelineGrowingMode.Button;\n\t}\n\n\tonAfterRendering() {\n\t\tif (this.growsOnScroll) {\n\t\t\tthis.observeTimelineEnd();\n\t\t} else if (this.timeLineEndObserved) {\n\t\t\tthis.unobserveTimelineEnd();\n\t\t}\n\n\t\tthis.growingIntersectionObserver = this.getIntersectionObserver();\n\t}\n\n\tonExitDOM() {\n\t\tthis.unobserveTimelineEnd();\n\t}\n\n\tasync observeTimelineEnd() {\n\t\tif (!this.timeLineEndObserved) {\n\t\t\tawait renderFinished();\n\t\t\tthis.getIntersectionObserver().observe(this.timelineEndMarker);\n\t\t\tthis.timeLineEndObserved = true;\n\t\t}\n\t}\n\n\tunobserveTimelineEnd() {\n\t\tif (this.growingIntersectionObserver) {\n\t\t\tthis.growingIntersectionObserver.disconnect();\n\t\t\tthis.growingIntersectionObserver = null;\n\t\t\tthis.timeLineEndObserved = false;\n\t\t}\n\t}\n\n\tgetIntersectionObserver(): IntersectionObserver {\n\t\tif (!this.growingIntersectionObserver) {\n\t\t\tthis.growingIntersectionObserver = new IntersectionObserver(this.onIntersection.bind(this), {\n\t\t\t\troot: null,\n\t\t\t\tthreshold: 1.0,\n\t\t\t});\n\t\t}\n\n\t\treturn this.growingIntersectionObserver;\n\t}\n\n\tonIntersection(entries: Array<IntersectionObserverEntry>) {\n\t\tif (this.initialIntersection) {\n\t\t\tthis.initialIntersection = false;\n\t\t\treturn;\n\t\t}\n\n\t\tif (entries.some(entry => entry.isIntersecting)) {\n\t\t\tdebounce(this.loadMore.bind(this), GROWING_WITH_SCROLL_DEBOUNCE_RATE);\n\t\t}\n\t}\n\n\tloadMore() {\n\t\tthis.fireDecoratorEvent(\"load-more\");\n\t}\n\n\tgetFocusDomRef(): HTMLElement | undefined {\n\t\treturn this._itemNavigation._getCurrentItem();\n\t}\n\n\t_onLoadMoreKeydown(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._loadMoreActive = true;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis._onLoadMoreClick();\n\t\t\tthis._loadMoreActive = true;\n\t\t}\n\t}\n\n\t_onLoadMoreKeyup(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\tthis._onLoadMoreClick();\n\t\t}\n\t\tthis._loadMoreActive = false;\n\t}\n\n\t_onLoadMoreClick() {\n\t\tthis.fireDecoratorEvent(\"load-more\");\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tlet target = e.target as ITimelineItem | ToggleButton;\n\n\t\tif ((target as ITimelineItem).isGroupItem) {\n\t\t\ttarget = target.shadowRoot!.querySelector<ToggleButton>(\"[ui5-toggle-button]\")!;\n\t\t}\n\n\t\tthis._itemNavigation.setCurrentItem(target);\n\t}\n\n\t_onwheel(e: WheelEvent) {\n\t\t// In horizontal layout, translate vertical wheel into horizontal scroll\n\t\t// so a regular mouse wheel can scroll through items.\n\t\tif (this.layout !== TimelineLayout.Horizontal || !e.deltaY || e.deltaX) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst container = this._scrollContainer;\n\t\tif (!container) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst canScroll = container.scrollWidth > container.clientWidth;\n\t\tif (!canScroll) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.scrollLeft += e.deltaY;\n\t\te.preventDefault();\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._itemNavigation._navigationMode = this.layout === TimelineLayout.Horizontal ? NavigationMode.Horizontal : NavigationMode.Vertical;\n\n\t\tif (!this.items.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (let i = 0; i < this.items.length; i++) {\n\t\t\tthis.items[i].layout = this.layout;\n\t\t\tif (this.hasGroupItems) {\n\t\t\t\tthis.items[i].effectiveRole = \"treeitem\";\n\t\t\t} else {\n\t\t\t\tthis.items[i].effectiveRole = \"listitem\";\n\t\t\t}\n\n\t\t\tif (this.items[i + 1] && !!this.items[i + 1].icon) {\n\t\t\t\tthis.items[i].forcedLineWidth = SHORT_LINE_WIDTH;\n\t\t\t} else if (this.items[i].icon && this.items[i + 1] && !this.items[i + 1].icon) {\n\t\t\t\tthis.items[i].forcedLineWidth = LARGE_LINE_WIDTH;\n\t\t\t}\n\t\t}\n\n\t\tthis._setLastItem();\n\t\tthis._setIsNextItemGroup();\n\t\tthis.items[0].firstItemInTimeline = true;\n\t}\n\n\t_setLastItem() {\n\t\tconst items = this.items;\n\n\t\tfor (let i = 0; i < items.length; i++) {\n\t\t\titems[i].lastItem = false;\n\t\t}\n\n\t\tif (items.length > 0) {\n\t\t\titems[items.length - 1].lastItem = true;\n\t\t}\n\t}\n\n\t_setIsNextItemGroup() {\n\t\tfor (let i = 0; i < this.items.length; i++) {\n\t\t\tthis.items[i].isNextItemGroup = false;\n\t\t}\n\n\t\tfor (let i = 0; i < this.items.length; i++) {\n\t\t\tif (this.items[i + 1] && this.items[i + 1].isGroupItem) {\n\t\t\t\tthis.items[i].isNextItemGroup = true;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync _onkeydown(e: KeyboardEvent) {\n\t\tconst target = e.target as ITimelineItem,\n\t\t\ttargetfocusDomRef = target?.getFocusDomRef(),\n\t\t\tshouldHandleCustomArrowNavigation = targetfocusDomRef === this.getFocusDomRef() || target === this.growingButton;\n\n\t\tif (shouldHandleCustomArrowNavigation && (isDown(e) || isRight(e))) {\n\t\t\tthis._handleDown();\n\t\t\te.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tif (shouldHandleCustomArrowNavigation && (isUp(e) || isLeft(e))) {\n\t\t\tthis._handleUp(e);\n\t\t\te.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tif (isF2(e)) {\n\t\t\te.stopImmediatePropagation();\n\t\t\tconst activeElement = getActiveElement();\n\t\t\tconst focusDomRef = this.getFocusDomRef();\n\n\t\t\tif (!focusDomRef) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (activeElement === focusDomRef) {\n\t\t\t\tconst firstFocusable = await getFirstFocusableElement(focusDomRef);\n\t\t\t\tfirstFocusable?.focus();\n\t\t\t} else {\n\t\t\t\tconst parentItem = (e.target as HTMLElement)?.closest(\"ui5-timeline-item\") as HTMLElement;\n\t\t\t\tparentItem?.focus();\n\t\t\t}\n\t\t}\n\t}\n\n\t_handleDown() {\n\t\tif (this.growsWithButton) {\n\t\t\tthis.focusGrowingButton();\n\t\t}\n\t}\n\n\tfocusGrowingButton() {\n\t\tconst items = this._navigableItems;\n\t\tconst lastIndex = items.length - 1;\n\t\tconst currentIndex = this._itemNavigation._currentIndex;\n\n\t\tif (currentIndex !== -1 && currentIndex === lastIndex) {\n\t\t\tthis.growingButton?.focus();\n\t\t}\n\t}\n\n\t_handleUp(e: KeyboardEvent) {\n\t\tif (this.growingButton === e.target) {\n\t\t\tconst items = this._navigableItems;\n\t\t\tconst lastItem = items[items.length - 1];\n\n\t\t\tthis.focusItem(lastItem);\n\n\t\t\te.preventDefault();\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\t}\n\n\t/**\n\t * Focuses a list item and sets its tabindex to \"0\" via the ItemNavigation\n\t * @protected\n\t * @param item\n\t */\n\tfocusItem(item: ITimelineItem | ToggleButton) {\n\t\tthis._itemNavigation.setCurrentItem(item);\n\t\titem.focus();\n\t}\n\n\tget hasGroupItems() {\n\t\treturn this.items.some(item => item.isGroupItem);\n\t}\n\n\tget _navigableItems() {\n\t\tconst navigatableItems: Array<ITimelineItem | ToggleButton> = [];\n\n\t\tif (!this.items.length) {\n\t\t\treturn [];\n\t\t}\n\n\t\tthis.items.forEach(item => {\n\t\t\tif (!item.isGroupItem) {\n\t\t\t\tnavigatableItems.push(item);\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst navigatableItem = item.shadowRoot!.querySelector<ToggleButton>(\"[ui5-toggle-button]\");\n\n\t\t\tif (navigatableItem) {\n\t\t\t\tnavigatableItems.push(navigatableItem);\n\t\t\t}\n\n\t\t\tif (!item.collapsed) {\n\t\t\t\titem.items?.forEach(groupItem => {\n\t\t\t\t\tnavigatableItems.push(groupItem);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\treturn navigatableItems;\n\t}\n}\n\nTimeline.define();\n\nexport default Timeline;\nexport type {\n\tITimelineItem,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Timeline.js","sourceRoot":"","sources":["../src/Timeline.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,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAE/E,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EACN,OAAO,EACP,OAAO,E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AE,CAAC;8CACP;AAmBpB;IADC,QAAQ,EAAE;yCACgC;AAgB3C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;8CACP;AAOrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;iDACJ;AAOxB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;uCACjC;AAUnC;IADC,IAAI,EAAE;wCACoB;AAU3B;IADC,IAAI,EAAE;yCACqB;AAG5B;IADC,KAAK,CAAC,0BAA0B,CAAC;mDACF;AAGhC;IADC,KAAK,CAAC,CAAC,iCAAiC,CAAC,CAAC;+CACf;AAG5B;IADC,KAAK,CAAC,gCAAgC,CAAC;kDACT;AAGxB;IADN,IAAI,CAAC,0BAA0B,CAAC;kCACH;AAvHzB,QAAQ;IAnBb,aAAa,CAAC;QACd,GAAG,EAAE,cAAc;QACnB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,WAAW;QACnB,QAAQ,EAAE,gBAAgB;KAC1B,CAAC;IAEF;;;;;;OAMG;;IACF,KAAK,CAAC,WAAW,EAAE;QACnB,OAAO,EAAE,IAAI;KACb,CAAC;GAEI,QAAQ,CAwbb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { DefaultSlot, Slot } 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 i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport {\n\tisSpace,\n\tisEnter,\n\tisUp,\n\tisDown,\n\tisLeft,\n\tisRight,\n\tisF2,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport type { ITabbable } from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport type ToggleButton from \"@ui5/webcomponents/dist/ToggleButton.js\";\nimport \"./TimelineItem.js\";\nimport ItemNavigation from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport NavigationMode from \"@ui5/webcomponents-base/dist/types/NavigationMode.js\";\nimport { TIMELINE_ARIA_LABEL, TIMELINE_LOAD_MORE_BUTTON_TEXT } from \"./generated/i18n/i18n-defaults.js\";\nimport TimelineTemplate from \"./TimelineTemplate.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport debounce from \"@ui5/webcomponents-base/dist/util/debounce.js\";\nimport query from \"@ui5/webcomponents-base/dist/decorators/query.js\";\nimport process from \"@ui5/webcomponents-icons/dist/process.js\";\nimport drillDown from \"@ui5/webcomponents-icons/dist/drill-down.js\";\n// Styles\nimport TimelineCss from \"./generated/themes/Timeline.css.js\";\nimport TimelineLayout from \"./types/TimelineLayout.js\";\n// Mode\nimport TimelineGrowingMode from \"./types/TimelineGrowingMode.js\";\nimport { getFirstFocusableElement } from \"@ui5/webcomponents-base/dist/util/FocusableElements.js\";\nimport getActiveElement from \"@ui5/webcomponents-base/dist/util/getActiveElement.js\";\n\n/**\n * Interface for components that may be slotted inside `ui5-timeline` as items\n * @public\n */\ninterface ITimelineItem extends UI5Element, ITabbable {\n\tlayout: `${TimelineLayout}`;\n\tisGroupItem: boolean;\n\tforcedLineWidth?: string;\n\ticon?: string;\n\tnameClickable?: boolean;\n\tpositionInGroup?: number;\n\tcollapsed?: boolean;\n\titems?: Array<ITimelineItem>;\n\tfocusLink?(): void;\n\tlastItem: boolean;\n\tisNextItemGroup?: boolean;\n\tfirstItemInTimeline?: boolean;\n\teffectiveRole?: string;\n}\n\nconst SHORT_LINE_WIDTH = \"ShortLineWidth\";\nconst LARGE_LINE_WIDTH = \"LargeLineWidth\";\nconst GROWING_WITH_SCROLL_DEBOUNCE_RATE = 250; // ms\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-timeline` component shows entries (such as objects, events, or posts) in chronological order.\n * A common use case is to provide information about changes to an object, or events related to an object.\n * These entries can be generated by the system (for example, value XY changed from A to B), or added manually.\n * There are two distinct variants of the timeline: basic and social. The basic timeline is read-only,\n * while the social timeline offers a high level of interaction and collaboration, and is integrated within SAP Jam.\n *\n * ### Header and Info Bar Slots\n *\n * The Timeline exposes two named slots above the items area:\n *\n * - `header` — for a controls bar (search field, filter trigger, sort toggle, etc.).\n * The most common pattern is to place a `ui5-toolbar` containing a search input and buttons that open\n * a filter dialog or toggle sort direction. The Timeline itself performs no filtering, sorting, or\n * searching — the application listens for events from its own controls and reorders, hides, or\n * adds items in the default slot accordingly.\n *\n * - `infoBar` — for a status bar that reflects the result of the controls (active filters,\n * applied sort, current search query). Typically contains tokens, labels, or a `ui5-bar`.\n *\n * The Timeline itself does not filter, sort, or search — the application owns that logic.\n * Use `stickyHeader` to pin both bars while the Timeline's items scroll. Give the Timeline\n * a constrained height in this mode so it owns its scrollbar.\n * @constructor\n * @extends UI5Element\n * @public\n * @since 0.8.0\n */\n@customElement({\n\ttag: \"ui5-timeline\",\n\tlanguageAware: true,\n\trenderer: jsxRenderer,\n\tstyles: TimelineCss,\n\ttemplate: TimelineTemplate,\n})\n\n/**\n * Fired when the user presses the `More` button or scrolls to the Timeline's end.\n *\n * **Note:** The event will be fired if `growing` is set to `Button` or `Scroll`.\n * @public\n * @since 2.7.0\n */\n@event(\"load-more\", {\n\tbubbles: true,\n})\n\nclass Timeline extends UI5Element {\n\teventDetails!: {\n\t\t\"load-more\": void,\n\t}\n\t/**\n\t * Defines the items orientation.\n\t * @default \"Vertical\"\n\t * @since 1.0.0-rc.15\n\t * @public\n\t */\n\t@property()\n\tlayout: `${TimelineLayout}` = \"Vertical\";\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.2.0\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines if the component should display a loading indicator over the Timeline.\n\t *\n\t * @default false\n\t * @since 2.7.0\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tloading = false;\n\n\t/**\n\t * Defines the delay in milliseconds, after which the loading indicator will show up for this component.\n\t * @default 1000\n\t * @public\n\t */\n\t@property({ type: Number })\n\tloadingDelay = 1000;\n\n\t/**\n\t * Defines whether the Timeline will have growing capability either by pressing a \"More\" button,\n\t * or via user scroll. In both cases a `load-more` event is fired.\n\t *\n\t * Available options:\n\t *\n\t * `Button` - Displays a button at the end of the Timeline, which when pressed triggers the `load-more` event.\n\t *\n\t * `Scroll` -Triggers the `load-more` event when the user scrolls to the end of the Timeline.\n\t *\n\t * `None` (default) - The growing functionality is off.\n\t *\n\t * @default \"None\"\n\t * @since 2.7.0\n\t * @public\n\t */\n\t@property()\n\tgrowing: `${TimelineGrowingMode}` = \"None\";\n\n\t/**\n\t * Defines whether the content of the `header` and `infoBar` slots remains visible when the user scrolls the Timeline.\n\t *\n\t * **Note:** The bars pin to the Timeline's own scrollport. Give the Timeline a\n\t * constrained height (for example `style=\"height: 32rem\"`) so its items scroll\n\t * inside it. Placing the Timeline inside an externally scrolling ancestor while\n\t * leaving the Timeline itself unsized is not supported in this mode — the bars\n\t * will scroll away with the ancestor.\n\t *\n\t * @default false\n\t * @public\n\t * @since 2.24.0\n\t */\n\t@property({ type: Boolean })\n\tstickyHeader = false;\n\n\t/**\n\t * Defines the active state of the `More` button.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_loadMoreActive = false;\n\n\t/**\n\t * Determines the content of the `ui5-timeline`.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, individualSlots: true, \"default\": true })\n\titems!: DefaultSlot<ITimelineItem>;\n\n\t/**\n\t * Defines the content of the Timeline's header area, displayed above the items.\n\t * Typically a `ui5-toolbar` with search, sort, and filter controls.\n\t *\n\t * @public\n\t * @since 2.24.0\n\t */\n\t@slot()\n\theader!: Slot<HTMLElement>;\n\n\t/**\n\t * Defines the content of the Timeline's info bar area, displayed below the header\n\t * and above the items. Use for status display (applied filters, sort direction, counts).\n\t *\n\t * @public\n\t * @since 2.24.0\n\t */\n\t@slot()\n\tinfoBar!: Slot<HTMLElement>;\n\n\t@query(\".ui5-timeline-end-marker\")\n\ttimelineEndMarker!: HTMLElement;\n\n\t@query((`[id=\"ui5-timeline-growing-btn\"]`))\n\tgrowingButton!: HTMLElement;\n\n\t@query(\".ui5-timeline-scroll-container\")\n\t_scrollContainer!: HTMLElement;\n\n\t@i18n(\"@ui5/webcomponents-fiori\")\n\tstatic i18nBundle: I18nBundle;\n\n\t_itemNavigation: ItemNavigation;\n\tgrowingIntersectionObserver?: IntersectionObserver | null;\n\ttimeLineEndObserved = false;\n\tinitialIntersection = true;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._itemNavigation = new ItemNavigation(this, {\n\t\t\tgetItemsCallback: () => this._navigableItems,\n\t\t});\n\t}\n\n\tget ariaLabel() {\n\t\treturn this.accessibleName\n\t\t\t? `${Timeline.i18nBundle.getText(TIMELINE_ARIA_LABEL)} ${this.accessibleName}`\n\t\t\t: Timeline.i18nBundle.getText(TIMELINE_ARIA_LABEL);\n\t}\n\n\tget _hasHeader(): boolean {\n\t\treturn this.header.length > 0;\n\t}\n\n\tget _hasInfoBar(): boolean {\n\t\treturn this.infoBar.length > 0;\n\t}\n\n\tget showBusyIndicatorOverlay() {\n\t\treturn !this.growsWithButton && this.loading;\n\t}\n\n\tget growsOnScroll(): boolean {\n\t\treturn this.growing === TimelineGrowingMode.Scroll;\n\t}\n\n\tget growingButtonIcon() {\n\t\treturn this.layout === TimelineLayout.Horizontal ? process : drillDown;\n\t}\n\n\tget growingButtonText() {\n\t\treturn Timeline.i18nBundle.getText(TIMELINE_LOAD_MORE_BUTTON_TEXT);\n\t}\n\n\tget growsWithButton(): boolean {\n\t\treturn this.growing === TimelineGrowingMode.Button;\n\t}\n\n\tonAfterRendering() {\n\t\tif (this.growsOnScroll) {\n\t\t\tthis.observeTimelineEnd();\n\t\t} else if (this.timeLineEndObserved) {\n\t\t\tthis.unobserveTimelineEnd();\n\t\t}\n\n\t\tthis.growingIntersectionObserver = this.getIntersectionObserver();\n\t}\n\n\tonExitDOM() {\n\t\tthis.unobserveTimelineEnd();\n\t}\n\n\tasync observeTimelineEnd() {\n\t\tif (!this.timeLineEndObserved) {\n\t\t\tawait renderFinished();\n\t\t\tthis.getIntersectionObserver().observe(this.timelineEndMarker);\n\t\t\tthis.timeLineEndObserved = true;\n\t\t}\n\t}\n\n\tunobserveTimelineEnd() {\n\t\tif (this.growingIntersectionObserver) {\n\t\t\tthis.growingIntersectionObserver.disconnect();\n\t\t\tthis.growingIntersectionObserver = null;\n\t\t\tthis.timeLineEndObserved = false;\n\t\t}\n\t}\n\n\tgetIntersectionObserver(): IntersectionObserver {\n\t\tif (!this.growingIntersectionObserver) {\n\t\t\tthis.growingIntersectionObserver = new IntersectionObserver(this.onIntersection.bind(this), {\n\t\t\t\troot: null,\n\t\t\t\tthreshold: 1.0,\n\t\t\t});\n\t\t}\n\n\t\treturn this.growingIntersectionObserver;\n\t}\n\n\tonIntersection(entries: Array<IntersectionObserverEntry>) {\n\t\tif (this.initialIntersection) {\n\t\t\tthis.initialIntersection = false;\n\t\t\treturn;\n\t\t}\n\n\t\tif (entries.some(entry => entry.isIntersecting)) {\n\t\t\tdebounce(this.loadMore.bind(this), GROWING_WITH_SCROLL_DEBOUNCE_RATE);\n\t\t}\n\t}\n\n\tloadMore() {\n\t\tthis.fireDecoratorEvent(\"load-more\");\n\t}\n\n\tgetFocusDomRef(): HTMLElement | undefined {\n\t\treturn this._itemNavigation._getCurrentItem();\n\t}\n\n\t_onLoadMoreKeydown(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._loadMoreActive = true;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis._onLoadMoreClick();\n\t\t\tthis._loadMoreActive = true;\n\t\t}\n\t}\n\n\t_onLoadMoreKeyup(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\tthis._onLoadMoreClick();\n\t\t}\n\t\tthis._loadMoreActive = false;\n\t}\n\n\t_onLoadMoreClick() {\n\t\tthis.fireDecoratorEvent(\"load-more\");\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tlet target = e.target as ITimelineItem | ToggleButton;\n\n\t\tif ((target as ITimelineItem).isGroupItem) {\n\t\t\ttarget = target.shadowRoot!.querySelector<ToggleButton>(\"[ui5-toggle-button]\")!;\n\t\t}\n\n\t\tthis._itemNavigation.setCurrentItem(target);\n\t}\n\n\t_onwheel(e: WheelEvent) {\n\t\t// In horizontal layout, translate vertical wheel into horizontal scroll\n\t\t// so a regular mouse wheel can scroll through items.\n\t\tif (this.layout !== TimelineLayout.Horizontal || !e.deltaY || e.deltaX) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst container = this._scrollContainer;\n\t\tif (!container) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst canScroll = container.scrollWidth > container.clientWidth;\n\t\tif (!canScroll) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.scrollLeft += e.deltaY;\n\t\te.preventDefault();\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._itemNavigation._navigationMode = this.layout === TimelineLayout.Horizontal ? NavigationMode.Horizontal : NavigationMode.Vertical;\n\n\t\tif (!this.items.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (let i = 0; i < this.items.length; i++) {\n\t\t\tthis.items[i].layout = this.layout;\n\t\t\tif (this.hasGroupItems) {\n\t\t\t\tthis.items[i].effectiveRole = \"treeitem\";\n\t\t\t} else {\n\t\t\t\tthis.items[i].effectiveRole = \"listitem\";\n\t\t\t}\n\n\t\t\tif (this.items[i + 1] && !!this.items[i + 1].icon) {\n\t\t\t\tthis.items[i].forcedLineWidth = SHORT_LINE_WIDTH;\n\t\t\t} else if (this.items[i].icon && this.items[i + 1] && !this.items[i + 1].icon) {\n\t\t\t\tthis.items[i].forcedLineWidth = LARGE_LINE_WIDTH;\n\t\t\t}\n\t\t}\n\n\t\tthis._setLastItem();\n\t\tthis._setIsNextItemGroup();\n\t\tthis.items[0].firstItemInTimeline = true;\n\t}\n\n\t_setLastItem() {\n\t\tconst items = this.items;\n\n\t\tfor (let i = 0; i < items.length; i++) {\n\t\t\titems[i].lastItem = false;\n\t\t}\n\n\t\tif (items.length > 0) {\n\t\t\titems[items.length - 1].lastItem = true;\n\t\t}\n\t}\n\n\t_setIsNextItemGroup() {\n\t\tfor (let i = 0; i < this.items.length; i++) {\n\t\t\tthis.items[i].isNextItemGroup = false;\n\t\t}\n\n\t\tfor (let i = 0; i < this.items.length; i++) {\n\t\t\tif (this.items[i + 1] && this.items[i + 1].isGroupItem) {\n\t\t\t\tthis.items[i].isNextItemGroup = true;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync _onkeydown(e: KeyboardEvent) {\n\t\tconst target = e.target as ITimelineItem,\n\t\t\ttargetfocusDomRef = target?.getFocusDomRef(),\n\t\t\tshouldHandleCustomArrowNavigation = targetfocusDomRef === this.getFocusDomRef() || target === this.growingButton;\n\n\t\tif (shouldHandleCustomArrowNavigation && (isDown(e) || isRight(e))) {\n\t\t\tthis._handleDown();\n\t\t\te.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tif (shouldHandleCustomArrowNavigation && (isUp(e) || isLeft(e))) {\n\t\t\tthis._handleUp(e);\n\t\t\te.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tif (isF2(e)) {\n\t\t\te.stopImmediatePropagation();\n\t\t\tconst activeElement = getActiveElement();\n\t\t\tconst focusDomRef = this.getFocusDomRef();\n\n\t\t\tif (!focusDomRef) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (activeElement === focusDomRef) {\n\t\t\t\tconst firstFocusable = await getFirstFocusableElement(focusDomRef);\n\t\t\t\tfirstFocusable?.focus();\n\t\t\t} else {\n\t\t\t\tconst parentItem = (e.target as HTMLElement)?.closest(\"ui5-timeline-item\") as HTMLElement;\n\t\t\t\tparentItem?.focus();\n\t\t\t}\n\t\t}\n\t}\n\n\t_handleDown() {\n\t\tif (this.growsWithButton) {\n\t\t\tthis.focusGrowingButton();\n\t\t}\n\t}\n\n\tfocusGrowingButton() {\n\t\tconst items = this._navigableItems;\n\t\tconst lastIndex = items.length - 1;\n\t\tconst currentIndex = this._itemNavigation._currentIndex;\n\n\t\tif (currentIndex !== -1 && currentIndex === lastIndex) {\n\t\t\tthis.growingButton?.focus();\n\t\t}\n\t}\n\n\t_handleUp(e: KeyboardEvent) {\n\t\tif (this.growingButton === e.target) {\n\t\t\tconst items = this._navigableItems;\n\t\t\tconst lastItem = items[items.length - 1];\n\n\t\t\tthis.focusItem(lastItem);\n\n\t\t\te.preventDefault();\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\t}\n\n\t/**\n\t * Focuses a list item and sets its tabindex to \"0\" via the ItemNavigation\n\t * @protected\n\t * @param item\n\t */\n\tfocusItem(item: ITimelineItem | ToggleButton) {\n\t\tthis._itemNavigation.setCurrentItem(item);\n\t\titem.focus();\n\t}\n\n\tget hasGroupItems() {\n\t\treturn this.items.some(item => item.isGroupItem);\n\t}\n\n\tget _navigableItems() {\n\t\tconst navigatableItems: Array<ITimelineItem | ToggleButton> = [];\n\n\t\tif (!this.items.length) {\n\t\t\treturn [];\n\t\t}\n\n\t\tthis.items.forEach(item => {\n\t\t\tif (!item.isGroupItem) {\n\t\t\t\tnavigatableItems.push(item);\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst navigatableItem = item.shadowRoot!.querySelector<ToggleButton>(\"[ui5-toggle-button]\");\n\n\t\t\tif (navigatableItem) {\n\t\t\t\tnavigatableItems.push(navigatableItem);\n\t\t\t}\n\n\t\t\tif (!item.collapsed) {\n\t\t\t\titem.items?.forEach(groupItem => {\n\t\t\t\t\tnavigatableItems.push(groupItem);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\treturn navigatableItems;\n\t}\n}\n\nTimeline.define();\n\nexport default Timeline;\nexport type {\n\tITimelineItem,\n};\n"]}
|
package/dist/UserMenu.d.ts
CHANGED
|
@@ -109,6 +109,15 @@ declare class UserMenu extends UI5Element {
|
|
|
109
109
|
* @since 2.20.0
|
|
110
110
|
*/
|
|
111
111
|
footer: Slot<HTMLElement>;
|
|
112
|
+
/**
|
|
113
|
+
* Defines the content of the info area inside the User Menu's account block.
|
|
114
|
+
*
|
|
115
|
+
* **Note:** When empty, the User Menu renders unchanged.
|
|
116
|
+
*
|
|
117
|
+
* @public
|
|
118
|
+
* @since 2.24.0
|
|
119
|
+
*/
|
|
120
|
+
infoArea: Slot<HTMLElement>;
|
|
112
121
|
static i18nBundle: I18nBundle;
|
|
113
122
|
/**
|
|
114
123
|
* @default false
|
|
@@ -176,6 +185,7 @@ declare class UserMenu extends UI5Element {
|
|
|
176
185
|
get _ariaLabelledByActions(): string;
|
|
177
186
|
get _hasCustomFooter(): boolean;
|
|
178
187
|
get _showDefaultFooter(): boolean;
|
|
188
|
+
get _hasInfoArea(): boolean;
|
|
179
189
|
getAccountDescriptionText(account: UserMenuAccount): string;
|
|
180
190
|
getAccountByRefId(refId: string): UserMenuAccount;
|
|
181
191
|
captureRef(ref: HTMLElement & {
|
package/dist/UserMenu.js
CHANGED
|
@@ -273,6 +273,9 @@ let UserMenu = UserMenu_1 = class UserMenu extends UI5Element {
|
|
|
273
273
|
get _showDefaultFooter() {
|
|
274
274
|
return this.footer.length === 0;
|
|
275
275
|
}
|
|
276
|
+
get _hasInfoArea() {
|
|
277
|
+
return this.infoArea.length > 0;
|
|
278
|
+
}
|
|
276
279
|
getAccountDescriptionText(account) {
|
|
277
280
|
return `${account.titleText} ${account.subtitleText} ${account.description} ${account.selected ? UserMenu_1.i18nBundle.getText(USER_MENU_POPOVER_ACCESSIBLE_ACCOUNT_SELECTED_TXT) : ""}`;
|
|
278
281
|
}
|
|
@@ -324,6 +327,9 @@ __decorate([
|
|
|
324
327
|
__decorate([
|
|
325
328
|
slot()
|
|
326
329
|
], UserMenu.prototype, "footer", void 0);
|
|
330
|
+
__decorate([
|
|
331
|
+
slot()
|
|
332
|
+
], UserMenu.prototype, "infoArea", void 0);
|
|
327
333
|
__decorate([
|
|
328
334
|
property({ type: Boolean })
|
|
329
335
|
], UserMenu.prototype, "_titleMovedToHeader", void 0);
|
package/dist/UserMenu.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserMenu.js","sourceRoot":"","sources":["../src/UserMenu.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,EACN,aAAa,EAAE,UAAU,IAAI,IAAI,EAAE,WAAW,IAAI,KAAK,EAAE,QAAQ,GACjE,MAAM,4CAA4C,CAAC;AACpD,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,qBAAqB,MAAM,yDAAyD,CAAC;AAQ5F,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAI5E,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAE7D,QAAQ;AACR,OAAO,EACN,kCAAkC,EAClC,mCAAmC,EACnC,6BAA6B,EAC7B,iCAAiC,EACjC,yBAAyB,EACzB,2BAA2B,EAC3B,6BAA6B,EAC7B,iDAAiD,EACjD,iCAAi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;6CACR;AAqBpB;IADC,KAAK,CAAC,eAAe,CAAC;oDACgB;AAMvC;IADC,KAAK,CAAC,yBAAyB,CAAC;yDACD;AAMhC;IADC,KAAK,CAAC,8BAA8B,CAAC;2DACH;AA/C5B;IADN,IAAI,CAAC,0BAA0B,CAAC;kCACH;AAzGzB,QAAQ;IAnEb,aAAa,CAAC;QACd,GAAG,EAAE,eAAe;QACpB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,gBAAgB;QAC1B,MAAM,EAAE,CAAC,WAAW,CAAC;KACrB,CAAC;IAEF;;;OAGG;;IACF,KAAK,CAAC,cAAc,CAAC;IAEtB;;;OAGG;;IACF,KAAK,CAAC,sBAAsB,CAAC;IAE9B;;;OAGG;;IACF,KAAK,CAAC,qBAAqB,CAAC;IAE7B;;;;;OAKG;;IACF,KAAK,CAAC,gBAAgB,EAAE;QACxB,UAAU,EAAE,IAAI;KAChB,CAAC;IAEF;;;;OAIG;;IACF,KAAK,CAAC,YAAY,EAAE;QACpB,UAAU,EAAE,IAAI;KAChB,CAAC;IAEF;;;;OAIG;;IACF,KAAK,CAAC,MAAM,CAAC;IAEd;;;;OAIG;;IACF,KAAK,CAAC,OAAO,CAAC;IAEf;;;;OAIG;;IACF,KAAK,CAAC,gBAAgB,EAAE;QACxB,UAAU,EAAE,IAAI;KAChB,CAAC;GACI,QAAQ,CAsZb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { Slot, DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport {\n\tcustomElement, slotStrict as slot, eventStrict as event, property,\n} from \"@ui5/webcomponents-base/dist/decorators.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport query from \"@ui5/webcomponents-base/dist/decorators/query.js\";\nimport DOMReferenceConverter from \"@ui5/webcomponents-base/dist/converters/DOMReference.js\";\nimport type Title from \"@ui5/webcomponents/dist/Title.js\";\nimport type Button from \"@ui5/webcomponents/dist/Button.js\";\nimport type { ListItemClickEventDetail } from \"@ui5/webcomponents/dist/List.js\";\nimport type ListItemBase from \"@ui5/webcomponents/dist/ListItemBase.js\";\nimport type ResponsivePopover from \"@ui5/webcomponents/dist/ResponsivePopover.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { PopupScrollEventDetail } from \"@ui5/webcomponents/dist/Popup.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport { isInstanceOfMenuItem } from \"@ui5/webcomponents/dist/MenuItem.js\";\nimport { isPhone, isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport type { Timeout } from \"@ui5/webcomponents-base/dist/types.js\";\nimport type UserMenuAccount from \"./UserMenuAccount.js\";\nimport type UserMenuItem from \"./UserMenuItem.js\";\nimport UserMenuTemplate from \"./UserMenuTemplate.js\";\nimport UserMenuCss from \"./generated/themes/UserMenu.css.js\";\n\n// Texts\nimport {\n\tUSER_MENU_OTHER_ACCOUNT_BUTTON_TXT,\n\tUSER_MENU_MANAGE_ACCOUNT_BUTTON_TXT,\n\tUSER_MENU_SIGN_OUT_BUTTON_TXT,\n\tUSER_MENU_POPOVER_ACCESSIBLE_NAME,\n\tUSER_MENU_EDIT_AVATAR_TXT,\n\tUSER_MENU_EDIT_ACCOUNTS_TXT,\n\tUSER_MENU_CLOSE_DIALOG_BUTTON,\n\tUSER_MENU_POPOVER_ACCESSIBLE_ACCOUNT_SELECTED_TXT,\n\tUSER_MENU_CURRENT_INFORMATION_TXT,\n\tUSER_MENU_ACTIONS_TXT,\n} from \"./generated/i18n/i18n-defaults.js\";\n\nconst MENU_OPEN_DELAY = 300;\n\ntype UserMenuItemClickEventDetail = {\n\titem: UserMenuItem;\n}\n\ntype UserMenuOtherAccountClickEventDetail = {\n\tprevSelectedAccount: UserMenuAccount;\n\tselectedAccount: UserMenuAccount;\n}\n\n/**\n * @class\n * ### Overview\n *\n * The `ui5-user-menu` is an SAP Fiori specific web component that is used in `ui5-shellbar`\n * and allows the user to easily see information and settings for the current user and all other logged in accounts.\n *\n * ### ES6 Module Import\n * `import \"@ui5/webcomponents-fiori/dist/UserMenu.js\";`\n *\n * `import \"@ui5/webcomponents-fiori/dist/UserMenuItem.js\";` (for `ui5-user-menu-item`)\n *\n * @constructor\n * @extends UI5Element\n * @public\n * @since 2.5.0\n */\n\n@customElement({\n\ttag: \"ui5-user-menu\",\n\tlanguageAware: true,\n\trenderer: jsxRenderer,\n\ttemplate: UserMenuTemplate,\n\tstyles: [UserMenuCss],\n})\n\n/**\n * Fired when the account avatar is selected.\n * @public\n */\n@event(\"avatar-click\")\n\n/**\n * Fired when the \"Manage Account\" button is selected.\n * @public\n */\n@event(\"manage-account-click\")\n\n/**\n * Fired when the \"Edit Accounts\" button is selected.\n * @public\n */\n@event(\"edit-accounts-click\")\n\n/**\n * Fired when the account is switched to a different one.\n * @param {UserMenuAccount} prevSelectedAccount The previously selected account.\n * @param {UserMenuAccount} selectedAccount The selected account.\n * @public\n */\n@event(\"change-account\", {\n\tcancelable: true,\n})\n\n/**\n * Fired when a menu item is selected.\n * @param {UserMenuItem} item The selected `user menu item`.\n * @public\n */\n@event(\"item-click\", {\n\tcancelable: true,\n})\n\n/**\n * Fired when a user menu is open.\n * @public\n * @since 2.6.0\n */\n@event(\"open\")\n\n/**\n * Fired when a user menu is close.\n * @public\n * @since 2.6.0\n */\n@event(\"close\")\n\n/**\n * Fired when the \"Sign Out\" button is selected.\n * @public\n * @since 2.6.0\n */\n@event(\"sign-out-click\", {\n\tcancelable: true,\n})\nclass UserMenu extends UI5Element {\n\teventDetails!: {\n\t\t\"avatar-click\": void;\n\t\t\"manage-account-click\": void;\n\t\t\"edit-accounts-click\": void;\n\t\t\"change-account\": UserMenuOtherAccountClickEventDetail;\n\t\t\"item-click\": UserMenuItemClickEventDetail;\n\t\t\"sign-out-click\": void;\n\t\t\"open\": void;\n\t\t\"close\": void;\n\n\t}\n\t/**\n\t * Defines if the User Menu is opened.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\topen = false;\n\n\t/**\n\t * Defines the ID or DOM Reference of the element at which the user menu is shown.\n\t * When using this attribute in a declarative way, you must only use the `id` (as a string) of the element at which you want to show the popover.\n\t * You can only set the `opener` attribute to a DOM Reference when using JavaScript.\n\t * @public\n\t * @default undefined\n\t */\n\t@property({ converter: DOMReferenceConverter })\n\topener?: HTMLElement | string | null;\n\n\t/**\n\t * Defines if the User Menu shows the Manage Account option.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowManageAccount = false;\n\n\t/**\n\t * Defines if the User Menu shows the Other Accounts option.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowOtherAccounts = false;\n\n\t/**\n\t * Defines if the User Menu shows the Edit Accounts option.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowEditAccounts = false;\n\n\t/**\n\t * Defines if the User menu shows edit button.\n\t *\n\t * @default false\n\t * @public\n\t * @since 2.7.0\n\t */\n\t@property({ type: Boolean })\n\tshowEditButton = false;\n\n\t/**\n\t * Defines the menu items.\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\t\"default\": true,\n\t})\n\tmenuItems!: DefaultSlot<UserMenuItem>;\n\n\t/**\n\t * Defines the user accounts.\n\t *\n\t * **Note:** If one item is used, it will be shown as the selected one. If more than one item is used, the first one will be shown as selected unless\n\t * there is an item with `selected` property set to `true`.\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\tinvalidateOnChildChange: {\n\t\t\tproperties: true,\n\t\t\tslots: false,\n\t\t},\n\t})\n\taccounts!: Slot<UserMenuAccount>;\n\n\t/**\n\t * Defines custom footer content.\n\t *\n\t * **Note:** When provided, replaces the default \"Sign Out\" button. Use an empty element to hide the footer completely.\n\t * @public\n\t * @since 2.20.0\n\t */\n\t@slot()\n\tfooter!: Slot<HTMLElement>;\n\n\t@i18n(\"@ui5/webcomponents-fiori\")\n\tstatic i18nBundle: I18nBundle;\n\n\t/**\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_titleMovedToHeader = false;\n\n\t/**\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_isScrolled = false;\n\n\t/**\n\t * @private\n\t */\n\t_selectedAccount!: UserMenuAccount;\n\n\t/**\n\t * @private\n\t */\n\t_observer?: IntersectionObserver;\n\n\t/**\n\t * @private\n\t */\n\t_timeout?: Timeout;\n\n\t/**\n\t * @private\n\t */\n\t@query(\"#user-menu-rp\")\n\t_responsivePopover?: ResponsivePopover;\n\n\t/**\n\t * @private\n\t */\n\t@query(\"#selected-account-title\")\n\t_selectedAccountTitleEl?: Title;\n\n\t/**\n\t * @private\n\t */\n\t@query(\"#selected-account-manage-btn\")\n\t_selectedAccountManageBtn?: Button;\n\n\tonBeforeRendering() {\n\t\tthis._selectedAccount = this.accounts.find(account => account.selected) || this.accounts[0];\n\t\tconst siblingsWithIcon = this._menuItems.some(menuItem => !!menuItem.icon);\n\n\t\tthis._menuItems.forEach(item => {\n\t\t\titem._siblingsWithIcon = siblingsWithIcon;\n\t\t});\n\t}\n\n\tonAfterRendering(): void {\n\t\tif (this._responsivePopover && this.open && !this._observer) {\n\t\t\tthis._setupObserver();\n\t\t}\n\t}\n\n\t_setupObserver() {\n\t\tconst observerOptions = {\n\t\t\tthreshold: [0.15],\n\t\t};\n\n\t\tthis._observer?.disconnect();\n\t\tthis._observer = new IntersectionObserver(entries => this._handleIntersection(entries), observerOptions);\n\n\t\tif (this._selectedAccountTitleEl) {\n\t\t\tthis._observer.observe(this._selectedAccountTitleEl);\n\t\t}\n\n\t\tif (this._selectedAccountManageBtn) {\n\t\t\tthis._observer.observe(this._selectedAccountManageBtn);\n\t\t}\n\t}\n\n\tget _isPhone() {\n\t\treturn isPhone();\n\t}\n\n\t_handleScroll(e: CustomEvent<PopupScrollEventDetail>) {\n\t\tthis._isScrolled = e.detail.scrollTop > 0;\n\t}\n\n\t_handleIntersection(entries: IntersectionObserverEntry[]) {\n\t\tentries.forEach(entry => {\n\t\t\tif (entry.isIntersecting) {\n\t\t\t\tif (entry.target.id === \"selected-account-title\") {\n\t\t\t\t\tthis._titleMovedToHeader = false;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (entry.target.id === \"selected-account-title\") {\n\t\t\t\tthis._titleMovedToHeader = true;\n\t\t\t}\n\t\t}, this);\n\t}\n\n\t_handleAvatarClick(e: CustomEvent) {\n\t\tif (e.type === \"click\") {\n\t\t\t// TOFIX: Discuss this check: Fire the custom UserMenu#avatar-click only for Avatar#click (not for Avatar#ui5-click as well).\n\t\t\tthis.fireDecoratorEvent(\"avatar-click\");\n\t\t}\n\t}\n\n\t_handleManageAccountClick() {\n\t\tthis.fireDecoratorEvent(\"manage-account-click\");\n\t}\n\n\t_handleEditAccountsClick() {\n\t\tthis.fireDecoratorEvent(\"edit-accounts-click\");\n\t}\n\n\t_handleAccountSwitch(e: CustomEvent<ListItemClickEventDetail>) {\n\t\tconst item = e.detail.item as ListItemBase & { associatedAccount: UserMenuAccount };\n\t\tconst eventPrevented = !this.fireDecoratorEvent(\"change-account\", {\n\t\t\tprevSelectedAccount: this._selectedAccount,\n\t\t\tselectedAccount: item.associatedAccount,\n\t\t});\n\t\tif (eventPrevented) {\n\t\t\treturn;\n\t\t}\n\t\tthis._selectedAccount.selected = false;\n\t\titem.associatedAccount.selected = true;\n\t}\n\n\t_handleSignOutClick() {\n\t\tconst eventPrevented = !this.fireDecoratorEvent(\"sign-out-click\");\n\n\t\tif (eventPrevented) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._closeUserMenu();\n\t}\n\n\t_handleMenuItemClick(e: CustomEvent<ListItemClickEventDetail>) {\n\t\tconst item = e.detail.item as UserMenuItem;\n\n\t\titem._updateCheckedState();\n\n\t\tif (!item._popover) {\n\t\t\tconst eventPrevented = !this.fireDecoratorEvent(\"item-click\", {\n\t\t\t\t\"item\": item,\n\t\t\t});\n\n\t\t\tif (!eventPrevented) {\n\t\t\t\titem.fireEvent(\"close-menu\");\n\t\t\t}\n\t\t} else {\n\t\t\tthis._closeOtherSubMenus(item);\n\t\t\tthis._openItemSubMenu(item);\n\t\t}\n\t}\n\n\t_handleMenuItemClose() {\n\t\tthis._closeUserMenu();\n\t}\n\n\t_handlePopoverAfterOpen() {\n\t\tthis._titleMovedToHeader = false;\n\t\tthis._isScrolled = false;\n\t\tthis._setupObserver();\n\t\tthis.fireDecoratorEvent(\"open\");\n\t}\n\n\t_handlePopoverAfterClose() {\n\t\tthis._observer?.disconnect();\n\t\tthis._observer = undefined;\n\t\tthis._titleMovedToHeader = false;\n\t\tthis._isScrolled = false;\n\t\tthis.open = false;\n\t\tthis.fireDecoratorEvent(\"close\");\n\t}\n\n\t_itemMouseOver(e: MouseEvent) {\n\t\tif (!isDesktop()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst item = e.target as UserMenuItem;\n\t\tif (!isInstanceOfMenuItem(item)) {\n\t\t\treturn;\n\t\t}\n\n\t\titem.getFocusDomRef()?.focus();\n\t\tthis._startOpenTimeout(item);\n\t}\n\n\t_startOpenTimeout(item: UserMenuItem) {\n\t\tclearTimeout(this._timeout);\n\n\t\tthis._timeout = setTimeout(() => {\n\t\t\tthis._closeOtherSubMenus(item);\n\t\t\tthis._openItemSubMenu(item, true);\n\t\t}, MENU_OPEN_DELAY);\n\t}\n\n\t_closeOtherSubMenus(item: UserMenuItem) {\n\t\tif (!this._menuItems.includes(item)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._menuItems.forEach(menuItem => {\n\t\t\tif (menuItem !== item) {\n\t\t\t\tmenuItem._close();\n\t\t\t}\n\t\t});\n\t}\n\n\t_openItemSubMenu(item: UserMenuItem, openedByMouse = false) {\n\t\tclearTimeout(this._timeout);\n\n\t\tif (!item._popover || item._popover.open) {\n\t\t\treturn;\n\t\t}\n\n\t\titem._popover.opener = item;\n\t\titem._popover.open = true;\n\t\titem.selected = true;\n\t\titem._openedByMouse = openedByMouse;\n\t}\n\n\t_closeUserMenu() {\n\t\tthis.open = false;\n\t}\n\n\tget _otherAccounts() {\n\t\treturn this.accounts;\n\t}\n\n\tget _manageAccountButtonText() {\n\t\treturn UserMenu.i18nBundle.getText(USER_MENU_MANAGE_ACCOUNT_BUTTON_TXT);\n\t}\n\n\tget _otherAccountsButtonText() {\n\t\treturn UserMenu.i18nBundle.getText(USER_MENU_OTHER_ACCOUNT_BUTTON_TXT);\n\t}\n\n\tget _signOutButtonText() {\n\t\treturn UserMenu.i18nBundle.getText(USER_MENU_SIGN_OUT_BUTTON_TXT);\n\t}\n\n\tget _editAvatarTooltip() {\n\t\treturn UserMenu.i18nBundle.getText(USER_MENU_EDIT_AVATAR_TXT);\n\t}\n\n\tget _editAccountsTooltip() {\n\t\treturn UserMenu.i18nBundle.getText(USER_MENU_EDIT_ACCOUNTS_TXT);\n\t}\n\n\tget _closeDialogAriaLabel() {\n\t\treturn UserMenu.i18nBundle.getText(USER_MENU_CLOSE_DIALOG_BUTTON);\n\t}\n\n\tget accessibleNameText() {\n\t\tif (!this._selectedAccount) {\n\t\t\treturn \"\";\n\t\t}\n\t\treturn `${UserMenu.i18nBundle.getText(USER_MENU_POPOVER_ACCESSIBLE_NAME)} ${this._selectedAccount.titleText}`;\n\t}\n\n\tget _ariaLabelledByAccountInformationText() {\n\t\treturn UserMenu.i18nBundle.getText(USER_MENU_CURRENT_INFORMATION_TXT);\n\t}\n\n\tget _ariaLabelledByActions() {\n\t\treturn UserMenu.i18nBundle.getText(USER_MENU_ACTIONS_TXT);\n\t}\n\n\tget _hasCustomFooter(): boolean {\n\t\treturn this.footer.length > 0 && this.footer[0]?.innerHTML.trim() !== \"\";\n\t}\n\n\tget _showDefaultFooter(): boolean {\n\t\treturn this.footer.length === 0;\n\t}\n\n\tgetAccountDescriptionText(account: UserMenuAccount) {\n\t\treturn `${account.titleText} ${account.subtitleText} ${account.description} ${account.selected ? UserMenu.i18nBundle.getText(USER_MENU_POPOVER_ACCESSIBLE_ACCOUNT_SELECTED_TXT) : \"\"}`;\n\t}\n\n\tgetAccountByRefId(refId: string) {\n\t\treturn this.accounts.find(account => account._id === refId)!;\n\t}\n\n\tcaptureRef(ref: HTMLElement & { associatedAccount?: UI5Element} | null) {\n\t\tif (ref) {\n\t\t\tref.associatedAccount = this;\n\t\t}\n\t}\n\n\tget _menuItems() {\n\t\treturn this.menuItems.filter(isInstanceOfMenuItem);\n\t}\n}\n\nUserMenu.define();\n\nexport default UserMenu;\nexport type {\n\tUserMenuItemClickEventDetail,\n\tUserMenuOtherAccountClickEventDetail,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"UserMenu.js","sourceRoot":"","sources":["../src/UserMenu.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,EACN,aAAa,EAAE,UAAU,IAAI,IAAI,EAAE,WAAW,IAAI,KAAK,EAAE,QAAQ,GACjE,MAAM,4CAA4C,CAAC;AACpD,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,qBAAqB,MAAM,yDAAyD,CAAC;AAQ5F,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAI5E,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAE7D,QAAQ;AACR,OAAO,EACN,kCAAkC,EAClC,mCAAmC,EACnC,6BAA6B,EAC7B,iCAAiC,EACjC,yBAAyB,EACzB,2B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AE;wCACoB;AAW3B;IADC,IAAI,EAAE;0CACsB;AAU7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;qDACA;AAO5B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6CACR;AAqBpB;IADC,KAAK,CAAC,eAAe,CAAC;oDACgB;AAMvC;IADC,KAAK,CAAC,yBAAyB,CAAC;yDACD;AAMhC;IADC,KAAK,CAAC,8BAA8B,CAAC;2DACH;AA/C5B;IADN,IAAI,CAAC,0BAA0B,CAAC;kCACH;AApHzB,QAAQ;IAnEb,aAAa,CAAC;QACd,GAAG,EAAE,eAAe;QACpB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,gBAAgB;QAC1B,MAAM,EAAE,CAAC,WAAW,CAAC;KACrB,CAAC;IAEF;;;OAGG;;IACF,KAAK,CAAC,cAAc,CAAC;IAEtB;;;OAGG;;IACF,KAAK,CAAC,sBAAsB,CAAC;IAE9B;;;OAGG;;IACF,KAAK,CAAC,qBAAqB,CAAC;IAE7B;;;;;OAKG;;IACF,KAAK,CAAC,gBAAgB,EAAE;QACxB,UAAU,EAAE,IAAI;KAChB,CAAC;IAEF;;;;OAIG;;IACF,KAAK,CAAC,YAAY,EAAE;QACpB,UAAU,EAAE,IAAI;KAChB,CAAC;IAEF;;;;OAIG;;IACF,KAAK,CAAC,MAAM,CAAC;IAEd;;;;OAIG;;IACF,KAAK,CAAC,OAAO,CAAC;IAEf;;;;OAIG;;IACF,KAAK,CAAC,gBAAgB,EAAE;QACxB,UAAU,EAAE,IAAI;KAChB,CAAC;GACI,QAAQ,CAqab;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { Slot, DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport {\n\tcustomElement, slotStrict as slot, eventStrict as event, property,\n} from \"@ui5/webcomponents-base/dist/decorators.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport query from \"@ui5/webcomponents-base/dist/decorators/query.js\";\nimport DOMReferenceConverter from \"@ui5/webcomponents-base/dist/converters/DOMReference.js\";\nimport type Title from \"@ui5/webcomponents/dist/Title.js\";\nimport type Button from \"@ui5/webcomponents/dist/Button.js\";\nimport type { ListItemClickEventDetail } from \"@ui5/webcomponents/dist/List.js\";\nimport type ListItemBase from \"@ui5/webcomponents/dist/ListItemBase.js\";\nimport type ResponsivePopover from \"@ui5/webcomponents/dist/ResponsivePopover.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { PopupScrollEventDetail } from \"@ui5/webcomponents/dist/Popup.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport { isInstanceOfMenuItem } from \"@ui5/webcomponents/dist/MenuItem.js\";\nimport { isPhone, isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport type { Timeout } from \"@ui5/webcomponents-base/dist/types.js\";\nimport type UserMenuAccount from \"./UserMenuAccount.js\";\nimport type UserMenuItem from \"./UserMenuItem.js\";\nimport UserMenuTemplate from \"./UserMenuTemplate.js\";\nimport UserMenuCss from \"./generated/themes/UserMenu.css.js\";\n\n// Texts\nimport {\n\tUSER_MENU_OTHER_ACCOUNT_BUTTON_TXT,\n\tUSER_MENU_MANAGE_ACCOUNT_BUTTON_TXT,\n\tUSER_MENU_SIGN_OUT_BUTTON_TXT,\n\tUSER_MENU_POPOVER_ACCESSIBLE_NAME,\n\tUSER_MENU_EDIT_AVATAR_TXT,\n\tUSER_MENU_EDIT_ACCOUNTS_TXT,\n\tUSER_MENU_CLOSE_DIALOG_BUTTON,\n\tUSER_MENU_POPOVER_ACCESSIBLE_ACCOUNT_SELECTED_TXT,\n\tUSER_MENU_CURRENT_INFORMATION_TXT,\n\tUSER_MENU_ACTIONS_TXT,\n} from \"./generated/i18n/i18n-defaults.js\";\n\nconst MENU_OPEN_DELAY = 300;\n\ntype UserMenuItemClickEventDetail = {\n\titem: UserMenuItem;\n}\n\ntype UserMenuOtherAccountClickEventDetail = {\n\tprevSelectedAccount: UserMenuAccount;\n\tselectedAccount: UserMenuAccount;\n}\n\n/**\n * @class\n * ### Overview\n *\n * The `ui5-user-menu` is an SAP Fiori specific web component that is used in `ui5-shellbar`\n * and allows the user to easily see information and settings for the current user and all other logged in accounts.\n *\n * ### ES6 Module Import\n * `import \"@ui5/webcomponents-fiori/dist/UserMenu.js\";`\n *\n * `import \"@ui5/webcomponents-fiori/dist/UserMenuItem.js\";` (for `ui5-user-menu-item`)\n *\n * @constructor\n * @extends UI5Element\n * @public\n * @since 2.5.0\n */\n\n@customElement({\n\ttag: \"ui5-user-menu\",\n\tlanguageAware: true,\n\trenderer: jsxRenderer,\n\ttemplate: UserMenuTemplate,\n\tstyles: [UserMenuCss],\n})\n\n/**\n * Fired when the account avatar is selected.\n * @public\n */\n@event(\"avatar-click\")\n\n/**\n * Fired when the \"Manage Account\" button is selected.\n * @public\n */\n@event(\"manage-account-click\")\n\n/**\n * Fired when the \"Edit Accounts\" button is selected.\n * @public\n */\n@event(\"edit-accounts-click\")\n\n/**\n * Fired when the account is switched to a different one.\n * @param {UserMenuAccount} prevSelectedAccount The previously selected account.\n * @param {UserMenuAccount} selectedAccount The selected account.\n * @public\n */\n@event(\"change-account\", {\n\tcancelable: true,\n})\n\n/**\n * Fired when a menu item is selected.\n * @param {UserMenuItem} item The selected `user menu item`.\n * @public\n */\n@event(\"item-click\", {\n\tcancelable: true,\n})\n\n/**\n * Fired when a user menu is open.\n * @public\n * @since 2.6.0\n */\n@event(\"open\")\n\n/**\n * Fired when a user menu is close.\n * @public\n * @since 2.6.0\n */\n@event(\"close\")\n\n/**\n * Fired when the \"Sign Out\" button is selected.\n * @public\n * @since 2.6.0\n */\n@event(\"sign-out-click\", {\n\tcancelable: true,\n})\nclass UserMenu extends UI5Element {\n\teventDetails!: {\n\t\t\"avatar-click\": void;\n\t\t\"manage-account-click\": void;\n\t\t\"edit-accounts-click\": void;\n\t\t\"change-account\": UserMenuOtherAccountClickEventDetail;\n\t\t\"item-click\": UserMenuItemClickEventDetail;\n\t\t\"sign-out-click\": void;\n\t\t\"open\": void;\n\t\t\"close\": void;\n\n\t}\n\t/**\n\t * Defines if the User Menu is opened.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\topen = false;\n\n\t/**\n\t * Defines the ID or DOM Reference of the element at which the user menu is shown.\n\t * When using this attribute in a declarative way, you must only use the `id` (as a string) of the element at which you want to show the popover.\n\t * You can only set the `opener` attribute to a DOM Reference when using JavaScript.\n\t * @public\n\t * @default undefined\n\t */\n\t@property({ converter: DOMReferenceConverter })\n\topener?: HTMLElement | string | null;\n\n\t/**\n\t * Defines if the User Menu shows the Manage Account option.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowManageAccount = false;\n\n\t/**\n\t * Defines if the User Menu shows the Other Accounts option.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowOtherAccounts = false;\n\n\t/**\n\t * Defines if the User Menu shows the Edit Accounts option.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowEditAccounts = false;\n\n\t/**\n\t * Defines if the User menu shows edit button.\n\t *\n\t * @default false\n\t * @public\n\t * @since 2.7.0\n\t */\n\t@property({ type: Boolean })\n\tshowEditButton = false;\n\n\t/**\n\t * Defines the menu items.\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\t\"default\": true,\n\t})\n\tmenuItems!: DefaultSlot<UserMenuItem>;\n\n\t/**\n\t * Defines the user accounts.\n\t *\n\t * **Note:** If one item is used, it will be shown as the selected one. If more than one item is used, the first one will be shown as selected unless\n\t * there is an item with `selected` property set to `true`.\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\tinvalidateOnChildChange: {\n\t\t\tproperties: true,\n\t\t\tslots: false,\n\t\t},\n\t})\n\taccounts!: Slot<UserMenuAccount>;\n\n\t/**\n\t * Defines custom footer content.\n\t *\n\t * **Note:** When provided, replaces the default \"Sign Out\" button. Use an empty element to hide the footer completely.\n\t * @public\n\t * @since 2.20.0\n\t */\n\t@slot()\n\tfooter!: Slot<HTMLElement>;\n\n\t/**\n\t * Defines the content of the info area inside the User Menu's account block.\n\t *\n\t * **Note:** When empty, the User Menu renders unchanged.\n\t *\n\t * @public\n\t * @since 2.24.0\n\t */\n\t@slot()\n\tinfoArea!: Slot<HTMLElement>;\n\n\t@i18n(\"@ui5/webcomponents-fiori\")\n\tstatic i18nBundle: I18nBundle;\n\n\t/**\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_titleMovedToHeader = false;\n\n\t/**\n\t * @default false\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_isScrolled = false;\n\n\t/**\n\t * @private\n\t */\n\t_selectedAccount!: UserMenuAccount;\n\n\t/**\n\t * @private\n\t */\n\t_observer?: IntersectionObserver;\n\n\t/**\n\t * @private\n\t */\n\t_timeout?: Timeout;\n\n\t/**\n\t * @private\n\t */\n\t@query(\"#user-menu-rp\")\n\t_responsivePopover?: ResponsivePopover;\n\n\t/**\n\t * @private\n\t */\n\t@query(\"#selected-account-title\")\n\t_selectedAccountTitleEl?: Title;\n\n\t/**\n\t * @private\n\t */\n\t@query(\"#selected-account-manage-btn\")\n\t_selectedAccountManageBtn?: Button;\n\n\tonBeforeRendering() {\n\t\tthis._selectedAccount = this.accounts.find(account => account.selected) || this.accounts[0];\n\t\tconst siblingsWithIcon = this._menuItems.some(menuItem => !!menuItem.icon);\n\n\t\tthis._menuItems.forEach(item => {\n\t\t\titem._siblingsWithIcon = siblingsWithIcon;\n\t\t});\n\t}\n\n\tonAfterRendering(): void {\n\t\tif (this._responsivePopover && this.open && !this._observer) {\n\t\t\tthis._setupObserver();\n\t\t}\n\t}\n\n\t_setupObserver() {\n\t\tconst observerOptions = {\n\t\t\tthreshold: [0.15],\n\t\t};\n\n\t\tthis._observer?.disconnect();\n\t\tthis._observer = new IntersectionObserver(entries => this._handleIntersection(entries), observerOptions);\n\n\t\tif (this._selectedAccountTitleEl) {\n\t\t\tthis._observer.observe(this._selectedAccountTitleEl);\n\t\t}\n\n\t\tif (this._selectedAccountManageBtn) {\n\t\t\tthis._observer.observe(this._selectedAccountManageBtn);\n\t\t}\n\t}\n\n\tget _isPhone() {\n\t\treturn isPhone();\n\t}\n\n\t_handleScroll(e: CustomEvent<PopupScrollEventDetail>) {\n\t\tthis._isScrolled = e.detail.scrollTop > 0;\n\t}\n\n\t_handleIntersection(entries: IntersectionObserverEntry[]) {\n\t\tentries.forEach(entry => {\n\t\t\tif (entry.isIntersecting) {\n\t\t\t\tif (entry.target.id === \"selected-account-title\") {\n\t\t\t\t\tthis._titleMovedToHeader = false;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (entry.target.id === \"selected-account-title\") {\n\t\t\t\tthis._titleMovedToHeader = true;\n\t\t\t}\n\t\t}, this);\n\t}\n\n\t_handleAvatarClick(e: CustomEvent) {\n\t\tif (e.type === \"click\") {\n\t\t\t// TOFIX: Discuss this check: Fire the custom UserMenu#avatar-click only for Avatar#click (not for Avatar#ui5-click as well).\n\t\t\tthis.fireDecoratorEvent(\"avatar-click\");\n\t\t}\n\t}\n\n\t_handleManageAccountClick() {\n\t\tthis.fireDecoratorEvent(\"manage-account-click\");\n\t}\n\n\t_handleEditAccountsClick() {\n\t\tthis.fireDecoratorEvent(\"edit-accounts-click\");\n\t}\n\n\t_handleAccountSwitch(e: CustomEvent<ListItemClickEventDetail>) {\n\t\tconst item = e.detail.item as ListItemBase & { associatedAccount: UserMenuAccount };\n\t\tconst eventPrevented = !this.fireDecoratorEvent(\"change-account\", {\n\t\t\tprevSelectedAccount: this._selectedAccount,\n\t\t\tselectedAccount: item.associatedAccount,\n\t\t});\n\t\tif (eventPrevented) {\n\t\t\treturn;\n\t\t}\n\t\tthis._selectedAccount.selected = false;\n\t\titem.associatedAccount.selected = true;\n\t}\n\n\t_handleSignOutClick() {\n\t\tconst eventPrevented = !this.fireDecoratorEvent(\"sign-out-click\");\n\n\t\tif (eventPrevented) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._closeUserMenu();\n\t}\n\n\t_handleMenuItemClick(e: CustomEvent<ListItemClickEventDetail>) {\n\t\tconst item = e.detail.item as UserMenuItem;\n\n\t\titem._updateCheckedState();\n\n\t\tif (!item._popover) {\n\t\t\tconst eventPrevented = !this.fireDecoratorEvent(\"item-click\", {\n\t\t\t\t\"item\": item,\n\t\t\t});\n\n\t\t\tif (!eventPrevented) {\n\t\t\t\titem.fireEvent(\"close-menu\");\n\t\t\t}\n\t\t} else {\n\t\t\tthis._closeOtherSubMenus(item);\n\t\t\tthis._openItemSubMenu(item);\n\t\t}\n\t}\n\n\t_handleMenuItemClose() {\n\t\tthis._closeUserMenu();\n\t}\n\n\t_handlePopoverAfterOpen() {\n\t\tthis._titleMovedToHeader = false;\n\t\tthis._isScrolled = false;\n\t\tthis._setupObserver();\n\t\tthis.fireDecoratorEvent(\"open\");\n\t}\n\n\t_handlePopoverAfterClose() {\n\t\tthis._observer?.disconnect();\n\t\tthis._observer = undefined;\n\t\tthis._titleMovedToHeader = false;\n\t\tthis._isScrolled = false;\n\t\tthis.open = false;\n\t\tthis.fireDecoratorEvent(\"close\");\n\t}\n\n\t_itemMouseOver(e: MouseEvent) {\n\t\tif (!isDesktop()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst item = e.target as UserMenuItem;\n\t\tif (!isInstanceOfMenuItem(item)) {\n\t\t\treturn;\n\t\t}\n\n\t\titem.getFocusDomRef()?.focus();\n\t\tthis._startOpenTimeout(item);\n\t}\n\n\t_startOpenTimeout(item: UserMenuItem) {\n\t\tclearTimeout(this._timeout);\n\n\t\tthis._timeout = setTimeout(() => {\n\t\t\tthis._closeOtherSubMenus(item);\n\t\t\tthis._openItemSubMenu(item, true);\n\t\t}, MENU_OPEN_DELAY);\n\t}\n\n\t_closeOtherSubMenus(item: UserMenuItem) {\n\t\tif (!this._menuItems.includes(item)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._menuItems.forEach(menuItem => {\n\t\t\tif (menuItem !== item) {\n\t\t\t\tmenuItem._close();\n\t\t\t}\n\t\t});\n\t}\n\n\t_openItemSubMenu(item: UserMenuItem, openedByMouse = false) {\n\t\tclearTimeout(this._timeout);\n\n\t\tif (!item._popover || item._popover.open) {\n\t\t\treturn;\n\t\t}\n\n\t\titem._popover.opener = item;\n\t\titem._popover.open = true;\n\t\titem.selected = true;\n\t\titem._openedByMouse = openedByMouse;\n\t}\n\n\t_closeUserMenu() {\n\t\tthis.open = false;\n\t}\n\n\tget _otherAccounts() {\n\t\treturn this.accounts;\n\t}\n\n\tget _manageAccountButtonText() {\n\t\treturn UserMenu.i18nBundle.getText(USER_MENU_MANAGE_ACCOUNT_BUTTON_TXT);\n\t}\n\n\tget _otherAccountsButtonText() {\n\t\treturn UserMenu.i18nBundle.getText(USER_MENU_OTHER_ACCOUNT_BUTTON_TXT);\n\t}\n\n\tget _signOutButtonText() {\n\t\treturn UserMenu.i18nBundle.getText(USER_MENU_SIGN_OUT_BUTTON_TXT);\n\t}\n\n\tget _editAvatarTooltip() {\n\t\treturn UserMenu.i18nBundle.getText(USER_MENU_EDIT_AVATAR_TXT);\n\t}\n\n\tget _editAccountsTooltip() {\n\t\treturn UserMenu.i18nBundle.getText(USER_MENU_EDIT_ACCOUNTS_TXT);\n\t}\n\n\tget _closeDialogAriaLabel() {\n\t\treturn UserMenu.i18nBundle.getText(USER_MENU_CLOSE_DIALOG_BUTTON);\n\t}\n\n\tget accessibleNameText() {\n\t\tif (!this._selectedAccount) {\n\t\t\treturn \"\";\n\t\t}\n\t\treturn `${UserMenu.i18nBundle.getText(USER_MENU_POPOVER_ACCESSIBLE_NAME)} ${this._selectedAccount.titleText}`;\n\t}\n\n\tget _ariaLabelledByAccountInformationText() {\n\t\treturn UserMenu.i18nBundle.getText(USER_MENU_CURRENT_INFORMATION_TXT);\n\t}\n\n\tget _ariaLabelledByActions() {\n\t\treturn UserMenu.i18nBundle.getText(USER_MENU_ACTIONS_TXT);\n\t}\n\n\tget _hasCustomFooter(): boolean {\n\t\treturn this.footer.length > 0 && this.footer[0]?.innerHTML.trim() !== \"\";\n\t}\n\n\tget _showDefaultFooter(): boolean {\n\t\treturn this.footer.length === 0;\n\t}\n\n\tget _hasInfoArea(): boolean {\n\t\treturn this.infoArea.length > 0;\n\t}\n\n\tgetAccountDescriptionText(account: UserMenuAccount) {\n\t\treturn `${account.titleText} ${account.subtitleText} ${account.description} ${account.selected ? UserMenu.i18nBundle.getText(USER_MENU_POPOVER_ACCESSIBLE_ACCOUNT_SELECTED_TXT) : \"\"}`;\n\t}\n\n\tgetAccountByRefId(refId: string) {\n\t\treturn this.accounts.find(account => account._id === refId)!;\n\t}\n\n\tcaptureRef(ref: HTMLElement & { associatedAccount?: UI5Element} | null) {\n\t\tif (ref) {\n\t\t\tref.associatedAccount = this;\n\t\t}\n\t}\n\n\tget _menuItems() {\n\t\treturn this.menuItems.filter(isInstanceOfMenuItem);\n\t}\n}\n\nUserMenu.define();\n\nexport default UserMenu;\nexport type {\n\tUserMenuItemClickEventDetail,\n\tUserMenuOtherAccountClickEventDetail,\n};\n"]}
|
package/dist/UserMenuTemplate.js
CHANGED
|
@@ -37,7 +37,8 @@ function headerContent() {
|
|
|
37
37
|
_jsx(Text, { id: "selected-account-title", class: "ui5-user-menu-selected-account-title", children: this._selectedAccount.titleText }), this._selectedAccount.subtitleText &&
|
|
38
38
|
_jsx(Text, { class: "ui5-user-menu-selected-account-subtitleText", children: this._selectedAccount.subtitleText }), this._selectedAccount.description &&
|
|
39
39
|
_jsx(Text, { class: "ui5-user-menu-selected-account-description", children: this._selectedAccount.description }), this._selectedAccount.additionalInfo &&
|
|
40
|
-
_jsx(Text, { class: "ui5-user-menu-selected-account-additional-info", children: this._selectedAccount.additionalInfo }), this.
|
|
40
|
+
_jsx(Text, { class: "ui5-user-menu-selected-account-additional-info", children: this._selectedAccount.additionalInfo }), this._hasInfoArea &&
|
|
41
|
+
_jsx("div", { class: "ui5-user-menu-info-area", children: _jsx("slot", { name: "infoArea" }) }), this.showManageAccount &&
|
|
41
42
|
_jsx(Button, { id: "selected-account-manage-btn", icon: userSettings, class: "ui5-user-menu-manage-account-btn", onClick: this._handleManageAccountClick, children: this._manageAccountButtonText })] }) }));
|
|
42
43
|
}
|
|
43
44
|
function otherAccountsContent() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserMenuTemplate.js","sourceRoot":"","sources":["../src/UserMenuTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,mCAAmC,CAAC;AACvD,OAAO,MAAM,MAAM,mCAAmC,CAAC;AACvD,OAAO,IAAI,MAAM,iCAAiC,CAAC;AACnD,OAAO,GAAG,MAAM,gCAAgC,CAAC;AACjD,OAAO,KAAK,MAAM,kCAAkC,CAAC;AACrD,OAAO,IAAI,MAAM,iCAAiC,CAAC;AACnD,OAAO,KAAK,MAAM,kCAAkC,CAAC;AACrD,OAAO,IAAI,MAAM,iCAAiC,CAAC;AACnD,OAAO,cAAc,MAAM,2CAA2C,CAAC;AACvE,OAAO,KAAK,MAAM,kCAAkC,CAAC;AACrD,OAAO,GAAG,MAAM,gCAAgC,CAAC;AACjD,OAAO,iBAAiB,MAAM,8CAA8C,CAAC;AAC7E,OAAO,IAAI,MAAM,uCAAuC,CAAC;AACzD,OAAO,iBAAiB,MAAM,qDAAqD,CAAC;AACpF,OAAO,YAAY,MAAM,gDAAgD,CAAC;AAC1E,OAAO,GAAG,MAAM,sCAAsC,CAAC;AACvD,OAAO,OAAO,MAAM,0CAA0C,CAAC;AAC/D,OAAO,QAAQ,MAAM,4CAA4C,CAAC;AAClE,OAAO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aAChD,KAAC,MAAM,IAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,GAAG,EAAC,QAAQ,EAAE,OAAO,CAAC,SAAS,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,OAAO,CAAC,iBAAiB,YAChI,OAAO,CAAC,SAAS;gCACjB,cAAK,GAAG,EAAE,OAAO,CAAC,SAAS,GAAG,GAEvB,EACT,eAAK,KAAK,EAAC,mCAAmC,aAC5C,OAAO,CAAC,SAAS;oCACjB,KAAC,KAAK,IAAC,KAAK,EAAC,oCAAoC,YAAE,OAAO,CAAC,SAAS,GAAS,EAE7E,OAAO,CAAC,YAAY;oCACpB,KAAC,KAAK,IAAC,KAAK,EAAC,8CAA8C,YAAE,OAAO,CAAC,YAAY,GAAS,EAE1F,OAAO,CAAC,WAAW;oCACnB,KAAC,KAAK,IAAC,KAAK,EAAC,8CAA8C,YAAE,OAAO,CAAC,WAAW,GAAS,IAErF,EACN,wBACE,OAAO,CAAC,QAAQ;gCAChB,KAAC,IAAI,IACJ,IAAI,EAAC,MAAM,EACX,IAAI,EAAE,eAAe,EACrB,KAAK,EAAC,qCAAqC,EAC3C,IAAI,EAAC,YAAY,GAAG,GAEjB,IAED,GACU,CACjB,GACK,GACL,CAAC,CAAC;AACN,CAAC","sourcesContent":["import type UserMenu from \"./UserMenu.js\";\nimport Avatar from \"@ui5/webcomponents/dist/Avatar.js\";\nimport Button from \"@ui5/webcomponents/dist/Button.js\";\nimport Icon from \"@ui5/webcomponents/dist/Icon.js\";\nimport Tag from \"@ui5/webcomponents/dist/Tag.js\";\nimport Title from \"@ui5/webcomponents/dist/Title.js\";\nimport Text from \"@ui5/webcomponents/dist/Text.js\";\nimport Label from \"@ui5/webcomponents/dist/Label.js\";\nimport List from \"@ui5/webcomponents/dist/List.js\";\nimport ListItemCustom from \"@ui5/webcomponents/dist/ListItemCustom.js\";\nimport Panel from \"@ui5/webcomponents/dist/Panel.js\";\nimport Bar from \"@ui5/webcomponents/dist/Bar.js\";\nimport ResponsivePopover from \"@ui5/webcomponents/dist/ResponsivePopover.js\";\nimport edit from \"@ui5/webcomponents-icons/dist/edit.js\";\nimport personPlaceholder from \"@ui5/webcomponents-icons/dist/person-placeholder.js\";\nimport userSettings from \"@ui5/webcomponents-icons/dist/user-settings.js\";\nimport log from \"@ui5/webcomponents-icons/dist/log.js\";\nimport decline from \"@ui5/webcomponents-icons/dist/decline.js\";\nimport userEdit from \"@ui5/webcomponents-icons/dist/user-edit.js\";\nimport selectedAccount from \"@ui5/webcomponents-icons/dist/sys-enter-2.js\";\n\nexport default function UserMenuTemplate(this: UserMenu) {\n\treturn (\n\t\t<ResponsivePopover\n\t\t\tid=\"user-menu-rp\"\n\t\t\tclass=\"ui5-user-menu-rp\"\n\t\t\tplacement=\"Bottom\"\n\t\t\tverticalAlign=\"Bottom\"\n\t\t\thorizontalAlign=\"End\"\n\t\t\ttabindex={-1}\n\t\t\taccessibleName={this.accessibleNameText}\n\t\t\taria-label={this.accessibleNameText}\n\t\t\topen={this.open}\n\t\t\topener={this.opener}\n\t\t\tonClose={this._handlePopoverAfterClose}\n\t\t\tonOpen={this._handlePopoverAfterOpen}\n\t\t\tonScroll={this._handleScroll}\n\t\t>\n\t\t\t<>\n\t\t\t\t<Bar class={{\n\t\t\t\t\t\"ui5-user-menu-fixed-header\": true,\n\t\t\t\t\t\"ui5-user-menu-rp-scrolled\": this._isScrolled || this._titleMovedToHeader\n\t\t\t\t}} slot=\"header\">\n\t\t\t\t\t{this._titleMovedToHeader &&\n\t\t\t\t\t\t<Title\n\t\t\t\t\t\t\tlevel=\"H1\"\n\t\t\t\t\t\t\twrappingType=\"None\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{this._selectedAccount.titleText}\n\t\t\t\t\t\t</Title>\n\t\t\t\t\t}\n\n\t\t\t\t\t{this._isPhone && <Button\n\t\t\t\t\t\ticon={decline}\n\t\t\t\t\t\tdesign=\"Transparent\"\n\t\t\t\t\t\taccessibleName={this._closeDialogAriaLabel}\n\t\t\t\t\t\tonClick={this._closeUserMenu}\n\t\t\t\t\t\tslot=\"endContent\"\n\t\t\t\t\t />}\n\t\t\t\t</Bar>\n\n\t\t\t\t<div class=\"ui5-user-menu-header\">\n\t\t\t\t\t{headerContent.call(this)}\n\t\t\t\t</div>\n\t\t\t</>\n\n\t\t\t{this.showOtherAccounts &&\n\t\t\t\t<>\n\t\t\t\t\t{otherAccountsContent.call(this)}\n\t\t\t\t</>\n\t\t\t}\n\n\t\t\t{this.menuItems.length > 0 &&\n\t\t\t\t\t<List\n\t\t\t\t\t\tid=\"ui5-user-menu-list\"\n\t\t\t\t\t\tclass=\"ui5-user-menu-list\"\n\t\t\t\t\t\tselectionMode=\"None\"\n\t\t\t\t\t\tseparators=\"None\"\n\t\t\t\t\t\taccessibleRole=\"Menu\"\n\t\t\t\t\t\taccessibleName={this._ariaLabelledByActions}\n\t\t\t\t\t\tonItemClick={this._handleMenuItemClick}\n\t\t\t\t\t\tonMouseOver={this._itemMouseOver}\n\t\t\t\t\t\tonui5-close-menu={this._handleMenuItemClose}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</List>\n\t\t\t}\n\n\t\t\t{this._hasCustomFooter &&\n\t\t\t\t<div slot=\"footer\" class=\"ui5-user-menu-footer\">\n\t\t\t\t\t<slot name=\"footer\"></slot>\n\t\t\t\t</div>\n\t\t\t}\n\n\t\t\t{this._showDefaultFooter &&\n\t\t\t\t<div slot=\"footer\" class=\"ui5-user-menu-footer\">\n\t\t\t\t\t<Button class=\"ui5-user-menu-sign-out-btn\" design=\"Transparent\" icon={log} onClick={this._handleSignOutClick}>{this._signOutButtonText}</Button>\n\t\t\t\t</div>\n\t\t\t}\n\t\t</ResponsivePopover>\n\t);\n}\n\nfunction headerContent(this: UserMenu) {\n\treturn (<>\n\t\t{this._selectedAccount &&\n\t\t\t<div class=\"ui5-user-menu-selected-account\" aria-label={this._ariaLabelledByAccountInformationText}>\n\t\t\t\t<span title={this.showEditButton ? this._editAvatarTooltip : undefined}>\n\t\t\t\t\t<Avatar size=\"L\" onClick={this._handleAvatarClick} initials={this._selectedAccount._initials} colorScheme={this._selectedAccount.avatarColorScheme} fallbackIcon={personPlaceholder} class=\"ui5-user-menu-selected-account-avatar\" interactive>\n\t\t\t\t\t\t{this._selectedAccount.avatarSrc &&\n\t\t\t\t\t\t\t<img src={this._selectedAccount.avatarSrc}/>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{this.showEditButton &&\n\t\t\t\t\t\t<Tag slot=\"badge\" wrappingType=\"None\" design=\"Set1\" colorScheme=\"5\" >\n\t\t\t\t\t\t\t<Icon slot=\"icon\" name={edit}></Icon>\n\t\t\t\t\t\t</Tag>\n\t\t\t\t\t\t}\n\t\t\t\t\t</Avatar>\n\t\t\t\t</span>\n\t\t\t\t{this._selectedAccount.titleText &&\n\t\t\t\t\t<Text id=\"selected-account-title\" class=\"ui5-user-menu-selected-account-title\">{this._selectedAccount.titleText}</Text>\n\t\t\t\t}\n\n\t\t\t\t{this._selectedAccount.subtitleText &&\n\t\t\t\t\t<Text class=\"ui5-user-menu-selected-account-subtitleText\">{this._selectedAccount.subtitleText}</Text>\n\t\t\t\t}\n\t\t\t\t{this._selectedAccount.description &&\n\t\t\t\t\t<Text class=\"ui5-user-menu-selected-account-description\">{this._selectedAccount.description}</Text>\n\t\t\t\t}\n\t\t\t\t{this._selectedAccount.additionalInfo &&\n\t\t\t\t\t<Text class=\"ui5-user-menu-selected-account-additional-info\">{this._selectedAccount.additionalInfo}</Text>\n\t\t\t\t}\n\n\t\t\t\t{this.showManageAccount &&\n\t\t\t\t\t<Button id=\"selected-account-manage-btn\" icon={userSettings} class=\"ui5-user-menu-manage-account-btn\" onClick={this._handleManageAccountClick}>{this._manageAccountButtonText}</Button>\n\t\t\t\t}\n\t\t\t</div>\n\t\t}\n\t</>);\n}\n\nfunction otherAccountsContent(this: UserMenu) {\n\treturn (<>\n\t\t<Panel collapsed={true} class=\"ui5-user-menu-other-accounts\">\n\t\t\t<div slot=\"header\" class=\"ui5-user-menu-account-header\">\n\t\t\t\t<Title slot=\"header\" level=\"H4\" wrapping-type=\"None\">{this._otherAccountsButtonText} ({this._otherAccounts.length})</Title>\n\t\t\t\t{this.showEditAccounts &&\n\t\t\t\t\t<Button slot=\"header\" class=\"ui5-user-menu-add-account-btn\" design=\"Transparent\" icon={userEdit} onClick={this._handleEditAccountsClick} tooltip={this._editAccountsTooltip}/>\n\t\t\t\t}\n\t\t\t</div>\n\t\t\t{this._otherAccounts.length > 0 &&\n\t\t\t\t<>\n\t\t\t\t\t{otherAccountsList.call(this)}\n\t\t\t\t</>\n\t\t\t}\n\t\t</Panel>\n\t</>);\n}\n\nfunction otherAccountsList(this: UserMenu) {\n\treturn (<>\n\t\t<List onItemClick={this._handleAccountSwitch} loadingDelay={0}\n\t\t\taccessibleName={`${this._otherAccountsButtonText} (${this._otherAccounts.length})`}\n\t\t\t loading={this._otherAccounts.some(account => account.loading === true)}>\n\t\t\t{this._otherAccounts.map((account, index) =>\n\t\t\t\t<ListItemCustom\n\t\t\t\t\tref={this.captureRef.bind(account)}\n\t\t\t\t\taccessibilityAttributes={{\n\t\t\t\t\t\t\"ariaPosinset\": index + 1,\n\t\t\t\t\t\t\"ariaSetsize\": this._otherAccounts.length\n\t\t\t\t\t}}\n\t\t\t\t\taccessibleName={this.getAccountDescriptionText(account)}\n\t\t\t\t>\n\t\t\t\t\t<div class=\"ui5-user-menu-other-accounts-content\">\n\t\t\t\t\t\t<Avatar slot=\"image\" size=\"S\" initials={account._initials} fallbackIcon={personPlaceholder} colorScheme={account.avatarColorScheme}>\n\t\t\t\t\t\t\t{account.avatarSrc &&\n\t\t\t\t\t\t\t\t<img src={account.avatarSrc}/>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</Avatar>\n\t\t\t\t\t\t<div class=\"ui5-user-menu-other-accounts-info\">\n\t\t\t\t\t\t\t{account.titleText &&\n\t\t\t\t\t\t\t\t<Title class=\"ui5-user-menu-other-accounts-title\">{account.titleText}</Title>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{account.subtitleText &&\n\t\t\t\t\t\t\t\t<Label class=\"ui5-user-menu-other-accounts-additional-info\">{account.subtitleText}</Label>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{account.description &&\n\t\t\t\t\t\t\t\t<Label class=\"ui5-user-menu-other-accounts-additional-info\">{account.description}</Label>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t{account.selected &&\n\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\tpart=\"icon\"\n\t\t\t\t\t\t\t\t\tname={selectedAccount}\n\t\t\t\t\t\t\t\t\tclass=\"ui5-user-menu-selected-account-icon\"\n\t\t\t\t\t\t\t\t\tmode=\"Decorative\" />\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t</div>\n\t\t\t\t</ListItemCustom>\n\t\t\t)}\n\t\t</List>\n\t</>);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"UserMenuTemplate.js","sourceRoot":"","sources":["../src/UserMenuTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,mCAAmC,CAAC;AACvD,OAAO,MAAM,MAAM,mCAAmC,CAAC;AACvD,OAAO,IAAI,MAAM,iCAAiC,CAAC;AACnD,OAAO,GAAG,MAAM,gCAAgC,CAAC;AACjD,OAAO,KAAK,MAAM,kCAAkC,CAAC;AACrD,OAAO,IAAI,MAAM,iCAAiC,CAAC;AACnD,OAAO,KAAK,MAAM,kCAAkC,CAAC;AACrD,OAAO,IAAI,MAAM,iCAAiC,CAAC;AACnD,OAAO,cAAc,MAAM,2CAA2C,CAAC;AACvE,OAAO,KAAK,MAAM,kCAAkC,CAAC;AACrD,OAAO,GAAG,MAAM,gCAAgC,CAAC;AACjD,OAAO,iBAAiB,MAAM,8CAA8C,CAAC;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"@ui5/webcomponents/dist/Button.js\";\nimport Icon from \"@ui5/webcomponents/dist/Icon.js\";\nimport Tag from \"@ui5/webcomponents/dist/Tag.js\";\nimport Title from \"@ui5/webcomponents/dist/Title.js\";\nimport Text from \"@ui5/webcomponents/dist/Text.js\";\nimport Label from \"@ui5/webcomponents/dist/Label.js\";\nimport List from \"@ui5/webcomponents/dist/List.js\";\nimport ListItemCustom from \"@ui5/webcomponents/dist/ListItemCustom.js\";\nimport Panel from \"@ui5/webcomponents/dist/Panel.js\";\nimport Bar from \"@ui5/webcomponents/dist/Bar.js\";\nimport ResponsivePopover from \"@ui5/webcomponents/dist/ResponsivePopover.js\";\nimport edit from \"@ui5/webcomponents-icons/dist/edit.js\";\nimport personPlaceholder from \"@ui5/webcomponents-icons/dist/person-placeholder.js\";\nimport userSettings from \"@ui5/webcomponents-icons/dist/user-settings.js\";\nimport log from \"@ui5/webcomponents-icons/dist/log.js\";\nimport decline from \"@ui5/webcomponents-icons/dist/decline.js\";\nimport userEdit from \"@ui5/webcomponents-icons/dist/user-edit.js\";\nimport selectedAccount from \"@ui5/webcomponents-icons/dist/sys-enter-2.js\";\n\nexport default function UserMenuTemplate(this: UserMenu) {\n\treturn (\n\t\t<ResponsivePopover\n\t\t\tid=\"user-menu-rp\"\n\t\t\tclass=\"ui5-user-menu-rp\"\n\t\t\tplacement=\"Bottom\"\n\t\t\tverticalAlign=\"Bottom\"\n\t\t\thorizontalAlign=\"End\"\n\t\t\ttabindex={-1}\n\t\t\taccessibleName={this.accessibleNameText}\n\t\t\taria-label={this.accessibleNameText}\n\t\t\topen={this.open}\n\t\t\topener={this.opener}\n\t\t\tonClose={this._handlePopoverAfterClose}\n\t\t\tonOpen={this._handlePopoverAfterOpen}\n\t\t\tonScroll={this._handleScroll}\n\t\t>\n\t\t\t<>\n\t\t\t\t<Bar class={{\n\t\t\t\t\t\"ui5-user-menu-fixed-header\": true,\n\t\t\t\t\t\"ui5-user-menu-rp-scrolled\": this._isScrolled || this._titleMovedToHeader\n\t\t\t\t}} slot=\"header\">\n\t\t\t\t\t{this._titleMovedToHeader &&\n\t\t\t\t\t\t<Title\n\t\t\t\t\t\t\tlevel=\"H1\"\n\t\t\t\t\t\t\twrappingType=\"None\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{this._selectedAccount.titleText}\n\t\t\t\t\t\t</Title>\n\t\t\t\t\t}\n\n\t\t\t\t\t{this._isPhone && <Button\n\t\t\t\t\t\ticon={decline}\n\t\t\t\t\t\tdesign=\"Transparent\"\n\t\t\t\t\t\taccessibleName={this._closeDialogAriaLabel}\n\t\t\t\t\t\tonClick={this._closeUserMenu}\n\t\t\t\t\t\tslot=\"endContent\"\n\t\t\t\t\t />}\n\t\t\t\t</Bar>\n\n\t\t\t\t<div class=\"ui5-user-menu-header\">\n\t\t\t\t\t{headerContent.call(this)}\n\t\t\t\t</div>\n\t\t\t</>\n\n\t\t\t{this.showOtherAccounts &&\n\t\t\t\t<>\n\t\t\t\t\t{otherAccountsContent.call(this)}\n\t\t\t\t</>\n\t\t\t}\n\n\t\t\t{this.menuItems.length > 0 &&\n\t\t\t\t\t<List\n\t\t\t\t\t\tid=\"ui5-user-menu-list\"\n\t\t\t\t\t\tclass=\"ui5-user-menu-list\"\n\t\t\t\t\t\tselectionMode=\"None\"\n\t\t\t\t\t\tseparators=\"None\"\n\t\t\t\t\t\taccessibleRole=\"Menu\"\n\t\t\t\t\t\taccessibleName={this._ariaLabelledByActions}\n\t\t\t\t\t\tonItemClick={this._handleMenuItemClick}\n\t\t\t\t\t\tonMouseOver={this._itemMouseOver}\n\t\t\t\t\t\tonui5-close-menu={this._handleMenuItemClose}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</List>\n\t\t\t}\n\n\t\t\t{this._hasCustomFooter &&\n\t\t\t\t<div slot=\"footer\" class=\"ui5-user-menu-footer\">\n\t\t\t\t\t<slot name=\"footer\"></slot>\n\t\t\t\t</div>\n\t\t\t}\n\n\t\t\t{this._showDefaultFooter &&\n\t\t\t\t<div slot=\"footer\" class=\"ui5-user-menu-footer\">\n\t\t\t\t\t<Button class=\"ui5-user-menu-sign-out-btn\" design=\"Transparent\" icon={log} onClick={this._handleSignOutClick}>{this._signOutButtonText}</Button>\n\t\t\t\t</div>\n\t\t\t}\n\t\t</ResponsivePopover>\n\t);\n}\n\nfunction headerContent(this: UserMenu) {\n\treturn (<>\n\t\t{this._selectedAccount &&\n\t\t\t<div class=\"ui5-user-menu-selected-account\" aria-label={this._ariaLabelledByAccountInformationText}>\n\t\t\t\t<span title={this.showEditButton ? this._editAvatarTooltip : undefined}>\n\t\t\t\t\t<Avatar size=\"L\" onClick={this._handleAvatarClick} initials={this._selectedAccount._initials} colorScheme={this._selectedAccount.avatarColorScheme} fallbackIcon={personPlaceholder} class=\"ui5-user-menu-selected-account-avatar\" interactive>\n\t\t\t\t\t\t{this._selectedAccount.avatarSrc &&\n\t\t\t\t\t\t\t<img src={this._selectedAccount.avatarSrc}/>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{this.showEditButton &&\n\t\t\t\t\t\t<Tag slot=\"badge\" wrappingType=\"None\" design=\"Set1\" colorScheme=\"5\" >\n\t\t\t\t\t\t\t<Icon slot=\"icon\" name={edit}></Icon>\n\t\t\t\t\t\t</Tag>\n\t\t\t\t\t\t}\n\t\t\t\t\t</Avatar>\n\t\t\t\t</span>\n\t\t\t\t{this._selectedAccount.titleText &&\n\t\t\t\t\t<Text id=\"selected-account-title\" class=\"ui5-user-menu-selected-account-title\">{this._selectedAccount.titleText}</Text>\n\t\t\t\t}\n\n\t\t\t\t{this._selectedAccount.subtitleText &&\n\t\t\t\t\t<Text class=\"ui5-user-menu-selected-account-subtitleText\">{this._selectedAccount.subtitleText}</Text>\n\t\t\t\t}\n\t\t\t\t{this._selectedAccount.description &&\n\t\t\t\t\t<Text class=\"ui5-user-menu-selected-account-description\">{this._selectedAccount.description}</Text>\n\t\t\t\t}\n\t\t\t\t{this._selectedAccount.additionalInfo &&\n\t\t\t\t\t<Text class=\"ui5-user-menu-selected-account-additional-info\">{this._selectedAccount.additionalInfo}</Text>\n\t\t\t\t}\n\n\t\t\t\t{this._hasInfoArea &&\n\t\t\t\t\t<div class=\"ui5-user-menu-info-area\">\n\t\t\t\t\t\t<slot name=\"infoArea\"></slot>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\n\t\t\t\t{this.showManageAccount &&\n\t\t\t\t\t<Button id=\"selected-account-manage-btn\" icon={userSettings} class=\"ui5-user-menu-manage-account-btn\" onClick={this._handleManageAccountClick}>{this._manageAccountButtonText}</Button>\n\t\t\t\t}\n\t\t\t</div>\n\t\t}\n\t</>);\n}\n\nfunction otherAccountsContent(this: UserMenu) {\n\treturn (<>\n\t\t<Panel collapsed={true} class=\"ui5-user-menu-other-accounts\">\n\t\t\t<div slot=\"header\" class=\"ui5-user-menu-account-header\">\n\t\t\t\t<Title slot=\"header\" level=\"H4\" wrapping-type=\"None\">{this._otherAccountsButtonText} ({this._otherAccounts.length})</Title>\n\t\t\t\t{this.showEditAccounts &&\n\t\t\t\t\t<Button slot=\"header\" class=\"ui5-user-menu-add-account-btn\" design=\"Transparent\" icon={userEdit} onClick={this._handleEditAccountsClick} tooltip={this._editAccountsTooltip}/>\n\t\t\t\t}\n\t\t\t</div>\n\t\t\t{this._otherAccounts.length > 0 &&\n\t\t\t\t<>\n\t\t\t\t\t{otherAccountsList.call(this)}\n\t\t\t\t</>\n\t\t\t}\n\t\t</Panel>\n\t</>);\n}\n\nfunction otherAccountsList(this: UserMenu) {\n\treturn (<>\n\t\t<List onItemClick={this._handleAccountSwitch} loadingDelay={0}\n\t\t\taccessibleName={`${this._otherAccountsButtonText} (${this._otherAccounts.length})`}\n\t\t\t loading={this._otherAccounts.some(account => account.loading === true)}>\n\t\t\t{this._otherAccounts.map((account, index) =>\n\t\t\t\t<ListItemCustom\n\t\t\t\t\tref={this.captureRef.bind(account)}\n\t\t\t\t\taccessibilityAttributes={{\n\t\t\t\t\t\t\"ariaPosinset\": index + 1,\n\t\t\t\t\t\t\"ariaSetsize\": this._otherAccounts.length\n\t\t\t\t\t}}\n\t\t\t\t\taccessibleName={this.getAccountDescriptionText(account)}\n\t\t\t\t>\n\t\t\t\t\t<div class=\"ui5-user-menu-other-accounts-content\">\n\t\t\t\t\t\t<Avatar slot=\"image\" size=\"S\" initials={account._initials} fallbackIcon={personPlaceholder} colorScheme={account.avatarColorScheme}>\n\t\t\t\t\t\t\t{account.avatarSrc &&\n\t\t\t\t\t\t\t\t<img src={account.avatarSrc}/>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</Avatar>\n\t\t\t\t\t\t<div class=\"ui5-user-menu-other-accounts-info\">\n\t\t\t\t\t\t\t{account.titleText &&\n\t\t\t\t\t\t\t\t<Title class=\"ui5-user-menu-other-accounts-title\">{account.titleText}</Title>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{account.subtitleText &&\n\t\t\t\t\t\t\t\t<Label class=\"ui5-user-menu-other-accounts-additional-info\">{account.subtitleText}</Label>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{account.description &&\n\t\t\t\t\t\t\t\t<Label class=\"ui5-user-menu-other-accounts-additional-info\">{account.description}</Label>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t{account.selected &&\n\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\tpart=\"icon\"\n\t\t\t\t\t\t\t\t\tname={selectedAccount}\n\t\t\t\t\t\t\t\t\tclass=\"ui5-user-menu-selected-account-icon\"\n\t\t\t\t\t\t\t\t\tmode=\"Decorative\" />\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t</div>\n\t\t\t\t</ListItemCustom>\n\t\t\t)}\n\t\t</List>\n\t</>);\n}\n"]}
|