@ui5/webcomponents-compat 0.0.0-0dd36ca4b → 0.0.0-10f3c0dc7

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 (244) hide show
  1. package/.env.testing +4 -0
  2. package/CHANGELOG.md +1205 -0
  3. package/LICENSE.txt +201 -0
  4. package/README.md +12 -12
  5. package/cypress.config.js +3 -0
  6. package/dist/.tsbuildinfo +1 -0
  7. package/dist/Assets-fetch.d.ts +3 -0
  8. package/dist/Assets-fetch.js +6 -0
  9. package/dist/Assets-fetch.js.map +1 -0
  10. package/dist/Assets-node.d.ts +14 -0
  11. package/dist/Assets-node.js +17 -0
  12. package/dist/Assets-node.js.map +1 -0
  13. package/dist/Table.d.ts +25 -29
  14. package/dist/Table.js +132 -77
  15. package/dist/Table.js.map +1 -1
  16. package/dist/TableCell.d.ts +3 -2
  17. package/dist/TableCell.js +25 -7
  18. package/dist/TableCell.js.map +1 -1
  19. package/dist/TableCellTemplate.d.ts +2 -0
  20. package/dist/TableCellTemplate.js +5 -0
  21. package/dist/TableCellTemplate.js.map +1 -0
  22. package/dist/TableColumn.d.ts +4 -3
  23. package/dist/TableColumn.js +50 -7
  24. package/dist/TableColumn.js.map +1 -1
  25. package/dist/TableColumnTemplate.d.ts +2 -0
  26. package/dist/TableColumnTemplate.js +5 -0
  27. package/dist/TableColumnTemplate.js.map +1 -0
  28. package/dist/TableGroupRow.d.ts +7 -4
  29. package/dist/TableGroupRow.js +29 -21
  30. package/dist/TableGroupRow.js.map +1 -1
  31. package/dist/TableGroupRowTemplate.d.ts +2 -0
  32. package/dist/TableGroupRowTemplate.js +5 -0
  33. package/dist/TableGroupRowTemplate.js.map +1 -0
  34. package/dist/TableRow.d.ts +17 -10
  35. package/dist/TableRow.js +105 -44
  36. package/dist/TableRow.js.map +1 -1
  37. package/dist/TableRowTemplate.d.ts +2 -0
  38. package/dist/TableRowTemplate.js +15 -0
  39. package/dist/TableRowTemplate.js.map +1 -0
  40. package/dist/TableTemplate.d.ts +2 -0
  41. package/dist/TableTemplate.js +20 -0
  42. package/dist/TableTemplate.js.map +1 -0
  43. package/dist/bundle.esm.d.ts +1 -1
  44. package/dist/bundle.esm.js +14 -7
  45. package/dist/bundle.esm.js.map +1 -1
  46. package/dist/bundle.scoped.config.d.ts +1 -0
  47. package/dist/bundle.scoped.config.js +5 -0
  48. package/dist/bundle.scoped.config.js.map +1 -0
  49. package/dist/bundle.scoped.esm.d.ts +1 -0
  50. package/dist/bundle.scoped.esm.js +1 -4
  51. package/dist/bundle.scoped.esm.js.map +1 -1
  52. package/dist/css/themes/GrowingButton.css +1 -1
  53. package/dist/css/themes/Table.css +1 -1
  54. package/dist/css/themes/TableCell.css +1 -1
  55. package/dist/css/themes/TableColumn.css +1 -1
  56. package/dist/css/themes/TableGroupRow.css +1 -1
  57. package/dist/css/themes/TableRow.css +1 -1
  58. package/dist/css/themes/sap_fiori_3/parameters-bundle.css +24 -1
  59. package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +24 -1
  60. package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +24 -1
  61. package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +24 -1
  62. package/dist/css/themes/sap_horizon/parameters-bundle.css +25 -1
  63. package/dist/css/themes/sap_horizon_auto/parameters-bundle.css +26 -0
  64. package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +25 -1
  65. package/dist/css/themes/sap_horizon_hc_auto/parameters-bundle.css +25 -0
  66. package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +24 -1
  67. package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +24 -1
  68. package/dist/custom-elements-internal.json +417 -400
  69. package/dist/custom-elements.json +234 -211
  70. package/dist/generated/assets/i18n/messagebundle_ca.json +1 -1
  71. package/dist/generated/assets/i18n/messagebundle_cs.json +1 -1
  72. package/dist/generated/assets/i18n/messagebundle_cy.json +1 -1
  73. package/dist/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -1
  74. package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -1
  75. package/dist/generated/assets/i18n/messagebundle_fi.json +1 -1
  76. package/dist/generated/assets/i18n/messagebundle_fr.json +1 -1
  77. package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -1
  78. package/dist/generated/assets/i18n/messagebundle_hr.json +1 -1
  79. package/dist/generated/assets/i18n/messagebundle_id.json +1 -0
  80. package/dist/generated/assets/i18n/messagebundle_it.json +1 -1
  81. package/dist/generated/assets/i18n/messagebundle_lv.json +1 -1
  82. package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
  83. package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
  84. package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
  85. package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
  86. package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
  87. package/dist/generated/assets/themes/sap_horizon_auto/parameters-bundle.css.json +1 -0
  88. package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
  89. package/dist/generated/assets/themes/sap_horizon_hc_auto/parameters-bundle.css.json +1 -0
  90. package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
  91. package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
  92. package/dist/generated/i18n/i18n-defaults.d.ts +1 -1
  93. package/dist/generated/i18n/i18n-defaults.js +2 -3
  94. package/dist/generated/i18n/i18n-defaults.js.map +1 -1
  95. package/dist/generated/json-imports/Themes-fetch.d.ts +1 -0
  96. package/dist/generated/json-imports/Themes-fetch.js +27 -0
  97. package/dist/generated/json-imports/Themes-fetch.js.map +1 -0
  98. package/dist/generated/json-imports/Themes-node.d.ts +1 -0
  99. package/dist/generated/json-imports/Themes-node.js +27 -0
  100. package/dist/generated/json-imports/Themes-node.js.map +1 -0
  101. package/dist/generated/json-imports/Themes.js +4 -2
  102. package/dist/generated/json-imports/Themes.js.map +1 -1
  103. package/dist/generated/json-imports/i18n-fetch.d.ts +1 -0
  104. package/dist/generated/json-imports/i18n-fetch.js +120 -0
  105. package/dist/generated/json-imports/i18n-fetch.js.map +1 -0
  106. package/dist/generated/json-imports/i18n-node.d.ts +1 -0
  107. package/dist/generated/json-imports/i18n-node.js +120 -0
  108. package/dist/generated/json-imports/i18n-node.js.map +1 -0
  109. package/dist/generated/json-imports/i18n.js +3 -3
  110. package/dist/generated/json-imports/i18n.js.map +1 -1
  111. package/dist/generated/themes/GrowingButton.css.d.ts +2 -3
  112. package/dist/generated/themes/GrowingButton.css.js +4 -5
  113. package/dist/generated/themes/GrowingButton.css.js.map +1 -1
  114. package/dist/generated/themes/Table.css.d.ts +2 -3
  115. package/dist/generated/themes/Table.css.js +4 -5
  116. package/dist/generated/themes/Table.css.js.map +1 -1
  117. package/dist/generated/themes/TableCell.css.d.ts +2 -3
  118. package/dist/generated/themes/TableCell.css.js +4 -5
  119. package/dist/generated/themes/TableCell.css.js.map +1 -1
  120. package/dist/generated/themes/TableColumn.css.d.ts +2 -3
  121. package/dist/generated/themes/TableColumn.css.js +4 -5
  122. package/dist/generated/themes/TableColumn.css.js.map +1 -1
  123. package/dist/generated/themes/TableGroupRow.css.d.ts +2 -3
  124. package/dist/generated/themes/TableGroupRow.css.js +4 -5
  125. package/dist/generated/themes/TableGroupRow.css.js.map +1 -1
  126. package/dist/generated/themes/TableRow.css.d.ts +2 -3
  127. package/dist/generated/themes/TableRow.css.js +4 -5
  128. package/dist/generated/themes/TableRow.css.js.map +1 -1
  129. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.d.ts +2 -3
  130. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +25 -3
  131. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
  132. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.d.ts +2 -3
  133. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +25 -3
  134. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
  135. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.d.ts +2 -3
  136. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +25 -3
  137. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
  138. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.d.ts +2 -3
  139. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +25 -3
  140. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
  141. package/dist/generated/themes/sap_horizon/parameters-bundle.css.d.ts +2 -3
  142. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +26 -3
  143. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
  144. package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.d.ts +2 -0
  145. package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js +27 -0
  146. package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js.map +1 -0
  147. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.d.ts +2 -3
  148. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +26 -3
  149. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
  150. package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.d.ts +2 -0
  151. package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.js +26 -0
  152. package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.js.map +1 -0
  153. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.d.ts +2 -3
  154. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +25 -3
  155. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
  156. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.d.ts +2 -3
  157. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +25 -3
  158. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
  159. package/dist/utils/CompatCustomElementsScope.d.ts +5 -0
  160. package/dist/utils/CompatCustomElementsScope.js +38 -0
  161. package/dist/utils/CompatCustomElementsScope.js.map +1 -0
  162. package/dist/vscode.html-custom-data.json +35 -35
  163. package/dist/web-types.json +107 -107
  164. package/package-scripts.cjs +5 -0
  165. package/package.json +25 -18
  166. package/src/TableCellTemplate.tsx +15 -0
  167. package/src/TableColumnTemplate.tsx +13 -0
  168. package/src/TableGroupRowTemplate.tsx +17 -0
  169. package/src/TableRowTemplate.tsx +92 -0
  170. package/src/TableTemplate.tsx +129 -0
  171. package/src/i18n/messagebundle_ca.properties +1 -1
  172. package/src/i18n/messagebundle_cs.properties +1 -1
  173. package/src/i18n/messagebundle_cy.properties +1 -1
  174. package/src/i18n/messagebundle_en_US_sappsd.properties +5 -296
  175. package/src/i18n/messagebundle_en_US_saptrc.properties +10 -301
  176. package/src/i18n/messagebundle_fi.properties +2 -2
  177. package/src/i18n/messagebundle_fr.properties +3 -3
  178. package/src/i18n/messagebundle_fr_CA.properties +3 -3
  179. package/src/i18n/messagebundle_hr.properties +1 -1
  180. package/src/i18n/messagebundle_it.properties +1 -1
  181. package/src/i18n/messagebundle_lv.properties +1 -1
  182. package/src/themes/GrowingButton.css +13 -13
  183. package/src/themes/Table.css +30 -33
  184. package/src/themes/TableCell.css +9 -2
  185. package/src/themes/TableColumn.css +0 -1
  186. package/src/themes/TableGroupRow.css +2 -2
  187. package/src/themes/TableRow.css +41 -5
  188. package/src/themes/base/GrowingButton-parameters.css +1 -1
  189. package/src/themes/base/Table-parameters.css +2 -1
  190. package/src/themes/base/TableColumn-parameters.css +1 -1
  191. package/src/themes/base/TableGroupRow-parameters.css +1 -1
  192. package/src/themes/base/TableRow-parameters.css +1 -1
  193. package/src/themes/base/sizes-parameters.css +12 -13
  194. package/src/themes/sap_fiori_3_hcb/GrowingButton-parameters.css +1 -1
  195. package/src/themes/sap_fiori_3_hcb/Table-parameters.css +1 -1
  196. package/src/themes/sap_fiori_3_hcb/TableRow-parameters.css +1 -1
  197. package/src/themes/sap_fiori_3_hcw/GrowingButton-parameters.css +1 -1
  198. package/src/themes/sap_fiori_3_hcw/Table-parameters.css +1 -1
  199. package/src/themes/sap_fiori_3_hcw/TableRow-parameters.css +1 -1
  200. package/src/themes/sap_horizon/GrowingButton-parameters.css +1 -1
  201. package/src/themes/sap_horizon/Table-parameters.css +2 -4
  202. package/src/themes/sap_horizon/TableGroupRow-parameters.css +1 -1
  203. package/src/themes/sap_horizon/TableRow-parameters.css +1 -1
  204. package/src/themes/sap_horizon/parameters-bundle.css +0 -1
  205. package/src/themes/sap_horizon_auto/parameters-bundle.css +3 -0
  206. package/src/themes/sap_horizon_dark/GrowingButton-parameters.css +1 -1
  207. package/src/themes/sap_horizon_dark/Table-parameters.css +2 -4
  208. package/src/themes/sap_horizon_dark/TableGroupRow-parameters.css +1 -1
  209. package/src/themes/sap_horizon_dark/TableRow-parameters.css +1 -1
  210. package/src/themes/sap_horizon_dark/parameters-bundle.css +0 -1
  211. package/src/themes/sap_horizon_hc_auto/parameters-bundle.css +3 -0
  212. package/src/themes/sap_horizon_hcb/GrowingButton-parameters.css +1 -1
  213. package/src/themes/sap_horizon_hcb/Table-parameters.css +2 -4
  214. package/src/themes/sap_horizon_hcb/TableGroupRow-parameters.css +1 -1
  215. package/src/themes/sap_horizon_hcb/TableRow-parameters.css +1 -1
  216. package/src/themes/sap_horizon_hcw/GrowingButton-parameters.css +1 -1
  217. package/src/themes/sap_horizon_hcw/Table-parameters.css +2 -4
  218. package/src/themes/sap_horizon_hcw/TableGroupRow-parameters.css +1 -1
  219. package/src/themes/sap_horizon_hcw/TableRow-parameters.css +1 -1
  220. package/tsconfig.json +61 -26
  221. package/dist/generated/assets/i18n/messagebundle_in.json +0 -1
  222. package/dist/generated/templates/TableCellTemplate.lit.d.ts +0 -4
  223. package/dist/generated/templates/TableCellTemplate.lit.js +0 -5
  224. package/dist/generated/templates/TableCellTemplate.lit.js.map +0 -1
  225. package/dist/generated/templates/TableColumnTemplate.lit.d.ts +0 -4
  226. package/dist/generated/templates/TableColumnTemplate.lit.js +0 -5
  227. package/dist/generated/templates/TableColumnTemplate.lit.js.map +0 -1
  228. package/dist/generated/templates/TableGroupRowTemplate.lit.d.ts +0 -4
  229. package/dist/generated/templates/TableGroupRowTemplate.lit.js +0 -5
  230. package/dist/generated/templates/TableGroupRowTemplate.lit.js.map +0 -1
  231. package/dist/generated/templates/TableRowTemplate.lit.d.ts +0 -4
  232. package/dist/generated/templates/TableRowTemplate.lit.js +0 -16
  233. package/dist/generated/templates/TableRowTemplate.lit.js.map +0 -1
  234. package/dist/generated/templates/TableTemplate.lit.d.ts +0 -4
  235. package/dist/generated/templates/TableTemplate.lit.js +0 -15
  236. package/dist/generated/templates/TableTemplate.lit.js.map +0 -1
  237. package/src/Table.hbs +0 -121
  238. package/src/TableCell.hbs +0 -7
  239. package/src/TableColumn.hbs +0 -7
  240. package/src/TableGroupRow.hbs +0 -11
  241. package/src/TableRow.hbs +0 -85
  242. package/src/i18n/messagebundle_in.properties +0 -172
  243. package/src/themes/sap_horizon/TableColumn-parameters.css +0 -5
  244. package/src/themes/sap_horizon_dark/TableColumn-parameters.css +0 -5
@@ -17,18 +17,22 @@ import TableMode from "./types/TableMode.js";
17
17
  *
18
18
  * **Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.
19
19
  * @csspart group-row - Used to style the native `tr` element
20
+ * @deprecated Deprecated as of version 2.12.0, use `@ui5/webcomponents/dist/Table.js` instead.
20
21
  */
21
22
  declare class TableGroupRow extends UI5Element implements ITableRow {
23
+ eventDetails: {
24
+ _focused: FocusEvent;
25
+ };
22
26
  /**
23
27
  * Defines the mode of the row
24
28
  * @default "None"
25
29
  * @private
26
30
  */
27
31
  mode: `${TableMode}`;
28
- _columnsInfo: Array<TableColumnInfo>;
29
- forcedTabIndex: string;
32
+ _columnsInfo?: Array<TableColumnInfo>;
33
+ forcedTabIndex?: string;
30
34
  forcedBusy: boolean;
31
- forcedAriaPosition: string;
35
+ forcedAriaPosition?: string;
32
36
  selected: boolean;
33
37
  tabbableElements: Array<HTMLElement>;
34
38
  _columnsInfoString: string;
@@ -39,6 +43,5 @@ declare class TableGroupRow extends UI5Element implements ITableRow {
39
43
  visibleColCount(): number;
40
44
  onBeforeRendering(): void;
41
45
  _onfocusin(e: FocusEvent): void;
42
- static onDefine(): Promise<void>;
43
46
  }
44
47
  export default TableGroupRow;
@@ -8,16 +8,16 @@ var TableGroupRow_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";
12
- import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
13
- import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
14
- import CheckBox from "@ui5/webcomponents/dist/CheckBox.js";
15
- import TableGroupRowTemplate from "./generated/templates/TableGroupRowTemplate.lit.js";
11
+ import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
12
+ import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
13
+ import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
14
+ import TableGroupRowTemplate from "./TableGroupRowTemplate.js";
16
15
  import TableMode from "./types/TableMode.js";
17
16
  // Texts
18
17
  import { TABLE_GROUP_ROW_ARIA_LABEL, } from "./generated/i18n/i18n-defaults.js";
19
18
  // Styles
20
19
  import tableGroupRowStyles from "./generated/themes/TableGroupRow.css.js";
20
+ import { patchScopingSuffix } from "./utils/CompatCustomElementsScope.js";
21
21
  /**
22
22
  * @class
23
23
  *
@@ -33,10 +33,18 @@ import tableGroupRowStyles from "./generated/themes/TableGroupRow.css.js";
33
33
  *
34
34
  * **Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.
35
35
  * @csspart group-row - Used to style the native `tr` element
36
+ * @deprecated Deprecated as of version 2.12.0, use `@ui5/webcomponents/dist/Table.js` instead.
36
37
  */
37
38
  let TableGroupRow = TableGroupRow_1 = class TableGroupRow extends UI5Element {
38
39
  constructor() {
39
40
  super(...arguments);
41
+ /**
42
+ * Defines the mode of the row
43
+ * @default "None"
44
+ * @private
45
+ */
46
+ this.mode = "None";
47
+ this.forcedBusy = false;
40
48
  // Properties, set and handled by the Table
41
49
  this.selected = false;
42
50
  this.tabbableElements = [];
@@ -46,12 +54,12 @@ let TableGroupRow = TableGroupRow_1 = class TableGroupRow extends UI5Element {
46
54
  return this._colSpan;
47
55
  }
48
56
  get ariaLabelText() {
49
- return `${TableGroupRow_1.i18nBundle.getText(TABLE_GROUP_ROW_ARIA_LABEL)} ${this.innerText}. ${this.forcedAriaPosition}`;
57
+ return `${TableGroupRow_1.i18nBundle.getText(TABLE_GROUP_ROW_ARIA_LABEL)} ${this.textContent}. ${this.forcedAriaPosition}`;
50
58
  }
51
59
  visibleColCount() {
52
- let count = this._columnsInfo.reduce((acc, column) => {
60
+ let count = this._columnsInfo?.reduce((acc, column) => {
53
61
  return column.visible ? ++acc : acc;
54
- }, 0);
62
+ }, 0) || 0;
55
63
  if (this.mode === TableMode.MultiSelect) {
56
64
  count++;
57
65
  }
@@ -64,39 +72,39 @@ let TableGroupRow = TableGroupRow_1 = class TableGroupRow extends UI5Element {
64
72
  this._colSpan = this.visibleColCount();
65
73
  }
66
74
  _onfocusin(e) {
67
- this.fireEvent("_focused", e);
68
- }
69
- static async onDefine() {
70
- TableGroupRow_1.i18nBundle = await getI18nBundle("@ui5/webcomponents");
75
+ this.fireDecoratorEvent("_focused", e);
71
76
  }
72
77
  };
73
78
  __decorate([
74
- property({ type: TableMode, defaultValue: TableMode.None })
79
+ property()
75
80
  ], TableGroupRow.prototype, "mode", void 0);
76
81
  __decorate([
77
- property({ type: Object, multiple: true })
82
+ property({ type: Array, noAttribute: true })
78
83
  ], TableGroupRow.prototype, "_columnsInfo", void 0);
79
84
  __decorate([
80
- property({ defaultValue: "-1" })
85
+ property()
81
86
  ], TableGroupRow.prototype, "forcedTabIndex", void 0);
82
87
  __decorate([
83
88
  property({ type: Boolean })
84
89
  ], TableGroupRow.prototype, "forcedBusy", void 0);
85
90
  __decorate([
86
- property({ defaultValue: "", noAttribute: true })
91
+ property()
87
92
  ], TableGroupRow.prototype, "forcedAriaPosition", void 0);
93
+ __decorate([
94
+ i18n("@ui5/webcomponents")
95
+ ], TableGroupRow, "i18nBundle", void 0);
88
96
  TableGroupRow = TableGroupRow_1 = __decorate([
89
97
  customElement({
90
98
  tag: "ui5-table-group-row",
91
99
  styles: tableGroupRowStyles,
92
- renderer: litRender,
100
+ renderer: jsxRenderer,
93
101
  template: TableGroupRowTemplate,
94
- dependencies: [
95
- CheckBox,
96
- ],
97
102
  }),
98
- event("_focused")
103
+ event("_focused", {
104
+ bubbles: true,
105
+ })
99
106
  ], TableGroupRow);
107
+ patchScopingSuffix(TableGroupRow);
100
108
  TableGroupRow.define();
101
109
  export default TableGroupRow;
102
110
  //# sourceMappingURL=TableGroupRow.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TableGroupRow.js","sourceRoot":"","sources":["../src/TableGroupRow.ts"],"names":[],"mappings":"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","sourcesContent":["import UI5Element 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 event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport CheckBox from \"@ui5/webcomponents/dist/CheckBox.js\";\nimport type { ITableRow, TableColumnInfo } from \"./Table.js\";\nimport TableGroupRowTemplate from \"./generated/templates/TableGroupRowTemplate.lit.js\";\nimport TableMode from \"./types/TableMode.js\";\n\n// Texts\nimport {\n\tTABLE_GROUP_ROW_ARIA_LABEL,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport tableGroupRowStyles from \"./generated/themes/TableGroupRow.css.js\";\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-table-group-row` component represents a group row in the `ui5-table`.\n * @constructor\n * @since 2.0.0\n * @implements {ITableRow}\n * @extends UI5Element\n * @public\n * @slot {Node[]} default - Defines the text of the component.\n *\n * **Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.\n * @csspart group-row - Used to style the native `tr` element\n */\n@customElement({\n\ttag: \"ui5-table-group-row\",\n\tstyles: tableGroupRowStyles,\n\trenderer: litRender,\n\ttemplate: TableGroupRowTemplate,\n\tdependencies: [\n\t\tCheckBox,\n\t],\n})\n@event(\"_focused\")\nclass TableGroupRow extends UI5Element implements ITableRow {\n\t/**\n\t * Defines the mode of the row\n\t * @default \"None\"\n\t * @private\n\t */\n\t@property({ type: TableMode, defaultValue: TableMode.None })\n\tmode!: `${TableMode}`;\n\n\t@property({ type: Object, multiple: true })\n\t_columnsInfo!: Array<TableColumnInfo>;\n\n\t@property({ defaultValue: \"-1\" })\n\tforcedTabIndex!: string;\n\n\t@property({ type: Boolean })\n\tforcedBusy!: boolean;\n\n\t@property({ defaultValue: \"\", noAttribute: true })\n\tforcedAriaPosition!: string;\n\n\t// Properties, set and handled by the Table\n\tselected = false;\n\ttabbableElements: Array<HTMLElement> = [];\n\t_columnsInfoString = \"\";\n\n\tstatic i18nBundle: I18nBundle;\n\n\t_colSpan?: number;\n\n\tget colSpan() {\n\t\treturn this._colSpan;\n\t}\n\n\tget ariaLabelText() {\n\t\treturn `${TableGroupRow.i18nBundle.getText(TABLE_GROUP_ROW_ARIA_LABEL)} ${this.innerText}. ${this.forcedAriaPosition}`;\n\t}\n\n\tvisibleColCount(): number {\n\t\tlet count = this._columnsInfo.reduce((acc, column) => {\n\t\t\treturn column.visible ? ++acc : acc;\n\t\t}, 0);\n\n\t\tif (this.mode === TableMode.MultiSelect) {\n\t\t\tcount++;\n\t\t}\n\n\t\treturn count;\n\t}\n\n\tonBeforeRendering() {\n\t\tif (!this._columnsInfo || this._columnsInfo.length === 0) {\n\t\t\treturn;\n\t\t}\n\t\tthis._colSpan = this.visibleColCount();\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tthis.fireEvent(\"_focused\", e);\n\t}\n\n\tstatic async onDefine() {\n\t\tTableGroupRow.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n}\n\nTableGroupRow.define();\n\nexport default TableGroupRow;\n"]}
1
+ {"version":3,"file":"TableGroupRow.js","sourceRoot":"","sources":["../src/TableGroupRow.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAG/E,OAAO,qBAAqB,MAAM,4BAA4B,CAAC;AAC/D,OAAO,SAAS,MAAM,sBAAsB,CAAC;AAE7C,QAAQ;AACR,OAAO,EACN,0BAA0B,GAC1B,MAAM,mCAAmC,CAAC;AAE3C,SAAS;AACT,OAAO,mBAAmB,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E;;;;;;;;;;;;;;;;GAgBG;AAUH,IAAM,aAAa,qBAAnB,MAAM,aAAc,SAAQ,UAAU;IAAtC;;QAIC;;;;WAIG;QAEH,SAAI,GAAmB,MAAM,CAAC;QAS9B,eAAU,GAAG,KAAK,CAAC;QAKnB,2CAA2C;QAC3C,aAAQ,GAAG,KAAK,CAAC;QACjB,qBAAgB,GAAuB,EAAE,CAAC;QAC1C,uBAAkB,GAAG,EAAE,CAAC;IAqCzB,CAAC;IA9BA,IAAI,OAAO;QACV,OAAO,IAAI,CAAC,QAAQ,CAAC;IACtB,CAAC;IAED,IAAI,aAAa;QAChB,OAAO,GAAG,eAAa,CAAC,UAAU,CAAC,OAAO,CAAC,0BAA0B,CAAC,IAAI,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC1H,CAAC;IAED,eAAe;QACd,IAAI,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE;YACrD,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;QACrC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;QAEX,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,WAAW,EAAE,CAAC;YACzC,KAAK,EAAE,CAAC;QACT,CAAC;QAED,OAAO,KAAK,CAAC;IACd,CAAC;IAED,iBAAiB;QAChB,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1D,OAAO;QACR,CAAC;QACD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;IACxC,CAAC;IAED,UAAU,CAAC,CAAa;QACvB,IAAI,CAAC,kBAAkB,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;IACxC,CAAC;CACD,CAAA;AAtDA;IADC,QAAQ,EAAE;2CACmB;AAG9B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;mDACP;AAGtC;IADC,QAAQ,EAAE;qDACa;AAGxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;iDACT;AAGnB;IADC,QAAQ,EAAE;yDACiB;AAQrB;IADN,IAAI,CAAC,oBAAoB,CAAC;uCACG;AA9BzB,aAAa;IATlB,aAAa,CAAC;QACd,GAAG,EAAE,qBAAqB;QAC1B,MAAM,EAAE,mBAAmB;QAC3B,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,qBAAqB;KAC/B,CAAC;IACD,KAAK,CAAC,UAAU,EAAE;QAClB,OAAO,EAAE,IAAI;KACb,CAAC;GACI,aAAa,CAgElB;AAED,kBAAkB,CAAC,aAAa,CAAC,CAAC;AAElC,aAAa,CAAC,MAAM,EAAE,CAAC;AAEvB,eAAe,aAAa,CAAC","sourcesContent":["import UI5Element 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 event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { ITableRow, TableColumnInfo } from \"./Table.js\";\nimport TableGroupRowTemplate from \"./TableGroupRowTemplate.js\";\nimport TableMode from \"./types/TableMode.js\";\n\n// Texts\nimport {\n\tTABLE_GROUP_ROW_ARIA_LABEL,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport tableGroupRowStyles from \"./generated/themes/TableGroupRow.css.js\";\nimport { patchScopingSuffix } from \"./utils/CompatCustomElementsScope.js\";\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-table-group-row` component represents a group row in the `ui5-table`.\n * @constructor\n * @since 2.0.0\n * @implements {ITableRow}\n * @extends UI5Element\n * @public\n * @slot {Node[]} default - Defines the text of the component.\n *\n * **Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.\n * @csspart group-row - Used to style the native `tr` element\n * @deprecated Deprecated as of version 2.12.0, use `@ui5/webcomponents/dist/Table.js` instead.\n */\n@customElement({\n\ttag: \"ui5-table-group-row\",\n\tstyles: tableGroupRowStyles,\n\trenderer: jsxRenderer,\n\ttemplate: TableGroupRowTemplate,\n})\n@event(\"_focused\", {\n\tbubbles: true,\n})\nclass TableGroupRow extends UI5Element implements ITableRow {\n\teventDetails!: {\n\t\t_focused: FocusEvent,\n\t}\n\t/**\n\t * Defines the mode of the row\n\t * @default \"None\"\n\t * @private\n\t */\n\t@property()\n\tmode: `${TableMode}` = \"None\";\n\n\t@property({ type: Array, noAttribute: true })\n\t_columnsInfo?: Array<TableColumnInfo>;\n\n\t@property()\n\tforcedTabIndex?: string;\n\n\t@property({ type: Boolean })\n\tforcedBusy = false;\n\n\t@property()\n\tforcedAriaPosition?: string;\n\n\t// Properties, set and handled by the Table\n\tselected = false;\n\ttabbableElements: Array<HTMLElement> = [];\n\t_columnsInfoString = \"\";\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\t_colSpan?: number;\n\n\tget colSpan() {\n\t\treturn this._colSpan;\n\t}\n\n\tget ariaLabelText() {\n\t\treturn `${TableGroupRow.i18nBundle.getText(TABLE_GROUP_ROW_ARIA_LABEL)} ${this.textContent}. ${this.forcedAriaPosition}`;\n\t}\n\n\tvisibleColCount(): number {\n\t\tlet count = this._columnsInfo?.reduce((acc, column) => {\n\t\t\treturn column.visible ? ++acc : acc;\n\t\t}, 0) || 0;\n\n\t\tif (this.mode === TableMode.MultiSelect) {\n\t\t\tcount++;\n\t\t}\n\n\t\treturn count;\n\t}\n\n\tonBeforeRendering() {\n\t\tif (!this._columnsInfo || this._columnsInfo.length === 0) {\n\t\t\treturn;\n\t\t}\n\t\tthis._colSpan = this.visibleColCount();\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tthis.fireDecoratorEvent(\"_focused\", e);\n\t}\n}\n\npatchScopingSuffix(TableGroupRow);\n\nTableGroupRow.define();\n\nexport default TableGroupRow;\n"]}
@@ -0,0 +1,2 @@
1
+ import type TableGroupRow from "./TableGroupRow.js";
2
+ export default function TableGroupRowTemplate(this: TableGroupRow): import("@ui5/webcomponents-base/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "@ui5/webcomponents-base/jsx-runtime";
2
+ export default function TableGroupRowTemplate() {
3
+ return (_jsx("tr", { part: "group-row", class: "ui5-table-group-row-root", "aria-label": this.ariaLabelText, tabindex: this.forcedTabIndex ? parseInt(this.forcedTabIndex) : undefined, onFocusIn: this._onfocusin, children: _jsx("td", { colspan: this.colSpan, children: _jsx("slot", {}) }) }));
4
+ }
5
+ //# sourceMappingURL=TableGroupRowTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableGroupRowTemplate.js","sourceRoot":"","sources":["../src/TableGroupRowTemplate.tsx"],"names":[],"mappings":";AAEA,MAAM,CAAC,OAAO,UAAU,qBAAqB;IAC5C,OAAO,CACN,aACC,IAAI,EAAC,WAAW,EAChB,KAAK,EAAC,0BAA0B,gBACpB,IAAI,CAAC,aAAa,EAC9B,QAAQ,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,EACzE,SAAS,EAAE,IAAI,CAAC,UAAU,YAE1B,aAAI,OAAO,EAAE,IAAI,CAAC,OAAO,YACxB,gBAAa,GACT,GACD,CACL,CAAC;AACH,CAAC","sourcesContent":["import type TableGroupRow from \"./TableGroupRow.js\";\n\nexport default function TableGroupRowTemplate(this: TableGroupRow) {\n\treturn (\n\t\t<tr\n\t\t\tpart=\"group-row\"\n\t\t\tclass=\"ui5-table-group-row-root\"\n\t\t\taria-label={this.ariaLabelText}\n\t\t\ttabindex={this.forcedTabIndex ? parseInt(this.forcedTabIndex) : undefined}\n\t\t\tonFocusIn={this._onfocusin}\n\t\t>\n\t\t\t<td colspan={this.colSpan}>\n\t\t\t\t<slot></slot>\n\t\t\t</td>\n\t\t</tr>\n\t);\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
2
+ import type { DefaultSlot } from "@ui5/webcomponents-base/dist/UI5Element.js";
2
3
  import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
3
- import type { PassiveEventListenerObject } from "@ui5/webcomponents-base/dist/types.js";
4
4
  import type TableCell from "./TableCell.js";
5
5
  import type { ITableRow, TableColumnInfo } from "./Table.js";
6
6
  import TableMode from "./types/TableMode.js";
@@ -32,8 +32,17 @@ type TableRowF7PressEventDetail = {
32
32
  * @public
33
33
  * @csspart row - Used to style the native `tr` element
34
34
  * @csspart popin-row - Used to style the `tr` element when a row pops in
35
+ * @deprecated Deprecated as of version 2.12.0, use `@ui5/webcomponents/dist/TableRow.js` instead.
35
36
  */
36
37
  declare class TableRow extends UI5Element implements ITableRow {
38
+ eventDetails: {
39
+ "row-click": TableRowClickEventDetail;
40
+ "_focused": FocusEvent;
41
+ "forward-before": TableRowForwardBeforeEventDetail;
42
+ "forward-after": TableRowForwardAfterEventDetail;
43
+ "selection-requested": TableRowSelectionRequestedEventDetail;
44
+ "f7-pressed": TableRowF7PressEventDetail;
45
+ };
37
46
  /**
38
47
  * Defines the visual indication and behavior of the component.
39
48
  *
@@ -72,24 +81,23 @@ declare class TableRow extends UI5Element implements ITableRow {
72
81
  * @private
73
82
  */
74
83
  active: boolean;
75
- _columnsInfo: Array<TableColumnInfo>;
76
- forcedTabIndex: string;
84
+ _columnsInfo?: Array<TableColumnInfo>;
85
+ forcedTabIndex?: string;
77
86
  forcedBusy: boolean;
78
- forcedAriaPosition: string;
87
+ forcedAriaPosition?: string;
79
88
  /**
80
89
  * Defines the cells of the component.
81
90
  *
82
91
  * **Note:** Use `ui5-table-cell` for the intended design.
83
92
  * @public
84
93
  */
85
- cells: Array<TableCell>;
94
+ cells: DefaultSlot<TableCell>;
86
95
  static i18nBundle: I18nBundle;
87
96
  visibleCells: Array<TableCell>;
88
97
  popinCells: Array<TableColumnInfo>;
89
- _ontouchstart: PassiveEventListenerObject;
90
98
  tabbableElements: Array<HTMLElement>;
91
99
  _columnsInfoString: string;
92
- constructor();
100
+ _ontouchstart(): void;
93
101
  _onmouseup(): void;
94
102
  _onkeydown(e: KeyboardEvent): void;
95
103
  _onkeyup(e: KeyboardEvent): void;
@@ -102,8 +110,8 @@ declare class TableRow extends UI5Element implements ITableRow {
102
110
  get _ariaCurrent(): true | undefined;
103
111
  activate(): void;
104
112
  deactivate(): void;
105
- get shouldPopin(): number;
106
- get allColumnsPoppedIn(): boolean;
113
+ get shouldPopin(): boolean;
114
+ get allColumnsPoppedIn(): boolean | undefined;
107
115
  onBeforeRendering(): void;
108
116
  get visibleCellsCount(): number;
109
117
  get ariaLabelText(): string;
@@ -114,7 +122,6 @@ declare class TableRow extends UI5Element implements ITableRow {
114
122
  getCellText(cell: TableCell): string;
115
123
  getColumnTextByIdx(index: number): string;
116
124
  getNormilzedTextContent(textContent: string): string;
117
- static onDefine(): Promise<void>;
118
125
  }
119
126
  export default TableRow;
120
127
  export type { TableRowClickEventDetail, TableRowSelectionRequestedEventDetail, TableRowForwardBeforeEventDetail, TableRowForwardAfterEventDetail, TableRowF7PressEventDetail, };
package/dist/TableRow.js CHANGED
@@ -8,22 +8,21 @@ var TableRow_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";
12
- import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
13
- import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
14
- import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
11
+ import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
12
+ import slot from "@ui5/webcomponents-base/dist/decorators/slot-strict.js";
13
+ import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
14
+ import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
15
15
  import { isSpace, isEnter, isF7, isTabNext, isTabPrevious, } from "@ui5/webcomponents-base/dist/Keys.js";
16
16
  import getActiveElement from "@ui5/webcomponents-base/dist/util/getActiveElement.js";
17
17
  import { getLastTabbableElement } from "@ui5/webcomponents-base/dist/util/TabbableElements.js";
18
- import { getEventMark } from "@ui5/webcomponents-base/dist/MarkedEvents.js";
19
- import CheckBox from "@ui5/webcomponents/dist/CheckBox.js";
20
18
  import TableMode from "./types/TableMode.js";
21
19
  import TableRowType from "./types/TableRowType.js";
22
20
  import TableColumnPopinDisplay from "./types/TableColumnPopinDisplay.js";
23
- import TableRowTemplate from "./generated/templates/TableRowTemplate.lit.js";
21
+ import TableRowTemplate from "./TableRowTemplate.js";
24
22
  import { ARIA_LABEL_ROW_SELECTION, LIST_ITEM_NOT_SELECTED, LIST_ITEM_SELECTED, } from "./generated/i18n/i18n-defaults.js";
25
23
  // Styles
26
24
  import tableRowStyles from "./generated/themes/TableRow.css.js";
25
+ import { patchScopingSuffix } from "./utils/CompatCustomElementsScope.js";
27
26
  /**
28
27
  * @class
29
28
  *
@@ -36,22 +35,58 @@ import tableRowStyles from "./generated/themes/TableRow.css.js";
36
35
  * @public
37
36
  * @csspart row - Used to style the native `tr` element
38
37
  * @csspart popin-row - Used to style the `tr` element when a row pops in
38
+ * @deprecated Deprecated as of version 2.12.0, use `@ui5/webcomponents/dist/TableRow.js` instead.
39
39
  */
40
40
  let TableRow = TableRow_1 = class TableRow extends UI5Element {
41
41
  constructor() {
42
- super();
42
+ super(...arguments);
43
+ /**
44
+ * Defines the visual indication and behavior of the component.
45
+ *
46
+ * **Note:** When set to `Active`, the item will provide visual response upon press,
47
+ * while with type `Inactive`-will not.
48
+ * @default "Inactive"
49
+ * @since 2.0.0
50
+ * @public
51
+ */
52
+ this.type = "Inactive";
53
+ /**
54
+ * Defines the row's selected state.
55
+ * @default false
56
+ * @since 2.0.0
57
+ * @public
58
+ */
59
+ this.selected = false;
60
+ /**
61
+ * Indicates if the table row is navigated.
62
+ * @default false
63
+ * @since 2.0.0
64
+ * @public
65
+ */
66
+ this.navigated = false;
67
+ /**
68
+ * Defines the mode of the row (None, SingleSelect, MultiSelect).
69
+ * @default "None"
70
+ * @since 2.0.0
71
+ * @private
72
+ */
73
+ this.mode = "None";
74
+ /**
75
+ * Indicates if the table row is active.
76
+ * @default false
77
+ * @since 2.0.0
78
+ * @private
79
+ */
80
+ this.active = false;
81
+ this.forcedBusy = false;
43
82
  this.visibleCells = [];
44
83
  this.popinCells = [];
45
84
  // Properties, set and handled by the Table
46
85
  this.tabbableElements = [];
47
86
  this._columnsInfoString = "";
48
- const handleToushStartEvent = () => {
49
- this.activate();
50
- };
51
- this._ontouchstart = {
52
- handleEvent: handleToushStartEvent,
53
- passive: true,
54
- };
87
+ }
88
+ _ontouchstart() {
89
+ this.activate();
55
90
  }
56
91
  _onmouseup() {
57
92
  this.deactivate();
@@ -65,23 +100,23 @@ let TableRow = TableRow_1 = class TableRow extends UI5Element {
65
100
  const target = e.target;
66
101
  const checkboxPressed = target.classList.contains("ui5-multi-select-checkbox");
67
102
  const rowElements = Array.from(this.shadowRoot.querySelectorAll("tr") || []);
68
- const elements = rowElements.map(getLastTabbableElement);
103
+ const elements = rowElements.map(getLastTabbableElement).filter(Boolean);
69
104
  const lastFocusableElement = elements.pop();
70
105
  if (isTabNext(e) && activeElement === (lastFocusableElement || this.root)) {
71
- this.fireEvent("_forward-after", { target: activeElement });
106
+ this.fireDecoratorEvent("forward-after", { target: activeElement });
72
107
  }
73
108
  if (isTabPrevious(e) && activeElement === this.root) {
74
- this.fireEvent("_forward-before", { target: activeElement });
109
+ this.fireDecoratorEvent("forward-before", { target: activeElement });
75
110
  }
76
111
  if (isSpace(e) && target.tagName.toLowerCase() === "tr") {
77
112
  e.preventDefault();
78
113
  }
79
114
  if (isRowFocused && !checkboxPressed) {
80
115
  if ((isSpace(e) && itemSelectable) || (isEnter(e) && isSingleSelect)) {
81
- this.fireEvent("selection-requested", { row: this });
116
+ this.fireDecoratorEvent("selection-requested", { row: this });
82
117
  }
83
118
  if (isEnter(e) && itemActive) {
84
- this.fireEvent("row-click", { row: this });
119
+ this.fireDecoratorEvent("row-click", { row: this });
85
120
  if (!isSingleSelect) {
86
121
  this.activate();
87
122
  }
@@ -89,7 +124,7 @@ let TableRow = TableRow_1 = class TableRow extends UI5Element {
89
124
  }
90
125
  if (isF7(e)) {
91
126
  e.preventDefault();
92
- this.fireEvent("f7-pressed", { row: this });
127
+ this.fireDecoratorEvent("f7-pressed", { row: this });
93
128
  }
94
129
  }
95
130
  _onkeyup(e) {
@@ -108,14 +143,14 @@ let TableRow = TableRow_1 = class TableRow extends UI5Element {
108
143
  this.root.focus();
109
144
  this.activate();
110
145
  }
111
- this.fireEvent("_focused");
146
+ this.fireDecoratorEvent("_focused");
112
147
  }
113
148
  _onrowclick(e) {
114
149
  const checkboxPressed = e.target.classList.contains("ui5-multi-select-checkbox");
115
150
  // If the user tab over a button on IOS device, the document.activeElement
116
151
  // is the ui5-table-row. The check below ensure that, if a button within the row is pressed,
117
152
  // the row will not be selected.
118
- if (getEventMark(e) === "button") {
153
+ if (this.getFocusDomRef().matches(":has(:focus-within)")) {
119
154
  return;
120
155
  }
121
156
  const activeElement = this.getRootNode().activeElement;
@@ -132,12 +167,12 @@ let TableRow = TableRow_1 = class TableRow extends UI5Element {
132
167
  this._handleSelection();
133
168
  }
134
169
  if (this.type === TableRowType.Active && !checkboxPressed) {
135
- this.fireEvent("row-click", { row: this });
170
+ this.fireDecoratorEvent("row-click", { row: this });
136
171
  }
137
172
  }
138
173
  }
139
174
  _handleSelection() {
140
- this.fireEvent("selection-requested", { row: this });
175
+ this.fireDecoratorEvent("selection-requested", { row: this });
141
176
  }
142
177
  _activeElementHasAttribute(attr) {
143
178
  return !!(this.getRootNode().activeElement?.hasAttribute(attr));
@@ -156,12 +191,12 @@ let TableRow = TableRow_1 = class TableRow extends UI5Element {
156
191
  }
157
192
  }
158
193
  get shouldPopin() {
159
- return this._columnsInfo.filter(el => {
194
+ return !!(this._columnsInfo?.filter(el => {
160
195
  return el.demandPopin || !el.visible;
161
- }).length;
196
+ }).length);
162
197
  }
163
198
  get allColumnsPoppedIn() {
164
- return this._columnsInfo.every(el => el.demandPopin && !el.visible);
199
+ return this._columnsInfo?.every(el => el.demandPopin && !el.visible);
165
200
  }
166
201
  onBeforeRendering() {
167
202
  if (!this.shouldPopin) {
@@ -173,7 +208,7 @@ let TableRow = TableRow_1 = class TableRow extends UI5Element {
173
208
  return;
174
209
  }
175
210
  const allColumnsPoppedInClass = this.allColumnsPoppedIn ? "all-columns-popped-in" : "";
176
- this._columnsInfo.forEach((info, index) => {
211
+ this._columnsInfo?.forEach((info, index) => {
177
212
  const cell = this.cells[index];
178
213
  const popinDisplay = info.popinDisplay === TableColumnPopinDisplay.Inline;
179
214
  if (!cell) {
@@ -244,7 +279,7 @@ let TableRow = TableRow_1 = class TableRow extends UI5Element {
244
279
  return cellTextContent ? this.getNormilzedTextContent(cellTextContent) : "";
245
280
  }
246
281
  getColumnTextByIdx(index) {
247
- const columnInfo = this._columnsInfo[index];
282
+ const columnInfo = this._columnsInfo?.[index];
248
283
  if (!columnInfo) {
249
284
  return "";
250
285
  }
@@ -253,12 +288,9 @@ let TableRow = TableRow_1 = class TableRow extends UI5Element {
253
288
  getNormilzedTextContent(textContent) {
254
289
  return textContent.replace(/[\n\r\t]/g, "").trim();
255
290
  }
256
- static async onDefine() {
257
- TableRow_1.i18nBundle = await getI18nBundle("@ui5/webcomponents");
258
- }
259
291
  };
260
292
  __decorate([
261
- property({ type: TableRowType, defaultValue: TableRowType.Inactive })
293
+ property()
262
294
  ], TableRow.prototype, "type", void 0);
263
295
  __decorate([
264
296
  property({ type: Boolean })
@@ -267,33 +299,35 @@ __decorate([
267
299
  property({ type: Boolean })
268
300
  ], TableRow.prototype, "navigated", void 0);
269
301
  __decorate([
270
- property({ type: TableMode, defaultValue: TableMode.None })
302
+ property()
271
303
  ], TableRow.prototype, "mode", void 0);
272
304
  __decorate([
273
305
  property({ type: Boolean })
274
306
  ], TableRow.prototype, "active", void 0);
275
307
  __decorate([
276
- property({ type: Object, multiple: true })
308
+ property({ type: Array, noAttribute: true })
277
309
  ], TableRow.prototype, "_columnsInfo", void 0);
278
310
  __decorate([
279
- property({ defaultValue: "-1" })
311
+ property()
280
312
  ], TableRow.prototype, "forcedTabIndex", void 0);
281
313
  __decorate([
282
314
  property({ type: Boolean })
283
315
  ], TableRow.prototype, "forcedBusy", void 0);
284
316
  __decorate([
285
- property({ defaultValue: "", noAttribute: true })
317
+ property({ noAttribute: true })
286
318
  ], TableRow.prototype, "forcedAriaPosition", void 0);
287
319
  __decorate([
288
320
  slot({ type: HTMLElement, "default": true, individualSlots: true })
289
321
  ], TableRow.prototype, "cells", void 0);
322
+ __decorate([
323
+ i18n("@ui5/webcomponents")
324
+ ], TableRow, "i18nBundle", void 0);
290
325
  TableRow = TableRow_1 = __decorate([
291
326
  customElement({
292
327
  tag: "ui5-table-row",
293
328
  styles: tableRowStyles,
294
- renderer: litRender,
329
+ renderer: jsxRenderer,
295
330
  template: TableRowTemplate,
296
- dependencies: [CheckBox],
297
331
  })
298
332
  /**
299
333
  * Fired when a row in `Active` mode is clicked or `Enter` key is pressed.
@@ -301,23 +335,50 @@ TableRow = TableRow_1 = __decorate([
301
335
  * @private
302
336
  */
303
337
  ,
304
- event("row-click"),
305
- event("_focused")
338
+ event("row-click", {
339
+ bubbles: true,
340
+ })
341
+ /**
342
+ * @private
343
+ */
344
+ ,
345
+ event("_focused", {
346
+ bubbles: true,
347
+ })
348
+ /**
349
+ * @private
350
+ */
351
+ ,
352
+ event("forward-before", {
353
+ bubbles: true,
354
+ })
355
+ /**
356
+ * @private
357
+ */
358
+ ,
359
+ event("forward-after", {
360
+ bubbles: true,
361
+ })
306
362
  /**
307
363
  * Fired on selection change of an active row.
308
364
  * @since 2.0.0
309
365
  * @private
310
366
  */
311
367
  ,
312
- event("selection-requested")
368
+ event("selection-requested", {
369
+ bubbles: true,
370
+ })
313
371
  /**
314
372
  * Fired when F7 is pressed.
315
373
  * @since 2.0.0
316
374
  * @private
317
375
  */
318
376
  ,
319
- event("f7-pressed")
377
+ event("f7-pressed", {
378
+ bubbles: true,
379
+ })
320
380
  ], TableRow);
381
+ patchScopingSuffix(TableRow);
321
382
  TableRow.define();
322
383
  export default TableRow;
323
384
  //# sourceMappingURL=TableRow.js.map