@revolist/revogrid 4.10.21 → 4.10.23

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 (98) hide show
  1. package/dist/cjs/dimension.helpers-d1fc1dac.js.map +1 -1
  2. package/dist/cjs/index.cjs.js +2 -2
  3. package/dist/cjs/revo-grid.cjs.entry.js +37 -21
  4. package/dist/cjs/revo-grid.cjs.entry.js.map +1 -1
  5. package/dist/cjs/revogr-attribution_7.cjs.entry.js +10 -8
  6. package/dist/cjs/revogr-attribution_7.cjs.entry.js.map +1 -1
  7. package/dist/cjs/revogr-clipboard_3.cjs.entry.js.map +1 -1
  8. package/dist/cjs/revogr-data_4.cjs.entry.js +1 -1
  9. package/dist/cjs/revogr-data_4.cjs.entry.js.map +1 -1
  10. package/dist/cjs/{sorting.plugin-0256bdb5.js → sorting.plugin-d3e3d30f.js} +2 -2
  11. package/dist/cjs/{sorting.plugin-0256bdb5.js.map → sorting.plugin-d3e3d30f.js.map} +1 -1
  12. package/dist/cjs/text-editor-62095c25.js.map +1 -1
  13. package/dist/cjs/{viewport.store-14ff99b9.js → viewport.store-3d351649.js} +4 -2
  14. package/dist/cjs/viewport.store-3d351649.js.map +1 -0
  15. package/dist/collection/components/editors/revogr-edit.js +1 -1
  16. package/dist/collection/components/editors/revogr-edit.js.map +1 -1
  17. package/dist/collection/components/editors/text-editor.js.map +1 -1
  18. package/dist/collection/components/overlay/revogr-overlay-selection.js +7 -7
  19. package/dist/collection/components/overlay/revogr-overlay-selection.js.map +1 -1
  20. package/dist/collection/components/revoGrid/revo-grid-style.css +4 -0
  21. package/dist/collection/components/revoGrid/revo-grid.js +31 -12
  22. package/dist/collection/components/revoGrid/revo-grid.js.map +1 -1
  23. package/dist/collection/components/revoGrid/viewport.service.js +9 -9
  24. package/dist/collection/components/revoGrid/viewport.service.js.map +1 -1
  25. package/dist/collection/components/scroll/revogr-viewport-scroll.js +1 -1
  26. package/dist/collection/components/scroll/revogr-viewport-scroll.js.map +1 -1
  27. package/dist/collection/components/scrollable/revogr-scroll-virtual.js +6 -4
  28. package/dist/collection/components/scrollable/revogr-scroll-virtual.js.map +1 -1
  29. package/dist/collection/services/column.data.provider.js +2 -2
  30. package/dist/collection/services/column.data.provider.js.map +1 -1
  31. package/dist/collection/services/data.provider.js.map +1 -1
  32. package/dist/collection/store/dataSource/data.store.js.map +1 -1
  33. package/dist/collection/store/vp/viewport.store.js +3 -1
  34. package/dist/collection/store/vp/viewport.store.js.map +1 -1
  35. package/dist/collection/types/interfaces.js.map +1 -1
  36. package/dist/collection/types/selection.js.map +1 -1
  37. package/dist/collection/types/viewport.interfaces.js.map +1 -1
  38. package/dist/esm/dimension.helpers-4ea92aec.js.map +1 -1
  39. package/dist/esm/index.js +3 -3
  40. package/dist/esm/revo-grid.entry.js +37 -21
  41. package/dist/esm/revo-grid.entry.js.map +1 -1
  42. package/dist/esm/revogr-attribution_7.entry.js +10 -8
  43. package/dist/esm/revogr-attribution_7.entry.js.map +1 -1
  44. package/dist/esm/revogr-clipboard_3.entry.js.map +1 -1
  45. package/dist/esm/revogr-data_4.entry.js +1 -1
  46. package/dist/esm/revogr-data_4.entry.js.map +1 -1
  47. package/dist/esm/{sorting.plugin-c930df58.js → sorting.plugin-883f0941.js} +2 -2
  48. package/dist/esm/{sorting.plugin-c930df58.js.map → sorting.plugin-883f0941.js.map} +1 -1
  49. package/dist/esm/text-editor-c799aad2.js.map +1 -1
  50. package/dist/esm/{viewport.store-73fe3883.js → viewport.store-a1fce772.js} +4 -2
  51. package/dist/esm/viewport.store-a1fce772.js.map +1 -0
  52. package/dist/revo-grid/dimension.helpers-4ea92aec.js.map +1 -1
  53. package/dist/revo-grid/index.esm.js +1 -1
  54. package/dist/revo-grid/revo-grid.entry.js +1 -1
  55. package/dist/revo-grid/revo-grid.entry.js.map +1 -1
  56. package/dist/revo-grid/revogr-attribution_7.entry.js +1 -1
  57. package/dist/revo-grid/revogr-attribution_7.entry.js.map +1 -1
  58. package/dist/revo-grid/revogr-clipboard_3.entry.js.map +1 -1
  59. package/dist/revo-grid/revogr-data_4.entry.js +1 -1
  60. package/dist/revo-grid/revogr-data_4.entry.js.map +1 -1
  61. package/dist/revo-grid/{sorting.plugin-c930df58.js → sorting.plugin-883f0941.js} +2 -2
  62. package/dist/revo-grid/text-editor-c799aad2.js.map +1 -1
  63. package/dist/revo-grid/viewport.store-a1fce772.js +5 -0
  64. package/dist/revo-grid/viewport.store-a1fce772.js.map +1 -0
  65. package/dist/types/components/editors/revogr-edit.d.ts +2 -2
  66. package/dist/types/components/editors/text-editor.d.ts +2 -3
  67. package/dist/types/components/overlay/revogr-overlay-selection.d.ts +1 -1
  68. package/dist/types/components/revoGrid/revo-grid.d.ts +8 -2
  69. package/dist/types/components/revoGrid/viewport.service.d.ts +1 -1
  70. package/dist/types/components/scroll/revogr-viewport-scroll.d.ts +1 -2
  71. package/dist/types/components/scrollable/revogr-scroll-virtual.d.ts +2 -3
  72. package/dist/types/components.d.ts +6 -5
  73. package/dist/types/services/column.data.provider.d.ts +2 -2
  74. package/dist/types/services/data.provider.d.ts +1 -1
  75. package/dist/types/store/dataSource/data.store.d.ts +1 -2
  76. package/dist/types/types/interfaces.d.ts +6 -0
  77. package/dist/types/types/selection.d.ts +4 -5
  78. package/dist/types/types/viewport.interfaces.d.ts +0 -2
  79. package/hydrate/index.js +48 -28
  80. package/hydrate/index.mjs +48 -28
  81. package/package.json +1 -1
  82. package/standalone/data.store.js.map +1 -1
  83. package/standalone/revo-grid.js +35 -19
  84. package/standalone/revo-grid.js.map +1 -1
  85. package/standalone/revogr-edit2.js.map +1 -1
  86. package/standalone/revogr-overlay-selection2.js +4 -4
  87. package/standalone/revogr-overlay-selection2.js.map +1 -1
  88. package/standalone/revogr-row-headers2.js +3 -1
  89. package/standalone/revogr-row-headers2.js.map +1 -1
  90. package/standalone/revogr-scroll-virtual2.js +5 -3
  91. package/standalone/revogr-scroll-virtual2.js.map +1 -1
  92. package/standalone/revogr-viewport-scroll2.js +1 -1
  93. package/standalone/revogr-viewport-scroll2.js.map +1 -1
  94. package/dist/cjs/viewport.store-14ff99b9.js.map +0 -1
  95. package/dist/esm/viewport.store-73fe3883.js.map +0 -1
  96. package/dist/revo-grid/viewport.store-73fe3883.js +0 -5
  97. package/dist/revo-grid/viewport.store-73fe3883.js.map +0 -1
  98. /package/dist/revo-grid/{sorting.plugin-c930df58.js.map → sorting.plugin-883f0941.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"revogr-clipboard.revogr-edit.revogr-order-editor.entry.cjs.js","mappings":";;;;;;;;;;;;;;MAaa,SAAS;;;;;;;;;;;;;;IAkFqB,OAAO,CAAC,CAAiB;;QAEhE,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,OAAO;SACR;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,IAAI,CAAC,CAAC,CAAC;QACtE,MAAM,IAAI,GAAG,CAAC,MAAM;cAChB,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,OAAO,CAAC,WAAW,CAAC;cACnC,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,OAAO,CAAC,MAAM,CAAC,KAAK,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;YAChC,OAAO;SACR;QAED,IAAI,UAAsB,CAAC;;Q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,CAAC,OAAO,EAAE,CAAC,CAAC;KACjD;;IAGD,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAA4B;QACrC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;QACxD,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;KACrB;IAED,iBAAiB;QACf,IAAI,CAAC,eAAe,GAAG,IAAI,eAAe,CAAC;YACzC,eAAe,EAAE,CAAC,IAAY,EAAE,EAAU;gBACxC,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;oBACrC,IAAI;oBACJ,EAAE;oBACF,OAAO,EAAE,IAAI,CAAC,OAAO;iBACtB,CAAC,CAAC;gBACH,IAAI,SAAS,CAAC,gBAAgB,EAAE;oBAC9B,OAAO;iBACR;gBACD,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;aAC5C;SACF,CAAC,CAAC;KACJ;IAEO,OAAO;QACb,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,MAAM;YACf,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK;YAC7B,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK;SAC9B,CAAC;KACH;;;;;;;","names":["isEditorCtrConstructible","TextEditor","h","Host","EDIT_INPUT_WR","getItemByPosition","debounce","DRAGG_TEXT","getSourceItem"],"sources":["src/components/clipboard/revogr-clipboard.tsx","src/components/editors/revogr-edit-style.scss?tag=revogr-edit","src/components/editors/revogr-edit.tsx","src/components/order/order-row.service.ts","src/components/order/revogr-order-editor.tsx"],"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","revogr-edit {\n display: block;\n position: absolute;\n background-color: #fff;\n\n input {\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n }\n\n revo-dropdown {\n height: 100%;\n\n &.shrink {\n fieldset legend > span {\n display: none;\n }\n }\n }\n}\n","import {\n Component,\n Event,\n EventEmitter,\n Prop,\n h,\n Element,\n Host,\n Method,\n} from '@stencil/core';\nimport { EDIT_INPUT_WR } from '../../utils/consts';\nimport { TextEditor } from './text-editor';\nimport { ColumnDataSchemaModel } from '@type';\nimport {\n EditCell,\n EditorCtr,\n SaveDataDetails,\n EditorBase,\n SaveData,\n} from '@type';\n\nimport { isEditorCtrConstructible } from './edit.utils';\n\n/**\n * Represents a cell editor in a grid.\n * It manages the editing of cells by handling events, saving data, rendering the editor UI,\n * and managing the lifecycle of the editor instance.\n */\n@Component({\n tag: 'revogr-edit',\n styleUrl: 'revogr-edit-style.scss',\n})\nexport class RevoEdit {\n /**\n * Cell to edit data.\n */\n @Prop() editCell: EditCell;\n\n /**\n * Column data for editor.\n */\n @Prop() column: ColumnDataSchemaModel | null;\n /**\n * Custom editors register\n */\n @Prop() editor: EditorCtr | null;\n\n /**\n * Save on editor close. Defines if data should be saved on editor close.\n */\n @Prop() saveOnClose = false;\n /**\n * Additional data to pass to renderer\n */\n @Prop() additionalData: any;\n\n /**\n * Cell edit event\n */\n @Event({ eventName: 'celledit' }) cellEdit: EventEmitter<SaveDataDetails>;\n\n /**\n * Close editor event\n * pass true if requires focus next\n */\n @Event({ eventName: 'closeedit' }) closeEdit: EventEmitter<\n boolean | undefined\n >;\n\n /** Edit session editor */\n @Element() element: HTMLElement;\n private currentEditor: EditorBase | null = null;\n private preventSaveOnClose = false;\n\n /**\n * Cancel pending changes flag. Editor will be closed without autosave.\n */\n @Method() async cancelChanges() {\n this.preventSaveOnClose = true;\n }\n\n /**\n * Before editor got disconnected.\n * Can be triggered multiple times before actual disconnect.\n */\n @Method() async beforeDisconnect() {\n this.currentEditor?.beforeDisconnect?.();\n }\n\n onAutoSave() {\n this.preventSaveOnClose = true;\n const val = this.currentEditor?.getValue?.();\n // For Editor plugin internal usage.\n // When you want to prevent save and use custom save of your own.\n if (this.currentEditor?.beforeAutoSave) {\n const canSave = this.currentEditor.beforeAutoSave(val);\n if (canSave === false) {\n return;\n }\n }\n this.onSave(val, true);\n }\n\n /**\n * Callback triggered when cell editor saved.\n * Closes editor when called.\n * @param preventFocus - if true, editor will not be closed & next cell will not be focused.\n */\n onSave(val?: SaveData, preventFocus?: boolean) {\n this.preventSaveOnClose = true;\n if (this.editCell) {\n this.cellEdit.emit({\n rgCol: this.editCell.x,\n rgRow: this.editCell.y,\n type: this.editCell.type,\n prop: this.editCell.prop,\n val,\n preventFocus,\n });\n }\n }\n\n componentWillRender() {\n // Active editor present and not yet closed.\n if (this.currentEditor || !this.column) {\n return;\n }\n this.preventSaveOnClose = false;\n\n // Custom editor usage.\n // Start with TextEditor (editors/text.tsx) for Custom editor.\n // It can be class or function\n if (this.editor) {\n // if editor is constructible\n if (isEditorCtrConstructible(this.editor)) {\n this.currentEditor = new this.editor(\n this.column,\n // save callback\n (e, preventFocus) => {\n this.onSave(e, preventFocus);\n },\n // cancel callback\n focusNext => {\n this.preventSaveOnClose = true;\n this.closeEdit.emit(focusNext);\n },\n );\n // if editor is function\n } else {\n this.currentEditor = this.editor(\n this.column,\n // save callback\n (e, preventFocus) => {\n this.onSave(e, preventFocus);\n },\n // cancel callback\n focusNext => {\n this.preventSaveOnClose = true;\n this.closeEdit.emit(focusNext);\n },\n );\n }\n return;\n }\n // Default text editor usage\n this.currentEditor = new TextEditor(this.column, (e, preventFocus) =>\n this.onSave(e, preventFocus),\n );\n }\n\n componentDidRender() {\n if (!this.currentEditor) {\n return;\n }\n this.currentEditor.element = this.element.firstElementChild;\n this.currentEditor.componentDidRender?.();\n }\n\n disconnectedCallback() {\n if (this.saveOnClose) {\n // Can not be cancelled by `preventSaveOnClose` prop.\n // Editor requires `getValue` to be able to save.\n if (!this.preventSaveOnClose) {\n this.onAutoSave();\n }\n }\n\n this.preventSaveOnClose = false;\n if (!this.currentEditor) {\n return;\n }\n\n this.currentEditor.disconnectedCallback?.();\n this.currentEditor.element = null;\n this.currentEditor = null;\n }\n\n render() {\n if (this.currentEditor) {\n this.currentEditor.editCell = this.editCell;\n return (\n <Host class={EDIT_INPUT_WR}>\n {this.currentEditor.render(h, this.additionalData)}\n </Host>\n );\n }\n return '';\n }\n}\n","import { getItemByPosition } from '@store';\nimport { DimensionSettingsState, PositionItem, Cell } from '@type';\n\ntype EventData = { el: HTMLElement; rows: DimensionSettingsState; cols: DimensionSettingsState };\ninterface Config {\n positionChanged(from: number, to: number): void;\n}\n\nexport default class RowOrderService {\n private currentCell: Cell | null = null;\n private previousRow: number | null = null;\n\n constructor(private config: Config) {}\n\n /** Drag finished, calculate and apply changes */\n endOrder(e: MouseEvent, data: EventData) {\n if (this.currentCell === null) {\n return;\n }\n const newRow = this.getCell(e, data);\n\n // if position changed\n if (newRow.y !== this.currentCell.y) {\n // rgRow dragged out table\n if (newRow.y < 0) {\n newRow.y = 0;\n }\n // rgRow dragged to the top\n else if (newRow.y < this.currentCell.y) {\n newRow.y++;\n }\n this.config.positionChanged(this.currentCell.y, newRow.y);\n }\n this.clear();\n }\n\n /** Drag started, reserve initial cell for farther use */\n startOrder(e: MouseEvent, data: EventData): Cell {\n this.currentCell = this.getCell(e, data);\n return this.currentCell;\n }\n\n move(y: number, data: EventData): PositionItem | null {\n const rgRow = this.getRow(y, data);\n // if rgRow same as previous or below range (-1 = 0) do nothing\n if (this.previousRow === rgRow.itemIndex || rgRow.itemIndex < -1) {\n return null;\n }\n this.previousRow = rgRow.itemIndex;\n return rgRow;\n }\n\n /** Drag stopped, probably cursor outside of document area */\n clear() {\n this.currentCell = null;\n this.previousRow = null;\n }\n\n /** Calculate cell based on x, y position */\n getRow(y: number, { el, rows }: EventData): PositionItem {\n const { top } = el.getBoundingClientRect();\n const topRelative = y - top;\n const rgRow = getItemByPosition(rows, topRelative);\n const absolutePosition = {\n itemIndex: rgRow.itemIndex,\n start: rgRow.start + top,\n end: rgRow.end + top,\n };\n return absolutePosition;\n }\n\n /** Calculate cell based on x, y position */\n getCell({ x, y }: Cell, { el, rows, cols }: EventData): Cell {\n const { top, left } = el.getBoundingClientRect();\n const topRelative = y - top;\n const leftRelative = x - left;\n const rgRow = getItemByPosition(rows, topRelative);\n const rgCol = getItemByPosition(cols, leftRelative);\n return { x: rgCol.itemIndex, y: rgRow.itemIndex };\n }\n}\n","import { Component, Method, Event, EventEmitter, Prop } from '@stencil/core';\nimport debounce from 'lodash/debounce';\n\nimport { DSourceState, getSourceItem } from '@store';\nimport { DRAGG_TEXT } from '../../utils/consts';\nimport RowOrderService from './order-row.service';\nimport {\n DimensionRows,\n DataType,\n DimensionSettingsState,\n DragStartEvent,\n PositionItem,\n Cell,\n} from '@type';\nimport { Observable } from '../../utils';\n\n/**\n * Component for handling row order editor.\n */\n@Component({ tag: 'revogr-order-editor' })\nexport class OrderEditor {\n // #region Properties\n /** Parent element */\n @Prop() parent: HTMLElement;\n /** Dimension settings Y */\n @Prop() dimensionRow: Observable<DimensionSettingsState>;\n /** Dimension settings X */\n @Prop() dimensionCol: Observable<DimensionSettingsState>;\n\n /** Static stores, not expected to change during component lifetime */\n @Prop() dataStore: Observable<DSourceState<DataType, DimensionRows>>;\n\n @Prop() rowType: DimensionRows;\n // #endregion\n\n // #region Events\n /** Row drag started */\n @Event({ eventName: 'rowdragstartinit', cancelable: true })\n rowDragStart: EventEmitter<{\n cell: Cell;\n text: string;\n pos: PositionItem;\n event: MouseEvent;\n rowType: DimensionRows;\n model: any;\n }>;\n\n /** Row drag ended started */\n @Event({ eventName: 'rowdragendinit' })\n rowDragEnd: EventEmitter<{ rowType: DimensionRows }>;\n\n /** Row move started */\n @Event({ eventName: 'rowdragmoveinit', cancelable: true })\n rowDrag: EventEmitter<PositionItem & { rowType: DimensionRows }>;\n\n /** Row mouse move started */\n @Event({ eventName: 'rowdragmousemove', cancelable: true })\n rowMouseMove: EventEmitter<Cell & { rowType: DimensionRows }>;\n\n /** Row dragged, new range ready to be applied */\n @Event({ eventName: 'rowdropinit', cancelable: true })\n rowDropped: EventEmitter<{\n from: number;\n to: number;\n rowType: DimensionRows;\n }>;\n\n /** Row drag ended finished. Time to apply data */\n @Event({ eventName: 'roworderchange' })\n rowOrderChange: EventEmitter<{\n from: number;\n to: number;\n rowType: DimensionRows;\n }>;\n\n // #endregion\n\n // #region Private\n private rowOrderService: RowOrderService;\n private events: {\n name: keyof DocumentEventMap;\n listener: (e: MouseEvent) => void;\n }[] = [];\n private rowMoveFunc = debounce((y: number) => {\n const rgRow = this.rowOrderService.move(y, this.getData());\n if (rgRow !== null) {\n this.rowDrag.emit({\n ...rgRow,\n rowType: this.rowType,\n });\n }\n }, 5);\n // #endregion\n\n // #region Methods\n @Method() async dragStart(e: DragStartEvent) {\n e.originalEvent.preventDefault();\n\n // extra check if previous ended\n if (this.events.length) {\n this.clearOrder();\n }\n\n const data = this.getData();\n const cell = this.rowOrderService.startOrder(e.originalEvent, data);\n const pos = this.rowOrderService.getRow(e.originalEvent.y, data);\n const dragStartEvent = this.rowDragStart.emit({\n cell,\n text: DRAGG_TEXT,\n pos,\n event: e.originalEvent,\n rowType: this.rowType,\n model: getSourceItem(this.dataStore, pos.itemIndex),\n });\n if (dragStartEvent.defaultPrevented) {\n return;\n }\n\n const moveMove = (e: MouseEvent) => this.move(e);\n const mouseUp = (e: MouseEvent) => this.endOrder(e);\n const mouseLeave = () => this.clearOrder();\n\n this.events.push(\n {\n name: 'mousemove',\n listener: moveMove,\n },\n {\n name: 'mouseup',\n listener: mouseUp,\n },\n {\n name: 'mouseleave',\n listener: mouseLeave,\n },\n );\n document.addEventListener('mousemove', moveMove);\n // Action finished inside of the document\n document.addEventListener('mouseup', mouseUp);\n document.addEventListener('mouseleave', mouseLeave);\n }\n\n @Method() async endOrder(e: MouseEvent) {\n this.rowOrderService.endOrder(e, this.getData());\n this.clearOrder();\n }\n\n @Method() async clearOrder() {\n this.rowOrderService.clear();\n this.events.forEach(v => document.removeEventListener(v.name, v.listener));\n this.events.length = 0;\n this.rowDragEnd.emit({ rowType: this.rowType });\n }\n // #endregion\n\n move({ x, y }: { x: number; y: number }) {\n this.rowMouseMove.emit({ x, y, rowType: this.rowType });\n this.rowMoveFunc(y);\n }\n\n connectedCallback() {\n this.rowOrderService = new RowOrderService({\n positionChanged: (from: number, to: number) => {\n const dropEvent = this.rowDropped.emit({\n from,\n to,\n rowType: this.rowType,\n });\n if (dropEvent.defaultPrevented) {\n return;\n }\n this.rowOrderChange.emit(dropEvent.detail);\n },\n });\n }\n\n private getData() {\n return {\n el: this.parent,\n rows: this.dimensionRow.state,\n cols: this.dimensionCol.state,\n };\n }\n}\n"],"version":3}
1
+ {"file":"revogr-clipboard.revogr-edit.revogr-order-editor.entry.cjs.js","mappings":";;;;;;;;;;;;;;MAaa,SAAS;;;;;;;;;;;;;;IAkFqB,OAAO,CAAC,CAAiB;;QAE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AAI;oBACJ,EAAE;oBACF,OAAO,EAAE,IAAI,CAAC,OAAO;iBACtB,CAAC,CAAC;gBACH,IAAI,SAAS,CAAC,gBAAgB,EAAE;oBAC9B,OAAO;iBACR;gBACD,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;aAC5C;SACF,CAAC,CAAC;KACJ;IAEO,OAAO;QACb,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,MAAM;YACf,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK;YAC7B,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK;SAC9B,CAAC;KACH;;;;;;;","names":["isEditorCtrConstructible","TextEditor","h","Host","EDIT_INPUT_WR","getItemByPosition","debounce","DRAGG_TEXT","getSourceItem"],"sources":["src/components/clipboard/revogr-clipboard.tsx","src/components/editors/revogr-edit-style.scss?tag=revogr-edit","src/components/editors/revogr-edit.tsx","src/components/order/order-row.service.ts","src/components/order/revogr-order-editor.tsx"],"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","revogr-edit {\n display: block;\n position: absolute;\n background-color: #fff;\n\n input {\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n }\n\n revo-dropdown {\n height: 100%;\n\n &.shrink {\n fieldset legend > span {\n display: none;\n }\n }\n }\n}\n","import {\n Component,\n Event,\n EventEmitter,\n Prop,\n h,\n Element,\n Host,\n Method,\n} from '@stencil/core';\nimport { EDIT_INPUT_WR } from '../../utils/consts';\nimport { TextEditor } from './text-editor';\nimport { ColumnDataSchemaModel } from '@type';\nimport {\n EditCell,\n EditorCtr,\n SaveDataDetails,\n EditorBase,\n} from '@type';\n\nimport { isEditorCtrConstructible } from './edit.utils';\n\n/**\n * Represents a cell editor in a grid.\n * It manages the editing of cells by handling events, saving data, rendering the editor UI,\n * and managing the lifecycle of the editor instance.\n */\n@Component({\n tag: 'revogr-edit',\n styleUrl: 'revogr-edit-style.scss',\n})\nexport class RevoEdit {\n /**\n * Cell to edit data.\n */\n @Prop() editCell: EditCell;\n\n /**\n * Column data for editor.\n */\n @Prop() column: ColumnDataSchemaModel | null;\n /**\n * Custom editors register\n */\n @Prop() editor: EditorCtr | null;\n\n /**\n * Save on editor close. Defines if data should be saved on editor close.\n */\n @Prop() saveOnClose = false;\n /**\n * Additional data to pass to renderer\n */\n @Prop() additionalData: any;\n\n /**\n * Cell edit event\n */\n @Event({ eventName: 'celledit' }) cellEdit: EventEmitter<SaveDataDetails>;\n\n /**\n * Close editor event\n * pass true if requires focus next\n */\n @Event({ eventName: 'closeedit' }) closeEdit: EventEmitter<\n boolean | undefined\n >;\n\n /** Edit session editor */\n @Element() element: HTMLElement;\n private currentEditor: EditorBase | null = null;\n private preventSaveOnClose = false;\n\n /**\n * Cancel pending changes flag. Editor will be closed without autosave.\n */\n @Method() async cancelChanges() {\n this.preventSaveOnClose = true;\n }\n\n /**\n * Before editor got disconnected.\n * Can be triggered multiple times before actual disconnect.\n */\n @Method() async beforeDisconnect() {\n this.currentEditor?.beforeDisconnect?.();\n }\n\n onAutoSave() {\n this.preventSaveOnClose = true;\n const val = this.currentEditor?.getValue?.();\n // For Editor plugin internal usage.\n // When you want to prevent save and use custom save of your own.\n if (this.currentEditor?.beforeAutoSave) {\n const canSave = this.currentEditor.beforeAutoSave(val);\n if (canSave === false) {\n return;\n }\n }\n this.onSave(val, true);\n }\n\n /**\n * Callback triggered when cell editor saved.\n * Closes editor when called.\n * @param preventFocus - if true, editor will not be closed & next cell will not be focused.\n */\n onSave(val?: any, preventFocus?: boolean) {\n this.preventSaveOnClose = true;\n if (this.editCell) {\n this.cellEdit.emit({\n rgCol: this.editCell.x,\n rgRow: this.editCell.y,\n type: this.editCell.type,\n prop: this.editCell.prop,\n val,\n preventFocus,\n });\n }\n }\n\n componentWillRender() {\n // Active editor present and not yet closed.\n if (this.currentEditor || !this.column) {\n return;\n }\n this.preventSaveOnClose = false;\n\n // Custom editor usage.\n // Start with TextEditor (editors/text.tsx) for Custom editor.\n // It can be class or function\n if (this.editor) {\n // if editor is constructible\n if (isEditorCtrConstructible(this.editor)) {\n this.currentEditor = new this.editor(\n this.column,\n // save callback\n (e, preventFocus) => {\n this.onSave(e, preventFocus);\n },\n // cancel callback\n focusNext => {\n this.preventSaveOnClose = true;\n this.closeEdit.emit(focusNext);\n },\n );\n // if editor is function\n } else {\n this.currentEditor = this.editor(\n this.column,\n // save callback\n (e, preventFocus) => {\n this.onSave(e, preventFocus);\n },\n // cancel callback\n focusNext => {\n this.preventSaveOnClose = true;\n this.closeEdit.emit(focusNext);\n },\n );\n }\n return;\n }\n // Default text editor usage\n this.currentEditor = new TextEditor(this.column, (e, preventFocus) =>\n this.onSave(e, preventFocus),\n );\n }\n\n componentDidRender() {\n if (!this.currentEditor) {\n return;\n }\n this.currentEditor.element = this.element.firstElementChild;\n this.currentEditor.componentDidRender?.();\n }\n\n disconnectedCallback() {\n if (this.saveOnClose) {\n // Can not be cancelled by `preventSaveOnClose` prop.\n // Editor requires `getValue` to be able to save.\n if (!this.preventSaveOnClose) {\n this.onAutoSave();\n }\n }\n\n this.preventSaveOnClose = false;\n if (!this.currentEditor) {\n return;\n }\n\n this.currentEditor.disconnectedCallback?.();\n this.currentEditor.element = null;\n this.currentEditor = null;\n }\n\n render() {\n if (this.currentEditor) {\n this.currentEditor.editCell = this.editCell;\n return (\n <Host class={EDIT_INPUT_WR}>\n {this.currentEditor.render(h, this.additionalData)}\n </Host>\n );\n }\n return '';\n }\n}\n","import { getItemByPosition } from '@store';\nimport { DimensionSettingsState, PositionItem, Cell } from '@type';\n\ntype EventData = { el: HTMLElement; rows: DimensionSettingsState; cols: DimensionSettingsState };\ninterface Config {\n positionChanged(from: number, to: number): void;\n}\n\nexport default class RowOrderService {\n private currentCell: Cell | null = null;\n private previousRow: number | null = null;\n\n constructor(private config: Config) {}\n\n /** Drag finished, calculate and apply changes */\n endOrder(e: MouseEvent, data: EventData) {\n if (this.currentCell === null) {\n return;\n }\n const newRow = this.getCell(e, data);\n\n // if position changed\n if (newRow.y !== this.currentCell.y) {\n // rgRow dragged out table\n if (newRow.y < 0) {\n newRow.y = 0;\n }\n // rgRow dragged to the top\n else if (newRow.y < this.currentCell.y) {\n newRow.y++;\n }\n this.config.positionChanged(this.currentCell.y, newRow.y);\n }\n this.clear();\n }\n\n /** Drag started, reserve initial cell for farther use */\n startOrder(e: MouseEvent, data: EventData): Cell {\n this.currentCell = this.getCell(e, data);\n return this.currentCell;\n }\n\n move(y: number, data: EventData): PositionItem | null {\n const rgRow = this.getRow(y, data);\n // if rgRow same as previous or below range (-1 = 0) do nothing\n if (this.previousRow === rgRow.itemIndex || rgRow.itemIndex < -1) {\n return null;\n }\n this.previousRow = rgRow.itemIndex;\n return rgRow;\n }\n\n /** Drag stopped, probably cursor outside of document area */\n clear() {\n this.currentCell = null;\n this.previousRow = null;\n }\n\n /** Calculate cell based on x, y position */\n getRow(y: number, { el, rows }: EventData): PositionItem {\n const { top } = el.getBoundingClientRect();\n const topRelative = y - top;\n const rgRow = getItemByPosition(rows, topRelative);\n const absolutePosition = {\n itemIndex: rgRow.itemIndex,\n start: rgRow.start + top,\n end: rgRow.end + top,\n };\n return absolutePosition;\n }\n\n /** Calculate cell based on x, y position */\n getCell({ x, y }: Cell, { el, rows, cols }: EventData): Cell {\n const { top, left } = el.getBoundingClientRect();\n const topRelative = y - top;\n const leftRelative = x - left;\n const rgRow = getItemByPosition(rows, topRelative);\n const rgCol = getItemByPosition(cols, leftRelative);\n return { x: rgCol.itemIndex, y: rgRow.itemIndex };\n }\n}\n","import { Component, Method, Event, EventEmitter, Prop } from '@stencil/core';\nimport debounce from 'lodash/debounce';\n\nimport { DSourceState, getSourceItem } from '@store';\nimport { DRAGG_TEXT } from '../../utils/consts';\nimport RowOrderService from './order-row.service';\nimport {\n DimensionRows,\n DataType,\n DimensionSettingsState,\n DragStartEvent,\n PositionItem,\n Cell,\n} from '@type';\nimport { Observable } from '../../utils';\n\n/**\n * Component for handling row order editor.\n */\n@Component({ tag: 'revogr-order-editor' })\nexport class OrderEditor {\n // #region Properties\n /** Parent element */\n @Prop() parent: HTMLElement;\n /** Dimension settings Y */\n @Prop() dimensionRow: Observable<DimensionSettingsState>;\n /** Dimension settings X */\n @Prop() dimensionCol: Observable<DimensionSettingsState>;\n\n /** Static stores, not expected to change during component lifetime */\n @Prop() dataStore: Observable<DSourceState<DataType, DimensionRows>>;\n\n @Prop() rowType: DimensionRows;\n // #endregion\n\n // #region Events\n /** Row drag started */\n @Event({ eventName: 'rowdragstartinit', cancelable: true })\n rowDragStart: EventEmitter<{\n cell: Cell;\n text: string;\n pos: PositionItem;\n event: MouseEvent;\n rowType: DimensionRows;\n model: any;\n }>;\n\n /** Row drag ended started */\n @Event({ eventName: 'rowdragendinit' })\n rowDragEnd: EventEmitter<{ rowType: DimensionRows }>;\n\n /** Row move started */\n @Event({ eventName: 'rowdragmoveinit', cancelable: true })\n rowDrag: EventEmitter<PositionItem & { rowType: DimensionRows }>;\n\n /** Row mouse move started */\n @Event({ eventName: 'rowdragmousemove', cancelable: true })\n rowMouseMove: EventEmitter<Cell & { rowType: DimensionRows }>;\n\n /** Row dragged, new range ready to be applied */\n @Event({ eventName: 'rowdropinit', cancelable: true })\n rowDropped: EventEmitter<{\n from: number;\n to: number;\n rowType: DimensionRows;\n }>;\n\n /** Row drag ended finished. Time to apply data */\n @Event({ eventName: 'roworderchange' })\n rowOrderChange: EventEmitter<{\n from: number;\n to: number;\n rowType: DimensionRows;\n }>;\n\n // #endregion\n\n // #region Private\n private rowOrderService: RowOrderService;\n private events: {\n name: keyof DocumentEventMap;\n listener: (e: MouseEvent) => void;\n }[] = [];\n private rowMoveFunc = debounce((y: number) => {\n const rgRow = this.rowOrderService.move(y, this.getData());\n if (rgRow !== null) {\n this.rowDrag.emit({\n ...rgRow,\n rowType: this.rowType,\n });\n }\n }, 5);\n // #endregion\n\n // #region Methods\n @Method() async dragStart(e: DragStartEvent) {\n e.originalEvent.preventDefault();\n\n // extra check if previous ended\n if (this.events.length) {\n this.clearOrder();\n }\n\n const data = this.getData();\n const cell = this.rowOrderService.startOrder(e.originalEvent, data);\n const pos = this.rowOrderService.getRow(e.originalEvent.y, data);\n const dragStartEvent = this.rowDragStart.emit({\n cell,\n text: DRAGG_TEXT,\n pos,\n event: e.originalEvent,\n rowType: this.rowType,\n model: getSourceItem(this.dataStore, pos.itemIndex),\n });\n if (dragStartEvent.defaultPrevented) {\n return;\n }\n\n const moveMove = (e: MouseEvent) => this.move(e);\n const mouseUp = (e: MouseEvent) => this.endOrder(e);\n const mouseLeave = () => this.clearOrder();\n\n this.events.push(\n {\n name: 'mousemove',\n listener: moveMove,\n },\n {\n name: 'mouseup',\n listener: mouseUp,\n },\n {\n name: 'mouseleave',\n listener: mouseLeave,\n },\n );\n document.addEventListener('mousemove', moveMove);\n // Action finished inside of the document\n document.addEventListener('mouseup', mouseUp);\n document.addEventListener('mouseleave', mouseLeave);\n }\n\n @Method() async endOrder(e: MouseEvent) {\n this.rowOrderService.endOrder(e, this.getData());\n this.clearOrder();\n }\n\n @Method() async clearOrder() {\n this.rowOrderService.clear();\n this.events.forEach(v => document.removeEventListener(v.name, v.listener));\n this.events.length = 0;\n this.rowDragEnd.emit({ rowType: this.rowType });\n }\n // #endregion\n\n move({ x, y }: { x: number; y: number }) {\n this.rowMouseMove.emit({ x, y, rowType: this.rowType });\n this.rowMoveFunc(y);\n }\n\n connectedCallback() {\n this.rowOrderService = new RowOrderService({\n positionChanged: (from: number, to: number) => {\n const dropEvent = this.rowDropped.emit({\n from,\n to,\n rowType: this.rowType,\n });\n if (dropEvent.defaultPrevented) {\n return;\n }\n this.rowOrderChange.emit(dropEvent.detail);\n },\n });\n }\n\n private getData() {\n return {\n el: this.parent,\n rows: this.dimensionRow.state,\n cols: this.dimensionCol.state,\n };\n }\n}\n"],"version":3}
@@ -884,7 +884,7 @@ const RevogrViewportScroll = class {
884
884
  this.setScrollVisibility('rgCol', this.horizontalScroll.clientWidth, this.contentWidth);
885
885
  }
886
886
  render() {
887
- return (index.h(index.Host, { key: '2bd41b077bb8baff6405cf6d071b48f22928879c', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, index.h("div", { key: '84367a3fc244706e2d027f8c9e59ea3a6f8fc984', class: "inner-content-table", style: { width: `${this.contentWidth}px` } }, index.h("div", { key: 'cbb8a1fa15139f07f9061f81e79218d00c14b8e6', class: "header-wrapper", ref: e => (this.header = e) }, index.h("slot", { key: '521618b45cf787bcc160532d01e9e1fcdd06823b', name: viewport_helpers.HEADER_SLOT })), index.h("div", { key: '2b381270fe97e949fb876603be364cc647ebc2d5', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, index.h("div", { key: 'a0a13d79b5d329132421571fdf2ab7b2e36e440e', class: "content-wrapper", style: { height: `${this.contentHeight}px` } }, index.h("slot", { key: '10279a0876aa194959da09309f914e6ce39b94fd', name: viewport_helpers.CONTENT_SLOT }))), index.h("div", { key: '619446ea77a713a8e157ff0f1a9afd0e5dfa356f', class: "footer-wrapper", ref: e => (this.footer = e) }, index.h("slot", { key: '43966ad2fde89f09c606173abf837672d8d4f822', name: viewport_helpers.FOOTER_SLOT })))));
887
+ return (index.h(index.Host, { key: '1ab60cd253b4cbb7b8ac64270abeface3302c059', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, index.h("div", { key: 'e49aefad8654ffae86456779fa6df3d3f0847f91', class: "inner-content-table", style: { width: `${this.contentWidth}px` } }, index.h("div", { key: 'c33287f70aa43126adb978e7a418ccb75cdee52d', class: "header-wrapper", ref: e => (this.header = e) }, index.h("slot", { key: 'e6a5dfc2e87d432bd307a6fc90c9ff2a3bdf7fee', name: viewport_helpers.HEADER_SLOT })), index.h("div", { key: '625dc0718dee320432d069bc276810511c8dc3b2', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, index.h("div", { key: 'd02346b13df20ddceb388ba605e7f5d460b30df8', class: "content-wrapper", style: { height: `${this.contentHeight}px` } }, index.h("slot", { key: 'e36687e72081966f5d68952539f311272a5c8e7f', name: viewport_helpers.CONTENT_SLOT }))), index.h("div", { key: 'f3d76ff24d602cc458bdc2f528ef61a608f302f3', class: "footer-wrapper", ref: e => (this.footer = e) }, index.h("slot", { key: '41db6c17907c8aec87bec71ba96cdaad3ecf21d8', name: viewport_helpers.FOOTER_SLOT })))));
888
888
  }
889
889
  /**
890
890
  * Extra layer for scroll event monitoring, where MouseWheel event is not passing
@@ -1 +1 @@
1
- {"file":"revogr-data.revogr-header.revogr-viewport-scroll.vnode-html.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;AAiBA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,IAAI,CAAC;QACtC,QACEtC,QAACqB,UAAI,qDACH,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,IAEpD,IAAI,CAAC,MAAM,CACP,EACP;KACH;;;;;;;;;","names":["MIN_COL_SIZE","HEADER_CLASS","h","HeaderCellRenderer","findIndex","getItemByIndex","HEADER_ROW_CLASS","index","DATA_ROW","GROUP_EXPAND_EVENT","PSEUDO_GROUP_ITEM","GROUP_EXPANDED","GROUP_DEPTH","GROUP_EXPAND_BTN","ROW_FOCUSED_CLASS","isRowDragService","DRAGGABLE_CLASS","DRAG_ICON_CLASS","getCellDataParsed","ColumnService","getSourceItem","isGrouping","DATA_COL","Host","getNative","defineProperty","baseEach","isArray","baseIteratee","HEADER_SORTABLE_CLASS","FOCUS_CLASS","SortingSign","FilterButton","keyBy","HEADER_ACTUAL_ROW_CLASS","throttle","LocalScrollTimer","LocalScrollService","HEADER_SLOT","CONTENT_SLOT","FOOTER_SLOT"],"sources":["src/plugins/groupingColumn/headerGroupRenderer.tsx","src/plugins/groupingColumn/columnGroupsRenderer.tsx","src/components/data/row-renderer.tsx","src/plugins/groupingRow/grouping.row.renderer.tsx","src/components/data/row-highlight.plugin.ts","src/components/vnode/vnode.utils.ts","src/components/data/cell-renderer.tsx","src/components/data/revogr-data-style.scss?tag=revogr-data","src/components/data/revogr-data.tsx","node_modules/lodash/_defineProperty.js","node_modules/lodash/_baseAssignValue.js","node_modules/lodash/_arrayAggregator.js","node_modules/lodash/_baseAggregator.js","node_modules/lodash/_createAggregator.js","node_modules/lodash/keyBy.js","src/components/header/header-renderer.tsx","src/components/header/revogr-header-style.scss?tag=revogr-header","src/components/header/revogr-header.tsx","src/utils/resize-observer.polifill.ts","src/components/revoGrid/viewport.resize.service.ts","src/components/scroll/revogr-viewport-scroll-style.scss?tag=revogr-viewport-scroll","src/components/scroll/revogr-viewport-scroll.tsx","src/components/vnode/vnode-converter.tsx"],"sourcesContent":["import { h } from '@stencil/core';\nimport { Group } from '@store';\nimport type { CellProps, Providers, DimensionCols } from '@type';\nimport { ResizeEvent, ResizeProps } from '../../components/header/resizable.directive';\nimport { HEADER_CLASS, MIN_COL_SIZE } from '../../utils/consts';\nimport { HeaderCellRenderer } from '../../components/header/header-cell-renderer';\n\ntype Props = {\n start: number;\n end: number;\n group: Group;\n providers: Providers<DimensionCols | 'rowHeaders'>;\n additionalData: any;\n canResize?: boolean;\n onResize?(e: ResizeEvent): void;\n} & Partial<Pick<ResizeProps, 'active'>>;\n\nconst GroupHeaderRenderer = (p: Props): ReturnType<typeof h> => {\n const groupProps: CellProps & Partial<ResizeProps> = {\n canResize: p.canResize,\n minWidth: p.group.ids.length * MIN_COL_SIZE,\n maxWidth: 0,\n\n active: p.active || ['r'],\n class: {\n [HEADER_CLASS]: true,\n },\n style: {\n transform: `translateX(${p.start}px)`,\n width: `${p.end - p.start}px`,\n },\n onResize: p.onResize,\n };\n return (\n <HeaderCellRenderer\n data={{\n ...p.group,\n prop: '',\n providers: p.providers,\n index: p.start,\n }}\n props={groupProps}\n additionalData={p.additionalData}\n />\n );\n};\n\nexport default GroupHeaderRenderer;\n","import { h } from '@stencil/core';\nimport findIndex from 'lodash/findIndex';\nimport { Group, getItemByIndex } from '@store';\nimport { DimensionSettingsState, Providers, DimensionCols } from '@type';\nimport { HEADER_ROW_CLASS } from '../../utils/consts';\nimport GroupHeaderRenderer from './headerGroupRenderer';\nimport { ResizeProps } from '../../components/header/resizable.directive';\n\ntype Props<T> = {\n visibleProps: { [prop: string]: number };\n groups: Record<number, Group[]>;\n dimensionCol: Pick<DimensionSettingsState, 'indexes' | 'originItemSize' | 'indexToItem'>;\n depth: number;\n canResize: boolean;\n providers: Providers<T>;\n additionalData: any;\n onResize(changedX: number, startIndex: number, endIndex: number): void;\n} & Partial<Pick<ResizeProps, 'active'>>;\n\nconst ColumnGroupsRenderer = ({\n additionalData, providers, depth, groups, visibleProps, dimensionCol, canResize, active, onResize\n}: Props<DimensionCols | 'rowHeaders'>): ReturnType<typeof h>[] => {\n // render group columns\n const groupRow: ReturnType<typeof h>[] = [];\n for (let i = 0; i < depth; i++) {\n if (groups[i]) {\n for (let group of groups[i]) {\n // if group in visible range\n // find first visible group prop in visible columns range\n const indexFirstVisibleCol: number | undefined = findIndex(group.ids, id => typeof visibleProps[id] === 'number');\n if (indexFirstVisibleCol > -1) {\n const colVisibleIndex = visibleProps[group.ids[indexFirstVisibleCol]]; // get column index\n const groupStartIndex = colVisibleIndex - indexFirstVisibleCol; // first column index in group\n const groupEndIndex = groupStartIndex + group.ids.length - 1; // last column index in group\n\n // coordinates\n const groupStart = getItemByIndex(dimensionCol, groupStartIndex).start;\n const groupEnd = getItemByIndex(dimensionCol, groupEndIndex).end;\n groupRow.push(\n <GroupHeaderRenderer\n providers={providers}\n start={groupStart}\n end={groupEnd}\n group={group}\n active={active}\n canResize={canResize}\n onResize={e => onResize(e.changedX ?? 0, groupStartIndex, groupEndIndex)}\n additionalData={additionalData}\n />,\n );\n }\n }\n }\n groupRow.push(<div class={`${HEADER_ROW_CLASS} group`} />);\n }\n return groupRow;\n};\n\nexport default ColumnGroupsRenderer;\n","import { h, type VNode } from '@stencil/core';\nimport { JSXBase } from '@stencil/core/internal';\nimport { DATA_ROW } from '../../utils/consts';\n\nexport interface RowProps extends JSXBase.HTMLAttributes {\n size: number;\n start: number;\n index: number;\n rowClass?: string;\n depth?: number;\n}\n\nexport const PADDING_DEPTH = 10;\n\nconst RowRenderer = ({ rowClass, index, size, start, depth }: RowProps, cells: VNode[]) => {\n const props = {\n ...{ [DATA_ROW]: index },\n };\n return (\n <div\n {...props}\n class={`rgRow ${rowClass || ''}`}\n style={{\n height: `${size}px`,\n transform: `translateY(${start}px)`,\n paddingLeft: depth ? `${PADDING_DEPTH * depth}px` : undefined,\n }}\n >\n {cells}\n </div>\n );\n};\n\nexport default RowRenderer;\n","import { h } from '@stencil/core';\nimport RowRenderer, { RowProps } from '../../components/data/row-renderer';\nimport { GROUP_DEPTH, GROUP_EXPANDED, GROUP_EXPAND_BTN, GROUP_EXPAND_EVENT, PSEUDO_GROUP_ITEM } from './grouping.const';\nimport { GroupLabelTemplateFunc } from './grouping.row.types';\nimport { DataType, PositionItem } from '@type';\n\ninterface GroupRowPros extends RowProps {\n model: DataType;\n hasExpand: boolean;\n groupingCustomRenderer?: GroupLabelTemplateFunc | null;\n}\ntype Props = GroupRowPros & PositionItem;\n\nfunction expandEvent(e: MouseEvent, model: DataType, virtualIndex: number) {\n const event = new CustomEvent(GROUP_EXPAND_EVENT, {\n detail: {\n model,\n virtualIndex,\n },\n cancelable: true,\n bubbles: true,\n });\n e.target?.dispatchEvent(event);\n}\n\nconst GroupingRowRenderer = (props: Props) => {\n const { model, itemIndex, hasExpand, groupingCustomRenderer } = props;\n const name: string = model[PSEUDO_GROUP_ITEM];\n const expanded = model[GROUP_EXPANDED];\n const depth = parseInt(model[GROUP_DEPTH], 10) || 0;\n if (!hasExpand) {\n return <RowRenderer {...props} rowClass=\"groupingRow\" depth={depth} />;\n }\n\n if (groupingCustomRenderer) {\n return (\n <RowRenderer {...props} rowClass=\"groupingRow\" depth={depth}>\n <div onClick={e => expandEvent(e, model, itemIndex)}>\n {groupingCustomRenderer(h, { name, itemIndex, expanded, depth })}\n </div>\n </RowRenderer>\n );\n }\n\n return (\n <RowRenderer {...props} rowClass=\"groupingRow\" depth={depth}>\n <button class={{ [GROUP_EXPAND_BTN]: true }} onClick={e => expandEvent(e, model, itemIndex)}>\n <svg aria-hidden=\"true\" style={{ transform: `rotate(${!expanded ? -90 : 0}deg)` }} focusable=\"false\" viewBox=\"0 0 448 512\">\n <path\n fill=\"currentColor\"\n d=\"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z\"\n ></path>\n </svg>\n </button>\n {name}\n </RowRenderer>\n );\n};\nexport default GroupingRowRenderer;\n","import { type VNode } from '@stencil/core';\nimport { ROW_FOCUSED_CLASS } from '../../utils/consts';\nimport { RangeArea } from '@type';\n\n/**\n * Class is responsible for highlighting rows in a table.\n */\nexport class RowHighlightPlugin {\n private currentRange: RangeArea | null = null;\n selectionChange(e: RangeArea, renderedRows: Map<number, VNode>) {\n // clear previous range\n if (this.currentRange) {\n renderedRows.forEach((row, y) => {\n // skip current range\n if (e && y >= e.y && y <= e.y1) {\n return;\n }\n\n // clear previous range\n if (\n row &&\n row.$elm$ instanceof HTMLElement &&\n row.$elm$.classList.contains(ROW_FOCUSED_CLASS)\n ) {\n row.$elm$.classList.remove(ROW_FOCUSED_CLASS);\n if (row.$attrs$?.class.includes(ROW_FOCUSED_CLASS)) {\n row.$attrs$.class = row.$attrs$.class.replace(\n ROW_FOCUSED_CLASS,\n '',\n );\n }\n }\n });\n }\n\n // apply new range\n if (e) {\n for (let y = e.y; y <= e.y1; y++) {\n const row = renderedRows.get(y);\n if (\n row &&\n row.$elm$ instanceof HTMLElement &&\n !row.$elm$.classList.contains(ROW_FOCUSED_CLASS)\n ) {\n const attrs = (row.$attrs$ = row.$attrs$ || {});\n attrs.class = (attrs.class || '') + ' ' + ROW_FOCUSED_CLASS;\n row.$elm$.classList.add(ROW_FOCUSED_CLASS);\n }\n }\n }\n this.currentRange = e;\n }\n\n isRowFocused(y: number) {\n return (\n this.currentRange && y >= this.currentRange.y && y <= this.currentRange.y1\n );\n }\n}\n","import { type VNode } from '@stencil/core';\nimport { type JSX } from '../../components';\n\n/**\n * Converts a VNode element into an HTML element and appends it to the specified parentHolder.\n */\nexport function convertVNodeToHTML(parentHolder: Element, redraw: JSX.VnodeHtml['redraw']): Promise<{ html: string; vnodes: (VNode[]) | null }> {\n return new Promise<{ html: string; vnodes: (VNode[]) | null }>(resolve => {\n const vnode = document.createElement('vnode-html');\n parentHolder.appendChild(vnode);\n vnode.redraw = redraw;\n vnode.addEventListener('html', e => {\n vnode.remove();\n resolve(e.detail);\n });\n });\n}\n","import { h, type VNode, Build, EventEmitter } from '@stencil/core';\nimport {\n DragStartEvent,\n CellTemplateProp,\n} from '@type';\n\nimport {\n DRAGGABLE_CLASS,\n DRAG_ICON_CLASS,\n getCellDataParsed,\n} from '../../utils';\n\nimport { isRowDragService } from './column.service';\n\ninterface RenderProps {\n schemaModel: CellTemplateProp;\n additionalData?: any;\n dragStartCell?: EventEmitter<DragStartEvent>;\n}\n\n\nfunction renderCell(v: RenderProps) {\n const els: (VNode | string)[] = [];\n\n // #region Custom cell\n const template = v.schemaModel.column?.cellTemplate;\n if (template) {\n els.push(template(h, v.schemaModel, v.additionalData));\n }\n // #endregion\n\n // #region Regular cell\n else {\n if (!v.schemaModel.column) {\n // something is wrong with data\n if (Build.isDev) {\n console.error('Investigate column problem.', v.schemaModel);\n }\n return '';\n }\n\n // Row drag\n if (\n v.schemaModel.column.rowDrag &&\n isRowDragService(v.schemaModel.column.rowDrag, v.schemaModel)\n ) {\n els.push(\n <span\n class={DRAGGABLE_CLASS}\n onMouseDown={originalEvent =>\n v.dragStartCell?.emit({\n originalEvent,\n model: v.schemaModel,\n })\n }\n >\n <span class={DRAG_ICON_CLASS} />\n </span>,\n );\n }\n \n els.push(`${\n getCellDataParsed(v.schemaModel.model, v.schemaModel.column)\n }`);\n }\n return els;\n}\n\nexport const CellRenderer = ({\n renderProps,\n cellProps,\n}: {\n renderProps: RenderProps;\n cellProps: any;\n}): VNode => {\n const render = renderCell.bind(null, renderProps);\n return (\n <div {...cellProps} redraw={render}>\n {render()}\n </div>\n );\n};\n","revogr-data {\n display: block;\n width: 100%;\n position: relative;\n\n .rgRow {\n position: absolute;\n width: 100%;\n left: 0;\n\n &.groupingRow {\n font-weight: 600;\n text-align: left;\n\n .group-expand {\n width: 25px;\n height: 100%;\n max-height: 25px;\n margin-right: 2px;\n background-color: transparent;\n border-color: transparent;\n\n svg {\n width: 7px;\n }\n }\n }\n }\n\n .revo-draggable {\n $w: 24px;\n\n border: none;\n height: 32px;\n display: inline-flex;\n outline: 0;\n padding: 0;\n font-size: 0.8125rem;\n box-sizing: border-box;\n align-items: center;\n white-space: nowrap;\n vertical-align: middle;\n justify-content: center;\n text-decoration: none;\n width: $w;\n height: 100%;\n cursor: pointer;\n display: inline-flex;\n\n &:hover {\n > .revo-drag-icon {\n opacity: 1;\n zoom: 1.2;\n font-weight: 600;\n }\n }\n\n > .revo-drag-icon {\n pointer-events: none;\n transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, zoom 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n }\n }\n\n .rgCell {\n top: 0;\n left: 0;\n position: absolute;\n box-sizing: border-box;\n height: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n outline: none;\n\n &.align-center {\n text-align: center;\n }\n &.align-left {\n text-align: left;\n }\n &.align-right {\n text-align: right;\n }\n }\n}\n","import {\n type VNode,\n Component,\n Host,\n Watch,\n Element,\n Event,\n Prop,\n EventEmitter,\n h,\n Method,\n State,\n} from '@stencil/core';\n\nimport ColumnService from './column.service';\nimport { DATA_COL, DATA_ROW, ROW_FOCUSED_CLASS } from '../../utils/consts';\n\nimport { DSourceState, getSourceItem } from '@store';\nimport RowRenderer, { PADDING_DEPTH } from './row-renderer';\nimport GroupingRowRenderer from '../../plugins/groupingRow/grouping.row.renderer';\nimport { isGrouping } from '../../plugins/groupingRow/grouping.service';\nimport { AllDimensionType, CellTemplateProp, DimensionCols, DimensionRows } from '@type';\nimport { RowHighlightPlugin } from './row-highlight.plugin';\nimport { convertVNodeToHTML } from '../vnode/vnode.utils';\nimport { CellRenderer } from './cell-renderer';\nimport {\n ViewportState,\n DimensionSettingsState,\n BeforeRowRenderEvent,\n Providers,\n ColumnRegular,\n DataType,\n CellProps,\n BeforeCellRenderEvent,\n DragStartEvent,\n VirtualPositionItem,\n RangeArea,\n SelectionStoreState,\n} from '@type';\nimport { Observable } from '../../utils';\n\n/**\n * This component is responsible for rendering data\n * Rows, columns, groups and cells\n */\n@Component({\n tag: 'revogr-data',\n styleUrl: 'revogr-data-style.scss',\n})\nexport class RevogrData {\n // #region Properties\n /**\n * Readonly mode\n */\n @Prop() readonly: boolean;\n /**\n * Range allowed\n */\n @Prop() range: boolean;\n\n /**\n * Defines property from which to read row class\n */\n @Prop() rowClass: string;\n /**\n * Additional data to pass to renderer\n * Used in plugins such as vue or react to pass root app entity to cells\n */\n @Prop() additionalData: any;\n /** Stores */\n /** Selection, range, focus for row selection */\n @Prop() rowSelectionStore!: Observable<SelectionStoreState>;\n /** Viewport Y */\n @Prop() viewportRow!: Observable<ViewportState>;\n /** Viewport X */\n @Prop() viewportCol!: Observable<ViewportState>;\n /** Dimension settings Y */\n @Prop() dimensionRow!: Observable<DimensionSettingsState>;\n\n /** Static stores, not expected to change during component lifetime */\n /**\n * Column source\n */\n @Prop() colData!: Observable<DSourceState<ColumnRegular, DimensionCols>>;\n /**\n * Data rows source\n */\n @Prop() dataStore!: Observable<DSourceState<DataType, DimensionRows>>;\n /**\n * Row data type\n */\n @Prop({ reflect: true }) type!: DimensionRows;\n\n /**\n * Column data type\n */\n @Prop({ reflect: true }) colType!: DimensionCols | 'rowHeaders';\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> | (() => Promise<any>))[] = [];\n // #endregion\n\n /**\n * Before each row render\n */\n @Event() beforerowrender: EventEmitter<BeforeRowRenderEvent>;\n \n /**\n * When data render finished for the designated type\n */\n @Event() afterrender: EventEmitter<{ type: DimensionRows }>;\n /**\n * Before each cell render function. Allows to override cell properties\n */\n @Event({ eventName: 'beforecellrender' })\n beforeCellRender: EventEmitter<BeforeCellRenderEvent<CellTemplateProp>>;\n\n /**\n * Before data render\n */\n @Event({ eventName: 'beforedatarender' })\n beforeDataRender: EventEmitter<AllDimensionType>;\n /**\n * Event emitted on cell drag start\n */\n @Event({ eventName: 'dragstartcell' })\n dragStartCell: EventEmitter<DragStartEvent>;\n\n /**\n * Pointed cell update.\n */\n @Method() async updateCell(e: {\n row: number; // virtual\n col: number; // virtual\n }) {\n // Stencil tweak to update cell content\n const cell = this.renderedRows.get(e.row)?.$children$?.[e.col];\n if (cell?.$attrs$?.redraw) {\n const children = await convertVNodeToHTML(\n this.element,\n cell.$attrs$.redraw,\n );\n cell.$elm$.innerHTML = children.html;\n cell.$key$ = Math.random();\n }\n }\n\n @Element() element!: Element;\n @State() providers: Providers;\n private columnService: ColumnService;\n private rowHighlightPlugin: RowHighlightPlugin;\n /**\n * Rendered rows - virtual index vs vnode\n */\n private renderedRows = new Map<number, VNode>();\n private rangeUnsubscribe: (() => void) | undefined;\n\n @Watch('dataStore') onDataStoreChange() {\n this.onStoreChange();\n }\n @Watch('colData') onColDataChange() {\n this.onStoreChange();\n }\n onStoreChange() {\n this.columnService?.destroy();\n this.columnService = new ColumnService(this.dataStore, this.colData);\n // make sure we have correct data, before render\n this.providers = {\n type: this.type,\n readonly: this.readonly,\n data: this.dataStore,\n viewport: this.viewportCol,\n dimension: this.dimensionRow,\n selection: this.rowSelectionStore,\n };\n\n this.rangeUnsubscribe?.();\n this.rangeUnsubscribe = this.rowSelectionStore.onChange(\n 'range',\n (e: RangeArea) =>\n this.rowHighlightPlugin.selectionChange(e, this.renderedRows),\n );\n }\n\n connectedCallback() {\n this.rowHighlightPlugin = new RowHighlightPlugin();\n this.onStoreChange();\n }\n\n disconnectedCallback() {\n this.columnService?.destroy();\n this.rangeUnsubscribe?.();\n }\n\n async componentWillRender() {\n this.beforeDataRender.emit({\n rowType: this.type,\n colType: this.colType as DimensionCols,\n });\n return Promise.all(this.jobsBeforeRender.map(p => typeof p === 'function' ? p() : p));\n }\n\n componentDidRender() {\n this.afterrender.emit({ type: this.type });\n }\n\n render() {\n this.renderedRows = new Map();\n const columnsData = this.columnService.columns;\n if (!columnsData.length) {\n return;\n }\n const rows = this.viewportRow.get('items');\n if (!rows.length) {\n return;\n }\n const cols = this.viewportCol.get('items');\n if (!cols.length) {\n return;\n }\n const rowsEls: VNode[] = [];\n const depth = this.dataStore.get('groupingDepth');\n const groupingCustomRenderer = this.dataStore.get('groupingCustomRenderer');\n const groupDepth = this.columnService.hasGrouping ? depth : 0;\n for (let rgRow of rows) {\n const dataItem = getSourceItem(this.dataStore, rgRow.itemIndex);\n\n // #region Grouping\n if (isGrouping(dataItem)) {\n rowsEls.push(\n <GroupingRowRenderer\n {...rgRow}\n index={rgRow.itemIndex}\n model={dataItem}\n groupingCustomRenderer={groupingCustomRenderer}\n hasExpand={this.columnService.hasGrouping}\n />,\n );\n continue;\n }\n // #endregion\n const cells: (VNode | string | void)[] = [];\n\n // #region Cells\n for (let rgCol of cols) {\n const smodel: CellTemplateProp = {\n ...this.columnService.rowDataModel(\n rgRow.itemIndex,\n rgCol.itemIndex,\n ),\n providers: this.providers,\n };\n\n // call before cell render\n const cellEvent = this.triggerBeforeCellRender(smodel, rgRow, rgCol);\n\n // if event was prevented\n if (cellEvent.defaultPrevented) {\n continue;\n }\n\n const {\n detail: { column: columnProps, row: rowProps, model: schemaModel },\n } = cellEvent;\n\n const defaultProps: CellProps = {\n [DATA_COL]: columnProps.itemIndex,\n [DATA_ROW]: rowProps.itemIndex,\n style: {\n width: `${columnProps.size}px`,\n transform: `translateX(${columnProps.start}px)`,\n height: rowProps.size ? `${rowProps.size}px` : undefined,\n },\n };\n /**\n * For grouping, can be removed in the future and replaced with event\n */\n if (groupDepth && !columnProps.itemIndex && defaultProps.style) {\n defaultProps.style.paddingLeft = `${PADDING_DEPTH * groupDepth}px`;\n }\n\n const props = this.columnService.mergeProperties(\n rowProps.itemIndex,\n columnProps.itemIndex,\n defaultProps,\n schemaModel,\n );\n\n // Never use webcomponent for cell render\n // It's very slow because of webcomponent initialization takes time\n const cellNode = <CellRenderer\n renderProps={{\n schemaModel,\n additionalData: this.additionalData,\n dragStartCell: this.dragStartCell,\n }}\n cellProps={props}\n />;\n cells.push(cellNode);\n }\n // #endregion\n\n // #region Rows\n let rowClass = this.rowClass\n ? this.columnService.getRowClass(rgRow.itemIndex, this.rowClass)\n : '';\n if (this.rowHighlightPlugin.isRowFocused(rgRow.itemIndex)) {\n rowClass += ` ${ROW_FOCUSED_CLASS}`;\n }\n const row: VNode = (\n <RowRenderer\n index={rgRow.itemIndex}\n rowClass={rowClass}\n size={rgRow.size}\n start={rgRow.start}\n >\n {cells}\n </RowRenderer>\n );\n this.beforerowrender.emit({\n node: row,\n item: rgRow,\n model: dataItem,\n colType: this.columnService.type,\n rowType: this.type,\n });\n rowsEls.push(row);\n this.renderedRows.set(rgRow.itemIndex, row);\n // #endregion\n }\n return (\n <Host>\n <slot />\n {rowsEls}\n </Host>\n );\n }\n\n triggerBeforeCellRender(\n model: CellTemplateProp,\n row: VirtualPositionItem,\n column: VirtualPositionItem,\n ) {\n const detail: BeforeCellRenderEvent<CellTemplateProp> = {\n column,\n row,\n model,\n rowType: model.type,\n colType: model.colType,\n };\n return this.beforeCellRender.emit(detail);\n }\n}\n","import getNative from './_getNative.js';\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nexport default defineProperty;\n","import defineProperty from './_defineProperty.js';\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nexport default baseAssignValue;\n","/**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n}\n\nexport default arrayAggregator;\n","import baseEach from './_baseEach.js';\n\n/**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n}\n\nexport default baseAggregator;\n","import arrayAggregator from './_arrayAggregator.js';\nimport baseAggregator from './_baseAggregator.js';\nimport baseIteratee from './_baseIteratee.js';\nimport isArray from './isArray.js';\n\n/**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\nfunction createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, baseIteratee(iteratee, 2), accumulator);\n };\n}\n\nexport default createAggregator;\n","import baseAssignValue from './_baseAssignValue.js';\nimport createAggregator from './_createAggregator.js';\n\n/**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var array = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(array, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(array, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */\nvar keyBy = createAggregator(function(result, value, key) {\n baseAssignValue(result, key, value);\n});\n\nexport default keyBy;\n","import { h } from '@stencil/core';\nimport type {\n VirtualPositionItem,\n ColumnTemplateProp,\n InitialHeaderClick,\n RangeArea\n} from '@type';\n\nimport { FilterButton } from '../../plugins/filter/filter.button';\nimport { SortingSign } from '../../plugins/sorting/sorting.sign';\nimport { ResizeEvent, ResizeProps } from './resizable.directive';\nimport {\n DATA_COL,\n FOCUS_CLASS,\n HEADER_CLASS,\n HEADER_SORTABLE_CLASS,\n MIN_COL_SIZE,\n} from '../../utils/consts';\nimport { HeaderCellRenderer } from './header-cell-renderer';\nimport { ResizableElementHTMLAttributes } from './resizable.element';\n\nexport type HeaderRenderProps = {\n column: VirtualPositionItem;\n additionalData: any;\n data: ColumnTemplateProp;\n range?: RangeArea | null;\n canResize?: boolean;\n canFilter?: boolean;\n onResize?(e: ResizeEvent): void;\n onClick?(data: InitialHeaderClick): void;\n onDblClick?(data: InitialHeaderClick): void;\n} & Partial<Pick<ResizeProps, 'active'>>;\n\nconst HeaderRenderer = (p: HeaderRenderProps): ReturnType<typeof h> => {\n const cellClass: { [key: string]: boolean } = {\n [HEADER_CLASS]: true,\n [HEADER_SORTABLE_CLASS]: !!p.data?.sortable,\n };\n if (p.data?.order) {\n cellClass[p.data.order] = true;\n }\n const dataProps: ResizableElementHTMLAttributes = {\n [DATA_COL]: p.column.itemIndex,\n canResize: p.canResize,\n minWidth: p.data?.minSize || MIN_COL_SIZE,\n maxWidth: p.data?.maxSize,\n active: p.active || ['r'],\n class: cellClass,\n style: {\n width: `${p.column.size}px`,\n transform: `translateX(${p.column.start}px)`,\n },\n onResize: p.onResize,\n onDblClick(originalEvent: MouseEvent) {\n p.onDblClick?.({\n column: p.data,\n index: p.column.itemIndex,\n originalEvent,\n providers: p.data.providers,\n });\n },\n onClick(originalEvent: MouseEvent) {\n if (originalEvent.defaultPrevented || !p.onClick) {\n return;\n }\n p.onClick({\n column: p.data,\n index: p.column.itemIndex,\n originalEvent,\n providers: p.data.providers,\n });\n },\n };\n if (p.range) {\n if (p.column.itemIndex >= p.range.x && p.column.itemIndex <= p.range.x1) {\n if (typeof dataProps.class === 'object') {\n dataProps.class[FOCUS_CLASS] = true;\n }\n }\n }\n return (\n <HeaderCellRenderer\n data={p.data}\n props={dataProps}\n additionalData={p.additionalData}\n >\n {<SortingSign column={p.data} />}\n {p.canFilter && p.data?.filter !== false ? (\n <FilterButton column={p.data} />\n ) : (\n ''\n )}\n </HeaderCellRenderer>\n );\n};\n\nexport default HeaderRenderer;\n","revogr-header {\n position: relative;\n z-index: 5;\n display: block;\n \n\n .rgHeaderCell {\n display: flex;\n\n &.align-center {\n text-align: center;\n }\n &.align-left {\n text-align: left;\n }\n &.align-right {\n text-align: right;\n }\n &.sortable {\n cursor: pointer;\n }\n\n i {\n &.asc,\n &.desc {\n &:after {\n font-size: 13px;\n }\n }\n &.asc {\n &:after {\n content: '↑';\n }\n }\n &.desc {\n &:after {\n content: '↓';\n }\n }\n }\n }\n\n .rgHeaderCell,\n .grouped-cell {\n position: absolute;\n box-sizing: border-box;\n height: 100%;\n z-index: 1;\n }\n\n .header-rgRow {\n display: block;\n position: relative;\n\n &.group {\n z-index: 0;\n }\n }\n\n .group-rgRow {\n position: relative;\n }\n\n .rgHeaderCell {\n &.active {\n z-index: 10;\n\n .resizable {\n background-color: deepskyblue;\n }\n }\n .header-content {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex-grow: 1;\n }\n .resizable {\n display: block;\n position: absolute;\n z-index: 90;\n touch-action: none;\n user-select: none;\n &:hover {\n background-color: deepskyblue;\n }\n }\n $size: 6px;\n > .resizable-r {\n cursor: ew-resize;\n width: $size;\n right: 0;\n top: 0;\n height: 100%;\n }\n > .resizable-rb {\n cursor: se-resize;\n width: $size;\n height: $size;\n right: 0;\n bottom: 0;\n }\n\n > .resizable-b {\n cursor: s-resize;\n height: $size;\n bottom: 0;\n width: 100%;\n left: 0;\n }\n\n > .resizable-lb {\n cursor: sw-resize;\n width: $size;\n height: $size;\n left: 0;\n bottom: 0;\n }\n\n > .resizable-l {\n cursor: w-resize;\n width: $size;\n left: 0;\n height: 100%;\n top: 0;\n }\n\n > .resizable-lt {\n cursor: nw-resize;\n width: $size;\n height: $size;\n left: 0;\n top: 0;\n }\n\n > .resizable-t {\n cursor: n-resize;\n height: $size;\n top: 0;\n width: 100%;\n left: 0;\n }\n\n > .resizable-rt {\n cursor: ne-resize;\n width: $size;\n height: $size;\n right: 0;\n top: 0;\n }\n }\n .rv-filter {\n visibility: hidden;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Prop,\n type VNode,\n} from '@stencil/core';\nimport keyBy from 'lodash/keyBy';\n\nimport { HEADER_ACTUAL_ROW_CLASS, HEADER_ROW_CLASS } from '../../utils/consts';\nimport { Groups } from '@store';\nimport HeaderRenderer, { HeaderRenderProps } from './header-renderer';\nimport ColumnGroupsRenderer from '../../plugins/groupingColumn/columnGroupsRenderer';\nimport { ResizeProps } from './resizable.directive';\nimport {\n ColumnRegular,\n DimensionSettingsState,\n InitialHeaderClick,\n Providers,\n ViewportState,\n ViewSettingSizeProp,\n DimensionCols,\n SelectionStoreState,\n} from '@type';\nimport { Observable } from '../../utils';\n\n@Component({\n tag: 'revogr-header',\n styleUrl: 'revogr-header-style.scss',\n})\nexport class RevogrHeaderComponent {\n // #region Properties\n /**\n * Stores\n */\n /** Viewport X */\n @Prop() viewportCol: Observable<ViewportState>;\n /** Dimension settings X */\n @Prop() dimensionCol: Observable<DimensionSettingsState>;\n /** Selection, range, focus */\n @Prop() selectionStore: Observable<SelectionStoreState>;\n\n /**\n * Column groups\n */\n @Prop() groups: Groups;\n /**\n * Grouping depth, how many levels of grouping\n */\n @Prop() groupingDepth = 0;\n\n /**\n * Readonly mode\n */\n @Prop() readonly: boolean;\n /**\n * If columns can be resized\n */\n @Prop() canResize: boolean;\n /**\n * Defines resize position\n */\n @Prop() resizeHandler: ResizeProps['active'];\n\n /**\n * Columns - defines an array of grid columns.\n */\n @Prop() colData: ColumnRegular[];\n\n /**\n * Column filter\n */\n @Prop() columnFilter: boolean;\n\n /**\n * Column type\n */\n @Prop() type!: DimensionCols | 'rowHeaders';\n\n /**\n * Extra properties to pass into header renderer, such as vue or react components to handle parent\n */\n @Prop() additionalData: any = {};\n // #endregion\n\n // #region Events\n\n /**\n * On initial header click\n */\n @Event({\n eventName: 'beforeheaderclick',\n })\n initialHeaderClick: EventEmitter<InitialHeaderClick>;\n\n /**\n * On header resize\n */\n @Event({\n eventName: 'headerresize',\n })\n headerresize: EventEmitter<ViewSettingSizeProp>;\n\n /**\n * On before header resize\n */\n @Event({ eventName: 'beforeheaderresize', cancelable: true })\n beforeResize: EventEmitter<ColumnRegular[]>;\n\n /**\n * On header double click\n */\n @Event({\n eventName: 'headerdblclick',\n })\n headerdblClick: EventEmitter<InitialHeaderClick>;\n\n /**\n * Before each header cell render function. Allows to override cell properties\n */\n @Event({ eventName: 'beforeheaderrender' })\n beforeHeaderRender: EventEmitter<HeaderRenderProps>;\n\n /**\n * After all header cells rendered. Finalizes cell rendering.\n */\n @Event({ eventName: 'afterheaderrender' })\n afterHeaderRender: EventEmitter<Providers<DimensionCols | 'rowHeaders'>>;\n\n // #endregion\n\n @Element() element!: HTMLElement;\n\n private onResize({ width }: { width?: number }, index: number) {\n const col = this.colData[index];\n const event = this.beforeResize.emit([\n {\n ...col,\n size: width || undefined,\n },\n ]);\n if (event.defaultPrevented) {\n return;\n }\n this.headerresize.emit({ [index]: width || 0 });\n }\n\n private onResizeGroup(\n changedX: number,\n startIndex: number,\n endIndex: number,\n ) {\n const sizes: ViewSettingSizeProp = {};\n const cols = keyBy(this.viewportCol.get('items'), 'itemIndex');\n const change = changedX / (endIndex - startIndex + 1);\n for (let i = startIndex; i <= endIndex; i++) {\n const item = cols[i];\n if (item) {\n sizes[i] = item.size + change;\n }\n }\n this.headerresize.emit(sizes);\n }\n\n componentDidRender() {\n this.afterHeaderRender.emit(this.providers);\n }\n\n render() {\n const cols = this.viewportCol.get('items');\n const range = this.selectionStore?.get('range');\n const cells: VNode[] = [];\n const visibleProps: { [prop: string]: number } = {};\n\n // render header columns\n for (let rgCol of cols) {\n const colData = this.colData[rgCol.itemIndex];\n const props: HeaderRenderProps = {\n range: range,\n column: rgCol,\n data: {\n ...colData,\n index: rgCol.itemIndex,\n providers: this.providers,\n },\n canFilter: !!this.columnFilter,\n canResize: this.canResize,\n active: this.resizeHandler,\n onResize: e => this.onResize(e, rgCol.itemIndex),\n onDblClick: e => this.headerdblClick.emit(e),\n onClick: e => this.initialHeaderClick.emit(e),\n additionalData: this.additionalData,\n };\n const event = this.beforeHeaderRender.emit(props);\n if (event.defaultPrevented) {\n continue;\n }\n cells.push(<HeaderRenderer {...event.detail} />);\n visibleProps[colData?.prop] = rgCol.itemIndex;\n }\n\n return [\n <div class=\"group-rgRow\">\n <ColumnGroupsRenderer\n canResize={this.canResize}\n active={this.resizeHandler}\n visibleProps={visibleProps}\n providers={this.providers}\n groups={this.groups}\n dimensionCol={this.dimensionCol.state}\n depth={this.groupingDepth}\n onResize={(changedX, startIndex, endIndex) =>\n this.onResizeGroup(changedX, startIndex, endIndex)\n }\n additionalData={this.additionalData}\n />\n </div>,\n <div class={`${HEADER_ROW_CLASS} ${HEADER_ACTUAL_ROW_CLASS}`}>\n {cells}\n </div>,\n ];\n }\n\n get providers(): Providers<DimensionCols | 'rowHeaders'> {\n return {\n type: this.type,\n readonly: this.readonly,\n data: this.colData,\n viewport: this.viewportCol,\n dimension: this.dimensionCol,\n selection: this.selectionStore,\n };\n }\n}\n","export async function resizeObserver() {\n if (!('ResizeObserver' in window)) {\n const module = await import('@juggle/resize-observer');\n (window as Window & typeof globalThis).ResizeObserver = (module.ResizeObserver as unknown) as typeof ResizeObserver;\n }\n}\n","import throttle from 'lodash/throttle';\nimport { resizeObserver } from '../../utils/resize-observer.polifill';\ninterface Events {\n resize(entries: ReadonlyArray<ResizeObserverEntry>, observer: ResizeObserver): void;\n}\nexport default class GridResizeService {\n private resizeObserver: ResizeObserver | null = null;\n private resize = throttle((e: ReadonlyArray<ResizeObserverEntry>, o: ResizeObserver) => this.events?.resize(e, o), 10);\n constructor(el: HTMLElement, private events: Events) {\n this.init(el);\n }\n\n async init(el: HTMLElement): Promise<void> {\n await resizeObserver();\n this.resizeObserver = new ResizeObserver(this.resize);\n this.resizeObserver?.observe(el);\n }\n\n public destroy() {\n this.resizeObserver?.disconnect();\n this.resizeObserver = null;\n }\n}\n","@mixin noScroll {\n /* Hide scrollbar for IE and Edge */\n -ms-overflow-style: none;\n scrollbar-width: none; /* Firefox */\n /* Hide scrollbar for Chrome, Safari and Opera */\n &::-webkit-scrollbar {\n display: none;\n -webkit-appearance: none;\n }\n}\n\n.rowHeaders {\n z-index: 2;\n font-size: 10px;\n display: flex;\n height: 100%;\n\n revogr-data .rgCell {\n text-align: center;\n }\n\n .rgCell {\n padding: 0 1em !important;\n min-width: 100%;\n }\n}\n\nrevogr-viewport-scroll {\n @include noScroll;\n\n overflow-x: auto;\n overflow-y: hidden;\n position: relative;\n z-index: 1;\n height: 100%;\n\n &.colPinStart,\n &.colPinEnd {\n z-index: 2;\n }\n\n // make sure it would work\n &.colPinEnd:has(.active) {\n overflow: visible;\n }\n\n &.rgCol {\n flex-grow: 1;\n }\n\n .content-wrapper {\n overflow: hidden;\n }\n\n .inner-content-table {\n display: flex;\n flex-direction: column;\n max-height: 100%;\n width: 100%;\n min-width: 100%;\n position: relative;\n z-index: 0;\n }\n\n .vertical-inner {\n overflow-y: auto;\n position: relative;\n width: 100%;\n flex-grow: 1;\n outline: none; // avoid accessibility focus issue\n @include noScroll;\n\n revogr-data,\n revogr-overlay-selection {\n height: 100%;\n }\n }\n}\n","import {\n Component,\n Event,\n EventEmitter,\n h,\n Method,\n Element,\n Prop,\n Host,\n Listen,\n} from '@stencil/core';\n\nimport GridResizeService from '../revoGrid/viewport.resize.service';\nimport LocalScrollService from '../../services/local.scroll.service';\nimport { LocalScrollTimer } from '../../services/local.scroll.timer';\nimport {\n CONTENT_SLOT,\n FOOTER_SLOT,\n HEADER_SLOT,\n} from '../revoGrid/viewport.helpers';\nimport { DimensionCols, DimensionType, ElementScroll } from '@type';\nimport { ScrollCoordinateEvent, ViewPortResizeEvent, ViewPortScrollEvent } from '@type';\n\ntype Delta = 'deltaX' | 'deltaY';\ntype LocalScrollEvent = {\n preventDefault(): void;\n} & { [x in Delta]: number };\n\n/**\n * Viewport scroll component for RevoGrid\n * @slot - content\n * @slot header - header\n * @slot footer - footer\n */\n@Component({\n tag: 'revogr-viewport-scroll',\n styleUrl: 'revogr-viewport-scroll-style.scss',\n})\nexport class RevogrViewportScroll implements ElementScroll {\n /**\n * Enable row header\n */\n @Prop() readonly rowHeader: boolean;\n\n /**\n * Width of inner content\n */\n @Prop() contentWidth = 0;\n /**\n * Height of inner content\n */\n @Prop() contentHeight = 0;\n\n @Prop() colType!: DimensionCols | 'rowHeaders';\n\n /**\n * Before scroll event\n */\n @Event({ eventName: 'scrollviewport', bubbles: true }) scrollViewport: EventEmitter<ViewPortScrollEvent>;\n /**\n * Viewport resize\n */\n @Event({ eventName: 'resizeviewport' }) resizeViewport: EventEmitter<ViewPortResizeEvent>;\n\n /**\n * Triggered on scroll change, can be used to get information about scroll visibility\n */\n @Event() scrollchange: EventEmitter<{\n type: DimensionType;\n hasScroll: boolean;\n }>;\n\n /**\n * Silently scroll to coordinate\n * Made to align negative coordinates for mobile devices\n */\n @Event({ eventName: 'scrollviewportsilent' }) silentScroll: EventEmitter<ViewPortScrollEvent>;\n\n @Element() horizontalScroll: HTMLElement;\n\n private oldValY = this.contentHeight;\n private oldValX = this.contentWidth;\n\n private verticalScroll?: HTMLElement;\n private header?: HTMLElement;\n private footer?: HTMLElement;\n\n /**\n * Static functions to bind wheel change\n */\n private horizontalMouseWheel: (e: Partial<LocalScrollEvent>) => void;\n private verticalMouseWheel: (e: Partial<LocalScrollEvent>) => void;\n\n private resizeService?: GridResizeService;\n private localScrollService: LocalScrollService;\n private localScrollTimer: LocalScrollTimer;\n\n\n @Method() async setScroll(e: ViewPortScrollEvent) {\n this.localScrollTimer.latestScrollUpdate(e.dimension);\n this.localScrollService?.setScroll(e);\n }\n\n /**\n * update on delta in case we don't know existing position or external change\n * @param e\n */\n @Method() async changeScroll(\n e: ViewPortScrollEvent,\n silent = false,\n ) {\n if (silent) {\n if (e.coordinate && this.verticalScroll) {\n switch (e.dimension) {\n // for mobile devices to skip negative scroll loop. only on vertical scroll\n case 'rgRow':\n this.verticalScroll.style.transform = `translateY(${-1 * e.coordinate}px)`;\n break;\n }\n }\n return;\n }\n if (e.delta) {\n switch (e.dimension) {\n case 'rgCol':\n e.coordinate = this.horizontalScroll.scrollLeft + e.delta;\n break;\n case 'rgRow':\n e.coordinate = (this.verticalScroll?.scrollTop ?? 0) + e.delta;\n break;\n }\n this.setScroll(e);\n }\n return e;\n }\n\n /**\n * Dispatch this event to trigger vertical mouse wheel from plugins\n */\n @Listen('mousewheel-vertical') mousewheelVertical({\n detail: e,\n }: CustomEvent<LocalScrollEvent>) {\n this.verticalMouseWheel(e);\n }\n /**\n * Dispatch this event to trigger horizontal mouse wheel from plugins\n */\n @Listen('mousewheel-horizontal') mousewheelHorizontal({\n detail: e,\n }: CustomEvent<LocalScrollEvent>) {\n this.horizontalMouseWheel(e);\n }\n /**\n * Allows to use outside listener\n */\n @Listen('scroll-coordinate') scrollApply({\n detail: { type, coordinate },\n }: CustomEvent<ScrollCoordinateEvent>) {\n this.applyOnScroll(type, coordinate, true);\n }\n\n connectedCallback() {\n /**\n * Bind scroll functions for farther usage\n */\n // allow mousewheel for all devices including mobile\n this.verticalMouseWheel = this.onVerticalMouseWheel.bind(\n this,\n 'rgRow',\n 'deltaY',\n );\n this.horizontalMouseWheel = this.onHorizontalMouseWheel.bind(\n this,\n 'rgCol',\n 'deltaX',\n );\n this.localScrollTimer = new LocalScrollTimer('ontouchstart' in document.documentElement ? 0 : 10);\n /**\n * Create local scroll service\n */\n this.localScrollService = new LocalScrollService({\n // to improve safari smoothnes on scroll\n // skipAnimationFrame: isSafariDesktop(),\n runScroll: e => this.scrollViewport.emit(e),\n applyScroll: e => {\n this.localScrollTimer.setCoordinate(e);\n switch (e.dimension) {\n case 'rgCol':\n // this will trigger on scroll event\n this.horizontalScroll.scrollLeft = e.coordinate;\n break;\n case 'rgRow':\n if (this.verticalScroll) {\n // this will trigger on scroll event\n this.verticalScroll.scrollTop = e.coordinate;\n // for mobile devices to skip negative scroll loop. only on vertical scroll\n if (this.verticalScroll.style.transform) {\n this.verticalScroll.style.transform = '';\n }\n }\n break;\n }\n },\n });\n }\n\n componentDidLoad() {\n // track horizontal viewport resize\n this.resizeService = new GridResizeService(this.horizontalScroll, {\n resize: entries => {\n let height = entries[0]?.contentRect.height || 0;\n if (height) {\n height -= (this.header?.clientHeight ?? 0) + (this.footer?.clientHeight ?? 0);\n }\n const els = {\n rgRow: {\n size: height,\n contentSize: this.contentHeight,\n scroll: this.verticalScroll?.scrollTop,\n noScroll: false,\n },\n rgCol: {\n size: entries[0]?.contentRect.width || 0,\n contentSize: this.contentWidth,\n scroll: this.horizontalScroll.scrollLeft,\n noScroll: this.colType !== 'rgCol',\n },\n };\n for (const [dim, item] of Object.entries(els)) {\n const dimension = dim as DimensionType;\n this.resizeViewport.emit({ dimension, size: item.size, rowHeader: this.rowHeader });\n if (item.noScroll) {\n continue;\n }\n this.localScrollService?.scroll(item.scroll ?? 0, dimension, true);\n // track scroll visibility on outer element change\n this.setScrollVisibility(dimension, item.size, item.contentSize);\n }\n },\n });\n }\n\n /**\n * Check if scroll present or not per type\n * Trigger this method on inner content size change or on outer element size change\n * If inner content bigger then outer size then scroll is present and mousewheel binding required\n * @param type - dimension type 'rgRow/y' or 'rgCol/x'\n * @param size - outer content size\n * @param innerContentSize - inner content size\n */\n setScrollVisibility(\n type: DimensionType,\n size: number,\n innerContentSize: number,\n ) {\n // test if scroll present\n const hasScroll = size < innerContentSize;\n let el: HTMLElement | undefined;\n // event reference for binding\n switch (type) {\n case 'rgCol':\n el = this.horizontalScroll;\n break;\n case 'rgRow':\n el = this.verticalScroll;\n break;\n }\n // based on scroll visibility assign or remove class and event\n if (hasScroll) {\n el?.classList.add(`scroll-${type}`);\n } else {\n el?.classList.remove(`scroll-${type}`);\n }\n this.scrollchange.emit({ type, hasScroll });\n }\n\n disconnectedCallback() {\n this.resizeService?.destroy();\n }\n\n async componentDidRender() {\n // scroll update if number of rows changed\n if (this.contentHeight < this.oldValY && this.verticalScroll) {\n this.verticalScroll.scrollTop += this.contentHeight - this.oldValY;\n }\n this.oldValY = this.contentHeight;\n\n // scroll update if number of cols changed\n if (this.contentWidth < this.oldValX) {\n this.horizontalScroll.scrollLeft += this.contentWidth - this.oldValX;\n }\n this.oldValX = this.contentWidth;\n\n this.localScrollService.setParams(\n {\n contentSize: this.contentHeight,\n clientSize: this.verticalScroll?.clientHeight ?? 0,\n virtualSize: 0,\n },\n 'rgRow',\n );\n\n this.localScrollService.setParams(\n {\n contentSize: this.contentWidth,\n clientSize: this.horizontalScroll.clientWidth,\n virtualSize: 0,\n },\n 'rgCol',\n );\n this.setScrollVisibility(\n 'rgRow',\n this.verticalScroll?.clientHeight ?? 0,\n this.contentHeight,\n );\n this.setScrollVisibility(\n 'rgCol',\n this.horizontalScroll.clientWidth,\n this.contentWidth,\n );\n }\n\n render() {\n return (\n <Host\n onWheel={this.horizontalMouseWheel}\n onScroll={(e: UIEvent) => this.applyScroll('rgCol', e)}\n >\n <div\n class=\"inner-content-table\"\n style={{ width: `${this.contentWidth}px` }}\n >\n <div class=\"header-wrapper\" ref={e => (this.header = e)}>\n <slot name={HEADER_SLOT} />\n </div>\n <div\n class=\"vertical-inner\"\n ref={el => (this.verticalScroll = el)}\n onWheel={this.verticalMouseWheel}\n onScroll={(e: MouseEvent) => this.applyScroll('rgRow', e)}\n >\n <div\n class=\"content-wrapper\"\n style={{ height: `${this.contentHeight}px` }}\n >\n <slot name={CONTENT_SLOT} />\n </div>\n </div>\n <div class=\"footer-wrapper\" ref={e => (this.footer = e)}>\n <slot name={FOOTER_SLOT} />\n </div>\n </div>\n </Host>\n );\n }\n /**\n * Extra layer for scroll event monitoring, where MouseWheel event is not passing\n * We need to trigger scroll event in case there is no mousewheel event\n */\n @Method() async applyScroll(type: DimensionType, e: UIEvent) {\n if (!(e.target instanceof HTMLElement)) {\n return;\n }\n let scroll = 0;\n switch (type) {\n case 'rgCol':\n scroll = e.target.scrollLeft;\n break;\n case 'rgRow':\n scroll = e.target.scrollTop;\n break;\n }\n\n // for mobile devices to skip negative scroll loop\n if (scroll < 0) {\n this.silentScroll.emit({ dimension: type, coordinate: scroll });\n return;\n }\n this.applyOnScroll(type, scroll);\n }\n\n /**\n * Applies change on scroll event only if mousewheel event happened some time ago\n */\n private applyOnScroll(\n type: DimensionType,\n coordinate: number,\n outside = false,\n ) {\n // apply after throttling\n if (this.localScrollTimer.isReady(type, coordinate)) {\n this.localScrollService?.scroll(\n coordinate,\n type,\n undefined,\n undefined,\n outside,\n );\n }\n }\n\n /**\n * On vertical mousewheel event\n * @param type\n * @param delta\n * @param e\n */\n private onVerticalMouseWheel(\n type: DimensionType,\n delta: Delta,\n e: LocalScrollEvent,\n ) {\n const scrollTop = this.verticalScroll?.scrollTop ?? 0;\n const clientHeight = this.verticalScroll?.clientHeight ?? 0;\n const scrollHeight = this.verticalScroll?.scrollHeight ?? 0;\n\n // Detect if the user has reached the bottom\n const atBottom = (scrollTop + clientHeight >= scrollHeight) && e.deltaY > 0;\n const atTop = scrollTop === 0 && e.deltaY < 0;\n if (!atBottom && !atTop) {\n e.preventDefault?.();\n }\n const pos = scrollTop + e[delta];\n this.localScrollService?.scroll(pos, type, undefined, e[delta]);\n this.localScrollTimer.latestScrollUpdate(type);\n }\n\n /**\n * On horizontal mousewheel event\n * @param type\n * @param delta\n * @param e\n */\n private onHorizontalMouseWheel(\n type: DimensionType,\n delta: Delta,\n e: LocalScrollEvent,\n ) {\n if (!e.deltaX) {\n return;\n }\n const { scrollLeft, scrollWidth, clientWidth } = this.horizontalScroll;\n\n // Detect if the user has reached the right end\n const atRight = (scrollLeft + clientWidth >= scrollWidth) && e.deltaX > 0;\n\n // Detect if the user has reached the left end\n const atLeft = scrollLeft === 0 && e.deltaX < 0;\n if (!atRight && !atLeft) {\n e.preventDefault?.();\n }\n const pos = scrollLeft + e[delta];\n this.localScrollService?.scroll(pos, type, undefined, e[delta]);\n this.localScrollTimer.latestScrollUpdate(type);\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Prop,\n type VNode,\n h,\n} from '@stencil/core';\n\n/**\n * VNode to html converter for stencil components.\n * Transform VNode to html string.\n */\n/**\n * @internal\n */\n@Component({\n tag: 'vnode-html',\n})\nexport class VNodeToHtml {\n @Prop() redraw: (() => VNode[]) | null | undefined = null;\n @Event() html: EventEmitter<{ html: string; vnodes: (VNode[]) | null }>;\n @Element() el: HTMLElement;\n\n private vnodes: VNode[] | null = [];\n\n componentDidRender() {\n this.html.emit({\n html: this.el.innerHTML,\n vnodes: this.vnodes,\n });\n }\n\n render() {\n this.vnodes = this.redraw?.() ?? null;\n return (\n <Host\n style={{ visibility: 'hidden', position: 'absolute' }}\n >\n {this.vnodes}\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"revogr-data.revogr-header.revogr-viewport-scroll.vnode-html.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;AAiBA,MAAM,mBAAmB,GAAG,CAAC,CAAQ;IACnC,MAAM,UAAU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EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,IAEpD,IAAI,CAAC,MAAM,CACP,EACP;KACH;;;;;;;;;","names":["MIN_COL_SIZE","HEADER_CLASS","h","HeaderCellRenderer","findIndex","getItemByIndex","HEADER_ROW_CLASS","index","DATA_ROW","GROUP_EXPAND_EVENT","PSEUDO_GROUP_ITEM","GROUP_EXPANDED","GROUP_DEPTH","GROUP_EXPAND_BTN","ROW_FOCUSED_CLASS","isRowDragService","DRAGGABLE_CLASS","DRAG_ICON_CLASS","getCellDataParsed","ColumnService","getSourceItem","isGrouping","DATA_COL","Host","getNative","defineProperty","baseEach","isArray","baseIteratee","HEADER_SORTABLE_CLASS","FOCUS_CLASS","SortingSign","FilterButton","keyBy","HEADER_ACTUAL_ROW_CLASS","throttle","LocalScrollTimer","LocalScrollService","HEADER_SLOT","CONTENT_SLOT","FOOTER_SLOT"],"sources":["src/plugins/groupingColumn/headerGroupRenderer.tsx","src/plugins/groupingColumn/columnGroupsRenderer.tsx","src/components/data/row-renderer.tsx","src/plugins/groupingRow/grouping.row.renderer.tsx","src/components/data/row-highlight.plugin.ts","src/components/vnode/vnode.utils.ts","src/components/data/cell-renderer.tsx","src/components/data/revogr-data-style.scss?tag=revogr-data","src/components/data/revogr-data.tsx","node_modules/lodash/_defineProperty.js","node_modules/lodash/_baseAssignValue.js","node_modules/lodash/_arrayAggregator.js","node_modules/lodash/_baseAggregator.js","node_modules/lodash/_createAggregator.js","node_modules/lodash/keyBy.js","src/components/header/header-renderer.tsx","src/components/header/revogr-header-style.scss?tag=revogr-header","src/components/header/revogr-header.tsx","src/utils/resize-observer.polifill.ts","src/components/revoGrid/viewport.resize.service.ts","src/components/scroll/revogr-viewport-scroll-style.scss?tag=revogr-viewport-scroll","src/components/scroll/revogr-viewport-scroll.tsx","src/components/vnode/vnode-converter.tsx"],"sourcesContent":["import { h } from '@stencil/core';\nimport { Group } from '@store';\nimport type { CellProps, Providers, DimensionCols } from '@type';\nimport { ResizeEvent, ResizeProps } from '../../components/header/resizable.directive';\nimport { HEADER_CLASS, MIN_COL_SIZE } from '../../utils/consts';\nimport { HeaderCellRenderer } from '../../components/header/header-cell-renderer';\n\ntype Props = {\n start: number;\n end: number;\n group: Group;\n providers: Providers<DimensionCols | 'rowHeaders'>;\n additionalData: any;\n canResize?: boolean;\n onResize?(e: ResizeEvent): void;\n} & Partial<Pick<ResizeProps, 'active'>>;\n\nconst GroupHeaderRenderer = (p: Props): ReturnType<typeof h> => {\n const groupProps: CellProps & Partial<ResizeProps> = {\n canResize: p.canResize,\n minWidth: p.group.ids.length * MIN_COL_SIZE,\n maxWidth: 0,\n\n active: p.active || ['r'],\n class: {\n [HEADER_CLASS]: true,\n },\n style: {\n transform: `translateX(${p.start}px)`,\n width: `${p.end - p.start}px`,\n },\n onResize: p.onResize,\n };\n return (\n <HeaderCellRenderer\n data={{\n ...p.group,\n prop: '',\n providers: p.providers,\n index: p.start,\n }}\n props={groupProps}\n additionalData={p.additionalData}\n />\n );\n};\n\nexport default GroupHeaderRenderer;\n","import { h } from '@stencil/core';\nimport findIndex from 'lodash/findIndex';\nimport { Group, getItemByIndex } from '@store';\nimport { DimensionSettingsState, Providers, DimensionCols } from '@type';\nimport { HEADER_ROW_CLASS } from '../../utils/consts';\nimport GroupHeaderRenderer from './headerGroupRenderer';\nimport { ResizeProps } from '../../components/header/resizable.directive';\n\ntype Props<T> = {\n visibleProps: { [prop: string]: number };\n groups: Record<number, Group[]>;\n dimensionCol: Pick<DimensionSettingsState, 'indexes' | 'originItemSize' | 'indexToItem'>;\n depth: number;\n canResize: boolean;\n providers: Providers<T>;\n additionalData: any;\n onResize(changedX: number, startIndex: number, endIndex: number): void;\n} & Partial<Pick<ResizeProps, 'active'>>;\n\nconst ColumnGroupsRenderer = ({\n additionalData, providers, depth, groups, visibleProps, dimensionCol, canResize, active, onResize\n}: Props<DimensionCols | 'rowHeaders'>): ReturnType<typeof h>[] => {\n // render group columns\n const groupRow: ReturnType<typeof h>[] = [];\n for (let i = 0; i < depth; i++) {\n if (groups[i]) {\n for (let group of groups[i]) {\n // if group in visible range\n // find first visible group prop in visible columns range\n const indexFirstVisibleCol: number | undefined = findIndex(group.ids, id => typeof visibleProps[id] === 'number');\n if (indexFirstVisibleCol > -1) {\n const colVisibleIndex = visibleProps[group.ids[indexFirstVisibleCol]]; // get column index\n const groupStartIndex = colVisibleIndex - indexFirstVisibleCol; // first column index in group\n const groupEndIndex = groupStartIndex + group.ids.length - 1; // last column index in group\n\n // coordinates\n const groupStart = getItemByIndex(dimensionCol, groupStartIndex).start;\n const groupEnd = getItemByIndex(dimensionCol, groupEndIndex).end;\n groupRow.push(\n <GroupHeaderRenderer\n providers={providers}\n start={groupStart}\n end={groupEnd}\n group={group}\n active={active}\n canResize={canResize}\n onResize={e => onResize(e.changedX ?? 0, groupStartIndex, groupEndIndex)}\n additionalData={additionalData}\n />,\n );\n }\n }\n }\n groupRow.push(<div class={`${HEADER_ROW_CLASS} group`} />);\n }\n return groupRow;\n};\n\nexport default ColumnGroupsRenderer;\n","import { h, type VNode } from '@stencil/core';\nimport { JSXBase } from '@stencil/core/internal';\nimport { DATA_ROW } from '../../utils/consts';\n\nexport interface RowProps extends JSXBase.HTMLAttributes {\n size: number;\n start: number;\n index: number;\n rowClass?: string;\n depth?: number;\n}\n\nexport const PADDING_DEPTH = 10;\n\nconst RowRenderer = ({ rowClass, index, size, start, depth }: RowProps, cells: VNode[]) => {\n const props = {\n ...{ [DATA_ROW]: index },\n };\n return (\n <div\n {...props}\n class={`rgRow ${rowClass || ''}`}\n style={{\n height: `${size}px`,\n transform: `translateY(${start}px)`,\n paddingLeft: depth ? `${PADDING_DEPTH * depth}px` : undefined,\n }}\n >\n {cells}\n </div>\n );\n};\n\nexport default RowRenderer;\n","import { h } from '@stencil/core';\nimport RowRenderer, { RowProps } from '../../components/data/row-renderer';\nimport { GROUP_DEPTH, GROUP_EXPANDED, GROUP_EXPAND_BTN, GROUP_EXPAND_EVENT, PSEUDO_GROUP_ITEM } from './grouping.const';\nimport { GroupLabelTemplateFunc } from './grouping.row.types';\nimport { DataType, PositionItem } from '@type';\n\ninterface GroupRowPros extends RowProps {\n model: DataType;\n hasExpand: boolean;\n groupingCustomRenderer?: GroupLabelTemplateFunc | null;\n}\ntype Props = GroupRowPros & PositionItem;\n\nfunction expandEvent(e: MouseEvent, model: DataType, virtualIndex: number) {\n const event = new CustomEvent(GROUP_EXPAND_EVENT, {\n detail: {\n model,\n virtualIndex,\n },\n cancelable: true,\n bubbles: true,\n });\n e.target?.dispatchEvent(event);\n}\n\nconst GroupingRowRenderer = (props: Props) => {\n const { model, itemIndex, hasExpand, groupingCustomRenderer } = props;\n const name: string = model[PSEUDO_GROUP_ITEM];\n const expanded = model[GROUP_EXPANDED];\n const depth = parseInt(model[GROUP_DEPTH], 10) || 0;\n if (!hasExpand) {\n return <RowRenderer {...props} rowClass=\"groupingRow\" depth={depth} />;\n }\n\n if (groupingCustomRenderer) {\n return (\n <RowRenderer {...props} rowClass=\"groupingRow\" depth={depth}>\n <div onClick={e => expandEvent(e, model, itemIndex)}>\n {groupingCustomRenderer(h, { name, itemIndex, expanded, depth })}\n </div>\n </RowRenderer>\n );\n }\n\n return (\n <RowRenderer {...props} rowClass=\"groupingRow\" depth={depth}>\n <button class={{ [GROUP_EXPAND_BTN]: true }} onClick={e => expandEvent(e, model, itemIndex)}>\n <svg aria-hidden=\"true\" style={{ transform: `rotate(${!expanded ? -90 : 0}deg)` }} focusable=\"false\" viewBox=\"0 0 448 512\">\n <path\n fill=\"currentColor\"\n d=\"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z\"\n ></path>\n </svg>\n </button>\n {name}\n </RowRenderer>\n );\n};\nexport default GroupingRowRenderer;\n","import { type VNode } from '@stencil/core';\nimport { ROW_FOCUSED_CLASS } from '../../utils/consts';\nimport { RangeArea } from '@type';\n\n/**\n * Class is responsible for highlighting rows in a table.\n */\nexport class RowHighlightPlugin {\n private currentRange: RangeArea | null = null;\n selectionChange(e: RangeArea, renderedRows: Map<number, VNode>) {\n // clear previous range\n if (this.currentRange) {\n renderedRows.forEach((row, y) => {\n // skip current range\n if (e && y >= e.y && y <= e.y1) {\n return;\n }\n\n // clear previous range\n if (\n row &&\n row.$elm$ instanceof HTMLElement &&\n row.$elm$.classList.contains(ROW_FOCUSED_CLASS)\n ) {\n row.$elm$.classList.remove(ROW_FOCUSED_CLASS);\n if (row.$attrs$?.class.includes(ROW_FOCUSED_CLASS)) {\n row.$attrs$.class = row.$attrs$.class.replace(\n ROW_FOCUSED_CLASS,\n '',\n );\n }\n }\n });\n }\n\n // apply new range\n if (e) {\n for (let y = e.y; y <= e.y1; y++) {\n const row = renderedRows.get(y);\n if (\n row &&\n row.$elm$ instanceof HTMLElement &&\n !row.$elm$.classList.contains(ROW_FOCUSED_CLASS)\n ) {\n const attrs = (row.$attrs$ = row.$attrs$ || {});\n attrs.class = (attrs.class || '') + ' ' + ROW_FOCUSED_CLASS;\n row.$elm$.classList.add(ROW_FOCUSED_CLASS);\n }\n }\n }\n this.currentRange = e;\n }\n\n isRowFocused(y: number) {\n return (\n this.currentRange && y >= this.currentRange.y && y <= this.currentRange.y1\n );\n }\n}\n","import { type VNode } from '@stencil/core';\nimport { type JSX } from '../../components';\n\n/**\n * Converts a VNode element into an HTML element and appends it to the specified parentHolder.\n */\nexport function convertVNodeToHTML(parentHolder: Element, redraw: JSX.VnodeHtml['redraw']): Promise<{ html: string; vnodes: (VNode[]) | null }> {\n return new Promise<{ html: string; vnodes: (VNode[]) | null }>(resolve => {\n const vnode = document.createElement('vnode-html');\n parentHolder.appendChild(vnode);\n vnode.redraw = redraw;\n vnode.addEventListener('html', e => {\n vnode.remove();\n resolve(e.detail);\n });\n });\n}\n","import { h, type VNode, Build, EventEmitter } from '@stencil/core';\nimport {\n DragStartEvent,\n CellTemplateProp,\n} from '@type';\n\nimport {\n DRAGGABLE_CLASS,\n DRAG_ICON_CLASS,\n getCellDataParsed,\n} from '../../utils';\n\nimport { isRowDragService } from './column.service';\n\ninterface RenderProps {\n schemaModel: CellTemplateProp;\n additionalData?: any;\n dragStartCell?: EventEmitter<DragStartEvent>;\n}\n\n\nfunction renderCell(v: RenderProps) {\n const els: (VNode | string)[] = [];\n\n // #region Custom cell\n const template = v.schemaModel.column?.cellTemplate;\n if (template) {\n els.push(template(h, v.schemaModel, v.additionalData));\n }\n // #endregion\n\n // #region Regular cell\n else {\n if (!v.schemaModel.column) {\n // something is wrong with data\n if (Build.isDev) {\n console.error('Investigate column problem.', v.schemaModel);\n }\n return '';\n }\n\n // Row drag\n if (\n v.schemaModel.column.rowDrag &&\n isRowDragService(v.schemaModel.column.rowDrag, v.schemaModel)\n ) {\n els.push(\n <span\n class={DRAGGABLE_CLASS}\n onMouseDown={originalEvent =>\n v.dragStartCell?.emit({\n originalEvent,\n model: v.schemaModel,\n })\n }\n >\n <span class={DRAG_ICON_CLASS} />\n </span>,\n );\n }\n \n els.push(`${\n getCellDataParsed(v.schemaModel.model, v.schemaModel.column)\n }`);\n }\n return els;\n}\n\nexport const CellRenderer = ({\n renderProps,\n cellProps,\n}: {\n renderProps: RenderProps;\n cellProps: any;\n}): VNode => {\n const render = renderCell.bind(null, renderProps);\n return (\n <div {...cellProps} redraw={render}>\n {render()}\n </div>\n );\n};\n","revogr-data {\n display: block;\n width: 100%;\n position: relative;\n\n .rgRow {\n position: absolute;\n width: 100%;\n left: 0;\n\n &.groupingRow {\n font-weight: 600;\n text-align: left;\n\n .group-expand {\n width: 25px;\n height: 100%;\n max-height: 25px;\n margin-right: 2px;\n background-color: transparent;\n border-color: transparent;\n\n svg {\n width: 7px;\n }\n }\n }\n }\n\n .revo-draggable {\n $w: 24px;\n\n border: none;\n height: 32px;\n display: inline-flex;\n outline: 0;\n padding: 0;\n font-size: 0.8125rem;\n box-sizing: border-box;\n align-items: center;\n white-space: nowrap;\n vertical-align: middle;\n justify-content: center;\n text-decoration: none;\n width: $w;\n height: 100%;\n cursor: pointer;\n display: inline-flex;\n\n &:hover {\n > .revo-drag-icon {\n opacity: 1;\n zoom: 1.2;\n font-weight: 600;\n }\n }\n\n > .revo-drag-icon {\n pointer-events: none;\n transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, zoom 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n }\n }\n\n .rgCell {\n top: 0;\n left: 0;\n position: absolute;\n box-sizing: border-box;\n height: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n outline: none;\n\n &.align-center {\n text-align: center;\n }\n &.align-left {\n text-align: left;\n }\n &.align-right {\n text-align: right;\n }\n }\n}\n","import {\n type VNode,\n Component,\n Host,\n Watch,\n Element,\n Event,\n Prop,\n EventEmitter,\n h,\n Method,\n State,\n} from '@stencil/core';\n\nimport ColumnService from './column.service';\nimport { DATA_COL, DATA_ROW, ROW_FOCUSED_CLASS } from '../../utils/consts';\n\nimport { DSourceState, getSourceItem } from '@store';\nimport RowRenderer, { PADDING_DEPTH } from './row-renderer';\nimport GroupingRowRenderer from '../../plugins/groupingRow/grouping.row.renderer';\nimport { isGrouping } from '../../plugins/groupingRow/grouping.service';\nimport { AllDimensionType, CellTemplateProp, DimensionCols, DimensionRows } from '@type';\nimport { RowHighlightPlugin } from './row-highlight.plugin';\nimport { convertVNodeToHTML } from '../vnode/vnode.utils';\nimport { CellRenderer } from './cell-renderer';\nimport {\n ViewportState,\n DimensionSettingsState,\n BeforeRowRenderEvent,\n Providers,\n ColumnRegular,\n DataType,\n CellProps,\n BeforeCellRenderEvent,\n DragStartEvent,\n VirtualPositionItem,\n RangeArea,\n SelectionStoreState,\n} from '@type';\nimport { Observable } from '../../utils';\n\n/**\n * This component is responsible for rendering data\n * Rows, columns, groups and cells\n */\n@Component({\n tag: 'revogr-data',\n styleUrl: 'revogr-data-style.scss',\n})\nexport class RevogrData {\n // #region Properties\n /**\n * Readonly mode\n */\n @Prop() readonly: boolean;\n /**\n * Range allowed\n */\n @Prop() range: boolean;\n\n /**\n * Defines property from which to read row class\n */\n @Prop() rowClass: string;\n /**\n * Additional data to pass to renderer\n * Used in plugins such as vue or react to pass root app entity to cells\n */\n @Prop() additionalData: any;\n /** Stores */\n /** Selection, range, focus for row selection */\n @Prop() rowSelectionStore!: Observable<SelectionStoreState>;\n /** Viewport Y */\n @Prop() viewportRow!: Observable<ViewportState>;\n /** Viewport X */\n @Prop() viewportCol!: Observable<ViewportState>;\n /** Dimension settings Y */\n @Prop() dimensionRow!: Observable<DimensionSettingsState>;\n\n /** Static stores, not expected to change during component lifetime */\n /**\n * Column source\n */\n @Prop() colData!: Observable<DSourceState<ColumnRegular, DimensionCols>>;\n /**\n * Data rows source\n */\n @Prop() dataStore!: Observable<DSourceState<DataType, DimensionRows>>;\n /**\n * Row data type\n */\n @Prop({ reflect: true }) type!: DimensionRows;\n\n /**\n * Column data type\n */\n @Prop({ reflect: true }) colType!: DimensionCols | 'rowHeaders';\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> | (() => Promise<any>))[] = [];\n // #endregion\n\n /**\n * Before each row render\n */\n @Event() beforerowrender: EventEmitter<BeforeRowRenderEvent>;\n \n /**\n * When data render finished for the designated type\n */\n @Event() afterrender: EventEmitter<{ type: DimensionRows }>;\n /**\n * Before each cell render function. Allows to override cell properties\n */\n @Event({ eventName: 'beforecellrender' })\n beforeCellRender: EventEmitter<BeforeCellRenderEvent<CellTemplateProp>>;\n\n /**\n * Before data render\n */\n @Event({ eventName: 'beforedatarender' })\n beforeDataRender: EventEmitter<AllDimensionType>;\n /**\n * Event emitted on cell drag start\n */\n @Event({ eventName: 'dragstartcell' })\n dragStartCell: EventEmitter<DragStartEvent>;\n\n /**\n * Pointed cell update.\n */\n @Method() async updateCell(e: {\n row: number; // virtual\n col: number; // virtual\n }) {\n // Stencil tweak to update cell content\n const cell = this.renderedRows.get(e.row)?.$children$?.[e.col];\n if (cell?.$attrs$?.redraw) {\n const children = await convertVNodeToHTML(\n this.element,\n cell.$attrs$.redraw,\n );\n cell.$elm$.innerHTML = children.html;\n cell.$key$ = Math.random();\n }\n }\n\n @Element() element!: Element;\n @State() providers: Providers;\n private columnService: ColumnService;\n private rowHighlightPlugin: RowHighlightPlugin;\n /**\n * Rendered rows - virtual index vs vnode\n */\n private renderedRows = new Map<number, VNode>();\n private rangeUnsubscribe: (() => void) | undefined;\n\n @Watch('dataStore') onDataStoreChange() {\n this.onStoreChange();\n }\n @Watch('colData') onColDataChange() {\n this.onStoreChange();\n }\n onStoreChange() {\n this.columnService?.destroy();\n this.columnService = new ColumnService(this.dataStore, this.colData);\n // make sure we have correct data, before render\n this.providers = {\n type: this.type,\n readonly: this.readonly,\n data: this.dataStore,\n viewport: this.viewportCol,\n dimension: this.dimensionRow,\n selection: this.rowSelectionStore,\n };\n\n this.rangeUnsubscribe?.();\n this.rangeUnsubscribe = this.rowSelectionStore.onChange(\n 'range',\n (e: RangeArea) =>\n this.rowHighlightPlugin.selectionChange(e, this.renderedRows),\n );\n }\n\n connectedCallback() {\n this.rowHighlightPlugin = new RowHighlightPlugin();\n this.onStoreChange();\n }\n\n disconnectedCallback() {\n this.columnService?.destroy();\n this.rangeUnsubscribe?.();\n }\n\n async componentWillRender() {\n this.beforeDataRender.emit({\n rowType: this.type,\n colType: this.colType as DimensionCols,\n });\n return Promise.all(this.jobsBeforeRender.map(p => typeof p === 'function' ? p() : p));\n }\n\n componentDidRender() {\n this.afterrender.emit({ type: this.type });\n }\n\n render() {\n this.renderedRows = new Map();\n const columnsData = this.columnService.columns;\n if (!columnsData.length) {\n return;\n }\n const rows = this.viewportRow.get('items');\n if (!rows.length) {\n return;\n }\n const cols = this.viewportCol.get('items');\n if (!cols.length) {\n return;\n }\n const rowsEls: VNode[] = [];\n const depth = this.dataStore.get('groupingDepth');\n const groupingCustomRenderer = this.dataStore.get('groupingCustomRenderer');\n const groupDepth = this.columnService.hasGrouping ? depth : 0;\n for (let rgRow of rows) {\n const dataItem = getSourceItem(this.dataStore, rgRow.itemIndex);\n\n // #region Grouping\n if (isGrouping(dataItem)) {\n rowsEls.push(\n <GroupingRowRenderer\n {...rgRow}\n index={rgRow.itemIndex}\n model={dataItem}\n groupingCustomRenderer={groupingCustomRenderer}\n hasExpand={this.columnService.hasGrouping}\n />,\n );\n continue;\n }\n // #endregion\n const cells: (VNode | string | void)[] = [];\n\n // #region Cells\n for (let rgCol of cols) {\n const smodel: CellTemplateProp = {\n ...this.columnService.rowDataModel(\n rgRow.itemIndex,\n rgCol.itemIndex,\n ),\n providers: this.providers,\n };\n\n // call before cell render\n const cellEvent = this.triggerBeforeCellRender(smodel, rgRow, rgCol);\n\n // if event was prevented\n if (cellEvent.defaultPrevented) {\n continue;\n }\n\n const {\n detail: { column: columnProps, row: rowProps, model: schemaModel },\n } = cellEvent;\n\n const defaultProps: CellProps = {\n [DATA_COL]: columnProps.itemIndex,\n [DATA_ROW]: rowProps.itemIndex,\n style: {\n width: `${columnProps.size}px`,\n transform: `translateX(${columnProps.start}px)`,\n height: rowProps.size ? `${rowProps.size}px` : undefined,\n },\n };\n /**\n * For grouping, can be removed in the future and replaced with event\n */\n if (groupDepth && !columnProps.itemIndex && defaultProps.style) {\n defaultProps.style.paddingLeft = `${PADDING_DEPTH * groupDepth}px`;\n }\n\n const props = this.columnService.mergeProperties(\n rowProps.itemIndex,\n columnProps.itemIndex,\n defaultProps,\n schemaModel,\n );\n\n // Never use webcomponent for cell render\n // It's very slow because of webcomponent initialization takes time\n const cellNode = <CellRenderer\n renderProps={{\n schemaModel,\n additionalData: this.additionalData,\n dragStartCell: this.dragStartCell,\n }}\n cellProps={props}\n />;\n cells.push(cellNode);\n }\n // #endregion\n\n // #region Rows\n let rowClass = this.rowClass\n ? this.columnService.getRowClass(rgRow.itemIndex, this.rowClass)\n : '';\n if (this.rowHighlightPlugin.isRowFocused(rgRow.itemIndex)) {\n rowClass += ` ${ROW_FOCUSED_CLASS}`;\n }\n const row: VNode = (\n <RowRenderer\n index={rgRow.itemIndex}\n rowClass={rowClass}\n size={rgRow.size}\n start={rgRow.start}\n >\n {cells}\n </RowRenderer>\n );\n this.beforerowrender.emit({\n node: row,\n item: rgRow,\n model: dataItem,\n colType: this.columnService.type,\n rowType: this.type,\n });\n rowsEls.push(row);\n this.renderedRows.set(rgRow.itemIndex, row);\n // #endregion\n }\n return (\n <Host>\n <slot />\n {rowsEls}\n </Host>\n );\n }\n\n triggerBeforeCellRender(\n model: CellTemplateProp,\n row: VirtualPositionItem,\n column: VirtualPositionItem,\n ) {\n const detail: BeforeCellRenderEvent<CellTemplateProp> = {\n column,\n row,\n model,\n rowType: model.type,\n colType: model.colType,\n };\n return this.beforeCellRender.emit(detail);\n }\n}\n","import getNative from './_getNative.js';\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nexport default defineProperty;\n","import defineProperty from './_defineProperty.js';\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nexport default baseAssignValue;\n","/**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n}\n\nexport default arrayAggregator;\n","import baseEach from './_baseEach.js';\n\n/**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n}\n\nexport default baseAggregator;\n","import arrayAggregator from './_arrayAggregator.js';\nimport baseAggregator from './_baseAggregator.js';\nimport baseIteratee from './_baseIteratee.js';\nimport isArray from './isArray.js';\n\n/**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\nfunction createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, baseIteratee(iteratee, 2), accumulator);\n };\n}\n\nexport default createAggregator;\n","import baseAssignValue from './_baseAssignValue.js';\nimport createAggregator from './_createAggregator.js';\n\n/**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var array = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(array, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(array, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */\nvar keyBy = createAggregator(function(result, value, key) {\n baseAssignValue(result, key, value);\n});\n\nexport default keyBy;\n","import { h } from '@stencil/core';\nimport type {\n VirtualPositionItem,\n ColumnTemplateProp,\n InitialHeaderClick,\n RangeArea\n} from '@type';\n\nimport { FilterButton } from '../../plugins/filter/filter.button';\nimport { SortingSign } from '../../plugins/sorting/sorting.sign';\nimport { ResizeEvent, ResizeProps } from './resizable.directive';\nimport {\n DATA_COL,\n FOCUS_CLASS,\n HEADER_CLASS,\n HEADER_SORTABLE_CLASS,\n MIN_COL_SIZE,\n} from '../../utils/consts';\nimport { HeaderCellRenderer } from './header-cell-renderer';\nimport { ResizableElementHTMLAttributes } from './resizable.element';\n\nexport type HeaderRenderProps = {\n column: VirtualPositionItem;\n additionalData: any;\n data: ColumnTemplateProp;\n range?: RangeArea | null;\n canResize?: boolean;\n canFilter?: boolean;\n onResize?(e: ResizeEvent): void;\n onClick?(data: InitialHeaderClick): void;\n onDblClick?(data: InitialHeaderClick): void;\n} & Partial<Pick<ResizeProps, 'active'>>;\n\nconst HeaderRenderer = (p: HeaderRenderProps): ReturnType<typeof h> => {\n const cellClass: { [key: string]: boolean } = {\n [HEADER_CLASS]: true,\n [HEADER_SORTABLE_CLASS]: !!p.data?.sortable,\n };\n if (p.data?.order) {\n cellClass[p.data.order] = true;\n }\n const dataProps: ResizableElementHTMLAttributes = {\n [DATA_COL]: p.column.itemIndex,\n canResize: p.canResize,\n minWidth: p.data?.minSize || MIN_COL_SIZE,\n maxWidth: p.data?.maxSize,\n active: p.active || ['r'],\n class: cellClass,\n style: {\n width: `${p.column.size}px`,\n transform: `translateX(${p.column.start}px)`,\n },\n onResize: p.onResize,\n onDblClick(originalEvent: MouseEvent) {\n p.onDblClick?.({\n column: p.data,\n index: p.column.itemIndex,\n originalEvent,\n providers: p.data.providers,\n });\n },\n onClick(originalEvent: MouseEvent) {\n if (originalEvent.defaultPrevented || !p.onClick) {\n return;\n }\n p.onClick({\n column: p.data,\n index: p.column.itemIndex,\n originalEvent,\n providers: p.data.providers,\n });\n },\n };\n if (p.range) {\n if (p.column.itemIndex >= p.range.x && p.column.itemIndex <= p.range.x1) {\n if (typeof dataProps.class === 'object') {\n dataProps.class[FOCUS_CLASS] = true;\n }\n }\n }\n return (\n <HeaderCellRenderer\n data={p.data}\n props={dataProps}\n additionalData={p.additionalData}\n >\n {<SortingSign column={p.data} />}\n {p.canFilter && p.data?.filter !== false ? (\n <FilterButton column={p.data} />\n ) : (\n ''\n )}\n </HeaderCellRenderer>\n );\n};\n\nexport default HeaderRenderer;\n","revogr-header {\n position: relative;\n z-index: 5;\n display: block;\n \n\n .rgHeaderCell {\n display: flex;\n\n &.align-center {\n text-align: center;\n }\n &.align-left {\n text-align: left;\n }\n &.align-right {\n text-align: right;\n }\n &.sortable {\n cursor: pointer;\n }\n\n i {\n &.asc,\n &.desc {\n &:after {\n font-size: 13px;\n }\n }\n &.asc {\n &:after {\n content: '↑';\n }\n }\n &.desc {\n &:after {\n content: '↓';\n }\n }\n }\n }\n\n .rgHeaderCell,\n .grouped-cell {\n position: absolute;\n box-sizing: border-box;\n height: 100%;\n z-index: 1;\n }\n\n .header-rgRow {\n display: block;\n position: relative;\n\n &.group {\n z-index: 0;\n }\n }\n\n .group-rgRow {\n position: relative;\n }\n\n .rgHeaderCell {\n &.active {\n z-index: 10;\n\n .resizable {\n background-color: deepskyblue;\n }\n }\n .header-content {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex-grow: 1;\n }\n .resizable {\n display: block;\n position: absolute;\n z-index: 90;\n touch-action: none;\n user-select: none;\n &:hover {\n background-color: deepskyblue;\n }\n }\n $size: 6px;\n > .resizable-r {\n cursor: ew-resize;\n width: $size;\n right: 0;\n top: 0;\n height: 100%;\n }\n > .resizable-rb {\n cursor: se-resize;\n width: $size;\n height: $size;\n right: 0;\n bottom: 0;\n }\n\n > .resizable-b {\n cursor: s-resize;\n height: $size;\n bottom: 0;\n width: 100%;\n left: 0;\n }\n\n > .resizable-lb {\n cursor: sw-resize;\n width: $size;\n height: $size;\n left: 0;\n bottom: 0;\n }\n\n > .resizable-l {\n cursor: w-resize;\n width: $size;\n left: 0;\n height: 100%;\n top: 0;\n }\n\n > .resizable-lt {\n cursor: nw-resize;\n width: $size;\n height: $size;\n left: 0;\n top: 0;\n }\n\n > .resizable-t {\n cursor: n-resize;\n height: $size;\n top: 0;\n width: 100%;\n left: 0;\n }\n\n > .resizable-rt {\n cursor: ne-resize;\n width: $size;\n height: $size;\n right: 0;\n top: 0;\n }\n }\n .rv-filter {\n visibility: hidden;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Prop,\n type VNode,\n} from '@stencil/core';\nimport keyBy from 'lodash/keyBy';\n\nimport { HEADER_ACTUAL_ROW_CLASS, HEADER_ROW_CLASS } from '../../utils/consts';\nimport { Groups } from '@store';\nimport HeaderRenderer, { HeaderRenderProps } from './header-renderer';\nimport ColumnGroupsRenderer from '../../plugins/groupingColumn/columnGroupsRenderer';\nimport { ResizeProps } from './resizable.directive';\nimport {\n ColumnRegular,\n DimensionSettingsState,\n InitialHeaderClick,\n Providers,\n ViewportState,\n ViewSettingSizeProp,\n DimensionCols,\n SelectionStoreState,\n} from '@type';\nimport { Observable } from '../../utils';\n\n@Component({\n tag: 'revogr-header',\n styleUrl: 'revogr-header-style.scss',\n})\nexport class RevogrHeaderComponent {\n // #region Properties\n /**\n * Stores\n */\n /** Viewport X */\n @Prop() viewportCol: Observable<ViewportState>;\n /** Dimension settings X */\n @Prop() dimensionCol: Observable<DimensionSettingsState>;\n /** Selection, range, focus */\n @Prop() selectionStore: Observable<SelectionStoreState>;\n\n /**\n * Column groups\n */\n @Prop() groups: Groups;\n /**\n * Grouping depth, how many levels of grouping\n */\n @Prop() groupingDepth = 0;\n\n /**\n * Readonly mode\n */\n @Prop() readonly: boolean;\n /**\n * If columns can be resized\n */\n @Prop() canResize: boolean;\n /**\n * Defines resize position\n */\n @Prop() resizeHandler: ResizeProps['active'];\n\n /**\n * Columns - defines an array of grid columns.\n */\n @Prop() colData: ColumnRegular[];\n\n /**\n * Column filter\n */\n @Prop() columnFilter: boolean;\n\n /**\n * Column type\n */\n @Prop() type!: DimensionCols | 'rowHeaders';\n\n /**\n * Extra properties to pass into header renderer, such as vue or react components to handle parent\n */\n @Prop() additionalData: any = {};\n // #endregion\n\n // #region Events\n\n /**\n * On initial header click\n */\n @Event({\n eventName: 'beforeheaderclick',\n })\n initialHeaderClick: EventEmitter<InitialHeaderClick>;\n\n /**\n * On header resize\n */\n @Event({\n eventName: 'headerresize',\n })\n headerresize: EventEmitter<ViewSettingSizeProp>;\n\n /**\n * On before header resize\n */\n @Event({ eventName: 'beforeheaderresize', cancelable: true })\n beforeResize: EventEmitter<ColumnRegular[]>;\n\n /**\n * On header double click\n */\n @Event({\n eventName: 'headerdblclick',\n })\n headerdblClick: EventEmitter<InitialHeaderClick>;\n\n /**\n * Before each header cell render function. Allows to override cell properties\n */\n @Event({ eventName: 'beforeheaderrender' })\n beforeHeaderRender: EventEmitter<HeaderRenderProps>;\n\n /**\n * After all header cells rendered. Finalizes cell rendering.\n */\n @Event({ eventName: 'afterheaderrender' })\n afterHeaderRender: EventEmitter<Providers<DimensionCols | 'rowHeaders'>>;\n\n // #endregion\n\n @Element() element!: HTMLElement;\n\n private onResize({ width }: { width?: number }, index: number) {\n const col = this.colData[index];\n const event = this.beforeResize.emit([\n {\n ...col,\n size: width || undefined,\n },\n ]);\n if (event.defaultPrevented) {\n return;\n }\n this.headerresize.emit({ [index]: width || 0 });\n }\n\n private onResizeGroup(\n changedX: number,\n startIndex: number,\n endIndex: number,\n ) {\n const sizes: ViewSettingSizeProp = {};\n const cols = keyBy(this.viewportCol.get('items'), 'itemIndex');\n const change = changedX / (endIndex - startIndex + 1);\n for (let i = startIndex; i <= endIndex; i++) {\n const item = cols[i];\n if (item) {\n sizes[i] = item.size + change;\n }\n }\n this.headerresize.emit(sizes);\n }\n\n componentDidRender() {\n this.afterHeaderRender.emit(this.providers);\n }\n\n render() {\n const cols = this.viewportCol.get('items');\n const range = this.selectionStore?.get('range');\n const cells: VNode[] = [];\n const visibleProps: { [prop: string]: number } = {};\n\n // render header columns\n for (let rgCol of cols) {\n const colData = this.colData[rgCol.itemIndex];\n const props: HeaderRenderProps = {\n range: range,\n column: rgCol,\n data: {\n ...colData,\n index: rgCol.itemIndex,\n providers: this.providers,\n },\n canFilter: !!this.columnFilter,\n canResize: this.canResize,\n active: this.resizeHandler,\n onResize: e => this.onResize(e, rgCol.itemIndex),\n onDblClick: e => this.headerdblClick.emit(e),\n onClick: e => this.initialHeaderClick.emit(e),\n additionalData: this.additionalData,\n };\n const event = this.beforeHeaderRender.emit(props);\n if (event.defaultPrevented) {\n continue;\n }\n cells.push(<HeaderRenderer {...event.detail} />);\n visibleProps[colData?.prop] = rgCol.itemIndex;\n }\n\n return [\n <div class=\"group-rgRow\">\n <ColumnGroupsRenderer\n canResize={this.canResize}\n active={this.resizeHandler}\n visibleProps={visibleProps}\n providers={this.providers}\n groups={this.groups}\n dimensionCol={this.dimensionCol.state}\n depth={this.groupingDepth}\n onResize={(changedX, startIndex, endIndex) =>\n this.onResizeGroup(changedX, startIndex, endIndex)\n }\n additionalData={this.additionalData}\n />\n </div>,\n <div class={`${HEADER_ROW_CLASS} ${HEADER_ACTUAL_ROW_CLASS}`}>\n {cells}\n </div>,\n ];\n }\n\n get providers(): Providers<DimensionCols | 'rowHeaders'> {\n return {\n type: this.type,\n readonly: this.readonly,\n data: this.colData,\n viewport: this.viewportCol,\n dimension: this.dimensionCol,\n selection: this.selectionStore,\n };\n }\n}\n","export async function resizeObserver() {\n if (!('ResizeObserver' in window)) {\n const module = await import('@juggle/resize-observer');\n (window as Window & typeof globalThis).ResizeObserver = (module.ResizeObserver as unknown) as typeof ResizeObserver;\n }\n}\n","import throttle from 'lodash/throttle';\nimport { resizeObserver } from '../../utils/resize-observer.polifill';\ninterface Events {\n resize(entries: ReadonlyArray<ResizeObserverEntry>, observer: ResizeObserver): void;\n}\nexport default class GridResizeService {\n private resizeObserver: ResizeObserver | null = null;\n private resize = throttle((e: ReadonlyArray<ResizeObserverEntry>, o: ResizeObserver) => this.events?.resize(e, o), 10);\n constructor(el: HTMLElement, private events: Events) {\n this.init(el);\n }\n\n async init(el: HTMLElement): Promise<void> {\n await resizeObserver();\n this.resizeObserver = new ResizeObserver(this.resize);\n this.resizeObserver?.observe(el);\n }\n\n public destroy() {\n this.resizeObserver?.disconnect();\n this.resizeObserver = null;\n }\n}\n","@mixin noScroll {\n /* Hide scrollbar for IE and Edge */\n -ms-overflow-style: none;\n scrollbar-width: none; /* Firefox */\n /* Hide scrollbar for Chrome, Safari and Opera */\n &::-webkit-scrollbar {\n display: none;\n -webkit-appearance: none;\n }\n}\n\n.rowHeaders {\n z-index: 2;\n font-size: 10px;\n display: flex;\n height: 100%;\n\n revogr-data .rgCell {\n text-align: center;\n }\n\n .rgCell {\n padding: 0 1em !important;\n min-width: 100%;\n }\n}\n\nrevogr-viewport-scroll {\n @include noScroll;\n\n overflow-x: auto;\n overflow-y: hidden;\n position: relative;\n z-index: 1;\n height: 100%;\n\n &.colPinStart,\n &.colPinEnd {\n z-index: 2;\n }\n\n // make sure it would work\n &.colPinEnd:has(.active) {\n overflow: visible;\n }\n\n &.rgCol {\n flex-grow: 1;\n }\n\n .content-wrapper {\n overflow: hidden;\n }\n\n .inner-content-table {\n display: flex;\n flex-direction: column;\n max-height: 100%;\n width: 100%;\n min-width: 100%;\n position: relative;\n z-index: 0;\n }\n\n .vertical-inner {\n overflow-y: auto;\n position: relative;\n width: 100%;\n flex-grow: 1;\n outline: none; // avoid accessibility focus issue\n @include noScroll;\n\n revogr-data,\n revogr-overlay-selection {\n height: 100%;\n }\n }\n}\n","import {\n Component,\n Event,\n EventEmitter,\n h,\n Method,\n Element,\n Prop,\n Host,\n Listen,\n} from '@stencil/core';\n\nimport GridResizeService from '../revoGrid/viewport.resize.service';\nimport LocalScrollService from '../../services/local.scroll.service';\nimport { LocalScrollTimer } from '../../services/local.scroll.timer';\nimport {\n CONTENT_SLOT,\n FOOTER_SLOT,\n HEADER_SLOT,\n} from '../revoGrid/viewport.helpers';\nimport type {\n DimensionCols,\n DimensionType,\n ElementScroll,\n ScrollCoordinateEvent,\n ViewPortResizeEvent,\n ViewPortScrollEvent\n} from '@type';\n\ntype Delta = 'deltaX' | 'deltaY';\ntype LocalScrollEvent = {\n preventDefault(): void;\n} & { [x in Delta]: number };\n\n/**\n * Viewport scroll component for RevoGrid\n * @slot - content\n * @slot header - header\n * @slot footer - footer\n */\n@Component({\n tag: 'revogr-viewport-scroll',\n styleUrl: 'revogr-viewport-scroll-style.scss',\n})\nexport class RevogrViewportScroll implements ElementScroll {\n /**\n * Enable row header\n */\n @Prop() readonly rowHeader: boolean;\n\n /**\n * Width of inner content\n */\n @Prop() contentWidth = 0;\n /**\n * Height of inner content\n */\n @Prop() contentHeight = 0;\n\n @Prop() colType!: DimensionCols | 'rowHeaders';\n\n /**\n * Before scroll event\n */\n @Event({ eventName: 'scrollviewport', bubbles: true }) scrollViewport: EventEmitter<ViewPortScrollEvent>;\n /**\n * Viewport resize\n */\n @Event({ eventName: 'resizeviewport' }) resizeViewport: EventEmitter<ViewPortResizeEvent>;\n\n /**\n * Triggered on scroll change, can be used to get information about scroll visibility\n */\n @Event() scrollchange: EventEmitter<{\n type: DimensionType;\n hasScroll: boolean;\n }>;\n\n /**\n * Silently scroll to coordinate\n * Made to align negative coordinates for mobile devices\n */\n @Event({ eventName: 'scrollviewportsilent' }) silentScroll: EventEmitter<ViewPortScrollEvent>;\n\n @Element() horizontalScroll: HTMLElement;\n\n private oldValY = this.contentHeight;\n private oldValX = this.contentWidth;\n\n private verticalScroll?: HTMLElement;\n private header?: HTMLElement;\n private footer?: HTMLElement;\n\n /**\n * Static functions to bind wheel change\n */\n private horizontalMouseWheel: (e: Partial<LocalScrollEvent>) => void;\n private verticalMouseWheel: (e: Partial<LocalScrollEvent>) => void;\n\n private resizeService?: GridResizeService;\n private localScrollService: LocalScrollService;\n private localScrollTimer: LocalScrollTimer;\n\n\n @Method() async setScroll(e: ViewPortScrollEvent) {\n this.localScrollTimer.latestScrollUpdate(e.dimension);\n this.localScrollService?.setScroll(e);\n }\n\n /**\n * update on delta in case we don't know existing position or external change\n * @param e\n */\n @Method() async changeScroll(\n e: ViewPortScrollEvent,\n silent = false,\n ) {\n if (silent) {\n if (e.coordinate && this.verticalScroll) {\n switch (e.dimension) {\n // for mobile devices to skip negative scroll loop. only on vertical scroll\n case 'rgRow':\n this.verticalScroll.style.transform = `translateY(${-1 * e.coordinate}px)`;\n break;\n }\n }\n return;\n }\n if (e.delta) {\n switch (e.dimension) {\n case 'rgCol':\n e.coordinate = this.horizontalScroll.scrollLeft + e.delta;\n break;\n case 'rgRow':\n e.coordinate = (this.verticalScroll?.scrollTop ?? 0) + e.delta;\n break;\n }\n this.setScroll(e);\n }\n return e;\n }\n\n /**\n * Dispatch this event to trigger vertical mouse wheel from plugins\n */\n @Listen('mousewheel-vertical') mousewheelVertical({\n detail: e,\n }: CustomEvent<LocalScrollEvent>) {\n this.verticalMouseWheel(e);\n }\n /**\n * Dispatch this event to trigger horizontal mouse wheel from plugins\n */\n @Listen('mousewheel-horizontal') mousewheelHorizontal({\n detail: e,\n }: CustomEvent<LocalScrollEvent>) {\n this.horizontalMouseWheel(e);\n }\n /**\n * Allows to use outside listener\n */\n @Listen('scroll-coordinate') scrollApply({\n detail: { type, coordinate },\n }: CustomEvent<ScrollCoordinateEvent>) {\n this.applyOnScroll(type, coordinate, true);\n }\n\n connectedCallback() {\n /**\n * Bind scroll functions for farther usage\n */\n // allow mousewheel for all devices including mobile\n this.verticalMouseWheel = this.onVerticalMouseWheel.bind(\n this,\n 'rgRow',\n 'deltaY',\n );\n this.horizontalMouseWheel = this.onHorizontalMouseWheel.bind(\n this,\n 'rgCol',\n 'deltaX',\n );\n this.localScrollTimer = new LocalScrollTimer('ontouchstart' in document.documentElement ? 0 : 10);\n /**\n * Create local scroll service\n */\n this.localScrollService = new LocalScrollService({\n // to improve safari smoothnes on scroll\n // skipAnimationFrame: isSafariDesktop(),\n runScroll: e => this.scrollViewport.emit(e),\n applyScroll: e => {\n this.localScrollTimer.setCoordinate(e);\n switch (e.dimension) {\n case 'rgCol':\n // this will trigger on scroll event\n this.horizontalScroll.scrollLeft = e.coordinate;\n break;\n case 'rgRow':\n if (this.verticalScroll) {\n // this will trigger on scroll event\n this.verticalScroll.scrollTop = e.coordinate;\n // for mobile devices to skip negative scroll loop. only on vertical scroll\n if (this.verticalScroll.style.transform) {\n this.verticalScroll.style.transform = '';\n }\n }\n break;\n }\n },\n });\n }\n\n componentDidLoad() {\n // track horizontal viewport resize\n this.resizeService = new GridResizeService(this.horizontalScroll, {\n resize: entries => {\n let height = entries[0]?.contentRect.height || 0;\n if (height) {\n height -= (this.header?.clientHeight ?? 0) + (this.footer?.clientHeight ?? 0);\n }\n const els = {\n rgRow: {\n size: height,\n contentSize: this.contentHeight,\n scroll: this.verticalScroll?.scrollTop,\n noScroll: false,\n },\n rgCol: {\n size: entries[0]?.contentRect.width || 0,\n contentSize: this.contentWidth,\n scroll: this.horizontalScroll.scrollLeft,\n noScroll: this.colType !== 'rgCol',\n },\n };\n for (const [dim, item] of Object.entries(els)) {\n const dimension = dim as DimensionType;\n this.resizeViewport.emit({ dimension, size: item.size, rowHeader: this.rowHeader });\n if (item.noScroll) {\n continue;\n }\n this.localScrollService?.scroll(item.scroll ?? 0, dimension, true);\n // track scroll visibility on outer element change\n this.setScrollVisibility(dimension, item.size, item.contentSize);\n }\n },\n });\n }\n\n /**\n * Check if scroll present or not per type\n * Trigger this method on inner content size change or on outer element size change\n * If inner content bigger then outer size then scroll is present and mousewheel binding required\n * @param type - dimension type 'rgRow/y' or 'rgCol/x'\n * @param size - outer content size\n * @param innerContentSize - inner content size\n */\n setScrollVisibility(\n type: DimensionType,\n size: number,\n innerContentSize: number,\n ) {\n // test if scroll present\n const hasScroll = size < innerContentSize;\n let el: HTMLElement | undefined;\n // event reference for binding\n switch (type) {\n case 'rgCol':\n el = this.horizontalScroll;\n break;\n case 'rgRow':\n el = this.verticalScroll;\n break;\n }\n // based on scroll visibility assign or remove class and event\n if (hasScroll) {\n el?.classList.add(`scroll-${type}`);\n } else {\n el?.classList.remove(`scroll-${type}`);\n }\n this.scrollchange.emit({ type, hasScroll });\n }\n\n disconnectedCallback() {\n this.resizeService?.destroy();\n }\n\n async componentDidRender() {\n // scroll update if number of rows changed\n if (this.contentHeight < this.oldValY && this.verticalScroll) {\n this.verticalScroll.scrollTop += this.contentHeight - this.oldValY;\n }\n this.oldValY = this.contentHeight;\n\n // scroll update if number of cols changed\n if (this.contentWidth < this.oldValX) {\n this.horizontalScroll.scrollLeft += this.contentWidth - this.oldValX;\n }\n this.oldValX = this.contentWidth;\n\n this.localScrollService.setParams(\n {\n contentSize: this.contentHeight,\n clientSize: this.verticalScroll?.clientHeight ?? 0,\n virtualSize: 0,\n },\n 'rgRow',\n );\n\n this.localScrollService.setParams(\n {\n contentSize: this.contentWidth,\n clientSize: this.horizontalScroll.clientWidth,\n virtualSize: 0,\n },\n 'rgCol',\n );\n this.setScrollVisibility(\n 'rgRow',\n this.verticalScroll?.clientHeight ?? 0,\n this.contentHeight,\n );\n this.setScrollVisibility(\n 'rgCol',\n this.horizontalScroll.clientWidth,\n this.contentWidth,\n );\n }\n\n render() {\n return (\n <Host\n onWheel={this.horizontalMouseWheel}\n onScroll={(e: UIEvent) => this.applyScroll('rgCol', e)}\n >\n <div\n class=\"inner-content-table\"\n style={{ width: `${this.contentWidth}px` }}\n >\n <div class=\"header-wrapper\" ref={e => (this.header = e)}>\n <slot name={HEADER_SLOT} />\n </div>\n <div\n class=\"vertical-inner\"\n ref={el => (this.verticalScroll = el)}\n onWheel={this.verticalMouseWheel}\n onScroll={(e: MouseEvent) => this.applyScroll('rgRow', e)}\n >\n <div\n class=\"content-wrapper\"\n style={{ height: `${this.contentHeight}px` }}\n >\n <slot name={CONTENT_SLOT} />\n </div>\n </div>\n <div class=\"footer-wrapper\" ref={e => (this.footer = e)}>\n <slot name={FOOTER_SLOT} />\n </div>\n </div>\n </Host>\n );\n }\n /**\n * Extra layer for scroll event monitoring, where MouseWheel event is not passing\n * We need to trigger scroll event in case there is no mousewheel event\n */\n @Method() async applyScroll(type: DimensionType, e: UIEvent) {\n if (!(e.target instanceof HTMLElement)) {\n return;\n }\n let scroll = 0;\n switch (type) {\n case 'rgCol':\n scroll = e.target.scrollLeft;\n break;\n case 'rgRow':\n scroll = e.target.scrollTop;\n break;\n }\n\n // for mobile devices to skip negative scroll loop\n if (scroll < 0) {\n this.silentScroll.emit({ dimension: type, coordinate: scroll });\n return;\n }\n this.applyOnScroll(type, scroll);\n }\n\n /**\n * Applies change on scroll event only if mousewheel event happened some time ago\n */\n private applyOnScroll(\n type: DimensionType,\n coordinate: number,\n outside = false,\n ) {\n // apply after throttling\n if (this.localScrollTimer.isReady(type, coordinate)) {\n this.localScrollService?.scroll(\n coordinate,\n type,\n undefined,\n undefined,\n outside,\n );\n }\n }\n\n /**\n * On vertical mousewheel event\n * @param type\n * @param delta\n * @param e\n */\n private onVerticalMouseWheel(\n type: DimensionType,\n delta: Delta,\n e: LocalScrollEvent,\n ) {\n const scrollTop = this.verticalScroll?.scrollTop ?? 0;\n const clientHeight = this.verticalScroll?.clientHeight ?? 0;\n const scrollHeight = this.verticalScroll?.scrollHeight ?? 0;\n\n // Detect if the user has reached the bottom\n const atBottom = (scrollTop + clientHeight >= scrollHeight) && e.deltaY > 0;\n const atTop = scrollTop === 0 && e.deltaY < 0;\n if (!atBottom && !atTop) {\n e.preventDefault?.();\n }\n const pos = scrollTop + e[delta];\n this.localScrollService?.scroll(pos, type, undefined, e[delta]);\n this.localScrollTimer.latestScrollUpdate(type);\n }\n\n /**\n * On horizontal mousewheel event\n * @param type\n * @param delta\n * @param e\n */\n private onHorizontalMouseWheel(\n type: DimensionType,\n delta: Delta,\n e: LocalScrollEvent,\n ) {\n if (!e.deltaX) {\n return;\n }\n const { scrollLeft, scrollWidth, clientWidth } = this.horizontalScroll;\n\n // Detect if the user has reached the right end\n const atRight = (scrollLeft + clientWidth >= scrollWidth) && e.deltaX > 0;\n\n // Detect if the user has reached the left end\n const atLeft = scrollLeft === 0 && e.deltaX < 0;\n if (!atRight && !atLeft) {\n e.preventDefault?.();\n }\n const pos = scrollLeft + e[delta];\n this.localScrollService?.scroll(pos, type, undefined, e[delta]);\n this.localScrollTimer.latestScrollUpdate(type);\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Prop,\n type VNode,\n h,\n} from '@stencil/core';\n\n/**\n * VNode to html converter for stencil components.\n * Transform VNode to html string.\n */\n/**\n * @internal\n */\n@Component({\n tag: 'vnode-html',\n})\nexport class VNodeToHtml {\n @Prop() redraw: (() => VNode[]) | null | undefined = null;\n @Event() html: EventEmitter<{ html: string; vnodes: (VNode[]) | null }>;\n @Element() el: HTMLElement;\n\n private vnodes: VNode[] | null = [];\n\n componentDidRender() {\n this.html.emit({\n html: this.el.innerHTML,\n vnodes: this.vnodes,\n });\n }\n\n render() {\n this.vnodes = this.redraw?.() ?? null;\n return (\n <Host\n style={{ visibility: 'hidden', position: 'absolute' }}\n >\n {this.vnodes}\n </Host>\n );\n }\n}\n"],"version":3}