@splunk/react-ui 5.0.0-beta.3 → 5.0.0-beta.4

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 (149) hide show
  1. package/Accordion.js +185 -243
  2. package/Animation.js +2 -2
  3. package/Button.js +1 -1
  4. package/ButtonSimple.js +47 -41
  5. package/CHANGELOG.md +12 -2
  6. package/CHANGELOG.v5.mdx +38 -0
  7. package/Calendar.js +352 -469
  8. package/Chip.js +149 -280
  9. package/Code.js +19 -12
  10. package/Color.js +32 -32
  11. package/ComboBox.js +8 -6
  12. package/Date.js +1 -1
  13. package/DualListbox.js +298 -296
  14. package/File.js +294 -281
  15. package/FormRows.js +165 -153
  16. package/Image.js +124 -251
  17. package/Layout.d.ts +2 -0
  18. package/MIGRATION.v5.mdx +1 -1
  19. package/Menu.js +1 -1
  20. package/Message.js +77 -100
  21. package/MessageBar.js +141 -251
  22. package/Modal.js +2 -2
  23. package/ModalLayer.js +12 -12
  24. package/Multiselect.js +1978 -2323
  25. package/NonInteractiveCheckbox.js +29 -117
  26. package/Number.js +114 -114
  27. package/Popover.js +348 -350
  28. package/Progress.js +1 -1
  29. package/RadioBar.js +136 -136
  30. package/Scroll.js +2 -2
  31. package/Select.js +236 -240
  32. package/SidePanel.js +17 -21
  33. package/Slider.js +366 -370
  34. package/SlidingPanels.js +100 -102
  35. package/SplitButton.js +39 -25
  36. package/StepBar.js +1 -1
  37. package/Switch.js +70 -64
  38. package/TabBar.js +544 -417
  39. package/Table.js +1580 -1434
  40. package/Text.js +34 -34
  41. package/TextArea.js +26 -26
  42. package/Tooltip.js +416 -562
  43. package/TransitionOpen.js +2 -2
  44. package/package.json +7 -9
  45. package/types/src/Accordion/Accordion.d.ts +14 -21
  46. package/types/src/Accordion/AccordionContext.d.ts +0 -1
  47. package/types/src/Animation/Animation.d.ts +2 -3
  48. package/types/src/AnimationToggle/docs/examples/Provider.d.ts +2 -2
  49. package/types/src/AnimationToggle/docs/examples/ToggleComponent.d.ts +2 -2
  50. package/types/src/AnimationToggle/useAnimationToggle.d.ts +1 -1
  51. package/types/src/Button/Button.d.ts +1 -1
  52. package/types/src/ButtonGroup/ButtonGroupContext.d.ts +0 -1
  53. package/types/src/ButtonSimple/ButtonSimple.d.ts +1 -3
  54. package/types/src/ButtonSimple/mixin.d.ts +1 -1
  55. package/types/src/Calendar/Calendar.d.ts +2 -2
  56. package/types/src/Calendar/{DateTable.d.ts → DateGrid.d.ts} +9 -9
  57. package/types/src/Calendar/Day.d.ts +8 -4
  58. package/types/src/CardLayout/CardLayoutContext.d.ts +0 -1
  59. package/types/src/CardLayout/docs/examples/Interactive.d.ts +2 -2
  60. package/types/src/Clickable/Clickable.d.ts +1 -1
  61. package/types/src/CollapsiblePanel/SingleOpenPanelGroupContext.d.ts +0 -1
  62. package/types/src/ComboBox/ComboBox.d.ts +3 -3
  63. package/types/src/ControlGroup/docs/examples/CustomizedLabelTarget.d.ts +2 -2
  64. package/types/src/Date/docs/examples/Controlled.d.ts +2 -2
  65. package/types/src/Date/docs/examples/HighlightToday.d.ts +2 -2
  66. package/types/src/DefinitionList/DefinitionListContext.d.ts +0 -1
  67. package/types/src/DualListbox/DualListbox.d.ts +5 -1
  68. package/types/src/File/File.d.ts +4 -4
  69. package/types/src/File/FileContext.d.ts +0 -1
  70. package/types/src/File/Item.d.ts +11 -3
  71. package/types/src/File/ItemIcon.d.ts +2 -1
  72. package/types/src/File/docs/examples/Disabled.d.ts +2 -2
  73. package/types/src/File/docs/examples/DropAnywhere.d.ts +2 -2
  74. package/types/src/File/docs/examples/Multi.d.ts +2 -2
  75. package/types/src/File/docs/examples/Single.d.ts +2 -2
  76. package/types/src/FormRows/FormRows.d.ts +4 -4
  77. package/types/src/FormRows/FormRowsContext.d.ts +1 -2
  78. package/types/src/FormRows/SortableRow.d.ts +1 -1
  79. package/types/src/FormRows/docs/examples/Basic.d.ts +2 -2
  80. package/types/src/FormRows/docs/examples/Header.d.ts +2 -2
  81. package/types/src/FormRows/docs/examples/Menu.d.ts +2 -2
  82. package/types/src/FormRows/docs/examples/ReorderOnly.d.ts +2 -2
  83. package/types/src/Image/Image.d.ts +1 -4
  84. package/types/src/JSONTree/docs/examples/Events.d.ts +2 -2
  85. package/types/src/Layout/Layout.d.ts +1 -0
  86. package/types/src/Link/icons/External.d.ts +1 -2
  87. package/types/src/Menu/Divider.d.ts +1 -1
  88. package/types/src/Menu/MenuContext.d.ts +0 -1
  89. package/types/src/MessageBar/MessageBar.d.ts +5 -1
  90. package/types/src/Modal/ModalContext.d.ts +0 -1
  91. package/types/src/Multiselect/Compact.d.ts +46 -21
  92. package/types/src/Multiselect/Multiselect.d.ts +70 -30
  93. package/types/src/Multiselect/Normal.d.ts +46 -57
  94. package/types/src/Multiselect/Option.d.ts +42 -18
  95. package/types/src/Multiselect/docs/examples/Children.d.ts +2 -2
  96. package/types/src/Multiselect/docs/examples/Controlled.d.ts +2 -2
  97. package/types/src/Multiselect/docs/examples/CustomizeSelected.d.ts +2 -2
  98. package/types/src/Multiselect/docs/examples/Disabled.d.ts +2 -2
  99. package/types/src/Multiselect/docs/examples/Error.d.ts +2 -2
  100. package/types/src/Multiselect/docs/examples/Fetching.d.ts +2 -2
  101. package/types/src/Multiselect/docs/examples/LoadMoreOnScrollBottom.d.ts +2 -2
  102. package/types/src/Multiselect/docs/examples/NewValues.d.ts +2 -2
  103. package/types/src/Multiselect/docs/examples/TabInput.d.ts +2 -2
  104. package/types/src/NonInteractiveCheckbox/NonInteractiveCheckbox.d.ts +8 -7
  105. package/types/src/Number/docs/examples/Basic.d.ts +2 -2
  106. package/types/src/Number/docs/examples/Limits.d.ts +2 -2
  107. package/types/src/Number/docs/examples/Locale.d.ts +2 -2
  108. package/types/src/Popover/Popover.d.ts +1 -1
  109. package/types/src/Popover/PopoverMenuContext.d.ts +0 -1
  110. package/types/src/RadioBar/RadioBar.d.ts +1 -1
  111. package/types/src/RadioBar/RadioBarContext.d.ts +0 -1
  112. package/types/src/RadioList/RadioListContext.d.ts +0 -1
  113. package/types/src/Scroll/Inner.d.ts +1 -1
  114. package/types/src/Scroll/docs/examples/Controlled.d.ts +2 -2
  115. package/types/src/Search/Search.d.ts +2 -2
  116. package/types/src/Select/SelectBase.d.ts +2 -2
  117. package/types/src/Slider/docs/examples/Controlled.d.ts +2 -2
  118. package/types/src/Slider/docs/examples/CustomLabels.d.ts +2 -2
  119. package/types/src/Slider/getStepMarksBackground.d.ts +8 -0
  120. package/types/src/SlidingPanels/Panel.d.ts +2 -2
  121. package/types/src/SlidingPanels/SlidingPanels.d.ts +2 -2
  122. package/types/src/SlidingPanels/docs/examples/Basic.d.ts +2 -2
  123. package/types/src/SlidingPanels/docs/examples/Dropdown.d.ts +2 -2
  124. package/types/src/SplitButton/Item.d.ts +15 -2
  125. package/types/src/StepBar/Step.d.ts +1 -1
  126. package/types/src/StepBar/StepBar.d.ts +1 -1
  127. package/types/src/StepBar/StepBarContext.d.ts +0 -1
  128. package/types/src/Switch/docs/examples/Basic.d.ts +2 -2
  129. package/types/src/Switch/docs/examples/Disabled.d.ts +2 -2
  130. package/types/src/TabBar/Tab.d.ts +12 -5
  131. package/types/src/TabBar/TabBar.d.ts +3 -2
  132. package/types/src/TabBar/TabBarContext.d.ts +7 -2
  133. package/types/src/Table/Head.d.ts +4 -15
  134. package/types/src/Table/HeadCell.d.ts +23 -25
  135. package/types/src/Table/HeadDropdownCell.d.ts +23 -26
  136. package/types/src/Table/HeadInner.d.ts +4 -10
  137. package/types/src/Table/Row.d.ts +6 -6
  138. package/types/src/Table/Table.d.ts +3 -8
  139. package/types/src/Table/TableContext.d.ts +0 -1
  140. package/types/src/Tooltip/Tooltip.d.ts +26 -58
  141. package/types/src/Tooltip/docs/examples/Controlled.d.ts +2 -2
  142. package/types/src/Tree/TreeContext.d.ts +0 -1
  143. package/types/src/useForceUpdate/useForceUpdate.d.ts +0 -1
  144. package/types/src/useResizeObserver/useResizeObserver.d.ts +2 -1
  145. package/types/src/utils/types.d.ts +2 -3
  146. package/useResizeObserver.js +26 -19
  147. package/types/src/Image/icons/Cross.d.ts +0 -3
  148. package/types/src/Table/docs/examples/prisma/DockedHeaderScrollbar.d.ts +0 -3
  149. package/types/src/Tooltip/InfoIcon.d.ts +0 -4
package/Table.js CHANGED
@@ -62,13 +62,13 @@
62
62
  // EXPORTS
63
63
  e.d(n, {
64
64
  Body: () => /* reexport */ Z,
65
- Caption: () => /* reexport */ de,
66
- Cell: () => /* reexport */ xe,
67
- Head: () => /* reexport */ ar,
68
- HeadCell: () => /* reexport */ Pn,
69
- HeadDropdownCell: () => /* reexport */ Ir,
70
- Row: () => /* reexport */ Wt,
71
- default: () => /* reexport */ Xo
65
+ Caption: () => /* reexport */ ve,
66
+ Cell: () => /* reexport */ ke,
67
+ Head: () => /* reexport */ Jt,
68
+ HeadCell: () => /* reexport */ En,
69
+ HeadDropdownCell: () => /* reexport */ gr,
70
+ Row: () => /* reexport */ At,
71
+ default: () => /* reexport */ Yo
72
72
  });
73
73
  // CONCATENATED MODULE: external "react"
74
74
  const t = require("react");
@@ -92,8 +92,8 @@
92
92
  const v = require("lodash/indexOf");
93
93
  var p = e.n(v);
94
94
  // CONCATENATED MODULE: external "lodash/isEqual"
95
- const m = require("lodash/isEqual");
96
- var b = e.n(m);
95
+ const b = require("lodash/isEqual");
96
+ var m = e.n(b);
97
97
  // CONCATENATED MODULE: external "lodash/isNumber"
98
98
  const h = require("lodash/isNumber");
99
99
  // CONCATENATED MODULE: external "lodash/omit"
@@ -102,38 +102,38 @@
102
102
  // CONCATENATED MODULE: external "lodash/throttle"
103
103
  const w = require("lodash/throttle");
104
104
  var C = e.n(w);
105
- // CONCATENATED MODULE: external "react-resize-detector"
106
- const x = require("react-resize-detector");
107
- var S = e.n(x);
108
105
  // CONCATENATED MODULE: external "@splunk/react-ui/EventListener"
109
- const k = require("@splunk/react-ui/EventListener");
106
+ const x = require("@splunk/react-ui/EventListener");
107
+ var S = e.n(x);
108
+ // CONCATENATED MODULE: external "@splunk/react-ui/useResizeObserver"
109
+ const k = require("@splunk/react-ui/useResizeObserver");
110
110
  var O = e.n(k);
111
+ // CONCATENATED MODULE: external "@splunk/ui-utils/id"
112
+ const R = require("@splunk/ui-utils/id");
111
113
  // CONCATENATED MODULE: external "@splunk/ui-utils/keyboard"
112
- const R = require("@splunk/ui-utils/keyboard");
114
+ const E = require("@splunk/ui-utils/keyboard");
113
115
  // CONCATENATED MODULE: external "@splunk/react-ui/ScrollContainerContext"
114
- const E = require("@splunk/react-ui/ScrollContainerContext");
116
+ const I = require("@splunk/react-ui/ScrollContainerContext");
115
117
  // CONCATENATED MODULE: external "@splunk/react-ui/usePrevious"
116
- const I = require("@splunk/react-ui/usePrevious");
117
- var T = e.n(I);
118
+ const T = require("@splunk/react-ui/usePrevious");
119
+ var j = e.n(T);
118
120
  // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
119
121
  const D = require("@splunk/ui-utils/i18n");
120
122
  // CONCATENATED MODULE: external "@splunk/ui-utils/format"
121
- const A = require("@splunk/ui-utils/format");
123
+ const q = require("@splunk/ui-utils/format");
122
124
  // CONCATENATED MODULE: external "lodash/includes"
123
- const j = require("lodash/includes");
124
- var q = e.n(j);
125
+ const A = require("lodash/includes");
126
+ var P = e.n(A);
125
127
  // CONCATENATED MODULE: external "lodash/without"
126
- const z = require("lodash/without");
127
- var P = e.n(z);
128
- // CONCATENATED MODULE: external "@splunk/ui-utils/id"
129
- const _ = require("@splunk/ui-utils/id");
128
+ const _ = require("lodash/without");
129
+ var z = e.n(_);
130
130
  // CONCATENATED MODULE: external "styled-components"
131
131
  const M = require("styled-components");
132
132
  var $ = e.n(M);
133
133
  // CONCATENATED MODULE: external "@splunk/themes"
134
134
  const N = require("@splunk/themes");
135
135
  // CONCATENATED MODULE: ./src/Table/BodyStyles.ts
136
- var L = $().tbody.withConfig({
136
+ var W = $().tbody.withConfig({
137
137
  displayName: "BodyStyles__Styled",
138
138
  componentId: "sc-1k5p6pq-0"
139
139
  })([ "", " z-index:0;" ], N.mixins.reset("table-row-group"));
@@ -144,7 +144,7 @@
144
144
  * @param ref - The React callback or object ref. Can be `null` or `undefined`.
145
145
  * @param current - The new value of the ref.
146
146
  */
147
- function H(e, n) {
147
+ function L(e, n) {
148
148
  if (e) {
149
149
  if (typeof e === "function") {
150
150
  e(n);
@@ -157,8 +157,8 @@
157
157
  }
158
158
  }
159
159
  // CONCATENATED MODULE: ./src/Table/Body.tsx
160
- function W() {
161
- return W = Object.assign ? Object.assign.bind() : function(e) {
160
+ function H() {
161
+ return H = Object.assign ? Object.assign.bind() : function(e) {
162
162
  for (var n = 1; n < arguments.length; n++) {
163
163
  var t = arguments[n];
164
164
  for (var r in t) {
@@ -166,22 +166,22 @@
166
166
  }
167
167
  }
168
168
  return e;
169
- }, W.apply(null, arguments);
169
+ }, H.apply(null, arguments);
170
170
  }
171
171
  function K(e, n) {
172
- return X(e) || U(e, n) || F(e, n) || B();
172
+ return X(e) || U(e, n) || V(e, n) || B();
173
173
  }
174
174
  function B() {
175
175
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
176
176
  }
177
- function F(e, n) {
177
+ function V(e, n) {
178
178
  if (e) {
179
- if ("string" == typeof e) return V(e, n);
179
+ if ("string" == typeof e) return F(e, n);
180
180
  var t = {}.toString.call(e).slice(8, -1);
181
- return "Object" === t && e.constructor && (t = e.constructor.name), "Map" === t || "Set" === t ? Array.from(e) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? V(e, n) : void 0;
181
+ return "Object" === t && e.constructor && (t = e.constructor.name), "Map" === t || "Set" === t ? Array.from(e) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? F(e, n) : void 0;
182
182
  }
183
183
  }
184
- function V(e, n) {
184
+ function F(e, n) {
185
185
  (null == n || n > e.length) && (n = e.length);
186
186
  for (var t = 0, r = Array(n); t < n; t++) {
187
187
  r[t] = e[t];
@@ -213,9 +213,9 @@
213
213
  function X(e) {
214
214
  if (Array.isArray(e)) return e;
215
215
  }
216
- function G(e, n) {
216
+ function Y(e, n) {
217
217
  if (null == e) return {};
218
- var t, r, o = Y(e, n);
218
+ var t, r, o = G(e, n);
219
219
  if (Object.getOwnPropertySymbols) {
220
220
  var i = Object.getOwnPropertySymbols(e);
221
221
  for (r = 0; r < i.length; r++) {
@@ -224,7 +224,7 @@
224
224
  }
225
225
  return o;
226
226
  }
227
- function Y(e, n) {
227
+ function G(e, n) {
228
228
  if (null == e) return {};
229
229
  var t = {};
230
230
  for (var r in e) {
@@ -252,26 +252,26 @@
252
252
  stripeRows: i().bool
253
253
  };
254
254
  function Q(e) {
255
- var n = e.actions, o = e.children, i = e.elementRef, a = e.movableColumns, l = e.onRequestMoveRow, u = e.rowExpansion, s = u === void 0 ? "none" : u, c = e.primaryColumnIndex, d = e.stripeRows, f = G(e, [ "actions", "children", "elementRef", "movableColumns", "onRequestMoveRow", "rowExpansion", "primaryColumnIndex", "stripeRows" ]);
255
+ var n = e.actions, o = e.children, i = e.elementRef, a = e.movableColumns, l = e.onRequestMoveRow, u = e.rowExpansion, s = u === void 0 ? "none" : u, c = e.primaryColumnIndex, d = e.stripeRows, f = Y(e, [ "actions", "children", "elementRef", "movableColumns", "onRequestMoveRow", "rowExpansion", "primaryColumnIndex", "stripeRows" ]);
256
256
  // @docs-props-type BodyPropsBase
257
257
  var v = [];
258
- var p = (0, t.useState)([]), m = K(p, 2), b = m[0], h = m[1];
258
+ var p = (0, t.useState)([]), b = K(p, 2), m = b[0], h = b[1];
259
259
  var y = (0, t.useRef)(null);
260
260
  var g = (0, t.useCallback)((function(e) {
261
261
  y.current = e;
262
- H(i, e);
262
+ L(i, e);
263
263
  }), [ i, y ]);
264
264
  var w = function e(n, t, r) {
265
- var o = b;
265
+ var o = m;
266
266
  if (s === "single") {
267
- if (q()(o, t)) {
267
+ if (P()(o, t)) {
268
268
  h([]);
269
269
  } else {
270
270
  h([ t ]);
271
271
  }
272
272
  } else if (s === "multi") {
273
- if (q()(o, t)) {
274
- h(P()(o, t));
273
+ if (P()(o, t)) {
274
+ h(z()(o, t));
275
275
  } else {
276
276
  h(o === null || o === void 0 ? void 0 : o.concat(t));
277
277
  }
@@ -283,7 +283,7 @@
283
283
  var x = (0, t.useMemo)((function() {
284
284
  return C.map((function(e) {
285
285
  return e.props.expansionRow ? t.Children.map(e.props.expansionRow, (function() {
286
- return (0, _.createDOMID)();
286
+ return (0, R.createDOMID)();
287
287
  })) : undefined;
288
288
  }));
289
289
  }), [ C ]);
@@ -293,27 +293,27 @@
293
293
  var o = e.key;
294
294
  var i = r % 2 ? "even" : "odd";
295
295
  var u = d ? i : "none";
296
- var f = s === "controlled" ? e.props.expanded : q()(b, o);
296
+ var f = s === "controlled" ? e.props.expanded : P()(m, o);
297
297
  var p = function n(t) {
298
298
  w(t, o, e.props.onExpansion);
299
299
  };
300
- var m = x[r];
301
- var h = m === null || m === void 0 ? void 0 : m.join(" ");
300
+ var b = x[r];
301
+ var h = b === null || b === void 0 ? void 0 : b.join(" ");
302
302
  v.push( (0, t.cloneElement)(e, {
303
303
  stripe: u,
304
304
  actions: n,
305
305
  expanded: f,
306
306
  expansionRowIds: h,
307
307
  expandable: s !== "none",
308
- draggable: !!l,
308
+ isDraggable: !!l,
309
309
  movableColumns: a,
310
310
  primaryColumnIndex: c,
311
311
  onExpansion: p,
312
- key: e.key || e.props.dataId || r
312
+ key: e.key || r
313
313
  }));
314
- if (f && e.props.expansionRow && Array.isArray(m)) {
314
+ if (f && e.props.expansionRow && Array.isArray(b)) {
315
315
  t.Children.forEach(e.props.expansionRow, (function(e, n) {
316
- var r = m[n];
316
+ var r = b[n];
317
317
  v.push( (0, t.cloneElement)(e, {
318
318
  key: r,
319
319
  id: r,
@@ -329,7 +329,7 @@
329
329
  return null;
330
330
  }
331
331
 
332
- return r().createElement(L, W({
332
+ return r().createElement(W, H({
333
333
  "data-test": "body"
334
334
  }, f, {
335
335
  ref: g
@@ -346,7 +346,10 @@
346
346
  var ne = $().div.withConfig({
347
347
  displayName: "TableStyles__StyledTableContainer",
348
348
  componentId: "sc-1cmfss7-1"
349
- })([ "overflow:auto;&::before{content:'';width:100%;height:0;top:0;position:absolute;}" ]);
349
+ })([ "overflow:auto;", " &::before{content:'';width:100%;height:0;top:0;position:absolute;}" ], (function(e) {
350
+ var n = e.$dragging;
351
+ return n && (0, M.css)([ "overflow:hidden;" ]);
352
+ }));
350
353
  var te = $().table.withConfig({
351
354
  displayName: "TableStyles__StyledTable",
352
355
  componentId: "sc-1cmfss7-2"
@@ -369,9 +372,29 @@
369
372
  var n = e.side;
370
373
  return n;
371
374
  }));
375
+ var ae = $().table.withConfig({
376
+ displayName: "TableStyles__StyledDragShadowTable",
377
+ componentId: "sc-1cmfss7-6"
378
+ })([ "display:block;background:", ";border-collapse:collapse;height:", ";width:", ";" ], N.variables.interactiveColorOverlayDrag, (function(e) {
379
+ var n = e.$height;
380
+ return "".concat(n, "px");
381
+ }), (function(e) {
382
+ var n = e.$width;
383
+ return "".concat(n, "px");
384
+ }));
385
+ var le = $().div.withConfig({
386
+ displayName: "TableStyles__StyledGuideLine",
387
+ componentId: "sc-1cmfss7-7"
388
+ })([ "position:absolute;width:1px;left:", ";top:0;height:", ";pointer-events:none;background-color:", ";" ], (function(e) {
389
+ var n = e.$left;
390
+ return "".concat(n, "px");
391
+ }), (function(e) {
392
+ var n = e.$height;
393
+ return "".concat(n, "px");
394
+ }), N.variables.interactiveColorAccent);
372
395
  // CONCATENATED MODULE: ./src/Table/Caption.tsx
373
- function ae() {
374
- return ae = Object.assign ? Object.assign.bind() : function(e) {
396
+ function ue() {
397
+ return ue = Object.assign ? Object.assign.bind() : function(e) {
375
398
  for (var n = 1; n < arguments.length; n++) {
376
399
  var t = arguments[n];
377
400
  for (var r in t) {
@@ -379,11 +402,11 @@
379
402
  }
380
403
  }
381
404
  return e;
382
- }, ae.apply(null, arguments);
405
+ }, ue.apply(null, arguments);
383
406
  }
384
- function le(e, n) {
407
+ function se(e, n) {
385
408
  if (null == e) return {};
386
- var t, r, o = ue(e, n);
409
+ var t, r, o = ce(e, n);
387
410
  if (Object.getOwnPropertySymbols) {
388
411
  var i = Object.getOwnPropertySymbols(e);
389
412
  for (r = 0; r < i.length; r++) {
@@ -392,7 +415,7 @@
392
415
  }
393
416
  return o;
394
417
  }
395
- function ue(e, n) {
418
+ function ce(e, n) {
396
419
  if (null == e) return {};
397
420
  var t = {};
398
421
  for (var r in e) {
@@ -403,34 +426,34 @@
403
426
  }
404
427
  return t;
405
428
  }
406
- var se = {
429
+ var de = {
407
430
  children: i().node.isRequired,
408
431
  side: i().oneOf([ "top", "bottom" ])
409
432
  };
410
433
  /**
411
434
  * Tables that use a docked header must place the caption on the bottom side.
412
435
  * Tables that use a fixed header cannot use captions.
413
- */ function ce(e) {
414
- var n = e.children, t = e.side, o = t === void 0 ? "top" : t, i = le(e, [ "children", "side" ]);
436
+ */ function fe(e) {
437
+ var n = e.children, t = e.side, o = t === void 0 ? "top" : t, i = se(e, [ "children", "side" ]);
415
438
  // @docs-props-type CaptionPropsBase
416
439
 
417
- return r().createElement(ie, ae({
440
+ return r().createElement(ie, ue({
418
441
  "data-test": "caption",
419
442
  side: o
420
443
  }, i), n);
421
444
  }
422
- ce.propTypes = se;
423
- ce.splunkUiType = "Table.Caption";
424
- /* harmony default export */ const de = ce;
445
+ fe.propTypes = de;
446
+ fe.splunkUiType = "Table.Caption";
447
+ /* harmony default export */ const ve = fe;
425
448
  // CONCATENATED MODULE: external "@splunk/react-ui/ButtonSimple"
426
- const fe = require("@splunk/react-ui/ButtonSimple");
449
+ const pe = require("@splunk/react-ui/ButtonSimple");
427
450
  // CONCATENATED MODULE: ./src/Table/CellStyles.ts
428
- var ve = "2px";
429
- var pe = (0, M.css)([ "box-shadow:", ";" ], N.variables.focusShadowInset);
430
- var me = $().td.withConfig({
451
+ var be = "2px";
452
+ var me = (0, M.css)([ "box-shadow:", ";" ], N.variables.focusShadowInset);
453
+ var he = $().td.withConfig({
431
454
  displayName: "CellStyles__Styled",
432
455
  componentId: "sc-1955xk2-0"
433
- })([ "", " padding:", " ", ";border-left:0 solid transparent;border-right:0 solid transparent;color:", ";word-wrap:break-word;line-height:20px;vertical-align:top;*:where(button):focus,*:is(:has(> input:focus)):not([disabled]){box-shadow:", ";}", " ", " ", " [data-expansion-row='true'] > &:first-child{padding-top:8px;}[data-expansion-row='true'] > &:last-child{padding-bottom:14px;}" ], N.mixins.reset("table-cell"), ve, N.variables.spacingSmall, N.variables.contentColorDefault, N.variables.focusShadowInset, (0,
456
+ })([ "", " padding:", " ", ";border-left:0 solid transparent;border-right:0 solid transparent;color:", ";word-wrap:break-word;line-height:20px;vertical-align:top;*:where(button):focus,&& *:is(:has(> input:focus)):not([disabled]){box-shadow:", ";}", " ", " ", " [data-expansion-row='true'] > &:first-child{padding-top:8px;}[data-expansion-row='true'] > &:last-child{padding-bottom:14px;}" ], N.mixins.reset("table-cell"), be, N.variables.spacingSmall, N.variables.contentColorDefault, N.variables.focusShadowInset, (0,
434
457
  N.pickVariant)("$variant", {
435
458
  expand: (0, M.css)([ "padding:0;vertical-align:top;height:100%;" ]),
436
459
  toggle: (0, M.css)([ "padding:0;vertical-align:top;height:100%;" ])
@@ -438,7 +461,7 @@
438
461
  var n = e.$variant, t = e.$isPrimaryCell;
439
462
  return (0, N.pickVariant)("$appearance", {
440
463
  data: (0, M.css)([ "", "" ], n === "actions" && (0, M.css)([ "cursor:default;*:where(button){", " &:focus{box-shadow:", ";}}" ], (0,
441
- fe.buttonMixin)("subtle", {
464
+ pe.buttonMixin)("subtle", {
442
465
  color: N.variables.contentColorDefault
443
466
  }), N.variables.focusShadowInset)),
444
467
  rowLink: (0, M.css)([ "color:", ";*:hover > &&{cursor:pointer;", "}" ], N.variables.contentColorActive, t && (0,
@@ -447,13 +470,13 @@
447
470
  });
448
471
  }), (function(e) {
449
472
  var n = e.$clickable, t = e.$focusWithin, r = e.$stripe;
450
- return n && (0, M.css)([ "cursor:pointer;&:hover{background-color:", ";}&:focus{", " background-color:", ";}", "" ], r === "even" ? N.variables.neutral300 : N.variables.neutral100, pe, r === "even" ? N.variables.neutral300 : N.variables.neutral100, t && (0,
451
- M.css)([ "&:focus-within{", " background-color:", ";}" ], pe, r === "even" ? N.variables.neutral300 : N.variables.neutral100));
473
+ return n && (0, M.css)([ "cursor:pointer;&:hover{background-color:", ";}&:focus{", " background-color:", ";}", "" ], r === "even" ? N.variables.neutral300 : N.variables.neutral100, me, r === "even" ? N.variables.neutral300 : N.variables.neutral100, t && (0,
474
+ M.css)([ "&:focus-within{", " background-color:", ";}" ], me, r === "even" ? N.variables.neutral300 : N.variables.neutral100));
452
475
  }));
453
476
  /*
454
477
  * A wrapper ensures that the Table Cell contents align to the top while staying within the height of inputHeight.
455
478
  * This allows text to align properly with expand and select icons when other cell contents are larger.
456
- */ var be = $().div.withConfig({
479
+ */ var ye = $().div.withConfig({
457
480
  displayName: "CellStyles__StyledCellContent",
458
481
  componentId: "sc-1955xk2-1"
459
482
  })([ "display:flex;align-items:center;word-break:break-word;min-height:", ";", " ", "" ], N.variables.inputHeight, (0,
@@ -465,8 +488,8 @@
465
488
  return n ? (0, M.css)([ "display:block;text-align:", ";" ], t) : (0, M.css)([ "justify-content:", ";" ], t);
466
489
  }));
467
490
  // CONCATENATED MODULE: ./src/Table/Cell.tsx
468
- function he() {
469
- return he = Object.assign ? Object.assign.bind() : function(e) {
491
+ function ge() {
492
+ return ge = Object.assign ? Object.assign.bind() : function(e) {
470
493
  for (var n = 1; n < arguments.length; n++) {
471
494
  var t = arguments[n];
472
495
  for (var r in t) {
@@ -474,11 +497,11 @@
474
497
  }
475
498
  }
476
499
  return e;
477
- }, he.apply(null, arguments);
500
+ }, ge.apply(null, arguments);
478
501
  }
479
- function ye(e, n) {
502
+ function we(e, n) {
480
503
  if (null == e) return {};
481
- var t, r, o = ge(e, n);
504
+ var t, r, o = Ce(e, n);
482
505
  if (Object.getOwnPropertySymbols) {
483
506
  var i = Object.getOwnPropertySymbols(e);
484
507
  for (r = 0; r < i.length; r++) {
@@ -487,7 +510,7 @@
487
510
  }
488
511
  return o;
489
512
  }
490
- function ge(e, n) {
513
+ function Ce(e, n) {
491
514
  if (null == e) return {};
492
515
  var t = {};
493
516
  for (var r in e) {
@@ -498,7 +521,7 @@
498
521
  }
499
522
  return t;
500
523
  }
501
- /** @public */ var we = {
524
+ /** @public */ var xe = {
502
525
  align: i().oneOf([ "left", "center", "right" ]),
503
526
  /** @private */
504
527
  appearance: i().oneOf([ "data", "link", "rowLink" ]),
@@ -521,30 +544,30 @@
521
544
  /** @private. */
522
545
  variant: i().oneOf([ "toggle", "expand", "drag", "actions" ])
523
546
  };
524
- function Ce(e) {
525
- var n = e.align, o = n === void 0 ? "left" : n, i = e.appearance, a = e.appearClickable, l = e.children, u = e.data, s = e.disabled, c = e.elementRef, d = e.isPrimaryCell, f = e.onClick, v = e.onKeyDown, p = e.stripe, m = e.variant, b = ye(e, [ "align", "appearance", "appearClickable", "children", "data", "disabled", "elementRef", "isPrimaryCell", "onClick", "onKeyDown", "stripe", "variant" ]);
547
+ function Se(e) {
548
+ var n = e.align, o = n === void 0 ? "left" : n, i = e.appearance, a = e.appearClickable, l = e.children, u = e.data, s = e.disabled, c = e.elementRef, d = e.isPrimaryCell, f = e.onClick, v = e.onKeyDown, p = e.stripe, b = e.variant, m = we(e, [ "align", "appearance", "appearClickable", "children", "data", "disabled", "elementRef", "isPrimaryCell", "onClick", "onKeyDown", "stripe", "variant" ]);
526
549
  // @docs-props-type CellPropsBase
527
550
  var h = f !== undefined;
528
551
  var y = a || h;
529
552
  var g = y ? "link" : "data";
530
553
  var w = (0, t.useCallback)((function(e) {
531
- H(c, e);
554
+ L(c, e);
532
555
  }), [ c ]);
533
556
  var C = (0, t.useCallback)((function(e) {
534
- if (m === "actions") {
557
+ if (b === "actions") {
535
558
  // Action buttons have their own onClicks inside the cell so we don't want Row onClick to fire
536
559
  e.stopPropagation();
537
560
  }
538
561
  f === null || f === void 0 ? void 0 : f(e, u);
539
- }), [ u, f, m ]);
562
+ }), [ u, f, b ]);
540
563
  var x = (0, t.useCallback)((function(e) {
541
- if ((0, R.keycode)(e.nativeEvent) === "enter") {
564
+ if ((0, E.keycode)(e.nativeEvent) === "enter") {
542
565
  f === null || f === void 0 ? void 0 : f(e, u);
543
566
  }
544
567
  v === null || v === void 0 ? void 0 : v(e);
545
568
  }), [ u, f, v ]);
546
569
 
547
- return r().createElement(me, he({
570
+ return r().createElement(he, ge({
548
571
  "data-test": "cell",
549
572
  $appearance: i || g,
550
573
  $clickable: y ? true : undefined,
@@ -552,59 +575,52 @@
552
575
  $focusWithin: a,
553
576
  $isPrimaryCell: d,
554
577
  $stripe: p,
555
- $variant: m,
578
+ $variant: b,
556
579
  onClick: C,
557
580
  onKeyDown: x,
558
581
  ref: w,
559
582
  tabIndex: h ? 0 : undefined
560
- }, b), r().createElement(be, {
583
+ }, m), r().createElement(ye, {
561
584
  $align: o,
562
- $variant: m
585
+ $variant: b
563
586
  }, l));
564
587
  }
565
- Ce.propTypes = we;
566
- Ce.splunkUiType = "Table.Cell";
567
- /* harmony default export */ const xe = Ce;
588
+ Se.propTypes = xe;
589
+ Se.splunkUiType = "Table.Cell";
590
+ /* harmony default export */ const ke = Se;
568
591
  // CONCATENATED MODULE: external "lodash/isString"
569
- const Se = require("lodash/isString");
570
- var ke = e.n(Se);
571
- // CONCATENATED MODULE: external "lodash/merge"
572
- const Oe = require("lodash/merge");
592
+ const Oe = require("lodash/isString");
573
593
  var Re = e.n(Oe);
574
- // CONCATENATED MODULE: external "@splunk/react-icons/ArrowDown"
575
- const Ee = require("@splunk/react-icons/ArrowDown");
594
+ // CONCATENATED MODULE: external "lodash/merge"
595
+ const Ee = require("lodash/merge");
576
596
  var Ie = e.n(Ee);
597
+ // CONCATENATED MODULE: external "@splunk/react-icons/ParallelDots"
598
+ const Te = require("@splunk/react-icons/ParallelDots");
599
+ var je = e.n(Te);
600
+ // CONCATENATED MODULE: external "@splunk/react-icons/ArrowDown"
601
+ const De = require("@splunk/react-icons/ArrowDown");
602
+ var qe = e.n(De);
577
603
  // CONCATENATED MODULE: external "@splunk/react-icons/ArrowUp"
578
- const Te = require("@splunk/react-icons/ArrowUp");
579
- var De = e.n(Te);
604
+ const Ae = require("@splunk/react-icons/ArrowUp");
605
+ var Pe = e.n(Ae);
580
606
  // CONCATENATED MODULE: external "@splunk/react-icons/ArrowUpDown"
581
- const Ae = require("@splunk/react-icons/ArrowUpDown");
582
- var je = e.n(Ae);
607
+ const _e = require("@splunk/react-icons/ArrowUpDown");
608
+ var ze = e.n(_e);
583
609
  // CONCATENATED MODULE: external "@splunk/react-icons/CaretSmallDown"
584
- const qe = require("@splunk/react-icons/CaretSmallDown");
585
- var ze = e.n(qe);
586
- // CONCATENATED MODULE: external "@splunk/react-icons/ParallelDots"
587
- const Pe = require("@splunk/react-icons/ParallelDots");
588
- var _e = e.n(Pe);
589
- // CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
590
- const Me = require("@splunk/react-ui/ScreenReaderContent");
610
+ const Me = require("@splunk/react-icons/CaretSmallDown");
591
611
  var $e = e.n(Me);
592
612
  // CONCATENATED MODULE: external "@splunk/react-ui/Divider"
593
613
  const Ne = require("@splunk/react-ui/Divider");
594
- var Le = e.n(Ne);
614
+ var We = e.n(Ne);
595
615
  // CONCATENATED MODULE: ./src/Table/HeadInnerStyles.ts
596
- var He = "2px";
597
- var We = $().div.withConfig({
598
- displayName: "HeadInnerStyles__StyledDragContainer",
599
- componentId: "sc-1sa0wng-0"
600
- })([ "display:flex;cursor:move;align-items:center;justify-content:center;height:100%;user-select:none;-webkit-user-drag:element;" ]);
601
- var Ke = $().span.withConfig({
616
+ var Le = "2px";
617
+ var He = $().span.withConfig({
602
618
  displayName: "HeadInnerStyles__StyledMenuIcon",
603
- componentId: "sc-1sa0wng-1"
619
+ componentId: "sc-1sa0wng-0"
604
620
  })([ "position:relative;color:", ";" ], N.variables.contentColorDefault);
605
- var Be = $().span.withConfig({
621
+ var Ke = $().span.withConfig({
606
622
  displayName: "HeadInnerStyles__StyledLabel",
607
- componentId: "sc-1sa0wng-2"
623
+ componentId: "sc-1sa0wng-1"
608
624
  })([ "display:flex;flex:0 1 auto;position:relative;word-wrap:break-word;word-break:break-word;", " ", " ", " ", "" ], (0,
609
625
  N.pickVariant)("$truncate", {
610
626
  true: (0, M.css)([ "overflow:hidden;text-overflow:ellipsis;white-space:nowrap;" ])
@@ -618,41 +634,35 @@
618
634
  var n = e.$variant;
619
635
  return n === "toggleAll" && (0, M.css)([ "width:100%;" ]);
620
636
  }));
621
- var Fe = $().span.withConfig({
637
+ var Be = $().span.withConfig({
622
638
  displayName: "HeadInnerStyles__StyledSortIcon",
623
- componentId: "sc-1sa0wng-3"
639
+ componentId: "sc-1sa0wng-2"
624
640
  })([ "color:", ";" ], N.variables.contentColorDefault);
625
- var Ve = (0, M.css)([ "box-shadow:", ";outline:none;color:", ";text-decoration:underline;", ",", "{color:", ";}" ], N.variables.focusShadowInset, N.variables.contentColorActive, /* sc-sel */ Fe, /* sc-sel */ Ke, N.variables.contentColorActive);
626
- var Ue = $().div.withConfig({
641
+ var Ve = (0, M.css)([ "box-shadow:", ";outline:none;color:", ";text-decoration:underline;", ",", "{color:", ";}" ], N.variables.focusShadowInset, N.variables.contentColorActive, /* sc-sel */ Be, /* sc-sel */ He, N.variables.contentColorActive);
642
+ var Fe = $().div.withConfig({
627
643
  displayName: "HeadInnerStyles__Styled",
628
- componentId: "sc-1sa0wng-4"
629
- })([ "", ";", ";", ";position:relative;width:100%;justify-content:", ";gap:", ";padding:", " ", ";min-height:calc(", " + ", "*2);align-items:center;", " ", " ", " &[data-helper]{position:absolute;left:-10000px;top:-10000px;background-color:", ";box-shadow:", ";box-sizing:border-box;background-repeat:repeat-x;}@media print{background-image:none;}", "" ], N.mixins.reset("flex"), N.mixins.clearfix(), N.mixins.typography("body", {
644
+ componentId: "sc-1sa0wng-3"
645
+ })([ "", ";", ";", ";position:relative;flex-grow:1;justify-content:", ";gap:", ";padding:", " ", ";min-height:calc(", " + ", "*2);align-items:center;", " @media print{background-image:none;}", "" ], N.mixins.reset("flex"), N.mixins.clearfix(), N.mixins.typography("body", {
630
646
  weight: "bold"
631
647
  }), (0, N.pickVariant)("$align", {
632
648
  center: "center",
633
649
  left: "flex-start",
634
650
  right: "flex-end"
635
- }), N.variables.spacingXSmall, He, N.variables.spacingSmall, N.variables.inputHeight, He, (function(e) {
651
+ }), N.variables.spacingXSmall, Le, N.variables.spacingSmall, N.variables.inputHeight, Le, (function(e) {
636
652
  var n = e.$variant;
637
653
  return n === "toggleAll" && (0, M.css)([ "padding:0;" ]);
638
654
  }), (function(e) {
639
- var n = e.$dragging;
640
- return n && (0, M.css)([ "opacity:0;" ]);
641
- }), (function(e) {
642
- var n = e.$draggable;
643
- return n && (0, M.css)([ "-webkit-user-drag:element;user-select:none;" ]);
644
- }), N.variables.neutral300, N.variables.focusShadowInset, (function(e) {
645
655
  var n = e.$clickable, t = e.$focusWithin;
646
656
  return n && (0, M.css)([ "cursor:pointer;&:focus{", "}", " &:hover{outline:none;text-decoration:underline;color:", ";", ",", "{color:", ";}}" ], Ve, t && (0,
647
- M.css)([ "&:focus-within{", "}" ], Ve), N.variables.contentColorActive, /* sc-sel */ Fe, /* sc-sel */ Ke, N.variables.contentColorActive);
657
+ M.css)([ "&:focus-within{", "}" ], Ve), N.variables.contentColorActive, /* sc-sel */ Be, /* sc-sel */ He, N.variables.contentColorActive);
648
658
  }));
649
- var Xe = $()(Le()).withConfig({
659
+ var Ue = $()(We()).withConfig({
650
660
  displayName: "HeadInnerStyles__StyledResize",
651
- componentId: "sc-1sa0wng-5"
652
- })([ "", ";position:absolute;right:-5px;width:9px;top:0;bottom:0;z-index:1;cursor:col-resize;th:last-child > ", " > &{right:0;width:5px;}&::-moz-focus-inner{border:0;padding:0;}&:focus{outline:none;&::before{content:'';position:absolute;background:", ";box-shadow:", ";left:4px;width:1px;top:0;bottom:0;}}" ], N.mixins.reset("block"), /* sc-sel */ Ue, N.variables.focusColor, N.variables.focusShadow);
661
+ componentId: "sc-1sa0wng-4"
662
+ })([ "", ";position:absolute;right:-5px;width:9px;top:0;bottom:0;z-index:1;cursor:col-resize;th:last-child > ", " > &{right:0;width:5px;}&::-moz-focus-inner{border:0;padding:0;}&:focus{outline:none;&::before{content:'';position:absolute;background:", ";box-shadow:", ";left:4px;width:1px;top:0;bottom:0;}}" ], N.mixins.reset("block"), /* sc-sel */ Fe, N.variables.focusColor, N.variables.focusShadow);
653
663
  // CONCATENATED MODULE: ./src/utils/ssrDocument.ts
654
664
  /* eslint-disable @typescript-eslint/no-empty-function */
655
- var Ge = {
665
+ var Xe = {
656
666
  body: {
657
667
  appendChild: function e() {
658
668
  return [];
@@ -707,13 +717,13 @@
707
717
  }
708
718
  };
709
719
  function Ye() {
710
- var e = typeof document !== "undefined" ? document : Ge;
720
+ var e = typeof document !== "undefined" ? document : Xe;
711
721
  return e;
712
722
  }
713
723
  // CONCATENATED MODULE: ./src/utils/ssrWindow.ts
714
724
  /* eslint-disable @typescript-eslint/no-empty-function */
715
- var Je = {
716
- document: Ge,
725
+ var Ge = {
726
+ document: Xe,
717
727
  navigator: {
718
728
  userAgent: ""
719
729
  },
@@ -767,13 +777,13 @@
767
777
  clearTimeout(n);
768
778
  }
769
779
  };
770
- function Qe() {
771
- var e = typeof window !== "undefined" ? window : Je;
780
+ function Je() {
781
+ var e = typeof window !== "undefined" ? window : Ge;
772
782
  return e;
773
783
  }
774
784
  // CONCATENATED MODULE: ./src/Table/HeadInner.tsx
775
- function Ze() {
776
- return Ze = Object.assign ? Object.assign.bind() : function(e) {
785
+ function Qe() {
786
+ return Qe = Object.assign ? Object.assign.bind() : function(e) {
777
787
  for (var n = 1; n < arguments.length; n++) {
778
788
  var t = arguments[n];
779
789
  for (var r in t) {
@@ -781,41 +791,41 @@
781
791
  }
782
792
  }
783
793
  return e;
784
- }, Ze.apply(null, arguments);
794
+ }, Qe.apply(null, arguments);
785
795
  }
786
- function en(e) {
787
- return rn(e) || tn(e) || ln(e) || nn();
796
+ function Ze(e) {
797
+ return tn(e) || nn(e) || an(e) || en();
788
798
  }
789
- function nn() {
799
+ function en() {
790
800
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
791
801
  }
792
- function tn(e) {
802
+ function nn(e) {
793
803
  if ("undefined" != typeof Symbol && null != e[Symbol.iterator] || null != e["@@iterator"]) return Array.from(e);
794
804
  }
795
- function rn(e) {
796
- if (Array.isArray(e)) return un(e);
805
+ function tn(e) {
806
+ if (Array.isArray(e)) return ln(e);
797
807
  }
798
- function on(e, n) {
799
- return cn(e) || sn(e, n) || ln(e, n) || an();
808
+ function rn(e, n) {
809
+ return sn(e) || un(e, n) || an(e, n) || on();
800
810
  }
801
- function an() {
811
+ function on() {
802
812
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
803
813
  }
804
- function ln(e, n) {
814
+ function an(e, n) {
805
815
  if (e) {
806
- if ("string" == typeof e) return un(e, n);
816
+ if ("string" == typeof e) return ln(e, n);
807
817
  var t = {}.toString.call(e).slice(8, -1);
808
- return "Object" === t && e.constructor && (t = e.constructor.name), "Map" === t || "Set" === t ? Array.from(e) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? un(e, n) : void 0;
818
+ return "Object" === t && e.constructor && (t = e.constructor.name), "Map" === t || "Set" === t ? Array.from(e) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? ln(e, n) : void 0;
809
819
  }
810
820
  }
811
- function un(e, n) {
821
+ function ln(e, n) {
812
822
  (null == n || n > e.length) && (n = e.length);
813
823
  for (var t = 0, r = Array(n); t < n; t++) {
814
824
  r[t] = e[t];
815
825
  }
816
826
  return r;
817
827
  }
818
- function sn(e, n) {
828
+ function un(e, n) {
819
829
  var t = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
820
830
  if (null != t) {
821
831
  var r, o, i, a, l = [], u = !0, s = !1;
@@ -837,12 +847,12 @@
837
847
  return l;
838
848
  }
839
849
  }
840
- function cn(e) {
850
+ function sn(e) {
841
851
  if (Array.isArray(e)) return e;
842
852
  }
843
- function dn(e, n) {
853
+ function cn(e, n) {
844
854
  if (null == e) return {};
845
- var t, r, o = fn(e, n);
855
+ var t, r, o = dn(e, n);
846
856
  if (Object.getOwnPropertySymbols) {
847
857
  var i = Object.getOwnPropertySymbols(e);
848
858
  for (r = 0; r < i.length; r++) {
@@ -851,7 +861,7 @@
851
861
  }
852
862
  return o;
853
863
  }
854
- function fn(e, n) {
864
+ function dn(e, n) {
855
865
  if (null == e) return {};
856
866
  var t = {};
857
867
  for (var r in e) {
@@ -862,10 +872,10 @@
862
872
  }
863
873
  return t;
864
874
  }
865
- var vn = {
875
+ var fn = {
866
876
  align: i().oneOf([ "left", "center", "right" ]),
867
877
  clickable: i().bool,
868
- columnId: i().any,
878
+ columnId: i().string,
869
879
  elementRef: i().oneOfType([ i().func, i().object ]),
870
880
  focusWithin: i().bool,
871
881
  id: i().string,
@@ -873,8 +883,6 @@
873
883
  isMenu: i().bool,
874
884
  label: i().node,
875
885
  onAutosizeColumn: i().func,
876
- onDragEnd: i().func,
877
- onDragStart: i().func,
878
886
  onRequestResize: i().func,
879
887
  resizable: i().bool,
880
888
  sortDir: i().oneOf([ "none", "asc", "desc" ]),
@@ -882,254 +890,208 @@
882
890
  width: i().oneOfType([ i().number, i().oneOf([ "auto" ]) ]),
883
891
  variant: i().oneOf([ "toggleAll", "info", "actions" ])
884
892
  };
885
- var pn = new Set([ "none", "asc", "desc" ]);
886
- var mn = Object.freeze({
893
+ var vn = new Set([ "none", "asc", "desc" ]);
894
+ var pn = Object.freeze({
887
895
  none: (0, D._)("Click to sort"),
888
896
  asc: (0, D._)("Press to sort descending"),
889
897
  desc: (0, D._)("Press to sort ascending")
890
898
  });
891
899
  var bn = Object.freeze({
892
- none: je(),
893
- asc: De(),
894
- desc: Ie()
900
+ none: ze(),
901
+ asc: Pe(),
902
+ desc: qe()
895
903
  });
896
- function hn(e) {
897
- var n = e.index, o = e.clickable, i = e.columnId, a = e.elementRef, l = e.focusWithin, u = e.id, s = e.width, c = e.onDragEnd, d = e.onAutosizeColumn, f = e.align, v = f === void 0 ? "left" : f, p = e.label, m = e.isMenu, b = m === void 0 ? false : m, h = e.onDragStart, y = e.onRequestResize, w = e.resizable, C = w === void 0 ? true : w, x = e.sortDir, S = x === void 0 ? undefined : x, k = e.truncate, E = k === void 0 ? true : k, I = e.variant, T = dn(e, [ "index", "clickable", "columnId", "elementRef", "focusWithin", "id", "width", "onDragEnd", "onAutosizeColumn", "align", "label", "isMenu", "onDragStart", "onRequestResize", "resizable", "sortDir", "truncate", "variant" ]);
904
+ function mn(e) {
905
+ var n = e.align, o = n === void 0 ? "left" : n, i = e.clickable, a = e.columnId, l = e.elementRef, u = e.focusWithin, s = e.id, c = e.index, d = e.isMenu, f = d === void 0 ? false : d, v = e.label, p = e.onAutosizeColumn, b = e.onRequestResize, m = e.resizable, h = m === void 0 ? true : m, y = e.sortDir, w = e.truncate, C = w === void 0 ? true : w, x = e.variant, k = e.width, O = cn(e, [ "align", "clickable", "columnId", "elementRef", "focusWithin", "id", "index", "isMenu", "label", "onAutosizeColumn", "onRequestResize", "resizable", "sortDir", "truncate", "variant", "width" ]);
898
906
  if (false) {}
899
- var j = (0, D._)("Click to open menu");
900
- var q = (0, t.useState)(), z = on(q, 2), P = z[0], _ = z[1];
901
- var M = (0, t.useState)(false), $ = on(M, 2), N = $[0], L = $[1];
902
- var W = (0, t.useState)(false), K = on(W, 2), B = K[0], F = K[1];
903
- var V = (0, t.useState)(0), U = on(V, 2), X = U[0], G = U[1];
904
- var Y = (0, t.useState)(0), J = on(Y, 2), Q = J[0], Z = J[1];
905
- var ee = (0, t.useRef)(null);
906
- var ne = (0, t.useRef)(s === "auto" ? undefined : s);
907
- // Cleanup dragend, and unmount during drag
908
- (0, t.useEffect)((function() {
909
- return function() {
910
- return P === null || P === void 0 ? void 0 : P.remove();
911
- };
912
- }), [ P ]);
913
- var te;
914
- var re;
915
- if (S !== undefined && pn.has(S)) {
916
- te = bn[S];
917
- re = mn[S];
907
+ var R = (0, D._)("Click to open menu");
908
+ var I = (0, t.useState)(false), T = rn(I, 2), j = T[0], A = T[1];
909
+ var P = (0, t.useState)(0), _ = rn(P, 2), z = _[0], M = _[1];
910
+ var $ = (0, t.useState)(0), N = rn($, 2), W = N[0], H = N[1];
911
+ var K = (0, t.useRef)(null);
912
+ var B = (0, t.useRef)(k === "auto" ? undefined : k);
913
+ var V;
914
+ var F;
915
+ if (y !== undefined && vn.has(y)) {
916
+ V = bn[y];
917
+ F = pn[y];
918
918
  }
919
- if (s === "auto") {
920
- var oe;
921
- var ie = ee.current;
922
- var ae = ie === null || ie === void 0 ? void 0 : (oe = ie.parentElement) === null || oe === void 0 ? void 0 : oe.getBoundingClientRect();
923
- ne.current = ae === null || ae === void 0 ? void 0 : ae.width;
919
+ if (k === "auto") {
920
+ var U;
921
+ var X = K.current;
922
+ var Y = X === null || X === void 0 ? void 0 : (U = X.parentElement) === null || U === void 0 ? void 0 : U.getBoundingClientRect();
923
+ B.current = Y === null || Y === void 0 ? void 0 : Y.width;
924
924
  } else {
925
- ne.current = s;
926
- }
927
- var le = (0, t.useCallback)((function(e) {
928
- ee.current = e;
929
- H(a, e);
930
- }), [ a, ee ]);
931
- var ue = (0, t.useCallback)((function(e) {
932
- var t = (0, R.keycode)(e.nativeEvent);
933
- if (y === undefined || n === undefined) {
925
+ B.current = k;
926
+ }
927
+ var G = (0, t.useCallback)((function(e) {
928
+ K.current = e;
929
+ L(l, e);
930
+ }), [ l, K ]);
931
+ var J = (0, t.useCallback)((function(e) {
932
+ var n = (0, E.keycode)(e.nativeEvent);
933
+ if (b === undefined || c === undefined) {
934
934
  return;
935
935
  }
936
- if (s === "auto") {
937
- var r;
938
- var o = ee.current;
939
- var a = o === null || o === void 0 ? void 0 : (r = o.parentElement) === null || r === void 0 ? void 0 : r.getBoundingClientRect();
940
- ne.current = a === null || a === void 0 ? void 0 : a.width;
936
+ if (k === "auto") {
937
+ var t;
938
+ var r = K.current;
939
+ var o = r === null || r === void 0 ? void 0 : (t = r.parentElement) === null || t === void 0 ? void 0 : t.getBoundingClientRect();
940
+ B.current = o === null || o === void 0 ? void 0 : o.width;
941
941
  } else {
942
- ne.current = s;
942
+ B.current = k;
943
943
  }
944
- if (ne.current === undefined) {
944
+ if (B.current === undefined) {
945
945
  return;
946
946
  }
947
- if (t === "left") {
947
+ if (n === "left") {
948
948
  e.preventDefault();
949
949
  // prevent text selection
950
- var l = Math.max(ne.current - 10, 20);
951
- y(e, {
952
- index: n,
953
- columnId: i,
954
- id: u,
955
- width: l
950
+ var i = Math.max(B.current - 10, 20);
951
+ b(e, {
952
+ index: c,
953
+ columnId: a,
954
+ id: s,
955
+ width: i
956
956
  });
957
957
  }
958
- if (t === "right") {
958
+ if (n === "right") {
959
959
  e.preventDefault();
960
960
  // prevent text selection
961
- var c = ne.current + 10;
962
- y(e, {
963
- index: n,
964
- columnId: i,
965
- id: u,
966
- width: c
961
+ var l = B.current + 10;
962
+ b(e, {
963
+ index: c,
964
+ columnId: a,
965
+ id: s,
966
+ width: l
967
967
  });
968
968
  }
969
- if (t === "enter") {
969
+ if (n === "enter") {
970
970
  e.preventDefault();
971
971
  // SUI-7320: prevent sorting and dropdown opening
972
972
  }
973
- }), [ i, u, n, y, s ]);
974
- var se = (0, t.useCallback)((function(e) {
975
- if (s === "auto") {
973
+ }), [ a, s, c, b, k ]);
974
+ var Q = (0, t.useCallback)((function(e) {
975
+ if (k === "auto") {
976
976
  var n;
977
- var t = ee.current;
977
+ var t = K.current;
978
978
  var r = t === null || t === void 0 ? void 0 : (n = t.parentElement) === null || n === void 0 ? void 0 : n.getBoundingClientRect();
979
- ne.current = r === null || r === void 0 ? void 0 : r.width;
979
+ B.current = r === null || r === void 0 ? void 0 : r.width;
980
980
  } else {
981
- ne.current = s;
981
+ B.current = k;
982
982
  }
983
- if (ne.current === undefined) {
983
+ if (B.current === undefined) {
984
984
  return;
985
985
  }
986
986
  e.preventDefault();
987
987
  // prevent text selection
988
- G(e.clientX);
989
- Z(ne.current || 0);
990
- L(true);
991
- }), [ s ]);
992
- var ce = function e(t) {
993
- var r = X - t.clientX;
994
- var o = Math.max(Q - r, 16);
995
- if (n !== undefined) {
996
- y === null || y === void 0 ? void 0 : y(t, {
997
- index: n,
998
- columnId: i,
999
- id: u,
1000
- width: o
988
+ M(e.clientX);
989
+ H(B.current || 0);
990
+ A(true);
991
+ }), [ k ]);
992
+ var Z = function e(n) {
993
+ var t = z - n.clientX;
994
+ var r = Math.max(W - t, 16);
995
+ if (c !== undefined) {
996
+ b === null || b === void 0 ? void 0 : b(n, {
997
+ index: c,
998
+ columnId: a,
999
+ id: s,
1000
+ width: r
1001
1001
  });
1002
1002
  }
1003
1003
  };
1004
- var de = function e() {
1005
- L(false);
1004
+ var ee = function e() {
1005
+ A(false);
1006
1006
  };
1007
- var fe = (0, t.useCallback)((function(e) {
1008
- var t;
1009
- var r = Ye();
1010
- var o = ee.current;
1011
- if (e.dataTransfer.setDragImage && (o === null || o === void 0 ? void 0 : o.parentElement)) {
1012
- var a = o.parentElement.getBoundingClientRect();
1013
- var l = o.cloneNode(true);
1014
- l.style.width = "".concat(a.width, "px");
1015
- l.style.height = "".concat(a.height, "px");
1016
- l.setAttribute("data-helper", "true");
1017
- r.body.appendChild(l);
1018
- e.dataTransfer.setDragImage(l, e.clientX - a.left, e.clientY - a.top);
1019
- F(true);
1020
- _(l);
1021
- }
1022
- e.dataTransfer.effectAllowed = "move";
1023
- e.dataTransfer.setData("text", (t = o === null || o === void 0 ? void 0 : o.textContent) !== null && t !== void 0 ? t : "");
1024
- // Required for Firefox
1025
- h === null || h === void 0 ? void 0 : h(n, i);
1026
- }), [ i, n, h ]);
1027
- var ve = (0, t.useCallback)((function() {
1028
- _(undefined);
1029
- F(false);
1030
- c === null || c === void 0 ? void 0 : c();
1031
- }), [ c ]);
1032
- var pe = (0, t.useCallback)((function(e) {
1033
- if (n !== undefined) {
1034
- d === null || d === void 0 ? void 0 : d(e, {
1035
- index: n,
1036
- columnId: i
1007
+ var ne = (0, t.useCallback)((function(e) {
1008
+ if (c !== undefined) {
1009
+ p === null || p === void 0 ? void 0 : p(e, {
1010
+ index: c,
1011
+ columnId: a
1037
1012
  });
1038
1013
  }
1039
- }), [ i, n, d ]);
1040
- var me = !!h;
1041
- var be = Qe();
1042
- var he = ne.current ? (0, A.sprintf)((0, D._)("%(width)d pixels"), {
1043
- width: ne.current
1014
+ }), [ a, c, p ]);
1015
+ var te = Je();
1016
+ var re = B.current ? (0, q.sprintf)((0, D._)("%(width)d pixels"), {
1017
+ width: B.current
1044
1018
  }) : undefined;
1045
- var ye = i ? {
1046
- ariaControls: i
1019
+ var oe = a ? {
1020
+ ariaControls: a
1047
1021
  } : {};
1048
1022
 
1049
- return r().createElement(Ue, Ze({
1050
- draggable: me || undefined,
1051
- onDragStart: me ? fe : undefined,
1052
- onDragEnd: me ? ve : undefined,
1053
- ref: le,
1054
- as: o ? "button" : "div",
1055
- $align: v,
1056
- $draggable: me,
1057
- $dragging: !!B,
1058
- $clickable: o,
1059
- $focusWithin: l,
1060
- $variant: I
1061
- }, g()(T, [].concat(en(Object.keys(hn.propTypes)), [ "id" ]))), N && r().createElement(r().Fragment, null, r().createElement(O(), {
1062
- target: be,
1023
+ return r().createElement(Fe, Qe({
1024
+ as: i ? "button" : "div",
1025
+ ref: G,
1026
+ $align: o,
1027
+ $clickable: i,
1028
+ $focusWithin: u,
1029
+ $variant: x
1030
+ }, g()(O, [].concat(Ze(Object.keys(mn.propTypes)), [ "id" ]))), j && r().createElement(r().Fragment, null, r().createElement(S(), {
1031
+ target: te,
1063
1032
  eventType: "mouseup",
1064
- listener: de
1065
- }), r().createElement(O(), {
1066
- target: be,
1033
+ listener: ee
1034
+ }), r().createElement(S(), {
1035
+ target: te,
1067
1036
  eventType: "mousemove",
1068
- listener: ce
1069
- })), y && C && r().createElement(Xe, Ze({
1070
- "aria-label": (0, A.sprintf)((0, D._)("Resize %(label)s"), {
1071
- label: p
1037
+ listener: Z
1038
+ })), b && h && r().createElement(Ue, Qe({
1039
+ "aria-label": (0, q.sprintf)((0, D._)("Resize %(label)s"), {
1040
+ label: v
1072
1041
  })
1073
- }, ye, {
1074
- "aria-valuetext": he,
1042
+ }, oe, {
1043
+ "aria-valuetext": re,
1075
1044
  "data-test": "resize",
1076
- onMouseDown: se,
1077
- onDoubleClick: pe,
1078
- onKeyDown: ue,
1045
+ onMouseDown: Q,
1046
+ onDoubleClick: ne,
1047
+ onKeyDown: J,
1079
1048
  orientation: "vertical",
1080
1049
  tabIndex: 0
1081
- })), me && r().createElement(r().Fragment, null, r().createElement(We, null, r().createElement(_e(), null)), r().createElement($e(), null, (0,
1082
- D._)("Press left or right arrow key to reorder the columns."))), r().createElement(Be, {
1083
- $align: v,
1084
- $truncate: E,
1085
- $fill: b,
1086
- $variant: I
1087
- }, p, b &&
1050
+ })), r().createElement(Ke, {
1051
+ $align: o,
1052
+ $truncate: C,
1053
+ $fill: !!f,
1054
+ $variant: x
1055
+ }, v, f &&
1088
1056
 
1089
1057
  // this icon indicates "has a menu" in all themes
1090
- r().createElement(Ke, null, r().createElement(ze(), {
1058
+ r().createElement(He, null, r().createElement($e(), {
1091
1059
  "data-test": "caret-down",
1092
- "aria-label": j
1093
- }))), S && r().createElement(Fe, null, te !== undefined && r().createElement(te, {
1060
+ "aria-label": R
1061
+ }))), y && r().createElement(Be, null, V !== undefined && r().createElement(V, {
1094
1062
  "aria-hidden": false,
1095
- "aria-label": re
1063
+ "aria-label": F
1096
1064
  })));
1097
1065
  }
1098
- hn.propTypes = vn;
1099
- /* harmony default export */ const yn = hn;
1066
+ mn.propTypes = fn;
1067
+ /* harmony default export */ const hn = mn;
1100
1068
  // CONCATENATED MODULE: ./src/Table/HeadCellStyles.ts
1069
+ var yn = $().div.withConfig({
1070
+ displayName: "HeadCellStyles__StyledInnerWrapper",
1071
+ componentId: "sc-1hj81sa-0"
1072
+ })([ "display:flex;" ]);
1101
1073
  var gn = $().th.withConfig({
1102
1074
  displayName: "HeadCellStyles__Styled",
1103
- componentId: "sc-1hj81sa-0"
1104
- })([ "", ";background-color:", ";box-sizing:content-box;text-align:left;vertical-align:", ";& + &{border-left:1px solid ", ";}*:where(button):focus{box-shadow:", ";}", " ", " ", "" ], N.mixins.reset("table-cell"), N.variables.neutral100, (function(e) {
1075
+ componentId: "sc-1hj81sa-1"
1076
+ })([ "", ";background-color:", ";box-sizing:content-box;text-align:left;vertical-align:", ";position:relative;&:not(:first-child){", "{border-left:1px solid ", ";}}*:where(button):focus{box-shadow:", ";}", " ", "" ], N.mixins.reset("table-cell"), N.variables.neutral100, (function(e) {
1105
1077
  var n = e.$variant;
1106
1078
  return n ? "middle" : "top";
1107
- }), N.variables.borderColorWeak, N.variables.focusShadowInset, (function(e) {
1108
- var n = e.$isFixed, t = e.$zIndex;
1109
- return n && (0, M.css)([ "position:sticky;top:0;z-index:", ";&:not(:first-child)::before{content:'';height:100%;position:absolute;top:0;bottom:0;box-shadow:-1px 0 0 0 ", ";width:2px;border:0;left:0;margin-right:-2px;color:transparent;}&:not(:last-child)::after{content:'';height:100%;position:absolute;top:0;bottom:0;box-shadow:1px 0 0 0 ", ";width:2px;border:0;right:0;margin-left:-2px;color:transparent;}" ], t, N.variables.backgroundColorPage, N.variables.backgroundColorPage);
1110
- }), (function(e) {
1111
- var n = e.$dragging;
1112
- return n && (0, M.css)([ "background-color:", ";&:focus{box-shadow:none;}" ], N.variables.interactiveColorOverlayDrag);
1079
+ }), /* sc-sel */ yn, N.variables.borderColorWeak, N.variables.focusShadowInset, (function(e) {
1080
+ var n = e.$isDragging;
1081
+ return n && (0, M.css)([ "background-color:", ";&:focus{box-shadow:none;}" ], N.variables.backgroundColorPage);
1113
1082
  }), (0, N.pickVariant)("$variant", {
1114
- actions: (0, M.css)([ "*:where(button){", " &:focus{box-shadow:", ";}}" ], (0, fe.buttonMixin)("subtle", {
1083
+ actions: (0, M.css)([ "*:where(button){", " &:focus{box-shadow:", ";}}" ], (0, pe.buttonMixin)("subtle", {
1115
1084
  color: N.variables.contentColorDefault
1116
1085
  }), N.variables.focusShadowInset)
1117
1086
  }));
1118
- var wn = $().div.withConfig({
1119
- displayName: "HeadCellStyles__StyledGuideLine",
1120
- componentId: "sc-1hj81sa-1"
1121
- })([ "", " width:1px;position:absolute;background-color:", ";height:100%;top:0;z-index:1;", "" ], N.mixins.reset("block"), N.variables.interactiveColorAccent, (0,
1122
- N.pickVariant)("$position", {
1123
- before: (0, M.css)([ "float:left;", ":not(:first-child) > &{margin-left:-1px;}" ], /* sc-sel */ gn),
1124
- after: (0, M.css)([ "right:0;" ])
1125
- }));
1126
- // CONCATENATED MODULE: ./src/Table/TableContext.ts
1127
- var Cn = (0, t.createContext)({});
1128
- Cn.displayName = "Table";
1129
- /* harmony default export */ const xn = Cn;
1087
+ // TODO(SUI-7400): Refactor the drag handler of re-order column
1088
+ var wn = $().div.withConfig({
1089
+ displayName: "HeadCellStyles__StyledDragHandler",
1090
+ componentId: "sc-1hj81sa-2"
1091
+ })([ "display:inline-flex;align-items:center;justify-content:center;width:20px;cursor:move;-webkit-user-select:none;-moz-user-select:none;user-select:none;&:hover{background:", ";color:", ";}&:focus{background:", ";box-shadow:", ";color:", ";}" ], N.variables.interactiveColorOverlayHover, N.variables.contentColorActive, N.variables.interactiveColorOverlayDrag, N.variables.focusShadowInset, N.variables.contentColorActive);
1130
1092
  // CONCATENATED MODULE: ./src/Table/HeadCell.tsx
1131
- function Sn() {
1132
- return Sn = Object.assign ? Object.assign.bind() : function(e) {
1093
+ function Cn() {
1094
+ return Cn = Object.assign ? Object.assign.bind() : function(e) {
1133
1095
  for (var n = 1; n < arguments.length; n++) {
1134
1096
  var t = arguments[n];
1135
1097
  for (var r in t) {
@@ -1137,56 +1099,11 @@
1137
1099
  }
1138
1100
  }
1139
1101
  return e;
1140
- }, Sn.apply(null, arguments);
1141
- }
1142
- function kn(e, n) {
1143
- return Tn(e) || In(e, n) || Rn(e, n) || On();
1144
- }
1145
- function On() {
1146
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1147
- }
1148
- function Rn(e, n) {
1149
- if (e) {
1150
- if ("string" == typeof e) return En(e, n);
1151
- var t = {}.toString.call(e).slice(8, -1);
1152
- return "Object" === t && e.constructor && (t = e.constructor.name), "Map" === t || "Set" === t ? Array.from(e) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? En(e, n) : void 0;
1153
- }
1154
- }
1155
- function En(e, n) {
1156
- (null == n || n > e.length) && (n = e.length);
1157
- for (var t = 0, r = Array(n); t < n; t++) {
1158
- r[t] = e[t];
1159
- }
1160
- return r;
1161
- }
1162
- function In(e, n) {
1163
- var t = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
1164
- if (null != t) {
1165
- var r, o, i, a, l = [], u = !0, s = !1;
1166
- try {
1167
- if (i = (t = t.call(e)).next, 0 === n) {
1168
- if (Object(t) !== t) return;
1169
- u = !1;
1170
- } else for (;!(u = (r = i.call(t)).done) && (l.push(r.value), l.length !== n); u = !0) {
1171
- }
1172
- } catch (e) {
1173
- s = !0, o = e;
1174
- } finally {
1175
- try {
1176
- if (!u && null != t["return"] && (a = t["return"](), Object(a) !== a)) return;
1177
- } finally {
1178
- if (s) throw o;
1179
- }
1180
- }
1181
- return l;
1182
- }
1102
+ }, Cn.apply(null, arguments);
1183
1103
  }
1184
- function Tn(e) {
1185
- if (Array.isArray(e)) return e;
1186
- }
1187
- function Dn(e, n) {
1104
+ function xn(e, n) {
1188
1105
  if (null == e) return {};
1189
- var t, r, o = An(e, n);
1106
+ var t, r, o = Sn(e, n);
1190
1107
  if (Object.getOwnPropertySymbols) {
1191
1108
  var i = Object.getOwnPropertySymbols(e);
1192
1109
  for (r = 0; r < i.length; r++) {
@@ -1195,7 +1112,7 @@
1195
1112
  }
1196
1113
  return o;
1197
1114
  }
1198
- function An(e, n) {
1115
+ function Sn(e, n) {
1199
1116
  if (null == e) return {};
1200
1117
  var t = {};
1201
1118
  for (var r in e) {
@@ -1206,21 +1123,23 @@
1206
1123
  }
1207
1124
  return t;
1208
1125
  }
1209
- /** @public */ var jn = {
1126
+ /** @public */
1127
+ /** @public */ var kn = {
1210
1128
  align: i().oneOf([ "left", "center", "right" ]),
1211
1129
  /** @private Used to set the $clickable appearance without an onClick */
1212
1130
  appearClickable: i().bool,
1213
1131
  children: i().node,
1214
- columnId: i().any,
1132
+ columnId: i().string,
1133
+ /** @private. */
1134
+ dragId: i().oneOfType([ i().string, i().number ]),
1215
1135
  elementRef: i().oneOfType([ i().func, i().object ]),
1136
+ headCellScreenReaderText: i().string,
1216
1137
  /** @private The index of the cell, skipping the info column. */
1217
1138
  index: i().number,
1218
1139
  /** @private. */
1219
1140
  onAutosizeColumn: i().func,
1220
1141
  /** @private. */
1221
1142
  onClick: i().func,
1222
- /** @private. */
1223
- onDragStart: i().func,
1224
1143
  /**
1225
1144
  * @private. Passed through and works as expected.
1226
1145
  */
@@ -1231,8 +1150,6 @@
1231
1150
  onRequestResize: i().func,
1232
1151
  onSort: i().func,
1233
1152
  resizable: i().bool,
1234
- /** @private. */
1235
- showGuideline: i().oneOf([ "none", "before", "after" ]),
1236
1153
  sortDir: i().oneOf([ "asc", "desc", "none" ]),
1237
1154
  sortKey: i().string,
1238
1155
  truncate: i().bool,
@@ -1244,135 +1161,128 @@
1244
1161
  * @private
1245
1162
  */
1246
1163
  visible: i().bool,
1247
- width: i().oneOfType([ i().number, i().oneOf([ "auto" ]) ]),
1248
- /** @private. */
1249
- zIndex: i().number
1164
+ width: i().oneOfType([ i().number, i().oneOf([ "auto" ]) ])
1250
1165
  };
1251
- var qn = {
1166
+ var On = {
1252
1167
  asc: "ascending",
1253
1168
  desc: "descending",
1254
1169
  none: "none"
1255
1170
  };
1256
- function zn(e) {
1257
- var n = e.align, o = n === void 0 ? "left" : n, i = e.appearClickable, a = e.children, l = e.columnId, u = e.elementRef, s = e.id, c = e.index, d = e.onAutosizeColumn, f = e.onClick, v = e.onDragStart, p = e.onKeyDown, m = e.onRequestMoveColumn, b = e.onRequestResize, h = e.onSort, y = e.resizable, g = y === void 0 ? true : y, w = e.showGuideline, C = w === void 0 ? "none" : w, x = e.sortDir, S = x === void 0 ? "none" : x, k = e.sortKey, O = e.style, E = e.truncate, I = E === void 0 ? true : E, T = e.variant, D = e.visible, A = D === void 0 ? true : D, j = e.width, q = e.zIndex, z = q === void 0 ? 1 : q, P = Dn(e, [ "align", "appearClickable", "children", "columnId", "elementRef", "id", "index", "onAutosizeColumn", "onClick", "onDragStart", "onKeyDown", "onRequestMoveColumn", "onRequestResize", "onSort", "resizable", "showGuideline", "sortDir", "sortKey", "style", "truncate", "variant", "visible", "width", "zIndex" ]);
1171
+ function Rn(e) {
1172
+ var n = e.align, o = n === void 0 ? "left" : n, i = e.appearClickable, a = e.children, u = e.columnId, s = e.elementRef, c = e.dragId, d = e.headCellScreenReaderText, f = e.id, v = e.index, p = e.onAutosizeColumn, b = e.onClick, m = e.onKeyDown, h = e.onRequestMoveColumn, y = e.onRequestResize, g = e.onSort, w = e.resizable, C = w === void 0 ? true : w, x = e.sortDir, S = x === void 0 ? "none" : x, k = e.sortKey, O = e.style, R = e.truncate, E = R === void 0 ? true : R, I = e.variant, T = e.visible, j = T === void 0 ? true : T, A = e.width, P = xn(e, [ "align", "appearClickable", "children", "columnId", "elementRef", "dragId", "headCellScreenReaderText", "id", "index", "onAutosizeColumn", "onClick", "onKeyDown", "onRequestMoveColumn", "onRequestResize", "onSort", "resizable", "sortDir", "sortKey", "style", "truncate", "variant", "visible", "width" ]);
1258
1173
  // @docs-props-type HeadCellPropsBase
1259
- var _ = (0, t.useState)(false), M = kn(_, 2), $ = M[0], N = M[1];
1260
- var L = (0, t.useContext)(xn), H = L.headType;
1261
- var W = (0, t.useCallback)((function(e) {
1174
+ var _ = !!h;
1175
+ var z = (0, l.useSortable)({
1176
+ // dragId is optional in HeadCell but required by useSortable
1177
+ // since it is always set in Table, use a type assertion here to avoid TypeScript error
1178
+ id: c
1179
+ }), M = z.attributes, $ = z.isDragging, N = z.listeners, W = z.setNodeRef;
1180
+ var H = (0, t.useCallback)((function(e) {
1181
+ L(s, e);
1182
+ if (_) {
1183
+ W(e);
1184
+ }
1185
+ }), [ _, s, W ]);
1186
+ var K = (0, t.useCallback)((function(e) {
1262
1187
  // ignore clicks on the resize handle
1263
- if (e.target.getAttribute("data-test") !== "resize" && h && c !== undefined) {
1264
- h(e, {
1188
+ if (e.target.getAttribute("data-test") !== "resize" && g && v !== undefined) {
1189
+ g(e, {
1265
1190
  sortKey: k,
1266
1191
  sortDir: S,
1267
- id: s,
1268
- columnId: l,
1269
- index: c
1192
+ id: f,
1193
+ columnId: u,
1194
+ index: v
1270
1195
  });
1271
1196
  }
1272
- f === null || f === void 0 ? void 0 : f();
1273
- }), [ l, s, c, f, h, S, k ]);
1274
- var K = (0, t.useCallback)((function(e) {
1275
- if (e.target.getAttribute("data-test") !== "resize") {
1276
- if ((0, R.keycode)(e.nativeEvent) === "left" && c !== undefined && c > 0) {
1277
- m === null || m === void 0 ? void 0 : m({
1278
- fromIndex: c,
1279
- toIndex: c - 1,
1280
- columnId: l
1281
- });
1282
- } else if ((0, R.keycode)(e.nativeEvent) === "right" && c !== undefined) {
1283
- m === null || m === void 0 ? void 0 : m({
1284
- fromIndex: c,
1285
- toIndex: c + 1,
1286
- columnId: l
1287
- });
1288
- }
1289
- }
1290
- if (c !== undefined) {
1291
- p === null || p === void 0 ? void 0 : p(e, {
1292
- index: c,
1293
- columnId: l
1197
+ b === null || b === void 0 ? void 0 : b();
1198
+ }), [ u, f, v, b, g, S, k ]);
1199
+ var B = (0, t.useCallback)((function(e) {
1200
+ if (v !== undefined) {
1201
+ m === null || m === void 0 ? void 0 : m(e, {
1202
+ index: v,
1203
+ columnId: u
1294
1204
  });
1295
1205
  }
1296
- }), [ l, c, p, m ]);
1297
- var B = (0, t.useCallback)((function(e, n) {
1298
- N(true);
1299
- v === null || v === void 0 ? void 0 : v(e, n);
1300
- }), [ v ]);
1301
- var F = (0, t.useCallback)((function() {
1302
- N(false);
1303
- }), []);
1304
- var V = !!v;
1305
- var U = !!h && !!S;
1306
- var X = f !== undefined;
1307
- var G = Re()(O, {
1308
- width: j
1309
- });
1310
- var Y = T === "actions" ? false : I;
1206
+ }), [ u, v, m ]);
1207
+ var V = !!g && !!S;
1208
+ var F = b !== undefined;
1209
+ var U = I === "actions" ? false : E;
1210
+ var X = (0, t.useMemo)((function() {
1211
+ return Ie()({}, O, {
1212
+ width: A
1213
+ });
1214
+ }), [ O, A ]);
1215
+ var Y;
1216
+ if (d) {
1217
+ Y = d;
1218
+ } else if (Re()(a)) {
1219
+ Y = a;
1220
+ }
1311
1221
 
1312
- return r().createElement(gn, Sn({
1313
- style: G,
1314
- ref: u,
1315
- "aria-sort": h && (qn[S] || "none"),
1222
+ return r().createElement(gn, Cn({
1223
+ style: X,
1224
+ ref: H,
1225
+ "aria-sort": g && (On[S] || "none"),
1316
1226
  "data-test": "head-cell",
1317
- "data-test-label": ke()(a) ? a : undefined,
1318
- "data-test-sort-dir": h && S,
1319
- id: A ? s : undefined,
1320
- onClick: h || X ? W : undefined,
1321
- $dragging: $ || undefined,
1322
- $variant: T,
1323
- $zIndex: z,
1324
- $isFixed: H === "fixed",
1325
- onKeyDown: V || h || X ? K : undefined
1326
- }, P), r().createElement(yn, {
1327
- label: a,
1227
+ "data-test-label": Re()(a) ? a : undefined,
1228
+ "data-test-sort-dir": g && S,
1229
+ id: j ? f : undefined,
1230
+ $isDragging: _ && $,
1231
+ $variant: I
1232
+ }, P), r().createElement(yn, null, _ && r().createElement(wn, Cn({
1233
+ "aria-label": (0, q.sprintf)((0, D._)("Reorder %(labelString)s"), {
1234
+ labelString: Y
1235
+ }),
1236
+ "data-test": "drag",
1237
+ draggable: true
1238
+ }, M, N), r().createElement(je(), null)), r().createElement(hn, {
1328
1239
  align: o,
1329
- columnId: l,
1330
- id: s,
1331
- index: c,
1332
- resizable: A && g,
1333
- onDragStart: v ? B : undefined,
1334
- onDragEnd: v ? F : undefined,
1335
- onAutosizeColumn: d,
1336
- onRequestResize: b,
1337
- sortDir: h && S,
1338
- truncate: Y,
1339
- width: j,
1340
- clickable: i || V || U || X,
1240
+ clickable: i || V || F,
1241
+ columnId: u,
1341
1242
  focusWithin: i,
1342
- variant: T
1343
- }), C !== "none" && r().createElement(wn, {
1344
- $position: C
1345
- }));
1243
+ label: a,
1244
+ id: f,
1245
+ index: v,
1246
+ onAutosizeColumn: p,
1247
+ onClick: g || F ? K : undefined,
1248
+ onKeyDown: g || F ? B : undefined,
1249
+ onRequestResize: y,
1250
+ resizable: j && C,
1251
+ sortDir: g && S,
1252
+ truncate: U,
1253
+ variant: I,
1254
+ width: A
1255
+ })));
1346
1256
  }
1347
- zn.propTypes = jn;
1348
- zn.splunkUiType = "Table.HeadCell";
1349
- /* harmony default export */ const Pn = zn;
1257
+ Rn.propTypes = kn;
1258
+ Rn.splunkUiType = "Table.HeadCell";
1259
+ /* harmony default export */ const En = Rn;
1350
1260
  // CONCATENATED MODULE: external "@dnd-kit/utilities"
1351
- const _n = require("@dnd-kit/utilities");
1261
+ const In = require("@dnd-kit/utilities");
1352
1262
  // CONCATENATED MODULE: external "@splunk/react-icons/DotsThreeVertical"
1353
- const Mn = require("@splunk/react-icons/DotsThreeVertical");
1354
- var $n = e.n(Mn);
1263
+ const Tn = require("@splunk/react-icons/DotsThreeVertical");
1264
+ var jn = e.n(Tn);
1355
1265
  // CONCATENATED MODULE: external "@splunk/react-ui/Button"
1356
- const Nn = require("@splunk/react-ui/Button");
1357
- var Ln = e.n(Nn);
1266
+ const Dn = require("@splunk/react-ui/Button");
1267
+ var qn = e.n(Dn);
1358
1268
  // CONCATENATED MODULE: external "@splunk/react-ui/Dropdown"
1359
- const Hn = require("@splunk/react-ui/Dropdown");
1360
- var Wn = e.n(Hn);
1269
+ const An = require("@splunk/react-ui/Dropdown");
1270
+ var Pn = e.n(An);
1361
1271
  // CONCATENATED MODULE: external "@splunk/react-ui/Tooltip"
1362
- const Kn = require("@splunk/react-ui/Tooltip");
1363
- var Bn = e.n(Kn);
1272
+ const _n = require("@splunk/react-ui/Tooltip");
1273
+ var zn = e.n(_n);
1364
1274
  // CONCATENATED MODULE: external "@splunk/react-icons/ChevronRight"
1365
- const Fn = require("@splunk/react-icons/ChevronRight");
1366
- var Vn = e.n(Fn);
1275
+ const Mn = require("@splunk/react-icons/ChevronRight");
1276
+ var $n = e.n(Mn);
1367
1277
  // CONCATENATED MODULE: ./src/Table/ExpandButtonStyles.ts
1368
- var Un = "2px";
1369
- var Xn = "16px";
1370
- var Gn = (0, M.css)([ "padding-top:calc((", " + ", "*2 - ", ") / 2);" ], N.variables.inputHeight, Un, Xn);
1371
- var Yn = $().button.withConfig({
1278
+ var Nn = "2px";
1279
+ var Wn = "16px";
1280
+ var Ln = (0, M.css)([ "padding-top:calc((", " + ", "*2 - ", ") / 2);" ], N.variables.inputHeight, Nn, Wn);
1281
+ var Hn = $().button.withConfig({
1372
1282
  displayName: "ExpandButtonStyles__StyledButton",
1373
1283
  componentId: "sc-7nlw5q-0"
1374
- })([ "", ";height:100%;width:100%;cursor:pointer;justify-content:center;padding:", ";", ";color:", " &:hover{color:", ";}&:focus{color:", ";box-shadow:", ";}" ], N.mixins.reset("flex"), N.variables.spacingXSmall, Gn, N.variables.contentColorDefault, N.variables.contentColorActive, N.variables.contentColorActive, N.variables.focusShadowInset);
1375
- var Jn = $()(Vn()).withConfig({
1284
+ })([ "", ";height:100%;width:100%;cursor:pointer;justify-content:center;padding:", ";", ";color:", " &:hover{color:", ";}&:focus{color:", ";box-shadow:", ";}" ], N.mixins.reset("flex"), N.variables.spacingXSmall, Ln, N.variables.contentColorDefault, N.variables.contentColorActive, N.variables.contentColorActive, N.variables.focusShadowInset);
1285
+ var Kn = $()($n()).withConfig({
1376
1286
  displayName: "ExpandButtonStyles__StyledChevron",
1377
1287
  componentId: "sc-7nlw5q-1"
1378
1288
  })([ "transition:transform 200ms;", "" ], (function(e) {
@@ -1380,8 +1290,8 @@
1380
1290
  return n && (0, M.css)([ "transform:rotate(90deg);" ]);
1381
1291
  }));
1382
1292
  // CONCATENATED MODULE: ./src/Table/ExpandButton.tsx
1383
- function Qn() {
1384
- return Qn = Object.assign ? Object.assign.bind() : function(e) {
1293
+ function Bn() {
1294
+ return Bn = Object.assign ? Object.assign.bind() : function(e) {
1385
1295
  for (var n = 1; n < arguments.length; n++) {
1386
1296
  var t = arguments[n];
1387
1297
  for (var r in t) {
@@ -1389,11 +1299,11 @@
1389
1299
  }
1390
1300
  }
1391
1301
  return e;
1392
- }, Qn.apply(null, arguments);
1302
+ }, Bn.apply(null, arguments);
1393
1303
  }
1394
- function Zn(e, n) {
1304
+ function Vn(e, n) {
1395
1305
  if (null == e) return {};
1396
- var t, r, o = et(e, n);
1306
+ var t, r, o = Fn(e, n);
1397
1307
  if (Object.getOwnPropertySymbols) {
1398
1308
  var i = Object.getOwnPropertySymbols(e);
1399
1309
  for (r = 0; r < i.length; r++) {
@@ -1402,7 +1312,7 @@
1402
1312
  }
1403
1313
  return o;
1404
1314
  }
1405
- function et(e, n) {
1315
+ function Fn(e, n) {
1406
1316
  if (null == e) return {};
1407
1317
  var t = {};
1408
1318
  for (var r in e) {
@@ -1413,32 +1323,32 @@
1413
1323
  }
1414
1324
  return t;
1415
1325
  }
1416
- var nt = {
1326
+ var Un = {
1417
1327
  expanded: i().bool
1418
1328
  };
1419
- var tt = function e(n) {
1420
- var t = n.expanded, o = Zn(n, [ "expanded" ]);
1329
+ var Xn = function e(n) {
1330
+ var t = n.expanded, o = Vn(n, [ "expanded" ]);
1421
1331
 
1422
- return r().createElement(Yn, Qn({
1332
+ return r().createElement(Hn, Bn({
1423
1333
  title: t ? (0, D._)("Collapse row") : (0, D._)("Expand row")
1424
- }, o), r().createElement(Jn, {
1334
+ }, o), r().createElement(Kn, {
1425
1335
  $expanded: t
1426
1336
  }));
1427
1337
  };
1428
- tt.propTypes = nt;
1429
- /* harmony default export */ const rt = tt;
1338
+ Xn.propTypes = Un;
1339
+ /* harmony default export */ const Yn = Xn;
1430
1340
  // CONCATENATED MODULE: ./src/Table/RowDragCellStyles.ts
1431
- var ot = $().td.withConfig({
1341
+ var Gn = $().td.withConfig({
1432
1342
  displayName: "RowDragCellStyles__StyledCell",
1433
1343
  componentId: "sc-9kbaj2-0"
1434
1344
  })([ "", " cursor:move;touch-action:none;position:relative;vertical-align:middle;" ], N.mixins.reset("table-cell"));
1435
- var it = $().div.withConfig({
1345
+ var Jn = $().div.withConfig({
1436
1346
  displayName: "RowDragCellStyles__StyledDrag",
1437
1347
  componentId: "sc-9kbaj2-1"
1438
1348
  })([ "", " ", ";justify-content:center;cursor:move;-webkit-user-drag:element;user-select:none;align-items:center;position:absolute;width:100%;top:0;bottom:0;&:focus{outline:0;box-shadow:", ";}&:hover{background-color:", ";outline:none;}&:active{background-color:", ";box-shadow:", ";}& > div{margin:0;}@media print{background-image:none;}" ], N.mixins.reset("flex"), N.mixins.clearfix(), N.variables.focusShadowInset, N.variables.interactiveColorOverlayDrag, N.variables.interactiveColorOverlayActive, N.variables.focusShadowInset);
1439
1349
  // CONCATENATED MODULE: ./src/Table/RowDragCell.tsx
1440
- function at() {
1441
- return at = Object.assign ? Object.assign.bind() : function(e) {
1350
+ function Qn() {
1351
+ return Qn = Object.assign ? Object.assign.bind() : function(e) {
1442
1352
  for (var n = 1; n < arguments.length; n++) {
1443
1353
  var t = arguments[n];
1444
1354
  for (var r in t) {
@@ -1446,11 +1356,11 @@
1446
1356
  }
1447
1357
  }
1448
1358
  return e;
1449
- }, at.apply(null, arguments);
1359
+ }, Qn.apply(null, arguments);
1450
1360
  }
1451
- function lt(e, n) {
1361
+ function Zn(e, n) {
1452
1362
  if (null == e) return {};
1453
- var t, r, o = ut(e, n);
1363
+ var t, r, o = et(e, n);
1454
1364
  if (Object.getOwnPropertySymbols) {
1455
1365
  var i = Object.getOwnPropertySymbols(e);
1456
1366
  for (r = 0; r < i.length; r++) {
@@ -1459,7 +1369,7 @@
1459
1369
  }
1460
1370
  return o;
1461
1371
  }
1462
- function ut(e, n) {
1372
+ function et(e, n) {
1463
1373
  if (null == e) return {};
1464
1374
  var t = {};
1465
1375
  for (var r in e) {
@@ -1470,58 +1380,61 @@
1470
1380
  }
1471
1381
  return t;
1472
1382
  }
1473
- var st = {
1383
+ var nt = {
1474
1384
  setActivatorNodeRef: i().func.isRequired,
1475
1385
  listeners: i().objectOf(i().func)
1476
1386
  };
1477
- function ct(e) {
1478
- var n = e.listeners, t = e.setActivatorNodeRef, o = lt(e, [ "listeners", "setActivatorNodeRef" ]);
1387
+ function tt(e) {
1388
+ var n = e.listeners, t = e.setActivatorNodeRef, o = Zn(e, [ "listeners", "setActivatorNodeRef" ]);
1479
1389
 
1480
- return r().createElement(ot, {
1390
+ return r().createElement(Gn, {
1481
1391
  "data-helper": true
1482
- }, r().createElement(it, at({
1392
+ }, r().createElement(Jn, Qn({
1483
1393
  "data-test": "drag",
1394
+ draggable: true,
1484
1395
  ref: t,
1485
1396
  tabIndex: 0
1486
- }, n, o), r().createElement(_e(), null)));
1397
+ }, n, o), r().createElement(je(), null)));
1487
1398
  }
1488
- ct.propTypes = st;
1489
- /* harmony default export */ const dt = ct;
1399
+ tt.propTypes = nt;
1400
+ /* harmony default export */ const rt = tt;
1490
1401
  // CONCATENATED MODULE: ./src/Table/RowStyles.ts
1491
- var ft = $().tr.withConfig({
1402
+ var ot = $().tr.withConfig({
1492
1403
  displayName: "RowStyles__StyledStripeNone",
1493
1404
  componentId: "f0igqq-0"
1494
1405
  })([ "", ";", ";", " @media print{background-color:none;}" ], N.mixins.reset("table-row"), (function(e) {
1495
1406
  var n = e.$clickable;
1496
1407
  return n && (0, M.css)([ "cursor:pointer;&:hover{background-color:", ";}&:focus{background-color:", ";box-shadow:", ";}" ], N.variables.neutral100, N.variables.neutral100, N.variables.focusShadowInset);
1497
1408
  }), (function(e) {
1498
- var n = e.disabled, t = e.$expandable, r = e.$draggable;
1409
+ var n = e.disabled, t = e.$expandable, r = e.$isDraggable;
1499
1410
  return !n && !t && r && (0, M.css)([ "&:hover{background-color:", ";}" ], N.variables.interactiveColorOverlayHover);
1500
1411
  }));
1501
- var vt = $()(ft).withConfig({
1412
+ var it = $()(ot).withConfig({
1502
1413
  displayName: "RowStyles__StyledStripeEven",
1503
1414
  componentId: "f0igqq-1"
1504
1415
  })([ "background-color:", ";", ";" ], N.variables.neutral50, (function(e) {
1505
1416
  var n = e.$clickable;
1506
1417
  return n && (0, M.css)([ "cursor:pointer;&:hover,&:focus{background-color:", ";}" ], N.variables.neutral300);
1507
1418
  }));
1508
- // CONCATENATED MODULE: external "@splunk/react-ui/NonInteractiveCheckbox"
1509
- const pt = require("@splunk/react-ui/NonInteractiveCheckbox");
1510
- var mt = e.n(pt);
1511
1419
  // CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
1512
- const bt = require("@splunk/react-ui/Clickable");
1513
- var ht = e.n(bt);
1420
+ const at = require("@splunk/react-ui/Clickable");
1421
+ var lt = e.n(at);
1422
+ // CONCATENATED MODULE: external "@splunk/react-ui/NonInteractiveCheckbox"
1423
+ const ut = require("@splunk/react-ui/NonInteractiveCheckbox");
1424
+ var st = e.n(ut);
1514
1425
  // CONCATENATED MODULE: ./src/Table/ToggleStyles.ts
1515
- var yt = "2px";
1516
- var gt = "20px";
1517
- var wt = (0, M.css)([ "padding-top:calc((", " + ", "*2 - ", ") / 2);" ], N.variables.inputHeight, yt, gt);
1518
- var Ct = $()(ht()).withConfig({
1426
+ var ct = "2px";
1427
+ var dt = $()(lt()).withConfig({
1519
1428
  displayName: "ToggleStyles__StyledClickable",
1520
1429
  componentId: "sc-1x3ikch-0"
1521
- })([ "height:100%;width:100%;display:flex;justify-content:center;", ";min-height:calc(", " + ", "*2);&[disabled]{cursor:not-allowed;}" ], wt, N.variables.inputHeight, yt);
1430
+ })([ "height:100%;width:100%;display:flex;justify-content:center;min-height:calc(", " + ", "*2);&[disabled]{cursor:not-allowed;}" ], N.variables.inputHeight, ct);
1431
+ var ft = $()(st()).withConfig({
1432
+ displayName: "ToggleStyles__StyledNonInteractiveCheckbox",
1433
+ componentId: "sc-1x3ikch-1"
1434
+ })([ "align-items:flex-start;padding-top:", ";" ], N.variables.spacingSmall);
1522
1435
  // CONCATENATED MODULE: ./src/Table/Toggle.tsx
1523
- function xt() {
1524
- return xt = Object.assign ? Object.assign.bind() : function(e) {
1436
+ function vt() {
1437
+ return vt = Object.assign ? Object.assign.bind() : function(e) {
1525
1438
  for (var n = 1; n < arguments.length; n++) {
1526
1439
  var t = arguments[n];
1527
1440
  for (var r in t) {
@@ -1529,11 +1442,11 @@
1529
1442
  }
1530
1443
  }
1531
1444
  return e;
1532
- }, xt.apply(null, arguments);
1445
+ }, vt.apply(null, arguments);
1533
1446
  }
1534
- function St(e, n) {
1447
+ function pt(e, n) {
1535
1448
  if (null == e) return {};
1536
- var t, r, o = kt(e, n);
1449
+ var t, r, o = bt(e, n);
1537
1450
  if (Object.getOwnPropertySymbols) {
1538
1451
  var i = Object.getOwnPropertySymbols(e);
1539
1452
  for (r = 0; r < i.length; r++) {
@@ -1542,7 +1455,7 @@
1542
1455
  }
1543
1456
  return o;
1544
1457
  }
1545
- function kt(e, n) {
1458
+ function bt(e, n) {
1546
1459
  if (null == e) return {};
1547
1460
  var t = {};
1548
1461
  for (var r in e) {
@@ -1553,37 +1466,38 @@
1553
1466
  }
1554
1467
  return t;
1555
1468
  }
1556
- var Ot = {
1469
+ var mt = {
1557
1470
  disabled: i().bool,
1558
1471
  onClick: i().func,
1559
1472
  selected: i().oneOf([ true, false, "some" ])
1560
1473
  };
1561
- function Rt(e) {
1562
- var n = e.disabled, t = e.onClick, o = e.selected, i = St(e, [ "disabled", "onClick", "selected" ]);
1474
+ function ht(e) {
1475
+ var n = e.disabled, t = e.onClick, o = e.selected, i = pt(e, [ "disabled", "onClick", "selected" ]);
1563
1476
  var a = n === true ? "disabled" : undefined;
1564
1477
 
1565
- return r().createElement(Ct, xt({
1478
+ // Note we use a clickable around the NonInteractiveCheckbox (which can seem ironic) so that the whole table cell is clickable and we cannot use the Cell's onClick itself because of a11y issues we have faced in the past (see SUI-5958).
1479
+ return r().createElement(dt, vt({
1566
1480
  "aria-checked": o === "some" ? "mixed" : o,
1567
1481
  disabled: a,
1568
1482
  onClick: t,
1569
1483
  role: "checkbox"
1570
- }, i), r().createElement(mt(), {
1484
+ }, i), r().createElement(ft, {
1571
1485
  disabled: !!a,
1572
1486
  selected: o
1573
1487
  }));
1574
1488
  }
1575
- Rt.propTypes = Ot;
1576
- /* harmony default export */ const Et = Rt;
1489
+ ht.propTypes = mt;
1490
+ /* harmony default export */ const yt = ht;
1577
1491
  // CONCATENATED MODULE: ./src/Table/Row.tsx
1578
- function It(e) {
1492
+ function gt(e) {
1579
1493
  "@babel/helpers - typeof";
1580
- return It = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
1494
+ return gt = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
1581
1495
  return typeof e;
1582
1496
  } : function(e) {
1583
1497
  return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
1584
- }, It(e);
1498
+ }, gt(e);
1585
1499
  }
1586
- function Tt(e, n) {
1500
+ function wt(e, n) {
1587
1501
  var t = Object.keys(e);
1588
1502
  if (Object.getOwnPropertySymbols) {
1589
1503
  var r = Object.getOwnPropertySymbols(e);
@@ -1593,42 +1507,42 @@
1593
1507
  }
1594
1508
  return t;
1595
1509
  }
1596
- function Dt(e) {
1510
+ function Ct(e) {
1597
1511
  for (var n = 1; n < arguments.length; n++) {
1598
1512
  var t = null != arguments[n] ? arguments[n] : {};
1599
- n % 2 ? Tt(Object(t), !0).forEach((function(n) {
1600
- At(e, n, t[n]);
1601
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Tt(Object(t)).forEach((function(n) {
1513
+ n % 2 ? wt(Object(t), !0).forEach((function(n) {
1514
+ xt(e, n, t[n]);
1515
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : wt(Object(t)).forEach((function(n) {
1602
1516
  Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n));
1603
1517
  }));
1604
1518
  }
1605
1519
  return e;
1606
1520
  }
1607
- function At(e, n, t) {
1608
- return (n = jt(n)) in e ? Object.defineProperty(e, n, {
1521
+ function xt(e, n, t) {
1522
+ return (n = St(n)) in e ? Object.defineProperty(e, n, {
1609
1523
  value: t,
1610
1524
  enumerable: !0,
1611
1525
  configurable: !0,
1612
1526
  writable: !0
1613
1527
  }) : e[n] = t, e;
1614
1528
  }
1615
- function jt(e) {
1616
- var n = qt(e, "string");
1617
- return "symbol" == It(n) ? n : n + "";
1529
+ function St(e) {
1530
+ var n = kt(e, "string");
1531
+ return "symbol" == gt(n) ? n : n + "";
1618
1532
  }
1619
- function qt(e, n) {
1620
- if ("object" != It(e) || !e) return e;
1533
+ function kt(e, n) {
1534
+ if ("object" != gt(e) || !e) return e;
1621
1535
  var t = e[Symbol.toPrimitive];
1622
1536
  if (void 0 !== t) {
1623
1537
  var r = t.call(e, n || "default");
1624
- if ("object" != It(r)) return r;
1538
+ if ("object" != gt(r)) return r;
1625
1539
  throw new TypeError("@@toPrimitive must return a primitive value.");
1626
1540
  }
1627
1541
  return ("string" === n ? String : Number)(e);
1628
1542
  }
1629
- function zt(e, n) {
1543
+ function Ot(e, n) {
1630
1544
  if (null == e) return {};
1631
- var t, r, o = Pt(e, n);
1545
+ var t, r, o = Rt(e, n);
1632
1546
  if (Object.getOwnPropertySymbols) {
1633
1547
  var i = Object.getOwnPropertySymbols(e);
1634
1548
  for (r = 0; r < i.length; r++) {
@@ -1637,7 +1551,7 @@
1637
1551
  }
1638
1552
  return o;
1639
1553
  }
1640
- function Pt(e, n) {
1554
+ function Rt(e, n) {
1641
1555
  if (null == e) return {};
1642
1556
  var t = {};
1643
1557
  for (var r in e) {
@@ -1648,8 +1562,8 @@
1648
1562
  }
1649
1563
  return t;
1650
1564
  }
1651
- function _t() {
1652
- return _t = Object.assign ? Object.assign.bind() : function(e) {
1565
+ function Et() {
1566
+ return Et = Object.assign ? Object.assign.bind() : function(e) {
1653
1567
  for (var n = 1; n < arguments.length; n++) {
1654
1568
  var t = arguments[n];
1655
1569
  for (var r in t) {
@@ -1657,29 +1571,29 @@
1657
1571
  }
1658
1572
  }
1659
1573
  return e;
1660
- }, _t.apply(null, arguments);
1574
+ }, Et.apply(null, arguments);
1661
1575
  }
1662
- var Mt = {
1663
- odd: ft,
1664
- even: vt,
1665
- none: ft
1576
+ var It = {
1577
+ odd: ot,
1578
+ even: it,
1579
+ none: ot
1666
1580
  };
1667
1581
  /** @public */
1668
1582
  /** @public */
1669
1583
  /** @public */
1670
1584
  /** @public */
1671
- /** @public */ var $t = {
1585
+ /** @public */ var Tt = {
1672
1586
  /** @private. Generally passed by Table rather than added directly. */
1673
1587
  activeElementId: i().string,
1674
1588
  actionPrimary: i().element,
1675
1589
  actionsSecondary: i().element,
1676
1590
  children: i().node,
1677
1591
  data: i().any,
1678
- /** @private. Generally passed by Table rather than added directly. */
1679
- dataId: i().oneOfType([ i().string, i().number ]),
1680
1592
  disabled: i().bool,
1681
1593
  /** @private. Generally passed by Table rather than added directly. */
1682
- draggable: i().bool,
1594
+ isDraggable: i().bool,
1595
+ /** @private. Generally passed by Table rather than added directly. */
1596
+ dragId: i().oneOfType([ i().string, i().number ]),
1683
1597
  elementRef: i().oneOfType([ i().func, i().object ]),
1684
1598
  /** @private. */
1685
1599
  expandable: i().bool,
@@ -1707,36 +1621,36 @@
1707
1621
  /** @private. */
1708
1622
  stripe: i().oneOf([ "odd", "even", "none" ])
1709
1623
  };
1710
- var Nt = r().createElement($n(), null);
1711
- var Lt = r().forwardRef((function(e, n) {
1624
+ var jt = r().createElement(jn(), null);
1625
+ var Dt = r().forwardRef((function(e, n) {
1712
1626
 
1713
- return r().createElement(Bn(), _t({
1627
+ return r().createElement(zn(), Et({
1714
1628
  content: (0, D._)("Actions"),
1715
1629
  contentRelationship: "label"
1716
- }, e), r().createElement(Ln(), {
1630
+ }, e), r().createElement(qn(), {
1717
1631
  appearance: "subtle",
1718
1632
  "data-test": "actions-secondary-toggle",
1719
- icon: Nt,
1633
+ icon: jt,
1720
1634
  elementRef: n
1721
1635
  }));
1722
1636
  }));
1723
- function Ht(e) {
1637
+ function qt(e) {
1724
1638
  var n;
1725
- var o = e.actions, i = e.actionPrimary, a = e.actionsSecondary, u = e.children, s = e.data, c = e.dataId, d = e.disabled, f = e.draggable, v = e.elementRef, p = e.expandable, m = e.expanded, b = e.expansionRowIds, h = e.expansionRow, y = e.index, w = e.movableColumns, C = e.onClick, x = e.onExpansion, S = e.onKeyDown, k = e.onRequestToggle, O = e.primaryColumnIndex, E = O === void 0 ? 0 : O, I = e.rowScreenReaderText, T = e.selected, j = e.stripe, q = j === void 0 ? "none" : j, z = e.style, P = zt(e, [ "actions", "actionPrimary", "actionsSecondary", "children", "data", "dataId", "disabled", "draggable", "elementRef", "expandable", "expanded", "expansionRowIds", "expansionRow", "index", "movableColumns", "onClick", "onExpansion", "onKeyDown", "onRequestToggle", "primaryColumnIndex", "rowScreenReaderText", "selected", "stripe", "style" ]);
1639
+ var o = e.actions, i = e.actionPrimary, a = e.actionsSecondary, u = e.children, s = e.data, c = e.dragId, d = e.disabled, f = e.isDraggable, v = e.elementRef, p = e.expandable, b = e.expanded, m = e.expansionRowIds, h = e.expansionRow, y = e.index, w = e.movableColumns, C = e.onClick, x = e.onExpansion, S = e.onKeyDown, k = e.onRequestToggle, O = e.primaryColumnIndex, I = O === void 0 ? 0 : O, T = e.rowScreenReaderText, j = e.selected, A = e.stripe, P = A === void 0 ? "none" : A, _ = e.style, z = Ot(e, [ "actions", "actionPrimary", "actionsSecondary", "children", "data", "dragId", "disabled", "isDraggable", "elementRef", "expandable", "expanded", "expansionRowIds", "expansionRow", "index", "movableColumns", "onClick", "onExpansion", "onKeyDown", "onRequestToggle", "primaryColumnIndex", "rowScreenReaderText", "selected", "stripe", "style" ]);
1726
1640
  // @docs-props-type RowPropsBase
1727
1641
  var M = (0, t.useMemo)((function() {
1728
1642
  return {
1729
- id: f ? c : (0, _.createGUID)(),
1643
+ id: f ? c : (0, R.createGUID)(),
1730
1644
  disabled: !f
1731
1645
  };
1732
1646
  }), [ f, c ]);
1733
- var $ = (0, l.useSortable)(M), N = $.attributes, L = $.listeners, W = $.transform, K = $.transition, B = $.setNodeRef, F = $.setActivatorNodeRef;
1734
- var V = (0, t.useMemo)((function() {
1735
- return f ? Dt(Dt({}, z), {}, {
1736
- transform: _n.CSS.Translate.toString(W),
1647
+ var $ = (0, l.useSortable)(M), N = $.attributes, W = $.listeners, H = $.transform, K = $.transition, B = $.setNodeRef, V = $.setActivatorNodeRef;
1648
+ var F = (0, t.useMemo)((function() {
1649
+ return f ? Ct(Ct({}, _), {}, {
1650
+ transform: In.CSS.Translate.toString(H),
1737
1651
  transition: K
1738
- }) : z;
1739
- }), [ f, W, K, z ]);
1652
+ }) : _;
1653
+ }), [ f, H, K, _ ]);
1740
1654
  var U = (0, t.useRef)(null);
1741
1655
  var X = (0, t.useCallback)((function(e) {
1742
1656
  var n = e.target;
@@ -1754,13 +1668,13 @@
1754
1668
  C === null || C === void 0 ? void 0 : C(e, s);
1755
1669
  }
1756
1670
  }), [ s, C ]);
1757
- var G = (0, t.useCallback)((function(e) {
1758
- if ((0, R.keycode)(e.nativeEvent) === "enter" && C) {
1671
+ var Y = (0, t.useCallback)((function(e) {
1672
+ if ((0, E.keycode)(e.nativeEvent) === "enter" && C) {
1759
1673
  C(e, s);
1760
1674
  }
1761
1675
  S === null || S === void 0 ? void 0 : S(e);
1762
1676
  }), [ s, C, S ]);
1763
- var Y = (0, t.useCallback)((function(e) {
1677
+ var G = (0, t.useCallback)((function(e) {
1764
1678
  if (!d) {
1765
1679
  e.preventDefault();
1766
1680
  k === null || k === void 0 ? void 0 : k(e, s);
@@ -1808,7 +1722,7 @@
1808
1722
  };
1809
1723
  function ee(e) {
1810
1724
  U.current = e;
1811
- H(v, e);
1725
+ L(v, e);
1812
1726
  if (f) {
1813
1727
  B(e);
1814
1728
  }
@@ -1818,60 +1732,60 @@
1818
1732
  return (0, t.cloneElement)(e, {
1819
1733
  appearance: C ? "rowLink" : e.props.appearance,
1820
1734
  disabled: d,
1821
- isPrimaryCell: E === n,
1822
- stripe: q
1735
+ isPrimaryCell: I === n,
1736
+ stripe: P
1823
1737
  });
1824
1738
  }));
1825
1739
  var te;
1826
- if (I) {
1827
- te = I;
1828
- } else if ((n = ne[E]) === null || n === void 0 ? void 0 : n.props.children) {
1740
+ if (T) {
1741
+ te = T;
1742
+ } else if ((n = ne[I]) === null || n === void 0 ? void 0 : n.props.children) {
1829
1743
  var re;
1830
- te = "".concat((re = ne[E]) === null || re === void 0 ? void 0 : re.props.children);
1744
+ te = "".concat((re = ne[I]) === null || re === void 0 ? void 0 : re.props.children);
1831
1745
  } else {
1832
1746
  var oe;
1833
1747
  te = "".concat((oe = ne[0]) === null || oe === void 0 ? void 0 : oe.props.children);
1834
1748
  if (false) {}
1835
1749
  }
1836
- var ie = (0, A.sprintf)((0, D._)("%(selected)s"), {
1837
- selected: T ? "selected" : "unselected"
1750
+ var ie = (0, q.sprintf)((0, D._)("%(selected)s"), {
1751
+ selected: j ? "selected" : "unselected"
1838
1752
  });
1839
- var ae = Mt[q];
1840
- var le = m ? t.Children.count(h) + 1 : undefined;
1753
+ var ae = It[P];
1754
+ var le = b ? t.Children.count(h) + 1 : undefined;
1841
1755
  var ue = w ? "false" : undefined;
1842
1756
  var se = function e() {
1843
1757
 
1844
- return r().createElement(Lt, null);
1758
+ return r().createElement(Dt, null);
1845
1759
  };
1846
- var ce = (0, A.sprintf)((0, D._)("Collapse row - %(rowLabelValue)s"), {
1760
+ var ce = (0, q.sprintf)((0, D._)("Collapse row - %(rowLabelValue)s"), {
1847
1761
  rowLabelValue: te
1848
1762
  });
1849
- var de = (0, A.sprintf)((0, D._)("Expand row - %(rowLabelValue)s"), {
1763
+ var de = (0, q.sprintf)((0, D._)("Expand row - %(rowLabelValue)s"), {
1850
1764
  rowLabelValue: te
1851
1765
  });
1852
1766
 
1853
- return r().createElement(ae, _t({
1767
+ return r().createElement(ae, Et({
1854
1768
  "data-test": "row",
1855
- "data-test-selected": k ? T : undefined,
1769
+ "data-test-selected": k ? j : undefined,
1856
1770
  $clickable: !!C,
1857
1771
  "data-has-movable-columns": w ? "true" : undefined,
1858
1772
  disabled: !!d,
1859
1773
  $expandable: !!p,
1860
- $draggable: !!f,
1774
+ $isDraggable: !!f,
1861
1775
  ref: ee,
1862
1776
  tabIndex: C ? 0 : undefined
1863
- }, g()(P, "data"), {
1777
+ }, g()(z, "data"), {
1864
1778
  onClick: C ? X : undefined,
1865
- onKeyDown: G,
1866
- $rowSelected: !!(k && T),
1867
- style: V
1868
- }), f && y != null && r().createElement(dt, _t({
1869
- "aria-label": (0, A.sprintf)((0, D._)("Reorder %(rowLabelValue)s"), {
1779
+ onKeyDown: Y,
1780
+ $rowSelected: !!(k && j),
1781
+ style: F
1782
+ }), f && y != null && r().createElement(rt, Et({
1783
+ "aria-label": (0, q.sprintf)((0, D._)("Reorder %(rowLabelValue)s"), {
1870
1784
  rowLabelValue: te
1871
1785
  }),
1872
- setActivatorNodeRef: F,
1873
- listeners: L
1874
- }, N)), k && r().createElement(xe, {
1786
+ setActivatorNodeRef: V,
1787
+ listeners: W
1788
+ }, N)), k && r().createElement(ke, {
1875
1789
  align: "center",
1876
1790
  appearance: C ? "rowLink" : "data",
1877
1791
  disabled: d,
@@ -1879,70 +1793,77 @@
1879
1793
  "data-movable-column": ue,
1880
1794
  rowSpan: le,
1881
1795
  "data-test": "toggle"
1882
- }, r().createElement(Et, {
1883
- "aria-label": (0, A.sprintf)((0, D._)("%(rowLabelValue)s %(selectedString)s"), {
1796
+ }, r().createElement(yt, {
1797
+ "aria-label": (0, q.sprintf)((0, D._)("%(rowLabelValue)s %(selectedString)s"), {
1884
1798
  rowLabelValue: te,
1885
1799
  selectedString: ie
1886
1800
  }),
1887
1801
  disabled: d,
1888
- onClick: Y,
1889
- selected: T
1890
- })), p && h && r().createElement(xe, {
1802
+ onClick: G,
1803
+ selected: j
1804
+ })), p && h && r().createElement(ke, {
1891
1805
  align: "center",
1892
1806
  appearance: "data",
1893
1807
  "data-movable-column": ue,
1894
1808
  "data-test": "expand",
1895
- expand: m,
1809
+ expand: b,
1896
1810
  rowSpan: le,
1897
1811
  variant: "expand"
1898
- }, r().createElement(rt, {
1899
- expanded: m,
1812
+ }, r().createElement(Yn, {
1813
+ expanded: b,
1900
1814
  onClick: J,
1901
- title: m ? ce : de,
1902
- "aria-controls": m ? b : undefined,
1903
- "aria-expanded": m
1904
- })), p && !h && r().createElement(xe, {
1815
+ title: b ? ce : de,
1816
+ "aria-controls": b ? m : undefined,
1817
+ "aria-expanded": b
1818
+ })), p && !h && r().createElement(ke, {
1905
1819
  variant: "expand",
1906
1820
  "data-movable-column": ue
1907
- }), ne, o && !i && !a && r().createElement(xe, {
1821
+ }), ne, o && !i && !a && r().createElement(ke, {
1908
1822
  align: "right",
1909
- appearance: d ? "data" : "rowLink",
1823
+ appearance: C ? "rowLink" : "data",
1910
1824
  "data-test": "row-actions",
1911
1825
  variant: "actions",
1912
1826
  "data-movable-column": ue
1913
- }), (i || a) && r().createElement(xe, {
1827
+ }), (i || a) && r().createElement(ke, {
1914
1828
  align: "right",
1915
1829
  appearance: "data",
1916
1830
  "data-test": "row-actions",
1917
1831
  variant: "actions",
1918
1832
  "data-movable-column": ue
1919
- }, i && Q(), a && r().createElement(Wn(), {
1833
+ }, i && Q(), a && r().createElement(Pn(), {
1920
1834
  toggle: se()
1921
1835
  }, Z())));
1922
1836
  }
1923
- Ht.propTypes = $t;
1924
- Ht.splunkUiType = "Table.Row";
1925
- /* harmony default export */ const Wt = Ht;
1837
+ qt.propTypes = Tt;
1838
+ qt.splunkUiType = "Table.Row";
1839
+ /* harmony default export */ const At = qt;
1840
+ // CONCATENATED MODULE: ./src/Table/TableContext.ts
1841
+ var Pt = (0, t.createContext)({});
1842
+ Pt.displayName = "Table";
1843
+ /* harmony default export */ const _t = Pt;
1926
1844
  // CONCATENATED MODULE: ./src/Table/HeadStyles.ts
1927
- var Kt = $().thead.withConfig({
1845
+ var zt = $().thead.withConfig({
1928
1846
  displayName: "HeadStyles__Styled",
1929
1847
  componentId: "iap21t-0"
1930
- })([ "", ";" ], N.mixins.reset("table-header-group"));
1931
- var Bt = $()(Pn).withConfig({
1848
+ })([ "", ";", "" ], N.mixins.reset("table-header-group"), (function(e) {
1849
+ var n = e.$isFixed, t = e.$zIndex;
1850
+ return n && (0, M.css)([ "position:sticky;top:0;z-index:", ";" ], t);
1851
+ }));
1852
+ var Mt = $()(En).withConfig({
1932
1853
  displayName: "HeadStyles__StyledToggleAll",
1933
1854
  componentId: "iap21t-1"
1934
- })([ "width:32px;", "{gap:0;}" ], /* sc-sel */ Ue);
1935
- var Ft = $()(Pn).withConfig({
1855
+ })([ "width:32px;", "{gap:0;}" ], /* sc-sel */ Fe);
1856
+ var $t = $()(En).withConfig({
1936
1857
  displayName: "HeadStyles__StyledInfo",
1937
1858
  componentId: "iap21t-2"
1938
1859
  })([ "width:32px;" ]);
1939
- var Vt = $()(Pn).withConfig({
1860
+ var Nt = $()(En).withConfig({
1940
1861
  displayName: "HeadStyles__StyledDragRow",
1941
1862
  componentId: "iap21t-3"
1942
1863
  })([ "width:32px;" ]);
1943
1864
  // CONCATENATED MODULE: ./src/Table/Head.tsx
1944
- function Ut() {
1945
- return Ut = Object.assign ? Object.assign.bind() : function(e) {
1865
+ function Wt() {
1866
+ return Wt = Object.assign ? Object.assign.bind() : function(e) {
1946
1867
  for (var n = 1; n < arguments.length; n++) {
1947
1868
  var t = arguments[n];
1948
1869
  for (var r in t) {
@@ -1950,11 +1871,11 @@
1950
1871
  }
1951
1872
  }
1952
1873
  return e;
1953
- }, Ut.apply(null, arguments);
1874
+ }, Wt.apply(null, arguments);
1954
1875
  }
1955
- function Xt(e, n) {
1876
+ function Lt(e, n) {
1956
1877
  if (null == e) return {};
1957
- var t, r, o = Gt(e, n);
1878
+ var t, r, o = Ht(e, n);
1958
1879
  if (Object.getOwnPropertySymbols) {
1959
1880
  var i = Object.getOwnPropertySymbols(e);
1960
1881
  for (r = 0; r < i.length; r++) {
@@ -1963,7 +1884,7 @@
1963
1884
  }
1964
1885
  return o;
1965
1886
  }
1966
- function Gt(e, n) {
1887
+ function Ht(e, n) {
1967
1888
  if (null == e) return {};
1968
1889
  var t = {};
1969
1890
  for (var r in e) {
@@ -1974,7 +1895,7 @@
1974
1895
  }
1975
1896
  return t;
1976
1897
  }
1977
- var Yt = {
1898
+ var Kt = {
1978
1899
  /** @private. */
1979
1900
  actions: i().arrayOf(i().node),
1980
1901
  /** @private. */
@@ -1984,16 +1905,12 @@
1984
1905
  children: i().node,
1985
1906
  elementRef: i().oneOfType([ i().func, i().object ]),
1986
1907
  /** @private. */
1987
- guidelineIndex: i().number,
1988
- /** @private. */
1989
1908
  hasDragColumn: i().bool,
1990
1909
  /** @private. */
1991
1910
  hasInfoColumn: i().bool,
1992
1911
  /** @private. */
1993
1912
  onAutosizeColumn: i().func,
1994
1913
  /** @private. */
1995
- onDragStart: i().func,
1996
- /** @private. */
1997
1914
  onRequestMoveColumn: i().func,
1998
1915
  /** @private. */
1999
1916
  onRequestResizeColumn: i().func,
@@ -2002,20 +1919,18 @@
2002
1919
  /** @private. */
2003
1920
  rowSelection: i().oneOf([ "all", "some", "none" ])
2004
1921
  };
2005
- var Jt = 3;
2006
- var Qt = 2;
2007
- var Zt = 1;
2008
- var er = {
1922
+ var Bt = 1;
1923
+ var Vt = {
2009
1924
  all: true,
2010
1925
  none: false,
2011
1926
  some: "some"
2012
1927
  };
2013
- var nr = (0, D._)("No rows selected");
2014
- var tr = (0, D._)("Some rows selected");
2015
- var rr = (0, D._)("All rows selected");
2016
- var or = function e(n) {
1928
+ var Ft = (0, D._)("No rows selected");
1929
+ var Ut = (0, D._)("Some rows selected");
1930
+ var Xt = (0, D._)("All rows selected");
1931
+ var Yt = function e(n) {
2017
1932
  var t, r;
2018
- var o = Qe();
1933
+ var o = Je();
2019
1934
  if (!n) {
2020
1935
  return [];
2021
1936
  }
@@ -2024,33 +1939,32 @@
2024
1939
  return e.clientWidth - parseFloat(n.getPropertyValue("padding-right")) - parseFloat(n.getPropertyValue("padding-left"));
2025
1940
  }));
2026
1941
  };
2027
- function ir(e) {
2028
- var n = e.actions, o = n === void 0 ? [] : n, i = e.actionsColumnWidth, a = e.cellMinWidth, l = a === void 0 ? 60 : a, u = e.children, s = e.elementRef, c = e.guidelineIndex, d = e.hasDragColumn, f = e.hasInfoColumn, v = e.onAutosizeColumn, p = e.onDragStart, m = e.onRequestMoveColumn, b = e.onRequestResizeColumn, h = e.onRequestToggleAllRows, y = e.rowSelection, g = Xt(e, [ "actions", "actionsColumnWidth", "cellMinWidth", "children", "elementRef", "guidelineIndex", "hasDragColumn", "hasInfoColumn", "onAutosizeColumn", "onDragStart", "onRequestMoveColumn", "onRequestResizeColumn", "onRequestToggleAllRows", "rowSelection" ]);
2029
- var w = (0, t.useContext)(xn), C = w.headType, x = w.tableContainerWidthWithoutBorders, S = w.resizableFillLayout;
2030
- var k = (0, t.useRef)(null);
2031
- var O = (0, t.useRef)([]);
1942
+ function Gt(e) {
1943
+ var n = e.actions, o = n === void 0 ? [] : n, i = e.actionsColumnWidth, a = e.cellMinWidth, l = a === void 0 ? 60 : a, u = e.children, s = e.elementRef, c = e.hasDragColumn, d = e.hasInfoColumn, f = e.onAutosizeColumn, v = e.onRequestMoveColumn, p = e.onRequestResizeColumn, b = e.onRequestToggleAllRows, m = e.rowSelection, h = Lt(e, [ "actions", "actionsColumnWidth", "cellMinWidth", "children", "elementRef", "hasDragColumn", "hasInfoColumn", "onAutosizeColumn", "onRequestMoveColumn", "onRequestResizeColumn", "onRequestToggleAllRows", "rowSelection" ]);
1944
+ var y = (0, t.useContext)(_t), g = y.headType, w = y.tableContainerWidthWithoutBorders, C = y.resizableFillLayout;
1945
+ var x = (0, t.useRef)(null);
1946
+ var S = (0, t.useRef)([]);
2032
1947
  (0, t.useEffect)((function() {
2033
1948
  // Validate children width
2034
1949
  if (false) {
2035
1950
  var e;
2036
1951
  }
2037
- }), [ u, b, S ]);
2038
- var R = (0, t.useCallback)((function(e) {
2039
- var n = e.columnId, r = e.fromIndex, o = e.toIndex;
2040
- if (o < t.Children.toArray(u).length) {
1952
+ }), [ u, p, C ]);
1953
+ var k = (0, t.useCallback)((function(e) {
1954
+ var n = e.fromIndex, r = e.toIndex;
1955
+ if (r < t.Children.toArray(u).length) {
2041
1956
  // HeadCell never requests less than zero
2042
- m === null || m === void 0 ? void 0 : m({
2043
- fromIndex: r,
2044
- toIndex: o,
2045
- columnId: n
1957
+ v === null || v === void 0 ? void 0 : v({
1958
+ fromIndex: n,
1959
+ toIndex: r
2046
1960
  });
2047
1961
  }
2048
- }), [ u, m ]);
2049
- var E = (0, t.useCallback)((function(e, n) {
1962
+ }), [ u, v ]);
1963
+ var O = (0, t.useCallback)((function(e, n) {
2050
1964
  var t = n.columnId, r = n.id, o = n.index, i = n.width;
2051
- var a = or(k.current);
1965
+ var a = Yt(x.current);
2052
1966
  if (o >= a.length) {
2053
- b === null || b === void 0 ? void 0 : b(e, n);
1967
+ p === null || p === void 0 ? void 0 : p(e, n);
2054
1968
  return;
2055
1969
  }
2056
1970
  var u = a[o];
@@ -2058,10 +1972,10 @@
2058
1972
  if (s <= 0) {
2059
1973
  // handle shrinking
2060
1974
  if (i >= l) {
2061
- b === null || b === void 0 ? void 0 : b(e, n);
1975
+ p === null || p === void 0 ? void 0 : p(e, n);
2062
1976
  } else {
2063
1977
  // shrink the cell as small as we can
2064
- b === null || b === void 0 ? void 0 : b(e, {
1978
+ p === null || p === void 0 ? void 0 : p(e, {
2065
1979
  columnId: t,
2066
1980
  id: r,
2067
1981
  index: o,
@@ -2073,11 +1987,11 @@
2073
1987
  var c = [];
2074
1988
  var d = 0;
2075
1989
  var f = true;
2076
- if (O.current.length !== a.length) {
2077
- b === null || b === void 0 ? void 0 : b(e, n);
1990
+ if (S.current.length !== a.length) {
1991
+ p === null || p === void 0 ? void 0 : p(e, n);
2078
1992
  return;
2079
1993
  }
2080
- O.current.forEach((function(e, n) {
1994
+ S.current.forEach((function(e, n) {
2081
1995
  if (e === "auto") {
2082
1996
  d += 1;
2083
1997
  c.push(n);
@@ -2094,25 +2008,25 @@
2094
2008
  return true;
2095
2009
  }));
2096
2010
  if (f) {
2097
- b === null || b === void 0 ? void 0 : b(e, n);
2011
+ p === null || p === void 0 ? void 0 : p(e, n);
2098
2012
  } else {
2099
2013
  // make the cell as big as we can without letting any cells go below cellMinWidth
2100
2014
  // that means all auto cells are at cellMinWidth and all the set width cells stay the same size
2101
- var p = 0;
2015
+ var b = 0;
2102
2016
  c.forEach((function(e) {
2103
2017
  if (e < a.length) {
2104
- p += Math.max(a[e] - l, 0);
2018
+ b += Math.max(a[e] - l, 0);
2105
2019
  }
2106
2020
  }));
2107
- var m = a[o] + p;
2108
- b === null || b === void 0 ? void 0 : b(e, {
2021
+ var m = a[o] + b;
2022
+ p === null || p === void 0 ? void 0 : p(e, {
2109
2023
  columnId: t,
2110
2024
  id: r,
2111
2025
  index: o,
2112
2026
  width: m
2113
2027
  });
2114
2028
  }
2115
- } else if (x != null) {
2029
+ } else if (w != null) {
2116
2030
  // if there are no auto width cells, check if shrinking the last cell by requested change makes it smaller than cellMinWidth
2117
2031
  /**
2118
2032
  * We need to calculate the percieved width of the last cell, because if the user modifies the size of the last head cell,
@@ -2123,18 +2037,18 @@
2123
2037
  var y = h.reduce((function(e, n) {
2124
2038
  return e + n;
2125
2039
  }));
2126
- var g = x - y;
2040
+ var g = w - y;
2127
2041
  if (g - s >= l) {
2128
- b === null || b === void 0 ? void 0 : b(e, n);
2042
+ p === null || p === void 0 ? void 0 : p(e, n);
2129
2043
  } else {
2130
2044
  // make the cell as big as we can without letting perceivedWidthOfLastCell go below cellMinWidth
2131
- var w = g - l;
2132
- var C = u + w;
2133
- b === null || b === void 0 ? void 0 : b(e, {
2045
+ var C = g - l;
2046
+ var k = u + C;
2047
+ p === null || p === void 0 ? void 0 : p(e, {
2134
2048
  columnId: t,
2135
2049
  id: r,
2136
2050
  index: o,
2137
- width: C
2051
+ width: k
2138
2052
  });
2139
2053
  }
2140
2054
  } else {
@@ -2143,135 +2057,118 @@
2143
2057
  * the perceived width so this case will result in columns possibly going offscreen. In testing,
2144
2058
  * tableContainerWidthWithoutBorders attains a value quickly enough that it isn't a problem.
2145
2059
  */
2146
- b === null || b === void 0 ? void 0 : b(e, n);
2060
+ p === null || p === void 0 ? void 0 : p(e, n);
2147
2061
  }
2148
2062
  }
2149
- }), [ l, b, x ]);
2150
- var I = (0, t.useCallback)((function(e) {
2151
- H(s, e);
2152
- k.current = e;
2063
+ }), [ l, p, w ]);
2064
+ var R = (0, t.useCallback)((function(e) {
2065
+ L(s, e);
2066
+ x.current = e;
2153
2067
  }), [ s ]);
2154
- var T = (0, t.useCallback)((function(e) {
2155
- p === null || p === void 0 ? void 0 : p({
2156
- dragIndex: e
2157
- });
2158
- }), [ p ]);
2159
- var D = (0, t.useMemo)((function() {
2068
+ var E = (0, t.useMemo)((function() {
2160
2069
  return t.Children.toArray(u).filter(t.isValidElement);
2161
2070
  }), [ u ]);
2162
- var A = D.length + (o.length || i ? 1 : 0);
2163
- var j = (0, t.useMemo)((function() {
2071
+ var I = E.length + (o.length || i ? 1 : 0);
2072
+ var T = (0, t.useMemo)((function() {
2164
2073
  var e = [];
2165
- var n = D.map((function(n, r, o) {
2166
- var i = "none";
2167
- if (c === o.length && r + 1 === o.length) {
2168
- i = "after";
2169
- } else if (c === r) {
2170
- i = "before";
2171
- }
2074
+ var n = E.map((function(n, r) {
2172
2075
  e.push(n.props.width);
2173
2076
 
2174
2077
  return (0, t.cloneElement)(n, {
2175
2078
  index: r,
2176
- showGuideline: i,
2177
- onRequestResize: S ? E : b,
2178
- onDragStart: m ? T : undefined,
2179
- onRequestMoveColumn: m ? R : undefined,
2180
- onAutosizeColumn: v,
2181
- key: n.key || n.props.columnId || r,
2182
- zIndex: A - r
2079
+ onRequestResize: C ? O : p,
2080
+ onRequestMoveColumn: v ? k : undefined,
2081
+ onAutosizeColumn: f,
2082
+ key: n.key || n.props.columnId || r
2183
2083
  });
2184
2084
  }));
2185
- O.current = e;
2085
+ S.current = e;
2186
2086
  return n;
2187
- }), [ D, c, S, E, b, m, T, R, v, A ]);
2188
- var q = y === undefined ? undefined : er[y];
2189
- var z = i || 48;
2190
- var P = C === "fixed" ? "fixed-head" : "head";
2191
- var _;
2192
- if (q === "some") {
2193
- _ = tr;
2194
- } else if (q) {
2195
- _ = rr;
2087
+ }), [ E, C, O, p, v, k, f ]);
2088
+ var j = m === undefined ? undefined : Vt[m];
2089
+ var D = i || 48;
2090
+ var q = g === "fixed" ? "fixed-head" : "head";
2091
+ var A;
2092
+ if (j === "some") {
2093
+ A = Ut;
2094
+ } else if (j) {
2095
+ A = Xt;
2196
2096
  } else {
2197
- _ = nr;
2097
+ A = Ft;
2198
2098
  }
2199
- var M = (0, t.useMemo)((function() {
2099
+ var P = (0, t.useMemo)((function() {
2200
2100
  return {
2201
- minWidth: z
2101
+ minWidth: D
2202
2102
  };
2203
- }), [ z ]);
2204
- var $ = (0, t.useMemo)((function() {
2103
+ }), [ D ]);
2104
+ var _ = (0, t.useMemo)((function() {
2205
2105
  return {
2206
2106
  minWidth: i
2207
2107
  };
2208
2108
  }), [ i ]);
2209
2109
 
2210
- return r().createElement(Kt, Ut({
2211
- ref: I,
2212
- "data-test": P
2213
- }, g), r().createElement(Wt, null, d && r().createElement(Vt, {
2110
+ return r().createElement(zt, Wt({
2111
+ ref: R,
2112
+ "data-test": q,
2113
+ $isFixed: g === "fixed",
2114
+ $zIndex: I + Bt
2115
+ }, h), r().createElement(At, null, c && r().createElement(Nt, {
2214
2116
  key: "drag_rows_head_cell",
2215
2117
  "data-test": "drag-rows-head-cell",
2216
2118
  align: "center",
2217
- resizable: false,
2218
- zIndex: A + Jt
2219
- }), h && r().createElement(Bt, {
2119
+ resizable: false
2120
+ }), b && r().createElement(Mt, {
2220
2121
  key: "toggle_all",
2221
2122
  resizable: false,
2222
2123
  align: "center",
2223
2124
  variant: "toggleAll",
2224
2125
  truncate: false,
2225
- zIndex: A + Qt,
2226
2126
  "data-test": "toggle-all"
2227
- }, r().createElement(Et, {
2228
- "aria-label": _,
2229
- onClick: h,
2230
- selected: q
2231
- })), f && r().createElement(Ft, {
2127
+ }, r().createElement(yt, {
2128
+ "aria-label": A,
2129
+ onClick: b,
2130
+ selected: j
2131
+ })), d && r().createElement($t, {
2232
2132
  key: "more_info_head_cell",
2233
2133
  "data-test": "more-info-head-cell",
2234
2134
  resizable: false,
2235
- variant: "info",
2236
- zIndex: A + Zt
2237
- }), j, o.length > 0 && r().createElement(Pn, {
2135
+ variant: "info"
2136
+ }), T, o.length > 0 && r().createElement(En, {
2238
2137
  key: "actions_head_cell",
2239
2138
  "data-test": "actions-head-cell",
2240
2139
  align: "right",
2241
2140
  resizable: false,
2242
- width: z,
2243
- style: M,
2244
- variant: "actions",
2245
- zIndex: 1
2246
- }, o), o.length === 0 && i && r().createElement(Pn, {
2141
+ width: D,
2142
+ style: P,
2143
+ variant: "actions"
2144
+ }, o), o.length === 0 && i && r().createElement(En, {
2247
2145
  key: "actions_head_cell",
2248
2146
  "data-test": "actions-head-cell",
2249
2147
  align: "right",
2250
2148
  resizable: false,
2251
2149
  width: i,
2252
- style: $,
2253
- variant: "actions",
2254
- zIndex: 1
2150
+ style: _,
2151
+ variant: "actions"
2255
2152
  }, " ")));
2256
2153
  }
2257
- ir.propTypes = Yt;
2258
- ir.splunkUiType = "Table.Head";
2259
- /* harmony default export */ const ar = ir;
2154
+ Gt.propTypes = Kt;
2155
+ Gt.splunkUiType = "Table.Head";
2156
+ /* harmony default export */ const Jt = Gt;
2260
2157
  // CONCATENATED MODULE: external "lodash/isFinite"
2261
- const lr = require("lodash/isFinite");
2262
- var ur = e.n(lr);
2158
+ const Qt = require("lodash/isFinite");
2159
+ var Zt = e.n(Qt);
2263
2160
  // CONCATENATED MODULE: external "lodash/isFunction"
2264
- const sr = require("lodash/isFunction");
2265
- var cr = e.n(sr);
2161
+ const er = require("lodash/isFunction");
2162
+ var nr = e.n(er);
2266
2163
  // CONCATENATED MODULE: external "@splunk/react-ui/Popover"
2267
- const dr = require("@splunk/react-ui/Popover");
2268
- var fr = e.n(dr);
2164
+ const tr = require("@splunk/react-ui/Popover");
2165
+ var rr = e.n(tr);
2269
2166
  // CONCATENATED MODULE: external "@splunk/react-ui/useControlled"
2270
- const vr = require("@splunk/react-ui/useControlled");
2271
- var pr = e.n(vr);
2167
+ const or = require("@splunk/react-ui/useControlled");
2168
+ var ir = e.n(or);
2272
2169
  // CONCATENATED MODULE: ./src/Table/HeadDropdownCell.tsx
2273
- function mr() {
2274
- return mr = Object.assign ? Object.assign.bind() : function(e) {
2170
+ function ar() {
2171
+ return ar = Object.assign ? Object.assign.bind() : function(e) {
2275
2172
  for (var n = 1; n < arguments.length; n++) {
2276
2173
  var t = arguments[n];
2277
2174
  for (var r in t) {
@@ -2279,29 +2176,29 @@
2279
2176
  }
2280
2177
  }
2281
2178
  return e;
2282
- }, mr.apply(null, arguments);
2179
+ }, ar.apply(null, arguments);
2283
2180
  }
2284
- function br(e, n) {
2285
- return Cr(e) || wr(e, n) || yr(e, n) || hr();
2181
+ function lr(e, n) {
2182
+ return fr(e) || dr(e, n) || sr(e, n) || ur();
2286
2183
  }
2287
- function hr() {
2184
+ function ur() {
2288
2185
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2289
2186
  }
2290
- function yr(e, n) {
2187
+ function sr(e, n) {
2291
2188
  if (e) {
2292
- if ("string" == typeof e) return gr(e, n);
2189
+ if ("string" == typeof e) return cr(e, n);
2293
2190
  var t = {}.toString.call(e).slice(8, -1);
2294
- return "Object" === t && e.constructor && (t = e.constructor.name), "Map" === t || "Set" === t ? Array.from(e) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? gr(e, n) : void 0;
2191
+ return "Object" === t && e.constructor && (t = e.constructor.name), "Map" === t || "Set" === t ? Array.from(e) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? cr(e, n) : void 0;
2295
2192
  }
2296
2193
  }
2297
- function gr(e, n) {
2194
+ function cr(e, n) {
2298
2195
  (null == n || n > e.length) && (n = e.length);
2299
2196
  for (var t = 0, r = Array(n); t < n; t++) {
2300
2197
  r[t] = e[t];
2301
2198
  }
2302
2199
  return r;
2303
2200
  }
2304
- function wr(e, n) {
2201
+ function dr(e, n) {
2305
2202
  var t = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
2306
2203
  if (null != t) {
2307
2204
  var r, o, i, a, l = [], u = !0, s = !1;
@@ -2323,12 +2220,12 @@
2323
2220
  return l;
2324
2221
  }
2325
2222
  }
2326
- function Cr(e) {
2223
+ function fr(e) {
2327
2224
  if (Array.isArray(e)) return e;
2328
2225
  }
2329
- function xr(e, n) {
2226
+ function vr(e, n) {
2330
2227
  if (null == e) return {};
2331
- var t, r, o = Sr(e, n);
2228
+ var t, r, o = pr(e, n);
2332
2229
  if (Object.getOwnPropertySymbols) {
2333
2230
  var i = Object.getOwnPropertySymbols(e);
2334
2231
  for (r = 0; r < i.length; r++) {
@@ -2337,7 +2234,7 @@
2337
2234
  }
2338
2235
  return o;
2339
2236
  }
2340
- function Sr(e, n) {
2237
+ function pr(e, n) {
2341
2238
  if (null == e) return {};
2342
2239
  var t = {};
2343
2240
  for (var r in e) {
@@ -2350,23 +2247,24 @@
2350
2247
  }
2351
2248
  /** @public */
2352
2249
  /** @public */
2353
- /** @public */ var kr = [ "clickAway", "contentClick", "escapeKey", "offScreen", "tabKey", "toggleClick" ];
2354
- var Or = {
2250
+ /** @public */ var br = [ "clickAway", "contentClick", "escapeKey", "offScreen", "tabKey", "toggleClick" ];
2251
+ var mr = {
2355
2252
  align: i().oneOf([ "left", "center", "right" ]),
2356
2253
  buttonRef: i().oneOfType([ i().func, i().object ]),
2357
2254
  canCoverHead: i().bool,
2358
2255
  children: i().node.isRequired,
2359
- closeReasons: i().arrayOf(i().oneOf(kr)),
2360
- columnId: i().any,
2256
+ closeReasons: i().arrayOf(i().oneOf(br)),
2257
+ columnId: i().string,
2258
+ /** @private. */
2259
+ dragId: i().oneOfType([ i().string, i().number ]),
2361
2260
  elementRef: i().oneOfType([ i().func, i().object ]),
2362
- focusToggleReasons: i().arrayOf(i().oneOf(kr)),
2261
+ headCellScreenReaderText: i().string,
2262
+ focusToggleReasons: i().arrayOf(i().oneOf(br)),
2363
2263
  /** @private The index of the cell, skipping the info column. */
2364
2264
  index: i().number,
2365
2265
  label: i().node,
2366
2266
  /** @private. */
2367
2267
  onAutosizeColumn: i().func,
2368
- /** @private. */
2369
- onDragStart: i().func,
2370
2268
  /**
2371
2269
  * @private. This will be passed through, and will work as expected.
2372
2270
  */
@@ -2381,8 +2279,6 @@
2381
2279
  repositionMode: i().oneOf([ "none", "flip", "any" ]),
2382
2280
  resizable: i().bool,
2383
2281
  retainFocus: i().bool,
2384
- /** @private. */
2385
- showGuideline: i().oneOf([ "none", "before", "after" ]),
2386
2282
  takeFocus: i().bool,
2387
2283
  truncate: i().bool,
2388
2284
  /**
@@ -2393,37 +2289,39 @@
2393
2289
  visible: i().bool,
2394
2290
  width: i().number,
2395
2291
  /** @private. */
2396
- variant: i().oneOf([ "toggleAll", "info", "actions" ]),
2397
- /** @private. */
2398
- zIndex: i().number
2292
+ variant: i().oneOf([ "toggleAll", "info", "actions" ])
2399
2293
  };
2400
- var Rr = [ "contentClick", "escapeKey", "toggleClick" ];
2401
- function Er(e) {
2402
- var n = e.align, o = n === void 0 ? "left" : n, i = e.canCoverHead, a = i === void 0 ? true : i, l = e.children, u = e.closeReasons, s = u === void 0 ? kr : u, c = e.columnId, d = e.elementRef, f = e.focusToggleReasons, v = f === void 0 ? Rr : f, p = e.id, m = e.index, b = e.buttonRef, h = e.label, y = e.onAutosizeColumn, g = e.onDragStart, w = e.onKeyDown, C = e.onRequestClose, x = e.onRequestMoveColumn, S = e.onRequestOpen, k = e.onRequestResize, O = e.open, E = e.repositionMode, I = E === void 0 ? "flip" : E, D = e.resizable, A = D === void 0 ? true : D, j = e.retainFocus, z = e.showGuideline, P = e.style, M = e.takeFocus, $ = M === void 0 ? true : M, N = e.truncate, L = N === void 0 ? true : N, W = e.variant, K = e.visible, B = K === void 0 ? true : K, F = e.width, V = e.zIndex, U = V === void 0 ? 1 : V, X = xr(e, [ "align", "canCoverHead", "children", "closeReasons", "columnId", "elementRef", "focusToggleReasons", "id", "index", "buttonRef", "label", "onAutosizeColumn", "onDragStart", "onKeyDown", "onRequestClose", "onRequestMoveColumn", "onRequestOpen", "onRequestResize", "open", "repositionMode", "resizable", "retainFocus", "showGuideline", "style", "takeFocus", "truncate", "variant", "visible", "width", "zIndex" ]);
2294
+ var hr = [ "contentClick", "escapeKey", "toggleClick" ];
2295
+ function yr(e) {
2296
+ var n = e.align, o = n === void 0 ? "left" : n, i = e.buttonRef, a = e.canCoverHead, u = a === void 0 ? true : a, s = e.children, c = e.closeReasons, d = c === void 0 ? br : c, f = e.columnId, v = e.dragId, p = e.elementRef, b = e.headCellScreenReaderText, m = e.focusToggleReasons, h = m === void 0 ? hr : m, y = e.id, g = e.index, w = e.label, C = e.onAutosizeColumn, x = e.onKeyDown, S = e.onRequestClose, k = e.onRequestMoveColumn, O = e.onRequestOpen, E = e.onRequestResize, I = e.open, T = e.repositionMode, A = T === void 0 ? "flip" : T, _ = e.resizable, z = _ === void 0 ? true : _, M = e.retainFocus, $ = e.style, N = e.takeFocus, W = N === void 0 ? true : N, H = e.truncate, K = H === void 0 ? true : H, B = e.variant, V = e.visible, F = V === void 0 ? true : V, U = e.width, X = vr(e, [ "align", "buttonRef", "canCoverHead", "children", "closeReasons", "columnId", "dragId", "elementRef", "headCellScreenReaderText", "focusToggleReasons", "id", "index", "label", "onAutosizeColumn", "onKeyDown", "onRequestClose", "onRequestMoveColumn", "onRequestOpen", "onRequestResize", "open", "repositionMode", "resizable", "retainFocus", "style", "takeFocus", "truncate", "variant", "visible", "width" ]);
2403
2297
  // @docs-props-type HeadDropdownCellPropsBase
2404
- var G = pr()({
2298
+ var Y = ir()({
2405
2299
  componentName: "HeadDropdownCell",
2406
2300
  /* eslint-disable-next-line prefer-rest-params */
2407
2301
  componentProps: arguments[0],
2408
2302
  // see SUI-7028
2409
2303
  valuePropName: "open"
2410
2304
  });
2411
- var Y = (0, t.useState)(), J = br(Y, 2), Q = J[0], Z = J[1];
2412
- var ee = (0, t.useState)(null), ne = br(ee, 2), te = ne[0], re = ne[1];
2413
- var oe = (0, t.useState)(null), ie = br(oe, 2), ae = ie[0], le = ie[1];
2414
- var ue = (0, t.useState)(false), se = br(ue, 2), ce = se[0], de = se[1];
2415
- var fe = (0, t.useState)(false), ve = br(fe, 2), pe = ve[0], me = ve[1];
2416
- var be = (0, _.createDOMID)("popover");
2417
- var he = (0, _.createDOMID)("cellId");
2418
- var ye = (0, t.useContext)(xn), ge = ye.headType;
2305
+ var G = (0, t.useState)(), J = lr(G, 2), Q = J[0], Z = J[1];
2306
+ var ee = (0, t.useState)(null), ne = lr(ee, 2), te = ne[0], re = ne[1];
2307
+ var oe = (0, t.useState)(null), ie = lr(oe, 2), ae = ie[0], le = ie[1];
2308
+ var ue = (0, t.useState)(false), se = lr(ue, 2), ce = se[0], de = se[1];
2309
+ var fe = (0, R.createDOMID)("popover");
2310
+ var ve = (0, R.createDOMID)("cellId");
2311
+ var pe = !!k;
2312
+ var be = (0, l.useSortable)({
2313
+ // dragId is optional in HeadCell but required by useSortable
2314
+ // since it is always set in Table, use a type assertion here to avoid TypeScript error
2315
+ id: v
2316
+ }), me = be.attributes, he = be.listeners, ye = be.setNodeRef, ge = be.isDragging;
2419
2317
  var we = (0, t.useMemo)((function() {
2420
- return G ? O : pe;
2421
- }), [ G, pe, O ]);
2422
- var Ce = T()(B);
2423
- var xe = p || he;
2318
+ return Y ? I : ce;
2319
+ }), [ Y, ce, I ]);
2320
+ var Ce = j()(F);
2321
+ var xe = y || ve;
2424
2322
  (0, t.useEffect)((function() {
2425
2323
  if (false) {}
2426
- }), [ k, L ]);
2324
+ }), [ E, K ]);
2427
2325
  var Se = (0, t.useCallback)((function(e) {
2428
2326
  var n = e.reason, t = e.event;
2429
2327
  if (n === "clickAway" && t !== undefined) {
@@ -2436,38 +2334,42 @@
2436
2334
  r = r.parentNode;
2437
2335
  }
2438
2336
  }
2439
- if (we && q()(s, n) && m !== undefined) {
2440
- if (q()(v, n)) {
2337
+ if (we && P()(d, n) && g !== undefined) {
2338
+ if (P()(h, n)) {
2441
2339
  ae === null || ae === void 0 ? void 0 : ae.focus();
2442
2340
  }
2443
- if (!G) {
2444
- me(false);
2341
+ if (!Y) {
2342
+ de(false);
2445
2343
  }
2446
- C === null || C === void 0 ? void 0 : C(t, {
2447
- index: m,
2344
+ S === null || S === void 0 ? void 0 : S(t, {
2345
+ index: g,
2448
2346
  reason: n,
2449
- columnId: c
2347
+ columnId: f
2450
2348
  });
2451
2349
  }
2452
- }), [ s, c, v, m, ae, G, we, C ]);
2350
+ }), [ d, f, h, g, ae, Y, we, S ]);
2453
2351
  (0, t.useEffect)((function() {
2454
- if (Ce && !B) {
2352
+ if (Ce && !F) {
2455
2353
  Se({
2456
2354
  reason: "offScreen"
2457
2355
  });
2458
2356
  }
2459
- }), [ Se, Ce, B ]);
2357
+ }), [ Se, Ce, F ]);
2460
2358
  var ke = (0, t.useCallback)((function(e) {
2461
- re(e);
2462
- H(d, e);
2463
- }), [ d ]);
2359
+ L(p, e);
2360
+ if (pe) {
2361
+ ye(e);
2362
+ }
2363
+ }), [ pe, p, ye ]);
2464
2364
  var Oe = (0, t.useCallback)((function(e) {
2465
2365
  le(e);
2466
- H(b, e);
2467
- }), [ b ]);
2468
- var Ee = (0, t.useCallback)((function(e) {
2366
+ re(e);
2367
+ L(i, e);
2368
+ }), [ i ]);
2369
+ var Re = (0, t.useCallback)((function(e) {
2370
+ e.stopPropagation();
2469
2371
  // ignore clicks on the resize handle
2470
- if (e.target.getAttribute("data-test") === "resize") {
2372
+ if (e.target.getAttribute("data-test") === "resize") {
2471
2373
  return;
2472
2374
  }
2473
2375
  if (!we) {
@@ -2478,57 +2380,33 @@
2478
2380
  reason: "toggleClick",
2479
2381
  event: e
2480
2382
  });
2481
- } else if (m !== undefined) {
2482
- S === null || S === void 0 ? void 0 : S(e, {
2383
+ } else if (g !== undefined) {
2384
+ O === null || O === void 0 ? void 0 : O(e, {
2483
2385
  reason: "toggleClick",
2484
- columnId: c,
2485
- index: m
2386
+ columnId: f,
2387
+ index: g
2486
2388
  });
2487
- if (!G) {
2488
- me(true);
2489
- }
2490
- }
2491
- }), [ c, Se, m, G, we, S ]);
2492
- var Ie = (0, t.useCallback)((function(e) {
2493
- var n = e.nativeEvent, t = e.target;
2494
- var r = (0, R.keycode)(n);
2495
- if (t.getAttribute("data-test") !== "resize") {
2496
- if (r === "left" && m !== undefined && m > 0) {
2497
- x === null || x === void 0 ? void 0 : x({
2498
- fromIndex: m,
2499
- toIndex: m - 1,
2500
- columnId: c
2501
- });
2502
- } else if (r === "right" && m !== undefined) {
2503
- x === null || x === void 0 ? void 0 : x({
2504
- fromIndex: m,
2505
- toIndex: m + 1,
2506
- columnId: c
2507
- });
2389
+ if (!Y) {
2390
+ de(true);
2508
2391
  }
2509
2392
  }
2510
- if (m !== undefined) {
2511
- w === null || w === void 0 ? void 0 : w(e, {
2512
- index: m,
2513
- columnId: c
2393
+ }), [ f, Se, g, Y, we, O ]);
2394
+ var Ee = (0, t.useCallback)((function(e) {
2395
+ if (g !== undefined) {
2396
+ x === null || x === void 0 ? void 0 : x(e, {
2397
+ index: g,
2398
+ columnId: f
2514
2399
  });
2515
2400
  }
2516
- }), [ c, m, w, x ]);
2401
+ }), [ f, g, x ]);
2517
2402
  var Te = (0, t.useCallback)((function(e) {
2518
2403
  Se({
2519
2404
  reason: "contentClick",
2520
2405
  event: e
2521
2406
  });
2522
2407
  }), [ Se ]);
2523
- var De = (0, t.useCallback)((function(e, n) {
2524
- de(true);
2525
- g === null || g === void 0 ? void 0 : g(e, n);
2526
- }), [ g ]);
2527
- var Ae = (0, t.useCallback)((function() {
2528
- de(false);
2529
- }), []);
2530
- var je = (0, t.useMemo)((function() {
2531
- if (Q !== undefined && ur()(Q)) {
2408
+ var De = (0, t.useMemo)((function() {
2409
+ if (Q !== undefined && Zt()(Q)) {
2532
2410
  var e;
2533
2411
  return {
2534
2412
  x: Q - ((e = te === null || te === void 0 ? void 0 : te.getBoundingClientRect().left) !== null && e !== void 0 ? e : 0)
@@ -2536,89 +2414,97 @@
2536
2414
  }
2537
2415
  return undefined;
2538
2416
  }), [ Q, te ]);
2417
+ var qe = (0, t.useMemo)((function() {
2418
+ return Ie()({}, $, {
2419
+ width: U
2420
+ });
2421
+ }), [ $, U ]);
2422
+ var Ae;
2423
+ if (b) {
2424
+ Ae = b;
2425
+ } else if (typeof w === "string") {
2426
+ Ae = w;
2427
+ }
2539
2428
 
2540
- return r().createElement(gn, mr({
2541
- style: Re()(P, {
2542
- width: F
2543
- }),
2429
+ return r().createElement(gn, ar({
2430
+ style: qe,
2544
2431
  "data-test": "head-cell",
2545
- $dragging: ce || undefined,
2546
- $variant: W,
2547
- id: B ? xe : undefined,
2432
+ $isDragging: pe && ge,
2433
+ $variant: B,
2434
+ id: F ? xe : undefined,
2548
2435
  ref: ke
2549
- }, X, {
2550
- onClick: Ee,
2551
- onKeyDown: Ie,
2552
- $isFixed: ge === "fixed",
2553
- $zIndex: U
2554
- }), r().createElement(yn, {
2555
- elementRef: Oe,
2556
- label: h,
2436
+ }, X), r().createElement(yn, null, pe && r().createElement(wn, ar({
2437
+ "aria-label": (0, q.sprintf)((0, D._)("Reorder %(labelString)s"), {
2438
+ labelString: Ae
2439
+ }),
2440
+ "data-test": "drag"
2441
+ }, me, he), r().createElement(je(), null)), r().createElement(hn, {
2557
2442
  align: o,
2558
- columnId: c,
2559
- id: p,
2560
- index: m,
2561
- isMenu: true,
2562
- resizable: B && A,
2563
- onDragStart: g ? De : undefined,
2564
- onDragEnd: g ? Ae : undefined,
2565
- onAutosizeColumn: y,
2566
- onRequestResize: k,
2567
- truncate: L,
2568
- width: F,
2569
- clickable: true,
2443
+ "aria-expanded": we,
2570
2444
  "aria-haspopup": true,
2571
- "aria-owns": be,
2572
- "aria-expanded": we
2573
- }), z !== "none" && r().createElement(wn, {
2574
- $position: z
2575
- }), r().createElement(fr(), {
2445
+ "aria-owns": fe,
2446
+ clickable: true,
2447
+ columnId: f,
2448
+ elementRef: Oe,
2449
+ id: y,
2450
+ index: g,
2451
+ isMenu: true,
2452
+ label: w,
2453
+ resizable: F && z,
2454
+ onAutosizeColumn: C,
2455
+ onRequestResize: E,
2456
+ onClick: Re,
2457
+ onKeyDown: Ee,
2458
+ truncate: K,
2459
+ width: U,
2460
+ "data-test": "inner"
2461
+ }), r().createElement(rr(), {
2576
2462
  align: "center",
2577
- open: !!te && we,
2578
- autoCloseWhenOffScreen: q()(s, "offScreen"),
2579
2463
  anchor: te,
2580
- canCoverAnchor: a,
2581
- retainFocus: j,
2464
+ "aria-labelledby": xe,
2465
+ autoCloseWhenOffScreen: P()(d, "offScreen"),
2466
+ canCoverAnchor: u,
2582
2467
  defaultPlacement: "below",
2468
+ id: fe,
2583
2469
  onRequestClose: Se,
2584
- repositionMode: I,
2585
- id: be,
2586
- "aria-labelledby": xe,
2587
- takeFocus: $,
2588
- pointTo: je
2589
- }, cr()(l) ? function() {
2470
+ open: !!te && we,
2471
+ pointTo: De,
2472
+ repositionMode: A,
2473
+ retainFocus: M,
2474
+ takeFocus: W
2475
+ }, nr()(s) ? function() {
2590
2476
 
2591
2477
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
2592
2478
  return r().createElement("div", {
2593
2479
  onClick: Te
2594
- }, l.apply(void 0, arguments));
2480
+ }, s.apply(void 0, arguments));
2595
2481
  } :
2596
2482
 
2597
2483
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
2598
2484
  r().createElement("div", {
2599
2485
  onClick: Te
2600
- }, l)));
2486
+ }, s))));
2601
2487
  }
2602
- Er.propTypes = Or;
2603
- Er.splunkUiType = "Table.HeadDropdownCell";
2604
- Er.possibleCloseReasons = kr;
2605
- /* harmony default export */ const Ir = Er;
2488
+ yr.propTypes = mr;
2489
+ yr.splunkUiType = "Table.HeadDropdownCell";
2490
+ yr.possibleCloseReasons = br;
2491
+ /* harmony default export */ const gr = yr;
2606
2492
  // CONCATENATED MODULE: ./src/Table/KeyboardSensor.ts
2607
- function Tr(e) {
2493
+ function wr(e) {
2608
2494
  "@babel/helpers - typeof";
2609
- return Tr = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
2495
+ return wr = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
2610
2496
  return typeof e;
2611
2497
  } : function(e) {
2612
2498
  return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
2613
- }, Tr(e);
2499
+ }, wr(e);
2614
2500
  }
2615
- function Dr(e, n) {
2616
- return qr(e) || jr(e, n) || _r(e, n) || Ar();
2501
+ function Cr(e, n) {
2502
+ return kr(e) || Sr(e, n) || Er(e, n) || xr();
2617
2503
  }
2618
- function Ar() {
2504
+ function xr() {
2619
2505
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2620
2506
  }
2621
- function jr(e, n) {
2507
+ function Sr(e, n) {
2622
2508
  var t = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
2623
2509
  if (null != t) {
2624
2510
  var r, o, i, a, l = [], u = !0, s = !1;
@@ -2640,68 +2526,68 @@
2640
2526
  return l;
2641
2527
  }
2642
2528
  }
2643
- function qr(e) {
2529
+ function kr(e) {
2644
2530
  if (Array.isArray(e)) return e;
2645
2531
  }
2646
- function zr(e) {
2647
- return $r(e) || Mr(e) || _r(e) || Pr();
2532
+ function Or(e) {
2533
+ return Tr(e) || Ir(e) || Er(e) || Rr();
2648
2534
  }
2649
- function Pr() {
2535
+ function Rr() {
2650
2536
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2651
2537
  }
2652
- function _r(e, n) {
2538
+ function Er(e, n) {
2653
2539
  if (e) {
2654
- if ("string" == typeof e) return Nr(e, n);
2540
+ if ("string" == typeof e) return jr(e, n);
2655
2541
  var t = {}.toString.call(e).slice(8, -1);
2656
- return "Object" === t && e.constructor && (t = e.constructor.name), "Map" === t || "Set" === t ? Array.from(e) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? Nr(e, n) : void 0;
2542
+ return "Object" === t && e.constructor && (t = e.constructor.name), "Map" === t || "Set" === t ? Array.from(e) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? jr(e, n) : void 0;
2657
2543
  }
2658
2544
  }
2659
- function Mr(e) {
2545
+ function Ir(e) {
2660
2546
  if ("undefined" != typeof Symbol && null != e[Symbol.iterator] || null != e["@@iterator"]) return Array.from(e);
2661
2547
  }
2662
- function $r(e) {
2663
- if (Array.isArray(e)) return Nr(e);
2548
+ function Tr(e) {
2549
+ if (Array.isArray(e)) return jr(e);
2664
2550
  }
2665
- function Nr(e, n) {
2551
+ function jr(e, n) {
2666
2552
  (null == n || n > e.length) && (n = e.length);
2667
2553
  for (var t = 0, r = Array(n); t < n; t++) {
2668
2554
  r[t] = e[t];
2669
2555
  }
2670
2556
  return r;
2671
2557
  }
2672
- function Lr(e, n) {
2558
+ function Dr(e, n) {
2673
2559
  if (!(e instanceof n)) throw new TypeError("Cannot call a class as a function");
2674
2560
  }
2675
- function Hr(e, n) {
2561
+ function qr(e, n) {
2676
2562
  for (var t = 0; t < n.length; t++) {
2677
2563
  var r = n[t];
2678
2564
  r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0),
2679
- Object.defineProperty(e, Br(r.key), r);
2565
+ Object.defineProperty(e, _r(r.key), r);
2680
2566
  }
2681
2567
  }
2682
- function Wr(e, n, t) {
2683
- return n && Hr(e.prototype, n), t && Hr(e, t), Object.defineProperty(e, "prototype", {
2568
+ function Ar(e, n, t) {
2569
+ return n && qr(e.prototype, n), t && qr(e, t), Object.defineProperty(e, "prototype", {
2684
2570
  writable: !1
2685
2571
  }), e;
2686
2572
  }
2687
- function Kr(e, n, t) {
2688
- return (n = Br(n)) in e ? Object.defineProperty(e, n, {
2573
+ function Pr(e, n, t) {
2574
+ return (n = _r(n)) in e ? Object.defineProperty(e, n, {
2689
2575
  value: t,
2690
2576
  enumerable: !0,
2691
2577
  configurable: !0,
2692
2578
  writable: !0
2693
2579
  }) : e[n] = t, e;
2694
2580
  }
2695
- function Br(e) {
2696
- var n = Fr(e, "string");
2697
- return "symbol" == Tr(n) ? n : n + "";
2581
+ function _r(e) {
2582
+ var n = zr(e, "string");
2583
+ return "symbol" == wr(n) ? n : n + "";
2698
2584
  }
2699
- function Fr(e, n) {
2700
- if ("object" != Tr(e) || !e) return e;
2585
+ function zr(e, n) {
2586
+ if ("object" != wr(e) || !e) return e;
2701
2587
  var t = e[Symbol.toPrimitive];
2702
2588
  if (void 0 !== t) {
2703
2589
  var r = t.call(e, n || "default");
2704
- if ("object" != Tr(r)) return r;
2590
+ if ("object" != wr(r)) return r;
2705
2591
  throw new TypeError("@@toPrimitive must return a primitive value.");
2706
2592
  }
2707
2593
  return ("string" === n ? String : Number)(e);
@@ -2709,21 +2595,21 @@
2709
2595
  // based on https://github.com/clauderic/dnd-kit/blob/694dcc2f62e5269541fc941fa6c9af46ccd682ad/packages/core/src/sensors/keyboard/KeyboardSensor.ts
2710
2596
  // eslint-disable-next-line max-classes-per-file
2711
2597
  // https://github.com/clauderic/dnd-kit/blob/694dcc2f62e5269541fc941fa6c9af46ccd682ad/packages/core/src/sensors/utilities/Listeners.ts
2712
- var Vr = function() {
2598
+ var Mr = function() {
2713
2599
  function e(n) {
2714
2600
  var t = this;
2715
- Lr(this, e);
2716
- Kr(this, "listeners", []);
2717
- Kr(this, "removeAll", (function() {
2601
+ Dr(this, e);
2602
+ Pr(this, "listeners", []);
2603
+ Pr(this, "removeAll", (function() {
2718
2604
  t.listeners.forEach((function(e) {
2719
2605
  var n;
2720
- return (n = t.target) === null || n === void 0 ? void 0 : n.removeEventListener.apply(n, zr(e));
2606
+ return (n = t.target) === null || n === void 0 ? void 0 : n.removeEventListener.apply(n, Or(e));
2721
2607
  }));
2722
2608
  }));
2723
2609
  this.target = n;
2724
2610
  this.target = n;
2725
2611
  }
2726
- Wr(e, [ {
2612
+ Ar(e, [ {
2727
2613
  key: "add",
2728
2614
  value: function e(n, t, r) {
2729
2615
  var o;
@@ -2734,7 +2620,7 @@
2734
2620
  return e;
2735
2621
  }();
2736
2622
  // https://github.com/clauderic/dnd-kit/blob/694dcc2f62e5269541fc941fa6c9af46ccd682ad/packages/core/src/utilities/transform/parseTransform.ts
2737
- function Ur(e) {
2623
+ function $r(e) {
2738
2624
  if (e.startsWith("matrix3d(")) {
2739
2625
  var n = e.slice(9, -1).split(/, /);
2740
2626
  return {
@@ -2756,8 +2642,8 @@
2756
2642
  return null;
2757
2643
  }
2758
2644
  // https://github.com/clauderic/dnd-kit/blob/694dcc2f62e5269541fc941fa6c9af46ccd682ad/packages/core/src/utilities/transform/inverseTransform.ts
2759
- function Xr(e, n, t) {
2760
- var r = Ur(n);
2645
+ function Nr(e, n, t) {
2646
+ var r = $r(n);
2761
2647
  if (!r) {
2762
2648
  return e;
2763
2649
  }
@@ -2775,17 +2661,17 @@
2775
2661
  left: u
2776
2662
  };
2777
2663
  }
2778
- var Gr = {
2664
+ var Wr = {
2779
2665
  ignoreTransform: false
2780
2666
  };
2781
2667
  // https://github.com/clauderic/dnd-kit/blob/694dcc2f62e5269541fc941fa6c9af46ccd682ad/packages/core/src/utilities/rect/getRect.ts
2782
- function Yr(e) {
2783
- var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Gr;
2668
+ function Lr(e) {
2669
+ var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Wr;
2784
2670
  var t = e.getBoundingClientRect();
2785
2671
  if (n.ignoreTransform) {
2786
- var r = (0, _n.getWindow)(e).getComputedStyle(e), o = r.transform, i = r.transformOrigin;
2672
+ var r = (0, In.getWindow)(e).getComputedStyle(e), o = r.transform, i = r.transformOrigin;
2787
2673
  if (o) {
2788
- t = Xr(t, o, i);
2674
+ t = Nr(t, o, i);
2789
2675
  }
2790
2676
  }
2791
2677
  var a = t, l = a.top, u = a.left, s = a.width, c = a.height, d = a.bottom, f = a.right;
@@ -2798,7 +2684,7 @@
2798
2684
  right: f
2799
2685
  };
2800
2686
  }
2801
- function Jr(e) {
2687
+ function Hr(e) {
2802
2688
  if (e === document.scrollingElement) {
2803
2689
  var n = window, t = n.innerWidth, r = n.innerHeight;
2804
2690
  return {
@@ -2821,19 +2707,19 @@
2821
2707
  };
2822
2708
  }
2823
2709
  // https://github.com/clauderic/dnd-kit/blob/694dcc2f62e5269541fc941fa6c9af46ccd682ad/packages/core/src/utilities/scroll/documentScrollingElement.ts
2824
- function Qr(e) {
2825
- if (!_n.canUseDOM || !e) {
2710
+ function Kr(e) {
2711
+ if (!In.canUseDOM || !e) {
2826
2712
  return false;
2827
2713
  }
2828
2714
  return e === document.scrollingElement;
2829
2715
  }
2830
2716
  // https://github.com/clauderic/dnd-kit/blob/694dcc2f62e5269541fc941fa6c9af46ccd682ad/packages/core/src/utilities/scroll/getScrollPosition.ts
2831
- function Zr(e) {
2717
+ function Br(e) {
2832
2718
  var n = {
2833
2719
  x: 0,
2834
2720
  y: 0
2835
2721
  };
2836
- var t = Qr(e) ? {
2722
+ var t = Kr(e) ? {
2837
2723
  height: window.innerHeight,
2838
2724
  width: window.innerWidth
2839
2725
  } : {
@@ -2858,20 +2744,20 @@
2858
2744
  };
2859
2745
  }
2860
2746
  // https://github.com/clauderic/dnd-kit/blob/694dcc2f62e5269541fc941fa6c9af46ccd682ad/packages/core/src/utilities/coordinates/constants.ts
2861
- var eo = {
2747
+ var Vr = {
2862
2748
  x: 0,
2863
2749
  y: 0
2864
2750
  };
2865
2751
  // https://github.com/clauderic/dnd-kit/blob/694dcc2f62e5269541fc941fa6c9af46ccd682ad/packages/core/src/utilities/scroll/isFixed.ts
2866
- function no(e) {
2752
+ function Fr(e) {
2867
2753
  var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (0,
2868
- _n.getWindow)(e).getComputedStyle(e);
2754
+ In.getWindow)(e).getComputedStyle(e);
2869
2755
  return n.position === "fixed";
2870
2756
  }
2871
2757
  // https://github.com/clauderic/dnd-kit/blob/694dcc2f62e5269541fc941fa6c9af46ccd682ad/packages/core/src/utilities/scroll/isScrollable.ts
2872
- function to(e) {
2758
+ function Ur(e) {
2873
2759
  var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (0,
2874
- _n.getWindow)(e).getComputedStyle(e);
2760
+ In.getWindow)(e).getComputedStyle(e);
2875
2761
  var t = /(auto|scroll|overlay)/;
2876
2762
  var r = [ "overflow", "overflowX", "overflowY" ];
2877
2763
  return r.some((function(e) {
@@ -2880,7 +2766,7 @@
2880
2766
  }));
2881
2767
  }
2882
2768
  // https://github.com/clauderic/dnd-kit/blob/694dcc2f62e5269541fc941fa6c9af46ccd682ad/packages/core/src/utilities/scroll/getScrollableAncestors.ts
2883
- function ro(e, n) {
2769
+ function Xr(e, n) {
2884
2770
  var t = [];
2885
2771
  function r(o) {
2886
2772
  if (n != null && t.length >= n) {
@@ -2889,23 +2775,23 @@
2889
2775
  if (!o) {
2890
2776
  return t;
2891
2777
  }
2892
- if ((0, _n.isDocument)(o) && o.scrollingElement != null && !t.includes(o.scrollingElement)) {
2778
+ if ((0, In.isDocument)(o) && o.scrollingElement != null && !t.includes(o.scrollingElement)) {
2893
2779
  t.push(o.scrollingElement);
2894
2780
  return t;
2895
2781
  }
2896
- if (!(0, _n.isHTMLElement)(o) || (0, _n.isSVGElement)(o)) {
2782
+ if (!(0, In.isHTMLElement)(o) || (0, In.isSVGElement)(o)) {
2897
2783
  return t;
2898
2784
  }
2899
2785
  if (t.includes(o)) {
2900
2786
  return t;
2901
2787
  }
2902
- var i = (0, _n.getWindow)(e).getComputedStyle(o);
2788
+ var i = (0, In.getWindow)(e).getComputedStyle(o);
2903
2789
  if (o !== e) {
2904
- if (to(o, i)) {
2790
+ if (Ur(o, i)) {
2905
2791
  t.push(o);
2906
2792
  }
2907
2793
  }
2908
- if (no(o, i)) {
2794
+ if (Fr(o, i)) {
2909
2795
  return t;
2910
2796
  }
2911
2797
  return r(o.parentNode);
@@ -2916,23 +2802,23 @@
2916
2802
  return r(e);
2917
2803
  }
2918
2804
  // https://github.com/clauderic/dnd-kit/blob/694dcc2f62e5269541fc941fa6c9af46ccd682ad/packages/core/src/utilities/scroll/getScrollableAncestors.ts
2919
- function oo(e) {
2920
- var n = ro(e, 1), t = Dr(n, 1), r = t[0];
2805
+ function Yr(e) {
2806
+ var n = Xr(e, 1), t = Cr(n, 1), r = t[0];
2921
2807
  return r !== null && r !== void 0 ? r : null;
2922
2808
  }
2923
- var io = {
2809
+ var Gr = {
2924
2810
  start: [ a.KeyboardCode.Space, a.KeyboardCode.Enter ],
2925
2811
  cancel: [ a.KeyboardCode.Esc ],
2926
2812
  end: [ a.KeyboardCode.Space, a.KeyboardCode.Enter ]
2927
2813
  };
2928
2814
  // https://github.com/clauderic/dnd-kit/blob/694dcc2f62e5269541fc941fa6c9af46ccd682ad/packages/core/src/utilities/scroll/scrollIntoViewIfNeeded.ts
2929
- function ao(e) {
2930
- var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Yr;
2815
+ function Jr(e) {
2816
+ var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Lr;
2931
2817
  if (!e) {
2932
2818
  return;
2933
2819
  }
2934
2820
  var t = n(e), r = t.top, o = t.left, i = t.bottom, a = t.right;
2935
- var l = oo(e);
2821
+ var l = Yr(e);
2936
2822
  if (!l) {
2937
2823
  return;
2938
2824
  }
@@ -2943,23 +2829,23 @@
2943
2829
  });
2944
2830
  }
2945
2831
  }
2946
- var lo = function() {
2832
+ var Qr = function() {
2947
2833
  function e(n) {
2948
- Lr(this, e);
2949
- Kr(this, "autoScrollEnabled", false);
2950
- Kr(this, "referenceCoordinates", void 0);
2951
- Kr(this, "listeners", void 0);
2952
- Kr(this, "windowListeners", void 0);
2834
+ Dr(this, e);
2835
+ Pr(this, "autoScrollEnabled", false);
2836
+ Pr(this, "referenceCoordinates", void 0);
2837
+ Pr(this, "listeners", void 0);
2838
+ Pr(this, "windowListeners", void 0);
2953
2839
  this.props = n;
2954
2840
  var t = n.event.target;
2955
2841
  this.props = n;
2956
- this.listeners = new Vr((0, _n.getOwnerDocument)(t));
2957
- this.windowListeners = new Vr((0, _n.getWindow)(t));
2842
+ this.listeners = new Mr((0, In.getOwnerDocument)(t));
2843
+ this.windowListeners = new Mr((0, In.getWindow)(t));
2958
2844
  this.handleKeyDown = this.handleKeyDown.bind(this);
2959
2845
  this.handleCancel = this.handleCancel.bind(this);
2960
2846
  this.attach();
2961
2847
  }
2962
- Wr(e, [ {
2848
+ Ar(e, [ {
2963
2849
  key: "attach",
2964
2850
  value: function e() {
2965
2851
  var n = this;
@@ -2976,16 +2862,16 @@
2976
2862
  var n = this.props, t = n.activeNode, r = n.onStart;
2977
2863
  var o = t.node.current;
2978
2864
  if (o) {
2979
- ao(o);
2865
+ Jr(o);
2980
2866
  }
2981
- r(eo);
2867
+ r(Vr);
2982
2868
  }
2983
2869
  }, {
2984
2870
  key: "handleKeyDown",
2985
2871
  value: function e(n) {
2986
- if ((0, _n.isKeyboardEvent)(n)) {
2872
+ if ((0, In.isKeyboardEvent)(n)) {
2987
2873
  var t = this.props, r = t.active, o = t.context, i = t.options;
2988
- var l = i.keyboardCodes, u = l === void 0 ? io : l, s = i.coordinateGetter, c = i.scrollBehavior, d = c === void 0 ? "smooth" : c;
2874
+ var l = i.keyboardCodes, u = l === void 0 ? Gr : l, s = i.coordinateGetter, c = i.scrollBehavior, d = c === void 0 ? "smooth" : c;
2989
2875
  var f = n.code;
2990
2876
  if (u.end.includes(f)) {
2991
2877
  this.handleEnd(n);
@@ -2999,17 +2885,17 @@
2999
2885
  var p = v ? {
3000
2886
  x: v.left,
3001
2887
  y: v.top
3002
- } : eo;
2888
+ } : Vr;
3003
2889
  if (!this.referenceCoordinates) {
3004
2890
  this.referenceCoordinates = p;
3005
2891
  }
3006
- var m = s(n, {
2892
+ var b = s(n, {
3007
2893
  active: r,
3008
2894
  context: o.current,
3009
2895
  currentCoordinates: p
3010
2896
  });
3011
- if (m) {
3012
- var b = (0, _n.subtract)(m, p);
2897
+ if (b) {
2898
+ var m = (0, In.subtract)(b, p);
3013
2899
  var h = {
3014
2900
  x: 0,
3015
2901
  y: 0
@@ -3018,29 +2904,29 @@
3018
2904
  for (var g = 0; g < y.length; g += 1) {
3019
2905
  var w = y[g];
3020
2906
  var C = n.code;
3021
- var x = Zr(w), S = x.isTop, k = x.isRight, O = x.isLeft, R = x.isBottom, E = x.maxScroll, I = x.minScroll;
3022
- var T = Jr(w);
2907
+ var x = Br(w), S = x.isTop, k = x.isRight, O = x.isLeft, R = x.isBottom, E = x.maxScroll, I = x.minScroll;
2908
+ var T = Hr(w);
3023
2909
  // isDraggableNodeVerticallyInView and isDraggableNodeHorizontallyInView are custom
3024
2910
  // we want to scroll only when a dragging node will be out of view,
3025
2911
  // originally it tries to always place a dragging node in the middle of the container
3026
- var D = T.top <= m.y && T.bottom >= m.y + ((v === null || v === void 0 ? void 0 : v.height) || 0);
3027
- var A = T.left <= m.x && T.right >= m.x + ((v === null || v === void 0 ? void 0 : v.width) || 0);
3028
- var j = (C === a.KeyboardCode.Right && !k || C === a.KeyboardCode.Left && !O) && !A;
3029
- var q = (C === a.KeyboardCode.Down && !R || C === a.KeyboardCode.Up && !S) && !D;
3030
- if (j) {
3031
- var z = w.scrollLeft + b.x;
3032
- var P = C === a.KeyboardCode.Right && z <= E.x || C === a.KeyboardCode.Left && z >= I.x;
3033
- if (P && !b.y) {
2912
+ var j = T.top <= b.y && T.bottom >= b.y + ((v === null || v === void 0 ? void 0 : v.height) || 0);
2913
+ var D = T.left <= b.x && T.right >= b.x + ((v === null || v === void 0 ? void 0 : v.width) || 0);
2914
+ var q = (C === a.KeyboardCode.Right && !k || C === a.KeyboardCode.Left && !O) && !D;
2915
+ var A = (C === a.KeyboardCode.Down && !R || C === a.KeyboardCode.Up && !S) && !j;
2916
+ if (q) {
2917
+ var P = w.scrollLeft + m.x;
2918
+ var _ = C === a.KeyboardCode.Right && P <= E.x || C === a.KeyboardCode.Left && P >= I.x;
2919
+ if (_ && !m.y) {
3034
2920
  // We don't need to update coordinates, the scroll adjustment alone will trigger
3035
2921
  // logic to auto-detect the new container we are over
3036
2922
  w.scrollTo({
3037
- left: z,
2923
+ left: P,
3038
2924
  behavior: d
3039
2925
  });
3040
2926
  return;
3041
2927
  }
3042
- if (P) {
3043
- h.x = w.scrollLeft - z;
2928
+ if (_) {
2929
+ h.x = w.scrollLeft - P;
3044
2930
  } else {
3045
2931
  h.x = C === a.KeyboardCode.Right ? w.scrollLeft - E.x : w.scrollLeft - I.x;
3046
2932
  }
@@ -3051,20 +2937,20 @@
3051
2937
  });
3052
2938
  }
3053
2939
  break;
3054
- } else if (q) {
3055
- var _ = w.scrollTop + b.y;
3056
- var M = C === a.KeyboardCode.Down && _ <= E.y || C === a.KeyboardCode.Up && _ >= I.y;
3057
- if (M && !b.x) {
2940
+ } else if (A) {
2941
+ var z = w.scrollTop + m.y;
2942
+ var M = C === a.KeyboardCode.Down && z <= E.y || C === a.KeyboardCode.Up && z >= I.y;
2943
+ if (M && !m.x) {
3058
2944
  // We don't need to update coordinates, the scroll adjustment alone will trigger
3059
2945
  // logic to auto-detect the new container we are over
3060
2946
  w.scrollTo({
3061
- top: _,
2947
+ top: z,
3062
2948
  behavior: d
3063
2949
  });
3064
2950
  return;
3065
2951
  }
3066
2952
  if (M) {
3067
- h.y = w.scrollTop - _;
2953
+ h.y = w.scrollTop - z;
3068
2954
  } else {
3069
2955
  h.y = C === a.KeyboardCode.Down ? w.scrollTop - E.y : w.scrollTop - I.y;
3070
2956
  }
@@ -3077,7 +2963,7 @@
3077
2963
  break;
3078
2964
  }
3079
2965
  }
3080
- this.handleMove(n, (0, _n.add)((0, _n.subtract)(m, this.referenceCoordinates), h));
2966
+ this.handleMove(n, (0, In.add)((0, In.subtract)(b, this.referenceCoordinates), h));
3081
2967
  }
3082
2968
  }
3083
2969
  }
@@ -3113,10 +2999,10 @@
3113
2999
  } ]);
3114
3000
  return e;
3115
3001
  }();
3116
- Kr(lo, "activators", [ {
3002
+ Pr(Qr, "activators", [ {
3117
3003
  eventName: "onKeyDown",
3118
3004
  handler: function e(n, t, r) {
3119
- var o = t.keyboardCodes, i = o === void 0 ? io : o, a = t.onActivation;
3005
+ var o = t.keyboardCodes, i = o === void 0 ? Gr : o, a = t.onActivation;
3120
3006
  var l = r.active;
3121
3007
  var u = n.nativeEvent.code;
3122
3008
  if (i.start.includes(u)) {
@@ -3134,24 +3020,24 @@
3134
3020
  }
3135
3021
  } ]);
3136
3022
  // CONCATENATED MODULE: external "lodash/extend"
3137
- const uo = require("lodash/extend");
3138
- var so = e.n(uo);
3023
+ const Zr = require("lodash/extend");
3024
+ var eo = e.n(Zr);
3139
3025
  // CONCATENATED MODULE: ./src/Table/HeadTableStyles.ts
3140
- var co = $()(te).withConfig({
3026
+ var no = $()(te).withConfig({
3141
3027
  displayName: "HeadTableStyles__Styled",
3142
3028
  componentId: "g85wgf-0"
3143
3029
  })([ "min-width:0;table-layout:fixed;" ]);
3144
- var fo = $().div.withConfig({
3030
+ var to = $().div.withConfig({
3145
3031
  displayName: "HeadTableStyles__StyledDockedContainer",
3146
3032
  componentId: "g85wgf-1"
3147
3033
  })([ "overflow:hidden;position:fixed;z-index:", ";@media print{display:none;}" ], N.variables.zindexFixedNavbar);
3148
- var vo = $()(fo).withConfig({
3034
+ var ro = $()(to).withConfig({
3149
3035
  displayName: "HeadTableStyles__StyledFixedContainer",
3150
3036
  componentId: "g85wgf-2"
3151
3037
  })([ "position:absolute;box-shadow:none;z-index:1;" ]);
3152
3038
  // CONCATENATED MODULE: ./src/Table/HeadTable.tsx
3153
- function po() {
3154
- return po = Object.assign ? Object.assign.bind() : function(e) {
3039
+ function oo() {
3040
+ return oo = Object.assign ? Object.assign.bind() : function(e) {
3155
3041
  for (var n = 1; n < arguments.length; n++) {
3156
3042
  var t = arguments[n];
3157
3043
  for (var r in t) {
@@ -3159,11 +3045,11 @@
3159
3045
  }
3160
3046
  }
3161
3047
  return e;
3162
- }, po.apply(null, arguments);
3048
+ }, oo.apply(null, arguments);
3163
3049
  }
3164
- function mo(e, n) {
3050
+ function io(e, n) {
3165
3051
  if (null == e) return {};
3166
- var t, r, o = bo(e, n);
3052
+ var t, r, o = ao(e, n);
3167
3053
  if (Object.getOwnPropertySymbols) {
3168
3054
  var i = Object.getOwnPropertySymbols(e);
3169
3055
  for (r = 0; r < i.length; r++) {
@@ -3172,7 +3058,7 @@
3172
3058
  }
3173
3059
  return o;
3174
3060
  }
3175
- function bo(e, n) {
3061
+ function ao(e, n) {
3176
3062
  if (null == e) return {};
3177
3063
  var t = {};
3178
3064
  for (var r in e) {
@@ -3183,7 +3069,7 @@
3183
3069
  }
3184
3070
  return t;
3185
3071
  }
3186
- var ho = {
3072
+ var lo = {
3187
3073
  cellWidths: i().arrayOf(i().number).isRequired,
3188
3074
  dragIndex: i().number,
3189
3075
  elementRef: i().oneOfType([ i().func, i().object ]),
@@ -3204,13 +3090,13 @@
3204
3090
  * @private
3205
3091
  * HeadTable is an internal component that provides a detached table head that can
3206
3092
  * then be positioned in different ways outside of the main table.
3207
- */ function yo(e) {
3208
- var n = e.cellWidths, o = e.elementRef, i = e.hasDragColumn, a = e.hasRowExpansion, l = e.hasRowSelection, u = e.headType, s = e.horizontalOffset, c = s === void 0 ? 0 : s, d = e.isFixedColumn, f = e.tableStyle, v = e.tableWidth, p = e.tHead, m = e.top, b = e.width, h = mo(e, [ "cellWidths", "elementRef", "hasDragColumn", "hasRowExpansion", "hasRowSelection", "headType", "horizontalOffset", "isFixedColumn", "tableStyle", "tableWidth", "tHead", "top", "width" ]);
3093
+ */ function uo(e) {
3094
+ var n = e.cellWidths, o = e.elementRef, i = e.hasDragColumn, a = e.hasRowExpansion, l = e.hasRowSelection, u = e.headType, s = e.horizontalOffset, c = s === void 0 ? 0 : s, d = e.isFixedColumn, f = e.tableStyle, v = e.tableWidth, p = e.tHead, b = e.top, m = e.width, h = io(e, [ "cellWidths", "elementRef", "hasDragColumn", "hasRowExpansion", "hasRowSelection", "headType", "horizontalOffset", "isFixedColumn", "tableStyle", "tableWidth", "tHead", "top", "width" ]);
3209
3095
  var y = u === "docked";
3210
- var w = y ? fo : vo;
3096
+ var w = y ? to : ro;
3211
3097
  var C = (0, t.useRef)(null);
3212
3098
  var x = (0, t.useCallback)((function(e) {
3213
- H(C, e);
3099
+ L(C, e);
3214
3100
  }), [ C ]);
3215
3101
  var S = 0;
3216
3102
  if (a) {
@@ -3234,7 +3120,7 @@
3234
3120
  return k.filter(t.isValidElement).map((function(e, r) {
3235
3121
 
3236
3122
  return (0, t.cloneElement)(e, {
3237
- style: so()({}, e.props.style, {
3123
+ style: eo()({}, e.props.style, {
3238
3124
  width: n[r + S]
3239
3125
  })
3240
3126
  });
@@ -3246,25 +3132,115 @@
3246
3132
  }, O);
3247
3133
  var E = (0, t.useMemo)((function() {
3248
3134
  return {
3249
- top: m,
3250
- width: b
3135
+ top: b,
3136
+ width: m
3251
3137
  };
3252
- }), [ m, b ]);
3138
+ }), [ b, m ]);
3253
3139
 
3254
3140
  return r().createElement(w, {
3255
3141
  style: E,
3256
3142
  ref: o
3257
- }, r().createElement(co, po({
3143
+ }, r().createElement(no, oo({
3258
3144
  "data-test": "".concat(u, "-head-table"),
3259
3145
  "data-fixed-column": d ? "true" : undefined,
3260
- style: so()({}, f, {
3146
+ style: eo()({}, f, {
3261
3147
  marginLeft: c,
3262
3148
  width: d ? undefined : v
3263
3149
  })
3264
3150
  }, g()(h, "dragIndex")), R));
3265
3151
  }
3266
- yo.propTypes = ho;
3267
- /* harmony default export */ const go = yo;
3152
+ uo.propTypes = lo;
3153
+ /* harmony default export */ const so = uo;
3154
+ // CONCATENATED MODULE: ./src/utils/getBoundingClientRect.ts
3155
+ function co(e) {
3156
+ "@babel/helpers - typeof";
3157
+ return co = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
3158
+ return typeof e;
3159
+ } : function(e) {
3160
+ return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
3161
+ }, co(e);
3162
+ }
3163
+ function fo(e, n) {
3164
+ var t = Object.keys(e);
3165
+ if (Object.getOwnPropertySymbols) {
3166
+ var r = Object.getOwnPropertySymbols(e);
3167
+ n && (r = r.filter((function(n) {
3168
+ return Object.getOwnPropertyDescriptor(e, n).enumerable;
3169
+ }))), t.push.apply(t, r);
3170
+ }
3171
+ return t;
3172
+ }
3173
+ function vo(e) {
3174
+ for (var n = 1; n < arguments.length; n++) {
3175
+ var t = null != arguments[n] ? arguments[n] : {};
3176
+ n % 2 ? fo(Object(t), !0).forEach((function(n) {
3177
+ po(e, n, t[n]);
3178
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : fo(Object(t)).forEach((function(n) {
3179
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n));
3180
+ }));
3181
+ }
3182
+ return e;
3183
+ }
3184
+ function po(e, n, t) {
3185
+ return (n = bo(n)) in e ? Object.defineProperty(e, n, {
3186
+ value: t,
3187
+ enumerable: !0,
3188
+ configurable: !0,
3189
+ writable: !0
3190
+ }) : e[n] = t, e;
3191
+ }
3192
+ function bo(e) {
3193
+ var n = mo(e, "string");
3194
+ return "symbol" == co(n) ? n : n + "";
3195
+ }
3196
+ function mo(e, n) {
3197
+ if ("object" != co(e) || !e) return e;
3198
+ var t = e[Symbol.toPrimitive];
3199
+ if (void 0 !== t) {
3200
+ var r = t.call(e, n || "default");
3201
+ if ("object" != co(r)) return r;
3202
+ throw new TypeError("@@toPrimitive must return a primitive value.");
3203
+ }
3204
+ return ("string" === n ? String : Number)(e);
3205
+ }
3206
+ // Checks if browser is Safari
3207
+ function ho() {
3208
+ return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
3209
+ }
3210
+ // Formats return value to DOMRect
3211
+ function yo(e) {
3212
+ return vo(vo({}, e), {}, {
3213
+ top: e.y,
3214
+ left: e.x,
3215
+ right: e.x + e.width,
3216
+ bottom: e.y + e.height
3217
+ });
3218
+ }
3219
+ /**
3220
+ * Provides DOMRect information about the size of an element and its position relative to the viewport.
3221
+ * Accounts for Safari's use of visual viewport and adds offsets to set as layout viewport.
3222
+ * @param {Element} element - The element to be evaluated
3223
+ * @param {boolean} offsets - Use when position of element relative to the layout viewport offsets are needed for Safari.
3224
+ * @returns {Omit<DOMRect, 'toJSON'>}
3225
+ * @public
3226
+ */ function go(e, n) {
3227
+ var t, r;
3228
+ var o = e.getBoundingClientRect();
3229
+ var i = ho();
3230
+ if (!n || !i) {
3231
+ return o;
3232
+ }
3233
+ var a = Je();
3234
+ var l = o.left + (((t = a.visualViewport) === null || t === void 0 ? void 0 : t.offsetLeft) || 0);
3235
+ var u = o.top + (((r = a.visualViewport) === null || r === void 0 ? void 0 : r.offsetTop) || 0);
3236
+ var s = o.width, c = o.height;
3237
+ return yo({
3238
+ width: s,
3239
+ height: c,
3240
+ x: l,
3241
+ y: u
3242
+ });
3243
+ }
3268
3244
  // CONCATENATED MODULE: ./src/utils/types.ts
3269
3245
  // see https://github.com/DefinitelyTyped/DefinitelyTyped/issues/31245 for details
3270
3246
  // regarding the css prop. certain (versions of) libraries included in the compilation
@@ -3305,7 +3281,7 @@
3305
3281
  if (Array.isArray(e)) return To(e);
3306
3282
  }
3307
3283
  function Ro(e, n) {
3308
- return Ao(e) || Do(e, n) || Io(e, n) || Eo();
3284
+ return Do(e) || jo(e, n) || Io(e, n) || Eo();
3309
3285
  }
3310
3286
  function Eo() {
3311
3287
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
@@ -3324,7 +3300,7 @@
3324
3300
  }
3325
3301
  return r;
3326
3302
  }
3327
- function Do(e, n) {
3303
+ function jo(e, n) {
3328
3304
  var t = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
3329
3305
  if (null != t) {
3330
3306
  var r, o, i, a, l = [], u = !0, s = !1;
@@ -3346,12 +3322,12 @@
3346
3322
  return l;
3347
3323
  }
3348
3324
  }
3349
- function Ao(e) {
3325
+ function Do(e) {
3350
3326
  if (Array.isArray(e)) return e;
3351
3327
  }
3352
- function jo(e, n) {
3328
+ function qo(e, n) {
3353
3329
  if (null == e) return {};
3354
- var t, r, o = qo(e, n);
3330
+ var t, r, o = Ao(e, n);
3355
3331
  if (Object.getOwnPropertySymbols) {
3356
3332
  var i = Object.getOwnPropertySymbols(e);
3357
3333
  for (r = 0; r < i.length; r++) {
@@ -3360,7 +3336,7 @@
3360
3336
  }
3361
3337
  return o;
3362
3338
  }
3363
- function qo(e, n) {
3339
+ function Ao(e, n) {
3364
3340
  if (null == e) return {};
3365
3341
  var t = {};
3366
3342
  for (var r in e) {
@@ -3375,7 +3351,7 @@
3375
3351
  // Internal Helper Modules
3376
3352
  /** @public */
3377
3353
  /** @public */
3378
- /** @public */ var zo = {
3354
+ /** @public */ var Po = {
3379
3355
  actions: i().arrayOf(i().element),
3380
3356
  actionsColumnWidth: i().number,
3381
3357
  children: i().node,
@@ -3397,18 +3373,18 @@
3397
3373
  onRequestResizeColumn: i().func,
3398
3374
  resizableFillLayout: i().bool
3399
3375
  };
3400
- var Po = function e(n) {
3376
+ var _o = function e(n) {
3401
3377
  return n === "inline";
3402
3378
  };
3403
- var _o = function e(n) {
3379
+ var zo = function e(n) {
3404
3380
  return n === "docked";
3405
3381
  };
3406
3382
  var Mo = function e(n) {
3407
3383
  return n === "fixed";
3408
3384
  };
3409
3385
  var $o = function e(n) {
3410
- var t = Qe();
3411
- var r = n.getBoundingClientRect();
3386
+ var t = Je();
3387
+ var r = go(n);
3412
3388
  return {
3413
3389
  top: r.top + t.pageYOffset,
3414
3390
  left: r.left + t.pageXOffset
@@ -3437,15 +3413,20 @@
3437
3413
  }
3438
3414
  return undefined;
3439
3415
  };
3416
+ var Wo = function e(n, t) {
3417
+ return n.indexOf(t) + 1;
3418
+ };
3440
3419
  var Lo = function e(n, t) {
3441
3420
  return n.indexOf(t) + 1;
3442
3421
  };
3443
3422
  var Ho = {
3444
3423
  coordinateGetter: l.sortableKeyboardCoordinates
3445
3424
  };
3446
- var Wo = [ u.restrictToParentElement ];
3447
3425
  var Ko = {
3448
- draggable: (0, D._)("To pick up a sortable row, press space or enter.\n Use the up and down arrow keys to update the position of the row.\n Press space or enter again to drop the row in its new position, or press escape to cancel.")
3426
+ draggable: (0, D._)("To pick up a sortable row, press space or enter.\n Use the up and down arrow keys to update the position of the row.\n Press space or enter again to drop the row in its new position, or press escape to cancel.")
3427
+ };
3428
+ var Bo = {
3429
+ draggable: (0, D._)("To pick up a sortable column, press space or enter.\n Use the left and right arrow keys to update the position of the column.\n Press space or enter again to drop the column in its new position, or press escape to cancel.")
3449
3430
  };
3450
3431
  /**
3451
3432
  * @private
@@ -3456,7 +3437,7 @@
3456
3437
  * @param {String} headFocusState.target - Focus can be applied to a 'headCell' or a
3457
3438
  * 'resizeButton'.
3458
3439
  * @param {Number} headFocusState.index - The index of the element to set focus on.
3459
- */ function Bo(e, n) {
3440
+ */ function Vo(e, n) {
3460
3441
  var t, r;
3461
3442
  var o = n.target, i = n.index;
3462
3443
  if (false) {}
@@ -3473,140 +3454,145 @@
3473
3454
  passive: false,
3474
3455
  capture: true
3475
3456
  };
3476
- var Vo = [];
3477
- function Uo(e) {
3478
- var n = e.actions, o = n === void 0 ? Vo : n, i = e.actionsColumnWidth, u = e.children, s = e.dockOffset, d = s === void 0 ? 0 : s, v = e.dockScrollBar, p = e.elementRef, m = e.headType, h = m === void 0 ? "inline" : m, y = e.innerStyle, w = e.onRequestMoveColumn, x = e.onRequestMoveRow, k = e.onRequestResizeColumn, I = e.onRequestToggleAllRows, D = e.onScroll, j = e.outerStyle, q = e.primaryColumnIndex, z = q === void 0 ? 0 : q, P = e.resizableFillLayout, _ = e.rowExpansion, M = _ === void 0 ? "none" : _, $ = e.rowSelection, N = $ === void 0 ? "none" : $, L = e.stripeRows, W = e.tableStyle, K = jo(e, [ "actions", "actionsColumnWidth", "children", "dockOffset", "dockScrollBar", "elementRef", "headType", "innerStyle", "onRequestMoveColumn", "onRequestMoveRow", "onRequestResizeColumn", "onRequestToggleAllRows", "onScroll", "outerStyle", "primaryColumnIndex", "resizableFillLayout", "rowExpansion", "rowSelection", "stripeRows", "tableStyle" ]);
3457
+ var Uo = [];
3458
+ function Xo(e) {
3459
+ var n = e.actions, o = n === void 0 ? Uo : n, i = e.actionsColumnWidth, s = e.children, d = e.dockOffset, v = d === void 0 ? 0 : d, p = e.dockScrollBar, b = e.elementRef, h = e.headType, y = h === void 0 ? "inline" : h, w = e.innerStyle, x = e.onRequestMoveColumn, k = e.onRequestMoveRow, T = e.onRequestResizeColumn, A = e.onRequestToggleAllRows, P = e.onScroll, _ = e.outerStyle, z = e.primaryColumnIndex, M = z === void 0 ? 0 : z, $ = e.resizableFillLayout, N = e.rowExpansion, W = N === void 0 ? "none" : N, H = e.rowSelection, K = H === void 0 ? "none" : H, B = e.stripeRows, V = e.tableStyle, F = qo(e, [ "actions", "actionsColumnWidth", "children", "dockOffset", "dockScrollBar", "elementRef", "headType", "innerStyle", "onRequestMoveColumn", "onRequestMoveRow", "onRequestResizeColumn", "onRequestToggleAllRows", "onScroll", "outerStyle", "primaryColumnIndex", "resizableFillLayout", "rowExpansion", "rowSelection", "stripeRows", "tableStyle" ]);
3479
3460
  // @docs-props-type TablePropsBase
3480
- var B = (0, t.useState)([]), F = Ro(B, 2), V = F[0], U = F[1];
3481
- var X = (0, t.useState)(), G = Ro(X, 2), Y = G[0], J = G[1];
3482
- var Q = (0, t.useState)(), Z = Ro(Q, 2), ie = Z[0], ae = Z[1];
3483
- var le = (0, t.useState)(), ue = Ro(le, 2), se = ue[0], ce = ue[1];
3484
- var de = (0, t.useState)(), fe = Ro(de, 2), ve = fe[0], pe = fe[1];
3485
- var me = (0, t.useRef)();
3486
- var be = (0, t.useRef)();
3487
- var he = (0, t.useState)(), ye = Ro(he, 2), ge = ye[0], we = ye[1];
3488
- var Ce = (0, t.useRef)(true);
3489
- var xe = (0, t.useContext)(E.ScrollContainerContext);
3490
- var Se = (0, a.useSensors)((0, a.useSensor)(a.MouseSensor, {}), (0, a.useSensor)(a.TouchSensor, {}), (0,
3491
- a.useSensor)(lo, Ho));
3492
- var ke = (0, t.useRef)(null);
3493
- var Oe = (0, t.useRef)(null);
3494
- var Re = (0, t.useRef)();
3495
- var Ee = (0, t.useRef)(null);
3496
- var Ie = (0, t.useRef)();
3497
- var Te = (0, t.useRef)(null);
3498
- var De = (0, t.useRef)(null);
3499
- var Ae = T()(h);
3500
- var je = [];
3501
- var qe = [];
3502
- var ze = (0, t.useCallback)((function() {
3461
+ var U = (0, t.useState)([]), X = Ro(U, 2), Y = X[0], G = X[1];
3462
+ var J = (0, t.useState)(), Q = Ro(J, 2), Z = Q[0], ie = Q[1];
3463
+ var ue = (0, t.useState)(), se = Ro(ue, 2), ce = se[0], de = se[1];
3464
+ var fe = (0, t.useState)(), ve = Ro(fe, 2), pe = ve[0], be = ve[1];
3465
+ var me = (0, t.useState)(), he = Ro(me, 2), ye = he[0], ge = he[1];
3466
+ var we = (0, t.useRef)(true);
3467
+ var Ce = (0, t.useContext)(I.ScrollContainerContext);
3468
+ var xe = (0, a.useSensors)((0, a.useSensor)(a.MouseSensor, {}), (0, a.useSensor)(a.TouchSensor, {}), (0,
3469
+ a.useSensor)(Qr, Ho));
3470
+ var Se = (0, t.useState)([]), ke = Ro(Se, 2), Oe = ke[0], Re = ke[1];
3471
+ var Ee = (0, t.useState)(-1), Ie = Ro(Ee, 2), Te = Ie[0], je = Ie[1];
3472
+ var De = (0, t.useRef)();
3473
+ var qe = (0, t.useRef)();
3474
+ var Ae = (0, t.useState)(), Pe = Ro(Ae, 2), _e = Pe[0], ze = Pe[1];
3475
+ var Me = (0, t.useRef)(null);
3476
+ var $e = (0, t.useRef)(null);
3477
+ var Ne = (0, t.useRef)();
3478
+ var We = (0, t.useRef)(null);
3479
+ var Le = (0, t.useRef)();
3480
+ var He = (0, t.useRef)(null);
3481
+ var Ke = (0, t.useRef)(null);
3482
+ var Be = j()(y);
3483
+ var Ve = [];
3484
+ var Fe = [];
3485
+ var Ue = [];
3486
+ var Xe = [];
3487
+ var Ge = (0, t.useCallback)((function() {
3503
3488
  var e;
3504
- var n = Qe();
3505
- if (Po(h)) {
3489
+ var n = Je();
3490
+ if (_o(y)) {
3506
3491
  return;
3507
3492
  }
3508
- var t = De.current;
3509
- var r = Oe.current;
3510
- var o = Te.current;
3493
+ var t = Ke.current;
3494
+ var r = $e.current;
3495
+ var o = He.current;
3511
3496
  if (!o || !r) {
3512
3497
  return;
3513
3498
  }
3514
- var i = or(Oe.current);
3515
- var a = (e = Oe.current) === null || e === void 0 ? void 0 : e.clientHeight;
3499
+ var i = Yt($e.current);
3500
+ var a = (e = $e.current) === null || e === void 0 ? void 0 : e.clientHeight;
3516
3501
  var l = $o(o).top - n.pageYOffset - (a || 0) + o.offsetHeight;
3517
- var u = Math.min(l, Number(d));
3518
- pe(t === null || t === void 0 ? void 0 : t.clientWidth);
3519
- ae(o === null || o === void 0 ? void 0 : o.clientWidth);
3520
- U(i);
3521
- ce(u);
3522
- }), [ d, h ]);
3502
+ var u = Math.min(l, Number(v));
3503
+ ge(t === null || t === void 0 ? void 0 : t.clientWidth);
3504
+ de(o === null || o === void 0 ? void 0 : o.clientWidth);
3505
+ G(i);
3506
+ be(u);
3507
+ }), [ v, y ]);
3523
3508
  (0, t.useEffect)((function() {
3524
- var e = Oe.current;
3525
- var n = Ee.current;
3509
+ var e = $e.current;
3510
+ var n = We.current;
3526
3511
  if (e && n) {
3527
- var t = or(Oe.current);
3528
- if (!b()(V, t)) {
3529
- ze();
3512
+ var t = Yt($e.current);
3513
+ if (!m()(Y, t)) {
3514
+ Ge();
3530
3515
  }
3531
3516
  }
3532
- if (Ae === "inline" && h === "inline") {
3533
- ze();
3517
+ if (Be === "inline" && y === "inline") {
3518
+ Ge();
3534
3519
  }
3535
3520
  if (false) {}
3536
- }), [ V, h, Ae, e, ze ]);
3537
- var Pe = (0, t.useCallback)((function(e) {
3538
- var n = De.current;
3539
- D === null || D === void 0 ? void 0 : D(e);
3540
- if ((Mo(h) || _o(h)) && n) {
3541
- J(-n.scrollLeft);
3542
- }
3543
- if (ke.current && Ie.current !== "dockedScrollBar" && n) {
3544
- Ie.current = "container";
3545
- ke.current.scrollLeft = n.scrollLeft;
3521
+ }), [ Y, y, Be, e, Ge ]);
3522
+ var Qe = (0, t.useCallback)((function(e) {
3523
+ var n = Ke.current;
3524
+ P === null || P === void 0 ? void 0 : P(e);
3525
+ if ((Mo(y) || zo(y)) && n) {
3526
+ ie(-n.scrollLeft);
3527
+ }
3528
+ if (Me.current && Le.current !== "dockedScrollBar" && n) {
3529
+ Le.current = "container";
3530
+ Me.current.scrollLeft = n.scrollLeft;
3546
3531
  } else {
3547
- Ie.current = undefined;
3548
- }
3549
- }), [ h, D ]);
3550
- var _e = function e() {
3551
- var n = De.current;
3552
- if (Ie.current !== "container" && n && ke.current) {
3553
- Ie.current = "dockedScrollBar";
3554
- n.scrollLeft = ke.current.scrollLeft;
3532
+ Le.current = undefined;
3533
+ }
3534
+ }), [ y, P ]);
3535
+ var Ze = function e() {
3536
+ var n = Ke.current;
3537
+ if (Le.current !== "container" && n && Me.current) {
3538
+ Le.current = "dockedScrollBar";
3539
+ n.scrollLeft = Me.current.scrollLeft;
3555
3540
  } else {
3556
- Ie.current = undefined;
3541
+ Le.current = undefined;
3557
3542
  }
3558
3543
  };
3559
- var Me = C()(ze, 0);
3560
- var $e = C()(ze, 50);
3544
+ var en = C()(Ge, 0);
3545
+ var nn = C()(Ge, 50);
3546
+ O()(Ke, nn);
3561
3547
  (0, t.useEffect)((function() {
3562
3548
  // Using the return value of useCallback to recreate componentWillUnmount
3563
3549
  return function() {
3564
- Me.cancel();
3565
- $e.cancel();
3550
+ en.cancel();
3551
+ nn.cancel();
3566
3552
  };
3567
3553
  }));
3568
- var Ne = function e(n) {
3554
+ var tn = function e(n) {
3569
3555
  return function(e) {
3570
- Oe.current = e;
3571
- H(n.props.elementRef, e);
3556
+ $e.current = e;
3557
+ L(n.props.elementRef, e);
3572
3558
  };
3573
3559
  };
3574
- var Le = function e(n) {
3560
+ var rn = function e(n) {
3575
3561
  if (n) {
3576
3562
  // On mount, focus the applicable docked head cell if a primary head cell was focused.
3577
- if (Re.current) {
3578
- Bo(Ee.current, Re.current);
3579
- Re.current = undefined;
3563
+ if (Ne.current) {
3564
+ Vo(We.current, Ne.current);
3565
+ Ne.current = undefined;
3580
3566
  }
3581
3567
  } else {
3582
3568
  // On unmount, focus the applicable primary head cell if a docked head cell was focused.
3583
- var t = No(Ee.current);
3569
+ var t = No(We.current);
3584
3570
  if (t) {
3585
- Bo(Oe.current, t);
3571
+ Vo($e.current, t);
3586
3572
  }
3587
3573
  }
3588
- Ee.current = n;
3574
+ We.current = n;
3589
3575
  };
3590
- var He = function e(n) {
3591
- var t = De.current;
3592
- if (!Ee.current || !t || (0, R.keycode)(n.nativeEvent) !== "tab") {
3576
+ var on = function e(n) {
3577
+ var t = Ke.current;
3578
+ if (!We.current || !t || (0, E.keycode)(n.nativeEvent) !== "tab") {
3593
3579
  return;
3594
3580
  }
3595
- var r = Ee.current.scrollLeft;
3581
+ var r = We.current.scrollLeft;
3596
3582
  if (r !== 0) {
3597
- Ee.current.scrollLeft = 0;
3583
+ We.current.scrollLeft = 0;
3598
3584
  t.scrollLeft += r;
3599
3585
  }
3600
3586
  };
3601
- var We = function e(n, t) {
3587
+ var an = function e(n, t) {
3602
3588
  var r, o;
3603
3589
  var i = t.index, a = t.columnId;
3604
3590
  var l = Ye();
3605
3591
  if (i === undefined) {
3606
3592
  return;
3607
3593
  }
3608
- var u = M === "none" ? 1 : 2;
3609
- var s = (r = De.current) === null || r === void 0 ? void 0 : r.querySelectorAll("thead th:nth-child(".concat(i + u, "), tbody td:nth-child(").concat(i + u, ")"));
3594
+ var u = W === "none" ? 1 : 2;
3595
+ var s = (r = Ke.current) === null || r === void 0 ? void 0 : r.querySelectorAll("thead th:nth-child(".concat(i + u, "), tbody td:nth-child(").concat(i + u, ")"));
3610
3596
  var d = l.createElement("div");
3611
3597
  // TODO: find a styled-components compliant way to do this
3612
3598
  d.style["float"] = "left";
@@ -3623,262 +3609,259 @@
3623
3609
  d.appendChild(n);
3624
3610
  }));
3625
3611
  l.body.appendChild(d);
3626
- k === null || k === void 0 ? void 0 : k(n, {
3612
+ T === null || T === void 0 ? void 0 : T(n, {
3627
3613
  index: i,
3628
3614
  columnId: a,
3629
3615
  width: d.clientWidth + 1
3630
3616
  });
3631
3617
  (o = d.parentNode) === null || o === void 0 ? void 0 : o.removeChild(d);
3632
3618
  };
3633
- var Ke = (0, t.useCallback)((function(e) {
3634
- be.current = e;
3635
- }), [ be ]);
3636
- var Be = C()(Ke, 100, {
3637
- trailing: false
3638
- });
3639
- var Fe = (0, t.useCallback)((function() {
3640
- var e, n;
3641
- if (!Oe.current || !be.current) return -1;
3642
- var t = !!x;
3643
- var r = M !== "none";
3644
- var o = Array.from((e = (n = Oe.current.firstElementChild) === null || n === void 0 ? void 0 : n.children) !== null && e !== void 0 ? e : []).slice(r ? 1 : 0).slice(t ? 1 : 0).slice(I ? 1 : 0);
3645
- if (o.length === 0) return -1;
3646
- var i = o.findIndex((function(e) {
3647
- var n = e.getBoundingClientRect();
3648
- return be.current !== undefined && be.current > n.left && be.current < n.right;
3649
- }));
3650
- if (i === -1) {
3651
- var a;
3652
- // must be too far left or right
3653
- var l = (a = Oe.current) === null || a === void 0 ? void 0 : a.getBoundingClientRect();
3654
- return be.current && l && be.current < l.left ? 0 : o.length;
3655
- }
3656
- if (me.current !== undefined && i > me.current) {
3657
- return i + 1;
3658
- }
3659
- return i;
3660
- }), [ x, M, I ]);
3661
- var Ve = C()((function() {
3662
- var e = Fe();
3663
- we((function(n) {
3664
- return n === e ? n : e;
3665
- }));
3666
- }), 100);
3667
- var Ue = function e(n) {
3668
- n.preventDefault();
3669
- // necessary for the drop event to fire
3670
- if (n.dataTransfer) {
3671
- n.dataTransfer.dropEffect = "move";
3672
- }
3673
- Be(n.clientX);
3674
- Ve();
3675
- };
3676
- var Xe = function e(n) {
3677
- n.preventDefault();
3678
- // necessary for the drop event to fire
3679
- be.current = n.clientX;
3680
- };
3681
- var Ge = function e(n) {
3682
- n.preventDefault();
3683
- // necessary to prevent cell from animating to original position;
3684
- };
3685
- var Je = function e() {
3686
- var n = me.current !== undefined && me.current < Fe() ? Fe() - 1 : Fe();
3687
- if (me.current !== undefined && me.current !== n) {
3688
- w === null || w === void 0 ? void 0 : w({
3689
- fromIndex: me.current,
3690
- toIndex: n,
3691
- columnId: me.current
3692
- });
3619
+ var ln = (0, t.useCallback)((function(e) {
3620
+ var n = e.active;
3621
+ var t = n.id;
3622
+ De.current = Xe.indexOf(t);
3623
+ ze(t);
3624
+ }), [ Xe ]);
3625
+ var un = (0, t.useCallback)((function(e) {
3626
+ if (e.over) {
3627
+ var n = e.over.id;
3628
+ var t = Xe.indexOf(n);
3629
+ var r = t;
3630
+ if (De.current !== undefined && t > De.current) {
3631
+ r = t + 1;
3632
+ }
3633
+ je(r);
3634
+ } else {
3635
+ je(-1);
3693
3636
  }
3694
- be.current = undefined;
3695
- we(undefined);
3696
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
3697
- Ze();
3698
- };
3699
- var Ze = function e() {
3700
- var n = Qe();
3701
- n.removeEventListener("dragenter", Xe);
3702
- n.removeEventListener("dragover", Ue);
3703
- n.removeEventListener("drop", Ge);
3704
- n.removeEventListener("dragend", Je);
3705
- Be.cancel();
3706
- // cancel throttle
3707
- };
3637
+ }), [ Xe ]);
3638
+ // these are useMemo rather than useCallback so that ESLint can correctly analyze the dependencies
3639
+ // see https://github.com/facebook/react/issues/19240#issuecomment-652945246
3640
+ var sn = (0, t.useMemo)((function() {
3641
+ return C()(un, 100);
3642
+ }), [ un ]);
3708
3643
  (0, t.useEffect)((function() {
3709
- // Using the return value of useCallback to recreate componentWillUnmount
3710
3644
  return function() {
3711
- Ze();
3645
+ sn.cancel();
3712
3646
  };
3713
- // The warning can be safely ignored here, as we intend for the component to run only once when it unmounts,
3714
- // rather than rerunning whenever dependencies change.
3715
- // eslint-disable-next-line react-hooks/exhaustive-deps
3716
- }), []);
3717
- var en = function e(n) {
3718
- var t = n.dragIndex;
3719
- var r = Qe();
3720
- me.current = t;
3721
- r.addEventListener("dragenter", Xe);
3722
- r.addEventListener("dragover", Ue);
3723
- r.addEventListener("drop", Ge);
3724
- r.addEventListener("dragend", Je);
3725
- };
3726
- var nn = (0, t.useCallback)((function(e) {
3647
+ }), [ sn ]);
3648
+ var cn = (0, t.useCallback)((function(e) {
3727
3649
  var n = e.active, t = e.over;
3728
- Ce.current = true;
3729
3650
  if (t && n.id !== t.id) {
3730
- var r;
3731
- var o = qe.indexOf(n.id);
3732
- var i = qe.indexOf(t === null || t === void 0 ? void 0 : t.id);
3733
- var a = (r = je[o]) === null || r === void 0 ? void 0 : r.props.dataId;
3651
+ var r = Xe.indexOf(n.id);
3652
+ var o = Xe.indexOf(t === null || t === void 0 ? void 0 : t.id);
3734
3653
  x === null || x === void 0 ? void 0 : x({
3735
- fromIndex: o,
3736
- toIndex: i,
3737
- dataId: a
3654
+ fromIndex: r,
3655
+ toIndex: o
3738
3656
  });
3739
3657
  }
3740
- }), [ qe, x, je ]);
3741
- var tn = (0, t.useCallback)((function() {
3742
- Ce.current = true;
3658
+ ze(undefined);
3659
+ je(-1);
3660
+ qe.current = undefined;
3661
+ De.current = undefined;
3662
+ }), [ Xe, x ]);
3663
+ var dn = (0, t.useCallback)((function(e) {
3664
+ var n = e.active, t = e.over;
3665
+ we.current = true;
3666
+ if (t && n.id !== t.id) {
3667
+ var r = Fe.indexOf(n.id);
3668
+ var o = Fe.indexOf(t === null || t === void 0 ? void 0 : t.id);
3669
+ k === null || k === void 0 ? void 0 : k({
3670
+ fromIndex: r,
3671
+ toIndex: o
3672
+ });
3673
+ }
3674
+ }), [ Fe, k ]);
3675
+ var fn = (0, t.useCallback)((function() {
3676
+ we.current = true;
3743
3677
  }), []);
3744
- var rn = function e(n) {
3745
- var r = t.Children.toArray(n.props.children).filter(t.isValidElement);
3678
+ var vn = (0, t.useRef)({});
3679
+ var pn = function e(n) {
3680
+ var r = t.Children.toArray(n.props.children).filter(t.isValidElement).map((function(e, n) {
3681
+ var r = e;
3682
+ var o = r.key || (0, R.createDOMID)("col-");
3683
+ o = String(o);
3684
+ // `col-` prefix is necessary to distinguish row or column reordering.
3685
+ // Append the `col-` prefix if is missing from dragId
3686
+ if (!o.startsWith("col-")) {
3687
+ o = "col-".concat(o);
3688
+ }
3689
+ Ue.push(r);
3690
+ Xe.push(o);
3691
+
3692
+ return (0, t.cloneElement)(r, {
3693
+ index: n,
3694
+ dragId: o,
3695
+ elementRef: function e(n) {
3696
+ vn.current[o] = n;
3697
+ L(r.props.elementRef, n);
3698
+ }
3699
+ });
3700
+ }));
3746
3701
  var a = o === null || o === void 0 ? void 0 : o.filter(t.isValidElement);
3747
3702
  var l = (0, t.cloneElement)(n, {
3748
3703
  actions: a,
3749
3704
  actionsColumnWidth: i,
3750
- guidelineIndex: ge,
3751
- hasInfoColumn: M !== "none",
3752
- hasDragColumn: !!x,
3753
- onAutosizeColumn: We,
3754
- onDragStart: w ? en : undefined,
3755
- onRequestMoveColumn: w,
3756
- onRequestResizeColumn: k,
3757
- onRequestToggleAllRows: I,
3758
- elementRef: Ne(n),
3759
- rowSelection: N
3705
+ hasInfoColumn: W !== "none",
3706
+ hasDragColumn: !!k,
3707
+ onAutosizeColumn: an,
3708
+ onRequestMoveColumn: x,
3709
+ onRequestResizeColumn: T,
3710
+ onRequestToggleAllRows: A,
3711
+ elementRef: tn(n),
3712
+ rowSelection: K
3760
3713
  }, r);
3761
3714
  return l;
3762
3715
  };
3763
- var on = function e(n) {
3716
+ var bn = (0, t.useMemo)((function() {
3717
+ var e, n;
3718
+ if (Te === -1 || !$e.current || !Ke.current) return null;
3719
+ var t = !!k;
3720
+ var o = W !== "none";
3721
+ var i = Array.from((e = (n = $e.current.firstElementChild) === null || n === void 0 ? void 0 : n.children) !== null && e !== void 0 ? e : []).slice(o ? 1 : 0).slice(t ? 1 : 0).slice(A ? 1 : 0);
3722
+ var a;
3723
+ if (Te === 0) {
3724
+ var l;
3725
+ a = ((l = i[0]) === null || l === void 0 ? void 0 : l.offsetLeft) || 0;
3726
+ } else if (Te >= i.length) {
3727
+ var u = i[i.length - 1];
3728
+ a = ((u === null || u === void 0 ? void 0 : u.offsetLeft) || 0) + ((u === null || u === void 0 ? void 0 : u.offsetWidth) || 0) - 1;
3729
+ // -1 makes the last guideline visible
3730
+ } else {
3731
+ var s;
3732
+ a = ((s = i[Te]) === null || s === void 0 ? void 0 : s.offsetLeft) || 0;
3733
+ }
3734
+
3735
+ return r().createElement(le, {
3736
+ $height: Ke.current.clientHeight,
3737
+ $left: a
3738
+ });
3739
+ }), [ Te, k, W, A ]);
3740
+ var mn = function e(n) {
3764
3741
  var r = (o === null || o === void 0 ? void 0 : o.filter(t.isValidElement).length) > 0;
3765
3742
  var a = false;
3766
3743
  t.Children.toArray(n === null || n === void 0 ? void 0 : n.props.children).filter(t.isValidElement).forEach((function(e, n) {
3767
- var r, o, i;
3768
- var l = e.key || ((r = e.props) === null || r === void 0 ? void 0 : r.dataId) || n + 1;
3769
- if (((o = e.props) === null || o === void 0 ? void 0 : o.actionPrimary) || ((i = e.props) === null || i === void 0 ? void 0 : i.actionsSecondary)) {
3744
+ var r, o;
3745
+ if (((r = e.props) === null || r === void 0 ? void 0 : r.actionPrimary) || ((o = e.props) === null || o === void 0 ? void 0 : o.actionsSecondary)) {
3770
3746
  a = true;
3771
3747
  }
3772
- je.push( (0, t.cloneElement)(e, {
3748
+ var i = e.key || (0, R.createDOMID)("row-");
3749
+ i = String(i);
3750
+ // `row-` prefix is necessary to distinguish row or column reordering.
3751
+ // Append the `row-` prefix if is missing from dragId
3752
+ if (!i.startsWith("row-")) {
3753
+ i = "row-".concat(i);
3754
+ }
3755
+ Ve.push( (0, t.cloneElement)(e, {
3773
3756
  index: n,
3774
- dataId: l
3757
+ dragId: i
3775
3758
  }));
3776
- qe.push(l);
3759
+ Fe.push(i);
3777
3760
  }));
3778
3761
  var l = r || a || !!i;
3779
3762
 
3780
3763
  return (0, t.cloneElement)(n, {
3781
3764
  actions: l,
3782
- movableColumns: !!w,
3783
- onRequestMoveRow: x,
3784
- primaryColumnIndex: z,
3785
- rowExpansion: M,
3786
- stripeRows: L
3787
- }, je);
3765
+ movableColumns: !!x,
3766
+ onRequestMoveRow: k,
3767
+ primaryColumnIndex: M,
3768
+ rowExpansion: W,
3769
+ stripeRows: B
3770
+ }, Ve);
3788
3771
  };
3789
- var an = function e() {
3790
- var n = De.current;
3791
- var t = Qe();
3792
- if (!_o(h) || !Te.current || !Oe.current || !n) {
3772
+ var hn = function e() {
3773
+ var n = Ke.current;
3774
+ var t = Je();
3775
+ if (!zo(y) || !He.current || !$e.current || !n) {
3793
3776
  return false;
3794
3777
  }
3795
3778
  var r = $o(n).top;
3796
- return t.pageYOffset >= r - (d || 0);
3779
+ return t.pageYOffset >= r - (v || 0);
3797
3780
  };
3798
- var ln = function e() {
3799
- var n = Qe();
3800
- var t = De.current;
3801
- if (!v || !Te.current || !t) {
3781
+ var yn = function e() {
3782
+ var n = Je();
3783
+ var t = Ke.current;
3784
+ if (!p || !He.current || !t) {
3802
3785
  return false;
3803
3786
  }
3804
- var r = t.getBoundingClientRect();
3787
+ var r = go(t);
3805
3788
  return r.bottom > n.innerHeight && r.top < n.innerHeight;
3806
3789
  };
3807
- var un = function e(n, o) {
3808
- if (an()) {
3790
+ var gn = function e(n, o) {
3791
+ if (hn()) {
3809
3792
  // FIXME: handle inline
3810
3793
  // Save the current head focus state so that it can be applied to the docked version
3811
3794
  // after the `HeadTable` mounts.
3812
- Re.current = No(Oe.current);
3813
- if (V === undefined || ie === undefined || se === undefined || ve === undefined) {
3795
+ Ne.current = No($e.current);
3796
+ if (Y === undefined || ce === undefined || pe === undefined || ye === undefined) {
3814
3797
  return false;
3815
3798
  }
3816
3799
  var i = (0, t.cloneElement)(n);
3817
3800
 
3818
- return r().createElement(go, {
3801
+ return r().createElement(so, {
3819
3802
  headType: "docked",
3820
3803
  tHead: i,
3821
- cellWidths: V,
3822
- horizontalOffset: Y,
3823
- tableWidth: ie,
3824
- top: se,
3825
- width: ve,
3826
- tableStyle: W,
3804
+ cellWidths: Y,
3805
+ horizontalOffset: Z,
3806
+ tableWidth: ce,
3807
+ top: pe,
3808
+ width: ye,
3809
+ tableStyle: V,
3827
3810
  isFixedColumn: o,
3828
- onKeyUp: He,
3829
- elementRef: Le,
3830
- hasDragColumn: !!x,
3831
- hasRowExpansion: M !== "none",
3832
- hasRowSelection: !!I
3811
+ onKeyUp: on,
3812
+ elementRef: rn,
3813
+ hasDragColumn: !!k,
3814
+ hasRowExpansion: W !== "none",
3815
+ hasRowSelection: !!A
3833
3816
  });
3834
3817
  }
3835
3818
  return false;
3836
3819
  };
3837
- var sn = (0, t.useMemo)((function() {
3838
- var e, n, t, r;
3839
- if (!ke.current || !Oe.current || !Te.current) {
3820
+ var wn = (0, t.useMemo)((function() {
3821
+ var e, n, t;
3822
+ if (!Me.current || !$e.current || !He.current) {
3840
3823
  return 0;
3841
3824
  }
3842
- var o = Qe();
3843
- var i = (e = (n = Te.current) === null || n === void 0 ? void 0 : n.getBoundingClientRect().top) !== null && e !== void 0 ? e : 0;
3844
- var a = (t = (r = Oe.current) === null || r === void 0 ? void 0 : r.offsetHeight) !== null && t !== void 0 ? t : 0;
3845
- var l = o.innerHeight - i - a;
3846
- return Math.min(l - ke.current.offsetHeight, 0);
3825
+ var r = Je();
3826
+ var o = (e = go(He.current).top) !== null && e !== void 0 ? e : 0;
3827
+ var i = (n = (t = $e.current) === null || t === void 0 ? void 0 : t.offsetHeight) !== null && n !== void 0 ? n : 0;
3828
+ var a = r.innerHeight - o - i;
3829
+ return Math.min(a - Me.current.offsetHeight, 0);
3847
3830
  }), []);
3848
- var cn = (0, t.useMemo)((function() {
3831
+ var Cn = (0, t.useMemo)((function() {
3849
3832
  return {
3850
- width: ve,
3851
- marginBottom: sn
3833
+ width: ye,
3834
+ marginBottom: wn
3852
3835
  };
3853
- }), [ ve, sn ]);
3854
- var dn = (0, t.useMemo)((function() {
3836
+ }), [ ye, wn ]);
3837
+ var xn = (0, t.useMemo)((function() {
3855
3838
  return {
3856
- width: ie
3839
+ width: ce
3857
3840
  };
3858
- }), [ ie ]);
3859
- var fn = function e() {
3860
- if (!ln()) {
3841
+ }), [ ce ]);
3842
+ var Sn = function e() {
3843
+ if (!yn()) {
3861
3844
  return false;
3862
3845
  }
3863
3846
 
3864
3847
  return r().createElement(re, {
3865
- style: cn,
3866
- onScroll: _e,
3848
+ style: Cn,
3849
+ onScroll: Ze,
3867
3850
  "data-test": "docked-scroll-bar",
3868
- ref: ke
3851
+ ref: Me
3869
3852
  }, r().createElement(oe, {
3870
- style: dn,
3853
+ style: xn,
3871
3854
  "data-test": "docked-scroll-content"
3872
3855
  }));
3873
3856
  };
3874
- var vn = function e() {
3875
- var n = Oe.current;
3876
- var t = De.current;
3857
+ var kn = function e() {
3858
+ var n = $e.current;
3859
+ var t = Ke.current;
3877
3860
  /**
3878
3861
  * there is slightly less space for the table than tableContainer's width,
3879
3862
  * because there is a 1 px border added to every column but the first
3880
3863
  */ if (n) {
3881
- var r = or(Oe.current);
3864
+ var r = Yt($e.current);
3882
3865
  var o = r === null || r === void 0 ? void 0 : r.length;
3883
3866
  var i = t === null || t === void 0 ? void 0 : t.clientWidth;
3884
3867
  if (i != null) {
@@ -3888,137 +3871,300 @@
3888
3871
  }
3889
3872
  return null;
3890
3873
  };
3891
- var pn;
3892
- var mn;
3893
- var bn;
3894
- var hn = !!k;
3895
- t.Children.toArray(u).forEach((function(e) {
3874
+ var On;
3875
+ var Rn;
3876
+ var En;
3877
+ var In = !!T;
3878
+ t.Children.toArray(s).forEach((function(e) {
3896
3879
  var n = e.type.splunkUiType;
3897
3880
  if (n === "Table.Head") {
3898
- pn = rn(e);
3899
- if (!hn) {
3881
+ On = pn(e);
3882
+ if (!In) {
3900
3883
  // if all the HeadCells are fixed width, then the table is fixed.
3901
- hn = !t.Children.toArray(e.props.children).filter(t.isValidElement).some((function(e) {
3884
+ In = !t.Children.toArray(e.props.children).filter(t.isValidElement).some((function(e) {
3902
3885
  return !f()(e.props, "width");
3903
3886
  }));
3904
3887
  }
3905
3888
  } else if (n === "Table.Body") {
3906
- mn = on(e);
3889
+ Rn = mn(e);
3907
3890
  } else if (n === "Table.Caption") {
3908
3891
  // the html spec mandates that a caption must be the first table child.
3909
3892
  // catch the caption here so that it can be placed first later. note: a
3910
3893
  // caption can be placed on the bottom side of a table by adjusting the
3911
3894
  // caption's side prop.
3912
- bn = e;
3895
+ En = e;
3913
3896
  }
3914
3897
  }));
3915
- wo(pn, "A Table.Head is required.");
3916
- var yn = un(pn, hn);
3898
+ wo(On, "A Table.Head is required.");
3899
+ var Tn = gn(On, In);
3917
3900
  // When a `headTable` is used, suppress focus interactions in the primary `Head`. Focus
3918
3901
  // interactions will be handled by the overlaid `headTable` instead.
3919
- var gn = t.Children.toArray(pn.props.children).filter(t.isValidElement).map((function(e) {
3902
+ var jn = t.Children.toArray(On.props.children).filter(t.isValidElement).map((function(e) {
3920
3903
 
3921
3904
  // TS: onClick is different for regular/dropdown head cells, that's ok
3922
3905
  return (0, t.cloneElement)(e, {
3923
- visible: !yn
3906
+ visible: !Tn
3924
3907
  });
3925
3908
  }));
3926
- pn = (0, t.cloneElement)(pn, {}, gn);
3927
- var wn = xe || Qe();
3928
- var Cn = Mo(h) ? De.current : wn;
3929
- if (P) {
3930
- hn = false;
3931
- }
3932
- var Sn = vn();
3933
- var kn = (0, t.useMemo)((function() {
3909
+ On = (0, t.cloneElement)(On, {}, jn);
3910
+ var Dn = Ce || Je();
3911
+ var qn = Mo(y) ? Ke.current : Dn;
3912
+ if ($) {
3913
+ In = false;
3914
+ }
3915
+ var An = kn();
3916
+ var Pn = (0, t.useMemo)((function() {
3934
3917
  return {
3935
- headType: h,
3936
- resizableFillLayout: P,
3937
- tableContainerWidthWithoutBorders: Sn
3918
+ headType: y,
3919
+ resizableFillLayout: $,
3920
+ tableContainerWidthWithoutBorders: An
3938
3921
  };
3939
- }), [ h, P, Sn ]);
3940
- var On = (0, t.useMemo)((function() {
3922
+ }), [ y, $, An ]);
3923
+ var _n = (0, t.useMemo)((function() {
3924
+ if (!k) {
3925
+ return {
3926
+ onDragStart: function e() {
3927
+ return undefined;
3928
+ },
3929
+ onDragOver: function e() {
3930
+ return undefined;
3931
+ },
3932
+ onDragEnd: function e() {
3933
+ return undefined;
3934
+ },
3935
+ onDragCancel: function e() {
3936
+ return undefined;
3937
+ }
3938
+ };
3939
+ }
3941
3940
  return {
3942
3941
  onDragStart: function e(n) {
3943
3942
  var t = n.active.id;
3944
- return (0, A.sprintf)("Picked up sortable row in position %d of %d.", Lo(qe, t), qe.length);
3943
+ if (t === undefined) {
3944
+ return undefined;
3945
+ }
3946
+ var r = Wo(Fe, t);
3947
+ return typeof r === "number" ? (0, q.sprintf)((0, D._)("Picked up sortable row in position %(pos)d of %(total)d."), {
3948
+ pos: r,
3949
+ total: Fe.length
3950
+ }) : undefined;
3945
3951
  },
3946
3952
  onDragOver: function e(n) {
3947
3953
  var t = n.active, r = n.over;
3948
- // In this specific use-case, the picked up item's `id` is always the same as the first `over` id.
3949
- // The first `onDragOver` event therefore doesn't need to be announced, because it is called
3950
- // immediately after the `onDragStart` announcement and is redundant.
3951
- if (Ce.current) {
3952
- Ce.current = false;
3954
+ if (we.current) {
3955
+ we.current = false;
3956
+ return undefined;
3957
+ }
3958
+ if (!t.id || !(r === null || r === void 0 ? void 0 : r.id)) {
3953
3959
  return undefined;
3954
3960
  }
3955
- return r ? (0, A.sprintf)("Row moved from position %d to position %d of %d.", Lo(qe, t.id), Lo(qe, r.id), qe.length) : undefined;
3961
+ var o = Wo(Fe, t.id);
3962
+ var i = Wo(Fe, r.id);
3963
+ return (0, q.sprintf)((0, D._)("Row moved from position %(from)d to position %(to)d of %(total)d."), {
3964
+ from: o,
3965
+ to: i,
3966
+ total: Fe.length
3967
+ });
3968
+ },
3969
+ onDragEnd: function e(n) {
3970
+ var t = n.over;
3971
+ if (!(t === null || t === void 0 ? void 0 : t.id)) {
3972
+ return undefined;
3973
+ }
3974
+ var r = Wo(Fe, t.id);
3975
+ return typeof r === "number" ? (0, q.sprintf)((0, D._)("Row dropped at position %(pos)d of %(total)d."), {
3976
+ pos: r,
3977
+ total: Fe.length
3978
+ }) : undefined;
3979
+ },
3980
+ onDragCancel: function e(n) {
3981
+ var t = n.active.id;
3982
+ if (t === undefined) {
3983
+ return undefined;
3984
+ }
3985
+ var r = Wo(Fe, t);
3986
+ return typeof r === "number" ? (0, q.sprintf)((0, D._)("Row returned to its starting position of %(pos)d."), {
3987
+ pos: r
3988
+ }) : undefined;
3989
+ }
3990
+ };
3991
+ }), [ Fe, k ]);
3992
+ var zn = (0, t.useMemo)((function() {
3993
+ if (!x) {
3994
+ return {
3995
+ onDragStart: function e() {
3996
+ return undefined;
3997
+ },
3998
+ onDragOver: function e() {
3999
+ return undefined;
4000
+ },
4001
+ onDragEnd: function e() {
4002
+ return undefined;
4003
+ },
4004
+ onDragCancel: function e() {
4005
+ return undefined;
4006
+ }
4007
+ };
4008
+ }
4009
+ return {
4010
+ onDragStart: function e(n) {
4011
+ var t = n.active.id;
4012
+ if (t === undefined) {
4013
+ return undefined;
4014
+ }
4015
+ var r = Lo(Xe, t);
4016
+ return typeof r === "number" ? (0, q.sprintf)((0, D._)("Picked up sortable column in position %(pos)d of %(total)d."), {
4017
+ pos: r,
4018
+ total: Xe.length
4019
+ }) : undefined;
4020
+ },
4021
+ onDragOver: function e(n) {
4022
+ var t = n.active, r = n.over;
4023
+ if (we.current) {
4024
+ we.current = false;
4025
+ return undefined;
4026
+ }
4027
+ if (!t.id || !(r === null || r === void 0 ? void 0 : r.id)) {
4028
+ return undefined;
4029
+ }
4030
+ var o = Lo(Xe, t.id);
4031
+ var i = Lo(Xe, r.id);
4032
+ if (typeof o !== "number" || typeof i !== "number") return undefined;
4033
+ return (0, q.sprintf)((0, D._)("Column moved from position %(from)d to position %(to)d of %(total)d."), {
4034
+ from: o,
4035
+ to: i,
4036
+ total: Xe.length
4037
+ });
3956
4038
  },
3957
4039
  onDragEnd: function e(n) {
3958
4040
  var t = n.over;
3959
- return t ? (0, A.sprintf)("Row dropped at position %d of %d.", Lo(qe, t.id), qe.length) : undefined;
4041
+ if (!(t === null || t === void 0 ? void 0 : t.id)) {
4042
+ return undefined;
4043
+ }
4044
+ var r = Lo(Xe, t.id);
4045
+ return typeof r === "number" ? (0, q.sprintf)((0, D._)("Column dropped at position %(pos)d of %(total)d."), {
4046
+ pos: r,
4047
+ total: Xe.length
4048
+ }) : undefined;
3960
4049
  },
3961
4050
  onDragCancel: function e(n) {
3962
4051
  var t = n.active.id;
3963
- return (0, A.sprintf)("Row returned to it's starting position of %d.", Lo(qe, t));
4052
+ if (t === undefined) {
4053
+ return undefined;
4054
+ }
4055
+ var r = Lo(Xe, t);
4056
+ return typeof r === "number" ? (0, q.sprintf)((0, D._)("Column returned to its starting position of %(pos)d."), {
4057
+ pos: r
4058
+ }) : undefined;
3964
4059
  }
3965
4060
  };
3966
- }), [ qe ]);
3967
- var Rn = (0, t.useMemo)((function() {
4061
+ }), [ Xe, x ]);
4062
+ var Mn = (0, t.useMemo)((function() {
3968
4063
  return {
3969
- screenReaderInstructions: Ko,
3970
- announcements: On
4064
+ screenReaderInstructions: k ? Ko : Bo,
4065
+ announcements: k ? _n : zn
3971
4066
  };
3972
- }), [ On ]);
4067
+ }), [ _n, zn, k ]);
4068
+ var $n = (0, t.useCallback)((function(e) {
4069
+ var n = e.active.id;
4070
+ if (n.startsWith("col-") && x) {
4071
+ Re([ u.restrictToHorizontalAxis ]);
4072
+ ln(e);
4073
+ } else if (n.startsWith("row-") && k) {
4074
+ Re([ u.restrictToVerticalAxis ]);
4075
+ }
4076
+ }), [ x, k, ln ]);
4077
+ var Nn = (0, t.useCallback)((function(e) {
4078
+ Re([]);
4079
+ var n = e.active.id;
4080
+ if (n.startsWith("col-") && x) {
4081
+ cn(e);
4082
+ } else if (n.startsWith("row-") && k) {
4083
+ dn(e);
4084
+ }
4085
+ }), [ cn, dn, x, k ]);
4086
+ var Wn = (0, t.useCallback)((function(e) {
4087
+ var n = e.active.id;
4088
+ if (n.startsWith("col-") && x) {
4089
+ sn(e);
4090
+ }
4091
+ }), [ sn, x ]);
4092
+ var Ln = (0, t.useCallback)((function(e) {
4093
+ Re([]);
4094
+ var n = e.active.id;
4095
+ if (n.startsWith("row-") && k) {
4096
+ fn();
4097
+ }
4098
+ }), [ fn, k ]);
4099
+ var Hn = (0, t.useMemo)((function() {
4100
+ return function(e) {
4101
+ var n = (0, a.pointerWithin)(e);
4102
+ // Collision detection algorithms return an array of collisions
4103
+ if (n.length > 0) {
4104
+ return n;
4105
+ }
4106
+ // If there are no collisions with the pointer, return rectangle intersections
4107
+ return (0, a.rectIntersection)(e);
4108
+ };
4109
+ }), []);
4110
+ var Kn = _e ? vn.current[_e] : null;
4111
+ var Bn = Kn ? go(Kn).width : undefined;
4112
+ var Vn = Ke.current ? go(Ke.current).height : undefined;
3973
4113
 
3974
4114
  return r().createElement(ee, Co({
3975
4115
  "data-test": "table",
3976
- ref: p,
3977
- style: j,
3978
- "data-test-row-selection": I ? N : undefined
3979
- }, g()(K, [].concat(xo(Object.keys(zo)), [ "style" ]))), r().createElement(O(), {
3980
- target: Qe(),
4116
+ ref: b,
4117
+ style: _,
4118
+ "data-test-row-selection": A ? K : undefined
4119
+ }, g()(F, [].concat(xo(Object.keys(Po)), [ "style" ]))), r().createElement(S(), {
4120
+ target: Je(),
3981
4121
  eventType: "scroll",
3982
- listener: Me,
4122
+ listener: en,
3983
4123
  options: Fo
3984
- }), r().createElement(S(), {
3985
- handleWidth: true,
3986
- onResize: $e
3987
- }), r().createElement(xn.Provider, {
3988
- value: kn
3989
- }, yn, r().createElement(ne, {
3990
- onScroll: Pe,
3991
- ref: De,
3992
- style: y
3993
- }, r().createElement(E.ScrollContainerProvider, {
3994
- value: Cn
4124
+ }), r().createElement(_t.Provider, {
4125
+ value: Pn
4126
+ }, Tn, r().createElement(ne, {
4127
+ onScroll: Qe,
4128
+ ref: Ke,
4129
+ style: w,
4130
+ $dragging: !!_e
4131
+ }, r().createElement(I.ScrollContainerProvider, {
4132
+ value: qn
3995
4133
  }, r().createElement(a.DndContext, {
3996
- accessibility: Rn,
3997
- sensors: Se,
3998
- onDragEnd: nn,
3999
- onDragCancel: tn,
4000
- collisionDetection: a.closestCenter,
4001
- modifiers: Wo
4002
- }, r().createElement(l.SortableContext, {
4003
- items: qe,
4004
- strategy: l.verticalListSortingStrategy
4134
+ accessibility: Mn,
4135
+ collisionDetection: Hn,
4136
+ modifiers: Oe,
4137
+ onDragCancel: Ln,
4138
+ onDragEnd: Nn,
4139
+ onDragOver: Wn,
4140
+ onDragStart: $n,
4141
+ sensors: xe
4005
4142
  }, r().createElement(te, {
4006
- ref: Te,
4143
+ ref: He,
4007
4144
  "data-test": "main-table",
4008
- style: W,
4009
- "data-fixed-column": hn ? "true" : undefined,
4010
- $resizableFillLayout: P
4011
- }, bn, pn, mn))))), fn()));
4012
- }
4013
- Uo.propTypes = zo;
4014
- Uo.Body = Z;
4015
- Uo.Caption = de;
4016
- Uo.Cell = xe;
4017
- Uo.Head = ar;
4018
- Uo.HeadCell = Pn;
4019
- Uo.HeadDropdownCell = Ir;
4020
- Uo.Row = Wt;
4021
- /* harmony default export */ const Xo = Uo;
4145
+ style: V,
4146
+ "data-fixed-column": In ? "true" : undefined,
4147
+ $resizableFillLayout: $
4148
+ }, En, x ? r().createElement(l.SortableContext, {
4149
+ items: Xe,
4150
+ strategy: l.horizontalListSortingStrategy
4151
+ }, On) : On, k ? r().createElement(l.SortableContext, {
4152
+ items: Fe,
4153
+ strategy: l.verticalListSortingStrategy
4154
+ }, Rn) : Rn), _e && r().createElement(a.DragOverlay, null, r().createElement(ae, {
4155
+ $width: Bn,
4156
+ $height: Vn
4157
+ })), _e && bn))), Sn()));
4158
+ }
4159
+ Xo.propTypes = Po;
4160
+ Xo.Body = Z;
4161
+ Xo.Caption = ve;
4162
+ Xo.Cell = ke;
4163
+ Xo.Head = Jt;
4164
+ Xo.HeadCell = En;
4165
+ Xo.HeadDropdownCell = gr;
4166
+ Xo.Row = At;
4167
+ /* harmony default export */ const Yo = Xo;
4022
4168
  // CONCATENATED MODULE: ./src/Table/index.ts
4023
4169
  module.exports = n;
4024
4170
  /******/})();