x-block-lib 0.6.48 → 0.6.49
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/index.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
var Sc = Object.defineProperty;
|
|
11
11
|
var kc = (e, t, n) => t in e ? Sc(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
12
12
|
var zs = (e, t, n) => kc(e, typeof t != "symbol" ? t + "" : t, n);
|
|
13
|
-
import { getCurrentScope as Nc, onScopeDispose as Lc, computed as Ne, toValue as ir, watch as Dt, shallowRef as Bc, getCurrentInstance as ei, onMounted as en, defineComponent as ut, onBeforeUnmount as sr, resolveComponent as Pe, createBlock as gt, openBlock as Le, unref as j, withCtx as Tt, createVNode as ye, mergeProps as Es, useModel as Jn, toRefs as Rc, ref as Ft, reactive as Dc, h as qi, nextTick as As, onUnmounted as io, isRef as Qt, provide as Mc, inject as xc, resolveDirective as Pc, withDirectives as Uc, createElementBlock as ft, normalizeStyle as
|
|
13
|
+
import { getCurrentScope as Nc, onScopeDispose as Lc, computed as Ne, toValue as ir, watch as Dt, shallowRef as Bc, getCurrentInstance as ei, onMounted as en, defineComponent as ut, onBeforeUnmount as sr, resolveComponent as Pe, createBlock as gt, openBlock as Le, unref as j, withCtx as Tt, createVNode as ye, mergeProps as Es, useModel as Jn, toRefs as Rc, ref as Ft, reactive as Dc, h as qi, nextTick as As, onUnmounted as io, isRef as Qt, provide as Mc, inject as xc, resolveDirective as Pc, withDirectives as Uc, createElementBlock as ft, normalizeStyle as ct, createElementVNode as nt, toDisplayString as ti, withModifiers as Yn, mergeModels as Zi, Fragment as ar, renderList as wc, useId as Qi, withKeys as rr, createCommentVNode as Zt, useTemplateRef as Vc } from "vue";
|
|
14
14
|
import { d as C, j as r, O as u, f as Fc, F as lr, M as g, E as x, r as Js, u as G, X as nn, B as S, i as q, a as es, s as Xe, b as on, c as $t, e as mt, g as qs, h as be, C as cr, k as Yc, P as ts, N as vs, V as Un, l as Ht, m as ur, n as $c, S as He, o as So, p as gn, q as dn, t as Eo, v as Si, w as Mn, x as Zs, G as ki, y as Hc, T as ni, z as pr, A as _r, D as Kc, H as Gc, I as jc, J as Wc } from "./blockly-eckqnj1d.js";
|
|
15
15
|
import { openConfirmDlg as Xc, openPromptDlg as zc, eventBus as Qe, messageWarning as hr, useColor as oi, useSystem as dr, useViewStack as Is } from "x-essential-lib";
|
|
16
16
|
import { elements as Ve, pkgs as qn, getPropTag as ii, parsePixelStr as Jc, parsePercentStr as qc } from "x-runtime-lib";
|
|
@@ -745,8 +745,8 @@ function hh(e, t, n) {
|
|
|
745
745
|
function os(e) {
|
|
746
746
|
return hh(e, wp, _h);
|
|
747
747
|
}
|
|
748
|
-
var is = an(pt, "DataView"), ss = an(pt, "Promise"), as = an(pt, "Set"), ga = "[object Map]", dh = "[object Object]", Ta = "[object Promise]", Ea = "[object Set]", Aa = "[object WeakMap]", va = "[object DataView]", fh = sn(is), mh = sn(Qn), gh = sn(ss), Th = sn(as), Eh = sn(ns),
|
|
749
|
-
(is &&
|
|
748
|
+
var is = an(pt, "DataView"), ss = an(pt, "Promise"), as = an(pt, "Set"), ga = "[object Map]", dh = "[object Object]", Ta = "[object Promise]", Ea = "[object Set]", Aa = "[object WeakMap]", va = "[object DataView]", fh = sn(is), mh = sn(Qn), gh = sn(ss), Th = sn(as), Eh = sn(ns), lt = Ln;
|
|
749
|
+
(is && lt(new is(new ArrayBuffer(1))) != va || Qn && lt(new Qn()) != ga || ss && lt(ss.resolve()) != Ta || as && lt(new as()) != Ea || ns && lt(new ns()) != Aa) && (lt = function(e) {
|
|
750
750
|
var t = Ln(e), n = t == dh ? e.constructor : void 0, o = n ? sn(n) : "";
|
|
751
751
|
if (o)
|
|
752
752
|
switch (o) {
|
|
@@ -829,11 +829,11 @@ function Xh(e) {
|
|
|
829
829
|
}
|
|
830
830
|
var zh = "[object Map]";
|
|
831
831
|
function Jh(e) {
|
|
832
|
-
return Kt(e) &&
|
|
832
|
+
return Kt(e) && lt(e) == zh;
|
|
833
833
|
}
|
|
834
834
|
var ya = yn && yn.isMap, qh = ya ? ys(ya) : Jh, Zh = "[object Set]";
|
|
835
835
|
function Qh(e) {
|
|
836
|
-
return Kt(e) &&
|
|
836
|
+
return Kt(e) && lt(e) == Zh;
|
|
837
837
|
}
|
|
838
838
|
var ba = yn && yn.isSet, ed = ba ? ys(ba) : Qh, Yr = "[object Arguments]", td = "[object Array]", nd = "[object Boolean]", od = "[object Date]", id = "[object Error]", $r = "[object Function]", sd = "[object GeneratorFunction]", ad = "[object Map]", rd = "[object Number]", Hr = "[object Object]", ld = "[object RegExp]", cd = "[object Set]", ud = "[object String]", pd = "[object Symbol]", _d = "[object WeakMap]", hd = "[object ArrayBuffer]", dd = "[object DataView]", fd = "[object Float32Array]", md = "[object Float64Array]", gd = "[object Int8Array]", Td = "[object Int16Array]", Ed = "[object Int32Array]", Ad = "[object Uint8Array]", vd = "[object Uint8ClampedArray]", Id = "[object Uint16Array]", Od = "[object Uint32Array]", ue = {};
|
|
839
839
|
ue[Yr] = ue[td] = ue[hd] = ue[dd] = ue[nd] = ue[od] = ue[fd] = ue[md] = ue[gd] = ue[Td] = ue[Ed] = ue[ad] = ue[rd] = ue[Hr] = ue[ld] = ue[cd] = ue[ud] = ue[pd] = ue[Ad] = ue[vd] = ue[Id] = ue[Od] = !0;
|
|
@@ -848,7 +848,7 @@ function ko(e, t, n, o, i, s) {
|
|
|
848
848
|
if (c)
|
|
849
849
|
a = Ih(e);
|
|
850
850
|
else {
|
|
851
|
-
var l =
|
|
851
|
+
var l = lt(e), _ = l == $r || l == sd;
|
|
852
852
|
if (Po(e))
|
|
853
853
|
return rh(e);
|
|
854
854
|
if (l == Hr || l == Yr || _ && !i)
|
|
@@ -1016,7 +1016,7 @@ function Zd(e, t, n, o, i, s) {
|
|
|
1016
1016
|
}
|
|
1017
1017
|
var Qd = 1, Sa = "[object Arguments]", ka = "[object Array]", Ao = "[object Object]", ef = Object.prototype, Na = ef.hasOwnProperty;
|
|
1018
1018
|
function tf(e, t, n, o, i, s) {
|
|
1019
|
-
var a = On(e), c = On(t), l = a ? ka :
|
|
1019
|
+
var a = On(e), c = On(t), l = a ? ka : lt(e), _ = c ? ka : lt(t);
|
|
1020
1020
|
l = l == Sa ? Ao : l, _ = _ == Sa ? Ao : _;
|
|
1021
1021
|
var h = l == Ao, d = _ == Ao, T = l == _;
|
|
1022
1022
|
if (T && Po(e)) {
|
|
@@ -4338,7 +4338,7 @@ function ze(e) {
|
|
|
4338
4338
|
const { spaces: t } = L.data, n = t.find((o) => o.id === e);
|
|
4339
4339
|
return n ? n.tables : [];
|
|
4340
4340
|
}
|
|
4341
|
-
function
|
|
4341
|
+
function ot(e, t) {
|
|
4342
4342
|
const { spaces: n } = L.data, o = n.find((i) => i.id === e);
|
|
4343
4343
|
if (o)
|
|
4344
4344
|
return o.tables.find((i) => i.id === t);
|
|
@@ -4550,14 +4550,14 @@ const Zf = {
|
|
|
4550
4550
|
return;
|
|
4551
4551
|
}
|
|
4552
4552
|
const n = t.id !== this.space.id;
|
|
4553
|
-
if (this.space.id = t.id, this.space.name = t.name, n || !
|
|
4553
|
+
if (this.space.id = t.id, this.space.name = t.name, n || !ot(this.space.id, this.table.id)) {
|
|
4554
4554
|
const s = ((i = (o = ze(this.space.id)) == null ? void 0 : o[0]) == null ? void 0 : i.id) ?? "", a = this.getField("TABLE");
|
|
4555
4555
|
a.getOptions(!1), a.setValue(s, !1), this.onTableChange_(s);
|
|
4556
4556
|
}
|
|
4557
4557
|
},
|
|
4558
4558
|
onTableChange_: function(e) {
|
|
4559
4559
|
var o, i;
|
|
4560
|
-
const t =
|
|
4560
|
+
const t = ot(this.space.id, e);
|
|
4561
4561
|
if (!t) {
|
|
4562
4562
|
console.assert(!1);
|
|
4563
4563
|
return;
|
|
@@ -4603,7 +4603,7 @@ const Zf = {
|
|
|
4603
4603
|
return;
|
|
4604
4604
|
}
|
|
4605
4605
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
4606
|
-
const t =
|
|
4606
|
+
const t = ot(this.space.id, this.table.id);
|
|
4607
4607
|
if (!t) {
|
|
4608
4608
|
this.setWarningText(g.WARN_TABLE_NOT_AVAILABLE);
|
|
4609
4609
|
return;
|
|
@@ -5182,13 +5182,13 @@ const hm = {
|
|
|
5182
5182
|
return;
|
|
5183
5183
|
}
|
|
5184
5184
|
const n = t.id !== this.space.id;
|
|
5185
|
-
if (this.space.id = t.id, this.space.name = t.name, n || !
|
|
5185
|
+
if (this.space.id = t.id, this.space.name = t.name, n || !ot(this.space.id, this.table.id)) {
|
|
5186
5186
|
const s = ((i = (o = ze(this.space.id)) == null ? void 0 : o[0]) == null ? void 0 : i.id) ?? "", a = this.getField("TABLE");
|
|
5187
5187
|
a.getOptions(!1), a.setValue(s, !1), this.onTableChange_(s);
|
|
5188
5188
|
}
|
|
5189
5189
|
},
|
|
5190
5190
|
onTableChange_: function(e) {
|
|
5191
|
-
const t =
|
|
5191
|
+
const t = ot(this.space.id, e);
|
|
5192
5192
|
if (!t) {
|
|
5193
5193
|
console.assert(!1);
|
|
5194
5194
|
return;
|
|
@@ -5281,7 +5281,7 @@ const hm = {
|
|
|
5281
5281
|
return;
|
|
5282
5282
|
}
|
|
5283
5283
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
5284
|
-
const t =
|
|
5284
|
+
const t = ot(this.space.id, this.table.id);
|
|
5285
5285
|
if (!t) {
|
|
5286
5286
|
this.setWarningText(g.WARN_TABLE_NOT_AVAILABLE);
|
|
5287
5287
|
return;
|
|
@@ -5368,13 +5368,13 @@ const dm = {
|
|
|
5368
5368
|
return;
|
|
5369
5369
|
}
|
|
5370
5370
|
let n = !1;
|
|
5371
|
-
if (t.id !== this.space.id && (n = !0), this.space.id = t.id, this.space.name = t.name, this.getField("TABLE").getOptions(!1), n || !
|
|
5371
|
+
if (t.id !== this.space.id && (n = !0), this.space.id = t.id, this.space.name = t.name, this.getField("TABLE").getOptions(!1), n || !ot(this.space.id, this.table.id)) {
|
|
5372
5372
|
const s = (i = ze(this.space.id)) == null ? void 0 : i[0];
|
|
5373
5373
|
s ? this.setFieldValue(s.id, "TABLE") : this.setFieldValue("", "TABLE");
|
|
5374
5374
|
}
|
|
5375
5375
|
},
|
|
5376
5376
|
onTableChange_: function(e) {
|
|
5377
|
-
const t =
|
|
5377
|
+
const t = ot(this.space.id, e);
|
|
5378
5378
|
if (!t) {
|
|
5379
5379
|
console.assert(!1);
|
|
5380
5380
|
return;
|
|
@@ -5388,7 +5388,7 @@ const dm = {
|
|
|
5388
5388
|
return;
|
|
5389
5389
|
}
|
|
5390
5390
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
5391
|
-
const t =
|
|
5391
|
+
const t = ot(this.space.id, this.table.id);
|
|
5392
5392
|
if (!t) {
|
|
5393
5393
|
this.setWarningText(g.WARN_TABLE_NOT_AVAILABLE);
|
|
5394
5394
|
return;
|
|
@@ -5567,13 +5567,13 @@ const Tm = {
|
|
|
5567
5567
|
return;
|
|
5568
5568
|
}
|
|
5569
5569
|
const n = t.id !== this.space.id;
|
|
5570
|
-
if (this.space.id = t.id, this.space.name = t.name, n || !
|
|
5570
|
+
if (this.space.id = t.id, this.space.name = t.name, n || !ot(this.space.id, this.table.id)) {
|
|
5571
5571
|
const s = ((i = (o = ze(this.space.id)) == null ? void 0 : o[0]) == null ? void 0 : i.id) ?? "", a = this.getField("TABLE");
|
|
5572
5572
|
a.getOptions(!1), a.setValue(s, !1), this.onTableChange_(s);
|
|
5573
5573
|
}
|
|
5574
5574
|
},
|
|
5575
5575
|
onTableChange_: function(e) {
|
|
5576
|
-
const t =
|
|
5576
|
+
const t = ot(this.space.id, e);
|
|
5577
5577
|
if (!t) {
|
|
5578
5578
|
console.assert(!1);
|
|
5579
5579
|
return;
|
|
@@ -5701,7 +5701,7 @@ const Tm = {
|
|
|
5701
5701
|
return;
|
|
5702
5702
|
}
|
|
5703
5703
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
5704
|
-
const t =
|
|
5704
|
+
const t = ot(this.space.id, this.table.id);
|
|
5705
5705
|
if (!t) {
|
|
5706
5706
|
this.setWarningText(g.WARN_TABLE_NOT_AVAILABLE);
|
|
5707
5707
|
return;
|
|
@@ -9524,7 +9524,7 @@ const ll = (e, t, n) => {
|
|
|
9524
9524
|
});
|
|
9525
9525
|
};
|
|
9526
9526
|
async function wa(e) {
|
|
9527
|
-
const t = await ll(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en-
|
|
9527
|
+
const t = await ll(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en-ihnckzip.js"), "./msg/zhHans.ts": () => import("./msg-zhHans-c9sbfn3r.js") }), `./msg/${e}.ts`, 3);
|
|
9528
9528
|
$c(t.default);
|
|
9529
9529
|
}
|
|
9530
9530
|
function Ns(e) {
|
|
@@ -11051,7 +11051,7 @@ function zo(e, t) {
|
|
|
11051
11051
|
function qg(e) {
|
|
11052
11052
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
11053
11053
|
}
|
|
11054
|
-
function
|
|
11054
|
+
function rt(e, t, n, o) {
|
|
11055
11055
|
if (e) {
|
|
11056
11056
|
n = n || document;
|
|
11057
11057
|
do {
|
|
@@ -11145,7 +11145,7 @@ function Xa(e, t, n) {
|
|
|
11145
11145
|
}
|
|
11146
11146
|
function Nn(e, t, n, o) {
|
|
11147
11147
|
for (var i = 0, s = 0, a = e.children; s < a.length; ) {
|
|
11148
|
-
if (a[s].style.display !== "none" && a[s] !== U.ghost && (o || a[s] !== U.dragged) &&
|
|
11148
|
+
if (a[s].style.display !== "none" && a[s] !== U.ghost && (o || a[s] !== U.dragged) && rt(a[s], n.draggable, e, !1)) {
|
|
11149
11149
|
if (i === t)
|
|
11150
11150
|
return a[s];
|
|
11151
11151
|
i++;
|
|
@@ -11237,7 +11237,7 @@ function yl(e, t, n) {
|
|
|
11237
11237
|
var o = {};
|
|
11238
11238
|
return Array.from(e.children).forEach(function(i) {
|
|
11239
11239
|
var s, a, c, l;
|
|
11240
|
-
if (!(!
|
|
11240
|
+
if (!(!rt(i, t.draggable, e, !1) || i.animated || i === n)) {
|
|
11241
11241
|
var _ = ke(i);
|
|
11242
11242
|
o.left = Math.min((s = o.left) !== null && s !== void 0 ? s : 1 / 0, _.left), o.top = Math.min((a = o.top) !== null && a !== void 0 ? a : 1 / 0, _.top), o.right = Math.max((c = o.right) !== null && c !== void 0 ? c : -1 / 0, _.right), o.bottom = Math.max((l = o.bottom) !== null && l !== void 0 ? l : -1 / 0, _.bottom);
|
|
11243
11243
|
}
|
|
@@ -11422,7 +11422,7 @@ function je(e) {
|
|
|
11422
11422
|
newDraggableIndex: Rt
|
|
11423
11423
|
}, e));
|
|
11424
11424
|
}
|
|
11425
|
-
var A, Te, $, he, qt, Bo, fe, Pt, En, Ze, Wn, Rt, Oo, we, mn = !1, Jo = !1, qo = [], zt,
|
|
11425
|
+
var A, Te, $, he, qt, Bo, fe, Pt, En, Ze, Wn, Rt, Oo, we, mn = !1, Jo = !1, qo = [], zt, at, $i, Hi, Ja, qa, wn, hn, Xn, zn = !1, yo = !1, Ro, $e, Ki = [], ds = !1, Zo = [], Ei = typeof document < "u", bo = gl, Za = lo || Nt ? "cssFloat" : "float", aT = Ei && !Tl && !gl && "draggable" in document.createElement("div"), bl = function() {
|
|
11426
11426
|
if (Ei) {
|
|
11427
11427
|
if (Nt)
|
|
11428
11428
|
return !1;
|
|
@@ -11565,7 +11565,7 @@ U.prototype = /** @lends Sortable.prototype */
|
|
|
11565
11565
|
_onTapStart: function(e) {
|
|
11566
11566
|
if (e.cancelable) {
|
|
11567
11567
|
var t = this, n = this.el, o = this.options, i = o.preventOnFilter, s = e.type, a = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, c = (a || e).target, l = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || c, _ = o.filter;
|
|
11568
|
-
if (gT(n), !A && !(/mousedown|pointerdown/.test(s) && e.button !== 0 || o.disabled) && !l.isContentEditable && !(!this.nativeDraggable && Gn && c && c.tagName.toUpperCase() === "SELECT") && (c =
|
|
11568
|
+
if (gT(n), !A && !(/mousedown|pointerdown/.test(s) && e.button !== 0 || o.disabled) && !l.isContentEditable && !(!this.nativeDraggable && Gn && c && c.tagName.toUpperCase() === "SELECT") && (c = rt(c, o.draggable, n, !1), !(c && c.animated) && Bo !== c)) {
|
|
11569
11569
|
if (En = tt(c), Wn = tt(c, o.draggable), typeof _ == "function") {
|
|
11570
11570
|
if (_.call(this, e, c, this)) {
|
|
11571
11571
|
je({
|
|
@@ -11581,7 +11581,7 @@ U.prototype = /** @lends Sortable.prototype */
|
|
|
11581
11581
|
return;
|
|
11582
11582
|
}
|
|
11583
11583
|
} else if (_ && (_ = _.split(",").some(function(h) {
|
|
11584
|
-
if (h =
|
|
11584
|
+
if (h = rt(l, h.trim(), n, !1), h)
|
|
11585
11585
|
return je({
|
|
11586
11586
|
sortable: t,
|
|
11587
11587
|
rootEl: h,
|
|
@@ -11596,7 +11596,7 @@ U.prototype = /** @lends Sortable.prototype */
|
|
|
11596
11596
|
i && e.cancelable && e.preventDefault();
|
|
11597
11597
|
return;
|
|
11598
11598
|
}
|
|
11599
|
-
o.handle && !
|
|
11599
|
+
o.handle && !rt(l, o.handle, n, !1) || this._prepareDragStart(e, a, c);
|
|
11600
11600
|
}
|
|
11601
11601
|
}
|
|
11602
11602
|
},
|
|
@@ -11669,17 +11669,17 @@ U.prototype = /** @lends Sortable.prototype */
|
|
|
11669
11669
|
this._nulling();
|
|
11670
11670
|
},
|
|
11671
11671
|
_emulateDragOver: function() {
|
|
11672
|
-
if (
|
|
11673
|
-
this._lastX =
|
|
11674
|
-
for (var e = document.elementFromPoint(
|
|
11672
|
+
if (at) {
|
|
11673
|
+
this._lastX = at.clientX, this._lastY = at.clientY, kl();
|
|
11674
|
+
for (var e = document.elementFromPoint(at.clientX, at.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(at.clientX, at.clientY), e !== t); )
|
|
11675
11675
|
t = e;
|
|
11676
11676
|
if (A.parentNode[et]._isOutsideThisEl(e), t)
|
|
11677
11677
|
do {
|
|
11678
11678
|
if (t[et]) {
|
|
11679
11679
|
var n = void 0;
|
|
11680
11680
|
if (n = t[et]._onDragOver({
|
|
11681
|
-
clientX:
|
|
11682
|
-
clientY:
|
|
11681
|
+
clientX: at.clientX,
|
|
11682
|
+
clientY: at.clientY,
|
|
11683
11683
|
target: e,
|
|
11684
11684
|
rootEl: t
|
|
11685
11685
|
}), n && !this.options.dragoverBubble)
|
|
@@ -11708,7 +11708,7 @@ U.prototype = /** @lends Sortable.prototype */
|
|
|
11708
11708
|
f: h
|
|
11709
11709
|
};
|
|
11710
11710
|
var d = "matrix(".concat(s.a, ",").concat(s.b, ",").concat(s.c, ",").concat(s.d, ",").concat(s.e, ",").concat(s.f, ")");
|
|
11711
|
-
P($, "webkitTransform", d), P($, "mozTransform", d), P($, "msTransform", d), P($, "transform", d), $i = _, Hi = h,
|
|
11711
|
+
P($, "webkitTransform", d), P($, "mozTransform", d), P($, "msTransform", d), P($, "transform", d), $i = _, Hi = h, at = i;
|
|
11712
11712
|
}
|
|
11713
11713
|
e.cancelable && e.preventDefault();
|
|
11714
11714
|
}
|
|
@@ -11756,8 +11756,8 @@ U.prototype = /** @lends Sortable.prototype */
|
|
|
11756
11756
|
fromSortable: d,
|
|
11757
11757
|
target: n,
|
|
11758
11758
|
completed: H,
|
|
11759
|
-
onMove: function(
|
|
11760
|
-
return Co(he, t, A, o,
|
|
11759
|
+
onMove: function(it, It) {
|
|
11760
|
+
return Co(he, t, A, o, it, ke(it), e, It);
|
|
11761
11761
|
},
|
|
11762
11762
|
changed: z
|
|
11763
11763
|
}, de));
|
|
@@ -11782,7 +11782,7 @@ U.prototype = /** @lends Sortable.prototype */
|
|
|
11782
11782
|
originalEvent: e
|
|
11783
11783
|
});
|
|
11784
11784
|
}
|
|
11785
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
11785
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = rt(n, a.draggable, t, !0), v("dragOver"), U.eventCanceled)
|
|
11786
11786
|
return b;
|
|
11787
11787
|
if (A.contains(e.target) || n.animated && n.animatingX && n.animatingY || m._ignoreWhileAnimating === n)
|
|
11788
11788
|
return H(!1);
|
|
@@ -11891,7 +11891,7 @@ U.prototype = /** @lends Sortable.prototype */
|
|
|
11891
11891
|
}), this.save()))), this._nulling();
|
|
11892
11892
|
},
|
|
11893
11893
|
_nulling: function() {
|
|
11894
|
-
We("nulling", this), he = A = Te = $ = qt = fe = Bo = Pt = zt =
|
|
11894
|
+
We("nulling", this), he = A = Te = $ = qt = fe = Bo = Pt = zt = at = wn = Ze = Rt = En = Wn = hn = Xn = we = Oo = U.dragged = U.ghost = U.clone = U.active = null, Zo.forEach(function(e) {
|
|
11895
11895
|
e.checked = !0;
|
|
11896
11896
|
}), Zo.length = $i = Hi = 0;
|
|
11897
11897
|
},
|
|
@@ -11916,7 +11916,7 @@ U.prototype = /** @lends Sortable.prototype */
|
|
|
11916
11916
|
*/
|
|
11917
11917
|
toArray: function() {
|
|
11918
11918
|
for (var e = [], t, n = this.el.children, o = 0, i = n.length, s = this.options; o < i; o++)
|
|
11919
|
-
t = n[o],
|
|
11919
|
+
t = n[o], rt(t, s.draggable, this.el, !1) && e.push(t.getAttribute(s.dataIdAttr) || mT(t));
|
|
11920
11920
|
return e;
|
|
11921
11921
|
},
|
|
11922
11922
|
/**
|
|
@@ -11927,7 +11927,7 @@ U.prototype = /** @lends Sortable.prototype */
|
|
|
11927
11927
|
var n = {}, o = this.el;
|
|
11928
11928
|
this.toArray().forEach(function(i, s) {
|
|
11929
11929
|
var a = o.children[s];
|
|
11930
|
-
|
|
11930
|
+
rt(a, this.options.draggable, o, !1) && (n[i] = a);
|
|
11931
11931
|
}, this), t && this.captureAnimationState(), e.forEach(function(i) {
|
|
11932
11932
|
n[i] && (o.removeChild(n[i]), o.appendChild(n[i]));
|
|
11933
11933
|
}), t && this.animateAll();
|
|
@@ -11946,7 +11946,7 @@ U.prototype = /** @lends Sortable.prototype */
|
|
|
11946
11946
|
* @returns {HTMLElement|null}
|
|
11947
11947
|
*/
|
|
11948
11948
|
closest: function(e, t) {
|
|
11949
|
-
return
|
|
11949
|
+
return rt(e, t || this.options.draggable, this.el, !1);
|
|
11950
11950
|
},
|
|
11951
11951
|
/**
|
|
11952
11952
|
* Set/get option
|
|
@@ -12057,11 +12057,11 @@ U.utils = {
|
|
|
12057
12057
|
css: P,
|
|
12058
12058
|
find: Al,
|
|
12059
12059
|
is: function(e, t) {
|
|
12060
|
-
return !!
|
|
12060
|
+
return !!rt(e, t, e, !1);
|
|
12061
12061
|
},
|
|
12062
12062
|
extend: Qg,
|
|
12063
12063
|
throttle: vl,
|
|
12064
|
-
closest:
|
|
12064
|
+
closest: rt,
|
|
12065
12065
|
toggleClass: qe,
|
|
12066
12066
|
clone: Ol,
|
|
12067
12067
|
index: tt,
|
|
@@ -12491,12 +12491,12 @@ const ST = { class: "text-subtitle-1 ml-6" }, kT = /* @__PURE__ */ ut({
|
|
|
12491
12491
|
const T = Pe("v-spacer"), m = Pe("v-icon"), b = Pc("ripple");
|
|
12492
12492
|
return Uc((Le(), ft("div", {
|
|
12493
12493
|
class: "d-flex align-center cursor-pointer",
|
|
12494
|
-
style:
|
|
12494
|
+
style: ct(l.value),
|
|
12495
12495
|
onClick: d[1] || (d[1] = (v) => a("x-click", s.id)),
|
|
12496
12496
|
onMouseover: d[2] || (d[2] = (v) => c.value = !0),
|
|
12497
12497
|
onMouseout: d[3] || (d[3] = (v) => c.value = !1)
|
|
12498
12498
|
}, [
|
|
12499
|
-
|
|
12499
|
+
nt("span", ST, ti(s.title), 1),
|
|
12500
12500
|
ye(T),
|
|
12501
12501
|
ye(m, {
|
|
12502
12502
|
class: "x-handle cursor-move mr-3",
|
|
@@ -12504,8 +12504,8 @@ const ST = { class: "text-subtitle-1 ml-6" }, kT = /* @__PURE__ */ ut({
|
|
|
12504
12504
|
onMousedown: d[0] || (d[0] = Yn(() => {
|
|
12505
12505
|
}, ["stop"]))
|
|
12506
12506
|
}, null, 8, ["icon"]),
|
|
12507
|
-
|
|
12508
|
-
style:
|
|
12507
|
+
nt("div", {
|
|
12508
|
+
style: ct(_.value)
|
|
12509
12509
|
}, null, 4)
|
|
12510
12510
|
], 36)), [
|
|
12511
12511
|
[b]
|
|
@@ -12692,14 +12692,14 @@ const ST = { class: "text-subtitle-1 ml-6" }, kT = /* @__PURE__ */ ut({
|
|
|
12692
12692
|
onKeydown: h[6] || (h[6] = rr(Yn((w) => l.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
12693
12693
|
}, {
|
|
12694
12694
|
default: Tt(() => [
|
|
12695
|
-
|
|
12695
|
+
nt("div", {
|
|
12696
12696
|
class: "w-100 h-100 d-flex flex-row-reverse",
|
|
12697
12697
|
onClick: h[3] || (h[3] = Yn((w) => l.value = !1, ["self"])),
|
|
12698
12698
|
onContextmenu: h[4] || (h[4] = Yn((w) => l.value = !1, ["self", "prevent"]))
|
|
12699
12699
|
}, [
|
|
12700
|
-
|
|
12700
|
+
nt("div", {
|
|
12701
12701
|
class: "elevation-2",
|
|
12702
|
-
style:
|
|
12702
|
+
style: ct(s.value)
|
|
12703
12703
|
}, [
|
|
12704
12704
|
j(o) ? (Le(), gt(d, {
|
|
12705
12705
|
key: 0,
|
|
@@ -12718,14 +12718,14 @@ const ST = { class: "text-subtitle-1 ml-6" }, kT = /* @__PURE__ */ ut({
|
|
|
12718
12718
|
icon: j(fr),
|
|
12719
12719
|
onClick: h[0] || (h[0] = (w) => l.value = !1)
|
|
12720
12720
|
}, null, 8, ["icon"]),
|
|
12721
|
-
|
|
12721
|
+
nt("span", MT, ti(j(t)("x-block-lib.navigator")), 1),
|
|
12722
12722
|
ye(m)
|
|
12723
12723
|
]),
|
|
12724
12724
|
_: 1
|
|
12725
12725
|
}),
|
|
12726
|
-
|
|
12726
|
+
nt("div", {
|
|
12727
12727
|
class: "overflow-y-auto",
|
|
12728
|
-
style:
|
|
12728
|
+
style: ct(a.value)
|
|
12729
12729
|
}, [
|
|
12730
12730
|
_.type === "list" ? (Le(), gt(RT, {
|
|
12731
12731
|
key: 0,
|
|
@@ -12737,8 +12737,8 @@ const ST = { class: "text-subtitle-1 ml-6" }, kT = /* @__PURE__ */ ut({
|
|
|
12737
12737
|
modelValue: j(l),
|
|
12738
12738
|
"onUpdate:modelValue": h[2] || (h[2] = (w) => Qt(l) ? l.value = w : null)
|
|
12739
12739
|
}, null, 8, ["modelValue"])) : Zt("", !0),
|
|
12740
|
-
|
|
12741
|
-
style:
|
|
12740
|
+
nt("div", {
|
|
12741
|
+
style: ct(c.value)
|
|
12742
12742
|
}, null, 4)
|
|
12743
12743
|
], 4)
|
|
12744
12744
|
], 4)
|
|
@@ -13034,7 +13034,7 @@ const $T = { class: "position-relative w-100 h-100" }, HT = /* @__PURE__ */ ut({
|
|
|
13034
13034
|
}), t({ loading: h, load: ge, save: Q, generateCode: Be, fireStateChange: F }), (B, Z) => {
|
|
13035
13035
|
const Ae = Pe("v-icon"), Me = Pe("x-loading");
|
|
13036
13036
|
return Le(), ft("div", $T, [
|
|
13037
|
-
|
|
13037
|
+
nt("div", {
|
|
13038
13038
|
id: a,
|
|
13039
13039
|
ref_key: "blocklyDiv",
|
|
13040
13040
|
ref: c,
|
|
@@ -13043,7 +13043,7 @@ const $T = { class: "position-relative w-100 h-100" }, HT = /* @__PURE__ */ ut({
|
|
|
13043
13043
|
d.value ? (Le(), ft("div", {
|
|
13044
13044
|
key: 0,
|
|
13045
13045
|
class: "d-flex flex-column justify-center align-center",
|
|
13046
|
-
style:
|
|
13046
|
+
style: ct(m.value)
|
|
13047
13047
|
}, [
|
|
13048
13048
|
ye(Ae, {
|
|
13049
13049
|
size: "x-large",
|
|
@@ -13053,7 +13053,7 @@ const $T = { class: "position-relative w-100 h-100" }, HT = /* @__PURE__ */ ut({
|
|
|
13053
13053
|
h.value ? Zt("", !0) : (Le(), ft("div", {
|
|
13054
13054
|
key: 1,
|
|
13055
13055
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
13056
|
-
style:
|
|
13056
|
+
style: ct(b.value)
|
|
13057
13057
|
}, [
|
|
13058
13058
|
ye(Rg, { lock: o.value }, null, 8, ["lock"]),
|
|
13059
13059
|
ye(Dg, {
|
|
@@ -13067,16 +13067,16 @@ const $T = { class: "position-relative w-100 h-100" }, HT = /* @__PURE__ */ ut({
|
|
|
13067
13067
|
], 4)),
|
|
13068
13068
|
o.value ? (Le(), ft("div", {
|
|
13069
13069
|
key: 2,
|
|
13070
|
-
style:
|
|
13070
|
+
style: ct(w.value)
|
|
13071
13071
|
}, null, 4)) : Zt("", !0),
|
|
13072
13072
|
o.value ? (Le(), ft("div", {
|
|
13073
13073
|
key: 3,
|
|
13074
|
-
style:
|
|
13074
|
+
style: ct(v.value)
|
|
13075
13075
|
}, null, 4)) : Zt("", !0),
|
|
13076
|
-
|
|
13076
|
+
nt("div", {
|
|
13077
13077
|
ref_key: "parentContainer",
|
|
13078
13078
|
ref: l,
|
|
13079
|
-
style:
|
|
13079
|
+
style: ct(H.value)
|
|
13080
13080
|
}, null, 4),
|
|
13081
13081
|
ye(Me, {
|
|
13082
13082
|
open: h.value,
|
|
@@ -13425,7 +13425,7 @@ function KT() {
|
|
|
13425
13425
|
// look for 3 words in a row
|
|
13426
13426
|
}
|
|
13427
13427
|
), Y;
|
|
13428
|
-
},
|
|
13428
|
+
}, it = de("//", "$"), It = de("/\\*", "\\*/"), ln = de("#", "$"), Rn = {
|
|
13429
13429
|
scope: "number",
|
|
13430
13430
|
begin: F,
|
|
13431
13431
|
relevance: 0
|
|
@@ -13471,7 +13471,7 @@ function KT() {
|
|
|
13471
13471
|
BINARY_NUMBER_RE: Ee,
|
|
13472
13472
|
COMMENT: de,
|
|
13473
13473
|
C_BLOCK_COMMENT_MODE: It,
|
|
13474
|
-
C_LINE_COMMENT_MODE:
|
|
13474
|
+
C_LINE_COMMENT_MODE: it,
|
|
13475
13475
|
C_NUMBER_MODE: uo,
|
|
13476
13476
|
C_NUMBER_RE: se,
|
|
13477
13477
|
END_SAME_AS_BEGIN: function(p) {
|
|
@@ -13767,17 +13767,17 @@ function KT() {
|
|
|
13767
13767
|
let le = "", Re = "";
|
|
13768
13768
|
typeof R == "object" ? (le = E, J = R.ignoreIllegals, Re = R.language) : (cn("10.7.0", "highlight(lang, code, ...args) has been deprecated."), cn("10.7.0", `Please use highlight(code, options) instead.
|
|
13769
13769
|
https://github.com/highlightjs/highlight.js/issues/2277`), Re = E, le = R), J === void 0 && (J = !0);
|
|
13770
|
-
const
|
|
13770
|
+
const st = {
|
|
13771
13771
|
code: le,
|
|
13772
13772
|
language: Re
|
|
13773
13773
|
};
|
|
13774
|
-
fo("before:highlight",
|
|
13775
|
-
const Bt =
|
|
13776
|
-
return Bt.code =
|
|
13774
|
+
fo("before:highlight", st);
|
|
13775
|
+
const Bt = st.result ? st.result : Dn(st.language, st.code, J);
|
|
13776
|
+
return Bt.code = st.code, fo("after:highlight", Bt), Bt;
|
|
13777
13777
|
}
|
|
13778
13778
|
function Dn(E, R, J, le) {
|
|
13779
13779
|
const Re = /* @__PURE__ */ Object.create(null);
|
|
13780
|
-
function
|
|
13780
|
+
function st(O, N) {
|
|
13781
13781
|
return O.keywords[N];
|
|
13782
13782
|
}
|
|
13783
13783
|
function Bt() {
|
|
@@ -13790,7 +13790,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Re = E, le = R), J ==
|
|
|
13790
13790
|
let N = K.keywordPatternRe.exec(ce), W = "";
|
|
13791
13791
|
for (; N; ) {
|
|
13792
13792
|
W += ce.substring(O, N.index);
|
|
13793
|
-
const ie = dt.case_insensitive ? N[0].toLowerCase() : N[0], Ye =
|
|
13793
|
+
const ie = dt.case_insensitive ? N[0].toLowerCase() : N[0], Ye = st(K, ie);
|
|
13794
13794
|
if (Ye) {
|
|
13795
13795
|
const [Ot, bc] = Ye;
|
|
13796
13796
|
if (Ue.addText(W), W = "", Re[ie] = (Re[ie] || 0) + 1, Re[ie] <= lc && (To += bc), Ot.startsWith("_"))
|
|
@@ -13995,7 +13995,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Re = E, le = R), J ==
|
|
|
13995
13995
|
return -1;
|
|
13996
13996
|
}
|
|
13997
13997
|
return 0;
|
|
13998
|
-
}), [
|
|
13998
|
+
}), [st, Bt] = Re, mo = st;
|
|
13999
13999
|
return mo.secondBest = Bt, mo;
|
|
14000
14000
|
}
|
|
14001
14001
|
function cc(E, R, J) {
|
|
@@ -14294,9 +14294,9 @@ const xo = /* @__PURE__ */ Wc(GT), or = "[A-Za-z$_][0-9A-Za-z$_]*", jT = [
|
|
|
14294
14294
|
Pl
|
|
14295
14295
|
);
|
|
14296
14296
|
function JT(e) {
|
|
14297
|
-
const t = e.regex, n = (de, { after:
|
|
14297
|
+
const t = e.regex, n = (de, { after: it }) => {
|
|
14298
14298
|
const It = "</" + de[0].slice(1);
|
|
14299
|
-
return de.input.indexOf(It,
|
|
14299
|
+
return de.input.indexOf(It, it) !== -1;
|
|
14300
14300
|
}, o = or, i = {
|
|
14301
14301
|
begin: "<>",
|
|
14302
14302
|
end: "</>"
|
|
@@ -14307,7 +14307,7 @@ function JT(e) {
|
|
|
14307
14307
|
* @param {RegExpMatchArray} match
|
|
14308
14308
|
* @param {CallbackResponse} response
|
|
14309
14309
|
*/
|
|
14310
|
-
isTrulyOpeningTag: (de,
|
|
14310
|
+
isTrulyOpeningTag: (de, it) => {
|
|
14311
14311
|
const It = de[0].length + de.index, ln = de.input[It];
|
|
14312
14312
|
if (
|
|
14313
14313
|
// HTML should not include another raw `<` inside a tag
|
|
@@ -14317,18 +14317,18 @@ function JT(e) {
|
|
|
14317
14317
|
// `<T, A extends keyof T, V>`
|
|
14318
14318
|
ln === ","
|
|
14319
14319
|
) {
|
|
14320
|
-
|
|
14320
|
+
it.ignoreMatch();
|
|
14321
14321
|
return;
|
|
14322
14322
|
}
|
|
14323
|
-
ln === ">" && (n(de, { after: It }) ||
|
|
14323
|
+
ln === ">" && (n(de, { after: It }) || it.ignoreMatch());
|
|
14324
14324
|
let Rn;
|
|
14325
14325
|
const uo = de.input.substring(It);
|
|
14326
14326
|
if (Rn = uo.match(/^\s*=/)) {
|
|
14327
|
-
|
|
14327
|
+
it.ignoreMatch();
|
|
14328
14328
|
return;
|
|
14329
14329
|
}
|
|
14330
14330
|
if ((Rn = uo.match(/^\s+extends\s+/)) && Rn.index === 0) {
|
|
14331
|
-
|
|
14331
|
+
it.ignoreMatch();
|
|
14332
14332
|
return;
|
|
14333
14333
|
}
|
|
14334
14334
|
}
|
|
@@ -14854,7 +14854,7 @@ const QT = /* @__PURE__ */ ut({
|
|
|
14854
14854
|
}, 8, ["color"]);
|
|
14855
14855
|
};
|
|
14856
14856
|
}
|
|
14857
|
-
}), eE = { class: "text-subtitle-1" }, tE = /* @__PURE__ */ ut({
|
|
14857
|
+
}), eE = { class: "text-subtitle-1" }, tE = { class: "w-100 h-100 overflow-auto" }, nE = /* @__PURE__ */ ut({
|
|
14858
14858
|
__name: "index",
|
|
14859
14859
|
setup(e) {
|
|
14860
14860
|
const { t } = so(), { sysBarAvail: n } = dr(), { backgroundColor0: o, backgroundColor2: i } = oi(), s = Ft(""), a = Ne(() => {
|
|
@@ -14901,15 +14901,17 @@ const QT = /* @__PURE__ */ ut({
|
|
|
14901
14901
|
icon: j(fr),
|
|
14902
14902
|
onClick: h[0] || (h[0] = (v) => l.value = !1)
|
|
14903
14903
|
}, null, 8, ["icon"]),
|
|
14904
|
-
|
|
14904
|
+
nt("span", eE, ti(j(t)("x-block-lib.dlg.source.title")), 1),
|
|
14905
14905
|
ye(m)
|
|
14906
14906
|
]),
|
|
14907
14907
|
_: 1
|
|
14908
14908
|
}, 8, ["color"]),
|
|
14909
|
-
|
|
14910
|
-
style:
|
|
14909
|
+
nt("div", {
|
|
14910
|
+
style: ct(a.value)
|
|
14911
14911
|
}, [
|
|
14912
|
-
|
|
14912
|
+
nt("div", tE, [
|
|
14913
|
+
ye(QT, { code: s.value }, null, 8, ["code"])
|
|
14914
|
+
])
|
|
14913
14915
|
], 4)
|
|
14914
14916
|
]),
|
|
14915
14917
|
_: 1
|
|
@@ -14919,16 +14921,16 @@ const QT = /* @__PURE__ */ ut({
|
|
|
14919
14921
|
}, 8, ["modelValue"]);
|
|
14920
14922
|
};
|
|
14921
14923
|
}
|
|
14922
|
-
}),
|
|
14923
|
-
e.component("XBlockly", HT), e.component("XSourceDlg",
|
|
14924
|
+
}), oE = (e) => {
|
|
14925
|
+
e.component("XBlockly", HT), e.component("XSourceDlg", nE);
|
|
14924
14926
|
};
|
|
14925
|
-
async function
|
|
14927
|
+
async function hE(e) {
|
|
14926
14928
|
return (await ll(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en-owbcs4f2.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans-bw16iab9.js") }), `./locales/${e}/index.ts`, 4)).default;
|
|
14927
14929
|
}
|
|
14928
|
-
const
|
|
14930
|
+
const dE = { install: oE };
|
|
14929
14931
|
export {
|
|
14930
14932
|
HT as XBlockly,
|
|
14931
|
-
|
|
14932
|
-
|
|
14933
|
-
|
|
14933
|
+
dE as default,
|
|
14934
|
+
oE as install,
|
|
14935
|
+
hE as loadLocaleMessageBlock
|
|
14934
14936
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-block-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.49",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"vue": "^3.5.13",
|
|
32
32
|
"vue-draggable-plus": "^0.6.0",
|
|
33
33
|
"vuetify": "^3.8.1",
|
|
34
|
-
"x-essential-lib": "^0.8.
|
|
35
|
-
"x-runtime-lib": "^0.6.
|
|
34
|
+
"x-essential-lib": "^0.8.8",
|
|
35
|
+
"x-runtime-lib": "^0.6.49",
|
|
36
36
|
"x-state-lib": "^0.2.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|