@1771technologies/lytenyte-pro 1.0.12-dev.1 → 1.0.12-dev.2
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/dist/+types.d.ts +5836 -0
- package/dist/+types.js +1 -0
- package/dist/cell-selection/adjust-rect-for-row-and-cell-span.d.ts +2 -0
- package/dist/cell-selection/adjust-rect-for-row-and-cell-span.js +43 -0
- package/dist/cell-selection/are-rects-equal.d.ts +2 -0
- package/dist/cell-selection/are-rects-equal.js +6 -0
- package/dist/cell-selection/bound-selection-rect.d.ts +2 -0
- package/dist/cell-selection/bound-selection-rect.js +17 -0
- package/dist/cell-selection/cell-selection-containers.d.ts +3 -0
- package/dist/cell-selection/cell-selection-containers.js +91 -0
- package/dist/cell-selection/cell-selection-driver.d.ts +1 -0
- package/dist/cell-selection/cell-selection-driver.js +285 -0
- package/dist/cell-selection/cell-style-row.d.ts +8 -0
- package/dist/cell-selection/cell-style-row.js +84 -0
- package/dist/cell-selection/deselect-rect-range.d.ts +2 -0
- package/dist/cell-selection/deselect-rect-range.js +43 -0
- package/dist/cell-selection/expand-cell-selection-down.d.ts +5 -0
- package/dist/cell-selection/expand-cell-selection-down.js +39 -0
- package/dist/cell-selection/expand-cell-selection-end.d.ts +5 -0
- package/dist/cell-selection/expand-cell-selection-end.js +40 -0
- package/dist/cell-selection/expand-cell-selection-start.d.ts +5 -0
- package/dist/cell-selection/expand-cell-selection-start.js +39 -0
- package/dist/cell-selection/expand-cell-selection-up.d.ts +5 -0
- package/dist/cell-selection/expand-cell-selection-up.js +39 -0
- package/dist/cell-selection/full-width-start-end-index.d.ts +2 -0
- package/dist/cell-selection/full-width-start-end-index.js +5 -0
- package/dist/cell-selection/get-root-cell.d.ts +2 -0
- package/dist/cell-selection/get-root-cell.js +6 -0
- package/dist/cell-selection/index.d.ts +18 -0
- package/dist/cell-selection/index.js +18 -0
- package/dist/cell-selection/is-bottom-rect.d.ts +2 -0
- package/dist/cell-selection/is-bottom-rect.js +7 -0
- package/dist/cell-selection/is-center-col-rect.d.ts +5 -0
- package/dist/cell-selection/is-center-col-rect.js +5 -0
- package/dist/cell-selection/is-center-rect.d.ts +2 -0
- package/dist/cell-selection/is-center-rect.js +5 -0
- package/dist/cell-selection/is-end-rect.d.ts +5 -0
- package/dist/cell-selection/is-end-rect.js +4 -0
- package/dist/cell-selection/is-overlapping-rect.d.ts +2 -0
- package/dist/cell-selection/is-overlapping-rect.js +6 -0
- package/dist/cell-selection/is-start-rect.d.ts +5 -0
- package/dist/cell-selection/is-start-rect.js +4 -0
- package/dist/cell-selection/is-top-rect.d.ts +2 -0
- package/dist/cell-selection/is-top-rect.js +4 -0
- package/dist/cell-selection/is-within-selection-rect.d.ts +2 -0
- package/dist/cell-selection/is-within-selection-rect.js +3 -0
- package/dist/cell-selection/split-cell-selection-rect.d.ts +46 -0
- package/dist/cell-selection/split-cell-selection-rect.js +88 -0
- package/dist/cell-selection/split-on-pivot.d.ts +3 -0
- package/dist/cell-selection/split-on-pivot.js +50 -0
- package/dist/cell-selection/update-additive-cell-selection.d.ts +5 -0
- package/dist/cell-selection/update-additive-cell-selection.js +23 -0
- package/dist/cell-selection/use-edge-scroll.d.ts +10 -0
- package/dist/cell-selection/use-edge-scroll.js +66 -0
- package/dist/cells/+types.cell.d.ts +13 -0
- package/dist/cells/+types.cell.js +1 -0
- package/dist/cells/cell-default.d.ts +2 -0
- package/dist/cells/cell-default.js +8 -0
- package/dist/cells/cell-editor.d.ts +6 -0
- package/dist/cells/cell-editor.js +103 -0
- package/dist/cells/cell-spacer.d.ts +9 -0
- package/dist/cells/cell-spacer.js +34 -0
- package/dist/cells/cell.d.ts +5 -0
- package/dist/cells/cell.js +43 -0
- package/dist/cells/use-cell-style.d.ts +3 -0
- package/dist/cells/use-cell-style.js +51 -0
- package/dist/column-manager/branch-lookup-context.d.ts +4 -0
- package/dist/column-manager/branch-lookup-context.js +3 -0
- package/dist/column-manager/branch.d.ts +15 -0
- package/dist/column-manager/branch.js +54 -0
- package/dist/column-manager/column-manager.d.ts +13 -0
- package/dist/column-manager/column-manager.js +18 -0
- package/dist/column-manager/context.d.ts +7 -0
- package/dist/column-manager/context.js +3 -0
- package/dist/column-manager/label.d.ts +5 -0
- package/dist/column-manager/label.js +18 -0
- package/dist/column-manager/leaf.d.ts +6 -0
- package/dist/column-manager/leaf.js +58 -0
- package/dist/column-manager/move-handle.d.ts +5 -0
- package/dist/column-manager/move-handle.js +73 -0
- package/dist/column-manager/panel.d.ts +1 -0
- package/dist/column-manager/panel.js +2 -0
- package/dist/column-manager/root.d.ts +8 -0
- package/dist/column-manager/root.js +7 -0
- package/dist/column-manager/use-column-manager.d.ts +10 -0
- package/dist/column-manager/use-column-manager.js +24 -0
- package/dist/column-manager/use-columns-from-context.d.ts +3 -0
- package/dist/column-manager/use-columns-from-context.js +23 -0
- package/dist/column-manager/visibility-checkbox.d.ts +9 -0
- package/dist/column-manager/visibility-checkbox.js +30 -0
- package/dist/context.d.ts +10 -0
- package/dist/context.js +4 -0
- package/dist/filter-tree/branch.d.ts +13 -0
- package/dist/filter-tree/branch.js +21 -0
- package/dist/filter-tree/context.d.ts +27 -0
- package/dist/filter-tree/context.js +5 -0
- package/dist/filter-tree/filter-tree.d.ts +14 -0
- package/dist/filter-tree/filter-tree.js +18 -0
- package/dist/filter-tree/hooks/use-filter-tree.d.ts +38 -0
- package/dist/filter-tree/hooks/use-filter-tree.js +101 -0
- package/dist/filter-tree/hooks/use-tree-item.d.ts +8 -0
- package/dist/filter-tree/hooks/use-tree-item.js +116 -0
- package/dist/filter-tree/inclusion-checkbox.d.ts +9 -0
- package/dist/filter-tree/inclusion-checkbox.js +14 -0
- package/dist/filter-tree/label.d.ts +5 -0
- package/dist/filter-tree/label.js +18 -0
- package/dist/filter-tree/leaf.d.ts +6 -0
- package/dist/filter-tree/leaf.js +14 -0
- package/dist/filter-tree/root.d.ts +13 -0
- package/dist/filter-tree/root.js +30 -0
- package/dist/grid-box/+types.d.ts +15 -0
- package/dist/grid-box/+types.js +1 -0
- package/dist/grid-box/context.d.ts +9 -0
- package/dist/grid-box/context.js +3 -0
- package/dist/grid-box/grid-box.d.ts +12 -0
- package/dist/grid-box/grid-box.js +14 -0
- package/dist/grid-box/item.d.ts +10 -0
- package/dist/grid-box/item.js +63 -0
- package/dist/grid-box/panel.d.ts +1 -0
- package/dist/grid-box/panel.js +9 -0
- package/dist/grid-box/root.d.ts +9 -0
- package/dist/grid-box/root.js +8 -0
- package/dist/grid-box/use-aggregation-box-items.d.ts +18 -0
- package/dist/grid-box/use-aggregation-box-items.js +61 -0
- package/dist/grid-box/use-column-box-items.d.ts +34 -0
- package/dist/grid-box/use-column-box-items.js +78 -0
- package/dist/grid-box/use-row-group-box-items.d.ts +18 -0
- package/dist/grid-box/use-row-group-box-items.js +169 -0
- package/dist/grid-provider/context.d.ts +5 -0
- package/dist/grid-provider/context.js +2 -0
- package/dist/grid-provider/provider.d.ts +3 -0
- package/dist/grid-provider/provider.js +2 -0
- package/dist/grid-provider/use-grid.d.ts +3 -0
- package/dist/grid-provider/use-grid.js +3 -0
- package/dist/grid.d.ts +18 -0
- package/dist/grid.js +28 -0
- package/dist/header/header-cell.d.ts +10 -0
- package/dist/header/header-cell.js +22 -0
- package/dist/header/header-group-cell.d.ts +5 -0
- package/dist/header/header-group-cell.js +16 -0
- package/dist/header/header-row.d.ts +4 -0
- package/dist/header/header-row.js +10 -0
- package/dist/header/header.d.ts +1 -0
- package/dist/header/header.js +12 -0
- package/dist/header/resize-handler.d.ts +12 -0
- package/dist/header/resize-handler.js +136 -0
- package/dist/header/use-drag-move.d.ts +14 -0
- package/dist/header/use-drag-move.js +97 -0
- package/dist/header/use-header-cell-renderer.d.ts +4 -0
- package/dist/header/use-header-cell-renderer.js +36 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +3 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +13 -0
- package/dist/license.d.ts +3 -0
- package/dist/license.js +214 -0
- package/dist/listbox/context.d.ts +6 -0
- package/dist/listbox/context.js +3 -0
- package/dist/listbox/item.d.ts +1 -0
- package/dist/listbox/item.js +25 -0
- package/dist/listbox/panel.d.ts +1 -0
- package/dist/listbox/panel.js +50 -0
- package/dist/listbox/root.d.ts +6 -0
- package/dist/listbox/root.js +12 -0
- package/dist/root/dialog-driver.d.ts +1 -0
- package/dist/root/dialog-driver.js +21 -0
- package/dist/root/popover-driver.d.ts +1 -0
- package/dist/root/popover-driver.js +21 -0
- package/dist/root/root.d.ts +8 -0
- package/dist/root/root.js +125 -0
- package/dist/row-data-source-client/+constants.d.ts +2 -0
- package/dist/row-data-source-client/+constants.js +2 -0
- package/dist/row-data-source-client/+types.d.ts +27 -0
- package/dist/row-data-source-client/+types.js +1 -0
- package/dist/row-data-source-client/built-ins/avg.d.ts +10 -0
- package/dist/row-data-source-client/built-ins/avg.js +16 -0
- package/dist/row-data-source-client/built-ins/built-ins.d.ts +44 -0
- package/dist/row-data-source-client/built-ins/built-ins.js +44 -0
- package/dist/row-data-source-client/built-ins/count.d.ts +10 -0
- package/dist/row-data-source-client/built-ins/count.js +16 -0
- package/dist/row-data-source-client/built-ins/first.d.ts +10 -0
- package/dist/row-data-source-client/built-ins/first.js +12 -0
- package/dist/row-data-source-client/built-ins/group.d.ts +1 -0
- package/dist/row-data-source-client/built-ins/group.js +3 -0
- package/dist/row-data-source-client/built-ins/last.d.ts +10 -0
- package/dist/row-data-source-client/built-ins/last.js +12 -0
- package/dist/row-data-source-client/built-ins/max.d.ts +11 -0
- package/dist/row-data-source-client/built-ins/max.js +25 -0
- package/dist/row-data-source-client/built-ins/min.d.ts +11 -0
- package/dist/row-data-source-client/built-ins/min.js +25 -0
- package/dist/row-data-source-client/built-ins/sum.d.ts +10 -0
- package/dist/row-data-source-client/built-ins/sum.js +21 -0
- package/dist/row-data-source-client/filter/+types.d.ts +23 -0
- package/dist/row-data-source-client/filter/+types.js +1 -0
- package/dist/row-data-source-client/filter/compute-filtered-rows.d.ts +2 -0
- package/dist/row-data-source-client/filter/compute-filtered-rows.js +109 -0
- package/dist/row-data-source-client/pivots/create-agg-model.d.ts +6 -0
- package/dist/row-data-source-client/pivots/create-agg-model.js +13 -0
- package/dist/row-data-source-client/pivots/create-pivot-columns-from-paths.d.ts +2 -0
- package/dist/row-data-source-client/pivots/create-pivot-columns-from-paths.js +50 -0
- package/dist/row-data-source-client/pivots/create-pivot-columns.d.ts +2 -0
- package/dist/row-data-source-client/pivots/create-pivot-columns.js +22 -0
- package/dist/row-data-source-client/pivots/create-pivot-tree.d.ts +2 -0
- package/dist/row-data-source-client/pivots/create-pivot-tree.js +23 -0
- package/dist/row-data-source-client/tree/client-tree.d.ts +18 -0
- package/dist/row-data-source-client/tree/client-tree.js +76 -0
- package/dist/row-data-source-client/tree/evaluator-aggregation.d.ts +2 -0
- package/dist/row-data-source-client/tree/evaluator-aggregation.js +8 -0
- package/dist/row-data-source-client/tree/evaluator-group.d.ts +2 -0
- package/dist/row-data-source-client/tree/evaluator-group.js +9 -0
- package/dist/row-data-source-client/tree/traverse.d.ts +2 -0
- package/dist/row-data-source-client/tree/traverse.js +22 -0
- package/dist/row-data-source-client/use-client-data-source-paginated.d.ts +10 -0
- package/dist/row-data-source-client/use-client-data-source-paginated.js +572 -0
- package/dist/row-data-source-client/use-client-data-source.d.ts +10 -0
- package/dist/row-data-source-client/use-client-data-source.js +666 -0
- package/dist/row-data-source-client/use-client-tree-data-source.d.ts +9 -0
- package/dist/row-data-source-client/use-client-tree-data-source.js +511 -0
- package/dist/row-data-source-server/async-tree/+constants.async-tree.d.ts +1 -0
- package/dist/row-data-source-server/async-tree/+constants.async-tree.js +1 -0
- package/dist/row-data-source-server/async-tree/+types.async-tree.d.ts +59 -0
- package/dist/row-data-source-server/async-tree/+types.async-tree.js +1 -0
- package/dist/row-data-source-server/async-tree/apply-delete-action-to-tree.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/apply-delete-action-to-tree.js +27 -0
- package/dist/row-data-source-server/async-tree/apply-set-action-to-tree.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/apply-set-action-to-tree.js +36 -0
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-unique.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-unique.js +24 -0
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-valid.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-valid.js +14 -0
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-fit.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-fit.js +18 -0
- package/dist/row-data-source-server/async-tree/check-set-action-item-kinds.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/check-set-action-item-kinds.js +14 -0
- package/dist/row-data-source-server/async-tree/get-parent-node-by-path.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/get-parent-node-by-path.js +18 -0
- package/dist/row-data-source-server/async-tree/is-set-action-a-no-op-on-node.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/is-set-action-a-no-op-on-node.js +3 -0
- package/dist/row-data-source-server/async-tree/make-async-tree.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/make-async-tree.js +19 -0
- package/dist/row-data-source-server/async-tree/maybe-apply-parent-remove-self.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/maybe-apply-parent-remove-self.js +8 -0
- package/dist/row-data-source-server/async-tree/maybe-apply-resize.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/maybe-apply-resize.js +17 -0
- package/dist/row-data-source-server/async-tree/maybe-apply-set-action-items.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/maybe-apply-set-action-items.js +52 -0
- package/dist/row-data-source-server/range-tree/range-tree.d.ts +66 -0
- package/dist/row-data-source-server/range-tree/range-tree.js +102 -0
- package/dist/row-data-source-server/server-data.d.ts +48 -0
- package/dist/row-data-source-server/server-data.js +378 -0
- package/dist/row-data-source-server/use-server-data-source.d.ts +3 -0
- package/dist/row-data-source-server/use-server-data-source.js +344 -0
- package/dist/row-data-source-server/utils/get-node-depth.d.ts +2 -0
- package/dist/row-data-source-server/utils/get-node-depth.js +9 -0
- package/dist/row-data-source-server/utils/get-node-path.d.ts +2 -0
- package/dist/row-data-source-server/utils/get-node-path.js +9 -0
- package/dist/row-data-source-server/utils/get-request-id.d.ts +1 -0
- package/dist/row-data-source-server/utils/get-request-id.js +6 -0
- package/dist/rows/row/context.d.ts +14 -0
- package/dist/rows/row/context.js +13 -0
- package/dist/rows/row/row.d.ts +7 -0
- package/dist/rows/row/row.js +25 -0
- package/dist/rows/row/use-row-context-value.d.ts +6 -0
- package/dist/rows/row/use-row-context-value.js +44 -0
- package/dist/rows/row-detail-row.d.ts +4 -0
- package/dist/rows/row-detail-row.js +130 -0
- package/dist/rows/row-full-width.d.ts +8 -0
- package/dist/rows/row-full-width.js +19 -0
- package/dist/rows/rows-container.d.ts +1 -0
- package/dist/rows/rows-container.js +9 -0
- package/dist/rows/rows-sections.d.ts +3 -0
- package/dist/rows/rows-sections.js +27 -0
- package/dist/rows/scrollers/native-scroller.d.ts +2 -0
- package/dist/rows/scrollers/native-scroller.js +4 -0
- package/dist/sort-manager/+types.d.ts +13 -0
- package/dist/sort-manager/+types.js +1 -0
- package/dist/sort-manager/context.d.ts +14 -0
- package/dist/sort-manager/context.js +5 -0
- package/dist/sort-manager/hooks/use-sort-manager.d.ts +15 -0
- package/dist/sort-manager/hooks/use-sort-manager.js +56 -0
- package/dist/sort-manager/hooks/use-sort-row-item.d.ts +51 -0
- package/dist/sort-manager/hooks/use-sort-row-item.js +145 -0
- package/dist/sort-manager/hooks/use-sortable-column-items.d.ts +5 -0
- package/dist/sort-manager/hooks/use-sortable-column-items.js +13 -0
- package/dist/sort-manager/root.d.ts +3 -0
- package/dist/sort-manager/root.js +14 -0
- package/dist/sort-manager/sort-add.d.ts +8 -0
- package/dist/sort-manager/sort-add.js +14 -0
- package/dist/sort-manager/sort-apply.d.ts +7 -0
- package/dist/sort-manager/sort-apply.js +24 -0
- package/dist/sort-manager/sort-cancel.d.ts +7 -0
- package/dist/sort-manager/sort-cancel.js +27 -0
- package/dist/sort-manager/sort-clear.d.ts +7 -0
- package/dist/sort-manager/sort-clear.js +22 -0
- package/dist/sort-manager/sort-column-select.d.ts +10 -0
- package/dist/sort-manager/sort-column-select.js +20 -0
- package/dist/sort-manager/sort-direction-select.d.ts +10 -0
- package/dist/sort-manager/sort-direction-select.js +24 -0
- package/dist/sort-manager/sort-manager.d.ts +16 -0
- package/dist/sort-manager/sort-manager.js +26 -0
- package/dist/sort-manager/sort-remove.d.ts +7 -0
- package/dist/sort-manager/sort-remove.js +14 -0
- package/dist/sort-manager/sort-row.d.ts +5 -0
- package/dist/sort-manager/sort-row.js +7 -0
- package/dist/sort-manager/sort-rows.d.ts +1 -0
- package/dist/sort-manager/sort-rows.js +6 -0
- package/dist/sort-manager/sort-value-select.d.ts +11 -0
- package/dist/sort-manager/sort-value-select.js +25 -0
- package/dist/sort-manager/utils/sort-item-to-sort-model.d.ts +3 -0
- package/dist/sort-manager/utils/sort-item-to-sort-model.js +62 -0
- package/dist/sort-manager/utils/sort-model-to-sort-items.d.ts +3 -0
- package/dist/sort-manager/utils/sort-model-to-sort-items.js +50 -0
- package/dist/state/+types.d.ts +35 -0
- package/dist/state/+types.js +1 -0
- package/dist/state/api/cell-root.d.ts +5 -0
- package/dist/state/api/cell-root.js +64 -0
- package/dist/state/api/column-autosize.d.ts +5 -0
- package/dist/state/api/column-autosize.js +72 -0
- package/dist/state/api/column-by-id.d.ts +2 -0
- package/dist/state/api/column-by-id.js +6 -0
- package/dist/state/api/column-field.d.ts +2 -0
- package/dist/state/api/column-field.js +23 -0
- package/dist/state/api/column-from-index.d.ts +2 -0
- package/dist/state/api/column-from-index.js +6 -0
- package/dist/state/api/column-group-toggle.d.ts +2 -0
- package/dist/state/api/column-group-toggle.js +10 -0
- package/dist/state/api/column-index.d.ts +2 -0
- package/dist/state/api/column-index.js +7 -0
- package/dist/state/api/column-move.d.ts +2 -0
- package/dist/state/api/column-move.js +49 -0
- package/dist/state/api/column-resize.d.ts +2 -0
- package/dist/state/api/column-resize.js +9 -0
- package/dist/state/api/column-update.d.ts +5 -0
- package/dist/state/api/column-update.js +26 -0
- package/dist/state/api/dialog-frame.d.ts +8 -0
- package/dist/state/api/dialog-frame.js +16 -0
- package/dist/state/api/edit-begin.d.ts +5 -0
- package/dist/state/api/edit-begin.js +87 -0
- package/dist/state/api/edit-end.d.ts +5 -0
- package/dist/state/api/edit-end.js +43 -0
- package/dist/state/api/edit-is-cell-active.d.ts +5 -0
- package/dist/state/api/edit-is-cell-active.js +22 -0
- package/dist/state/api/edit-update.d.ts +5 -0
- package/dist/state/api/edit-update.js +88 -0
- package/dist/state/api/event-listeners.d.ts +5 -0
- package/dist/state/api/event-listeners.js +19 -0
- package/dist/state/api/export-csv.d.ts +3 -0
- package/dist/state/api/export-csv.js +40 -0
- package/dist/state/api/export-data-rect.d.ts +2 -0
- package/dist/state/api/export-data-rect.js +24 -0
- package/dist/state/api/focus-cell.d.ts +5 -0
- package/dist/state/api/focus-cell.js +117 -0
- package/dist/state/api/popover-frame.d.ts +8 -0
- package/dist/state/api/popover-frame.js +16 -0
- package/dist/state/api/position-from-element.d.ts +2 -0
- package/dist/state/api/position-from-element.js +9 -0
- package/dist/state/api/row-by-id.d.ts +2 -0
- package/dist/state/api/row-by-id.js +5 -0
- package/dist/state/api/row-by-index.d.ts +2 -0
- package/dist/state/api/row-by-index.js +9 -0
- package/dist/state/api/row-detail-is-expanded.d.ts +2 -0
- package/dist/state/api/row-detail-is-expanded.js +6 -0
- package/dist/state/api/row-detail-rendered-height.d.ts +5 -0
- package/dist/state/api/row-detail-rendered-height.js +14 -0
- package/dist/state/api/row-detail-toggle.d.ts +2 -0
- package/dist/state/api/row-detail-toggle.js +32 -0
- package/dist/state/api/row-group-apply-expansions.d.ts +2 -0
- package/dist/state/api/row-group-apply-expansions.js +20 -0
- package/dist/state/api/row-group-column-index.d.ts +2 -0
- package/dist/state/api/row-group-column-index.js +14 -0
- package/dist/state/api/row-group-is-expanded.d.ts +2 -0
- package/dist/state/api/row-group-is-expanded.js +15 -0
- package/dist/state/api/row-group-toggle.d.ts +2 -0
- package/dist/state/api/row-group-toggle.js +7 -0
- package/dist/state/api/row-handle-select.d.ts +5 -0
- package/dist/state/api/row-handle-select.js +43 -0
- package/dist/state/api/row-select-all.d.ts +2 -0
- package/dist/state/api/row-select-all.js +17 -0
- package/dist/state/api/row-select.d.ts +5 -0
- package/dist/state/api/row-select.js +35 -0
- package/dist/state/api/row-selected.d.ts +2 -0
- package/dist/state/api/row-selected.js +13 -0
- package/dist/state/api/scroll-into-view.d.ts +5 -0
- package/dist/state/api/scroll-into-view.js +50 -0
- package/dist/state/api/sort-for-column.d.ts +2 -0
- package/dist/state/api/sort-for-column.js +9 -0
- package/dist/state/api/use-row-drag.d.ts +2 -0
- package/dist/state/api/use-row-drag.js +27 -0
- package/dist/state/helpers/cell-row-group.d.ts +2 -0
- package/dist/state/helpers/cell-row-group.js +19 -0
- package/dist/state/helpers/column-add-row-group.d.ts +10 -0
- package/dist/state/helpers/column-add-row-group.js +74 -0
- package/dist/state/helpers/column-layout.d.ts +3 -0
- package/dist/state/helpers/column-layout.js +59 -0
- package/dist/state/helpers/column-marker.d.ts +8 -0
- package/dist/state/helpers/column-marker.js +43 -0
- package/dist/state/helpers/column-view.d.ts +21 -0
- package/dist/state/helpers/column-view.js +33 -0
- package/dist/state/helpers/edit-on-change.d.ts +15 -0
- package/dist/state/helpers/edit-on-change.js +27 -0
- package/dist/state/helpers/empty-row-data-source.d.ts +2 -0
- package/dist/state/helpers/empty-row-data-source.js +18 -0
- package/dist/state/helpers/get-data-rect.d.ts +13 -0
- package/dist/state/helpers/get-data-rect.js +65 -0
- package/dist/state/helpers/get-full-width-callback.d.ts +2 -0
- package/dist/state/helpers/get-full-width-callback.js +10 -0
- package/dist/state/helpers/get-span-callback.d.ts +2 -0
- package/dist/state/helpers/get-span-callback.js +22 -0
- package/dist/state/helpers/resolve-column.d.ts +4 -0
- package/dist/state/helpers/resolve-column.js +29 -0
- package/dist/state/helpers/row-layout/get-focus-criteria.d.ts +17 -0
- package/dist/state/helpers/row-layout/get-focus-criteria.js +62 -0
- package/dist/state/helpers/row-layout/row-layout.d.ts +19 -0
- package/dist/state/helpers/row-layout/row-layout.js +181 -0
- package/dist/state/use-lytenyte.d.ts +3 -0
- package/dist/state/use-lytenyte.js +671 -0
- package/dist/tree-view/branch/branch.d.ts +14 -0
- package/dist/tree-view/branch/branch.js +63 -0
- package/dist/tree-view/branch/use-branch-keys.d.ts +2 -0
- package/dist/tree-view/branch/use-branch-keys.js +87 -0
- package/dist/tree-view/context.d.ts +22 -0
- package/dist/tree-view/context.js +3 -0
- package/dist/tree-view/depth-provider.d.ts +2 -0
- package/dist/tree-view/depth-provider.js +3 -0
- package/dist/tree-view/hooks/use-tree-view-paths.d.ts +2 -0
- package/dist/tree-view/hooks/use-tree-view-paths.js +9 -0
- package/dist/tree-view/index.d.ts +16 -0
- package/dist/tree-view/index.js +16 -0
- package/dist/tree-view/leaf.d.ts +4 -0
- package/dist/tree-view/leaf.js +28 -0
- package/dist/tree-view/navigation/get-all-ids.d.ts +1 -0
- package/dist/tree-view/navigation/get-all-ids.js +7 -0
- package/dist/tree-view/navigation/get-first-node.d.ts +1 -0
- package/dist/tree-view/navigation/get-first-node.js +7 -0
- package/dist/tree-view/navigation/get-last-node.d.ts +1 -0
- package/dist/tree-view/navigation/get-last-node.js +7 -0
- package/dist/tree-view/navigation/get-next-node.d.ts +1 -0
- package/dist/tree-view/navigation/get-next-node.js +13 -0
- package/dist/tree-view/navigation/get-prev-node.d.ts +1 -0
- package/dist/tree-view/navigation/get-prev-node.js +13 -0
- package/dist/tree-view/panel/make-handle-navigation.d.ts +2 -0
- package/dist/tree-view/panel/make-handle-navigation.js +39 -0
- package/dist/tree-view/panel/make-handle-selection.d.ts +2 -0
- package/dist/tree-view/panel/make-handle-selection.js +92 -0
- package/dist/tree-view/panel/make-handle-typeahead.d.ts +1 -0
- package/dist/tree-view/panel/make-handle-typeahead.js +45 -0
- package/dist/tree-view/panel/panel.d.ts +1 -0
- package/dist/tree-view/panel/panel.js +30 -0
- package/dist/tree-view/panel/use-tree-navigation.d.ts +1 -0
- package/dist/tree-view/panel/use-tree-navigation.js +63 -0
- package/dist/tree-view/root.d.ts +17 -0
- package/dist/tree-view/root.js +63 -0
- package/dist/tree-view/utils/get-focusable-nodes.d.ts +1 -0
- package/dist/tree-view/utils/get-focusable-nodes.js +5 -0
- package/dist/tree-view/utils/get-focused-node.d.ts +1 -0
- package/dist/tree-view/utils/get-focused-node.js +14 -0
- package/dist/tree-view/utils/get-ids-between-nodes.d.ts +1 -0
- package/dist/tree-view/utils/get-ids-between-nodes.js +15 -0
- package/dist/tree-view/utils/get-panel.d.ts +1 -0
- package/dist/tree-view/utils/get-panel.js +7 -0
- package/dist/tree-view/utils/get-parent-node.d.ts +1 -0
- package/dist/tree-view/utils/get-parent-node.js +10 -0
- package/dist/tree-view/utils/get-sibling-branches.d.ts +1 -0
- package/dist/tree-view/utils/get-sibling-branches.js +14 -0
- package/dist/tree-view/utils/get-tree-node-id.d.ts +1 -0
- package/dist/tree-view/utils/get-tree-node-id.js +3 -0
- package/dist/tree-view/utils/is-branch-node.d.ts +1 -0
- package/dist/tree-view/utils/is-branch-node.js +3 -0
- package/dist/tree-view/utils/is-leaf-node.d.ts +1 -0
- package/dist/tree-view/utils/is-leaf-node.js +3 -0
- package/dist/tree-view/utils/is-tree-node-disabled.d.ts +1 -0
- package/dist/tree-view/utils/is-tree-node-disabled.js +3 -0
- package/dist/tree-view/utils/select-node.d.ts +2 -0
- package/dist/tree-view/utils/select-node.js +15 -0
- package/dist/tree-view/utils/toggle-all-selections.d.ts +2 -0
- package/dist/tree-view/utils/toggle-all-selections.js +9 -0
- package/dist/tree-view/utils/toggle-selection.d.ts +2 -0
- package/dist/tree-view/utils/toggle-selection.js +21 -0
- package/dist/tree-view/virtualized/force-sync-scrolling.d.ts +2 -0
- package/dist/tree-view/virtualized/force-sync-scrolling.js +23 -0
- package/dist/tree-view/virtualized/get-virtual-tree-paths.d.ts +2 -0
- package/dist/tree-view/virtualized/get-virtual-tree-paths.js +14 -0
- package/dist/tree-view/virtualized/make-virtual-tree.d.ts +31 -0
- package/dist/tree-view/virtualized/make-virtual-tree.js +90 -0
- package/dist/tree-view/virtualized/use-flattened-tree.d.ts +9 -0
- package/dist/tree-view/virtualized/use-flattened-tree.js +36 -0
- package/dist/tree-view/virtualized/use-row-start-and-end.d.ts +2 -0
- package/dist/tree-view/virtualized/use-row-start-and-end.js +27 -0
- package/dist/tree-view/virtualized/use-virtualized-tree.d.ts +22 -0
- package/dist/tree-view/virtualized/use-virtualized-tree.js +100 -0
- package/dist/types/types.d.ts +8 -0
- package/dist/types/types.js +1 -0
- package/dist/utils/cycle-sorts.d.ts +2 -0
- package/dist/utils/cycle-sorts.js +16 -0
- package/dist/viewport/begin-editing.d.ts +5 -0
- package/dist/viewport/begin-editing.js +15 -0
- package/dist/viewport/viewport.d.ts +1 -0
- package/dist/viewport/viewport.js +78 -0
- package/package.json +7 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Header: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { useGridRoot } from "../context.js";
|
|
4
|
+
import { fastDeepMemo } from "@1771technologies/lytenyte-react-hooks";
|
|
5
|
+
import { HeaderReact } from "@1771technologies/lytenyte-shared";
|
|
6
|
+
const HeaderImpl = forwardRef(function Header(props, forwarded) {
|
|
7
|
+
const grid = useGridRoot().grid;
|
|
8
|
+
const xPositions = grid.state.xPositions.useValue();
|
|
9
|
+
const columnVisible = grid.state.columnMeta.useValue();
|
|
10
|
+
return (_jsx(HeaderReact, { ...props, ref: forwarded, floatingRowEnabled: grid.state.floatingRowEnabled.useValue(), floatingRowHeight: grid.state.floatingRowHeight.useValue(), headerGroupHeight: grid.state.headerGroupHeight.useValue(), headerHeight: grid.state.headerHeight.useValue(), rows: grid.internal.headerRows.useValue(), xPositions: xPositions, countBeforeEnd: columnVisible.columnVisibleCenterCount + columnVisible.columnVisibleStartCount, width: grid.state.widthTotal.useValue() }));
|
|
11
|
+
});
|
|
12
|
+
export const Header = fastDeepMemo(HeaderImpl);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type SlotComponent } from "@1771technologies/lytenyte-react-hooks";
|
|
2
|
+
import type { HeaderCellLayout } from "../+types";
|
|
3
|
+
import { type CSSProperties } from "react";
|
|
4
|
+
interface ResizeHandlerProps<T> {
|
|
5
|
+
readonly as?: SlotComponent;
|
|
6
|
+
readonly cell: HeaderCellLayout<T>;
|
|
7
|
+
readonly xPositions: Uint32Array;
|
|
8
|
+
readonly className?: string;
|
|
9
|
+
readonly style?: CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
export declare function ResizeHandler<T>({ as, cell, xPositions, style, className, }: ResizeHandlerProps<T>): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useSlot } from "@1771technologies/lytenyte-react-hooks";
|
|
3
|
+
import {} from "react";
|
|
4
|
+
import { DEFAULT_COLUMN_WIDTH_MAX, DEFAULT_COLUMN_WIDTH_MIN, sizeFromCoord, } from "@1771technologies/lytenyte-shared";
|
|
5
|
+
import { useGridRoot } from "../context.js";
|
|
6
|
+
import { getComputedStyle } from "@1771technologies/lytenyte-dom-utils";
|
|
7
|
+
import { clamp, getClientX } from "@1771technologies/lytenyte-js-utils";
|
|
8
|
+
export function ResizeHandler({ as, cell, xPositions, style, className, }) {
|
|
9
|
+
const width = sizeFromCoord(cell.colStart, xPositions, cell.colSpan);
|
|
10
|
+
const sx = useGridRoot().grid;
|
|
11
|
+
const double = sx.state.columnDoubleClickToAutosize.useValue();
|
|
12
|
+
const defaultProps = {
|
|
13
|
+
role: "button",
|
|
14
|
+
"data-ln-header-resizer": "true",
|
|
15
|
+
"aria-label": `Resize ${cell.column.name ?? cell.column.id}`,
|
|
16
|
+
tabIndex: -1,
|
|
17
|
+
onDoubleClick: () => {
|
|
18
|
+
if (!double)
|
|
19
|
+
return;
|
|
20
|
+
sx.api.columnAutosize({
|
|
21
|
+
columns: [cell.column],
|
|
22
|
+
includeHeader: true,
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
onPointerDown: (ev) => {
|
|
26
|
+
const vp = sx.state.viewport.get();
|
|
27
|
+
if (!vp)
|
|
28
|
+
return;
|
|
29
|
+
if (ev.pointerType === "mouse" && ev.button !== 0)
|
|
30
|
+
return;
|
|
31
|
+
ev.preventDefault();
|
|
32
|
+
ev.stopPropagation();
|
|
33
|
+
const isRtl = sx.state.rtl.get();
|
|
34
|
+
let startX = null;
|
|
35
|
+
let anim = null;
|
|
36
|
+
const style = getComputedStyle(vp);
|
|
37
|
+
const overflow = style.overflowX;
|
|
38
|
+
vp.style.overflowX = "hidden";
|
|
39
|
+
const base = sx.state.columnBase.get();
|
|
40
|
+
const minWidth = cell.column.widthMin ?? base.widthMin ?? DEFAULT_COLUMN_WIDTH_MIN;
|
|
41
|
+
const maxWidth = cell.column.widthMax ?? base.widthMax ?? DEFAULT_COLUMN_WIDTH_MAX;
|
|
42
|
+
const maxDelta = maxWidth - width;
|
|
43
|
+
const minDelta = minWidth - width;
|
|
44
|
+
const deltaRef = { current: 0 };
|
|
45
|
+
const controller = new AbortController();
|
|
46
|
+
document.addEventListener("pointermove", (ev) => {
|
|
47
|
+
if (startX === null) {
|
|
48
|
+
startX = getClientX(ev);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const endAdjust = cell.colPin === "end" ? -1 : 1;
|
|
52
|
+
const rtlAdjust = isRtl ? -1 : 1;
|
|
53
|
+
deltaRef.current = clamp(minDelta, (getClientX(ev) - startX) * endAdjust * rtlAdjust, maxDelta);
|
|
54
|
+
if (anim)
|
|
55
|
+
return;
|
|
56
|
+
anim = requestAnimationFrame(() => {
|
|
57
|
+
const newWidth = width + deltaRef.current;
|
|
58
|
+
sx.api.columnResize({ [cell.id]: newWidth });
|
|
59
|
+
// TODO @Mike: the below method is a much faster, but potentially much tricky way to get resizing done. We should investigate
|
|
60
|
+
// the best approach to lever this. The main issues are around resizing group headers and ensuring column cells pinned to the
|
|
61
|
+
// end of the grid do not get shifted.
|
|
62
|
+
// const id = sx.state.gridId.get();
|
|
63
|
+
// const query = `[data-ln-row][data-ln-gridid="${id}"] [data-ln-cell="true"][data-ln-colindex="${cell.colStart}"]`;
|
|
64
|
+
// const headerQuery = `[data-ln-header-row] [data-ln-header-cell="true"][data-ln-header-id="${cell.id}"]`;
|
|
65
|
+
// const floatingQuery = `[data-ln-header-row] [data-ln-header-cell="true"][data-ln-header-id="${cell.id}"][data-ln-header-floating="true"]`;
|
|
66
|
+
// const header = vp.querySelector(headerQuery) as HTMLElement;
|
|
67
|
+
// const floating = vp.querySelector(floatingQuery) as HTMLElement | undefined;
|
|
68
|
+
// if (!header) return;
|
|
69
|
+
// const pin = header.getAttribute("data-ln-pin");
|
|
70
|
+
// const cells = Array.from(vp.querySelectorAll(query)) as HTMLElement[];
|
|
71
|
+
// const headers = [header];
|
|
72
|
+
// if (floating) headers.push(floating);
|
|
73
|
+
// headers.forEach((c) => {
|
|
74
|
+
// if (!isHTMLElement(c)) return;
|
|
75
|
+
// c.style.removeProperty("min-width");
|
|
76
|
+
// c.style.removeProperty("max-width");
|
|
77
|
+
// c.style.width = `${width + deltaRef.current}px`;
|
|
78
|
+
// if (pin === "end") {
|
|
79
|
+
// const viewportWidth = sx.state.viewportWidthInner.get();
|
|
80
|
+
// const spaceLeft = xPositions.at(-1)! - xPositions[cell.colStart];
|
|
81
|
+
// const x = viewportWidth - spaceLeft - deltaRef.current;
|
|
82
|
+
// c.style.transform = getTranslate(isRtl ? -x : x, 0);
|
|
83
|
+
// }
|
|
84
|
+
// });
|
|
85
|
+
// const widthPx = `${width + deltaRef.current}px`;
|
|
86
|
+
// cells.forEach((c) => {
|
|
87
|
+
// if (!isHTMLElement(c)) return;
|
|
88
|
+
// c.style.minWidth = widthPx;
|
|
89
|
+
// c.style.maxWidth = widthPx;
|
|
90
|
+
// c.style.width = widthPx;
|
|
91
|
+
// });
|
|
92
|
+
// const headerAfterQuery = `${headerQuery} ~ [data-ln-header-cell="true"]`;
|
|
93
|
+
// let after: HTMLElement[];
|
|
94
|
+
// if (pin !== "end") {
|
|
95
|
+
// after = Array.from(vp.querySelectorAll(headerAfterQuery)) as HTMLElement[];
|
|
96
|
+
// } else {
|
|
97
|
+
// after = [];
|
|
98
|
+
// }
|
|
99
|
+
// after.forEach((c) => {
|
|
100
|
+
// if (!isHTMLElement(c)) return;
|
|
101
|
+
// const thisPin = c.getAttribute("data-ln-pin");
|
|
102
|
+
// if (pin === "end" && thisPin === "end") return;
|
|
103
|
+
// if (pin !== "end" && thisPin === "end") return;
|
|
104
|
+
// const colindex = getColIndexFromEl(c);
|
|
105
|
+
// const transform = xPositions[colindex] + deltaRef.current;
|
|
106
|
+
// c.style.transform = getTranslate(transform * (isRtl ? -1 : 1), 0);
|
|
107
|
+
// });
|
|
108
|
+
anim = null;
|
|
109
|
+
});
|
|
110
|
+
}, { signal: controller.signal });
|
|
111
|
+
window.addEventListener("pointerup", () => {
|
|
112
|
+
if (anim)
|
|
113
|
+
cancelAnimationFrame(anim);
|
|
114
|
+
controller.abort();
|
|
115
|
+
vp.style.overflowX = overflow;
|
|
116
|
+
const newWidth = width + deltaRef.current;
|
|
117
|
+
sx.api.columnResize({ [cell.id]: newWidth });
|
|
118
|
+
}, { signal: controller.signal });
|
|
119
|
+
},
|
|
120
|
+
className,
|
|
121
|
+
style: {
|
|
122
|
+
height: "100%",
|
|
123
|
+
width: "6px",
|
|
124
|
+
...style,
|
|
125
|
+
top: "0px",
|
|
126
|
+
insetInlineEnd: cell.colPin !== "end" ? "0px" : undefined,
|
|
127
|
+
insetInlineStart: cell.colPin === "end" ? "0px" : undefined,
|
|
128
|
+
position: "absolute",
|
|
129
|
+
},
|
|
130
|
+
};
|
|
131
|
+
const edge = useSlot({
|
|
132
|
+
props: [defaultProps],
|
|
133
|
+
slot: as ?? _jsx("div", {}),
|
|
134
|
+
});
|
|
135
|
+
return edge;
|
|
136
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Grid, HeaderCellFloating, HeaderCellLayout, HeaderGroupCellLayout } from "../+types.js";
|
|
2
|
+
import { type JSX } from "react";
|
|
3
|
+
import type { InternalAtoms } from "../state/+types.js";
|
|
4
|
+
export declare function useDragMove<T>(grid: Grid<T> & {
|
|
5
|
+
internal: InternalAtoms;
|
|
6
|
+
}, cell: HeaderGroupCellLayout | HeaderCellLayout<T> | HeaderCellFloating<T>, onDragStart?: JSX.IntrinsicElements["div"]["onDragStart"]): {
|
|
7
|
+
draggable?: undefined;
|
|
8
|
+
onDragStart?: undefined;
|
|
9
|
+
ref?: undefined;
|
|
10
|
+
} | {
|
|
11
|
+
draggable: true;
|
|
12
|
+
onDragStart: (e: import("react").DragEvent<Element>) => void;
|
|
13
|
+
ref: any;
|
|
14
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { COLUMN_MARKER_ID, getHoveredColumnIndex, getNearestFocusable, GROUP_COLUMN_PREFIX, useDraggable, } from "@1771technologies/lytenyte-shared";
|
|
2
|
+
import { useMemo, useRef } from "react";
|
|
3
|
+
export function useDragMove(grid, cell, onDragStart) {
|
|
4
|
+
const ctx = grid.state;
|
|
5
|
+
const meta = ctx.columnMeta.useValue();
|
|
6
|
+
const base = ctx.columnBase.useValue();
|
|
7
|
+
const columns = useMemo(() => {
|
|
8
|
+
const columns = [];
|
|
9
|
+
for (let i = cell.colStart; i < cell.colEnd; i++) {
|
|
10
|
+
columns.push(meta.columnsVisible[i]);
|
|
11
|
+
}
|
|
12
|
+
return columns;
|
|
13
|
+
}, [cell.colEnd, cell.colStart, meta.columnsVisible]);
|
|
14
|
+
const isMovable = useMemo(() => {
|
|
15
|
+
return columns.every((c) => !c.id.startsWith(GROUP_COLUMN_PREFIX) &&
|
|
16
|
+
c.id !== COLUMN_MARKER_ID &&
|
|
17
|
+
(c.uiHints?.movable ?? base.uiHints?.movable ?? false));
|
|
18
|
+
}, [base.uiHints?.movable, columns]);
|
|
19
|
+
const swapDirection = useRef(null);
|
|
20
|
+
const swapIndex = useRef(-1);
|
|
21
|
+
const swapPrevIndex = useRef(-1);
|
|
22
|
+
const isForward = useRef(false);
|
|
23
|
+
const prevPos = useRef(-1);
|
|
24
|
+
const { dragProps } = useDraggable({
|
|
25
|
+
getItems: () => ({}),
|
|
26
|
+
onDragStart: () => {
|
|
27
|
+
if (cell.kind === "group")
|
|
28
|
+
grid.internal.draggingHeader.set(cell);
|
|
29
|
+
},
|
|
30
|
+
onDragEnd: () => {
|
|
31
|
+
grid.internal.draggingHeader.set(null);
|
|
32
|
+
},
|
|
33
|
+
onDragMove: (p) => {
|
|
34
|
+
const element = document.elementFromPoint(p.position.x, p.position.y);
|
|
35
|
+
const vp = grid.state.viewport.get();
|
|
36
|
+
if (!vp?.contains(element))
|
|
37
|
+
return;
|
|
38
|
+
const nearest = getNearestFocusable(element);
|
|
39
|
+
if (!nearest)
|
|
40
|
+
return;
|
|
41
|
+
if (prevPos.current < p.position.x)
|
|
42
|
+
isForward.current = true;
|
|
43
|
+
if (prevPos.current > p.position.x)
|
|
44
|
+
isForward.current = false;
|
|
45
|
+
prevPos.current = p.position.x;
|
|
46
|
+
const meta = grid.state.columnMeta.get();
|
|
47
|
+
const index = getHoveredColumnIndex({
|
|
48
|
+
viewport: vp,
|
|
49
|
+
centerCount: meta.columnVisibleCenterCount,
|
|
50
|
+
startCount: meta.columnVisibleStartCount,
|
|
51
|
+
endCount: meta.columnVisibleEndCount,
|
|
52
|
+
clientX: p.position.x,
|
|
53
|
+
rtl: grid.state.rtl.get(),
|
|
54
|
+
xPositions: grid.state.xPositions.get(),
|
|
55
|
+
});
|
|
56
|
+
if (index == null)
|
|
57
|
+
return;
|
|
58
|
+
const columnTarget = grid.api.columnByIndex(index);
|
|
59
|
+
if (columnTarget) {
|
|
60
|
+
if (columnTarget.id === COLUMN_MARKER_ID || columnTarget.id.startsWith(GROUP_COLUMN_PREFIX))
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const first = columns[0];
|
|
64
|
+
const currentIndex = grid.api.columnIndex(first);
|
|
65
|
+
const columnIndices = columns.map((c) => grid.api.columnIndex(c));
|
|
66
|
+
if (columnIndices.includes(index))
|
|
67
|
+
return;
|
|
68
|
+
const ignoreMove = swapDirection.current === isForward.current &&
|
|
69
|
+
swapIndex.current === currentIndex &&
|
|
70
|
+
index === swapPrevIndex.current;
|
|
71
|
+
if (currentIndex === index || ignoreMove)
|
|
72
|
+
return;
|
|
73
|
+
swapDirection.current = isForward.current;
|
|
74
|
+
swapIndex.current = index;
|
|
75
|
+
swapPrevIndex.current = currentIndex;
|
|
76
|
+
grid.api.columnMove({
|
|
77
|
+
moveColumns: columns,
|
|
78
|
+
moveTarget: index,
|
|
79
|
+
before: currentIndex > index,
|
|
80
|
+
updatePinState: true,
|
|
81
|
+
});
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
const finalProps = useMemo(() => {
|
|
85
|
+
if (cell.kind === "floating" || !isMovable)
|
|
86
|
+
return {};
|
|
87
|
+
return {
|
|
88
|
+
draggable: true,
|
|
89
|
+
onDragStart: (e) => {
|
|
90
|
+
onDragStart?.(e);
|
|
91
|
+
dragProps.onDragStart(e);
|
|
92
|
+
},
|
|
93
|
+
ref: dragProps.ref,
|
|
94
|
+
};
|
|
95
|
+
}, [cell.kind, dragProps, isMovable, onDragStart]);
|
|
96
|
+
return finalProps;
|
|
97
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { HeaderCellFloating, HeaderCellLayout, HeaderCellRendererParams } from "../+types";
|
|
2
|
+
declare function DefaultRenderer(p: HeaderCellRendererParams<any>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function useHeaderCellRenderer<T>(cell: HeaderCellLayout<T> | HeaderCellFloating<T>): import("../+types").HeaderFloatingCellRendererFn<any> | import("../+types").HeaderCellRendererFn<T> | typeof DefaultRenderer;
|
|
4
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { useGridRoot } from "../context.js";
|
|
4
|
+
function DefaultRenderer(p) {
|
|
5
|
+
return _jsx(_Fragment, { children: p.column.name ?? p.column.id });
|
|
6
|
+
}
|
|
7
|
+
export function useHeaderCellRenderer(cell) {
|
|
8
|
+
const ctx = useGridRoot().grid;
|
|
9
|
+
const base = ctx.state.columnBase.useValue();
|
|
10
|
+
const floatingRenderers = ctx.state.floatingCellRenderers.useValue();
|
|
11
|
+
const headerRenderers = ctx.state.headerCellRenderers.useValue();
|
|
12
|
+
return useMemo(() => {
|
|
13
|
+
if (cell.kind === "cell") {
|
|
14
|
+
const renderer = cell.column.headerRenderer ?? base.headerRenderer ?? DefaultRenderer;
|
|
15
|
+
if (typeof renderer === "string")
|
|
16
|
+
return headerRenderers[renderer] ?? DefaultRenderer;
|
|
17
|
+
else
|
|
18
|
+
return renderer;
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
const renderer = cell.column.floatingCellRenderer ?? base.floatingCellRenderer ?? DefaultRenderer;
|
|
22
|
+
if (typeof renderer === "string")
|
|
23
|
+
return floatingRenderers[renderer] ?? DefaultRenderer;
|
|
24
|
+
else
|
|
25
|
+
return renderer;
|
|
26
|
+
}
|
|
27
|
+
}, [
|
|
28
|
+
base.floatingCellRenderer,
|
|
29
|
+
base.headerRenderer,
|
|
30
|
+
cell.column.floatingCellRenderer,
|
|
31
|
+
cell.column.headerRenderer,
|
|
32
|
+
cell.kind,
|
|
33
|
+
floatingRenderers,
|
|
34
|
+
headerRenderers,
|
|
35
|
+
]);
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AddIcon, AddSmallIcon, AggregateIcon, AggregationIcon, ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightCurvedIcon, ArrowRightIcon, ArrowUpIcon, AutosizeIcon, BackIcon, BookmarkIcon, BooleanIcon, CalendarIcon, ChartIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, Close2Icon, CloseIcon, CollapseGroupIcon, Columns2Icon, ColumnsIcon, CopyIcon, CornerRadiusIcon, CustomizeThemeIcon, CutIcon, CsvIcon, DeleteIcon, DocsIcon, DownloadIcon, Drag2Icon, DragDotsIcon, DragDotsSmallIcon, DragIcon, DuplicateIcon, EditIcon, EmailIcon, ExcelIcon, ExpandGroupIcon, ExpandIcon, Expression2Icon, ExpressionIcon, ExternalLinkIcon, File2Icon, FileIcon, FilterIcon, FolderIcon, GlobeIcon, GridViewIcon, GroupByColIcon, HamburgerIcon, HelpIcon, HiddenIcon, HistoryIcon, ImportIcon, LinkIcon, ListViewIcon, LoadingIcon, LocationIcon, ModalIcon, MoreIcon, MoreVerticalIcon, MultilineIcon, NumberIcon, PasteIcon, PieIcon, PinColumnIcon, RefreshIcon, SearchIcon, SettingsIcon, ShareIcon, SingleLineIcon, Sort2Icon, SortIcon, SpacingHIcon, SpacingIcon, StickColumnIcon, SwapIcon, TagIcon, TaskIcon, TextIcon, ThemesIcon, Tickmark2Icon, TickmarkIcon, TimeIcon, UploadIcon, UserIcon, ViewIcon, } from "@1771technologies/lytenyte-core/icons";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { AddIcon, AddSmallIcon, AggregateIcon, AggregationIcon, ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightCurvedIcon, ArrowRightIcon, ArrowUpIcon, AutosizeIcon, BackIcon, BookmarkIcon, BooleanIcon, CalendarIcon, ChartIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, Close2Icon, CloseIcon, CollapseGroupIcon, Columns2Icon, ColumnsIcon, CopyIcon, CornerRadiusIcon, CustomizeThemeIcon, CutIcon, CsvIcon, DeleteIcon, DocsIcon, DownloadIcon, Drag2Icon, DragDotsIcon, DragDotsSmallIcon, DragIcon, DuplicateIcon, EditIcon, EmailIcon, ExcelIcon, ExpandGroupIcon, ExpandIcon, Expression2Icon, ExpressionIcon, ExternalLinkIcon, File2Icon, FileIcon, FilterIcon, FolderIcon, GlobeIcon, GridViewIcon, GroupByColIcon, HamburgerIcon, HelpIcon, HiddenIcon, HistoryIcon, ImportIcon, LinkIcon, ListViewIcon, LoadingIcon, LocationIcon, ModalIcon, MoreIcon, MoreVerticalIcon, MultilineIcon, NumberIcon, PasteIcon, PieIcon, PinColumnIcon, RefreshIcon, SearchIcon, SettingsIcon, ShareIcon, SingleLineIcon, Sort2Icon, SortIcon, SpacingHIcon, SpacingIcon, StickColumnIcon, SwapIcon, TagIcon, TaskIcon, TextIcon, ThemesIcon, Tickmark2Icon, TickmarkIcon, TimeIcon, UploadIcon, UserIcon, ViewIcon,
|
|
2
|
+
// eslint-disable-next-line import/extensions
|
|
3
|
+
} from "@1771technologies/lytenyte-core/icons";
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { GROUP_COLUMN_PREFIX, COLUMN_MARKER_ID, GROUP_COLUMN_SINGLE_ID, GROUP_COLUMN_MULTI_PREFIX, } from "@1771technologies/lytenyte-shared";
|
|
2
|
+
export { Grid } from "./grid.js";
|
|
3
|
+
export { SortManager } from "./sort-manager/sort-manager.js";
|
|
4
|
+
export { FilterTree } from "./filter-tree/filter-tree.js";
|
|
5
|
+
export { ColumnManager } from "./column-manager/column-manager.js";
|
|
6
|
+
export { GridBox } from "./grid-box/grid-box.js";
|
|
7
|
+
export { DropWrap } from "@1771technologies/lytenyte-dragon";
|
|
8
|
+
export { activateLicense } from "./license.js";
|
|
9
|
+
export { measureText } from "@1771technologies/lytenyte-shared";
|
|
10
|
+
export { makeClientDataSource, useClientRowDataSource, } from "./row-data-source-client/use-client-data-source.js";
|
|
11
|
+
export { makeClientDataSourcePaginated, useClientRowDataSourcePaginated, } from "./row-data-source-client/use-client-data-source-paginated.js";
|
|
12
|
+
export { makeClientTreeDataSource, useClientTreeDataSource, } from "./row-data-source-client/use-client-tree-data-source.js";
|
|
13
|
+
export { makeServerDataSource, useServerDataSource, } from "./row-data-source-server/use-server-data-source.js";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { GROUP_COLUMN_PREFIX, COLUMN_MARKER_ID, GROUP_COLUMN_SINGLE_ID, GROUP_COLUMN_MULTI_PREFIX, } from "@1771technologies/lytenyte-shared";
|
|
2
|
+
export { Grid } from "./grid.js";
|
|
3
|
+
export { SortManager } from "./sort-manager/sort-manager.js";
|
|
4
|
+
export { FilterTree } from "./filter-tree/filter-tree.js";
|
|
5
|
+
export { ColumnManager } from "./column-manager/column-manager.js";
|
|
6
|
+
export { GridBox } from "./grid-box/grid-box.js";
|
|
7
|
+
export { DropWrap } from "@1771technologies/lytenyte-dragon";
|
|
8
|
+
export { activateLicense } from "./license.js";
|
|
9
|
+
export { measureText } from "@1771technologies/lytenyte-shared";
|
|
10
|
+
export { makeClientDataSource, useClientRowDataSource, } from "./row-data-source-client/use-client-data-source.js";
|
|
11
|
+
export { makeClientDataSourcePaginated, useClientRowDataSourcePaginated, } from "./row-data-source-client/use-client-data-source-paginated.js";
|
|
12
|
+
export { makeClientTreeDataSource, useClientTreeDataSource, } from "./row-data-source-client/use-client-tree-data-source.js";
|
|
13
|
+
export { makeServerDataSource, useServerDataSource, } from "./row-data-source-server/use-server-data-source.js";
|
package/dist/license.js
ADDED
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
const hashSalt = "faec0f3c45281b1fe12d87e64a6c3271";
|
|
2
|
+
const issueDate = new Date("2025-09-11");
|
|
3
|
+
function getHostname() {
|
|
4
|
+
const win = globalThis?.document?.defaultView || (typeof window !== "undefined" ? window : null);
|
|
5
|
+
const loc = win?.location;
|
|
6
|
+
const { hostname = "" } = loc ?? {};
|
|
7
|
+
return hostname;
|
|
8
|
+
}
|
|
9
|
+
function isWebsiteUrl() {
|
|
10
|
+
const hostname = getHostname();
|
|
11
|
+
return hostname.match(/^((?:\w+\.)?1771technologies\.com)$/) !== null;
|
|
12
|
+
}
|
|
13
|
+
function isLocalhost() {
|
|
14
|
+
const hostname = getHostname();
|
|
15
|
+
return hostname.match(/^(?:127\.0\.0\.1|localhost)$/) !== null;
|
|
16
|
+
}
|
|
17
|
+
export let hasAValidLicense = isWebsiteUrl() || isLocalhost();
|
|
18
|
+
export let licenseState = null;
|
|
19
|
+
export function activateLicense(license) {
|
|
20
|
+
const parts = license.split("|");
|
|
21
|
+
const details = parts[0];
|
|
22
|
+
const hash = parts[1];
|
|
23
|
+
const detailHash = new MD5().md5(details + hashSalt);
|
|
24
|
+
if (detailHash !== hash) {
|
|
25
|
+
console.error(`
|
|
26
|
+
********************************************************************************
|
|
27
|
+
LyteNyte Grid PRO
|
|
28
|
+
|
|
29
|
+
Invalid license key. Please verify the key and try again.
|
|
30
|
+
|
|
31
|
+
Visit https://1771technolgies.com for more information.
|
|
32
|
+
********************************************************************************
|
|
33
|
+
`);
|
|
34
|
+
licenseState = "invalid";
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
const detailParts = details.split(" ");
|
|
38
|
+
const endDate = new Date(detailParts[1]);
|
|
39
|
+
if (issueDate > endDate) {
|
|
40
|
+
console.error(`
|
|
41
|
+
********************************************************************************
|
|
42
|
+
LyteNyte Grid PRO
|
|
43
|
+
|
|
44
|
+
License key expired. Your license covers earlier versions only.
|
|
45
|
+
|
|
46
|
+
Visit https://1771technolgies.com for more information.
|
|
47
|
+
********************************************************************************
|
|
48
|
+
`);
|
|
49
|
+
licenseState = "expired";
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
hasAValidLicense = true;
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
// see: https://www.myersdaily.org/joseph/javascript/md5-text.html
|
|
56
|
+
// https://stackoverflow.com/a/1655795
|
|
57
|
+
class MD5 {
|
|
58
|
+
md5cycle(x, k) {
|
|
59
|
+
let a = x[0];
|
|
60
|
+
let b = x[1];
|
|
61
|
+
let c = x[2];
|
|
62
|
+
let d = x[3];
|
|
63
|
+
a = this.ff(a, b, c, d, k[0], 7, -680876936);
|
|
64
|
+
d = this.ff(d, a, b, c, k[1], 12, -389564586);
|
|
65
|
+
c = this.ff(c, d, a, b, k[2], 17, 606105819);
|
|
66
|
+
b = this.ff(b, c, d, a, k[3], 22, -1044525330);
|
|
67
|
+
a = this.ff(a, b, c, d, k[4], 7, -176418897);
|
|
68
|
+
d = this.ff(d, a, b, c, k[5], 12, 1200080426);
|
|
69
|
+
c = this.ff(c, d, a, b, k[6], 17, -1473231341);
|
|
70
|
+
b = this.ff(b, c, d, a, k[7], 22, -45705983);
|
|
71
|
+
a = this.ff(a, b, c, d, k[8], 7, 1770035416);
|
|
72
|
+
d = this.ff(d, a, b, c, k[9], 12, -1958414417);
|
|
73
|
+
c = this.ff(c, d, a, b, k[10], 17, -42063);
|
|
74
|
+
b = this.ff(b, c, d, a, k[11], 22, -1990404162);
|
|
75
|
+
a = this.ff(a, b, c, d, k[12], 7, 1804603682);
|
|
76
|
+
d = this.ff(d, a, b, c, k[13], 12, -40341101);
|
|
77
|
+
c = this.ff(c, d, a, b, k[14], 17, -1502002290);
|
|
78
|
+
b = this.ff(b, c, d, a, k[15], 22, 1236535329);
|
|
79
|
+
a = this.gg(a, b, c, d, k[1], 5, -165796510);
|
|
80
|
+
d = this.gg(d, a, b, c, k[6], 9, -1069501632);
|
|
81
|
+
c = this.gg(c, d, a, b, k[11], 14, 643717713);
|
|
82
|
+
b = this.gg(b, c, d, a, k[0], 20, -373897302);
|
|
83
|
+
a = this.gg(a, b, c, d, k[5], 5, -701558691);
|
|
84
|
+
d = this.gg(d, a, b, c, k[10], 9, 38016083);
|
|
85
|
+
c = this.gg(c, d, a, b, k[15], 14, -660478335);
|
|
86
|
+
b = this.gg(b, c, d, a, k[4], 20, -405537848);
|
|
87
|
+
a = this.gg(a, b, c, d, k[9], 5, 568446438);
|
|
88
|
+
d = this.gg(d, a, b, c, k[14], 9, -1019803690);
|
|
89
|
+
c = this.gg(c, d, a, b, k[3], 14, -187363961);
|
|
90
|
+
b = this.gg(b, c, d, a, k[8], 20, 1163531501);
|
|
91
|
+
a = this.gg(a, b, c, d, k[13], 5, -1444681467);
|
|
92
|
+
d = this.gg(d, a, b, c, k[2], 9, -51403784);
|
|
93
|
+
c = this.gg(c, d, a, b, k[7], 14, 1735328473);
|
|
94
|
+
b = this.gg(b, c, d, a, k[12], 20, -1926607734);
|
|
95
|
+
a = this.hh(a, b, c, d, k[5], 4, -378558);
|
|
96
|
+
d = this.hh(d, a, b, c, k[8], 11, -2022574463);
|
|
97
|
+
c = this.hh(c, d, a, b, k[11], 16, 1839030562);
|
|
98
|
+
b = this.hh(b, c, d, a, k[14], 23, -35309556);
|
|
99
|
+
a = this.hh(a, b, c, d, k[1], 4, -1530992060);
|
|
100
|
+
d = this.hh(d, a, b, c, k[4], 11, 1272893353);
|
|
101
|
+
c = this.hh(c, d, a, b, k[7], 16, -155497632);
|
|
102
|
+
b = this.hh(b, c, d, a, k[10], 23, -1094730640);
|
|
103
|
+
a = this.hh(a, b, c, d, k[13], 4, 681279174);
|
|
104
|
+
d = this.hh(d, a, b, c, k[0], 11, -358537222);
|
|
105
|
+
c = this.hh(c, d, a, b, k[3], 16, -722521979);
|
|
106
|
+
b = this.hh(b, c, d, a, k[6], 23, 76029189);
|
|
107
|
+
a = this.hh(a, b, c, d, k[9], 4, -640364487);
|
|
108
|
+
d = this.hh(d, a, b, c, k[12], 11, -421815835);
|
|
109
|
+
c = this.hh(c, d, a, b, k[15], 16, 530742520);
|
|
110
|
+
b = this.hh(b, c, d, a, k[2], 23, -995338651);
|
|
111
|
+
a = this.ii(a, b, c, d, k[0], 6, -198630844);
|
|
112
|
+
d = this.ii(d, a, b, c, k[7], 10, 1126891415);
|
|
113
|
+
c = this.ii(c, d, a, b, k[14], 15, -1416354905);
|
|
114
|
+
b = this.ii(b, c, d, a, k[5], 21, -57434055);
|
|
115
|
+
a = this.ii(a, b, c, d, k[12], 6, 1700485571);
|
|
116
|
+
d = this.ii(d, a, b, c, k[3], 10, -1894986606);
|
|
117
|
+
c = this.ii(c, d, a, b, k[10], 15, -1051523);
|
|
118
|
+
b = this.ii(b, c, d, a, k[1], 21, -2054922799);
|
|
119
|
+
a = this.ii(a, b, c, d, k[8], 6, 1873313359);
|
|
120
|
+
d = this.ii(d, a, b, c, k[15], 10, -30611744);
|
|
121
|
+
c = this.ii(c, d, a, b, k[6], 15, -1560198380);
|
|
122
|
+
b = this.ii(b, c, d, a, k[13], 21, 1309151649);
|
|
123
|
+
a = this.ii(a, b, c, d, k[4], 6, -145523070);
|
|
124
|
+
d = this.ii(d, a, b, c, k[11], 10, -1120210379);
|
|
125
|
+
c = this.ii(c, d, a, b, k[2], 15, 718787259);
|
|
126
|
+
b = this.ii(b, c, d, a, k[9], 21, -343485551);
|
|
127
|
+
x[0] = this.add32(a, x[0]);
|
|
128
|
+
x[1] = this.add32(b, x[1]);
|
|
129
|
+
x[2] = this.add32(c, x[2]);
|
|
130
|
+
x[3] = this.add32(d, x[3]);
|
|
131
|
+
}
|
|
132
|
+
cmn(q, a, b, x, s, t) {
|
|
133
|
+
a = this.add32(this.add32(a, q), this.add32(x, t));
|
|
134
|
+
return this.add32((a << s) | (a >>> (32 - s)), b);
|
|
135
|
+
}
|
|
136
|
+
ff(a, b, c, d, x, s, t) {
|
|
137
|
+
return this.cmn((b & c) | (~b & d), a, b, x, s, t);
|
|
138
|
+
}
|
|
139
|
+
gg(a, b, c, d, x, s, t) {
|
|
140
|
+
return this.cmn((b & d) | (c & ~d), a, b, x, s, t);
|
|
141
|
+
}
|
|
142
|
+
hh(a, b, c, d, x, s, t) {
|
|
143
|
+
return this.cmn(b ^ c ^ d, a, b, x, s, t);
|
|
144
|
+
}
|
|
145
|
+
ii(a, b, c, d, x, s, t) {
|
|
146
|
+
return this.cmn(c ^ (b | ~d), a, b, x, s, t);
|
|
147
|
+
}
|
|
148
|
+
md51(s) {
|
|
149
|
+
const n = s.length;
|
|
150
|
+
const state = [1732584193, -271733879, -1732584194, 271733878];
|
|
151
|
+
let i;
|
|
152
|
+
for (i = 64; i <= s.length; i += 64) {
|
|
153
|
+
this.md5cycle(state, this.md5blk(s.substring(i - 64, i)));
|
|
154
|
+
}
|
|
155
|
+
s = s.substring(i - 64);
|
|
156
|
+
const tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
|
157
|
+
for (i = 0; i < s.length; i++) {
|
|
158
|
+
tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);
|
|
159
|
+
}
|
|
160
|
+
tail[i >> 2] |= 0x80 << (i % 4 << 3);
|
|
161
|
+
if (i > 55) {
|
|
162
|
+
this.md5cycle(state, tail);
|
|
163
|
+
for (i = 0; i < 16; i++) {
|
|
164
|
+
tail[i] = 0;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
tail[14] = n * 8;
|
|
168
|
+
this.md5cycle(state, tail);
|
|
169
|
+
return state;
|
|
170
|
+
}
|
|
171
|
+
/* there needs to be support for Unicode here, * unless we pretend that we can redefine the MD-5
|
|
172
|
+
* algorithm for multi-byte characters (perhaps by adding every four 16-bit characters and
|
|
173
|
+
* shortening the sum to 32 bits). Otherwise I suthis.ggest performing MD-5 as if every character
|
|
174
|
+
* was two bytes--e.g., 0040 0025 = @%--but then how will an ordinary MD-5 sum be matched?
|
|
175
|
+
* There is no way to standardize text to something like UTF-8 before transformation; speed cost is
|
|
176
|
+
* utterly prohibitive. The JavaScript standard itself needs to look at this: it should start
|
|
177
|
+
* providing access to strings as preformed UTF-8 8-bit unsigned value arrays.
|
|
178
|
+
*/
|
|
179
|
+
md5blk(s) {
|
|
180
|
+
const md5blks = [];
|
|
181
|
+
for (let i = 0; i < 64; i += 4) {
|
|
182
|
+
md5blks[i >> 2] =
|
|
183
|
+
s.charCodeAt(i) +
|
|
184
|
+
(s.charCodeAt(i + 1) << 8) +
|
|
185
|
+
(s.charCodeAt(i + 2) << 16) +
|
|
186
|
+
(s.charCodeAt(i + 3) << 24);
|
|
187
|
+
}
|
|
188
|
+
return md5blks;
|
|
189
|
+
}
|
|
190
|
+
rhex(n) {
|
|
191
|
+
const hex_chr = "0123456789abcdef".split("");
|
|
192
|
+
let s = "";
|
|
193
|
+
let j = 0;
|
|
194
|
+
for (; j < 4; j++) {
|
|
195
|
+
s += hex_chr[(n >> (j * 8 + 4)) & 0x0f] + hex_chr[(n >> (j * 8)) & 0x0f];
|
|
196
|
+
}
|
|
197
|
+
return s;
|
|
198
|
+
}
|
|
199
|
+
hex(x) {
|
|
200
|
+
for (let i = 0; i < x.length; i++) {
|
|
201
|
+
x[i] = this.rhex(x[i]);
|
|
202
|
+
}
|
|
203
|
+
return x.join("");
|
|
204
|
+
}
|
|
205
|
+
md5(s) {
|
|
206
|
+
return this.hex(this.md51(s));
|
|
207
|
+
}
|
|
208
|
+
add32(a, b) {
|
|
209
|
+
return this.add32Std(a, b);
|
|
210
|
+
}
|
|
211
|
+
add32Std(a, b) {
|
|
212
|
+
return (a + b) & 0xffffffff;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Item: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { useListboxContext } from "./context.js";
|
|
4
|
+
import { getTabbables } from "@1771technologies/lytenyte-dom-utils";
|
|
5
|
+
export const Item = forwardRef(function Item(props, forwarded) {
|
|
6
|
+
const ctx = useListboxContext();
|
|
7
|
+
return (_jsx("div", { ...props, role: "option", onKeyDownCapture: (ev) => {
|
|
8
|
+
const next = ctx.rtl ? "ArrowLeft" : "ArrowRight";
|
|
9
|
+
const prev = ctx.rtl ? "ArrowRight" : "ArrowLeft";
|
|
10
|
+
if (ev.key !== next && ev.key !== prev)
|
|
11
|
+
return;
|
|
12
|
+
ev.preventDefault();
|
|
13
|
+
const items = getTabbables(ev.currentTarget);
|
|
14
|
+
if (!items.length)
|
|
15
|
+
return;
|
|
16
|
+
items.unshift(ev.currentTarget);
|
|
17
|
+
const index = items.findIndex((c) => document.activeElement === c);
|
|
18
|
+
const nextIndex = ev.key === next ? index + 1 : index - 1;
|
|
19
|
+
const itemToFocus = items[nextIndex];
|
|
20
|
+
if (!itemToFocus)
|
|
21
|
+
return;
|
|
22
|
+
ev.stopPropagation();
|
|
23
|
+
itemToFocus.focus();
|
|
24
|
+
}, ref: forwarded, tabIndex: 0, "data-ln-listbox-item": true }));
|
|
25
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Panel: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|