@viewkitjs/views 0.1.0 → 0.3.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/CHANGELOG.md +767 -1
- package/README.md +92 -41
- package/dist/atoms/LoadMore.js +11 -1
- package/dist/atoms/Row.js +1 -1
- package/dist/atoms/RowMenu.d.ts +1 -1
- package/dist/atoms/RowMenu.js +20 -6
- package/dist/atoms/types.d.ts +4 -4
- package/dist/cells/cell-format.d.ts +3 -3
- package/dist/cells/cell-title.d.ts +1 -2
- package/dist/cells/cell-title.js +2 -2
- package/dist/cells/cell-values.js +6 -3
- package/dist/contract.d.ts +79 -8
- package/dist/contract.js +55 -8
- package/dist/display/converted.d.ts +19 -0
- package/dist/display/converted.js +12 -0
- package/dist/display/format.d.ts +16 -1
- package/dist/display/format.js +10 -1
- package/dist/display/index.d.ts +2 -1
- package/dist/display/index.js +2 -1
- package/dist/display/link-click.d.ts +11 -0
- package/dist/display/link-click.js +3 -0
- package/dist/display/link.js +12 -6
- package/dist/display/location.d.ts +4 -3
- package/dist/display/location.js +12 -5
- package/dist/display/multi-value.d.ts +1 -1
- package/dist/display/multi-value.js +1 -1
- package/dist/display/options.d.ts +8 -2
- package/dist/display/percent.js +10 -3
- package/dist/display/phone.d.ts +2 -1
- package/dist/display/phone.js +11 -2
- package/dist/display/relation.js +1 -1
- package/dist/editors/ChipsEditor.d.ts +9 -4
- package/dist/editors/ChipsEditor.js +7 -3
- package/dist/editors/DateEditor.d.ts +21 -6
- package/dist/editors/DateEditor.js +118 -30
- package/dist/editors/EditorPanel.d.ts +61 -0
- package/dist/editors/EditorPanel.js +54 -0
- package/dist/editors/LocationEditor.d.ts +3 -0
- package/dist/editors/LocationEditor.js +28 -21
- package/dist/editors/NameEditor.d.ts +3 -0
- package/dist/editors/NameEditor.js +15 -10
- package/dist/editors/NumberEditor.d.ts +3 -0
- package/dist/editors/NumberEditor.js +7 -7
- package/dist/editors/RangeEditor.d.ts +16 -1
- package/dist/editors/RangeEditor.js +22 -6
- package/dist/editors/RelationEditor.d.ts +13 -28
- package/dist/editors/RelationEditor.js +17 -40
- package/dist/editors/RelationSetEditor.d.ts +53 -0
- package/dist/editors/RelationSetEditor.js +112 -0
- package/dist/editors/SelectEditor.d.ts +21 -3
- package/dist/editors/SelectEditor.js +55 -9
- package/dist/editors/TextEditor.d.ts +51 -0
- package/dist/editors/TextEditor.js +81 -0
- package/dist/editors/ValueListEditor.d.ts +5 -2
- package/dist/editors/ValueListEditor.js +11 -9
- package/dist/editors/edit-cores.d.ts +13 -10
- package/dist/editors/edit-cores.js +7 -6
- package/dist/editors/edit-session.d.ts +21 -11
- package/dist/editors/edit-session.js +19 -5
- package/dist/editors/keep-inside.d.ts +12 -0
- package/dist/editors/keep-inside.js +20 -0
- package/dist/editors/open-value.d.ts +21 -0
- package/dist/editors/open-value.js +36 -0
- package/dist/editors/open-values.d.ts +4 -0
- package/dist/editors/open-values.js +7 -0
- package/dist/editors/relation-kinds.d.ts +7 -0
- package/dist/editors/relation-kinds.js +21 -0
- package/dist/editors/relation-panel.d.ts +69 -0
- package/dist/editors/relation-panel.js +40 -0
- package/dist/field-row/FieldNoteLine.d.ts +14 -0
- package/dist/field-row/FieldNoteLine.js +14 -0
- package/dist/field-row/FieldRow.d.ts +73 -0
- package/dist/field-row/FieldRow.js +157 -0
- package/dist/field-row/FieldRowLane.d.ts +19 -0
- package/dist/field-row/FieldRowLane.js +11 -0
- package/dist/field-row/editors/RowChipsEditor.d.ts +11 -0
- package/dist/field-row/editors/RowChipsEditor.js +25 -0
- package/dist/field-row/editors/RowDateEditor.d.ts +16 -0
- package/dist/field-row/editors/RowDateEditor.js +18 -0
- package/dist/field-row/editors/RowEditor.d.ts +39 -0
- package/dist/field-row/editors/RowEditor.js +64 -0
- package/dist/field-row/editors/RowNameEditor.d.ts +4 -0
- package/dist/field-row/editors/RowNameEditor.js +15 -0
- package/dist/field-row/editors/RowNumberEditor.d.ts +12 -0
- package/dist/field-row/editors/RowNumberEditor.js +18 -0
- package/dist/field-row/editors/RowPlaceEditor.d.ts +8 -0
- package/dist/field-row/editors/RowPlaceEditor.js +18 -0
- package/dist/field-row/editors/RowRangeEditor.d.ts +4 -0
- package/dist/field-row/editors/RowRangeEditor.js +15 -0
- package/dist/field-row/editors/RowRelationEditor.d.ts +20 -0
- package/dist/field-row/editors/RowRelationEditor.js +77 -0
- package/dist/field-row/editors/RowSelectEditor.d.ts +13 -0
- package/dist/field-row/editors/RowSelectEditor.js +23 -0
- package/dist/field-row/editors/RowTextEditor.d.ts +15 -0
- package/dist/field-row/editors/RowTextEditor.js +16 -0
- package/dist/field-row/editors/RowValueListEditor.d.ts +4 -0
- package/dist/field-row/editors/RowValueListEditor.js +21 -0
- package/dist/field-row/editors/host.d.ts +59 -0
- package/dist/field-row/editors/host.js +1 -0
- package/dist/field-row/editors/row-session.d.ts +49 -0
- package/dist/field-row/editors/row-session.js +49 -0
- package/dist/field-row/index.d.ts +5 -0
- package/dist/field-row/index.js +5 -0
- package/dist/field-row/row-target.d.ts +20 -0
- package/dist/field-row/row-target.js +3 -0
- package/dist/field-row/useFieldWrite.d.ts +45 -0
- package/dist/field-row/useFieldWrite.js +190 -0
- package/dist/field-row/useRowSettlement.d.ts +33 -0
- package/dist/field-row/useRowSettlement.js +23 -0
- package/dist/fields/binding.d.ts +7 -2
- package/dist/fields/binding.js +13 -6
- package/dist/fields/currency.d.ts +0 -10
- package/dist/fields/currency.js +0 -14
- package/dist/fields/edit-core-types.d.ts +9 -9
- package/dist/fields/edit-core-types.js +6 -6
- package/dist/fields/money.d.ts +6 -0
- package/dist/fields/money.js +11 -0
- package/dist/fields/number-edit.d.ts +6 -0
- package/dist/fields/number-edit.js +4 -0
- package/dist/fields/prepare-write.js +6 -1
- package/dist/fields/relation-source-types.d.ts +12 -0
- package/dist/fields/write-target.d.ts +50 -0
- package/dist/fields/write-target.js +10 -0
- package/dist/filters/filter-model.d.ts +0 -1
- package/dist/filters/registry.d.ts +3 -36
- package/dist/filters/registry.js +0 -38
- package/dist/grid/chrome/GridAddColumn.d.ts +11 -0
- package/dist/grid/chrome/GridAddColumn.js +29 -0
- package/dist/grid/chrome/GridAggregateMenu.d.ts +31 -0
- package/dist/grid/chrome/GridAggregateMenu.js +29 -0
- package/dist/grid/chrome/GridCellEditors.d.ts +71 -0
- package/dist/grid/chrome/GridCellEditors.js +126 -0
- package/dist/grid/chrome/GridCellOutline.d.ts +49 -0
- package/dist/grid/chrome/GridCellOutline.js +16 -0
- package/dist/grid/chrome/GridChipsEditor.d.ts +38 -0
- package/dist/grid/chrome/GridChipsEditor.js +35 -0
- package/dist/grid/chrome/GridColumnColorSection.d.ts +11 -0
- package/dist/grid/chrome/GridColumnColorSection.js +40 -0
- package/dist/grid/chrome/GridColumnDateSection.d.ts +23 -0
- package/dist/grid/chrome/GridColumnDateSection.js +23 -0
- package/dist/grid/chrome/GridColumnDurationSection.d.ts +19 -0
- package/dist/grid/chrome/GridColumnDurationSection.js +24 -0
- package/dist/grid/chrome/GridColumnMenu.d.ts +101 -0
- package/dist/grid/chrome/GridColumnMenu.js +103 -0
- package/dist/grid/chrome/GridColumnNumberSection.d.ts +25 -0
- package/dist/grid/chrome/GridColumnNumberSection.js +27 -0
- package/dist/grid/chrome/GridColumnPercentSection.d.ts +15 -0
- package/dist/grid/chrome/GridColumnPercentSection.js +16 -0
- package/dist/grid/chrome/GridColumnSortSection.d.ts +18 -0
- package/dist/grid/chrome/GridColumnSortSection.js +16 -0
- package/dist/grid/chrome/GridDateEditor.d.ts +34 -0
- package/dist/grid/chrome/GridDateEditor.js +19 -0
- package/dist/grid/chrome/GridFlyout.d.ts +44 -0
- package/dist/grid/chrome/GridFlyout.js +80 -0
- package/dist/grid/chrome/GridFooter.d.ts +33 -0
- package/dist/grid/chrome/GridFooter.js +85 -0
- package/dist/grid/chrome/GridGroupMenu.d.ts +37 -0
- package/dist/grid/chrome/GridGroupMenu.js +64 -0
- package/dist/grid/chrome/GridHeader.d.ts +66 -0
- package/dist/grid/chrome/GridHeader.js +42 -0
- package/dist/grid/chrome/GridLongTextEditor.d.ts +55 -0
- package/dist/grid/chrome/GridLongTextEditor.js +69 -0
- package/dist/grid/chrome/GridMenuRow.d.ts +15 -0
- package/dist/grid/chrome/GridMenuRow.js +15 -0
- package/dist/grid/chrome/GridNameEditor.d.ts +24 -0
- package/dist/grid/chrome/GridNameEditor.js +21 -0
- package/dist/grid/chrome/GridNumberEditor.d.ts +49 -0
- package/dist/grid/chrome/GridNumberEditor.js +51 -0
- package/dist/grid/chrome/GridPlaceEditor.d.ts +26 -0
- package/dist/grid/chrome/GridPlaceEditor.js +22 -0
- package/dist/grid/chrome/GridRangeEditor.d.ts +30 -0
- package/dist/grid/chrome/GridRangeEditor.js +21 -0
- package/dist/grid/chrome/GridRelationEditor.d.ts +45 -0
- package/dist/grid/chrome/GridRelationEditor.js +92 -0
- package/dist/grid/chrome/GridResizeHandle.d.ts +19 -0
- package/dist/grid/chrome/GridResizeHandle.js +19 -0
- package/dist/grid/chrome/GridRow.d.ts +31 -0
- package/dist/grid/chrome/GridRow.js +179 -0
- package/dist/grid/chrome/GridRowActions.d.ts +32 -0
- package/dist/grid/chrome/GridRowActions.js +25 -0
- package/dist/grid/chrome/GridRowCells.d.ts +4 -0
- package/dist/grid/chrome/GridRowCells.js +128 -0
- package/dist/grid/chrome/GridRowGlyph.d.ts +12 -0
- package/dist/grid/chrome/GridRowGlyph.js +13 -0
- package/dist/grid/chrome/GridSelectEditor.d.ts +33 -0
- package/dist/grid/chrome/GridSelectEditor.js +43 -0
- package/dist/grid/chrome/GridStructure.d.ts +47 -0
- package/dist/grid/chrome/GridStructure.js +41 -0
- package/dist/grid/chrome/GridTable.d.ts +4 -0
- package/dist/grid/chrome/GridTable.js +192 -0
- package/dist/grid/chrome/GridTableSurface.d.ts +52 -0
- package/dist/grid/chrome/GridTableSurface.js +15 -0
- package/dist/grid/chrome/GridTextEditor.d.ts +45 -0
- package/dist/grid/chrome/GridTextEditor.js +38 -0
- package/dist/grid/chrome/GridValueListEditor.d.ts +30 -0
- package/dist/grid/chrome/GridValueListEditor.js +19 -0
- package/dist/grid/chrome/StuckMarker.d.ts +16 -0
- package/dist/grid/chrome/StuckMarker.js +34 -0
- package/dist/grid/chrome/cell-clipboard.d.ts +9 -0
- package/dist/grid/chrome/cell-clipboard.js +28 -0
- package/dist/grid/chrome/cell-cut-off.d.ts +11 -0
- package/dist/grid/chrome/cell-cut-off.js +20 -0
- package/dist/grid/chrome/cells.d.ts +21 -0
- package/dist/grid/chrome/cells.js +19 -0
- package/dist/grid/chrome/checks.d.ts +32 -0
- package/dist/grid/chrome/checks.js +32 -0
- package/dist/grid/chrome/column-glyph.d.ts +14 -0
- package/dist/grid/chrome/column-glyph.js +44 -0
- package/dist/grid/chrome/editors.d.ts +9 -0
- package/dist/grid/chrome/editors.js +10 -0
- package/dist/grid/chrome/grid-cell-classes.d.ts +53 -0
- package/dist/grid/chrome/grid-cell-classes.js +32 -0
- package/dist/grid/chrome/grid-cell-link.d.ts +13 -0
- package/dist/grid/chrome/grid-cell-link.js +9 -0
- package/dist/grid/chrome/grid-edit-session.d.ts +63 -0
- package/dist/grid/chrome/grid-edit-session.js +118 -0
- package/dist/grid/chrome/grid-hover.d.ts +60 -0
- package/dist/grid/chrome/grid-hover.js +81 -0
- package/dist/grid/chrome/grid-menu-focus.d.ts +43 -0
- package/dist/grid/chrome/grid-menu-focus.js +93 -0
- package/dist/grid/chrome/grid-menu-search.d.ts +7 -0
- package/dist/grid/chrome/grid-menu-search.js +7 -0
- package/dist/grid/chrome/grid-row-menu-key.d.ts +15 -0
- package/dist/grid/chrome/grid-row-menu-key.js +36 -0
- package/dist/grid/chrome/grid-row-props.d.ts +143 -0
- package/dist/grid/chrome/grid-row-props.js +1 -0
- package/dist/grid/chrome/grid-row-window.d.ts +61 -0
- package/dist/grid/chrome/grid-row-window.js +212 -0
- package/dist/grid/chrome/grid-scroll-owner.d.ts +38 -0
- package/dist/grid/chrome/grid-scroll-owner.js +75 -0
- package/dist/grid/chrome/grid-styles.d.ts +40 -0
- package/dist/grid/chrome/grid-styles.js +9 -0
- package/dist/grid/chrome/grid-table-props.d.ts +172 -0
- package/dist/grid/chrome/grid-table-props.js +1 -0
- package/dist/grid/chrome/useGridBatchApi.d.ts +34 -0
- package/dist/grid/chrome/useGridBatchApi.js +35 -0
- package/dist/grid/chrome/useGridColumnLayout.d.ts +30 -0
- package/dist/grid/chrome/useGridColumnLayout.js +206 -0
- package/dist/grid/chrome/useGridFocus.d.ts +45 -0
- package/dist/grid/chrome/useGridFocus.js +122 -0
- package/dist/grid/chrome/useGridHeaderDrag.d.ts +20 -0
- package/dist/grid/chrome/useGridHeaderDrag.js +37 -0
- package/dist/grid/chrome/useGridKeyboard.d.ts +64 -0
- package/dist/grid/chrome/useGridKeyboard.js +450 -0
- package/dist/grid/chrome/useGridPendingReconciliation.d.ts +12 -0
- package/dist/grid/chrome/useGridPendingReconciliation.js +32 -0
- package/dist/grid/chrome/useGridRailReveal.d.ts +57 -0
- package/dist/grid/chrome/useGridRailReveal.js +67 -0
- package/dist/grid/chrome/useGridRangeActions.d.ts +51 -0
- package/dist/grid/chrome/useGridRangeActions.js +195 -0
- package/dist/grid/chrome/useGridRangeGestures.d.ts +32 -0
- package/dist/grid/chrome/useGridRangeGestures.js +237 -0
- package/dist/grid/chrome/useGridRowContextMenu.d.ts +37 -0
- package/dist/grid/chrome/useGridRowContextMenu.js +153 -0
- package/dist/grid/chrome/useGridScaleStyles.d.ts +3 -0
- package/dist/grid/chrome/useGridScaleStyles.js +28 -0
- package/dist/grid/chrome/useGridScrollArea.d.ts +21 -0
- package/dist/grid/chrome/useGridScrollArea.js +65 -0
- package/dist/grid/chrome/useGridTableInteractionModel.d.ts +78 -0
- package/dist/grid/chrome/useGridTableInteractionModel.js +249 -0
- package/dist/grid/chrome/useGridTableSelection.d.ts +29 -0
- package/dist/grid/chrome/useGridTableSelection.js +55 -0
- package/dist/grid/chrome/useHeaderDragReorder.d.ts +21 -0
- package/dist/grid/chrome/useHeaderDragReorder.js +216 -0
- package/dist/grid/core/clipboard-model.d.ts +83 -0
- package/dist/grid/core/clipboard-model.js +291 -0
- package/dist/grid/core/column-values.d.ts +27 -0
- package/dist/grid/core/column-values.js +76 -0
- package/dist/grid/core/commit-model.d.ts +41 -0
- package/dist/grid/core/commit-model.js +3 -0
- package/dist/grid/core/coordinates.d.ts +48 -0
- package/dist/grid/core/coordinates.js +27 -0
- package/dist/grid/core/edge-scroll.d.ts +21 -0
- package/dist/grid/core/edge-scroll.js +23 -0
- package/dist/grid/core/edit-values.d.ts +9 -0
- package/dist/grid/core/edit-values.js +1 -0
- package/dist/grid/core/editing-controller.d.ts +60 -0
- package/dist/grid/core/editing-controller.js +266 -0
- package/dist/grid/core/editing-model.d.ts +87 -0
- package/dist/grid/core/editing-model.js +148 -0
- package/dist/grid/core/flat-rows.d.ts +35 -0
- package/dist/grid/core/flat-rows.js +20 -0
- package/dist/grid/core/grid-aria.d.ts +27 -0
- package/dist/grid/core/grid-aria.js +39 -0
- package/dist/grid/core/grid-focus.d.ts +54 -0
- package/dist/grid/core/grid-focus.js +148 -0
- package/dist/grid/core/grid-scale.d.ts +14 -0
- package/dist/grid/core/grid-scale.js +8 -0
- package/dist/grid/core/nav.d.ts +94 -0
- package/dist/grid/core/nav.js +92 -0
- package/dist/grid/core/pending-reconciliation.d.ts +53 -0
- package/dist/grid/core/pending-reconciliation.js +51 -0
- package/dist/grid/core/range-model.d.ts +25 -0
- package/dist/grid/core/range-model.js +59 -0
- package/dist/grid/core/row-window.d.ts +40 -0
- package/dist/grid/core/row-window.js +43 -0
- package/dist/grid/core/spreadsheet-operations.d.ts +101 -0
- package/dist/grid/core/spreadsheet-operations.js +280 -0
- package/dist/grid/core/useGridEditing.d.ts +46 -0
- package/dist/grid/core/useGridEditing.js +93 -0
- package/dist/grid/core/useGridRange.d.ts +20 -0
- package/dist/grid/core/useGridRange.js +24 -0
- package/dist/grid/core/value-equality.d.ts +54 -0
- package/dist/grid/core/value-equality.js +80 -0
- package/dist/grid/index.d.ts +18 -0
- package/dist/grid/index.js +5 -0
- package/dist/grid/useGridTablePrefs.d.ts +49 -0
- package/dist/grid/useGridTablePrefs.js +99 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/viewport.d.ts +3 -0
- package/dist/internal/viewport.js +15 -0
- package/dist/model/column-capabilities.d.ts +3 -2
- package/dist/model/column-capabilities.js +28 -8
- package/dist/model/column-from.js +3 -0
- package/dist/model/column-inspect.d.ts +10 -2
- package/dist/model/column-inspect.js +9 -0
- package/dist/model/column-schema.d.ts +6 -1
- package/dist/model/column-state.d.ts +1 -1
- package/dist/model/column-types.d.ts +3 -1
- package/dist/model/column-types.js +1 -1
- package/dist/model/density.js +3 -3
- package/dist/model/filter-capabilities.d.ts +1 -1
- package/dist/model/filter-capabilities.js +1 -1
- package/dist/model/index.d.ts +4 -6
- package/dist/model/index.js +0 -1
- package/dist/model/preferences.d.ts +7 -7
- package/dist/model/preferences.js +0 -1
- package/dist/model/prefs-buckets.d.ts +0 -1
- package/dist/model/prefs-buckets.js +0 -3
- package/dist/model/render-count.d.ts +6 -0
- package/dist/model/render-count.js +11 -0
- package/dist/provider/ViewsProvider.d.ts +6 -2
- package/dist/provider/ViewsProvider.js +12 -2
- package/dist/provider/components.d.ts +35 -9
- package/dist/provider/components.js +4 -2
- package/dist/provider/context.d.ts +8 -4
- package/dist/provider/desktop.d.ts +9 -0
- package/dist/provider/desktop.js +22 -0
- package/dist/provider/menu-groups.d.ts +8 -0
- package/dist/provider/menu-groups.js +38 -0
- package/dist/provider/plain-input.d.ts +8 -0
- package/dist/provider/plain-input.js +5 -0
- package/dist/provider/ports.d.ts +22 -0
- package/dist/provider/ports.js +1 -0
- package/dist/react.d.ts +3 -2
- package/dist/react.js +1 -0
- package/dist/selection/SelectCheckbox.d.ts +3 -1
- package/dist/selection/SelectCheckbox.js +2 -2
- package/dist/selection/useCheckDragSelect.js +6 -5
- package/docs/contract.md +202 -72
- package/docs/getting-started.md +250 -0
- package/docs/guides/atoms.md +245 -0
- package/docs/guides/cells.md +302 -0
- package/docs/guides/columns.md +413 -0
- package/docs/guides/display.md +204 -0
- package/docs/guides/editors.md +462 -0
- package/docs/guides/ports.md +246 -0
- package/docs/guides/selection.md +270 -0
- package/docs/guides/the-grid.md +696 -0
- package/docs/guides/the-provider.md +448 -0
- package/docs/index.md +52 -0
- package/docs/install.md +9 -47
- package/docs/reference/cells.md +28 -0
- package/docs/reference/display.md +44 -0
- package/docs/reference/editors-chips.md +6 -0
- package/docs/reference/editors-date.md +6 -0
- package/docs/reference/editors-location.md +10 -0
- package/docs/reference/editors-name.md +6 -0
- package/docs/reference/editors-number.md +11 -0
- package/docs/reference/editors-open-values.md +10 -0
- package/docs/reference/editors-panel.md +12 -0
- package/docs/reference/editors-range.md +6 -0
- package/docs/reference/editors-relation.md +12 -0
- package/docs/reference/editors-select.md +9 -0
- package/docs/reference/editors-session.md +11 -0
- package/docs/reference/editors-text.md +9 -0
- package/docs/reference/editors-value-list.md +6 -0
- package/docs/reference/editors.md +5 -0
- package/docs/reference/field-row.md +16 -0
- package/docs/reference/grid.md +39 -0
- package/docs/reference/react.md +89 -0
- package/docs/reference/selection.md +33 -0
- package/docs/reference/views.md +622 -0
- package/package.json +27 -4
- package/skills/views/SKILL.md +20 -5
- package/dist/filters/types.d.ts +0 -27
- package/dist/filters/types.js +0 -1
- package/dist/model/filter-pushdown.d.ts +0 -106
- package/dist/model/filter-pushdown.js +0 -147
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComponentType, CSSProperties, KeyboardEvent as ReactKeyboardEvent, MouseEvent as ReactMouseEvent, ReactElement, ReactNode, Ref, RefObject } from "react";
|
|
1
|
+
import type { ComponentPropsWithRef, ComponentType, CSSProperties, KeyboardEvent as ReactKeyboardEvent, MouseEvent as ReactMouseEvent, ReactElement, ReactNode, Ref, RefObject } from "react";
|
|
2
2
|
/** Where a floating part attaches: an element, a ref to one, or a point (a context menu). */
|
|
3
3
|
export type ViewsAnchor = HTMLElement | RefObject<HTMLElement | null> | {
|
|
4
4
|
x: number;
|
|
@@ -32,7 +32,8 @@ export type ViewsPopoverProps = {
|
|
|
32
32
|
sideOffset?: number;
|
|
33
33
|
alignOffset?: number;
|
|
34
34
|
/** False keeps focus where it was when the popup opens (an editor that owns
|
|
35
|
-
* its own input)
|
|
35
|
+
* its own input); that editor focuses its input with `preventScroll`, so the
|
|
36
|
+
* page stays where it is however the popup places itself. Default true. */
|
|
36
37
|
initialFocus?: boolean;
|
|
37
38
|
/** Called on a press outside the popup before it closes; return false to keep it open.
|
|
38
39
|
* `event` is the pointer press, with its `target` where the press landed, also when the
|
|
@@ -42,8 +43,9 @@ export type ViewsPopoverProps = {
|
|
|
42
43
|
/** Called on Escape before the popup closes; return false to keep it open. */
|
|
43
44
|
onEscape?: (event: KeyboardEvent) => void | false;
|
|
44
45
|
/** The popup's look. `panel` is the app's card popover; `menu` is its menu
|
|
45
|
-
* panel, for a popover that holds a list
|
|
46
|
-
* own). Default
|
|
46
|
+
* panel's surface, for a popover that holds a list: no inset (the list
|
|
47
|
+
* carries its own) and no card width (it is as wide as its list). Default
|
|
48
|
+
* `panel`. */
|
|
47
49
|
chrome?: "panel" | "menu";
|
|
48
50
|
/** A click inside the popup. A popup is a portal, so its clicks still bubble
|
|
49
51
|
* through the React tree to the anchor's row; the rendering stops them here. */
|
|
@@ -93,7 +95,8 @@ export type ViewsMenuItem = {
|
|
|
93
95
|
/** A checkable row: the app draws its tick. A checkable row closes the menu like any row. */
|
|
94
96
|
checked?: boolean;
|
|
95
97
|
/** A group: its rows drawn in place under this row's label, never a flyout. A group row is a
|
|
96
|
-
* label, not a target: its own `onSelect`, `href` and `checked` are ignored.
|
|
98
|
+
* label, not a target: its own `onSelect`, `href` and `checked` are ignored. A disabled group
|
|
99
|
+
* disables every row under it: the provider hands the app's `Menu` those rows already `disabled`. */
|
|
97
100
|
children?: ViewsMenuItem[];
|
|
98
101
|
separatorBefore?: boolean;
|
|
99
102
|
/** A keyboard hint drawn at the row's end, never bound by the menu. */
|
|
@@ -101,6 +104,8 @@ export type ViewsMenuItem = {
|
|
|
101
104
|
/** A link item: the row is an anchor and `onSelect` still fires. */
|
|
102
105
|
href?: string;
|
|
103
106
|
};
|
|
107
|
+
/** Opens at `anchor`, with no trigger child and no flyouts: on Base UI, the menu's root,
|
|
108
|
+
* positioner and popup, the anchor handed to the positioner. */
|
|
104
109
|
export type ViewsMenuProps = {
|
|
105
110
|
open: boolean;
|
|
106
111
|
onOpenChange: ViewsOpenChange;
|
|
@@ -122,6 +127,10 @@ export type ViewsCommandParts = {
|
|
|
122
127
|
filter?: (value: string, search: string) => number;
|
|
123
128
|
/** The arrows wrap from the last item to the first and back. Default false. */
|
|
124
129
|
loop?: boolean;
|
|
130
|
+
/** The item highlighted as the list opens, by its value. Without it, the first item; while no item has it (a
|
|
131
|
+
* remote page that doesn't hold it), none, until a key or typed text moves the highlight: never the first, which
|
|
132
|
+
* in a relation picker is None. A list that ignores it opens on its first item. */
|
|
133
|
+
defaultValue?: string;
|
|
125
134
|
}>;
|
|
126
135
|
Input: ComponentType<{
|
|
127
136
|
value: string;
|
|
@@ -152,8 +161,9 @@ export type ViewsCommandParts = {
|
|
|
152
161
|
value: string;
|
|
153
162
|
onSelect: (value: string) => void;
|
|
154
163
|
disabled?: boolean;
|
|
155
|
-
/** The value this item stands for is the current one
|
|
156
|
-
* the
|
|
164
|
+
/** The value this item stands for is the current one. The app colours the item as its
|
|
165
|
+
* chosen row; the check is the package's, drawn by the row inside, so the item draws no
|
|
166
|
+
* tick of its own. */
|
|
157
167
|
chosen?: boolean;
|
|
158
168
|
children: ReactNode;
|
|
159
169
|
className?: string;
|
|
@@ -186,7 +196,7 @@ export type ViewsCollapseProps = {
|
|
|
186
196
|
clipClassName?: string;
|
|
187
197
|
durationMs?: number;
|
|
188
198
|
};
|
|
189
|
-
/** A phone sheet.
|
|
199
|
+
/** A phone sheet. `snap` is a hint: an app whose sheet has no snap points ignores it. */
|
|
190
200
|
export type ViewsSheetProps = {
|
|
191
201
|
open: boolean;
|
|
192
202
|
onOpenChange: ViewsOpenChange;
|
|
@@ -196,6 +206,13 @@ export type ViewsSheetProps = {
|
|
|
196
206
|
className?: string;
|
|
197
207
|
children: ReactNode;
|
|
198
208
|
};
|
|
209
|
+
/** A single-line text box. Forward every prop to the element, `ref` included: the editors focus the
|
|
210
|
+
* box, place its caret and read its value through it. */
|
|
211
|
+
export type ViewsInputProps = Omit<ComponentPropsWithRef<"input">, "children"> & {
|
|
212
|
+
/** `bare`: the box draws no frame of its own (a grid cell, a panel that frames it). `field`: it
|
|
213
|
+
* wears the app's field frame, as a form's input does. Default `bare`. */
|
|
214
|
+
chrome?: "bare" | "field";
|
|
215
|
+
};
|
|
199
216
|
export type ViewsComponents = {
|
|
200
217
|
Button: ComponentType<ViewsButtonProps>;
|
|
201
218
|
Popover: ComponentType<ViewsPopoverProps>;
|
|
@@ -207,7 +224,9 @@ export type ViewsComponents = {
|
|
|
207
224
|
Collapse: ComponentType<ViewsCollapseProps>;
|
|
208
225
|
Sheet: ComponentType<ViewsSheetProps>;
|
|
209
226
|
/** The app's own icon component by the app's own names, for glyphs a host
|
|
210
|
-
* declares (`rowIcon`, a binding's `icon`).
|
|
227
|
+
* declares (`rowIcon`, a binding's `icon`). It draws on the first paint,
|
|
228
|
+
* because rows are measured as they mount: map the names from a static
|
|
229
|
+
* record, never icons loaded on demand. Semantic glyphs use `icons`. */
|
|
211
230
|
AppIcon: ComponentType<{
|
|
212
231
|
name: string;
|
|
213
232
|
className?: string;
|
|
@@ -219,4 +238,11 @@ export type ViewsComponents = {
|
|
|
219
238
|
source: string;
|
|
220
239
|
className?: string;
|
|
221
240
|
}>;
|
|
241
|
+
/** Optional: every editor's single-line box draws through it. Left out, the provider draws a
|
|
242
|
+
* plain `<input>`. */
|
|
243
|
+
Input?: ComponentType<ViewsInputProps>;
|
|
244
|
+
};
|
|
245
|
+
/** The map as the views read it: the optional slots filled, the app's or the package's default. */
|
|
246
|
+
export type ViewsResolvedComponents = ViewsComponents & {
|
|
247
|
+
Input: ComponentType<ViewsInputProps>;
|
|
222
248
|
};
|
|
@@ -2,18 +2,22 @@ import type { FieldConventions } from "@viewkitjs/fields";
|
|
|
2
2
|
import type { ViewsMessageResolver } from "../contract.js";
|
|
3
3
|
import type { ViewsAtoms } from "../atoms/types.js";
|
|
4
4
|
import type { FieldPresentation } from "../display/options.js";
|
|
5
|
-
import type {
|
|
5
|
+
import type { ViewsResolvedComponents } from "./components.js";
|
|
6
6
|
import type { ViewsIcons } from "./icons.js";
|
|
7
|
-
import type {
|
|
7
|
+
import type { ViewsResolvedPorts } from "./ports.js";
|
|
8
8
|
export type ViewsContextValue = {
|
|
9
|
-
components:
|
|
9
|
+
/** The app's components, with the optional ones filled: the app's own, or the package's plain default. */
|
|
10
|
+
components: ViewsResolvedComponents;
|
|
10
11
|
atoms: ViewsAtoms;
|
|
11
12
|
icons: ViewsIcons;
|
|
12
|
-
ports
|
|
13
|
+
/** The app's ports, with `confirm` always a function (the browser's where the app handed none). */
|
|
14
|
+
ports: ViewsResolvedPorts;
|
|
13
15
|
messages: ViewsMessageResolver;
|
|
14
16
|
conventions: FieldConventions;
|
|
15
17
|
/** The app's formatting: given the package's defaults, return the app's. */
|
|
16
18
|
presentation?: (defaults: FieldPresentation) => FieldPresentation;
|
|
19
|
+
/** The media query that means a desktop: the app's own, or `DEFAULT_DESKTOP_QUERY`. */
|
|
20
|
+
desktopQuery: string;
|
|
17
21
|
};
|
|
18
22
|
export declare const ViewsContext: import("react").Context<ViewsContextValue | null>;
|
|
19
23
|
export declare function useViews(): ViewsContextValue;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** The width a desktop starts at, unless the app hands in its own query. */
|
|
2
|
+
export declare const DEFAULT_DESKTOP_QUERY = "(min-width: 1024px)";
|
|
3
|
+
/** Whether the screen is a desktop by `query`, asked now: true where there is no `matchMedia`. For
|
|
4
|
+
* an answer at the moment of a gesture, where a subscription would redraw its reader on a change.
|
|
5
|
+
* The package's own: no entry point exports it. */
|
|
6
|
+
export declare function isDesktopNow(query: string): boolean;
|
|
7
|
+
/** Whether the screen is a desktop, by the provider's `desktopQuery`: true where there is no
|
|
8
|
+
* `matchMedia`. It follows the query's changes. The package's own: no entry point exports it. */
|
|
9
|
+
export declare function useDesktop(): boolean;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback, useSyncExternalStore } from "react";
|
|
3
|
+
import { useViews } from "./context.js";
|
|
4
|
+
export const DEFAULT_DESKTOP_QUERY = "(min-width: 1024px)";
|
|
5
|
+
function canAsk() {
|
|
6
|
+
return typeof window !== "undefined" && typeof window.matchMedia === "function";
|
|
7
|
+
}
|
|
8
|
+
export function isDesktopNow(query) {
|
|
9
|
+
return canAsk() ? window.matchMedia(query).matches : true;
|
|
10
|
+
}
|
|
11
|
+
export function useDesktop() {
|
|
12
|
+
const { desktopQuery } = useViews();
|
|
13
|
+
const subscribe = useCallback((onChange) => {
|
|
14
|
+
if (!canAsk())
|
|
15
|
+
return () => { };
|
|
16
|
+
const list = window.matchMedia(desktopQuery);
|
|
17
|
+
list.addEventListener("change", onChange);
|
|
18
|
+
return () => list.removeEventListener("change", onChange);
|
|
19
|
+
}, [desktopQuery]);
|
|
20
|
+
const read = () => isDesktopNow(desktopQuery);
|
|
21
|
+
return useSyncExternalStore(subscribe, read, () => true);
|
|
22
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ComponentType } from "react";
|
|
2
|
+
import type { ViewsMenuItem, ViewsMenuProps } from "./components.js";
|
|
3
|
+
/** The items with every row under a disabled group marked `disabled`, at every depth. Only the
|
|
4
|
+
* path to a disabled group is copied; with none, the same array comes back. */
|
|
5
|
+
export declare function settleMenuGroups(items: ViewsMenuItem[]): ViewsMenuItem[];
|
|
6
|
+
/** The app's Menu, handed its items settled. One wrapper per app Menu, so an open menu never
|
|
7
|
+
* remounts; a wrapper handed in again (a nested provider) comes back as it is. */
|
|
8
|
+
export declare function withSettledGroups(Menu: ComponentType<ViewsMenuProps>): ComponentType<ViewsMenuProps>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { createElement, useMemo } from "react";
|
|
2
|
+
function disableAll(items) {
|
|
3
|
+
return items.map((item) => ({
|
|
4
|
+
...item,
|
|
5
|
+
disabled: true,
|
|
6
|
+
...(item.children && { children: disableAll(item.children) }),
|
|
7
|
+
}));
|
|
8
|
+
}
|
|
9
|
+
export function settleMenuGroups(items) {
|
|
10
|
+
let changed = false;
|
|
11
|
+
const settled = items.map((item) => {
|
|
12
|
+
if (!item.children || item.children.length === 0)
|
|
13
|
+
return item;
|
|
14
|
+
const children = item.disabled ? disableAll(item.children) : settleMenuGroups(item.children);
|
|
15
|
+
if (children === item.children)
|
|
16
|
+
return item;
|
|
17
|
+
changed = true;
|
|
18
|
+
return { ...item, children };
|
|
19
|
+
});
|
|
20
|
+
return changed ? settled : items;
|
|
21
|
+
}
|
|
22
|
+
const wrappers = new WeakMap();
|
|
23
|
+
const settledMenus = new WeakSet();
|
|
24
|
+
export function withSettledGroups(Menu) {
|
|
25
|
+
if (settledMenus.has(Menu))
|
|
26
|
+
return Menu;
|
|
27
|
+
const known = wrappers.get(Menu);
|
|
28
|
+
if (known)
|
|
29
|
+
return known;
|
|
30
|
+
function SettledMenu(props) {
|
|
31
|
+
const items = useMemo(() => settleMenuGroups(props.items), [props.items]);
|
|
32
|
+
return createElement(Menu, { ...props, items });
|
|
33
|
+
}
|
|
34
|
+
SettledMenu.displayName = `Settled(${Menu.displayName ?? (Menu.name || "Menu")})`;
|
|
35
|
+
wrappers.set(Menu, SettledMenu);
|
|
36
|
+
settledMenus.add(SettledMenu);
|
|
37
|
+
return SettledMenu;
|
|
38
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { ViewsInputProps } from "./components.js";
|
|
3
|
+
/**
|
|
4
|
+
* The package's own `Input`, for an app that hands none: a bare `<input>` carrying exactly what the
|
|
5
|
+
* editor hands it, `ref` included, and no look of its own. `chrome` is a hint for an app's frame, so
|
|
6
|
+
* it never reaches the element.
|
|
7
|
+
*/
|
|
8
|
+
export declare function PlainInput({ chrome: _chrome, ...props }: ViewsInputProps): ReactNode;
|
package/dist/provider/ports.d.ts
CHANGED
|
@@ -25,11 +25,33 @@ export type ViewsPrefsPort = {
|
|
|
25
25
|
set: <T>(key: string, value: T) => void;
|
|
26
26
|
subscribe: (key: string, listener: () => void) => () => void;
|
|
27
27
|
};
|
|
28
|
+
/** A question asked before an act, for the person to answer: the app's own dialog, or the browser's. */
|
|
29
|
+
export type ViewsConfirmRequest = {
|
|
30
|
+
/** The question, worded by the package's message (a row's Delete: `views.menus.row-delete-confirm`). */
|
|
31
|
+
message: string;
|
|
32
|
+
/** The yes button's words (a row's Delete: `views.menus.row-delete`). */
|
|
33
|
+
confirmLabel: string;
|
|
34
|
+
/** What the act is done to, as the host names it (a row's `deleteLabel`). Absent when it names nothing. */
|
|
35
|
+
subject?: string;
|
|
36
|
+
/** The act removes something: the app draws its destructive look. */
|
|
37
|
+
destructive?: boolean;
|
|
38
|
+
};
|
|
39
|
+
/** Resolves to whether the person said yes. */
|
|
40
|
+
export type ViewsConfirmPort = (request: ViewsConfirmRequest) => Promise<boolean>;
|
|
28
41
|
export type ViewsPorts = {
|
|
29
42
|
toast: ViewsToastPort;
|
|
30
43
|
haptics: ViewsHapticsPort;
|
|
31
44
|
clipboard: ViewsClipboardPort;
|
|
32
45
|
viewPrefs: ViewsPrefsPort;
|
|
46
|
+
/** Asks before a destructive act (a row's Delete). Absent: the browser's own confirm with `message`. */
|
|
47
|
+
confirm?: ViewsConfirmPort;
|
|
48
|
+
};
|
|
49
|
+
/** The ports as the provider hands them on: `confirm` always there, the browser's where the app
|
|
50
|
+
* handed none. */
|
|
51
|
+
export type ViewsResolvedPorts = ViewsPorts & {
|
|
52
|
+
confirm: ViewsConfirmPort;
|
|
33
53
|
};
|
|
54
|
+
/** The browser's own dialog, read when it is asked, so a server render never reaches `window`. */
|
|
55
|
+
export declare const browserConfirm: ViewsConfirmPort;
|
|
34
56
|
/** Ports that do nothing: a server render, a test, an app without a device. */
|
|
35
57
|
export declare const NOOP_PORTS: ViewsPorts;
|
package/dist/provider/ports.js
CHANGED
package/dist/react.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export { ViewsProvider, useViews } from "./provider/ViewsProvider.js";
|
|
2
2
|
export type { ViewsContextValue, ViewsProviderProps } from "./provider/ViewsProvider.js";
|
|
3
|
-
export
|
|
3
|
+
export { DEFAULT_DESKTOP_QUERY } from "./provider/desktop.js";
|
|
4
|
+
export type { ViewsAlign, ViewsAnchor, ViewsButtonProps, ViewsCalendarProps, ViewsCheckboxProps, ViewsCloseReason, ViewsCollapseProps, ViewsCommandParts, ViewsComponents, ViewsInputProps, ViewsMenuItem, ViewsMenuProps, ViewsOpenChange, ViewsPopoverProps, ViewsResolvedComponents, ViewsSheetProps, ViewsSide, ViewsTooltipProps, } from "./provider/components.js";
|
|
4
5
|
export type { ViewsIconProps, ViewsIcons } from "./provider/icons.js";
|
|
5
6
|
export { NOOP_PORTS } from "./provider/ports.js";
|
|
6
|
-
export type { ViewsClipboardPort, ViewsHapticsPort, ViewsPorts, ViewsPrefsPort, ViewsToastPort, } from "./provider/ports.js";
|
|
7
|
+
export type { ViewsClipboardPort, ViewsConfirmPort, ViewsConfirmRequest, ViewsHapticsPort, ViewsPorts, ViewsPrefsPort, ViewsResolvedPorts, ViewsToastPort, } from "./provider/ports.js";
|
|
7
8
|
export { DEFAULT_VIEWS_ATOMS } from "./atoms/defaults.js";
|
|
8
9
|
export type { ViewsAtoms, ViewsCommandMenuProps, ViewsRowMenuItem, ViewsRowMenuProps, ViewsListProps, ViewsRelationLinkProps, ViewsLoadingProps, ViewsLoadMoreProps, ViewsPlatformMarkProps, ViewsRowContentProps, ViewsRowProps, ViewsStatusBadgeProps, ViewsStatusMarkerProps, ViewsTagProps, ViewsTickBoxProps, } from "./atoms/types.js";
|
|
9
10
|
export type { ComponentName, PortName, ViewsIconName, ViewsMessage, ViewsMessageResolver } from "./contract.js";
|
package/dist/react.js
CHANGED
|
@@ -6,6 +6,8 @@ type SelectCheckboxProps = {
|
|
|
6
6
|
onChange: (next: boolean, shift: boolean) => void;
|
|
7
7
|
"aria-label"?: string;
|
|
8
8
|
className?: string;
|
|
9
|
+
/** -1 takes it out of the Tab order, where a surface reaches it by its own keys (the grid's ←). */
|
|
10
|
+
tabIndex?: number;
|
|
9
11
|
};
|
|
10
12
|
/**
|
|
11
13
|
* Row selection checkbox: the app's checkbox (in the portal, its neutral selection skin).
|
|
@@ -13,5 +15,5 @@ type SelectCheckboxProps = {
|
|
|
13
15
|
* holds it) is hovered — not the whole row — and reads the shift key off the press that changed
|
|
14
16
|
* it, for range selection.
|
|
15
17
|
*/
|
|
16
|
-
export declare function SelectCheckbox({ checked, revealed, onChange, className, "aria-label": ariaLabel, }: SelectCheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function SelectCheckbox({ checked, revealed, onChange, className, tabIndex, "aria-label": ariaLabel, }: SelectCheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
17
19
|
export {};
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { cx } from "../internal/cx.js";
|
|
4
4
|
import { useViews } from "../provider/context.js";
|
|
5
|
-
export function SelectCheckbox({ checked, revealed, onChange, className, "aria-label": ariaLabel, }) {
|
|
5
|
+
export function SelectCheckbox({ checked, revealed, onChange, className, tabIndex, "aria-label": ariaLabel, }) {
|
|
6
6
|
const { Checkbox } = useViews().components;
|
|
7
|
-
return (_jsx(Checkbox, { checked: checked, "aria-label": ariaLabel, onCheckedChange: (next, details) => onChange(next, pressedWithShift(details?.event)), className: cx("opacity-0 group-hover/selzone:opacity-100", revealed && "opacity-100", checked && "opacity-100", className) }));
|
|
7
|
+
return (_jsx(Checkbox, { checked: checked, tabIndex: tabIndex, "aria-label": ariaLabel, onCheckedChange: (next, details) => onChange(next, pressedWithShift(details?.event)), className: cx("opacity-0 group-hover/selzone:opacity-100", revealed && "opacity-100", checked && "opacity-100", className) }));
|
|
8
8
|
}
|
|
9
9
|
function pressedWithShift(event) {
|
|
10
10
|
return event !== undefined && "shiftKey" in event && event.shiftKey === true;
|
|
@@ -3,8 +3,8 @@ import { useCallback, useEffect, useRef, } from "react";
|
|
|
3
3
|
export const ROW_CHECK_ATTR = "data-row-check";
|
|
4
4
|
const EDGE_PX = 40;
|
|
5
5
|
const MAX_STEP_PX = 24;
|
|
6
|
-
function verticalScrollerOf(
|
|
7
|
-
let node =
|
|
6
|
+
function verticalScrollerOf(from) {
|
|
7
|
+
let node = from;
|
|
8
8
|
while (node && node !== document.body) {
|
|
9
9
|
const oy = getComputedStyle(node).overflowY;
|
|
10
10
|
if ((oy === "auto" || oy === "scroll") && node.scrollHeight > node.clientHeight)
|
|
@@ -92,8 +92,8 @@ export function useCheckDragSelect({ enabled, rootRef, rowIds, rowIdOf = (attr)
|
|
|
92
92
|
raf = requestAnimationFrame(tick);
|
|
93
93
|
};
|
|
94
94
|
const maybeScroll = (d) => {
|
|
95
|
-
if (!scroller
|
|
96
|
-
scroller = verticalScrollerOf(
|
|
95
|
+
if (!scroller)
|
|
96
|
+
scroller = verticalScrollerOf(d.rowEl);
|
|
97
97
|
if (!scroller || raf != null)
|
|
98
98
|
return;
|
|
99
99
|
if (edgeStep(d.lastY, scroller) !== 0)
|
|
@@ -139,7 +139,7 @@ export function useCheckDragSelect({ enabled, rootRef, rowIds, rowIdOf = (attr)
|
|
|
139
139
|
return false;
|
|
140
140
|
const rowEl = target.closest("[data-row-id]");
|
|
141
141
|
const attr = rowEl?.getAttribute("data-row-id");
|
|
142
|
-
if (!attr)
|
|
142
|
+
if (!rowEl || !attr)
|
|
143
143
|
return false;
|
|
144
144
|
const rowId = rowIdOfRef.current(attr);
|
|
145
145
|
draggedRef.current = false;
|
|
@@ -149,6 +149,7 @@ export function useCheckDragSelect({ enabled, rootRef, rowIds, rowIdOf = (attr)
|
|
|
149
149
|
lastX: e.clientX,
|
|
150
150
|
lastY: e.clientY,
|
|
151
151
|
rowId,
|
|
152
|
+
rowEl,
|
|
152
153
|
value: !isSelectedRef.current(rowId),
|
|
153
154
|
active: false,
|
|
154
155
|
original: new Map(),
|