@lowdefy/blocks-table 0.0.0-experimental-20260929110023
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/LICENSE +201 -0
- package/README.md +12 -0
- package/dist/blocks/Table/Table.js +25 -0
- package/dist/blocks/Table/Table.lazy.js +33 -0
- package/dist/blocks/Table/TableFallback.js +35 -0
- package/dist/blocks/Table/e2e.js +47 -0
- package/dist/blocks/Table/gallery.yaml +836 -0
- package/dist/blocks/Table/meta.js +964 -0
- package/dist/blocks/Table/tests/Table.e2e.yaml +434 -0
- package/dist/blocks/Table/tests/TableFeatures.e2e.yaml +291 -0
- package/dist/blocks/Table/tests/TableLinkTarget.e2e.yaml +25 -0
- package/dist/blocks/Table/tests/TableParity.e2e.yaml +101 -0
- package/dist/blocks/Table/tests/bulk.e2e.yaml +271 -0
- package/dist/blocks/Table/tests/deals.yaml +30 -0
- package/dist/blocks/Table/tests/deals_columns.yaml +37 -0
- package/dist/blocks/Table/tests/editing.e2e.yaml +501 -0
- package/dist/blocks/Table/tests/expandable.e2e.yaml +87 -0
- package/dist/blocks/Table/tests/filtering.e2e.yaml +251 -0
- package/dist/blocks/Table/tests/grouping.e2e.yaml +272 -0
- package/dist/blocks/Table/tests/grouping_deals.yaml +24 -0
- package/dist/blocks/Table/tests/grouping_deals_columns.yaml +32 -0
- package/dist/blocks/Table/tests/headerMenu.e2e.yaml +134 -0
- package/dist/blocks/Table/tests/parity_properties.yaml +144 -0
- package/dist/blocks/Table/tests/people.yaml +39 -0
- package/dist/blocks/Table/tests/people_columns.yaml +22 -0
- package/dist/blocks/Table/tests/polish.e2e.yaml +372 -0
- package/dist/blocks/Table/tests/server-mongodb.e2e.yaml +169 -0
- package/dist/blocks/Table/tests/server.e2e.yaml +267 -0
- package/dist/blocks/Table/tests/toolbar.e2e.yaml +140 -0
- package/dist/blocks/Table/tests/tree.e2e.yaml +245 -0
- package/dist/blocks/Table/tests/views.e2e.yaml +235 -0
- package/dist/blocks/TableInput/TableInput.js +24 -0
- package/dist/blocks/TableInput/TableInput.lazy.js +17 -0
- package/dist/blocks/TableInput/TableInputRoot.js +65 -0
- package/dist/blocks/TableInput/e2e.js +16 -0
- package/dist/blocks/TableInput/gallery.yaml +153 -0
- package/dist/blocks/TableInput/meta.js +93 -0
- package/dist/blocks/TableInput/tests/TableInput.e2e.yaml +272 -0
- package/dist/blocks.js +16 -0
- package/dist/core/Body.js +112 -0
- package/dist/core/Cell.js +86 -0
- package/dist/core/Chevron.js +32 -0
- package/dist/core/EmptyState.js +32 -0
- package/dist/core/Grid.js +219 -0
- package/dist/core/GroupHeaderRow.js +81 -0
- package/dist/core/HeaderCell.js +58 -0
- package/dist/core/HeaderRow.js +76 -0
- package/dist/core/HeaderTitle.js +49 -0
- package/dist/core/LazyCell.js +71 -0
- package/dist/core/LoadingRows.js +38 -0
- package/dist/core/RenderProbeContext.js +19 -0
- package/dist/core/Row.js +98 -0
- package/dist/core/SkeletonRow.js +42 -0
- package/dist/core/SummaryRow.js +86 -0
- package/dist/core/TableRoot.js +195 -0
- package/dist/core/aggregateShortLabels.js +25 -0
- package/dist/core/applyLayoutVars.js +22 -0
- package/dist/core/buildGroupSegments.js +36 -0
- package/dist/core/collectBodyOverlays.js +20 -0
- package/dist/core/collectCellLeads.js +21 -0
- package/dist/core/collectClaimedViewKeys.js +26 -0
- package/dist/core/collectGridHandlers.js +29 -0
- package/dist/core/collectHeaderParts.js +20 -0
- package/dist/core/collectRowRenderers.js +21 -0
- package/dist/core/collectSliceDefinitions.js +29 -0
- package/dist/core/computeLayout.js +133 -0
- package/dist/core/createAccessor.js +39 -0
- package/dist/core/createApi.js +86 -0
- package/dist/core/createCellActivity.js +47 -0
- package/dist/core/createColumnDefs.js +42 -0
- package/dist/core/createFeatureActions.js +24 -0
- package/dist/core/createFeatureSet.js +39 -0
- package/dist/core/createInitialState.js +63 -0
- package/dist/core/createKeyIndex.js +26 -0
- package/dist/core/createMethodStubs.js +30 -0
- package/dist/core/createSliceHandlers.js +26 -0
- package/dist/core/createStableCoreRowModel.js +91 -0
- package/dist/core/createTanstackFeatures.js +24 -0
- package/dist/core/createTextMeasure.js +106 -0
- package/dist/core/densityHeights.js +20 -0
- package/dist/core/deriveValue.js +53 -0
- package/dist/core/dispatchGridEvent.js +21 -0
- package/dist/core/distributeFlex.js +28 -0
- package/dist/core/getCellFit.js +34 -0
- package/dist/core/getHeaderCellProps.js +21 -0
- package/dist/core/getHeaderLevels.js +50 -0
- package/dist/core/getRecordCount.js +23 -0
- package/dist/core/getSummaryLabel.js +35 -0
- package/dist/core/getValueSignature.js +26 -0
- package/dist/core/isDataItem.js +21 -0
- package/dist/core/isDefaultViewColumns.js +36 -0
- package/dist/core/isRowEqual.js +40 -0
- package/dist/core/isSameSignature.js +19 -0
- package/dist/core/lazyCellTypes.js +33 -0
- package/dist/core/lazyComponent.js +30 -0
- package/dist/core/loadOptionalFeature.js +35 -0
- package/dist/core/normalizeViewColumn.js +29 -0
- package/dist/core/pickViewPart.js +23 -0
- package/dist/core/renderRegion.js +21 -0
- package/dist/core/resolveMountValue.js +31 -0
- package/dist/core/resolveViewColumns.js +65 -0
- package/dist/core/someColumnConfig.js +30 -0
- package/dist/core/stabilizeData.js +90 -0
- package/dist/core/table.css +557 -0
- package/dist/core/useFeatureData.js +35 -0
- package/dist/core/useFeatureFragments.js +55 -0
- package/dist/core/useFeatureItems.js +78 -0
- package/dist/core/useFeatureMethods.js +29 -0
- package/dist/core/useFeatureRows.js +36 -0
- package/dist/core/useFeatureSet.js +54 -0
- package/dist/core/useForeignKeys.js +38 -0
- package/dist/core/useGridFeatures.js +26 -0
- package/dist/core/useStableConfig.js +34 -0
- package/dist/core/useSummary.js +73 -0
- package/dist/core/useTableConfig.js +189 -0
- package/dist/core/useTableState.js +150 -0
- package/dist/core/useViewportSize.js +40 -0
- package/dist/e2e.js +16 -0
- package/dist/features/bulk/BulkBar.js +46 -0
- package/dist/features/bulk/bulk.css +57 -0
- package/dist/features/bulk/bulkFeature.js +28 -0
- package/dist/features/bulk/countSelection.js +27 -0
- package/dist/features/bulk/createSelectAllMatching.js +43 -0
- package/dist/features/bulk/useBulkBar.js +42 -0
- package/dist/features/clipboard/clipboardFeature.js +24 -0
- package/dist/features/clipboard/createPasteCells.js +61 -0
- package/dist/features/clipboard/getCopyText.js +57 -0
- package/dist/features/clipboard/handleCopyKeyDown.js +37 -0
- package/dist/features/clipboard/parseTsv.js +70 -0
- package/dist/features/clipboard/pasteFeature.js +26 -0
- package/dist/features/clipboard/planPaste.js +101 -0
- package/dist/features/clipboard/serializeTsv.js +25 -0
- package/dist/features/clipboard/usePasteListener.js +45 -0
- package/dist/features/columnManager/ColumnManager.js +253 -0
- package/dist/features/columnManager/ColumnManagerPopover.js +37 -0
- package/dist/features/columnManager/DragHandleIcon.js +39 -0
- package/dist/features/columnManager/LazyColumnManagerPopover.js +19 -0
- package/dist/features/columnManager/applyManagerRegions.js +43 -0
- package/dist/features/columnManager/boundaryIds.js +21 -0
- package/dist/features/columnManager/buildManagerSequence.js +38 -0
- package/dist/features/columnManager/columnManager.css +155 -0
- package/dist/features/columnManager/columnManagerFeature.js +37 -0
- package/dist/features/columnManager/createCloseColumnManager.js +21 -0
- package/dist/features/columnManager/createOpenColumnManager.js +21 -0
- package/dist/features/columnManager/createResetColumns.js +43 -0
- package/dist/features/columnManager/getColumnManagerMenuItems.js +26 -0
- package/dist/features/columnManager/getListRoom.js +31 -0
- package/dist/features/columnManager/getManagerEntries.js +31 -0
- package/dist/features/columnManager/moveSequenceEntry.js +25 -0
- package/dist/features/columnManager/sequenceToRegions.js +38 -0
- package/dist/features/columnManager/snapListHeight.js +35 -0
- package/dist/features/columnManager/updateScrollHints.js +23 -0
- package/dist/features/columnManager/useColumnManager.js +36 -0
- package/dist/features/density/densityFeature.js +39 -0
- package/dist/features/density/densityToValue.js +23 -0
- package/dist/features/density/getViewWrapColumn.js +53 -0
- package/dist/features/density/initDensity.js +27 -0
- package/dist/features/density/initWrap.js +23 -0
- package/dist/features/editing/AddRowButton.js +28 -0
- package/dist/features/editing/CellEditor.js +284 -0
- package/dist/features/editing/EditMarker.js +38 -0
- package/dist/features/editing/EditingLayer.js +148 -0
- package/dist/features/editing/RowControlsCell.js +89 -0
- package/dist/features/editing/RowControlsHeader.js +18 -0
- package/dist/features/editing/SelectedTag.js +33 -0
- package/dist/features/editing/addChangeRow.js +34 -0
- package/dist/features/editing/applyChangeUpdates.js +28 -0
- package/dist/features/editing/applyChanges.js +90 -0
- package/dist/features/editing/applyMoveOverlay.js +44 -0
- package/dist/features/editing/applyMoveToChanges.js +66 -0
- package/dist/features/editing/applyOverlay.js +41 -0
- package/dist/features/editing/coerceCellValue.js +187 -0
- package/dist/features/editing/collectRawColumns.js +38 -0
- package/dist/features/editing/computeEditTargets.js +108 -0
- package/dist/features/editing/computeRowMove.js +78 -0
- package/dist/features/editing/createAddRow.js +68 -0
- package/dist/features/editing/createCancelEdit.js +29 -0
- package/dist/features/editing/createCommitEdit.js +124 -0
- package/dist/features/editing/createDeleteRow.js +39 -0
- package/dist/features/editing/createEditSpecs.js +80 -0
- package/dist/features/editing/createEmptyChanges.js +23 -0
- package/dist/features/editing/createMoveRow.js +65 -0
- package/dist/features/editing/createNewRow.js +32 -0
- package/dist/features/editing/createResetChanges.js +29 -0
- package/dist/features/editing/createSaveCellEdit.js +113 -0
- package/dist/features/editing/createSaveRowMove.js +90 -0
- package/dist/features/editing/createStartEdit.js +57 -0
- package/dist/features/editing/createStepHistory.js +33 -0
- package/dist/features/editing/createUndoStack.js +67 -0
- package/dist/features/editing/createValueStore.js +34 -0
- package/dist/features/editing/createWriteCell.js +34 -0
- package/dist/features/editing/createWriteChanges.js +43 -0
- package/dist/features/editing/editing.css +223 -0
- package/dist/features/editing/editingFeature.js +66 -0
- package/dist/features/editing/findCellByKey.js +23 -0
- package/dist/features/editing/findInvalidCells.js +41 -0
- package/dist/features/editing/findNextEditableCell.js +54 -0
- package/dist/features/editing/focusCell.js +28 -0
- package/dist/features/editing/fromDateValue.js +29 -0
- package/dist/features/editing/fromEditorDraft.js +45 -0
- package/dist/features/editing/generateRowKey.js +25 -0
- package/dist/features/editing/getDataGap.js +28 -0
- package/dist/features/editing/getEditOptions.js +33 -0
- package/dist/features/editing/getEditorKind.js +36 -0
- package/dist/features/editing/getEventError.js +24 -0
- package/dist/features/editing/getKeyField.js +23 -0
- package/dist/features/editing/getReorderBlock.js +33 -0
- package/dist/features/editing/handleEditDoubleClick.js +34 -0
- package/dist/features/editing/handleEditKeyDown.js +123 -0
- package/dist/features/editing/handleRowControlsClick.js +29 -0
- package/dist/features/editing/handleRowDragPointerDown.js +95 -0
- package/dist/features/editing/isCellEditable.js +20 -0
- package/dist/features/editing/isPrintableKey.js +22 -0
- package/dist/features/editing/isSameTargets.js +19 -0
- package/dist/features/editing/matchOption.js +21 -0
- package/dist/features/editing/needsEditing.js +26 -0
- package/dist/features/editing/normalizeChanges.js +37 -0
- package/dist/features/editing/positionBetween.js +30 -0
- package/dist/features/editing/pruneOverlay.js +39 -0
- package/dist/features/editing/removeChangeRow.js +48 -0
- package/dist/features/editing/reorderByKeys.js +34 -0
- package/dist/features/editing/rowControlsColumn.js +33 -0
- package/dist/features/editing/setChangeField.js +72 -0
- package/dist/features/editing/setRowField.js +23 -0
- package/dist/features/editing/sortByPosition.js +31 -0
- package/dist/features/editing/toDateValue.js +38 -0
- package/dist/features/editing/toEditorDraft.js +56 -0
- package/dist/features/editing/toSelectOptions.js +39 -0
- package/dist/features/editing/useEditingData.js +199 -0
- package/dist/features/editing/useEditingFragments.js +77 -0
- package/dist/features/editing/useEditingGrid.js +25 -0
- package/dist/features/editing/validateCellValue.js +25 -0
- package/dist/features/editing/valuesEqual.js +31 -0
- package/dist/features/editing/warnMissingEvent.js +23 -0
- package/dist/features/events/createActivateRow.js +54 -0
- package/dist/features/events/eventsFeature.js +35 -0
- package/dist/features/events/getBodyTarget.js +27 -0
- package/dist/features/events/getRowIndex.js +24 -0
- package/dist/features/events/handleAuxClick.js +38 -0
- package/dist/features/events/handlePointerDown.js +22 -0
- package/dist/features/events/handleRowClick.js +57 -0
- package/dist/features/events/handleRowDoubleClick.js +45 -0
- package/dist/features/events/isTextDrag.js +30 -0
- package/dist/features/events/openRowLink.js +29 -0
- package/dist/features/expandable/DetailRow.js +57 -0
- package/dist/features/expandable/ExpandToggle.js +34 -0
- package/dist/features/expandable/expandable.css +40 -0
- package/dist/features/expandable/expandableFeature.js +34 -0
- package/dist/features/expandable/handleExpandClick.js +25 -0
- package/dist/features/expandable/needsExpandable.js +20 -0
- package/dist/features/expandable/normalizeExpandable.js +52 -0
- package/dist/features/expandable/useExpandableItems.js +101 -0
- package/dist/features/expansion/createToggleRowExpanded.js +52 -0
- package/dist/features/expansion/expansionFeature.js +31 -0
- package/dist/features/expansion/getExpandedIds.js +26 -0
- package/dist/features/expansion/initExpanded.js +22 -0
- package/dist/features/export/buildCsv.js +39 -0
- package/dist/features/export/createExportCsv.js +59 -0
- package/dist/features/export/exportFeature.js +25 -0
- package/dist/features/export/toCsvField.js +20 -0
- package/dist/features/filtering/ChoiceFilter.js +30 -0
- package/dist/features/filtering/CloseIcon.js +29 -0
- package/dist/features/filtering/ColumnFilter.js +192 -0
- package/dist/features/filtering/ColumnFilterPopover.js +38 -0
- package/dist/features/filtering/DateFilter.js +80 -0
- package/dist/features/filtering/DraftInput.js +37 -0
- package/dist/features/filtering/DraftInputNumber.js +36 -0
- package/dist/features/filtering/FilterBuilder.js +45 -0
- package/dist/features/filtering/FilterGroup.js +116 -0
- package/dist/features/filtering/FilterIcon.js +26 -0
- package/dist/features/filtering/FilterIndicator.js +40 -0
- package/dist/features/filtering/FilterLeaf.js +86 -0
- package/dist/features/filtering/LazyColumnFilterPopover.js +19 -0
- package/dist/features/filtering/LazyFilterBuilder.js +19 -0
- package/dist/features/filtering/NumberFilter.js +43 -0
- package/dist/features/filtering/OptionsFilter.js +72 -0
- package/dist/features/filtering/RelativeDateEditor.js +90 -0
- package/dist/features/filtering/TextFilter.js +51 -0
- package/dist/features/filtering/ValueEditor.js +210 -0
- package/dist/features/filtering/buildColumnFilter.js +95 -0
- package/dist/features/filtering/changeLeafOperator.js +46 -0
- package/dist/features/filtering/createApplyFiltering.js +78 -0
- package/dist/features/filtering/createClearFilters.js +24 -0
- package/dist/features/filtering/createCloseColumnFilter.js +28 -0
- package/dist/features/filtering/createConditionFilteredRowModel.js +40 -0
- package/dist/features/filtering/createDefaultLeaf.js +31 -0
- package/dist/features/filtering/createOpenColumnFilter.js +25 -0
- package/dist/features/filtering/createRowTest.js +32 -0
- package/dist/features/filtering/createSearchMatcher.js +35 -0
- package/dist/features/filtering/createSetFilter.js +27 -0
- package/dist/features/filtering/createSetSearch.js +29 -0
- package/dist/features/filtering/createUpdateColumnFilter.js +29 -0
- package/dist/features/filtering/defaultRelativeDate.js +20 -0
- package/dist/features/filtering/filterRowModel.js +66 -0
- package/dist/features/filtering/filtering.css +151 -0
- package/dist/features/filtering/filteringFeature.js +82 -0
- package/dist/features/filtering/filteringToValue.js +23 -0
- package/dist/features/filtering/formatFilterDate.js +24 -0
- package/dist/features/filtering/getColumnConditions.js +24 -0
- package/dist/features/filtering/getConditionKeys.js +31 -0
- package/dist/features/filtering/getDistinctOptions.js +52 -0
- package/dist/features/filtering/getFilterKind.js +37 -0
- package/dist/features/filtering/getFilterResultKey.js +26 -0
- package/dist/features/filtering/getFilterResults.js +53 -0
- package/dist/features/filtering/getFilteredKeys.js +31 -0
- package/dist/features/filtering/getFilteringHeaderProps.js +22 -0
- package/dist/features/filtering/getFilteringMenuItems.js +42 -0
- package/dist/features/filtering/getFilteringTableOptions.js +33 -0
- package/dist/features/filtering/getGroupOperator.js +23 -0
- package/dist/features/filtering/getOperatorLabel.js +50 -0
- package/dist/features/filtering/getPlainTitle.js +26 -0
- package/dist/features/filtering/getSearchColumns.js +23 -0
- package/dist/features/filtering/getSearchKey.js +19 -0
- package/dist/features/filtering/getSearchText.js +57 -0
- package/dist/features/filtering/getTopLevelConditions.js +25 -0
- package/dist/features/filtering/getValueShape.js +30 -0
- package/dist/features/filtering/handleFilterIndicatorClick.js +25 -0
- package/dist/features/filtering/initFilter.js +25 -0
- package/dist/features/filtering/initSearch.js +24 -0
- package/dist/features/filtering/isColumnCondition.js +22 -0
- package/dist/features/filtering/isCompleteLeaf.js +45 -0
- package/dist/features/filtering/isServerMode.js +21 -0
- package/dist/features/filtering/normalizeSearch.js +21 -0
- package/dist/features/filtering/parseColumnFilter.js +128 -0
- package/dist/features/filtering/parseFilterDate.js +24 -0
- package/dist/features/filtering/prepareFilterResult.js +63 -0
- package/dist/features/filtering/pruneCondition.js +35 -0
- package/dist/features/filtering/setColumnFilter.js +51 -0
- package/dist/features/filtering/textFilterOperators.js +26 -0
- package/dist/features/filtering/toRootGroup.js +34 -0
- package/dist/features/filtering/useDraft.js +65 -0
- package/dist/features/filtering/useFilteringState.js +32 -0
- package/dist/features/filtering/useSyncedState.js +45 -0
- package/dist/features/grouping/GroupCell.js +72 -0
- package/dist/features/grouping/GroupCheckbox.js +38 -0
- package/dist/features/grouping/GroupLabel.js +73 -0
- package/dist/features/grouping/GroupRow.js +103 -0
- package/dist/features/grouping/StickyGroupRow.js +136 -0
- package/dist/features/grouping/buildGroupTree.js +138 -0
- package/dist/features/grouping/buildStickyLevels.js +35 -0
- package/dist/features/grouping/countGroupSelection.js +26 -0
- package/dist/features/grouping/createAggregateColumns.js +38 -0
- package/dist/features/grouping/createCollapseAllGroups.js +26 -0
- package/dist/features/grouping/createExpandAllGroups.js +23 -0
- package/dist/features/grouping/createGroupLevels.js +46 -0
- package/dist/features/grouping/createSetCollapsedGroups.js +27 -0
- package/dist/features/grouping/createSetGroup.js +35 -0
- package/dist/features/grouping/createSetGroupKeys.js +27 -0
- package/dist/features/grouping/createToggleGroup.js +38 -0
- package/dist/features/grouping/createToggleGroupSelected.js +49 -0
- package/dist/features/grouping/findGroupIndices.js +25 -0
- package/dist/features/grouping/flattenGroups.js +58 -0
- package/dist/features/grouping/getGroupLabel.js +34 -0
- package/dist/features/grouping/getStickyGroups.js +60 -0
- package/dist/features/grouping/groupRowsFeature.js +57 -0
- package/dist/features/grouping/grouping.css +128 -0
- package/dist/features/grouping/groupingFeature.js +48 -0
- package/dist/features/grouping/groupingHeaderMenuItems.js +44 -0
- package/dist/features/grouping/groupingToValue.js +26 -0
- package/dist/features/grouping/handleGroupClick.js +51 -0
- package/dist/features/grouping/handleGroupKeyDown.js +60 -0
- package/dist/features/grouping/initAggregates.js +36 -0
- package/dist/features/grouping/initCollapsedGroups.js +29 -0
- package/dist/features/grouping/initGrouping.js +34 -0
- package/dist/features/grouping/needsGroupRows.js +23 -0
- package/dist/features/grouping/orderGroups.js +49 -0
- package/dist/features/grouping/resolveAggregates.js +29 -0
- package/dist/features/grouping/toGroupIdentity.js +24 -0
- package/dist/features/grouping/toGroupKeys.js +24 -0
- package/dist/features/grouping/useGrouping.js +91 -0
- package/dist/features/headerMenu/HeaderMenuDropdown.js +86 -0
- package/dist/features/headerMenu/HeaderMenuTrigger.js +44 -0
- package/dist/features/headerMenu/LazyHeaderMenuDropdown.js +19 -0
- package/dist/features/headerMenu/MenuIcon.js +38 -0
- package/dist/features/headerMenu/collectHeaderMenuItems.js +69 -0
- package/dist/features/headerMenu/createAutosizeColumn.js +35 -0
- package/dist/features/headerMenu/createCloseHeaderMenu.js +28 -0
- package/dist/features/headerMenu/createOpenHeaderMenu.js +30 -0
- package/dist/features/headerMenu/focusHeaderControl.js +31 -0
- package/dist/features/headerMenu/freezeColumns.js +31 -0
- package/dist/features/headerMenu/getChromeMenuItems.js +144 -0
- package/dist/features/headerMenu/getVisibleOrder.js +19 -0
- package/dist/features/headerMenu/handleHeaderButtonPointerDown.js +27 -0
- package/dist/features/headerMenu/handleHeaderMenuClick.js +26 -0
- package/dist/features/headerMenu/handleHeaderMenuKeyDown.js +28 -0
- package/dist/features/headerMenu/headerMenu.css +122 -0
- package/dist/features/headerMenu/headerMenuFeature.js +46 -0
- package/dist/features/headerMenu/measureColumnWidth.js +51 -0
- package/dist/features/headerMenu/pinColumn.js +27 -0
- package/dist/features/headerMenu/sectionOrder.js +25 -0
- package/dist/features/headerMenu/useHeaderMenuState.js +27 -0
- package/dist/features/index.js +149 -0
- package/dist/features/keyboard/findCellElement.js +21 -0
- package/dist/features/keyboard/getNextCell.js +74 -0
- package/dist/features/keyboard/handleGridFocus.js +31 -0
- package/dist/features/keyboard/handleGridKeyDown.js +72 -0
- package/dist/features/keyboard/isCellRendered.js +22 -0
- package/dist/features/keyboard/keyboardFeature.js +26 -0
- package/dist/features/keyboard/useKeyboard.js +84 -0
- package/dist/features/lazyCells/getBodyRowKey.js +19 -0
- package/dist/features/lazyCells/handlePointerLeave.js +21 -0
- package/dist/features/lazyCells/handlePointerOver.js +22 -0
- package/dist/features/lazyCells/handleRowBlur.js +22 -0
- package/dist/features/lazyCells/handleRowFocus.js +26 -0
- package/dist/features/lazyCells/lazyCellsFeature.js +33 -0
- package/dist/features/lazyCells/useFastScroll.js +57 -0
- package/dist/features/ordering/getColumnClientBounds.js +32 -0
- package/dist/features/ordering/handleReorderPointerDown.js +137 -0
- package/dist/features/ordering/initColumnOrder.js +18 -0
- package/dist/features/ordering/moveKeys.js +27 -0
- package/dist/features/ordering/orderingFeature.js +35 -0
- package/dist/features/pagination/TablePagination.js +31 -0
- package/dist/features/pagination/initPageSize.js +28 -0
- package/dist/features/pagination/paginationFeature.js +36 -0
- package/dist/features/pagination/paginationToValue.js +24 -0
- package/dist/features/pagination/usePager.js +32 -0
- package/dist/features/pagination/usePagination.js +58 -0
- package/dist/features/pinning/initColumnPinning.js +21 -0
- package/dist/features/pinning/pinningFeature.js +33 -0
- package/dist/features/pinning/pinningToViewColumn.js +24 -0
- package/dist/features/queue/createAfterRowAction.js +40 -0
- package/dist/features/queue/findNextRowId.js +26 -0
- package/dist/features/queue/findRowAction.js +77 -0
- package/dist/features/queue/handleRowActionKey.js +44 -0
- package/dist/features/queue/queueFeature.js +27 -0
- package/dist/features/selection/SelectAllHeader.js +40 -0
- package/dist/features/selection/SelectCell.js +30 -0
- package/dist/features/selection/countSelectedRows.js +31 -0
- package/dist/features/selection/createClearSelection.js +29 -0
- package/dist/features/selection/createToggleAllRowsSelected.js +60 -0
- package/dist/features/selection/createToggleRowSelected.js +86 -0
- package/dist/features/selection/getRawRowKey.js +23 -0
- package/dist/features/selection/getSelectAllExcept.js +23 -0
- package/dist/features/selection/getSelectAllState.js +42 -0
- package/dist/features/selection/handleSelectionClick.js +30 -0
- package/dist/features/selection/initRowSelection.js +36 -0
- package/dist/features/selection/initSelectionMode.js +19 -0
- package/dist/features/selection/initSelectionView.js +35 -0
- package/dist/features/selection/isSelectAllValue.js +19 -0
- package/dist/features/selection/isSelectionViewCurrent.js +22 -0
- package/dist/features/selection/notifySelectionChange.js +32 -0
- package/dist/features/selection/pruneRowSelection.js +26 -0
- package/dist/features/selection/selectionFeature.js +69 -0
- package/dist/features/selection/selectionToValue.js +48 -0
- package/dist/features/selection/useSelection.js +77 -0
- package/dist/features/serverData/buildServerItems.js +109 -0
- package/dist/features/serverData/createBlockCache.js +205 -0
- package/dist/features/serverData/createRefresh.js +23 -0
- package/dist/features/serverData/createServerStore.js +360 -0
- package/dist/features/serverData/getBlockRange.js +29 -0
- package/dist/features/serverData/getListKey.js +20 -0
- package/dist/features/serverData/getNeededBlocks.js +45 -0
- package/dist/features/serverData/needsServerData.js +20 -0
- package/dist/features/serverData/normalizeServerData.js +41 -0
- package/dist/features/serverData/pickServerView.js +43 -0
- package/dist/features/serverData/readFetchResult.js +36 -0
- package/dist/features/serverData/serverData.css +21 -0
- package/dist/features/serverData/serverDataFeature.js +38 -0
- package/dist/features/serverData/serverRangeFeature.js +22 -0
- package/dist/features/serverData/useServerData.js +48 -0
- package/dist/features/serverData/useServerItems.js +35 -0
- package/dist/features/serverData/useServerRange.js +35 -0
- package/dist/features/serverData/useServerView.js +70 -0
- package/dist/features/sizing/ResizeHandle.js +24 -0
- package/dist/features/sizing/handleResizePointerDown.js +66 -0
- package/dist/features/sizing/initColumnSizing.js +23 -0
- package/dist/features/sizing/sizingFeature.js +39 -0
- package/dist/features/sizing/sizingToViewColumn.js +24 -0
- package/dist/features/sorting/SortIndicator.js +37 -0
- package/dist/features/sorting/buildSortKeys.js +52 -0
- package/dist/features/sorting/collectSortKeys.js +30 -0
- package/dist/features/sorting/createClearSort.js +21 -0
- package/dist/features/sorting/createIndexSortedRowModel.js +33 -0
- package/dist/features/sorting/createSetSort.js +43 -0
- package/dist/features/sorting/createSortKeyCollector.js +59 -0
- package/dist/features/sorting/createToggleSort.js +42 -0
- package/dist/features/sorting/getCachedSortKeys.js +19 -0
- package/dist/features/sorting/getSortHeaderProps.js +25 -0
- package/dist/features/sorting/getSortKeys.js +38 -0
- package/dist/features/sorting/handleSortClick.js +27 -0
- package/dist/features/sorting/initSorting.js +37 -0
- package/dist/features/sorting/isNumericSortType.js +21 -0
- package/dist/features/sorting/prepareSortKeys.js +92 -0
- package/dist/features/sorting/rankSortKeys.js +33 -0
- package/dist/features/sorting/setCachedSortKeys.js +24 -0
- package/dist/features/sorting/sortInSlices.js +69 -0
- package/dist/features/sorting/sortIndices.js +40 -0
- package/dist/features/sorting/sortKeysCache.js +19 -0
- package/dist/features/sorting/sortRowModel.js +84 -0
- package/dist/features/sorting/sortingFeature.js +62 -0
- package/dist/features/sorting/sortingToValue.js +27 -0
- package/dist/features/sorting/toFloatSortKeys.js +24 -0
- package/dist/features/sorting/yieldToMain.js +27 -0
- package/dist/features/toolbar/ColumnTitle.js +28 -0
- package/dist/features/toolbar/DensityToggle.js +53 -0
- package/dist/features/toolbar/FilterButton.js +56 -0
- package/dist/features/toolbar/GroupButton.js +51 -0
- package/dist/features/toolbar/OptionsQuickFilter.js +72 -0
- package/dist/features/toolbar/QuickFilter.js +46 -0
- package/dist/features/toolbar/RecordCount.js +27 -0
- package/dist/features/toolbar/SaveViewAs.js +66 -0
- package/dist/features/toolbar/SortButton.js +94 -0
- package/dist/features/toolbar/Toolbar.js +88 -0
- package/dist/features/toolbar/ToolbarCount.js +25 -0
- package/dist/features/toolbar/ToolbarIcon.js +28 -0
- package/dist/features/toolbar/ToolbarList.js +100 -0
- package/dist/features/toolbar/ToolbarSearch.js +63 -0
- package/dist/features/toolbar/ViewActions.js +41 -0
- package/dist/features/toolbar/ViewTabLabel.js +39 -0
- package/dist/features/toolbar/ViewTabMenu.js +48 -0
- package/dist/features/toolbar/ViewTabs.js +44 -0
- package/dist/features/toolbar/countConditions.js +25 -0
- package/dist/features/toolbar/formatRecordCount.js +19 -0
- package/dist/features/toolbar/getQuickFilterValues.js +25 -0
- package/dist/features/toolbar/getRootConditions.js +25 -0
- package/dist/features/toolbar/handleToolbarKeyDown.js +28 -0
- package/dist/features/toolbar/isDefaultSorting.js +26 -0
- package/dist/features/toolbar/isQuickFilterLeaf.js +20 -0
- package/dist/features/toolbar/moveItem.js +25 -0
- package/dist/features/toolbar/needsToolbar.js +21 -0
- package/dist/features/toolbar/normalizeToolbar.js +61 -0
- package/dist/features/toolbar/setQuickFilterValues.js +35 -0
- package/dist/features/toolbar/toolbar.css +185 -0
- package/dist/features/toolbar/toolbarFeature.js +27 -0
- package/dist/features/toolbar/useToolbar.js +41 -0
- package/dist/features/toolbar/validateQuickFilters.js +28 -0
- package/dist/features/transactions/applyTransactionToRows.js +56 -0
- package/dist/features/transactions/createApplyTransaction.js +26 -0
- package/dist/features/transactions/normalizeTransaction.js +49 -0
- package/dist/features/transactions/transactionsFeature.js +24 -0
- package/dist/features/transactions/useTransactionData.js +44 -0
- package/dist/features/tree/TreeToggle.js +39 -0
- package/dist/features/tree/buildTreeIndex.js +60 -0
- package/dist/features/tree/buildTreeItems.js +96 -0
- package/dist/features/tree/flattenTreeData.js +45 -0
- package/dist/features/tree/getDescendantIds.js +28 -0
- package/dist/features/tree/handleTreeClick.js +25 -0
- package/dist/features/tree/handleTreeKeyDown.js +58 -0
- package/dist/features/tree/needsTree.js +20 -0
- package/dist/features/tree/normalizeTree.js +41 -0
- package/dist/features/tree/rowNeedsChildren.js +25 -0
- package/dist/features/tree/tree.css +55 -0
- package/dist/features/tree/treeFeature.js +35 -0
- package/dist/features/tree/useTreeData.js +33 -0
- package/dist/features/tree/useTreeItems.js +61 -0
- package/dist/features/views/compactView.js +30 -0
- package/dist/features/views/createViewsApi.js +74 -0
- package/dist/features/views/decodeViewParam.js +30 -0
- package/dist/features/views/encodeViewParam.js +25 -0
- package/dist/features/views/findActiveView.js +23 -0
- package/dist/features/views/getStorageKey.js +20 -0
- package/dist/features/views/getViewKey.js +27 -0
- package/dist/features/views/getViewSliceDeps.js +27 -0
- package/dist/features/views/isViewDirty.js +34 -0
- package/dist/features/views/mountViewValue.js +36 -0
- package/dist/features/views/needsViews.js +23 -0
- package/dist/features/views/normalizePersist.js +27 -0
- package/dist/features/views/normalizeViews.js +41 -0
- package/dist/features/views/notifyViewSelect.js +29 -0
- package/dist/features/views/readMountPayload.js +31 -0
- package/dist/features/views/readPersistedView.js +45 -0
- package/dist/features/views/sanitizePersistedView.js +49 -0
- package/dist/features/views/stableStringify.js +27 -0
- package/dist/features/views/useViews.js +136 -0
- package/dist/features/views/viewKeys.js +28 -0
- package/dist/features/views/viewsFeature.js +26 -0
- package/dist/features/views/writePersistedView.js +42 -0
- package/dist/features/virtualization/computeRowOffsets.js +29 -0
- package/dist/features/virtualization/computeWindow.js +92 -0
- package/dist/features/virtualization/createScrollToRow.js +36 -0
- package/dist/features/virtualization/firstIndexAbove.js +30 -0
- package/dist/features/virtualization/getMeasureKey.js +23 -0
- package/dist/features/virtualization/isMeasuredColumn.js +20 -0
- package/dist/features/virtualization/isSameRange.js +18 -0
- package/dist/features/virtualization/positionedRowsFeature.js +22 -0
- package/dist/features/virtualization/scrollToCell.js +49 -0
- package/dist/features/virtualization/shiftRowOffsets.js +35 -0
- package/dist/features/virtualization/usePositionedRows.js +37 -0
- package/dist/features/virtualization/useRowOffsets.js +123 -0
- package/dist/features/virtualization/useScrollWindow.js +114 -0
- package/dist/features/virtualization/useTanstackRowWindow.js +43 -0
- package/dist/features/virtualization/useVirtualization.js +64 -0
- package/dist/features/virtualization/virtualizationFeature.js +24 -0
- package/dist/features/virtualization/writeScrollEdges.js +33 -0
- package/dist/features/visibility/initColumnVisibility.js +22 -0
- package/dist/features/visibility/visibilityFeature.js +31 -0
- package/dist/features/visibility/visibilityToViewColumn.js +20 -0
- package/dist/metas.js +16 -0
- package/dist/types.js +17 -0
- package/package.json +91 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ // Components rendered at the start of a row's first data cell, before its content (the tree
|
|
16
|
+
// indent and chevron, the expandable-row chevron), from the features' `cellLead`. Each receives
|
|
17
|
+
// `{ api, item }` for wrapped row items and returns null when it has nothing to show.
|
|
18
|
+
function collectCellLeads(features) {
|
|
19
|
+
return features.map((feature)=>feature.cellLead).filter(Boolean);
|
|
20
|
+
}
|
|
21
|
+
export default collectCellLeads;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ // View keys with an owner. `columns` belongs to the core; the rest of the view (filter, search,
|
|
16
|
+
// ...) passes through unchanged until a feature module claims it.
|
|
17
|
+
function collectClaimedViewKeys(features) {
|
|
18
|
+
const keys = new Set([
|
|
19
|
+
'columns'
|
|
20
|
+
]);
|
|
21
|
+
features.forEach((feature)=>{
|
|
22
|
+
(feature.viewKeys ?? []).forEach((key)=>keys.add(key));
|
|
23
|
+
});
|
|
24
|
+
return keys;
|
|
25
|
+
}
|
|
26
|
+
export default collectClaimedViewKeys;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ // Every delegated handler, by DOM event type, in feature order. The grid root carries one React
|
|
16
|
+
// listener per event type (D5); a handler that returns true stops the chain.
|
|
17
|
+
function collectGridHandlers(features) {
|
|
18
|
+
const handlers = {};
|
|
19
|
+
features.forEach((feature)=>{
|
|
20
|
+
Object.entries(feature.gridHandlers ?? {}).forEach(([eventType, handler])=>{
|
|
21
|
+
handlers[eventType] = [
|
|
22
|
+
...handlers[eventType] ?? [],
|
|
23
|
+
handler
|
|
24
|
+
];
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
return handlers;
|
|
28
|
+
}
|
|
29
|
+
export default collectGridHandlers;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ // Components rendered inside every data header cell (filter indicator, menu button, sort
|
|
16
|
+
// indicator, resize handle), in feature order. Each receives `{ api, col, focused, state }`.
|
|
17
|
+
function collectHeaderParts(features) {
|
|
18
|
+
return features.flatMap((feature)=>feature.headerParts ?? []);
|
|
19
|
+
}
|
|
20
|
+
export default collectHeaderParts;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ // Components for display items that are not data rows, by item kind (grouping and server groups:
|
|
16
|
+
// `group`; expandable: `detail`), from the features' `rowRenderers`. Data rows (TanStack rows and
|
|
17
|
+
// wrapped `kind: 'row'` items) render with the core Row.
|
|
18
|
+
function collectRowRenderers(features) {
|
|
19
|
+
return Object.assign({}, ...features.map((feature)=>feature.rowRenderers ?? {}));
|
|
20
|
+
}
|
|
21
|
+
export default collectRowRenderers;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ // Every state slice the features declare, by name. Slices are React-owned (controlled TanStack
|
|
16
|
+
// state), which is what lets a slice update run inside a transition.
|
|
17
|
+
function collectSliceDefinitions(features) {
|
|
18
|
+
const definitions = {};
|
|
19
|
+
features.forEach((feature)=>{
|
|
20
|
+
Object.entries(feature.slices ?? {}).forEach(([name, definition])=>{
|
|
21
|
+
definitions[name] = {
|
|
22
|
+
...definition,
|
|
23
|
+
feature: feature.name
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
return definitions;
|
|
28
|
+
}
|
|
29
|
+
export default collectSliceDefinitions;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ import distributeFlex from './distributeFlex.js';
|
|
16
|
+
import getViewWrapColumn from '../features/density/getViewWrapColumn.js';
|
|
17
|
+
function fromTanstackColumn({ column, region, widths, wrap }) {
|
|
18
|
+
const { meta } = column.columnDef;
|
|
19
|
+
return {
|
|
20
|
+
key: column.id,
|
|
21
|
+
region,
|
|
22
|
+
column: wrap ? getViewWrapColumn(meta.column) : meta.column,
|
|
23
|
+
accessor: meta.accessor,
|
|
24
|
+
width: widths?.[column.id] ?? column.getSize(),
|
|
25
|
+
minWidth: column.columnDef.minSize,
|
|
26
|
+
maxWidth: column.columnDef.maxSize
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
// The column geometry every row shares: visual order (start-pinned, centre, end-pinned), widths,
|
|
30
|
+
// sticky offsets, centre prefix offsets for column virtualisation, and the CSS variables that
|
|
31
|
+
// carry widths and offsets. `widths` overrides column sizes (a resize drag in progress); `wrap` is
|
|
32
|
+
// the view's wrap.
|
|
33
|
+
function computeLayout({ table, leadingColumns, viewportWidth, widths, wrap = false }) {
|
|
34
|
+
const start = [
|
|
35
|
+
...leadingColumns.map((leading)=>({
|
|
36
|
+
...leading,
|
|
37
|
+
region: 'start',
|
|
38
|
+
minWidth: leading.width,
|
|
39
|
+
maxWidth: leading.width
|
|
40
|
+
})),
|
|
41
|
+
...table.getStartVisibleLeafColumns().map((column)=>fromTanstackColumn({
|
|
42
|
+
column,
|
|
43
|
+
region: 'start',
|
|
44
|
+
widths,
|
|
45
|
+
wrap
|
|
46
|
+
}))
|
|
47
|
+
];
|
|
48
|
+
const center = table.getCenterVisibleLeafColumns().map((column)=>fromTanstackColumn({
|
|
49
|
+
column,
|
|
50
|
+
region: 'center',
|
|
51
|
+
widths,
|
|
52
|
+
wrap
|
|
53
|
+
}));
|
|
54
|
+
const end = table.getEndVisibleLeafColumns().map((column)=>fromTanstackColumn({
|
|
55
|
+
column,
|
|
56
|
+
region: 'end',
|
|
57
|
+
widths,
|
|
58
|
+
wrap
|
|
59
|
+
}));
|
|
60
|
+
const cols = [
|
|
61
|
+
...start,
|
|
62
|
+
...center,
|
|
63
|
+
...end
|
|
64
|
+
];
|
|
65
|
+
const sizing = {
|
|
66
|
+
...table.atoms.columnSizing.get(),
|
|
67
|
+
...widths
|
|
68
|
+
};
|
|
69
|
+
distributeFlex({
|
|
70
|
+
cols,
|
|
71
|
+
viewportWidth,
|
|
72
|
+
sizing
|
|
73
|
+
});
|
|
74
|
+
const vars = {};
|
|
75
|
+
const byKey = new Map();
|
|
76
|
+
let startWidth = 0;
|
|
77
|
+
start.forEach((col)=>{
|
|
78
|
+
col.left = startWidth;
|
|
79
|
+
startWidth += col.width;
|
|
80
|
+
});
|
|
81
|
+
let endWidth = 0;
|
|
82
|
+
for(let i = end.length - 1; i >= 0; i--){
|
|
83
|
+
end[i].right = endWidth;
|
|
84
|
+
endWidth += end[i].width;
|
|
85
|
+
}
|
|
86
|
+
const centerStarts = new Float64Array(center.length);
|
|
87
|
+
const centerEnds = new Float64Array(center.length);
|
|
88
|
+
let centerWidth = 0;
|
|
89
|
+
center.forEach((col, i)=>{
|
|
90
|
+
col.centerStart = centerWidth;
|
|
91
|
+
centerStarts[i] = centerWidth;
|
|
92
|
+
centerWidth += col.width;
|
|
93
|
+
centerEnds[i] = centerWidth;
|
|
94
|
+
});
|
|
95
|
+
cols.forEach((col, index)=>{
|
|
96
|
+
col.index = index;
|
|
97
|
+
col.ariaIndex = index + 1;
|
|
98
|
+
vars[`--lf-w${index}`] = `${col.width}px`;
|
|
99
|
+
const style = {
|
|
100
|
+
width: `var(--lf-w${index})`
|
|
101
|
+
};
|
|
102
|
+
if (col.region === 'start') {
|
|
103
|
+
vars[`--lf-l${index}`] = `${col.left}px`;
|
|
104
|
+
style.left = `var(--lf-l${index})`;
|
|
105
|
+
}
|
|
106
|
+
if (col.region === 'end') {
|
|
107
|
+
vars[`--lf-r${index}`] = `${col.right}px`;
|
|
108
|
+
style.right = `var(--lf-r${index})`;
|
|
109
|
+
}
|
|
110
|
+
col.style = style;
|
|
111
|
+
byKey.set(col.key, col);
|
|
112
|
+
});
|
|
113
|
+
if (start.length) start[start.length - 1].pinnedEdge = true;
|
|
114
|
+
if (end.length) end[0].pinnedEdge = true;
|
|
115
|
+
const totalWidth = startWidth + centerWidth + endWidth;
|
|
116
|
+
vars['--lf-total'] = `${totalWidth}px`;
|
|
117
|
+
vars['--lf-center-w'] = `${centerWidth}px`;
|
|
118
|
+
return {
|
|
119
|
+
byKey,
|
|
120
|
+
center,
|
|
121
|
+
centerEnds,
|
|
122
|
+
centerStarts,
|
|
123
|
+
centerWidth,
|
|
124
|
+
cols,
|
|
125
|
+
end,
|
|
126
|
+
endWidth,
|
|
127
|
+
start,
|
|
128
|
+
startWidth,
|
|
129
|
+
totalWidth,
|
|
130
|
+
vars
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
export default computeLayout;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ import { type } from '@lowdefy/helpers';
|
|
16
|
+
// Compiled once per column: cells and sort keys read values through this instead of `get`,
|
|
17
|
+
// which would split the path on every call.
|
|
18
|
+
function createAccessor(field) {
|
|
19
|
+
if (!type.isString(field)) {
|
|
20
|
+
return function accessUndefined() {
|
|
21
|
+
return undefined;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
if (!field.includes('.')) {
|
|
25
|
+
return function accessField(row) {
|
|
26
|
+
return row?.[field];
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const parts = field.split('.');
|
|
30
|
+
return function accessPath(row) {
|
|
31
|
+
let current = row;
|
|
32
|
+
for(let i = 0; i < parts.length; i++){
|
|
33
|
+
if (type.isNone(current)) return undefined;
|
|
34
|
+
current = current[parts[i]];
|
|
35
|
+
}
|
|
36
|
+
return current;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export default createAccessor;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ import createCellActivity from './createCellActivity.js';
|
|
16
|
+
import createTextMeasure from './createTextMeasure.js';
|
|
17
|
+
import createInitialState from './createInitialState.js';
|
|
18
|
+
import deriveValue from './deriveValue.js';
|
|
19
|
+
// The table's per-instance API object: one stable mutable object that the core refreshes on every
|
|
20
|
+
// render (table, config, state, layout, ...), so delegated event handlers, actions and methods
|
|
21
|
+
// always read current values without being recreated.
|
|
22
|
+
function createApi({ features }) {
|
|
23
|
+
const api = {
|
|
24
|
+
actions: {},
|
|
25
|
+
cellActivity: createCellActivity(),
|
|
26
|
+
features,
|
|
27
|
+
foreignKeys: new Map(),
|
|
28
|
+
rootRef: {
|
|
29
|
+
current: null
|
|
30
|
+
},
|
|
31
|
+
scrollerRef: {
|
|
32
|
+
current: null
|
|
33
|
+
},
|
|
34
|
+
// Row ids (to raw keys) left out of an `{ all: true, except }` selection, kept while their
|
|
35
|
+
// rows are not loaded (server mode).
|
|
36
|
+
selectionExcept: new Map(),
|
|
37
|
+
suppressedClick: false,
|
|
38
|
+
textMeasure: createTextMeasure()
|
|
39
|
+
};
|
|
40
|
+
// Cell renderers build the full event payload (row, rowKey, ...); one stable function keeps
|
|
41
|
+
// the memoised cells from re-rendering when the block's methods object changes. Row button and
|
|
42
|
+
// menu events also go to afterRowAction (`keyboard.next`).
|
|
43
|
+
api.onCellEvent = ({ name, event })=>{
|
|
44
|
+
const result = api.methods.triggerEvent({
|
|
45
|
+
name,
|
|
46
|
+
event
|
|
47
|
+
});
|
|
48
|
+
if (event.button || event.item) {
|
|
49
|
+
api.actions.afterRowAction({
|
|
50
|
+
id: api.config.getId(event.row),
|
|
51
|
+
result
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
return result;
|
|
55
|
+
};
|
|
56
|
+
api.contains = (element)=>Boolean(api.rootRef.current?.contains(element));
|
|
57
|
+
// The block value of the current state, and of any value once the fallback rules are applied
|
|
58
|
+
// (a saved view resolves to the view the table would write after loading it).
|
|
59
|
+
api.getValue = ()=>deriveValue({
|
|
60
|
+
state: api.state,
|
|
61
|
+
api
|
|
62
|
+
});
|
|
63
|
+
api.resolveValue = (value)=>deriveValue({
|
|
64
|
+
state: createInitialState({
|
|
65
|
+
value,
|
|
66
|
+
config: api.config,
|
|
67
|
+
features: api.features,
|
|
68
|
+
rows: []
|
|
69
|
+
}),
|
|
70
|
+
api
|
|
71
|
+
});
|
|
72
|
+
api.suppressClick = ()=>{
|
|
73
|
+
api.suppressedClick = true;
|
|
74
|
+
// A drag that ends outside the header produces no click; do not swallow the next one.
|
|
75
|
+
setTimeout(()=>{
|
|
76
|
+
api.suppressedClick = false;
|
|
77
|
+
}, 0);
|
|
78
|
+
};
|
|
79
|
+
api.takeSuppressedClick = ()=>{
|
|
80
|
+
const suppressed = api.suppressedClick;
|
|
81
|
+
api.suppressedClick = false;
|
|
82
|
+
return suppressed;
|
|
83
|
+
};
|
|
84
|
+
return api;
|
|
85
|
+
}
|
|
86
|
+
export default createApi;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ // Which rows may mount their tier-1 cells (D4, D10.4): the hovered row, the row holding focus, and
|
|
16
|
+
// whether the grid is scrolling fast. A small external store, so a change re-renders only the lazy
|
|
17
|
+
// cells whose answer changes, never the rows or the grid.
|
|
18
|
+
function createCellActivity() {
|
|
19
|
+
const listeners = new Set();
|
|
20
|
+
const state = {
|
|
21
|
+
focusedRow: null,
|
|
22
|
+
hoveredRow: null,
|
|
23
|
+
fastScrolling: false
|
|
24
|
+
};
|
|
25
|
+
// Devices without hover show `showOn: hover` buttons all the time (see tableCells.css).
|
|
26
|
+
const noHover = typeof window !== 'undefined' && window.matchMedia?.('(hover: none)').matches === true;
|
|
27
|
+
function set(partial) {
|
|
28
|
+
let changed = false;
|
|
29
|
+
Object.entries(partial).forEach(([key, value])=>{
|
|
30
|
+
if (state[key] === value) return;
|
|
31
|
+
state[key] = value;
|
|
32
|
+
changed = true;
|
|
33
|
+
});
|
|
34
|
+
if (changed) listeners.forEach((listener)=>listener());
|
|
35
|
+
}
|
|
36
|
+
function subscribe(listener) {
|
|
37
|
+
listeners.add(listener);
|
|
38
|
+
return ()=>listeners.delete(listener);
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
noHover,
|
|
42
|
+
set,
|
|
43
|
+
state,
|
|
44
|
+
subscribe
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export default createCellActivity;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ import createSortKeyGetter from '@lowdefy/blocks-antd/table/createSortKeyGetter.js';
|
|
16
|
+
import createAccessor from './createAccessor.js';
|
|
17
|
+
const DEFAULT_WIDTH = 160;
|
|
18
|
+
const MIN_WIDTH = 48;
|
|
19
|
+
const MAX_WIDTH = 2000;
|
|
20
|
+
// Compiled once per column config change, with stable accessor and sort key identities (D10.5):
|
|
21
|
+
// cells and sort keys never rebuild them per row. `getSortKey` is the shared column core's, so
|
|
22
|
+
// the index sort orders rows exactly as the shared comparator (and TableLight) would.
|
|
23
|
+
function createColumnDefs({ columns }) {
|
|
24
|
+
return columns.map((column)=>({
|
|
25
|
+
id: column.key,
|
|
26
|
+
accessorFn: createAccessor(column.field),
|
|
27
|
+
header: column.title,
|
|
28
|
+
size: column.width ?? DEFAULT_WIDTH,
|
|
29
|
+
minSize: column.minWidth ?? MIN_WIDTH,
|
|
30
|
+
maxSize: column.maxWidth ?? MAX_WIDTH,
|
|
31
|
+
enableSorting: column.sortable,
|
|
32
|
+
sortDescFirst: false,
|
|
33
|
+
meta: {
|
|
34
|
+
column,
|
|
35
|
+
accessor: createAccessor(column.field),
|
|
36
|
+
getSortKey: createSortKeyGetter({
|
|
37
|
+
column
|
|
38
|
+
})
|
|
39
|
+
}
|
|
40
|
+
}));
|
|
41
|
+
}
|
|
42
|
+
export default createColumnDefs;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ // Actions are how features call each other (keyboard Enter -> activateRow, Space ->
|
|
16
|
+
// toggleRowSelected) without importing each other: each is created once per table instance.
|
|
17
|
+
function createFeatureActions(api) {
|
|
18
|
+
api.features.list.forEach((feature)=>{
|
|
19
|
+
Object.entries(feature.actions ?? {}).forEach(([name, create])=>{
|
|
20
|
+
api.actions[name] = create(api);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
export default createFeatureActions;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ import collectBodyOverlays from './collectBodyOverlays.js';
|
|
16
|
+
import collectCellLeads from './collectCellLeads.js';
|
|
17
|
+
import collectClaimedViewKeys from './collectClaimedViewKeys.js';
|
|
18
|
+
import collectGridHandlers from './collectGridHandlers.js';
|
|
19
|
+
import collectHeaderParts from './collectHeaderParts.js';
|
|
20
|
+
import collectRowRenderers from './collectRowRenderers.js';
|
|
21
|
+
import collectSliceDefinitions from './collectSliceDefinitions.js';
|
|
22
|
+
import createTanstackFeatures from './createTanstackFeatures.js';
|
|
23
|
+
// A table's feature modules, in composition order, with what the core reads from them collected
|
|
24
|
+
// once: `api.features`. Built once per distinct list, so every table with the same features
|
|
25
|
+
// shares one set (and one stable TanStack feature set).
|
|
26
|
+
function createFeatureSet(list) {
|
|
27
|
+
return {
|
|
28
|
+
bodyOverlays: collectBodyOverlays(list),
|
|
29
|
+
cellLeads: collectCellLeads(list),
|
|
30
|
+
claimedViewKeys: collectClaimedViewKeys(list),
|
|
31
|
+
gridHandlers: collectGridHandlers(list),
|
|
32
|
+
headerParts: collectHeaderParts(list),
|
|
33
|
+
list,
|
|
34
|
+
rowRenderers: collectRowRenderers(list),
|
|
35
|
+
sliceDefinitions: collectSliceDefinitions(list),
|
|
36
|
+
tanstackFeatures: createTanstackFeatures(list)
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export default createFeatureSet;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ import { type } from '@lowdefy/helpers';
|
|
16
|
+
import pickViewPart from './pickViewPart.js';
|
|
17
|
+
import resolveViewColumns from './resolveViewColumns.js';
|
|
18
|
+
function passthroughView({ claimedViewKeys, value, defaultView }) {
|
|
19
|
+
const keys = new Set([
|
|
20
|
+
...Object.keys(defaultView ?? {}),
|
|
21
|
+
...Object.keys(value?.view ?? {})
|
|
22
|
+
]);
|
|
23
|
+
const view = {};
|
|
24
|
+
keys.forEach((key)=>{
|
|
25
|
+
if (claimedViewKeys.has(key)) return;
|
|
26
|
+
const part = pickViewPart({
|
|
27
|
+
value,
|
|
28
|
+
defaultView,
|
|
29
|
+
key
|
|
30
|
+
});
|
|
31
|
+
if (!type.isUndefined(part)) view[key] = part;
|
|
32
|
+
});
|
|
33
|
+
return view;
|
|
34
|
+
}
|
|
35
|
+
// Builds the whole table state from a block value: each feature slice resolves its own part of the
|
|
36
|
+
// value with the brief's fallback rules (value, then defaultView, then column defaults).
|
|
37
|
+
function createInitialState({ value, config, features, rows }) {
|
|
38
|
+
const { defaultView } = config;
|
|
39
|
+
const viewColumns = resolveViewColumns({
|
|
40
|
+
value,
|
|
41
|
+
defaultView,
|
|
42
|
+
columns: config.columns
|
|
43
|
+
});
|
|
44
|
+
const args = {
|
|
45
|
+
value,
|
|
46
|
+
defaultView,
|
|
47
|
+
config,
|
|
48
|
+
viewColumns,
|
|
49
|
+
rows,
|
|
50
|
+
getKey: config.getKey
|
|
51
|
+
};
|
|
52
|
+
const state = {};
|
|
53
|
+
Object.entries(features.sliceDefinitions).forEach(([name, definition])=>{
|
|
54
|
+
state[name] = definition.init(args);
|
|
55
|
+
});
|
|
56
|
+
state.viewPassthrough = passthroughView({
|
|
57
|
+
claimedViewKeys: features.claimedViewKeys,
|
|
58
|
+
value,
|
|
59
|
+
defaultView
|
|
60
|
+
});
|
|
61
|
+
return state;
|
|
62
|
+
}
|
|
63
|
+
export default createInitialState;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ // Row key -> index in `rows`, built on the first lookup: row events need it, most renders do not.
|
|
16
|
+
function createKeyIndex({ rows, getKey }) {
|
|
17
|
+
let indices = null;
|
|
18
|
+
return function getIndex(rowKey) {
|
|
19
|
+
if (indices === null) {
|
|
20
|
+
indices = new Map();
|
|
21
|
+
rows.forEach((row, index)=>indices.set(String(getKey(row)), index));
|
|
22
|
+
}
|
|
23
|
+
return indices.get(String(rowKey)) ?? null;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export default createKeyIndex;
|