@revolist/revogrid 3.0.99 → 3.1.0

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 (40) hide show
  1. package/custom-element/index.js +475 -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 +159 -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/esm/debounce-8dadcda7.js +558 -0
  14. package/dist/esm/loader.js +1 -1
  15. package/dist/esm/revo-grid.js +1 -1
  16. package/dist/esm/revo-grid_11.entry.js +113 -588
  17. package/dist/esm/revogr-filter-panel.entry.js +157 -42
  18. package/dist/esm-es5/debounce-8dadcda7.js +1 -0
  19. package/dist/esm-es5/loader.js +1 -1
  20. package/dist/esm-es5/revo-grid.js +1 -1
  21. package/dist/esm-es5/revo-grid_11.entry.js +1 -1
  22. package/dist/esm-es5/revogr-filter-panel.entry.js +1 -1
  23. package/dist/revo-grid/debounce-d097578d.js +1 -0
  24. package/dist/revo-grid/debounce-f40a88f6.system.js +1 -0
  25. package/dist/revo-grid/revo-grid.esm.js +1 -1
  26. package/dist/revo-grid/revo-grid.system.js +1 -1
  27. package/dist/revo-grid/revo-grid_11.entry.js +1 -1
  28. package/dist/revo-grid/revo-grid_11.system.entry.js +1 -1
  29. package/dist/revo-grid/revogr-filter-panel.entry.js +1 -1
  30. package/dist/revo-grid/revogr-filter-panel.system.entry.js +1 -1
  31. package/dist/types/components.d.ts +4 -2
  32. package/dist/types/plugins/filter/filter.button.d.ts +4 -0
  33. package/dist/types/plugins/filter/filter.plugin.d.ts +5 -8
  34. package/dist/types/plugins/filter/filter.pop.d.ts +26 -7
  35. package/package.json +1 -1
  36. package/dist/cjs/filter.button-2396a488.js +0 -27
  37. package/dist/esm/filter.button-53ebca66.js +0 -23
  38. package/dist/esm-es5/filter.button-53ebca66.js +0 -1
  39. package/dist/revo-grid/filter.button-1509c206.js +0 -1
  40. package/dist/revo-grid/filter.button-4bd87101.system.js +0 -1
@@ -5346,6 +5346,8 @@ class AutoSizeColumn extends BasePlugin {
5346
5346
  const FILTER_BUTTON_CLASS = 'rv-filter';
5347
5347
  const FILTER_BUTTON_ACTIVE = 'active';
5348
5348
  const FILTER_PROP = 'hasFilter';
5349
+ const AND_OR_BUTTON = 'and-or-button';
5350
+ const TRASH_BUTTON = 'trash-button';
5349
5351
  const FilterButton = ({ column }) => {
5350
5352
  return (h("span", null,
5351
5353
  h("button", { class: {
@@ -5356,6 +5358,14 @@ const FilterButton = ({ column }) => {
5356
5358
  h("g", { stroke: "none", "stroke-width": "1", fill: "none", "fill-rule": "evenodd" },
5357
5359
  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
5360
  };
5361
+ const TrashButton = () => {
5362
+ return (h("div", { class: { [TRASH_BUTTON]: true } },
5363
+ h("svg", { class: "trash-img", viewBox: "0 0 24 24" },
5364
+ h("path", { fill: "currentColor", d: "M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z" }))));
5365
+ };
5366
+ const AndOrButton = ({ isAnd }) => {
5367
+ return h("button", { class: { [AND_OR_BUTTON]: true, 'light revo-button': true } }, isAnd ? 'and' : 'or');
5368
+ };
5359
5369
  function isFilterBtn(e) {
5360
5370
  if (e.classList.contains(FILTER_BUTTON_CLASS)) {
5361
5371
  return true;
@@ -5370,7 +5380,11 @@ const eq = (value, extra) => {
5370
5380
  if (typeof value !== 'string') {
5371
5381
  value = JSON.stringify(value);
5372
5382
  }
5373
- return value.toLocaleLowerCase() === extra.toString().toLocaleLowerCase();
5383
+ const filterVal = extra.toString().toLocaleLowerCase();
5384
+ if (filterVal.length === 0) {
5385
+ return true;
5386
+ }
5387
+ return value.toLocaleLowerCase() === filterVal;
5374
5388
  };
5375
5389
  const notEq = (value, extra) => !eq(value, extra);
5376
5390
  notEq.extra = 'input';
@@ -5490,6 +5504,7 @@ class FilterPlugin extends BasePlugin {
5490
5504
  super(revogrid);
5491
5505
  this.revogrid = revogrid;
5492
5506
  this.filterCollection = {};
5507
+ this.multiFilterItems = {};
5493
5508
  this.possibleFilters = Object.assign({}, filterTypes);
5494
5509
  this.possibleFilterNames = Object.assign({}, filterNames);
5495
5510
  this.possibleFilterEntities = Object.assign({}, filterEntities);
@@ -5497,21 +5512,38 @@ class FilterPlugin extends BasePlugin {
5497
5512
  this.initConfig(config);
5498
5513
  }
5499
5514
  const headerclick = (e) => this.headerclick(e);
5500
- const aftersourceset = () => {
5501
- if (Object.keys(this.filterCollection).length) {
5502
- this.filterByProps(this.filterCollection);
5515
+ const aftersourceset = async () => {
5516
+ const filterCollectionProps = Object.keys(this.filterCollection);
5517
+ if (filterCollectionProps.length > 0) {
5518
+ // handle old way of filtering by reworking FilterCollection to new MultiFilterItem
5519
+ filterCollectionProps.forEach((prop, index) => {
5520
+ if (!this.multiFilterItems[prop]) {
5521
+ this.multiFilterItems[prop] = [
5522
+ {
5523
+ id: index,
5524
+ type: this.filterCollection[prop].type,
5525
+ value: this.filterCollection[prop].value,
5526
+ relation: 'and',
5527
+ },
5528
+ ];
5529
+ }
5530
+ });
5503
5531
  }
5532
+ await this.runFiltering();
5504
5533
  };
5505
5534
  this.addEventListener('headerclick', headerclick);
5506
5535
  this.addEventListener('aftersourceset', aftersourceset);
5507
5536
  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) }),
5537
+ 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
5538
  ]);
5510
5539
  }
5511
5540
  initConfig(config) {
5512
5541
  if (config.collection) {
5513
5542
  this.filterCollection = Object.assign({}, config.collection);
5514
5543
  }
5544
+ if (config.multiFilterItems) {
5545
+ this.multiFilterItems = Object.assign({}, config.multiFilterItems);
5546
+ }
5515
5547
  if (config.customFilters) {
5516
5548
  for (let cType in config.customFilters) {
5517
5549
  const cFilter = config.customFilters[cType];
@@ -5595,43 +5627,18 @@ class FilterPlugin extends BasePlugin {
5595
5627
  return !!(typeof type === 'string' && this.possibleFilters[type]);
5596
5628
  }
5597
5629
  // 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();
5630
+ async onFilterChange(filterItems) {
5631
+ this.multiFilterItems = filterItems;
5632
+ this.runFiltering();
5625
5633
  }
5626
5634
  /**
5627
5635
  * Triggers grid filtering
5628
5636
  */
5629
- async doFiltering(collection, items, columns) {
5637
+ async doFiltering(collection, items, columns, filterItems) {
5630
5638
  const columnsToUpdate = [];
5631
- // todo improvement: loop through collection of props
5632
5639
  columns.forEach(rgCol => {
5633
5640
  const column = Object.assign({}, rgCol);
5634
- const hasFilter = collection[column.prop];
5641
+ const hasFilter = filterItems[column.prop];
5635
5642
  if (column[FILTER_PROP] && !hasFilter) {
5636
5643
  delete column[FILTER_PROP];
5637
5644
  columnsToUpdate.push(column);
@@ -5641,9 +5648,9 @@ class FilterPlugin extends BasePlugin {
5641
5648
  column[FILTER_PROP] = true;
5642
5649
  }
5643
5650
  });
5644
- const itemsToFilter = this.getRowFilter(items, collection);
5651
+ const itemsToFilter = this.getRowFilter(items, filterItems);
5645
5652
  // check is filter event prevented
5646
- const { defaultPrevented, detail } = this.emit('beforefiltertrimmed', { collection, itemsToFilter, source: items });
5653
+ const { defaultPrevented, detail } = this.emit('beforefiltertrimmed', { collection, itemsToFilter, source: items, filterItems });
5647
5654
  if (defaultPrevented) {
5648
5655
  return;
5649
5656
  }
@@ -5652,39 +5659,92 @@ class FilterPlugin extends BasePlugin {
5652
5659
  if (isAddedEvent.defaultPrevented) {
5653
5660
  return;
5654
5661
  }
5662
+ // applies the hasFilter to the columns to show filter icon
5655
5663
  await this.revogrid.updateColumns(columnsToUpdate);
5656
5664
  this.emit('afterFilterApply');
5657
5665
  }
5658
5666
  async clearFiltering() {
5659
- this.filterCollection = {};
5667
+ this.multiFilterItems = {};
5660
5668
  await this.runFiltering();
5661
5669
  }
5662
5670
  async runFiltering() {
5671
+ const collection = {};
5672
+ // handle old filterCollection to return the first filter only (if any) from multiFilterItems
5673
+ const filterProps = Object.keys(this.multiFilterItems);
5674
+ for (const prop of filterProps) {
5675
+ // check if we have any filter for a column
5676
+ if (this.multiFilterItems[prop].length > 0) {
5677
+ const firstFilterItem = this.multiFilterItems[prop][0];
5678
+ collection[prop] = {
5679
+ filter: filterEntities[firstFilterItem.type],
5680
+ type: firstFilterItem.type,
5681
+ value: firstFilterItem.value,
5682
+ };
5683
+ }
5684
+ }
5685
+ this.filterCollection = collection;
5663
5686
  const { source, columns } = await this.getData();
5664
- const { defaultPrevented, detail } = this.emit('beforefilterapply', { collection: this.filterCollection, source, columns });
5687
+ const { defaultPrevented, detail } = this.emit('beforefilterapply', { collection: this.filterCollection, source, columns, filterItems: this.multiFilterItems });
5665
5688
  if (defaultPrevented) {
5666
5689
  return;
5667
5690
  }
5668
- this.doFiltering(detail.collection, detail.source, detail.columns);
5691
+ this.doFiltering(detail.collection, detail.source, detail.columns, detail.filterItems);
5669
5692
  }
5670
5693
  async getData() {
5671
5694
  const source = await this.revogrid.getSource();
5672
5695
  const columns = await this.revogrid.getColumns();
5673
5696
  return {
5674
5697
  source,
5675
- columns
5698
+ columns,
5676
5699
  };
5677
5700
  }
5678
- getRowFilter(rows, collection) {
5701
+ getRowFilter(rows, filterItems) {
5702
+ const propKeys = Object.keys(filterItems);
5679
5703
  const trimmed = {};
5704
+ let propFilterSatisfiedCount = 0;
5705
+ let lastFilterResults = [];
5706
+ // each rows
5680
5707
  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)) {
5708
+ // working on all props
5709
+ for (const prop of propKeys) {
5710
+ const propFilters = filterItems[prop];
5711
+ propFilterSatisfiedCount = 0;
5712
+ lastFilterResults = [];
5713
+ // testing each filter for a prop
5714
+ for (const [filterIndex, filterData] of propFilters.entries()) {
5715
+ // the filter LogicFunction based on the type
5716
+ const filter = filterEntities[filterData.type];
5717
+ // THE MAGIC OF FILTERING IS HERE
5718
+ if (filterData.relation === 'or') {
5719
+ lastFilterResults = [];
5720
+ if (filter(model[prop], filterData.value)) {
5721
+ continue;
5722
+ }
5723
+ propFilterSatisfiedCount++;
5724
+ }
5725
+ else {
5726
+ // 'and' relation will need to know the next filter
5727
+ // so we save this current filter to include it in the next filter
5728
+ lastFilterResults.push(!filter(model[prop], filterData.value));
5729
+ // check first if we have a filter on the next index to pair it with this current filter
5730
+ const nextFilterData = propFilters[filterIndex + 1];
5731
+ // stop the sequence if there is no next filter or if the next filter is not an 'and' relation
5732
+ if (!nextFilterData || nextFilterData.relation !== 'and') {
5733
+ // let's just continue since for sure propFilterSatisfiedCount cannot be satisfied
5734
+ if (lastFilterResults.indexOf(true) === -1) {
5735
+ lastFilterResults = [];
5736
+ continue;
5737
+ }
5738
+ // we need to add all of the lastFilterResults since we need to satisfy all
5739
+ propFilterSatisfiedCount += lastFilterResults.length;
5740
+ lastFilterResults = [];
5741
+ }
5742
+ }
5743
+ } // end of propFilters forEach
5744
+ // add to the list of removed/trimmed rows of filter condition is satisfied
5745
+ if (propFilterSatisfiedCount === propFilters.length)
5685
5746
  trimmed[rowIndex] = true;
5686
- }
5687
- }
5747
+ } // end of for-of propKeys
5688
5748
  });
5689
5749
  return trimmed;
5690
5750
  }
@@ -26280,23 +26340,243 @@ const RevoButton = (props, children) => {
26280
26340
  }
26281
26341
  })();
26282
26342
 
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}";
26343
+ /**
26344
+ * Gets the timestamp of the number of milliseconds that have elapsed since
26345
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
26346
+ *
26347
+ * @static
26348
+ * @memberOf _
26349
+ * @since 2.4.0
26350
+ * @category Date
26351
+ * @returns {number} Returns the timestamp.
26352
+ * @example
26353
+ *
26354
+ * _.defer(function(stamp) {
26355
+ * console.log(_.now() - stamp);
26356
+ * }, _.now());
26357
+ * // => Logs the number of milliseconds it took for the deferred invocation.
26358
+ */
26359
+ var now = function() {
26360
+ return _root.Date.now();
26361
+ };
26362
+
26363
+ var now_1 = now;
26364
+
26365
+ /** Error message constants. */
26366
+ var FUNC_ERROR_TEXT$1 = 'Expected a function';
26367
+
26368
+ /* Built-in method references for those with the same name as other `lodash` methods. */
26369
+ var nativeMax = Math.max,
26370
+ nativeMin = Math.min;
26371
+
26372
+ /**
26373
+ * Creates a debounced function that delays invoking `func` until after `wait`
26374
+ * milliseconds have elapsed since the last time the debounced function was
26375
+ * invoked. The debounced function comes with a `cancel` method to cancel
26376
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
26377
+ * Provide `options` to indicate whether `func` should be invoked on the
26378
+ * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
26379
+ * with the last arguments provided to the debounced function. Subsequent
26380
+ * calls to the debounced function return the result of the last `func`
26381
+ * invocation.
26382
+ *
26383
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
26384
+ * invoked on the trailing edge of the timeout only if the debounced function
26385
+ * is invoked more than once during the `wait` timeout.
26386
+ *
26387
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
26388
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
26389
+ *
26390
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
26391
+ * for details over the differences between `_.debounce` and `_.throttle`.
26392
+ *
26393
+ * @static
26394
+ * @memberOf _
26395
+ * @since 0.1.0
26396
+ * @category Function
26397
+ * @param {Function} func The function to debounce.
26398
+ * @param {number} [wait=0] The number of milliseconds to delay.
26399
+ * @param {Object} [options={}] The options object.
26400
+ * @param {boolean} [options.leading=false]
26401
+ * Specify invoking on the leading edge of the timeout.
26402
+ * @param {number} [options.maxWait]
26403
+ * The maximum time `func` is allowed to be delayed before it's invoked.
26404
+ * @param {boolean} [options.trailing=true]
26405
+ * Specify invoking on the trailing edge of the timeout.
26406
+ * @returns {Function} Returns the new debounced function.
26407
+ * @example
26408
+ *
26409
+ * // Avoid costly calculations while the window size is in flux.
26410
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
26411
+ *
26412
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
26413
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
26414
+ * 'leading': true,
26415
+ * 'trailing': false
26416
+ * }));
26417
+ *
26418
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
26419
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
26420
+ * var source = new EventSource('/stream');
26421
+ * jQuery(source).on('message', debounced);
26422
+ *
26423
+ * // Cancel the trailing debounced invocation.
26424
+ * jQuery(window).on('popstate', debounced.cancel);
26425
+ */
26426
+ function debounce(func, wait, options) {
26427
+ var lastArgs,
26428
+ lastThis,
26429
+ maxWait,
26430
+ result,
26431
+ timerId,
26432
+ lastCallTime,
26433
+ lastInvokeTime = 0,
26434
+ leading = false,
26435
+ maxing = false,
26436
+ trailing = true;
26437
+
26438
+ if (typeof func != 'function') {
26439
+ throw new TypeError(FUNC_ERROR_TEXT$1);
26440
+ }
26441
+ wait = toNumber_1(wait) || 0;
26442
+ if (isObject_1(options)) {
26443
+ leading = !!options.leading;
26444
+ maxing = 'maxWait' in options;
26445
+ maxWait = maxing ? nativeMax(toNumber_1(options.maxWait) || 0, wait) : maxWait;
26446
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
26447
+ }
26448
+
26449
+ function invokeFunc(time) {
26450
+ var args = lastArgs,
26451
+ thisArg = lastThis;
26452
+
26453
+ lastArgs = lastThis = undefined;
26454
+ lastInvokeTime = time;
26455
+ result = func.apply(thisArg, args);
26456
+ return result;
26457
+ }
26458
+
26459
+ function leadingEdge(time) {
26460
+ // Reset any `maxWait` timer.
26461
+ lastInvokeTime = time;
26462
+ // Start the timer for the trailing edge.
26463
+ timerId = setTimeout(timerExpired, wait);
26464
+ // Invoke the leading edge.
26465
+ return leading ? invokeFunc(time) : result;
26466
+ }
26467
+
26468
+ function remainingWait(time) {
26469
+ var timeSinceLastCall = time - lastCallTime,
26470
+ timeSinceLastInvoke = time - lastInvokeTime,
26471
+ timeWaiting = wait - timeSinceLastCall;
26472
+
26473
+ return maxing
26474
+ ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
26475
+ : timeWaiting;
26476
+ }
26477
+
26478
+ function shouldInvoke(time) {
26479
+ var timeSinceLastCall = time - lastCallTime,
26480
+ timeSinceLastInvoke = time - lastInvokeTime;
26481
+
26482
+ // Either this is the first call, activity has stopped and we're at the
26483
+ // trailing edge, the system time has gone backwards and we're treating
26484
+ // it as the trailing edge, or we've hit the `maxWait` limit.
26485
+ return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
26486
+ (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
26487
+ }
26488
+
26489
+ function timerExpired() {
26490
+ var time = now_1();
26491
+ if (shouldInvoke(time)) {
26492
+ return trailingEdge(time);
26493
+ }
26494
+ // Restart the timer.
26495
+ timerId = setTimeout(timerExpired, remainingWait(time));
26496
+ }
26497
+
26498
+ function trailingEdge(time) {
26499
+ timerId = undefined;
26500
+
26501
+ // Only invoke if we have `lastArgs` which means `func` has been
26502
+ // debounced at least once.
26503
+ if (trailing && lastArgs) {
26504
+ return invokeFunc(time);
26505
+ }
26506
+ lastArgs = lastThis = undefined;
26507
+ return result;
26508
+ }
26509
+
26510
+ function cancel() {
26511
+ if (timerId !== undefined) {
26512
+ clearTimeout(timerId);
26513
+ }
26514
+ lastInvokeTime = 0;
26515
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
26516
+ }
26517
+
26518
+ function flush() {
26519
+ return timerId === undefined ? result : trailingEdge(now_1());
26520
+ }
26521
+
26522
+ function debounced() {
26523
+ var time = now_1(),
26524
+ isInvoking = shouldInvoke(time);
26525
+
26526
+ lastArgs = arguments;
26527
+ lastThis = this;
26528
+ lastCallTime = time;
26529
+
26530
+ if (isInvoking) {
26531
+ if (timerId === undefined) {
26532
+ return leadingEdge(lastCallTime);
26533
+ }
26534
+ if (maxing) {
26535
+ // Handle invocations in a tight loop.
26536
+ clearTimeout(timerId);
26537
+ timerId = setTimeout(timerExpired, wait);
26538
+ return invokeFunc(lastCallTime);
26539
+ }
26540
+ }
26541
+ if (timerId === undefined) {
26542
+ timerId = setTimeout(timerExpired, wait);
26543
+ }
26544
+ return result;
26545
+ }
26546
+ debounced.cancel = cancel;
26547
+ debounced.flush = flush;
26548
+ return debounced;
26549
+ }
26550
+
26551
+ var debounce_1 = debounce;
26552
+
26553
+ 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
26554
 
26285
26555
  const defaultType = 'none';
26556
+ const FILTER_LIST_CLASS = 'multi-filter-list';
26557
+ const FILTER_LIST_CLASS_ACTION = 'multi-filter-list-action';
26286
26558
  const FilterPanel = class extends HTMLElement {
26287
26559
  constructor() {
26288
26560
  super();
26289
26561
  this.__registerHost();
26290
26562
  this.filterChange = createEvent(this, "filterChange", 7);
26291
26563
  this.filterCaptionsInternal = {
26292
- title: "Filter by condition",
26293
- save: "Save",
26294
- reset: "Reset",
26295
- cancel: "Cancel",
26564
+ title: 'Filter by condition',
26565
+ save: 'Save',
26566
+ reset: 'Reset',
26567
+ cancel: 'Close',
26296
26568
  };
26569
+ this.isFilterIdSet = false;
26570
+ this.filterId = 0;
26571
+ this.currentFilterId = -1;
26572
+ this.currentFilterType = defaultType;
26573
+ this.filterItems = {};
26297
26574
  this.filterTypes = {};
26298
26575
  this.filterNames = {};
26299
26576
  this.filterEntities = {};
26577
+ this.debouncedApplyFilter = debounce_1(() => {
26578
+ this.filterChange.emit(this.filterItems);
26579
+ }, 400);
26300
26580
  }
26301
26581
  onMouseDown(e) {
26302
26582
  if (this.changes && !e.defaultPrevented) {
@@ -26315,26 +26595,54 @@ const FilterPanel = class extends HTMLElement {
26315
26595
  async getChanges() {
26316
26596
  return this.changes;
26317
26597
  }
26318
- renderConditions(type) {
26598
+ componentWillRender() {
26599
+ if (!this.isFilterIdSet) {
26600
+ this.isFilterIdSet = true;
26601
+ const filterItems = Object.keys(this.filterItems);
26602
+ for (const prop of filterItems) {
26603
+ // we set the proper filterId so there won't be any conflict when removing filters
26604
+ this.filterId += this.filterItems[prop].length;
26605
+ }
26606
+ }
26607
+ }
26608
+ renderSelectOptions(type, isDefaultTypeRemoved = false) {
26609
+ var _a;
26319
26610
  const options = [];
26611
+ const prop = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop;
26612
+ if (!isDefaultTypeRemoved) {
26613
+ 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]));
26614
+ }
26320
26615
  for (let gIndex in this.filterTypes) {
26321
- options.push(h("option", { value: defaultType }, this.filterNames[defaultType]));
26322
26616
  options.push(...this.filterTypes[gIndex].map(k => (h("option", { value: k, selected: type === k }, this.filterNames[k]))));
26323
26617
  options.push(h("option", { disabled: true }));
26324
26618
  }
26325
26619
  return options;
26326
26620
  }
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
- }
26621
+ renderExtra(prop, index) {
26622
+ const currentFilter = this.filterItems[prop];
26623
+ if (!currentFilter)
26624
+ return '';
26625
+ if (this.filterEntities[currentFilter[index].type].extra !== 'input')
26626
+ return '';
26627
+ 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) }));
26628
+ }
26629
+ getFilterItemsList() {
26630
+ var _a;
26631
+ const prop = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop;
26632
+ if (!(prop || prop === 0))
26633
+ return '';
26634
+ const propFilters = this.filterItems[prop] || [];
26635
+ return (h("div", { key: this.filterId }, propFilters.map((d, index) => {
26636
+ let andOrButton;
26637
+ // hide toggle button if there is only one filter and the last one
26638
+ if (index !== this.filterItems[prop].length - 1) {
26639
+ andOrButton = (h("div", { onClick: () => this.toggleFilterAndOr(d.id) }, h(AndOrButton, { isAnd: d.relation === 'and' })));
26640
+ }
26641
+ 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))));
26642
+ }), propFilters.length > 0 ? h("div", { class: "add-filter-divider" }) : ''));
26335
26643
  }
26336
26644
  render() {
26337
- if (!this.changes || !this.changes) {
26645
+ if (!this.changes) {
26338
26646
  return h(Host, { style: { display: 'none' } });
26339
26647
  }
26340
26648
  const style = {
@@ -26343,24 +26651,75 @@ const FilterPanel = class extends HTMLElement {
26343
26651
  top: `${this.changes.y}px`,
26344
26652
  };
26345
26653
  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))));
26654
+ 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
26655
  }
26348
- onFilterChange(e) {
26349
- if (!this.changes) {
26350
- throw new Error('Changes required per edit');
26351
- }
26656
+ onFilterTypeChange(e, prop, index) {
26352
26657
  const el = e.target;
26353
26658
  const type = el.value;
26354
- this.changes = Object.assign(Object.assign({}, this.changes), { type });
26659
+ this.filterItems[prop][index].type = type;
26660
+ // this re-renders the input to know if we need extra input
26661
+ this.filterId++;
26662
+ // adding setTimeout will wait for the next tick DOM update then focus on input
26663
+ setTimeout(() => {
26664
+ const input = document.getElementById('filter-input-' + this.filterItems[prop][index].id);
26665
+ if (input)
26666
+ input.focus();
26667
+ }, 0);
26668
+ this.debouncedApplyFilter();
26355
26669
  }
26356
- onInput(e) {
26357
- this.changes.value = e.target.value;
26358
- // prevent grid focus and other unexpected events
26359
- e.preventDefault();
26670
+ onAddNewFilter(e) {
26671
+ const el = e.target;
26672
+ const type = el.value;
26673
+ this.currentFilterType = type;
26674
+ this.addNewFilterToProp();
26675
+ // reset value after adding new filter
26676
+ const select = document.getElementById('add-filter');
26677
+ if (select) {
26678
+ select.value = defaultType;
26679
+ this.currentFilterType = defaultType;
26680
+ }
26681
+ this.debouncedApplyFilter();
26682
+ }
26683
+ addNewFilterToProp() {
26684
+ var _a;
26685
+ const prop = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop;
26686
+ if (!(prop || prop === 0))
26687
+ return;
26688
+ if (!this.filterItems[prop]) {
26689
+ this.filterItems[prop] = [];
26690
+ }
26691
+ if (this.currentFilterType === 'none')
26692
+ return;
26693
+ this.filterId++;
26694
+ this.currentFilterId = this.filterId;
26695
+ this.filterItems[prop].push({
26696
+ id: this.currentFilterId,
26697
+ type: this.currentFilterType,
26698
+ value: '',
26699
+ relation: 'and',
26700
+ });
26701
+ // adding setTimeout will wait for the next tick DOM update then focus on input
26702
+ setTimeout(() => {
26703
+ const input = document.getElementById('filter-input-' + this.currentFilterId);
26704
+ if (input)
26705
+ input.focus();
26706
+ }, 0);
26707
+ }
26708
+ onUserInput(index, prop, event) {
26709
+ // update the value of the filter item
26710
+ this.filterItems[prop][index].value = event.target.value;
26711
+ this.debouncedApplyFilter();
26360
26712
  }
26361
26713
  onKeyDown(e) {
26362
26714
  if (e.key.toLowerCase() === 'enter') {
26363
- this.onSave();
26715
+ const select = document.getElementById('add-filter');
26716
+ if (select) {
26717
+ select.value = defaultType;
26718
+ this.currentFilterType = defaultType;
26719
+ this.addNewFilterToProp();
26720
+ select.focus();
26721
+ }
26722
+ return;
26364
26723
  }
26365
26724
  // keep event local, don't escalate farther to dom
26366
26725
  e.stopPropagation();
@@ -26368,23 +26727,43 @@ const FilterPanel = class extends HTMLElement {
26368
26727
  onCancel() {
26369
26728
  this.changes = undefined;
26370
26729
  }
26371
- onSave() {
26372
- var _a, _b;
26730
+ onReset() {
26373
26731
  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;
26732
+ delete this.filterItems[this.changes.prop];
26733
+ // this updates the DOM which is used by getFilterItemsList() key
26734
+ this.filterId++;
26735
+ this.filterChange.emit(this.filterItems);
26380
26736
  }
26381
- onReset() {
26737
+ onRemoveFilter(id) {
26382
26738
  this.assertChanges();
26383
- this.filterChange.emit({
26384
- prop: this.changes.prop,
26385
- type: "none",
26386
- });
26387
- this.changes = void 0;
26739
+ // this is for reactivity issues for getFilterItemsList()
26740
+ this.filterId++;
26741
+ const prop = this.changes.prop;
26742
+ const items = this.filterItems[prop];
26743
+ if (!items)
26744
+ return;
26745
+ const index = items.findIndex(d => d.id === id);
26746
+ if (index === -1)
26747
+ return;
26748
+ items.splice(index, 1);
26749
+ // let's remove the prop if no more filters so the filter icon will be removed
26750
+ if (items.length === 0)
26751
+ delete this.filterItems[prop];
26752
+ this.debouncedApplyFilter();
26753
+ }
26754
+ toggleFilterAndOr(id) {
26755
+ this.assertChanges();
26756
+ // this is for reactivity issues for getFilterItemsList()
26757
+ this.filterId++;
26758
+ const prop = this.changes.prop;
26759
+ const items = this.filterItems[prop];
26760
+ if (!items)
26761
+ return;
26762
+ const index = items.findIndex(d => d.id === id);
26763
+ if (index === -1)
26764
+ return;
26765
+ items[index].relation = items[index].relation === 'and' ? 'or' : 'and';
26766
+ this.debouncedApplyFilter();
26388
26767
  }
26389
26768
  assertChanges() {
26390
26769
  if (!this.changes) {
@@ -26392,6 +26771,12 @@ const FilterPanel = class extends HTMLElement {
26392
26771
  }
26393
26772
  }
26394
26773
  isOutside(e) {
26774
+ const select = document.getElementById('add-filter');
26775
+ if (select)
26776
+ select.value = defaultType;
26777
+ this.currentFilterType = defaultType;
26778
+ this.changes.type = defaultType;
26779
+ this.currentFilterId = -1;
26395
26780
  if (e.classList.contains(`[uuid="${this.uuid}"]`)) {
26396
26781
  return false;
26397
26782
  }
@@ -27059,216 +27444,6 @@ const RevogrHeaderComponent = class extends HTMLElement {
27059
27444
  static get style() { return revogrHeaderStyleCss; }
27060
27445
  };
27061
27446
 
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
27447
  class RowOrderService {
27273
27448
  constructor(config) {
27274
27449
  this.config = config;
@@ -28747,7 +28922,7 @@ const RevoGrid = /*@__PURE__*/proxyCustomElement(RevoGridComponent, [0,"revo-gri
28747
28922
  const RevogrClipboard = /*@__PURE__*/proxyCustomElement(Clipboard, [0,"revogr-clipboard",null,[[4,"paste","onPaste"],[4,"copy","copyStarted"]]]);
28748
28923
  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
28924
  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"]]]);
28925
+ 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
28926
  const RevogrFocus = /*@__PURE__*/proxyCustomElement(RevogrFocus$2, [0,"revogr-focus",{"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16]}]);
28752
28927
  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
28928
  const RevogrOrderEditor = /*@__PURE__*/proxyCustomElement(OrderEditor, [0,"revogr-order-editor",{"parent":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16]},[[5,"mouseleave","onMouseOut"],[5,"mouseup","onMouseUp"]]]);