@infinite-table/infinite-react 3.0.7 → 3.0.9
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.css +1 -1
- package/index.d.ts +2 -1
- package/index.dev.js +335 -257
- package/index.dev.mjs +140 -62
- package/index.js +5 -5
- package/index.mjs +5 -5
- package/package.json +2 -2
package/index.dev.js
CHANGED
|
@@ -1381,7 +1381,7 @@ function stripVar(cssVariableWithVarString) {
|
|
|
1381
1381
|
|
|
1382
1382
|
// src/components/InfiniteTable/theme.css.ts
|
|
1383
1383
|
var InternalVars = { currentColumnTransformX: "var(--currentColumnTransformX__1slvgu90)", currentColumnTransformY: "var(--currentColumnTransformY__1slvgu91)", activeCellRowOffset: "var(--activeCellRowOffset__1slvgu92)", activeCellRowHeight: "var(--activeCellRowHeight__1slvgu93)", activeCellOffsetX: "var(--activeCellOffsetX__1slvgu94)", activeCellOffsetY: "var(--activeCellOffsetY__1slvgu95)", scrollTopForActiveRow: "var(--scrollTopForActiveRow__1slvgu96)", activeCellColWidth: "var(--activeCellColWidth__1slvgu97)", activeCellColOffset: "var(--activeCellColOffset__1slvgu98)", columnReorderEffectDurationAtIndex: "var(--columnReorderEffectDurationAtIndex__1slvgu99)", columnWidthAtIndex: "var(--columnWidthAtIndex__1slvgu9a)", columnOffsetAtIndex: "var(--columnOffsetAtIndex__1slvgu9b)", columnOffsetAtIndexWhileReordering: "var(--columnOffsetAtIndexWhileReordering__1slvgu9c)", columnZIndexAtIndex: "var(--columnZIndexAtIndex__1slvgu9d)", pinnedStartWidth: "var(--pinnedStartWidth__1slvgu9e)", pinnedEndWidth: "var(--pinnedEndWidth__1slvgu9f)", pinnedEndOffset: "var(--pinnedEndOffset__1slvgu9g)", computedVisibleColumnsCount: "var(--computedVisibleColumnsCount__1slvgu9h)", baseZIndexForCells: "var(--baseZIndexForCells__1slvgu9i)", bodyWidth: "var(--bodyWidth__1slvgu9j)", bodyHeight: "var(--bodyHeight__1slvgu9k)", scrollbarWidthHorizontal: "var(--scrollbarWidthHorizontal__1slvgu9l)", scrollbarWidthVertical: "var(--scrollbarWidthVertical__1slvgu9m)", scrollLeft: "var(--scrollLeft__1slvgu9n)", scrollTop: "var(--scrollTop__1slvgu9o)" };
|
|
1384
|
-
var ThemeVars = { color: { accent: "var(--infinite-accent-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)", background: "var(--infinite-background)", iconSize: "var(--infinite-icon-size)", components: { 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)", 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)", 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)" }, Cell: { padding: "var(--infinite-cell-padding)", borderWidth: "var(--infinite-cell-border-width)", border: "var(--infinite-cell-border)", 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)", color: "var(--infinite-cell-color)", selectedBackground: "var(--infinite-selected-cell-background)", 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)", 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)" }, Menu: { background: "var(--infinite-menu-background)", color: "var(--infinite-menu-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)" }, Row: { background: "var(--infinite-row-background)", oddBackground: "var(--infinite-row-odd-background)", selectedBackground: "var(--infinite-row-selected-background)", 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)", 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)" } } };
|
|
1384
|
+
var ThemeVars = { color: { accent: "var(--infinite-accent-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)", background: "var(--infinite-background)", iconSize: "var(--infinite-icon-size)", components: { 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)", 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)", 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)" }, Cell: { padding: "var(--infinite-cell-padding)", borderWidth: "var(--infinite-cell-border-width)", border: "var(--infinite-cell-border)", 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)", color: "var(--infinite-cell-color)", selectedBackground: "var(--infinite-selected-cell-background)", 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)", 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)" }, Menu: { background: "var(--infinite-menu-background)", color: "var(--infinite-menu-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)" }, Row: { background: "var(--infinite-row-background)", oddBackground: "var(--infinite-row-odd-background)", selectedBackground: "var(--infinite-row-selected-background)", 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)", 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)" } } };
|
|
1385
1385
|
var columnHeaderHeightName = "column-header-height";
|
|
1386
1386
|
|
|
1387
1387
|
// src/utils/selectParent.ts
|
|
@@ -4952,7 +4952,7 @@ var InfiniteTableFooter = React15.forwardRef(
|
|
|
4952
4952
|
|
|
4953
4953
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderCell.tsx
|
|
4954
4954
|
var React42 = __toESM(require("react"));
|
|
4955
|
-
var
|
|
4955
|
+
var import_react29 = require("react");
|
|
4956
4956
|
var import_react_dom = require("react-dom");
|
|
4957
4957
|
|
|
4958
4958
|
// src/utils/keyMirror.ts
|
|
@@ -5040,7 +5040,7 @@ var React29 = __toESM(require("react"));
|
|
|
5040
5040
|
|
|
5041
5041
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableColumnHeaderFilter.tsx
|
|
5042
5042
|
var React28 = __toESM(require("react"));
|
|
5043
|
-
var
|
|
5043
|
+
var import_react20 = require("react");
|
|
5044
5044
|
|
|
5045
5045
|
// src/components/InfiniteTable/hooks/useInfiniteTable.ts
|
|
5046
5046
|
var import_react16 = require("react");
|
|
@@ -5063,12 +5063,37 @@ var useInfiniteTable = () => {
|
|
|
5063
5063
|
return (0, import_react16.useContext)(TableContext2);
|
|
5064
5064
|
};
|
|
5065
5065
|
|
|
5066
|
+
// src/components/InfiniteTable/hooks/useInfiniteTableState.ts
|
|
5067
|
+
var import_react17 = require("react");
|
|
5068
|
+
var useInfiniteTableState = () => {
|
|
5069
|
+
const TableContext2 = getInfiniteTableContext();
|
|
5070
|
+
const { state } = (0, import_react17.useContext)(TableContext2);
|
|
5071
|
+
return state;
|
|
5072
|
+
};
|
|
5073
|
+
|
|
5066
5074
|
// src/components/InfiniteTable/components/icons/FilterIcon.tsx
|
|
5067
5075
|
var React26 = __toESM(require("react"));
|
|
5068
|
-
var
|
|
5076
|
+
var import_react18 = require("react");
|
|
5069
5077
|
|
|
5070
|
-
// ../node_modules/@vanilla-extract/recipes/
|
|
5078
|
+
// ../node_modules/@vanilla-extract/recipes/dist/createRuntimeFn-f8e161c6.esm.js
|
|
5079
|
+
function _toPrimitive(input, hint) {
|
|
5080
|
+
if (typeof input !== "object" || input === null)
|
|
5081
|
+
return input;
|
|
5082
|
+
var prim = input[Symbol.toPrimitive];
|
|
5083
|
+
if (prim !== void 0) {
|
|
5084
|
+
var res = prim.call(input, hint || "default");
|
|
5085
|
+
if (typeof res !== "object")
|
|
5086
|
+
return res;
|
|
5087
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
5088
|
+
}
|
|
5089
|
+
return (hint === "string" ? String : Number)(input);
|
|
5090
|
+
}
|
|
5091
|
+
function _toPropertyKey(arg) {
|
|
5092
|
+
var key = _toPrimitive(arg, "string");
|
|
5093
|
+
return typeof key === "symbol" ? key : String(key);
|
|
5094
|
+
}
|
|
5071
5095
|
function _defineProperty(obj, key, value) {
|
|
5096
|
+
key = _toPropertyKey(key);
|
|
5072
5097
|
if (key in obj) {
|
|
5073
5098
|
Object.defineProperty(obj, key, {
|
|
5074
5099
|
value,
|
|
@@ -5102,6 +5127,13 @@ function _objectSpread2(target) {
|
|
|
5102
5127
|
}
|
|
5103
5128
|
return target;
|
|
5104
5129
|
}
|
|
5130
|
+
function mapValues(input, fn) {
|
|
5131
|
+
var result = {};
|
|
5132
|
+
for (var _key in input) {
|
|
5133
|
+
result[_key] = fn(input[_key], _key);
|
|
5134
|
+
}
|
|
5135
|
+
return result;
|
|
5136
|
+
}
|
|
5105
5137
|
var shouldApplyCompound = (compoundCheck, selections, defaultVariants) => {
|
|
5106
5138
|
for (var key of Object.keys(compoundCheck)) {
|
|
5107
5139
|
var _selections$key;
|
|
@@ -5111,52 +5143,64 @@ var shouldApplyCompound = (compoundCheck, selections, defaultVariants) => {
|
|
|
5111
5143
|
}
|
|
5112
5144
|
return true;
|
|
5113
5145
|
};
|
|
5114
|
-
var createRuntimeFn = (config) =>
|
|
5115
|
-
var
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
var
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5146
|
+
var createRuntimeFn = (config) => {
|
|
5147
|
+
var runtimeFn = (options) => {
|
|
5148
|
+
var className = config.defaultClassName;
|
|
5149
|
+
var selections = _objectSpread2(_objectSpread2({}, config.defaultVariants), options);
|
|
5150
|
+
for (var variantName in selections) {
|
|
5151
|
+
var _selections$variantNa;
|
|
5152
|
+
var variantSelection = (_selections$variantNa = selections[variantName]) !== null && _selections$variantNa !== void 0 ? _selections$variantNa : config.defaultVariants[variantName];
|
|
5153
|
+
if (variantSelection != null) {
|
|
5154
|
+
var selection = variantSelection;
|
|
5155
|
+
if (typeof selection === "boolean") {
|
|
5156
|
+
selection = selection === true ? "true" : "false";
|
|
5157
|
+
}
|
|
5158
|
+
var selectionClassName = (
|
|
5159
|
+
// @ts-expect-error
|
|
5160
|
+
config.variantClassNames[variantName][selection]
|
|
5161
|
+
);
|
|
5162
|
+
if (selectionClassName) {
|
|
5163
|
+
className += " " + selectionClassName;
|
|
5164
|
+
}
|
|
5131
5165
|
}
|
|
5132
5166
|
}
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5167
|
+
for (var [compoundCheck, compoundClassName] of config.compoundVariants) {
|
|
5168
|
+
if (shouldApplyCompound(compoundCheck, selections, config.defaultVariants)) {
|
|
5169
|
+
className += " " + compoundClassName;
|
|
5170
|
+
}
|
|
5137
5171
|
}
|
|
5138
|
-
|
|
5139
|
-
|
|
5172
|
+
return className;
|
|
5173
|
+
};
|
|
5174
|
+
runtimeFn.variants = () => Object.keys(config.variantClassNames);
|
|
5175
|
+
runtimeFn.classNames = {
|
|
5176
|
+
get base() {
|
|
5177
|
+
return config.defaultClassName.split(" ")[0];
|
|
5178
|
+
},
|
|
5179
|
+
get variants() {
|
|
5180
|
+
return mapValues(config.variantClassNames, (classNames) => mapValues(classNames, (className) => className.split(" ")[0]));
|
|
5181
|
+
}
|
|
5182
|
+
};
|
|
5183
|
+
return runtimeFn;
|
|
5140
5184
|
};
|
|
5141
5185
|
|
|
5142
5186
|
// src/components/InfiniteTable/components/InfiniteTableHeader/header.css.ts
|
|
5143
5187
|
var CellCls = "cell_CellCls__1eexc2a5 utilities_display_flex__16lm1iwy utilities_flexFlow_row__16lm1iw1n utilities_alignItems_center__16lm1iw1p utilities_position_absolute__16lm1iw2 utilities_willChange_transform__16lm1iw21 utilities_whiteSpace_nowrap__16lm1iw22 utilities_userSelect_none__16lm1iw16";
|
|
5144
|
-
var HeaderCellContentRecipe = createRuntimeFn({ defaultClassName: "
|
|
5145
|
-
var HeaderCellProxy = "
|
|
5146
|
-
var HeaderCellRecipe = createRuntimeFn({ defaultClassName: "
|
|
5147
|
-
var HeaderClsRecipe = createRuntimeFn({ defaultClassName: "
|
|
5148
|
-
var
|
|
5149
|
-
var
|
|
5150
|
-
var
|
|
5151
|
-
var
|
|
5152
|
-
var
|
|
5153
|
-
var HeaderGroupCls = "
|
|
5154
|
-
var HeaderMenuIconCls = createRuntimeFn({ defaultClassName: "
|
|
5155
|
-
var HeaderScrollbarPlaceholderCls = "
|
|
5188
|
+
var HeaderCellContentRecipe = createRuntimeFn({ defaultClassName: "header_HeaderCellContentRecipe__12zfob11y utilities_height_100%__16lm1iw18 utilities_width_100%__16lm1iw1a utilities_display_flex__16lm1iwy utilities_flexFlow_row__16lm1iw1n utilities_alignItems_center__16lm1iw1p utilities_justifyContent_start__16lm1iw1u", variantClassNames: { filtered: { false: "header_HeaderCellContentRecipe_filtered_false__12zfob11z", true: "header_HeaderCellContentRecipe_filtered_true__12zfob120" }, verticalAlign: { start: "header_HeaderCellContentRecipe_verticalAlign_start__12zfob121", end: "header_HeaderCellContentRecipe_verticalAlign_end__12zfob122", center: "header_HeaderCellContentRecipe_verticalAlign_center__12zfob123" }, align: { start: "header_HeaderCellContentRecipe_align_start__12zfob124", end: "header_HeaderCellContentRecipe_align_end__12zfob125", center: "header_HeaderCellContentRecipe_align_center__12zfob126" } }, defaultVariants: {}, compoundVariants: [] });
|
|
5189
|
+
var HeaderCellProxy = "header_HeaderCellProxy__12zfob1n utilities_whiteSpace_nowrap__16lm1iw22 utilities_textOverflow_ellipsis__16lm1iw23 utilities_overflow_hidden__16lm1iw1w";
|
|
5190
|
+
var HeaderCellRecipe = createRuntimeFn({ defaultClassName: "header_HeaderCellRecipe__12zfob1o utilities_display_block__16lm1iw11", variantClassNames: { rowActive: { false: "header_HeaderCellRecipe_rowActive_false__12zfob1p", true: "header_HeaderCellRecipe_rowActive_true__12zfob1q" }, cellSelected: { false: "header_HeaderCellRecipe_cellSelected_false__12zfob1r", true: "header_HeaderCellRecipe_cellSelected_true__12zfob1s" }, rowSelected: { false: "header_HeaderCellRecipe_rowSelected_false__12zfob1t", true: "header_HeaderCellRecipe_rowSelected_true__12zfob1u", null: "header_HeaderCellRecipe_rowSelected_null__12zfob1v" }, groupRow: { false: "header_HeaderCellRecipe_groupRow_false__12zfob1w", true: "header_HeaderCellRecipe_groupRow_true__12zfob1x" }, groupCell: { false: "header_HeaderCellRecipe_groupCell_false__12zfob1y", true: "header_HeaderCellRecipe_groupCell_true__12zfob1z" }, align: { start: "header_HeaderCellRecipe_align_start__12zfob110", end: "header_HeaderCellRecipe_align_end__12zfob111", center: "header_HeaderCellRecipe_align_center__12zfob112" }, verticalAlign: { start: "header_HeaderCellRecipe_verticalAlign_start__12zfob113", end: "header_HeaderCellRecipe_verticalAlign_end__12zfob114", center: "header_HeaderCellRecipe_verticalAlign_center__12zfob115" }, zebra: { false: "header_HeaderCellRecipe_zebra_false__12zfob116", even: "header_HeaderCellRecipe_zebra_even__12zfob117", odd: "header_HeaderCellRecipe_zebra_odd__12zfob118" }, dragging: { true: "header_HeaderCellRecipe_dragging_true__12zfob119", false: "header_HeaderCellRecipe_dragging_false__12zfob11a" }, first: { true: "header_HeaderCellRecipe_first_true__12zfob11b", false: "header_HeaderCellRecipe_first_false__12zfob11c" }, last: { true: "header_HeaderCellRecipe_last_true__12zfob11d", false: "header_HeaderCellRecipe_last_false__12zfob11e" }, groupByField: { true: "header_HeaderCellRecipe_groupByField_true__12zfob11f", false: "header_HeaderCellRecipe_groupByField_false__12zfob11g" }, firstInCategory: { true: "header_HeaderCellRecipe_firstInCategory_true__12zfob11h", false: "header_HeaderCellRecipe_firstInCategory_false__12zfob11i" }, lastInCategory: { true: "header_HeaderCellRecipe_lastInCategory_true__12zfob11j", false: "header_HeaderCellRecipe_lastInCategory_false__12zfob11k" }, pinned: { start: "header_HeaderCellRecipe_pinned_start__12zfob11l", end: "header_HeaderCellRecipe_pinned_end__12zfob11m", false: "header_HeaderCellRecipe_pinned_false__12zfob11n" }, filtered: { true: "header_HeaderCellRecipe_filtered_true__12zfob11o", false: "header_HeaderCellRecipe_filtered_false__12zfob11p" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "header_HeaderCellRecipe_compound_0__12zfob11q"], [{ pinned: "end", firstInCategory: true }, "header_HeaderCellRecipe_compound_1__12zfob11r"], [{ pinned: false, lastInCategory: true }, "header_HeaderCellRecipe_compound_2__12zfob11s"]] });
|
|
5191
|
+
var HeaderClsRecipe = createRuntimeFn({ defaultClassName: "header_HeaderClsRecipe__12zfob19 utilities_display_block__16lm1iw11 utilities_position_absolute__16lm1iw2", variantClassNames: { pinned: { start: "header_HeaderClsRecipe_pinned_start__12zfob1a", end: "header_HeaderClsRecipe_pinned_end__12zfob1b", false: "header_HeaderClsRecipe_pinned_false__12zfob1c" }, firstInCategory: { true: "header_HeaderClsRecipe_firstInCategory_true__12zfob1d", false: "header_HeaderClsRecipe_firstInCategory_false__12zfob1e" }, lastInCategory: { true: "header_HeaderClsRecipe_lastInCategory_true__12zfob1f", false: "header_HeaderClsRecipe_lastInCategory_false__12zfob1g" }, overflow: { true: "header_HeaderClsRecipe_overflow_true__12zfob1h", false: "header_HeaderClsRecipe_overflow_false__12zfob1i" } }, defaultVariants: {}, compoundVariants: [[{ overflow: true, pinned: "start" }, "header_HeaderClsRecipe_compound_0__12zfob1j"], [{ pinned: "start", firstInCategory: true }, "header_HeaderClsRecipe_compound_1__12zfob1k"], [{ overflow: true, pinned: "end" }, "header_HeaderClsRecipe_compound_2__12zfob1l"], [{ pinned: "end", lastInCategory: true }, "header_HeaderClsRecipe_compound_3__12zfob1m"]] });
|
|
5192
|
+
var HeaderFilterEditorCls = "header_HeaderFilterEditorCls__12zfob12g utilities_width_100%__16lm1iw1a utilities_height_100%__16lm1iw18";
|
|
5193
|
+
var HeaderFilterIconIndexCls = "header_HeaderFilterIconIndexCls__12zfob17";
|
|
5194
|
+
var HeaderFilterOperatorCls = "header_HeaderFilterOperatorCls__12zfob12c utilities_display_flex__16lm1iwy utilities_flexFlow_row__16lm1iw1n utilities_alignItems_center__16lm1iw1p utilities_position_relative__16lm1iw1";
|
|
5195
|
+
var HeaderFilterOperatorIconRecipe = createRuntimeFn({ defaultClassName: "header_HeaderFilterOperatorIconRecipe__12zfob12d utilities_position_relative__16lm1iw1 utilities_top_0__16lm1iw1b", variantClassNames: { disabled: { true: "header_HeaderFilterOperatorIconRecipe_disabled_true__12zfob12e", false: "header_HeaderFilterOperatorIconRecipe_disabled_false__12zfob12f" } }, defaultVariants: {}, compoundVariants: [] });
|
|
5196
|
+
var HeaderFilterRecipe = createRuntimeFn({ defaultClassName: "header_HeaderFilterRecipe__12zfob129 utilities_display_flex__16lm1iwy utilities_flexFlow_row__16lm1iw1n utilities_alignItems_stretch__16lm1iw1q utilities_position_relative__16lm1iw1", variantClassNames: { active: { true: "header_HeaderFilterRecipe_active_true__12zfob12a", false: "header_HeaderFilterRecipe_active_false__12zfob12b" } }, defaultVariants: {}, compoundVariants: [] });
|
|
5197
|
+
var HeaderGroupCls = "header_HeaderGroupCls__12zfob128 utilities_display_flex__16lm1iwy utilities_flexFlow_row__16lm1iw1n utilities_alignItems_center__16lm1iw1p";
|
|
5198
|
+
var HeaderMenuIconCls = createRuntimeFn({ defaultClassName: "header_HeaderMenuIconCls__12zfob11t utilities_position_relative__16lm1iw1 utilities_display_flex__16lm1iwy utilities_flexFlow_column__16lm1iw1l utilities_justifyContent_spaceAround__16lm1iw1t utilities_visibility_hidden__16lm1iw20", variantClassNames: { menuVisible: { true: "header_HeaderMenuIconCls_menuVisible_true__12zfob11u" }, reserveSpaceWhenHidden: { true: "header_HeaderMenuIconCls_reserveSpaceWhenHidden_true__12zfob11v", false: "header_HeaderMenuIconCls_reserveSpaceWhenHidden_false__12zfob11w" } }, defaultVariants: {}, compoundVariants: [[{ menuVisible: true, reserveSpaceWhenHidden: false }, "header_HeaderMenuIconCls_compound_0__12zfob11x"]] });
|
|
5199
|
+
var HeaderScrollbarPlaceholderCls = "header_HeaderScrollbarPlaceholderCls__12zfob18 utilities_position_absolute__16lm1iw2";
|
|
5156
5200
|
var HeaderSortIconCls = "utilities_position_relative__16lm1iw1";
|
|
5157
|
-
var HeaderSortIconIndexCls = "
|
|
5158
|
-
var HeaderSortIconRecipe = createRuntimeFn({ defaultClassName: "", variantClassNames: { align: { start: "
|
|
5159
|
-
var HeaderWrapperCls = "
|
|
5201
|
+
var HeaderSortIconIndexCls = "header_HeaderSortIconIndexCls__12zfob16";
|
|
5202
|
+
var HeaderSortIconRecipe = createRuntimeFn({ defaultClassName: "header__12zfob12", variantClassNames: { align: { start: "header_HeaderSortIconRecipe_align_start__12zfob13", center: "header_HeaderSortIconRecipe_align_center__12zfob14", end: "header_HeaderSortIconRecipe_align_end__12zfob15" } }, defaultVariants: {}, compoundVariants: [] });
|
|
5203
|
+
var HeaderWrapperCls = "header_HeaderWrapperCls__12zfob127 utilities_overflow_hidden__16lm1iw1w utilities_position_relative__16lm1iw1 utilities_display_flex__16lm1iwy utilities_flexFlow_row__16lm1iw1n";
|
|
5160
5204
|
|
|
5161
5205
|
// src/components/InfiniteTable/components/icons/InfiniteTableIconClassName.ts
|
|
5162
5206
|
var InfiniteTableIconClassName = "InfiniteTableIcon";
|
|
@@ -5172,8 +5216,8 @@ var defaultLineStyle = {
|
|
|
5172
5216
|
};
|
|
5173
5217
|
function FilterIcon(props) {
|
|
5174
5218
|
var _a;
|
|
5175
|
-
const [rendered, setRendered] = (0,
|
|
5176
|
-
const [opacity, setOpacity] = (0,
|
|
5219
|
+
const [rendered, setRendered] = (0, import_react18.useState)(true);
|
|
5220
|
+
const [opacity, setOpacity] = (0, import_react18.useState)(0);
|
|
5177
5221
|
const { lineWidth = 1, style: style2, className, index } = props;
|
|
5178
5222
|
const showIndex = index != null && index > 0;
|
|
5179
5223
|
const size = (_a = props.size) != null ? _a : 16;
|
|
@@ -5184,7 +5228,7 @@ function FilterIcon(props) {
|
|
|
5184
5228
|
}), props.lineStyle), {
|
|
5185
5229
|
opacity
|
|
5186
5230
|
});
|
|
5187
|
-
(0,
|
|
5231
|
+
(0, import_react18.useEffect)(() => {
|
|
5188
5232
|
if (!rendered) {
|
|
5189
5233
|
return;
|
|
5190
5234
|
}
|
|
@@ -5195,7 +5239,7 @@ function FilterIcon(props) {
|
|
|
5195
5239
|
cancelAnimationFrame(rafId);
|
|
5196
5240
|
};
|
|
5197
5241
|
}, [rendered]);
|
|
5198
|
-
(0,
|
|
5242
|
+
(0, import_react18.useLayoutEffect)(() => {
|
|
5199
5243
|
setRendered(true);
|
|
5200
5244
|
}, []);
|
|
5201
5245
|
if (!rendered) {
|
|
@@ -6173,7 +6217,7 @@ function getColumnApiForColumn(colOrColId, param) {
|
|
|
6173
6217
|
getState().onFilterOperatorMenuClick({ target, column });
|
|
6174
6218
|
},
|
|
6175
6219
|
hideFilterOperatorMenu() {
|
|
6176
|
-
|
|
6220
|
+
api.hideFilterOperatorMenu();
|
|
6177
6221
|
},
|
|
6178
6222
|
showContextMenu(target) {
|
|
6179
6223
|
getState().onColumnMenuClick({ target, column });
|
|
@@ -6268,22 +6312,39 @@ function getColumnLabel(colIdOrCol, context) {
|
|
|
6268
6312
|
}
|
|
6269
6313
|
|
|
6270
6314
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableColumnHeaderFilterContext.ts
|
|
6271
|
-
var
|
|
6315
|
+
var import_react19 = __toESM(require("react"));
|
|
6272
6316
|
var InfiniteTableColumnHeaderFilterClassName = `${rootClassName2}HeaderCell__filter`;
|
|
6273
6317
|
var InfiniteTableColumnHeaderFilterOperatorClassName = `${rootClassName2}HeaderCell__filterOperator`;
|
|
6274
|
-
var InfiniteTableColumnHeaderFilterContext =
|
|
6318
|
+
var InfiniteTableColumnHeaderFilterContext = import_react19.default.createContext(null);
|
|
6275
6319
|
|
|
6276
6320
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableColumnHeaderFilter.tsx
|
|
6321
|
+
var InfiniteTableColumnHeaderFilterInputClassName = `${InfiniteTableColumnHeaderFilterClassName}__input`;
|
|
6277
6322
|
var stopPropagation = (e) => e.stopPropagation();
|
|
6278
6323
|
function InfiniteTableColumnHeaderFilter(props) {
|
|
6324
|
+
const { filterOperatorMenuVisibleForColumnId } = useInfiniteTableState();
|
|
6325
|
+
const { column } = useInfiniteHeaderCell();
|
|
6279
6326
|
const FilterEditor = props.filterEditor;
|
|
6280
6327
|
const FilterOperatorSwitch = props.filterOperatorSwitch;
|
|
6328
|
+
const [focused, setFocused] = (0, import_react20.useState)(false);
|
|
6329
|
+
const onFocus = React28.useCallback(() => {
|
|
6330
|
+
setFocused(true);
|
|
6331
|
+
}, []);
|
|
6332
|
+
const onBlur = React28.useCallback(() => {
|
|
6333
|
+
setFocused(false);
|
|
6334
|
+
}, []);
|
|
6335
|
+
const active = filterOperatorMenuVisibleForColumnId === column.id || focused;
|
|
6281
6336
|
return /* @__PURE__ */ React28.createElement(
|
|
6282
6337
|
"div",
|
|
6283
6338
|
{
|
|
6284
6339
|
onPointerUp: stopPropagation,
|
|
6285
6340
|
onPointerDown: stopPropagation,
|
|
6286
|
-
|
|
6341
|
+
onFocus,
|
|
6342
|
+
onBlur,
|
|
6343
|
+
className: `${InfiniteTableColumnHeaderFilterClassName} ${HeaderFilterRecipe(
|
|
6344
|
+
{
|
|
6345
|
+
active
|
|
6346
|
+
}
|
|
6347
|
+
)}`,
|
|
6287
6348
|
style: { height: props.columnHeaderHeight }
|
|
6288
6349
|
},
|
|
6289
6350
|
/* @__PURE__ */ React28.createElement(InfiniteTableColumnHeaderFilterContext.Provider, { value: props }, /* @__PURE__ */ React28.createElement(FilterOperatorSwitch, null), /* @__PURE__ */ React28.createElement(FilterEditor, null))
|
|
@@ -6305,7 +6366,11 @@ function InfiniteTableFilterOperatorSwitch() {
|
|
|
6305
6366
|
}
|
|
6306
6367
|
columnApi.toggleFilterOperatorMenu(event.target);
|
|
6307
6368
|
},
|
|
6308
|
-
className:
|
|
6369
|
+
className: join(
|
|
6370
|
+
InfiniteTableColumnHeaderFilterOperatorClassName,
|
|
6371
|
+
HeaderFilterOperatorCls,
|
|
6372
|
+
disabled ? `${InfiniteTableColumnHeaderFilterOperatorClassName}--disabled` : ""
|
|
6373
|
+
)
|
|
6309
6374
|
},
|
|
6310
6375
|
/* @__PURE__ */ React28.createElement(
|
|
6311
6376
|
Icon2,
|
|
@@ -6324,7 +6389,9 @@ function InfiniteTableColumnHeaderFilterEmpty() {
|
|
|
6324
6389
|
{
|
|
6325
6390
|
onPointerUp: stopPropagation,
|
|
6326
6391
|
onPointerDown: stopPropagation,
|
|
6327
|
-
className: `${InfiniteTableColumnHeaderFilterClassName} ${
|
|
6392
|
+
className: `${InfiniteTableColumnHeaderFilterClassName} ${HeaderFilterRecipe(
|
|
6393
|
+
{ active: false }
|
|
6394
|
+
)}`,
|
|
6328
6395
|
style: { height: "100%" }
|
|
6329
6396
|
}
|
|
6330
6397
|
);
|
|
@@ -6339,7 +6406,7 @@ function useInfiniteColumnFilterEditor() {
|
|
|
6339
6406
|
);
|
|
6340
6407
|
const { columnFilterType, filterTypes, columnFilterValue } = filterContextValue;
|
|
6341
6408
|
const filterType = filterTypes[columnFilterType];
|
|
6342
|
-
const [theValue, setTheValue] = (0,
|
|
6409
|
+
const [theValue, setTheValue] = (0, import_react20.useState)(
|
|
6343
6410
|
(_a = columnFilterValue == null ? void 0 : columnFilterValue.filter.value) != null ? _a : ""
|
|
6344
6411
|
);
|
|
6345
6412
|
const onInputChange = React28.useCallback(
|
|
@@ -6349,7 +6416,7 @@ function useInfiniteColumnFilterEditor() {
|
|
|
6349
6416
|
},
|
|
6350
6417
|
[filterContextValue.onChange]
|
|
6351
6418
|
);
|
|
6352
|
-
(0,
|
|
6419
|
+
(0, import_react20.useEffect)(() => {
|
|
6353
6420
|
if (columnFilterValue) {
|
|
6354
6421
|
if (theValue !== columnFilterValue.filter.value) {
|
|
6355
6422
|
setTheValue(columnFilterValue.filter.value);
|
|
@@ -6380,7 +6447,7 @@ function useInfiniteColumnFilterEditor() {
|
|
|
6380
6447
|
filtered: column.computedFiltered,
|
|
6381
6448
|
setValue: onInputChange,
|
|
6382
6449
|
ariaLabel: `Filter for ${columnLabel}`,
|
|
6383
|
-
className: HeaderFilterEditorCls
|
|
6450
|
+
className: `${HeaderFilterEditorCls} ${InfiniteTableColumnHeaderFilterInputClassName}`
|
|
6384
6451
|
};
|
|
6385
6452
|
}
|
|
6386
6453
|
|
|
@@ -6615,16 +6682,16 @@ function useCellClassName(column, baseClasses, variants, extraFlags) {
|
|
|
6615
6682
|
}
|
|
6616
6683
|
|
|
6617
6684
|
// src/components/InfiniteTable/hooks/useColumnPointerEvents.ts
|
|
6618
|
-
var
|
|
6685
|
+
var import_react21 = require("react");
|
|
6619
6686
|
|
|
6620
6687
|
// src/components/InfiniteTable/InfiniteCls.css.ts
|
|
6621
6688
|
var FooterCls = "utilities_position_relative__16lm1iw1";
|
|
6622
6689
|
var InfiniteCls = "InfiniteCls_InfiniteCls__1yeub2v0 utilities_position_relative__16lm1iw1 utilities_display_flex__16lm1iwy utilities_flexFlow_column__16lm1iw1l utilities_boxSizingBorderBox__16lm1iw0";
|
|
6623
|
-
var InfiniteClsHasPinnedEnd = "
|
|
6624
|
-
var InfiniteClsHasPinnedStart = "
|
|
6625
|
-
var InfiniteClsRecipe = createRuntimeFn({ defaultClassName: "", variantClassNames: { focused: { true: "
|
|
6626
|
-
var InfiniteClsShiftingColumns = "
|
|
6627
|
-
var PinnedRowsContainerClsVariants = createRuntimeFn({ defaultClassName: "", variantClassNames: { pinned: { start: "
|
|
6690
|
+
var InfiniteClsHasPinnedEnd = "InfiniteCls_InfiniteClsHasPinnedEnd__1yeub2vq";
|
|
6691
|
+
var InfiniteClsHasPinnedStart = "InfiniteCls_InfiniteClsHasPinnedStart__1yeub2vp";
|
|
6692
|
+
var InfiniteClsRecipe = createRuntimeFn({ defaultClassName: "InfiniteCls__1yeub2v2", variantClassNames: { focused: { true: "InfiniteCls_InfiniteClsRecipe_focused_true__1yeub2v3", false: "InfiniteCls_InfiniteClsRecipe_focused_false__1yeub2v4" }, focusedWithin: { true: "InfiniteCls_InfiniteClsRecipe_focusedWithin_true__1yeub2v5", false: "InfiniteCls_InfiniteClsRecipe_focusedWithin_false__1yeub2v6" }, hasPinnedStart: { true: "InfiniteCls_InfiniteClsRecipe_hasPinnedStart_true__1yeub2v7", false: "InfiniteCls_InfiniteClsRecipe_hasPinnedStart_false__1yeub2v8" }, hasPinnedEnd: { true: "InfiniteCls_InfiniteClsRecipe_hasPinnedEnd_true__1yeub2v9", false: "InfiniteCls_InfiniteClsRecipe_hasPinnedEnd_false__1yeub2va" }, hasPinnedStartOverflow: { true: "InfiniteCls_InfiniteClsRecipe_hasPinnedStartOverflow_true__1yeub2vb", false: "InfiniteCls_InfiniteClsRecipe_hasPinnedStartOverflow_false__1yeub2vc" }, hasPinnedEndOverflow: { true: "InfiniteCls_InfiniteClsRecipe_hasPinnedEndOverflow_true__1yeub2vd", false: "InfiniteCls_InfiniteClsRecipe_hasPinnedEndOverflow_false__1yeub2ve" } }, defaultVariants: {}, compoundVariants: [[{ focused: false, focusedWithin: false }, "InfiniteCls_InfiniteClsRecipe_compound_0__1yeub2vf"]] });
|
|
6693
|
+
var InfiniteClsShiftingColumns = "InfiniteCls_shiftingcols__1yeub2vn";
|
|
6694
|
+
var PinnedRowsContainerClsVariants = createRuntimeFn({ defaultClassName: "InfiniteCls__1yeub2vj", variantClassNames: { pinned: { start: "InfiniteCls_PinnedRowsContainerClsVariants_pinned_start__1yeub2vk", end: "InfiniteCls_PinnedRowsContainerClsVariants_pinned_end__1yeub2vl", false: "InfiniteCls_PinnedRowsContainerClsVariants_pinned_false__1yeub2vm" } }, defaultVariants: {}, compoundVariants: [] });
|
|
6628
6695
|
|
|
6629
6696
|
// src/components/InfiniteTable/utils/rafFn.ts
|
|
6630
6697
|
var rafFn = (fn) => {
|
|
@@ -7291,7 +7358,7 @@ var useColumnPointerEvents = ({
|
|
|
7291
7358
|
domRef
|
|
7292
7359
|
}) => {
|
|
7293
7360
|
var _a;
|
|
7294
|
-
const [proxyPosition, setProxyPosition] = (0,
|
|
7361
|
+
const [proxyPosition, setProxyPosition] = (0, import_react21.useState)(null);
|
|
7295
7362
|
const {
|
|
7296
7363
|
actions,
|
|
7297
7364
|
computed,
|
|
@@ -7300,13 +7367,13 @@ var useColumnPointerEvents = ({
|
|
|
7300
7367
|
api,
|
|
7301
7368
|
state: { domRef: rootRef }
|
|
7302
7369
|
} = useInfiniteTable();
|
|
7303
|
-
const defaultPointerDown = (0,
|
|
7370
|
+
const defaultPointerDown = (0, import_react21.useCallback)((e) => {
|
|
7304
7371
|
const { multiSortBehavior } = getState();
|
|
7305
7372
|
api.toggleSortingForColumn(columnId, {
|
|
7306
7373
|
multiSortBehavior: multiSortBehavior === "replace" && (e.ctrlKey || e.metaKey) ? "append" : multiSortBehavior
|
|
7307
7374
|
});
|
|
7308
7375
|
}, []);
|
|
7309
|
-
const onPointerDown = (0,
|
|
7376
|
+
const onPointerDown = (0, import_react21.useCallback)(
|
|
7310
7377
|
(e) => {
|
|
7311
7378
|
var _a2, _b;
|
|
7312
7379
|
if (((_a2 = e.target) == null ? void 0 : _a2.tagName) === "INPUT") {
|
|
@@ -7460,7 +7527,7 @@ var React37 = __toESM(require("react"));
|
|
|
7460
7527
|
|
|
7461
7528
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableColumnCell.tsx
|
|
7462
7529
|
var React36 = __toESM(require("react"));
|
|
7463
|
-
var
|
|
7530
|
+
var import_react25 = require("react");
|
|
7464
7531
|
|
|
7465
7532
|
// src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
|
|
7466
7533
|
var React32 = __toESM(require("react"));
|
|
@@ -7475,17 +7542,17 @@ var showLoadingIcon = (rowInfo) => {
|
|
|
7475
7542
|
|
|
7476
7543
|
// src/components/InfiniteTable/components/icons/ExpanderIcon.tsx
|
|
7477
7544
|
var React30 = __toESM(require("react"));
|
|
7478
|
-
var
|
|
7545
|
+
var import_react22 = require("react");
|
|
7479
7546
|
|
|
7480
7547
|
// src/components/InfiniteTable/components/icons/ExpanderIcon.css.ts
|
|
7481
7548
|
var ExpanderIconCls = "utilities_fill_accentColor__16lm1iw7 utilities_flex_none__16lm1iwm utilities_cursor_pointer__16lm1iwh";
|
|
7482
|
-
var ExpanderIconClsVariants = createRuntimeFn({ defaultClassName: "", variantClassNames: { expanded: { true: "utilities_transform_rotate90__16lm1iwf", false: "
|
|
7549
|
+
var ExpanderIconClsVariants = createRuntimeFn({ defaultClassName: "ExpanderIcon__198z9781", variantClassNames: { expanded: { true: "utilities_transform_rotate90__16lm1iwf", false: "ExpanderIcon_ExpanderIconClsVariants_expanded_false__198z9783" }, direction: { end: "ExpanderIcon_ExpanderIconClsVariants_direction_end__198z9784", start: "ExpanderIcon_ExpanderIconClsVariants_direction_start__198z9785" } }, defaultVariants: {}, compoundVariants: [[{ expanded: false, direction: "end" }, "utilities_transform_rotate180__16lm1iwg"]] });
|
|
7483
7550
|
|
|
7484
7551
|
// src/components/InfiniteTable/components/icons/ExpanderIcon.tsx
|
|
7485
7552
|
function ExpanderIcon(props) {
|
|
7486
7553
|
var _a;
|
|
7487
7554
|
const { size = 24, direction = "start" } = props;
|
|
7488
|
-
const [expanded, setExpanded] = (0,
|
|
7555
|
+
const [expanded, setExpanded] = (0, import_react22.useState)(
|
|
7489
7556
|
(_a = props.expanded) != null ? _a : props.defaultExpanded
|
|
7490
7557
|
);
|
|
7491
7558
|
const onClick = () => {
|
|
@@ -7581,8 +7648,8 @@ var LoadingIcon = (props) => {
|
|
|
7581
7648
|
};
|
|
7582
7649
|
|
|
7583
7650
|
// src/components/InfiniteTable/components/InfiniteTableRow/row.css.ts
|
|
7584
|
-
var GroupRowExpanderCls = createRuntimeFn({ defaultClassName: "", variantClassNames: { align: { start: "
|
|
7585
|
-
var RowClsRecipe = createRuntimeFn({ defaultClassName: "row_RowCls__7pupv00", variantClassNames: { zebra: { false: "
|
|
7651
|
+
var GroupRowExpanderCls = createRuntimeFn({ defaultClassName: "row__7pupv0c", variantClassNames: { align: { start: "row_GroupRowExpanderCls_align_start__7pupv0d", center: "row_GroupRowExpanderCls_align_center__7pupv0e", end: "row_GroupRowExpanderCls_align_end__7pupv0f" } }, defaultVariants: {}, compoundVariants: [] });
|
|
7652
|
+
var RowClsRecipe = createRuntimeFn({ defaultClassName: "row__7pupv02 row_RowCls__7pupv00", variantClassNames: { zebra: { false: "row_RowClsRecipe_zebra_false__7pupv03", even: "row_RowClsRecipe_zebra_even__7pupv04", odd: "row_RowClsRecipe_zebra_odd__7pupv05" }, groupRow: { true: "row_RowClsRecipe_groupRow_true__7pupv06", false: "row_RowClsRecipe_groupRow_false__7pupv07" }, inlineGroupRow: { true: "row_RowClsRecipe_inlineGroupRow_true__7pupv08", false: "row_RowClsRecipe_inlineGroupRow_false__7pupv09" }, showHoverRows: { true: "row_RowClsRecipe_showHoverRows_true__7pupv0a", false: "row_RowClsRecipe_showHoverRows_false__7pupv0b" } }, defaultVariants: {}, compoundVariants: [] });
|
|
7586
7653
|
var RowHoverCls = "row_RowHoverCls__7pupv01";
|
|
7587
7654
|
|
|
7588
7655
|
// src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
|
|
@@ -7767,7 +7834,7 @@ var SelectionCheckboxCls = "cell_SelectionCheckboxCls__1eexc2a7";
|
|
|
7767
7834
|
|
|
7768
7835
|
// src/components/InfiniteTable/components/CheckBox.tsx
|
|
7769
7836
|
var React33 = __toESM(require("react"));
|
|
7770
|
-
var
|
|
7837
|
+
var import_react23 = require("react");
|
|
7771
7838
|
|
|
7772
7839
|
// src/components/InfiniteTable/components/CheckBox.css.ts
|
|
7773
7840
|
var CheckBoxCls = "CheckBox_CheckBoxCls__qz8ht90 utilities_cursor_pointer__16lm1iwh";
|
|
@@ -7801,8 +7868,8 @@ var InfiniteCheckBoxRoot = getComponentStateRoot({
|
|
|
7801
7868
|
function InfiniteCheckBoxComponent() {
|
|
7802
7869
|
const { componentState, componentActions } = useComponentState();
|
|
7803
7870
|
const { checked, domProps, disabled } = componentState;
|
|
7804
|
-
const inputRef = (0,
|
|
7805
|
-
(0,
|
|
7871
|
+
const inputRef = (0, import_react23.useRef)(null);
|
|
7872
|
+
(0, import_react23.useEffect)(() => {
|
|
7806
7873
|
inputRef.current.indeterminate = checked == null;
|
|
7807
7874
|
}, [checked]);
|
|
7808
7875
|
return /* @__PURE__ */ React33.createElement(
|
|
@@ -8192,17 +8259,17 @@ var InfiniteTableCell = React34.memo(
|
|
|
8192
8259
|
|
|
8193
8260
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableColumnEditor.tsx
|
|
8194
8261
|
var React35 = __toESM(require("react"));
|
|
8195
|
-
var
|
|
8262
|
+
var import_react24 = require("react");
|
|
8196
8263
|
function InfiniteTableColumnEditor() {
|
|
8197
8264
|
const { initialValue, setValue, confirmEdit, cancelEdit, readOnly } = useInfiniteColumnEditor();
|
|
8198
|
-
const domRef = (0,
|
|
8265
|
+
const domRef = (0, import_react24.useRef)();
|
|
8199
8266
|
const refCallback = React35.useCallback((node) => {
|
|
8200
8267
|
domRef.current = node;
|
|
8201
8268
|
if (node) {
|
|
8202
8269
|
node.focus();
|
|
8203
8270
|
}
|
|
8204
8271
|
}, []);
|
|
8205
|
-
const onKeyDown2 = (0,
|
|
8272
|
+
const onKeyDown2 = (0, import_react24.useCallback)((event) => {
|
|
8206
8273
|
const { key } = event;
|
|
8207
8274
|
if (key === "Enter" || key === "Tab") {
|
|
8208
8275
|
confirmEdit();
|
|
@@ -8222,7 +8289,7 @@ function InfiniteTableColumnEditor() {
|
|
|
8222
8289
|
className: join(absoluteCover, outline.none),
|
|
8223
8290
|
type: "text",
|
|
8224
8291
|
defaultValue: initialValue,
|
|
8225
|
-
onChange: (0,
|
|
8292
|
+
onChange: (0, import_react24.useCallback)((event) => {
|
|
8226
8293
|
setValue(event.target.value);
|
|
8227
8294
|
}, [])
|
|
8228
8295
|
}
|
|
@@ -8339,7 +8406,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8339
8406
|
const { align: align2, verticalAlign } = renderParams;
|
|
8340
8407
|
const renderParam = renderParams;
|
|
8341
8408
|
const renderParamRef = React36.useRef(renderParam);
|
|
8342
|
-
const onClick = (0,
|
|
8409
|
+
const onClick = (0, import_react25.useCallback)(
|
|
8343
8410
|
(event) => {
|
|
8344
8411
|
const colIndex = column.computedVisibleIndex;
|
|
8345
8412
|
getState().cellClick({
|
|
@@ -8350,7 +8417,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8350
8417
|
},
|
|
8351
8418
|
[rowIndex, column.computedVisibleIndex, keyboardNavigation]
|
|
8352
8419
|
);
|
|
8353
|
-
const onMouseDown = (0,
|
|
8420
|
+
const onMouseDown = (0, import_react25.useCallback)(
|
|
8354
8421
|
(event) => {
|
|
8355
8422
|
const colIndex = column.computedVisibleIndex;
|
|
8356
8423
|
getState().cellMouseDown({
|
|
@@ -8371,27 +8438,27 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8371
8438
|
const { selectionMode, cellSelection } = dataSourceState;
|
|
8372
8439
|
const cellSelected = renderParam.cellSelected;
|
|
8373
8440
|
renderParam.domRef = domRef;
|
|
8374
|
-
renderParam.selectCurrentRow = (0,
|
|
8441
|
+
renderParam.selectCurrentRow = (0, import_react25.useCallback)(renderParam.selectCurrentRow, [
|
|
8375
8442
|
rowInfo
|
|
8376
8443
|
]);
|
|
8377
|
-
renderParam.deselectCurrentRow = (0,
|
|
8444
|
+
renderParam.deselectCurrentRow = (0, import_react25.useCallback)(renderParam.deselectCurrentRow, [
|
|
8378
8445
|
rowInfo
|
|
8379
8446
|
]);
|
|
8380
|
-
renderParam.toggleCurrentGroupRow = (0,
|
|
8447
|
+
renderParam.toggleCurrentGroupRow = (0, import_react25.useCallback)(
|
|
8381
8448
|
renderParam.toggleCurrentGroupRow,
|
|
8382
8449
|
[rowInfo]
|
|
8383
8450
|
);
|
|
8384
|
-
renderParam.toggleCurrentRowSelection = (0,
|
|
8451
|
+
renderParam.toggleCurrentRowSelection = (0, import_react25.useCallback)(
|
|
8385
8452
|
renderParam.toggleCurrentRowSelection,
|
|
8386
8453
|
[rowInfo]
|
|
8387
8454
|
);
|
|
8388
|
-
renderParam.toggleCurrentGroupRowSelection = (0,
|
|
8455
|
+
renderParam.toggleCurrentGroupRowSelection = (0, import_react25.useCallback)(
|
|
8389
8456
|
renderParam.toggleCurrentGroupRowSelection,
|
|
8390
8457
|
[rowInfo]
|
|
8391
8458
|
);
|
|
8392
8459
|
const EditorComponent = (_b = (_a = column.components) == null ? void 0 : _a.Editor) != null ? _b : InfiniteTableColumnEditor;
|
|
8393
8460
|
const editor = inEdit ? /* @__PURE__ */ React36.createElement(CellEditorContextComponent, { contextValue: renderParam }, /* @__PURE__ */ React36.createElement(EditorComponent, null)) : null;
|
|
8394
|
-
const renderChildren = (0,
|
|
8461
|
+
const renderChildren = (0, import_react25.useCallback)(() => {
|
|
8395
8462
|
if (hidden) {
|
|
8396
8463
|
return null;
|
|
8397
8464
|
}
|
|
@@ -8530,7 +8597,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8530
8597
|
style2 = style2 || {};
|
|
8531
8598
|
style2.height = rowHeight;
|
|
8532
8599
|
style2.zIndex = `var(${columnZIndexAtIndex4}-${column.computedVisibleIndex})`;
|
|
8533
|
-
const memoizedStyle = (0,
|
|
8600
|
+
const memoizedStyle = (0, import_react25.useMemo)(
|
|
8534
8601
|
() => style2,
|
|
8535
8602
|
[!style2 ? null : JSON.stringify(style2)]
|
|
8536
8603
|
);
|
|
@@ -8620,7 +8687,7 @@ var InfiniteTableColumnCell = React36.memo(
|
|
|
8620
8687
|
InfiniteTableColumnCellFn
|
|
8621
8688
|
);
|
|
8622
8689
|
function useInfiniteColumnCell() {
|
|
8623
|
-
const result = (0,
|
|
8690
|
+
const result = (0, import_react25.useContext)(
|
|
8624
8691
|
InfiniteTableColumnCellContext
|
|
8625
8692
|
);
|
|
8626
8693
|
return result;
|
|
@@ -8737,7 +8804,7 @@ function MenuIcon(props) {
|
|
|
8737
8804
|
|
|
8738
8805
|
// src/components/InfiniteTable/components/icons/SortIcon.tsx
|
|
8739
8806
|
var React39 = __toESM(require("react"));
|
|
8740
|
-
var
|
|
8807
|
+
var import_react26 = require("react");
|
|
8741
8808
|
|
|
8742
8809
|
// src/components/InfiniteTable/components/icons/SortIcon.css.ts
|
|
8743
8810
|
var SortIconCls = "SortIcon_SortIconCls__1ek6mqy0 utilities_display_flex__16lm1iwy utilities_flexFlow_column__16lm1iw1l utilities_position_relative__16lm1iw1 utilities_justifyContent_spaceAround__16lm1iw1t";
|
|
@@ -8750,8 +8817,8 @@ var defaultLineStyle3 = {
|
|
|
8750
8817
|
};
|
|
8751
8818
|
function SortIcon(props) {
|
|
8752
8819
|
var _a;
|
|
8753
|
-
const [rendered, setRendered] = (0,
|
|
8754
|
-
const [opacity, setOpacity] = (0,
|
|
8820
|
+
const [rendered, setRendered] = (0, import_react26.useState)(true);
|
|
8821
|
+
const [opacity, setOpacity] = (0, import_react26.useState)(0);
|
|
8755
8822
|
const { direction, lineWidth = 1, style: style2, className, index } = props;
|
|
8756
8823
|
const showIndex = index != null && index > 0;
|
|
8757
8824
|
const size = (_a = props.size) != null ? _a : 16;
|
|
@@ -8765,7 +8832,7 @@ function SortIcon(props) {
|
|
|
8765
8832
|
}), props.lineStyle), {
|
|
8766
8833
|
opacity
|
|
8767
8834
|
});
|
|
8768
|
-
(0,
|
|
8835
|
+
(0, import_react26.useEffect)(() => {
|
|
8769
8836
|
const newOpacity = direction != 0 ? 1 : 0;
|
|
8770
8837
|
if (!rendered && newOpacity) {
|
|
8771
8838
|
setRendered(true);
|
|
@@ -8830,10 +8897,10 @@ function SortIcon(props) {
|
|
|
8830
8897
|
|
|
8831
8898
|
// src/components/InfiniteTable/components/InfiniteTableHeader/useColumnResizeHandle.tsx
|
|
8832
8899
|
var React41 = __toESM(require("react"));
|
|
8833
|
-
var
|
|
8900
|
+
var import_react28 = require("react");
|
|
8834
8901
|
|
|
8835
8902
|
// src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/index.tsx
|
|
8836
|
-
var
|
|
8903
|
+
var import_react27 = require("react");
|
|
8837
8904
|
var React40 = __toESM(require("react"));
|
|
8838
8905
|
|
|
8839
8906
|
// src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/columnResizer.ts
|
|
@@ -8947,16 +9014,16 @@ function getColumnGroupResizer(colIndexes, config) {
|
|
|
8947
9014
|
|
|
8948
9015
|
// src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/ResizeHandle.css.ts
|
|
8949
9016
|
var ResizeHandleCls = "ResizeHandle_ResizeHandleCls__zneyzh0 utilities_position_absolute__16lm1iw2 utilities_top_0__16lm1iw1b utilities_right_0__16lm1iw1i utilities_bottom_0__16lm1iw1g utilities_cursor_colResize__16lm1iwj utilities_overflow_hidden__16lm1iw1w";
|
|
8950
|
-
var ResizeHandleDraggerClsRecipe = createRuntimeFn({ defaultClassName: "
|
|
8951
|
-
var ResizeHandleRecipeCls = createRuntimeFn({ defaultClassName: "", variantClassNames: { computedPinned: { start: "
|
|
9017
|
+
var ResizeHandleDraggerClsRecipe = createRuntimeFn({ defaultClassName: "ResizeHandle_ResizeHandleDraggerClsRecipe__zneyzhc utilities_position_absolute__16lm1iw2 utilities_top_0__16lm1iw1b utilities_bottom_0__16lm1iw1g", variantClassNames: { constrained: { false: "ResizeHandle_ResizeHandleDraggerClsRecipe_constrained_false__zneyzhd", true: "ResizeHandle_ResizeHandleDraggerClsRecipe_constrained_true__zneyzhe" }, computedPinned: { start: "ResizeHandle_ResizeHandleDraggerClsRecipe_computedPinned_start__zneyzhf", end: "ResizeHandle_ResizeHandleDraggerClsRecipe_computedPinned_end__zneyzhg", false: "ResizeHandle_ResizeHandleDraggerClsRecipe_computedPinned_false__zneyzhh" }, computedFirstInCategory: { true: "ResizeHandle_ResizeHandleDraggerClsRecipe_computedFirstInCategory_true__zneyzhi", false: "ResizeHandle_ResizeHandleDraggerClsRecipe_computedFirstInCategory_false__zneyzhj" }, computedLastInCategory: { true: "ResizeHandle_ResizeHandleDraggerClsRecipe_computedLastInCategory_true__zneyzhk", false: "ResizeHandle_ResizeHandleDraggerClsRecipe_computedLastInCategory_false__zneyzhl" } }, defaultVariants: {}, compoundVariants: [[{ computedPinned: "start", computedLastInCategory: true }, "ResizeHandle_ResizeHandleDraggerClsRecipe_compound_0__zneyzhm"], [{ computedPinned: "end", computedFirstInCategory: true }, "ResizeHandle_ResizeHandleDraggerClsRecipe_compound_1__zneyzhn"]] });
|
|
9018
|
+
var ResizeHandleRecipeCls = createRuntimeFn({ defaultClassName: "ResizeHandle__zneyzh1", variantClassNames: { computedPinned: { start: "ResizeHandle_ResizeHandleRecipeCls_computedPinned_start__zneyzh2", end: "ResizeHandle_ResizeHandleRecipeCls_computedPinned_end__zneyzh3 utilities_left_0__16lm1iw1d utilities_right_auto__16lm1iw1k", false: "ResizeHandle_ResizeHandleRecipeCls_computedPinned_false__zneyzh4" }, computedFirstInCategory: { true: "ResizeHandle_ResizeHandleRecipeCls_computedFirstInCategory_true__zneyzh5", false: "ResizeHandle_ResizeHandleRecipeCls_computedFirstInCategory_false__zneyzh6" }, computedLastInCategory: { true: "ResizeHandle_ResizeHandleRecipeCls_computedLastInCategory_true__zneyzh7", false: "ResizeHandle_ResizeHandleRecipeCls_computedLastInCategory_false__zneyzh8" } }, defaultVariants: {}, compoundVariants: [[{ computedPinned: "end", computedLastInCategory: false, computedFirstInCategory: true }, "ResizeHandle_ResizeHandleRecipeCls_compound_0__zneyzh9"], [{ computedPinned: false, computedFirstInCategory: false, computedLastInCategory: true }, "ResizeHandle_ResizeHandleRecipeCls_compound_1__zneyzha"], [{ computedPinned: "start", computedFirstInCategory: false, computedLastInCategory: true }, "ResizeHandle_ResizeHandleRecipeCls_compound_2__zneyzhb"]] });
|
|
8952
9019
|
|
|
8953
9020
|
// src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/index.tsx
|
|
8954
9021
|
var { rootClassName: rootClassName7 } = internalProps;
|
|
8955
9022
|
var InfiniteTableHeaderCellResizeHandleCls = `${rootClassName7}HeaderCell_ResizeHandle`;
|
|
8956
9023
|
function ResizeHandleFn(props) {
|
|
8957
|
-
const domRef = (0,
|
|
8958
|
-
const [constrained, setConstrained] = (0,
|
|
8959
|
-
const constrainedRef = (0,
|
|
9024
|
+
const domRef = (0, import_react27.useRef)(null);
|
|
9025
|
+
const [constrained, setConstrained] = (0, import_react27.useState)(false);
|
|
9026
|
+
const constrainedRef = (0, import_react27.useRef)(constrained);
|
|
8960
9027
|
constrainedRef.current = constrained;
|
|
8961
9028
|
const col = props.columns[props.columnIndex];
|
|
8962
9029
|
if (!col) {
|
|
@@ -9046,7 +9113,7 @@ function useColumnResizeHandle(column) {
|
|
|
9046
9113
|
getComputed,
|
|
9047
9114
|
actions
|
|
9048
9115
|
} = useInfiniteTable();
|
|
9049
|
-
const computeResizeForDiff = (0,
|
|
9116
|
+
const computeResizeForDiff = (0, import_react28.useCallback)(
|
|
9050
9117
|
({
|
|
9051
9118
|
diff,
|
|
9052
9119
|
shareSpaceOnResize
|
|
@@ -9084,7 +9151,7 @@ function useColumnResizeHandle(column) {
|
|
|
9084
9151
|
},
|
|
9085
9152
|
[column]
|
|
9086
9153
|
);
|
|
9087
|
-
const onColumnResize = (0,
|
|
9154
|
+
const onColumnResize = (0, import_react28.useCallback)(
|
|
9088
9155
|
({
|
|
9089
9156
|
diff,
|
|
9090
9157
|
shareSpaceOnResize
|
|
@@ -9174,7 +9241,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
9174
9241
|
const { onResize, height, width, headerOptions, columnsMap } = props;
|
|
9175
9242
|
const sortInfo = column.computedSortInfo;
|
|
9176
9243
|
let header = column.header;
|
|
9177
|
-
const ref = (0,
|
|
9244
|
+
const ref = (0, import_react29.useCallback)(
|
|
9178
9245
|
(node) => {
|
|
9179
9246
|
var _a2;
|
|
9180
9247
|
domRef.current = node;
|
|
@@ -9358,8 +9425,8 @@ function InfiniteTableHeaderCell(props) {
|
|
|
9358
9425
|
}
|
|
9359
9426
|
return all;
|
|
9360
9427
|
};
|
|
9361
|
-
const domRef = (0,
|
|
9362
|
-
(0,
|
|
9428
|
+
const domRef = (0, import_react29.useRef)(null);
|
|
9429
|
+
(0, import_react29.useEffect)(() => {
|
|
9363
9430
|
let clearOnResize = null;
|
|
9364
9431
|
const node = domRef.current;
|
|
9365
9432
|
if (onResize && node) {
|
|
@@ -9493,7 +9560,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
9493
9560
|
), draggingProxy);
|
|
9494
9561
|
}
|
|
9495
9562
|
function useInfiniteHeaderCell() {
|
|
9496
|
-
const result = (0,
|
|
9563
|
+
const result = (0, import_react29.useContext)(
|
|
9497
9564
|
InfiniteTableHeaderCellContext
|
|
9498
9565
|
);
|
|
9499
9566
|
return result;
|
|
@@ -9607,24 +9674,24 @@ function assignGroupOffsetsAndComputedWidths(items, groupOffset = 0) {
|
|
|
9607
9674
|
|
|
9608
9675
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
|
|
9609
9676
|
var React46 = __toESM(require("react"));
|
|
9610
|
-
var
|
|
9677
|
+
var import_react32 = require("react");
|
|
9611
9678
|
|
|
9612
9679
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderGroup.tsx
|
|
9613
9680
|
var React45 = __toESM(require("react"));
|
|
9614
9681
|
|
|
9615
9682
|
// src/components/InfiniteTable/components/InfiniteTableHeader/useColumnGroupResizeHandle.tsx
|
|
9616
9683
|
var React44 = __toESM(require("react"));
|
|
9617
|
-
var
|
|
9684
|
+
var import_react31 = require("react");
|
|
9618
9685
|
|
|
9619
9686
|
// src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/GroupResizeHandle.tsx
|
|
9620
|
-
var
|
|
9687
|
+
var import_react30 = require("react");
|
|
9621
9688
|
var React43 = __toESM(require("react"));
|
|
9622
9689
|
var { rootClassName: rootClassName9 } = internalProps;
|
|
9623
9690
|
var InfiniteTableHeaderCellResizeHandleCls2 = `${rootClassName9}HeaderCell_ResizeHandle`;
|
|
9624
9691
|
function GroupResizeHandleFn(props) {
|
|
9625
|
-
const domRef = (0,
|
|
9626
|
-
const [constrained, setConstrained] = (0,
|
|
9627
|
-
const constrainedRef = (0,
|
|
9692
|
+
const domRef = (0, import_react30.useRef)(null);
|
|
9693
|
+
const [constrained, setConstrained] = (0, import_react30.useState)(false);
|
|
9694
|
+
const constrainedRef = (0, import_react30.useRef)(constrained);
|
|
9628
9695
|
constrainedRef.current = constrained;
|
|
9629
9696
|
const col = props.groupColumns[0];
|
|
9630
9697
|
if (!col) {
|
|
@@ -9725,7 +9792,7 @@ function useColumnGroupResizeHandle(groupColumns, config) {
|
|
|
9725
9792
|
actions
|
|
9726
9793
|
} = useInfiniteTable();
|
|
9727
9794
|
const lastColumnInGroup = groupColumns[groupColumns.length - 1];
|
|
9728
|
-
const computeResizeForDiff = (0,
|
|
9795
|
+
const computeResizeForDiff = (0, import_react31.useCallback)(
|
|
9729
9796
|
(diff) => {
|
|
9730
9797
|
const state = getState();
|
|
9731
9798
|
const { columnSizing, viewportReservedWidth, bodySize } = state;
|
|
@@ -9761,7 +9828,7 @@ function useColumnGroupResizeHandle(groupColumns, config) {
|
|
|
9761
9828
|
},
|
|
9762
9829
|
[lastColumnInGroup]
|
|
9763
9830
|
);
|
|
9764
|
-
const onColumnResize = (0,
|
|
9831
|
+
const onColumnResize = (0, import_react31.useCallback)(
|
|
9765
9832
|
(diff) => {
|
|
9766
9833
|
const { columnSizing, reservedWidth } = computeResizeForDiff(diff);
|
|
9767
9834
|
actions.viewportReservedWidth = reservedWidth;
|
|
@@ -9852,7 +9919,7 @@ function InfiniteTableHeaderFn(props) {
|
|
|
9852
9919
|
state: { headerBrain, headerOptions, showColumnFilters }
|
|
9853
9920
|
} = useInfiniteTable();
|
|
9854
9921
|
const { computedColumnsMap } = computed;
|
|
9855
|
-
(0,
|
|
9922
|
+
(0, import_react32.useEffect)(() => {
|
|
9856
9923
|
const onScroll = (scrollPosition) => {
|
|
9857
9924
|
if (domRef.current) {
|
|
9858
9925
|
domRef.current.style.transform = `translate3d(-${scrollPosition.scrollLeft}px, 0px, 0px)`;
|
|
@@ -9861,7 +9928,7 @@ function InfiniteTableHeaderFn(props) {
|
|
|
9861
9928
|
const removeOnScroll = brain.onScroll(onScroll);
|
|
9862
9929
|
return removeOnScroll;
|
|
9863
9930
|
}, [brain]);
|
|
9864
|
-
const domRef = (0,
|
|
9931
|
+
const domRef = (0, import_react32.useRef)(null);
|
|
9865
9932
|
const headerCls = HeaderClsRecipe({
|
|
9866
9933
|
overflow: false
|
|
9867
9934
|
});
|
|
@@ -9875,7 +9942,7 @@ function InfiniteTableHeaderFn(props) {
|
|
|
9875
9942
|
),
|
|
9876
9943
|
style: __spreadProps(__spreadValues({}, style2), { height: columnHeaderHeight })
|
|
9877
9944
|
};
|
|
9878
|
-
const renderCell = (0,
|
|
9945
|
+
const renderCell = (0, import_react32.useCallback)(
|
|
9879
9946
|
(params) => {
|
|
9880
9947
|
const {
|
|
9881
9948
|
rowIndex,
|
|
@@ -10088,7 +10155,7 @@ function TableHeaderWrapper(props) {
|
|
|
10088
10155
|
|
|
10089
10156
|
// src/components/InfiniteTable/components/InfiniteTableLicenseFooter/index.tsx
|
|
10090
10157
|
var React48 = __toESM(require("react"));
|
|
10091
|
-
var
|
|
10158
|
+
var import_react33 = require("react");
|
|
10092
10159
|
|
|
10093
10160
|
// src/components/utils/decamelize.ts
|
|
10094
10161
|
function decamelize(str, options) {
|
|
@@ -10145,7 +10212,7 @@ var InfiniteTableLicenseFooter = React48.forwardRef(
|
|
|
10145
10212
|
ref.current = node;
|
|
10146
10213
|
}
|
|
10147
10214
|
}, []);
|
|
10148
|
-
(0,
|
|
10215
|
+
(0, import_react33.useEffect)(() => {
|
|
10149
10216
|
const forceStyle = () => {
|
|
10150
10217
|
raf(() => {
|
|
10151
10218
|
var _a;
|
|
@@ -10883,7 +10950,7 @@ function enhancedFlatten(param) {
|
|
|
10883
10950
|
|
|
10884
10951
|
// src/components/DataSource/index.tsx
|
|
10885
10952
|
var React50 = __toESM(require("react"));
|
|
10886
|
-
var
|
|
10953
|
+
var import_react36 = require("react");
|
|
10887
10954
|
|
|
10888
10955
|
// src/utils/multisort/sortTypes.ts
|
|
10889
10956
|
var numberComparator = function(first, second) {
|
|
@@ -11593,15 +11660,15 @@ var GroupRowsState = class extends BooleanDeepCollectionState {
|
|
|
11593
11660
|
};
|
|
11594
11661
|
|
|
11595
11662
|
// src/components/DataSource/privateHooks/useLoadData.ts
|
|
11596
|
-
var
|
|
11663
|
+
var import_react35 = require("react");
|
|
11597
11664
|
|
|
11598
11665
|
// src/components/hooks/useEffectWithChanges.ts
|
|
11599
|
-
var
|
|
11666
|
+
var import_react34 = require("react");
|
|
11600
11667
|
function useEffectWithChanges(fn, deps) {
|
|
11601
|
-
const prevRef = (0,
|
|
11602
|
-
const oldValuesRef = (0,
|
|
11668
|
+
const prevRef = (0, import_react34.useRef)({});
|
|
11669
|
+
const oldValuesRef = (0, import_react34.useRef)({});
|
|
11603
11670
|
const oldValues = oldValuesRef.current;
|
|
11604
|
-
const changesRef = (0,
|
|
11671
|
+
const changesRef = (0, import_react34.useRef)({});
|
|
11605
11672
|
const changes = changesRef.current;
|
|
11606
11673
|
const useEffectDeps = [];
|
|
11607
11674
|
for (const k in deps) {
|
|
@@ -11614,7 +11681,7 @@ function useEffectWithChanges(fn, deps) {
|
|
|
11614
11681
|
}
|
|
11615
11682
|
}
|
|
11616
11683
|
prevRef.current = deps;
|
|
11617
|
-
(0,
|
|
11684
|
+
(0, import_react34.useEffect)(() => {
|
|
11618
11685
|
const changes2 = changesRef.current;
|
|
11619
11686
|
let result = void 0;
|
|
11620
11687
|
if (Object.keys(changes2).length !== 0) {
|
|
@@ -13657,12 +13724,12 @@ function useLoadData() {
|
|
|
13657
13724
|
filterTypes,
|
|
13658
13725
|
cursorId: stateCursorId
|
|
13659
13726
|
} = componentState;
|
|
13660
|
-
const [scrollbars, setScrollbars] = (0,
|
|
13727
|
+
const [scrollbars, setScrollbars] = (0, import_react35.useState)({
|
|
13661
13728
|
vertical: false,
|
|
13662
13729
|
horizontal: false
|
|
13663
13730
|
});
|
|
13664
|
-
const scrollbarsRef = (0,
|
|
13665
|
-
(0,
|
|
13731
|
+
const scrollbarsRef = (0, import_react35.useRef)(scrollbars);
|
|
13732
|
+
(0, import_react35.useEffect)(() => {
|
|
13666
13733
|
notifyScrollbarsChange.onChange((scrollbars2) => {
|
|
13667
13734
|
if (!scrollbars2) {
|
|
13668
13735
|
return;
|
|
@@ -13672,7 +13739,7 @@ function useLoadData() {
|
|
|
13672
13739
|
});
|
|
13673
13740
|
return () => notifyScrollbarsChange.destroy();
|
|
13674
13741
|
}, [notifyScrollbarsChange]);
|
|
13675
|
-
(0,
|
|
13742
|
+
(0, import_react35.useEffect)(() => {
|
|
13676
13743
|
if (!livePagination) {
|
|
13677
13744
|
return;
|
|
13678
13745
|
}
|
|
@@ -13686,7 +13753,7 @@ function useLoadData() {
|
|
|
13686
13753
|
});
|
|
13687
13754
|
return () => cancelAnimationFrame(frameId);
|
|
13688
13755
|
}, [livePaginationCursor]);
|
|
13689
|
-
(0,
|
|
13756
|
+
(0, import_react35.useEffect)(() => {
|
|
13690
13757
|
if (!livePagination || livePaginationCursor !== void 0) {
|
|
13691
13758
|
return;
|
|
13692
13759
|
}
|
|
@@ -13700,7 +13767,7 @@ function useLoadData() {
|
|
|
13700
13767
|
});
|
|
13701
13768
|
return () => cancelAnimationFrame(frameId);
|
|
13702
13769
|
}, [dataArray.length, livePaginationCursor]);
|
|
13703
|
-
(0,
|
|
13770
|
+
(0, import_react35.useEffect)(() => {
|
|
13704
13771
|
const state = getComponentState();
|
|
13705
13772
|
const { livePaginationCursor: livePaginationCursor2, livePagination: livePagination2, dataArray: dataArray2 } = state;
|
|
13706
13773
|
if (!scrollbars.vertical && livePagination2) {
|
|
@@ -13711,7 +13778,7 @@ function useLoadData() {
|
|
|
13711
13778
|
}
|
|
13712
13779
|
}
|
|
13713
13780
|
}, [scrollbars.vertical]);
|
|
13714
|
-
const computedFilterValue = (0,
|
|
13781
|
+
const computedFilterValue = (0, import_react35.useMemo)(() => {
|
|
13715
13782
|
return computeFilterValueForRemote(filterValue, {
|
|
13716
13783
|
filterTypes,
|
|
13717
13784
|
filterMode
|
|
@@ -13725,7 +13792,7 @@ function useLoadData() {
|
|
|
13725
13792
|
filterValue: computedFilterValue,
|
|
13726
13793
|
cursorId: livePagination ? stateCursorId : null
|
|
13727
13794
|
};
|
|
13728
|
-
const initialRef = (0,
|
|
13795
|
+
const initialRef = (0, import_react35.useRef)(true);
|
|
13729
13796
|
useLazyLoadRange();
|
|
13730
13797
|
useEffectWithChanges(
|
|
13731
13798
|
() => {
|
|
@@ -13770,7 +13837,7 @@ function useLazyLoadRange() {
|
|
|
13770
13837
|
componentActions: actions,
|
|
13771
13838
|
componentState
|
|
13772
13839
|
} = useComponentState();
|
|
13773
|
-
(0,
|
|
13840
|
+
(0, import_react35.useEffect)(() => {
|
|
13774
13841
|
actions.lazyLoadCacheOfLoadedBatches = new DeepMap();
|
|
13775
13842
|
}, [componentState.data, componentState.dataParams]);
|
|
13776
13843
|
const {
|
|
@@ -13782,7 +13849,7 @@ function useLazyLoadRange() {
|
|
|
13782
13849
|
groupRowsState,
|
|
13783
13850
|
scrollStopDelayUpdatedByTable
|
|
13784
13851
|
} = componentState;
|
|
13785
|
-
const latestRenderRangeRef = (0,
|
|
13852
|
+
const latestRenderRangeRef = (0, import_react35.useRef)(null);
|
|
13786
13853
|
const loadRange = (renderRange, cache = getComponentState().lazyLoadCacheOfLoadedBatches) => {
|
|
13787
13854
|
const componentState2 = getComponentState();
|
|
13788
13855
|
renderRange = renderRange || latestRenderRangeRef.current;
|
|
@@ -13810,7 +13877,7 @@ function useLazyLoadRange() {
|
|
|
13810
13877
|
cache
|
|
13811
13878
|
);
|
|
13812
13879
|
};
|
|
13813
|
-
const debouncedLoadRange = (0,
|
|
13880
|
+
const debouncedLoadRange = (0, import_react35.useMemo)(
|
|
13814
13881
|
() => debounce(loadRange, { wait: scrollStopDelayUpdatedByTable }),
|
|
13815
13882
|
[scrollStopDelayUpdatedByTable]
|
|
13816
13883
|
);
|
|
@@ -13836,7 +13903,7 @@ function useLazyLoadRange() {
|
|
|
13836
13903
|
groupRowsState
|
|
13837
13904
|
}
|
|
13838
13905
|
);
|
|
13839
|
-
(0,
|
|
13906
|
+
(0, import_react35.useEffect)(() => {
|
|
13840
13907
|
if (lazyLoadBatchSize && lazyLoadBatchSize > 0) {
|
|
13841
13908
|
debouncedLoadRange();
|
|
13842
13909
|
}
|
|
@@ -14400,7 +14467,7 @@ function DataSourceWithContext(props) {
|
|
|
14400
14467
|
if (typeof children === "function") {
|
|
14401
14468
|
children = children(componentState);
|
|
14402
14469
|
}
|
|
14403
|
-
(0,
|
|
14470
|
+
(0, import_react36.useEffect)(() => {
|
|
14404
14471
|
var _a;
|
|
14405
14472
|
(_a = componentState.onReady) == null ? void 0 : _a.call(componentState, api);
|
|
14406
14473
|
}, []);
|
|
@@ -14441,7 +14508,7 @@ function DataSourceCmp({ children }) {
|
|
|
14441
14508
|
globalThis.dataSourceApi = api;
|
|
14442
14509
|
}
|
|
14443
14510
|
useLoadData();
|
|
14444
|
-
(0,
|
|
14511
|
+
(0, import_react36.useEffect)(() => {
|
|
14445
14512
|
var _a;
|
|
14446
14513
|
(_a = componentState.onDataArrayChange) == null ? void 0 : _a.call(
|
|
14447
14514
|
componentState,
|
|
@@ -14742,6 +14809,9 @@ function isSortInfoForColumn(sortInfo, col) {
|
|
|
14742
14809
|
}
|
|
14743
14810
|
var InfiniteTableApiImpl = class {
|
|
14744
14811
|
constructor(context) {
|
|
14812
|
+
this.hideFilterOperatorMenu = () => {
|
|
14813
|
+
this.actions.filterOperatorMenuVisibleForColumnId = null;
|
|
14814
|
+
};
|
|
14745
14815
|
this.getColumnOrder = () => {
|
|
14746
14816
|
return this.getComputed().computedColumnOrder;
|
|
14747
14817
|
};
|
|
@@ -15530,7 +15600,7 @@ function getImperativeApi(context) {
|
|
|
15530
15600
|
}
|
|
15531
15601
|
|
|
15532
15602
|
// src/components/InfiniteTable/hooks/useAutoSizeColumns.ts
|
|
15533
|
-
var
|
|
15603
|
+
var import_react37 = require("react");
|
|
15534
15604
|
var OFFSET = 10;
|
|
15535
15605
|
function getColumnContentMaxWidths(domRef, options) {
|
|
15536
15606
|
var _a;
|
|
@@ -15602,11 +15672,11 @@ function useAutoSizeColumns() {
|
|
|
15602
15672
|
componentActions,
|
|
15603
15673
|
componentState: { domRef, ready, autoSizeColumnsKey, brain }
|
|
15604
15674
|
} = useComponentState();
|
|
15605
|
-
const [refreshId, setRefreshId] = (0,
|
|
15675
|
+
const [refreshId, setRefreshId] = (0, import_react37.useState)(0);
|
|
15606
15676
|
const theKey = typeof autoSizeColumnsKey === "object" ? autoSizeColumnsKey.key : autoSizeColumnsKey;
|
|
15607
15677
|
const getTheKey = useLatest(theKey);
|
|
15608
|
-
const lastExecutedIdentifierRef = (0,
|
|
15609
|
-
(0,
|
|
15678
|
+
const lastExecutedIdentifierRef = (0, import_react37.useRef)(null);
|
|
15679
|
+
(0, import_react37.useEffect)(() => {
|
|
15610
15680
|
const key = getTheKey();
|
|
15611
15681
|
if (key == null) {
|
|
15612
15682
|
return;
|
|
@@ -15619,7 +15689,7 @@ function useAutoSizeColumns() {
|
|
|
15619
15689
|
};
|
|
15620
15690
|
return brain.onRenderRangeChange(onChange);
|
|
15621
15691
|
}, [brain]);
|
|
15622
|
-
(0,
|
|
15692
|
+
(0, import_react37.useEffect)(() => {
|
|
15623
15693
|
var _a;
|
|
15624
15694
|
if (theKey == null) {
|
|
15625
15695
|
return;
|
|
@@ -15664,7 +15734,7 @@ function useAutoSizeColumns() {
|
|
|
15664
15734
|
}
|
|
15665
15735
|
|
|
15666
15736
|
// src/components/InfiniteTable/hooks/useCellRendering.tsx
|
|
15667
|
-
var
|
|
15737
|
+
var import_react38 = require("react");
|
|
15668
15738
|
var React51 = __toESM(require("react"));
|
|
15669
15739
|
|
|
15670
15740
|
// src/components/InfiniteTable/hooks/useYourBrain.ts
|
|
@@ -15749,13 +15819,13 @@ function useCellRendering(param) {
|
|
|
15749
15819
|
bodySize,
|
|
15750
15820
|
rowspan
|
|
15751
15821
|
});
|
|
15752
|
-
const scrollTopMaxRef = (0,
|
|
15753
|
-
(0,
|
|
15822
|
+
const scrollTopMaxRef = (0, import_react38.useRef)(0);
|
|
15823
|
+
(0, import_react38.useEffect)(() => {
|
|
15754
15824
|
return brain.onRenderCountChange(() => {
|
|
15755
15825
|
scrollTopMaxRef.current = brain.scrollTopMax;
|
|
15756
15826
|
});
|
|
15757
15827
|
}, [brain]);
|
|
15758
|
-
(0,
|
|
15828
|
+
(0, import_react38.useEffect)(() => {
|
|
15759
15829
|
return brain.onScrollStop((scrollPosition) => {
|
|
15760
15830
|
const { scrollTop: scrollTop2 } = scrollPosition;
|
|
15761
15831
|
if (scrollTop2 === 0) {
|
|
@@ -15782,13 +15852,13 @@ function useCellRendering(param) {
|
|
|
15782
15852
|
}
|
|
15783
15853
|
});
|
|
15784
15854
|
}, [brain, onScrollToTop, onScrollToBottom]);
|
|
15785
|
-
(0,
|
|
15855
|
+
(0, import_react38.useEffect)(() => {
|
|
15786
15856
|
if (!bodySize.height) {
|
|
15787
15857
|
return;
|
|
15788
15858
|
}
|
|
15789
15859
|
actions.ready = true;
|
|
15790
15860
|
}, [!!bodySize.height]);
|
|
15791
|
-
(0,
|
|
15861
|
+
(0, import_react38.useEffect)(() => {
|
|
15792
15862
|
if (!ready) {
|
|
15793
15863
|
}
|
|
15794
15864
|
const { onReady } = getState();
|
|
@@ -15797,10 +15867,10 @@ function useCellRendering(param) {
|
|
|
15797
15867
|
}
|
|
15798
15868
|
}, [ready]);
|
|
15799
15869
|
const [, rerender] = useRerender();
|
|
15800
|
-
(0,
|
|
15870
|
+
(0, import_react38.useEffect)(() => {
|
|
15801
15871
|
rerender();
|
|
15802
15872
|
}, [dataSourceState]);
|
|
15803
|
-
const renderCell = (0,
|
|
15873
|
+
const renderCell = (0, import_react38.useCallback)(
|
|
15804
15874
|
(params) => {
|
|
15805
15875
|
const {
|
|
15806
15876
|
rowIndex,
|
|
@@ -15865,7 +15935,7 @@ function useCellRendering(param) {
|
|
|
15865
15935
|
}
|
|
15866
15936
|
|
|
15867
15937
|
// src/components/InfiniteTable/hooks/useComputed.ts
|
|
15868
|
-
var
|
|
15938
|
+
var import_react49 = require("react");
|
|
15869
15939
|
|
|
15870
15940
|
// src/components/InfiniteTable/utils/MultiCellSelector.ts
|
|
15871
15941
|
var MultiCellSelector = class {
|
|
@@ -16057,10 +16127,10 @@ var MultiRowSelector = class {
|
|
|
16057
16127
|
};
|
|
16058
16128
|
|
|
16059
16129
|
// src/components/InfiniteTable/hooks/useColumnGroups.ts
|
|
16060
|
-
var
|
|
16130
|
+
var import_react40 = require("react");
|
|
16061
16131
|
|
|
16062
16132
|
// src/components/hooks/useInterceptedMap.ts
|
|
16063
|
-
var
|
|
16133
|
+
var import_react39 = require("react");
|
|
16064
16134
|
function interceptMap(map2, fns) {
|
|
16065
16135
|
const { set, delete: deleteKey, clear } = map2;
|
|
16066
16136
|
if (fns.set) {
|
|
@@ -16134,7 +16204,7 @@ function useColumnGroups() {
|
|
|
16134
16204
|
componentActions,
|
|
16135
16205
|
getComponentState
|
|
16136
16206
|
} = useComponentState();
|
|
16137
|
-
(0,
|
|
16207
|
+
(0, import_react40.useEffect)(() => {
|
|
16138
16208
|
const recompute = () => {
|
|
16139
16209
|
componentActions.columnGroupsDepthsMap = computeColumnGroupsDepths(computedColumnGroups);
|
|
16140
16210
|
};
|
|
@@ -16145,7 +16215,7 @@ function useColumnGroups() {
|
|
|
16145
16215
|
set: update
|
|
16146
16216
|
});
|
|
16147
16217
|
}, [computedColumnGroups]);
|
|
16148
|
-
(0,
|
|
16218
|
+
(0, import_react40.useEffect)(() => {
|
|
16149
16219
|
return interceptMap(collapsedColumnGroups, {
|
|
16150
16220
|
set: (key, visibleCol) => {
|
|
16151
16221
|
const colIds = key.slice(1);
|
|
@@ -16180,10 +16250,10 @@ function useColumnGroups() {
|
|
|
16180
16250
|
}
|
|
16181
16251
|
|
|
16182
16252
|
// src/components/InfiniteTable/hooks/useColumnRowspan.ts
|
|
16183
|
-
var
|
|
16253
|
+
var import_react41 = require("react");
|
|
16184
16254
|
function useColumnRowspan(computedVisibleColumns) {
|
|
16185
16255
|
const { getState: getDataSourceState } = useDataSourceContextValue();
|
|
16186
|
-
const rowspan = (0,
|
|
16256
|
+
const rowspan = (0, import_react41.useMemo)(() => {
|
|
16187
16257
|
const colsWithRowspan = computedVisibleColumns.filter(
|
|
16188
16258
|
(col) => typeof col.rowspan === "function"
|
|
16189
16259
|
);
|
|
@@ -16211,10 +16281,10 @@ function useColumnRowspan(computedVisibleColumns) {
|
|
|
16211
16281
|
}
|
|
16212
16282
|
|
|
16213
16283
|
// src/components/InfiniteTable/hooks/useColumnSizeFn.ts
|
|
16214
|
-
var
|
|
16284
|
+
var import_react42 = require("react");
|
|
16215
16285
|
var debug4 = dbg("useColumnSizeFn");
|
|
16216
16286
|
function useColumnSizeFn(columns) {
|
|
16217
|
-
const columnSize = (0,
|
|
16287
|
+
const columnSize = (0, import_react42.useCallback)(
|
|
16218
16288
|
(index) => {
|
|
16219
16289
|
const column = columns[index];
|
|
16220
16290
|
if (false) {
|
|
@@ -16228,10 +16298,10 @@ function useColumnSizeFn(columns) {
|
|
|
16228
16298
|
}
|
|
16229
16299
|
|
|
16230
16300
|
// src/components/InfiniteTable/hooks/useColumnsWhen.ts
|
|
16231
|
-
var
|
|
16301
|
+
var import_react45 = require("react");
|
|
16232
16302
|
|
|
16233
16303
|
// src/components/InfiniteTable/state/getInitialState.ts
|
|
16234
|
-
var
|
|
16304
|
+
var import_react43 = require("react");
|
|
16235
16305
|
|
|
16236
16306
|
// src/components/VirtualBrain/ScrollListener.ts
|
|
16237
16307
|
var initialScrollPosition = {
|
|
@@ -16324,7 +16394,7 @@ function initSetupState2() {
|
|
|
16324
16394
|
if (false) {
|
|
16325
16395
|
globalThis.renderer = renderer;
|
|
16326
16396
|
}
|
|
16327
|
-
const domRef = (0,
|
|
16397
|
+
const domRef = (0, import_react43.createRef)();
|
|
16328
16398
|
return {
|
|
16329
16399
|
renderer,
|
|
16330
16400
|
onRenderUpdater,
|
|
@@ -16344,12 +16414,12 @@ function initSetupState2() {
|
|
|
16344
16414
|
brain,
|
|
16345
16415
|
headerBrain,
|
|
16346
16416
|
domRef,
|
|
16347
|
-
columnMenuTargetRef: (0,
|
|
16348
|
-
editingValueRef: (0,
|
|
16349
|
-
scrollerDOMRef: (0,
|
|
16350
|
-
portalDOMRef: (0,
|
|
16351
|
-
focusDetectDOMRef: (0,
|
|
16352
|
-
activeCellIndicatorDOMRef: (0,
|
|
16417
|
+
columnMenuTargetRef: (0, import_react43.createRef)(),
|
|
16418
|
+
editingValueRef: (0, import_react43.createRef)(),
|
|
16419
|
+
scrollerDOMRef: (0, import_react43.createRef)(),
|
|
16420
|
+
portalDOMRef: (0, import_react43.createRef)(),
|
|
16421
|
+
focusDetectDOMRef: (0, import_react43.createRef)(),
|
|
16422
|
+
activeCellIndicatorDOMRef: (0, import_react43.createRef)(),
|
|
16353
16423
|
onColumnMenuClick: buildSubscriptionCallback(),
|
|
16354
16424
|
cellContextMenu: buildSubscriptionCallback(),
|
|
16355
16425
|
contextMenu: buildSubscriptionCallback(),
|
|
@@ -16640,10 +16710,10 @@ function getColumnVisibilityForHideEmptyGroupColumns(params) {
|
|
|
16640
16710
|
}
|
|
16641
16711
|
|
|
16642
16712
|
// src/components/InfiniteTable/hooks/useToggleGroupRow.ts
|
|
16643
|
-
var
|
|
16713
|
+
var import_react44 = require("react");
|
|
16644
16714
|
function useToggleGroupRow() {
|
|
16645
16715
|
const { getState: getDataSourceState, componentActions: dataSourceActions } = useDataSourceContextValue();
|
|
16646
|
-
const toggleGroupRow = (0,
|
|
16716
|
+
const toggleGroupRow = (0, import_react44.useCallback)((groupKeys) => {
|
|
16647
16717
|
const state = getDataSourceState();
|
|
16648
16718
|
const newState = new GroupRowsState(state.groupRowsState);
|
|
16649
16719
|
newState.toggleGroupRow(groupKeys);
|
|
@@ -16677,7 +16747,7 @@ function useToggleGroupRow() {
|
|
|
16677
16747
|
|
|
16678
16748
|
// src/components/InfiniteTable/hooks/useColumnsWhen.ts
|
|
16679
16749
|
function useGroupByMap(groupBy) {
|
|
16680
|
-
return (0,
|
|
16750
|
+
return (0, import_react45.useMemo)(() => getGroupByMap(groupBy), [groupBy]);
|
|
16681
16751
|
}
|
|
16682
16752
|
function useColumnsWhen() {
|
|
16683
16753
|
const {
|
|
@@ -16691,13 +16761,13 @@ function useColumnsWhen() {
|
|
|
16691
16761
|
pivotGrandTotalColumnPosition
|
|
16692
16762
|
}
|
|
16693
16763
|
} = useComponentState();
|
|
16694
|
-
(0,
|
|
16764
|
+
(0, import_react45.useEffect)(() => {
|
|
16695
16765
|
dataSourceActions.generateGroupRows = groupRenderStrategy !== "inline";
|
|
16696
16766
|
}, [groupRenderStrategy]);
|
|
16697
|
-
(0,
|
|
16767
|
+
(0, import_react45.useEffect)(() => {
|
|
16698
16768
|
dataSourceActions.pivotTotalColumnPosition = pivotTotalColumnPosition;
|
|
16699
16769
|
}, [pivotTotalColumnPosition]);
|
|
16700
|
-
(0,
|
|
16770
|
+
(0, import_react45.useEffect)(() => {
|
|
16701
16771
|
if (pivotGrandTotalColumnPosition != void 0) {
|
|
16702
16772
|
dataSourceActions.pivotGrandTotalColumnPosition = pivotGrandTotalColumnPosition;
|
|
16703
16773
|
}
|
|
@@ -16778,7 +16848,7 @@ function useColumnsWhenInlineGroupRenderStrategy(groupByMap) {
|
|
|
16778
16848
|
});
|
|
16779
16849
|
return computedColumns.size === 0 ? void 0 : computedColumns;
|
|
16780
16850
|
}
|
|
16781
|
-
(0,
|
|
16851
|
+
(0, import_react45.useEffect)(() => {
|
|
16782
16852
|
const update = () => {
|
|
16783
16853
|
componentActions.columnsWhenInlineGroupRenderStrategy = computeColumnsWhenInlineGroupRenderStrategy(
|
|
16784
16854
|
columns,
|
|
@@ -16814,7 +16884,7 @@ function useColumnsWhenGrouping() {
|
|
|
16814
16884
|
getComponentState
|
|
16815
16885
|
} = useComponentState();
|
|
16816
16886
|
const toggleGroupRow = useToggleGroupRow();
|
|
16817
|
-
(0,
|
|
16887
|
+
(0, import_react45.useEffect)(() => {
|
|
16818
16888
|
const update = () => {
|
|
16819
16889
|
const { columns: columnsWhenGrouping, groupColumnIds } = getColumnsWhenGrouping({
|
|
16820
16890
|
columns,
|
|
@@ -16890,7 +16960,7 @@ function useHideColumns(groupByMap) {
|
|
|
16890
16960
|
groupRenderStrategy
|
|
16891
16961
|
}
|
|
16892
16962
|
} = useComponentState();
|
|
16893
|
-
(0,
|
|
16963
|
+
(0, import_react45.useLayoutEffect)(() => {
|
|
16894
16964
|
if (groupRenderStrategy !== "multi-column") {
|
|
16895
16965
|
return;
|
|
16896
16966
|
}
|
|
@@ -16923,7 +16993,7 @@ function useHideColumns(groupByMap) {
|
|
|
16923
16993
|
hideEmptyGroupColumns ? groupRowsIndexesInDataArray : null,
|
|
16924
16994
|
hideEmptyGroupColumns
|
|
16925
16995
|
]);
|
|
16926
|
-
(0,
|
|
16996
|
+
(0, import_react45.useEffect)(() => {
|
|
16927
16997
|
const isGrouped = groupBy.length > 0;
|
|
16928
16998
|
const currentState = getComponentState();
|
|
16929
16999
|
const {
|
|
@@ -17084,13 +17154,13 @@ function getColumnsWhenGrouping(params) {
|
|
|
17084
17154
|
}
|
|
17085
17155
|
|
|
17086
17156
|
// src/components/InfiniteTable/hooks/useComputedColumns.ts
|
|
17087
|
-
var
|
|
17157
|
+
var import_react47 = require("react");
|
|
17088
17158
|
|
|
17089
17159
|
// src/components/InfiniteTable/hooks/useRerenderOnKeyChange.ts
|
|
17090
|
-
var
|
|
17160
|
+
var import_react46 = require("react");
|
|
17091
17161
|
var useRerenderOnKeyChange = (map2) => {
|
|
17092
17162
|
const [renderId, rerender] = useRerender();
|
|
17093
|
-
(0,
|
|
17163
|
+
(0, import_react46.useEffect)(() => {
|
|
17094
17164
|
const update = rafFn(rerender);
|
|
17095
17165
|
return interceptMap(map2, {
|
|
17096
17166
|
set: update,
|
|
@@ -17153,7 +17223,7 @@ var useComputedColumns = ({
|
|
|
17153
17223
|
computedColumnsMap,
|
|
17154
17224
|
computedColumnsMapInInitialOrder,
|
|
17155
17225
|
fieldsToColumn
|
|
17156
|
-
} = (0,
|
|
17226
|
+
} = (0, import_react47.useMemo)(() => {
|
|
17157
17227
|
return getComputedColumns({
|
|
17158
17228
|
columns,
|
|
17159
17229
|
scrollbarWidth: scrollbarWidth2,
|
|
@@ -17237,7 +17307,7 @@ var useComputedColumns = ({
|
|
|
17237
17307
|
};
|
|
17238
17308
|
|
|
17239
17309
|
// src/components/InfiniteTable/hooks/useScrollbars.ts
|
|
17240
|
-
var
|
|
17310
|
+
var import_react48 = require("react");
|
|
17241
17311
|
var INITIAL_SCROLLBARS = {
|
|
17242
17312
|
vertical: false,
|
|
17243
17313
|
horizontal: false
|
|
@@ -17245,8 +17315,8 @@ var INITIAL_SCROLLBARS = {
|
|
|
17245
17315
|
function useScrollbars(brain) {
|
|
17246
17316
|
const { getComponentState: getInfiniteTableState } = useComponentState();
|
|
17247
17317
|
const { getState: getDataSourceState } = useDataSourceContextValue();
|
|
17248
|
-
const [scrollbars, setScrollbars] = (0,
|
|
17249
|
-
(0,
|
|
17318
|
+
const [scrollbars, setScrollbars] = (0, import_react48.useState)(INITIAL_SCROLLBARS);
|
|
17319
|
+
(0, import_react48.useEffect)(() => {
|
|
17250
17320
|
return brain.onRenderCountChange(() => {
|
|
17251
17321
|
const { scrollTopMax, scrollLeftMax } = brain;
|
|
17252
17322
|
setScrollbars({
|
|
@@ -17255,7 +17325,7 @@ function useScrollbars(brain) {
|
|
|
17255
17325
|
});
|
|
17256
17326
|
});
|
|
17257
17327
|
}, [brain]);
|
|
17258
|
-
(0,
|
|
17328
|
+
(0, import_react48.useLayoutEffect)(() => {
|
|
17259
17329
|
const dataSourceState = getDataSourceState();
|
|
17260
17330
|
const { onScrollbarsChange } = getInfiniteTableState();
|
|
17261
17331
|
const { notifyScrollbarsChange } = dataSourceState;
|
|
@@ -17291,7 +17361,7 @@ function useComputed() {
|
|
|
17291
17361
|
bodySize,
|
|
17292
17362
|
showSeparatePivotColumnForSingleAggregation
|
|
17293
17363
|
} = componentState;
|
|
17294
|
-
(0,
|
|
17364
|
+
(0, import_react49.useState)(() => {
|
|
17295
17365
|
componentState.onRowHeightCSSVarChange.onChange((rowHeight) => {
|
|
17296
17366
|
if (rowHeight) {
|
|
17297
17367
|
componentActions.rowHeight = rowHeight;
|
|
@@ -17305,7 +17375,7 @@ function useComputed() {
|
|
|
17305
17375
|
}
|
|
17306
17376
|
);
|
|
17307
17377
|
});
|
|
17308
|
-
(0,
|
|
17378
|
+
(0, import_react49.useEffect)(() => {
|
|
17309
17379
|
dataSourceActions.showSeparatePivotColumnForSingleAggregation = showSeparatePivotColumnForSingleAggregation;
|
|
17310
17380
|
}, [showSeparatePivotColumnForSingleAggregation]);
|
|
17311
17381
|
const { multiSort, filterValue, filterTypes } = dataSourceState;
|
|
@@ -17373,14 +17443,14 @@ function useComputed() {
|
|
|
17373
17443
|
const scrollbars = useScrollbars(brain);
|
|
17374
17444
|
const computedPinnedStartOverflow = computedPinnedStartWidth ? computedPinnedStartColumnsWidth > computedPinnedStartWidth : false;
|
|
17375
17445
|
const computedPinnedEndOverflow = computedPinnedEndWidth ? computedPinnedEndColumnsWidth > computedPinnedEndWidth : false;
|
|
17376
|
-
const [multiRowSelector] = (0,
|
|
17446
|
+
const [multiRowSelector] = (0, import_react49.useState)(() => {
|
|
17377
17447
|
const multiRowSelector2 = new MultiRowSelector({
|
|
17378
17448
|
getIdForIndex: (index) => getDataSourceState().dataArray[index].id
|
|
17379
17449
|
});
|
|
17380
17450
|
return multiRowSelector2;
|
|
17381
17451
|
});
|
|
17382
17452
|
const getComputedVisibleColumns = useLatest(computedVisibleColumns);
|
|
17383
|
-
const [multiCellSelector] = (0,
|
|
17453
|
+
const [multiCellSelector] = (0, import_react49.useState)(() => {
|
|
17384
17454
|
return new MultiCellSelector({
|
|
17385
17455
|
getPrimaryKeyByIndex: dataSourceApi.getPrimaryKeyByIndex,
|
|
17386
17456
|
getColumnIdByIndex: (colIndex) => {
|
|
@@ -17421,7 +17491,7 @@ function useComputed() {
|
|
|
17421
17491
|
}
|
|
17422
17492
|
|
|
17423
17493
|
// src/components/InfiniteTable/hooks/useLicense/useLicense.ts
|
|
17424
|
-
var
|
|
17494
|
+
var import_react50 = require("react");
|
|
17425
17495
|
|
|
17426
17496
|
// src/components/InfiniteTable/hooks/useLicense/crc32.ts
|
|
17427
17497
|
var DEFAULT_ReversedPolynomial = 3988292384;
|
|
@@ -17590,10 +17660,10 @@ var isInsideSandbox = () => {
|
|
|
17590
17660
|
};
|
|
17591
17661
|
var isInsidePlayground = isInsideSandbox() || isInsideSandpack();
|
|
17592
17662
|
var useLicense = (licenseKey = "") => {
|
|
17593
|
-
const valid = (0,
|
|
17663
|
+
const valid = (0, import_react50.useMemo)(() => {
|
|
17594
17664
|
let valid2 = isValidLicense(licenseKey, {
|
|
17595
17665
|
publishedAt: 1624970570587,
|
|
17596
|
-
version: "3.0.
|
|
17666
|
+
version: "3.0.9"
|
|
17597
17667
|
});
|
|
17598
17668
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
17599
17669
|
return true;
|
|
@@ -17604,18 +17674,18 @@ var useLicense = (licenseKey = "") => {
|
|
|
17604
17674
|
};
|
|
17605
17675
|
|
|
17606
17676
|
// src/components/InfiniteTable/hooks/useScrollToActiveCell.ts
|
|
17607
|
-
var
|
|
17677
|
+
var import_react51 = require("react");
|
|
17608
17678
|
var RETRIES = 10;
|
|
17609
17679
|
function useScrollToActiveCell(activeCellIndex, dataCount, imperativeApi) {
|
|
17610
|
-
const didScrollRef = (0,
|
|
17611
|
-
const rafId = (0,
|
|
17612
|
-
(0,
|
|
17680
|
+
const didScrollRef = (0, import_react51.useRef)(false);
|
|
17681
|
+
const rafId = (0, import_react51.useRef)(null);
|
|
17682
|
+
(0, import_react51.useEffect)(() => {
|
|
17613
17683
|
if (activeCellIndex != null) {
|
|
17614
17684
|
didScrollRef.current = false;
|
|
17615
17685
|
cancelRaf(rafId.current);
|
|
17616
17686
|
}
|
|
17617
17687
|
}, [activeCellIndex]);
|
|
17618
|
-
(0,
|
|
17688
|
+
(0, import_react51.useEffect)(() => {
|
|
17619
17689
|
if (activeCellIndex != null && !didScrollRef.current) {
|
|
17620
17690
|
let tryScroll2 = function(times = 0) {
|
|
17621
17691
|
times++;
|
|
@@ -17643,18 +17713,18 @@ function useScrollToActiveCell(activeCellIndex, dataCount, imperativeApi) {
|
|
|
17643
17713
|
}
|
|
17644
17714
|
|
|
17645
17715
|
// src/components/InfiniteTable/hooks/useScrollToActiveRow.ts
|
|
17646
|
-
var
|
|
17716
|
+
var import_react52 = require("react");
|
|
17647
17717
|
var RETRIES2 = 10;
|
|
17648
17718
|
function useScrollToActiveRow(activeRowIndex, dataCount, imperativeApi) {
|
|
17649
|
-
const didScrollRef = (0,
|
|
17650
|
-
const rafId = (0,
|
|
17651
|
-
(0,
|
|
17719
|
+
const didScrollRef = (0, import_react52.useRef)(false);
|
|
17720
|
+
const rafId = (0, import_react52.useRef)(null);
|
|
17721
|
+
(0, import_react52.useEffect)(() => {
|
|
17652
17722
|
if (activeRowIndex != null) {
|
|
17653
17723
|
didScrollRef.current = false;
|
|
17654
17724
|
cancelAnimationFrame(rafId.current);
|
|
17655
17725
|
}
|
|
17656
17726
|
}, [activeRowIndex]);
|
|
17657
|
-
(0,
|
|
17727
|
+
(0, import_react52.useEffect)(() => {
|
|
17658
17728
|
if (activeRowIndex != null && !didScrollRef.current) {
|
|
17659
17729
|
let tryScroll2 = function(times = 0) {
|
|
17660
17730
|
times++;
|
|
@@ -17683,7 +17753,7 @@ function useScrollToActiveRow(activeRowIndex, dataCount, imperativeApi) {
|
|
|
17683
17753
|
var toCSSVarName = (value) => `--infinite-${value}`;
|
|
17684
17754
|
|
|
17685
17755
|
// src/components/InfiniteTable/eventHandlers/index.ts
|
|
17686
|
-
var
|
|
17756
|
+
var import_react53 = require("react");
|
|
17687
17757
|
|
|
17688
17758
|
// src/components/InfiniteTable/eventHandlers/onCellClick.ts
|
|
17689
17759
|
function onCellClick(context, event) {
|
|
@@ -18402,7 +18472,7 @@ function useEventHandlersContext() {
|
|
|
18402
18472
|
componentActions: dataSourceActions,
|
|
18403
18473
|
api: dataSourceApi
|
|
18404
18474
|
} = useDataSourceContextValue();
|
|
18405
|
-
const context = (0,
|
|
18475
|
+
const context = (0, import_react53.useMemo)(() => {
|
|
18406
18476
|
const context2 = {
|
|
18407
18477
|
getComputed,
|
|
18408
18478
|
dataSourceApi,
|
|
@@ -18429,7 +18499,7 @@ function useEventHandlersContext() {
|
|
|
18429
18499
|
}
|
|
18430
18500
|
function handleDOMEvents() {
|
|
18431
18501
|
const context = useEventHandlersContext();
|
|
18432
|
-
(0,
|
|
18502
|
+
(0, import_react53.useEffect)(() => {
|
|
18433
18503
|
const removeOnKeyDown = context.getState().keyDown.onChange((event) => {
|
|
18434
18504
|
onKeyDown(context, event);
|
|
18435
18505
|
});
|
|
@@ -18473,7 +18543,7 @@ function handleDOMEvents() {
|
|
|
18473
18543
|
}
|
|
18474
18544
|
function subscribeToDOMEvents() {
|
|
18475
18545
|
const { getState } = useInfiniteTable();
|
|
18476
|
-
const onKeyDown2 = (0,
|
|
18546
|
+
const onKeyDown2 = (0, import_react53.useCallback)((event) => {
|
|
18477
18547
|
getState().keyDown(event);
|
|
18478
18548
|
}, []);
|
|
18479
18549
|
return { onKeyDown: onKeyDown2 };
|
|
@@ -18484,11 +18554,11 @@ function useDOMEventHandlers() {
|
|
|
18484
18554
|
}
|
|
18485
18555
|
|
|
18486
18556
|
// src/components/InfiniteTable/hooks/useColumnMenu.ts
|
|
18487
|
-
var
|
|
18557
|
+
var import_react58 = require("react");
|
|
18488
18558
|
|
|
18489
18559
|
// src/components/hooks/useOverlay/index.tsx
|
|
18490
18560
|
var React52 = __toESM(require("react"));
|
|
18491
|
-
var
|
|
18561
|
+
var import_react54 = require("react");
|
|
18492
18562
|
var import_react_dom2 = require("react-dom");
|
|
18493
18563
|
|
|
18494
18564
|
// src/utils/pageGeometry/Point.ts
|
|
@@ -18877,7 +18947,7 @@ function DefaultOverlayPortal(props) {
|
|
|
18877
18947
|
}
|
|
18878
18948
|
function OverlayContent(props) {
|
|
18879
18949
|
const nodeRef = React52.useRef(null);
|
|
18880
|
-
(0,
|
|
18950
|
+
(0, import_react54.useEffect)(() => {
|
|
18881
18951
|
return props.realign.onChange((handle) => {
|
|
18882
18952
|
if (nodeRef.current && handle) {
|
|
18883
18953
|
alignOverlayNode(nodeRef.current, handle);
|
|
@@ -18888,7 +18958,7 @@ function OverlayContent(props) {
|
|
|
18888
18958
|
"div",
|
|
18889
18959
|
{
|
|
18890
18960
|
style: { position: "absolute", top: 0, left: 0 },
|
|
18891
|
-
ref: (0,
|
|
18961
|
+
ref: (0, import_react54.useCallback)((node) => {
|
|
18892
18962
|
if (node) {
|
|
18893
18963
|
alignOverlayNode(node, props);
|
|
18894
18964
|
}
|
|
@@ -18938,8 +19008,8 @@ function alignOverlayNode(node, params) {
|
|
|
18938
19008
|
});
|
|
18939
19009
|
}
|
|
18940
19010
|
function useOverlayPortal(content, portalContainer) {
|
|
18941
|
-
const [container, setContainer] = (0,
|
|
18942
|
-
(0,
|
|
19011
|
+
const [container, setContainer] = (0, import_react54.useState)(null);
|
|
19012
|
+
(0, import_react54.useLayoutEffect)(() => {
|
|
18943
19013
|
function getContainer() {
|
|
18944
19014
|
return __async(this, null, function* () {
|
|
18945
19015
|
const container2 = portalContainer ? yield retrieveElement(portalContainer) : null;
|
|
@@ -18987,10 +19057,10 @@ globalThis.allhandles = {};
|
|
|
18987
19057
|
globalThis.thehandles = {};
|
|
18988
19058
|
function useOverlay(params) {
|
|
18989
19059
|
const rootParams = params;
|
|
18990
|
-
const [handles] = (0,
|
|
18991
|
-
const [handleToRealign, setHandleToRealign] = (0,
|
|
18992
|
-
const [realignTimestamp, setRealignTimestamp] = (0,
|
|
18993
|
-
const getContentForPortal = (0,
|
|
19060
|
+
const [handles] = (0, import_react54.useState)(() => /* @__PURE__ */ new Map());
|
|
19061
|
+
const [handleToRealign, setHandleToRealign] = (0, import_react54.useState)(null);
|
|
19062
|
+
const [realignTimestamp, setRealignTimestamp] = (0, import_react54.useState)(0);
|
|
19063
|
+
const getContentForPortal = (0, import_react54.useCallback)(() => {
|
|
18994
19064
|
const contentForPortal = [];
|
|
18995
19065
|
for (const [_2, handle] of handles) {
|
|
18996
19066
|
contentForPortal.push(
|
|
@@ -19004,7 +19074,7 @@ function useOverlay(params) {
|
|
|
19004
19074
|
getContentForPortal(),
|
|
19005
19075
|
params.portalContainer
|
|
19006
19076
|
);
|
|
19007
|
-
const showOverlay = (0,
|
|
19077
|
+
const showOverlay = (0, import_react54.useCallback)(
|
|
19008
19078
|
(content, params2) => {
|
|
19009
19079
|
const id = params2.id || getIdForReactOnlyChild(content) || getChangeDetect();
|
|
19010
19080
|
const key = `${id}`;
|
|
@@ -19221,7 +19291,7 @@ var deriveStateFromProps2 = (params) => {
|
|
|
19221
19291
|
|
|
19222
19292
|
// src/components/Menu/Menu.tsx
|
|
19223
19293
|
var React55 = __toESM(require("react"));
|
|
19224
|
-
var
|
|
19294
|
+
var import_react57 = require("react");
|
|
19225
19295
|
|
|
19226
19296
|
// src/utils/pageGeometry/Triangle.ts
|
|
19227
19297
|
var Triangle = class extends ConvexPoly {
|
|
@@ -19440,24 +19510,24 @@ var MenuTriangleContext = class {
|
|
|
19440
19510
|
};
|
|
19441
19511
|
|
|
19442
19512
|
// src/components/Menu/MenuContext.ts
|
|
19443
|
-
var
|
|
19444
|
-
var MenuContext = (0,
|
|
19513
|
+
var import_react55 = require("react");
|
|
19514
|
+
var MenuContext = (0, import_react55.createContext)(null);
|
|
19445
19515
|
function useMenuContext() {
|
|
19446
|
-
const contextValue = (0,
|
|
19516
|
+
const contextValue = (0, import_react55.useContext)(MenuContext);
|
|
19447
19517
|
return contextValue;
|
|
19448
19518
|
}
|
|
19449
19519
|
|
|
19450
19520
|
// src/components/hooks/useMounted.ts
|
|
19451
|
-
var
|
|
19521
|
+
var import_react56 = require("react");
|
|
19452
19522
|
function useMounted() {
|
|
19453
|
-
let mountedRef = (0,
|
|
19454
|
-
(0,
|
|
19523
|
+
let mountedRef = (0, import_react56.useRef)(true);
|
|
19524
|
+
(0, import_react56.useEffect)(() => {
|
|
19455
19525
|
mountedRef.current = true;
|
|
19456
19526
|
return () => {
|
|
19457
19527
|
mountedRef.current = false;
|
|
19458
19528
|
};
|
|
19459
19529
|
}, []);
|
|
19460
|
-
const isMounted = (0,
|
|
19530
|
+
const isMounted = (0, import_react56.useCallback)(() => mountedRef.current, []);
|
|
19461
19531
|
return isMounted;
|
|
19462
19532
|
}
|
|
19463
19533
|
|
|
@@ -19547,7 +19617,7 @@ function useSubmenus({
|
|
|
19547
19617
|
onItemActivate
|
|
19548
19618
|
}) {
|
|
19549
19619
|
const { getState } = useMenuContext();
|
|
19550
|
-
const [{ onItemEnter, onItemLeave }] = (0,
|
|
19620
|
+
const [{ onItemEnter, onItemLeave }] = (0, import_react57.useState)(() => {
|
|
19551
19621
|
return new MenuTriangleContext({
|
|
19552
19622
|
parentMenuId: getState().parentMenuId,
|
|
19553
19623
|
onItemActivate: (itemKey) => {
|
|
@@ -19578,8 +19648,8 @@ function useSubmenus({
|
|
|
19578
19648
|
}).getHandlers();
|
|
19579
19649
|
});
|
|
19580
19650
|
return {
|
|
19581
|
-
onItemEnter: (0,
|
|
19582
|
-
onItemLeave: (0,
|
|
19651
|
+
onItemEnter: (0, import_react57.useCallback)(onItemEnter, []),
|
|
19652
|
+
onItemLeave: (0, import_react57.useCallback)(onItemLeave, [])
|
|
19583
19653
|
};
|
|
19584
19654
|
}
|
|
19585
19655
|
function MenuComponent(props) {
|
|
@@ -19604,16 +19674,16 @@ function MenuComponent(props) {
|
|
|
19604
19674
|
componentActions,
|
|
19605
19675
|
getState
|
|
19606
19676
|
} = useMenuContext();
|
|
19607
|
-
const setKeyboardActiveItemKey = (0,
|
|
19677
|
+
const setKeyboardActiveItemKey = (0, import_react57.useCallback)((key) => {
|
|
19608
19678
|
componentActions.keyboardActiveItemKey = key;
|
|
19609
19679
|
}, []);
|
|
19610
|
-
const setActiveItemKey = (0,
|
|
19680
|
+
const setActiveItemKey = (0, import_react57.useCallback)((key) => {
|
|
19611
19681
|
componentActions.activeItemKey = key;
|
|
19612
19682
|
}, []);
|
|
19613
19683
|
const isMounted = useMounted();
|
|
19614
|
-
const [submenuApi, setSubmenuApi] = (0,
|
|
19684
|
+
const [submenuApi, setSubmenuApi] = (0, import_react57.useState)(null);
|
|
19615
19685
|
let renderedChildren = null;
|
|
19616
|
-
(0,
|
|
19686
|
+
(0, import_react57.useLayoutEffect)(() => {
|
|
19617
19687
|
const { runtimeItems: runtimeItems2 } = getState();
|
|
19618
19688
|
const activeItem = runtimeItems2.filter(
|
|
19619
19689
|
(item) => item.type === "item" && activeItemKey === item.key
|
|
@@ -19815,7 +19885,7 @@ function MenuComponent(props) {
|
|
|
19815
19885
|
function onMenuBlur() {
|
|
19816
19886
|
componentActions.focused = false;
|
|
19817
19887
|
}
|
|
19818
|
-
const onMenuFocus = (0,
|
|
19888
|
+
const onMenuFocus = (0, import_react57.useCallback)(function() {
|
|
19819
19889
|
componentActions.focused = true;
|
|
19820
19890
|
setTimeout(() => {
|
|
19821
19891
|
var _a, _b;
|
|
@@ -19826,8 +19896,8 @@ function MenuComponent(props) {
|
|
|
19826
19896
|
}
|
|
19827
19897
|
});
|
|
19828
19898
|
}, []);
|
|
19829
|
-
const shouldSelectFirstItemOnFocus = (0,
|
|
19830
|
-
const [api] = (0,
|
|
19899
|
+
const shouldSelectFirstItemOnFocus = (0, import_react57.useRef)(true);
|
|
19900
|
+
const [api] = (0, import_react57.useState)(() => {
|
|
19831
19901
|
const result2 = {
|
|
19832
19902
|
focus: () => {
|
|
19833
19903
|
if (domRef.current) {
|
|
@@ -19845,7 +19915,7 @@ function MenuComponent(props) {
|
|
|
19845
19915
|
};
|
|
19846
19916
|
return result2;
|
|
19847
19917
|
});
|
|
19848
|
-
const refCallback = (0,
|
|
19918
|
+
const refCallback = (0, import_react57.useCallback)((node) => {
|
|
19849
19919
|
if (node) {
|
|
19850
19920
|
domRef.current = node;
|
|
19851
19921
|
onShow == null ? void 0 : onShow(getState(), api);
|
|
@@ -20276,7 +20346,7 @@ function useColumnMenu() {
|
|
|
20276
20346
|
} = useOverlay({
|
|
20277
20347
|
portalContainer: false
|
|
20278
20348
|
});
|
|
20279
|
-
(0,
|
|
20349
|
+
(0, import_react58.useEffect)(() => {
|
|
20280
20350
|
const { actions: actions2, getState: getState2 } = context;
|
|
20281
20351
|
const state = getState2();
|
|
20282
20352
|
return state.onColumnMenuClick.onChange((info) => {
|
|
@@ -20291,7 +20361,7 @@ function useColumnMenu() {
|
|
|
20291
20361
|
});
|
|
20292
20362
|
}, []);
|
|
20293
20363
|
const { columnMenuVisibleForColumnId, columnMenuVisibleKey } = getState();
|
|
20294
|
-
(0,
|
|
20364
|
+
(0, import_react58.useEffect)(() => {
|
|
20295
20365
|
const { columnMenuVisibleForColumnId: columnMenuVisibleForColumnId2, columnMenuTargetRef } = getState();
|
|
20296
20366
|
if (columnMenuVisibleForColumnId2) {
|
|
20297
20367
|
let handleMouseDown2 = function(event) {
|
|
@@ -20326,7 +20396,7 @@ function useColumnMenu() {
|
|
|
20326
20396
|
|
|
20327
20397
|
// src/components/InfiniteTable/components/FocusDetect.tsx
|
|
20328
20398
|
var React59 = __toESM(require("react"));
|
|
20329
|
-
var
|
|
20399
|
+
var import_react59 = require("react");
|
|
20330
20400
|
var style = {
|
|
20331
20401
|
width: 0,
|
|
20332
20402
|
height: 0,
|
|
@@ -20346,7 +20416,7 @@ function FocusDetect() {
|
|
|
20346
20416
|
} = useInfiniteTable();
|
|
20347
20417
|
const { getState: getDataSourceState } = useDataSourceContextValue();
|
|
20348
20418
|
const { focusDetectDOMRef } = getState();
|
|
20349
|
-
const onFocus = (0,
|
|
20419
|
+
const onFocus = (0, import_react59.useCallback)(() => __async(this, null, function* () {
|
|
20350
20420
|
const context = {
|
|
20351
20421
|
getDataSourceState,
|
|
20352
20422
|
getComputed,
|
|
@@ -20370,13 +20440,13 @@ function FocusDetect() {
|
|
|
20370
20440
|
}
|
|
20371
20441
|
|
|
20372
20442
|
// src/components/InfiniteTable/hooks/useEditingCallbackProps.ts
|
|
20373
|
-
var
|
|
20443
|
+
var import_react60 = require("react");
|
|
20374
20444
|
function useOnEditCancelled() {
|
|
20375
20445
|
const context = useInfiniteTable();
|
|
20376
20446
|
const { getState } = context;
|
|
20377
20447
|
const { editingCell } = getState();
|
|
20378
20448
|
const cancelled = editingCell && !editingCell.active ? editingCell.cancelled : void 0;
|
|
20379
|
-
(0,
|
|
20449
|
+
(0, import_react60.useEffect)(() => {
|
|
20380
20450
|
if (cancelled) {
|
|
20381
20451
|
const { rowIndex, columnId, initialValue } = getState().editingCell;
|
|
20382
20452
|
const { onEditCancelled } = getState();
|
|
@@ -20396,7 +20466,7 @@ function useOnEditRejected() {
|
|
|
20396
20466
|
state: { editingCell }
|
|
20397
20467
|
} = context;
|
|
20398
20468
|
const rejected = editingCell && !editingCell.active && editingCell.accepted instanceof Error ? editingCell.accepted : void 0;
|
|
20399
|
-
(0,
|
|
20469
|
+
(0, import_react60.useEffect)(() => {
|
|
20400
20470
|
if (rejected) {
|
|
20401
20471
|
const { rowIndex, columnId, value, initialValue } = getState().editingCell;
|
|
20402
20472
|
const { onEditRejected } = getState();
|
|
@@ -20418,7 +20488,7 @@ function useFocusOnEditStop() {
|
|
|
20418
20488
|
} = context;
|
|
20419
20489
|
const active = editingCell == null ? void 0 : editingCell.active;
|
|
20420
20490
|
const prevActive = usePrevious(active);
|
|
20421
|
-
(0,
|
|
20491
|
+
(0, import_react60.useEffect)(() => {
|
|
20422
20492
|
if (!active && prevActive) {
|
|
20423
20493
|
context.api.focus();
|
|
20424
20494
|
}
|
|
@@ -20431,7 +20501,7 @@ function useOnEditAccepted() {
|
|
|
20431
20501
|
getState
|
|
20432
20502
|
} = context;
|
|
20433
20503
|
const accepted = editingCell && !editingCell.active && !editingCell.cancelled && editingCell.accepted === true;
|
|
20434
|
-
(0,
|
|
20504
|
+
(0, import_react60.useEffect)(() => {
|
|
20435
20505
|
var _a, _b;
|
|
20436
20506
|
if (accepted) {
|
|
20437
20507
|
const { editingCell: editingCell2 } = getState();
|
|
@@ -20455,7 +20525,7 @@ function useOnEditPersisted() {
|
|
|
20455
20525
|
getState
|
|
20456
20526
|
} = context;
|
|
20457
20527
|
const persisted = editingCell ? editingCell.persisted : void 0;
|
|
20458
|
-
(0,
|
|
20528
|
+
(0, import_react60.useEffect)(() => {
|
|
20459
20529
|
if (persisted) {
|
|
20460
20530
|
const { editingCell: editingCell2, onEditPersistError, onEditPersistSuccess } = getState();
|
|
20461
20531
|
if (!editingCell2) {
|
|
@@ -20486,7 +20556,7 @@ function useEditingCallbackProps() {
|
|
|
20486
20556
|
}
|
|
20487
20557
|
|
|
20488
20558
|
// src/components/InfiniteTable/hooks/useColumnFilterOperatorMenu.ts
|
|
20489
|
-
var
|
|
20559
|
+
var import_react61 = require("react");
|
|
20490
20560
|
|
|
20491
20561
|
// src/components/InfiniteTable/utils/getFilterOperatorMenuForColumn.tsx
|
|
20492
20562
|
var React62 = __toESM(require("react"));
|
|
@@ -20555,6 +20625,14 @@ function getFilterOperatorMenuForColumn(columnId, context, onHideIntent) {
|
|
|
20555
20625
|
};
|
|
20556
20626
|
});
|
|
20557
20627
|
const firstItems = [
|
|
20628
|
+
{
|
|
20629
|
+
key: "close",
|
|
20630
|
+
label: "Close Menu",
|
|
20631
|
+
icon: null,
|
|
20632
|
+
onAction: () => {
|
|
20633
|
+
api.hideFilterOperatorMenu();
|
|
20634
|
+
}
|
|
20635
|
+
},
|
|
20558
20636
|
{
|
|
20559
20637
|
key: "clear",
|
|
20560
20638
|
label: "Clear",
|
|
@@ -20620,7 +20698,7 @@ function useColumnFilterOperatorMenu() {
|
|
|
20620
20698
|
} = useOverlay({
|
|
20621
20699
|
portalContainer: false
|
|
20622
20700
|
});
|
|
20623
|
-
(0,
|
|
20701
|
+
(0, import_react61.useEffect)(() => {
|
|
20624
20702
|
const { actions: actions2, getState: getState2 } = context;
|
|
20625
20703
|
const state = getState2();
|
|
20626
20704
|
return state.onFilterOperatorMenuClick.onChange((info) => {
|
|
@@ -20656,7 +20734,7 @@ function useColumnFilterOperatorMenu() {
|
|
|
20656
20734
|
actions2.filterOperatorMenuVisibleForColumnId = column.id;
|
|
20657
20735
|
});
|
|
20658
20736
|
}, []);
|
|
20659
|
-
(0,
|
|
20737
|
+
(0, import_react61.useEffect)(() => {
|
|
20660
20738
|
const { filterOperatorMenuVisibleForColumnId } = getState();
|
|
20661
20739
|
if (filterOperatorMenuVisibleForColumnId) {
|
|
20662
20740
|
let handleMouseDown2 = function(event) {
|
|
@@ -20683,7 +20761,7 @@ function useColumnFilterOperatorMenu() {
|
|
|
20683
20761
|
}
|
|
20684
20762
|
|
|
20685
20763
|
// src/components/InfiniteTable/hooks/useContextMenu.ts
|
|
20686
|
-
var
|
|
20764
|
+
var import_react62 = require("react");
|
|
20687
20765
|
|
|
20688
20766
|
// src/components/InfiniteTable/utils/getCellContextMenu.tsx
|
|
20689
20767
|
var React63 = __toESM(require("react"));
|
|
@@ -20827,7 +20905,7 @@ function useCellContextMenu() {
|
|
|
20827
20905
|
} = useOverlay({
|
|
20828
20906
|
portalContainer: false
|
|
20829
20907
|
});
|
|
20830
|
-
(0,
|
|
20908
|
+
(0, import_react62.useEffect)(() => {
|
|
20831
20909
|
const { actions: actions2, getState: getState2, getDataSourceState } = context;
|
|
20832
20910
|
const state = getState2();
|
|
20833
20911
|
return state.cellContextMenu.onChange((info) => {
|
|
@@ -20877,7 +20955,7 @@ function useCellContextMenu() {
|
|
|
20877
20955
|
}
|
|
20878
20956
|
});
|
|
20879
20957
|
}, []);
|
|
20880
|
-
(0,
|
|
20958
|
+
(0, import_react62.useEffect)(() => {
|
|
20881
20959
|
const { cellContextMenuVisibleFor } = getState();
|
|
20882
20960
|
if (cellContextMenuVisibleFor) {
|
|
20883
20961
|
let handleMouseDown2 = function(event) {
|
|
@@ -20912,7 +20990,7 @@ function useTableContextMenu() {
|
|
|
20912
20990
|
} = useOverlay({
|
|
20913
20991
|
portalContainer: false
|
|
20914
20992
|
});
|
|
20915
|
-
(0,
|
|
20993
|
+
(0, import_react62.useEffect)(() => {
|
|
20916
20994
|
const { actions: actions2, getState: getState2 } = context;
|
|
20917
20995
|
const state = getState2();
|
|
20918
20996
|
return state.contextMenu.onChange((info) => {
|
|
@@ -20957,7 +21035,7 @@ function useTableContextMenu() {
|
|
|
20957
21035
|
}
|
|
20958
21036
|
});
|
|
20959
21037
|
}, []);
|
|
20960
|
-
(0,
|
|
21038
|
+
(0, import_react62.useEffect)(() => {
|
|
20961
21039
|
const { contextMenuVisibleFor } = getState();
|
|
20962
21040
|
if (contextMenuVisibleFor) {
|
|
20963
21041
|
let handleMouseDown2 = function(event) {
|