@endge/ui-vue 0.25.1 → 0.25.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/{edit.utils-Dnnbd0xG-DNaocRiD.js → edit.utils-3ZbhQCv_-CBOvR_lX.js} +1 -1
- package/dist/{main-BP5C1P4E.js → main-DaAnRozo.js} +6667 -5831
- package/dist/revo-grid.entry-raK8rO6x.js +1793 -0
- package/dist/{revogr-attribution_7.entry-BIvAtXU9.js → revogr-attribution_7.entry-BT5lTuRW.js} +147 -127
- package/dist/{revogr-clipboard_3.entry-fEIDIy8M.js → revogr-clipboard_3.entry-C-dE9MUm.js} +6 -6
- package/dist/{revogr-data_4.entry-BqTBgL2e.js → revogr-data_4.entry-C9qNfzLe.js} +232 -178
- package/dist/revogr-filter-panel.entry-Belk-lw4.js +335 -0
- package/dist/throttle-3rhqdcLy-E1CC2r0m.js +183 -0
- package/dist/ui/filter/EndgeFilterField.vue.d.ts +3 -2
- package/dist/ui/filter/EndgeFilterRenderer.vue.d.ts +2 -1
- package/dist/ui/layout/EndgeShell.vue.d.ts +13 -15
- package/dist/ui/overlay/EndgeContextMenuRoot.vue.d.ts +2 -3
- package/dist/ui/overlay/tooltip/EndgeTooltipRoot.vue.d.ts +2 -3
- package/dist/ui/render/entities/EndgePage.vue.d.ts +1099 -1103
- package/dist/ui/render/sfc/NativeMultiSelect.vue.d.ts +2 -6
- package/dist/ui/render/sfc/SFC_Renderer.vue.d.ts +2 -1
- package/dist/ui/render/sfc/SFC_RuntimeRenderer.vue.d.ts +2 -1
- package/dist/ui/table/NativeTablePagination.vue.d.ts +3 -2
- package/dist/vue.js +32 -32
- package/package.json +11 -10
- package/dist/revo-grid.entry-Cxli453d.js +0 -1602
- package/dist/revogr-filter-panel.entry-CRk0VYPG.js +0 -314
- package/dist/store/domain.d.ts +0 -91
- package/dist/throttle-CaUDyxyU-CoHkeYqM.js +0 -180
package/dist/{revogr-attribution_7.entry-BIvAtXU9.js → revogr-attribution_7.entry-BT5lTuRW.js}
RENAMED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
import { v as
|
|
3
|
-
import { i as z, a as
|
|
1
|
+
import { r as v, h as c, H as b, c as a, u as O, f as E, O as L, P as p, Q as H, U as T, W, X as m, Y as A, Z as u, V as B, s as P, _ as V, $ as D, a0 as K, a1 as $, q as S, t as N, a2 as U, m as G, a3 as X, n as Y, a4 as _ } from "./main-DaAnRozo.js";
|
|
2
|
+
import { v as q, g as C } from "./events-BvSmBueA-Doh7RyHn.js";
|
|
3
|
+
import { i as z, a as k, b as Q, c as Z, d as J, e as ee, f as te, g as ie, h as se } from "./edit.utils-3ZbhQCv_-CBOvR_lX.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-3rhqdcLy-E1CC2r0m.js";
|
|
6
6
|
/*!
|
|
7
7
|
* Built by Revolist OU ❤️
|
|
8
8
|
*/
|
|
9
9
|
const _e = class {
|
|
10
10
|
constructor(t) {
|
|
11
|
-
|
|
11
|
+
v(this, t);
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return c(
|
|
14
|
+
return c(b, { key: "3d66475a019010c24b6c610ccc047e01c35178f9" }, c("a", { key: "777afddffef0309a697b9c14ee73c0001ac22b71", href: "https://rv-grid.com/guide/attribution", target: "_blank", rel: "noopener noreferrer", title: "Made with ❤️ by Revolist OU Team", class: "value" }, "RevoGrid"));
|
|
15
15
|
}
|
|
16
|
-
},
|
|
16
|
+
}, ke = class {
|
|
17
17
|
constructor(t) {
|
|
18
|
-
|
|
18
|
+
v(this, t), this.nodes = [], this.update = 1;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Refreshes the extra component. Useful if you want to manually
|
|
@@ -50,26 +50,26 @@ function M(t, e) {
|
|
|
50
50
|
}
|
|
51
51
|
return i;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function j(t, e) {
|
|
54
54
|
if (t.defaultPrevented)
|
|
55
55
|
return null;
|
|
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 = F({ x: i, y: s }, e);
|
|
60
60
|
return w(o, e.lastCell) ? null : o;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
const { top: n, left: r, height:
|
|
62
|
+
function F({ x: t, y: e }, { el: i, rows: s, cols: o }) {
|
|
63
|
+
const { top: n, left: r, height: l, width: h } = i.getBoundingClientRect();
|
|
64
64
|
let d = e - n, g = t - r;
|
|
65
|
-
d >=
|
|
66
|
-
const
|
|
67
|
-
return R.itemIndex < 0 && (R.itemIndex = 0),
|
|
65
|
+
d >= l && (d = l - 1), g >= h && (g = h - 1);
|
|
66
|
+
const f = _(s, d + (s.renderOffset || 0)), R = _(o, g + (o.renderOffset || 0));
|
|
67
|
+
return R.itemIndex < 0 && (R.itemIndex = 0), f.itemIndex < 0 && (f.itemIndex = 0), { x: R.itemIndex, y: f.itemIndex };
|
|
68
68
|
}
|
|
69
69
|
function ce(t, e, i, s = !1) {
|
|
70
70
|
const o = (n, r = 0) => {
|
|
71
|
-
const
|
|
72
|
-
return d[n] += r, { start:
|
|
71
|
+
const l = { x: t.x, y: t.y }, h = s ? { x: t.x1, y: t.y1 } : l, d = h[n] > e[n] ? h : l;
|
|
72
|
+
return d[n] += r, { start: l, end: h };
|
|
73
73
|
};
|
|
74
74
|
return i.x ? o("x", i.x) : i.y ? o("y", i.y) : null;
|
|
75
75
|
}
|
|
@@ -88,19 +88,19 @@ function x(t) {
|
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
90
|
function y({ x: t, y: e, x1: i, y1: s }, o, n) {
|
|
91
|
-
const r = o.renderOffset || 0,
|
|
91
|
+
const r = o.renderOffset || 0, l = n.renderOffset || 0, h = S(o, e).start - r, d = S(n, t).start - l, g = S(o, s).end - r, f = S(n, i).end - l;
|
|
92
92
|
return {
|
|
93
93
|
left: d,
|
|
94
|
-
right:
|
|
94
|
+
right: f,
|
|
95
95
|
top: h,
|
|
96
96
|
bottom: g,
|
|
97
|
-
width:
|
|
97
|
+
width: f - d,
|
|
98
98
|
height: g - h
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
-
const he = () => "revogr-focus.focused-cell{box-shadow:-1px 0 0
|
|
101
|
+
const he = () => "revogr-focus.focused-cell{box-shadow:-1px 0 0 var(--rg-theme-selection-border) inset, 1px 0 0 var(--rg-theme-selection-border) inset, 0 -1px 0 var(--rg-theme-selection-border) inset, 0 1px 0 var(--rg-theme-selection-border) inset;position:absolute;pointer-events:none;z-index:9;display:block !important}", de = class {
|
|
102
102
|
constructor(e) {
|
|
103
|
-
|
|
103
|
+
v(this, e), this.beforeFocusRender = a(this, "beforefocusrender", 7), this.beforeScrollIntoView = a(this, "beforescrollintoview", 7), this.afterFocus = a(this, "afterfocus", 7), this.focusTemplate = null, this.activeFocus = null;
|
|
104
104
|
}
|
|
105
105
|
componentDidRender() {
|
|
106
106
|
var e, i;
|
|
@@ -137,14 +137,14 @@ const he = () => "revogr-focus.focused-cell{box-shadow:-1px 0 0 #0d63e8 inset, 1
|
|
|
137
137
|
});
|
|
138
138
|
if (o.defaultPrevented)
|
|
139
139
|
return c("slot", null);
|
|
140
|
-
const { detail: n } = o, r = y(n.range, o.detail.rowDimension, o.detail.colDimension),
|
|
140
|
+
const { detail: n } = o, r = y(n.range, o.detail.rowDimension, o.detail.colDimension), l = x(r), h = (e = this.focusTemplate) === null || e === void 0 ? void 0 : e.call(this, c, n), d = {
|
|
141
141
|
class: { [$]: !0 },
|
|
142
|
-
style:
|
|
142
|
+
style: l
|
|
143
143
|
};
|
|
144
|
-
return c(
|
|
144
|
+
return c(b, Object.assign({}, d), c("slot", null), h);
|
|
145
145
|
}
|
|
146
146
|
get el() {
|
|
147
|
-
return
|
|
147
|
+
return E(this);
|
|
148
148
|
}
|
|
149
149
|
};
|
|
150
150
|
de.style = he();
|
|
@@ -157,17 +157,21 @@ const ue = [
|
|
|
157
157
|
];
|
|
158
158
|
class ge {
|
|
159
159
|
constructor(e) {
|
|
160
|
-
this.sv = e;
|
|
160
|
+
this.sv = e, this.keyChangeQueue = Promise.resolve(!1), this.keyChangeGeneration = 0, this.applyingKeyChange = !1;
|
|
161
|
+
}
|
|
162
|
+
/** Cancel delayed directional input after focus or edit context changes externally. */
|
|
163
|
+
invalidatePendingChanges() {
|
|
164
|
+
this.applyingKeyChange || (this.keyChangeGeneration += 1);
|
|
161
165
|
}
|
|
162
166
|
/**
|
|
163
167
|
* Appends printable key input that arrives after edit mode was requested
|
|
164
168
|
* but before the editor input has mounted or received focus.
|
|
165
169
|
*/
|
|
166
170
|
appendPendingEditValue(e) {
|
|
167
|
-
if (
|
|
171
|
+
if (k(e) || e.key.length !== 1 || e.target instanceof HTMLElement && z(e.target))
|
|
168
172
|
return !1;
|
|
169
173
|
const i = this.sv.selectionStore.get("edit");
|
|
170
|
-
return typeof (i == null ? void 0 : i.val) != "string" ? !1 : (this.sv.selectionStore.set("edit", Object.assign(Object.assign({}, i), { val: `${i.val}${e.key}` })), !0);
|
|
174
|
+
return typeof (i == null ? void 0 : i.val) != "string" ? !1 : (e.preventDefault(), this.sv.selectionStore.set("edit", Object.assign(Object.assign({}, i), { val: `${i.val}${e.key}` })), !0);
|
|
171
175
|
}
|
|
172
176
|
async keyDown(e, i, s, { range: o, focus: n }) {
|
|
173
177
|
if (s) {
|
|
@@ -188,7 +192,7 @@ class ge {
|
|
|
188
192
|
return;
|
|
189
193
|
}
|
|
190
194
|
if (n) {
|
|
191
|
-
if (
|
|
195
|
+
if (Z(e.code)) {
|
|
192
196
|
this.keyChangeSelection(e, i);
|
|
193
197
|
return;
|
|
194
198
|
}
|
|
@@ -205,8 +209,8 @@ class ge {
|
|
|
205
209
|
i && this.selectAll(e);
|
|
206
210
|
return;
|
|
207
211
|
}
|
|
208
|
-
if (!
|
|
209
|
-
this.sv.change(e.key);
|
|
212
|
+
if (!k(e) && e.key.length === 1) {
|
|
213
|
+
this.sv.change(e.key) && e.preventDefault();
|
|
210
214
|
return;
|
|
211
215
|
}
|
|
212
216
|
await this.keyChangeSelection(e, i);
|
|
@@ -221,9 +225,24 @@ class ge {
|
|
|
221
225
|
const s = this.changeDirectionKey(e, i);
|
|
222
226
|
if (!s)
|
|
223
227
|
return !1;
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
228
|
+
const o = this.keyChangeGeneration;
|
|
229
|
+
await N(Y + 30);
|
|
230
|
+
const n = async () => {
|
|
231
|
+
if (o !== this.keyChangeGeneration)
|
|
232
|
+
return !1;
|
|
233
|
+
const l = this.sv.selectionStore.get("range"), h = this.sv.selectionStore.get("focus");
|
|
234
|
+
this.applyingKeyChange = !0;
|
|
235
|
+
let d;
|
|
236
|
+
try {
|
|
237
|
+
d = this.keyPositionChange(s.changes, l, h, s.isMulti);
|
|
238
|
+
} finally {
|
|
239
|
+
this.applyingKeyChange = !1;
|
|
240
|
+
}
|
|
241
|
+
return await new Promise((g) => requestAnimationFrame(() => {
|
|
242
|
+
requestAnimationFrame(() => g());
|
|
243
|
+
})), d;
|
|
244
|
+
}, r = this.keyChangeQueue.then(n, n);
|
|
245
|
+
return this.keyChangeQueue = r.catch(() => !1), r;
|
|
227
246
|
}
|
|
228
247
|
keyPositionChange(e, i, s, o = !1) {
|
|
229
248
|
if (!i || !s)
|
|
@@ -261,7 +280,7 @@ class ge {
|
|
|
261
280
|
}
|
|
262
281
|
}
|
|
263
282
|
}
|
|
264
|
-
class
|
|
283
|
+
class ve {
|
|
265
284
|
constructor(e) {
|
|
266
285
|
this.sv = e, this.autoFillType = null, this.autoFillInitial = null, this.autoFillStart = null, this.autoFillLast = null;
|
|
267
286
|
}
|
|
@@ -291,7 +310,7 @@ class fe {
|
|
|
291
310
|
* Process mouse move events
|
|
292
311
|
*/
|
|
293
312
|
selectionMouseMove(e) {
|
|
294
|
-
this.onMouseMoveAutofill || (this.onMouseMoveAutofill =
|
|
313
|
+
this.onMouseMoveAutofill || (this.onMouseMoveAutofill = G((i, s) => this.doAutofillMouseMove(i, s), 5)), this.isAutoFill && this.onMouseMoveAutofill(e, this.sv.getData());
|
|
295
314
|
}
|
|
296
315
|
getFocus(e, i) {
|
|
297
316
|
return !e && i && (e = { x: i.x, y: i.y }), e || null;
|
|
@@ -306,15 +325,15 @@ class fe {
|
|
|
306
325
|
const s = C(e, "clientX", p), o = C(e, "clientY", p);
|
|
307
326
|
if (s === null || o === null)
|
|
308
327
|
return;
|
|
309
|
-
const n =
|
|
328
|
+
const n = F({ x: s, y: o }, i);
|
|
310
329
|
if (this.autoFillLast || this.autoFillLast || (this.autoFillLast = this.autoFillStart), w(n, i.lastCell))
|
|
311
330
|
return;
|
|
312
331
|
if (this.autoFillLast = n, n.x === this.autoFillInitial.x && n.y === this.autoFillInitial.y)
|
|
313
332
|
this.sv.setTempRange(null);
|
|
314
333
|
else {
|
|
315
|
-
const
|
|
334
|
+
const l = m(this.autoFillInitial, this.autoFillLast);
|
|
316
335
|
this.sv.setTempRange({
|
|
317
|
-
area:
|
|
336
|
+
area: l,
|
|
318
337
|
type: this.autoFillType
|
|
319
338
|
});
|
|
320
339
|
}
|
|
@@ -327,7 +346,7 @@ class fe {
|
|
|
327
346
|
*/
|
|
328
347
|
selectionStart(e, i, s = "Selection") {
|
|
329
348
|
const { top: o, left: n } = e.getBoundingClientRect();
|
|
330
|
-
this.autoFillInitial = this.getFocus(i.focus, i.range), this.autoFillType = s, this.autoFillStart =
|
|
349
|
+
this.autoFillInitial = this.getFocus(i.focus, i.range), this.autoFillType = s, this.autoFillStart = F({ x: n, y: o }, i);
|
|
331
350
|
}
|
|
332
351
|
/**
|
|
333
352
|
* Clear current range selection on mouse up and mouse leave events
|
|
@@ -397,7 +416,7 @@ class fe {
|
|
|
397
416
|
this.sv.setRange(s);
|
|
398
417
|
}
|
|
399
418
|
}
|
|
400
|
-
function
|
|
419
|
+
function fe(t, e) {
|
|
401
420
|
var i;
|
|
402
421
|
if (!pe(e))
|
|
403
422
|
return null;
|
|
@@ -416,9 +435,9 @@ function me(t) {
|
|
|
416
435
|
function ye(t) {
|
|
417
436
|
return !t || t.every((e) => e === "");
|
|
418
437
|
}
|
|
419
|
-
const
|
|
438
|
+
const be = () => 'revogr-overlay-selection{display:block;position:relative;width:100%}revogr-overlay-selection .autofill-handle{position:absolute;width:14px;height:14px;margin-left:-13px;margin-top:-13px;z-index:10;cursor:crosshair}revogr-overlay-selection .autofill-handle::before{content:"";position:absolute;right:0;bottom:0;width:10px;height:10px;background:var(--rg-theme-autofill-handle-bg);border:1px solid var(--rg-theme-autofill-handle-border);box-sizing:border-box}revogr-overlay-selection.mobile .autofill-handle{position:absolute;width:30px;height:30px;margin-left:-29px;margin-top:-29px;z-index:10;cursor:crosshair}revogr-overlay-selection.mobile .autofill-handle::before{content:"";position:absolute;right:0;bottom:0;width:12px;height:12px;background:var(--rg-theme-autofill-handle-bg);border:1px solid var(--rg-theme-autofill-handle-border);box-sizing:border-box}revogr-overlay-selection .selection-border-range{position:absolute;pointer-events:none;z-index:9;background-color:var(--rg-theme-selection-bg)}revogr-overlay-selection .selection-border-range .range-handlers{height:100%;background-color:transparent;width:75%;max-width:50px;min-width:20px;left:50%;transform:translateX(-50%);position:absolute}revogr-overlay-selection .selection-border-range .range-handlers>span{pointer-events:auto;height:20px;width:20px;position:absolute;left:50%;transform:translateX(-50%)}revogr-overlay-selection .selection-border-range .range-handlers>span:before,revogr-overlay-selection .selection-border-range .range-handlers>span:after{position:absolute;border-radius:5px;width:15px;height:5px;left:50%;transform:translateX(-50%);background-color:var(--rg-theme-range-handle-bg)}revogr-overlay-selection .selection-border-range .range-handlers>span:first-child{top:-7px}revogr-overlay-selection .selection-border-range .range-handlers>span:first-child:before{content:"";top:0}revogr-overlay-selection .selection-border-range .range-handlers>span:last-child{bottom:-7px}revogr-overlay-selection .selection-border-range .range-handlers>span:last-child:after{content:"";bottom:0}revogr-overlay-selection .selection-border-range{box-shadow:-1px 0 0 var(--rg-theme-selection-border) inset, 1px 0 0 var(--rg-theme-selection-border) inset, 0 -1px 0 var(--rg-theme-selection-border) inset, 0 1px 0 var(--rg-theme-selection-border) inset}revogr-overlay-selection revogr-edit{z-index:10}', Se = class {
|
|
420
439
|
constructor(t) {
|
|
421
|
-
|
|
440
|
+
v(this, t), this.beforeCopyRegion = a(this, "beforecopyregion", 7), this.beforeRegionPaste = a(this, "beforepasteregion", 7), this.cellEditApply = a(this, "celleditapply", 7), this.beforeFocusCell = a(this, "beforecellfocusinit", 7), this.beforeNextViewportFocus = a(this, "beforenextvpfocus", 7), this.setEdit = a(this, "setedit", 7), this.beforeApplyRange = a(this, "beforeapplyrange", 7), this.beforeSetRange = a(this, "beforesetrange", 7), this.setRange = a(this, "setrange", 7), this.beforeEditRender = a(this, "beforeeditrender", 7), this.selectAll = a(this, "selectall", 7), this.cancelEdit = a(this, "canceledit", 7), this.setTempRange = a(this, "settemprange", 7), this.beforeSetTempRange = a(this, "beforesettemprange", 7), this.applyFocus = a(this, "applyfocus", 7), this.focusCell = a(this, "focuscell", 7), this.beforeRangeDataApply = a(this, "beforerangedataapply", 7), this.selectionChange = a(this, "selectionchangeinit", 7), this.beforeRangeCopyApply = a(this, "beforerangecopyapply", 7), this.rangeEditApply = a(this, "rangeeditapply", 7), this.rangeClipboardCopy = a(this, "clipboardrangecopy", 7), this.rangeClipboardPaste = a(this, "clipboardrangepaste", 7), this.beforeKeyDown = a(this, "beforekeydown", 7), this.beforeKeyUp = a(this, "beforekeyup", 7), this.beforeCellSave = a(this, "beforecellsave", 7), this.cellEditDone = a(this, "celledit", 7), this.applyChangesOnClose = !1, this.keyboardService = null, this.autoFillService = null, this.unsubscribeSelectionStore = [];
|
|
422
441
|
}
|
|
423
442
|
// #endregion
|
|
424
443
|
// #region Listeners
|
|
@@ -466,26 +485,31 @@ const Se = () => 'revogr-overlay-selection{display:block;position:relative;width
|
|
|
466
485
|
* Selection & Keyboard
|
|
467
486
|
*/
|
|
468
487
|
selectionServiceSet(t) {
|
|
469
|
-
|
|
488
|
+
var e;
|
|
489
|
+
(e = this.keyboardService) === null || e === void 0 || e.invalidatePendingChanges(), this.unsubscribeSelectionStore.forEach((i) => i()), this.unsubscribeSelectionStore.length = 0, this.unsubscribeSelectionStore.push(t.onChange("nextFocus", (i) => i && this.doFocus(i, i))), this.keyboardService = new ge({
|
|
470
490
|
selectionStore: t,
|
|
471
|
-
range: (
|
|
472
|
-
focus: (
|
|
473
|
-
change: (
|
|
474
|
-
this.readonly || this.doEdit(e);
|
|
475
|
-
},
|
|
491
|
+
range: (i) => !!i && this.triggerRangeEvent(i),
|
|
492
|
+
focus: (i, s, o) => o ? (this.beforeNextViewportFocus.emit(i), !1) : this.doFocus(i, i, s),
|
|
493
|
+
change: (i) => this.doEdit(i),
|
|
476
494
|
cancel: async () => {
|
|
477
|
-
var
|
|
478
|
-
await ((
|
|
495
|
+
var i;
|
|
496
|
+
await ((i = this.revogrEdit) === null || i === void 0 ? void 0 : i.cancelChanges()), this.closeEdit();
|
|
479
497
|
},
|
|
480
498
|
clearCell: () => !this.readonly && this.clearCell(),
|
|
481
499
|
internalPaste: () => !this.readonly && this.beforeRegionPaste.emit(),
|
|
482
500
|
getData: () => this.getData(),
|
|
483
501
|
selectAll: () => this.selectAll.emit()
|
|
484
|
-
}), this.
|
|
502
|
+
}), this.unsubscribeSelectionStore.push(t.onChange("focus", () => {
|
|
503
|
+
var i;
|
|
504
|
+
return (i = this.keyboardService) === null || i === void 0 ? void 0 : i.invalidatePendingChanges();
|
|
505
|
+
}), t.onChange("edit", () => {
|
|
506
|
+
var i;
|
|
507
|
+
return (i = this.keyboardService) === null || i === void 0 ? void 0 : i.invalidatePendingChanges();
|
|
508
|
+
})), this.createAutoFillService();
|
|
485
509
|
}
|
|
486
510
|
/** Autofill */
|
|
487
511
|
createAutoFillService() {
|
|
488
|
-
this.autoFillService = new
|
|
512
|
+
this.autoFillService = new ve({
|
|
489
513
|
dimensionRow: this.dimensionRow,
|
|
490
514
|
dimensionCol: this.dimensionCol,
|
|
491
515
|
columnService: this.columnService,
|
|
@@ -511,8 +535,8 @@ const Se = () => 'revogr-overlay-selection{display:block;position:relative;width
|
|
|
511
535
|
this.columnServiceSet(), this.selectionServiceSet(this.selectionStore);
|
|
512
536
|
}
|
|
513
537
|
disconnectedCallback() {
|
|
514
|
-
var t;
|
|
515
|
-
this.unsubscribeSelectionStore.forEach((
|
|
538
|
+
var t, e;
|
|
539
|
+
(t = this.keyboardService) === null || t === void 0 || t.invalidatePendingChanges(), this.unsubscribeSelectionStore.forEach((i) => i()), this.unsubscribeSelectionStore.length = 0, (e = this.columnService) === null || e === void 0 || e.destroy();
|
|
516
540
|
}
|
|
517
541
|
async componentWillRender() {
|
|
518
542
|
var t, e;
|
|
@@ -520,9 +544,7 @@ const Se = () => 'revogr-overlay-selection{display:block;position:relative;width
|
|
|
520
544
|
}
|
|
521
545
|
renderRange(t) {
|
|
522
546
|
const e = y(t, this.dimensionRow.state, this.dimensionCol.state), i = x(e);
|
|
523
|
-
return
|
|
524
|
-
c("div", { class: H, style: i }, this.isMobileDevice && c("div", { class: "range-handlers" }, c("span", { class: p }), c("span", { class: p })))
|
|
525
|
-
];
|
|
547
|
+
return c("div", { class: H, style: i }, this.isMobileDevice && c("div", { class: "range-handlers" }, c("span", { class: p }), c("span", { class: p })));
|
|
526
548
|
}
|
|
527
549
|
renderEditor() {
|
|
528
550
|
const t = this.selectionStore.get("edit");
|
|
@@ -549,10 +571,10 @@ const Se = () => 'revogr-overlay-selection{display:block;position:relative;width
|
|
|
549
571
|
e.push(i);
|
|
550
572
|
else {
|
|
551
573
|
const s = this.selectionStore.get("range"), o = this.selectionStore.get("focus");
|
|
552
|
-
(s || o) && this.useClipboard && e.push(c("revogr-clipboard", { readonly: this.readonly, onCopyregion: (n) => this.onCopy(n.detail), onClearregion: () => !this.readonly && this.clearCell(), ref: (n) => this.clipboard = n, onPasteregion: (n) => this.onPaste(n.detail) })), s && e.push(
|
|
574
|
+
(s || o) && this.useClipboard && e.push(c("revogr-clipboard", { readonly: this.readonly, onCopyregion: (n) => this.onCopy(n.detail), onClearregion: () => !this.readonly && this.clearCell(), ref: (n) => this.clipboard = n, onPasteregion: (n) => this.onPaste(n.detail) })), s && e.push(this.renderRange(s)), o && !this.readonly && this.range && e.push((t = this.autoFillService) === null || t === void 0 ? void 0 : t.renderAutofill(s, o, this.isMobileDevice)), this.canDrag && e.push(c("revogr-order-editor", { ref: (n) => this.orderEditor = n, dataStore: this.dataStore, dimensionRow: this.dimensionRow, dimensionCol: this.dimensionCol, parent: this.element, rowType: this.types.rowType, onRowdragstartinit: (n) => this.rowDragStart(n) }));
|
|
553
575
|
}
|
|
554
|
-
return c(
|
|
555
|
-
key: "
|
|
576
|
+
return c(b, {
|
|
577
|
+
key: "230e2122c5c7065c072f02019d616a64949d54d0",
|
|
556
578
|
class: { mobile: this.isMobileDevice },
|
|
557
579
|
onDblClick: (s) => this.onElementDblClick(s),
|
|
558
580
|
onMouseDown: (s) => this.onElementMouseDown(s),
|
|
@@ -560,34 +582,34 @@ const Se = () => 'revogr-overlay-selection{display:block;position:relative;width
|
|
|
560
582
|
onCloseedit: (s) => this.closeEdit(s),
|
|
561
583
|
// it's done to be able to throw events from different levels, not just from editor
|
|
562
584
|
onCelledit: (s) => this.onEditCell(s)
|
|
563
|
-
}, e, c("slot", { key: "
|
|
585
|
+
}, e, c("slot", { key: "47740a79c605258b4024384510358be927d000b7", name: "data" }));
|
|
564
586
|
}
|
|
565
587
|
/**
|
|
566
588
|
* Executes the focus operation on the specified range of cells.
|
|
567
589
|
*/
|
|
568
|
-
doFocus(t, e, i) {
|
|
569
|
-
const { defaultPrevented:
|
|
570
|
-
if (
|
|
590
|
+
doFocus(t, e, i, s) {
|
|
591
|
+
const { defaultPrevented: o } = this.beforeFocusCell.emit(Object.assign(Object.assign({}, this.columnService.getSaveData(t.y, t.x)), { originalEvent: s }));
|
|
592
|
+
if (o)
|
|
571
593
|
return !1;
|
|
572
|
-
const
|
|
573
|
-
if (
|
|
594
|
+
const n = 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), originalEvent: s }), r = this.applyFocus.emit(n);
|
|
595
|
+
if (r.defaultPrevented)
|
|
574
596
|
return !1;
|
|
575
|
-
const { range:
|
|
597
|
+
const { range: l } = r.detail;
|
|
576
598
|
return !this.focusCell.emit(Object.assign({ focus: {
|
|
577
|
-
x:
|
|
578
|
-
y:
|
|
599
|
+
x: l.x,
|
|
600
|
+
y: l.y
|
|
579
601
|
}, end: {
|
|
580
|
-
x:
|
|
581
|
-
y:
|
|
582
|
-
} },
|
|
602
|
+
x: l.x1,
|
|
603
|
+
y: l.y1
|
|
604
|
+
} }, r.detail)).defaultPrevented;
|
|
583
605
|
}
|
|
584
|
-
triggerRangeEvent(t) {
|
|
585
|
-
const
|
|
586
|
-
if (
|
|
606
|
+
triggerRangeEvent(t, e) {
|
|
607
|
+
const i = this.types.rowType, s = 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), originalEvent: e }));
|
|
608
|
+
if (s.defaultPrevented)
|
|
587
609
|
return !1;
|
|
588
|
-
const
|
|
589
|
-
let
|
|
590
|
-
return
|
|
610
|
+
const o = this.columnService.getRangeTransformedToProps(s.detail.range, this.dataStore);
|
|
611
|
+
let n = this.beforeSetRange.emit(o);
|
|
612
|
+
return n.defaultPrevented || (n = this.setRange.emit(Object.assign(Object.assign({}, s.detail.range), { type: i })), n.defaultPrevented) ? !1 : !n.defaultPrevented;
|
|
591
613
|
}
|
|
592
614
|
/**
|
|
593
615
|
* Open Editor on DblClick
|
|
@@ -596,7 +618,7 @@ const Se = () => 'revogr-overlay-selection{display:block;position:relative;width
|
|
|
596
618
|
if (t.defaultPrevented)
|
|
597
619
|
return;
|
|
598
620
|
const e = this.getData();
|
|
599
|
-
|
|
621
|
+
j(t, e) && this.doEdit();
|
|
600
622
|
}
|
|
601
623
|
/**
|
|
602
624
|
* Handle mouse down event on Host element
|
|
@@ -606,21 +628,20 @@ const Se = () => 'revogr-overlay-selection{display:block;position:relative;width
|
|
|
606
628
|
const s = t.target;
|
|
607
629
|
if (z(s) || t.defaultPrevented)
|
|
608
630
|
return;
|
|
609
|
-
const o = this.getData(), n =
|
|
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 ?
|
|
631
|
+
const o = this.getData(), n = j(t, o);
|
|
632
|
+
n && (this.focus(n, this.range && t.shiftKey, t), this.range && (s && ((i = this.autoFillService) === null || i === void 0 || i.selectionStart(s, this.getData())), e ? q(t.touches[0], p) && t.preventDefault() : t.preventDefault()));
|
|
611
633
|
}
|
|
612
634
|
/**
|
|
613
635
|
* Start cell editing
|
|
614
636
|
*/
|
|
615
637
|
doEdit(t = "") {
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
}
|
|
638
|
+
if (!this.canEdit())
|
|
639
|
+
return !1;
|
|
640
|
+
const e = this.selectionStore.get("focus");
|
|
641
|
+
if (!e)
|
|
642
|
+
return !1;
|
|
643
|
+
const i = this.columnService.getSaveData(e.y, e.x);
|
|
644
|
+
return !this.setEdit.emit(Object.assign(Object.assign({}, i), { val: t })).defaultPrevented;
|
|
624
645
|
}
|
|
625
646
|
/**
|
|
626
647
|
* Close editor event triggered
|
|
@@ -649,12 +670,12 @@ const Se = () => 'revogr-overlay-selection{display:block;position:relative;width
|
|
|
649
670
|
return !1;
|
|
650
671
|
let o;
|
|
651
672
|
if (i) {
|
|
652
|
-
const { data: n, mapping: r } = this.columnService.copyRangeArray(i, this.dataStore),
|
|
673
|
+
const { data: n, mapping: r } = this.columnService.copyRangeArray(i, this.dataStore), l = this.rangeClipboardCopy.emit(Object.assign({
|
|
653
674
|
range: i,
|
|
654
675
|
data: n,
|
|
655
676
|
mapping: r
|
|
656
677
|
}, this.types));
|
|
657
|
-
|
|
678
|
+
l.defaultPrevented || (o = l.detail.data);
|
|
658
679
|
}
|
|
659
680
|
return (e = this.clipboard) === null || e === void 0 || e.doCopy(t, o), !0;
|
|
660
681
|
}
|
|
@@ -663,14 +684,14 @@ const Se = () => 'revogr-overlay-selection{display:block;position:relative;width
|
|
|
663
684
|
const i = this.selectionStore.get("focus"), s = this.selectionStore.get("edit") !== null;
|
|
664
685
|
if (!i || s)
|
|
665
686
|
return;
|
|
666
|
-
const o =
|
|
667
|
-
let { changed: r, range:
|
|
687
|
+
const o = fe(t, this.useClipboard), n = o ? this.getClipboardPasteTargetRange() : null;
|
|
688
|
+
let { changed: r, range: l } = this.columnService.getTransformedDataToApply({
|
|
668
689
|
start: i,
|
|
669
690
|
data: o || t,
|
|
670
691
|
targetRange: n
|
|
671
692
|
});
|
|
672
|
-
const { defaultPrevented: h } = this.rangeClipboardPaste.emit(Object.assign({ data: r, models: M(r, this.dataStore), range:
|
|
673
|
-
h || (e = this.autoFillService) === null || e === void 0 || e.onRangeApply(r,
|
|
693
|
+
const { defaultPrevented: h } = this.rangeClipboardPaste.emit(Object.assign({ data: r, models: M(r, this.dataStore), range: l }, this.types));
|
|
694
|
+
h || (e = this.autoFillService) === null || e === void 0 || e.onRangeApply(r, l, l);
|
|
674
695
|
}
|
|
675
696
|
getClipboardPasteTargetRange() {
|
|
676
697
|
const t = this.selectionStore.get("range");
|
|
@@ -684,12 +705,11 @@ const Se = () => 'revogr-overlay-selection{display:block;position:relative;width
|
|
|
684
705
|
}
|
|
685
706
|
clearCell() {
|
|
686
707
|
var t;
|
|
687
|
-
const e = this.selectionStore.get("range");
|
|
688
|
-
if (e && !A(e)) {
|
|
689
|
-
const
|
|
690
|
-
(t = this.autoFillService) === null || t === void 0 || t.onRangeApply(
|
|
708
|
+
const e = this.selectionStore.get("range"), i = this.selectionStore.get("focus");
|
|
709
|
+
if (e && (!A(e) || !i)) {
|
|
710
|
+
const s = this.columnService.getRangeStaticData(e, "");
|
|
711
|
+
(t = this.autoFillService) === null || t === void 0 || t.onRangeApply(s, e, e);
|
|
691
712
|
} else if (this.canEdit()) {
|
|
692
|
-
const i = this.selectionStore.get("focus");
|
|
693
713
|
if (!i)
|
|
694
714
|
return;
|
|
695
715
|
const s = this.columnService.getSaveData(i.y, i.x);
|
|
@@ -721,16 +741,16 @@ const Se = () => 'revogr-overlay-selection{display:block;position:relative;width
|
|
|
721
741
|
/**
|
|
722
742
|
* Sets the focus on a cell and optionally edits a range.
|
|
723
743
|
*/
|
|
724
|
-
focus(t, e = !1) {
|
|
744
|
+
focus(t, e = !1, i) {
|
|
725
745
|
if (!t)
|
|
726
746
|
return !1;
|
|
727
|
-
const
|
|
728
|
-
if (e &&
|
|
729
|
-
const
|
|
730
|
-
if (
|
|
731
|
-
return this.triggerRangeEvent(
|
|
747
|
+
const s = t, o = this.selectionStore.get("focus");
|
|
748
|
+
if (e && o) {
|
|
749
|
+
const n = m(o, s);
|
|
750
|
+
if (n)
|
|
751
|
+
return this.triggerRangeEvent(n, i);
|
|
732
752
|
}
|
|
733
|
-
return this.doFocus(t, i);
|
|
753
|
+
return this.doFocus(t, s, void 0, i);
|
|
734
754
|
}
|
|
735
755
|
get types() {
|
|
736
756
|
return {
|
|
@@ -753,7 +773,7 @@ const Se = () => 'revogr-overlay-selection{display:block;position:relative;width
|
|
|
753
773
|
};
|
|
754
774
|
}
|
|
755
775
|
get element() {
|
|
756
|
-
return
|
|
776
|
+
return E(this);
|
|
757
777
|
}
|
|
758
778
|
static get watchers() {
|
|
759
779
|
return {
|
|
@@ -775,17 +795,17 @@ const Se = () => 'revogr-overlay-selection{display:block;position:relative;width
|
|
|
775
795
|
};
|
|
776
796
|
}
|
|
777
797
|
};
|
|
778
|
-
|
|
798
|
+
Se.style = be();
|
|
779
799
|
const Ce = (t) => (e, { rowIndex: i }) => t + i, Ie = class {
|
|
780
800
|
constructor(t) {
|
|
781
|
-
|
|
801
|
+
v(this, t), this.scrollViewport = a(this, "scrollview", 3), this.elementToScroll = a(this, "ref", 3), this.jobsBeforeRender = [];
|
|
782
802
|
}
|
|
783
803
|
render() {
|
|
784
804
|
const t = [], e = new B("colPinStart");
|
|
785
805
|
let i = 1;
|
|
786
806
|
for (let r of this.dataPorts) {
|
|
787
|
-
const
|
|
788
|
-
d.updateData([g]), t.push(c("revogr-data", Object.assign({}, r, { colType: "rowHeaders", jobsBeforeRender: this.jobsBeforeRender, rowClass: this.rowClass, dataStore: h.store, colData: d.store, viewportCol: e.store, readonly: !0, range: !1 }))), i +=
|
|
807
|
+
const l = r.dataStore.get("items").length, h = new P(r.type, Object.assign({}, r.dataStore.state)), d = new P("colPinStart"), g = Object.assign({ cellTemplate: Ce(i) }, this.rowHeaderColumn);
|
|
808
|
+
d.updateData([g]), t.push(c("revogr-data", Object.assign({}, r, { colType: "rowHeaders", jobsBeforeRender: this.jobsBeforeRender, rowClass: this.rowClass, dataStore: h.store, colData: d.store, viewportCol: e.store, readonly: !0, range: !1 }))), i += l;
|
|
789
809
|
}
|
|
790
810
|
const s = V(i, this.rowHeaderColumn);
|
|
791
811
|
e.setViewport({
|
|
@@ -817,7 +837,7 @@ const Ce = (t) => (e, { rowIndex: i }) => t + i, Ie = class {
|
|
|
817
837
|
// parent,
|
|
818
838
|
slot: oe
|
|
819
839
|
});
|
|
820
|
-
return c(
|
|
840
|
+
return c(b, { class: { [D]: !0 }, key: D }, c("revogr-viewport-scroll", Object.assign({ key: "c401e82e02e4bdb7afb25f2f49c6776f2e115c81" }, o, { "row-header": !0 }), c("revogr-header", Object.assign({ key: "3c73d27bd96e23a34fc0cf47eda4d2e65751df98" }, n)), t));
|
|
821
841
|
}
|
|
822
842
|
};
|
|
823
843
|
class we {
|
|
@@ -848,7 +868,7 @@ class we {
|
|
|
848
868
|
}
|
|
849
869
|
const xe = () => "revogr-scroll-virtual[autohide]{position:absolute;z-index:100 !important}revogr-scroll-virtual[autohide].vertical{top:0;right:0}revogr-scroll-virtual[autohide].vertical[visible]{min-width:20px !important}revogr-scroll-virtual[autohide].horizontal{bottom:0;left:0}revogr-scroll-virtual[autohide].horizontal[visible]{min-height:20px !important}revogr-scroll-virtual.vertical{overflow-y:auto;overflow-x:hidden;height:100%}revogr-scroll-virtual.vertical>div{width:1px}revogr-scroll-virtual.horizontal{overflow-x:auto;overflow-y:hidden;width:100%}revogr-scroll-virtual.horizontal>div{height:1px}", Re = class {
|
|
850
870
|
constructor(t) {
|
|
851
|
-
|
|
871
|
+
v(this, t), this.scrollVirtual = a(this, "scrollvirtual", 7), this.dimension = "rgRow", this.scrollSize = 0;
|
|
852
872
|
}
|
|
853
873
|
async setScroll(t) {
|
|
854
874
|
var e;
|
|
@@ -882,7 +902,7 @@ const xe = () => "revogr-scroll-virtual[autohide]{position:absolute;z-index:100
|
|
|
882
902
|
this.autohideScrollPlugin.clear();
|
|
883
903
|
}
|
|
884
904
|
componentWillLoad() {
|
|
885
|
-
this.scrollSize =
|
|
905
|
+
this.scrollSize = K(document);
|
|
886
906
|
}
|
|
887
907
|
componentDidRender() {
|
|
888
908
|
let t = 0;
|
|
@@ -906,18 +926,18 @@ const xe = () => "revogr-scroll-virtual[autohide]{position:absolute;z-index:100
|
|
|
906
926
|
}
|
|
907
927
|
render() {
|
|
908
928
|
const t = le(this.realSize, this.dimension === "rgRow" ? this.element.clientHeight : this.element.clientWidth, this.clientSize);
|
|
909
|
-
return c(
|
|
929
|
+
return c(b, { key: "7213817ef941eee4050b714266598ec0c2961ee9", onScroll: (e) => this.onScroll(e) }, c("div", { key: "501da49c63253ab943172494b9dbf5399be56cee", style: {
|
|
910
930
|
[this.dimension === "rgRow" ? "height" : "width"]: `${t}px`
|
|
911
931
|
} }));
|
|
912
932
|
}
|
|
913
933
|
get element() {
|
|
914
|
-
return
|
|
934
|
+
return E(this);
|
|
915
935
|
}
|
|
916
936
|
};
|
|
917
937
|
Re.style = xe();
|
|
918
|
-
const De = () => ".temp-bg-range{display:block !important;position:absolute;pointer-events:none;z-index:9;border:1px solid
|
|
938
|
+
const De = () => ".temp-bg-range{display:block !important;position:absolute;pointer-events:none;z-index:9;border:1px solid var(--rg-theme-temporary-range-border);box-sizing:border-box}.temp-bg-range.Selection{border:1px dashed var(--rg-theme-temporary-selection-border)}.temp-bg-range>div{width:1px;height:1px;position:absolute}.temp-bg-range>div.top{top:-1px}.temp-bg-range>div.bottom{bottom:-1px}.temp-bg-range>div.left{left:-1px}.temp-bg-range>div.right{right:-1px}", Oe = class {
|
|
919
939
|
constructor(t) {
|
|
920
|
-
|
|
940
|
+
v(this, t), this.onChange = ae((e) => this.doChange(e), 300);
|
|
921
941
|
}
|
|
922
942
|
doChange(t) {
|
|
923
943
|
t == null || t.scrollIntoView({
|
|
@@ -937,15 +957,15 @@ const De = () => ".temp-bg-range{display:block !important;position:absolute;poin
|
|
|
937
957
|
if (!o)
|
|
938
958
|
return;
|
|
939
959
|
t.y < o.y && (i = "top"), t.x < o.x && (s = "left");
|
|
940
|
-
const n = `${s} ${i}`, r = y(t, this.dimensionRow.state, this.dimensionCol.state),
|
|
960
|
+
const n = `${s} ${i}`, r = y(t, this.dimensionRow.state, this.dimensionCol.state), l = x(r), h = {
|
|
941
961
|
class: {
|
|
942
|
-
[
|
|
962
|
+
[X]: !0,
|
|
943
963
|
[e || ""]: !0
|
|
944
964
|
},
|
|
945
|
-
style:
|
|
965
|
+
style: l,
|
|
946
966
|
hidden: !1
|
|
947
967
|
};
|
|
948
|
-
return c(
|
|
968
|
+
return c(b, Object.assign({}, h), c("div", { class: n, ref: (d) => this.el = d }));
|
|
949
969
|
}
|
|
950
970
|
getRange() {
|
|
951
971
|
const t = this.selectionStore.get("range");
|
|
@@ -958,9 +978,9 @@ const De = () => ".temp-bg-range{display:block !important;position:absolute;poin
|
|
|
958
978
|
Oe.style = De();
|
|
959
979
|
export {
|
|
960
980
|
_e as revogr_attribution,
|
|
961
|
-
|
|
981
|
+
ke as revogr_extra,
|
|
962
982
|
de as revogr_focus,
|
|
963
|
-
|
|
983
|
+
Se as revogr_overlay_selection,
|
|
964
984
|
Ie as revogr_row_headers,
|
|
965
985
|
Re as revogr_scroll_virtual,
|
|
966
986
|
Oe as revogr_temp_range
|