@revolist/revogrid 4.9.41 → 4.9.42

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 (403) hide show
  1. package/dist/cjs/app-globals-c0b20747.js.map +1 -1
  2. package/dist/cjs/{column.drag.plugin-fcd892ec.js → column.drag.plugin-a6ef25bf.js} +1034 -149
  3. package/dist/cjs/column.drag.plugin-a6ef25bf.js.map +1 -0
  4. package/dist/cjs/column.service-831e1c92.js +1321 -0
  5. package/dist/cjs/column.service-831e1c92.js.map +1 -0
  6. package/dist/cjs/{column.service-26c61ed6.js → dimension.helpers-1927ad24.js} +490 -1273
  7. package/dist/cjs/dimension.helpers-1927ad24.js.map +1 -0
  8. package/dist/cjs/{edit.utils-179c0800.js → edit.utils-e51411f6.js} +3 -3
  9. package/dist/cjs/{edit.utils-179c0800.js.map → edit.utils-e51411f6.js.map} +1 -1
  10. package/dist/cjs/{header-cell-renderer-d879d95e.js → header-cell-renderer-53ecdcdb.js} +2 -2
  11. package/dist/cjs/{header-cell-renderer-d879d95e.js.map → header-cell-renderer-53ecdcdb.js.map} +1 -1
  12. package/dist/cjs/index.cjs.js +127 -69
  13. package/dist/cjs/index.cjs.js.map +1 -1
  14. package/dist/cjs/key.utils-96d0bc42.js +101 -0
  15. package/dist/cjs/key.utils-96d0bc42.js.map +1 -0
  16. package/dist/cjs/loader.cjs.js +1 -1
  17. package/dist/cjs/revo-grid.cjs.entry.js +310 -941
  18. package/dist/cjs/revo-grid.cjs.entry.js.map +1 -1
  19. package/dist/cjs/revo-grid.cjs.js +1 -1
  20. package/dist/cjs/revogr-attribution_7.cjs.entry.js +100 -70
  21. package/dist/cjs/revogr-attribution_7.cjs.entry.js.map +1 -1
  22. package/dist/cjs/revogr-clipboard_3.cjs.entry.js +11 -10
  23. package/dist/cjs/revogr-clipboard_3.cjs.entry.js.map +1 -1
  24. package/dist/cjs/revogr-data_4.cjs.entry.js +88 -78
  25. package/dist/cjs/revogr-data_4.cjs.entry.js.map +1 -1
  26. package/dist/cjs/revogr-filter-panel.cjs.entry.js +33 -13
  27. package/dist/cjs/revogr-filter-panel.cjs.entry.js.map +1 -1
  28. package/dist/cjs/{text-editor-b756d6b3.js → text-editor-1afffaf1.js} +6 -6
  29. package/dist/cjs/text-editor-1afffaf1.js.map +1 -0
  30. package/dist/cjs/{throttle-a57f51f9.js → throttle-bb713c73.js} +4 -4
  31. package/dist/cjs/{throttle-a57f51f9.js.map → throttle-bb713c73.js.map} +1 -1
  32. package/dist/cjs/{row-header-utils-c37f76e4.js → viewport.store-69b45f22.js} +15 -14
  33. package/dist/cjs/viewport.store-69b45f22.js.map +1 -0
  34. package/dist/collection/components/attribution/revogr-attribution.js +1 -1
  35. package/dist/collection/components/attribution/revogr-attribution.js.map +1 -1
  36. package/dist/collection/components/data/cell-renderer.js +11 -9
  37. package/dist/collection/components/data/cell-renderer.js.map +1 -1
  38. package/dist/collection/components/data/column.service.js +7 -19
  39. package/dist/collection/components/data/column.service.js.map +1 -1
  40. package/dist/collection/components/data/revogr-data-style.css +10 -5
  41. package/dist/collection/components/data/revogr-data.js +50 -28
  42. package/dist/collection/components/data/revogr-data.js.map +1 -1
  43. package/dist/collection/components/data/row-highlight.plugin.js.map +1 -1
  44. package/dist/collection/components/data/row-renderer.js.map +1 -1
  45. package/dist/collection/components/editors/revogr-edit-style.css +8 -5
  46. package/dist/collection/components/editors/revogr-edit.js +2 -2
  47. package/dist/collection/components/editors/revogr-edit.js.map +1 -1
  48. package/dist/collection/components/editors/text-editor.js +2 -2
  49. package/dist/collection/components/editors/text-editor.js.map +1 -1
  50. package/dist/collection/components/extra/revogr-extra.js +44 -6
  51. package/dist/collection/components/extra/revogr-extra.js.map +1 -1
  52. package/dist/collection/components/header/header-cell-renderer.js.map +1 -1
  53. package/dist/collection/components/header/header-renderer.js.map +1 -1
  54. package/dist/collection/components/header/resizable.element.js.map +1 -1
  55. package/dist/collection/components/header/revogr-header-style.css +8 -5
  56. package/dist/collection/components/header/revogr-header.js +9 -9
  57. package/dist/collection/components/header/revogr-header.js.map +1 -1
  58. package/dist/collection/components/order/order-renderer.js.map +1 -1
  59. package/dist/collection/components/order/revogr-order-editor.js +12 -24
  60. package/dist/collection/components/order/revogr-order-editor.js.map +1 -1
  61. package/dist/collection/components/overlay/autofill.service.js +7 -5
  62. package/dist/collection/components/overlay/autofill.service.js.map +1 -1
  63. package/dist/collection/components/overlay/keyboard.service.js +1 -4
  64. package/dist/collection/components/overlay/keyboard.service.js.map +1 -1
  65. package/dist/collection/components/overlay/revogr-overlay-selection.js +88 -72
  66. package/dist/collection/components/overlay/revogr-overlay-selection.js.map +1 -1
  67. package/dist/collection/components/overlay/revogr-overlay-style.css +8 -5
  68. package/dist/collection/components/overlay/selection.utils.js.map +1 -1
  69. package/dist/collection/components/revoGrid/plugin.service.js +81 -0
  70. package/dist/collection/components/revoGrid/plugin.service.js.map +1 -0
  71. package/dist/collection/components/revoGrid/revo-grid-style.css +18 -11
  72. package/dist/collection/components/revoGrid/revo-grid.js +289 -140
  73. package/dist/collection/components/revoGrid/revo-grid.js.map +1 -1
  74. package/dist/collection/components/revoGrid/viewport.service.js +9 -9
  75. package/dist/collection/components/revoGrid/viewport.service.js.map +1 -1
  76. package/dist/collection/components/rowHeaders/revogr-row-headers.js +1 -1
  77. package/dist/collection/components/rowHeaders/revogr-row-headers.js.map +1 -1
  78. package/dist/collection/components/rowHeaders/row-header-render.js.map +1 -1
  79. package/dist/collection/components/scroll/revogr-viewport-scroll-style.css +8 -5
  80. package/dist/collection/components/scroll/revogr-viewport-scroll.js +26 -20
  81. package/dist/collection/components/scroll/revogr-viewport-scroll.js.map +1 -1
  82. package/dist/collection/components/scrollable/revogr-scroll-style.css +10 -7
  83. package/dist/collection/components/scrollable/revogr-scroll-virtual.js +10 -8
  84. package/dist/collection/components/scrollable/revogr-scroll-virtual.js.map +1 -1
  85. package/dist/collection/components/selectionFocus/revogr-focus-style.css +8 -5
  86. package/dist/collection/components/selectionFocus/revogr-focus.js +10 -10
  87. package/dist/collection/components/selectionFocus/revogr-focus.js.map +1 -1
  88. package/dist/collection/components/selectionTempRange/revogr-temp-range-style.css +8 -5
  89. package/dist/collection/components/selectionTempRange/revogr-temp-range.js +6 -6
  90. package/dist/collection/components/selectionTempRange/revogr-temp-range.js.map +1 -1
  91. package/dist/collection/components/vnode/vnode-converter.js +1 -1
  92. package/dist/collection/components/vnode/vnode-converter.js.map +1 -1
  93. package/dist/collection/components/vnode/vnode.utils.js.map +1 -1
  94. package/dist/collection/index.js.map +1 -1
  95. package/dist/collection/plugins/add-rows-on-paste.plugin.js +40 -0
  96. package/dist/collection/plugins/add-rows-on-paste.plugin.js.map +1 -0
  97. package/dist/collection/plugins/base.plugin.js.map +1 -1
  98. package/dist/collection/plugins/column.auto-size.plugin.js +1 -1
  99. package/dist/collection/plugins/column.auto-size.plugin.js.map +1 -1
  100. package/dist/collection/plugins/column.stretch.plugin.js +1 -1
  101. package/dist/collection/plugins/column.stretch.plugin.js.map +1 -1
  102. package/dist/collection/plugins/export/csv.js +1 -1
  103. package/dist/collection/plugins/export/csv.js.map +1 -1
  104. package/dist/collection/plugins/export/export.plugin.js +4 -2
  105. package/dist/collection/plugins/export/export.plugin.js.map +1 -1
  106. package/dist/collection/plugins/filter/filter.indexed.js +1 -0
  107. package/dist/collection/plugins/filter/filter.indexed.js.map +1 -1
  108. package/dist/collection/plugins/filter/filter.panel.js +35 -35
  109. package/dist/collection/plugins/filter/filter.panel.js.map +1 -1
  110. package/dist/collection/plugins/filter/filter.plugin.js +117 -77
  111. package/dist/collection/plugins/filter/filter.plugin.js.map +1 -1
  112. package/dist/collection/plugins/filter/filter.style.css +19 -5
  113. package/dist/collection/plugins/filter/filter.types.js.map +1 -1
  114. package/dist/collection/plugins/groupingColumn/columnGroupsRenderer.js.map +1 -1
  115. package/dist/collection/plugins/groupingColumn/headerGroupRenderer.js.map +1 -1
  116. package/dist/collection/plugins/groupingRow/grouping.const.js +1 -0
  117. package/dist/collection/plugins/groupingRow/grouping.const.js.map +1 -1
  118. package/dist/collection/plugins/groupingRow/grouping.row.plugin.js +64 -79
  119. package/dist/collection/plugins/groupingRow/grouping.row.plugin.js.map +1 -1
  120. package/dist/collection/plugins/groupingRow/grouping.row.renderer.js +3 -3
  121. package/dist/collection/plugins/groupingRow/grouping.row.renderer.js.map +1 -1
  122. package/dist/collection/plugins/groupingRow/grouping.row.types.js.map +1 -1
  123. package/dist/collection/plugins/groupingRow/grouping.service.js +40 -6
  124. package/dist/collection/plugins/groupingRow/grouping.service.js.map +1 -1
  125. package/dist/collection/plugins/index.js +2 -0
  126. package/dist/collection/plugins/index.js.map +1 -1
  127. package/dist/collection/plugins/moveColumn/column.drag.plugin.js +12 -6
  128. package/dist/collection/plugins/moveColumn/column.drag.plugin.js.map +1 -1
  129. package/dist/collection/plugins/sorting/sorting.func.js +42 -0
  130. package/dist/collection/plugins/sorting/sorting.func.js.map +1 -0
  131. package/dist/collection/plugins/sorting/sorting.plugin.js +71 -69
  132. package/dist/collection/plugins/sorting/sorting.plugin.js.map +1 -1
  133. package/dist/collection/plugins/sorting/sorting.types.js +2 -0
  134. package/dist/collection/plugins/sorting/sorting.types.js.map +1 -0
  135. package/dist/collection/serve/controller.js +32 -15
  136. package/dist/collection/serve/data.js +18 -11
  137. package/dist/collection/services/column.data.provider.js +5 -2
  138. package/dist/collection/services/column.data.provider.js.map +1 -1
  139. package/dist/collection/services/data.provider.js +18 -7
  140. package/dist/collection/services/data.provider.js.map +1 -1
  141. package/dist/collection/services/dimension.provider.js +32 -33
  142. package/dist/collection/services/dimension.provider.js.map +1 -1
  143. package/dist/collection/services/selection.store.connector.js +1 -1
  144. package/dist/collection/services/selection.store.connector.js.map +1 -1
  145. package/dist/collection/store/dataSource/data.proxy.js +9 -15
  146. package/dist/collection/store/dataSource/data.proxy.js.map +1 -1
  147. package/dist/collection/store/dataSource/data.store.js +1 -1
  148. package/dist/collection/store/dataSource/data.store.js.map +1 -1
  149. package/dist/collection/store/dataSource/trimmed.plugin.js +5 -8
  150. package/dist/collection/store/dataSource/trimmed.plugin.js.map +1 -1
  151. package/dist/collection/store/dimension/dimension.helpers.js +7 -9
  152. package/dist/collection/store/dimension/dimension.helpers.js.map +1 -1
  153. package/dist/collection/store/dimension/dimension.recalculate.plugin.js +35 -0
  154. package/dist/collection/store/dimension/dimension.recalculate.plugin.js.map +1 -0
  155. package/dist/collection/store/dimension/dimension.store.js +47 -67
  156. package/dist/collection/store/dimension/dimension.store.js.map +1 -1
  157. package/dist/collection/store/dimension/dimension.trim.plugin.js +61 -0
  158. package/dist/collection/store/dimension/dimension.trim.plugin.js.map +1 -0
  159. package/dist/collection/store/selection/selection.store.js +1 -1
  160. package/dist/collection/store/selection/selection.store.js.map +1 -1
  161. package/dist/collection/store/vp/viewport.store.js +4 -2
  162. package/dist/collection/store/vp/viewport.store.js.map +1 -1
  163. package/dist/collection/types/events.js +6 -2
  164. package/dist/collection/types/events.js.map +1 -1
  165. package/dist/collection/types/interfaces.js +4 -0
  166. package/dist/collection/types/interfaces.js.map +1 -1
  167. package/dist/collection/types/plugin.types.js.map +1 -1
  168. package/dist/collection/types/selection.js.map +1 -1
  169. package/dist/collection/types/viewport.interfaces.js.map +1 -1
  170. package/dist/collection/utils/column.utils.js +13 -3
  171. package/dist/collection/utils/column.utils.js.map +1 -1
  172. package/dist/esm/app-globals-3a760941.js.map +1 -1
  173. package/dist/esm/{column.drag.plugin-3cc77986.js → column.drag.plugin-50f49fa9.js} +1012 -130
  174. package/dist/esm/column.drag.plugin-50f49fa9.js.map +1 -0
  175. package/dist/esm/column.service-a6a7c415.js +1281 -0
  176. package/dist/esm/column.service-a6a7c415.js.map +1 -0
  177. package/dist/esm/{debounce-72878ced.js → debounce-b3166f78.js} +2 -2
  178. package/dist/esm/{debounce-72878ced.js.map → debounce-b3166f78.js.map} +1 -1
  179. package/dist/esm/{column.service-751345b2.js → dimension.helpers-d0d709c4.js} +450 -1234
  180. package/dist/esm/dimension.helpers-d0d709c4.js.map +1 -0
  181. package/dist/esm/{edit.utils-6fc686b9.js → edit.utils-0ae0db50.js} +2 -2
  182. package/dist/esm/{edit.utils-6fc686b9.js.map → edit.utils-0ae0db50.js.map} +1 -1
  183. package/dist/esm/{header-cell-renderer-32d2ed96.js → header-cell-renderer-36ecbdef.js} +2 -2
  184. package/dist/esm/{header-cell-renderer-32d2ed96.js.map → header-cell-renderer-36ecbdef.js.map} +1 -1
  185. package/dist/esm/index.js +52 -11
  186. package/dist/esm/index.js.map +1 -1
  187. package/dist/esm/{key.utils-17273f42.js → key.utils-7c3218d4.js} +2 -2
  188. package/dist/esm/{key.utils-17273f42.js.map → key.utils-7c3218d4.js.map} +1 -1
  189. package/dist/esm/loader.js +1 -1
  190. package/dist/esm/revo-grid.entry.js +246 -877
  191. package/dist/esm/revo-grid.entry.js.map +1 -1
  192. package/dist/esm/revo-grid.js +1 -1
  193. package/dist/esm/revogr-attribution_7.entry.js +63 -33
  194. package/dist/esm/revogr-attribution_7.entry.js.map +1 -1
  195. package/dist/esm/revogr-clipboard_3.entry.js +7 -6
  196. package/dist/esm/revogr-clipboard_3.entry.js.map +1 -1
  197. package/dist/esm/revogr-data_4.entry.js +60 -50
  198. package/dist/esm/revogr-data_4.entry.js.map +1 -1
  199. package/dist/esm/revogr-filter-panel.entry.js +34 -14
  200. package/dist/esm/revogr-filter-panel.entry.js.map +1 -1
  201. package/dist/esm/{text-editor-901c3eb8.js → text-editor-148a17c1.js} +5 -5
  202. package/dist/esm/text-editor-148a17c1.js.map +1 -0
  203. package/dist/esm/{throttle-138d69c3.js → throttle-394e489c.js} +3 -3
  204. package/dist/esm/{throttle-138d69c3.js.map → throttle-394e489c.js.map} +1 -1
  205. package/dist/esm/{row-header-utils-3dfbb81f.js → viewport.store-afa8c4fe.js} +11 -10
  206. package/dist/esm/viewport.store-afa8c4fe.js.map +1 -0
  207. package/dist/revo-grid/app-globals-3a760941.js +8 -1
  208. package/dist/revo-grid/app-globals-3a760941.js.map +1 -1
  209. package/dist/revo-grid/column.drag.plugin-50f49fa9.js +2541 -0
  210. package/dist/revo-grid/column.drag.plugin-50f49fa9.js.map +1 -0
  211. package/dist/revo-grid/column.service-a6a7c415.js +1281 -0
  212. package/dist/revo-grid/column.service-a6a7c415.js.map +1 -0
  213. package/dist/revo-grid/debounce-b3166f78.js +495 -0
  214. package/dist/revo-grid/debounce-b3166f78.js.map +1 -0
  215. package/dist/revo-grid/dimension.helpers-d0d709c4.js +3611 -0
  216. package/dist/revo-grid/dimension.helpers-d0d709c4.js.map +1 -0
  217. package/dist/revo-grid/edit.utils-0ae0db50.js +17 -0
  218. package/dist/revo-grid/edit.utils-0ae0db50.js.map +1 -0
  219. package/dist/revo-grid/events-cf0893a3.js +38 -1
  220. package/dist/revo-grid/events-cf0893a3.js.map +1 -1
  221. package/dist/revo-grid/filter.button-d40ab17b.js +34 -1
  222. package/dist/revo-grid/filter.button-d40ab17b.js.map +1 -1
  223. package/dist/revo-grid/header-cell-renderer-36ecbdef.js +339 -0
  224. package/dist/revo-grid/header-cell-renderer-36ecbdef.js.map +1 -0
  225. package/dist/revo-grid/index-a61f225b.js +1845 -2
  226. package/dist/revo-grid/index-a61f225b.js.map +1 -1
  227. package/dist/revo-grid/index.esm.js +160 -1
  228. package/dist/revo-grid/index.esm.js.map +1 -1
  229. package/dist/revo-grid/key.utils-7c3218d4.js +89 -0
  230. package/dist/revo-grid/key.utils-7c3218d4.js.map +1 -0
  231. package/dist/revo-grid/resize-observer-83c9e167.js +501 -1
  232. package/dist/revo-grid/resize-observer-83c9e167.js.map +1 -1
  233. package/dist/revo-grid/revo-grid.entry.js +1934 -1
  234. package/dist/revo-grid/revo-grid.entry.js.map +1 -1
  235. package/dist/revo-grid/revo-grid.esm.js +21 -1
  236. package/dist/revo-grid/revo-grid.esm.js.map +1 -1
  237. package/dist/revo-grid/revogr-attribution_7.entry.js +1431 -1
  238. package/dist/revo-grid/revogr-attribution_7.entry.js.map +1 -1
  239. package/dist/revo-grid/revogr-clipboard_3.entry.js +455 -1
  240. package/dist/revo-grid/revogr-clipboard_3.entry.js.map +1 -1
  241. package/dist/revo-grid/revogr-data_4.entry.js +974 -1
  242. package/dist/revo-grid/revogr-data_4.entry.js.map +1 -1
  243. package/dist/revo-grid/revogr-filter-panel.entry.js +340 -1
  244. package/dist/revo-grid/revogr-filter-panel.entry.js.map +1 -1
  245. package/dist/revo-grid/sorting.sign-1a675bf7.js +9 -1
  246. package/dist/revo-grid/sorting.sign-1a675bf7.js.map +1 -1
  247. package/dist/revo-grid/text-editor-148a17c1.js +80 -0
  248. package/dist/revo-grid/text-editor-148a17c1.js.map +1 -0
  249. package/dist/revo-grid/throttle-394e489c.js +230 -0
  250. package/dist/revo-grid/throttle-394e489c.js.map +1 -0
  251. package/dist/revo-grid/viewport.helpers-7e7f9dad.js +48 -1
  252. package/dist/revo-grid/viewport.helpers-7e7f9dad.js.map +1 -1
  253. package/dist/revo-grid/viewport.store-afa8c4fe.js +406 -0
  254. package/dist/revo-grid/viewport.store-afa8c4fe.js.map +1 -0
  255. package/dist/types/components/data/cell-renderer.d.ts +3 -5
  256. package/dist/types/components/data/column.service.d.ts +2 -3
  257. package/dist/types/components/data/revogr-data.d.ts +10 -6
  258. package/dist/types/components/data/row-highlight.plugin.d.ts +1 -1
  259. package/dist/types/components/data/row-renderer.d.ts +1 -1
  260. package/dist/types/components/editors/revogr-edit.d.ts +2 -2
  261. package/dist/types/components/editors/text-editor.d.ts +5 -6
  262. package/dist/types/components/extra/revogr-extra.d.ts +17 -3
  263. package/dist/types/components/header/header-cell-renderer.d.ts +1 -1
  264. package/dist/types/components/header/header-renderer.d.ts +2 -2
  265. package/dist/types/components/header/resizable.element.d.ts +1 -1
  266. package/dist/types/components/header/revogr-header.d.ts +2 -3
  267. package/dist/types/components/order/order-renderer.d.ts +1 -1
  268. package/dist/types/components/order/revogr-order-editor.d.ts +4 -10
  269. package/dist/types/components/overlay/autofill.service.d.ts +2 -2
  270. package/dist/types/components/overlay/keyboard.service.d.ts +1 -1
  271. package/dist/types/components/overlay/revogr-overlay-selection.d.ts +16 -13
  272. package/dist/types/components/overlay/selection.utils.d.ts +1 -1
  273. package/dist/types/components/revoGrid/plugin.service.d.ts +37 -0
  274. package/dist/types/components/revoGrid/revo-grid.d.ts +105 -61
  275. package/dist/types/components/revoGrid/viewport.service.d.ts +2 -2
  276. package/dist/types/components/rowHeaders/row-header-render.d.ts +2 -2
  277. package/dist/types/components/scroll/revogr-viewport-scroll.d.ts +2 -5
  278. package/dist/types/components/scrollable/revogr-scroll-virtual.d.ts +2 -3
  279. package/dist/types/components/selectionFocus/revogr-focus.d.ts +2 -2
  280. package/dist/types/components/selectionTempRange/revogr-temp-range.d.ts +2 -3
  281. package/dist/types/components/vnode/vnode-converter.d.ts +1 -1
  282. package/dist/types/components/vnode/vnode.utils.d.ts +2 -2
  283. package/dist/types/components.d.ts +191 -108
  284. package/dist/types/index.d.ts +1 -1
  285. package/dist/types/plugins/add-rows-on-paste.plugin.d.ts +14 -0
  286. package/dist/types/plugins/base.plugin.d.ts +3 -4
  287. package/dist/types/plugins/column.auto-size.plugin.d.ts +1 -1
  288. package/dist/types/plugins/column.stretch.plugin.d.ts +1 -1
  289. package/dist/types/plugins/export/csv.d.ts +1 -1
  290. package/dist/types/plugins/export/export.plugin.d.ts +4 -3
  291. package/dist/types/plugins/filter/filter.panel.d.ts +2 -2
  292. package/dist/types/plugins/filter/filter.plugin.d.ts +25 -7
  293. package/dist/types/plugins/filter/filter.types.d.ts +32 -10
  294. package/dist/types/plugins/groupingColumn/columnGroupsRenderer.d.ts +2 -2
  295. package/dist/types/plugins/groupingColumn/headerGroupRenderer.d.ts +3 -4
  296. package/dist/types/plugins/groupingRow/grouping.const.d.ts +3 -1
  297. package/dist/types/plugins/groupingRow/grouping.row.plugin.d.ts +15 -10
  298. package/dist/types/plugins/groupingRow/grouping.row.types.d.ts +38 -4
  299. package/dist/types/plugins/groupingRow/grouping.service.d.ts +9 -12
  300. package/dist/types/plugins/index.d.ts +2 -0
  301. package/dist/types/plugins/moveColumn/column.drag.plugin.d.ts +2 -2
  302. package/dist/types/plugins/sorting/sorting.func.d.ts +3 -0
  303. package/dist/types/plugins/sorting/sorting.plugin.d.ts +14 -13
  304. package/dist/types/plugins/sorting/sorting.types.d.ts +13 -0
  305. package/dist/types/services/column.data.provider.d.ts +5 -2
  306. package/dist/types/services/data.provider.d.ts +3 -1
  307. package/dist/types/services/dimension.provider.d.ts +9 -4
  308. package/dist/types/services/selection.store.connector.d.ts +4 -4
  309. package/dist/types/store/dataSource/data.proxy.d.ts +7 -9
  310. package/dist/types/store/dataSource/data.store.d.ts +2 -3
  311. package/dist/types/store/dataSource/trimmed.plugin.d.ts +1 -1
  312. package/dist/types/store/dimension/dimension.helpers.d.ts +1 -4
  313. package/dist/types/store/dimension/dimension.recalculate.plugin.d.ts +9 -0
  314. package/dist/types/store/dimension/dimension.store.d.ts +3 -2
  315. package/dist/types/store/dimension/dimension.trim.plugin.d.ts +13 -0
  316. package/dist/types/store/selection/selection.store.d.ts +1 -1
  317. package/dist/types/store/vp/viewport.store.d.ts +1 -1
  318. package/dist/types/types/events.d.ts +1 -1
  319. package/dist/types/types/interfaces.d.ts +36 -12
  320. package/dist/types/types/plugin.types.d.ts +17 -1
  321. package/dist/types/types/selection.d.ts +23 -17
  322. package/dist/types/types/viewport.interfaces.d.ts +1 -3
  323. package/dist/types/utils/column.utils.d.ts +1 -0
  324. package/hydrate/index.js +2490 -2135
  325. package/hydrate/index.mjs +2490 -2135
  326. package/package.json +20 -19
  327. package/readme.md +15 -17
  328. package/standalone/column.service.js +192 -160
  329. package/standalone/column.service.js.map +1 -1
  330. package/standalone/data.store.js +36 -25
  331. package/standalone/data.store.js.map +1 -1
  332. package/standalone/dimension.helpers.js +8 -10
  333. package/standalone/dimension.helpers.js.map +1 -1
  334. package/standalone/index.js +46 -6
  335. package/standalone/index.js.map +1 -1
  336. package/standalone/revo-grid.js +1275 -1022
  337. package/standalone/revo-grid.js.map +1 -1
  338. package/standalone/revogr-attribution2.js +1 -1
  339. package/standalone/revogr-attribution2.js.map +1 -1
  340. package/standalone/revogr-data2.js +26 -22
  341. package/standalone/revogr-data2.js.map +1 -1
  342. package/standalone/revogr-edit2.js +3 -3
  343. package/standalone/revogr-edit2.js.map +1 -1
  344. package/standalone/revogr-extra2.js +25 -4
  345. package/standalone/revogr-extra2.js.map +1 -1
  346. package/standalone/revogr-filter-panel.js +34 -14
  347. package/standalone/revogr-filter-panel.js.map +1 -1
  348. package/standalone/revogr-focus2.js +2 -1
  349. package/standalone/revogr-focus2.js.map +1 -1
  350. package/standalone/revogr-header2.js +6 -5
  351. package/standalone/revogr-header2.js.map +1 -1
  352. package/standalone/revogr-order-editor2.js +3 -0
  353. package/standalone/revogr-order-editor2.js.map +1 -1
  354. package/standalone/revogr-overlay-selection2.js +29 -17
  355. package/standalone/revogr-overlay-selection2.js.map +1 -1
  356. package/standalone/revogr-row-headers2.js +12 -9
  357. package/standalone/revogr-row-headers2.js.map +1 -1
  358. package/standalone/revogr-scroll-virtual2.js +6 -4
  359. package/standalone/revogr-scroll-virtual2.js.map +1 -1
  360. package/standalone/revogr-temp-range2.js +1 -1
  361. package/standalone/revogr-temp-range2.js.map +1 -1
  362. package/standalone/revogr-viewport-scroll2.js +27 -21
  363. package/standalone/revogr-viewport-scroll2.js.map +1 -1
  364. package/standalone/selection.utils.js +1 -0
  365. package/standalone/selection.utils.js.map +1 -1
  366. package/standalone/vnode-converter.js +1 -1
  367. package/standalone/vnode-converter.js.map +1 -1
  368. package/dist/cjs/column.drag.plugin-fcd892ec.js.map +0 -1
  369. package/dist/cjs/column.service-26c61ed6.js.map +0 -1
  370. package/dist/cjs/index-3ab26ab9.js +0 -513
  371. package/dist/cjs/index-3ab26ab9.js.map +0 -1
  372. package/dist/cjs/key.utils-f49d7bee.js +0 -101
  373. package/dist/cjs/key.utils-f49d7bee.js.map +0 -1
  374. package/dist/cjs/row-header-utils-c37f76e4.js.map +0 -1
  375. package/dist/cjs/text-editor-b756d6b3.js.map +0 -1
  376. package/dist/esm/column.drag.plugin-3cc77986.js.map +0 -1
  377. package/dist/esm/column.service-751345b2.js.map +0 -1
  378. package/dist/esm/index-1dcad6ef.js +0 -476
  379. package/dist/esm/index-1dcad6ef.js.map +0 -1
  380. package/dist/esm/row-header-utils-3dfbb81f.js.map +0 -1
  381. package/dist/esm/text-editor-901c3eb8.js.map +0 -1
  382. package/dist/revo-grid/column.drag.plugin-3cc77986.js +0 -5
  383. package/dist/revo-grid/column.drag.plugin-3cc77986.js.map +0 -1
  384. package/dist/revo-grid/column.service-751345b2.js +0 -5
  385. package/dist/revo-grid/column.service-751345b2.js.map +0 -1
  386. package/dist/revo-grid/debounce-72878ced.js +0 -5
  387. package/dist/revo-grid/debounce-72878ced.js.map +0 -1
  388. package/dist/revo-grid/edit.utils-6fc686b9.js +0 -5
  389. package/dist/revo-grid/edit.utils-6fc686b9.js.map +0 -1
  390. package/dist/revo-grid/header-cell-renderer-32d2ed96.js +0 -5
  391. package/dist/revo-grid/header-cell-renderer-32d2ed96.js.map +0 -1
  392. package/dist/revo-grid/index-1dcad6ef.js +0 -5
  393. package/dist/revo-grid/index-1dcad6ef.js.map +0 -1
  394. package/dist/revo-grid/key.utils-17273f42.js +0 -5
  395. package/dist/revo-grid/key.utils-17273f42.js.map +0 -1
  396. package/dist/revo-grid/row-header-utils-3dfbb81f.js +0 -5
  397. package/dist/revo-grid/row-header-utils-3dfbb81f.js.map +0 -1
  398. package/dist/revo-grid/text-editor-901c3eb8.js +0 -5
  399. package/dist/revo-grid/text-editor-901c3eb8.js.map +0 -1
  400. package/dist/revo-grid/throttle-138d69c3.js +0 -5
  401. package/dist/revo-grid/throttle-138d69c3.js.map +0 -1
  402. package/standalone/identity.js +0 -26
  403. package/standalone/identity.js.map +0 -1
@@ -1,5 +1,38 @@
1
1
  /*!
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
- import{h as t}from"./index-a61f225b.js";const s="rv-filter";const o="active";const n="hasFilter";const r="and-or-button";const e="trash-button";const l=({column:r})=>t("span",null,t("button",{class:{[s]:true,[o]:r&&!!r[n]}},t("svg",{class:"filter-img",viewBox:"0 0 64 64"},t("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},t("path",{d:"M43,48 L43,56 L21,56 L21,48 L43,48 Z M53,28 L53,36 L12,36 L12,28 L53,28 Z M64,8 L64,16 L0,16 L0,8 L64,8 Z",fill:"currentColor"})))));const a=()=>t("div",{class:{[e]:true}},t("svg",{class:"trash-img",viewBox:"0 0 24 24"},t("path",{fill:"currentColor",d:"M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z"})));const i=({text:s})=>t("button",{class:{[r]:true,"light revo-button":true}},s);function c(t){if(t.classList.contains(s)){return true}return t===null||t===void 0?void 0:t.closest(`.${s}`)}export{r as A,s as F,e as T,o as a,n as b,l as c,a as d,i as e,c as i};
4
+ import { h } from './index-a61f225b.js';
5
+
6
+ const FILTER_BUTTON_CLASS = 'rv-filter';
7
+ const FILTER_BUTTON_ACTIVE = 'active';
8
+ const FILTER_PROP = 'hasFilter';
9
+ const AND_OR_BUTTON = 'and-or-button';
10
+ const TRASH_BUTTON = 'trash-button';
11
+ const FilterButton = ({ column }) => {
12
+ return (h("span", null,
13
+ h("button", { class: {
14
+ [FILTER_BUTTON_CLASS]: true,
15
+ [FILTER_BUTTON_ACTIVE]: column && !!column[FILTER_PROP],
16
+ } },
17
+ h("svg", { class: "filter-img", viewBox: "0 0 64 64" },
18
+ h("g", { stroke: "none", "stroke-width": "1", fill: "none", "fill-rule": "evenodd" },
19
+ h("path", { d: "M43,48 L43,56 L21,56 L21,48 L43,48 Z M53,28 L53,36 L12,36 L12,28 L53,28 Z M64,8 L64,16 L0,16 L0,8 L64,8 Z", fill: "currentColor" }))))));
20
+ };
21
+ const TrashButton = () => {
22
+ return (h("div", { class: { [TRASH_BUTTON]: true } },
23
+ h("svg", { class: "trash-img", viewBox: "0 0 24 24" },
24
+ h("path", { fill: "currentColor", d: "M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z" }))));
25
+ };
26
+ const AndOrButton = ({ text }) => {
27
+ return h("button", { class: { [AND_OR_BUTTON]: true, 'light revo-button': true } }, text);
28
+ };
29
+ function isFilterBtn(e) {
30
+ if (e.classList.contains(FILTER_BUTTON_CLASS)) {
31
+ return true;
32
+ }
33
+ return e === null || e === void 0 ? void 0 : e.closest(`.${FILTER_BUTTON_CLASS}`);
34
+ }
35
+
36
+ export { AND_OR_BUTTON as A, FILTER_BUTTON_CLASS as F, TRASH_BUTTON as T, FILTER_BUTTON_ACTIVE as a, FILTER_PROP as b, FilterButton as c, TrashButton as d, AndOrButton as e, isFilterBtn as i };
37
+
5
38
  //# sourceMappingURL=filter.button-d40ab17b.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["FILTER_BUTTON_CLASS","FILTER_BUTTON_ACTIVE","FILTER_PROP","AND_OR_BUTTON","TRASH_BUTTON","FilterButton","column","h","class","viewBox","stroke","fill","d","TrashButton","AndOrButton","text","isFilterBtn","e","classList","contains","closest"],"sources":["src/plugins/filter/filter.button.tsx"],"sourcesContent":["import { h } from '@stencil/core';\nimport { ColumnRegular } from '@type';\n\nexport const FILTER_BUTTON_CLASS = 'rv-filter';\nexport const FILTER_BUTTON_ACTIVE = 'active';\n\nexport const FILTER_PROP = 'hasFilter';\nexport const AND_OR_BUTTON = 'and-or-button';\nexport const TRASH_BUTTON = 'trash-button';\n\ntype Props = {\n column: ColumnRegular;\n};\nexport const FilterButton = ({ column }: Props) => {\n return (\n <span>\n <button\n class={{\n [FILTER_BUTTON_CLASS]: true,\n [FILTER_BUTTON_ACTIVE]: column && !!column[FILTER_PROP],\n }}\n >\n <svg class=\"filter-img\" viewBox=\"0 0 64 64\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M43,48 L43,56 L21,56 L21,48 L43,48 Z M53,28 L53,36 L12,36 L12,28 L53,28 Z M64,8 L64,16 L0,16 L0,8 L64,8 Z\" fill=\"currentColor\"></path>\n </g>\n </svg>\n </button>\n </span>\n );\n};\n\nexport const TrashButton = () => {\n return (\n <div class={{ [TRASH_BUTTON]: true }}>\n <svg class=\"trash-img\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z\" />\n </svg>\n </div>\n );\n};\nexport const AndOrButton = ({ text }: any) => {\n return <button class={{ [AND_OR_BUTTON]: true, 'light revo-button': true }}>{text}</button>;\n};\n\nexport function isFilterBtn(e: HTMLElement) {\n if (e.classList.contains(FILTER_BUTTON_CLASS)) {\n return true;\n }\n return e?.closest(`.${FILTER_BUTTON_CLASS}`);\n}\n"],"mappings":";;;8CAGaA,EAAsB,Y,MACtBC,EAAuB,S,MAEvBC,EAAc,Y,MACdC,EAAgB,gB,MAChBC,EAAe,e,MAKfC,EAAe,EAAGC,YAE3BC,EAAA,YACEA,EAAA,UACEC,MAAO,CACLR,CAACA,GAAsB,KACvBC,CAACA,GAAuBK,KAAYA,EAAOJ,KAG7CK,EAAA,OAAKC,MAAM,aAAaC,QAAQ,aAC9BF,EAAA,KAAGG,OAAO,OAAM,eAAc,IAAIC,KAAK,OAAM,YAAW,WACtDJ,EAAA,QAAMK,EAAE,4GAA4GD,KAAK,qB,MAQxHE,EAAc,IAEvBN,EAAA,OAAKC,MAAO,CAAEJ,CAACA,GAAe,OAC5BG,EAAA,OAAKC,MAAM,YAAYC,QAAQ,aAC7BF,EAAA,QAAMI,KAAK,eAAeC,EAAE,mH,MAKvBE,EAAc,EAAGC,UACrBR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CAAC,CAAc;IACxC,IAAI,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,mBAAmB,CAAC,EAAE;QAC7C,OAAO,IAAI,CAAC;KACb;IACD,OAAO,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,OAAO,CAAC,IAAI,mBAAmB,EAAE,CAAC,CAAC;AAC/C;;;;","names":[],"sources":["src/plugins/filter/filter.button.tsx"],"sourcesContent":["import { h } from '@stencil/core';\nimport { ColumnRegular } from '@type';\n\nexport const FILTER_BUTTON_CLASS = 'rv-filter';\nexport const FILTER_BUTTON_ACTIVE = 'active';\n\nexport const FILTER_PROP = 'hasFilter';\nexport const AND_OR_BUTTON = 'and-or-button';\nexport const TRASH_BUTTON = 'trash-button';\n\ntype Props = {\n column: ColumnRegular;\n};\nexport const FilterButton = ({ column }: Props) => {\n return (\n <span>\n <button\n class={{\n [FILTER_BUTTON_CLASS]: true,\n [FILTER_BUTTON_ACTIVE]: column && !!column[FILTER_PROP],\n }}\n >\n <svg class=\"filter-img\" viewBox=\"0 0 64 64\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M43,48 L43,56 L21,56 L21,48 L43,48 Z M53,28 L53,36 L12,36 L12,28 L53,28 Z M64,8 L64,16 L0,16 L0,8 L64,8 Z\" fill=\"currentColor\"></path>\n </g>\n </svg>\n </button>\n </span>\n );\n};\n\nexport const TrashButton = () => {\n return (\n <div class={{ [TRASH_BUTTON]: true }}>\n <svg class=\"trash-img\" viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z\" />\n </svg>\n </div>\n );\n};\nexport const AndOrButton = ({ text }: any) => {\n return <button class={{ [AND_OR_BUTTON]: true, 'light revo-button': true }}>{text}</button>;\n};\n\nexport function isFilterBtn(e: HTMLElement) {\n if (e.classList.contains(FILTER_BUTTON_CLASS)) {\n return true;\n }\n return e?.closest(`.${FILTER_BUTTON_CLASS}`);\n}\n"],"version":3}
@@ -0,0 +1,339 @@
1
+ /*!
2
+ * Built by Revolist OU ❤️
3
+ */
4
+ import { h } from './index-a61f225b.js';
5
+ import { D as doPropMerge } from './column.service-a6a7c415.js';
6
+
7
+ /**
8
+ * Dispatches a custom event to a specified target element.
9
+ *
10
+ * @param target - The target element to dispatch the event to.
11
+ * @param eventName - The name of the custom event.
12
+ * @param detail - Optional. The detail of the custom event.
13
+ * @returns The custom event that was dispatched.
14
+ */
15
+ function dispatch(target, eventName, detail) {
16
+ // Create a new CustomEvent with the specified event name and detail.
17
+ const event = new CustomEvent(eventName, {
18
+ detail,
19
+ cancelable: true, // Indicates whether the event can be canceled.
20
+ bubbles: true, // Indicates whether the event bubbles up through the DOM.
21
+ });
22
+ // Dispatch the event on the target element.
23
+ target === null || target === void 0 ? void 0 : target.dispatchEvent(event);
24
+ // Return the custom event that was dispatched.
25
+ return event;
26
+ }
27
+ /**
28
+ * Dispatches a custom event based on an existing event object and prevents the default behavior of the original event.
29
+ *
30
+ * @param e - The original event object containing the target and preventDefault method.
31
+ * @param eventName - The name of the custom event.
32
+ * @param detail - Optional. The detail of the custom event.
33
+ * @returns The custom event that was dispatched.
34
+ */
35
+ function dispatchByEvent(e, // The original event object containing the target and preventDefault method.
36
+ eventName, // The name of the custom event.
37
+ detail) {
38
+ // Prevent the default behavior of the original event.
39
+ e.preventDefault();
40
+ // Dispatch the custom event to the target element specified in the original event object.
41
+ return dispatch(e.target, eventName, detail);
42
+ }
43
+
44
+ var ResizeEvents;
45
+ (function (ResizeEvents) {
46
+ ResizeEvents["start"] = "resize:start";
47
+ ResizeEvents["move"] = "resize:move";
48
+ ResizeEvents["end"] = "resize:end";
49
+ })(ResizeEvents || (ResizeEvents = {}));
50
+ const RESIZE_MASK = {
51
+ 'resizable-r': { bit: 0b0001, cursor: 'ew-resize' },
52
+ 'resizable-rb': { bit: 0b0011, cursor: 'se-resize' },
53
+ 'resizable-b': { bit: 0b0010, cursor: 's-resize' },
54
+ 'resizable-lb': { bit: 0b0110, cursor: 'sw-resize' },
55
+ 'resizable-l': { bit: 0b0100, cursor: 'w-resize' },
56
+ 'resizable-lt': { bit: 0b1100, cursor: 'nw-resize' },
57
+ 'resizable-t': { bit: 0b1000, cursor: 'n-resize' },
58
+ 'resizable-rt': { bit: 0b1001, cursor: 'ne-resize' },
59
+ };
60
+ const DISABLE_MASK = {
61
+ l: 0b0001,
62
+ t: 0b0010,
63
+ w: 0b0100,
64
+ h: 0b1000,
65
+ };
66
+ const defaultProps = (props) => {
67
+ return Object.assign(Object.assign({}, props), { fitParent: props.fitParent || false, active: props.active || [], disableAttributes: props.disableAttributes || [], minWidth: props.minWidth || 0, minHeight: props.minHeight || 0 });
68
+ };
69
+ class ResizeDirective {
70
+ constructor(initialProps, $event) {
71
+ var _a, _b;
72
+ this.initialProps = initialProps;
73
+ this.$event = $event;
74
+ this.mouseX = 0;
75
+ this.mouseY = 0;
76
+ this.width = 0;
77
+ this.height = 0;
78
+ this.changeX = 0;
79
+ this.changeY = 0;
80
+ this.disableCalcMap = 0b1111;
81
+ this.props = defaultProps(initialProps);
82
+ this.mouseMoveFunc = this.handleMove.bind(this);
83
+ this.mouseUpFunc = this.handleUp.bind(this);
84
+ this.minW = this.props.minWidth;
85
+ this.minH = this.props.minHeight;
86
+ this.maxW = (_a = this.props.maxWidth) !== null && _a !== void 0 ? _a : 0;
87
+ this.maxH = (_b = this.props.maxHeight) !== null && _b !== void 0 ? _b : 0;
88
+ this.parent = { width: 0, height: 0 };
89
+ this.resizeState = 0;
90
+ }
91
+ set($el) {
92
+ this.$el = $el;
93
+ this.props.disableAttributes.forEach(attr => {
94
+ switch (attr) {
95
+ case 'l':
96
+ this.disableCalcMap &= ~DISABLE_MASK.l;
97
+ break;
98
+ case 't':
99
+ this.disableCalcMap &= ~DISABLE_MASK.t;
100
+ break;
101
+ case 'w':
102
+ this.disableCalcMap &= ~DISABLE_MASK.w;
103
+ break;
104
+ case 'h':
105
+ this.disableCalcMap &= ~DISABLE_MASK.h;
106
+ }
107
+ });
108
+ }
109
+ emitEvent(eventName, additionalOptions) {
110
+ var _a;
111
+ if (!this.$event) {
112
+ return;
113
+ }
114
+ const isLeft = (_a = this.activeResizer) === null || _a === void 0 ? void 0 : _a.classList.contains('resizable-l');
115
+ this.$event(Object.assign({ eventName, width: this.width + this.changeX * (isLeft ? -1 : 1), height: this.height + this.changeY, changedX: this.changeX, changedY: this.changeY }, additionalOptions));
116
+ }
117
+ static isTouchEvent(e) {
118
+ var _a;
119
+ const event = e;
120
+ return ((_a = event.touches) === null || _a === void 0 ? void 0 : _a.length) >= 0;
121
+ }
122
+ handleMove(event) {
123
+ var _a;
124
+ if (!this.resizeState) {
125
+ return;
126
+ }
127
+ let eventY, eventX;
128
+ if (ResizeDirective.isTouchEvent(event)) {
129
+ eventY = event.touches[0].clientY;
130
+ eventX = event.touches[0].clientX;
131
+ }
132
+ else {
133
+ eventY = event.clientY;
134
+ eventX = event.clientX;
135
+ }
136
+ let isX = this.resizeState & RESIZE_MASK['resizable-r'].bit ||
137
+ this.resizeState & RESIZE_MASK['resizable-l'].bit;
138
+ let isY = this.resizeState & RESIZE_MASK['resizable-t'].bit ||
139
+ this.resizeState & RESIZE_MASK['resizable-b'].bit;
140
+ if (isY && this.disableCalcMap & DISABLE_MASK.h) {
141
+ let diffY = eventY - this.mouseY;
142
+ let changedY = this.changeY + diffY;
143
+ const newHeight = this.height + changedY;
144
+ // if overcrossed min height
145
+ if (newHeight < this.minH) {
146
+ changedY = -(this.height - this.minH);
147
+ }
148
+ // if overcrossed max heiht
149
+ if (this.maxH && newHeight > this.maxH) {
150
+ changedY = this.maxH - this.height;
151
+ }
152
+ this.changeY = changedY;
153
+ this.mouseY = eventY;
154
+ if (this.activeResizer) {
155
+ this.activeResizer.style.bottom = `${-this.changeY}px`;
156
+ }
157
+ }
158
+ if (isX && this.disableCalcMap & DISABLE_MASK.w) {
159
+ const isLeft = (_a = this.activeResizer) === null || _a === void 0 ? void 0 : _a.classList.contains('resizable-l');
160
+ let diffX = eventX - this.mouseX;
161
+ let changedX = this.changeX + diffX;
162
+ const newWidth = this.width + changedX * (isLeft ? -1 : 1);
163
+ // if overcrossed min width
164
+ if (newWidth < this.minW) {
165
+ changedX = -(this.width - this.minW);
166
+ }
167
+ // if overcrossed max width
168
+ if (this.maxW && newWidth > this.maxW) {
169
+ changedX = this.maxW - this.width;
170
+ }
171
+ this.changeX = changedX;
172
+ this.mouseX = eventX;
173
+ if (this.activeResizer) {
174
+ if (!isLeft) {
175
+ this.activeResizer.style.right = `${-this.changeX}px`;
176
+ }
177
+ else {
178
+ this.activeResizer.style.left = `${this.changeX}px`;
179
+ }
180
+ }
181
+ }
182
+ this.emitEvent(ResizeEvents.move);
183
+ }
184
+ handleDown(event) {
185
+ if (event.defaultPrevented) {
186
+ return;
187
+ }
188
+ // stop other events if resize in progress
189
+ event.preventDefault();
190
+ this.dropInitial();
191
+ for (let elClass in RESIZE_MASK) {
192
+ const target = event.target;
193
+ if (this.$el.contains(target) && (target === null || target === void 0 ? void 0 : target.classList.contains(elClass))) {
194
+ document.body.style.cursor = RESIZE_MASK[elClass].cursor;
195
+ if (ResizeDirective.isTouchEvent(event)) {
196
+ this.setInitials(event.touches[0], target);
197
+ }
198
+ else {
199
+ event.preventDefault && event.preventDefault();
200
+ this.setInitials(event, target);
201
+ }
202
+ this.resizeState = RESIZE_MASK[elClass].bit;
203
+ const eventName = ResizeEvents.start;
204
+ this.emitEvent(eventName);
205
+ break;
206
+ }
207
+ }
208
+ this.bindMove();
209
+ }
210
+ handleUp(e) {
211
+ e.preventDefault();
212
+ if (this.resizeState !== 0) {
213
+ this.resizeState = 0;
214
+ document.body.style.cursor = '';
215
+ const eventName = ResizeEvents.end;
216
+ this.emitEvent(eventName);
217
+ }
218
+ this.dropInitial();
219
+ this.unbindMove();
220
+ }
221
+ setInitials({ clientX, clientY }, target) {
222
+ var _a, _b, _c, _d;
223
+ const computedStyle = getComputedStyle(this.$el);
224
+ this.$el.classList.add('active');
225
+ this.activeResizer = target;
226
+ if (this.disableCalcMap & DISABLE_MASK.w) {
227
+ this.mouseX = clientX;
228
+ this.width = this.$el.clientWidth;
229
+ this.parent.width = (_b = (_a = this.$el.parentElement) === null || _a === void 0 ? void 0 : _a.clientWidth) !== null && _b !== void 0 ? _b : 0;
230
+ // min width
231
+ const minPaddingX = parseFloat(computedStyle.paddingLeft) +
232
+ parseFloat(computedStyle.paddingRight);
233
+ this.minW = Math.max(minPaddingX, this.initialProps.minWidth || 0);
234
+ // max width
235
+ if (this.initialProps.maxWidth) {
236
+ this.maxW = Math.max(this.width, this.initialProps.maxWidth);
237
+ }
238
+ }
239
+ if (this.disableCalcMap & DISABLE_MASK.h) {
240
+ this.mouseY = clientY;
241
+ this.height = this.$el.clientHeight;
242
+ this.parent.height = (_d = (_c = this.$el.parentElement) === null || _c === void 0 ? void 0 : _c.clientHeight) !== null && _d !== void 0 ? _d : 0;
243
+ // min height
244
+ const minPaddingY = parseFloat(computedStyle.paddingTop) +
245
+ parseFloat(computedStyle.paddingBottom);
246
+ this.minH = Math.max(minPaddingY, this.initialProps.minHeight || 0);
247
+ // max height
248
+ if (this.initialProps.maxHeight) {
249
+ this.maxH = Math.max(this.height, this.initialProps.maxHeight);
250
+ }
251
+ }
252
+ }
253
+ dropInitial() {
254
+ this.changeX = this.changeY = this.minW = this.minH;
255
+ this.width = this.height = 0;
256
+ if (this.activeResizer) {
257
+ this.activeResizer.removeAttribute('style');
258
+ }
259
+ this.$el.classList.remove('active');
260
+ this.activeResizer = undefined;
261
+ }
262
+ bindMove() {
263
+ document.documentElement.addEventListener('mouseup', this.mouseUpFunc, true);
264
+ document.documentElement.addEventListener('touchend', this.mouseUpFunc, true);
265
+ document.documentElement.addEventListener('mousemove', this.mouseMoveFunc, true);
266
+ document.documentElement.addEventListener('touchmove', this.mouseMoveFunc, true);
267
+ document.documentElement.addEventListener('mouseleave', this.mouseUpFunc);
268
+ }
269
+ unbindMove() {
270
+ document.documentElement.removeEventListener('mouseup', this.mouseUpFunc, true);
271
+ document.documentElement.removeEventListener('touchend', this.mouseUpFunc, true);
272
+ document.documentElement.removeEventListener('mousemove', this.mouseMoveFunc, true);
273
+ document.documentElement.removeEventListener('touchmove', this.mouseMoveFunc, true);
274
+ document.documentElement.removeEventListener('mouseleave', this.mouseUpFunc);
275
+ }
276
+ }
277
+
278
+ const ResizableElement = (props, children) => {
279
+ const resizeEls = [];
280
+ const directive = (props.canResize &&
281
+ new ResizeDirective(props, e => {
282
+ var _a;
283
+ if (e.eventName === ResizeEvents.end) {
284
+ (_a = props.onResize) === null || _a === void 0 ? void 0 : _a.call(props, e);
285
+ }
286
+ })) ||
287
+ null;
288
+ if (props.active) {
289
+ if (props.canResize) {
290
+ for (let p in props.active) {
291
+ resizeEls.push(h("div", { onClick: e => e.preventDefault(), onDblClick: e => {
292
+ var _a;
293
+ e.preventDefault();
294
+ (_a = props.onDblClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
295
+ }, onMouseDown: (e) => directive === null || directive === void 0 ? void 0 : directive.handleDown(e), onTouchStart: (e) => directive === null || directive === void 0 ? void 0 : directive.handleDown(e), class: `resizable resizable-${props.active[p]}` }));
296
+ }
297
+ }
298
+ else {
299
+ for (let p in props.active) {
300
+ resizeEls.push(h("div", { onClick: e => e.preventDefault(), onTouchStart: (e) => e.preventDefault(), onDblClick: e => {
301
+ var _a;
302
+ e.preventDefault();
303
+ (_a = props.onDblClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
304
+ }, class: `no-resize resizable resizable-${props.active[p]}` }));
305
+ }
306
+ }
307
+ }
308
+ return (h("div", Object.assign({}, props, { ref: e => e && (directive === null || directive === void 0 ? void 0 : directive.set(e)) }),
309
+ children,
310
+ resizeEls));
311
+ };
312
+
313
+ const ON_COLUMN_CLICK = 'columnclick';
314
+ const HeaderCellRenderer = ({ data, props, additionalData }, children) => {
315
+ let colTemplate = (data === null || data === void 0 ? void 0 : data.name) || '';
316
+ let cellProps = props;
317
+ if (data === null || data === void 0 ? void 0 : data.columnTemplate) {
318
+ colTemplate = data.columnTemplate(h, data, additionalData);
319
+ }
320
+ if (data === null || data === void 0 ? void 0 : data.columnProperties) {
321
+ const extra = data.columnProperties(data);
322
+ if (extra) {
323
+ cellProps = doPropMerge(props, extra);
324
+ }
325
+ }
326
+ const resizeProps = Object.assign(Object.assign({}, cellProps), { onMouseDown(e) {
327
+ dispatch(e.currentTarget, ON_COLUMN_CLICK, {
328
+ data,
329
+ event: e,
330
+ });
331
+ } });
332
+ return (h(ResizableElement, Object.assign({}, resizeProps),
333
+ h("div", { class: "header-content" }, colTemplate),
334
+ children));
335
+ };
336
+
337
+ export { HeaderCellRenderer as H, ON_COLUMN_CLICK as O, dispatchByEvent as a, dispatch as d };
338
+
339
+ //# sourceMappingURL=header-cell-renderer-36ecbdef.js.map
@@ -0,0 +1 @@
1
+ {"file":"header-cell-renderer-36ecbdef.js","mappings":";;;;;;AAAA;;;;;;;;SAQgB,QAAQ,CACtB,MAA4B,EAC5B,SAAiB,EACjB,MAAuB;;IAGvB,MAAM,KAAK,GAAG,IAAI,WAAW,CAAiB,SAAS,EAAE;QACvD,MAAM;QACN,UAAU,EAAE,IAAI;QAChB,OAAO,EAAE,IAAI;KACd,CAAC,CAAC;;IAGH,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,aAAa,CAAC,KAAK,CAAC,CAAC;;IAG7B,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;;;SAQgB,eAAe,CAC7B,CAAgD;AAChD,SAAiB;AACjB,MAAuB;;IAGvB,CAAC,CAAC,cAAc,EAAE,CAAC;;IAGnB,OAAO,QAAQ,CAAiB,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;AAC/D;;ACxBA,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,sCAAsB,CAAA;I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AAc,EAAE;QACxB,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;KAC5D;IACD,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,EAAE;QAC1B,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAC1C,IAAI,KAAK,EAAE;YACT,SAAS,GAAG,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SACvC;KACF;IACD,MAAM,WAAW,mCACZ,SAAS,KACZ,WAAW,CAAC,CAAa;YACvB,QAAQ,CAAC,CAAC,CAAC,aAAa,EAAE,eAAe,EAAE;gBACzC,IAAI;gBACJ,KAAK,EAAE,CAAC;aACT,CAAC,CAAC;SACJ,GACF,CAAC;IACF,QACE,EAAC,gBAAgB,oBAAK,WAAW;QAC/B,WAAK,KAAK,EAAC,gBAAgB,IAAE,WAAW,CAAO;QAC9C,QAAQ,CACQ,EACnB;AACJ;;;;","names":[],"sources":["src/plugins/dispatcher.ts","src/components/header/resizable.directive.tsx","src/components/header/resizable.element.tsx","src/components/header/header-cell-renderer.tsx"],"sourcesContent":["/**\n * Dispatches a custom event to a specified target element.\n *\n * @param target - The target element to dispatch the event to.\n * @param eventName - The name of the custom event.\n * @param detail - Optional. The detail of the custom event.\n * @returns The custom event that was dispatched.\n */\nexport function dispatch<DispatchDetail = any>(\n target: MouseEvent['target'],\n eventName: string,\n detail?: DispatchDetail,\n) {\n // Create a new CustomEvent with the specified event name and detail.\n const event = new CustomEvent<DispatchDetail>(eventName, {\n detail,\n cancelable: true, // Indicates whether the event can be canceled.\n bubbles: true, // Indicates whether the event bubbles up through the DOM.\n });\n\n // Dispatch the event on the target element.\n target?.dispatchEvent(event);\n\n // Return the custom event that was dispatched.\n return event;\n}\n\n/**\n * Dispatches a custom event based on an existing event object and prevents the default behavior of the original event.\n *\n * @param e - The original event object containing the target and preventDefault method.\n * @param eventName - The name of the custom event.\n * @param detail - Optional. The detail of the custom event.\n * @returns The custom event that was dispatched.\n */\nexport function dispatchByEvent<DispatchDetail = any>(\n e: Pick<MouseEvent, 'target' | 'preventDefault'>, // The original event object containing the target and preventDefault method.\n eventName: string, // The name of the custom event.\n detail?: DispatchDetail, // Optional. The detail of the custom event.\n): CustomEvent {\n // Prevent the default behavior of the original event.\n e.preventDefault();\n\n // Dispatch the custom event to the target element specified in the original event object.\n return dispatch<DispatchDetail>(e.target, eventName, detail);\n}\n","export type ResizeProps = {\n active: ('r' | 'rb' | 'b' | 'lb' | 'l' | 'lt' | 't' | 'rt')[]; // all\n fitParent: boolean; // false\n minWidth: number; // 0\n minHeight: number; // 0\n\n disableAttributes: ('l' | 't' | 'w' | 'h')[]; // []\n maxWidth?: number;\n maxHeight?: number;\n\n onResize?(e: ResizeEvent): void;\n};\n\nexport type ResizeEvent = {\n eventName: string;\n changedX?: number;\n changedY?: number;\n width?: number;\n height?: number;\n};\n\nexport enum ResizeEvents {\n start = 'resize:start',\n move = 'resize:move',\n end = 'resize:end',\n}\n\nconst RESIZE_MASK: { [key: string]: any } = {\n 'resizable-r': { bit: 0b0001, cursor: 'ew-resize' },\n 'resizable-rb': { bit: 0b0011, cursor: 'se-resize' },\n 'resizable-b': { bit: 0b0010, cursor: 's-resize' },\n 'resizable-lb': { bit: 0b0110, cursor: 'sw-resize' },\n 'resizable-l': { bit: 0b0100, cursor: 'w-resize' },\n 'resizable-lt': { bit: 0b1100, cursor: 'nw-resize' },\n 'resizable-t': { bit: 0b1000, cursor: 'n-resize' },\n 'resizable-rt': { bit: 0b1001, cursor: 'ne-resize' },\n};\n\nconst DISABLE_MASK = {\n l: 0b0001,\n t: 0b0010,\n w: 0b0100,\n h: 0b1000,\n};\n\nconst defaultProps = (props: Partial<ResizeProps>): ResizeProps => {\n return {\n ...props,\n fitParent: props.fitParent || false,\n active: props.active || [],\n disableAttributes: props.disableAttributes || [],\n minWidth: props.minWidth || 0,\n minHeight: props.minHeight || 0,\n };\n};\n\nexport class ResizeDirective {\n private $el: HTMLElement;\n private props: ResizeProps;\n private minW: number;\n private minH: number;\n private maxW: number;\n private maxH: number;\n\n private mouseX = 0;\n private mouseY = 0;\n\n private width = 0;\n private height = 0;\n\n private changeX = 0;\n private changeY = 0;\n\n private parent: { width: number; height: number };\n private resizeState: number;\n private activeResizer?: HTMLElement;\n private disableCalcMap = 0b1111;\n\n private mouseMoveFunc: () => void;\n private mouseUpFunc: () => void;\n\n constructor(\n private initialProps: Partial<ResizeProps>,\n private $event?: (e: ResizeEvent) => void,\n ) {\n this.props = defaultProps(initialProps);\n this.mouseMoveFunc = this.handleMove.bind(this);\n this.mouseUpFunc = this.handleUp.bind(this);\n\n this.minW = this.props.minWidth;\n this.minH = this.props.minHeight;\n this.maxW = this.props.maxWidth ?? 0;\n this.maxH = this.props.maxHeight ?? 0;\n this.parent = { width: 0, height: 0 };\n this.resizeState = 0;\n }\n\n set($el: HTMLElement) {\n this.$el = $el;\n this.props.disableAttributes.forEach(attr => {\n switch (attr) {\n case 'l':\n this.disableCalcMap &= ~DISABLE_MASK.l;\n break;\n case 't':\n this.disableCalcMap &= ~DISABLE_MASK.t;\n break;\n case 'w':\n this.disableCalcMap &= ~DISABLE_MASK.w;\n break;\n case 'h':\n this.disableCalcMap &= ~DISABLE_MASK.h;\n }\n });\n }\n emitEvent(eventName: string, additionalOptions?: any) {\n if (!this.$event) {\n return;\n }\n const isLeft = this.activeResizer?.classList.contains('resizable-l');\n this.$event({\n eventName,\n width: this.width + this.changeX * (isLeft ? -1 : 1),\n height: this.height + this.changeY,\n changedX: this.changeX,\n changedY: this.changeY,\n ...additionalOptions,\n });\n }\n\n private static isTouchEvent(e: MouseEvent | TouchEvent): e is TouchEvent {\n const event = e as TouchEvent;\n return event.touches?.length >= 0;\n }\n\n handleMove(event: MouseEvent | TouchEvent) {\n if (!this.resizeState) {\n return;\n }\n let eventY, eventX;\n if (ResizeDirective.isTouchEvent(event)) {\n eventY = event.touches[0].clientY;\n eventX = event.touches[0].clientX;\n } else {\n eventY = event.clientY;\n eventX = event.clientX;\n }\n let isX =\n this.resizeState & RESIZE_MASK['resizable-r'].bit ||\n this.resizeState & RESIZE_MASK['resizable-l'].bit;\n\n let isY =\n this.resizeState & RESIZE_MASK['resizable-t'].bit ||\n this.resizeState & RESIZE_MASK['resizable-b'].bit;\n\n if (isY && this.disableCalcMap & DISABLE_MASK.h) {\n let diffY = eventY - this.mouseY;\n let changedY = this.changeY + diffY;\n const newHeight = this.height + changedY;\n // if overcrossed min height\n if (newHeight < this.minH) {\n changedY = -(this.height - this.minH);\n }\n // if overcrossed max heiht\n if (this.maxH && newHeight > this.maxH) {\n changedY = this.maxH - this.height;\n }\n\n this.changeY = changedY;\n this.mouseY = eventY;\n\n if (this.activeResizer) {\n this.activeResizer.style.bottom = `${-this.changeY}px`;\n }\n }\n if (isX && this.disableCalcMap & DISABLE_MASK.w) {\n const isLeft = this.activeResizer?.classList.contains('resizable-l');\n let diffX = eventX - this.mouseX;\n let changedX = this.changeX + diffX;\n const newWidth = this.width + changedX * (isLeft ? -1 : 1);\n\n // if overcrossed min width\n if (newWidth < this.minW) {\n changedX = -(this.width - this.minW);\n }\n // if overcrossed max width\n if (this.maxW && newWidth > this.maxW) {\n changedX = this.maxW - this.width;\n }\n\n this.changeX = changedX;\n this.mouseX = eventX;\n\n if (this.activeResizer) {\n if (!isLeft) {\n this.activeResizer.style.right = `${-this.changeX}px`;\n } else {\n this.activeResizer.style.left = `${this.changeX}px`;\n }\n }\n }\n this.emitEvent(ResizeEvents.move);\n }\n\n handleDown(event: MouseEvent | TouchEvent) {\n if (event.defaultPrevented) {\n return;\n }\n // stop other events if resize in progress\n event.preventDefault();\n\n this.dropInitial();\n for (let elClass in RESIZE_MASK) {\n const target = event.target as HTMLElement | null;\n if (this.$el.contains(target) && target?.classList.contains(elClass)) {\n document.body.style.cursor = RESIZE_MASK[elClass].cursor;\n if (ResizeDirective.isTouchEvent(event)) {\n this.setInitials(event.touches[0], target);\n } else {\n event.preventDefault && event.preventDefault();\n this.setInitials(event, target);\n }\n this.resizeState = RESIZE_MASK[elClass].bit;\n const eventName = ResizeEvents.start;\n this.emitEvent(eventName);\n break;\n }\n }\n this.bindMove();\n }\n\n handleUp(e: MouseEvent) {\n e.preventDefault();\n if (this.resizeState !== 0) {\n this.resizeState = 0;\n document.body.style.cursor = '';\n const eventName = ResizeEvents.end;\n this.emitEvent(eventName);\n }\n this.dropInitial();\n this.unbindMove();\n }\n\n private setInitials(\n { clientX, clientY }: { clientX: number; clientY: number },\n target?: HTMLElement,\n ) {\n const computedStyle = getComputedStyle(this.$el);\n this.$el.classList.add('active');\n this.activeResizer = target;\n\n if (this.disableCalcMap & DISABLE_MASK.w) {\n this.mouseX = clientX;\n this.width = this.$el.clientWidth;\n this.parent.width = this.$el.parentElement?.clientWidth ?? 0;\n\n // min width\n const minPaddingX =\n parseFloat(computedStyle.paddingLeft) +\n parseFloat(computedStyle.paddingRight);\n this.minW = Math.max(minPaddingX, this.initialProps.minWidth || 0);\n\n // max width\n if (this.initialProps.maxWidth) {\n this.maxW = Math.max(this.width, this.initialProps.maxWidth);\n }\n }\n\n if (this.disableCalcMap & DISABLE_MASK.h) {\n this.mouseY = clientY;\n this.height = this.$el.clientHeight;\n this.parent.height = this.$el.parentElement?.clientHeight ?? 0;\n\n // min height\n const minPaddingY =\n parseFloat(computedStyle.paddingTop) +\n parseFloat(computedStyle.paddingBottom);\n this.minH = Math.max(minPaddingY, this.initialProps.minHeight || 0);\n // max height\n if (this.initialProps.maxHeight) {\n this.maxH = Math.max(this.height, this.initialProps.maxHeight);\n }\n }\n }\n\n private dropInitial() {\n this.changeX = this.changeY = this.minW = this.minH;\n this.width = this.height = 0;\n if (this.activeResizer) {\n this.activeResizer.removeAttribute('style');\n }\n this.$el.classList.remove('active');\n this.activeResizer = undefined;\n }\n\n private bindMove() {\n document.documentElement.addEventListener(\n 'mouseup',\n this.mouseUpFunc,\n true,\n );\n document.documentElement.addEventListener(\n 'touchend',\n this.mouseUpFunc,\n true,\n );\n document.documentElement.addEventListener(\n 'mousemove',\n this.mouseMoveFunc,\n true,\n );\n document.documentElement.addEventListener(\n 'touchmove',\n this.mouseMoveFunc,\n true,\n );\n document.documentElement.addEventListener('mouseleave', this.mouseUpFunc);\n }\n\n private unbindMove() {\n document.documentElement.removeEventListener(\n 'mouseup',\n this.mouseUpFunc,\n true,\n );\n document.documentElement.removeEventListener(\n 'touchend',\n this.mouseUpFunc,\n true,\n );\n document.documentElement.removeEventListener(\n 'mousemove',\n this.mouseMoveFunc,\n true,\n );\n document.documentElement.removeEventListener(\n 'touchmove',\n this.mouseMoveFunc,\n true,\n );\n document.documentElement.removeEventListener(\n 'mouseleave',\n this.mouseUpFunc,\n );\n }\n}\n","import { type FunctionalComponent, h, type VNode } from '@stencil/core';\nimport {\n ResizeProps,\n ResizeDirective,\n ResizeEvents,\n} from './resizable.directive';\nimport type { CellProps } from '@type';\n\nexport type ResizableElementHTMLAttributes = Partial<ResizeProps> & CellProps;\n\nexport const ResizableElement: FunctionalComponent = (\n props: ResizableElementHTMLAttributes,\n children: VNode[],\n) => {\n const resizeEls: VNode[] = [];\n const directive =\n (props.canResize &&\n new ResizeDirective(props, e => {\n if (e.eventName === ResizeEvents.end) {\n props.onResize?.(e);\n }\n })) ||\n null;\n\n if (props.active) {\n if (props.canResize) {\n for (let p in props.active) {\n resizeEls.push(\n <div\n onClick={e => e.preventDefault()}\n onDblClick={e => {\n e.preventDefault();\n props.onDblClick?.(e);\n }}\n onMouseDown={(e: MouseEvent) => directive?.handleDown(e)}\n onTouchStart={(e: TouchEvent) => directive?.handleDown(e)}\n class={`resizable resizable-${props.active[p]}`}\n />,\n );\n }\n } else {\n for (let p in props.active) {\n resizeEls.push(\n <div\n onClick={e => e.preventDefault()}\n onTouchStart={(e: TouchEvent) => e.preventDefault()}\n onDblClick={e => {\n e.preventDefault();\n props.onDblClick?.(e);\n }}\n class={`no-resize resizable resizable-${props.active[p]}`}\n />,\n );\n }\n }\n }\n return (\n <div {...props} ref={e => e && directive?.set(e)}>\n {children}\n {resizeEls}\n </div>\n );\n};\n","import { type FunctionalComponent, h } from '@stencil/core';\nimport { dispatch } from '../../plugins/dispatcher';\nimport { doPropMerge } from '../data/column.service';\nimport {\n ResizableElement,\n ResizableElementHTMLAttributes,\n} from './resizable.element';\nimport { ColumnTemplateProp } from '@type';\n\nexport const ON_COLUMN_CLICK = 'columnclick';\n\nexport const HeaderCellRenderer: FunctionalComponent<{\n props: ResizableElementHTMLAttributes;\n additionalData: any;\n data?: ColumnTemplateProp;\n}> = ({ data, props, additionalData }, children) => {\n let colTemplate: ReturnType<typeof h> = data?.name || '';\n let cellProps = props;\n if (data?.columnTemplate) {\n colTemplate = data.columnTemplate(h, data, additionalData);\n }\n if (data?.columnProperties) {\n const extra = data.columnProperties(data);\n if (extra) {\n cellProps = doPropMerge(props, extra);\n }\n }\n const resizeProps = {\n ...cellProps,\n onMouseDown(e: MouseEvent) {\n dispatch(e.currentTarget, ON_COLUMN_CLICK, {\n data,\n event: e,\n });\n },\n };\n return (\n <ResizableElement {...resizeProps}>\n <div class=\"header-content\">{colTemplate}</div>\n {children}\n </ResizableElement>\n );\n};\n"],"version":3}