@revolist/revogrid 4.9.4 → 4.9.5

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.
Files changed (114) hide show
  1. package/dist/cjs/{column.service-01f4a6c7.js → column.service-08df359f.js} +3 -3
  2. package/dist/cjs/{column.service-01f4a6c7.js.map → column.service-08df359f.js.map} +1 -1
  3. package/dist/cjs/{base.plugin-bf5f43a0.js → column.utils-0f0f4dc4.js} +127 -2
  4. package/dist/cjs/column.utils-0f0f4dc4.js.map +1 -0
  5. package/dist/cjs/{dimension.helpers-a6788214.js → dimension.helpers-85294778.js} +1 -2
  6. package/dist/cjs/dimension.helpers-85294778.js.map +1 -0
  7. package/dist/cjs/{header-cell-renderer-3bc70679.js → header-cell-renderer-fb2f9a2d.js} +2 -2
  8. package/dist/cjs/{header-cell-renderer-3bc70679.js.map → header-cell-renderer-fb2f9a2d.js.map} +1 -1
  9. package/dist/cjs/index.cjs.js +15 -9
  10. package/dist/cjs/index.cjs.js.map +1 -1
  11. package/dist/cjs/revo-grid.cjs.entry.js +80 -250
  12. package/dist/cjs/revo-grid.cjs.entry.js.map +1 -1
  13. package/dist/cjs/revogr-attribution_6.cjs.entry.js +4 -4
  14. package/dist/cjs/revogr-clipboard_3.cjs.entry.js +3 -3
  15. package/dist/cjs/revogr-clipboard_3.cjs.entry.js.map +1 -1
  16. package/dist/cjs/revogr-data_4.cjs.entry.js +4 -4
  17. package/dist/cjs/{selection.helpers-1a8c8d49.js → selection.helpers-371a38aa.js} +2 -2
  18. package/dist/cjs/{selection.helpers-1a8c8d49.js.map → selection.helpers-371a38aa.js.map} +1 -1
  19. package/dist/cjs/{viewport.store-35a3e7ee.js → viewport.store-300977e4.js} +2 -2
  20. package/dist/cjs/{viewport.store-35a3e7ee.js.map → viewport.store-300977e4.js.map} +1 -1
  21. package/dist/collection/components/clipboard/revogr-clipboard.js +2 -2
  22. package/dist/collection/components/clipboard/revogr-clipboard.js.map +1 -1
  23. package/dist/collection/components/editors/revogr-edit.js +1 -1
  24. package/dist/collection/components/overlay/revogr-overlay-selection.js +1 -1
  25. package/dist/collection/components/revoGrid/revo-grid.js +12 -11
  26. package/dist/collection/components/revoGrid/revo-grid.js.map +1 -1
  27. package/dist/collection/index.js +1 -0
  28. package/dist/collection/index.js.map +1 -1
  29. package/dist/collection/plugins/base.plugin.js.map +1 -1
  30. package/dist/collection/plugins/column.auto-size.plugin.js +2 -2
  31. package/dist/collection/plugins/column.auto-size.plugin.js.map +1 -1
  32. package/dist/collection/plugins/column.stretch.plugin.js.map +1 -1
  33. package/dist/collection/plugins/groupingRow/grouping.row.plugin.js.map +1 -1
  34. package/dist/collection/plugins/moveColumn/column.drag.plugin.js +1 -1
  35. package/dist/collection/plugins/moveColumn/column.drag.plugin.js.map +1 -1
  36. package/dist/collection/plugins/sorting/sorting.plugin.js +2 -2
  37. package/dist/collection/plugins/sorting/sorting.plugin.js.map +1 -1
  38. package/dist/collection/services/column.data.provider.js +32 -88
  39. package/dist/collection/services/column.data.provider.js.map +1 -1
  40. package/dist/collection/services/dimension.provider.js +2 -2
  41. package/dist/collection/services/dimension.provider.js.map +1 -1
  42. package/dist/collection/types/interfaces.js.map +1 -1
  43. package/dist/collection/utils/column.utils.js +124 -0
  44. package/dist/collection/utils/column.utils.js.map +1 -0
  45. package/dist/esm/{column.service-5d14e7e9.js → column.service-cfc1149b.js} +3 -3
  46. package/dist/esm/{column.service-5d14e7e9.js.map → column.service-cfc1149b.js.map} +1 -1
  47. package/dist/esm/{base.plugin-5e7a3c51.js → column.utils-f6300fb5.js} +122 -3
  48. package/dist/esm/column.utils-f6300fb5.js.map +1 -0
  49. package/dist/esm/{dimension.helpers-56298828.js → dimension.helpers-938ea850.js} +2 -2
  50. package/dist/esm/dimension.helpers-938ea850.js.map +1 -0
  51. package/dist/esm/{header-cell-renderer-fc999784.js → header-cell-renderer-6f8eb067.js} +2 -2
  52. package/dist/esm/{header-cell-renderer-fc999784.js.map → header-cell-renderer-6f8eb067.js.map} +1 -1
  53. package/dist/esm/index.js +4 -4
  54. package/dist/esm/revo-grid.entry.js +49 -219
  55. package/dist/esm/revo-grid.entry.js.map +1 -1
  56. package/dist/esm/revogr-attribution_6.entry.js +4 -4
  57. package/dist/esm/revogr-clipboard_3.entry.js +3 -3
  58. package/dist/esm/revogr-clipboard_3.entry.js.map +1 -1
  59. package/dist/esm/revogr-data_4.entry.js +4 -4
  60. package/dist/esm/{selection.helpers-accaad4a.js → selection.helpers-a49a3d09.js} +2 -2
  61. package/dist/esm/{selection.helpers-accaad4a.js.map → selection.helpers-a49a3d09.js.map} +1 -1
  62. package/dist/esm/{viewport.store-d8e03528.js → viewport.store-a690096b.js} +2 -2
  63. package/dist/esm/{viewport.store-d8e03528.js.map → viewport.store-a690096b.js.map} +1 -1
  64. package/dist/revo-grid/{column.service-5d14e7e9.js → column.service-cfc1149b.js} +2 -2
  65. package/dist/revo-grid/column.utils-f6300fb5.js +5 -0
  66. package/dist/revo-grid/column.utils-f6300fb5.js.map +1 -0
  67. package/dist/revo-grid/{dimension.helpers-56298828.js → dimension.helpers-938ea850.js} +2 -2
  68. package/dist/revo-grid/{header-cell-renderer-fc999784.js → header-cell-renderer-6f8eb067.js} +2 -2
  69. package/dist/revo-grid/index.esm.js +1 -1
  70. package/dist/revo-grid/revo-grid.entry.js +1 -1
  71. package/dist/revo-grid/revo-grid.entry.js.map +1 -1
  72. package/dist/revo-grid/revogr-attribution_6.entry.js +1 -1
  73. package/dist/revo-grid/revogr-clipboard_3.entry.js +1 -1
  74. package/dist/revo-grid/revogr-clipboard_3.entry.js.map +1 -1
  75. package/dist/revo-grid/revogr-data_4.entry.js +1 -1
  76. package/dist/revo-grid/{selection.helpers-accaad4a.js → selection.helpers-a49a3d09.js} +2 -2
  77. package/dist/revo-grid/{viewport.store-d8e03528.js → viewport.store-a690096b.js} +2 -2
  78. package/dist/types/components/revoGrid/revo-grid.d.ts +2 -1
  79. package/dist/types/components.d.ts +2 -2
  80. package/dist/types/index.d.ts +1 -0
  81. package/dist/types/plugins/base.plugin.d.ts +1 -1
  82. package/dist/types/plugins/column.auto-size.plugin.d.ts +1 -2
  83. package/dist/types/plugins/column.stretch.plugin.d.ts +2 -4
  84. package/dist/types/services/column.data.provider.d.ts +2 -13
  85. package/dist/types/services/dimension.provider.d.ts +0 -1
  86. package/dist/types/types/interfaces.d.ts +11 -11
  87. package/dist/types/utils/column.utils.d.ts +46 -0
  88. package/hydrate/index.js +300 -351
  89. package/hydrate/index.mjs +300 -351
  90. package/package.json +1 -1
  91. package/standalone/column.service.js +1 -1
  92. package/standalone/data.store.js +1 -1
  93. package/standalone/data.store.js.map +1 -1
  94. package/standalone/dimension.helpers.js +1 -1
  95. package/standalone/index.js +1 -1
  96. package/standalone/revo-grid.js +165 -216
  97. package/standalone/revo-grid.js.map +1 -1
  98. package/standalone/revogr-clipboard2.js +2 -2
  99. package/standalone/revogr-clipboard2.js.map +1 -1
  100. package/standalone/revogr-header2.js +1 -1
  101. package/dist/cjs/base.plugin-bf5f43a0.js.map +0 -1
  102. package/dist/cjs/dimension.helpers-a6788214.js.map +0 -1
  103. package/dist/collection/plugins/groupingColumn/grouping.col.plugin.js +0 -43
  104. package/dist/collection/plugins/groupingColumn/grouping.col.plugin.js.map +0 -1
  105. package/dist/esm/base.plugin-5e7a3c51.js.map +0 -1
  106. package/dist/esm/dimension.helpers-56298828.js.map +0 -1
  107. package/dist/revo-grid/base.plugin-5e7a3c51.js +0 -5
  108. package/dist/revo-grid/base.plugin-5e7a3c51.js.map +0 -1
  109. package/dist/types/plugins/groupingColumn/grouping.col.plugin.d.ts +0 -17
  110. /package/dist/revo-grid/{column.service-5d14e7e9.js.map → column.service-cfc1149b.js.map} +0 -0
  111. /package/dist/revo-grid/{dimension.helpers-56298828.js.map → dimension.helpers-938ea850.js.map} +0 -0
  112. /package/dist/revo-grid/{header-cell-renderer-fc999784.js.map → header-cell-renderer-6f8eb067.js.map} +0 -0
  113. /package/dist/revo-grid/{selection.helpers-accaad4a.js.map → selection.helpers-a49a3d09.js.map} +0 -0
  114. /package/dist/revo-grid/{viewport.store-d8e03528.js.map → viewport.store-a690096b.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"revogr-clipboard.js","sourceRoot":"","sources":["../../../src/components/clipboard/revogr-clipboard.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,MAAM,EACN,MAAM,EACN,KAAK,EAEL,IAAI,GACL,MAAM,eAAe,CAAC;AAEvB;;GAEG;AAEH,MAAM,OAAO,SAAS;;;;IAkFqB,OAAO,CAAC,CAAiB;QAChE,yBAAyB;QACzB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO;QACT,CAAC;QACD,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACtC,MAAM,MAAM,GAAG,CAAC,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,KAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACtE,MAAM,IAAI,GAAG,CAAC,MAAM;YAClB,CAAC,CAAC,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,OAAO,CAAC,WAAW,CAAC;YACrC,CAAC,CAAC,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;QAC1C,MAAM,QAAQ,GAAG,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,OAAO,CAAC,MAAM,CAAC,KAAI,EAAE,CAAC;QAEtD,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;YACxC,GAAG,EAAE,IAAI;YACT,QAAQ;YACR,MAAM;YACN,KAAK,EAAE,CAAC;SACT,CAAC,CAAC;QAEH,IAAI,WAAW,CAAC,gBAAgB,EAAE,CAAC;YACjC,OAAO;QACT,CAAC;QAED,IAAI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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Listen,\n Method,\n Event,\n EventEmitter,\n Prop,\n} from '@stencil/core';\nimport { DataFormat } from '@type';\n/**\n * This Clipboard provides functionality for handling clipboard events in a web application.\n */\n@Component({ tag: 'revogr-clipboard' })\nexport class Clipboard {\n /**\n * If readonly mode - disabled Paste event\n */\n @Prop() readonly: boolean;\n\n /**\n * Paste 1. Fired before paste applied to the grid\n * defaultPrevented - if true, paste will be canceled\n */\n @Event({ eventName: 'beforepaste' }) beforePaste: EventEmitter<{\n raw: string;\n isHTML: boolean;\n event: ClipboardEvent;\n dataText: string;\n }>;\n\n /**\n * Paste 2. Fired before paste applied to the grid and after data parsed\n */\n @Event({ eventName: 'beforepasteapply' })\n beforePasteApply: EventEmitter<{\n raw: string;\n parsed: string[][];\n event: ClipboardEvent;\n }>;\n\n /**\n * Paste 3. Internal method. When data region is ready pass it to the top.\n * @property {string[][]} data - data to paste\n * @property {boolean} defaultPrevented - if true, paste will be canceled\n */\n @Event({ eventName: 'pasteregion', bubbles: false })\n pasteRegion: EventEmitter<string[][]>;\n\n /**\n * Paste 4. Fired after paste applied to the grid\n * defaultPrevented - if true, paste will be canceled\n */\n @Event({ eventName: 'afterpasteapply' }) afterPasteApply: EventEmitter<{\n raw: string;\n parsed: string[][];\n event: ClipboardEvent;\n }>;\n\n /**\n * Cut 1. Fired before cut triggered\n * defaultPrevented - if true, cut will be canceled\n */\n @Event({ eventName: 'beforecut' }) beforeCut: EventEmitter<{\n event: ClipboardEvent;\n }>;\n\n /**\n * Cut 2. Clears region when cut is done\n */\n @Event({ eventName: 'clearregion' }) clearRegion: EventEmitter<DataTransfer>;\n\n /**\n * Copy 1. Fired before copy triggered\n * defaultPrevented - if true, copy will be canceled\n */\n @Event({ eventName: 'beforecopy' }) beforeCopy: EventEmitter<{\n event: ClipboardEvent;\n }>;\n\n /**\n * Copy Method 1. Fired before copy applied to the clipboard from outside.\n * defaultPrevented - if true, copy will be canceled\n */\n @Event({ eventName: 'beforecopyapply' }) beforeCopyApply: EventEmitter<{\n event: DataTransfer;\n data?: string[][];\n }>;\n\n /**\n * Copy 2. Fired when region copied\n * defaultPrevented - if true, copy will be canceled\n */\n @Event({ eventName: 'copyregion', bubbles: false })\n copyRegion: EventEmitter<DataTransfer>;\n\n @Listen('paste', { target: 'document' }) onPaste(e: ClipboardEvent) {\n // if readonly do nothing\n if (this.readonly) {\n return;\n }\n const clipboardData = this.getData(e);\n const isHTML = (clipboardData?.types.indexOf('text/html') || -1) > -1;\n const data = (isHTML\n ? clipboardData?.getData('text/html')\n : clipboardData?.getData('text')) || '';\n const dataText = clipboardData?.getData('text') || '';\n\n const beforePaste = this.beforePaste.emit({\n raw: data,\n dataText,\n isHTML,\n event: e,\n });\n\n if (beforePaste.defaultPrevented) {\n return;\n }\n\n let parsedData: string[][];\n // if html, then search for table if no table fallback to regular text parsing\n if (beforePaste.detail.isHTML) {\n const table = this.htmlParse(beforePaste.detail.raw);\n // fallback to text if not possible to parse as html\n parsedData = table || this.textParse(dataText || '');\n } else {\n parsedData = this.textParse(beforePaste.detail.raw);\n }\n const beforePasteApply = this.beforePasteApply.emit({\n raw: data,\n parsed: parsedData,\n event: e,\n });\n if (beforePasteApply.defaultPrevented) {\n return;\n }\n this.pasteRegion.emit(beforePasteApply.detail.parsed);\n // post paste action\n const afterPasteApply = this.afterPasteApply.emit({\n raw: data,\n parsed: parsedData,\n event: e,\n });\n // keep default behavior if needed\n if (afterPasteApply.defaultPrevented) {\n return;\n }\n e.preventDefault();\n }\n\n /**\n * Listen to copy event and emit copy region event\n */\n @Listen('copy', { target: 'document' }) copyStarted(e: ClipboardEvent) {\n const beforeCopy = this.beforeCopy.emit({\n event: e,\n });\n if (beforeCopy.defaultPrevented) {\n return;\n }\n const data = this.getData(beforeCopy.detail.event);\n this.copyRegion.emit(data || undefined);\n e.preventDefault();\n }\n\n /**\n * Listen to copy event and emit copy region event\n */\n @Listen('cut', { target: 'document' }) cutStarted(e: ClipboardEvent) {\n const beforeCut = this.beforeCut.emit({\n event: e,\n });\n if (beforeCut.defaultPrevented) {\n return;\n }\n const data = this.getData(beforeCut.detail.event);\n this.copyStarted(e);\n\n // if readonly do nothing\n if (this.readonly) {\n return;\n }\n\n this.clearRegion.emit(data || undefined);\n e.preventDefault();\n }\n\n @Method() async doCopy(e: DataTransfer, data?: DataFormat[][]) {\n const beforeCopyApply = this.beforeCopyApply.emit({\n event: e,\n data,\n });\n if (beforeCopyApply.defaultPrevented) {\n return;\n }\n const parsed = data ? this.parserCopy(data) : '';\n e.setData('text/plain', parsed);\n }\n\n parserCopy(data: DataFormat[][]) {\n return data.map(rgRow => rgRow.join('\\t')).join('\\n');\n }\n\n private textParse(data: string) {\n const result: string[][] = [];\n const rows = data.split(/\\r\\n|\\n|\\r/);\n for (let y in rows) {\n result.push(rows[y].split('\\t'));\n }\n return result;\n }\n\n private htmlParse(data: string) {\n const result: string[][] = [];\n const fragment = document.createRange().createContextualFragment(data);\n const table = fragment.querySelector('table');\n if (!table) {\n return null;\n }\n for (const rgRow of Array.from(table.rows)) {\n result.push(Array.from(rgRow.cells).map(cell => cell.innerText));\n }\n return result;\n }\n\n private getData(e: ClipboardEvent) {\n return (\n e.clipboardData ||\n (window as unknown as { clipboardData: DataTransfer | null })\n ?.clipboardData\n );\n }\n}\n"]}
1
+ {"version":3,"file":"revogr-clipboard.js","sourceRoot":"","sources":["../../../src/components/clipboard/revogr-clipboard.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,MAAM,EACN,MAAM,EACN,KAAK,EAEL,IAAI,GACL,MAAM,eAAe,CAAC;AAEvB;;GAEG;AAEH,MAAM,OAAO,SAAS;;;;IAkF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C,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAEO,SAAS,CAAC,IAAY;QAC5B,MAAM,MAAM,GAAe,EAAE,CAAC;QAC9B,MAAM,QAAQ,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;QACvE,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC9C,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAO,IAAI,CAAC;QACd,CAAC;QACD,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YAC3C,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;QACnE,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAEO,OAAO,CAAC,CAAiB;QAC/B,OAAO,CACL,CAAC,CAAC,aAAa;aACd,MAA4D,aAA5D,MAAM,uBAAN,MAAM,CACH,aAAa,CAAA,CAClB,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Listen,\n Method,\n Event,\n EventEmitter,\n Prop,\n} from '@stencil/core';\nimport { DataFormat } from '@type';\n/**\n * This Clipboard provides functionality for handling clipboard events in a web application.\n */\n@Component({ tag: 'revogr-clipboard' })\nexport class Clipboard {\n /**\n * If readonly mode - disabled Paste event\n */\n @Prop() readonly: boolean;\n\n /**\n * Paste 1. Fired before paste applied to the grid\n * defaultPrevented - if true, paste will be canceled\n */\n @Event({ eventName: 'beforepaste' }) beforePaste: EventEmitter<{\n raw: string;\n isHTML: boolean;\n event: ClipboardEvent;\n dataText: string;\n }>;\n\n /**\n * Paste 2. Fired before paste applied to the grid and after data parsed\n */\n @Event({ eventName: 'beforepasteapply' })\n beforePasteApply: EventEmitter<{\n raw: string;\n parsed: string[][];\n event: ClipboardEvent;\n }>;\n\n /**\n * Paste 3. Internal method. When data region is ready pass it to the top.\n * @property {string[][]} data - data to paste\n * @property {boolean} defaultPrevented - if true, paste will be canceled\n */\n @Event({ eventName: 'pasteregion' })\n pasteRegion: EventEmitter<string[][]>;\n\n /**\n * Paste 4. Fired after paste applied to the grid\n * defaultPrevented - if true, paste will be canceled\n */\n @Event({ eventName: 'afterpasteapply' }) afterPasteApply: EventEmitter<{\n raw: string;\n parsed: string[][];\n event: ClipboardEvent;\n }>;\n\n /**\n * Cut 1. Fired before cut triggered\n * defaultPrevented - if true, cut will be canceled\n */\n @Event({ eventName: 'beforecut' }) beforeCut: EventEmitter<{\n event: ClipboardEvent;\n }>;\n\n /**\n * Cut 2. Clears region when cut is done\n */\n @Event({ eventName: 'clearregion' }) clearRegion: EventEmitter<DataTransfer>;\n\n /**\n * Copy 1. Fired before copy triggered\n * defaultPrevented - if true, copy will be canceled\n */\n @Event({ eventName: 'beforecopy' }) beforeCopy: EventEmitter<{\n event: ClipboardEvent;\n }>;\n\n /**\n * Copy Method 1. Fired before copy applied to the clipboard from outside.\n * defaultPrevented - if true, copy will be canceled\n */\n @Event({ eventName: 'beforecopyapply' }) beforeCopyApply: EventEmitter<{\n event: DataTransfer;\n data?: string[][];\n }>;\n\n /**\n * Copy 2. Fired when region copied\n * defaultPrevented - if true, copy will be canceled\n */\n @Event({ eventName: 'copyregion' })\n copyRegion: EventEmitter<DataTransfer>;\n\n @Listen('paste', { target: 'document' }) onPaste(e: ClipboardEvent) {\n // if readonly do nothing\n if (this.readonly) {\n return;\n }\n const clipboardData = this.getData(e);\n const isHTML = (clipboardData?.types.indexOf('text/html') || -1) > -1;\n const data = (isHTML\n ? clipboardData?.getData('text/html')\n : clipboardData?.getData('text')) || '';\n const dataText = clipboardData?.getData('text') || '';\n\n const beforePaste = this.beforePaste.emit({\n raw: data,\n dataText,\n isHTML,\n event: e,\n });\n\n if (beforePaste.defaultPrevented) {\n return;\n }\n\n let parsedData: string[][];\n // if html, then search for table if no table fallback to regular text parsing\n if (beforePaste.detail.isHTML) {\n const table = this.htmlParse(beforePaste.detail.raw);\n // fallback to text if not possible to parse as html\n parsedData = table || this.textParse(dataText || '');\n } else {\n parsedData = this.textParse(beforePaste.detail.raw);\n }\n const beforePasteApply = this.beforePasteApply.emit({\n raw: data,\n parsed: parsedData,\n event: e,\n });\n if (beforePasteApply.defaultPrevented) {\n return;\n }\n this.pasteRegion.emit(beforePasteApply.detail.parsed);\n // post paste action\n const afterPasteApply = this.afterPasteApply.emit({\n raw: data,\n parsed: parsedData,\n event: e,\n });\n // keep default behavior if needed\n if (afterPasteApply.defaultPrevented) {\n return;\n }\n e.preventDefault();\n }\n\n /**\n * Listen to copy event and emit copy region event\n */\n @Listen('copy', { target: 'document' }) copyStarted(e: ClipboardEvent) {\n const beforeCopy = this.beforeCopy.emit({\n event: e,\n });\n if (beforeCopy.defaultPrevented) {\n return;\n }\n const data = this.getData(beforeCopy.detail.event);\n this.copyRegion.emit(data || undefined);\n e.preventDefault();\n }\n\n /**\n * Listen to copy event and emit copy region event\n */\n @Listen('cut', { target: 'document' }) cutStarted(e: ClipboardEvent) {\n const beforeCut = this.beforeCut.emit({\n event: e,\n });\n if (beforeCut.defaultPrevented) {\n return;\n }\n const data = this.getData(beforeCut.detail.event);\n this.copyStarted(e);\n\n // if readonly do nothing\n if (this.readonly) {\n return;\n }\n\n this.clearRegion.emit(data || undefined);\n e.preventDefault();\n }\n\n @Method() async doCopy(e: DataTransfer, data?: DataFormat[][]) {\n const beforeCopyApply = this.beforeCopyApply.emit({\n event: e,\n data,\n });\n if (beforeCopyApply.defaultPrevented) {\n return;\n }\n const parsed = data ? this.parserCopy(data) : '';\n e.setData('text/plain', parsed);\n }\n\n parserCopy(data: DataFormat[][]) {\n return data.map(rgRow => rgRow.join('\\t')).join('\\n');\n }\n\n private textParse(data: string) {\n const result: string[][] = [];\n const rows = data.split(/\\r\\n|\\n|\\r/);\n for (let y in rows) {\n result.push(rows[y].split('\\t'));\n }\n return result;\n }\n\n private htmlParse(data: string) {\n const result: string[][] = [];\n const fragment = document.createRange().createContextualFragment(data);\n const table = fragment.querySelector('table');\n if (!table) {\n return null;\n }\n for (const rgRow of Array.from(table.rows)) {\n result.push(Array.from(rgRow.cells).map(cell => cell.innerText));\n }\n return result;\n }\n\n private getData(e: ClipboardEvent) {\n return (\n e.clipboardData ||\n (window as unknown as { clipboardData: DataTransfer | null })\n ?.clipboardData\n );\n }\n}\n"]}
@@ -178,7 +178,7 @@ export class RevoEdit {
178
178
  "mutable": false,
179
179
  "complexType": {
180
180
  "original": "ColumnDataSchemaModel | null",
181
- "resolved": "null | { prop: ColumnProp; model: DataType; column: ColumnRegular; rowIndex: number; colIndex: number; colType: DimensionCols; type: DimensionRows; data: DataType[]; value: any; }",
181
+ "resolved": "null | { prop: ColumnProp; model: DataType<any>; column: ColumnRegular; rowIndex: number; colIndex: number; colType: DimensionCols; type: DimensionRows; data: DataType<any>[]; value: any; }",
182
182
  "references": {
183
183
  "ColumnDataSchemaModel": {
184
184
  "location": "import",
@@ -1211,7 +1211,7 @@ export class OverlaySelection {
1211
1211
  },
1212
1212
  "complexType": {
1213
1213
  "original": "RangeClipboardPasteEvent",
1214
- "resolved": "{ data: DataLookup; models: { [rowIndex: number]: DataType; }; range: RangeArea | null; } & AllDimensionType",
1214
+ "resolved": "{ data: DataLookup<any>; models: { [rowIndex: number]: DataType<any>; }; range: RangeArea | null; } & AllDimensionType",
1215
1215
  "references": {
1216
1216
  "RangeClipboardPasteEvent": {
1217
1217
  "location": "import",
@@ -24,6 +24,7 @@ import { rowDefinitionByType, rowDefinitionRemoveByType } from "./grid.helpers";
24
24
  import ColumnPlugin from "../../plugins/moveColumn/column.drag.plugin";
25
25
  import { getPropertyFromEvent } from "../../utils/events";
26
26
  import { isMobileDevice } from "../../utils/mobile";
27
+ import { getColumnByProp, getColumns } from "../../utils/column.utils";
27
28
  /**
28
29
  * Revogrid - High-performance, customizable grid library for managing large datasets.
29
30
  *
@@ -167,7 +168,7 @@ export class RevoGridComponent {
167
168
  /** Open editor for cell. */
168
169
  async setCellEdit(rgRow, prop, rowSource = 'rgRow') {
169
170
  var _a;
170
- const rgCol = ColumnDataProvider.getColumnByProp(this.columns, prop);
171
+ const rgCol = getColumnByProp(this.columns, prop);
171
172
  if (!rgCol) {
172
173
  return;
173
174
  }
@@ -391,7 +392,7 @@ export class RevoGridComponent {
391
392
  this.columnChanged(this.columns);
392
393
  }
393
394
  columnChanged(newVal = []) {
394
- const columnGather = ColumnDataProvider.getColumns(newVal, 0, this.columnTypes);
395
+ const columnGather = getColumns(newVal, 0, this.columnTypes);
395
396
  this.beforecolumnsset.emit(columnGather);
396
397
  this.dimensionProvider.applyNewColumns(columnGather.columns, this.disableVirtualX);
397
398
  this.beforecolumnapplied.emit(columnGather);
@@ -701,7 +702,7 @@ export class RevoGridComponent {
701
702
  const headerProperties = Object.assign(Object.assign({}, view.headerProp), { type: view.type, additionalData: this.additionalData, viewportCol: view.viewportCol, selectionStore: view.columnSelectionStore, canResize: this.resize, readonly: this.readonly, columnFilter: !!this.filter });
702
703
  // Column headers
703
704
  const dataViews = [
704
- h("revogr-header", Object.assign({ key: 'b08c837765cf20c88cb5b253a876f0f442c31628' }, headerProperties, { slot: HEADER_SLOT })),
705
+ h("revogr-header", Object.assign({ key: 'bada77126c317da09a9826312186c16617c7b0af' }, headerProperties, { slot: HEADER_SLOT })),
705
706
  ];
706
707
  // Render viewport data (vertical sections)
707
708
  view.dataPorts.forEach(data => {
@@ -723,12 +724,12 @@ export class RevoGridComponent {
723
724
  const typeCol = 'rgCol';
724
725
  const viewports = this.viewportProvider.stores;
725
726
  const dimensions = this.dimensionProvider.stores;
726
- return (h(Host, { key: '057a2cf1a64aaeec12d2aca17b09316fb3cbfde6' }, this.hideAttribution ? null : (h("revogr-attribution", { class: "attribution" })), h("div", { key: 'e89e3d136d756f80421f42f47e09583985edb1bc', class: "main-viewport", onClick: (e) => {
727
+ return (h(Host, { key: '9b95aef4de8af770036a733986e7e0fe2dd3ffda' }, this.hideAttribution ? null : (h("revogr-attribution", { class: "attribution" })), h("div", { key: '68dbc0fca826a0089402157d301c49a0776e9007', class: "main-viewport", onClick: (e) => {
727
728
  var _a;
728
729
  if (e.currentTarget === e.target) {
729
730
  (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.clearEdit();
730
731
  }
731
- } }, h("div", { key: '177db78970907d36b8d56549386a18a683573944', class: "viewports" }, h("slot", { key: '481d830a232b1969fcaa2519a5306fafaff58fb4', name: "viewport" }), viewportSections, h("revogr-scroll-virtual", { key: '6a123b2e84bec95d7a63a73322fe167248e8415e', class: "vertical", dimension: typeRow, viewportStore: viewports[typeRow].store, dimensionStore: dimensions[typeRow].store, ref: el => this.scrollingService.registerElement(el, 'rowScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }), h(OrderRenderer, { key: 'fea1be24668f2039746fff93d0ab5e76d932a166', ref: e => (this.orderService = e) }))), h("revogr-scroll-virtual", { key: '74c6e05c81b2782320755c910b098edf8858d6db', class: "horizontal", dimension: typeCol, viewportStore: viewports[typeCol].store, dimensionStore: dimensions[typeCol].store, ref: el => this.scrollingService.registerElement(el, 'colScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }), this.extraElements));
732
+ } }, h("div", { key: '6f927e04dd8c7e542a87fdc0a4f6d74248c65ccb', class: "viewports" }, h("slot", { key: 'b6d421fa412b34ce9821cd1fa30a80ae37282f37', name: "viewport" }), viewportSections, h("revogr-scroll-virtual", { key: '4ce3045201685f6c6c617c84fddc5a3d531034bd', class: "vertical", dimension: typeRow, viewportStore: viewports[typeRow].store, dimensionStore: dimensions[typeRow].store, ref: el => this.scrollingService.registerElement(el, 'rowScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }), h(OrderRenderer, { key: 'e5bd92c37bdc31f0601a4d4cf4a62026e0e25406', ref: e => (this.orderService = e) }))), h("revogr-scroll-virtual", { key: 'dbda0fb90cf6a9eb6ac66ca16bcff30cf254b1e1', class: "horizontal", dimension: typeCol, viewportStore: viewports[typeCol].store, dimensionStore: dimensions[typeCol].store, ref: el => this.scrollingService.registerElement(el, 'colScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }), this.extraElements));
732
733
  }
733
734
  disconnectedCallback() {
734
735
  // Remove all plugins, to avoid memory leaks and unexpected behaviour when the component is removed
@@ -1846,8 +1847,8 @@ export class RevoGridComponent {
1846
1847
  "references": {
1847
1848
  "ColumnCollection": {
1848
1849
  "location": "import",
1849
- "path": "../../services/column.data.provider",
1850
- "id": "src/services/column.data.provider.ts::ColumnCollection"
1850
+ "path": "../../utils/column.utils",
1851
+ "id": "src/utils/column.utils.ts::ColumnCollection"
1851
1852
  }
1852
1853
  }
1853
1854
  }
@@ -1867,8 +1868,8 @@ export class RevoGridComponent {
1867
1868
  "references": {
1868
1869
  "ColumnCollection": {
1869
1870
  "location": "import",
1870
- "path": "../../services/column.data.provider",
1871
- "id": "src/services/column.data.provider.ts::ColumnCollection"
1871
+ "path": "../../utils/column.utils",
1872
+ "id": "src/utils/column.utils.ts::ColumnCollection"
1872
1873
  }
1873
1874
  }
1874
1875
  }
@@ -1888,8 +1889,8 @@ export class RevoGridComponent {
1888
1889
  "references": {
1889
1890
  "ColumnCollection": {
1890
1891
  "location": "import",
1891
- "path": "../../services/column.data.provider",
1892
- "id": "src/services/column.data.provider.ts::ColumnCollection"
1892
+ "path": "../../utils/column.utils",
1893
+ "id": "src/utils/column.utils.ts::ColumnCollection"
1893
1894
  },
1894
1895
  "Record": {
1895
1896
  "location": "global",
@@ -1 +1 @@
1
- {"version":3,"file":"revo-grid.js","sourceRoot":"","sources":["../../../src/components/revoGrid/revo-grid.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,KAAK,EACL,OAAO,EACP,MAAM,EACN,KAAK,EAEL,MAAM,EAEN,IAAI,GACL,MAAM,eAAe,CAAC;AAEvB,OAAO,kBAEN,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAgB,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAC5D,OAAO,iBAAiB,MAAM,mCAAmC,CAAC;AAClE,OAAO,gBAAgB,MAAM,kCAAkC,CAAC;AAChE,OAAO,YAAY,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,QAEN,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EACL,YAAY,GAGb,MAAM,oCAAoC,CAAC;AAC5C,OAAO,aAAa,MAAM,sCAAsC,CAAC;AACjE,OAAO,gBAAgB,MAAM,oCAAoC,CAAC;AAElE,OAAO,iBAAiB,MAAM,+CAA+C,CAAC;AAE9E,OAAO,eAAgC,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,oBAAoB,MAAM,8BAA8B,CAAC;AAChE,OAAO,uBAAuB,MAAM,0CAA0C,CAAC;AAC/E,OAAO,aAAiC,MAAM,yBAAyB,CAAC;AACxE,OAAO,aAAa,EAAE,EACpB,eAAe,GAChB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAChF,OAAO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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Prop,\n h,\n Watch,\n Element,\n Listen,\n Event,\n EventEmitter,\n Method,\n VNode,\n Host,\n} from '@stencil/core';\n\nimport ColumnDataProvider, {\n ColumnCollection,\n} from '../../services/column.data.provider';\nimport { DataProvider } from '../../services/data.provider';\nimport { DSourceState, getVisibleSourceItem } from '@store';\nimport DimensionProvider from '../../services/dimension.provider';\nimport ViewportProvider from '../../services/viewport.provider';\nimport ThemeService from '../../themeManager/theme.service';\nimport { timeout } from '../../utils';\nimport AutoSize, {\n AutoSizeColumnConfig,\n} from '../../plugins/column.auto-size.plugin';\n\nimport {\n FilterPlugin,\n ColumnFilterConfig,\n FilterCollection,\n} from '../../plugins/filter/filter.plugin';\nimport SortingPlugin from '../../plugins/sorting/sorting.plugin';\nimport ExportFilePlugin from '../../plugins/export/export.plugin';\nimport { DataInput } from '../../plugins/export/types';\nimport GroupingRowPlugin from '../../plugins/groupingRow/grouping.row.plugin';\nimport { GroupingOptions } from '../../plugins/groupingRow/grouping.row.types';\nimport ViewportService, { FocusedData } from './viewport.service';\nimport { DATA_SLOT, HEADER_SLOT } from './viewport.helpers';\nimport GridScrollingService from './viewport.scrolling.service';\nimport SelectionStoreConnector from '../../services/selection.store.connector';\nimport OrderRenderer, { OrdererService } from '../order/order-renderer';\nimport StretchColumn, {\n isStretchPlugin,\n} from '../../plugins/column.stretch.plugin';\nimport { rowDefinitionByType, rowDefinitionRemoveByType } from './grid.helpers';\nimport ColumnPlugin from '../../plugins/moveColumn/column.drag.plugin';\nimport { getPropertyFromEvent } from '../../utils/events';\nimport { isMobileDevice } from '../../utils/mobile';\nimport {\n MultiDimensionType,\n DimensionRows,\n DimensionCols,\n DimensionType,\n DimensionTypeCol,\n RowHeaders,\n ColumnRegular,\n ColumnGrouping,\n DataType,\n RowDefinition,\n ColumnType,\n FocusTemplateFunc,\n PositionItem,\n ColumnProp,\n ViewPortScrollEvent,\n InitialHeaderClick,\n AllDimensionType,\n Editors,\n BeforeSaveDataDetails,\n BeforeRangeSaveDataDetails,\n Cell,\n ChangedRange,\n RangeArea,\n AfterEditEvent,\n Theme,\n PluginBaseComponent,\n HeaderProperties,\n PluginProviders,\n} from '@type';\nimport type { Observable } from '../../utils/store.utils';\nimport type { GridPlugin } from '../../plugins/base.plugin';\n\n\n/**\n * Revogrid - High-performance, customizable grid library for managing large datasets.\n *\n * :::tip\n * Read [type definition file](https://github.com/revolist/revogrid/blob/master/src/interfaces.d.ts) for the full interface information.\n * All complex property types such as `ColumnRegular`, `ColumnProp`, `ColumnDataSchemaModel` can be found there.\n * :::\n *\n * :::tip\n * For a comprehensive events guide, check the [dependency tree](#Dependencies).\n * All events propagate to the root level of the grid.\n * :::\n *\n * @slot data-{column-type}-{row-type}. @example data-rgCol-rgRow - main data slot. Applies extra elements in <revogr-data />.\n * @slot focus-{column-type}-{row-type}. @example focus-rgCol-rgRow - focus layer for main data. Applies extra elements in <revogr-focus />.\n */\n@Component({\n tag: 'revo-grid',\n styleUrl: 'revo-grid-style.scss',\n})\nexport class RevoGridComponent {\n // #region Properties\n /** Excel like functionality.\n * Show row numbers.\n * Also can be used for custom row header render if object provided.\n */\n @Prop() rowHeaders: RowHeaders | boolean;\n\n /**\n * Defines how many rows/columns should be rendered outside visible area.\n */\n @Prop() frameSize = 1;\n\n /**\n * Indicates default rgRow size.\n * By default 0, means theme package size will be applied\n *\n * Alternatively you can use `rowSize` to reset viewport\n */\n @Prop() rowSize = 0;\n\n /** Indicates default column size. */\n @Prop() colSize = 100;\n\n /** When true, user can range selection. */\n @Prop() range = false;\n\n /** When true, grid in read only mode. */\n @Prop() readonly = false;\n\n /** When true, columns are resizable. */\n @Prop() resize = false;\n\n /** When true cell focus appear. */\n @Prop() canFocus = true;\n\n /** When true enable clipboard. */\n @Prop() useClipboard = true;\n\n /**\n * Columns - defines an array of grid columns.\n * Can be column or grouped column.\n */\n @Prop() columns: (ColumnRegular | ColumnGrouping)[] = [];\n /**\n * Source - defines main data source.\n * Can be an Object or 2 dimensional array([][]);\n * Keys/indexes referenced from columns Prop.\n */\n @Prop() source: DataType[] = [];\n\n /** Pinned top Source: {[T in ColumnProp]: any} - defines pinned top rows data source. */\n @Prop() pinnedTopSource: DataType[] = [];\n\n /** Pinned bottom Source: {[T in ColumnProp]: any} - defines pinned bottom rows data source. */\n @Prop() pinnedBottomSource: DataType[] = [];\n\n /** Custom row properies to be applied. See `RowDefinition` for more info. */\n @Prop() rowDefinitions: RowDefinition[] = [];\n\n /** Custom editors register. */\n @Prop() editors: Editors = {};\n\n /**\n * Apply changes in editor when closed except 'Escape' cases.\n * If custom editor in use method getValue required.\n * Check interfaces.d.ts `EditorBase` for more info.\n */\n @Prop() applyOnClose = false;\n\n /**\n * Custom grid plugins.\n * Has to be predefined during first grid init.\n * Every plugin should be inherited from BasePlugin.\n */\n @Prop() plugins: GridPlugin[] = [];\n\n /**\n * Column Types Format.\n * Every type represent multiple column properties.\n * Types will be merged but can be replaced with column properties.\n * Types were made as separate objects to be reusable per multiple columns.\n */\n @Prop() columnTypes: { [name: string]: ColumnType } = {};\n\n /** Theme name. */\n @Prop({ reflect: true, mutable: true }) theme: Theme = 'default';\n\n /**\n * Row class property mapping.\n * Map custom classes to rows from row object data.\n * Define this property in rgRow object and this will be mapped as rgRow class.\n */\n @Prop({ reflect: true }) rowClass = '';\n\n /**\n * Autosize config.\n * Enables columns autoSize.\n * For more details check `autoSizeColumn` plugin.\n * By default disabled, hence operation is not performance efficient.\n * `true` to enable with default params (double header separator click for autosize).\n * Or define config. See `AutoSizeColumnConfig` for more details.\n */\n @Prop() autoSizeColumn: boolean | AutoSizeColumnConfig = false;\n\n /**\n * Enables filter plugin.\n * Can be boolean.\n * Or can be filter collection See `FilterCollection` for more info.\n */\n @Prop() filter: boolean | ColumnFilterConfig = false;\n\n /**\n * Apply changes typed in editor on editor close except Escape cases.\n * If custom editor in use method `getValue` required.\n * Check `interfaces.d.ts` `EditorBase` for more info.\n */\n @Prop() focusTemplate: FocusTemplateFunc;\n\n /**\n * Enable column move plugin.\n */\n @Prop() canMoveColumns = false;\n /**\n * Trimmed rows.\n * Functionality which allows to hide rows from main data set.\n * `trimmedRows` are physical `rgRow` indexes to hide.\n */\n @Prop() trimmedRows: Record<number, boolean> = {};\n\n /**\n * Enable export plugin.\n */\n @Prop() exporting = false;\n\n /**\n * Group rows based on this property.\n * Define properties to be groped by grouping plugin See `GroupingOptions`.\n */\n @Prop() grouping: GroupingOptions;\n\n /**\n * Stretch strategy for columns by `StretchColumn` plugin.\n * For example if there are more space on the right last column size would be increased.\n */\n @Prop() stretch: boolean | string = true;\n\n /**\n * Additional data to be passed to plugins, renders or editors.\n * For example if you need to pass Vue component instance.\n */\n @Prop() additionalData: any = {};\n\n /**\n * Disable lazy rendering mode for the `X axis`.\n * Use when not many columns present and you don't need rerenader cells during scroll.\n * Can be used for initial rendering performance improvement.\n */\n @Prop() disableVirtualX = false;\n /**\n * Disable lazy rendering mode for the `Y axis`.\n * Use when not many rows present and you don't need rerenader cells during scroll.\n * Can be used for initial rendering performance improvement.\n */\n @Prop() disableVirtualY = false;\n\n /**\n * Please only hide the attribution if you are subscribed to Pro version\n */\n @Prop() hideAttribution = false;\n\n /**\n * Prevent rendering until job is done.\n * Can be used for initial rendering performance improvement.\n * When several plugins require initial rendering this will prevent double initial rendering.\n */\n @Prop() jobsBeforeRender: Promise<any>[] = [];\n\n /**\n * Register new virtual node inside of grid.\n * Used for additional items creation such as plugin elements.\n * Should be set before grid render inside of plugins.\n */\n @Prop() registerVNode: VNode[] = [];\n\n // #endregion\n\n // #region Events\n /**\n * New content size has been applied. The size excludes the header.\n * Currently, the event responsible for applying the new content size does not provide the actual size.\n * To retrieve the actual content size, you can utilize the `getContentSize` function after the event has been triggered.\n */\n @Event() contentsizechanged: EventEmitter<MultiDimensionType>;\n\n /**\n * This event is triggered before the data is edited.\n * To prevent the default behavior of editing data and use your own implementation, call `e.preventDefault()`.\n * To override the edit result with your own value, set the `e.val` property to your desired value.\n */\n @Event() beforeedit: EventEmitter<BeforeSaveDataDetails>;\n\n /**\n * This event is triggered before applying range data, specifically when a range selection occurs.\n * To customize the data and prevent the default edit data from being set, you can call `e.preventDefault()`.\n */\n @Event() beforerangeedit: EventEmitter<BeforeRangeSaveDataDetails>;\n\n /**\n * Triggered after data applied or range changed.\n */\n @Event() afteredit: EventEmitter<AfterEditEvent>;\n\n /**\n * This event is triggered before autofill is applied.\n * To prevent the default behavior of applying the edit data, you can call `e.preventDefault()`.\n */\n @Event() beforeautofill: EventEmitter<ChangedRange>;\n\n /**\n * Triggered before range applied.\n * Use e.preventDefault() to prevent range.\n */\n @Event() beforerange: EventEmitter<ChangedRange>;\n\n /**\n * Triggered after focus render finished.\n * Can be used to access a focus element through `event.target`\n */\n @Event() afterfocus: EventEmitter<{\n model: any;\n column: ColumnRegular;\n }>;\n\n /**\n * This event is triggered before the order of `rgRow` is applied.\n * To prevent the default behavior of changing the order of `rgRow`, you can call `e.preventDefault()`.\n */\n @Event() roworderchanged: EventEmitter<{ from: number; to: number }>;\n\n /**\n * Triggered by sorting.plugin.ts\n * Before sorting apply.\n * Use e.preventDefault() to prevent sorting data change.\n */\n @Event() beforesortingapply: EventEmitter<{\n column: ColumnRegular;\n order: 'desc' | 'asc';\n additive: boolean;\n }>;\n\n /**\n * Triggered by sorting.plugin.ts\n * Before sorting event.\n * Initial sorting triggered, if this event stops no other event called.\n * Use e.preventDefault() to prevent sorting.\n */\n @Event() beforesorting: EventEmitter<{\n column: ColumnRegular;\n order: 'desc' | 'asc';\n additive: boolean;\n }>;\n\n /**\n * This event is triggered when the row order change is started.\n * To prevent the default behavior of changing the row order, you can call `e.preventDefault()`.\n * To change the item name at the start of the row order change, you can set `e.text` to the desired new name.\n */\n @Event() rowdragstart: EventEmitter<{\n pos: PositionItem;\n text: string;\n }>;\n\n /**\n * On header click.\n */\n @Event() headerclick: EventEmitter<ColumnRegular>;\n\n /**\n * This event is triggered before the cell focus is changed.\n * To prevent the default behavior of changing the cell focus, you can call `e.preventDefault()`.\n */\n @Event() beforecellfocus: EventEmitter<BeforeSaveDataDetails>;\n\n /**\n * This event is triggered before the grid focus is lost.\n * To prevent the default behavior of changing the cell focus, you can call `e.preventDefault()`.\n */\n @Event() beforefocuslost: EventEmitter<FocusedData | null>;\n\n /**\n * Before main source/rows data apply.\n * You can override data source here\n */\n @Event() beforesourceset: EventEmitter<{\n type: DimensionRows;\n source: DataType[];\n }>;\n\n /**\n * Before data apply on any source type. Can be source from pinned and main viewport.\n * You can override data source here\n */\n @Event() beforeanysource: EventEmitter<{\n type: DimensionRows;\n source: DataType[];\n }>;\n\n /**\n * After main source/rows updated\n */\n @Event() aftersourceset: EventEmitter<{\n type: DimensionRows;\n source: DataType[];\n }>;\n\n /**\n * Emitted after each source update, whether from the pinned or main viewport.\n * Useful for tracking all changes originating from sources in both the pinned and main viewports.\n */\n @Event() afteranysource: EventEmitter<{\n type: DimensionRows;\n source: DataType[];\n }>;\n\n /**\n * Emitted before a column update is applied.\n * Listeners can use this event to perform any necessary actions or modifications before the column update is finalized.\n */\n @Event() beforecolumnsset: EventEmitter<ColumnCollection>;\n\n /**\n * Emitted before a column update is applied, after the column set is gathered and the viewport is updated.\n * Useful for performing actions or modifications before the final application of the column update.\n */\n @Event() beforecolumnapplied: EventEmitter<ColumnCollection>;\n\n /** Column updated */\n @Event() aftercolumnsset: EventEmitter<{\n columns: ColumnCollection;\n order: Record<ColumnProp, 'asc' | 'desc' | undefined>;\n }>;\n\n /**\n * Emitted before applying a filter to the data source.\n * Use e.preventDefault() to prevent cell focus change.\n * Modify the @collection if you need to change filters.\n */\n @Event() beforefilterapply: EventEmitter<{ collection: FilterCollection }>;\n\n /**\n * Emitted before applying a filter to the data source.\n * Use e.preventDefault() to prevent the default behavior of trimming values and applying the filter.\n * Modify the `collection` property if you want to change the filters.\n * Modify the `itemsToFilter` property if you want to filter the indexes for trimming.\n */\n @Event() beforefiltertrimmed: EventEmitter<{\n collection: FilterCollection;\n itemsToFilter: Record<number, boolean>;\n }>;\n\n /**\n * Emitted before trimming values.\n * Use e.preventDefault() to prevent the default behavior of trimming values.\n * Modify the `trimmed` property if you want to filter the indexes for trimming.\n */\n @Event() beforetrimmed: EventEmitter<{\n trimmed: Record<number, boolean>;\n trimmedType: string;\n type: string;\n }>;\n\n /**\n * Emitted after trimmed values have been applied.\n * Useful for notifying when trimming of values has taken place.\n */\n @Event() aftertrimmed: EventEmitter;\n\n /**\n * Emitted when the viewport is scrolled.\n * Useful for tracking viewport scrolling events.\n */\n @Event() viewportscroll: EventEmitter<ViewPortScrollEvent>;\n\n /**\n * Before export\n * Use e.preventDefault() to prevent export\n * Replace data in Event in case you want to modify it in export\n */\n @Event() beforeexport: EventEmitter<DataInput>;\n\n /**\n * Emitted before editing starts.\n * Use e.preventDefault() to prevent the default edit behavior.\n */\n @Event() beforeeditstart: EventEmitter<BeforeSaveDataDetails>;\n\n /**\n * Emitted after column resizing.\n * Useful for retrieving the resized columns.\n */\n @Event() aftercolumnresize: EventEmitter<{\n [index: number]: ColumnRegular;\n }>;\n\n /**\n * Emitted before the row definition is applied.\n * Useful for modifying or preventing the default row definition behavior.\n */\n @Event() beforerowdefinition: EventEmitter<{ vals: any; oldVals: any }>;\n\n /**\n * Emitted when the filter configuration is changed\n */\n @Event() filterconfigchanged: EventEmitter;\n\n /**\n * Emmited when the row headers are changed.\n */\n @Event() rowheaderschanged: EventEmitter;\n\n /**\n * Emmited before the grid is rendered.\n */\n @Event() beforegridrender: EventEmitter;\n\n /**\n * Emmited after the grid is initialized. Connected to the DOM.\n */\n @Event() aftergridinit: EventEmitter;\n\n /**\n * Emmited after the additional data is changed\n */\n @Event() additionaldatachanged: EventEmitter<any>;\n\n /**\n * Emmited after the theme is changed\n */\n @Event() afterthemechanged: EventEmitter<Theme>\n\n // #endregion\n\n // #region Methods\n /**\n * Refreshes data viewport.\n * Can be specific part as rgRow or pinned rgRow or 'all' by default.\n */\n @Method() async refresh(type: DimensionRows | 'all' = 'all') {\n this.dataProvider.refresh(type);\n }\n\n /**\n * Sets data at specified cell.\n * Useful for performance optimization.\n * No viewport update will be triggered.\n */\n @Method() async setDataAt(\n data: {\n row: number;\n col: number;\n } & AllDimensionType,\n ) {\n const dataElement: HTMLRevogrDataElement | null =\n this.element.querySelector(\n `revogr-data[type=\"${data.rowType}\"][col-type=\"${data.colType}\"]`,\n );\n return dataElement?.updateCell({\n row: data.row,\n col: data.col,\n });\n }\n\n /**\n * Scrolls viewport to specified row by index.\n */\n @Method() async scrollToRow(coordinate = 0) {\n const y = this.dimensionProvider.getViewPortPos({\n coordinate,\n dimension: 'rgRow',\n });\n await this.scrollToCoordinate({ y });\n }\n\n /**\n * Scrolls viewport to specified column by index.\n */\n @Method() async scrollToColumnIndex(coordinate = 0) {\n const x = this.dimensionProvider.getViewPortPos({\n coordinate,\n dimension: 'rgCol',\n });\n await this.scrollToCoordinate({ x });\n }\n\n /**\n * Scrolls viewport to specified column by prop\n */\n @Method() async scrollToColumnProp(\n prop: ColumnProp,\n dimension: DimensionTypeCol = 'rgCol',\n ) {\n const coordinate = this.columnProvider.getColumnIndexByProp(\n prop,\n dimension,\n );\n if (coordinate < 0) {\n // already on the screen\n return;\n }\n const x = this.dimensionProvider.getViewPortPos({\n coordinate,\n dimension,\n });\n await this.scrollToCoordinate({ x });\n }\n\n /** Update columns */\n @Method() async updateColumns(cols: ColumnRegular[]) {\n this.columnProvider.updateColumns(cols);\n }\n\n /** Add trimmed by type */\n @Method() async addTrimmed(\n trimmed: Record<number, boolean>,\n trimmedType = 'external',\n type: DimensionRows = 'rgRow',\n ) {\n const event = this.beforetrimmed.emit({\n trimmed,\n trimmedType,\n type,\n });\n if (event.defaultPrevented) {\n return event;\n }\n this.dataProvider.setTrimmed({ [trimmedType]: event.detail.trimmed }, type);\n this.aftertrimmed.emit();\n return event;\n }\n\n /** Scrolls view port to coordinate */\n @Method() async scrollToCoordinate(cell: Partial<Cell>) {\n this.viewport?.scrollToCell(cell);\n }\n\n /** Open editor for cell. */\n @Method() async setCellEdit(\n rgRow: number,\n prop: ColumnProp,\n rowSource: DimensionRows = 'rgRow',\n ) {\n const rgCol = ColumnDataProvider.getColumnByProp(this.columns, prop);\n if (!rgCol) {\n return;\n }\n await timeout();\n const colGroup = rgCol.pin || 'rgCol';\n this.viewport?.setEdit(\n rgRow,\n this.columnProvider.getColumnIndexByProp(prop, colGroup),\n colGroup,\n rowSource,\n );\n }\n\n /** Set focus range. */\n @Method() async setCellsFocus(\n cellStart: Cell = { x: 0, y: 0 },\n cellEnd: Cell = { x: 0, y: 0 },\n colType = 'rgCol',\n rowType = 'rgRow',\n ) {\n this.viewport?.setFocus(colType, rowType, cellStart, cellEnd);\n }\n\n /** Get data from source */\n @Method() async getSource(type: DimensionRows = 'rgRow') {\n return this.dataProvider.stores[type].store.get('source');\n }\n\n /**\n * Get data from visible part of source\n * Trimmed/filtered rows will be excluded\n * @param type - type of source\n */\n @Method() async getVisibleSource(type: DimensionRows = 'rgRow') {\n return getVisibleSourceItem(this.dataProvider.stores[type].store);\n }\n\n /**\n * Provides access to rows internal store observer\n * Can be used for plugin support\n * @param type - type of source\n */\n @Method() async getSourceStore(\n type: DimensionRows = 'rgRow',\n ): Promise<Observable<DSourceState<DataType, DimensionRows>>> {\n return this.dataProvider.stores[type].store;\n }\n /**\n * Provides access to column internal store observer\n * Can be used for plugin support\n * @param type - type of column\n */\n @Method() async getColumnStore(\n type: DimensionCols = 'rgCol',\n ): Promise<Observable<DSourceState<ColumnRegular, DimensionCols>>> {\n return this.columnProvider.stores[type].store;\n }\n\n /**\n * Update column sorting\n * @param column - full column details to update\n * @param index - virtual column index\n * @param order - order to apply\n * @param additive - if false will replace current order\n */\n @Method() async updateColumnSorting(\n column: ColumnRegular,\n index: number,\n order: 'asc' | 'desc' | undefined,\n additive: boolean,\n ) {\n return this.columnProvider.updateColumnSorting(\n column,\n index,\n order,\n additive,\n );\n }\n\n /**\n * Clears column sorting\n */\n @Method() async clearSorting() {\n this.columnProvider.clearSorting();\n }\n\n /**\n * Receive all columns in data source\n */\n @Method() async getColumns(): Promise<ColumnRegular[]> {\n return this.columnProvider.getColumns();\n }\n\n /**\n * Clear current grid focus. Grid has no longer focus on it.\n */\n @Method() async clearFocus() {\n const focused = this.viewport?.getFocused();\n const event = this.beforefocuslost.emit(focused);\n if (event.defaultPrevented) {\n return;\n }\n this.selectionStoreConnector.clearAll();\n }\n\n /**\n * Get all active plugins instances\n */\n @Method() async getPlugins(): Promise<PluginBaseComponent[]> {\n return [...this.internalPlugins];\n }\n\n /**\n * Get the currently focused cell.\n */\n @Method() async getFocused(): Promise<FocusedData | null> {\n return this.viewport?.getFocused() ?? null;\n }\n\n /**\n * Get size of content\n * Including all pinned data\n */\n @Method() async getContentSize(): Promise<Cell> {\n return this.dimensionProvider?.getFullSize();\n }\n /**\n * Get the currently selected Range.\n */\n @Method() async getSelectedRange(): Promise<RangeArea | null> {\n return this.viewport?.getSelectedRange() ?? null;\n }\n\n // #endregion\n\n // #region Listeners outside scope\n private clickTrackForFocusClear?: number;\n @Listen('touchstart', { target: 'document' })\n @Listen('mousedown', { target: 'document' })\n mousedownHandle(event: MouseEvent | TouchEvent) {\n const screenX = getPropertyFromEvent(event, 'screenX');\n const screenY = getPropertyFromEvent(event, 'screenY');\n if (screenX === null || screenY === null) {\n return;\n }\n\n this.clickTrackForFocusClear = screenX + screenY;\n }\n /**\n * To keep your elements from losing focus use mouseup/touchend e.preventDefault();\n */\n @Listen('touchend', { target: 'document' })\n @Listen('mouseup', { target: 'document' })\n async mouseupHandle(event: MouseEvent | TouchEvent) {\n const screenX = getPropertyFromEvent(event, 'screenX');\n const screenY = getPropertyFromEvent(event, 'screenY');\n if (screenX === null || screenY === null) {\n return;\n }\n\n if (event.defaultPrevented) {\n return;\n }\n const pos = screenX + screenY;\n // detect if mousemove then do nothing\n if (Math.abs((this.clickTrackForFocusClear ?? 0) - pos) > 10) {\n return;\n }\n\n // Check if action finished inside the document\n // if event prevented, or it is current table don't clear focus\n const path = event.composedPath();\n if (!path.includes(this.element) &&\n !(this.element.shadowRoot && path.includes(this.element.shadowRoot))\n ) {\n // Perform actions if the click is outside the component\n await this.clearFocus();\n }\n }\n // #endregion\n\n // #region Listeners\n /** Drag events */\n @Listen('rowdragstartinit') onRowDragStarted(\n e: CustomEvent<{\n pos: PositionItem;\n text: string;\n event: MouseEvent;\n }>,\n ) {\n const dragStart = this.rowdragstart.emit(e.detail);\n if (dragStart.defaultPrevented) {\n e.preventDefault();\n return;\n }\n this.orderService?.start(this.element, {\n ...e.detail,\n ...dragStart.detail,\n });\n }\n\n @Listen('rowdragendinit') onRowDragEnd() {\n this.orderService?.end();\n }\n\n @Listen('rowdragmoveinit') onRowDrag({ detail }: CustomEvent<PositionItem>) {\n this.orderService?.move(detail);\n }\n\n @Listen('rowdragmousemove') onRowMouseMove(e: CustomEvent<Cell>) {\n this.orderService?.moveTip(e.detail);\n }\n\n @Listen('celleditapply') async onCellEdit(\n e: CustomEvent<BeforeSaveDataDetails>,\n ) {\n const { defaultPrevented, detail } = this.beforeedit.emit(e.detail);\n await timeout();\n // apply data\n if (!defaultPrevented) {\n this.dataProvider.setCellData(detail);\n\n // @feature: incrimental update for cells\n // this.dataProvider.setCellData(detail, false);\n // await this.setDataAt({\n // row: detail.rowIndex,\n // col: detail.colIndex,\n // rowType: detail.type,\n // colType: detail.colType,\n // });\n this.afteredit.emit(detail);\n }\n }\n\n @Listen('rangeeditapply') onRangeEdit(\n e: CustomEvent<BeforeRangeSaveDataDetails>,\n ) {\n const { defaultPrevented, detail } = this.beforerangeedit.emit(e.detail);\n if (defaultPrevented) {\n e.preventDefault();\n return;\n }\n this.dataProvider.setRangeData(detail.data, detail.type);\n this.afteredit.emit(detail);\n }\n\n @Listen('selectionchangeinit') onRangeChanged(e: CustomEvent<ChangedRange>) {\n const beforeange = this.beforerange.emit(e.detail);\n if (beforeange.defaultPrevented) {\n e.preventDefault();\n }\n const beforeFill = this.beforeautofill.emit(beforeange.detail);\n if (beforeFill.defaultPrevented) {\n e.preventDefault();\n }\n }\n\n @Listen('rowdropinit') onRowDropped(\n e: CustomEvent<{ from: number; to: number }>,\n ) {\n // e.cancelBubble = true;\n const { defaultPrevented } = this.roworderchanged.emit(e.detail);\n if (defaultPrevented) {\n e.preventDefault();\n }\n }\n\n @Listen('beforeheaderclick') onHeaderClick(\n e: CustomEvent<InitialHeaderClick>,\n ) {\n const { defaultPrevented } = this.headerclick.emit({\n ...e.detail.column,\n originalEvent: e.detail.originalEvent,\n });\n if (defaultPrevented) {\n e.preventDefault();\n }\n }\n\n @Listen('beforecellfocusinit') onCellFocus(\n e: CustomEvent<BeforeSaveDataDetails>,\n ) {\n const { defaultPrevented } = this.beforecellfocus.emit(e.detail);\n if (!this.canFocus || defaultPrevented) {\n e.preventDefault();\n }\n }\n\n // #endregion\n\n // #region Private Properties\n @Element() element: HTMLRevoGridElement;\n private extraElements: VNode[] = [];\n\n columnProvider: ColumnDataProvider;\n dataProvider: DataProvider;\n dimensionProvider: DimensionProvider;\n viewportProvider: ViewportProvider;\n private themeService: ThemeService;\n private viewport: ViewportService | null = null;\n private isInited = false;\n\n private orderService: OrdererService;\n private selectionStoreConnector: SelectionStoreConnector;\n private scrollingService: GridScrollingService;\n\n /**\n * Plugins\n * Define plugins collection\n */\n private internalPlugins: PluginBaseComponent[] = [];\n // #endregion\n\n // #region Watchers\n @Watch('columnTypes') columnTypesChanged() {\n // Column format change will trigger column structure update\n this.columnChanged(this.columns);\n }\n @Watch('columns') columnChanged(newVal: (ColumnGrouping | ColumnRegular)[] = []) {\n const columnGather = ColumnDataProvider.getColumns(\n newVal,\n 0,\n this.columnTypes,\n );\n this.beforecolumnsset.emit(columnGather);\n this.dimensionProvider.applyNewColumns(\n columnGather.columns,\n this.disableVirtualX,\n );\n this.beforecolumnapplied.emit(columnGather);\n const columns = this.columnProvider.setColumns(columnGather);\n this.aftercolumnsset.emit({\n columns,\n order: this.columnProvider.order,\n });\n }\n\n @Watch('disableVirtualX') disableVirtualXChanged(\n newVal = false,\n prevVal = false,\n ) {\n if (newVal === prevVal) {\n return;\n }\n this.columnChanged(this.columns);\n }\n\n @Watch('rowSize') rowSizeChanged(s: number) {\n // clear existing data\n this.dimensionProvider.setSettings({ originItemSize: s }, 'rgRow');\n this.rowDefChanged(this.rowDefinitions, this.rowDefinitions, 'rowSize', true);\n }\n\n @Watch('theme') themeChanged(\n t: Theme,\n _?: Theme,\n __ = 'theme',\n init = false,\n ) {\n this.themeService.register(t);\n this.dimensionProvider.setSettings(\n { originItemSize: this.themeService.rowSize },\n 'rgRow',\n );\n this.dimensionProvider.setSettings(\n { originItemSize: this.colSize },\n 'rgCol',\n );\n // if theme change we need to reapply row size and reset viewport\n if (!init) {\n // clear existing data\n this.dimensionProvider.setSettings(\n { originItemSize: this.themeService.rowSize },\n 'rgRow',\n );\n this.rowDefChanged(\n // for cases when some custom size present and not\n this.rowDefinitions,\n this.rowDefinitions,\n 'theme',\n true,\n );\n }\n this.afterthemechanged.emit(t);\n }\n\n @Watch('source')\n @Watch('pinnedBottomSource')\n @Watch('pinnedTopSource')\n dataSourceChanged<T extends DataType>(\n newVal: T[] = [],\n _: T[] | undefined,\n watchName: string,\n ) {\n let type: DimensionRows = 'rgRow';\n switch (watchName) {\n case 'pinnedBottomSource':\n type = 'rowPinEnd';\n break;\n case 'pinnedTopSource':\n type = 'rowPinStart';\n break;\n case 'source':\n type = 'rgRow';\n /** applied for source only for cross compatability between plugins */\n const beforesourceset = this.beforesourceset.emit({\n type,\n source: newVal,\n });\n newVal = beforesourceset.detail.source as T[];\n break;\n }\n const beforesourceset = this.beforeanysource.emit({\n type,\n source: newVal,\n });\n const newSource = [...beforesourceset.detail.source];\n this.dataProvider.setData(newSource, type, this.disableVirtualY);\n\n /** applied for source only for cross compatability between plugins */\n if (watchName === 'source') {\n this.aftersourceset.emit({\n type,\n source: newVal,\n });\n }\n this.afteranysource.emit({\n type,\n source: newVal,\n });\n }\n\n @Watch('disableVirtualY') disableVirtualYChanged(\n newVal = false,\n prevVal = false,\n ) {\n if (newVal === prevVal) {\n return;\n }\n this.dataSourceChanged(this.source, this.source, 'source');\n }\n\n @Watch('rowDefinitions') rowDefChanged(\n after: RowDefinition[],\n before?: RowDefinition[],\n _watchName?: string,\n forceUpdate = true,\n ) {\n const {\n detail: { vals: newVal, oldVals: oldVal },\n } = this.beforerowdefinition.emit({\n vals: after,\n oldVals: before,\n });\n // apply new vals\n const newRows = rowDefinitionByType(newVal);\n // clear current defs\n if (oldVal) {\n const remove = rowDefinitionRemoveByType(oldVal);\n // clear all old data and drop sizes\n for (const t in remove) {\n if (remove.hasOwnProperty(t)) {\n const type = t as DimensionRows;\n const store = this.dataProvider.stores[type];\n const sourceLength = store.store.get('source').length;\n this.dimensionProvider.clearSize(type, sourceLength);\n }\n }\n }\n if (!newVal.length) {\n if (forceUpdate) {\n this.dimensionProvider.setCustomSizes('rgRow', {});\n } else {\n return;\n }\n }\n Object.entries(newRows).forEach(([k, r]) => {\n const type = k as DimensionRows;\n this.dimensionProvider.setCustomSizes(type, r.sizes || {});\n });\n }\n\n @Watch('trimmedRows') trimmedRowsChanged(\n newVal: Record<number, boolean> = {},\n ) {\n this.addTrimmed(newVal);\n }\n /**\n * Grouping\n */\n @Watch('grouping') groupingChanged(newVal: GroupingOptions = {}) {\n let grPlugin: GroupingRowPlugin | undefined;\n for (let p of this.internalPlugins) {\n const isGrouping = p as unknown as GroupingRowPlugin;\n if (!!isGrouping.setGrouping) {\n grPlugin = isGrouping;\n break;\n }\n }\n grPlugin?.setGrouping(newVal || {});\n }\n /**\n * Stretch Plugin Apply\n */\n @Watch('stretch') applyStretch(isStretch: boolean | string) {\n if (isStretch === 'false') {\n isStretch = false;\n }\n let stretch = this.internalPlugins.filter(p => isStretchPlugin(p))[0];\n if ((typeof isStretch === 'boolean' && isStretch) || isStretch === 'true') {\n if (!stretch) {\n const pluginData: PluginProviders = {\n data: this.dataProvider,\n column: this.columnProvider,\n dimension: this.dimensionProvider,\n viewport: this.viewportProvider,\n selection: this.selectionStoreConnector,\n };\n this.internalPlugins.push(new StretchColumn(this.element, pluginData));\n } else if (isStretchPlugin(stretch)) {\n stretch.applyStretch(this.columnProvider.getRawColumns());\n }\n } else if (stretch) {\n const index = this.internalPlugins.indexOf(stretch);\n this.internalPlugins.splice(index, 1);\n }\n }\n\n @Watch('filter') applyFilter(cfg: boolean | ColumnFilterConfig) {\n this.filterconfigchanged.emit(cfg);\n }\n\n @Watch('rowHeaders') rowHeadersChange(rowHeaders?: RowHeaders | boolean) {\n this.rowheaderschanged.emit(rowHeaders);\n }\n\n /**\n * Register external VNodes\n */\n @Watch('registerVNode') registerOutsideVNodes(elements: VNode[] = []) {\n this.extraElements = [...this.extraElements, ...elements];\n }\n\n @Watch('additionalData') additionalDataChanged(data: any) {\n this.additionaldatachanged.emit(data);\n }\n // #endregion\n\n // #region Plugins\n private setPlugins() {\n // remove old plugins if any\n this.removePlugins();\n\n // pass data provider to plugins\n const pluginData: PluginProviders = {\n data: this.dataProvider,\n column: this.columnProvider,\n dimension: this.dimensionProvider,\n viewport: this.viewportProvider,\n selection: this.selectionStoreConnector,\n };\n\n // register auto size plugin\n if (this.autoSizeColumn) {\n this.internalPlugins.push(\n new AutoSize(\n this.element,\n pluginData,\n typeof this.autoSizeColumn === 'object'\n ? this.autoSizeColumn\n : undefined,\n ),\n );\n }\n\n // register filter plugin\n if (this.filter) {\n this.internalPlugins.push(\n new FilterPlugin(\n this.element,\n pluginData,\n typeof this.filter === 'object' ? this.filter : undefined,\n ),\n );\n }\n\n // register export plugin\n if (this.exporting) {\n this.internalPlugins.push(new ExportFilePlugin(this.element, pluginData));\n }\n\n // register sorting plugin\n this.internalPlugins.push(new SortingPlugin(this.element, pluginData));\n\n // register grouping plugin\n this.internalPlugins.push(new GroupingRowPlugin(this.element, pluginData));\n if (this.canMoveColumns) {\n this.internalPlugins.push(new ColumnPlugin(this.element, pluginData));\n }\n\n // register user plugins\n this.plugins?.forEach(p => this.internalPlugins.push(new p(this.element, pluginData)));\n }\n\n private removePlugins() {\n this.internalPlugins.forEach(p => p.destroy?.());\n this.internalPlugins = [];\n }\n // #endregion\n\n\n // if reconnect to dom we need to set up plugins\n connectedCallback() {\n if (this.isInited) {\n this.setPlugins();\n }\n }\n\n /**\n * Called once just after the component is first connected to the DOM.\n * Since this method is only called once, it's a good place to load data asynchronously and to setup the state\n * without triggering extra re-renders.\n * A promise can be returned, that can be used to wait for the first render().\n */\n componentWillLoad() {\n // #region Setup Providers\n this.viewportProvider = new ViewportProvider();\n this.themeService = new ThemeService({\n rowSize: this.rowSize,\n });\n this.dimensionProvider = new DimensionProvider(this.viewportProvider, {\n realSizeChanged: (k: MultiDimensionType) =>\n this.contentsizechanged.emit(k),\n });\n this.columnProvider = new ColumnDataProvider();\n this.selectionStoreConnector = new SelectionStoreConnector();\n this.dataProvider = new DataProvider(this.dimensionProvider);\n // #endregion\n\n this.registerOutsideVNodes(this.registerVNode);\n\n // init plugins\n this.setPlugins();\n\n // set data\n this.applyStretch(this.stretch);\n this.themeChanged(this.theme, undefined, undefined, true);\n this.columnChanged(this.columns);\n this.dataSourceChanged(this.source, undefined, 'source');\n this.dataSourceChanged(this.pinnedTopSource, undefined, 'pinnedTopSource');\n this.dataSourceChanged(\n this.pinnedBottomSource,\n undefined,\n 'pinnedBottomSource',\n );\n if (Object.keys(this.trimmedRows ?? {}).length > 0) {\n this.trimmedRowsChanged(this.trimmedRows);\n }\n this.rowDefChanged(this.rowDefinitions);\n this.groupingChanged(this.grouping);\n\n // init scrolling service\n this.scrollingService = new GridScrollingService(\n (e: ViewPortScrollEvent) => {\n this.dimensionProvider.setViewPortCoordinate({\n coordinate: e.coordinate,\n type: e.dimension,\n });\n this.viewportscroll.emit(e);\n },\n );\n\n this.aftergridinit.emit();\n // set inited flag for connectedCallback\n this.isInited = true;\n }\n\n componentWillRender() {\n const event = this.beforegridrender.emit();\n if (event.defaultPrevented) {\n return false;\n }\n return Promise.all(this.jobsBeforeRender);\n }\n\n render() {\n const contentHeight =\n this.dimensionProvider.stores['rgRow'].store.get('realSize');\n\n // init viewport service helpers\n this.viewport = new ViewportService(\n {\n columnProvider: this.columnProvider,\n dataProvider: this.dataProvider,\n dimensionProvider: this.dimensionProvider,\n viewportProvider: this.viewportProvider,\n scrollingService: this.scrollingService,\n orderService: this.orderService,\n selectionStoreConnector: this.selectionStoreConnector,\n disableVirtualX: this.disableVirtualX,\n disableVirtualY: this.disableVirtualY,\n resize: c => this.aftercolumnresize.emit(c),\n },\n contentHeight,\n );\n\n // #region ViewportSections\n /**\n * The code renders a viewport divided into sections.\n * It starts by rendering the pinned start, data, and pinned end sections.\n * Within each section, it renders columns along with their headers, pinned top, center data, and pinned bottom.\n * The code iterates over the columns and their data to generate the view port's HTML structure.\n */\n\n const viewportSections: (VNode | VNode[])[] = [];\n\n // Row headers setting\n if (this.rowHeaders && this.viewport.columns.length) {\n const anyView = this.viewport.columns[0];\n viewportSections.push(\n <revogr-row-headers\n additionalData={this.additionalData}\n height={contentHeight}\n rowClass={this.rowClass}\n resize={this.resize}\n dataPorts={anyView.dataPorts}\n headerProp={anyView.headerProp}\n jobsBeforeRender={this.jobsBeforeRender}\n rowHeaderColumn={\n typeof this.rowHeaders === 'object' ? this.rowHeaders : undefined\n }\n onScrollview={({ detail: e }: CustomEvent) =>\n this.scrollingService.proxyScroll(e, 'headerRow')\n }\n onRef={({ detail: e }: CustomEvent) =>\n this.scrollingService.registerElement(e, 'headerRow')\n }\n />,\n );\n }\n\n // Viewport section render\n const isMobile = isMobileDevice();\n const viewPortHtml: VNode[] = [];\n\n // Render viewports column(horizontal sections)\n for (let view of this.viewport.columns) {\n const headerProperties: HeaderProperties = {\n ...view.headerProp,\n type: view.type,\n additionalData: this.additionalData,\n viewportCol: view.viewportCol,\n selectionStore: view.columnSelectionStore,\n canResize: this.resize,\n readonly: this.readonly,\n columnFilter: !!this.filter,\n };\n // Column headers\n const dataViews: VNode[] = [\n <revogr-header {...headerProperties} slot={HEADER_SLOT} />,\n ];\n\n // Render viewport data (vertical sections)\n view.dataPorts.forEach(data => {\n const key = `${data.type}_${view.type}`;\n const dataView = (\n <revogr-overlay-selection\n {...data}\n isMobileDevice={isMobile}\n selectionStore={data.segmentSelectionStore}\n onSelectall={() => this.selectionStoreConnector.selectAll()}\n editors={this.editors}\n readonly={this.readonly}\n range={this.range}\n useClipboard={this.useClipboard}\n applyChangesOnClose={this.applyOnClose}\n additionalData={this.additionalData}\n slot={data.slot}\n onBeforenextvpfocus={(e) => this.selectionStoreConnector.beforeNextFocusCell(e.detail)}\n onCanceledit={() => this.selectionStoreConnector.setEdit(false)}\n onSetedit={({ detail }) => {\n const event = this.beforeeditstart.emit(detail);\n if (!event.defaultPrevented) {\n this.selectionStoreConnector.setEdit(detail.val);\n }\n }}\n >\n <revogr-data\n {...data}\n colType={view.type}\n key={key}\n readonly={this.readonly}\n range={this.range}\n rowClass={this.rowClass}\n rowSelectionStore={data.rowSelectionStore}\n additionalData={this.additionalData}\n jobsBeforeRender={this.jobsBeforeRender}\n slot={DATA_SLOT}\n >\n <slot name={`data-${view.type}-${data.type}`} />\n </revogr-data>\n <revogr-temp-range\n selectionStore={data.segmentSelectionStore}\n dimensionRow={data.dimensionRow}\n dimensionCol={data.dimensionCol}\n />\n <revogr-focus\n colData={data.colData}\n dataStore={data.dataStore}\n focusTemplate={this.focusTemplate}\n rowType={data.type}\n colType={view.type}\n selectionStore={data.segmentSelectionStore}\n dimensionRow={data.dimensionRow}\n dimensionCol={data.dimensionCol}\n >\n <slot name={`focus-${view.type}-${data.type}`} />\n </revogr-focus>\n </revogr-overlay-selection>\n );\n\n dataViews.push(dataView);\n });\n\n // Add viewport scroll in the end\n viewPortHtml.push(\n <revogr-viewport-scroll\n {...view.prop}\n ref={el =>\n this.scrollingService.registerElement(el, `${view.prop.key}`)\n }\n onScrollviewport={e =>\n this.scrollingService.proxyScroll(e.detail, `${view.prop.key}`)\n }\n onScrollviewportsilent={e =>\n this.scrollingService.scrollSilentService(\n e.detail,\n `${view.prop.key}`,\n )\n }\n >\n {dataViews}\n </revogr-viewport-scroll>,\n );\n }\n\n viewportSections.push(viewPortHtml);\n // #endregion\n\n const typeRow: DimensionType = 'rgRow';\n const typeCol: DimensionType = 'rgCol';\n\n const viewports = this.viewportProvider.stores;\n const dimensions = this.dimensionProvider.stores;\n\n return (\n <Host>\n {this.hideAttribution ? null : (\n <revogr-attribution class=\"attribution\" />\n )}\n <div\n class=\"main-viewport\"\n onClick={(e: MouseEvent) => {\n if (e.currentTarget === e.target) {\n this.viewport?.clearEdit();\n }\n }}\n >\n <div class=\"viewports\">\n <slot name=\"viewport\" />\n {viewportSections}\n <revogr-scroll-virtual\n class=\"vertical\"\n dimension={typeRow}\n viewportStore={viewports[typeRow].store}\n dimensionStore={dimensions[typeRow].store}\n ref={el => this.scrollingService.registerElement(el, 'rowScroll')}\n onScrollvirtual={e => this.scrollingService.proxyScroll(e.detail)}\n />\n <OrderRenderer ref={e => (this.orderService = e)} />\n </div>\n </div>\n <revogr-scroll-virtual\n class=\"horizontal\"\n dimension={typeCol}\n viewportStore={viewports[typeCol].store}\n dimensionStore={dimensions[typeCol].store}\n ref={el => this.scrollingService.registerElement(el, 'colScroll')}\n onScrollvirtual={e => this.scrollingService.proxyScroll(e.detail)}\n />\n {this.extraElements}\n </Host>\n );\n }\n\n disconnectedCallback() {\n // Remove all plugins, to avoid memory leaks and unexpected behaviour when the component is removed\n this.removePlugins();\n }\n}\n"]}
1
+ {"version":3,"file":"revo-grid.js","sourceRoot":"","sources":["../../../src/components/revoGrid/revo-grid.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,KAAK,EACL,OAAO,EACP,MAAM,EACN,KAAK,EAEL,MAAM,EAEN,IAAI,GACL,MAAM,eAAe,CAAC;AAEvB,OAAO,kBAAkB,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAgB,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAC5D,OAAO,iBAAiB,MAAM,mCAAmC,CAAC;AAClE,OAAO,gBAAgB,MAAM,kCAAkC,CAAC;AAChE,OAAO,YAAY,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,QAEN,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EACL,YAAY,GAGb,MAAM,oCAAoC,CAAC;AAC5C,OAAO,aAAa,MAAM,sCAAsC,CAAC;AACjE,OAAO,gBAAgB,MAAM,oCAAoC,CAAC;AAElE,OAAO,iBAAiB,MAAM,+CAA+C,CAAC;AAE9E,OAAO,eAAgC,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,oBAAoB,MAAM,8BAA8B,CAAC;AAChE,OAAO,uBAAuB,MAAM,0CAA0C,CAAC;AAC/E,OAAO,aAAiC,MAAM,yBAAyB,CAAC;AACxE,OAAO,aAAa,EAAE,EACpB,eAAe,GAChB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAChF,OAAO,YAAY,MAAM,6CAA6C,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Prop,\n h,\n Watch,\n Element,\n Listen,\n Event,\n EventEmitter,\n Method,\n VNode,\n Host,\n} from '@stencil/core';\n\nimport ColumnDataProvider from '../../services/column.data.provider';\nimport { DataProvider } from '../../services/data.provider';\nimport { DSourceState, getVisibleSourceItem } from '@store';\nimport DimensionProvider from '../../services/dimension.provider';\nimport ViewportProvider from '../../services/viewport.provider';\nimport ThemeService from '../../themeManager/theme.service';\nimport { timeout } from '../../utils';\nimport AutoSize, {\n AutoSizeColumnConfig,\n} from '../../plugins/column.auto-size.plugin';\n\nimport {\n FilterPlugin,\n ColumnFilterConfig,\n FilterCollection,\n} from '../../plugins/filter/filter.plugin';\nimport SortingPlugin from '../../plugins/sorting/sorting.plugin';\nimport ExportFilePlugin from '../../plugins/export/export.plugin';\nimport { DataInput } from '../../plugins/export/types';\nimport GroupingRowPlugin from '../../plugins/groupingRow/grouping.row.plugin';\nimport { GroupingOptions } from '../../plugins/groupingRow/grouping.row.types';\nimport ViewportService, { FocusedData } from './viewport.service';\nimport { DATA_SLOT, HEADER_SLOT } from './viewport.helpers';\nimport GridScrollingService from './viewport.scrolling.service';\nimport SelectionStoreConnector from '../../services/selection.store.connector';\nimport OrderRenderer, { OrdererService } from '../order/order-renderer';\nimport StretchColumn, {\n isStretchPlugin,\n} from '../../plugins/column.stretch.plugin';\nimport { rowDefinitionByType, rowDefinitionRemoveByType } from './grid.helpers';\nimport ColumnPlugin from '../../plugins/moveColumn/column.drag.plugin';\nimport { getPropertyFromEvent } from '../../utils/events';\nimport { isMobileDevice } from '../../utils/mobile';\nimport {\n MultiDimensionType,\n DimensionRows,\n DimensionCols,\n DimensionType,\n DimensionTypeCol,\n RowHeaders,\n ColumnRegular,\n ColumnGrouping,\n DataType,\n RowDefinition,\n ColumnType,\n FocusTemplateFunc,\n PositionItem,\n ColumnProp,\n ViewPortScrollEvent,\n InitialHeaderClick,\n AllDimensionType,\n Editors,\n BeforeSaveDataDetails,\n BeforeRangeSaveDataDetails,\n Cell,\n ChangedRange,\n RangeArea,\n AfterEditEvent,\n Theme,\n PluginBaseComponent,\n HeaderProperties,\n PluginProviders,\n} from '@type';\nimport type { Observable } from '../../utils/store.utils';\nimport type { GridPlugin } from '../../plugins/base.plugin';\nimport { ColumnCollection, getColumnByProp, getColumns } from '../../utils/column.utils';\n\n\n/**\n * Revogrid - High-performance, customizable grid library for managing large datasets.\n *\n * :::tip\n * Read [type definition file](https://github.com/revolist/revogrid/blob/master/src/interfaces.d.ts) for the full interface information.\n * All complex property types such as `ColumnRegular`, `ColumnProp`, `ColumnDataSchemaModel` can be found there.\n * :::\n *\n * :::tip\n * For a comprehensive events guide, check the [dependency tree](#Dependencies).\n * All events propagate to the root level of the grid.\n * :::\n *\n * @slot data-{column-type}-{row-type}. @example data-rgCol-rgRow - main data slot. Applies extra elements in <revogr-data />.\n * @slot focus-{column-type}-{row-type}. @example focus-rgCol-rgRow - focus layer for main data. Applies extra elements in <revogr-focus />.\n */\n@Component({\n tag: 'revo-grid',\n styleUrl: 'revo-grid-style.scss',\n})\nexport class RevoGridComponent {\n // #region Properties\n /** Excel like functionality.\n * Show row numbers.\n * Also can be used for custom row header render if object provided.\n */\n @Prop() rowHeaders: RowHeaders | boolean;\n\n /**\n * Defines how many rows/columns should be rendered outside visible area.\n */\n @Prop() frameSize = 1;\n\n /**\n * Indicates default rgRow size.\n * By default 0, means theme package size will be applied\n *\n * Alternatively you can use `rowSize` to reset viewport\n */\n @Prop() rowSize = 0;\n\n /** Indicates default column size. */\n @Prop() colSize = 100;\n\n /** When true, user can range selection. */\n @Prop() range = false;\n\n /** When true, grid in read only mode. */\n @Prop() readonly = false;\n\n /** When true, columns are resizable. */\n @Prop() resize = false;\n\n /** When true cell focus appear. */\n @Prop() canFocus = true;\n\n /** When true enable clipboard. */\n @Prop() useClipboard = true;\n\n /**\n * Columns - defines an array of grid columns.\n * Can be column or grouped column.\n */\n @Prop() columns: (ColumnRegular | ColumnGrouping)[] = [];\n /**\n * Source - defines main data source.\n * Can be an Object or 2 dimensional array([][]);\n * Keys/indexes referenced from columns Prop.\n */\n @Prop() source: DataType[] = [];\n\n /** Pinned top Source: {[T in ColumnProp]: any} - defines pinned top rows data source. */\n @Prop() pinnedTopSource: DataType[] = [];\n\n /** Pinned bottom Source: {[T in ColumnProp]: any} - defines pinned bottom rows data source. */\n @Prop() pinnedBottomSource: DataType[] = [];\n\n /** Custom row properies to be applied. See `RowDefinition` for more info. */\n @Prop() rowDefinitions: RowDefinition[] = [];\n\n /** Custom editors register. */\n @Prop() editors: Editors = {};\n\n /**\n * Apply changes in editor when closed except 'Escape' cases.\n * If custom editor in use method getValue required.\n * Check interfaces.d.ts `EditorBase` for more info.\n */\n @Prop() applyOnClose = false;\n\n /**\n * Custom grid plugins.\n * Has to be predefined during first grid init.\n * Every plugin should be inherited from BasePlugin.\n */\n @Prop() plugins: GridPlugin[] = [];\n\n /**\n * Column Types Format.\n * Every type represent multiple column properties.\n * Types will be merged but can be replaced with column properties.\n * Types were made as separate objects to be reusable per multiple columns.\n */\n @Prop() columnTypes: { [name: string]: ColumnType } = {};\n\n /** Theme name. */\n @Prop({ reflect: true, mutable: true }) theme: Theme = 'default';\n\n /**\n * Row class property mapping.\n * Map custom classes to rows from row object data.\n * Define this property in rgRow object and this will be mapped as rgRow class.\n */\n @Prop({ reflect: true }) rowClass = '';\n\n /**\n * Autosize config.\n * Enables columns autoSize.\n * For more details check `autoSizeColumn` plugin.\n * By default disabled, hence operation is not performance efficient.\n * `true` to enable with default params (double header separator click for autosize).\n * Or define config. See `AutoSizeColumnConfig` for more details.\n */\n @Prop() autoSizeColumn: boolean | AutoSizeColumnConfig = false;\n\n /**\n * Enables filter plugin.\n * Can be boolean.\n * Or can be filter collection See `FilterCollection` for more info.\n */\n @Prop() filter: boolean | ColumnFilterConfig = false;\n\n /**\n * Apply changes typed in editor on editor close except Escape cases.\n * If custom editor in use method `getValue` required.\n * Check `interfaces.d.ts` `EditorBase` for more info.\n */\n @Prop() focusTemplate: FocusTemplateFunc;\n\n /**\n * Enable column move plugin.\n */\n @Prop() canMoveColumns = false;\n /**\n * Trimmed rows.\n * Functionality which allows to hide rows from main data set.\n * `trimmedRows` are physical `rgRow` indexes to hide.\n */\n @Prop() trimmedRows: Record<number, boolean> = {};\n\n /**\n * Enable export plugin.\n */\n @Prop() exporting = false;\n\n /**\n * Group rows based on this property.\n * Define properties to be groped by grouping plugin See `GroupingOptions`.\n */\n @Prop() grouping: GroupingOptions;\n\n /**\n * Stretch strategy for columns by `StretchColumn` plugin.\n * For example if there are more space on the right last column size would be increased.\n */\n @Prop() stretch: boolean | string = true;\n\n /**\n * Additional data to be passed to plugins, renders or editors.\n * For example if you need to pass Vue component instance.\n */\n @Prop() additionalData: any = {};\n\n /**\n * Disable lazy rendering mode for the `X axis`.\n * Use when not many columns present and you don't need rerenader cells during scroll.\n * Can be used for initial rendering performance improvement.\n */\n @Prop() disableVirtualX = false;\n /**\n * Disable lazy rendering mode for the `Y axis`.\n * Use when not many rows present and you don't need rerenader cells during scroll.\n * Can be used for initial rendering performance improvement.\n */\n @Prop() disableVirtualY = false;\n\n /**\n * Please only hide the attribution if you are subscribed to Pro version\n */\n @Prop() hideAttribution = false;\n\n /**\n * Prevent rendering until job is done.\n * Can be used for initial rendering performance improvement.\n * When several plugins require initial rendering this will prevent double initial rendering.\n */\n @Prop() jobsBeforeRender: Promise<any>[] = [];\n\n /**\n * Register new virtual node inside of grid.\n * Used for additional items creation such as plugin elements.\n * Should be set before grid render inside of plugins.\n */\n @Prop() registerVNode: VNode[] = [];\n\n // #endregion\n\n // #region Events\n /**\n * New content size has been applied. The size excludes the header.\n * Currently, the event responsible for applying the new content size does not provide the actual size.\n * To retrieve the actual content size, you can utilize the `getContentSize` function after the event has been triggered.\n */\n @Event() contentsizechanged: EventEmitter<MultiDimensionType>;\n\n /**\n * This event is triggered before the data is edited.\n * To prevent the default behavior of editing data and use your own implementation, call `e.preventDefault()`.\n * To override the edit result with your own value, set the `e.val` property to your desired value.\n */\n @Event() beforeedit: EventEmitter<BeforeSaveDataDetails>;\n\n /**\n * This event is triggered before applying range data, specifically when a range selection occurs.\n * To customize the data and prevent the default edit data from being set, you can call `e.preventDefault()`.\n */\n @Event() beforerangeedit: EventEmitter<BeforeRangeSaveDataDetails>;\n\n /**\n * Triggered after data applied or range changed.\n */\n @Event() afteredit: EventEmitter<AfterEditEvent>;\n\n /**\n * This event is triggered before autofill is applied.\n * To prevent the default behavior of applying the edit data, you can call `e.preventDefault()`.\n */\n @Event() beforeautofill: EventEmitter<ChangedRange>;\n\n /**\n * Triggered before range applied.\n * Use e.preventDefault() to prevent range.\n */\n @Event() beforerange: EventEmitter<ChangedRange>;\n\n /**\n * Triggered after focus render finished.\n * Can be used to access a focus element through `event.target`\n */\n @Event() afterfocus: EventEmitter<{\n model: any;\n column: ColumnRegular;\n }>;\n\n /**\n * This event is triggered before the order of `rgRow` is applied.\n * To prevent the default behavior of changing the order of `rgRow`, you can call `e.preventDefault()`.\n */\n @Event() roworderchanged: EventEmitter<{ from: number; to: number }>;\n\n /**\n * Triggered by sorting.plugin.ts\n * Before sorting apply.\n * Use e.preventDefault() to prevent sorting data change.\n */\n @Event() beforesortingapply: EventEmitter<{\n column: ColumnRegular;\n order: 'desc' | 'asc';\n additive: boolean;\n }>;\n\n /**\n * Triggered by sorting.plugin.ts\n * Before sorting event.\n * Initial sorting triggered, if this event stops no other event called.\n * Use e.preventDefault() to prevent sorting.\n */\n @Event() beforesorting: EventEmitter<{\n column: ColumnRegular;\n order: 'desc' | 'asc';\n additive: boolean;\n }>;\n\n /**\n * This event is triggered when the row order change is started.\n * To prevent the default behavior of changing the row order, you can call `e.preventDefault()`.\n * To change the item name at the start of the row order change, you can set `e.text` to the desired new name.\n */\n @Event() rowdragstart: EventEmitter<{\n pos: PositionItem;\n text: string;\n }>;\n\n /**\n * On header click.\n */\n @Event() headerclick: EventEmitter<ColumnRegular>;\n\n /**\n * This event is triggered before the cell focus is changed.\n * To prevent the default behavior of changing the cell focus, you can call `e.preventDefault()`.\n */\n @Event() beforecellfocus: EventEmitter<BeforeSaveDataDetails>;\n\n /**\n * This event is triggered before the grid focus is lost.\n * To prevent the default behavior of changing the cell focus, you can call `e.preventDefault()`.\n */\n @Event() beforefocuslost: EventEmitter<FocusedData | null>;\n\n /**\n * Before main source/rows data apply.\n * You can override data source here\n */\n @Event() beforesourceset: EventEmitter<{\n type: DimensionRows;\n source: DataType[];\n }>;\n\n /**\n * Before data apply on any source type. Can be source from pinned and main viewport.\n * You can override data source here\n */\n @Event() beforeanysource: EventEmitter<{\n type: DimensionRows;\n source: DataType[];\n }>;\n\n /**\n * After main source/rows updated\n */\n @Event() aftersourceset: EventEmitter<{\n type: DimensionRows;\n source: DataType[];\n }>;\n\n /**\n * Emitted after each source update, whether from the pinned or main viewport.\n * Useful for tracking all changes originating from sources in both the pinned and main viewports.\n */\n @Event() afteranysource: EventEmitter<{\n type: DimensionRows;\n source: DataType[];\n }>;\n\n /**\n * Emitted before a column update is applied.\n * Listeners can use this event to perform any necessary actions or modifications before the column update is finalized.\n */\n @Event() beforecolumnsset: EventEmitter<ColumnCollection>;\n\n /**\n * Emitted before a column update is applied, after the column set is gathered and the viewport is updated.\n * Useful for performing actions or modifications before the final application of the column update.\n */\n @Event() beforecolumnapplied: EventEmitter<ColumnCollection>;\n\n /** Column updated */\n @Event() aftercolumnsset: EventEmitter<{\n columns: ColumnCollection;\n order: Record<ColumnProp, 'asc' | 'desc' | undefined>;\n }>;\n\n /**\n * Emitted before applying a filter to the data source.\n * Use e.preventDefault() to prevent cell focus change.\n * Modify the @collection if you need to change filters.\n */\n @Event() beforefilterapply: EventEmitter<{ collection: FilterCollection }>;\n\n /**\n * Emitted before applying a filter to the data source.\n * Use e.preventDefault() to prevent the default behavior of trimming values and applying the filter.\n * Modify the `collection` property if you want to change the filters.\n * Modify the `itemsToFilter` property if you want to filter the indexes for trimming.\n */\n @Event() beforefiltertrimmed: EventEmitter<{\n collection: FilterCollection;\n itemsToFilter: Record<number, boolean>;\n }>;\n\n /**\n * Emitted before trimming values.\n * Use e.preventDefault() to prevent the default behavior of trimming values.\n * Modify the `trimmed` property if you want to filter the indexes for trimming.\n */\n @Event() beforetrimmed: EventEmitter<{\n trimmed: Record<number, boolean>;\n trimmedType: string;\n type: string;\n }>;\n\n /**\n * Emitted after trimmed values have been applied.\n * Useful for notifying when trimming of values has taken place.\n */\n @Event() aftertrimmed: EventEmitter;\n\n /**\n * Emitted when the viewport is scrolled.\n * Useful for tracking viewport scrolling events.\n */\n @Event() viewportscroll: EventEmitter<ViewPortScrollEvent>;\n\n /**\n * Before export\n * Use e.preventDefault() to prevent export\n * Replace data in Event in case you want to modify it in export\n */\n @Event() beforeexport: EventEmitter<DataInput>;\n\n /**\n * Emitted before editing starts.\n * Use e.preventDefault() to prevent the default edit behavior.\n */\n @Event() beforeeditstart: EventEmitter<BeforeSaveDataDetails>;\n\n /**\n * Emitted after column resizing.\n * Useful for retrieving the resized columns.\n */\n @Event() aftercolumnresize: EventEmitter<{\n [index: number]: ColumnRegular;\n }>;\n\n /**\n * Emitted before the row definition is applied.\n * Useful for modifying or preventing the default row definition behavior.\n */\n @Event() beforerowdefinition: EventEmitter<{ vals: any; oldVals: any }>;\n\n /**\n * Emitted when the filter configuration is changed\n */\n @Event() filterconfigchanged: EventEmitter;\n\n /**\n * Emmited when the row headers are changed.\n */\n @Event() rowheaderschanged: EventEmitter;\n\n /**\n * Emmited before the grid is rendered.\n */\n @Event() beforegridrender: EventEmitter;\n\n /**\n * Emmited after the grid is initialized. Connected to the DOM.\n */\n @Event() aftergridinit: EventEmitter;\n\n /**\n * Emmited after the additional data is changed\n */\n @Event() additionaldatachanged: EventEmitter<any>;\n\n /**\n * Emmited after the theme is changed\n */\n @Event() afterthemechanged: EventEmitter<Theme>\n\n // #endregion\n\n // #region Methods\n /**\n * Refreshes data viewport.\n * Can be specific part as rgRow or pinned rgRow or 'all' by default.\n */\n @Method() async refresh(type: DimensionRows | 'all' = 'all') {\n this.dataProvider.refresh(type);\n }\n\n /**\n * Sets data at specified cell.\n * Useful for performance optimization.\n * No viewport update will be triggered.\n */\n @Method() async setDataAt(\n data: {\n row: number;\n col: number;\n } & AllDimensionType,\n ) {\n const dataElement: HTMLRevogrDataElement | null =\n this.element.querySelector(\n `revogr-data[type=\"${data.rowType}\"][col-type=\"${data.colType}\"]`,\n );\n return dataElement?.updateCell({\n row: data.row,\n col: data.col,\n });\n }\n\n /**\n * Scrolls viewport to specified row by index.\n */\n @Method() async scrollToRow(coordinate = 0) {\n const y = this.dimensionProvider.getViewPortPos({\n coordinate,\n dimension: 'rgRow',\n });\n await this.scrollToCoordinate({ y });\n }\n\n /**\n * Scrolls viewport to specified column by index.\n */\n @Method() async scrollToColumnIndex(coordinate = 0) {\n const x = this.dimensionProvider.getViewPortPos({\n coordinate,\n dimension: 'rgCol',\n });\n await this.scrollToCoordinate({ x });\n }\n\n /**\n * Scrolls viewport to specified column by prop\n */\n @Method() async scrollToColumnProp(\n prop: ColumnProp,\n dimension: DimensionTypeCol = 'rgCol',\n ) {\n const coordinate = this.columnProvider.getColumnIndexByProp(\n prop,\n dimension,\n );\n if (coordinate < 0) {\n // already on the screen\n return;\n }\n const x = this.dimensionProvider.getViewPortPos({\n coordinate,\n dimension,\n });\n await this.scrollToCoordinate({ x });\n }\n\n /** Update columns */\n @Method() async updateColumns(cols: ColumnRegular[]) {\n this.columnProvider.updateColumns(cols);\n }\n\n /** Add trimmed by type */\n @Method() async addTrimmed(\n trimmed: Record<number, boolean>,\n trimmedType = 'external',\n type: DimensionRows = 'rgRow',\n ) {\n const event = this.beforetrimmed.emit({\n trimmed,\n trimmedType,\n type,\n });\n if (event.defaultPrevented) {\n return event;\n }\n this.dataProvider.setTrimmed({ [trimmedType]: event.detail.trimmed }, type);\n this.aftertrimmed.emit();\n return event;\n }\n\n /** Scrolls view port to coordinate */\n @Method() async scrollToCoordinate(cell: Partial<Cell>) {\n this.viewport?.scrollToCell(cell);\n }\n\n /** Open editor for cell. */\n @Method() async setCellEdit(\n rgRow: number,\n prop: ColumnProp,\n rowSource: DimensionRows = 'rgRow',\n ) {\n const rgCol = getColumnByProp(this.columns, prop);\n if (!rgCol) {\n return;\n }\n await timeout();\n const colGroup = rgCol.pin || 'rgCol';\n this.viewport?.setEdit(\n rgRow,\n this.columnProvider.getColumnIndexByProp(prop, colGroup),\n colGroup,\n rowSource,\n );\n }\n\n /** Set focus range. */\n @Method() async setCellsFocus(\n cellStart: Cell = { x: 0, y: 0 },\n cellEnd: Cell = { x: 0, y: 0 },\n colType = 'rgCol',\n rowType = 'rgRow',\n ) {\n this.viewport?.setFocus(colType, rowType, cellStart, cellEnd);\n }\n\n /** Get data from source */\n @Method() async getSource(type: DimensionRows = 'rgRow') {\n return this.dataProvider.stores[type].store.get('source');\n }\n\n /**\n * Get data from visible part of source\n * Trimmed/filtered rows will be excluded\n * @param type - type of source\n */\n @Method() async getVisibleSource(type: DimensionRows = 'rgRow') {\n return getVisibleSourceItem(this.dataProvider.stores[type].store);\n }\n\n /**\n * Provides access to rows internal store observer\n * Can be used for plugin support\n * @param type - type of source\n */\n @Method() async getSourceStore(\n type: DimensionRows = 'rgRow',\n ): Promise<Observable<DSourceState<DataType, DimensionRows>>> {\n return this.dataProvider.stores[type].store;\n }\n /**\n * Provides access to column internal store observer\n * Can be used for plugin support\n * @param type - type of column\n */\n @Method() async getColumnStore(\n type: DimensionCols = 'rgCol',\n ): Promise<Observable<DSourceState<ColumnRegular, DimensionCols>>> {\n return this.columnProvider.stores[type].store;\n }\n\n /**\n * Update column sorting\n * @param column - full column details to update\n * @param index - virtual column index\n * @param order - order to apply\n * @param additive - if false will replace current order\n */\n @Method() async updateColumnSorting(\n column: ColumnRegular,\n index: number,\n order: 'asc' | 'desc' | undefined,\n additive: boolean,\n ) {\n return this.columnProvider.updateColumnSorting(\n column,\n index,\n order,\n additive,\n );\n }\n\n /**\n * Clears column sorting\n */\n @Method() async clearSorting() {\n this.columnProvider.clearSorting();\n }\n\n /**\n * Receive all columns in data source\n */\n @Method() async getColumns(): Promise<ColumnRegular[]> {\n return this.columnProvider.getColumns();\n }\n\n /**\n * Clear current grid focus. Grid has no longer focus on it.\n */\n @Method() async clearFocus() {\n const focused = this.viewport?.getFocused();\n const event = this.beforefocuslost.emit(focused);\n if (event.defaultPrevented) {\n return;\n }\n this.selectionStoreConnector.clearAll();\n }\n\n /**\n * Get all active plugins instances\n */\n @Method() async getPlugins(): Promise<PluginBaseComponent[]> {\n return [...this.internalPlugins];\n }\n\n /**\n * Get the currently focused cell.\n */\n @Method() async getFocused(): Promise<FocusedData | null> {\n return this.viewport?.getFocused() ?? null;\n }\n\n /**\n * Get size of content\n * Including all pinned data\n */\n @Method() async getContentSize(): Promise<Cell> {\n return this.dimensionProvider?.getFullSize();\n }\n /**\n * Get the currently selected Range.\n */\n @Method() async getSelectedRange(): Promise<RangeArea | null> {\n return this.viewport?.getSelectedRange() ?? null;\n }\n\n // #endregion\n\n // #region Listeners outside scope\n private clickTrackForFocusClear?: number;\n @Listen('touchstart', { target: 'document' })\n @Listen('mousedown', { target: 'document' })\n mousedownHandle(event: MouseEvent | TouchEvent) {\n const screenX = getPropertyFromEvent(event, 'screenX');\n const screenY = getPropertyFromEvent(event, 'screenY');\n if (screenX === null || screenY === null) {\n return;\n }\n\n this.clickTrackForFocusClear = screenX + screenY;\n }\n /**\n * To keep your elements from losing focus use mouseup/touchend e.preventDefault();\n */\n @Listen('touchend', { target: 'document' })\n @Listen('mouseup', { target: 'document' })\n async mouseupHandle(event: MouseEvent | TouchEvent) {\n const screenX = getPropertyFromEvent(event, 'screenX');\n const screenY = getPropertyFromEvent(event, 'screenY');\n if (screenX === null || screenY === null) {\n return;\n }\n\n if (event.defaultPrevented) {\n return;\n }\n const pos = screenX + screenY;\n // detect if mousemove then do nothing\n if (Math.abs((this.clickTrackForFocusClear ?? 0) - pos) > 10) {\n return;\n }\n\n // Check if action finished inside the document\n // if event prevented, or it is current table don't clear focus\n const path = event.composedPath();\n if (!path.includes(this.element) &&\n !(this.element.shadowRoot && path.includes(this.element.shadowRoot))\n ) {\n // Perform actions if the click is outside the component\n await this.clearFocus();\n }\n }\n // #endregion\n\n // #region Listeners\n /** Drag events */\n @Listen('rowdragstartinit') onRowDragStarted(\n e: CustomEvent<{\n pos: PositionItem;\n text: string;\n event: MouseEvent;\n }>,\n ) {\n const dragStart = this.rowdragstart.emit(e.detail);\n if (dragStart.defaultPrevented) {\n e.preventDefault();\n return;\n }\n this.orderService?.start(this.element, {\n ...e.detail,\n ...dragStart.detail,\n });\n }\n\n @Listen('rowdragendinit') onRowDragEnd() {\n this.orderService?.end();\n }\n\n @Listen('rowdragmoveinit') onRowDrag({ detail }: CustomEvent<PositionItem>) {\n this.orderService?.move(detail);\n }\n\n @Listen('rowdragmousemove') onRowMouseMove(e: CustomEvent<Cell>) {\n this.orderService?.moveTip(e.detail);\n }\n\n @Listen('celleditapply') async onCellEdit(\n e: CustomEvent<BeforeSaveDataDetails>,\n ) {\n const { defaultPrevented, detail } = this.beforeedit.emit(e.detail);\n await timeout();\n // apply data\n if (!defaultPrevented) {\n this.dataProvider.setCellData(detail);\n\n // @feature: incrimental update for cells\n // this.dataProvider.setCellData(detail, false);\n // await this.setDataAt({\n // row: detail.rowIndex,\n // col: detail.colIndex,\n // rowType: detail.type,\n // colType: detail.colType,\n // });\n this.afteredit.emit(detail);\n }\n }\n\n @Listen('rangeeditapply') onRangeEdit(\n e: CustomEvent<BeforeRangeSaveDataDetails>,\n ) {\n const { defaultPrevented, detail } = this.beforerangeedit.emit(e.detail);\n if (defaultPrevented) {\n e.preventDefault();\n return;\n }\n this.dataProvider.setRangeData(detail.data, detail.type);\n this.afteredit.emit(detail);\n }\n\n @Listen('selectionchangeinit') onRangeChanged(e: CustomEvent<ChangedRange>) {\n const beforeange = this.beforerange.emit(e.detail);\n if (beforeange.defaultPrevented) {\n e.preventDefault();\n }\n const beforeFill = this.beforeautofill.emit(beforeange.detail);\n if (beforeFill.defaultPrevented) {\n e.preventDefault();\n }\n }\n\n @Listen('rowdropinit') onRowDropped(\n e: CustomEvent<{ from: number; to: number }>,\n ) {\n // e.cancelBubble = true;\n const { defaultPrevented } = this.roworderchanged.emit(e.detail);\n if (defaultPrevented) {\n e.preventDefault();\n }\n }\n\n @Listen('beforeheaderclick') onHeaderClick(\n e: CustomEvent<InitialHeaderClick>,\n ) {\n const { defaultPrevented } = this.headerclick.emit({\n ...e.detail.column,\n originalEvent: e.detail.originalEvent,\n });\n if (defaultPrevented) {\n e.preventDefault();\n }\n }\n\n @Listen('beforecellfocusinit') onCellFocus(\n e: CustomEvent<BeforeSaveDataDetails>,\n ) {\n const { defaultPrevented } = this.beforecellfocus.emit(e.detail);\n if (!this.canFocus || defaultPrevented) {\n e.preventDefault();\n }\n }\n\n // #endregion\n\n // #region Private Properties\n @Element() element: HTMLRevoGridElement;\n private extraElements: VNode[] = [];\n\n columnProvider: ColumnDataProvider;\n dataProvider: DataProvider;\n dimensionProvider: DimensionProvider;\n viewportProvider: ViewportProvider;\n private themeService: ThemeService;\n private viewport: ViewportService | null = null;\n private isInited = false;\n\n private orderService: OrdererService;\n private selectionStoreConnector: SelectionStoreConnector;\n private scrollingService: GridScrollingService;\n\n /**\n * Plugins\n * Define plugins collection\n */\n private internalPlugins: PluginBaseComponent[] = [];\n // #endregion\n\n // #region Watchers\n @Watch('columnTypes') columnTypesChanged() {\n // Column format change will trigger column structure update\n this.columnChanged(this.columns);\n }\n @Watch('columns') columnChanged(newVal: (ColumnGrouping | ColumnRegular)[] = []) {\n const columnGather = getColumns(\n newVal,\n 0,\n this.columnTypes,\n );\n this.beforecolumnsset.emit(columnGather);\n this.dimensionProvider.applyNewColumns(\n columnGather.columns,\n this.disableVirtualX,\n );\n this.beforecolumnapplied.emit(columnGather);\n const columns = this.columnProvider.setColumns(columnGather);\n this.aftercolumnsset.emit({\n columns,\n order: this.columnProvider.order,\n });\n }\n\n @Watch('disableVirtualX') disableVirtualXChanged(\n newVal = false,\n prevVal = false,\n ) {\n if (newVal === prevVal) {\n return;\n }\n this.columnChanged(this.columns);\n }\n\n @Watch('rowSize') rowSizeChanged(s: number) {\n // clear existing data\n this.dimensionProvider.setSettings({ originItemSize: s }, 'rgRow');\n this.rowDefChanged(this.rowDefinitions, this.rowDefinitions, 'rowSize', true);\n }\n\n @Watch('theme') themeChanged(\n t: Theme,\n _?: Theme,\n __ = 'theme',\n init = false,\n ) {\n this.themeService.register(t);\n this.dimensionProvider.setSettings(\n { originItemSize: this.themeService.rowSize },\n 'rgRow',\n );\n this.dimensionProvider.setSettings(\n { originItemSize: this.colSize },\n 'rgCol',\n );\n // if theme change we need to reapply row size and reset viewport\n if (!init) {\n // clear existing data\n this.dimensionProvider.setSettings(\n { originItemSize: this.themeService.rowSize },\n 'rgRow',\n );\n this.rowDefChanged(\n // for cases when some custom size present and not\n this.rowDefinitions,\n this.rowDefinitions,\n 'theme',\n true,\n );\n }\n this.afterthemechanged.emit(t);\n }\n\n @Watch('source')\n @Watch('pinnedBottomSource')\n @Watch('pinnedTopSource')\n dataSourceChanged<T extends DataType>(\n newVal: T[] = [],\n _: T[] | undefined,\n watchName: string,\n ) {\n let type: DimensionRows = 'rgRow';\n switch (watchName) {\n case 'pinnedBottomSource':\n type = 'rowPinEnd';\n break;\n case 'pinnedTopSource':\n type = 'rowPinStart';\n break;\n case 'source':\n type = 'rgRow';\n /** applied for source only for cross compatability between plugins */\n const beforesourceset = this.beforesourceset.emit({\n type,\n source: newVal,\n });\n newVal = beforesourceset.detail.source as T[];\n break;\n }\n const beforesourceset = this.beforeanysource.emit({\n type,\n source: newVal,\n });\n const newSource = [...beforesourceset.detail.source];\n this.dataProvider.setData(newSource, type, this.disableVirtualY);\n\n /** applied for source only for cross compatability between plugins */\n if (watchName === 'source') {\n this.aftersourceset.emit({\n type,\n source: newVal,\n });\n }\n this.afteranysource.emit({\n type,\n source: newVal,\n });\n }\n\n @Watch('disableVirtualY') disableVirtualYChanged(\n newVal = false,\n prevVal = false,\n ) {\n if (newVal === prevVal) {\n return;\n }\n this.dataSourceChanged(this.source, this.source, 'source');\n }\n\n @Watch('rowDefinitions') rowDefChanged(\n after: RowDefinition[],\n before?: RowDefinition[],\n _watchName?: string,\n forceUpdate = true,\n ) {\n const {\n detail: { vals: newVal, oldVals: oldVal },\n } = this.beforerowdefinition.emit({\n vals: after,\n oldVals: before,\n });\n // apply new vals\n const newRows = rowDefinitionByType(newVal);\n // clear current defs\n if (oldVal) {\n const remove = rowDefinitionRemoveByType(oldVal);\n // clear all old data and drop sizes\n for (const t in remove) {\n if (remove.hasOwnProperty(t)) {\n const type = t as DimensionRows;\n const store = this.dataProvider.stores[type];\n const sourceLength = store.store.get('source').length;\n this.dimensionProvider.clearSize(type, sourceLength);\n }\n }\n }\n if (!newVal.length) {\n if (forceUpdate) {\n this.dimensionProvider.setCustomSizes('rgRow', {});\n } else {\n return;\n }\n }\n Object.entries(newRows).forEach(([k, r]) => {\n const type = k as DimensionRows;\n this.dimensionProvider.setCustomSizes(type, r.sizes || {});\n });\n }\n\n @Watch('trimmedRows') trimmedRowsChanged(\n newVal: Record<number, boolean> = {},\n ) {\n this.addTrimmed(newVal);\n }\n /**\n * Grouping\n */\n @Watch('grouping') groupingChanged(newVal: GroupingOptions = {}) {\n let grPlugin: GroupingRowPlugin | undefined;\n for (let p of this.internalPlugins) {\n const isGrouping = p as unknown as GroupingRowPlugin;\n if (!!isGrouping.setGrouping) {\n grPlugin = isGrouping;\n break;\n }\n }\n grPlugin?.setGrouping(newVal || {});\n }\n /**\n * Stretch Plugin Apply\n */\n @Watch('stretch') applyStretch(isStretch: boolean | string) {\n if (isStretch === 'false') {\n isStretch = false;\n }\n let stretch = this.internalPlugins.filter(p => isStretchPlugin(p))[0];\n if ((typeof isStretch === 'boolean' && isStretch) || isStretch === 'true') {\n if (!stretch) {\n const pluginData: PluginProviders = {\n data: this.dataProvider,\n column: this.columnProvider,\n dimension: this.dimensionProvider,\n viewport: this.viewportProvider,\n selection: this.selectionStoreConnector,\n };\n this.internalPlugins.push(new StretchColumn(this.element, pluginData));\n } else if (isStretchPlugin(stretch)) {\n stretch.applyStretch(this.columnProvider.getRawColumns());\n }\n } else if (stretch) {\n const index = this.internalPlugins.indexOf(stretch);\n this.internalPlugins.splice(index, 1);\n }\n }\n\n @Watch('filter') applyFilter(cfg: boolean | ColumnFilterConfig) {\n this.filterconfigchanged.emit(cfg);\n }\n\n @Watch('rowHeaders') rowHeadersChange(rowHeaders?: RowHeaders | boolean) {\n this.rowheaderschanged.emit(rowHeaders);\n }\n\n /**\n * Register external VNodes\n */\n @Watch('registerVNode') registerOutsideVNodes(elements: VNode[] = []) {\n this.extraElements = [...this.extraElements, ...elements];\n }\n\n @Watch('additionalData') additionalDataChanged(data: any) {\n this.additionaldatachanged.emit(data);\n }\n // #endregion\n\n // #region Plugins\n private setPlugins() {\n // remove old plugins if any\n this.removePlugins();\n\n // pass data provider to plugins\n const pluginData: PluginProviders = {\n data: this.dataProvider,\n column: this.columnProvider,\n dimension: this.dimensionProvider,\n viewport: this.viewportProvider,\n selection: this.selectionStoreConnector,\n };\n\n // register auto size plugin\n if (this.autoSizeColumn) {\n this.internalPlugins.push(\n new AutoSize(\n this.element,\n pluginData,\n typeof this.autoSizeColumn === 'object'\n ? this.autoSizeColumn\n : undefined,\n ),\n );\n }\n\n // register filter plugin\n if (this.filter) {\n this.internalPlugins.push(\n new FilterPlugin(\n this.element,\n pluginData,\n typeof this.filter === 'object' ? this.filter : undefined,\n ),\n );\n }\n\n // register export plugin\n if (this.exporting) {\n this.internalPlugins.push(new ExportFilePlugin(this.element, pluginData));\n }\n\n // register sorting plugin\n this.internalPlugins.push(new SortingPlugin(this.element, pluginData));\n\n // register grouping plugin\n this.internalPlugins.push(new GroupingRowPlugin(this.element, pluginData));\n if (this.canMoveColumns) {\n this.internalPlugins.push(new ColumnPlugin(this.element, pluginData));\n }\n\n // register user plugins\n this.plugins?.forEach(p => this.internalPlugins.push(new p(this.element, pluginData)));\n }\n\n private removePlugins() {\n this.internalPlugins.forEach(p => p.destroy?.());\n this.internalPlugins = [];\n }\n // #endregion\n\n\n // if reconnect to dom we need to set up plugins\n connectedCallback() {\n if (this.isInited) {\n this.setPlugins();\n }\n }\n\n /**\n * Called once just after the component is first connected to the DOM.\n * Since this method is only called once, it's a good place to load data asynchronously and to setup the state\n * without triggering extra re-renders.\n * A promise can be returned, that can be used to wait for the first render().\n */\n componentWillLoad() {\n // #region Setup Providers\n this.viewportProvider = new ViewportProvider();\n this.themeService = new ThemeService({\n rowSize: this.rowSize,\n });\n this.dimensionProvider = new DimensionProvider(this.viewportProvider, {\n realSizeChanged: (k: MultiDimensionType) =>\n this.contentsizechanged.emit(k),\n });\n this.columnProvider = new ColumnDataProvider();\n this.selectionStoreConnector = new SelectionStoreConnector();\n this.dataProvider = new DataProvider(this.dimensionProvider);\n // #endregion\n\n this.registerOutsideVNodes(this.registerVNode);\n\n // init plugins\n this.setPlugins();\n\n // set data\n this.applyStretch(this.stretch);\n this.themeChanged(this.theme, undefined, undefined, true);\n this.columnChanged(this.columns);\n this.dataSourceChanged(this.source, undefined, 'source');\n this.dataSourceChanged(this.pinnedTopSource, undefined, 'pinnedTopSource');\n this.dataSourceChanged(\n this.pinnedBottomSource,\n undefined,\n 'pinnedBottomSource',\n );\n if (Object.keys(this.trimmedRows ?? {}).length > 0) {\n this.trimmedRowsChanged(this.trimmedRows);\n }\n this.rowDefChanged(this.rowDefinitions);\n this.groupingChanged(this.grouping);\n\n // init scrolling service\n this.scrollingService = new GridScrollingService(\n (e: ViewPortScrollEvent) => {\n this.dimensionProvider.setViewPortCoordinate({\n coordinate: e.coordinate,\n type: e.dimension,\n });\n this.viewportscroll.emit(e);\n },\n );\n\n this.aftergridinit.emit();\n // set inited flag for connectedCallback\n this.isInited = true;\n }\n\n componentWillRender() {\n const event = this.beforegridrender.emit();\n if (event.defaultPrevented) {\n return false;\n }\n return Promise.all(this.jobsBeforeRender);\n }\n\n render() {\n const contentHeight =\n this.dimensionProvider.stores['rgRow'].store.get('realSize');\n\n // init viewport service helpers\n this.viewport = new ViewportService(\n {\n columnProvider: this.columnProvider,\n dataProvider: this.dataProvider,\n dimensionProvider: this.dimensionProvider,\n viewportProvider: this.viewportProvider,\n scrollingService: this.scrollingService,\n orderService: this.orderService,\n selectionStoreConnector: this.selectionStoreConnector,\n disableVirtualX: this.disableVirtualX,\n disableVirtualY: this.disableVirtualY,\n resize: c => this.aftercolumnresize.emit(c),\n },\n contentHeight,\n );\n\n // #region ViewportSections\n /**\n * The code renders a viewport divided into sections.\n * It starts by rendering the pinned start, data, and pinned end sections.\n * Within each section, it renders columns along with their headers, pinned top, center data, and pinned bottom.\n * The code iterates over the columns and their data to generate the view port's HTML structure.\n */\n\n const viewportSections: (VNode | VNode[])[] = [];\n\n // Row headers setting\n if (this.rowHeaders && this.viewport.columns.length) {\n const anyView = this.viewport.columns[0];\n viewportSections.push(\n <revogr-row-headers\n additionalData={this.additionalData}\n height={contentHeight}\n rowClass={this.rowClass}\n resize={this.resize}\n dataPorts={anyView.dataPorts}\n headerProp={anyView.headerProp}\n jobsBeforeRender={this.jobsBeforeRender}\n rowHeaderColumn={\n typeof this.rowHeaders === 'object' ? this.rowHeaders : undefined\n }\n onScrollview={({ detail: e }: CustomEvent) =>\n this.scrollingService.proxyScroll(e, 'headerRow')\n }\n onRef={({ detail: e }: CustomEvent) =>\n this.scrollingService.registerElement(e, 'headerRow')\n }\n />,\n );\n }\n\n // Viewport section render\n const isMobile = isMobileDevice();\n const viewPortHtml: VNode[] = [];\n\n // Render viewports column(horizontal sections)\n for (let view of this.viewport.columns) {\n const headerProperties: HeaderProperties = {\n ...view.headerProp,\n type: view.type,\n additionalData: this.additionalData,\n viewportCol: view.viewportCol,\n selectionStore: view.columnSelectionStore,\n canResize: this.resize,\n readonly: this.readonly,\n columnFilter: !!this.filter,\n };\n // Column headers\n const dataViews: VNode[] = [\n <revogr-header {...headerProperties} slot={HEADER_SLOT} />,\n ];\n\n // Render viewport data (vertical sections)\n view.dataPorts.forEach(data => {\n const key = `${data.type}_${view.type}`;\n const dataView = (\n <revogr-overlay-selection\n {...data}\n isMobileDevice={isMobile}\n selectionStore={data.segmentSelectionStore}\n onSelectall={() => this.selectionStoreConnector.selectAll()}\n editors={this.editors}\n readonly={this.readonly}\n range={this.range}\n useClipboard={this.useClipboard}\n applyChangesOnClose={this.applyOnClose}\n additionalData={this.additionalData}\n slot={data.slot}\n onBeforenextvpfocus={(e) => this.selectionStoreConnector.beforeNextFocusCell(e.detail)}\n onCanceledit={() => this.selectionStoreConnector.setEdit(false)}\n onSetedit={({ detail }) => {\n const event = this.beforeeditstart.emit(detail);\n if (!event.defaultPrevented) {\n this.selectionStoreConnector.setEdit(detail.val);\n }\n }}\n >\n <revogr-data\n {...data}\n colType={view.type}\n key={key}\n readonly={this.readonly}\n range={this.range}\n rowClass={this.rowClass}\n rowSelectionStore={data.rowSelectionStore}\n additionalData={this.additionalData}\n jobsBeforeRender={this.jobsBeforeRender}\n slot={DATA_SLOT}\n >\n <slot name={`data-${view.type}-${data.type}`} />\n </revogr-data>\n <revogr-temp-range\n selectionStore={data.segmentSelectionStore}\n dimensionRow={data.dimensionRow}\n dimensionCol={data.dimensionCol}\n />\n <revogr-focus\n colData={data.colData}\n dataStore={data.dataStore}\n focusTemplate={this.focusTemplate}\n rowType={data.type}\n colType={view.type}\n selectionStore={data.segmentSelectionStore}\n dimensionRow={data.dimensionRow}\n dimensionCol={data.dimensionCol}\n >\n <slot name={`focus-${view.type}-${data.type}`} />\n </revogr-focus>\n </revogr-overlay-selection>\n );\n\n dataViews.push(dataView);\n });\n\n // Add viewport scroll in the end\n viewPortHtml.push(\n <revogr-viewport-scroll\n {...view.prop}\n ref={el =>\n this.scrollingService.registerElement(el, `${view.prop.key}`)\n }\n onScrollviewport={e =>\n this.scrollingService.proxyScroll(e.detail, `${view.prop.key}`)\n }\n onScrollviewportsilent={e =>\n this.scrollingService.scrollSilentService(\n e.detail,\n `${view.prop.key}`,\n )\n }\n >\n {dataViews}\n </revogr-viewport-scroll>,\n );\n }\n\n viewportSections.push(viewPortHtml);\n // #endregion\n\n const typeRow: DimensionType = 'rgRow';\n const typeCol: DimensionType = 'rgCol';\n\n const viewports = this.viewportProvider.stores;\n const dimensions = this.dimensionProvider.stores;\n\n return (\n <Host>\n {this.hideAttribution ? null : (\n <revogr-attribution class=\"attribution\" />\n )}\n <div\n class=\"main-viewport\"\n onClick={(e: MouseEvent) => {\n if (e.currentTarget === e.target) {\n this.viewport?.clearEdit();\n }\n }}\n >\n <div class=\"viewports\">\n <slot name=\"viewport\" />\n {viewportSections}\n <revogr-scroll-virtual\n class=\"vertical\"\n dimension={typeRow}\n viewportStore={viewports[typeRow].store}\n dimensionStore={dimensions[typeRow].store}\n ref={el => this.scrollingService.registerElement(el, 'rowScroll')}\n onScrollvirtual={e => this.scrollingService.proxyScroll(e.detail)}\n />\n <OrderRenderer ref={e => (this.orderService = e)} />\n </div>\n </div>\n <revogr-scroll-virtual\n class=\"horizontal\"\n dimension={typeCol}\n viewportStore={viewports[typeCol].store}\n dimensionStore={dimensions[typeCol].store}\n ref={el => this.scrollingService.registerElement(el, 'colScroll')}\n onScrollvirtual={e => this.scrollingService.proxyScroll(e.detail)}\n />\n {this.extraElements}\n </Host>\n );\n }\n\n disconnectedCallback() {\n // Remove all plugins, to avoid memory leaks and unexpected behaviour when the component is removed\n this.removePlugins();\n }\n}\n"]}
@@ -7,5 +7,6 @@ export * from './plugins/base.plugin';
7
7
  export * from './plugins/dispatcher';
8
8
  export * from './components';
9
9
  export * from './utils/store.utils';
10
+ export * from './utils/column.utils';
10
11
  export { h } from '@stencil/core';
11
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC","sourcesContent":["export * from './types';\nexport * from './store';\nexport * from './plugins/base.plugin';\nexport * from './plugins/dispatcher';\nexport * from './components';\nexport * from './utils/store.utils';\nexport { h } from '@stencil/core';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC","sourcesContent":["export * from './types';\nexport * from './store';\nexport * from './plugins/base.plugin';\nexport * from './plugins/dispatcher';\nexport * from './components';\nexport * from './utils/store.utils';\nexport * from './utils/column.utils';\nexport { h } from '@stencil/core';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"base.plugin.js","sourceRoot":"","sources":["../../src/plugins/base.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAKlC;;;;GAIG;AACH,MAAM,OAAO,UAAU;IAGrB,YAAmB,QAA6B,EAAS,SAA0B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,eAAe,uBAAf,eAAe,CAAE,KAAK,CAAC,CAAC;QACnC,CAAC;IACH,CAAC;IAED;;;OAGG;IACH,mBAAmB,CAAC,SAAiB;QACnC,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC;QAC5E,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;IAED;;;OAGG;IACH,IAAI,CAAU,SAAiB,EAAE,MAAU;QACzC,MAAM,KAAK,GAAG,IAAI,WAAW,CAAI,SAAS,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1E,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACnC,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;OAEG;IACH,kBAAkB;QAChB,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACpC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;IAED;;OAEG;IACH,OAAO;QACL,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC5B,CAAC;CACF","sourcesContent":["import { h } from '@stencil/core';\nimport { PluginProviders, PluginBaseComponent } from '..';\n\ntype WatchConfig = { immediate: boolean };\n\n/**\n * Base layer for plugins\n * Provide minimal starting core for plugins to work\n * Extend this class to create plugin\n */\nexport class BasePlugin implements PluginBaseComponent {\n readonly h = h;\n readonly subscriptions: Record<string, (...args: any[]) => void> = {};\n constructor(public revogrid: HTMLRevoGridElement, public providers: PluginProviders) {}\n /**\n *\n * @param eventName - event name to subscribe to in revo-grid component (e.g. 'beforeheaderclick')\n * @param callback - callback function for event\n */\n addEventListener(\n eventName: string,\n callback: (e: CustomEvent) => void,\n ) {\n this.revogrid.addEventListener(eventName, callback);\n this.subscriptions[eventName] = callback;\n }\n\n /**\n * Subscribe to property change in revo-grid component\n * You can return false in callback to prevent default value set\n *\n * @param prop - property name\n * @param callback - callback function\n * @param immediate - trigger callback immediately with current value\n */\n watch<T extends any>(\n prop: string,\n callback: (arg: T) => boolean | void,\n { immediate }: Partial<WatchConfig> = { immediate: false },\n ) {\n const nativeValueDesc =\n Object.getOwnPropertyDescriptor(this.revogrid, prop) ||\n Object.getOwnPropertyDescriptor(this.revogrid.constructor.prototype, prop);\n\n // Overwrite property descriptor for this instance\n Object.defineProperty(this.revogrid, prop, {\n set(val: T) {\n const keepDefault = callback(val);\n if (keepDefault === false) {\n return;\n }\n // Continue with native behavior\n return nativeValueDesc?.set?.call(this, val);\n },\n get() {\n // Continue with native behavior\n return nativeValueDesc?.get?.call(this);\n },\n });\n if (immediate) {\n callback(nativeValueDesc?.value);\n }\n }\n\n /**\n * Remove event listener\n * @param eventName\n */\n removeEventListener(eventName: string) {\n this.revogrid.removeEventListener(eventName, this.subscriptions[eventName]);\n delete this.subscriptions[eventName];\n }\n\n /**\n * Emit event from revo-grid component\n * Event can be cancelled by calling event.preventDefault() in callback\n */\n emit<T = any>(eventName: string, detail?: T) {\n const event = new CustomEvent<T>(eventName, { detail, cancelable: true });\n this.revogrid.dispatchEvent(event);\n return event;\n }\n\n /**\n * Clear all subscriptions\n */\n clearSubscriptions() {\n for (let type in this.subscriptions) {\n this.removeEventListener(type);\n }\n }\n\n /**\n * Destroy plugin and clear all subscriptions\n */\n destroy() {\n this.clearSubscriptions();\n }\n}\n\nexport type GridPlugin = (typeof BasePlugin);\n"]}
1
+ {"version":3,"file":"base.plugin.js","sourceRoot":"","sources":["../../src/plugins/base.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAKlC;;;;GAIG;AACH,MAAM,OAAO,UAAU;IAGrB,YAAmB,QAA6B,EAAS,SAA0B;QAAhE,aAAQ,GAAR,QAAQ,CAAqB;QAAS,cAAS,GAAT,SAAS,CAAiB;QAF1E,MAAC,GAAG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mBAAmB,CAAC,SAAiB;QACnC,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC;QAC5E,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;IAED;;;OAGG;IACH,IAAI,CAAU,SAAiB,EAAE,MAAU;QACzC,MAAM,KAAK,GAAG,IAAI,WAAW,CAAI,SAAS,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1E,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACnC,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;OAEG;IACH,kBAAkB;QAChB,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACpC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;IAED;;OAEG;IACH,OAAO;QACL,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC5B,CAAC;CACF","sourcesContent":["import { h } from '@stencil/core';\nimport { PluginProviders, PluginBaseComponent } from '..';\n\ntype WatchConfig = { immediate: boolean };\n\n/**\n * Base layer for plugins\n * Provide minimal starting core for plugins to work\n * Extend this class to create plugin\n */\nexport class BasePlugin implements PluginBaseComponent {\n readonly h = h;\n readonly subscriptions: Record<string, (...args: any[]) => void> = {};\n constructor(public revogrid: HTMLRevoGridElement, public providers: PluginProviders) {}\n /**\n *\n * @param eventName - event name to subscribe to in revo-grid component (e.g. 'beforeheaderclick')\n * @param callback - callback function for event\n */\n addEventListener<T = any>(\n eventName: string,\n callback: (e: CustomEvent<T>) => void,\n ) {\n this.revogrid.addEventListener(eventName, callback);\n this.subscriptions[eventName] = callback;\n }\n\n /**\n * Subscribe to property change in revo-grid component\n * You can return false in callback to prevent default value set\n *\n * @param prop - property name\n * @param callback - callback function\n * @param immediate - trigger callback immediately with current value\n */\n watch<T extends any>(\n prop: string,\n callback: (arg: T) => boolean | void,\n { immediate }: Partial<WatchConfig> = { immediate: false },\n ) {\n const nativeValueDesc =\n Object.getOwnPropertyDescriptor(this.revogrid, prop) ||\n Object.getOwnPropertyDescriptor(this.revogrid.constructor.prototype, prop);\n\n // Overwrite property descriptor for this instance\n Object.defineProperty(this.revogrid, prop, {\n set(val: T) {\n const keepDefault = callback(val);\n if (keepDefault === false) {\n return;\n }\n // Continue with native behavior\n return nativeValueDesc?.set?.call(this, val);\n },\n get() {\n // Continue with native behavior\n return nativeValueDesc?.get?.call(this);\n },\n });\n if (immediate) {\n callback(nativeValueDesc?.value);\n }\n }\n\n /**\n * Remove event listener\n * @param eventName\n */\n removeEventListener(eventName: string) {\n this.revogrid.removeEventListener(eventName, this.subscriptions[eventName]);\n delete this.subscriptions[eventName];\n }\n\n /**\n * Emit event from revo-grid component\n * Event can be cancelled by calling event.preventDefault() in callback\n */\n emit<T = any>(eventName: string, detail?: T) {\n const event = new CustomEvent<T>(eventName, { detail, cancelable: true });\n this.revogrid.dispatchEvent(event);\n return event;\n }\n\n /**\n * Clear all subscriptions\n */\n clearSubscriptions() {\n for (let type in this.subscriptions) {\n this.removeEventListener(type);\n }\n }\n\n /**\n * Destroy plugin and clear all subscriptions\n */\n destroy() {\n this.clearSubscriptions();\n }\n}\n\nexport type GridPlugin = (typeof BasePlugin);\n"]}
@@ -8,8 +8,8 @@
8
8
  import each from "lodash/each";
9
9
  import reduce from "lodash/reduce";
10
10
  import { BasePlugin } from "./base.plugin";
11
- import ColumnDataProvider from "../services/column.data.provider";
12
11
  import { getSourceItem, columnTypes } from "../store/index";
12
+ import { getColumnType } from "../";
13
13
  const LETTER_BLOCK_SIZE = 7;
14
14
  var ColumnAutoSizeMode;
15
15
  (function (ColumnAutoSizeMode) {
@@ -48,7 +48,7 @@ export default class AutoSizeColumnPlugin extends BasePlugin {
48
48
  this.columnSet(columns);
49
49
  };
50
50
  const headerDblClick = ({ detail }) => {
51
- const type = ColumnDataProvider.getColumnType(detail.column);
51
+ const type = getColumnType(detail.column);
52
52
  const size = this.getColumnSize(detail.index, type);
53
53
  if (size) {
54
54
  this.providers.dimension.setCustomSizes(type, {