@ui5/webcomponents-compat 0.0.0-07d38e78e → 0.0.0-37338d49d
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 +404 -0
- package/README.md +1 -4
- package/dist/Table.d.ts +21 -27
- package/dist/Table.js +122 -75
- package/dist/Table.js.map +1 -1
- package/dist/TableCell.d.ts +0 -1
- package/dist/TableCell.js +21 -6
- package/dist/TableCell.js.map +1 -1
- package/dist/TableCellTemplate.d.ts +2 -0
- package/dist/TableCellTemplate.js +5 -0
- package/dist/TableCellTemplate.js.map +1 -0
- package/dist/TableColumn.d.ts +3 -3
- package/dist/TableColumn.js +47 -7
- package/dist/TableColumn.js.map +1 -1
- package/dist/TableColumnTemplate.d.ts +2 -0
- package/dist/TableColumnTemplate.js +5 -0
- package/dist/TableColumnTemplate.js.map +1 -0
- package/dist/TableGroupRow.d.ts +6 -4
- package/dist/TableGroupRow.js +26 -21
- package/dist/TableGroupRow.js.map +1 -1
- package/dist/TableGroupRowTemplate.d.ts +2 -0
- package/dist/TableGroupRowTemplate.js +5 -0
- package/dist/TableGroupRowTemplate.js.map +1 -0
- package/dist/TableRow.d.ts +14 -9
- package/dist/TableRow.js +101 -43
- package/dist/TableRow.js.map +1 -1
- package/dist/TableRowTemplate.d.ts +2 -0
- package/dist/TableRowTemplate.js +15 -0
- package/dist/TableRowTemplate.js.map +1 -0
- package/dist/TableTemplate.d.ts +2 -0
- package/dist/TableTemplate.js +20 -0
- package/dist/TableTemplate.js.map +1 -0
- package/dist/bundle.esm.d.ts +1 -1
- package/dist/bundle.esm.js +13 -7
- package/dist/bundle.esm.js.map +1 -1
- package/dist/bundle.scoped.config.d.ts +1 -0
- package/dist/bundle.scoped.config.js +5 -0
- package/dist/bundle.scoped.config.js.map +1 -0
- package/dist/bundle.scoped.esm.d.ts +1 -0
- package/dist/bundle.scoped.esm.js +1 -4
- package/dist/bundle.scoped.esm.js.map +1 -1
- package/dist/css/themes/GrowingButton.css +1 -1
- package/dist/css/themes/Table.css +1 -1
- package/dist/css/themes/TableCell.css +1 -1
- package/dist/css/themes/TableColumn.css +1 -1
- package/dist/css/themes/TableGroupRow.css +1 -1
- package/dist/css/themes/TableRow.css +1 -1
- package/dist/css/themes/sap_fiori_3/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
- package/dist/custom-elements-internal.json +62 -68
- package/dist/custom-elements.json +32 -32
- package/dist/generated/assets/i18n/messagebundle_ca.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cy.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lv.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/i18n/i18n-defaults.d.ts +1 -1
- package/dist/generated/i18n/i18n-defaults.js +2 -3
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/json-imports/Themes-fetch.d.ts +1 -0
- package/dist/generated/json-imports/Themes-fetch.js +25 -0
- package/dist/generated/json-imports/Themes-fetch.js.map +1 -0
- package/dist/generated/json-imports/Themes.js.map +1 -1
- package/dist/generated/json-imports/i18n-fetch.d.ts +1 -0
- package/dist/generated/json-imports/i18n-fetch.js +120 -0
- package/dist/generated/json-imports/i18n-fetch.js.map +1 -0
- package/dist/generated/json-imports/i18n.js.map +1 -1
- package/dist/generated/themes/GrowingButton.css.d.ts +2 -3
- package/dist/generated/themes/GrowingButton.css.js +2 -3
- package/dist/generated/themes/GrowingButton.css.js.map +1 -1
- package/dist/generated/themes/Table.css.d.ts +2 -3
- package/dist/generated/themes/Table.css.js +2 -3
- package/dist/generated/themes/Table.css.js.map +1 -1
- package/dist/generated/themes/TableCell.css.d.ts +2 -3
- package/dist/generated/themes/TableCell.css.js +2 -3
- package/dist/generated/themes/TableCell.css.js.map +1 -1
- package/dist/generated/themes/TableColumn.css.d.ts +2 -3
- package/dist/generated/themes/TableColumn.css.js +2 -3
- package/dist/generated/themes/TableColumn.css.js.map +1 -1
- package/dist/generated/themes/TableGroupRow.css.d.ts +2 -3
- package/dist/generated/themes/TableGroupRow.css.js +2 -3
- package/dist/generated/themes/TableGroupRow.css.js.map +1 -1
- package/dist/generated/themes/TableRow.css.d.ts +2 -3
- package/dist/generated/themes/TableRow.css.js +2 -3
- package/dist/generated/themes/TableRow.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.d.ts +2 -3
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +2 -3
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.d.ts +2 -3
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +2 -3
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.d.ts +2 -3
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +2 -3
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.d.ts +2 -3
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +2 -3
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.d.ts +2 -3
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +2 -3
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.d.ts +2 -3
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +2 -3
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.d.ts +2 -3
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +2 -3
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.d.ts +2 -3
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +2 -3
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/web-types.json +11 -11
- package/package.json +7 -7
- package/src/TableCellTemplate.tsx +13 -0
- package/src/TableColumnTemplate.tsx +13 -0
- package/src/TableGroupRowTemplate.tsx +17 -0
- package/src/TableRowTemplate.tsx +92 -0
- package/src/TableTemplate.tsx +129 -0
- package/src/i18n/messagebundle_ca.properties +1 -1
- package/src/i18n/messagebundle_cy.properties +1 -1
- package/src/i18n/messagebundle_en_US_sappsd.properties +5 -296
- package/src/i18n/messagebundle_en_US_saptrc.properties +10 -301
- package/src/i18n/messagebundle_fr.properties +3 -3
- package/src/i18n/messagebundle_fr_CA.properties +3 -3
- package/src/i18n/messagebundle_lv.properties +1 -1
- package/src/themes/GrowingButton.css +12 -12
- package/src/themes/Table.css +14 -21
- package/src/themes/TableRow.css +37 -2
- package/src/themes/base/Table-parameters.css +1 -0
- package/src/themes/base/sizes-parameters.css +0 -1
- package/src/themes/sap_horizon/Table-parameters.css +1 -2
- package/src/themes/sap_horizon/parameters-bundle.css +0 -1
- package/src/themes/sap_horizon_dark/Table-parameters.css +1 -2
- package/src/themes/sap_horizon_dark/parameters-bundle.css +0 -1
- package/src/themes/sap_horizon_hcb/Table-parameters.css +1 -2
- package/src/themes/sap_horizon_hcw/Table-parameters.css +1 -2
- package/tsconfig.json +34 -26
- package/dist/generated/templates/TableCellTemplate.lit.d.ts +0 -4
- package/dist/generated/templates/TableCellTemplate.lit.js +0 -5
- package/dist/generated/templates/TableCellTemplate.lit.js.map +0 -1
- package/dist/generated/templates/TableColumnTemplate.lit.d.ts +0 -4
- package/dist/generated/templates/TableColumnTemplate.lit.js +0 -5
- package/dist/generated/templates/TableColumnTemplate.lit.js.map +0 -1
- package/dist/generated/templates/TableGroupRowTemplate.lit.d.ts +0 -4
- package/dist/generated/templates/TableGroupRowTemplate.lit.js +0 -5
- package/dist/generated/templates/TableGroupRowTemplate.lit.js.map +0 -1
- package/dist/generated/templates/TableRowTemplate.lit.d.ts +0 -4
- package/dist/generated/templates/TableRowTemplate.lit.js +0 -16
- package/dist/generated/templates/TableRowTemplate.lit.js.map +0 -1
- package/dist/generated/templates/TableTemplate.lit.d.ts +0 -4
- package/dist/generated/templates/TableTemplate.lit.js +0 -15
- package/dist/generated/templates/TableTemplate.lit.js.map +0 -1
- package/src/Table.hbs +0 -121
- package/src/TableCell.hbs +0 -7
- package/src/TableColumn.hbs +0 -7
- package/src/TableGroupRow.hbs +0 -11
- package/src/TableRow.hbs +0 -85
- package/src/themes/sap_horizon/TableColumn-parameters.css +0 -5
- package/src/themes/sap_horizon_dark/TableColumn-parameters.css +0 -5
package/dist/Table.js
CHANGED
@@ -8,29 +8,25 @@ var Table_1;
|
|
8
8
|
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
9
9
|
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
10
10
|
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
11
|
-
import event from "@ui5/webcomponents-base/dist/decorators/event.js";
|
11
|
+
import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
|
12
12
|
import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
13
|
-
import
|
13
|
+
import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
|
14
|
+
import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
|
14
15
|
import ResizeHandler from "@ui5/webcomponents-base/dist/delegate/ResizeHandler.js";
|
15
16
|
import ItemNavigation from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js";
|
16
|
-
import Integer from "@ui5/webcomponents-base/dist/types/Integer.js";
|
17
17
|
import NavigationMode from "@ui5/webcomponents-base/dist/types/NavigationMode.js";
|
18
18
|
import { isTabNext, isTabPrevious, isSpace, isEnter, isCtrlA, isUpAlt, isDownAlt, isUpShift, isDownShift, isHomeCtrl, isEndCtrl, isHomeShift, isEndShift, } from "@ui5/webcomponents-base/dist/Keys.js";
|
19
19
|
import getNormalizedTarget from "@ui5/webcomponents-base/dist/util/getNormalizedTarget.js";
|
20
20
|
import getActiveElement from "@ui5/webcomponents-base/dist/util/getActiveElement.js";
|
21
21
|
import { getLastTabbableElement, getTabbableElements } from "@ui5/webcomponents-base/dist/util/TabbableElements.js";
|
22
|
-
import { getEffectiveAriaLabelText } from "@ui5/webcomponents-base/dist/util/
|
23
|
-
import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
22
|
+
import { getEffectiveAriaLabelText } from "@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js";
|
24
23
|
import debounce from "@ui5/webcomponents-base/dist/util/debounce.js";
|
25
|
-
import isElementInView from "@ui5/webcomponents-base/dist/util/isElementInView.js";
|
26
|
-
import BusyIndicator from "@ui5/webcomponents/dist/BusyIndicator.js";
|
27
|
-
import CheckBox from "@ui5/webcomponents/dist/CheckBox.js";
|
28
24
|
import TableGrowingMode from "./types/TableGrowingMode.js";
|
29
25
|
import TableMode from "./types/TableMode.js";
|
30
26
|
// Texts
|
31
27
|
import { LOAD_MORE_TEXT, ARIA_LABEL_SELECT_ALL_CHECKBOX, TABLE_HEADER_ROW_INFORMATION, TABLE_ROW_POSITION, } from "./generated/i18n/i18n-defaults.js";
|
32
28
|
// Template
|
33
|
-
import TableTemplate from "./
|
29
|
+
import TableTemplate from "./TableTemplate.js";
|
34
30
|
// Styles
|
35
31
|
import tableStyles from "./generated/themes/Table.css.js";
|
36
32
|
const GROWING_WITH_SCROLL_DEBOUNCE_RATE = 250; // ms
|
@@ -103,11 +99,91 @@ var TableFocusTargetElement;
|
|
103
99
|
* @public
|
104
100
|
*/
|
105
101
|
let Table = Table_1 = class Table extends UI5Element {
|
106
|
-
static async onDefine() {
|
107
|
-
Table_1.i18nBundle = await getI18nBundle("@ui5/webcomponents");
|
108
|
-
}
|
109
102
|
constructor() {
|
110
103
|
super();
|
104
|
+
/**
|
105
|
+
* Defines if the value of `noDataText` will be diplayed when there is no rows present in the table.
|
106
|
+
* @default false
|
107
|
+
* @public
|
108
|
+
* @since 2.0.0
|
109
|
+
*/
|
110
|
+
this.hideNoData = false;
|
111
|
+
/**
|
112
|
+
* Defines whether the table will have growing capability either by pressing a `More` button,
|
113
|
+
* or via user scroll. In both cases `load-more` event is fired.
|
114
|
+
*
|
115
|
+
* Available options:
|
116
|
+
*
|
117
|
+
* `Button` - Shows a `More` button at the bottom of the table, pressing of which triggers the `load-more` event.
|
118
|
+
*
|
119
|
+
* `Scroll` - The `load-more` event is triggered when the user scrolls to the bottom of the table;
|
120
|
+
*
|
121
|
+
* `None` (default) - The growing is off.
|
122
|
+
*
|
123
|
+
* **Restrictions:** `growing="Scroll"` is not supported for Internet Explorer,
|
124
|
+
* and the component will fallback to `growing="Button"`.
|
125
|
+
* @default "None"
|
126
|
+
* @since 2.0.0
|
127
|
+
* @public
|
128
|
+
*/
|
129
|
+
this.growing = "None";
|
130
|
+
/**
|
131
|
+
* Defines if the table is in busy state.
|
132
|
+
*
|
133
|
+
* In this state the component's opacity is reduced
|
134
|
+
* and busy indicator is displayed at the bottom of the table.
|
135
|
+
* @default false
|
136
|
+
* @since 2.0.0
|
137
|
+
* @public
|
138
|
+
*/
|
139
|
+
this.busy = false;
|
140
|
+
/**
|
141
|
+
* Defines the delay in milliseconds, after which the busy indicator will show up for this component.
|
142
|
+
* @default 1000
|
143
|
+
* @public
|
144
|
+
*/
|
145
|
+
this.busyDelay = 1000;
|
146
|
+
/**
|
147
|
+
* Determines whether the column headers remain fixed at the top of the page during
|
148
|
+
* vertical scrolling as long as the Web Component is in the viewport.
|
149
|
+
*
|
150
|
+
* **Restrictions:**
|
151
|
+
*
|
152
|
+
* - Browsers that do not support this feature:
|
153
|
+
*
|
154
|
+
* - Internet Explorer
|
155
|
+
* - Microsoft Edge lower than version 41 (EdgeHTML 16)
|
156
|
+
* - Mozilla Firefox lower than version 59
|
157
|
+
*
|
158
|
+
* - Scrolling behavior:
|
159
|
+
*
|
160
|
+
* - If the Web Component is placed in layout containers that have the `overflow: hidden`
|
161
|
+
* or `overflow: auto` style definition, this can
|
162
|
+
* prevent the sticky elements of the Web Component from becoming fixed at the top of the viewport.
|
163
|
+
* @default false
|
164
|
+
* @public
|
165
|
+
*/
|
166
|
+
this.stickyColumnHeader = false;
|
167
|
+
/**
|
168
|
+
* Defines the mode of the component.
|
169
|
+
* @default "None"
|
170
|
+
* @since 2.0.0
|
171
|
+
* @public
|
172
|
+
*/
|
173
|
+
this.mode = "None";
|
174
|
+
this._noDataDisplayed = false;
|
175
|
+
/**
|
176
|
+
* Defines the active state of the `More` button.
|
177
|
+
* @private
|
178
|
+
*/
|
179
|
+
this._loadMoreActive = false;
|
180
|
+
/**
|
181
|
+
* Defines whether all rows are selected or not when table is in MultiSelect mode.
|
182
|
+
* @default false
|
183
|
+
* @since 2.0.0
|
184
|
+
* @private
|
185
|
+
*/
|
186
|
+
this._allRowsSelected = false;
|
111
187
|
this.visibleColumns = []; // template loop should always have a defined array
|
112
188
|
// The ItemNavigation requires each item to 1) have a "forcedTabIndex" property and 2) be either a UI5Element, or have an id property (to find it in the component's shadow DOM by)
|
113
189
|
this._columnHeader = {
|
@@ -153,7 +229,7 @@ let Table = Table_1 = class Table extends UI5Element {
|
|
153
229
|
row.mode = this.mode;
|
154
230
|
});
|
155
231
|
this.visibleColumns = this.columns.filter((column, index) => {
|
156
|
-
return !this._hiddenColumns[index];
|
232
|
+
return !this._hiddenColumns?.[index];
|
157
233
|
});
|
158
234
|
this._noDataDisplayed = !this.rows.length && !this.hideNoData;
|
159
235
|
this.visibleColumnsCount = this.visibleColumns.length;
|
@@ -168,7 +244,6 @@ let Table = Table_1 = class Table extends UI5Element {
|
|
168
244
|
if (this.growsOnScroll) {
|
169
245
|
this.observeTableEnd();
|
170
246
|
}
|
171
|
-
this.checkTableInViewport();
|
172
247
|
}
|
173
248
|
onEnterDOM() {
|
174
249
|
this.growingIntersectionObserver = this.getIntersectionObserver();
|
@@ -277,7 +352,7 @@ let Table = Table_1 = class Table extends UI5Element {
|
|
277
352
|
nextItem.focus();
|
278
353
|
}
|
279
354
|
const selectedRows = this.selectedRows;
|
280
|
-
this.
|
355
|
+
this.fireDecoratorEvent("selection-change", {
|
281
356
|
selectedRows,
|
282
357
|
previouslySelectedRows,
|
283
358
|
});
|
@@ -303,7 +378,7 @@ let Table = Table_1 = class Table extends UI5Element {
|
|
303
378
|
rows[rows.length - 1].focus();
|
304
379
|
}
|
305
380
|
const selectedRows = this.selectedRows;
|
306
|
-
this.
|
381
|
+
this.fireDecoratorEvent("selection-change", {
|
307
382
|
selectedRows,
|
308
383
|
previouslySelectedRows,
|
309
384
|
});
|
@@ -485,8 +560,14 @@ let Table = Table_1 = class Table extends UI5Element {
|
|
485
560
|
}
|
486
561
|
this._loadMoreActive = false;
|
487
562
|
}
|
563
|
+
onInvalidation(change) {
|
564
|
+
if (change.type === "property" && change.name === "growing") {
|
565
|
+
this.tableEndObserved = false;
|
566
|
+
this.getIntersectionObserver().disconnect();
|
567
|
+
}
|
568
|
+
}
|
488
569
|
_onLoadMoreClick() {
|
489
|
-
this.
|
570
|
+
this.fireDecoratorEvent("load-more");
|
490
571
|
}
|
491
572
|
observeTableEnd() {
|
492
573
|
if (!this.tableEndObserved) {
|
@@ -504,7 +585,7 @@ let Table = Table_1 = class Table extends UI5Element {
|
|
504
585
|
}
|
505
586
|
}
|
506
587
|
loadMore() {
|
507
|
-
this.
|
588
|
+
this.fireDecoratorEvent("load-more");
|
508
589
|
}
|
509
590
|
_handleSingleSelect(e) {
|
510
591
|
const row = this.getRowParent(e.target);
|
@@ -519,7 +600,7 @@ let Table = Table_1 = class Table extends UI5Element {
|
|
519
600
|
}
|
520
601
|
});
|
521
602
|
row.selected = true;
|
522
|
-
this.
|
603
|
+
this.fireDecoratorEvent("selection-change", {
|
523
604
|
selectedRows: [row],
|
524
605
|
previouslySelectedRows,
|
525
606
|
});
|
@@ -539,7 +620,7 @@ let Table = Table_1 = class Table extends UI5Element {
|
|
539
620
|
else {
|
540
621
|
this._allRowsSelected = false;
|
541
622
|
}
|
542
|
-
this.
|
623
|
+
this.fireDecoratorEvent("selection-change", {
|
543
624
|
selectedRows,
|
544
625
|
previouslySelectedRows,
|
545
626
|
});
|
@@ -561,7 +642,7 @@ let Table = Table_1 = class Table extends UI5Element {
|
|
561
642
|
row.selected = bAllSelected;
|
562
643
|
});
|
563
644
|
const selectedRows = bAllSelected ? this.rows : [];
|
564
|
-
this.
|
645
|
+
this.fireDecoratorEvent("selection-change", {
|
565
646
|
selectedRows,
|
566
647
|
previouslySelectedRows,
|
567
648
|
});
|
@@ -591,12 +672,8 @@ let Table = Table_1 = class Table extends UI5Element {
|
|
591
672
|
return null;
|
592
673
|
}
|
593
674
|
handleResize() {
|
594
|
-
this.checkTableInViewport();
|
595
675
|
this.popinContent();
|
596
676
|
}
|
597
|
-
checkTableInViewport() {
|
598
|
-
this._inViewport = isElementInView(this.getDomRef());
|
599
|
-
}
|
600
677
|
popinContent() {
|
601
678
|
const clientRect = this.getDomRef().getBoundingClientRect();
|
602
679
|
const tableWidth = clientRect.width;
|
@@ -621,12 +698,12 @@ let Table = Table_1 = class Table extends UI5Element {
|
|
621
698
|
}
|
622
699
|
this.columns[visibleColumnsIndexes[visibleColumnsIndexes.length - 1]].last = true;
|
623
700
|
}
|
624
|
-
const hiddenColumnsChange = (this._hiddenColumns
|
701
|
+
const hiddenColumnsChange = (this._hiddenColumns?.length !== hiddenColumns.length) || this._hiddenColumns?.some((column, index) => column !== hiddenColumns[index]);
|
625
702
|
const shownColumnsChange = hiddenColumns.length === 0;
|
626
703
|
// invalidate if hidden columns count has changed or columns are shown
|
627
704
|
if (hiddenColumnsChange || shownColumnsChange) {
|
628
705
|
this._hiddenColumns = hiddenColumns;
|
629
|
-
this.
|
706
|
+
this.fireDecoratorEvent("popin-change", {
|
630
707
|
poppedColumns: this._hiddenColumns,
|
631
708
|
});
|
632
709
|
}
|
@@ -643,7 +720,7 @@ let Table = Table_1 = class Table extends UI5Element {
|
|
643
720
|
text: column.textContent,
|
644
721
|
popinText: column.popinText,
|
645
722
|
popinDisplay: column.popinDisplay,
|
646
|
-
visible: !this._hiddenColumns[index],
|
723
|
+
visible: !this._hiddenColumns?.[index],
|
647
724
|
};
|
648
725
|
}, this);
|
649
726
|
}
|
@@ -657,13 +734,6 @@ let Table = Table_1 = class Table extends UI5Element {
|
|
657
734
|
}
|
658
735
|
return this.growingIntersectionObserver;
|
659
736
|
}
|
660
|
-
get styles() {
|
661
|
-
return {
|
662
|
-
busy: {
|
663
|
-
position: this.busyIndPosition,
|
664
|
-
},
|
665
|
-
};
|
666
|
-
}
|
667
737
|
get growsWithButton() {
|
668
738
|
return this.growing === TableGrowingMode.Button;
|
669
739
|
}
|
@@ -688,7 +758,7 @@ let Table = Table_1 = class Table extends UI5Element {
|
|
688
758
|
return Table_1.i18nBundle.getText(ARIA_LABEL_SELECT_ALL_CHECKBOX);
|
689
759
|
}
|
690
760
|
get loadMoreAriaLabelledBy() {
|
691
|
-
if (this.
|
761
|
+
if (this.growingButtonSubtext) {
|
692
762
|
return `${this._id}-growingButton-text ${this._id}-growingButton-subtext`;
|
693
763
|
}
|
694
764
|
return `${this._id}-growingButton-text`;
|
@@ -696,9 +766,6 @@ let Table = Table_1 = class Table extends UI5Element {
|
|
696
766
|
get tableEndDOM() {
|
697
767
|
return this.shadowRoot.querySelector(".ui5-table-end-marker");
|
698
768
|
}
|
699
|
-
get busyIndPosition() {
|
700
|
-
return this._inViewport ? "absolute" : "sticky";
|
701
|
-
}
|
702
769
|
get isMultiSelect() {
|
703
770
|
return this.mode === TableMode.MultiSelect;
|
704
771
|
}
|
@@ -737,28 +804,28 @@ __decorate([
|
|
737
804
|
property({ type: Boolean })
|
738
805
|
], Table.prototype, "hideNoData", void 0);
|
739
806
|
__decorate([
|
740
|
-
property(
|
807
|
+
property()
|
741
808
|
], Table.prototype, "growing", void 0);
|
742
809
|
__decorate([
|
743
810
|
property({ type: Boolean })
|
744
811
|
], Table.prototype, "busy", void 0);
|
745
812
|
__decorate([
|
746
|
-
property({
|
813
|
+
property({ type: Number })
|
747
814
|
], Table.prototype, "busyDelay", void 0);
|
748
815
|
__decorate([
|
749
816
|
property({ type: Boolean })
|
750
817
|
], Table.prototype, "stickyColumnHeader", void 0);
|
751
818
|
__decorate([
|
752
|
-
property(
|
819
|
+
property()
|
753
820
|
], Table.prototype, "mode", void 0);
|
754
821
|
__decorate([
|
755
|
-
property(
|
822
|
+
property()
|
756
823
|
], Table.prototype, "accessibleName", void 0);
|
757
824
|
__decorate([
|
758
|
-
property(
|
825
|
+
property()
|
759
826
|
], Table.prototype, "accessibleNameRef", void 0);
|
760
827
|
__decorate([
|
761
|
-
property({ type:
|
828
|
+
property({ type: Array })
|
762
829
|
], Table.prototype, "_hiddenColumns", void 0);
|
763
830
|
__decorate([
|
764
831
|
property({ type: Boolean })
|
@@ -769,9 +836,6 @@ __decorate([
|
|
769
836
|
__decorate([
|
770
837
|
property({ type: Object })
|
771
838
|
], Table.prototype, "_columnHeader", void 0);
|
772
|
-
__decorate([
|
773
|
-
property({ type: Boolean })
|
774
|
-
], Table.prototype, "_inViewport", void 0);
|
775
839
|
__decorate([
|
776
840
|
property({ type: Boolean })
|
777
841
|
], Table.prototype, "_allRowsSelected", void 0);
|
@@ -793,14 +857,16 @@ __decorate([
|
|
793
857
|
},
|
794
858
|
})
|
795
859
|
], Table.prototype, "columns", void 0);
|
860
|
+
__decorate([
|
861
|
+
i18n("@ui5/webcomponents")
|
862
|
+
], Table, "i18nBundle", void 0);
|
796
863
|
Table = Table_1 = __decorate([
|
797
864
|
customElement({
|
798
865
|
tag: "ui5-table",
|
799
866
|
fastNavigation: true,
|
800
867
|
styles: tableStyles,
|
801
|
-
renderer:
|
868
|
+
renderer: jsxRenderer,
|
802
869
|
template: TableTemplate,
|
803
|
-
dependencies: [BusyIndicator, CheckBox],
|
804
870
|
})
|
805
871
|
/** Fired when a row in `Active` mode is clicked or `Enter` key is pressed.
|
806
872
|
* @param {HTMLElement} row the activated row.
|
@@ -808,12 +874,7 @@ Table = Table_1 = __decorate([
|
|
808
874
|
*/
|
809
875
|
,
|
810
876
|
event("row-click", {
|
811
|
-
|
812
|
-
/**
|
813
|
-
* @public
|
814
|
-
*/
|
815
|
-
row: { type: HTMLElement },
|
816
|
-
},
|
877
|
+
bubbles: true,
|
817
878
|
})
|
818
879
|
/**
|
819
880
|
* Fired when `ui5-table-column` is shown as a pop-in instead of hiding it.
|
@@ -823,14 +884,7 @@ Table = Table_1 = __decorate([
|
|
823
884
|
*/
|
824
885
|
,
|
825
886
|
event("popin-change", {
|
826
|
-
|
827
|
-
/**
|
828
|
-
* @public
|
829
|
-
*/
|
830
|
-
poppedColumns: {
|
831
|
-
type: Array,
|
832
|
-
},
|
833
|
-
},
|
887
|
+
bubbles: true,
|
834
888
|
})
|
835
889
|
/**
|
836
890
|
* Fired when the user presses the `More` button or scrolls to the table's end.
|
@@ -840,7 +894,9 @@ Table = Table_1 = __decorate([
|
|
840
894
|
* @since 2.0.0
|
841
895
|
*/
|
842
896
|
,
|
843
|
-
event("load-more"
|
897
|
+
event("load-more", {
|
898
|
+
bubbles: true,
|
899
|
+
})
|
844
900
|
/**
|
845
901
|
* Fired when selection is changed by user interaction
|
846
902
|
* in `SingleSelect` and `MultiSelect` modes.
|
@@ -851,16 +907,7 @@ Table = Table_1 = __decorate([
|
|
851
907
|
*/
|
852
908
|
,
|
853
909
|
event("selection-change", {
|
854
|
-
|
855
|
-
/**
|
856
|
-
* @public
|
857
|
-
*/
|
858
|
-
selectedRows: { type: Array },
|
859
|
-
/**
|
860
|
-
* @public
|
861
|
-
*/
|
862
|
-
previouslySelectedRows: { type: Array },
|
863
|
-
},
|
910
|
+
bubbles: true,
|
864
911
|
})
|
865
912
|
], Table);
|
866
913
|
Table.define();
|