balala-revogrid 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/cjs/app-globals-D67EXhgK.js +16 -0
- package/dist/cjs/app-globals-D67EXhgK.js.map +1 -0
- package/dist/cjs/cell-renderer-B87qecTb.js +57 -0
- package/dist/cjs/cell-renderer-B87qecTb.js.map +1 -0
- package/dist/cjs/debounce-CcpHiH2p.js +498 -0
- package/dist/cjs/debounce-CcpHiH2p.js.map +1 -0
- package/dist/cjs/dimension.helpers-DA9-xqPT.js +3606 -0
- package/dist/cjs/dimension.helpers-DA9-xqPT.js.map +1 -0
- package/dist/cjs/edit.utils-CKsIiHlD.js +113 -0
- package/dist/cjs/edit.utils-CKsIiHlD.js.map +1 -0
- package/dist/cjs/events-DeLDyZlb.js +46 -0
- package/dist/cjs/events-DeLDyZlb.js.map +1 -0
- package/dist/cjs/filter.button-DSsWNs23.js +49 -0
- package/dist/cjs/filter.button-DSsWNs23.js.map +1 -0
- package/dist/cjs/grouping.row.renderer-BqR0ytMi.js +64 -0
- package/dist/cjs/grouping.row.renderer-BqR0ytMi.js.map +1 -0
- package/dist/cjs/header-cell-renderer-D-RjAVfe.js +1766 -0
- package/dist/cjs/header-cell-renderer-D-RjAVfe.js.map +1 -0
- package/dist/cjs/index-BF1c1pO3.js +2549 -0
- package/dist/cjs/index-BF1c1pO3.js.map +1 -0
- package/dist/cjs/index.cjs.js +6426 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +19 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/revo-grid.cjs.entry.js +3215 -0
- package/dist/cjs/revo-grid.cjs.entry.js.map +1 -0
- package/dist/cjs/revo-grid.cjs.js +31 -0
- package/dist/cjs/revo-grid.cjs.js.map +1 -0
- package/dist/cjs/revo-grid.entry.cjs.js.map +1 -0
- package/dist/cjs/revogr-attribution.revogr-extra.revogr-focus.revogr-grouping-overlay.revogr-header-unified.revogr-overlay-selection.revogr-row-headers.revogr-scroll-virtual.revogr-temp-range.entry.cjs.js.map +1 -0
- package/dist/cjs/revogr-attribution_9.cjs.entry.js +2629 -0
- package/dist/cjs/revogr-attribution_9.cjs.entry.js.map +1 -0
- package/dist/cjs/revogr-clipboard.revogr-edit.revogr-order-editor.entry.cjs.js.map +1 -0
- package/dist/cjs/revogr-clipboard_3.cjs.entry.js +471 -0
- package/dist/cjs/revogr-clipboard_3.cjs.entry.js.map +1 -0
- package/dist/cjs/revogr-data.revogr-header.revogr-viewport-scroll.vnode-html.entry.cjs.js.map +1 -0
- package/dist/cjs/revogr-data_4.cjs.entry.js +1420 -0
- package/dist/cjs/revogr-data_4.cjs.entry.js.map +1 -0
- package/dist/cjs/revogr-filter-panel.cjs.entry.js +382 -0
- package/dist/cjs/revogr-filter-panel.cjs.entry.js.map +1 -0
- package/dist/cjs/revogr-filter-panel.entry.cjs.js.map +1 -0
- package/dist/cjs/row-renderer-BTE7VKD9.js +49 -0
- package/dist/cjs/row-renderer-BTE7VKD9.js.map +1 -0
- package/dist/cjs/text-editor-BdhmcrkS.js +81 -0
- package/dist/cjs/text-editor-BdhmcrkS.js.map +1 -0
- package/dist/cjs/throttle-2ZxfGjEI.js +533 -0
- package/dist/cjs/throttle-2ZxfGjEI.js.map +1 -0
- package/dist/cjs/tree-data.plugin-BRjwZtxI.js +5350 -0
- package/dist/cjs/tree-data.plugin-BRjwZtxI.js.map +1 -0
- package/dist/cjs/viewport.helpers-BAovztDd.js +61 -0
- package/dist/cjs/viewport.helpers-BAovztDd.js.map +1 -0
- package/dist/cjs/viewport.store-BTbPlyF-.js +525 -0
- package/dist/cjs/viewport.store-BTbPlyF-.js.map +1 -0
- package/dist/collection/collection-manifest.json +30 -0
- package/dist/collection/components/attribution/revogr-attribution.js +20 -0
- package/dist/collection/components/attribution/revogr-attribution.js.map +1 -0
- package/dist/collection/components/clipboard/revogr-clipboard.js +411 -0
- package/dist/collection/components/clipboard/revogr-clipboard.js.map +1 -0
- package/dist/collection/components/data/cell-renderer.js +44 -0
- package/dist/collection/components/data/cell-renderer.js.map +1 -0
- package/dist/collection/components/data/column.service.js +333 -0
- package/dist/collection/components/data/column.service.js.map +1 -0
- package/dist/collection/components/data/revogr-data-style.css +95 -0
- package/dist/collection/components/data/revogr-data.js +939 -0
- package/dist/collection/components/data/revogr-data.js.map +1 -0
- package/dist/collection/components/data/row-highlight.plugin.js +51 -0
- package/dist/collection/components/data/row-highlight.plugin.js.map +1 -0
- package/dist/collection/components/data/row-renderer.js +37 -0
- package/dist/collection/components/data/row-renderer.js.map +1 -0
- package/dist/collection/components/editors/edit.utils.js +13 -0
- package/dist/collection/components/editors/edit.utils.js.map +1 -0
- package/dist/collection/components/editors/revogr-edit-style.css +16 -0
- package/dist/collection/components/editors/revogr-edit.js +346 -0
- package/dist/collection/components/editors/revogr-edit.js.map +1 -0
- package/dist/collection/components/editors/text-editor.js +74 -0
- package/dist/collection/components/editors/text-editor.js.map +1 -0
- package/dist/collection/components/extra/revogr-extra.js +125 -0
- package/dist/collection/components/extra/revogr-extra.js.map +1 -0
- package/dist/collection/components/grouping-overlay/revogr-grouping-overlay.css +62 -0
- package/dist/collection/components/grouping-overlay/revogr-grouping-overlay.js +644 -0
- package/dist/collection/components/grouping-overlay/revogr-grouping-overlay.js.map +1 -0
- package/dist/collection/components/header/header-cell-renderer.js +49 -0
- package/dist/collection/components/header/header-cell-renderer.js.map +1 -0
- package/dist/collection/components/header/header-group-renderer.js +29 -0
- package/dist/collection/components/header/header-group-renderer.js.map +1 -0
- package/dist/collection/components/header/header-renderer.js +100 -0
- package/dist/collection/components/header/header-renderer.js.map +1 -0
- package/dist/collection/components/header/resizable.directive.js +274 -0
- package/dist/collection/components/header/resizable.directive.js.map +1 -0
- package/dist/collection/components/header/resizable.element.js +36 -0
- package/dist/collection/components/header/resizable.element.js.map +1 -0
- package/dist/collection/components/header/revogr-header-style.css +164 -0
- package/dist/collection/components/header/revogr-header-unified-style.css +205 -0
- package/dist/collection/components/header/revogr-header-unified.js +1013 -0
- package/dist/collection/components/header/revogr-header-unified.js.map +1 -0
- package/dist/collection/components/header/revogr-header.js +852 -0
- package/dist/collection/components/header/revogr-header.js.map +1 -0
- package/dist/collection/components/order/order-renderer.js +50 -0
- package/dist/collection/components/order/order-renderer.js.map +1 -0
- package/dist/collection/components/order/order-row.service.js +72 -0
- package/dist/collection/components/order/order-row.service.js.map +1 -0
- package/dist/collection/components/order/revogr-order-editor.js +461 -0
- package/dist/collection/components/order/revogr-order-editor.js.map +1 -0
- package/dist/collection/components/overlay/autofill.service.js +221 -0
- package/dist/collection/components/overlay/autofill.service.js.map +1 -0
- package/dist/collection/components/overlay/keyboard.service.js +178 -0
- package/dist/collection/components/overlay/keyboard.service.js.map +1 -0
- package/dist/collection/components/overlay/revogr-overlay-selection.js +1606 -0
- package/dist/collection/components/overlay/revogr-overlay-selection.js.map +1 -0
- package/dist/collection/components/overlay/revogr-overlay-style.css +95 -0
- package/dist/collection/components/overlay/selection.utils.js +136 -0
- package/dist/collection/components/overlay/selection.utils.js.map +1 -0
- package/dist/collection/components/revoGrid/grid.helpers.js +33 -0
- package/dist/collection/components/revoGrid/grid.helpers.js.map +1 -0
- package/dist/collection/components/revoGrid/plugin.service.js +81 -0
- package/dist/collection/components/revoGrid/plugin.service.js.map +1 -0
- package/dist/collection/components/revoGrid/revo-grid-style.css +897 -0
- package/dist/collection/components/revoGrid/revo-grid.js +4717 -0
- package/dist/collection/components/revoGrid/revo-grid.js.map +1 -0
- package/dist/collection/components/revoGrid/viewport.helpers.js +51 -0
- package/dist/collection/components/revoGrid/viewport.helpers.js.map +1 -0
- package/dist/collection/components/revoGrid/viewport.resize.service.js +55 -0
- package/dist/collection/components/revoGrid/viewport.resize.service.js.map +1 -0
- package/dist/collection/components/revoGrid/viewport.scrolling.service.js +139 -0
- package/dist/collection/components/revoGrid/viewport.scrolling.service.js.map +1 -0
- package/dist/collection/components/revoGrid/viewport.service.js +253 -0
- package/dist/collection/components/revoGrid/viewport.service.js.map +1 -0
- package/dist/collection/components/rowHeaders/revogr-row-headers.js +291 -0
- package/dist/collection/components/rowHeaders/revogr-row-headers.js.map +1 -0
- package/dist/collection/components/rowHeaders/row-header-render.js +5 -0
- package/dist/collection/components/rowHeaders/row-header-render.js.map +1 -0
- package/dist/collection/components/scroll/revogr-viewport-scroll-style.css +70 -0
- package/dist/collection/components/scroll/revogr-viewport-scroll.js +938 -0
- package/dist/collection/components/scroll/revogr-viewport-scroll.js.map +1 -0
- package/dist/collection/components/scrollable/autohide-scroll.plugin.js +44 -0
- package/dist/collection/components/scrollable/autohide-scroll.plugin.js.map +1 -0
- package/dist/collection/components/scrollable/revogr-scroll-style.css +34 -0
- package/dist/collection/components/scrollable/revogr-scroll-virtual.js +346 -0
- package/dist/collection/components/scrollable/revogr-scroll-virtual.js.map +1 -0
- package/dist/collection/components/selectionFocus/revogr-focus-style.css +7 -0
- package/dist/collection/components/selectionFocus/revogr-focus.js +429 -0
- package/dist/collection/components/selectionFocus/revogr-focus.js.map +1 -0
- package/dist/collection/components/selectionTempRange/revogr-temp-range-style.css +28 -0
- package/dist/collection/components/selectionTempRange/revogr-temp-range.js +171 -0
- package/dist/collection/components/selectionTempRange/revogr-temp-range.js.map +1 -0
- package/dist/collection/components/vnode/vnode-converter.js +84 -0
- package/dist/collection/components/vnode/vnode-converter.js.map +1 -0
- package/dist/collection/components/vnode/vnode.utils.js +18 -0
- package/dist/collection/components/vnode/vnode.utils.js.map +1 -0
- package/dist/collection/global/global.js +19 -0
- package/dist/collection/global/global.js.map +1 -0
- package/dist/collection/index.js +13 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/plugins/add-rows-on-paste.plugin.js +40 -0
- package/dist/collection/plugins/add-rows-on-paste.plugin.js.map +1 -0
- package/dist/collection/plugins/base.plugin.js +90 -0
- package/dist/collection/plugins/base.plugin.js.map +1 -0
- package/dist/collection/plugins/column-hide.plugin.js +532 -0
- package/dist/collection/plugins/column-hide.plugin.js.map +1 -0
- package/dist/collection/plugins/column-manage.plugin.js +1218 -0
- package/dist/collection/plugins/column-manage.plugin.js.map +1 -0
- package/dist/collection/plugins/column-stretch.plugin.js +921 -0
- package/dist/collection/plugins/column-stretch.plugin.js.map +1 -0
- package/dist/collection/plugins/column.auto-size.plugin.js +308 -0
- package/dist/collection/plugins/column.auto-size.plugin.js.map +1 -0
- package/dist/collection/plugins/column.stretch.plugin.js +96 -0
- package/dist/collection/plugins/column.stretch.plugin.js.map +1 -0
- package/dist/collection/plugins/customColumnDrag/column-move.helper.js +361 -0
- package/dist/collection/plugins/customColumnDrag/column-move.helper.js.map +1 -0
- package/dist/collection/plugins/customColumnDrag/custom-column-drag.plugin.js +145 -0
- package/dist/collection/plugins/customColumnDrag/custom-column-drag.plugin.js.map +1 -0
- package/dist/collection/plugins/customColumnDrag/drag.handler.js +726 -0
- package/dist/collection/plugins/customColumnDrag/drag.handler.js.map +1 -0
- package/dist/collection/plugins/customColumnDrag/example.js +282 -0
- package/dist/collection/plugins/customColumnDrag/example.js.map +1 -0
- package/dist/collection/plugins/customColumnDrag/index.js +8 -0
- package/dist/collection/plugins/customColumnDrag/index.js.map +1 -0
- package/dist/collection/plugins/customColumnDrag/types.js +2 -0
- package/dist/collection/plugins/customColumnDrag/types.js.map +1 -0
- package/dist/collection/plugins/dispatcher.js +40 -0
- package/dist/collection/plugins/dispatcher.js.map +1 -0
- package/dist/collection/plugins/enhanced-scrollbar.plugin.js +493 -0
- package/dist/collection/plugins/enhanced-scrollbar.plugin.js.map +1 -0
- package/dist/collection/plugins/export/csv.js +72 -0
- package/dist/collection/plugins/export/csv.js.map +1 -0
- package/dist/collection/plugins/export/export.plugin.js +157 -0
- package/dist/collection/plugins/export/export.plugin.js.map +1 -0
- package/dist/collection/plugins/export/types.js +2 -0
- package/dist/collection/plugins/export/types.js.map +1 -0
- package/dist/collection/plugins/filter/conditions/equal.js +21 -0
- package/dist/collection/plugins/filter/conditions/equal.js.map +1 -0
- package/dist/collection/plugins/filter/conditions/number/greaterThan.js +14 -0
- package/dist/collection/plugins/filter/conditions/number/greaterThan.js.map +1 -0
- package/dist/collection/plugins/filter/conditions/number/greaterThanOrEqual.js +11 -0
- package/dist/collection/plugins/filter/conditions/number/greaterThanOrEqual.js.map +1 -0
- package/dist/collection/plugins/filter/conditions/number/lessThan.js +16 -0
- package/dist/collection/plugins/filter/conditions/number/lessThan.js.map +1 -0
- package/dist/collection/plugins/filter/conditions/number/lessThanOrEqual.js +11 -0
- package/dist/collection/plugins/filter/conditions/number/lessThanOrEqual.js.map +1 -0
- package/dist/collection/plugins/filter/conditions/set.js +7 -0
- package/dist/collection/plugins/filter/conditions/set.js.map +1 -0
- package/dist/collection/plugins/filter/conditions/string/beginswith.js +21 -0
- package/dist/collection/plugins/filter/conditions/string/beginswith.js.map +1 -0
- package/dist/collection/plugins/filter/conditions/string/contains.js +25 -0
- package/dist/collection/plugins/filter/conditions/string/contains.js.map +1 -0
- package/dist/collection/plugins/filter/filter.button.js +28 -0
- package/dist/collection/plugins/filter/filter.button.js.map +1 -0
- package/dist/collection/plugins/filter/filter.indexed.js +49 -0
- package/dist/collection/plugins/filter/filter.indexed.js.map +1 -0
- package/dist/collection/plugins/filter/filter.panel.js +610 -0
- package/dist/collection/plugins/filter/filter.panel.js.map +1 -0
- package/dist/collection/plugins/filter/filter.plugin.js +388 -0
- package/dist/collection/plugins/filter/filter.plugin.js.map +1 -0
- package/dist/collection/plugins/filter/filter.style.css +165 -0
- package/dist/collection/plugins/filter/filter.types.js +9 -0
- package/dist/collection/plugins/filter/filter.types.js.map +1 -0
- package/dist/collection/plugins/grid-setup.js +131 -0
- package/dist/collection/plugins/grid-setup.js.map +1 -0
- package/dist/collection/plugins/groupingRow/grouping.const.js +18 -0
- package/dist/collection/plugins/groupingRow/grouping.const.js.map +1 -0
- package/dist/collection/plugins/groupingRow/grouping.row.expand.service.js +122 -0
- package/dist/collection/plugins/groupingRow/grouping.row.expand.service.js.map +1 -0
- package/dist/collection/plugins/groupingRow/grouping.row.plugin.js +252 -0
- package/dist/collection/plugins/groupingRow/grouping.row.plugin.js.map +1 -0
- package/dist/collection/plugins/groupingRow/grouping.row.renderer.js +49 -0
- package/dist/collection/plugins/groupingRow/grouping.row.renderer.js.map +1 -0
- package/dist/collection/plugins/groupingRow/grouping.row.types.js +2 -0
- package/dist/collection/plugins/groupingRow/grouping.row.types.js.map +1 -0
- package/dist/collection/plugins/groupingRow/grouping.service.js +215 -0
- package/dist/collection/plugins/groupingRow/grouping.service.js.map +1 -0
- package/dist/collection/plugins/groupingRow/grouping.trimmed.service.js +61 -0
- package/dist/collection/plugins/groupingRow/grouping.trimmed.service.js.map +1 -0
- package/dist/collection/plugins/index.js +26 -0
- package/dist/collection/plugins/index.js.map +1 -0
- package/dist/collection/plugins/manual-focus.plugin.js +353 -0
- package/dist/collection/plugins/manual-focus.plugin.js.map +1 -0
- package/dist/collection/plugins/moveColumn/column.drag.plugin.js +171 -0
- package/dist/collection/plugins/moveColumn/column.drag.plugin.js.map +1 -0
- package/dist/collection/plugins/moveColumn/order-column.handler.js +69 -0
- package/dist/collection/plugins/moveColumn/order-column.handler.js.map +1 -0
- package/dist/collection/plugins/pin-shadow.plugin.js +487 -0
- package/dist/collection/plugins/pin-shadow.plugin.js.map +1 -0
- package/dist/collection/plugins/resize-indicator.plugin.js +430 -0
- package/dist/collection/plugins/resize-indicator.plugin.js.map +1 -0
- package/dist/collection/plugins/row-select-plugin-2026228.js +1803 -0
- package/dist/collection/plugins/row-select-plugin-2026228.js.map +1 -0
- package/dist/collection/plugins/row-select.plugin.js +2096 -0
- package/dist/collection/plugins/row-select.plugin.js.map +1 -0
- package/dist/collection/plugins/rtl/rtl.plugin.js +110 -0
- package/dist/collection/plugins/rtl/rtl.plugin.js.map +1 -0
- package/dist/collection/plugins/sorting/sorting.func.js +82 -0
- package/dist/collection/plugins/sorting/sorting.func.js.map +1 -0
- package/dist/collection/plugins/sorting/sorting.plugin.js +224 -0
- package/dist/collection/plugins/sorting/sorting.plugin.js.map +1 -0
- package/dist/collection/plugins/sorting/sorting.sign.js +9 -0
- package/dist/collection/plugins/sorting/sorting.sign.js.map +1 -0
- package/dist/collection/plugins/sorting/sorting.types.js +2 -0
- package/dist/collection/plugins/sorting/sorting.types.js.map +1 -0
- package/dist/collection/plugins/tree-data.plugin.js +447 -0
- package/dist/collection/plugins/tree-data.plugin.js.map +1 -0
- package/dist/collection/plugins/wcag/index.js +84 -0
- package/dist/collection/plugins/wcag/index.js.map +1 -0
- package/dist/collection/serve/controller.js +344 -0
- package/dist/collection/serve/data.js +201 -0
- package/dist/collection/serve/realData.js +4148 -0
- package/dist/collection/services/cell.helpers.js +12 -0
- package/dist/collection/services/cell.helpers.js.map +1 -0
- package/dist/collection/services/column.data.provider.js +122 -0
- package/dist/collection/services/column.data.provider.js.map +1 -0
- package/dist/collection/services/data.provider.js +89 -0
- package/dist/collection/services/data.provider.js.map +1 -0
- package/dist/collection/services/dimension.provider.js +257 -0
- package/dist/collection/services/dimension.provider.js.map +1 -0
- package/dist/collection/services/local.scroll.service.js +136 -0
- package/dist/collection/services/local.scroll.service.js.map +1 -0
- package/dist/collection/services/local.scroll.timer.js +84 -0
- package/dist/collection/services/local.scroll.timer.js.map +1 -0
- package/dist/collection/services/selection.store.connector.js +274 -0
- package/dist/collection/services/selection.store.connector.js.map +1 -0
- package/dist/collection/services/viewport.provider.js +17 -0
- package/dist/collection/services/viewport.provider.js.map +1 -0
- package/dist/collection/store/dataSource/data.proxy.js +45 -0
- package/dist/collection/store/dataSource/data.proxy.js.map +1 -0
- package/dist/collection/store/dataSource/data.store.js +146 -0
- package/dist/collection/store/dataSource/data.store.js.map +1 -0
- package/dist/collection/store/dataSource/index.js +7 -0
- package/dist/collection/store/dataSource/index.js.map +1 -0
- package/dist/collection/store/dataSource/trimmed.plugin.js +34 -0
- package/dist/collection/store/dataSource/trimmed.plugin.js.map +1 -0
- package/dist/collection/store/dimension/dimension.helpers.js +101 -0
- package/dist/collection/store/dimension/dimension.helpers.js.map +1 -0
- package/dist/collection/store/dimension/dimension.recalculate.plugin.js +29 -0
- package/dist/collection/store/dimension/dimension.recalculate.plugin.js.map +1 -0
- package/dist/collection/store/dimension/dimension.store.js +124 -0
- package/dist/collection/store/dimension/dimension.store.js.map +1 -0
- package/dist/collection/store/dimension/dimension.trim.plugin.js +61 -0
- package/dist/collection/store/dimension/dimension.trim.plugin.js.map +1 -0
- package/dist/collection/store/dimension/index.js +6 -0
- package/dist/collection/store/dimension/index.js.map +1 -0
- package/dist/collection/store/index.js +17 -0
- package/dist/collection/store/index.js.map +1 -0
- package/dist/collection/store/selection/index.js +6 -0
- package/dist/collection/store/selection/index.js.map +1 -0
- package/dist/collection/store/selection/selection.helpers.js +49 -0
- package/dist/collection/store/selection/selection.helpers.js.map +1 -0
- package/dist/collection/store/selection/selection.store.js +85 -0
- package/dist/collection/store/selection/selection.store.js.map +1 -0
- package/dist/collection/store/vp/index.js +6 -0
- package/dist/collection/store/vp/index.js.map +1 -0
- package/dist/collection/store/vp/viewport.helpers.js +251 -0
- package/dist/collection/store/vp/viewport.helpers.js.map +1 -0
- package/dist/collection/store/vp/viewport.store.js +256 -0
- package/dist/collection/store/vp/viewport.store.js.map +1 -0
- package/dist/collection/themeManager/theme.compact.js +9 -0
- package/dist/collection/themeManager/theme.compact.js.map +1 -0
- package/dist/collection/themeManager/theme.default.js +9 -0
- package/dist/collection/themeManager/theme.default.js.map +1 -0
- package/dist/collection/themeManager/theme.material.js +9 -0
- package/dist/collection/themeManager/theme.material.js.map +1 -0
- package/dist/collection/themeManager/theme.service.js +53 -0
- package/dist/collection/themeManager/theme.service.js.map +1 -0
- package/dist/collection/types/dimension.js +2 -0
- package/dist/collection/types/dimension.js.map +1 -0
- package/dist/collection/types/events.js +124 -0
- package/dist/collection/types/events.js.map +1 -0
- package/dist/collection/types/index.js +12 -0
- package/dist/collection/types/index.js.map +1 -0
- package/dist/collection/types/interfaces.js +6 -0
- package/dist/collection/types/interfaces.js.map +1 -0
- package/dist/collection/types/plugin.js +2 -0
- package/dist/collection/types/plugin.js.map +1 -0
- package/dist/collection/types/plugin.types.js +2 -0
- package/dist/collection/types/plugin.types.js.map +1 -0
- package/dist/collection/types/selection.js +2 -0
- package/dist/collection/types/selection.js.map +1 -0
- package/dist/collection/types/theme.js +2 -0
- package/dist/collection/types/theme.js.map +1 -0
- package/dist/collection/types/viewport.interfaces.js +2 -0
- package/dist/collection/types/viewport.interfaces.js.map +1 -0
- package/dist/collection/utils/batchGroupCollapse.js +190 -0
- package/dist/collection/utils/batchGroupCollapse.js.map +1 -0
- package/dist/collection/utils/browser.js +7 -0
- package/dist/collection/utils/browser.js.map +1 -0
- package/dist/collection/utils/cell-template-helper.js +181 -0
- package/dist/collection/utils/cell-template-helper.js.map +1 -0
- package/dist/collection/utils/closest.polifill.js +22 -0
- package/dist/collection/utils/closest.polifill.js.map +1 -0
- package/dist/collection/utils/column.utils.js +448 -0
- package/dist/collection/utils/column.utils.js.map +1 -0
- package/dist/collection/utils/consts.js +26 -0
- package/dist/collection/utils/consts.js.map +1 -0
- package/dist/collection/utils/events.js +39 -0
- package/dist/collection/utils/events.js.map +1 -0
- package/dist/collection/utils/header.utils.js +24 -0
- package/dist/collection/utils/header.utils.js.map +1 -0
- package/dist/collection/utils/index.js +133 -0
- package/dist/collection/utils/index.js.map +1 -0
- package/dist/collection/utils/key.codes.js +80 -0
- package/dist/collection/utils/key.codes.js.map +1 -0
- package/dist/collection/utils/key.utils.js +86 -0
- package/dist/collection/utils/key.utils.js.map +1 -0
- package/dist/collection/utils/mobile.js +7 -0
- package/dist/collection/utils/mobile.js.map +1 -0
- package/dist/collection/utils/platform.js +9 -0
- package/dist/collection/utils/platform.js.map +1 -0
- package/dist/collection/utils/row-header-utils.js +9 -0
- package/dist/collection/utils/row-header-utils.js.map +1 -0
- package/dist/collection/utils/store.types.js +2 -0
- package/dist/collection/utils/store.types.js.map +1 -0
- package/dist/collection/utils/store.utils.js +15 -0
- package/dist/collection/utils/store.utils.js.map +1 -0
- package/dist/esm/app-globals-C3ZHKjnB.js +14 -0
- package/dist/esm/app-globals-C3ZHKjnB.js.map +1 -0
- package/dist/esm/cell-renderer-C2Td6LKY.js +54 -0
- package/dist/esm/cell-renderer-C2Td6LKY.js.map +1 -0
- package/dist/esm/debounce-BfO9dz9v.js +488 -0
- package/dist/esm/debounce-BfO9dz9v.js.map +1 -0
- package/dist/esm/dimension.helpers-DDil7Dg0.js +3546 -0
- package/dist/esm/dimension.helpers-DDil7Dg0.js.map +1 -0
- package/dist/esm/edit.utils-ClxXX_x9.js +99 -0
- package/dist/esm/edit.utils-ClxXX_x9.js.map +1 -0
- package/dist/esm/events-BvSmBueA.js +43 -0
- package/dist/esm/events-BvSmBueA.js.map +1 -0
- package/dist/esm/filter.button-DmOE7VCJ.js +39 -0
- package/dist/esm/filter.button-DmOE7VCJ.js.map +1 -0
- package/dist/esm/grouping.row.renderer-6NYszUJA.js +60 -0
- package/dist/esm/grouping.row.renderer-6NYszUJA.js.map +1 -0
- package/dist/esm/header-cell-renderer-BVHTuFGE.js +1715 -0
- package/dist/esm/header-cell-renderer-BVHTuFGE.js.map +1 -0
- package/dist/esm/index-Dyptvvxf.js +2519 -0
- package/dist/esm/index-Dyptvvxf.js.map +1 -0
- package/dist/esm/index.js +6232 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +17 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/revo-grid.entry.js +3213 -0
- package/dist/esm/revo-grid.entry.js.map +1 -0
- package/dist/esm/revo-grid.js +27 -0
- package/dist/esm/revo-grid.js.map +1 -0
- package/dist/esm/revogr-attribution.revogr-extra.revogr-focus.revogr-grouping-overlay.revogr-header-unified.revogr-overlay-selection.revogr-row-headers.revogr-scroll-virtual.revogr-temp-range.entry.js.map +1 -0
- package/dist/esm/revogr-attribution_9.entry.js +2619 -0
- package/dist/esm/revogr-attribution_9.entry.js.map +1 -0
- package/dist/esm/revogr-clipboard.revogr-edit.revogr-order-editor.entry.js.map +1 -0
- package/dist/esm/revogr-clipboard_3.entry.js +467 -0
- package/dist/esm/revogr-clipboard_3.entry.js.map +1 -0
- package/dist/esm/revogr-data.revogr-header.revogr-viewport-scroll.vnode-html.entry.js.map +1 -0
- package/dist/esm/revogr-data_4.entry.js +1415 -0
- package/dist/esm/revogr-data_4.entry.js.map +1 -0
- package/dist/esm/revogr-filter-panel.entry.js +380 -0
- package/dist/esm/revogr-filter-panel.entry.js.map +1 -0
- package/dist/esm/row-renderer-sb6QTqH-.js +46 -0
- package/dist/esm/row-renderer-sb6QTqH-.js.map +1 -0
- package/dist/esm/text-editor-CxXqoicM.js +79 -0
- package/dist/esm/text-editor-CxXqoicM.js.map +1 -0
- package/dist/esm/throttle-DXYrmEeb.js +525 -0
- package/dist/esm/throttle-DXYrmEeb.js.map +1 -0
- package/dist/esm/tree-data.plugin-C2eXkf9_.js +5319 -0
- package/dist/esm/tree-data.plugin-C2eXkf9_.js.map +1 -0
- package/dist/esm/viewport.helpers-VXhsJZtn.js +55 -0
- package/dist/esm/viewport.helpers-VXhsJZtn.js.map +1 -0
- package/dist/esm/viewport.store-C-GnV31k.js +512 -0
- package/dist/esm/viewport.store-C-GnV31k.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/revo-grid/app-globals-C3ZHKjnB.js +14 -0
- package/dist/revo-grid/app-globals-C3ZHKjnB.js.map +1 -0
- package/dist/revo-grid/cell-renderer-C2Td6LKY.js +54 -0
- package/dist/revo-grid/cell-renderer-C2Td6LKY.js.map +1 -0
- package/dist/revo-grid/debounce-BfO9dz9v.js +488 -0
- package/dist/revo-grid/debounce-BfO9dz9v.js.map +1 -0
- package/dist/revo-grid/dimension.helpers-DDil7Dg0.js +3546 -0
- package/dist/revo-grid/dimension.helpers-DDil7Dg0.js.map +1 -0
- package/dist/revo-grid/edit.utils-ClxXX_x9.js +99 -0
- package/dist/revo-grid/edit.utils-ClxXX_x9.js.map +1 -0
- package/dist/revo-grid/events-BvSmBueA.js +43 -0
- package/dist/revo-grid/events-BvSmBueA.js.map +1 -0
- package/dist/revo-grid/filter.button-DmOE7VCJ.js +39 -0
- package/dist/revo-grid/filter.button-DmOE7VCJ.js.map +1 -0
- package/dist/revo-grid/grouping.row.renderer-6NYszUJA.js +60 -0
- package/dist/revo-grid/grouping.row.renderer-6NYszUJA.js.map +1 -0
- package/dist/revo-grid/header-cell-renderer-BVHTuFGE.js +1715 -0
- package/dist/revo-grid/header-cell-renderer-BVHTuFGE.js.map +1 -0
- package/dist/revo-grid/index-Dyptvvxf.js +2490 -0
- package/dist/revo-grid/index-Dyptvvxf.js.map +1 -0
- package/dist/revo-grid/index.esm.js +6232 -0
- package/dist/revo-grid/index.esm.js.map +1 -0
- package/dist/revo-grid/loader.esm.js.map +1 -0
- package/dist/revo-grid/revo-grid.entry.esm.js.map +1 -0
- package/dist/revo-grid/revo-grid.entry.js +3213 -0
- package/dist/revo-grid/revo-grid.entry.js.map +1 -0
- package/dist/revo-grid/revo-grid.esm.js +27 -0
- package/dist/revo-grid/revo-grid.esm.js.map +1 -0
- package/dist/revo-grid/revogr-attribution.revogr-extra.revogr-focus.revogr-grouping-overlay.revogr-header-unified.revogr-overlay-selection.revogr-row-headers.revogr-scroll-virtual.revogr-temp-range.entry.esm.js.map +1 -0
- package/dist/revo-grid/revogr-attribution_9.entry.js +2619 -0
- package/dist/revo-grid/revogr-attribution_9.entry.js.map +1 -0
- package/dist/revo-grid/revogr-clipboard.revogr-edit.revogr-order-editor.entry.esm.js.map +1 -0
- package/dist/revo-grid/revogr-clipboard_3.entry.js +467 -0
- package/dist/revo-grid/revogr-clipboard_3.entry.js.map +1 -0
- package/dist/revo-grid/revogr-data.revogr-header.revogr-viewport-scroll.vnode-html.entry.esm.js.map +1 -0
- package/dist/revo-grid/revogr-data_4.entry.js +1415 -0
- package/dist/revo-grid/revogr-data_4.entry.js.map +1 -0
- package/dist/revo-grid/revogr-filter-panel.entry.esm.js.map +1 -0
- package/dist/revo-grid/revogr-filter-panel.entry.js +380 -0
- package/dist/revo-grid/revogr-filter-panel.entry.js.map +1 -0
- package/dist/revo-grid/row-renderer-sb6QTqH-.js +46 -0
- package/dist/revo-grid/row-renderer-sb6QTqH-.js.map +1 -0
- package/dist/revo-grid/text-editor-CxXqoicM.js +79 -0
- package/dist/revo-grid/text-editor-CxXqoicM.js.map +1 -0
- package/dist/revo-grid/throttle-DXYrmEeb.js +525 -0
- package/dist/revo-grid/throttle-DXYrmEeb.js.map +1 -0
- package/dist/revo-grid/tree-data.plugin-C2eXkf9_.js +5319 -0
- package/dist/revo-grid/tree-data.plugin-C2eXkf9_.js.map +1 -0
- package/dist/revo-grid/viewport.helpers-VXhsJZtn.js +55 -0
- package/dist/revo-grid/viewport.helpers-VXhsJZtn.js.map +1 -0
- package/dist/revo-grid/viewport.store-C-GnV31k.js +512 -0
- package/dist/revo-grid/viewport.store-C-GnV31k.js.map +1 -0
- package/dist/types/components/attribution/revogr-attribution.d.ts +12 -0
- package/dist/types/components/clipboard/revogr-clipboard.d.ts +89 -0
- package/dist/types/components/data/cell-renderer.d.ts +12 -0
- package/dist/types/components/data/column.service.d.ts +65 -0
- package/dist/types/components/data/revogr-data.d.ts +132 -0
- package/dist/types/components/data/row-highlight.plugin.d.ts +10 -0
- package/dist/types/components/data/row-renderer.d.ts +13 -0
- package/dist/types/components/editors/edit.utils.d.ts +3 -0
- package/dist/types/components/editors/revogr-edit.d.ts +63 -0
- package/dist/types/components/editors/text-editor.d.ts +43 -0
- package/dist/types/components/extra/revogr-extra.d.ts +38 -0
- package/dist/types/components/grouping-overlay/revogr-grouping-overlay.d.ts +71 -0
- package/dist/types/components/header/header-cell-renderer.d.ts +10 -0
- package/dist/types/components/header/header-group-renderer.d.ts +17 -0
- package/dist/types/components/header/header-renderer.d.ts +24 -0
- package/dist/types/components/header/resizable.directive.d.ts +60 -0
- package/dist/types/components/header/resizable.element.d.ts +5 -0
- package/dist/types/components/header/revogr-header-unified.d.ts +168 -0
- package/dist/types/components/header/revogr-header.d.ts +131 -0
- package/dist/types/components/order/order-renderer.d.ts +29 -0
- package/dist/types/components/order/order-row.service.d.ts +27 -0
- package/dist/types/components/order/revogr-order-editor.d.ts +56 -0
- package/dist/types/components/overlay/autofill.service.d.ts +80 -0
- package/dist/types/components/overlay/keyboard.service.d.ts +29 -0
- package/dist/types/components/overlay/revogr-overlay-selection.d.ts +295 -0
- package/dist/types/components/overlay/selection.utils.d.ts +47 -0
- package/dist/types/components/revoGrid/grid.helpers.d.ts +17 -0
- package/dist/types/components/revoGrid/plugin.service.d.ts +37 -0
- package/dist/types/components/revoGrid/revo-grid.d.ts +801 -0
- package/dist/types/components/revoGrid/viewport.helpers.d.ts +42 -0
- package/dist/types/components/revoGrid/viewport.resize.service.d.ts +17 -0
- package/dist/types/components/revoGrid/viewport.scrolling.service.d.ts +24 -0
- package/dist/types/components/revoGrid/viewport.service.d.ts +59 -0
- package/dist/types/components/rowHeaders/revogr-row-headers.d.ts +51 -0
- package/dist/types/components/rowHeaders/row-header-render.d.ts +9 -0
- package/dist/types/components/scroll/revogr-viewport-scroll.d.ts +159 -0
- package/dist/types/components/scrollable/autohide-scroll.plugin.d.ts +22 -0
- package/dist/types/components/scrollable/revogr-scroll-virtual.d.ts +49 -0
- package/dist/types/components/selectionFocus/revogr-focus.d.ts +63 -0
- package/dist/types/components/selectionTempRange/revogr-temp-range.d.ts +28 -0
- package/dist/types/components/vnode/vnode-converter.d.ts +19 -0
- package/dist/types/components/vnode/vnode.utils.d.ts +9 -0
- package/dist/types/components.d.ts +2928 -0
- package/dist/types/global/global.d.ts +1 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/plugins/add-rows-on-paste.plugin.d.ts +14 -0
- package/dist/types/plugins/base.plugin.d.ts +51 -0
- package/dist/types/plugins/column-hide.plugin.d.ts +110 -0
- package/dist/types/plugins/column-manage.plugin.d.ts +225 -0
- package/dist/types/plugins/column-stretch.plugin.d.ts +159 -0
- package/dist/types/plugins/column.auto-size.plugin.d.ts +69 -0
- package/dist/types/plugins/column.stretch.plugin.d.ts +20 -0
- package/dist/types/plugins/customColumnDrag/column-move.helper.d.ts +71 -0
- package/dist/types/plugins/customColumnDrag/custom-column-drag.plugin.d.ts +35 -0
- package/dist/types/plugins/customColumnDrag/drag.handler.d.ts +112 -0
- package/dist/types/plugins/customColumnDrag/example.d.ts +31 -0
- package/dist/types/plugins/customColumnDrag/index.d.ts +5 -0
- package/dist/types/plugins/customColumnDrag/types.d.ts +46 -0
- package/dist/types/plugins/dispatcher.d.ts +20 -0
- package/dist/types/plugins/enhanced-scrollbar.plugin.d.ts +76 -0
- package/dist/types/plugins/export/csv.d.ts +9 -0
- package/dist/types/plugins/export/export.plugin.d.ts +24 -0
- package/dist/types/plugins/export/types.d.ts +23 -0
- package/dist/types/plugins/filter/conditions/equal.d.ts +4 -0
- package/dist/types/plugins/filter/conditions/number/greaterThan.d.ts +3 -0
- package/dist/types/plugins/filter/conditions/number/greaterThanOrEqual.d.ts +3 -0
- package/dist/types/plugins/filter/conditions/number/lessThan.d.ts +3 -0
- package/dist/types/plugins/filter/conditions/number/lessThanOrEqual.d.ts +3 -0
- package/dist/types/plugins/filter/conditions/set.d.ts +4 -0
- package/dist/types/plugins/filter/conditions/string/beginswith.d.ts +3 -0
- package/dist/types/plugins/filter/conditions/string/contains.d.ts +4 -0
- package/dist/types/plugins/filter/filter.button.d.ts +14 -0
- package/dist/types/plugins/filter/filter.indexed.d.ts +20 -0
- package/dist/types/plugins/filter/filter.panel.d.ts +53 -0
- package/dist/types/plugins/filter/filter.plugin.d.ts +73 -0
- package/dist/types/plugins/filter/filter.types.d.ts +129 -0
- package/dist/types/plugins/grid-setup.d.ts +65 -0
- package/dist/types/plugins/groupingRow/grouping.const.d.ts +14 -0
- package/dist/types/plugins/groupingRow/grouping.row.expand.service.d.ts +15 -0
- package/dist/types/plugins/groupingRow/grouping.row.plugin.d.ts +39 -0
- package/dist/types/plugins/groupingRow/grouping.row.renderer.d.ts +6 -0
- package/dist/types/plugins/groupingRow/grouping.row.types.d.ts +144 -0
- package/dist/types/plugins/groupingRow/grouping.service.d.ts +36 -0
- package/dist/types/plugins/groupingRow/grouping.trimmed.service.d.ts +10 -0
- package/dist/types/plugins/index.d.ts +22 -0
- package/dist/types/plugins/manual-focus.plugin.d.ts +113 -0
- package/dist/types/plugins/moveColumn/column.drag.plugin.d.ts +50 -0
- package/dist/types/plugins/moveColumn/order-column.handler.d.ts +16 -0
- package/dist/types/plugins/pin-shadow.plugin.d.ts +73 -0
- package/dist/types/plugins/resize-indicator.plugin.d.ts +71 -0
- package/dist/types/plugins/row-select-plugin-2026228.d.ts +367 -0
- package/dist/types/plugins/row-select.plugin.d.ts +378 -0
- package/dist/types/plugins/rtl/rtl.plugin.d.ts +37 -0
- package/dist/types/plugins/sorting/sorting.func.d.ts +9 -0
- package/dist/types/plugins/sorting/sorting.plugin.d.ts +48 -0
- package/dist/types/plugins/sorting/sorting.sign.d.ts +6 -0
- package/dist/types/plugins/sorting/sorting.types.d.ts +14 -0
- package/dist/types/plugins/tree-data.plugin.d.ts +56 -0
- package/dist/types/plugins/wcag/index.d.ts +26 -0
- package/dist/types/services/cell.helpers.d.ts +2 -0
- package/dist/types/services/column.data.provider.d.ts +27 -0
- package/dist/types/services/data.provider.d.ts +36 -0
- package/dist/types/services/dimension.provider.d.ts +71 -0
- package/dist/types/services/local.scroll.service.d.ts +36 -0
- package/dist/types/services/local.scroll.timer.d.ts +32 -0
- package/dist/types/services/selection.store.connector.d.ts +74 -0
- package/dist/types/services/viewport.provider.d.ts +9 -0
- package/dist/types/stencil-public-runtime.d.ts +1709 -0
- package/dist/types/store/dataSource/data.proxy.d.ts +14 -0
- package/dist/types/store/dataSource/data.store.d.ts +77 -0
- package/dist/types/store/dataSource/index.d.ts +3 -0
- package/dist/types/store/dataSource/trimmed.plugin.d.ts +12 -0
- package/dist/types/store/dimension/dimension.helpers.d.ts +24 -0
- package/dist/types/store/dimension/dimension.recalculate.plugin.d.ts +15 -0
- package/dist/types/store/dimension/dimension.store.d.ts +34 -0
- package/dist/types/store/dimension/dimension.trim.plugin.d.ts +13 -0
- package/dist/types/store/dimension/index.d.ts +2 -0
- package/dist/types/store/index.d.ts +8 -0
- package/dist/types/store/selection/index.d.ts +2 -0
- package/dist/types/store/selection/selection.helpers.d.ts +5 -0
- package/dist/types/store/selection/selection.store.d.ts +22 -0
- package/dist/types/store/vp/index.d.ts +7 -0
- package/dist/types/store/vp/viewport.helpers.d.ts +54 -0
- package/dist/types/store/vp/viewport.store.d.ts +38 -0
- package/dist/types/themeManager/theme.compact.d.ts +4 -0
- package/dist/types/themeManager/theme.default.d.ts +4 -0
- package/dist/types/themeManager/theme.material.d.ts +4 -0
- package/dist/types/themeManager/theme.service.d.ts +13 -0
- package/dist/types/types/dimension.d.ts +8 -0
- package/dist/types/types/events.d.ts +2 -0
- package/dist/types/types/index.d.ts +8 -0
- package/dist/types/types/interfaces.d.ts +795 -0
- package/dist/types/types/plugin.d.ts +9 -0
- package/dist/types/types/plugin.types.d.ts +48 -0
- package/dist/types/types/selection.d.ts +178 -0
- package/dist/types/types/theme.d.ts +7 -0
- package/dist/types/types/viewport.interfaces.d.ts +45 -0
- package/dist/types/utils/batchGroupCollapse.d.ts +77 -0
- package/dist/types/utils/browser.d.ts +1 -0
- package/dist/types/utils/cell-template-helper.d.ts +74 -0
- package/dist/types/utils/closest.polifill.d.ts +0 -0
- package/dist/types/utils/column.utils.d.ts +110 -0
- package/dist/types/utils/consts.d.ts +22 -0
- package/dist/types/utils/events.d.ts +5 -0
- package/dist/types/utils/header.utils.d.ts +2 -0
- package/dist/types/utils/index.d.ts +32 -0
- package/dist/types/utils/key.codes.d.ts +73 -0
- package/dist/types/utils/key.utils.d.ts +12 -0
- package/dist/types/utils/mobile.d.ts +1 -0
- package/dist/types/utils/platform.d.ts +4 -0
- package/dist/types/utils/row-header-utils.d.ts +2 -0
- package/dist/types/utils/store.types.d.ts +97 -0
- package/dist/types/utils/store.utils.d.ts +10 -0
- package/hydrate/index.d.ts +273 -0
- package/hydrate/index.js +39851 -0
- package/hydrate/index.mjs +39843 -0
- package/hydrate/package.json +12 -0
- package/loader/cdn.js +4 -0
- package/loader/index.cjs.js +4 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +4 -0
- package/loader/index.js +5 -0
- package/package.json +149 -0
- package/readme.md +303 -0
- package/standalone/column.service.js +1110 -0
- package/standalone/column.service.js.map +1 -0
- package/standalone/consts.js +30 -0
- package/standalone/consts.js.map +1 -0
- package/standalone/data.store.js +3101 -0
- package/standalone/data.store.js.map +1 -0
- package/standalone/debounce.js +215 -0
- package/standalone/debounce.js.map +1 -0
- package/standalone/dimension.helpers.js +229 -0
- package/standalone/dimension.helpers.js.map +1 -0
- package/standalone/filter.button.js +39 -0
- package/standalone/filter.button.js.map +1 -0
- package/standalone/grouping.service.js +234 -0
- package/standalone/grouping.service.js.map +1 -0
- package/standalone/header-group-renderer.js +634 -0
- package/standalone/header-group-renderer.js.map +1 -0
- package/standalone/index.d.ts +72 -0
- package/standalone/index.js +6272 -0
- package/standalone/index.js.map +1 -0
- package/standalone/index2.js +131 -0
- package/standalone/index2.js.map +1 -0
- package/standalone/local.scroll.timer.js +222 -0
- package/standalone/local.scroll.timer.js.map +1 -0
- package/standalone/platform.js +90 -0
- package/standalone/platform.js.map +1 -0
- package/standalone/revo-grid.d.ts +11 -0
- package/standalone/revo-grid.js +8734 -0
- package/standalone/revo-grid.js.map +1 -0
- package/standalone/revogr-attribution.d.ts +11 -0
- package/standalone/revogr-attribution.js +12 -0
- package/standalone/revogr-attribution.js.map +1 -0
- package/standalone/revogr-attribution2.js +32 -0
- package/standalone/revogr-attribution2.js.map +1 -0
- package/standalone/revogr-clipboard.d.ts +11 -0
- package/standalone/revogr-clipboard.js +12 -0
- package/standalone/revogr-clipboard.js.map +1 -0
- package/standalone/revogr-clipboard2.js +179 -0
- package/standalone/revogr-clipboard2.js.map +1 -0
- package/standalone/revogr-data.d.ts +11 -0
- package/standalone/revogr-data.js +12 -0
- package/standalone/revogr-data.js.map +1 -0
- package/standalone/revogr-data2.js +503 -0
- package/standalone/revogr-data2.js.map +1 -0
- package/standalone/revogr-edit.d.ts +11 -0
- package/standalone/revogr-edit.js +12 -0
- package/standalone/revogr-edit.js.map +1 -0
- package/standalone/revogr-edit2.js +330 -0
- package/standalone/revogr-edit2.js.map +1 -0
- package/standalone/revogr-extra.d.ts +11 -0
- package/standalone/revogr-extra.js +12 -0
- package/standalone/revogr-extra.js.map +1 -0
- package/standalone/revogr-extra2.js +73 -0
- package/standalone/revogr-extra2.js.map +1 -0
- package/standalone/revogr-filter-panel.d.ts +11 -0
- package/standalone/revogr-filter-panel.js +411 -0
- package/standalone/revogr-filter-panel.js.map +1 -0
- package/standalone/revogr-focus.d.ts +11 -0
- package/standalone/revogr-focus.js +12 -0
- package/standalone/revogr-focus.js.map +1 -0
- package/standalone/revogr-focus2.js +119 -0
- package/standalone/revogr-focus2.js.map +1 -0
- package/standalone/revogr-grouping-overlay.d.ts +11 -0
- package/standalone/revogr-grouping-overlay.js +12 -0
- package/standalone/revogr-grouping-overlay.js.map +1 -0
- package/standalone/revogr-grouping-overlay2.js +356 -0
- package/standalone/revogr-grouping-overlay2.js.map +1 -0
- package/standalone/revogr-header-unified.d.ts +11 -0
- package/standalone/revogr-header-unified.js +12 -0
- package/standalone/revogr-header-unified.js.map +1 -0
- package/standalone/revogr-header-unified2.js +781 -0
- package/standalone/revogr-header-unified2.js.map +1 -0
- package/standalone/revogr-header.d.ts +11 -0
- package/standalone/revogr-header.js +12 -0
- package/standalone/revogr-header.js.map +1 -0
- package/standalone/revogr-header2.js +343 -0
- package/standalone/revogr-header2.js.map +1 -0
- package/standalone/revogr-order-editor.d.ts +11 -0
- package/standalone/revogr-order-editor.js +12 -0
- package/standalone/revogr-order-editor.js.map +1 -0
- package/standalone/revogr-order-editor2.js +201 -0
- package/standalone/revogr-order-editor2.js.map +1 -0
- package/standalone/revogr-overlay-selection.d.ts +11 -0
- package/standalone/revogr-overlay-selection.js +12 -0
- package/standalone/revogr-overlay-selection.js.map +1 -0
- package/standalone/revogr-overlay-selection2.js +1068 -0
- package/standalone/revogr-overlay-selection2.js.map +1 -0
- package/standalone/revogr-row-headers.d.ts +11 -0
- package/standalone/revogr-row-headers.js +12 -0
- package/standalone/revogr-row-headers.js.map +1 -0
- package/standalone/revogr-row-headers2.js +625 -0
- package/standalone/revogr-row-headers2.js.map +1 -0
- package/standalone/revogr-scroll-virtual.d.ts +11 -0
- package/standalone/revogr-scroll-virtual.js +12 -0
- package/standalone/revogr-scroll-virtual.js.map +1 -0
- package/standalone/revogr-scroll-virtual2.js +235 -0
- package/standalone/revogr-scroll-virtual2.js.map +1 -0
- package/standalone/revogr-temp-range.d.ts +11 -0
- package/standalone/revogr-temp-range.js +12 -0
- package/standalone/revogr-temp-range.js.map +1 -0
- package/standalone/revogr-temp-range2.js +93 -0
- package/standalone/revogr-temp-range2.js.map +1 -0
- package/standalone/revogr-viewport-scroll.d.ts +11 -0
- package/standalone/revogr-viewport-scroll.js +12 -0
- package/standalone/revogr-viewport-scroll.js.map +1 -0
- package/standalone/revogr-viewport-scroll2.js +761 -0
- package/standalone/revogr-viewport-scroll2.js.map +1 -0
- package/standalone/row-renderer.js +41 -0
- package/standalone/row-renderer.js.map +1 -0
- package/standalone/selection.utils.js +179 -0
- package/standalone/selection.utils.js.map +1 -0
- package/standalone/throttle.js +75 -0
- package/standalone/throttle.js.map +1 -0
- package/standalone/toNumber.js +282 -0
- package/standalone/toNumber.js.map +1 -0
- package/standalone/vnode-converter.js +46 -0
- package/standalone/vnode-converter.js.map +1 -0
- package/standalone/vnode-html.d.ts +11 -0
- package/standalone/vnode-html.js +12 -0
- package/standalone/vnode-html.js.map +1 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built by Revolist OU ❤️
|
|
3
|
+
*/
|
|
4
|
+
import { scaleValue } from "../utils";
|
|
5
|
+
const initialParams = {
|
|
6
|
+
contentSize: 0,
|
|
7
|
+
clientSize: 0,
|
|
8
|
+
virtualSize: 0,
|
|
9
|
+
maxSize: 0,
|
|
10
|
+
};
|
|
11
|
+
const NO_COORDINATE = -1;
|
|
12
|
+
/**
|
|
13
|
+
* Based on content size, client size and virtual size
|
|
14
|
+
* return full size
|
|
15
|
+
*/
|
|
16
|
+
export function getContentSize(contentSize, clientSize, virtualSize = 0) {
|
|
17
|
+
if (virtualSize > contentSize) {
|
|
18
|
+
return 0;
|
|
19
|
+
}
|
|
20
|
+
return contentSize + (virtualSize ? clientSize - virtualSize : 0);
|
|
21
|
+
}
|
|
22
|
+
export default class LocalScrollService {
|
|
23
|
+
constructor(cfg) {
|
|
24
|
+
this.cfg = cfg;
|
|
25
|
+
this.preventArtificialScroll = {
|
|
26
|
+
rgRow: null,
|
|
27
|
+
rgCol: null,
|
|
28
|
+
};
|
|
29
|
+
// to check if scroll changed
|
|
30
|
+
this.previousScroll = {
|
|
31
|
+
rgRow: NO_COORDINATE,
|
|
32
|
+
rgCol: NO_COORDINATE,
|
|
33
|
+
};
|
|
34
|
+
this.params = {
|
|
35
|
+
rgRow: Object.assign({}, initialParams),
|
|
36
|
+
rgCol: Object.assign({}, initialParams),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
setParams(params, dimension) {
|
|
40
|
+
const virtualContentSize = getContentSize(params.contentSize, params.clientSize, params.virtualSize);
|
|
41
|
+
this.params[dimension] = Object.assign(Object.assign({}, params), { maxSize: virtualContentSize - params.clientSize, virtualContentSize });
|
|
42
|
+
}
|
|
43
|
+
// apply scroll values after scroll done
|
|
44
|
+
async setScroll(e) {
|
|
45
|
+
this.cancelScroll(e.dimension);
|
|
46
|
+
// Outside scroll synchronization (e.g. newly mounted viewport replay)
|
|
47
|
+
// should be applied immediately to avoid one-frame jump/blank flash.
|
|
48
|
+
if (e.outside) {
|
|
49
|
+
const params = this.getParams(e.dimension);
|
|
50
|
+
e.coordinate = Math.ceil(e.coordinate);
|
|
51
|
+
this.previousScroll[e.dimension] = this.wrapCoordinate(e.coordinate, params);
|
|
52
|
+
this.preventArtificialScroll[e.dimension] = null;
|
|
53
|
+
this.cfg.applyScroll(Object.assign(Object.assign({}, e), { coordinate: params.virtualSize
|
|
54
|
+
? this.convert(e.coordinate, params, false)
|
|
55
|
+
: e.coordinate }));
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
// start frame animation
|
|
59
|
+
const frameAnimation = new Promise((resolve, reject) => {
|
|
60
|
+
// for example safari desktop has issues with animation frame
|
|
61
|
+
if (this.cfg.skipAnimationFrame) {
|
|
62
|
+
return resolve();
|
|
63
|
+
}
|
|
64
|
+
const animationId = window.requestAnimationFrame(() => {
|
|
65
|
+
resolve();
|
|
66
|
+
});
|
|
67
|
+
this.preventArtificialScroll[e.dimension] = reject.bind(null, animationId);
|
|
68
|
+
});
|
|
69
|
+
try {
|
|
70
|
+
await frameAnimation;
|
|
71
|
+
const params = this.getParams(e.dimension);
|
|
72
|
+
e.coordinate = Math.ceil(e.coordinate);
|
|
73
|
+
this.previousScroll[e.dimension] = this.wrapCoordinate(e.coordinate, params);
|
|
74
|
+
this.preventArtificialScroll[e.dimension] = null;
|
|
75
|
+
this.cfg.applyScroll(Object.assign(Object.assign({}, e), { coordinate: params.virtualSize
|
|
76
|
+
? this.convert(e.coordinate, params, false)
|
|
77
|
+
: e.coordinate }));
|
|
78
|
+
}
|
|
79
|
+
catch (id) {
|
|
80
|
+
window.cancelAnimationFrame(id);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* On scroll event started
|
|
85
|
+
*/
|
|
86
|
+
scroll(coordinate, dimension, force = false, delta, outside = false) {
|
|
87
|
+
// cancel all previous scrolls for same dimension
|
|
88
|
+
this.cancelScroll(dimension);
|
|
89
|
+
// drop if no change
|
|
90
|
+
if (!force && this.previousScroll[dimension] === coordinate) {
|
|
91
|
+
this.previousScroll[dimension] = NO_COORDINATE;
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
const param = this.getParams(dimension);
|
|
95
|
+
// let component know about scroll event started
|
|
96
|
+
this.cfg.runScroll({
|
|
97
|
+
dimension: dimension,
|
|
98
|
+
coordinate: param.virtualSize
|
|
99
|
+
? this.convert(coordinate, param)
|
|
100
|
+
: coordinate,
|
|
101
|
+
delta,
|
|
102
|
+
outside,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
getParams(dimension) {
|
|
106
|
+
return this.params[dimension];
|
|
107
|
+
}
|
|
108
|
+
// check if scroll outside of region to avoid looping
|
|
109
|
+
wrapCoordinate(c, param) {
|
|
110
|
+
if (c < 0) {
|
|
111
|
+
return NO_COORDINATE;
|
|
112
|
+
}
|
|
113
|
+
if (typeof param.maxSize === 'number' && c > param.maxSize) {
|
|
114
|
+
return param.maxSize;
|
|
115
|
+
}
|
|
116
|
+
return c;
|
|
117
|
+
}
|
|
118
|
+
// prevent already started scroll, performance optimization
|
|
119
|
+
cancelScroll(dimension) {
|
|
120
|
+
var _a, _b;
|
|
121
|
+
(_b = (_a = this.preventArtificialScroll)[dimension]) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
122
|
+
this.preventArtificialScroll[dimension] = null;
|
|
123
|
+
}
|
|
124
|
+
/* convert virtual to real and back, scale range */
|
|
125
|
+
convert(pos, param, toReal = true) {
|
|
126
|
+
var _a;
|
|
127
|
+
const minRange = param.clientSize;
|
|
128
|
+
const from = [0, ((_a = param.virtualContentSize) !== null && _a !== void 0 ? _a : minRange) - minRange];
|
|
129
|
+
const to = [0, param.contentSize - param.virtualSize];
|
|
130
|
+
if (toReal) {
|
|
131
|
+
return scaleValue(pos, from, to);
|
|
132
|
+
}
|
|
133
|
+
return scaleValue(pos, to, from);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=local.scroll.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local.scroll.service.js","sourceRoot":"","sources":["../../src/services/local.scroll.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAoBtC,MAAM,aAAa,GAAW;IAC5B,WAAW,EAAE,CAAC;IACd,UAAU,EAAE,CAAC;IACb,WAAW,EAAE,CAAC;IACd,OAAO,EAAE,CAAC;CACX,CAAC;AACF,MAAM,aAAa,GAAG,CAAC,CAAC,CAAC;AAEzB;;;GAGG;AACH,MAAM,UAAU,cAAc,CAC5B,WAAmB,EACnB,UAAkB,EAClB,WAAW,GAAG,CAAC;IAEf,IAAI,WAAW,GAAG,WAAW,EAAE,CAAC;QAC9B,OAAO,CAAC,CAAC;IACX,CAAC;IACD,OAAO,WAAW,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpE,CAAC;AAED,MAAM,CAAC,OAAO,OAAO,kBAAkB;IAerC,YAAoB,GAAW;QAAX,QAAG,GAAH,GAAG,CAAQ;QAdvB,4BAAuB,GAA+C;YAC5E,KAAK,EAAE,IAAI;YACX,KAAK,EAAE,IAAI;SACZ,CAAC;QACF,6BAA6B;QACrB,mBAAc,GAAkC;YACtD,KAAK,EAAE,aAAa;YACpB,KAAK,EAAE,aAAa;SACrB,CAAC;QACM,WAAM,GAAkC;YAC9C,KAAK,oBAAO,aAAa,CAAE;YAC3B,KAAK,oBAAO,aAAa,CAAE;SAC5B,CAAC;IAEgC,CAAC;IAEnC,SAAS,CAAC,MAAc,EAAE,SAAwB;QAChD,MAAM,kBAAkB,GAAG,cAAc,CACvC,MAAM,CAAC,WAAW,EAClB,MAAM,CAAC,UAAU,EACjB,MAAM,CAAC,WAAW,CACnB,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,mCACjB,MAAM,KACT,OAAO,EAAE,kBAAkB,GAAG,MAAM,CAAC,UAAU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AU,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QACnC,CAAC;QACD,OAAO,UAAU,CAAC,GAAG,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;IACnC,CAAC;CACF","sourcesContent":["import type { DimensionType, ViewPortScrollEvent } from '@type';\nimport { scaleValue } from '../utils';\n\ninterface Config {\n skipAnimationFrame?: boolean;\n // scroll event inited and direction cached\n // scrollingService.proxyScroll get tiggered\n // setScroll event called from scrollingService\n runScroll(e: ViewPortScrollEvent): void;\n // all operation finished, apply scroll values\n applyScroll(e: ViewPortScrollEvent): void;\n}\n\ntype Params = {\n contentSize: number;\n virtualContentSize?: number;\n clientSize: number;\n virtualSize: number;\n maxSize?: number;\n};\n\nconst initialParams: Params = {\n contentSize: 0,\n clientSize: 0,\n virtualSize: 0,\n maxSize: 0,\n};\nconst NO_COORDINATE = -1;\n\n/**\n * Based on content size, client size and virtual size\n * return full size\n */\nexport function getContentSize(\n contentSize: number,\n clientSize: number,\n virtualSize = 0,\n): number {\n if (virtualSize > contentSize) {\n return 0;\n }\n return contentSize + (virtualSize ? clientSize - virtualSize : 0);\n}\n\nexport default class LocalScrollService {\n private preventArtificialScroll: Record<DimensionType, (() => void) | null> = {\n rgRow: null,\n rgCol: null,\n };\n // to check if scroll changed\n private previousScroll: Record<DimensionType, number> = {\n rgRow: NO_COORDINATE,\n rgCol: NO_COORDINATE,\n };\n private params: Record<DimensionType, Params> = {\n rgRow: { ...initialParams },\n rgCol: { ...initialParams },\n };\n\n constructor(private cfg: Config) {}\n\n setParams(params: Params, dimension: DimensionType) {\n const virtualContentSize = getContentSize(\n params.contentSize,\n params.clientSize,\n params.virtualSize,\n );\n this.params[dimension] = {\n ...params,\n maxSize: virtualContentSize - params.clientSize,\n virtualContentSize,\n };\n }\n\n // apply scroll values after scroll done\n async setScroll(e: ViewPortScrollEvent) {\n this.cancelScroll(e.dimension);\n\n // Outside scroll synchronization (e.g. newly mounted viewport replay)\n // should be applied immediately to avoid one-frame jump/blank flash.\n if (e.outside) {\n const params = this.getParams(e.dimension);\n e.coordinate = Math.ceil(e.coordinate);\n this.previousScroll[e.dimension] = this.wrapCoordinate(\n e.coordinate,\n params,\n );\n this.preventArtificialScroll[e.dimension] = null;\n this.cfg.applyScroll({\n ...e,\n coordinate: params.virtualSize\n ? this.convert(e.coordinate, params, false)\n : e.coordinate,\n });\n return;\n }\n\n // start frame animation\n const frameAnimation = new Promise<void>((resolve, reject) => {\n // for example safari desktop has issues with animation frame\n if (this.cfg.skipAnimationFrame) {\n return resolve();\n }\n const animationId = window.requestAnimationFrame(() => {\n resolve();\n });\n this.preventArtificialScroll[e.dimension] = reject.bind(\n null,\n animationId,\n );\n });\n\n try {\n await frameAnimation;\n const params = this.getParams(e.dimension);\n e.coordinate = Math.ceil(e.coordinate);\n this.previousScroll[e.dimension] = this.wrapCoordinate(\n e.coordinate,\n params,\n );\n this.preventArtificialScroll[e.dimension] = null;\n this.cfg.applyScroll({\n ...e,\n coordinate: params.virtualSize\n ? this.convert(e.coordinate, params, false)\n : e.coordinate,\n });\n } catch (id) {\n window.cancelAnimationFrame(id);\n }\n }\n\n /**\n * On scroll event started\n */\n scroll(\n coordinate: number,\n dimension: DimensionType,\n force = false,\n delta?: number,\n outside = false,\n ) {\n // cancel all previous scrolls for same dimension\n this.cancelScroll(dimension);\n\n // drop if no change\n if (!force && this.previousScroll[dimension] === coordinate) {\n this.previousScroll[dimension] = NO_COORDINATE;\n return;\n }\n\n const param = this.getParams(dimension);\n // let component know about scroll event started\n this.cfg.runScroll({\n dimension: dimension,\n coordinate: param.virtualSize\n ? this.convert(coordinate, param)\n : coordinate,\n delta,\n outside,\n });\n }\n\n private getParams(dimension: DimensionType): Params {\n return this.params[dimension];\n }\n\n // check if scroll outside of region to avoid looping\n private wrapCoordinate(c: number, param: Params): number {\n if (c < 0) {\n return NO_COORDINATE;\n }\n\n if (typeof param.maxSize === 'number' && c > param.maxSize) {\n return param.maxSize;\n }\n return c;\n }\n\n // prevent already started scroll, performance optimization\n private cancelScroll(dimension: DimensionType) {\n this.preventArtificialScroll[dimension]?.();\n this.preventArtificialScroll[dimension] = null;\n }\n\n /* convert virtual to real and back, scale range */\n private convert(pos: number, param: Params, toReal = true): number {\n const minRange = param.clientSize;\n const from: [number, number] = [0, (param.virtualContentSize ?? minRange) - minRange];\n const to: [number, number] = [0, param.contentSize - param.virtualSize];\n if (toReal) {\n return scaleValue(pos, from, to);\n }\n return scaleValue(pos, to, from);\n }\n}\n"]}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built by Revolist OU ❤️
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Apply changes only if mousewheel event happened some time ago (scrollThrottling)
|
|
6
|
+
*/
|
|
7
|
+
export class LocalScrollTimer {
|
|
8
|
+
constructor(scrollThrottling = 10) {
|
|
9
|
+
this.scrollThrottling = scrollThrottling;
|
|
10
|
+
/**
|
|
11
|
+
* Last mw event time for trigger scroll function below
|
|
12
|
+
* If mousewheel function was ignored we still need to trigger render
|
|
13
|
+
*/
|
|
14
|
+
this.mouseWheelScrollTimestamp = {
|
|
15
|
+
rgCol: 0,
|
|
16
|
+
rgRow: 0,
|
|
17
|
+
};
|
|
18
|
+
this.lastKnownScrollCoordinate = {
|
|
19
|
+
rgCol: 0,
|
|
20
|
+
rgRow: 0,
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Check if scroll is ready to accept new value
|
|
24
|
+
* this is an edge case for scroll events
|
|
25
|
+
* when we need to apply scroll after throttling
|
|
26
|
+
*/
|
|
27
|
+
this.lastScrollUpdateCallbacks = {};
|
|
28
|
+
}
|
|
29
|
+
setCoordinate(e) {
|
|
30
|
+
this.lastKnownScrollCoordinate[e.dimension] = e.coordinate;
|
|
31
|
+
// 程序化/应用滚动应使任何延迟回调失效
|
|
32
|
+
// 使用较旧的坐标排队,以避免过时的回弹更新。
|
|
33
|
+
this.clearLastScrollUpdate(e.dimension);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Remember last mw event time
|
|
37
|
+
*/
|
|
38
|
+
latestScrollUpdate(dimension) {
|
|
39
|
+
this.mouseWheelScrollTimestamp[dimension] = new Date().getTime();
|
|
40
|
+
}
|
|
41
|
+
isReady(type, coordinate) {
|
|
42
|
+
// if there is a callback, clear it
|
|
43
|
+
if (this.lastScrollUpdateCallbacks[type]) {
|
|
44
|
+
this.clearLastScrollUpdate(type);
|
|
45
|
+
}
|
|
46
|
+
// apply after throttling
|
|
47
|
+
return this.verifyChange(type, coordinate);
|
|
48
|
+
}
|
|
49
|
+
verifyChange(type, coordinate) {
|
|
50
|
+
const now = new Date().getTime();
|
|
51
|
+
const change = now - this.mouseWheelScrollTimestamp[type];
|
|
52
|
+
return change > this.scrollThrottling &&
|
|
53
|
+
coordinate !== this.lastKnownScrollCoordinate[type];
|
|
54
|
+
}
|
|
55
|
+
clearLastScrollUpdate(type) {
|
|
56
|
+
var _a, _b;
|
|
57
|
+
clearTimeout((_b = (_a = this.lastScrollUpdateCallbacks[type]) === null || _a === void 0 ? void 0 : _a.timeout) !== null && _b !== void 0 ? _b : 0);
|
|
58
|
+
delete this.lastScrollUpdateCallbacks[type];
|
|
59
|
+
}
|
|
60
|
+
throttleLastScrollUpdate(type, coordinate, lastScrollUpdate) {
|
|
61
|
+
// if scrollThrottling is set
|
|
62
|
+
// we need to throttle the last scroll event
|
|
63
|
+
if (this.scrollThrottling) {
|
|
64
|
+
this.clearLastScrollUpdate(type);
|
|
65
|
+
// save lastScrollUpdate callback
|
|
66
|
+
const callback = this.lastScrollUpdateCallbacks[type] = {
|
|
67
|
+
callback: lastScrollUpdate,
|
|
68
|
+
timestamp: new Date().getTime(),
|
|
69
|
+
coordinate,
|
|
70
|
+
timeout: 0,
|
|
71
|
+
};
|
|
72
|
+
callback.timeout = setTimeout(() => {
|
|
73
|
+
// clear timeout
|
|
74
|
+
this.clearLastScrollUpdate(type);
|
|
75
|
+
// if scrollThrottling is set, and the last scroll event happened before the timeout started
|
|
76
|
+
// we need to throttle the last scroll event
|
|
77
|
+
if (this.mouseWheelScrollTimestamp[type] < callback.timestamp && this.verifyChange(type, callback.coordinate)) {
|
|
78
|
+
callback.callback();
|
|
79
|
+
}
|
|
80
|
+
}, this.scrollThrottling + 50);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=local.scroll.timer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local.scroll.timer.js","sourceRoot":"","sources":["../../src/services/local.scroll.timer.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,MAAM,OAAO,gBAAgB;IAc3B,YAAoB,mBAAmB,EAAE;QAArB,qBAAgB,GAAhB,gBAAgB,CAAK;QAbzC;;;WAGG;QACK,8BAAyB,GAAkC;YACjE,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,CAAC;SACT,CAAC;QACM,8BAAyB,GAAkC;YACjE,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,CAAC;SACT,CAAC;QAkCF;;;;WAIG;QACK,8BAAyB,GAK3B,EAAE,CAAC;IA1CmC,CAAC;IAE7C,aAAa,CAAC,CAAmD;QAC/D,IAAI,CAAC,yBAAyB,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC;QAC3D,qBAAqB;QACrB,wBAAwB;QACxB,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAC1C,CAAC;IAED;;OAEG;IACH,kBAAkB,CAAC,SAAwB;QACzC,IAAI,CAAC,yBAAyB,CAAC,SAAS,CAAC,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;IACnE,CAAC;IAED,OAAO,CAAC,IAAmB,EAAE,UAAkB;QAC7C,mCAAmC;QACnC,IAAI,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,EAAE,CAAC;YACzC,IAAI,CAAC,qB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,yBAAyB,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,SAAS,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;oBAC9G,QAAQ,CAAC,QAAQ,EAAE,CAAC;gBACtB,CAAC;YACH,CAAC,EAAE,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;CACF","sourcesContent":["import type { DimensionType } from '@type';\n/**\n * Apply changes only if mousewheel event happened some time ago (scrollThrottling)\n */\nexport class LocalScrollTimer {\n /**\n * Last mw event time for trigger scroll function below\n * If mousewheel function was ignored we still need to trigger render\n */\n private mouseWheelScrollTimestamp: Record<DimensionType, number> = {\n rgCol: 0,\n rgRow: 0,\n };\n private lastKnownScrollCoordinate: Record<DimensionType, number> = {\n rgCol: 0,\n rgRow: 0,\n };\n\n constructor(private scrollThrottling = 10) {}\n\n setCoordinate(e: { dimension: DimensionType; coordinate: number }) {\n this.lastKnownScrollCoordinate[e.dimension] = e.coordinate;\n // 程序化/应用滚动应使任何延迟回调失效\n // 使用较旧的坐标排队,以避免过时的回弹更新。\n this.clearLastScrollUpdate(e.dimension);\n }\n\n /**\n * Remember last mw event time\n */\n latestScrollUpdate(dimension: DimensionType) {\n this.mouseWheelScrollTimestamp[dimension] = new Date().getTime();\n }\n\n isReady(type: DimensionType, coordinate: number) {\n // if there is a callback, clear it\n if (this.lastScrollUpdateCallbacks[type]) {\n this.clearLastScrollUpdate(type)\n }\n // apply after throttling\n return this.verifyChange(type, coordinate);\n }\n\n private verifyChange(type: DimensionType, coordinate: number) {\n const now = new Date().getTime();\n const change = now - this.mouseWheelScrollTimestamp[type];\n return change > this.scrollThrottling &&\n coordinate !== this.lastKnownScrollCoordinate[type];\n }\n\n /**\n * Check if scroll is ready to accept new value\n * this is an edge case for scroll events\n * when we need to apply scroll after throttling\n */\n private lastScrollUpdateCallbacks: Partial<Record<DimensionType, {\n callback: () => void;\n timestamp: number;\n coordinate: number;\n timeout: number;\n }>> = {};\n\n private clearLastScrollUpdate(type: DimensionType) {\n clearTimeout(this.lastScrollUpdateCallbacks[type]?.timeout ?? 0);\n delete this.lastScrollUpdateCallbacks[type];\n }\n\n throttleLastScrollUpdate(type: DimensionType, coordinate: number, lastScrollUpdate: () => void) {\n // if scrollThrottling is set\n // we need to throttle the last scroll event\n if (this.scrollThrottling) {\n this.clearLastScrollUpdate(type)\n // save lastScrollUpdate callback\n const callback = this.lastScrollUpdateCallbacks[type] = {\n callback: lastScrollUpdate,\n timestamp: new Date().getTime(),\n coordinate,\n timeout: 0 as any,\n };\n callback.timeout = setTimeout(() => {\n // clear timeout\n this.clearLastScrollUpdate(type)\n // if scrollThrottling is set, and the last scroll event happened before the timeout started\n // we need to throttle the last scroll event\n if (this.mouseWheelScrollTimestamp[type] < callback.timestamp && this.verifyChange(type, callback.coordinate)) {\n callback.callback();\n }\n }, this.scrollThrottling + 50);\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built by Revolist OU ❤️
|
|
3
|
+
*/
|
|
4
|
+
import { cropCellToMax, nextCell, SelectionStore } from "../store/index";
|
|
5
|
+
export class SelectionStoreConnector {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.stores = {};
|
|
8
|
+
this.columnStores = {};
|
|
9
|
+
this.rowStores = {};
|
|
10
|
+
/**
|
|
11
|
+
* Helpers for data conversion
|
|
12
|
+
*/
|
|
13
|
+
this.storesByType = {};
|
|
14
|
+
this.storesXToType = {};
|
|
15
|
+
this.storesYToType = {};
|
|
16
|
+
}
|
|
17
|
+
get focusedStore() {
|
|
18
|
+
var _a;
|
|
19
|
+
for (let y in this.stores) {
|
|
20
|
+
for (let x in this.stores[y]) {
|
|
21
|
+
const focused = (_a = this.stores[y][x]) === null || _a === void 0 ? void 0 : _a.store.get('focus');
|
|
22
|
+
if (focused) {
|
|
23
|
+
return {
|
|
24
|
+
entity: this.stores[y][x],
|
|
25
|
+
cell: focused,
|
|
26
|
+
position: {
|
|
27
|
+
x: parseInt(x, 10),
|
|
28
|
+
y: parseInt(y, 10),
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
get edit() {
|
|
37
|
+
var _a;
|
|
38
|
+
return (_a = this.focusedStore) === null || _a === void 0 ? void 0 : _a.entity.store.get('edit');
|
|
39
|
+
}
|
|
40
|
+
get focused() {
|
|
41
|
+
var _a;
|
|
42
|
+
return (_a = this.focusedStore) === null || _a === void 0 ? void 0 : _a.entity.store.get('focus');
|
|
43
|
+
}
|
|
44
|
+
get selectedRange() {
|
|
45
|
+
var _a;
|
|
46
|
+
return (_a = this.focusedStore) === null || _a === void 0 ? void 0 : _a.entity.store.get('range');
|
|
47
|
+
}
|
|
48
|
+
registerColumn(x, type) {
|
|
49
|
+
if (this.columnStores[x]) {
|
|
50
|
+
return this.columnStores[x];
|
|
51
|
+
}
|
|
52
|
+
this.columnStores[x] = new SelectionStore();
|
|
53
|
+
// build cross-linking type to position
|
|
54
|
+
this.storesByType[type] = x;
|
|
55
|
+
this.storesXToType[x] = type;
|
|
56
|
+
return this.columnStores[x];
|
|
57
|
+
}
|
|
58
|
+
registerRow(y, type) {
|
|
59
|
+
if (this.rowStores[y]) {
|
|
60
|
+
return this.rowStores[y];
|
|
61
|
+
}
|
|
62
|
+
this.rowStores[y] = new SelectionStore();
|
|
63
|
+
// build cross linking type to position
|
|
64
|
+
this.storesByType[type] = y;
|
|
65
|
+
this.storesYToType[y] = type;
|
|
66
|
+
return this.rowStores[y];
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Cross store proxy, based on multiple dimensions
|
|
70
|
+
*/
|
|
71
|
+
register({ x, y }) {
|
|
72
|
+
if (!this.stores[y]) {
|
|
73
|
+
this.stores[y] = {};
|
|
74
|
+
}
|
|
75
|
+
let store = this.stores[y][x];
|
|
76
|
+
if (store) {
|
|
77
|
+
// Store already registered. Do not register twice
|
|
78
|
+
return store;
|
|
79
|
+
}
|
|
80
|
+
this.stores[y][x] = store = new SelectionStore();
|
|
81
|
+
// proxy update, column store trigger only range area
|
|
82
|
+
store.onChange('range', c => {
|
|
83
|
+
this.columnStores[x].setRangeArea(c);
|
|
84
|
+
this.rowStores[y].setRangeArea(c);
|
|
85
|
+
});
|
|
86
|
+
// clean up on remove
|
|
87
|
+
store.store.on('dispose', () => this.destroy(x, y));
|
|
88
|
+
return store;
|
|
89
|
+
}
|
|
90
|
+
destroy(x, y) {
|
|
91
|
+
var _a, _b;
|
|
92
|
+
(_a = this.columnStores[x]) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
93
|
+
(_b = this.rowStores[y]) === null || _b === void 0 ? void 0 : _b.dispose();
|
|
94
|
+
delete this.rowStores[y];
|
|
95
|
+
delete this.columnStores[x];
|
|
96
|
+
// clear x cross-link
|
|
97
|
+
if (this.storesXToType[x]) {
|
|
98
|
+
const type = this.storesXToType[x];
|
|
99
|
+
delete this.storesXToType[x];
|
|
100
|
+
delete this.storesByType[type];
|
|
101
|
+
}
|
|
102
|
+
// clear y cross-link
|
|
103
|
+
if (this.storesYToType[y]) {
|
|
104
|
+
const type = this.storesYToType[y];
|
|
105
|
+
delete this.storesYToType[y];
|
|
106
|
+
delete this.storesByType[type];
|
|
107
|
+
}
|
|
108
|
+
if (this.stores[y]) {
|
|
109
|
+
delete this.stores[y][x];
|
|
110
|
+
}
|
|
111
|
+
// clear empty rows
|
|
112
|
+
if (!Object.keys(this.stores[y] || {}).length) {
|
|
113
|
+
delete this.stores[y];
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
setEditByCell(storePos, editCell) {
|
|
117
|
+
this.focusByCell(storePos, editCell, editCell);
|
|
118
|
+
this.setEdit('');
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Sets the next focus cell before the current one.
|
|
122
|
+
*
|
|
123
|
+
* @param focus - The cell to set as the next focus.
|
|
124
|
+
*/
|
|
125
|
+
beforeNextFocusCell(focus) {
|
|
126
|
+
var _a;
|
|
127
|
+
// If there is no focused store, return early.
|
|
128
|
+
if (!this.focusedStore) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
// Get the next store based on the current focus and the last cell.
|
|
132
|
+
const lastCell = this.focusedStore.entity.store.get('lastCell');
|
|
133
|
+
const next = lastCell && this.getNextStore(focus, this.focusedStore.position, lastCell);
|
|
134
|
+
// Set the next focus cell in the store.
|
|
135
|
+
(_a = next === null || next === void 0 ? void 0 : next.store) === null || _a === void 0 ? void 0 : _a.setNextFocus(Object.assign(Object.assign({}, focus), next.item));
|
|
136
|
+
}
|
|
137
|
+
focusByCell(storePos, start, end) {
|
|
138
|
+
const store = this.stores[storePos.y][storePos.x];
|
|
139
|
+
this.focus(store, { focus: start, end });
|
|
140
|
+
}
|
|
141
|
+
focus(store, { focus, end }) {
|
|
142
|
+
const currentStorePointer = this.getCurrentStorePointer(store);
|
|
143
|
+
if (!currentStorePointer) {
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
// check for the focus in nearby store/viewport
|
|
147
|
+
const lastCell = store.store.get('lastCell');
|
|
148
|
+
const next = lastCell && this.getNextStore(focus, currentStorePointer, lastCell);
|
|
149
|
+
// if next store present - update
|
|
150
|
+
if (next === null || next === void 0 ? void 0 : next.store) {
|
|
151
|
+
const item = Object.assign(Object.assign({}, focus), next.item);
|
|
152
|
+
this.focus(next.store, { focus: item, end: item });
|
|
153
|
+
return null;
|
|
154
|
+
}
|
|
155
|
+
if (lastCell) {
|
|
156
|
+
focus = cropCellToMax(focus, lastCell);
|
|
157
|
+
end = cropCellToMax(end, lastCell);
|
|
158
|
+
}
|
|
159
|
+
store.setFocus(focus, end);
|
|
160
|
+
return focus;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Retrieves the current store pointer based on the active store.
|
|
164
|
+
* Clears focus from all stores except the active one.
|
|
165
|
+
*/
|
|
166
|
+
getCurrentStorePointer(store) {
|
|
167
|
+
let currentStorePointer;
|
|
168
|
+
// Iterate through all stores
|
|
169
|
+
for (let y in this.stores) {
|
|
170
|
+
for (let x in this.stores[y]) {
|
|
171
|
+
const s = this.stores[y][x];
|
|
172
|
+
// Clear focus from stores other than the active one
|
|
173
|
+
if (s !== store) {
|
|
174
|
+
s.clearFocus();
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
// Update the current store pointer with the active store coordinates
|
|
178
|
+
currentStorePointer = {
|
|
179
|
+
x: parseInt(x, 10),
|
|
180
|
+
y: parseInt(y, 10)
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return currentStorePointer;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Retrieves the next store based on the focus cell and current store pointer.
|
|
189
|
+
* If the next store exists, returns an object with the next store and the item in the new store.
|
|
190
|
+
* If the next store does not exist, returns null.
|
|
191
|
+
*/
|
|
192
|
+
getNextStore(focus, currentStorePointer, lastCell) {
|
|
193
|
+
// item in new store
|
|
194
|
+
const nextItem = nextCell(focus, lastCell);
|
|
195
|
+
let nextStore;
|
|
196
|
+
if (nextItem) {
|
|
197
|
+
Object.entries(nextItem).forEach(([type, nextItemCoord]) => {
|
|
198
|
+
let stores;
|
|
199
|
+
switch (type) {
|
|
200
|
+
case 'x':
|
|
201
|
+
// Get the X stores for the current Y coordinate of the current store pointer
|
|
202
|
+
stores = this.getXStores(currentStorePointer.y);
|
|
203
|
+
break;
|
|
204
|
+
case 'y':
|
|
205
|
+
// Get the Y stores for the current X coordinate of the current store pointer
|
|
206
|
+
stores = this.getYStores(currentStorePointer.x);
|
|
207
|
+
break;
|
|
208
|
+
}
|
|
209
|
+
// Get the next store based on the item in the new store
|
|
210
|
+
if (nextItemCoord >= 0) {
|
|
211
|
+
nextStore = stores[++currentStorePointer[type]];
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
nextStore = stores[--currentStorePointer[type]];
|
|
215
|
+
const nextLastCell = nextStore === null || nextStore === void 0 ? void 0 : nextStore.store.get('lastCell');
|
|
216
|
+
if (nextLastCell) {
|
|
217
|
+
nextItem[type] = nextLastCell[type] + nextItemCoord;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
// if last cell is empty store is empty, no next store
|
|
223
|
+
const lastCellNext = nextStore === null || nextStore === void 0 ? void 0 : nextStore.store.get('lastCell');
|
|
224
|
+
if (!(lastCellNext === null || lastCellNext === void 0 ? void 0 : lastCellNext.x) || !(lastCellNext === null || lastCellNext === void 0 ? void 0 : lastCellNext.y)) {
|
|
225
|
+
nextStore = undefined;
|
|
226
|
+
}
|
|
227
|
+
return {
|
|
228
|
+
store: nextStore,
|
|
229
|
+
item: nextItem,
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
clearAll() {
|
|
233
|
+
var _a;
|
|
234
|
+
for (let y in this.stores) {
|
|
235
|
+
for (let x in this.stores[y]) {
|
|
236
|
+
(_a = this.stores[y][x]) === null || _a === void 0 ? void 0 : _a.clearFocus();
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
setEdit(val) {
|
|
241
|
+
if (!this.focusedStore) {
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
this.focusedStore.entity.setEdit(val);
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Select all cells across all stores
|
|
248
|
+
*/
|
|
249
|
+
selectAll() {
|
|
250
|
+
for (let y in this.stores) {
|
|
251
|
+
for (let x in this.stores[y]) {
|
|
252
|
+
const store = this.stores[y][x];
|
|
253
|
+
if (!store) {
|
|
254
|
+
continue;
|
|
255
|
+
}
|
|
256
|
+
const lastCell = store.store.get('lastCell');
|
|
257
|
+
if (lastCell) {
|
|
258
|
+
store.setRange({ x: 0, y: 0 }, { x: lastCell.x - 1, y: lastCell.y - 1 });
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
getXStores(y) {
|
|
264
|
+
return this.stores[y];
|
|
265
|
+
}
|
|
266
|
+
getYStores(x) {
|
|
267
|
+
const stores = {};
|
|
268
|
+
for (let i in this.stores) {
|
|
269
|
+
stores[i] = this.stores[i][x];
|
|
270
|
+
}
|
|
271
|
+
return stores;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
//# sourceMappingURL=selection.store.connector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection.store.connector.js","sourceRoot":"","sources":["../../src/services/selection.store.connector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAmBjE,MAAM,OAAO,uBAAuB;IAApC;QACW,WAAM,GAAqD,EAAE,CAAC;QAE9D,iBAAY,GAAqB,EAAE,CAAC;QACpC,cAAS,GAAoC,EAAE,CAAC;QAEzD;;WAEG;QACM,iBAAY,GAAgD,EAAE,CAAC;QAC/D,kBAAa,GAAiC,EAAE,CAAC;QACjD,kBAAa,GAAiC,EAAE,CAAC;IA6R5D,CAAC;IA3RC,IAAI,YAAY;;QACd,KAAK,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAC1B,KAAK,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC7B,MAAM,OAAO,GAAG,MAAA,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,0CAAE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;gBACtD,IAAI,OAAO,EAAE,CAAC;oBACZ,OAAO;wBACL,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;wBACzB,IAAI,EAAE,OAAO;wBACb,QAAQ,EAAE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C,EAAE,CAAC,EAAE,CAAC,EAAE,EACd,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC,GAAG,CAAC,EAAE,CACzC,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAEO,UAAU,CAAC,CAAS;QAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACxB,CAAC;IAEO,UAAU,CAAC,CAAS;QAC1B,MAAM,MAAM,GAAoC,EAAE,CAAC;QACnD,KAAK,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAC1B,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAChC,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF","sourcesContent":["import { cropCellToMax, nextCell, SelectionStore } from '@store';\nimport type {\n MultiDimensionType,\n DimensionCols,\n DimensionRows,\n Cell,\n EditCellStore,\n RangeArea,\n} from '@type';\n\ntype StoreByDimension = Record<number, SelectionStore>;\ntype FocusedStore = {\n entity: SelectionStore;\n cell: Cell;\n position: Cell;\n};\n\ntype StoresMapping<T> = { [xOrY: number]: Partial<T> };\n\nexport class SelectionStoreConnector {\n readonly stores: { [y: number]: { [x: number]: SelectionStore } } = {};\n\n readonly columnStores: StoreByDimension = {};\n readonly rowStores: { [y: number]: SelectionStore } = {};\n\n /**\n * Helpers for data conversion\n */\n readonly storesByType: Partial<Record<MultiDimensionType, number>> = {};\n readonly storesXToType: StoresMapping<DimensionCols> = {};\n readonly storesYToType: StoresMapping<DimensionRows> = {};\n\n get focusedStore(): FocusedStore | null {\n for (let y in this.stores) {\n for (let x in this.stores[y]) {\n const focused = this.stores[y][x]?.store.get('focus');\n if (focused) {\n return {\n entity: this.stores[y][x],\n cell: focused,\n position: {\n x: parseInt(x, 10),\n y: parseInt(y, 10),\n },\n };\n }\n }\n }\n return null;\n }\n\n get edit(): EditCellStore | null | undefined {\n return this.focusedStore?.entity.store.get('edit');\n }\n\n get focused(): Cell | null | undefined {\n return this.focusedStore?.entity.store.get('focus');\n }\n\n get selectedRange(): RangeArea | null | undefined {\n return this.focusedStore?.entity.store.get('range');\n }\n\n registerColumn(x: number, type: DimensionCols): SelectionStore {\n if (this.columnStores[x]) {\n return this.columnStores[x];\n }\n this.columnStores[x] = new SelectionStore();\n // build cross-linking type to position\n this.storesByType[type] = x;\n this.storesXToType[x] = type;\n return this.columnStores[x];\n }\n\n registerRow(y: number, type: DimensionRows): SelectionStore {\n if (this.rowStores[y]) {\n return this.rowStores[y];\n }\n this.rowStores[y] = new SelectionStore();\n // build cross linking type to position\n this.storesByType[type] = y;\n this.storesYToType[y] = type;\n return this.rowStores[y];\n }\n\n /**\n * Cross store proxy, based on multiple dimensions\n */\n register({ x, y }: Cell): SelectionStore {\n if (!this.stores[y]) {\n this.stores[y] = {};\n }\n let store = this.stores[y][x];\n if (store) {\n // Store already registered. Do not register twice\n return store;\n }\n this.stores[y][x] = store = new SelectionStore();\n // proxy update, column store trigger only range area\n store.onChange('range', c => {\n this.columnStores[x].setRangeArea(c);\n this.rowStores[y].setRangeArea(c);\n });\n // clean up on remove\n store.store.on('dispose', () => this.destroy(x, y));\n return store;\n }\n\n private destroy(x: number, y: number) {\n this.columnStores[x]?.dispose();\n this.rowStores[y]?.dispose();\n\n delete this.rowStores[y];\n delete this.columnStores[x];\n // clear x cross-link\n if (this.storesXToType[x]) {\n const type = this.storesXToType[x];\n delete this.storesXToType[x];\n delete this.storesByType[type];\n }\n // clear y cross-link\n if (this.storesYToType[y]) {\n const type = this.storesYToType[y];\n delete this.storesYToType[y];\n delete this.storesByType[type];\n }\n if (this.stores[y]) {\n delete this.stores[y][x];\n }\n // clear empty rows\n if (!Object.keys(this.stores[y] || {}).length) {\n delete this.stores[y];\n }\n }\n\n setEditByCell<T extends Cell>(storePos: T, editCell: T) {\n this.focusByCell(storePos, editCell, editCell);\n this.setEdit('');\n }\n\n /**\n * Sets the next focus cell before the current one.\n * \n * @param focus - The cell to set as the next focus.\n */\n beforeNextFocusCell(focus: Cell) {\n // If there is no focused store, return early.\n if (!this.focusedStore) {\n return;\n }\n\n // Get the next store based on the current focus and the last cell.\n const lastCell = this.focusedStore.entity.store.get('lastCell');\n const next = lastCell && this.getNextStore(focus, this.focusedStore.position, lastCell);\n\n // Set the next focus cell in the store.\n next?.store?.setNextFocus({ ...focus, ...next.item });\n }\n\n focusByCell<T extends Cell>(storePos: T, start: T, end: T) {\n const store = this.stores[storePos.y][storePos.x];\n this.focus(store, { focus: start, end });\n }\n\n focus(store: SelectionStore, { focus, end }: { focus: Cell; end: Cell }) {\n const currentStorePointer = this.getCurrentStorePointer(store);\n if (!currentStorePointer) {\n return null;\n }\n\n // check for the focus in nearby store/viewport\n const lastCell = store.store.get('lastCell');\n const next = lastCell && this.getNextStore(focus, currentStorePointer, lastCell);\n\n // if next store present - update\n if (next?.store) {\n const item = { ...focus, ...next.item };\n this.focus(next.store, { focus: item, end: item });\n return null;\n }\n\n if (lastCell) {\n focus = cropCellToMax(focus, lastCell);\n end = cropCellToMax(end, lastCell); \n }\n store.setFocus(focus, end);\n return focus;\n }\n\n /**\n * Retrieves the current store pointer based on the active store.\n * Clears focus from all stores except the active one.\n */\n getCurrentStorePointer(store: SelectionStore) {\n let currentStorePointer: Cell | undefined;\n\n // Iterate through all stores\n for (let y in this.stores) {\n for (let x in this.stores[y]) {\n const s = this.stores[y][x];\n\n // Clear focus from stores other than the active one\n if (s !== store) {\n s.clearFocus();\n } else {\n // Update the current store pointer with the active store coordinates\n currentStorePointer = { \n x: parseInt(x, 10), \n y: parseInt(y, 10) \n };\n }\n }\n }\n\n return currentStorePointer;\n }\n\n /**\n * Retrieves the next store based on the focus cell and current store pointer.\n * If the next store exists, returns an object with the next store and the item in the new store.\n * If the next store does not exist, returns null.\n */\n getNextStore(\n focus: Cell,\n currentStorePointer: Cell,\n lastCell: Cell,\n ) {\n // item in new store\n const nextItem: Partial<Cell> | null = nextCell(focus, lastCell);\n\n let nextStore: SelectionStore | undefined;\n if (nextItem) {\n Object.entries(nextItem).forEach(([type, nextItemCoord]: [keyof Cell, number]) => {\n let stores;\n switch (type) {\n case 'x':\n // Get the X stores for the current Y coordinate of the current store pointer\n stores = this.getXStores(currentStorePointer.y);\n break;\n case 'y':\n // Get the Y stores for the current X coordinate of the current store pointer\n stores = this.getYStores(currentStorePointer.x);\n break;\n }\n\n // Get the next store based on the item in the new store\n if (nextItemCoord >= 0) {\n nextStore = stores[++currentStorePointer[type]];\n } else {\n nextStore = stores[--currentStorePointer[type]];\n const nextLastCell = nextStore?.store.get('lastCell');\n if (nextLastCell) {\n nextItem[type] = nextLastCell[type] + nextItemCoord;\n }\n }\n });\n }\n // if last cell is empty store is empty, no next store\n const lastCellNext = nextStore?.store.get('lastCell');\n if (!lastCellNext?.x || !lastCellNext?.y) {\n nextStore = undefined;\n }\n return {\n store: nextStore,\n item: nextItem,\n };\n }\n\n clearAll() {\n for (let y in this.stores) {\n for (let x in this.stores[y]) {\n this.stores[y][x]?.clearFocus();\n }\n }\n }\n\n setEdit(val?: string | boolean) {\n if (!this.focusedStore) {\n return;\n }\n this.focusedStore.entity.setEdit(val);\n }\n\n /**\n * Select all cells across all stores\n */\n selectAll() {\n for (let y in this.stores) {\n for (let x in this.stores[y]) {\n const store = this.stores[y][x];\n if (!store) {\n continue;\n }\n const lastCell = store.store.get('lastCell');\n if (lastCell) {\n store.setRange(\n { x: 0, y: 0 },\n { x: lastCell.x - 1, y: lastCell.y - 1 },\n );\n }\n }\n }\n }\n\n private getXStores(y: number) {\n return this.stores[y];\n }\n\n private getYStores(x: number) {\n const stores: { [p: number]: SelectionStore } = {};\n for (let i in this.stores) {\n stores[i] = this.stores[i][x];\n }\n return stores;\n }\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built by Revolist OU ❤️
|
|
3
|
+
*/
|
|
4
|
+
import reduce from "lodash/reduce";
|
|
5
|
+
import { columnTypes, rowTypes, ViewportStore } from "../store/index";
|
|
6
|
+
export default class ViewportProvider {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.stores = reduce([...rowTypes, ...columnTypes], (sources, k) => {
|
|
9
|
+
sources[k] = new ViewportStore(k);
|
|
10
|
+
return sources;
|
|
11
|
+
}, {});
|
|
12
|
+
}
|
|
13
|
+
setViewport(type, data, options) {
|
|
14
|
+
this.stores[type].setViewport(data, options);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=viewport.provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewport.provider.js","sourceRoot":"","sources":["../../src/services/viewport.provider.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,eAAe,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAgC,aAAa,EAAE,MAAM,QAAQ,CAAC;AAI5F,MAAM,CAAC,OAAO,OAAO,gBAAgB;IAEnC;QACE,IAAI,CAAC,MAAM,GAAG,MAAM,CAClB,CAAC,GAAG,QAAQ,EAAE,GAAG,WAAW,CAAC,EAC7B,CAAC,OAAyC,EAAE,CAAqB,EAAE,EAAE;YACnE,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC;YAClC,OAAO,OAAO,CAAC;QACjB,CAAC,EACD,EAAE,CACwB,CAAC;IAC/B,CAAC;IAED,WAAW,CACT,IAAwB,EACxB,IAA4B,EAC5B,OAAqC;QAErC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;CACF","sourcesContent":["import reduce from 'lodash/reduce';\nimport { columnTypes, rowTypes, type ViewportStoreCollection, ViewportStore } from '@store';\nimport type { MultiDimensionType, ViewportState } from '@type';\n\n\nexport default class ViewportProvider {\n readonly stores: ViewportStoreCollection;\n constructor() {\n this.stores = reduce(\n [...rowTypes, ...columnTypes],\n (sources: Partial<ViewportStoreCollection>, k: MultiDimensionType) => {\n sources[k] = new ViewportStore(k);\n return sources;\n },\n {},\n ) as ViewportStoreCollection;\n }\n\n setViewport(\n type: MultiDimensionType,\n data: Partial<ViewportState>,\n options?: { preserveItems?: boolean },\n ) {\n this.stores[type].setViewport(data, options);\n }\n}\n"]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built by Revolist OU ❤️
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Todo:
|
|
6
|
+
* Refactor proxy plugin: when items changed outside proxy get recalculated
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Proxy plugin for data source.
|
|
10
|
+
*
|
|
11
|
+
* This plugin is used keep sortint in the data source, even when trimming is applied sorting has to be preserved.
|
|
12
|
+
*/
|
|
13
|
+
export const proxyPlugin = (store) => ({
|
|
14
|
+
/**
|
|
15
|
+
* Set the value of a property in the store.
|
|
16
|
+
* If the key is 'proxyItems' it will filter the items in the data source according to the new value.
|
|
17
|
+
* The new value should be an array of numbers representing the indexes of the items that should be visible.
|
|
18
|
+
* The method will return a new array of numbers with the indexes of the items that should be visible.
|
|
19
|
+
* The method will also update the 'items' property of the store with the new array.
|
|
20
|
+
*/
|
|
21
|
+
set(k, newVal) {
|
|
22
|
+
if (k !== 'proxyItems') {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Getting existing collection of items (trimmed and filtered)
|
|
27
|
+
* Mark indexes as visible
|
|
28
|
+
*/
|
|
29
|
+
const oldItems = store.get('items').reduce((r, v) => {
|
|
30
|
+
r.add(v);
|
|
31
|
+
return r;
|
|
32
|
+
}, new Set());
|
|
33
|
+
/**
|
|
34
|
+
* Check if new values where present in items, keep filtering and trimming
|
|
35
|
+
*/
|
|
36
|
+
const newItems = newVal.reduce((r, i) => {
|
|
37
|
+
if (oldItems.has(i)) {
|
|
38
|
+
r.push(i);
|
|
39
|
+
}
|
|
40
|
+
return r;
|
|
41
|
+
}, []);
|
|
42
|
+
store.set('items', newItems);
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=data.proxy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data.proxy.js","sourceRoot":"","sources":["../../../src/store/dataSource/data.proxy.ts"],"names":[],"mappings":"AAKA;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAwB,EAA0B,EAAE,CAAC,CAAC;IAChF;;;;;;OAMG;IACH,GAAG,CAAC,CAAC,EAAE,MAAM;QACX,IAAI,CAAC,KAAK,YAAY,EAAE,CAAC;YACvB,OAAO;QACT,CAAC;QACD;;;WAGG;QACH,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAS,EAAE,EAAE;YAC1D,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACT,OAAO,CAAC,CAAC;QACX,CAAC,EAAE,IAAI,GAAG,EAAU,CAAC,CAAC;QACtB;;WAEG;QACH,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAW,EAAE,CAAS,EAAE,EAAE;YACxD,IAAI,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;gBACpB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACZ,CAAC;YACD,OAAO,CAAC,CAAC;QACX,CAAC,EAAE,EAAE,CAAC,CAAC;QACP,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC/B,CAAC;CACF,CAAC,CAAC","sourcesContent":["import { DSourceState } from '@store';\nimport type { Observable, PluginSubscribe } from '../../utils';\n\ntype State = DSourceState<any, any>;\n\n/**\n * Todo:\n * Refactor proxy plugin: when items changed outside proxy get recalculated\n */\n\n/**\n * Proxy plugin for data source.\n * \n * This plugin is used keep sortint in the data source, even when trimming is applied sorting has to be preserved.\n */\nexport const proxyPlugin = (store: Observable<State>): PluginSubscribe<State> => ({\n /**\n * Set the value of a property in the store.\n * If the key is 'proxyItems' it will filter the items in the data source according to the new value.\n * The new value should be an array of numbers representing the indexes of the items that should be visible.\n * The method will return a new array of numbers with the indexes of the items that should be visible.\n * The method will also update the 'items' property of the store with the new array.\n */\n set(k, newVal) {\n if (k !== 'proxyItems') {\n return;\n }\n /**\n * Getting existing collection of items (trimmed and filtered)\n * Mark indexes as visible\n */\n const oldItems = store.get('items').reduce((r, v: number) => {\n r.add(v);\n return r;\n }, new Set<number>());\n /**\n * Check if new values where present in items, keep filtering and trimming\n */\n const newItems = newVal.reduce((r: number[], i: number) => {\n if (oldItems.has(i)) {\n r.push(i);\n }\n return r;\n }, []);\n store.set('items', newItems);\n },\n});\n"]}
|