@ui5/webcomponents-fiori 2.21.0 → 2.22.0-rc.1

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.
Files changed (63) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/Timeline.d.ts +35 -3
  4. package/dist/Timeline.js +62 -4
  5. package/dist/Timeline.js.map +1 -1
  6. package/dist/TimelineFilterOption.d.ts +37 -0
  7. package/dist/TimelineFilterOption.js +59 -0
  8. package/dist/TimelineFilterOption.js.map +1 -0
  9. package/dist/TimelineHeaderBar.d.ts +120 -0
  10. package/dist/TimelineHeaderBar.js +273 -0
  11. package/dist/TimelineHeaderBar.js.map +1 -0
  12. package/dist/TimelineHeaderBarTemplate.d.ts +2 -0
  13. package/dist/TimelineHeaderBarTemplate.js +18 -0
  14. package/dist/TimelineHeaderBarTemplate.js.map +1 -0
  15. package/dist/TimelineItem.d.ts +2 -0
  16. package/dist/TimelineItem.js +2 -0
  17. package/dist/TimelineItem.js.map +1 -1
  18. package/dist/TimelineTemplate.js +1 -1
  19. package/dist/TimelineTemplate.js.map +1 -1
  20. package/dist/ViewSettingsDialog.d.ts +40 -1
  21. package/dist/ViewSettingsDialog.js +114 -7
  22. package/dist/ViewSettingsDialog.js.map +1 -1
  23. package/dist/ViewSettingsDialogCustomTab.d.ts +52 -0
  24. package/dist/ViewSettingsDialogCustomTab.js +81 -0
  25. package/dist/ViewSettingsDialogCustomTab.js.map +1 -0
  26. package/dist/ViewSettingsDialogCustomTabTemplate.d.ts +2 -0
  27. package/dist/ViewSettingsDialogCustomTabTemplate.js +5 -0
  28. package/dist/ViewSettingsDialogCustomTabTemplate.js.map +1 -0
  29. package/dist/ViewSettingsDialogTemplate.js +8 -1
  30. package/dist/ViewSettingsDialogTemplate.js.map +1 -1
  31. package/dist/bundle.esm.js +3 -0
  32. package/dist/bundle.esm.js.map +1 -1
  33. package/dist/css/themes/Timeline.css +1 -1
  34. package/dist/css/themes/TimelineHeaderBar.css +1 -0
  35. package/dist/css/themes/ViewSettingsDialog.css +1 -1
  36. package/dist/custom-elements-internal.json +746 -60
  37. package/dist/custom-elements.json +511 -9
  38. package/dist/generated/i18n/i18n-defaults.d.ts +11 -1
  39. package/dist/generated/i18n/i18n-defaults.js +11 -1
  40. package/dist/generated/i18n/i18n-defaults.js.map +1 -1
  41. package/dist/generated/themes/Timeline.css.d.ts +1 -1
  42. package/dist/generated/themes/Timeline.css.js +1 -1
  43. package/dist/generated/themes/Timeline.css.js.map +1 -1
  44. package/dist/generated/themes/TimelineHeaderBar.css.d.ts +2 -0
  45. package/dist/generated/themes/TimelineHeaderBar.css.js +8 -0
  46. package/dist/generated/themes/TimelineHeaderBar.css.js.map +1 -0
  47. package/dist/generated/themes/ViewSettingsDialog.css.d.ts +1 -1
  48. package/dist/generated/themes/ViewSettingsDialog.css.js +1 -1
  49. package/dist/generated/themes/ViewSettingsDialog.css.js.map +1 -1
  50. package/dist/types/TimelineSortOrder.d.ts +18 -0
  51. package/dist/types/TimelineSortOrder.js +20 -0
  52. package/dist/types/TimelineSortOrder.js.map +1 -0
  53. package/dist/vscode.html-custom-data.json +88 -2
  54. package/dist/web-types.json +257 -3
  55. package/package.json +7 -7
  56. package/src/TimelineHeaderBarTemplate.tsx +104 -0
  57. package/src/TimelineTemplate.tsx +7 -0
  58. package/src/ViewSettingsDialogCustomTabTemplate.tsx +5 -0
  59. package/src/ViewSettingsDialogTemplate.tsx +31 -0
  60. package/src/i18n/messagebundle.properties +30 -0
  61. package/src/themes/Timeline.css +21 -7
  62. package/src/themes/TimelineHeaderBar.css +17 -0
  63. package/src/themes/ViewSettingsDialog.css +33 -0
@@ -0,0 +1,273 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var TimelineHeaderBar_1;
8
+ import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
9
+ import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
10
+ import property from "@ui5/webcomponents-base/dist/decorators/property.js";
11
+ import slot from "@ui5/webcomponents-base/dist/decorators/slot-strict.js";
12
+ import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
13
+ import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
14
+ import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
15
+ import Toolbar from "@ui5/webcomponents/dist/Toolbar.js";
16
+ import ToolbarButton from "@ui5/webcomponents/dist/ToolbarButton.js";
17
+ import ToolbarSpacer from "@ui5/webcomponents/dist/ToolbarSpacer.js";
18
+ import Input from "@ui5/webcomponents/dist/Input.js";
19
+ import Icon from "@ui5/webcomponents/dist/Icon.js";
20
+ import Dialog from "@ui5/webcomponents/dist/Dialog.js";
21
+ import List from "@ui5/webcomponents/dist/List.js";
22
+ import ListItemStandard from "@ui5/webcomponents/dist/ListItemStandard.js";
23
+ import Bar from "@ui5/webcomponents/dist/Bar.js";
24
+ import Button from "@ui5/webcomponents/dist/Button.js";
25
+ // Import icons to register them
26
+ import "@ui5/webcomponents-icons/dist/sort-descending.js";
27
+ import "@ui5/webcomponents-icons/dist/add-filter.js";
28
+ import TimelineHeaderBarTemplate from "./TimelineHeaderBarTemplate.js";
29
+ import TimelineHeaderBarCss from "./generated/themes/TimelineHeaderBar.css.js";
30
+ import { TIMELINE_HEADER_BAR_ACCESSIBLE_NAME, TIMELINE_SEARCH_PLACEHOLDER, TIMELINE_SEARCH_ACCESSIBLE_NAME, TIMELINE_FILTER_ACCESSIBLE_NAME, TIMELINE_SORT_ASCENDING_TOOLTIP, TIMELINE_SORT_DESCENDING_TOOLTIP, TIMELINE_SORT_ACCESSIBLE_NAME, TIMELINE_FILTER_DIALOG_TITLE, TIMELINE_FILTER_DIALOG_OK, TIMELINE_FILTER_DIALOG_CANCEL, } from "./generated/i18n/i18n-defaults.js";
31
+ /**
32
+ * @class
33
+ *
34
+ * ### Overview
35
+ *
36
+ * The `ui5-timeline-header-bar` component provides search, filter, and sort functionality
37
+ * for the `ui5-timeline` component. It is designed to be slotted into the `header-bar` slot
38
+ * of the Timeline.
39
+ *
40
+ * ### Usage
41
+ *
42
+ * The component fires events (`search`, `filter`, `sort`) that the application should handle
43
+ * to filter/sort the timeline items. The Timeline component itself does not perform any
44
+ * filtering or sorting - this is the responsibility of the application.
45
+ *
46
+ * ### ES6 Module Import
47
+ *
48
+ * `import "@ui5/webcomponents-fiori/dist/TimelineHeaderBar.js";`
49
+ *
50
+ * @constructor
51
+ * @extends UI5Element
52
+ * @public
53
+ * @since 2.22.0
54
+ */
55
+ let TimelineHeaderBar = TimelineHeaderBar_1 = class TimelineHeaderBar extends UI5Element {
56
+ constructor() {
57
+ super(...arguments);
58
+ /**
59
+ * Shows the search input field.
60
+ * @default false
61
+ * @public
62
+ */
63
+ this.showSearch = false;
64
+ /**
65
+ * Shows the filter button.
66
+ * @default false
67
+ * @public
68
+ */
69
+ this.showFilter = false;
70
+ /**
71
+ * Shows the sort button.
72
+ * @default false
73
+ * @public
74
+ */
75
+ this.showSort = false;
76
+ /**
77
+ * Shows the filter by date option.
78
+ * @default false
79
+ * @public
80
+ */
81
+ this.showFilterByDate = false;
82
+ /**
83
+ * The current filter category label.
84
+ * @default ""
85
+ * @public
86
+ */
87
+ this.filterBy = "";
88
+ /**
89
+ * The current search value.
90
+ * @default ""
91
+ * @public
92
+ */
93
+ this.searchValue = "";
94
+ /**
95
+ * The current sort order.
96
+ * @default "Ascending"
97
+ * @public
98
+ */
99
+ this.sortOrder = "Ascending";
100
+ /**
101
+ * Controls the filter dialog visibility.
102
+ * @private
103
+ */
104
+ this._filterDialogOpen = false;
105
+ }
106
+ get _headerBarAccessibleName() {
107
+ return TimelineHeaderBar_1.i18nBundle.getText(TIMELINE_HEADER_BAR_ACCESSIBLE_NAME);
108
+ }
109
+ get _searchPlaceholder() {
110
+ return TimelineHeaderBar_1.i18nBundle.getText(TIMELINE_SEARCH_PLACEHOLDER);
111
+ }
112
+ get _searchAccessibleName() {
113
+ return TimelineHeaderBar_1.i18nBundle.getText(TIMELINE_SEARCH_ACCESSIBLE_NAME);
114
+ }
115
+ get _filterAccessibleName() {
116
+ return TimelineHeaderBar_1.i18nBundle.getText(TIMELINE_FILTER_ACCESSIBLE_NAME);
117
+ }
118
+ get _sortAccessibleName() {
119
+ return TimelineHeaderBar_1.i18nBundle.getText(TIMELINE_SORT_ACCESSIBLE_NAME);
120
+ }
121
+ get _sortTooltip() {
122
+ if (this.sortOrder === "Descending") {
123
+ return TimelineHeaderBar_1.i18nBundle.getText(TIMELINE_SORT_ASCENDING_TOOLTIP);
124
+ }
125
+ return TimelineHeaderBar_1.i18nBundle.getText(TIMELINE_SORT_DESCENDING_TOOLTIP);
126
+ }
127
+ get _sortIcon() {
128
+ return "sort-descending";
129
+ }
130
+ get _filterIcon() {
131
+ return "add-filter";
132
+ }
133
+ get _filterDialogTitle() {
134
+ return TimelineHeaderBar_1.i18nBundle.getText(TIMELINE_FILTER_DIALOG_TITLE);
135
+ }
136
+ get _filterDialogOkText() {
137
+ return TimelineHeaderBar_1.i18nBundle.getText(TIMELINE_FILTER_DIALOG_OK);
138
+ }
139
+ get _filterDialogCancelText() {
140
+ return TimelineHeaderBar_1.i18nBundle.getText(TIMELINE_FILTER_DIALOG_CANCEL);
141
+ }
142
+ _onSearchInput(e) {
143
+ const value = e.target.value;
144
+ this.searchValue = value;
145
+ this.fireDecoratorEvent("search", { value });
146
+ }
147
+ _onFilterClick() {
148
+ this._filterDialogOpen = true;
149
+ }
150
+ _onFilterDialogConfirm() {
151
+ // Read selected state from the list items in the dialog
152
+ const list = this.shadowRoot.querySelector(".ui5-timeline-filter-list");
153
+ if (list) {
154
+ const selectedItems = list.getSelectedItems();
155
+ const selectedTexts = selectedItems.map(item => item.textContent?.trim() || "");
156
+ // Update the TimelineFilterOption elements to match the dialog selection
157
+ this.filterOptions.forEach(option => {
158
+ option.selected = selectedTexts.includes(option.text);
159
+ });
160
+ }
161
+ const selectedOptions = this.filterOptions
162
+ .filter(option => option.selected)
163
+ .map(option => option.text);
164
+ this.fireDecoratorEvent("filter", {
165
+ filterBy: this.filterBy,
166
+ selectedOptions,
167
+ });
168
+ this._filterDialogOpen = false;
169
+ }
170
+ _onFilterDialogCancel() {
171
+ this._filterDialogOpen = false;
172
+ }
173
+ _onFilterDialogClose() {
174
+ this._filterDialogOpen = false;
175
+ }
176
+ _onSortClick() {
177
+ // Toggle sort order: Ascending -> Descending -> Ascending
178
+ if (this.sortOrder === "Ascending") {
179
+ this.sortOrder = "Descending";
180
+ }
181
+ else {
182
+ this.sortOrder = "Ascending";
183
+ }
184
+ this.fireDecoratorEvent("sort", {
185
+ sortOrder: this.sortOrder,
186
+ });
187
+ }
188
+ };
189
+ __decorate([
190
+ property({ type: Boolean })
191
+ ], TimelineHeaderBar.prototype, "showSearch", void 0);
192
+ __decorate([
193
+ property({ type: Boolean })
194
+ ], TimelineHeaderBar.prototype, "showFilter", void 0);
195
+ __decorate([
196
+ property({ type: Boolean })
197
+ ], TimelineHeaderBar.prototype, "showSort", void 0);
198
+ __decorate([
199
+ property({ type: Boolean })
200
+ ], TimelineHeaderBar.prototype, "showFilterByDate", void 0);
201
+ __decorate([
202
+ property()
203
+ ], TimelineHeaderBar.prototype, "filterBy", void 0);
204
+ __decorate([
205
+ property()
206
+ ], TimelineHeaderBar.prototype, "searchValue", void 0);
207
+ __decorate([
208
+ property()
209
+ ], TimelineHeaderBar.prototype, "sortOrder", void 0);
210
+ __decorate([
211
+ property({ type: Boolean, noAttribute: true })
212
+ ], TimelineHeaderBar.prototype, "_filterDialogOpen", void 0);
213
+ __decorate([
214
+ slot({ type: HTMLElement, "default": true, invalidateOnChildChange: true })
215
+ ], TimelineHeaderBar.prototype, "filterOptions", void 0);
216
+ __decorate([
217
+ i18n("@ui5/webcomponents-fiori")
218
+ ], TimelineHeaderBar, "i18nBundle", void 0);
219
+ TimelineHeaderBar = TimelineHeaderBar_1 = __decorate([
220
+ customElement({
221
+ tag: "ui5-timeline-header-bar",
222
+ languageAware: true,
223
+ renderer: jsxRenderer,
224
+ template: TimelineHeaderBarTemplate,
225
+ styles: TimelineHeaderBarCss,
226
+ dependencies: [
227
+ Toolbar,
228
+ ToolbarButton,
229
+ ToolbarSpacer,
230
+ Input,
231
+ Icon,
232
+ Dialog,
233
+ List,
234
+ ListItemStandard,
235
+ Bar,
236
+ Button,
237
+ ],
238
+ })
239
+ /**
240
+ * Fired when the user performs a search.
241
+ *
242
+ * @param {string} value The search value entered by the user.
243
+ * @public
244
+ */
245
+ ,
246
+ event("search", {
247
+ bubbles: true,
248
+ })
249
+ /**
250
+ * Fired when the user changes filter selection.
251
+ *
252
+ * @param {string} filterBy The filter category.
253
+ * @param {string[]} selectedOptions The selected filter option texts.
254
+ * @public
255
+ */
256
+ ,
257
+ event("filter", {
258
+ bubbles: true,
259
+ })
260
+ /**
261
+ * Fired when the user changes sort order.
262
+ *
263
+ * @param {string} sortOrder The sort order ("Ascending" or "Descending").
264
+ * @public
265
+ */
266
+ ,
267
+ event("sort", {
268
+ bubbles: true,
269
+ })
270
+ ], TimelineHeaderBar);
271
+ TimelineHeaderBar.define();
272
+ export default TimelineHeaderBar;
273
+ //# sourceMappingURL=TimelineHeaderBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimelineHeaderBar.js","sourceRoot":"","sources":["../src/TimelineHeaderBar.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;A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AAE,IAAI;QACnB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,yBAAyB;QACnC,MAAM,EAAE,oBAAoB;QAC5B,YAAY,EAAE;YACb,OAAO;YACP,aAAa;YACb,aAAa;YACb,KAAK;YACL,IAAI;YACJ,MAAM;YACN,IAAI;YACJ,gBAAgB;YAChB,GAAG;YACH,MAAM;SACN;KACD,CAAC;IAEF;;;;;OAKG;;IACF,KAAK,CAAC,QAAQ,EAAE;QAChB,OAAO,EAAE,IAAI;KACb,CAAC;IAEF;;;;;;OAMG;;IACF,KAAK,CAAC,QAAQ,EAAE;QAChB,OAAO,EAAE,IAAI;KACb,CAAC;IAEF;;;;;OAKG;;IACF,KAAK,CAAC,MAAM,EAAE;QACd,OAAO,EAAE,IAAI;KACb,CAAC;GAEI,iBAAiB,CAsLtB;AAED,iBAAiB,CAAC,MAAM,EAAE,CAAC;AAE3B,eAAe,iBAAiB,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { 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 event from \"@ui5/webcomponents-base/dist/decorators/event-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 Toolbar from \"@ui5/webcomponents/dist/Toolbar.js\";\nimport ToolbarButton from \"@ui5/webcomponents/dist/ToolbarButton.js\";\nimport ToolbarSpacer from \"@ui5/webcomponents/dist/ToolbarSpacer.js\";\nimport Input from \"@ui5/webcomponents/dist/Input.js\";\nimport Icon from \"@ui5/webcomponents/dist/Icon.js\";\nimport Dialog from \"@ui5/webcomponents/dist/Dialog.js\";\nimport List from \"@ui5/webcomponents/dist/List.js\";\nimport ListItemStandard from \"@ui5/webcomponents/dist/ListItemStandard.js\";\nimport Bar from \"@ui5/webcomponents/dist/Bar.js\";\nimport Button from \"@ui5/webcomponents/dist/Button.js\";\nimport type TimelineSortOrder from \"./types/TimelineSortOrder.js\";\nimport type TimelineFilterOption from \"./TimelineFilterOption.js\";\n\n// Import icons to register them\nimport \"@ui5/webcomponents-icons/dist/sort-descending.js\";\nimport \"@ui5/webcomponents-icons/dist/add-filter.js\";\n\nimport TimelineHeaderBarTemplate from \"./TimelineHeaderBarTemplate.js\";\nimport TimelineHeaderBarCss from \"./generated/themes/TimelineHeaderBar.css.js\";\n\nimport {\n\tTIMELINE_HEADER_BAR_ACCESSIBLE_NAME,\n\tTIMELINE_SEARCH_PLACEHOLDER,\n\tTIMELINE_SEARCH_ACCESSIBLE_NAME,\n\tTIMELINE_FILTER_ACCESSIBLE_NAME,\n\tTIMELINE_SORT_ASCENDING_TOOLTIP,\n\tTIMELINE_SORT_DESCENDING_TOOLTIP,\n\tTIMELINE_SORT_ACCESSIBLE_NAME,\n\tTIMELINE_FILTER_DIALOG_TITLE,\n\tTIMELINE_FILTER_DIALOG_OK,\n\tTIMELINE_FILTER_DIALOG_CANCEL,\n} from \"./generated/i18n/i18n-defaults.js\";\n\ntype TimelineHeaderBarSearchEventDetail = {\n\tvalue: string;\n};\n\ntype TimelineHeaderBarFilterEventDetail = {\n\tfilterBy: string;\n\tselectedOptions: string[];\n};\n\ntype TimelineHeaderBarSortEventDetail = {\n\tsortOrder: string;\n};\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-timeline-header-bar` component provides search, filter, and sort functionality\n * for the `ui5-timeline` component. It is designed to be slotted into the `header-bar` slot\n * of the Timeline.\n *\n * ### Usage\n *\n * The component fires events (`search`, `filter`, `sort`) that the application should handle\n * to filter/sort the timeline items. The Timeline component itself does not perform any\n * filtering or sorting - this is the responsibility of the application.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents-fiori/dist/TimelineHeaderBar.js\";`\n *\n * @constructor\n * @extends UI5Element\n * @public\n * @since 2.22.0\n */\n@customElement({\n\ttag: \"ui5-timeline-header-bar\",\n\tlanguageAware: true,\n\trenderer: jsxRenderer,\n\ttemplate: TimelineHeaderBarTemplate,\n\tstyles: TimelineHeaderBarCss,\n\tdependencies: [\n\t\tToolbar,\n\t\tToolbarButton,\n\t\tToolbarSpacer,\n\t\tInput,\n\t\tIcon,\n\t\tDialog,\n\t\tList,\n\t\tListItemStandard,\n\t\tBar,\n\t\tButton,\n\t],\n})\n\n/**\n * Fired when the user performs a search.\n *\n * @param {string} value The search value entered by the user.\n * @public\n */\n@event(\"search\", {\n\tbubbles: true,\n})\n\n/**\n * Fired when the user changes filter selection.\n *\n * @param {string} filterBy The filter category.\n * @param {string[]} selectedOptions The selected filter option texts.\n * @public\n */\n@event(\"filter\", {\n\tbubbles: true,\n})\n\n/**\n * Fired when the user changes sort order.\n *\n * @param {string} sortOrder The sort order (\"Ascending\" or \"Descending\").\n * @public\n */\n@event(\"sort\", {\n\tbubbles: true,\n})\n\nclass TimelineHeaderBar extends UI5Element {\n\teventDetails!: {\n\t\t\"search\": TimelineHeaderBarSearchEventDetail,\n\t\t\"filter\": TimelineHeaderBarFilterEventDetail,\n\t\t\"sort\": TimelineHeaderBarSortEventDetail,\n\t};\n\n\t/**\n\t * Shows the search input field.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowSearch = false;\n\n\t/**\n\t * Shows the filter button.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowFilter = false;\n\n\t/**\n\t * Shows the sort button.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowSort = false;\n\n\t/**\n\t * Shows the filter by date option.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowFilterByDate = false;\n\n\t/**\n\t * The current filter category label.\n\t * @default \"\"\n\t * @public\n\t */\n\t@property()\n\tfilterBy = \"\";\n\n\t/**\n\t * The current search value.\n\t * @default \"\"\n\t * @public\n\t */\n\t@property()\n\tsearchValue = \"\";\n\n\t/**\n\t * The current sort order.\n\t * @default \"Ascending\"\n\t * @public\n\t */\n\t@property()\n\tsortOrder: `${TimelineSortOrder}` = \"Ascending\";\n\n\t/**\n\t * Controls the filter dialog visibility.\n\t * @private\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_filterDialogOpen = false;\n\n\t/**\n\t * Filter options to display in the filter dialog.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, \"default\": true, invalidateOnChildChange: true })\n\tfilterOptions!: Slot<TimelineFilterOption>;\n\n\t@i18n(\"@ui5/webcomponents-fiori\")\n\tstatic i18nBundle: I18nBundle;\n\n\tget _headerBarAccessibleName() {\n\t\treturn TimelineHeaderBar.i18nBundle.getText(TIMELINE_HEADER_BAR_ACCESSIBLE_NAME);\n\t}\n\n\tget _searchPlaceholder() {\n\t\treturn TimelineHeaderBar.i18nBundle.getText(TIMELINE_SEARCH_PLACEHOLDER);\n\t}\n\n\tget _searchAccessibleName() {\n\t\treturn TimelineHeaderBar.i18nBundle.getText(TIMELINE_SEARCH_ACCESSIBLE_NAME);\n\t}\n\n\tget _filterAccessibleName() {\n\t\treturn TimelineHeaderBar.i18nBundle.getText(TIMELINE_FILTER_ACCESSIBLE_NAME);\n\t}\n\n\tget _sortAccessibleName() {\n\t\treturn TimelineHeaderBar.i18nBundle.getText(TIMELINE_SORT_ACCESSIBLE_NAME);\n\t}\n\n\tget _sortTooltip() {\n\t\tif (this.sortOrder === \"Descending\") {\n\t\t\treturn TimelineHeaderBar.i18nBundle.getText(TIMELINE_SORT_ASCENDING_TOOLTIP);\n\t\t}\n\t\treturn TimelineHeaderBar.i18nBundle.getText(TIMELINE_SORT_DESCENDING_TOOLTIP);\n\t}\n\n\tget _sortIcon() {\n\t\treturn \"sort-descending\";\n\t}\n\n\tget _filterIcon() {\n\t\treturn \"add-filter\";\n\t}\n\n\tget _filterDialogTitle() {\n\t\treturn TimelineHeaderBar.i18nBundle.getText(TIMELINE_FILTER_DIALOG_TITLE);\n\t}\n\n\tget _filterDialogOkText() {\n\t\treturn TimelineHeaderBar.i18nBundle.getText(TIMELINE_FILTER_DIALOG_OK);\n\t}\n\n\tget _filterDialogCancelText() {\n\t\treturn TimelineHeaderBar.i18nBundle.getText(TIMELINE_FILTER_DIALOG_CANCEL);\n\t}\n\n\t_onSearchInput(e: CustomEvent) {\n\t\tconst value = (e.target as Input).value;\n\t\tthis.searchValue = value;\n\t\tthis.fireDecoratorEvent(\"search\", { value });\n\t}\n\n\t_onFilterClick() {\n\t\tthis._filterDialogOpen = true;\n\t}\n\n\t_onFilterDialogConfirm() {\n\t\t// Read selected state from the list items in the dialog\n\t\tconst list = this.shadowRoot!.querySelector<List>(\".ui5-timeline-filter-list\");\n\t\tif (list) {\n\t\t\tconst selectedItems = list.getSelectedItems();\n\t\t\tconst selectedTexts = selectedItems.map(item => item.textContent?.trim() || \"\");\n\n\t\t\t// Update the TimelineFilterOption elements to match the dialog selection\n\t\t\tthis.filterOptions.forEach(option => {\n\t\t\t\toption.selected = selectedTexts.includes(option.text);\n\t\t\t});\n\t\t}\n\n\t\tconst selectedOptions = this.filterOptions\n\t\t\t.filter(option => option.selected)\n\t\t\t.map(option => option.text);\n\n\t\tthis.fireDecoratorEvent(\"filter\", {\n\t\t\tfilterBy: this.filterBy,\n\t\t\tselectedOptions,\n\t\t});\n\n\t\tthis._filterDialogOpen = false;\n\t}\n\n\t_onFilterDialogCancel() {\n\t\tthis._filterDialogOpen = false;\n\t}\n\n\t_onFilterDialogClose() {\n\t\tthis._filterDialogOpen = false;\n\t}\n\n\t_onSortClick() {\n\t\t// Toggle sort order: Ascending -> Descending -> Ascending\n\t\tif (this.sortOrder === \"Ascending\") {\n\t\t\tthis.sortOrder = \"Descending\";\n\t\t} else {\n\t\t\tthis.sortOrder = \"Ascending\";\n\t\t}\n\n\t\tthis.fireDecoratorEvent(\"sort\", {\n\t\t\tsortOrder: this.sortOrder,\n\t\t});\n\t}\n}\n\nTimelineHeaderBar.define();\n\nexport default TimelineHeaderBar;\nexport type {\n\tTimelineHeaderBarSearchEventDetail,\n\tTimelineHeaderBarFilterEventDetail,\n\tTimelineHeaderBarSortEventDetail,\n};\n"]}
@@ -0,0 +1,2 @@
1
+ import type TimelineHeaderBar from "./TimelineHeaderBar.js";
2
+ export default function TimelineHeaderBarTemplate(this: TimelineHeaderBar): import("@ui5/webcomponents-base/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@ui5/webcomponents-base/jsx-runtime";
2
+ import Toolbar from "@ui5/webcomponents/dist/Toolbar.js";
3
+ import ToolbarButton from "@ui5/webcomponents/dist/ToolbarButton.js";
4
+ import ToolbarSpacer from "@ui5/webcomponents/dist/ToolbarSpacer.js";
5
+ import Input from "@ui5/webcomponents/dist/Input.js";
6
+ import Icon from "@ui5/webcomponents/dist/Icon.js";
7
+ import Dialog from "@ui5/webcomponents/dist/Dialog.js";
8
+ import List from "@ui5/webcomponents/dist/List.js";
9
+ import ListItemStandard from "@ui5/webcomponents/dist/ListItemStandard.js";
10
+ import Bar from "@ui5/webcomponents/dist/Bar.js";
11
+ import Button from "@ui5/webcomponents/dist/Button.js";
12
+ import searchIcon from "@ui5/webcomponents-icons/dist/search.js";
13
+ import sortDescending from "@ui5/webcomponents-icons/dist/sort-descending.js";
14
+ import addFilter from "@ui5/webcomponents-icons/dist/add-filter.js";
15
+ export default function TimelineHeaderBarTemplate() {
16
+ return (_jsxs(_Fragment, { children: [_jsxs(Toolbar, { class: "ui5-timeline-header-bar-toolbar", accessibleName: this._headerBarAccessibleName, children: [_jsx(ToolbarSpacer, {}), this.showSearch && (_jsx(Input, { class: "ui5-timeline-header-bar-search", placeholder: this._searchPlaceholder, value: this.searchValue, showClearIcon: true, accessibleName: this._searchAccessibleName, onInput: this._onSearchInput, children: _jsx(Icon, { slot: "icon", name: searchIcon }) })), this.showSort && (_jsx(ToolbarButton, { icon: sortDescending, design: "Transparent", tooltip: this._sortTooltip, accessibleName: this._sortAccessibleName, onClick: this._onSortClick })), this.showFilter && (_jsx(ToolbarButton, { icon: addFilter, design: "Transparent", tooltip: this._filterAccessibleName, accessibleName: this._filterAccessibleName, onClick: this._onFilterClick }))] }), this.showFilter && (_jsxs(Dialog, { class: "ui5-timeline-filter-dialog", headerText: this._filterDialogTitle, open: this._filterDialogOpen, onClose: this._onFilterDialogClose, children: [_jsx(List, { selectionMode: "Multiple", class: "ui5-timeline-filter-list", children: this.filterOptions.map(option => (_jsx(ListItemStandard, { selected: option.selected, "data-filter-text": option.text, children: option.text }, option.text))) }), _jsxs(Bar, { slot: "footer", design: "Footer", children: [_jsx(Button, { slot: "endContent", design: "Emphasized", onClick: this._onFilterDialogConfirm, children: this._filterDialogOkText }), _jsx(Button, { slot: "endContent", design: "Transparent", onClick: this._onFilterDialogCancel, children: this._filterDialogCancelText })] })] }))] }));
17
+ }
18
+ //# sourceMappingURL=TimelineHeaderBarTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimelineHeaderBarTemplate.js","sourceRoot":"","sources":["../src/TimelineHeaderBarTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,OAAO,MAAM,oCAAoC,CAAC;AACzD,OAAO,aAAa,MAAM,0CAA0C,CAAC;AACrE,OAAO,aAAa,MAAM,0CAA0C,CAAC;AACrE,OAAO,KAAK,MAAM,kCAAkC,CAAC;AACrD,OAAO,IAAI,MAAM,iCAAiC,CAAC;AACnD,OAAO,MAAM,MAAM,mCAAmC,CAAC;AACvD,OAAO,IAAI,MAAM,iCAAiC,CAAC;AACnD,OAAO,gBAAgB,MAAM,6CAA6C,CAAC;AAC3E,OAAO,GAAG,MAAM,gCAAgC,CAAC;AACjD,OAAO,MAAM,MAAM,mCAAmC,CAAC;AAEvD,OAAO,UAAU,MAAM,yCAAy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,IAAI,IACJ,aAAa,EAAC,UAAU,EACxB,KAAK,EAAC,0BAA0B,YAE/B,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CACjC,KAAC,gBAAgB,IAEhB,QAAQ,EAAE,MAAM,CAAC,QAAQ,sBACP,MAAM,CAAC,IAAI,YAE5B,MAAM,CAAC,IAAI,IAJP,MAAM,CAAC,IAAI,CAKE,CACnB,CAAC,GACI,EAEP,MAAC,GAAG,IAAC,IAAI,EAAC,QAAQ,EAAC,MAAM,EAAC,QAAQ,aACjC,KAAC,MAAM,IACN,IAAI,EAAC,YAAY,EACjB,MAAM,EAAC,YAAY,EACnB,OAAO,EAAE,IAAI,CAAC,sBAAsB,YAEnC,IAAI,CAAC,mBAAmB,GACjB,EACT,KAAC,MAAM,IACN,IAAI,EAAC,YAAY,EACjB,MAAM,EAAC,aAAa,EACpB,OAAO,EAAE,IAAI,CAAC,qBAAqB,YAElC,IAAI,CAAC,uBAAuB,GACrB,IACJ,IACE,CACT,IACC,CAAC,CAAC;AACN,CAAC","sourcesContent":["import Toolbar from \"@ui5/webcomponents/dist/Toolbar.js\";\nimport ToolbarButton from \"@ui5/webcomponents/dist/ToolbarButton.js\";\nimport ToolbarSpacer from \"@ui5/webcomponents/dist/ToolbarSpacer.js\";\nimport Input from \"@ui5/webcomponents/dist/Input.js\";\nimport Icon from \"@ui5/webcomponents/dist/Icon.js\";\nimport Dialog from \"@ui5/webcomponents/dist/Dialog.js\";\nimport List from \"@ui5/webcomponents/dist/List.js\";\nimport ListItemStandard from \"@ui5/webcomponents/dist/ListItemStandard.js\";\nimport Bar from \"@ui5/webcomponents/dist/Bar.js\";\nimport Button from \"@ui5/webcomponents/dist/Button.js\";\nimport type TimelineHeaderBar from \"./TimelineHeaderBar.js\";\nimport searchIcon from \"@ui5/webcomponents-icons/dist/search.js\";\nimport sortDescending from \"@ui5/webcomponents-icons/dist/sort-descending.js\";\nimport addFilter from \"@ui5/webcomponents-icons/dist/add-filter.js\";\n\nexport default function TimelineHeaderBarTemplate(this: TimelineHeaderBar) {\n\treturn (<>\n\t\t<Toolbar\n\t\t\tclass=\"ui5-timeline-header-bar-toolbar\"\n\t\t\taccessibleName={this._headerBarAccessibleName}\n\t\t>\n\t\t\t{/* Spacer pushes all controls to the end */}\n\t\t\t<ToolbarSpacer />\n\n\t\t\t{/* Search Input */}\n\t\t\t{this.showSearch && (\n\t\t\t\t<Input\n\t\t\t\t\tclass=\"ui5-timeline-header-bar-search\"\n\t\t\t\t\tplaceholder={this._searchPlaceholder}\n\t\t\t\t\tvalue={this.searchValue}\n\t\t\t\t\tshowClearIcon={true}\n\t\t\t\t\taccessibleName={this._searchAccessibleName}\n\t\t\t\t\tonInput={this._onSearchInput}\n\t\t\t\t>\n\t\t\t\t\t<Icon slot=\"icon\" name={searchIcon} />\n\t\t\t\t</Input>\n\t\t\t)}\n\n\t\t\t{/* Sort Button */}\n\t\t\t{this.showSort && (\n\t\t\t\t<ToolbarButton\n\t\t\t\t\ticon={sortDescending}\n\t\t\t\t\tdesign=\"Transparent\"\n\t\t\t\t\ttooltip={this._sortTooltip}\n\t\t\t\t\taccessibleName={this._sortAccessibleName}\n\t\t\t\t\tonClick={this._onSortClick}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t{/* Filter Button */}\n\t\t\t{this.showFilter && (\n\t\t\t\t<ToolbarButton\n\t\t\t\t\ticon={addFilter}\n\t\t\t\t\tdesign=\"Transparent\"\n\t\t\t\t\ttooltip={this._filterAccessibleName}\n\t\t\t\t\taccessibleName={this._filterAccessibleName}\n\t\t\t\t\tonClick={this._onFilterClick}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</Toolbar>\n\n\t\t{/* Filter Dialog */}\n\t\t{this.showFilter && (\n\t\t\t<Dialog\n\t\t\t\tclass=\"ui5-timeline-filter-dialog\"\n\t\t\t\theaderText={this._filterDialogTitle}\n\t\t\t\topen={this._filterDialogOpen}\n\t\t\t\tonClose={this._onFilterDialogClose}\n\t\t\t>\n\t\t\t\t<List\n\t\t\t\t\tselectionMode=\"Multiple\"\n\t\t\t\t\tclass=\"ui5-timeline-filter-list\"\n\t\t\t\t>\n\t\t\t\t\t{this.filterOptions.map(option => (\n\t\t\t\t\t\t<ListItemStandard\n\t\t\t\t\t\t\tkey={option.text}\n\t\t\t\t\t\t\tselected={option.selected}\n\t\t\t\t\t\t\tdata-filter-text={option.text}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{option.text}\n\t\t\t\t\t\t</ListItemStandard>\n\t\t\t\t\t))}\n\t\t\t\t</List>\n\n\t\t\t\t<Bar slot=\"footer\" design=\"Footer\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tslot=\"endContent\"\n\t\t\t\t\t\tdesign=\"Emphasized\"\n\t\t\t\t\t\tonClick={this._onFilterDialogConfirm}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this._filterDialogOkText}\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tslot=\"endContent\"\n\t\t\t\t\t\tdesign=\"Transparent\"\n\t\t\t\t\t\tonClick={this._onFilterDialogCancel}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this._filterDialogCancelText}\n\t\t\t\t\t</Button>\n\t\t\t\t</Bar>\n\t\t\t</Dialog>\n\t\t)}\n\t</>);\n}\n"]}
@@ -96,6 +96,8 @@ declare class TimelineItem extends UI5Element implements ITimelineItem {
96
96
  */
97
97
  lastItem: boolean;
98
98
  /**
99
+ * Used internally by TimelineGroupItem for collapse/expand mechanics.
100
+ * Applications should not use this for filtering — instead, add/remove items from the DOM.
99
101
  * @private
100
102
  */
101
103
  hidden: boolean;
@@ -67,6 +67,8 @@ let TimelineItem = TimelineItem_1 = class TimelineItem extends UI5Element {
67
67
  */
68
68
  this.lastItem = false;
69
69
  /**
70
+ * Used internally by TimelineGroupItem for collapse/expand mechanics.
71
+ * Applications should not use this for filtering — instead, add/remove items from the DOM.
70
72
  * @private
71
73
  */
72
74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base/dist/UI5Element.js\";\nimport type { DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.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 Link from \"@ui5/webcomponents/dist/Link.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { I18nText } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { ITimelineItem } from \"./Timeline.js\";\nimport type ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport TimelineItemTemplate from \"./TimelineItemTemplate.js\";\n// Styles\nimport type TimelineLayout from \"./types/TimelineLayout.js\";\n\nimport {\n\tTIMELINE_ITEM_INFORMATION_STATE_TEXT,\n\tTIMELINE_ITEM_POSITIVE_STATE_TEXT,\n\tTIMELINE_ITEM_NEGATIVE_STATE_TEXT,\n\tTIMELINE_ITEM_CRITICAL_STATE_TEXT,\n} from \"./generated/i18n/i18n-defaults.js\";\n\nimport TimelineItemCss from \"./generated/themes/TimelineItem.css.js\";\n\ntype TimelineItemRole = \"listitem\" | \"treeitem\";\n\n/**\n * @class\n *\n * ### Overview\n *\n * An entry posted on the timeline.\n * @constructor\n * @extends UI5Element\n * @implements { ITimelineItem }\n * @public\n */\n@customElement({\n\ttag: \"ui5-timeline-item\",\n\trenderer: jsxRenderer,\n\tstyles: TimelineItemCss,\n\ttemplate: TimelineItemTemplate,\n})\n/**\n * Fired when the item name is pressed either with a\n * click/tap or by using the Enter or Space key.\n *\n * **Note:** The event will not be fired if the `name-clickable`\n * attribute is not set.\n * @public\n */\n@event(\"name-click\", {\n\tbubbles: true,\n})\nclass TimelineItem extends UI5Element implements ITimelineItem {\n\teventDetails!: {\n\t\t\"name-click\": void\n\t}\n\t/**\n\t * Defines the icon to be displayed as graphical element within the `ui5-timeline-item`.\n\t * SAP-icons font provides numerous options.\n\t *\n\t * See all the available icons in the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\ticon?: string;\n\n\t/**\n\t * Defines the name of the item, displayed before the `title-text`.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tname?: string;\n\n\t/**\n\t * Defines if the `name` is clickable.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tnameClickable = false;\n\n\t/**\n\t * Defines the title text of the component.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\ttitleText?: string;\n\n\t/**\n\t * Defines the subtitle text of the component.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tsubtitleText?: string;\n\n\t/**\n\t * Defines the state of the icon displayed in the `ui5-timeline-item`.\n\t * @default \"None\"\n\t * @public\n\t * @since 2.7.0\n\t */\n\t@property()\n\tstate: `${ValueState}` = \"None\";\n\n\t/**\n\t * Defines the content of the `ui5-timeline-item`.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, \"default\": true })\n\tcontent!: DefaultSlot<Node>;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tfirstItemInTimeline = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tisNextItemGroup = false;\n\n\t@property({ noAttribute: true })\n\tforcedTabIndex = \"-1\";\n\n\t/**\n\t * Defines the items orientation.\n\t * @default \"Vertical\"\n\t * @private\n\t */\n\t@property()\n\tlayout: `${TimelineLayout}` = \"Vertical\";\n\n\t/**\n\t * Defines the indicator line width.\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\tforcedLineWidth?: string;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\thideBubble = false;\n\n\t/**\n\t * Marks the last `<ui5-timeline-item>`\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tlastItem = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\thidden = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\teffectiveRole: `${TimelineItemRole}` = \"listitem\";\n\n\t/**\n\t * Defines the position of the item in a group.\n\t * @private\n\t */\n\t@property({ type: Number })\n\tpositionInGroup?: number;\n\n\t@i18n(\"@ui5/webcomponents-fiori\")\n\tstatic i18nBundleFiori: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tonNamePress() {\n\t\tthis.fireDecoratorEvent(\"name-click\");\n\t}\n\n\t/**\n\t * Focus the internal link.\n\t */\n\tfocusLink() {\n\t\tthis.shadowRoot!.querySelector<Link>(\"[ui5-link]\")?.focus();\n\t}\n\n\tstatic typeTextMappings(): Record<string, I18nText> {\n\t\treturn {\n\t\t\t\"Information\": TIMELINE_ITEM_INFORMATION_STATE_TEXT,\n\t\t\t\"Positive\": TIMELINE_ITEM_POSITIVE_STATE_TEXT,\n\t\t\t\"Negative\": TIMELINE_ITEM_NEGATIVE_STATE_TEXT,\n\t\t\t\"Critical\": TIMELINE_ITEM_CRITICAL_STATE_TEXT,\n\t\t};\n\t}\n\n\tget timelineItemStateText() {\n\t\treturn this.state !== \"None\" ? TimelineItem.i18nBundleFiori.getText(TimelineItem.typeTextMappings()[this.state]) : undefined;\n\t}\n\n\tget isGroupItem() {\n\t\treturn false;\n\t}\n\n\tget _getAccessibleLabel() {\n\t\tconst parts = [];\n\n\t\tif (this.name) {\n\t\t\tparts.push(this.name);\n\t\t}\n\n\t\tif (this.titleText) {\n\t\t\tparts.push(this.titleText);\n\t\t}\n\n\t\tif (this.subtitleText) {\n\t\t\tparts.push(this.subtitleText);\n\t\t}\n\n\t\tif (this.timelineItemStateText) {\n\t\t\tparts.push(this.timelineItemStateText);\n\t\t}\n\n\t\treturn parts.join(\", \");\n\t}\n}\n\nTimelineItem.define();\n\nexport default TimelineItem;\n"]}
1
+ {"version":3,"file":"TimelineItem.js","sourceRoot":"","sources":["../src/TimelineItem.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAC1E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAM/E,OAAO,oBAAoB,MAAM,2BAA2B,CAAC;AAI7D,OAAO,EACN,oCAAoC,EACpC,iCAAiC,EACjC,iCAAiC,EACjC,iCAAiC,GACjC,MAAM,mCAAmC,CAAC;AAE3C,OAAO,eAAe,MAAM,wCAAwC,CAAC;AAIrE;;;;;;;;;;GAUG;AAkBH,IAAM,YAAY,oBAAlB,MAAM,YAAa,SAAQ,UAAU;IAkIpC;QACC,KAAK,EAAE,CAAC;QA5GT;;;;WAIG;QAEH,kBAAa,GAAG,KAAK,CAAC;QAkBtB;;;;;WAKG;QAEH,UAAK,GAAoB,MAAM,CAAC;QAShC;;WAEG;QAEH,wBAAmB,GAAG,KAAK,CAAC;QAE5B;;WAEG;QAEH,oBAAe,GAAG,KAAK,CAAC;QAGxB,mBAAc,GAAG,IAAI,CAAC;QAEtB;;;;WAIG;QAEH,WAAM,GAAwB,UAAU,CAAC;QASzC;;WAEG;QAEH,eAAU,GAAG,KAAK,CAAC;QAEnB;;;WAGG;QAEH,aAAQ,GAAG,KAAK,CAAC;QAEjB;;;;WAIG;QAEH,WAAM,GAAG,KAAK,CAAC;QAEf;;WAEG;QAEH,kBAAa,GAA0B,UAAU,CAAC;IAclD,CAAC;IAED,WAAW;QACV,IAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;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CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.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 Link from \"@ui5/webcomponents/dist/Link.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { I18nText } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { ITimelineItem } from \"./Timeline.js\";\nimport type ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport TimelineItemTemplate from \"./TimelineItemTemplate.js\";\n// Styles\nimport type TimelineLayout from \"./types/TimelineLayout.js\";\n\nimport {\n\tTIMELINE_ITEM_INFORMATION_STATE_TEXT,\n\tTIMELINE_ITEM_POSITIVE_STATE_TEXT,\n\tTIMELINE_ITEM_NEGATIVE_STATE_TEXT,\n\tTIMELINE_ITEM_CRITICAL_STATE_TEXT,\n} from \"./generated/i18n/i18n-defaults.js\";\n\nimport TimelineItemCss from \"./generated/themes/TimelineItem.css.js\";\n\ntype TimelineItemRole = \"listitem\" | \"treeitem\";\n\n/**\n * @class\n *\n * ### Overview\n *\n * An entry posted on the timeline.\n * @constructor\n * @extends UI5Element\n * @implements { ITimelineItem }\n * @public\n */\n@customElement({\n\ttag: \"ui5-timeline-item\",\n\trenderer: jsxRenderer,\n\tstyles: TimelineItemCss,\n\ttemplate: TimelineItemTemplate,\n})\n/**\n * Fired when the item name is pressed either with a\n * click/tap or by using the Enter or Space key.\n *\n * **Note:** The event will not be fired if the `name-clickable`\n * attribute is not set.\n * @public\n */\n@event(\"name-click\", {\n\tbubbles: true,\n})\nclass TimelineItem extends UI5Element implements ITimelineItem {\n\teventDetails!: {\n\t\t\"name-click\": void\n\t}\n\t/**\n\t * Defines the icon to be displayed as graphical element within the `ui5-timeline-item`.\n\t * SAP-icons font provides numerous options.\n\t *\n\t * See all the available icons in the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\ticon?: string;\n\n\t/**\n\t * Defines the name of the item, displayed before the `title-text`.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tname?: string;\n\n\t/**\n\t * Defines if the `name` is clickable.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tnameClickable = false;\n\n\t/**\n\t * Defines the title text of the component.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\ttitleText?: string;\n\n\t/**\n\t * Defines the subtitle text of the component.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tsubtitleText?: string;\n\n\t/**\n\t * Defines the state of the icon displayed in the `ui5-timeline-item`.\n\t * @default \"None\"\n\t * @public\n\t * @since 2.7.0\n\t */\n\t@property()\n\tstate: `${ValueState}` = \"None\";\n\n\t/**\n\t * Defines the content of the `ui5-timeline-item`.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, \"default\": true })\n\tcontent!: DefaultSlot<Node>;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tfirstItemInTimeline = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tisNextItemGroup = false;\n\n\t@property({ noAttribute: true })\n\tforcedTabIndex = \"-1\";\n\n\t/**\n\t * Defines the items orientation.\n\t * @default \"Vertical\"\n\t * @private\n\t */\n\t@property()\n\tlayout: `${TimelineLayout}` = \"Vertical\";\n\n\t/**\n\t * Defines the indicator line width.\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\tforcedLineWidth?: string;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\thideBubble = false;\n\n\t/**\n\t * Marks the last `<ui5-timeline-item>`\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tlastItem = false;\n\n\t/**\n\t * Used internally by TimelineGroupItem for collapse/expand mechanics.\n\t * Applications should not use this for filtering — instead, add/remove items from the DOM.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\thidden = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\teffectiveRole: `${TimelineItemRole}` = \"listitem\";\n\n\t/**\n\t * Defines the position of the item in a group.\n\t * @private\n\t */\n\t@property({ type: Number })\n\tpositionInGroup?: number;\n\n\t@i18n(\"@ui5/webcomponents-fiori\")\n\tstatic i18nBundleFiori: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tonNamePress() {\n\t\tthis.fireDecoratorEvent(\"name-click\");\n\t}\n\n\t/**\n\t * Focus the internal link.\n\t */\n\tfocusLink() {\n\t\tthis.shadowRoot!.querySelector<Link>(\"[ui5-link]\")?.focus();\n\t}\n\n\tstatic typeTextMappings(): Record<string, I18nText> {\n\t\treturn {\n\t\t\t\"Information\": TIMELINE_ITEM_INFORMATION_STATE_TEXT,\n\t\t\t\"Positive\": TIMELINE_ITEM_POSITIVE_STATE_TEXT,\n\t\t\t\"Negative\": TIMELINE_ITEM_NEGATIVE_STATE_TEXT,\n\t\t\t\"Critical\": TIMELINE_ITEM_CRITICAL_STATE_TEXT,\n\t\t};\n\t}\n\n\tget timelineItemStateText() {\n\t\treturn this.state !== \"None\" ? TimelineItem.i18nBundleFiori.getText(TimelineItem.typeTextMappings()[this.state]) : undefined;\n\t}\n\n\tget isGroupItem() {\n\t\treturn false;\n\t}\n\n\tget _getAccessibleLabel() {\n\t\tconst parts = [];\n\n\t\tif (this.name) {\n\t\t\tparts.push(this.name);\n\t\t}\n\n\t\tif (this.titleText) {\n\t\t\tparts.push(this.titleText);\n\t\t}\n\n\t\tif (this.subtitleText) {\n\t\t\tparts.push(this.subtitleText);\n\t\t}\n\n\t\tif (this.timelineItemStateText) {\n\t\t\tparts.push(this.timelineItemStateText);\n\t\t}\n\n\t\treturn parts.join(\", \");\n\t}\n}\n\nTimelineItem.define();\n\nexport default TimelineItem;\n"]}
@@ -3,7 +3,7 @@ import Button from "@ui5/webcomponents/dist/Button.js";
3
3
  import BusyIndicator from "@ui5/webcomponents/dist/BusyIndicator.js";
4
4
  export default function TimelineTemplate() {
5
5
  const listRole = this.hasGroupItems ? "tree" : "list";
6
- return (_jsx("div", { class: "ui5-timeline-root", role: "region", "aria-label": this.ariaLabel, onFocusIn: this._onfocusin, onKeyDown: this._onkeydown, children: _jsx(BusyIndicator, { id: `${this._id}-busyIndicator`, delay: this.loadingDelay, active: this.showBusyIndicatorOverlay, class: "ui5-timeline-busy-indicator", children: _jsx("div", { class: "ui5-timeline-scroll-container", children: _jsxs("div", { class: "ui5-timeline-list", role: listRole, "aria-live": "polite", "aria-label": this.ariaLabel, children: [this.items.map(item => _jsx("div", { class: "ui5-timeline-list-item", children: _jsx("slot", { name: item._individualSlot }) })), this.growsWithButton && moreRow.call(this), this.growsOnScroll && endRow.call(this)] }) }) }) }));
6
+ return (_jsxs("div", { class: "ui5-timeline-root", role: "region", "aria-label": this.ariaLabel, onFocusIn: this._onfocusin, onKeyDown: this._onkeydown, children: [this._hasHeaderBar && (_jsx("div", { class: "ui5-timeline-header-bar-wrapper", children: _jsx("slot", { name: "headerBar" }) })), _jsx(BusyIndicator, { id: `${this._id}-busyIndicator`, delay: this.loadingDelay, active: this.showBusyIndicatorOverlay, class: "ui5-timeline-busy-indicator", children: _jsx("div", { class: "ui5-timeline-scroll-container", children: _jsxs("div", { class: "ui5-timeline-list", role: listRole, "aria-live": "polite", "aria-label": this.ariaLabel, children: [this.items.map(item => _jsx("div", { class: "ui5-timeline-list-item", children: _jsx("slot", { name: item._individualSlot }) })), this.growsWithButton && moreRow.call(this), this.growsOnScroll && endRow.call(this)] }) }) })] }));
7
7
  }
8
8
  function moreRow() {
9
9
  return (_jsxs("li", { class: "ui5-timeline-list-item ui5-timeline-list-growing", children: [_jsx("div", { class: "ui5-tli-icon-outer", children: _jsx(Button, { icon: this.growingButtonIcon, id: "ui5-timeline-growing-btn", class: {
@@ -1 +1 @@
1
- {"version":3,"file":"TimelineTemplate.js","sourceRoot":"","sources":["../src/TimelineTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,mCAAmC,CAAC;AAEvD,OAAO,aAAa,MAAM,0CAA0C,CAAC;AAIrE,MAAM,CAAC,OAAO,UAAU,gBAAgB;IACvC,MAAM,QAAQ,GAA0B,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IAE7E,OAAO,CACN,cAAK,KAAK,EAAC,mBAAmB,EAC7B,IAAI,EAAC,QAAQ,gBACD,IAAI,CAAC,SAAS,EAC1B,SAAS,EAAE,IAAI,CAAC,UAAU,EAC1B,SAAS,EAAE,IAAI,CAAC,UAAU,YAE1B,KAAC,aAAa,IACb,EAAE,EAAE,GAAG,IAAI,CAAC,GAAG,gBAAgB,EAC/B,KAAK,EAAE,IAAI,CAAC,YAAY,EACxB,MAAM,EAAE,IAAI,CAAC,wBAAwB,EACrC,KAAK,EAAC,6BAA6B,YAEnC,cAAK,KAAK,EAAC,+BAA+B,YAEzC,eAAK,KAAK,EAAC,mBAAmB,EAC7B,IAAI,EAAE,QAAQ,eACJ,QAAQ,gBACN,IAAI,CAAC,SAAS,aAEzB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CACtB,cAAK,KAAK,EAAC,wBAAwB,YAClC,eAAM,IAAI,EAAE,IAAI,CAAC,eAAe,GAAS,GACpC,CACN,EACC,IAAI,CAAC,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAC1C,IAAI,CAAC,aAAa,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IACpC,GACD,GACS,GACX,CACN,CAAC;AACH,CAAC;AAED,SAAS,OAAO;IACf,OAAO,CACN,cAAI,KAAK,EAAC,kDAAkD,aAC3D,cAAK,KAAK,EAAC,oBAAoB,YAC9B,KAAC,MAAM,IAAC,IAAI,EAAE,IAAI,CAAC,iBAAiB,EACnC,EAAE,EAAE,0BAA0B,EAC9B,KAAK,EAAE;wBACN,gCAAgC,EAAE,IAAI;wBACtC,wCAAwC,EAAE,IAAI,CAAC,eAAe;qBAC9D,EACD,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAC9B,SAAS,EAAE,IAAI,CAAC,kBAAkB,EAClC,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAC9B,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAC/B,cAAc,EAAE,IAAI,CAAC,iBAAiB,GAC7B,GACL,EACL,IAAI,CAAC,OAAO;gBACZ,KAAC,aAAa,IACb,KAAK,EAAE,IAAI,CAAC,YAAY,EACxB,KAAK,EAAC,4CAA4C,EAClD,MAAM,SACS,IAEb,CACL,CAAC;AACH,CAAC;AAED,SAAS,MAAM;IACd,OAAO,CACN,cAAK,QAAQ,EAAE,CAAC,CAAC,iBAAc,MAAM,EAAC,KAAK,EAAC,yBAAyB,YACpE,eAAM,QAAQ,EAAE,CAAC,CAAC,iBAAc,MAAM,EAAC,KAAK,EAAC,yBAAyB,GAAQ,GACzE,CACN,CAAC;AACH,CAAC","sourcesContent":["import Button from \"@ui5/webcomponents/dist/Button.js\";\nimport type Timeline from \"./Timeline.js\";\nimport BusyIndicator from \"@ui5/webcomponents/dist/BusyIndicator.js\";\n\ntype TimelineListRole = \"list\" | \"tree\";\n\nexport default function TimelineTemplate(this: Timeline) {\n\tconst listRole: `${TimelineListRole}` = this.hasGroupItems ? \"tree\" : \"list\";\n\n\treturn (\n\t\t<div class=\"ui5-timeline-root\"\n\t\t\trole=\"region\"\n\t\t\taria-label={this.ariaLabel}\n\t\t\tonFocusIn={this._onfocusin}\n\t\t\tonKeyDown={this._onkeydown}\n\t\t>\n\t\t\t<BusyIndicator\n\t\t\t\tid={`${this._id}-busyIndicator`}\n\t\t\t\tdelay={this.loadingDelay}\n\t\t\t\tactive={this.showBusyIndicatorOverlay}\n\t\t\t\tclass=\"ui5-timeline-busy-indicator\"\n\t\t\t>\n\t\t\t\t<div class=\"ui5-timeline-scroll-container\">\n\n\t\t\t\t\t<div class=\"ui5-timeline-list\"\n\t\t\t\t\t\trole={listRole}\n\t\t\t\t\t\taria-live=\"polite\"\n\t\t\t\t\t\taria-label={this.ariaLabel}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.items.map(item =>\n\t\t\t\t\t\t\t<div class=\"ui5-timeline-list-item\">\n\t\t\t\t\t\t\t\t<slot name={item._individualSlot}></slot>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{ this.growsWithButton && moreRow.call(this) }\n\t\t\t\t\t\t{ this.growsOnScroll && endRow.call(this) }\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</BusyIndicator>\n\t\t</div>\n\t);\n}\n\nfunction moreRow(this: Timeline) {\n\treturn (\n\t\t<li class=\"ui5-timeline-list-item ui5-timeline-list-growing\">\n\t\t\t<div class=\"ui5-tli-icon-outer\">\n\t\t\t\t<Button icon={this.growingButtonIcon}\n\t\t\t\t\tid={\"ui5-timeline-growing-btn\"}\n\t\t\t\t\tclass={{\n\t\t\t\t\t\t\"ui5-timeline-growing-row-inner\": true,\n\t\t\t\t\t\t\"ui5-timeline-growing-row-inner--active\": this._loadMoreActive\n\t\t\t\t\t}}\n\t\t\t\t\ttabindex={0}\n\t\t\t\t\tonClick={this._onLoadMoreClick}\n\t\t\t\t\tonKeyDown={this._onLoadMoreKeydown}\n\t\t\t\t\tonKeyUp={this._onLoadMoreKeyup}\n\t\t\t\t\ttooltip={this.growingButtonText}\n\t\t\t\t\taccessibleName={this.growingButtonText}\n\t\t\t\t></Button>\n\t\t\t</div>\n\t\t\t{this.loading &&\n\t\t\t\t<BusyIndicator\n\t\t\t\t\tdelay={this.loadingDelay}\n\t\t\t\t\tclass=\"ui5-timeline-growing-button-busy-indicator\"\n\t\t\t\t\tactive>\n\t\t\t\t</BusyIndicator>\n\t\t\t}\n\t\t</li>\n\t);\n}\n\nfunction endRow(this: Timeline) {\n\treturn (\n\t\t<div tabindex={-1} aria-hidden=\"true\" class=\"ui5-timeline-end-marker\">\n\t\t\t<span tabindex={-1} aria-hidden=\"true\" class=\"ui5-timeline-end-marker\"></span>\n\t\t</div>\n\t);\n}\n"]}
1
+ {"version":3,"file":"TimelineTemplate.js","sourceRoot":"","sources":["../src/TimelineTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,mCAAmC,CAAC;AAEvD,OAAO,aAAa,MAAM,0CAA0C,CAAC;AAIrE,MAAM,CAAC,OAAO,UAAU,gBAAgB;IACvC,MAAM,QAAQ,GAA0B,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IAE7E,OAAO,CACN,eAAK,KAAK,EAAC,mBAAmB,EAC7B,IAAI,EAAC,QAAQ,gBACD,IAAI,CAAC,SAAS,EAC1B,SAAS,EAAE,IAAI,CAAC,UAAU,EAC1B,SAAS,EAAE,IAAI,CAAC,UAAU,aAGzB,IAAI,CAAC,aAAa,IAAI,CACtB,cAAK,KAAK,EAAC,iCAAiC,YAC3C,eAAM,IAAI,EAAC,WAAW,GAAQ,GACzB,CACN,EAED,KAAC,aAAa,IACb,EAAE,EAAE,GAAG,IAAI,CAAC,GAAG,gBAAgB,EAC/B,KAAK,EAAE,IAAI,CAAC,YAAY,EACxB,MAAM,EAAE,IAAI,CAAC,wBAAwB,EACrC,KAAK,EAAC,6BAA6B,YAEnC,cAAK,KAAK,EAAC,+BAA+B,YAEzC,eAAK,KAAK,EAAC,mBAAmB,EAC7B,IAAI,EAAE,QAAQ,eACJ,QAA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button from \"@ui5/webcomponents/dist/Button.js\";\nimport type Timeline from \"./Timeline.js\";\nimport BusyIndicator from \"@ui5/webcomponents/dist/BusyIndicator.js\";\n\ntype TimelineListRole = \"list\" | \"tree\";\n\nexport default function TimelineTemplate(this: Timeline) {\n\tconst listRole: `${TimelineListRole}` = this.hasGroupItems ? \"tree\" : \"list\";\n\n\treturn (\n\t\t<div class=\"ui5-timeline-root\"\n\t\t\trole=\"region\"\n\t\t\taria-label={this.ariaLabel}\n\t\t\tonFocusIn={this._onfocusin}\n\t\t\tonKeyDown={this._onkeydown}\n\t\t>\n\t\t\t{/* Header Bar Slot */}\n\t\t\t{this._hasHeaderBar && (\n\t\t\t\t<div class=\"ui5-timeline-header-bar-wrapper\">\n\t\t\t\t\t<slot name=\"headerBar\"></slot>\n\t\t\t\t</div>\n\t\t\t)}\n\n\t\t\t<BusyIndicator\n\t\t\t\tid={`${this._id}-busyIndicator`}\n\t\t\t\tdelay={this.loadingDelay}\n\t\t\t\tactive={this.showBusyIndicatorOverlay}\n\t\t\t\tclass=\"ui5-timeline-busy-indicator\"\n\t\t\t>\n\t\t\t\t<div class=\"ui5-timeline-scroll-container\">\n\n\t\t\t\t\t<div class=\"ui5-timeline-list\"\n\t\t\t\t\t\trole={listRole}\n\t\t\t\t\t\taria-live=\"polite\"\n\t\t\t\t\t\taria-label={this.ariaLabel}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.items.map(item =>\n\t\t\t\t\t\t\t<div class=\"ui5-timeline-list-item\">\n\t\t\t\t\t\t\t\t<slot name={item._individualSlot}></slot>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{ this.growsWithButton && moreRow.call(this) }\n\t\t\t\t\t\t{ this.growsOnScroll && endRow.call(this) }\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</BusyIndicator>\n\t\t</div>\n\t);\n}\n\nfunction moreRow(this: Timeline) {\n\treturn (\n\t\t<li class=\"ui5-timeline-list-item ui5-timeline-list-growing\">\n\t\t\t<div class=\"ui5-tli-icon-outer\">\n\t\t\t\t<Button icon={this.growingButtonIcon}\n\t\t\t\t\tid={\"ui5-timeline-growing-btn\"}\n\t\t\t\t\tclass={{\n\t\t\t\t\t\t\"ui5-timeline-growing-row-inner\": true,\n\t\t\t\t\t\t\"ui5-timeline-growing-row-inner--active\": this._loadMoreActive\n\t\t\t\t\t}}\n\t\t\t\t\ttabindex={0}\n\t\t\t\t\tonClick={this._onLoadMoreClick}\n\t\t\t\t\tonKeyDown={this._onLoadMoreKeydown}\n\t\t\t\t\tonKeyUp={this._onLoadMoreKeyup}\n\t\t\t\t\ttooltip={this.growingButtonText}\n\t\t\t\t\taccessibleName={this.growingButtonText}\n\t\t\t\t></Button>\n\t\t\t</div>\n\t\t\t{this.loading &&\n\t\t\t\t<BusyIndicator\n\t\t\t\t\tdelay={this.loadingDelay}\n\t\t\t\t\tclass=\"ui5-timeline-growing-button-busy-indicator\"\n\t\t\t\t\tactive>\n\t\t\t\t</BusyIndicator>\n\t\t\t}\n\t\t</li>\n\t);\n}\n\nfunction endRow(this: Timeline) {\n\treturn (\n\t\t<div tabindex={-1} aria-hidden=\"true\" class=\"ui5-timeline-end-marker\">\n\t\t\t<span tabindex={-1} aria-hidden=\"true\" class=\"ui5-timeline-end-marker\"></span>\n\t\t</div>\n\t);\n}\n"]}
@@ -12,6 +12,7 @@ import "@ui5/webcomponents-icons/dist/nav-back.js";
12
12
  import type SortItem from "./SortItem.js";
13
13
  import type FilterItem from "./FilterItem.js";
14
14
  import type GroupItem from "./GroupItem.js";
15
+ import type ViewSettingsDialogCustomTab from "./ViewSettingsDialogCustomTab.js";
15
16
  type VSDFilter = Record<string, Array<string>>;
16
17
  type VSDFilters = Array<VSDFilter>;
17
18
  type VSDSettings = {
@@ -50,6 +51,9 @@ type VSDInternalSettings = {
50
51
  index: number;
51
52
  }>;
52
53
  };
54
+ declare const CUSTOM_MODE_PREFIX = "customTabs-";
55
+ type ViewSettingsCustomMode = `${typeof CUSTOM_MODE_PREFIX}${number}`;
56
+ type ViewSettingsDialogInternalMode = `${ViewSettingsDialogMode}` | ViewSettingsCustomMode;
53
57
  /**
54
58
  * @class
55
59
  * ### Overview
@@ -85,6 +89,7 @@ declare class ViewSettingsDialog extends UI5Element {
85
89
  "before-open": void;
86
90
  "open": void;
87
91
  "close": void;
92
+ "reset-click": void;
88
93
  };
89
94
  /**
90
95
  * Defines the initial sort order.
@@ -106,6 +111,18 @@ declare class ViewSettingsDialog extends UI5Element {
106
111
  * @since 2.0.0
107
112
  */
108
113
  open: boolean;
114
+ /**
115
+ * Defines whether the Reset button is always enabled.
116
+ *
117
+ * **Note:** By default, the Reset button is only enabled when the dialog settings
118
+ * differ from their initial state. Set this property to `true` to keep the Reset
119
+ * button always enabled, which is useful when working with custom tabs
120
+ * whose internal state changes cannot be detected by the component.
121
+ * @default false
122
+ * @public
123
+ * @since 2.22.0
124
+ */
125
+ enableReset: boolean;
109
126
  /**
110
127
  * Keeps recently focused list in order to focus it on next dialog open.
111
128
  * @private
@@ -131,7 +148,7 @@ declare class ViewSettingsDialog extends UI5Element {
131
148
  * @since 1.0.0-rc.16
132
149
  * @private
133
150
  */
134
- _currentMode: `${ViewSettingsDialogMode}`;
151
+ _currentMode: ViewSettingsDialogInternalMode;
135
152
  /**
136
153
  * When in Filter By mode, defines whether we need to show the list of keys, or the list with values.
137
154
  * @since 1.0.0-rc.16
@@ -159,6 +176,16 @@ declare class ViewSettingsDialog extends UI5Element {
159
176
  * @public
160
177
  */
161
178
  groupItems: Slot<GroupItem>;
179
+ /**
180
+ * Defines custom tabs for the dialog.
181
+ *
182
+ * The custom tabs are rendered after the built-in tabs (`Sort`, `Filter`, `Group`).
183
+ *
184
+ * **Note:** If you want to use this slot, you need to import the item: `import "@ui5/webcomponents-fiori/dist/ViewSettingsDialogCustomTab.js";`
185
+ * @public
186
+ * @since 2.22.0
187
+ */
188
+ customTabs: Slot<ViewSettingsDialogCustomTab>;
162
189
  _list: List;
163
190
  _dialog?: Dialog;
164
191
  _sortOrder?: List;
@@ -178,7 +205,14 @@ declare class ViewSettingsDialog extends UI5Element {
178
205
  get shouldBuildSort(): boolean;
179
206
  get shouldBuildFilter(): boolean;
180
207
  get shouldBuildGroup(): boolean;
208
+ get shouldBuildCustomTabs(): boolean;
209
+ /**
210
+ * Returns only custom tabs that have an icon defined and can be rendered.
211
+ */
212
+ get _renderableCustomTabs(): ViewSettingsDialogCustomTab[];
181
213
  get hasPagination(): boolean;
214
+ get _defaultMode(): ViewSettingsDialogInternalMode;
215
+ get _selectedCustomTab(): ViewSettingsDialogCustomTab | undefined;
182
216
  get _filterByTitle(): string;
183
217
  get _dialogTitle(): string;
184
218
  get _okButtonLabel(): string;
@@ -230,6 +264,7 @@ declare class ViewSettingsDialog extends UI5Element {
230
264
  get isModeSort(): boolean;
231
265
  get isModeFilter(): boolean;
232
266
  get isModeGroup(): boolean;
267
+ get isModeCustom(): boolean;
233
268
  get showBackButton(): boolean;
234
269
  /**
235
270
  * Shows the dialog.
@@ -285,6 +320,10 @@ declare class ViewSettingsDialog extends UI5Element {
285
320
  * @param settings
286
321
  */
287
322
  _restoreSettings(settings: VSDInternalSettings): void;
323
+ isCurrentCustomTabMode(tab: ViewSettingsDialogCustomTab): boolean;
324
+ _customTabMode(tab: ViewSettingsDialogCustomTab): ViewSettingsCustomMode;
325
+ _isCustomMode(mode: string): mode is ViewSettingsCustomMode;
326
+ _isValidMode(mode: string): mode is ViewSettingsDialogInternalMode;
288
327
  /**
289
328
  * Stores `Sort Order` list as recently used control and its selected item in current state.
290
329
  */