@revolist/revogrid 4.4.0-next.2 → 4.4.0-next.21

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 (243) hide show
  1. package/custom-element/columnService.js +1 -1
  2. package/custom-element/consts.js +2 -1
  3. package/custom-element/consts.js.map +1 -1
  4. package/custom-element/localScrollService.js +1 -1
  5. package/custom-element/localScrollService.js.map +1 -1
  6. package/custom-element/revo-grid.js +163 -97
  7. package/custom-element/revo-grid.js.map +1 -1
  8. package/custom-element/revogr-clipboard.js +24 -5
  9. package/custom-element/revogr-clipboard.js.map +1 -1
  10. package/custom-element/revogr-edit2.js +12 -6
  11. package/custom-element/revogr-edit2.js.map +1 -1
  12. package/custom-element/revogr-focus2.js +1 -1
  13. package/custom-element/revogr-focus2.js.map +1 -1
  14. package/custom-element/revogr-header2.js +25 -11
  15. package/custom-element/revogr-header2.js.map +1 -1
  16. package/custom-element/revogr-overlay-selection2.js +99 -32
  17. package/custom-element/revogr-overlay-selection2.js.map +1 -1
  18. package/custom-element/revogr-row-headers2.js +1 -2
  19. package/custom-element/revogr-row-headers2.js.map +1 -1
  20. package/custom-element/revogr-viewport-scroll2.js +39 -6
  21. package/custom-element/revogr-viewport-scroll2.js.map +1 -1
  22. package/dist/cjs/{debounce-525dd66c.js → debounce-f50730b6.js} +1 -38
  23. package/dist/cjs/debounce-f50730b6.js.map +1 -0
  24. package/dist/cjs/dispatcher-20520c70.js +21 -0
  25. package/dist/cjs/dispatcher-20520c70.js.map +1 -0
  26. package/dist/cjs/events-030618fc.js +459 -0
  27. package/dist/cjs/events-030618fc.js.map +1 -0
  28. package/dist/cjs/filter.button-6badec7a.js +44 -0
  29. package/dist/cjs/filter.button-6badec7a.js.map +1 -0
  30. package/dist/cjs/{index-aad39b7b.js → index-ee2ef5ae.js} +96 -36
  31. package/dist/cjs/index-ee2ef5ae.js.map +1 -0
  32. package/dist/cjs/index-effc94b9.js +3944 -0
  33. package/dist/cjs/index-effc94b9.js.map +1 -0
  34. package/dist/cjs/isString-3dde8d95.js +38 -0
  35. package/dist/cjs/isString-3dde8d95.js.map +1 -0
  36. package/dist/cjs/keyCodes.utils-d665ebed.js +271 -0
  37. package/dist/cjs/keyCodes.utils-d665ebed.js.map +1 -0
  38. package/dist/cjs/loader.cjs.js +3 -3
  39. package/dist/cjs/loader.cjs.js.map +1 -1
  40. package/dist/cjs/localScrollService-a81823c5.js +403 -0
  41. package/dist/cjs/localScrollService-a81823c5.js.map +1 -0
  42. package/dist/cjs/revo-grid.cjs.entry.js +3858 -0
  43. package/dist/cjs/revo-grid.cjs.entry.js.map +1 -0
  44. package/dist/cjs/revo-grid.cjs.js +3 -3
  45. package/dist/cjs/revo-grid.cjs.js.map +1 -1
  46. package/dist/cjs/revogr-clipboard.cjs.entry.js +24 -6
  47. package/dist/cjs/revogr-clipboard.cjs.entry.js.map +1 -1
  48. package/dist/cjs/revogr-data_3.cjs.entry.js +1138 -0
  49. package/dist/cjs/revogr-data_3.cjs.entry.js.map +1 -0
  50. package/dist/cjs/revogr-edit_2.cjs.entry.js +325 -0
  51. package/dist/cjs/revogr-edit_2.cjs.entry.js.map +1 -0
  52. package/dist/cjs/revogr-filter-panel.cjs.entry.js +6 -5
  53. package/dist/cjs/revogr-filter-panel.cjs.entry.js.map +1 -1
  54. package/dist/cjs/revogr-focus_5.cjs.entry.js +1231 -0
  55. package/dist/cjs/revogr-focus_5.cjs.entry.js.map +1 -0
  56. package/dist/cjs/{revo-grid_11.cjs.entry.js → viewport.helpers-70ccec8f.js} +13978 -25269
  57. package/dist/cjs/viewport.helpers-70ccec8f.js.map +1 -0
  58. package/dist/collection/collection-manifest.json +1 -1
  59. package/dist/collection/components/clipboard/revogr-clipboard.d.ts +6 -2
  60. package/dist/collection/components/clipboard/revogr-clipboard.js +46 -5
  61. package/dist/collection/components/clipboard/revogr-clipboard.js.map +1 -1
  62. package/dist/collection/components/header/headerCellRenderer.d.ts +2 -1
  63. package/dist/collection/components/header/headerCellRenderer.js +1 -1
  64. package/dist/collection/components/header/headerCellRenderer.js.map +1 -1
  65. package/dist/collection/components/header/headerRenderer.d.ts +2 -2
  66. package/dist/collection/components/header/headerRenderer.js +1 -1
  67. package/dist/collection/components/header/headerRenderer.js.map +1 -1
  68. package/dist/collection/components/header/revogr-header.d.ts +15 -1
  69. package/dist/collection/components/header/revogr-header.js +34 -8
  70. package/dist/collection/components/header/revogr-header.js.map +1 -1
  71. package/dist/collection/components/overlay/autofill.service.d.ts +7 -3
  72. package/dist/collection/components/overlay/autofill.service.js +32 -12
  73. package/dist/collection/components/overlay/autofill.service.js.map +1 -1
  74. package/dist/collection/components/overlay/clipboard.service.d.ts +1 -1
  75. package/dist/collection/components/overlay/clipboard.service.js +2 -2
  76. package/dist/collection/components/overlay/clipboard.service.js.map +1 -1
  77. package/dist/collection/components/overlay/keyboard.service.js +2 -6
  78. package/dist/collection/components/overlay/keyboard.service.js.map +1 -1
  79. package/dist/collection/components/overlay/revogr-edit.d.ts +8 -0
  80. package/dist/collection/components/overlay/revogr-edit.js +34 -9
  81. package/dist/collection/components/overlay/revogr-edit.js.map +1 -1
  82. package/dist/collection/components/overlay/revogr-overlay-selection.d.ts +32 -10
  83. package/dist/collection/components/overlay/revogr-overlay-selection.js +80 -12
  84. package/dist/collection/components/overlay/revogr-overlay-selection.js.map +1 -1
  85. package/dist/collection/components/overlay/revogr-overlay-style.css +71 -4
  86. package/dist/collection/components/revoGrid/revo-grid.d.ts +15 -4
  87. package/dist/collection/components/revoGrid/revo-grid.js +60 -19
  88. package/dist/collection/components/revoGrid/revo-grid.js.map +1 -1
  89. package/dist/collection/components/revoGrid/viewport.scrolling.service.d.ts +6 -2
  90. package/dist/collection/components/revoGrid/viewport.scrolling.service.js +26 -4
  91. package/dist/collection/components/revoGrid/viewport.scrolling.service.js.map +1 -1
  92. package/dist/collection/components/revoGrid/viewport.section.d.ts +3 -2
  93. package/dist/collection/components/revoGrid/viewport.section.js +8 -4
  94. package/dist/collection/components/revoGrid/viewport.section.js.map +1 -1
  95. package/dist/collection/components/revoGrid/viewport.service.d.ts +4 -0
  96. package/dist/collection/components/revoGrid/viewport.service.js +15 -3
  97. package/dist/collection/components/revoGrid/viewport.service.js.map +1 -1
  98. package/dist/collection/components/rowHeaders/revogr-row-headers.js.map +1 -1
  99. package/dist/collection/components/scroll/revogr-viewport-scroll-style.css +3 -0
  100. package/dist/collection/components/scroll/revogr-viewport-scroll.d.ts +16 -5
  101. package/dist/collection/components/scroll/revogr-viewport-scroll.js +64 -9
  102. package/dist/collection/components/scroll/revogr-viewport-scroll.js.map +1 -1
  103. package/dist/collection/components/selectionFocus/revogr-focus-style.css +1 -1
  104. package/dist/collection/components.d.ts +110 -6
  105. package/dist/collection/interfaces.d.ts +4 -1
  106. package/dist/collection/plugins/groupingColumn/columnGroupsRenderer.d.ts +3 -2
  107. package/dist/collection/plugins/groupingColumn/columnGroupsRenderer.js +2 -2
  108. package/dist/collection/plugins/groupingColumn/columnGroupsRenderer.js.map +1 -1
  109. package/dist/collection/plugins/groupingColumn/headerGroupRenderer.d.ts +2 -2
  110. package/dist/collection/plugins/groupingColumn/headerGroupRenderer.js +1 -1
  111. package/dist/collection/plugins/groupingColumn/headerGroupRenderer.js.map +1 -1
  112. package/dist/collection/plugins/sorting/sorting.plugin.d.ts +21 -13
  113. package/dist/collection/plugins/sorting/sorting.plugin.js +77 -70
  114. package/dist/collection/plugins/sorting/sorting.plugin.js.map +1 -1
  115. package/dist/collection/serve/controller.js +183 -0
  116. package/dist/collection/services/localScrollService.js +1 -1
  117. package/dist/collection/services/localScrollService.js.map +1 -1
  118. package/dist/collection/services/resizable.directive.d.ts +8 -7
  119. package/dist/collection/services/resizable.directive.js +13 -36
  120. package/dist/collection/services/resizable.directive.js.map +1 -1
  121. package/dist/collection/services/resizable.element.d.ts +4 -0
  122. package/dist/collection/services/resizable.element.js +39 -0
  123. package/dist/collection/services/resizable.element.js.map +1 -0
  124. package/dist/collection/stencil-public-runtime.d.ts +1 -0
  125. package/dist/collection/store/viewPort/viewport.store.js +0 -1
  126. package/dist/collection/store/viewPort/viewport.store.js.map +1 -1
  127. package/dist/collection/utils/consts.d.ts +1 -0
  128. package/dist/collection/utils/consts.js +1 -0
  129. package/dist/collection/utils/consts.js.map +1 -1
  130. package/dist/collection/utils/events.d.ts +2 -1
  131. package/dist/collection/utils/events.js +18 -2
  132. package/dist/collection/utils/events.js.map +1 -1
  133. package/dist/collection/utils/mobile.d.ts +1 -0
  134. package/dist/collection/utils/mobile.js +7 -0
  135. package/dist/collection/utils/mobile.js.map +1 -0
  136. package/dist/esm/{debounce-301fd4d2.js → debounce-820b5a8b.js} +2 -34
  137. package/dist/esm/debounce-820b5a8b.js.map +1 -0
  138. package/dist/esm/dispatcher-9e9c0233.js +19 -0
  139. package/dist/esm/dispatcher-9e9c0233.js.map +1 -0
  140. package/dist/esm/events-31272e5e.js +454 -0
  141. package/dist/esm/events-31272e5e.js.map +1 -0
  142. package/dist/esm/filter.button-21ce90ef.js +38 -0
  143. package/dist/esm/filter.button-21ce90ef.js.map +1 -0
  144. package/dist/esm/{index-5e90b19b.js → index-05947c5f.js} +97 -37
  145. package/dist/esm/index-05947c5f.js.map +1 -0
  146. package/dist/esm/index-728bf6e3.js +3889 -0
  147. package/dist/esm/index-728bf6e3.js.map +1 -0
  148. package/dist/esm/isString-d539060a.js +36 -0
  149. package/dist/esm/isString-d539060a.js.map +1 -0
  150. package/dist/esm/keyCodes.utils-c0064460.js +265 -0
  151. package/dist/esm/keyCodes.utils-c0064460.js.map +1 -0
  152. package/dist/esm/loader.js +4 -4
  153. package/dist/esm/loader.js.map +1 -1
  154. package/dist/esm/localScrollService-884d8952.js +400 -0
  155. package/dist/esm/localScrollService-884d8952.js.map +1 -0
  156. package/dist/esm/revo-grid.entry.js +3854 -0
  157. package/dist/esm/revo-grid.entry.js.map +1 -0
  158. package/dist/esm/revo-grid.js +4 -4
  159. package/dist/esm/revo-grid.js.map +1 -1
  160. package/dist/esm/revogr-clipboard.entry.js +24 -6
  161. package/dist/esm/revogr-clipboard.entry.js.map +1 -1
  162. package/dist/esm/revogr-data_3.entry.js +1132 -0
  163. package/dist/esm/revogr-data_3.entry.js.map +1 -0
  164. package/dist/esm/revogr-edit_2.entry.js +320 -0
  165. package/dist/esm/revogr-edit_2.entry.js.map +1 -0
  166. package/dist/esm/revogr-filter-panel.entry.js +3 -2
  167. package/dist/esm/revogr-filter-panel.entry.js.map +1 -1
  168. package/dist/esm/revogr-focus_5.entry.js +1223 -0
  169. package/dist/esm/revogr-focus_5.entry.js.map +1 -0
  170. package/dist/esm/{revo-grid_11.entry.js → viewport.helpers-c08e729e.js} +13790 -25093
  171. package/dist/esm/viewport.helpers-c08e729e.js.map +1 -0
  172. package/dist/revo-grid/debounce-820b5a8b.js +5 -0
  173. package/dist/revo-grid/debounce-820b5a8b.js.map +1 -0
  174. package/dist/revo-grid/dispatcher-9e9c0233.js +5 -0
  175. package/dist/revo-grid/dispatcher-9e9c0233.js.map +1 -0
  176. package/dist/revo-grid/events-31272e5e.js +5 -0
  177. package/dist/revo-grid/events-31272e5e.js.map +1 -0
  178. package/dist/revo-grid/filter.button-21ce90ef.js +5 -0
  179. package/dist/revo-grid/filter.button-21ce90ef.js.map +1 -0
  180. package/dist/revo-grid/index-05947c5f.js +6 -0
  181. package/dist/revo-grid/index-05947c5f.js.map +1 -0
  182. package/dist/revo-grid/index-728bf6e3.js +5 -0
  183. package/dist/revo-grid/index-728bf6e3.js.map +1 -0
  184. package/dist/revo-grid/isString-d539060a.js +5 -0
  185. package/dist/revo-grid/isString-d539060a.js.map +1 -0
  186. package/dist/revo-grid/keyCodes.utils-c0064460.js +5 -0
  187. package/dist/revo-grid/keyCodes.utils-c0064460.js.map +1 -0
  188. package/dist/revo-grid/localScrollService-884d8952.js +5 -0
  189. package/dist/revo-grid/localScrollService-884d8952.js.map +1 -0
  190. package/dist/revo-grid/revo-grid.entry.js +5 -0
  191. package/dist/revo-grid/revo-grid.entry.js.map +1 -0
  192. package/dist/revo-grid/revo-grid.esm.js +1 -1
  193. package/dist/revo-grid/revo-grid.esm.js.map +1 -1
  194. package/dist/revo-grid/revogr-clipboard.entry.js +1 -1
  195. package/dist/revo-grid/revogr-clipboard.entry.js.map +1 -1
  196. package/dist/revo-grid/revogr-data_3.entry.js +5 -0
  197. package/dist/revo-grid/revogr-data_3.entry.js.map +1 -0
  198. package/dist/revo-grid/revogr-edit_2.entry.js +5 -0
  199. package/dist/revo-grid/revogr-edit_2.entry.js.map +1 -0
  200. package/dist/revo-grid/revogr-filter-panel.entry.js +1 -1
  201. package/dist/revo-grid/revogr-filter-panel.entry.js.map +1 -1
  202. package/dist/revo-grid/revogr-focus_5.entry.js +5 -0
  203. package/dist/revo-grid/revogr-focus_5.entry.js.map +1 -0
  204. package/dist/revo-grid/viewport.helpers-c08e729e.js +5 -0
  205. package/dist/revo-grid/viewport.helpers-c08e729e.js.map +1 -0
  206. package/dist/types/components/clipboard/revogr-clipboard.d.ts +6 -2
  207. package/dist/types/components/header/headerCellRenderer.d.ts +2 -1
  208. package/dist/types/components/header/headerRenderer.d.ts +2 -2
  209. package/dist/types/components/header/revogr-header.d.ts +15 -1
  210. package/dist/types/components/overlay/autofill.service.d.ts +7 -3
  211. package/dist/types/components/overlay/clipboard.service.d.ts +1 -1
  212. package/dist/types/components/overlay/revogr-edit.d.ts +8 -0
  213. package/dist/types/components/overlay/revogr-overlay-selection.d.ts +32 -10
  214. package/dist/types/components/revoGrid/revo-grid.d.ts +15 -4
  215. package/dist/types/components/revoGrid/viewport.scrolling.service.d.ts +6 -2
  216. package/dist/types/components/revoGrid/viewport.section.d.ts +3 -2
  217. package/dist/types/components/revoGrid/viewport.service.d.ts +4 -0
  218. package/dist/types/components/scroll/revogr-viewport-scroll.d.ts +16 -5
  219. package/dist/types/components.d.ts +110 -6
  220. package/dist/types/interfaces.d.ts +4 -1
  221. package/dist/types/plugins/groupingColumn/columnGroupsRenderer.d.ts +3 -2
  222. package/dist/types/plugins/groupingColumn/headerGroupRenderer.d.ts +2 -2
  223. package/dist/types/plugins/sorting/sorting.plugin.d.ts +21 -13
  224. package/dist/types/services/resizable.directive.d.ts +8 -7
  225. package/dist/types/services/resizable.element.d.ts +4 -0
  226. package/dist/types/stencil-public-runtime.d.ts +1 -0
  227. package/dist/types/utils/consts.d.ts +1 -0
  228. package/dist/types/utils/events.d.ts +2 -1
  229. package/dist/types/utils/mobile.d.ts +1 -0
  230. package/package.json +4 -3
  231. package/dist/cjs/debounce-525dd66c.js.map +0 -1
  232. package/dist/cjs/index-aad39b7b.js.map +0 -1
  233. package/dist/cjs/revo-grid_11.cjs.entry.js.map +0 -1
  234. package/dist/esm/debounce-301fd4d2.js.map +0 -1
  235. package/dist/esm/index-5e90b19b.js.map +0 -1
  236. package/dist/esm/revo-grid_11.entry.js.map +0 -1
  237. package/dist/revo-grid/debounce-301fd4d2.js +0 -5
  238. package/dist/revo-grid/debounce-301fd4d2.js.map +0 -1
  239. package/dist/revo-grid/index-5e90b19b.js +0 -6
  240. package/dist/revo-grid/index-5e90b19b.js.map +0 -1
  241. package/dist/revo-grid/revo-grid_11.entry.js +0 -5
  242. package/dist/revo-grid/revo-grid_11.entry.js.map +0 -1
  243. /package/dist/collection/{utilsExternal/generate-data.js → serve/data.js} +0 -0
@@ -0,0 +1,1132 @@
1
+ /*!
2
+ * Built by Revolist
3
+ */
4
+ import { h, r as registerInstance, c as createEvent, g as getElement, H as Host } from './index-05947c5f.js';
5
+ import { C as ColumnService, L as LocalScrollService } from './localScrollService-884d8952.js';
6
+ import { L as DRAG_ICON_CLASS, N as DRAGGABLE_CLASS, g as getSourceItem, O as DATA_COL, P as DATA_ROW, Q as _getNative, a as _baseEach, _ as _baseIteratee, b as isArray_1, F as FOCUS_CLASS, V as HEADER_CLASS, W as HEADER_SORTABLE_CLASS, X as MIN_COL_SIZE, f as findIndex_1, n as getItemByIndex, Y as HEADER_ROW_CLASS, Z as HEADER_ACTUAL_ROW_CLASS, e as each } from './index-728bf6e3.js';
7
+ import { p as GROUP_EXPAND_BTN, h as GROUP_EXPAND_EVENT, q as PSEUDO_GROUP_ITEM, G as GROUP_EXPANDED, c as GROUP_DEPTH, i as isGrouping, H as HEADER_SLOT, C as CONTENT_SLOT, F as FOOTER_SLOT } from './viewport.helpers-c08e729e.js';
8
+ import { a as FilterButton } from './filter.button-21ce90ef.js';
9
+ import { d as dispatch } from './dispatcher-9e9c0233.js';
10
+ import { d as debounce_1, e as isObject_1 } from './debounce-820b5a8b.js';
11
+
12
+ const CellRenderer = ({ model, onDragStart }) => {
13
+ const els = [];
14
+ if (model.column.rowDrag && isRowDragService(model.column.rowDrag, model)) {
15
+ els.push(h("span", { class: DRAGGABLE_CLASS, onMouseDown: originalEvent => onDragStart({
16
+ originalEvent,
17
+ model
18
+ }) },
19
+ h("span", { class: DRAG_ICON_CLASS })));
20
+ }
21
+ els.push(`${ColumnService.getData(model.model[model.prop])}`);
22
+ return els;
23
+ };
24
+ function isRowDragService(rowDrag, model) {
25
+ if (typeof rowDrag === 'function') {
26
+ return rowDrag(model);
27
+ }
28
+ return !!rowDrag;
29
+ }
30
+
31
+ const PADDING_DEPTH = 10;
32
+ const RowRenderer = ({ rowClass, size, start, style, depth }, cells) => {
33
+ return (h("div", { class: `rgRow ${rowClass || ''}`, style: Object.assign(Object.assign({}, style), { height: `${size}px`, transform: `translateY(${start}px)`, paddingLeft: depth ? `${PADDING_DEPTH * depth}px` : undefined }) }, cells));
34
+ };
35
+
36
+ function expandEvent(e, model, virtualIndex) {
37
+ const event = new CustomEvent(GROUP_EXPAND_EVENT, {
38
+ detail: {
39
+ model,
40
+ virtualIndex,
41
+ },
42
+ cancelable: true,
43
+ bubbles: true,
44
+ });
45
+ e.target.dispatchEvent(event);
46
+ }
47
+ const GroupingRowRenderer = (props) => {
48
+ const { model, itemIndex, hasExpand, groupingCustomRenderer } = props;
49
+ const name = model[PSEUDO_GROUP_ITEM];
50
+ const expanded = model[GROUP_EXPANDED];
51
+ const depth = parseInt(model[GROUP_DEPTH], 10) || 0;
52
+ if (!hasExpand) {
53
+ return h(RowRenderer, Object.assign({}, props, { rowClass: "groupingRow", depth: depth }));
54
+ }
55
+ if (groupingCustomRenderer) {
56
+ return (h(RowRenderer, Object.assign({}, props, { rowClass: "groupingRow", depth: depth }),
57
+ h("div", { onClick: e => expandEvent(e, model, itemIndex) }, groupingCustomRenderer(h, { name, itemIndex, expanded, depth }))));
58
+ }
59
+ return (h(RowRenderer, Object.assign({}, props, { rowClass: "groupingRow", depth: depth }),
60
+ h("button", { class: { [GROUP_EXPAND_BTN]: true }, onClick: e => expandEvent(e, model, itemIndex) },
61
+ h("svg", { "aria-hidden": "true", style: { transform: `rotate(${!expanded ? -90 : 0}deg)` }, focusable: "false", viewBox: "0 0 448 512" },
62
+ h("path", { fill: "currentColor", d: "M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z" }))),
63
+ name));
64
+ };
65
+
66
+ const revogrDataStyleCss = ".revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revogr-data{display:block;width:100%;position:relative}revogr-data .rgRow{position:absolute;width:100%;left:0}revogr-data .rgRow.groupingRow{font-weight:600}revogr-data .rgRow.groupingRow .group-expand{width:25px;height:100%;max-height:25px;margin-right:2px;background-color:transparent;border-color:transparent}revogr-data .rgRow.groupingRow .group-expand svg{width:7px}revogr-data .revo-draggable{border:none;height:32px;display:inline-flex;outline:0;padding:0;font-size:0.8125rem;box-sizing:border-box;align-items:center;white-space:nowrap;vertical-align:middle;justify-content:center;text-decoration:none;width:24px;height:100%;cursor:pointer}revogr-data .revo-draggable>.revo-drag-icon{vertical-align:middle;display:inline-block;pointer-events:none;transition:background-color 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms}revogr-data .rgCell{top:0;position:absolute;box-sizing:border-box;height:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}revogr-data .rgCell.align-center{text-align:center}revogr-data .rgCell.align-left{text-align:left}revogr-data .rgCell.align-right{text-align:right}";
67
+
68
+ const RevogrData = class {
69
+ constructor(hostRef) {
70
+ registerInstance(this, hostRef);
71
+ this.dragStartCell = createEvent(this, "dragStartCell", 7);
72
+ this.beforeRowRender = createEvent(this, "beforeRowRender", 7);
73
+ this.beforeCellRender = createEvent(this, "before-cell-render", 7);
74
+ this.readonly = undefined;
75
+ this.range = undefined;
76
+ this.rowClass = undefined;
77
+ this.additionalData = undefined;
78
+ this.rowSelectionStore = undefined;
79
+ this.viewportRow = undefined;
80
+ this.viewportCol = undefined;
81
+ this.dimensionRow = undefined;
82
+ this.colData = undefined;
83
+ this.dataStore = undefined;
84
+ this.type = undefined;
85
+ }
86
+ onStoreChange() {
87
+ var _a;
88
+ (_a = this.columnService) === null || _a === void 0 ? void 0 : _a.destroy();
89
+ this.columnService = new ColumnService(this.dataStore, this.colData);
90
+ }
91
+ connectedCallback() {
92
+ this.onStoreChange();
93
+ }
94
+ disconnectedCallback() {
95
+ var _a;
96
+ (_a = this.columnService) === null || _a === void 0 ? void 0 : _a.destroy();
97
+ }
98
+ render() {
99
+ var _a;
100
+ const rows = this.viewportRow.get('items');
101
+ const cols = this.viewportCol.get('items');
102
+ if (!this.columnService.columns.length || !rows.length || !cols.length) {
103
+ return '';
104
+ }
105
+ const range = (_a = this.rowSelectionStore) === null || _a === void 0 ? void 0 : _a.get('range');
106
+ const rowsEls = [];
107
+ const depth = this.dataStore.get('groupingDepth');
108
+ const groupingCustomRenderer = this.dataStore.get('groupingCustomRenderer');
109
+ for (let rgRow of rows) {
110
+ const dataItem = getSourceItem(this.dataStore, rgRow.itemIndex);
111
+ /** grouping */
112
+ if (isGrouping(dataItem)) {
113
+ rowsEls.push(h(GroupingRowRenderer, Object.assign({}, rgRow, { model: dataItem, groupingCustomRenderer: groupingCustomRenderer, hasExpand: this.columnService.hasGrouping })));
114
+ continue;
115
+ }
116
+ /** grouping end */
117
+ const cells = [];
118
+ let rowClass = this.rowClass ? this.columnService.getRowClass(rgRow.itemIndex, this.rowClass) : '';
119
+ if (range && rgRow.itemIndex >= range.y && rgRow.itemIndex <= range.y1) {
120
+ rowClass += ' focused-rgRow';
121
+ }
122
+ for (let rgCol of cols) {
123
+ cells.push(this.getCellRenderer(rgRow, rgCol,
124
+ /** grouping apply*/ this.columnService.hasGrouping ? depth : 0));
125
+ }
126
+ const row = h(RowRenderer, { rowClass: rowClass, size: rgRow.size, start: rgRow.start }, cells);
127
+ this.beforeRowRender.emit({
128
+ node: row,
129
+ item: rgRow,
130
+ dataItem
131
+ });
132
+ rowsEls.push(row);
133
+ }
134
+ return rowsEls;
135
+ }
136
+ getCellRenderer(rgRow, rgCol, depth = 0) {
137
+ const model = this.columnService.rowDataModel(rgRow.itemIndex, rgCol.itemIndex);
138
+ const cellEvent = this.beforeCellRender.emit({
139
+ column: Object.assign({}, rgCol),
140
+ row: Object.assign(Object.assign({}, rgRow), { size: undefined }),
141
+ model,
142
+ rowType: this.type,
143
+ colType: this.columnService.type,
144
+ });
145
+ if (cellEvent.defaultPrevented) {
146
+ return;
147
+ }
148
+ const { detail: { column: columnProps, row: rowProps } } = cellEvent;
149
+ const defaultProps = {
150
+ [DATA_COL]: columnProps.itemIndex,
151
+ [DATA_ROW]: rowProps.itemIndex,
152
+ style: {
153
+ width: `${columnProps.size}px`,
154
+ transform: `translateX(${columnProps.start}px)`,
155
+ height: rowProps.size ? `${rowProps.size}px` : undefined,
156
+ },
157
+ };
158
+ /**
159
+ * For grouping, can be removed in the future and replaced with event
160
+ */
161
+ if (depth && !columnProps.itemIndex) {
162
+ defaultProps.style.paddingLeft = `${PADDING_DEPTH * depth}px`;
163
+ }
164
+ const props = this.columnService.mergeProperties(rowProps.itemIndex, columnProps.itemIndex, defaultProps);
165
+ const custom = this.columnService.customRenderer(columnProps.itemIndex, model, this.providers, this.additionalData);
166
+ // if custom render
167
+ if (typeof custom !== 'undefined') {
168
+ return h("div", Object.assign({}, props), custom);
169
+ }
170
+ // something is wrong with data
171
+ if (!model.column) {
172
+ console.error('Investigate column problem');
173
+ return;
174
+ }
175
+ // if regular render
176
+ return (h("div", Object.assign({}, props), h(CellRenderer, { model: model, onDragStart: e => this.dragStartCell.emit(e) })));
177
+ }
178
+ get providers() {
179
+ return {
180
+ type: this.type,
181
+ data: this.dataStore,
182
+ viewport: this.viewportCol,
183
+ dimension: this.dimensionRow,
184
+ selection: this.rowSelectionStore,
185
+ };
186
+ }
187
+ get element() { return getElement(this); }
188
+ static get watchers() { return {
189
+ "dataStore": ["onStoreChange"],
190
+ "colData": ["onStoreChange"]
191
+ }; }
192
+ };
193
+ RevogrData.style = revogrDataStyleCss;
194
+
195
+ var defineProperty = (function() {
196
+ try {
197
+ var func = _getNative(Object, 'defineProperty');
198
+ func({}, '', {});
199
+ return func;
200
+ } catch (e) {}
201
+ }());
202
+
203
+ var _defineProperty = defineProperty;
204
+
205
+ /**
206
+ * The base implementation of `assignValue` and `assignMergeValue` without
207
+ * value checks.
208
+ *
209
+ * @private
210
+ * @param {Object} object The object to modify.
211
+ * @param {string} key The key of the property to assign.
212
+ * @param {*} value The value to assign.
213
+ */
214
+ function baseAssignValue(object, key, value) {
215
+ if (key == '__proto__' && _defineProperty) {
216
+ _defineProperty(object, key, {
217
+ 'configurable': true,
218
+ 'enumerable': true,
219
+ 'value': value,
220
+ 'writable': true
221
+ });
222
+ } else {
223
+ object[key] = value;
224
+ }
225
+ }
226
+
227
+ var _baseAssignValue = baseAssignValue;
228
+
229
+ /**
230
+ * A specialized version of `baseAggregator` for arrays.
231
+ *
232
+ * @private
233
+ * @param {Array} [array] The array to iterate over.
234
+ * @param {Function} setter The function to set `accumulator` values.
235
+ * @param {Function} iteratee The iteratee to transform keys.
236
+ * @param {Object} accumulator The initial aggregated object.
237
+ * @returns {Function} Returns `accumulator`.
238
+ */
239
+ function arrayAggregator(array, setter, iteratee, accumulator) {
240
+ var index = -1,
241
+ length = array == null ? 0 : array.length;
242
+
243
+ while (++index < length) {
244
+ var value = array[index];
245
+ setter(accumulator, value, iteratee(value), array);
246
+ }
247
+ return accumulator;
248
+ }
249
+
250
+ var _arrayAggregator = arrayAggregator;
251
+
252
+ /**
253
+ * Aggregates elements of `collection` on `accumulator` with keys transformed
254
+ * by `iteratee` and values set by `setter`.
255
+ *
256
+ * @private
257
+ * @param {Array|Object} collection The collection to iterate over.
258
+ * @param {Function} setter The function to set `accumulator` values.
259
+ * @param {Function} iteratee The iteratee to transform keys.
260
+ * @param {Object} accumulator The initial aggregated object.
261
+ * @returns {Function} Returns `accumulator`.
262
+ */
263
+ function baseAggregator(collection, setter, iteratee, accumulator) {
264
+ _baseEach(collection, function(value, key, collection) {
265
+ setter(accumulator, value, iteratee(value), collection);
266
+ });
267
+ return accumulator;
268
+ }
269
+
270
+ var _baseAggregator = baseAggregator;
271
+
272
+ /**
273
+ * Creates a function like `_.groupBy`.
274
+ *
275
+ * @private
276
+ * @param {Function} setter The function to set accumulator values.
277
+ * @param {Function} [initializer] The accumulator object initializer.
278
+ * @returns {Function} Returns the new aggregator function.
279
+ */
280
+ function createAggregator(setter, initializer) {
281
+ return function(collection, iteratee) {
282
+ var func = isArray_1(collection) ? _arrayAggregator : _baseAggregator,
283
+ accumulator = initializer ? initializer() : {};
284
+
285
+ return func(collection, setter, _baseIteratee(iteratee), accumulator);
286
+ };
287
+ }
288
+
289
+ var _createAggregator = createAggregator;
290
+
291
+ /**
292
+ * Creates an object composed of keys generated from the results of running
293
+ * each element of `collection` thru `iteratee`. The corresponding value of
294
+ * each key is the last element responsible for generating the key. The
295
+ * iteratee is invoked with one argument: (value).
296
+ *
297
+ * @static
298
+ * @memberOf _
299
+ * @since 4.0.0
300
+ * @category Collection
301
+ * @param {Array|Object} collection The collection to iterate over.
302
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
303
+ * @returns {Object} Returns the composed aggregate object.
304
+ * @example
305
+ *
306
+ * var array = [
307
+ * { 'dir': 'left', 'code': 97 },
308
+ * { 'dir': 'right', 'code': 100 }
309
+ * ];
310
+ *
311
+ * _.keyBy(array, function(o) {
312
+ * return String.fromCharCode(o.code);
313
+ * });
314
+ * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
315
+ *
316
+ * _.keyBy(array, 'dir');
317
+ * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
318
+ */
319
+ var keyBy = _createAggregator(function(result, value, key) {
320
+ _baseAssignValue(result, key, value);
321
+ });
322
+
323
+ var keyBy_1 = keyBy;
324
+
325
+ const SortingSign = ({ column }) => {
326
+ return h("i", { class: column.order });
327
+ };
328
+
329
+ var ResizeEvents;
330
+ (function (ResizeEvents) {
331
+ ResizeEvents["start"] = "resize:start";
332
+ ResizeEvents["move"] = "resize:move";
333
+ ResizeEvents["end"] = "resize:end";
334
+ })(ResizeEvents || (ResizeEvents = {}));
335
+ const RESIZE_MASK = {
336
+ 'resizable-r': { bit: 0b0001, cursor: 'ew-resize' },
337
+ 'resizable-rb': { bit: 0b0011, cursor: 'se-resize' },
338
+ 'resizable-b': { bit: 0b0010, cursor: 's-resize' },
339
+ 'resizable-lb': { bit: 0b0110, cursor: 'sw-resize' },
340
+ 'resizable-l': { bit: 0b0100, cursor: 'w-resize' },
341
+ 'resizable-lt': { bit: 0b1100, cursor: 'nw-resize' },
342
+ 'resizable-t': { bit: 0b1000, cursor: 'n-resize' },
343
+ 'resizable-rt': { bit: 0b1001, cursor: 'ne-resize' },
344
+ };
345
+ const DISABLE_MASK = {
346
+ l: 0b0001,
347
+ t: 0b0010,
348
+ w: 0b0100,
349
+ h: 0b1000,
350
+ };
351
+ const defaultProps = (props) => {
352
+ return Object.assign(Object.assign({}, props), { fitParent: props.fitParent || false, active: props.active || [], disableAttributes: props.disableAttributes || [], minWidth: props.minWidth || 0, minHeight: props.minHeight || 0 });
353
+ };
354
+ class ResizeDirective {
355
+ constructor(initialProps, $event) {
356
+ this.initialProps = initialProps;
357
+ this.$event = $event;
358
+ this.mouseX = 0;
359
+ this.mouseY = 0;
360
+ this.width = 0;
361
+ this.height = 0;
362
+ this.changeX = 0;
363
+ this.changeY = 0;
364
+ this.disableCalcMap = 0b1111;
365
+ this.props = defaultProps(initialProps);
366
+ this.mouseMoveFunc = this.handleMove.bind(this);
367
+ this.mouseUpFunc = this.handleUp.bind(this);
368
+ this.minW = this.props.minWidth;
369
+ this.minH = this.props.minHeight;
370
+ this.maxW = this.props.maxWidth;
371
+ this.maxH = this.props.maxHeight;
372
+ this.parent = { width: 0, height: 0 };
373
+ this.resizeState = 0;
374
+ }
375
+ set($el) {
376
+ this.$el = $el;
377
+ this.props.disableAttributes.forEach(attr => {
378
+ switch (attr) {
379
+ case 'l':
380
+ this.disableCalcMap &= ~DISABLE_MASK.l;
381
+ break;
382
+ case 't':
383
+ this.disableCalcMap &= ~DISABLE_MASK.t;
384
+ break;
385
+ case 'w':
386
+ this.disableCalcMap &= ~DISABLE_MASK.w;
387
+ break;
388
+ case 'h':
389
+ this.disableCalcMap &= ~DISABLE_MASK.h;
390
+ }
391
+ });
392
+ }
393
+ emitEvent(eventName, additionalOptions) {
394
+ var _a;
395
+ if (!this.$event) {
396
+ return;
397
+ }
398
+ const isLeft = (_a = this.activeResizer) === null || _a === void 0 ? void 0 : _a.classList.contains('resizable-l');
399
+ 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));
400
+ }
401
+ static isTouchEvent(e) {
402
+ var _a;
403
+ const event = e;
404
+ return ((_a = event.touches) === null || _a === void 0 ? void 0 : _a.length) >= 0;
405
+ }
406
+ handleMove(event) {
407
+ var _a;
408
+ if (!this.resizeState) {
409
+ return;
410
+ }
411
+ let eventY, eventX;
412
+ if (ResizeDirective.isTouchEvent(event)) {
413
+ eventY = event.touches[0].clientY;
414
+ eventX = event.touches[0].clientX;
415
+ }
416
+ else {
417
+ eventY = event.clientY;
418
+ eventX = event.clientX;
419
+ }
420
+ let isX = this.resizeState & RESIZE_MASK['resizable-r'].bit || this.resizeState & RESIZE_MASK['resizable-l'].bit;
421
+ let isY = this.resizeState & RESIZE_MASK['resizable-t'].bit || this.resizeState & RESIZE_MASK['resizable-b'].bit;
422
+ if (isY && this.disableCalcMap & DISABLE_MASK.h) {
423
+ let diffY = eventY - this.mouseY;
424
+ let changedY = this.changeY + diffY;
425
+ const newHeight = this.height + changedY;
426
+ // if overcrossed min height
427
+ if (newHeight < this.minH) {
428
+ changedY = -(this.height - this.minH);
429
+ }
430
+ // if overcrossed max heiht
431
+ if (this.maxH && newHeight > this.maxH) {
432
+ changedY = this.maxH - this.height;
433
+ }
434
+ this.changeY = changedY;
435
+ this.mouseY = eventY;
436
+ if (this.activeResizer) {
437
+ this.activeResizer.style.bottom = `${-this.changeY}px`;
438
+ }
439
+ }
440
+ if (isX && this.disableCalcMap & DISABLE_MASK.w) {
441
+ const isLeft = (_a = this.activeResizer) === null || _a === void 0 ? void 0 : _a.classList.contains('resizable-l');
442
+ let diffX = eventX - this.mouseX;
443
+ let changedX = this.changeX + diffX;
444
+ const newWidth = this.width + changedX * (isLeft ? -1 : 1);
445
+ // if overcrossed min width
446
+ if (newWidth < this.minW) {
447
+ changedX = -(this.width - this.minW);
448
+ }
449
+ // if overcrossed max width
450
+ if (this.maxW && newWidth > this.maxW) {
451
+ changedX = this.maxW - this.width;
452
+ }
453
+ this.changeX = changedX;
454
+ this.mouseX = eventX;
455
+ if (this.activeResizer) {
456
+ if (!isLeft) {
457
+ this.activeResizer.style.right = `${-this.changeX}px`;
458
+ }
459
+ else {
460
+ this.activeResizer.style.left = `${this.changeX}px`;
461
+ }
462
+ }
463
+ }
464
+ this.emitEvent(ResizeEvents.move);
465
+ }
466
+ handleDown(event) {
467
+ if (event.defaultPrevented) {
468
+ return;
469
+ }
470
+ // stop other events if resize in progress
471
+ event.preventDefault();
472
+ this.dropInitial();
473
+ for (let elClass in RESIZE_MASK) {
474
+ const target = event.target;
475
+ if (this.$el.contains(target) && (target === null || target === void 0 ? void 0 : target.classList.contains(elClass))) {
476
+ document.body.style.cursor = RESIZE_MASK[elClass].cursor;
477
+ if (ResizeDirective.isTouchEvent(event)) {
478
+ this.setInitials(event.touches[0], target);
479
+ }
480
+ else {
481
+ event.preventDefault && event.preventDefault();
482
+ this.setInitials(event, target);
483
+ }
484
+ this.resizeState = RESIZE_MASK[elClass].bit;
485
+ const eventName = ResizeEvents.start;
486
+ this.emitEvent(eventName);
487
+ break;
488
+ }
489
+ }
490
+ this.bindMove();
491
+ }
492
+ handleUp(e) {
493
+ e.preventDefault();
494
+ if (this.resizeState !== 0) {
495
+ this.resizeState = 0;
496
+ document.body.style.cursor = '';
497
+ const eventName = ResizeEvents.end;
498
+ this.emitEvent(eventName);
499
+ }
500
+ this.dropInitial();
501
+ this.unbindMove();
502
+ }
503
+ setInitials({ clientX, clientY }, target) {
504
+ const computedStyle = getComputedStyle(this.$el);
505
+ this.$el.classList.add('active');
506
+ this.activeResizer = target;
507
+ if (this.disableCalcMap & DISABLE_MASK.w) {
508
+ this.mouseX = clientX;
509
+ this.width = this.$el.clientWidth;
510
+ this.parent.width = this.$el.parentElement.clientWidth;
511
+ // min width
512
+ const minPaddingX = parseFloat(computedStyle.paddingLeft) + parseFloat(computedStyle.paddingRight);
513
+ this.minW = Math.max(minPaddingX, this.initialProps.minWidth || 0);
514
+ // max width
515
+ if (this.initialProps.maxWidth) {
516
+ this.maxW = Math.max(this.width, this.initialProps.maxWidth);
517
+ }
518
+ }
519
+ if (this.disableCalcMap & DISABLE_MASK.h) {
520
+ this.mouseY = clientY;
521
+ this.height = this.$el.clientHeight;
522
+ this.parent.height = this.$el.parentElement.clientHeight;
523
+ // min height
524
+ const minPaddingY = parseFloat(computedStyle.paddingTop) + parseFloat(computedStyle.paddingBottom);
525
+ this.minH = Math.max(minPaddingY, this.initialProps.minHeight || 0);
526
+ // max height
527
+ if (this.initialProps.maxHeight) {
528
+ this.maxH = Math.max(this.height, this.initialProps.maxHeight);
529
+ }
530
+ }
531
+ }
532
+ dropInitial() {
533
+ this.changeX = this.changeY = this.minW = this.minH;
534
+ this.width = this.height = 0;
535
+ if (this.activeResizer) {
536
+ this.activeResizer.removeAttribute('style');
537
+ }
538
+ this.$el.classList.remove('active');
539
+ this.activeResizer = null;
540
+ }
541
+ bindMove() {
542
+ document.documentElement.addEventListener('mouseup', this.mouseUpFunc, true);
543
+ document.documentElement.addEventListener('touchend', this.mouseUpFunc, true);
544
+ document.documentElement.addEventListener('mousemove', this.mouseMoveFunc, true);
545
+ document.documentElement.addEventListener('touchmove', this.mouseMoveFunc, true);
546
+ document.documentElement.addEventListener('mouseleave', this.mouseUpFunc);
547
+ }
548
+ unbindMove() {
549
+ document.documentElement.removeEventListener('mouseup', this.mouseUpFunc, true);
550
+ document.documentElement.removeEventListener('touchend', this.mouseUpFunc, true);
551
+ document.documentElement.removeEventListener('mousemove', this.mouseMoveFunc, true);
552
+ document.documentElement.removeEventListener('touchmove', this.mouseMoveFunc, true);
553
+ document.documentElement.removeEventListener('mouseleave', this.mouseUpFunc);
554
+ }
555
+ }
556
+
557
+ const ResizableElement = (props, children) => {
558
+ const resizeEls = [];
559
+ const directive = (props.canResize &&
560
+ new ResizeDirective(props, e => {
561
+ if (e.eventName === ResizeEvents.end) {
562
+ props.onResize && props.onResize(e);
563
+ }
564
+ })) ||
565
+ null;
566
+ if (props.canResize) {
567
+ if (props.active) {
568
+ for (let p in props.active) {
569
+ resizeEls.push(h("div", { onClick: e => e.preventDefault(), onDblClick: e => {
570
+ var _a;
571
+ e.preventDefault();
572
+ (_a = props.onDoubleClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
573
+ }, 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]}` }));
574
+ }
575
+ }
576
+ }
577
+ else {
578
+ if (props.active) {
579
+ for (let p in props.active) {
580
+ resizeEls.push(h("div", { onClick: e => e.preventDefault(), onTouchStart: (e) => e.preventDefault(), onDblClick: e => {
581
+ var _a;
582
+ e.preventDefault();
583
+ (_a = props.onDoubleClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
584
+ }, class: `no-resize resizable resizable-${props.active[p]}` }));
585
+ }
586
+ }
587
+ }
588
+ return (h("div", Object.assign({}, props, { ref: (e) => directive === null || directive === void 0 ? void 0 : directive.set(e) }),
589
+ children,
590
+ resizeEls));
591
+ };
592
+
593
+ const ON_COLUMN_CLICK = 'column-click';
594
+ const HeaderCellRenderer = ({ data, props, additionalData }, children) => {
595
+ let colTemplate = (data === null || data === void 0 ? void 0 : data.name) || '';
596
+ let cellProps = props;
597
+ if (data === null || data === void 0 ? void 0 : data.columnTemplate) {
598
+ colTemplate = data.columnTemplate(h, data, additionalData);
599
+ }
600
+ if (data === null || data === void 0 ? void 0 : data.columnProperties) {
601
+ const extra = data.columnProperties(data);
602
+ if (extra && typeof extra === 'object') {
603
+ cellProps = ColumnService.doMerge(props, extra);
604
+ }
605
+ }
606
+ return (h(ResizableElement, Object.assign({}, cellProps, { onMouseDown: (e) => {
607
+ dispatch(e.currentTarget, ON_COLUMN_CLICK, {
608
+ data,
609
+ event: e,
610
+ });
611
+ } }),
612
+ h("div", { class: "header-content" }, colTemplate),
613
+ children));
614
+ };
615
+
616
+ const HeaderRenderer = (p) => {
617
+ var _a, _b, _c, _d, _e, _f;
618
+ const cellClass = {
619
+ [HEADER_CLASS]: true,
620
+ [HEADER_SORTABLE_CLASS]: !!((_a = p.data) === null || _a === void 0 ? void 0 : _a.sortable),
621
+ };
622
+ if ((_b = p.data) === null || _b === void 0 ? void 0 : _b.order) {
623
+ cellClass[p.data.order] = true;
624
+ }
625
+ const dataProps = {
626
+ [DATA_COL]: p.column.itemIndex,
627
+ canResize: p.canResize,
628
+ minWidth: ((_c = p.data) === null || _c === void 0 ? void 0 : _c.minSize) || MIN_COL_SIZE,
629
+ maxWidth: (_d = p.data) === null || _d === void 0 ? void 0 : _d.maxSize,
630
+ active: p.active || ['r'],
631
+ class: cellClass,
632
+ style: { width: `${p.column.size}px`, transform: `translateX(${p.column.start}px)` },
633
+ onResize: p.onResize,
634
+ onDoubleClick(originalEvent) {
635
+ p.onDoubleClick({ column: p.data, index: p.column.itemIndex, originalEvent });
636
+ },
637
+ onClick(originalEvent) {
638
+ if (originalEvent.defaultPrevented || !p.onClick) {
639
+ return;
640
+ }
641
+ p.onClick({ column: p.data, index: p.column.itemIndex, originalEvent });
642
+ },
643
+ };
644
+ if (p.range) {
645
+ if (p.column.itemIndex >= p.range.x && p.column.itemIndex <= p.range.x1) {
646
+ if (typeof dataProps.class === 'object') {
647
+ dataProps.class[FOCUS_CLASS] = true;
648
+ }
649
+ }
650
+ }
651
+ return (h(HeaderCellRenderer, { data: p.data, props: dataProps, additionalData: p.additionalData },
652
+ ((_e = p.data) === null || _e === void 0 ? void 0 : _e.order) ? h(SortingSign, { column: p.data }) : '',
653
+ p.canFilter && ((_f = p.data) === null || _f === void 0 ? void 0 : _f.filter) !== false ? h(FilterButton, { column: p.data }) : ''));
654
+ };
655
+
656
+ const GroupHeaderRenderer = (p) => {
657
+ const groupProps = {
658
+ canResize: p.canResize,
659
+ minWidth: p.group.ids.length * MIN_COL_SIZE,
660
+ maxWidth: 0,
661
+ active: p.active || ['r'],
662
+ class: {
663
+ [HEADER_CLASS]: true,
664
+ },
665
+ style: {
666
+ transform: `translateX(${p.start}px)`,
667
+ width: `${p.end - p.start}px`,
668
+ },
669
+ onResize: p.onResize,
670
+ };
671
+ return (h(HeaderCellRenderer, { data: Object.assign(Object.assign({}, p.group), { prop: '', providers: p.providers, index: p.start }), props: groupProps, additionalData: p.additionalData }));
672
+ };
673
+
674
+ const ColumnGroupsRenderer = ({ additionalData, providers, depth, groups, visibleProps, dimensionCol, canResize, active, onResize }) => {
675
+ // render group columns
676
+ const groupRow = [];
677
+ for (let i = 0; i < depth; i++) {
678
+ if (groups[i]) {
679
+ for (let group of groups[i]) {
680
+ // if group in visible range
681
+ // find first visible group prop in visible columns range
682
+ const indexFirstVisibleCol = findIndex_1(group.ids, id => typeof visibleProps[id] === 'number');
683
+ if (indexFirstVisibleCol > -1) {
684
+ const colVisibleIndex = visibleProps[group.ids[indexFirstVisibleCol]]; // get column index
685
+ const groupStartIndex = colVisibleIndex - indexFirstVisibleCol; // first column index in group
686
+ const groupEndIndex = groupStartIndex + group.ids.length - 1; // last column index in group
687
+ // coordinates
688
+ const groupStart = getItemByIndex(dimensionCol, groupStartIndex).start;
689
+ const groupEnd = getItemByIndex(dimensionCol, groupEndIndex).end;
690
+ groupRow.push(h(GroupHeaderRenderer, { providers: providers, start: groupStart, end: groupEnd, group: group, active: active, canResize: canResize, onResize: e => onResize(e.changedX, groupStartIndex, groupEndIndex), additionalData: additionalData }));
691
+ }
692
+ }
693
+ }
694
+ groupRow.push(h("div", { class: `${HEADER_ROW_CLASS} group` }));
695
+ }
696
+ return groupRow;
697
+ };
698
+
699
+ const revogrHeaderStyleCss = "@charset \"UTF-8\";.revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revogr-header{position:relative;z-index:5;display:block}revogr-header .rgHeaderCell{display:flex}revogr-header .rgHeaderCell.align-center{text-align:center}revogr-header .rgHeaderCell.align-left{text-align:left}revogr-header .rgHeaderCell.align-right{text-align:right}revogr-header .rgHeaderCell.sortable{cursor:pointer}revogr-header .rgHeaderCell i.asc:after,revogr-header .rgHeaderCell i.desc:after{font-size:13px}revogr-header .rgHeaderCell i.asc:after{content:\"↑\"}revogr-header .rgHeaderCell i.desc:after{content:\"↓\"}revogr-header .rgHeaderCell,revogr-header .grouped-cell{position:absolute;box-sizing:border-box;height:100%;z-index:1}revogr-header .header-rgRow{display:block;position:relative}revogr-header .header-rgRow.group{z-index:0}revogr-header .group-rgRow{position:relative}revogr-header .rgHeaderCell.active{z-index:10}revogr-header .rgHeaderCell.active .resizable{background-color:deepskyblue}revogr-header .rgHeaderCell .header-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-grow:1}revogr-header .rgHeaderCell .resizable{display:block;position:absolute;z-index:90;touch-action:none;user-select:none}revogr-header .rgHeaderCell .resizable:hover{background-color:deepskyblue}revogr-header .rgHeaderCell>.resizable-r{cursor:ew-resize;width:6px;right:0;top:0;height:100%}revogr-header .rgHeaderCell>.resizable-rb{cursor:se-resize;width:6px;height:6px;right:0;bottom:0}revogr-header .rgHeaderCell>.resizable-b{cursor:s-resize;height:6px;bottom:0;width:100%;left:0}revogr-header .rgHeaderCell>.resizable-lb{cursor:sw-resize;width:6px;height:6px;left:0;bottom:0}revogr-header .rgHeaderCell>.resizable-l{cursor:w-resize;width:6px;left:0;height:100%;top:0}revogr-header .rgHeaderCell>.resizable-lt{cursor:nw-resize;width:6px;height:6px;left:0;top:0}revogr-header .rgHeaderCell>.resizable-t{cursor:n-resize;height:6px;top:0;width:100%;left:0}revogr-header .rgHeaderCell>.resizable-rt{cursor:ne-resize;width:6px;height:6px;right:0;top:0}revogr-header .rv-filter{visibility:hidden}";
700
+
701
+ const RevogrHeaderComponent = class {
702
+ constructor(hostRef) {
703
+ registerInstance(this, hostRef);
704
+ this.initialHeaderClick = createEvent(this, "initialHeaderClick", 7);
705
+ this.headerresize = createEvent(this, "headerresize", 7);
706
+ this.beforeResize = createEvent(this, "before-resize", 7);
707
+ this.headerdblClick = createEvent(this, "headerdblClick", 7);
708
+ this.viewportCol = undefined;
709
+ this.dimensionCol = undefined;
710
+ this.selectionStore = undefined;
711
+ this.parent = '';
712
+ this.groups = undefined;
713
+ this.groupingDepth = 0;
714
+ this.canResize = undefined;
715
+ this.resizeHandler = undefined;
716
+ this.colData = undefined;
717
+ this.columnFilter = undefined;
718
+ this.type = undefined;
719
+ this.additionalData = {};
720
+ }
721
+ onResize({ width }, index) {
722
+ const col = this.colData[index];
723
+ const event = this.beforeResize.emit([Object.assign(Object.assign({}, col), { size: width || undefined })]);
724
+ if (event.defaultPrevented) {
725
+ return;
726
+ }
727
+ this.headerresize.emit({ [index]: width || 0 });
728
+ }
729
+ onResizeGroup(changedX, startIndex, endIndex) {
730
+ const sizes = {};
731
+ const cols = keyBy_1(this.viewportCol.get('items'), 'itemIndex');
732
+ const change = changedX / (endIndex - startIndex + 1);
733
+ for (let i = startIndex; i <= endIndex; i++) {
734
+ const item = cols[i];
735
+ if (item) {
736
+ sizes[i] = item.size + change;
737
+ }
738
+ }
739
+ this.headerresize.emit(sizes);
740
+ }
741
+ render() {
742
+ var _a;
743
+ const cols = this.viewportCol.get('items');
744
+ const range = (_a = this.selectionStore) === null || _a === void 0 ? void 0 : _a.get('range');
745
+ const cells = [];
746
+ const visibleProps = {};
747
+ // render header columns
748
+ for (let rgCol of cols) {
749
+ const colData = this.colData[rgCol.itemIndex];
750
+ cells.push(h(HeaderRenderer, { range: range, column: rgCol, data: Object.assign(Object.assign({}, colData), { index: rgCol.itemIndex, providers: this.providers }), canFilter: !!this.columnFilter, canResize: this.canResize, active: this.resizeHandler, onResize: e => this.onResize(e, rgCol.itemIndex), onDoubleClick: e => this.headerdblClick.emit(e), onClick: e => this.initialHeaderClick.emit(e), additionalData: this.additionalData }));
751
+ visibleProps[colData === null || colData === void 0 ? void 0 : colData.prop] = rgCol.itemIndex;
752
+ }
753
+ return [
754
+ h("div", { class: "group-rgRow" }, h(ColumnGroupsRenderer, { canResize: this.canResize, active: this.resizeHandler, visibleProps: visibleProps, providers: this.providers, groups: this.groups, dimensionCol: this.dimensionCol.state, depth: this.groupingDepth, onResize: (changedX, startIndex, endIndex) => this.onResizeGroup(changedX, startIndex, endIndex), additionalData: this.additionalData })),
755
+ h("div", { class: `${HEADER_ROW_CLASS} ${HEADER_ACTUAL_ROW_CLASS}` }, cells),
756
+ ];
757
+ }
758
+ get providers() {
759
+ return {
760
+ type: this.type,
761
+ data: this.colData,
762
+ viewport: this.viewportCol,
763
+ dimension: this.dimensionCol,
764
+ selection: this.selectionStore,
765
+ };
766
+ }
767
+ get element() { return getElement(this); }
768
+ };
769
+ RevogrHeaderComponent.style = revogrHeaderStyleCss;
770
+
771
+ /** Error message constants. */
772
+ var FUNC_ERROR_TEXT = 'Expected a function';
773
+
774
+ /**
775
+ * Creates a throttled function that only invokes `func` at most once per
776
+ * every `wait` milliseconds. The throttled function comes with a `cancel`
777
+ * method to cancel delayed `func` invocations and a `flush` method to
778
+ * immediately invoke them. Provide `options` to indicate whether `func`
779
+ * should be invoked on the leading and/or trailing edge of the `wait`
780
+ * timeout. The `func` is invoked with the last arguments provided to the
781
+ * throttled function. Subsequent calls to the throttled function return the
782
+ * result of the last `func` invocation.
783
+ *
784
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
785
+ * invoked on the trailing edge of the timeout only if the throttled function
786
+ * is invoked more than once during the `wait` timeout.
787
+ *
788
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
789
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
790
+ *
791
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
792
+ * for details over the differences between `_.throttle` and `_.debounce`.
793
+ *
794
+ * @static
795
+ * @memberOf _
796
+ * @since 0.1.0
797
+ * @category Function
798
+ * @param {Function} func The function to throttle.
799
+ * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
800
+ * @param {Object} [options={}] The options object.
801
+ * @param {boolean} [options.leading=true]
802
+ * Specify invoking on the leading edge of the timeout.
803
+ * @param {boolean} [options.trailing=true]
804
+ * Specify invoking on the trailing edge of the timeout.
805
+ * @returns {Function} Returns the new throttled function.
806
+ * @example
807
+ *
808
+ * // Avoid excessively updating the position while scrolling.
809
+ * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
810
+ *
811
+ * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
812
+ * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
813
+ * jQuery(element).on('click', throttled);
814
+ *
815
+ * // Cancel the trailing throttled invocation.
816
+ * jQuery(window).on('popstate', throttled.cancel);
817
+ */
818
+ function throttle(func, wait, options) {
819
+ var leading = true,
820
+ trailing = true;
821
+
822
+ if (typeof func != 'function') {
823
+ throw new TypeError(FUNC_ERROR_TEXT);
824
+ }
825
+ if (isObject_1(options)) {
826
+ leading = 'leading' in options ? !!options.leading : leading;
827
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
828
+ }
829
+ return debounce_1(func, wait, {
830
+ 'leading': leading,
831
+ 'maxWait': wait,
832
+ 'trailing': trailing
833
+ });
834
+ }
835
+
836
+ var throttle_1 = throttle;
837
+
838
+ async function resizeObserver() {
839
+ if (!('ResizeObserver' in window)) {
840
+ const module = await import('./resize-observer-d817c4b6.js');
841
+ window.ResizeObserver = module.ResizeObserver;
842
+ }
843
+ }
844
+
845
+ class GridResizeService {
846
+ constructor(el, events) {
847
+ this.events = events;
848
+ this.resizeObserver = null;
849
+ this.resize = throttle_1((e, o) => { var _a; return (_a = this.events) === null || _a === void 0 ? void 0 : _a.resize(e, o); }, 10);
850
+ this.init(el);
851
+ }
852
+ async init(el) {
853
+ var _a;
854
+ await resizeObserver();
855
+ this.resizeObserver = new ResizeObserver(this.resize);
856
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(el);
857
+ }
858
+ destroy() {
859
+ var _a;
860
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
861
+ this.resizeObserver = null;
862
+ }
863
+ }
864
+
865
+ const revogrViewportScrollStyleCss = ".revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}.rowHeaders{z-index:2;font-size:10px;display:flex;height:100%}.rowHeaders revogr-data .rgCell{text-align:center}.rowHeaders .rgCell{padding:0 1em !important;min-width:100%}revogr-viewport-scroll{-ms-overflow-style:none;scrollbar-width:none;overflow-x:auto;overflow-y:hidden;position:relative;z-index:1;height:100%}revogr-viewport-scroll::-webkit-scrollbar{display:none;-webkit-appearance:none}revogr-viewport-scroll.colPinStart,revogr-viewport-scroll.colPinEnd{z-index:2}revogr-viewport-scroll.colPinEnd:has(.active){overflow:visible}revogr-viewport-scroll.rgCol{flex-grow:1}revogr-viewport-scroll .content-wrapper{overflow:hidden}revogr-viewport-scroll .inner-content-table{display:flex;flex-direction:column;max-height:100%;width:100%;min-width:100%;position:relative;z-index:0}revogr-viewport-scroll .vertical-inner{overflow-y:auto;position:relative;width:100%;flex-grow:1;-ms-overflow-style:none;scrollbar-width:none;}revogr-viewport-scroll .vertical-inner::-webkit-scrollbar{display:none;-webkit-appearance:none}revogr-viewport-scroll .vertical-inner revogr-data,revogr-viewport-scroll .vertical-inner revogr-overlay-selection{height:100%}";
866
+
867
+ const RevogrViewportScroll = class {
868
+ constructor(hostRef) {
869
+ registerInstance(this, hostRef);
870
+ this.scrollViewport = createEvent(this, "scrollViewport", 7);
871
+ this.resizeViewport = createEvent(this, "resizeViewport", 7);
872
+ this.scrollchange = createEvent(this, "scrollchange", 7);
873
+ this.silentScroll = createEvent(this, "silentScroll", 7);
874
+ this.scrollThrottling = 10;
875
+ this.oldValY = this.contentHeight;
876
+ this.oldValX = this.contentWidth;
877
+ /**
878
+ * Last mw event time for trigger scroll function below
879
+ * If mousewheel function was ignored we still need to trigger render
880
+ */
881
+ this.mouseWheelScroll = {
882
+ rgCol: 0,
883
+ rgRow: 0,
884
+ };
885
+ this.contentWidth = 0;
886
+ this.contentHeight = 0;
887
+ }
888
+ async setScroll(e) {
889
+ var _a;
890
+ this.latestScrollUpdate(e.dimension);
891
+ (_a = this.scrollService) === null || _a === void 0 ? void 0 : _a.setScroll(e);
892
+ }
893
+ /**
894
+ * update on delta in case we don't know existing position or external change
895
+ * @param e
896
+ */
897
+ async changeScroll(e, silent = false) {
898
+ if (silent) {
899
+ if (e.coordinate) {
900
+ switch (e.dimension) {
901
+ // for mobile devices to skip negative scroll loop. only on vertical scroll
902
+ case 'rgRow':
903
+ this.verticalScroll.style.transform = `translateY(${-1 * e.coordinate}px)`;
904
+ break;
905
+ }
906
+ }
907
+ return null;
908
+ }
909
+ if (e.delta) {
910
+ switch (e.dimension) {
911
+ case 'rgCol':
912
+ e.coordinate = this.horizontalScroll.scrollLeft + e.delta;
913
+ break;
914
+ case 'rgRow':
915
+ e.coordinate = this.verticalScroll.scrollTop + e.delta;
916
+ break;
917
+ }
918
+ this.setScroll(e);
919
+ }
920
+ return e;
921
+ }
922
+ /**
923
+ * Dispatch this event to trigger vertical mouse wheel from plugins
924
+ */
925
+ mousewheelVertical({ detail: e, }) {
926
+ this.verticalMouseWheel(e);
927
+ }
928
+ /**
929
+ * Dispatch this event to trigger horizontal mouse wheel from plugins
930
+ */
931
+ mousewheelHorizontal({ detail: e, }) {
932
+ this.horizontalMouseWheel(e);
933
+ }
934
+ /**
935
+ * Allows to use outside listener
936
+ */
937
+ scrollApply({ detail: { type, coordinate }, }) {
938
+ this.applyOnScroll(type, coordinate, true);
939
+ }
940
+ connectedCallback() {
941
+ /**
942
+ * Bind scroll functions for farther usage
943
+ */
944
+ if ('ontouchstart' in document.documentElement) {
945
+ this.scrollThrottling = 0;
946
+ }
947
+ else {
948
+ this.verticalMouseWheel = this.onVerticalMouseWheel.bind(this, 'rgRow', 'deltaY');
949
+ this.horizontalMouseWheel = this.onHorizontalMouseWheel.bind(this, 'rgCol', 'deltaX');
950
+ }
951
+ /**
952
+ * Create local scroll service
953
+ */
954
+ this.scrollService = new LocalScrollService({
955
+ beforeScroll: e => this.scrollViewport.emit(e),
956
+ afterScroll: e => {
957
+ switch (e.dimension) {
958
+ case 'rgCol':
959
+ this.horizontalScroll.scrollLeft = e.coordinate;
960
+ break;
961
+ case 'rgRow':
962
+ this.verticalScroll.scrollTop = e.coordinate;
963
+ // for mobile devices to skip negative scroll loop. only on vertical scroll
964
+ if (this.verticalScroll.style.transform) {
965
+ this.verticalScroll.style.transform = '';
966
+ }
967
+ break;
968
+ }
969
+ },
970
+ });
971
+ }
972
+ componentDidLoad() {
973
+ // track horizontal viewport resize
974
+ this.resizeService = new GridResizeService(this.horizontalScroll, {
975
+ resize: entries => {
976
+ var _a, _b;
977
+ let height = ((_a = entries[0]) === null || _a === void 0 ? void 0 : _a.contentRect.height) || 0;
978
+ if (height) {
979
+ height -= this.header.clientHeight + this.footer.clientHeight;
980
+ }
981
+ const els = {
982
+ rgRow: {
983
+ size: height,
984
+ contentSize: this.contentHeight,
985
+ scroll: this.verticalScroll.scrollTop,
986
+ },
987
+ rgCol: {
988
+ size: ((_b = entries[0]) === null || _b === void 0 ? void 0 : _b.contentRect.width) || 0,
989
+ contentSize: this.contentWidth,
990
+ scroll: this.horizontalScroll.scrollLeft,
991
+ },
992
+ };
993
+ each(els, (item, dimension) => {
994
+ var _a;
995
+ this.resizeViewport.emit({ dimension, size: item.size });
996
+ (_a = this.scrollService) === null || _a === void 0 ? void 0 : _a.scroll(item.scroll, dimension, true);
997
+ // track scroll visibility on outer element change
998
+ this.setScrollVisibility(dimension, item.size, item.contentSize);
999
+ });
1000
+ },
1001
+ });
1002
+ }
1003
+ /**
1004
+ * Check if scroll present or not per type
1005
+ * Trigger this method on inner content size change or on outer element size change
1006
+ * If inner content bigger then outer size then scroll is present and mousewheel binding required
1007
+ * @param type - dimension type 'rgRow/y' or 'rgCol/x'
1008
+ * @param size - outer content size
1009
+ * @param innerContentSize - inner content size
1010
+ */
1011
+ setScrollVisibility(type, size, innerContentSize) {
1012
+ // test if scroll present
1013
+ const hasScroll = size < innerContentSize;
1014
+ let el;
1015
+ // event reference for binding
1016
+ switch (type) {
1017
+ case 'rgCol':
1018
+ el = this.horizontalScroll;
1019
+ break;
1020
+ case 'rgRow':
1021
+ el = this.verticalScroll;
1022
+ break;
1023
+ }
1024
+ // based on scroll visibility assign or remove class and event
1025
+ if (hasScroll) {
1026
+ el.classList.add(`scroll-${type}`);
1027
+ }
1028
+ else {
1029
+ el.classList.remove(`scroll-${type}`);
1030
+ }
1031
+ this.scrollchange.emit({ type, hasScroll });
1032
+ }
1033
+ disconnectedCallback() {
1034
+ this.resizeService.destroy();
1035
+ }
1036
+ async componentDidRender() {
1037
+ // scroll update if number of rows changed
1038
+ if (this.contentHeight < this.oldValY && this.verticalScroll) {
1039
+ this.verticalScroll.scrollTop += this.contentHeight - this.oldValY;
1040
+ }
1041
+ this.oldValY = this.contentHeight;
1042
+ // scroll update if number of cols changed
1043
+ if (this.contentWidth < this.oldValX) {
1044
+ this.horizontalScroll.scrollLeft += this.contentWidth - this.oldValX;
1045
+ }
1046
+ this.oldValX = this.contentWidth;
1047
+ this.scrollService.setParams({
1048
+ contentSize: this.contentHeight,
1049
+ clientSize: this.verticalScroll.clientHeight,
1050
+ virtualSize: 0,
1051
+ }, 'rgRow');
1052
+ this.scrollService.setParams({
1053
+ contentSize: this.contentWidth,
1054
+ clientSize: this.horizontalScroll.clientWidth,
1055
+ virtualSize: 0,
1056
+ }, 'rgCol');
1057
+ this.setScrollVisibility('rgRow', this.verticalScroll.clientHeight, this.contentHeight);
1058
+ this.setScrollVisibility('rgCol', this.horizontalScroll.clientWidth, this.contentWidth);
1059
+ }
1060
+ render() {
1061
+ return (h(Host, { onWheel: this.horizontalMouseWheel, onScroll: (e) => this.onScroll('rgCol', e) }, h("div", { class: "inner-content-table", style: { width: `${this.contentWidth}px` } }, h("div", { class: "header-wrapper", ref: e => (this.header = e) }, h("slot", { name: HEADER_SLOT })), h("div", { class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.onScroll('rgRow', e) }, h("div", { class: "content-wrapper", style: { height: `${this.contentHeight}px` } }, h("slot", { name: CONTENT_SLOT }))), h("div", { class: "footer-wrapper", ref: e => (this.footer = e) }, h("slot", { name: FOOTER_SLOT })))));
1062
+ }
1063
+ /**
1064
+ * Extra layer for scroll event monitoring, where MouseWheel event is not passing
1065
+ * We need to trigger scroll event in case there is no mousewheel event
1066
+ */
1067
+ onScroll(type, e) {
1068
+ if (!(e.target instanceof HTMLElement)) {
1069
+ return;
1070
+ }
1071
+ const target = e.target;
1072
+ let scroll = 0;
1073
+ switch (type) {
1074
+ case 'rgCol':
1075
+ scroll = target === null || target === void 0 ? void 0 : target.scrollLeft;
1076
+ break;
1077
+ case 'rgRow':
1078
+ scroll = target === null || target === void 0 ? void 0 : target.scrollTop;
1079
+ break;
1080
+ }
1081
+ // for mobile devices to skip negative scroll loop
1082
+ if (scroll < 0) {
1083
+ this.silentScroll.emit({ dimension: type, coordinate: scroll });
1084
+ return;
1085
+ }
1086
+ this.applyOnScroll(type, scroll);
1087
+ }
1088
+ applyOnScroll(type, coordinate, outside = false) {
1089
+ var _a;
1090
+ const change = new Date().getTime() - this.mouseWheelScroll[type];
1091
+ // apply after throttling
1092
+ if (change > this.scrollThrottling) {
1093
+ (_a = this.scrollService) === null || _a === void 0 ? void 0 : _a.scroll(coordinate, type, undefined, undefined, outside);
1094
+ }
1095
+ }
1096
+ /** remember last mw event time */
1097
+ latestScrollUpdate(dimension) {
1098
+ this.mouseWheelScroll[dimension] = new Date().getTime();
1099
+ }
1100
+ /**
1101
+ * On vertical mousewheel event
1102
+ * @param type
1103
+ * @param delta
1104
+ * @param e
1105
+ */
1106
+ onVerticalMouseWheel(type, delta, e) {
1107
+ var _a;
1108
+ e.preventDefault && e.preventDefault();
1109
+ const pos = this.verticalScroll.scrollTop + e[delta];
1110
+ (_a = this.scrollService) === null || _a === void 0 ? void 0 : _a.scroll(pos, type, undefined, e[delta]);
1111
+ this.latestScrollUpdate(type);
1112
+ }
1113
+ /**
1114
+ * On horizontal mousewheel event
1115
+ * @param type
1116
+ * @param delta
1117
+ * @param e
1118
+ */
1119
+ onHorizontalMouseWheel(type, delta, e) {
1120
+ var _a;
1121
+ e.preventDefault && e.preventDefault();
1122
+ const pos = this.horizontalScroll.scrollLeft + e[delta];
1123
+ (_a = this.scrollService) === null || _a === void 0 ? void 0 : _a.scroll(pos, type, undefined, e[delta]);
1124
+ this.latestScrollUpdate(type);
1125
+ }
1126
+ get horizontalScroll() { return getElement(this); }
1127
+ };
1128
+ RevogrViewportScroll.style = revogrViewportScrollStyleCss;
1129
+
1130
+ export { RevogrData as revogr_data, RevogrHeaderComponent as revogr_header, RevogrViewportScroll as revogr_viewport_scroll };
1131
+
1132
+ //# sourceMappingURL=revogr-data_3.entry.js.map