@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,557 @@
|
|
|
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
|
+
*/
|
|
16
|
+
|
|
17
|
+
/* Table engine styles. Every colour, radius and font is an antd design token (var(--ant-*)), so
|
|
18
|
+
the table follows the app theme and dark mode without JS. The antd Table stylesheet is never
|
|
19
|
+
used: antd injects it only when an antd Table mounts. Column widths, sticky offsets and the
|
|
20
|
+
centre spacer are CSS variables on the root (--lf-w<n>, --lf-l<n>, --lf-r<n>), which is what
|
|
21
|
+
lets a resize drag run without React renders. */
|
|
22
|
+
|
|
23
|
+
@layer components {
|
|
24
|
+
.lf-table {
|
|
25
|
+
--lf-border: var(--ant-color-border-secondary, #f0f0f0);
|
|
26
|
+
--lf-header-bg: color-mix(in srgb, var(--ant-color-text-base, #000) 2%, var(--lf-bg));
|
|
27
|
+
--lf-bg: var(--ant-color-bg-container, #fff);
|
|
28
|
+
/* Opaque backgrounds, so sticky pinned cells never show the scrolled cells beneath them. The
|
|
29
|
+
row hover is antd's item hover fill laid over the table background (4% black in light
|
|
30
|
+
themes, 8% white in dark ones), as a full background value. */
|
|
31
|
+
--lf-row-hover: linear-gradient(
|
|
32
|
+
var(--ant-control-item-bg-hover, rgba(0, 0, 0, 0.04)),
|
|
33
|
+
var(--ant-control-item-bg-hover, rgba(0, 0, 0, 0.04))
|
|
34
|
+
),
|
|
35
|
+
var(--lf-bg);
|
|
36
|
+
--lf-row-selected: var(--ant-color-primary-bg, #e6f4ff);
|
|
37
|
+
--lf-row-selected-hover: var(--ant-color-primary-bg-hover, #bae0ff);
|
|
38
|
+
--lf-pinned-shadow: rgba(0, 0, 0, 0.16);
|
|
39
|
+
position: relative;
|
|
40
|
+
width: 100%;
|
|
41
|
+
min-width: 0;
|
|
42
|
+
color: var(--ant-color-text, rgba(0, 0, 0, 0.88));
|
|
43
|
+
font-family: var(--ant-font-family, inherit);
|
|
44
|
+
font-size: var(--ant-font-size, 14px);
|
|
45
|
+
line-height: var(--ant-line-height, 1.5714);
|
|
46
|
+
background: var(--lf-bg);
|
|
47
|
+
border: 1px solid var(--lf-border);
|
|
48
|
+
border-radius: var(--ant-border-radius-lg, 8px);
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.lf-table-scroller {
|
|
53
|
+
position: relative;
|
|
54
|
+
overflow: auto;
|
|
55
|
+
overflow-anchor: none;
|
|
56
|
+
outline: none;
|
|
57
|
+
contain: strict;
|
|
58
|
+
max-height: var(--lf-table-max-height, none);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.lf-table-scroller[data-autoheight] {
|
|
62
|
+
contain: layout paint style;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.lf-table-canvas {
|
|
66
|
+
position: relative;
|
|
67
|
+
width: var(--lf-total);
|
|
68
|
+
min-width: 100%;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.lf-table-header {
|
|
72
|
+
position: sticky;
|
|
73
|
+
top: 0;
|
|
74
|
+
z-index: 3;
|
|
75
|
+
width: var(--lf-total);
|
|
76
|
+
min-width: 100%;
|
|
77
|
+
background: var(--lf-header-bg);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.lf-table-header[data-sticky='false'] {
|
|
81
|
+
position: relative;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* The separator is the row's own border, not each cell's, so it runs the full width of the
|
|
85
|
+
row when the columns are narrower than the table and passes under sticky pinned cells.
|
|
86
|
+
Scoped to the root: `lf-table-row` is also the shared cell contract's row class, which
|
|
87
|
+
TableLight's table rows carry on the same page. */
|
|
88
|
+
.lf-table .lf-table-row {
|
|
89
|
+
display: flex;
|
|
90
|
+
width: var(--lf-total);
|
|
91
|
+
min-width: 100%;
|
|
92
|
+
height: var(--lf-row-h);
|
|
93
|
+
box-sizing: border-box;
|
|
94
|
+
border-bottom: 1px solid var(--lf-border);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.lf-table-body {
|
|
98
|
+
position: relative;
|
|
99
|
+
width: var(--lf-total);
|
|
100
|
+
min-width: 100%;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.lf-table-window {
|
|
104
|
+
position: absolute;
|
|
105
|
+
top: 0;
|
|
106
|
+
left: 0;
|
|
107
|
+
width: 100%;
|
|
108
|
+
will-change: transform;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.lf-table-body .lf-table-row {
|
|
112
|
+
contain: layout style;
|
|
113
|
+
background: var(--lf-bg);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.lf-table-body .lf-table-row[data-positioned] {
|
|
117
|
+
position: absolute;
|
|
118
|
+
top: 0;
|
|
119
|
+
left: 0;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.lf-table-center {
|
|
123
|
+
display: flex;
|
|
124
|
+
flex: none;
|
|
125
|
+
box-sizing: border-box;
|
|
126
|
+
width: var(--lf-center-w);
|
|
127
|
+
padding-left: var(--lf-center-before);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.lf-table-gridcell {
|
|
131
|
+
position: relative;
|
|
132
|
+
display: flex;
|
|
133
|
+
flex: none;
|
|
134
|
+
align-items: center;
|
|
135
|
+
box-sizing: border-box;
|
|
136
|
+
min-width: 0;
|
|
137
|
+
height: 100%;
|
|
138
|
+
padding: 0 var(--ant-padding-xs, 8px);
|
|
139
|
+
overflow: hidden;
|
|
140
|
+
white-space: nowrap;
|
|
141
|
+
text-overflow: ellipsis;
|
|
142
|
+
background: inherit;
|
|
143
|
+
outline: none;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* The shared column core's cell content (renderCell's .lf-table-cell) fills the grid cell and
|
|
147
|
+
carries its own layout: single line, wrap or clamp, and alignment. */
|
|
148
|
+
.lf-table-gridcell > .lf-table-cell {
|
|
149
|
+
flex: 1 1 auto;
|
|
150
|
+
min-width: 0;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.lf-table-gridcell[data-align='end'] {
|
|
154
|
+
justify-content: flex-end;
|
|
155
|
+
text-align: end;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.lf-table-gridcell[data-align='center'] {
|
|
159
|
+
justify-content: center;
|
|
160
|
+
text-align: center;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.lf-table-gridcell[data-pinned] {
|
|
164
|
+
position: sticky;
|
|
165
|
+
z-index: 1;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.lf-table-gridcell[data-pinned='start'][data-pinned-edge] {
|
|
169
|
+
box-shadow: inset -1px 0 0 var(--lf-border);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.lf-table-gridcell[data-pinned='end'][data-pinned-edge] {
|
|
173
|
+
box-shadow: inset 1px 0 0 var(--lf-border);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/* While columns scroll under a pinned region, its inner edge casts a shadow over them
|
|
177
|
+
(writeScrollEdges sets the attributes from the scroll position). */
|
|
178
|
+
.lf-table-scroller[data-scrolled-start]
|
|
179
|
+
.lf-table-gridcell[data-pinned='start'][data-pinned-edge] {
|
|
180
|
+
box-shadow:
|
|
181
|
+
inset -1px 0 0 var(--lf-border),
|
|
182
|
+
6px 0 8px -6px var(--lf-pinned-shadow);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.lf-table-scroller[data-scrolled-end] .lf-table-gridcell[data-pinned='end'][data-pinned-edge] {
|
|
186
|
+
box-shadow:
|
|
187
|
+
inset 1px 0 0 var(--lf-border),
|
|
188
|
+
-6px 0 8px -6px var(--lf-pinned-shadow);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/* The table's own border ends the last column, so an end-pinned last header shows no divider
|
|
192
|
+
(its resize handle still highlights on hover and while dragging). */
|
|
193
|
+
.lf-table-header
|
|
194
|
+
.lf-table-gridcell[data-pinned='end']:last-child
|
|
195
|
+
> .lf-table-resize:not(:hover):not([data-active])::after {
|
|
196
|
+
opacity: 0;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.lf-table-gridcell:focus-visible,
|
|
200
|
+
.lf-table-gridcell[data-focused]:focus {
|
|
201
|
+
outline: 2px solid var(--ant-color-primary, #1677ff);
|
|
202
|
+
outline-offset: -2px;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.lf-table-body .lf-table-row:hover {
|
|
206
|
+
background: var(--lf-row-hover);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.lf-table-body .lf-table-row[aria-selected='true'] {
|
|
210
|
+
background: var(--lf-row-selected);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.lf-table-body .lf-table-row[aria-selected='true']:hover {
|
|
214
|
+
background: var(--lf-row-selected-hover);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.lf-table[data-clickable] .lf-table-body .lf-table-row {
|
|
218
|
+
cursor: pointer;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.lf-table-header .lf-table-row {
|
|
222
|
+
height: var(--lf-header-h);
|
|
223
|
+
background: var(--lf-header-bg);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/* --lf-header-cell-bg is opaque, so a sticky pinned header covers the headers scrolled under it
|
|
227
|
+
and header buttons laid over the title can take the cell's colour. */
|
|
228
|
+
/* Each header cell is its own stacking context, so the resize handle and menu button of a
|
|
229
|
+
column scrolled under a pinned column stay under that column instead of showing through it
|
|
230
|
+
(a stray divider inside the pinned end). */
|
|
231
|
+
.lf-table-header .lf-table-gridcell {
|
|
232
|
+
--lf-header-cell-bg: var(--lf-header-bg);
|
|
233
|
+
isolation: isolate;
|
|
234
|
+
font-weight: var(--ant-font-weight-strong, 600);
|
|
235
|
+
color: var(--ant-color-text-heading, var(--ant-color-text));
|
|
236
|
+
user-select: none;
|
|
237
|
+
gap: var(--ant-padding-xxs, 4px);
|
|
238
|
+
background: var(--lf-header-cell-bg);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.lf-table-header .lf-table-gridcell[data-sortable] {
|
|
242
|
+
cursor: pointer;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.lf-table-header .lf-table-gridcell[data-sortable]:hover {
|
|
246
|
+
--lf-header-cell-bg: color-mix(
|
|
247
|
+
in srgb,
|
|
248
|
+
var(--ant-color-text-base, #000) 5%,
|
|
249
|
+
var(--lf-header-bg)
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/* End-aligned headers put their sort and filter indicators before the title, so the title ends
|
|
254
|
+
on the same padding edge as the column's values. */
|
|
255
|
+
.lf-table-header .lf-table-gridcell[data-align='end'] > .lf-table-sort,
|
|
256
|
+
.lf-table-header .lf-table-gridcell[data-align='end'] > .lf-table-filter-indicator {
|
|
257
|
+
order: -1;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.lf-table-header-title {
|
|
261
|
+
flex: 0 1 auto;
|
|
262
|
+
min-width: 0;
|
|
263
|
+
overflow: hidden;
|
|
264
|
+
text-overflow: ellipsis;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.lf-table-sort {
|
|
268
|
+
display: inline-flex;
|
|
269
|
+
flex: none;
|
|
270
|
+
align-items: center;
|
|
271
|
+
gap: 2px;
|
|
272
|
+
color: var(--ant-color-text-quaternary, rgba(0, 0, 0, 0.25));
|
|
273
|
+
font-size: var(--ant-font-size-sm, 12px);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.lf-table-sort svg {
|
|
277
|
+
display: block;
|
|
278
|
+
width: 8px;
|
|
279
|
+
height: 12px;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.lf-table-sort [data-active] {
|
|
283
|
+
color: var(--ant-color-primary, #1677ff);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.lf-table-sort-order {
|
|
287
|
+
color: var(--ant-color-primary, #1677ff);
|
|
288
|
+
font-weight: normal;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.lf-table-resize {
|
|
292
|
+
position: absolute;
|
|
293
|
+
top: 0;
|
|
294
|
+
right: 0;
|
|
295
|
+
z-index: 2;
|
|
296
|
+
width: 8px;
|
|
297
|
+
height: 100%;
|
|
298
|
+
cursor: col-resize;
|
|
299
|
+
touch-action: none;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.lf-table-resize::after {
|
|
303
|
+
position: absolute;
|
|
304
|
+
top: 25%;
|
|
305
|
+
right: 3px;
|
|
306
|
+
width: 1px;
|
|
307
|
+
height: 50%;
|
|
308
|
+
background: var(--ant-color-split, rgba(5, 5, 5, 0.06));
|
|
309
|
+
content: '';
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.lf-table-resize:hover::after,
|
|
313
|
+
.lf-table[data-resizing] .lf-table-resize[data-active]::after {
|
|
314
|
+
top: 0;
|
|
315
|
+
right: 2px;
|
|
316
|
+
width: 3px;
|
|
317
|
+
height: 100%;
|
|
318
|
+
background: var(--ant-color-primary, #1677ff);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.lf-table[data-resizing],
|
|
322
|
+
.lf-table[data-resizing] * {
|
|
323
|
+
cursor: col-resize !important;
|
|
324
|
+
user-select: none;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.lf-table[data-reordering],
|
|
328
|
+
.lf-table[data-reordering] * {
|
|
329
|
+
cursor: grabbing !important;
|
|
330
|
+
user-select: none;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.lf-table-reorder-ghost {
|
|
334
|
+
position: fixed;
|
|
335
|
+
top: 0;
|
|
336
|
+
left: 0;
|
|
337
|
+
z-index: 1100;
|
|
338
|
+
display: flex;
|
|
339
|
+
align-items: center;
|
|
340
|
+
box-sizing: border-box;
|
|
341
|
+
padding: 0 var(--ant-padding-xs, 8px);
|
|
342
|
+
font-weight: var(--ant-font-weight-strong, 600);
|
|
343
|
+
background: var(--ant-color-bg-elevated, #fff);
|
|
344
|
+
border-radius: var(--ant-border-radius, 6px);
|
|
345
|
+
box-shadow: var(--ant-box-shadow-secondary, 0 6px 16px rgba(0, 0, 0, 0.08));
|
|
346
|
+
opacity: 0.9;
|
|
347
|
+
pointer-events: none;
|
|
348
|
+
will-change: transform;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.lf-table-reorder-line {
|
|
352
|
+
position: absolute;
|
|
353
|
+
top: 0;
|
|
354
|
+
z-index: 4;
|
|
355
|
+
width: 2px;
|
|
356
|
+
height: var(--lf-header-h);
|
|
357
|
+
background: var(--ant-color-primary, #1677ff);
|
|
358
|
+
pointer-events: none;
|
|
359
|
+
will-change: transform;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.lf-table-select {
|
|
363
|
+
justify-content: center;
|
|
364
|
+
padding: 0;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.lf-table-checkbox {
|
|
368
|
+
width: 16px;
|
|
369
|
+
height: 16px;
|
|
370
|
+
margin: 0;
|
|
371
|
+
accent-color: var(--ant-color-primary, #1677ff);
|
|
372
|
+
cursor: pointer;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.lf-table-empty-state {
|
|
376
|
+
position: sticky;
|
|
377
|
+
left: 0;
|
|
378
|
+
display: flex;
|
|
379
|
+
align-items: center;
|
|
380
|
+
justify-content: center;
|
|
381
|
+
box-sizing: border-box;
|
|
382
|
+
width: var(--lf-viewport-w, 100%);
|
|
383
|
+
padding: var(--ant-padding-lg, 24px) var(--ant-padding, 16px);
|
|
384
|
+
color: var(--ant-color-text-secondary, rgba(0, 0, 0, 0.45));
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
.lf-table-skeleton-bar {
|
|
388
|
+
display: block;
|
|
389
|
+
width: 70%;
|
|
390
|
+
height: 40%;
|
|
391
|
+
max-height: 14px;
|
|
392
|
+
background: linear-gradient(
|
|
393
|
+
90deg,
|
|
394
|
+
var(--ant-color-fill-secondary, rgba(0, 0, 0, 0.06)) 25%,
|
|
395
|
+
var(--ant-color-fill-tertiary, rgba(0, 0, 0, 0.04)) 37%,
|
|
396
|
+
var(--ant-color-fill-secondary, rgba(0, 0, 0, 0.06)) 63%
|
|
397
|
+
);
|
|
398
|
+
background-size: 400% 100%;
|
|
399
|
+
border-radius: var(--ant-border-radius-sm, 4px);
|
|
400
|
+
animation: lf-table-skeleton 1.4s ease infinite;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
@keyframes lf-table-skeleton {
|
|
404
|
+
0% {
|
|
405
|
+
background-position: 100% 50%;
|
|
406
|
+
}
|
|
407
|
+
100% {
|
|
408
|
+
background-position: 0 50%;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.lf-table-loading-bar {
|
|
413
|
+
position: absolute;
|
|
414
|
+
top: 0;
|
|
415
|
+
left: 0;
|
|
416
|
+
z-index: 5;
|
|
417
|
+
width: 100%;
|
|
418
|
+
height: 2px;
|
|
419
|
+
overflow: hidden;
|
|
420
|
+
pointer-events: none;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.lf-table-loading-bar::after {
|
|
424
|
+
position: absolute;
|
|
425
|
+
top: 0;
|
|
426
|
+
left: -40%;
|
|
427
|
+
width: 40%;
|
|
428
|
+
height: 100%;
|
|
429
|
+
background: var(--ant-color-primary, #1677ff);
|
|
430
|
+
animation: lf-table-loading-bar 1.2s ease-in-out infinite;
|
|
431
|
+
content: '';
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
@keyframes lf-table-loading-bar {
|
|
435
|
+
0% {
|
|
436
|
+
left: -40%;
|
|
437
|
+
}
|
|
438
|
+
100% {
|
|
439
|
+
left: 100%;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.lf-table[data-pending] .lf-table-body {
|
|
444
|
+
opacity: 0.6;
|
|
445
|
+
transition: opacity 0.1s;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/* bordered: lines between cells as well as under them. */
|
|
449
|
+
.lf-table[data-bordered] .lf-table-gridcell {
|
|
450
|
+
border-inline-end: 1px solid var(--lf-border);
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/* Measured rows (a wrapped or multi-line column): rows take their content height, never less
|
|
454
|
+
than the density height. */
|
|
455
|
+
.lf-table-body .lf-table-row[data-measured] {
|
|
456
|
+
height: auto;
|
|
457
|
+
min-height: var(--lf-row-h);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.lf-table .lf-table-row[data-measured] .lf-table-gridcell {
|
|
461
|
+
height: auto;
|
|
462
|
+
padding-block: var(--ant-padding-xxs, 4px);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.lf-table-header-tooltip {
|
|
466
|
+
text-decoration: underline dotted var(--ant-color-text-quaternary, rgba(0, 0, 0, 0.25));
|
|
467
|
+
text-underline-offset: 3px;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
/* Header groups (`children` columns). */
|
|
471
|
+
.lf-table-header .lf-table-group-header {
|
|
472
|
+
justify-content: center;
|
|
473
|
+
text-align: center;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.lf-table-header .lf-table-group-header[data-pinned] {
|
|
477
|
+
z-index: 1;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
/* Summary footer: sticky at the bottom of the scroller, like the header at the top. */
|
|
481
|
+
.lf-table-footer {
|
|
482
|
+
position: sticky;
|
|
483
|
+
bottom: 0;
|
|
484
|
+
z-index: 3;
|
|
485
|
+
width: var(--lf-total);
|
|
486
|
+
min-width: 100%;
|
|
487
|
+
background: var(--lf-header-bg);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.lf-table-footer .lf-table-row {
|
|
491
|
+
background: var(--lf-header-bg);
|
|
492
|
+
border-top: 1px solid var(--lf-border);
|
|
493
|
+
border-bottom: 0;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/* A summary never clips silently. SummaryRow shows the full label, its short form or none, from
|
|
497
|
+
measured widths (getSummaryLabel); the value ends with an ellipsis when it is wider than what
|
|
498
|
+
is left, and the title holds the full label and value. */
|
|
499
|
+
.lf-table-summary {
|
|
500
|
+
display: flex;
|
|
501
|
+
flex: 1 1 auto;
|
|
502
|
+
align-items: baseline;
|
|
503
|
+
justify-content: flex-start;
|
|
504
|
+
gap: var(--ant-margin-xxs, 4px);
|
|
505
|
+
min-width: 0;
|
|
506
|
+
overflow: hidden;
|
|
507
|
+
white-space: nowrap;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.lf-table-gridcell[data-align='end'] > .lf-table-summary {
|
|
511
|
+
justify-content: flex-end;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
.lf-table-gridcell[data-align='center'] > .lf-table-summary {
|
|
515
|
+
justify-content: center;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
.lf-table-summary-label {
|
|
519
|
+
flex: none;
|
|
520
|
+
color: var(--ant-color-text-tertiary, rgba(0, 0, 0, 0.45));
|
|
521
|
+
font-size: var(--ant-font-size-sm, 12px);
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
.lf-table-summary-value {
|
|
525
|
+
flex: 0 1 auto;
|
|
526
|
+
min-width: 0;
|
|
527
|
+
overflow: hidden;
|
|
528
|
+
text-overflow: ellipsis;
|
|
529
|
+
font-weight: 600;
|
|
530
|
+
font-variant-numeric: tabular-nums;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
/* Toolbar and bulk bar slots: the blocks sit side by side, like the table's own buttons. A
|
|
534
|
+
slot is a Lowdefy area (an .lf-row) whose blocks default to span 24 (.lf-col), which would
|
|
535
|
+
stack them; here span blocks take their content width instead, since a toolbar row has no
|
|
536
|
+
grid to span. A block's own flex layout (`layout.flex`, `grow`, `size`) is not an .lf-col and
|
|
537
|
+
still applies, as do the slot's area settings (`gap`, `align`, `justify`, `direction`, `wrap`),
|
|
538
|
+
which Area writes inline. */
|
|
539
|
+
:is(.lf-table-toolbar-start, .lf-table-toolbar-end, .lf-table-bulk-actions) > .lf-row {
|
|
540
|
+
--lf-gap-x: var(--ant-margin-xs, 8px);
|
|
541
|
+
--lf-gap-y: var(--ant-margin-xs, 8px);
|
|
542
|
+
align-items: center;
|
|
543
|
+
min-width: 0;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
:is(.lf-table-toolbar-start, .lf-table-toolbar-end, .lf-table-bulk-actions) > .lf-row > .lf-col {
|
|
547
|
+
flex: 0 1 auto;
|
|
548
|
+
max-width: 100%;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.lf-table-pagination {
|
|
552
|
+
display: flex;
|
|
553
|
+
justify-content: flex-end;
|
|
554
|
+
padding: var(--ant-padding-xs, 8px) var(--ant-padding, 16px);
|
|
555
|
+
border-top: 1px solid var(--lf-border);
|
|
556
|
+
}
|
|
557
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
const EMPTY = [];
|
|
17
|
+
// Stage 1 of the data pipeline (see TableRoot): the source rows, before they are diffed by key.
|
|
18
|
+
// `properties.data` is the client rows; a feature's `useData(ctx)` hook may replace them in
|
|
19
|
+
// registry order: server mode returns the rows its block cache holds, and a tree built from
|
|
20
|
+
// `childrenField` flattens nested rows (so every node is diffed by key). The registry is a
|
|
21
|
+
// module constant, so the hook order never changes between renders.
|
|
22
|
+
function useFeatureData({ api, config, properties }) {
|
|
23
|
+
let data = type.isArray(properties.data) ? properties.data : EMPTY;
|
|
24
|
+
api.features.list.forEach((feature)=>{
|
|
25
|
+
if (!feature.useData) return;
|
|
26
|
+
data = feature.useData({
|
|
27
|
+
api,
|
|
28
|
+
config,
|
|
29
|
+
data,
|
|
30
|
+
properties
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
return data;
|
|
34
|
+
}
|
|
35
|
+
export default useFeatureData;
|
|
@@ -0,0 +1,55 @@
|
|
|
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 { useMemo } from 'react';
|
|
16
|
+
const EMPTY = [];
|
|
17
|
+
// Block-level feature hooks in registry order. A fragment may contribute:
|
|
18
|
+
// - `leadingColumns`: special columns rendered first in the start-pinned region (the selection
|
|
19
|
+
// checkbox; later a drag handle or expander),
|
|
20
|
+
// - `regions.top` / `regions.bottom`: elements rendered above or below the grid inside the table
|
|
21
|
+
// root (toolbar, bulk bar, pagination),
|
|
22
|
+
// - `loading: true`: the table is waiting for data it cannot show yet (server mode's first block),
|
|
23
|
+
// - `pending: true`: the rows shown are about to be replaced, so they are dimmed (server mode keeps
|
|
24
|
+
// the previous view's rows until the new view's first block lands).
|
|
25
|
+
function useFeatureFragments(ctx) {
|
|
26
|
+
const features = ctx.api.features.list;
|
|
27
|
+
const fragments = features.map((feature)=>feature.useFeature?.(ctx) ?? null);
|
|
28
|
+
const leadingParts = fragments.map((fragment)=>fragment?.leadingColumns ?? EMPTY);
|
|
29
|
+
const leadingColumns = useMemo(()=>leadingParts.flat(), leadingParts);
|
|
30
|
+
const top = [];
|
|
31
|
+
const bottom = [];
|
|
32
|
+
fragments.forEach((fragment, index)=>{
|
|
33
|
+
const name = features[index].name;
|
|
34
|
+
if (fragment?.regions?.top) top.push({
|
|
35
|
+
name,
|
|
36
|
+
element: fragment.regions.top
|
|
37
|
+
});
|
|
38
|
+
if (fragment?.regions?.bottom) bottom.push({
|
|
39
|
+
name,
|
|
40
|
+
element: fragment.regions.bottom
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
const loading = fragments.some((fragment)=>fragment?.loading === true);
|
|
44
|
+
const pending = fragments.some((fragment)=>fragment?.pending === true);
|
|
45
|
+
return {
|
|
46
|
+
leadingColumns,
|
|
47
|
+
loading,
|
|
48
|
+
pending,
|
|
49
|
+
regions: {
|
|
50
|
+
top,
|
|
51
|
+
bottom
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export default useFeatureFragments;
|