@semcore/data-table 16.0.0-prerelease.2 → 16.0.0-prerelease.21

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 (152) hide show
  1. package/CHANGELOG.md +25 -1
  2. package/lib/cjs/components/Body/Body.js +439 -0
  3. package/lib/cjs/components/Body/Body.js.map +1 -0
  4. package/lib/cjs/components/Body/Body.types.js +2 -0
  5. package/lib/cjs/components/Body/Body.types.js.map +1 -0
  6. package/lib/cjs/components/Body/Cell.js +195 -0
  7. package/lib/cjs/components/Body/Cell.js.map +1 -0
  8. package/lib/cjs/components/Body/Cell.types.js +2 -0
  9. package/lib/cjs/components/Body/Cell.types.js.map +1 -0
  10. package/lib/cjs/components/Body/MergedCells.js +29 -0
  11. package/lib/cjs/components/Body/MergedCells.js.map +1 -0
  12. package/lib/cjs/components/Body/Row.js +252 -0
  13. package/lib/cjs/components/Body/Row.js.map +1 -0
  14. package/lib/cjs/components/Body/Row.types.js +4 -0
  15. package/lib/cjs/components/Body/Row.types.js.map +1 -0
  16. package/lib/cjs/components/Body/style.shadow.css +263 -0
  17. package/lib/cjs/components/DataTable/DataTable.js +1025 -0
  18. package/lib/cjs/components/DataTable/DataTable.js.map +1 -0
  19. package/lib/cjs/{types.js → components/DataTable/DataTable.types.js} +1 -1
  20. package/lib/cjs/components/DataTable/DataTable.types.js.map +1 -0
  21. package/lib/cjs/components/DataTable/dataTable.shadow.css +17 -0
  22. package/lib/cjs/components/Head/Column.js +311 -0
  23. package/lib/cjs/components/Head/Column.js.map +1 -0
  24. package/lib/cjs/components/Head/Column.types.js +2 -0
  25. package/lib/cjs/components/Head/Column.types.js.map +1 -0
  26. package/lib/cjs/components/Head/Group.js +116 -0
  27. package/lib/cjs/components/Head/Group.js.map +1 -0
  28. package/lib/cjs/components/Head/Group.type.js +2 -0
  29. package/lib/cjs/components/Head/Group.type.js.map +1 -0
  30. package/lib/cjs/components/Head/Head.js +207 -0
  31. package/lib/cjs/components/Head/Head.js.map +1 -0
  32. package/lib/cjs/components/Head/Head.types.js +2 -0
  33. package/lib/cjs/components/Head/Head.types.js.map +1 -0
  34. package/lib/cjs/components/Head/style.shadow.css +180 -0
  35. package/lib/cjs/index.js +25 -15
  36. package/lib/cjs/index.js.map +1 -1
  37. package/lib/cjs/style/scroll-shadows.shadow.css +45 -5
  38. package/lib/cjs/translations/en.json +6 -1
  39. package/lib/es6/components/Body/Body.js +432 -0
  40. package/lib/es6/components/Body/Body.js.map +1 -0
  41. package/lib/es6/components/Body/Body.types.js +2 -0
  42. package/lib/es6/components/Body/Body.types.js.map +1 -0
  43. package/lib/es6/components/Body/Cell.js +188 -0
  44. package/lib/es6/components/Body/Cell.js.map +1 -0
  45. package/lib/es6/components/Body/Cell.types.js +2 -0
  46. package/lib/es6/components/Body/Cell.types.js.map +1 -0
  47. package/lib/es6/components/Body/MergedCells.js +20 -0
  48. package/lib/es6/components/Body/MergedCells.js.map +1 -0
  49. package/lib/es6/components/Body/Row.js +245 -0
  50. package/lib/es6/components/Body/Row.js.map +1 -0
  51. package/lib/es6/components/Body/Row.types.js +2 -0
  52. package/lib/es6/components/Body/Row.types.js.map +1 -0
  53. package/lib/es6/components/Body/style.shadow.css +263 -0
  54. package/lib/es6/components/DataTable/DataTable.js +1013 -0
  55. package/lib/es6/components/DataTable/DataTable.js.map +1 -0
  56. package/lib/es6/components/DataTable/DataTable.types.js +2 -0
  57. package/lib/es6/components/DataTable/DataTable.types.js.map +1 -0
  58. package/lib/es6/components/DataTable/dataTable.shadow.css +17 -0
  59. package/lib/es6/components/Head/Column.js +304 -0
  60. package/lib/es6/components/Head/Column.js.map +1 -0
  61. package/lib/es6/components/Head/Column.types.js +2 -0
  62. package/lib/es6/components/Head/Column.types.js.map +1 -0
  63. package/lib/es6/components/Head/Group.js +109 -0
  64. package/lib/es6/components/Head/Group.js.map +1 -0
  65. package/lib/es6/components/Head/Group.type.js +2 -0
  66. package/lib/es6/components/Head/Group.type.js.map +1 -0
  67. package/lib/es6/components/Head/Head.js +201 -0
  68. package/lib/es6/components/Head/Head.js.map +1 -0
  69. package/lib/es6/components/Head/Head.types.js +2 -0
  70. package/lib/es6/components/Head/Head.types.js.map +1 -0
  71. package/lib/es6/components/Head/style.shadow.css +180 -0
  72. package/lib/es6/index.js +5 -2
  73. package/lib/es6/index.js.map +1 -1
  74. package/lib/es6/style/scroll-shadows.shadow.css +45 -5
  75. package/lib/es6/translations/en.json +6 -1
  76. package/lib/esm/components/Body/Body.mjs +394 -0
  77. package/lib/esm/components/Body/Cell.mjs +186 -0
  78. package/lib/esm/components/Body/MergedCells.mjs +23 -0
  79. package/lib/esm/components/Body/Row.mjs +224 -0
  80. package/lib/esm/components/Body/style.shadow.css +263 -0
  81. package/lib/esm/components/DataTable/DataTable.mjs +944 -0
  82. package/lib/esm/components/DataTable/dataTable.shadow.css +17 -0
  83. package/lib/esm/components/Head/Column.mjs +296 -0
  84. package/lib/esm/components/Head/Group.mjs +103 -0
  85. package/lib/esm/components/Head/Head.mjs +181 -0
  86. package/lib/esm/components/Head/style.shadow.css +180 -0
  87. package/lib/esm/index.mjs +9 -6
  88. package/lib/esm/style/scroll-shadows.shadow.css +47 -0
  89. package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +30 -30
  90. package/lib/esm/translations/de.json.mjs +5 -4
  91. package/lib/esm/translations/en.json.mjs +10 -4
  92. package/lib/esm/translations/es.json.mjs +5 -4
  93. package/lib/esm/translations/fr.json.mjs +5 -4
  94. package/lib/esm/translations/it.json.mjs +5 -4
  95. package/lib/esm/translations/ja.json.mjs +5 -4
  96. package/lib/esm/translations/ko.json.mjs +5 -4
  97. package/lib/esm/translations/nl.json.mjs +5 -4
  98. package/lib/esm/translations/pl.json.mjs +5 -4
  99. package/lib/esm/translations/pt.json.mjs +5 -4
  100. package/lib/esm/translations/sv.json.mjs +5 -4
  101. package/lib/esm/translations/tr.json.mjs +5 -4
  102. package/lib/esm/translations/vi.json.mjs +5 -4
  103. package/lib/esm/translations/zh.json.mjs +5 -4
  104. package/lib/types/components/Body/Body.d.ts +8 -0
  105. package/lib/types/components/Body/Body.types.d.ts +57 -0
  106. package/lib/types/components/Body/Cell.d.ts +3 -0
  107. package/lib/types/components/Body/Cell.types.d.ts +20 -0
  108. package/lib/types/components/Body/MergedCells.d.ts +14 -0
  109. package/lib/types/components/Body/Row.d.ts +3 -0
  110. package/lib/types/components/Body/Row.types.d.ts +43 -0
  111. package/lib/types/components/DataTable/DataTable.d.ts +13 -0
  112. package/lib/types/components/DataTable/DataTable.types.d.ts +125 -0
  113. package/lib/types/components/Head/Column.d.ts +30 -0
  114. package/lib/types/components/Head/Column.types.d.ts +71 -0
  115. package/lib/types/components/Head/Group.d.ts +15 -0
  116. package/lib/types/components/Head/Group.type.d.ts +16 -0
  117. package/lib/types/components/Head/Head.d.ts +98 -0
  118. package/lib/types/components/Head/Head.types.d.ts +40 -0
  119. package/lib/types/index.d.ts +10 -2
  120. package/lib/types/translations/__intergalactic-dynamic-locales.d.ts +5 -0
  121. package/package.json +11 -6
  122. package/vite.config.ts +0 -3
  123. package/lib/cjs/Body.js +0 -475
  124. package/lib/cjs/Body.js.map +0 -1
  125. package/lib/cjs/DataTable.js +0 -622
  126. package/lib/cjs/DataTable.js.map +0 -1
  127. package/lib/cjs/Head.js +0 -399
  128. package/lib/cjs/Head.js.map +0 -1
  129. package/lib/cjs/style/data-table.shadow.css +0 -394
  130. package/lib/cjs/types.js.map +0 -1
  131. package/lib/cjs/utils.js +0 -57
  132. package/lib/cjs/utils.js.map +0 -1
  133. package/lib/es6/Body.js +0 -468
  134. package/lib/es6/Body.js.map +0 -1
  135. package/lib/es6/DataTable.js +0 -614
  136. package/lib/es6/DataTable.js.map +0 -1
  137. package/lib/es6/Head.js +0 -391
  138. package/lib/es6/Head.js.map +0 -1
  139. package/lib/es6/style/data-table.shadow.css +0 -394
  140. package/lib/es6/types.js +0 -2
  141. package/lib/es6/types.js.map +0 -1
  142. package/lib/es6/utils.js +0 -48
  143. package/lib/es6/utils.js.map +0 -1
  144. package/lib/esm/Body.mjs +0 -320
  145. package/lib/esm/DataTable.mjs +0 -439
  146. package/lib/esm/Head.mjs +0 -258
  147. package/lib/esm/utils.mjs +0 -37
  148. package/lib/types/Body.d.ts +0 -61
  149. package/lib/types/DataTable.d.ts +0 -205
  150. package/lib/types/Head.d.ts +0 -45
  151. package/lib/types/types.d.ts +0 -73
  152. package/lib/types/utils.d.ts +0 -4
@@ -0,0 +1,394 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
3
+ import _createClass from "@babel/runtime/helpers/esm/createClass";
4
+ import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
5
+ import _inherits from "@babel/runtime/helpers/esm/inherits";
6
+ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
7
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
8
+ import { sstyled, createComponent, assignProps, Component } from "@semcore/core";
9
+ import * as React from "react";
10
+ import { Box } from "@semcore/base-components";
11
+ import { Row } from "./Row.mjs";
12
+ import { Cell } from "./Cell.mjs";
13
+ import { MergedColumnsCell, MergedRowsCell } from "./MergedCells.mjs";
14
+ import { ROW_INDEX, UNIQ_ROW_KEY, ACCORDION } from "../DataTable/DataTable.mjs";
15
+ import ChevronRightM from "@semcore/icon/ChevronRight/m";
16
+ import { ButtonLink } from "@semcore/button";
17
+ import Spin from "@semcore/spin";
18
+ import { isInteractiveElement } from "@semcore/core/lib/utils/isInteractiveElement";
19
+ /*!__reshadow-styles__:"./style.shadow.css"*/
20
+ var style = (
21
+ /*__reshadow_css_start__*/
22
+ (sstyled.insert(
23
+ /*__inner_css_start__*/
24
+ '.___SBody_1sflu_gg_,.___SRowGroup_1sflu_gg_,.___SRow_1sflu_gg_{display:contents}.___SBody_1sflu_gg_.__compact_1sflu_gg_ .___SCell_1sflu_gg_{padding:var(--intergalactic-spacing-3x, 12px) var(--intergalactic-spacing-2x, 8px)}.___SBody_1sflu_gg_.__compact_1sflu_gg_ .___SCell_1sflu_gg_[data-aria-level]{padding-left:calc(var(--intergalactic-spacing-2x, 8px) + (var(--intergalactic-spacing-5x, 20px)*(var(--data-aria-level_1sflu) - 1)))}.___SCell_1sflu_gg_.__gridArea_1sflu_gg_,.___SCollapseRow_1sflu_gg_.__gridArea_1sflu_gg_,.___SRow_1sflu_gg_.__gridArea_1sflu_gg_{grid-area:var(--gridArea_1sflu)}.___SCollapseRow_1sflu_gg_ .___SCell_1sflu_gg_{display:block}.___SRow_1sflu_gg_.__active_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_.__expanded_1sflu_gg_._accordionType_cell_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_).__withAccordion_1sflu_gg_,.___SRow_1sflu_gg_.__expanded_1sflu_gg_._accordionType_row_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-active, #e6e7ed)}.___SCollapseRow_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_.__expanded_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-accordion, #f4f5f9)}@media (hover:hover){.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_._theme_muted_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]._theme_muted_1sflu_gg_,.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_._theme_muted_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_._theme_muted_1sflu_gg_,.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_._theme_muted_1sflu_gg_:hover>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_:hover>.___SCell_1sflu_gg_._theme_muted_1sflu_gg_,.___SRow_1sflu_gg_:hover>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-hover, #f0f0f4)}.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_._theme_info_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]._theme_info_1sflu_gg_,.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_._theme_info_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_._theme_info_1sflu_gg_,.___SRow_1sflu_gg_._theme_info_1sflu_gg_:hover>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_:hover>.___SCell_1sflu_gg_._theme_info_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-selected-hover, #c4e5fe)}.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_._theme_success_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]._theme_success_1sflu_gg_,.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_._theme_success_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_._theme_success_1sflu_gg_,.___SRow_1sflu_gg_._theme_success_1sflu_gg_:hover>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_:hover>.___SCell_1sflu_gg_._theme_success_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-new-hover, #9ef2c9)}.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_._theme_warning_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]._theme_warning_1sflu_gg_,.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_._theme_warning_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_._theme_warning_1sflu_gg_,.___SRow_1sflu_gg_._theme_warning_1sflu_gg_:hover>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_:hover>.___SCell_1sflu_gg_._theme_warning_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-warning-hover, #ffdca2)}.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_._theme_danger_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]._theme_danger_1sflu_gg_,.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_._theme_danger_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_._theme_danger_1sflu_gg_,.___SRow_1sflu_gg_._theme_danger_1sflu_gg_:hover>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_:hover>.___SCell_1sflu_gg_._theme_danger_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-critical-hover, #ffd7df)}}.___SRow_1sflu_gg_._theme_muted_1sflu_gg_ .___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-unread, #f4f5f9)}.___SRow_1sflu_gg_._theme_muted_1sflu_gg_.__active_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-active, #e6e7ed)}.___SRow_1sflu_gg_._theme_info_1sflu_gg_ .___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-selected, #e9f7ff)}.___SRow_1sflu_gg_._theme_info_1sflu_gg_.__active_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-selected-active, #c4e5fe)}.___SRow_1sflu_gg_._theme_success_1sflu_gg_ .___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-new, #dbfee8)}.___SRow_1sflu_gg_._theme_success_1sflu_gg_.__active_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-new-active, #9ef2c9)}.___SRow_1sflu_gg_._theme_warning_1sflu_gg_ .___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-warning, #fff3d9)}.___SRow_1sflu_gg_._theme_warning_1sflu_gg_.__active_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-warning-active, #ffdca2)}.___SRow_1sflu_gg_._theme_danger_1sflu_gg_ .___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-critical, #fff0f7)}.___SRow_1sflu_gg_._theme_danger_1sflu_gg_.__active_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-critical-active, #ffd7df)}.___SCell_1sflu_gg_{display:flex;height:100%;font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);color:var(--intergalactic-text-primary, #191b23);box-sizing:border-box;border-bottom:1px solid var(--intergalactic-border-secondary, #e0e1e9);overflow:hidden;white-space:pre-wrap;word-break:break-word;font-feature-settings:"tnum";font-variant-numeric:tabular-nums;transition:width calc(var(--intergalactic-duration-extra-fast, 100)*1ms) ease-in-out;outline:0}.___SCell_1sflu_gg_ .___SAccordionToggle_1sflu_gg_{margin-right:var(--intergalactic-spacing-3x, 12px);margin-top:var(--intergalactic-spacing-05x, 2px);height:-moz-fit-content;height:fit-content}.___SCell_1sflu_gg_ .___SAccordionToggle_1sflu_gg_ svg{transition:transform calc(var(--intergalactic-duration-accordion, 200)*1ms) ease-out}.___SCell_1sflu_gg_ .___SAccordionToggle_1sflu_gg_.__expanded_1sflu_gg_ svg{transform:rotate(90deg)}.___SCheckboxCell_1sflu_gg_,.___SRow_1sflu_gg_._accordionType_cell_1sflu_gg_>.___SCell_1sflu_gg_.__withAccordion_1sflu_gg_,.___SRow_1sflu_gg_._accordionType_row_1sflu_gg_>.___SCell_1sflu_gg_{cursor:pointer}.___SCell_1sflu_gg_._use_primary_1sflu_gg_{padding:var(--intergalactic-spacing-3x, 12px);min-height:45px;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SCell_1sflu_gg_._use_primary_1sflu_gg_[data-aria-level]{padding-left:calc(var(--intergalactic-spacing-3x, 12px) + ((var(--intergalactic-spacing-5x, 20px) + var(--intergalactic-spacing-2x, 8px))*(var(--data-aria-level_1sflu) - 1)))}.___SCell_1sflu_gg_._use_secondary_1sflu_gg_{padding:var(--intergalactic-spacing-2x, 8px);min-height:37px;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SCell_1sflu_gg_._use_secondary_1sflu_gg_[data-aria-level]{padding-left:calc(var(--intergalactic-spacing-2x, 8px) + ((var(--intergalactic-spacing-5x, 20px) + var(--intergalactic-spacing-2x, 8px))*(var(--data-aria-level_1sflu) - 1)))}.___SCell_1sflu_gg_._borders_both_1sflu_gg_,.___SCell_1sflu_gg_._borders_left_1sflu_gg_{border-left:1px solid var(--intergalactic-border-secondary, #e0e1e9)}.___SCell_1sflu_gg_._borders_both_1sflu_gg_,.___SCell_1sflu_gg_._borders_right_1sflu_gg_{border-right:1px solid var(--intergalactic-border-secondary, #e0e1e9)}.___SCell_1sflu_gg_.__fixed_1sflu_gg_{position:sticky;z-index:2}.___SCell_1sflu_gg_._theme_muted_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-unread, #f4f5f9)}.___SCell_1sflu_gg_._theme_info_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-selected, #e9f7ff)}.___SCell_1sflu_gg_._theme_success_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-new, #dbfee8)}.___SCell_1sflu_gg_._theme_warning_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-warning, #fff3d9)}.___SCell_1sflu_gg_._theme_danger_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-critical, #fff0f7)}.___SSpinContainer_1sflu_gg_{position:absolute;left:0;right:0;bottom:0;top:0;display:flex;align-items:center;justify-content:center;background-color:var(--intergalactic-overlay-limitation-secondary, rgba(255, 255, 255, 0.85))}.___SSpinContainer_1sflu_gg_.__headerHeight_1sflu_gg_{top:var(--headerHeight_1sflu)}.___SEmptyData_1sflu_gg_{grid-column:1/-1}.___SRow_1sflu_gg_._sideIndents_wide_1sflu_gg_ .___SCell_1sflu_gg_:first-child{padding-left:var(--intergalactic-spacing-5x, 20px)}.___SRow_1sflu_gg_._sideIndents_wide_1sflu_gg_ .___SCell_1sflu_gg_:last-child{padding-right:var(--intergalactic-spacing-5x, 20px)}',
25
+ /*__inner_css_end__*/
26
+ "1sflu_gg_"
27
+ ), /*__reshadow_css_end__*/
28
+ {
29
+ "__SBody": "___SBody_1sflu_gg_",
30
+ "__SRow": "___SRow_1sflu_gg_",
31
+ "__SRowGroup": "___SRowGroup_1sflu_gg_",
32
+ "_gridArea": "__gridArea_1sflu_gg_",
33
+ "__SCell": "___SCell_1sflu_gg_",
34
+ "__SCollapseRow": "___SCollapseRow_1sflu_gg_",
35
+ "--gridArea": "--gridArea_1sflu",
36
+ "_active": "__active_1sflu_gg_",
37
+ "_theme": "__theme_1sflu_gg_",
38
+ "_expanded": "__expanded_1sflu_gg_",
39
+ "_accordionType_row": "_accordionType_row_1sflu_gg_",
40
+ "_accordionType_cell": "_accordionType_cell_1sflu_gg_",
41
+ "_withAccordion": "__withAccordion_1sflu_gg_",
42
+ "_theme_muted": "_theme_muted_1sflu_gg_",
43
+ "_theme_info": "_theme_info_1sflu_gg_",
44
+ "_theme_success": "_theme_success_1sflu_gg_",
45
+ "_theme_warning": "_theme_warning_1sflu_gg_",
46
+ "_theme_danger": "_theme_danger_1sflu_gg_",
47
+ "__SCheckboxCell": "___SCheckboxCell_1sflu_gg_",
48
+ "_borders_both": "_borders_both_1sflu_gg_",
49
+ "_borders_left": "_borders_left_1sflu_gg_",
50
+ "_borders_right": "_borders_right_1sflu_gg_",
51
+ "_fixed": "__fixed_1sflu_gg_",
52
+ "__SSpinContainer": "___SSpinContainer_1sflu_gg_",
53
+ "_headerHeight": "__headerHeight_1sflu_gg_",
54
+ "--headerHeight": "--headerHeight_1sflu",
55
+ "__SEmptyData": "___SEmptyData_1sflu_gg_",
56
+ "_compact": "__compact_1sflu_gg_",
57
+ "--data-aria-level": "--data-aria-level_1sflu",
58
+ "__SAccordionToggle": "___SAccordionToggle_1sflu_gg_",
59
+ "_use_primary": "_use_primary_1sflu_gg_",
60
+ "_use_secondary": "_use_secondary_1sflu_gg_",
61
+ "_sideIndents_wide": "_sideIndents_wide_1sflu_gg_"
62
+ })
63
+ );
64
+ var ROWS_BUFFER = 20;
65
+ var APROX_ROWS_ON_PAGE = 20;
66
+ var BodyRoot = /* @__PURE__ */ function(_Component) {
67
+ _inherits(BodyRoot2, _Component);
68
+ var _super = _createSuper(BodyRoot2);
69
+ function BodyRoot2() {
70
+ var _this;
71
+ _classCallCheck(this, BodyRoot2);
72
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
73
+ args[_key] = arguments[_key];
74
+ }
75
+ _this = _super.call.apply(_super, [this].concat(args));
76
+ _defineProperty(_assertThisInitialized(_this), "rowsHeightMap", /* @__PURE__ */ new Map());
77
+ _defineProperty(_assertThisInitialized(_this), "indexForDownIterate", 0);
78
+ _defineProperty(_assertThisInitialized(_this), "indexForUpIterate", 0);
79
+ _defineProperty(_assertThisInitialized(_this), "handleRef", function(index, row) {
80
+ return function(node) {
81
+ if (!_this.rowsHeightMap.has(index) && node) {
82
+ _this.rowsHeightMap.set(index, [0, 0, node]);
83
+ _this.setRowHeight(index, row);
84
+ }
85
+ };
86
+ });
87
+ _defineProperty(_assertThisInitialized(_this), "handleExpandRow", function(row, index) {
88
+ setTimeout(function() {
89
+ _this.setRowHeight(index, row);
90
+ for (var i = index; i < _this.rowsHeightMap.size; i++) {
91
+ _this.setRowHeight(i, row);
92
+ }
93
+ }, 300);
94
+ _this.asProps.onExpandRow(row);
95
+ });
96
+ _defineProperty(_assertThisInitialized(_this), "handleClickRow", function(row, index) {
97
+ return function(e) {
98
+ if (!isInteractiveElement(e.target)) {
99
+ _this.handleExpandRow(row, index);
100
+ }
101
+ };
102
+ });
103
+ _defineProperty(_assertThisInitialized(_this), "handleClickCell", function(row, index) {
104
+ return function(e) {
105
+ if (!isInteractiveElement(e.target)) {
106
+ _this.handleExpandRow(row, index);
107
+ }
108
+ };
109
+ });
110
+ return _this;
111
+ }
112
+ _createClass(BodyRoot2, [{
113
+ key: "getRowProps",
114
+ value: function getRowProps(props) {
115
+ var _this$asProps = this.asProps, use = _this$asProps.use, gridTemplateAreas = _this$asProps.gridTemplateAreas, gridTemplateColumns = _this$asProps.gridTemplateColumns, expandedRows = _this$asProps.expandedRows, columns = _this$asProps.columns, onExpandRow = _this$asProps.onExpandRow, loading = _this$asProps.loading, hasGroups = _this$asProps.hasGroups, scrollAreaRef = _this$asProps.scrollAreaRef, uid = _this$asProps.uid, onBackFromAccordion = _this$asProps.onBackFromAccordion, rowProps = _this$asProps.rowProps, rows = _this$asProps.rows, flatRows = _this$asProps.flatRows, sideIndents = _this$asProps.sideIndents, selectedRows = _this$asProps.selectedRows, onSelectRow = _this$asProps.onSelectRow, getFixedStyle = _this$asProps.getFixedStyle;
116
+ var row = props.row;
117
+ var index = row[ROW_INDEX];
118
+ var rowIndex = Array.from(expandedRows !== null && expandedRows !== void 0 ? expandedRows : []).reduce(function(acc, item) {
119
+ var rowIndex2 = flatRows.findIndex(function(row2) {
120
+ return row2[UNIQ_ROW_KEY] === item;
121
+ });
122
+ if (rowIndex2 < index) {
123
+ var _flatRows$rowIndex;
124
+ var expandedRow = (_flatRows$rowIndex = flatRows[rowIndex2]) === null || _flatRows$rowIndex === void 0 ? void 0 : _flatRows$rowIndex[ACCORDION];
125
+ if (Array.isArray(expandedRow)) {
126
+ acc = acc + expandedRow.length;
127
+ } else {
128
+ acc = acc + 1;
129
+ }
130
+ }
131
+ return acc;
132
+ }, index);
133
+ var gridRowIndex = rowIndex + (hasGroups ? 3 : 2);
134
+ var ariaRowIndex = rowIndex + 2;
135
+ var accordionDataGridArea = Array.isArray(row[ACCORDION]) ? "".concat(gridRowIndex + 1, " / 1 / ").concat(gridRowIndex + 1 + row[ACCORDION].length, " / ").concat(columns.length + 1) : "".concat(gridRowIndex + 1, " / 1 / ").concat(gridRowIndex + 1, " / ").concat(columns.length + 1);
136
+ return _objectSpread(_objectSpread({
137
+ onClick: row[ACCORDION] ? this.handleClickRow(row, index) : void 0
138
+ }, rowProps === null || rowProps === void 0 ? void 0 : rowProps(row, index)), {}, {
139
+ use,
140
+ uid,
141
+ gridTemplateAreas,
142
+ gridTemplateColumns,
143
+ expanded: expandedRows === null || expandedRows === void 0 ? void 0 : expandedRows.has(row[UNIQ_ROW_KEY]),
144
+ accordionDataGridArea,
145
+ columns,
146
+ rowIndex: index,
147
+ ariaRowIndex,
148
+ gridRowIndex,
149
+ rows,
150
+ onBackFromAccordion,
151
+ row,
152
+ expandedRows,
153
+ onExpandRow,
154
+ selectedRows,
155
+ onSelectRow,
156
+ inert: loading ? "" : void 0,
157
+ scrollAreaRef,
158
+ sideIndents,
159
+ getFixedStyle
160
+ });
161
+ }
162
+ }, {
163
+ key: "getCellProps",
164
+ value: function getCellProps(props) {
165
+ var _props$children, _value3, _this2 = this, _value4;
166
+ var _this$asProps2 = this.asProps, use = _this$asProps2.use, renderCell = _this$asProps2.renderCell, expandedRows = _this$asProps2.expandedRows, styles = _this$asProps2.styles, getI18nText = _this$asProps2.getI18nText, virtualScroll = _this$asProps2.virtualScroll, tableRef = _this$asProps2.tableRef;
167
+ var SAccordionToggle = ButtonLink;
168
+ var dataKey = props.column.name;
169
+ var cellValue = props.row[dataKey];
170
+ var value = void 0;
171
+ var isMergedRows = cellValue instanceof MergedRowsCell;
172
+ var isMergedColumns = cellValue instanceof MergedColumnsCell;
173
+ if (isMergedColumns || isMergedRows) {
174
+ value = cellValue.value;
175
+ if (isMergedColumns) {
176
+ dataKey = cellValue.dataKey;
177
+ }
178
+ } else {
179
+ value = cellValue;
180
+ }
181
+ var defaultRender = function defaultRender2() {
182
+ var _value;
183
+ return /* @__PURE__ */ React.isValidElement(value) ? value : (_value = value) === null || _value === void 0 ? void 0 : _value.toString();
184
+ };
185
+ var extraProps = {
186
+ use,
187
+ virtualScroll: Boolean(virtualScroll),
188
+ tableRef,
189
+ children: (_props$children = props.children) !== null && _props$children !== void 0 ? _props$children : defaultRender()
190
+ };
191
+ if (renderCell) {
192
+ var _value$toString, _value2;
193
+ var external = renderCell({
194
+ columnName: props.column.name,
195
+ row: props.row,
196
+ column: props.column,
197
+ rowIndex: props.rowIndex,
198
+ columnIndex: props.columnIndex,
199
+ dataKey,
200
+ defaultRender,
201
+ value: /* @__PURE__ */ React.isValidElement(value) ? value : (_value$toString = (_value2 = value) === null || _value2 === void 0 ? void 0 : _value2.toString()) !== null && _value$toString !== void 0 ? _value$toString : "",
202
+ isMergedRows,
203
+ isMergedColumns
204
+ });
205
+ if (this.isReactNode(external) || Array.isArray(external)) {
206
+ extraProps.children = external;
207
+ } else {
208
+ for (var key in external) {
209
+ extraProps[key] = external[key];
210
+ }
211
+ }
212
+ }
213
+ if (props.columnIndex === 0 && props.row[ACCORDION] || (_value3 = value) !== null && _value3 !== void 0 && _value3[ACCORDION]) {
214
+ var _ref2;
215
+ var expanded = expandedRows === null || expandedRows === void 0 ? void 0 : expandedRows.has(props.row[UNIQ_ROW_KEY]);
216
+ extraProps.children = (_ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(SAccordionToggle, _ref2.cn("SAccordionToggle", {
217
+ "aria-label": getI18nText("DataTable.Cell.AccordionToggle.expand:aria-label"),
218
+ "expanded": expanded,
219
+ "onClick": function onClick(e) {
220
+ e.stopPropagation();
221
+ _this2.handleExpandRow(props.row, props.rowIndex);
222
+ },
223
+ "color": "--intergalactic-icon-primary-neutral",
224
+ "aria-expanded": expanded,
225
+ "aria-describedby": props.id,
226
+ "aria-controls": props.accordionId
227
+ }), /* @__PURE__ */ React.createElement(SAccordionToggle.Addon, {
228
+ tag: ChevronRightM
229
+ })), extraProps.children));
230
+ }
231
+ if ((_value4 = value) !== null && _value4 !== void 0 && _value4[ACCORDION]) {
232
+ extraProps.onClick = this.handleClickCell(props.row, props.rowIndex);
233
+ }
234
+ return extraProps;
235
+ }
236
+ }, {
237
+ key: "render",
238
+ value: function render() {
239
+ var _ref = this.asProps, _ref3, _this$rowsHeightMap$g5, _this3 = this;
240
+ var SBody = Box;
241
+ var SRowGroup = Box;
242
+ var SSpinContainer = Box;
243
+ var _this$asProps3 = this.asProps, styles = _this$asProps3.styles, loading = _this$asProps3.loading, headerHeight = _this$asProps3.headerHeight, spinnerRef = _this$asProps3.spinnerRef, virtualScroll = _this$asProps3.virtualScroll, scrollDirection = _this$asProps3.scrollDirection, tableContainerRef = _this$asProps3.tableContainerRef, scrollTop = _this$asProps3.scrollTop, renderEmptyData = _this$asProps3.renderEmptyData, columns = _this$asProps3.columns, uid = _this$asProps3.uid, rows = _this$asProps3.rows;
244
+ var rowsToRender = rows;
245
+ var startIndex = -1;
246
+ var lastIndex = -1;
247
+ if (virtualScroll) {
248
+ var _virtualScroll$rowsBu, _tableContainerRef$cu, _tableContainerRef$cu2;
249
+ var rowsBuffer = typeof virtualScroll !== "boolean" && "rowsBuffer" in virtualScroll ? (_virtualScroll$rowsBu = virtualScroll.rowsBuffer) !== null && _virtualScroll$rowsBu !== void 0 ? _virtualScroll$rowsBu : ROWS_BUFFER : ROWS_BUFFER;
250
+ var offsetHeight = (_tableContainerRef$cu = (_tableContainerRef$cu2 = tableContainerRef.current) === null || _tableContainerRef$cu2 === void 0 ? void 0 : _tableContainerRef$cu2.offsetHeight) !== null && _tableContainerRef$cu !== void 0 ? _tableContainerRef$cu : 0;
251
+ var prevPrepared = scrollDirection === "up" ? rowsBuffer : 4;
252
+ var nextPrepared = scrollDirection === "up" ? 4 : rowsBuffer;
253
+ if (typeof virtualScroll === "boolean" || "aproxRowsOnPage" in virtualScroll) {
254
+ var _virtualScroll$aproxR;
255
+ var aproxRowsOnPage = typeof virtualScroll !== "boolean" ? (_virtualScroll$aproxR = virtualScroll.aproxRowsOnPage) !== null && _virtualScroll$aproxR !== void 0 ? _virtualScroll$aproxR : APROX_ROWS_ON_PAGE : APROX_ROWS_ON_PAGE;
256
+ if (scrollDirection === "down") {
257
+ var _this$rowsHeightMap$g, _this$rowsHeightMap$g2, _lastIndex;
258
+ for (var i = this.indexForDownIterate; i < this.rowsHeightMap.size - 1; i++) {
259
+ var value = this.rowsHeightMap.get(i);
260
+ if (!value) continue;
261
+ var key = i;
262
+ var valueFromToCompare = value[1];
263
+ var valueToToCompare = value[0];
264
+ if (startIndex === -1 && scrollTop < valueFromToCompare) {
265
+ startIndex = Math.max(key - prevPrepared, 0);
266
+ }
267
+ if (startIndex !== -1 && scrollTop + offsetHeight < valueToToCompare) {
268
+ lastIndex = Math.min(key + nextPrepared, rows.length);
269
+ }
270
+ if (startIndex !== -1 && lastIndex !== -1) {
271
+ break;
272
+ }
273
+ }
274
+ if (scrollTop + offsetHeight < ((_this$rowsHeightMap$g = (_this$rowsHeightMap$g2 = this.rowsHeightMap.get((_lastIndex = lastIndex) !== null && _lastIndex !== void 0 ? _lastIndex : 0)) === null || _this$rowsHeightMap$g2 === void 0 ? void 0 : _this$rowsHeightMap$g2[1]) !== null && _this$rowsHeightMap$g !== void 0 ? _this$rowsHeightMap$g : 0)) {
275
+ lastIndex = lastIndex + aproxRowsOnPage;
276
+ }
277
+ } else if (scrollDirection === "up") {
278
+ var _this$rowsHeightMap$g3, _this$rowsHeightMap$g4, _startIndex;
279
+ for (var _i = this.indexForUpIterate; _i >= 0; _i--) {
280
+ var _value5 = this.rowsHeightMap.get(_i);
281
+ if (!_value5) continue;
282
+ var _key2 = _i;
283
+ var _valueFromToCompare = _value5[1];
284
+ var _valueToToCompare = _value5[0];
285
+ if (lastIndex === -1 && scrollTop + offsetHeight > _valueToToCompare) {
286
+ lastIndex = Math.min(_key2 + nextPrepared, rows.length);
287
+ }
288
+ if (lastIndex !== -1 && scrollTop < _valueFromToCompare) {
289
+ startIndex = Math.max(_key2 - prevPrepared, 0);
290
+ }
291
+ if (startIndex !== -1 && lastIndex !== -1) {
292
+ break;
293
+ }
294
+ }
295
+ if (scrollTop < ((_this$rowsHeightMap$g3 = (_this$rowsHeightMap$g4 = this.rowsHeightMap.get((_startIndex = startIndex) !== null && _startIndex !== void 0 ? _startIndex : 0)) === null || _this$rowsHeightMap$g4 === void 0 ? void 0 : _this$rowsHeightMap$g4[0]) !== null && _this$rowsHeightMap$g3 !== void 0 ? _this$rowsHeightMap$g3 : 0)) {
296
+ startIndex = Math.max(startIndex - aproxRowsOnPage, 0);
297
+ }
298
+ }
299
+ if (startIndex === -1) {
300
+ startIndex = scrollTop === 0 ? 0 : Math.max(rows.length - aproxRowsOnPage, 0);
301
+ }
302
+ if (lastIndex === -1) {
303
+ lastIndex = scrollTop === 0 ? aproxRowsOnPage : rows.length;
304
+ }
305
+ this.indexForDownIterate = startIndex;
306
+ this.indexForUpIterate = lastIndex;
307
+ rowsToRender = rows.slice(startIndex, lastIndex);
308
+ } else if ("rowHeight" in virtualScroll) {
309
+ var rowHeight = virtualScroll.rowHeight;
310
+ startIndex = Math.max(Math.floor(scrollTop / rowHeight) - prevPrepared, 0);
311
+ var _lastIndex2 = Math.min(Math.ceil((scrollTop + offsetHeight) / rowHeight) + nextPrepared, rows.length);
312
+ rowsToRender = rows.slice(startIndex, _lastIndex2);
313
+ }
314
+ }
315
+ startIndex = startIndex === -1 ? 0 : startIndex;
316
+ var rowMarginTop = (_this$rowsHeightMap$g5 = this.rowsHeightMap.get(startIndex - 1)) === null || _this$rowsHeightMap$g5 === void 0 ? void 0 : _this$rowsHeightMap$g5[1];
317
+ var emptyRow = null;
318
+ if (rowsToRender.length === 0) {
319
+ var _emptyRow;
320
+ emptyRow = (_emptyRow = {}, _defineProperty(_emptyRow, UNIQ_ROW_KEY, "".concat(uid, "_empty_data")), _defineProperty(_emptyRow, ROW_INDEX, 0), _defineProperty(_emptyRow, columns[0].name, new MergedColumnsCell(renderEmptyData(), {
321
+ dataKey: columns[0].name,
322
+ size: columns.length
323
+ })), _emptyRow);
324
+ }
325
+ return _ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(SBody, _ref3.cn("SBody", _objectSpread({}, assignProps({
326
+ "__excludeProps": ["data"]
327
+ }, _ref))), emptyRow && /* @__PURE__ */ React.createElement(Body.Row, {
328
+ row: emptyRow,
329
+ offset: 0
330
+ }), typeof virtualScroll === "boolean" && rowMarginTop && /* @__PURE__ */ React.createElement(Box, _ref3.cn("Box", {
331
+ "h": rowMarginTop
332
+ })), rowsToRender.map(function(row, index) {
333
+ if (Array.isArray(row)) {
334
+ var _ref4;
335
+ return _ref4 = sstyled(styles), /* @__PURE__ */ React.createElement(SRowGroup, _ref4.cn("SRowGroup", {
336
+ "role": "rowgroup",
337
+ "key": "gg_".concat(row[0][UNIQ_ROW_KEY]),
338
+ "ref": _this3.handleRef(startIndex + index, row[0])
339
+ }), row.map(function(item, i2) {
340
+ return /* @__PURE__ */ React.createElement(Body.Row, {
341
+ key: item[UNIQ_ROW_KEY],
342
+ row: item
343
+ });
344
+ }));
345
+ }
346
+ return /* @__PURE__ */ React.createElement(Body.Row, {
347
+ key: row[UNIQ_ROW_KEY],
348
+ row,
349
+ ref: virtualScroll ? _this3.handleRef(startIndex + index, row) : void 0
350
+ });
351
+ }), loading && /* @__PURE__ */ React.createElement(SSpinContainer, _ref3.cn("SSpinContainer", {
352
+ "innerOutline": true,
353
+ "headerHeight": "".concat(headerHeight, "px"),
354
+ "tabIndex": -1,
355
+ "ref": spinnerRef,
356
+ "role": "row"
357
+ }), /* @__PURE__ */ React.createElement(Spin, _ref3.cn("Spin", {
358
+ "size": "xxl",
359
+ "role": "gridcell"
360
+ }))));
361
+ }
362
+ }, {
363
+ key: "isReactNode",
364
+ value: function isReactNode(obj) {
365
+ return typeof obj === "string" || typeof obj === "number" || /* @__PURE__ */ React.isValidElement(obj) || typeof obj === "boolean" || obj === void 0 || obj === null;
366
+ }
367
+ }, {
368
+ key: "setRowHeight",
369
+ value: function setRowHeight(index, row) {
370
+ var _this$rowsHeightMap$g6, _node$children$item;
371
+ var expandedRows = this.asProps.expandedRows;
372
+ var node = (_this$rowsHeightMap$g6 = this.rowsHeightMap.get(index)) === null || _this$rowsHeightMap$g6 === void 0 ? void 0 : _this$rowsHeightMap$g6[2];
373
+ var firstChild = (node === null || node === void 0 ? void 0 : node.role) === "rowgroup" ? node === null || node === void 0 ? void 0 : (_node$children$item = node.children.item(0)) === null || _node$children$item === void 0 ? void 0 : _node$children$item.children.item(0) : node === null || node === void 0 ? void 0 : node.children.item(0);
374
+ if (node && firstChild instanceof HTMLElement) {
375
+ var offset = firstChild.offsetTop - this.asProps.headerHeight;
376
+ var height = firstChild.getBoundingClientRect().height;
377
+ if (expandedRows.has(row[UNIQ_ROW_KEY]) && node.nextSibling instanceof HTMLElement) {
378
+ height = height + node.nextSibling.getBoundingClientRect().height;
379
+ }
380
+ this.rowsHeightMap.set(index, [offset, offset + height, node]);
381
+ }
382
+ }
383
+ }]);
384
+ return BodyRoot2;
385
+ }(Component);
386
+ _defineProperty(BodyRoot, "displayName", "Body");
387
+ _defineProperty(BodyRoot, "style", style);
388
+ var Body = createComponent(BodyRoot, {
389
+ Row,
390
+ Cell
391
+ });
392
+ export {
393
+ Body
394
+ };
@@ -0,0 +1,186 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
3
+ import _createClass from "@babel/runtime/helpers/esm/createClass";
4
+ import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
5
+ import _inherits from "@babel/runtime/helpers/esm/inherits";
6
+ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
7
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
8
+ import { sstyled, createComponent, assignProps, Component } from "@semcore/core";
9
+ import * as React from "react";
10
+ import { Flex } from "@semcore/base-components";
11
+ import { getFocusableIn } from "@semcore/core/lib/utils/focus-lock/getFocusableIn";
12
+ import { MergedColumnsCell, MergedRowsCell } from "./MergedCells.mjs";
13
+ import { isFocusInside } from "@semcore/core/lib/utils/focus-lock/isFocusInside";
14
+ /*!__reshadow-styles__:"./style.shadow.css"*/
15
+ var style = (
16
+ /*__reshadow_css_start__*/
17
+ (sstyled.insert(
18
+ /*__inner_css_start__*/
19
+ '.___SBody_1sflu_gg_,.___SRowGroup_1sflu_gg_,.___SRow_1sflu_gg_{display:contents}.___SBody_1sflu_gg_.__compact_1sflu_gg_ .___SCell_1sflu_gg_{padding:var(--intergalactic-spacing-3x, 12px) var(--intergalactic-spacing-2x, 8px)}.___SBody_1sflu_gg_.__compact_1sflu_gg_ .___SCell_1sflu_gg_[data-aria-level]{padding-left:calc(var(--intergalactic-spacing-2x, 8px) + (var(--intergalactic-spacing-5x, 20px)*(var(--data-aria-level_1sflu) - 1)))}.___SCell_1sflu_gg_.__gridArea_1sflu_gg_,.___SCollapseRow_1sflu_gg_.__gridArea_1sflu_gg_,.___SRow_1sflu_gg_.__gridArea_1sflu_gg_{grid-area:var(--gridArea_1sflu)}.___SCollapseRow_1sflu_gg_ .___SCell_1sflu_gg_{display:block}.___SRow_1sflu_gg_.__active_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_.__expanded_1sflu_gg_._accordionType_cell_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_).__withAccordion_1sflu_gg_,.___SRow_1sflu_gg_.__expanded_1sflu_gg_._accordionType_row_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-active, #e6e7ed)}.___SCollapseRow_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_.__expanded_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-accordion, #f4f5f9)}@media (hover:hover){.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_._theme_muted_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]._theme_muted_1sflu_gg_,.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_._theme_muted_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_._theme_muted_1sflu_gg_,.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_._theme_muted_1sflu_gg_:hover>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_:hover>.___SCell_1sflu_gg_._theme_muted_1sflu_gg_,.___SRow_1sflu_gg_:hover>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-hover, #f0f0f4)}.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_._theme_info_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]._theme_info_1sflu_gg_,.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_._theme_info_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_._theme_info_1sflu_gg_,.___SRow_1sflu_gg_._theme_info_1sflu_gg_:hover>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_:hover>.___SCell_1sflu_gg_._theme_info_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-selected-hover, #c4e5fe)}.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_._theme_success_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]._theme_success_1sflu_gg_,.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_._theme_success_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_._theme_success_1sflu_gg_,.___SRow_1sflu_gg_._theme_success_1sflu_gg_:hover>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_:hover>.___SCell_1sflu_gg_._theme_success_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-new-hover, #9ef2c9)}.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_._theme_warning_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]._theme_warning_1sflu_gg_,.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_._theme_warning_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_._theme_warning_1sflu_gg_,.___SRow_1sflu_gg_._theme_warning_1sflu_gg_:hover>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_:hover>.___SCell_1sflu_gg_._theme_warning_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-warning-hover, #ffdca2)}.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_._theme_danger_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]._theme_danger_1sflu_gg_,.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_._theme_danger_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_._theme_danger_1sflu_gg_,.___SRow_1sflu_gg_._theme_danger_1sflu_gg_:hover>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_:hover>.___SCell_1sflu_gg_._theme_danger_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-critical-hover, #ffd7df)}}.___SRow_1sflu_gg_._theme_muted_1sflu_gg_ .___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-unread, #f4f5f9)}.___SRow_1sflu_gg_._theme_muted_1sflu_gg_.__active_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-active, #e6e7ed)}.___SRow_1sflu_gg_._theme_info_1sflu_gg_ .___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-selected, #e9f7ff)}.___SRow_1sflu_gg_._theme_info_1sflu_gg_.__active_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-selected-active, #c4e5fe)}.___SRow_1sflu_gg_._theme_success_1sflu_gg_ .___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-new, #dbfee8)}.___SRow_1sflu_gg_._theme_success_1sflu_gg_.__active_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-new-active, #9ef2c9)}.___SRow_1sflu_gg_._theme_warning_1sflu_gg_ .___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-warning, #fff3d9)}.___SRow_1sflu_gg_._theme_warning_1sflu_gg_.__active_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-warning-active, #ffdca2)}.___SRow_1sflu_gg_._theme_danger_1sflu_gg_ .___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-critical, #fff0f7)}.___SRow_1sflu_gg_._theme_danger_1sflu_gg_.__active_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-critical-active, #ffd7df)}.___SCell_1sflu_gg_{display:flex;height:100%;font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);color:var(--intergalactic-text-primary, #191b23);box-sizing:border-box;border-bottom:1px solid var(--intergalactic-border-secondary, #e0e1e9);overflow:hidden;white-space:pre-wrap;word-break:break-word;font-feature-settings:"tnum";font-variant-numeric:tabular-nums;transition:width calc(var(--intergalactic-duration-extra-fast, 100)*1ms) ease-in-out;outline:0}.___SCell_1sflu_gg_ .___SAccordionToggle_1sflu_gg_{margin-right:var(--intergalactic-spacing-3x, 12px);margin-top:var(--intergalactic-spacing-05x, 2px);height:-moz-fit-content;height:fit-content}.___SCell_1sflu_gg_ .___SAccordionToggle_1sflu_gg_ svg{transition:transform calc(var(--intergalactic-duration-accordion, 200)*1ms) ease-out}.___SCell_1sflu_gg_ .___SAccordionToggle_1sflu_gg_.__expanded_1sflu_gg_ svg{transform:rotate(90deg)}.___SCheckboxCell_1sflu_gg_,.___SRow_1sflu_gg_._accordionType_cell_1sflu_gg_>.___SCell_1sflu_gg_.__withAccordion_1sflu_gg_,.___SRow_1sflu_gg_._accordionType_row_1sflu_gg_>.___SCell_1sflu_gg_{cursor:pointer}.___SCell_1sflu_gg_._use_primary_1sflu_gg_{padding:var(--intergalactic-spacing-3x, 12px);min-height:45px;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SCell_1sflu_gg_._use_primary_1sflu_gg_[data-aria-level]{padding-left:calc(var(--intergalactic-spacing-3x, 12px) + ((var(--intergalactic-spacing-5x, 20px) + var(--intergalactic-spacing-2x, 8px))*(var(--data-aria-level_1sflu) - 1)))}.___SCell_1sflu_gg_._use_secondary_1sflu_gg_{padding:var(--intergalactic-spacing-2x, 8px);min-height:37px;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SCell_1sflu_gg_._use_secondary_1sflu_gg_[data-aria-level]{padding-left:calc(var(--intergalactic-spacing-2x, 8px) + ((var(--intergalactic-spacing-5x, 20px) + var(--intergalactic-spacing-2x, 8px))*(var(--data-aria-level_1sflu) - 1)))}.___SCell_1sflu_gg_._borders_both_1sflu_gg_,.___SCell_1sflu_gg_._borders_left_1sflu_gg_{border-left:1px solid var(--intergalactic-border-secondary, #e0e1e9)}.___SCell_1sflu_gg_._borders_both_1sflu_gg_,.___SCell_1sflu_gg_._borders_right_1sflu_gg_{border-right:1px solid var(--intergalactic-border-secondary, #e0e1e9)}.___SCell_1sflu_gg_.__fixed_1sflu_gg_{position:sticky;z-index:2}.___SCell_1sflu_gg_._theme_muted_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-unread, #f4f5f9)}.___SCell_1sflu_gg_._theme_info_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-selected, #e9f7ff)}.___SCell_1sflu_gg_._theme_success_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-new, #dbfee8)}.___SCell_1sflu_gg_._theme_warning_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-warning, #fff3d9)}.___SCell_1sflu_gg_._theme_danger_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-critical, #fff0f7)}.___SSpinContainer_1sflu_gg_{position:absolute;left:0;right:0;bottom:0;top:0;display:flex;align-items:center;justify-content:center;background-color:var(--intergalactic-overlay-limitation-secondary, rgba(255, 255, 255, 0.85))}.___SSpinContainer_1sflu_gg_.__headerHeight_1sflu_gg_{top:var(--headerHeight_1sflu)}.___SEmptyData_1sflu_gg_{grid-column:1/-1}.___SRow_1sflu_gg_._sideIndents_wide_1sflu_gg_ .___SCell_1sflu_gg_:first-child{padding-left:var(--intergalactic-spacing-5x, 20px)}.___SRow_1sflu_gg_._sideIndents_wide_1sflu_gg_ .___SCell_1sflu_gg_:last-child{padding-right:var(--intergalactic-spacing-5x, 20px)}',
20
+ /*__inner_css_end__*/
21
+ "1sflu_gg_"
22
+ ), /*__reshadow_css_end__*/
23
+ {
24
+ "__SBody": "___SBody_1sflu_gg_",
25
+ "__SRow": "___SRow_1sflu_gg_",
26
+ "__SRowGroup": "___SRowGroup_1sflu_gg_",
27
+ "_gridArea": "__gridArea_1sflu_gg_",
28
+ "__SCell": "___SCell_1sflu_gg_",
29
+ "__SCollapseRow": "___SCollapseRow_1sflu_gg_",
30
+ "--gridArea": "--gridArea_1sflu",
31
+ "_active": "__active_1sflu_gg_",
32
+ "_theme": "__theme_1sflu_gg_",
33
+ "_expanded": "__expanded_1sflu_gg_",
34
+ "_accordionType_row": "_accordionType_row_1sflu_gg_",
35
+ "_accordionType_cell": "_accordionType_cell_1sflu_gg_",
36
+ "_withAccordion": "__withAccordion_1sflu_gg_",
37
+ "_theme_muted": "_theme_muted_1sflu_gg_",
38
+ "_theme_info": "_theme_info_1sflu_gg_",
39
+ "_theme_success": "_theme_success_1sflu_gg_",
40
+ "_theme_warning": "_theme_warning_1sflu_gg_",
41
+ "_theme_danger": "_theme_danger_1sflu_gg_",
42
+ "__SCheckboxCell": "___SCheckboxCell_1sflu_gg_",
43
+ "_borders_both": "_borders_both_1sflu_gg_",
44
+ "_borders_left": "_borders_left_1sflu_gg_",
45
+ "_borders_right": "_borders_right_1sflu_gg_",
46
+ "_fixed": "__fixed_1sflu_gg_",
47
+ "__SSpinContainer": "___SSpinContainer_1sflu_gg_",
48
+ "_headerHeight": "__headerHeight_1sflu_gg_",
49
+ "--headerHeight": "--headerHeight_1sflu",
50
+ "__SEmptyData": "___SEmptyData_1sflu_gg_",
51
+ "_compact": "__compact_1sflu_gg_",
52
+ "--data-aria-level": "--data-aria-level_1sflu",
53
+ "__SAccordionToggle": "___SAccordionToggle_1sflu_gg_",
54
+ "_use_primary": "_use_primary_1sflu_gg_",
55
+ "_use_secondary": "_use_secondary_1sflu_gg_",
56
+ "_sideIndents_wide": "_sideIndents_wide_1sflu_gg_"
57
+ })
58
+ );
59
+ var CellRoot = /* @__PURE__ */ function(_Component) {
60
+ _inherits(CellRoot2, _Component);
61
+ var _super = _createSuper(CellRoot2);
62
+ function CellRoot2() {
63
+ var _this;
64
+ _classCallCheck(this, CellRoot2);
65
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
66
+ args[_key] = arguments[_key];
67
+ }
68
+ _this = _super.call.apply(_super, [this].concat(args));
69
+ _defineProperty(_assertThisInitialized(_this), "cellRef", /* @__PURE__ */ React.createRef());
70
+ _defineProperty(_assertThisInitialized(_this), "lockedCell", [null, false]);
71
+ _defineProperty(_assertThisInitialized(_this), "handleKeyDown", function(e) {
72
+ if (e.currentTarget === _this.lockedCell[0]) {
73
+ var focusableChildren = Array.from(_this.lockedCell[0].children).flatMap(function(node) {
74
+ return getFocusableIn(node);
75
+ });
76
+ if (_this.lockedCell[1]) {
77
+ if (e.key === "Escape") {
78
+ var _this$lockedCell$;
79
+ (_this$lockedCell$ = _this.lockedCell[0]) === null || _this$lockedCell$ === void 0 ? void 0 : _this$lockedCell$.focus();
80
+ _this.lockedCell[1] = false;
81
+ }
82
+ if (e.key.startsWith("Arrow")) {
83
+ e.stopPropagation();
84
+ e.preventDefault();
85
+ }
86
+ if (e.key === "Tab") {
87
+ if (e.target === focusableChildren[0] && e.shiftKey) {
88
+ var _focusableChildren;
89
+ (_focusableChildren = focusableChildren[focusableChildren.length - 1]) === null || _focusableChildren === void 0 ? void 0 : _focusableChildren.focus();
90
+ e.preventDefault();
91
+ } else if (e.target === focusableChildren[focusableChildren.length - 1] && !e.shiftKey) {
92
+ var _focusableChildren$;
93
+ (_focusableChildren$ = focusableChildren[0]) === null || _focusableChildren$ === void 0 ? void 0 : _focusableChildren$.focus();
94
+ e.preventDefault();
95
+ }
96
+ e.stopPropagation();
97
+ }
98
+ } else if (e.key === "Enter") {
99
+ var _focusableChildren$2;
100
+ e.preventDefault();
101
+ e.stopPropagation();
102
+ _this.lockedCell[1] = true;
103
+ (_focusableChildren$2 = focusableChildren[0]) === null || _focusableChildren$2 === void 0 ? void 0 : _focusableChildren$2.focus();
104
+ }
105
+ }
106
+ });
107
+ _defineProperty(_assertThisInitialized(_this), "onFocusCell", function(e) {
108
+ if (e.target === e.currentTarget && e.target.matches(":focus-visible")) {
109
+ e.target.scrollIntoView({
110
+ behavior: "smooth",
111
+ block: "center",
112
+ inline: "center"
113
+ });
114
+ var focusableChildren = Array.from(e.currentTarget.children).flatMap(function(node) {
115
+ return getFocusableIn(node);
116
+ });
117
+ if (focusableChildren.length === 1) {
118
+ focusableChildren[0].focus();
119
+ } else if (focusableChildren.length > 1) {
120
+ _this.lockedCell = [e.currentTarget, false];
121
+ }
122
+ }
123
+ });
124
+ return _this;
125
+ }
126
+ _createClass(CellRoot2, [{
127
+ key: "componentWillUnmount",
128
+ value: function componentWillUnmount() {
129
+ var _this$asProps = this.asProps, virtualScroll = _this$asProps.virtualScroll, tableRef = _this$asProps.tableRef;
130
+ if (virtualScroll && this.cellRef.current && isFocusInside(this.cellRef.current)) {
131
+ var _tableRef$current;
132
+ (_tableRef$current = tableRef.current) === null || _tableRef$current === void 0 ? void 0 : _tableRef$current.setAttribute("tabIndex", "0");
133
+ }
134
+ }
135
+ }, {
136
+ key: "render",
137
+ value: function render() {
138
+ var _ref = this.asProps, _ref2;
139
+ var SCell = Flex;
140
+ var _this$asProps2 = this.asProps, Children = _this$asProps2.Children, styles = _this$asProps2.styles, row = _this$asProps2.row, column = _this$asProps2.column, columnIndex = _this$asProps2.columnIndex, gridRowIndex = _this$asProps2.gridRowIndex;
141
+ var cell = row[column.name];
142
+ var cellName = cell instanceof MergedColumnsCell ? cell.dataKey : column.name;
143
+ var scope = null;
144
+ var gridArea = void 0;
145
+ var fromRow = gridRowIndex;
146
+ var fromCol = columnIndex + 1;
147
+ if (cell instanceof MergedColumnsCell) {
148
+ gridArea = "".concat(fromRow, " / ").concat(fromCol, " / ").concat(fromRow + 1, " / ").concat(fromCol + cell.columnsCount);
149
+ scope = "colgroup";
150
+ } else if (cell instanceof MergedRowsCell) {
151
+ gridArea = "".concat(fromRow, " / ").concat(fromCol, " / ").concat(fromRow + cell.rowsCount, " / ").concat(fromCol + 1);
152
+ scope = "rowgroup";
153
+ } else {
154
+ gridArea = "".concat(fromRow, " / ").concat(fromCol, " / ").concat(fromRow + 1, " / ").concat(fromCol + 1);
155
+ }
156
+ return _ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(SCell, _ref2.cn("SCell", _objectSpread({}, assignProps({
157
+ "ref": this.cellRef,
158
+ "innerOutline": true,
159
+ "tabIndex": -1,
160
+ "onKeyDown": this.handleKeyDown,
161
+ "onFocus": this.onFocusCell,
162
+ "name": cellName,
163
+ "role": "gridcell",
164
+ "aria-colindex": columnIndex + 1,
165
+ "data-grouped-by": scope,
166
+ "scope": scope,
167
+ "aria-colspan": cell instanceof MergedColumnsCell ? cell.columnsCount : void 0,
168
+ "aria-rowspan": cell instanceof MergedRowsCell ? cell.rowsCount : void 0,
169
+ "gridArea": gridArea,
170
+ "borders": column.borders,
171
+ "flexWrap": column.flexWrap,
172
+ "alignItems": column.alignItems,
173
+ "alignContent": column.alignContent,
174
+ "justifyContent": column.justifyContent,
175
+ "fixed": column.fixed
176
+ }, _ref))), /* @__PURE__ */ React.createElement(Children, _ref2.cn("Children", {})));
177
+ }
178
+ }]);
179
+ return CellRoot2;
180
+ }(Component);
181
+ _defineProperty(CellRoot, "displayName", "Cell");
182
+ _defineProperty(CellRoot, "style", style);
183
+ var Cell = createComponent(CellRoot);
184
+ export {
185
+ Cell
186
+ };
@@ -0,0 +1,23 @@
1
+ import _createClass from "@babel/runtime/helpers/esm/createClass";
2
+ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
3
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
+ var MergedRowsCell = /* @__PURE__ */ _createClass(function MergedRowsCell2(value, rowsCount) {
5
+ _classCallCheck(this, MergedRowsCell2);
6
+ _defineProperty(this, "value", void 0);
7
+ _defineProperty(this, "rowsCount", void 0);
8
+ this.value = value;
9
+ this.rowsCount = rowsCount;
10
+ });
11
+ var MergedColumnsCell = /* @__PURE__ */ _createClass(function MergedColumnsCell2(value, options) {
12
+ _classCallCheck(this, MergedColumnsCell2);
13
+ _defineProperty(this, "value", void 0);
14
+ _defineProperty(this, "columnsCount", void 0);
15
+ _defineProperty(this, "dataKey", void 0);
16
+ this.value = value;
17
+ this.columnsCount = options.size;
18
+ this.dataKey = options.dataKey;
19
+ });
20
+ export {
21
+ MergedColumnsCell,
22
+ MergedRowsCell
23
+ };