@revolist/revogrid 4.27.1 → 4.27.2
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.
- package/dist/cjs/{filter.button-F2Bw3UAd.js → filter.button-C6ixuMmr.js} +3 -2
- package/dist/cjs/index.cjs.js +3 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/revo-grid.cjs.entry.js +3 -3
- package/dist/cjs/revo-grid.cjs.js +1 -1
- package/dist/cjs/revogr-data_4.cjs.entry.js +9 -8
- package/dist/cjs/revogr-filter-panel.cjs.entry.js +139 -33
- package/dist/cjs/{row-resize.plugin-sK9_rcUN.js → row-resize.plugin-C4YOF1lN.js} +54 -5
- package/dist/collection/components/header/header-renderer.js +7 -6
- package/dist/collection/components/header/revogr-header-style.css +8 -3
- package/dist/collection/components/revoGrid/revo-grid-style.css +12 -2
- package/dist/collection/plugins/filter/filter.button.js +3 -2
- package/dist/collection/plugins/filter/filter.indexed.js +5 -0
- package/dist/collection/plugins/filter/filter.panel.js +138 -31
- package/dist/collection/plugins/filter/filter.plugin.js +48 -5
- package/dist/collection/plugins/filter/filter.style.css +25 -3
- package/dist/{revo-grid/filter.button-DMhpuAiw.js → esm/filter.button-CEPUxLUo.js} +3 -2
- package/dist/esm/index.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/revo-grid.entry.js +3 -3
- package/dist/esm/revo-grid.js +1 -1
- package/dist/esm/revogr-data_4.entry.js +9 -8
- package/dist/esm/revogr-filter-panel.entry.js +139 -33
- package/dist/{revo-grid/row-resize.plugin-DBOgjLdE.js → esm/row-resize.plugin-Beu0pMds.js} +54 -6
- package/dist/{esm/filter.button-DMhpuAiw.js → revo-grid/filter.button-CEPUxLUo.js} +3 -2
- package/dist/revo-grid/index.esm.js +3 -3
- package/dist/revo-grid/revo-grid.entry.js +3 -3
- package/dist/revo-grid/revo-grid.esm.js +1 -1
- package/dist/revo-grid/revogr-data_4.entry.js +9 -8
- package/dist/revo-grid/revogr-filter-panel.entry.js +139 -33
- package/dist/{esm/row-resize.plugin-DBOgjLdE.js → revo-grid/row-resize.plugin-Beu0pMds.js} +54 -6
- package/dist/types/plugins/filter/filter.indexed.d.ts +2 -0
- package/dist/types/plugins/filter/filter.panel.d.ts +9 -2
- package/dist/types/plugins/filter/filter.plugin.d.ts +8 -1
- package/dist/types/plugins/filter/filter.types.d.ts +8 -0
- package/dist/types/types/interfaces.d.ts +13 -1
- package/hydrate/index.js +203 -46
- package/hydrate/index.mjs +203 -46
- package/package.json +1 -1
- package/standalone/filter.button.js +1 -1
- package/standalone/index.js +1 -1
- package/standalone/revo-grid.js +1 -1
- package/standalone/revogr-filter-panel.js +1 -1
- 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.
|
|
59
|
+
this.emitFilterChange();
|
|
59
60
|
}, 400);
|
|
60
61
|
}
|
|
61
62
|
onMouseDown(e) {
|
|
@@ -85,10 +86,25 @@ 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) && this.changes.showDefaultFilter !== false) {
|
|
98
|
+
const type = this.resolveDraftFilterType(this.changes.defaultFilterType);
|
|
99
|
+
if (type) {
|
|
100
|
+
this.draftFilter = {
|
|
101
|
+
id: ++this.filterId,
|
|
102
|
+
type,
|
|
103
|
+
value: '',
|
|
104
|
+
relation: 'and',
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
}
|
|
92
108
|
}
|
|
93
109
|
}
|
|
94
110
|
async getChanges() {
|
|
@@ -109,29 +125,42 @@ export class FilterPanel {
|
|
|
109
125
|
const prop = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop;
|
|
110
126
|
if (prop === undefined)
|
|
111
127
|
return '';
|
|
112
|
-
const propFilters = (_b = this.filterItems[prop]) !== null && _b !== void 0 ? _b : []
|
|
113
|
-
|
|
128
|
+
const propFilters = ((_b = this.filterItems[prop]) !== null && _b !== void 0 ? _b : []).map((filter, index) => ({
|
|
129
|
+
filter,
|
|
130
|
+
index,
|
|
131
|
+
isDraft: false,
|
|
132
|
+
}));
|
|
133
|
+
if (this.draftFilter) {
|
|
134
|
+
propFilters.push({
|
|
135
|
+
filter: this.draftFilter,
|
|
136
|
+
index: propFilters.length,
|
|
137
|
+
isDraft: true,
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
const visibleFilters = propFilters.filter(({ filter }) => !filter.hidden);
|
|
141
|
+
const visibleFilterCount = visibleFilters.length;
|
|
114
142
|
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) => {
|
|
143
|
+
return (h("div", { key: this.filterId }, h("ul", { class: "multi-filter-list-container" }, propFilters.map(({ filter, index, isDraft }) => {
|
|
144
|
+
var _a;
|
|
116
145
|
let andOrButton;
|
|
117
146
|
if (filter.hidden) {
|
|
118
147
|
return;
|
|
119
148
|
}
|
|
120
149
|
// hide toggle button if there is only one filter and the last one
|
|
121
|
-
if (
|
|
150
|
+
if (((_a = visibleFilters[visibleFilterCount - 1]) === null || _a === void 0 ? void 0 : _a.filter.id) !== filter.id) {
|
|
122
151
|
andOrButton = (h(AndOrButton, { text: filter.relation === 'and' ? capts.and : capts.or, onClick: () => this.toggleFilterAndOr(filter.id) }));
|
|
123
152
|
}
|
|
124
|
-
const extra = this.renderExtra(prop, index);
|
|
153
|
+
const extra = this.renderExtra(prop, index, isDraft);
|
|
125
154
|
const isDragging = this.draggedFilterId === filter.id;
|
|
126
155
|
const isDragOver = this.dragOverFilterId === filter.id && !isDragging;
|
|
127
|
-
const canReorder = visibleFilterCount > 1;
|
|
156
|
+
const canReorder = visibleFilterCount > 1 && !isDraft;
|
|
128
157
|
return (h("li", { key: filter.id, class: FILTER_LIST_CLASS, "aria-label": `${capts.filterCondition} ${index + 1}` }, h("div", { class: {
|
|
129
158
|
'multi-filter-list-row': true,
|
|
130
159
|
'filter-row-drop-active': this.draggedFilterId !== undefined && !isDragging,
|
|
131
160
|
'filter-row-dragging': isDragging,
|
|
132
161
|
'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(
|
|
134
|
-
})),
|
|
162
|
+
} }, 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) })))));
|
|
163
|
+
})), visibleFilterCount ? h("div", { class: "add-filter-divider" }) : ''));
|
|
135
164
|
}
|
|
136
165
|
componentDidRender() {
|
|
137
166
|
this.syncDialog();
|
|
@@ -180,16 +209,24 @@ export class FilterPanel {
|
|
|
180
209
|
el.style.left = `${left}px`;
|
|
181
210
|
el.style.top = `${top}px`;
|
|
182
211
|
}
|
|
183
|
-
onFilterTypeChange(e, prop, index) {
|
|
212
|
+
onFilterTypeChange(e, prop, index, isDraft = false) {
|
|
184
213
|
if (!(e.target instanceof HTMLSelectElement)) {
|
|
185
214
|
return;
|
|
186
215
|
}
|
|
187
|
-
|
|
216
|
+
const type = e.target.value;
|
|
217
|
+
const filter = isDraft
|
|
218
|
+
? this.promoteDraft(prop, type)
|
|
219
|
+
: this.filterItems[prop][index];
|
|
220
|
+
if (!filter) {
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
filter.type = type;
|
|
224
|
+
this.hasChanges = true;
|
|
188
225
|
// this re-renders the input to know if we need extra input
|
|
189
226
|
this.filterId++;
|
|
190
227
|
// adding setTimeout will wait for the next tick DOM update then focus on input
|
|
191
228
|
setTimeout(() => {
|
|
192
|
-
const input = document.getElementById('filter-input-' +
|
|
229
|
+
const input = document.getElementById('filter-input-' + filter.id);
|
|
193
230
|
if (input instanceof HTMLInputElement) {
|
|
194
231
|
input.focus();
|
|
195
232
|
}
|
|
@@ -224,12 +261,20 @@ export class FilterPanel {
|
|
|
224
261
|
return;
|
|
225
262
|
this.filterId++;
|
|
226
263
|
this.currentFilterId = this.filterId;
|
|
227
|
-
this.
|
|
228
|
-
id
|
|
229
|
-
type
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
264
|
+
if (this.draftFilter) {
|
|
265
|
+
this.draftFilter.id = this.currentFilterId;
|
|
266
|
+
this.draftFilter.type = this.currentFilterType;
|
|
267
|
+
this.promoteDraft(prop);
|
|
268
|
+
}
|
|
269
|
+
else {
|
|
270
|
+
this.filterItems[prop].push({
|
|
271
|
+
id: this.currentFilterId,
|
|
272
|
+
type: this.currentFilterType,
|
|
273
|
+
value: '',
|
|
274
|
+
relation: 'and',
|
|
275
|
+
});
|
|
276
|
+
this.hasChanges = true;
|
|
277
|
+
}
|
|
233
278
|
// adding setTimeout will wait for the next tick DOM update then focus on input
|
|
234
279
|
setTimeout(() => {
|
|
235
280
|
const input = document.getElementById('filter-input-' + this.currentFilterId);
|
|
@@ -238,7 +283,9 @@ export class FilterPanel {
|
|
|
238
283
|
}, 0);
|
|
239
284
|
}
|
|
240
285
|
onSave() {
|
|
241
|
-
|
|
286
|
+
if (this.hasChanges) {
|
|
287
|
+
this.emitFilterChange();
|
|
288
|
+
}
|
|
242
289
|
}
|
|
243
290
|
onCancel() {
|
|
244
291
|
this.changes = undefined;
|
|
@@ -246,16 +293,25 @@ export class FilterPanel {
|
|
|
246
293
|
onReset() {
|
|
247
294
|
var _a;
|
|
248
295
|
this.assertChanges();
|
|
249
|
-
this.
|
|
296
|
+
this.draftFilter = undefined;
|
|
297
|
+
const prop = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop;
|
|
298
|
+
if (prop !== undefined) {
|
|
299
|
+
delete this.filterItems[prop];
|
|
300
|
+
}
|
|
301
|
+
this.resetChange.emit(prop);
|
|
250
302
|
// this updates the DOM which is used by getFilterItemsList() key
|
|
251
303
|
this.filterId++;
|
|
252
304
|
}
|
|
253
305
|
onRemoveFilter(id) {
|
|
254
|
-
var _a;
|
|
306
|
+
var _a, _b;
|
|
255
307
|
this.assertChanges();
|
|
256
308
|
// this is for reactivity issues for getFilterItemsList()
|
|
257
309
|
this.filterId++;
|
|
258
310
|
const prop = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop;
|
|
311
|
+
if (((_b = this.draftFilter) === null || _b === void 0 ? void 0 : _b.id) === id) {
|
|
312
|
+
this.draftFilter = undefined;
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
259
315
|
const items = this.filterItems[prop !== null && prop !== void 0 ? prop : ''];
|
|
260
316
|
if (!items)
|
|
261
317
|
return;
|
|
@@ -263,6 +319,7 @@ export class FilterPanel {
|
|
|
263
319
|
if (index === -1)
|
|
264
320
|
return;
|
|
265
321
|
items.splice(index, 1);
|
|
322
|
+
this.hasChanges = true;
|
|
266
323
|
// let's remove the prop if no more filters so the filter icon will be removed
|
|
267
324
|
if (items.length === 0)
|
|
268
325
|
delete this.filterItems[prop !== null && prop !== void 0 ? prop : ''];
|
|
@@ -304,6 +361,7 @@ export class FilterPanel {
|
|
|
304
361
|
if (!moveFilterItem(items, sourceId, targetId)) {
|
|
305
362
|
return;
|
|
306
363
|
}
|
|
364
|
+
this.hasChanges = true;
|
|
307
365
|
this.filterId++;
|
|
308
366
|
if (!this.disableDynamicFiltering) {
|
|
309
367
|
this.debouncedApplyFilter();
|
|
@@ -339,6 +397,7 @@ export class FilterPanel {
|
|
|
339
397
|
if (!target || !moveFilterItem(items, sourceId, target.id)) {
|
|
340
398
|
return;
|
|
341
399
|
}
|
|
400
|
+
this.hasChanges = true;
|
|
342
401
|
this.filterId++;
|
|
343
402
|
if (!this.disableDynamicFiltering) {
|
|
344
403
|
this.debouncedApplyFilter();
|
|
@@ -357,6 +416,7 @@ export class FilterPanel {
|
|
|
357
416
|
if (index === -1)
|
|
358
417
|
return;
|
|
359
418
|
items[index].relation = items[index].relation === 'and' ? 'or' : 'and';
|
|
419
|
+
this.hasChanges = true;
|
|
360
420
|
if (!this.disableDynamicFiltering) {
|
|
361
421
|
this.debouncedApplyFilter();
|
|
362
422
|
}
|
|
@@ -405,12 +465,22 @@ export class FilterPanel {
|
|
|
405
465
|
}
|
|
406
466
|
return options;
|
|
407
467
|
}
|
|
408
|
-
renderExtra(prop, index) {
|
|
409
|
-
|
|
468
|
+
renderExtra(prop, index, isDraft = false) {
|
|
469
|
+
var _a, _b;
|
|
470
|
+
const currentFilter = isDraft
|
|
471
|
+
? this.draftFilter
|
|
472
|
+
: (_a = this.filterItems[prop]) === null || _a === void 0 ? void 0 : _a[index];
|
|
410
473
|
if (!currentFilter)
|
|
411
474
|
return '';
|
|
412
475
|
const applyFilter = (value) => {
|
|
413
|
-
|
|
476
|
+
currentFilter.value = value;
|
|
477
|
+
if (isDraft && !this.isMeaningfulDraftValue(value)) {
|
|
478
|
+
return;
|
|
479
|
+
}
|
|
480
|
+
if (isDraft && !this.promoteDraft(prop)) {
|
|
481
|
+
return;
|
|
482
|
+
}
|
|
483
|
+
this.hasChanges = true;
|
|
414
484
|
if (!this.disableDynamicFiltering) {
|
|
415
485
|
this.debouncedApplyFilter();
|
|
416
486
|
}
|
|
@@ -425,11 +495,11 @@ export class FilterPanel {
|
|
|
425
495
|
}
|
|
426
496
|
};
|
|
427
497
|
const capts = Object.assign(Object.assign({}, this.filterCaptionsInternal), this.filterCaptions);
|
|
428
|
-
const extra = this.filterEntities[currentFilter
|
|
498
|
+
const extra = (_b = this.filterEntities[currentFilter.type]) === null || _b === void 0 ? void 0 : _b.extra;
|
|
429
499
|
if (typeof extra === 'function') {
|
|
430
500
|
return extra(h, {
|
|
431
|
-
value: currentFilter
|
|
432
|
-
filter: currentFilter
|
|
501
|
+
value: currentFilter.value,
|
|
502
|
+
filter: currentFilter,
|
|
433
503
|
prop,
|
|
434
504
|
index,
|
|
435
505
|
placeholder: capts.placeholder,
|
|
@@ -444,7 +514,7 @@ export class FilterPanel {
|
|
|
444
514
|
if (extra !== 'input' && extra !== 'datepicker') {
|
|
445
515
|
return '';
|
|
446
516
|
}
|
|
447
|
-
return (h("input", { id: `filter-input-${currentFilter
|
|
517
|
+
return (h("input", { id: `filter-input-${currentFilter.id}`, placeholder: capts.placeholder, type: extra === 'datepicker' ? 'date' : 'text', value: currentFilter.value, onInput: (e) => {
|
|
448
518
|
if (e.target instanceof HTMLInputElement) {
|
|
449
519
|
applyFilter(e.target.value);
|
|
450
520
|
}
|
|
@@ -460,6 +530,42 @@ export class FilterPanel {
|
|
|
460
530
|
e.stopPropagation();
|
|
461
531
|
} }));
|
|
462
532
|
}
|
|
533
|
+
resolveDraftFilterType(preferred) {
|
|
534
|
+
var _a, _b;
|
|
535
|
+
const available = Object.values((_b = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.filterTypes) !== null && _b !== void 0 ? _b : {}).flat();
|
|
536
|
+
const type = preferred && available.includes(preferred)
|
|
537
|
+
? preferred
|
|
538
|
+
: available[0];
|
|
539
|
+
return type;
|
|
540
|
+
}
|
|
541
|
+
promoteDraft(prop, type) {
|
|
542
|
+
if (!this.draftFilter) {
|
|
543
|
+
return;
|
|
544
|
+
}
|
|
545
|
+
if (!this.filterItems[prop]) {
|
|
546
|
+
this.filterItems[prop] = [];
|
|
547
|
+
}
|
|
548
|
+
if (type) {
|
|
549
|
+
this.draftFilter.type = type;
|
|
550
|
+
}
|
|
551
|
+
const filter = this.draftFilter;
|
|
552
|
+
this.filterItems[prop].push(filter);
|
|
553
|
+
this.draftFilter = undefined;
|
|
554
|
+
this.hasChanges = true;
|
|
555
|
+
return filter;
|
|
556
|
+
}
|
|
557
|
+
isMeaningfulDraftValue(value) {
|
|
558
|
+
return value !== '' && value !== undefined && value !== null;
|
|
559
|
+
}
|
|
560
|
+
emitFilterChange() {
|
|
561
|
+
this.filterChange.emit(this.cloneFilterItems(this.filterItems));
|
|
562
|
+
}
|
|
563
|
+
cloneFilterItems(filterItems) {
|
|
564
|
+
return Object.fromEntries(Object.entries(filterItems).map(([prop, filters]) => [
|
|
565
|
+
prop,
|
|
566
|
+
filters.map(filter => (Object.assign({}, filter))),
|
|
567
|
+
]));
|
|
568
|
+
}
|
|
463
569
|
getAddFilterSelect() {
|
|
464
570
|
return this.element.querySelector(`#${FILTER_ID}`);
|
|
465
571
|
}
|
|
@@ -492,7 +598,7 @@ export class FilterPanel {
|
|
|
492
598
|
top: `${(_d = (_c = this.changes) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : 0}px`,
|
|
493
599
|
};
|
|
494
600
|
const capts = Object.assign(Object.assign({}, this.filterCaptionsInternal), this.filterCaptions);
|
|
495
|
-
return (h(Host, { key: '
|
|
601
|
+
return (h(Host, { key: '0bb6ac39407141e989b6a2f54063ee5ed789e40e' }, h("dialog", { key: '28a919ca4184018e8f00bbd31d373e153306d163', class: "filter-panel-dialog", style: style, ref: el => (this.dialog = el), onCancel: e => {
|
|
496
602
|
e.preventDefault();
|
|
497
603
|
this.onCancel();
|
|
498
604
|
} }, this.changes && [
|
|
@@ -501,7 +607,7 @@ export class FilterPanel {
|
|
|
501
607
|
((_g = this.changes) === null || _g === void 0 ? void 0 : _g.hideDefaultFilters) !== true && [
|
|
502
608
|
h("label", { key: "filter-title" }, capts.title),
|
|
503
609
|
h("div", { key: "filter-holder", class: "filter-holder" }, this.getFilterItemsList()),
|
|
504
|
-
h("div", { key: "add-filter", class: "add-filter" }, h("select", { key: '
|
|
610
|
+
h("div", { key: "add-filter", class: "add-filter" }, h("select", { key: 'c5816b6699d8608bd8ec2621bbbd4c70daf52a1e', id: FILTER_ID, class: "select-css", onChange: e => this.onAddNewFilter(e) }, this.renderSelectOptions(this.currentFilterType))),
|
|
505
611
|
],
|
|
506
612
|
h("slot", { key: "default-slot" }),
|
|
507
613
|
((_j = (_h = this.changes).extraBottomContent) === null || _j === void 0 ? void 0 : _j.call(_h, this.changes)) || '',
|
|
@@ -678,6 +784,7 @@ export class FilterPanel {
|
|
|
678
784
|
"currentFilterType": {},
|
|
679
785
|
"changes": {},
|
|
680
786
|
"filterItems": {},
|
|
787
|
+
"draftFilter": {},
|
|
681
788
|
"draggedFilterId": {},
|
|
682
789
|
"dragOverFilterId": {}
|
|
683
790
|
};
|
|
@@ -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.
|
|
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(
|
|
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:
|
|
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
|
-
|
|
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]:
|
|
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-
|
|
5
|
-
export {
|
|
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-
|
|
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([
|
package/dist/esm/loader.js
CHANGED
|
@@ -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 };
|