@revolist/revogrid 4.27.1 → 4.27.3

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 (44) hide show
  1. package/dist/cjs/{filter.button-F2Bw3UAd.js → filter.button-C6ixuMmr.js} +3 -2
  2. package/dist/cjs/index.cjs.js +3 -2
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/revo-grid.cjs.entry.js +3 -3
  5. package/dist/cjs/revo-grid.cjs.js +1 -1
  6. package/dist/cjs/revogr-data_4.cjs.entry.js +9 -8
  7. package/dist/cjs/revogr-filter-panel.cjs.entry.js +141 -33
  8. package/dist/cjs/{row-resize.plugin-sK9_rcUN.js → row-resize.plugin-C4YOF1lN.js} +54 -5
  9. package/dist/collection/components/header/header-renderer.js +7 -6
  10. package/dist/collection/components/header/revogr-header-style.css +8 -3
  11. package/dist/collection/components/revoGrid/revo-grid-style.css +12 -2
  12. package/dist/collection/plugins/filter/filter.button.js +3 -2
  13. package/dist/collection/plugins/filter/filter.indexed.js +5 -0
  14. package/dist/collection/plugins/filter/filter.panel.js +140 -31
  15. package/dist/collection/plugins/filter/filter.plugin.js +48 -5
  16. package/dist/collection/plugins/filter/filter.style.css +25 -3
  17. package/dist/{revo-grid/filter.button-DMhpuAiw.js → esm/filter.button-CEPUxLUo.js} +3 -2
  18. package/dist/esm/index.js +3 -3
  19. package/dist/esm/loader.js +1 -1
  20. package/dist/esm/revo-grid.entry.js +3 -3
  21. package/dist/esm/revo-grid.js +1 -1
  22. package/dist/esm/revogr-data_4.entry.js +9 -8
  23. package/dist/esm/revogr-filter-panel.entry.js +141 -33
  24. package/dist/{revo-grid/row-resize.plugin-DBOgjLdE.js → esm/row-resize.plugin-Beu0pMds.js} +54 -6
  25. package/dist/{esm/filter.button-DMhpuAiw.js → revo-grid/filter.button-CEPUxLUo.js} +3 -2
  26. package/dist/revo-grid/index.esm.js +3 -3
  27. package/dist/revo-grid/revo-grid.entry.js +3 -3
  28. package/dist/revo-grid/revo-grid.esm.js +1 -1
  29. package/dist/revo-grid/revogr-data_4.entry.js +9 -8
  30. package/dist/revo-grid/revogr-filter-panel.entry.js +141 -33
  31. package/dist/{esm/row-resize.plugin-DBOgjLdE.js → revo-grid/row-resize.plugin-Beu0pMds.js} +54 -6
  32. package/dist/types/plugins/filter/filter.indexed.d.ts +2 -0
  33. package/dist/types/plugins/filter/filter.panel.d.ts +9 -2
  34. package/dist/types/plugins/filter/filter.plugin.d.ts +8 -1
  35. package/dist/types/plugins/filter/filter.types.d.ts +8 -0
  36. package/dist/types/types/interfaces.d.ts +13 -1
  37. package/hydrate/index.js +205 -46
  38. package/hydrate/index.mjs +205 -46
  39. package/package.json +1 -1
  40. package/standalone/filter.button.js +1 -1
  41. package/standalone/index.js +1 -1
  42. package/standalone/revo-grid.js +1 -1
  43. package/standalone/revogr-filter-panel.js +1 -1
  44. package/standalone/revogr-header2.js +1 -1
@@ -20,6 +20,7 @@ const VIEWPORT_PADDING = 8;
20
20
  */
21
21
  export class FilterPanel {
22
22
  constructor() {
23
+ this.hasChanges = false;
23
24
  this.filterCaptionsInternal = {
24
25
  title: 'Filter by',
25
26
  ok: 'Close',
@@ -55,7 +56,7 @@ export class FilterPanel {
55
56
  */
56
57
  this.allowDuplicateOperators = true;
57
58
  this.debouncedApplyFilter = debounce(() => {
58
- this.filterChange.emit(this.filterItems);
59
+ this.emitFilterChange();
59
60
  }, 400);
60
61
  }
61
62
  onMouseDown(e) {
@@ -85,10 +86,27 @@ export class FilterPanel {
85
86
  }
86
87
  }
87
88
  async show(newEntity) {
89
+ this.hasChanges = false;
88
90
  this.changes = newEntity;
89
- this.filterItems = (newEntity === null || newEntity === void 0 ? void 0 : newEntity.filterItems) || {};
91
+ this.filterItems = this.cloneFilterItems((newEntity === null || newEntity === void 0 ? void 0 : newEntity.filterItems) || {});
92
+ this.draftFilter = undefined;
90
93
  if (this.changes) {
91
94
  this.changes.type = this.changes.type || defaultType;
95
+ const prop = this.changes.prop;
96
+ const propFilters = prop === undefined ? undefined : this.filterItems[prop];
97
+ if (!(propFilters === null || propFilters === void 0 ? void 0 : propFilters.length) &&
98
+ this.changes.showDefaultFilter !== false &&
99
+ this.changes.hideDefaultFilters !== true) {
100
+ const type = this.resolveDraftFilterType(this.changes.defaultFilterType);
101
+ if (type) {
102
+ this.draftFilter = {
103
+ id: ++this.filterId,
104
+ type,
105
+ value: '',
106
+ relation: 'and',
107
+ };
108
+ }
109
+ }
92
110
  }
93
111
  }
94
112
  async getChanges() {
@@ -109,29 +127,42 @@ export class FilterPanel {
109
127
  const prop = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop;
110
128
  if (prop === undefined)
111
129
  return '';
112
- const propFilters = (_b = this.filterItems[prop]) !== null && _b !== void 0 ? _b : [];
113
- const visibleFilterCount = propFilters.filter(filter => !filter.hidden).length;
130
+ const propFilters = ((_b = this.filterItems[prop]) !== null && _b !== void 0 ? _b : []).map((filter, index) => ({
131
+ filter,
132
+ index,
133
+ isDraft: false,
134
+ }));
135
+ if (this.draftFilter) {
136
+ propFilters.push({
137
+ filter: this.draftFilter,
138
+ index: propFilters.length,
139
+ isDraft: true,
140
+ });
141
+ }
142
+ const visibleFilters = propFilters.filter(({ filter }) => !filter.hidden);
143
+ const visibleFilterCount = visibleFilters.length;
114
144
  const capts = Object.assign(Object.assign({}, this.filterCaptionsInternal), this.filterCaptions);
115
- return (h("div", { key: this.filterId }, h("ul", { class: "multi-filter-list-container" }, propFilters.map((filter, index) => {
145
+ return (h("div", { key: this.filterId }, h("ul", { class: "multi-filter-list-container" }, propFilters.map(({ filter, index, isDraft }) => {
146
+ var _a;
116
147
  let andOrButton;
117
148
  if (filter.hidden) {
118
149
  return;
119
150
  }
120
151
  // hide toggle button if there is only one filter and the last one
121
- if (index !== this.filterItems[prop].length - 1) {
152
+ if (((_a = visibleFilters[visibleFilterCount - 1]) === null || _a === void 0 ? void 0 : _a.filter.id) !== filter.id) {
122
153
  andOrButton = (h(AndOrButton, { text: filter.relation === 'and' ? capts.and : capts.or, onClick: () => this.toggleFilterAndOr(filter.id) }));
123
154
  }
124
- const extra = this.renderExtra(prop, index);
155
+ const extra = this.renderExtra(prop, index, isDraft);
125
156
  const isDragging = this.draggedFilterId === filter.id;
126
157
  const isDragOver = this.dragOverFilterId === filter.id && !isDragging;
127
- const canReorder = visibleFilterCount > 1;
158
+ const canReorder = visibleFilterCount > 1 && !isDraft;
128
159
  return (h("li", { key: filter.id, class: FILTER_LIST_CLASS, "aria-label": `${capts.filterCondition} ${index + 1}` }, h("div", { class: {
129
160
  'multi-filter-list-row': true,
130
161
  'filter-row-drop-active': this.draggedFilterId !== undefined && !isDragging,
131
162
  'filter-row-dragging': isDragging,
132
163
  'filter-row-drag-over': isDragOver,
133
- } }, canReorder ? (h("button", { type: "button", class: "filter-row-drop-target", tabIndex: -1, "aria-label": `${capts.filterCondition} ${index + 1}`, onDragOver: e => this.onFilterDragOver(e, filter.id), onDragLeave: () => this.onFilterDragLeave(filter.id), onDrop: e => this.onFilterDrop(e, prop, filter.id) })) : '', canReorder ? (h(ReorderButton, { ariaLabel: capts.reorderFilter, dragging: isDragging, dragOver: isDragOver, onDragStart: e => this.onFilterDragStart(e, filter.id), onDragEnd: () => this.onFilterDragEnd(), onKeyDown: e => this.onFilterReorderKeyDown(e, prop, filter.id) })) : '', 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)), extra ? h("div", { class: "filter-extra" }, extra) : ''), h("div", { class: FILTER_LIST_CLASS_ACTION }, andOrButton, h(TrashButton, { ariaLabel: capts.removeFilter, onClick: () => this.onRemoveFilter(filter.id) })))));
134
- })), propFilters.some(f => !f.hidden) ? h("div", { class: "add-filter-divider" }) : ''));
164
+ } }, canReorder ? (h("button", { type: "button", class: "filter-row-drop-target", tabIndex: -1, "aria-label": `${capts.filterCondition} ${index + 1}`, onDragOver: e => this.onFilterDragOver(e, filter.id), onDragLeave: () => this.onFilterDragLeave(filter.id), onDrop: e => this.onFilterDrop(e, prop, filter.id) })) : '', canReorder ? (h(ReorderButton, { ariaLabel: capts.reorderFilter, dragging: isDragging, dragOver: isDragOver, onDragStart: e => this.onFilterDragStart(e, filter.id), onDragEnd: () => this.onFilterDragEnd(), onKeyDown: e => this.onFilterReorderKeyDown(e, prop, filter.id) })) : '', h("div", { class: { 'select-input': true } }, h("select", { class: "select-css select-filter", onChange: e => this.onFilterTypeChange(e, prop, index, isDraft) }, this.renderSelectOptions(filter.type, true)), extra ? h("div", { class: "filter-extra" }, extra) : ''), h("div", { class: FILTER_LIST_CLASS_ACTION }, andOrButton, h(TrashButton, { ariaLabel: capts.removeFilter, onClick: () => this.onRemoveFilter(filter.id) })))));
165
+ })), visibleFilterCount ? h("div", { class: "add-filter-divider" }) : ''));
135
166
  }
136
167
  componentDidRender() {
137
168
  this.syncDialog();
@@ -180,16 +211,24 @@ export class FilterPanel {
180
211
  el.style.left = `${left}px`;
181
212
  el.style.top = `${top}px`;
182
213
  }
183
- onFilterTypeChange(e, prop, index) {
214
+ onFilterTypeChange(e, prop, index, isDraft = false) {
184
215
  if (!(e.target instanceof HTMLSelectElement)) {
185
216
  return;
186
217
  }
187
- this.filterItems[prop][index].type = e.target.value;
218
+ const type = e.target.value;
219
+ const filter = isDraft
220
+ ? this.promoteDraft(prop, type)
221
+ : this.filterItems[prop][index];
222
+ if (!filter) {
223
+ return;
224
+ }
225
+ filter.type = type;
226
+ this.hasChanges = true;
188
227
  // this re-renders the input to know if we need extra input
189
228
  this.filterId++;
190
229
  // adding setTimeout will wait for the next tick DOM update then focus on input
191
230
  setTimeout(() => {
192
- const input = document.getElementById('filter-input-' + this.filterItems[prop][index].id);
231
+ const input = document.getElementById('filter-input-' + filter.id);
193
232
  if (input instanceof HTMLInputElement) {
194
233
  input.focus();
195
234
  }
@@ -224,12 +263,20 @@ export class FilterPanel {
224
263
  return;
225
264
  this.filterId++;
226
265
  this.currentFilterId = this.filterId;
227
- this.filterItems[prop].push({
228
- id: this.currentFilterId,
229
- type: this.currentFilterType,
230
- value: '',
231
- relation: 'and',
232
- });
266
+ if (this.draftFilter) {
267
+ this.draftFilter.id = this.currentFilterId;
268
+ this.draftFilter.type = this.currentFilterType;
269
+ this.promoteDraft(prop);
270
+ }
271
+ else {
272
+ this.filterItems[prop].push({
273
+ id: this.currentFilterId,
274
+ type: this.currentFilterType,
275
+ value: '',
276
+ relation: 'and',
277
+ });
278
+ this.hasChanges = true;
279
+ }
233
280
  // adding setTimeout will wait for the next tick DOM update then focus on input
234
281
  setTimeout(() => {
235
282
  const input = document.getElementById('filter-input-' + this.currentFilterId);
@@ -238,7 +285,9 @@ export class FilterPanel {
238
285
  }, 0);
239
286
  }
240
287
  onSave() {
241
- this.filterChange.emit(this.filterItems);
288
+ if (this.hasChanges) {
289
+ this.emitFilterChange();
290
+ }
242
291
  }
243
292
  onCancel() {
244
293
  this.changes = undefined;
@@ -246,16 +295,25 @@ export class FilterPanel {
246
295
  onReset() {
247
296
  var _a;
248
297
  this.assertChanges();
249
- this.resetChange.emit((_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop);
298
+ this.draftFilter = undefined;
299
+ const prop = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop;
300
+ if (prop !== undefined) {
301
+ delete this.filterItems[prop];
302
+ }
303
+ this.resetChange.emit(prop);
250
304
  // this updates the DOM which is used by getFilterItemsList() key
251
305
  this.filterId++;
252
306
  }
253
307
  onRemoveFilter(id) {
254
- var _a;
308
+ var _a, _b;
255
309
  this.assertChanges();
256
310
  // this is for reactivity issues for getFilterItemsList()
257
311
  this.filterId++;
258
312
  const prop = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop;
313
+ if (((_b = this.draftFilter) === null || _b === void 0 ? void 0 : _b.id) === id) {
314
+ this.draftFilter = undefined;
315
+ return;
316
+ }
259
317
  const items = this.filterItems[prop !== null && prop !== void 0 ? prop : ''];
260
318
  if (!items)
261
319
  return;
@@ -263,6 +321,7 @@ export class FilterPanel {
263
321
  if (index === -1)
264
322
  return;
265
323
  items.splice(index, 1);
324
+ this.hasChanges = true;
266
325
  // let's remove the prop if no more filters so the filter icon will be removed
267
326
  if (items.length === 0)
268
327
  delete this.filterItems[prop !== null && prop !== void 0 ? prop : ''];
@@ -304,6 +363,7 @@ export class FilterPanel {
304
363
  if (!moveFilterItem(items, sourceId, targetId)) {
305
364
  return;
306
365
  }
366
+ this.hasChanges = true;
307
367
  this.filterId++;
308
368
  if (!this.disableDynamicFiltering) {
309
369
  this.debouncedApplyFilter();
@@ -339,6 +399,7 @@ export class FilterPanel {
339
399
  if (!target || !moveFilterItem(items, sourceId, target.id)) {
340
400
  return;
341
401
  }
402
+ this.hasChanges = true;
342
403
  this.filterId++;
343
404
  if (!this.disableDynamicFiltering) {
344
405
  this.debouncedApplyFilter();
@@ -357,6 +418,7 @@ export class FilterPanel {
357
418
  if (index === -1)
358
419
  return;
359
420
  items[index].relation = items[index].relation === 'and' ? 'or' : 'and';
421
+ this.hasChanges = true;
360
422
  if (!this.disableDynamicFiltering) {
361
423
  this.debouncedApplyFilter();
362
424
  }
@@ -405,12 +467,22 @@ export class FilterPanel {
405
467
  }
406
468
  return options;
407
469
  }
408
- renderExtra(prop, index) {
409
- const currentFilter = this.filterItems[prop];
470
+ renderExtra(prop, index, isDraft = false) {
471
+ var _a, _b;
472
+ const currentFilter = isDraft
473
+ ? this.draftFilter
474
+ : (_a = this.filterItems[prop]) === null || _a === void 0 ? void 0 : _a[index];
410
475
  if (!currentFilter)
411
476
  return '';
412
477
  const applyFilter = (value) => {
413
- this.filterItems[prop][index].value = value;
478
+ currentFilter.value = value;
479
+ if (isDraft && !this.isMeaningfulDraftValue(value)) {
480
+ return;
481
+ }
482
+ if (isDraft && !this.promoteDraft(prop)) {
483
+ return;
484
+ }
485
+ this.hasChanges = true;
414
486
  if (!this.disableDynamicFiltering) {
415
487
  this.debouncedApplyFilter();
416
488
  }
@@ -425,11 +497,11 @@ export class FilterPanel {
425
497
  }
426
498
  };
427
499
  const capts = Object.assign(Object.assign({}, this.filterCaptionsInternal), this.filterCaptions);
428
- const extra = this.filterEntities[currentFilter[index].type].extra;
500
+ const extra = (_b = this.filterEntities[currentFilter.type]) === null || _b === void 0 ? void 0 : _b.extra;
429
501
  if (typeof extra === 'function') {
430
502
  return extra(h, {
431
- value: currentFilter[index].value,
432
- filter: currentFilter[index],
503
+ value: currentFilter.value,
504
+ filter: currentFilter,
433
505
  prop,
434
506
  index,
435
507
  placeholder: capts.placeholder,
@@ -444,7 +516,7 @@ export class FilterPanel {
444
516
  if (extra !== 'input' && extra !== 'datepicker') {
445
517
  return '';
446
518
  }
447
- return (h("input", { id: `filter-input-${currentFilter[index].id}`, placeholder: capts.placeholder, type: extra === 'datepicker' ? 'date' : 'text', value: currentFilter[index].value, onInput: (e) => {
519
+ return (h("input", { id: `filter-input-${currentFilter.id}`, placeholder: capts.placeholder, type: extra === 'datepicker' ? 'date' : 'text', value: currentFilter.value, onInput: (e) => {
448
520
  if (e.target instanceof HTMLInputElement) {
449
521
  applyFilter(e.target.value);
450
522
  }
@@ -460,6 +532,42 @@ export class FilterPanel {
460
532
  e.stopPropagation();
461
533
  } }));
462
534
  }
535
+ resolveDraftFilterType(preferred) {
536
+ var _a, _b;
537
+ const available = Object.values((_b = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.filterTypes) !== null && _b !== void 0 ? _b : {}).flat();
538
+ const type = preferred && available.includes(preferred)
539
+ ? preferred
540
+ : available[0];
541
+ return type;
542
+ }
543
+ promoteDraft(prop, type) {
544
+ if (!this.draftFilter) {
545
+ return;
546
+ }
547
+ if (!this.filterItems[prop]) {
548
+ this.filterItems[prop] = [];
549
+ }
550
+ if (type) {
551
+ this.draftFilter.type = type;
552
+ }
553
+ const filter = this.draftFilter;
554
+ this.filterItems[prop].push(filter);
555
+ this.draftFilter = undefined;
556
+ this.hasChanges = true;
557
+ return filter;
558
+ }
559
+ isMeaningfulDraftValue(value) {
560
+ return value !== '' && value !== undefined && value !== null;
561
+ }
562
+ emitFilterChange() {
563
+ this.filterChange.emit(this.cloneFilterItems(this.filterItems));
564
+ }
565
+ cloneFilterItems(filterItems) {
566
+ return Object.fromEntries(Object.entries(filterItems).map(([prop, filters]) => [
567
+ prop,
568
+ filters.map(filter => (Object.assign({}, filter))),
569
+ ]));
570
+ }
463
571
  getAddFilterSelect() {
464
572
  return this.element.querySelector(`#${FILTER_ID}`);
465
573
  }
@@ -492,7 +600,7 @@ export class FilterPanel {
492
600
  top: `${(_d = (_c = this.changes) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : 0}px`,
493
601
  };
494
602
  const capts = Object.assign(Object.assign({}, this.filterCaptionsInternal), this.filterCaptions);
495
- return (h(Host, { key: 'd0e4ebb408750b11b3965da6a25e581733c968e3' }, h("dialog", { key: '3df36777c931ec1063e8574169ca880a99dbfe41', class: "filter-panel-dialog", style: style, ref: el => (this.dialog = el), onCancel: e => {
603
+ return (h(Host, { key: 'f7ec3ca1855a9391b4f270ad7056f9c7a4a0204e' }, h("dialog", { key: 'a5c46aa4822934e7a6eb455fd686513b9101afb4', class: "filter-panel-dialog", style: style, ref: el => (this.dialog = el), onCancel: e => {
496
604
  e.preventDefault();
497
605
  this.onCancel();
498
606
  } }, this.changes && [
@@ -501,7 +609,7 @@ export class FilterPanel {
501
609
  ((_g = this.changes) === null || _g === void 0 ? void 0 : _g.hideDefaultFilters) !== true && [
502
610
  h("label", { key: "filter-title" }, capts.title),
503
611
  h("div", { key: "filter-holder", class: "filter-holder" }, this.getFilterItemsList()),
504
- h("div", { key: "add-filter", class: "add-filter" }, h("select", { key: 'e2a8bd29f2090d3e6c933795427b71ca190b82aa', id: FILTER_ID, class: "select-css", onChange: e => this.onAddNewFilter(e) }, this.renderSelectOptions(this.currentFilterType))),
612
+ h("div", { key: "add-filter", class: "add-filter" }, h("select", { key: '3912f4bd9b1e66fda46e9b6d7c002d29da726345', id: FILTER_ID, class: "select-css", onChange: e => this.onAddNewFilter(e) }, this.renderSelectOptions(this.currentFilterType))),
505
613
  ],
506
614
  h("slot", { key: "default-slot" }),
507
615
  ((_j = (_h = this.changes).extraBottomContent) === null || _j === void 0 ? void 0 : _j.call(_h, this.changes)) || '',
@@ -678,6 +786,7 @@ export class FilterPanel {
678
786
  "currentFilterType": {},
679
787
  "changes": {},
680
788
  "filterItems": {},
789
+ "draftFilter": {},
681
790
  "draggedFilterId": {},
682
791
  "dragOverFilterId": {}
683
792
  };
@@ -5,7 +5,7 @@
5
5
  import { h } from "@stencil/core";
6
6
  import { BasePlugin } from "../base.plugin";
7
7
  import { FILTER_PROP, isFilterBtn } from "./filter.button";
8
- import { filterCoreFunctionsIndexedByType, filterNames, filterTypes, } from "./filter.indexed";
8
+ import { filterCoreFunctionsIndexedByType, filterNames, filterTypeDefaults, filterTypes, } from "./filter.indexed";
9
9
  import { resolveBlankSemantics } from "./filter.blank";
10
10
  import { timeout } from "../../utils";
11
11
  import { ASYNC_FILTER_ROW_THRESHOLD, FILTER_CHUNK_SIZE, FILTER_TIME_BUDGET_MS, } from "./filter.constants";
@@ -30,6 +30,8 @@ export const FILTE_PANEL = 'revogr-filter-panel';
30
30
  *
31
31
  * @property {FilterLocalization|undefined} localization - translation for filter popup captions.
32
32
  *
33
+ * @property {boolean|undefined} defaultFilter - creates a draft condition when an empty filter panel opens. Defaults to true.
34
+ *
33
35
  * @property {boolean|undefined} disableDynamicFiltering - disables dynamic filtering. A way to apply filters on Save only.
34
36
  */
35
37
  /**
@@ -51,7 +53,7 @@ export class FilterPlugin extends BasePlugin {
51
53
  * number: ['eqN', 'neqN', 'gt']
52
54
  * }
53
55
  */
54
- this.filterByType = Object.assign({}, filterTypes);
56
+ this.filterByType = Object.fromEntries(Object.entries(filterTypes).map(([type, filters]) => [type, [...filters]]));
55
57
  this.filterNameIndexByType = Object.assign({}, filterNames);
56
58
  this.filterFunctionsIndexedByType = Object.assign({}, filterCoreFunctionsIndexedByType);
57
59
  this.filterProp = FILTER_PROP;
@@ -135,11 +137,16 @@ export class FilterPlugin extends BasePlugin {
135
137
  return null;
136
138
  }
137
139
  initConfig(config) {
138
- var _a;
140
+ var _a, _b, _c, _d;
139
141
  this.config = config;
140
142
  this.allowDuplicateOperators = (_a = config.allowDuplicateOperators) !== null && _a !== void 0 ? _a : true;
141
143
  if (this.pop) {
142
144
  this.pop.allowDuplicateOperators = this.allowDuplicateOperators;
145
+ this.pop.disableDynamicFiltering =
146
+ (_b = config.disableDynamicFiltering) !== null && _b !== void 0 ? _b : false;
147
+ this.pop.closeOnOutsideClick =
148
+ (_c = config.closeFilterPanelOnOutsideClick) !== null && _c !== void 0 ? _c : true;
149
+ this.pop.filterCaptions = (_d = config.localization) === null || _d === void 0 ? void 0 : _d.captions;
143
150
  }
144
151
  if (config.multiFilterItems) {
145
152
  this.multiFilterItems = Object.assign({}, config.multiFilterItems);
@@ -228,11 +235,12 @@ export class FilterPlugin extends BasePlugin {
228
235
  }
229
236
  // filter button clicked, open filter dialog
230
237
  const buttonPos = (filterButton instanceof HTMLElement ? filterButton : el).getBoundingClientRect();
231
- const data = Object.assign(Object.assign(Object.assign({}, e.detail), this.filterCollection[prop]), { x: buttonPos.x, y: buttonPos.y + buttonPos.height, anchorY: buttonPos.y, autoCorrect: true, filterTypes: this.getColumnFilter(e.detail.filter), filterItems: this.multiFilterItems, extraContent: this.extraHyperContent, extraBottomContent: this.extraBottomHyperContent });
238
+ const data = Object.assign(Object.assign(Object.assign({}, e.detail), this.filterCollection[prop]), { x: buttonPos.x, y: buttonPos.y + buttonPos.height, anchorY: buttonPos.y, autoCorrect: true, filterTypes: this.getColumnFilter(e.detail.filter), defaultFilterType: this.getDefaultFilter(e.detail.filter), showDefaultFilter: this.shouldShowDefaultFilter(e.detail.filter), filterItems: this.multiFilterItems, extraContent: this.extraHyperContent, extraBottomContent: this.extraBottomHyperContent });
232
239
  (_b = this.beforeshow) === null || _b === void 0 ? void 0 : _b.call(this, data);
233
240
  this.pop.show(data);
234
241
  }
235
- getColumnFilter(type) {
242
+ getColumnFilter(config) {
243
+ const type = this.isColumnFilterOption(config) ? config.type : config;
236
244
  let filterType = 'string';
237
245
  if (!type) {
238
246
  return { [filterType]: this.filterByType[filterType] };
@@ -252,6 +260,41 @@ export class FilterPlugin extends BasePlugin {
252
260
  }
253
261
  return { [filterType]: this.filterByType[filterType] };
254
262
  }
263
+ /** Resolve the preferred operator against the column's available filters. */
264
+ getDefaultFilter(config) {
265
+ var _a;
266
+ const filters = this.getColumnFilter(config);
267
+ const availableFilters = Object.values(filters).flat();
268
+ const columnDefault = this.isColumnFilterOption(config)
269
+ ? config.default
270
+ : undefined;
271
+ if (typeof columnDefault === 'string' &&
272
+ availableFilters.includes(columnDefault)) {
273
+ return columnDefault;
274
+ }
275
+ const firstFamily = Object.keys(filters)[0];
276
+ const familyDefault = filterTypeDefaults[firstFamily];
277
+ if (familyDefault && ((_a = filters[firstFamily]) === null || _a === void 0 ? void 0 : _a.includes(familyDefault))) {
278
+ return familyDefault;
279
+ }
280
+ return availableFilters[0];
281
+ }
282
+ /** Resolve grid and column-level draft opt-outs. */
283
+ shouldShowDefaultFilter(config) {
284
+ var _a;
285
+ if (this.isColumnFilterOption(config)) {
286
+ if (config.default === false) {
287
+ return false;
288
+ }
289
+ if (typeof config.default === 'string') {
290
+ return true;
291
+ }
292
+ }
293
+ return ((_a = this.config) === null || _a === void 0 ? void 0 : _a.defaultFilter) !== false;
294
+ }
295
+ isColumnFilterOption(value) {
296
+ return !!value && typeof value === 'object' && !Array.isArray(value);
297
+ }
255
298
  isValidType(type) {
256
299
  return !!(typeof type === 'string' && this.filterByType[type]);
257
300
  }
@@ -112,15 +112,36 @@ revogr-filter-panel .filter-panel-dialog .filter-actions button {
112
112
  }
113
113
  }
114
114
  .rgHeaderCell:hover .rv-filter {
115
- transition: opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
115
+ transition: opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, width 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
116
116
  }
117
- .rgHeaderCell:hover .rv-filter,
117
+ .rgHeaderCell:hover:has(.rv-filter) .header-content, .rgHeaderCell:focus-within:has(.rv-filter) .header-content, .rgHeaderCell:has(.rv-filter.active) .header-content {
118
+ margin-right: 24px;
119
+ }
120
+ .rgHeaderCell:hover:has(.rv-filter):has(.desc) .header-content, .rgHeaderCell:hover:has(.rv-filter):has(.asc) .header-content, .rgHeaderCell:focus-within:has(.rv-filter):has(.desc) .header-content, .rgHeaderCell:focus-within:has(.rv-filter):has(.asc) .header-content, .rgHeaderCell:has(.rv-filter.active):has(.desc) .header-content, .rgHeaderCell:has(.rv-filter.active):has(.asc) .header-content {
121
+ margin-right: 8px;
122
+ padding-right: 24px;
123
+ }
124
+ .rgHeaderCell:hover .rv-filter, .rgHeaderCell:focus-within .rv-filter,
118
125
  .rgHeaderCell .rv-filter.active {
119
126
  opacity: 1;
127
+ width: 24px;
128
+ }
129
+ @media (hover: none), (pointer: coarse) {
130
+ .rgHeaderCell:has(.rv-filter) .header-content {
131
+ margin-right: 24px;
132
+ }
133
+ .rgHeaderCell:has(.rv-filter):has(.desc) .header-content, .rgHeaderCell:has(.rv-filter):has(.asc) .header-content {
134
+ margin-right: 8px;
135
+ padding-right: 24px;
136
+ }
137
+ .rgHeaderCell .rv-filter {
138
+ opacity: 1;
139
+ width: 24px;
140
+ }
120
141
  }
121
142
  .rgHeaderCell .rv-filter {
122
143
  height: 24px;
123
- width: 24px;
144
+ width: 0;
124
145
  background: none;
125
146
  border: 0;
126
147
  opacity: 0;
@@ -129,6 +150,7 @@ revogr-filter-panel .filter-panel-dialog .filter-actions button {
129
150
  border-radius: 4px;
130
151
  position: relative;
131
152
  z-index: 1;
153
+ padding: 0;
132
154
  }
133
155
  .rgHeaderCell .rv-filter.active {
134
156
  color: var(--rg-theme-filter-panel-icon-active);
@@ -10,9 +10,10 @@ const AND_OR_BUTTON = 'and-or-button';
10
10
  const TRASH_BUTTON = 'trash-button';
11
11
  const REORDER_BUTTON = 'reorder-button';
12
12
  const FilterButton = ({ column }) => {
13
- return (h("span", null, h("button", { class: {
13
+ const active = !!(column === null || column === void 0 ? void 0 : column[FILTER_PROP]);
14
+ return (h("span", { class: "filter-button-wrapper" }, h("button", { class: {
14
15
  [FILTER_BUTTON_CLASS]: true,
15
- [FILTER_BUTTON_ACTIVE]: column && !!column[FILTER_PROP],
16
+ [FILTER_BUTTON_ACTIVE]: active,
16
17
  } }, h("svg", { class: "filter-img", viewBox: "0 0 64 64" }, h("g", { stroke: "none", "stroke-width": "1", fill: "none", "fill-rule": "evenodd" }, 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" }))))));
17
18
  };
18
19
  const TrashButton = ({ ariaLabel, onClick }) => {
package/dist/esm/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /*!
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
- import { d as defineTheme, B as BasePlugin } from './row-resize.plugin-DBOgjLdE.js';
5
- export { z as AFTER_ROW_RESIZE_EVENT, A as AutoSizeColumnPlugin, q as BEFORE_COLUMN_DRAG_END_EVENT, x as BEFORE_ROW_RESIZE_EVENT, p as COLUMN_DRAG_END_EVENT, o as COLUMN_DRAG_MOVE_EVENT, s as COLUMN_DRAG_START_EVENT, C as ColumnAutoSizeMode, u as ColumnMovePlugin, k as DEFAULT_BLANK_SEMANTICS, J as DEFAULT_MIN_ROW_HEIGHT, D as DimensionStore, b as ExportCsv, E as ExportFilePlugin, c as FILTER_CONFIG_CHANGED_EVENT, F as FILTER_TRIMMED_TYPE, e as FILTE_PANEL, f as FilterPlugin, G as GroupingRowPlugin, H as ROW_RESIZE_CANCEL_EVENT, y as ROW_RESIZE_EVENT, R as ROW_RESIZE_HANDLE_CLASS, I as RowResizePlugin, S as SelectionStore, P as SortingPlugin, a as StretchColumn, L as clampRowResizeHeight, N as createRowResizePatch, V as defaultCellCompare, W as descCellCompare, m as doCollapse, n as doExpand, g as filterCoreFunctionsIndexedByType, j as filterNames, h as filterTypes, w as getColumnDragPosition, Y as getComparer, v as getLeftRelative, X as getNextOrder, M as getRowResizeIndexes, T as getSortingIndex, Q as hasActiveSorting, l as isBlankValue, i as isStretchPlugin, O as mergeRowResizeDefinitions, r as resolveBlankSemantics, K as resolveRowResizeConfig, U as sortIndexByItems, t as themeTokenCssVariables } from './row-resize.plugin-DBOgjLdE.js';
4
+ import { d as defineTheme, B as BasePlugin } from './row-resize.plugin-Beu0pMds.js';
5
+ export { H as AFTER_ROW_RESIZE_EVENT, A as AutoSizeColumnPlugin, s as BEFORE_COLUMN_DRAG_END_EVENT, y as BEFORE_ROW_RESIZE_EVENT, q as COLUMN_DRAG_END_EVENT, p as COLUMN_DRAG_MOVE_EVENT, u as COLUMN_DRAG_START_EVENT, C as ColumnAutoSizeMode, v as ColumnMovePlugin, l as DEFAULT_BLANK_SEMANTICS, K as DEFAULT_MIN_ROW_HEIGHT, D as DimensionStore, b as ExportCsv, E as ExportFilePlugin, c as FILTER_CONFIG_CHANGED_EVENT, F as FILTER_TRIMMED_TYPE, e as FILTE_PANEL, f as FilterPlugin, G as GroupingRowPlugin, I as ROW_RESIZE_CANCEL_EVENT, z as ROW_RESIZE_EVENT, R as ROW_RESIZE_HANDLE_CLASS, J as RowResizePlugin, S as SelectionStore, Q as SortingPlugin, a as StretchColumn, M as clampRowResizeHeight, O as createRowResizePatch, W as defaultCellCompare, X as descCellCompare, n as doCollapse, o as doExpand, g as filterCoreFunctionsIndexedByType, k as filterNames, j as filterTypeDefaults, h as filterTypes, x as getColumnDragPosition, Z as getComparer, w as getLeftRelative, Y as getNextOrder, N as getRowResizeIndexes, U as getSortingIndex, T as hasActiveSorting, m as isBlankValue, i as isStretchPlugin, P as mergeRowResizeDefinitions, r as resolveBlankSemantics, L as resolveRowResizeConfig, V as sortIndexByItems, t as themeTokenCssVariables } from './row-resize.plugin-Beu0pMds.js';
6
6
  export { B as BEFORE_GROUPING_APPLY_EVENT, o as GROUPING_ROW_TYPE, j as GROUP_COLUMN_PROP, G as GROUP_DEPTH, h as GROUP_EXPANDED, l as GROUP_EXPAND_BTN, m as GROUP_EXPAND_EVENT, k as GROUP_ORIGINAL_INDEX, f as PSEUDO_GROUP_COLUMN, P as PSEUDO_GROUP_ITEM, d as PSEUDO_GROUP_ITEM_ID, e as PSEUDO_GROUP_ITEM_VALUE, c as columnTypes, a as cropCellToMax, I as gatherGroup, s as gatherGrouping, z as getCellData, C as getCellDataParsed, A as getCellRaw, J as getColumnByProp, E as getColumnSizes, D as getColumnType, H as getColumns, q as getExpanded, t as getGroupingName, x as getParsedGroup, g as getRange, p as getSource, F as isColGrouping, u as isGrouping, v as isGroupingColumn, b as isRangeSingleCell, i as isRowType, y as isSameGroup, w as measureEqualDepth, n as nextCell, r as rowTypes } from './column.service-pu_fdQ0S.js';
7
7
  export { d as dispatch, a as dispatchByEvent } from './header-cell-renderer-YCiVIQ2E.js';
8
8
  export { C as CellRenderer, G as GroupingRowRenderer, S as SortingSign, e as expandEvent, a as expandSvgIconVNode, r as renderGroupCells } from './cell-renderer-D9ze8OJw.js';
@@ -12,7 +12,7 @@ export { k as isAll, c as isClear, h as isCopy, a as isCtrlKey, b as isCtrlMetaK
12
12
  export { h } from './index-CtimkLsB.js';
13
13
  export { C as CELL_CLASS, A as CELL_HANDLER_CLASS, n as DATA_COL, o as DATA_ROW, q as DISABLED_CLASS, y as DRAGGABLE_CLASS, B as DRAGG_TEXT, x as DRAG_ICON_CLASS, D as DataStore, E as EDIT_INPUT_WR, F as FOCUS_CLASS, G as GRID_INTERNALS, w as HEADER_ACTUAL_ROW_CLASS, H as HEADER_CLASS, v as HEADER_ROW_CLASS, u as HEADER_SORTABLE_CLASS, M as MIN_COL_SIZE, z as MOBILE_CLASS, R as RESIZE_INTERVAL, I as ROW_FOCUSED_CLASS, r as ROW_HEADER_TYPE, S as SELECTION_BORDER_CLASS, T as TMP_SELECTION_BG_CLASS, j as calculateDimensionData, J as codesLetter, h as gatherTrimmedItems, l as getItemByIndex, k as getItemByPosition, g as getPhysical, b as getSourceItem, f as getSourceItemVirtualIndexByProp, c as getSourcePhysicalIndex, i as getVisibleItems, a as getVisibleSourceItem, K as keyValues, p as proxyPlugin, e as setItems, d as setSourceByPhysicalIndex, s as setSourceByVirtualIndex, m as setStore, t as trimmedPlugin } from './dimension.helpers-Cln9sALu.js';
14
14
  export { V as ViewportStore, b as addMissingItems, j as calculateRowHeaderSize, c as clampViewportCoordinate, f as getFirstItem, d as getItems, h as getLastItem, a as getUpdatedItemsByPosition, g as getViewportMaxCoordinate, i as isActiveRange, e as isActiveRangeOutsideLastItem, r as recombineByOffset, s as setItemSizes, u as updateMissingAndRange } from './viewport.store-DWMKRDSH.js';
15
- export { A as AND_OR_BUTTON, e as AndOrButton, a as FILTER_BUTTON_ACTIVE, F as FILTER_BUTTON_CLASS, b as FILTER_PROP, c as FilterButton, R as REORDER_BUTTON, f as ReorderButton, T as TRASH_BUTTON, d as TrashButton, i as isFilterBtn } from './filter.button-DMhpuAiw.js';
15
+ export { A as AND_OR_BUTTON, e as AndOrButton, a as FILTER_BUTTON_ACTIVE, F as FILTER_BUTTON_CLASS, b as FILTER_PROP, c as FilterButton, R as REORDER_BUTTON, f as ReorderButton, T as TRASH_BUTTON, d as TrashButton, i as isFilterBtn } from './filter.button-CEPUxLUo.js';
16
16
  import './debounce-PCRWZliA.js';
17
17
 
18
18
  const REVOGRID_EVENTS = new Map([
@@ -8,7 +8,7 @@ import { g as globalScripts } from './app-globals-CA4dvSNd.js';
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await globalScripts();
11
- return bootstrapLazy([["revo-grid",[[260,"revo-grid",{"rowHeaders":[4,"row-headers"],"frameSize":[2,"frame-size"],"rowSize":[2,"row-size"],"colSize":[2,"col-size"],"range":[4],"readonly":[4],"resize":[4],"resizeRow":[4,"resize-row"],"noHorizontalScrollTransfer":[4,"no-horizontal-scroll-transfer"],"canFocus":[4,"can-focus"],"useClipboard":[4,"use-clipboard"],"columns":[16],"source":[16],"pinnedTopSource":[16],"pinnedBottomSource":[16],"rowDefinitions":[16],"editors":[16],"applyOnClose":[4,"apply-on-close"],"plugins":[16],"columnTypes":[16],"theme":[1537],"themeDefinitions":[16],"rowClass":[513,"row-class"],"autoSizeColumn":[4,"auto-size-column"],"filter":[4],"sorting":[16],"focusTemplate":[16],"canMoveColumns":[4,"can-move-columns"],"trimmedRows":[16],"exporting":[4],"grouping":[16],"stretch":[8],"additionalData":[16],"disableVirtualX":[4,"disable-virtual-x"],"virtualX":[16],"disableVirtualY":[4,"disable-virtual-y"],"hideAttribution":[4,"hide-attribution"],"jobsBeforeRender":[16],"registerVNode":[16],"accessible":[4],"rtl":[4],"canDrag":[4,"can-drag"],"refresh":[64],"setDataAt":[64],"scrollToRow":[64],"scrollToColumnIndex":[64],"scrollToColumnProp":[64],"updateColumns":[64],"addTrimmed":[64],"scrollToCoordinate":[64],"setCellEdit":[64],"setCellsFocus":[64],"getSource":[64],"getVisibleSource":[64],"getSourceStore":[64],"getColumnStore":[64],"updateColumnSorting":[64],"clearSorting":[64],"getColumns":[64],"clearFocus":[64],"getPlugins":[64],"getFocused":[64],"getContentSize":[64],"getSelectedRange":[64],"refreshExtraElements":[64],"getProviders":[64]},[[5,"touchstart","mousedownHandle"],[5,"mousedown","mousedownHandle"],[5,"touchend","mouseupHandle"],[5,"mouseup","mouseupHandle"],[0,"rowdragstartinit","onRowDragStarted"],[0,"rowdragendinit","onRowDragEnd"],[0,"roworderchange","onRowOrderChange"],[0,"rowdragmoveinit","onRowDrag"],[0,"rowdragmousemove","onRowMouseMove"],[0,"celleditapply","onCellEdit"],[0,"rangeeditapply","onRangeEdit"],[0,"selectionchangeinit","onRangeChanged"],[0,"rowdropinit","onRowDropped"],[0,"beforeheaderclick","onHeaderClick"],[0,"beforecellfocusinit","onCellFocus"]],{"columnTypes":[{"columnTypesChanged":0}],"columns":[{"columnChanged":0}],"disableVirtualX":[{"disableVirtualXChanged":0}],"virtualX":[{"virtualXChanged":0}],"rowSize":[{"rowSizeChanged":0}],"colSize":[{"colSizeChanged":0}],"theme":[{"themeChanged":0}],"themeDefinitions":[{"themeDefinitionsChanged":0}],"source":[{"dataSourceChanged":0}],"pinnedBottomSource":[{"dataSourceChanged":0}],"pinnedTopSource":[{"dataSourceChanged":0}],"disableVirtualY":[{"disableVirtualYChanged":0}],"rowDefinitions":[{"rowDefChanged":0}],"trimmedRows":[{"trimmedRowsChanged":0}],"grouping":[{"groupingChanged":0}],"stretch":[{"applyStretch":0}],"filter":[{"applyFilter":0}],"sorting":[{"applySorting":0}],"rowHeaders":[{"rowHeadersChange":0}],"resizeRow":[{"resizeRowChanged":0}],"registerVNode":[{"registerOutsideVNodes":0}],"additionalData":[{"additionalDataChanged":0}],"rtl":[{"rtlChanged":0}],"plugins":[{"pluginsChanged":0}]}]]],["revogr-filter-panel",[[260,"revogr-filter-panel",{"filterNames":[16],"filterEntities":[16],"filterCaptions":[16],"disableDynamicFiltering":[4,"disable-dynamic-filtering"],"closeOnOutsideClick":[4,"close-on-outside-click"],"allowDuplicateOperators":[4,"allow-duplicate-operators"],"isFilterIdSet":[32],"filterId":[32],"currentFilterId":[32],"currentFilterType":[32],"changes":[32],"filterItems":[32],"draggedFilterId":[32],"dragOverFilterId":[32],"show":[64],"getChanges":[64]},[[5,"mousedown","onMouseDown"]]]]],["revogr-clipboard_3",[[0,"revogr-clipboard",{"readonly":[4],"doCopy":[64]},[[4,"paste","onPaste"],[4,"copy","copyStarted"],[4,"cut","cutStarted"]]],[0,"revogr-edit",{"editCell":[16],"column":[16],"editor":[16],"saveOnClose":[4,"save-on-close"],"additionalData":[8,"additional-data"],"cancelChanges":[64],"beforeDisconnect":[64]}],[0,"revogr-order-editor",{"parent":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"rowType":[1,"row-type"],"dragStart":[64],"endOrder":[64],"clearOrder":[64]}]]],["revogr-data_4",[[260,"revogr-data",{"readonly":[4],"range":[4],"rowClass":[1,"row-class"],"additionalData":[8,"additional-data"],"rowSelectionStore":[16],"viewportRow":[16],"viewportCol":[16],"dimensionRow":[16],"colData":[16],"dataStore":[16],"type":[513],"colType":[513,"col-type"],"jobsBeforeRender":[16],"providers":[32],"updateCell":[64]},null,{"dataStore":[{"onDataStoreChange":0}],"colData":[{"onColDataChange":0}]}],[0,"revogr-header",{"viewportCol":[16],"dimensionCol":[16],"selectionStore":[16],"groups":[16],"groupingDepth":[2,"grouping-depth"],"readonly":[4],"canResize":[4,"can-resize"],"resizeHandler":[16],"colData":[16],"columnFilter":[4,"column-filter"],"type":[1],"additionalData":[8,"additional-data"]}],[260,"revogr-viewport-scroll",{"rowHeader":[4,"row-header"],"contentWidth":[2,"content-width"],"contentHeight":[2,"content-height"],"colType":[1,"col-type"],"noHorizontalScrollTransfer":[4,"no-horizontal-scroll-transfer"],"setScroll":[64],"changeScroll":[64],"applyScroll":[64]},[[0,"mousewheel-vertical","mousewheelVertical"],[0,"mousewheel-horizontal","mousewheelHorizontal"],[0,"scroll-coordinate","scrollApply"]]],[0,"vnode-html",{"redraw":[16]}]]],["revogr-attribution_7",[[0,"revogr-row-headers",{"height":[2],"dataPorts":[16],"headerProp":[16],"rowClass":[1,"row-class"],"resize":[4],"rowHeaderColumn":[16],"additionalData":[8,"additional-data"],"jobsBeforeRender":[16]}],[260,"revogr-overlay-selection",{"readonly":[4],"range":[4],"canDrag":[4,"can-drag"],"useClipboard":[4,"use-clipboard"],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"colData":[16],"lastCell":[16],"editors":[16],"applyChangesOnClose":[4,"apply-changes-on-close"],"additionalData":[8,"additional-data"],"isMobileDevice":[4,"is-mobile-device"]},[[5,"touchmove","onMouseMove"],[5,"mousemove","onMouseMove"],[5,"touchend","onMouseUp"],[5,"mouseup","onMouseUp"],[5,"mouseleave","onMouseUp"],[0,"dragstartcell","onCellDrag"],[4,"keyup","onKeyUp"],[4,"keydown","onKeyDown"]],{"selectionStore":[{"selectionServiceSet":0}],"dimensionRow":[{"createAutoFillService":0}],"dimensionCol":[{"createAutoFillService":0}],"dataStore":[{"columnServiceSet":0}],"colData":[{"columnServiceSet":0}]}],[0,"revogr-attribution"],[260,"revogr-focus",{"colType":[1,"col-type"],"rowType":[1,"row-type"],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"colData":[16],"focusTemplate":[16]}],[0,"revogr-scroll-virtual",{"dimension":[1],"realSize":[2,"real-size"],"virtualSize":[2,"virtual-size"],"clientSize":[2,"client-size"],"setScroll":[64],"changeScroll":[64]}],[0,"revogr-temp-range",{"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16]}],[0,"revogr-extra",{"nodes":[16],"update":[32],"refresh":[64]}]]]], options);
11
+ return bootstrapLazy([["revo-grid",[[260,"revo-grid",{"rowHeaders":[4,"row-headers"],"frameSize":[2,"frame-size"],"rowSize":[2,"row-size"],"colSize":[2,"col-size"],"range":[4],"readonly":[4],"resize":[4],"resizeRow":[4,"resize-row"],"noHorizontalScrollTransfer":[4,"no-horizontal-scroll-transfer"],"canFocus":[4,"can-focus"],"useClipboard":[4,"use-clipboard"],"columns":[16],"source":[16],"pinnedTopSource":[16],"pinnedBottomSource":[16],"rowDefinitions":[16],"editors":[16],"applyOnClose":[4,"apply-on-close"],"plugins":[16],"columnTypes":[16],"theme":[1537],"themeDefinitions":[16],"rowClass":[513,"row-class"],"autoSizeColumn":[4,"auto-size-column"],"filter":[4],"sorting":[16],"focusTemplate":[16],"canMoveColumns":[4,"can-move-columns"],"trimmedRows":[16],"exporting":[4],"grouping":[16],"stretch":[8],"additionalData":[16],"disableVirtualX":[4,"disable-virtual-x"],"virtualX":[16],"disableVirtualY":[4,"disable-virtual-y"],"hideAttribution":[4,"hide-attribution"],"jobsBeforeRender":[16],"registerVNode":[16],"accessible":[4],"rtl":[4],"canDrag":[4,"can-drag"],"refresh":[64],"setDataAt":[64],"scrollToRow":[64],"scrollToColumnIndex":[64],"scrollToColumnProp":[64],"updateColumns":[64],"addTrimmed":[64],"scrollToCoordinate":[64],"setCellEdit":[64],"setCellsFocus":[64],"getSource":[64],"getVisibleSource":[64],"getSourceStore":[64],"getColumnStore":[64],"updateColumnSorting":[64],"clearSorting":[64],"getColumns":[64],"clearFocus":[64],"getPlugins":[64],"getFocused":[64],"getContentSize":[64],"getSelectedRange":[64],"refreshExtraElements":[64],"getProviders":[64]},[[5,"touchstart","mousedownHandle"],[5,"mousedown","mousedownHandle"],[5,"touchend","mouseupHandle"],[5,"mouseup","mouseupHandle"],[0,"rowdragstartinit","onRowDragStarted"],[0,"rowdragendinit","onRowDragEnd"],[0,"roworderchange","onRowOrderChange"],[0,"rowdragmoveinit","onRowDrag"],[0,"rowdragmousemove","onRowMouseMove"],[0,"celleditapply","onCellEdit"],[0,"rangeeditapply","onRangeEdit"],[0,"selectionchangeinit","onRangeChanged"],[0,"rowdropinit","onRowDropped"],[0,"beforeheaderclick","onHeaderClick"],[0,"beforecellfocusinit","onCellFocus"]],{"columnTypes":[{"columnTypesChanged":0}],"columns":[{"columnChanged":0}],"disableVirtualX":[{"disableVirtualXChanged":0}],"virtualX":[{"virtualXChanged":0}],"rowSize":[{"rowSizeChanged":0}],"colSize":[{"colSizeChanged":0}],"theme":[{"themeChanged":0}],"themeDefinitions":[{"themeDefinitionsChanged":0}],"source":[{"dataSourceChanged":0}],"pinnedBottomSource":[{"dataSourceChanged":0}],"pinnedTopSource":[{"dataSourceChanged":0}],"disableVirtualY":[{"disableVirtualYChanged":0}],"rowDefinitions":[{"rowDefChanged":0}],"trimmedRows":[{"trimmedRowsChanged":0}],"grouping":[{"groupingChanged":0}],"stretch":[{"applyStretch":0}],"filter":[{"applyFilter":0}],"sorting":[{"applySorting":0}],"rowHeaders":[{"rowHeadersChange":0}],"resizeRow":[{"resizeRowChanged":0}],"registerVNode":[{"registerOutsideVNodes":0}],"additionalData":[{"additionalDataChanged":0}],"rtl":[{"rtlChanged":0}],"plugins":[{"pluginsChanged":0}]}]]],["revogr-filter-panel",[[260,"revogr-filter-panel",{"filterNames":[16],"filterEntities":[16],"filterCaptions":[16],"disableDynamicFiltering":[4,"disable-dynamic-filtering"],"closeOnOutsideClick":[4,"close-on-outside-click"],"allowDuplicateOperators":[4,"allow-duplicate-operators"],"isFilterIdSet":[32],"filterId":[32],"currentFilterId":[32],"currentFilterType":[32],"changes":[32],"filterItems":[32],"draftFilter":[32],"draggedFilterId":[32],"dragOverFilterId":[32],"show":[64],"getChanges":[64]},[[5,"mousedown","onMouseDown"]]]]],["revogr-clipboard_3",[[0,"revogr-clipboard",{"readonly":[4],"doCopy":[64]},[[4,"paste","onPaste"],[4,"copy","copyStarted"],[4,"cut","cutStarted"]]],[0,"revogr-edit",{"editCell":[16],"column":[16],"editor":[16],"saveOnClose":[4,"save-on-close"],"additionalData":[8,"additional-data"],"cancelChanges":[64],"beforeDisconnect":[64]}],[0,"revogr-order-editor",{"parent":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"rowType":[1,"row-type"],"dragStart":[64],"endOrder":[64],"clearOrder":[64]}]]],["revogr-data_4",[[260,"revogr-data",{"readonly":[4],"range":[4],"rowClass":[1,"row-class"],"additionalData":[8,"additional-data"],"rowSelectionStore":[16],"viewportRow":[16],"viewportCol":[16],"dimensionRow":[16],"colData":[16],"dataStore":[16],"type":[513],"colType":[513,"col-type"],"jobsBeforeRender":[16],"providers":[32],"updateCell":[64]},null,{"dataStore":[{"onDataStoreChange":0}],"colData":[{"onColDataChange":0}]}],[0,"revogr-header",{"viewportCol":[16],"dimensionCol":[16],"selectionStore":[16],"groups":[16],"groupingDepth":[2,"grouping-depth"],"readonly":[4],"canResize":[4,"can-resize"],"resizeHandler":[16],"colData":[16],"columnFilter":[4,"column-filter"],"type":[1],"additionalData":[8,"additional-data"]}],[260,"revogr-viewport-scroll",{"rowHeader":[4,"row-header"],"contentWidth":[2,"content-width"],"contentHeight":[2,"content-height"],"colType":[1,"col-type"],"noHorizontalScrollTransfer":[4,"no-horizontal-scroll-transfer"],"setScroll":[64],"changeScroll":[64],"applyScroll":[64]},[[0,"mousewheel-vertical","mousewheelVertical"],[0,"mousewheel-horizontal","mousewheelHorizontal"],[0,"scroll-coordinate","scrollApply"]]],[0,"vnode-html",{"redraw":[16]}]]],["revogr-attribution_7",[[0,"revogr-row-headers",{"height":[2],"dataPorts":[16],"headerProp":[16],"rowClass":[1,"row-class"],"resize":[4],"rowHeaderColumn":[16],"additionalData":[8,"additional-data"],"jobsBeforeRender":[16]}],[260,"revogr-overlay-selection",{"readonly":[4],"range":[4],"canDrag":[4,"can-drag"],"useClipboard":[4,"use-clipboard"],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"colData":[16],"lastCell":[16],"editors":[16],"applyChangesOnClose":[4,"apply-changes-on-close"],"additionalData":[8,"additional-data"],"isMobileDevice":[4,"is-mobile-device"]},[[5,"touchmove","onMouseMove"],[5,"mousemove","onMouseMove"],[5,"touchend","onMouseUp"],[5,"mouseup","onMouseUp"],[5,"mouseleave","onMouseUp"],[0,"dragstartcell","onCellDrag"],[4,"keyup","onKeyUp"],[4,"keydown","onKeyDown"]],{"selectionStore":[{"selectionServiceSet":0}],"dimensionRow":[{"createAutoFillService":0}],"dimensionCol":[{"createAutoFillService":0}],"dataStore":[{"columnServiceSet":0}],"colData":[{"columnServiceSet":0}]}],[0,"revogr-attribution"],[260,"revogr-focus",{"colType":[1,"col-type"],"rowType":[1,"row-type"],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"colData":[16],"focusTemplate":[16]}],[0,"revogr-scroll-virtual",{"dimension":[1],"realSize":[2,"real-size"],"virtualSize":[2,"virtual-size"],"clientSize":[2,"client-size"],"setScroll":[64],"changeScroll":[64]}],[0,"revogr-temp-range",{"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16]}],[0,"revogr-extra",{"nodes":[16],"update":[32],"refresh":[64]}]]]], options);
12
12
  };
13
13
 
14
14
  export { defineCustomElements };