@revolist/revogrid 4.0.11 → 4.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-globals-53fde1aa.js.map +1 -1
- package/dist/cjs/base.plugin-32f80cb5.js +219 -0
- package/dist/cjs/base.plugin-32f80cb5.js.map +1 -0
- package/dist/cjs/{column.service-e83d9809.js → column.service-52b4cac9.js} +28 -12
- package/dist/cjs/column.service-52b4cac9.js.map +1 -0
- package/dist/cjs/dimension.helpers-ee39d6c4.js.map +1 -1
- package/dist/cjs/events-b28cc194.js +52 -0
- package/dist/cjs/events-b28cc194.js.map +1 -0
- package/dist/cjs/filter.button-db6cbd2e.js.map +1 -1
- package/dist/cjs/{header-cell-renderer-8ba9b56d.js → header-cell-renderer-a3f202a1.js} +2 -2
- package/dist/cjs/{header-cell-renderer-8ba9b56d.js.map → header-cell-renderer-a3f202a1.js.map} +1 -1
- package/dist/cjs/{index-73c149e3.js → index-a9f1b728.js} +3 -4
- package/dist/cjs/index-a9f1b728.js.map +1 -0
- package/dist/cjs/index.cjs.js +26 -23
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/{key.utils-59b9b528.js → key.utils-ee3d9eab.js} +2 -2
- package/dist/cjs/{key.utils-59b9b528.js.map → key.utils-ee3d9eab.js.map} +1 -1
- package/dist/cjs/revo-grid.cjs.entry.js +74 -164
- package/dist/cjs/revo-grid.cjs.entry.js.map +1 -1
- package/dist/cjs/revogr-attribution_6.cjs.entry.js +193 -142
- package/dist/cjs/revogr-attribution_6.cjs.entry.js.map +1 -1
- package/dist/cjs/revogr-clipboard_3.cjs.entry.js +2 -2
- package/dist/cjs/revogr-clipboard_3.cjs.entry.js.map +1 -1
- package/dist/cjs/revogr-data_4.cjs.entry.js +9 -9
- package/dist/cjs/revogr-data_4.cjs.entry.js.map +1 -1
- package/dist/cjs/revogr-filter-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/{selection.store-2e110a67.js → selection.helpers-32abb2a9.js} +77 -75
- package/dist/cjs/selection.helpers-32abb2a9.js.map +1 -0
- package/dist/cjs/{throttle-f7aee21b.js → throttle-46478b04.js} +2 -2
- package/dist/cjs/{throttle-f7aee21b.js.map → throttle-46478b04.js.map} +1 -1
- package/dist/cjs/{viewport.helpers-6670177c.js → viewport.store-2ab4e166.js} +186 -1
- package/dist/cjs/viewport.store-2ab4e166.js.map +1 -0
- package/dist/collection/components/clipboard/revogr-clipboard.js +2 -2
- package/dist/collection/components/clipboard/revogr-clipboard.js.map +1 -1
- package/dist/collection/components/data/cell-renderer.js.map +1 -1
- package/dist/collection/components/data/column.service.js +2 -2
- package/dist/collection/components/data/column.service.js.map +1 -1
- package/dist/collection/components/data/revogr-data.js +46 -46
- package/dist/collection/components/data/revogr-data.js.map +1 -1
- package/dist/collection/components/data/row-highlight.plugin.js.map +1 -1
- package/dist/collection/components/editors/edit.utils.js.map +1 -1
- package/dist/collection/components/editors/revogr-edit.js +9 -9
- package/dist/collection/components/editors/revogr-edit.js.map +1 -1
- package/dist/collection/components/editors/text-editor.js.map +1 -1
- package/dist/collection/components/header/header-cell-renderer.js.map +1 -1
- package/dist/collection/components/header/header-renderer.js.map +1 -1
- package/dist/collection/components/header/revogr-header.js +28 -28
- package/dist/collection/components/header/revogr-header.js.map +1 -1
- package/dist/collection/components/order/order-renderer.js.map +1 -1
- package/dist/collection/components/order/order-row.service.js +1 -1
- package/dist/collection/components/order/order-row.service.js.map +1 -1
- package/dist/collection/components/order/revogr-order-editor.js +31 -28
- package/dist/collection/components/order/revogr-order-editor.js.map +1 -1
- package/dist/collection/components/overlay/autofill.service.js +37 -26
- package/dist/collection/components/overlay/autofill.service.js.map +1 -1
- package/dist/collection/components/overlay/keyboard.service.js +8 -8
- package/dist/collection/components/overlay/keyboard.service.js.map +1 -1
- package/dist/collection/components/overlay/revogr-overlay-selection.js +141 -93
- package/dist/collection/components/overlay/revogr-overlay-selection.js.map +1 -1
- package/dist/collection/components/overlay/selection.utils.js +37 -9
- package/dist/collection/components/overlay/selection.utils.js.map +1 -1
- package/dist/collection/components/revoGrid/grid.helpers.js.map +1 -1
- package/dist/collection/components/revoGrid/revo-grid-style.css +8 -3
- package/dist/collection/components/revoGrid/revo-grid.js +150 -135
- package/dist/collection/components/revoGrid/revo-grid.js.map +1 -1
- package/dist/collection/components/revoGrid/viewport.helpers.js +22 -8
- package/dist/collection/components/revoGrid/viewport.helpers.js.map +1 -1
- package/dist/collection/components/revoGrid/viewport.scrolling.service.js +4 -2
- package/dist/collection/components/revoGrid/viewport.scrolling.service.js.map +1 -1
- package/dist/collection/components/revoGrid/viewport.service.js +2 -2
- package/dist/collection/components/revoGrid/viewport.service.js.map +1 -1
- package/dist/collection/components/rowHeaders/revogr-row-headers.js +11 -12
- package/dist/collection/components/rowHeaders/revogr-row-headers.js.map +1 -1
- package/dist/collection/components/rowHeaders/row-header-render.js.map +1 -1
- package/dist/collection/components/scroll/revogr-viewport-scroll.js +17 -17
- package/dist/collection/components/scroll/revogr-viewport-scroll.js.map +1 -1
- package/dist/collection/components/scrollable/revogr-scroll-virtual.js +17 -17
- package/dist/collection/components/scrollable/revogr-scroll-virtual.js.map +1 -1
- package/dist/collection/components/selectionFocus/revogr-focus.js +44 -43
- package/dist/collection/components/selectionFocus/revogr-focus.js.map +1 -1
- package/dist/collection/components/selectionTempRange/revogr-temp-range.js +12 -12
- package/dist/collection/components/selectionTempRange/revogr-temp-range.js.map +1 -1
- package/dist/collection/components/vnode/vnode.utils.js.map +1 -1
- package/dist/collection/index.js +2 -12
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/plugins/column.auto-size.plugin.js +3 -4
- package/dist/collection/plugins/column.auto-size.plugin.js.map +1 -1
- package/dist/collection/plugins/export/export.plugin.js +1 -1
- package/dist/collection/plugins/export/export.plugin.js.map +1 -1
- package/dist/collection/plugins/export/types.js.map +1 -1
- package/dist/collection/plugins/filter/filter.button.js.map +1 -1
- package/dist/collection/plugins/filter/filter.plugin.js.map +1 -1
- package/dist/collection/plugins/filter/filter.pop.js +4 -4
- package/dist/collection/plugins/filter/filter.pop.js.map +1 -1
- package/dist/collection/plugins/groupingColumn/columnGroupsRenderer.js +1 -1
- package/dist/collection/plugins/groupingColumn/columnGroupsRenderer.js.map +1 -1
- package/dist/collection/plugins/groupingColumn/grouping.col.plugin.js.map +1 -1
- package/dist/collection/plugins/groupingColumn/headerGroupRenderer.js.map +1 -1
- package/dist/collection/plugins/groupingRow/grouping.row.expand.service.js.map +1 -1
- package/dist/collection/plugins/groupingRow/grouping.row.plugin.js +1 -2
- package/dist/collection/plugins/groupingRow/grouping.row.plugin.js.map +1 -1
- package/dist/collection/plugins/groupingRow/grouping.row.renderer.js.map +1 -1
- package/dist/collection/plugins/groupingRow/grouping.row.types.js.map +1 -1
- package/dist/collection/plugins/groupingRow/grouping.service.js.map +1 -1
- package/dist/collection/plugins/groupingRow/grouping.trimmed.service.js +1 -1
- package/dist/collection/plugins/groupingRow/grouping.trimmed.service.js.map +1 -1
- package/dist/collection/plugins/moveColumn/column.drag.plugin.js +1 -1
- package/dist/collection/plugins/moveColumn/column.drag.plugin.js.map +1 -1
- package/dist/collection/plugins/sorting/sorting.plugin.js +2 -2
- package/dist/collection/plugins/sorting/sorting.plugin.js.map +1 -1
- package/dist/collection/plugins/sorting/sorting.sign.js.map +1 -1
- package/dist/collection/serve/controller.js +86 -18
- package/dist/collection/services/column.data.provider.js +1 -2
- package/dist/collection/services/column.data.provider.js.map +1 -1
- package/dist/collection/services/data.provider.js +1 -2
- package/dist/collection/services/data.provider.js.map +1 -1
- package/dist/collection/services/dimension.provider.js +3 -5
- package/dist/collection/services/dimension.provider.js.map +1 -1
- package/dist/collection/services/selection.store.connector.js +1 -2
- package/dist/collection/services/selection.store.connector.js.map +1 -1
- package/dist/collection/services/viewport.provider.js +1 -2
- package/dist/collection/services/viewport.provider.js.map +1 -1
- package/dist/collection/store/dataSource/data.proxy.js.map +1 -1
- package/dist/collection/store/dataSource/data.store.js +1 -1
- package/dist/collection/store/dataSource/data.store.js.map +1 -1
- package/dist/collection/store/dataSource/trimmed.plugin.js.map +1 -1
- package/dist/collection/store/dimension/dimension.helpers.js.map +1 -1
- package/dist/collection/store/dimension/dimension.store.js +1 -1
- package/dist/collection/store/dimension/dimension.store.js.map +1 -1
- package/dist/collection/store/{storeTypes.js → index.js} +5 -1
- package/dist/collection/store/index.js.map +1 -0
- package/dist/collection/store/selection/index.js +0 -1
- package/dist/collection/store/selection/index.js.map +1 -1
- package/dist/collection/store/selection/selection.helpers.js.map +1 -1
- package/dist/collection/store/selection/selection.store.js +1 -1
- package/dist/collection/store/selection/selection.store.js.map +1 -1
- package/dist/collection/store/vp/index.js.map +1 -0
- package/dist/collection/store/vp/viewport.helpers.js.map +1 -0
- package/dist/collection/store/{viewport → vp}/viewport.store.js +4 -7
- package/dist/collection/store/vp/viewport.store.js.map +1 -0
- package/dist/collection/types/index.js +11 -0
- package/dist/collection/types/index.js.map +1 -0
- package/dist/collection/types/interfaces.js +4 -0
- package/dist/collection/types/interfaces.js.map +1 -1
- package/dist/collection/types/viewport.interfaces.js.map +1 -1
- package/dist/collection/utils/events.js +11 -1
- package/dist/collection/utils/events.js.map +1 -1
- package/dist/collection/utils/index.js +0 -1
- package/dist/collection/utils/index.js.map +1 -1
- package/dist/collection/utils/row-header-utils.js +2 -2
- package/dist/collection/utils/row-header-utils.js.map +1 -1
- package/dist/collection/utils/store.utils.js.map +1 -1
- package/dist/esm/app-globals-ef1fca59.js.map +1 -1
- package/dist/esm/base.plugin-d0e589d8.js +213 -0
- package/dist/esm/base.plugin-d0e589d8.js.map +1 -0
- package/dist/esm/{column.service-f4922a8d.js → column.service-a826bbd6.js} +27 -11
- package/dist/esm/column.service-a826bbd6.js.map +1 -0
- package/dist/esm/dimension.helpers-a3065cb1.js.map +1 -1
- package/dist/esm/events-77b43b40.js +48 -0
- package/dist/esm/events-77b43b40.js.map +1 -0
- package/dist/esm/filter.button-46ce4f80.js.map +1 -1
- package/dist/esm/{header-cell-renderer-ac962570.js → header-cell-renderer-19738045.js} +2 -2
- package/dist/esm/{header-cell-renderer-ac962570.js.map → header-cell-renderer-19738045.js.map} +1 -1
- package/dist/esm/{index-98fd0168.js → index-5a722722.js} +3 -4
- package/dist/esm/index-5a722722.js.map +1 -0
- package/dist/esm/index.js +4 -4
- package/dist/esm/{key.utils-2836e8ae.js → key.utils-7c5d91dd.js} +2 -2
- package/dist/esm/{key.utils-2836e8ae.js.map → key.utils-7c5d91dd.js.map} +1 -1
- package/dist/esm/revo-grid.entry.js +42 -132
- package/dist/esm/revo-grid.entry.js.map +1 -1
- package/dist/esm/revogr-attribution_6.entry.js +187 -136
- package/dist/esm/revogr-attribution_6.entry.js.map +1 -1
- package/dist/esm/revogr-clipboard_3.entry.js +2 -2
- package/dist/esm/revogr-clipboard_3.entry.js.map +1 -1
- package/dist/esm/revogr-data_4.entry.js +9 -9
- package/dist/esm/revogr-data_4.entry.js.map +1 -1
- package/dist/esm/revogr-filter-panel.entry.js.map +1 -1
- package/dist/esm/{selection.store-2577ddf9.js → selection.helpers-883ce6bc.js} +77 -75
- package/dist/esm/selection.helpers-883ce6bc.js.map +1 -0
- package/dist/esm/{throttle-cfd527d6.js → throttle-eeca0062.js} +2 -2
- package/dist/esm/{throttle-cfd527d6.js.map → throttle-eeca0062.js.map} +1 -1
- package/dist/esm/{viewport.helpers-6591d423.js → viewport.store-d9e291c5.js} +187 -3
- package/dist/esm/viewport.store-d9e291c5.js.map +1 -0
- package/dist/revo-grid/app-globals-ef1fca59.js.map +1 -1
- package/dist/revo-grid/base.plugin-d0e589d8.js +5 -0
- package/dist/revo-grid/base.plugin-d0e589d8.js.map +1 -0
- package/dist/revo-grid/column.service-a826bbd6.js +5 -0
- package/dist/revo-grid/column.service-a826bbd6.js.map +1 -0
- package/dist/revo-grid/dimension.helpers-a3065cb1.js.map +1 -1
- package/dist/revo-grid/events-77b43b40.js +5 -0
- package/dist/revo-grid/events-77b43b40.js.map +1 -0
- package/dist/revo-grid/filter.button-46ce4f80.js.map +1 -1
- package/dist/revo-grid/{header-cell-renderer-ac962570.js → header-cell-renderer-19738045.js} +2 -2
- package/dist/revo-grid/{header-cell-renderer-ac962570.js.map → header-cell-renderer-19738045.js.map} +1 -1
- package/dist/revo-grid/index-5a722722.js +5 -0
- package/dist/{esm/index-98fd0168.js.map → revo-grid/index-5a722722.js.map} +1 -1
- package/dist/revo-grid/index.esm.js +1 -1
- package/dist/revo-grid/{key.utils-2836e8ae.js → key.utils-7c5d91dd.js} +2 -2
- package/dist/revo-grid/key.utils-7c5d91dd.js.map +1 -0
- package/dist/revo-grid/revo-grid.entry.js +1 -1
- package/dist/revo-grid/revo-grid.entry.js.map +1 -1
- package/dist/revo-grid/revogr-attribution_6.entry.js +1 -1
- package/dist/revo-grid/revogr-attribution_6.entry.js.map +1 -1
- package/dist/revo-grid/revogr-clipboard_3.entry.js +1 -1
- package/dist/revo-grid/revogr-clipboard_3.entry.js.map +1 -1
- package/dist/revo-grid/revogr-data_4.entry.js +1 -1
- package/dist/revo-grid/revogr-data_4.entry.js.map +1 -1
- package/dist/revo-grid/revogr-filter-panel.entry.js.map +1 -1
- package/dist/revo-grid/selection.helpers-883ce6bc.js +5 -0
- package/dist/revo-grid/selection.helpers-883ce6bc.js.map +1 -0
- package/dist/revo-grid/{throttle-cfd527d6.js → throttle-eeca0062.js} +2 -2
- package/dist/revo-grid/viewport.store-d9e291c5.js +5 -0
- package/dist/revo-grid/viewport.store-d9e291c5.js.map +1 -0
- package/dist/types/components/clipboard/revogr-clipboard.d.ts +1 -1
- package/dist/types/components/data/cell-renderer.d.ts +1 -1
- package/dist/types/components/data/column.service.d.ts +5 -5
- package/dist/types/components/data/revogr-data.d.ts +4 -4
- package/dist/types/components/data/row-highlight.plugin.d.ts +1 -1
- package/dist/types/components/editors/edit.utils.d.ts +1 -1
- package/dist/types/components/editors/revogr-edit.d.ts +2 -2
- package/dist/types/components/editors/text-editor.d.ts +2 -2
- package/dist/types/components/header/header-cell-renderer.d.ts +1 -1
- package/dist/types/components/header/header-renderer.d.ts +2 -2
- package/dist/types/components/header/revogr-header.d.ts +4 -4
- package/dist/types/components/order/order-renderer.d.ts +2 -2
- package/dist/types/components/order/order-row.service.d.ts +1 -2
- package/dist/types/components/order/revogr-order-editor.d.ts +7 -4
- package/dist/types/components/overlay/autofill.service.d.ts +11 -10
- package/dist/types/components/overlay/keyboard.service.d.ts +4 -5
- package/dist/types/components/overlay/revogr-overlay-selection.d.ts +42 -19
- package/dist/types/components/overlay/selection.utils.d.ts +13 -6
- package/dist/types/components/revoGrid/grid.helpers.d.ts +1 -1
- package/dist/types/components/revoGrid/revo-grid.d.ts +10 -7
- package/dist/types/components/revoGrid/viewport.helpers.d.ts +14 -5
- package/dist/types/components/revoGrid/viewport.scrolling.service.d.ts +1 -3
- package/dist/types/components/revoGrid/viewport.service.d.ts +1 -4
- package/dist/types/components/rowHeaders/revogr-row-headers.d.ts +1 -2
- package/dist/types/components/rowHeaders/row-header-render.d.ts +1 -1
- package/dist/types/components/scroll/revogr-viewport-scroll.d.ts +2 -2
- package/dist/types/components/scrollable/revogr-scroll-virtual.d.ts +2 -2
- package/dist/types/components/selectionFocus/revogr-focus.d.ts +3 -5
- package/dist/types/components/selectionTempRange/revogr-temp-range.d.ts +2 -2
- package/dist/types/components/vnode/vnode.utils.d.ts +1 -1
- package/dist/types/components.d.ts +30 -16
- package/dist/types/index.d.ts +2 -12
- package/dist/types/plugins/export/export.plugin.d.ts +1 -1
- package/dist/types/plugins/export/types.d.ts +1 -1
- package/dist/types/plugins/filter/filter.button.d.ts +1 -1
- package/dist/types/plugins/filter/filter.plugin.d.ts +2 -2
- package/dist/types/plugins/filter/filter.pop.d.ts +1 -1
- package/dist/types/plugins/groupingColumn/columnGroupsRenderer.d.ts +3 -4
- package/dist/types/plugins/groupingColumn/grouping.col.plugin.d.ts +3 -3
- package/dist/types/plugins/groupingColumn/headerGroupRenderer.d.ts +2 -2
- package/dist/types/plugins/groupingRow/grouping.row.expand.service.d.ts +1 -1
- package/dist/types/plugins/groupingRow/grouping.row.plugin.d.ts +2 -2
- package/dist/types/plugins/groupingRow/grouping.row.renderer.d.ts +1 -1
- package/dist/types/plugins/groupingRow/grouping.row.types.d.ts +1 -1
- package/dist/types/plugins/groupingRow/grouping.service.d.ts +1 -1
- package/dist/types/plugins/groupingRow/grouping.trimmed.service.d.ts +1 -1
- package/dist/types/plugins/moveColumn/column.drag.plugin.d.ts +1 -3
- package/dist/types/plugins/sorting/sorting.plugin.d.ts +1 -3
- package/dist/types/plugins/sorting/sorting.sign.d.ts +1 -1
- package/dist/types/services/column.data.provider.d.ts +2 -3
- package/dist/types/services/data.provider.d.ts +2 -5
- package/dist/types/services/dimension.provider.d.ts +2 -4
- package/dist/types/services/selection.store.connector.d.ts +2 -3
- package/dist/types/services/viewport.provider.d.ts +3 -3
- package/dist/types/store/dataSource/data.proxy.d.ts +2 -2
- package/dist/types/store/dataSource/data.store.d.ts +3 -3
- package/dist/types/store/dataSource/trimmed.plugin.d.ts +1 -1
- package/dist/types/store/dimension/dimension.helpers.d.ts +1 -1
- package/dist/types/store/dimension/dimension.store.d.ts +4 -5
- package/dist/types/store/{storeTypes.d.ts → index.d.ts} +5 -1
- package/dist/types/store/selection/index.d.ts +0 -1
- package/dist/types/store/selection/selection.helpers.d.ts +1 -1
- package/dist/types/store/selection/selection.store.d.ts +2 -2
- package/dist/types/store/vp/index.d.ts +7 -0
- package/dist/types/store/{viewport → vp}/viewport.helpers.d.ts +1 -1
- package/dist/types/store/{viewport → vp}/viewport.store.d.ts +3 -7
- package/dist/types/types/index.d.ts +7 -0
- package/dist/types/types/interfaces.d.ts +444 -23
- package/dist/types/types/viewport.interfaces.d.ts +5 -8
- package/dist/types/utils/events.d.ts +4 -1
- package/dist/types/utils/index.d.ts +0 -1
- package/dist/types/utils/row-header-utils.d.ts +1 -1
- package/dist/types/utils/store.utils.d.ts +1 -1
- package/hydrate/index.js +3224 -3126
- package/package.json +7 -8
- package/standalone/_baseIteratee.js +1104 -13
- package/standalone/_baseIteratee.js.map +1 -1
- package/standalone/_nodeUtil.js +260 -0
- package/standalone/_nodeUtil.js.map +1 -0
- package/standalone/column.service.js +78 -74
- package/standalone/column.service.js.map +1 -1
- package/standalone/data.store.js +2 -4
- package/standalone/data.store.js.map +1 -1
- package/standalone/debounce.js +2 -2
- package/standalone/dimension.helpers.js +1 -1
- package/standalone/dimension.helpers.js.map +1 -1
- package/standalone/filter.button.js.map +1 -1
- package/standalone/identity.js +42 -2
- package/standalone/identity.js.map +1 -1
- package/standalone/index.js +5 -7
- package/standalone/index.js.map +1 -1
- package/standalone/index2.js +2 -3
- package/standalone/index2.js.map +1 -1
- package/standalone/isObjectLike.js +1 -34
- package/standalone/isObjectLike.js.map +1 -1
- package/standalone/revo-grid.js +125 -106
- package/standalone/revo-grid.js.map +1 -1
- package/standalone/revogr-clipboard2.js.map +1 -1
- package/standalone/revogr-data2.js +3 -0
- package/standalone/revogr-data2.js.map +1 -1
- package/standalone/revogr-edit2.js +1 -1
- package/standalone/revogr-edit2.js.map +1 -1
- package/standalone/revogr-filter-panel.js.map +1 -1
- package/standalone/revogr-focus2.js +7 -3
- package/standalone/revogr-focus2.js.map +1 -1
- package/standalone/revogr-header2.js +5 -4
- package/standalone/revogr-header2.js.map +1 -1
- package/standalone/revogr-order-editor2.js +3 -0
- package/standalone/revogr-order-editor2.js.map +1 -1
- package/standalone/revogr-overlay-selection2.js +143 -143
- package/standalone/revogr-overlay-selection2.js.map +1 -1
- package/standalone/revogr-row-headers2.js +7 -7
- package/standalone/revogr-row-headers2.js.map +1 -1
- package/standalone/revogr-scroll-virtual2.js +1 -1
- package/standalone/revogr-scroll-virtual2.js.map +1 -1
- package/standalone/revogr-temp-range2.js +1 -1
- package/standalone/revogr-temp-range2.js.map +1 -1
- package/standalone/revogr-viewport-scroll2.js +23 -9
- package/standalone/revogr-viewport-scroll2.js.map +1 -1
- package/standalone/selection.utils.js +76 -9
- package/standalone/selection.utils.js.map +1 -1
- package/standalone/throttle.js +1 -1
- package/standalone/toNumber.js +35 -2
- package/standalone/toNumber.js.map +1 -1
- package/dist/cjs/column.service-e83d9809.js.map +0 -1
- package/dist/cjs/events-7ccd6894.js +0 -233
- package/dist/cjs/events-7ccd6894.js.map +0 -1
- package/dist/cjs/index-73c149e3.js.map +0 -1
- package/dist/cjs/selection.store-2e110a67.js.map +0 -1
- package/dist/cjs/storeTypes-b3f924b2.js +0 -106
- package/dist/cjs/storeTypes-b3f924b2.js.map +0 -1
- package/dist/cjs/viewport.helpers-6670177c.js.map +0 -1
- package/dist/collection/store/selection/selection.store.service.js +0 -39
- package/dist/collection/store/selection/selection.store.service.js.map +0 -1
- package/dist/collection/store/storeTypes.js.map +0 -1
- package/dist/collection/store/viewport/index.js.map +0 -1
- package/dist/collection/store/viewport/viewport.helpers.js.map +0 -1
- package/dist/collection/store/viewport/viewport.store.js.map +0 -1
- package/dist/esm/column.service-f4922a8d.js.map +0 -1
- package/dist/esm/events-3dd8ee7c.js +0 -228
- package/dist/esm/events-3dd8ee7c.js.map +0 -1
- package/dist/esm/selection.store-2577ddf9.js.map +0 -1
- package/dist/esm/storeTypes-f2647985.js +0 -101
- package/dist/esm/storeTypes-f2647985.js.map +0 -1
- package/dist/esm/viewport.helpers-6591d423.js.map +0 -1
- package/dist/revo-grid/column.service-f4922a8d.js +0 -5
- package/dist/revo-grid/column.service-f4922a8d.js.map +0 -1
- package/dist/revo-grid/events-3dd8ee7c.js +0 -5
- package/dist/revo-grid/events-3dd8ee7c.js.map +0 -1
- package/dist/revo-grid/index-98fd0168.js +0 -5
- package/dist/revo-grid/index-98fd0168.js.map +0 -1
- package/dist/revo-grid/key.utils-2836e8ae.js.map +0 -1
- package/dist/revo-grid/selection.store-2577ddf9.js +0 -5
- package/dist/revo-grid/selection.store-2577ddf9.js.map +0 -1
- package/dist/revo-grid/storeTypes-f2647985.js +0 -5
- package/dist/revo-grid/storeTypes-f2647985.js.map +0 -1
- package/dist/revo-grid/viewport.helpers-6591d423.js +0 -5
- package/dist/revo-grid/viewport.helpers-6591d423.js.map +0 -1
- package/dist/types/store/selection/selection.store.service.d.ts +0 -17
- package/dist/types/store/viewport/index.d.ts +0 -2
- package/standalone/_stringToPath.js +0 -1389
- package/standalone/_stringToPath.js.map +0 -1
- /package/dist/collection/store/{viewport → vp}/index.js +0 -0
- /package/dist/collection/store/{viewport → vp}/viewport.helpers.js +0 -0
- /package/dist/revo-grid/{throttle-cfd527d6.js.map → throttle-eeca0062.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header-renderer.js","sourceRoot":"","sources":["../../../src/components/header/header-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAS,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAEjE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC9G,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAgB5D,MAAM,cAAc,GAAG,CAAC,CAAQ,EAAS,EAAE;;IACzC,MAAM,SAAS,GAA+B;QAC5C,CAAC,YAAY,CAAC,EAAE,IAAI;QACpB,CAAC,qBAAqB,CAAC,EAAE,CAAC,CAAC,CAAA,MAAA,CAAC,CAAC,IAAI,0CAAE,QAAQ,CAAA;KAC5C,CAAC;IACF,IAAI,MAAA,CAAC,CAAC,IAAI,0CAAE,KAAK,EAAE,CAAC;QAClB,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IACjC,CAAC;IACD,MAAM,SAAS,GAAqC;QAClD,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,SAAS;QAC9B,SAAS,EAAE,CAAC,CAAC,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AAC;IACD,OAAO,CACL,EAAC,kBAAkB,IAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC,CAAC,cAAc;QACjF,CAAA,MAAA,CAAC,CAAC,IAAI,0CAAE,KAAK,EAAC,CAAC,CAAC,EAAC,WAAW,IAAC,MAAM,EAAE,CAAC,CAAC,IAAI,GAAI,CAAC,CAAC,CAAC,EAAE;QACpD,CAAC,CAAC,SAAS,IAAI,CAAA,MAAA,CAAC,CAAC,IAAI,0CAAE,MAAM,MAAK,KAAK,CAAC,CAAC,CAAC,EAAC,YAAY,IAAC,MAAM,EAAE,CAAC,CAAC,IAAI,GAAI,CAAC,CAAC,CAAC,EAAE,CAC7D,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { h, VNode } from '@stencil/core';\nimport { FilterButton } from '../../plugins/filter/filter.button';\nimport { SortingSign } from '../../plugins/sorting/sorting.sign';\nimport { ResizeEvent, ResizeProps } from '../../services/resizable.directive';\nimport { DATA_COL, FOCUS_CLASS, HEADER_CLASS, HEADER_SORTABLE_CLASS, MIN_COL_SIZE } from '../../utils/consts';\nimport { HeaderCellRenderer } from './header-cell-renderer';\nimport { VirtualPositionItem, ColumnTemplateProp, InitialHeaderClick, CellProps } from '
|
|
1
|
+
{"version":3,"file":"header-renderer.js","sourceRoot":"","sources":["../../../src/components/header/header-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAS,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAEjE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC9G,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAgB5D,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,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,aAAa,EAAE,CAAC,CAAC;QAC1E,CAAC;KACF,CAAC;IACF,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC;QACZ,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,IAAI,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC;YACxE,IAAI,OAAO,SAAS,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;gBACxC,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;YACtC,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,CACL,EAAC,kBAAkB,IAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC,CAAC,cAAc;QACjF,CAAA,MAAA,CAAC,CAAC,IAAI,0CAAE,KAAK,EAAC,CAAC,CAAC,EAAC,WAAW,IAAC,MAAM,EAAE,CAAC,CAAC,IAAI,GAAI,CAAC,CAAC,CAAC,EAAE;QACpD,CAAC,CAAC,SAAS,IAAI,CAAA,MAAA,CAAC,CAAC,IAAI,0CAAE,MAAM,MAAK,KAAK,CAAC,CAAC,CAAC,EAAC,YAAY,IAAC,MAAM,EAAE,CAAC,CAAC,IAAI,GAAI,CAAC,CAAC,CAAC,EAAE,CAC7D,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { h, VNode } from '@stencil/core';\nimport { FilterButton } from '../../plugins/filter/filter.button';\nimport { SortingSign } from '../../plugins/sorting/sorting.sign';\nimport { ResizeEvent, ResizeProps } from '../../services/resizable.directive';\nimport { DATA_COL, FOCUS_CLASS, HEADER_CLASS, HEADER_SORTABLE_CLASS, MIN_COL_SIZE } from '../../utils/consts';\nimport { HeaderCellRenderer } from './header-cell-renderer';\nimport { VirtualPositionItem, ColumnTemplateProp, InitialHeaderClick, CellProps } from '@type';\nimport { RangeArea } from '@type';\n\ntype Props = {\n column: VirtualPositionItem;\n additionalData: any;\n data?: ColumnTemplateProp;\n range?: RangeArea;\n canResize?: boolean;\n canFilter?: boolean;\n onResize?(e: ResizeEvent): void;\n onClick?(data: InitialHeaderClick): void;\n onDoubleClick?(data: InitialHeaderClick): void;\n} & Partial<Pick<ResizeProps, 'active'>>;\n\nconst HeaderRenderer = (p: Props): VNode => {\n const cellClass: { [key: string]: boolean } = {\n [HEADER_CLASS]: true,\n [HEADER_SORTABLE_CLASS]: !!p.data?.sortable,\n };\n if (p.data?.order) {\n cellClass[p.data.order] = true;\n }\n const dataProps: CellProps & Partial<ResizeProps> = {\n [DATA_COL]: p.column.itemIndex,\n canResize: p.canResize,\n minWidth: p.data?.minSize || MIN_COL_SIZE,\n maxWidth: p.data?.maxSize,\n active: p.active || ['r'],\n class: cellClass,\n style: { width: `${p.column.size}px`, transform: `translateX(${p.column.start}px)` },\n onResize: p.onResize,\n onDoubleClick(originalEvent: MouseEvent) {\n p.onDoubleClick({ column: p.data, index: p.column.itemIndex, originalEvent });\n },\n onClick(originalEvent: MouseEvent) {\n if (originalEvent.defaultPrevented || !p.onClick) {\n return;\n }\n p.onClick({ column: p.data, index: p.column.itemIndex, originalEvent });\n },\n };\n if (p.range) {\n if (p.column.itemIndex >= p.range.x && p.column.itemIndex <= p.range.x1) {\n if (typeof dataProps.class === 'object') {\n dataProps.class[FOCUS_CLASS] = true;\n }\n }\n }\n return (\n <HeaderCellRenderer data={p.data} props={dataProps} additionalData={p.additionalData}>\n {p.data?.order ? <SortingSign column={p.data} /> : ''}\n {p.canFilter && p.data?.filter !== false ? <FilterButton column={p.data} /> : ''}\n </HeaderCellRenderer>\n );\n};\n\nexport default HeaderRenderer;\n"]}
|
|
@@ -56,8 +56,8 @@ export class RevogrHeaderComponent {
|
|
|
56
56
|
visibleProps[colData === null || colData === void 0 ? void 0 : colData.prop] = rgCol.itemIndex;
|
|
57
57
|
}
|
|
58
58
|
return [
|
|
59
|
-
h("div", { key: '
|
|
60
|
-
h("div", { key: '
|
|
59
|
+
h("div", { key: '346967e82d0d9d9f7f0310f7e5827a34c0ac4e5e', class: "group-rgRow" }, h(ColumnGroupsRenderer, { key: '82a8d6ad81f6432d26a680680a8b077fea6ba3cc', canResize: this.canResize, active: this.resizeHandler, visibleProps: visibleProps, providers: this.providers, groups: this.groups, dimensionCol: this.dimensionCol.state, depth: this.groupingDepth, onResize: (changedX, startIndex, endIndex) => this.onResizeGroup(changedX, startIndex, endIndex), additionalData: this.additionalData })),
|
|
60
|
+
h("div", { key: '513119463e5e51caaa79a738f856bc3c1540564f', class: `${HEADER_ROW_CLASS} ${HEADER_ACTUAL_ROW_CLASS}` }, cells),
|
|
61
61
|
];
|
|
62
62
|
}
|
|
63
63
|
get providers() {
|
|
@@ -92,13 +92,13 @@ export class RevogrHeaderComponent {
|
|
|
92
92
|
"references": {
|
|
93
93
|
"Observable": {
|
|
94
94
|
"location": "import",
|
|
95
|
-
"path": "
|
|
96
|
-
"id": "src/types/
|
|
95
|
+
"path": "@type",
|
|
96
|
+
"id": "src/types/index.ts::Observable"
|
|
97
97
|
},
|
|
98
98
|
"ViewportState": {
|
|
99
99
|
"location": "import",
|
|
100
|
-
"path": "
|
|
101
|
-
"id": "src/types/
|
|
100
|
+
"path": "@type",
|
|
101
|
+
"id": "src/types/index.ts::ViewportState"
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
},
|
|
@@ -118,13 +118,13 @@ export class RevogrHeaderComponent {
|
|
|
118
118
|
"references": {
|
|
119
119
|
"Observable": {
|
|
120
120
|
"location": "import",
|
|
121
|
-
"path": "
|
|
122
|
-
"id": "src/types/
|
|
121
|
+
"path": "@type",
|
|
122
|
+
"id": "src/types/index.ts::Observable"
|
|
123
123
|
},
|
|
124
124
|
"DimensionSettingsState": {
|
|
125
125
|
"location": "import",
|
|
126
|
-
"path": "
|
|
127
|
-
"id": "src/types/
|
|
126
|
+
"path": "@type",
|
|
127
|
+
"id": "src/types/index.ts::DimensionSettingsState"
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
},
|
|
@@ -144,13 +144,13 @@ export class RevogrHeaderComponent {
|
|
|
144
144
|
"references": {
|
|
145
145
|
"Observable": {
|
|
146
146
|
"location": "import",
|
|
147
|
-
"path": "
|
|
148
|
-
"id": "src/types/
|
|
147
|
+
"path": "@type",
|
|
148
|
+
"id": "src/types/index.ts::Observable"
|
|
149
149
|
},
|
|
150
150
|
"SelectionStoreState": {
|
|
151
151
|
"location": "import",
|
|
152
|
-
"path": "
|
|
153
|
-
"id": "src/types/
|
|
152
|
+
"path": "@type",
|
|
153
|
+
"id": "src/types/index.ts::SelectionStoreState"
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
},
|
|
@@ -170,8 +170,8 @@ export class RevogrHeaderComponent {
|
|
|
170
170
|
"references": {
|
|
171
171
|
"Groups": {
|
|
172
172
|
"location": "import",
|
|
173
|
-
"path": "
|
|
174
|
-
"id": "src/store/
|
|
173
|
+
"path": "@store",
|
|
174
|
+
"id": "src/store/index.ts::Groups"
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
},
|
|
@@ -264,8 +264,8 @@ export class RevogrHeaderComponent {
|
|
|
264
264
|
"references": {
|
|
265
265
|
"ColumnRegular": {
|
|
266
266
|
"location": "import",
|
|
267
|
-
"path": "
|
|
268
|
-
"id": "src/types/
|
|
267
|
+
"path": "@type",
|
|
268
|
+
"id": "src/types/index.ts::ColumnRegular"
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
},
|
|
@@ -302,8 +302,8 @@ export class RevogrHeaderComponent {
|
|
|
302
302
|
"references": {
|
|
303
303
|
"DimensionCols": {
|
|
304
304
|
"location": "import",
|
|
305
|
-
"path": "
|
|
306
|
-
"id": "src/types/
|
|
305
|
+
"path": "@type",
|
|
306
|
+
"id": "src/types/index.ts::DimensionCols"
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
309
|
},
|
|
@@ -353,8 +353,8 @@ export class RevogrHeaderComponent {
|
|
|
353
353
|
"references": {
|
|
354
354
|
"InitialHeaderClick": {
|
|
355
355
|
"location": "import",
|
|
356
|
-
"path": "
|
|
357
|
-
"id": "src/types/
|
|
356
|
+
"path": "@type",
|
|
357
|
+
"id": "src/types/index.ts::InitialHeaderClick"
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
360
|
}
|
|
@@ -374,8 +374,8 @@ export class RevogrHeaderComponent {
|
|
|
374
374
|
"references": {
|
|
375
375
|
"ViewSettingSizeProp": {
|
|
376
376
|
"location": "import",
|
|
377
|
-
"path": "
|
|
378
|
-
"id": "src/types/
|
|
377
|
+
"path": "@type",
|
|
378
|
+
"id": "src/types/index.ts::ViewSettingSizeProp"
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
381
|
}
|
|
@@ -395,8 +395,8 @@ export class RevogrHeaderComponent {
|
|
|
395
395
|
"references": {
|
|
396
396
|
"ColumnRegular": {
|
|
397
397
|
"location": "import",
|
|
398
|
-
"path": "
|
|
399
|
-
"id": "src/types/
|
|
398
|
+
"path": "@type",
|
|
399
|
+
"id": "src/types/index.ts::ColumnRegular"
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
402
|
}
|
|
@@ -416,8 +416,8 @@ export class RevogrHeaderComponent {
|
|
|
416
416
|
"references": {
|
|
417
417
|
"InitialHeaderClick": {
|
|
418
418
|
"location": "import",
|
|
419
|
-
"path": "
|
|
420
|
-
"id": "src/types/
|
|
419
|
+
"path": "@type",
|
|
420
|
+
"id": "src/types/index.ts::InitialHeaderClick"
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
423
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revogr-header.js","sourceRoot":"","sources":["../../../src/components/header/revogr-header.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Prop,\n} from '@stencil/core';\nimport { HTMLStencilElement, VNode } from '@stencil/core/internal';\nimport keyBy from 'lodash/keyBy';\n\nimport { HEADER_ACTUAL_ROW_CLASS, HEADER_ROW_CLASS } from '../../utils/consts';\nimport { Groups } from '
|
|
1
|
+
{"version":3,"file":"revogr-header.js","sourceRoot":"","sources":["../../../src/components/header/revogr-header.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,GACL,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,MAAM,cAAc,CAAC;AAEjC,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE/E,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,oBAAoB,MAAM,mDAAmD,CAAC;AAkBrF,MAAM,OAAO,qBAAqB;;;;;;6BAmBR,CAAC;;;;;;;8BAiCK,EAAE;;IAsCxB,QAAQ,CAAC,EAAE,KAAK,EAAsB,EAAE,KAAa;QAC3D,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAChC,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC;4CAE9B,GAAG,KACN,IAAI,EAAE,KAAK,IAAI,SAAS;SAE3B,CAAC,CAAC;QACH,IAAI,KAAK,CAAC,gBAAgB,EAAE,CAAC;YAC3B,OAAO;QACT,CAAC;QACD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC,CAAC;IAClD,CAAC;IAEO,aAA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AAC,QAAQ;YACvB,IAAI,EAAE,IAAI,CAAC,OAAO;YAClB,QAAQ,EAAE,IAAI,CAAC,WAAW;YAC1B,SAAS,EAAE,IAAI,CAAC,YAAY;YAC5B,SAAS,EAAE,IAAI,CAAC,cAAc;SAC/B,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Prop,\n} from '@stencil/core';\nimport { HTMLStencilElement, VNode } from '@stencil/core/internal';\nimport keyBy from 'lodash/keyBy';\n\nimport { HEADER_ACTUAL_ROW_CLASS, HEADER_ROW_CLASS } from '../../utils/consts';\nimport { Groups } from '@store';\nimport HeaderRenderer from './header-renderer';\nimport ColumnGroupsRenderer from '../../plugins/groupingColumn/columnGroupsRenderer';\nimport { ResizeProps } from '../../services/resizable.directive';\nimport {\n ColumnRegular,\n DimensionSettingsState,\n InitialHeaderClick,\n Observable,\n Providers,\n ViewportState,\n ViewSettingSizeProp,\n} from '@type';\nimport { DimensionCols } from '@type';\nimport { SelectionStoreState } from '@type';\n\n@Component({\n tag: 'revogr-header',\n styleUrl: 'revogr-header-style.scss',\n})\nexport class RevogrHeaderComponent {\n // #region Properties\n /**\n * Stores\n */\n /** Viewport X */\n @Prop() viewportCol: Observable<ViewportState>;\n /** Dimension settings X */\n @Prop() dimensionCol: Observable<DimensionSettingsState>;\n /** Selection, range, focus */\n @Prop() selectionStore: Observable<SelectionStoreState>;\n\n /**\n * Column groups\n */\n @Prop() groups: Groups;\n /**\n * Grouping depth, how many levels of grouping\n */\n @Prop() groupingDepth = 0;\n\n /**\n * Readonly mode\n */\n @Prop() readonly: boolean;\n /**\n * If columns can be resized\n */\n @Prop() canResize: boolean;\n /**\n * Defines resize position\n */\n @Prop() resizeHandler: ResizeProps['active'];\n\n /**\n * Columns - defines an array of grid columns.\n */\n @Prop() colData: ColumnRegular[];\n\n /**\n * Column filter\n */\n @Prop() columnFilter: boolean;\n\n /**\n * Column type\n */\n @Prop() type!: DimensionCols | 'rowHeaders';\n\n /**\n * Extra properties to pass into header renderer, such as vue or react components to handle parent\n */\n @Prop() additionalData: any = {};\n // #endregion\n\n // #region Events\n\n /**\n * On initial header click\n */\n @Event({\n eventName: 'beforeheaderclick',\n })\n initialHeaderClick: EventEmitter<InitialHeaderClick>;\n\n /**\n * On header resize\n */\n @Event({\n eventName: 'headerresize',\n })\n headerresize: EventEmitter<ViewSettingSizeProp>;\n\n /**\n * On before header resize\n */\n @Event({ eventName: 'beforeheaderresize', cancelable: true })\n beforeResize: EventEmitter<ColumnRegular[]>;\n\n /**\n * On header double click\n */\n @Event({\n eventName: 'headerdblclick',\n })\n headerdblClick: EventEmitter<InitialHeaderClick>;\n // #endregion\n\n @Element() element!: HTMLStencilElement;\n\n private onResize({ width }: { width?: number }, index: number) {\n const col = this.colData[index];\n const event = this.beforeResize.emit([\n {\n ...col,\n size: width || undefined,\n },\n ]);\n if (event.defaultPrevented) {\n return;\n }\n this.headerresize.emit({ [index]: width || 0 });\n }\n\n private onResizeGroup(\n changedX: number,\n startIndex: number,\n endIndex: number,\n ) {\n const sizes: ViewSettingSizeProp = {};\n const cols = keyBy(this.viewportCol.get('items'), 'itemIndex');\n const change = changedX / (endIndex - startIndex + 1);\n for (let i = startIndex; i <= endIndex; i++) {\n const item = cols[i];\n if (item) {\n sizes[i] = item.size + change;\n }\n }\n this.headerresize.emit(sizes);\n }\n\n render() {\n const cols = this.viewportCol.get('items');\n const range = this.selectionStore?.get('range');\n const cells: VNode[] = [];\n const visibleProps: { [prop: string]: number } = {};\n\n // render header columns\n for (let rgCol of cols) {\n const colData = this.colData[rgCol.itemIndex];\n cells.push(\n <HeaderRenderer\n range={range}\n column={rgCol}\n data={{\n ...colData,\n index: rgCol.itemIndex,\n providers: this.providers,\n }}\n canFilter={!!this.columnFilter}\n canResize={this.canResize}\n active={this.resizeHandler}\n onResize={e => this.onResize(e, rgCol.itemIndex)}\n onDoubleClick={e => this.headerdblClick.emit(e)}\n onClick={e => this.initialHeaderClick.emit(e)}\n additionalData={this.additionalData}\n />,\n );\n visibleProps[colData?.prop] = rgCol.itemIndex;\n }\n\n return [\n <div class=\"group-rgRow\">\n <ColumnGroupsRenderer\n canResize={this.canResize}\n active={this.resizeHandler}\n visibleProps={visibleProps}\n providers={this.providers}\n groups={this.groups}\n dimensionCol={this.dimensionCol.state}\n depth={this.groupingDepth}\n onResize={(changedX, startIndex, endIndex) =>\n this.onResizeGroup(changedX, startIndex, endIndex)\n }\n additionalData={this.additionalData}\n />\n </div>,\n <div class={`${HEADER_ROW_CLASS} ${HEADER_ACTUAL_ROW_CLASS}`}>\n {cells}\n </div>,\n ];\n }\n\n get providers(): Providers<DimensionCols | 'rowHeaders'> {\n return {\n type: this.type,\n readonly: this.readonly,\n data: this.colData,\n viewport: this.viewportCol,\n dimension: this.dimensionCol,\n selection: this.selectionStore,\n };\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-renderer.js","sourceRoot":"","sources":["../../../src/components/order/order-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAS,MAAM,eAAe,CAAC;AAMzC;;GAEG;AACH,MAAM,OAAO,cAAc;IAA3B;QACU,YAAO,GAAG,CAAC,CAAC;IAoCtB,CAAC;IA9BC,KAAK,CAAC,MAAmB,EAAE,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AM,aAAa,GAAG,CAAC,EAAE,GAAG,EAAS,EAAW,EAAE;IAChD,MAAM,OAAO,GAAG,IAAI,cAAc,EAAE,CAAC;IACrC,GAAG,CAAC,OAAO,CAAC,CAAC;IACb,OAAO,CACL,WAAK,KAAK,EAAC,0BAA0B,EAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC;QAC9D,WAAK,KAAK,EAAC,WAAW,EAAC,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,GAAG,EAAE,CAAC;YACxD,YAAM,KAAK,EAAC,eAAe,GAAG;YAC9B,YAAM,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,CAAC,GAAI,CAClC;QACN,WAAK,KAAK,EAAC,eAAe,EAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,GAAI,CACxD,CACP,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,aAAa,CAAC","sourcesContent":["import { h, VNode } from '@stencil/core';\nimport { PositionItem } from '
|
|
1
|
+
{"version":3,"file":"order-renderer.js","sourceRoot":"","sources":["../../../src/components/order/order-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAS,MAAM,eAAe,CAAC;AAMzC;;GAEG;AACH,MAAM,OAAO,cAAc;IAA3B;QACU,YAAO,GAAG,CAAC,CAAC;IAoCtB,CAAC;IA9BC,KAAK,CAAC,MAAmB,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAA0D;;QACrG,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC,qBAAqB,EAAE,CAAC;QAC/C,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC;QACnB,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,IAAI,CAAC,IAAI,CAAC,SAAS,GA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C,EAAE,GAAG,CAAC,CAAC;QAC9D,WAAK,KAAK,EAAC,WAAW,EAAC,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,GAAG,EAAE,CAAC;YACxD,YAAM,KAAK,EAAC,eAAe,GAAG;YAC9B,YAAM,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,CAAC,GAAI,CAClC;QACN,WAAK,KAAK,EAAC,eAAe,EAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,GAAI,CACxD,CACP,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,aAAa,CAAC","sourcesContent":["import { h, VNode } from '@stencil/core';\nimport { PositionItem } from '@type';\nimport { Cell } from '@type';\n\ntype Props = { ref: { (e: OrdererService): void } };\n\n/**\n * Draw drag\n */\nexport class OrdererService {\n private parentY = 0;\n el!: HTMLElement;\n rgRow!: HTMLElement;\n text!: HTMLElement;\n draggable!: HTMLElement;\n\n start(parent: HTMLElement, { pos, text, event }: { pos: PositionItem; text: string; event: MouseEvent }) {\n const { top } = parent.getBoundingClientRect();\n this.parentY = top;\n if (this.text) {\n this.text.innerText = text;\n }\n this.move(pos);\n this.moveTip({ x: event.x, y: event.y });\n this.el?.classList.remove('hidden');\n }\n end() {\n this.el?.classList.add('hidden');\n }\n move(pos: PositionItem) {\n this.moveElement(pos.end - this.parentY);\n }\n moveTip({ x, y }: Cell) {\n if (!this.draggable) {\n return;\n }\n this.draggable.style.left = `${x}px`;\n this.draggable.style.top = `${y}px`;\n }\n\n private moveElement(y: number) {\n if (!this.rgRow) {\n return;\n }\n this.rgRow.style.transform = `translateY(${y}px)`;\n }\n}\n\nconst OrderRenderer = ({ ref }: Props): VNode[] => {\n const service = new OrdererService();\n ref(service);\n return (\n <div class=\"draggable-wrapper hidden\" ref={e => (service.el = e)}>\n <div class=\"draggable\" ref={el => (service.draggable = el)}>\n <span class=\"revo-alt-icon\" />\n <span ref={e => (service.text = e)} />\n </div>\n <div class=\"drag-position\" ref={e => (service.rgRow = e)} />\n </div>\n );\n};\nexport default OrderRenderer;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-row.service.js","sourceRoot":"","sources":["../../../src/components/order/order-row.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"order-row.service.js","sourceRoot":"","sources":["../../../src/components/order/order-row.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAQ3C,MAAM,CAAC,OAAO,OAAO,eAAe;IAIlC,YAAoB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QAH1B,gBAAW,GAAgB,IAAI,CAAC;QAChC,gBAAW,GAAkB,IAAI,CAAC;IAEL,CAAC;IAEtC,iDAAiD;IACjD,QAAQ,CAAC,CAAa,EAAE,IAAe;QACrC,IAAI,IAAI,CAAC,WAAW,KAAK,IAAI,EAAE,CAAC;YAC9B,OAAO;QACT,CAAC;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;QAErC,sBAAsB;QACtB,IAAI,MAAM,CAAC,CAAC,KAAK,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC;YACpC,0BAA0B;YAC1B,IAAI,MAAM,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;gBACjB,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;YACf,CAAC;YACD,2BAA2B;iBACtB,IAAI,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC;gBACvC,MAAM,CAAC,CAAC,EAAE,CAAC;YACb,CAAC;YACD,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,MAA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AA4C;IAC5C,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,EAAQ,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAa;QACnD,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,qBAAqB,EAAE,CAAC;QACjD,MAAM,WAAW,GAAG,CAAC,GAAG,GAAG,CAAC;QAC5B,MAAM,YAAY,GAAG,CAAC,GAAG,IAAI,CAAC;QAC9B,MAAM,KAAK,GAAG,iBAAiB,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACnD,MAAM,KAAK,GAAG,iBAAiB,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;QACpD,OAAO,EAAE,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;IACpD,CAAC;CACF","sourcesContent":["import { getItemByPosition } from '@store';\nimport { DimensionSettingsState, PositionItem, Cell } from '@type';\n\ntype EventData = { el: HTMLElement; rows: DimensionSettingsState; cols: DimensionSettingsState };\ninterface Config {\n positionChanged(from: number, to: number): void;\n}\n\nexport default class RowOrderService {\n private currentCell: Cell | null = null;\n private previousRow: number | null = null;\n\n constructor(private config: Config) {}\n\n /** Drag finished, calculate and apply changes */\n endOrder(e: MouseEvent, data: EventData) {\n if (this.currentCell === null) {\n return;\n }\n const newRow = this.getCell(e, data);\n\n // if position changed\n if (newRow.y !== this.currentCell.y) {\n // rgRow dragged out table\n if (newRow.y < 0) {\n newRow.y = 0;\n }\n // rgRow dragged to the top\n else if (newRow.y < this.currentCell.y) {\n newRow.y++;\n }\n this.config.positionChanged(this.currentCell.y, newRow.y);\n }\n this.clear();\n }\n\n /** Drag started, reserve initial cell for farther use */\n startOrder(e: MouseEvent, data: EventData): Cell {\n this.currentCell = this.getCell(e, data);\n return this.currentCell;\n }\n\n move(y: number, data: EventData): PositionItem | null {\n const rgRow = this.getRow(y, data);\n // if rgRow same as previous or below range (-1 = 0) do nothing\n if (this.previousRow === rgRow.itemIndex || rgRow.itemIndex < -1) {\n return null;\n }\n this.previousRow = rgRow.itemIndex;\n return rgRow;\n }\n\n /** Drag stopped, probably cursor outside of document area */\n clear() {\n this.currentCell = null;\n this.previousRow = null;\n }\n\n /** Calculate cell based on x, y position */\n getRow(y: number, { el, rows }: EventData): PositionItem {\n const { top } = el.getBoundingClientRect();\n const topRelative = y - top;\n const rgRow = getItemByPosition(rows, topRelative);\n const absolutePosition = {\n itemIndex: rgRow.itemIndex,\n start: rgRow.start + top,\n end: rgRow.end + top,\n };\n return absolutePosition;\n }\n\n /** Calculate cell based on x, y position */\n getCell({ x, y }: Cell, { el, rows, cols }: EventData): Cell {\n const { top, left } = el.getBoundingClientRect();\n const topRelative = y - top;\n const leftRelative = x - left;\n const rgRow = getItemByPosition(rows, topRelative);\n const rgCol = getItemByPosition(cols, leftRelative);\n return { x: rgCol.itemIndex, y: rgRow.itemIndex };\n }\n}\n"]}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import debounce from "lodash/debounce";
|
|
2
|
-
import { setItems } from "../../store/
|
|
2
|
+
import { setItems } from "../../store/index";
|
|
3
3
|
import { DRAGG_TEXT } from "../../utils/consts";
|
|
4
4
|
import RowOrderService from "./order-row.service";
|
|
5
|
+
/**
|
|
6
|
+
* Component for handling row order editor.
|
|
7
|
+
*/
|
|
5
8
|
export class OrderEditor {
|
|
6
9
|
constructor() {
|
|
7
10
|
this.events = [];
|
|
@@ -123,13 +126,13 @@ export class OrderEditor {
|
|
|
123
126
|
"references": {
|
|
124
127
|
"Observable": {
|
|
125
128
|
"location": "import",
|
|
126
|
-
"path": "
|
|
127
|
-
"id": "src/types/
|
|
129
|
+
"path": "@type",
|
|
130
|
+
"id": "src/types/index.ts::Observable"
|
|
128
131
|
},
|
|
129
132
|
"DimensionSettingsState": {
|
|
130
133
|
"location": "import",
|
|
131
|
-
"path": "
|
|
132
|
-
"id": "src/types/
|
|
134
|
+
"path": "@type",
|
|
135
|
+
"id": "src/types/index.ts::DimensionSettingsState"
|
|
133
136
|
}
|
|
134
137
|
}
|
|
135
138
|
},
|
|
@@ -149,13 +152,13 @@ export class OrderEditor {
|
|
|
149
152
|
"references": {
|
|
150
153
|
"Observable": {
|
|
151
154
|
"location": "import",
|
|
152
|
-
"path": "
|
|
153
|
-
"id": "src/types/
|
|
155
|
+
"path": "@type",
|
|
156
|
+
"id": "src/types/index.ts::Observable"
|
|
154
157
|
},
|
|
155
158
|
"DimensionSettingsState": {
|
|
156
159
|
"location": "import",
|
|
157
|
-
"path": "
|
|
158
|
-
"id": "src/types/
|
|
160
|
+
"path": "@type",
|
|
161
|
+
"id": "src/types/index.ts::DimensionSettingsState"
|
|
159
162
|
}
|
|
160
163
|
}
|
|
161
164
|
},
|
|
@@ -175,23 +178,23 @@ export class OrderEditor {
|
|
|
175
178
|
"references": {
|
|
176
179
|
"Observable": {
|
|
177
180
|
"location": "import",
|
|
178
|
-
"path": "
|
|
179
|
-
"id": "src/types/
|
|
181
|
+
"path": "@type",
|
|
182
|
+
"id": "src/types/index.ts::Observable"
|
|
180
183
|
},
|
|
181
184
|
"DSourceState": {
|
|
182
185
|
"location": "import",
|
|
183
|
-
"path": "
|
|
184
|
-
"id": "src/store/
|
|
186
|
+
"path": "@store",
|
|
187
|
+
"id": "src/store/index.ts::DSourceState"
|
|
185
188
|
},
|
|
186
189
|
"DataType": {
|
|
187
190
|
"location": "import",
|
|
188
|
-
"path": "
|
|
189
|
-
"id": "src/types/
|
|
191
|
+
"path": "@type",
|
|
192
|
+
"id": "src/types/index.ts::DataType"
|
|
190
193
|
},
|
|
191
194
|
"DimensionRows": {
|
|
192
195
|
"location": "import",
|
|
193
|
-
"path": "
|
|
194
|
-
"id": "src/types/
|
|
196
|
+
"path": "@type",
|
|
197
|
+
"id": "src/types/index.ts::DimensionRows"
|
|
195
198
|
}
|
|
196
199
|
}
|
|
197
200
|
},
|
|
@@ -221,13 +224,13 @@ export class OrderEditor {
|
|
|
221
224
|
"references": {
|
|
222
225
|
"Cell": {
|
|
223
226
|
"location": "import",
|
|
224
|
-
"path": "
|
|
225
|
-
"id": "src/types/
|
|
227
|
+
"path": "@type",
|
|
228
|
+
"id": "src/types/index.ts::Cell"
|
|
226
229
|
},
|
|
227
230
|
"PositionItem": {
|
|
228
231
|
"location": "import",
|
|
229
|
-
"path": "
|
|
230
|
-
"id": "src/types/
|
|
232
|
+
"path": "@type",
|
|
233
|
+
"id": "src/types/index.ts::PositionItem"
|
|
231
234
|
},
|
|
232
235
|
"MouseEvent": {
|
|
233
236
|
"location": "global",
|
|
@@ -266,8 +269,8 @@ export class OrderEditor {
|
|
|
266
269
|
"references": {
|
|
267
270
|
"PositionItem": {
|
|
268
271
|
"location": "import",
|
|
269
|
-
"path": "
|
|
270
|
-
"id": "src/types/
|
|
272
|
+
"path": "@type",
|
|
273
|
+
"id": "src/types/index.ts::PositionItem"
|
|
271
274
|
}
|
|
272
275
|
}
|
|
273
276
|
}
|
|
@@ -287,8 +290,8 @@ export class OrderEditor {
|
|
|
287
290
|
"references": {
|
|
288
291
|
"Cell": {
|
|
289
292
|
"location": "import",
|
|
290
|
-
"path": "
|
|
291
|
-
"id": "src/types/
|
|
293
|
+
"path": "@type",
|
|
294
|
+
"id": "src/types/index.ts::Cell"
|
|
292
295
|
}
|
|
293
296
|
}
|
|
294
297
|
}
|
|
@@ -316,7 +319,7 @@ export class OrderEditor {
|
|
|
316
319
|
"signature": "(e: DragStartEvent) => Promise<void>",
|
|
317
320
|
"parameters": [{
|
|
318
321
|
"name": "e",
|
|
319
|
-
"type": "
|
|
322
|
+
"type": "DragStartEvent",
|
|
320
323
|
"docs": ""
|
|
321
324
|
}],
|
|
322
325
|
"references": {
|
|
@@ -326,8 +329,8 @@ export class OrderEditor {
|
|
|
326
329
|
},
|
|
327
330
|
"DragStartEvent": {
|
|
328
331
|
"location": "import",
|
|
329
|
-
"path": "
|
|
330
|
-
"id": "src/types/
|
|
332
|
+
"path": "@type",
|
|
333
|
+
"id": "src/types/index.ts::DragStartEvent"
|
|
331
334
|
},
|
|
332
335
|
"MouseEvent": {
|
|
333
336
|
"location": "global",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revogr-order-editor.js","sourceRoot":"","sources":["../../../src/components/order/revogr-order-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"revogr-order-editor.js","sourceRoot":"","sources":["../../../src/components/order/revogr-order-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AAEvC,OAAO,EAAgB,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,eAAe,MAAM,qBAAqB,CAAC;AAWlD;;GAEG;AAEH,MAAM,OAAO,WAAW;;QA6Cd,WAAM,GAGR,EAAE,CAAC;QACD,gBAAW,GAAG,QAAQ,CAAC,CAAC,CAAS,EAAE,EAAE;YAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;YAC3D,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;gBACnB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC3B,CAAC;QACH,CAAC,EAAE,CAAC,CAAC,CAAC;;;;;;IACN,aAAa;IAEb,kBAAkB;IACR,KAAK,CAAC,SAAS,CAAC,CAAiB;QACzC,CAAC,CAAC,aAAa,CAAC,cAAc,EAAE,CAAC;QAEjC,gCAAgC;QAChC,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;YACvB,IAAI,CAAC,UAAU,EAAE,CAAC;QACpB,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,CAAC,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AAC,CAAC,CAAC;QACrC,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC;QAC/B,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAClC,CAAC;IAEO,OAAO;QACb,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,MAAM;YACf,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK;YAC7B,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK;SAC9B,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Method, Event, EventEmitter, Prop } from '@stencil/core';\nimport debounce from 'lodash/debounce';\n\nimport { DSourceState, setItems } from '@store';\nimport { DRAGG_TEXT } from '../../utils/consts';\nimport RowOrderService from './order-row.service';\nimport { DimensionRows } from '@type';\nimport {\n DataType,\n DimensionSettingsState,\n DragStartEvent,\n Observable,\n PositionItem,\n} from '@type';\nimport { Cell } from '@type';\n\n/**\n * Component for handling row order editor.\n */\n@Component({ tag: 'revogr-order-editor' })\nexport class OrderEditor {\n // #region Properties\n /** Parent element */\n @Prop() parent: HTMLElement;\n /** Dimension settings Y */\n @Prop() dimensionRow: Observable<DimensionSettingsState>;\n /** Dimension settings X */\n @Prop() dimensionCol: Observable<DimensionSettingsState>;\n\n /** Static stores, not expected to change during component lifetime */\n @Prop() dataStore: Observable<DSourceState<DataType, DimensionRows>>;\n // #endregion\n\n // #region Events\n /** Row drag started */\n @Event({ eventName: 'rowdragstartinit', cancelable: true })\n rowDragStart: EventEmitter<{\n cell: Cell;\n text: string;\n pos: PositionItem;\n event: MouseEvent;\n }>;\n\n /** Row drag ended started */\n @Event({ eventName: 'rowdragendinit' })\n rowDragEnd: EventEmitter;\n\n /** Row move started */\n @Event({ eventName: 'rowdragmoveinit', cancelable: true })\n rowDrag: EventEmitter<PositionItem>;\n\n /** Row mouse move started */\n @Event({ eventName: 'rowdragmousemove', cancelable: true })\n rowMouseMove: EventEmitter<Cell>;\n\n /** Row dragged, new range ready to be applied */\n @Event({ eventName: 'rowdropinit', cancelable: true })\n rowDropped: EventEmitter<{\n from: number;\n to: number;\n }>;\n // #endregion\n\n // #region Private\n private rowOrderService: RowOrderService;\n private events: {\n name: keyof DocumentEventMap;\n listener: (e: MouseEvent) => void;\n }[] = [];\n private rowMoveFunc = debounce((y: number) => {\n const rgRow = this.rowOrderService.move(y, this.getData());\n if (rgRow !== null) {\n this.rowDrag.emit(rgRow);\n }\n }, 5);\n // #endregion\n\n // #region Methods\n @Method() async dragStart(e: DragStartEvent) {\n e.originalEvent.preventDefault();\n\n // extra check if previous ended\n if (this.events.length) {\n this.clearOrder();\n }\n\n const data = this.getData();\n const cell = this.rowOrderService.startOrder(e.originalEvent, data);\n const pos = this.rowOrderService.getRow(e.originalEvent.y, data);\n const dragStartEvent = this.rowDragStart.emit({\n cell,\n text: DRAGG_TEXT,\n pos,\n event: e.originalEvent,\n });\n if (dragStartEvent.defaultPrevented) {\n return;\n }\n\n const moveMove = (e: MouseEvent) => this.move(e);\n const mouseUp = (e: MouseEvent) => this.endOrder(e);\n const mouseLeave = () => this.clearOrder();\n\n this.events.push(\n {\n name: 'mousemove',\n listener: moveMove,\n },\n {\n name: 'mouseup',\n listener: mouseUp,\n },\n {\n name: 'mouseleave',\n listener: mouseLeave,\n },\n );\n document.addEventListener('mousemove', moveMove);\n // Action finished inside of the document\n document.addEventListener('mouseup', mouseUp);\n document.addEventListener('mouseleave', mouseLeave);\n }\n\n @Method() async endOrder(e: MouseEvent) {\n this.rowOrderService.endOrder(e, this.getData());\n this.clearOrder();\n }\n\n @Method() async clearOrder() {\n this.rowOrderService.clear();\n this.events.forEach(v => document.removeEventListener(v.name, v.listener));\n this.events.length = 0;\n this.rowDragEnd.emit();\n }\n // #endregion\n\n move({ x, y }: { x: number; y: number }) {\n this.rowMouseMove.emit({ x, y });\n this.rowMoveFunc(y);\n }\n\n connectedCallback() {\n this.rowOrderService = new RowOrderService({\n positionChanged: (f, t) => this.onPositionChanged(f, t),\n });\n }\n\n private onPositionChanged(from: number, to: number) {\n const dropEvent = this.rowDropped.emit({ from, to });\n if (dropEvent.defaultPrevented) {\n return;\n }\n const items = [...this.dataStore.get('items')];\n const toMove = items.splice(from, 1);\n items.splice(to, 0, ...toMove);\n setItems(this.dataStore, items);\n }\n\n private getData() {\n return {\n el: this.parent,\n rows: this.dimensionRow.state,\n cols: this.dimensionCol.state,\n };\n }\n}\n"]}
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
import debounce from "lodash/debounce";
|
|
5
5
|
import { h } from "@stencil/core";
|
|
6
6
|
import { CELL_HANDLER_CLASS, MOBILE_CLASS } from "../../utils/consts";
|
|
7
|
-
import { getCell, getCurrentCell, isAfterLast } from "./selection.utils";
|
|
8
|
-
import { getRange } from "../../store/
|
|
9
|
-
import {
|
|
10
|
-
import { getFromEvent } from "../../utils/events";
|
|
7
|
+
import { getCell, getCurrentCell, isAfterLast, } from "./selection.utils";
|
|
8
|
+
import { getSourceItem, getRange } from "../../store/index";
|
|
9
|
+
import { getPropertyFromEvent } from "../../utils/events";
|
|
11
10
|
export class AutoFillService {
|
|
12
11
|
constructor(sv) {
|
|
13
12
|
this.sv = sv;
|
|
@@ -32,7 +31,10 @@ export class AutoFillService {
|
|
|
32
31
|
return (h("div", { class: {
|
|
33
32
|
[CELL_HANDLER_CLASS]: true,
|
|
34
33
|
[MOBILE_CLASS]: true,
|
|
35
|
-
}, style: {
|
|
34
|
+
}, style: {
|
|
35
|
+
left: `${handlerStyle.right}px`,
|
|
36
|
+
top: `${handlerStyle.bottom}px`,
|
|
37
|
+
}, onMouseDown: (e) => this.autoFillHandler(e), onTouchStart: (e) => this.autoFillHandler(e) }));
|
|
36
38
|
}
|
|
37
39
|
autoFillHandler(e, type = "AutoFill" /* AutoFillType.autoFill */) {
|
|
38
40
|
let target = null;
|
|
@@ -48,7 +50,9 @@ export class AutoFillService {
|
|
|
48
50
|
get isAutoFill() {
|
|
49
51
|
return !!this.autoFillType;
|
|
50
52
|
}
|
|
51
|
-
/**
|
|
53
|
+
/**
|
|
54
|
+
* Process mouse move events
|
|
55
|
+
*/
|
|
52
56
|
selectionMouseMove(e) {
|
|
53
57
|
// initiate mouse move debounce if not present
|
|
54
58
|
if (!this.onMouseMoveAutofill) {
|
|
@@ -58,9 +62,7 @@ export class AutoFillService {
|
|
|
58
62
|
this.onMouseMoveAutofill(e, this.sv.getData());
|
|
59
63
|
}
|
|
60
64
|
}
|
|
61
|
-
getFocus() {
|
|
62
|
-
let focus = this.sv.selectionStoreService.focused;
|
|
63
|
-
const range = this.sv.selectionStoreService.ranged;
|
|
65
|
+
getFocus(focus, range) {
|
|
64
66
|
// there was an issue that it was taking last cell from range but focus was out
|
|
65
67
|
if (!focus && range) {
|
|
66
68
|
focus = { x: range.x, y: range.y };
|
|
@@ -76,8 +78,8 @@ export class AutoFillService {
|
|
|
76
78
|
if (!this.autoFillInitial) {
|
|
77
79
|
return;
|
|
78
80
|
}
|
|
79
|
-
const x =
|
|
80
|
-
const y =
|
|
81
|
+
const x = getPropertyFromEvent(event, 'clientX', MOBILE_CLASS);
|
|
82
|
+
const y = getPropertyFromEvent(event, 'clientY', MOBILE_CLASS);
|
|
81
83
|
// skip touch
|
|
82
84
|
if (x === null || y === null) {
|
|
83
85
|
return;
|
|
@@ -90,11 +92,12 @@ export class AutoFillService {
|
|
|
90
92
|
}
|
|
91
93
|
}
|
|
92
94
|
// check if not the latest, if latest - do nothing
|
|
93
|
-
if (isAfterLast(current, data)) {
|
|
95
|
+
if (isAfterLast(current, data.lastCell)) {
|
|
94
96
|
return;
|
|
95
97
|
}
|
|
96
98
|
this.autoFillLast = current;
|
|
97
|
-
const isSame = current.x === this.autoFillInitial.x &&
|
|
99
|
+
const isSame = current.x === this.autoFillInitial.x &&
|
|
100
|
+
current.y === this.autoFillInitial.y;
|
|
98
101
|
// if same as initial - clear
|
|
99
102
|
if (isSame) {
|
|
100
103
|
this.sv.setTempRange(null);
|
|
@@ -115,39 +118,48 @@ export class AutoFillService {
|
|
|
115
118
|
selectionStart(target, data, type = "Selection" /* AutoFillType.selection */) {
|
|
116
119
|
/** Get cell by autofill element */
|
|
117
120
|
const { top, left } = target.getBoundingClientRect();
|
|
118
|
-
this.autoFillInitial = this.getFocus();
|
|
121
|
+
this.autoFillInitial = this.getFocus(data.focus, data.range);
|
|
119
122
|
this.autoFillType = type;
|
|
120
123
|
this.autoFillStart = getCurrentCell({ x: left, y: top }, data);
|
|
121
124
|
}
|
|
122
125
|
/**
|
|
123
|
-
* Clear current range selection
|
|
124
|
-
* on mouse up and mouse leave events
|
|
126
|
+
* Clear current range selection on mouse up and mouse leave events
|
|
125
127
|
*/
|
|
126
|
-
clearAutoFillSelection() {
|
|
127
|
-
//
|
|
128
|
+
clearAutoFillSelection(focus, oldRange) {
|
|
129
|
+
// If autofill was active, apply autofill values
|
|
128
130
|
if (this.autoFillInitial) {
|
|
129
|
-
//
|
|
130
|
-
this.autoFillInitial = this.getFocus();
|
|
131
|
-
// Apply range data if
|
|
131
|
+
// Fetch latest focus
|
|
132
|
+
this.autoFillInitial = this.getFocus(focus, oldRange);
|
|
133
|
+
// Apply range data if autofill mode is active
|
|
132
134
|
if (this.autoFillType === "AutoFill" /* AutoFillType.autoFill */) {
|
|
133
135
|
const range = getRange(this.autoFillInitial, this.autoFillLast);
|
|
136
|
+
// If range is present, apply data
|
|
134
137
|
if (range) {
|
|
135
|
-
const { defaultPrevented: stopApply, detail: { range: newRange } } = this.sv.clearRangeDataApply({
|
|
138
|
+
const { defaultPrevented: stopApply, detail: { range: newRange }, } = this.sv.clearRangeDataApply({
|
|
136
139
|
range,
|
|
137
140
|
});
|
|
141
|
+
// If data apply was not prevented, apply new range
|
|
138
142
|
if (!stopApply) {
|
|
139
|
-
this.applyRangeWithData(newRange);
|
|
143
|
+
this.applyRangeWithData(newRange, oldRange);
|
|
140
144
|
}
|
|
141
145
|
else {
|
|
142
|
-
//
|
|
146
|
+
// If data apply was prevented, clear temporary range
|
|
143
147
|
this.sv.setTempRange(null);
|
|
144
148
|
}
|
|
145
149
|
}
|
|
146
150
|
}
|
|
147
151
|
else {
|
|
152
|
+
// If not autofill mode, apply range only
|
|
148
153
|
this.applyRangeOnly(this.autoFillInitial, this.autoFillLast);
|
|
149
154
|
}
|
|
150
155
|
}
|
|
156
|
+
// Reset autofill state
|
|
157
|
+
this.resetAutoFillState();
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Reset autofill state
|
|
161
|
+
*/
|
|
162
|
+
resetAutoFillState() {
|
|
151
163
|
this.autoFillType = null;
|
|
152
164
|
this.autoFillInitial = null;
|
|
153
165
|
this.autoFillLast = null;
|
|
@@ -167,8 +179,7 @@ export class AutoFillService {
|
|
|
167
179
|
this.sv.setRange(range);
|
|
168
180
|
}
|
|
169
181
|
/** Apply range and copy data during range application */
|
|
170
|
-
applyRangeWithData(newRange) {
|
|
171
|
-
const oldRange = this.sv.selectionStoreService.ranged;
|
|
182
|
+
applyRangeWithData(newRange, oldRange) {
|
|
172
183
|
const rangeData = {
|
|
173
184
|
type: this.sv.dataStore.get('type'),
|
|
174
185
|
colType: this.sv.columnService.type,
|