@endge/ui-vue 0.28.0 → 0.30.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/dist/{edit.utils-Dnnbd0xG-D96FdtjP.js → edit.utils-Dnnbd0xG-9k4KfhPS.js} +1 -1
- package/dist/{main-DR8CApBj.js → main-BlrUaWbt.js} +2808 -2768
- package/dist/{revo-grid.entry-CM5PUZwD.js → revo-grid.entry-BGIhZAM-.js} +194 -207
- package/dist/{revogr-attribution_7.entry-C14UemQK.js → revogr-attribution_7.entry-CRsbdR_d.js} +37 -37
- package/dist/{revogr-clipboard_3.entry-Dh3nNJ4G.js → revogr-clipboard_3.entry-C3oOi2vb.js} +12 -12
- package/dist/{revogr-data_4.entry-CqHyQ5Ke.js → revogr-data_4.entry-D8Bdrbur.js} +3 -3
- package/dist/{revogr-filter-panel.entry-DlNZ6ZET.js → revogr-filter-panel.entry-CZEJCKFV.js} +21 -36
- package/dist/test/sfc/SFCRender_ComputationLifetime.test.d.ts +1 -0
- package/dist/{throttle-Cpk1LoGk-DuFblIKT.js → throttle-CaUDyxyU-CzmFgDWB.js} +8 -11
- package/dist/ui/render/entities/EndgePage.vue.d.ts +9 -954
- package/dist/ui/render/sfc/SFCRender_Computations.d.ts +12 -0
- package/dist/vue.js +1 -1
- package/package.json +6 -6
package/dist/{revogr-attribution_7.entry-C14UemQK.js → revogr-attribution_7.entry-CRsbdR_d.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as f, h as c, H as S, c as l,
|
|
1
|
+
import { r as f, h as c, H as S, c as l, p as O, f as F, N as L, O as p, P as H, Q as T, U as W, W as m, X as A, Y as u, V as B, D as P, Z as V, _ as D, $ as N, a0 as $, o as b, t as K, a1 as U, l as X, a2 as Y, R as G, a3 as _ } from "./main-BlrUaWbt.js";
|
|
2
2
|
import { v as Z, g as C } from "./events-BvSmBueA-Doh7RyHn.js";
|
|
3
|
-
import { i as z, a as j, b as
|
|
3
|
+
import { i as z, a as j, b as Q, c as q, d as J, e as ee, f as te, g as ie, h as se } from "./edit.utils-Dnnbd0xG-9k4KfhPS.js";
|
|
4
4
|
import { H as oe } from "./viewport.helpers-CoCAvmZs-f555rwPU.js";
|
|
5
|
-
import { L as ne, a as re, g as le, t as ae } from "./throttle-
|
|
5
|
+
import { L as ne, a as re, g as le, t as ae } from "./throttle-CaUDyxyU-CzmFgDWB.js";
|
|
6
6
|
/*!
|
|
7
7
|
* Built by Revolist OU ❤️
|
|
8
8
|
*/
|
|
@@ -56,10 +56,10 @@ function k(t, e) {
|
|
|
56
56
|
const i = C(t, "clientX"), s = C(t, "clientY");
|
|
57
57
|
if (i === null || s === null)
|
|
58
58
|
return null;
|
|
59
|
-
const o =
|
|
59
|
+
const o = E({ x: i, y: s }, e);
|
|
60
60
|
return w(o, e.lastCell) ? null : o;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function E({ x: t, y: e }, { el: i, rows: s, cols: o }) {
|
|
63
63
|
const { top: n, left: r, height: a, width: h } = i.getBoundingClientRect();
|
|
64
64
|
let d = e - n, g = t - r;
|
|
65
65
|
d >= a && (d = a - 1), g >= h && (g = h - 1);
|
|
@@ -144,7 +144,7 @@ const he = () => "revogr-focus.focused-cell{box-shadow:-1px 0 0 #0d63e8 inset, 1
|
|
|
144
144
|
return c(S, Object.assign({}, d), c("slot", null), h);
|
|
145
145
|
}
|
|
146
146
|
get el() {
|
|
147
|
-
return
|
|
147
|
+
return F(this);
|
|
148
148
|
}
|
|
149
149
|
};
|
|
150
150
|
de.style = he();
|
|
@@ -183,12 +183,12 @@ class ge {
|
|
|
183
183
|
}
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
186
|
-
if (o &&
|
|
186
|
+
if (o && Q(e.code)) {
|
|
187
187
|
this.sv.clearCell();
|
|
188
188
|
return;
|
|
189
189
|
}
|
|
190
190
|
if (n) {
|
|
191
|
-
if (
|
|
191
|
+
if (q(e.code)) {
|
|
192
192
|
this.keyChangeSelection(e, i);
|
|
193
193
|
return;
|
|
194
194
|
}
|
|
@@ -306,7 +306,7 @@ class fe {
|
|
|
306
306
|
const s = C(e, "clientX", p), o = C(e, "clientY", p);
|
|
307
307
|
if (s === null || o === null)
|
|
308
308
|
return;
|
|
309
|
-
const n =
|
|
309
|
+
const n = E({ x: s, y: o }, i);
|
|
310
310
|
if (this.autoFillLast || this.autoFillLast || (this.autoFillLast = this.autoFillStart), w(n, i.lastCell))
|
|
311
311
|
return;
|
|
312
312
|
if (this.autoFillLast = n, n.x === this.autoFillInitial.x && n.y === this.autoFillInitial.y)
|
|
@@ -327,7 +327,7 @@ class fe {
|
|
|
327
327
|
*/
|
|
328
328
|
selectionStart(e, i, s = "Selection") {
|
|
329
329
|
const { top: o, left: n } = e.getBoundingClientRect();
|
|
330
|
-
this.autoFillInitial = this.getFocus(i.focus, i.range), this.autoFillType = s, this.autoFillStart =
|
|
330
|
+
this.autoFillInitial = this.getFocus(i.focus, i.range), this.autoFillType = s, this.autoFillStart = E({ x: n, y: o }, i);
|
|
331
331
|
}
|
|
332
332
|
/**
|
|
333
333
|
* Clear current range selection on mouse up and mouse leave events
|
|
@@ -565,29 +565,29 @@ const Se = () => 'revogr-overlay-selection{display:block;position:relative;width
|
|
|
565
565
|
/**
|
|
566
566
|
* Executes the focus operation on the specified range of cells.
|
|
567
567
|
*/
|
|
568
|
-
doFocus(t, e, i
|
|
569
|
-
const { defaultPrevented:
|
|
570
|
-
if (
|
|
568
|
+
doFocus(t, e, i) {
|
|
569
|
+
const { defaultPrevented: s } = this.beforeFocusCell.emit(this.columnService.getSaveData(t.y, t.x));
|
|
570
|
+
if (s)
|
|
571
571
|
return !1;
|
|
572
|
-
const
|
|
573
|
-
if (
|
|
572
|
+
const o = Object.assign(Object.assign({ range: Object.assign(Object.assign({}, t), { x1: e.x, y1: e.y }), next: i }, this.types), { rowDimension: Object.assign({}, this.dimensionRow.state), colDimension: Object.assign({}, this.dimensionCol.state) }), n = this.applyFocus.emit(o);
|
|
573
|
+
if (n.defaultPrevented)
|
|
574
574
|
return !1;
|
|
575
|
-
const { range:
|
|
575
|
+
const { range: r } = n.detail;
|
|
576
576
|
return !this.focusCell.emit(Object.assign({ focus: {
|
|
577
|
-
x:
|
|
578
|
-
y:
|
|
577
|
+
x: r.x,
|
|
578
|
+
y: r.y
|
|
579
579
|
}, end: {
|
|
580
|
-
x:
|
|
581
|
-
y:
|
|
582
|
-
} },
|
|
580
|
+
x: r.x1,
|
|
581
|
+
y: r.y1
|
|
582
|
+
} }, n.detail)).defaultPrevented;
|
|
583
583
|
}
|
|
584
|
-
triggerRangeEvent(t
|
|
585
|
-
const
|
|
586
|
-
if (
|
|
584
|
+
triggerRangeEvent(t) {
|
|
585
|
+
const e = this.types.rowType, i = this.beforeApplyRange.emit(Object.assign(Object.assign({ range: Object.assign({}, t) }, this.types), { rowDimension: Object.assign({}, this.dimensionRow.state), colDimension: Object.assign({}, this.dimensionCol.state) }));
|
|
586
|
+
if (i.defaultPrevented)
|
|
587
587
|
return !1;
|
|
588
|
-
const
|
|
589
|
-
let
|
|
590
|
-
return
|
|
588
|
+
const s = this.columnService.getRangeTransformedToProps(i.detail.range, this.dataStore);
|
|
589
|
+
let o = this.beforeSetRange.emit(s);
|
|
590
|
+
return o.defaultPrevented || (o = this.setRange.emit(Object.assign(Object.assign({}, i.detail.range), { type: e })), o.defaultPrevented) ? !1 : !o.defaultPrevented;
|
|
591
591
|
}
|
|
592
592
|
/**
|
|
593
593
|
* Open Editor on DblClick
|
|
@@ -607,7 +607,7 @@ const Se = () => 'revogr-overlay-selection{display:block;position:relative;width
|
|
|
607
607
|
if (z(s) || t.defaultPrevented)
|
|
608
608
|
return;
|
|
609
609
|
const o = this.getData(), n = k(t, o);
|
|
610
|
-
n && (this.focus(n, this.range && t.shiftKey
|
|
610
|
+
n && (this.focus(n, this.range && t.shiftKey), this.range && (s && ((i = this.autoFillService) === null || i === void 0 || i.selectionStart(s, this.getData())), e ? Z(t.touches[0], p) && t.preventDefault() : t.preventDefault()));
|
|
611
611
|
}
|
|
612
612
|
/**
|
|
613
613
|
* Start cell editing
|
|
@@ -721,16 +721,16 @@ const Se = () => 'revogr-overlay-selection{display:block;position:relative;width
|
|
|
721
721
|
/**
|
|
722
722
|
* Sets the focus on a cell and optionally edits a range.
|
|
723
723
|
*/
|
|
724
|
-
focus(t, e = !1
|
|
724
|
+
focus(t, e = !1) {
|
|
725
725
|
if (!t)
|
|
726
726
|
return !1;
|
|
727
|
-
const
|
|
728
|
-
if (e &&
|
|
729
|
-
const
|
|
730
|
-
if (
|
|
731
|
-
return this.triggerRangeEvent(
|
|
727
|
+
const i = t, s = this.selectionStore.get("focus");
|
|
728
|
+
if (e && s) {
|
|
729
|
+
const o = m(s, i);
|
|
730
|
+
if (o)
|
|
731
|
+
return this.triggerRangeEvent(o);
|
|
732
732
|
}
|
|
733
|
-
return this.doFocus(t,
|
|
733
|
+
return this.doFocus(t, i);
|
|
734
734
|
}
|
|
735
735
|
get types() {
|
|
736
736
|
return {
|
|
@@ -753,7 +753,7 @@ const Se = () => 'revogr-overlay-selection{display:block;position:relative;width
|
|
|
753
753
|
};
|
|
754
754
|
}
|
|
755
755
|
get element() {
|
|
756
|
-
return
|
|
756
|
+
return F(this);
|
|
757
757
|
}
|
|
758
758
|
static get watchers() {
|
|
759
759
|
return {
|
|
@@ -911,7 +911,7 @@ const xe = () => "revogr-scroll-virtual[autohide]{position:absolute;z-index:100
|
|
|
911
911
|
} }));
|
|
912
912
|
}
|
|
913
913
|
get element() {
|
|
914
|
-
return
|
|
914
|
+
return F(this);
|
|
915
915
|
}
|
|
916
916
|
};
|
|
917
917
|
Re.style = xe();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as f, r as
|
|
2
|
-
import { d as E, c as D, j as S } from "./edit.utils-Dnnbd0xG-
|
|
1
|
+
import { t as f, r as c, c as n, h as v, a4 as g, H as m, f as y, l as w, a5 as C, p as b, a3 as h } from "./main-BlrUaWbt.js";
|
|
2
|
+
import { d as E, c as D, j as S } from "./edit.utils-Dnnbd0xG-9k4KfhPS.js";
|
|
3
3
|
/*!
|
|
4
4
|
* Built by Revolist OU ❤️
|
|
5
5
|
*/
|
|
@@ -60,7 +60,7 @@ class O {
|
|
|
60
60
|
*/
|
|
61
61
|
const A = class {
|
|
62
62
|
constructor(t) {
|
|
63
|
-
|
|
63
|
+
c(this, t), this.beforePaste = n(this, "beforepaste", 7), this.beforePasteApply = n(this, "beforepasteapply", 7), this.pasteRegion = n(this, "pasteregion", 7), this.afterPasteApply = n(this, "afterpasteapply", 7), this.beforeCut = n(this, "beforecut", 7), this.clearRegion = n(this, "clearregion", 7), this.beforeCopy = n(this, "beforecopy", 7), this.beforeCopyApply = n(this, "beforecopyapply", 7), this.copyRegion = n(this, "copyregion", 7);
|
|
64
64
|
}
|
|
65
65
|
onPaste(t) {
|
|
66
66
|
if (this.readonly)
|
|
@@ -142,9 +142,9 @@ const A = class {
|
|
|
142
142
|
getData(t) {
|
|
143
143
|
return t.clipboardData || (globalThis == null ? void 0 : globalThis.clipboardData);
|
|
144
144
|
}
|
|
145
|
-
}, R = () => "revogr-edit{display:block;position:absolute;background-color
|
|
145
|
+
}, R = () => "revogr-edit{display:block;position:absolute;background-color:#fff}revogr-edit input{height:100%;width:100%;box-sizing:border-box}revogr-edit revo-dropdown{height:100%}revogr-edit revo-dropdown.shrink fieldset legend>span{display:none}", x = class {
|
|
146
146
|
constructor(t) {
|
|
147
|
-
|
|
147
|
+
c(this, t), this.cellEdit = n(this, "celleditinit", 7), this.closeEdit = n(this, "closeedit", 7), this.saveOnClose = !1, this.currentEditor = null, this.preventSaveOnClose = !1;
|
|
148
148
|
}
|
|
149
149
|
/**
|
|
150
150
|
* Cancel pending changes flag. Editor will be closed without autosave.
|
|
@@ -235,7 +235,7 @@ class P {
|
|
|
235
235
|
if (this.currentCell === null)
|
|
236
236
|
return;
|
|
237
237
|
const r = this.getCell(e, i);
|
|
238
|
-
r.y < 0 ? r.y = 0 : r.y < this.currentCell.y && r.y++,
|
|
238
|
+
r.y !== this.currentCell.y && (r.y < 0 ? r.y = 0 : r.y < this.currentCell.y && r.y++, this.config.positionChanged(this.currentCell.y, r.y)), this.clear();
|
|
239
239
|
}
|
|
240
240
|
/** Drag started, reserve initial cell for farther use */
|
|
241
241
|
startOrder(e, i) {
|
|
@@ -251,7 +251,7 @@ class P {
|
|
|
251
251
|
}
|
|
252
252
|
/** Calculate cell based on x, y position */
|
|
253
253
|
getRow(e, { el: i, rows: r }) {
|
|
254
|
-
const { top: s } = i.getBoundingClientRect(), o = e - s, a = r.renderOffset || 0, l =
|
|
254
|
+
const { top: s } = i.getBoundingClientRect(), o = e - s, a = r.renderOffset || 0, l = h(r, o + a);
|
|
255
255
|
return {
|
|
256
256
|
itemIndex: l.itemIndex,
|
|
257
257
|
start: l.start - a + s,
|
|
@@ -260,13 +260,13 @@ class P {
|
|
|
260
260
|
}
|
|
261
261
|
/** Calculate cell based on x, y position */
|
|
262
262
|
getCell({ x: e, y: i }, { el: r, rows: s, cols: o }) {
|
|
263
|
-
const { top: a, left: l } = r.getBoundingClientRect(), d = i - a, u = e - l, p =
|
|
264
|
-
return { x:
|
|
263
|
+
const { top: a, left: l } = r.getBoundingClientRect(), d = i - a, u = e - l, p = h(s, d + (s.renderOffset || 0));
|
|
264
|
+
return { x: h(o, u + (o.renderOffset || 0)).itemIndex, y: p.itemIndex };
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
267
|
const k = class {
|
|
268
268
|
constructor(t) {
|
|
269
|
-
|
|
269
|
+
c(this, t), this.rowDragStart = n(this, "rowdragstartinit", 7), this.rowDragEnd = n(this, "rowdragendinit", 7), this.rowDrag = n(this, "rowdragmoveinit", 7), this.rowMouseMove = n(this, "rowdragmousemove", 7), this.rowDropped = n(this, "rowdropinit", 7), this.rowOrderChange = n(this, "roworderchange", 7), this.events = [], this.rowMoveFunc = w((e) => {
|
|
270
270
|
const i = this.rowOrderService.move(e, this.getData());
|
|
271
271
|
i !== null && this.rowDrag.emit(Object.assign(Object.assign({}, i), { rowType: this.rowType }));
|
|
272
272
|
}, 5);
|
|
@@ -278,11 +278,11 @@ const k = class {
|
|
|
278
278
|
const e = this.getData(), i = this.rowOrderService.startOrder(t.originalEvent, e), r = this.rowOrderService.getRow(t.originalEvent.y, e);
|
|
279
279
|
if (this.rowDragStart.emit({
|
|
280
280
|
cell: i,
|
|
281
|
-
text:
|
|
281
|
+
text: C,
|
|
282
282
|
pos: r,
|
|
283
283
|
event: t.originalEvent,
|
|
284
284
|
rowType: this.rowType,
|
|
285
|
-
model:
|
|
285
|
+
model: b(this.dataStore, r.itemIndex)
|
|
286
286
|
}).defaultPrevented)
|
|
287
287
|
return;
|
|
288
288
|
const o = (d) => this.move(d), a = (d) => this.endOrder(d), l = () => this.clearOrder();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a7 as W, a8 as B, a9 as U, h as a, aa as V, ab as E, ac as z, ad as F, ae as N, af as X, ag as K, ah as Y, r as x, c as v, N as Z, q, ai as J, aj as T, H, f as R, o as L, ak as D, al as Q, am as m, an as ee, ao as I, a0 as te, ap as re, aq as P, ar as M } from "./main-
|
|
2
|
-
import { L as ie, a as oe, g as k, t as le } from "./throttle-
|
|
1
|
+
import { a7 as W, a8 as B, a9 as U, h as a, aa as V, ab as E, ac as z, ad as F, ae as N, af as X, ag as K, ah as Y, r as x, c as v, N as Z, p as q, ai as J, aj as T, H, f as R, o as L, ak as D, al as Q, am as m, an as ee, ao as I, a0 as te, ap as re, aq as P, ar as M } from "./main-BlrUaWbt.js";
|
|
2
|
+
import { L as ie, a as oe, g as k, t as le } from "./throttle-CaUDyxyU-CzmFgDWB.js";
|
|
3
3
|
import { H as se, C as ne, F as ae } from "./viewport.helpers-CoCAvmZs-f555rwPU.js";
|
|
4
4
|
/*!
|
|
5
5
|
* Built by Revolist OU ❤️
|
|
@@ -675,7 +675,7 @@ const ze = () => ".rowHeaders{z-index:2;font-size:10px;display:flex;height:100%}
|
|
|
675
675
|
applyOnScroll(e, t, r = !1) {
|
|
676
676
|
const i = () => {
|
|
677
677
|
var o;
|
|
678
|
-
(o = this.localScrollService) === null || o === void 0 || o.scroll(t, e, void 0, void 0, r)
|
|
678
|
+
(o = this.localScrollService) === null || o === void 0 || o.scroll(t, e, void 0, void 0, r);
|
|
679
679
|
};
|
|
680
680
|
this.localScrollTimer.isReady(e, t) ? i() : this.localScrollTimer.throttleLastScrollUpdate(e, t, () => i());
|
|
681
681
|
}
|
package/dist/{revogr-filter-panel.entry-DlNZ6ZET.js → revogr-filter-panel.entry-CZEJCKFV.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as F, c as
|
|
1
|
+
import { r as F, c as v, l as I, J as w, h as s, K as C, L as k, M as D, H as E, f as O } from "./main-BlrUaWbt.js";
|
|
2
2
|
/*!
|
|
3
3
|
* Built by Revolist OU ❤️
|
|
4
4
|
*/
|
|
@@ -14,7 +14,7 @@ import { r as F, c as m, l as I, h as s, J as w, K as C, L as k, M as D, H as E,
|
|
|
14
14
|
});
|
|
15
15
|
})();
|
|
16
16
|
const y = "text/revogrid-filter-id";
|
|
17
|
-
function
|
|
17
|
+
function T(e, i) {
|
|
18
18
|
e && (e.effectAllowed = "move", e.setData(y, String(i)), e.setData("text/plain", String(i)));
|
|
19
19
|
}
|
|
20
20
|
function A(e) {
|
|
@@ -41,9 +41,9 @@ function b(e, i, t) {
|
|
|
41
41
|
n.relation = d === e.length - 1 ? "and" : (c = o[d]) !== null && c !== void 0 ? c : "and";
|
|
42
42
|
}), !0;
|
|
43
43
|
}
|
|
44
|
-
const
|
|
44
|
+
const S = () => '.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}revogr-filter-panel{display:block}revogr-filter-panel .filter-panel-dialog{position:fixed;top:0;left:0;z-index:100;max-height:calc(100vh - 16px);overflow:auto;opacity:1;transform:none;background-color:var(--revo-grid-filter-panel-bg, #fff);border:1px solid var(--revo-grid-filter-panel-border, #cecece);transform-origin:62px 0px;box-shadow:0 5px 18px -2px var(--revo-grid-filter-panel-shadow, rgba(0, 0, 0, 0.15));box-sizing:border-box;padding:10px;border-radius:8px;margin:0;min-width:220px;text-align:left;animation:revogr-filter-panel-open 140ms cubic-bezier(0.2, 0, 0, 1)}revogr-filter-panel .filter-panel-dialog .filter-holder>div{display:flex;flex-direction:column}revogr-filter-panel .filter-panel-dialog label{font-size:13px;display:block;padding:8px 0}revogr-filter-panel .filter-panel-dialog select{width:100%}revogr-filter-panel .filter-panel-dialog input[type=text]{border:0;min-height:34px;margin:5px 0;background:var(--revo-grid-filter-panel-input-bg, #f3f3f3);border-radius:5px;padding:0 10px;box-sizing:border-box;width:100%}revogr-filter-panel .filter-panel-dialog .filter-actions{position:sticky;right:0;bottom:-10px;left:0;z-index:1;text-align:right;margin:10px -10px -10px;padding:0 5px 10px 10px;background:var(--revo-grid-filter-panel-bg, #fff);border-top:1px solid var(--revo-grid-filter-panel-divider, #d9d9d9)}revogr-filter-panel .filter-panel-dialog .filter-actions button{margin-top:10px;margin-right:5px}@keyframes revogr-filter-panel-open{from{opacity:0;transform:translateY(-4px) scale(0.98)}to{opacity:1;transform:none}}@media (prefers-reduced-motion: reduce){revogr-filter-panel .filter-panel-dialog{animation:none}}.rgHeaderCell:hover .rv-filter{transition:opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms}.rgHeaderCell:hover .rv-filter,.rgHeaderCell .rv-filter.active{opacity:1}.rgHeaderCell .rv-filter{height:24px;width:24px;background:none;border:0;opacity:0;visibility:visible;cursor:pointer;border-radius:4px}.rgHeaderCell .rv-filter.active{color:#10224a}.rgHeaderCell .rv-filter .filter-img{color:gray;width:11px}.select-css{display:block;font-family:sans-serif;line-height:1.3;padding:0.6em 1.4em 0.5em 0.8em;width:100%;max-width:100%;box-sizing:border-box;margin:0;border:1px solid var(--revo-grid-filter-panel-select-border, #d9d9d9);box-shadow:transparent;border-radius:0.5em;appearance:none;background-color:var(--revo-grid-filter-panel-input-bg, #f3f3f3);background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat, repeat;background-position:right 0.7em top 50%, 0 0;background-size:0.65em auto, 100%;}.select-css::-ms-expand{display:none}.select-css:hover{border-color:var(--revo-grid-filter-panel-select-border, #d9d9d9)}.select-css:focus{border-color:var(--revo-grid-filter-panel-select-border-hover, #d9d9d9);box-shadow:0 0 1px 3px rgba(59, 153, 252, 0.7);box-shadow:0 0 0 3px -moz-mac-focusring;outline:none}.select-css option{font-weight:normal}.select-css:disabled,.select-css[aria-disabled=true]{color:gray;background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22graytext%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(to bottom, #ffffff 0%, #ffffff 100%)}.select-css:disabled:hover,.select-css[aria-disabled=true]{border-color:var(--revo-grid-filter-panel-select-border, #d9d9d9)}.multi-filter-list{margin-top:5px;margin-bottom:5px}.multi-filter-list div{white-space:nowrap}.multi-filter-list .multi-filter-list-row{display:flex;align-items:center;gap:6px;position:relative}.multi-filter-list .multi-filter-list-row.filter-row-dragging{opacity:0.65}.multi-filter-list .multi-filter-list-row.filter-row-drag-over::before{content:"";position:absolute;top:-4px;right:0;left:0;z-index:2;height:2px;background:var(--revo-grid-filter-panel-reorder-accent, #007cb2);border-radius:999px;box-shadow:0 0 0 2px var(--revo-grid-filter-panel-bg, #fff)}.multi-filter-list .multi-filter-list-row.filter-row-drop-active .filter-row-drop-target{pointer-events:auto}.multi-filter-list .filter-row-drop-target{position:absolute;inset:0;z-index:1;padding:0;pointer-events:none;background:transparent;border:0}.multi-filter-list .multi-filter-list-action{display:flex;align-self:stretch;flex:0 0 auto;justify-content:flex-end;align-items:center}.multi-filter-list .and-or-button{margin:0 0 0 10px;min-width:58px;cursor:pointer}.multi-filter-list .trash-button{margin:0 0 -2px 6px;padding:0;border:0;background:transparent;color:inherit;cursor:pointer;width:22px;height:100%;font-size:16px}.multi-filter-list .trash-button .trash-img{width:1em}.multi-filter-list .reorder-button{border:0;background:transparent;color:var(--revo-grid-filter-panel-reorder-color, #6b7280);cursor:grab;font-family:monospace;font-size:12px;letter-spacing:0;line-height:1;padding:6px 2px;transform:scaleX(0.8);width:16px}.multi-filter-list .reorder-button.filter-row-drag-over{color:var(--revo-grid-filter-panel-reorder-accent, #007cb2)}.multi-filter-list .reorder-button:active{cursor:grabbing}.multi-filter-list-container{padding:0;margin:0;list-style:none}.add-filter-divider{display:block;margin:0 -10px 10px -10px;border-bottom:1px solid var(--revo-grid-filter-panel-divider, #d9d9d9);height:10px}.select-input{display:flex;align-items:center;flex:1 1 auto;gap:6px;min-width:0}.select-input .select-filter,.select-input .filter-extra{flex:1 1 0;min-width:0}.select-input .select-filter{width:auto}.select-input .filter-extra{display:flex}.select-input .filter-extra>*{width:100%}.select-input input[type=text],.select-input input[type=date]{margin:0}', f = "none", _ = "multi-filter-list", L = "multi-filter-list-action", x = "add-filter", u = 8, R = class {
|
|
45
45
|
constructor(e) {
|
|
46
|
-
F(this, e), this.filterChange =
|
|
46
|
+
F(this, e), this.filterChange = v(this, "filterChange", 7), this.resetChange = v(this, "resetChange", 7), this.filterCaptionsInternal = {
|
|
47
47
|
title: "Filter by",
|
|
48
48
|
ok: "Close",
|
|
49
49
|
save: "Save",
|
|
@@ -64,13 +64,15 @@ const T = () => '.revo-button{position:relative;overflow:hidden;color:#fff;backg
|
|
|
64
64
|
onMouseDown(e) {
|
|
65
65
|
if (!this.changes)
|
|
66
66
|
return;
|
|
67
|
-
const i = e.composedPath(), t =
|
|
67
|
+
const i = e.composedPath(), t = document.getElementById(x);
|
|
68
68
|
if (t instanceof HTMLSelectElement) {
|
|
69
69
|
if (i.includes(t))
|
|
70
70
|
return;
|
|
71
71
|
t.value = f;
|
|
72
72
|
}
|
|
73
|
-
this.currentFilterType = f, this.changes && (this.changes.type = f), this.currentFilterId = -1
|
|
73
|
+
this.currentFilterType = f, this.changes && (this.changes.type = f), this.currentFilterId = -1;
|
|
74
|
+
const r = !i.includes(this.element);
|
|
75
|
+
e.target instanceof HTMLElement && r && !w(e.target) && this.closeOnOutsideClick && (this.changes = void 0);
|
|
74
76
|
}
|
|
75
77
|
async show(e) {
|
|
76
78
|
this.changes = e, this.filterItems = (e == null ? void 0 : e.filterItems) || {}, this.changes && (this.changes.type = this.changes.type || f);
|
|
@@ -96,14 +98,14 @@ const T = () => '.revo-button{position:relative;overflow:hidden;color:#fff;backg
|
|
|
96
98
|
let d;
|
|
97
99
|
if (l.hidden)
|
|
98
100
|
return;
|
|
99
|
-
n !== this.filterItems[t].length - 1 && (d = s(
|
|
100
|
-
const c = this.renderExtra(t, n), h = this.draggedFilterId === l.id, p = this.dragOverFilterId === l.id && !h,
|
|
101
|
+
n !== this.filterItems[t].length - 1 && (d = s(C, { text: l.relation === "and" ? o.and : o.or, onClick: () => this.toggleFilterAndOr(l.id) }));
|
|
102
|
+
const c = this.renderExtra(t, n), h = this.draggedFilterId === l.id, p = this.dragOverFilterId === l.id && !h, m = a > 1;
|
|
101
103
|
return s("li", { key: l.id, class: _, "aria-label": `${o.filterCondition} ${n + 1}` }, s("div", { class: {
|
|
102
104
|
"multi-filter-list-row": !0,
|
|
103
105
|
"filter-row-drop-active": this.draggedFilterId !== void 0 && !h,
|
|
104
106
|
"filter-row-dragging": h,
|
|
105
107
|
"filter-row-drag-over": p
|
|
106
|
-
} },
|
|
108
|
+
} }, m ? s("button", { type: "button", class: "filter-row-drop-target", tabIndex: -1, "aria-label": `${o.filterCondition} ${n + 1}`, onDragOver: (g) => this.onFilterDragOver(g, l.id), onDragLeave: () => this.onFilterDragLeave(l.id), onDrop: (g) => this.onFilterDrop(g, t, l.id) }) : "", m ? s(k, { ariaLabel: o.reorderFilter, dragging: h, dragOver: p, onDragStart: (g) => this.onFilterDragStart(g, l.id), onDragEnd: () => this.onFilterDragEnd(), onKeyDown: (g) => this.onFilterReorderKeyDown(g, t, l.id) }) : "", s("div", { class: { "select-input": !0 } }, s("select", { class: "select-css select-filter", onChange: (g) => this.onFilterTypeChange(g, t, n) }, this.renderSelectOptions(this.filterItems[t][n].type, !0)), c ? s("div", { class: "filter-extra" }, c) : ""), s("div", { class: L }, d, s(D, { ariaLabel: o.removeFilter, onClick: () => this.onRemoveFilter(l.id) }))));
|
|
107
109
|
})), r.filter((l) => !l.hidden).length > 0 ? s("div", { class: "add-filter-divider" }) : "");
|
|
108
110
|
}
|
|
109
111
|
componentDidRender() {
|
|
@@ -125,8 +127,8 @@ const T = () => '.revo-button{position:relative;overflow:hidden;color:#fff;backg
|
|
|
125
127
|
e.style.maxHeight = "", e.style.left = `${this.changes.x}px`, e.style.top = `${this.changes.y}px`;
|
|
126
128
|
const t = e.getBoundingClientRect(), r = (i = this.changes.anchorY) !== null && i !== void 0 ? i : this.changes.y, a = this.changes.y, o = Math.max(0, r - u), l = Math.max(0, window.innerHeight - a - u), n = t.height > l && o > l, d = Math.max(u, n ? o : l);
|
|
127
129
|
e.style.maxHeight = `${d}px`;
|
|
128
|
-
const c = e.getBoundingClientRect(), h = Math.max(u, window.innerWidth - c.width - u), p = Math.max(u, window.innerHeight - c.height - u),
|
|
129
|
-
e.style.left = `${
|
|
130
|
+
const c = e.getBoundingClientRect(), h = Math.max(u, window.innerWidth - c.width - u), p = Math.max(u, window.innerHeight - c.height - u), m = Math.min(Math.max(u, this.changes.x), h), g = Math.min(n ? Math.max(u, r - c.height) : Math.max(u, a), p);
|
|
131
|
+
e.style.left = `${m}px`, e.style.top = `${g}px`;
|
|
130
132
|
}
|
|
131
133
|
onFilterTypeChange(e, i, t) {
|
|
132
134
|
e.target instanceof HTMLSelectElement && (this.filterItems[i][t].type = e.target.value, this.filterId++, setTimeout(() => {
|
|
@@ -137,7 +139,7 @@ const T = () => '.revo-button{position:relative;overflow:hidden;color:#fff;backg
|
|
|
137
139
|
onAddNewFilter(e) {
|
|
138
140
|
const i = e.target;
|
|
139
141
|
this.currentFilterType = i.value, this.addNewFilterToProp();
|
|
140
|
-
const t =
|
|
142
|
+
const t = document.getElementById("add-filter");
|
|
141
143
|
t && (t.value = f, this.currentFilterType = f), this.disableDynamicFiltering || this.debouncedApplyFilter();
|
|
142
144
|
}
|
|
143
145
|
addNewFilterToProp() {
|
|
@@ -173,7 +175,7 @@ const T = () => '.revo-button{position:relative;overflow:hidden;color:#fff;backg
|
|
|
173
175
|
a !== -1 && (r.splice(a, 1), r.length === 0 && delete this.filterItems[t ?? ""], this.disableDynamicFiltering || this.debouncedApplyFilter());
|
|
174
176
|
}
|
|
175
177
|
onFilterDragStart(e, i) {
|
|
176
|
-
this.draggedFilterId = i,
|
|
178
|
+
this.draggedFilterId = i, T(e.dataTransfer, i);
|
|
177
179
|
}
|
|
178
180
|
onFilterDragOver(e, i) {
|
|
179
181
|
this.draggedFilterId === void 0 || this.draggedFilterId === i || (e.preventDefault(), e.dataTransfer && (e.dataTransfer.dropEffect = "move"), this.dragOverFilterId = i);
|
|
@@ -249,7 +251,7 @@ const T = () => '.revo-button{position:relative;overflow:hidden;color:#fff;backg
|
|
|
249
251
|
const r = (n) => {
|
|
250
252
|
this.filterItems[e][i].value = n, this.disableDynamicFiltering || this.debouncedApplyFilter();
|
|
251
253
|
}, a = () => {
|
|
252
|
-
const n =
|
|
254
|
+
const n = document.getElementById("add-filter");
|
|
253
255
|
n && (n.value = f, this.currentFilterType = f, this.addNewFilterToProp(), n.focus());
|
|
254
256
|
}, o = Object.assign(Object.assign({}, this.filterCaptionsInternal), this.filterCaptions), l = this.filterEntities[t[i].type].extra;
|
|
255
257
|
return typeof l == "function" ? l(s, {
|
|
@@ -268,36 +270,19 @@ const T = () => '.revo-button{position:relative;overflow:hidden;color:#fff;backg
|
|
|
268
270
|
n.target instanceof HTMLInputElement && r(n.target.value);
|
|
269
271
|
}, onKeyDown: (n) => {
|
|
270
272
|
if (n.key.toLowerCase() === "enter") {
|
|
271
|
-
|
|
273
|
+
document.getElementById("add-filter") && a();
|
|
272
274
|
return;
|
|
273
275
|
}
|
|
274
276
|
n.stopPropagation();
|
|
275
277
|
} });
|
|
276
278
|
}
|
|
277
|
-
getAddFilterSelect() {
|
|
278
|
-
return this.element.querySelector(`#${x}`);
|
|
279
|
-
}
|
|
280
|
-
isOwnFilterButton(e) {
|
|
281
|
-
if (!(e instanceof Element) || !D(e))
|
|
282
|
-
return !1;
|
|
283
|
-
const i = this.getOwningGrid(this.element), t = this.getOwningGrid(e);
|
|
284
|
-
return !!i && i === t;
|
|
285
|
-
}
|
|
286
|
-
getOwningGrid(e) {
|
|
287
|
-
const i = e.closest("revo-grid");
|
|
288
|
-
if (i)
|
|
289
|
-
return i;
|
|
290
|
-
const t = e.getRootNode();
|
|
291
|
-
if (t instanceof ShadowRoot && t.host.localName === "revo-grid")
|
|
292
|
-
return t.host;
|
|
293
|
-
}
|
|
294
279
|
render() {
|
|
295
280
|
var e, i, t, r, a, o, l, n, d;
|
|
296
281
|
const c = {
|
|
297
282
|
left: `${(i = (e = this.changes) === null || e === void 0 ? void 0 : e.x) !== null && i !== void 0 ? i : 0}px`,
|
|
298
283
|
top: `${(r = (t = this.changes) === null || t === void 0 ? void 0 : t.y) !== null && r !== void 0 ? r : 0}px`
|
|
299
284
|
}, h = Object.assign(Object.assign({}, this.filterCaptionsInternal), this.filterCaptions);
|
|
300
|
-
return s(E, { key: "
|
|
285
|
+
return s(E, { key: "4e969f8b7033363c885c94b1f7770917786669f2" }, s("dialog", { key: "79b2713724684fa99f56621fe43645a0b0ad54bf", class: "filter-panel-dialog", style: c, ref: (p) => this.dialog = p, onCancel: (p) => {
|
|
301
286
|
p.preventDefault(), this.onCancel();
|
|
302
287
|
} }, this.changes && [
|
|
303
288
|
s("slot", { key: "header-slot", slot: "header" }),
|
|
@@ -305,7 +290,7 @@ const T = () => '.revo-button{position:relative;overflow:hidden;color:#fff;backg
|
|
|
305
290
|
((l = this.changes) === null || l === void 0 ? void 0 : l.hideDefaultFilters) !== !0 && [
|
|
306
291
|
s("label", { key: "filter-title" }, h.title),
|
|
307
292
|
s("div", { key: "filter-holder", class: "filter-holder" }, this.getFilterItemsList()),
|
|
308
|
-
s("div", { key: "add-filter", class: "add-filter" }, s("select", { key: "
|
|
293
|
+
s("div", { key: "add-filter", class: "add-filter" }, s("select", { key: "fc894bdfae1ff35d5c49adc7646dd3182b7bd49e", id: x, class: "select-css", onChange: (p) => this.onAddNewFilter(p) }, this.renderSelectOptions(this.currentFilterType)))
|
|
309
294
|
],
|
|
310
295
|
s("slot", { key: "default-slot" }),
|
|
311
296
|
((d = (n = this.changes).extraBottomContent) === null || d === void 0 ? void 0 : d.call(n, this.changes)) || "",
|
|
@@ -323,7 +308,7 @@ const T = () => '.revo-button{position:relative;overflow:hidden;color:#fff;backg
|
|
|
323
308
|
return O(this);
|
|
324
309
|
}
|
|
325
310
|
};
|
|
326
|
-
|
|
311
|
+
R.style = S();
|
|
327
312
|
export {
|
|
328
|
-
|
|
313
|
+
R as revogr_filter_panel
|
|
329
314
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as h } from "./viewport.helpers-CoCAvmZs-f555rwPU.js";
|
|
2
|
-
import { as as
|
|
2
|
+
import { as as g, l as d } from "./main-BlrUaWbt.js";
|
|
3
3
|
/*!
|
|
4
4
|
* Built by Revolist OU ❤️
|
|
5
5
|
*/
|
|
@@ -9,14 +9,14 @@ const c = {
|
|
|
9
9
|
virtualSize: 0,
|
|
10
10
|
maxSize: 0
|
|
11
11
|
}, e = -1;
|
|
12
|
-
function
|
|
12
|
+
function v(a, i, t = 0) {
|
|
13
13
|
return h({
|
|
14
14
|
contentSize: a,
|
|
15
15
|
clientSize: i,
|
|
16
16
|
virtualSize: t
|
|
17
17
|
}).physicalContentSize;
|
|
18
18
|
}
|
|
19
|
-
class
|
|
19
|
+
class C {
|
|
20
20
|
constructor(i) {
|
|
21
21
|
this.cfg = i, this.preventArtificialScroll = {
|
|
22
22
|
rgRow: null,
|
|
@@ -130,9 +130,6 @@ class p {
|
|
|
130
130
|
setCoordinate(i) {
|
|
131
131
|
this.lastKnownScrollCoordinate[i.dimension] = i.coordinate;
|
|
132
132
|
}
|
|
133
|
-
setCoordinateFromScroll(i) {
|
|
134
|
-
this.setCoordinate(i), this.mouseWheelScrollTimestamp[i.dimension] = 0;
|
|
135
|
-
}
|
|
136
133
|
/**
|
|
137
134
|
* Remember last mw event time
|
|
138
135
|
*/
|
|
@@ -164,12 +161,12 @@ class p {
|
|
|
164
161
|
}
|
|
165
162
|
}
|
|
166
163
|
}
|
|
167
|
-
var
|
|
164
|
+
var m = "Expected a function";
|
|
168
165
|
function f(a, i, t) {
|
|
169
166
|
var o = !0, l = !0;
|
|
170
167
|
if (typeof a != "function")
|
|
171
|
-
throw new TypeError(
|
|
172
|
-
return
|
|
168
|
+
throw new TypeError(m);
|
|
169
|
+
return g(t) && (o = "leading" in t ? !!t.leading : o, l = "trailing" in t ? !!t.trailing : l), d(a, i, {
|
|
173
170
|
leading: o,
|
|
174
171
|
maxWait: i,
|
|
175
172
|
trailing: l
|
|
@@ -177,7 +174,7 @@ function f(a, i, t) {
|
|
|
177
174
|
}
|
|
178
175
|
export {
|
|
179
176
|
p as L,
|
|
180
|
-
|
|
181
|
-
|
|
177
|
+
C as a,
|
|
178
|
+
v as g,
|
|
182
179
|
f as t
|
|
183
180
|
};
|