@revolist/revogrid 4.9.28 → 4.9.30

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 (212) hide show
  1. package/dist/cjs/{column.drag.plugin-34501a1e.js → column.drag.plugin-350ccc11.js} +100 -34
  2. package/dist/cjs/column.drag.plugin-350ccc11.js.map +1 -0
  3. package/dist/cjs/{column.service-9d63ff18.js → column.service-affe0219.js} +191 -3
  4. package/dist/cjs/column.service-affe0219.js.map +1 -0
  5. package/dist/cjs/{edit.utils-093fe9cd.js → edit.utils-c726b9a0.js} +2 -2
  6. package/dist/cjs/{edit.utils-093fe9cd.js.map → edit.utils-c726b9a0.js.map} +1 -1
  7. package/dist/cjs/{header-cell-renderer-e4258dfd.js → header-cell-renderer-820a866d.js} +2 -2
  8. package/dist/cjs/{header-cell-renderer-e4258dfd.js.map → header-cell-renderer-820a866d.js.map} +1 -1
  9. package/dist/cjs/{index-a9ee8eef.js → index-01270cfd.js} +12 -263
  10. package/dist/cjs/index-01270cfd.js.map +1 -0
  11. package/dist/cjs/index-10d10c55.js +2 -2
  12. package/dist/cjs/index.cjs.js +9 -7
  13. package/dist/cjs/index.cjs.js.map +1 -1
  14. package/dist/cjs/{key.utils-1438f2ac.js → key.utils-9739c6e8.js} +2 -2
  15. package/dist/cjs/{key.utils-1438f2ac.js.map → key.utils-9739c6e8.js.map} +1 -1
  16. package/dist/cjs/loader.cjs.js +1 -1
  17. package/dist/cjs/revo-grid.cjs.entry.js +89 -50
  18. package/dist/cjs/revo-grid.cjs.entry.js.map +1 -1
  19. package/dist/cjs/revo-grid.cjs.js +1 -1
  20. package/dist/cjs/{revogr-attribution_6.cjs.entry.js → revogr-attribution_7.cjs.entry.js} +76 -35
  21. package/dist/cjs/revogr-attribution_7.cjs.entry.js.map +1 -0
  22. package/dist/cjs/revogr-clipboard_3.cjs.entry.js +5 -5
  23. package/dist/cjs/revogr-data_4.cjs.entry.js +14 -10
  24. package/dist/cjs/revogr-data_4.cjs.entry.js.map +1 -1
  25. package/dist/cjs/revogr-filter-panel.cjs.entry.js +21 -9
  26. package/dist/cjs/revogr-filter-panel.cjs.entry.js.map +1 -1
  27. package/dist/cjs/{row-header-utils-eb5949b3.js → row-header-utils-63591189.js} +2 -2
  28. package/dist/cjs/{row-header-utils-eb5949b3.js.map → row-header-utils-63591189.js.map} +1 -1
  29. package/dist/cjs/{text-editor-ea3badef.js → text-editor-fc7b1ea9.js} +3 -3
  30. package/dist/cjs/{text-editor-ea3badef.js.map → text-editor-fc7b1ea9.js.map} +1 -1
  31. package/dist/cjs/{throttle-6fecba1e.js → throttle-64eee101.js} +2 -2
  32. package/dist/cjs/{throttle-6fecba1e.js.map → throttle-64eee101.js.map} +1 -1
  33. package/dist/collection/collection-manifest.json +1 -0
  34. package/dist/collection/components/data/revogr-data-style.css +3 -3
  35. package/dist/collection/components/editors/revogr-edit-style.css +3 -3
  36. package/dist/collection/components/extra/revogr-extra.js +78 -0
  37. package/dist/collection/components/extra/revogr-extra.js.map +1 -0
  38. package/dist/collection/components/header/revogr-header-style.css +3 -3
  39. package/dist/collection/components/header/revogr-header.js +31 -2
  40. package/dist/collection/components/header/revogr-header.js.map +1 -1
  41. package/dist/collection/components/overlay/autofill.service.js.map +1 -1
  42. package/dist/collection/components/overlay/revogr-overlay-selection.js +66 -19
  43. package/dist/collection/components/overlay/revogr-overlay-selection.js.map +1 -1
  44. package/dist/collection/components/overlay/revogr-overlay-style.css +3 -3
  45. package/dist/collection/components/overlay/selection.utils.js +1 -5
  46. package/dist/collection/components/overlay/selection.utils.js.map +1 -1
  47. package/dist/collection/components/revoGrid/revo-grid-style.css +3 -3
  48. package/dist/collection/components/revoGrid/revo-grid.js +56 -16
  49. package/dist/collection/components/revoGrid/revo-grid.js.map +1 -1
  50. package/dist/collection/components/revoGrid/viewport.service.js +8 -7
  51. package/dist/collection/components/revoGrid/viewport.service.js.map +1 -1
  52. package/dist/collection/components/scroll/revogr-viewport-scroll-style.css +3 -3
  53. package/dist/collection/components/scrollable/revogr-scroll-style.css +3 -3
  54. package/dist/collection/components/selectionFocus/revogr-focus-style.css +3 -3
  55. package/dist/collection/components/selectionFocus/revogr-focus.js +10 -3
  56. package/dist/collection/components/selectionFocus/revogr-focus.js.map +1 -1
  57. package/dist/collection/components/selectionTempRange/revogr-temp-range-style.css +3 -3
  58. package/dist/collection/components/selectionTempRange/revogr-temp-range.js +10 -4
  59. package/dist/collection/components/selectionTempRange/revogr-temp-range.js.map +1 -1
  60. package/dist/collection/plugins/filter/filter.panel.js +22 -10
  61. package/dist/collection/plugins/filter/filter.panel.js.map +1 -1
  62. package/dist/collection/plugins/filter/filter.plugin.js +10 -13
  63. package/dist/collection/plugins/filter/filter.plugin.js.map +1 -1
  64. package/dist/collection/plugins/filter/filter.style.css +6 -3
  65. package/dist/collection/plugins/filter/filter.types.js.map +1 -1
  66. package/dist/collection/serve/controller.js +1 -1
  67. package/dist/collection/serve/data.js +5 -1
  68. package/dist/collection/services/column.data.provider.js +16 -13
  69. package/dist/collection/services/column.data.provider.js.map +1 -1
  70. package/dist/collection/services/dimension.provider.js +15 -7
  71. package/dist/collection/services/dimension.provider.js.map +1 -1
  72. package/dist/collection/store/dataSource/data.store.js +6 -3
  73. package/dist/collection/store/dataSource/data.store.js.map +1 -1
  74. package/dist/collection/store/dimension/dimension.helpers.js +2 -8
  75. package/dist/collection/store/dimension/dimension.helpers.js.map +1 -1
  76. package/dist/collection/types/interfaces.js.map +1 -1
  77. package/dist/collection/utils/column.utils.js +3 -0
  78. package/dist/collection/utils/column.utils.js.map +1 -1
  79. package/dist/esm/{column.drag.plugin-1474c3ae.js → column.drag.plugin-cab965af.js} +85 -21
  80. package/dist/esm/column.drag.plugin-cab965af.js.map +1 -0
  81. package/dist/esm/{column.service-9e1f693c.js → column.service-c66e75f2.js} +189 -3
  82. package/dist/esm/column.service-c66e75f2.js.map +1 -0
  83. package/dist/esm/{edit.utils-1eeabeab.js → edit.utils-19a4c775.js} +2 -2
  84. package/dist/esm/{edit.utils-1eeabeab.js.map → edit.utils-19a4c775.js.map} +1 -1
  85. package/dist/esm/{header-cell-renderer-2ef5f8a1.js → header-cell-renderer-39ed6d63.js} +2 -2
  86. package/dist/esm/{header-cell-renderer-2ef5f8a1.js.map → header-cell-renderer-39ed6d63.js.map} +1 -1
  87. package/dist/esm/index-a61f225b.js +2 -2
  88. package/dist/esm/{index-b6586f9b.js → index-ba44e9d4.js} +10 -261
  89. package/dist/esm/index-ba44e9d4.js.map +1 -0
  90. package/dist/esm/index.js +7 -7
  91. package/dist/esm/{key.utils-562c749e.js → key.utils-7d553ef4.js} +2 -2
  92. package/dist/esm/{key.utils-562c749e.js.map → key.utils-7d553ef4.js.map} +1 -1
  93. package/dist/esm/loader.js +1 -1
  94. package/dist/esm/revo-grid.entry.js +82 -43
  95. package/dist/esm/revo-grid.entry.js.map +1 -1
  96. package/dist/esm/revo-grid.js +1 -1
  97. package/dist/esm/{revogr-attribution_6.entry.js → revogr-attribution_7.entry.js} +76 -36
  98. package/dist/esm/revogr-attribution_7.entry.js.map +1 -0
  99. package/dist/esm/revogr-clipboard_3.entry.js +5 -5
  100. package/dist/esm/revogr-data_4.entry.js +13 -9
  101. package/dist/esm/revogr-data_4.entry.js.map +1 -1
  102. package/dist/esm/revogr-filter-panel.entry.js +21 -9
  103. package/dist/esm/revogr-filter-panel.entry.js.map +1 -1
  104. package/dist/esm/{row-header-utils-e043f744.js → row-header-utils-0e99306d.js} +2 -2
  105. package/dist/esm/{row-header-utils-e043f744.js.map → row-header-utils-0e99306d.js.map} +1 -1
  106. package/dist/esm/{text-editor-654f5d53.js → text-editor-b624b721.js} +3 -3
  107. package/dist/esm/{text-editor-654f5d53.js.map → text-editor-b624b721.js.map} +1 -1
  108. package/dist/esm/{throttle-bb3169c7.js → throttle-d31899f3.js} +2 -2
  109. package/dist/esm/{throttle-bb3169c7.js.map → throttle-d31899f3.js.map} +1 -1
  110. package/dist/revo-grid/column.drag.plugin-cab965af.js +5 -0
  111. package/dist/revo-grid/column.drag.plugin-cab965af.js.map +1 -0
  112. package/dist/revo-grid/column.service-c66e75f2.js +5 -0
  113. package/dist/revo-grid/column.service-c66e75f2.js.map +1 -0
  114. package/dist/revo-grid/{edit.utils-1eeabeab.js → edit.utils-19a4c775.js} +2 -2
  115. package/dist/revo-grid/{header-cell-renderer-2ef5f8a1.js → header-cell-renderer-39ed6d63.js} +2 -2
  116. package/dist/revo-grid/{index-b6586f9b.js → index-ba44e9d4.js} +2 -2
  117. package/dist/revo-grid/index-ba44e9d4.js.map +1 -0
  118. package/dist/revo-grid/index.esm.js +1 -1
  119. package/dist/revo-grid/key.utils-7d553ef4.js +5 -0
  120. package/dist/revo-grid/{key.utils-562c749e.js.map → key.utils-7d553ef4.js.map} +1 -1
  121. package/dist/revo-grid/revo-grid.entry.js +1 -1
  122. package/dist/revo-grid/revo-grid.entry.js.map +1 -1
  123. package/dist/revo-grid/revo-grid.esm.js +1 -1
  124. package/dist/revo-grid/revo-grid.esm.js.map +1 -1
  125. package/dist/revo-grid/revogr-attribution_7.entry.js +5 -0
  126. package/dist/revo-grid/revogr-attribution_7.entry.js.map +1 -0
  127. package/dist/revo-grid/revogr-clipboard_3.entry.js +1 -1
  128. package/dist/revo-grid/revogr-clipboard_3.entry.js.map +1 -1
  129. package/dist/revo-grid/revogr-data_4.entry.js +1 -1
  130. package/dist/revo-grid/revogr-data_4.entry.js.map +1 -1
  131. package/dist/revo-grid/revogr-filter-panel.entry.js +1 -1
  132. package/dist/revo-grid/revogr-filter-panel.entry.js.map +1 -1
  133. package/dist/revo-grid/row-header-utils-0e99306d.js +5 -0
  134. package/dist/revo-grid/text-editor-b624b721.js +5 -0
  135. package/dist/revo-grid/{throttle-bb3169c7.js → throttle-d31899f3.js} +2 -2
  136. package/dist/types/components/extra/revogr-extra.d.ts +24 -0
  137. package/dist/types/components/header/revogr-header.d.ts +7 -2
  138. package/dist/types/components/overlay/autofill.service.d.ts +1 -1
  139. package/dist/types/components/overlay/revogr-overlay-selection.d.ts +8 -2
  140. package/dist/types/components/overlay/selection.utils.d.ts +7 -4
  141. package/dist/types/components/revoGrid/revo-grid.d.ts +22 -13
  142. package/dist/types/components.d.ts +52 -6
  143. package/dist/types/plugins/filter/filter.panel.d.ts +3 -0
  144. package/dist/types/plugins/filter/filter.plugin.d.ts +2 -5
  145. package/dist/types/plugins/filter/filter.types.d.ts +3 -2
  146. package/dist/types/services/column.data.provider.d.ts +5 -1
  147. package/dist/types/services/dimension.provider.d.ts +5 -0
  148. package/dist/types/store/dataSource/data.store.d.ts +2 -1
  149. package/dist/types/store/dimension/dimension.helpers.d.ts +1 -1
  150. package/dist/types/types/interfaces.d.ts +3 -1
  151. package/dist/types/utils/column.utils.d.ts +3 -0
  152. package/hydrate/index.js +301 -172
  153. package/hydrate/index.mjs +301 -172
  154. package/package.json +1 -1
  155. package/standalone/column.service.js +188 -2
  156. package/standalone/column.service.js.map +1 -1
  157. package/standalone/{reduce.js → data.store.js} +8 -188
  158. package/standalone/data.store.js.map +1 -0
  159. package/standalone/dimension.helpers.js +4 -75
  160. package/standalone/dimension.helpers.js.map +1 -1
  161. package/standalone/index.d.ts +2 -0
  162. package/standalone/index.js +3 -2
  163. package/standalone/index.js.map +1 -1
  164. package/standalone/revo-grid.js +174 -65
  165. package/standalone/revo-grid.js.map +1 -1
  166. package/standalone/revogr-data2.js +3 -3
  167. package/standalone/revogr-edit2.js +1 -1
  168. package/standalone/revogr-extra.d.ts +11 -0
  169. package/standalone/revogr-extra.js +11 -0
  170. package/standalone/revogr-extra.js.map +1 -0
  171. package/standalone/revogr-extra2.js +45 -0
  172. package/standalone/revogr-extra2.js.map +1 -0
  173. package/standalone/revogr-filter-panel.js +21 -9
  174. package/standalone/revogr-filter-panel.js.map +1 -1
  175. package/standalone/revogr-focus2.js +12 -5
  176. package/standalone/revogr-focus2.js.map +1 -1
  177. package/standalone/revogr-header2.js +9 -5
  178. package/standalone/revogr-header2.js.map +1 -1
  179. package/standalone/revogr-order-editor2.js +1 -1
  180. package/standalone/revogr-overlay-selection2.js +30 -18
  181. package/standalone/revogr-overlay-selection2.js.map +1 -1
  182. package/standalone/revogr-row-headers2.js +1 -1
  183. package/standalone/revogr-scroll-virtual2.js +1 -1
  184. package/standalone/revogr-temp-range2.js +11 -5
  185. package/standalone/revogr-temp-range2.js.map +1 -1
  186. package/standalone/revogr-viewport-scroll2.js +1 -1
  187. package/standalone/selection.utils.js +2 -6
  188. package/standalone/selection.utils.js.map +1 -1
  189. package/dist/cjs/column.drag.plugin-34501a1e.js.map +0 -1
  190. package/dist/cjs/column.service-9d63ff18.js.map +0 -1
  191. package/dist/cjs/index-a9ee8eef.js.map +0 -1
  192. package/dist/cjs/revogr-attribution_6.cjs.entry.js.map +0 -1
  193. package/dist/esm/column.drag.plugin-1474c3ae.js.map +0 -1
  194. package/dist/esm/column.service-9e1f693c.js.map +0 -1
  195. package/dist/esm/index-b6586f9b.js.map +0 -1
  196. package/dist/esm/revogr-attribution_6.entry.js.map +0 -1
  197. package/dist/revo-grid/column.drag.plugin-1474c3ae.js +0 -5
  198. package/dist/revo-grid/column.drag.plugin-1474c3ae.js.map +0 -1
  199. package/dist/revo-grid/column.service-9e1f693c.js +0 -5
  200. package/dist/revo-grid/column.service-9e1f693c.js.map +0 -1
  201. package/dist/revo-grid/index-b6586f9b.js.map +0 -1
  202. package/dist/revo-grid/key.utils-562c749e.js +0 -5
  203. package/dist/revo-grid/revogr-attribution_6.entry.js +0 -5
  204. package/dist/revo-grid/revogr-attribution_6.entry.js.map +0 -1
  205. package/dist/revo-grid/row-header-utils-e043f744.js +0 -5
  206. package/dist/revo-grid/text-editor-654f5d53.js +0 -5
  207. package/standalone/reduce.js.map +0 -1
  208. /package/dist/revo-grid/{edit.utils-1eeabeab.js.map → edit.utils-19a4c775.js.map} +0 -0
  209. /package/dist/revo-grid/{header-cell-renderer-2ef5f8a1.js.map → header-cell-renderer-39ed6d63.js.map} +0 -0
  210. /package/dist/revo-grid/{row-header-utils-e043f744.js.map → row-header-utils-0e99306d.js.map} +0 -0
  211. /package/dist/revo-grid/{text-editor-654f5d53.js.map → text-editor-b624b721.js.map} +0 -0
  212. /package/dist/revo-grid/{throttle-bb3169c7.js.map → throttle-d31899f3.js.map} +0 -0
@@ -2,9 +2,9 @@
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
4
  import { h, Build, proxyCustomElement, HTMLElement as HTMLElement$1, createEvent, Host } from '@stencil/core/internal/client';
5
- import { A as GROUP_EXPAND_BTN, v as GROUP_EXPAND_EVENT, B as PSEUDO_GROUP_ITEM, G as GROUP_EXPANDED, r as GROUP_DEPTH, C as isRowDragService, b as getCellData, D as ColumnService, m as isGrouping } from './column.service.js';
5
+ import { C as GROUP_EXPAND_BTN, x as GROUP_EXPAND_EVENT, D as PSEUDO_GROUP_ITEM, G as GROUP_EXPANDED, t as GROUP_DEPTH, F as isRowDragService, b as getCellData, H as ColumnService, o as isGrouping } from './column.service.js';
6
6
  import { a as DATA_ROW, l as ROW_FOCUSED_CLASS, h as DRAGGABLE_CLASS, g as DRAG_ICON_CLASS, D as DATA_COL } from './consts.js';
7
- import { b as getSourceItem } from './reduce.js';
7
+ import { b as getSourceItem } from './data.store.js';
8
8
  import './platform.js';
9
9
  import { d as defineCustomElement$1 } from './vnode-converter.js';
10
10
 
@@ -148,7 +148,7 @@ const CellRenderer = ({ renderProps, cellProps, }) => {
148
148
  return (h("div", Object.assign({}, cellProps, { redraw: render }), render()));
149
149
  };
150
150
 
151
- const revogrDataStyleCss = ".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.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:#009037;border:1px solid #00772d}.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:1px solid #cedefa;line-height:32px;background:none;color:#000;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;text-align:left}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;display:inline-flex}revogr-data .revo-draggable:hover>.revo-drag-icon{opacity:1;zoom:1.2;font-weight:600}revogr-data .revo-draggable>.revo-drag-icon{pointer-events:none;transition:opacity 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, zoom 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms}revogr-data .rgCell{top:0;left:0;position:absolute;box-sizing:border-box;height:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;outline:none}revogr-data .rgCell.align-center{text-align:center}revogr-data .rgCell.align-left{text-align:left}revogr-data .rgCell.align-right{text-align:right}";
151
+ const revogrDataStyleCss = ".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.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:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037;border:1px solid #00772d}.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:1px solid #cedefa;line-height:30px;background:none;color:#000;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;text-align:left}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;display:inline-flex}revogr-data .revo-draggable:hover>.revo-drag-icon{opacity:1;zoom:1.2;font-weight:600}revogr-data .revo-draggable>.revo-drag-icon{pointer-events:none;transition:opacity 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, zoom 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms}revogr-data .rgCell{top:0;left:0;position:absolute;box-sizing:border-box;height:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;outline:none}revogr-data .rgCell.align-center{text-align:center}revogr-data .rgCell.align-left{text-align:left}revogr-data .rgCell.align-right{text-align:right}";
152
152
  const RevogrDataStyle0 = revogrDataStyleCss;
153
153
 
154
154
  const RevogrData = /*@__PURE__*/ proxyCustomElement(class RevogrData extends HTMLElement$1 {
@@ -167,7 +167,7 @@ function isEditorCtrConstructible(editor) {
167
167
  return typeof editor === 'function' && typeof editor.prototype === 'object';
168
168
  }
169
169
 
170
- const revogrEditStyleCss = ".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.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:#009037;border:1px solid #00772d}.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:1px solid #cedefa;line-height:32px;background:none;color:#000;box-shadow:none}revogr-edit{display:block;position:absolute;background-color:#fff}revogr-edit input{height:100%;width:100%;box-sizing:border-box}revogr-edit revo-dropdown{height:100%}revogr-edit revo-dropdown.shrink fieldset legend>span{display:none}";
170
+ const revogrEditStyleCss = ".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.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:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037;border:1px solid #00772d}.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:1px solid #cedefa;line-height:30px;background:none;color:#000;box-shadow:none}revogr-edit{display:block;position:absolute;background-color:#fff}revogr-edit input{height:100%;width:100%;box-sizing:border-box}revogr-edit revo-dropdown{height:100%}revogr-edit revo-dropdown.shrink fieldset legend>span{display:none}";
171
171
  const RevogrEditStyle0 = revogrEditStyleCss;
172
172
 
173
173
  const RevoEdit = /*@__PURE__*/ proxyCustomElement(class RevoEdit extends HTMLElement {
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../dist/types/components";
2
+
3
+ interface RevogrExtra extends Components.RevogrExtra, HTMLElement {}
4
+ export const RevogrExtra: {
5
+ prototype: RevogrExtra;
6
+ new (): RevogrExtra;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,11 @@
1
+ /*!
2
+ * Built by Revolist OU ❤️
3
+ */
4
+ import { R as RevoGridExtra, d as defineCustomElement$1 } from './revogr-extra2.js';
5
+
6
+ const RevogrExtra = RevoGridExtra;
7
+ const defineCustomElement = defineCustomElement$1;
8
+
9
+ export { RevogrExtra, defineCustomElement };
10
+
11
+ //# sourceMappingURL=revogr-extra.js.map
@@ -0,0 +1 @@
1
+ {"file":"revogr-extra.js","mappings":";;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -0,0 +1,45 @@
1
+ /*!
2
+ * Built by Revolist OU ❤️
3
+ */
4
+ import { proxyCustomElement, HTMLElement } from '@stencil/core/internal/client';
5
+
6
+ const RevoGridExtra = /*@__PURE__*/ proxyCustomElement(class RevoGridExtra extends HTMLElement {
7
+ constructor() {
8
+ super();
9
+ this.__registerHost();
10
+ this.nodes = null;
11
+ this.update = 1;
12
+ }
13
+ /**
14
+ * Refreshes the extra component. Useful if you want to manually
15
+ * force the component to re-render.
16
+ */
17
+ async refresh() {
18
+ this.update *= -1;
19
+ }
20
+ render() {
21
+ var _a;
22
+ return (_a = this.nodes) === null || _a === void 0 ? void 0 : _a.map(node => typeof node === 'function' ? node() : node);
23
+ }
24
+ }, [0, "revogr-extra", {
25
+ "nodes": [16],
26
+ "update": [32],
27
+ "refresh": [64]
28
+ }]);
29
+ function defineCustomElement() {
30
+ if (typeof customElements === "undefined") {
31
+ return;
32
+ }
33
+ const components = ["revogr-extra"];
34
+ components.forEach(tagName => { switch (tagName) {
35
+ case "revogr-extra":
36
+ if (!customElements.get(tagName)) {
37
+ customElements.define(tagName, RevoGridExtra);
38
+ }
39
+ break;
40
+ } });
41
+ }
42
+
43
+ export { RevoGridExtra as R, defineCustomElement as d };
44
+
45
+ //# sourceMappingURL=revogr-extra2.js.map
@@ -0,0 +1 @@
1
+ {"file":"revogr-extra2.js","mappings":";;;;;MAkBe,aAAa;;;;qBAI6B,IAAI;sBAIvC,CAAC;;;;;;IAMT,MAAM,OAAO;QACnB,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;KACrB;IAED,MAAM;;QACJ,OAAO,MAAA,IAAI,CAAC,KAAK,0CAAE,GAAG,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,UAAU,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;KAC5E;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/extra/revogr-extra.tsx"],"sourcesContent":["import {\n Component,\n Method,\n Prop,\n State,\n VNode,\n } from '@stencil/core';\n \n /**\n * Contains extra elements for stencil components.\n * Performs rendering and updates for external components.\n */\n /**\n * @internal\n */\n @Component({\n tag: 'revogr-extra',\n })\n export class RevoGridExtra {\n /**\n * Nodes to render\n */\n @Prop() nodes: ((VNode) | (() => VNode))[] | null = null;\n /**\n * Force component to re-render\n */\n @State() update = 1\n\n /**\n * Refreshes the extra component. Useful if you want to manually\n * force the component to re-render.\n */\n @Method() async refresh() {\n this.update *= -1;\n }\n\n render() {\n return this.nodes?.map(node => typeof node === 'function' ? node() : node);\n }\n }\n "],"version":3}
@@ -24,7 +24,7 @@ import { i as isFilterBtn, e as AndOrButton, d as TrashButton } from './filter.b
24
24
  }
25
25
  })();
26
26
 
27
- const filterStyleCss = ".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.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:#009037;border:1px solid #00772d}.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:1px solid #cedefa;line-height:32px;background:none;color:#000;box-shadow:none}revogr-filter-panel{position:absolute;display:block;top:0;left:0;z-index:100;opacity:1;transform:none;background-color:#fff;transform-origin:62px 0px;box-shadow:0 5px 18px -2px rgba(0, 0, 0, 0.2);padding:10px;border-radius:4px;min-width:220px;text-align:left}revogr-filter-panel .filter-holder>div{display:flex;flex-direction:column}revogr-filter-panel label{font-size:13px;display:block;padding:8px 0}revogr-filter-panel select{width:100%}revogr-filter-panel input[type=text]{border:0;min-height:34px;margin:5px 0;background:#f3f3f3;border-radius:5px;padding:0 10px;box-sizing:border-box;width:100%}revogr-filter-panel button{margin-top:10px;margin-right:5px}revogr-filter-panel .filter-actions{text-align:right;margin-right:-5px}.rgHeaderCell:hover .rv-filter{transition:opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms}.rgHeaderCell:hover .rv-filter,.rgHeaderCell .rv-filter.active{opacity:1}.rgHeaderCell .rv-filter{height:24px;width:24px;background:none;border:0;opacity:0;visibility:visible;cursor:pointer;border-radius:4px}.rgHeaderCell .rv-filter.active{color:#10224a}.rgHeaderCell .rv-filter .filter-img{color:gray;width:11px}.select-css{display:block;font-family:sans-serif;font-weight:600;color:#444;line-height:1.3;padding:0.6em 1.4em 0.5em 0.8em;width:100%;max-width:100%;box-sizing:border-box;margin:0;border:1px solid #f1f1f1;box-shadow:transparent;border-radius:0.5em;appearance:none;background-color:#fff;background-image:url(\"data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E\"), linear-gradient(to bottom, #ffffff 0%, #ffffff 100%);background-repeat:no-repeat, repeat;background-position:right 0.7em top 50%, 0 0;background-size:0.65em auto, 100%;}.select-css::-ms-expand{display:none}.select-css:hover{border-color:rgb(197, 197, 197)}.select-css:focus{border-color:#f1f1f1;box-shadow:0 0 1px 3px rgba(59, 153, 252, 0.7);box-shadow:0 0 0 3px -moz-mac-focusring;color:#222;outline:none}.select-css option{font-weight:normal}.select-css:disabled,.select-css[aria-disabled=true]{color:gray;background-image:url(\"data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22graytext%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E\"), linear-gradient(to bottom, #ffffff 0%, #ffffff 100%)}.select-css:disabled:hover,.select-css[aria-disabled=true]{border-color:#f1f1f1}.multi-filter-list{margin-top:5px;margin-bottom:5px}.multi-filter-list div{white-space:nowrap}.multi-filter-list .multi-filter-list-action{display:flex;justify-content:space-between;align-items:center}.multi-filter-list .and-or-button{margin:0 0 0 10px;min-width:58px;cursor:pointer}.multi-filter-list .trash-button{margin:0 0 -2px 6px;cursor:pointer;width:22px;height:100%;font-size:16px}.multi-filter-list .trash-button .trash-img{width:1em}.add-filter-divider{display:block;margin:0 -10px 10px -10px;border-bottom:1px solid #d9d9d9;height:10px}.select-input{display:flex;justify-content:space-between;align-items:center}";
27
+ const filterStyleCss = ".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.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:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037;border:1px solid #00772d}.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:1px solid #cedefa;line-height:30px;background:none;color:#000;box-shadow:none}revogr-filter-panel{position:absolute;display:block;top:0;left:0;z-index:100;max-height:calc(100% - 80px);min-width:250px;overflow:auto;opacity:1;transform:none;background-color:#fff;transform-origin:62px 0px;box-shadow:0 5px 18px -2px rgba(0, 0, 0, 0.2);padding:10px;border-radius:4px;min-width:220px;text-align:left}revogr-filter-panel .filter-holder>div{display:flex;flex-direction:column}revogr-filter-panel label{font-size:13px;display:block;padding:8px 0}revogr-filter-panel select{width:100%}revogr-filter-panel input[type=text]{border:0;min-height:34px;margin:5px 0;background:#f3f3f3;border-radius:5px;padding:0 10px;box-sizing:border-box;width:100%}revogr-filter-panel button{margin-top:10px;margin-right:5px}revogr-filter-panel .filter-actions{text-align:right;margin-right:-5px}.rgHeaderCell:hover .rv-filter{transition:opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms}.rgHeaderCell:hover .rv-filter,.rgHeaderCell .rv-filter.active{opacity:1}.rgHeaderCell .rv-filter{height:24px;width:24px;background:none;border:0;opacity:0;visibility:visible;cursor:pointer;border-radius:4px}.rgHeaderCell .rv-filter.active{color:#10224a}.rgHeaderCell .rv-filter .filter-img{color:gray;width:11px}.select-css{display:block;font-family:sans-serif;font-weight:600;color:#444;line-height:1.3;padding:0.6em 1.4em 0.5em 0.8em;width:100%;max-width:100%;box-sizing:border-box;margin:0;border:1px solid #f1f1f1;box-shadow:transparent;border-radius:0.5em;appearance:none;background-color:#fff;background-image:url(\"data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E\"), linear-gradient(to bottom, #ffffff 0%, #ffffff 100%);background-repeat:no-repeat, repeat;background-position:right 0.7em top 50%, 0 0;background-size:0.65em auto, 100%;}.select-css::-ms-expand{display:none}.select-css:hover{border-color:rgb(197, 197, 197)}.select-css:focus{border-color:#f1f1f1;box-shadow:0 0 1px 3px rgba(59, 153, 252, 0.7);box-shadow:0 0 0 3px -moz-mac-focusring;color:#222;outline:none}.select-css option{font-weight:normal}.select-css:disabled,.select-css[aria-disabled=true]{color:gray;background-image:url(\"data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22graytext%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E\"), linear-gradient(to bottom, #ffffff 0%, #ffffff 100%)}.select-css:disabled:hover,.select-css[aria-disabled=true]{border-color:#f1f1f1}.multi-filter-list{margin-top:5px;margin-bottom:5px}.multi-filter-list div{white-space:nowrap}.multi-filter-list .multi-filter-list-action{display:flex;justify-content:space-between;align-items:center}.multi-filter-list .and-or-button{margin:0 0 0 10px;min-width:58px;cursor:pointer}.multi-filter-list .trash-button{margin:0 0 -2px 6px;cursor:pointer;width:22px;height:100%;font-size:16px}.multi-filter-list .trash-button .trash-img{width:1em}.add-filter-divider{display:block;margin:0 -10px 10px -10px;border-bottom:1px solid #d9d9d9;height:10px}.select-input{display:flex;justify-content:space-between;align-items:center}";
28
28
  const RevogrFilterPanelStyle0 = filterStyleCss;
29
29
 
30
30
  const defaultType = 'none';
@@ -39,10 +39,11 @@ const FilterPanel = /*@__PURE__*/ proxyCustomElement(class FilterPanel extends H
39
39
  this.resetChange = createEvent(this, "resetChange", 7);
40
40
  this.filterCaptionsInternal = {
41
41
  title: 'Filter by',
42
+ ok: 'Ok',
42
43
  save: 'Save',
43
44
  // drops the filter
44
- reset: 'Clear changes',
45
- cancel: 'Close',
45
+ reset: 'Reset',
46
+ cancel: 'Cancel',
46
47
  add: 'Add more condition...',
47
48
  placeholder: 'Enter value...',
48
49
  and: 'and',
@@ -148,8 +149,9 @@ const FilterPanel = /*@__PURE__*/ proxyCustomElement(class FilterPanel extends H
148
149
  input.focus();
149
150
  }
150
151
  }, 0);
151
- if (!this.disableDynamicFiltering)
152
+ if (!this.disableDynamicFiltering) {
152
153
  this.debouncedApplyFilter();
154
+ }
153
155
  }
154
156
  onAddNewFilter(e) {
155
157
  const el = e.target;
@@ -161,8 +163,9 @@ const FilterPanel = /*@__PURE__*/ proxyCustomElement(class FilterPanel extends H
161
163
  select.value = defaultType;
162
164
  this.currentFilterType = defaultType;
163
165
  }
164
- if (!this.disableDynamicFiltering)
166
+ if (!this.disableDynamicFiltering) {
165
167
  this.debouncedApplyFilter();
168
+ }
166
169
  }
167
170
  addNewFilterToProp() {
168
171
  var _a;
@@ -192,8 +195,9 @@ const FilterPanel = /*@__PURE__*/ proxyCustomElement(class FilterPanel extends H
192
195
  onUserInput(index, prop, event) {
193
196
  // update the value of the filter item
194
197
  this.filterItems[prop][index].value = event.target.value;
195
- if (!this.disableDynamicFiltering)
198
+ if (!this.disableDynamicFiltering) {
196
199
  this.debouncedApplyFilter();
200
+ }
197
201
  }
198
202
  onKeyDown(e) {
199
203
  if (e.key.toLowerCase() === 'enter') {
@@ -238,8 +242,9 @@ const FilterPanel = /*@__PURE__*/ proxyCustomElement(class FilterPanel extends H
238
242
  // let's remove the prop if no more filters so the filter icon will be removed
239
243
  if (items.length === 0)
240
244
  delete this.filterItems[prop !== null && prop !== void 0 ? prop : ''];
241
- if (!this.disableDynamicFiltering)
245
+ if (!this.disableDynamicFiltering) {
242
246
  this.debouncedApplyFilter();
247
+ }
243
248
  }
244
249
  toggleFilterAndOr(id) {
245
250
  var _a;
@@ -254,8 +259,9 @@ const FilterPanel = /*@__PURE__*/ proxyCustomElement(class FilterPanel extends H
254
259
  if (index === -1)
255
260
  return;
256
261
  items[index].relation = items[index].relation === 'and' ? 'or' : 'and';
257
- if (!this.disableDynamicFiltering)
262
+ if (!this.disableDynamicFiltering) {
258
263
  this.debouncedApplyFilter();
264
+ }
259
265
  }
260
266
  assertChanges() {
261
267
  if (!this.changes) {
@@ -302,7 +308,13 @@ const FilterPanel = /*@__PURE__*/ proxyCustomElement(class FilterPanel extends H
302
308
  return (h(Host, { style: style, ref: el => {
303
309
  var _a;
304
310
  ((_a = this.changes) === null || _a === void 0 ? void 0 : _a.autoCorrect) && this.autoCorrect(el);
305
- } }, h("slot", { slot: "header" }), h("label", null, capts.title), h("div", { class: "filter-holder" }, this.getFilterItemsList()), h("div", { class: "add-filter" }, h("select", { id: FILTER_ID, class: "select-css", onChange: e => this.onAddNewFilter(e) }, this.renderSelectOptions(this.currentFilterType))), h("slot", null), h("div", { class: "filter-actions" }, this.disableDynamicFiltering && (h("button", { id: "revo-button-save", "aria-label": "save", class: "revo-button green", onClick: () => this.onSave() }, capts.save)), h("button", { id: "revo-button-reset", "aria-label": "reset", class: "revo-button light", onClick: () => this.onReset() }, capts.reset), h("button", { id: "revo-button-cancel", "aria-label": "cancel", class: "revo-button light", onClick: () => this.onCancel() }, capts.cancel)), h("slot", { slot: "footer" })));
311
+ } }, h("slot", { slot: "header" }), h("label", null, capts.title), h("div", { class: "filter-holder" }, this.getFilterItemsList()), h("div", { class: "add-filter" }, h("select", { id: FILTER_ID, class: "select-css", onChange: e => this.onAddNewFilter(e) }, this.renderSelectOptions(this.currentFilterType))), h("slot", null), h("div", { class: "filter-actions" }, this.disableDynamicFiltering && [
312
+ h("button", { id: "revo-button-save", "aria-label": "save", class: "revo-button green", onClick: () => this.onSave() }, capts.save),
313
+ h("button", { id: "revo-button-ok", "aria-label": "ok", class: "revo-button green", onClick: () => this.onCancel() }, capts.cancel),
314
+ ], !this.disableDynamicFiltering && [
315
+ h("button", { id: "revo-button-ok", "aria-label": "ok", class: "revo-button green", onClick: () => this.onCancel() }, capts.ok),
316
+ h("button", { id: "revo-button-reset", "aria-label": "reset", class: "revo-button light", onClick: () => this.onReset() }, capts.reset),
317
+ ]), h("slot", { slot: "footer" })));
306
318
  }
307
319
  get element() { return this; }
308
320
  static get style() { return RevogrFilterPanelStyle0; }
@@ -1 +1 @@
1
- {"file":"revogr-filter-panel.js","mappings":";;;;;;;AAAA,CAAC,SAAS,OAAO;IACf,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE;QAC9B,OAAO,CAAC,SAAS,CAAC,OAAO;YACrB,OAAO,CAAC,SAA+E,CAAC,iBAAiB,IAAI,OAAO,CAAC,SAAS,CAAC,qBAAqB,CAAC;KAC1J;IAED,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE;QAC9B,OAAO,CAAC,SAAS,CAAC,OAAO,GAAG,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/utils/closest.polifill.ts","src/plugins/filter/filter.style.scss?tag=revogr-filter-panel","src/plugins/filter/filter.panel.tsx"],"sourcesContent":["(function closest() {\n if (!Element.prototype.matches) {\n Element.prototype.matches =\n ((Element.prototype as unknown) as { msMatchesSelector: (selectors: string) => boolean }).msMatchesSelector || Element.prototype.webkitMatchesSelector;\n }\n\n if (!Element.prototype.closest) {\n Element.prototype.closest = function (s: string) {\n let el: HTMLElement | Element | (Node & ParentNode) | null = this;\n\n do {\n if (Element.prototype.matches.call(el, s)) {\n return el;\n }\n el = el.parentElement || el.parentNode;\n } while (el !== null && el.nodeType === 1);\n return null;\n };\n }\n})();\n","revogr-filter-panel {\n position: absolute;\n display: block;\n top: 0;\n left: 0;\n z-index: 100;\n\n opacity: 1;\n transform: none;\n background-color: #fff;\n transform-origin: 62px 0px;\n box-shadow: 0 5px 18px -2px rgba(black, 20%);\n padding: 10px;\n border-radius: 4px;\n\n min-width: 220px;\n text-align: left;\n\n .filter-holder > div {\n display: flex;\n flex-direction: column;\n }\n\n label {\n font-size: 13px;\n display: block;\n padding: 8px 0;\n }\n\n select {\n width: 100%;\n }\n\n input[type='text'] {\n border: 0;\n min-height: 34px;\n margin: 5px 0;\n background: #f3f3f3;\n border-radius: 5px;\n padding: 0 10px;\n box-sizing: border-box;\n width: 100%;\n }\n\n button {\n margin-top: 10px;\n margin-right: 5px;\n }\n\n .filter-actions {\n text-align: right;\n margin-right: -5px;\n }\n}\n\n.rgHeaderCell {\n &:hover .rv-filter {\n transition:\n opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n }\n &:hover .rv-filter,\n .rv-filter.active {\n opacity: 1;\n }\n\n .rv-filter {\n $btn-size: 24px;\n height: $btn-size;\n width: $btn-size;\n background: none;\n border: 0;\n opacity: 0;\n visibility: visible;\n cursor: pointer;\n border-radius: 4px;\n\n &.active {\n color: #10224a;\n }\n\n .filter-img {\n $img-size: 11px;\n color: gray;\n width: $img-size;\n }\n }\n}\n\n.select-css {\n $gradient: 'data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E';\n $linearGradient: linear-gradient(to bottom, #ffffff 0%, #ffffff 100%);\n $borderColor: #f1f1f1;\n\n display: block;\n font-family: sans-serif;\n font-weight: 600;\n color: #444;\n line-height: 1.3;\n padding: 0.6em 1.4em 0.5em 0.8em;\n width: 100%;\n max-width: 100%; /* useful when width is set to anything other than 100% */\n box-sizing: border-box;\n margin: 0;\n border: 1px solid $borderColor;\n box-shadow: transparent;\n border-radius: 0.5em;\n appearance: none;\n background-color: #fff;\n background-image: url($gradient), $linearGradient;\n background-repeat: no-repeat, repeat;\n /* arrow icon position (1em from the right, 50% vertical) , then gradient position*/\n background-position:\n right 0.7em top 50%,\n 0 0;\n /* icon size, then gradient */\n background-size:\n 0.65em auto,\n 100%;\n\n /* Hide arrow icon in IE browsers */\n &::-ms-expand {\n display: none;\n }\n /* Hover style */\n &:hover {\n border-color: rgb(197, 197, 197);\n }\n /* Focus style */\n &:focus {\n border-color: $borderColor;\n box-shadow: 0 0 1px 3px rgba(59, 153, 252, 0.7);\n box-shadow: 0 0 0 3px -moz-mac-focusring;\n color: #222;\n outline: none;\n }\n\n /* Set options to normal weight */\n option {\n font-weight: normal;\n }\n\n /* Disabled styles */\n &:disabled,\n &[aria-disabled='true'] {\n color: gray;\n background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22graytext%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E'),\n linear-gradient(to bottom, #ffffff 0%, #ffffff 100%);\n }\n\n &:disabled:hover,\n &[aria-disabled='true'] {\n border-color: $borderColor;\n }\n}\n\n.multi-filter-list {\n margin-top: 5px;\n margin-bottom: 5px;\n\n div {\n white-space: nowrap;\n }\n\n .multi-filter-list-action {\n display: flex;\n\n justify-content: space-between;\n align-items: center;\n }\n\n .and-or-button {\n margin: 0 0 0 10px;\n min-width: 58px;\n cursor: pointer;\n }\n .trash-button {\n $btn-remove-size: 22px;\n margin: 0 0 -2px 6px;\n cursor: pointer;\n\n width: $btn-remove-size;\n height: 100%;\n font-size: 16px;\n\n .trash-img {\n width: 1em;\n }\n }\n}\n\n.add-filter-divider {\n display: block;\n margin: 0 -10px 10px -10px;\n\n border-bottom: 1px solid #d9d9d9;\n height: 10px;\n}\n\n.select-input {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n","import {\n h,\n Component,\n Event,\n EventEmitter,\n Host,\n Listen,\n Method,\n Prop,\n State,\n VNode,\n Element,\n} from '@stencil/core';\nimport debounce from 'lodash/debounce';\n\nimport { AndOrButton, isFilterBtn, TrashButton } from './filter.button';\nimport '../../utils/closest.polifill';\nimport { FilterCaptions, LogicFunction, MultiFilterItem, ShowData } from './filter.types';\nimport { ColumnProp } from '@type';\nimport { FilterType } from './filter.indexed';\n\n\nconst defaultType: FilterType = 'none';\n\nconst FILTER_LIST_CLASS = 'multi-filter-list';\nconst FILTER_LIST_CLASS_ACTION = 'multi-filter-list-action';\nconst FILTER_ID = 'add-filter';\n\n/**\n * Filter panel for editing filters\n */\n/**\n * @internal\n */\n@Component({\n tag: 'revogr-filter-panel',\n styleUrl: 'filter.style.scss',\n})\nexport class FilterPanel {\n private filterCaptionsInternal: FilterCaptions = {\n title: 'Filter by',\n save: 'Save',\n // drops the filter\n reset: 'Clear changes',\n cancel: 'Close',\n add: 'Add more condition...',\n placeholder: 'Enter value...',\n and: 'and',\n or: 'or',\n };\n\n @Element() element!: HTMLElement;\n @State() isFilterIdSet = false;\n @State() filterId = 0;\n @State() currentFilterId = -1;\n @State() currentFilterType: FilterType = defaultType;\n @State() changes: ShowData | undefined;\n @Prop() filterItems: MultiFilterItem = {};\n @Prop() filterNames: Record<string, string> = {};\n @Prop() filterEntities: Record<string, LogicFunction> = {};\n @Prop() filterCaptions: FilterCaptions | undefined;\n @Prop() disableDynamicFiltering = false;\n\n @Event() filterChange: EventEmitter<MultiFilterItem>;\n @Event() resetChange: EventEmitter<ColumnProp>;\n\n @Listen('mousedown', { target: 'document' }) onMouseDown(e: MouseEvent) {\n // click on anything then select drops values to default\n if (!this.changes || e.defaultPrevented) {\n return;\n }\n const path = e.composedPath();\n const select = document.getElementById(FILTER_ID);\n if (select instanceof HTMLSelectElement) {\n // click on select should be skipped\n if (path.includes(select)) {\n return;\n }\n select.value = defaultType;\n }\n this.currentFilterType = defaultType;\n if (this.changes) {\n this.changes.type = defaultType;\n }\n this.currentFilterId = -1;\n\n const isOutside = !path.includes(this.element);\n\n if (\n e.target instanceof HTMLElement &&\n isOutside &&\n !isFilterBtn(e.target)\n ) {\n this.changes = undefined;\n }\n }\n\n @Method() async show(newEntity?: ShowData) {\n this.changes = newEntity;\n if (this.changes) {\n this.changes.type = this.changes.type || defaultType;\n }\n }\n\n @Method() async getChanges() {\n return this.changes;\n }\n\n componentWillRender() {\n if (!this.isFilterIdSet) {\n this.isFilterIdSet = true;\n const filterItems = Object.keys(this.filterItems);\n for (const prop of filterItems) {\n // we set the proper filterId so there won't be any conflict when removing filters\n this.filterId += this.filterItems[prop].length;\n }\n }\n }\n\n getFilterItemsList() {\n const prop = this.changes?.prop;\n if (!(prop || prop === 0)) return '';\n\n const propFilters = this.filterItems[prop] || [];\n const capts = Object.assign(\n this.filterCaptionsInternal,\n this.filterCaptions,\n );\n return (\n <div key={this.filterId}>\n {propFilters.map((d, index) => {\n let andOrButton;\n\n // hide toggle button if there is only one filter and the last one\n if (index !== this.filterItems[prop].length - 1) {\n andOrButton = (\n <div onClick={() => this.toggleFilterAndOr(d.id)}>\n <AndOrButton\n text={d.relation === 'and' ? capts.and : capts.or}\n />\n </div>\n );\n }\n\n return (\n <div key={d.id} class={FILTER_LIST_CLASS}>\n <div class={{ 'select-input': true }}>\n <select\n class=\"select-css select-filter\"\n onChange={e => this.onFilterTypeChange(e, prop, index)}\n >\n {this.renderSelectOptions(\n this.filterItems[prop][index].type,\n true,\n )}\n </select>\n <div class={FILTER_LIST_CLASS_ACTION}>{andOrButton}</div>\n <div onClick={() => this.onRemoveFilter(d.id)}>\n <TrashButton />\n </div>\n </div>\n <div>{this.renderExtra(prop, index)}</div>\n </div>\n );\n })}\n\n {propFilters.length > 0 ? <div class=\"add-filter-divider\" /> : ''}\n </div>\n );\n }\n\n private autoCorrect(el?: HTMLElement | null) {\n if (!el) {\n return;\n }\n const pos = el.getBoundingClientRect();\n const maxLeft = window.innerWidth - pos.width;\n\n if (pos.left > maxLeft && el.offsetLeft) {\n el.style.left = `${maxLeft - (el.parentElement?.getBoundingClientRect().left ?? 0)}px`;\n }\n }\n\n private onFilterTypeChange(e: Event, prop: ColumnProp, index: number) {\n if (!(e.target instanceof HTMLSelectElement)) {\n return;\n }\n this.filterItems[prop][index].type = e.target.value as FilterType;\n\n // this re-renders the input to know if we need extra input\n this.filterId++;\n\n // adding setTimeout will wait for the next tick DOM update then focus on input\n setTimeout(() => {\n const input = document.getElementById(\n 'filter-input-' + this.filterItems[prop][index].id,\n );\n if (input instanceof HTMLInputElement) {\n input.focus();\n }\n }, 0);\n\n if (!this.disableDynamicFiltering) this.debouncedApplyFilter();\n }\n\n private debouncedApplyFilter = debounce(() => {\n this.filterChange.emit(this.filterItems);\n }, 400);\n\n private onAddNewFilter(e: Event) {\n const el = e.target as HTMLSelectElement;\n this.currentFilterType = el.value as FilterType;\n this.addNewFilterToProp();\n\n // reset value after adding new filter\n const select = document.getElementById('add-filter') as HTMLSelectElement;\n if (select) {\n select.value = defaultType;\n this.currentFilterType = defaultType;\n }\n\n if (!this.disableDynamicFiltering) this.debouncedApplyFilter();\n }\n\n private addNewFilterToProp() {\n const prop = this.changes?.prop;\n if (!(prop || prop === 0)) return;\n\n if (!this.filterItems[prop]) {\n this.filterItems[prop] = [];\n }\n\n if (this.currentFilterType === 'none') return;\n\n this.filterId++;\n this.currentFilterId = this.filterId;\n\n this.filterItems[prop].push({\n id: this.currentFilterId,\n type: this.currentFilterType,\n value: '',\n relation: 'and',\n });\n\n // adding setTimeout will wait for the next tick DOM update then focus on input\n setTimeout(() => {\n const input = document.getElementById(\n 'filter-input-' + this.currentFilterId,\n ) as HTMLInputElement;\n if (input) input.focus();\n }, 0);\n }\n\n private onUserInput(index: number, prop: ColumnProp, event: Event) {\n // update the value of the filter item\n this.filterItems[prop][index].value = (\n event.target as HTMLInputElement\n ).value;\n\n if (!this.disableDynamicFiltering) this.debouncedApplyFilter();\n }\n\n private onKeyDown(e: KeyboardEvent) {\n if (e.key.toLowerCase() === 'enter') {\n const select = document.getElementById('add-filter') as HTMLSelectElement;\n if (select) {\n select.value = defaultType;\n this.currentFilterType = defaultType;\n this.addNewFilterToProp();\n select.focus();\n }\n return;\n }\n // keep event local, don't escalate farther to dom\n e.stopPropagation();\n }\n\n private onSave() {\n this.filterChange.emit(this.filterItems);\n }\n\n private onCancel() {\n this.changes = undefined;\n }\n\n private onReset() {\n this.assertChanges();\n\n this.resetChange.emit(this.changes?.prop);\n\n // this updates the DOM which is used by getFilterItemsList() key\n this.filterId++;\n }\n\n private onRemoveFilter(id: number) {\n this.assertChanges();\n\n // this is for reactivity issues for getFilterItemsList()\n this.filterId++;\n\n const prop = this.changes?.prop;\n\n const items = this.filterItems[prop ?? ''];\n if (!items) return;\n\n const index = items.findIndex(d => d.id === id);\n if (index === -1) return;\n items.splice(index, 1);\n\n // let's remove the prop if no more filters so the filter icon will be removed\n if (items.length === 0) delete this.filterItems[prop ?? ''];\n\n if (!this.disableDynamicFiltering) this.debouncedApplyFilter();\n }\n\n private toggleFilterAndOr(id: number) {\n this.assertChanges();\n\n // this is for reactivity issues for getFilterItemsList()\n this.filterId++;\n\n const prop = this.changes?.prop;\n\n const items = this.filterItems[prop ?? ''];\n if (!items) return;\n\n const index = items.findIndex(d => d.id === id);\n if (index === -1) return;\n\n items[index].relation = items[index].relation === 'and' ? 'or' : 'and';\n if (!this.disableDynamicFiltering) this.debouncedApplyFilter();\n }\n\n private assertChanges() {\n if (!this.changes) {\n throw new Error('Changes required per edit');\n }\n }\n\n\n renderSelectOptions(type: FilterType, isDefaultTypeRemoved = false) {\n if (!this.changes) {\n return;\n }\n const options: VNode[] = [];\n const prop = this.changes.prop;\n\n if (!isDefaultTypeRemoved) {\n const capts = Object.assign(\n this.filterCaptionsInternal,\n this.filterCaptions,\n );\n\n options.push(\n <option\n selected={this.currentFilterType === defaultType}\n value={defaultType}\n >\n {prop && this.filterItems[prop] && this.filterItems[prop].length > 0\n ? capts.add\n : this.filterNames[defaultType]}\n </option>,\n );\n }\n\n for (let gIndex in this.changes.filterTypes) {\n options.push(\n ...this.changes.filterTypes[gIndex].map(k => (\n <option value={k} selected={type === k}>\n {this.filterNames[k]}\n </option>\n )),\n );\n options.push(<option disabled></option>);\n }\n return options;\n }\n\n renderExtra(prop: ColumnProp, index: number) {\n const currentFilter = this.filterItems[prop];\n\n if (!currentFilter) return '';\n\n if (this.filterEntities[currentFilter[index].type].extra !== 'input')\n return '';\n\n const capts = Object.assign(\n this.filterCaptionsInternal,\n this.filterCaptions,\n );\n\n return (\n <input\n id={`filter-input-${currentFilter[index].id}`}\n placeholder={capts.placeholder}\n type=\"text\"\n value={currentFilter[index].value}\n onInput={this.onUserInput.bind(this, index, prop)}\n onKeyDown={e => this.onKeyDown(e)}\n />\n );\n }\n\n render() {\n if (!this.changes) {\n return <Host style={{ display: 'none' }}></Host>;\n }\n const style = {\n display: 'block',\n left: `${this.changes.x}px`,\n top: `${this.changes.y}px`,\n };\n\n const capts = Object.assign(\n this.filterCaptionsInternal,\n this.filterCaptions,\n );\n\n return (\n <Host\n style={style}\n ref={el => {\n this.changes?.autoCorrect && this.autoCorrect(el);\n }}\n >\n <slot slot=\"header\" />\n <label>{capts.title}</label>\n <div class=\"filter-holder\">{this.getFilterItemsList()}</div>\n\n <div class=\"add-filter\">\n <select\n id={FILTER_ID}\n class=\"select-css\"\n onChange={e => this.onAddNewFilter(e)}\n >\n {this.renderSelectOptions(this.currentFilterType)}\n </select>\n </div>\n <slot />\n <div class=\"filter-actions\">\n {this.disableDynamicFiltering && (\n <button\n id=\"revo-button-save\"\n aria-label=\"save\"\n class=\"revo-button green\"\n onClick={() => this.onSave()}\n >\n {capts.save}\n </button>\n )}\n <button\n id=\"revo-button-reset\"\n aria-label=\"reset\"\n class=\"revo-button light\"\n onClick={() => this.onReset()}\n >\n {capts.reset}\n </button>\n <button\n id=\"revo-button-cancel\"\n aria-label=\"cancel\"\n class=\"revo-button light\"\n onClick={() => this.onCancel()}\n >\n {capts.cancel}\n </button>\n </div>\n <slot slot=\"footer\" />\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"revogr-filter-panel.js","mappings":";;;;;;;AAAA,CAAC,SAAS,OAAO;IACf,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE;QAC9B,OAAO,CAA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AAmB,EACzB,OAAO,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,IAE7B,KAAK,CAAC,MAAM,CACN;SACV,EACA,CAAC,IAAI,CAAC,uBAAuB,IAAI;YAChC,cACE,EAAE,EAAC,gBAAgB,gBACR,IAAI,EACf,KAAK,EAAC,mBAAmB,EACzB,OAAO,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,IAE7B,KAAK,CAAC,EAAE,CACF;YAET,cACE,EAAE,EAAC,mBAAmB,gBACX,OAAO,EAClB,KAAK,EAAC,mBAAmB,EACzB,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,IAE5B,KAAK,CAAC,KAAK,CACL;SACV,CACG,EACN,YAAM,IAAI,EAAC,QAAQ,GAAG,CACjB,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/utils/closest.polifill.ts","src/plugins/filter/filter.style.scss?tag=revogr-filter-panel","src/plugins/filter/filter.panel.tsx"],"sourcesContent":["(function closest() {\n if (!Element.prototype.matches) {\n Element.prototype.matches =\n ((Element.prototype as unknown) as { msMatchesSelector: (selectors: string) => boolean }).msMatchesSelector || Element.prototype.webkitMatchesSelector;\n }\n\n if (!Element.prototype.closest) {\n Element.prototype.closest = function (s: string) {\n let el: HTMLElement | Element | (Node & ParentNode) | null = this;\n\n do {\n if (Element.prototype.matches.call(el, s)) {\n return el;\n }\n el = el.parentElement || el.parentNode;\n } while (el !== null && el.nodeType === 1);\n return null;\n };\n }\n})();\n","revogr-filter-panel {\n position: absolute;\n display: block;\n top: 0;\n left: 0;\n z-index: 100;\n max-height: calc(100% - 80px);\n min-width: 250px;\n overflow: auto;\n\n opacity: 1;\n transform: none;\n background-color: #fff;\n transform-origin: 62px 0px;\n box-shadow: 0 5px 18px -2px rgba(black, 20%);\n padding: 10px;\n border-radius: 4px;\n\n min-width: 220px;\n text-align: left;\n\n .filter-holder > div {\n display: flex;\n flex-direction: column;\n }\n\n label {\n font-size: 13px;\n display: block;\n padding: 8px 0;\n }\n\n select {\n width: 100%;\n }\n\n input[type='text'] {\n border: 0;\n min-height: 34px;\n margin: 5px 0;\n background: #f3f3f3;\n border-radius: 5px;\n padding: 0 10px;\n box-sizing: border-box;\n width: 100%;\n }\n\n button {\n margin-top: 10px;\n margin-right: 5px;\n }\n\n .filter-actions {\n text-align: right;\n margin-right: -5px;\n }\n}\n\n.rgHeaderCell {\n &:hover .rv-filter {\n transition:\n opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n }\n &:hover .rv-filter,\n .rv-filter.active {\n opacity: 1;\n }\n\n .rv-filter {\n $btn-size: 24px;\n height: $btn-size;\n width: $btn-size;\n background: none;\n border: 0;\n opacity: 0;\n visibility: visible;\n cursor: pointer;\n border-radius: 4px;\n\n &.active {\n color: #10224a;\n }\n\n .filter-img {\n $img-size: 11px;\n color: gray;\n width: $img-size;\n }\n }\n}\n\n.select-css {\n $gradient: 'data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E';\n $linearGradient: linear-gradient(to bottom, #ffffff 0%, #ffffff 100%);\n $borderColor: #f1f1f1;\n\n display: block;\n font-family: sans-serif;\n font-weight: 600;\n color: #444;\n line-height: 1.3;\n padding: 0.6em 1.4em 0.5em 0.8em;\n width: 100%;\n max-width: 100%; /* useful when width is set to anything other than 100% */\n box-sizing: border-box;\n margin: 0;\n border: 1px solid $borderColor;\n box-shadow: transparent;\n border-radius: 0.5em;\n appearance: none;\n background-color: #fff;\n background-image: url($gradient), $linearGradient;\n background-repeat: no-repeat, repeat;\n /* arrow icon position (1em from the right, 50% vertical) , then gradient position*/\n background-position:\n right 0.7em top 50%,\n 0 0;\n /* icon size, then gradient */\n background-size:\n 0.65em auto,\n 100%;\n\n /* Hide arrow icon in IE browsers */\n &::-ms-expand {\n display: none;\n }\n /* Hover style */\n &:hover {\n border-color: rgb(197, 197, 197);\n }\n /* Focus style */\n &:focus {\n border-color: $borderColor;\n box-shadow: 0 0 1px 3px rgba(59, 153, 252, 0.7);\n box-shadow: 0 0 0 3px -moz-mac-focusring;\n color: #222;\n outline: none;\n }\n\n /* Set options to normal weight */\n option {\n font-weight: normal;\n }\n\n /* Disabled styles */\n &:disabled,\n &[aria-disabled='true'] {\n color: gray;\n background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22graytext%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E'),\n linear-gradient(to bottom, #ffffff 0%, #ffffff 100%);\n }\n\n &:disabled:hover,\n &[aria-disabled='true'] {\n border-color: $borderColor;\n }\n}\n\n.multi-filter-list {\n margin-top: 5px;\n margin-bottom: 5px;\n\n div {\n white-space: nowrap;\n }\n\n .multi-filter-list-action {\n display: flex;\n\n justify-content: space-between;\n align-items: center;\n }\n\n .and-or-button {\n margin: 0 0 0 10px;\n min-width: 58px;\n cursor: pointer;\n }\n .trash-button {\n $btn-remove-size: 22px;\n margin: 0 0 -2px 6px;\n cursor: pointer;\n\n width: $btn-remove-size;\n height: 100%;\n font-size: 16px;\n\n .trash-img {\n width: 1em;\n }\n }\n}\n\n.add-filter-divider {\n display: block;\n margin: 0 -10px 10px -10px;\n\n border-bottom: 1px solid #d9d9d9;\n height: 10px;\n}\n\n.select-input {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n","import {\n h,\n Component,\n Event,\n EventEmitter,\n Host,\n Listen,\n Method,\n Prop,\n State,\n VNode,\n Element,\n} from '@stencil/core';\nimport debounce from 'lodash/debounce';\n\nimport { AndOrButton, isFilterBtn, TrashButton } from './filter.button';\nimport '../../utils/closest.polifill';\nimport {\n FilterCaptions,\n LogicFunction,\n MultiFilterItem,\n ShowData,\n} from './filter.types';\nimport { ColumnProp } from '@type';\nimport { FilterType } from './filter.indexed';\n\nconst defaultType: FilterType = 'none';\n\nconst FILTER_LIST_CLASS = 'multi-filter-list';\nconst FILTER_LIST_CLASS_ACTION = 'multi-filter-list-action';\nconst FILTER_ID = 'add-filter';\n\n/**\n * Filter panel for editing filters\n */\n/**\n * @internal\n */\n@Component({\n tag: 'revogr-filter-panel',\n styleUrl: 'filter.style.scss',\n})\nexport class FilterPanel {\n private filterCaptionsInternal: FilterCaptions = {\n title: 'Filter by',\n ok: 'Ok',\n save: 'Save',\n // drops the filter\n reset: 'Reset',\n cancel: 'Cancel',\n add: 'Add more condition...',\n placeholder: 'Enter value...',\n and: 'and',\n or: 'or',\n };\n\n @Element() element!: HTMLElement;\n @State() isFilterIdSet = false;\n @State() filterId = 0;\n @State() currentFilterId = -1;\n @State() currentFilterType: FilterType = defaultType;\n @State() changes: ShowData | undefined;\n @Prop() filterItems: MultiFilterItem = {};\n @Prop() filterNames: Record<string, string> = {};\n @Prop() filterEntities: Record<string, LogicFunction> = {};\n @Prop() filterCaptions: FilterCaptions | undefined;\n /**\n * Disables dynamic filtering. A way to apply filters on Save only\n */\n @Prop() disableDynamicFiltering = false;\n\n @Event() filterChange: EventEmitter<MultiFilterItem>;\n @Event() resetChange: EventEmitter<ColumnProp>;\n\n @Listen('mousedown', { target: 'document' }) onMouseDown(e: MouseEvent) {\n // click on anything then select drops values to default\n if (!this.changes || e.defaultPrevented) {\n return;\n }\n const path = e.composedPath();\n const select = document.getElementById(FILTER_ID);\n if (select instanceof HTMLSelectElement) {\n // click on select should be skipped\n if (path.includes(select)) {\n return;\n }\n select.value = defaultType;\n }\n this.currentFilterType = defaultType;\n if (this.changes) {\n this.changes.type = defaultType;\n }\n this.currentFilterId = -1;\n\n const isOutside = !path.includes(this.element);\n\n if (\n e.target instanceof HTMLElement &&\n isOutside &&\n !isFilterBtn(e.target)\n ) {\n this.changes = undefined;\n }\n }\n\n @Method() async show(newEntity?: ShowData) {\n this.changes = newEntity;\n if (this.changes) {\n this.changes.type = this.changes.type || defaultType;\n }\n }\n\n @Method() async getChanges() {\n return this.changes;\n }\n\n componentWillRender() {\n if (!this.isFilterIdSet) {\n this.isFilterIdSet = true;\n const filterItems = Object.keys(this.filterItems);\n for (const prop of filterItems) {\n // we set the proper filterId so there won't be any conflict when removing filters\n this.filterId += this.filterItems[prop].length;\n }\n }\n }\n\n getFilterItemsList() {\n const prop = this.changes?.prop;\n if (!(prop || prop === 0)) return '';\n\n const propFilters = this.filterItems[prop] || [];\n const capts = Object.assign(\n this.filterCaptionsInternal,\n this.filterCaptions,\n );\n return (\n <div key={this.filterId}>\n {propFilters.map((d, index) => {\n let andOrButton;\n\n // hide toggle button if there is only one filter and the last one\n if (index !== this.filterItems[prop].length - 1) {\n andOrButton = (\n <div onClick={() => this.toggleFilterAndOr(d.id)}>\n <AndOrButton\n text={d.relation === 'and' ? capts.and : capts.or}\n />\n </div>\n );\n }\n\n return (\n <div key={d.id} class={FILTER_LIST_CLASS}>\n <div class={{ 'select-input': true }}>\n <select\n class=\"select-css select-filter\"\n onChange={e => this.onFilterTypeChange(e, prop, index)}\n >\n {this.renderSelectOptions(\n this.filterItems[prop][index].type,\n true,\n )}\n </select>\n <div class={FILTER_LIST_CLASS_ACTION}>{andOrButton}</div>\n <div onClick={() => this.onRemoveFilter(d.id)}>\n <TrashButton />\n </div>\n </div>\n <div>{this.renderExtra(prop, index)}</div>\n </div>\n );\n })}\n\n {propFilters.length > 0 ? <div class=\"add-filter-divider\" /> : ''}\n </div>\n );\n }\n\n private autoCorrect(el?: HTMLElement | null) {\n if (!el) {\n return;\n }\n const pos = el.getBoundingClientRect();\n const maxLeft = window.innerWidth - pos.width;\n\n if (pos.left > maxLeft && el.offsetLeft) {\n el.style.left = `${maxLeft - (el.parentElement?.getBoundingClientRect().left ?? 0)}px`;\n }\n }\n\n private onFilterTypeChange(e: Event, prop: ColumnProp, index: number) {\n if (!(e.target instanceof HTMLSelectElement)) {\n return;\n }\n this.filterItems[prop][index].type = e.target.value as FilterType;\n\n // this re-renders the input to know if we need extra input\n this.filterId++;\n\n // adding setTimeout will wait for the next tick DOM update then focus on input\n setTimeout(() => {\n const input = document.getElementById(\n 'filter-input-' + this.filterItems[prop][index].id,\n );\n if (input instanceof HTMLInputElement) {\n input.focus();\n }\n }, 0);\n\n if (!this.disableDynamicFiltering) {\n this.debouncedApplyFilter();\n }\n }\n\n private debouncedApplyFilter = debounce(() => {\n this.filterChange.emit(this.filterItems);\n }, 400);\n\n private onAddNewFilter(e: Event) {\n const el = e.target as HTMLSelectElement;\n this.currentFilterType = el.value as FilterType;\n this.addNewFilterToProp();\n\n // reset value after adding new filter\n const select = document.getElementById('add-filter') as HTMLSelectElement;\n if (select) {\n select.value = defaultType;\n this.currentFilterType = defaultType;\n }\n\n if (!this.disableDynamicFiltering) {\n this.debouncedApplyFilter();\n }\n }\n\n private addNewFilterToProp() {\n const prop = this.changes?.prop;\n if (!(prop || prop === 0)) return;\n\n if (!this.filterItems[prop]) {\n this.filterItems[prop] = [];\n }\n\n if (this.currentFilterType === 'none') return;\n\n this.filterId++;\n this.currentFilterId = this.filterId;\n\n this.filterItems[prop].push({\n id: this.currentFilterId,\n type: this.currentFilterType,\n value: '',\n relation: 'and',\n });\n\n // adding setTimeout will wait for the next tick DOM update then focus on input\n setTimeout(() => {\n const input = document.getElementById(\n 'filter-input-' + this.currentFilterId,\n ) as HTMLInputElement;\n if (input) input.focus();\n }, 0);\n }\n\n private onUserInput(index: number, prop: ColumnProp, event: Event) {\n // update the value of the filter item\n this.filterItems[prop][index].value = (\n event.target as HTMLInputElement\n ).value;\n\n if (!this.disableDynamicFiltering) {\n this.debouncedApplyFilter();\n }\n }\n\n private onKeyDown(e: KeyboardEvent) {\n if (e.key.toLowerCase() === 'enter') {\n const select = document.getElementById('add-filter') as HTMLSelectElement;\n if (select) {\n select.value = defaultType;\n this.currentFilterType = defaultType;\n this.addNewFilterToProp();\n select.focus();\n }\n return;\n }\n // keep event local, don't escalate farther to dom\n e.stopPropagation();\n }\n\n private onSave() {\n this.filterChange.emit(this.filterItems);\n }\n\n private onCancel() {\n this.changes = undefined;\n }\n\n private onReset() {\n this.assertChanges();\n\n this.resetChange.emit(this.changes?.prop);\n\n // this updates the DOM which is used by getFilterItemsList() key\n this.filterId++;\n }\n\n private onRemoveFilter(id: number) {\n this.assertChanges();\n\n // this is for reactivity issues for getFilterItemsList()\n this.filterId++;\n\n const prop = this.changes?.prop;\n\n const items = this.filterItems[prop ?? ''];\n if (!items) return;\n\n const index = items.findIndex(d => d.id === id);\n if (index === -1) return;\n items.splice(index, 1);\n\n // let's remove the prop if no more filters so the filter icon will be removed\n if (items.length === 0) delete this.filterItems[prop ?? ''];\n\n if (!this.disableDynamicFiltering) {\n this.debouncedApplyFilter();\n }\n }\n\n private toggleFilterAndOr(id: number) {\n this.assertChanges();\n\n // this is for reactivity issues for getFilterItemsList()\n this.filterId++;\n\n const prop = this.changes?.prop;\n\n const items = this.filterItems[prop ?? ''];\n if (!items) return;\n\n const index = items.findIndex(d => d.id === id);\n if (index === -1) return;\n\n items[index].relation = items[index].relation === 'and' ? 'or' : 'and';\n if (!this.disableDynamicFiltering) {\n this.debouncedApplyFilter();\n }\n }\n\n private assertChanges() {\n if (!this.changes) {\n throw new Error('Changes required per edit');\n }\n }\n\n renderSelectOptions(type: FilterType, isDefaultTypeRemoved = false) {\n if (!this.changes) {\n return;\n }\n const options: VNode[] = [];\n const prop = this.changes.prop;\n\n if (!isDefaultTypeRemoved) {\n const capts = Object.assign(\n this.filterCaptionsInternal,\n this.filterCaptions,\n );\n\n options.push(\n <option\n selected={this.currentFilterType === defaultType}\n value={defaultType}\n >\n {prop && this.filterItems[prop] && this.filterItems[prop].length > 0\n ? capts.add\n : this.filterNames[defaultType]}\n </option>,\n );\n }\n\n for (let gIndex in this.changes.filterTypes) {\n options.push(\n ...this.changes.filterTypes[gIndex].map(k => (\n <option value={k} selected={type === k}>\n {this.filterNames[k]}\n </option>\n )),\n );\n options.push(<option disabled></option>);\n }\n return options;\n }\n\n renderExtra(prop: ColumnProp, index: number) {\n const currentFilter = this.filterItems[prop];\n\n if (!currentFilter) return '';\n\n if (this.filterEntities[currentFilter[index].type].extra !== 'input')\n return '';\n\n const capts = Object.assign(\n this.filterCaptionsInternal,\n this.filterCaptions,\n );\n\n return (\n <input\n id={`filter-input-${currentFilter[index].id}`}\n placeholder={capts.placeholder}\n type=\"text\"\n value={currentFilter[index].value}\n onInput={this.onUserInput.bind(this, index, prop)}\n onKeyDown={e => this.onKeyDown(e)}\n />\n );\n }\n\n render() {\n if (!this.changes) {\n return <Host style={{ display: 'none' }}></Host>;\n }\n const style = {\n display: 'block',\n left: `${this.changes.x}px`,\n top: `${this.changes.y}px`,\n };\n\n const capts = Object.assign(\n this.filterCaptionsInternal,\n this.filterCaptions,\n );\n\n return (\n <Host\n style={style}\n ref={el => {\n this.changes?.autoCorrect && this.autoCorrect(el);\n }}\n >\n <slot slot=\"header\" />\n <label>{capts.title}</label>\n <div class=\"filter-holder\">{this.getFilterItemsList()}</div>\n\n <div class=\"add-filter\">\n <select\n id={FILTER_ID}\n class=\"select-css\"\n onChange={e => this.onAddNewFilter(e)}\n >\n {this.renderSelectOptions(this.currentFilterType)}\n </select>\n </div>\n <slot />\n <div class=\"filter-actions\">\n {this.disableDynamicFiltering && [\n <button\n id=\"revo-button-save\"\n aria-label=\"save\"\n class=\"revo-button green\"\n onClick={() => this.onSave()}\n >\n {capts.save}\n </button>,\n <button\n id=\"revo-button-ok\"\n aria-label=\"ok\"\n class=\"revo-button green\"\n onClick={() => this.onCancel()}\n >\n {capts.cancel}\n </button>,\n ]}\n {!this.disableDynamicFiltering && [\n <button\n id=\"revo-button-ok\"\n aria-label=\"ok\"\n class=\"revo-button green\"\n onClick={() => this.onCancel()}\n >\n {capts.ok}\n </button>,\n\n <button\n id=\"revo-button-reset\"\n aria-label=\"reset\"\n class=\"revo-button light\"\n onClick={() => this.onReset()}\n >\n {capts.reset}\n </button>,\n ]}\n </div>\n <slot slot=\"footer\" />\n </Host>\n );\n }\n}\n"],"version":3}
@@ -3,10 +3,10 @@
3
3
  */
4
4
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
5
5
  import { F as FOCUS_CLASS } from './consts.js';
6
- import { a as getElStyle } from './selection.utils.js';
7
- import { b as getSourceItem } from './reduce.js';
6
+ import { a as getCell, s as styleByCellProps } from './selection.utils.js';
7
+ import { b as getSourceItem } from './data.store.js';
8
8
 
9
- const revogrFocusStyleCss = ".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.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:#009037;border:1px solid #00772d}.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:1px solid #cedefa;line-height:32px;background:none;color:#000;box-shadow:none}revogr-focus.focused-cell{box-shadow:-1px 0 0 #0d63e8 inset, 1px 0 0 #0d63e8 inset, 0 -1px 0 #0d63e8 inset, 0 1px 0 #0d63e8 inset;position:absolute;pointer-events:none;z-index:9;display:block !important}";
9
+ const revogrFocusStyleCss = ".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.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:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037;border:1px solid #00772d}.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:1px solid #cedefa;line-height:30px;background:none;color:#000;box-shadow:none}revogr-focus.focused-cell{box-shadow:-1px 0 0 #0d63e8 inset, 1px 0 0 #0d63e8 inset, 0 -1px 0 #0d63e8 inset, 0 1px 0 #0d63e8 inset;position:absolute;pointer-events:none;z-index:9;display:block !important}";
10
10
  const RevogrFocusStyle0 = revogrFocusStyleCss;
11
11
 
12
12
  const RevogrFocus = /*@__PURE__*/ proxyCustomElement(class RevogrFocus extends HTMLElement {
@@ -68,14 +68,21 @@ const RevogrFocus = /*@__PURE__*/ proxyCustomElement(class RevogrFocus extends H
68
68
  range: Object.assign(Object.assign({}, focusCell), { x1: focusCell.x, y1: focusCell.y }),
69
69
  rowType: this.rowType,
70
70
  colType: this.colType,
71
+ rowDimension: Object.assign({}, this.dimensionRow.state),
72
+ colDimension: Object.assign({}, this.dimensionCol.state),
71
73
  });
72
74
  if (event.defaultPrevented) {
73
75
  return h("slot", null);
74
76
  }
75
77
  const { detail } = event;
76
- const style = getElStyle(detail.range, this.dimensionRow.state, this.dimensionCol.state);
78
+ const cell = getCell(detail.range, event.detail.rowDimension, event.detail.colDimension);
79
+ const styles = styleByCellProps(cell);
77
80
  const extra = (_a = this.focusTemplate) === null || _a === void 0 ? void 0 : _a.call(this, h, detail);
78
- return (h(Host, { class: FOCUS_CLASS, style: style }, h("slot", null), extra));
81
+ const props = {
82
+ class: { [FOCUS_CLASS]: true },
83
+ style: styles,
84
+ };
85
+ return (h(Host, Object.assign({}, props), h("slot", null), extra));
79
86
  }
80
87
  get el() { return this; }
81
88
  static get style() { return RevogrFocusStyle0; }
@@ -1 +1 @@
1
- {"file":"revogr-focus2.js","mappings":";;;;;;;;AAAA,MAAM,mBAAmB,GAAG,+nMAA+nM,CAAC;AAC5pM,0BAAe,mBAAmB;;MCiCrB,WAAW;;;;;;;QAkDd,gBAAW,GAAgB,IAAI,CAAC;;;;;;;;6BArBU,IAAI;;IAwBtD,kBAAkB;;QAChB,MAAM,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACtD,IACE,CAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,CAAC,OAAK,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,CAAC,CAAA;YACvC,CAAA,MA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ACxC,KAAK,kCACA,SAAS,KACZ,EAAE,EAAE,SAAS,CAAC,CAAC,EACf,EAAE,EAAE,SAAS,CAAC,CAAC,GAChB;YACD,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC,CAAC;QACH,IAAI,KAAK,CAAC,gBAAgB,EAAE;YAC1B,OAAO,eAAQ,CAAC;SACjB;QACD,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;QACzB,MAAM,KAAK,GAAG,UAAU,CACtB,MAAM,CAAC,KAAK,EACZ,IAAI,CAAC,YAAY,CAAC,KAAK,EACvB,IAAI,CAAC,YAAY,CAAC,KAAK,CACxB,CAAC;QACF,MAAM,KAAK,GAAG,MAAA,IAAI,CAAC,aAAa,qDAAG,CAAC,EAAE,MAAM,CAAC,CAAC;QAC9C,QACE,EAAC,IAAI,IAAC,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,IACpC,eAAQ,EACP,KAAK,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/selectionFocus/revogr-focus-style.scss?tag=revogr-focus","src/components/selectionFocus/revogr-focus.tsx"],"sourcesContent":["revogr-focus.focused-cell {\n @include selection(1px);\n\n position: absolute;\n pointer-events: none;\n z-index: 9;\n display: block !important;\n}\n","import {\n Component,\n Prop,\n h,\n Host,\n Event,\n Element,\n EventEmitter,\n} from '@stencil/core';\nimport { FOCUS_CLASS } from '../../utils/consts';\nimport { getElStyle } from '../overlay/selection.utils';\nimport { DSourceState, getSourceItem } from '@store';\nimport {\n Cell,\n SelectionStoreState,\n ColumnRegular,\n DataType,\n DimensionSettingsState,\n FocusRenderEvent,\n FocusTemplateFunc,\n DimensionCols,\n DimensionRows,\n FocusAfterRenderEvent,\n} from '@type';\nimport { Observable } from '../../utils/store.utils';\n\n/**\n * Focus component. Shows focus layer around the cell that is currently in focus.\n * @slot focus-${view.type}-${data.type}. @example focus-rgCol-rgRow\n */\n@Component({\n tag: 'revogr-focus',\n styleUrl: 'revogr-focus-style.scss',\n})\nexport class RevogrFocus {\n /**\n * Column type\n */\n @Prop() colType!: DimensionCols;\n /**\n * Row type\n */\n @Prop() rowType!: DimensionRows;\n\n /** Dynamic stores */\n /** Selection, range, focus for selection */\n @Prop() selectionStore!: Observable<SelectionStoreState>;\n /** Dimension settings Y */\n @Prop() dimensionRow!: Observable<DimensionSettingsState>;\n /** Dimension settings X */\n @Prop() dimensionCol!: Observable<DimensionSettingsState>;\n /**\n * Data rows source\n */\n @Prop() dataStore!: Observable<DSourceState<DataType, DimensionRows>>;\n /**\n * Column source\n */\n @Prop() colData!: Observable<DSourceState<ColumnRegular, DimensionCols>>;\n\n /**\n * Focus template custom function. Can be used to render custom focus layer.\n */\n @Prop() focusTemplate: FocusTemplateFunc | null = null;\n\n /**\n * Before focus render event.\n * Can be prevented by event.preventDefault().\n * If preventDefault used slot will be rendered.\n */\n @Event({ eventName: 'beforefocusrender' })\n beforeFocusRender: EventEmitter<FocusRenderEvent>;\n /**\n * Before focus changed verify if it's in view and scroll viewport into this view\n * Can be prevented by event.preventDefault()\n */\n @Event({ eventName: 'beforescrollintoview' })\n beforeScrollIntoView: EventEmitter<{ el: HTMLElement }>;\n /**\n * Used to setup properties after focus was rendered\n */\n @Event({ eventName: 'afterfocus' }) afterFocus: EventEmitter<FocusAfterRenderEvent>;\n\n @Element() el: HTMLElement;\n private activeFocus: Cell | null = null;\n\n\n componentDidRender() {\n const currentFocus = this.selectionStore.get('focus');\n if (\n this.activeFocus?.x === currentFocus?.x &&\n this.activeFocus?.y === currentFocus?.y\n ) {\n return;\n }\n this.activeFocus = currentFocus;\n if (currentFocus && this.el) {\n const beforeScrollIn = this.beforeScrollIntoView.emit({ el: this.el });\n if (!beforeScrollIn.defaultPrevented) {\n this.el.scrollIntoView({\n block: 'nearest',\n inline: 'nearest',\n });\n }\n const model = getSourceItem(this.dataStore, currentFocus.y);\n const column = getSourceItem(this.colData, currentFocus.x);\n this.afterFocus.emit({\n model,\n column,\n rowType: this.rowType,\n colType: this.colType,\n rowIndex: currentFocus.y,\n colIndex: currentFocus.x,\n });\n }\n }\n\n render() {\n const editCell = this.selectionStore.get('edit');\n if (editCell) {\n return;\n }\n const focusCell = this.selectionStore.get('focus');\n if (!focusCell) {\n return;\n }\n const event = this.beforeFocusRender.emit({\n range: {\n ...focusCell,\n x1: focusCell.x,\n y1: focusCell.y,\n },\n rowType: this.rowType,\n colType: this.colType,\n });\n if (event.defaultPrevented) {\n return <slot />;\n }\n const { detail } = event;\n const style = getElStyle(\n detail.range,\n this.dimensionRow.state,\n this.dimensionCol.state,\n );\n const extra = this.focusTemplate?.(h, detail);\n return (\n <Host class={FOCUS_CLASS} style={style}>\n <slot />\n {extra}\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"revogr-focus2.js","mappings":";;;;;;;;AAAA,MAAM,mBAAmB,GAAG,+nMAA+nM,CAAC;AAC5pM,0BAAe,mBAAmB;;MCiCrB,WAAW;;;;;;;QAoDd,gBAAW,GAAgB,IAAI,CAAC;;;;;;;;6BAvBU,IAAI;;IAyBtD,kBAAkB;;QAChB,MAAM,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACtD,IACE,CAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,CAAC,OAAK,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,CAAC,CAAA;YACvC,CAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,CAAC,OAAK,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,CAAC,CAAA,EACvC;YACA,OAAO;SACR;QACD,IAAI,CAAC,WAAW,GAAG,YAAY,CAAC;QAChC,IAAI,YAAY,IAAI,IAAI,CAAC,EAAE,EAAE;YAC3B,MAAM,cAAc,GAAG,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAA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IAAI,KAAK,CAAC,gBAAgB,EAAE;YAC1B,OAAO,eAAQ,CAAC;SACjB;QACD,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;QAEzB,MAAM,IAAI,GAAG,OAAO,CAClB,MAAM,CAAC,KAAK,EACZ,KAAK,CAAC,MAAM,CAAC,YAAY,EACzB,KAAK,CAAC,MAAM,CAAC,YAAY,CAC1B,CAAC;QACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;QACtC,MAAM,KAAK,GAAG,MAAA,IAAI,CAAC,aAAa,qDAAG,CAAC,EAAE,MAAM,CAAC,CAAC;QAC9C,MAAM,KAAK,GAAG;YACZ,KAAK,EAAE,EAAE,CAAC,WAAW,GAAG,IAAI,EAAE;YAC9B,KAAK,EAAE,MAAM;SACd,CAAC;QACF,QACE,EAAC,IAAI,oBAAK,KAAK,GACb,eAAQ,EACP,KAAK,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/selectionFocus/revogr-focus-style.scss?tag=revogr-focus","src/components/selectionFocus/revogr-focus.tsx"],"sourcesContent":["revogr-focus.focused-cell {\n @include selection(1px);\n\n position: absolute;\n pointer-events: none;\n z-index: 9;\n display: block !important;\n}\n","import {\n Component,\n Prop,\n h,\n Host,\n Event,\n Element,\n EventEmitter,\n} from '@stencil/core';\nimport { FOCUS_CLASS } from '../../utils/consts';\nimport { getCell, styleByCellProps } from '../overlay/selection.utils';\nimport { DSourceState, getSourceItem } from '@store';\nimport {\n Cell,\n SelectionStoreState,\n ColumnRegular,\n DataType,\n DimensionSettingsState,\n FocusRenderEvent,\n FocusTemplateFunc,\n DimensionCols,\n DimensionRows,\n FocusAfterRenderEvent,\n} from '@type';\nimport { Observable } from '../../utils/store.utils';\n\n/**\n * Focus component. Shows focus layer around the cell that is currently in focus.\n * @slot focus-${view.type}-${data.type}. @example focus-rgCol-rgRow\n */\n@Component({\n tag: 'revogr-focus',\n styleUrl: 'revogr-focus-style.scss',\n})\nexport class RevogrFocus {\n /**\n * Column type\n */\n @Prop() colType!: DimensionCols;\n /**\n * Row type\n */\n @Prop() rowType!: DimensionRows;\n\n /** Dynamic stores */\n /** Selection, range, focus for selection */\n @Prop() selectionStore!: Observable<SelectionStoreState>;\n /** Dimension settings Y */\n @Prop() dimensionRow!: Observable<DimensionSettingsState>;\n /** Dimension settings X */\n @Prop() dimensionCol!: Observable<DimensionSettingsState>;\n /**\n * Data rows source\n */\n @Prop() dataStore!: Observable<DSourceState<DataType, DimensionRows>>;\n /**\n * Column source\n */\n @Prop() colData!: Observable<DSourceState<ColumnRegular, DimensionCols>>;\n\n /**\n * Focus template custom function. Can be used to render custom focus layer.\n */\n @Prop() focusTemplate: FocusTemplateFunc | null = null;\n\n /**\n * Before focus render event.\n * Can be prevented by event.preventDefault().\n * If preventDefault used slot will be rendered.\n */\n @Event({ eventName: 'beforefocusrender' })\n beforeFocusRender: EventEmitter<FocusRenderEvent>;\n\n /**\n * Before focus changed verify if it's in view and scroll viewport into this view\n * Can be prevented by event.preventDefault()\n */\n @Event({ eventName: 'beforescrollintoview' })\n beforeScrollIntoView: EventEmitter<{ el: HTMLElement }>;\n /**\n * Used to setup properties after focus was rendered\n */\n @Event({ eventName: 'afterfocus' })\n afterFocus: EventEmitter<FocusAfterRenderEvent>;\n\n @Element() el: HTMLElement;\n private activeFocus: Cell | null = null;\n\n componentDidRender() {\n const currentFocus = this.selectionStore.get('focus');\n if (\n this.activeFocus?.x === currentFocus?.x &&\n this.activeFocus?.y === currentFocus?.y\n ) {\n return;\n }\n this.activeFocus = currentFocus;\n if (currentFocus && this.el) {\n const beforeScrollIn = this.beforeScrollIntoView.emit({ el: this.el });\n if (!beforeScrollIn.defaultPrevented) {\n this.el.scrollIntoView({\n block: 'nearest',\n inline: 'nearest',\n });\n }\n const model = getSourceItem(this.dataStore, currentFocus.y);\n const column = getSourceItem(this.colData, currentFocus.x);\n this.afterFocus.emit({\n model,\n column,\n rowType: this.rowType,\n colType: this.colType,\n rowIndex: currentFocus.y,\n colIndex: currentFocus.x,\n });\n }\n }\n\n render() {\n const editCell = this.selectionStore.get('edit');\n if (editCell) {\n return;\n }\n const focusCell = this.selectionStore.get('focus');\n if (!focusCell) {\n return;\n }\n const event = this.beforeFocusRender.emit({\n range: {\n ...focusCell,\n x1: focusCell.x,\n y1: focusCell.y,\n },\n rowType: this.rowType,\n colType: this.colType,\n rowDimension: { ...this.dimensionRow.state },\n colDimension: { ...this.dimensionCol.state },\n });\n if (event.defaultPrevented) {\n return <slot />;\n }\n const { detail } = event;\n\n const cell = getCell(\n detail.range,\n event.detail.rowDimension,\n event.detail.colDimension,\n );\n const styles = styleByCellProps(cell);\n const extra = this.focusTemplate?.(h, detail);\n const props = {\n class: { [FOCUS_CLASS]: true },\n style: styles,\n };\n return (\n <Host {...props}>\n <slot />\n {extra}\n </Host>\n );\n }\n}\n"],"version":3}