@revolist/revogrid 4.9.1 → 4.9.3

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 (262) hide show
  1. package/dist/cjs/{base.plugin-d48d867d.js → base.plugin-bf5f43a0.js} +2 -2
  2. package/dist/cjs/{base.plugin-d48d867d.js.map → base.plugin-bf5f43a0.js.map} +1 -1
  3. package/dist/cjs/{column.service-6f691f50.js → column.service-01f4a6c7.js} +25 -6
  4. package/dist/cjs/column.service-01f4a6c7.js.map +1 -0
  5. package/dist/cjs/{dimension.helpers-e9d22516.js → dimension.helpers-a6788214.js} +10 -5
  6. package/dist/cjs/dimension.helpers-a6788214.js.map +1 -0
  7. package/dist/cjs/{header-cell-renderer-81a22b00.js → header-cell-renderer-3bc70679.js} +10 -8
  8. package/dist/cjs/header-cell-renderer-3bc70679.js.map +1 -0
  9. package/dist/cjs/index.cjs.js +4 -4
  10. package/dist/cjs/revo-grid.cjs.entry.js +81 -93
  11. package/dist/cjs/revo-grid.cjs.entry.js.map +1 -1
  12. package/dist/cjs/revogr-attribution_6.cjs.entry.js +71 -46
  13. package/dist/cjs/revogr-attribution_6.cjs.entry.js.map +1 -1
  14. package/dist/cjs/revogr-clipboard_3.cjs.entry.js +12 -7
  15. package/dist/cjs/revogr-clipboard_3.cjs.entry.js.map +1 -1
  16. package/dist/cjs/revogr-data_4.cjs.entry.js +45 -36
  17. package/dist/cjs/revogr-data_4.cjs.entry.js.map +1 -1
  18. package/dist/cjs/revogr-filter-panel.cjs.entry.js.map +1 -1
  19. package/dist/cjs/{selection.helpers-8fa19c04.js → selection.helpers-1a8c8d49.js} +32 -31
  20. package/dist/cjs/selection.helpers-1a8c8d49.js.map +1 -0
  21. package/dist/cjs/{throttle-bcc4740d.js → throttle-52be9e67.js} +4 -3
  22. package/dist/cjs/throttle-52be9e67.js.map +1 -0
  23. package/dist/cjs/{viewport.store-9cf01c71.js → viewport.store-35a3e7ee.js} +13 -9
  24. package/dist/cjs/viewport.store-35a3e7ee.js.map +1 -0
  25. package/dist/collection/components/clipboard/revogr-clipboard.js +68 -89
  26. package/dist/collection/components/clipboard/revogr-clipboard.js.map +1 -1
  27. package/dist/collection/components/data/cell-renderer.js +7 -4
  28. package/dist/collection/components/data/cell-renderer.js.map +1 -1
  29. package/dist/collection/components/data/column.service.js +1 -1
  30. package/dist/collection/components/data/column.service.js.map +1 -1
  31. package/dist/collection/components/data/revogr-data.js +1 -1
  32. package/dist/collection/components/data/revogr-data.js.map +1 -1
  33. package/dist/collection/components/editors/revogr-edit.js +6 -6
  34. package/dist/collection/components/editors/revogr-edit.js.map +1 -1
  35. package/dist/collection/components/editors/text-editor.js +3 -1
  36. package/dist/collection/components/editors/text-editor.js.map +1 -1
  37. package/dist/collection/components/header/header-renderer.js +2 -1
  38. package/dist/collection/components/header/header-renderer.js.map +1 -1
  39. package/dist/collection/components/header/resizable.directive.js +7 -5
  40. package/dist/collection/components/header/resizable.directive.js.map +1 -1
  41. package/dist/collection/components/header/resizable.element.js +1 -1
  42. package/dist/collection/components/header/resizable.element.js.map +1 -1
  43. package/dist/collection/components/overlay/autofill.service.js +11 -12
  44. package/dist/collection/components/overlay/autofill.service.js.map +1 -1
  45. package/dist/collection/components/overlay/keyboard.service.js.map +1 -1
  46. package/dist/collection/components/overlay/revogr-overlay-selection.js +74 -39
  47. package/dist/collection/components/overlay/revogr-overlay-selection.js.map +1 -1
  48. package/dist/collection/components/overlay/selection.utils.js +13 -5
  49. package/dist/collection/components/overlay/selection.utils.js.map +1 -1
  50. package/dist/collection/components/revoGrid/grid.helpers.js +10 -8
  51. package/dist/collection/components/revoGrid/grid.helpers.js.map +1 -1
  52. package/dist/collection/components/revoGrid/revo-grid.js +42 -42
  53. package/dist/collection/components/revoGrid/revo-grid.js.map +1 -1
  54. package/dist/collection/components/revoGrid/viewport.helpers.js +19 -0
  55. package/dist/collection/components/revoGrid/viewport.helpers.js.map +1 -1
  56. package/dist/collection/components/revoGrid/viewport.scrolling.service.js +4 -3
  57. package/dist/collection/components/revoGrid/viewport.scrolling.service.js.map +1 -1
  58. package/dist/collection/components/revoGrid/viewport.service.js +27 -37
  59. package/dist/collection/components/revoGrid/viewport.service.js.map +1 -1
  60. package/dist/collection/components/rowHeaders/revogr-row-headers.js +2 -2
  61. package/dist/collection/components/rowHeaders/revogr-row-headers.js.map +1 -1
  62. package/dist/collection/components/scroll/revogr-viewport-scroll.js +34 -29
  63. package/dist/collection/components/scroll/revogr-viewport-scroll.js.map +1 -1
  64. package/dist/collection/components/scrollable/autohide-scroll.plugin.js +1 -1
  65. package/dist/collection/components/scrollable/autohide-scroll.plugin.js.map +1 -1
  66. package/dist/collection/components/scrollable/revogr-scroll-virtual.js +3 -3
  67. package/dist/collection/components/selectionFocus/revogr-focus.js +1 -1
  68. package/dist/collection/components/selectionFocus/revogr-focus.js.map +1 -1
  69. package/dist/collection/components/selectionTempRange/revogr-temp-range.js.map +1 -1
  70. package/dist/collection/components/vnode/vnode-converter.js +6 -6
  71. package/dist/collection/components/vnode/vnode-converter.js.map +1 -1
  72. package/dist/collection/components/vnode/vnode.utils.js.map +1 -1
  73. package/dist/collection/global/global.js.map +1 -1
  74. package/dist/collection/plugins/export/export.plugin.js +2 -2
  75. package/dist/collection/plugins/export/export.plugin.js.map +1 -1
  76. package/dist/collection/plugins/filter/filter.panel.js +4 -4
  77. package/dist/collection/plugins/groupingColumn/columnGroupsRenderer.js +1 -1
  78. package/dist/collection/plugins/groupingColumn/columnGroupsRenderer.js.map +1 -1
  79. package/dist/collection/plugins/groupingRow/grouping.row.plugin.js +2 -2
  80. package/dist/collection/plugins/groupingRow/grouping.row.plugin.js.map +1 -1
  81. package/dist/collection/plugins/groupingRow/grouping.service.js +1 -1
  82. package/dist/collection/plugins/groupingRow/grouping.service.js.map +1 -1
  83. package/dist/collection/plugins/moveColumn/column.drag.plugin.js +1 -1
  84. package/dist/collection/plugins/moveColumn/column.drag.plugin.js.map +1 -1
  85. package/dist/collection/plugins/sorting/sorting.plugin.js +9 -12
  86. package/dist/collection/plugins/sorting/sorting.plugin.js.map +1 -1
  87. package/dist/collection/services/cell.helpers.js +3 -2
  88. package/dist/collection/services/cell.helpers.js.map +1 -1
  89. package/dist/collection/services/column.data.provider.js.map +1 -1
  90. package/dist/collection/services/data.provider.js.map +1 -1
  91. package/dist/collection/services/dimension.provider.js +2 -1
  92. package/dist/collection/services/dimension.provider.js.map +1 -1
  93. package/dist/collection/services/local.scroll.service.js +3 -2
  94. package/dist/collection/services/local.scroll.service.js.map +1 -1
  95. package/dist/collection/services/selection.store.connector.js +20 -16
  96. package/dist/collection/services/selection.store.connector.js.map +1 -1
  97. package/dist/collection/store/selection/selection.helpers.js +8 -12
  98. package/dist/collection/store/selection/selection.helpers.js.map +1 -1
  99. package/dist/collection/store/selection/selection.store.js +2 -1
  100. package/dist/collection/store/selection/selection.store.js.map +1 -1
  101. package/dist/collection/store/vp/viewport.helpers.js +10 -6
  102. package/dist/collection/store/vp/viewport.helpers.js.map +1 -1
  103. package/dist/collection/store/vp/viewport.store.js +1 -1
  104. package/dist/collection/store/vp/viewport.store.js.map +1 -1
  105. package/dist/collection/themeManager/theme.service.js +1 -1
  106. package/dist/collection/themeManager/theme.service.js.map +1 -1
  107. package/dist/collection/types/interfaces.js.map +1 -1
  108. package/dist/collection/types/selection.js.map +1 -1
  109. package/dist/collection/types/viewport.interfaces.js.map +1 -1
  110. package/dist/collection/utils/closest.polifill.js.map +1 -1
  111. package/dist/collection/utils/store.utils.js +9 -4
  112. package/dist/collection/utils/store.utils.js.map +1 -1
  113. package/dist/esm/{base.plugin-78393655.js → base.plugin-5e7a3c51.js} +2 -2
  114. package/dist/esm/{base.plugin-78393655.js.map → base.plugin-5e7a3c51.js.map} +1 -1
  115. package/dist/esm/{column.service-0e41057a.js → column.service-5d14e7e9.js} +25 -6
  116. package/dist/esm/column.service-5d14e7e9.js.map +1 -0
  117. package/dist/esm/{dimension.helpers-91398565.js → dimension.helpers-56298828.js} +10 -5
  118. package/dist/esm/dimension.helpers-56298828.js.map +1 -0
  119. package/dist/esm/{header-cell-renderer-6d8ac25d.js → header-cell-renderer-fc999784.js} +10 -8
  120. package/dist/esm/header-cell-renderer-fc999784.js.map +1 -0
  121. package/dist/esm/index.js +4 -4
  122. package/dist/esm/revo-grid.entry.js +81 -93
  123. package/dist/esm/revo-grid.entry.js.map +1 -1
  124. package/dist/esm/revogr-attribution_6.entry.js +71 -46
  125. package/dist/esm/revogr-attribution_6.entry.js.map +1 -1
  126. package/dist/esm/revogr-clipboard_3.entry.js +12 -7
  127. package/dist/esm/revogr-clipboard_3.entry.js.map +1 -1
  128. package/dist/esm/revogr-data_4.entry.js +45 -36
  129. package/dist/esm/revogr-data_4.entry.js.map +1 -1
  130. package/dist/esm/revogr-filter-panel.entry.js.map +1 -1
  131. package/dist/esm/{selection.helpers-50e9f09d.js → selection.helpers-accaad4a.js} +32 -31
  132. package/dist/esm/selection.helpers-accaad4a.js.map +1 -0
  133. package/dist/esm/{throttle-1b1dd9d2.js → throttle-7283692c.js} +4 -3
  134. package/dist/esm/throttle-7283692c.js.map +1 -0
  135. package/dist/esm/{viewport.store-bfd0b036.js → viewport.store-d8e03528.js} +13 -9
  136. package/dist/esm/viewport.store-d8e03528.js.map +1 -0
  137. package/dist/revo-grid/{base.plugin-78393655.js → base.plugin-5e7a3c51.js} +2 -2
  138. package/dist/revo-grid/column.service-5d14e7e9.js +5 -0
  139. package/dist/revo-grid/column.service-5d14e7e9.js.map +1 -0
  140. package/dist/revo-grid/{dimension.helpers-91398565.js → dimension.helpers-56298828.js} +2 -2
  141. package/dist/revo-grid/{dimension.helpers-91398565.js.map → dimension.helpers-56298828.js.map} +1 -1
  142. package/dist/revo-grid/header-cell-renderer-fc999784.js +5 -0
  143. package/dist/revo-grid/header-cell-renderer-fc999784.js.map +1 -0
  144. package/dist/revo-grid/index.esm.js +1 -1
  145. package/dist/revo-grid/revo-grid.entry.js +1 -1
  146. package/dist/revo-grid/revo-grid.entry.js.map +1 -1
  147. package/dist/revo-grid/revogr-attribution_6.entry.js +1 -1
  148. package/dist/revo-grid/revogr-attribution_6.entry.js.map +1 -1
  149. package/dist/revo-grid/revogr-clipboard_3.entry.js +1 -1
  150. package/dist/revo-grid/revogr-clipboard_3.entry.js.map +1 -1
  151. package/dist/revo-grid/revogr-data_4.entry.js +1 -1
  152. package/dist/revo-grid/revogr-data_4.entry.js.map +1 -1
  153. package/dist/revo-grid/revogr-filter-panel.entry.js.map +1 -1
  154. package/dist/revo-grid/selection.helpers-accaad4a.js +5 -0
  155. package/dist/revo-grid/selection.helpers-accaad4a.js.map +1 -0
  156. package/dist/revo-grid/{throttle-1b1dd9d2.js → throttle-7283692c.js} +2 -2
  157. package/dist/revo-grid/throttle-7283692c.js.map +1 -0
  158. package/dist/revo-grid/viewport.store-d8e03528.js +5 -0
  159. package/dist/revo-grid/viewport.store-d8e03528.js.map +1 -0
  160. package/dist/types/components/clipboard/revogr-clipboard.d.ts +32 -24
  161. package/dist/types/components/data/column.service.d.ts +1 -1
  162. package/dist/types/components/data/row-highlight.plugin.d.ts +1 -1
  163. package/dist/types/components/editors/revogr-edit.d.ts +1 -1
  164. package/dist/types/components/editors/text-editor.d.ts +3 -3
  165. package/dist/types/components/header/header-renderer.d.ts +2 -2
  166. package/dist/types/components/header/resizable.directive.d.ts +2 -2
  167. package/dist/types/components/overlay/autofill.service.d.ts +9 -7
  168. package/dist/types/components/overlay/keyboard.service.d.ts +4 -4
  169. package/dist/types/components/overlay/revogr-overlay-selection.d.ts +20 -11
  170. package/dist/types/components/overlay/selection.utils.d.ts +7 -4
  171. package/dist/types/components/revoGrid/revo-grid.d.ts +7 -6
  172. package/dist/types/components/revoGrid/viewport.helpers.d.ts +18 -3
  173. package/dist/types/components/revoGrid/viewport.scrolling.service.d.ts +1 -1
  174. package/dist/types/components/revoGrid/viewport.service.d.ts +2 -6
  175. package/dist/types/components/scroll/revogr-viewport-scroll.d.ts +6 -6
  176. package/dist/types/components/selectionTempRange/revogr-temp-range.d.ts +1 -1
  177. package/dist/types/components/vnode/vnode-converter.d.ts +1 -1
  178. package/dist/types/components/vnode/vnode.utils.d.ts +1 -1
  179. package/dist/types/components.d.ts +80 -54
  180. package/dist/types/plugins/column.auto-size.plugin.d.ts +2 -2
  181. package/dist/types/plugins/export/export.plugin.d.ts +3 -3
  182. package/dist/types/plugins/filter/filter.button.d.ts +1 -1
  183. package/dist/types/plugins/filter/filter.panel.d.ts +1 -1
  184. package/dist/types/plugins/groupingRow/grouping.row.plugin.d.ts +1 -1
  185. package/dist/types/plugins/groupingRow/grouping.service.d.ts +3 -3
  186. package/dist/types/plugins/sorting/sorting.plugin.d.ts +8 -8
  187. package/dist/types/services/column.data.provider.d.ts +1 -1
  188. package/dist/types/services/data.provider.d.ts +1 -1
  189. package/dist/types/services/dimension.provider.d.ts +3 -2
  190. package/dist/types/services/selection.store.connector.d.ts +9 -9
  191. package/dist/types/store/selection/selection.helpers.d.ts +1 -1
  192. package/dist/types/store/selection/selection.store.d.ts +4 -4
  193. package/dist/types/store/vp/viewport.helpers.d.ts +2 -2
  194. package/dist/types/themeManager/theme.service.d.ts +1 -1
  195. package/dist/types/types/interfaces.d.ts +18 -1
  196. package/dist/types/types/viewport.interfaces.d.ts +2 -2
  197. package/dist/types/utils/store.utils.d.ts +7 -4
  198. package/hydrate/index.js +274 -215
  199. package/hydrate/index.mjs +274 -215
  200. package/package.json +1 -1
  201. package/standalone/column.service.js +33 -33
  202. package/standalone/column.service.js.map +1 -1
  203. package/standalone/data.store.js +2959 -7
  204. package/standalone/data.store.js.map +1 -1
  205. package/standalone/debounce.js +1 -1
  206. package/standalone/dimension.helpers.js +2 -2
  207. package/standalone/index.js.map +1 -1
  208. package/standalone/local.scroll.timer.js +3 -2
  209. package/standalone/local.scroll.timer.js.map +1 -1
  210. package/standalone/revo-grid.js +77 -90
  211. package/standalone/revo-grid.js.map +1 -1
  212. package/standalone/revogr-clipboard2.js +6 -3
  213. package/standalone/revogr-clipboard2.js.map +1 -1
  214. package/standalone/revogr-data2.js +7 -5
  215. package/standalone/revogr-data2.js.map +1 -1
  216. package/standalone/revogr-edit2.js +5 -3
  217. package/standalone/revogr-edit2.js.map +1 -1
  218. package/standalone/revogr-filter-panel.js.map +1 -1
  219. package/standalone/revogr-focus2.js +0 -1
  220. package/standalone/revogr-focus2.js.map +1 -1
  221. package/standalone/revogr-header2.js +12 -10
  222. package/standalone/revogr-header2.js.map +1 -1
  223. package/standalone/revogr-order-editor2.js +0 -1
  224. package/standalone/revogr-order-editor2.js.map +1 -1
  225. package/standalone/revogr-overlay-selection2.js +54 -38
  226. package/standalone/revogr-overlay-selection2.js.map +1 -1
  227. package/standalone/revogr-row-headers2.js +12 -9
  228. package/standalone/revogr-row-headers2.js.map +1 -1
  229. package/standalone/revogr-scroll-virtual2.js +1 -1
  230. package/standalone/revogr-scroll-virtual2.js.map +1 -1
  231. package/standalone/revogr-temp-range2.js.map +1 -1
  232. package/standalone/revogr-viewport-scroll2.js +47 -23
  233. package/standalone/revogr-viewport-scroll2.js.map +1 -1
  234. package/standalone/selection.utils.js +14 -6
  235. package/standalone/selection.utils.js.map +1 -1
  236. package/standalone/toNumber.js +1 -1
  237. package/standalone/vnode-converter.js +3 -3
  238. package/standalone/vnode-converter.js.map +1 -1
  239. package/dist/cjs/column.service-6f691f50.js.map +0 -1
  240. package/dist/cjs/dimension.helpers-e9d22516.js.map +0 -1
  241. package/dist/cjs/header-cell-renderer-81a22b00.js.map +0 -1
  242. package/dist/cjs/selection.helpers-8fa19c04.js.map +0 -1
  243. package/dist/cjs/throttle-bcc4740d.js.map +0 -1
  244. package/dist/cjs/viewport.store-9cf01c71.js.map +0 -1
  245. package/dist/esm/column.service-0e41057a.js.map +0 -1
  246. package/dist/esm/dimension.helpers-91398565.js.map +0 -1
  247. package/dist/esm/header-cell-renderer-6d8ac25d.js.map +0 -1
  248. package/dist/esm/selection.helpers-50e9f09d.js.map +0 -1
  249. package/dist/esm/throttle-1b1dd9d2.js.map +0 -1
  250. package/dist/esm/viewport.store-bfd0b036.js.map +0 -1
  251. package/dist/revo-grid/column.service-0e41057a.js +0 -5
  252. package/dist/revo-grid/column.service-0e41057a.js.map +0 -1
  253. package/dist/revo-grid/header-cell-renderer-6d8ac25d.js +0 -5
  254. package/dist/revo-grid/header-cell-renderer-6d8ac25d.js.map +0 -1
  255. package/dist/revo-grid/selection.helpers-50e9f09d.js +0 -5
  256. package/dist/revo-grid/selection.helpers-50e9f09d.js.map +0 -1
  257. package/dist/revo-grid/throttle-1b1dd9d2.js.map +0 -1
  258. package/dist/revo-grid/viewport.store-bfd0b036.js +0 -5
  259. package/dist/revo-grid/viewport.store-bfd0b036.js.map +0 -1
  260. package/standalone/_baseIteratee.js +0 -2956
  261. package/standalone/_baseIteratee.js.map +0 -1
  262. /package/dist/revo-grid/{base.plugin-78393655.js.map → base.plugin-5e7a3c51.js.map} +0 -0
package/hydrate/index.mjs CHANGED
@@ -2307,8 +2307,10 @@ class Clipboard {
2307
2307
  }
2308
2308
  const clipboardData = this.getData(e);
2309
2309
  const isHTML = ((clipboardData === null || clipboardData === void 0 ? void 0 : clipboardData.types.indexOf('text/html')) || -1) > -1;
2310
- const data = isHTML ? clipboardData === null || clipboardData === void 0 ? void 0 : clipboardData.getData('text/html') : clipboardData === null || clipboardData === void 0 ? void 0 : clipboardData.getData('text');
2311
- const dataText = clipboardData === null || clipboardData === void 0 ? void 0 : clipboardData.getData('text');
2310
+ const data = (isHTML
2311
+ ? clipboardData === null || clipboardData === void 0 ? void 0 : clipboardData.getData('text/html')
2312
+ : clipboardData === null || clipboardData === void 0 ? void 0 : clipboardData.getData('text')) || '';
2313
+ const dataText = (clipboardData === null || clipboardData === void 0 ? void 0 : clipboardData.getData('text')) || '';
2312
2314
  const beforePaste = this.beforePaste.emit({
2313
2315
  raw: data,
2314
2316
  dataText,
@@ -2417,7 +2419,8 @@ class Clipboard {
2417
2419
  return result;
2418
2420
  }
2419
2421
  getData(e) {
2420
- return e.clipboardData || (window === null || window === void 0 ? void 0 : window.clipboardData);
2422
+ return (e.clipboardData ||
2423
+ (window === null || window === void 0 ? void 0 : window.clipboardData));
2421
2424
  }
2422
2425
  static get cmpMeta() { return {
2423
2426
  "$flags$": 0,
@@ -6825,11 +6828,16 @@ function gatherTrimmedItems(trimmedItems) {
6825
6828
  return trimmed;
6826
6829
  }
6827
6830
 
6828
- /** Set stores data */
6831
+ /**
6832
+ * Sets the given data on the specified store.
6833
+ *
6834
+ * @param store - The store to set data on.
6835
+ * @param data - The data to set on the store.
6836
+ */
6829
6837
  function setStore(store, data) {
6830
- for (let key in data) {
6831
- store.set(key, data[key]);
6832
- }
6838
+ Object.entries(data).forEach(([key, value]) => {
6839
+ store.set(key, value);
6840
+ });
6833
6841
  }
6834
6842
 
6835
6843
  /**
@@ -7643,7 +7651,8 @@ class SelectionStore {
7643
7651
  setStore(this.store, { range, edit: null, tempRange: null });
7644
7652
  }
7645
7653
  setRange(start, end) {
7646
- this.setRangeArea(getRange(start, end));
7654
+ const range = getRange(start, end);
7655
+ this.setRangeArea(range);
7647
7656
  }
7648
7657
  setLastCell(lastCell) {
7649
7658
  setStore(this.store, { lastCell });
@@ -7742,7 +7751,7 @@ class SelectionStoreConnector {
7742
7751
  return this.columnStores[x];
7743
7752
  }
7744
7753
  this.columnStores[x] = new SelectionStore();
7745
- // build cross linking type to position
7754
+ // build cross-linking type to position
7746
7755
  this.storesByType[type] = x;
7747
7756
  this.storesXToType[x] = type;
7748
7757
  return this.columnStores[x];
@@ -7793,13 +7802,13 @@ class SelectionStoreConnector {
7793
7802
  (_b = this.rowStores[y]) === null || _b === void 0 ? void 0 : _b.dispose();
7794
7803
  delete this.rowStores[y];
7795
7804
  delete this.columnStores[x];
7796
- // clear x cross link
7805
+ // clear x cross-link
7797
7806
  if (this.storesXToType[x]) {
7798
7807
  const type = this.storesXToType[x];
7799
7808
  delete this.storesXToType[x];
7800
7809
  delete this.storesByType[type];
7801
7810
  }
7802
- // clear y cross link
7811
+ // clear y cross-link
7803
7812
  if (this.storesYToType[y]) {
7804
7813
  const type = this.storesYToType[y];
7805
7814
  delete this.storesYToType[y];
@@ -7829,9 +7838,10 @@ class SelectionStoreConnector {
7829
7838
  return;
7830
7839
  }
7831
7840
  // Get the next store based on the current focus and the last cell.
7832
- const next = this.getNextStore(focus, this.focusedStore.position, this.focusedStore.entity.store.get('lastCell'));
7841
+ const lastCell = this.focusedStore.entity.store.get('lastCell');
7842
+ const next = lastCell && this.getNextStore(focus, this.focusedStore.position, lastCell);
7833
7843
  // Set the next focus cell in the store.
7834
- (_a = next.store) === null || _a === void 0 ? void 0 : _a.setNextFocus(Object.assign(Object.assign({}, focus), next.item));
7844
+ (_a = next === null || next === void 0 ? void 0 : next.store) === null || _a === void 0 ? void 0 : _a.setNextFocus(Object.assign(Object.assign({}, focus), next.item));
7835
7845
  }
7836
7846
  focusByCell(storePos, start, end) {
7837
7847
  const store = this.stores[storePos.y][storePos.x];
@@ -7844,15 +7854,17 @@ class SelectionStoreConnector {
7844
7854
  }
7845
7855
  // check for the focus in nearby store/viewport
7846
7856
  const lastCell = store.store.get('lastCell');
7847
- const next = this.getNextStore(focus, currentStorePointer, lastCell);
7857
+ const next = lastCell && this.getNextStore(focus, currentStorePointer, lastCell);
7848
7858
  // if next store present - update
7849
7859
  if (next === null || next === void 0 ? void 0 : next.store) {
7850
7860
  const item = Object.assign(Object.assign({}, focus), next.item);
7851
7861
  this.focus(next.store, { focus: item, end: item });
7852
7862
  return null;
7853
7863
  }
7854
- focus = cropCellToMax(focus, lastCell);
7855
- end = cropCellToMax(end, lastCell);
7864
+ if (lastCell) {
7865
+ focus = cropCellToMax(focus, lastCell);
7866
+ end = cropCellToMax(end, lastCell);
7867
+ }
7856
7868
  store.setFocus(focus, end);
7857
7869
  return focus;
7858
7870
  }
@@ -7889,10 +7901,9 @@ class SelectionStoreConnector {
7889
7901
  getNextStore(focus, currentStorePointer, lastCell) {
7890
7902
  // item in new store
7891
7903
  const nextItem = nextCell(focus, lastCell);
7892
- let nextStore = null;
7904
+ let nextStore;
7893
7905
  if (nextItem) {
7894
- for (let i in nextItem) {
7895
- let type = i;
7906
+ Object.entries(nextItem).forEach(([type, nextItemCoord]) => {
7896
7907
  let stores;
7897
7908
  switch (type) {
7898
7909
  case 'x':
@@ -7902,20 +7913,20 @@ class SelectionStoreConnector {
7902
7913
  case 'y':
7903
7914
  // Get the Y stores for the current X coordinate of the current store pointer
7904
7915
  stores = this.getYStores(currentStorePointer.x);
7905
- stores = this.getYStores(currentStorePointer.x);
7906
7916
  break;
7907
7917
  }
7908
- if (nextItem[type] >= 0) {
7918
+ // Get the next store based on the item in the new store
7919
+ if (nextItemCoord >= 0) {
7909
7920
  nextStore = stores[++currentStorePointer[type]];
7910
7921
  }
7911
7922
  else {
7912
7923
  nextStore = stores[--currentStorePointer[type]];
7913
7924
  const nextLastCell = nextStore === null || nextStore === void 0 ? void 0 : nextStore.store.get('lastCell');
7914
7925
  if (nextLastCell) {
7915
- nextItem[type] = nextLastCell[type] + nextItem[type];
7926
+ nextItem[type] = nextLastCell[type] + nextItemCoord;
7916
7927
  }
7917
7928
  }
7918
- }
7929
+ });
7919
7930
  }
7920
7931
  return {
7921
7932
  store: nextStore,
@@ -7947,7 +7958,9 @@ class SelectionStoreConnector {
7947
7958
  continue;
7948
7959
  }
7949
7960
  const lastCell = store.store.get('lastCell');
7950
- store.setRange({ x: 0, y: 0 }, { x: lastCell.x - 1, y: lastCell.y - 1 });
7961
+ if (lastCell) {
7962
+ store.setRange({ x: 0, y: 0 }, { x: lastCell.x - 1, y: lastCell.y - 1 });
7963
+ }
7951
7964
  }
7952
7965
  }
7953
7966
  }
@@ -7986,21 +7999,17 @@ function nextCell(cell, lastCell) {
7986
7999
  return null;
7987
8000
  }
7988
8001
  function cropCellToMax(cell, lastCell) {
7989
- const newCell = Object.assign({}, cell);
7990
- let types = ['x', 'y'];
7991
- // previous item check
7992
- for (let t of types) {
7993
- if (cell[t] < 0) {
7994
- newCell[t] = 0;
8002
+ const croppedCell = Object.assign({}, cell);
8003
+ const cellCoordinates = ['x', 'y'];
8004
+ for (const coordinate of cellCoordinates) {
8005
+ if (cell[coordinate] < 0) {
8006
+ croppedCell[coordinate] = 0;
7995
8007
  }
7996
- }
7997
- // next item check
7998
- for (let t of types) {
7999
- if (cell[t] >= lastCell[t]) {
8000
- newCell[t] = lastCell[t] - 1;
8008
+ else if (cell[coordinate] >= lastCell[coordinate]) {
8009
+ croppedCell[coordinate] = lastCell[coordinate] - 1;
8001
8010
  }
8002
8011
  }
8003
- return newCell;
8012
+ return croppedCell;
8004
8013
  }
8005
8014
  function getRange(start, end) {
8006
8015
  return start && end
@@ -8116,6 +8125,7 @@ function getItems(opt, currentSize = 0) {
8116
8125
  return items;
8117
8126
  }
8118
8127
  function recombineByOffset(offset, data) {
8128
+ var _a, _b;
8119
8129
  const newItems = [...data.items];
8120
8130
  const itemsCount = newItems.length;
8121
8131
  let newRange = {
@@ -8124,7 +8134,7 @@ function recombineByOffset(offset, data) {
8124
8134
  };
8125
8135
  // if offset out of revo-viewport, makes sense whole redraw
8126
8136
  if (offset > itemsCount) {
8127
- return null;
8137
+ return undefined;
8128
8138
  }
8129
8139
  // is direction of scroll positive
8130
8140
  if (data.positiveDirection) {
@@ -8163,19 +8173,21 @@ function recombineByOffset(offset, data) {
8163
8173
  let firstItem = getFirstItem(data);
8164
8174
  const end = newRange.end;
8165
8175
  for (let i = 0; i < offset; i++) {
8166
- const newIndex = firstItem.itemIndex - 1;
8176
+ const newIndex = ((_a = firstItem === null || firstItem === void 0 ? void 0 : firstItem.itemIndex) !== null && _a !== void 0 ? _a : 0) - 1;
8167
8177
  const size = getItemSize(newIndex, data.sizes, data.originItemSize);
8168
8178
  // new item index to recombine
8169
8179
  let newStart = end - i;
8170
8180
  newStart = (newStart < 0 ? itemsCount + newStart : newStart) % itemsCount;
8171
8181
  // item should always present, we do not create new item, we recombine them
8172
8182
  if (!newItems[newStart]) {
8173
- throw new Error('incorrect index');
8183
+ console.error('incorrect index');
8184
+ break;
8174
8185
  }
8175
8186
  // do recombination
8187
+ const firstItemStart = (_b = firstItem === null || firstItem === void 0 ? void 0 : firstItem.start) !== null && _b !== void 0 ? _b : 0;
8176
8188
  newItems[newStart] = firstItem = {
8177
- start: firstItem.start - size,
8178
- end: firstItem.start,
8189
+ start: firstItemStart - size,
8190
+ end: firstItemStart,
8179
8191
  itemIndex: newIndex,
8180
8192
  size: size,
8181
8193
  };
@@ -8211,11 +8223,12 @@ function isActiveRange(pos, realSize, first, last) {
8211
8223
  (pos > first.end && last.end === realSize));
8212
8224
  }
8213
8225
  function isActiveRangeOutsideLastItem(pos, virtualSize, firstItem, lastItem) {
8226
+ var _a;
8214
8227
  // if no first item, means no items in viewport
8215
8228
  if (!firstItem) {
8216
8229
  return false;
8217
8230
  }
8218
- return virtualSize + pos > (lastItem === null || lastItem === void 0 ? void 0 : lastItem.end);
8231
+ return virtualSize + pos > ((_a = lastItem === null || lastItem === void 0 ? void 0 : lastItem.end) !== null && _a !== void 0 ? _a : 0);
8219
8232
  }
8220
8233
  function getFirstItem(s) {
8221
8234
  return s.items[s.start];
@@ -8358,7 +8371,7 @@ class ViewportStore {
8358
8371
  }
8359
8372
  else if (isActiveRangeOutsideLastItem(pos, virtualSize, firstItem, lastItem)) {
8360
8373
  const items = [...allItems.items];
8361
- // check is any item missing for full fill content
8374
+ // check is any item missing for fulfill content
8362
8375
  const missing = addMissingItems(firstItem, this.store.get('realCount'), virtualSize + pos - firstItem.start, allItems, {
8363
8376
  sizes: dimension.sizes,
8364
8377
  originItemSize: dimension.originItemSize,
@@ -8737,7 +8750,7 @@ function measureEqualDepth(groupA, groupB) {
8737
8750
  }
8738
8751
  function getParsedGroup(id) {
8739
8752
  const parseGroup = JSON.parse(id);
8740
- // extra precaution and type safe guard
8753
+ // extra precaution and type safeguard
8741
8754
  if (!Array.isArray(parseGroup)) {
8742
8755
  return null;
8743
8756
  }
@@ -8853,7 +8866,7 @@ class ColumnService {
8853
8866
  const data = this.rowDataModel(r, c);
8854
8867
  return readOnly(data);
8855
8868
  }
8856
- return readOnly;
8869
+ return !!readOnly;
8857
8870
  }
8858
8871
  mergeProperties(r, c, defaultProps, model, extraPropsFunc) {
8859
8872
  const cellClass = {
@@ -9236,6 +9249,14 @@ function getPropertyFromEvent(e, prop, focusClass // for touch events
9236
9249
  return e[prop] || 0;
9237
9250
  }
9238
9251
 
9252
+ function collectModelsOfRange(data, store) {
9253
+ const models = {};
9254
+ for (let i in data) {
9255
+ const rowIndex = parseInt(i, 10);
9256
+ models[rowIndex] = getSourceItem(store, rowIndex);
9257
+ }
9258
+ return models;
9259
+ }
9239
9260
  function getFocusCellBasedOnEvent(e, data) {
9240
9261
  // If event default is prevented, return
9241
9262
  if (e.defaultPrevented) {
@@ -9286,18 +9307,18 @@ function getCurrentCell({ x, y }, { el, rows, cols }) {
9286
9307
  return { x: rgCol.itemIndex, y: rgRow.itemIndex };
9287
9308
  }
9288
9309
  function getCoordinate(range, focus, changes, isMulti = false) {
9289
- const updateCoordinate = (c) => {
9310
+ const updateCoordinate = (c, pos = 0) => {
9290
9311
  const start = { x: range.x, y: range.y };
9291
9312
  const end = isMulti ? { x: range.x1, y: range.y1 } : start;
9292
9313
  const point = end[c] > focus[c] ? end : start;
9293
- point[c] += changes[c];
9314
+ point[c] += pos;
9294
9315
  return { start, end };
9295
9316
  };
9296
9317
  if (changes.x) {
9297
- return updateCoordinate('x');
9318
+ return updateCoordinate('x', changes['x']);
9298
9319
  }
9299
9320
  if (changes.y) {
9300
- return updateCoordinate('y');
9321
+ return updateCoordinate('y', changes['y']);
9301
9322
  }
9302
9323
  return null;
9303
9324
  }
@@ -9701,8 +9722,9 @@ class AutoFillService {
9701
9722
  this.sv.setTempRange(null);
9702
9723
  }
9703
9724
  else {
9725
+ const area = getRange(this.autoFillInitial, this.autoFillLast);
9704
9726
  this.sv.setTempRange({
9705
- area: getRange(this.autoFillInitial, this.autoFillLast),
9727
+ area,
9706
9728
  type: this.autoFillType,
9707
9729
  });
9708
9730
  }
@@ -9737,7 +9759,7 @@ class AutoFillService {
9737
9759
  range,
9738
9760
  });
9739
9761
  // If data apply was not prevented, apply new range
9740
- if (!stopApply) {
9762
+ if (!stopApply && oldRange) {
9741
9763
  this.applyRangeWithData(newRange, oldRange);
9742
9764
  }
9743
9765
  else {
@@ -9763,28 +9785,26 @@ class AutoFillService {
9763
9785
  this.autoFillLast = null;
9764
9786
  this.autoFillStart = null;
9765
9787
  }
9766
- /** Trigger range apply events and handle responses */
9788
+ /**
9789
+ * Trigger range apply events and handle responses
9790
+ */
9767
9791
  onRangeApply(data, range) {
9768
- const models = {};
9769
- for (let rowIndex in data) {
9770
- models[rowIndex] = getSourceItem(this.sv.dataStore, parseInt(rowIndex, 10));
9771
- }
9772
9792
  this.sv.rangeDataApply({
9773
9793
  data,
9774
- models,
9794
+ models: collectModelsOfRange(data, this.sv.dataStore),
9775
9795
  type: this.sv.dataStore.get('type'),
9776
9796
  });
9777
9797
  this.sv.setRange(range);
9778
9798
  }
9779
9799
  /** Apply range and copy data during range application */
9780
- applyRangeWithData(newRange, oldRange) {
9800
+ applyRangeWithData(newRange, rangeToCopy) {
9781
9801
  const rangeData = {
9782
9802
  type: this.sv.dataStore.get('type'),
9783
9803
  colType: this.sv.columnService.type,
9784
9804
  newData: {},
9785
9805
  mapping: {},
9786
9806
  newRange,
9787
- oldRange,
9807
+ oldRange: rangeToCopy,
9788
9808
  };
9789
9809
  const { mapping, changed } = this.sv.columnService.getRangeData(rangeData, this.sv.columnService.columns);
9790
9810
  rangeData.newData = changed;
@@ -9851,7 +9871,6 @@ class OverlaySelection {
9851
9871
  this.beforeCellSave = createEvent(this, "beforecellsave", 7);
9852
9872
  this.keyboardService = null;
9853
9873
  this.autoFillService = null;
9854
- this.revogrEdit = null;
9855
9874
  this.unsubscribeSelectionStore = [];
9856
9875
  this.readonly = undefined;
9857
9876
  this.range = undefined;
@@ -9871,19 +9890,21 @@ class OverlaySelection {
9871
9890
  // #endregion
9872
9891
  // #region Listeners
9873
9892
  onMouseMove(e) {
9893
+ var _a;
9874
9894
  if (this.selectionStore.get('focus')) {
9875
- this.autoFillService.selectionMouseMove(e);
9895
+ (_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.selectionMouseMove(e);
9876
9896
  }
9877
9897
  }
9878
9898
  /**
9879
- * Action finished inside of the document.
9899
+ * Action finished inside the document.
9880
9900
  * Pointer left document, clear any active operation.
9881
9901
  */
9882
9902
  onMouseUp() {
9883
- // Clear auto fill selection
9903
+ var _a;
9904
+ // Clear autofill selection
9884
9905
  // when pointer left document,
9885
9906
  // clear any active operation.
9886
- this.autoFillService.clearAutoFillSelection(this.selectionStore.get('focus'), this.selectionStore.get('range'));
9907
+ (_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.clearAutoFillSelection(this.selectionStore.get('focus'), this.selectionStore.get('range'));
9887
9908
  }
9888
9909
  /**
9889
9910
  * Row drag started.
@@ -9927,10 +9948,10 @@ class OverlaySelection {
9927
9948
  // clear subscriptions
9928
9949
  this.unsubscribeSelectionStore.forEach(v => v());
9929
9950
  this.unsubscribeSelectionStore.length = 0;
9930
- this.unsubscribeSelectionStore.push(s.onChange('nextFocus', (v) => this.doFocus(v, v)));
9951
+ this.unsubscribeSelectionStore.push(s.onChange('nextFocus', (v) => v && this.doFocus(v, v)));
9931
9952
  this.keyboardService = new KeyboardService({
9932
9953
  selectionStore: s,
9933
- range: r => this.triggerRangeEvent(r),
9954
+ range: r => !!r && this.triggerRangeEvent(r),
9934
9955
  focus: (f, changes, focusNextViewport) => {
9935
9956
  if (focusNextViewport) {
9936
9957
  this.beforeNextViewportFocus.emit(f);
@@ -9947,7 +9968,8 @@ class OverlaySelection {
9947
9968
  this.doEdit(val);
9948
9969
  },
9949
9970
  cancel: async () => {
9950
- await this.revogrEdit.cancelChanges();
9971
+ var _a;
9972
+ await ((_a = this.revogrEdit) === null || _a === void 0 ? void 0 : _a.cancelChanges());
9951
9973
  this.closeEdit();
9952
9974
  },
9953
9975
  clearCell: () => !this.readonly && this.clearCell(),
@@ -9969,7 +9991,7 @@ class OverlaySelection {
9969
9991
  selectionChanged: e => this.selectionChange.emit(e),
9970
9992
  rangeCopy: e => this.beforeRangeCopyApply.emit(e),
9971
9993
  rangeDataApply: e => this.rangeEditApply.emit(e),
9972
- setRange: e => this.triggerRangeEvent(e),
9994
+ setRange: e => !!e && this.triggerRangeEvent(e),
9973
9995
  getData: () => this.getData(),
9974
9996
  });
9975
9997
  }
@@ -10031,6 +10053,7 @@ class OverlaySelection {
10031
10053
  } }));
10032
10054
  }
10033
10055
  render() {
10056
+ var _a;
10034
10057
  const nodes = [];
10035
10058
  const editCell = this.renderEditor();
10036
10059
  // Editor
@@ -10050,14 +10073,14 @@ class OverlaySelection {
10050
10073
  }
10051
10074
  // Autofill
10052
10075
  if (focus && !this.readonly && this.range) {
10053
- nodes.push(this.autoFillService.renderAutofill(range, focus));
10076
+ nodes.push((_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.renderAutofill(range, focus));
10054
10077
  }
10055
10078
  // Order
10056
10079
  if (this.canDrag) {
10057
10080
  nodes.push(hAsync("revogr-order-editor", { ref: e => (this.orderEditor = e), dataStore: this.dataStore, dimensionRow: this.dimensionRow, dimensionCol: this.dimensionCol, parent: this.element, onRowdragstartinit: e => this.rowDragStart(e) }));
10058
10081
  }
10059
10082
  }
10060
- return (hAsync(Host, { key: '81dee4cfcce410cefb2bd9ff2661261472fc3a75', class: { mobile: this.isMobileDevice }, onDblClick: (e) => this.onElementDblClick(e), onMouseDown: (e) => this.onElementMouseDown(e), onTouchStart: (e) => this.onElementMouseDown(e, true) }, nodes, hAsync("slot", { key: '6ac75c388ae3fbc5539a27c3acd58178dd53d1af', name: "data" })));
10083
+ return (hAsync(Host, { key: '0767a5d015d0c8fe99444ef26b136a3a11792724', class: { mobile: this.isMobileDevice }, onDblClick: (e) => this.onElementDblClick(e), onMouseDown: (e) => this.onElementMouseDown(e), onTouchStart: (e) => this.onElementMouseDown(e, true) }, nodes, hAsync("slot", { key: '8551244579316e0d4ab61defa1c1c9bc1011f446', name: "data" })));
10061
10084
  }
10062
10085
  /**
10063
10086
  * Executes the focus operation on the specified range of cells.
@@ -10112,6 +10135,7 @@ class OverlaySelection {
10112
10135
  * Handle mouse down event on Host element
10113
10136
  */
10114
10137
  onElementMouseDown(e, touch = false) {
10138
+ var _a;
10115
10139
  // Get the target element from the event object
10116
10140
  const targetElement = e.target;
10117
10141
  // Ignore focus if clicked input
@@ -10128,7 +10152,7 @@ class OverlaySelection {
10128
10152
  this.focus(focusCell, this.range && e.shiftKey);
10129
10153
  // Initiate autofill selection
10130
10154
  if (this.range) {
10131
- this.autoFillService.selectionStart(targetElement, this.getData());
10155
+ targetElement && ((_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.selectionStart(targetElement, this.getData()));
10132
10156
  // Prevent default behavior for mouse events,
10133
10157
  // but only if target element is not a mobile input
10134
10158
  if (!touch) {
@@ -10148,18 +10172,21 @@ class OverlaySelection {
10148
10172
  var _a;
10149
10173
  if (this.canEdit()) {
10150
10174
  const focus = this.selectionStore.get('focus');
10175
+ if (!focus) {
10176
+ return;
10177
+ }
10151
10178
  const data = this.columnService.getSaveData(focus.y, focus.x);
10152
10179
  (_a = this.setEdit) === null || _a === void 0 ? void 0 : _a.emit(Object.assign(Object.assign({}, data), { val }));
10153
10180
  }
10154
10181
  }
10155
10182
  /**
10156
10183
  * Close editor event triggered
10157
- * @param details - if requires focus next
10184
+ * @param details - if it requires focus next
10158
10185
  */
10159
- closeEdit(e) {
10186
+ async closeEdit(e) {
10160
10187
  this.cancelEdit.emit();
10161
10188
  if (e === null || e === void 0 ? void 0 : e.detail) {
10162
- this.focusNext();
10189
+ await this.focusNext();
10163
10190
  }
10164
10191
  }
10165
10192
  /**
@@ -10179,6 +10206,7 @@ class OverlaySelection {
10179
10206
  return range;
10180
10207
  }
10181
10208
  onCopy(e) {
10209
+ var _a;
10182
10210
  const range = this.getRegion();
10183
10211
  const canCopyEvent = this.beforeCopyRegion.emit(range);
10184
10212
  if (canCopyEvent.defaultPrevented) {
@@ -10194,38 +10222,45 @@ class OverlaySelection {
10194
10222
  rangeData = event.detail.data;
10195
10223
  }
10196
10224
  }
10197
- this.clipboard.doCopy(e, rangeData);
10225
+ (_a = this.clipboard) === null || _a === void 0 ? void 0 : _a.doCopy(e, rangeData);
10198
10226
  return true;
10199
10227
  }
10200
10228
  onPaste(data) {
10229
+ var _a;
10201
10230
  const focus = this.selectionStore.get('focus');
10202
10231
  const isEditing = this.selectionStore.get('edit') !== null;
10203
10232
  if (!focus || isEditing) {
10204
10233
  return;
10205
10234
  }
10206
10235
  let { changed, range } = this.columnService.getTransformedDataToApply(focus, data);
10207
- const { defaultPrevented: canPaste } = this.rangeClipboardPaste.emit(Object.assign({ data: changed, range }, this.types));
10236
+ const { defaultPrevented: canPaste } = this.rangeClipboardPaste.emit(Object.assign({ data: changed, models: collectModelsOfRange(changed, this.dataStore), range }, this.types));
10208
10237
  if (canPaste) {
10209
10238
  return;
10210
10239
  }
10211
- this.autoFillService.onRangeApply(changed, range);
10240
+ (_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.onRangeApply(changed, range);
10212
10241
  }
10213
10242
  async focusNext() {
10214
- const canFocus = await this.keyboardService.keyChangeSelection(new KeyboardEvent('keydown', {
10243
+ var _a;
10244
+ const canFocus = await ((_a = this.keyboardService) === null || _a === void 0 ? void 0 : _a.keyChangeSelection(new KeyboardEvent('keydown', {
10215
10245
  code: codesLetter.ARROW_DOWN,
10216
- }), this.range);
10246
+ }), this.range));
10217
10247
  if (!canFocus) {
10218
10248
  this.closeEdit();
10219
10249
  }
10220
10250
  }
10221
10251
  clearCell() {
10222
- if (this.selectionStore.get('range') &&
10223
- !isRangeSingleCell(this.selectionStore.get('range'))) {
10224
- const data = this.columnService.getRangeStaticData(this.selectionStore.get('range'), '');
10225
- this.autoFillService.onRangeApply(data, this.selectionStore.get('range'));
10252
+ var _a;
10253
+ const range = this.selectionStore.get('range');
10254
+ if (range &&
10255
+ !isRangeSingleCell(range)) {
10256
+ const data = this.columnService.getRangeStaticData(range, '');
10257
+ (_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.onRangeApply(data, range);
10226
10258
  }
10227
10259
  else if (this.canEdit()) {
10228
10260
  const focused = this.selectionStore.get('focus');
10261
+ if (!focused) {
10262
+ return;
10263
+ }
10229
10264
  const cell = this.columnService.getSaveData(focused.y, focused.x);
10230
10265
  this.cellEdit({
10231
10266
  rgRow: focused.y,
@@ -10262,7 +10297,10 @@ class OverlaySelection {
10262
10297
  const end = cell;
10263
10298
  const start = this.selectionStore.get('focus');
10264
10299
  if (isRangeEdit && start) {
10265
- return this.triggerRangeEvent(getRange(start, end));
10300
+ const range = getRange(start, end);
10301
+ if (range) {
10302
+ return this.triggerRangeEvent(range);
10303
+ }
10266
10304
  }
10267
10305
  return this.doFocus(cell, end);
10268
10306
  }
@@ -10323,6 +10361,7 @@ class TextEditor {
10323
10361
  constructor(column, saveCallback) {
10324
10362
  this.column = column;
10325
10363
  this.saveCallback = saveCallback;
10364
+ this.editInput = null;
10326
10365
  this.element = null;
10327
10366
  this.editCell = undefined;
10328
10367
  }
@@ -10353,7 +10392,8 @@ class TextEditor {
10353
10392
  * IMPORTANT: Prevent scroll glitches when editor is closed and focus is on current input element.
10354
10393
  */
10355
10394
  beforeDisconnect() {
10356
- this.editInput.blur();
10395
+ var _a;
10396
+ (_a = this.editInput) === null || _a === void 0 ? void 0 : _a.blur();
10357
10397
  }
10358
10398
  /**
10359
10399
  * Get value from input
@@ -10456,8 +10496,8 @@ class RevoEdit {
10456
10496
  }
10457
10497
  }
10458
10498
  componentWillRender() {
10459
- // Active editor present
10460
- if (this.currentEditor) {
10499
+ // Active editor present and not yet closed.
10500
+ if (this.currentEditor || !this.column) {
10461
10501
  return;
10462
10502
  }
10463
10503
  this.preventSaveOnClose = false;
@@ -11138,8 +11178,9 @@ class DimensionProvider {
11138
11178
  }
11139
11179
  /**
11140
11180
  * Sets dimension data and view port coordinate
11141
- * @param items - data/column items
11181
+ * @param itemCount
11142
11182
  * @param type - dimension type
11183
+ * @param noVirtual - disable virtual data
11143
11184
  */
11144
11185
  setData(itemCount, type, noVirtual = false) {
11145
11186
  this.setItemCount(itemCount, type);
@@ -11293,7 +11334,7 @@ class ThemeService {
11293
11334
  }
11294
11335
  }
11295
11336
  static getTheme(theme) {
11296
- if (allowedThemes.indexOf(theme) > -1) {
11337
+ if (theme && allowedThemes.indexOf(theme) > -1) {
11297
11338
  return theme;
11298
11339
  }
11299
11340
  return DEFAULT_THEME;
@@ -12149,10 +12190,6 @@ class SortingPlugin extends BasePlugin {
12149
12190
  constructor(revogrid, providers) {
12150
12191
  super(revogrid, providers);
12151
12192
  this.revogrid = revogrid;
12152
- // sorting order per column
12153
- this.sorting = null;
12154
- // sorting function per column, multiple columns sorting supported
12155
- this.sortingFunc = null;
12156
12193
  this.sortingPromise = null;
12157
12194
  this.postponeSort = debounce_1(async (order, comparison) => this.runSorting(order, comparison), 50);
12158
12195
  const beforeanysource = async ({ detail: { type }, }) => {
@@ -12166,7 +12203,7 @@ class SortingPlugin extends BasePlugin {
12166
12203
  }
12167
12204
  };
12168
12205
  const aftercolumnsset = async ({ detail: { order }, }) => {
12169
- const columns = await this.revogrid.getColumns();
12206
+ const columns = (await this.revogrid.getColumns());
12170
12207
  const sortingFunc = {};
12171
12208
  for (let prop in order) {
12172
12209
  const cmp = this.getComparer(ColumnDataProvider.getColumnByProp(columns, prop), order[prop]);
@@ -12212,6 +12249,7 @@ class SortingPlugin extends BasePlugin {
12212
12249
  * If additive - add to existing sorting, multiple columns can be sorted
12213
12250
  */
12214
12251
  async headerclick(column, index, additive) {
12252
+ var _a, _b;
12215
12253
  let order = this.getNextOrder(column.order);
12216
12254
  const beforeEvent = this.emit('beforesorting', { column, order, additive });
12217
12255
  if (beforeEvent.defaultPrevented) {
@@ -12252,8 +12290,8 @@ class SortingPlugin extends BasePlugin {
12252
12290
  this.sortingFunc = { [column.prop]: cmp };
12253
12291
  }
12254
12292
  else {
12255
- delete this.sorting[column.prop];
12256
- delete this.sortingFunc[column.prop];
12293
+ (_a = this.sorting) === null || _a === void 0 ? true : delete _a[column.prop];
12294
+ (_b = this.sortingFunc) === null || _b === void 0 ? true : delete _b[column.prop];
12257
12295
  }
12258
12296
  }
12259
12297
  this.startSorting(this.sorting, this.sortingFunc);
@@ -12269,8 +12307,8 @@ class SortingPlugin extends BasePlugin {
12269
12307
  async sort(sorting, sortingFunc, types = ['rgRow', 'rowPinStart', 'rowPinEnd']) {
12270
12308
  // if no sorting - reset
12271
12309
  if (!size_1(sorting)) {
12272
- this.sorting = null;
12273
- this.sortingFunc = null;
12310
+ this.sorting = undefined;
12311
+ this.sortingFunc = undefined;
12274
12312
  for (let type of types) {
12275
12313
  const store = await this.revogrid.getSourceStore(type);
12276
12314
  // row data
@@ -12315,10 +12353,10 @@ class SortingPlugin extends BasePlugin {
12315
12353
  return -1 * cmp(prop, a, b);
12316
12354
  };
12317
12355
  }
12318
- sortIndexByItems(indexes, source, sortingFunc) {
12356
+ sortIndexByItems(indexes, source, sortingFunc = {}) {
12319
12357
  // if no sorting - return unsorted indexes
12320
12358
  if (Object.entries(sortingFunc).length === 0) {
12321
- // Unsort indexes
12359
+ // Unsorted indexes
12322
12360
  return [...Array(indexes.length).keys()];
12323
12361
  }
12324
12362
  //
@@ -12334,7 +12372,7 @@ class SortingPlugin extends BasePlugin {
12334
12372
  * If the comparison function returns a non-zero value (sorted), it means that the items should be sorted based on the given property. In such a case, the function immediately returns the sorted value, indicating the order in which the items should be arranged.
12335
12373
  * If none of the comparison functions result in a non-zero value, indicating that the items are equal or should remain in the same order, the function eventually returns 0.
12336
12374
  */
12337
- const sorted = cmp(prop, itemA, itemB);
12375
+ const sorted = cmp === null || cmp === void 0 ? void 0 : cmp(prop, itemA, itemB);
12338
12376
  if (sorted) {
12339
12377
  return sorted;
12340
12378
  }
@@ -12584,13 +12622,13 @@ class ExportFilePlugin extends BasePlugin {
12584
12622
  /** Export file */
12585
12623
  async exportFile(options = {}, t = ExportTypes.csv) {
12586
12624
  const formatter = this.formatter(t, options);
12587
- const blob = await this.getBlob(formatter);
12588
12625
  // url
12589
12626
  const URL = window.URL || window.webkitURL;
12590
12627
  const a = document.createElement('a');
12591
12628
  const { filename, fileKind } = formatter.options;
12592
12629
  const name = `${filename}.${fileKind}`;
12593
- const url = URL.createObjectURL(blob);
12630
+ const blob = await this.getBlob(formatter);
12631
+ const url = blob ? URL.createObjectURL(blob) : '';
12594
12632
  a.style.display = 'none';
12595
12633
  a.setAttribute('href', url);
12596
12634
  a.setAttribute('download', name);
@@ -13015,7 +13053,7 @@ class GroupingRowPlugin extends BasePlugin {
13015
13053
  const { sourceWithGroups, depth, trimmed, oldNewIndexMap, childrenByGroup, } = gatherGrouping(source, ((_a = this.options) === null || _a === void 0 ? void 0 : _a.props) || [], Object.assign({ prevExpanded }, options));
13016
13054
  // setup source
13017
13055
  this.providers.data.setData(sourceWithGroups, GROUPING_ROW_TYPE, this.revogrid.disableVirtualY, { depth, customRenderer: options === null || options === void 0 ? void 0 : options.groupLabelTemplate }, true);
13018
- this.updateTrimmed(trimmed, childrenByGroup, oldNewIndexes, oldNewIndexMap);
13056
+ this.updateTrimmed(trimmed, childrenByGroup, oldNewIndexes !== null && oldNewIndexes !== void 0 ? oldNewIndexes : {}, oldNewIndexMap);
13019
13057
  }
13020
13058
  /**
13021
13059
  * Apply grouping on data set
@@ -13081,7 +13119,7 @@ class GroupingRowPlugin extends BasePlugin {
13081
13119
  this.providers.data.setData(source, GROUPING_ROW_TYPE, this.revogrid.disableVirtualY, undefined, true);
13082
13120
  this.updateTrimmed(undefined, undefined, oldNewIndexes);
13083
13121
  }
13084
- updateTrimmed(trimmedGroup = {}, _childrenByGroup = {}, firstLevelMap, secondLevelMap) {
13122
+ updateTrimmed(trimmedGroup = {}, _childrenByGroup = {}, firstLevelMap = {}, secondLevelMap) {
13085
13123
  // map previously trimmed data
13086
13124
  const trimemedOptionsToUpgrade = processDoubleConversionTrimmed(this.trimmed, firstLevelMap, secondLevelMap);
13087
13125
  for (let type in trimemedOptionsToUpgrade) {
@@ -13119,6 +13157,25 @@ function getLastCell(data, rowType) {
13119
13157
  y: lastVisibleRowCount,
13120
13158
  };
13121
13159
  }
13160
+ function viewportDataPartition(data, type, slot, fixed) {
13161
+ return {
13162
+ colData: data.colStore,
13163
+ viewportCol: data.viewports[data.colType].store,
13164
+ viewportRow: data.viewports[type].store,
13165
+ // lastCell is the last real coordinate + 1
13166
+ lastCell: getLastCell(data, type),
13167
+ slot,
13168
+ type,
13169
+ canDrag: !fixed,
13170
+ position: data.position,
13171
+ dataStore: data.rowStores[type].store,
13172
+ dimensionCol: data.dimensions[data.colType].store,
13173
+ dimensionRow: data.dimensions[type].store,
13174
+ style: fixed
13175
+ ? { height: `${data.dimensions[type].store.get('realSize')}px` }
13176
+ : undefined,
13177
+ };
13178
+ }
13122
13179
 
13123
13180
  /** Collect Column data */
13124
13181
  function gatherColumnData(data) {
@@ -13201,11 +13258,9 @@ class ViewportService {
13201
13258
  segmentSelection.setLastCell(rgRow.lastCell);
13202
13259
  // register selection store for Row
13203
13260
  const rowSelectionStore = this.registerRow(rgRow.position.y, rgRow.type);
13204
- const rowDef = Object.assign(Object.assign({}, rgRow), { rowSelectionStore, segmentSelectionStore: segmentSelection.store, ref: (e) => config.selectionStoreConnector.registerSection(e), onSetrange: e => {
13261
+ const rowDef = Object.assign(Object.assign({ colType: val }, rgRow), { rowSelectionStore, segmentSelectionStore: segmentSelection.store, ref: (e) => config.selectionStoreConnector.registerSection(e), onSetrange: e => {
13205
13262
  segmentSelection.setRangeArea(e.detail);
13206
- }, onSettemprange: e => {
13207
- segmentSelection.setTempArea(e.detail);
13208
- }, onFocuscell: e => {
13263
+ }, onSettemprange: e => segmentSelection.setTempArea(e.detail), onFocuscell: e => {
13209
13264
  // todo: multi focus
13210
13265
  segmentSelection.clearFocus();
13211
13266
  config.selectionStoreConnector.focus(segmentSelection, e.detail);
@@ -13255,43 +13310,27 @@ class ViewportService {
13255
13310
  };
13256
13311
  // y position for selection
13257
13312
  let y = 0;
13258
- return rowTypes.reduce((r, type) => {
13313
+ return rowTypes.reduce((result, type) => {
13259
13314
  // filter out empty sources, we still need to return source to keep slot working
13260
13315
  const isPresent = data.viewports[type].store.get('realCount') || type === 'rgRow';
13261
13316
  const rgCol = Object.assign(Object.assign({}, data), { position: Object.assign(Object.assign({}, data.position), { y: isPresent ? y : EMPTY_INDEX }) });
13262
- r.push(this.dataPartition(rgCol, type, slots[type], type !== 'rgRow'));
13317
+ const partition = viewportDataPartition(rgCol, type, slots[type], type !== 'rgRow');
13318
+ result.push(partition);
13263
13319
  if (isPresent) {
13264
13320
  y++;
13265
13321
  }
13266
- return r;
13322
+ return result;
13267
13323
  }, []);
13268
13324
  }
13269
- dataPartition(data, type, slot, fixed) {
13270
- return {
13271
- colData: data.colStore,
13272
- viewportCol: data.viewports[data.colType].store,
13273
- viewportRow: data.viewports[type].store,
13274
- // lastCell is the last real coordinate + 1
13275
- lastCell: getLastCell(data, type),
13276
- slot,
13277
- type,
13278
- canDrag: !fixed,
13279
- position: data.position,
13280
- dataStore: data.rowStores[type].store,
13281
- dimensionCol: data.dimensions[data.colType].store,
13282
- dimensionRow: data.dimensions[type].store,
13283
- style: fixed
13284
- ? { height: `${data.dimensions[type].store.get('realSize')}px` }
13285
- : undefined,
13286
- };
13287
- }
13288
13325
  scrollToCell(cell) {
13289
13326
  for (let key in cell) {
13290
13327
  const coordinate = cell[key];
13291
- this.config.scrollingService.proxyScroll({
13292
- dimension: key === 'x' ? 'rgCol' : 'rgRow',
13293
- coordinate,
13294
- });
13328
+ if (typeof coordinate === 'number') {
13329
+ this.config.scrollingService.proxyScroll({
13330
+ dimension: key === 'x' ? 'rgCol' : 'rgRow',
13331
+ coordinate,
13332
+ });
13333
+ }
13295
13334
  }
13296
13335
  }
13297
13336
  /**
@@ -13327,22 +13366,30 @@ class ViewportService {
13327
13366
  }
13328
13367
  getStoreCoordinateByType(colType, rowType) {
13329
13368
  const stores = this.config.selectionStoreConnector.storesByType;
13330
- const storeCoordinate = {
13369
+ if (typeof stores[colType] === 'undefined' || typeof stores[rowType] === 'undefined') {
13370
+ return;
13371
+ }
13372
+ return {
13331
13373
  x: stores[colType],
13332
13374
  y: stores[rowType],
13333
13375
  };
13334
- return storeCoordinate;
13335
13376
  }
13336
13377
  setFocus(colType, rowType, start, end) {
13337
13378
  var _a;
13338
- (_a = this.config.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.focusByCell(this.getStoreCoordinateByType(colType, rowType), start, end);
13379
+ const coordinate = this.getStoreCoordinateByType(colType, rowType);
13380
+ if (coordinate) {
13381
+ (_a = this.config.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.focusByCell(coordinate, start, end);
13382
+ }
13339
13383
  }
13340
13384
  getSelectedRange() {
13341
13385
  return this.config.selectionStoreConnector.selectedRange;
13342
13386
  }
13343
13387
  setEdit(rowIndex, colIndex, colType, rowType) {
13344
13388
  var _a;
13345
- (_a = this.config.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.setEditByCell(this.getStoreCoordinateByType(colType, rowType), { x: colIndex, y: rowIndex });
13389
+ const coordinate = this.getStoreCoordinateByType(colType, rowType);
13390
+ if (coordinate) {
13391
+ (_a = this.config.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.setEditByCell(coordinate, { x: colIndex, y: rowIndex });
13392
+ }
13346
13393
  }
13347
13394
  }
13348
13395
 
@@ -13353,7 +13400,7 @@ class GridScrollingService {
13353
13400
  }
13354
13401
  async proxyScroll(e, key) {
13355
13402
  var _a;
13356
- let newEvent;
13403
+ let newEventPromise;
13357
13404
  let event = e;
13358
13405
  for (let elKey in this.elements) {
13359
13406
  // skip
@@ -13367,7 +13414,7 @@ class GridScrollingService {
13367
13414
  }
13368
13415
  for (let el of this.elements[elKey]) {
13369
13416
  if (el.changeScroll) {
13370
- newEvent = el.changeScroll(e);
13417
+ newEventPromise = el.changeScroll(e);
13371
13418
  }
13372
13419
  }
13373
13420
  }
@@ -13377,8 +13424,9 @@ class GridScrollingService {
13377
13424
  }
13378
13425
  }
13379
13426
  }
13427
+ const newEvent = await newEventPromise;
13380
13428
  if (newEvent) {
13381
- event = await newEvent;
13429
+ event = newEvent;
13382
13430
  }
13383
13431
  this.setViewport(event);
13384
13432
  }
@@ -13578,14 +13626,15 @@ function isStretchPlugin(plugin) {
13578
13626
  const rowDefinitionByType = (newVal = []) => {
13579
13627
  const result = {};
13580
13628
  for (const v of newVal) {
13581
- if (!result[v.type]) {
13582
- result[v.type] = {};
13629
+ let rowDefs = result[v.type];
13630
+ if (!rowDefs) {
13631
+ rowDefs = result[v.type] = {};
13583
13632
  }
13584
13633
  if (v.size) {
13585
- if (!result[v.type].sizes) {
13586
- result[v.type].sizes = {};
13634
+ if (!rowDefs.sizes) {
13635
+ rowDefs.sizes = {};
13587
13636
  }
13588
- result[v.type].sizes[v.index] = v.size;
13637
+ rowDefs.sizes[v.index] = v.size;
13589
13638
  }
13590
13639
  }
13591
13640
  return result;
@@ -13593,11 +13642,12 @@ const rowDefinitionByType = (newVal = []) => {
13593
13642
  const rowDefinitionRemoveByType = (oldVal = []) => {
13594
13643
  const result = {};
13595
13644
  for (const v of oldVal) {
13596
- if (!result[v.type]) {
13597
- result[v.type] = [];
13645
+ let rowDefs = result[v.type];
13646
+ if (!rowDefs) {
13647
+ rowDefs = result[v.type] = [];
13598
13648
  }
13599
13649
  if (v.size) {
13600
- result[v.type].push(v.index);
13650
+ rowDefs.push(v.index);
13601
13651
  }
13602
13652
  }
13603
13653
  return result;
@@ -13717,6 +13767,7 @@ const defaultProps = (props) => {
13717
13767
  };
13718
13768
  class ResizeDirective {
13719
13769
  constructor(initialProps, $event) {
13770
+ var _a, _b;
13720
13771
  this.initialProps = initialProps;
13721
13772
  this.$event = $event;
13722
13773
  this.mouseX = 0;
@@ -13731,8 +13782,8 @@ class ResizeDirective {
13731
13782
  this.mouseUpFunc = this.handleUp.bind(this);
13732
13783
  this.minW = this.props.minWidth;
13733
13784
  this.minH = this.props.minHeight;
13734
- this.maxW = this.props.maxWidth;
13735
- this.maxH = this.props.maxHeight;
13785
+ this.maxW = (_a = this.props.maxWidth) !== null && _a !== void 0 ? _a : 0;
13786
+ this.maxH = (_b = this.props.maxHeight) !== null && _b !== void 0 ? _b : 0;
13736
13787
  this.parent = { width: 0, height: 0 };
13737
13788
  this.resizeState = 0;
13738
13789
  }
@@ -13867,13 +13918,14 @@ class ResizeDirective {
13867
13918
  this.unbindMove();
13868
13919
  }
13869
13920
  setInitials({ clientX, clientY }, target) {
13921
+ var _a, _b, _c, _d;
13870
13922
  const computedStyle = getComputedStyle(this.$el);
13871
13923
  this.$el.classList.add('active');
13872
13924
  this.activeResizer = target;
13873
13925
  if (this.disableCalcMap & DISABLE_MASK.w) {
13874
13926
  this.mouseX = clientX;
13875
13927
  this.width = this.$el.clientWidth;
13876
- this.parent.width = this.$el.parentElement.clientWidth;
13928
+ this.parent.width = (_b = (_a = this.$el.parentElement) === null || _a === void 0 ? void 0 : _a.clientWidth) !== null && _b !== void 0 ? _b : 0;
13877
13929
  // min width
13878
13930
  const minPaddingX = parseFloat(computedStyle.paddingLeft) +
13879
13931
  parseFloat(computedStyle.paddingRight);
@@ -13886,7 +13938,7 @@ class ResizeDirective {
13886
13938
  if (this.disableCalcMap & DISABLE_MASK.h) {
13887
13939
  this.mouseY = clientY;
13888
13940
  this.height = this.$el.clientHeight;
13889
- this.parent.height = this.$el.parentElement.clientHeight;
13941
+ this.parent.height = (_d = (_c = this.$el.parentElement) === null || _c === void 0 ? void 0 : _c.clientHeight) !== null && _d !== void 0 ? _d : 0;
13890
13942
  // min height
13891
13943
  const minPaddingY = parseFloat(computedStyle.paddingTop) +
13892
13944
  parseFloat(computedStyle.paddingBottom);
@@ -13904,7 +13956,7 @@ class ResizeDirective {
13904
13956
  this.activeResizer.removeAttribute('style');
13905
13957
  }
13906
13958
  this.$el.classList.remove('active');
13907
- this.activeResizer = null;
13959
+ this.activeResizer = undefined;
13908
13960
  }
13909
13961
  bindMove() {
13910
13962
  document.documentElement.addEventListener('mouseup', this.mouseUpFunc, true);
@@ -13953,7 +14005,7 @@ const ResizableElement = (props, children) => {
13953
14005
  }
13954
14006
  }
13955
14007
  }
13956
- return (hAsync("div", Object.assign({}, props, { ref: (e) => directive === null || directive === void 0 ? void 0 : directive.set(e) }),
14008
+ return (hAsync("div", Object.assign({}, props, { ref: (e) => e && (directive === null || directive === void 0 ? void 0 : directive.set(e)) }),
13957
14009
  children,
13958
14010
  resizeEls));
13959
14011
  };
@@ -14082,7 +14134,7 @@ class ColumnPlugin extends BasePlugin {
14082
14134
  }
14083
14135
  onMouseUp(e) {
14084
14136
  // apply new positions
14085
- if (this.dragData) {
14137
+ if (this.dragData && this.staticDragData) {
14086
14138
  let relativePos = getLeftRelative(e.x, this.dragData.gridRect.left, this.dragData.scrollOffset);
14087
14139
  if (relativePos < 0) {
14088
14140
  relativePos = 0;
@@ -14199,9 +14251,6 @@ class RevoGridComponent {
14199
14251
  this.aftergridinit = createEvent(this, "aftergridinit", 7);
14200
14252
  this.additionaldatachanged = createEvent(this, "additionaldatachanged", 7);
14201
14253
  this.afterthemechanged = createEvent(this, "afterthemechanged", 7);
14202
- // #endregion
14203
- // #region Listeners outside scope
14204
- this.clickTrackForFocusClear = null;
14205
14254
  this.extraElements = [];
14206
14255
  this.viewport = null;
14207
14256
  this.isInited = false;
@@ -14373,6 +14422,7 @@ class RevoGridComponent {
14373
14422
  * @param column - full column details to update
14374
14423
  * @param index - virtual column index
14375
14424
  * @param order - order to apply
14425
+ * @param additive - if false will replace current order
14376
14426
  */
14377
14427
  async updateColumnSorting(column, index, order, additive) {
14378
14428
  return this.columnProvider.updateColumnSorting(column, index, order, additive);
@@ -14411,8 +14461,8 @@ class RevoGridComponent {
14411
14461
  * Get the currently focused cell.
14412
14462
  */
14413
14463
  async getFocused() {
14414
- var _a;
14415
- return (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.getFocused();
14464
+ var _a, _b;
14465
+ return (_b = (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.getFocused()) !== null && _b !== void 0 ? _b : null;
14416
14466
  }
14417
14467
  /**
14418
14468
  * Get size of content
@@ -14426,8 +14476,8 @@ class RevoGridComponent {
14426
14476
  * Get the currently selected Range.
14427
14477
  */
14428
14478
  async getSelectedRange() {
14429
- var _a;
14430
- return (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.getSelectedRange();
14479
+ var _a, _b;
14480
+ return (_b = (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.getSelectedRange()) !== null && _b !== void 0 ? _b : null;
14431
14481
  }
14432
14482
  mousedownHandle(event) {
14433
14483
  const screenX = getPropertyFromEvent(event, 'screenX');
@@ -14440,7 +14490,8 @@ class RevoGridComponent {
14440
14490
  /**
14441
14491
  * To keep your elements from losing focus use mouseup/touchend e.preventDefault();
14442
14492
  */
14443
- mouseupHandle(event) {
14493
+ async mouseupHandle(event) {
14494
+ var _a;
14444
14495
  const screenX = getPropertyFromEvent(event, 'screenX');
14445
14496
  const screenY = getPropertyFromEvent(event, 'screenY');
14446
14497
  if (screenX === null || screenY === null) {
@@ -14451,16 +14502,16 @@ class RevoGridComponent {
14451
14502
  }
14452
14503
  const pos = screenX + screenY;
14453
14504
  // detect if mousemove then do nothing
14454
- if (Math.abs(this.clickTrackForFocusClear - pos) > 10) {
14505
+ if (Math.abs(((_a = this.clickTrackForFocusClear) !== null && _a !== void 0 ? _a : 0) - pos) > 10) {
14455
14506
  return;
14456
14507
  }
14457
- // Check if action finished inside of the document
14458
- // if event prevented or it is current table don't clear focus
14508
+ // Check if action finished inside the document
14509
+ // if event prevented, or it is current table don't clear focus
14459
14510
  const path = event.composedPath();
14460
14511
  if (!path.includes(this.element) &&
14461
- !path.includes(this.element.shadowRoot)) {
14512
+ !(this.element.shadowRoot && path.includes(this.element.shadowRoot))) {
14462
14513
  // Perform actions if the click is outside the component
14463
- this.clearFocus();
14514
+ await this.clearFocus();
14464
14515
  }
14465
14516
  }
14466
14517
  // #endregion
@@ -14670,15 +14721,12 @@ class RevoGridComponent {
14670
14721
  let grPlugin;
14671
14722
  for (let p of this.internalPlugins) {
14672
14723
  const isGrouping = p;
14673
- if (isGrouping.setGrouping) {
14724
+ if (!!isGrouping.setGrouping) {
14674
14725
  grPlugin = isGrouping;
14675
14726
  break;
14676
14727
  }
14677
14728
  }
14678
- if (!grPlugin) {
14679
- return;
14680
- }
14681
- grPlugin.setGrouping(newVal || {});
14729
+ grPlugin === null || grPlugin === void 0 ? void 0 : grPlugin.setGrouping(newVal || {});
14682
14730
  }
14683
14731
  /**
14684
14732
  * Stretch Plugin Apply
@@ -14762,7 +14810,7 @@ class RevoGridComponent {
14762
14810
  (_a = this.plugins) === null || _a === void 0 ? void 0 : _a.forEach(p => this.internalPlugins.push(new p(this.element, pluginData)));
14763
14811
  }
14764
14812
  removePlugins() {
14765
- this.internalPlugins.forEach(p => p.destroy());
14813
+ this.internalPlugins.forEach(p => { var _a; return (_a = p.destroy) === null || _a === void 0 ? void 0 : _a.call(p); });
14766
14814
  this.internalPlugins = [];
14767
14815
  }
14768
14816
  // #endregion
@@ -14862,7 +14910,7 @@ class RevoGridComponent {
14862
14910
  const headerProperties = Object.assign(Object.assign({}, view.headerProp), { type: view.type, additionalData: this.additionalData, viewportCol: view.viewportCol, selectionStore: view.columnSelectionStore, canResize: this.resize, readonly: this.readonly, columnFilter: !!this.filter });
14863
14911
  // Column headers
14864
14912
  const dataViews = [
14865
- hAsync("revogr-header", Object.assign({ key: 'ff8eefd6db3baf494c015a2ea573160d27739aa9' }, headerProperties, { slot: HEADER_SLOT })),
14913
+ hAsync("revogr-header", Object.assign({ key: 'b08c837765cf20c88cb5b253a876f0f442c31628' }, headerProperties, { slot: HEADER_SLOT })),
14866
14914
  ];
14867
14915
  // Render viewport data (vertical sections)
14868
14916
  view.dataPorts.forEach(data => {
@@ -14884,11 +14932,12 @@ class RevoGridComponent {
14884
14932
  const typeCol = 'rgCol';
14885
14933
  const viewports = this.viewportProvider.stores;
14886
14934
  const dimensions = this.dimensionProvider.stores;
14887
- return (hAsync(Host, { key: '21bbe81595f20f7bcb271f28c9c86feef472efec' }, this.hideAttribution ? null : (hAsync("revogr-attribution", { class: "attribution" })), hAsync("div", { key: '7a3092cd02305a0dfaa3b3d3160164001f0ed08b', class: "main-viewport", onClick: (e) => {
14935
+ return (hAsync(Host, { key: '057a2cf1a64aaeec12d2aca17b09316fb3cbfde6' }, this.hideAttribution ? null : (hAsync("revogr-attribution", { class: "attribution" })), hAsync("div", { key: 'e89e3d136d756f80421f42f47e09583985edb1bc', class: "main-viewport", onClick: (e) => {
14936
+ var _a;
14888
14937
  if (e.currentTarget === e.target) {
14889
- this.viewport.clearEdit();
14938
+ (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.clearEdit();
14890
14939
  }
14891
- } }, hAsync("div", { key: 'ae1dfccbb72cc2a9f7fa370889746c702d106045', class: "viewports" }, hAsync("slot", { key: '0725b46d877fbb63fb513845cc1c7b86d0f856b8', name: "viewport" }), viewportSections, hAsync("revogr-scroll-virtual", { key: 'd41771f6ff459f1f6747ce496c8165b1dab44963', class: "vertical", dimension: typeRow, viewportStore: viewports[typeRow].store, dimensionStore: dimensions[typeRow].store, ref: el => this.scrollingService.registerElement(el, 'rowScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }), hAsync(OrderRenderer, { key: '2914421478450c9b198e0aade898ed342e4d7f6a', ref: e => (this.orderService = e) }))), hAsync("revogr-scroll-virtual", { key: 'bc1812c5ce54cda01e81cc06e28c69dc8e36fdf3', class: "horizontal", dimension: typeCol, viewportStore: viewports[typeCol].store, dimensionStore: dimensions[typeCol].store, ref: el => this.scrollingService.registerElement(el, 'colScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }), this.extraElements));
14940
+ } }, hAsync("div", { key: '177db78970907d36b8d56549386a18a683573944', class: "viewports" }, hAsync("slot", { key: '481d830a232b1969fcaa2519a5306fafaff58fb4', name: "viewport" }), viewportSections, hAsync("revogr-scroll-virtual", { key: '6a123b2e84bec95d7a63a73322fe167248e8415e', class: "vertical", dimension: typeRow, viewportStore: viewports[typeRow].store, dimensionStore: dimensions[typeRow].store, ref: el => this.scrollingService.registerElement(el, 'rowScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }), hAsync(OrderRenderer, { key: 'fea1be24668f2039746fff93d0ab5e76d932a166', ref: e => (this.orderService = e) }))), hAsync("revogr-scroll-virtual", { key: '74c6e05c81b2782320755c910b098edf8858d6db', class: "horizontal", dimension: typeCol, viewportStore: viewports[typeCol].store, dimensionStore: dimensions[typeCol].store, ref: el => this.scrollingService.registerElement(el, 'colScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }), this.extraElements));
14892
14941
  }
14893
14942
  disconnectedCallback() {
14894
14943
  // Remove all plugins, to avoid memory leaks and unexpected behaviour when the component is removed
@@ -15100,10 +15149,13 @@ function renderCell(v) {
15100
15149
  // Row drag
15101
15150
  if (v.model.column.rowDrag &&
15102
15151
  isRowDragService(v.model.column.rowDrag, v.model)) {
15103
- els.push(hAsync("span", { class: DRAGGABLE_CLASS, onMouseDown: originalEvent => v.dragStartCell.emit({
15104
- originalEvent,
15105
- model: v.model,
15106
- }) },
15152
+ els.push(hAsync("span", { class: DRAGGABLE_CLASS, onMouseDown: originalEvent => {
15153
+ var _a;
15154
+ return (_a = v.dragStartCell) === null || _a === void 0 ? void 0 : _a.emit({
15155
+ originalEvent,
15156
+ model: v.model,
15157
+ });
15158
+ } },
15107
15159
  hAsync("span", { class: DRAG_ICON_CLASS })));
15108
15160
  }
15109
15161
  els.push(`${getCellData(v.model.model[v.model.prop])}`);
@@ -15737,7 +15789,8 @@ const HeaderRenderer = (p) => {
15737
15789
  },
15738
15790
  onResize: p.onResize,
15739
15791
  onDoubleClick(originalEvent) {
15740
- p.onDoubleClick({
15792
+ var _a;
15793
+ (_a = p.onDoubleClick) === null || _a === void 0 ? void 0 : _a.call(p, {
15741
15794
  column: p.data,
15742
15795
  index: p.column.itemIndex,
15743
15796
  originalEvent,
@@ -15802,7 +15855,7 @@ const ColumnGroupsRenderer = ({ additionalData, providers, depth, groups, visibl
15802
15855
  // coordinates
15803
15856
  const groupStart = getItemByIndex(dimensionCol, groupStartIndex).start;
15804
15857
  const groupEnd = getItemByIndex(dimensionCol, groupEndIndex).end;
15805
- groupRow.push(hAsync(GroupHeaderRenderer, { providers: providers, start: groupStart, end: groupEnd, group: group, active: active, canResize: canResize, onResize: e => onResize(e.changedX, groupStartIndex, groupEndIndex), additionalData: additionalData }));
15858
+ groupRow.push(hAsync(GroupHeaderRenderer, { providers: providers, start: groupStart, end: groupEnd, group: group, active: active, canResize: canResize, onResize: e => { var _a; return onResize((_a = e.changedX) !== null && _a !== void 0 ? _a : 0, groupStartIndex, groupEndIndex); }, additionalData: additionalData }));
15806
15859
  }
15807
15860
  }
15808
15861
  }
@@ -15969,7 +16022,7 @@ class RevogrRowHeaders {
15969
16022
  const viewportHeader = Object.assign(Object.assign({}, this.headerProp), { colData: typeof this.rowHeaderColumn === 'object' ? [this.rowHeaderColumn] : [], viewportCol: viewport.store, canResize: false, type: ROW_HEADER_TYPE,
15970
16023
  // parent,
15971
16024
  slot: HEADER_SLOT });
15972
- return (hAsync(Host, { class: { [ROW_HEADER_TYPE]: true }, key: ROW_HEADER_TYPE }, hAsync("revogr-viewport-scroll", Object.assign({ key: 'efaaa386cb5ea8b848d42e3407dbde8ad99d1db8' }, viewportScroll, { "row-header": true }), hAsync("revogr-header", Object.assign({ key: '57fb6d08cd094f9b19145ff65c3ab805992fbb68' }, viewportHeader)), dataViews)));
16025
+ return (hAsync(Host, { class: { [ROW_HEADER_TYPE]: true }, key: ROW_HEADER_TYPE }, hAsync("revogr-viewport-scroll", Object.assign({ key: '743c1dbaed3edf679c0616a2b79171a43d94806f' }, viewportScroll, { "row-header": true }), hAsync("revogr-header", Object.assign({ key: '53f1f64b1358d7828a5e45807915740ef198df21' }, viewportHeader)), dataViews)));
15973
16026
  }
15974
16027
  static get cmpMeta() { return {
15975
16028
  "$flags$": 0,
@@ -16083,7 +16136,7 @@ class LocalScrollService {
16083
16136
  if (c < 0) {
16084
16137
  return NO_COORDINATE;
16085
16138
  }
16086
- if (c > param.maxSize) {
16139
+ if (typeof param.maxSize === 'number' && c > param.maxSize) {
16087
16140
  return param.maxSize;
16088
16141
  }
16089
16142
  return c;
@@ -16096,8 +16149,9 @@ class LocalScrollService {
16096
16149
  }
16097
16150
  /* convert virtual to real and back, scale range */
16098
16151
  convert(pos, param, toReal = true) {
16152
+ var _a;
16099
16153
  const minRange = param.clientSize;
16100
- const from = [0, param.virtualContentSize - minRange];
16154
+ const from = [0, ((_a = param.virtualContentSize) !== null && _a !== void 0 ? _a : minRange) - minRange];
16101
16155
  const to = [0, param.contentSize - param.virtualSize];
16102
16156
  if (toReal) {
16103
16157
  return scaleValue(pos, from, to);
@@ -16139,7 +16193,7 @@ class AutohideScrollPlugin {
16139
16193
  show(element, timeout) {
16140
16194
  clearTimeout(timeout);
16141
16195
  return Number(setTimeout(() => {
16142
- element.removeAttribute('visible');
16196
+ element === null || element === void 0 ? void 0 : element.removeAttribute('visible');
16143
16197
  }, 1000));
16144
16198
  }
16145
16199
  clear() {
@@ -16379,8 +16433,9 @@ class RevogrViewportScroll {
16379
16433
  * @param e
16380
16434
  */
16381
16435
  async changeScroll(e, silent = false) {
16436
+ var _a, _b;
16382
16437
  if (silent) {
16383
- if (e.coordinate) {
16438
+ if (e.coordinate && this.verticalScroll) {
16384
16439
  switch (e.dimension) {
16385
16440
  // for mobile devices to skip negative scroll loop. only on vertical scroll
16386
16441
  case 'rgRow':
@@ -16388,7 +16443,7 @@ class RevogrViewportScroll {
16388
16443
  break;
16389
16444
  }
16390
16445
  }
16391
- return null;
16446
+ return;
16392
16447
  }
16393
16448
  if (e.delta) {
16394
16449
  switch (e.dimension) {
@@ -16396,7 +16451,7 @@ class RevogrViewportScroll {
16396
16451
  e.coordinate = this.horizontalScroll.scrollLeft + e.delta;
16397
16452
  break;
16398
16453
  case 'rgRow':
16399
- e.coordinate = this.verticalScroll.scrollTop + e.delta;
16454
+ e.coordinate = ((_b = (_a = this.verticalScroll) === null || _a === void 0 ? void 0 : _a.scrollTop) !== null && _b !== void 0 ? _b : 0) + e.delta;
16400
16455
  break;
16401
16456
  }
16402
16457
  this.setScroll(e);
@@ -16444,11 +16499,13 @@ class RevogrViewportScroll {
16444
16499
  this.horizontalScroll.scrollLeft = e.coordinate;
16445
16500
  break;
16446
16501
  case 'rgRow':
16447
- // this will trigger on scroll event
16448
- this.verticalScroll.scrollTop = e.coordinate;
16449
- // for mobile devices to skip negative scroll loop. only on vertical scroll
16450
- if (this.verticalScroll.style.transform) {
16451
- this.verticalScroll.style.transform = '';
16502
+ if (this.verticalScroll) {
16503
+ // this will trigger on scroll event
16504
+ this.verticalScroll.scrollTop = e.coordinate;
16505
+ // for mobile devices to skip negative scroll loop. only on vertical scroll
16506
+ if (this.verticalScroll.style.transform) {
16507
+ this.verticalScroll.style.transform = '';
16508
+ }
16452
16509
  }
16453
16510
  break;
16454
16511
  }
@@ -16459,23 +16516,23 @@ class RevogrViewportScroll {
16459
16516
  // track horizontal viewport resize
16460
16517
  this.resizeService = new GridResizeService(this.horizontalScroll, {
16461
16518
  resize: entries => {
16462
- var _a, _b, _c;
16519
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
16463
16520
  let height = ((_a = entries[0]) === null || _a === void 0 ? void 0 : _a.contentRect.height) || 0;
16464
16521
  if (height) {
16465
- height -= this.header.clientHeight + this.footer.clientHeight;
16522
+ height -= ((_c = (_b = this.header) === null || _b === void 0 ? void 0 : _b.clientHeight) !== null && _c !== void 0 ? _c : 0) + ((_e = (_d = this.footer) === null || _d === void 0 ? void 0 : _d.clientHeight) !== null && _e !== void 0 ? _e : 0);
16466
16523
  }
16467
16524
  const els = {
16468
16525
  rgRow: {
16469
16526
  size: height,
16470
16527
  contentSize: this.contentHeight,
16471
- scroll: this.verticalScroll.scrollTop,
16528
+ scroll: (_f = this.verticalScroll) === null || _f === void 0 ? void 0 : _f.scrollTop,
16472
16529
  noScroll: false,
16473
16530
  },
16474
16531
  rgCol: {
16475
- size: ((_b = entries[0]) === null || _b === void 0 ? void 0 : _b.contentRect.width) || 0,
16532
+ size: ((_g = entries[0]) === null || _g === void 0 ? void 0 : _g.contentRect.width) || 0,
16476
16533
  contentSize: this.contentWidth,
16477
16534
  scroll: this.horizontalScroll.scrollLeft,
16478
- noScroll: this.colType !== 'rgCol' ? true : false,
16535
+ noScroll: this.colType !== 'rgCol',
16479
16536
  },
16480
16537
  };
16481
16538
  for (const [dim, item] of Object.entries(els)) {
@@ -16484,7 +16541,7 @@ class RevogrViewportScroll {
16484
16541
  if (item.noScroll) {
16485
16542
  continue;
16486
16543
  }
16487
- (_c = this.localScrollService) === null || _c === void 0 ? void 0 : _c.scroll(item.scroll, dimension, true);
16544
+ (_h = this.localScrollService) === null || _h === void 0 ? void 0 : _h.scroll((_j = item.scroll) !== null && _j !== void 0 ? _j : 0, dimension, true);
16488
16545
  // track scroll visibility on outer element change
16489
16546
  this.setScrollVisibility(dimension, item.size, item.contentSize);
16490
16547
  }
@@ -16514,10 +16571,10 @@ class RevogrViewportScroll {
16514
16571
  }
16515
16572
  // based on scroll visibility assign or remove class and event
16516
16573
  if (hasScroll) {
16517
- el.classList.add(`scroll-${type}`);
16574
+ el === null || el === void 0 ? void 0 : el.classList.add(`scroll-${type}`);
16518
16575
  }
16519
16576
  else {
16520
- el.classList.remove(`scroll-${type}`);
16577
+ el === null || el === void 0 ? void 0 : el.classList.remove(`scroll-${type}`);
16521
16578
  }
16522
16579
  this.scrollchange.emit({ type, hasScroll });
16523
16580
  }
@@ -16525,6 +16582,7 @@ class RevogrViewportScroll {
16525
16582
  this.resizeService.destroy();
16526
16583
  }
16527
16584
  async componentDidRender() {
16585
+ var _a, _b, _c, _d;
16528
16586
  // scroll update if number of rows changed
16529
16587
  if (this.contentHeight < this.oldValY && this.verticalScroll) {
16530
16588
  this.verticalScroll.scrollTop += this.contentHeight - this.oldValY;
@@ -16537,7 +16595,7 @@ class RevogrViewportScroll {
16537
16595
  this.oldValX = this.contentWidth;
16538
16596
  this.localScrollService.setParams({
16539
16597
  contentSize: this.contentHeight,
16540
- clientSize: this.verticalScroll.clientHeight,
16598
+ clientSize: (_b = (_a = this.verticalScroll) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0,
16541
16599
  virtualSize: 0,
16542
16600
  }, 'rgRow');
16543
16601
  this.localScrollService.setParams({
@@ -16545,11 +16603,11 @@ class RevogrViewportScroll {
16545
16603
  clientSize: this.horizontalScroll.clientWidth,
16546
16604
  virtualSize: 0,
16547
16605
  }, 'rgCol');
16548
- this.setScrollVisibility('rgRow', this.verticalScroll.clientHeight, this.contentHeight);
16606
+ this.setScrollVisibility('rgRow', (_d = (_c = this.verticalScroll) === null || _c === void 0 ? void 0 : _c.clientHeight) !== null && _d !== void 0 ? _d : 0, this.contentHeight);
16549
16607
  this.setScrollVisibility('rgCol', this.horizontalScroll.clientWidth, this.contentWidth);
16550
16608
  }
16551
16609
  render() {
16552
- return (hAsync(Host, { key: '485d211d22fd720192de2206afef46545339902e', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, hAsync("div", { key: 'e3d17c747ec3f525c2947a6fa2e4652ed0f498d9', class: "inner-content-table", style: { width: `${this.contentWidth}px` } }, hAsync("div", { key: 'f8fb5652593c76f676d57762911af866f46ce31d', class: "header-wrapper", ref: e => (this.header = e) }, hAsync("slot", { key: '6d96653adf4d23208a6091dab42000235d696b48', name: HEADER_SLOT })), hAsync("div", { key: 'afcfcdaeacfe01fa3d8fabc30db36f5aecb24ad3', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, hAsync("div", { key: 'f6ba7b1d8621fcb2ea8565cdea6a75e6abca9d35', class: "content-wrapper", style: { height: `${this.contentHeight}px` } }, hAsync("slot", { key: 'e5377e124212312859b05431053bcd81543d8193', name: CONTENT_SLOT }))), hAsync("div", { key: '3e990a197388391d393c607c18441b363d60ab53', class: "footer-wrapper", ref: e => (this.footer = e) }, hAsync("slot", { key: 'ae7eb7bde5e8798247b4d2a67ae622ba496c44f9', name: FOOTER_SLOT })))));
16610
+ return (hAsync(Host, { key: '8395ce30127f30fff81dc67bfe2f4c3b087b2007', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, hAsync("div", { key: 'efd2db0f5b22b394e93923926f86f2ab9bffb8e0', class: "inner-content-table", style: { width: `${this.contentWidth}px` } }, hAsync("div", { key: '2794c7187ec23ac45dab5f6cb3f20ba59102b2a7', class: "header-wrapper", ref: e => (this.header = e) }, hAsync("slot", { key: '1a344d7e5cf58d77818390e8d541de88a75399d0', name: HEADER_SLOT })), hAsync("div", { key: '2aeb56f4bf3f3fc60eaeaffd8c18565beaa127ca', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, hAsync("div", { key: '59482ef73d3c4617c2511b8613056bbc200cd089', class: "content-wrapper", style: { height: `${this.contentHeight}px` } }, hAsync("slot", { key: 'f318ab365e5f6eddcd2812a314f55cac0959c3b4', name: CONTENT_SLOT }))), hAsync("div", { key: '265c036107a8ed3d47b767fec10ae0225cc927cf', class: "footer-wrapper", ref: e => (this.footer = e) }, hAsync("slot", { key: '2aa7e178375b462e666cf067e075856f592714b6', name: FOOTER_SLOT })))));
16553
16611
  }
16554
16612
  /**
16555
16613
  * Extra layer for scroll event monitoring, where MouseWheel event is not passing
@@ -16592,10 +16650,11 @@ class RevogrViewportScroll {
16592
16650
  * @param e
16593
16651
  */
16594
16652
  onVerticalMouseWheel(type, delta, e) {
16595
- var _a, _b;
16653
+ var _a, _b, _c, _d;
16596
16654
  (_a = e.preventDefault) === null || _a === void 0 ? void 0 : _a.call(e);
16597
- const pos = this.verticalScroll.scrollTop + e[delta];
16598
- (_b = this.localScrollService) === null || _b === void 0 ? void 0 : _b.scroll(pos, type, undefined, e[delta]);
16655
+ const scrollTop = (_c = (_b = this.verticalScroll) === null || _b === void 0 ? void 0 : _b.scrollTop) !== null && _c !== void 0 ? _c : 0;
16656
+ const pos = scrollTop + e[delta];
16657
+ (_d = this.localScrollService) === null || _d === void 0 ? void 0 : _d.scroll(pos, type, undefined, e[delta]);
16599
16658
  this.localScrollTimer.latestScrollUpdate(type);
16600
16659
  }
16601
16660
  /**
@@ -16652,9 +16711,9 @@ class VNodeToHtml {
16652
16711
  });
16653
16712
  }
16654
16713
  render() {
16655
- var _a;
16656
- this.vnodes = (_a = this.redraw) === null || _a === void 0 ? void 0 : _a.call(this);
16657
- return (hAsync(Host, { key: '12ecb44c9ee03f85060c4dac3a090e2a0338c148', style: { visibility: 'hidden', position: 'absolute' } }, this.vnodes));
16714
+ var _a, _b;
16715
+ this.vnodes = (_b = (_a = this.redraw) === null || _a === void 0 ? void 0 : _a.call(this)) !== null && _b !== void 0 ? _b : null;
16716
+ return (hAsync(Host, { key: 'dcaa7c6bd2f1eef1dd9a7f95a723f8ec778681a0', style: { visibility: 'hidden', position: 'absolute' } }, this.vnodes));
16658
16717
  }
16659
16718
  get el() { return getElement(this); }
16660
16719
  static get cmpMeta() { return {