@revolist/revogrid 4.0.2-next → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 -84
- 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/loader/cdn.js +4 -0
- package/dist/loader/index.cjs.js +4 -0
- package/{loader → dist/loader}/index.d.ts +11 -3
- package/dist/loader/index.es2017.js +4 -0
- package/dist/{esm/polyfills/es5-html-element.js → loader/index.js} +5 -1
- package/{loader → dist/loader}/package.json +1 -0
- 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 -32
- 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/package.json +94 -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 -28857
- 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 -28621
- 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/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/revo-grid_11.entry.js +0 -28607
- 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/cdn.js +0 -3
- package/loader/index.cjs.js +0 -3
- package/loader/index.es2017.js +0 -3
- package/loader/index.js +0 -4
- /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,1261 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built by Revolist OU ❤️
|
|
3
|
+
*/
|
|
4
|
+
import { r as registerInstance, h, H as Host, c as createEvent, a as getElement } from './index-21436631.js';
|
|
5
|
+
import { F as FOCUS_CLASS, E as EDIT_INPUT_WR, t as timeout, R as RESIZE_INTERVAL, a as CELL_HANDLER_CLASS, M as MOBILE_CLASS, S as SELECTION_BORDER_CLASS, b as ROW_HEADER_TYPE, g as getScrollbarSize, T as TMP_SELECTION_BG_CLASS } from './index-98fd0168.js';
|
|
6
|
+
import { i as getItemByPosition, j as getItemByIndex, b as getSourceItem, D as DataStore } from './dimension.helpers-a3065cb1.js';
|
|
7
|
+
import { n as ColumnService, H as HEADER_SLOT } from './column.service-21a3af74.js';
|
|
8
|
+
import { g as getRange, a as isRangeSingleCell } from './selection.store-2577ddf9.js';
|
|
9
|
+
import { c as codesLetter, i as isClear, a as isEnterKey, b as isCopy, d as isCut, e as isPaste, f as isAll, g as isLetterKey } from './key.utils-4586a3d6.js';
|
|
10
|
+
import { d as debounce_1 } from './debounce-7781346d.js';
|
|
11
|
+
import { g as getFromEvent, v as verifyTouchTarget, V as ViewportStore, c as calculateRowHeaderSize } from './events-3dd8ee7c.js';
|
|
12
|
+
import { L as LocalScrollTimer, a as LocalScrollService, g as getContentSize, t as throttle_1 } from './throttle-cfd527d6.js';
|
|
13
|
+
import './toNumber-8de324a7.js';
|
|
14
|
+
import './viewport.helpers-6591d423.js';
|
|
15
|
+
|
|
16
|
+
class SelectionStoreService {
|
|
17
|
+
constructor(store, config) {
|
|
18
|
+
this.store = store;
|
|
19
|
+
this.config = config;
|
|
20
|
+
this.store = store;
|
|
21
|
+
}
|
|
22
|
+
get edited() {
|
|
23
|
+
return this.store.get('edit');
|
|
24
|
+
}
|
|
25
|
+
get focused() {
|
|
26
|
+
return this.store.get('focus');
|
|
27
|
+
}
|
|
28
|
+
get ranged() {
|
|
29
|
+
return this.store.get('range');
|
|
30
|
+
}
|
|
31
|
+
changeRange(range) {
|
|
32
|
+
return this.config.changeRange(range);
|
|
33
|
+
}
|
|
34
|
+
focus(cell, isMulti = false) {
|
|
35
|
+
if (!cell) {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
let end = cell;
|
|
39
|
+
// range edit
|
|
40
|
+
if (isMulti) {
|
|
41
|
+
let start = this.store.get('focus');
|
|
42
|
+
if (start) {
|
|
43
|
+
return this.config.changeRange(getRange(start, end));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
// single focus
|
|
47
|
+
return this.config.focus(cell, end);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const Attribution = class {
|
|
52
|
+
constructor(hostRef) {
|
|
53
|
+
registerInstance(this, hostRef);
|
|
54
|
+
}
|
|
55
|
+
render() {
|
|
56
|
+
return (h(Host, { key: '3d66475a019010c24b6c610ccc047e01c35178f9' }, h("a", { key: 'c00afefb71e99baca51575da3cdb9ac8ea68d128', href: "https://revolist.github.io/revogrid", title: "Made with \u2764\uFE0F by Revolist OU Team", class: "value" }, "RevoGrid")));
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/** Calculate cell based on x, y position */
|
|
61
|
+
function getCurrentCell({ x, y }, { el, rows, cols }) {
|
|
62
|
+
const { top, left, height, width } = el.getBoundingClientRect();
|
|
63
|
+
let cellY = y - top;
|
|
64
|
+
// limit to element height
|
|
65
|
+
if (cellY >= height) {
|
|
66
|
+
cellY = height - 1;
|
|
67
|
+
}
|
|
68
|
+
let cellX = x - left;
|
|
69
|
+
// limit to element width
|
|
70
|
+
if (cellX >= width) {
|
|
71
|
+
cellX = width - 1;
|
|
72
|
+
}
|
|
73
|
+
const rgRow = getItemByPosition(rows, cellY);
|
|
74
|
+
const rgCol = getItemByPosition(cols, cellX);
|
|
75
|
+
// before first
|
|
76
|
+
if (rgCol.itemIndex < 0) {
|
|
77
|
+
rgCol.itemIndex = 0;
|
|
78
|
+
}
|
|
79
|
+
// before first
|
|
80
|
+
if (rgRow.itemIndex < 0) {
|
|
81
|
+
rgRow.itemIndex = 0;
|
|
82
|
+
}
|
|
83
|
+
return { x: rgCol.itemIndex, y: rgRow.itemIndex };
|
|
84
|
+
}
|
|
85
|
+
function getCoordinate(range, focus, changes, isMulti = false) {
|
|
86
|
+
const updateCoordinate = (c) => {
|
|
87
|
+
const start = { x: range.x, y: range.y };
|
|
88
|
+
const end = isMulti ? { x: range.x1, y: range.y1 } : start;
|
|
89
|
+
const point = end[c] > focus[c] ? end : start;
|
|
90
|
+
point[c] += changes[c];
|
|
91
|
+
return { start, end };
|
|
92
|
+
};
|
|
93
|
+
if (changes.x) {
|
|
94
|
+
return updateCoordinate('x');
|
|
95
|
+
}
|
|
96
|
+
if (changes.y) {
|
|
97
|
+
return updateCoordinate('y');
|
|
98
|
+
}
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
/** check if out of range */
|
|
102
|
+
function isAfterLast({ x, y }, { lastCell }) {
|
|
103
|
+
return x >= lastCell.x || y >= lastCell.y;
|
|
104
|
+
}
|
|
105
|
+
/** check if out of range */
|
|
106
|
+
function isBeforeFirst({ x, y }) {
|
|
107
|
+
return x < 0 || y < 0;
|
|
108
|
+
}
|
|
109
|
+
/** Compare cells, only 1 coordinate difference is possible */
|
|
110
|
+
// export function getDirectionCoordinate(initial: Cell, last: Cell): Partial<Cell> | null {
|
|
111
|
+
// const c: (keyof Cell)[] = ['x', 'y'];
|
|
112
|
+
// for (let k of c) {
|
|
113
|
+
// if (initial[k] !== last[k]) {
|
|
114
|
+
// return { [k]: 1 };
|
|
115
|
+
// }
|
|
116
|
+
// }
|
|
117
|
+
// return null;
|
|
118
|
+
// }
|
|
119
|
+
// export function getLargestAxis(initial: Cell, last: Cell): Partial<Cell> | null {
|
|
120
|
+
// const cell: Partial<Cell> = {};
|
|
121
|
+
// const c: (keyof Cell)[] = ['x', 'y'];
|
|
122
|
+
// for (let k of c) {
|
|
123
|
+
// cell[k] = Math.abs(initial[k] - last[k]);
|
|
124
|
+
// }
|
|
125
|
+
// if (cell.x > cell.y) {
|
|
126
|
+
// return { x: 1 };
|
|
127
|
+
// }
|
|
128
|
+
// if (cell.y > cell.x) {
|
|
129
|
+
// return { y: 1 };
|
|
130
|
+
// }
|
|
131
|
+
// return null;
|
|
132
|
+
// }
|
|
133
|
+
function styleByCellProps(styles) {
|
|
134
|
+
return {
|
|
135
|
+
left: `${styles.left}px`,
|
|
136
|
+
top: `${styles.top}px`,
|
|
137
|
+
width: `${styles.width}px`,
|
|
138
|
+
height: `${styles.height}px`,
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
function getCell({ x, y, x1, y1 }, dimensionRow, dimensionCol) {
|
|
142
|
+
const top = getItemByIndex(dimensionRow, y).start;
|
|
143
|
+
const left = getItemByIndex(dimensionCol, x).start;
|
|
144
|
+
const bottom = getItemByIndex(dimensionRow, y1).end;
|
|
145
|
+
const right = getItemByIndex(dimensionCol, x1).end;
|
|
146
|
+
return {
|
|
147
|
+
left,
|
|
148
|
+
right,
|
|
149
|
+
top,
|
|
150
|
+
bottom,
|
|
151
|
+
width: right - left,
|
|
152
|
+
height: bottom - top,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
function getElStyle(range, dimensionRow, dimensionCol) {
|
|
156
|
+
const styles = getCell(range, dimensionRow, dimensionCol);
|
|
157
|
+
return styleByCellProps(styles);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const revogrFocusStyleCss = ".revo-drag-icon{width:11px}.revo-drag-icon::before{content:\"::\"}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037;border:1px solid #00772d}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:1px solid #cedefa;line-height:32px;background:none;color:#000;box-shadow:none}revogr-focus.focused-cell{box-shadow:-1px 0 0 #0d63e8 inset, 1px 0 0 #0d63e8 inset, 0 -1px 0 #0d63e8 inset, 0 1px 0 #0d63e8 inset;position:absolute;pointer-events:none;z-index:9;display:block !important}";
|
|
161
|
+
const RevogrFocusStyle0 = revogrFocusStyleCss;
|
|
162
|
+
|
|
163
|
+
const RevogrFocus$1 = class {
|
|
164
|
+
constructor(hostRef) {
|
|
165
|
+
registerInstance(this, hostRef);
|
|
166
|
+
this.beforeFocusRender = createEvent(this, "beforefocusrender", 7);
|
|
167
|
+
this.beforeScrollIntoView = createEvent(this, "beforescrollintoview", 7);
|
|
168
|
+
this.afterFocus = createEvent(this, "afterfocus", 7);
|
|
169
|
+
this.activeFocus = null;
|
|
170
|
+
this.colType = undefined;
|
|
171
|
+
this.rowType = undefined;
|
|
172
|
+
this.selectionStore = undefined;
|
|
173
|
+
this.dimensionRow = undefined;
|
|
174
|
+
this.dimensionCol = undefined;
|
|
175
|
+
this.dataStore = undefined;
|
|
176
|
+
this.colData = undefined;
|
|
177
|
+
this.focusTemplate = null;
|
|
178
|
+
}
|
|
179
|
+
changed(e, focus) {
|
|
180
|
+
const beforeScrollIn = this.beforeScrollIntoView.emit({ el: e });
|
|
181
|
+
if (!beforeScrollIn.defaultPrevented) {
|
|
182
|
+
e.scrollIntoView({
|
|
183
|
+
block: 'nearest',
|
|
184
|
+
inline: 'nearest',
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
const model = getSourceItem(this.dataStore, focus.y);
|
|
188
|
+
const column = getSourceItem(this.colData, focus.x);
|
|
189
|
+
this.afterFocus.emit({
|
|
190
|
+
model,
|
|
191
|
+
column
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
componentDidRender() {
|
|
195
|
+
var _a, _b;
|
|
196
|
+
const currentFocus = this.selectionStore.get('focus');
|
|
197
|
+
if (((_a = this.activeFocus) === null || _a === void 0 ? void 0 : _a.x) === (currentFocus === null || currentFocus === void 0 ? void 0 : currentFocus.x) && ((_b = this.activeFocus) === null || _b === void 0 ? void 0 : _b.y) === (currentFocus === null || currentFocus === void 0 ? void 0 : currentFocus.y)) {
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
this.activeFocus = currentFocus;
|
|
201
|
+
if (currentFocus && this.el) {
|
|
202
|
+
this.changed(this.el, currentFocus);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
render() {
|
|
206
|
+
var _a;
|
|
207
|
+
const editCell = this.selectionStore.get('edit');
|
|
208
|
+
if (editCell) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
const focusCell = this.selectionStore.get('focus');
|
|
212
|
+
if (!focusCell) {
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
const event = this.beforeFocusRender.emit({
|
|
216
|
+
range: Object.assign(Object.assign({}, focusCell), { x1: focusCell.x, y1: focusCell.y }),
|
|
217
|
+
rowType: this.rowType,
|
|
218
|
+
colType: this.colType,
|
|
219
|
+
});
|
|
220
|
+
if (event.defaultPrevented) {
|
|
221
|
+
return h("slot", null);
|
|
222
|
+
}
|
|
223
|
+
const { detail } = event;
|
|
224
|
+
const style = getElStyle(detail.range, this.dimensionRow.state, this.dimensionCol.state);
|
|
225
|
+
const extra = (_a = this.focusTemplate) === null || _a === void 0 ? void 0 : _a.call(this, h, detail);
|
|
226
|
+
return (h(Host, { class: FOCUS_CLASS, style: style }, h("slot", null), extra));
|
|
227
|
+
}
|
|
228
|
+
get el() { return getElement(this); }
|
|
229
|
+
};
|
|
230
|
+
RevogrFocus$1.style = RevogrFocusStyle0;
|
|
231
|
+
|
|
232
|
+
// is edit input
|
|
233
|
+
function isEditInput(el) {
|
|
234
|
+
return !!(el === null || el === void 0 ? void 0 : el.closest(`.${EDIT_INPUT_WR}`));
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
const DIRECTION_CODES = [
|
|
238
|
+
codesLetter.TAB,
|
|
239
|
+
codesLetter.ARROW_UP,
|
|
240
|
+
codesLetter.ARROW_DOWN,
|
|
241
|
+
codesLetter.ARROW_LEFT,
|
|
242
|
+
codesLetter.ARROW_RIGHT,
|
|
243
|
+
];
|
|
244
|
+
class KeyboardService {
|
|
245
|
+
constructor(sv) {
|
|
246
|
+
this.sv = sv;
|
|
247
|
+
}
|
|
248
|
+
async keyDown(e, canRange) {
|
|
249
|
+
// IF EDIT MODE
|
|
250
|
+
if (this.sv.selectionStoreService.edited) {
|
|
251
|
+
switch (e.code) {
|
|
252
|
+
case codesLetter.ESCAPE:
|
|
253
|
+
this.sv.cancel();
|
|
254
|
+
break;
|
|
255
|
+
}
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
// IF NOT EDIT MODE
|
|
259
|
+
// pressed clear key
|
|
260
|
+
if (this.sv.selectionStoreService.ranged && isClear(e.code)) {
|
|
261
|
+
this.sv.clearCell();
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
// below works with focus only
|
|
265
|
+
if (!this.sv.selectionStoreService.focused) {
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
// tab key means same as arrow right
|
|
269
|
+
if (codesLetter.TAB === e.code) {
|
|
270
|
+
this.keyChangeSelection(e, canRange);
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
// pressed enter
|
|
274
|
+
if (isEnterKey(e.code)) {
|
|
275
|
+
this.sv.change();
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
// copy operation
|
|
279
|
+
if (isCopy(e)) {
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
// cut operation
|
|
283
|
+
if (isCut(e)) {
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
// paste operation
|
|
287
|
+
if (isPaste(e)) {
|
|
288
|
+
this.sv.internalPaste();
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
// select all
|
|
292
|
+
if (isAll(e)) {
|
|
293
|
+
if (canRange) {
|
|
294
|
+
this.selectAll(e);
|
|
295
|
+
}
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
// pressed letter key
|
|
299
|
+
if (isLetterKey(e.keyCode)) {
|
|
300
|
+
this.sv.change(e.key);
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
// pressed arrow, change selection position
|
|
304
|
+
if (await this.keyChangeSelection(e, canRange)) {
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
selectAll(e) {
|
|
309
|
+
const range = this.sv.selectionStore.get('range');
|
|
310
|
+
const focus = this.sv.selectionStore.get('focus');
|
|
311
|
+
// if no range or focus - do nothing
|
|
312
|
+
if (!range || !focus) {
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
e.preventDefault();
|
|
316
|
+
this.sv.selectAll();
|
|
317
|
+
}
|
|
318
|
+
async keyChangeSelection(e, canRange) {
|
|
319
|
+
const data = this.changeDirectionKey(e, canRange);
|
|
320
|
+
if (!data) {
|
|
321
|
+
return false;
|
|
322
|
+
}
|
|
323
|
+
// this interval needed for several cases
|
|
324
|
+
// grid could be resized before next click
|
|
325
|
+
// at this case to avoid screen jump we use this interval
|
|
326
|
+
await timeout(RESIZE_INTERVAL + 30);
|
|
327
|
+
const range = this.sv.selectionStore.get('range');
|
|
328
|
+
const focus = this.sv.selectionStore.get('focus');
|
|
329
|
+
return this.keyPositionChange(data.changes, range, focus, data.isMulti);
|
|
330
|
+
}
|
|
331
|
+
keyPositionChange(changes, range, focus, isMulti = false) {
|
|
332
|
+
if (!range || !focus) {
|
|
333
|
+
return false;
|
|
334
|
+
}
|
|
335
|
+
const data = getCoordinate(range, focus, changes, isMulti);
|
|
336
|
+
if (!data) {
|
|
337
|
+
return false;
|
|
338
|
+
}
|
|
339
|
+
if (isMulti) {
|
|
340
|
+
const eData = this.sv.getData();
|
|
341
|
+
if (isAfterLast(data.end, eData) || isBeforeFirst(data.start)) {
|
|
342
|
+
return false;
|
|
343
|
+
}
|
|
344
|
+
const range = getRange(data.start, data.end);
|
|
345
|
+
return this.sv.range(range);
|
|
346
|
+
}
|
|
347
|
+
return this.sv.focusNext(data.start, changes);
|
|
348
|
+
}
|
|
349
|
+
/** Monitor key direction changes */
|
|
350
|
+
changeDirectionKey(e, canRange) {
|
|
351
|
+
const isMulti = canRange && e.shiftKey;
|
|
352
|
+
if (DIRECTION_CODES.includes(e.code)) {
|
|
353
|
+
e.preventDefault();
|
|
354
|
+
}
|
|
355
|
+
switch (e.code) {
|
|
356
|
+
case codesLetter.ARROW_UP:
|
|
357
|
+
return { changes: { y: -1 }, isMulti };
|
|
358
|
+
case codesLetter.ARROW_DOWN:
|
|
359
|
+
return { changes: { y: 1 }, isMulti };
|
|
360
|
+
case codesLetter.ARROW_LEFT:
|
|
361
|
+
return { changes: { x: -1 }, isMulti };
|
|
362
|
+
case codesLetter.TAB:
|
|
363
|
+
case codesLetter.ARROW_RIGHT:
|
|
364
|
+
return { changes: { x: 1 }, isMulti };
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
class AutoFillService {
|
|
370
|
+
constructor(sv) {
|
|
371
|
+
this.sv = sv;
|
|
372
|
+
this.autoFillType = null;
|
|
373
|
+
this.autoFillInitial = null;
|
|
374
|
+
this.autoFillStart = null;
|
|
375
|
+
this.autoFillLast = null;
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Render autofill box
|
|
379
|
+
* @param range
|
|
380
|
+
* @param selectionFocus
|
|
381
|
+
*/
|
|
382
|
+
renderAutofill(range, selectionFocus) {
|
|
383
|
+
let handlerStyle;
|
|
384
|
+
if (range) {
|
|
385
|
+
handlerStyle = getCell(range, this.sv.dimensionRow.state, this.sv.dimensionCol.state);
|
|
386
|
+
}
|
|
387
|
+
else {
|
|
388
|
+
handlerStyle = getCell(Object.assign(Object.assign({}, selectionFocus), { x1: selectionFocus.x, y1: selectionFocus.y }), this.sv.dimensionRow.state, this.sv.dimensionCol.state);
|
|
389
|
+
}
|
|
390
|
+
return (h("div", { class: {
|
|
391
|
+
[CELL_HANDLER_CLASS]: true,
|
|
392
|
+
[MOBILE_CLASS]: true,
|
|
393
|
+
}, style: { left: `${handlerStyle.right}px`, top: `${handlerStyle.bottom}px` }, onMouseDown: (e) => this.autoFillHandler(e), onTouchStart: (e) => this.autoFillHandler(e) }));
|
|
394
|
+
}
|
|
395
|
+
autoFillHandler(e, type = "AutoFill" /* AutoFillType.autoFill */) {
|
|
396
|
+
let target = null;
|
|
397
|
+
if (e.target instanceof Element) {
|
|
398
|
+
target = e.target;
|
|
399
|
+
}
|
|
400
|
+
if (!target) {
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
this.selectionStart(target, this.sv.getData(), type);
|
|
404
|
+
e.preventDefault();
|
|
405
|
+
}
|
|
406
|
+
get isAutoFill() {
|
|
407
|
+
return !!this.autoFillType;
|
|
408
|
+
}
|
|
409
|
+
/** Process mouse move events */
|
|
410
|
+
selectionMouseMove(e) {
|
|
411
|
+
// initiate mouse move debounce if not present
|
|
412
|
+
if (!this.onMouseMoveAutofill) {
|
|
413
|
+
this.onMouseMoveAutofill = debounce_1((e, data) => this.doAutofillMouseMove(e, data), 5);
|
|
414
|
+
}
|
|
415
|
+
if (this.isAutoFill) {
|
|
416
|
+
this.onMouseMoveAutofill(e, this.sv.getData());
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
getFocus() {
|
|
420
|
+
let focus = this.sv.selectionStoreService.focused;
|
|
421
|
+
const range = this.sv.selectionStoreService.ranged;
|
|
422
|
+
// there was an issue that it was taking last cell from range but focus was out
|
|
423
|
+
if (!focus && range) {
|
|
424
|
+
focus = { x: range.x, y: range.y };
|
|
425
|
+
}
|
|
426
|
+
return focus || null;
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Autofill logic:
|
|
430
|
+
* on mouse move apply based on previous direction (if present)
|
|
431
|
+
*/
|
|
432
|
+
doAutofillMouseMove(event, data) {
|
|
433
|
+
// if no initial - not started
|
|
434
|
+
if (!this.autoFillInitial) {
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
437
|
+
const x = getFromEvent(event, 'clientX', MOBILE_CLASS);
|
|
438
|
+
const y = getFromEvent(event, 'clientY', MOBILE_CLASS);
|
|
439
|
+
// skip touch
|
|
440
|
+
if (x === null || y === null) {
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
443
|
+
const current = getCurrentCell({ x, y }, data);
|
|
444
|
+
// first time or direction equal to start(same as first time)
|
|
445
|
+
if (!this.autoFillLast) {
|
|
446
|
+
if (!this.autoFillLast) {
|
|
447
|
+
this.autoFillLast = this.autoFillStart;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
// check if not the latest, if latest - do nothing
|
|
451
|
+
if (isAfterLast(current, data)) {
|
|
452
|
+
return;
|
|
453
|
+
}
|
|
454
|
+
this.autoFillLast = current;
|
|
455
|
+
const isSame = current.x === this.autoFillInitial.x && current.y === this.autoFillInitial.y;
|
|
456
|
+
// if same as initial - clear
|
|
457
|
+
if (isSame) {
|
|
458
|
+
this.sv.setTempRange(null);
|
|
459
|
+
}
|
|
460
|
+
else {
|
|
461
|
+
this.sv.setTempRange({
|
|
462
|
+
area: getRange(this.autoFillInitial, this.autoFillLast),
|
|
463
|
+
type: this.autoFillType,
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* Range selection started
|
|
469
|
+
* Mode @param type:
|
|
470
|
+
* Can be triggered from MouseDown selection on element
|
|
471
|
+
* Or can be triggered on corner square drag
|
|
472
|
+
*/
|
|
473
|
+
selectionStart(target, data, type = "Selection" /* AutoFillType.selection */) {
|
|
474
|
+
/** Get cell by autofill element */
|
|
475
|
+
const { top, left } = target.getBoundingClientRect();
|
|
476
|
+
this.autoFillInitial = this.getFocus();
|
|
477
|
+
this.autoFillType = type;
|
|
478
|
+
this.autoFillStart = getCurrentCell({ x: left, y: top }, data);
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Clear current range selection
|
|
482
|
+
* on mouse up and mouse leave events
|
|
483
|
+
*/
|
|
484
|
+
clearAutoFillSelection() {
|
|
485
|
+
// Apply autofill values on mouse up if present
|
|
486
|
+
if (this.autoFillInitial) {
|
|
487
|
+
// Get latest
|
|
488
|
+
this.autoFillInitial = this.getFocus();
|
|
489
|
+
// Apply range data if present
|
|
490
|
+
if (this.autoFillType === "AutoFill" /* AutoFillType.autoFill */) {
|
|
491
|
+
const range = getRange(this.autoFillInitial, this.autoFillLast);
|
|
492
|
+
if (range) {
|
|
493
|
+
const { defaultPrevented: stopApply, detail: { range: newRange } } = this.sv.clearRangeDataApply({
|
|
494
|
+
range,
|
|
495
|
+
});
|
|
496
|
+
if (!stopApply) {
|
|
497
|
+
this.applyRangeWithData(newRange);
|
|
498
|
+
}
|
|
499
|
+
else {
|
|
500
|
+
// if prevented - clear temp range
|
|
501
|
+
this.sv.setTempRange(null);
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
else {
|
|
506
|
+
this.applyRangeOnly(this.autoFillInitial, this.autoFillLast);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
this.autoFillType = null;
|
|
510
|
+
this.autoFillInitial = null;
|
|
511
|
+
this.autoFillLast = null;
|
|
512
|
+
this.autoFillStart = null;
|
|
513
|
+
}
|
|
514
|
+
/** Trigger range apply events and handle responses */
|
|
515
|
+
onRangeApply(data, range) {
|
|
516
|
+
const models = {};
|
|
517
|
+
for (let rowIndex in data) {
|
|
518
|
+
models[rowIndex] = getSourceItem(this.sv.dataStore, parseInt(rowIndex, 10));
|
|
519
|
+
}
|
|
520
|
+
this.sv.rangeDataApply({
|
|
521
|
+
data,
|
|
522
|
+
models,
|
|
523
|
+
type: this.sv.dataStore.get('type'),
|
|
524
|
+
});
|
|
525
|
+
this.sv.setRange(range);
|
|
526
|
+
}
|
|
527
|
+
/** Apply range and copy data during range application */
|
|
528
|
+
applyRangeWithData(newRange) {
|
|
529
|
+
const oldRange = this.sv.selectionStoreService.ranged;
|
|
530
|
+
const rangeData = {
|
|
531
|
+
type: this.sv.dataStore.get('type'),
|
|
532
|
+
colType: this.sv.columnService.type,
|
|
533
|
+
newData: {},
|
|
534
|
+
mapping: {},
|
|
535
|
+
newRange,
|
|
536
|
+
oldRange,
|
|
537
|
+
};
|
|
538
|
+
const { mapping, changed } = this.sv.columnService.getRangeData(rangeData, this.sv.columnService.columns);
|
|
539
|
+
rangeData.newData = changed;
|
|
540
|
+
rangeData.mapping = mapping;
|
|
541
|
+
let e = this.sv.selectionChanged(rangeData);
|
|
542
|
+
// if default prevented - clear range
|
|
543
|
+
if (e.defaultPrevented) {
|
|
544
|
+
this.sv.setTempRange(null);
|
|
545
|
+
return;
|
|
546
|
+
}
|
|
547
|
+
e = this.sv.rangeCopy(rangeData);
|
|
548
|
+
if (e.defaultPrevented) {
|
|
549
|
+
this.sv.setRange(newRange);
|
|
550
|
+
return;
|
|
551
|
+
}
|
|
552
|
+
this.onRangeApply(rangeData.newData, newRange);
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* Update range selection only,
|
|
556
|
+
* no data change (mouse selection)
|
|
557
|
+
*/
|
|
558
|
+
applyRangeOnly(start, end) {
|
|
559
|
+
// no changes to apply
|
|
560
|
+
if (!start || !end) {
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
563
|
+
const newRange = getRange(start, end);
|
|
564
|
+
this.sv.setRange(newRange);
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
const revogrOverlayStyleCss = ".revo-drag-icon{width:11px}.revo-drag-icon::before{content:\"::\"}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037;border:1px solid #00772d}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:1px solid #cedefa;line-height:32px;background:none;color:#000;box-shadow:none}revogr-overlay-selection{display:block;position:relative;width:100%}revogr-overlay-selection .autofill-handle{position:absolute;width:14px;height:14px;margin-left:-13px;margin-top:-13px;z-index:10;cursor:crosshair}revogr-overlay-selection .autofill-handle::before{content:\"\";position:absolute;right:0;bottom:0;width:10px;height:10px;background:#0d63e8;border:1px solid white;box-sizing:border-box}revogr-overlay-selection.mobile .autofill-handle{position:absolute;width:30px;height:30px;margin-left:-29px;margin-top:-29px;z-index:10;cursor:crosshair}revogr-overlay-selection.mobile .autofill-handle::before{content:\"\";position:absolute;right:0;bottom:0;width:12px;height:12px;background:#0d63e8;border:1px solid white;box-sizing:border-box}revogr-overlay-selection .selection-border-range{position:absolute;pointer-events:none;z-index:9;box-shadow:-1px 0 0 #0d63e8 inset, 1px 0 0 #0d63e8 inset, 0 -1px 0 #0d63e8 inset, 0 1px 0 #0d63e8 inset}revogr-overlay-selection .selection-border-range .range-handlers{height:100%;background-color:transparent;width:75%;max-width:50px;min-width:20px;left:50%;transform:translateX(-50%);position:absolute}revogr-overlay-selection .selection-border-range .range-handlers>span{pointer-events:auto;height:20px;width:20px;position:absolute;left:50%;transform:translateX(-50%)}revogr-overlay-selection .selection-border-range .range-handlers>span:before,revogr-overlay-selection .selection-border-range .range-handlers>span:after{position:absolute;border-radius:5px;width:15px;height:5px;left:50%;transform:translateX(-50%);background-color:rgba(0, 0, 0, 0.2)}revogr-overlay-selection .selection-border-range .range-handlers>span:first-child{top:-7px}revogr-overlay-selection .selection-border-range .range-handlers>span:first-child:before{content:\"\";top:0}revogr-overlay-selection .selection-border-range .range-handlers>span:last-child{bottom:-7px}revogr-overlay-selection .selection-border-range .range-handlers>span:last-child:after{content:\"\";bottom:0}revogr-overlay-selection revogr-edit{z-index:10}";
|
|
569
|
+
const RevogrOverlaySelectionStyle0 = revogrOverlayStyleCss;
|
|
570
|
+
|
|
571
|
+
const OverlaySelection = class {
|
|
572
|
+
constructor(hostRef) {
|
|
573
|
+
registerInstance(this, hostRef);
|
|
574
|
+
this.beforeCopyRegion = createEvent(this, "beforecopyregion", 7);
|
|
575
|
+
this.beforeRegionPaste = createEvent(this, "beforepasteregion", 7);
|
|
576
|
+
this.cellEditApply = createEvent(this, "celleditapply", 7);
|
|
577
|
+
this.beforeFocusCell = createEvent(this, "beforecellfocusinit", 7);
|
|
578
|
+
this.setEdit = createEvent(this, "setedit", 7);
|
|
579
|
+
this.beforeApplyRange = createEvent(this, "beforeapplyrange", 7);
|
|
580
|
+
this.beforeSetRange = createEvent(this, "beforesetrange", 7);
|
|
581
|
+
this.beforeEditRender = createEvent(this, "beforeeditrender", 7);
|
|
582
|
+
this.setRange = createEvent(this, "setrange", 7);
|
|
583
|
+
this.selectAll = createEvent(this, "selectall", 7);
|
|
584
|
+
this.cancelEdit = createEvent(this, "canceledit", 7);
|
|
585
|
+
this.setTempRange = createEvent(this, "settemprange", 7);
|
|
586
|
+
this.applyFocus = createEvent(this, "applyfocus", 7);
|
|
587
|
+
this.focusCell = createEvent(this, "focuscell", 7);
|
|
588
|
+
this.beforeRangeDataApply = createEvent(this, "beforerangedataapply", 7);
|
|
589
|
+
this.selectionChange = createEvent(this, "selectionchangeinit", 7);
|
|
590
|
+
this.beforeRangeCopyApply = createEvent(this, "beforerangecopyapply", 7);
|
|
591
|
+
this.rangeEditApply = createEvent(this, "rangeeditapply", 7);
|
|
592
|
+
this.rangeClipboardCopy = createEvent(this, "clipboardrangecopy", 7);
|
|
593
|
+
this.rangeClipboardPaste = createEvent(this, "clipboardrangepaste", 7);
|
|
594
|
+
this.beforeKeyDown = createEvent(this, "beforekeydown", 7);
|
|
595
|
+
this.beforeKeyUp = createEvent(this, "beforekeyup", 7);
|
|
596
|
+
this.beforeCellSave = createEvent(this, "beforecellsave", 7);
|
|
597
|
+
this.keyboardService = null;
|
|
598
|
+
this.autoFillService = null;
|
|
599
|
+
this.revogrEdit = null;
|
|
600
|
+
this.readonly = undefined;
|
|
601
|
+
this.range = undefined;
|
|
602
|
+
this.canDrag = undefined;
|
|
603
|
+
this.useClipboard = undefined;
|
|
604
|
+
this.selectionStore = undefined;
|
|
605
|
+
this.dimensionRow = undefined;
|
|
606
|
+
this.dimensionCol = undefined;
|
|
607
|
+
this.dataStore = undefined;
|
|
608
|
+
this.colData = undefined;
|
|
609
|
+
this.lastCell = undefined;
|
|
610
|
+
this.editors = undefined;
|
|
611
|
+
this.applyChangesOnClose = false;
|
|
612
|
+
this.additionalData = undefined;
|
|
613
|
+
this.isMobileDevice = undefined;
|
|
614
|
+
}
|
|
615
|
+
// #endregion
|
|
616
|
+
// #region Listeners
|
|
617
|
+
onMouseMove(e) {
|
|
618
|
+
if (this.selectionStoreService.focused) {
|
|
619
|
+
this.autoFillService.selectionMouseMove(e);
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
/** Action finished inside of the document. */
|
|
623
|
+
/** Pointer left document, clear any active operation. */
|
|
624
|
+
onMouseUp() {
|
|
625
|
+
this.autoFillService.clearAutoFillSelection();
|
|
626
|
+
}
|
|
627
|
+
/** Row drag started. */
|
|
628
|
+
onCellDrag(e) {
|
|
629
|
+
var _a;
|
|
630
|
+
(_a = this.orderEditor) === null || _a === void 0 ? void 0 : _a.dragStart(e.detail);
|
|
631
|
+
}
|
|
632
|
+
/** Get keyboard down from element. */
|
|
633
|
+
onKeyUp(e) {
|
|
634
|
+
this.beforeKeyUp.emit(e);
|
|
635
|
+
}
|
|
636
|
+
/** Get keyboard down from element. */
|
|
637
|
+
onKeyDown(e) {
|
|
638
|
+
var _a;
|
|
639
|
+
const proxy = this.beforeKeyDown.emit(e);
|
|
640
|
+
if (e.defaultPrevented || proxy.defaultPrevented) {
|
|
641
|
+
return;
|
|
642
|
+
}
|
|
643
|
+
(_a = this.keyboardService) === null || _a === void 0 ? void 0 : _a.keyDown(e, this.range);
|
|
644
|
+
}
|
|
645
|
+
// #endregion
|
|
646
|
+
/** Selection & Keyboard */
|
|
647
|
+
selectionServiceSet(s) {
|
|
648
|
+
this.selectionStoreService = new SelectionStoreService(s, {
|
|
649
|
+
changeRange: range => this.triggerRangeEvent(range),
|
|
650
|
+
focus: (focus, end) => this.doFocus(focus, end),
|
|
651
|
+
});
|
|
652
|
+
this.keyboardService = new KeyboardService({
|
|
653
|
+
selectionStoreService: this.selectionStoreService,
|
|
654
|
+
selectionStore: s,
|
|
655
|
+
range: r => this.selectionStoreService.changeRange(r),
|
|
656
|
+
focusNext: (f, next) => this.doFocus(f, f, next),
|
|
657
|
+
change: val => {
|
|
658
|
+
if (this.readonly) {
|
|
659
|
+
return;
|
|
660
|
+
}
|
|
661
|
+
this.doEdit(val);
|
|
662
|
+
},
|
|
663
|
+
cancel: async () => {
|
|
664
|
+
await this.revogrEdit.cancelChanges();
|
|
665
|
+
this.closeEdit();
|
|
666
|
+
},
|
|
667
|
+
clearCell: () => !this.readonly && this.clearCell(),
|
|
668
|
+
internalPaste: () => !this.readonly && this.beforeRegionPaste.emit(),
|
|
669
|
+
getData: () => this.getData(),
|
|
670
|
+
selectAll: () => this.selectAll.emit(),
|
|
671
|
+
});
|
|
672
|
+
this.createAutoFillService();
|
|
673
|
+
}
|
|
674
|
+
/** Autofill */
|
|
675
|
+
createAutoFillService() {
|
|
676
|
+
this.autoFillService = new AutoFillService({
|
|
677
|
+
selectionStoreService: this.selectionStoreService,
|
|
678
|
+
dimensionRow: this.dimensionRow,
|
|
679
|
+
dimensionCol: this.dimensionCol,
|
|
680
|
+
columnService: this.columnService,
|
|
681
|
+
dataStore: this.dataStore,
|
|
682
|
+
clearRangeDataApply: e => this.beforeRangeDataApply.emit(Object.assign(Object.assign({}, e), this.types)),
|
|
683
|
+
setTempRange: e => this.setTempRange.emit(e),
|
|
684
|
+
selectionChanged: e => this.selectionChange.emit(e),
|
|
685
|
+
rangeCopy: e => this.beforeRangeCopyApply.emit(e),
|
|
686
|
+
rangeDataApply: e => this.rangeEditApply.emit(e),
|
|
687
|
+
setRange: e => this.triggerRangeEvent(e),
|
|
688
|
+
getData: () => this.getData(),
|
|
689
|
+
});
|
|
690
|
+
}
|
|
691
|
+
/** Columns */
|
|
692
|
+
columnServiceSet() {
|
|
693
|
+
var _a;
|
|
694
|
+
(_a = this.columnService) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
695
|
+
this.columnService = new ColumnService(this.dataStore, this.colData);
|
|
696
|
+
this.createAutoFillService();
|
|
697
|
+
}
|
|
698
|
+
connectedCallback() {
|
|
699
|
+
this.columnServiceSet();
|
|
700
|
+
this.selectionServiceSet(this.selectionStore);
|
|
701
|
+
}
|
|
702
|
+
disconnectedCallback() {
|
|
703
|
+
var _a;
|
|
704
|
+
(_a = this.columnService) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
705
|
+
}
|
|
706
|
+
async componentWillRender() {
|
|
707
|
+
var _a, _b;
|
|
708
|
+
const editCell = this.selectionStore.get('edit');
|
|
709
|
+
if (!editCell) {
|
|
710
|
+
await ((_b = (_a = this.revogrEdit) === null || _a === void 0 ? void 0 : _a.beforeDisconnect) === null || _b === void 0 ? void 0 : _b.call(_a));
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
renderRange(range) {
|
|
714
|
+
const style = getElStyle(range, this.dimensionRow.state, this.dimensionCol.state);
|
|
715
|
+
return [
|
|
716
|
+
h("div", { class: SELECTION_BORDER_CLASS, style: style }, this.isMobileDevice && (h("div", { class: "range-handlers" }, h("span", { class: MOBILE_CLASS }), h("span", { class: MOBILE_CLASS })))),
|
|
717
|
+
];
|
|
718
|
+
}
|
|
719
|
+
renderEditor() {
|
|
720
|
+
// Check if edit access
|
|
721
|
+
const editCell = this.selectionStore.get('edit');
|
|
722
|
+
// Readonly or Editor closed
|
|
723
|
+
if (this.readonly || !editCell) {
|
|
724
|
+
return null;
|
|
725
|
+
}
|
|
726
|
+
const val = editCell.val || this.columnService.getCellData(editCell.y, editCell.x);
|
|
727
|
+
const editable = Object.assign(Object.assign({}, editCell), this.columnService.getSaveData(editCell.y, editCell.x, val));
|
|
728
|
+
const renderEvent = this.beforeEditRender.emit(Object.assign({ range: Object.assign(Object.assign({}, editCell), { x1: editCell.x, y1: editCell.y }) }, this.types));
|
|
729
|
+
// Render prevented
|
|
730
|
+
if (renderEvent.defaultPrevented) {
|
|
731
|
+
return null;
|
|
732
|
+
}
|
|
733
|
+
const style = getElStyle(renderEvent.detail.range, this.dimensionRow.state, this.dimensionCol.state);
|
|
734
|
+
return (h("revogr-edit", { style: style, ref: el => (this.revogrEdit = el), additionalData: this.additionalData, editCell: editable, saveOnClose: this.applyChangesOnClose, column: this.columnService.columns[editCell.x], editor: this.columnService.getCellEditor(editCell.y, editCell.x, this.editors), onCloseedit: e => this.closeEdit(e), onCelledit: e => {
|
|
735
|
+
const saveEv = this.beforeCellSave.emit(e.detail);
|
|
736
|
+
if (!saveEv.defaultPrevented) {
|
|
737
|
+
this.cellEdit(saveEv.detail);
|
|
738
|
+
}
|
|
739
|
+
// if not clear navigate to next cell after edit
|
|
740
|
+
if (!saveEv.detail.preventFocus) {
|
|
741
|
+
this.focusNext();
|
|
742
|
+
}
|
|
743
|
+
} }));
|
|
744
|
+
}
|
|
745
|
+
render() {
|
|
746
|
+
const nodes = [];
|
|
747
|
+
const editCell = this.renderEditor();
|
|
748
|
+
// Editor
|
|
749
|
+
if (editCell) {
|
|
750
|
+
nodes.push(editCell);
|
|
751
|
+
}
|
|
752
|
+
else {
|
|
753
|
+
const range = this.selectionStoreService.ranged;
|
|
754
|
+
const selectionFocus = this.selectionStoreService.focused;
|
|
755
|
+
// Clipboard
|
|
756
|
+
if ((range || selectionFocus) && this.useClipboard) {
|
|
757
|
+
nodes.push(h("revogr-clipboard", { readonly: this.readonly, onCopyregion: e => this.onCopy(e.detail), onClearregion: () => !this.readonly && this.clearCell(), ref: e => (this.clipboard = e), onPasteregion: e => this.onPaste(e.detail) }));
|
|
758
|
+
}
|
|
759
|
+
// Range
|
|
760
|
+
if (range) {
|
|
761
|
+
nodes.push(...this.renderRange(range));
|
|
762
|
+
}
|
|
763
|
+
// Autofill
|
|
764
|
+
if (selectionFocus && !this.readonly && this.range) {
|
|
765
|
+
nodes.push(this.autoFillService.renderAutofill(range, selectionFocus));
|
|
766
|
+
}
|
|
767
|
+
// Order
|
|
768
|
+
if (this.canDrag) {
|
|
769
|
+
nodes.push(h("revogr-order-editor", { ref: e => (this.orderEditor = e), dataStore: this.dataStore, dimensionRow: this.dimensionRow, dimensionCol: this.dimensionCol, parent: this.element, onRowdragstartinit: e => this.rowDragStart(e) }));
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
return (h(Host, { key: '1bf980bd953bd6743607eeafeb7666a8d8fdf9df', class: { mobile: this.isMobileDevice },
|
|
773
|
+
// Open Editor on DblClick
|
|
774
|
+
onDblClick: (e) => {
|
|
775
|
+
// DblClick prevented outside - Editor will not open
|
|
776
|
+
if (!e.defaultPrevented) {
|
|
777
|
+
this.doEdit();
|
|
778
|
+
}
|
|
779
|
+
}, onMouseDown: (e) => this.onElementMouseDown(e), onTouchStart: (e) => this.onElementMouseDown(e, true) }, nodes, h("slot", { key: '53fb45eee4024c8ab29275c6dff3f708e011f007', name: "data" })));
|
|
780
|
+
}
|
|
781
|
+
doFocus(focus, end, next) {
|
|
782
|
+
const { defaultPrevented } = this.beforeFocusCell.emit(this.columnService.getSaveData(focus.y, focus.x));
|
|
783
|
+
if (defaultPrevented) {
|
|
784
|
+
return false;
|
|
785
|
+
}
|
|
786
|
+
const evData = Object.assign({ range: Object.assign(Object.assign({}, focus), { x1: end.x, y1: end.y }), next }, this.types);
|
|
787
|
+
const applyEvent = this.applyFocus.emit(evData);
|
|
788
|
+
if (applyEvent.defaultPrevented) {
|
|
789
|
+
return false;
|
|
790
|
+
}
|
|
791
|
+
const { range } = applyEvent.detail;
|
|
792
|
+
return !this.focusCell.emit(Object.assign({ focus: {
|
|
793
|
+
x: range.x,
|
|
794
|
+
y: range.y,
|
|
795
|
+
}, end: {
|
|
796
|
+
x: range.x1,
|
|
797
|
+
y: range.y1,
|
|
798
|
+
} }, applyEvent.detail)).defaultPrevented;
|
|
799
|
+
}
|
|
800
|
+
triggerRangeEvent(range) {
|
|
801
|
+
const type = this.types.rowType;
|
|
802
|
+
const applyEvent = this.beforeApplyRange.emit(Object.assign({ range: Object.assign({}, range) }, this.types));
|
|
803
|
+
if (applyEvent.defaultPrevented) {
|
|
804
|
+
return false;
|
|
805
|
+
}
|
|
806
|
+
const data = this.columnService.getRangeTransformedToProps(applyEvent.detail.range, this.dataStore);
|
|
807
|
+
let e = this.beforeSetRange.emit(data);
|
|
808
|
+
e = this.setRange.emit(Object.assign(Object.assign({}, applyEvent.detail.range), { type }));
|
|
809
|
+
if (e.defaultPrevented) {
|
|
810
|
+
return false;
|
|
811
|
+
}
|
|
812
|
+
return !e.defaultPrevented;
|
|
813
|
+
}
|
|
814
|
+
onElementMouseDown(e, touch = false) {
|
|
815
|
+
// Ignore focus if clicked input
|
|
816
|
+
if (isEditInput(e.target)) {
|
|
817
|
+
return;
|
|
818
|
+
}
|
|
819
|
+
const data = this.getData();
|
|
820
|
+
if (e.defaultPrevented) {
|
|
821
|
+
return;
|
|
822
|
+
}
|
|
823
|
+
const x = getFromEvent(e, 'clientX');
|
|
824
|
+
const y = getFromEvent(e, 'clientY');
|
|
825
|
+
// skip touch
|
|
826
|
+
if (x === null || y === null) {
|
|
827
|
+
return;
|
|
828
|
+
}
|
|
829
|
+
// Regular cell click
|
|
830
|
+
const focusCell = getCurrentCell({ x, y }, data);
|
|
831
|
+
this.selectionStoreService.focus(focusCell, this.range && e.shiftKey);
|
|
832
|
+
// Initiate autofill selection
|
|
833
|
+
if (this.range) {
|
|
834
|
+
this.autoFillService.selectionStart(e.target, data);
|
|
835
|
+
if (!touch) {
|
|
836
|
+
e.preventDefault();
|
|
837
|
+
}
|
|
838
|
+
else if (verifyTouchTarget(e.touches[0], MOBILE_CLASS)) {
|
|
839
|
+
e.preventDefault();
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
/**
|
|
844
|
+
* Start cell editing
|
|
845
|
+
*/
|
|
846
|
+
doEdit(val = '') {
|
|
847
|
+
var _a;
|
|
848
|
+
if (this.canEdit()) {
|
|
849
|
+
const editCell = this.selectionStore.get('focus');
|
|
850
|
+
const data = this.columnService.getSaveData(editCell.y, editCell.x);
|
|
851
|
+
(_a = this.setEdit) === null || _a === void 0 ? void 0 : _a.emit(Object.assign(Object.assign({}, data), { val }));
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
/**
|
|
855
|
+
* Close editor event triggered
|
|
856
|
+
* @param details - if requires focus next
|
|
857
|
+
*/
|
|
858
|
+
closeEdit(e) {
|
|
859
|
+
this.cancelEdit.emit();
|
|
860
|
+
if (e === null || e === void 0 ? void 0 : e.detail) {
|
|
861
|
+
this.focusNext();
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
/**
|
|
865
|
+
* Edit finished.
|
|
866
|
+
* Close Editor and save.
|
|
867
|
+
*/
|
|
868
|
+
cellEdit(e) {
|
|
869
|
+
const dataToSave = this.columnService.getSaveData(e.rgRow, e.rgCol, e.val);
|
|
870
|
+
this.cellEditApply.emit(dataToSave);
|
|
871
|
+
}
|
|
872
|
+
getRegion() {
|
|
873
|
+
const focus = this.selectionStoreService.focused;
|
|
874
|
+
let range = this.selectionStoreService.ranged;
|
|
875
|
+
if (!range) {
|
|
876
|
+
range = getRange(focus, focus);
|
|
877
|
+
}
|
|
878
|
+
return range;
|
|
879
|
+
}
|
|
880
|
+
onCopy(e) {
|
|
881
|
+
const range = this.getRegion();
|
|
882
|
+
const canCopyEvent = this.beforeCopyRegion.emit(range);
|
|
883
|
+
if (canCopyEvent.defaultPrevented) {
|
|
884
|
+
return false;
|
|
885
|
+
}
|
|
886
|
+
let rangeData;
|
|
887
|
+
if (range) {
|
|
888
|
+
const { data, mapping } = this.columnService.copyRangeArray(range, this.dataStore);
|
|
889
|
+
const event = this.rangeClipboardCopy.emit(Object.assign({ range,
|
|
890
|
+
data,
|
|
891
|
+
mapping }, this.types));
|
|
892
|
+
if (!event.defaultPrevented) {
|
|
893
|
+
rangeData = event.detail.data;
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
this.clipboard.doCopy(e, rangeData);
|
|
897
|
+
return true;
|
|
898
|
+
}
|
|
899
|
+
onPaste(data) {
|
|
900
|
+
const focus = this.selectionStoreService.focused;
|
|
901
|
+
const isEditing = this.selectionStoreService.edited !== null;
|
|
902
|
+
if (!focus || isEditing) {
|
|
903
|
+
return;
|
|
904
|
+
}
|
|
905
|
+
let { changed, range } = this.columnService.getTransformedDataToApply(focus, data);
|
|
906
|
+
const { defaultPrevented: canPaste } = this.rangeClipboardPaste.emit(Object.assign({ data: changed, range }, this.types));
|
|
907
|
+
if (canPaste) {
|
|
908
|
+
return;
|
|
909
|
+
}
|
|
910
|
+
this.autoFillService.onRangeApply(changed, range);
|
|
911
|
+
}
|
|
912
|
+
async focusNext() {
|
|
913
|
+
const canFocus = await this.keyboardService.keyChangeSelection(new KeyboardEvent('keydown', {
|
|
914
|
+
code: codesLetter.ARROW_DOWN,
|
|
915
|
+
}), this.range);
|
|
916
|
+
if (!canFocus) {
|
|
917
|
+
this.closeEdit();
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
clearCell() {
|
|
921
|
+
if (this.selectionStoreService.ranged &&
|
|
922
|
+
!isRangeSingleCell(this.selectionStoreService.ranged)) {
|
|
923
|
+
const data = this.columnService.getRangeStaticData(this.selectionStoreService.ranged, '');
|
|
924
|
+
this.autoFillService.onRangeApply(data, this.selectionStoreService.ranged);
|
|
925
|
+
}
|
|
926
|
+
else if (this.canEdit()) {
|
|
927
|
+
const focused = this.selectionStoreService.focused;
|
|
928
|
+
const cell = this.columnService.getSaveData(focused.y, focused.x);
|
|
929
|
+
this.cellEdit({
|
|
930
|
+
rgRow: focused.y,
|
|
931
|
+
rgCol: focused.x,
|
|
932
|
+
val: '',
|
|
933
|
+
type: cell.type,
|
|
934
|
+
prop: cell.prop,
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
rowDragStart({ detail }) {
|
|
939
|
+
detail.text = this.columnService.getCellData(detail.cell.y, detail.cell.x);
|
|
940
|
+
}
|
|
941
|
+
/**
|
|
942
|
+
* Verify if edit allowed.
|
|
943
|
+
*/
|
|
944
|
+
canEdit() {
|
|
945
|
+
var _a;
|
|
946
|
+
if (this.readonly) {
|
|
947
|
+
return false;
|
|
948
|
+
}
|
|
949
|
+
const editCell = this.selectionStoreService.focused;
|
|
950
|
+
return editCell && !((_a = this.columnService) === null || _a === void 0 ? void 0 : _a.isReadOnly(editCell.y, editCell.x));
|
|
951
|
+
}
|
|
952
|
+
get types() {
|
|
953
|
+
return {
|
|
954
|
+
rowType: this.dataStore.get('type'),
|
|
955
|
+
colType: this.columnService.type,
|
|
956
|
+
};
|
|
957
|
+
}
|
|
958
|
+
/**
|
|
959
|
+
* Collect data
|
|
960
|
+
*/
|
|
961
|
+
getData() {
|
|
962
|
+
return {
|
|
963
|
+
el: this.element,
|
|
964
|
+
rows: this.dimensionRow.state,
|
|
965
|
+
cols: this.dimensionCol.state,
|
|
966
|
+
lastCell: this.lastCell,
|
|
967
|
+
};
|
|
968
|
+
}
|
|
969
|
+
get element() { return getElement(this); }
|
|
970
|
+
static get watchers() { return {
|
|
971
|
+
"selectionStore": ["selectionServiceSet"],
|
|
972
|
+
"dimensionRow": ["createAutoFillService"],
|
|
973
|
+
"dimensionCol": ["createAutoFillService"],
|
|
974
|
+
"dataStore": ["columnServiceSet"],
|
|
975
|
+
"colData": ["columnServiceSet"]
|
|
976
|
+
}; }
|
|
977
|
+
};
|
|
978
|
+
OverlaySelection.style = RevogrOverlaySelectionStyle0;
|
|
979
|
+
|
|
980
|
+
const RowHeaderRender = s => (__, { rowIndex: i }) => s + i;
|
|
981
|
+
|
|
982
|
+
const RevogrRowHeaders = class {
|
|
983
|
+
constructor(hostRef) {
|
|
984
|
+
registerInstance(this, hostRef);
|
|
985
|
+
this.scrollViewport = createEvent(this, "scrollview", 3);
|
|
986
|
+
this.elementToScroll = createEvent(this, "ref", 3);
|
|
987
|
+
this.height = undefined;
|
|
988
|
+
this.dataPorts = undefined;
|
|
989
|
+
this.headerProp = undefined;
|
|
990
|
+
this.rowClass = undefined;
|
|
991
|
+
this.resize = undefined;
|
|
992
|
+
this.rowHeaderColumn = undefined;
|
|
993
|
+
this.additionalData = undefined;
|
|
994
|
+
this.jobsBeforeRender = [];
|
|
995
|
+
}
|
|
996
|
+
render() {
|
|
997
|
+
const dataViews = [];
|
|
998
|
+
const viewport = new ViewportStore('colPinStart');
|
|
999
|
+
/** render viewports rows */
|
|
1000
|
+
let totalLength = 1;
|
|
1001
|
+
// todo: this part could be optimized to avoid to often re-render dataPorts can be cached
|
|
1002
|
+
for (let data of this.dataPorts) {
|
|
1003
|
+
const itemCount = data.dataStore.get('items').length;
|
|
1004
|
+
// initiate row data
|
|
1005
|
+
const dataStore = new DataStore(data.type, Object.assign({}, data.dataStore.state));
|
|
1006
|
+
// initiate column data
|
|
1007
|
+
const colData = new DataStore('colPinStart');
|
|
1008
|
+
const column = Object.assign({ cellTemplate: RowHeaderRender(totalLength) }, this.rowHeaderColumn);
|
|
1009
|
+
colData.updateData([column]);
|
|
1010
|
+
dataViews.push(h("revogr-data", Object.assign({}, data, { colType: 'rowHeaders', jobsBeforeRender: this.jobsBeforeRender, rowClass: this.rowClass, dataStore: dataStore.store, colData: colData.store, viewportCol: viewport.store, readonly: true, range: false })));
|
|
1011
|
+
totalLength += itemCount;
|
|
1012
|
+
}
|
|
1013
|
+
const colSize = calculateRowHeaderSize(totalLength, this.rowHeaderColumn);
|
|
1014
|
+
viewport.setViewport({
|
|
1015
|
+
realCount: 1,
|
|
1016
|
+
virtualSize: 0,
|
|
1017
|
+
items: [
|
|
1018
|
+
{
|
|
1019
|
+
size: colSize,
|
|
1020
|
+
start: 0,
|
|
1021
|
+
end: colSize,
|
|
1022
|
+
itemIndex: 0,
|
|
1023
|
+
},
|
|
1024
|
+
],
|
|
1025
|
+
});
|
|
1026
|
+
const viewportScroll = {
|
|
1027
|
+
contentHeight: this.height,
|
|
1028
|
+
contentWidth: 0,
|
|
1029
|
+
style: { minWidth: `${colSize}px` },
|
|
1030
|
+
colType: 'rowHeaders',
|
|
1031
|
+
ref: (el) => this.elementToScroll.emit(el),
|
|
1032
|
+
onScrollviewport: (e) => this.scrollViewport.emit(e.detail),
|
|
1033
|
+
};
|
|
1034
|
+
const viewportHeader = Object.assign(Object.assign({}, this.headerProp), { colData: typeof this.rowHeaderColumn === 'object' ? [this.rowHeaderColumn] : [], viewportCol: viewport.store, canResize: false, type: ROW_HEADER_TYPE,
|
|
1035
|
+
// parent,
|
|
1036
|
+
slot: HEADER_SLOT });
|
|
1037
|
+
return (h(Host, { class: { [ROW_HEADER_TYPE]: true }, key: ROW_HEADER_TYPE }, h("revogr-viewport-scroll", Object.assign({ key: '53de708aa9a00a2ce363d8323b10d85aee070171' }, viewportScroll, { "row-header": true }), h("revogr-header", Object.assign({ key: '72e73ae122bb25f011422d3d044ccf7df613520c' }, viewportHeader)), dataViews)));
|
|
1038
|
+
}
|
|
1039
|
+
};
|
|
1040
|
+
|
|
1041
|
+
/**
|
|
1042
|
+
* Autohide scroll for MacOS when scroll is visible only for 1 sec
|
|
1043
|
+
*/
|
|
1044
|
+
class AutohideScrollPlugin {
|
|
1045
|
+
constructor(element) {
|
|
1046
|
+
this.element = element;
|
|
1047
|
+
this.autohideScrollTimeout = 0;
|
|
1048
|
+
}
|
|
1049
|
+
/**
|
|
1050
|
+
* When scroll size updates set it up for autohide
|
|
1051
|
+
*/
|
|
1052
|
+
setScrollSize(s) {
|
|
1053
|
+
if (!s) {
|
|
1054
|
+
this.element.setAttribute('autohide', 'true');
|
|
1055
|
+
}
|
|
1056
|
+
else {
|
|
1057
|
+
this.element.removeAttribute('autohide');
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
/**
|
|
1061
|
+
* On each scroll check if it's time to show
|
|
1062
|
+
*/
|
|
1063
|
+
checkScroll({ scrollSize, contentSize, virtualSize, }) {
|
|
1064
|
+
const hasScroll = contentSize > virtualSize;
|
|
1065
|
+
const isHidden = !scrollSize && hasScroll;
|
|
1066
|
+
if (isHidden) {
|
|
1067
|
+
this.element.setAttribute('visible', 'true');
|
|
1068
|
+
this.autohideScrollTimeout = this.show(this.element, this.autohideScrollTimeout);
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
show(element, timeout) {
|
|
1072
|
+
clearTimeout(timeout);
|
|
1073
|
+
return Number(setTimeout(() => {
|
|
1074
|
+
element.removeAttribute('visible');
|
|
1075
|
+
}, 1000));
|
|
1076
|
+
}
|
|
1077
|
+
clear() {
|
|
1078
|
+
clearTimeout(this.autohideScrollTimeout);
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
const revogrScrollStyleCss = ".revo-drag-icon{width:11px}.revo-drag-icon::before{content:\"::\"}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037;border:1px solid #00772d}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:1px solid #cedefa;line-height:32px;background:none;color:#000;box-shadow:none}revogr-scroll-virtual[autohide]{position:absolute;z-index:100 !important}revogr-scroll-virtual[autohide].vertical{top:0;right:0}revogr-scroll-virtual[autohide].vertical:hover,revogr-scroll-virtual[autohide].vertical[visible]{min-width:20px !important}revogr-scroll-virtual[autohide].horizontal{bottom:0;left:0}revogr-scroll-virtual[autohide].horizontal:hover,revogr-scroll-virtual[autohide].horizontal[visible]{min-height:20px !important}revogr-scroll-virtual.vertical{overflow-y:auto;overflow-x:hidden;height:100%}revogr-scroll-virtual.vertical>div{width:1px}revogr-scroll-virtual.horizontal{overflow-x:auto;overflow-y:hidden;width:100%}revogr-scroll-virtual.horizontal>div{height:1px}";
|
|
1083
|
+
const RevogrScrollVirtualStyle0 = revogrScrollStyleCss;
|
|
1084
|
+
|
|
1085
|
+
const RevogrScrollVirtual = class {
|
|
1086
|
+
constructor(hostRef) {
|
|
1087
|
+
registerInstance(this, hostRef);
|
|
1088
|
+
this.scrollVirtual = createEvent(this, "scrollvirtual", 7);
|
|
1089
|
+
this.scrollSize = 0;
|
|
1090
|
+
this.dimension = 'rgRow';
|
|
1091
|
+
this.viewportStore = undefined;
|
|
1092
|
+
this.dimensionStore = undefined;
|
|
1093
|
+
}
|
|
1094
|
+
async setScroll(e) {
|
|
1095
|
+
var _a;
|
|
1096
|
+
if (this.dimension !== e.dimension) {
|
|
1097
|
+
return;
|
|
1098
|
+
}
|
|
1099
|
+
this.localScrollTimer.latestScrollUpdate(e.dimension);
|
|
1100
|
+
(_a = this.localScrollService) === null || _a === void 0 ? void 0 : _a.setScroll(e);
|
|
1101
|
+
if (e.coordinate) {
|
|
1102
|
+
this.autohideScrollPlugin.checkScroll({
|
|
1103
|
+
scrollSize: this.scrollSize,
|
|
1104
|
+
contentSize: this.dimensionStore.get('realSize'),
|
|
1105
|
+
virtualSize: this.viewportStore.get('virtualSize'),
|
|
1106
|
+
});
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
/**
|
|
1110
|
+
* Update if `delta` exists in case we don't know current position or if it's external change
|
|
1111
|
+
*/
|
|
1112
|
+
async changeScroll(e) {
|
|
1113
|
+
if (e.delta) {
|
|
1114
|
+
switch (e.dimension) {
|
|
1115
|
+
case 'rgCol':
|
|
1116
|
+
e.coordinate = this.element.scrollLeft + e.delta;
|
|
1117
|
+
break;
|
|
1118
|
+
case 'rgRow':
|
|
1119
|
+
e.coordinate = this.element.scrollTop + e.delta;
|
|
1120
|
+
break;
|
|
1121
|
+
}
|
|
1122
|
+
this.setScroll(e);
|
|
1123
|
+
}
|
|
1124
|
+
return e;
|
|
1125
|
+
}
|
|
1126
|
+
set size(s) {
|
|
1127
|
+
this.autohideScrollPlugin.setScrollSize(s);
|
|
1128
|
+
if (this.dimension === 'rgRow') {
|
|
1129
|
+
this.element.style.minWidth = `${s}px`;
|
|
1130
|
+
return;
|
|
1131
|
+
}
|
|
1132
|
+
this.element.style.minHeight = `${s}px`;
|
|
1133
|
+
}
|
|
1134
|
+
get size() {
|
|
1135
|
+
if (this.dimension === 'rgRow') {
|
|
1136
|
+
return this.element.clientHeight;
|
|
1137
|
+
}
|
|
1138
|
+
return this.element.clientWidth;
|
|
1139
|
+
}
|
|
1140
|
+
connectedCallback() {
|
|
1141
|
+
this.autohideScrollPlugin = new AutohideScrollPlugin(this.element);
|
|
1142
|
+
this.localScrollTimer = new LocalScrollTimer('ontouchstart' in document.documentElement ? 0 : 10);
|
|
1143
|
+
this.localScrollService = new LocalScrollService({
|
|
1144
|
+
runScroll: e => this.scrollVirtual.emit(e),
|
|
1145
|
+
applyScroll: e => {
|
|
1146
|
+
this.localScrollTimer.setCoordinate(e);
|
|
1147
|
+
const type = e.dimension === 'rgRow' ? 'scrollTop' : 'scrollLeft';
|
|
1148
|
+
// this will trigger on scroll event
|
|
1149
|
+
this.element[type] = e.coordinate;
|
|
1150
|
+
},
|
|
1151
|
+
});
|
|
1152
|
+
}
|
|
1153
|
+
disconnectedCallback() {
|
|
1154
|
+
this.autohideScrollPlugin.clear();
|
|
1155
|
+
}
|
|
1156
|
+
componentWillLoad() {
|
|
1157
|
+
this.scrollSize = getScrollbarSize(document);
|
|
1158
|
+
}
|
|
1159
|
+
componentDidRender() {
|
|
1160
|
+
const type = this.dimension === 'rgRow' ? 'scrollHeight' : 'scrollWidth';
|
|
1161
|
+
if (this.element[type] > this.size) {
|
|
1162
|
+
this.size = this.scrollSize;
|
|
1163
|
+
}
|
|
1164
|
+
else {
|
|
1165
|
+
this.size = 0;
|
|
1166
|
+
}
|
|
1167
|
+
this.localScrollService.setParams({
|
|
1168
|
+
contentSize: this.dimensionStore.get('realSize'),
|
|
1169
|
+
clientSize: this.size,
|
|
1170
|
+
virtualSize: this.viewportStore.get('virtualSize'),
|
|
1171
|
+
}, this.dimension);
|
|
1172
|
+
}
|
|
1173
|
+
onScroll(e) {
|
|
1174
|
+
var _a;
|
|
1175
|
+
if (!(e.target instanceof Element)) {
|
|
1176
|
+
return;
|
|
1177
|
+
}
|
|
1178
|
+
const target = e.target;
|
|
1179
|
+
let type = 'scrollLeft';
|
|
1180
|
+
if (this.dimension === 'rgRow') {
|
|
1181
|
+
type = 'scrollTop';
|
|
1182
|
+
}
|
|
1183
|
+
// apply after throttling
|
|
1184
|
+
if (this.localScrollTimer.isReady(this.dimension, target[type] || 0)) {
|
|
1185
|
+
(_a = this.localScrollService) === null || _a === void 0 ? void 0 : _a.scroll(target[type] || 0, this.dimension);
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
render() {
|
|
1189
|
+
const sizeType = this.dimension === 'rgRow' ? 'height' : 'width';
|
|
1190
|
+
return (h(Host, { key: '648f7c565364722ee80475ca00ce44fb00c3a042', onScroll: (e) => this.onScroll(e) }, h("div", { key: '8aca236453e97e0f79d35946daa81c5be049fc26', style: {
|
|
1191
|
+
[sizeType]: `${getContentSize(this.dimensionStore.get('realSize'), this.size, this.viewportStore.get('virtualSize'))}px`,
|
|
1192
|
+
} })));
|
|
1193
|
+
}
|
|
1194
|
+
get element() { return getElement(this); }
|
|
1195
|
+
};
|
|
1196
|
+
RevogrScrollVirtual.style = RevogrScrollVirtualStyle0;
|
|
1197
|
+
|
|
1198
|
+
const revogrTempRangeStyleCss = ".revo-drag-icon{width:11px}.revo-drag-icon::before{content:\"::\"}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037;border:1px solid #00772d}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:1px solid #cedefa;line-height:32px;background:none;color:#000;box-shadow:none}.temp-bg-range{display:block !important;position:absolute;pointer-events:none;z-index:9;border:1px solid rgb(255, 94, 0);box-sizing:border-box}.temp-bg-range.Selection{border:1px dashed gray}.temp-bg-range>div{width:1px;height:1px;position:absolute}.temp-bg-range>div.top{top:-1px}.temp-bg-range>div.bottom{bottom:-1px}.temp-bg-range>div.left{left:-1px}.temp-bg-range>div.right{right:-1px}";
|
|
1199
|
+
const RevogrTempRangeStyle0 = revogrTempRangeStyleCss;
|
|
1200
|
+
|
|
1201
|
+
const RevogrFocus = class {
|
|
1202
|
+
constructor(hostRef) {
|
|
1203
|
+
registerInstance(this, hostRef);
|
|
1204
|
+
this.onChange = throttle_1((e) => this.doChange(e), 300);
|
|
1205
|
+
this.selectionStore = undefined;
|
|
1206
|
+
this.dimensionRow = undefined;
|
|
1207
|
+
this.dimensionCol = undefined;
|
|
1208
|
+
}
|
|
1209
|
+
doChange(e) {
|
|
1210
|
+
e === null || e === void 0 ? void 0 : e.scrollIntoView({
|
|
1211
|
+
block: 'nearest',
|
|
1212
|
+
inline: 'nearest',
|
|
1213
|
+
});
|
|
1214
|
+
}
|
|
1215
|
+
componentDidRender() {
|
|
1216
|
+
if (this.el) {
|
|
1217
|
+
this.onChange(this.el);
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
render() {
|
|
1221
|
+
const data = this.selectionStore.get('tempRange');
|
|
1222
|
+
const type = this.selectionStore.get('tempRangeType');
|
|
1223
|
+
if (!data) {
|
|
1224
|
+
return;
|
|
1225
|
+
}
|
|
1226
|
+
let directionY = 'bottom';
|
|
1227
|
+
let derectionX = 'right';
|
|
1228
|
+
const range = this.getRange();
|
|
1229
|
+
if (!range) {
|
|
1230
|
+
return;
|
|
1231
|
+
}
|
|
1232
|
+
if (data.y < range.y) {
|
|
1233
|
+
directionY = 'top';
|
|
1234
|
+
}
|
|
1235
|
+
if (data.x < range.x) {
|
|
1236
|
+
derectionX = 'left';
|
|
1237
|
+
}
|
|
1238
|
+
const directionClass = `${derectionX} ${directionY}`;
|
|
1239
|
+
const style = getElStyle(data, this.dimensionRow.state, this.dimensionCol.state);
|
|
1240
|
+
return (h(Host, { class: {
|
|
1241
|
+
[TMP_SELECTION_BG_CLASS]: true,
|
|
1242
|
+
[type || '']: true,
|
|
1243
|
+
}, style: style, hidden: false }, h("div", { class: directionClass, ref: (e) => (this.el = e) })));
|
|
1244
|
+
}
|
|
1245
|
+
getRange() {
|
|
1246
|
+
const range = this.selectionStore.get('range');
|
|
1247
|
+
if (range) {
|
|
1248
|
+
return range;
|
|
1249
|
+
}
|
|
1250
|
+
const focus = this.selectionStore.get('focus');
|
|
1251
|
+
if (!focus) {
|
|
1252
|
+
return null;
|
|
1253
|
+
}
|
|
1254
|
+
return Object.assign(Object.assign({}, focus), { x1: focus.x, y1: focus.y });
|
|
1255
|
+
}
|
|
1256
|
+
};
|
|
1257
|
+
RevogrFocus.style = RevogrTempRangeStyle0;
|
|
1258
|
+
|
|
1259
|
+
export { Attribution as revogr_attribution, RevogrFocus$1 as revogr_focus, OverlaySelection as revogr_overlay_selection, RevogrRowHeaders as revogr_row_headers, RevogrScrollVirtual as revogr_scroll_virtual, RevogrFocus as revogr_temp_range };
|
|
1260
|
+
|
|
1261
|
+
//# sourceMappingURL=revogr-attribution_6.entry.js.map
|