@infinite-table/infinite-react 10.1.4 → 10.2.0

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.dev.js CHANGED
@@ -1283,6 +1283,9 @@ var WRAPPER_STYLE = {
1283
1283
  fontSize: 0,
1284
1284
  overflow: "hidden"
1285
1285
  };
1286
+ function toWatchedCSSValue(varName) {
1287
+ return varName.startsWith("var(") || varName.startsWith("calc(") ? varName : `var(${varName})`;
1288
+ }
1286
1289
 
1287
1290
  // src/components/CSSNumericVariableWatch/index.tsx
1288
1291
  var useCSSVariableWatch = (params) => {
@@ -1316,7 +1319,7 @@ var CSSNumericVariableWatch = (props) => {
1316
1319
  ...props,
1317
1320
  ref: domRef
1318
1321
  });
1319
- const height2 = props.varName.startsWith("var(") ? props.varName : `var(${props.varName})`;
1322
+ const height2 = toWatchedCSSValue(props.varName);
1320
1323
  const { allowInts = false } = props;
1321
1324
  return /* @__PURE__ */ React2.createElement(
1322
1325
  "div",
@@ -1595,6 +1598,7 @@ var DevToolsTracks = {
1595
1598
  };
1596
1599
 
1597
1600
  // src/utils/devTools/index.ts
1601
+ var MEASURE_NAME_PREFIX = "\u200B";
1598
1602
  var DevToolsMarker = class _DevToolsMarker {
1599
1603
  constructor(debugId) {
1600
1604
  this.debugId = debugId;
@@ -1632,7 +1636,8 @@ var DevToolsMarker = class _DevToolsMarker {
1632
1636
  const tooltip = markerDetails.tooltip || this.markerDetails.tooltip;
1633
1637
  const label = markerDetails.label || this.markerDetails.label || "Unknown";
1634
1638
  const track = markerDetails.track || this.markerDetails.track || "Unknown";
1635
- performance.measure(label, {
1639
+ const measureName = MEASURE_NAME_PREFIX + label;
1640
+ performance.measure(measureName, {
1636
1641
  start,
1637
1642
  end,
1638
1643
  detail: {
@@ -1646,6 +1651,7 @@ var DevToolsMarker = class _DevToolsMarker {
1646
1651
  }
1647
1652
  }
1648
1653
  });
1654
+ performance.clearMeasures(measureName);
1649
1655
  return this;
1650
1656
  };
1651
1657
  this.debugId = debugId;
@@ -2240,7 +2246,35 @@ function stripVar(cssVariableWithVarString) {
2240
2246
 
2241
2247
  // src/components/InfiniteTable/components/icons/Icon.tsx
2242
2248
  var React6 = __toESM(require("react"));
2249
+
2250
+ // src/components/InfiniteTable/components/icons/Icon.css.ts
2251
+ var IconCustomMaskCls = { expandCollapse: "_1jm33zv0", loading: "_1jm33zv1", done: "_1jm33zv2", clear: "_1jm33zv3", hidden: "_1jm33zv4", filterOperatorContains: "_1jm33zv5", filterOperatorStartsWith: "_1jm33zv6", filterOperatorEndsWith: "_1jm33zv7", filterOperatorEq: "_1jm33zv8", filterOperatorNeq: "_1jm33zv9", filterOperatorGt: "_1jm33zva", filterOperatorGte: "_1jm33zvb", filterOperatorLt: "_1jm33zvc", filterOperatorLte: "_1jm33zvd" };
2252
+ var LoadingIconSpinWhenCustomCls = "_1jm33zvf";
2253
+
2254
+ // src/components/InfiniteTable/components/icons/customizableIcons.ts
2255
+ var CUSTOMIZABLE_ICONS = {
2256
+ expandCollapse: "expand-collapse",
2257
+ loading: "loading",
2258
+ done: "done",
2259
+ clear: "clear",
2260
+ hidden: "hidden",
2261
+ filterOperatorContains: "filter-operator-contains",
2262
+ filterOperatorStartsWith: "filter-operator-starts-with",
2263
+ filterOperatorEndsWith: "filter-operator-ends-with",
2264
+ filterOperatorEq: "filter-operator-eq",
2265
+ filterOperatorNeq: "filter-operator-neq",
2266
+ filterOperatorGt: "filter-operator-gt",
2267
+ filterOperatorGte: "filter-operator-gte",
2268
+ filterOperatorLt: "filter-operator-lt",
2269
+ filterOperatorLte: "filter-operator-lte"
2270
+ };
2271
+
2272
+ // src/components/InfiniteTable/components/icons/InfiniteIconClassName.ts
2273
+ var InfiniteIconClassName = "InfiniteIcon";
2274
+
2275
+ // src/components/InfiniteTable/components/icons/Icon.tsx
2243
2276
  var Icon = (props) => {
2277
+ const { icon, ...svgProps } = props;
2244
2278
  const size = props.size ?? `var(--infinite-icon-size)`;
2245
2279
  const style2 = {
2246
2280
  flex: "none",
@@ -2251,7 +2285,21 @@ var Icon = (props) => {
2251
2285
  };
2252
2286
  return (
2253
2287
  //@ts-ignore
2254
- /* @__PURE__ */ React6.createElement("svg", { viewBox: "0 0 24 24", ...props, style: style2 }, props.children)
2288
+ /* @__PURE__ */ React6.createElement(
2289
+ "svg",
2290
+ {
2291
+ viewBox: "0 0 24 24",
2292
+ ...svgProps,
2293
+ className: icon ? join(
2294
+ props.className,
2295
+ IconCustomMaskCls[icon],
2296
+ InfiniteIconClassName,
2297
+ `${InfiniteIconClassName}-${CUSTOMIZABLE_ICONS[icon]}`
2298
+ ) : props.className,
2299
+ style: style2
2300
+ },
2301
+ props.children
2302
+ )
2255
2303
  );
2256
2304
  };
2257
2305
 
@@ -2297,55 +2345,55 @@ var iconPaths = {
2297
2345
 
2298
2346
  // src/components/InfiniteTable/components/icons/IncludesOperatorIcon.tsx
2299
2347
  var IncludesOperatorIcon = (props) => {
2300
- return /* @__PURE__ */ React7.createElement(Icon, { ...props }, iconPaths.includesOperator.map((d) => /* @__PURE__ */ React7.createElement("path", { key: d, d })));
2348
+ return /* @__PURE__ */ React7.createElement(Icon, { ...props, icon: "filterOperatorContains" }, iconPaths.includesOperator.map((d) => /* @__PURE__ */ React7.createElement("path", { key: d, d })));
2301
2349
  };
2302
2350
 
2303
2351
  // src/components/InfiniteTable/components/icons/EndsWithOperatorIcon.tsx
2304
2352
  var React8 = __toESM(require("react"));
2305
2353
  var EndsWithOperatorIcon = (props) => {
2306
- return /* @__PURE__ */ React8.createElement(Icon, { ...props }, /* @__PURE__ */ React8.createElement("path", { d: iconPaths.endsWithOperator[0] }));
2354
+ return /* @__PURE__ */ React8.createElement(Icon, { ...props, icon: "filterOperatorEndsWith" }, /* @__PURE__ */ React8.createElement("path", { d: iconPaths.endsWithOperator[0] }));
2307
2355
  };
2308
2356
 
2309
2357
  // src/components/InfiniteTable/components/icons/EqualOperatorIcon.tsx
2310
2358
  var React9 = __toESM(require("react"));
2311
2359
  var EqualOperatorIcon = (props) => {
2312
- return /* @__PURE__ */ React9.createElement(Icon, { ...props }, /* @__PURE__ */ React9.createElement("path", { d: iconPaths.eqOperator[0] }));
2360
+ return /* @__PURE__ */ React9.createElement(Icon, { ...props, icon: "filterOperatorEq" }, /* @__PURE__ */ React9.createElement("path", { d: iconPaths.eqOperator[0] }));
2313
2361
  };
2314
2362
 
2315
2363
  // src/components/InfiniteTable/components/icons/GTEOperatorIcon.tsx
2316
2364
  var React10 = __toESM(require("react"));
2317
2365
  var GTEOperatorIcon = (props) => {
2318
- return /* @__PURE__ */ React10.createElement(Icon, { ...props }, /* @__PURE__ */ React10.createElement("path", { d: iconPaths.gteOperator[0] }));
2366
+ return /* @__PURE__ */ React10.createElement(Icon, { ...props, icon: "filterOperatorGte" }, /* @__PURE__ */ React10.createElement("path", { d: iconPaths.gteOperator[0] }));
2319
2367
  };
2320
2368
 
2321
2369
  // src/components/InfiniteTable/components/icons/GTOperatorIcon.tsx
2322
2370
  var React11 = __toESM(require("react"));
2323
2371
  var GTOperatorIcon = (props) => {
2324
- return /* @__PURE__ */ React11.createElement(Icon, { ...props }, /* @__PURE__ */ React11.createElement("path", { d: iconPaths.gtOperator[0] }));
2372
+ return /* @__PURE__ */ React11.createElement(Icon, { ...props, icon: "filterOperatorGt" }, /* @__PURE__ */ React11.createElement("path", { d: iconPaths.gtOperator[0] }));
2325
2373
  };
2326
2374
 
2327
2375
  // src/components/InfiniteTable/components/icons/LTEOperatorIcon.tsx
2328
2376
  var React12 = __toESM(require("react"));
2329
2377
  var LTEOperatorIcon = (props) => {
2330
- return /* @__PURE__ */ React12.createElement(Icon, { ...props }, /* @__PURE__ */ React12.createElement("path", { d: iconPaths.lteOperator[0] }));
2378
+ return /* @__PURE__ */ React12.createElement(Icon, { ...props, icon: "filterOperatorLte" }, /* @__PURE__ */ React12.createElement("path", { d: iconPaths.lteOperator[0] }));
2331
2379
  };
2332
2380
 
2333
2381
  // src/components/InfiniteTable/components/icons/LTOperatorIcon.tsx
2334
2382
  var React13 = __toESM(require("react"));
2335
2383
  var LTOperatorIcon = (props) => {
2336
- return /* @__PURE__ */ React13.createElement(Icon, { ...props }, /* @__PURE__ */ React13.createElement("path", { d: iconPaths.ltOperator[0] }));
2384
+ return /* @__PURE__ */ React13.createElement(Icon, { ...props, icon: "filterOperatorLt" }, /* @__PURE__ */ React13.createElement("path", { d: iconPaths.ltOperator[0] }));
2337
2385
  };
2338
2386
 
2339
2387
  // src/components/InfiniteTable/components/icons/NotEqualOperatorIcon.tsx
2340
2388
  var React14 = __toESM(require("react"));
2341
2389
  var NotEqualOperatorIcon = (props) => {
2342
- return /* @__PURE__ */ React14.createElement(Icon, { ...props }, /* @__PURE__ */ React14.createElement("path", { d: iconPaths.neqOperator[0] }));
2390
+ return /* @__PURE__ */ React14.createElement(Icon, { ...props, icon: "filterOperatorNeq" }, /* @__PURE__ */ React14.createElement("path", { d: iconPaths.neqOperator[0] }));
2343
2391
  };
2344
2392
 
2345
2393
  // src/components/InfiniteTable/components/icons/StartsWithOperatorIcon.tsx
2346
2394
  var React15 = __toESM(require("react"));
2347
2395
  var StartsWithOperatorIcon = (props) => {
2348
- return /* @__PURE__ */ React15.createElement(Icon, { ...props }, /* @__PURE__ */ React15.createElement("path", { d: iconPaths.startsWithOperator[0] }));
2396
+ return /* @__PURE__ */ React15.createElement(Icon, { ...props, icon: "filterOperatorStartsWith" }, /* @__PURE__ */ React15.createElement("path", { d: iconPaths.startsWithOperator[0] }));
2349
2397
  };
2350
2398
 
2351
2399
  // src/components/InfiniteTable/components/FilterEditors.tsx
@@ -2485,11 +2533,9 @@ var HeaderSortIconIndexCls = "_12zfob16";
2485
2533
  var HeaderSortIconRecipe = createRuntimeFn({ defaultClassName: "_12zfob12", variantClassNames: { align: { start: "_12zfob13", center: "_12zfob14", end: "_12zfob15" } }, defaultVariants: {}, compoundVariants: [] });
2486
2534
  var HeaderWrapperCls = "_12zfob12l _16lm1iw35 _16lm1iw1 _16lm1iw1p _16lm1iw2h";
2487
2535
 
2488
- // src/components/InfiniteTable/components/icons/InfiniteIconClassName.ts
2489
- var InfiniteIconClassName = "InfiniteIcon";
2490
-
2491
2536
  // src/components/InfiniteTable/components/icons/FilterIcon/FilterIcon.css.ts
2492
2537
  var FilterIconCls = "_1nnkya20 _16lm1iw1p _16lm1iw2f _16lm1iw1 _16lm1iw32 _16lm1iw2j";
2538
+ var FilterIconLineCls = "_1nnkya21";
2493
2539
 
2494
2540
  // src/components/InfiniteTable/components/icons/FilterIcon/shared.ts
2495
2541
  var defaultLineStyle = {
@@ -2558,9 +2604,27 @@ function FilterIcon(props) {
2558
2604
  },
2559
2605
  index
2560
2606
  ) : null,
2561
- /* @__PURE__ */ React16.createElement("div", { style: { width: sizes[0], ...lineStyle } }),
2562
- /* @__PURE__ */ React16.createElement("div", { style: { width: sizes[1], ...lineStyle } }),
2563
- /* @__PURE__ */ React16.createElement("div", { style: { width: sizes[2], ...lineStyle } })
2607
+ /* @__PURE__ */ React16.createElement(
2608
+ "div",
2609
+ {
2610
+ className: FilterIconLineCls,
2611
+ style: { width: sizes[0], ...lineStyle }
2612
+ }
2613
+ ),
2614
+ /* @__PURE__ */ React16.createElement(
2615
+ "div",
2616
+ {
2617
+ className: FilterIconLineCls,
2618
+ style: { width: sizes[1], ...lineStyle }
2619
+ }
2620
+ ),
2621
+ /* @__PURE__ */ React16.createElement(
2622
+ "div",
2623
+ {
2624
+ className: FilterIconLineCls,
2625
+ style: { width: sizes[2], ...lineStyle }
2626
+ }
2627
+ )
2564
2628
  );
2565
2629
  }
2566
2630
 
@@ -4250,7 +4314,7 @@ var InternalVars = { currentColumnTransformX: "var(--_16hkbkc0)", y: "var(--_16h
4250
4314
 
4251
4315
  // src/components/InfiniteTable/vars.css.ts
4252
4316
  var CSS_LOADED_VALUE = "true";
4253
- var ThemeVars = { loaded: "var(--infinite-loaded)", themeName: "var(--infinite-theme-name)", themeMode: "var(--infinite-theme-mode)", color: { accent: "var(--infinite-accent-color)", success: "var(--infinite-success-color)", error: "var(--infinite-error-color)", color: "var(--infinite-color)" }, spacing: { "0": "var(--infinite-space-0)", "1": "var(--infinite-space-1)", "2": "var(--infinite-space-2)", "3": "var(--infinite-space-3)", "4": "var(--infinite-space-4)", "5": "var(--infinite-space-5)", "6": "var(--infinite-space-6)", "7": "var(--infinite-space-7)", "8": "var(--infinite-space-8)", "9": "var(--infinite-space-9)", "10": "var(--infinite-space-10)" }, fontSize: { "0": "var(--infinite-font-size-0)", "1": "var(--infinite-font-size-1)", "2": "var(--infinite-font-size-2)", "3": "var(--infinite-font-size-3)", "4": "var(--infinite-font-size-4)", "5": "var(--infinite-font-size-5)", "6": "var(--infinite-font-size-6)", "7": "var(--infinite-font-size-7)" }, fontFamily: "var(--infinite-font-family)", minHeight: "var(--infinite-min-height)", borderRadius: "var(--infinite-border-radius)", focusOutline: "var(--infinite-focus-outline)", background: "var(--infinite-background)", iconSize: "var(--infinite-icon-size)", runtime: { bodyWidth: "var(--infinite-runtime-body-content-width)", totalVisibleColumnsWidthValue: "var(--infinite-runtime-total-visible-columns-width)", totalVisibleColumnsWidthVar: "var(--infinite-runtime-total-visible-columns-width-var)", visibleColumnsCount: "var(--infinite-runtime-visible-columns-count)", browserScrollbarWidth: "var(--infinite-runtime-browser-scrollbar-width)" }, components: { GroupingToolbar: { color: "var(--infinite-grouping-toolbar-color)", background: "var(--infinite-grouping-toolbar-background)", rejectBackground: "var(--infinite-grouping-toolbar-reject-background)", activeBackground: "var(--infinite-grouping-toolbar-active-background)", activeBackgroundAlpha: "var(--infinite-grouping-toolbar-active-background-alpha)", padding: "var(--infinite-grouping-toolbar-padding)", border: "var(--infinite-grouping-toolbar-border)", rejectBorder: "var(--infinite-grouping-toolbar-reject-border)", gap: "var(--infinite-grouping-toolbar-gap)" }, GroupingToolbarItem: { border: "var(--infinite-grouping-toolbar-item-border)", borderRadius: "var(--infinite-grouping-toolbar-item-border-radius)", activeBorder: "var(--infinite-grouping-toolbar-item-active-border)", background: "var(--infinite-grouping-toolbar-item-background)", activeBackground: "var(--infinite-grouping-toolbar-item-active-background)", activeBackgroundAlpha: "var(--infinite-grouping-toolbar-item-active-background-alpha)" }, LoadMask: { padding: "var(--infinite-load-mask-padding)", color: "var(--infinite-load-mask-color)", textBackground: "var(--infinite-load-mask-text-background)", overlayBackground: "var(--infinite-load-mask-overlay-background)", overlayOpacity: "var(--infinite-load-mask-overlay-opacity)", borderRadius: "var(--infinite-load-mask-border-radius)" }, Header: { background: "var(--infinite-header-background)", color: "var(--infinite-header-color)", columnHeaderHeight: "var(--infinite-column-header-height)" }, HeaderCell: { background: "var(--infinite-header-cell-background)", hoverBackground: "var(--infinite-header-cell-hover-background)", border: "var(--infinite-header-cell-border)", padding: "var(--infinite-header-cell-padding)", paddingX: "var(--infinite-header-cell-padding-x)", paddingY: "var(--infinite-header-cell-padding-y)", iconSize: "var(--infinite-header-cell-icon-size)", menuIconLineWidth: "var(--infinite-header-cell-menu-icon-line-width)", sortIconMargin: "var(--infinite-header-cell-sort-icon-margin)", borderRight: "var(--infinite-header-cell-border-right)", resizeHandleActiveAreaWidth: "var(--infinite-resize-handle-active-area-width)", resizeHandleWidth: "var(--infinite-resize-handle-width)", resizeHandleHoverBackground: "var(--infinite-resize-handle-hover-background)", resizeHandleConstrainedHoverBackground: "var(--infinite-resize-handle-constrained-hover-background)", filterOperatorPaddingX: "var(--infinite-filter-operator-padding-x)", filterEditorPaddingX: "var(--infinite-filter-editor-padding-x)", filterEditorMarginX: "var(--infinite-filter-editor-margin-x)", filterOperatorPaddingY: "var(--infinite-filter-operator-padding-y)", filterEditorPaddingY: "var(--infinite-filter-editor-padding-y)", filterEditorMarginY: "var(--infinite-filter-editor-margin-y)", filterEditorBackground: "var(--infinite-filter-editor-background)", filterEditorBorder: "var(--infinite-filter-editor-border)", filterEditorFocusBorderColor: "var(--infinite-filter-editor-focus-border-color)", filterEditorBorderRadius: "var(--infinite-filter-editor-border-radius)", filterEditorColor: "var(--infinite-filter-editor-color)" }, ActiveCellIndicator: { inset: "var(--infinite-active-cell-indicator-inset)" }, Cell: { flashingDuration: "var(--infinite-flashing-duration)", flashingAnimationName: "var(--infinite-flashing-animation-name)", flashingOverlayZIndex: "var(--infinite-flashing-overlay-z-index)", flashingBackground: "var(--infinite-flashing-background)", flashingUpBackground: "var(--infinite-flashing-up-background)", flashingDownBackground: "var(--infinite-flashing-down-background)", padding: "var(--infinite-cell-padding)", borderWidth: "var(--infinite-cell-border-width)", borderColor: "var(--infinite-cell-border-color)", border: "var(--infinite-cell-border)", borderLeft: "var(--infinite-cell-border-left)", borderRight: "var(--infinite-cell-border-right)", borderTop: "var(--infinite-cell-border-top)", borderInvisible: "var(--infinite-cell-border-invisible)", borderRadius: "var(--infinite-cell-border-radius)", reorderEffectDuration: "var(--infinite-column-reorder-effect-duration)", pinnedBorder: "var(--infinite-pinned-cell-border)", horizontalLayoutColumnReorderDisabledPageOpacity: "var(--infinite-horizontal-layout-column-reorder-disabled-page-opacity)", color: "var(--infinite-cell-color)", selectedBackground: "var(--infinite-selected-cell-background)", selectedBackgroundDefault: "var(--infinite-selected-cell-background-default)", selectedBackgroundAlpha: "var(--infinite-selected-cell-background-alpha)", selectedBackgroundAlphaWhenTableUnfocused: "var(--infinite-selected-cell-background-alpha--table-unfocused)", selectedBorderColor: "var(--infinite-selected-cell-border-color)", selectedBorderWidth: "var(--infinite-selected-cell-border-width)", selectedBorderStyle: "var(--infinite-selected-cell-border-style)", selectedBorder: "var(--infinite-selected-cell-border)", activeBackgroundAlpha: "var(--infinite-active-cell-background-alpha)", activeBackgroundAlphaWhenTableUnfocused: "var(--infinite-active-cell-background-alpha--table-unfocused)", activeBackground: "var(--infinite-active-cell-background)", activeBackgroundDefault: "var(--infinite-active-cell-background-default)", activeBorderColor: "var(--infinite-active-cell-border-color)", activeBorderWidth: "var(--infinite-active-cell-border-width)", activeBorderStyle: "var(--infinite-active-cell-border-style)", activeBorder: "var(--infinite-active-cell-border)" }, SelectionCheckBox: { marginInline: "var(--infinite-selection-checkbox-margin-inline)" }, ExpandCollapseIcon: { color: "var(--infinite-expand-collapse-icon-color)" }, Menu: { background: "var(--infinite-menu-background)", color: "var(--infinite-menu-color)", separatorColor: "var(--infinite-menu-separator-color)", padding: "var(--infinite-menu-padding)", cellPaddingVertical: "var(--infinite-menu-cell-padding-vertical)", cellPaddingHorizontal: "var(--infinite-menu-cell-padding-horizontal)", cellMarginVertical: "var(--infinite-menu-cell-margin-vertical)", itemDisabledBackground: "var(--infinite-menu-item-disabled-background)", itemActiveBackground: "var(--infinite-menu-item-active-background)", itemActiveOpacity: "var(--infinite-menu-item-active-opacity)", itemPressedOpacity: "var(--infinite-menu-item-pressed-opacity)", itemPressedBackground: "var(--infinite-menu-item-pressed-background)", itemDisabledOpacity: "var(--infinite-menu-item-disabled-opacity)", borderRadius: "var(--infinite-menu-border-radius)", shadowColor: "var(--infinite-menu-shadow-color)" }, RowDetail: { background: "var(--infinite-rowdetail-background)", padding: "var(--infinite-rowdetail-padding)", gridHeight: "var(--infinite-rowdetail-grid-height)" }, Row: { background: "var(--infinite-row-background)", oddBackground: "var(--infinite-row-odd-background)", disabledBackground: "var(--infinite-row-disabled-background)", oddDisabledBackground: "var(--infinite-row-odd-disabled-background)", selectedBackground: "var(--infinite-row-selected-background)", disabledOpacity: "var(--infinite-row-disabled-opacity)", activeBackground: "var(--infinite-active-row-background)", activeBorderColor: "var(--infinite-active-row-border-color)", activeBorderWidth: "var(--infinite-active-row-border-width)", activeBorderStyle: "var(--infinite-active-row-border-style)", activeBorder: "var(--infinite-active-row-border)", activeBackgroundAlpha: "var(--infinite-active-row-background-alpha)", activeBackgroundAlphaWhenTableUnfocused: "var(--infinite-active-row-background-alpha--table-unfocused)", hoverBackground: "var(--infinite-row-hover-background)", selectedHoverBackground: "var(--infinite-row-selected-hover-background)", selectedDisabledBackground: "var(--infinite-row-selected-disabled-background)", groupRowBackground: "var(--infinite-group-row-background)", groupRowColumnNesting: "var(--infinite-group-row-column-nesting)", groupNesting: "var(--infinite-dont-override-group-row-nesting-length)", pointerEventsWhileScrolling: "var(--infinite-row-pointer-events-while-scrolling)" }, ColumnCell: { background: "var(--infinite-column-cell-bg-dont-override)" } } };
4317
+ var ThemeVars = { loaded: "var(--infinite-loaded)", themeName: "var(--infinite-theme-name)", themeMode: "var(--infinite-theme-mode)", color: { accent: "var(--infinite-accent-color)", success: "var(--infinite-success-color)", error: "var(--infinite-error-color)", color: "var(--infinite-color)" }, spacing: { "0": "var(--infinite-space-0)", "1": "var(--infinite-space-1)", "2": "var(--infinite-space-2)", "3": "var(--infinite-space-3)", "4": "var(--infinite-space-4)", "5": "var(--infinite-space-5)", "6": "var(--infinite-space-6)", "7": "var(--infinite-space-7)", "8": "var(--infinite-space-8)", "9": "var(--infinite-space-9)", "10": "var(--infinite-space-10)" }, fontSize: { "0": "var(--infinite-font-size-0)", "1": "var(--infinite-font-size-1)", "2": "var(--infinite-font-size-2)", "3": "var(--infinite-font-size-3)", "4": "var(--infinite-font-size-4)", "5": "var(--infinite-font-size-5)", "6": "var(--infinite-font-size-6)", "7": "var(--infinite-font-size-7)" }, fontFamily: "var(--infinite-font-family)", baseFontSize: "var(--infinite-font-size)", minHeight: "var(--infinite-min-height)", borderRadius: "var(--infinite-border-radius)", focusOutline: "var(--infinite-focus-outline)", background: "var(--infinite-background)", iconSize: "var(--infinite-icon-size)", rowHeight: "var(--infinite-row-height)", densityScale: "var(--infinite-density-scale)", icons: { expandCollapse: "var(--infinite-icon-expand-collapse)", loading: "var(--infinite-icon-loading)", sortAsc: "var(--infinite-icon-sort-asc)", sortDesc: "var(--infinite-icon-sort-desc)", filter: "var(--infinite-icon-filter)", menu: "var(--infinite-icon-menu)", done: "var(--infinite-icon-done)", clear: "var(--infinite-icon-clear)", hidden: "var(--infinite-icon-hidden)", filterOperatorContains: "var(--infinite-icon-filter-operator-contains)", filterOperatorStartsWith: "var(--infinite-icon-filter-operator-starts-with)", filterOperatorEndsWith: "var(--infinite-icon-filter-operator-ends-with)", filterOperatorEq: "var(--infinite-icon-filter-operator-eq)", filterOperatorNeq: "var(--infinite-icon-filter-operator-neq)", filterOperatorGt: "var(--infinite-icon-filter-operator-gt)", filterOperatorGte: "var(--infinite-icon-filter-operator-gte)", filterOperatorLt: "var(--infinite-icon-filter-operator-lt)", filterOperatorLte: "var(--infinite-icon-filter-operator-lte)" }, runtime: { bodyWidth: "var(--infinite-runtime-body-content-width)", totalVisibleColumnsWidthValue: "var(--infinite-runtime-total-visible-columns-width)", totalVisibleColumnsWidthVar: "var(--infinite-runtime-total-visible-columns-width-var)", visibleColumnsCount: "var(--infinite-runtime-visible-columns-count)", browserScrollbarWidth: "var(--infinite-runtime-browser-scrollbar-width)" }, components: { GroupingToolbar: { color: "var(--infinite-grouping-toolbar-color)", background: "var(--infinite-grouping-toolbar-background)", rejectBackground: "var(--infinite-grouping-toolbar-reject-background)", activeBackground: "var(--infinite-grouping-toolbar-active-background)", activeBackgroundAlpha: "var(--infinite-grouping-toolbar-active-background-alpha)", padding: "var(--infinite-grouping-toolbar-padding)", border: "var(--infinite-grouping-toolbar-border)", rejectBorder: "var(--infinite-grouping-toolbar-reject-border)", gap: "var(--infinite-grouping-toolbar-gap)" }, GroupingToolbarItem: { border: "var(--infinite-grouping-toolbar-item-border)", borderRadius: "var(--infinite-grouping-toolbar-item-border-radius)", activeBorder: "var(--infinite-grouping-toolbar-item-active-border)", background: "var(--infinite-grouping-toolbar-item-background)", activeBackground: "var(--infinite-grouping-toolbar-item-active-background)", activeBackgroundAlpha: "var(--infinite-grouping-toolbar-item-active-background-alpha)" }, LoadMask: { padding: "var(--infinite-load-mask-padding)", color: "var(--infinite-load-mask-color)", textBackground: "var(--infinite-load-mask-text-background)", overlayBackground: "var(--infinite-load-mask-overlay-background)", overlayOpacity: "var(--infinite-load-mask-overlay-opacity)", borderRadius: "var(--infinite-load-mask-border-radius)" }, Header: { background: "var(--infinite-header-background)", color: "var(--infinite-header-color)", columnHeaderHeight: "var(--infinite-column-header-height)" }, HeaderCell: { background: "var(--infinite-header-cell-background)", hoverBackground: "var(--infinite-header-cell-hover-background)", border: "var(--infinite-header-cell-border)", padding: "var(--infinite-header-cell-padding)", paddingX: "var(--infinite-header-cell-padding-x)", paddingY: "var(--infinite-header-cell-padding-y)", iconSize: "var(--infinite-header-cell-icon-size)", menuIconLineWidth: "var(--infinite-header-cell-menu-icon-line-width)", sortIconMargin: "var(--infinite-header-cell-sort-icon-margin)", borderRight: "var(--infinite-header-cell-border-right)", resizeHandleActiveAreaWidth: "var(--infinite-resize-handle-active-area-width)", resizeHandleWidth: "var(--infinite-resize-handle-width)", resizeHandleHoverBackground: "var(--infinite-resize-handle-hover-background)", resizeHandleConstrainedHoverBackground: "var(--infinite-resize-handle-constrained-hover-background)", filterOperatorPaddingX: "var(--infinite-filter-operator-padding-x)", filterEditorPaddingX: "var(--infinite-filter-editor-padding-x)", filterEditorMarginX: "var(--infinite-filter-editor-margin-x)", filterOperatorPaddingY: "var(--infinite-filter-operator-padding-y)", filterEditorPaddingY: "var(--infinite-filter-editor-padding-y)", filterEditorMarginY: "var(--infinite-filter-editor-margin-y)", filterEditorBackground: "var(--infinite-filter-editor-background)", filterEditorBorder: "var(--infinite-filter-editor-border)", filterEditorFocusBorderColor: "var(--infinite-filter-editor-focus-border-color)", filterEditorBorderRadius: "var(--infinite-filter-editor-border-radius)", filterEditorColor: "var(--infinite-filter-editor-color)" }, ActiveCellIndicator: { inset: "var(--infinite-active-cell-indicator-inset)" }, Cell: { flashingDuration: "var(--infinite-flashing-duration)", flashingAnimationName: "var(--infinite-flashing-animation-name)", flashingOverlayZIndex: "var(--infinite-flashing-overlay-z-index)", flashingBackground: "var(--infinite-flashing-background)", flashingUpBackground: "var(--infinite-flashing-up-background)", flashingDownBackground: "var(--infinite-flashing-down-background)", padding: "var(--infinite-cell-padding)", paddingX: "var(--infinite-cell-padding-x)", paddingY: "var(--infinite-cell-padding-y)", borderWidth: "var(--infinite-cell-border-width)", borderColor: "var(--infinite-cell-border-color)", border: "var(--infinite-cell-border)", borderLeft: "var(--infinite-cell-border-left)", borderRight: "var(--infinite-cell-border-right)", borderTop: "var(--infinite-cell-border-top)", borderInvisible: "var(--infinite-cell-border-invisible)", borderRadius: "var(--infinite-cell-border-radius)", reorderEffectDuration: "var(--infinite-column-reorder-effect-duration)", pinnedBorder: "var(--infinite-pinned-cell-border)", horizontalLayoutColumnReorderDisabledPageOpacity: "var(--infinite-horizontal-layout-column-reorder-disabled-page-opacity)", color: "var(--infinite-cell-color)", selectedBackground: "var(--infinite-selected-cell-background)", selectedBackgroundDefault: "var(--infinite-selected-cell-background-default)", selectedBackgroundAlpha: "var(--infinite-selected-cell-background-alpha)", selectedBackgroundAlphaWhenTableUnfocused: "var(--infinite-selected-cell-background-alpha--table-unfocused)", selectedBorderColor: "var(--infinite-selected-cell-border-color)", selectedBorderWidth: "var(--infinite-selected-cell-border-width)", selectedBorderStyle: "var(--infinite-selected-cell-border-style)", selectedBorder: "var(--infinite-selected-cell-border)", activeBackgroundAlpha: "var(--infinite-active-cell-background-alpha)", activeBackgroundAlphaWhenTableUnfocused: "var(--infinite-active-cell-background-alpha--table-unfocused)", activeBackground: "var(--infinite-active-cell-background)", activeBackgroundDefault: "var(--infinite-active-cell-background-default)", activeBorderColor: "var(--infinite-active-cell-border-color)", activeBorderWidth: "var(--infinite-active-cell-border-width)", activeBorderStyle: "var(--infinite-active-cell-border-style)", activeBorder: "var(--infinite-active-cell-border)" }, SelectionCheckBox: { marginInline: "var(--infinite-selection-checkbox-margin-inline)" }, ExpandCollapseIcon: { color: "var(--infinite-expand-collapse-icon-color)" }, Menu: { background: "var(--infinite-menu-background)", color: "var(--infinite-menu-color)", separatorColor: "var(--infinite-menu-separator-color)", padding: "var(--infinite-menu-padding)", cellPaddingVertical: "var(--infinite-menu-cell-padding-vertical)", cellPaddingHorizontal: "var(--infinite-menu-cell-padding-horizontal)", cellMarginVertical: "var(--infinite-menu-cell-margin-vertical)", itemDisabledBackground: "var(--infinite-menu-item-disabled-background)", itemActiveBackground: "var(--infinite-menu-item-active-background)", itemActiveOpacity: "var(--infinite-menu-item-active-opacity)", itemPressedOpacity: "var(--infinite-menu-item-pressed-opacity)", itemPressedBackground: "var(--infinite-menu-item-pressed-background)", itemDisabledOpacity: "var(--infinite-menu-item-disabled-opacity)", borderRadius: "var(--infinite-menu-border-radius)", shadowColor: "var(--infinite-menu-shadow-color)" }, RowDetail: { background: "var(--infinite-rowdetail-background)", padding: "var(--infinite-rowdetail-padding)", gridHeight: "var(--infinite-rowdetail-grid-height)" }, Row: { background: "var(--infinite-row-background)", oddBackground: "var(--infinite-row-odd-background)", disabledBackground: "var(--infinite-row-disabled-background)", oddDisabledBackground: "var(--infinite-row-odd-disabled-background)", selectedBackground: "var(--infinite-row-selected-background)", disabledOpacity: "var(--infinite-row-disabled-opacity)", activeBackground: "var(--infinite-active-row-background)", activeBorderColor: "var(--infinite-active-row-border-color)", activeBorderWidth: "var(--infinite-active-row-border-width)", activeBorderStyle: "var(--infinite-active-row-border-style)", activeBorder: "var(--infinite-active-row-border)", activeBackgroundAlpha: "var(--infinite-active-row-background-alpha)", activeBackgroundAlphaWhenTableUnfocused: "var(--infinite-active-row-background-alpha--table-unfocused)", hoverBackground: "var(--infinite-row-hover-background)", selectedHoverBackground: "var(--infinite-row-selected-hover-background)", selectedDisabledBackground: "var(--infinite-row-selected-disabled-background)", groupRowBackground: "var(--infinite-group-row-background)", groupRowColumnNesting: "var(--infinite-group-row-column-nesting)", groupNesting: "var(--infinite-dont-override-group-row-nesting-length)", pointerEventsWhileScrolling: "var(--infinite-row-pointer-events-while-scrolling)" }, ColumnCell: { background: "var(--infinite-column-cell-bg-dont-override)" } } };
4254
4318
  var columnHeaderHeightName = "column-header-height";
4255
4319
 
4256
4320
  // src/components/InfiniteTable/utils/infiniteDOMUtils.ts
@@ -5268,6 +5332,7 @@ function reorderColumnsOnDrag(params) {
5268
5332
  setProxyPosition,
5269
5333
  setDragColumnOutside,
5270
5334
  getCurrentDragSourceAndTarget,
5335
+ groupingToolbarDragListId,
5271
5336
  api: imperativeApi,
5272
5337
  horizontalLayoutPageIndex,
5273
5338
  pageWidth
@@ -5560,7 +5625,7 @@ function reorderColumnsOnDrag(params) {
5560
5625
  },
5561
5626
  onMove(mousePosition) {
5562
5627
  const currentColHeaderRect = updatePositionAndDiff(mousePosition);
5563
- if (getCurrentDragSourceAndTarget().dropTargetListId === "grouping-toolbar" || allowColumnHideOnDrag && !acceptDropToReorderRect.containsPoint(
5628
+ if (getCurrentDragSourceAndTarget().dropTargetListId === groupingToolbarDragListId || allowColumnHideOnDrag && !acceptDropToReorderRect.containsPoint(
5564
5629
  currentColHeaderRect.getCenter()
5565
5630
  )) {
5566
5631
  if (allowColumnHideOnDrag) {
@@ -5897,17 +5962,18 @@ var _DragManager = class _DragManager {
5897
5962
  return _DragManager.emitter.on(event, callback);
5898
5963
  }
5899
5964
  static registerDragInteractionTarget(dragInteractionTarget) {
5900
- if (_DragManager.dragInteractionTargetsMap.has(dragInteractionTarget.listId)) {
5965
+ const { listId } = dragInteractionTarget;
5966
+ const current = _DragManager.dragInteractionTargetsMap.get(listId);
5967
+ if (current && current !== dragInteractionTarget) {
5901
5968
  console.warn(
5902
- `DragInteractionTarget with listId ${dragInteractionTarget.listId} already registered`
5969
+ `DragInteractionTarget with listId ${listId} already registered`
5903
5970
  );
5904
5971
  return;
5905
5972
  }
5906
- _DragManager.dragInteractionTargetsMap.set(
5907
- dragInteractionTarget.listId,
5908
- dragInteractionTarget
5909
- );
5910
- _DragManager.emit("register", dragInteractionTarget);
5973
+ if (!current) {
5974
+ _DragManager.dragInteractionTargetsMap.set(listId, dragInteractionTarget);
5975
+ _DragManager.emit("register", dragInteractionTarget);
5976
+ }
5911
5977
  return () => {
5912
5978
  _DragManager.unregisterDragInteractionTarget(dragInteractionTarget);
5913
5979
  };
@@ -5921,13 +5987,11 @@ var _DragManager = class _DragManager {
5921
5987
  if (!dragInteractionTarget) {
5922
5988
  return;
5923
5989
  }
5924
- if (!_DragManager.dragInteractionTargetsMap.has(dragInteractionTarget.listId)) {
5925
- console.warn(
5926
- `DragInteractionTarget with listId ${dragInteractionTarget.listId} not found`
5927
- );
5990
+ const { listId } = dragInteractionTarget;
5991
+ if (_DragManager.dragInteractionTargetsMap.get(listId) !== dragInteractionTarget) {
5928
5992
  return;
5929
5993
  }
5930
- _DragManager.dragInteractionTargetsMap.delete(dragInteractionTarget.listId);
5994
+ _DragManager.dragInteractionTargetsMap.delete(listId);
5931
5995
  dragInteractionTarget.unregister();
5932
5996
  _DragManager.emit("unregister", dragInteractionTarget);
5933
5997
  }
@@ -6024,6 +6088,14 @@ var _DragManager = class _DragManager {
6024
6088
  let insideTargetEvent = null;
6025
6089
  const events = [];
6026
6090
  _DragManager.withDragMove(dragOperation, (interactionTarget, { event: event2 }) => {
6091
+ if (dragOperation.cancelled) {
6092
+ event2 = {
6093
+ ...event2,
6094
+ dropTargetListId: null,
6095
+ dropIndex: -1,
6096
+ outside: false
6097
+ };
6098
+ }
6027
6099
  interactionTarget.drop(event2);
6028
6100
  events.push(event2);
6029
6101
  if (!event2.outside) {
@@ -6089,6 +6161,11 @@ var DragOperation = class extends EventEmitter {
6089
6161
  constructor(options) {
6090
6162
  super(options.listeners);
6091
6163
  this.phase = "start";
6164
+ /**
6165
+ * Whether the drag was cancelled - the browser took the pointer away -
6166
+ * rather than dropped.
6167
+ */
6168
+ this.cancelled = false;
6092
6169
  this.currentOffset = {
6093
6170
  top: 0,
6094
6171
  left: 0
@@ -6117,6 +6194,13 @@ var DragOperation = class extends EventEmitter {
6117
6194
  this.phase = "drop";
6118
6195
  this.emit("drop", this);
6119
6196
  }
6197
+ /**
6198
+ * Ends the drag without a drop.
6199
+ */
6200
+ cancel() {
6201
+ this.cancelled = true;
6202
+ this.drop();
6203
+ }
6120
6204
  move(point) {
6121
6205
  if (this.phase !== "start" && this.phase !== "move") {
6122
6206
  return;
@@ -6155,6 +6239,11 @@ var DragDropProviderContext = React20.createContext({
6155
6239
  var useDragDropProvider = () => {
6156
6240
  return React20.useContext(DragDropProviderContext);
6157
6241
  };
6242
+ var DragDropProviderIdContext = React20.createContext("");
6243
+ var useDragListId = (name) => {
6244
+ const providerId = React20.useContext(DragDropProviderIdContext);
6245
+ return providerId ? `${name}-${providerId}` : name;
6246
+ };
6158
6247
  var DragDropProvider = (props) => {
6159
6248
  const [state, setState] = React20.useState({
6160
6249
  dragSourceListId: null,
@@ -6162,6 +6251,7 @@ var DragDropProvider = (props) => {
6162
6251
  dragItemId: "",
6163
6252
  status: "accepted"
6164
6253
  });
6254
+ const providerId = React20.useId();
6165
6255
  const stateRef = React20.useRef(state);
6166
6256
  stateRef.current = state;
6167
6257
  const getCurrentDragSourceAndTarget = React20.useCallback(() => {
@@ -6219,9 +6309,13 @@ var DragDropProvider = (props) => {
6219
6309
  removeDragDrop();
6220
6310
  };
6221
6311
  }, [DragManager, setState]);
6222
- return /* @__PURE__ */ React20.createElement(DragDropProviderContext.Provider, { value: contextValue }, typeof props.children === "function" ? props.children(contextValue) : props.children);
6312
+ return /* @__PURE__ */ React20.createElement(DragDropProviderIdContext.Provider, { value: providerId }, /* @__PURE__ */ React20.createElement(DragDropProviderContext.Provider, { value: contextValue }, typeof props.children === "function" ? props.children(contextValue) : props.children));
6223
6313
  };
6224
6314
 
6315
+ // src/components/InfiniteTable/components/draggable/dragListNames.ts
6316
+ var HEADER_DRAG_LIST_NAME = "header";
6317
+ var GROUPING_TOOLBAR_DRAG_LIST_NAME = "grouping-toolbar";
6318
+
6225
6319
  // src/components/InfiniteTable/components/InfiniteTableBody/bodyClassName.ts
6226
6320
  var InfiniteTableBodyClassName = `${rootClassName}Body`;
6227
6321
  var getBodyNode = (root) => {
@@ -6268,6 +6362,9 @@ var useColumnPointerEvents = ({
6268
6362
  const [proxyPosition, setProxyPosition] = (0, import_react16.useState)(null);
6269
6363
  const [dragColumnOutside, setDragColumnOutside] = (0, import_react16.useState)(false);
6270
6364
  const { getCurrentDragSourceAndTarget } = useDragDropProvider();
6365
+ const groupingToolbarDragListId = useDragListId(
6366
+ GROUPING_TOOLBAR_DRAG_LIST_NAME
6367
+ );
6271
6368
  const { getComputed, getState, api, computedDraggable, rootRef, actions } = useInfiniteTableSelector((ctx) => {
6272
6369
  return {
6273
6370
  actions: ctx.actions,
@@ -6344,6 +6441,7 @@ var useColumnPointerEvents = ({
6344
6441
  dragColumnHeaderTargetRect: targetRect,
6345
6442
  dragColumnId: columnId,
6346
6443
  getCurrentDragSourceAndTarget,
6444
+ groupingToolbarDragListId,
6347
6445
  api,
6348
6446
  infiniteDOMNode: rootRef.current,
6349
6447
  setProxyPosition,
@@ -6484,7 +6582,7 @@ var useColumnPointerEvents = ({
6484
6582
  target.addEventListener("pointerup", onPointerUp);
6485
6583
  target.setPointerCapture(e.pointerId);
6486
6584
  },
6487
- [columnId, horizontalLayoutPageIndex]
6585
+ [columnId, horizontalLayoutPageIndex, groupingToolbarDragListId]
6488
6586
  );
6489
6587
  return {
6490
6588
  onPointerDown: computedDraggable ? onPointerDown : defaultPointerDown,
@@ -10282,6 +10380,7 @@ function ExpandCollapseIcon(props) {
10282
10380
  className: join(
10283
10381
  props.className,
10284
10382
  ExpanderIconCls,
10383
+ IconCustomMaskCls.expandCollapse,
10285
10384
  ExpanderIconClsVariants({
10286
10385
  direction: direction || "start",
10287
10386
  expanded,
@@ -11695,6 +11794,10 @@ function RenderHeaderCellHookComponent(props) {
11695
11794
  // src/components/InfiniteTable/components/icons/MenuIcon.tsx
11696
11795
  var React27 = __toESM(require("react"));
11697
11796
 
11797
+ // src/components/InfiniteTable/components/icons/MenuIcon.css.ts
11798
+ var MenuIconLineCls = "yhvuzb1";
11799
+ var MenuIconWithDefaultLinesCls = "yhvuzb0";
11800
+
11698
11801
  // src/components/InfiniteTable/components/icons/menuIconAttributes.ts
11699
11802
  var MenuIconDataAttributes = keyMirror({
11700
11803
  "data-name": ""
@@ -11709,7 +11812,7 @@ var defaultLineStyle2 = {
11709
11812
  width: "100%",
11710
11813
  pointerEvents: "none"
11711
11814
  };
11712
- var lineClassName = `${InfiniteIconClassName}-menu`;
11815
+ var lineClassName = join(`${InfiniteIconClassName}-menu`, MenuIconLineCls);
11713
11816
  function MenuIcon(props) {
11714
11817
  const {
11715
11818
  style: style2,
@@ -11738,7 +11841,8 @@ function MenuIcon(props) {
11738
11841
  reserveSpaceWhenHidden
11739
11842
  }),
11740
11843
  InfiniteIconClassName,
11741
- `${InfiniteIconClassName}-menu`
11844
+ `${InfiniteIconClassName}-menu`,
11845
+ children == null ? MenuIconWithDefaultLinesCls : ""
11742
11846
  )
11743
11847
  },
11744
11848
  children ?? /* @__PURE__ */ React27.createElement(React27.Fragment, null, /* @__PURE__ */ React27.createElement("div", { className: lineClassName, style: lineStyle }), /* @__PURE__ */ React27.createElement("div", { className: lineClassName, style: lineStyle }), /* @__PURE__ */ React27.createElement("div", { className: lineClassName, style: lineStyle }))
@@ -11751,6 +11855,8 @@ var import_react21 = require("react");
11751
11855
 
11752
11856
  // src/components/InfiniteTable/components/icons/SortIcon/SortIcon.css.ts
11753
11857
  var SortIconCls = "_1b8djff0 _16lm1iw1p _16lm1iw2f _16lm1iw1 _16lm1iw32";
11858
+ var SortIconDirectionCls = { asc: "_1b8djff1", desc: "_1b8djff2", none: "_1b8djff3" };
11859
+ var SortIconLineCls = "_1b8djff4";
11754
11860
 
11755
11861
  // src/components/InfiniteTable/components/icons/SortIcon/shared.ts
11756
11862
  var defaultLineStyle3 = {
@@ -11811,6 +11917,7 @@ function SortIcon(props) {
11811
11917
  if (!rendered && !props.forceSize) {
11812
11918
  return null;
11813
11919
  }
11920
+ const directionName = direction === 1 ? "asc" : direction === -1 ? "desc" : "none";
11814
11921
  const indexStyle = {};
11815
11922
  if (direction === -1) {
11816
11923
  indexStyle.top = "100%";
@@ -11824,7 +11931,9 @@ function SortIcon(props) {
11824
11931
  className,
11825
11932
  InfiniteIconClassName,
11826
11933
  SortIconCls,
11827
- `${InfiniteIconClassName}-sort`
11934
+ SortIconDirectionCls[directionName],
11935
+ `${InfiniteIconClassName}-sort`,
11936
+ `${InfiniteIconClassName}-sort--${directionName}`
11828
11937
  )
11829
11938
  },
11830
11939
  showIndex ? /* @__PURE__ */ React28.createElement(
@@ -11839,12 +11948,25 @@ function SortIcon(props) {
11839
11948
  /* @__PURE__ */ React28.createElement(
11840
11949
  "div",
11841
11950
  {
11951
+ className: SortIconLineCls,
11842
11952
  style: { width: sizes[0], ...lineStyle },
11843
11953
  onTransitionEnd
11844
11954
  }
11845
11955
  ),
11846
- /* @__PURE__ */ React28.createElement("div", { style: { width: sizes[1], ...lineStyle } }),
11847
- /* @__PURE__ */ React28.createElement("div", { style: { width: sizes[2], ...lineStyle } })
11956
+ /* @__PURE__ */ React28.createElement(
11957
+ "div",
11958
+ {
11959
+ className: SortIconLineCls,
11960
+ style: { width: sizes[1], ...lineStyle }
11961
+ }
11962
+ ),
11963
+ /* @__PURE__ */ React28.createElement(
11964
+ "div",
11965
+ {
11966
+ className: SortIconLineCls,
11967
+ style: { width: sizes[2], ...lineStyle }
11968
+ }
11969
+ )
11848
11970
  );
11849
11971
  }
11850
11972
 
@@ -12397,7 +12519,7 @@ function dampenByTime(proposedScroll, dragStartTime, config) {
12397
12519
  return MIN_SCROLL;
12398
12520
  }
12399
12521
  const pct = (runTime - accelerateAt) / (stopDampeningAt - accelerateAt);
12400
- return Math.ceil(proposedScroll * config.ease(pct));
12522
+ return Math.max(MIN_SCROLL, Math.ceil(proposedScroll * config.ease(pct)));
12401
12523
  }
12402
12524
  function getScrollForAxis(point, containerStart, containerEnd, containerSize, config, dragStartTime, shouldUseDampening) {
12403
12525
  if (point < containerStart || point > containerEnd) {
@@ -12545,20 +12667,12 @@ var AutoScroller = class {
12545
12667
  }
12546
12668
  };
12547
12669
 
12548
- // src/components/InfiniteTable/components/draggable/DragList.tsx
12549
- var DragListContext = React31.createContext({
12550
- dragItemId: null,
12551
- onDragItemPointerDown: () => {
12552
- },
12553
- draggingInProgress: false,
12554
- dragListId: "",
12555
- status: "accepted",
12556
- dragSourceListId: null,
12557
- dropTargetListId: null
12558
- });
12559
- var useDragListContext = () => {
12560
- return React31.useContext(DragListContext);
12561
- };
12670
+ // src/components/InfiniteTable/components/draggable/dragListController.ts
12671
+ var DRAG_LIST_ATTRIBUTE = "data-drag-list-id";
12672
+ var DRAG_ITEM_ATTRIBUTE = "data-drag-item-id";
12673
+ var DRAG_ITEM_LIST_ATTRIBUTE = "data-drag-item-list-id";
12674
+ var DRAG_ITEM_SELECTOR = `[${DRAG_ITEM_ATTRIBUTE}]`;
12675
+ var RETURN_NULL = () => null;
12562
12676
  var defaultUpdatePosition = (options) => {
12563
12677
  const { node, offset } = options;
12564
12678
  if (!offset) {
@@ -12579,8 +12693,6 @@ function getDraggableItemNodes(domRef, dragListId) {
12579
12693
  }
12580
12694
  function getDraggableItems(domRef, dragListId) {
12581
12695
  const dragItems = getDraggableItemNodes(domRef, dragListId);
12582
- if (!dragItems || dragItems.length === 0) {
12583
- }
12584
12696
  const draggableItems = Array.from(dragItems).map((item) => {
12585
12697
  const id = getDraggableItemId(item);
12586
12698
  const rect = item.getBoundingClientRect();
@@ -12628,55 +12740,54 @@ function createInteractionTarget(params) {
12628
12740
  const target = new DragInteractionTarget(getInteractionTargetData(params));
12629
12741
  return target;
12630
12742
  }
12631
- function useInteractionTarget(domRef, props) {
12632
- const getProps = useLatest(props);
12633
- const [interactionTarget, doSetInteractionTarget] = React31.useState(null);
12634
- const setInteractionTarget = (0, import_react24.useCallback)(
12635
- (interactionTarget2) => {
12636
- if (interactionTarget2) {
12637
- DragManager.registerDragInteractionTarget(interactionTarget2);
12638
- } else {
12639
- const currentInteractionTarget = getInteractionTarget();
12640
- if (currentInteractionTarget) {
12641
- DragManager.unregisterDragInteractionTarget(currentInteractionTarget);
12642
- }
12643
- }
12644
- doSetInteractionTarget(interactionTarget2);
12645
- },
12646
- []
12743
+ function findDragListElement(domRef, dragListId) {
12744
+ const dragList = document.querySelector(
12745
+ `[${DRAG_LIST_ATTRIBUTE}="${dragListId}"]`
12647
12746
  );
12648
- const getInteractionTarget = useLatest(interactionTarget);
12649
- (0, import_react24.useEffect)(() => {
12650
- return DragManager.on("register", (interactionTarget2) => {
12651
- const { dragListId, acceptDropsFrom, orientation, shouldAcceptDrop } = getProps();
12652
- const interactionTargetData = interactionTarget2.getData();
12653
- if (!interactionTargetData.initial) {
12654
- return;
12655
- }
12656
- if (interactionTargetData.listId === dragListId) {
12657
- return;
12658
- }
12659
- if (acceptDropsFrom?.includes(interactionTargetData.listId)) {
12660
- const newInteractionTarget = createInteractionTarget({
12661
- domRef,
12662
- orientation,
12663
- dragListId,
12664
- initial: false,
12665
- acceptDropsFrom,
12666
- shouldAcceptDrop
12667
- });
12668
- interactionTarget2.once("unregister", () => {
12669
- setInteractionTarget(null);
12670
- });
12671
- setInteractionTarget(newInteractionTarget);
12672
- }
12673
- });
12674
- }, [getProps]);
12675
- return {
12676
- interactionTarget,
12677
- setInteractionTarget,
12678
- getInteractionTarget
12679
- };
12747
+ if (dragList) {
12748
+ domRef.current = dragList;
12749
+ } else {
12750
+ console.warn(
12751
+ `DragList with id "${dragListId}" not found. You're probably not spreading the domProps to the parent element. Make sure you also include the "className" prop.`
12752
+ );
12753
+ }
12754
+ }
12755
+ function replaceRegisteredInteractionTarget(registeredTargetRef, interactionTarget) {
12756
+ const registeredTarget = registeredTargetRef.current;
12757
+ if (registeredTarget && registeredTarget !== interactionTarget) {
12758
+ DragManager.unregisterDragInteractionTarget(registeredTarget);
12759
+ }
12760
+ registeredTargetRef.current = interactionTarget;
12761
+ if (interactionTarget) {
12762
+ DragManager.registerDragInteractionTarget(interactionTarget);
12763
+ }
12764
+ }
12765
+ function acceptDragsFromOtherLists(options) {
12766
+ const { getProps, domRef, setInteractionTarget } = options;
12767
+ return DragManager.on("register", (interactionTarget) => {
12768
+ const { dragListId, acceptDropsFrom, orientation, shouldAcceptDrop } = getProps();
12769
+ const interactionTargetData = interactionTarget.getData();
12770
+ if (!interactionTargetData.initial) {
12771
+ return;
12772
+ }
12773
+ if (interactionTargetData.listId === dragListId) {
12774
+ return;
12775
+ }
12776
+ if (acceptDropsFrom?.includes(interactionTargetData.listId)) {
12777
+ const newInteractionTarget = createInteractionTarget({
12778
+ domRef,
12779
+ orientation,
12780
+ dragListId,
12781
+ initial: false,
12782
+ acceptDropsFrom,
12783
+ shouldAcceptDrop
12784
+ });
12785
+ interactionTarget.once("unregister", () => {
12786
+ setInteractionTarget(null);
12787
+ });
12788
+ setInteractionTarget(newInteractionTarget);
12789
+ }
12790
+ });
12680
12791
  }
12681
12792
  function createDefaultProxy(dragItemNode, initialRect) {
12682
12793
  const proxy = dragItemNode.cloneNode(true);
@@ -12712,6 +12823,444 @@ function cleanupProxy(proxyStateRef) {
12712
12823
  state.originalNode.style.visibility = "";
12713
12824
  proxyStateRef.current = null;
12714
12825
  }
12826
+ function getDragItemNodes(dragItemsRef, domRef, dragListId) {
12827
+ let dragItems = dragItemsRef.current;
12828
+ if (!dragItems || dragItems.length === 0) {
12829
+ dragItems = getDraggableItemNodes(domRef, dragListId);
12830
+ dragItemsRef.current = dragItems;
12831
+ }
12832
+ return dragItems;
12833
+ }
12834
+ function bindInteractionTarget(interactionTarget, options) {
12835
+ const {
12836
+ dragListId,
12837
+ orientation,
12838
+ domRef,
12839
+ proxyStateRef,
12840
+ sourceScrollOffsetRef,
12841
+ dragItemsRef,
12842
+ getDragItems,
12843
+ getOnDrop,
12844
+ getOnAcceptDrop,
12845
+ getOnRemove,
12846
+ getUpdatePosition,
12847
+ updateDragOperationSourceAndTarget,
12848
+ updateDragProxyRenderState
12849
+ } = options;
12850
+ const removeOnDragStart = interactionTarget.on(
12851
+ "start",
12852
+ ({ dragItem, dragSourceListId, dropTargetListId }) => {
12853
+ updateDragOperationSourceAndTarget({
12854
+ dragSourceListId,
12855
+ dropTargetListId,
12856
+ dragItemId: dragItem.id,
12857
+ status: "accepted"
12858
+ });
12859
+ }
12860
+ );
12861
+ const removeOnDragMove = interactionTarget.on(
12862
+ "move",
12863
+ ({ offsetsForItems, items, status, dragItem }) => {
12864
+ if (status === "rejected") {
12865
+ return;
12866
+ }
12867
+ const dragItems = getDragItems();
12868
+ const updatePosition = getUpdatePosition();
12869
+ const proxyState = proxyStateRef.current;
12870
+ items.forEach((item, index) => {
12871
+ let offset = offsetsForItems[index];
12872
+ const node = dragItems[index];
12873
+ if (!node) {
12874
+ return;
12875
+ }
12876
+ if (proxyState && item.id === proxyState.dragItemId) {
12877
+ return;
12878
+ }
12879
+ if (!proxyState && item.id === dragItem.id) {
12880
+ const scrollOffset = sourceScrollOffsetRef.current;
12881
+ offset = {
12882
+ left: offset.left + scrollOffset.left,
12883
+ top: offset.top + scrollOffset.top
12884
+ };
12885
+ }
12886
+ updatePosition({
12887
+ id: item.id,
12888
+ node,
12889
+ offset
12890
+ });
12891
+ });
12892
+ }
12893
+ );
12894
+ const removeOnDragDrop = interactionTarget.on("drop", (params) => {
12895
+ const {
12896
+ sortedIndexes,
12897
+ dragIndex,
12898
+ dropIndex,
12899
+ dragItem,
12900
+ items,
12901
+ dragSourceListId,
12902
+ dropTargetListId,
12903
+ outside,
12904
+ status
12905
+ } = params;
12906
+ const dragItems = getDragItems();
12907
+ dragItemsRef.current = [];
12908
+ const onAcceptDrop = getOnAcceptDrop();
12909
+ const onRemove = getOnRemove();
12910
+ const onDrop = getOnDrop();
12911
+ const updatePosition = getUpdatePosition();
12912
+ items.forEach((item, index) => {
12913
+ const node = dragItems[index];
12914
+ if (!node) {
12915
+ return;
12916
+ }
12917
+ updatePosition({
12918
+ id: item.id,
12919
+ node,
12920
+ offset: null
12921
+ });
12922
+ });
12923
+ cleanupProxy(proxyStateRef);
12924
+ updateDragProxyRenderState((prev) => {
12925
+ if (!prev) return prev;
12926
+ requestAnimationFrame(() => updateDragProxyRenderState(RETURN_NULL));
12927
+ return { ...prev, dragItemId: null };
12928
+ });
12929
+ const accepted = status === "accepted";
12930
+ if (dragListId === dropTargetListId && dragSourceListId !== dragListId) {
12931
+ if (onAcceptDrop && accepted) {
12932
+ onAcceptDrop({
12933
+ dragItemId: dragItem.id,
12934
+ dragSourceListId,
12935
+ dropTargetListId,
12936
+ dragIndex,
12937
+ dropIndex,
12938
+ dropItemId: items[dropIndex]?.id
12939
+ });
12940
+ }
12941
+ }
12942
+ let callbackFn = null;
12943
+ if (dropIndex === -1 && dragSourceListId === dragListId && dropTargetListId === dragListId && outside) {
12944
+ callbackFn = onRemove;
12945
+ }
12946
+ if (dropIndex !== -1 && dropTargetListId === dragListId && dragSourceListId === dragListId) {
12947
+ callbackFn = onDrop;
12948
+ }
12949
+ if (callbackFn) {
12950
+ callbackFn?.(sortedIndexes, {
12951
+ dragIndex,
12952
+ dropIndex,
12953
+ dragItemId: items[dragIndex].id,
12954
+ dropItemId: items[dropIndex]?.id
12955
+ });
12956
+ }
12957
+ });
12958
+ let targetAutoScroller = null;
12959
+ let targetScrollContainer = null;
12960
+ let targetScrollHandler = null;
12961
+ let targetPointermoveHandler = null;
12962
+ if (!interactionTarget.getData().initial && domRef.current) {
12963
+ targetAutoScroller = new AutoScroller({
12964
+ orientation,
12965
+ onScroll: () => {
12966
+ }
12967
+ });
12968
+ targetAutoScroller.start(domRef.current);
12969
+ targetScrollContainer = targetAutoScroller.getScrollContainer();
12970
+ if (targetScrollContainer) {
12971
+ let lastScroll = orientation === "vertical" ? targetScrollContainer.scrollTop : targetScrollContainer.scrollLeft;
12972
+ targetScrollHandler = () => {
12973
+ const current = orientation === "vertical" ? targetScrollContainer.scrollTop : targetScrollContainer.scrollLeft;
12974
+ const delta = current - lastScroll;
12975
+ lastScroll = current;
12976
+ if (delta !== 0) {
12977
+ interactionTarget.adjustForScroll(delta);
12978
+ DragManager.retriggerMove();
12979
+ }
12980
+ };
12981
+ targetScrollContainer.addEventListener("scroll", targetScrollHandler);
12982
+ }
12983
+ targetPointermoveHandler = (e) => {
12984
+ targetAutoScroller.updatePointer({
12985
+ left: e.clientX,
12986
+ top: e.clientY
12987
+ });
12988
+ };
12989
+ getGlobal().addEventListener("pointermove", targetPointermoveHandler);
12990
+ }
12991
+ return () => {
12992
+ removeOnDragStart();
12993
+ removeOnDragMove();
12994
+ removeOnDragDrop();
12995
+ if (targetAutoScroller) {
12996
+ targetAutoScroller.stop();
12997
+ }
12998
+ if (targetScrollContainer && targetScrollHandler) {
12999
+ targetScrollContainer.removeEventListener("scroll", targetScrollHandler);
13000
+ }
13001
+ if (targetPointermoveHandler) {
13002
+ getGlobal().removeEventListener("pointermove", targetPointermoveHandler);
13003
+ }
13004
+ };
13005
+ }
13006
+ function startDragOnPointerDown(e, props, options) {
13007
+ const {
13008
+ dragListId,
13009
+ orientation,
13010
+ acceptDropsFrom,
13011
+ preserveDragSpace,
13012
+ onDragProxySetup
13013
+ } = props;
13014
+ const {
13015
+ domRef,
13016
+ proxyStateRef,
13017
+ sourceScrollOffsetRef,
13018
+ dragItemsRef,
13019
+ setInteractionTarget,
13020
+ updateDragProxyRenderState
13021
+ } = options;
13022
+ const dragStrategy = props.dragStrategy ?? "proxy";
13023
+ const useProxy = dragStrategy === "proxy" && !props.renderDragProxy;
13024
+ const useRenderProxy = dragStrategy === "proxy" && !!props.renderDragProxy;
13025
+ const proxyMove = props.onDragProxyMove ?? defaultDragProxyMove;
13026
+ const target = e.currentTarget;
13027
+ let dragItemId = target.getAttribute(DRAG_ITEM_ATTRIBUTE);
13028
+ if (dragItemId == null) {
13029
+ const parentDragItem = selectParent(target, DRAG_ITEM_SELECTOR);
13030
+ if (parentDragItem) {
13031
+ dragItemId = parentDragItem.getAttribute(DRAG_ITEM_ATTRIBUTE);
13032
+ }
13033
+ }
13034
+ if (dragItemId == null) {
13035
+ console.warn(
13036
+ `Could not find drag item id for element`,
13037
+ target,
13038
+ `Make sure you have a parent element with a ${DRAG_ITEM_ATTRIBUTE} attribute`
13039
+ );
13040
+ return;
13041
+ }
13042
+ dragItemId = `${dragItemId}`;
13043
+ let dragOperation = null;
13044
+ const dragItems = getDraggableItemNodes(domRef, dragListId);
13045
+ dragItemsRef.current = dragItems;
13046
+ const interactionTarget = createInteractionTarget({
13047
+ domRef,
13048
+ orientation,
13049
+ dragListId,
13050
+ acceptDropsFrom,
13051
+ initial: true,
13052
+ preserveDragSpace
13053
+ });
13054
+ const draggableItems = interactionTarget.getData().draggableItems;
13055
+ const dragIndex = draggableItems.findIndex((item) => item.id === dragItemId);
13056
+ if (dragIndex === -1) {
13057
+ return;
13058
+ }
13059
+ const dragItem = draggableItems[dragIndex];
13060
+ const dragItemNode = dragItems[dragIndex]?.getAttribute(DRAG_ITEM_ATTRIBUTE) === `${dragItemId}` ? dragItems[dragIndex] : dragItems.find(
13061
+ (node) => node.getAttribute(DRAG_ITEM_ATTRIBUTE) === `${dragItemId}`
13062
+ );
13063
+ setInteractionTarget(interactionTarget);
13064
+ const initialCoords = {
13065
+ left: e.clientX,
13066
+ top: e.clientY
13067
+ };
13068
+ let lastPointer = { left: e.clientX, top: e.clientY };
13069
+ sourceScrollOffsetRef.current = { top: 0, left: 0 };
13070
+ const autoScroller = new AutoScroller({
13071
+ orientation,
13072
+ onScroll: () => {
13073
+ }
13074
+ });
13075
+ if (domRef.current) {
13076
+ autoScroller.start(domRef.current);
13077
+ }
13078
+ const scrollContainer = autoScroller.getScrollContainer();
13079
+ let lastSourceScroll = scrollContainer ? orientation === "vertical" ? scrollContainer.scrollTop : scrollContainer.scrollLeft : 0;
13080
+ function fireDragMove() {
13081
+ if (!dragOperation) return;
13082
+ dragOperation.move({
13083
+ left: lastPointer.left,
13084
+ top: lastPointer.top
13085
+ });
13086
+ }
13087
+ const onContainerScroll = () => {
13088
+ if (!scrollContainer) return;
13089
+ const current = orientation === "vertical" ? scrollContainer.scrollTop : scrollContainer.scrollLeft;
13090
+ const delta = current - lastSourceScroll;
13091
+ lastSourceScroll = current;
13092
+ if (delta !== 0) {
13093
+ interactionTarget.adjustForScroll(delta);
13094
+ if (orientation === "vertical") {
13095
+ sourceScrollOffsetRef.current.top += delta;
13096
+ } else {
13097
+ sourceScrollOffsetRef.current.left += delta;
13098
+ }
13099
+ }
13100
+ fireDragMove();
13101
+ };
13102
+ scrollContainer?.addEventListener("scroll", onContainerScroll);
13103
+ const onPointerMove = (e2) => {
13104
+ lastPointer = { left: e2.clientX, top: e2.clientY };
13105
+ if (!dragOperation) {
13106
+ dragOperation = DragManager.startDrag(
13107
+ {
13108
+ listId: dragListId,
13109
+ dragItem,
13110
+ dragIndex
13111
+ },
13112
+ initialCoords
13113
+ );
13114
+ if (dragItemNode && useProxy) {
13115
+ const rect = dragItemNode.getBoundingClientRect();
13116
+ let cachedProxy = null;
13117
+ const setupParams = {
13118
+ dragItemNode,
13119
+ dragItemId: `${dragItemId}`,
13120
+ initialRect: rect,
13121
+ initialCoords,
13122
+ get proxyElement() {
13123
+ if (!cachedProxy) {
13124
+ cachedProxy = createDefaultProxy(dragItemNode, rect);
13125
+ }
13126
+ return cachedProxy;
13127
+ }
13128
+ };
13129
+ const setupResult = onDragProxySetup?.(setupParams);
13130
+ const proxyElement = setupResult?.proxyElement ?? setupParams.proxyElement;
13131
+ dragItemNode.style.visibility = "hidden";
13132
+ proxyStateRef.current = {
13133
+ proxyElement,
13134
+ originalNode: dragItemNode,
13135
+ dragItemId: `${dragItemId}`,
13136
+ initialRect: rect,
13137
+ cleanup: setupResult?.cleanup
13138
+ };
13139
+ }
13140
+ if (dragItemNode && useRenderProxy) {
13141
+ const rect = dragItemNode.getBoundingClientRect();
13142
+ dragItemNode.style.visibility = "hidden";
13143
+ proxyStateRef.current = {
13144
+ proxyElement: dragItemNode,
13145
+ originalNode: dragItemNode,
13146
+ dragItemId: `${dragItemId}`,
13147
+ initialRect: rect,
13148
+ // Portal handles its own DOM; only restore visibility.
13149
+ cleanup: () => {
13150
+ }
13151
+ };
13152
+ const initialRenderState = {
13153
+ dragItemId: `${dragItemId}`,
13154
+ initialRect: rect,
13155
+ dx: 0,
13156
+ dy: 0
13157
+ };
13158
+ updateDragProxyRenderState(() => initialRenderState);
13159
+ }
13160
+ }
13161
+ const dx = e2.clientX - initialCoords.left;
13162
+ const dy = e2.clientY - initialCoords.top;
13163
+ if (useRenderProxy) {
13164
+ updateDragProxyRenderState((prev) => prev ? { ...prev, dx, dy } : prev);
13165
+ } else {
13166
+ const proxyState = proxyStateRef.current;
13167
+ if (proxyState) {
13168
+ proxyMove({ proxyElement: proxyState.proxyElement, dx, dy });
13169
+ }
13170
+ }
13171
+ autoScroller.updatePointer({
13172
+ left: e2.clientX,
13173
+ top: e2.clientY
13174
+ });
13175
+ fireDragMove();
13176
+ };
13177
+ const preventNativeDrag = (e2) => {
13178
+ e2.preventDefault();
13179
+ };
13180
+ const endDrag = (cancelled) => {
13181
+ autoScroller.stop();
13182
+ scrollContainer?.removeEventListener("scroll", onContainerScroll);
13183
+ win.removeEventListener("pointermove", onPointerMove);
13184
+ win.removeEventListener("pointerup", onPointerUp);
13185
+ win.removeEventListener("pointercancel", onPointerCancel);
13186
+ win.removeEventListener("dragstart", preventNativeDrag, true);
13187
+ if (useRenderProxy) {
13188
+ updateDragProxyRenderState(
13189
+ (prev) => prev ? { ...prev, dragItemId: null } : prev
13190
+ );
13191
+ requestAnimationFrame(() => {
13192
+ updateDragProxyRenderState(RETURN_NULL);
13193
+ });
13194
+ }
13195
+ if (!dragOperation) {
13196
+ cleanupProxy(proxyStateRef);
13197
+ setInteractionTarget(null);
13198
+ return;
13199
+ }
13200
+ if (cancelled) {
13201
+ dragOperation.cancel();
13202
+ } else {
13203
+ dragOperation.drop();
13204
+ }
13205
+ dragOperation = null;
13206
+ };
13207
+ const onPointerUp = () => endDrag(false);
13208
+ const onPointerCancel = () => endDrag(true);
13209
+ const win = getGlobal();
13210
+ win.addEventListener("pointermove", onPointerMove);
13211
+ win.addEventListener("pointerup", onPointerUp);
13212
+ win.addEventListener("pointercancel", onPointerCancel);
13213
+ win.addEventListener("dragstart", preventNativeDrag, true);
13214
+ }
13215
+
13216
+ // src/components/InfiniteTable/components/draggable/DragList.tsx
13217
+ var DragListContext = React31.createContext({
13218
+ dragItemId: null,
13219
+ onDragItemPointerDown: () => {
13220
+ },
13221
+ draggingInProgress: false,
13222
+ dragListId: "",
13223
+ status: "accepted",
13224
+ dragSourceListId: null,
13225
+ dropTargetListId: null
13226
+ });
13227
+ var useDragListContext = () => {
13228
+ return React31.useContext(DragListContext);
13229
+ };
13230
+ function useInteractionTarget(domRef, props) {
13231
+ const getProps = useLatest(props);
13232
+ const [interactionTarget, doSetInteractionTarget] = React31.useState(null);
13233
+ const registeredTargetRef = React31.useRef(null);
13234
+ const setInteractionTarget = (0, import_react24.useCallback)(
13235
+ (interactionTarget2) => {
13236
+ replaceRegisteredInteractionTarget(
13237
+ registeredTargetRef,
13238
+ interactionTarget2
13239
+ );
13240
+ doSetInteractionTarget(interactionTarget2);
13241
+ },
13242
+ []
13243
+ );
13244
+ const getInteractionTarget = useLatest(interactionTarget);
13245
+ (0, import_react24.useEffect)(() => {
13246
+ return () => {
13247
+ DragManager.unregisterDragInteractionTarget(registeredTargetRef.current);
13248
+ registeredTargetRef.current = null;
13249
+ };
13250
+ }, []);
13251
+ (0, import_react24.useEffect)(() => {
13252
+ return acceptDragsFromOtherLists({
13253
+ getProps,
13254
+ domRef,
13255
+ setInteractionTarget
13256
+ });
13257
+ }, [getProps]);
13258
+ return {
13259
+ interactionTarget,
13260
+ setInteractionTarget,
13261
+ getInteractionTarget
13262
+ };
13263
+ }
12715
13264
  var DragList = (props) => {
12716
13265
  const domRef = React31.useRef(null);
12717
13266
  const proxyStateRef = React31.useRef(null);
@@ -12734,375 +13283,42 @@ var DragList = (props) => {
12734
13283
  props
12735
13284
  );
12736
13285
  (0, import_react24.useEffect)(() => {
12737
- const dragList = document.querySelector(
12738
- `[${DRAG_LIST_ATTRIBUTE}="${props.dragListId}"]`
12739
- );
12740
- if (dragList) {
12741
- domRef.current = dragList;
12742
- } else {
12743
- console.warn(
12744
- `DragList with id "${props.dragListId}" not found. You're probably not spreading the domProps to the parent element. Make sure you also include the "className" prop.`
12745
- );
12746
- }
13286
+ findDragListElement(domRef, props.dragListId);
12747
13287
  }, [props.dragListId]);
12748
13288
  (0, import_react24.useEffect)(() => {
12749
13289
  if (interactionTarget) {
12750
- const dragListId = props.dragListId;
12751
- const removeOnDragStart = interactionTarget.on(
12752
- "start",
12753
- ({ dragItem, dragSourceListId: dragSourceListId2, dropTargetListId: dropTargetListId2 }) => {
12754
- updateDragOperationSourceAndTarget({
12755
- dragSourceListId: dragSourceListId2,
12756
- dropTargetListId: dropTargetListId2,
12757
- dragItemId: dragItem.id,
12758
- status: "accepted"
12759
- });
12760
- }
12761
- );
12762
- const removeOnDragMove = interactionTarget.on(
12763
- "move",
12764
- ({ offsetsForItems, items, status: status2, dragItem }) => {
12765
- if (status2 === "rejected") {
12766
- return;
12767
- }
12768
- const dragItems = getDragItems();
12769
- const updatePosition = getUpdatePosition();
12770
- const proxyState = proxyStateRef.current;
12771
- items.forEach((item, index) => {
12772
- let offset = offsetsForItems[index];
12773
- const node = dragItems[index];
12774
- if (!node) {
12775
- return;
12776
- }
12777
- if (proxyState && item.id === proxyState.dragItemId) {
12778
- return;
12779
- }
12780
- if (!proxyState && item.id === dragItem.id) {
12781
- const scrollOffset = sourceScrollOffsetRef.current;
12782
- offset = {
12783
- left: offset.left + scrollOffset.left,
12784
- top: offset.top + scrollOffset.top
12785
- };
12786
- }
12787
- updatePosition({
12788
- id: item.id,
12789
- node,
12790
- offset
12791
- });
12792
- });
12793
- }
12794
- );
12795
- const removeOnDragDrop = interactionTarget.on("drop", (params) => {
12796
- const {
12797
- sortedIndexes,
12798
- dragIndex,
12799
- dropIndex,
12800
- dragItem,
12801
- items,
12802
- dragSourceListId: dragSourceListId2,
12803
- dropTargetListId: dropTargetListId2,
12804
- outside,
12805
- status: status2
12806
- } = params;
12807
- const dragItems = getDragItems();
12808
- dragItemsRef.current = [];
12809
- const onAcceptDrop = getOnAcceptDrop();
12810
- const onRemove = getOnRemove();
12811
- const onDrop = getOnDrop();
12812
- const updatePosition = getUpdatePosition();
12813
- items.forEach((item, index) => {
12814
- const node = dragItems[index];
12815
- if (!node) {
12816
- return;
12817
- }
12818
- updatePosition({
12819
- id: item.id,
12820
- node,
12821
- offset: null
12822
- });
12823
- });
12824
- cleanupProxy(proxyStateRef);
12825
- setDragProxyRenderState((prev) => {
12826
- if (!prev) return prev;
12827
- requestAnimationFrame(() => setDragProxyRenderState(null));
12828
- return { ...prev, dragItemId: null };
12829
- });
12830
- const accepted = status2 === "accepted";
12831
- if (dragListId === dropTargetListId2 && dragSourceListId2 !== dragListId) {
12832
- if (onAcceptDrop && accepted) {
12833
- onAcceptDrop({
12834
- dragItemId: dragItem.id,
12835
- dragSourceListId: dragSourceListId2,
12836
- dropTargetListId: dropTargetListId2,
12837
- dragIndex,
12838
- dropIndex,
12839
- dropItemId: items[dropIndex]?.id
12840
- });
12841
- }
12842
- }
12843
- let callbackFn = null;
12844
- if (dropIndex === -1 && dragSourceListId2 === dragListId && dropTargetListId2 === dragListId && outside) {
12845
- callbackFn = onRemove;
12846
- }
12847
- if (dropIndex !== -1 && dropTargetListId2 === dragListId && dragSourceListId2 === dragListId) {
12848
- callbackFn = onDrop;
12849
- }
12850
- if (callbackFn) {
12851
- callbackFn?.(sortedIndexes, {
12852
- dragIndex,
12853
- dropIndex,
12854
- dragItemId: items[dragIndex].id,
12855
- dropItemId: items[dropIndex]?.id
12856
- });
12857
- }
13290
+ return bindInteractionTarget(interactionTarget, {
13291
+ dragListId: props.dragListId,
13292
+ orientation: props.orientation,
13293
+ domRef,
13294
+ proxyStateRef,
13295
+ sourceScrollOffsetRef,
13296
+ dragItemsRef,
13297
+ getDragItems,
13298
+ getOnDrop,
13299
+ getOnAcceptDrop,
13300
+ getOnRemove,
13301
+ getUpdatePosition,
13302
+ updateDragOperationSourceAndTarget,
13303
+ updateDragProxyRenderState: setDragProxyRenderState
12858
13304
  });
12859
- let targetAutoScroller = null;
12860
- let targetScrollContainer = null;
12861
- let targetScrollHandler = null;
12862
- let targetPointermoveHandler = null;
12863
- if (!interactionTarget.getData().initial && domRef.current) {
12864
- targetAutoScroller = new AutoScroller({
12865
- orientation: props.orientation,
12866
- onScroll: () => {
12867
- }
12868
- });
12869
- targetAutoScroller.start(domRef.current);
12870
- targetScrollContainer = targetAutoScroller.getScrollContainer();
12871
- if (targetScrollContainer) {
12872
- let lastScroll = props.orientation === "vertical" ? targetScrollContainer.scrollTop : targetScrollContainer.scrollLeft;
12873
- targetScrollHandler = () => {
12874
- const current = props.orientation === "vertical" ? targetScrollContainer.scrollTop : targetScrollContainer.scrollLeft;
12875
- const delta = current - lastScroll;
12876
- lastScroll = current;
12877
- if (delta !== 0) {
12878
- interactionTarget.adjustForScroll(delta);
12879
- DragManager.retriggerMove();
12880
- }
12881
- };
12882
- targetScrollContainer.addEventListener("scroll", targetScrollHandler);
12883
- }
12884
- targetPointermoveHandler = (e) => {
12885
- targetAutoScroller.updatePointer({
12886
- left: e.clientX,
12887
- top: e.clientY
12888
- });
12889
- };
12890
- getGlobal().addEventListener("pointermove", targetPointermoveHandler);
12891
- }
12892
- return () => {
12893
- removeOnDragStart();
12894
- removeOnDragMove();
12895
- removeOnDragDrop();
12896
- if (targetAutoScroller) {
12897
- targetAutoScroller.stop();
12898
- }
12899
- if (targetScrollContainer && targetScrollHandler) {
12900
- targetScrollContainer.removeEventListener(
12901
- "scroll",
12902
- targetScrollHandler
12903
- );
12904
- }
12905
- if (targetPointermoveHandler) {
12906
- getGlobal().removeEventListener(
12907
- "pointermove",
12908
- targetPointermoveHandler
12909
- );
12910
- }
12911
- };
12912
13305
  }
12913
13306
  return void 0;
12914
13307
  }, [interactionTarget, props.dragListId]);
12915
13308
  const dragItemsRef = React31.useRef([]);
12916
13309
  const getDragItems = (0, import_react24.useCallback)(() => {
12917
- let dragItems = dragItemsRef.current;
12918
- if (!dragItems || dragItems.length === 0) {
12919
- dragItems = getDraggableItemNodes(domRef, props.dragListId);
12920
- dragItemsRef.current = dragItems;
12921
- }
12922
- return dragItems;
13310
+ return getDragItemNodes(dragItemsRef, domRef, props.dragListId);
12923
13311
  }, [props.dragListId]);
12924
13312
  const onDragItemPointerDown = (0, import_react24.useCallback)(
12925
13313
  (e) => {
12926
- const target = e.currentTarget;
12927
- let dragItemId2 = target.getAttribute(DRAG_ITEM_ATTRIBUTE);
12928
- if (dragItemId2 == null) {
12929
- const parentDragItem = selectParent(target, DRAG_ITEM_SELECTOR);
12930
- if (parentDragItem) {
12931
- dragItemId2 = parentDragItem.getAttribute(DRAG_ITEM_ATTRIBUTE);
12932
- }
12933
- }
12934
- if (dragItemId2 == null) {
12935
- console.warn(
12936
- `Could not find drag item id for element`,
12937
- target,
12938
- `Make sure you have a parent element with a ${DRAG_ITEM_ATTRIBUTE} attribute`
12939
- );
12940
- return;
12941
- }
12942
- dragItemId2 = `${dragItemId2}`;
12943
- let dragOperation = null;
12944
- const dragItems = getDraggableItemNodes(domRef, props.dragListId);
12945
- dragItemsRef.current = dragItems;
12946
- const interactionTarget2 = createInteractionTarget({
13314
+ startDragOnPointerDown(e, props, {
12947
13315
  domRef,
12948
- orientation: props.orientation,
12949
- dragListId: props.dragListId,
12950
- acceptDropsFrom: props.acceptDropsFrom,
12951
- initial: true,
12952
- preserveDragSpace: props.preserveDragSpace
12953
- });
12954
- const draggableItems = interactionTarget2.getData().draggableItems;
12955
- const dragIndex = draggableItems.findIndex(
12956
- (item) => item.id === dragItemId2
12957
- );
12958
- if (dragIndex === -1) {
12959
- return;
12960
- }
12961
- const dragItem = draggableItems[dragIndex];
12962
- const dragItemNode = dragItems[dragIndex]?.getAttribute(DRAG_ITEM_ATTRIBUTE) === `${dragItemId2}` ? dragItems[dragIndex] : dragItems.find(
12963
- (node) => node.getAttribute(DRAG_ITEM_ATTRIBUTE) === `${dragItemId2}`
12964
- );
12965
- setInteractionTarget(interactionTarget2);
12966
- const initialCoords = {
12967
- left: e.clientX,
12968
- top: e.clientY
12969
- };
12970
- let lastPointer = { left: e.clientX, top: e.clientY };
12971
- sourceScrollOffsetRef.current = { top: 0, left: 0 };
12972
- const autoScroller = new AutoScroller({
12973
- orientation: props.orientation,
12974
- onScroll: () => {
12975
- }
13316
+ proxyStateRef,
13317
+ sourceScrollOffsetRef,
13318
+ dragItemsRef,
13319
+ setInteractionTarget,
13320
+ updateDragProxyRenderState: setDragProxyRenderState
12976
13321
  });
12977
- if (domRef.current) {
12978
- autoScroller.start(domRef.current);
12979
- }
12980
- const scrollContainer = autoScroller.getScrollContainer();
12981
- let lastSourceScroll = scrollContainer ? props.orientation === "vertical" ? scrollContainer.scrollTop : scrollContainer.scrollLeft : 0;
12982
- function fireDragMove() {
12983
- if (!dragOperation) return;
12984
- dragOperation.move({
12985
- left: lastPointer.left,
12986
- top: lastPointer.top
12987
- });
12988
- }
12989
- const onContainerScroll = () => {
12990
- if (!scrollContainer) return;
12991
- const current = props.orientation === "vertical" ? scrollContainer.scrollTop : scrollContainer.scrollLeft;
12992
- const delta = current - lastSourceScroll;
12993
- lastSourceScroll = current;
12994
- if (delta !== 0) {
12995
- interactionTarget2.adjustForScroll(delta);
12996
- if (props.orientation === "vertical") {
12997
- sourceScrollOffsetRef.current.top += delta;
12998
- } else {
12999
- sourceScrollOffsetRef.current.left += delta;
13000
- }
13001
- }
13002
- fireDragMove();
13003
- };
13004
- scrollContainer?.addEventListener("scroll", onContainerScroll);
13005
- const dragStrategy = props.dragStrategy ?? "proxy";
13006
- const useProxy = dragStrategy === "proxy" && !props.renderDragProxy;
13007
- const useRenderProxy = dragStrategy === "proxy" && !!props.renderDragProxy;
13008
- const proxyMove = props.onDragProxyMove ?? defaultDragProxyMove;
13009
- const onPointerMove = (e2) => {
13010
- lastPointer = { left: e2.clientX, top: e2.clientY };
13011
- if (!dragOperation) {
13012
- dragOperation = DragManager.startDrag(
13013
- {
13014
- listId: props.dragListId,
13015
- dragItem,
13016
- dragIndex
13017
- },
13018
- initialCoords
13019
- );
13020
- if (dragItemNode && useProxy) {
13021
- const rect = dragItemNode.getBoundingClientRect();
13022
- let cachedProxy = null;
13023
- const setupParams = {
13024
- dragItemNode,
13025
- dragItemId: `${dragItemId2}`,
13026
- initialRect: rect,
13027
- initialCoords,
13028
- get proxyElement() {
13029
- if (!cachedProxy) {
13030
- cachedProxy = createDefaultProxy(dragItemNode, rect);
13031
- }
13032
- return cachedProxy;
13033
- }
13034
- };
13035
- const setupResult = props.onDragProxySetup?.(setupParams);
13036
- const proxyElement = setupResult?.proxyElement ?? setupParams.proxyElement;
13037
- dragItemNode.style.visibility = "hidden";
13038
- proxyStateRef.current = {
13039
- proxyElement,
13040
- originalNode: dragItemNode,
13041
- dragItemId: `${dragItemId2}`,
13042
- initialRect: rect,
13043
- cleanup: setupResult?.cleanup
13044
- };
13045
- }
13046
- if (dragItemNode && useRenderProxy) {
13047
- const rect = dragItemNode.getBoundingClientRect();
13048
- dragItemNode.style.visibility = "hidden";
13049
- proxyStateRef.current = {
13050
- proxyElement: dragItemNode,
13051
- originalNode: dragItemNode,
13052
- dragItemId: `${dragItemId2}`,
13053
- initialRect: rect,
13054
- // Portal handles its own DOM; only restore visibility.
13055
- cleanup: () => {
13056
- }
13057
- };
13058
- setDragProxyRenderState({
13059
- dragItemId: `${dragItemId2}`,
13060
- initialRect: rect,
13061
- dx: 0,
13062
- dy: 0
13063
- });
13064
- }
13065
- }
13066
- const dx = e2.clientX - initialCoords.left;
13067
- const dy = e2.clientY - initialCoords.top;
13068
- if (useRenderProxy) {
13069
- setDragProxyRenderState(
13070
- (prev) => prev ? { ...prev, dx, dy } : prev
13071
- );
13072
- } else {
13073
- const proxyState = proxyStateRef.current;
13074
- if (proxyState) {
13075
- proxyMove({ proxyElement: proxyState.proxyElement, dx, dy });
13076
- }
13077
- }
13078
- autoScroller.updatePointer({
13079
- left: e2.clientX,
13080
- top: e2.clientY
13081
- });
13082
- fireDragMove();
13083
- };
13084
- const onPointerUp = () => {
13085
- autoScroller.stop();
13086
- scrollContainer?.removeEventListener("scroll", onContainerScroll);
13087
- getGlobal().removeEventListener("pointermove", onPointerMove);
13088
- if (useRenderProxy) {
13089
- setDragProxyRenderState(
13090
- (prev) => prev ? { ...prev, dragItemId: null } : prev
13091
- );
13092
- requestAnimationFrame(() => {
13093
- setDragProxyRenderState(null);
13094
- });
13095
- }
13096
- if (!dragOperation) {
13097
- cleanupProxy(proxyStateRef);
13098
- setInteractionTarget(null);
13099
- return;
13100
- }
13101
- dragOperation.drop();
13102
- dragOperation = null;
13103
- };
13104
- getGlobal().addEventListener("pointermove", onPointerMove);
13105
- getGlobal().addEventListener("pointerup", onPointerUp, { once: true });
13106
13322
  },
13107
13323
  [
13108
13324
  props.orientation,
@@ -13152,10 +13368,6 @@ var DragList = (props) => {
13152
13368
  ref: proxyRefCallback
13153
13369
  }) : null);
13154
13370
  };
13155
- var DRAG_LIST_ATTRIBUTE = "data-drag-list-id";
13156
- var DRAG_ITEM_ATTRIBUTE = "data-drag-item-id";
13157
- var DRAG_ITEM_LIST_ATTRIBUTE = "data-drag-item-list-id";
13158
- var DRAG_ITEM_SELECTOR = `[${DRAG_ITEM_ATTRIBUTE}]`;
13159
13371
  var DragItemContext = React31.createContext({
13160
13372
  dragItemId: "",
13161
13373
  dragListId: "",
@@ -13215,7 +13427,7 @@ DragList.DraggableItem = DraggableItem;
13215
13427
  // src/components/InfiniteTable/components/icons/HiddenIcon.tsx
13216
13428
  var React32 = __toESM(require("react"));
13217
13429
  var HiddenIcon = (props) => {
13218
- return /* @__PURE__ */ React32.createElement(Icon, { ...props, viewBox: "0 -960 960 960" }, /* @__PURE__ */ React32.createElement("path", { d: iconPaths.hidden[0] }));
13430
+ return /* @__PURE__ */ React32.createElement(Icon, { ...props, icon: "hidden", viewBox: "0 -960 960 960" }, /* @__PURE__ */ React32.createElement("path", { d: iconPaths.hidden[0] }));
13219
13431
  };
13220
13432
 
13221
13433
  // src/components/InfiniteTable/components/InfiniteTablePublicHeader/index.tsx
@@ -14563,13 +14775,13 @@ var MatrixBrain = class extends Logger {
14563
14775
  * transforms that follow the scroll position should use.
14564
14776
  */
14565
14777
  getDOMScrollPosition(scrollPosition = this.getScrollPosition()) {
14566
- const origin2 = this.getScrollOrigin();
14567
- if (!origin2.scrollTop && !origin2.scrollLeft) {
14778
+ const origin = this.getScrollOrigin();
14779
+ if (!origin.scrollTop && !origin.scrollLeft) {
14568
14780
  return scrollPosition;
14569
14781
  }
14570
14782
  return {
14571
- scrollTop: scrollPosition.scrollTop - origin2.scrollTop,
14572
- scrollLeft: scrollPosition.scrollLeft - origin2.scrollLeft
14783
+ scrollTop: scrollPosition.scrollTop - origin.scrollTop,
14784
+ scrollLeft: scrollPosition.scrollLeft - origin.scrollLeft
14573
14785
  };
14574
14786
  }
14575
14787
  // a method (not an arrow property) so subclasses can call it via super
@@ -14603,8 +14815,8 @@ var MatrixBrain = class extends Logger {
14603
14815
  if (this.destroyed) {
14604
14816
  return;
14605
14817
  }
14606
- const origin2 = this.getScrollOrigin();
14607
- this.onScrollOriginChangeFns.forEach((fn) => fn(origin2));
14818
+ const origin = this.getScrollOrigin();
14819
+ this.onScrollOriginChangeFns.forEach((fn) => fn(origin));
14608
14820
  }
14609
14821
  doUpdateRenderCount(which = ALL_DIRECTIONS) {
14610
14822
  if (!this.availableWidth || !this.availableHeight) {
@@ -18153,11 +18365,12 @@ function InfiniteTableInternalHeaderFn(props) {
18153
18365
  dataSourceStatePartialForHeaderCell
18154
18366
  ]
18155
18367
  );
18368
+ const headerDragListId = useDragListId(HEADER_DRAG_LIST_NAME);
18156
18369
  return /* @__PURE__ */ React46.createElement(
18157
18370
  DragList,
18158
18371
  {
18159
18372
  orientation: "horizontal",
18160
- dragListId: "header",
18373
+ dragListId: headerDragListId,
18161
18374
  dragStrategy: "inline",
18162
18375
  onDrop: emptyFn3,
18163
18376
  updatePosition: emptyFn3
@@ -18427,7 +18640,7 @@ function InfiniteTableHeaderCellFn(props) {
18427
18640
  filterDelay
18428
18641
  } = props;
18429
18642
  const { allRowsSelected, someRowsSelected, selectionMode } = dataSourceStatePartialForHeaderCell;
18430
- const { onDragItemPointerDown } = useDragListContext();
18643
+ const { onDragItemPointerDown, dragListId } = useDragListContext();
18431
18644
  const {
18432
18645
  api,
18433
18646
  getComputed,
@@ -18726,7 +18939,7 @@ function InfiniteTableHeaderCellFn(props) {
18726
18939
  "data-field": `${column.field || ""}`,
18727
18940
  "data-column-id": column.id,
18728
18941
  [DRAG_ITEM_ATTRIBUTE]: column.id,
18729
- [DRAG_ITEM_LIST_ATTRIBUTE]: "header",
18942
+ [DRAG_ITEM_LIST_ATTRIBUTE]: dragListId,
18730
18943
  "data-header-align": align2,
18731
18944
  "data-name": "HeaderCell",
18732
18945
  "data-sort": column.computedSortedAsc ? "asc" : column.computedSortedDesc ? "desc" : "none",
@@ -18857,25 +19070,40 @@ function decamelize(str, options) {
18857
19070
  ).toLowerCase();
18858
19071
  }
18859
19072
 
18860
- // src/components/InfiniteTable/components/InfiniteTableLicenseFooter/index.tsx
18861
- var defaultStyle = {
19073
+ // src/components/InfiniteTable/components/InfiniteTableLicenseFooter/licenseFooterShared.ts
19074
+ var LICENSE_FOOTER_LINK = "https://infinite-table.com";
19075
+ var LICENSE_FOOTER_INVALID_MESSAGE = "Invalid Infinite Table license. See console for details.";
19076
+ var baseFooterStyle = {
18862
19077
  padding: ThemeVars.spacing[2],
18863
19078
  textAlign: "end",
18864
19079
  opacity: "1",
18865
19080
  visibility: "visible",
18866
19081
  display: "block",
18867
- fontSize: "0.85rem",
19082
+ fontSize: "0.85rem"
19083
+ };
19084
+ var missingFooterStyle = {
19085
+ ...baseFooterStyle,
18868
19086
  background: "white",
18869
19087
  color: "black"
18870
19088
  };
18871
- var anchorStyle = {
18872
- opacity: 1,
19089
+ var invalidFooterStyle = {
19090
+ ...baseFooterStyle,
19091
+ // pale red, with dark red text
19092
+ background: "#fee2e2",
19093
+ color: "#991b1b"
19094
+ };
19095
+ var baseAnchorStyle = {
19096
+ opacity: "1",
18873
19097
  visibility: "visible",
18874
19098
  display: "inline-block",
18875
19099
  pointerEvents: "all",
18876
- color: "black",
18877
19100
  textDecoration: "underline"
18878
19101
  };
19102
+ var missingAnchorStyle = { ...baseAnchorStyle, color: "black" };
19103
+ var invalidAnchorStyle = { ...baseAnchorStyle, color: "#991b1b" };
19104
+ function getLicenseFooterStyles(invalid) {
19105
+ return invalid ? { footer: invalidFooterStyle, anchor: invalidAnchorStyle } : { footer: missingFooterStyle, anchor: missingAnchorStyle };
19106
+ }
18879
19107
  var enforceStyle = (node, style2) => {
18880
19108
  if (!node) {
18881
19109
  return;
@@ -18888,8 +19116,26 @@ var enforceStyle = (node, style2) => {
18888
19116
  );
18889
19117
  }
18890
19118
  };
19119
+ function enforceLicenseFooterStyle(getNode, invalid) {
19120
+ const styles = getLicenseFooterStyles(invalid);
19121
+ const forceStyle = () => {
19122
+ setTimeout(() => {
19123
+ const node = getNode();
19124
+ enforceStyle(node, styles.footer);
19125
+ enforceStyle(node?.querySelector("a") ?? null, styles.anchor);
19126
+ });
19127
+ };
19128
+ forceStyle();
19129
+ const intervalId = setInterval(forceStyle, 1e3);
19130
+ return () => {
19131
+ clearInterval(intervalId);
19132
+ };
19133
+ }
19134
+
19135
+ // src/components/InfiniteTable/components/InfiniteTableLicenseFooter/index.tsx
18891
19136
  var InfiniteTableLicenseFooter = React50.forwardRef(
18892
19137
  function InfiniteTableLicenseFooter2(props, ref) {
19138
+ const { invalid = false, ...domProps } = props;
18893
19139
  const { rootClassName: rootClassName12 } = useInternalProps();
18894
19140
  const domRef = React50.useRef(null);
18895
19141
  const domCallback = React50.useCallback((node) => {
@@ -18904,42 +19150,33 @@ var InfiniteTableLicenseFooter = React50.forwardRef(
18904
19150
  }
18905
19151
  }, []);
18906
19152
  (0, import_react38.useEffect)(() => {
18907
- const forceStyle = () => {
18908
- setTimeout(() => {
18909
- enforceStyle(domRef.current, defaultStyle);
18910
- enforceStyle(
18911
- domRef.current?.firstElementChild,
18912
- anchorStyle
18913
- );
18914
- });
18915
- };
18916
- forceStyle();
18917
- const intervalId = setInterval(forceStyle, 1e3);
18918
- return () => {
18919
- clearInterval(intervalId);
18920
- };
18921
- }, []);
19153
+ return enforceLicenseFooterStyle(() => domRef.current, invalid);
19154
+ }, [invalid]);
19155
+ const styles = getLicenseFooterStyles(invalid);
18922
19156
  return /* @__PURE__ */ React50.createElement(
18923
19157
  "div",
18924
19158
  {
18925
19159
  ref: domCallback,
18926
- ...props,
19160
+ ...domProps,
18927
19161
  className: join(
18928
19162
  `${rootClassName12}-Footer`,
19163
+ invalid ? `${rootClassName12}-Footer--invalid` : null,
18929
19164
  FooterCls,
18930
- props.className
19165
+ domProps.className
18931
19166
  ),
18932
- style: defaultStyle
19167
+ style: styles.footer
18933
19168
  },
19169
+ invalid ? `${LICENSE_FOOTER_INVALID_MESSAGE} ` : null,
18934
19170
  "Powered by",
18935
19171
  " ",
18936
19172
  /* @__PURE__ */ React50.createElement(
18937
19173
  "a",
18938
19174
  {
18939
- href: "https://infinite-table.com",
19175
+ href: LICENSE_FOOTER_LINK,
18940
19176
  rel: "noopener noreferrer",
18941
19177
  role: "link",
18942
- target: "_blank"
19178
+ target: "_blank",
19179
+ style: styles.anchor
18943
19180
  },
18944
19181
  "Infinite Table"
18945
19182
  )
@@ -22273,10 +22510,47 @@ function treeTraverse(treeParams, traverseOptions, data) {
22273
22510
  var numberComparator = function(first, second) {
22274
22511
  return first - second;
22275
22512
  };
22513
+ var LOCALES_WITH_FAST_LOCALE_COMPARE = /* @__PURE__ */ new Set([
22514
+ "ca",
22515
+ "de",
22516
+ "de-AT",
22517
+ "en",
22518
+ "en-DE",
22519
+ "en-GB",
22520
+ "en-US",
22521
+ "fi",
22522
+ "fr",
22523
+ "id",
22524
+ "id-ID",
22525
+ "it",
22526
+ "ms",
22527
+ "nl",
22528
+ "pl",
22529
+ "pt",
22530
+ "ro",
22531
+ "sl",
22532
+ "sv",
22533
+ "sw",
22534
+ "vi"
22535
+ ]);
22536
+ var collator;
22537
+ function getCollator() {
22538
+ try {
22539
+ const defaultCollator = new Intl.Collator();
22540
+ return LOCALES_WITH_FAST_LOCALE_COMPARE.has(
22541
+ defaultCollator.resolvedOptions().locale
22542
+ ) ? null : defaultCollator;
22543
+ } catch (ex) {
22544
+ return null;
22545
+ }
22546
+ }
22276
22547
  var stringComparator = function(first, second) {
22277
22548
  first = `${first}`;
22278
22549
  second = `${second}`;
22279
- return first.localeCompare(second);
22550
+ if (collator === void 0) {
22551
+ collator = getCollator();
22552
+ }
22553
+ return collator ? collator.compare(first, second) : first.localeCompare(second);
22280
22554
  };
22281
22555
  var dateComparator = function(first, second) {
22282
22556
  return first - second;
@@ -25867,6 +26141,7 @@ function concludeReducer(params) {
25867
26141
  } else {
25868
26142
  state.groupDeepMap = void 0;
25869
26143
  state.pivotColumns = void 0;
26144
+ state.pivotColumnGroups = void 0;
25870
26145
  state.groupRowsIndexesInDataArray = void 0;
25871
26146
  const arrayDifferentAfterSortStep = previousState.postSortDataArray != state.postSortDataArray;
25872
26147
  if (arrayDifferentAfterSortStep || groupsDepsChanged || selectionDepsChanged || rowDisabledStateDepsChanged || rowInfoReducersChanged) {
@@ -26915,6 +27190,46 @@ var ScrollListener = class {
26915
27190
  }
26916
27191
  };
26917
27192
 
27193
+ // src/components/InfiniteTable/utils/toCSSVarName.ts
27194
+ var toCSSVarName = (value) => `--infinite-${value}`;
27195
+
27196
+ // src/components/InfiniteTable/shared.ts
27197
+ var DEFAULT_ROW_HEIGHT = 40;
27198
+ var DEFAULT_COLUMN_HEADER_HEIGHT = toCSSVarName(
27199
+ columnHeaderHeightName
27200
+ );
27201
+ var DENSITY_SCALE = `var(${toCSSVarName("density-scale")}, 1)`;
27202
+ var DEFAULT_ROW_HEIGHT_CSS_VALUE = `calc(var(${toCSSVarName(
27203
+ "row-height"
27204
+ )}, ${DEFAULT_ROW_HEIGHT}px) * ${DENSITY_SCALE})`;
27205
+ var DEFAULT_COLUMN_HEADER_HEIGHT_CSS_VALUE = `calc(var(${DEFAULT_COLUMN_HEADER_HEIGHT}) * ${DENSITY_SCALE})`;
27206
+ function getRowHeightFromCSSValue(value, state) {
27207
+ if (!value) {
27208
+ return null;
27209
+ }
27210
+ if (state.rowHeightCSSVar !== DEFAULT_ROW_HEIGHT_CSS_VALUE) {
27211
+ return value;
27212
+ }
27213
+ if (!isThemeCSSLoaded()) {
27214
+ return null;
27215
+ }
27216
+ const rowHeight = Math.round(value);
27217
+ return rowHeight === state.rowHeight ? null : rowHeight;
27218
+ }
27219
+ var CSS_LOADED_VAR_NAME = toCSSVarName("loaded");
27220
+ function isThemeCSSLoaded() {
27221
+ if (typeof document === "undefined" || typeof getComputedStyle !== "function") {
27222
+ return false;
27223
+ }
27224
+ return getComputedStyle(document.documentElement).getPropertyValue(CSS_LOADED_VAR_NAME).trim() === CSS_LOADED_VALUE;
27225
+ }
27226
+ function getColumnHeaderHeightFromCSSValue(value, state) {
27227
+ if (!value) {
27228
+ return null;
27229
+ }
27230
+ return state.columnHeaderHeightCSSVar === DEFAULT_COLUMN_HEADER_HEIGHT_CSS_VALUE ? Math.round(value) : value;
27231
+ }
27232
+
26918
27233
  // src/components/InfiniteTable/state/computeColumnGroupsDepths.ts
26919
27234
  function computeColumnGroupsDepths(columnGroups, columnGroupVisibility) {
26920
27235
  const map2 = /* @__PURE__ */ new Map();
@@ -27483,7 +27798,9 @@ var forwardProps4 = (_setupState) => {
27483
27798
  pivotGrandTotalColumnPosition: 1,
27484
27799
  // groupRenderStrategy: (groupRenderStrategy) =>
27485
27800
  // groupRenderStrategy ?? 'multi-column',
27486
- licenseKey: (licenseKey) => licenseKey || "",
27801
+ // keep undefined - it means "use InfiniteTable.licenseKey", while an
27802
+ // empty string means "no license key"
27803
+ licenseKey: (licenseKey) => licenseKey,
27487
27804
  keyboardSelection: (keyboardSelection) => keyboardSelection ?? true,
27488
27805
  multiRowSelectionWith: (multiRowSelectionWith) => multiRowSelectionWith ?? "checkbox",
27489
27806
  activeRowIndex: 1,
@@ -27493,7 +27810,12 @@ var forwardProps4 = (_setupState) => {
27493
27810
  showZebraRows: (showZebraRows) => showZebraRows ?? true,
27494
27811
  showHoverRows: (showHoverRows) => showHoverRows ?? true,
27495
27812
  virtualizeColumns: (virtualizeColumns) => virtualizeColumns ?? true,
27496
- rowHeight: (rowHeight) => typeof rowHeight === "number" || typeof rowHeight === "function" ? rowHeight : 0,
27813
+ rowHeight: (rowHeight) => typeof rowHeight === "number" || typeof rowHeight === "function" ? rowHeight : (
27814
+ // when not specified, the row height comes from the theme (and density)
27815
+ // via a CSS watcher - but we start with the old default, so the first render
27816
+ // is the same as before
27817
+ rowHeight === DEFAULT_ROW_HEIGHT_CSS_VALUE ? DEFAULT_ROW_HEIGHT : 0
27818
+ ),
27497
27819
  rowDetailHeight: (rowDetailHeight) => typeof rowDetailHeight === "number" || typeof rowDetailHeight === "function" ? rowDetailHeight : 300,
27498
27820
  columnHeaderHeight: (columnHeaderHeight) => typeof columnHeaderHeight === "number" ? columnHeaderHeight : 30,
27499
27821
  columns: 1,
@@ -27581,8 +27903,10 @@ function getMappedCallbacks2() {
27581
27903
  var mapPropsToState = (params) => {
27582
27904
  const { props, state, oldState, parentState } = params;
27583
27905
  const computedColumnGroups = state.pivotColumnGroups || state.columnGroups;
27584
- const columnGroupsDepthsMap = state.columnGroups && state.columnGroups != oldState?.columnGroups || state.columnGroups && state.columnGroupVisibility != oldState?.columnGroupVisibility || state.pivotColumnGroups && state.pivotColumnGroups != oldState?.pivotColumnGroups ? computeColumnGroupsDepths(
27585
- computedColumnGroups,
27906
+ const columnGroupsDepthsMap = state.columnGroups && state.columnGroups != oldState?.columnGroups || state.columnGroups && state.columnGroupVisibility != oldState?.columnGroupVisibility || // also when the pivot column groups go away, as the header has to go back
27907
+ // to the depth of `columnGroups` (or to a single row, when there are none)
27908
+ state.pivotColumnGroups != oldState?.pivotColumnGroups ? computeColumnGroupsDepths(
27909
+ computedColumnGroups ?? EMPTY_OBJECT,
27586
27910
  state.columnGroupVisibility
27587
27911
  ) : state.columnGroupsDepthsMap;
27588
27912
  const groupBy = parentState?.groupBy;
@@ -27649,7 +27973,10 @@ var mapPropsToState = (params) => {
27649
27973
  computedColumnGroups,
27650
27974
  rowHeightCSSVar: typeof props.rowHeight === "string" ? props.rowHeight : "",
27651
27975
  rowDetailHeightCSSVar: typeof props.rowDetailHeight === "string" ? props.rowDetailHeight : "",
27652
- columnHeaderHeightCSSVar: typeof props.columnHeaderHeight === "string" ? props.columnHeaderHeight || ThemeVars.components.Header.columnHeaderHeight : ""
27976
+ columnHeaderHeightCSSVar: typeof props.columnHeaderHeight === "string" ? !props.columnHeaderHeight || props.columnHeaderHeight === DEFAULT_COLUMN_HEADER_HEIGHT ? (
27977
+ // the theme column header height, scaled by the density
27978
+ DEFAULT_COLUMN_HEADER_HEIGHT_CSS_VALUE
27979
+ ) : props.columnHeaderHeight : ""
27653
27980
  };
27654
27981
  if (state.devToolsDetected && state.debugId) {
27655
27982
  const devToolsOverrides = DEV_TOOLS_INFINITE_OVERRIDES.get(state.debugId);
@@ -27797,6 +28124,8 @@ var LoadingIcon = (props) => {
27797
28124
  className: join(
27798
28125
  props.className,
27799
28126
  LoadingIconCls,
28127
+ IconCustomMaskCls.loading,
28128
+ LoadingIconSpinWhenCustomCls,
27800
28129
  "InfiniteIcon",
27801
28130
  "InfiniteIcon-loading"
27802
28131
  )
@@ -28814,8 +29143,9 @@ function useComputed(options) {
28814
29143
  };
28815
29144
  });
28816
29145
  (0, import_react50.useState)(() => {
28817
- onRowHeightCSSVarChange.onChange((rowHeight2) => {
28818
- if (rowHeight2) {
29146
+ onRowHeightCSSVarChange.onChange((value) => {
29147
+ const rowHeight2 = getRowHeightFromCSSValue(value, getState());
29148
+ if (rowHeight2 != null) {
28819
29149
  componentActions.rowHeight = rowHeight2;
28820
29150
  }
28821
29151
  });
@@ -28830,8 +29160,12 @@ function useComputed(options) {
28830
29160
  componentActions.rowDetailHeight = rowDetailHeight2;
28831
29161
  }
28832
29162
  });
28833
- onColumnHeaderHeightCSSVarChange.onChange((columnHeaderHeight) => {
28834
- if (columnHeaderHeight) {
29163
+ onColumnHeaderHeightCSSVarChange.onChange((value) => {
29164
+ const columnHeaderHeight = getColumnHeaderHeightFromCSSValue(
29165
+ value,
29166
+ getState()
29167
+ );
29168
+ if (columnHeaderHeight != null) {
28835
29169
  componentActions.columnHeaderHeight = columnHeaderHeight;
28836
29170
  }
28837
29171
  });
@@ -29076,7 +29410,7 @@ var logLicenseError = (lines, fn = console.error.bind(console)) => {
29076
29410
  });
29077
29411
  fn("*".repeat(max));
29078
29412
  };
29079
- var isValidLicense = (licenseKey = "", packageInfo, fn) => {
29413
+ var checkLicense = (licenseKey = "", packageInfo, fn) => {
29080
29414
  let details;
29081
29415
  try {
29082
29416
  details = decode(licenseKey);
@@ -29089,7 +29423,7 @@ var isValidLicense = (licenseKey = "", packageInfo, fn) => {
29089
29423
  ],
29090
29424
  fn
29091
29425
  );
29092
- return false;
29426
+ return "invalid";
29093
29427
  }
29094
29428
  const currentVersionReleaseDate = new Date(packageInfo.publishedAt);
29095
29429
  const licenseEndDate = new Date(details.end);
@@ -29105,14 +29439,16 @@ Your Infinite Table license has expired on ${licenseEndDate.toDateString()}.
29105
29439
  ],
29106
29440
  fn
29107
29441
  );
29108
- return false;
29442
+ return "expired";
29109
29443
  }
29110
- return true;
29444
+ return "valid";
29111
29445
  };
29112
29446
  var decode = (licenseKey) => {
29113
29447
  let crc = "";
29114
29448
  let fields = licenseKey.split("|").map((part) => {
29115
- let [name, value] = part.split("=");
29449
+ const separatorIndex = part.indexOf("=");
29450
+ const name = separatorIndex === -1 ? part : part.slice(0, separatorIndex);
29451
+ const value = separatorIndex === -1 ? "" : part.slice(separatorIndex + 1);
29116
29452
  if (name === "C") {
29117
29453
  crc = value;
29118
29454
  }
@@ -29149,40 +29485,29 @@ var decode = (licenseKey) => {
29149
29485
  return fieldsToLicenseDetails(fields);
29150
29486
  };
29151
29487
 
29488
+ // src/components/InfiniteTable/hooks/useLicense/getLicenseStatus.ts
29489
+ function getLicenseStatus(licenseKey = "", options) {
29490
+ if (options.isDetail) {
29491
+ return "valid";
29492
+ }
29493
+ const result = checkLicense(licenseKey, {
29494
+ publishedAt: 1794927344373,
29495
+ version: "10.2.0"
29496
+ });
29497
+ if (result === "invalid" && !licenseKey) {
29498
+ return "missing";
29499
+ }
29500
+ return result;
29501
+ }
29502
+
29152
29503
  // src/components/InfiniteTable/hooks/useLicense/useLicense.ts
29153
- var SANDPACK_REGEX = /(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g;
29154
- var SANDBOX_REGEX = /(https):\/\/\S+(\.csb\.app)/g;
29155
- var origin = typeof window !== "undefined" ? window.location.origin : "";
29156
- var isInsideSandpack = () => {
29157
- const [_fullUrl, protocol, sandpackUrl] = Array.from(
29158
- SANDPACK_REGEX.exec(origin) || []
29159
- );
29160
- return protocol === "https" && sandpackUrl === "sandpack.codesandbox.io";
29161
- };
29162
- var isInsideSandbox = () => {
29163
- const [_fullUrl, protocol, sandboxUrl] = Array.from(
29164
- SANDBOX_REGEX.exec(origin) || []
29165
- );
29166
- return protocol === "https" && sandboxUrl === ".csb.app";
29167
- };
29168
- var isInsidePlayground = isInsideSandbox() || isInsideSandpack();
29169
29504
  var useLicense = (licenseKey = "") => {
29170
29505
  const masterRowInfo = useMasterRowInfo();
29171
29506
  const isDetail = !!masterRowInfo;
29172
- const valid = (0, import_react51.useMemo)(() => {
29173
- if (isDetail) {
29174
- return true;
29175
- }
29176
- let valid2 = isValidLicense(licenseKey, {
29177
- publishedAt: 1624970570587,
29178
- version: "10.1.4"
29179
- });
29180
- if (!licenseKey && !valid2 && isInsidePlayground) {
29181
- return true;
29182
- }
29183
- return valid2;
29184
- }, [licenseKey, isDetail]);
29185
- return valid;
29507
+ return (0, import_react51.useMemo)(
29508
+ () => getLicenseStatus(licenseKey, { isDetail }),
29509
+ [licenseKey, isDetail]
29510
+ );
29186
29511
  };
29187
29512
 
29188
29513
  // src/components/InfiniteTable/hooks/useScrollToActiveCell.ts
@@ -31841,13 +32166,13 @@ var React68 = __toESM(require("react"));
31841
32166
  // src/components/InfiniteTable/components/icons/ClearIcon.tsx
31842
32167
  var React66 = __toESM(require("react"));
31843
32168
  var ClearIcon = (props) => {
31844
- return /* @__PURE__ */ React66.createElement(Icon, { ...props }, /* @__PURE__ */ React66.createElement("path", { d: iconPaths.clear[0] }));
32169
+ return /* @__PURE__ */ React66.createElement(Icon, { ...props, icon: "clear" }, /* @__PURE__ */ React66.createElement("path", { d: iconPaths.clear[0] }));
31845
32170
  };
31846
32171
 
31847
32172
  // src/components/InfiniteTable/components/icons/DoneIcon.tsx
31848
32173
  var React67 = __toESM(require("react"));
31849
32174
  var DoneIcon = (props) => {
31850
- return /* @__PURE__ */ React67.createElement(Icon, { ...props }, /* @__PURE__ */ React67.createElement("path", { d: iconPaths.done[0] }));
32175
+ return /* @__PURE__ */ React67.createElement(Icon, { ...props, icon: "done" }, /* @__PURE__ */ React67.createElement("path", { d: iconPaths.done[0] }));
31851
32176
  };
31852
32177
 
31853
32178
  // src/components/InfiniteTable/utils/getFilterOperatorMenuForColumn.tsx
@@ -33052,7 +33377,7 @@ var import_react69 = require("react");
33052
33377
 
33053
33378
  // src/components/InfiniteTable/components/GroupingToolbar/index.css.ts
33054
33379
  var GroupingToolbarItemClearCls = "hs68h8j _16lm1iwk _16lm1iwx _16lm1iw2n";
33055
- var GroupingToolbarItemRecipe = createRuntimeFn({ defaultClassName: "hs68h8e _16lm1iw12 _16lm1iw1x _16lm1iw2j _16lm1iw1p", variantClassNames: { active: { true: "hs68h8f _16lm1iwn _16lm1iw1h", false: "_16lm1iwo" }, draggingInProgress: { true: "hs68h8h", false: "hs68h8i" } }, defaultVariants: {}, compoundVariants: [] });
33380
+ var GroupingToolbarItemRecipe = createRuntimeFn({ defaultClassName: "hs68h8e _16lm1iw1x _16lm1iw2j _16lm1iw1p", variantClassNames: { active: { true: "hs68h8f _16lm1iwn _16lm1iw1h", false: "_16lm1iwo" }, draggingInProgress: { true: "hs68h8h", false: "hs68h8i" } }, defaultVariants: {}, compoundVariants: [] });
33056
33381
  var GroupingToolbarPlaceholderCls = "hs68h81";
33057
33382
  var GroupingToolbarRecipe = createRuntimeFn({ defaultClassName: "hs68h80 _16lm1iw1p", variantClassNames: { orientation: { horizontal: "_16lm1iw2h _16lm1iw2j", vertical: "_16lm1iw2f" }, draggingInProgress: { true: "_16lm1iw1h", false: "hs68h86" }, dropRejected: { true: "hs68h87", false: "hs68h88" }, active: { true: "hs68h89", false: "hs68h8a" } }, defaultVariants: {}, compoundVariants: [[{ dropRejected: true, active: true }, "hs68h8b"], [{ dropRejected: false, active: true }, "hs68h8c"], [{ active: false, dropRejected: false }, "hs68h8d"]] });
33058
33383
 
@@ -33120,8 +33445,8 @@ var getFastClickHandler = (callback, prevHandler) => {
33120
33445
  };
33121
33446
  function GroupingToolbarItem(props) {
33122
33447
  const { column, onClear, components: components2, field, id, toggleSorting } = props;
33123
- const { dragSourceListId, dragItemId } = useDragListContext();
33124
- const draggingInProgress = dragSourceListId === GROUPING_TOOLBAR_DRAG_LIST_ID;
33448
+ const { dragSourceListId, dragItemId, dragListId } = useDragListContext();
33449
+ const draggingInProgress = dragSourceListId === dragListId;
33125
33450
  const context = useInfiniteTableStableContext();
33126
33451
  const columnHeader = (column ? getColumnLabel(column.id, context, "grouping-toolbar") : field) ?? id;
33127
33452
  const sortIcon = column ? /* @__PURE__ */ React73.createElement(
@@ -33133,7 +33458,7 @@ function GroupingToolbarItem(props) {
33133
33458
  }
33134
33459
  ) : null;
33135
33460
  const header = /* @__PURE__ */ React73.createElement(React73.Fragment, null, columnHeader, sortIcon);
33136
- const active = dragItemId === id && dragSourceListId === GROUPING_TOOLBAR_DRAG_LIST_ID;
33461
+ const active = dragItemId === id && dragSourceListId === dragListId;
33137
33462
  const className = join(
33138
33463
  GroupingToolbarItemRecipe({
33139
33464
  draggingInProgress,
@@ -33163,7 +33488,6 @@ function GroupingToolbarItem(props) {
33163
33488
  }
33164
33489
  );
33165
33490
  }
33166
- var GROUPING_TOOLBAR_DRAG_LIST_ID = "grouping-toolbar";
33167
33491
  function GroupingToolbar(props) {
33168
33492
  const { groupBy } = useDataSourceSelector((ctx) => {
33169
33493
  return {
@@ -33181,8 +33505,14 @@ function GroupingToolbar(props) {
33181
33505
  );
33182
33506
  const { dropTargetListId, dragSourceListId } = useDragDropProvider();
33183
33507
  const { fieldsToColumn, computedColumnsMap } = getComputed();
33184
- const active = dropTargetListId === GROUPING_TOOLBAR_DRAG_LIST_ID;
33185
- const draggingInProgress = dragSourceListId === GROUPING_TOOLBAR_DRAG_LIST_ID;
33508
+ const dragListId = useDragListId(GROUPING_TOOLBAR_DRAG_LIST_NAME);
33509
+ const headerDragListId = useDragListId(HEADER_DRAG_LIST_NAME);
33510
+ const acceptDropsFrom = (0, import_react69.useMemo)(
33511
+ () => [headerDragListId, dragListId],
33512
+ [headerDragListId, dragListId]
33513
+ );
33514
+ const active = dropTargetListId === dragListId;
33515
+ const draggingInProgress = dragSourceListId === dragListId;
33186
33516
  const PlaceholderComponent = props.components?.Placeholder ?? PlaceholderDefault;
33187
33517
  const HostComponent = props.components?.Host ?? HostDefault;
33188
33518
  const children = !groupBy.length ? /* @__PURE__ */ React73.createElement(
@@ -33255,8 +33585,8 @@ function GroupingToolbar(props) {
33255
33585
  DragList,
33256
33586
  {
33257
33587
  orientation,
33258
- dragListId: GROUPING_TOOLBAR_DRAG_LIST_ID,
33259
- acceptDropsFrom: ["header", GROUPING_TOOLBAR_DRAG_LIST_ID],
33588
+ dragListId,
33589
+ acceptDropsFrom,
33260
33590
  onDrop,
33261
33591
  dragStrategy: "inline",
33262
33592
  onAcceptDrop,
@@ -34131,15 +34461,6 @@ function useInfiniteColumnApi(columnId) {
34131
34461
  return useInfiniteTableSelector((ctx) => ctx.api.getColumnApi(columnId));
34132
34462
  }
34133
34463
 
34134
- // src/components/InfiniteTable/utils/toCSSVarName.ts
34135
- var toCSSVarName = (value) => `--infinite-${value}`;
34136
-
34137
- // src/components/InfiniteTable/shared.ts
34138
- var DEFAULT_ROW_HEIGHT = 40;
34139
- var DEFAULT_COLUMN_HEADER_HEIGHT = toCSSVarName(
34140
- columnHeaderHeightName
34141
- );
34142
-
34143
34464
  // src/components/InfiniteTable/index.tsx
34144
34465
  var InfiniteTableClassName = internalProps.rootClassName;
34145
34466
  var { ManagedComponentContextProvider: InfiniteTableRoot } = buildManagedComponent({
@@ -34206,7 +34527,7 @@ var InfiniteTableComponent = React79.memo(
34206
34527
  activeCellIndex
34207
34528
  } = componentState;
34208
34529
  let { licenseKey } = componentState;
34209
- if (!licenseKey && InfiniteTable.licenseKey) {
34530
+ if (licenseKey === void 0 && InfiniteTable.licenseKey) {
34210
34531
  licenseKey = InfiniteTable.licenseKey;
34211
34532
  }
34212
34533
  useScrollToActiveRow(activeRowIndex, dataArrayLength, api);
@@ -34225,7 +34546,7 @@ var InfiniteTableComponent = React79.memo(
34225
34546
  );
34226
34547
  return brain.onVerticalRenderRangeChange(onChange);
34227
34548
  }, [brain, scrollStopDelay]);
34228
- const licenseValid = useLicense(licenseKey);
34549
+ const licenseStatus = useLicense(licenseKey);
34229
34550
  const {
34230
34551
  // remove autoFocus and tabIndex from the domProps
34231
34552
  // that will be spread on the root DOM element
@@ -34326,7 +34647,7 @@ var InfiniteTableComponent = React79.memo(
34326
34647
  onChange: onColumnHeaderHeightCSSVarChange
34327
34648
  }
34328
34649
  ) : null,
34329
- licenseValid ? null : /* @__PURE__ */ React79.createElement(InfiniteTableLicenseFooter, null),
34650
+ licenseStatus === "valid" ? null : /* @__PURE__ */ React79.createElement(InfiniteTableLicenseFooter, { invalid: licenseStatus === "invalid" }),
34330
34651
  /* @__PURE__ */ React79.createElement(FocusDetect, null)
34331
34652
  );
34332
34653
  }
@@ -34423,7 +34744,7 @@ var InfiniteTable = function(props) {
34423
34744
  InfiniteTableRoot,
34424
34745
  {
34425
34746
  repeatWrappedGroupRows: !!props.wrapRowsHorizontally,
34426
- rowHeight: DEFAULT_ROW_HEIGHT,
34747
+ rowHeight: DEFAULT_ROW_HEIGHT_CSS_VALUE,
34427
34748
  columnHeaderHeight: DEFAULT_COLUMN_HEADER_HEIGHT,
34428
34749
  ...props
34429
34750
  },