@revolist/revogrid 3.2.4 → 3.2.7

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 (213) hide show
  1. package/custom-element/index.js +29217 -0
  2. package/custom-element/resize-observer.js +503 -0
  3. package/dist/cjs/css-shim-9f5bc84d.js +9 -0
  4. package/dist/cjs/debounce-6cea2774.js +578 -0
  5. package/dist/cjs/dom-fcb646f0.js +78 -0
  6. package/dist/{revo-grid/index-8a604c17.js → cjs/index-cb904e00.js} +230 -1445
  7. package/dist/cjs/index.cjs.js +5 -0
  8. package/dist/cjs/loader.cjs.js +38 -0
  9. package/dist/cjs/resize-observer-bf327d6a.js +507 -0
  10. package/dist/cjs/revo-grid.cjs.js +79 -0
  11. package/dist/cjs/revo-grid_11.cjs.entry.js +28301 -0
  12. package/dist/cjs/revogr-clipboard.cjs.entry.js +56 -0
  13. package/dist/cjs/revogr-filter-panel.cjs.entry.js +278 -0
  14. package/dist/collection/collection-manifest.json +25 -0
  15. package/dist/collection/components/button/button.js +7 -0
  16. package/dist/collection/components/clipboard/revogr-clipboard.js +124 -0
  17. package/dist/collection/components/data/cellRenderer.js +27 -0
  18. package/dist/{revo-grid/columnService-91e552ba.js → collection/components/data/columnService.js} +6 -8
  19. package/dist/collection/components/data/revogr-data-style.css +135 -0
  20. package/dist/collection/components/data/revogr-data.js +325 -0
  21. package/dist/collection/components/data/rowRenderer.js +9 -0
  22. package/dist/collection/components/header/headerCellRenderer.js +29 -0
  23. package/dist/collection/components/header/headerRenderer.js +48 -0
  24. package/dist/collection/components/header/revogr-header-style.css +198 -0
  25. package/dist/collection/components/header/revogr-header.js +300 -0
  26. package/dist/collection/components/order/orderRenderer.js +53 -0
  27. package/dist/collection/components/order/revogr-order-editor.js +361 -0
  28. package/dist/collection/components/order/rowOrderService.js +71 -0
  29. package/dist/collection/components/overlay/autofill.service.js +185 -0
  30. package/dist/collection/components/overlay/clipboard.service.js +42 -0
  31. package/dist/collection/components/overlay/editors/edit.utils.js +8 -0
  32. package/dist/collection/components/overlay/editors/text.js +38 -0
  33. package/dist/collection/components/overlay/keyboard.service.js +131 -0
  34. package/dist/collection/components/overlay/revogr-edit-style.css +86 -0
  35. package/dist/collection/components/overlay/revogr-edit.js +162 -0
  36. package/dist/collection/components/overlay/revogr-overlay-selection.js +729 -0
  37. package/dist/collection/components/overlay/revogr-overlay-style.css +98 -0
  38. package/dist/{revo-grid/selection.utils-a9932db6.js → collection/components/overlay/selection.utils.js} +9 -12
  39. package/dist/collection/components/revo-grid/revo-grid-style.css +544 -0
  40. package/dist/collection/components/revo-grid/revo-grid.js +2226 -0
  41. package/dist/collection/components/revo-grid/viewport.helpers.js +14 -0
  42. package/dist/collection/components/revo-grid/viewport.interfaces.js +4 -0
  43. package/dist/collection/components/revo-grid/viewport.js +21 -0
  44. package/dist/collection/components/revo-grid/viewport.resize.service.js +24 -0
  45. package/dist/collection/components/revo-grid/viewport.scrolling.service.js +63 -0
  46. package/dist/collection/components/revo-grid/viewport.section.js +31 -0
  47. package/dist/collection/components/revo-grid/viewport.service.js +212 -0
  48. package/dist/collection/components/rowHeaders/revogr-row-headers.js +213 -0
  49. package/dist/collection/components/rowHeaders/row-header-render.js +4 -0
  50. package/dist/collection/components/scroll/revogr-viewport-scroll-style.css +137 -0
  51. package/dist/collection/components/scroll/revogr-viewport-scroll.js +402 -0
  52. package/dist/collection/components/scrollable/revogr-scroll-style.css +104 -0
  53. package/dist/collection/components/scrollable/revogr-scroll-virtual.js +256 -0
  54. package/dist/collection/components/selection-focus/revogr-focus-style.css +77 -0
  55. package/dist/collection/components/selection-focus/revogr-focus.js +106 -0
  56. package/dist/collection/components/selection-temp-range/revogr-temp-range-style.css +98 -0
  57. package/dist/collection/components/selection-temp-range/revogr-temp-range.js +141 -0
  58. package/dist/{revo-grid/app-globals-7e6866ba.js → collection/global/global.js} +2 -8
  59. package/dist/collection/index.js +4 -0
  60. package/dist/collection/plugins/autoSizeColumn.js +233 -0
  61. package/dist/collection/plugins/basePlugin.js +30 -0
  62. package/dist/{revo-grid/dispatcher-891af82e.js → collection/plugins/dispatcher.js} +2 -4
  63. package/dist/collection/plugins/export/csv.js +71 -0
  64. package/dist/collection/plugins/export/export.plugin.js +168 -0
  65. package/dist/collection/plugins/export/types.js +4 -0
  66. package/dist/collection/plugins/filter/conditions/equal.js +20 -0
  67. package/dist/collection/plugins/filter/conditions/number/greaterThan.js +13 -0
  68. package/dist/collection/plugins/filter/conditions/number/greaterThanOrEqual.js +10 -0
  69. package/dist/collection/plugins/filter/conditions/number/lessThan.js +15 -0
  70. package/dist/collection/plugins/filter/conditions/number/lessThanOrEqual.js +10 -0
  71. package/dist/collection/plugins/filter/conditions/set.js +6 -0
  72. package/dist/collection/plugins/filter/conditions/string/beginswith.js +20 -0
  73. package/dist/collection/plugins/filter/conditions/string/contains.js +21 -0
  74. package/dist/{revo-grid/filter.button-74c1cd9c.js → collection/plugins/filter/filter.button.js} +10 -13
  75. package/dist/collection/plugins/filter/filter.plugin.js +259 -0
  76. package/dist/collection/plugins/filter/filter.pop.js +488 -0
  77. package/dist/collection/plugins/filter/filter.service.js +47 -0
  78. package/dist/collection/plugins/filter/filter.style.css +239 -0
  79. package/dist/collection/plugins/filter/filter.types.js +4 -0
  80. package/dist/collection/plugins/groupingColumn/columnGroupsRenderer.js +33 -0
  81. package/dist/collection/plugins/groupingColumn/grouping.col.plugin.js +39 -0
  82. package/dist/collection/plugins/groupingColumn/headerGroupRenderer.js +24 -0
  83. package/dist/collection/plugins/groupingRow/grouping.const.js +13 -0
  84. package/dist/collection/plugins/groupingRow/grouping.row.expand.service.js +79 -0
  85. package/dist/collection/plugins/groupingRow/grouping.row.plugin.js +261 -0
  86. package/dist/collection/plugins/groupingRow/grouping.row.renderer.js +32 -0
  87. package/dist/collection/plugins/groupingRow/grouping.row.types.js +4 -0
  88. package/dist/collection/plugins/groupingRow/grouping.service.js +158 -0
  89. package/dist/collection/plugins/groupingRow/grouping.trimmed.service.js +60 -0
  90. package/dist/collection/plugins/moveColumn/columnDragPlugin.js +151 -0
  91. package/dist/collection/plugins/moveColumn/columnOrderHandler.js +63 -0
  92. package/dist/collection/plugins/sorting/sorting.plugin.js +184 -0
  93. package/dist/collection/plugins/sorting/sorting.sign.js +9 -0
  94. package/dist/collection/plugins/stretchPlugin.js +71 -0
  95. package/dist/collection/plugins/trimmed/trimmed.plugin.js +35 -0
  96. package/dist/collection/services/cell.helpers.js +10 -0
  97. package/dist/collection/services/column.data.provider.js +191 -0
  98. package/dist/collection/services/data.provider.js +50 -0
  99. package/dist/collection/services/dimension.provider.js +81 -0
  100. package/dist/{revo-grid/localScrollService-e9b73323.js → collection/services/localScrollService.js} +2 -5
  101. package/dist/collection/services/resizable.directive.js +255 -0
  102. package/dist/collection/services/selection.store.connector.js +216 -0
  103. package/dist/collection/services/viewport.provider.js +17 -0
  104. package/dist/collection/store/dataSource/data.proxy.js +37 -0
  105. package/dist/collection/store/dataSource/data.store.js +130 -0
  106. package/dist/collection/store/dimension/dimension.helpers.js +110 -0
  107. package/dist/collection/store/dimension/dimension.store.js +62 -0
  108. package/dist/collection/store/selection/selection.helpers.js +56 -0
  109. package/dist/collection/store/selection/selection.store.js +71 -0
  110. package/dist/collection/store/selection/selection.store.service.js +38 -0
  111. package/dist/collection/store/storeTypes.js +8 -0
  112. package/dist/{revo-grid/viewport.store-ffaaab6d.js → collection/store/viewPort/viewport.helpers.js} +9 -132
  113. package/dist/collection/store/viewPort/viewport.store.js +124 -0
  114. package/dist/collection/themeManager/theme.compact.js +8 -0
  115. package/dist/collection/themeManager/theme.default.js +8 -0
  116. package/dist/collection/themeManager/theme.material.js +8 -0
  117. package/dist/{revo-grid/themeService-ddaaa364.js → collection/themeManager/themeService.js} +6 -23
  118. package/dist/collection/utils/closestPolifill.js +21 -0
  119. package/dist/collection/utils/consts.js +22 -0
  120. package/dist/collection/utils/generateAlphabetHeader.js +23 -0
  121. package/dist/collection/utils/keyCodes.js +73 -0
  122. package/dist/collection/utils/keyCodes.utils.js +67 -0
  123. package/dist/collection/utils/platform.js +8 -0
  124. package/dist/collection/utils/resizeObserver.js +9 -0
  125. package/dist/collection/utils/store.utils.js +10 -0
  126. package/dist/{revo-grid/utils-2c3b3857.js → collection/utils/utils.js} +8 -10
  127. package/dist/collection/utilsExternal/generate-data.js +132 -0
  128. package/dist/esm/css-shim-e1e1ea5e.js +7 -0
  129. package/dist/esm/debounce-e4e6dd45.js +561 -0
  130. package/dist/esm/dom-21bd1807.js +76 -0
  131. package/dist/esm/index-6f753b3c.js +1817 -0
  132. package/dist/esm/index.js +3 -0
  133. package/dist/esm/loader.js +34 -0
  134. package/dist/esm/polyfills/core-js.js +11 -0
  135. package/dist/esm/polyfills/css-shim.js +1 -0
  136. package/dist/esm/polyfills/dom.js +79 -0
  137. package/dist/esm/polyfills/es5-html-element.js +1 -0
  138. package/dist/esm/polyfills/index.js +34 -0
  139. package/dist/esm/polyfills/system.js +6 -0
  140. package/dist/esm/resize-observer-00c48d78.js +503 -0
  141. package/dist/esm/revo-grid.js +77 -0
  142. package/dist/{revo-grid/lodash-a0ab4cdd.js → esm/revo-grid_11.entry.js} +25351 -14282
  143. package/dist/esm/revogr-clipboard.entry.js +52 -0
  144. package/dist/esm/revogr-filter-panel.entry.js +274 -0
  145. package/dist/esm-es5/css-shim-e1e1ea5e.js +4 -0
  146. package/dist/esm-es5/debounce-e4e6dd45.js +4 -0
  147. package/dist/esm-es5/dom-21bd1807.js +24 -0
  148. package/dist/esm-es5/index-6f753b3c.js +4 -0
  149. package/dist/esm-es5/index.js +3 -0
  150. package/dist/esm-es5/loader.js +4 -0
  151. package/dist/esm-es5/resize-observer-00c48d78.js +4 -0
  152. package/dist/esm-es5/revo-grid.js +4 -0
  153. package/dist/esm-es5/revo-grid_11.entry.js +4 -0
  154. package/dist/esm-es5/revogr-clipboard.entry.js +4 -0
  155. package/dist/esm-es5/revogr-filter-panel.entry.js +4 -0
  156. package/dist/index.cjs.js +1 -0
  157. package/dist/index.js +1 -0
  158. package/dist/revo-grid/css-shim-bcf89cc0.system.js +4 -0
  159. package/dist/revo-grid/css-shim-e1e1ea5e.js +4 -0
  160. package/dist/revo-grid/debounce-5a33c710.system.js +4 -0
  161. package/dist/revo-grid/debounce-726bdadb.js +4 -0
  162. package/dist/revo-grid/dom-21bd1807.js +5 -59
  163. package/dist/revo-grid/dom-726246e2.system.js +24 -0
  164. package/dist/revo-grid/index-f14b41a0.system.js +5 -0
  165. package/dist/revo-grid/index-f30d1de1.js +5 -0
  166. package/dist/revo-grid/index.system.js +4 -0
  167. package/dist/revo-grid/resize-observer-00c48d78.js +1 -500
  168. package/dist/revo-grid/resize-observer-8af0bc0e.system.js +4 -0
  169. package/dist/revo-grid/revo-grid.esm.js +1 -130
  170. package/dist/revo-grid/revo-grid.js +133 -0
  171. package/dist/revo-grid/revo-grid.system.js +4 -0
  172. package/dist/revo-grid/revo-grid_11.entry.js +4 -0
  173. package/dist/revo-grid/revo-grid_11.system.entry.js +4 -0
  174. package/dist/revo-grid/revogr-clipboard.entry.js +1 -49
  175. package/dist/revo-grid/revogr-clipboard.system.entry.js +4 -0
  176. package/dist/revo-grid/revogr-filter-panel.entry.js +1 -274
  177. package/dist/revo-grid/revogr-filter-panel.system.entry.js +4 -0
  178. package/dist/types/components/revo-grid/revo-grid.d.ts +0 -1
  179. package/dist/types/components.d.ts +2 -2
  180. package/loader/cdn.js +3 -1
  181. package/loader/index.cjs.js +3 -1
  182. package/loader/index.d.ts +0 -1
  183. package/loader/index.es2017.js +3 -1
  184. package/loader/index.js +3 -1
  185. package/package.json +1 -1
  186. package/dist/revo-grid/_baseIteratee-af30b221.js +0 -2070
  187. package/dist/revo-grid/consts-ef824e6f.js +0 -46
  188. package/dist/revo-grid/css-shim-5387c708.js +0 -7
  189. package/dist/revo-grid/data.store-3263fff9.js +0 -557
  190. package/dist/revo-grid/debounce-aaa4b4da.js +0 -217
  191. package/dist/revo-grid/dimension.helpers-a7944fc4.js +0 -340
  192. package/dist/revo-grid/each-0378e5a3.js +0 -180
  193. package/dist/revo-grid/identity-c8c7d3d8.js +0 -26
  194. package/dist/revo-grid/isString-a51066b5.js +0 -34
  195. package/dist/revo-grid/isSymbol-e4b5dafe.js +0 -247
  196. package/dist/revo-grid/keyCodes.utils-bd06e3ba.js +0 -299
  197. package/dist/revo-grid/keys-70b7c240.js +0 -561
  198. package/dist/revo-grid/revo-grid.entry.js +0 -3484
  199. package/dist/revo-grid/revogr-data.entry.js +0 -152
  200. package/dist/revo-grid/revogr-edit.entry.js +0 -105
  201. package/dist/revo-grid/revogr-focus.entry.js +0 -41
  202. package/dist/revo-grid/revogr-header.entry.js +0 -560
  203. package/dist/revo-grid/revogr-order-editor.entry.js +0 -175
  204. package/dist/revo-grid/revogr-overlay-selection.entry.js +0 -711
  205. package/dist/revo-grid/revogr-row-headers.entry.js +0 -73
  206. package/dist/revo-grid/revogr-scroll-virtual.entry.js +0 -114
  207. package/dist/revo-grid/revogr-temp-range.entry.js +0 -73
  208. package/dist/revo-grid/revogr-viewport-scroll.entry.js +0 -340
  209. package/dist/revo-grid/selection.store.connector-2b613fd0.js +0 -503
  210. package/dist/revo-grid/shadow-css-602a09db.js +0 -390
  211. package/dist/revo-grid/toInteger-9e6cbfd2.js +0 -107
  212. package/dist/revo-grid/toNumber-913b0b72.js +0 -105
  213. package/dist/revo-grid/viewport.helpers-49d3f031.js +0 -16
@@ -1,52 +1,4 @@
1
1
  /*!
2
2
  * Built by Revolist
3
3
  */
4
- import { r as registerInstance, e as createEvent } from './index-8a604c17.js';
5
-
6
- const Clipboard = class {
7
- constructor(hostRef) {
8
- registerInstance(this, hostRef);
9
- this.copyRegion = createEvent(this, "copyRegion", 3);
10
- this.pasteRegion = createEvent(this, "pasteRegion", 3);
11
- }
12
- onPaste(e) {
13
- const clipboardData = this.getData(e);
14
- const isHTML = clipboardData.types.indexOf('text/html') > -1;
15
- const data = isHTML ? clipboardData.getData('text/html') : clipboardData.getData('text');
16
- const parsedData = isHTML ? this.htmlParse(data) : this.textParse(data);
17
- this.pasteRegion.emit(parsedData);
18
- e.preventDefault();
19
- }
20
- copyStarted(e) {
21
- this.copyRegion.emit(this.getData(e));
22
- e.preventDefault();
23
- }
24
- async doCopy(e, data) {
25
- e.setData('text/plain', data ? this.parserCopy(data) : '');
26
- }
27
- parserCopy(data) {
28
- return data.map(rgRow => rgRow.join('\t')).join('\n');
29
- }
30
- textParse(data) {
31
- const result = [];
32
- const rows = data.split(/\r\n|\n|\r/);
33
- for (let y in rows) {
34
- result.push(rows[y].split('\t'));
35
- }
36
- return result;
37
- }
38
- htmlParse(data) {
39
- const result = [];
40
- const table = document.createRange().createContextualFragment(data).querySelector('table');
41
- for (const rgRow of Array.from(table.rows)) {
42
- result.push(Array.from(rgRow.cells).map(cell => cell.innerText));
43
- }
44
- return result;
45
- }
46
- getData(e) {
47
- var _a;
48
- return e.clipboardData || ((_a = window) === null || _a === void 0 ? void 0 : _a.clipboardData);
49
- }
50
- };
51
-
52
- export { Clipboard as revogr_clipboard };
4
+ import{r as t,c as r}from"./index-f30d1de1.js";const s=class{constructor(s){t(this,s),this.copyRegion=r(this,"copyRegion",3),this.pasteRegion=r(this,"pasteRegion",3)}onPaste(t){const r=this.getData(t),s=r.types.indexOf("text/html")>-1,o=r.getData(s?"text/html":"text"),e=s?this.htmlParse(o):this.textParse(o);this.pasteRegion.emit(e),t.preventDefault()}copyStarted(t){this.copyRegion.emit(this.getData(t)),t.preventDefault()}async doCopy(t,r){t.setData("text/plain",r?this.parserCopy(r):"")}parserCopy(t){return t.map((t=>t.join("\t"))).join("\n")}textParse(t){const r=[],s=t.split(/\r\n|\n|\r/);for(let t in s)r.push(s[t].split("\t"));return r}htmlParse(t){const r=[],s=document.createRange().createContextualFragment(t).querySelector("table");for(const t of Array.from(s.rows))r.push(Array.from(t.cells).map((t=>t.innerText)));return r}getData(t){var r;return t.clipboardData||(null===(r=window)||void 0===r?void 0:r.clipboardData)}};export{s as revogr_clipboard}
@@ -0,0 +1,4 @@
1
+ var __awaiter=this&&this.__awaiter||function(t,e,r,n){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n["throw"](t))}catch(t){a(t)}}function c(t){t.done?r(t.value):o(t.value).then(i,u)}c((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,a,i;return i={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function u(t){return function(e){return c([t,e])}}function c(i){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,o&&(a=i[0]&2?o["return"]:i[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,i[1])).done)return a;if(o=0,a)i=[i[0]&2,a.value];switch(i[0]){case 0:case 1:a=i;break;case 4:r.label++;return{value:i[1],done:false};case 5:r.label++;o=i[1];i=[0];continue;case 7:i=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(i[0]===6||i[0]===2)){r=0;continue}if(i[0]===3&&(!a||i[1]>a[0]&&i[1]<a[3])){r.label=i[1];break}if(i[0]===6&&r.label<a[1]){r.label=a[1];a=i;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(i);break}if(a[2])r.ops.pop();r.trys.pop();continue}i=e.call(t,r)}catch(t){i=[6,t];o=0}finally{n=a=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};
2
+ /*!
3
+ * Built by Revolist
4
+ */System.register(["./index-f14b41a0.system.js"],(function(t){"use strict";var e,r;return{setters:[function(t){e=t.r;r=t.c}],execute:function(){var n=t("revogr_clipboard",function(){function t(t){e(this,t);this.copyRegion=r(this,"copyRegion",3);this.pasteRegion=r(this,"pasteRegion",3)}t.prototype.onPaste=function(t){var e=this.getData(t);var r=e.types.indexOf("text/html")>-1;var n=r?e.getData("text/html"):e.getData("text");var o=r?this.htmlParse(n):this.textParse(n);this.pasteRegion.emit(o);t.preventDefault()};t.prototype.copyStarted=function(t){this.copyRegion.emit(this.getData(t));t.preventDefault()};t.prototype.doCopy=function(t,e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){t.setData("text/plain",e?this.parserCopy(e):"");return[2]}))}))};t.prototype.parserCopy=function(t){return t.map((function(t){return t.join("\t")})).join("\n")};t.prototype.textParse=function(t){var e=[];var r=t.split(/\r\n|\n|\r/);for(var n in r){e.push(r[n].split("\t"))}return e};t.prototype.htmlParse=function(t){var e=[];var r=document.createRange().createContextualFragment(t).querySelector("table");for(var n=0,o=Array.from(r.rows);n<o.length;n++){var a=o[n];e.push(Array.from(a.cells).map((function(t){return t.innerText})))}return e};t.prototype.getData=function(t){var e;return t.clipboardData||((e=window)===null||e===void 0?void 0:e.clipboardData)};return t}())}}}));
@@ -1,277 +1,4 @@
1
1
  /*!
2
2
  * Built by Revolist
3
3
  */
4
- import { h, r as registerInstance, e as createEvent, f as Host } from './index-8a604c17.js';
5
- import { i as isFilterBtn, A as AndOrButton, T as TrashButton } from './filter.button-74c1cd9c.js';
6
- import { d as debounce_1 } from './debounce-aaa4b4da.js';
7
- import './isSymbol-e4b5dafe.js';
8
- import './toNumber-913b0b72.js';
9
-
10
- const RevoButton = (props, children) => {
11
- return (h("button", Object.assign({}, props, { class: Object.assign(Object.assign({}, (typeof props.class === 'object' ? props.class : props.class ? { [props.class]: true } : '')), { ['revo-button']: true }) }), children));
12
- };
13
-
14
- (function closest() {
15
- if (!Element.prototype.matches) {
16
- Element.prototype.matches =
17
- Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
18
- }
19
- if (!Element.prototype.closest) {
20
- Element.prototype.closest = function (s) {
21
- let el = this;
22
- do {
23
- if (Element.prototype.matches.call(el, s)) {
24
- return el;
25
- }
26
- el = el.parentElement || el.parentNode;
27
- } while (el !== null && el.nodeType === 1);
28
- return null;
29
- };
30
- }
31
- })();
32
-
33
- const filterStyleCss = ".revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revogr-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{color:gray;font-size:13px;font-weight:600;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:#c5c5c5}.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:22px;color:gray;font-size:18px}.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;box-shadow:0 4px 5px rgba(0, 0, 0, 0.05)}.select-input{display:flex;justify-content:space-between;align-items:center}";
34
-
35
- const defaultType = 'none';
36
- const FILTER_LIST_CLASS = 'multi-filter-list';
37
- const FILTER_LIST_CLASS_ACTION = 'multi-filter-list-action';
38
- const FilterPanel = class {
39
- constructor(hostRef) {
40
- registerInstance(this, hostRef);
41
- this.filterChange = createEvent(this, "filterChange", 7);
42
- this.filterCaptionsInternal = {
43
- title: 'Filter by condition',
44
- save: 'Save',
45
- reset: 'Reset',
46
- cancel: 'Close',
47
- };
48
- this.isFilterIdSet = false;
49
- this.filterId = 0;
50
- this.currentFilterId = -1;
51
- this.currentFilterType = defaultType;
52
- this.filterItems = {};
53
- this.filterTypes = {};
54
- this.filterNames = {};
55
- this.filterEntities = {};
56
- this.disableDynamicFiltering = false;
57
- this.debouncedApplyFilter = debounce_1(() => {
58
- this.filterChange.emit(this.filterItems);
59
- }, 400);
60
- }
61
- onMouseDown(e) {
62
- if (this.changes && !e.defaultPrevented) {
63
- const el = e.target;
64
- if (this.isOutside(el) && !isFilterBtn(el)) {
65
- this.changes = undefined;
66
- }
67
- }
68
- }
69
- async show(newEntity) {
70
- this.changes = newEntity;
71
- if (this.changes) {
72
- this.changes.type = this.changes.type || defaultType;
73
- }
74
- }
75
- async getChanges() {
76
- return this.changes;
77
- }
78
- componentWillRender() {
79
- if (!this.isFilterIdSet) {
80
- this.isFilterIdSet = true;
81
- const filterItems = Object.keys(this.filterItems);
82
- for (const prop of filterItems) {
83
- // we set the proper filterId so there won't be any conflict when removing filters
84
- this.filterId += this.filterItems[prop].length;
85
- }
86
- }
87
- }
88
- renderSelectOptions(type, isDefaultTypeRemoved = false) {
89
- var _a;
90
- const options = [];
91
- const prop = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop;
92
- if (!isDefaultTypeRemoved) {
93
- options.push(h("option", { selected: this.currentFilterType === defaultType, value: defaultType }, prop && this.filterItems[prop] && this.filterItems[prop].length > 0 ? 'Add more condition...' : this.filterNames[defaultType]));
94
- }
95
- for (let gIndex in this.filterTypes) {
96
- options.push(...this.filterTypes[gIndex].map(k => (h("option", { value: k, selected: type === k }, this.filterNames[k]))));
97
- options.push(h("option", { disabled: true }));
98
- }
99
- return options;
100
- }
101
- renderExtra(prop, index) {
102
- const currentFilter = this.filterItems[prop];
103
- if (!currentFilter)
104
- return '';
105
- if (this.filterEntities[currentFilter[index].type].extra !== 'input')
106
- return '';
107
- return (h("input", { id: `filter-input-${currentFilter[index].id}`, placeholder: "Enter value...", type: "text", value: currentFilter[index].value, onInput: this.onUserInput.bind(this, index, prop), onKeyDown: e => this.onKeyDown(e) }));
108
- }
109
- getFilterItemsList() {
110
- var _a;
111
- const prop = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop;
112
- if (!(prop || prop === 0))
113
- return '';
114
- const propFilters = this.filterItems[prop] || [];
115
- return (h("div", { key: this.filterId }, propFilters.map((d, index) => {
116
- let andOrButton;
117
- // hide toggle button if there is only one filter and the last one
118
- if (index !== this.filterItems[prop].length - 1) {
119
- andOrButton = (h("div", { onClick: () => this.toggleFilterAndOr(d.id) }, h(AndOrButton, { isAnd: d.relation === 'and' })));
120
- }
121
- return (h("div", { key: d.id, class: FILTER_LIST_CLASS }, h("div", { class: { 'select-input': true } }, h("select", { class: "select-css select-filter", onChange: e => this.onFilterTypeChange(e, prop, index) }, this.renderSelectOptions(this.filterItems[prop][index].type, true)), h("div", { class: FILTER_LIST_CLASS_ACTION }, andOrButton), h("div", { onClick: () => this.onRemoveFilter(d.id) }, h(TrashButton, null))), h("div", null, this.renderExtra(prop, index))));
122
- }), propFilters.length > 0 ? h("div", { class: "add-filter-divider" }) : ''));
123
- }
124
- render() {
125
- if (!this.changes) {
126
- return h(Host, { style: { display: 'none' } });
127
- }
128
- const style = {
129
- display: 'block',
130
- left: `${this.changes.x}px`,
131
- top: `${this.changes.y}px`,
132
- };
133
- const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);
134
- return (h(Host, { style: style }, h("label", null, capts.title), h("div", { class: "filter-holder" }, this.getFilterItemsList()), h("div", { class: "add-filter" }, h("select", { id: "add-filter", class: "select-css", onChange: e => this.onAddNewFilter(e) }, this.renderSelectOptions(this.currentFilterType))), h("div", { class: "filter-actions" }, this.disableDynamicFiltering &&
135
- h(RevoButton, { class: { red: true, save: true }, onClick: () => this.onSave() }, capts.save), h(RevoButton, { class: { red: true, reset: true }, onClick: () => this.onReset() }, capts.reset), h(RevoButton, { class: { light: true, cancel: true }, onClick: () => this.onCancel() }, capts.cancel))));
136
- }
137
- onFilterTypeChange(e, prop, index) {
138
- const el = e.target;
139
- const type = el.value;
140
- this.filterItems[prop][index].type = type;
141
- // this re-renders the input to know if we need extra input
142
- this.filterId++;
143
- // adding setTimeout will wait for the next tick DOM update then focus on input
144
- setTimeout(() => {
145
- const input = document.getElementById('filter-input-' + this.filterItems[prop][index].id);
146
- if (input)
147
- input.focus();
148
- }, 0);
149
- if (!this.disableDynamicFiltering)
150
- this.debouncedApplyFilter();
151
- }
152
- onAddNewFilter(e) {
153
- const el = e.target;
154
- const type = el.value;
155
- this.currentFilterType = type;
156
- this.addNewFilterToProp();
157
- // reset value after adding new filter
158
- const select = document.getElementById('add-filter');
159
- if (select) {
160
- select.value = defaultType;
161
- this.currentFilterType = defaultType;
162
- }
163
- if (!this.disableDynamicFiltering)
164
- this.debouncedApplyFilter();
165
- }
166
- addNewFilterToProp() {
167
- var _a;
168
- const prop = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop;
169
- if (!(prop || prop === 0))
170
- return;
171
- if (!this.filterItems[prop]) {
172
- this.filterItems[prop] = [];
173
- }
174
- if (this.currentFilterType === 'none')
175
- return;
176
- this.filterId++;
177
- this.currentFilterId = this.filterId;
178
- this.filterItems[prop].push({
179
- id: this.currentFilterId,
180
- type: this.currentFilterType,
181
- value: '',
182
- relation: 'and',
183
- });
184
- // adding setTimeout will wait for the next tick DOM update then focus on input
185
- setTimeout(() => {
186
- const input = document.getElementById('filter-input-' + this.currentFilterId);
187
- if (input)
188
- input.focus();
189
- }, 0);
190
- }
191
- onUserInput(index, prop, event) {
192
- // update the value of the filter item
193
- this.filterItems[prop][index].value = event.target.value;
194
- if (!this.disableDynamicFiltering)
195
- this.debouncedApplyFilter();
196
- }
197
- onKeyDown(e) {
198
- if (e.key.toLowerCase() === 'enter') {
199
- const select = document.getElementById('add-filter');
200
- if (select) {
201
- select.value = defaultType;
202
- this.currentFilterType = defaultType;
203
- this.addNewFilterToProp();
204
- select.focus();
205
- }
206
- return;
207
- }
208
- // keep event local, don't escalate farther to dom
209
- e.stopPropagation();
210
- }
211
- onSave() {
212
- this.filterChange.emit(this.filterItems);
213
- }
214
- onCancel() {
215
- this.changes = undefined;
216
- }
217
- onReset() {
218
- this.assertChanges();
219
- delete this.filterItems[this.changes.prop];
220
- // this updates the DOM which is used by getFilterItemsList() key
221
- this.filterId++;
222
- this.filterChange.emit(this.filterItems);
223
- }
224
- onRemoveFilter(id) {
225
- this.assertChanges();
226
- // this is for reactivity issues for getFilterItemsList()
227
- this.filterId++;
228
- const prop = this.changes.prop;
229
- const items = this.filterItems[prop];
230
- if (!items)
231
- return;
232
- const index = items.findIndex(d => d.id === id);
233
- if (index === -1)
234
- return;
235
- items.splice(index, 1);
236
- // let's remove the prop if no more filters so the filter icon will be removed
237
- if (items.length === 0)
238
- delete this.filterItems[prop];
239
- if (!this.disableDynamicFiltering)
240
- this.debouncedApplyFilter();
241
- }
242
- toggleFilterAndOr(id) {
243
- this.assertChanges();
244
- // this is for reactivity issues for getFilterItemsList()
245
- this.filterId++;
246
- const prop = this.changes.prop;
247
- const items = this.filterItems[prop];
248
- if (!items)
249
- return;
250
- const index = items.findIndex(d => d.id === id);
251
- if (index === -1)
252
- return;
253
- items[index].relation = items[index].relation === 'and' ? 'or' : 'and';
254
- if (!this.disableDynamicFiltering)
255
- this.debouncedApplyFilter();
256
- }
257
- assertChanges() {
258
- if (!this.changes) {
259
- throw new Error('Changes required per edit');
260
- }
261
- }
262
- isOutside(e) {
263
- const select = document.getElementById('add-filter');
264
- if (select)
265
- select.value = defaultType;
266
- this.currentFilterType = defaultType;
267
- this.changes.type = defaultType;
268
- this.currentFilterId = -1;
269
- if (e.classList.contains(`[uuid="${this.uuid}"]`)) {
270
- return false;
271
- }
272
- return !(e === null || e === void 0 ? void 0 : e.closest(`[uuid="${this.uuid}"]`));
273
- }
274
- };
275
- FilterPanel.style = filterStyleCss;
276
-
277
- export { FilterPanel as revogr_filter_panel };
4
+ import{h as t,r as e,c as i,H as s}from"./index-f30d1de1.js";import{j as o,g as r,A as n,T as l}from"./debounce-726bdadb.js";const a=(e,i)=>t("button",Object.assign({},e,{class:Object.assign(Object.assign({},"object"==typeof e.class?e.class:e.class?{[e.class]:!0}:""),{"revo-button":!0})}),i);Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(t){let e=this;do{if(Element.prototype.matches.call(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null});const d=class{constructor(t){e(this,t),this.filterChange=i(this,"filterChange",7),this.filterCaptionsInternal={title:"Filter by condition",save:"Save",reset:"Reset",cancel:"Close"},this.isFilterIdSet=!1,this.filterId=0,this.currentFilterId=-1,this.currentFilterType="none",this.filterItems={},this.filterTypes={},this.filterNames={},this.filterEntities={},this.disableDynamicFiltering=!1,this.debouncedApplyFilter=o((()=>{this.filterChange.emit(this.filterItems)}),400)}onMouseDown(t){if(this.changes&&!t.defaultPrevented){const e=t.target;this.isOutside(e)&&!r(e)&&(this.changes=void 0)}}async show(t){this.changes=t,this.changes&&(this.changes.type=this.changes.type||"none")}async getChanges(){return this.changes}componentWillRender(){if(!this.isFilterIdSet){this.isFilterIdSet=!0;const t=Object.keys(this.filterItems);for(const e of t)this.filterId+=this.filterItems[e].length}}renderSelectOptions(e,i=!1){var s;const o=[],r=null===(s=this.changes)||void 0===s?void 0:s.prop;i||o.push(t("option",{selected:"none"===this.currentFilterType,value:"none"},r&&this.filterItems[r]&&this.filterItems[r].length>0?"Add more condition...":this.filterNames.none));for(let i in this.filterTypes)o.push(...this.filterTypes[i].map((i=>t("option",{value:i,selected:e===i},this.filterNames[i])))),o.push(t("option",{disabled:!0}));return o}renderExtra(e,i){const s=this.filterItems[e];return s?"input"!==this.filterEntities[s[i].type].extra?"":t("input",{id:`filter-input-${s[i].id}`,placeholder:"Enter value...",type:"text",value:s[i].value,onInput:this.onUserInput.bind(this,i,e),onKeyDown:t=>this.onKeyDown(t)}):""}getFilterItemsList(){var e;const i=null===(e=this.changes)||void 0===e?void 0:e.prop;if(!i&&0!==i)return"";const s=this.filterItems[i]||[];return t("div",{key:this.filterId},s.map(((e,s)=>{let o;return s!==this.filterItems[i].length-1&&(o=t("div",{onClick:()=>this.toggleFilterAndOr(e.id)},t(n,{isAnd:"and"===e.relation}))),t("div",{key:e.id,class:"multi-filter-list"},t("div",{class:{"select-input":!0}},t("select",{class:"select-css select-filter",onChange:t=>this.onFilterTypeChange(t,i,s)},this.renderSelectOptions(this.filterItems[i][s].type,!0)),t("div",{class:"multi-filter-list-action"},o),t("div",{onClick:()=>this.onRemoveFilter(e.id)},t(l,null))),t("div",null,this.renderExtra(i,s)))})),s.length>0?t("div",{class:"add-filter-divider"}):"")}render(){if(!this.changes)return t(s,{style:{display:"none"}});const e={display:"block",left:`${this.changes.x}px`,top:`${this.changes.y}px`},i=Object.assign(this.filterCaptionsInternal,this.filterCaptions);return t(s,{style:e},t("label",null,i.title),t("div",{class:"filter-holder"},this.getFilterItemsList()),t("div",{class:"add-filter"},t("select",{id:"add-filter",class:"select-css",onChange:t=>this.onAddNewFilter(t)},this.renderSelectOptions(this.currentFilterType))),t("div",{class:"filter-actions"},this.disableDynamicFiltering&&t(a,{class:{red:!0,save:!0},onClick:()=>this.onSave()},i.save),t(a,{class:{red:!0,reset:!0},onClick:()=>this.onReset()},i.reset),t(a,{class:{light:!0,cancel:!0},onClick:()=>this.onCancel()},i.cancel)))}onFilterTypeChange(t,e,i){this.filterItems[e][i].type=t.target.value,this.filterId++,setTimeout((()=>{const t=document.getElementById("filter-input-"+this.filterItems[e][i].id);t&&t.focus()}),0),this.disableDynamicFiltering||this.debouncedApplyFilter()}onAddNewFilter(t){this.currentFilterType=t.target.value,this.addNewFilterToProp();const e=document.getElementById("add-filter");e&&(e.value="none",this.currentFilterType="none"),this.disableDynamicFiltering||this.debouncedApplyFilter()}addNewFilterToProp(){var t;const e=null===(t=this.changes)||void 0===t?void 0:t.prop;(e||0===e)&&(this.filterItems[e]||(this.filterItems[e]=[]),"none"!==this.currentFilterType&&(this.filterId++,this.currentFilterId=this.filterId,this.filterItems[e].push({id:this.currentFilterId,type:this.currentFilterType,value:"",relation:"and"}),setTimeout((()=>{const t=document.getElementById("filter-input-"+this.currentFilterId);t&&t.focus()}),0)))}onUserInput(t,e,i){this.filterItems[e][t].value=i.target.value,this.disableDynamicFiltering||this.debouncedApplyFilter()}onKeyDown(t){if("enter"!==t.key.toLowerCase())t.stopPropagation();else{const t=document.getElementById("add-filter");t&&(t.value="none",this.currentFilterType="none",this.addNewFilterToProp(),t.focus())}}onSave(){this.filterChange.emit(this.filterItems)}onCancel(){this.changes=void 0}onReset(){this.assertChanges(),delete this.filterItems[this.changes.prop],this.filterId++,this.filterChange.emit(this.filterItems)}onRemoveFilter(t){this.assertChanges(),this.filterId++;const e=this.changes.prop,i=this.filterItems[e];if(!i)return;const s=i.findIndex((e=>e.id===t));-1!==s&&(i.splice(s,1),0===i.length&&delete this.filterItems[e],this.disableDynamicFiltering||this.debouncedApplyFilter())}toggleFilterAndOr(t){this.assertChanges(),this.filterId++;const e=this.filterItems[this.changes.prop];if(!e)return;const i=e.findIndex((e=>e.id===t));-1!==i&&(e[i].relation="and"===e[i].relation?"or":"and",this.disableDynamicFiltering||this.debouncedApplyFilter())}assertChanges(){if(!this.changes)throw new Error("Changes required per edit")}isOutside(t){const e=document.getElementById("add-filter");return e&&(e.value="none"),this.currentFilterType="none",this.changes.type="none",this.currentFilterId=-1,!t.classList.contains(`[uuid="${this.uuid}"]`)&&!(null==t?void 0:t.closest(`[uuid="${this.uuid}"]`))}};d.style=".revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revogr-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{color:gray;font-size:13px;font-weight:600;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:#c5c5c5}.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:22px;color:gray;font-size:18px}.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;box-shadow:0 4px 5px rgba(0, 0, 0, 0.05)}.select-input{display:flex;justify-content:space-between;align-items:center}";export{d as revogr_filter_panel}
@@ -0,0 +1,4 @@
1
+ var __awaiter=this&&this.__awaiter||function(t,e,i,r){function n(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,o){function s(t){try{a(r.next(t))}catch(t){o(t)}}function l(t){try{a(r["throw"](t))}catch(t){o(t)}}function a(t){t.done?i(t.value):n(t.value).then(s,l)}a((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,n,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(t){return function(e){return a([t,e])}}function a(s){if(r)throw new TypeError("Generator is already executing.");while(i)try{if(r=1,n&&(o=s[0]&2?n["return"]:s[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;if(n=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;n=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(s[0]===6&&i.label<o[1]){i.label=o[1];o=s;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(s);break}if(o[2])i.ops.pop();i.trys.pop();continue}s=e.call(t,i)}catch(t){s=[6,t];n=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};
2
+ /*!
3
+ * Built by Revolist
4
+ */System.register(["./index-f14b41a0.system.js","./debounce-5a33c710.system.js"],(function(t){"use strict";var e,i,r,n,o,s,l,a;return{setters:[function(t){e=t.h;i=t.r;r=t.c;n=t.H},function(t){o=t.j;s=t.g;l=t.A;a=t.T}],execute:function(){var c=function(t,i){var r,n;return e("button",Object.assign({},t,{class:Object.assign(Object.assign({},typeof t.class==="object"?t.class:t.class?(r={},r[t.class]=true,r):""),(n={},n["revo-button"]=true,n))}),i)};(function t(){if(!Element.prototype.matches){Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector}if(!Element.prototype.closest){Element.prototype.closest=function(t){var e=this;do{if(Element.prototype.matches.call(e,t)){return e}e=e.parentElement||e.parentNode}while(e!==null&&e.nodeType===1);return null}}})();var d=".revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revogr-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{color:gray;font-size:13px;font-weight:600;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:#c5c5c5}.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:22px;color:gray;font-size:18px}.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;box-shadow:0 4px 5px rgba(0, 0, 0, 0.05)}.select-input{display:flex;justify-content:space-between;align-items:center}";var p="none";var u="multi-filter-list";var f="multi-filter-list-action";var h=t("revogr_filter_panel",function(){function t(t){var e=this;i(this,t);this.filterChange=r(this,"filterChange",7);this.filterCaptionsInternal={title:"Filter by condition",save:"Save",reset:"Reset",cancel:"Close"};this.isFilterIdSet=false;this.filterId=0;this.currentFilterId=-1;this.currentFilterType=p;this.filterItems={};this.filterTypes={};this.filterNames={};this.filterEntities={};this.disableDynamicFiltering=false;this.debouncedApplyFilter=o((function(){e.filterChange.emit(e.filterItems)}),400)}t.prototype.onMouseDown=function(t){if(this.changes&&!t.defaultPrevented){var e=t.target;if(this.isOutside(e)&&!s(e)){this.changes=undefined}}};t.prototype.show=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.changes=t;if(this.changes){this.changes.type=this.changes.type||p}return[2]}))}))};t.prototype.getChanges=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.changes]}))}))};t.prototype.componentWillRender=function(){if(!this.isFilterIdSet){this.isFilterIdSet=true;var t=Object.keys(this.filterItems);for(var e=0,i=t;e<i.length;e++){var r=i[e];this.filterId+=this.filterItems[r].length}}};t.prototype.renderSelectOptions=function(t,i){var r=this;if(i===void 0){i=false}var n;var o=[];var s=(n=this.changes)===null||n===void 0?void 0:n.prop;if(!i){o.push(e("option",{selected:this.currentFilterType===p,value:p},s&&this.filterItems[s]&&this.filterItems[s].length>0?"Add more condition...":this.filterNames[p]))}for(var l in this.filterTypes){o.push.apply(o,this.filterTypes[l].map((function(i){return e("option",{value:i,selected:t===i},r.filterNames[i])})));o.push(e("option",{disabled:true}))}return o};t.prototype.renderExtra=function(t,i){var r=this;var n=this.filterItems[t];if(!n)return"";if(this.filterEntities[n[i].type].extra!=="input")return"";return e("input",{id:"filter-input-".concat(n[i].id),placeholder:"Enter value...",type:"text",value:n[i].value,onInput:this.onUserInput.bind(this,i,t),onKeyDown:function(t){return r.onKeyDown(t)}})};t.prototype.getFilterItemsList=function(){var t=this;var i;var r=(i=this.changes)===null||i===void 0?void 0:i.prop;if(!(r||r===0))return"";var n=this.filterItems[r]||[];return e("div",{key:this.filterId},n.map((function(i,n){var o;if(n!==t.filterItems[r].length-1){o=e("div",{onClick:function(){return t.toggleFilterAndOr(i.id)}},e(l,{isAnd:i.relation==="and"}))}return e("div",{key:i.id,class:u},e("div",{class:{"select-input":true}},e("select",{class:"select-css select-filter",onChange:function(e){return t.onFilterTypeChange(e,r,n)}},t.renderSelectOptions(t.filterItems[r][n].type,true)),e("div",{class:f},o),e("div",{onClick:function(){return t.onRemoveFilter(i.id)}},e(a,null))),e("div",null,t.renderExtra(r,n)))})),n.length>0?e("div",{class:"add-filter-divider"}):"")};t.prototype.render=function(){var t=this;if(!this.changes){return e(n,{style:{display:"none"}})}var i={display:"block",left:"".concat(this.changes.x,"px"),top:"".concat(this.changes.y,"px")};var r=Object.assign(this.filterCaptionsInternal,this.filterCaptions);return e(n,{style:i},e("label",null,r.title),e("div",{class:"filter-holder"},this.getFilterItemsList()),e("div",{class:"add-filter"},e("select",{id:"add-filter",class:"select-css",onChange:function(e){return t.onAddNewFilter(e)}},this.renderSelectOptions(this.currentFilterType))),e("div",{class:"filter-actions"},this.disableDynamicFiltering&&e(c,{class:{red:true,save:true},onClick:function(){return t.onSave()}},r.save),e(c,{class:{red:true,reset:true},onClick:function(){return t.onReset()}},r.reset),e(c,{class:{light:true,cancel:true},onClick:function(){return t.onCancel()}},r.cancel)))};t.prototype.onFilterTypeChange=function(t,e,i){var r=this;var n=t.target;var o=n.value;this.filterItems[e][i].type=o;this.filterId++;setTimeout((function(){var t=document.getElementById("filter-input-"+r.filterItems[e][i].id);if(t)t.focus()}),0);if(!this.disableDynamicFiltering)this.debouncedApplyFilter()};t.prototype.onAddNewFilter=function(t){var e=t.target;var i=e.value;this.currentFilterType=i;this.addNewFilterToProp();var r=document.getElementById("add-filter");if(r){r.value=p;this.currentFilterType=p}if(!this.disableDynamicFiltering)this.debouncedApplyFilter()};t.prototype.addNewFilterToProp=function(){var t=this;var e;var i=(e=this.changes)===null||e===void 0?void 0:e.prop;if(!(i||i===0))return;if(!this.filterItems[i]){this.filterItems[i]=[]}if(this.currentFilterType==="none")return;this.filterId++;this.currentFilterId=this.filterId;this.filterItems[i].push({id:this.currentFilterId,type:this.currentFilterType,value:"",relation:"and"});setTimeout((function(){var e=document.getElementById("filter-input-"+t.currentFilterId);if(e)e.focus()}),0)};t.prototype.onUserInput=function(t,e,i){this.filterItems[e][t].value=i.target.value;if(!this.disableDynamicFiltering)this.debouncedApplyFilter()};t.prototype.onKeyDown=function(t){if(t.key.toLowerCase()==="enter"){var e=document.getElementById("add-filter");if(e){e.value=p;this.currentFilterType=p;this.addNewFilterToProp();e.focus()}return}t.stopPropagation()};t.prototype.onSave=function(){this.filterChange.emit(this.filterItems)};t.prototype.onCancel=function(){this.changes=undefined};t.prototype.onReset=function(){this.assertChanges();delete this.filterItems[this.changes.prop];this.filterId++;this.filterChange.emit(this.filterItems)};t.prototype.onRemoveFilter=function(t){this.assertChanges();this.filterId++;var e=this.changes.prop;var i=this.filterItems[e];if(!i)return;var r=i.findIndex((function(e){return e.id===t}));if(r===-1)return;i.splice(r,1);if(i.length===0)delete this.filterItems[e];if(!this.disableDynamicFiltering)this.debouncedApplyFilter()};t.prototype.toggleFilterAndOr=function(t){this.assertChanges();this.filterId++;var e=this.changes.prop;var i=this.filterItems[e];if(!i)return;var r=i.findIndex((function(e){return e.id===t}));if(r===-1)return;i[r].relation=i[r].relation==="and"?"or":"and";if(!this.disableDynamicFiltering)this.debouncedApplyFilter()};t.prototype.assertChanges=function(){if(!this.changes){throw new Error("Changes required per edit")}};t.prototype.isOutside=function(t){var e=document.getElementById("add-filter");if(e)e.value=p;this.currentFilterType=p;this.changes.type=p;this.currentFilterId=-1;if(t.classList.contains('[uuid="'.concat(this.uuid,'"]'))){return false}return!(t===null||t===void 0?void 0:t.closest('[uuid="'.concat(this.uuid,'"]')))};return t}());h.style=d}}}));
@@ -90,7 +90,6 @@ export declare class RevoGridComponent {
90
90
  /**
91
91
  * Enables column move plugin
92
92
  * Can be boolean
93
- * Can be filter collection
94
93
  */
95
94
  canMoveColumns: boolean;
96
95
  /**
@@ -34,7 +34,7 @@ export namespace Components {
34
34
  */
35
35
  "canFocus": boolean;
36
36
  /**
37
- * Enables column move plugin Can be boolean Can be filter collection
37
+ * Enables column move plugin Can be boolean
38
38
  */
39
39
  "canMoveColumns": boolean;
40
40
  /**
@@ -496,7 +496,7 @@ declare namespace LocalJSX {
496
496
  */
497
497
  "canFocus"?: boolean;
498
498
  /**
499
- * Enables column move plugin Can be boolean Can be filter collection
499
+ * Enables column move plugin Can be boolean
500
500
  */
501
501
  "canMoveColumns"?: boolean;
502
502
  /**
package/loader/cdn.js CHANGED
@@ -1,3 +1,5 @@
1
-
1
+ /*!
2
+ * Built by Revolist
3
+ */
2
4
  module.exports = require('../dist/cjs/loader.cjs.js');
3
5
  module.exports.applyPolyfills = function() { return Promise.resolve() };
@@ -1,3 +1,5 @@
1
-
1
+ /*!
2
+ * Built by Revolist
3
+ */
2
4
  module.exports = require('../dist/cjs/loader.cjs.js');
3
5
  module.exports.applyPolyfills = function() { return Promise.resolve() };
package/loader/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  export * from '../dist/types/components';
3
2
  export interface CustomElementsDefineOptions {
4
3
  exclude?: string[];
@@ -1,3 +1,5 @@
1
-
1
+ /*!
2
+ * Built by Revolist
3
+ */
2
4
  export * from '../dist/esm/polyfills/index.js';
3
5
  export * from '../dist/esm/loader.js';
package/loader/index.js CHANGED
@@ -1,4 +1,6 @@
1
-
1
+ /*!
2
+ * Built by Revolist
3
+ */
2
4
  (function(){if("undefined"!==typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)};HTMLElement.prototype=a.prototype;HTMLElement.prototype.constructor=HTMLElement;Object.setPrototypeOf(HTMLElement,a)}})();
3
5
  export * from '../dist/esm/polyfills/index.js';
4
6
  export * from '../dist/esm-es5/loader.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revolist/revogrid",
3
- "version": "3.2.4",
3
+ "version": "3.2.7",
4
4
  "description": "Virtual reactive data grid component - RevoGrid.",
5
5
  "license": "MIT",
6
6
  "directories": {