@ui5/webcomponents-compat 0.0.0-da0d3eb88 → 0.0.0-f42e7c18c

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 (159) hide show
  1. package/CHANGELOG.md +315 -0
  2. package/README.md +1 -4
  3. package/dist/Table.d.ts +21 -27
  4. package/dist/Table.js +122 -72
  5. package/dist/Table.js.map +1 -1
  6. package/dist/TableCell.d.ts +0 -1
  7. package/dist/TableCell.js +21 -6
  8. package/dist/TableCell.js.map +1 -1
  9. package/dist/TableCellTemplate.d.ts +2 -0
  10. package/dist/TableCellTemplate.js +5 -0
  11. package/dist/TableCellTemplate.js.map +1 -0
  12. package/dist/TableColumn.d.ts +3 -3
  13. package/dist/TableColumn.js +47 -7
  14. package/dist/TableColumn.js.map +1 -1
  15. package/dist/TableColumnTemplate.d.ts +2 -0
  16. package/dist/TableColumnTemplate.js +5 -0
  17. package/dist/TableColumnTemplate.js.map +1 -0
  18. package/dist/TableGroupRow.d.ts +6 -4
  19. package/dist/TableGroupRow.js +26 -17
  20. package/dist/TableGroupRow.js.map +1 -1
  21. package/dist/TableGroupRowTemplate.d.ts +2 -0
  22. package/dist/TableGroupRowTemplate.js +5 -0
  23. package/dist/TableGroupRowTemplate.js.map +1 -0
  24. package/dist/TableRow.d.ts +14 -9
  25. package/dist/TableRow.js +101 -41
  26. package/dist/TableRow.js.map +1 -1
  27. package/dist/TableRowTemplate.d.ts +2 -0
  28. package/dist/TableRowTemplate.js +15 -0
  29. package/dist/TableRowTemplate.js.map +1 -0
  30. package/dist/TableTemplate.d.ts +2 -0
  31. package/dist/TableTemplate.js +20 -0
  32. package/dist/TableTemplate.js.map +1 -0
  33. package/dist/bundle.esm.d.ts +1 -1
  34. package/dist/bundle.esm.js +13 -7
  35. package/dist/bundle.esm.js.map +1 -1
  36. package/dist/bundle.scoped.config.d.ts +1 -0
  37. package/dist/bundle.scoped.config.js +5 -0
  38. package/dist/bundle.scoped.config.js.map +1 -0
  39. package/dist/bundle.scoped.esm.d.ts +1 -0
  40. package/dist/bundle.scoped.esm.js +1 -4
  41. package/dist/bundle.scoped.esm.js.map +1 -1
  42. package/dist/css/themes/GrowingButton.css +1 -1
  43. package/dist/css/themes/Table.css +1 -1
  44. package/dist/css/themes/TableCell.css +1 -1
  45. package/dist/css/themes/TableColumn.css +1 -1
  46. package/dist/css/themes/TableGroupRow.css +1 -1
  47. package/dist/css/themes/TableRow.css +1 -1
  48. package/dist/css/themes/sap_fiori_3/parameters-bundle.css +1 -1
  49. package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
  50. package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
  51. package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
  52. package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
  53. package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
  54. package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
  55. package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
  56. package/dist/custom-elements-internal.json +67 -73
  57. package/dist/custom-elements.json +37 -37
  58. package/dist/generated/assets/i18n/messagebundle_ca.json +1 -1
  59. package/dist/generated/assets/i18n/messagebundle_cy.json +1 -1
  60. package/dist/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -1
  61. package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -1
  62. package/dist/generated/assets/i18n/messagebundle_fr.json +1 -1
  63. package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -1
  64. package/dist/generated/assets/i18n/messagebundle_lv.json +1 -1
  65. package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
  66. package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
  67. package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
  68. package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
  69. package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
  70. package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
  71. package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
  72. package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
  73. package/dist/generated/i18n/i18n-defaults.d.ts +1 -1
  74. package/dist/generated/i18n/i18n-defaults.js +2 -3
  75. package/dist/generated/i18n/i18n-defaults.js.map +1 -1
  76. package/dist/generated/json-imports/Themes-fetch.d.ts +1 -0
  77. package/dist/generated/json-imports/Themes-fetch.js +25 -0
  78. package/dist/generated/json-imports/Themes-fetch.js.map +1 -0
  79. package/dist/generated/json-imports/Themes.js.map +1 -1
  80. package/dist/generated/json-imports/i18n-fetch.d.ts +1 -0
  81. package/dist/generated/json-imports/i18n-fetch.js +120 -0
  82. package/dist/generated/json-imports/i18n-fetch.js.map +1 -0
  83. package/dist/generated/json-imports/i18n.js.map +1 -1
  84. package/dist/generated/themes/GrowingButton.css.js +1 -1
  85. package/dist/generated/themes/GrowingButton.css.js.map +1 -1
  86. package/dist/generated/themes/Table.css.js +1 -1
  87. package/dist/generated/themes/Table.css.js.map +1 -1
  88. package/dist/generated/themes/TableCell.css.js +1 -1
  89. package/dist/generated/themes/TableCell.css.js.map +1 -1
  90. package/dist/generated/themes/TableColumn.css.js +1 -1
  91. package/dist/generated/themes/TableColumn.css.js.map +1 -1
  92. package/dist/generated/themes/TableGroupRow.css.js +1 -1
  93. package/dist/generated/themes/TableGroupRow.css.js.map +1 -1
  94. package/dist/generated/themes/TableRow.css.js +1 -1
  95. package/dist/generated/themes/TableRow.css.js.map +1 -1
  96. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
  97. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
  98. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
  99. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
  100. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
  101. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
  102. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
  103. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
  104. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
  105. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
  106. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
  107. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
  108. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -1
  109. package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
  110. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -1
  111. package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
  112. package/dist/tsconfig.tsbuildinfo +1 -0
  113. package/dist/web-types.json +11 -11
  114. package/package.json +7 -7
  115. package/src/TableCellTemplate.tsx +13 -0
  116. package/src/TableColumnTemplate.tsx +13 -0
  117. package/src/TableGroupRowTemplate.tsx +17 -0
  118. package/src/TableRowTemplate.tsx +100 -0
  119. package/src/TableTemplate.tsx +129 -0
  120. package/src/i18n/messagebundle_ca.properties +1 -1
  121. package/src/i18n/messagebundle_cy.properties +1 -1
  122. package/src/i18n/messagebundle_en_US_sappsd.properties +5 -296
  123. package/src/i18n/messagebundle_en_US_saptrc.properties +10 -301
  124. package/src/i18n/messagebundle_fr.properties +3 -3
  125. package/src/i18n/messagebundle_fr_CA.properties +3 -3
  126. package/src/i18n/messagebundle_lv.properties +1 -1
  127. package/src/themes/GrowingButton.css +12 -12
  128. package/src/themes/Table.css +14 -21
  129. package/src/themes/base/Table-parameters.css +1 -0
  130. package/src/themes/base/sizes-parameters.css +0 -1
  131. package/src/themes/sap_horizon/Table-parameters.css +0 -1
  132. package/src/themes/sap_horizon/parameters-bundle.css +0 -1
  133. package/src/themes/sap_horizon_dark/Table-parameters.css +0 -1
  134. package/src/themes/sap_horizon_dark/parameters-bundle.css +0 -1
  135. package/src/themes/sap_horizon_hcb/Table-parameters.css +1 -2
  136. package/src/themes/sap_horizon_hcw/Table-parameters.css +1 -2
  137. package/tsconfig.json +36 -26
  138. package/dist/generated/templates/TableCellTemplate.lit.d.ts +0 -4
  139. package/dist/generated/templates/TableCellTemplate.lit.js +0 -5
  140. package/dist/generated/templates/TableCellTemplate.lit.js.map +0 -1
  141. package/dist/generated/templates/TableColumnTemplate.lit.d.ts +0 -4
  142. package/dist/generated/templates/TableColumnTemplate.lit.js +0 -5
  143. package/dist/generated/templates/TableColumnTemplate.lit.js.map +0 -1
  144. package/dist/generated/templates/TableGroupRowTemplate.lit.d.ts +0 -4
  145. package/dist/generated/templates/TableGroupRowTemplate.lit.js +0 -5
  146. package/dist/generated/templates/TableGroupRowTemplate.lit.js.map +0 -1
  147. package/dist/generated/templates/TableRowTemplate.lit.d.ts +0 -4
  148. package/dist/generated/templates/TableRowTemplate.lit.js +0 -16
  149. package/dist/generated/templates/TableRowTemplate.lit.js.map +0 -1
  150. package/dist/generated/templates/TableTemplate.lit.d.ts +0 -4
  151. package/dist/generated/templates/TableTemplate.lit.js +0 -15
  152. package/dist/generated/templates/TableTemplate.lit.js.map +0 -1
  153. package/src/Table.hbs +0 -121
  154. package/src/TableCell.hbs +0 -7
  155. package/src/TableColumn.hbs +0 -7
  156. package/src/TableGroupRow.hbs +0 -11
  157. package/src/TableRow.hbs +0 -85
  158. package/src/themes/sap_horizon/TableColumn-parameters.css +0 -5
  159. package/src/themes/sap_horizon_dark/TableColumn-parameters.css +0 -5
@@ -8,11 +8,11 @@ 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";
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
14
  import CheckBox from "@ui5/webcomponents/dist/CheckBox.js";
15
- import TableGroupRowTemplate from "./generated/templates/TableGroupRowTemplate.lit.js";
15
+ import TableGroupRowTemplate from "./TableGroupRowTemplate.js";
16
16
  import TableMode from "./types/TableMode.js";
17
17
  // Texts
18
18
  import { TABLE_GROUP_ROW_ARIA_LABEL, } from "./generated/i18n/i18n-defaults.js";
@@ -37,6 +37,13 @@ import tableGroupRowStyles from "./generated/themes/TableGroupRow.css.js";
37
37
  let TableGroupRow = TableGroupRow_1 = class TableGroupRow extends UI5Element {
38
38
  constructor() {
39
39
  super(...arguments);
40
+ /**
41
+ * Defines the mode of the row
42
+ * @default "None"
43
+ * @private
44
+ */
45
+ this.mode = "None";
46
+ this.forcedBusy = false;
40
47
  // Properties, set and handled by the Table
41
48
  this.selected = false;
42
49
  this.tabbableElements = [];
@@ -46,12 +53,12 @@ let TableGroupRow = TableGroupRow_1 = class TableGroupRow extends UI5Element {
46
53
  return this._colSpan;
47
54
  }
48
55
  get ariaLabelText() {
49
- return `${TableGroupRow_1.i18nBundle.getText(TABLE_GROUP_ROW_ARIA_LABEL)} ${this.innerText}. ${this.forcedAriaPosition}`;
56
+ return `${TableGroupRow_1.i18nBundle.getText(TABLE_GROUP_ROW_ARIA_LABEL)} ${this.textContent}. ${this.forcedAriaPosition}`;
50
57
  }
51
58
  visibleColCount() {
52
- let count = this._columnsInfo.reduce((acc, column) => {
59
+ let count = this._columnsInfo?.reduce((acc, column) => {
53
60
  return column.visible ? ++acc : acc;
54
- }, 0);
61
+ }, 0) || 0;
55
62
  if (this.mode === TableMode.MultiSelect) {
56
63
  count++;
57
64
  }
@@ -64,38 +71,40 @@ let TableGroupRow = TableGroupRow_1 = class TableGroupRow extends UI5Element {
64
71
  this._colSpan = this.visibleColCount();
65
72
  }
66
73
  _onfocusin(e) {
67
- this.fireEvent("_focused", e);
68
- }
69
- static async onDefine() {
70
- TableGroupRow_1.i18nBundle = await getI18nBundle("@ui5/webcomponents");
74
+ this.fireDecoratorEvent("_focused", e);
71
75
  }
72
76
  };
73
77
  __decorate([
74
- property({ type: TableMode, defaultValue: TableMode.None })
78
+ property()
75
79
  ], TableGroupRow.prototype, "mode", void 0);
76
80
  __decorate([
77
- property({ type: Object, multiple: true })
81
+ property({ type: Array })
78
82
  ], TableGroupRow.prototype, "_columnsInfo", void 0);
79
83
  __decorate([
80
- property({ defaultValue: "-1" })
84
+ property()
81
85
  ], TableGroupRow.prototype, "forcedTabIndex", void 0);
82
86
  __decorate([
83
87
  property({ type: Boolean })
84
88
  ], TableGroupRow.prototype, "forcedBusy", void 0);
85
89
  __decorate([
86
- property({ defaultValue: "", noAttribute: true })
90
+ property()
87
91
  ], TableGroupRow.prototype, "forcedAriaPosition", void 0);
92
+ __decorate([
93
+ i18n("@ui5/webcomponents")
94
+ ], TableGroupRow, "i18nBundle", void 0);
88
95
  TableGroupRow = TableGroupRow_1 = __decorate([
89
96
  customElement({
90
97
  tag: "ui5-table-group-row",
91
98
  styles: tableGroupRowStyles,
92
- renderer: litRender,
99
+ renderer: jsxRenderer,
93
100
  template: TableGroupRowTemplate,
94
101
  dependencies: [
95
102
  CheckBox,
96
103
  ],
97
104
  }),
98
- event("_focused")
105
+ event("_focused", {
106
+ bubbles: true,
107
+ })
99
108
  ], TableGroupRow);
100
109
  TableGroupRow.define();
101
110
  export default TableGroupRow;
@@ -1 +1 @@
1
- {"version":3,"file":"TableGroupRow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B,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.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;AAE/E,OAAO,QAAQ,MAAM,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AC1D,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,CAAC;mDACY;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;IAZlB,aAAa,CAAC;QACd,GAAG,EAAE,qBAAqB;QAC1B,MAAM,EAAE,mBAAmB;QAC3B,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,qBAAqB;QAC/B,YAAY,EAAE;YACb,QAAQ;SACR;KACD,CAAC;IACD,KAAK,CAAC,UAAU,EAAE;QAClB,OAAO,EAAE,IAAI;KACb,CAAC;GACI,aAAa,CAgElB;AAED,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 CheckBox from \"@ui5/webcomponents/dist/CheckBox.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\";\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: jsxRenderer,\n\ttemplate: TableGroupRowTemplate,\n\tdependencies: [\n\t\tCheckBox,\n\t],\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 })\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\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,5 @@
1
1
  import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
2
2
  import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
3
- import type { PassiveEventListenerObject } from "@ui5/webcomponents-base/dist/types.js";
4
3
  import type TableCell from "./TableCell.js";
5
4
  import type { ITableRow, TableColumnInfo } from "./Table.js";
6
5
  import TableMode from "./types/TableMode.js";
@@ -34,6 +33,14 @@ type TableRowF7PressEventDetail = {
34
33
  * @csspart popin-row - Used to style the `tr` element when a row pops in
35
34
  */
36
35
  declare class TableRow extends UI5Element implements ITableRow {
36
+ eventDetails: {
37
+ "row-click": TableRowClickEventDetail;
38
+ "_focused": FocusEvent;
39
+ "forward-before": TableRowForwardBeforeEventDetail;
40
+ "forward-after": TableRowForwardAfterEventDetail;
41
+ "selection-requested": TableRowSelectionRequestedEventDetail;
42
+ "f7-pressed": TableRowF7PressEventDetail;
43
+ };
37
44
  /**
38
45
  * Defines the visual indication and behavior of the component.
39
46
  *
@@ -72,10 +79,10 @@ declare class TableRow extends UI5Element implements ITableRow {
72
79
  * @private
73
80
  */
74
81
  active: boolean;
75
- _columnsInfo: Array<TableColumnInfo>;
76
- forcedTabIndex: string;
82
+ _columnsInfo?: Array<TableColumnInfo>;
83
+ forcedTabIndex?: string;
77
84
  forcedBusy: boolean;
78
- forcedAriaPosition: string;
85
+ forcedAriaPosition?: string;
79
86
  /**
80
87
  * Defines the cells of the component.
81
88
  *
@@ -86,10 +93,9 @@ declare class TableRow extends UI5Element implements ITableRow {
86
93
  static i18nBundle: I18nBundle;
87
94
  visibleCells: Array<TableCell>;
88
95
  popinCells: Array<TableColumnInfo>;
89
- _ontouchstart: PassiveEventListenerObject;
90
96
  tabbableElements: Array<HTMLElement>;
91
97
  _columnsInfoString: string;
92
- constructor();
98
+ _ontouchstart(): void;
93
99
  _onmouseup(): void;
94
100
  _onkeydown(e: KeyboardEvent): void;
95
101
  _onkeyup(e: KeyboardEvent): void;
@@ -102,8 +108,8 @@ declare class TableRow extends UI5Element implements ITableRow {
102
108
  get _ariaCurrent(): true | undefined;
103
109
  activate(): void;
104
110
  deactivate(): void;
105
- get shouldPopin(): number;
106
- get allColumnsPoppedIn(): boolean;
111
+ get shouldPopin(): boolean;
112
+ get allColumnsPoppedIn(): boolean | undefined;
107
113
  onBeforeRendering(): void;
108
114
  get visibleCellsCount(): number;
109
115
  get ariaLabelText(): string;
@@ -114,7 +120,6 @@ declare class TableRow extends UI5Element implements ITableRow {
114
120
  getCellText(cell: TableCell): string;
115
121
  getColumnTextByIdx(index: number): string;
116
122
  getNormilzedTextContent(textContent: string): string;
117
- static onDefine(): Promise<void>;
118
123
  }
119
124
  export default TableRow;
120
125
  export type { TableRowClickEventDetail, TableRowSelectionRequestedEventDetail, TableRowForwardBeforeEventDetail, TableRowForwardAfterEventDetail, TableRowF7PressEventDetail, };
package/dist/TableRow.js CHANGED
@@ -8,19 +8,18 @@ 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";
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 { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
14
- import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.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
18
  import CheckBox from "@ui5/webcomponents/dist/CheckBox.js";
20
19
  import TableMode from "./types/TableMode.js";
21
20
  import TableRowType from "./types/TableRowType.js";
22
21
  import TableColumnPopinDisplay from "./types/TableColumnPopinDisplay.js";
23
- import TableRowTemplate from "./generated/templates/TableRowTemplate.lit.js";
22
+ import TableRowTemplate from "./TableRowTemplate.js";
24
23
  import { ARIA_LABEL_ROW_SELECTION, LIST_ITEM_NOT_SELECTED, LIST_ITEM_SELECTED, } from "./generated/i18n/i18n-defaults.js";
25
24
  // Styles
26
25
  import tableRowStyles from "./generated/themes/TableRow.css.js";
@@ -39,19 +38,54 @@ import tableRowStyles from "./generated/themes/TableRow.css.js";
39
38
  */
40
39
  let TableRow = TableRow_1 = class TableRow extends UI5Element {
41
40
  constructor() {
42
- super();
41
+ super(...arguments);
42
+ /**
43
+ * Defines the visual indication and behavior of the component.
44
+ *
45
+ * **Note:** When set to `Active`, the item will provide visual response upon press,
46
+ * while with type `Inactive`-will not.
47
+ * @default "Inactive"
48
+ * @since 2.0.0
49
+ * @public
50
+ */
51
+ this.type = "Inactive";
52
+ /**
53
+ * Defines the row's selected state.
54
+ * @default false
55
+ * @since 2.0.0
56
+ * @public
57
+ */
58
+ this.selected = false;
59
+ /**
60
+ * Indicates if the table row is navigated.
61
+ * @default false
62
+ * @since 2.0.0
63
+ * @public
64
+ */
65
+ this.navigated = false;
66
+ /**
67
+ * Defines the mode of the row (None, SingleSelect, MultiSelect).
68
+ * @default "None"
69
+ * @since 2.0.0
70
+ * @private
71
+ */
72
+ this.mode = "None";
73
+ /**
74
+ * Indicates if the table row is active.
75
+ * @default false
76
+ * @since 2.0.0
77
+ * @private
78
+ */
79
+ this.active = false;
80
+ this.forcedBusy = false;
43
81
  this.visibleCells = [];
44
82
  this.popinCells = [];
45
83
  // Properties, set and handled by the Table
46
84
  this.tabbableElements = [];
47
85
  this._columnsInfoString = "";
48
- const handleToushStartEvent = () => {
49
- this.activate();
50
- };
51
- this._ontouchstart = {
52
- handleEvent: handleToushStartEvent,
53
- passive: true,
54
- };
86
+ }
87
+ _ontouchstart() {
88
+ this.activate();
55
89
  }
56
90
  _onmouseup() {
57
91
  this.deactivate();
@@ -65,23 +99,23 @@ let TableRow = TableRow_1 = class TableRow extends UI5Element {
65
99
  const target = e.target;
66
100
  const checkboxPressed = target.classList.contains("ui5-multi-select-checkbox");
67
101
  const rowElements = Array.from(this.shadowRoot.querySelectorAll("tr") || []);
68
- const elements = rowElements.map(getLastTabbableElement);
102
+ const elements = rowElements.map(getLastTabbableElement).filter(Boolean);
69
103
  const lastFocusableElement = elements.pop();
70
104
  if (isTabNext(e) && activeElement === (lastFocusableElement || this.root)) {
71
- this.fireEvent("_forward-after", { target: activeElement });
105
+ this.fireDecoratorEvent("forward-after", { target: activeElement });
72
106
  }
73
107
  if (isTabPrevious(e) && activeElement === this.root) {
74
- this.fireEvent("_forward-before", { target: activeElement });
108
+ this.fireDecoratorEvent("forward-before", { target: activeElement });
75
109
  }
76
110
  if (isSpace(e) && target.tagName.toLowerCase() === "tr") {
77
111
  e.preventDefault();
78
112
  }
79
113
  if (isRowFocused && !checkboxPressed) {
80
114
  if ((isSpace(e) && itemSelectable) || (isEnter(e) && isSingleSelect)) {
81
- this.fireEvent("selection-requested", { row: this });
115
+ this.fireDecoratorEvent("selection-requested", { row: this });
82
116
  }
83
117
  if (isEnter(e) && itemActive) {
84
- this.fireEvent("row-click", { row: this });
118
+ this.fireDecoratorEvent("row-click", { row: this });
85
119
  if (!isSingleSelect) {
86
120
  this.activate();
87
121
  }
@@ -89,7 +123,7 @@ let TableRow = TableRow_1 = class TableRow extends UI5Element {
89
123
  }
90
124
  if (isF7(e)) {
91
125
  e.preventDefault();
92
- this.fireEvent("f7-pressed", { row: this });
126
+ this.fireDecoratorEvent("f7-pressed", { row: this });
93
127
  }
94
128
  }
95
129
  _onkeyup(e) {
@@ -108,14 +142,14 @@ let TableRow = TableRow_1 = class TableRow extends UI5Element {
108
142
  this.root.focus();
109
143
  this.activate();
110
144
  }
111
- this.fireEvent("_focused");
145
+ this.fireDecoratorEvent("_focused");
112
146
  }
113
147
  _onrowclick(e) {
114
148
  const checkboxPressed = e.target.classList.contains("ui5-multi-select-checkbox");
115
149
  // If the user tab over a button on IOS device, the document.activeElement
116
150
  // is the ui5-table-row. The check below ensure that, if a button within the row is pressed,
117
151
  // the row will not be selected.
118
- if (getEventMark(e) === "button") {
152
+ if (this.getFocusDomRef().matches(":has(:focus-within)")) {
119
153
  return;
120
154
  }
121
155
  const activeElement = this.getRootNode().activeElement;
@@ -132,12 +166,12 @@ let TableRow = TableRow_1 = class TableRow extends UI5Element {
132
166
  this._handleSelection();
133
167
  }
134
168
  if (this.type === TableRowType.Active && !checkboxPressed) {
135
- this.fireEvent("row-click", { row: this });
169
+ this.fireDecoratorEvent("row-click", { row: this });
136
170
  }
137
171
  }
138
172
  }
139
173
  _handleSelection() {
140
- this.fireEvent("selection-requested", { row: this });
174
+ this.fireDecoratorEvent("selection-requested", { row: this });
141
175
  }
142
176
  _activeElementHasAttribute(attr) {
143
177
  return !!(this.getRootNode().activeElement?.hasAttribute(attr));
@@ -156,12 +190,12 @@ let TableRow = TableRow_1 = class TableRow extends UI5Element {
156
190
  }
157
191
  }
158
192
  get shouldPopin() {
159
- return this._columnsInfo.filter(el => {
193
+ return !!(this._columnsInfo?.filter(el => {
160
194
  return el.demandPopin || !el.visible;
161
- }).length;
195
+ }).length);
162
196
  }
163
197
  get allColumnsPoppedIn() {
164
- return this._columnsInfo.every(el => el.demandPopin && !el.visible);
198
+ return this._columnsInfo?.every(el => el.demandPopin && !el.visible);
165
199
  }
166
200
  onBeforeRendering() {
167
201
  if (!this.shouldPopin) {
@@ -173,7 +207,7 @@ let TableRow = TableRow_1 = class TableRow extends UI5Element {
173
207
  return;
174
208
  }
175
209
  const allColumnsPoppedInClass = this.allColumnsPoppedIn ? "all-columns-popped-in" : "";
176
- this._columnsInfo.forEach((info, index) => {
210
+ this._columnsInfo?.forEach((info, index) => {
177
211
  const cell = this.cells[index];
178
212
  const popinDisplay = info.popinDisplay === TableColumnPopinDisplay.Inline;
179
213
  if (!cell) {
@@ -244,7 +278,7 @@ let TableRow = TableRow_1 = class TableRow extends UI5Element {
244
278
  return cellTextContent ? this.getNormilzedTextContent(cellTextContent) : "";
245
279
  }
246
280
  getColumnTextByIdx(index) {
247
- const columnInfo = this._columnsInfo[index];
281
+ const columnInfo = this._columnsInfo?.[index];
248
282
  if (!columnInfo) {
249
283
  return "";
250
284
  }
@@ -253,12 +287,9 @@ let TableRow = TableRow_1 = class TableRow extends UI5Element {
253
287
  getNormilzedTextContent(textContent) {
254
288
  return textContent.replace(/[\n\r\t]/g, "").trim();
255
289
  }
256
- static async onDefine() {
257
- TableRow_1.i18nBundle = await getI18nBundle("@ui5/webcomponents");
258
- }
259
290
  };
260
291
  __decorate([
261
- property({ type: TableRowType, defaultValue: TableRowType.Inactive })
292
+ property()
262
293
  ], TableRow.prototype, "type", void 0);
263
294
  __decorate([
264
295
  property({ type: Boolean })
@@ -267,31 +298,34 @@ __decorate([
267
298
  property({ type: Boolean })
268
299
  ], TableRow.prototype, "navigated", void 0);
269
300
  __decorate([
270
- property({ type: TableMode, defaultValue: TableMode.None })
301
+ property()
271
302
  ], TableRow.prototype, "mode", void 0);
272
303
  __decorate([
273
304
  property({ type: Boolean })
274
305
  ], TableRow.prototype, "active", void 0);
275
306
  __decorate([
276
- property({ type: Object, multiple: true })
307
+ property({ type: Array })
277
308
  ], TableRow.prototype, "_columnsInfo", void 0);
278
309
  __decorate([
279
- property({ defaultValue: "-1" })
310
+ property()
280
311
  ], TableRow.prototype, "forcedTabIndex", void 0);
281
312
  __decorate([
282
313
  property({ type: Boolean })
283
314
  ], TableRow.prototype, "forcedBusy", void 0);
284
315
  __decorate([
285
- property({ defaultValue: "", noAttribute: true })
316
+ property({ noAttribute: true })
286
317
  ], TableRow.prototype, "forcedAriaPosition", void 0);
287
318
  __decorate([
288
319
  slot({ type: HTMLElement, "default": true, individualSlots: true })
289
320
  ], TableRow.prototype, "cells", void 0);
321
+ __decorate([
322
+ i18n("@ui5/webcomponents")
323
+ ], TableRow, "i18nBundle", void 0);
290
324
  TableRow = TableRow_1 = __decorate([
291
325
  customElement({
292
326
  tag: "ui5-table-row",
293
327
  styles: tableRowStyles,
294
- renderer: litRender,
328
+ renderer: jsxRenderer,
295
329
  template: TableRowTemplate,
296
330
  dependencies: [CheckBox],
297
331
  })
@@ -301,22 +335,48 @@ 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);
321
381
  TableRow.define();
322
382
  export default TableRow;
@@ -1 +1 @@
1
- {"version":3,"file":"TableRow.js","sourceRoot":"","sources":["../src/TableRow.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,kDAAkD,CAAC;AACrE,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAGnE,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAC3E,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,EACN,OAAO,EACP,OAAO,EACP,IAAI,EACJ,SAAS,EACT,aAAa,GACb,MAAM,sCAAsC,CAAC;AAC9C,OAAO,gBAAgB,MAAM,uDAAuD,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,uDAAuD,CAAC;AAC/F,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,QAAQ,MAAM,qCAAqC,CAAC;AAG3D,OAAO,SAAS,MAAM,sBAAsB,CAAC;AAC7C,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,uBAAuB,MAAM,oCAAoC,CAAC;AACzE,OAAO,gBAAgB,MAAM,+CAA+C,CAAC;AAC7E,OAAO,EACN,wBAAwB,EACxB,sBAAsB,EACtB,kBAAkB,GAClB,MAAM,mCAAmC,CAAC;AAE3C,SAAS;AACT,OAAO,cAAc,MAAM,oCAAoC,CAAC;AAsBhE;;;;;;;;;;;;GAYG;AA2BH,IAAM,QAAQ,gBAAd,MAAM,QAAS,SAAQ,UAAU;IAiFhC;QACC,KAAK,EAAE,CAAC;QAVT,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AE,CAAC;0CACT;AASnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;2CACR;AASpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC;sCACtC;AAStB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCACX;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8CACL;AAGtC;IADC,QAAQ,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;gDACT;AAGxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4CACP;AAGrB;IADC,QAAQ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;oDACtB;AAS5B;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC;uCAC3C;AApEpB,QAAQ;IA1Bb,aAAa,CAAC;QACd,GAAG,EAAE,eAAe;QACpB,MAAM,EAAE,cAAc;QACtB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,gBAAgB;QAC1B,YAAY,EAAE,CAAC,QAAQ,CAAC;KACxB,CAAC;IACF;;;;OAIG;;IACF,KAAK,CAAC,WAAW,CAAC;IAClB,KAAK,CAAC,UAAU,CAAC;IAClB;;;;OAIG;;IACF,KAAK,CAAC,qBAAqB,CAAC;IAC7B;;;;OAIG;;IACF,KAAK,CAAC,YAAY,CAAC;GACd,QAAQ,CAuVb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,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.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { PassiveEventListenerObject } from \"@ui5/webcomponents-base/dist/types.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport {\n\tisSpace,\n\tisEnter,\n\tisF7,\n\tisTabNext,\n\tisTabPrevious,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport getActiveElement from \"@ui5/webcomponents-base/dist/util/getActiveElement.js\";\nimport { getLastTabbableElement } from \"@ui5/webcomponents-base/dist/util/TabbableElements.js\";\nimport { getEventMark } from \"@ui5/webcomponents-base/dist/MarkedEvents.js\";\nimport CheckBox from \"@ui5/webcomponents/dist/CheckBox.js\";\nimport type TableCell from \"./TableCell.js\";\nimport type { ITableRow, TableColumnInfo } from \"./Table.js\";\nimport TableMode from \"./types/TableMode.js\";\nimport TableRowType from \"./types/TableRowType.js\";\nimport TableColumnPopinDisplay from \"./types/TableColumnPopinDisplay.js\";\nimport TableRowTemplate from \"./generated/templates/TableRowTemplate.lit.js\";\nimport {\n\tARIA_LABEL_ROW_SELECTION,\n\tLIST_ITEM_NOT_SELECTED,\n\tLIST_ITEM_SELECTED,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport tableRowStyles from \"./generated/themes/TableRow.css.js\";\n\ntype TableRowClickEventDetail = {\n\trow: TableRow,\n}\n\ntype TableRowSelectionRequestedEventDetail = {\n\trow: TableRow,\n}\n\ntype TableRowForwardBeforeEventDetail = {\n\ttarget: HTMLElement,\n}\n\ntype TableRowForwardAfterEventDetail = {\n\ttarget: HTMLElement,\n}\n\ntype TableRowF7PressEventDetail = {\n\trow: TableRow,\n}\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-table-row` component represents a row in the `ui5-table`.\n * @constructor\n * @extends UI5Element\n * @implements {ITableRow}\n * @public\n * @csspart row - Used to style the native `tr` element\n * @csspart popin-row - Used to style the `tr` element when a row pops in\n */\n@customElement({\n\ttag: \"ui5-table-row\",\n\tstyles: tableRowStyles,\n\trenderer: litRender,\n\ttemplate: TableRowTemplate,\n\tdependencies: [CheckBox],\n})\n/**\n * Fired when a row in `Active` mode is clicked or `Enter` key is pressed.\n * @since 2.0.0\n * @private\n */\n@event(\"row-click\")\n@event(\"_focused\")\n/**\n * Fired on selection change of an active row.\n * @since 2.0.0\n * @private\n */\n@event(\"selection-requested\")\n/**\n * Fired when F7 is pressed.\n * @since 2.0.0\n * @private\n */\n@event(\"f7-pressed\")\nclass TableRow extends UI5Element implements ITableRow {\n\t/**\n\t * Defines the visual indication and behavior of the component.\n\t *\n\t * **Note:** When set to `Active`, the item will provide visual response upon press,\n\t * while with type `Inactive`-will not.\n\t * @default \"Inactive\"\n\t * @since 2.0.0\n\t * @public\n\t */\n\t@property({ type: TableRowType, defaultValue: TableRowType.Inactive })\n\ttype!: `${TableRowType}`;\n\n\t/**\n\t * Defines the row's selected state.\n\t * @default false\n\t * @since 2.0.0\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tselected!: boolean;\n\n\t/**\n\t * Indicates if the table row is navigated.\n\t * @default false\n\t * @since 2.0.0\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tnavigated!: boolean;\n\n\t/**\n\t * Defines the mode of the row (None, SingleSelect, MultiSelect).\n\t * @default \"None\"\n\t * @since 2.0.0\n\t * @private\n\t */\n\t@property({ type: TableMode, defaultValue: TableMode.None })\n\tmode!: `${TableMode}`;\n\n\t/**\n\t * Indicates if the table row is active.\n\t * @default false\n\t * @since 2.0.0\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tactive!: boolean;\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/**\n\t * Defines the cells of the component.\n\t *\n\t * **Note:** Use `ui5-table-cell` for the intended design.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, \"default\": true, individualSlots: true })\n\tcells!: Array<TableCell>;\n\n\tstatic i18nBundle: I18nBundle;\n\n\tvisibleCells: Array<TableCell> = [];\n\tpopinCells: Array<TableColumnInfo> = [];\n\n\t_ontouchstart: PassiveEventListenerObject;\n\n\t// Properties, set and handled by the Table\n\ttabbableElements: Array<HTMLElement> = [];\n\t_columnsInfoString = \"\";\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tconst handleToushStartEvent = () => {\n\t\t\tthis.activate();\n\t\t};\n\n\t\tthis._ontouchstart = {\n\t\t\thandleEvent: handleToushStartEvent,\n\t\t\tpassive: true,\n\t\t};\n\t}\n\n\t_onmouseup() {\n\t\tthis.deactivate();\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tconst activeElement = getActiveElement() as HTMLElement;\n\t\tconst itemActive = this.type === TableRowType.Active;\n\t\tconst isSingleSelect = this.isSingleSelect;\n\t\tconst itemSelectable = isSingleSelect || this.isMultiSelect;\n\t\tconst isRowFocused = this._activeElementHasAttribute(\"ui5-table-row\");\n\t\tconst target = e.target as HTMLElement;\n\t\tconst checkboxPressed = target.classList.contains(\"ui5-multi-select-checkbox\");\n\t\tconst rowElements = Array.from(this.shadowRoot!.querySelectorAll(\"tr\") || []);\n\t\tconst elements = rowElements.map(getLastTabbableElement);\n\t\tconst lastFocusableElement = elements.pop();\n\n\t\tif (isTabNext(e) && activeElement === (lastFocusableElement || this.root)) {\n\t\t\tthis.fireEvent<TableRowForwardAfterEventDetail>(\"_forward-after\", { target: activeElement });\n\t\t}\n\n\t\tif (isTabPrevious(e) && activeElement === this.root) {\n\t\t\tthis.fireEvent<TableRowForwardBeforeEventDetail>(\"_forward-before\", { target: activeElement });\n\t\t}\n\n\t\tif (isSpace(e) && target.tagName.toLowerCase() === \"tr\") {\n\t\t\te.preventDefault();\n\t\t}\n\n\t\tif (isRowFocused && !checkboxPressed) {\n\t\t\tif ((isSpace(e) && itemSelectable) || (isEnter(e) && isSingleSelect)) {\n\t\t\t\tthis.fireEvent<TableRowSelectionRequestedEventDetail>(\"selection-requested\", { row: this });\n\t\t\t}\n\n\t\t\tif (isEnter(e) && itemActive) {\n\t\t\t\tthis.fireEvent<TableRowClickEventDetail>(\"row-click\", { row: this });\n\t\t\t\tif (!isSingleSelect) {\n\t\t\t\t\tthis.activate();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (isF7(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis.fireEvent<TableRowF7PressEventDetail>(\"f7-pressed\", { row: this });\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (isSpace(e) || isEnter(e)) {\n\t\t\tthis.deactivate();\n\t\t}\n\t}\n\n\t_ontouchend() {\n\t\tthis.deactivate();\n\t}\n\n\t_onfocusout() {\n\t\tthis.deactivate();\n\t}\n\n\t_onfocusin(e: FocusEvent, forceSelfFocus = false) {\n\t\tif (forceSelfFocus || this._activeElementHasAttribute(\"ui5-table-cell\")) {\n\t\t\tthis.root.focus();\n\t\t\tthis.activate();\n\t\t}\n\n\t\tthis.fireEvent(\"_focused\");\n\t}\n\n\t_onrowclick(e: MouseEvent) {\n\t\tconst checkboxPressed = (e.target as HTMLElement).classList.contains(\"ui5-multi-select-checkbox\");\n\t\t// If the user tab over a button on IOS device, the document.activeElement\n\t\t// is the ui5-table-row. The check below ensure that, if a button within the row is pressed,\n\t\t// the row will not be selected.\n\t\tif (getEventMark(e) === \"button\") {\n\t\t\treturn;\n\t\t}\n\n\t\tconst activeElement = (this.getRootNode() as Document).activeElement;\n\t\tif (!this.contains(activeElement)) {\n\t\t\t// If the user clickes on non-focusable element within the ui5-table-cell,\n\t\t\t// the focus goes to the body, se we have to bring it back to the row.\n\t\t\t// If the user clicks on input, button or similar clickable element,\n\t\t\t// the focus remains on that element.\n\t\t\tthis._onfocusin(e, true /* force row focus */);\n\t\t\tthis.deactivate();\n\t\t}\n\n\t\tif (this._activeElementHasAttribute(\"ui5-table-row\")) {\n\t\t\tif (this.isSingleSelect) {\n\t\t\t\tthis._handleSelection();\n\t\t\t}\n\n\t\t\tif (this.type === TableRowType.Active && !checkboxPressed) {\n\t\t\t\tthis.fireEvent<TableRowClickEventDetail>(\"row-click\", { row: this });\n\t\t\t}\n\t\t}\n\t}\n\n\t_handleSelection() {\n\t\tthis.fireEvent<TableRowSelectionRequestedEventDetail>(\"selection-requested\", { row: this });\n\t}\n\n\t_activeElementHasAttribute(attr: string): boolean {\n\t\treturn !!((this.getRootNode() as Document).activeElement?.hasAttribute(attr));\n\t}\n\n\tget _ariaCurrent() {\n\t\treturn this.navigated ? true : undefined;\n\t}\n\n\tactivate() {\n\t\tif (this.type === TableRowType.Active) {\n\t\t\tthis.active = true;\n\t\t}\n\t}\n\n\tdeactivate() {\n\t\tif (this.active) {\n\t\t\tthis.active = false;\n\t\t}\n\t}\n\n\tget shouldPopin() {\n\t\treturn this._columnsInfo.filter(el => {\n\t\t\treturn el.demandPopin || !el.visible;\n\t\t}).length;\n\t}\n\n\tget allColumnsPoppedIn() {\n\t\treturn this._columnsInfo.every(el => el.demandPopin && !el.visible);\n\t}\n\n\tonBeforeRendering() {\n\t\tif (!this.shouldPopin) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.visibleCells = [];\n\t\tthis.popinCells = [];\n\n\t\tif (this.cells.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst allColumnsPoppedInClass = this.allColumnsPoppedIn ? \"all-columns-popped-in\" : \"\";\n\t\tthis._columnsInfo.forEach((info, index) => {\n\t\t\tconst cell = this.cells[index];\n\t\t\tconst popinDisplay = info.popinDisplay === TableColumnPopinDisplay.Inline;\n\n\t\t\tif (!cell) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (info.visible) {\n\t\t\t\tthis.visibleCells.push(cell);\n\t\t\t\tcell.popined = false;\n\t\t\t\tcell._popinedInline = false;\n\t\t\t} else if (info.demandPopin) {\n\t\t\t\tconst popinHeaderClass = this.popinCells.length === 0 ? \"popin-header\" : \"\";\n\t\t\t\tthis.popinCells.push({\n\t\t\t\t\tcell,\n\t\t\t\t\tpopinText: info.popinText,\n\t\t\t\t\tclasses: `ui5-table-popin-row ${allColumnsPoppedInClass} ${popinHeaderClass}`,\n\t\t\t\t\tpopinDisplayInline: popinDisplay,\n\t\t\t\t});\n\t\t\t\tcell.popined = true;\n\t\t\t\tif (info.popinDisplay === TableColumnPopinDisplay.Inline) {\n\t\t\t\t\tcell._popinedInline = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcell.popined = false;\n\t\t\t\tcell._popinedInline = false;\n\t\t\t}\n\t\t});\n\n\t\tconst lastVisibleCell = this.visibleCells[this.visibleCells.length - 1];\n\n\t\tif (lastVisibleCell) {\n\t\t\tlastVisibleCell.lastInRow = true;\n\t\t}\n\t}\n\n\tget visibleCellsCount() {\n\t\tlet visibleCellsCount = this.visibleCells.length;\n\n\t\tif (this.isMultiSelect) {\n\t\t\tvisibleCellsCount += 1;\n\t\t}\n\n\t\treturn visibleCellsCount;\n\t}\n\n\tget ariaLabelText() {\n\t\tconst isSelected = this.selected ? TableRow.i18nBundle.getText(LIST_ITEM_SELECTED) : TableRow.i18nBundle.getText(LIST_ITEM_NOT_SELECTED);\n\t\tconst isRowSelectable = this.isSingleSelect || this.isMultiSelect;\n\t\tconst ariaLabel = this.cells.map((cell, index) => {\n\t\t\tconst columText = this.getColumnTextByIdx(index);\n\t\t\tconst cellText = cell.cellContent.length ? this.getCellText(cell) : cell.ariaLabelEmptyCellText;\n\t\t\treturn `${columText} ${cellText}`;\n\t\t}).join(\" \");\n\n\t\tif (isRowSelectable) {\n\t\t\treturn `${ariaLabel}. ${this.forcedAriaPosition}. ${isSelected}`;\n\t\t}\n\n\t\treturn `${ariaLabel}. ${this.forcedAriaPosition}`;\n\t}\n\n\tget ariaLabelRowSelection() {\n\t\treturn TableRow.i18nBundle.getText(ARIA_LABEL_ROW_SELECTION);\n\t}\n\n\tget isSingleSelect() {\n\t\treturn this.mode === TableMode.SingleSelect;\n\t}\n\n\tget isMultiSelect() {\n\t\treturn this.mode === TableMode.MultiSelect;\n\t}\n\n\tget root() {\n\t\treturn this.shadowRoot!.querySelector<HTMLElement>(\".ui5-table-row-root\")!;\n\t}\n\n\tgetCellText(cell: TableCell): string {\n\t\tconst cellTextContent = cell.textContent;\n\n\t\treturn cellTextContent ? this.getNormilzedTextContent(cellTextContent) : \"\";\n\t}\n\n\tgetColumnTextByIdx(index: number): string {\n\t\tconst columnInfo: TableColumnInfo = this._columnsInfo[index];\n\n\t\tif (!columnInfo) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\treturn columnInfo.text ? this.getNormilzedTextContent(columnInfo.text) : \"\";\n\t}\n\n\tgetNormilzedTextContent(textContent: string): string {\n\t\treturn textContent.replace(/[\\n\\r\\t]/g, \"\").trim();\n\t}\n\n\tstatic async onDefine() {\n\t\tTableRow.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n}\n\nTableRow.define();\n\nexport default TableRow;\n\nexport type {\n\tTableRowClickEventDetail,\n\tTableRowSelectionRequestedEventDetail,\n\tTableRowForwardBeforeEventDetail,\n\tTableRowForwardAfterEventDetail,\n\tTableRowF7PressEventDetail,\n};\n"]}
1
+ {"version":3,"file":"TableRow.js","sourceRoot":"","sources":["../src/TableRow.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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";\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 slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport {\n\tisSpace,\n\tisEnter,\n\tisF7,\n\tisTabNext,\n\tisTabPrevious,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport getActiveElement from \"@ui5/webcomponents-base/dist/util/getActiveElement.js\";\nimport { getLastTabbableElement } from \"@ui5/webcomponents-base/dist/util/TabbableElements.js\";\nimport CheckBox from \"@ui5/webcomponents/dist/CheckBox.js\";\nimport type TableCell from \"./TableCell.js\";\nimport type { ITableRow, TableColumnInfo } from \"./Table.js\";\nimport TableMode from \"./types/TableMode.js\";\nimport TableRowType from \"./types/TableRowType.js\";\nimport TableColumnPopinDisplay from \"./types/TableColumnPopinDisplay.js\";\nimport TableRowTemplate from \"./TableRowTemplate.js\";\nimport {\n\tARIA_LABEL_ROW_SELECTION,\n\tLIST_ITEM_NOT_SELECTED,\n\tLIST_ITEM_SELECTED,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport tableRowStyles from \"./generated/themes/TableRow.css.js\";\n\ntype TableRowClickEventDetail = {\n\trow: TableRow,\n}\n\ntype TableRowSelectionRequestedEventDetail = {\n\trow: TableRow,\n}\n\ntype TableRowForwardBeforeEventDetail = {\n\ttarget: HTMLElement,\n}\n\ntype TableRowForwardAfterEventDetail = {\n\ttarget: HTMLElement,\n}\n\ntype TableRowF7PressEventDetail = {\n\trow: TableRow,\n}\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-table-row` component represents a row in the `ui5-table`.\n * @constructor\n * @extends UI5Element\n * @implements {ITableRow}\n * @public\n * @csspart row - Used to style the native `tr` element\n * @csspart popin-row - Used to style the `tr` element when a row pops in\n */\n@customElement({\n\ttag: \"ui5-table-row\",\n\tstyles: tableRowStyles,\n\trenderer: jsxRenderer,\n\ttemplate: TableRowTemplate,\n\tdependencies: [CheckBox],\n})\n/**\n * Fired when a row in `Active` mode is clicked or `Enter` key is pressed.\n * @since 2.0.0\n * @private\n */\n@event(\"row-click\", {\n\tbubbles: true,\n})\n/**\n * @private\n */\n@event(\"_focused\", {\n\tbubbles: true,\n})\n/**\n * @private\n */\n@event(\"forward-before\", {\n\tbubbles: true,\n})\n/**\n * @private\n */\n@event(\"forward-after\", {\n\tbubbles: true,\n})\n/**\n * Fired on selection change of an active row.\n * @since 2.0.0\n * @private\n */\n@event(\"selection-requested\", {\n\tbubbles: true,\n})\n/**\n * Fired when F7 is pressed.\n * @since 2.0.0\n * @private\n */\n@event(\"f7-pressed\", {\n\tbubbles: true,\n})\nclass TableRow extends UI5Element implements ITableRow {\n\teventDetails!: {\n\t\t\"row-click\": TableRowClickEventDetail,\n\t\t\"_focused\": FocusEvent,\n\t\t\"forward-before\": TableRowForwardBeforeEventDetail,\n\t\t\"forward-after\": TableRowForwardAfterEventDetail,\n\t\t\"selection-requested\": TableRowSelectionRequestedEventDetail,\n\t\t\"f7-pressed\": TableRowF7PressEventDetail,\n\t}\n\t/**\n\t * Defines the visual indication and behavior of the component.\n\t *\n\t * **Note:** When set to `Active`, the item will provide visual response upon press,\n\t * while with type `Inactive`-will not.\n\t * @default \"Inactive\"\n\t * @since 2.0.0\n\t * @public\n\t */\n\t@property()\n\ttype: `${TableRowType}` = \"Inactive\";\n\n\t/**\n\t * Defines the row's selected state.\n\t * @default false\n\t * @since 2.0.0\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tselected = false;\n\n\t/**\n\t * Indicates if the table row is navigated.\n\t * @default false\n\t * @since 2.0.0\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tnavigated = false;\n\n\t/**\n\t * Defines the mode of the row (None, SingleSelect, MultiSelect).\n\t * @default \"None\"\n\t * @since 2.0.0\n\t * @private\n\t */\n\t@property()\n\tmode: `${TableMode}` = \"None\";\n\n\t/**\n\t * Indicates if the table row is active.\n\t * @default false\n\t * @since 2.0.0\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tactive = false;\n\n\t@property({ type: Array })\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({ noAttribute: true })\n\tforcedAriaPosition?: string;\n\n\t/**\n\t * Defines the cells of the component.\n\t *\n\t * **Note:** Use `ui5-table-cell` for the intended design.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, \"default\": true, individualSlots: true })\n\tcells!: Array<TableCell>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tvisibleCells: Array<TableCell> = [];\n\tpopinCells: Array<TableColumnInfo> = [];\n\n\t// Properties, set and handled by the Table\n\ttabbableElements: Array<HTMLElement> = [];\n\t_columnsInfoString = \"\";\n\n\t_ontouchstart() {\n\t\tthis.activate();\n\t}\n\n\t_onmouseup() {\n\t\tthis.deactivate();\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tconst activeElement = getActiveElement() as HTMLElement;\n\t\tconst itemActive = this.type === TableRowType.Active;\n\t\tconst isSingleSelect = this.isSingleSelect;\n\t\tconst itemSelectable = isSingleSelect || this.isMultiSelect;\n\t\tconst isRowFocused = this._activeElementHasAttribute(\"ui5-table-row\");\n\t\tconst target = e.target as HTMLElement;\n\t\tconst checkboxPressed = target.classList.contains(\"ui5-multi-select-checkbox\");\n\t\tconst rowElements = Array.from(this.shadowRoot!.querySelectorAll(\"tr\") || []);\n\t\tconst elements = rowElements.map(getLastTabbableElement).filter(Boolean);\n\t\tconst lastFocusableElement = elements.pop();\n\n\t\tif (isTabNext(e) && activeElement === (lastFocusableElement || this.root)) {\n\t\t\tthis.fireDecoratorEvent(\"forward-after\", { target: activeElement });\n\t\t}\n\n\t\tif (isTabPrevious(e) && activeElement === this.root) {\n\t\t\tthis.fireDecoratorEvent(\"forward-before\", { target: activeElement });\n\t\t}\n\n\t\tif (isSpace(e) && target.tagName.toLowerCase() === \"tr\") {\n\t\t\te.preventDefault();\n\t\t}\n\n\t\tif (isRowFocused && !checkboxPressed) {\n\t\t\tif ((isSpace(e) && itemSelectable) || (isEnter(e) && isSingleSelect)) {\n\t\t\t\tthis.fireDecoratorEvent(\"selection-requested\", { row: this });\n\t\t\t}\n\n\t\t\tif (isEnter(e) && itemActive) {\n\t\t\t\tthis.fireDecoratorEvent(\"row-click\", { row: this });\n\t\t\t\tif (!isSingleSelect) {\n\t\t\t\t\tthis.activate();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (isF7(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis.fireDecoratorEvent(\"f7-pressed\", { row: this });\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (isSpace(e) || isEnter(e)) {\n\t\t\tthis.deactivate();\n\t\t}\n\t}\n\n\t_ontouchend() {\n\t\tthis.deactivate();\n\t}\n\n\t_onfocusout() {\n\t\tthis.deactivate();\n\t}\n\n\t_onfocusin(e: FocusEvent, forceSelfFocus = false) {\n\t\tif (forceSelfFocus || this._activeElementHasAttribute(\"ui5-table-cell\")) {\n\t\t\tthis.root.focus();\n\t\t\tthis.activate();\n\t\t}\n\n\t\tthis.fireDecoratorEvent(\"_focused\");\n\t}\n\n\t_onrowclick(e: MouseEvent) {\n\t\tconst checkboxPressed = (e.target as HTMLElement).classList.contains(\"ui5-multi-select-checkbox\");\n\t\t// If the user tab over a button on IOS device, the document.activeElement\n\t\t// is the ui5-table-row. The check below ensure that, if a button within the row is pressed,\n\t\t// the row will not be selected.\n\n\t\tif (this.getFocusDomRef()!.matches(\":has(:focus-within)\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst activeElement = (this.getRootNode() as Document).activeElement;\n\t\tif (!this.contains(activeElement)) {\n\t\t\t// If the user clickes on non-focusable element within the ui5-table-cell,\n\t\t\t// the focus goes to the body, se we have to bring it back to the row.\n\t\t\t// If the user clicks on input, button or similar clickable element,\n\t\t\t// the focus remains on that element.\n\t\t\tthis._onfocusin(e, true /* force row focus */);\n\t\t\tthis.deactivate();\n\t\t}\n\n\t\tif (this._activeElementHasAttribute(\"ui5-table-row\")) {\n\t\t\tif (this.isSingleSelect) {\n\t\t\t\tthis._handleSelection();\n\t\t\t}\n\n\t\t\tif (this.type === TableRowType.Active && !checkboxPressed) {\n\t\t\t\tthis.fireDecoratorEvent(\"row-click\", { row: this });\n\t\t\t}\n\t\t}\n\t}\n\n\t_handleSelection() {\n\t\tthis.fireDecoratorEvent(\"selection-requested\", { row: this });\n\t}\n\n\t_activeElementHasAttribute(attr: string): boolean {\n\t\treturn !!((this.getRootNode() as Document).activeElement?.hasAttribute(attr));\n\t}\n\n\tget _ariaCurrent() {\n\t\treturn this.navigated ? true : undefined;\n\t}\n\n\tactivate() {\n\t\tif (this.type === TableRowType.Active) {\n\t\t\tthis.active = true;\n\t\t}\n\t}\n\n\tdeactivate() {\n\t\tif (this.active) {\n\t\t\tthis.active = false;\n\t\t}\n\t}\n\n\tget shouldPopin(): boolean {\n\t\treturn !!(this._columnsInfo?.filter(el => {\n\t\t\treturn el.demandPopin || !el.visible;\n\t\t}).length);\n\t}\n\n\tget allColumnsPoppedIn() {\n\t\treturn this._columnsInfo?.every(el => el.demandPopin && !el.visible);\n\t}\n\n\tonBeforeRendering() {\n\t\tif (!this.shouldPopin) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.visibleCells = [];\n\t\tthis.popinCells = [];\n\n\t\tif (this.cells.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst allColumnsPoppedInClass = this.allColumnsPoppedIn ? \"all-columns-popped-in\" : \"\";\n\t\tthis._columnsInfo?.forEach((info, index) => {\n\t\t\tconst cell = this.cells[index];\n\t\t\tconst popinDisplay = info.popinDisplay === TableColumnPopinDisplay.Inline;\n\n\t\t\tif (!cell) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (info.visible) {\n\t\t\t\tthis.visibleCells.push(cell);\n\t\t\t\tcell.popined = false;\n\t\t\t\tcell._popinedInline = false;\n\t\t\t} else if (info.demandPopin) {\n\t\t\t\tconst popinHeaderClass = this.popinCells.length === 0 ? \"popin-header\" : \"\";\n\t\t\t\tthis.popinCells.push({\n\t\t\t\t\tcell,\n\t\t\t\t\tpopinText: info.popinText,\n\t\t\t\t\tclasses: `ui5-table-popin-row ${allColumnsPoppedInClass} ${popinHeaderClass}`,\n\t\t\t\t\tpopinDisplayInline: popinDisplay,\n\t\t\t\t});\n\t\t\t\tcell.popined = true;\n\t\t\t\tif (info.popinDisplay === TableColumnPopinDisplay.Inline) {\n\t\t\t\t\tcell._popinedInline = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcell.popined = false;\n\t\t\t\tcell._popinedInline = false;\n\t\t\t}\n\t\t});\n\n\t\tconst lastVisibleCell = this.visibleCells[this.visibleCells.length - 1];\n\n\t\tif (lastVisibleCell) {\n\t\t\tlastVisibleCell.lastInRow = true;\n\t\t}\n\t}\n\n\tget visibleCellsCount() {\n\t\tlet visibleCellsCount = this.visibleCells.length;\n\n\t\tif (this.isMultiSelect) {\n\t\t\tvisibleCellsCount += 1;\n\t\t}\n\n\t\treturn visibleCellsCount;\n\t}\n\n\tget ariaLabelText() {\n\t\tconst isSelected = this.selected ? TableRow.i18nBundle.getText(LIST_ITEM_SELECTED) : TableRow.i18nBundle.getText(LIST_ITEM_NOT_SELECTED);\n\t\tconst isRowSelectable = this.isSingleSelect || this.isMultiSelect;\n\t\tconst ariaLabel = this.cells.map((cell, index) => {\n\t\t\tconst columText = this.getColumnTextByIdx(index);\n\t\t\tconst cellText = cell.cellContent.length ? this.getCellText(cell) : cell.ariaLabelEmptyCellText;\n\t\t\treturn `${columText} ${cellText}`;\n\t\t}).join(\" \");\n\n\t\tif (isRowSelectable) {\n\t\t\treturn `${ariaLabel}. ${this.forcedAriaPosition}. ${isSelected}`;\n\t\t}\n\n\t\treturn `${ariaLabel}. ${this.forcedAriaPosition}`;\n\t}\n\n\tget ariaLabelRowSelection() {\n\t\treturn TableRow.i18nBundle.getText(ARIA_LABEL_ROW_SELECTION);\n\t}\n\n\tget isSingleSelect() {\n\t\treturn this.mode === TableMode.SingleSelect;\n\t}\n\n\tget isMultiSelect() {\n\t\treturn this.mode === TableMode.MultiSelect;\n\t}\n\n\tget root() {\n\t\treturn this.shadowRoot!.querySelector<HTMLElement>(\".ui5-table-row-root\")!;\n\t}\n\n\tgetCellText(cell: TableCell): string {\n\t\tconst cellTextContent = cell.textContent;\n\n\t\treturn cellTextContent ? this.getNormilzedTextContent(cellTextContent) : \"\";\n\t}\n\n\tgetColumnTextByIdx(index: number): string {\n\t\tconst columnInfo: TableColumnInfo | undefined = this._columnsInfo?.[index];\n\n\t\tif (!columnInfo) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\treturn columnInfo.text ? this.getNormilzedTextContent(columnInfo.text) : \"\";\n\t}\n\n\tgetNormilzedTextContent(textContent: string): string {\n\t\treturn textContent.replace(/[\\n\\r\\t]/g, \"\").trim();\n\t}\n}\n\nTableRow.define();\n\nexport default TableRow;\n\nexport type {\n\tTableRowClickEventDetail,\n\tTableRowSelectionRequestedEventDetail,\n\tTableRowForwardBeforeEventDetail,\n\tTableRowForwardAfterEventDetail,\n\tTableRowF7PressEventDetail,\n};\n"]}
@@ -0,0 +1,2 @@
1
+ import type TableRow from "./TableRow.js";
2
+ export default function TableRowTemplate(this: TableRow): import("@ui5/webcomponents-base/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "@ui5/webcomponents-base/jsx-runtime";
2
+ import CheckBox from "@ui5/webcomponents/dist/CheckBox.js";
3
+ export default function TableRowTemplate() {
4
+ return (_jsxs(_Fragment, { children: [_jsxs("tr", { class: "ui5-table-row-root", tabindex: this.forcedTabIndex ? parseInt(this.forcedTabIndex) : undefined, onFocusIn: this._onfocusin, onFocusOut: this._onfocusout, onClick: this._onrowclick, onKeyDown: this._onkeydown, onKeyUp: this._onkeyup, onMouseUp: this._onmouseup, onTouchStart: this._ontouchstart, onTouchEnd: this._ontouchend, "aria-label": this.ariaLabelText, "aria-selected": this.selected, "aria-current": this._ariaCurrent, "data-sap-focus-ref": true, part: "row", children: [this.isMultiSelect &&
5
+ _jsx("td", { class: "ui5-table-multi-select-cell", "aria-hidden": "true", role: "presentation", children: _jsx(CheckBox, { class: "ui5-multi-select-checkbox", checked: this.selected, accessibleName: this.ariaLabelRowSelection, onChange: this._handleSelection, tabindex: -1 }) }), this.shouldPopin ?
6
+ _jsx(_Fragment, { children: this.visibleCells.map(cell => _jsx("slot", { name: cell._individualSlot })) })
7
+ :
8
+ _jsx(_Fragment, { children: this.cells.map(cell => _jsx("slot", { name: cell._individualSlot })) }), _jsx("td", { class: "ui5-table-row-navigated", "aria-hidden": "true", children: _jsx("div", { class: "ui5-table-div-navigated" }) })] }), this.shouldPopin && this.popinCells.map(cellData => _jsxs("tr", { part: "popin-row", class: cellData.classes, onClick: this._onrowclick, onKeyDown: this._onkeydown, onKeyUp: this._onkeyup, children: [_jsx("td", { colspan: this.visibleCellsCount, role: "cell", children: cellData.popinDisplayInline ?
9
+ _jsxs("div", { class: "ui5-table-display-inline-container", children: [cellData.popinText &&
10
+ _jsxs("span", { class: "ui5-table-row-popin-title", children: [cellData.popinText, ":"] }), _jsx("span", { class: "ui5-table-cell-display-inline", children: _jsx("slot", { name: cellData.cell?._individualSlot }) })] })
11
+ :
12
+ _jsxs(_Fragment, { children: [cellData.popinText &&
13
+ _jsxs("span", { class: "ui5-table-row-popin-title", children: [cellData.popinText, ":"] }), _jsx("div", { children: _jsx("slot", { name: cellData.cell?._individualSlot }) })] }) }), _jsx("td", { class: "ui5-table-row-navigated", "aria-hidden": "true", children: _jsx("div", { class: "ui5-table-div-navigated" }) })] }))] }));
14
+ }
15
+ //# sourceMappingURL=TableRowTemplate.js.map