@revolist/revogrid 4.0.4-next → 4.0.4
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 +1 -1
- package/dist/cjs/app-globals-53fde1aa.js +14 -0
- package/dist/cjs/app-globals-53fde1aa.js.map +1 -0
- package/dist/cjs/column.service-2066d651.js +545 -0
- package/dist/cjs/column.service-2066d651.js.map +1 -0
- package/dist/cjs/debounce-e2b7c6fb.js +226 -0
- package/dist/cjs/debounce-e2b7c6fb.js.map +1 -0
- package/dist/cjs/dimension.helpers-ee39d6c4.js +4218 -0
- package/dist/cjs/dimension.helpers-ee39d6c4.js.map +1 -0
- package/dist/cjs/dispatcher-a58fa91a.js +34 -0
- package/dist/cjs/dispatcher-a58fa91a.js.map +1 -0
- package/dist/cjs/events-7ccd6894.js +233 -0
- package/dist/cjs/events-7ccd6894.js.map +1 -0
- package/dist/cjs/filter.button-db6cbd2e.js +44 -0
- package/dist/cjs/filter.button-db6cbd2e.js.map +1 -0
- package/dist/cjs/header-cell-renderer-3df76829.js +304 -0
- package/dist/cjs/header-cell-renderer-3df76829.js.map +1 -0
- package/dist/cjs/index-73c149e3.js +106 -0
- package/dist/cjs/index-73c149e3.js.map +1 -0
- package/dist/cjs/index-84e32c2a.js +1868 -0
- package/dist/cjs/index-84e32c2a.js.map +1 -0
- package/dist/cjs/index.cjs.js +53 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/key.utils-dc4ac217.js +129 -0
- package/dist/cjs/key.utils-dc4ac217.js.map +1 -0
- package/dist/cjs/loader.cjs.js +12 -27
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/{resize-observer-8dc80084.js → resize-observer-d009a220.js} +30 -13
- package/dist/cjs/resize-observer-d009a220.js.map +1 -0
- package/dist/cjs/revo-grid.cjs.entry.js +3992 -0
- package/dist/cjs/revo-grid.cjs.entry.js.map +1 -0
- package/dist/cjs/revo-grid.cjs.js +22 -65
- package/dist/cjs/revo-grid.cjs.js.map +1 -0
- package/dist/cjs/revogr-attribution_6.cjs.entry.js +1270 -0
- package/dist/cjs/revogr-attribution_6.cjs.entry.js.map +1 -0
- package/dist/cjs/revogr-clipboard_3.cjs.entry.js +508 -0
- package/dist/cjs/revogr-clipboard_3.cjs.entry.js.map +1 -0
- package/dist/cjs/revogr-data_4.cjs.entry.js +958 -0
- package/dist/cjs/revogr-data_4.cjs.entry.js.map +1 -0
- package/dist/cjs/revogr-filter-panel.cjs.entry.js +268 -115
- package/dist/cjs/revogr-filter-panel.cjs.entry.js.map +1 -0
- package/dist/cjs/selection.store-2e110a67.js +400 -0
- package/dist/cjs/selection.store-2e110a67.js.map +1 -0
- package/dist/cjs/storeTypes-b3f924b2.js +106 -0
- package/dist/cjs/storeTypes-b3f924b2.js.map +1 -0
- package/dist/cjs/throttle-f7aee21b.js +240 -0
- package/dist/cjs/throttle-f7aee21b.js.map +1 -0
- package/dist/cjs/toNumber-838e6ff5.js +340 -0
- package/dist/cjs/toNumber-838e6ff5.js.map +1 -0
- package/dist/cjs/viewport.helpers-6670177c.js +262 -0
- package/dist/cjs/viewport.helpers-6670177c.js.map +1 -0
- package/dist/collection/collection-manifest.json +18 -16
- 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 +410 -115
- package/dist/collection/components/clipboard/revogr-clipboard.js.map +1 -0
- package/dist/collection/components/data/cell-renderer.js +39 -0
- package/dist/collection/components/data/cell-renderer.js.map +1 -0
- package/dist/collection/components/data/column.service.js +302 -0
- package/dist/collection/components/data/column.service.js.map +1 -0
- package/dist/collection/components/data/revogr-data-style.css +18 -11
- package/dist/collection/components/data/revogr-data.js +626 -301
- 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 +16 -0
- package/dist/collection/components/data/row-renderer.js.map +1 -0
- package/dist/collection/components/editors/edit.utils.js +9 -0
- package/dist/collection/components/editors/edit.utils.js.map +1 -0
- package/dist/collection/components/{overlay → editors}/revogr-edit-style.css +15 -9
- package/dist/collection/components/editors/revogr-edit.js +316 -0
- package/dist/collection/components/editors/revogr-edit.js.map +1 -0
- package/dist/collection/components/editors/text-editor.js +73 -0
- package/dist/collection/components/editors/text-editor.js.map +1 -0
- package/dist/collection/components/header/header-cell-renderer.js +28 -0
- package/dist/collection/components/header/header-cell-renderer.js.map +1 -0
- package/dist/collection/components/header/header-renderer.js +47 -0
- package/dist/collection/components/header/header-renderer.js.map +1 -0
- package/dist/collection/components/header/revogr-header-style.css +15 -9
- package/dist/collection/components/header/revogr-header.js +421 -297
- 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 +381 -350
- package/dist/collection/components/order/revogr-order-editor.js.map +1 -0
- package/dist/collection/components/overlay/autofill.service.js +206 -179
- package/dist/collection/components/overlay/autofill.service.js.map +1 -0
- package/dist/collection/components/overlay/keyboard.service.js +137 -124
- package/dist/collection/components/overlay/keyboard.service.js.map +1 -0
- package/dist/collection/components/overlay/revogr-overlay-selection.js +1208 -703
- package/dist/collection/components/overlay/revogr-overlay-selection.js.map +1 -0
- package/dist/collection/components/overlay/revogr-overlay-style.css +86 -13
- package/dist/collection/components/overlay/selection.utils.js +86 -82
- package/dist/collection/components/overlay/selection.utils.js.map +1 -0
- package/dist/collection/components/revoGrid/grid.helpers.js +28 -13
- package/dist/collection/components/revoGrid/grid.helpers.js.map +1 -0
- package/dist/collection/components/revoGrid/revo-grid-style.css +143 -51
- package/dist/collection/components/revoGrid/revo-grid.js +2834 -2181
- package/dist/collection/components/revoGrid/revo-grid.js.map +1 -0
- package/dist/collection/components/revoGrid/viewport.helpers.js +9 -4
- package/dist/collection/components/revoGrid/viewport.helpers.js.map +1 -0
- package/dist/collection/components/revoGrid/viewport.resize.service.js +23 -19
- package/dist/collection/components/revoGrid/viewport.resize.service.js.map +1 -0
- package/dist/collection/components/revoGrid/viewport.scrolling.service.js +78 -50
- package/dist/collection/components/revoGrid/viewport.scrolling.service.js.map +1 -0
- package/dist/collection/components/revoGrid/viewport.service.js +224 -204
- package/dist/collection/components/revoGrid/viewport.service.js.map +1 -0
- package/dist/collection/components/rowHeaders/revogr-row-headers.js +262 -204
- package/dist/collection/components/rowHeaders/revogr-row-headers.js.map +1 -0
- package/dist/collection/components/rowHeaders/row-header-render.js +4 -0
- package/dist/collection/components/rowHeaders/row-header-render.js.map +1 -0
- package/dist/collection/components/scroll/revogr-viewport-scroll-style.css +20 -13
- package/dist/collection/components/scroll/revogr-viewport-scroll.js +535 -369
- 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 +24 -18
- package/dist/collection/components/scrollable/revogr-scroll-virtual.js +286 -247
- package/dist/collection/components/scrollable/revogr-scroll-virtual.js.map +1 -0
- package/dist/collection/components/selectionFocus/revogr-focus-style.css +16 -10
- package/dist/collection/components/selectionFocus/revogr-focus.js +366 -96
- package/dist/collection/components/selectionFocus/revogr-focus.js.map +1 -0
- package/dist/collection/components/selectionTempRange/revogr-temp-range-style.css +16 -10
- package/dist/collection/components/selectionTempRange/revogr-temp-range.js +149 -128
- package/dist/collection/components/selectionTempRange/revogr-temp-range.js.map +1 -0
- package/dist/collection/components/vnode/vnode-converter.js +81 -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 +15 -11
- package/dist/collection/global/global.js.map +1 -0
- package/dist/collection/index.js +18 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/plugins/base.plugin.js +88 -0
- package/dist/collection/plugins/base.plugin.js.map +1 -0
- package/dist/collection/plugins/column.auto-size.plugin.js +234 -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/dispatcher.js +27 -0
- package/dist/collection/plugins/dispatcher.js.map +1 -0
- package/dist/collection/plugins/export/csv.js +57 -53
- package/dist/collection/plugins/export/csv.js.map +1 -0
- package/dist/collection/plugins/export/export.plugin.js +154 -150
- package/dist/collection/plugins/export/export.plugin.js.map +1 -0
- package/dist/collection/plugins/export/types.js +1 -0
- package/dist/collection/plugins/export/types.js.map +1 -0
- package/dist/collection/plugins/filter/conditions/equal.js +15 -7
- package/dist/collection/plugins/filter/conditions/equal.js.map +1 -0
- package/dist/collection/plugins/filter/conditions/number/greaterThan.js +10 -6
- package/dist/collection/plugins/filter/conditions/number/greaterThan.js.map +1 -0
- package/dist/collection/plugins/filter/conditions/number/greaterThanOrEqual.js +7 -3
- package/dist/collection/plugins/filter/conditions/number/greaterThanOrEqual.js.map +1 -0
- package/dist/collection/plugins/filter/conditions/number/lessThan.js +12 -8
- package/dist/collection/plugins/filter/conditions/number/lessThan.js.map +1 -0
- package/dist/collection/plugins/filter/conditions/number/lessThanOrEqual.js +7 -3
- package/dist/collection/plugins/filter/conditions/number/lessThanOrEqual.js.map +1 -0
- package/dist/collection/plugins/filter/conditions/set.js +4 -0
- package/dist/collection/plugins/filter/conditions/set.js.map +1 -0
- package/dist/collection/plugins/filter/conditions/string/beginswith.js +17 -13
- package/dist/collection/plugins/filter/conditions/string/beginswith.js.map +1 -0
- package/dist/collection/plugins/filter/conditions/string/contains.js +17 -10
- package/dist/collection/plugins/filter/conditions/string/contains.js.map +1 -0
- package/dist/collection/plugins/filter/filter.button.js +21 -13
- package/dist/collection/plugins/filter/filter.button.js.map +1 -0
- package/dist/collection/plugins/filter/filter.plugin.js +280 -185
- package/dist/collection/plugins/filter/filter.plugin.js.map +1 -0
- package/dist/collection/plugins/filter/filter.pop.js +492 -246
- package/dist/collection/plugins/filter/filter.pop.js.map +1 -0
- package/dist/collection/plugins/filter/filter.service.js +42 -38
- package/dist/collection/plugins/filter/filter.service.js.map +1 -0
- package/dist/collection/plugins/filter/filter.style.css +68 -15
- package/dist/collection/plugins/filter/filter.types.js +1 -0
- package/dist/collection/plugins/filter/filter.types.js.map +1 -0
- package/dist/collection/plugins/groupingColumn/columnGroupsRenderer.js +30 -26
- package/dist/collection/plugins/groupingColumn/columnGroupsRenderer.js.map +1 -0
- package/dist/collection/plugins/groupingColumn/grouping.col.plugin.js +38 -30
- package/dist/collection/plugins/groupingColumn/grouping.col.plugin.js.map +1 -0
- package/dist/collection/plugins/groupingColumn/headerGroupRenderer.js +22 -18
- package/dist/collection/plugins/groupingColumn/headerGroupRenderer.js.map +1 -0
- package/dist/collection/plugins/groupingRow/grouping.const.js +7 -2
- package/dist/collection/plugins/groupingRow/grouping.const.js.map +1 -0
- package/dist/collection/plugins/groupingRow/grouping.row.expand.service.js +64 -61
- package/dist/collection/plugins/groupingRow/grouping.row.expand.service.js.map +1 -0
- package/dist/collection/plugins/groupingRow/grouping.row.plugin.js +239 -237
- package/dist/collection/plugins/groupingRow/grouping.row.plugin.js.map +1 -0
- package/dist/collection/plugins/groupingRow/grouping.row.renderer.js +27 -24
- package/dist/collection/plugins/groupingRow/grouping.row.renderer.js.map +1 -0
- package/dist/collection/plugins/groupingRow/grouping.row.types.js +1 -0
- package/dist/collection/plugins/groupingRow/grouping.row.types.js.map +1 -0
- package/dist/collection/plugins/groupingRow/grouping.service.js +101 -131
- package/dist/collection/plugins/groupingRow/grouping.service.js.map +1 -0
- package/dist/collection/plugins/groupingRow/grouping.trimmed.service.js +47 -43
- package/dist/collection/plugins/groupingRow/grouping.trimmed.service.js.map +1 -0
- package/dist/collection/plugins/moveColumn/column.drag.plugin.js +167 -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/sorting/sorting.plugin.js +218 -163
- package/dist/collection/plugins/sorting/sorting.plugin.js.map +1 -0
- package/dist/collection/plugins/sorting/sorting.sign.js +6 -2
- package/dist/collection/plugins/sorting/sorting.sign.js.map +1 -0
- package/dist/collection/serve/controller.js +233 -0
- package/dist/collection/{utilsExternal/generate-data.js → serve/data.js} +72 -32
- package/dist/collection/services/cell.helpers.js +9 -5
- package/dist/collection/services/cell.helpers.js.map +1 -0
- package/dist/collection/services/column.data.provider.js +201 -185
- package/dist/collection/services/column.data.provider.js.map +1 -0
- package/dist/collection/services/data.provider.js +70 -45
- package/dist/collection/services/data.provider.js.map +1 -0
- package/dist/collection/services/dimension.provider.js +143 -85
- package/dist/collection/services/dimension.provider.js.map +1 -0
- package/dist/collection/services/local.scroll.service.js +120 -0
- package/dist/collection/services/local.scroll.service.js.map +1 -0
- package/dist/collection/services/local.scroll.timer.js +42 -0
- package/dist/collection/services/local.scroll.timer.js.map +1 -0
- package/dist/collection/services/resizable.directive.js +211 -226
- package/dist/collection/services/resizable.directive.js.map +1 -0
- package/dist/collection/services/resizable.element.js +39 -0
- package/dist/collection/services/resizable.element.js.map +1 -0
- package/dist/collection/services/selection.store.connector.js +257 -208
- package/dist/collection/services/selection.store.connector.js.map +1 -0
- package/dist/collection/services/viewport.provider.js +16 -12
- package/dist/collection/services/viewport.provider.js.map +1 -0
- package/dist/collection/store/dataSource/data.proxy.js +29 -25
- package/dist/collection/store/dataSource/data.proxy.js.map +1 -0
- package/dist/collection/store/dataSource/data.store.js +100 -93
- 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 +36 -0
- package/dist/collection/store/dataSource/trimmed.plugin.js.map +1 -0
- package/dist/collection/store/dimension/dimension.helpers.js +97 -95
- package/dist/collection/store/dimension/dimension.helpers.js.map +1 -0
- package/dist/collection/store/dimension/dimension.store.js +106 -48
- package/dist/collection/store/dimension/dimension.store.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/selection/index.js +7 -0
- package/dist/collection/store/selection/index.js.map +1 -0
- package/dist/collection/store/selection/selection.helpers.js +43 -39
- package/dist/collection/store/selection/selection.helpers.js.map +1 -0
- package/dist/collection/store/selection/selection.store.js +75 -63
- package/dist/collection/store/selection/selection.store.js.map +1 -0
- package/dist/collection/store/selection/selection.store.service.js +35 -31
- package/dist/collection/store/selection/selection.store.service.js.map +1 -0
- package/dist/collection/store/storeTypes.js +10 -2
- package/dist/collection/store/storeTypes.js.map +1 -0
- package/dist/collection/store/viewport/index.js +6 -0
- package/dist/collection/store/viewport/index.js.map +1 -0
- package/dist/collection/store/viewport/viewport.helpers.js +247 -0
- package/dist/collection/store/viewport/viewport.helpers.js.map +1 -0
- package/dist/collection/store/viewport/viewport.store.js +193 -0
- package/dist/collection/store/viewport/viewport.store.js.map +1 -0
- package/dist/collection/themeManager/theme.compact.js +7 -3
- package/dist/collection/themeManager/theme.compact.js.map +1 -0
- package/dist/collection/themeManager/theme.default.js +7 -3
- package/dist/collection/themeManager/theme.default.js.map +1 -0
- package/dist/collection/themeManager/theme.material.js +7 -3
- 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/interfaces.js +2 -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/browser.js +7 -0
- package/dist/collection/utils/browser.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/consts.js +8 -0
- package/dist/collection/utils/consts.js.map +1 -0
- package/dist/collection/utils/events.js +29 -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 +125 -0
- package/dist/collection/utils/index.js.map +1 -0
- package/dist/collection/utils/key.codes.js +76 -0
- package/dist/collection/utils/key.codes.js.map +1 -0
- package/dist/collection/utils/key.utils.js +84 -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 +5 -1
- package/dist/collection/utils/platform.js.map +1 -0
- package/dist/collection/utils/resize-observer.polifill.js +10 -0
- package/dist/collection/utils/resize-observer.polifill.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.utils.js +7 -3
- package/dist/collection/utils/store.utils.js.map +1 -0
- package/dist/esm/app-globals-ef1fca59.js +12 -0
- package/dist/esm/app-globals-ef1fca59.js.map +1 -0
- package/dist/esm/column.service-21a3af74.js +520 -0
- package/dist/esm/column.service-21a3af74.js.map +1 -0
- package/dist/esm/debounce-7781346d.js +224 -0
- package/dist/esm/debounce-7781346d.js.map +1 -0
- package/dist/esm/dimension.helpers-a3065cb1.js +4185 -0
- package/dist/esm/dimension.helpers-a3065cb1.js.map +1 -0
- package/dist/esm/dispatcher-8ea9187d.js +30 -0
- package/dist/esm/dispatcher-8ea9187d.js.map +1 -0
- package/dist/esm/events-3dd8ee7c.js +228 -0
- package/dist/esm/events-3dd8ee7c.js.map +1 -0
- package/dist/esm/filter.button-46ce4f80.js +38 -0
- package/dist/esm/filter.button-46ce4f80.js.map +1 -0
- package/dist/esm/header-cell-renderer-1ca84d5f.js +301 -0
- package/dist/esm/header-cell-renderer-1ca84d5f.js.map +1 -0
- package/dist/esm/index-21436631.js +1837 -0
- package/dist/esm/index-21436631.js.map +1 -0
- package/dist/esm/index-98fd0168.js +79 -0
- package/dist/esm/index-98fd0168.js.map +1 -0
- package/dist/esm/index.js +11 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/key.utils-4586a3d6.js +120 -0
- package/dist/esm/key.utils-4586a3d6.js.map +1 -0
- package/dist/esm/loader.js +11 -26
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/{resize-observer-56b7b34f.js → resize-observer-83c9e167.js} +30 -14
- package/dist/esm/resize-observer-83c9e167.js.map +1 -0
- package/dist/esm/revo-grid.entry.js +3988 -0
- package/dist/esm/revo-grid.entry.js.map +1 -0
- package/dist/esm/revo-grid.js +19 -65
- package/dist/esm/revo-grid.js.map +1 -0
- package/dist/esm/revogr-attribution_6.entry.js +1261 -0
- package/dist/esm/revogr-attribution_6.entry.js.map +1 -0
- package/dist/esm/revogr-clipboard_3.entry.js +502 -0
- package/dist/esm/revogr-clipboard_3.entry.js.map +1 -0
- package/dist/esm/revogr-data_4.entry.js +951 -0
- package/dist/esm/revogr-data_4.entry.js.map +1 -0
- package/dist/esm/revogr-filter-panel.entry.js +268 -115
- package/dist/esm/revogr-filter-panel.entry.js.map +1 -0
- package/dist/esm/selection.store-2577ddf9.js +391 -0
- package/dist/esm/selection.store-2577ddf9.js.map +1 -0
- package/dist/esm/storeTypes-f2647985.js +101 -0
- package/dist/esm/storeTypes-f2647985.js.map +1 -0
- package/dist/esm/throttle-cfd527d6.js +235 -0
- package/dist/esm/throttle-cfd527d6.js.map +1 -0
- package/dist/esm/toNumber-8de324a7.js +331 -0
- package/dist/esm/toNumber-8de324a7.js.map +1 -0
- package/dist/esm/viewport.helpers-6591d423.js +251 -0
- package/dist/esm/viewport.helpers-6591d423.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/revo-grid/app-globals-ef1fca59.js +5 -0
- package/dist/revo-grid/app-globals-ef1fca59.js.map +1 -0
- package/dist/revo-grid/column.service-21a3af74.js +5 -0
- package/dist/revo-grid/column.service-21a3af74.js.map +1 -0
- package/dist/revo-grid/debounce-7781346d.js +5 -0
- package/dist/revo-grid/debounce-7781346d.js.map +1 -0
- package/dist/revo-grid/dimension.helpers-a3065cb1.js +5 -0
- package/dist/revo-grid/dimension.helpers-a3065cb1.js.map +1 -0
- package/dist/revo-grid/dispatcher-8ea9187d.js +5 -0
- package/dist/revo-grid/dispatcher-8ea9187d.js.map +1 -0
- package/dist/revo-grid/events-3dd8ee7c.js +5 -0
- package/dist/revo-grid/events-3dd8ee7c.js.map +1 -0
- package/dist/revo-grid/filter.button-46ce4f80.js +5 -0
- package/dist/revo-grid/filter.button-46ce4f80.js.map +1 -0
- package/dist/revo-grid/header-cell-renderer-1ca84d5f.js +5 -0
- package/dist/revo-grid/header-cell-renderer-1ca84d5f.js.map +1 -0
- package/dist/revo-grid/index-21436631.js +6 -0
- package/dist/revo-grid/index-21436631.js.map +1 -0
- package/dist/revo-grid/index-98fd0168.js +5 -0
- package/dist/revo-grid/index-98fd0168.js.map +1 -0
- package/dist/revo-grid/index.esm.js +5 -0
- package/dist/revo-grid/index.esm.js.map +1 -0
- package/dist/revo-grid/key.utils-4586a3d6.js +5 -0
- package/dist/revo-grid/key.utils-4586a3d6.js.map +1 -0
- package/dist/revo-grid/resize-observer-83c9e167.js +5 -0
- package/dist/revo-grid/resize-observer-83c9e167.js.map +1 -0
- package/dist/revo-grid/revo-grid.entry.js +5 -0
- package/dist/revo-grid/revo-grid.entry.js.map +1 -0
- package/dist/revo-grid/revo-grid.esm.js +5 -1
- package/dist/revo-grid/revo-grid.esm.js.map +1 -0
- package/dist/revo-grid/revogr-attribution_6.entry.js +5 -0
- package/dist/revo-grid/revogr-attribution_6.entry.js.map +1 -0
- package/dist/revo-grid/revogr-clipboard_3.entry.js +5 -0
- package/dist/revo-grid/revogr-clipboard_3.entry.js.map +1 -0
- package/dist/revo-grid/revogr-data_4.entry.js +5 -0
- package/dist/revo-grid/revogr-data_4.entry.js.map +1 -0
- package/dist/revo-grid/revogr-filter-panel.entry.js +5 -1
- package/dist/revo-grid/revogr-filter-panel.entry.js.map +1 -0
- package/dist/revo-grid/selection.store-2577ddf9.js +5 -0
- package/dist/revo-grid/selection.store-2577ddf9.js.map +1 -0
- package/dist/revo-grid/storeTypes-f2647985.js +5 -0
- package/dist/revo-grid/storeTypes-f2647985.js.map +1 -0
- package/dist/revo-grid/throttle-cfd527d6.js +5 -0
- package/dist/revo-grid/throttle-cfd527d6.js.map +1 -0
- package/dist/revo-grid/toNumber-8de324a7.js +5 -0
- package/dist/revo-grid/toNumber-8de324a7.js.map +1 -0
- package/dist/revo-grid/viewport.helpers-6591d423.js +5 -0
- package/dist/revo-grid/viewport.helpers-6591d423.js.map +1 -0
- package/dist/types/components/attribution/revogr-attribution.d.ts +12 -0
- package/dist/types/components/clipboard/revogr-clipboard.d.ts +78 -10
- package/dist/types/components/data/cell-renderer.d.ts +14 -0
- package/dist/types/components/data/column.service.d.ts +60 -0
- package/dist/types/components/data/revogr-data.d.ts +101 -27
- package/dist/types/components/data/row-highlight.plugin.d.ts +10 -0
- package/dist/types/components/data/{rowRenderer.d.ts → row-renderer.d.ts} +6 -5
- package/dist/types/components/editors/revogr-edit.d.ts +63 -0
- package/dist/types/components/editors/text-editor.d.ts +46 -0
- package/dist/types/components/header/header-cell-renderer.d.ts +11 -0
- package/dist/types/components/header/header-renderer.d.ts +17 -0
- package/dist/types/components/header/revogr-header.d.ts +70 -22
- package/dist/types/components/order/order-renderer.d.ts +29 -0
- package/dist/types/components/order/order-row.service.d.ts +28 -0
- package/dist/types/components/order/revogr-order-editor.d.ts +43 -41
- package/dist/types/components/overlay/autofill.service.d.ts +69 -54
- package/dist/types/components/overlay/keyboard.service.d.ts +24 -23
- package/dist/types/components/overlay/revogr-overlay-selection.d.ts +216 -75
- package/dist/types/components/overlay/selection.utils.d.ts +24 -27
- package/dist/types/components/revoGrid/grid.helpers.d.ts +16 -11
- package/dist/types/components/revoGrid/revo-grid.d.ts +555 -403
- package/dist/types/components/revoGrid/viewport.helpers.d.ts +4 -3
- package/dist/types/components/revoGrid/viewport.resize.service.d.ts +7 -7
- package/dist/types/components/revoGrid/viewport.scrolling.service.d.ts +20 -21
- package/dist/types/components/revoGrid/viewport.service.d.ts +54 -56
- package/dist/types/components/rowHeaders/revogr-row-headers.d.ts +45 -12
- package/dist/types/components/rowHeaders/row-header-render.d.ts +5 -5
- package/dist/types/components/scroll/revogr-viewport-scroll.d.ts +115 -76
- package/dist/types/components/scrollable/autohide-scroll.plugin.d.ts +22 -0
- package/dist/types/components/scrollable/revogr-scroll-virtual.d.ts +39 -22
- package/dist/types/components/selectionFocus/revogr-focus.d.ts +61 -9
- package/dist/types/components/selectionTempRange/revogr-temp-range.d.ts +26 -11
- package/dist/types/components/vnode/vnode-converter.d.ts +19 -0
- package/dist/types/components/vnode/vnode.utils.d.ts +8 -0
- package/dist/types/components.d.ts +1595 -274
- package/dist/types/index.d.ts +14 -0
- package/dist/types/plugins/base.plugin.d.ts +49 -0
- package/dist/types/plugins/column.auto-size.plugin.d.ts +47 -0
- package/dist/types/plugins/column.stretch.plugin.d.ts +22 -0
- package/dist/types/plugins/dispatcher.d.ts +16 -0
- package/dist/types/plugins/export/csv.d.ts +6 -6
- package/dist/types/plugins/export/export.plugin.d.ts +18 -18
- package/dist/types/plugins/export/types.d.ts +15 -15
- package/dist/types/plugins/filter/filter.button.d.ts +7 -3
- package/dist/types/plugins/filter/filter.plugin.d.ts +61 -43
- package/dist/types/plugins/filter/filter.pop.d.ts +60 -35
- package/dist/types/plugins/filter/filter.service.d.ts +15 -15
- package/dist/types/plugins/filter/filter.types.d.ts +7 -7
- package/dist/types/plugins/groupingColumn/columnGroupsRenderer.d.ts +16 -13
- package/dist/types/plugins/groupingColumn/grouping.col.plugin.d.ts +10 -6
- package/dist/types/plugins/groupingColumn/headerGroupRenderer.d.ts +12 -10
- package/dist/types/plugins/groupingRow/grouping.const.d.ts +8 -7
- package/dist/types/plugins/groupingRow/grouping.row.expand.service.d.ts +6 -6
- package/dist/types/plugins/groupingRow/grouping.row.plugin.d.ts +32 -37
- package/dist/types/plugins/groupingRow/grouping.row.renderer.d.ts +7 -5
- package/dist/types/plugins/groupingRow/grouping.row.types.d.ts +23 -15
- package/dist/types/plugins/groupingRow/grouping.service.d.ts +18 -16
- package/dist/types/plugins/groupingRow/grouping.trimmed.service.d.ts +1 -1
- package/dist/types/plugins/moveColumn/column.drag.plugin.d.ts +56 -0
- package/dist/types/plugins/moveColumn/order-column.handler.d.ts +16 -0
- package/dist/types/plugins/sorting/sorting.plugin.d.ts +40 -27
- package/dist/types/plugins/sorting/sorting.sign.d.ts +3 -3
- package/dist/types/services/cell.helpers.d.ts +2 -2
- package/dist/types/services/column.data.provider.d.ts +33 -35
- package/dist/types/services/data.provider.d.ts +27 -21
- package/dist/types/services/dimension.provider.d.ts +52 -34
- package/dist/types/services/local.scroll.service.d.ts +37 -0
- package/dist/types/services/local.scroll.timer.d.ts +26 -0
- package/dist/types/services/resizable.directive.d.ts +52 -51
- package/dist/types/services/resizable.element.d.ts +4 -0
- package/dist/types/services/selection.store.connector.d.ts +54 -36
- package/dist/types/services/viewport.provider.d.ts +6 -8
- package/dist/types/stencil-public-runtime.d.ts +331 -217
- package/dist/types/store/dataSource/data.proxy.d.ts +3 -3
- package/dist/types/store/dataSource/data.store.d.ts +45 -46
- package/dist/types/store/dataSource/index.d.ts +3 -0
- package/dist/types/store/dataSource/trimmed.plugin.d.ts +10 -0
- package/dist/types/store/dimension/dimension.helpers.d.ts +24 -9
- package/dist/types/store/dimension/dimension.store.d.ts +29 -11
- package/dist/types/store/dimension/index.d.ts +2 -0
- package/dist/types/store/selection/index.d.ts +3 -0
- package/dist/types/store/selection/selection.helpers.d.ts +1 -3
- package/dist/types/store/selection/selection.store.d.ts +19 -17
- package/dist/types/store/selection/selection.store.service.d.ts +12 -13
- package/dist/types/store/storeTypes.d.ts +4 -4
- package/dist/types/store/viewport/index.d.ts +2 -0
- package/dist/types/store/viewport/viewport.helpers.d.ts +54 -0
- package/dist/types/store/viewport/viewport.store.d.ts +36 -0
- package/dist/types/themeManager/theme.compact.d.ts +3 -3
- package/dist/types/themeManager/theme.default.d.ts +3 -3
- package/dist/types/themeManager/theme.material.d.ts +3 -3
- package/dist/types/themeManager/theme.service.d.ts +13 -0
- package/dist/types/types/dimension.d.ts +8 -0
- package/dist/types/types/interfaces.d.ts +243 -0
- package/dist/types/types/plugin.d.ts +9 -0
- package/dist/types/types/plugin.types.d.ts +12 -0
- package/dist/types/types/selection.d.ts +115 -0
- package/dist/types/types/theme.d.ts +7 -0
- package/dist/types/types/viewport.interfaces.d.ts +51 -0
- package/dist/types/utils/browser.d.ts +1 -0
- package/dist/types/utils/consts.d.ts +5 -1
- package/dist/types/utils/events.d.ts +2 -0
- package/dist/types/utils/{utils.d.ts → index.d.ts} +17 -1
- package/dist/types/utils/key.codes.d.ts +70 -0
- package/dist/types/utils/{keyCodes.utils.d.ts → key.utils.d.ts} +5 -1
- package/dist/types/utils/mobile.d.ts +1 -0
- package/dist/types/utils/platform.d.ts +1 -1
- package/dist/types/utils/row-header-utils.d.ts +2 -0
- package/dist/types/utils/store.utils.d.ts +2 -2
- package/hydrate/index.d.ts +218 -0
- package/hydrate/index.js +32381 -0
- package/hydrate/package.json +6 -0
- package/loader/cdn.js +4 -3
- package/loader/index.cjs.js +4 -3
- package/loader/index.d.ts +10 -2
- package/loader/index.es2017.js +4 -3
- package/loader/index.js +4 -3
- package/package.json +96 -52
- package/readme.md +135 -98
- package/standalone/_baseIteratee.js +1237 -0
- package/standalone/_baseIteratee.js.map +1 -0
- package/standalone/_stringToPath.js +1389 -0
- package/standalone/_stringToPath.js.map +1 -0
- package/standalone/column.service.js +889 -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 +705 -0
- package/standalone/data.store.js.map +1 -0
- package/standalone/debounce.js +225 -0
- package/standalone/debounce.js.map +1 -0
- package/standalone/dimension.helpers.js +355 -0
- package/standalone/dimension.helpers.js.map +1 -0
- package/standalone/each.js +200 -0
- package/standalone/each.js.map +1 -0
- package/standalone/filter.button.js +38 -0
- package/standalone/filter.button.js.map +1 -0
- package/standalone/identity.js +349 -0
- package/standalone/identity.js.map +1 -0
- package/standalone/index.d.ts +66 -0
- package/standalone/index.js +42 -0
- package/standalone/index.js.map +1 -0
- package/standalone/index2.js +55 -0
- package/standalone/index2.js.map +1 -0
- package/standalone/isObjectLike.js +195 -0
- package/standalone/isObjectLike.js.map +1 -0
- package/standalone/local.scroll.timer.js +163 -0
- package/standalone/local.scroll.timer.js.map +1 -0
- package/{custom-element → standalone}/resize-observer.js +30 -14
- package/standalone/resize-observer.js.map +1 -0
- package/standalone/revo-grid.d.ts +11 -0
- package/standalone/revo-grid.js +4252 -0
- package/standalone/revo-grid.js.map +1 -0
- package/standalone/revogr-attribution.d.ts +11 -0
- package/standalone/revogr-attribution.js +11 -0
- package/standalone/revogr-attribution.js.map +1 -0
- package/standalone/revogr-attribution2.js +31 -0
- package/standalone/revogr-attribution2.js.map +1 -0
- package/standalone/revogr-clipboard.d.ts +11 -0
- package/standalone/revogr-clipboard.js +11 -0
- package/standalone/revogr-clipboard.js.map +1 -0
- package/standalone/revogr-clipboard2.js +159 -0
- package/standalone/revogr-clipboard2.js.map +1 -0
- package/standalone/revogr-data.d.ts +11 -0
- package/standalone/revogr-data.js +11 -0
- package/standalone/revogr-data.js.map +1 -0
- package/standalone/revogr-data2.js +368 -0
- package/standalone/revogr-data2.js.map +1 -0
- package/standalone/revogr-edit.d.ts +11 -0
- package/standalone/revogr-edit.js +11 -0
- package/standalone/revogr-edit.js.map +1 -0
- package/standalone/revogr-edit2.js +335 -0
- package/standalone/revogr-edit2.js.map +1 -0
- package/standalone/revogr-filter-panel.d.ts +11 -0
- package/standalone/revogr-filter-panel.js +310 -0
- package/standalone/revogr-filter-panel.js.map +1 -0
- package/standalone/revogr-focus.d.ts +11 -0
- package/standalone/revogr-focus.js +11 -0
- package/standalone/revogr-focus.js.map +1 -0
- package/standalone/revogr-focus2.js +106 -0
- package/standalone/revogr-focus2.js.map +1 -0
- package/standalone/revogr-header.d.ts +11 -0
- package/standalone/revogr-header.js +11 -0
- package/standalone/revogr-header.js.map +1 -0
- package/standalone/revogr-header2.js +667 -0
- package/standalone/revogr-header2.js.map +1 -0
- package/standalone/revogr-order-editor.d.ts +11 -0
- package/standalone/revogr-order-editor.js +11 -0
- package/standalone/revogr-order-editor.js.map +1 -0
- package/standalone/revogr-order-editor2.js +199 -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 +11 -0
- package/standalone/revogr-overlay-selection.js.map +1 -0
- package/standalone/revogr-overlay-selection2.js +876 -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 +11 -0
- package/standalone/revogr-row-headers.js.map +1 -0
- package/standalone/revogr-row-headers2.js +555 -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 +11 -0
- package/standalone/revogr-scroll-virtual.js.map +1 -0
- package/standalone/revogr-scroll-virtual2.js +187 -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 +11 -0
- package/standalone/revogr-temp-range.js.map +1 -0
- package/standalone/revogr-temp-range2.js +90 -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 +11 -0
- package/standalone/revogr-viewport-scroll.js.map +1 -0
- package/standalone/revogr-viewport-scroll2.js +336 -0
- package/standalone/revogr-viewport-scroll2.js.map +1 -0
- package/standalone/selection.utils.js +108 -0
- package/standalone/selection.utils.js.map +1 -0
- package/standalone/throttle.js +79 -0
- package/standalone/throttle.js.map +1 -0
- package/standalone/toNumber.js +144 -0
- package/standalone/toNumber.js.map +1 -0
- package/standalone/vnode-converter.js +45 -0
- package/standalone/vnode-converter.js.map +1 -0
- package/standalone/vnode-html.d.ts +11 -0
- package/standalone/vnode-html.js +11 -0
- package/standalone/vnode-html.js.map +1 -0
- package/custom-element/index.d.ts +0 -117
- package/custom-element/index.js +0 -28858
- package/dist/cjs/css-shim-e33df79c.js +0 -6
- package/dist/cjs/dom-c8b6d1a7.js +0 -75
- package/dist/cjs/filter.button-2396a488.js +0 -27
- package/dist/cjs/index-d3f67f2e.js +0 -1729
- package/dist/cjs/revo-grid_11.cjs.entry.js +0 -28622
- package/dist/cjs/revogr-clipboard.cjs.entry.js +0 -53
- package/dist/collection/components/button/button.js +0 -4
- package/dist/collection/components/data/cellRenderer.js +0 -19
- package/dist/collection/components/data/columnService.js +0 -243
- package/dist/collection/components/data/rowRenderer.js +0 -6
- package/dist/collection/components/header/headerCellRenderer.js +0 -19
- package/dist/collection/components/header/headerRenderer.js +0 -45
- package/dist/collection/components/order/orderRenderer.js +0 -50
- package/dist/collection/components/order/rowOrderService.js +0 -68
- package/dist/collection/components/overlay/clipboard.service.js +0 -39
- package/dist/collection/components/overlay/editors/edit.utils.js +0 -5
- package/dist/collection/components/overlay/editors/text.js +0 -35
- package/dist/collection/components/overlay/revogr-edit.js +0 -163
- package/dist/collection/components/revoGrid/viewport.interfaces.js +0 -1
- package/dist/collection/components/revoGrid/viewport.js +0 -18
- package/dist/collection/components/revoGrid/viewport.section.js +0 -28
- package/dist/collection/components/rowHeaders/row-header-utils.js +0 -4
- package/dist/collection/plugins/autoSizeColumn.d.ts +0 -54
- package/dist/collection/plugins/autoSizeColumn.js +0 -230
- package/dist/collection/plugins/basePlugin.d.ts +0 -37
- package/dist/collection/plugins/basePlugin.js +0 -53
- package/dist/collection/plugins/export/csv.d.ts +0 -9
- package/dist/collection/plugins/export/export.plugin.d.ts +0 -24
- package/dist/collection/plugins/export/types.d.ts +0 -23
- package/dist/collection/plugins/filter/conditions/equal.d.ts +0 -4
- package/dist/collection/plugins/filter/conditions/number/greaterThan.d.ts +0 -3
- package/dist/collection/plugins/filter/conditions/number/greaterThanOrEqual.d.ts +0 -3
- package/dist/collection/plugins/filter/conditions/number/lessThan.d.ts +0 -3
- package/dist/collection/plugins/filter/conditions/number/lessThanOrEqual.d.ts +0 -3
- package/dist/collection/plugins/filter/conditions/set.d.ts +0 -4
- package/dist/collection/plugins/filter/conditions/string/beginswith.d.ts +0 -3
- package/dist/collection/plugins/filter/conditions/string/contains.d.ts +0 -4
- package/dist/collection/plugins/filter/filter.button.d.ts +0 -10
- package/dist/collection/plugins/filter/filter.plugin.d.ts +0 -59
- package/dist/collection/plugins/filter/filter.pop.d.ts +0 -42
- package/dist/collection/plugins/filter/filter.service.d.ts +0 -20
- package/dist/collection/plugins/filter/filter.types.d.ts +0 -8
- package/dist/collection/plugins/groupingColumn/columnGroupsRenderer.d.ts +0 -16
- package/dist/collection/plugins/groupingColumn/grouping.col.plugin.d.ts +0 -13
- package/dist/collection/plugins/groupingColumn/headerGroupRenderer.d.ts +0 -14
- package/dist/collection/plugins/groupingRow/grouping.const.d.ts +0 -9
- package/dist/collection/plugins/groupingRow/grouping.row.expand.service.d.ts +0 -15
- package/dist/collection/plugins/groupingRow/grouping.row.plugin.d.ts +0 -40
- package/dist/collection/plugins/groupingRow/grouping.row.renderer.d.ts +0 -9
- package/dist/collection/plugins/groupingRow/grouping.row.types.d.ts +0 -19
- package/dist/collection/plugins/groupingRow/grouping.service.d.ts +0 -25
- package/dist/collection/plugins/groupingRow/grouping.trimmed.service.d.ts +0 -10
- package/dist/collection/plugins/sorting/sorting.plugin.d.ts +0 -32
- package/dist/collection/plugins/sorting/sorting.sign.d.ts +0 -8
- package/dist/collection/plugins/stretchPlugin.d.ts +0 -29
- package/dist/collection/plugins/stretchPlugin.js +0 -90
- package/dist/collection/plugins/trimmed/trimmed.plugin.d.ts +0 -10
- package/dist/collection/plugins/trimmed/trimmed.plugin.js +0 -32
- package/dist/collection/services/localScrollService.js +0 -80
- package/dist/collection/store/viewPort/viewport.helpers.js +0 -180
- package/dist/collection/store/viewPort/viewport.store.js +0 -121
- package/dist/collection/themeManager/themeService.js +0 -43
- package/dist/collection/utils/closestPolifill.js +0 -18
- package/dist/collection/utils/generateAlphabetHeader.js +0 -20
- package/dist/collection/utils/keyCodes.js +0 -70
- package/dist/collection/utils/keyCodes.utils.js +0 -64
- package/dist/collection/utils/resizeObserver.js +0 -6
- package/dist/collection/utils/utils.js +0 -104
- package/dist/esm/css-shim-8d75038b.js +0 -4
- package/dist/esm/dom-1b195079.js +0 -73
- package/dist/esm/filter.button-53ebca66.js +0 -23
- package/dist/esm/index-42c84e7c.js +0 -1694
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/revo-grid_11.entry.js +0 -28608
- package/dist/esm/revogr-clipboard.entry.js +0 -49
- package/dist/esm-es5/css-shim-8d75038b.js +0 -1
- package/dist/esm-es5/dom-1b195079.js +0 -21
- package/dist/esm-es5/filter.button-53ebca66.js +0 -1
- package/dist/esm-es5/index-42c84e7c.js +0 -1
- package/dist/esm-es5/loader.js +0 -1
- package/dist/esm-es5/resize-observer-56b7b34f.js +0 -1
- package/dist/esm-es5/revo-grid.js +0 -1
- package/dist/esm-es5/revo-grid_11.entry.js +0 -1
- package/dist/esm-es5/revogr-clipboard.entry.js +0 -1
- package/dist/esm-es5/revogr-filter-panel.entry.js +0 -1
- package/dist/revo-grid/css-shim-88bfb262.system.js +0 -1
- package/dist/revo-grid/css-shim-8d75038b.js +0 -1
- package/dist/revo-grid/dom-1b195079.js +0 -19
- package/dist/revo-grid/dom-ee2dd1b3.system.js +0 -21
- package/dist/revo-grid/filter.button-1509c206.js +0 -1
- package/dist/revo-grid/filter.button-4bd87101.system.js +0 -1
- package/dist/revo-grid/index-a15e7527.system.js +0 -1
- package/dist/revo-grid/index-a7f99799.js +0 -1
- package/dist/revo-grid/index.system.js +0 -1
- package/dist/revo-grid/plugins/autoSizeColumn.d.ts +0 -54
- package/dist/revo-grid/plugins/basePlugin.d.ts +0 -37
- package/dist/revo-grid/plugins/export/csv.d.ts +0 -9
- package/dist/revo-grid/plugins/export/export.plugin.d.ts +0 -24
- package/dist/revo-grid/plugins/export/types.d.ts +0 -23
- package/dist/revo-grid/plugins/filter/conditions/equal.d.ts +0 -4
- package/dist/revo-grid/plugins/filter/conditions/number/greaterThan.d.ts +0 -3
- package/dist/revo-grid/plugins/filter/conditions/number/greaterThanOrEqual.d.ts +0 -3
- package/dist/revo-grid/plugins/filter/conditions/number/lessThan.d.ts +0 -3
- package/dist/revo-grid/plugins/filter/conditions/number/lessThanOrEqual.d.ts +0 -3
- package/dist/revo-grid/plugins/filter/conditions/set.d.ts +0 -4
- package/dist/revo-grid/plugins/filter/conditions/string/beginswith.d.ts +0 -3
- package/dist/revo-grid/plugins/filter/conditions/string/contains.d.ts +0 -4
- package/dist/revo-grid/plugins/filter/filter.button.d.ts +0 -10
- package/dist/revo-grid/plugins/filter/filter.plugin.d.ts +0 -59
- package/dist/revo-grid/plugins/filter/filter.pop.d.ts +0 -42
- package/dist/revo-grid/plugins/filter/filter.service.d.ts +0 -20
- package/dist/revo-grid/plugins/filter/filter.types.d.ts +0 -8
- package/dist/revo-grid/plugins/groupingColumn/columnGroupsRenderer.d.ts +0 -16
- package/dist/revo-grid/plugins/groupingColumn/grouping.col.plugin.d.ts +0 -13
- package/dist/revo-grid/plugins/groupingColumn/headerGroupRenderer.d.ts +0 -14
- package/dist/revo-grid/plugins/groupingRow/grouping.const.d.ts +0 -9
- package/dist/revo-grid/plugins/groupingRow/grouping.row.expand.service.d.ts +0 -15
- package/dist/revo-grid/plugins/groupingRow/grouping.row.plugin.d.ts +0 -40
- package/dist/revo-grid/plugins/groupingRow/grouping.row.renderer.d.ts +0 -9
- package/dist/revo-grid/plugins/groupingRow/grouping.row.types.d.ts +0 -19
- package/dist/revo-grid/plugins/groupingRow/grouping.service.d.ts +0 -25
- package/dist/revo-grid/plugins/groupingRow/grouping.trimmed.service.d.ts +0 -10
- package/dist/revo-grid/plugins/sorting/sorting.plugin.d.ts +0 -32
- package/dist/revo-grid/plugins/sorting/sorting.sign.d.ts +0 -8
- package/dist/revo-grid/plugins/stretchPlugin.d.ts +0 -29
- package/dist/revo-grid/plugins/trimmed/trimmed.plugin.d.ts +0 -10
- package/dist/revo-grid/resize-observer-56b7b34f.js +0 -1
- package/dist/revo-grid/resize-observer-7a7b9757.system.js +0 -1
- package/dist/revo-grid/revo-grid.js +0 -132
- package/dist/revo-grid/revo-grid.system.js +0 -1
- package/dist/revo-grid/revo-grid_11.entry.js +0 -1
- package/dist/revo-grid/revo-grid_11.system.entry.js +0 -1
- package/dist/revo-grid/revogr-clipboard.entry.js +0 -1
- package/dist/revo-grid/revogr-clipboard.system.entry.js +0 -1
- package/dist/revo-grid/revogr-filter-panel.system.entry.js +0 -1
- package/dist/types/components/button/button.d.ts +0 -5
- package/dist/types/components/data/cellRenderer.d.ts +0 -8
- package/dist/types/components/data/columnService.d.ts +0 -42
- package/dist/types/components/header/headerCellRenderer.d.ts +0 -8
- package/dist/types/components/header/headerRenderer.d.ts +0 -15
- package/dist/types/components/order/orderRenderer.d.ts +0 -28
- package/dist/types/components/order/rowOrderService.d.ts +0 -27
- package/dist/types/components/overlay/clipboard.service.d.ts +0 -20
- package/dist/types/components/overlay/editors/text.d.ts +0 -13
- package/dist/types/components/overlay/revogr-edit.d.ts +0 -19
- package/dist/types/components/revoGrid/viewport.d.ts +0 -19
- package/dist/types/components/revoGrid/viewport.interfaces.d.ts +0 -66
- package/dist/types/components/revoGrid/viewport.section.d.ts +0 -24
- package/dist/types/components/rowHeaders/row-header-utils.d.ts +0 -2
- package/dist/types/interfaces.d.ts +0 -437
- package/dist/types/plugins/autoSizeColumn.d.ts +0 -54
- package/dist/types/plugins/basePlugin.d.ts +0 -37
- package/dist/types/plugins/stretchPlugin.d.ts +0 -29
- package/dist/types/plugins/trimmed/trimmed.plugin.d.ts +0 -10
- package/dist/types/services/localScrollService.d.ts +0 -28
- package/dist/types/store/viewPort/viewport.helpers.d.ts +0 -30
- package/dist/types/store/viewPort/viewport.store.d.ts +0 -18
- package/dist/types/themeManager/themeService.d.ts +0 -13
- package/dist/types/utils/closestPolifill.d.ts +0 -0
- package/dist/types/utils/keyCodes.d.ts +0 -68
- package/loader/package.json +0 -10
- /package/dist/types/components/{overlay/editors → editors}/edit.utils.d.ts +0 -0
- /package/dist/{esm-es5/index.js → types/utils/closest.polifill.d.ts} +0 -0
- /package/dist/types/utils/{generateAlphabetHeader.d.ts → header.utils.d.ts} +0 -0
- /package/dist/types/utils/{resizeObserver.d.ts → resize-observer.polifill.d.ts} +0 -0
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built by Revolist OU ❤️
|
|
3
|
+
*/
|
|
4
|
+
import { k as createStore, l as setStore } from './dimension.helpers-a3065cb1.js';
|
|
5
|
+
|
|
6
|
+
const EMPTY_INDEX = -1;
|
|
7
|
+
class SelectionStoreConnector {
|
|
8
|
+
constructor() {
|
|
9
|
+
// dirty flag required to cleanup whole store in case visibility of panels changed
|
|
10
|
+
this.dirty = false;
|
|
11
|
+
this.stores = {};
|
|
12
|
+
this.columnStores = {};
|
|
13
|
+
this.rowStores = {};
|
|
14
|
+
/**
|
|
15
|
+
* Helpers for data conversion
|
|
16
|
+
*/
|
|
17
|
+
this.storesByType = {};
|
|
18
|
+
this.storesXToType = {};
|
|
19
|
+
this.storesYToType = {};
|
|
20
|
+
this.sections = [];
|
|
21
|
+
}
|
|
22
|
+
get focusedStore() {
|
|
23
|
+
var _a;
|
|
24
|
+
for (let y in this.stores) {
|
|
25
|
+
for (let x in this.stores[y]) {
|
|
26
|
+
const focused = (_a = this.stores[y][x]) === null || _a === void 0 ? void 0 : _a.store.get('focus');
|
|
27
|
+
if (focused) {
|
|
28
|
+
return {
|
|
29
|
+
entity: this.stores[y][x],
|
|
30
|
+
cell: focused,
|
|
31
|
+
position: {
|
|
32
|
+
x: parseInt(x, 10),
|
|
33
|
+
y: parseInt(y, 10),
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
get edit() {
|
|
42
|
+
var _a;
|
|
43
|
+
return (_a = this.focusedStore) === null || _a === void 0 ? void 0 : _a.entity.store.get('edit');
|
|
44
|
+
}
|
|
45
|
+
get focused() {
|
|
46
|
+
var _a;
|
|
47
|
+
return (_a = this.focusedStore) === null || _a === void 0 ? void 0 : _a.entity.store.get('focus');
|
|
48
|
+
}
|
|
49
|
+
get selectedRange() {
|
|
50
|
+
var _a;
|
|
51
|
+
return (_a = this.focusedStore) === null || _a === void 0 ? void 0 : _a.entity.store.get('range');
|
|
52
|
+
}
|
|
53
|
+
registerSection(e) {
|
|
54
|
+
if (!e) {
|
|
55
|
+
this.sections.length = 0;
|
|
56
|
+
// some elements removed, rebuild stores
|
|
57
|
+
this.dirty = true;
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (this.sections.indexOf(e) === -1) {
|
|
61
|
+
this.sections.push(e);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
// check if require to cleanup all stores
|
|
65
|
+
beforeUpdate() {
|
|
66
|
+
if (this.dirty) {
|
|
67
|
+
for (let y in this.stores) {
|
|
68
|
+
for (let x in this.stores[y]) {
|
|
69
|
+
this.stores[y][x].dispose();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
this.dirty = false;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
registerColumn(x, type) {
|
|
76
|
+
// if hidden just create store but no operations needed
|
|
77
|
+
if (isHiddenStore(x)) {
|
|
78
|
+
return new SelectionStore();
|
|
79
|
+
}
|
|
80
|
+
if (this.columnStores[x]) {
|
|
81
|
+
return this.columnStores[x];
|
|
82
|
+
}
|
|
83
|
+
this.columnStores[x] = new SelectionStore();
|
|
84
|
+
// build cross linking type to position
|
|
85
|
+
this.storesByType[type] = x;
|
|
86
|
+
this.storesXToType[x] = type;
|
|
87
|
+
return this.columnStores[x];
|
|
88
|
+
}
|
|
89
|
+
registerRow(y, type) {
|
|
90
|
+
// if hidden just create store
|
|
91
|
+
if (isHiddenStore(y)) {
|
|
92
|
+
return new SelectionStore();
|
|
93
|
+
}
|
|
94
|
+
if (this.rowStores[y]) {
|
|
95
|
+
return this.rowStores[y];
|
|
96
|
+
}
|
|
97
|
+
this.rowStores[y] = new SelectionStore();
|
|
98
|
+
// build cross linking type to position
|
|
99
|
+
this.storesByType[type] = y;
|
|
100
|
+
this.storesYToType[y] = type;
|
|
101
|
+
return this.rowStores[y];
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Cross store proxy, based on multiple dimensions
|
|
105
|
+
*/
|
|
106
|
+
register({ x, y }) {
|
|
107
|
+
var _a, _b;
|
|
108
|
+
// if hidden just create store
|
|
109
|
+
if (isHiddenStore(x) || isHiddenStore(y)) {
|
|
110
|
+
return new SelectionStore();
|
|
111
|
+
}
|
|
112
|
+
if (!this.stores[y]) {
|
|
113
|
+
this.stores[y] = {};
|
|
114
|
+
}
|
|
115
|
+
if (this.stores[y][x]) {
|
|
116
|
+
// Store already registered. Do not register twice
|
|
117
|
+
return this.stores[y][x];
|
|
118
|
+
}
|
|
119
|
+
this.stores[y][x] = new SelectionStore();
|
|
120
|
+
// proxy update, column store trigger only range area
|
|
121
|
+
(_a = this.stores[y][x]) === null || _a === void 0 ? void 0 : _a.onChange('range', c => {
|
|
122
|
+
this.columnStores[x].setRangeArea(c);
|
|
123
|
+
this.rowStores[y].setRangeArea(c);
|
|
124
|
+
});
|
|
125
|
+
// clean up on remove
|
|
126
|
+
(_b = this.stores[y][x]) === null || _b === void 0 ? void 0 : _b.store.on('dispose', () => this.destroy(x, y));
|
|
127
|
+
return this.stores[y][x];
|
|
128
|
+
}
|
|
129
|
+
destroy(x, y) {
|
|
130
|
+
var _a, _b;
|
|
131
|
+
(_a = this.columnStores[x]) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
132
|
+
(_b = this.rowStores[y]) === null || _b === void 0 ? void 0 : _b.dispose();
|
|
133
|
+
delete this.rowStores[y];
|
|
134
|
+
delete this.columnStores[x];
|
|
135
|
+
// clear x cross link
|
|
136
|
+
if (this.storesXToType[x]) {
|
|
137
|
+
const type = this.storesXToType[x];
|
|
138
|
+
delete this.storesXToType[x];
|
|
139
|
+
delete this.storesByType[type];
|
|
140
|
+
}
|
|
141
|
+
// clear y cross link
|
|
142
|
+
if (this.storesYToType[y]) {
|
|
143
|
+
const type = this.storesYToType[y];
|
|
144
|
+
delete this.storesYToType[y];
|
|
145
|
+
delete this.storesByType[type];
|
|
146
|
+
}
|
|
147
|
+
if (this.stores[y]) {
|
|
148
|
+
delete this.stores[y][x];
|
|
149
|
+
}
|
|
150
|
+
// clear empty rows
|
|
151
|
+
if (!Object.keys(this.stores[y] || {}).length) {
|
|
152
|
+
delete this.stores[y];
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
setEditByCell(storePos, editCell) {
|
|
156
|
+
this.focusByCell(storePos, editCell, editCell);
|
|
157
|
+
this.setEdit('');
|
|
158
|
+
}
|
|
159
|
+
focusByCell(storePos, start, end) {
|
|
160
|
+
const store = this.stores[storePos.y][storePos.x];
|
|
161
|
+
this.focus(store, { focus: start, end });
|
|
162
|
+
}
|
|
163
|
+
focus(store, { focus, end }) {
|
|
164
|
+
let currentStorePointer;
|
|
165
|
+
// clear all stores focus leave only active one
|
|
166
|
+
for (let y in this.stores) {
|
|
167
|
+
for (let x in this.stores[y]) {
|
|
168
|
+
const s = this.stores[y][x];
|
|
169
|
+
// clear other stores, only one area can be selected
|
|
170
|
+
if (s !== store) {
|
|
171
|
+
s.clearFocus();
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
currentStorePointer = { x: parseInt(x, 10), y: parseInt(y, 10) };
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
if (!currentStorePointer) {
|
|
179
|
+
return null;
|
|
180
|
+
}
|
|
181
|
+
// check is focus in next store
|
|
182
|
+
const lastCell = store.store.get('lastCell');
|
|
183
|
+
// item in new store
|
|
184
|
+
const nextItem = nextCell(focus, lastCell);
|
|
185
|
+
let nextStore;
|
|
186
|
+
if (nextItem) {
|
|
187
|
+
for (let i in nextItem) {
|
|
188
|
+
let type = i;
|
|
189
|
+
let stores;
|
|
190
|
+
switch (type) {
|
|
191
|
+
case 'x':
|
|
192
|
+
stores = this.getXStores(currentStorePointer.y);
|
|
193
|
+
break;
|
|
194
|
+
case 'y':
|
|
195
|
+
stores = this.getYStores(currentStorePointer.x);
|
|
196
|
+
break;
|
|
197
|
+
}
|
|
198
|
+
if (nextItem[type] >= 0) {
|
|
199
|
+
nextStore = stores[++currentStorePointer[type]];
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
nextStore = stores[--currentStorePointer[type]];
|
|
203
|
+
const nextLastCell = nextStore === null || nextStore === void 0 ? void 0 : nextStore.store.get('lastCell');
|
|
204
|
+
if (nextLastCell) {
|
|
205
|
+
nextItem[type] = nextLastCell[type] + nextItem[type];
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
// if next store present - update
|
|
211
|
+
if (nextStore) {
|
|
212
|
+
let item = Object.assign(Object.assign({}, focus), nextItem);
|
|
213
|
+
this.focus(nextStore, { focus: item, end: item });
|
|
214
|
+
return null;
|
|
215
|
+
}
|
|
216
|
+
focus = cropCellToMax(focus, lastCell);
|
|
217
|
+
end = cropCellToMax(end, lastCell);
|
|
218
|
+
store.setFocus(focus, end);
|
|
219
|
+
return focus;
|
|
220
|
+
}
|
|
221
|
+
clearAll() {
|
|
222
|
+
var _a;
|
|
223
|
+
for (let y in this.stores) {
|
|
224
|
+
for (let x in this.stores[y]) {
|
|
225
|
+
(_a = this.stores[y][x]) === null || _a === void 0 ? void 0 : _a.clearFocus();
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
setEdit(val) {
|
|
230
|
+
if (!this.focusedStore) {
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
this.focusedStore.entity.setEdit(val);
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Select all cells across all stores
|
|
237
|
+
*/
|
|
238
|
+
selectAll() {
|
|
239
|
+
for (let y in this.stores) {
|
|
240
|
+
for (let x in this.stores[y]) {
|
|
241
|
+
const store = this.stores[y][x];
|
|
242
|
+
if (!store) {
|
|
243
|
+
continue;
|
|
244
|
+
}
|
|
245
|
+
const lastCell = store.store.get('lastCell');
|
|
246
|
+
store.setRange({ x: 0, y: 0 }, { x: lastCell.x - 1, y: lastCell.y - 1 });
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
getXStores(y) {
|
|
251
|
+
return this.stores[y];
|
|
252
|
+
}
|
|
253
|
+
getYStores(x) {
|
|
254
|
+
const stores = {};
|
|
255
|
+
for (let i in this.stores) {
|
|
256
|
+
stores[i] = this.stores[i][x];
|
|
257
|
+
}
|
|
258
|
+
return stores;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
function isHiddenStore(pos) {
|
|
263
|
+
return pos === EMPTY_INDEX;
|
|
264
|
+
}
|
|
265
|
+
function nextCell(cell, lastCell) {
|
|
266
|
+
const nextItem = {};
|
|
267
|
+
let types = ['x', 'y'];
|
|
268
|
+
// previous item check
|
|
269
|
+
for (let t of types) {
|
|
270
|
+
if (cell[t] < 0) {
|
|
271
|
+
nextItem[t] = cell[t];
|
|
272
|
+
return nextItem;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
// next item check
|
|
276
|
+
for (let t of types) {
|
|
277
|
+
if (cell[t] >= lastCell[t]) {
|
|
278
|
+
nextItem[t] = cell[t] - lastCell[t];
|
|
279
|
+
return nextItem;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
return null;
|
|
283
|
+
}
|
|
284
|
+
function cropCellToMax(cell, lastCell) {
|
|
285
|
+
const newCell = Object.assign({}, cell);
|
|
286
|
+
let types = ['x', 'y'];
|
|
287
|
+
// previous item check
|
|
288
|
+
for (let t of types) {
|
|
289
|
+
if (cell[t] < 0) {
|
|
290
|
+
newCell[t] = 0;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
// next item check
|
|
294
|
+
for (let t of types) {
|
|
295
|
+
if (cell[t] >= lastCell[t]) {
|
|
296
|
+
newCell[t] = lastCell[t] - 1;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
return newCell;
|
|
300
|
+
}
|
|
301
|
+
function getRange(start, end) {
|
|
302
|
+
return start && end
|
|
303
|
+
? {
|
|
304
|
+
x: Math.min(start.x, end.x),
|
|
305
|
+
y: Math.min(start.y, end.y),
|
|
306
|
+
x1: Math.max(start.x, end.x),
|
|
307
|
+
y1: Math.max(start.y, end.y),
|
|
308
|
+
}
|
|
309
|
+
: null;
|
|
310
|
+
}
|
|
311
|
+
function isRangeSingleCell(a) {
|
|
312
|
+
return a.x === a.x1 && a.y === a.y1;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Selection store
|
|
317
|
+
*/
|
|
318
|
+
function defaultState() {
|
|
319
|
+
return {
|
|
320
|
+
range: null,
|
|
321
|
+
tempRange: null,
|
|
322
|
+
tempRangeType: null,
|
|
323
|
+
focus: null,
|
|
324
|
+
edit: null,
|
|
325
|
+
lastCell: null,
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
class SelectionStore {
|
|
329
|
+
constructor() {
|
|
330
|
+
this.unsubscribe = [];
|
|
331
|
+
this.store = createStore(defaultState());
|
|
332
|
+
this.store.on('set', (key, newVal) => {
|
|
333
|
+
if (key === 'tempRange' && !newVal) {
|
|
334
|
+
this.store.set('tempRangeType', null);
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
onChange(propName, cb) {
|
|
339
|
+
this.unsubscribe.push(this.store.onChange(propName, cb));
|
|
340
|
+
}
|
|
341
|
+
clearFocus() {
|
|
342
|
+
setStore(this.store, { focus: null, range: null, edit: null, tempRange: null });
|
|
343
|
+
}
|
|
344
|
+
setFocus(focus, end) {
|
|
345
|
+
if (!end) {
|
|
346
|
+
setStore(this.store, { focus });
|
|
347
|
+
}
|
|
348
|
+
else {
|
|
349
|
+
setStore(this.store, {
|
|
350
|
+
focus,
|
|
351
|
+
range: getRange(focus, end),
|
|
352
|
+
edit: null,
|
|
353
|
+
tempRange: null,
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
setTempArea(range) {
|
|
358
|
+
setStore(this.store, { tempRange: range === null || range === void 0 ? void 0 : range.area, tempRangeType: range === null || range === void 0 ? void 0 : range.type, edit: null });
|
|
359
|
+
}
|
|
360
|
+
clearTemp() {
|
|
361
|
+
setStore(this.store, { tempRange: null });
|
|
362
|
+
}
|
|
363
|
+
/** Can be applied from selection change or from simple keyboard change clicks */
|
|
364
|
+
setRangeArea(range) {
|
|
365
|
+
setStore(this.store, { range, edit: null, tempRange: null });
|
|
366
|
+
}
|
|
367
|
+
setRange(start, end) {
|
|
368
|
+
this.setRangeArea(getRange(start, end));
|
|
369
|
+
}
|
|
370
|
+
setLastCell(lastCell) {
|
|
371
|
+
setStore(this.store, { lastCell });
|
|
372
|
+
}
|
|
373
|
+
setEdit(val) {
|
|
374
|
+
const focus = this.store.get('focus');
|
|
375
|
+
if (focus && typeof val === 'string') {
|
|
376
|
+
setStore(this.store, {
|
|
377
|
+
edit: { x: focus.x, y: focus.y, val },
|
|
378
|
+
});
|
|
379
|
+
return;
|
|
380
|
+
}
|
|
381
|
+
setStore(this.store, { edit: null });
|
|
382
|
+
}
|
|
383
|
+
dispose() {
|
|
384
|
+
this.unsubscribe.forEach(f => f());
|
|
385
|
+
this.store.dispose();
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
export { EMPTY_INDEX as E, SelectionStore as S, isRangeSingleCell as a, SelectionStoreConnector as b, cropCellToMax as c, getRange as g, isHiddenStore as i, nextCell as n };
|
|
390
|
+
|
|
391
|
+
//# sourceMappingURL=selection.store-2577ddf9.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"selection.store-2577ddf9.js","mappings":";;;;;MAca,WAAW,GAAG,CAAC,EAAE;MAET,uBAAuB;IAA5C;;QAEU,UAAK,GAAG,KAAK,CAAC;QACb,WAAM,GAAqD,EAAE,CAAC;QAE9D,iBAAY,GAAqB,EAAE,CAAC;QACpC,cAAS,GAAoC,EAAE,CAAC;;;;QAKhD,iBAAY,GAAgD,EAAE,CAAC;QAC/D,kBAAa,GAAiC,EAAE,CAAC;QACjD,kBAAa,GAAiC,EAAE,CAAC;QAiCzC,aAAQ,GAAc,EAAE,CAAC;KA+N3C;IA9PC,IAAI,YAAY;;QACd,KAAK,I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C,KAAK,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;KACpC;IAED,OAAO,CAAC,GAAqB;QAC3B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACtC,IAAI,KAAK,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;YACpC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE;gBACnB,IAAI,EAAE,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE;aACtC,CAAC,CAAC;YACH,OAAO;SACR;QACD,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;KACtC;IAED,OAAO;QACL,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACnC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;KACtB;;;;;","names":[],"sources":["src/services/selection.store.connector.ts","src/store/selection/selection.helpers.ts","src/store/selection/selection.store.ts"],"sourcesContent":["import { cropCellToMax, isHiddenStore, nextCell } from '../store/selection/selection.helpers';\nimport { SelectionStore } from '../store/selection/selection.store';\nimport { MultiDimensionType, DimensionCols, DimensionRows } from '..';\nimport { Cell, EditCellStore, RangeArea } from '..';\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 const EMPTY_INDEX = -1;\n\nexport default class SelectionStoreConnector {\n // dirty flag required to cleanup whole store in case visibility of panels changed\n private dirty = false;\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 | undefined {\n return this.focusedStore?.entity.store.get('edit');\n }\n\n get focused(): Cell | undefined {\n return this.focusedStore?.entity.store.get('focus');\n }\n\n get selectedRange(): RangeArea | undefined {\n return this.focusedStore?.entity.store.get('range');\n }\n\n private readonly sections: Element[] = [];\n\n registerSection(e?: Element) {\n if (!e) {\n this.sections.length = 0;\n // some elements removed, rebuild stores\n this.dirty = true;\n return;\n }\n if (this.sections.indexOf(e) === -1) {\n this.sections.push(e);\n }\n }\n\n // check if require to cleanup all stores\n beforeUpdate() {\n if (this.dirty) {\n for (let y in this.stores) {\n for (let x in this.stores[y]) {\n this.stores[y][x].dispose();\n }\n }\n this.dirty = false;\n }\n }\n\n registerColumn(x: number, type: DimensionCols): SelectionStore {\n\n // if hidden just create store but no operations needed\n if (isHiddenStore(x)) {\n return new SelectionStore();\n }\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 hidden just create store\n if (isHiddenStore(y)) {\n return new SelectionStore();\n }\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 hidden just create store\n if (isHiddenStore(x) || isHiddenStore(y)) {\n return new SelectionStore();\n }\n if (!this.stores[y]) {\n this.stores[y] = {};\n }\n if (this.stores[y][x]) {\n // Store already registered. Do not register twice\n return this.stores[y][x];\n }\n this.stores[y][x] = new SelectionStore();\n // proxy update, column store trigger only range area\n this.stores[y][x]?.onChange('range', c => {\n this.columnStores[x].setRangeArea(c);\n this.rowStores[y].setRangeArea(c);\n });\n // clean up on remove\n this.stores[y][x]?.store.on('dispose', () => this.destroy(x, y));\n return this.stores[y][x];\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 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 let currentStorePointer: Cell;\n // clear all stores focus leave only active one\n for (let y in this.stores) {\n for (let x in this.stores[y]) {\n const s = this.stores[y][x];\n // clear other stores, only one area can be selected\n if (s !== store) {\n s.clearFocus();\n } else {\n currentStorePointer = { x: parseInt(x, 10), y: parseInt(y, 10) };\n }\n }\n }\n if (!currentStorePointer) {\n return null;\n }\n\n // check is focus in next store\n const lastCell = store.store.get('lastCell');\n // item in new store\n const nextItem: Partial<Cell> | null = nextCell(focus, lastCell);\n\n let nextStore;\n if (nextItem) {\n for (let i in nextItem) {\n let type: keyof Cell = i as keyof Cell;\n let stores;\n switch (type) {\n case 'x':\n stores = this.getXStores(currentStorePointer.y);\n break;\n case 'y':\n stores = this.getYStores(currentStorePointer.x);\n break;\n }\n if (nextItem[type] >= 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] + nextItem[type];\n }\n }\n }\n }\n // if next store present - update\n if (nextStore) {\n let item = { ...focus, ...nextItem };\n this.focus(nextStore, { focus: item, end: item });\n return null;\n }\n\n focus = cropCellToMax(focus, lastCell);\n end = cropCellToMax(end, lastCell);\n\n store.setFocus(focus, end);\n return focus;\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 store.setRange({ x: 0, y: 0 }, { x: lastCell.x - 1, y: lastCell.y - 1 });\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","import { EMPTY_INDEX } from '../../services/selection.store.connector';\nimport { Cell, RangeArea } from '../..';\n\nexport function isHiddenStore(pos: number) {\n return pos === EMPTY_INDEX;\n}\n\nexport function nextCell(cell: Cell, lastCell: Cell): Partial<Cell> | null {\n const nextItem: Partial<Cell> = {};\n let types: (keyof Cell)[] = ['x', 'y'];\n\n // previous item check\n for (let t of types) {\n if (cell[t] < 0) {\n nextItem[t] = cell[t];\n return nextItem;\n }\n }\n // next item check\n for (let t of types) {\n if (cell[t] >= lastCell[t]) {\n nextItem[t] = cell[t] - lastCell[t];\n return nextItem;\n }\n }\n return null;\n}\n\nexport function cropCellToMax(cell: Cell, lastCell: Cell): Cell {\n const newCell: Cell = { ...cell };\n let types: (keyof Cell)[] = ['x', 'y'];\n // previous item check\n for (let t of types) {\n if (cell[t] < 0) {\n newCell[t] = 0;\n }\n }\n // next item check\n for (let t of types) {\n if (cell[t] >= lastCell[t]) {\n newCell[t] = lastCell[t] - 1;\n }\n }\n return newCell;\n}\n\nexport function getRange(start?: Cell, end?: Cell): RangeArea | null {\n return start && end\n ? {\n x: Math.min(start.x, end.x),\n y: Math.min(start.y, end.y),\n x1: Math.max(start.x, end.x),\n y1: Math.max(start.y, end.y),\n }\n : null;\n}\n\nexport function isRangeSingleCell(a: RangeArea): boolean {\n return a.x === a.x1 && a.y === a.y1;\n}\n","/**\n * Selection store\n */\n\nimport { createStore } from '@stencil/store';\nimport { setStore } from '../../utils/store.utils';\nimport { getRange } from './selection.helpers';\nimport { Observable } from '../..';\nimport { SelectionStoreState, Cell, TempRange, RangeArea } from '../..';\n\n\nfunction defaultState(): SelectionStoreState {\n return {\n range: null,\n tempRange: null,\n tempRangeType: null,\n focus: null,\n edit: null,\n lastCell: null,\n };\n}\n\nexport class SelectionStore {\n readonly store: Observable<SelectionStoreState>;\n private unsubscribe: { (): void }[] = [];\n constructor() {\n this.store = createStore(defaultState());\n this.store.on('set', (key, newVal) => {\n if (key === 'tempRange' && !newVal) {\n this.store.set('tempRangeType', null);\n }\n });\n }\n\n onChange<Key extends keyof SelectionStoreState>(propName: Key, cb: (newValue: SelectionStoreState[Key]) => void) {\n this.unsubscribe.push(this.store.onChange(propName, cb));\n }\n\n clearFocus() {\n setStore(this.store, { focus: null, range: null, edit: null, tempRange: null });\n }\n\n setFocus(focus: Cell, end?: Cell) {\n if (!end) {\n setStore(this.store, { focus });\n } else {\n setStore(this.store, {\n focus,\n range: getRange(focus, end),\n edit: null,\n tempRange: null,\n });\n }\n }\n\n setTempArea(range: TempRange | null) {\n setStore(this.store, { tempRange: range?.area, tempRangeType: range?.type, edit: null });\n }\n\n clearTemp() {\n setStore(this.store, { tempRange: null });\n }\n\n /** Can be applied from selection change or from simple keyboard change clicks */\n setRangeArea(range: RangeArea) {\n setStore(this.store, { range, edit: null, tempRange: null });\n }\n setRange(start: Cell, end: Cell) {\n this.setRangeArea(getRange(start, end));\n }\n\n setLastCell(lastCell: Cell) {\n setStore(this.store, { lastCell });\n }\n\n setEdit(val: string | boolean) {\n const focus = this.store.get('focus');\n if (focus && typeof val === 'string') {\n setStore(this.store, {\n edit: { x: focus.x, y: focus.y, val },\n });\n return;\n }\n setStore(this.store, { edit: null });\n }\n\n dispose() {\n this.unsubscribe.forEach(f => f());\n this.store.dispose();\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built by Revolist OU ❤️
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Base layer for plugins
|
|
6
|
+
* Provide minimal starting core for plugins to work
|
|
7
|
+
* Extend this class to create plugin
|
|
8
|
+
*/
|
|
9
|
+
class BasePlugin {
|
|
10
|
+
constructor(revogrid, providers) {
|
|
11
|
+
this.revogrid = revogrid;
|
|
12
|
+
this.providers = providers;
|
|
13
|
+
this.subscriptions = {};
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @param eventName - event name to subscribe to in revo-grid component (e.g. 'beforeheaderclick')
|
|
18
|
+
* @param callback - callback function for event
|
|
19
|
+
*/
|
|
20
|
+
addEventListener(eventName, callback) {
|
|
21
|
+
this.revogrid.addEventListener(eventName, callback);
|
|
22
|
+
this.subscriptions[eventName] = callback;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Subscribe to property change in revo-grid component
|
|
26
|
+
* You can return false in callback to prevent default value set
|
|
27
|
+
*
|
|
28
|
+
* @param prop - property name
|
|
29
|
+
* @param callback - callback function
|
|
30
|
+
* @param immediate - trigger callback immediately with current value
|
|
31
|
+
*/
|
|
32
|
+
watch(prop, callback, { immediate } = { immediate: false }) {
|
|
33
|
+
const nativeValueDesc = Object.getOwnPropertyDescriptor(this.revogrid, prop) ||
|
|
34
|
+
Object.getOwnPropertyDescriptor(this.revogrid.constructor.prototype, prop);
|
|
35
|
+
// Overwrite property descriptor for this instance
|
|
36
|
+
Object.defineProperty(this.revogrid, prop, {
|
|
37
|
+
set(val) {
|
|
38
|
+
var _a;
|
|
39
|
+
const keepDefault = callback(val);
|
|
40
|
+
if (keepDefault === false) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
// Continue with native behavior
|
|
44
|
+
return (_a = nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.set) === null || _a === void 0 ? void 0 : _a.call(this, val);
|
|
45
|
+
},
|
|
46
|
+
get() {
|
|
47
|
+
var _a;
|
|
48
|
+
// Continue with native behavior
|
|
49
|
+
return (_a = nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.get) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
if (immediate) {
|
|
53
|
+
callback(nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.value);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Remove event listener
|
|
58
|
+
* @param eventName
|
|
59
|
+
*/
|
|
60
|
+
removeEventListener(eventName) {
|
|
61
|
+
this.revogrid.removeEventListener(eventName, this.subscriptions[eventName]);
|
|
62
|
+
delete this.subscriptions[eventName];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Emit event from revo-grid component
|
|
66
|
+
* Event can be cancelled by calling event.preventDefault() in callback
|
|
67
|
+
*/
|
|
68
|
+
emit(eventName, detail) {
|
|
69
|
+
const event = new CustomEvent(eventName, { detail, cancelable: true });
|
|
70
|
+
this.revogrid.dispatchEvent(event);
|
|
71
|
+
return event;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Clear all subscriptions
|
|
75
|
+
*/
|
|
76
|
+
clearSubscriptions() {
|
|
77
|
+
for (let type in this.subscriptions) {
|
|
78
|
+
this.removeEventListener(type);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Destroy plugin and clear all subscriptions
|
|
83
|
+
*/
|
|
84
|
+
destroy() {
|
|
85
|
+
this.clearSubscriptions();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const rowTypes = ['rowPinStart', 'rgRow', 'rowPinEnd'];
|
|
90
|
+
const columnTypes = [
|
|
91
|
+
'colPinStart',
|
|
92
|
+
'rgCol',
|
|
93
|
+
'colPinEnd',
|
|
94
|
+
];
|
|
95
|
+
function isRowType(type) {
|
|
96
|
+
return rowTypes.indexOf(type) > -1;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export { BasePlugin as B, columnTypes as c, isRowType as i, rowTypes as r };
|
|
100
|
+
|
|
101
|
+
//# sourceMappingURL=storeTypes-f2647985.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"storeTypes-f2647985.js","mappings":";;;AAIA;;;;;MAKa,UAAU;IAErB,YAAsB,QAA6B,EAAY,SAA0B;QAAnE,aAAQ,GAAR,QAAQ,CAAqB;QAAY,cAAS,GAAT,SAAS,CAAiB;QADtE,kBAAa,GAA6C,EAAE,CAAC;KACa;;;;;;IAMnF,gBAAgB,CACxB,SAAiB,EACjB,QAAkC;QAElC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QACpD,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAC;KAC1C;;;;;;;;;IAUS,KAAK,CACb,IAAY,EACZ,QAAoC,EACpC,EAAE,SAAS,KAA2B,EAAE,SAAS,EAAE,KAAK,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AAK,IAAI,IAAI,IAAI,IAAI,CAAC,aAAa,EAAE;YACnC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;SAChC;KACF;;;;IAKD,OAAO;QACL,IAAI,CAAC,kBAAkB,EAAE,CAAC;KAC3B;;;MC7FU,QAAQ,GAAoB,CAAC,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE;MAClE,WAAW,GAAoB;IAC1C,aAAa;IACb,OAAO;IACP,WAAW;EACX;SAEc,SAAS,CAAC,IAAyB;IACjD,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACrC;;;;","names":[],"sources":["src/plugins/base.plugin.ts","src/store/storeTypes.ts"],"sourcesContent":["import { PluginProviders, PluginBaseComponent } from '..';\n\ntype WatchConfig = { immediate: boolean };\n\n/**\n * Base layer for plugins\n * Provide minimal starting core for plugins to work\n * Extend this class to create plugin\n */\nexport class BasePlugin implements PluginBaseComponent {\n protected readonly subscriptions: Record<string, (...args: any[]) => void> = {};\n constructor(protected revogrid: HTMLRevoGridElement, protected providers: PluginProviders) {}\n /**\n *\n * @param eventName - event name to subscribe to in revo-grid component (e.g. 'beforeheaderclick')\n * @param callback - callback function for event\n */\n protected addEventListener(\n eventName: string,\n callback: (e: CustomEvent) => void,\n ) {\n this.revogrid.addEventListener(eventName, callback);\n this.subscriptions[eventName] = callback;\n }\n\n /**\n * Subscribe to property change in revo-grid component\n * You can return false in callback to prevent default value set\n *\n * @param prop - property name\n * @param callback - callback function\n * @param immediate - trigger callback immediately with current value\n */\n protected watch<T extends any>(\n prop: string,\n callback: (arg: T) => boolean | void,\n { immediate }: Partial<WatchConfig> = { immediate: false },\n ) {\n const nativeValueDesc =\n Object.getOwnPropertyDescriptor(this.revogrid, prop) ||\n Object.getOwnPropertyDescriptor(this.revogrid.constructor.prototype, prop);\n\n // Overwrite property descriptor for this instance\n Object.defineProperty(this.revogrid, prop, {\n set(val: T) {\n const keepDefault = callback(val);\n if (keepDefault === false) {\n return;\n }\n // Continue with native behavior\n return nativeValueDesc?.set?.call(this, val);\n },\n get() {\n // Continue with native behavior\n return nativeValueDesc?.get?.call(this);\n },\n });\n if (immediate) {\n callback(nativeValueDesc?.value);\n }\n }\n\n /**\n * Remove event listener\n * @param eventName\n */\n protected removeEventListener(eventName: string) {\n this.revogrid.removeEventListener(eventName, this.subscriptions[eventName]);\n delete this.subscriptions[eventName];\n }\n\n /**\n * Emit event from revo-grid component\n * Event can be cancelled by calling event.preventDefault() in callback\n */\n protected emit(eventName: string, detail?: any) {\n const event = new CustomEvent(eventName, { detail, cancelable: true });\n this.revogrid.dispatchEvent(event);\n return event;\n }\n\n /**\n * Clear all subscriptions\n */\n protected clearSubscriptions() {\n for (let type in this.subscriptions) {\n this.removeEventListener(type);\n }\n }\n\n /**\n * Destroy plugin and clear all subscriptions\n */\n destroy() {\n this.clearSubscriptions();\n }\n}\n","import { DimensionCols, DimensionRows } from '..';\n\nexport const rowTypes: DimensionRows[] = ['rowPinStart', 'rgRow', 'rowPinEnd'];\nexport const columnTypes: DimensionCols[] = [\n 'colPinStart',\n 'rgCol',\n 'colPinEnd',\n];\n\nexport function isRowType(type: DimensionRows | any): type is DimensionRows {\n return rowTypes.indexOf(type) > -1;\n}\n"],"version":3}
|