@revolist/revogrid 4.0.11 → 4.0.13

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 (379) hide show
  1. package/dist/cjs/app-globals-53fde1aa.js.map +1 -1
  2. package/dist/cjs/base.plugin-32f80cb5.js +219 -0
  3. package/dist/cjs/base.plugin-32f80cb5.js.map +1 -0
  4. package/dist/cjs/{column.service-e83d9809.js → column.service-52b4cac9.js} +28 -12
  5. package/dist/cjs/column.service-52b4cac9.js.map +1 -0
  6. package/dist/cjs/dimension.helpers-ee39d6c4.js.map +1 -1
  7. package/dist/cjs/events-b28cc194.js +52 -0
  8. package/dist/cjs/events-b28cc194.js.map +1 -0
  9. package/dist/cjs/filter.button-db6cbd2e.js.map +1 -1
  10. package/dist/cjs/{header-cell-renderer-8ba9b56d.js → header-cell-renderer-a3f202a1.js} +2 -2
  11. package/dist/cjs/{header-cell-renderer-8ba9b56d.js.map → header-cell-renderer-a3f202a1.js.map} +1 -1
  12. package/dist/cjs/{index-73c149e3.js → index-a9f1b728.js} +3 -4
  13. package/dist/cjs/index-a9f1b728.js.map +1 -0
  14. package/dist/cjs/index.cjs.js +26 -23
  15. package/dist/cjs/index.cjs.js.map +1 -1
  16. package/dist/cjs/{key.utils-59b9b528.js → key.utils-ee3d9eab.js} +2 -2
  17. package/dist/cjs/{key.utils-59b9b528.js.map → key.utils-ee3d9eab.js.map} +1 -1
  18. package/dist/cjs/revo-grid.cjs.entry.js +74 -164
  19. package/dist/cjs/revo-grid.cjs.entry.js.map +1 -1
  20. package/dist/cjs/revogr-attribution_6.cjs.entry.js +193 -142
  21. package/dist/cjs/revogr-attribution_6.cjs.entry.js.map +1 -1
  22. package/dist/cjs/revogr-clipboard_3.cjs.entry.js +2 -2
  23. package/dist/cjs/revogr-clipboard_3.cjs.entry.js.map +1 -1
  24. package/dist/cjs/revogr-data_4.cjs.entry.js +9 -9
  25. package/dist/cjs/revogr-data_4.cjs.entry.js.map +1 -1
  26. package/dist/cjs/revogr-filter-panel.cjs.entry.js.map +1 -1
  27. package/dist/cjs/{selection.store-2e110a67.js → selection.helpers-32abb2a9.js} +77 -75
  28. package/dist/cjs/selection.helpers-32abb2a9.js.map +1 -0
  29. package/dist/cjs/{throttle-f7aee21b.js → throttle-46478b04.js} +2 -2
  30. package/dist/cjs/{throttle-f7aee21b.js.map → throttle-46478b04.js.map} +1 -1
  31. package/dist/cjs/{viewport.helpers-6670177c.js → viewport.store-2ab4e166.js} +186 -1
  32. package/dist/cjs/viewport.store-2ab4e166.js.map +1 -0
  33. package/dist/collection/components/clipboard/revogr-clipboard.js +2 -2
  34. package/dist/collection/components/clipboard/revogr-clipboard.js.map +1 -1
  35. package/dist/collection/components/data/cell-renderer.js.map +1 -1
  36. package/dist/collection/components/data/column.service.js +2 -2
  37. package/dist/collection/components/data/column.service.js.map +1 -1
  38. package/dist/collection/components/data/revogr-data.js +46 -46
  39. package/dist/collection/components/data/revogr-data.js.map +1 -1
  40. package/dist/collection/components/data/row-highlight.plugin.js.map +1 -1
  41. package/dist/collection/components/editors/edit.utils.js.map +1 -1
  42. package/dist/collection/components/editors/revogr-edit.js +9 -9
  43. package/dist/collection/components/editors/revogr-edit.js.map +1 -1
  44. package/dist/collection/components/editors/text-editor.js.map +1 -1
  45. package/dist/collection/components/header/header-cell-renderer.js.map +1 -1
  46. package/dist/collection/components/header/header-renderer.js.map +1 -1
  47. package/dist/collection/components/header/revogr-header.js +28 -28
  48. package/dist/collection/components/header/revogr-header.js.map +1 -1
  49. package/dist/collection/components/order/order-renderer.js.map +1 -1
  50. package/dist/collection/components/order/order-row.service.js +1 -1
  51. package/dist/collection/components/order/order-row.service.js.map +1 -1
  52. package/dist/collection/components/order/revogr-order-editor.js +31 -28
  53. package/dist/collection/components/order/revogr-order-editor.js.map +1 -1
  54. package/dist/collection/components/overlay/autofill.service.js +37 -26
  55. package/dist/collection/components/overlay/autofill.service.js.map +1 -1
  56. package/dist/collection/components/overlay/keyboard.service.js +8 -8
  57. package/dist/collection/components/overlay/keyboard.service.js.map +1 -1
  58. package/dist/collection/components/overlay/revogr-overlay-selection.js +141 -93
  59. package/dist/collection/components/overlay/revogr-overlay-selection.js.map +1 -1
  60. package/dist/collection/components/overlay/selection.utils.js +37 -9
  61. package/dist/collection/components/overlay/selection.utils.js.map +1 -1
  62. package/dist/collection/components/revoGrid/grid.helpers.js.map +1 -1
  63. package/dist/collection/components/revoGrid/revo-grid-style.css +8 -3
  64. package/dist/collection/components/revoGrid/revo-grid.js +150 -135
  65. package/dist/collection/components/revoGrid/revo-grid.js.map +1 -1
  66. package/dist/collection/components/revoGrid/viewport.helpers.js +22 -8
  67. package/dist/collection/components/revoGrid/viewport.helpers.js.map +1 -1
  68. package/dist/collection/components/revoGrid/viewport.scrolling.service.js +4 -2
  69. package/dist/collection/components/revoGrid/viewport.scrolling.service.js.map +1 -1
  70. package/dist/collection/components/revoGrid/viewport.service.js +2 -2
  71. package/dist/collection/components/revoGrid/viewport.service.js.map +1 -1
  72. package/dist/collection/components/rowHeaders/revogr-row-headers.js +11 -12
  73. package/dist/collection/components/rowHeaders/revogr-row-headers.js.map +1 -1
  74. package/dist/collection/components/rowHeaders/row-header-render.js.map +1 -1
  75. package/dist/collection/components/scroll/revogr-viewport-scroll.js +17 -17
  76. package/dist/collection/components/scroll/revogr-viewport-scroll.js.map +1 -1
  77. package/dist/collection/components/scrollable/revogr-scroll-virtual.js +17 -17
  78. package/dist/collection/components/scrollable/revogr-scroll-virtual.js.map +1 -1
  79. package/dist/collection/components/selectionFocus/revogr-focus.js +44 -43
  80. package/dist/collection/components/selectionFocus/revogr-focus.js.map +1 -1
  81. package/dist/collection/components/selectionTempRange/revogr-temp-range.js +12 -12
  82. package/dist/collection/components/selectionTempRange/revogr-temp-range.js.map +1 -1
  83. package/dist/collection/components/vnode/vnode.utils.js.map +1 -1
  84. package/dist/collection/index.js +2 -12
  85. package/dist/collection/index.js.map +1 -1
  86. package/dist/collection/plugins/column.auto-size.plugin.js +3 -4
  87. package/dist/collection/plugins/column.auto-size.plugin.js.map +1 -1
  88. package/dist/collection/plugins/export/export.plugin.js +1 -1
  89. package/dist/collection/plugins/export/export.plugin.js.map +1 -1
  90. package/dist/collection/plugins/export/types.js.map +1 -1
  91. package/dist/collection/plugins/filter/filter.button.js.map +1 -1
  92. package/dist/collection/plugins/filter/filter.plugin.js.map +1 -1
  93. package/dist/collection/plugins/filter/filter.pop.js +4 -4
  94. package/dist/collection/plugins/filter/filter.pop.js.map +1 -1
  95. package/dist/collection/plugins/groupingColumn/columnGroupsRenderer.js +1 -1
  96. package/dist/collection/plugins/groupingColumn/columnGroupsRenderer.js.map +1 -1
  97. package/dist/collection/plugins/groupingColumn/grouping.col.plugin.js.map +1 -1
  98. package/dist/collection/plugins/groupingColumn/headerGroupRenderer.js.map +1 -1
  99. package/dist/collection/plugins/groupingRow/grouping.row.expand.service.js.map +1 -1
  100. package/dist/collection/plugins/groupingRow/grouping.row.plugin.js +1 -2
  101. package/dist/collection/plugins/groupingRow/grouping.row.plugin.js.map +1 -1
  102. package/dist/collection/plugins/groupingRow/grouping.row.renderer.js.map +1 -1
  103. package/dist/collection/plugins/groupingRow/grouping.row.types.js.map +1 -1
  104. package/dist/collection/plugins/groupingRow/grouping.service.js.map +1 -1
  105. package/dist/collection/plugins/groupingRow/grouping.trimmed.service.js +1 -1
  106. package/dist/collection/plugins/groupingRow/grouping.trimmed.service.js.map +1 -1
  107. package/dist/collection/plugins/moveColumn/column.drag.plugin.js +1 -1
  108. package/dist/collection/plugins/moveColumn/column.drag.plugin.js.map +1 -1
  109. package/dist/collection/plugins/sorting/sorting.plugin.js +2 -2
  110. package/dist/collection/plugins/sorting/sorting.plugin.js.map +1 -1
  111. package/dist/collection/plugins/sorting/sorting.sign.js.map +1 -1
  112. package/dist/collection/serve/controller.js +86 -18
  113. package/dist/collection/services/column.data.provider.js +1 -2
  114. package/dist/collection/services/column.data.provider.js.map +1 -1
  115. package/dist/collection/services/data.provider.js +1 -2
  116. package/dist/collection/services/data.provider.js.map +1 -1
  117. package/dist/collection/services/dimension.provider.js +3 -5
  118. package/dist/collection/services/dimension.provider.js.map +1 -1
  119. package/dist/collection/services/selection.store.connector.js +1 -2
  120. package/dist/collection/services/selection.store.connector.js.map +1 -1
  121. package/dist/collection/services/viewport.provider.js +1 -2
  122. package/dist/collection/services/viewport.provider.js.map +1 -1
  123. package/dist/collection/store/dataSource/data.proxy.js.map +1 -1
  124. package/dist/collection/store/dataSource/data.store.js +1 -1
  125. package/dist/collection/store/dataSource/data.store.js.map +1 -1
  126. package/dist/collection/store/dataSource/trimmed.plugin.js.map +1 -1
  127. package/dist/collection/store/dimension/dimension.helpers.js.map +1 -1
  128. package/dist/collection/store/dimension/dimension.store.js +1 -1
  129. package/dist/collection/store/dimension/dimension.store.js.map +1 -1
  130. package/dist/collection/store/{storeTypes.js → index.js} +5 -1
  131. package/dist/collection/store/index.js.map +1 -0
  132. package/dist/collection/store/selection/index.js +0 -1
  133. package/dist/collection/store/selection/index.js.map +1 -1
  134. package/dist/collection/store/selection/selection.helpers.js.map +1 -1
  135. package/dist/collection/store/selection/selection.store.js +1 -1
  136. package/dist/collection/store/selection/selection.store.js.map +1 -1
  137. package/dist/collection/store/vp/index.js.map +1 -0
  138. package/dist/collection/store/vp/viewport.helpers.js.map +1 -0
  139. package/dist/collection/store/{viewport → vp}/viewport.store.js +4 -7
  140. package/dist/collection/store/vp/viewport.store.js.map +1 -0
  141. package/dist/collection/types/index.js +11 -0
  142. package/dist/collection/types/index.js.map +1 -0
  143. package/dist/collection/types/interfaces.js +4 -0
  144. package/dist/collection/types/interfaces.js.map +1 -1
  145. package/dist/collection/types/viewport.interfaces.js.map +1 -1
  146. package/dist/collection/utils/events.js +11 -1
  147. package/dist/collection/utils/events.js.map +1 -1
  148. package/dist/collection/utils/index.js +0 -1
  149. package/dist/collection/utils/index.js.map +1 -1
  150. package/dist/collection/utils/row-header-utils.js +2 -2
  151. package/dist/collection/utils/row-header-utils.js.map +1 -1
  152. package/dist/collection/utils/store.utils.js.map +1 -1
  153. package/dist/esm/app-globals-ef1fca59.js.map +1 -1
  154. package/dist/esm/base.plugin-d0e589d8.js +213 -0
  155. package/dist/esm/base.plugin-d0e589d8.js.map +1 -0
  156. package/dist/esm/{column.service-f4922a8d.js → column.service-a826bbd6.js} +27 -11
  157. package/dist/esm/column.service-a826bbd6.js.map +1 -0
  158. package/dist/esm/dimension.helpers-a3065cb1.js.map +1 -1
  159. package/dist/esm/events-77b43b40.js +48 -0
  160. package/dist/esm/events-77b43b40.js.map +1 -0
  161. package/dist/esm/filter.button-46ce4f80.js.map +1 -1
  162. package/dist/esm/{header-cell-renderer-ac962570.js → header-cell-renderer-19738045.js} +2 -2
  163. package/dist/esm/{header-cell-renderer-ac962570.js.map → header-cell-renderer-19738045.js.map} +1 -1
  164. package/dist/esm/{index-98fd0168.js → index-5a722722.js} +3 -4
  165. package/dist/esm/index-5a722722.js.map +1 -0
  166. package/dist/esm/index.js +4 -4
  167. package/dist/esm/{key.utils-2836e8ae.js → key.utils-7c5d91dd.js} +2 -2
  168. package/dist/esm/{key.utils-2836e8ae.js.map → key.utils-7c5d91dd.js.map} +1 -1
  169. package/dist/esm/revo-grid.entry.js +42 -132
  170. package/dist/esm/revo-grid.entry.js.map +1 -1
  171. package/dist/esm/revogr-attribution_6.entry.js +187 -136
  172. package/dist/esm/revogr-attribution_6.entry.js.map +1 -1
  173. package/dist/esm/revogr-clipboard_3.entry.js +2 -2
  174. package/dist/esm/revogr-clipboard_3.entry.js.map +1 -1
  175. package/dist/esm/revogr-data_4.entry.js +9 -9
  176. package/dist/esm/revogr-data_4.entry.js.map +1 -1
  177. package/dist/esm/revogr-filter-panel.entry.js.map +1 -1
  178. package/dist/esm/{selection.store-2577ddf9.js → selection.helpers-883ce6bc.js} +77 -75
  179. package/dist/esm/selection.helpers-883ce6bc.js.map +1 -0
  180. package/dist/esm/{throttle-cfd527d6.js → throttle-eeca0062.js} +2 -2
  181. package/dist/esm/{throttle-cfd527d6.js.map → throttle-eeca0062.js.map} +1 -1
  182. package/dist/esm/{viewport.helpers-6591d423.js → viewport.store-d9e291c5.js} +187 -3
  183. package/dist/esm/viewport.store-d9e291c5.js.map +1 -0
  184. package/dist/revo-grid/app-globals-ef1fca59.js.map +1 -1
  185. package/dist/revo-grid/base.plugin-d0e589d8.js +5 -0
  186. package/dist/revo-grid/base.plugin-d0e589d8.js.map +1 -0
  187. package/dist/revo-grid/column.service-a826bbd6.js +5 -0
  188. package/dist/revo-grid/column.service-a826bbd6.js.map +1 -0
  189. package/dist/revo-grid/dimension.helpers-a3065cb1.js.map +1 -1
  190. package/dist/revo-grid/events-77b43b40.js +5 -0
  191. package/dist/revo-grid/events-77b43b40.js.map +1 -0
  192. package/dist/revo-grid/filter.button-46ce4f80.js.map +1 -1
  193. package/dist/revo-grid/{header-cell-renderer-ac962570.js → header-cell-renderer-19738045.js} +2 -2
  194. package/dist/revo-grid/{header-cell-renderer-ac962570.js.map → header-cell-renderer-19738045.js.map} +1 -1
  195. package/dist/revo-grid/index-5a722722.js +5 -0
  196. package/dist/{esm/index-98fd0168.js.map → revo-grid/index-5a722722.js.map} +1 -1
  197. package/dist/revo-grid/index.esm.js +1 -1
  198. package/dist/revo-grid/{key.utils-2836e8ae.js → key.utils-7c5d91dd.js} +2 -2
  199. package/dist/revo-grid/key.utils-7c5d91dd.js.map +1 -0
  200. package/dist/revo-grid/revo-grid.entry.js +1 -1
  201. package/dist/revo-grid/revo-grid.entry.js.map +1 -1
  202. package/dist/revo-grid/revogr-attribution_6.entry.js +1 -1
  203. package/dist/revo-grid/revogr-attribution_6.entry.js.map +1 -1
  204. package/dist/revo-grid/revogr-clipboard_3.entry.js +1 -1
  205. package/dist/revo-grid/revogr-clipboard_3.entry.js.map +1 -1
  206. package/dist/revo-grid/revogr-data_4.entry.js +1 -1
  207. package/dist/revo-grid/revogr-data_4.entry.js.map +1 -1
  208. package/dist/revo-grid/revogr-filter-panel.entry.js.map +1 -1
  209. package/dist/revo-grid/selection.helpers-883ce6bc.js +5 -0
  210. package/dist/revo-grid/selection.helpers-883ce6bc.js.map +1 -0
  211. package/dist/revo-grid/{throttle-cfd527d6.js → throttle-eeca0062.js} +2 -2
  212. package/dist/revo-grid/viewport.store-d9e291c5.js +5 -0
  213. package/dist/revo-grid/viewport.store-d9e291c5.js.map +1 -0
  214. package/dist/types/components/clipboard/revogr-clipboard.d.ts +1 -1
  215. package/dist/types/components/data/cell-renderer.d.ts +1 -1
  216. package/dist/types/components/data/column.service.d.ts +5 -5
  217. package/dist/types/components/data/revogr-data.d.ts +4 -4
  218. package/dist/types/components/data/row-highlight.plugin.d.ts +1 -1
  219. package/dist/types/components/editors/edit.utils.d.ts +1 -1
  220. package/dist/types/components/editors/revogr-edit.d.ts +2 -2
  221. package/dist/types/components/editors/text-editor.d.ts +2 -2
  222. package/dist/types/components/header/header-cell-renderer.d.ts +1 -1
  223. package/dist/types/components/header/header-renderer.d.ts +2 -2
  224. package/dist/types/components/header/revogr-header.d.ts +4 -4
  225. package/dist/types/components/order/order-renderer.d.ts +2 -2
  226. package/dist/types/components/order/order-row.service.d.ts +1 -2
  227. package/dist/types/components/order/revogr-order-editor.d.ts +7 -4
  228. package/dist/types/components/overlay/autofill.service.d.ts +11 -10
  229. package/dist/types/components/overlay/keyboard.service.d.ts +4 -5
  230. package/dist/types/components/overlay/revogr-overlay-selection.d.ts +42 -19
  231. package/dist/types/components/overlay/selection.utils.d.ts +13 -6
  232. package/dist/types/components/revoGrid/grid.helpers.d.ts +1 -1
  233. package/dist/types/components/revoGrid/revo-grid.d.ts +10 -7
  234. package/dist/types/components/revoGrid/viewport.helpers.d.ts +14 -5
  235. package/dist/types/components/revoGrid/viewport.scrolling.service.d.ts +1 -3
  236. package/dist/types/components/revoGrid/viewport.service.d.ts +1 -4
  237. package/dist/types/components/rowHeaders/revogr-row-headers.d.ts +1 -2
  238. package/dist/types/components/rowHeaders/row-header-render.d.ts +1 -1
  239. package/dist/types/components/scroll/revogr-viewport-scroll.d.ts +2 -2
  240. package/dist/types/components/scrollable/revogr-scroll-virtual.d.ts +2 -2
  241. package/dist/types/components/selectionFocus/revogr-focus.d.ts +3 -5
  242. package/dist/types/components/selectionTempRange/revogr-temp-range.d.ts +2 -2
  243. package/dist/types/components/vnode/vnode.utils.d.ts +1 -1
  244. package/dist/types/components.d.ts +30 -16
  245. package/dist/types/index.d.ts +2 -12
  246. package/dist/types/plugins/export/export.plugin.d.ts +1 -1
  247. package/dist/types/plugins/export/types.d.ts +1 -1
  248. package/dist/types/plugins/filter/filter.button.d.ts +1 -1
  249. package/dist/types/plugins/filter/filter.plugin.d.ts +2 -2
  250. package/dist/types/plugins/filter/filter.pop.d.ts +1 -1
  251. package/dist/types/plugins/groupingColumn/columnGroupsRenderer.d.ts +3 -4
  252. package/dist/types/plugins/groupingColumn/grouping.col.plugin.d.ts +3 -3
  253. package/dist/types/plugins/groupingColumn/headerGroupRenderer.d.ts +2 -2
  254. package/dist/types/plugins/groupingRow/grouping.row.expand.service.d.ts +1 -1
  255. package/dist/types/plugins/groupingRow/grouping.row.plugin.d.ts +2 -2
  256. package/dist/types/plugins/groupingRow/grouping.row.renderer.d.ts +1 -1
  257. package/dist/types/plugins/groupingRow/grouping.row.types.d.ts +1 -1
  258. package/dist/types/plugins/groupingRow/grouping.service.d.ts +1 -1
  259. package/dist/types/plugins/groupingRow/grouping.trimmed.service.d.ts +1 -1
  260. package/dist/types/plugins/moveColumn/column.drag.plugin.d.ts +1 -3
  261. package/dist/types/plugins/sorting/sorting.plugin.d.ts +1 -3
  262. package/dist/types/plugins/sorting/sorting.sign.d.ts +1 -1
  263. package/dist/types/services/column.data.provider.d.ts +2 -3
  264. package/dist/types/services/data.provider.d.ts +2 -5
  265. package/dist/types/services/dimension.provider.d.ts +2 -4
  266. package/dist/types/services/selection.store.connector.d.ts +2 -3
  267. package/dist/types/services/viewport.provider.d.ts +3 -3
  268. package/dist/types/store/dataSource/data.proxy.d.ts +2 -2
  269. package/dist/types/store/dataSource/data.store.d.ts +3 -3
  270. package/dist/types/store/dataSource/trimmed.plugin.d.ts +1 -1
  271. package/dist/types/store/dimension/dimension.helpers.d.ts +1 -1
  272. package/dist/types/store/dimension/dimension.store.d.ts +4 -5
  273. package/dist/types/store/{storeTypes.d.ts → index.d.ts} +5 -1
  274. package/dist/types/store/selection/index.d.ts +0 -1
  275. package/dist/types/store/selection/selection.helpers.d.ts +1 -1
  276. package/dist/types/store/selection/selection.store.d.ts +2 -2
  277. package/dist/types/store/vp/index.d.ts +7 -0
  278. package/dist/types/store/{viewport → vp}/viewport.helpers.d.ts +1 -1
  279. package/dist/types/store/{viewport → vp}/viewport.store.d.ts +3 -7
  280. package/dist/types/types/index.d.ts +7 -0
  281. package/dist/types/types/interfaces.d.ts +444 -23
  282. package/dist/types/types/viewport.interfaces.d.ts +5 -8
  283. package/dist/types/utils/events.d.ts +4 -1
  284. package/dist/types/utils/index.d.ts +0 -1
  285. package/dist/types/utils/row-header-utils.d.ts +1 -1
  286. package/dist/types/utils/store.utils.d.ts +1 -1
  287. package/hydrate/index.js +3224 -3126
  288. package/package.json +8 -9
  289. package/readme.md +8 -8
  290. package/standalone/_baseIteratee.js +1104 -13
  291. package/standalone/_baseIteratee.js.map +1 -1
  292. package/standalone/_nodeUtil.js +260 -0
  293. package/standalone/_nodeUtil.js.map +1 -0
  294. package/standalone/column.service.js +78 -74
  295. package/standalone/column.service.js.map +1 -1
  296. package/standalone/data.store.js +2 -4
  297. package/standalone/data.store.js.map +1 -1
  298. package/standalone/debounce.js +2 -2
  299. package/standalone/dimension.helpers.js +1 -1
  300. package/standalone/dimension.helpers.js.map +1 -1
  301. package/standalone/filter.button.js.map +1 -1
  302. package/standalone/identity.js +42 -2
  303. package/standalone/identity.js.map +1 -1
  304. package/standalone/index.js +5 -7
  305. package/standalone/index.js.map +1 -1
  306. package/standalone/index2.js +2 -3
  307. package/standalone/index2.js.map +1 -1
  308. package/standalone/isObjectLike.js +1 -34
  309. package/standalone/isObjectLike.js.map +1 -1
  310. package/standalone/revo-grid.js +125 -106
  311. package/standalone/revo-grid.js.map +1 -1
  312. package/standalone/revogr-clipboard2.js.map +1 -1
  313. package/standalone/revogr-data2.js +3 -0
  314. package/standalone/revogr-data2.js.map +1 -1
  315. package/standalone/revogr-edit2.js +1 -1
  316. package/standalone/revogr-edit2.js.map +1 -1
  317. package/standalone/revogr-filter-panel.js.map +1 -1
  318. package/standalone/revogr-focus2.js +7 -3
  319. package/standalone/revogr-focus2.js.map +1 -1
  320. package/standalone/revogr-header2.js +5 -4
  321. package/standalone/revogr-header2.js.map +1 -1
  322. package/standalone/revogr-order-editor2.js +3 -0
  323. package/standalone/revogr-order-editor2.js.map +1 -1
  324. package/standalone/revogr-overlay-selection2.js +143 -143
  325. package/standalone/revogr-overlay-selection2.js.map +1 -1
  326. package/standalone/revogr-row-headers2.js +7 -7
  327. package/standalone/revogr-row-headers2.js.map +1 -1
  328. package/standalone/revogr-scroll-virtual2.js +1 -1
  329. package/standalone/revogr-scroll-virtual2.js.map +1 -1
  330. package/standalone/revogr-temp-range2.js +1 -1
  331. package/standalone/revogr-temp-range2.js.map +1 -1
  332. package/standalone/revogr-viewport-scroll2.js +23 -9
  333. package/standalone/revogr-viewport-scroll2.js.map +1 -1
  334. package/standalone/selection.utils.js +76 -9
  335. package/standalone/selection.utils.js.map +1 -1
  336. package/standalone/throttle.js +1 -1
  337. package/standalone/toNumber.js +35 -2
  338. package/standalone/toNumber.js.map +1 -1
  339. package/dist/cjs/column.service-e83d9809.js.map +0 -1
  340. package/dist/cjs/events-7ccd6894.js +0 -233
  341. package/dist/cjs/events-7ccd6894.js.map +0 -1
  342. package/dist/cjs/index-73c149e3.js.map +0 -1
  343. package/dist/cjs/selection.store-2e110a67.js.map +0 -1
  344. package/dist/cjs/storeTypes-b3f924b2.js +0 -106
  345. package/dist/cjs/storeTypes-b3f924b2.js.map +0 -1
  346. package/dist/cjs/viewport.helpers-6670177c.js.map +0 -1
  347. package/dist/collection/store/selection/selection.store.service.js +0 -39
  348. package/dist/collection/store/selection/selection.store.service.js.map +0 -1
  349. package/dist/collection/store/storeTypes.js.map +0 -1
  350. package/dist/collection/store/viewport/index.js.map +0 -1
  351. package/dist/collection/store/viewport/viewport.helpers.js.map +0 -1
  352. package/dist/collection/store/viewport/viewport.store.js.map +0 -1
  353. package/dist/esm/column.service-f4922a8d.js.map +0 -1
  354. package/dist/esm/events-3dd8ee7c.js +0 -228
  355. package/dist/esm/events-3dd8ee7c.js.map +0 -1
  356. package/dist/esm/selection.store-2577ddf9.js.map +0 -1
  357. package/dist/esm/storeTypes-f2647985.js +0 -101
  358. package/dist/esm/storeTypes-f2647985.js.map +0 -1
  359. package/dist/esm/viewport.helpers-6591d423.js.map +0 -1
  360. package/dist/revo-grid/column.service-f4922a8d.js +0 -5
  361. package/dist/revo-grid/column.service-f4922a8d.js.map +0 -1
  362. package/dist/revo-grid/events-3dd8ee7c.js +0 -5
  363. package/dist/revo-grid/events-3dd8ee7c.js.map +0 -1
  364. package/dist/revo-grid/index-98fd0168.js +0 -5
  365. package/dist/revo-grid/index-98fd0168.js.map +0 -1
  366. package/dist/revo-grid/key.utils-2836e8ae.js.map +0 -1
  367. package/dist/revo-grid/selection.store-2577ddf9.js +0 -5
  368. package/dist/revo-grid/selection.store-2577ddf9.js.map +0 -1
  369. package/dist/revo-grid/storeTypes-f2647985.js +0 -5
  370. package/dist/revo-grid/storeTypes-f2647985.js.map +0 -1
  371. package/dist/revo-grid/viewport.helpers-6591d423.js +0 -5
  372. package/dist/revo-grid/viewport.helpers-6591d423.js.map +0 -1
  373. package/dist/types/store/selection/selection.store.service.d.ts +0 -17
  374. package/dist/types/store/viewport/index.d.ts +0 -2
  375. package/standalone/_stringToPath.js +0 -1389
  376. package/standalone/_stringToPath.js.map +0 -1
  377. /package/dist/collection/store/{viewport → vp}/index.js +0 -0
  378. /package/dist/collection/store/{viewport → vp}/viewport.helpers.js +0 -0
  379. /package/dist/revo-grid/{throttle-cfd527d6.js.map → throttle-eeca0062.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["defaultState","range","tempRange","tempRangeType","focus","edit","lastCell","SelectionStore","constructor","this","unsubscribe","store","createStore","on","key","newVal","set","onChange","propName","cb","push","clearFocus","setStore","setFocus","end","getRange","setTempArea","area","type","clearTemp","setRangeArea","setRange","start","setLastCell","setEdit","val","get","x","y","dispose","forEach","f","EMPTY_INDEX","SelectionStoreConnector","dirty","stores","columnStores","rowStores","storesByType","storesXToType","storesYToType","sections","focusedStore","focused","_a","entity","cell","position","parseInt","selectedRange","registerSection","e","length","indexOf","beforeUpdate","registerColumn","isHiddenStore","registerRow","register","c","_b","destroy","Object","keys","setEditByCell","storePos","editCell","focusByCell","currentStorePointer","s","nextItem","nextCell","nextStore","i","getXStores","getYStores","nextLastCell","item","assign","cropCellToMax","clearAll","selectAll","pos","types","t","newCell","Math","min","x1","max","y1","isRangeSingleCell","a"],"sources":["src/store/selection/selection.store.ts","src/services/selection.store.connector.ts","src/store/selection/selection.helpers.ts"],"sourcesContent":["/**\n * Selection store\n */\n\nimport { createStore } from '@stencil/store';\nimport { setStore } from '../../utils/store.utils';\nimport { getRange } from '@store';\nimport { Observable } from '@type';\nimport { SelectionStoreState, Cell, TempRange, RangeArea } from '@type';\n\n\nfunction defaultState(): SelectionStoreState {\n return {\n range: null,\n tempRange: null,\n tempRangeType: null,\n focus: null,\n edit: null,\n lastCell: null,\n };\n}\n\nexport class SelectionStore {\n readonly store: Observable<SelectionStoreState>;\n private unsubscribe: { (): void }[] = [];\n constructor() {\n this.store = createStore(defaultState());\n this.store.on('set', (key, newVal) => {\n if (key === 'tempRange' && !newVal) {\n this.store.set('tempRangeType', null);\n }\n });\n }\n\n onChange<Key extends keyof SelectionStoreState>(propName: Key, cb: (newValue: SelectionStoreState[Key]) => void) {\n this.unsubscribe.push(this.store.onChange(propName, cb));\n }\n\n clearFocus() {\n setStore(this.store, { focus: null, range: null, edit: null, tempRange: null });\n }\n\n setFocus(focus: Cell, end?: Cell) {\n if (!end) {\n setStore(this.store, { focus });\n } else {\n setStore(this.store, {\n focus,\n range: getRange(focus, end),\n edit: null,\n tempRange: null,\n });\n }\n }\n\n setTempArea(range: TempRange | null) {\n setStore(this.store, { tempRange: range?.area, tempRangeType: range?.type, edit: null });\n }\n\n clearTemp() {\n setStore(this.store, { tempRange: null });\n }\n\n /** Can be applied from selection change or from simple keyboard change clicks */\n setRangeArea(range: RangeArea) {\n setStore(this.store, { range, edit: null, tempRange: null });\n }\n setRange(start: Cell, end: Cell) {\n this.setRangeArea(getRange(start, end));\n }\n\n setLastCell(lastCell: Cell) {\n setStore(this.store, { lastCell });\n }\n\n setEdit(val: string | boolean) {\n const focus = this.store.get('focus');\n if (focus && typeof val === 'string') {\n setStore(this.store, {\n edit: { x: focus.x, y: focus.y, val },\n });\n return;\n }\n setStore(this.store, { edit: null });\n }\n\n dispose() {\n this.unsubscribe.forEach(f => f());\n this.store.dispose();\n }\n}\n","import { cropCellToMax, isHiddenStore, nextCell, SelectionStore } from '@store';\nimport type { MultiDimensionType, DimensionCols, DimensionRows, Cell, EditCellStore, RangeArea } from '@type';\n\ntype StoreByDimension = Record<number, SelectionStore>;\ntype FocusedStore = {\n entity: SelectionStore;\n cell: Cell;\n position: Cell;\n};\n\ntype StoresMapping<T> = { [xOrY: number]: Partial<T> };\n\nexport const EMPTY_INDEX = -1;\n\nexport default class SelectionStoreConnector {\n // dirty flag required to cleanup whole store in case visibility of panels changed\n private dirty = false;\n readonly stores: { [y: number]: { [x: number]: SelectionStore } } = {};\n\n readonly columnStores: StoreByDimension = {};\n readonly rowStores: { [y: number]: SelectionStore } = {};\n\n /**\n * Helpers for data conversion\n */\n readonly storesByType: Partial<Record<MultiDimensionType, number>> = {};\n readonly storesXToType: StoresMapping<DimensionCols> = {};\n readonly storesYToType: StoresMapping<DimensionRows> = {};\n\n get focusedStore(): FocusedStore | null {\n for (let y in this.stores) {\n for (let x in this.stores[y]) {\n const focused = this.stores[y][x]?.store.get('focus');\n if (focused) {\n return {\n entity: this.stores[y][x],\n cell: focused,\n position: {\n x: parseInt(x, 10),\n y: parseInt(y, 10),\n },\n };\n }\n }\n }\n return null;\n }\n\n get edit(): EditCellStore | undefined {\n return this.focusedStore?.entity.store.get('edit');\n }\n\n get focused(): Cell | undefined {\n return this.focusedStore?.entity.store.get('focus');\n }\n\n get selectedRange(): RangeArea | undefined {\n return this.focusedStore?.entity.store.get('range');\n }\n\n private readonly sections: Element[] = [];\n\n registerSection(e?: Element) {\n if (!e) {\n this.sections.length = 0;\n // some elements removed, rebuild stores\n this.dirty = true;\n return;\n }\n if (this.sections.indexOf(e) === -1) {\n this.sections.push(e);\n }\n }\n\n // check if require to cleanup all stores\n beforeUpdate() {\n if (this.dirty) {\n for (let y in this.stores) {\n for (let x in this.stores[y]) {\n this.stores[y][x].dispose();\n }\n }\n this.dirty = false;\n }\n }\n\n registerColumn(x: number, type: DimensionCols): SelectionStore {\n\n // if hidden just create store but no operations needed\n if (isHiddenStore(x)) {\n return new SelectionStore();\n }\n if (this.columnStores[x]) {\n return this.columnStores[x];\n }\n this.columnStores[x] = new SelectionStore();\n // build cross linking type to position\n this.storesByType[type] = x;\n this.storesXToType[x] = type;\n return this.columnStores[x];\n }\n\n registerRow(y: number, type: DimensionRows): SelectionStore {\n // if hidden just create store\n if (isHiddenStore(y)) {\n return new SelectionStore();\n }\n if (this.rowStores[y]) {\n return this.rowStores[y];\n }\n this.rowStores[y] = new SelectionStore();\n // build cross linking type to position\n this.storesByType[type] = y;\n this.storesYToType[y] = type;\n return this.rowStores[y];\n }\n\n /**\n * Cross store proxy, based on multiple dimensions\n */\n register({ x, y }: Cell): SelectionStore {\n // if hidden just create store\n if (isHiddenStore(x) || isHiddenStore(y)) {\n return new SelectionStore();\n }\n if (!this.stores[y]) {\n this.stores[y] = {};\n }\n if (this.stores[y][x]) {\n // Store already registered. Do not register twice\n return this.stores[y][x];\n }\n this.stores[y][x] = new SelectionStore();\n // proxy update, column store trigger only range area\n this.stores[y][x]?.onChange('range', c => {\n this.columnStores[x].setRangeArea(c);\n this.rowStores[y].setRangeArea(c);\n });\n // clean up on remove\n this.stores[y][x]?.store.on('dispose', () => this.destroy(x, y));\n return this.stores[y][x];\n }\n\n private destroy(x: number, y: number) {\n this.columnStores[x]?.dispose();\n this.rowStores[y]?.dispose();\n\n delete this.rowStores[y];\n delete this.columnStores[x];\n // clear x cross link\n if (this.storesXToType[x]) {\n const type = this.storesXToType[x];\n delete this.storesXToType[x];\n delete this.storesByType[type];\n }\n // clear y cross link\n if (this.storesYToType[y]) {\n const type = this.storesYToType[y];\n delete this.storesYToType[y];\n delete this.storesByType[type];\n }\n if (this.stores[y]) {\n delete this.stores[y][x];\n }\n // clear empty rows\n if (!Object.keys(this.stores[y] || {}).length) {\n delete this.stores[y];\n }\n }\n\n setEditByCell<T extends Cell>(storePos: T, editCell: T) {\n this.focusByCell(storePos, editCell, editCell);\n this.setEdit('');\n }\n\n focusByCell<T extends Cell>(storePos: T, start: T, end: T) {\n const store = this.stores[storePos.y][storePos.x];\n this.focus(store, { focus: start, end });\n }\n\n focus(store: SelectionStore, { focus, end }: { focus: Cell; end: Cell }) {\n let currentStorePointer: Cell;\n // clear all stores focus leave only active one\n for (let y in this.stores) {\n for (let x in this.stores[y]) {\n const s = this.stores[y][x];\n // clear other stores, only one area can be selected\n if (s !== store) {\n s.clearFocus();\n } else {\n currentStorePointer = { x: parseInt(x, 10), y: parseInt(y, 10) };\n }\n }\n }\n if (!currentStorePointer) {\n return null;\n }\n\n // check is focus in next store\n const lastCell = store.store.get('lastCell');\n // item in new store\n const nextItem: Partial<Cell> | null = nextCell(focus, lastCell);\n\n let nextStore;\n if (nextItem) {\n for (let i in nextItem) {\n let type: keyof Cell = i as keyof Cell;\n let stores;\n switch (type) {\n case 'x':\n stores = this.getXStores(currentStorePointer.y);\n break;\n case 'y':\n stores = this.getYStores(currentStorePointer.x);\n break;\n }\n if (nextItem[type] >= 0) {\n nextStore = stores[++currentStorePointer[type]];\n } else {\n nextStore = stores[--currentStorePointer[type]];\n const nextLastCell = nextStore?.store.get('lastCell');\n if (nextLastCell) {\n nextItem[type] = nextLastCell[type] + nextItem[type];\n }\n }\n }\n }\n // if next store present - update\n if (nextStore) {\n let item = { ...focus, ...nextItem };\n this.focus(nextStore, { focus: item, end: item });\n return null;\n }\n\n focus = cropCellToMax(focus, lastCell);\n end = cropCellToMax(end, lastCell);\n\n store.setFocus(focus, end);\n return focus;\n }\n\n clearAll() {\n for (let y in this.stores) {\n for (let x in this.stores[y]) {\n this.stores[y][x]?.clearFocus();\n }\n }\n }\n\n setEdit(val: string | boolean) {\n if (!this.focusedStore) {\n return;\n }\n this.focusedStore.entity.setEdit(val);\n }\n\n /**\n * Select all cells across all stores\n */\n selectAll() {\n for (let y in this.stores) {\n for (let x in this.stores[y]) {\n const store = this.stores[y][x];\n if (!store) {\n continue;\n }\n const lastCell = store.store.get('lastCell');\n store.setRange({ x: 0, y: 0 }, { x: lastCell.x - 1, y: lastCell.y - 1 });\n }\n }\n }\n\n private getXStores(y: number) {\n return this.stores[y];\n }\n\n private getYStores(x: number) {\n const stores: { [p: number]: SelectionStore } = {};\n for (let i in this.stores) {\n stores[i] = this.stores[i][x];\n }\n return stores;\n }\n}\n","import { EMPTY_INDEX } from '../../services/selection.store.connector';\nimport { Cell, RangeArea } from '@type';\n\nexport function isHiddenStore(pos: number) {\n return pos === EMPTY_INDEX;\n}\n\nexport function nextCell(cell: Cell, lastCell: Cell): Partial<Cell> | null {\n const nextItem: Partial<Cell> = {};\n let types: (keyof Cell)[] = ['x', 'y'];\n\n // previous item check\n for (let t of types) {\n if (cell[t] < 0) {\n nextItem[t] = cell[t];\n return nextItem;\n }\n }\n // next item check\n for (let t of types) {\n if (cell[t] >= lastCell[t]) {\n nextItem[t] = cell[t] - lastCell[t];\n return nextItem;\n }\n }\n return null;\n}\n\nexport function cropCellToMax(cell: Cell, lastCell: Cell): Cell {\n const newCell: Cell = { ...cell };\n let types: (keyof Cell)[] = ['x', 'y'];\n // previous item check\n for (let t of types) {\n if (cell[t] < 0) {\n newCell[t] = 0;\n }\n }\n // next item check\n for (let t of types) {\n if (cell[t] >= lastCell[t]) {\n newCell[t] = lastCell[t] - 1;\n }\n }\n return newCell;\n}\n\nexport function getRange(start?: Cell, end?: Cell): RangeArea | null {\n return start && end\n ? {\n x: Math.min(start.x, end.x),\n y: Math.min(start.y, end.y),\n x1: Math.max(start.x, end.x),\n y1: Math.max(start.y, end.y),\n }\n : null;\n}\n\nexport function isRangeSingleCell(a: RangeArea): boolean {\n return a.x === a.x1 && a.y === a.y1;\n}\n"],"mappings":";;;sHAWA,SAASA,IACP,MAAO,CACLC,MAAO,KACPC,UAAW,KACXC,cAAe,KACfC,MAAO,KACPC,KAAM,KACNC,SAAU,KAEd,C,MAEaC,EAGX,WAAAC,GADQC,KAAAC,YAA8B,GAEpCD,KAAKE,MAAQC,EAAYZ,KACzBS,KAAKE,MAAME,GAAG,OAAO,CAACC,EAAKC,KACzB,GAAID,IAAQ,cAAgBC,EAAQ,CAClCN,KAAKE,MAAMK,IAAI,gBAAiB,K,KAKtC,QAAAC,CAAgDC,EAAeC,GAC7DV,KAAKC,YAAYU,KAAKX,KAAKE,MAAMM,SAASC,EAAUC,G,CAGtD,UAAAE,GACEC,EAASb,KAAKE,MAAO,CAAEP,MAAO,KAAMH,MAAO,KAAMI,KAAM,KAAMH,UAAW,M,CAG1E,QAAAqB,CAASnB,EAAaoB,GACpB,IAAKA,EAAK,CACRF,EAASb,KAAKE,MAAO,CAAEP,S,KAClB,CACLkB,EAASb,KAAKE,MAAO,CACnBP,QACAH,MAAOwB,EAASrB,EAAOoB,GACvBnB,KAAM,KACNH,UAAW,M,EAKjB,WAAAwB,CAAYzB,GACVqB,EAASb,KAAKE,MAAO,CAAET,UAAWD,IAAK,MAALA,SAAK,SAALA,EAAO0B,KAAMxB,cAAeF,IAAK,MAALA,SAAK,SAALA,EAAO2B,KAAMvB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5B,OAAOA,IAAQlD,CACjB,C,SAEgBuC,EAASzB,EAAYlD,GACnC,MAAM0E,EAA0B,GAChC,IAAIa,EAAwB,CAAC,IAAK,KAGlC,IAAK,IAAIC,KAAKD,EAAO,CACnB,GAAIrC,EAAKsC,GAAK,EAAG,CACfd,EAASc,GAAKtC,EAAKsC,GACnB,OAAOd,C,EAIX,IAAK,IAAIc,KAAKD,EAAO,CACnB,GAAIrC,EAAKsC,IAAMxF,EAASwF,GAAI,CAC1Bd,EAASc,GAAKtC,EAAKsC,GAAKxF,EAASwF,GACjC,OAAOd,C,EAGX,OAAO,IACT,C,SAEgBS,EAAcjC,EAAYlD,GACxC,MAAMyF,EAAOvB,OAAAgB,OAAA,GAAchC,GAC3B,IAAIqC,EAAwB,CAAC,IAAK,KAElC,IAAK,IAAIC,KAAKD,EAAO,CACnB,GAAIrC,EAAKsC,GAAK,EAAG,CACfC,EAAQD,GAAK,C,EAIjB,IAAK,IAAIA,KAAKD,EAAO,CACnB,GAAIrC,EAAKsC,IAAMxF,EAASwF,GAAI,CAC1BC,EAAQD,GAAKxF,EAASwF,GAAK,C,EAG/B,OAAOC,CACT,C,SAEgBtE,EAASO,EAAcR,GACrC,OAAOQ,GAASR,EACZ,CACEa,EAAG2D,KAAKC,IAAIjE,EAAMK,EAAGb,EAAIa,GACzBC,EAAG0D,KAAKC,IAAIjE,EAAMM,EAAGd,EAAIc,GACzB4D,GAAIF,KAAKG,IAAInE,EAAMK,EAAGb,EAAIa,GAC1B+D,GAAIJ,KAAKG,IAAInE,EAAMM,EAAGd,EAAIc,IAE5B,IACN,C,SAEgB+D,EAAkBC,GAChC,OAAOA,EAAEjE,IAAMiE,EAAEJ,IAAMI,EAAEhE,IAAMgE,EAAEF,EACnC,Q","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
- import{s as t}from"./index-98fd0168.js";import{d as i}from"./debounce-7781346d.js";import{i as r}from"./toNumber-8de324a7.js";const s={contentSize:0,clientSize:0,virtualSize:0,maxSize:0};const e=-1;function n(t,i,r=0){return t+(r?i-r:0)}class o{constructor(t){this.cfg=t;this.preventArtificialScroll={rgRow:null,rgCol:null};this.previousScroll={rgRow:e,rgCol:e};this.params={rgRow:Object.assign({},s),rgCol:Object.assign({},s)}}setParams(t,i){const r=n(t.contentSize,t.clientSize,t.virtualSize);this.params[i]=Object.assign(Object.assign({},t),{maxSize:r-t.clientSize,virtualContentSize:r})}async setScroll(t){this.cancelScroll(t.dimension);const i=new Promise(((i,r)=>{if(this.cfg.skipAnimationFrame){return i()}const s=window.requestAnimationFrame((()=>{i()}));this.preventArtificialScroll[t.dimension]=r.bind(null,s)}));try{await i;const r=this.getParams(t.dimension);t.coordinate=Math.ceil(t.coordinate);this.previousScroll[t.dimension]=this.wrapCoordinate(t.coordinate,r);this.preventArtificialScroll[t.dimension]=null;this.cfg.applyScroll(Object.assign(Object.assign({},t),{coordinate:r.virtualSize?this.convert(t.coordinate,r,false):t.coordinate}))}catch(t){window.cancelAnimationFrame(t)}}scroll(t,i,r=false,s,n=false){this.cancelScroll(i);if(!r&&this.previousScroll[i]===t){this.previousScroll[i]=e;return}const o=this.getParams(i);this.cfg.runScroll({dimension:i,coordinate:o.virtualSize?this.convert(t,o):t,delta:s,outside:n})}getParams(t){return this.params[t]}wrapCoordinate(t,i){if(t<0){return e}if(t>i.maxSize){return i.maxSize}return t}cancelScroll(t){var i,r;(r=(i=this.preventArtificialScroll)[t])===null||r===void 0?void 0:r.call(i);this.preventArtificialScroll[t]=null}convert(i,r,s=true){const e=r.clientSize;const n=[0,r.virtualContentSize-e];const o=[0,r.contentSize-r.virtualSize];if(s){return t(i,n,o)}return t(i,o,n)}}class a{constructor(t=10){this.scrollThrottling=t;this.mouseWheelScrollTimestamp={rgCol:0,rgRow:0};this.lastKnownScrollCoordinate={rgCol:0,rgRow:0}}setCoordinate(t){this.lastKnownScrollCoordinate[t.dimension]=t.coordinate}latestScrollUpdate(t){this.mouseWheelScrollTimestamp[t]=(new Date).getTime()}isReady(t,i){const r=(new Date).getTime()-this.mouseWheelScrollTimestamp[t];return r>this.scrollThrottling&&i!==this.lastKnownScrollCoordinate[t]}}var c=i,l=r;var h="Expected a function";function u(t,i,r){var s=true,e=true;if(typeof t!="function"){throw new TypeError(h)}if(l(r)){s="leading"in r?!!r.leading:s;e="trailing"in r?!!r.trailing:e}return c(t,i,{leading:s,maxWait:i,trailing:e})}var d=u;export{a as L,o as a,n as g,d as t};
5
- //# sourceMappingURL=throttle-cfd527d6.js.map
4
+ import{s as t}from"./index-5a722722.js";import{d as i}from"./debounce-7781346d.js";import{i as r}from"./toNumber-8de324a7.js";const s={contentSize:0,clientSize:0,virtualSize:0,maxSize:0};const e=-1;function n(t,i,r=0){return t+(r?i-r:0)}class o{constructor(t){this.cfg=t;this.preventArtificialScroll={rgRow:null,rgCol:null};this.previousScroll={rgRow:e,rgCol:e};this.params={rgRow:Object.assign({},s),rgCol:Object.assign({},s)}}setParams(t,i){const r=n(t.contentSize,t.clientSize,t.virtualSize);this.params[i]=Object.assign(Object.assign({},t),{maxSize:r-t.clientSize,virtualContentSize:r})}async setScroll(t){this.cancelScroll(t.dimension);const i=new Promise(((i,r)=>{if(this.cfg.skipAnimationFrame){return i()}const s=window.requestAnimationFrame((()=>{i()}));this.preventArtificialScroll[t.dimension]=r.bind(null,s)}));try{await i;const r=this.getParams(t.dimension);t.coordinate=Math.ceil(t.coordinate);this.previousScroll[t.dimension]=this.wrapCoordinate(t.coordinate,r);this.preventArtificialScroll[t.dimension]=null;this.cfg.applyScroll(Object.assign(Object.assign({},t),{coordinate:r.virtualSize?this.convert(t.coordinate,r,false):t.coordinate}))}catch(t){window.cancelAnimationFrame(t)}}scroll(t,i,r=false,s,n=false){this.cancelScroll(i);if(!r&&this.previousScroll[i]===t){this.previousScroll[i]=e;return}const o=this.getParams(i);this.cfg.runScroll({dimension:i,coordinate:o.virtualSize?this.convert(t,o):t,delta:s,outside:n})}getParams(t){return this.params[t]}wrapCoordinate(t,i){if(t<0){return e}if(t>i.maxSize){return i.maxSize}return t}cancelScroll(t){var i,r;(r=(i=this.preventArtificialScroll)[t])===null||r===void 0?void 0:r.call(i);this.preventArtificialScroll[t]=null}convert(i,r,s=true){const e=r.clientSize;const n=[0,r.virtualContentSize-e];const o=[0,r.contentSize-r.virtualSize];if(s){return t(i,n,o)}return t(i,o,n)}}class a{constructor(t=10){this.scrollThrottling=t;this.mouseWheelScrollTimestamp={rgCol:0,rgRow:0};this.lastKnownScrollCoordinate={rgCol:0,rgRow:0}}setCoordinate(t){this.lastKnownScrollCoordinate[t.dimension]=t.coordinate}latestScrollUpdate(t){this.mouseWheelScrollTimestamp[t]=(new Date).getTime()}isReady(t,i){const r=(new Date).getTime()-this.mouseWheelScrollTimestamp[t];return r>this.scrollThrottling&&i!==this.lastKnownScrollCoordinate[t]}}var c=i,l=r;var h="Expected a function";function u(t,i,r){var s=true,e=true;if(typeof t!="function"){throw new TypeError(h)}if(l(r)){s="leading"in r?!!r.leading:s;e="trailing"in r?!!r.trailing:e}return c(t,i,{leading:s,maxWait:i,trailing:e})}var d=u;export{a as L,o as a,n as g,d as t};
5
+ //# sourceMappingURL=throttle-eeca0062.js.map
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * Built by Revolist OU ❤️
3
+ */
4
+ import{i as t,k as e,l as s}from"./dimension.helpers-a3065cb1.js";function i(e,s,i,f,u){const l=t(u,e);const m=h(s);let d;if(m){let t=l.itemIndex-(m.itemIndex||0);if(t){d=a(Math.abs(t),Object.assign(Object.assign({positiveDirection:t>-1},u),s))}}const z=n(f,u.realSize,l);if(d){const t=o(l,i,z,d,u);if(t.length){r(d.items,t,d)}}if(!d){const t=c({firstItemStart:l.start,firstItemIndex:l.itemIndex,origSize:u.originItemSize,maxSize:z,maxCount:i,sizes:u.sizes});d={items:t,start:0,end:t.length-1}}return d}function n(t,e,s){return Math.min(t+(s.end-s.start),e)}function r(t,e,s){t.splice(s.end+1,0,...e);if(s.start>=s.end&&!(s.start===s.end&&s.start===0)){s.start+=e.length}s.end+=e.length}function o(t,e,s,i,n){const r=m(i);const o=c({sizes:n.sizes,firstItemStart:r.end,firstItemIndex:r.itemIndex+1,origSize:n.originItemSize,maxSize:s-(r.end-t.start),maxCount:e});return o}function c(t,e=0){const s=[];let i=t.firstItemIndex;let n=e;while(n<=t.maxSize&&i<t.maxCount){const e=f(i,t.sizes,t.origSize);s.push({start:t.firstItemStart+n,end:t.firstItemStart+n+e,itemIndex:i,size:e});n+=e;i++}return s}function a(t,e){const s=[...e.items];const i=s.length;let n={start:e.start,end:e.end};if(t>i){return null}if(e.positiveDirection){let r=m(e);let o=n.start;const c=o+t;for(;o<c;o++){const t=r.itemIndex+1;const c=f(t,e.sizes,e.originItemSize);if(r.end+c>e.realSize){break}let a=o%i;if(!s[a]){throw new Error("incorrect index")}s[a]=r={start:r.end,end:r.end+c,itemIndex:t,size:c};n.start++;n.end=a}}else{let r=h(e);const o=n.end;for(let c=0;c<t;c++){const t=r.itemIndex-1;const a=f(t,e.sizes,e.originItemSize);let u=o-c;u=(u<0?i+u:u)%i;if(!s[u]){throw new Error("incorrect index")}s[u]=r={start:r.start-a,end:r.start,itemIndex:t,size:a};n.start=u;n.end--}}const r={start:(n.start<0?i+n.start:n.start)%i,end:(n.end<0?i+n.end:n.end)%i};return Object.assign({items:s},r)}function f(t,e,s=0){if(e&&e[t]){return e[t]}return s}function u(t,e,s,i){if(!s||!i){return false}return t>=s.start&&t<=s.end||t>s.end&&i.end===e}function l(t,e,s,i){if(!s){return false}return e+t>(i===null||i===void 0?void 0:i.end)}function h(t){return t.items[t.start]}function m(t){return t.items[t.end]}function d(t,e,s,i){const n=[...t];const r=n.length;let o=i;let c=0;let a=e;if(!r){return[]}while(c<r){const t=n[a];t.start=o;t.size=s;t.end=t.start+s;o=t.end;a++;c++;if(a===r){a=0}}return n}function z(){return{items:[],start:0,end:0,virtualSize:0,realCount:0}}class b{get lastCoordinate(){return this.lastKnownScroll}set lastCoordinate(t){this.lastKnownScroll=t}constructor(t){this.type=t;this.lastKnownScroll=0;this.store=e(z());this.store.onChange("realCount",(()=>this.clearItems()));this.store.onChange("virtualSize",(()=>this.clearItems()))}setViewPortCoordinate(t,e){const s=this.store.get("virtualSize");if(!s){return}const n=1;const c=e.originItemSize*n;const a=c*2;const f=s+a;let d=0;if(e.realSize>s){d=e.realSize-s-c}let z=t;if(z<0){z=0}else if(z>d){z=d}this.lastCoordinate=z;z-=c;z=z<0?0:z<d?z:d;const b=this.getItems();const x=[...b.items];const I=h(b);const S=m(b);let j={};if(!u(z,e.realSize,I,S)){j=Object.assign(Object.assign({},j),i(z,b,this.store.get("realCount"),f,e));this.setViewport(Object.assign({},j))}else if(l(z,f,I,S)){const t=o(I,this.store.get("realCount"),f+z-I.start,b,{sizes:e.sizes,originItemSize:e.originItemSize});if(t.length){const e={start:this.store.get("start"),end:this.store.get("end")};r(x,t,e);j=Object.assign(Object.assign(Object.assign({},j),{items:[...x]}),e);this.setViewport(Object.assign({},j))}}}setViewPortDimensionSizes(t,e){let s=[...this.store.get("items")];const i=s.length;if(!i){return}let n=0;let r=0;let o=this.store.get("start");if(e){const t=this.getItems();const i=h(t);s=d(s,o,e,i.start)}while(r<i){const e=s[o];if(n){e.start+=n;e.end+=n}const c=t[e.itemIndex];if(c){const t=c-e.size;n+=t;e.size=c;e.end=e.start+c}o++;r++;if(o===i){o=0}}this.setViewport({items:[...s]})}setOriginalSizes(t){const e=this.store.get("items");const i=e.length;if(!i){return}s(this.store,{items:d(e,this.store.get("start"),t,this.lastCoordinate)})}getItems(){return{items:this.store.get("items"),start:this.store.get("start"),end:this.store.get("end")}}setViewport(t){s(this.store,t)}clearItems(){this.store.set("items",[])}}export{b as V,o as a,c as b,l as c,h as d,m as e,i as g,u as i,a as r,d as s,r as u};
5
+ //# sourceMappingURL=viewport.store-d9e291c5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getUpdatedItemsByPosition","pos","items","realCount","virtualSize","dimension","activeItem","getItemByPosition","firstItem","getFirstItem","toUpdate","changedOffsetStart","itemIndex","recombineByOffset","Math","abs","Object","assign","positiveDirection","maxSizeVirtualSize","getMaxVirtualSize","realSize","extra","addMissingItems","length","updateMissingAndRange","getItems","firstItemStart","start","firstItemIndex","origSize","originItemSize","maxSize","maxCount","sizes","end","min","missing","range","splice","existingCollection","lastItem","getLastItem","opt","currentSize","index","size","newSize","getItemSize","push","offset","data","newItems","itemsCount","newRange","i","newIndex","newEnd","Error","newStart","isActiveRange","first","last","isActiveRangeOutsideLastItem","s","setItemSizes","vpItems","initialIndex","lastCoordinate","count","item","initialState","ViewportStore","this","lastKnownScroll","value","constructor","type","store","createStore","onChange","clearItems","setViewPortCoordinate","position","viewportSize","get","frameOffset","singleOffsetInPx","outsize","maxCoordinate","allItems","setViewport","setViewPortDimensionSizes","dropToOriginalSize","changedCoordinate","changedSize","setOriginalSizes","setStore","set"],"sources":["src/store/vp/viewport.helpers.ts","src/store/vp/viewport.store.ts"],"sourcesContent":["import {\n DimensionSettingsState,\n PositionItem,\n ViewSettingSizeProp,\n ViewportStateItems,\n VirtualPositionItem,\n Range,\n} from '@type';\n\nimport { getItemByPosition } from '../dimension/dimension.helpers';\n\nexport type DimensionDataViewport = Pick<\n DimensionSettingsState,\n | 'indexes'\n | 'positionIndexes'\n | 'positionIndexToItem'\n | 'sizes'\n | 'originItemSize'\n | 'realSize'\n>;\n\ntype ItemsToUpdate = Pick<ViewportStateItems, 'items' | 'start' | 'end'>;\n/**\n * Update items based on new scroll position\n * If viewport wasn't changed fully simple recombination of positions\n * Otherwise rebuild viewport items\n */\nexport function getUpdatedItemsByPosition<T extends ItemsToUpdate>(\n pos: number, // coordinate\n items: T,\n realCount: number,\n virtualSize: number,\n dimension: DimensionDataViewport,\n): ItemsToUpdate {\n const activeItem: PositionItem = getItemByPosition(dimension, pos);\n const firstItem: PositionItem = getFirstItem(items);\n let toUpdate: ItemsToUpdate;\n // do simple position recombination if items already present in viewport\n if (firstItem) {\n let changedOffsetStart = activeItem.itemIndex - (firstItem.itemIndex || 0);\n // if item changed\n if (changedOffsetStart) {\n // simple recombination\n toUpdate = recombineByOffset(Math.abs(changedOffsetStart), {\n positiveDirection: changedOffsetStart > -1,\n ...dimension,\n ...items,\n });\n }\n }\n\n const maxSizeVirtualSize = getMaxVirtualSize(\n virtualSize,\n dimension.realSize,\n activeItem,\n );\n // if partial recombination add items if revo-viewport has some space left\n if (toUpdate) {\n const extra = addMissingItems(\n activeItem,\n realCount,\n maxSizeVirtualSize,\n toUpdate,\n dimension,\n );\n if (extra.length) {\n updateMissingAndRange(toUpdate.items, extra, toUpdate);\n }\n }\n\n // new collection if no items after replacement full replacement\n if (!toUpdate) {\n const items = getItems({\n firstItemStart: activeItem.start,\n firstItemIndex: activeItem.itemIndex,\n origSize: dimension.originItemSize,\n maxSize: maxSizeVirtualSize,\n maxCount: realCount,\n sizes: dimension.sizes,\n });\n\n // range now comes from 0 to length - 1\n toUpdate = {\n items,\n start: 0,\n end: items.length - 1,\n };\n }\n return toUpdate;\n}\n\n// virtual size can differ based on scroll position if some big items are present\n// scroll can be in the middle of item and virtual size will be larger\n// so we need to exclude this part from virtual size hence it's already passed\nfunction getMaxVirtualSize(\n virtualSize: number,\n realSize: number,\n activeItem: PositionItem,\n) {\n return Math.min(virtualSize + (activeItem.end - activeItem.start), realSize);\n}\n\nexport function updateMissingAndRange(\n items: VirtualPositionItem[],\n missing: VirtualPositionItem[],\n range: Range,\n) {\n items.splice(range.end + 1, 0, ...missing);\n // update range if start larger after recombination\n if (\n range.start >= range.end &&\n !(range.start === range.end && range.start === 0)\n ) {\n range.start += missing.length;\n }\n range.end += missing.length;\n}\n\n/**\n * If partial replacement\n * this function adds items if viewport has some space left\n */\nexport function addMissingItems<T extends ItemsToUpdate>(\n firstItem: PositionItem,\n realCount: number,\n virtualSize: number,\n existingCollection: T,\n dimension: Pick<DimensionSettingsState, 'sizes' | 'originItemSize'>,\n): VirtualPositionItem[] {\n const lastItem: VirtualPositionItem = getLastItem(existingCollection);\n const items = getItems({\n sizes: dimension.sizes,\n firstItemStart: lastItem.end,\n firstItemIndex: lastItem.itemIndex + 1,\n origSize: dimension.originItemSize,\n maxSize: virtualSize - (lastItem.end - firstItem.start),\n maxCount: realCount,\n });\n return items;\n}\n\n/**\n * Get wiewport items parameters\n * caching position and calculating items count in viewport\n */\nexport function getItems(\n opt: {\n firstItemIndex: number;\n firstItemStart: number;\n origSize: number;\n maxSize: number; // virtual size\n maxCount: number; // real item count, where the last item\n sizes?: ViewSettingSizeProp;\n },\n currentSize = 0,\n) {\n const items: VirtualPositionItem[] = [];\n\n let index = opt.firstItemIndex;\n let size = currentSize;\n\n // max size or max count\n while (size <= opt.maxSize && index < opt.maxCount) {\n const newSize = getItemSize(index, opt.sizes, opt.origSize);\n items.push({\n start: opt.firstItemStart + size,\n end: opt.firstItemStart + size + newSize,\n itemIndex: index,\n size: newSize,\n });\n size += newSize;\n index++;\n }\n return items;\n}\n\n/**\n * Do batch items recombination\n * If items not overlapped with existing viewport returns null\n */\ntype RecombindDimensionData = Pick<\n DimensionSettingsState,\n 'sizes' | 'realSize' | 'originItemSize'\n>;\ntype RecombineOffsetData = {\n positiveDirection: boolean;\n} & ItemsToUpdate &\n RecombindDimensionData;\nexport function recombineByOffset(\n offset: number,\n data: RecombineOffsetData,\n): ItemsToUpdate | null {\n const newItems = [...data.items];\n const itemsCount = newItems.length;\n let newRange = {\n start: data.start,\n end: data.end,\n };\n\n // if offset out of revo-viewport, makes sense whole redraw\n if (offset > itemsCount) {\n return null;\n }\n\n // is direction of scroll positive\n if (data.positiveDirection) {\n // push item to the end\n let lastItem: VirtualPositionItem = getLastItem(data);\n\n let i = newRange.start;\n const length = i + offset;\n for (; i < length; i++) {\n const newIndex = lastItem.itemIndex + 1;\n const size = getItemSize(\n newIndex,\n data.sizes,\n data.originItemSize,\n );\n\n // if item overlapped limit break a loop\n if (lastItem.end + size > data.realSize) {\n break;\n }\n\n // new item index to recombine\n let newEnd = i % itemsCount;\n\n // item should always present, we do not create new item, we recombine them\n if (!newItems[newEnd]) {\n throw new Error('incorrect index');\n }\n\n // do recombination\n newItems[newEnd] = lastItem = {\n start: lastItem.end,\n end: lastItem.end + size,\n itemIndex: newIndex,\n size: size,\n };\n // update range\n newRange.start++;\n newRange.end = newEnd;\n }\n\n // direction is negative\n } else {\n // push item to the start\n let firstItem: VirtualPositionItem = getFirstItem(data);\n\n const end = newRange.end;\n for (let i = 0; i < offset; i++) {\n const newIndex = firstItem.itemIndex - 1;\n const size = getItemSize(\n newIndex,\n data.sizes,\n data.originItemSize,\n );\n\n // new item index to recombine\n let newStart = end - i;\n newStart = (newStart < 0 ? itemsCount + newStart : newStart) % itemsCount;\n\n // item should always present, we do not create new item, we recombine them\n if (!newItems[newStart]) {\n throw new Error('incorrect index');\n }\n\n // do recombination\n newItems[newStart] = firstItem = {\n start: firstItem.start - size,\n end: firstItem.start,\n itemIndex: newIndex,\n size: size,\n };\n // update range\n newRange.start = newStart;\n newRange.end--;\n }\n }\n const range = {\n start:\n (newRange.start < 0 ? itemsCount + newRange.start : newRange.start) %\n itemsCount,\n end:\n (newRange.end < 0 ? itemsCount + newRange.end : newRange.end) %\n itemsCount,\n };\n return {\n items: newItems,\n ...range,\n };\n}\n\nfunction getItemSize(\n index: number,\n sizes?: ViewSettingSizeProp,\n origSize = 0,\n): number {\n if (sizes && sizes[index]) {\n return sizes[index];\n }\n return origSize;\n}\n\n/**\n * Verify if position is in range of the PositionItem, start and end are included\n */\nexport function isActiveRange(\n pos: number,\n realSize: number,\n first?: PositionItem,\n last?: PositionItem,\n): boolean {\n if (!first || !last) {\n return false;\n }\n // if position is in range of first item\n // or position is after first item and last item is the last item in real size\n return (\n (pos >= first.start && pos <= first.end) ||\n (pos > first.end && last.end === realSize)\n );\n}\n\nexport function isActiveRangeOutsideLastItem(\n pos: number,\n virtualSize: number,\n firstItem?: PositionItem,\n lastItem?: PositionItem,\n) {\n // if no first item, means no items in viewport\n if (!firstItem) {\n return false;\n }\n return virtualSize + pos > lastItem?.end;\n}\n\nexport function getFirstItem(\n s: ItemsToUpdate,\n): VirtualPositionItem | undefined {\n return s.items[s.start];\n}\n\nexport function getLastItem(s: ItemsToUpdate): VirtualPositionItem {\n return s.items[s.end];\n}\n\n/**\n * Set items sizes from start index to end\n * @param vpItems\n * @param start\n * @param size\n * @param lastCoordinate\n * @returns\n */\nexport function setItemSizes(\n vpItems: VirtualPositionItem[],\n initialIndex: number,\n size: number,\n lastCoordinate: number,\n) {\n const items = [...vpItems];\n const count = items.length;\n\n let pos = lastCoordinate;\n let i = 0;\n let start = initialIndex;\n\n // viewport not inited\n if (!count) {\n return [];\n }\n // loop through array from initial item after recombination\n while (i < count) {\n const item = items[start];\n item.start = pos;\n item.size = size;\n item.end = item.start + size;\n pos = item.end;\n // loop by start index\n start++;\n i++;\n\n // if start index out of array, reset it\n if (start === count) {\n start = 0;\n }\n }\n return items;\n}\n","import { createStore } from '@stencil/store';\n\nimport {\n DimensionDataViewport,\n addMissingItems,\n getFirstItem,\n getLastItem,\n getUpdatedItemsByPosition,\n isActiveRange,\n setItemSizes,\n updateMissingAndRange,\n isActiveRangeOutsideLastItem,\n} from './viewport.helpers';\n\nimport { setStore } from '../../utils/store.utils';\nimport type {\n VirtualPositionItem,\n ViewportStateItems,\n ViewportState,\n Observable,\n ViewSettingSizeProp,\n MultiDimensionType,\n} from '@type';\n\n/**\n * Viewport store\n * Used for virtualization (process of rendering only visible part of data)\n * Redraws viewport based on position and dimension\n */\nfunction initialState(): ViewportState {\n return {\n // virtual item information per rendered item\n items: [],\n // virtual dom item order to render\n start: 0,\n end: 0,\n\n // size of viewport in px\n virtualSize: 0,\n\n // total number of items\n realCount: 0,\n };\n}\n\n/**\n * Viewport store class\n */\nexport class ViewportStore {\n readonly store: Observable<ViewportState>;\n\n // last coordinate for store position restore\n private lastKnownScroll = 0;\n\n get lastCoordinate() {\n return this.lastKnownScroll;\n }\n set lastCoordinate(value: number) {\n this.lastKnownScroll = value;\n }\n constructor(readonly type: MultiDimensionType) {\n this.store = createStore(initialState());\n // drop items on real size change, require a new item set\n this.store.onChange('realCount', () => this.clearItems());\n // drop items on virtual size change, require a new item set\n this.store.onChange('virtualSize', () => this.clearItems());\n }\n\n /**\n * Render viewport based on coordinate\n * It's the main method for draw\n */\n setViewPortCoordinate(position: number, dimension: DimensionDataViewport) {\n const viewportSize = this.store.get('virtualSize');\n // no visible data to calculate\n if (!viewportSize) {\n return;\n }\n\n const frameOffset = 1;\n const singleOffsetInPx = dimension.originItemSize * frameOffset;\n // add offset to virtual size from both sides\n const outsize = singleOffsetInPx * 2;\n // math virtual size is based on visible area + 2 items outside of visible area\n const virtualSize = viewportSize + outsize;\n\n // expected no scroll if real size less than virtual size, position is 0\n let maxCoordinate = 0;\n // if there is nodes outside of viewport, max coordinate has to be adjusted\n if (dimension.realSize > viewportSize) {\n // max coordinate is real size minus virtual/rendered space\n maxCoordinate = dimension.realSize - viewportSize - singleOffsetInPx;\n }\n\n let pos = position;\n // limit position to max and min coordinates\n if (pos < 0) {\n pos = 0;\n } else if (pos > maxCoordinate) {\n pos = maxCoordinate;\n }\n\n // store last coordinate for further restore on redraw\n this.lastCoordinate = pos;\n\n // actual position is less than first item start based on offset\n pos -= singleOffsetInPx;\n pos = pos < 0 ? 0 : pos < maxCoordinate ? pos : maxCoordinate;\n\n const allItems = this.getItems();\n const items = [...allItems.items];\n\n const firstItem: VirtualPositionItem | undefined = getFirstItem(allItems);\n const lastItem: VirtualPositionItem | undefined = getLastItem(allItems);\n\n let toUpdate: Partial<ViewportState> = {};\n\n // left position changed\n // verify if new position is in range of previously rendered first item\n if (!isActiveRange(pos, dimension.realSize, firstItem, lastItem)) {\n toUpdate = {\n ...toUpdate,\n ...getUpdatedItemsByPosition(\n pos,\n allItems,\n this.store.get('realCount'),\n virtualSize,\n dimension,\n ),\n };\n this.setViewport({ ...toUpdate });\n // verify is render area is outside of last item\n } else if (\n isActiveRangeOutsideLastItem(pos, virtualSize, firstItem, lastItem)\n ) {\n // check is any item missing for full fill content\n const missing = addMissingItems(\n firstItem,\n this.store.get('realCount'),\n virtualSize + pos - firstItem.start,\n allItems,\n {\n sizes: dimension.sizes,\n originItemSize: dimension.originItemSize,\n },\n );\n\n // update missing items\n if (missing.length) {\n const range = {\n start: this.store.get('start'),\n end: this.store.get('end'),\n };\n updateMissingAndRange(items, missing, range);\n toUpdate = {\n ...toUpdate,\n items: [...items],\n ...range,\n };\n this.setViewport({ ...toUpdate });\n }\n }\n }\n\n /**\n * Update viewport sizes for existing items\n * This method is generating new item positions based on custom sizes and original sizes\n * @param sizes - custom sizes for each item\n * @param dropToOriginalSize - drop to original size if requested\n */\n setViewPortDimensionSizes(\n sizes: ViewSettingSizeProp,\n dropToOriginalSize?: number,\n ) {\n let items = [...this.store.get('items')];\n const count = items.length;\n // viewport not inited\n if (!count) {\n return;\n }\n\n let changedCoordinate = 0;\n let i = 0;\n let start = this.store.get('start');\n\n // drop to original size if requested\n if (dropToOriginalSize) {\n const allItems = this.getItems();\n const firstItem: VirtualPositionItem | undefined = getFirstItem(allItems);\n items = setItemSizes(items, start, dropToOriginalSize, firstItem.start);\n }\n\n // loop through array from initial item after recombination\n // if size change present, change position for all items after\n while (i < count) {\n const item = items[start];\n // change pos if size change present before\n if (changedCoordinate) {\n item.start += changedCoordinate;\n item.end += changedCoordinate;\n }\n // check if size change present\n const size: number | undefined = sizes[item.itemIndex];\n // size found\n if (size) {\n const changedSize = size - item.size;\n changedCoordinate += changedSize;\n item.size = size;\n item.end = item.start + size;\n // size lost\n }\n\n // loop by start index\n start++;\n i++;\n // if start index out of array, reset it\n if (start === count) {\n start = 0;\n }\n }\n\n this.setViewport({ items: [...items] });\n }\n\n /**\n * Set sizes for existing items\n */\n setOriginalSizes(size: number) {\n const items = this.store.get('items');\n const count = items.length;\n // viewport not inited\n if (!count) {\n return;\n }\n\n setStore(this.store, {\n items: setItemSizes(\n items,\n this.store.get('start'),\n size,\n this.lastCoordinate,\n ),\n });\n }\n\n getItems(): Pick<ViewportStateItems, 'items' | 'start' | 'end'> {\n return {\n items: this.store.get('items'),\n start: this.store.get('start'),\n end: this.store.get('end'),\n };\n }\n\n setViewport(data: Partial<ViewportState>) {\n setStore(this.store, data);\n }\n\n clearItems() {\n this.store.set('items', []);\n }\n}\n"],"mappings":";;;2EA2BgBA,EACdC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAA2BC,EAAkBF,EAAWJ,GAC9D,MAAMO,EAA0BC,EAAaP,GAC7C,IAAIQ,EAEJ,GAAIF,EAAW,CACb,IAAIG,EAAqBL,EAAWM,WAAaJ,EAAUI,WAAa,GAExE,GAAID,EAAoB,CAEtBD,EAAWG,EAAkBC,KAAKC,IAAIJ,GAAmBK,OAAAC,OAAAD,OAAAC,OAAA,CACvDC,kBAAmBP,GAAsB,GACtCN,GACAH,G,EAKT,MAAMiB,EAAqBC,EACzBhB,EACAC,EAAUgB,SACVf,GAGF,GAAII,EAAU,CACZ,MAAMY,EAAQC,EACZjB,EACAH,EACAgB,EACAT,EACAL,GAEF,GAAIiB,EAAME,OAAQ,CAChBC,EAAsBf,EAASR,MAAOoB,EAAOZ,E,EAKjD,IAAKA,EAAU,CACb,MAAMR,EAAQwB,EAAS,CACrBC,eAAgBrB,EAAWsB,MAC3BC,eAAgBvB,EAAWM,UAC3BkB,SAAUzB,EAAU0B,eACpBC,QAASb,EACTc,SAAU9B,EACV+B,MAAO7B,EAAU6B,QAInBxB,EAAW,CACTR,QACA0B,MAAO,EACPO,IAAKjC,EAAMsB,OAAS,E,CAGxB,OAAOd,CACT,CAKA,SAASU,EACPhB,EACAiB,EACAf,GAEA,OAAOQ,KAAKsB,IAAIhC,GAAeE,EAAW6B,IAAM7B,EAAWsB,OAAQP,EACrE,C,SAEgBI,EACdvB,EACAmC,EACAC,GAEApC,EAAMqC,OAAOD,EAAMH,IAAM,EAAG,KAAME,GAElC,GACEC,EAAMV,OAASU,EAAMH,OACnBG,E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MAAOuE,KAAKK,MAAMO,IAAI,SACtBzD,MAAO6C,KAAKK,MAAMO,IAAI,SACtBlD,IAAKsC,KAAKK,MAAMO,IAAI,O,CAIxB,WAAAM,CAAYxC,GACV8C,EAASxB,KAAKK,MAAO3B,E,CAGvB,UAAA8B,GACER,KAAKK,MAAMoB,IAAI,QAAS,G","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
- import { DataFormat } from '../../types/interfaces';
2
+ import { DataFormat } from "../../types/index";
3
3
  /**
4
4
  * This Clipboard provides functionality for handling clipboard events in a web application.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  import { VNode, EventEmitter } from '../../stencil-public-runtime';
2
- import { Providers, DragStartEvent, ColumnDataSchemaModel, CellTemplate } from '../../types/interfaces';
2
+ import { Providers, DragStartEvent, ColumnDataSchemaModel, CellTemplate } from "../../types/index";
3
3
  interface RenderProps {
4
4
  model: ColumnDataSchemaModel;
5
5
  providers: Providers;
@@ -1,7 +1,7 @@
1
- import { DSourceState } from '../../store/dataSource/data.store';
2
- import { DimensionCols, DimensionRows, RowDrag } from '../..';
3
- import { ColumnRegular, Observable, DataType, CellProps, ColumnDataSchemaModel, ColumnProp, DataLookup, DataFormat, DataSource } from '../..';
4
- import { ChangedRange, OldNewRangeMapping, Cell, RangeArea, BeforeSaveDataDetails, EditorCtr, Editors } from '../..';
1
+ import { DSourceState } from "../../store/index";
2
+ import { DimensionCols, DimensionRows, RowDrag } from "../../types/index";
3
+ import { ColumnRegular, Observable, DataType, CellProps, ColumnDataSchemaModel, ColumnProp, DataLookup, DataFormat } from "../../types/index";
4
+ import { ChangedRange, OldNewRangeMapping, Cell, RangeArea, BeforeSaveDataDetails, EditorCtr, Editors } from "../../types/index";
5
5
  export type ColumnStores = {
6
6
  [T in DimensionCols]: Observable<DSourceState<ColumnRegular, DimensionCols>>;
7
7
  };
@@ -41,7 +41,7 @@ export default class ColumnService {
41
41
  prop: ColumnProp;
42
42
  rowIndex: number;
43
43
  colIndex: number;
44
- model: DataSource;
44
+ model: DataType;
45
45
  colType: DimensionCols;
46
46
  type: DimensionRows;
47
47
  }[];
@@ -1,8 +1,8 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
- import { DSourceState } from '../../store/dataSource/data.store';
3
- import { DimensionCols, DimensionRows } from '../../types/dimension';
4
- import { Observable, ViewportState, DimensionSettingsState, BeforeRowRenderEvent, Providers, ColumnRegular, DataType, BeforeCellRenderEvent, DragStartEvent, ColumnDataSchemaModel, VirtualPositionItem } from '../../types/interfaces';
5
- import { SelectionStoreState } from '../../types/selection';
2
+ import { DSourceState } from "../../store/index";
3
+ import { DimensionCols, DimensionRows } from "../../types/index";
4
+ import { Observable, ViewportState, DimensionSettingsState, BeforeRowRenderEvent, Providers, ColumnRegular, DataType, BeforeCellRenderEvent, DragStartEvent, ColumnDataSchemaModel, VirtualPositionItem } from "../../types/index";
5
+ import { SelectionStoreState } from "../../types/index";
6
6
  /**
7
7
  * This component is responsible for rendering data
8
8
  * Rows, columns, groups and cells
@@ -1,5 +1,5 @@
1
1
  import { VNode } from '../../stencil-public-runtime';
2
- import { RangeArea } from '../../types/selection';
2
+ import { RangeArea } from "../../types/index";
3
3
  /**
4
4
  * Class is responsible for highlighting rows in a table.
5
5
  */
@@ -1,3 +1,3 @@
1
- import { EditorCtrConstructible } from '../../types/selection';
1
+ import { EditorCtrConstructible } from "../../types/index";
2
2
  export declare function isEditInput(el?: HTMLElement): boolean;
3
3
  export declare function isEditorCtrConstructible(editor: any): editor is EditorCtrConstructible;
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
- import { ColumnDataSchemaModel } from '../../types/interfaces';
3
- import { EditCell, EditorCtr, SaveDataDetails, SaveData } from '../../types/selection';
2
+ import { ColumnDataSchemaModel } from "../../types/index";
3
+ import { EditCell, EditorCtr, SaveDataDetails, SaveData } from "../../types/index";
4
4
  /**
5
5
  * Represents a cell editor in a grid.
6
6
  * It manages the editing of cells by handling events, saving data, rendering the editor UI,
@@ -1,6 +1,6 @@
1
1
  import { h as createElement } from '../../stencil-public-runtime';
2
- import { ColumnRegular } from '../../types/interfaces';
3
- import { EditCell, EditorBase, SaveData } from '../../types/selection';
2
+ import { ColumnRegular } from "../../types/index";
3
+ import { EditCell, EditorBase, SaveData } from "../../types/index";
4
4
  /**
5
5
  * Represents a cell editor in a grid.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  import { VNode } from '../../stencil-public-runtime';
2
2
  import { ResizeProps } from '../../services/resizable.directive';
3
- import { CellProps, ColumnTemplateProp } from '../../types/interfaces';
3
+ import { CellProps, ColumnTemplateProp } from "../../types/index";
4
4
  type Props = {
5
5
  props: CellProps & Partial<ResizeProps>;
6
6
  additionalData: any;
@@ -1,7 +1,7 @@
1
1
  import { VNode } from '../../stencil-public-runtime';
2
2
  import { ResizeEvent, ResizeProps } from '../../services/resizable.directive';
3
- import { VirtualPositionItem, ColumnTemplateProp, InitialHeaderClick } from '../../types/interfaces';
4
- import { RangeArea } from '../../types/selection';
3
+ import { VirtualPositionItem, ColumnTemplateProp, InitialHeaderClick } from "../../types/index";
4
+ import { RangeArea } from "../../types/index";
5
5
  type Props = {
6
6
  column: VirtualPositionItem;
7
7
  additionalData: any;
@@ -1,10 +1,10 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
2
  import { HTMLStencilElement } from '../../stencil-public-runtime';
3
- import { Groups } from '../../store/dataSource/data.store';
3
+ import { Groups } from "../../store/index";
4
4
  import { ResizeProps } from '../../services/resizable.directive';
5
- import { ColumnRegular, DimensionSettingsState, InitialHeaderClick, Observable, Providers, ViewportState, ViewSettingSizeProp } from '../../types/interfaces';
6
- import { DimensionCols } from '../../types/dimension';
7
- import { SelectionStoreState } from '../../types/selection';
5
+ import { ColumnRegular, DimensionSettingsState, InitialHeaderClick, Observable, Providers, ViewportState, ViewSettingSizeProp } from "../../types/index";
6
+ import { DimensionCols } from "../../types/index";
7
+ import { SelectionStoreState } from "../../types/index";
8
8
  export declare class RevogrHeaderComponent {
9
9
  /**
10
10
  * Stores
@@ -1,6 +1,6 @@
1
1
  import { VNode } from '../../stencil-public-runtime';
2
- import { PositionItem } from '../../types/interfaces';
3
- import { Cell } from '../../types/selection';
2
+ import { PositionItem } from "../../types/index";
3
+ import { Cell } from "../../types/index";
4
4
  type Props = {
5
5
  ref: {
6
6
  (e: OrdererService): void;
@@ -1,5 +1,4 @@
1
- import { DimensionSettingsState, PositionItem } from '../..';
2
- import { Cell } from '../..';
1
+ import { DimensionSettingsState, PositionItem, Cell } from "../../types/index";
3
2
  type EventData = {
4
3
  el: HTMLElement;
5
4
  rows: DimensionSettingsState;
@@ -1,8 +1,11 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
- import { DSourceState } from '../../store/dataSource/data.store';
3
- import { DimensionRows } from '../../types/dimension';
4
- import { DataType, DimensionSettingsState, DragStartEvent, Observable, PositionItem } from '../../types/interfaces';
5
- import { Cell } from '../../types/selection';
2
+ import { DSourceState } from "../../store/index";
3
+ import { DimensionRows } from "../../types/index";
4
+ import { DataType, DimensionSettingsState, DragStartEvent, Observable, PositionItem } from "../../types/index";
5
+ import { Cell } from "../../types/index";
6
+ /**
7
+ * Component for handling row order editor.
8
+ */
6
9
  export declare class OrderEditor {
7
10
  /** Parent element */
8
11
  parent: HTMLElement;
@@ -1,12 +1,8 @@
1
1
  import { EventData } from './selection.utils';
2
- import SelectionStoreService from '../../store/selection/selection.store.service';
2
+ import { DSourceState } from "../../store/index";
3
3
  import ColumnService from '../data/column.service';
4
- import { DSourceState } from '../../store/dataSource/data.store';
5
- import { DataLookup, DataType, DimensionSettingsState, Observable } from '../../types/interfaces';
6
- import { TempRange, ChangedRange, BeforeRangeSaveDataDetails, RangeArea, Cell } from '../../types/selection';
7
- import { DimensionRows } from '../../types/dimension';
4
+ import { DataLookup, DataType, DimensionSettingsState, Observable, TempRange, ChangedRange, BeforeRangeSaveDataDetails, RangeArea, Cell, DimensionRows } from "../../types/index";
8
5
  type Config = {
9
- selectionStoreService: SelectionStoreService;
10
6
  dimensionRow: Observable<DimensionSettingsState>;
11
7
  dimensionCol: Observable<DimensionSettingsState>;
12
8
  columnService: ColumnService;
@@ -43,7 +39,9 @@ export declare class AutoFillService {
43
39
  renderAutofill(range: RangeArea, selectionFocus: Cell): any;
44
40
  private autoFillHandler;
45
41
  get isAutoFill(): boolean;
46
- /** Process mouse move events */
42
+ /**
43
+ * Process mouse move events
44
+ */
47
45
  selectionMouseMove(e: MouseEvent | TouchEvent): void;
48
46
  private getFocus;
49
47
  /**
@@ -59,10 +57,13 @@ export declare class AutoFillService {
59
57
  */
60
58
  selectionStart(target: Element, data: EventData, type?: AutoFillType): void;
61
59
  /**
62
- * Clear current range selection
63
- * on mouse up and mouse leave events
60
+ * Clear current range selection on mouse up and mouse leave events
61
+ */
62
+ clearAutoFillSelection(focus: Cell, oldRange: RangeArea): void;
63
+ /**
64
+ * Reset autofill state
64
65
  */
65
- clearAutoFillSelection(): void;
66
+ private resetAutoFillState;
66
67
  /** Trigger range apply events and handle responses */
67
68
  onRangeApply(data: DataLookup, range: RangeArea): void;
68
69
  /** Apply range and copy data during range application */
@@ -1,8 +1,7 @@
1
- import SelectionStoreService from '../../store/selection/selection.store.service';
2
- import { Cell, RangeArea, SelectionStoreState } from '../..';
3
- import { Observable } from '../..';
1
+ import { EventData } from './selection.utils';
2
+ import { Cell, RangeArea, SelectionStoreState } from "../../types/index";
3
+ import { Observable } from "../../types/index";
4
4
  type Config = {
5
- selectionStoreService: SelectionStoreService;
6
5
  selectionStore: Observable<SelectionStoreState>;
7
6
  change(val?: any): void;
8
7
  cancel(): void;
@@ -16,7 +15,7 @@ type Config = {
16
15
  export declare class KeyboardService {
17
16
  private sv;
18
17
  constructor(sv: Config);
19
- keyDown(e: KeyboardEvent, canRange: boolean): Promise<void>;
18
+ keyDown(e: KeyboardEvent, canRange: boolean, isEditMode: boolean, { range, focus }: Pick<EventData, 'range' | 'focus'>): Promise<void>;
20
19
  private selectAll;
21
20
  keyChangeSelection(e: KeyboardEvent, canRange: boolean): Promise<boolean>;
22
21
  keyPositionChange(changes: Partial<Cell>, range?: RangeArea, focus?: Cell, isMulti?: boolean): boolean;
@@ -1,11 +1,14 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
2
  import ColumnService from '../data/column.service';
3
- import SelectionStoreService from '../../store/selection/selection.store.service';
4
- import { DSourceState } from '../../store/dataSource/data.store';
3
+ import { DSourceState } from "../../store/index";
4
+ import { EventData } from './selection.utils';
5
5
  import { Observable, SelectionStoreState, DimensionSettingsState, DataType, DimensionRows, ColumnRegular, DimensionCols, Cell, DragStartEvent } from '../../components';
6
- import { MultiDimensionType } from '../../types/dimension';
7
- import { FocusRenderEvent, ApplyFocusEvent, AllDimensionType } from '../../types/interfaces';
8
- import { Editors, BeforeSaveDataDetails, BeforeEdit, RangeArea, TempRange, ChangedRange, BeforeRangeSaveDataDetails, SaveDataDetails } from '../../types/selection';
6
+ import { MultiDimensionType } from "../../types/index";
7
+ import { FocusRenderEvent, ApplyFocusEvent, AllDimensionType } from "../../types/index";
8
+ import { Editors, BeforeSaveDataDetails, BeforeEdit, RangeArea, TempRange, ChangedRange, BeforeRangeSaveDataDetails, SaveDataDetails } from "../../types/index";
9
+ /**
10
+ * Component for overlaying the grid with the selection.
11
+ */
9
12
  export declare class OverlaySelection {
10
13
  /**
11
14
  * Readonly mode.
@@ -41,7 +44,7 @@ export declare class OverlaySelection {
41
44
  */
42
45
  colData: Observable<DSourceState<ColumnRegular, DimensionCols>>;
43
46
  /**
44
- * Last cell position.
47
+ * Last real coordinates positions + 1.
45
48
  */
46
49
  lastCell: Cell;
47
50
  /**
@@ -153,20 +156,30 @@ export declare class OverlaySelection {
153
156
  element: HTMLElement;
154
157
  private clipboard;
155
158
  protected columnService: ColumnService;
156
- protected selectionStoreService: SelectionStoreService;
157
159
  private keyboardService;
158
160
  private autoFillService;
159
161
  private orderEditor;
160
162
  private revogrEdit;
161
163
  onMouseMove(e: MouseEvent | TouchEvent): void;
162
- /** Action finished inside of the document. */
163
- /** Pointer left document, clear any active operation. */
164
+ /**
165
+ * Action finished inside of the document.
166
+ * Pointer left document, clear any active operation.
167
+ */
164
168
  onMouseUp(): void;
165
- /** Row drag started. */
169
+ /**
170
+ * Row drag started.
171
+ * This event is fired when drag action started on cell.
172
+ */
166
173
  onCellDrag(e: CustomEvent<DragStartEvent>): void;
167
- /** Get keyboard down from element. */
174
+ /**
175
+ * Get keyboard down from element.
176
+ * This event is fired when keyboard key is released.
177
+ */
168
178
  onKeyUp(e: KeyboardEvent): void;
169
- /** Get keyboard down from element. */
179
+ /**
180
+ * Get keyboard down from element.
181
+ * This event is fired when keyboard key is pressed.
182
+ */
170
183
  onKeyDown(e: KeyboardEvent): void;
171
184
  /** Selection & Keyboard */
172
185
  selectionServiceSet(s: Observable<SelectionStoreState>): void;
@@ -180,9 +193,19 @@ export declare class OverlaySelection {
180
193
  private renderRange;
181
194
  private renderEditor;
182
195
  render(): any;
196
+ /**
197
+ * Executes the focus operation on the specified range of cells.
198
+ */
183
199
  private doFocus;
184
200
  private triggerRangeEvent;
185
- protected onElementMouseDown(e: MouseEvent | TouchEvent, touch?: boolean): void;
201
+ /**
202
+ * Open Editor on DblClick
203
+ */
204
+ private onElementDblClick;
205
+ /**
206
+ * Handle mouse down event on Host element
207
+ */
208
+ private onElementMouseDown;
186
209
  /**
187
210
  * Start cell editing
188
211
  */
@@ -207,14 +230,14 @@ export declare class OverlaySelection {
207
230
  * Verify if edit allowed.
208
231
  */
209
232
  protected canEdit(): boolean;
233
+ get edited(): import("@type").EditCellStore;
234
+ /**
235
+ * Sets the focus on a cell and optionally edits a range.
236
+ */
237
+ focus(cell?: Cell, isRangeEdit?: boolean): boolean;
210
238
  get types(): AllDimensionType;
211
239
  /**
212
240
  * Collect data
213
241
  */
214
- protected getData(): {
215
- el: HTMLElement;
216
- rows: DimensionSettingsState;
217
- cols: DimensionSettingsState;
218
- lastCell: Cell;
219
- };
242
+ protected getData(): EventData;
220
243
  }
@@ -1,13 +1,17 @@
1
- import { DimensionSettingsState } from '../..';
2
- import { Cell, RangeArea, RangeAreaCss } from '../..';
1
+ import { DimensionSettingsState, Cell, RangeArea, RangeAreaCss } from "../../types/index";
3
2
  export type EventData = {
4
3
  el: HTMLElement;
5
4
  rows: DimensionSettingsState;
6
5
  cols: DimensionSettingsState;
7
6
  lastCell: Cell;
7
+ focus: Cell;
8
+ range: RangeArea;
8
9
  };
9
- /** Calculate cell based on x, y position */
10
- export declare function getCurrentCell({ x, y }: Cell, { el, rows, cols }: EventData): Cell;
10
+ export declare function getFocusCellBasedOnEvent(e: MouseEvent | TouchEvent, data: EventData): Cell | null;
11
+ /**
12
+ * Calculate cell based on x, y position
13
+ */
14
+ export declare function getCurrentCell({ x, y }: Cell, { el, rows, cols }: Pick<EventData, 'el' | 'rows' | 'cols'>): Cell;
11
15
  export declare function getCoordinate(range: RangeArea, focus: Cell, changes: Partial<Cell>, isMulti?: boolean): {
12
16
  start: {
13
17
  x: number;
@@ -18,8 +22,11 @@ export declare function getCoordinate(range: RangeArea, focus: Cell, changes: Pa
18
22
  y: number;
19
23
  };
20
24
  };
21
- /** check if out of range */
22
- export declare function isAfterLast({ x, y }: Cell, { lastCell }: EventData): boolean;
25
+ /**
26
+ * Check if the x coordinate of the cell position is after or equal to the x coordinate of the last cell position
27
+ * or if the y coordinate of the cell position is after or equal to the y coordinate of the last cell position
28
+ */
29
+ export declare function isAfterLast({ x, y }: Cell, lastCell: Cell): boolean;
23
30
  /** check if out of range */
24
31
  export declare function isBeforeFirst({ x, y }: Cell): boolean;
25
32
  export declare function getCell({ x, y, x1, y1 }: RangeArea, dimensionRow: DimensionSettingsState, dimensionCol: DimensionSettingsState): {
@@ -1,4 +1,4 @@
1
- import { RowDefinition } from '../..';
1
+ import { RowDefinition } from "../../types/index";
2
2
  export declare const rowDefinitionByType: (newVal?: RowDefinition[]) => Partial<{
3
3
  rowPinStart: {
4
4
  sizes?: Record<number, number>;
@@ -1,7 +1,7 @@
1
1
  import { EventEmitter, VNode } from '../../stencil-public-runtime';
2
2
  import ColumnDataProvider, { ColumnCollection } from '../../services/column.data.provider';
3
3
  import { DataProvider } from '../../services/data.provider';
4
- import { DSourceState } from '../../store/dataSource/data.store';
4
+ import { DSourceState } from "../../store/index";
5
5
  import DimensionProvider from '../../services/dimension.provider';
6
6
  import ViewportProvider from '../../services/viewport.provider';
7
7
  import { AutoSizeColumnConfig } from '../../plugins/column.auto-size.plugin';
@@ -9,11 +9,11 @@ import { ColumnFilterConfig, FilterCollection } from '../../plugins/filter/filte
9
9
  import { DataInput } from '../../plugins/export/types';
10
10
  import { GroupingOptions } from '../../plugins/groupingRow/grouping.row.types';
11
11
  import { FocusedData } from './viewport.service';
12
- import { MultiDimensionType, DimensionRows, DimensionCols, DimensionTypeCol } from '../../types/dimension';
13
- import { RowHeaders, ColumnRegular, ColumnGrouping, DataType, RowDefinition, ColumnType, FocusTemplateFunc, PositionItem, ColumnProp, ViewPortScrollEvent, InitialHeaderClick, ColumnDataSchema, Observable, AllDimensionType } from '../../types/interfaces';
14
- import { Editors, BeforeSaveDataDetails, BeforeRangeSaveDataDetails, Cell, ChangedRange, RangeArea, AfterEditEvent } from '../../types/selection';
15
- import { Theme } from '../../types/theme';
16
- import { PluginBaseComponent, PluginExternalConstructor } from '../../types/plugin';
12
+ import { MultiDimensionType, DimensionRows, DimensionCols, DimensionTypeCol } from "../../types/index";
13
+ import { RowHeaders, ColumnRegular, ColumnGrouping, DataType, RowDefinition, ColumnType, FocusTemplateFunc, PositionItem, ColumnProp, ViewPortScrollEvent, InitialHeaderClick, ColumnDataSchema, Observable, AllDimensionType } from "../../types/index";
14
+ import { Editors, BeforeSaveDataDetails, BeforeRangeSaveDataDetails, Cell, ChangedRange, RangeArea, AfterEditEvent } from "../../types/index";
15
+ import { Theme } from "../../types/index";
16
+ import { PluginBaseComponent, PluginExternalConstructor } from "../../types/index";
17
17
  /**
18
18
  * Revogrid - High-performance, customizable grid library for managing large datasets.
19
19
  *
@@ -500,6 +500,9 @@ export declare class RevoGridComponent {
500
500
  getSelectedRange(): Promise<RangeArea | null>;
501
501
  private clickTrackForFocusClear;
502
502
  mousedownHandle(event: MouseEvent | TouchEvent): void;
503
+ /**
504
+ * To keep your elements from losing focus use mouseup/touchend e.preventDefault();
505
+ */
503
506
  mouseupHandle(event: MouseEvent | TouchEvent): void;
504
507
  /** Drag events */
505
508
  onRowDragStarted(e: CustomEvent<{
@@ -543,7 +546,7 @@ export declare class RevoGridComponent {
543
546
  themeChanged(t: Theme, _?: Theme, __?: string, init?: boolean): void;
544
547
  dataSourceChanged<T extends DataType>(newVal: T[], _: T[] | undefined, watchName: string): void;
545
548
  disableVirtualYChanged(newVal?: boolean, prevVal?: boolean): void;
546
- rowDefChanged(after: any, before?: any): void;
549
+ rowDefChanged(after: RowDefinition[], before?: RowDefinition[]): void;
547
550
  trimmedRowsChanged(newVal?: Record<number, boolean>): void;
548
551
  /**
549
552
  * Grouping
@@ -1,10 +1,19 @@
1
- /** Collect data for pinned columns in required @ViewportProps format */
2
- import { MultiDimensionType } from '../..';
3
- import { Cell } from '../..';
4
- import { ViewportColumn } from '../../types/viewport.interfaces';
1
+ /**
2
+ * Collects data for pinned columns in the required @ViewportProps format.
3
+ */
4
+ import { MultiDimensionType } from "../../types/index";
5
+ import { Cell } from "../../types/index";
6
+ import { ViewportColumn } from "../../types/index";
7
+ /**
8
+ * Represents the slot names for the viewport slots.
9
+ */
5
10
  export declare const HEADER_SLOT = "header";
6
11
  export declare const FOOTER_SLOT = "footer";
7
12
  export declare const CONTENT_SLOT = "content";
8
13
  export declare const DATA_SLOT = "data";
9
- /** Receive last visible in viewport by required type */
14
+ /**
15
+ * Returns the last visible cell in the viewport for a given row type.
16
+ * Coordinates are not zero-based and are relative to the viewport.
17
+ * If needed to be zero-based they can be adjusted by subtracting 1.
18
+ */
10
19
  export declare function getLastCell(data: ViewportColumn, rowType: MultiDimensionType): Cell;
@@ -1,6 +1,4 @@
1
- import { DimensionColPin } from '../..';
2
- import { ViewPortScrollEvent } from '../..';
3
- import { ElementsScroll, ElementScroll } from '../../types/viewport.interfaces';
1
+ import { DimensionColPin, ViewPortScrollEvent, ElementsScroll, ElementScroll } from "../../types/index";
4
2
  export default class GridScrollingService {
5
3
  private setViewport;
6
4
  private elements;