@infinite-table/infinite-react 2.0.8 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.css +1 -1
- package/index.d.ts +138 -15
- package/index.dev.js +897 -203
- package/index.dev.mjs +896 -203
- package/index.js +5 -5
- package/index.mjs +5 -5
- package/package.json +2 -2
package/index.dev.mjs
CHANGED
|
@@ -1357,8 +1357,8 @@ function stripVar(cssVariableWithVarString) {
|
|
|
1357
1357
|
}
|
|
1358
1358
|
|
|
1359
1359
|
// src/components/InfiniteTable/theme.css.ts
|
|
1360
|
-
var InternalVars = {
|
|
1361
|
-
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)", 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)" } } };
|
|
1360
|
+
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)" };
|
|
1361
|
+
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)" } } };
|
|
1362
1362
|
var columnHeaderHeightName = "column-header-height";
|
|
1363
1363
|
|
|
1364
1364
|
// src/utils/selectParent.ts
|
|
@@ -5126,22 +5126,22 @@ var createRuntimeFn = (config) => (options) => {
|
|
|
5126
5126
|
|
|
5127
5127
|
// src/components/InfiniteTable/components/InfiniteTableHeader/header.css.ts
|
|
5128
5128
|
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";
|
|
5129
|
-
var HeaderCellContentRecipe = createRuntimeFn({ defaultClassName: "
|
|
5129
|
+
var HeaderCellContentRecipe = createRuntimeFn({ defaultClassName: "header_HeaderCellContentRecipe__12zfob11x 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__12zfob11y", true: "header_HeaderCellContentRecipe_filtered_true__12zfob11z" }, verticalAlign: { start: "header_HeaderCellContentRecipe_verticalAlign_start__12zfob120", end: "header_HeaderCellContentRecipe_verticalAlign_end__12zfob121", center: "header_HeaderCellContentRecipe_verticalAlign_center__12zfob122" }, align: { start: "header_HeaderCellContentRecipe_align_start__12zfob123", end: "header_HeaderCellContentRecipe_align_end__12zfob124", center: "header_HeaderCellContentRecipe_align_center__12zfob125" } }, defaultVariants: {}, compoundVariants: [] });
|
|
5130
5130
|
var HeaderCellProxy = "header_HeaderCellProxy__12zfob1m utilities_whiteSpace_nowrap__16lm1iw22 utilities_textOverflow_ellipsis__16lm1iw23 utilities_overflow_hidden__16lm1iw1w";
|
|
5131
|
-
var HeaderCellRecipe = createRuntimeFn({ defaultClassName: "header_HeaderCellRecipe__12zfob1n utilities_display_block__16lm1iw11", variantClassNames: { rowActive: { false: "header_HeaderCellRecipe_rowActive_false__12zfob1o", true: "header_HeaderCellRecipe_rowActive_true__12zfob1p" }, rowSelected: { false: "
|
|
5131
|
+
var HeaderCellRecipe = createRuntimeFn({ defaultClassName: "header_HeaderCellRecipe__12zfob1n utilities_display_block__16lm1iw11", variantClassNames: { rowActive: { false: "header_HeaderCellRecipe_rowActive_false__12zfob1o", true: "header_HeaderCellRecipe_rowActive_true__12zfob1p" }, cellSelected: { false: "header_HeaderCellRecipe_cellSelected_false__12zfob1q", true: "header_HeaderCellRecipe_cellSelected_true__12zfob1r" }, rowSelected: { false: "header_HeaderCellRecipe_rowSelected_false__12zfob1s", true: "header_HeaderCellRecipe_rowSelected_true__12zfob1t", null: "header_HeaderCellRecipe_rowSelected_null__12zfob1u" }, groupRow: { false: "header_HeaderCellRecipe_groupRow_false__12zfob1v", true: "header_HeaderCellRecipe_groupRow_true__12zfob1w" }, groupCell: { false: "header_HeaderCellRecipe_groupCell_false__12zfob1x", true: "header_HeaderCellRecipe_groupCell_true__12zfob1y" }, align: { start: "header_HeaderCellRecipe_align_start__12zfob1z", end: "header_HeaderCellRecipe_align_end__12zfob110", center: "header_HeaderCellRecipe_align_center__12zfob111" }, verticalAlign: { start: "header_HeaderCellRecipe_verticalAlign_start__12zfob112", end: "header_HeaderCellRecipe_verticalAlign_end__12zfob113", center: "header_HeaderCellRecipe_verticalAlign_center__12zfob114" }, zebra: { false: "header_HeaderCellRecipe_zebra_false__12zfob115", even: "header_HeaderCellRecipe_zebra_even__12zfob116", odd: "header_HeaderCellRecipe_zebra_odd__12zfob117" }, dragging: { true: "header_HeaderCellRecipe_dragging_true__12zfob118", false: "header_HeaderCellRecipe_dragging_false__12zfob119" }, first: { true: "header_HeaderCellRecipe_first_true__12zfob11a", false: "header_HeaderCellRecipe_first_false__12zfob11b" }, last: { true: "header_HeaderCellRecipe_last_true__12zfob11c", false: "header_HeaderCellRecipe_last_false__12zfob11d" }, groupByField: { true: "header_HeaderCellRecipe_groupByField_true__12zfob11e", false: "header_HeaderCellRecipe_groupByField_false__12zfob11f" }, firstInCategory: { true: "header_HeaderCellRecipe_firstInCategory_true__12zfob11g", false: "header_HeaderCellRecipe_firstInCategory_false__12zfob11h" }, lastInCategory: { true: "header_HeaderCellRecipe_lastInCategory_true__12zfob11i", false: "header_HeaderCellRecipe_lastInCategory_false__12zfob11j" }, pinned: { start: "header_HeaderCellRecipe_pinned_start__12zfob11k", end: "header_HeaderCellRecipe_pinned_end__12zfob11l", false: "header_HeaderCellRecipe_pinned_false__12zfob11m" }, filtered: { true: "header_HeaderCellRecipe_filtered_true__12zfob11n", false: "header_HeaderCellRecipe_filtered_false__12zfob11o" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "header_HeaderCellRecipe_compound_0__12zfob11p"], [{ pinned: "end", firstInCategory: true }, "header_HeaderCellRecipe_compound_1__12zfob11q"], [{ pinned: false, lastInCategory: true }, "header_HeaderCellRecipe_compound_2__12zfob11r"]] });
|
|
5132
5132
|
var HeaderClsRecipe = createRuntimeFn({ defaultClassName: "header_HeaderClsRecipe__12zfob18 utilities_display_block__16lm1iw11 utilities_position_absolute__16lm1iw2", variantClassNames: { pinned: { start: "header_HeaderClsRecipe_pinned_start__12zfob19", end: "header_HeaderClsRecipe_pinned_end__12zfob1a", false: "header_HeaderClsRecipe_pinned_false__12zfob1b" }, firstInCategory: { true: "header_HeaderClsRecipe_firstInCategory_true__12zfob1c", false: "header_HeaderClsRecipe_firstInCategory_false__12zfob1d" }, lastInCategory: { true: "header_HeaderClsRecipe_lastInCategory_true__12zfob1e", false: "header_HeaderClsRecipe_lastInCategory_false__12zfob1f" }, overflow: { true: "header_HeaderClsRecipe_overflow_true__12zfob1g", false: "header_HeaderClsRecipe_overflow_false__12zfob1h" } }, defaultVariants: {}, compoundVariants: [[{ overflow: true, pinned: "start" }, "header_HeaderClsRecipe_compound_0__12zfob1i"], [{ pinned: "start", firstInCategory: true }, "header_HeaderClsRecipe_compound_1__12zfob1j"], [{ overflow: true, pinned: "end" }, "header_HeaderClsRecipe_compound_2__12zfob1k"], [{ pinned: "end", lastInCategory: true }, "header_HeaderClsRecipe_compound_3__12zfob1l"]] });
|
|
5133
|
-
var HeaderFilterCls = "
|
|
5134
|
-
var HeaderFilterEditorCls = "
|
|
5133
|
+
var HeaderFilterCls = "header_HeaderFilterCls__12zfob128 utilities_display_flex__16lm1iwy utilities_flexFlow_row__16lm1iw1n utilities_alignItems_stretch__16lm1iw1q utilities_position_relative__16lm1iw1";
|
|
5134
|
+
var HeaderFilterEditorCls = "header_HeaderFilterEditorCls__12zfob12d utilities_width_100%__16lm1iw1a utilities_height_100%__16lm1iw18";
|
|
5135
5135
|
var HeaderFilterIconIndexCls = "header_HeaderFilterIconIndexCls__12zfob16";
|
|
5136
|
-
var HeaderFilterOperatorCls = "
|
|
5137
|
-
var HeaderFilterOperatorIconRecipe = createRuntimeFn({ defaultClassName: "
|
|
5138
|
-
var HeaderGroupCls = "
|
|
5139
|
-
var HeaderMenuIconCls = createRuntimeFn({ defaultClassName: "
|
|
5136
|
+
var HeaderFilterOperatorCls = "header_HeaderFilterOperatorCls__12zfob129 utilities_display_flex__16lm1iwy utilities_flexFlow_row__16lm1iw1n utilities_alignItems_center__16lm1iw1p utilities_position_relative__16lm1iw1";
|
|
5137
|
+
var HeaderFilterOperatorIconRecipe = createRuntimeFn({ defaultClassName: "header_HeaderFilterOperatorIconRecipe__12zfob12a utilities_position_relative__16lm1iw1 utilities_top_0__16lm1iw1b", variantClassNames: { disabled: { true: "header_HeaderFilterOperatorIconRecipe_disabled_true__12zfob12b", false: "header_HeaderFilterOperatorIconRecipe_disabled_false__12zfob12c" } }, defaultVariants: {}, compoundVariants: [] });
|
|
5138
|
+
var HeaderGroupCls = "header_HeaderGroupCls__12zfob127 utilities_display_flex__16lm1iwy utilities_flexFlow_row__16lm1iw1n utilities_alignItems_center__16lm1iw1p";
|
|
5139
|
+
var HeaderMenuIconCls = createRuntimeFn({ defaultClassName: "header_HeaderMenuIconCls__12zfob11s 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__12zfob11t" }, reserveSpaceWhenHidden: { true: "header_HeaderMenuIconCls_reserveSpaceWhenHidden_true__12zfob11u", false: "header_HeaderMenuIconCls_reserveSpaceWhenHidden_false__12zfob11v" } }, defaultVariants: {}, compoundVariants: [[{ menuVisible: true, reserveSpaceWhenHidden: false }, "header_HeaderMenuIconCls_compound_0__12zfob11w"]] });
|
|
5140
5140
|
var HeaderScrollbarPlaceholderCls = "header_HeaderScrollbarPlaceholderCls__12zfob17 utilities_position_absolute__16lm1iw2";
|
|
5141
5141
|
var HeaderSortIconCls = "utilities_position_relative__16lm1iw1";
|
|
5142
5142
|
var HeaderSortIconIndexCls = "header_HeaderSortIconIndexCls__12zfob15";
|
|
5143
5143
|
var HeaderSortIconRecipe = createRuntimeFn({ defaultClassName: "", variantClassNames: { align: { start: "header_HeaderSortIconRecipe_align_start__12zfob12", center: "header_HeaderSortIconRecipe_align_center__12zfob13", end: "header_HeaderSortIconRecipe_align_end__12zfob14" } }, defaultVariants: {}, compoundVariants: [] });
|
|
5144
|
-
var HeaderWrapperCls = "
|
|
5144
|
+
var HeaderWrapperCls = "header_HeaderWrapperCls__12zfob126 utilities_overflow_hidden__16lm1iw1w utilities_position_relative__16lm1iw1 utilities_display_flex__16lm1iwy utilities_flexFlow_row__16lm1iw1n";
|
|
5145
5145
|
|
|
5146
5146
|
// src/components/InfiniteTable/components/icons/InfiniteTableIconClassName.ts
|
|
5147
5147
|
var InfiniteTableIconClassName = "InfiniteTableIcon";
|
|
@@ -6548,6 +6548,7 @@ function useCellClassName(column, baseClasses, variants, extraFlags) {
|
|
|
6548
6548
|
firstInCategory: column.computedFirstInCategory,
|
|
6549
6549
|
lastInCategory: column.computedLastInCategory,
|
|
6550
6550
|
pinned: column.computedPinned || false,
|
|
6551
|
+
cellSelected: extraFlags.cellSelected || false,
|
|
6551
6552
|
rowSelected: (_a = extraFlags.rowSelected) != null ? _a : "null",
|
|
6552
6553
|
rowActive: extraFlags.rowActive,
|
|
6553
6554
|
dragging: extraFlags.dragging,
|
|
@@ -6577,6 +6578,9 @@ function useCellClassName(column, baseClasses, variants, extraFlags) {
|
|
|
6577
6578
|
if (extraFlags.rowSelected) {
|
|
6578
6579
|
result.push(...baseClasses.map((c) => `${c}--row-selected`));
|
|
6579
6580
|
}
|
|
6581
|
+
if (extraFlags.cellSelected) {
|
|
6582
|
+
result.push(...baseClasses.map((c) => `${c}--cell-selected`));
|
|
6583
|
+
}
|
|
6580
6584
|
if (extraFlags.groupRow) {
|
|
6581
6585
|
result.push(...baseClasses.map((c) => `${c}--group-row`));
|
|
6582
6586
|
result.push(
|
|
@@ -6605,9 +6609,7 @@ var InfiniteClsHasPinnedEnd = "InfiniteCls_InfiniteClsHasPinnedEnd__1yeub2vo";
|
|
|
6605
6609
|
var InfiniteClsHasPinnedStart = "InfiniteCls_InfiniteClsHasPinnedStart__1yeub2vn";
|
|
6606
6610
|
var InfiniteClsRecipe = createRuntimeFn({ defaultClassName: "", variantClassNames: { focused: { true: "InfiniteCls_InfiniteClsRecipe_focused_true__1yeub2v2", false: "InfiniteCls_InfiniteClsRecipe_focused_false__1yeub2v3" }, focusedWithin: { true: "InfiniteCls_InfiniteClsRecipe_focusedWithin_true__1yeub2v4", false: "InfiniteCls_InfiniteClsRecipe_focusedWithin_false__1yeub2v5" }, hasPinnedStart: { true: "InfiniteCls_InfiniteClsRecipe_hasPinnedStart_true__1yeub2v6", false: "InfiniteCls_InfiniteClsRecipe_hasPinnedStart_false__1yeub2v7" }, hasPinnedEnd: { true: "InfiniteCls_InfiniteClsRecipe_hasPinnedEnd_true__1yeub2v8", false: "InfiniteCls_InfiniteClsRecipe_hasPinnedEnd_false__1yeub2v9" }, hasPinnedStartOverflow: { true: "InfiniteCls_InfiniteClsRecipe_hasPinnedStartOverflow_true__1yeub2va", false: "InfiniteCls_InfiniteClsRecipe_hasPinnedStartOverflow_false__1yeub2vb" }, hasPinnedEndOverflow: { true: "InfiniteCls_InfiniteClsRecipe_hasPinnedEndOverflow_true__1yeub2vc", false: "InfiniteCls_InfiniteClsRecipe_hasPinnedEndOverflow_false__1yeub2vd" } }, defaultVariants: {}, compoundVariants: [[{ focused: false, focusedWithin: false }, "InfiniteCls_InfiniteClsRecipe_compound_0__1yeub2ve"]] });
|
|
6607
6611
|
var InfiniteClsShiftingColumns = "InfiniteCls_shiftingcols__1yeub2vl";
|
|
6608
|
-
var PinnedEndIndicatorBorder = "InfiniteCls_PinnedEndIndicatorBorder__1yeub2vr InfiniteCls_PinnedIndicatorCls__1yeub2vp utilities_position_absolute__16lm1iw2 utilities_top_0__16lm1iw1b utilities_cursor_colResize__16lm1iwj utilities_userSelect_none__16lm1iw16 utilities_width_0__16lm1iw19 utilities_visibility_hidden__16lm1iw20 utilities_pointerEvents_none__16lm1iwk utilities_zIndex_10000000__16lm1iwu";
|
|
6609
6612
|
var PinnedRowsContainerClsVariants = createRuntimeFn({ defaultClassName: "", variantClassNames: { pinned: { start: "InfiniteCls_PinnedRowsContainerClsVariants_pinned_start__1yeub2vi", end: "InfiniteCls_PinnedRowsContainerClsVariants_pinned_end__1yeub2vj", false: "InfiniteCls_PinnedRowsContainerClsVariants_pinned_false__1yeub2vk" } }, defaultVariants: {}, compoundVariants: [] });
|
|
6610
|
-
var PinnedStartIndicatorBorder = "InfiniteCls_PinnedStartIndicatorBorder__1yeub2vq InfiniteCls_PinnedIndicatorCls__1yeub2vp utilities_position_absolute__16lm1iw2 utilities_top_0__16lm1iw1b utilities_cursor_colResize__16lm1iwj utilities_userSelect_none__16lm1iw16 utilities_width_0__16lm1iw19 utilities_visibility_hidden__16lm1iw20 utilities_pointerEvents_none__16lm1iwk utilities_zIndex_10000000__16lm1iwu";
|
|
6611
6613
|
|
|
6612
6614
|
// src/components/InfiniteTable/utils/rafFn.ts
|
|
6613
6615
|
var rafFn = (fn) => {
|
|
@@ -7744,7 +7746,8 @@ function objectValuesExcept(obj, exceptList) {
|
|
|
7744
7746
|
|
|
7745
7747
|
// src/components/InfiniteTable/components/cell.css.ts
|
|
7746
7748
|
var ColumnCellCls = "cell_ColumnCellCls__1eexc2a6 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";
|
|
7747
|
-
var ColumnCellRecipe = createRuntimeFn({ defaultClassName: "
|
|
7749
|
+
var ColumnCellRecipe = createRuntimeFn({ defaultClassName: "cell_ColumnCellRecipe__1eexc2ah", variantClassNames: { dragging: { false: "cell_ColumnCellRecipe_dragging_false__1eexc2ai", true: "cell_ColumnCellRecipe_dragging_true__1eexc2aj" }, cellSelected: { false: "cell_ColumnCellRecipe_cellSelected_false__1eexc2ak", true: "cell_ColumnCellRecipe_cellSelected_true__1eexc2al" }, align: { start: "cell_ColumnCellRecipe_align_start__1eexc2am", end: "cell_ColumnCellRecipe_align_end__1eexc2an", center: "cell_ColumnCellRecipe_align_center__1eexc2ao" }, verticalAlign: { start: "cell_ColumnCellRecipe_verticalAlign_start__1eexc2ap", end: "cell_ColumnCellRecipe_verticalAlign_end__1eexc2aq", center: "cell_ColumnCellRecipe_verticalAlign_center__1eexc2ar" }, rowActive: { false: "cell_ColumnCellRecipe_rowActive_false__1eexc2as", true: "cell_ColumnCellRecipe_rowActive_true__1eexc2at" }, groupRow: { false: "cell_ColumnCellRecipe_groupRow_false__1eexc2au", true: "cell_ColumnCellRecipe_groupRow_true__1eexc2av" }, groupCell: { false: "cell_ColumnCellRecipe_groupCell_false__1eexc2aw", true: "cell_ColumnCellRecipe_groupCell_true__1eexc2ax" }, zebra: { false: "cell_ColumnCellRecipe_zebra_false__1eexc2ay", even: "cell_ColumnCellRecipe_zebra_even__1eexc2az", odd: "cell_ColumnCellRecipe_zebra_odd__1eexc2a10" }, rowSelected: { true: "cell_ColumnCellRecipe_rowSelected_true__1eexc2a11", false: "cell_ColumnCellRecipe_rowSelected_false__1eexc2a12", null: "cell_ColumnCellRecipe_rowSelected_null__1eexc2a13" }, first: { true: "cell_ColumnCellRecipe_first_true__1eexc2a14", false: "cell_ColumnCellRecipe_first_false__1eexc2a15" }, last: { true: "cell_ColumnCellRecipe_last_true__1eexc2a16", false: "cell_ColumnCellRecipe_last_false__1eexc2a17" }, groupByField: { true: "cell_ColumnCellRecipe_groupByField_true__1eexc2a18", false: "cell_ColumnCellRecipe_groupByField_false__1eexc2a19" }, firstInCategory: { true: "cell_ColumnCellRecipe_firstInCategory_true__1eexc2a1a", false: "cell_ColumnCellRecipe_firstInCategory_false__1eexc2a1b" }, lastInCategory: { true: "cell_ColumnCellRecipe_lastInCategory_true__1eexc2a1c", false: "cell_ColumnCellRecipe_lastInCategory_false__1eexc2a1d" }, pinned: { start: "cell_ColumnCellRecipe_pinned_start__1eexc2a1e", end: "cell_ColumnCellRecipe_pinned_end__1eexc2a1f", false: "cell_ColumnCellRecipe_pinned_false__1eexc2a1g" }, filtered: { true: "cell_ColumnCellRecipe_filtered_true__1eexc2a1h", false: "cell_ColumnCellRecipe_filtered_false__1eexc2a1i" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "cell_ColumnCellRecipe_compound_0__1eexc2a1j"], [{ pinned: "start", firstInCategory: true }, "cell_ColumnCellRecipe_compound_1__1eexc2a1k"], [{ pinned: "end", firstInCategory: true }, "cell_ColumnCellRecipe_compound_2__1eexc2a1l"], [{ pinned: "end", lastInCategory: true }, "cell_ColumnCellRecipe_compound_3__1eexc2a1m"], [{ align: "center", groupCell: false }, "cell_ColumnCellRecipe_compound_4__1eexc2a1n"]] });
|
|
7750
|
+
var ColumnCellSelectionIndicatorRecipe = createRuntimeFn({ defaultClassName: "cell_ColumnCellSelectionIndicatorRecipe__1eexc2a8", variantClassNames: { right: { true: "cell_ColumnCellSelectionIndicatorRecipe_right_true__1eexc2a9", false: "cell_ColumnCellSelectionIndicatorRecipe_right_false__1eexc2aa" }, left: { true: "cell_ColumnCellSelectionIndicatorRecipe_left_true__1eexc2ab", false: "cell_ColumnCellSelectionIndicatorRecipe_left_false__1eexc2ac" }, top: { true: "cell_ColumnCellSelectionIndicatorRecipe_top_true__1eexc2ad", false: "cell_ColumnCellSelectionIndicatorRecipe_top_false__1eexc2ae" }, bottom: { true: "cell_ColumnCellSelectionIndicatorRecipe_bottom_true__1eexc2af", false: "cell_ColumnCellSelectionIndicatorRecipe_bottom_false__1eexc2ag" } }, defaultVariants: {}, compoundVariants: [] });
|
|
7748
7751
|
var SelectionCheckboxCls = "cell_SelectionCheckboxCls__1eexc2a7";
|
|
7749
7752
|
|
|
7750
7753
|
// src/components/InfiniteTable/components/CheckBox.tsx
|
|
@@ -7931,6 +7934,7 @@ function getColumnRenderingParams(options) {
|
|
|
7931
7934
|
};
|
|
7932
7935
|
}
|
|
7933
7936
|
function getColumnRenderParam(options) {
|
|
7937
|
+
var _a;
|
|
7934
7938
|
const {
|
|
7935
7939
|
column,
|
|
7936
7940
|
context,
|
|
@@ -7946,7 +7950,7 @@ function getColumnRenderParam(options) {
|
|
|
7946
7950
|
const { editingCell } = getState();
|
|
7947
7951
|
const { indexInAll: rowIndex } = rowInfo;
|
|
7948
7952
|
const dataSourceState = getDataSourceState();
|
|
7949
|
-
const { selectionMode } = dataSourceState;
|
|
7953
|
+
const { selectionMode, cellSelection } = dataSourceState;
|
|
7950
7954
|
const groupByColumn = getGroupByColumnReference({
|
|
7951
7955
|
rowInfo,
|
|
7952
7956
|
column,
|
|
@@ -7954,21 +7958,35 @@ function getColumnRenderParam(options) {
|
|
|
7954
7958
|
groupRenderStrategy: context.getState().groupRenderStrategy
|
|
7955
7959
|
});
|
|
7956
7960
|
const toggleGroupRow = imperativeApi.toggleGroupRow;
|
|
7961
|
+
const cellSelected = (_a = cellSelection == null ? void 0 : cellSelection.isCellSelected(rowInfo.id, column.id)) != null ? _a : false;
|
|
7957
7962
|
const renderParam = __spreadProps(__spreadValues({
|
|
7958
7963
|
column,
|
|
7959
7964
|
columnsMap,
|
|
7960
7965
|
fieldsToColumn,
|
|
7961
7966
|
align: align2,
|
|
7962
|
-
verticalAlign
|
|
7967
|
+
verticalAlign,
|
|
7968
|
+
cellSelected
|
|
7963
7969
|
}, formattedValueContext), {
|
|
7964
7970
|
editError: editingCell && editingCell.primaryKey === rowInfo.id && editingCell.columnId === column.id && !editingCell.active && editingCell.accepted instanceof Error ? editingCell.accepted : void 0,
|
|
7965
7971
|
groupByColumn,
|
|
7966
7972
|
selectionMode,
|
|
7967
7973
|
api: imperativeApi,
|
|
7968
|
-
selectRow: imperativeApi.
|
|
7969
|
-
deselectRow: imperativeApi.
|
|
7970
|
-
toggleRowSelection: imperativeApi.
|
|
7971
|
-
toggleGroupRowSelection: imperativeApi.
|
|
7974
|
+
selectRow: imperativeApi.rowSelectionApi.selectRow,
|
|
7975
|
+
deselectRow: imperativeApi.rowSelectionApi.deselectRow,
|
|
7976
|
+
toggleRowSelection: imperativeApi.rowSelectionApi.toggleRowSelection,
|
|
7977
|
+
toggleGroupRowSelection: imperativeApi.rowSelectionApi.toggleGroupRowSelection,
|
|
7978
|
+
selectCell: () => {
|
|
7979
|
+
imperativeApi.cellSelectionApi.selectCell({
|
|
7980
|
+
rowId: rowInfo.id,
|
|
7981
|
+
colId: column.id
|
|
7982
|
+
});
|
|
7983
|
+
},
|
|
7984
|
+
deselectCell: () => {
|
|
7985
|
+
imperativeApi.cellSelectionApi.deselectCell({
|
|
7986
|
+
rowId: rowInfo.id,
|
|
7987
|
+
colId: column.id
|
|
7988
|
+
});
|
|
7989
|
+
},
|
|
7972
7990
|
renderBag: {
|
|
7973
7991
|
all: null,
|
|
7974
7992
|
value: typeof value === "boolean" ? `${value}` : value,
|
|
@@ -7976,13 +7994,13 @@ function getColumnRenderParam(options) {
|
|
|
7976
7994
|
groupIcon: null
|
|
7977
7995
|
},
|
|
7978
7996
|
selectCurrentRow: () => {
|
|
7979
|
-
return imperativeApi.
|
|
7997
|
+
return imperativeApi.rowSelectionApi.selectRow(
|
|
7980
7998
|
rowInfo.id,
|
|
7981
7999
|
rowInfo.dataSourceHasGrouping ? rowInfo.groupKeys : void 0
|
|
7982
8000
|
);
|
|
7983
8001
|
},
|
|
7984
8002
|
deselectCurrentRow: () => {
|
|
7985
|
-
return imperativeApi.
|
|
8003
|
+
return imperativeApi.rowSelectionApi.deselectRow(
|
|
7986
8004
|
rowInfo.id,
|
|
7987
8005
|
rowInfo.dataSourceHasGrouping ? rowInfo.groupKeys : void 0
|
|
7988
8006
|
);
|
|
@@ -7999,13 +8017,13 @@ function getColumnRenderParam(options) {
|
|
|
7999
8017
|
if (rowInfo.isGroupRow) {
|
|
8000
8018
|
return;
|
|
8001
8019
|
}
|
|
8002
|
-
return imperativeApi.
|
|
8020
|
+
return imperativeApi.rowSelectionApi.toggleRowSelection(rowInfo.id);
|
|
8003
8021
|
},
|
|
8004
8022
|
toggleCurrentGroupRowSelection: () => {
|
|
8005
8023
|
if (!rowInfo.isGroupRow) {
|
|
8006
8024
|
return;
|
|
8007
8025
|
}
|
|
8008
|
-
return imperativeApi.
|
|
8026
|
+
return imperativeApi.rowSelectionApi.toggleGroupRowSelection(
|
|
8009
8027
|
rowInfo.isGroupRow ? rowInfo.groupKeys : []
|
|
8010
8028
|
);
|
|
8011
8029
|
},
|
|
@@ -8246,7 +8264,9 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8246
8264
|
rowInfo,
|
|
8247
8265
|
rowStyle,
|
|
8248
8266
|
rowClassName,
|
|
8249
|
-
|
|
8267
|
+
getData,
|
|
8268
|
+
cellStyle,
|
|
8269
|
+
cellClassName,
|
|
8250
8270
|
width,
|
|
8251
8271
|
column,
|
|
8252
8272
|
onMouseLeave,
|
|
@@ -8267,6 +8287,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8267
8287
|
const {
|
|
8268
8288
|
getState,
|
|
8269
8289
|
actions: componentActions,
|
|
8290
|
+
computed,
|
|
8270
8291
|
api: imperativeApi
|
|
8271
8292
|
} = useInfiniteTable();
|
|
8272
8293
|
const {
|
|
@@ -8332,7 +8353,8 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8332
8353
|
},
|
|
8333
8354
|
[rowIndex, column.computedVisibleIndex, keyboardNavigation]
|
|
8334
8355
|
);
|
|
8335
|
-
const { selectionMode } = dataSourceState;
|
|
8356
|
+
const { selectionMode, cellSelection } = dataSourceState;
|
|
8357
|
+
const cellSelected = renderParam.cellSelected;
|
|
8336
8358
|
renderParam.domRef = domRef;
|
|
8337
8359
|
renderParam.selectCurrentRow = useCallback12(renderParam.selectCurrentRow, [
|
|
8338
8360
|
rowInfo
|
|
@@ -8462,6 +8484,12 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8462
8484
|
stylingParam
|
|
8463
8485
|
);
|
|
8464
8486
|
}
|
|
8487
|
+
if (cellClassName) {
|
|
8488
|
+
colClassName = join(
|
|
8489
|
+
colClassName,
|
|
8490
|
+
applyColumnClassName(cellClassName, stylingParam)
|
|
8491
|
+
);
|
|
8492
|
+
}
|
|
8465
8493
|
if (column.className) {
|
|
8466
8494
|
colClassName = join(
|
|
8467
8495
|
colClassName,
|
|
@@ -8475,6 +8503,9 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8475
8503
|
if (rowStyle) {
|
|
8476
8504
|
style2 = typeof rowStyle === "function" ? __spreadValues(__spreadValues({}, style2), rowStyle(rowPropsAndStyleArgs)) : __spreadValues(__spreadValues({}, style2), rowStyle);
|
|
8477
8505
|
}
|
|
8506
|
+
if (cellStyle) {
|
|
8507
|
+
style2 = applyColumnStyle(style2, cellStyle, stylingParam);
|
|
8508
|
+
}
|
|
8478
8509
|
if (groupByColumnReference == null ? void 0 : groupByColumnReference.style) {
|
|
8479
8510
|
style2 = applyColumnStyle(style2, groupByColumnReference.style, stylingParam);
|
|
8480
8511
|
}
|
|
@@ -8490,6 +8521,36 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8490
8521
|
);
|
|
8491
8522
|
const odd = (rowInfo.indexInAll != null ? rowInfo.indexInAll : rowIndex) % 2 === 1;
|
|
8492
8523
|
const zebra = showZebraRows ? odd ? "odd" : "even" : false;
|
|
8524
|
+
let topSelectionBorder = false;
|
|
8525
|
+
let leftSelectionBorder = false;
|
|
8526
|
+
let rightSelectionBorder = false;
|
|
8527
|
+
let bottomSelectionBorder = false;
|
|
8528
|
+
if (cellSelection && cellSelected) {
|
|
8529
|
+
const arr = getData();
|
|
8530
|
+
const topRowInfo = arr[rowInfo.indexInAll - 1];
|
|
8531
|
+
const bottomRowInfo = arr[rowInfo.indexInAll + 1];
|
|
8532
|
+
const nextColumn = computed.computedVisibleColumns[column.computedVisibleIndex + 1];
|
|
8533
|
+
const prevColumn = computed.computedVisibleColumns[column.computedVisibleIndex - 1];
|
|
8534
|
+
topSelectionBorder = topRowInfo ? !cellSelection.isCellSelected(topRowInfo.id, column.id) : true;
|
|
8535
|
+
if (column.computedPinned === "end" && column.computedFirstInCategory) {
|
|
8536
|
+
leftSelectionBorder = true;
|
|
8537
|
+
} else {
|
|
8538
|
+
leftSelectionBorder = prevColumn ? !cellSelection.isCellSelected(rowInfo.id, prevColumn.id) : true;
|
|
8539
|
+
}
|
|
8540
|
+
if (column.computedPinned === "start" && column.computedLastInCategory) {
|
|
8541
|
+
rightSelectionBorder = true;
|
|
8542
|
+
} else {
|
|
8543
|
+
rightSelectionBorder = nextColumn ? !cellSelection.isCellSelected(rowInfo.id, nextColumn.id) : true;
|
|
8544
|
+
}
|
|
8545
|
+
bottomSelectionBorder = bottomRowInfo ? !cellSelection.isCellSelected(bottomRowInfo.id, column.id) : true;
|
|
8546
|
+
}
|
|
8547
|
+
const cellSelectionBorders = cellSelection && cellSelected ? {
|
|
8548
|
+
top: topSelectionBorder,
|
|
8549
|
+
left: leftSelectionBorder,
|
|
8550
|
+
right: rightSelectionBorder,
|
|
8551
|
+
bottom: bottomSelectionBorder
|
|
8552
|
+
} : null;
|
|
8553
|
+
const afterChildren = editor;
|
|
8493
8554
|
const cellProps = {
|
|
8494
8555
|
domRef,
|
|
8495
8556
|
cellType: "body",
|
|
@@ -8500,10 +8561,11 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8500
8561
|
onMouseLeave,
|
|
8501
8562
|
onMouseEnter,
|
|
8502
8563
|
onClick,
|
|
8503
|
-
afterChildren
|
|
8564
|
+
afterChildren,
|
|
8504
8565
|
onMouseDown,
|
|
8505
8566
|
cssEllipsis: (_c = column.cssEllipsis) != null ? _c : true,
|
|
8506
8567
|
className: join(
|
|
8568
|
+
cellSelectionBorders ? ColumnCellSelectionIndicatorRecipe(cellSelectionBorders) : "",
|
|
8507
8569
|
useCellClassName(
|
|
8508
8570
|
column,
|
|
8509
8571
|
[InfiniteTableColumnCellClassName, InfiniteTableCellClassName],
|
|
@@ -8514,6 +8576,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8514
8576
|
align: align2,
|
|
8515
8577
|
verticalAlign,
|
|
8516
8578
|
rowActive,
|
|
8579
|
+
cellSelected,
|
|
8517
8580
|
rowSelected,
|
|
8518
8581
|
groupRow: rowInfo.isGroupRow,
|
|
8519
8582
|
groupCell: rowInfo.isGroupRow ? !!column.groupByForColumn : false,
|
|
@@ -8869,7 +8932,7 @@ function getColumnGroupResizer(colIndexes, config) {
|
|
|
8869
8932
|
|
|
8870
8933
|
// src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/ResizeHandle.css.ts
|
|
8871
8934
|
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";
|
|
8872
|
-
var ResizeHandleDraggerClsRecipe = createRuntimeFn({ defaultClassName: "ResizeHandle_ResizeHandleDraggerClsRecipe__zneyzhb utilities_position_absolute__16lm1iw2 utilities_top_0__16lm1iw1b utilities_bottom_0__16lm1iw1g", variantClassNames: { constrained: { false: "ResizeHandle_ResizeHandleDraggerClsRecipe_constrained_false__zneyzhc", true: "ResizeHandle_ResizeHandleDraggerClsRecipe_constrained_true__zneyzhd" } }, defaultVariants: {}, compoundVariants: [] });
|
|
8935
|
+
var ResizeHandleDraggerClsRecipe = createRuntimeFn({ defaultClassName: "ResizeHandle_ResizeHandleDraggerClsRecipe__zneyzhb utilities_position_absolute__16lm1iw2 utilities_top_0__16lm1iw1b utilities_bottom_0__16lm1iw1g", variantClassNames: { constrained: { false: "ResizeHandle_ResizeHandleDraggerClsRecipe_constrained_false__zneyzhc", true: "ResizeHandle_ResizeHandleDraggerClsRecipe_constrained_true__zneyzhd" }, computedPinned: { start: "ResizeHandle_ResizeHandleDraggerClsRecipe_computedPinned_start__zneyzhe", end: "ResizeHandle_ResizeHandleDraggerClsRecipe_computedPinned_end__zneyzhf", false: "ResizeHandle_ResizeHandleDraggerClsRecipe_computedPinned_false__zneyzhg" }, computedFirstInCategory: { true: "ResizeHandle_ResizeHandleDraggerClsRecipe_computedFirstInCategory_true__zneyzhh", false: "ResizeHandle_ResizeHandleDraggerClsRecipe_computedFirstInCategory_false__zneyzhi" }, computedLastInCategory: { true: "ResizeHandle_ResizeHandleDraggerClsRecipe_computedLastInCategory_true__zneyzhj", false: "ResizeHandle_ResizeHandleDraggerClsRecipe_computedLastInCategory_false__zneyzhk" } }, defaultVariants: {}, compoundVariants: [[{ computedPinned: "start", computedLastInCategory: true }, "ResizeHandle_ResizeHandleDraggerClsRecipe_compound_0__zneyzhl"], [{ computedPinned: "end", computedFirstInCategory: true }, "ResizeHandle_ResizeHandleDraggerClsRecipe_compound_1__zneyzhm"]] });
|
|
8873
8936
|
var ResizeHandleRecipeCls = createRuntimeFn({ defaultClassName: "", variantClassNames: { computedPinned: { start: "ResizeHandle_ResizeHandleRecipeCls_computedPinned_start__zneyzh1", end: "ResizeHandle_ResizeHandleRecipeCls_computedPinned_end__zneyzh2 utilities_left_0__16lm1iw1d utilities_right_auto__16lm1iw1k", false: "ResizeHandle_ResizeHandleRecipeCls_computedPinned_false__zneyzh3" }, computedFirstInCategory: { true: "ResizeHandle_ResizeHandleRecipeCls_computedFirstInCategory_true__zneyzh4", false: "ResizeHandle_ResizeHandleRecipeCls_computedFirstInCategory_false__zneyzh5" }, computedLastInCategory: { true: "ResizeHandle_ResizeHandleRecipeCls_computedLastInCategory_true__zneyzh6", false: "ResizeHandle_ResizeHandleRecipeCls_computedLastInCategory_false__zneyzh7" } }, defaultVariants: {}, compoundVariants: [[{ computedPinned: "end", computedLastInCategory: false, computedFirstInCategory: true }, "ResizeHandle_ResizeHandleRecipeCls_compound_0__zneyzh8"], [{ computedPinned: false, computedFirstInCategory: false, computedLastInCategory: true }, "ResizeHandle_ResizeHandleRecipeCls_compound_1__zneyzh9"], [{ computedPinned: "start", computedFirstInCategory: false, computedLastInCategory: true }, "ResizeHandle_ResizeHandleRecipeCls_compound_2__zneyzha"]] });
|
|
8874
8937
|
|
|
8875
8938
|
// src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/index.tsx
|
|
@@ -8949,7 +9012,10 @@ function ResizeHandleFn(props) {
|
|
|
8949
9012
|
{
|
|
8950
9013
|
style: style2,
|
|
8951
9014
|
className: ResizeHandleDraggerClsRecipe({
|
|
8952
|
-
constrained
|
|
9015
|
+
constrained,
|
|
9016
|
+
computedPinned,
|
|
9017
|
+
computedFirstInCategory,
|
|
9018
|
+
computedLastInCategory
|
|
8953
9019
|
})
|
|
8954
9020
|
}
|
|
8955
9021
|
)
|
|
@@ -9043,9 +9109,9 @@ var defaultRenderSelectionCheckBox2 = (params) => {
|
|
|
9043
9109
|
},
|
|
9044
9110
|
onChange: (selected2) => {
|
|
9045
9111
|
if (selected2) {
|
|
9046
|
-
api.
|
|
9112
|
+
api.rowSelectionApi.selectAll();
|
|
9047
9113
|
} else {
|
|
9048
|
-
api.
|
|
9114
|
+
api.rowSelectionApi.deselectAll();
|
|
9049
9115
|
}
|
|
9050
9116
|
},
|
|
9051
9117
|
checked: selected
|
|
@@ -9382,6 +9448,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
9382
9448
|
align: align2,
|
|
9383
9449
|
verticalAlign,
|
|
9384
9450
|
rowSelected: false,
|
|
9451
|
+
cellSelected: false,
|
|
9385
9452
|
zebra: false,
|
|
9386
9453
|
rowActive: false,
|
|
9387
9454
|
groupCell: false,
|
|
@@ -10177,6 +10244,9 @@ var sharedValueGetterParamsFlyweightObject = Object.seal({
|
|
|
10177
10244
|
// src/utils/groupAndPivot/index.ts
|
|
10178
10245
|
var LAZY_ROOT_KEY_FOR_GROUPS = "____root____";
|
|
10179
10246
|
var NOT_LOADED_YET_KEY_PREFIX = "____not_loaded_yet____";
|
|
10247
|
+
function returnFalse() {
|
|
10248
|
+
return false;
|
|
10249
|
+
}
|
|
10180
10250
|
function initReducers(reducers) {
|
|
10181
10251
|
if (!reducers || !Object.keys(reducers).length) {
|
|
10182
10252
|
return {};
|
|
@@ -10609,6 +10679,7 @@ function getEnhancedGroupData(options, deepMapValue) {
|
|
|
10609
10679
|
//TODO improve this
|
|
10610
10680
|
collapsed: false,
|
|
10611
10681
|
dataSourceHasGrouping: true,
|
|
10682
|
+
isCellSelected: returnFalse,
|
|
10612
10683
|
selfLoaded,
|
|
10613
10684
|
error: options.error,
|
|
10614
10685
|
parents,
|
|
@@ -10744,6 +10815,7 @@ function enhancedFlatten(param) {
|
|
|
10744
10815
|
const rowInfo = {
|
|
10745
10816
|
id: itemId,
|
|
10746
10817
|
data: item,
|
|
10818
|
+
isCellSelected: returnFalse,
|
|
10747
10819
|
dataSourceHasGrouping: true,
|
|
10748
10820
|
isGroupRow: false,
|
|
10749
10821
|
selfLoaded: !!item,
|
|
@@ -10984,6 +11056,14 @@ var DataSourceCache = class {
|
|
|
10984
11056
|
}
|
|
10985
11057
|
};
|
|
10986
11058
|
|
|
11059
|
+
// src/components/DataSource/dataSourceGetters.ts
|
|
11060
|
+
function getRowInfoAt(rowIndex, getState) {
|
|
11061
|
+
return getState().dataArray[rowIndex];
|
|
11062
|
+
}
|
|
11063
|
+
function getRowInfoArray(getState) {
|
|
11064
|
+
return getState().dataArray;
|
|
11065
|
+
}
|
|
11066
|
+
|
|
10987
11067
|
// src/components/DataSource/getDataSourceApi.ts
|
|
10988
11068
|
function getDataSourceApi(param) {
|
|
10989
11069
|
return new DataSourceApiImpl(param);
|
|
@@ -10993,15 +11073,149 @@ var DataSourceApiImpl = class {
|
|
|
10993
11073
|
this.pendingOperations = [];
|
|
10994
11074
|
this.pendingPromise = null;
|
|
10995
11075
|
this.resolvePendingPromise = null;
|
|
11076
|
+
this.toPrimaryKey = (data) => {
|
|
11077
|
+
return this.getState().toPrimaryKey(data);
|
|
11078
|
+
};
|
|
11079
|
+
this.getRowInfoArray = () => {
|
|
11080
|
+
return getRowInfoArray(this.getState);
|
|
11081
|
+
};
|
|
11082
|
+
this.getRowInfoByIndex = (index) => {
|
|
11083
|
+
var _a;
|
|
11084
|
+
return (_a = getRowInfoAt(index, this.getState)) != null ? _a : null;
|
|
11085
|
+
};
|
|
11086
|
+
this.getRowInfoByPrimaryKey = (id) => {
|
|
11087
|
+
const index = this.getIndexByPrimaryKey(id);
|
|
11088
|
+
return this.getRowInfoByIndex(index);
|
|
11089
|
+
};
|
|
11090
|
+
this.getIndexByPrimaryKey = (id) => {
|
|
11091
|
+
var _a;
|
|
11092
|
+
const map2 = this.getState().idToIndexMap;
|
|
11093
|
+
return (_a = map2.get(id)) != null ? _a : -1;
|
|
11094
|
+
};
|
|
11095
|
+
this.getPrimaryKeyByIndex = (index) => {
|
|
11096
|
+
const rowInfo = this.getRowInfoByIndex(index);
|
|
11097
|
+
return rowInfo ? rowInfo.id : void 0;
|
|
11098
|
+
};
|
|
10996
11099
|
this.getOriginalDataArray = () => {
|
|
10997
11100
|
return this.getState().originalDataArray;
|
|
10998
11101
|
};
|
|
11102
|
+
this.getDataByPrimaryKey = (id) => {
|
|
11103
|
+
var _a;
|
|
11104
|
+
const { indexer } = this.getState();
|
|
11105
|
+
return (_a = indexer.getDataForPrimaryKey(id)) != null ? _a : null;
|
|
11106
|
+
};
|
|
11107
|
+
this.updateData = (data, options) => {
|
|
11108
|
+
return this.updateDataArray([data], options);
|
|
11109
|
+
};
|
|
11110
|
+
this.updateDataArray = (data, options) => {
|
|
11111
|
+
const result = this.batchOperation({
|
|
11112
|
+
type: "update",
|
|
11113
|
+
array: data,
|
|
11114
|
+
primaryKeys: data.map((d) => {
|
|
11115
|
+
return this.toPrimaryKey(d);
|
|
11116
|
+
}),
|
|
11117
|
+
metadata: options == null ? void 0 : options.metadata
|
|
11118
|
+
});
|
|
11119
|
+
if (options == null ? void 0 : options.flush) {
|
|
11120
|
+
this.commit();
|
|
11121
|
+
}
|
|
11122
|
+
return result;
|
|
11123
|
+
};
|
|
11124
|
+
this.removeDataByPrimaryKey = (id, options) => {
|
|
11125
|
+
const result = this.batchOperation({
|
|
11126
|
+
type: "delete",
|
|
11127
|
+
primaryKeys: [id],
|
|
11128
|
+
metadata: options == null ? void 0 : options.metadata
|
|
11129
|
+
});
|
|
11130
|
+
if (options == null ? void 0 : options.flush) {
|
|
11131
|
+
this.commit();
|
|
11132
|
+
}
|
|
11133
|
+
return result;
|
|
11134
|
+
};
|
|
11135
|
+
this.removeData = (data, options) => {
|
|
11136
|
+
const result = this.batchOperation({
|
|
11137
|
+
type: "delete",
|
|
11138
|
+
primaryKeys: [this.toPrimaryKey(data)],
|
|
11139
|
+
metadata: options == null ? void 0 : options.metadata
|
|
11140
|
+
});
|
|
11141
|
+
if (options == null ? void 0 : options.flush) {
|
|
11142
|
+
this.commit();
|
|
11143
|
+
}
|
|
11144
|
+
return result;
|
|
11145
|
+
};
|
|
11146
|
+
this.removeDataArrayByPrimaryKeys = (ids, options) => {
|
|
11147
|
+
const result = this.batchOperation({
|
|
11148
|
+
type: "delete",
|
|
11149
|
+
primaryKeys: ids,
|
|
11150
|
+
metadata: options == null ? void 0 : options.metadata
|
|
11151
|
+
});
|
|
11152
|
+
if (options == null ? void 0 : options.flush) {
|
|
11153
|
+
this.commit();
|
|
11154
|
+
}
|
|
11155
|
+
return result;
|
|
11156
|
+
};
|
|
11157
|
+
this.removeDataArray = (data, options) => {
|
|
11158
|
+
const result = this.batchOperation({
|
|
11159
|
+
type: "delete",
|
|
11160
|
+
primaryKeys: data.map(this.toPrimaryKey),
|
|
11161
|
+
metadata: options == null ? void 0 : options.metadata
|
|
11162
|
+
});
|
|
11163
|
+
if (options == null ? void 0 : options.flush) {
|
|
11164
|
+
this.commit();
|
|
11165
|
+
}
|
|
11166
|
+
return result;
|
|
11167
|
+
};
|
|
11168
|
+
this.addData = (data, options) => {
|
|
11169
|
+
return this.addDataArray([data], options);
|
|
11170
|
+
};
|
|
11171
|
+
this.addDataArray = (data, options) => {
|
|
11172
|
+
return this.insertDataArray(data, __spreadProps(__spreadValues({}, options), {
|
|
11173
|
+
position: "end"
|
|
11174
|
+
}));
|
|
11175
|
+
};
|
|
11176
|
+
this.insertData = (data, options) => {
|
|
11177
|
+
return this.insertDataArray([data], options);
|
|
11178
|
+
};
|
|
11179
|
+
this.insertDataArray = (data, options) => {
|
|
11180
|
+
let position2 = "before";
|
|
11181
|
+
let primaryKey = void 0;
|
|
11182
|
+
if (options.position === "before" || options.position === "after") {
|
|
11183
|
+
position2 = options.position;
|
|
11184
|
+
primaryKey = options.primaryKey;
|
|
11185
|
+
} else {
|
|
11186
|
+
const arr = this.getOriginalDataArray();
|
|
11187
|
+
if (options.position === "start") {
|
|
11188
|
+
position2 = "before";
|
|
11189
|
+
primaryKey = this.toPrimaryKey(arr[0]);
|
|
11190
|
+
} else {
|
|
11191
|
+
position2 = "after";
|
|
11192
|
+
primaryKey = this.toPrimaryKey(arr[arr.length - 1]);
|
|
11193
|
+
}
|
|
11194
|
+
}
|
|
11195
|
+
const result = this.batchOperation({
|
|
11196
|
+
type: "insert",
|
|
11197
|
+
array: data,
|
|
11198
|
+
position: position2,
|
|
11199
|
+
metadata: options == null ? void 0 : options.metadata,
|
|
11200
|
+
primaryKey
|
|
11201
|
+
});
|
|
11202
|
+
if (options == null ? void 0 : options.flush) {
|
|
11203
|
+
this.commit();
|
|
11204
|
+
}
|
|
11205
|
+
return result;
|
|
11206
|
+
};
|
|
11207
|
+
this.setSortInfo = (sortInfo) => {
|
|
11208
|
+
const multiSort = this.getState().multiSort;
|
|
11209
|
+
if (Array.isArray(sortInfo)) {
|
|
11210
|
+
this.actions.sortInfo = sortInfo.length ? multiSort ? sortInfo : sortInfo[0] : null;
|
|
11211
|
+
return;
|
|
11212
|
+
}
|
|
11213
|
+
this.actions.sortInfo = sortInfo;
|
|
11214
|
+
return;
|
|
11215
|
+
};
|
|
10999
11216
|
this.getState = param.getState;
|
|
11000
11217
|
this.actions = param.actions;
|
|
11001
11218
|
}
|
|
11002
|
-
toPrimaryKey(data) {
|
|
11003
|
-
return this.getState().toPrimaryKey(data);
|
|
11004
|
-
}
|
|
11005
11219
|
batchOperation(operation) {
|
|
11006
11220
|
if (!this.pendingPromise) {
|
|
11007
11221
|
this.pendingPromise = new Promise((resolve) => {
|
|
@@ -11072,140 +11286,6 @@ var DataSourceApiImpl = class {
|
|
|
11072
11286
|
this.resolvePendingPromise = null;
|
|
11073
11287
|
}
|
|
11074
11288
|
}
|
|
11075
|
-
getRowInfoArray() {
|
|
11076
|
-
return this.getState().dataArray;
|
|
11077
|
-
}
|
|
11078
|
-
getRowInfoByIndex(index) {
|
|
11079
|
-
var _a;
|
|
11080
|
-
return (_a = this.getRowInfoArray()[index]) != null ? _a : null;
|
|
11081
|
-
}
|
|
11082
|
-
getRowInfoByPrimaryKey(id) {
|
|
11083
|
-
const index = this.getIndexByPrimaryKey(id);
|
|
11084
|
-
return this.getRowInfoByIndex(index);
|
|
11085
|
-
}
|
|
11086
|
-
getIndexByPrimaryKey(id) {
|
|
11087
|
-
var _a;
|
|
11088
|
-
const map2 = this.getState().idToIndexMap;
|
|
11089
|
-
return (_a = map2.get(id)) != null ? _a : -1;
|
|
11090
|
-
}
|
|
11091
|
-
getPrimaryKeyByIndex(index) {
|
|
11092
|
-
const rowInfo = this.getRowInfoByIndex(index);
|
|
11093
|
-
return rowInfo ? rowInfo.id : void 0;
|
|
11094
|
-
}
|
|
11095
|
-
getDataByPrimaryKey(id) {
|
|
11096
|
-
var _a;
|
|
11097
|
-
const { indexer } = this.getState();
|
|
11098
|
-
return (_a = indexer.getDataForPrimaryKey(id)) != null ? _a : null;
|
|
11099
|
-
}
|
|
11100
|
-
updateData(data, options) {
|
|
11101
|
-
return this.updateDataArray([data], options);
|
|
11102
|
-
}
|
|
11103
|
-
updateDataArray(data, options) {
|
|
11104
|
-
const result = this.batchOperation({
|
|
11105
|
-
type: "update",
|
|
11106
|
-
array: data,
|
|
11107
|
-
primaryKeys: data.map((d) => {
|
|
11108
|
-
return this.toPrimaryKey(d);
|
|
11109
|
-
}),
|
|
11110
|
-
metadata: options == null ? void 0 : options.metadata
|
|
11111
|
-
});
|
|
11112
|
-
if (options == null ? void 0 : options.flush) {
|
|
11113
|
-
this.commit();
|
|
11114
|
-
}
|
|
11115
|
-
return result;
|
|
11116
|
-
}
|
|
11117
|
-
removeDataByPrimaryKey(id, options) {
|
|
11118
|
-
const result = this.batchOperation({
|
|
11119
|
-
type: "delete",
|
|
11120
|
-
primaryKeys: [id],
|
|
11121
|
-
metadata: options == null ? void 0 : options.metadata
|
|
11122
|
-
});
|
|
11123
|
-
if (options == null ? void 0 : options.flush) {
|
|
11124
|
-
this.commit();
|
|
11125
|
-
}
|
|
11126
|
-
return result;
|
|
11127
|
-
}
|
|
11128
|
-
removeData(data, options) {
|
|
11129
|
-
const result = this.batchOperation({
|
|
11130
|
-
type: "delete",
|
|
11131
|
-
primaryKeys: [this.toPrimaryKey(data)],
|
|
11132
|
-
metadata: options == null ? void 0 : options.metadata
|
|
11133
|
-
});
|
|
11134
|
-
if (options == null ? void 0 : options.flush) {
|
|
11135
|
-
this.commit();
|
|
11136
|
-
}
|
|
11137
|
-
return result;
|
|
11138
|
-
}
|
|
11139
|
-
removeDataArrayByPrimaryKeys(ids, options) {
|
|
11140
|
-
const result = this.batchOperation({
|
|
11141
|
-
type: "delete",
|
|
11142
|
-
primaryKeys: ids,
|
|
11143
|
-
metadata: options == null ? void 0 : options.metadata
|
|
11144
|
-
});
|
|
11145
|
-
if (options == null ? void 0 : options.flush) {
|
|
11146
|
-
this.commit();
|
|
11147
|
-
}
|
|
11148
|
-
return result;
|
|
11149
|
-
}
|
|
11150
|
-
removeDataArray(data, options) {
|
|
11151
|
-
const result = this.batchOperation({
|
|
11152
|
-
type: "delete",
|
|
11153
|
-
primaryKeys: data.map(this.toPrimaryKey),
|
|
11154
|
-
metadata: options == null ? void 0 : options.metadata
|
|
11155
|
-
});
|
|
11156
|
-
if (options == null ? void 0 : options.flush) {
|
|
11157
|
-
this.commit();
|
|
11158
|
-
}
|
|
11159
|
-
return result;
|
|
11160
|
-
}
|
|
11161
|
-
addData(data, options) {
|
|
11162
|
-
return this.addDataArray([data], options);
|
|
11163
|
-
}
|
|
11164
|
-
addDataArray(data, options) {
|
|
11165
|
-
return this.insertDataArray(data, __spreadProps(__spreadValues({}, options), {
|
|
11166
|
-
position: "end"
|
|
11167
|
-
}));
|
|
11168
|
-
}
|
|
11169
|
-
insertData(data, options) {
|
|
11170
|
-
return this.insertDataArray([data], options);
|
|
11171
|
-
}
|
|
11172
|
-
insertDataArray(data, options) {
|
|
11173
|
-
let position2 = "before";
|
|
11174
|
-
let primaryKey = void 0;
|
|
11175
|
-
if (options.position === "before" || options.position === "after") {
|
|
11176
|
-
position2 = options.position;
|
|
11177
|
-
primaryKey = options.primaryKey;
|
|
11178
|
-
} else {
|
|
11179
|
-
const arr = this.getOriginalDataArray();
|
|
11180
|
-
if (options.position === "start") {
|
|
11181
|
-
position2 = "before";
|
|
11182
|
-
primaryKey = this.toPrimaryKey(arr[0]);
|
|
11183
|
-
} else {
|
|
11184
|
-
position2 = "after";
|
|
11185
|
-
primaryKey = this.toPrimaryKey(arr[arr.length - 1]);
|
|
11186
|
-
}
|
|
11187
|
-
}
|
|
11188
|
-
const result = this.batchOperation({
|
|
11189
|
-
type: "insert",
|
|
11190
|
-
array: data,
|
|
11191
|
-
position: position2,
|
|
11192
|
-
metadata: options == null ? void 0 : options.metadata,
|
|
11193
|
-
primaryKey
|
|
11194
|
-
});
|
|
11195
|
-
if (options == null ? void 0 : options.flush) {
|
|
11196
|
-
this.commit();
|
|
11197
|
-
}
|
|
11198
|
-
return result;
|
|
11199
|
-
}
|
|
11200
|
-
setSortInfo(sortInfo) {
|
|
11201
|
-
const multiSort = this.getState().multiSort;
|
|
11202
|
-
if (Array.isArray(sortInfo)) {
|
|
11203
|
-
this.actions.sortInfo = sortInfo.length ? multiSort ? sortInfo : sortInfo[0] : null;
|
|
11204
|
-
return;
|
|
11205
|
-
}
|
|
11206
|
-
this.actions.sortInfo = sortInfo;
|
|
11207
|
-
return;
|
|
11208
|
-
}
|
|
11209
11289
|
};
|
|
11210
11290
|
function getCacheAffectedParts(state) {
|
|
11211
11291
|
const cache = state.cache;
|
|
@@ -11529,6 +11609,18 @@ function useEffectWithChanges(fn, deps) {
|
|
|
11529
11609
|
}, useEffectDeps);
|
|
11530
11610
|
}
|
|
11531
11611
|
|
|
11612
|
+
// src/utils/composeFunctions.ts
|
|
11613
|
+
function composeFunctions(...fns) {
|
|
11614
|
+
const f = (...args) => {
|
|
11615
|
+
fns.forEach((fn) => {
|
|
11616
|
+
if (typeof fn === "function") {
|
|
11617
|
+
fn(...args);
|
|
11618
|
+
}
|
|
11619
|
+
});
|
|
11620
|
+
};
|
|
11621
|
+
return f;
|
|
11622
|
+
}
|
|
11623
|
+
|
|
11532
11624
|
// src/utils/groupAndPivot/getPivotColumnsAndColumnGroups.ts
|
|
11533
11625
|
function prepareColumn(column) {
|
|
11534
11626
|
const { pivotByAtIndex: pivotByForColumn, pivotAggregator } = column;
|
|
@@ -11778,7 +11870,7 @@ function getGroupKeysForDataItem(data, groupBy) {
|
|
|
11778
11870
|
}, []);
|
|
11779
11871
|
}
|
|
11780
11872
|
|
|
11781
|
-
// src/components/InfiniteTable/api/
|
|
11873
|
+
// src/components/InfiniteTable/api/getRowSelectionApi.ts
|
|
11782
11874
|
function cloneRowSelection(rowSelection, stateOrGetDataSourceState) {
|
|
11783
11875
|
return new RowSelectionState(
|
|
11784
11876
|
rowSelection,
|
|
@@ -11799,7 +11891,7 @@ function rowSelectionStateConfigGetter(stateOrStateGetter) {
|
|
|
11799
11891
|
};
|
|
11800
11892
|
};
|
|
11801
11893
|
}
|
|
11802
|
-
function
|
|
11894
|
+
function getRowSelectionApi(param) {
|
|
11803
11895
|
const {
|
|
11804
11896
|
// getComputed,
|
|
11805
11897
|
// getState,
|
|
@@ -11807,7 +11899,7 @@ function getSelectionApi(param) {
|
|
|
11807
11899
|
// componentActions,
|
|
11808
11900
|
dataSourceActions
|
|
11809
11901
|
} = param;
|
|
11810
|
-
const
|
|
11902
|
+
const rowSelectionApi = {
|
|
11811
11903
|
get allRowsSelected() {
|
|
11812
11904
|
return getDataSourceState().allRowsSelected;
|
|
11813
11905
|
},
|
|
@@ -12010,11 +12102,249 @@ function getSelectionApi(param) {
|
|
|
12010
12102
|
}
|
|
12011
12103
|
};
|
|
12012
12104
|
if (false) {
|
|
12013
|
-
globalThis.
|
|
12105
|
+
globalThis.rowSelectionApi = rowSelectionApi;
|
|
12014
12106
|
}
|
|
12015
|
-
return
|
|
12107
|
+
return rowSelectionApi;
|
|
12016
12108
|
}
|
|
12017
12109
|
|
|
12110
|
+
// src/components/DataSource/CellSelectionState.ts
|
|
12111
|
+
var WILDCARD = "*";
|
|
12112
|
+
var CellSelectionState = class {
|
|
12113
|
+
constructor(clone) {
|
|
12114
|
+
this.wildcard = WILDCARD;
|
|
12115
|
+
this.cache = new DeepMap();
|
|
12116
|
+
this.selectedRowsToColumns = /* @__PURE__ */ new Map();
|
|
12117
|
+
this.selectedColumnsToRows = /* @__PURE__ */ new Map();
|
|
12118
|
+
this.deselectedRowsToColumns = /* @__PURE__ */ new Map();
|
|
12119
|
+
this.deselectedColumnsToRows = /* @__PURE__ */ new Map();
|
|
12120
|
+
this.defaultSelection = false;
|
|
12121
|
+
this.deselectAll = () => {
|
|
12122
|
+
this.update({
|
|
12123
|
+
defaultSelection: false,
|
|
12124
|
+
selectedCells: []
|
|
12125
|
+
});
|
|
12126
|
+
};
|
|
12127
|
+
this.selectAll = () => {
|
|
12128
|
+
this.update({
|
|
12129
|
+
defaultSelection: true,
|
|
12130
|
+
deselectedCells: []
|
|
12131
|
+
});
|
|
12132
|
+
};
|
|
12133
|
+
const stateObject = clone && clone instanceof Object.getPrototypeOf(this).constructor ? clone.getState() : clone;
|
|
12134
|
+
if (stateObject) {
|
|
12135
|
+
this.update(stateObject);
|
|
12136
|
+
}
|
|
12137
|
+
}
|
|
12138
|
+
selectCell(rowId, colId) {
|
|
12139
|
+
this.setCellSelected(rowId, colId, true);
|
|
12140
|
+
}
|
|
12141
|
+
deselectCell(rowId, colId) {
|
|
12142
|
+
this.setCellSelected(rowId, colId, false);
|
|
12143
|
+
}
|
|
12144
|
+
setCellSelected(rowId, colId, selected) {
|
|
12145
|
+
if (rowId === this.wildcard || colId === this.wildcard) {
|
|
12146
|
+
throw "Please dont use this private method to select cells with wildcard";
|
|
12147
|
+
}
|
|
12148
|
+
const isSelected = this.isCellSelected(rowId, colId);
|
|
12149
|
+
if (isSelected === selected) {
|
|
12150
|
+
return;
|
|
12151
|
+
}
|
|
12152
|
+
const cacheKey = [rowId, colId];
|
|
12153
|
+
this.cache.delete(cacheKey);
|
|
12154
|
+
if (selected) {
|
|
12155
|
+
if (this.defaultSelection) {
|
|
12156
|
+
const cellsForThisRow = this.deselectedRowsToColumns.get(rowId);
|
|
12157
|
+
if (cellsForThisRow && cellsForThisRow.has(colId)) {
|
|
12158
|
+
this.setCellInDeselection(rowId, colId, false);
|
|
12159
|
+
}
|
|
12160
|
+
const deselectedColumnsForWildcardRow = this.deselectedRowsToColumns.get(this.wildcard);
|
|
12161
|
+
const deselectedRowsForWildcardColumn = this.deselectedColumnsToRows.get(this.wildcard);
|
|
12162
|
+
if ((deselectedColumnsForWildcardRow == null ? void 0 : deselectedColumnsForWildcardRow.has(colId)) || (deselectedRowsForWildcardColumn == null ? void 0 : deselectedRowsForWildcardColumn.has(rowId))) {
|
|
12163
|
+
this.setCellInSelection(rowId, colId, true);
|
|
12164
|
+
}
|
|
12165
|
+
} else {
|
|
12166
|
+
const cellsForThisRow = this.deselectedRowsToColumns.get(rowId);
|
|
12167
|
+
if (cellsForThisRow && cellsForThisRow.has(colId)) {
|
|
12168
|
+
this.setCellInDeselection(rowId, colId, false);
|
|
12169
|
+
}
|
|
12170
|
+
this.setCellInSelection(rowId, colId, true);
|
|
12171
|
+
}
|
|
12172
|
+
} else {
|
|
12173
|
+
if (this.defaultSelection) {
|
|
12174
|
+
const cellsForThisRow = this.selectedRowsToColumns.get(rowId);
|
|
12175
|
+
if (cellsForThisRow == null ? void 0 : cellsForThisRow.has(colId)) {
|
|
12176
|
+
this.setCellInSelection(rowId, colId, false);
|
|
12177
|
+
}
|
|
12178
|
+
this.setCellInDeselection(rowId, colId, true);
|
|
12179
|
+
} else {
|
|
12180
|
+
const cellsForThisRow = this.selectedRowsToColumns.get(rowId);
|
|
12181
|
+
if (cellsForThisRow == null ? void 0 : cellsForThisRow.has(colId)) {
|
|
12182
|
+
this.setCellInSelection(rowId, colId, false);
|
|
12183
|
+
}
|
|
12184
|
+
const selectedColumnsForWildcardRow = this.selectedRowsToColumns.get(
|
|
12185
|
+
this.wildcard
|
|
12186
|
+
);
|
|
12187
|
+
const selectedRowsForWildcardColumn = this.selectedColumnsToRows.get(
|
|
12188
|
+
this.wildcard
|
|
12189
|
+
);
|
|
12190
|
+
if ((selectedColumnsForWildcardRow == null ? void 0 : selectedColumnsForWildcardRow.has(colId)) || (selectedRowsForWildcardColumn == null ? void 0 : selectedRowsForWildcardColumn.has(rowId))) {
|
|
12191
|
+
this.setCellInDeselection(rowId, colId, true);
|
|
12192
|
+
return;
|
|
12193
|
+
}
|
|
12194
|
+
}
|
|
12195
|
+
}
|
|
12196
|
+
}
|
|
12197
|
+
setCellInDeselection(rowId, colId, selected) {
|
|
12198
|
+
if (selected) {
|
|
12199
|
+
const deselectedColsForRow = this.deselectedRowsToColumns.get(rowId) || /* @__PURE__ */ new Set();
|
|
12200
|
+
deselectedColsForRow.add(colId);
|
|
12201
|
+
this.deselectedRowsToColumns.set(rowId, deselectedColsForRow);
|
|
12202
|
+
} else {
|
|
12203
|
+
const deselectedColsForRow = this.deselectedRowsToColumns.get(rowId);
|
|
12204
|
+
if (deselectedColsForRow) {
|
|
12205
|
+
deselectedColsForRow.delete(colId);
|
|
12206
|
+
if (deselectedColsForRow.size === 0) {
|
|
12207
|
+
this.deselectedRowsToColumns.delete(rowId);
|
|
12208
|
+
}
|
|
12209
|
+
}
|
|
12210
|
+
}
|
|
12211
|
+
if (selected) {
|
|
12212
|
+
const deselectedRowsForColumn = this.deselectedColumnsToRows.get(colId) || /* @__PURE__ */ new Set();
|
|
12213
|
+
deselectedRowsForColumn.add(rowId);
|
|
12214
|
+
this.deselectedColumnsToRows.set(colId, deselectedRowsForColumn);
|
|
12215
|
+
} else {
|
|
12216
|
+
const deselectedRowsForColumn = this.deselectedColumnsToRows.get(colId);
|
|
12217
|
+
if (deselectedRowsForColumn) {
|
|
12218
|
+
deselectedRowsForColumn.delete(rowId);
|
|
12219
|
+
if (deselectedRowsForColumn.size === 0) {
|
|
12220
|
+
this.deselectedColumnsToRows.delete(colId);
|
|
12221
|
+
}
|
|
12222
|
+
}
|
|
12223
|
+
}
|
|
12224
|
+
}
|
|
12225
|
+
setCellInSelection(rowId, colId, selected) {
|
|
12226
|
+
if (selected) {
|
|
12227
|
+
const selectedColsForRow = this.selectedRowsToColumns.get(rowId) || /* @__PURE__ */ new Set();
|
|
12228
|
+
selectedColsForRow.add(colId);
|
|
12229
|
+
this.selectedRowsToColumns.set(rowId, selectedColsForRow);
|
|
12230
|
+
} else {
|
|
12231
|
+
const selectedColsForRow = this.selectedRowsToColumns.get(rowId);
|
|
12232
|
+
if (selectedColsForRow) {
|
|
12233
|
+
selectedColsForRow.delete(colId);
|
|
12234
|
+
if (selectedColsForRow.size === 0) {
|
|
12235
|
+
this.selectedRowsToColumns.delete(rowId);
|
|
12236
|
+
}
|
|
12237
|
+
}
|
|
12238
|
+
}
|
|
12239
|
+
if (selected) {
|
|
12240
|
+
const selectedRowsForColumn = this.selectedColumnsToRows.get(colId) || /* @__PURE__ */ new Set();
|
|
12241
|
+
selectedRowsForColumn.add(rowId);
|
|
12242
|
+
this.selectedColumnsToRows.set(colId, selectedRowsForColumn);
|
|
12243
|
+
} else {
|
|
12244
|
+
const selectedRowsForColumn = this.selectedColumnsToRows.get(colId);
|
|
12245
|
+
if (selectedRowsForColumn) {
|
|
12246
|
+
selectedRowsForColumn.delete(rowId);
|
|
12247
|
+
if (selectedRowsForColumn.size === 0) {
|
|
12248
|
+
this.selectedColumnsToRows.delete(colId);
|
|
12249
|
+
}
|
|
12250
|
+
}
|
|
12251
|
+
}
|
|
12252
|
+
}
|
|
12253
|
+
update(stateObject) {
|
|
12254
|
+
const selectedCells = stateObject.selectedCells || null;
|
|
12255
|
+
const deselectedCells = stateObject.deselectedCells || null;
|
|
12256
|
+
this.selectedRowsToColumns.clear();
|
|
12257
|
+
this.selectedColumnsToRows.clear();
|
|
12258
|
+
this.deselectedRowsToColumns.clear();
|
|
12259
|
+
this.deselectedColumnsToRows.clear();
|
|
12260
|
+
this.cache.clear();
|
|
12261
|
+
if (selectedCells) {
|
|
12262
|
+
selectedCells.forEach(([rowId, colId]) => {
|
|
12263
|
+
this.setCellInSelection(rowId, colId, true);
|
|
12264
|
+
});
|
|
12265
|
+
}
|
|
12266
|
+
if (deselectedCells) {
|
|
12267
|
+
deselectedCells.forEach(([rowId, colId]) => {
|
|
12268
|
+
this.setCellInDeselection(rowId, colId, true);
|
|
12269
|
+
});
|
|
12270
|
+
}
|
|
12271
|
+
this.defaultSelection = stateObject.defaultSelection;
|
|
12272
|
+
}
|
|
12273
|
+
isCellSelected(rowId, colId) {
|
|
12274
|
+
var _a, _b;
|
|
12275
|
+
const cacheKey = [rowId, colId];
|
|
12276
|
+
const { cache } = this;
|
|
12277
|
+
const selected = cache.get(cacheKey);
|
|
12278
|
+
if (selected != null) {
|
|
12279
|
+
return selected;
|
|
12280
|
+
}
|
|
12281
|
+
const returnFalse3 = () => {
|
|
12282
|
+
cache.set(cacheKey, false);
|
|
12283
|
+
return false;
|
|
12284
|
+
};
|
|
12285
|
+
const returnTrue = () => {
|
|
12286
|
+
cache.set(cacheKey, true);
|
|
12287
|
+
return true;
|
|
12288
|
+
};
|
|
12289
|
+
const deselectedRowsForWildcardColumn = this.deselectedColumnsToRows.get(
|
|
12290
|
+
this.wildcard
|
|
12291
|
+
);
|
|
12292
|
+
const deselectedColumnsForWildcardRow = this.deselectedRowsToColumns.get(
|
|
12293
|
+
this.wildcard
|
|
12294
|
+
);
|
|
12295
|
+
const selectedRowsForWildcardColumn = this.selectedColumnsToRows.get(
|
|
12296
|
+
this.wildcard
|
|
12297
|
+
);
|
|
12298
|
+
const selectedColumnsForWildcardRow = this.selectedRowsToColumns.get(
|
|
12299
|
+
this.wildcard
|
|
12300
|
+
);
|
|
12301
|
+
let defaultSelection = this.defaultSelection;
|
|
12302
|
+
if (defaultSelection) {
|
|
12303
|
+
const cols2 = this.deselectedRowsToColumns.get(rowId);
|
|
12304
|
+
if (cols2 && cols2.has(colId)) {
|
|
12305
|
+
return returnFalse3();
|
|
12306
|
+
}
|
|
12307
|
+
if ((deselectedRowsForWildcardColumn == null ? void 0 : deselectedRowsForWildcardColumn.has(rowId)) || (deselectedColumnsForWildcardRow == null ? void 0 : deselectedColumnsForWildcardRow.has(colId))) {
|
|
12308
|
+
if ((_a = this.selectedRowsToColumns.get(rowId)) == null ? void 0 : _a.has(colId)) {
|
|
12309
|
+
return returnTrue();
|
|
12310
|
+
}
|
|
12311
|
+
return returnFalse3();
|
|
12312
|
+
}
|
|
12313
|
+
return returnTrue();
|
|
12314
|
+
}
|
|
12315
|
+
const cols = this.selectedRowsToColumns.get(rowId);
|
|
12316
|
+
if (cols && cols.has(colId)) {
|
|
12317
|
+
return returnTrue();
|
|
12318
|
+
}
|
|
12319
|
+
if ((selectedRowsForWildcardColumn == null ? void 0 : selectedRowsForWildcardColumn.has(rowId)) || (selectedColumnsForWildcardRow == null ? void 0 : selectedColumnsForWildcardRow.has(colId))) {
|
|
12320
|
+
if ((_b = this.deselectedRowsToColumns.get(rowId)) == null ? void 0 : _b.has(colId)) {
|
|
12321
|
+
return returnFalse3();
|
|
12322
|
+
}
|
|
12323
|
+
return returnTrue();
|
|
12324
|
+
}
|
|
12325
|
+
return returnFalse3();
|
|
12326
|
+
}
|
|
12327
|
+
getState() {
|
|
12328
|
+
const deselectedCells = [];
|
|
12329
|
+
const selectedCells = [];
|
|
12330
|
+
this.deselectedRowsToColumns.forEach((cols, rowId) => {
|
|
12331
|
+
cols.forEach((colId) => {
|
|
12332
|
+
deselectedCells.push([rowId, colId]);
|
|
12333
|
+
});
|
|
12334
|
+
});
|
|
12335
|
+
this.selectedRowsToColumns.forEach((cols, rowId) => {
|
|
12336
|
+
cols.forEach((colId) => {
|
|
12337
|
+
selectedCells.push([rowId, colId]);
|
|
12338
|
+
});
|
|
12339
|
+
});
|
|
12340
|
+
return {
|
|
12341
|
+
defaultSelection: this.defaultSelection,
|
|
12342
|
+
deselectedCells,
|
|
12343
|
+
selectedCells
|
|
12344
|
+
};
|
|
12345
|
+
}
|
|
12346
|
+
};
|
|
12347
|
+
|
|
12018
12348
|
// src/components/DataSource/RowSelectionState.ts
|
|
12019
12349
|
var RowSelectionState = class {
|
|
12020
12350
|
constructor(state, getConfig, _forTestingOnly) {
|
|
@@ -12576,7 +12906,10 @@ var haveDepsChanged = (state1, state2, deps) => {
|
|
|
12576
12906
|
}
|
|
12577
12907
|
return false;
|
|
12578
12908
|
};
|
|
12579
|
-
function
|
|
12909
|
+
function returnFalse2() {
|
|
12910
|
+
return false;
|
|
12911
|
+
}
|
|
12912
|
+
function toRowInfo(data, id, index, isRowSelected, cellSelectionState) {
|
|
12580
12913
|
const rowInfo = {
|
|
12581
12914
|
dataSourceHasGrouping: false,
|
|
12582
12915
|
data,
|
|
@@ -12584,11 +12917,17 @@ function toRowInfo(data, id, index, isRowSelected) {
|
|
|
12584
12917
|
indexInAll: index,
|
|
12585
12918
|
isGroupRow: false,
|
|
12586
12919
|
selfLoaded: true,
|
|
12587
|
-
rowSelected: false
|
|
12920
|
+
rowSelected: false,
|
|
12921
|
+
isCellSelected: returnFalse2
|
|
12588
12922
|
};
|
|
12589
12923
|
if (isRowSelected) {
|
|
12590
12924
|
rowInfo.rowSelected = isRowSelected(rowInfo);
|
|
12591
12925
|
}
|
|
12926
|
+
if (cellSelectionState) {
|
|
12927
|
+
rowInfo.isCellSelected = (colId) => {
|
|
12928
|
+
return cellSelectionState.isCellSelected(rowInfo.id, colId);
|
|
12929
|
+
};
|
|
12930
|
+
}
|
|
12592
12931
|
return rowInfo;
|
|
12593
12932
|
}
|
|
12594
12933
|
function filterDataSource(params) {
|
|
@@ -12769,6 +13108,7 @@ function concludeReducer(params) {
|
|
|
12769
13108
|
state.postSortDataArray = dataArray;
|
|
12770
13109
|
let rowInfoDataArray = state.dataArray;
|
|
12771
13110
|
const rowSelectionState = state.rowSelection instanceof RowSelectionState ? state.rowSelection : void 0;
|
|
13111
|
+
const cellSelectionState = state.cellSelection instanceof CellSelectionState ? state.cellSelection : void 0;
|
|
12772
13112
|
rowSelectionState == null ? void 0 : rowSelectionState.xcache();
|
|
12773
13113
|
let isRowSelected = state.selectionMode === "single-row" ? (rowInfo) => {
|
|
12774
13114
|
return rowInfo.id === state.rowSelection;
|
|
@@ -12827,6 +13167,19 @@ function concludeReducer(params) {
|
|
|
12827
13167
|
reducerKeys: rowInfoReducerKeys,
|
|
12828
13168
|
rowInfo: {}
|
|
12829
13169
|
};
|
|
13170
|
+
const withRowInfoForReducers = rowInfoReducerResults ? (rowInfo) => {
|
|
13171
|
+
rowInfoReducersShape.rowInfo = rowInfo;
|
|
13172
|
+
computeRowInfoReducersFor(rowInfoReducersShape);
|
|
13173
|
+
} : void 0;
|
|
13174
|
+
const withRowInfoForCellSelection = cellSelectionState ? (rowInfo) => {
|
|
13175
|
+
rowInfo.isCellSelected = (colId) => {
|
|
13176
|
+
return cellSelectionState.isCellSelected(rowInfo.id, colId);
|
|
13177
|
+
};
|
|
13178
|
+
} : void 0;
|
|
13179
|
+
const withRowInfo = withRowInfoForReducers || withRowInfoForCellSelection ? composeFunctions(
|
|
13180
|
+
withRowInfoForReducers,
|
|
13181
|
+
withRowInfoForCellSelection
|
|
13182
|
+
) : void 0;
|
|
12830
13183
|
const flattenResult = enhancedFlatten({
|
|
12831
13184
|
groupResult,
|
|
12832
13185
|
lazyLoad: !!state.lazyLoad,
|
|
@@ -12834,10 +13187,7 @@ function concludeReducer(params) {
|
|
|
12834
13187
|
toPrimaryKey,
|
|
12835
13188
|
isRowSelected,
|
|
12836
13189
|
rowSelectionState,
|
|
12837
|
-
withRowInfo
|
|
12838
|
-
rowInfoReducersShape.rowInfo = rowInfo;
|
|
12839
|
-
computeRowInfoReducersFor(rowInfoReducersShape);
|
|
12840
|
-
} : void 0,
|
|
13190
|
+
withRowInfo,
|
|
12841
13191
|
groupRowsState: state.groupRowsState,
|
|
12842
13192
|
generateGroupRows: state.generateGroupRows
|
|
12843
13193
|
});
|
|
@@ -12887,7 +13237,8 @@ function concludeReducer(params) {
|
|
|
12887
13237
|
data,
|
|
12888
13238
|
data ? toPrimaryKey(data) : index,
|
|
12889
13239
|
index,
|
|
12890
|
-
isRowSelected
|
|
13240
|
+
isRowSelected,
|
|
13241
|
+
cellSelectionState
|
|
12891
13242
|
);
|
|
12892
13243
|
if (rowInfoReducerResults) {
|
|
12893
13244
|
rowInfoReducersShape.rowInfo = rowInfo;
|
|
@@ -13761,7 +14112,9 @@ function deriveStateFromProps(params) {
|
|
|
13761
14112
|
}
|
|
13762
14113
|
}
|
|
13763
14114
|
let rowSelectionState = null;
|
|
14115
|
+
let cellSelectionState = null;
|
|
13764
14116
|
let currentRowSelection = props.rowSelection !== void 0 ? props.rowSelection : state.rowSelection === void 0 ? props.defaultRowSelection !== void 0 ? props.defaultRowSelection : null : state.rowSelection;
|
|
14117
|
+
let currentCellSelection = props.cellSelection !== void 0 ? props.cellSelection : state.cellSelection === void 0 ? props.defaultCellSelection !== void 0 ? props.defaultCellSelection : null : state.cellSelection || null;
|
|
13765
14118
|
if (selectionMode !== false) {
|
|
13766
14119
|
if (selectionMode === "single-row" || selectionMode === "multi-row") {
|
|
13767
14120
|
if (currentRowSelection === null) {
|
|
@@ -13780,6 +14133,15 @@ function deriveStateFromProps(params) {
|
|
|
13780
14133
|
);
|
|
13781
14134
|
}
|
|
13782
14135
|
}
|
|
14136
|
+
if (selectionMode === "single-cell" || selectionMode === "multi-cell") {
|
|
14137
|
+
if (currentCellSelection === null) {
|
|
14138
|
+
cellSelectionState = selectionMode === "single-cell" ? null : new CellSelectionState();
|
|
14139
|
+
} else {
|
|
14140
|
+
cellSelectionState = currentCellSelection instanceof CellSelectionState ? currentCellSelection : new CellSelectionState(
|
|
14141
|
+
currentCellSelection
|
|
14142
|
+
);
|
|
14143
|
+
}
|
|
14144
|
+
}
|
|
13783
14145
|
}
|
|
13784
14146
|
const primaryKeyDescriptor = state.primaryKey;
|
|
13785
14147
|
const toPrimaryKey = typeof primaryKeyDescriptor === "function" ? (data) => primaryKeyDescriptor(data) : (data) => data[primaryKeyDescriptor];
|
|
@@ -13796,8 +14158,8 @@ function deriveStateFromProps(params) {
|
|
|
13796
14158
|
const result = {
|
|
13797
14159
|
selectionMode,
|
|
13798
14160
|
groupRowsState,
|
|
13799
|
-
// for whatever reason I had to do this cast to appease TS
|
|
13800
14161
|
rowSelection: rowSelectionState,
|
|
14162
|
+
cellSelection: cellSelectionState,
|
|
13801
14163
|
toPrimaryKey,
|
|
13802
14164
|
operatorsByFilterType,
|
|
13803
14165
|
controlledSort,
|
|
@@ -13849,6 +14211,22 @@ function getMappedCallbacks() {
|
|
|
13849
14211
|
"multi-row"
|
|
13850
14212
|
]
|
|
13851
14213
|
};
|
|
14214
|
+
},
|
|
14215
|
+
cellSelection: (cellSelection, state) => {
|
|
14216
|
+
if (state.selectionMode === "single-cell") {
|
|
14217
|
+
return {
|
|
14218
|
+
callbackParams: [
|
|
14219
|
+
cellSelection instanceof CellSelectionState ? cellSelection.getState().selectedCells : null,
|
|
14220
|
+
"single-cell"
|
|
14221
|
+
]
|
|
14222
|
+
};
|
|
14223
|
+
}
|
|
14224
|
+
return {
|
|
14225
|
+
callbackParams: [
|
|
14226
|
+
cellSelection.getState(),
|
|
14227
|
+
"multi-cell"
|
|
14228
|
+
]
|
|
14229
|
+
};
|
|
13852
14230
|
}
|
|
13853
14231
|
};
|
|
13854
14232
|
}
|
|
@@ -14065,6 +14443,136 @@ function notNullable(value) {
|
|
|
14065
14443
|
return true;
|
|
14066
14444
|
}
|
|
14067
14445
|
|
|
14446
|
+
// src/components/InfiniteTable/api/getCellSelectionApi.ts
|
|
14447
|
+
function ensureMinMaxCellPositionByIndex(start, end) {
|
|
14448
|
+
let { rowIndex: startRowIndex, colIndex: startColIndex } = start;
|
|
14449
|
+
let { rowIndex: endRowIndex, colIndex: endColIndex } = end;
|
|
14450
|
+
const [colStart, colEnd] = startColIndex > endColIndex ? [endColIndex, startColIndex] : [startColIndex, endColIndex];
|
|
14451
|
+
const [rowStart, rowEnd] = startRowIndex > endRowIndex ? [endRowIndex, startRowIndex] : [startRowIndex, endRowIndex];
|
|
14452
|
+
return [
|
|
14453
|
+
{ rowIndex: rowStart, colIndex: colStart },
|
|
14454
|
+
{ rowIndex: rowEnd, colIndex: colEnd }
|
|
14455
|
+
];
|
|
14456
|
+
}
|
|
14457
|
+
function getCellSelectionApi(param) {
|
|
14458
|
+
const {
|
|
14459
|
+
getComputed,
|
|
14460
|
+
// getState,
|
|
14461
|
+
getDataSourceState,
|
|
14462
|
+
// componentActions,
|
|
14463
|
+
dataSourceActions
|
|
14464
|
+
} = param;
|
|
14465
|
+
const getCellSelectionPosition = (options) => {
|
|
14466
|
+
var _a, _b, _c;
|
|
14467
|
+
const rowId = (_b = options.rowId) != null ? _b : (_a = getRowInfoAt(options.rowIndex, getDataSourceState)) == null ? void 0 : _a.id;
|
|
14468
|
+
const colId = (_c = options.colId) != null ? _c : getComputed().computedVisibleColumns[options.colIndex].id;
|
|
14469
|
+
return [rowId, colId];
|
|
14470
|
+
};
|
|
14471
|
+
const cellSelectionApi = {
|
|
14472
|
+
deselectAll: () => {
|
|
14473
|
+
const dataSourceState = getDataSourceState();
|
|
14474
|
+
const cellSelection = dataSourceState.cellSelection;
|
|
14475
|
+
if (!cellSelection) {
|
|
14476
|
+
return;
|
|
14477
|
+
}
|
|
14478
|
+
const newCellSelection = new CellSelectionState(cellSelection);
|
|
14479
|
+
newCellSelection.deselectAll();
|
|
14480
|
+
dataSourceActions.cellSelection = newCellSelection;
|
|
14481
|
+
},
|
|
14482
|
+
clear: () => {
|
|
14483
|
+
cellSelectionApi.deselectAll();
|
|
14484
|
+
},
|
|
14485
|
+
selectAll: () => {
|
|
14486
|
+
const dataSourceState = getDataSourceState();
|
|
14487
|
+
const cellSelection = dataSourceState.cellSelection;
|
|
14488
|
+
if (!cellSelection) {
|
|
14489
|
+
return;
|
|
14490
|
+
}
|
|
14491
|
+
const newCellSelection = new CellSelectionState(cellSelection);
|
|
14492
|
+
newCellSelection.selectAll();
|
|
14493
|
+
dataSourceActions.cellSelection = newCellSelection;
|
|
14494
|
+
},
|
|
14495
|
+
selectRange: (startOptions, endOptions) => {
|
|
14496
|
+
cellSelectionApi.setRangeSelected(startOptions, endOptions, true);
|
|
14497
|
+
},
|
|
14498
|
+
deselectRange: (startOptions, endOptions) => {
|
|
14499
|
+
cellSelectionApi.setRangeSelected(startOptions, endOptions, false);
|
|
14500
|
+
},
|
|
14501
|
+
setRangeSelected: (startOptions, endOptions, selected) => {
|
|
14502
|
+
const dataSourceState = getDataSourceState();
|
|
14503
|
+
const cellSelection = dataSourceState.cellSelection;
|
|
14504
|
+
if (!cellSelection) {
|
|
14505
|
+
return;
|
|
14506
|
+
}
|
|
14507
|
+
const newCellSelection = new CellSelectionState(cellSelection);
|
|
14508
|
+
const [startRowId, startColId] = getCellSelectionPosition(startOptions);
|
|
14509
|
+
const [endRowId, endColId] = getCellSelectionPosition(endOptions);
|
|
14510
|
+
const startCol = getComputed().computedVisibleColumnsMap.get(startColId);
|
|
14511
|
+
const endCol = getComputed().computedVisibleColumnsMap.get(endColId);
|
|
14512
|
+
if (!startCol || !endCol) {
|
|
14513
|
+
return;
|
|
14514
|
+
}
|
|
14515
|
+
const startColIndex = startCol.computedVisibleIndex;
|
|
14516
|
+
const endColIndex = endCol.computedVisibleIndex;
|
|
14517
|
+
const startRowInfo = getRowInfoAt(startRowId, getDataSourceState);
|
|
14518
|
+
const endRowInfo = getRowInfoAt(endRowId, getDataSourceState);
|
|
14519
|
+
if (!startRowInfo || !endRowInfo) {
|
|
14520
|
+
return;
|
|
14521
|
+
}
|
|
14522
|
+
const startRowIndex = startRowInfo.indexInAll;
|
|
14523
|
+
const endRowIndex = endRowInfo.indexInAll;
|
|
14524
|
+
const [start, end] = ensureMinMaxCellPositionByIndex(
|
|
14525
|
+
{ rowIndex: startRowIndex, colIndex: startColIndex },
|
|
14526
|
+
{ rowIndex: endRowIndex, colIndex: endColIndex }
|
|
14527
|
+
);
|
|
14528
|
+
for (let i = start.rowIndex; i <= end.rowIndex; i++) {
|
|
14529
|
+
for (let j = start.colIndex; j <= end.colIndex; j++) {
|
|
14530
|
+
const pos = {
|
|
14531
|
+
rowIndex: i,
|
|
14532
|
+
colIndex: j
|
|
14533
|
+
};
|
|
14534
|
+
const [pk, colId] = getCellSelectionPosition(pos);
|
|
14535
|
+
if (selected) {
|
|
14536
|
+
newCellSelection.selectCell(pk, colId);
|
|
14537
|
+
} else {
|
|
14538
|
+
newCellSelection.deselectCell(pk, colId);
|
|
14539
|
+
}
|
|
14540
|
+
}
|
|
14541
|
+
}
|
|
14542
|
+
dataSourceActions.cellSelection = newCellSelection;
|
|
14543
|
+
},
|
|
14544
|
+
isCellSelected: (options) => {
|
|
14545
|
+
var _a, _b;
|
|
14546
|
+
const [pk, colId] = getCellSelectionPosition(options);
|
|
14547
|
+
return (_b = (_a = getDataSourceState().cellSelection) == null ? void 0 : _a.isCellSelected(pk, colId)) != null ? _b : false;
|
|
14548
|
+
},
|
|
14549
|
+
selectCell: (options) => {
|
|
14550
|
+
const cellSelection = getDataSourceState().cellSelection;
|
|
14551
|
+
if (!cellSelection) {
|
|
14552
|
+
return;
|
|
14553
|
+
}
|
|
14554
|
+
const [pk, colId] = getCellSelectionPosition(options);
|
|
14555
|
+
const newCellSelection = options.clear ? new CellSelectionState() : new CellSelectionState(cellSelection);
|
|
14556
|
+
newCellSelection.selectCell(pk, colId);
|
|
14557
|
+
dataSourceActions.cellSelection = newCellSelection;
|
|
14558
|
+
},
|
|
14559
|
+
deselectCell: (options) => {
|
|
14560
|
+
const cellSelection = getDataSourceState().cellSelection;
|
|
14561
|
+
if (!cellSelection) {
|
|
14562
|
+
return;
|
|
14563
|
+
}
|
|
14564
|
+
const [pk, colId] = getCellSelectionPosition(options);
|
|
14565
|
+
const newCellSelection = new CellSelectionState(cellSelection);
|
|
14566
|
+
newCellSelection.deselectCell(pk, colId);
|
|
14567
|
+
dataSourceActions.cellSelection = newCellSelection;
|
|
14568
|
+
}
|
|
14569
|
+
};
|
|
14570
|
+
if (false) {
|
|
14571
|
+
globalThis.cellSelectionApi = cellSelectionApi;
|
|
14572
|
+
}
|
|
14573
|
+
return cellSelectionApi;
|
|
14574
|
+
}
|
|
14575
|
+
|
|
14068
14576
|
// src/components/InfiniteTable/api/getImperativeApi.ts
|
|
14069
14577
|
function isSortInfoForColumn(sortInfo, col) {
|
|
14070
14578
|
if (sortInfo.id) {
|
|
@@ -14449,10 +14957,15 @@ var InfiniteTableApiImpl = class {
|
|
|
14449
14957
|
return true;
|
|
14450
14958
|
};
|
|
14451
14959
|
this.context = context;
|
|
14452
|
-
this.
|
|
14960
|
+
this.rowSelectionApi = getRowSelectionApi({
|
|
14453
14961
|
dataSourceActions: context.dataSourceActions,
|
|
14454
14962
|
getDataSourceState: context.getDataSourceState
|
|
14455
14963
|
});
|
|
14964
|
+
this.cellSelectionApi = getCellSelectionApi({
|
|
14965
|
+
dataSourceActions: context.dataSourceActions,
|
|
14966
|
+
getDataSourceState: context.getDataSourceState,
|
|
14967
|
+
getComputed: context.getComputed
|
|
14968
|
+
});
|
|
14456
14969
|
}
|
|
14457
14970
|
get actions() {
|
|
14458
14971
|
return this.context.actions;
|
|
@@ -15064,6 +15577,8 @@ function useCellRendering(param) {
|
|
|
15064
15577
|
groupRenderStrategy,
|
|
15065
15578
|
brain,
|
|
15066
15579
|
showZebraRows,
|
|
15580
|
+
cellClassName,
|
|
15581
|
+
cellStyle,
|
|
15067
15582
|
rowStyle,
|
|
15068
15583
|
rowClassName,
|
|
15069
15584
|
onScrollToTop,
|
|
@@ -15170,7 +15685,9 @@ function useCellRendering(param) {
|
|
|
15170
15685
|
columnsMap: computedColumnsMap,
|
|
15171
15686
|
fieldsToColumn,
|
|
15172
15687
|
rowStyle,
|
|
15173
|
-
rowClassName
|
|
15688
|
+
rowClassName,
|
|
15689
|
+
cellStyle,
|
|
15690
|
+
cellClassName
|
|
15174
15691
|
};
|
|
15175
15692
|
return /* @__PURE__ */ React51.createElement(InfiniteTableColumnCell, __spreadValues({}, cellProps));
|
|
15176
15693
|
},
|
|
@@ -15185,7 +15702,9 @@ function useCellRendering(param) {
|
|
|
15185
15702
|
showZebraRows,
|
|
15186
15703
|
repaintId,
|
|
15187
15704
|
rowStyle,
|
|
15188
|
-
rowClassName
|
|
15705
|
+
rowClassName,
|
|
15706
|
+
cellClassName,
|
|
15707
|
+
cellStyle
|
|
15189
15708
|
]
|
|
15190
15709
|
);
|
|
15191
15710
|
return {
|
|
@@ -15197,6 +15716,118 @@ function useCellRendering(param) {
|
|
|
15197
15716
|
// src/components/InfiniteTable/hooks/useComputed.ts
|
|
15198
15717
|
import { useEffect as useEffect28, useState as useState17 } from "react";
|
|
15199
15718
|
|
|
15719
|
+
// src/components/InfiniteTable/utils/MultiCellSelector.ts
|
|
15720
|
+
var MultiCellSelector = class {
|
|
15721
|
+
constructor(options) {
|
|
15722
|
+
this.multiSelectStartPosition = { rowIndex: 0, colIndex: 0 };
|
|
15723
|
+
this.getPrimaryKeyByIndex = options.getPrimaryKeyByIndex;
|
|
15724
|
+
this.getColumnIdByIndex = options.getColumnIdByIndex;
|
|
15725
|
+
}
|
|
15726
|
+
getCellSelectionPosition(position2) {
|
|
15727
|
+
const { rowIndex, colIndex } = position2;
|
|
15728
|
+
const rowId = this.getPrimaryKeyByIndex(rowIndex);
|
|
15729
|
+
const columnId = this.getColumnIdByIndex(colIndex);
|
|
15730
|
+
if (rowId === void 0 || !columnId) {
|
|
15731
|
+
return void 0;
|
|
15732
|
+
}
|
|
15733
|
+
return [rowId, columnId];
|
|
15734
|
+
}
|
|
15735
|
+
set cellSelectionState(cellSelectionState) {
|
|
15736
|
+
this._cellSelectionState = cellSelectionState;
|
|
15737
|
+
}
|
|
15738
|
+
get cellSelectionState() {
|
|
15739
|
+
return this._cellSelectionState;
|
|
15740
|
+
}
|
|
15741
|
+
/**
|
|
15742
|
+
* This is the single click, without any modifier
|
|
15743
|
+
*/
|
|
15744
|
+
resetClick(position2) {
|
|
15745
|
+
this.cellSelectionState.deselectAll();
|
|
15746
|
+
const cellSelectionPosition = this.getCellSelectionPosition(position2);
|
|
15747
|
+
if (!cellSelectionPosition) {
|
|
15748
|
+
return;
|
|
15749
|
+
}
|
|
15750
|
+
this.cellSelectionState.deselectAll();
|
|
15751
|
+
this.cellSelectionState.selectCell(...cellSelectionPosition);
|
|
15752
|
+
this.multiSelectStartPosition = position2;
|
|
15753
|
+
this.multiSelectEndPosition = void 0;
|
|
15754
|
+
}
|
|
15755
|
+
/**
|
|
15756
|
+
* This is the click with ctrl/cmd key pressed
|
|
15757
|
+
* @param position CellPosition
|
|
15758
|
+
*/
|
|
15759
|
+
singleAddClick(position2) {
|
|
15760
|
+
const cellSelectionPosition = this.getCellSelectionPosition(position2);
|
|
15761
|
+
if (!cellSelectionPosition) {
|
|
15762
|
+
return;
|
|
15763
|
+
}
|
|
15764
|
+
if (this.cellSelectionState.isCellSelected(...cellSelectionPosition)) {
|
|
15765
|
+
this.cellSelectionState.deselectCell(...cellSelectionPosition);
|
|
15766
|
+
const nextPos = {
|
|
15767
|
+
rowIndex: position2.rowIndex + 1,
|
|
15768
|
+
colIndex: position2.colIndex
|
|
15769
|
+
};
|
|
15770
|
+
if (this.getCellSelectionPosition(nextPos)) {
|
|
15771
|
+
this.multiSelectStartPosition = nextPos;
|
|
15772
|
+
}
|
|
15773
|
+
} else {
|
|
15774
|
+
this.cellSelectionState.selectCell(...cellSelectionPosition);
|
|
15775
|
+
this.multiSelectStartPosition = position2;
|
|
15776
|
+
this.multiSelectEndPosition = void 0;
|
|
15777
|
+
}
|
|
15778
|
+
}
|
|
15779
|
+
multiSelectClick(position2) {
|
|
15780
|
+
if (!this.multiSelectStartPosition) {
|
|
15781
|
+
return;
|
|
15782
|
+
}
|
|
15783
|
+
const cellSelectionPosition = this.getCellSelectionPosition(position2);
|
|
15784
|
+
if (!cellSelectionPosition) {
|
|
15785
|
+
return;
|
|
15786
|
+
}
|
|
15787
|
+
if (this.multiSelectEndPosition) {
|
|
15788
|
+
this.deselectRange(
|
|
15789
|
+
this.multiSelectStartPosition,
|
|
15790
|
+
this.multiSelectEndPosition
|
|
15791
|
+
);
|
|
15792
|
+
}
|
|
15793
|
+
this.selectRange(this.multiSelectStartPosition, position2);
|
|
15794
|
+
this.multiSelectEndPosition = position2;
|
|
15795
|
+
}
|
|
15796
|
+
setRangeSelected(startPosition, endPosition, selected) {
|
|
15797
|
+
const [start, end] = ensureMinMaxCellPositionByIndex(
|
|
15798
|
+
startPosition,
|
|
15799
|
+
endPosition
|
|
15800
|
+
);
|
|
15801
|
+
const startSelectionPosition = this.getCellSelectionPosition(start);
|
|
15802
|
+
const endSelectionPosition = this.getCellSelectionPosition(end);
|
|
15803
|
+
if (!startSelectionPosition || !endSelectionPosition) {
|
|
15804
|
+
return;
|
|
15805
|
+
}
|
|
15806
|
+
for (let i = start.rowIndex; i <= end.rowIndex; i++) {
|
|
15807
|
+
for (let j = start.colIndex; j <= end.colIndex; j++) {
|
|
15808
|
+
const selectionPosition = this.getCellSelectionPosition({
|
|
15809
|
+
rowIndex: i,
|
|
15810
|
+
colIndex: j
|
|
15811
|
+
});
|
|
15812
|
+
if (!selectionPosition) {
|
|
15813
|
+
continue;
|
|
15814
|
+
}
|
|
15815
|
+
if (selected) {
|
|
15816
|
+
this.cellSelectionState.selectCell(...selectionPosition);
|
|
15817
|
+
} else {
|
|
15818
|
+
this.cellSelectionState.deselectCell(...selectionPosition);
|
|
15819
|
+
}
|
|
15820
|
+
}
|
|
15821
|
+
}
|
|
15822
|
+
}
|
|
15823
|
+
deselectRange(startPosition, endPosition) {
|
|
15824
|
+
this.setRangeSelected(startPosition, endPosition, false);
|
|
15825
|
+
}
|
|
15826
|
+
selectRange(startPosition, endPosition) {
|
|
15827
|
+
this.setRangeSelected(startPosition, endPosition, true);
|
|
15828
|
+
}
|
|
15829
|
+
};
|
|
15830
|
+
|
|
15200
15831
|
// src/components/InfiniteTable/utils/MultiRowSelector.ts
|
|
15201
15832
|
function ensureMinMax(start, end) {
|
|
15202
15833
|
return start < end ? [start, end] : [end, start];
|
|
@@ -15632,8 +16263,10 @@ var forwardProps4 = (setupState) => {
|
|
|
15632
16263
|
columnDefaultFilterable: 1,
|
|
15633
16264
|
columnDefaultSortable: 1,
|
|
15634
16265
|
rowStyle: 1,
|
|
16266
|
+
cellStyle: 1,
|
|
15635
16267
|
rowProps: 1,
|
|
15636
16268
|
rowClassName: 1,
|
|
16269
|
+
cellClassName: 1,
|
|
15637
16270
|
pinnedStartMaxWidth: 1,
|
|
15638
16271
|
pinnedEndMaxWidth: 1,
|
|
15639
16272
|
pivotColumn: 1,
|
|
@@ -16491,7 +17124,8 @@ function useComputed() {
|
|
|
16491
17124
|
const {
|
|
16492
17125
|
componentActions: dataSourceActions,
|
|
16493
17126
|
componentState: dataSourceState,
|
|
16494
|
-
getState: getDataSourceState
|
|
17127
|
+
getState: getDataSourceState,
|
|
17128
|
+
api: dataSourceApi
|
|
16495
17129
|
} = useDataSourceContextValue();
|
|
16496
17130
|
const {
|
|
16497
17131
|
columnOrder,
|
|
@@ -16594,8 +17228,19 @@ function useComputed() {
|
|
|
16594
17228
|
});
|
|
16595
17229
|
return multiRowSelector2;
|
|
16596
17230
|
});
|
|
17231
|
+
const getComputedVisibleColumns = useLatest(computedVisibleColumns);
|
|
17232
|
+
const [multiCellSelector] = useState17(() => {
|
|
17233
|
+
return new MultiCellSelector({
|
|
17234
|
+
getPrimaryKeyByIndex: dataSourceApi.getPrimaryKeyByIndex,
|
|
17235
|
+
getColumnIdByIndex: (colIndex) => {
|
|
17236
|
+
var _a2;
|
|
17237
|
+
return ((_a2 = getComputedVisibleColumns()[colIndex]) == null ? void 0 : _a2.id) || "";
|
|
17238
|
+
}
|
|
17239
|
+
});
|
|
17240
|
+
});
|
|
16597
17241
|
return {
|
|
16598
17242
|
multiRowSelector,
|
|
17243
|
+
multiCellSelector,
|
|
16599
17244
|
scrollbars,
|
|
16600
17245
|
columnSize,
|
|
16601
17246
|
rowspan,
|
|
@@ -16797,7 +17442,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
16797
17442
|
const valid = useMemo11(() => {
|
|
16798
17443
|
let valid2 = isValidLicense(licenseKey, {
|
|
16799
17444
|
publishedAt: 1624970570587,
|
|
16800
|
-
version: "
|
|
17445
|
+
version: "3.0.0"
|
|
16801
17446
|
});
|
|
16802
17447
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
16803
17448
|
return true;
|
|
@@ -16893,6 +17538,7 @@ import { useCallback as useCallback22, useMemo as useMemo12, useEffect as useEff
|
|
|
16893
17538
|
function onCellClick(context, event) {
|
|
16894
17539
|
var _a, _b;
|
|
16895
17540
|
updateRowSelectionOnCellClick(context, event);
|
|
17541
|
+
updateCellSelectionOnCellClick(context, event);
|
|
16896
17542
|
if (event.detail === 2) {
|
|
16897
17543
|
onCellDoubleClick(context, event);
|
|
16898
17544
|
}
|
|
@@ -16906,6 +17552,38 @@ function onCellDoubleClick(context, _event) {
|
|
|
16906
17552
|
columnId: column.id
|
|
16907
17553
|
});
|
|
16908
17554
|
}
|
|
17555
|
+
function updateCellSelectionOnCellClick(context, event) {
|
|
17556
|
+
const {
|
|
17557
|
+
getDataSourceState,
|
|
17558
|
+
getComputed,
|
|
17559
|
+
rowIndex,
|
|
17560
|
+
colIndex,
|
|
17561
|
+
dataSourceActions
|
|
17562
|
+
} = context;
|
|
17563
|
+
const dataSourceState = getDataSourceState();
|
|
17564
|
+
const { selectionMode, cellSelection: existingCellSelection } = dataSourceState;
|
|
17565
|
+
if (!existingCellSelection) {
|
|
17566
|
+
return;
|
|
17567
|
+
}
|
|
17568
|
+
if (selectionMode !== "multi-cell") {
|
|
17569
|
+
return;
|
|
17570
|
+
}
|
|
17571
|
+
const { multiCellSelector } = getComputed();
|
|
17572
|
+
const cellSelection = new CellSelectionState(existingCellSelection);
|
|
17573
|
+
multiCellSelector.cellSelectionState = cellSelection;
|
|
17574
|
+
const position2 = {
|
|
17575
|
+
rowIndex,
|
|
17576
|
+
colIndex
|
|
17577
|
+
};
|
|
17578
|
+
if (event.metaKey || event.ctrlKey) {
|
|
17579
|
+
multiCellSelector.singleAddClick(position2);
|
|
17580
|
+
} else if (event.shiftKey) {
|
|
17581
|
+
multiCellSelector.multiSelectClick(position2);
|
|
17582
|
+
} else {
|
|
17583
|
+
multiCellSelector.resetClick(position2);
|
|
17584
|
+
}
|
|
17585
|
+
dataSourceActions.cellSelection = cellSelection;
|
|
17586
|
+
}
|
|
16909
17587
|
function updateRowSelectionOnCellClick(context, event) {
|
|
16910
17588
|
const {
|
|
16911
17589
|
rowIndex,
|
|
@@ -16944,14 +17622,24 @@ function updateRowSelectionOnCellClick(context, event) {
|
|
|
16944
17622
|
} else if (selectionMode === "single-row") {
|
|
16945
17623
|
const id = dataArray[rowIndex].id;
|
|
16946
17624
|
if (event.metaKey || event.ctrlKey) {
|
|
16947
|
-
api.
|
|
17625
|
+
api.rowSelectionApi.toggleRowSelection(id);
|
|
16948
17626
|
} else {
|
|
16949
|
-
api.
|
|
17627
|
+
api.rowSelectionApi.selectRow(id);
|
|
16950
17628
|
}
|
|
16951
17629
|
}
|
|
16952
17630
|
return false;
|
|
16953
17631
|
}
|
|
16954
17632
|
|
|
17633
|
+
// src/components/InfiniteTable/eventHandlers/onCellMouseDown.ts
|
|
17634
|
+
function onCellMouseDown(context, event) {
|
|
17635
|
+
if (event.detail === 2) {
|
|
17636
|
+
return;
|
|
17637
|
+
}
|
|
17638
|
+
updateCellSelectionOnCellMouseDown(context);
|
|
17639
|
+
}
|
|
17640
|
+
function updateCellSelectionOnCellMouseDown(_context) {
|
|
17641
|
+
}
|
|
17642
|
+
|
|
16955
17643
|
// src/components/utils/clamp.ts
|
|
16956
17644
|
function clamp(value, min, max) {
|
|
16957
17645
|
return Math.min(Math.max(value, min), max);
|
|
@@ -17206,7 +17894,7 @@ function handleKeyboardSelection(context, keyboardEvent) {
|
|
|
17206
17894
|
return false;
|
|
17207
17895
|
}
|
|
17208
17896
|
if (selectionMode === "single-row" && key === " ") {
|
|
17209
|
-
imperativeApi.
|
|
17897
|
+
imperativeApi.rowSelectionApi.toggleRowSelection(rowInfo.id);
|
|
17210
17898
|
return true;
|
|
17211
17899
|
}
|
|
17212
17900
|
if (selectionMode !== "multi-row") {
|
|
@@ -17223,9 +17911,11 @@ function handleKeyboardSelection(context, keyboardEvent) {
|
|
|
17223
17911
|
if (key === " ") {
|
|
17224
17912
|
if (groupBy.length) {
|
|
17225
17913
|
if (rowInfo.isGroupRow && rowInfo.groupKeys) {
|
|
17226
|
-
imperativeApi.
|
|
17914
|
+
imperativeApi.rowSelectionApi.toggleGroupRowSelection(
|
|
17915
|
+
rowInfo.groupKeys
|
|
17916
|
+
);
|
|
17227
17917
|
} else {
|
|
17228
|
-
imperativeApi.
|
|
17918
|
+
imperativeApi.rowSelectionApi.toggleRowSelection(rowInfo.id);
|
|
17229
17919
|
}
|
|
17230
17920
|
return true;
|
|
17231
17921
|
} else {
|
|
@@ -17610,9 +18300,23 @@ function handleDOMEvents() {
|
|
|
17610
18300
|
);
|
|
17611
18301
|
}
|
|
17612
18302
|
const removeOnCellClick = context.getState().cellClick.onChange(cellClickHandler);
|
|
18303
|
+
function cellMouseDownHandler(param) {
|
|
18304
|
+
if (!param) {
|
|
18305
|
+
return;
|
|
18306
|
+
}
|
|
18307
|
+
const { event, rowIndex, colIndex } = param;
|
|
18308
|
+
const column = context.getComputed().computedVisibleColumns[colIndex];
|
|
18309
|
+
const columnApi = getColumnApiForColumn(column.id, context);
|
|
18310
|
+
onCellMouseDown(
|
|
18311
|
+
__spreadProps(__spreadValues({}, context), { rowIndex, colIndex, column, columnApi }),
|
|
18312
|
+
event
|
|
18313
|
+
);
|
|
18314
|
+
}
|
|
18315
|
+
const removeOnCellMouseDown = context.getState().cellMouseDown.onChange(cellMouseDownHandler);
|
|
17613
18316
|
return () => {
|
|
17614
18317
|
removeOnKeyDown();
|
|
17615
18318
|
removeOnCellClick();
|
|
18319
|
+
removeOnCellMouseDown();
|
|
17616
18320
|
};
|
|
17617
18321
|
}, []);
|
|
17618
18322
|
}
|
|
@@ -20295,18 +20999,6 @@ var InfiniteTableComponent = React64.memo(
|
|
|
20295
20999
|
scrollerDOMRef
|
|
20296
21000
|
}
|
|
20297
21001
|
), /* @__PURE__ */ React64.createElement(LoadMaskCmp, { visible: loading }, loadingText)), /* @__PURE__ */ React64.createElement(
|
|
20298
|
-
"div",
|
|
20299
|
-
{
|
|
20300
|
-
"data-name": "pinned-start-border",
|
|
20301
|
-
className: PinnedStartIndicatorBorder
|
|
20302
|
-
}
|
|
20303
|
-
), /* @__PURE__ */ React64.createElement(
|
|
20304
|
-
"div",
|
|
20305
|
-
{
|
|
20306
|
-
"data-name": "pinned-end-border",
|
|
20307
|
-
className: PinnedEndIndicatorBorder
|
|
20308
|
-
}
|
|
20309
|
-
), /* @__PURE__ */ React64.createElement(
|
|
20310
21002
|
"div",
|
|
20311
21003
|
{
|
|
20312
21004
|
ref: portalDOMRef,
|
|
@@ -20418,6 +21110,7 @@ var components = {
|
|
|
20418
21110
|
NumberFilterEditor
|
|
20419
21111
|
};
|
|
20420
21112
|
export {
|
|
21113
|
+
CellSelectionState,
|
|
20421
21114
|
DataSource,
|
|
20422
21115
|
DataSourceActionType,
|
|
20423
21116
|
DeepMap,
|