@revolist/revogrid 3.6.16 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-element/filter.button.js +2 -2
- package/custom-element/revo-grid.js +6 -1
- package/custom-element/revogr-clipboard.js +6 -2
- package/custom-element/revogr-edit2.js +13 -8
- package/custom-element/revogr-filter-panel.js +10 -3
- package/custom-element/revogr-header2.js +5 -4
- package/custom-element/revogr-overlay-selection2.js +2 -2
- package/custom-element/revogr-row-headers2.js +5 -2
- package/dist/cjs/{debounce-6cea2774.js → debounce-f5e62c5a.js} +2 -2
- package/dist/cjs/revo-grid_11.cjs.entry.js +30 -16
- package/dist/cjs/revogr-clipboard.cjs.entry.js +6 -2
- package/dist/cjs/revogr-filter-panel.cjs.entry.js +11 -4
- package/dist/collection/components/clipboard/revogr-clipboard.js +6 -2
- package/dist/collection/components/header/headerRenderer.js +3 -3
- package/dist/collection/components/overlay/editors/text.js +4 -4
- package/dist/collection/components/overlay/keyboard.service.js +2 -2
- package/dist/collection/components/rowHeaders/revogr-row-headers.js +5 -2
- package/dist/collection/plugins/filter/filter.button.js +2 -2
- package/dist/collection/plugins/filter/filter.plugin.js +6 -1
- package/dist/collection/plugins/filter/filter.pop.js +11 -4
- package/dist/collection/plugins/sorting/sorting.sign.js +2 -1
- package/dist/collection/utils/keyCodes.js +6 -0
- package/dist/collection/utils/keyCodes.utils.js +8 -1
- package/dist/esm/{debounce-e4e6dd45.js → debounce-0e5b22a1.js} +2 -2
- package/dist/esm/revo-grid_11.entry.js +30 -16
- package/dist/esm/revogr-clipboard.entry.js +6 -2
- package/dist/esm/revogr-filter-panel.entry.js +11 -4
- package/dist/esm-es5/{debounce-e4e6dd45.js → debounce-0e5b22a1.js} +1 -1
- package/dist/esm-es5/revo-grid_11.entry.js +1 -1
- package/dist/esm-es5/revogr-clipboard.entry.js +1 -1
- package/dist/esm-es5/revogr-filter-panel.entry.js +2 -2
- package/dist/revo-grid/debounce-0f0160a3.js +4 -0
- package/dist/revo-grid/{debounce-5a33c710.system.js → debounce-8d28735f.system.js} +1 -1
- package/dist/revo-grid/revo-grid_11.entry.js +1 -1
- package/dist/revo-grid/revo-grid_11.system.entry.js +1 -1
- package/dist/revo-grid/revogr-clipboard.entry.js +1 -1
- package/dist/revo-grid/revogr-clipboard.system.entry.js +2 -2
- package/dist/revo-grid/revogr-filter-panel.entry.js +1 -1
- package/dist/revo-grid/revogr-filter-panel.system.entry.js +1 -1
- package/dist/types/components/clipboard/revogr-clipboard.d.ts +1 -0
- package/dist/types/plugins/filter/filter.button.d.ts +1 -1
- package/dist/types/plugins/filter/filter.plugin.d.ts +4 -0
- package/dist/types/utils/keyCodes.d.ts +5 -0
- package/dist/types/utils/keyCodes.utils.d.ts +2 -0
- package/package.json +1 -1
- package/readme.md +9 -0
- package/dist/revo-grid/debounce-726bdadb.js +0 -4
|
@@ -69,5 +69,11 @@ var codesLetter;
|
|
|
69
69
|
codesLetter["ARROW_DOWN"] = "ArrowDown";
|
|
70
70
|
codesLetter["SHIFT"] = "Shift";
|
|
71
71
|
})(codesLetter || (codesLetter = {}));
|
|
72
|
+
var keyValues;
|
|
73
|
+
(function (keyValues) {
|
|
74
|
+
keyValues["ENTER"] = "Enter";
|
|
75
|
+
keyValues["TAB"] = "Tab";
|
|
76
|
+
})(keyValues || (keyValues = {}));
|
|
72
77
|
export default codes;
|
|
73
78
|
export { codesLetter };
|
|
79
|
+
export { keyValues };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built by Revolist
|
|
3
3
|
*/
|
|
4
|
-
import KeyCodesEnum, { codesLetter } from './keyCodes';
|
|
4
|
+
import KeyCodesEnum, { codesLetter, keyValues } from './keyCodes';
|
|
5
5
|
import OsPlatform from './platform';
|
|
6
6
|
import includes from 'lodash/includes';
|
|
7
7
|
export function isLetterKey(code) {
|
|
@@ -62,6 +62,13 @@ export function isClear(code) {
|
|
|
62
62
|
export function isTab(code) {
|
|
63
63
|
return codesLetter.TAB === code;
|
|
64
64
|
}
|
|
65
|
+
// does not work with virtual keyboard on android
|
|
65
66
|
export function isEnterKey(code) {
|
|
66
67
|
return code === codesLetter.ENTER || code === codesLetter.ENTER_NUM;
|
|
67
68
|
}
|
|
69
|
+
export function isTabKeyValue(key) {
|
|
70
|
+
return keyValues.TAB === key;
|
|
71
|
+
}
|
|
72
|
+
export function isEnterKeyValue(key) {
|
|
73
|
+
return keyValues.ENTER === key;
|
|
74
|
+
}
|
|
@@ -338,8 +338,8 @@ const TrashButton = () => {
|
|
|
338
338
|
h("svg", { class: "trash-img", viewBox: "0 0 24 24" },
|
|
339
339
|
h("path", { fill: "currentColor", d: "M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z" }))));
|
|
340
340
|
};
|
|
341
|
-
const AndOrButton = ({
|
|
342
|
-
return h("button", { class: { [AND_OR_BUTTON]: true, 'light revo-button': true } },
|
|
341
|
+
const AndOrButton = ({ text }) => {
|
|
342
|
+
return h("button", { class: { [AND_OR_BUTTON]: true, 'light revo-button': true } }, text);
|
|
343
343
|
};
|
|
344
344
|
function isFilterBtn(e) {
|
|
345
345
|
if (e.classList.contains(FILTER_BUTTON_CLASS)) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Built by Revolist
|
|
3
3
|
*/
|
|
4
4
|
import { g as getRenderingRef, f as forceUpdate, h, r as registerInstance, c as createEvent, H as Host, e as getElement } from './index-6f753b3c.js';
|
|
5
|
-
import { i as isObjectLike_1, _ as _baseGetTag, c as createCommonjsModule, a as _root, b as _freeGlobal, d as isObject_1, e as _Symbol, f as isSymbol_1, t as toNumber_1, g as isFilterBtn, F as FILTER_PROP, h as commonjsGlobal, j as debounce_1, k as FilterButton } from './debounce-
|
|
5
|
+
import { i as isObjectLike_1, _ as _baseGetTag, c as createCommonjsModule, a as _root, b as _freeGlobal, d as isObject_1, e as _Symbol, f as isSymbol_1, t as toNumber_1, g as isFilterBtn, F as FILTER_PROP, h as commonjsGlobal, j as debounce_1, k as FilterButton } from './debounce-0e5b22a1.js';
|
|
6
6
|
|
|
7
7
|
class ThemeCompact {
|
|
8
8
|
constructor() {
|
|
@@ -5342,7 +5342,12 @@ class FilterPlugin extends BasePlugin {
|
|
|
5342
5342
|
const buttonPos = el.getBoundingClientRect();
|
|
5343
5343
|
const prop = e.detail.prop;
|
|
5344
5344
|
this.pop.filterTypes = this.getColumnFilter(e.detail.filter);
|
|
5345
|
-
this.pop.show(Object.assign(Object.assign({}, this.filterCollection[prop]), { x:
|
|
5345
|
+
this.pop.show(Object.assign(Object.assign({}, this.filterCollection[prop]), { x: -9999, y: buttonPos.y - gridPos.y + buttonPos.height, prop }));
|
|
5346
|
+
// fix filter dialog is out of view
|
|
5347
|
+
setTimeout(async () => {
|
|
5348
|
+
const { width } = this.pop.getBoundingClientRect();
|
|
5349
|
+
this.pop.style.left = Math.min(buttonPos.x - gridPos.x, gridPos.width - width - 20) + 'px';
|
|
5350
|
+
});
|
|
5346
5351
|
}
|
|
5347
5352
|
getColumnFilter(type) {
|
|
5348
5353
|
let filterType = 'string';
|
|
@@ -25958,6 +25963,11 @@ var codesLetter;
|
|
|
25958
25963
|
codesLetter["ARROW_DOWN"] = "ArrowDown";
|
|
25959
25964
|
codesLetter["SHIFT"] = "Shift";
|
|
25960
25965
|
})(codesLetter || (codesLetter = {}));
|
|
25966
|
+
var keyValues;
|
|
25967
|
+
(function (keyValues) {
|
|
25968
|
+
keyValues["ENTER"] = "Enter";
|
|
25969
|
+
keyValues["TAB"] = "Tab";
|
|
25970
|
+
})(keyValues || (keyValues = {}));
|
|
25961
25971
|
const KeyCodesEnum = codes;
|
|
25962
25972
|
|
|
25963
25973
|
var osPlatform;
|
|
@@ -26137,11 +26147,11 @@ function isCtrlKey(code, platform) {
|
|
|
26137
26147
|
function isClear(code) {
|
|
26138
26148
|
return codesLetter.BACKSPACE === code || codesLetter.DELETE === code;
|
|
26139
26149
|
}
|
|
26140
|
-
function
|
|
26141
|
-
return
|
|
26150
|
+
function isTabKeyValue(key) {
|
|
26151
|
+
return keyValues.TAB === key;
|
|
26142
26152
|
}
|
|
26143
|
-
function
|
|
26144
|
-
return
|
|
26153
|
+
function isEnterKeyValue(key) {
|
|
26154
|
+
return keyValues.ENTER === key;
|
|
26145
26155
|
}
|
|
26146
26156
|
|
|
26147
26157
|
class TextEditor {
|
|
@@ -26159,8 +26169,8 @@ class TextEditor {
|
|
|
26159
26169
|
}
|
|
26160
26170
|
}
|
|
26161
26171
|
onKeyDown(e) {
|
|
26162
|
-
const isEnter =
|
|
26163
|
-
const isKeyTab =
|
|
26172
|
+
const isEnter = isEnterKeyValue(e.key);
|
|
26173
|
+
const isKeyTab = isTabKeyValue(e.key);
|
|
26164
26174
|
if ((isKeyTab || isEnter) && e.target && this.saveCallback && !e.isComposing) {
|
|
26165
26175
|
// blur is needed to avoid autoscroll
|
|
26166
26176
|
this.editInput.blur();
|
|
@@ -26171,7 +26181,7 @@ class TextEditor {
|
|
|
26171
26181
|
// required
|
|
26172
26182
|
render() {
|
|
26173
26183
|
var _a;
|
|
26174
|
-
return (h("input", { type: "text", value: ((_a = this.editCell) === null || _a === void 0 ? void 0 : _a.val) || '', ref: el => {
|
|
26184
|
+
return (h("input", { type: "text", enterkeyhint: "enter", value: ((_a = this.editCell) === null || _a === void 0 ? void 0 : _a.val) || '', ref: el => {
|
|
26175
26185
|
this.editInput = el;
|
|
26176
26186
|
}, onKeyDown: e => this.onKeyDown(e) }));
|
|
26177
26187
|
}
|
|
@@ -26480,7 +26490,8 @@ var keyBy = _createAggregator(function(result, value, key) {
|
|
|
26480
26490
|
var keyBy_1 = keyBy;
|
|
26481
26491
|
|
|
26482
26492
|
const SortingSign = ({ column }) => {
|
|
26483
|
-
|
|
26493
|
+
var _a;
|
|
26494
|
+
return h("i", { class: (_a = column === null || column === void 0 ? void 0 : column.order) !== null && _a !== void 0 ? _a : 'sort-off' });
|
|
26484
26495
|
};
|
|
26485
26496
|
|
|
26486
26497
|
var ResizeEvents;
|
|
@@ -26759,7 +26770,7 @@ const HeaderCellRenderer = ({ data, props }, children) => {
|
|
|
26759
26770
|
};
|
|
26760
26771
|
|
|
26761
26772
|
const HeaderRenderer = (p) => {
|
|
26762
|
-
var _a, _b, _c, _d, _e
|
|
26773
|
+
var _a, _b, _c, _d, _e;
|
|
26763
26774
|
const cellClass = {
|
|
26764
26775
|
[HEADER_CLASS]: true,
|
|
26765
26776
|
[HEADER_SORTABLE_CLASS]: !!((_a = p.data) === null || _a === void 0 ? void 0 : _a.sortable),
|
|
@@ -26794,8 +26805,8 @@ const HeaderRenderer = (p) => {
|
|
|
26794
26805
|
}
|
|
26795
26806
|
}
|
|
26796
26807
|
return (h(HeaderCellRenderer, { data: p.data, props: dataProps },
|
|
26797
|
-
|
|
26798
|
-
p.canFilter && ((
|
|
26808
|
+
h(SortingSign, { column: p.data }),
|
|
26809
|
+
p.canFilter && ((_e = p.data) === null || _e === void 0 ? void 0 : _e.filter) !== false ? h(FilterButton, { column: p.data }) : ''));
|
|
26799
26810
|
};
|
|
26800
26811
|
|
|
26801
26812
|
const GroupHeaderRenderer = (p) => {
|
|
@@ -27122,7 +27133,7 @@ class KeyboardService {
|
|
|
27122
27133
|
return;
|
|
27123
27134
|
}
|
|
27124
27135
|
// pressed enter
|
|
27125
|
-
if (
|
|
27136
|
+
if (isEnterKeyValue(e.key)) {
|
|
27126
27137
|
this.sv.doEdit();
|
|
27127
27138
|
return;
|
|
27128
27139
|
}
|
|
@@ -27747,10 +27758,13 @@ const RevogrRowHeaders = class {
|
|
|
27747
27758
|
/** render viewports rows */
|
|
27748
27759
|
let totalLength = 1;
|
|
27749
27760
|
for (let data of this.dataPorts) {
|
|
27750
|
-
const
|
|
27761
|
+
const items = data.dataStore.get('items');
|
|
27762
|
+
const itemCount = items.length;
|
|
27763
|
+
const source = data.dataStore.get('source');
|
|
27764
|
+
const visibleSourceItems = items.map(v => source[v]); // from src/store/dataSource/data.store.ts
|
|
27751
27765
|
// initiate row data
|
|
27752
27766
|
const dataStore = new DataStore(data.type);
|
|
27753
|
-
dataStore.updateData(
|
|
27767
|
+
dataStore.updateData(visibleSourceItems);
|
|
27754
27768
|
// initiate column data
|
|
27755
27769
|
const colData = new DataStore('colPinStart');
|
|
27756
27770
|
const column = Object.assign({ cellTemplate: RowHeaderRender(totalLength) }, this.rowHeaderColumn);
|
|
@@ -12,8 +12,9 @@ const Clipboard = class {
|
|
|
12
12
|
onPaste(e) {
|
|
13
13
|
const clipboardData = this.getData(e);
|
|
14
14
|
const isHTML = clipboardData.types.indexOf('text/html') > -1;
|
|
15
|
-
const
|
|
16
|
-
const
|
|
15
|
+
const canBeParsedAsHtml = isHTML ? this.canBeParsedAsHTML(clipboardData.getData('text/html')) : false;
|
|
16
|
+
const data = canBeParsedAsHtml ? clipboardData.getData('text/html') : clipboardData.getData('text');
|
|
17
|
+
const parsedData = canBeParsedAsHtml ? this.htmlParse(data) : this.textParse(data);
|
|
17
18
|
this.pasteRegion.emit(parsedData);
|
|
18
19
|
e.preventDefault();
|
|
19
20
|
}
|
|
@@ -43,6 +44,9 @@ const Clipboard = class {
|
|
|
43
44
|
}
|
|
44
45
|
return result;
|
|
45
46
|
}
|
|
47
|
+
canBeParsedAsHTML(data) {
|
|
48
|
+
return document.createRange().createContextualFragment(data).querySelector('table') !== null;
|
|
49
|
+
}
|
|
46
50
|
getData(e) {
|
|
47
51
|
var _a;
|
|
48
52
|
return e.clipboardData || ((_a = window) === null || _a === void 0 ? void 0 : _a.clipboardData);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Built by Revolist
|
|
3
3
|
*/
|
|
4
4
|
import { h, r as registerInstance, c as createEvent, H as Host } from './index-6f753b3c.js';
|
|
5
|
-
import { j as debounce_1, g as isFilterBtn, A as AndOrButton, T as TrashButton } from './debounce-
|
|
5
|
+
import { j as debounce_1, g as isFilterBtn, A as AndOrButton, T as TrashButton } from './debounce-0e5b22a1.js';
|
|
6
6
|
|
|
7
7
|
const RevoButton = (props, children) => {
|
|
8
8
|
return (h("button", Object.assign({}, props, { class: Object.assign(Object.assign({}, (typeof props.class === 'object' ? props.class : props.class ? { [props.class]: true } : '')), { ['revo-button']: true }) }), children));
|
|
@@ -41,6 +41,10 @@ const FilterPanel = class {
|
|
|
41
41
|
save: 'Save',
|
|
42
42
|
reset: 'Reset',
|
|
43
43
|
cancel: 'Close',
|
|
44
|
+
add: 'Add more condition...',
|
|
45
|
+
placeholder: 'Enter value...',
|
|
46
|
+
and: 'and',
|
|
47
|
+
or: 'or',
|
|
44
48
|
};
|
|
45
49
|
this.isFilterIdSet = false;
|
|
46
50
|
this.filterId = 0;
|
|
@@ -87,7 +91,8 @@ const FilterPanel = class {
|
|
|
87
91
|
const options = [];
|
|
88
92
|
const prop = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop;
|
|
89
93
|
if (!isDefaultTypeRemoved) {
|
|
90
|
-
|
|
94
|
+
const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);
|
|
95
|
+
options.push(h("option", { selected: this.currentFilterType === defaultType, value: defaultType }, prop && this.filterItems[prop] && this.filterItems[prop].length > 0 ? capts.add : this.filterNames[defaultType]));
|
|
91
96
|
}
|
|
92
97
|
for (let gIndex in this.filterTypes) {
|
|
93
98
|
options.push(...this.filterTypes[gIndex].map(k => (h("option", { value: k, selected: type === k }, this.filterNames[k]))));
|
|
@@ -101,7 +106,8 @@ const FilterPanel = class {
|
|
|
101
106
|
return '';
|
|
102
107
|
if (this.filterEntities[currentFilter[index].type].extra !== 'input')
|
|
103
108
|
return '';
|
|
104
|
-
|
|
109
|
+
const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);
|
|
110
|
+
return (h("input", { id: `filter-input-${currentFilter[index].id}`, placeholder: capts.placeholder, type: "text", value: currentFilter[index].value, onInput: this.onUserInput.bind(this, index, prop), onKeyDown: e => this.onKeyDown(e) }));
|
|
105
111
|
}
|
|
106
112
|
getFilterItemsList() {
|
|
107
113
|
var _a;
|
|
@@ -109,11 +115,12 @@ const FilterPanel = class {
|
|
|
109
115
|
if (!(prop || prop === 0))
|
|
110
116
|
return '';
|
|
111
117
|
const propFilters = this.filterItems[prop] || [];
|
|
118
|
+
const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);
|
|
112
119
|
return (h("div", { key: this.filterId }, propFilters.map((d, index) => {
|
|
113
120
|
let andOrButton;
|
|
114
121
|
// hide toggle button if there is only one filter and the last one
|
|
115
122
|
if (index !== this.filterItems[prop].length - 1) {
|
|
116
|
-
andOrButton = (h("div", { onClick: () => this.toggleFilterAndOr(d.id) }, h(AndOrButton, {
|
|
123
|
+
andOrButton = (h("div", { onClick: () => this.toggleFilterAndOr(d.id) }, h(AndOrButton, { text: d.relation === 'and' ? capts.and : capts.or })));
|
|
117
124
|
}
|
|
118
125
|
return (h("div", { key: d.id, class: FILTER_LIST_CLASS }, h("div", { class: { 'select-input': true } }, h("select", { class: "select-css select-filter", onChange: e => this.onFilterTypeChange(e, prop, index) }, this.renderSelectOptions(this.filterItems[prop][index].type, true)), h("div", { class: FILTER_LIST_CLASS_ACTION }, andOrButton), h("div", { onClick: () => this.onRemoveFilter(d.id) }, h(TrashButton, null))), h("div", null, this.renderExtra(prop, index))));
|
|
119
126
|
}), propFilters.length > 0 ? h("div", { class: "add-filter-divider" }) : ''));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built by Revolist
|
|
3
3
|
*/
|
|
4
|
-
import{h}from"./index-6f753b3c.js";var commonjsGlobal=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function createCommonjsModule(e,t,r){return r={path:t,exports:{},require:function(e,t){return commonjsRequire()}},e(r,r.exports),r.exports}function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var freeGlobal=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal;var _freeGlobal=freeGlobal;var freeSelf=typeof self=="object"&&self&&self.Object===Object&&self;var root=_freeGlobal||freeSelf||Function("return this")();var _root=root;var Symbol=_root.Symbol;var _Symbol=Symbol;var objectProto$1=Object.prototype;var hasOwnProperty=objectProto$1.hasOwnProperty;var nativeObjectToString$1=objectProto$1.toString;var symToStringTag$1=_Symbol?_Symbol.toStringTag:undefined;function getRawTag(e){var t=hasOwnProperty.call(e,symToStringTag$1),r=e[symToStringTag$1];try{e[symToStringTag$1]=undefined;var n=true}catch(e){}var o=nativeObjectToString$1.call(e);if(n){if(t){e[symToStringTag$1]=r}else{delete e[symToStringTag$1]}}return o}var _getRawTag=getRawTag;var objectProto=Object.prototype;var nativeObjectToString=objectProto.toString;function objectToString(e){return nativeObjectToString.call(e)}var _objectToString=objectToString;var nullTag="[object Null]",undefinedTag="[object Undefined]";var symToStringTag=_Symbol?_Symbol.toStringTag:undefined;function baseGetTag(e){if(e==null){return e===undefined?undefinedTag:nullTag}return symToStringTag&&symToStringTag in Object(e)?_getRawTag(e):_objectToString(e)}var _baseGetTag=baseGetTag;function isObjectLike(e){return e!=null&&typeof e=="object"}var isObjectLike_1=isObjectLike;function isObject(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var isObject_1=isObject;var symbolTag="[object Symbol]";function isSymbol(e){return typeof e=="symbol"||isObjectLike_1(e)&&_baseGetTag(e)==symbolTag}var isSymbol_1=isSymbol;var reWhitespace=/\s/;function trimmedEndIndex(e){var t=e.length;while(t--&&reWhitespace.test(e.charAt(t))){}return t}var _trimmedEndIndex=trimmedEndIndex;var reTrimStart=/^\s+/;function baseTrim(e){return e?e.slice(0,_trimmedEndIndex(e)+1).replace(reTrimStart,""):e}var _baseTrim=baseTrim;var NAN=0/0;var reIsBadHex=/^[-+]0x[0-9a-f]+$/i;var reIsBinary=/^0b[01]+$/i;var reIsOctal=/^0o[0-7]+$/i;var freeParseInt=parseInt;function toNumber(e){if(typeof e=="number"){return e}if(isSymbol_1(e)){return NAN}if(isObject_1(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=isObject_1(t)?t+"":t}if(typeof e!="string"){return e===0?e:+e}e=_baseTrim(e);var r=reIsBinary.test(e);return r||reIsOctal.test(e)?freeParseInt(e.slice(2),r?2:8):reIsBadHex.test(e)?NAN:+e}var toNumber_1=toNumber;var FILTER_BUTTON_CLASS="rv-filter";var FILTER_BUTTON_ACTIVE="active";var FILTER_PROP="hasFilter";var AND_OR_BUTTON="and-or-button";var TRASH_BUTTON="trash-button";var FilterButton=function(e){var t;var r=e.column;return h("span",null,h("button",{class:(t={},t[FILTER_BUTTON_CLASS]=true,t[FILTER_BUTTON_ACTIVE]=r&&!!r[FILTER_PROP],t)},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"})))))};var TrashButton=function(){var e;return h("div",{class:(e={},e[TRASH_BUTTON]=true,e)},h("svg",{class:"trash-img",viewBox:"0 0 24 24"},h("path",{fill:"currentColor",d:"M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z"})))};var AndOrButton=function(e){var t;var r=e.
|
|
4
|
+
import{h}from"./index-6f753b3c.js";var commonjsGlobal=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function createCommonjsModule(e,t,r){return r={path:t,exports:{},require:function(e,t){return commonjsRequire()}},e(r,r.exports),r.exports}function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var freeGlobal=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal;var _freeGlobal=freeGlobal;var freeSelf=typeof self=="object"&&self&&self.Object===Object&&self;var root=_freeGlobal||freeSelf||Function("return this")();var _root=root;var Symbol=_root.Symbol;var _Symbol=Symbol;var objectProto$1=Object.prototype;var hasOwnProperty=objectProto$1.hasOwnProperty;var nativeObjectToString$1=objectProto$1.toString;var symToStringTag$1=_Symbol?_Symbol.toStringTag:undefined;function getRawTag(e){var t=hasOwnProperty.call(e,symToStringTag$1),r=e[symToStringTag$1];try{e[symToStringTag$1]=undefined;var n=true}catch(e){}var o=nativeObjectToString$1.call(e);if(n){if(t){e[symToStringTag$1]=r}else{delete e[symToStringTag$1]}}return o}var _getRawTag=getRawTag;var objectProto=Object.prototype;var nativeObjectToString=objectProto.toString;function objectToString(e){return nativeObjectToString.call(e)}var _objectToString=objectToString;var nullTag="[object Null]",undefinedTag="[object Undefined]";var symToStringTag=_Symbol?_Symbol.toStringTag:undefined;function baseGetTag(e){if(e==null){return e===undefined?undefinedTag:nullTag}return symToStringTag&&symToStringTag in Object(e)?_getRawTag(e):_objectToString(e)}var _baseGetTag=baseGetTag;function isObjectLike(e){return e!=null&&typeof e=="object"}var isObjectLike_1=isObjectLike;function isObject(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var isObject_1=isObject;var symbolTag="[object Symbol]";function isSymbol(e){return typeof e=="symbol"||isObjectLike_1(e)&&_baseGetTag(e)==symbolTag}var isSymbol_1=isSymbol;var reWhitespace=/\s/;function trimmedEndIndex(e){var t=e.length;while(t--&&reWhitespace.test(e.charAt(t))){}return t}var _trimmedEndIndex=trimmedEndIndex;var reTrimStart=/^\s+/;function baseTrim(e){return e?e.slice(0,_trimmedEndIndex(e)+1).replace(reTrimStart,""):e}var _baseTrim=baseTrim;var NAN=0/0;var reIsBadHex=/^[-+]0x[0-9a-f]+$/i;var reIsBinary=/^0b[01]+$/i;var reIsOctal=/^0o[0-7]+$/i;var freeParseInt=parseInt;function toNumber(e){if(typeof e=="number"){return e}if(isSymbol_1(e)){return NAN}if(isObject_1(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=isObject_1(t)?t+"":t}if(typeof e!="string"){return e===0?e:+e}e=_baseTrim(e);var r=reIsBinary.test(e);return r||reIsOctal.test(e)?freeParseInt(e.slice(2),r?2:8):reIsBadHex.test(e)?NAN:+e}var toNumber_1=toNumber;var FILTER_BUTTON_CLASS="rv-filter";var FILTER_BUTTON_ACTIVE="active";var FILTER_PROP="hasFilter";var AND_OR_BUTTON="and-or-button";var TRASH_BUTTON="trash-button";var FilterButton=function(e){var t;var r=e.column;return h("span",null,h("button",{class:(t={},t[FILTER_BUTTON_CLASS]=true,t[FILTER_BUTTON_ACTIVE]=r&&!!r[FILTER_PROP],t)},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"})))))};var TrashButton=function(){var e;return h("div",{class:(e={},e[TRASH_BUTTON]=true,e)},h("svg",{class:"trash-img",viewBox:"0 0 24 24"},h("path",{fill:"currentColor",d:"M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z"})))};var AndOrButton=function(e){var t;var r=e.text;return h("button",{class:(t={},t[AND_OR_BUTTON]=true,t["light revo-button"]=true,t)},r)};function isFilterBtn(e){if(e.classList.contains(FILTER_BUTTON_CLASS)){return true}return e===null||e===void 0?void 0:e.closest(".".concat(FILTER_BUTTON_CLASS))}var now=function(){return _root.Date.now()};var now_1=now;var FUNC_ERROR_TEXT="Expected a function";var nativeMax=Math.max,nativeMin=Math.min;function debounce(e,t,r){var n,o,a,i,u,s,l=0,c=false,f=false,b=true;if(typeof e!="function"){throw new TypeError(FUNC_ERROR_TEXT)}t=toNumber_1(t)||0;if(isObject_1(r)){c=!!r.leading;f="maxWait"in r;a=f?nativeMax(toNumber_1(r.maxWait)||0,t):a;b="trailing"in r?!!r.trailing:b}function T(t){var r=n,a=o;n=o=undefined;l=t;i=e.apply(a,r);return i}function m(e){l=e;u=setTimeout(_,t);return c?T(e):i}function v(e){var r=e-s,n=e-l,o=t-r;return f?nativeMin(o,a-n):o}function d(e){var r=e-s,n=e-l;return s===undefined||r>=t||r<0||f&&n>=a}function _(){var e=now_1();if(d(e)){return g(e)}u=setTimeout(_,v(e))}function g(e){u=undefined;if(b&&n){return T(e)}n=o=undefined;return i}function y(){if(u!==undefined){clearTimeout(u)}l=0;n=s=o=u=undefined}function j(){return u===undefined?i:g(now_1())}function S(){var e=now_1(),r=d(e);n=arguments;o=this;s=e;if(r){if(u===undefined){return m(s)}if(f){clearTimeout(u);u=setTimeout(_,t);return T(s)}}if(u===undefined){u=setTimeout(_,t)}return i}S.cancel=y;S.flush=j;return S}var debounce_1=debounce;export{AndOrButton as A,FILTER_PROP as F,TrashButton as T,_baseGetTag as _,_root as a,_freeGlobal as b,createCommonjsModule as c,isObject_1 as d,_Symbol as e,isSymbol_1 as f,isFilterBtn as g,commonjsGlobal as h,isObjectLike_1 as i,debounce_1 as j,FilterButton as k,toNumber_1 as t};
|