@revolist/revogrid 3.0.99 → 3.1.5

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 (43) hide show
  1. package/custom-element/index.js +479 -300
  2. package/dist/cjs/debounce-e9b040d9.js +575 -0
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/revo-grid.cjs.js +1 -1
  5. package/dist/cjs/revo-grid_11.cjs.entry.js +163 -634
  6. package/dist/cjs/revogr-filter-panel.cjs.entry.js +158 -43
  7. package/dist/collection/components/revo-grid/revo-grid.js +1 -1
  8. package/dist/collection/plugins/filter/conditions/equal.js +5 -1
  9. package/dist/collection/plugins/filter/filter.button.js +10 -0
  10. package/dist/collection/plugins/filter/filter.plugin.js +93 -47
  11. package/dist/collection/plugins/filter/filter.pop.js +196 -47
  12. package/dist/collection/plugins/filter/filter.style.css +51 -4
  13. package/dist/collection/plugins/groupingColumn/grouping.col.plugin.js +1 -0
  14. package/dist/collection/plugins/sorting/sorting.plugin.js +3 -0
  15. package/dist/collection/utilsExternal/generate-data.js +1 -1
  16. package/dist/esm/debounce-8dadcda7.js +558 -0
  17. package/dist/esm/loader.js +1 -1
  18. package/dist/esm/revo-grid.js +1 -1
  19. package/dist/esm/revo-grid_11.entry.js +117 -588
  20. package/dist/esm/revogr-filter-panel.entry.js +157 -42
  21. package/dist/esm-es5/debounce-8dadcda7.js +1 -0
  22. package/dist/esm-es5/loader.js +1 -1
  23. package/dist/esm-es5/revo-grid.js +1 -1
  24. package/dist/esm-es5/revo-grid_11.entry.js +1 -1
  25. package/dist/esm-es5/revogr-filter-panel.entry.js +1 -1
  26. package/dist/revo-grid/debounce-d097578d.js +1 -0
  27. package/dist/revo-grid/debounce-f40a88f6.system.js +1 -0
  28. package/dist/revo-grid/revo-grid.esm.js +1 -1
  29. package/dist/revo-grid/revo-grid.system.js +1 -1
  30. package/dist/revo-grid/revo-grid_11.entry.js +1 -1
  31. package/dist/revo-grid/revo-grid_11.system.entry.js +1 -1
  32. package/dist/revo-grid/revogr-filter-panel.entry.js +1 -1
  33. package/dist/revo-grid/revogr-filter-panel.system.entry.js +1 -1
  34. package/dist/types/components.d.ts +4 -2
  35. package/dist/types/plugins/filter/filter.button.d.ts +4 -0
  36. package/dist/types/plugins/filter/filter.plugin.d.ts +5 -8
  37. package/dist/types/plugins/filter/filter.pop.d.ts +26 -7
  38. package/package.json +1 -1
  39. package/dist/cjs/filter.button-2396a488.js +0 -27
  40. package/dist/esm/filter.button-53ebca66.js +0 -23
  41. package/dist/esm-es5/filter.button-53ebca66.js +0 -1
  42. package/dist/revo-grid/filter.button-1509c206.js +0 -1
  43. package/dist/revo-grid/filter.button-4bd87101.system.js +0 -1
@@ -4144,6 +4144,7 @@ class GroupingColumnPlugin extends BasePlugin {
4144
4144
  res.columnGrouping[key].push(...collectionItem);
4145
4145
  }
4146
4146
  res.maxLevel = Math.max(res.maxLevel, collection.maxLevel);
4147
+ res.sort = Object.assign(Object.assign({}, res.sort), collection.sort);
4147
4148
  return res;
4148
4149
  }
4149
4150
  static isColGrouping(colData) {
@@ -5346,6 +5347,8 @@ class AutoSizeColumn extends BasePlugin {
5346
5347
  const FILTER_BUTTON_CLASS = 'rv-filter';
5347
5348
  const FILTER_BUTTON_ACTIVE = 'active';
5348
5349
  const FILTER_PROP = 'hasFilter';
5350
+ const AND_OR_BUTTON = 'and-or-button';
5351
+ const TRASH_BUTTON = 'trash-button';
5349
5352
  const FilterButton = ({ column }) => {
5350
5353
  return (h("span", null,
5351
5354
  h("button", { class: {
@@ -5356,6 +5359,14 @@ const FilterButton = ({ column }) => {
5356
5359
  h("g", { stroke: "none", "stroke-width": "1", fill: "none", "fill-rule": "evenodd" },
5357
5360
  h("path", { d: "M43,48 L43,56 L21,56 L21,48 L43,48 Z M53,28 L53,36 L12,36 L12,28 L53,28 Z M64,8 L64,16 L0,16 L0,8 L64,8 Z", fill: "currentColor" }))))));
5358
5361
  };
5362
+ const TrashButton = () => {
5363
+ return (h("div", { class: { [TRASH_BUTTON]: true } },
5364
+ h("svg", { class: "trash-img", viewBox: "0 0 24 24" },
5365
+ h("path", { fill: "currentColor", d: "M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z" }))));
5366
+ };
5367
+ const AndOrButton = ({ isAnd }) => {
5368
+ return h("button", { class: { [AND_OR_BUTTON]: true, 'light revo-button': true } }, isAnd ? 'and' : 'or');
5369
+ };
5359
5370
  function isFilterBtn(e) {
5360
5371
  if (e.classList.contains(FILTER_BUTTON_CLASS)) {
5361
5372
  return true;
@@ -5370,7 +5381,11 @@ const eq = (value, extra) => {
5370
5381
  if (typeof value !== 'string') {
5371
5382
  value = JSON.stringify(value);
5372
5383
  }
5373
- return value.toLocaleLowerCase() === extra.toString().toLocaleLowerCase();
5384
+ const filterVal = extra.toString().toLocaleLowerCase();
5385
+ if (filterVal.length === 0) {
5386
+ return true;
5387
+ }
5388
+ return value.toLocaleLowerCase() === filterVal;
5374
5389
  };
5375
5390
  const notEq = (value, extra) => !eq(value, extra);
5376
5391
  notEq.extra = 'input';
@@ -5490,6 +5505,7 @@ class FilterPlugin extends BasePlugin {
5490
5505
  super(revogrid);
5491
5506
  this.revogrid = revogrid;
5492
5507
  this.filterCollection = {};
5508
+ this.multiFilterItems = {};
5493
5509
  this.possibleFilters = Object.assign({}, filterTypes);
5494
5510
  this.possibleFilterNames = Object.assign({}, filterNames);
5495
5511
  this.possibleFilterEntities = Object.assign({}, filterEntities);
@@ -5497,21 +5513,38 @@ class FilterPlugin extends BasePlugin {
5497
5513
  this.initConfig(config);
5498
5514
  }
5499
5515
  const headerclick = (e) => this.headerclick(e);
5500
- const aftersourceset = () => {
5501
- if (Object.keys(this.filterCollection).length) {
5502
- this.filterByProps(this.filterCollection);
5516
+ const aftersourceset = async () => {
5517
+ const filterCollectionProps = Object.keys(this.filterCollection);
5518
+ if (filterCollectionProps.length > 0) {
5519
+ // handle old way of filtering by reworking FilterCollection to new MultiFilterItem
5520
+ filterCollectionProps.forEach((prop, index) => {
5521
+ if (!this.multiFilterItems[prop]) {
5522
+ this.multiFilterItems[prop] = [
5523
+ {
5524
+ id: index,
5525
+ type: this.filterCollection[prop].type,
5526
+ value: this.filterCollection[prop].value,
5527
+ relation: 'and',
5528
+ },
5529
+ ];
5530
+ }
5531
+ });
5503
5532
  }
5533
+ await this.runFiltering();
5504
5534
  };
5505
5535
  this.addEventListener('headerclick', headerclick);
5506
5536
  this.addEventListener('aftersourceset', aftersourceset);
5507
5537
  this.revogrid.registerVNode([
5508
- h("revogr-filter-panel", { uuid: `filter-${uiid}`, filterNames: this.possibleFilterNames, filterEntities: this.possibleFilterEntities, filterCaptions: (_a = config.localization) === null || _a === void 0 ? void 0 : _a.captions, onFilterChange: e => this.onFilterChange(e.detail), ref: e => (this.pop = e) }),
5538
+ h("revogr-filter-panel", { uuid: `filter-${uiid}`, filterItems: this.multiFilterItems, filterNames: this.possibleFilterNames, filterEntities: this.possibleFilterEntities, filterCaptions: (_a = config === null || config === void 0 ? void 0 : config.localization) === null || _a === void 0 ? void 0 : _a.captions, onFilterChange: e => this.onFilterChange(e.detail), ref: e => (this.pop = e) }),
5509
5539
  ]);
5510
5540
  }
5511
5541
  initConfig(config) {
5512
5542
  if (config.collection) {
5513
5543
  this.filterCollection = Object.assign({}, config.collection);
5514
5544
  }
5545
+ if (config.multiFilterItems) {
5546
+ this.multiFilterItems = Object.assign({}, config.multiFilterItems);
5547
+ }
5515
5548
  if (config.customFilters) {
5516
5549
  for (let cType in config.customFilters) {
5517
5550
  const cFilter = config.customFilters[cType];
@@ -5595,43 +5628,18 @@ class FilterPlugin extends BasePlugin {
5595
5628
  return !!(typeof type === 'string' && this.possibleFilters[type]);
5596
5629
  }
5597
5630
  // called on internal component change
5598
- async onFilterChange(filterItem) {
5599
- this.filterByProps({ [filterItem.prop]: filterItem });
5600
- }
5601
- /**
5602
- * Apply filters collection to extend existing one or override
5603
- * @method
5604
- * @param conditions - list of filters to apply
5605
- */
5606
- async filterByProps(conditions, override = false) {
5607
- if (override) {
5608
- this.filterCollection = {};
5609
- }
5610
- for (const prop in conditions) {
5611
- const { type, value } = conditions[prop];
5612
- if (type === 'none') {
5613
- delete this.filterCollection[prop];
5614
- }
5615
- else {
5616
- const filter = this.possibleFilterEntities[type];
5617
- this.filterCollection[prop] = {
5618
- filter,
5619
- value,
5620
- type,
5621
- };
5622
- }
5623
- }
5624
- await this.runFiltering();
5631
+ async onFilterChange(filterItems) {
5632
+ this.multiFilterItems = filterItems;
5633
+ this.runFiltering();
5625
5634
  }
5626
5635
  /**
5627
5636
  * Triggers grid filtering
5628
5637
  */
5629
- async doFiltering(collection, items, columns) {
5638
+ async doFiltering(collection, items, columns, filterItems) {
5630
5639
  const columnsToUpdate = [];
5631
- // todo improvement: loop through collection of props
5632
5640
  columns.forEach(rgCol => {
5633
5641
  const column = Object.assign({}, rgCol);
5634
- const hasFilter = collection[column.prop];
5642
+ const hasFilter = filterItems[column.prop];
5635
5643
  if (column[FILTER_PROP] && !hasFilter) {
5636
5644
  delete column[FILTER_PROP];
5637
5645
  columnsToUpdate.push(column);
@@ -5641,9 +5649,9 @@ class FilterPlugin extends BasePlugin {
5641
5649
  column[FILTER_PROP] = true;
5642
5650
  }
5643
5651
  });
5644
- const itemsToFilter = this.getRowFilter(items, collection);
5652
+ const itemsToFilter = this.getRowFilter(items, filterItems);
5645
5653
  // check is filter event prevented
5646
- const { defaultPrevented, detail } = this.emit('beforefiltertrimmed', { collection, itemsToFilter, source: items });
5654
+ const { defaultPrevented, detail } = this.emit('beforefiltertrimmed', { collection, itemsToFilter, source: items, filterItems });
5647
5655
  if (defaultPrevented) {
5648
5656
  return;
5649
5657
  }
@@ -5652,39 +5660,92 @@ class FilterPlugin extends BasePlugin {
5652
5660
  if (isAddedEvent.defaultPrevented) {
5653
5661
  return;
5654
5662
  }
5663
+ // applies the hasFilter to the columns to show filter icon
5655
5664
  await this.revogrid.updateColumns(columnsToUpdate);
5656
5665
  this.emit('afterFilterApply');
5657
5666
  }
5658
5667
  async clearFiltering() {
5659
- this.filterCollection = {};
5668
+ this.multiFilterItems = {};
5660
5669
  await this.runFiltering();
5661
5670
  }
5662
5671
  async runFiltering() {
5672
+ const collection = {};
5673
+ // handle old filterCollection to return the first filter only (if any) from multiFilterItems
5674
+ const filterProps = Object.keys(this.multiFilterItems);
5675
+ for (const prop of filterProps) {
5676
+ // check if we have any filter for a column
5677
+ if (this.multiFilterItems[prop].length > 0) {
5678
+ const firstFilterItem = this.multiFilterItems[prop][0];
5679
+ collection[prop] = {
5680
+ filter: filterEntities[firstFilterItem.type],
5681
+ type: firstFilterItem.type,
5682
+ value: firstFilterItem.value,
5683
+ };
5684
+ }
5685
+ }
5686
+ this.filterCollection = collection;
5663
5687
  const { source, columns } = await this.getData();
5664
- const { defaultPrevented, detail } = this.emit('beforefilterapply', { collection: this.filterCollection, source, columns });
5688
+ const { defaultPrevented, detail } = this.emit('beforefilterapply', { collection: this.filterCollection, source, columns, filterItems: this.multiFilterItems });
5665
5689
  if (defaultPrevented) {
5666
5690
  return;
5667
5691
  }
5668
- this.doFiltering(detail.collection, detail.source, detail.columns);
5692
+ this.doFiltering(detail.collection, detail.source, detail.columns, detail.filterItems);
5669
5693
  }
5670
5694
  async getData() {
5671
5695
  const source = await this.revogrid.getSource();
5672
5696
  const columns = await this.revogrid.getColumns();
5673
5697
  return {
5674
5698
  source,
5675
- columns
5699
+ columns,
5676
5700
  };
5677
5701
  }
5678
- getRowFilter(rows, collection) {
5702
+ getRowFilter(rows, filterItems) {
5703
+ const propKeys = Object.keys(filterItems);
5679
5704
  const trimmed = {};
5705
+ let propFilterSatisfiedCount = 0;
5706
+ let lastFilterResults = [];
5707
+ // each rows
5680
5708
  rows.forEach((model, rowIndex) => {
5681
- for (const prop in collection) {
5682
- const filterItem = collection[prop];
5683
- const filter = filterItem.filter;
5684
- if (!filter(model[prop], filterItem.value)) {
5709
+ // working on all props
5710
+ for (const prop of propKeys) {
5711
+ const propFilters = filterItems[prop];
5712
+ propFilterSatisfiedCount = 0;
5713
+ lastFilterResults = [];
5714
+ // testing each filter for a prop
5715
+ for (const [filterIndex, filterData] of propFilters.entries()) {
5716
+ // the filter LogicFunction based on the type
5717
+ const filter = filterEntities[filterData.type];
5718
+ // THE MAGIC OF FILTERING IS HERE
5719
+ if (filterData.relation === 'or') {
5720
+ lastFilterResults = [];
5721
+ if (filter(model[prop], filterData.value)) {
5722
+ continue;
5723
+ }
5724
+ propFilterSatisfiedCount++;
5725
+ }
5726
+ else {
5727
+ // 'and' relation will need to know the next filter
5728
+ // so we save this current filter to include it in the next filter
5729
+ lastFilterResults.push(!filter(model[prop], filterData.value));
5730
+ // check first if we have a filter on the next index to pair it with this current filter
5731
+ const nextFilterData = propFilters[filterIndex + 1];
5732
+ // stop the sequence if there is no next filter or if the next filter is not an 'and' relation
5733
+ if (!nextFilterData || nextFilterData.relation !== 'and') {
5734
+ // let's just continue since for sure propFilterSatisfiedCount cannot be satisfied
5735
+ if (lastFilterResults.indexOf(true) === -1) {
5736
+ lastFilterResults = [];
5737
+ continue;
5738
+ }
5739
+ // we need to add all of the lastFilterResults since we need to satisfy all
5740
+ propFilterSatisfiedCount += lastFilterResults.length;
5741
+ lastFilterResults = [];
5742
+ }
5743
+ }
5744
+ } // end of propFilters forEach
5745
+ // add to the list of removed/trimmed rows of filter condition is satisfied
5746
+ if (propFilterSatisfiedCount === propFilters.length)
5685
5747
  trimmed[rowIndex] = true;
5686
- }
5687
- }
5748
+ } // end of for-of propKeys
5688
5749
  });
5689
5750
  return trimmed;
5690
5751
  }
@@ -6011,6 +6072,9 @@ class SortingPlugin extends BasePlugin {
6011
6072
  let sorted = 0;
6012
6073
  for (let prop in sortingFunc) {
6013
6074
  const cmp = sortingFunc[prop];
6075
+ if (!cmp) {
6076
+ continue;
6077
+ }
6014
6078
  sorted = cmp(prop, a, b);
6015
6079
  if (sorted) {
6016
6080
  break;
@@ -26280,23 +26344,243 @@ const RevoButton = (props, children) => {
26280
26344
  }
26281
26345
  })();
26282
26346
 
26283
- 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 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}.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}.center{text-align:center}.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}";
26347
+ /**
26348
+ * Gets the timestamp of the number of milliseconds that have elapsed since
26349
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
26350
+ *
26351
+ * @static
26352
+ * @memberOf _
26353
+ * @since 2.4.0
26354
+ * @category Date
26355
+ * @returns {number} Returns the timestamp.
26356
+ * @example
26357
+ *
26358
+ * _.defer(function(stamp) {
26359
+ * console.log(_.now() - stamp);
26360
+ * }, _.now());
26361
+ * // => Logs the number of milliseconds it took for the deferred invocation.
26362
+ */
26363
+ var now = function() {
26364
+ return _root.Date.now();
26365
+ };
26366
+
26367
+ var now_1 = now;
26368
+
26369
+ /** Error message constants. */
26370
+ var FUNC_ERROR_TEXT$1 = 'Expected a function';
26371
+
26372
+ /* Built-in method references for those with the same name as other `lodash` methods. */
26373
+ var nativeMax = Math.max,
26374
+ nativeMin = Math.min;
26375
+
26376
+ /**
26377
+ * Creates a debounced function that delays invoking `func` until after `wait`
26378
+ * milliseconds have elapsed since the last time the debounced function was
26379
+ * invoked. The debounced function comes with a `cancel` method to cancel
26380
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
26381
+ * Provide `options` to indicate whether `func` should be invoked on the
26382
+ * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
26383
+ * with the last arguments provided to the debounced function. Subsequent
26384
+ * calls to the debounced function return the result of the last `func`
26385
+ * invocation.
26386
+ *
26387
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
26388
+ * invoked on the trailing edge of the timeout only if the debounced function
26389
+ * is invoked more than once during the `wait` timeout.
26390
+ *
26391
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
26392
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
26393
+ *
26394
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
26395
+ * for details over the differences between `_.debounce` and `_.throttle`.
26396
+ *
26397
+ * @static
26398
+ * @memberOf _
26399
+ * @since 0.1.0
26400
+ * @category Function
26401
+ * @param {Function} func The function to debounce.
26402
+ * @param {number} [wait=0] The number of milliseconds to delay.
26403
+ * @param {Object} [options={}] The options object.
26404
+ * @param {boolean} [options.leading=false]
26405
+ * Specify invoking on the leading edge of the timeout.
26406
+ * @param {number} [options.maxWait]
26407
+ * The maximum time `func` is allowed to be delayed before it's invoked.
26408
+ * @param {boolean} [options.trailing=true]
26409
+ * Specify invoking on the trailing edge of the timeout.
26410
+ * @returns {Function} Returns the new debounced function.
26411
+ * @example
26412
+ *
26413
+ * // Avoid costly calculations while the window size is in flux.
26414
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
26415
+ *
26416
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
26417
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
26418
+ * 'leading': true,
26419
+ * 'trailing': false
26420
+ * }));
26421
+ *
26422
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
26423
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
26424
+ * var source = new EventSource('/stream');
26425
+ * jQuery(source).on('message', debounced);
26426
+ *
26427
+ * // Cancel the trailing debounced invocation.
26428
+ * jQuery(window).on('popstate', debounced.cancel);
26429
+ */
26430
+ function debounce(func, wait, options) {
26431
+ var lastArgs,
26432
+ lastThis,
26433
+ maxWait,
26434
+ result,
26435
+ timerId,
26436
+ lastCallTime,
26437
+ lastInvokeTime = 0,
26438
+ leading = false,
26439
+ maxing = false,
26440
+ trailing = true;
26441
+
26442
+ if (typeof func != 'function') {
26443
+ throw new TypeError(FUNC_ERROR_TEXT$1);
26444
+ }
26445
+ wait = toNumber_1(wait) || 0;
26446
+ if (isObject_1(options)) {
26447
+ leading = !!options.leading;
26448
+ maxing = 'maxWait' in options;
26449
+ maxWait = maxing ? nativeMax(toNumber_1(options.maxWait) || 0, wait) : maxWait;
26450
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
26451
+ }
26452
+
26453
+ function invokeFunc(time) {
26454
+ var args = lastArgs,
26455
+ thisArg = lastThis;
26456
+
26457
+ lastArgs = lastThis = undefined;
26458
+ lastInvokeTime = time;
26459
+ result = func.apply(thisArg, args);
26460
+ return result;
26461
+ }
26462
+
26463
+ function leadingEdge(time) {
26464
+ // Reset any `maxWait` timer.
26465
+ lastInvokeTime = time;
26466
+ // Start the timer for the trailing edge.
26467
+ timerId = setTimeout(timerExpired, wait);
26468
+ // Invoke the leading edge.
26469
+ return leading ? invokeFunc(time) : result;
26470
+ }
26471
+
26472
+ function remainingWait(time) {
26473
+ var timeSinceLastCall = time - lastCallTime,
26474
+ timeSinceLastInvoke = time - lastInvokeTime,
26475
+ timeWaiting = wait - timeSinceLastCall;
26476
+
26477
+ return maxing
26478
+ ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
26479
+ : timeWaiting;
26480
+ }
26481
+
26482
+ function shouldInvoke(time) {
26483
+ var timeSinceLastCall = time - lastCallTime,
26484
+ timeSinceLastInvoke = time - lastInvokeTime;
26485
+
26486
+ // Either this is the first call, activity has stopped and we're at the
26487
+ // trailing edge, the system time has gone backwards and we're treating
26488
+ // it as the trailing edge, or we've hit the `maxWait` limit.
26489
+ return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
26490
+ (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
26491
+ }
26492
+
26493
+ function timerExpired() {
26494
+ var time = now_1();
26495
+ if (shouldInvoke(time)) {
26496
+ return trailingEdge(time);
26497
+ }
26498
+ // Restart the timer.
26499
+ timerId = setTimeout(timerExpired, remainingWait(time));
26500
+ }
26501
+
26502
+ function trailingEdge(time) {
26503
+ timerId = undefined;
26504
+
26505
+ // Only invoke if we have `lastArgs` which means `func` has been
26506
+ // debounced at least once.
26507
+ if (trailing && lastArgs) {
26508
+ return invokeFunc(time);
26509
+ }
26510
+ lastArgs = lastThis = undefined;
26511
+ return result;
26512
+ }
26513
+
26514
+ function cancel() {
26515
+ if (timerId !== undefined) {
26516
+ clearTimeout(timerId);
26517
+ }
26518
+ lastInvokeTime = 0;
26519
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
26520
+ }
26521
+
26522
+ function flush() {
26523
+ return timerId === undefined ? result : trailingEdge(now_1());
26524
+ }
26525
+
26526
+ function debounced() {
26527
+ var time = now_1(),
26528
+ isInvoking = shouldInvoke(time);
26529
+
26530
+ lastArgs = arguments;
26531
+ lastThis = this;
26532
+ lastCallTime = time;
26533
+
26534
+ if (isInvoking) {
26535
+ if (timerId === undefined) {
26536
+ return leadingEdge(lastCallTime);
26537
+ }
26538
+ if (maxing) {
26539
+ // Handle invocations in a tight loop.
26540
+ clearTimeout(timerId);
26541
+ timerId = setTimeout(timerExpired, wait);
26542
+ return invokeFunc(lastCallTime);
26543
+ }
26544
+ }
26545
+ if (timerId === undefined) {
26546
+ timerId = setTimeout(timerExpired, wait);
26547
+ }
26548
+ return result;
26549
+ }
26550
+ debounced.cancel = cancel;
26551
+ debounced.flush = flush;
26552
+ return debounced;
26553
+ }
26554
+
26555
+ var debounce_1 = debounce;
26556
+
26557
+ 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}";
26284
26558
 
26285
26559
  const defaultType = 'none';
26560
+ const FILTER_LIST_CLASS = 'multi-filter-list';
26561
+ const FILTER_LIST_CLASS_ACTION = 'multi-filter-list-action';
26286
26562
  const FilterPanel = class extends HTMLElement {
26287
26563
  constructor() {
26288
26564
  super();
26289
26565
  this.__registerHost();
26290
26566
  this.filterChange = createEvent(this, "filterChange", 7);
26291
26567
  this.filterCaptionsInternal = {
26292
- title: "Filter by condition",
26293
- save: "Save",
26294
- reset: "Reset",
26295
- cancel: "Cancel",
26568
+ title: 'Filter by condition',
26569
+ save: 'Save',
26570
+ reset: 'Reset',
26571
+ cancel: 'Close',
26296
26572
  };
26573
+ this.isFilterIdSet = false;
26574
+ this.filterId = 0;
26575
+ this.currentFilterId = -1;
26576
+ this.currentFilterType = defaultType;
26577
+ this.filterItems = {};
26297
26578
  this.filterTypes = {};
26298
26579
  this.filterNames = {};
26299
26580
  this.filterEntities = {};
26581
+ this.debouncedApplyFilter = debounce_1(() => {
26582
+ this.filterChange.emit(this.filterItems);
26583
+ }, 400);
26300
26584
  }
26301
26585
  onMouseDown(e) {
26302
26586
  if (this.changes && !e.defaultPrevented) {
@@ -26315,26 +26599,54 @@ const FilterPanel = class extends HTMLElement {
26315
26599
  async getChanges() {
26316
26600
  return this.changes;
26317
26601
  }
26318
- renderConditions(type) {
26602
+ componentWillRender() {
26603
+ if (!this.isFilterIdSet) {
26604
+ this.isFilterIdSet = true;
26605
+ const filterItems = Object.keys(this.filterItems);
26606
+ for (const prop of filterItems) {
26607
+ // we set the proper filterId so there won't be any conflict when removing filters
26608
+ this.filterId += this.filterItems[prop].length;
26609
+ }
26610
+ }
26611
+ }
26612
+ renderSelectOptions(type, isDefaultTypeRemoved = false) {
26613
+ var _a;
26319
26614
  const options = [];
26615
+ const prop = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop;
26616
+ if (!isDefaultTypeRemoved) {
26617
+ 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]));
26618
+ }
26320
26619
  for (let gIndex in this.filterTypes) {
26321
- options.push(h("option", { value: defaultType }, this.filterNames[defaultType]));
26322
26620
  options.push(...this.filterTypes[gIndex].map(k => (h("option", { value: k, selected: type === k }, this.filterNames[k]))));
26323
26621
  options.push(h("option", { disabled: true }));
26324
26622
  }
26325
26623
  return options;
26326
26624
  }
26327
- renderExtra(extra, value) {
26328
- this.extraElement = undefined;
26329
- switch (extra) {
26330
- case 'input':
26331
- return (h("input", { type: "text", value: value, onInput: (e) => this.onInput(e), onKeyDown: e => this.onKeyDown(e), ref: e => (this.extraElement = e) }));
26332
- default:
26333
- return '';
26334
- }
26625
+ renderExtra(prop, index) {
26626
+ const currentFilter = this.filterItems[prop];
26627
+ if (!currentFilter)
26628
+ return '';
26629
+ if (this.filterEntities[currentFilter[index].type].extra !== 'input')
26630
+ return '';
26631
+ 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) }));
26632
+ }
26633
+ getFilterItemsList() {
26634
+ var _a;
26635
+ const prop = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop;
26636
+ if (!(prop || prop === 0))
26637
+ return '';
26638
+ const propFilters = this.filterItems[prop] || [];
26639
+ return (h("div", { key: this.filterId }, propFilters.map((d, index) => {
26640
+ let andOrButton;
26641
+ // hide toggle button if there is only one filter and the last one
26642
+ if (index !== this.filterItems[prop].length - 1) {
26643
+ andOrButton = (h("div", { onClick: () => this.toggleFilterAndOr(d.id) }, h(AndOrButton, { isAnd: d.relation === 'and' })));
26644
+ }
26645
+ 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))));
26646
+ }), propFilters.length > 0 ? h("div", { class: "add-filter-divider" }) : ''));
26335
26647
  }
26336
26648
  render() {
26337
- if (!this.changes || !this.changes) {
26649
+ if (!this.changes) {
26338
26650
  return h(Host, { style: { display: 'none' } });
26339
26651
  }
26340
26652
  const style = {
@@ -26343,24 +26655,75 @@ const FilterPanel = class extends HTMLElement {
26343
26655
  top: `${this.changes.y}px`,
26344
26656
  };
26345
26657
  const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);
26346
- return (h(Host, { style: style }, h("label", null, capts.title), h("select", { class: "select-css", onChange: e => this.onFilterChange(e) }, this.renderConditions(this.changes.type)), h("div", null, this.renderExtra(this.filterEntities[this.changes.type].extra, this.changes.value)), h("div", { class: "center" }, h(RevoButton, { class: { green: true }, onClick: () => this.onSave() }, capts.save), h(RevoButton, { class: { red: true }, onClick: () => this.onReset() }, capts.reset), h(RevoButton, { class: { light: true }, onClick: () => this.onCancel() }, capts.cancel))));
26658
+ 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" }, h(RevoButton, { class: { red: true }, onClick: () => this.onReset() }, capts.reset), h(RevoButton, { class: { light: true }, onClick: () => this.onCancel() }, capts.cancel))));
26347
26659
  }
26348
- onFilterChange(e) {
26349
- if (!this.changes) {
26350
- throw new Error('Changes required per edit');
26351
- }
26660
+ onFilterTypeChange(e, prop, index) {
26352
26661
  const el = e.target;
26353
26662
  const type = el.value;
26354
- this.changes = Object.assign(Object.assign({}, this.changes), { type });
26663
+ this.filterItems[prop][index].type = type;
26664
+ // this re-renders the input to know if we need extra input
26665
+ this.filterId++;
26666
+ // adding setTimeout will wait for the next tick DOM update then focus on input
26667
+ setTimeout(() => {
26668
+ const input = document.getElementById('filter-input-' + this.filterItems[prop][index].id);
26669
+ if (input)
26670
+ input.focus();
26671
+ }, 0);
26672
+ this.debouncedApplyFilter();
26355
26673
  }
26356
- onInput(e) {
26357
- this.changes.value = e.target.value;
26358
- // prevent grid focus and other unexpected events
26359
- e.preventDefault();
26674
+ onAddNewFilter(e) {
26675
+ const el = e.target;
26676
+ const type = el.value;
26677
+ this.currentFilterType = type;
26678
+ this.addNewFilterToProp();
26679
+ // reset value after adding new filter
26680
+ const select = document.getElementById('add-filter');
26681
+ if (select) {
26682
+ select.value = defaultType;
26683
+ this.currentFilterType = defaultType;
26684
+ }
26685
+ this.debouncedApplyFilter();
26686
+ }
26687
+ addNewFilterToProp() {
26688
+ var _a;
26689
+ const prop = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop;
26690
+ if (!(prop || prop === 0))
26691
+ return;
26692
+ if (!this.filterItems[prop]) {
26693
+ this.filterItems[prop] = [];
26694
+ }
26695
+ if (this.currentFilterType === 'none')
26696
+ return;
26697
+ this.filterId++;
26698
+ this.currentFilterId = this.filterId;
26699
+ this.filterItems[prop].push({
26700
+ id: this.currentFilterId,
26701
+ type: this.currentFilterType,
26702
+ value: '',
26703
+ relation: 'and',
26704
+ });
26705
+ // adding setTimeout will wait for the next tick DOM update then focus on input
26706
+ setTimeout(() => {
26707
+ const input = document.getElementById('filter-input-' + this.currentFilterId);
26708
+ if (input)
26709
+ input.focus();
26710
+ }, 0);
26711
+ }
26712
+ onUserInput(index, prop, event) {
26713
+ // update the value of the filter item
26714
+ this.filterItems[prop][index].value = event.target.value;
26715
+ this.debouncedApplyFilter();
26360
26716
  }
26361
26717
  onKeyDown(e) {
26362
26718
  if (e.key.toLowerCase() === 'enter') {
26363
- this.onSave();
26719
+ const select = document.getElementById('add-filter');
26720
+ if (select) {
26721
+ select.value = defaultType;
26722
+ this.currentFilterType = defaultType;
26723
+ this.addNewFilterToProp();
26724
+ select.focus();
26725
+ }
26726
+ return;
26364
26727
  }
26365
26728
  // keep event local, don't escalate farther to dom
26366
26729
  e.stopPropagation();
@@ -26368,23 +26731,43 @@ const FilterPanel = class extends HTMLElement {
26368
26731
  onCancel() {
26369
26732
  this.changes = undefined;
26370
26733
  }
26371
- onSave() {
26372
- var _a, _b;
26734
+ onReset() {
26373
26735
  this.assertChanges();
26374
- this.filterChange.emit({
26375
- prop: this.changes.prop,
26376
- type: this.changes.type,
26377
- value: (_b = (_a = this.extraElement) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.trim(),
26378
- });
26379
- this.changes = undefined;
26736
+ delete this.filterItems[this.changes.prop];
26737
+ // this updates the DOM which is used by getFilterItemsList() key
26738
+ this.filterId++;
26739
+ this.filterChange.emit(this.filterItems);
26380
26740
  }
26381
- onReset() {
26741
+ onRemoveFilter(id) {
26382
26742
  this.assertChanges();
26383
- this.filterChange.emit({
26384
- prop: this.changes.prop,
26385
- type: "none",
26386
- });
26387
- this.changes = void 0;
26743
+ // this is for reactivity issues for getFilterItemsList()
26744
+ this.filterId++;
26745
+ const prop = this.changes.prop;
26746
+ const items = this.filterItems[prop];
26747
+ if (!items)
26748
+ return;
26749
+ const index = items.findIndex(d => d.id === id);
26750
+ if (index === -1)
26751
+ return;
26752
+ items.splice(index, 1);
26753
+ // let's remove the prop if no more filters so the filter icon will be removed
26754
+ if (items.length === 0)
26755
+ delete this.filterItems[prop];
26756
+ this.debouncedApplyFilter();
26757
+ }
26758
+ toggleFilterAndOr(id) {
26759
+ this.assertChanges();
26760
+ // this is for reactivity issues for getFilterItemsList()
26761
+ this.filterId++;
26762
+ const prop = this.changes.prop;
26763
+ const items = this.filterItems[prop];
26764
+ if (!items)
26765
+ return;
26766
+ const index = items.findIndex(d => d.id === id);
26767
+ if (index === -1)
26768
+ return;
26769
+ items[index].relation = items[index].relation === 'and' ? 'or' : 'and';
26770
+ this.debouncedApplyFilter();
26388
26771
  }
26389
26772
  assertChanges() {
26390
26773
  if (!this.changes) {
@@ -26392,6 +26775,12 @@ const FilterPanel = class extends HTMLElement {
26392
26775
  }
26393
26776
  }
26394
26777
  isOutside(e) {
26778
+ const select = document.getElementById('add-filter');
26779
+ if (select)
26780
+ select.value = defaultType;
26781
+ this.currentFilterType = defaultType;
26782
+ this.changes.type = defaultType;
26783
+ this.currentFilterId = -1;
26395
26784
  if (e.classList.contains(`[uuid="${this.uuid}"]`)) {
26396
26785
  return false;
26397
26786
  }
@@ -27059,216 +27448,6 @@ const RevogrHeaderComponent = class extends HTMLElement {
27059
27448
  static get style() { return revogrHeaderStyleCss; }
27060
27449
  };
27061
27450
 
27062
- /**
27063
- * Gets the timestamp of the number of milliseconds that have elapsed since
27064
- * the Unix epoch (1 January 1970 00:00:00 UTC).
27065
- *
27066
- * @static
27067
- * @memberOf _
27068
- * @since 2.4.0
27069
- * @category Date
27070
- * @returns {number} Returns the timestamp.
27071
- * @example
27072
- *
27073
- * _.defer(function(stamp) {
27074
- * console.log(_.now() - stamp);
27075
- * }, _.now());
27076
- * // => Logs the number of milliseconds it took for the deferred invocation.
27077
- */
27078
- var now = function() {
27079
- return _root.Date.now();
27080
- };
27081
-
27082
- var now_1 = now;
27083
-
27084
- /** Error message constants. */
27085
- var FUNC_ERROR_TEXT$1 = 'Expected a function';
27086
-
27087
- /* Built-in method references for those with the same name as other `lodash` methods. */
27088
- var nativeMax = Math.max,
27089
- nativeMin = Math.min;
27090
-
27091
- /**
27092
- * Creates a debounced function that delays invoking `func` until after `wait`
27093
- * milliseconds have elapsed since the last time the debounced function was
27094
- * invoked. The debounced function comes with a `cancel` method to cancel
27095
- * delayed `func` invocations and a `flush` method to immediately invoke them.
27096
- * Provide `options` to indicate whether `func` should be invoked on the
27097
- * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
27098
- * with the last arguments provided to the debounced function. Subsequent
27099
- * calls to the debounced function return the result of the last `func`
27100
- * invocation.
27101
- *
27102
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
27103
- * invoked on the trailing edge of the timeout only if the debounced function
27104
- * is invoked more than once during the `wait` timeout.
27105
- *
27106
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
27107
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
27108
- *
27109
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
27110
- * for details over the differences between `_.debounce` and `_.throttle`.
27111
- *
27112
- * @static
27113
- * @memberOf _
27114
- * @since 0.1.0
27115
- * @category Function
27116
- * @param {Function} func The function to debounce.
27117
- * @param {number} [wait=0] The number of milliseconds to delay.
27118
- * @param {Object} [options={}] The options object.
27119
- * @param {boolean} [options.leading=false]
27120
- * Specify invoking on the leading edge of the timeout.
27121
- * @param {number} [options.maxWait]
27122
- * The maximum time `func` is allowed to be delayed before it's invoked.
27123
- * @param {boolean} [options.trailing=true]
27124
- * Specify invoking on the trailing edge of the timeout.
27125
- * @returns {Function} Returns the new debounced function.
27126
- * @example
27127
- *
27128
- * // Avoid costly calculations while the window size is in flux.
27129
- * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
27130
- *
27131
- * // Invoke `sendMail` when clicked, debouncing subsequent calls.
27132
- * jQuery(element).on('click', _.debounce(sendMail, 300, {
27133
- * 'leading': true,
27134
- * 'trailing': false
27135
- * }));
27136
- *
27137
- * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
27138
- * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
27139
- * var source = new EventSource('/stream');
27140
- * jQuery(source).on('message', debounced);
27141
- *
27142
- * // Cancel the trailing debounced invocation.
27143
- * jQuery(window).on('popstate', debounced.cancel);
27144
- */
27145
- function debounce(func, wait, options) {
27146
- var lastArgs,
27147
- lastThis,
27148
- maxWait,
27149
- result,
27150
- timerId,
27151
- lastCallTime,
27152
- lastInvokeTime = 0,
27153
- leading = false,
27154
- maxing = false,
27155
- trailing = true;
27156
-
27157
- if (typeof func != 'function') {
27158
- throw new TypeError(FUNC_ERROR_TEXT$1);
27159
- }
27160
- wait = toNumber_1(wait) || 0;
27161
- if (isObject_1(options)) {
27162
- leading = !!options.leading;
27163
- maxing = 'maxWait' in options;
27164
- maxWait = maxing ? nativeMax(toNumber_1(options.maxWait) || 0, wait) : maxWait;
27165
- trailing = 'trailing' in options ? !!options.trailing : trailing;
27166
- }
27167
-
27168
- function invokeFunc(time) {
27169
- var args = lastArgs,
27170
- thisArg = lastThis;
27171
-
27172
- lastArgs = lastThis = undefined;
27173
- lastInvokeTime = time;
27174
- result = func.apply(thisArg, args);
27175
- return result;
27176
- }
27177
-
27178
- function leadingEdge(time) {
27179
- // Reset any `maxWait` timer.
27180
- lastInvokeTime = time;
27181
- // Start the timer for the trailing edge.
27182
- timerId = setTimeout(timerExpired, wait);
27183
- // Invoke the leading edge.
27184
- return leading ? invokeFunc(time) : result;
27185
- }
27186
-
27187
- function remainingWait(time) {
27188
- var timeSinceLastCall = time - lastCallTime,
27189
- timeSinceLastInvoke = time - lastInvokeTime,
27190
- timeWaiting = wait - timeSinceLastCall;
27191
-
27192
- return maxing
27193
- ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
27194
- : timeWaiting;
27195
- }
27196
-
27197
- function shouldInvoke(time) {
27198
- var timeSinceLastCall = time - lastCallTime,
27199
- timeSinceLastInvoke = time - lastInvokeTime;
27200
-
27201
- // Either this is the first call, activity has stopped and we're at the
27202
- // trailing edge, the system time has gone backwards and we're treating
27203
- // it as the trailing edge, or we've hit the `maxWait` limit.
27204
- return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
27205
- (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
27206
- }
27207
-
27208
- function timerExpired() {
27209
- var time = now_1();
27210
- if (shouldInvoke(time)) {
27211
- return trailingEdge(time);
27212
- }
27213
- // Restart the timer.
27214
- timerId = setTimeout(timerExpired, remainingWait(time));
27215
- }
27216
-
27217
- function trailingEdge(time) {
27218
- timerId = undefined;
27219
-
27220
- // Only invoke if we have `lastArgs` which means `func` has been
27221
- // debounced at least once.
27222
- if (trailing && lastArgs) {
27223
- return invokeFunc(time);
27224
- }
27225
- lastArgs = lastThis = undefined;
27226
- return result;
27227
- }
27228
-
27229
- function cancel() {
27230
- if (timerId !== undefined) {
27231
- clearTimeout(timerId);
27232
- }
27233
- lastInvokeTime = 0;
27234
- lastArgs = lastCallTime = lastThis = timerId = undefined;
27235
- }
27236
-
27237
- function flush() {
27238
- return timerId === undefined ? result : trailingEdge(now_1());
27239
- }
27240
-
27241
- function debounced() {
27242
- var time = now_1(),
27243
- isInvoking = shouldInvoke(time);
27244
-
27245
- lastArgs = arguments;
27246
- lastThis = this;
27247
- lastCallTime = time;
27248
-
27249
- if (isInvoking) {
27250
- if (timerId === undefined) {
27251
- return leadingEdge(lastCallTime);
27252
- }
27253
- if (maxing) {
27254
- // Handle invocations in a tight loop.
27255
- clearTimeout(timerId);
27256
- timerId = setTimeout(timerExpired, wait);
27257
- return invokeFunc(lastCallTime);
27258
- }
27259
- }
27260
- if (timerId === undefined) {
27261
- timerId = setTimeout(timerExpired, wait);
27262
- }
27263
- return result;
27264
- }
27265
- debounced.cancel = cancel;
27266
- debounced.flush = flush;
27267
- return debounced;
27268
- }
27269
-
27270
- var debounce_1 = debounce;
27271
-
27272
27451
  class RowOrderService {
27273
27452
  constructor(config) {
27274
27453
  this.config = config;
@@ -28747,7 +28926,7 @@ const RevoGrid = /*@__PURE__*/proxyCustomElement(RevoGridComponent, [0,"revo-gri
28747
28926
  const RevogrClipboard = /*@__PURE__*/proxyCustomElement(Clipboard, [0,"revogr-clipboard",null,[[4,"paste","onPaste"],[4,"copy","copyStarted"]]]);
28748
28927
  const RevogrData = /*@__PURE__*/proxyCustomElement(RevogrData$1, [0,"revogr-data",{"readonly":[4],"range":[4],"canDrag":[4,"can-drag"],"rowClass":[1,"row-class"],"rowSelectionStore":[16],"viewportRow":[16],"viewportCol":[16],"dimensionRow":[16],"colData":[16],"dataStore":[16]}]);
28749
28928
  const RevogrEdit = /*@__PURE__*/proxyCustomElement(Edit, [0,"revogr-edit",{"editCell":[16],"column":[16],"editor":[16]}]);
28750
- const RevogrFilterPanel = /*@__PURE__*/proxyCustomElement(FilterPanel, [0,"revogr-filter-panel",{"uuid":[1537],"filterTypes":[16],"filterNames":[16],"filterEntities":[16],"filterCaptions":[16],"changes":[32]},[[5,"mousedown","onMouseDown"]]]);
28929
+ const RevogrFilterPanel = /*@__PURE__*/proxyCustomElement(FilterPanel, [0,"revogr-filter-panel",{"uuid":[1537],"filterItems":[16],"filterTypes":[16],"filterNames":[16],"filterEntities":[16],"filterCaptions":[16],"isFilterIdSet":[32],"filterId":[32],"currentFilterId":[32],"currentFilterType":[32],"changes":[32]},[[5,"mousedown","onMouseDown"]]]);
28751
28930
  const RevogrFocus = /*@__PURE__*/proxyCustomElement(RevogrFocus$2, [0,"revogr-focus",{"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16]}]);
28752
28931
  const RevogrHeader = /*@__PURE__*/proxyCustomElement(RevogrHeaderComponent, [0,"revogr-header",{"viewportCol":[16],"dimensionCol":[16],"selectionStore":[16],"parent":[1],"groups":[16],"groupingDepth":[2,"grouping-depth"],"canResize":[4,"can-resize"],"colData":[16],"columnFilter":[4,"column-filter"]}]);
28753
28932
  const RevogrOrderEditor = /*@__PURE__*/proxyCustomElement(OrderEditor, [0,"revogr-order-editor",{"parent":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16]},[[5,"mouseleave","onMouseOut"],[5,"mouseup","onMouseUp"]]]);