@ui5/webcomponents-fiori 2.22.0-rc.4 → 2.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/NavigationMenuItemTemplate.d.ts +2 -2
  4. package/dist/NavigationMenuItemTemplate.js.map +1 -1
  5. package/dist/Timeline.d.ts +3 -35
  6. package/dist/Timeline.js +4 -62
  7. package/dist/Timeline.js.map +1 -1
  8. package/dist/TimelineItem.d.ts +0 -2
  9. package/dist/TimelineItem.js +0 -2
  10. package/dist/TimelineItem.js.map +1 -1
  11. package/dist/TimelineTemplate.js +1 -1
  12. package/dist/TimelineTemplate.js.map +1 -1
  13. package/dist/UserMenuItem.d.ts +24 -0
  14. package/dist/UserMenuItem.js +52 -3
  15. package/dist/UserMenuItem.js.map +1 -1
  16. package/dist/UserMenuItemTemplate.js +10 -1
  17. package/dist/UserMenuItemTemplate.js.map +1 -1
  18. package/dist/ViewSettingsDialog.d.ts +12 -11
  19. package/dist/ViewSettingsDialog.js +26 -23
  20. package/dist/ViewSettingsDialog.js.map +1 -1
  21. package/dist/ViewSettingsDialogCustomTab.d.ts +5 -5
  22. package/dist/ViewSettingsDialogCustomTab.js +7 -7
  23. package/dist/ViewSettingsDialogCustomTab.js.map +1 -1
  24. package/dist/ViewSettingsDialogTemplate.js +2 -2
  25. package/dist/ViewSettingsDialogTemplate.js.map +1 -1
  26. package/dist/bundle.esm.js +0 -2
  27. package/dist/bundle.esm.js.map +1 -1
  28. package/dist/css/themes/Timeline.css +1 -1
  29. package/dist/css/themes/UserMenuItem.css +1 -1
  30. package/dist/custom-elements-internal.json +205 -694
  31. package/dist/custom-elements.json +109 -440
  32. package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
  33. package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -1
  34. package/dist/generated/i18n/i18n-defaults.d.ts +1 -11
  35. package/dist/generated/i18n/i18n-defaults.js +2 -12
  36. package/dist/generated/i18n/i18n-defaults.js.map +1 -1
  37. package/dist/generated/themes/Timeline.css.d.ts +1 -1
  38. package/dist/generated/themes/Timeline.css.js +1 -1
  39. package/dist/generated/themes/Timeline.css.js.map +1 -1
  40. package/dist/generated/themes/UserMenuItem.css.d.ts +1 -1
  41. package/dist/generated/themes/UserMenuItem.css.js +1 -1
  42. package/dist/generated/themes/UserMenuItem.css.js.map +1 -1
  43. package/dist/vscode.html-custom-data.json +17 -65
  44. package/dist/web-types.json +41 -195
  45. package/package.json +7 -7
  46. package/src/NavigationMenuItemTemplate.tsx +3 -3
  47. package/src/TimelineTemplate.tsx +0 -7
  48. package/src/UserMenuItemTemplate.tsx +19 -1
  49. package/src/ViewSettingsDialogTemplate.tsx +3 -3
  50. package/src/i18n/messagebundle.properties +1 -31
  51. package/src/i18n/messagebundle_en.properties +1 -1
  52. package/src/i18n/messagebundle_en_GB.properties +1 -1
  53. package/src/themes/Timeline.css +7 -21
  54. package/src/themes/UserMenuItem.css +37 -3
  55. package/dist/TimelineFilterOption.d.ts +0 -37
  56. package/dist/TimelineFilterOption.js +0 -59
  57. package/dist/TimelineFilterOption.js.map +0 -1
  58. package/dist/TimelineHeaderBar.d.ts +0 -114
  59. package/dist/TimelineHeaderBar.js +0 -264
  60. package/dist/TimelineHeaderBar.js.map +0 -1
  61. package/dist/TimelineHeaderBarTemplate.d.ts +0 -2
  62. package/dist/TimelineHeaderBarTemplate.js +0 -18
  63. package/dist/TimelineHeaderBarTemplate.js.map +0 -1
  64. package/dist/css/themes/TimelineHeaderBar.css +0 -1
  65. package/dist/generated/themes/TimelineHeaderBar.css.d.ts +0 -2
  66. package/dist/generated/themes/TimelineHeaderBar.css.js +0 -8
  67. package/dist/generated/themes/TimelineHeaderBar.css.js.map +0 -1
  68. package/dist/types/TimelineSortOrder.d.ts +0 -18
  69. package/dist/types/TimelineSortOrder.js +0 -20
  70. package/dist/types/TimelineSortOrder.js.map +0 -1
  71. package/src/TimelineHeaderBarTemplate.tsx +0 -104
  72. package/src/themes/TimelineHeaderBar.css +0 -17
@@ -1,6 +1,24 @@
1
1
  import type UserMenuItem from "./UserMenuItem.js";
2
2
  import MenuItemTemplate from "@ui5/webcomponents/dist/MenuItemTemplate.js";
3
+ import type { MenuItemHooks } from "@ui5/webcomponents/dist/MenuItemTemplate.js";
3
4
 
4
5
  export default function UserMenuItemTemplate(this: UserMenuItem) {
5
- return [MenuItemTemplate.call(this)];
6
+ const hooks: Partial<MenuItemHooks> = {};
7
+
8
+ if (this.showSelection) {
9
+ hooks.menuItemTextContent = userMenuItemTextContent;
10
+ }
11
+
12
+ return [MenuItemTemplate.call(this, hooks)];
13
+ }
14
+
15
+ function userMenuItemTextContent(this: UserMenuItem) {
16
+ return (
17
+ <div class="ui5-user-menu-item-text-wrapper">
18
+ {this.text && <div class="ui5-menu-item-text">{this.text}</div>}
19
+ {this._selectedSubItemText &&
20
+ <div class="ui5-user-menu-item-selection-text">{this._selectedSubItemText}</div>
21
+ }
22
+ </div>
23
+ );
6
24
  }
@@ -93,7 +93,7 @@ function _getSplitButtonItems(this: ViewSettingsDialog) {
93
93
  }
94
94
 
95
95
  if (this.shouldBuildCustomTabs) {
96
- this._renderableCustomTabs.forEach(customTab => {
96
+ this.customTabs.forEach(customTab => {
97
97
  buttonItems.push(
98
98
  <SegmentedButtonItem
99
99
  selected={this.isCurrentCustomTabMode(customTab)}
@@ -130,8 +130,8 @@ function ViewSettingsDialogTemplateContent(this: ViewSettingsDialog) {
130
130
 
131
131
  {this.isModeCustom && this._selectedCustomTab && (
132
132
  <div class="ui5-vsd-custom-tab-content">
133
- {this._selectedCustomTab.title && (
134
- <div class="ui5-vsd-custom-tab-title">{this._selectedCustomTab.title}</div>
133
+ {this._selectedCustomTab.titleText && (
134
+ <div class="ui5-vsd-custom-tab-title">{this._selectedCustomTab.titleText}</div>
135
135
  )}
136
136
  <slot class="ui5-vsd-custom-tab-slot" name={this._selectedCustomTab._individualSlot}></slot>
137
137
  </div>
@@ -116,36 +116,6 @@ TIMELINE_ITEM_POSITIVE_STATE_TEXT=Positive State
116
116
  TIMELINE_ITEM_NEGATIVE_STATE_TEXT=Negative State
117
117
  TIMELINE_ITEM_CRITICAL_STATE_TEXT=Critical State
118
118
 
119
- #XACT: Accessible name for timeline header bar
120
- TIMELINE_HEADER_BAR_ACCESSIBLE_NAME=Timeline actions
121
-
122
- #XFLD: Placeholder for timeline search input
123
- TIMELINE_SEARCH_PLACEHOLDER=Search
124
-
125
- #XACT: Accessible name for timeline search input
126
- TIMELINE_SEARCH_ACCESSIBLE_NAME=Search timeline items
127
-
128
- #XACT: Accessible name for timeline filter dropdown
129
- TIMELINE_FILTER_ACCESSIBLE_NAME=Filter timeline items
130
-
131
- #XTOL: Tooltip for sort ascending button
132
- TIMELINE_SORT_ASCENDING_TOOLTIP=Sort ascending
133
-
134
- #XTOL: Tooltip for sort descending button
135
- TIMELINE_SORT_DESCENDING_TOOLTIP=Sort descending
136
-
137
- #XACT: Accessible name for sort button
138
- TIMELINE_SORT_ACCESSIBLE_NAME=Sort timeline items
139
-
140
- #XTIT: Title for timeline filter dialog
141
- TIMELINE_FILTER_DIALOG_TITLE=Filter By
142
-
143
- #XBUT: OK button text for timeline filter dialog
144
- TIMELINE_FILTER_DIALOG_OK=OK
145
-
146
- #XBUT: Cancel button text for timeline filter dialog
147
- TIMELINE_FILTER_DIALOG_CANCEL=Cancel
148
-
149
119
  #XBUT: Button text for cancel button in the UploadCollectionItem
150
120
  UPLOADCOLLECTIONITEM_CANCELBUTTON_TEXT=Cancel
151
121
 
@@ -207,7 +177,7 @@ SHELLBAR_NOTIFICATIONS = {0} Notifications
207
177
  SHELLBAR_NOTIFICATIONS_NO_COUNT = Notifications
208
178
 
209
179
  #XACT: ARIA announcement for the profile button
210
- SHELLBAR_PROFILE = Profile
180
+ SHELLBAR_PROFILE = User Menu
211
181
 
212
182
  #XACT: ARIA announcement for the products button
213
183
  SHELLBAR_PRODUCTS = Products
@@ -118,7 +118,7 @@ SHELLBAR_NOTIFICATIONS={0} Notifications
118
118
 
119
119
  SHELLBAR_NOTIFICATIONS_NO_COUNT=Notifications
120
120
 
121
- SHELLBAR_PROFILE=Profile
121
+ SHELLBAR_PROFILE=User Menu
122
122
 
123
123
  SHELLBAR_PRODUCTS=Products
124
124
 
@@ -118,7 +118,7 @@ SHELLBAR_NOTIFICATIONS={0} Notifications
118
118
 
119
119
  SHELLBAR_NOTIFICATIONS_NO_COUNT=Notifications
120
120
 
121
- SHELLBAR_PROFILE=Profile
121
+ SHELLBAR_PROFILE=User Menu
122
122
 
123
123
  SHELLBAR_PRODUCTS=Products
124
124
 
@@ -2,10 +2,10 @@
2
2
  display: block;
3
3
  }
4
4
 
5
- /* Header bar wrapper - slotted content */
6
- .ui5-timeline-header-bar-wrapper {
7
- flex-shrink: 0;
8
- margin-block-end: 1rem;
5
+ .ui5-timeline-root {
6
+ padding: var(--_ui5_tl_padding);
7
+ box-sizing: border-box;
8
+ overflow: hidden;
9
9
  }
10
10
 
11
11
  .ui5-timeline-list {
@@ -69,34 +69,20 @@
69
69
  display: none;
70
70
  }
71
71
 
72
- .ui5-timeline-root {
73
- width: 100%;
74
- height: 100%;
75
- position: relative;
76
- box-sizing: border-box;
77
- display: flex;
78
- flex-direction: column;
79
- padding: var(--_ui5_tl_padding);
80
- overflow: hidden;
81
- }
82
-
72
+ .ui5-timeline-root,
83
73
  .ui5-timeline-busy-indicator {
84
- display: block;
85
74
  width: 100%;
86
- flex: 1;
87
- min-height: 0;
75
+ height: 100%;
88
76
  position: relative;
89
77
  box-sizing: border-box;
90
- overflow: hidden;
91
78
  }
92
79
 
93
80
  :host([layout="Vertical"]) .ui5-timeline-scroll-container {
94
81
  height: 100%;
95
82
  width: 100%;
96
- overflow: auto;
97
83
  }
98
84
 
99
85
  :host([growing="Scroll"]) .ui5-timeline-end-marker {
100
86
  /* Ensure the list-end-marker has a block property to always be stretched and "visible" on the screen */
101
87
  display: inline-block;
102
- }
88
+ }
@@ -1,12 +1,46 @@
1
1
  :host {
2
- height: 40px;
2
+ height: 2.5rem;
3
+ min-height: 2.5rem;
3
4
  border: none;
4
5
  }
5
6
 
7
+ .ui5-li-root {
8
+ min-height: 2.5rem;
9
+ }
10
+
6
11
  :host(:last-of-type) {
7
- margin-bottom: 0;
12
+ margin-bottom: 0;
8
13
  }
9
14
 
10
15
  :host(:first-of-type) {
11
- margin-top: 0;
16
+ margin-top: 0;
17
+ }
18
+
19
+ :host([show-selection]) {
20
+ height: 3.25rem;
21
+ min-height: 3.25rem;
22
+ }
23
+
24
+ :host([show-selection]) .ui5-li-root {
25
+ min-height: 3.25rem;
26
+ padding-block: 0.5rem;
27
+ }
28
+
29
+ .ui5-user-menu-item-text-wrapper {
30
+ display: flex;
31
+ flex-direction: column;
32
+ gap: 0.25rem;
33
+ overflow: hidden;
34
+ flex: 1;
35
+ min-width: 0;
36
+ }
37
+
38
+ .ui5-user-menu-item-selection-text {
39
+ font-family: var(--sapFontFamily);
40
+ font-size: var(--sapFontSize);
41
+ font-weight: normal;
42
+ color: var(--sapContent_LabelColor);
43
+ white-space: nowrap;
44
+ overflow: hidden;
45
+ text-overflow: ellipsis;
12
46
  }
@@ -1,37 +0,0 @@
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;
@@ -1,59 +0,0 @@
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
@@ -1 +0,0 @@
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"]}
@@ -1,114 +0,0 @@
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
- * The current filter category label.
68
- * @default ""
69
- * @public
70
- */
71
- filterBy: string;
72
- /**
73
- * The current search value.
74
- * @default ""
75
- * @public
76
- */
77
- searchValue: string;
78
- /**
79
- * The current sort order.
80
- * @default "Ascending"
81
- * @public
82
- */
83
- sortOrder: `${TimelineSortOrder}`;
84
- /**
85
- * Controls the filter dialog visibility.
86
- * @private
87
- */
88
- _filterDialogOpen: boolean;
89
- /**
90
- * Filter options to display in the filter dialog.
91
- * @public
92
- */
93
- filterOptions: Slot<TimelineFilterOption>;
94
- static i18nBundle: I18nBundle;
95
- get _headerBarAccessibleName(): string;
96
- get _searchPlaceholder(): string;
97
- get _searchAccessibleName(): string;
98
- get _filterAccessibleName(): string;
99
- get _sortAccessibleName(): string;
100
- get _sortTooltip(): string;
101
- get _sortIcon(): string;
102
- get _filterIcon(): string;
103
- get _filterDialogTitle(): string;
104
- get _filterDialogOkText(): string;
105
- get _filterDialogCancelText(): string;
106
- _onSearchInput(e: CustomEvent): void;
107
- _onFilterClick(): void;
108
- _onFilterDialogConfirm(): void;
109
- _onFilterDialogCancel(): void;
110
- _onFilterDialogClose(): void;
111
- _onSortClick(): void;
112
- }
113
- export default TimelineHeaderBar;
114
- export type { TimelineHeaderBarSearchEventDetail, TimelineHeaderBarFilterEventDetail, TimelineHeaderBarSortEventDetail, };