x-block-lib 0.8.71 → 0.8.72
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/core/utils/common/block.d.ts +1 -0
- package/dist/index.js +120 -119
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as Blockly from 'blockly/core';
|
|
2
2
|
import { ZProperty } from 'x-runtime-lib';
|
|
3
|
+
export declare function blockOfListCreateV1(): Element;
|
|
3
4
|
export declare function spawnPropertyBlockV1(workspace: Blockly.Workspace, property: ZProperty): Blockly.Block | null;
|
|
4
5
|
export declare function spawnColumnBlockV1(workspace: Blockly.Workspace, type: string): Blockly.Block | null;
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var l=document.createElement("style");l.id="x-block-lib",l.appendChild(document.createTextNode("pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#f3f3f3;color:#444}.hljs-comment{color:#697070}.hljs-punctuation,.hljs-tag{color:#444a}.hljs-tag .hljs-attr,.hljs-tag .hljs-name{color:#444}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#ab5656}.hljs-literal{color:#695}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta .hljs-string{color:#38a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.ghost[data-v-a77ed323]{opacity:.4;pointer-events:none}.blocklyToolbox{overflow-x:hidden;width:56px}.blocklyMainBackground{stroke-width:0}.blocklyToolboxCategory{margin-bottom:12px!important}.blocklyToolboxCategoryIcon{display:none!important}.blocklyTreeRowContentContainer{height:28px;display:flex;align-items:center;justify-items:center;overflow:hidden}.blocklyFlyout{z-index:21}")),document.head.appendChild(l)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
-
import { E as v, r as Cn, M as
|
|
2
|
+
import { E as v, r as Cn, M as Mo, s as Uo, a as Vo, X as Kn, u as S, B as I, j as s, O as u, F as O, b as ze, i as k, c as Ot, d as xo, e as K, f as g, g as wo, h as X, k as It, p as $t, l as rt, m as kn, n as V, C as $n, N as ut, o as Fo, P as Ze, q as Ke, V as Mt, t as Hn, W as Yo, v as Ko, w as $o, S as Ho, x as Go, y as Wo, z as Qt, T as ke, A as Gn, D as jo, G as Xo, H as Wn, I as Jo, J as qo, K as Qo, L as zo, Q as Zo, R as ti, U as ei, Y as ni } from "./vendor.k8hjxofe.js";
|
|
3
3
|
import { globalState as A } from "x-state-lib";
|
|
4
|
-
import { globalObjects as vt, openConfirmDlg as
|
|
5
|
-
import { pkgs as re, parsePixelStr as
|
|
6
|
-
import { provide as
|
|
4
|
+
import { globalObjects as vt, openConfirmDlg as oi, openPromptDlg as ii, messageWarning as jn, useColor as zt, useSystem as Xn, useViewStack as _n, eventBus as Dt } from "x-essential-lib";
|
|
5
|
+
import { pkgs as re, parsePixelStr as si, parsePercentStr as ai, getPropertyTag as Ct, unwrapEventId as Jn, elements as P, unwrapEventKeyOfElementSlot as ci, unwrapPropertyKeyOfElementSlot as qn, unwrapEventKeyOfCustomSlot as ri, unwrapPropertyKeyOfCustomSlot as Qn, makeEventId as x, makeEventKeyOfCustomSlot as $e, makePropertyKeyOfCustomSlot as se, unwrapSlotId as pn, makeEventKeyOfElementSlot as li, makePropertyKeyOfElementSlot as zn, toEventName as Ne, unwrapMethodId as Zt, unwrapMethodKeyOfCustomSlot as Nn, unwrapMethodKeyOfElementSlot as ui, makeMethodId as Lt, makeMethodKeyOfElementSlot as _i, makeMethodKeyOfCustomSlot as pi, toMethodName as Se, unwrapPropertyId as di, makePropertyId as ht, toPropertyName as Zn, isLocaleOfEventKind as hi, isLocaleOfMethodKind as to, makeTriggerId as Bt } from "x-runtime-lib";
|
|
6
|
+
import { provide as fi, inject as mi, defineComponent as dt, computed as $, resolveComponent as Y, createBlock as _t, openBlock as U, unref as F, withCtx as pt, createVNode as M, mergeProps as dn, useModel as Wt, ref as Ut, resolveDirective as Ti, withDirectives as Ei, createElementBlock as at, normalizeStyle as z, createElementVNode as j, createCommentVNode as ft, toDisplayString as jt, withModifiers as Ht, mergeModels as tn, Fragment as eo, renderList as gi, useId as en, onUnmounted as Ai, useTemplateRef as Gt, withKeys as no, isRef as ae, onMounted as Sn, nextTick as Ii, onBeforeUnmount as Ln, watch as Yt, renderSlot as yi } from "vue";
|
|
7
7
|
import { useDisplay as hn } from "vuetify";
|
|
8
8
|
import { useI18n as te } from "vue-i18n";
|
|
9
9
|
var R = /* @__PURE__ */ ((t) => (t.STATE_CHANGE = "state_change", t))(R || {});
|
|
@@ -23,17 +23,17 @@ const io = (t, e, n) => {
|
|
|
23
23
|
};
|
|
24
24
|
async function Bn(t) {
|
|
25
25
|
const e = await io(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.dmlvm3cp.js"), "./msg/zhHans.ts": () => import("./msg-zhHans.dvv4wraq.js") }), `./msg/${t}.ts`, 3);
|
|
26
|
-
|
|
26
|
+
Uo(e.default);
|
|
27
27
|
}
|
|
28
28
|
function m(t) {
|
|
29
|
-
return
|
|
29
|
+
return Mo[t] ?? t;
|
|
30
30
|
}
|
|
31
31
|
const Vt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", le = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
|
|
32
32
|
function Le(t) {
|
|
33
33
|
const e = t.lastIndexOf("V");
|
|
34
34
|
if (e <= 0 || e >= t.length - 1)
|
|
35
35
|
return console.assert(!1, `invalid key=${t}`), "";
|
|
36
|
-
const n =
|
|
36
|
+
const n = Vo(t.substring(0, e - 1)), o = "v" + t.substring(e + 1);
|
|
37
37
|
return `${n}_${o}`;
|
|
38
38
|
}
|
|
39
39
|
function ue(t) {
|
|
@@ -46,7 +46,7 @@ function ue(t) {
|
|
|
46
46
|
function B(t) {
|
|
47
47
|
return t.length <= 0 && t.push([m("NO_OPTION"), ""]), t;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function Oi(t) {
|
|
50
50
|
let e = 0;
|
|
51
51
|
for (; t; )
|
|
52
52
|
e++, t = t.getParent();
|
|
@@ -81,18 +81,18 @@ function bn(t) {
|
|
|
81
81
|
const e = `<block type="math_number_v1"><field name="NUM">${t}</field></block>`;
|
|
82
82
|
return S.xml.textToDom(e);
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function vi(t) {
|
|
85
85
|
return S.xml.textToDom('<block type="logic_boolean_v1"><field name="BOOL">FALSE</field></block>');
|
|
86
86
|
}
|
|
87
87
|
function nn(t, e) {
|
|
88
88
|
let n = null;
|
|
89
|
-
return e === "string" ? n = He("") : e === "integer" || e === "decimal" ? n = bn(0) : e === "boolean" ? n =
|
|
89
|
+
return e === "string" ? n = He("") : e === "integer" || e === "decimal" ? n = bn(0) : e === "boolean" ? n = vi() : e === "enum" || e === "dateTime" ? n = He("") : console.assert(!1), n ? Kn.domToBlock(n, t) : null;
|
|
90
90
|
}
|
|
91
91
|
function kt(t) {
|
|
92
92
|
return t === "string" ? "String" : t === "number" ? "Number" : t === "boolean" ? "Boolean" : t === "array" ? "Array" : t === "object" ? "Object" : (console.assert(!1), null);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
95
|
-
return t.ui === "dummy" ? null : t.ui === "strInput" ? "String" : t.ui === "numInput" ? "Number" : t.ui === "switch" ? "Boolean" : t.ui === "select" ? ue(t.items) : t.ui === "multiTypes" ? ue(t.types) : t.ui === "selectComp" ? "Comp" : t.ui === "selectSlot" ? "Slot" : t.ui === "selectAdaptSlot" ? "AdaptSlot" : t.ui === "colorPicker" ? "Color" : (console.assert(!1), null);
|
|
94
|
+
function Ci(t) {
|
|
95
|
+
return t.array ? "Array" : t.ui === "dummy" ? null : t.ui === "strInput" ? "String" : t.ui === "numInput" ? "Number" : t.ui === "switch" ? "Boolean" : t.ui === "select" ? ue(t.items) : t.ui === "multiTypes" ? ue(t.types) : t.ui === "selectComp" ? "Comp" : t.ui === "selectSlot" ? "Slot" : t.ui === "selectAdaptSlot" ? "AdaptSlot" : t.ui === "colorPicker" ? "Color" : (console.assert(!1), null);
|
|
96
96
|
}
|
|
97
97
|
function ao(t) {
|
|
98
98
|
return t === "string" ? "String" : t === "integer" || t === "decimal" ? "Number" : t === "boolean" ? "Boolean" : t === "enum" || t === "dateTime" ? "String" : (console.assert(!1), null);
|
|
@@ -141,7 +141,7 @@ function he(t) {
|
|
|
141
141
|
const e = `<shadow type="logic_boolean_v1"><field name="BOOL">${t ? "TRUE" : "FALSE"}</field></shadow>`;
|
|
142
142
|
return S.xml.textToDom(e);
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function co() {
|
|
145
145
|
return S.xml.textToDom('<shadow type="list_create_v1"></shadow>');
|
|
146
146
|
}
|
|
147
147
|
function ki() {
|
|
@@ -167,11 +167,11 @@ function bi(t) {
|
|
|
167
167
|
}
|
|
168
168
|
function st(t) {
|
|
169
169
|
let e = null;
|
|
170
|
-
return t === "string" ? e = gt("") : t === "number" ? e = de(0) : t === "boolean" ? e = he(!1) : t === "array" ? e =
|
|
170
|
+
return t === "string" ? e = gt("") : t === "number" ? e = de(0) : t === "boolean" ? e = he(!1) : t === "array" ? e = co() : t === "object" ? e = ki() : console.assert(!1), e;
|
|
171
171
|
}
|
|
172
172
|
function Pi(t) {
|
|
173
173
|
let e = null;
|
|
174
|
-
return t.ui === "dummy" ?
|
|
174
|
+
return t.array ? e = co() : t.ui === "dummy" ? e = null : t.ui === "strInput" ? e = gt(t.default) : t.ui === "numInput" ? e = de(t.default) : t.ui === "switch" ? e = he(t.default) : t.ui === "select" ? e = Ni(t.items) : t.ui === "multiTypes" ? e = Si(t.types) : t.ui === "selectComp" ? e = Li() : t.ui === "selectSlot" ? e = Bi() : t.ui === "colorPicker" ? e = bi(t.default ?? "#ff0000") : console.assert(!1), e;
|
|
175
175
|
}
|
|
176
176
|
function Ri() {
|
|
177
177
|
const { activeObject: t, activePage: e } = A.app, n = [];
|
|
@@ -339,7 +339,7 @@ const Vi = (t, e) => {
|
|
|
339
339
|
i.removeField("VALUE", !0), i.removeField("SUFFIX", !0);
|
|
340
340
|
let r, _;
|
|
341
341
|
if (c.ui === "pixelInput") {
|
|
342
|
-
const h =
|
|
342
|
+
const h = si(this.value) ?? 0;
|
|
343
343
|
r = new ze(
|
|
344
344
|
h,
|
|
345
345
|
c.min,
|
|
@@ -350,7 +350,7 @@ const Vi = (t, e) => {
|
|
|
350
350
|
}
|
|
351
351
|
), _ = "px";
|
|
352
352
|
} else if (c.ui === "percentInput") {
|
|
353
|
-
const h =
|
|
353
|
+
const h = ai(this.value) ?? 0;
|
|
354
354
|
r = new ze(
|
|
355
355
|
h,
|
|
356
356
|
c.min,
|
|
@@ -402,7 +402,7 @@ const Yi = {
|
|
|
402
402
|
["app_bind_item_v1"],
|
|
403
403
|
this
|
|
404
404
|
)
|
|
405
|
-
), this.debounce_ =
|
|
405
|
+
), this.debounce_ = xo(() => {
|
|
406
406
|
this.checkWarning_();
|
|
407
407
|
}, 250), this.setStyle("event_blocks"), this.setTooltip("%{BKY_APP_V1_APP_BIND_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_APP_BIND_HELPURL}"), this.updateShape_();
|
|
408
408
|
},
|
|
@@ -517,7 +517,7 @@ I.app_bind_v1 = Yi;
|
|
|
517
517
|
s.forBlock.app_bind_v1 = function() {
|
|
518
518
|
return "";
|
|
519
519
|
};
|
|
520
|
-
function
|
|
520
|
+
function ro() {
|
|
521
521
|
const t = [], { appList: e } = A.app;
|
|
522
522
|
for (const { id: n, name: o } of e)
|
|
523
523
|
t.push({ id: n, name: o });
|
|
@@ -533,11 +533,11 @@ function Rn(t) {
|
|
|
533
533
|
}
|
|
534
534
|
function Ki() {
|
|
535
535
|
const t = [];
|
|
536
|
-
return
|
|
536
|
+
return ro().forEach(({ id: n, name: o }) => {
|
|
537
537
|
t.push([o, n]);
|
|
538
538
|
}), B(t);
|
|
539
539
|
}
|
|
540
|
-
function
|
|
540
|
+
function lo() {
|
|
541
541
|
const { activeApp: t } = A.app, e = [{ id: "", name: "" }];
|
|
542
542
|
for (const { id: n, name: o } of t.comps)
|
|
543
543
|
e.push({ id: n, name: o });
|
|
@@ -556,7 +556,7 @@ function Dn(t) {
|
|
|
556
556
|
}
|
|
557
557
|
function $i() {
|
|
558
558
|
const { i18n: t } = vt, e = [];
|
|
559
|
-
return
|
|
559
|
+
return lo().forEach(({ id: o, name: i }) => {
|
|
560
560
|
let a = i;
|
|
561
561
|
o === "" && (a = t.global.t("x-runtime-lib.notSet")), e.push([a, o]);
|
|
562
562
|
}), B(e);
|
|
@@ -736,7 +736,7 @@ function on(t) {
|
|
|
736
736
|
id: x(
|
|
737
737
|
"adaptSlotElementEvent",
|
|
738
738
|
t,
|
|
739
|
-
|
|
739
|
+
li(
|
|
740
740
|
l.mainKey,
|
|
741
741
|
l.slotKey,
|
|
742
742
|
f.key
|
|
@@ -948,7 +948,7 @@ function Ge(t) {
|
|
|
948
948
|
elementKey: p,
|
|
949
949
|
slotKey: f,
|
|
950
950
|
eventKey: T
|
|
951
|
-
} =
|
|
951
|
+
} = ci(h), E = P[p];
|
|
952
952
|
if (E && E.slots) {
|
|
953
953
|
const y = E.slots.find((N) => N.key === f);
|
|
954
954
|
if (y && y.events) {
|
|
@@ -984,7 +984,7 @@ function Ge(t) {
|
|
|
984
984
|
}
|
|
985
985
|
} else if (r === "adaptSlotCustomEvent") {
|
|
986
986
|
if (L(d.key) && n.type === "comp") {
|
|
987
|
-
const { compId: p, slotId: f, eventId: T } =
|
|
987
|
+
const { compId: p, slotId: f, eventId: T } = ri(h), E = a[p];
|
|
988
988
|
if (E && E.meta.slots) {
|
|
989
989
|
const y = E.meta.slots.find((N) => N.id === f);
|
|
990
990
|
if (y && y.events) {
|
|
@@ -1179,7 +1179,7 @@ function an(t) {
|
|
|
1179
1179
|
id: Lt(
|
|
1180
1180
|
"adaptSlotElementMethod",
|
|
1181
1181
|
t,
|
|
1182
|
-
|
|
1182
|
+
_i(_.key, h.key, l.key)
|
|
1183
1183
|
),
|
|
1184
1184
|
kind: "adaptSlotElementMethod",
|
|
1185
1185
|
names: [_.name, h.name, l.name],
|
|
@@ -1199,7 +1199,7 @@ function an(t) {
|
|
|
1199
1199
|
id: Lt(
|
|
1200
1200
|
"adaptSlotCustomMethod",
|
|
1201
1201
|
t,
|
|
1202
|
-
|
|
1202
|
+
pi(
|
|
1203
1203
|
r.mainKey,
|
|
1204
1204
|
h.id,
|
|
1205
1205
|
l.id
|
|
@@ -1306,7 +1306,7 @@ function je(t) {
|
|
|
1306
1306
|
elementKey: h,
|
|
1307
1307
|
slotKey: l,
|
|
1308
1308
|
methodKey: d
|
|
1309
|
-
} =
|
|
1309
|
+
} = ui(c), p = P[h];
|
|
1310
1310
|
if (p && p.slots) {
|
|
1311
1311
|
const f = p.slots.find((T) => T.key === l);
|
|
1312
1312
|
if (f && f.methods) {
|
|
@@ -1390,7 +1390,7 @@ function At(t) {
|
|
|
1390
1390
|
};
|
|
1391
1391
|
}
|
|
1392
1392
|
}
|
|
1393
|
-
function
|
|
1393
|
+
function uo(t) {
|
|
1394
1394
|
const e = [], n = Xt(t);
|
|
1395
1395
|
let o;
|
|
1396
1396
|
for (const { id: i, kind: a, names: c } of n)
|
|
@@ -1514,7 +1514,7 @@ function Zi(t, e, n) {
|
|
|
1514
1514
|
}
|
|
1515
1515
|
return !(L(t.key) && i.type === "comp" && a.meta.properties && a.meta.properties.length > 0);
|
|
1516
1516
|
}
|
|
1517
|
-
function
|
|
1517
|
+
function _o(t, e, n, o) {
|
|
1518
1518
|
return t ? t === "onEvent" ? Xi(e, n, o) : t === "triggerEvent" ? Ji(e) : t === "callMethod" ? qi(e, o) : t === "implementMethod" ? Qi(e) : t === "getProperty" ? zi(e, n, o) : t === "setProperty" ? Zi(e, n, o) : !1 : !1;
|
|
1519
1519
|
}
|
|
1520
1520
|
function Z(t) {
|
|
@@ -1527,7 +1527,7 @@ function Z(t) {
|
|
|
1527
1527
|
console.assert(!1, "invalid element", o.key);
|
|
1528
1528
|
continue;
|
|
1529
1529
|
}
|
|
1530
|
-
if (!
|
|
1530
|
+
if (!_o(t, i, n, o.comp))
|
|
1531
1531
|
return !0;
|
|
1532
1532
|
}
|
|
1533
1533
|
return !1;
|
|
@@ -1542,7 +1542,7 @@ function Nt(t) {
|
|
|
1542
1542
|
console.assert(!1, "invalid element", i.key);
|
|
1543
1543
|
continue;
|
|
1544
1544
|
}
|
|
1545
|
-
|
|
1545
|
+
_o(t, a, o, i.comp) || n.push({
|
|
1546
1546
|
id: i.id,
|
|
1547
1547
|
key: i.key,
|
|
1548
1548
|
name: a.name,
|
|
@@ -1747,7 +1747,7 @@ function bt(t) {
|
|
|
1747
1747
|
const { properties: e } = A.runtime, { activeObject: n, activeComp: o, depends: i } = A.app, a = Ct(n.type, n.subtype);
|
|
1748
1748
|
if (!a)
|
|
1749
1749
|
return;
|
|
1750
|
-
const { kind: c, nodeId: r, propertyKey: _ } =
|
|
1750
|
+
const { kind: c, nodeId: r, propertyKey: _ } = di(t), h = n.nodes.find((d) => d.id === r);
|
|
1751
1751
|
if (!h)
|
|
1752
1752
|
return;
|
|
1753
1753
|
const l = P[h.key];
|
|
@@ -1900,14 +1900,14 @@ function bt(t) {
|
|
|
1900
1900
|
}
|
|
1901
1901
|
}
|
|
1902
1902
|
}
|
|
1903
|
-
function
|
|
1903
|
+
function po(t, e) {
|
|
1904
1904
|
const n = [], o = Jt(t, e);
|
|
1905
1905
|
let i;
|
|
1906
1906
|
for (const { id: a, kind: c, names: r } of o)
|
|
1907
1907
|
c !== i && (i && n.push("separator"), i = c), n.push([Zn(c, r), a]);
|
|
1908
1908
|
return B(n);
|
|
1909
1909
|
}
|
|
1910
|
-
function
|
|
1910
|
+
function ho() {
|
|
1911
1911
|
const { activeObject: t, activeComp: e } = A.app, n = [{ id: "", name: "" }];
|
|
1912
1912
|
if (t.type !== "comp" || !e.meta.slots)
|
|
1913
1913
|
return n;
|
|
@@ -1929,7 +1929,7 @@ function Mn(t) {
|
|
|
1929
1929
|
};
|
|
1930
1930
|
}
|
|
1931
1931
|
function es() {
|
|
1932
|
-
const { i18n: t } = vt, e = [], n =
|
|
1932
|
+
const { i18n: t } = vt, e = [], n = ho();
|
|
1933
1933
|
for (const { id: o, name: i } of n) {
|
|
1934
1934
|
let a = i;
|
|
1935
1935
|
o === "" && (a = t.global.t("x-runtime-lib.notSet")), e.push([a, o]);
|
|
@@ -1947,7 +1947,7 @@ function fe(t) {
|
|
|
1947
1947
|
if (e.type === "comp")
|
|
1948
1948
|
return o.meta.states?.find((i) => i.id === t);
|
|
1949
1949
|
}
|
|
1950
|
-
function
|
|
1950
|
+
function fo() {
|
|
1951
1951
|
const t = [], e = mn();
|
|
1952
1952
|
for (const { id: n, name: o } of e)
|
|
1953
1953
|
t.push([o, n]);
|
|
@@ -2060,7 +2060,7 @@ const ns = {
|
|
|
2060
2060
|
return;
|
|
2061
2061
|
const t = [];
|
|
2062
2062
|
this.getInput("INSTANCE") && t.push(["INSTANCE", "__instance__", "x-runtime-lib.instance", !0]);
|
|
2063
|
-
const e =
|
|
2063
|
+
const e = hi(this.event.kind);
|
|
2064
2064
|
if (this.event.params)
|
|
2065
2065
|
for (let n = 0; n < this.event.params.length; n++) {
|
|
2066
2066
|
const { key: o, name: i } = this.event.params[n];
|
|
@@ -2291,7 +2291,7 @@ g([
|
|
|
2291
2291
|
}
|
|
2292
2292
|
]);
|
|
2293
2293
|
s.forBlock.watch_effect_v1 = function(t) {
|
|
2294
|
-
const e =
|
|
2294
|
+
const e = wo(t.id), n = s.statementToCode(t, "HANDLE");
|
|
2295
2295
|
return `function __watchEffect$${e}__() {
|
|
2296
2296
|
${n}};
|
|
2297
2297
|
`;
|
|
@@ -2714,7 +2714,7 @@ const cs = {
|
|
|
2714
2714
|
return Pt("implementMethod");
|
|
2715
2715
|
},
|
|
2716
2716
|
genMethodOpts_: function() {
|
|
2717
|
-
return
|
|
2717
|
+
return uo(this.node.id);
|
|
2718
2718
|
},
|
|
2719
2719
|
onchange: function(t) {
|
|
2720
2720
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -2869,7 +2869,7 @@ const rs = {
|
|
|
2869
2869
|
return Pt("implementMethod");
|
|
2870
2870
|
},
|
|
2871
2871
|
genMethodOpts_: function() {
|
|
2872
|
-
return
|
|
2872
|
+
return uo(this.node.id);
|
|
2873
2873
|
},
|
|
2874
2874
|
genOutputOpts_: function() {
|
|
2875
2875
|
return ji(this.method.id);
|
|
@@ -3031,7 +3031,7 @@ const ls = {
|
|
|
3031
3031
|
initData_: function() {
|
|
3032
3032
|
if (this.app.id)
|
|
3033
3033
|
return;
|
|
3034
|
-
const t =
|
|
3034
|
+
const t = ro()?.[0];
|
|
3035
3035
|
if (!t)
|
|
3036
3036
|
return;
|
|
3037
3037
|
this.app.id = t.id, this.app.name = t.name;
|
|
@@ -3120,7 +3120,7 @@ const us = {
|
|
|
3120
3120
|
initData_: function() {
|
|
3121
3121
|
if (this.comp.id)
|
|
3122
3122
|
return;
|
|
3123
|
-
const t =
|
|
3123
|
+
const t = lo()?.[0];
|
|
3124
3124
|
if (!t)
|
|
3125
3125
|
return;
|
|
3126
3126
|
this.comp.id = t.id, this.comp.name = t.name;
|
|
@@ -3178,7 +3178,7 @@ const _s = {
|
|
|
3178
3178
|
initData_: function() {
|
|
3179
3179
|
if (this.slot.id)
|
|
3180
3180
|
return;
|
|
3181
|
-
const t =
|
|
3181
|
+
const t = ho()?.[0];
|
|
3182
3182
|
if (!t)
|
|
3183
3183
|
return;
|
|
3184
3184
|
this.slot.id = t.id, this.slot.name = t.name;
|
|
@@ -3272,7 +3272,7 @@ const ps = {
|
|
|
3272
3272
|
return Pt("getProperty");
|
|
3273
3273
|
},
|
|
3274
3274
|
genPropertyOpts_: function() {
|
|
3275
|
-
return
|
|
3275
|
+
return po(this.node.id, "read");
|
|
3276
3276
|
},
|
|
3277
3277
|
onchange: function(t) {
|
|
3278
3278
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -3402,7 +3402,7 @@ const ds = {
|
|
|
3402
3402
|
return Pt("setProperty");
|
|
3403
3403
|
},
|
|
3404
3404
|
genPropertyOpts_: function() {
|
|
3405
|
-
return
|
|
3405
|
+
return po(this.node.id, "write");
|
|
3406
3406
|
},
|
|
3407
3407
|
onchange: function(t) {
|
|
3408
3408
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -3463,7 +3463,7 @@ const ds = {
|
|
|
3463
3463
|
if (n) {
|
|
3464
3464
|
n.setShadowDom(null);
|
|
3465
3465
|
const o = n.connection?.targetBlock();
|
|
3466
|
-
o && o.dispose(), t.meta.element ? n.setCheck(
|
|
3466
|
+
o && o.dispose(), t.meta.element ? n.setCheck(Ci(t.meta.raw)).setShadowDom(Pi(t.meta.raw)) : n.setCheck(kt(t.meta.raw.type)).setShadowDom(st(t.meta.raw.type));
|
|
3467
3467
|
}
|
|
3468
3468
|
},
|
|
3469
3469
|
checkWarning_: function() {
|
|
@@ -3534,7 +3534,7 @@ const hs = {
|
|
|
3534
3534
|
}, 0);
|
|
3535
3535
|
},
|
|
3536
3536
|
genStateOpts_: function() {
|
|
3537
|
-
return
|
|
3537
|
+
return fo();
|
|
3538
3538
|
},
|
|
3539
3539
|
onchange: function(t) {
|
|
3540
3540
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -3596,7 +3596,7 @@ const fs = {
|
|
|
3596
3596
|
this.state.id = t.state?.id ?? "", this.state.name = t.state?.name ?? "", this.state.type = t.state?.type ?? "string";
|
|
3597
3597
|
},
|
|
3598
3598
|
genStateOpts_: function() {
|
|
3599
|
-
return
|
|
3599
|
+
return fo();
|
|
3600
3600
|
},
|
|
3601
3601
|
onchange: function(t) {
|
|
3602
3602
|
if (t.type === v.BLOCK_CHANGE) {
|
|
@@ -4382,6 +4382,7 @@ const ms = S.xml, Ts = [
|
|
|
4382
4382
|
},
|
|
4383
4383
|
{
|
|
4384
4384
|
type: "on_app_event_v1",
|
|
4385
|
+
inputs: ["INSTANCE"],
|
|
4385
4386
|
prefixInputs: ["PARAM"]
|
|
4386
4387
|
},
|
|
4387
4388
|
{
|
|
@@ -4486,7 +4487,7 @@ function xt(t, e) {
|
|
|
4486
4487
|
if (n)
|
|
4487
4488
|
return n.funcs.find((o) => o.id === e);
|
|
4488
4489
|
}
|
|
4489
|
-
function
|
|
4490
|
+
function mo(t) {
|
|
4490
4491
|
const e = [];
|
|
4491
4492
|
return qt(t).forEach(({ id: o, name: i }) => {
|
|
4492
4493
|
e.push([i, o]);
|
|
@@ -4514,7 +4515,7 @@ function ee(t) {
|
|
|
4514
4515
|
function me(t) {
|
|
4515
4516
|
return A.compute.spaces.find((e) => e.id === t);
|
|
4516
4517
|
}
|
|
4517
|
-
function
|
|
4518
|
+
function To(t) {
|
|
4518
4519
|
const e = [];
|
|
4519
4520
|
return ee(t).forEach(({ id: o, name: i }) => {
|
|
4520
4521
|
e.push([i, o]);
|
|
@@ -4563,10 +4564,10 @@ const ys = {
|
|
|
4563
4564
|
}, 0);
|
|
4564
4565
|
},
|
|
4565
4566
|
genSpaceOpts_: function() {
|
|
4566
|
-
return
|
|
4567
|
+
return To("func");
|
|
4567
4568
|
},
|
|
4568
4569
|
genFuncOpts_: function() {
|
|
4569
|
-
return
|
|
4570
|
+
return mo(this.space.id);
|
|
4570
4571
|
},
|
|
4571
4572
|
onchange: function(t) {
|
|
4572
4573
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -4737,10 +4738,10 @@ const Os = {
|
|
|
4737
4738
|
}, 0);
|
|
4738
4739
|
},
|
|
4739
4740
|
genSpaceOpts_: function() {
|
|
4740
|
-
return
|
|
4741
|
+
return To("func");
|
|
4741
4742
|
},
|
|
4742
4743
|
genFuncOpts_: function() {
|
|
4743
|
-
return
|
|
4744
|
+
return mo(this.space.id);
|
|
4744
4745
|
},
|
|
4745
4746
|
onchange: function(t) {
|
|
4746
4747
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -6200,7 +6201,7 @@ const js = {
|
|
|
6200
6201
|
};
|
|
6201
6202
|
I.transaction_v1 = js;
|
|
6202
6203
|
s.forBlock.transaction_v1 = function(t) {
|
|
6203
|
-
const e = s.INDENT, n = t, o =
|
|
6204
|
+
const e = s.INDENT, n = t, o = Oi(n), i = s.statementToCode(n, "HANDLE"), a = s.statementToCode(n, "FINALLY");
|
|
6204
6205
|
return `{
|
|
6205
6206
|
${e}var __error${o}__ = '';
|
|
6206
6207
|
${e}var __txExist${o}__ = typeof(__tx__) !== 'undefined';
|
|
@@ -8849,7 +8850,7 @@ s.forBlock.object_to_json_v1 = function(t) {
|
|
|
8849
8850
|
};
|
|
8850
8851
|
const xn = S.xml, va = {
|
|
8851
8852
|
init: function() {
|
|
8852
|
-
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new
|
|
8853
|
+
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new Fo(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
8853
8854
|
}
|
|
8854
8855
|
};
|
|
8855
8856
|
I.procedure_def_container_v1 = va;
|
|
@@ -9079,7 +9080,7 @@ ${n}
|
|
|
9079
9080
|
}
|
|
9080
9081
|
`;
|
|
9081
9082
|
};
|
|
9082
|
-
function
|
|
9083
|
+
function Eo(t) {
|
|
9083
9084
|
const e = A.resource.spaces.find((i) => i.id === t);
|
|
9084
9085
|
if (!e)
|
|
9085
9086
|
return [];
|
|
@@ -9097,11 +9098,11 @@ function To(t) {
|
|
|
9097
9098
|
}
|
|
9098
9099
|
function Ba(t) {
|
|
9099
9100
|
const e = [];
|
|
9100
|
-
return
|
|
9101
|
+
return Eo(t).forEach(({ id: o, name: i }) => {
|
|
9101
9102
|
e.push([i, o]);
|
|
9102
9103
|
}), B(e);
|
|
9103
9104
|
}
|
|
9104
|
-
function
|
|
9105
|
+
function go(t, e) {
|
|
9105
9106
|
const n = A.resource.spaces.find((i) => i.id === t);
|
|
9106
9107
|
if (!n)
|
|
9107
9108
|
return [];
|
|
@@ -9112,11 +9113,11 @@ function Eo(t, e) {
|
|
|
9112
9113
|
}
|
|
9113
9114
|
function ba(t, e) {
|
|
9114
9115
|
const n = [];
|
|
9115
|
-
return
|
|
9116
|
+
return go(t, e).forEach(({ id: i, name: a }) => {
|
|
9116
9117
|
n.push([a, i]);
|
|
9117
9118
|
}), B(n);
|
|
9118
9119
|
}
|
|
9119
|
-
function
|
|
9120
|
+
function Ao() {
|
|
9120
9121
|
const t = [];
|
|
9121
9122
|
return A.resource.spaces.forEach((e) => {
|
|
9122
9123
|
e.resources.length > 0 && t.push(e);
|
|
@@ -9124,7 +9125,7 @@ function go() {
|
|
|
9124
9125
|
}
|
|
9125
9126
|
function Pa() {
|
|
9126
9127
|
const t = [];
|
|
9127
|
-
return
|
|
9128
|
+
return Ao().forEach(({ id: n, name: o }) => {
|
|
9128
9129
|
t.push([o, n]);
|
|
9129
9130
|
}), B(t);
|
|
9130
9131
|
}
|
|
@@ -9150,19 +9151,19 @@ const Ra = {
|
|
|
9150
9151
|
initData_: function() {
|
|
9151
9152
|
if (this.space.id)
|
|
9152
9153
|
return;
|
|
9153
|
-
const t =
|
|
9154
|
+
const t = Ao()?.[0];
|
|
9154
9155
|
if (!t)
|
|
9155
9156
|
return;
|
|
9156
9157
|
this.space.id = t.id, this.space.name = t.name;
|
|
9157
9158
|
const e = this.getField("SPACE");
|
|
9158
9159
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
9159
|
-
const n =
|
|
9160
|
+
const n = Eo(this.space.id)?.[0];
|
|
9160
9161
|
if (!n)
|
|
9161
9162
|
return;
|
|
9162
9163
|
this.dir.id = n.id, this.dir.name = n.name;
|
|
9163
9164
|
const o = this.getField("DIR");
|
|
9164
9165
|
o.getOptions(!1), o.setValue(this.dir.id);
|
|
9165
|
-
const i =
|
|
9166
|
+
const i = go(this.space.id, this.dir.id)?.[0];
|
|
9166
9167
|
if (!i)
|
|
9167
9168
|
return;
|
|
9168
9169
|
this.resource.id = i.id, this.resource.name = i.name;
|
|
@@ -9929,14 +9930,14 @@ s.forBlock.variable_set_v1 = function(t) {
|
|
|
9929
9930
|
`;
|
|
9930
9931
|
};
|
|
9931
9932
|
Hn.setConfirm(async (t, e) => {
|
|
9932
|
-
const n = await
|
|
9933
|
+
const n = await oi({
|
|
9933
9934
|
title: "",
|
|
9934
9935
|
text: t
|
|
9935
9936
|
});
|
|
9936
9937
|
e(!!n);
|
|
9937
9938
|
});
|
|
9938
9939
|
Hn.setPrompt(async (t, e, n) => {
|
|
9939
|
-
const o = await
|
|
9940
|
+
const o = await ii({
|
|
9940
9941
|
title: "",
|
|
9941
9942
|
value: e
|
|
9942
9943
|
});
|
|
@@ -9995,7 +9996,7 @@ ne.getText_ = function() {
|
|
|
9995
9996
|
return "<n/a>";
|
|
9996
9997
|
};
|
|
9997
9998
|
const wn = 60;
|
|
9998
|
-
|
|
9999
|
+
Yo.prototype.cleanUp = function() {
|
|
9999
10000
|
this.setResizesEnabled(!1);
|
|
10000
10001
|
const t = v.getGroup();
|
|
10001
10002
|
t || v.setGroup(!0);
|
|
@@ -10018,22 +10019,22 @@ Fo.prototype.cleanUp = function() {
|
|
|
10018
10019
|
}
|
|
10019
10020
|
v.setGroup(t), this.setResizesEnabled(!0);
|
|
10020
10021
|
};
|
|
10021
|
-
function
|
|
10022
|
+
function Io(t) {
|
|
10022
10023
|
const e = t.getParent();
|
|
10023
|
-
return e &&
|
|
10024
|
+
return e && Io(e) ? !0 : !e && !!(t.outputConnection || t.previousConnection);
|
|
10024
10025
|
}
|
|
10025
10026
|
class Ga {
|
|
10026
10027
|
init() {
|
|
10027
|
-
const e =
|
|
10028
|
+
const e = Ko.registry.getItem("blockDisable");
|
|
10028
10029
|
e && (e.preconditionFn = function(n) {
|
|
10029
10030
|
const o = n.block;
|
|
10030
|
-
return o && !o.isInFlyout && o.workspace.options.disable && o.isEditable() ? o.getInheritedDisabled() ||
|
|
10031
|
+
return o && !o.isInFlyout && o.workspace.options.disable && o.isEditable() ? o.getInheritedDisabled() || Io(o) ? "disabled" : "enabled" : "hidden";
|
|
10031
10032
|
});
|
|
10032
10033
|
}
|
|
10033
10034
|
}
|
|
10034
|
-
|
|
10035
|
-
|
|
10036
|
-
const Wa = new
|
|
10035
|
+
$o.registerFieldColour();
|
|
10036
|
+
Ho.registry.unregister(Go.names.ESCAPE);
|
|
10037
|
+
const Wa = new Wo.CrossTabCopyPaste();
|
|
10037
10038
|
Wa.init({ contextMenu: !0, shortcut: !0 });
|
|
10038
10039
|
const ja = new Ga();
|
|
10039
10040
|
ja.init();
|
|
@@ -10050,7 +10051,7 @@ function Tn(t) {
|
|
|
10050
10051
|
const i = o.getRelativeToSurfaceXY(), a = i.x * e.scale, c = i.y * e.scale;
|
|
10051
10052
|
e.scroll(-a, -c);
|
|
10052
10053
|
}
|
|
10053
|
-
function
|
|
10054
|
+
function yo() {
|
|
10054
10055
|
const t = Qt();
|
|
10055
10056
|
if (!t)
|
|
10056
10057
|
return;
|
|
@@ -10380,12 +10381,12 @@ function ec(t) {
|
|
|
10380
10381
|
}
|
|
10381
10382
|
return e;
|
|
10382
10383
|
}
|
|
10383
|
-
const
|
|
10384
|
+
const Oo = /* @__PURE__ */ Symbol();
|
|
10384
10385
|
function nc(t) {
|
|
10385
|
-
|
|
10386
|
+
fi(Oo, t);
|
|
10386
10387
|
}
|
|
10387
10388
|
function En() {
|
|
10388
|
-
return
|
|
10389
|
+
return mi(Oo);
|
|
10389
10390
|
}
|
|
10390
10391
|
const oc = /* @__PURE__ */ dt({
|
|
10391
10392
|
__name: "index",
|
|
@@ -10483,8 +10484,8 @@ const oc = /* @__PURE__ */ dt({
|
|
|
10483
10484
|
pointerEvents: "none"
|
|
10484
10485
|
}));
|
|
10485
10486
|
return (l, d) => {
|
|
10486
|
-
const p = Y("v-spacer"), f = Y("v-icon"), T =
|
|
10487
|
-
return
|
|
10487
|
+
const p = Y("v-spacer"), f = Y("v-icon"), T = Ti("ripple");
|
|
10488
|
+
return Ei((U(), at("div", {
|
|
10488
10489
|
class: "d-flex align-center cursor-pointer",
|
|
10489
10490
|
style: z(_.value),
|
|
10490
10491
|
onClick: d[1] || (d[1] = (E) => c("x-click", a.id)),
|
|
@@ -10531,7 +10532,7 @@ const oc = /* @__PURE__ */ dt({
|
|
|
10531
10532
|
}
|
|
10532
10533
|
const p = [];
|
|
10533
10534
|
i.workspace.getTopBlocks(!0).forEach((T) => {
|
|
10534
|
-
const E = T.id ===
|
|
10535
|
+
const E = T.id === Xo()?.id;
|
|
10535
10536
|
let y = "";
|
|
10536
10537
|
if (T.type.startsWith("on_app_event_v")) {
|
|
10537
10538
|
const D = T, Rt = P[D.node.key];
|
|
@@ -10588,7 +10589,7 @@ const oc = /* @__PURE__ */ dt({
|
|
|
10588
10589
|
E
|
|
10589
10590
|
).getRelativeToSurfaceXY().y + 10);
|
|
10590
10591
|
const N = T.getRelativeToSurfaceXY();
|
|
10591
|
-
T.moveTo(new S.Coordinate(N.x, y)), i.workspace.cleanUp(),
|
|
10592
|
+
T.moveTo(new S.Coordinate(N.x, y)), i.workspace.cleanUp(), yo();
|
|
10592
10593
|
}, d = async (p) => {
|
|
10593
10594
|
if (!i.workspace) {
|
|
10594
10595
|
console.assert(!1);
|
|
@@ -10597,7 +10598,7 @@ const oc = /* @__PURE__ */ dt({
|
|
|
10597
10598
|
const f = i.workspace.getBlockById(p);
|
|
10598
10599
|
Wn.setSelected(f), Tn(p), o.value = !1;
|
|
10599
10600
|
};
|
|
10600
|
-
return (p, f) => a.value.length > 0 ? (U(), _t(F(
|
|
10601
|
+
return (p, f) => a.value.length > 0 ? (U(), _t(F(jo), {
|
|
10601
10602
|
key: 0,
|
|
10602
10603
|
modelValue: a.value,
|
|
10603
10604
|
"onUpdate:modelValue": f[0] || (f[0] = (T) => a.value = T),
|
|
@@ -10609,7 +10610,7 @@ const oc = /* @__PURE__ */ dt({
|
|
|
10609
10610
|
onStart: _
|
|
10610
10611
|
}, {
|
|
10611
10612
|
default: pt(() => [
|
|
10612
|
-
(U(!0), at(eo, null,
|
|
10613
|
+
(U(!0), at(eo, null, gi(a.value, (T) => (U(), _t(rc, {
|
|
10613
10614
|
id: T.id,
|
|
10614
10615
|
key: T.id,
|
|
10615
10616
|
desc: T.desc,
|
|
@@ -10677,7 +10678,7 @@ const oc = /* @__PURE__ */ dt({
|
|
|
10677
10678
|
}), h = $(() => ({
|
|
10678
10679
|
height: "60px"
|
|
10679
10680
|
})), { open: l } = _n(`blocklyNavigatorDlg${en()}`);
|
|
10680
|
-
|
|
10681
|
+
Ai(() => {
|
|
10681
10682
|
l.value = !1;
|
|
10682
10683
|
});
|
|
10683
10684
|
const d = Gt("blockList"), p = Gt("blockTree");
|
|
@@ -10784,7 +10785,7 @@ function C(t, e) {
|
|
|
10784
10785
|
n.appendChild(o);
|
|
10785
10786
|
return n;
|
|
10786
10787
|
}
|
|
10787
|
-
function
|
|
10788
|
+
function vo(t) {
|
|
10788
10789
|
const e = G.createElement("mutation");
|
|
10789
10790
|
for (const { key: n, value: o } of t)
|
|
10790
10791
|
e.setAttribute(n, o);
|
|
@@ -10849,10 +10850,10 @@ function gc() {
|
|
|
10849
10850
|
function Ac() {
|
|
10850
10851
|
const t = [];
|
|
10851
10852
|
return t.push(H(m("LABEL_EVENT"))), Z("onEvent") && t.push(C("on_app_event_v1")), Tc() && t.push(C("trigger_app_event_v1")), t.push(
|
|
10852
|
-
C("app_bind_v1", [
|
|
10853
|
+
C("app_bind_v1", [vo([{ key: "items", value: "2" }])])
|
|
10853
10854
|
), t.push(C("watch_effect_v1")), (Z("getProperty") || Z("setProperty")) && t.push(H(m("LABEL_PROPERTY"))), Z("getProperty") && t.push(C("get_app_property_v1")), Z("setProperty") && t.push(C("set_app_property_v1")), Ec() && (t.push(H(m("LABEL_STATE"))), t.push(C("get_app_state_v1")), t.push(C("set_app_state_v1"))), (Z("callMethod") || Yn()) && t.push(H(m("LABEL_METHOD"))), Z("callMethod") && t.push(C("call_app_method_v1")), Yn() && (t.push(C("implement_app_method_v1")), gc() && t.push(C("set_app_method_output_v1")), t.push(C("procedure_return_v1"))), t;
|
|
10854
10855
|
}
|
|
10855
|
-
const
|
|
10856
|
+
const Co = { name: "APP_COMP_CATEGORY", callback: Ac };
|
|
10856
10857
|
function Ic() {
|
|
10857
10858
|
const t = [];
|
|
10858
10859
|
return t.push(H(m("LABEL_FUNC"))), t.push(H(m("LABEL_FLOW"))), t;
|
|
@@ -10885,10 +10886,10 @@ function kc() {
|
|
|
10885
10886
|
function Nc() {
|
|
10886
10887
|
const t = [];
|
|
10887
10888
|
return t.push(H(m("LABEL_EVENT"))), Z("onEvent") && t.push(C("on_app_event_v1")), t.push(
|
|
10888
|
-
C("app_bind_v1", [
|
|
10889
|
+
C("app_bind_v1", [vo([{ key: "items", value: "2" }])])
|
|
10889
10890
|
), t.push(C("watch_effect_v1")), (Z("getProperty") || Z("setProperty")) && t.push(H(m("LABEL_PROPERTY"))), Z("getProperty") && t.push(C("get_app_property_v1")), Z("setProperty") && t.push(C("set_app_property_v1")), Cc() && (t.push(H(m("LABEL_STATE"))), t.push(C("get_app_state_v1")), t.push(C("set_app_state_v1"))), Z("callMethod") && (t.push(H(m("LABEL_METHOD"))), t.push(C("call_app_method_v1"))), kc() && (t.push(H(m("LABEL_ARGUMENT"))), t.push(C("get_page_argument_v1"))), t;
|
|
10890
10891
|
}
|
|
10891
|
-
const
|
|
10892
|
+
const ko = { name: "APP_PAGE_CATEGORY", callback: Nc };
|
|
10892
10893
|
function Sc() {
|
|
10893
10894
|
const t = [];
|
|
10894
10895
|
return t.push(H(m("LABEL_RESOURCE"))), t.push(C("upload_resource_v1")), t;
|
|
@@ -11685,7 +11686,7 @@ const Ce = { name: "COMPUTE_MISC_CATEGORY", callback: Uc }, Re = {
|
|
|
11685
11686
|
type: "text_reverse_v1"
|
|
11686
11687
|
}
|
|
11687
11688
|
]
|
|
11688
|
-
},
|
|
11689
|
+
}, No = {
|
|
11689
11690
|
kind: "category",
|
|
11690
11691
|
name: "%{BKY_CATEGORY_TIME}",
|
|
11691
11692
|
categorystyle: "time_category",
|
|
@@ -11716,7 +11717,7 @@ const Ce = { name: "COMPUTE_MISC_CATEGORY", callback: Uc }, Re = {
|
|
|
11716
11717
|
kind: "category",
|
|
11717
11718
|
name: "%{BKY_CATEGORY_COMP}",
|
|
11718
11719
|
categorystyle: "misc_category",
|
|
11719
|
-
custom:
|
|
11720
|
+
custom: Co.name
|
|
11720
11721
|
},
|
|
11721
11722
|
{
|
|
11722
11723
|
kind: "category",
|
|
@@ -11737,7 +11738,7 @@ const Ce = { name: "COMPUTE_MISC_CATEGORY", callback: Uc }, Re = {
|
|
|
11737
11738
|
De,
|
|
11738
11739
|
xe,
|
|
11739
11740
|
Re,
|
|
11740
|
-
|
|
11741
|
+
No,
|
|
11741
11742
|
{
|
|
11742
11743
|
kind: "category",
|
|
11743
11744
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -11895,7 +11896,7 @@ const Ce = { name: "COMPUTE_MISC_CATEGORY", callback: Uc }, Re = {
|
|
|
11895
11896
|
kind: "category",
|
|
11896
11897
|
name: "%{BKY_CATEGORY_PAGE}",
|
|
11897
11898
|
categorystyle: "misc_category",
|
|
11898
|
-
custom:
|
|
11899
|
+
custom: ko.name
|
|
11899
11900
|
},
|
|
11900
11901
|
{
|
|
11901
11902
|
kind: "category",
|
|
@@ -11916,7 +11917,7 @@ const Ce = { name: "COMPUTE_MISC_CATEGORY", callback: Uc }, Re = {
|
|
|
11916
11917
|
De,
|
|
11917
11918
|
xe,
|
|
11918
11919
|
Re,
|
|
11919
|
-
|
|
11920
|
+
No,
|
|
11920
11921
|
{
|
|
11921
11922
|
kind: "category",
|
|
11922
11923
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -11970,10 +11971,10 @@ const Ce = { name: "COMPUTE_MISC_CATEGORY", callback: Uc }, Re = {
|
|
|
11970
11971
|
};
|
|
11971
11972
|
function Kc(t, e, n, o) {
|
|
11972
11973
|
Qe.theme = o ? "dark" : "light", Qe.toolbox = $c(e, n);
|
|
11973
|
-
const i =
|
|
11974
|
+
const i = Jo(t, Qe);
|
|
11974
11975
|
return i.addChangeListener((a) => {
|
|
11975
11976
|
setTimeout(() => {
|
|
11976
|
-
|
|
11977
|
+
qo.shadowBlockConversionChangeListener(a);
|
|
11977
11978
|
}, 0);
|
|
11978
11979
|
}), Hc(i, e, n), Gc(i), i;
|
|
11979
11980
|
}
|
|
@@ -11985,7 +11986,7 @@ function Hc(t, e, n) {
|
|
|
11985
11986
|
function o({ name: i, callback: a }) {
|
|
11986
11987
|
t.registerToolboxCategoryCallback(i, () => a(e));
|
|
11987
11988
|
}
|
|
11988
|
-
e === "page" ? n === "v1" && (o(
|
|
11989
|
+
e === "page" ? n === "v1" && (o(ko), o(ge), o(Ae), o(Et), o(Tt), o(Ie), o(Ee)) : e === "comp" ? n === "v1" && (o(Co), o(ge), o(Ae), o(Et), o(Tt), o(Ie), o(Ee)) : e === "func" ? n === "v1" && (o(ve), o(Oe), o(ye), o(Ce), o(Et), o(Tt)) : e === "flow" && n === "v1" && (o(ve), o(Oe), o(ye), o(Ce), o(Et), o(Tt));
|
|
11989
11990
|
}
|
|
11990
11991
|
function Gc(t) {
|
|
11991
11992
|
const { router: e } = vt;
|
|
@@ -12145,21 +12146,21 @@ const Xc = { class: "position-relative w-100 h-100" }, Jc = /* @__PURE__ */ dt({
|
|
|
12145
12146
|
console.assert(!1);
|
|
12146
12147
|
return;
|
|
12147
12148
|
}
|
|
12148
|
-
|
|
12149
|
+
Qo(h.value), await Bn(t.locale), p.workspace = Kc(_.value, t.type, t.version, t.dark), p.workspace.addChangeListener(v.disableOrphans), p.workspace.addChangeListener(So);
|
|
12149
12150
|
const b = document.querySelector(`#${r} .blocklyFlyout`);
|
|
12150
12151
|
new MutationObserver((Ye) => {
|
|
12151
12152
|
Ye.forEach((oe) => {
|
|
12152
12153
|
oe.type === "attributes" && oe.attributeName === "style" && (Ft.value = p.workspace.getFlyout().isVisible());
|
|
12153
12154
|
});
|
|
12154
|
-
}).observe(b, { attributes: !0 }), Ft.value = p.workspace.getFlyout().isVisible(), An(), In(), await
|
|
12155
|
+
}).observe(b, { attributes: !0 }), Ft.value = p.workspace.getFlyout().isVisible(), An(), In(), await Ii(), c("ready");
|
|
12155
12156
|
}), Ln(() => {
|
|
12156
12157
|
Ft.value = !1;
|
|
12157
|
-
}),
|
|
12158
|
-
p.workspace &&
|
|
12158
|
+
}), zo(_, () => {
|
|
12159
|
+
p.workspace && Zo(p.workspace);
|
|
12159
12160
|
});
|
|
12160
|
-
async function
|
|
12161
|
+
async function So(b) {
|
|
12161
12162
|
if (b.type === v.FINISHED_LOADING) {
|
|
12162
|
-
|
|
12163
|
+
yo(), setTimeout(() => {
|
|
12163
12164
|
d.value?.update();
|
|
12164
12165
|
}, 0), f.value = !1;
|
|
12165
12166
|
return;
|
|
@@ -12174,18 +12175,18 @@ const Xc = { class: "position-relative w-100 h-100" }, Jc = /* @__PURE__ */ dt({
|
|
|
12174
12175
|
}, 0);
|
|
12175
12176
|
}
|
|
12176
12177
|
}
|
|
12177
|
-
const
|
|
12178
|
+
const Lo = (b) => {
|
|
12178
12179
|
f.value = !0, t.type === "json" ? Wc(b, p.workspace) : X.workspaces.load(b, p.workspace);
|
|
12179
|
-
},
|
|
12180
|
+
}, Bo = () => t.type === "json" ? jc(p.workspace) : X.workspaces.save(p.workspace), bo = () => {
|
|
12180
12181
|
if (t.type === "json")
|
|
12181
12182
|
console.assert(!1);
|
|
12182
12183
|
else
|
|
12183
12184
|
return s.workspaceToCode(p.workspace);
|
|
12184
|
-
},
|
|
12185
|
+
}, Po = () => ec(p.workspace), An = () => {
|
|
12185
12186
|
p.workspace.setIsReadOnly(i.value), p.workspace.isReadOnly() && (Ft.value = !1);
|
|
12186
12187
|
}, In = () => {
|
|
12187
12188
|
p.workspace.setScale(a.value);
|
|
12188
|
-
},
|
|
12189
|
+
}, Ro = () => {
|
|
12189
12190
|
p.workspace.fireChangeListener(new oo());
|
|
12190
12191
|
}, yn = () => {
|
|
12191
12192
|
l.value?.cleanWorkspace();
|
|
@@ -12216,11 +12217,11 @@ const Xc = { class: "position-relative w-100 h-100" }, Jc = /* @__PURE__ */ dt({
|
|
|
12216
12217
|
In();
|
|
12217
12218
|
}), e({
|
|
12218
12219
|
loading: f,
|
|
12219
|
-
load:
|
|
12220
|
-
save:
|
|
12221
|
-
generateCode:
|
|
12222
|
-
generateReactivity:
|
|
12223
|
-
fireStateChange:
|
|
12220
|
+
load: Lo,
|
|
12221
|
+
save: Bo,
|
|
12222
|
+
generateCode: bo,
|
|
12223
|
+
generateReactivity: Po,
|
|
12224
|
+
fireStateChange: Ro
|
|
12224
12225
|
}), (b, St) => {
|
|
12225
12226
|
const Ye = Y("v-icon"), oe = Y("x-loading");
|
|
12226
12227
|
return U(), at("div", Xc, [
|
|
@@ -12233,7 +12234,7 @@ const Xc = { class: "position-relative w-100 h-100" }, Jc = /* @__PURE__ */ dt({
|
|
|
12233
12234
|
j("div", {
|
|
12234
12235
|
style: z(N.value)
|
|
12235
12236
|
}, [
|
|
12236
|
-
|
|
12237
|
+
yi(b.$slots, "bottom")
|
|
12237
12238
|
], 4),
|
|
12238
12239
|
T.value ? (U(), at("div", {
|
|
12239
12240
|
key: 0,
|
|
@@ -12257,7 +12258,7 @@ const Xc = { class: "position-relative w-100 h-100" }, Jc = /* @__PURE__ */ dt({
|
|
|
12257
12258
|
}, null, 8, ["lock"]),
|
|
12258
12259
|
M(ic, {
|
|
12259
12260
|
modelValue: i.value,
|
|
12260
|
-
"onUpdate:modelValue": St[0] || (St[0] = (
|
|
12261
|
+
"onUpdate:modelValue": St[0] || (St[0] = (Do) => i.value = Do)
|
|
12261
12262
|
}, null, 8, ["modelValue"]),
|
|
12262
12263
|
M(fc, {
|
|
12263
12264
|
ref_key: "navigator",
|
|
@@ -12293,8 +12294,8 @@ const Xc = { class: "position-relative w-100 h-100" }, Jc = /* @__PURE__ */ dt({
|
|
|
12293
12294
|
},
|
|
12294
12295
|
setup(t) {
|
|
12295
12296
|
const e = t;
|
|
12296
|
-
|
|
12297
|
-
const n =
|
|
12297
|
+
ti.registerLanguage("javascript", ei);
|
|
12298
|
+
const n = ni.component, { backgroundColor2: o } = zt();
|
|
12298
12299
|
return (i, a) => {
|
|
12299
12300
|
const c = Y("v-sheet");
|
|
12300
12301
|
return U(), _t(c, {
|