@infinite-table/infinite-react 0.0.3 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -216,6 +216,8 @@ var require_common = __commonJS({
216
216
  function createDebug(namespace) {
217
217
  let prevTime;
218
218
  let enableOverride = null;
219
+ let namespacesCache;
220
+ let enabledCache;
219
221
  function debug6(...args) {
220
222
  if (!debug6.enabled) {
221
223
  return;
@@ -258,7 +260,16 @@ var require_common = __commonJS({
258
260
  Object.defineProperty(debug6, "enabled", {
259
261
  enumerable: true,
260
262
  configurable: false,
261
- get: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride,
263
+ get: () => {
264
+ if (enableOverride !== null) {
265
+ return enableOverride;
266
+ }
267
+ if (namespacesCache !== createDebug.namespaces) {
268
+ namespacesCache = createDebug.namespaces;
269
+ enabledCache = createDebug.enabled(namespace);
270
+ }
271
+ return enabledCache;
272
+ },
262
273
  set: (v) => {
263
274
  enableOverride = v;
264
275
  }
@@ -275,6 +286,7 @@ var require_common = __commonJS({
275
286
  }
276
287
  function enable(namespaces) {
277
288
  createDebug.save(namespaces);
289
+ createDebug.namespaces = namespaces;
278
290
  createDebug.names = [];
279
291
  createDebug.skips = [];
280
292
  let i;
@@ -502,6 +514,99 @@ var require_browser = __commonJS({
502
514
  }
503
515
  });
504
516
 
517
+ // node_modules/@vanilla-extract/recipes/createRuntimeFn/dist/vanilla-extract-recipes-createRuntimeFn.cjs.dev.js
518
+ var require_vanilla_extract_recipes_createRuntimeFn_cjs_dev = __commonJS({
519
+ "node_modules/@vanilla-extract/recipes/createRuntimeFn/dist/vanilla-extract-recipes-createRuntimeFn.cjs.dev.js"(exports) {
520
+ "use strict";
521
+ Object.defineProperty(exports, "__esModule", { value: true });
522
+ function _defineProperty(obj, key, value) {
523
+ if (key in obj) {
524
+ Object.defineProperty(obj, key, {
525
+ value,
526
+ enumerable: true,
527
+ configurable: true,
528
+ writable: true
529
+ });
530
+ } else {
531
+ obj[key] = value;
532
+ }
533
+ return obj;
534
+ }
535
+ function ownKeys(object, enumerableOnly) {
536
+ var keys = Object.keys(object);
537
+ if (Object.getOwnPropertySymbols) {
538
+ var symbols = Object.getOwnPropertySymbols(object);
539
+ if (enumerableOnly) {
540
+ symbols = symbols.filter(function(sym) {
541
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
542
+ });
543
+ }
544
+ keys.push.apply(keys, symbols);
545
+ }
546
+ return keys;
547
+ }
548
+ function _objectSpread2(target) {
549
+ for (var i = 1; i < arguments.length; i++) {
550
+ var source = arguments[i] != null ? arguments[i] : {};
551
+ if (i % 2) {
552
+ ownKeys(Object(source), true).forEach(function(key) {
553
+ _defineProperty(target, key, source[key]);
554
+ });
555
+ } else if (Object.getOwnPropertyDescriptors) {
556
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
557
+ } else {
558
+ ownKeys(Object(source)).forEach(function(key) {
559
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
560
+ });
561
+ }
562
+ }
563
+ return target;
564
+ }
565
+ var shouldApplyCompound = (compoundCheck, selections) => {
566
+ for (var key of Object.keys(compoundCheck)) {
567
+ if (compoundCheck[key] !== selections[key]) {
568
+ return false;
569
+ }
570
+ }
571
+ return true;
572
+ };
573
+ var createRuntimeFn = (config) => (options) => {
574
+ var className = config.defaultClassName;
575
+ var selections = _objectSpread2(_objectSpread2({}, config.defaultVariants), options);
576
+ for (var variantName in selections) {
577
+ var _selections$variantNa;
578
+ var variantSelection = (_selections$variantNa = selections[variantName]) !== null && _selections$variantNa !== void 0 ? _selections$variantNa : config.defaultVariants[variantName];
579
+ if (variantSelection != null) {
580
+ var selection = variantSelection;
581
+ if (typeof selection === "boolean") {
582
+ selection = selection === true ? "true" : "false";
583
+ }
584
+ className += " " + config.variantClassNames[variantName][selection];
585
+ }
586
+ }
587
+ for (var [compoundCheck, compoundClassName] of config.compoundVariants) {
588
+ if (shouldApplyCompound(compoundCheck, selections)) {
589
+ className += " " + compoundClassName;
590
+ }
591
+ }
592
+ return className;
593
+ };
594
+ exports.createRuntimeFn = createRuntimeFn;
595
+ }
596
+ });
597
+
598
+ // node_modules/@vanilla-extract/recipes/createRuntimeFn/dist/vanilla-extract-recipes-createRuntimeFn.cjs.js
599
+ var require_vanilla_extract_recipes_createRuntimeFn_cjs = __commonJS({
600
+ "node_modules/@vanilla-extract/recipes/createRuntimeFn/dist/vanilla-extract-recipes-createRuntimeFn.cjs.js"(exports, module2) {
601
+ "use strict";
602
+ if (false) {
603
+ module2.exports = null;
604
+ } else {
605
+ module2.exports = require_vanilla_extract_recipes_createRuntimeFn_cjs_dev();
606
+ }
607
+ }
608
+ });
609
+
505
610
  // node_modules/binary-search/index.js
506
611
  var require_binary_search = __commonJS({
507
612
  "node_modules/binary-search/index.js"(exports, module2) {
@@ -563,7 +668,7 @@ var require_decamelize = __commonJS({
563
668
  if (preserveConsecutiveUppercase) {
564
669
  return handlePreserveConsecutiveUppercase(decamelized, separator);
565
670
  }
566
- return decamelized.replace(/(\p{Uppercase_Letter}+)(\p{Uppercase_Letter}\p{Lowercase_Letter}+)/gu, replacement).toLowerCase();
671
+ return decamelized.replace(/(\p{Uppercase_Letter})(\p{Uppercase_Letter}\p{Lowercase_Letter}+)/gu, replacement).toLowerCase();
567
672
  };
568
673
  }
569
674
  });
@@ -1905,31 +2010,28 @@ var React6 = __toModule(require("react"));
1905
2010
  var import_react14 = __toModule(require("react"));
1906
2011
 
1907
2012
  // src/components/InfiniteTable/utilities.css.ts
1908
- var alignItems = { center: "_16lm1iwz", stretch: "_16lm1iw10" };
1909
- var cssEllipsisClassName = "_16lm1iw18 _16lm1iw19 _16lm1iw14";
1910
- var cursor = { pointer: "_16lm1iw9" };
1911
- var display = { flex: "_16lm1iwh", block: "_16lm1iwi", inlineBlock: "_16lm1iwj" };
2013
+ var alignItems = { center: "_16lm1iw11", stretch: "_16lm1iw12" };
2014
+ var cssEllipsisClassName = "_16lm1iw1a _16lm1iw1b _16lm1iw16";
2015
+ var cursor = { pointer: "_16lm1iwb" };
2016
+ var display = { flex: "_16lm1iwj", block: "_16lm1iwk", inlineBlock: "_16lm1iwl" };
1912
2017
  var fill = { currentColor: "_16lm1iw5", accentColor: "_16lm1iw6" };
1913
- var flex = { "1": "_16lm1iwa", none: "_16lm1iwb" };
1914
- var flexFlow = { column: "_16lm1iwx", row: "_16lm1iwy" };
1915
- var justifyContent = { center: "_16lm1iw11", start: "_16lm1iw12", end: "_16lm1iw13" };
1916
- var left = { "0": "_16lm1iwr", "100%": "_16lm1iws" };
2018
+ var flex = { "1": "_16lm1iwc", none: "_16lm1iwd" };
2019
+ var flexFlow = { column: "_16lm1iwz", row: "_16lm1iw10" };
2020
+ var justifyContent = { center: "_16lm1iw13", start: "_16lm1iw14", end: "_16lm1iw15" };
2021
+ var left = { "0": "_16lm1iwt", "100%": "_16lm1iwu" };
1917
2022
  var position = { relative: "_16lm1iw1", absolute: "_16lm1iw2", sticky: "_16lm1iw3", fixed: "_16lm1iw4" };
1918
- var top = { "0": "_16lm1iwp", "100%": "_16lm1iwq" };
2023
+ var top = { "0": "_16lm1iwr", "100%": "_16lm1iws" };
2024
+ var transform = { translateZero: "_16lm1iw9", rotate90: "_16lm1iwa" };
1919
2025
  var transformTranslateZero = "_16lm1iw8";
1920
- var userSelect = { none: "_16lm1iwk" };
1921
- var willChange = { transform: "_16lm1iw17" };
1922
- var zIndex = { "1": "_16lm1iwc", "10": "_16lm1iwd", "1000": "_16lm1iwe", "10000": "_16lm1iwf", "100000": "_16lm1iwg" };
2026
+ var userSelect = { none: "_16lm1iwm" };
2027
+ var willChange = { transform: "_16lm1iw19" };
2028
+ var zIndex = { "1": "_16lm1iwe", "10": "_16lm1iwf", "1000": "_16lm1iwg", "10000": "_16lm1iwh", "100000": "_16lm1iwi" };
1923
2029
 
1924
2030
  // src/components/InfiniteTable/components/icons/ExpanderIcon.tsx
1925
2031
  function ExpanderIcon(props) {
1926
2032
  var _a;
1927
2033
  const { size = 24 } = props;
1928
- const style = __spreadValues({}, props.style);
1929
2034
  const [expanded, setExpanded] = (0, import_react14.useState)((_a = props.expanded) != null ? _a : props.defaultExpanded);
1930
- if (expanded) {
1931
- style.transform = `rotate(90deg)`;
1932
- }
1933
2035
  const onClick = () => {
1934
2036
  var _a2;
1935
2037
  (_a2 = props.onChange) == null ? void 0 : _a2.call(props, !expanded);
@@ -1948,14 +2050,20 @@ function ExpanderIcon(props) {
1948
2050
  height: `${size}px`,
1949
2051
  viewBox: "0 0 24 24",
1950
2052
  width: `${size}px`,
1951
- style,
2053
+ style: props.style,
1952
2054
  onClick,
1953
- className: join(props.className, fill.currentColor, flex.none, cursor.pointer, expanded ? fill.accentColor : "", "InfiniteIcon", "InfiniteIcon-expander", `InfiniteIcon-expander--${expanded ? "expanded" : "collapsed"}`)
2055
+ className: join(props.className, fill.accentColor, flex.none, cursor.pointer, expanded ? fill.accentColor : "", expanded ? transform.rotate90 : "", "InfiniteIcon", "InfiniteIcon-expander", `InfiniteIcon-expander--${expanded ? "expanded" : "collapsed"}`)
1954
2056
  }, /* @__PURE__ */ React6.createElement("path", {
1955
2057
  d: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"
1956
2058
  }));
1957
2059
  }
1958
2060
 
2061
+ // src/components/InfiniteTable/components/InfiniteTableRow/row.css.ts
2062
+ var import_createRuntimeFn = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
2063
+ var GroupRowExpanderCls = "_7pupv0b";
2064
+ var RowClsRecipe = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "_7pupv00", variantClassNames: { zebra: { false: "_7pupv02", even: "_7pupv03", odd: "_7pupv04" }, groupRow: { true: "_7pupv05", false: "_7pupv06" }, inlineGroupRow: { true: "_7pupv07", false: "_7pupv08" }, showHoverRows: { true: "_7pupv09", false: "_7pupv0a" } }, defaultVariants: {}, compoundVariants: [] });
2065
+ var RowHoverCls = "_7pupv01";
2066
+
1959
2067
  // src/components/InfiniteTable/state/getComputedPivotColumnsFromDataSourcePivotColumns.tsx
1960
2068
  function getComputedPivotColumnsFromDataSourcePivotColumns(pivotColumns, params) {
1961
2069
  if (!pivotColumns) {
@@ -1975,51 +2083,51 @@ function getComputedPivotColumnsFromDataSourcePivotColumns(pivotColumns, params)
1975
2083
  return;
1976
2084
  }
1977
2085
  let column = __spreadValues({}, col);
1978
- if (pivotColumn) {
1979
- if (typeof pivotColumn === "function") {
1980
- column = __spreadValues(__spreadValues({}, column), pivotColumn({
1981
- column,
1982
- pivotBy,
1983
- groupRowsBy
1984
- }));
1985
- } else {
1986
- column = __spreadValues(__spreadValues({}, column), pivotColumn);
1987
- }
1988
- }
1989
2086
  const isPivotRowLabelsColumn = !column.pivotColumn && !column.pivotTotalColumn;
1990
- if (pivotRowLabelsColumn && isPivotRowLabelsColumn) {
1991
- if (typeof pivotRowLabelsColumn === "function") {
1992
- column = __spreadValues(__spreadValues({}, column), pivotRowLabelsColumn({
1993
- column,
1994
- pivotBy,
1995
- groupRowsBy
1996
- }));
1997
- } else {
1998
- column = __spreadValues(__spreadValues({}, column), pivotRowLabelsColumn);
2087
+ if (!isPivotRowLabelsColumn) {
2088
+ if (pivotColumn) {
2089
+ if (typeof pivotColumn === "function") {
2090
+ column = __spreadValues(__spreadValues({}, column), pivotColumn({
2091
+ column,
2092
+ pivotBy,
2093
+ groupRowsBy
2094
+ }));
2095
+ } else {
2096
+ column = __spreadValues(__spreadValues({}, column), pivotColumn);
2097
+ }
1999
2098
  }
2000
- }
2001
- if (isPivotRowLabelsColumn && !column.render) {
2002
- column.render = (renderOptions) => {
2003
- var _a;
2004
- let { value, rowInfo, column: column2, groupRowsBy: groupRowsBy2 } = renderOptions;
2005
- if (column2.renderValue) {
2006
- value = column2.renderValue(renderOptions);
2099
+ } else {
2100
+ if (pivotRowLabelsColumn) {
2101
+ if (typeof pivotRowLabelsColumn === "function") {
2102
+ column = __spreadValues(__spreadValues({}, column), pivotRowLabelsColumn({
2103
+ column,
2104
+ pivotBy,
2105
+ groupRowsBy
2106
+ }));
2107
+ } else {
2108
+ column = __spreadValues(__spreadValues({}, column), pivotRowLabelsColumn);
2007
2109
  }
2008
- const showExpanderIcon = (((_a = rowInfo.groupKeys) == null ? void 0 : _a.length) || 0) < groupRowsBy2.length;
2009
- return /* @__PURE__ */ React7.createElement("div", {
2010
- className: join(display.flex, alignItems.center),
2011
- style: {
2012
- paddingInlineStart: `calc(${rowInfo.groupNesting - 1} * var(--ITableRow-group-column-nesting))`
2013
- }
2014
- }, showExpanderIcon ? /* @__PURE__ */ React7.createElement(ExpanderIcon, {
2015
- expanded: !rowInfo.collapsed,
2016
- onChange: () => {
2017
- toggleGroupRow(rowInfo.groupKeys);
2110
+ }
2111
+ if (!column.render) {
2112
+ column.render = (renderOptions) => {
2113
+ var _a;
2114
+ let { value, rowInfo, column: column2, groupRowsBy: groupRowsBy2 } = renderOptions;
2115
+ if (column2.renderValue) {
2116
+ value = column2.renderValue(renderOptions);
2018
2117
  }
2019
- }) : null, /* @__PURE__ */ React7.createElement("div", {
2020
- className: cssEllipsisClassName
2021
- }, value != null ? value : null));
2022
- };
2118
+ const showExpanderIcon = (((_a = rowInfo.groupKeys) == null ? void 0 : _a.length) || 0) < groupRowsBy2.length;
2119
+ return /* @__PURE__ */ React7.createElement("div", {
2120
+ className: join(display.flex, alignItems.center, GroupRowExpanderCls)
2121
+ }, showExpanderIcon ? /* @__PURE__ */ React7.createElement(ExpanderIcon, {
2122
+ expanded: !rowInfo.collapsed,
2123
+ onChange: () => {
2124
+ toggleGroupRow(rowInfo.groupKeys);
2125
+ }
2126
+ }) : null, /* @__PURE__ */ React7.createElement("div", {
2127
+ className: cssEllipsisClassName
2128
+ }, value != null ? value : null));
2129
+ };
2130
+ }
2023
2131
  }
2024
2132
  if (!column.render && column.renderValue) {
2025
2133
  column.render = (renderOptions) => {
@@ -2033,47 +2141,6 @@ function getComputedPivotColumnsFromDataSourcePivotColumns(pivotColumns, params)
2033
2141
 
2034
2142
  // src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
2035
2143
  var React8 = __toModule(require("react"));
2036
-
2037
- // node_modules/@vanilla-extract/recipes/createRuntimeFn/dist/vanilla-extract-recipes-createRuntimeFn.esm.js
2038
- var shouldApplyCompound = (compoundCheck, selections) => {
2039
- for (const key of Object.keys(compoundCheck)) {
2040
- if (compoundCheck[key] !== selections[key]) {
2041
- return false;
2042
- }
2043
- }
2044
- return true;
2045
- };
2046
- var createRuntimeFn = (config) => (options) => {
2047
- let className = config.defaultClassName;
2048
- const selections = {
2049
- ...config.defaultVariants,
2050
- ...options
2051
- };
2052
- for (const variantName in selections) {
2053
- var _selections$variantNa;
2054
- const variantSelection = (_selections$variantNa = selections[variantName]) !== null && _selections$variantNa !== void 0 ? _selections$variantNa : config.defaultVariants[variantName];
2055
- if (variantSelection != null) {
2056
- let selection = variantSelection;
2057
- if (typeof selection === "boolean") {
2058
- selection = selection === true ? "true" : "false";
2059
- }
2060
- className += " " + config.variantClassNames[variantName][selection];
2061
- }
2062
- }
2063
- for (const [compoundCheck, compoundClassName] of config.compoundVariants) {
2064
- if (shouldApplyCompound(compoundCheck, selections)) {
2065
- className += " " + compoundClassName;
2066
- }
2067
- }
2068
- return className;
2069
- };
2070
-
2071
- // src/components/InfiniteTable/components/InfiniteTableRow/row.css.ts
2072
- var GroupRowExpanderCls = "_7pupv0b";
2073
- var RowClsRecipe = createRuntimeFn({ defaultClassName: "_7pupv00", variantClassNames: { zebra: { false: "_7pupv02", even: "_7pupv03", odd: "_7pupv04" }, groupRow: { true: "_7pupv05", false: "_7pupv06" }, inlineGroupRow: { true: "_7pupv07", false: "_7pupv08" }, showHoverRows: { true: "_7pupv09", false: "_7pupv0a" } }, defaultVariants: {}, compoundVariants: [] });
2074
- var RowHoverCls = "_7pupv01";
2075
-
2076
- // src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
2077
2144
  function getGroupColumnRender({
2078
2145
  groupIndexForColumn,
2079
2146
  groupRenderStrategy,
@@ -2674,78 +2741,6 @@ function mapPropsToState2(params) {
2674
2741
  };
2675
2742
  }
2676
2743
 
2677
- // src/utils/multisort/sortTypes.ts
2678
- var sortTypes = {
2679
- number: function(first, second) {
2680
- return first - second;
2681
- },
2682
- string: function(first, second) {
2683
- first = `${first}`;
2684
- second = `${second}`;
2685
- return first.localeCompare(second);
2686
- }
2687
- };
2688
- var sortTypes_default = sortTypes;
2689
-
2690
- // src/utils/multisort/index.ts
2691
- var multisort = (sortInfo, array, get) => {
2692
- array.sort(getMultisortFunction(sortInfo, get));
2693
- return array;
2694
- };
2695
- multisort.knownTypes = sortTypes_default;
2696
- var getSingleSortFunction = (info) => {
2697
- if (!info) {
2698
- return;
2699
- }
2700
- const field = info.field;
2701
- var dir = info.dir < 0 ? -1 : info.dir > 0 ? 1 : 0;
2702
- if (!dir) {
2703
- return;
2704
- }
2705
- let fn = info.fn;
2706
- if (!fn && info.type) {
2707
- fn = multisort.knownTypes[info.type];
2708
- if (!fn) {
2709
- console.warn(`Unknown sort type "${info.type}" - please pass one of ${Object.keys(multisort.knownTypes).join(", ")}`);
2710
- }
2711
- }
2712
- if (!fn) {
2713
- fn = sortTypes_default.string;
2714
- }
2715
- return (first, second) => {
2716
- const a = field ? first[field] : first;
2717
- const b = field ? second[field] : second;
2718
- return dir * fn(a, b);
2719
- };
2720
- };
2721
- var getSortFunctions = (sortInfo) => {
2722
- return sortInfo.map(getSingleSortFunction).filter((fn) => fn instanceof Function);
2723
- };
2724
- var getMultisortFunction = (sortInfo, get) => {
2725
- const fns = getSortFunctions(sortInfo);
2726
- return (first, second) => {
2727
- if (get) {
2728
- first = get(first);
2729
- second = get(second);
2730
- }
2731
- let result = 0;
2732
- let i = 0;
2733
- let fn;
2734
- const len = fns.length;
2735
- for (; i < len; i++) {
2736
- fn = fns[i];
2737
- if (!fn) {
2738
- continue;
2739
- }
2740
- result = fn(first, second);
2741
- if (result !== 0) {
2742
- return result;
2743
- }
2744
- }
2745
- return result;
2746
- };
2747
- };
2748
-
2749
2744
  // src/utils/groupAndPivot/index.ts
2750
2745
  function DEFAULT_TO_KEY(value) {
2751
2746
  return value;
@@ -2975,6 +2970,80 @@ function enhancedFlatten(param) {
2975
2970
  data: result
2976
2971
  };
2977
2972
  }
2973
+
2974
+ // src/utils/multisort/sortTypes.ts
2975
+ var sortTypes = {
2976
+ number: function(first, second) {
2977
+ return first - second;
2978
+ },
2979
+ string: function(first, second) {
2980
+ first = `${first}`;
2981
+ second = `${second}`;
2982
+ return first.localeCompare(second);
2983
+ }
2984
+ };
2985
+ var sortTypes_default = sortTypes;
2986
+
2987
+ // src/utils/multisort/index.ts
2988
+ var multisort = (sortInfo, array, get) => {
2989
+ array.sort(getMultisortFunction(sortInfo, get));
2990
+ return array;
2991
+ };
2992
+ multisort.knownTypes = sortTypes_default;
2993
+ var getSingleSortFunction = (info) => {
2994
+ if (!info) {
2995
+ return;
2996
+ }
2997
+ const field = info.field;
2998
+ var dir = info.dir < 0 ? -1 : info.dir > 0 ? 1 : 0;
2999
+ if (!dir) {
3000
+ return;
3001
+ }
3002
+ let fn = info.fn;
3003
+ if (!fn && info.type) {
3004
+ fn = multisort.knownTypes[info.type];
3005
+ if (!fn) {
3006
+ console.warn(`Unknown sort type "${info.type}" - please pass one of ${Object.keys(multisort.knownTypes).join(", ")}`);
3007
+ }
3008
+ }
3009
+ if (!fn) {
3010
+ fn = sortTypes_default.string;
3011
+ }
3012
+ return (first, second) => {
3013
+ const a = field ? first[field] : first;
3014
+ const b = field ? second[field] : second;
3015
+ return dir * fn(a, b);
3016
+ };
3017
+ };
3018
+ var getSortFunctions = (sortInfo) => {
3019
+ return sortInfo.map(getSingleSortFunction).filter((fn) => fn instanceof Function);
3020
+ };
3021
+ var getMultisortFunction = (sortInfo, get) => {
3022
+ const fns = getSortFunctions(sortInfo);
3023
+ return (first, second) => {
3024
+ if (get) {
3025
+ first = get(first);
3026
+ second = get(second);
3027
+ }
3028
+ let result = 0;
3029
+ let i = 0;
3030
+ let fn;
3031
+ const len = fns.length;
3032
+ for (; i < len; i++) {
3033
+ fn = fns[i];
3034
+ if (!fn) {
3035
+ continue;
3036
+ }
3037
+ result = fn(first, second);
3038
+ if (result !== 0) {
3039
+ return result;
3040
+ }
3041
+ }
3042
+ return result;
3043
+ };
3044
+ };
3045
+
3046
+ // src/utils/groupAndPivot/getPivotColumnsAndColumnGroups.ts
2978
3047
  function getPivotColumnsAndColumnGroups(deepMap, pivotBy, pivotTotalColumnPosition) {
2979
3048
  const pivotLength = pivotBy.length;
2980
3049
  const columns = new Map([
@@ -2999,10 +3068,14 @@ function getPivotColumnsAndColumnGroups(deepMap, pivotBy, pivotTotalColumnPositi
2999
3068
  if (keys.length === pivotLength) {
3000
3069
  const parentKeys = keys.slice(0, -1);
3001
3070
  let columnGroupId = parentKeys.join("/");
3002
- columns.set(`${keys.join("/")}`, {
3071
+ const pivotByForColumn = pivotBy[keys.length - 1];
3072
+ let computedPivotColumn = __spreadValues({
3003
3073
  pivotBy,
3004
3074
  pivotColumn: true,
3005
3075
  pivotGroupKeys: keys,
3076
+ pivotGroupKeyForColumn: keys[keys.length - 1],
3077
+ pivotIndexForColumn: keys.length - 1,
3078
+ pivotByForColumn,
3006
3079
  sortable: false,
3007
3080
  columnGroup: parentKeys.length ? `${columnGroupId}` : void 0,
3008
3081
  header: keys[keys.length - 1],
@@ -3011,7 +3084,15 @@ function getPivotColumnsAndColumnGroups(deepMap, pivotBy, pivotTotalColumnPositi
3011
3084
  const value = (_c = (_b = (_a = rowInfo.pivotValuesMap) == null ? void 0 : _a.get(keys)) == null ? void 0 : _b.reducerResults[0]) != null ? _c : null;
3012
3085
  return value;
3013
3086
  }
3014
- });
3087
+ }, pivotByForColumn.column);
3088
+ if (pivotByForColumn.column) {
3089
+ if (typeof pivotByForColumn.column === "function") {
3090
+ Object.assign(computedPivotColumn, pivotByForColumn.column({ column: computedPivotColumn }));
3091
+ } else {
3092
+ Object.assign(computedPivotColumn, pivotByForColumn.column);
3093
+ }
3094
+ }
3095
+ columns.set(`${keys.join("/")}`, computedPivotColumn);
3015
3096
  } else {
3016
3097
  const colGroupId = keys.join("/");
3017
3098
  const parentKeys = keys.slice(0, -1);
@@ -3020,11 +3101,15 @@ function getPivotColumnsAndColumnGroups(deepMap, pivotBy, pivotTotalColumnPositi
3020
3101
  header: keys.join(" >> ")
3021
3102
  });
3022
3103
  if (pivotTotalColumnPosition !== false) {
3023
- columns.set(`${keys.join("/")}-total`, {
3104
+ const pivotByForColumn = pivotBy[keys.length - 1];
3105
+ let computedPivotColumn = __spreadValues({
3024
3106
  columnGroup: parentKeys.length ? parentKeys.join("/") : void 0,
3025
3107
  header: `${keys.join("/")} total `,
3026
3108
  pivotTotalColumn: true,
3027
3109
  pivotGroupKeys: keys,
3110
+ pivotGroupKeyForColumn: keys[keys.length - 1],
3111
+ pivotByForColumn,
3112
+ pivotIndexForColumn: keys.length - 1,
3028
3113
  pivotBy,
3029
3114
  sortable: false,
3030
3115
  valueGetter: ({ rowInfo }) => {
@@ -3032,7 +3117,15 @@ function getPivotColumnsAndColumnGroups(deepMap, pivotBy, pivotTotalColumnPositi
3032
3117
  const value = (_c = (_b = (_a = rowInfo.pivotValuesMap) == null ? void 0 : _a.get(keys)) == null ? void 0 : _b.reducerResults[0]) != null ? _c : null;
3033
3118
  return value;
3034
3119
  }
3035
- });
3120
+ }, pivotByForColumn.column);
3121
+ if (pivotByForColumn.column) {
3122
+ if (typeof pivotByForColumn.column === "function") {
3123
+ Object.assign(computedPivotColumn, pivotByForColumn.column({ column: computedPivotColumn }));
3124
+ } else {
3125
+ Object.assign(computedPivotColumn, pivotByForColumn.column);
3126
+ }
3127
+ }
3128
+ columns.set(`${keys.join("/")}-total`, computedPivotColumn);
3036
3129
  }
3037
3130
  }
3038
3131
  if (pivotTotalColumnPosition === "start" || pivotTotalColumnPosition === false) {
@@ -3460,7 +3553,7 @@ function getColumnsWhenGrouping(params) {
3460
3553
  columns.forEach((col, colId) => {
3461
3554
  computedColumns.set(colId, col);
3462
3555
  });
3463
- return computedColumns;
3556
+ return computedColumns.size ? computedColumns : void 0;
3464
3557
  }
3465
3558
 
3466
3559
  // src/components/InfiniteTable/hooks/useComputed.ts
@@ -3658,19 +3751,20 @@ function VerticalScrollbarPlaceholderFn(props) {
3658
3751
  var VerticalScrollbarPlaceholder = React11.memo(VerticalScrollbarPlaceholderFn);
3659
3752
 
3660
3753
  // src/components/InfiniteTable/components/InfiniteTableHeader/header.css.ts
3661
- var CellCls = "_1eexc2a5 _16lm1iwh _16lm1iwy _16lm1iwz _16lm1iw2 _16lm1iw17 _16lm1iw18";
3754
+ var import_createRuntimeFn2 = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
3755
+ var CellCls = "_1eexc2a5 _16lm1iwj _16lm1iw10 _16lm1iw11 _16lm1iw2 _16lm1iw19 _16lm1iw1a";
3662
3756
  var HeaderCellProxy = "_12zfob10";
3663
- var HeaderCellRecipe = createRuntimeFn({ defaultClassName: "_12zfob1c", variantClassNames: { dragging: { true: "_12zfob1d", false: "_12zfob1e" }, first: { true: "_12zfob1f", false: "_12zfob1g" }, last: { true: "_12zfob1h", false: "_12zfob1i" }, groupByField: { true: "_12zfob1j", false: "_12zfob1k" }, firstInCategory: { true: "_12zfob1l", false: "_12zfob1m" }, lastInCategory: { true: "_12zfob1n", false: "_12zfob1o" }, pinned: { start: "_12zfob1p", end: "_12zfob1q", false: "_12zfob1r" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "_12zfob1s"], [{ pinned: "end", firstInCategory: true }, "_12zfob1t"], [{ pinned: false, lastInCategory: true }, "_12zfob1u"]] });
3664
- var HeaderClsRecipe = createRuntimeFn({ defaultClassName: "_12zfob12 _16lm1iwy", variantClassNames: { pinned: { start: "_12zfob13", end: "_12zfob14", false: "_12zfob15" }, virtualized: { true: "_12zfob16", false: "_12zfob17" }, overflow: { true: "_12zfob18", false: "_12zfob19" } }, defaultVariants: {}, compoundVariants: [[{ overflow: true, pinned: "start" }, "_12zfob1a"], [{ overflow: true, pinned: "end" }, "_12zfob1b"]] });
3665
- var HeaderGroupCls = "_16lm1iwx _16lm1iwh";
3666
- var HeaderGroup_Children = "_16lm1iwh _16lm1iwy _16lm1iw10 _16lm1iwa";
3667
- var HeaderGroup_Header = "_12zfob1x _16lm1iwh _16lm1iwy _16lm1iwz";
3757
+ var HeaderCellRecipe = (0, import_createRuntimeFn2.createRuntimeFn)({ defaultClassName: "_12zfob1c", variantClassNames: { dragging: { true: "_12zfob1d", false: "_12zfob1e" }, first: { true: "_12zfob1f", false: "_12zfob1g" }, last: { true: "_12zfob1h", false: "_12zfob1i" }, groupByField: { true: "_12zfob1j", false: "_12zfob1k" }, firstInCategory: { true: "_12zfob1l", false: "_12zfob1m" }, lastInCategory: { true: "_12zfob1n", false: "_12zfob1o" }, pinned: { start: "_12zfob1p", end: "_12zfob1q", false: "_12zfob1r" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "_12zfob1s"], [{ pinned: "end", firstInCategory: true }, "_12zfob1t"], [{ pinned: false, lastInCategory: true }, "_12zfob1u"]] });
3758
+ var HeaderClsRecipe = (0, import_createRuntimeFn2.createRuntimeFn)({ defaultClassName: "_12zfob12 _16lm1iw10", variantClassNames: { pinned: { start: "_12zfob13", end: "_12zfob14", false: "_12zfob15" }, virtualized: { true: "_12zfob16", false: "_12zfob17" }, overflow: { true: "_12zfob18", false: "_12zfob19" } }, defaultVariants: {}, compoundVariants: [[{ overflow: true, pinned: "start" }, "_12zfob1a"], [{ overflow: true, pinned: "end" }, "_12zfob1b"]] });
3759
+ var HeaderGroupCls = "_16lm1iwz _16lm1iwj";
3760
+ var HeaderGroup_Children = "_16lm1iwj _16lm1iw10 _16lm1iw12 _16lm1iwc";
3761
+ var HeaderGroup_Header = "_12zfob1x _16lm1iwj _16lm1iw10 _16lm1iw11";
3668
3762
  var HeaderSortIconCls = "_12zfob11 _16lm1iw1";
3669
- var HeaderWrapperCls = "_12zfob1v _16lm1iw14 _16lm1iw1 _16lm1iwh _16lm1iwy";
3763
+ var HeaderWrapperCls = "_12zfob1v _16lm1iw16 _16lm1iw1 _16lm1iwj _16lm1iw10";
3670
3764
 
3671
3765
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
3672
3766
  var React18 = __toModule(require("react"));
3673
- var import_react26 = __toModule(require("react"));
3767
+ var import_react27 = __toModule(require("react"));
3674
3768
 
3675
3769
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderCell.tsx
3676
3770
  var React14 = __toModule(require("react"));
@@ -3688,9 +3782,10 @@ var useInfiniteTableState = () => {
3688
3782
  };
3689
3783
 
3690
3784
  // src/components/InfiniteTable/components/cell.css.ts
3691
- var CellCls2 = "_1eexc2a5 _16lm1iwh _16lm1iwy _16lm1iwz _16lm1iw2 _16lm1iw17 _16lm1iw18";
3785
+ var import_createRuntimeFn3 = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
3786
+ var CellCls2 = "_1eexc2a5 _16lm1iwj _16lm1iw10 _16lm1iw11 _16lm1iw2 _16lm1iw19 _16lm1iw1a";
3692
3787
  var CellClsVariants = { shifting: "_1eexc2a3", dragging: "_1eexc2a4" };
3693
- var ColumnCellRecipe = createRuntimeFn({ defaultClassName: "_16lm1iw2 _16lm1iwm _16lm1iw7 _16lm1iwp", variantClassNames: { dragging: { false: "_1eexc2a7" }, first: { true: "_1eexc2a8", false: "_1eexc2a9" }, last: { true: "_1eexc2aa", false: "_1eexc2ab" }, groupByField: { true: "_1eexc2ac", false: "_1eexc2ad" }, firstInCategory: { true: "_1eexc2ae", false: "_1eexc2af" }, lastInCategory: { true: "_1eexc2ag", false: "_1eexc2ah" }, pinned: { start: "_1eexc2ai", end: "_1eexc2aj", false: "_1eexc2ak" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "_1eexc2al"], [{ pinned: "end", firstInCategory: true }, "_1eexc2am"]] });
3788
+ var ColumnCellRecipe = (0, import_createRuntimeFn3.createRuntimeFn)({ defaultClassName: "_16lm1iw2 _16lm1iwo _16lm1iw7 _16lm1iwr", variantClassNames: { dragging: { false: "_1eexc2a7" }, first: { true: "_1eexc2a8", false: "_1eexc2a9" }, last: { true: "_1eexc2aa", false: "_1eexc2ab" }, groupByField: { true: "_1eexc2ac", false: "_1eexc2ad" }, firstInCategory: { true: "_1eexc2ae", false: "_1eexc2af" }, lastInCategory: { true: "_1eexc2ag", false: "_1eexc2ah" }, pinned: { start: "_1eexc2ai", end: "_1eexc2aj", false: "_1eexc2ak" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "_1eexc2al"], [{ pinned: "end", firstInCategory: true }, "_1eexc2am"]] });
3694
3789
  var columnAlignCellStyle = { center: "_1eexc2a0", start: "_1eexc2a1", end: "_1eexc2a2" };
3695
3790
 
3696
3791
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableCell.tsx
@@ -4103,6 +4198,24 @@ function InfiniteTableHeaderCell(props) {
4103
4198
 
4104
4199
  // src/components/RawList/index.tsx
4105
4200
  var React17 = __toModule(require("react"));
4201
+ var import_react26 = __toModule(require("react"));
4202
+
4203
+ // src/components/RawList/AvoidReactDiff.tsx
4204
+ var React15 = __toModule(require("react"));
4205
+ var import_react24 = __toModule(require("react"));
4206
+ function AvoidReactDiffFn(props) {
4207
+ const [children, setChildren] = (0, import_react24.useState)(props.updater.get());
4208
+ (0, import_react24.useLayoutEffect)(() => {
4209
+ const remove = props.updater.onChange((children2) => {
4210
+ setChildren(children2);
4211
+ });
4212
+ return remove;
4213
+ }, [props.updater]);
4214
+ return /* @__PURE__ */ React15.createElement(React15.Fragment, null, children);
4215
+ }
4216
+ var AvoidReactDiff = React15.memo(AvoidReactDiffFn);
4217
+
4218
+ // src/components/RawList/useVirtualRenderer.ts
4106
4219
  var import_react25 = __toModule(require("react"));
4107
4220
 
4108
4221
  // src/components/RawList/ReactVirtualRenderer.tsx
@@ -4201,6 +4314,9 @@ var MappedItems = class extends Logger {
4201
4314
  this.itemIndexToElementIndex = {};
4202
4315
  this.renderedElements = {};
4203
4316
  }
4317
+ reset() {
4318
+ this.init();
4319
+ }
4204
4320
  destroy() {
4205
4321
  this.init();
4206
4322
  }
@@ -4220,21 +4336,6 @@ var MappedItems = class extends Logger {
4220
4336
  }
4221
4337
  };
4222
4338
 
4223
- // src/components/RawList/AvoidReactDiff.tsx
4224
- var React15 = __toModule(require("react"));
4225
- var import_react24 = __toModule(require("react"));
4226
- function AvoidReactDiffFn(props) {
4227
- const [children, setChildren] = (0, import_react24.useState)(props.updater.get());
4228
- (0, import_react24.useLayoutEffect)(() => {
4229
- const remove = props.updater.onChange((children2) => {
4230
- setChildren(children2);
4231
- });
4232
- return remove;
4233
- }, [props.updater]);
4234
- return /* @__PURE__ */ React15.createElement(React15.Fragment, null, children);
4235
- }
4236
- var AvoidReactDiff = React15.memo(AvoidReactDiffFn);
4237
-
4238
4339
  // src/components/RawList/ReactVirtualRenderer.tsx
4239
4340
  var ITEM_POSITION_WITH_TRANSFORM = true;
4240
4341
  var ReactVirtualRenderer = class extends Logger {
@@ -4341,17 +4442,12 @@ var ReactVirtualRenderer = class extends Logger {
4341
4442
  }
4342
4443
  };
4343
4444
  this.destroy = () => {
4344
- if (true) {
4345
- return;
4346
- }
4347
4445
  this.destroyed = true;
4348
- this.mappedItems.destroy();
4349
- this.itemDOMElements = [];
4350
- this.itemDOMRefs = [];
4351
- this.updaters = [];
4446
+ this.reset();
4352
4447
  this.onRender = null;
4353
4448
  this.renderItem = null;
4354
4449
  this.brain = null;
4450
+ this.mappedItems = null;
4355
4451
  };
4356
4452
  if (onRender) {
4357
4453
  this.onRender = onRender;
@@ -4409,28 +4505,53 @@ var ReactVirtualRenderer = class extends Logger {
4409
4505
  itemUpdater(renderedNode);
4410
4506
  this.updateElementPosition(elementIndex);
4411
4507
  }
4508
+ reset() {
4509
+ this.itemDOMElements = {};
4510
+ this.itemDOMRefs = {};
4511
+ this.updaters = {};
4512
+ this.items = [];
4513
+ this.mappedItems.reset();
4514
+ }
4412
4515
  };
4413
4516
 
4517
+ // src/components/RawList/useVirtualRenderer.ts
4518
+ function createRenderer(brain) {
4519
+ const renderer = new ReactVirtualRenderer(brain, {});
4520
+ const onRenderUpdater = buildSubscriptionCallback();
4521
+ brain.onDestroy(() => {
4522
+ renderer.destroy();
4523
+ onRenderUpdater.destroy();
4524
+ });
4525
+ return {
4526
+ renderer,
4527
+ onRenderUpdater
4528
+ };
4529
+ }
4530
+ function useVirtualRenderer({
4531
+ brain
4532
+ }) {
4533
+ return (0, import_react25.useMemo)(() => {
4534
+ return createRenderer(brain);
4535
+ }, [brain]);
4536
+ }
4537
+
4414
4538
  // src/components/RawList/index.tsx
4415
4539
  function RawListFn(props) {
4416
4540
  const { renderItem, brain, debugChannel } = props;
4417
- const { onRenderUpdater, renderer } = (0, import_react25.useMemo)(() => {
4418
- const onRenderUpdater2 = buildSubscriptionCallback();
4419
- const renderer2 = new ReactVirtualRenderer(brain, {
4420
- channel: debugChannel
4421
- });
4422
- return { onRenderUpdater: onRenderUpdater2, renderer: renderer2 };
4423
- }, []);
4541
+ const { onRenderUpdater, renderer } = useVirtualRenderer({
4542
+ brain,
4543
+ debugChannel
4544
+ });
4424
4545
  const getRenderItem = useLatest(renderItem);
4425
- (0, import_react25.useEffect)(() => {
4546
+ (0, import_react26.useEffect)(() => {
4426
4547
  const renderRange = brain.getRenderRange();
4427
4548
  renderer.renderRange(renderRange, {
4428
4549
  renderItem,
4429
4550
  force: true,
4430
4551
  onRender: onRenderUpdater
4431
4552
  });
4432
- }, [renderItem, onRenderUpdater]);
4433
- (0, import_react25.useEffect)(() => {
4553
+ }, [brain, renderItem, onRenderUpdater]);
4554
+ (0, import_react26.useEffect)(() => {
4434
4555
  const remove = brain.onRenderRangeChange((renderRange) => {
4435
4556
  renderer.renderRange(renderRange, {
4436
4557
  force: false,
@@ -4440,12 +4561,6 @@ function RawListFn(props) {
4440
4561
  });
4441
4562
  return remove;
4442
4563
  }, [brain, onRenderUpdater]);
4443
- (0, import_react25.useEffect)(() => {
4444
- return () => {
4445
- renderer.destroy();
4446
- onRenderUpdater.destroy();
4447
- };
4448
- }, [renderer, onRenderUpdater]);
4449
4564
  return /* @__PURE__ */ React17.createElement(AvoidReactDiff, {
4450
4565
  updater: onRenderUpdater
4451
4566
  });
@@ -4463,7 +4578,7 @@ function InfiniteTableHeaderFn(props) {
4463
4578
  componentState: { headerHeight }
4464
4579
  } = useInfiniteTable();
4465
4580
  const { computedVisibleColumnsMap } = computed;
4466
- const renderColumn = (0, import_react26.useCallback)(({ domRef: domRef2, itemIndex: columnIndex }) => {
4581
+ const renderColumn = (0, import_react27.useCallback)(({ domRef: domRef2, itemIndex: columnIndex }) => {
4467
4582
  const column = columns[columnIndex];
4468
4583
  if (!column) {
4469
4584
  if (true) {
@@ -4478,14 +4593,14 @@ function InfiniteTableHeaderFn(props) {
4478
4593
  columns: computedVisibleColumnsMap
4479
4594
  });
4480
4595
  }, [computedVisibleColumnsMap, columns, repaintId, headerHeight]);
4481
- (0, import_react26.useEffect)(() => {
4596
+ (0, import_react27.useEffect)(() => {
4482
4597
  const onScroll = (scrollPosition) => {
4483
4598
  domRef.current.style.transform = `translate3d(-${scrollPosition.scrollLeft}px, 0px, 0px)`;
4484
4599
  };
4485
4600
  const removeOnScroll = brain.onScroll(onScroll);
4486
4601
  return removeOnScroll;
4487
4602
  }, [brain]);
4488
- const domRef = (0, import_react26.useRef)(null);
4603
+ const domRef = (0, import_react27.useRef)(null);
4489
4604
  const headerCls = HeaderClsRecipe({
4490
4605
  pinned: pinning,
4491
4606
  overflow: false,
@@ -4677,7 +4792,7 @@ function renderColumnHeaderGroups(config) {
4677
4792
  }
4678
4793
 
4679
4794
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderUnvirtualized.tsx
4680
- var import_react27 = __toModule(require("react"));
4795
+ var import_react28 = __toModule(require("react"));
4681
4796
  var { rootClassName: rootClassName5 } = internalProps;
4682
4797
  var TableHeaderClassName2 = `${rootClassName5}Header`;
4683
4798
  var UPDATE_SCROLL = (node, scrollPosition) => {
@@ -4743,7 +4858,7 @@ function InfiniteTableHeaderUnvirtualizedFn(props) {
4743
4858
  if (totalWidth != null) {
4744
4859
  style.width = availableWidth;
4745
4860
  }
4746
- (0, import_react27.useEffect)(() => {
4861
+ (0, import_react28.useEffect)(() => {
4747
4862
  const scroller = brain || scrollListener;
4748
4863
  if (!scroller || !scrollable) {
4749
4864
  return;
@@ -4857,12 +4972,12 @@ function TableHeaderWrapper(props) {
4857
4972
 
4858
4973
  // src/components/VirtualScrollContainer/index.tsx
4859
4974
  var React23 = __toModule(require("react"));
4860
- var import_react29 = __toModule(require("react"));
4975
+ var import_react30 = __toModule(require("react"));
4861
4976
 
4862
4977
  // src/components/hooks/useOnScroll.ts
4863
- var import_react28 = __toModule(require("react"));
4978
+ var import_react29 = __toModule(require("react"));
4864
4979
  var useOnScroll = (domRef, onScroll) => {
4865
- (0, import_react28.useEffect)(() => {
4980
+ (0, import_react29.useEffect)(() => {
4866
4981
  const domNode = domRef == null ? void 0 : domRef.current;
4867
4982
  const scrollFn = (event) => {
4868
4983
  const node = event.target;
@@ -4908,7 +5023,7 @@ var VirtualScrollContainer = React23.forwardRef(function VirtualScrollContainer2
4908
5023
  className,
4909
5024
  style
4910
5025
  } = props;
4911
- const domRef = ref != null ? ref : (0, import_react29.useRef)(null);
5026
+ const domRef = ref != null ? ref : (0, import_react30.useRef)(null);
4912
5027
  useOnScroll(domRef, onContainerScroll);
4913
5028
  return /* @__PURE__ */ React23.createElement("div", {
4914
5029
  ref: domRef,
@@ -4939,18 +5054,18 @@ function SpacePlaceholderFn(props) {
4939
5054
  var SpacePlaceholder = React24.memo(SpacePlaceholderFn);
4940
5055
 
4941
5056
  // src/components/InfiniteTable/hooks/useListRendering.tsx
4942
- var import_react40 = __toModule(require("react"));
5057
+ var import_react41 = __toModule(require("react"));
4943
5058
 
4944
5059
  // src/components/InfiniteTable/hooks/useUnpinnedRendering.tsx
4945
5060
  var React30 = __toModule(require("react"));
4946
- var import_react33 = __toModule(require("react"));
5061
+ var import_react34 = __toModule(require("react"));
4947
5062
 
4948
5063
  // src/components/VirtualList/VirtualRowList.tsx
4949
5064
  var React26 = __toModule(require("react"));
4950
5065
 
4951
5066
  // src/components/VirtualList/VirtualList.tsx
4952
5067
  var React25 = __toModule(require("react"));
4953
- var import_react30 = __toModule(require("react"));
5068
+ var import_react31 = __toModule(require("react"));
4954
5069
 
4955
5070
  // src/components/VirtualList/VirtualList.css.ts
4956
5071
  var VirtualListCls = "mlx2t0 _16lm1iw0";
@@ -4993,11 +5108,11 @@ var VirtualList = (props) => {
4993
5108
  "onContainerScroll",
4994
5109
  "children"
4995
5110
  ]);
4996
- const domRef = (0, import_react30.useRef)(null);
5111
+ const domRef = (0, import_react31.useRef)(null);
4997
5112
  const [, rerender] = useRerender();
4998
- const [totalSize, setTotalSize] = (0, import_react30.useState)(0);
4999
- const renderCountRef = (0, import_react30.useRef)(0);
5000
- (0, import_react30.useEffect)(() => {
5113
+ const [totalSize, setTotalSize] = (0, import_react31.useState)(0);
5114
+ const renderCountRef = (0, import_react31.useRef)(0);
5115
+ (0, import_react31.useEffect)(() => {
5001
5116
  const removeOnRenderCount = virtualBrain.onRenderCountChange((renderCount) => {
5002
5117
  renderCountRef.current = renderCount;
5003
5118
  if (true) {
@@ -5016,7 +5131,7 @@ var VirtualList = (props) => {
5016
5131
  removeOnTotalSizeChange();
5017
5132
  };
5018
5133
  }, [virtualBrain]);
5019
- (0, import_react30.useEffect)(() => {
5134
+ (0, import_react31.useEffect)(() => {
5020
5135
  const onScroll = (scrollPosition) => {
5021
5136
  UPDATE_SCROLL2(domRef.current, scrollPosition);
5022
5137
  };
@@ -5042,7 +5157,7 @@ var VirtualList = (props) => {
5042
5157
  brain: virtualBrain,
5043
5158
  renderItem,
5044
5159
  repaintId,
5045
- debugChannel: "VirtualList"
5160
+ debugChannel: "VirtualList-" + mainAxis
5046
5161
  })), children, /* @__PURE__ */ React25.createElement(SpacePlaceholder, {
5047
5162
  count,
5048
5163
  width,
@@ -5070,7 +5185,7 @@ var VirtualRowList = (props) => {
5070
5185
 
5071
5186
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRow.tsx
5072
5187
  var React28 = __toModule(require("react"));
5073
- var import_react32 = __toModule(require("react"));
5188
+ var import_react33 = __toModule(require("react"));
5074
5189
 
5075
5190
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableColumnCell.tsx
5076
5191
  var React27 = __toModule(require("react"));
@@ -5174,7 +5289,7 @@ function InfiniteTableColumnCellFn(props) {
5174
5289
  var InfiniteTableColumnCell = React27.memo(InfiniteTableColumnCellFn);
5175
5290
 
5176
5291
  // src/components/InfiniteTable/components/InfiniteTableRow/useRowDOMProps.ts
5177
- var import_react31 = __toModule(require("react"));
5292
+ var import_react32 = __toModule(require("react"));
5178
5293
 
5179
5294
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRowClassName.ts
5180
5295
  var { rootClassName: rootClassName9 } = internalProps;
@@ -5199,8 +5314,8 @@ function useRowDOMProps(props, rowProps, rowStyle, rowClassName, groupRenderStra
5199
5314
  domRef: domRefFromProps,
5200
5315
  rowInfo
5201
5316
  } = props;
5202
- const domRef = (0, import_react31.useRef)(null);
5203
- const rowDOMRef = (0, import_react31.useCallback)((node) => {
5317
+ const domRef = (0, import_react32.useRef)(null);
5318
+ const rowDOMRef = (0, import_react32.useCallback)((node) => {
5204
5319
  domRefFromProps(node);
5205
5320
  domRef.current = node;
5206
5321
  }, []);
@@ -5232,7 +5347,7 @@ function useRowDOMProps(props, rowProps, rowStyle, rowClassName, groupRenderStra
5232
5347
  }), `${InfiniteTableRowClassName}--${rowInfo.isGroupRow ? "group" : "normal"}-row`, inlineGroupRoot ? `${InfiniteTableRowClassName}--inline-group-row` : "", showZebraRows ? `${InfiniteTableRowClassName}--${odd ? "odd" : "even"}` : null, showHoverRows ? `${InfiniteTableRowClassName}--show-hover` : null, domProps == null ? void 0 : domProps.className, rowProps == null ? void 0 : rowProps.className, rowComputedClassName);
5233
5348
  const initialMouseEnter = rowProps == null ? void 0 : rowProps.onMouseEnter;
5234
5349
  const initialMouseLeave = rowProps == null ? void 0 : rowProps.onMouseLeave;
5235
- const onMouseEnter = (0, import_react31.useCallback)((event) => {
5350
+ const onMouseEnter = (0, import_react32.useCallback)((event) => {
5236
5351
  var _a;
5237
5352
  initialMouseEnter == null ? void 0 : initialMouseEnter(event);
5238
5353
  const rowIndex2 = ((_a = event.currentTarget) == null ? void 0 : _a.dataset.rowIndex) * 1;
@@ -5246,7 +5361,7 @@ function useRowDOMProps(props, rowProps, rowStyle, rowClassName, groupRenderStra
5246
5361
  const rows = parentNode.querySelectorAll(hoverSelector.join(","));
5247
5362
  rows.forEach((row) => row.classList.add(InfiniteTableRowClassName__hover, RowHoverCls));
5248
5363
  }, [initialMouseEnter, showHoverRows]);
5249
- const onMouseLeave = (0, import_react31.useCallback)((event) => {
5364
+ const onMouseLeave = (0, import_react32.useCallback)((event) => {
5250
5365
  var _a;
5251
5366
  initialMouseLeave == null ? void 0 : initialMouseLeave(event);
5252
5367
  const rowIndex2 = (_a = event.currentTarget) == null ? void 0 : _a.dataset.rowIndex;
@@ -5260,7 +5375,7 @@ function useRowDOMProps(props, rowProps, rowStyle, rowClassName, groupRenderStra
5260
5375
  const rows = parentNode.querySelectorAll(hoverSelector.join(","));
5261
5376
  rows.forEach((row) => row.classList.remove(InfiniteTableRowClassName__hover, RowHoverCls));
5262
5377
  }, [initialMouseLeave, showHoverRows]);
5263
- if (rowInfo.isGroupRow && groupRenderStrategy === "single-column") {
5378
+ if (rowInfo.isGroupRow) {
5264
5379
  style = style || {};
5265
5380
  style[stripVar(ThemeVars.components.Row.groupNesting)] = rowInfo.groupNesting - 1;
5266
5381
  }
@@ -5302,7 +5417,7 @@ function InfiniteTableRowFn(props) {
5302
5417
  width: rowWidth,
5303
5418
  height: rowHeight
5304
5419
  }, domProps.style);
5305
- const renderCellRef = (0, import_react32.useRef)(null);
5420
+ const renderCellRef = (0, import_react33.useRef)(null);
5306
5421
  const renderCell = React28.useCallback(({ domRef, itemIndex }) => {
5307
5422
  const column = columns[itemIndex];
5308
5423
  if (!column) {
@@ -5406,7 +5521,7 @@ function useUnpinnedRendering(params) {
5406
5521
  } = params;
5407
5522
  const { virtualizeColumns } = getState();
5408
5523
  const shouldVirtualizeColumns = typeof virtualizeColumns === "function" ? virtualizeColumns(computedUnpinnedColumns) : virtualizeColumns != null ? virtualizeColumns : true;
5409
- const renderRowUnpinned = (0, import_react33.useCallback)((rowParams) => {
5524
+ const renderRowUnpinned = (0, import_react34.useCallback)((rowParams) => {
5410
5525
  const dataArray = getData();
5411
5526
  const rowInfo = dataArray[rowParams.rowIndex];
5412
5527
  const { showZebraRows, showHoverRows } = getState();
@@ -5472,16 +5587,17 @@ function useUnpinnedRendering(params) {
5472
5587
  }
5473
5588
 
5474
5589
  // src/components/InfiniteTable/hooks/useOnContainerScroll.ts
5475
- var import_react34 = __toModule(require("react"));
5590
+ var import_react35 = __toModule(require("react"));
5476
5591
 
5477
5592
  // src/components/InfiniteTable/InfiniteCls.css.ts
5593
+ var import_createRuntimeFn4 = __toModule(require_vanilla_extract_recipes_createRuntimeFn_cjs());
5478
5594
  var FooterCls = "_16lm1iw1";
5479
- var InfiniteCls = "_1yeub2v0 _16lm1iw1 _16lm1iwh _16lm1iwx _16lm1iw0";
5480
- var InfiniteClsRecipe = createRuntimeFn({ defaultClassName: "", variantClassNames: { focused: { true: "_1yeub2v2", false: "_1yeub2v3" }, focusedWithin: { true: "_1yeub2v4", false: "_1yeub2v5" }, hasPinnedStart: { true: "_1yeub2v6", false: "_1yeub2v7" }, hasPinnedEnd: { true: "_1yeub2v8", false: "_1yeub2v9" }, hasPinnedStartOverflow: { true: "_1yeub2va", false: "_1yeub2vb" }, hasPinnedEndOverflow: { true: "_1yeub2vc", false: "_1yeub2vd" } }, defaultVariants: {}, compoundVariants: [] });
5595
+ var InfiniteCls = "_1yeub2v0 _16lm1iw1 _16lm1iwj _16lm1iwz _16lm1iw0";
5596
+ var InfiniteClsRecipe = (0, import_createRuntimeFn4.createRuntimeFn)({ defaultClassName: "", variantClassNames: { focused: { true: "_1yeub2v2", false: "_1yeub2v3" }, focusedWithin: { true: "_1yeub2v4", false: "_1yeub2v5" }, hasPinnedStart: { true: "_1yeub2v6", false: "_1yeub2v7" }, hasPinnedEnd: { true: "_1yeub2v8", false: "_1yeub2v9" }, hasPinnedStartOverflow: { true: "_1yeub2va", false: "_1yeub2vb" }, hasPinnedEndOverflow: { true: "_1yeub2vc", false: "_1yeub2vd" } }, defaultVariants: {}, compoundVariants: [] });
5481
5597
  var InfiniteClsScrolling = "_1yeub2v1";
5482
- var InfiniteClsShiftingColumns = "_16lm1iwk";
5598
+ var InfiniteClsShiftingColumns = "_16lm1iwm";
5483
5599
  var PinnedRowsClsVariants = { pinnedStart: "_1yeub2ve", pinnedEnd: "_1yeub2vf", overflow: "_1yeub2vg" };
5484
- var PinnedRowsContainerClsVariants = createRuntimeFn({ defaultClassName: "", variantClassNames: { pinned: { start: "_1yeub2vh", end: "_1yeub2vi", false: "_1yeub2vj" } }, defaultVariants: {}, compoundVariants: [] });
5600
+ var PinnedRowsContainerClsVariants = (0, import_createRuntimeFn4.createRuntimeFn)({ defaultClassName: "", variantClassNames: { pinned: { start: "_1yeub2vh", end: "_1yeub2vi", false: "_1yeub2vj" } }, defaultVariants: {}, compoundVariants: [] });
5485
5601
 
5486
5602
  // src/components/InfiniteTable/hooks/useOnContainerScroll.ts
5487
5603
  var DELAY = 200;
@@ -5503,14 +5619,14 @@ var useOnContainerScroll = ({
5503
5619
  bodySize
5504
5620
  }
5505
5621
  } = useInfiniteTable();
5506
- const timeoutIdRef = (0, import_react34.useRef)(0);
5507
- const scrollingRef = (0, import_react34.useRef)(false);
5508
- const scrollTopMaxRef = (0, import_react34.useRef)(0);
5509
- (0, import_react34.useEffect)(() => {
5622
+ const timeoutIdRef = (0, import_react35.useRef)(0);
5623
+ const scrollingRef = (0, import_react35.useRef)(false);
5624
+ const scrollTopMaxRef = (0, import_react35.useRef)(0);
5625
+ (0, import_react35.useEffect)(() => {
5510
5626
  const { current: node } = scrollerDOMRef;
5511
5627
  scrollTopMaxRef.current = node.scrollHeight - node.clientHeight;
5512
5628
  }, [reservedContentHeight, bodySize.height]);
5513
- const setScrolling = (0, import_react34.useCallback)((scrolling) => {
5629
+ const setScrolling = (0, import_react35.useCallback)((scrolling) => {
5514
5630
  var _a;
5515
5631
  const prevScrolling = scrollingRef.current;
5516
5632
  scrollingRef.current = scrolling;
@@ -5535,7 +5651,7 @@ var useOnContainerScroll = ({
5535
5651
  }
5536
5652
  }
5537
5653
  }, []);
5538
- const onContainerScroll = (0, import_react34.useCallback)((scrollInfo) => {
5654
+ const onContainerScroll = (0, import_react35.useCallback)((scrollInfo) => {
5539
5655
  verticalVirtualBrain.setScrollPosition(scrollInfo);
5540
5656
  horizontalVirtualBrain.setScrollPosition(scrollInfo);
5541
5657
  setScrolling(true);
@@ -5545,15 +5661,15 @@ var useOnContainerScroll = ({
5545
5661
  domRef.current,
5546
5662
  setScrolling
5547
5663
  ]);
5548
- const scrollPositionRef = (0, import_react34.useRef)({
5664
+ const scrollPositionRef = (0, import_react35.useRef)({
5549
5665
  scrollLeft: 0,
5550
5666
  scrollTop: 0
5551
5667
  });
5552
- const applyScrollHorizontal = (0, import_react34.useCallback)(({ scrollLeft }) => {
5668
+ const applyScrollHorizontal = (0, import_react35.useCallback)(({ scrollLeft }) => {
5553
5669
  scrollPositionRef.current.scrollLeft = scrollLeft;
5554
5670
  onContainerScroll(scrollPositionRef.current);
5555
5671
  }, [onContainerScroll]);
5556
- const applyScrollVertical = (0, import_react34.useCallback)(({ scrollTop }) => {
5672
+ const applyScrollVertical = (0, import_react35.useCallback)(({ scrollTop }) => {
5557
5673
  scrollPositionRef.current.scrollTop = scrollTop;
5558
5674
  onContainerScroll(scrollPositionRef.current);
5559
5675
  if (scrollTop === 0) {
@@ -5573,16 +5689,16 @@ var useOnContainerScroll = ({
5573
5689
 
5574
5690
  // src/components/InfiniteTable/hooks/usePinnedRendering.tsx
5575
5691
  var React32 = __toModule(require("react"));
5576
- var import_react37 = __toModule(require("react"));
5692
+ var import_react38 = __toModule(require("react"));
5577
5693
 
5578
5694
  // src/components/VirtualList/RowListWithExternalScrolling.tsx
5579
5695
  var React31 = __toModule(require("react"));
5580
- var import_react36 = __toModule(require("react"));
5696
+ var import_react37 = __toModule(require("react"));
5581
5697
 
5582
5698
  // src/components/hooks/useOnMount.ts
5583
- var import_react35 = __toModule(require("react"));
5699
+ var import_react36 = __toModule(require("react"));
5584
5700
  function useOnMount(domRef, props) {
5585
- (0, import_react35.useEffect)(() => {
5701
+ (0, import_react36.useEffect)(() => {
5586
5702
  const { onMount, onUnmount } = props;
5587
5703
  const node = domRef == null ? void 0 : domRef.current;
5588
5704
  onMount == null ? void 0 : onMount(node);
@@ -5600,7 +5716,7 @@ var rootClassName10 = InfiniteListRootClassName;
5600
5716
  var defaultClasses = [
5601
5717
  willChange.transform,
5602
5718
  position.relative,
5603
- transformTranslateZero
5719
+ transform.translateZero
5604
5720
  ];
5605
5721
  var RowListWithExternalScrolling = (props) => {
5606
5722
  const {
@@ -5613,8 +5729,8 @@ var RowListWithExternalScrolling = (props) => {
5613
5729
  onMount,
5614
5730
  onUnmount
5615
5731
  } = props;
5616
- const domRef = (0, import_react36.useRef)(null);
5617
- const renderItem = (0, import_react36.useCallback)((renderProps) => renderRow({
5732
+ const domRef = (0, import_react37.useRef)(null);
5733
+ const renderItem = (0, import_react37.useCallback)((renderProps) => renderRow({
5618
5734
  domRef: renderProps.domRef,
5619
5735
  rowHeight: renderProps.itemSize,
5620
5736
  rowIndex: renderProps.itemIndex
@@ -5623,7 +5739,7 @@ var RowListWithExternalScrolling = (props) => {
5623
5739
  onMount,
5624
5740
  onUnmount
5625
5741
  });
5626
- (0, import_react36.useEffect)(() => {
5742
+ (0, import_react37.useEffect)(() => {
5627
5743
  const onScroll = (scrollPosition) => {
5628
5744
  const node = domRef.current;
5629
5745
  if (node) {
@@ -5690,7 +5806,7 @@ function PinnedRowsContainer(props) {
5690
5806
  }
5691
5807
  return result;
5692
5808
  }, [height, rowWidth, pinning, hasOverflow]);
5693
- const updateScroll = (0, import_react37.useCallback)((node, scrollPosition) => {
5809
+ const updateScroll = (0, import_react38.useCallback)((node, scrollPosition) => {
5694
5810
  UPDATE_SCROLL3(node, scrollPosition, hasOverflow ? pinnedScrollListener.getScrollPosition() : void 0);
5695
5811
  }, [hasOverflow, pinnedScrollListener]);
5696
5812
  const rowListProps = {
@@ -5732,7 +5848,7 @@ function PinnedRowsContainer(props) {
5732
5848
  }
5733
5849
  function useRenderPinnedRow(params) {
5734
5850
  const { getData, getState, columnsWidth, columns, verticalBrain } = params;
5735
- const renderPinnedRow = (0, import_react37.useCallback)((rowParams) => {
5851
+ const renderPinnedRow = (0, import_react38.useCallback)((rowParams) => {
5736
5852
  const dataArray = getData();
5737
5853
  const rowInfo = dataArray[rowParams.rowIndex];
5738
5854
  const { showZebraRows, showHoverRows } = getState();
@@ -5846,7 +5962,7 @@ function usePinnedStartRendering(params) {
5846
5962
  }
5847
5963
 
5848
5964
  // src/components/InfiniteTable/hooks/useYourBrain.ts
5849
- var import_react39 = __toModule(require("react"));
5965
+ var import_react40 = __toModule(require("react"));
5850
5966
 
5851
5967
  // src/components/VirtualBrain/index.ts
5852
5968
  var import_binary_search2 = __toModule(require_binary_search());
@@ -5862,11 +5978,13 @@ var VirtualBrain = class extends Logger {
5862
5978
  super(`VirtualBrain:${options.mainAxis}`);
5863
5979
  this.scrollPosition = initialScrollPosition2;
5864
5980
  this.scrollPositionOnMainAxis = 0;
5981
+ this.destroyed = false;
5865
5982
  this.totalSize = 0;
5866
5983
  this.onScrollFns = [];
5867
5984
  this.onTotalSizeChangeFns = [];
5868
5985
  this.onRenderCountChangeFns = [];
5869
5986
  this.onRenderRangeChangeFns = [];
5987
+ this.onDestroyFns = [];
5870
5988
  this.renderCount = 0;
5871
5989
  this.renderRange = {
5872
5990
  renderStartIndex: -1,
@@ -5963,6 +6081,12 @@ var VirtualBrain = class extends Logger {
5963
6081
  this.onRenderRangeChangeFns = this.onRenderRangeChangeFns.filter((f) => f !== fn);
5964
6082
  };
5965
6083
  };
6084
+ this.onDestroy = (fn) => {
6085
+ this.onDestroyFns.push(fn);
6086
+ return () => {
6087
+ this.onDestroyFns = this.onDestroyFns.filter((f) => f !== fn);
6088
+ };
6089
+ };
5966
6090
  this.update = (newCount, newItemSize, newItemSpan) => {
5967
6091
  const { itemSize, count, itemSpan } = this.options;
5968
6092
  const countChange = count !== newCount;
@@ -6159,7 +6283,13 @@ var VirtualBrain = class extends Logger {
6159
6283
  return result;
6160
6284
  };
6161
6285
  this.destroy = () => {
6286
+ if (this.destroyed) {
6287
+ return;
6288
+ }
6289
+ this.notifyDestroy();
6162
6290
  this.reset();
6291
+ this.destroyed = true;
6292
+ this.onDestroyFns = [];
6163
6293
  this.onScrollFns = [];
6164
6294
  this.onTotalSizeChangeFns = [];
6165
6295
  this.onRenderCountChangeFns = [];
@@ -6195,6 +6325,12 @@ var VirtualBrain = class extends Logger {
6195
6325
  fns[i](scrollPosition);
6196
6326
  }
6197
6327
  }
6328
+ notifyDestroy() {
6329
+ const fns = this.onDestroyFns;
6330
+ for (let i = 0, len = fns.length; i < len; i++) {
6331
+ fns[i]();
6332
+ }
6333
+ }
6198
6334
  notifyTotalSizeChange() {
6199
6335
  const totalSize = this.getTotalSize();
6200
6336
  const fns = this.onTotalSizeChangeFns;
@@ -6264,9 +6400,9 @@ var VirtualBrain = class extends Logger {
6264
6400
  };
6265
6401
 
6266
6402
  // src/components/InfiniteTable/hooks/useColumnSizeFn.ts
6267
- var import_react38 = __toModule(require("react"));
6403
+ var import_react39 = __toModule(require("react"));
6268
6404
  function useColumnSizeFn(computedUnpinnedColumns) {
6269
- const columnSize = (0, import_react38.useCallback)((index) => {
6405
+ const columnSize = (0, import_react39.useCallback)((index) => {
6270
6406
  const column = computedUnpinnedColumns[index];
6271
6407
  if (!column) {
6272
6408
  console.log("cannot find column at index", index, computedUnpinnedColumns);
@@ -6305,16 +6441,21 @@ function useYourBrain(param) {
6305
6441
  });
6306
6442
  return brain;
6307
6443
  });
6444
+ (0, import_react40.useEffect)(() => {
6445
+ return () => {
6446
+ horizontalVirtualBrain.destroy();
6447
+ verticalVirtualBrain.destroy();
6448
+ };
6449
+ }, []);
6308
6450
  horizontalVirtualBrain.update(computedUnpinnedColumns.length, columnSize);
6309
6451
  verticalVirtualBrain.update(dataArray.length, rowHeight, rowSpan);
6310
- globalThis.verticalVirtualBrain = verticalVirtualBrain;
6311
- (0, import_react39.useEffect)(() => {
6452
+ (0, import_react40.useEffect)(() => {
6312
6453
  verticalVirtualBrain.setAvailableSize({
6313
6454
  height: bodySize.height,
6314
6455
  width: 0
6315
6456
  });
6316
6457
  }, [bodySize, verticalVirtualBrain]);
6317
- (0, import_react39.useEffect)(() => {
6458
+ (0, import_react40.useEffect)(() => {
6318
6459
  horizontalVirtualBrain.setAvailableSize({
6319
6460
  height: 0,
6320
6461
  width: Math.max(bodySize.width - computedPinnedStartWidth - computedPinnedEndWidth, 0)
@@ -6375,12 +6516,12 @@ function useListRendering(param) {
6375
6516
  pinnedEndScrollListener
6376
6517
  } = componentState;
6377
6518
  const prevDataSourceTimestamp = usePrevious(dataSourceState.updatedAt);
6378
- const repaintIdRef = (0, import_react40.useRef)(0);
6519
+ const repaintIdRef = (0, import_react41.useRef)(0);
6379
6520
  if (!shallowEqualObjects(prevComputed, computed) || prevDataSourceTimestamp !== dataSourceState.updatedAt) {
6380
6521
  repaintIdRef.current++;
6381
6522
  }
6382
6523
  const repaintId = repaintIdRef.current;
6383
- const rowSpan = (0, import_react40.useMemo)(() => {
6524
+ const rowSpan = (0, import_react41.useMemo)(() => {
6384
6525
  const colsWithRowspan = computedVisibleColumns.filter((col) => typeof col.rowspan === "function");
6385
6526
  return colsWithRowspan.length ? ({ itemIndex }) => {
6386
6527
  let maxSpan = 1;
@@ -6418,11 +6559,11 @@ function useListRendering(param) {
6418
6559
  const hasHorizontalScrollbar = computedUnpinnedColumnsWidth > bodySize.width - computedPinnedStartColumnsWidth - computedPinnedEndColumnsWidth;
6419
6560
  const reservedContentHeight = verticalVirtualBrain.getTotalSize() + (hasHorizontalScrollbar ? getScrollbarWidth() : 0);
6420
6561
  const hasVerticalScrollbar = bodySize.height < reservedContentHeight;
6421
- const scrollbars = (0, import_react40.useMemo)(() => ({
6562
+ const scrollbars = (0, import_react41.useMemo)(() => ({
6422
6563
  vertical: hasVerticalScrollbar,
6423
6564
  horizontal: hasHorizontalScrollbar
6424
6565
  }), [hasVerticalScrollbar, hasHorizontalScrollbar]);
6425
- (0, import_react40.useEffect)(() => {
6566
+ (0, import_react41.useEffect)(() => {
6426
6567
  if (!bodySize.height) {
6427
6568
  return;
6428
6569
  }
@@ -6448,7 +6589,7 @@ function useListRendering(param) {
6448
6589
  reservedContentHeight
6449
6590
  });
6450
6591
  const { componentActions: dataSourceActions } = useDataSourceContextValue();
6451
- const toggleGroupRow = (0, import_react40.useCallback)((groupKeys) => {
6592
+ const toggleGroupRow = (0, import_react41.useCallback)((groupKeys) => {
6452
6593
  const newState = new GroupRowsState(getDataSourceState().groupRowsState);
6453
6594
  newState.toggleGroupRow(groupKeys);
6454
6595
  dataSourceActions.groupRowsState = newState;
@@ -6483,7 +6624,7 @@ function useListRendering(param) {
6483
6624
  computedUnpinnedColumns
6484
6625
  });
6485
6626
  const [, rerender] = useRerender();
6486
- (0, import_react40.useEffect)(() => {
6627
+ (0, import_react41.useEffect)(() => {
6487
6628
  rerender();
6488
6629
  }, [dataSourceState]);
6489
6630
  const { pinnedStartList, pinnedStartScrollbarPlaceholder } = usePinnedStartRendering(pinnedRenderingParams);
@@ -6507,7 +6648,7 @@ function useListRendering(param) {
6507
6648
 
6508
6649
  // src/components/InfiniteTable/components/InfiniteTableLicenseFooter/index.tsx
6509
6650
  var React33 = __toModule(require("react"));
6510
- var import_react41 = __toModule(require("react"));
6651
+ var import_react42 = __toModule(require("react"));
6511
6652
 
6512
6653
  // src/components/utils/decamelize.ts
6513
6654
  var import_decamelize = __toModule(require_decamelize());
@@ -6557,7 +6698,7 @@ var InfiniteTableLicenseFooter = React33.forwardRef(function InfiniteTableLicens
6557
6698
  ref.current = node;
6558
6699
  }
6559
6700
  }, []);
6560
- (0, import_react41.useEffect)(() => {
6701
+ (0, import_react42.useEffect)(() => {
6561
6702
  const forceStyle = () => {
6562
6703
  requestAnimationFrame(() => {
6563
6704
  var _a;
@@ -6585,7 +6726,7 @@ var InfiniteTableLicenseFooter = React33.forwardRef(function InfiniteTableLicens
6585
6726
  });
6586
6727
 
6587
6728
  // src/components/InfiniteTable/hooks/useLicense/useLicense.ts
6588
- var import_react42 = __toModule(require("react"));
6729
+ var import_react43 = __toModule(require("react"));
6589
6730
 
6590
6731
  // src/components/InfiniteTable/hooks/useLicense/crc32.ts
6591
6732
  var DEFAULT_ReversedPolynomial = 3988292384;
@@ -6735,10 +6876,10 @@ var origin = typeof window !== "undefined" ? window.location.origin : "";
6735
6876
  var [_fullUrl, protocol, sandboxUrl] = Array.from(SANDBOX_REGEX.exec(origin) || []);
6736
6877
  var isInsideSandbox = protocol === "https" && sandboxUrl === "sandpack.codesandbox.io";
6737
6878
  var useLicense = (licenseKey) => {
6738
- const valid = (0, import_react42.useMemo)(() => {
6879
+ const valid = (0, import_react43.useMemo)(() => {
6739
6880
  let valid2 = isValidLicense(licenseKey, {
6740
6881
  publishedAt: 1624970570587,
6741
- version: "0.0.3"
6882
+ version: "0.0.7"
6742
6883
  });
6743
6884
  if (!licenseKey && !valid2 && isInsideSandbox) {
6744
6885
  return true;
@@ -6750,7 +6891,7 @@ var useLicense = (licenseKey) => {
6750
6891
 
6751
6892
  // src/components/CSSVariableWatch.tsx
6752
6893
  var React34 = __toModule(require("react"));
6753
- var import_react43 = __toModule(require("react"));
6894
+ var import_react44 = __toModule(require("react"));
6754
6895
  var error2 = err("CSSVariableWatch");
6755
6896
  var debug5 = dbg("CSSVariableWatch");
6756
6897
  var WRAPPER_STYLE = {
@@ -6763,7 +6904,7 @@ var WRAPPER_STYLE = {
6763
6904
  overflow: "hidden"
6764
6905
  };
6765
6906
  var useCSSVariableWatch = (params) => {
6766
- const lastValueRef = (0, import_react43.useRef)(0);
6907
+ const lastValueRef = (0, import_react44.useRef)(0);
6767
6908
  const onResize = React34.useCallback(({ height }) => {
6768
6909
  if (height && height !== lastValueRef.current) {
6769
6910
  lastValueRef.current = height;
@@ -6783,7 +6924,7 @@ var useCSSVariableWatch = (params) => {
6783
6924
  }, []);
6784
6925
  };
6785
6926
  var CSSVariableWatch = (props) => {
6786
- const domRef = (0, import_react43.useRef)(null);
6927
+ const domRef = (0, import_react44.useRef)(null);
6787
6928
  useCSSVariableWatch(__spreadProps(__spreadValues({}, props), {
6788
6929
  ref: domRef
6789
6930
  }));
@@ -6887,8 +7028,8 @@ function useDOMProps(initialDOMProps) {
6887
7028
  var React35 = __toModule(require("react"));
6888
7029
 
6889
7030
  // src/components/InfiniteTable/components/LoadMask.css.ts
6890
- var LoadMaskCls = { visible: "qy58ya1 qy58ya0 _16lm1iw2 _16lm1iwp _16lm1iwr _16lm1iwv _16lm1iwt", hidden: "qy58ya2 qy58ya0 _16lm1iw2 _16lm1iwp _16lm1iwr _16lm1iwv _16lm1iwt" };
6891
- var LoadMaskOverlayCls = "qy58ya3 _16lm1iw2 _16lm1iwp _16lm1iwr _16lm1iwv _16lm1iwt";
7031
+ var LoadMaskCls = { visible: "qy58ya1 qy58ya0 _16lm1iw2 _16lm1iwr _16lm1iwt _16lm1iwx _16lm1iwv", hidden: "qy58ya2 qy58ya0 _16lm1iw2 _16lm1iwr _16lm1iwt _16lm1iwx _16lm1iwv" };
7032
+ var LoadMaskOverlayCls = "qy58ya3 _16lm1iw2 _16lm1iwr _16lm1iwt _16lm1iwx _16lm1iwv";
6892
7033
  var LoadMaskTextCls = "qy58ya4";
6893
7034
 
6894
7035
  // src/components/InfiniteTable/components/LoadMask.tsx