@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.
- package/CHANGELOG.md +20 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/Timeline.d.ts +35 -3
- package/dist/Timeline.js +62 -4
- package/dist/Timeline.js.map +1 -1
- package/dist/TimelineFilterOption.d.ts +37 -0
- package/dist/TimelineFilterOption.js +59 -0
- package/dist/TimelineFilterOption.js.map +1 -0
- package/dist/TimelineHeaderBar.d.ts +120 -0
- package/dist/TimelineHeaderBar.js +273 -0
- package/dist/TimelineHeaderBar.js.map +1 -0
- package/dist/TimelineHeaderBarTemplate.d.ts +2 -0
- package/dist/TimelineHeaderBarTemplate.js +18 -0
- package/dist/TimelineHeaderBarTemplate.js.map +1 -0
- package/dist/TimelineItem.d.ts +2 -0
- package/dist/TimelineItem.js +2 -0
- package/dist/TimelineItem.js.map +1 -1
- package/dist/TimelineTemplate.js +1 -1
- package/dist/TimelineTemplate.js.map +1 -1
- package/dist/ViewSettingsDialog.d.ts +40 -1
- package/dist/ViewSettingsDialog.js +114 -7
- package/dist/ViewSettingsDialog.js.map +1 -1
- package/dist/ViewSettingsDialogCustomTab.d.ts +52 -0
- package/dist/ViewSettingsDialogCustomTab.js +81 -0
- package/dist/ViewSettingsDialogCustomTab.js.map +1 -0
- package/dist/ViewSettingsDialogCustomTabTemplate.d.ts +2 -0
- package/dist/ViewSettingsDialogCustomTabTemplate.js +5 -0
- package/dist/ViewSettingsDialogCustomTabTemplate.js.map +1 -0
- package/dist/ViewSettingsDialogTemplate.js +8 -1
- package/dist/ViewSettingsDialogTemplate.js.map +1 -1
- package/dist/bundle.esm.js +3 -0
- package/dist/bundle.esm.js.map +1 -1
- package/dist/css/themes/Timeline.css +1 -1
- package/dist/css/themes/TimelineHeaderBar.css +1 -0
- package/dist/css/themes/ViewSettingsDialog.css +1 -1
- package/dist/custom-elements-internal.json +746 -60
- package/dist/custom-elements.json +511 -9
- package/dist/generated/i18n/i18n-defaults.d.ts +11 -1
- package/dist/generated/i18n/i18n-defaults.js +11 -1
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/themes/Timeline.css.d.ts +1 -1
- package/dist/generated/themes/Timeline.css.js +1 -1
- package/dist/generated/themes/Timeline.css.js.map +1 -1
- package/dist/generated/themes/TimelineHeaderBar.css.d.ts +2 -0
- package/dist/generated/themes/TimelineHeaderBar.css.js +8 -0
- package/dist/generated/themes/TimelineHeaderBar.css.js.map +1 -0
- package/dist/generated/themes/ViewSettingsDialog.css.d.ts +1 -1
- package/dist/generated/themes/ViewSettingsDialog.css.js +1 -1
- package/dist/generated/themes/ViewSettingsDialog.css.js.map +1 -1
- package/dist/types/TimelineSortOrder.d.ts +18 -0
- package/dist/types/TimelineSortOrder.js +20 -0
- package/dist/types/TimelineSortOrder.js.map +1 -0
- package/dist/vscode.html-custom-data.json +88 -2
- package/dist/web-types.json +257 -3
- package/package.json +7 -7
- package/src/TimelineHeaderBarTemplate.tsx +104 -0
- package/src/TimelineTemplate.tsx +7 -0
- package/src/ViewSettingsDialogCustomTabTemplate.tsx +5 -0
- package/src/ViewSettingsDialogTemplate.tsx +31 -0
- package/src/i18n/messagebundle.properties +30 -0
- package/src/themes/Timeline.css +21 -7
- package/src/themes/TimelineHeaderBar.css +17 -0
- package/src/themes/ViewSettingsDialog.css +33 -0
package/dist/Timeline.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
|
-
import type { DefaultSlot } from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
|
+
import type { DefaultSlot, Slot } from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
3
3
|
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
4
4
|
import type { ITabbable } from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js";
|
|
5
5
|
import type ToggleButton from "@ui5/webcomponents/dist/ToggleButton.js";
|
|
@@ -7,6 +7,8 @@ import "./TimelineItem.js";
|
|
|
7
7
|
import ItemNavigation from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js";
|
|
8
8
|
import TimelineLayout from "./types/TimelineLayout.js";
|
|
9
9
|
import TimelineGrowingMode from "./types/TimelineGrowingMode.js";
|
|
10
|
+
import type TimelineHeaderBar from "./TimelineHeaderBar.js";
|
|
11
|
+
import type { TimelineHeaderBarSearchEventDetail, TimelineHeaderBarFilterEventDetail, TimelineHeaderBarSortEventDetail } from "./TimelineHeaderBar.js";
|
|
10
12
|
/**
|
|
11
13
|
* Interface for components that may be slotted inside `ui5-timeline` as items
|
|
12
14
|
* @public
|
|
@@ -25,7 +27,13 @@ interface ITimelineItem extends UI5Element, ITabbable {
|
|
|
25
27
|
isNextItemGroup?: boolean;
|
|
26
28
|
firstItemInTimeline?: boolean;
|
|
27
29
|
effectiveRole?: string;
|
|
30
|
+
titleText?: string;
|
|
31
|
+
name?: string;
|
|
32
|
+
subtitleText?: string;
|
|
28
33
|
}
|
|
34
|
+
type TimelineSearchEventDetail = TimelineHeaderBarSearchEventDetail;
|
|
35
|
+
type TimelineFilterEventDetail = TimelineHeaderBarFilterEventDetail;
|
|
36
|
+
type TimelineSortEventDetail = TimelineHeaderBarSortEventDetail;
|
|
29
37
|
/**
|
|
30
38
|
* @class
|
|
31
39
|
*
|
|
@@ -36,6 +44,15 @@ interface ITimelineItem extends UI5Element, ITabbable {
|
|
|
36
44
|
* These entries can be generated by the system (for example, value XY changed from A to B), or added manually.
|
|
37
45
|
* There are two distinct variants of the timeline: basic and social. The basic timeline is read-only,
|
|
38
46
|
* while the social timeline offers a high level of interaction and collaboration, and is integrated within SAP Jam.
|
|
47
|
+
*
|
|
48
|
+
* ### Header Bar
|
|
49
|
+
*
|
|
50
|
+
* The Timeline supports a `header-bar` slot for search, filter, and sort functionality.
|
|
51
|
+
* Use the `ui5-timeline-header-bar` component in this slot.
|
|
52
|
+
* The Timeline fires `search`, `filter`, and `sort` events that the application should handle
|
|
53
|
+
* by adding, removing, or reordering items in the DOM. The Timeline itself does not perform
|
|
54
|
+
* filtering or sorting — it renders whatever items are provided in the default slot.
|
|
55
|
+
*
|
|
39
56
|
* @constructor
|
|
40
57
|
* @extends UI5Element
|
|
41
58
|
* @public
|
|
@@ -44,6 +61,9 @@ interface ITimelineItem extends UI5Element, ITabbable {
|
|
|
44
61
|
declare class Timeline extends UI5Element {
|
|
45
62
|
eventDetails: {
|
|
46
63
|
"load-more": void;
|
|
64
|
+
"search": TimelineSearchEventDetail;
|
|
65
|
+
"filter": TimelineFilterEventDetail;
|
|
66
|
+
"sort": TimelineSortEventDetail;
|
|
47
67
|
};
|
|
48
68
|
/**
|
|
49
69
|
* Defines the items orientation.
|
|
@@ -100,6 +120,17 @@ declare class Timeline extends UI5Element {
|
|
|
100
120
|
* @public
|
|
101
121
|
*/
|
|
102
122
|
items: DefaultSlot<ITimelineItem>;
|
|
123
|
+
/**
|
|
124
|
+
* Defines the header bar of the timeline.
|
|
125
|
+
* Use `ui5-timeline-header-bar` for filtering, sorting, and search functionality.
|
|
126
|
+
*
|
|
127
|
+
* **Note:** The Timeline fires `search`, `filter`, and `sort` events when the user interacts
|
|
128
|
+
* with the header bar. The application should handle these events to filter/sort the items.
|
|
129
|
+
*
|
|
130
|
+
* @public
|
|
131
|
+
* @since 2.22.0
|
|
132
|
+
*/
|
|
133
|
+
headerBar: Slot<TimelineHeaderBar>;
|
|
103
134
|
timelineEndMarker: HTMLElement;
|
|
104
135
|
growingButton: HTMLElement;
|
|
105
136
|
static i18nBundle: I18nBundle;
|
|
@@ -114,8 +145,9 @@ declare class Timeline extends UI5Element {
|
|
|
114
145
|
get growingButtonIcon(): "process" | "drill-down";
|
|
115
146
|
get growingButtonText(): string;
|
|
116
147
|
get growsWithButton(): boolean;
|
|
117
|
-
|
|
148
|
+
get _hasHeaderBar(): boolean;
|
|
118
149
|
onExitDOM(): void;
|
|
150
|
+
onAfterRendering(): void;
|
|
119
151
|
observeTimelineEnd(): Promise<void>;
|
|
120
152
|
unobserveTimelineEnd(): void;
|
|
121
153
|
getIntersectionObserver(): IntersectionObserver;
|
|
@@ -143,4 +175,4 @@ declare class Timeline extends UI5Element {
|
|
|
143
175
|
get _navigableItems(): (ToggleButton | ITimelineItem)[];
|
|
144
176
|
}
|
|
145
177
|
export default Timeline;
|
|
146
|
-
export type { ITimelineItem, };
|
|
178
|
+
export type { ITimelineItem, TimelineSearchEventDetail, TimelineFilterEventDetail, TimelineSortEventDetail, };
|
package/dist/Timeline.js
CHANGED
|
@@ -16,7 +16,7 @@ import { isSpace, isEnter, isUp, isDown, isLeft, isRight, isF2, } from "@ui5/web
|
|
|
16
16
|
import "./TimelineItem.js";
|
|
17
17
|
import ItemNavigation from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js";
|
|
18
18
|
import NavigationMode from "@ui5/webcomponents-base/dist/types/NavigationMode.js";
|
|
19
|
-
import { TIMELINE_ARIA_LABEL, TIMELINE_LOAD_MORE_BUTTON_TEXT } from "./generated/i18n/i18n-defaults.js";
|
|
19
|
+
import { TIMELINE_ARIA_LABEL, TIMELINE_LOAD_MORE_BUTTON_TEXT, } from "./generated/i18n/i18n-defaults.js";
|
|
20
20
|
import TimelineTemplate from "./TimelineTemplate.js";
|
|
21
21
|
import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
|
|
22
22
|
import debounce from "@ui5/webcomponents-base/dist/util/debounce.js";
|
|
@@ -43,6 +43,15 @@ const GROWING_WITH_SCROLL_DEBOUNCE_RATE = 250; // ms
|
|
|
43
43
|
* These entries can be generated by the system (for example, value XY changed from A to B), or added manually.
|
|
44
44
|
* There are two distinct variants of the timeline: basic and social. The basic timeline is read-only,
|
|
45
45
|
* while the social timeline offers a high level of interaction and collaboration, and is integrated within SAP Jam.
|
|
46
|
+
*
|
|
47
|
+
* ### Header Bar
|
|
48
|
+
*
|
|
49
|
+
* The Timeline supports a `header-bar` slot for search, filter, and sort functionality.
|
|
50
|
+
* Use the `ui5-timeline-header-bar` component in this slot.
|
|
51
|
+
* The Timeline fires `search`, `filter`, and `sort` events that the application should handle
|
|
52
|
+
* by adding, removing, or reordering items in the DOM. The Timeline itself does not perform
|
|
53
|
+
* filtering or sorting — it renders whatever items are provided in the default slot.
|
|
54
|
+
*
|
|
46
55
|
* @constructor
|
|
47
56
|
* @extends UI5Element
|
|
48
57
|
* @public
|
|
@@ -120,6 +129,12 @@ let Timeline = Timeline_1 = class Timeline extends UI5Element {
|
|
|
120
129
|
get growsWithButton() {
|
|
121
130
|
return this.growing === TimelineGrowingMode.Button;
|
|
122
131
|
}
|
|
132
|
+
get _hasHeaderBar() {
|
|
133
|
+
return this.headerBar.length > 0;
|
|
134
|
+
}
|
|
135
|
+
onExitDOM() {
|
|
136
|
+
this.unobserveTimelineEnd();
|
|
137
|
+
}
|
|
123
138
|
onAfterRendering() {
|
|
124
139
|
if (this.growsOnScroll) {
|
|
125
140
|
this.observeTimelineEnd();
|
|
@@ -129,9 +144,6 @@ let Timeline = Timeline_1 = class Timeline extends UI5Element {
|
|
|
129
144
|
}
|
|
130
145
|
this.growingIntersectionObserver = this.getIntersectionObserver();
|
|
131
146
|
}
|
|
132
|
-
onExitDOM() {
|
|
133
|
-
this.unobserveTimelineEnd();
|
|
134
|
-
}
|
|
135
147
|
async observeTimelineEnd() {
|
|
136
148
|
if (!this.timeLineEndObserved) {
|
|
137
149
|
await renderFinished();
|
|
@@ -346,6 +358,9 @@ __decorate([
|
|
|
346
358
|
__decorate([
|
|
347
359
|
slot({ type: HTMLElement, individualSlots: true, "default": true })
|
|
348
360
|
], Timeline.prototype, "items", void 0);
|
|
361
|
+
__decorate([
|
|
362
|
+
slot()
|
|
363
|
+
], Timeline.prototype, "headerBar", void 0);
|
|
349
364
|
__decorate([
|
|
350
365
|
query(".ui5-timeline-end-marker")
|
|
351
366
|
], Timeline.prototype, "timelineEndMarker", void 0);
|
|
@@ -374,6 +389,49 @@ Timeline = Timeline_1 = __decorate([
|
|
|
374
389
|
event("load-more", {
|
|
375
390
|
bubbles: true,
|
|
376
391
|
})
|
|
392
|
+
/**
|
|
393
|
+
* Fired when the user performs a search in the header bar.
|
|
394
|
+
*
|
|
395
|
+
* **Note:** The Timeline does not perform filtering. The application should handle
|
|
396
|
+
* this event and add/remove items from the DOM to reflect the search results.
|
|
397
|
+
*
|
|
398
|
+
* @param {string} value The search value entered by the user.
|
|
399
|
+
* @public
|
|
400
|
+
* @since 2.22.0
|
|
401
|
+
*/
|
|
402
|
+
,
|
|
403
|
+
event("search", {
|
|
404
|
+
bubbles: true,
|
|
405
|
+
})
|
|
406
|
+
/**
|
|
407
|
+
* Fired when the user changes filter selection in the header bar.
|
|
408
|
+
*
|
|
409
|
+
* **Note:** The Timeline does not perform filtering. The application should handle
|
|
410
|
+
* this event and add/remove items from the DOM to reflect the filter selection.
|
|
411
|
+
*
|
|
412
|
+
* @param {string} filterBy The filter category.
|
|
413
|
+
* @param {string[]} selectedOptions The selected filter option texts.
|
|
414
|
+
* @public
|
|
415
|
+
* @since 2.22.0
|
|
416
|
+
*/
|
|
417
|
+
,
|
|
418
|
+
event("filter", {
|
|
419
|
+
bubbles: true,
|
|
420
|
+
})
|
|
421
|
+
/**
|
|
422
|
+
* Fired when the user changes sort order in the header bar.
|
|
423
|
+
*
|
|
424
|
+
* **Note:** The Timeline does not perform sorting. The application should handle
|
|
425
|
+
* this event and reorder the items in the DOM accordingly.
|
|
426
|
+
*
|
|
427
|
+
* @param {string} sortOrder The sort order ("Ascending" or "Descending").
|
|
428
|
+
* @public
|
|
429
|
+
* @since 2.22.0
|
|
430
|
+
*/
|
|
431
|
+
,
|
|
432
|
+
event("sort", {
|
|
433
|
+
bubbles: true,
|
|
434
|
+
})
|
|
377
435
|
], Timeline);
|
|
378
436
|
Timeline.define();
|
|
379
437
|
export default Timeline;
|
package/dist/Timeline.js.map
CHANGED
|
@@ -1 +1 @@
|
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,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,CAoXb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,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 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 * @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 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@query(\".ui5-timeline-end-marker\")\n\ttimelineEndMarker!: HTMLElement;\n\n\t@query((`[id=\"ui5-timeline-growing-btn\"]`))\n\tgrowingButton!: 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 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\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,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,EACN,mBAAmB,EACn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AAE,IAAI;KACb,CAAC;GAEI,QAAQ,CAwYb;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 {\n\tTIMELINE_ARIA_LABEL,\n\tTIMELINE_LOAD_MORE_BUTTON_TEXT,\n} 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\";\nimport type TimelineHeaderBar from \"./TimelineHeaderBar.js\";\nimport type { TimelineHeaderBarSearchEventDetail, TimelineHeaderBarFilterEventDetail, TimelineHeaderBarSortEventDetail } from \"./TimelineHeaderBar.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\ttitleText?: string;\n\tname?: string;\n\tsubtitleText?: string;\n}\n\ntype TimelineSearchEventDetail = TimelineHeaderBarSearchEventDetail;\n\ntype TimelineFilterEventDetail = TimelineHeaderBarFilterEventDetail;\n\ntype TimelineSortEventDetail = TimelineHeaderBarSortEventDetail;\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 Bar\n *\n * The Timeline supports a `header-bar` slot for search, filter, and sort functionality.\n * Use the `ui5-timeline-header-bar` component in this slot.\n * The Timeline fires `search`, `filter`, and `sort` events that the application should handle\n * by adding, removing, or reordering items in the DOM. The Timeline itself does not perform\n * filtering or sorting — it renders whatever items are provided in the default slot.\n *\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\n/**\n * Fired when the user performs a search in the header bar.\n *\n * **Note:** The Timeline does not perform filtering. The application should handle\n * this event and add/remove items from the DOM to reflect the search results.\n *\n * @param {string} value The search value entered by the user.\n * @public\n * @since 2.22.0\n */\n@event(\"search\", {\n\tbubbles: true,\n})\n\n/**\n * Fired when the user changes filter selection in the header bar.\n *\n * **Note:** The Timeline does not perform filtering. The application should handle\n * this event and add/remove items from the DOM to reflect the filter selection.\n *\n * @param {string} filterBy The filter category.\n * @param {string[]} selectedOptions The selected filter option texts.\n * @public\n * @since 2.22.0\n */\n@event(\"filter\", {\n\tbubbles: true,\n})\n\n/**\n * Fired when the user changes sort order in the header bar.\n *\n * **Note:** The Timeline does not perform sorting. The application should handle\n * this event and reorder the items in the DOM accordingly.\n *\n * @param {string} sortOrder The sort order (\"Ascending\" or \"Descending\").\n * @public\n * @since 2.22.0\n */\n@event(\"sort\", {\n\tbubbles: true,\n})\n\nclass Timeline extends UI5Element {\n\teventDetails!: {\n\t\t\"load-more\": void,\n\t\t\"search\": TimelineSearchEventDetail,\n\t\t\"filter\": TimelineFilterEventDetail,\n\t\t\"sort\": TimelineSortEventDetail,\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 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 header bar of the timeline.\n\t * Use `ui5-timeline-header-bar` for filtering, sorting, and search functionality.\n\t *\n\t * **Note:** The Timeline fires `search`, `filter`, and `sort` events when the user interacts\n\t * with the header bar. The application should handle these events to filter/sort the items.\n\t *\n\t * @public\n\t * @since 2.22.0\n\t */\n\t@slot()\n\theaderBar!: Slot<TimelineHeaderBar>;\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@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 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\tget _hasHeaderBar(): boolean {\n\t\treturn this.headerBar.length > 0;\n\t}\n\n\tonExitDOM() {\n\t\tthis.unobserveTimelineEnd();\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\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\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\tTimelineSearchEventDetail,\n\tTimelineFilterEventDetail,\n\tTimelineSortEventDetail,\n};\n"]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
|
+
/**
|
|
3
|
+
* @class
|
|
4
|
+
*
|
|
5
|
+
* ### Overview
|
|
6
|
+
*
|
|
7
|
+
* The `ui5-timeline-filter-option` component defines individual filter values within a `ui5-timeline-header-bar`.
|
|
8
|
+
* It represents a single selectable option that users can choose to filter timeline items.
|
|
9
|
+
*
|
|
10
|
+
* ### Usage
|
|
11
|
+
*
|
|
12
|
+
* The `ui5-timeline-filter-option` is used as a child component within `ui5-timeline-header-bar`.
|
|
13
|
+
* Each option represents a specific value that can be used for filtering.
|
|
14
|
+
*
|
|
15
|
+
* ### ES6 Module Import
|
|
16
|
+
*
|
|
17
|
+
* `import "@ui5/webcomponents-fiori/dist/TimelineFilterOption.js";`
|
|
18
|
+
* @constructor
|
|
19
|
+
* @extends UI5Element
|
|
20
|
+
* @since 2.22.0
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
declare class TimelineFilterOption extends UI5Element {
|
|
24
|
+
/**
|
|
25
|
+
* Defines the text of the filter option.
|
|
26
|
+
* @default ""
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
text: string;
|
|
30
|
+
/**
|
|
31
|
+
* Defines if the filter option is selected.
|
|
32
|
+
* @default false
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
selected: boolean;
|
|
36
|
+
}
|
|
37
|
+
export default TimelineFilterOption;
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
8
|
+
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
9
|
+
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
10
|
+
/**
|
|
11
|
+
* @class
|
|
12
|
+
*
|
|
13
|
+
* ### Overview
|
|
14
|
+
*
|
|
15
|
+
* The `ui5-timeline-filter-option` component defines individual filter values within a `ui5-timeline-header-bar`.
|
|
16
|
+
* It represents a single selectable option that users can choose to filter timeline items.
|
|
17
|
+
*
|
|
18
|
+
* ### Usage
|
|
19
|
+
*
|
|
20
|
+
* The `ui5-timeline-filter-option` is used as a child component within `ui5-timeline-header-bar`.
|
|
21
|
+
* Each option represents a specific value that can be used for filtering.
|
|
22
|
+
*
|
|
23
|
+
* ### ES6 Module Import
|
|
24
|
+
*
|
|
25
|
+
* `import "@ui5/webcomponents-fiori/dist/TimelineFilterOption.js";`
|
|
26
|
+
* @constructor
|
|
27
|
+
* @extends UI5Element
|
|
28
|
+
* @since 2.22.0
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
let TimelineFilterOption = class TimelineFilterOption extends UI5Element {
|
|
32
|
+
constructor() {
|
|
33
|
+
super(...arguments);
|
|
34
|
+
/**
|
|
35
|
+
* Defines the text of the filter option.
|
|
36
|
+
* @default ""
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
this.text = "";
|
|
40
|
+
/**
|
|
41
|
+
* Defines if the filter option is selected.
|
|
42
|
+
* @default false
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
this.selected = false;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
__decorate([
|
|
49
|
+
property()
|
|
50
|
+
], TimelineFilterOption.prototype, "text", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
property({ type: Boolean })
|
|
53
|
+
], TimelineFilterOption.prototype, "selected", void 0);
|
|
54
|
+
TimelineFilterOption = __decorate([
|
|
55
|
+
customElement("ui5-timeline-filter-option")
|
|
56
|
+
], TimelineFilterOption);
|
|
57
|
+
TimelineFilterOption.define();
|
|
58
|
+
export default TimelineFilterOption;
|
|
59
|
+
//# sourceMappingURL=TimelineFilterOption.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimelineFilterOption.js","sourceRoot":"","sources":["../src/TimelineFilterOption.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AAErF;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,UAAU;IAA7C;;QACC;;;;WAIG;QAEH,SAAI,GAAG,EAAE,CAAC;QAEV;;;;WAIG;QAEH,aAAQ,GAAG,KAAK,CAAC;IAClB,CAAC;CAAA,CAAA;AATA;IADC,QAAQ,EAAE;kDACD;AAQV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sDACX;AAfZ,oBAAoB;IADzB,aAAa,CAAC,4BAA4B,CAAC;GACtC,oBAAoB,CAgBzB;AAED,oBAAoB,CAAC,MAAM,EAAE,CAAC;AAE9B,eAAe,oBAAoB,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-timeline-filter-option` component defines individual filter values within a `ui5-timeline-header-bar`.\n * It represents a single selectable option that users can choose to filter timeline items.\n *\n * ### Usage\n *\n * The `ui5-timeline-filter-option` is used as a child component within `ui5-timeline-header-bar`.\n * Each option represents a specific value that can be used for filtering.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents-fiori/dist/TimelineFilterOption.js\";`\n * @constructor\n * @extends UI5Element\n * @since 2.22.0\n * @public\n */\n@customElement(\"ui5-timeline-filter-option\")\nclass TimelineFilterOption extends UI5Element {\n\t/**\n\t * Defines the text of the filter option.\n\t * @default \"\"\n\t * @public\n\t */\n\t@property()\n\ttext = \"\";\n\n\t/**\n\t * Defines if the filter option is selected.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tselected = false;\n}\n\nTimelineFilterOption.define();\n\nexport default TimelineFilterOption;\n"]}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
|
+
import type { Slot } from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
3
|
+
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
4
|
+
import type TimelineSortOrder from "./types/TimelineSortOrder.js";
|
|
5
|
+
import type TimelineFilterOption from "./TimelineFilterOption.js";
|
|
6
|
+
import "@ui5/webcomponents-icons/dist/sort-descending.js";
|
|
7
|
+
import "@ui5/webcomponents-icons/dist/add-filter.js";
|
|
8
|
+
type TimelineHeaderBarSearchEventDetail = {
|
|
9
|
+
value: string;
|
|
10
|
+
};
|
|
11
|
+
type TimelineHeaderBarFilterEventDetail = {
|
|
12
|
+
filterBy: string;
|
|
13
|
+
selectedOptions: string[];
|
|
14
|
+
};
|
|
15
|
+
type TimelineHeaderBarSortEventDetail = {
|
|
16
|
+
sortOrder: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* @class
|
|
20
|
+
*
|
|
21
|
+
* ### Overview
|
|
22
|
+
*
|
|
23
|
+
* The `ui5-timeline-header-bar` component provides search, filter, and sort functionality
|
|
24
|
+
* for the `ui5-timeline` component. It is designed to be slotted into the `header-bar` slot
|
|
25
|
+
* of the Timeline.
|
|
26
|
+
*
|
|
27
|
+
* ### Usage
|
|
28
|
+
*
|
|
29
|
+
* The component fires events (`search`, `filter`, `sort`) that the application should handle
|
|
30
|
+
* to filter/sort the timeline items. The Timeline component itself does not perform any
|
|
31
|
+
* filtering or sorting - this is the responsibility of the application.
|
|
32
|
+
*
|
|
33
|
+
* ### ES6 Module Import
|
|
34
|
+
*
|
|
35
|
+
* `import "@ui5/webcomponents-fiori/dist/TimelineHeaderBar.js";`
|
|
36
|
+
*
|
|
37
|
+
* @constructor
|
|
38
|
+
* @extends UI5Element
|
|
39
|
+
* @public
|
|
40
|
+
* @since 2.22.0
|
|
41
|
+
*/
|
|
42
|
+
declare class TimelineHeaderBar extends UI5Element {
|
|
43
|
+
eventDetails: {
|
|
44
|
+
"search": TimelineHeaderBarSearchEventDetail;
|
|
45
|
+
"filter": TimelineHeaderBarFilterEventDetail;
|
|
46
|
+
"sort": TimelineHeaderBarSortEventDetail;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Shows the search input field.
|
|
50
|
+
* @default false
|
|
51
|
+
* @public
|
|
52
|
+
*/
|
|
53
|
+
showSearch: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Shows the filter button.
|
|
56
|
+
* @default false
|
|
57
|
+
* @public
|
|
58
|
+
*/
|
|
59
|
+
showFilter: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Shows the sort button.
|
|
62
|
+
* @default false
|
|
63
|
+
* @public
|
|
64
|
+
*/
|
|
65
|
+
showSort: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Shows the filter by date option.
|
|
68
|
+
* @default false
|
|
69
|
+
* @public
|
|
70
|
+
*/
|
|
71
|
+
showFilterByDate: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* The current filter category label.
|
|
74
|
+
* @default ""
|
|
75
|
+
* @public
|
|
76
|
+
*/
|
|
77
|
+
filterBy: string;
|
|
78
|
+
/**
|
|
79
|
+
* The current search value.
|
|
80
|
+
* @default ""
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
searchValue: string;
|
|
84
|
+
/**
|
|
85
|
+
* The current sort order.
|
|
86
|
+
* @default "Ascending"
|
|
87
|
+
* @public
|
|
88
|
+
*/
|
|
89
|
+
sortOrder: `${TimelineSortOrder}`;
|
|
90
|
+
/**
|
|
91
|
+
* Controls the filter dialog visibility.
|
|
92
|
+
* @private
|
|
93
|
+
*/
|
|
94
|
+
_filterDialogOpen: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Filter options to display in the filter dialog.
|
|
97
|
+
* @public
|
|
98
|
+
*/
|
|
99
|
+
filterOptions: Slot<TimelineFilterOption>;
|
|
100
|
+
static i18nBundle: I18nBundle;
|
|
101
|
+
get _headerBarAccessibleName(): string;
|
|
102
|
+
get _searchPlaceholder(): string;
|
|
103
|
+
get _searchAccessibleName(): string;
|
|
104
|
+
get _filterAccessibleName(): string;
|
|
105
|
+
get _sortAccessibleName(): string;
|
|
106
|
+
get _sortTooltip(): string;
|
|
107
|
+
get _sortIcon(): string;
|
|
108
|
+
get _filterIcon(): string;
|
|
109
|
+
get _filterDialogTitle(): string;
|
|
110
|
+
get _filterDialogOkText(): string;
|
|
111
|
+
get _filterDialogCancelText(): string;
|
|
112
|
+
_onSearchInput(e: CustomEvent): void;
|
|
113
|
+
_onFilterClick(): void;
|
|
114
|
+
_onFilterDialogConfirm(): void;
|
|
115
|
+
_onFilterDialogCancel(): void;
|
|
116
|
+
_onFilterDialogClose(): void;
|
|
117
|
+
_onSortClick(): void;
|
|
118
|
+
}
|
|
119
|
+
export default TimelineHeaderBar;
|
|
120
|
+
export type { TimelineHeaderBarSearchEventDetail, TimelineHeaderBarFilterEventDetail, TimelineHeaderBarSortEventDetail, };
|