x-block-lib 0.8.70 → 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/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);
|
|
@@ -129,7 +129,7 @@ function W(t, e) {
|
|
|
129
129
|
v.enable();
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function gt(t) {
|
|
133
133
|
const e = `<shadow type="text_v1"><field name="TEXT">${t}</field></shadow>`;
|
|
134
134
|
return S.xml.textToDom(e);
|
|
135
135
|
}
|
|
@@ -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() {
|
|
@@ -165,13 +165,13 @@ function bi(t) {
|
|
|
165
165
|
const e = `<shadow type="color_picker_v1"><field name="COLOR">${t}</field></shadow>`;
|
|
166
166
|
return S.xml.textToDom(e);
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function st(t) {
|
|
169
169
|
let e = null;
|
|
170
|
-
return t === "string" ? 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) {
|
|
@@ -1107,7 +1107,7 @@ function ot(t) {
|
|
|
1107
1107
|
e.push({ key: n, name: o, type: i });
|
|
1108
1108
|
return e;
|
|
1109
1109
|
}
|
|
1110
|
-
function
|
|
1110
|
+
function lt(t) {
|
|
1111
1111
|
if (!t)
|
|
1112
1112
|
return;
|
|
1113
1113
|
const e = [];
|
|
@@ -1140,7 +1140,7 @@ function an(t) {
|
|
|
1140
1140
|
kind: "refMethod",
|
|
1141
1141
|
names: [h],
|
|
1142
1142
|
inputs: ot(l),
|
|
1143
|
-
outputs:
|
|
1143
|
+
outputs: lt(d)
|
|
1144
1144
|
});
|
|
1145
1145
|
}
|
|
1146
1146
|
if (et(c.key) && a.comp) {
|
|
@@ -1152,7 +1152,7 @@ function an(t) {
|
|
|
1152
1152
|
kind: "multipleRefMethod",
|
|
1153
1153
|
names: [h],
|
|
1154
1154
|
inputs: ot(l),
|
|
1155
|
-
outputs:
|
|
1155
|
+
outputs: lt(d)
|
|
1156
1156
|
});
|
|
1157
1157
|
}
|
|
1158
1158
|
if (L(c.key) && e.type === "comp" && n.meta.methods)
|
|
@@ -1162,7 +1162,7 @@ function an(t) {
|
|
|
1162
1162
|
kind: "customMethod",
|
|
1163
1163
|
names: [_],
|
|
1164
1164
|
inputs: ot(h),
|
|
1165
|
-
outputs:
|
|
1165
|
+
outputs: lt(l)
|
|
1166
1166
|
});
|
|
1167
1167
|
if (L(c.key) && e.type === "comp" && a.adaptSlot) {
|
|
1168
1168
|
const r = pn(a.adaptSlot);
|
|
@@ -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
|
|
@@ -1208,7 +1208,7 @@ function an(t) {
|
|
|
1208
1208
|
kind: "adaptSlotCustomMethod",
|
|
1209
1209
|
names: [_.name, h.name, l.name],
|
|
1210
1210
|
inputs: ot(l.inputs),
|
|
1211
|
-
outputs:
|
|
1211
|
+
outputs: lt(l.outputs)
|
|
1212
1212
|
});
|
|
1213
1213
|
}
|
|
1214
1214
|
}
|
|
@@ -1250,7 +1250,7 @@ function je(t) {
|
|
|
1250
1250
|
kind: i,
|
|
1251
1251
|
names: [l.name],
|
|
1252
1252
|
inputs: ot(l.inputs),
|
|
1253
|
-
outputs:
|
|
1253
|
+
outputs: lt(l.outputs)
|
|
1254
1254
|
};
|
|
1255
1255
|
}
|
|
1256
1256
|
}
|
|
@@ -1267,7 +1267,7 @@ function je(t) {
|
|
|
1267
1267
|
kind: i,
|
|
1268
1268
|
names: [l.name],
|
|
1269
1269
|
inputs: ot(l.inputs),
|
|
1270
|
-
outputs:
|
|
1270
|
+
outputs: lt(l.outputs)
|
|
1271
1271
|
};
|
|
1272
1272
|
}
|
|
1273
1273
|
}
|
|
@@ -1296,7 +1296,7 @@ function je(t) {
|
|
|
1296
1296
|
kind: i,
|
|
1297
1297
|
names: [d.name, p.name],
|
|
1298
1298
|
inputs: ot(p.inputs),
|
|
1299
|
-
outputs:
|
|
1299
|
+
outputs: lt(p.outputs)
|
|
1300
1300
|
};
|
|
1301
1301
|
}
|
|
1302
1302
|
}
|
|
@@ -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) {
|
|
@@ -1334,7 +1334,7 @@ function je(t) {
|
|
|
1334
1334
|
kind: i,
|
|
1335
1335
|
names: [p.name, f.name, T.name],
|
|
1336
1336
|
inputs: ot(T.inputs),
|
|
1337
|
-
outputs:
|
|
1337
|
+
outputs: lt(T.outputs)
|
|
1338
1338
|
};
|
|
1339
1339
|
}
|
|
1340
1340
|
}
|
|
@@ -1361,11 +1361,11 @@ function Xt(t) {
|
|
|
1361
1361
|
kind: "customMethod",
|
|
1362
1362
|
names: [r],
|
|
1363
1363
|
inputs: ot(_),
|
|
1364
|
-
outputs:
|
|
1364
|
+
outputs: lt(h)
|
|
1365
1365
|
});
|
|
1366
1366
|
return o;
|
|
1367
1367
|
}
|
|
1368
|
-
function
|
|
1368
|
+
function At(t) {
|
|
1369
1369
|
if (!t)
|
|
1370
1370
|
return;
|
|
1371
1371
|
const { activeObject: e, activeComp: n } = A.app, { kind: o, nodeId: i, methodKey: a } = Zt(t), c = e.nodes.find((_) => _.id === i);
|
|
@@ -1386,11 +1386,11 @@ function It(t) {
|
|
|
1386
1386
|
kind: o,
|
|
1387
1387
|
names: [_.name],
|
|
1388
1388
|
inputs: ot(_.inputs),
|
|
1389
|
-
outputs:
|
|
1389
|
+
outputs: lt(_.outputs)
|
|
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)
|
|
@@ -1398,11 +1398,11 @@ function lo(t) {
|
|
|
1398
1398
|
return B(e);
|
|
1399
1399
|
}
|
|
1400
1400
|
function cn(t) {
|
|
1401
|
-
const e =
|
|
1401
|
+
const e = At(t);
|
|
1402
1402
|
return e ? e.outputs : [];
|
|
1403
1403
|
}
|
|
1404
1404
|
function Xe(t, e) {
|
|
1405
|
-
const n =
|
|
1405
|
+
const n = At(t);
|
|
1406
1406
|
if (n)
|
|
1407
1407
|
return n.outputs?.find((o) => o.key === e);
|
|
1408
1408
|
}
|
|
@@ -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,
|
|
@@ -1613,7 +1613,7 @@ function Jt(t, e) {
|
|
|
1613
1613
|
if (n[h.key] && n[h.key][r])
|
|
1614
1614
|
for (const { keys: l, names: d, raw: p } of n[h.key][r])
|
|
1615
1615
|
e === "write" && Be(l, p) || c.push({
|
|
1616
|
-
id:
|
|
1616
|
+
id: ht("elementProperty", t, l),
|
|
1617
1617
|
kind: "elementProperty",
|
|
1618
1618
|
names: d,
|
|
1619
1619
|
meta: {
|
|
@@ -1626,7 +1626,7 @@ function Jt(t, e) {
|
|
|
1626
1626
|
if (l && l.meta.properties)
|
|
1627
1627
|
for (const { id: d, name: p, type: f } of l.meta.properties)
|
|
1628
1628
|
c.push({
|
|
1629
|
-
id:
|
|
1629
|
+
id: ht("refProperty", t, d),
|
|
1630
1630
|
kind: "refProperty",
|
|
1631
1631
|
names: [p],
|
|
1632
1632
|
meta: {
|
|
@@ -1639,7 +1639,7 @@ function Jt(t, e) {
|
|
|
1639
1639
|
if (l && l.meta.properties)
|
|
1640
1640
|
for (const { id: d, name: p, type: f } of l.meta.properties)
|
|
1641
1641
|
c.push({
|
|
1642
|
-
id:
|
|
1642
|
+
id: ht("multipleRefProperty", t, d),
|
|
1643
1643
|
kind: "multipleRefProperty",
|
|
1644
1644
|
names: [p],
|
|
1645
1645
|
meta: {
|
|
@@ -1652,7 +1652,7 @@ function Jt(t, e) {
|
|
|
1652
1652
|
if (l && l.properties)
|
|
1653
1653
|
for (const { id: d, name: p, type: f } of l.properties)
|
|
1654
1654
|
c.push({
|
|
1655
|
-
id:
|
|
1655
|
+
id: ht("slotProperty", t, d),
|
|
1656
1656
|
kind: "slotProperty",
|
|
1657
1657
|
names: [p],
|
|
1658
1658
|
meta: {
|
|
@@ -1665,7 +1665,7 @@ function Jt(t, e) {
|
|
|
1665
1665
|
if (l && l.properties)
|
|
1666
1666
|
for (const { id: d, name: p, type: f } of l.properties)
|
|
1667
1667
|
c.push({
|
|
1668
|
-
id:
|
|
1668
|
+
id: ht("multipleSlotProperty", t, d),
|
|
1669
1669
|
kind: "multipleSlotProperty",
|
|
1670
1670
|
names: [p],
|
|
1671
1671
|
meta: {
|
|
@@ -1676,7 +1676,7 @@ function Jt(t, e) {
|
|
|
1676
1676
|
if (L(h.key) && o.type === "comp" && i.meta.properties)
|
|
1677
1677
|
for (const { id: l, name: d, type: p } of i.meta.properties)
|
|
1678
1678
|
c.push({
|
|
1679
|
-
id:
|
|
1679
|
+
id: ht("customProperty", t, l),
|
|
1680
1680
|
kind: "customProperty",
|
|
1681
1681
|
names: [d],
|
|
1682
1682
|
meta: {
|
|
@@ -1695,7 +1695,7 @@ function Jt(t, e) {
|
|
|
1695
1695
|
if (p && p.properties)
|
|
1696
1696
|
for (const f of p.properties)
|
|
1697
1697
|
c.push({
|
|
1698
|
-
id:
|
|
1698
|
+
id: ht(
|
|
1699
1699
|
"adaptSlotElementProperty",
|
|
1700
1700
|
t,
|
|
1701
1701
|
zn(
|
|
@@ -1720,7 +1720,7 @@ function Jt(t, e) {
|
|
|
1720
1720
|
if (p && p.properties)
|
|
1721
1721
|
for (const f of p.properties)
|
|
1722
1722
|
c.push({
|
|
1723
|
-
id:
|
|
1723
|
+
id: ht(
|
|
1724
1724
|
"adaptSlotCustomProperty",
|
|
1725
1725
|
t,
|
|
1726
1726
|
se(
|
|
@@ -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]);
|
|
@@ -2049,7 +2049,7 @@ const ns = {
|
|
|
2049
2049
|
t = !0;
|
|
2050
2050
|
}
|
|
2051
2051
|
if (t)
|
|
2052
|
-
this.getInput("INSTANCE") || this.appendValueInput("INSTANCE").
|
|
2052
|
+
this.getInput("INSTANCE") || this.appendValueInput("INSTANCE").setCheck("String"), this.event.params && this.event.params.length > 0 ? this.moveInputBefore("INSTANCE", "PARAM0") : this.moveInputBefore("INSTANCE", "HANDLE");
|
|
2053
2053
|
else if (this.getInput("INSTANCE")) {
|
|
2054
2054
|
const e = this.getInput("INSTANCE").connection.targetBlock();
|
|
2055
2055
|
e && e.dispose(), this.removeInput("INSTANCE");
|
|
@@ -2059,20 +2059,12 @@ const ns = {
|
|
|
2059
2059
|
if (this.isInsertionMarker())
|
|
2060
2060
|
return;
|
|
2061
2061
|
const t = [];
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
case "multipleRefEvent":
|
|
2065
|
-
case "multipleRefPropertyChangeEvent":
|
|
2066
|
-
case "multipleSlotEvent":
|
|
2067
|
-
case "multipleSlotPropertyChangeEvent":
|
|
2068
|
-
e = !0;
|
|
2069
|
-
}
|
|
2070
|
-
e && t.push(["INSTANCE", "__instance__", "x-runtime-lib.instance", !0]);
|
|
2071
|
-
const n = di(this.event.kind);
|
|
2062
|
+
this.getInput("INSTANCE") && t.push(["INSTANCE", "__instance__", "x-runtime-lib.instance", !0]);
|
|
2063
|
+
const e = hi(this.event.kind);
|
|
2072
2064
|
if (this.event.params)
|
|
2073
|
-
for (let
|
|
2074
|
-
const { key:
|
|
2075
|
-
t.push(["PARAM" +
|
|
2065
|
+
for (let n = 0; n < this.event.params.length; n++) {
|
|
2066
|
+
const { key: o, name: i } = this.event.params[n];
|
|
2067
|
+
t.push(["PARAM" + n, `__param$${o}__`, i, e]);
|
|
2076
2068
|
}
|
|
2077
2069
|
t.length > 0 && W(this, t);
|
|
2078
2070
|
},
|
|
@@ -2107,14 +2099,7 @@ I.on_app_event_v1 = ns;
|
|
|
2107
2099
|
s.forBlock.on_app_event_v1 = function(t) {
|
|
2108
2100
|
const e = s.quote_, n = t;
|
|
2109
2101
|
let o = "";
|
|
2110
|
-
|
|
2111
|
-
case "multipleRefEvent":
|
|
2112
|
-
case "multipleRefPropertyChangeEvent":
|
|
2113
|
-
case "multipleSlotEvent":
|
|
2114
|
-
case "multipleSlotPropertyChangeEvent":
|
|
2115
|
-
o += "__instance__";
|
|
2116
|
-
}
|
|
2117
|
-
if (n.event.params)
|
|
2102
|
+
if (n.getInput("INSTANCE") && (o += "__instance__"), n.event.params)
|
|
2118
2103
|
for (const { key: c } of n.event.params)
|
|
2119
2104
|
o && (o += ", "), o += `__param$${c}__`;
|
|
2120
2105
|
const i = s.statementToCode(n, "HANDLE");
|
|
@@ -2223,32 +2208,24 @@ const os = {
|
|
|
2223
2208
|
t = !0;
|
|
2224
2209
|
}
|
|
2225
2210
|
if (t)
|
|
2226
|
-
this.getInput("INSTANCE") || this.appendValueInput("INSTANCE").setAlign(k.Align.RIGHT).appendField(m("BKY_APP_INSTANCE")), this.event.params && this.event.params.length > 0 && this.moveInputBefore("INSTANCE", "PARAM0");
|
|
2211
|
+
this.getInput("INSTANCE") || this.appendValueInput("INSTANCE").setAlign(k.Align.RIGHT).appendField(m("BKY_APP_INSTANCE")).setCheck("String"), this.event.params && this.event.params.length > 0 && this.moveInputBefore("INSTANCE", "PARAM0");
|
|
2227
2212
|
else if (this.getInput("INSTANCE")) {
|
|
2228
2213
|
const e = this.getInput("INSTANCE").connection.targetBlock();
|
|
2229
2214
|
e && e.dispose(), this.removeInput("INSTANCE");
|
|
2230
2215
|
}
|
|
2231
2216
|
},
|
|
2232
2217
|
updateShadows_: function() {
|
|
2233
|
-
if (this.isInsertionMarker())
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
if (t) {
|
|
2244
|
-
const e = dt("string");
|
|
2245
|
-
this.getInput("INSTANCE").setShadowDom(e);
|
|
2218
|
+
if (!this.isInsertionMarker()) {
|
|
2219
|
+
if (this.getInput("INSTANCE")) {
|
|
2220
|
+
const t = st("string");
|
|
2221
|
+
this.getInput("INSTANCE").setShadowDom(t);
|
|
2222
|
+
}
|
|
2223
|
+
if (this.event.params)
|
|
2224
|
+
for (let t = 0; t < this.event.params.length; t++) {
|
|
2225
|
+
const e = this.event.params[t], n = st(e.type);
|
|
2226
|
+
this.getInput("PARAM" + t).connection.setShadowDom(n);
|
|
2227
|
+
}
|
|
2246
2228
|
}
|
|
2247
|
-
if (this.event.params)
|
|
2248
|
-
for (let e = 0; e < this.event.params.length; e++) {
|
|
2249
|
-
const n = this.event.params[e], o = dt(n.type);
|
|
2250
|
-
this.getInput("PARAM" + e)?.connection?.setShadowDom(o);
|
|
2251
|
-
}
|
|
2252
2229
|
},
|
|
2253
2230
|
checkWarning_: function() {
|
|
2254
2231
|
const t = J(this.node.id);
|
|
@@ -2281,13 +2258,7 @@ I.trigger_app_event_v1 = os;
|
|
|
2281
2258
|
s.forBlock.trigger_app_event_v1 = function(t) {
|
|
2282
2259
|
const e = s.quote_, n = t;
|
|
2283
2260
|
let o = "''";
|
|
2284
|
-
|
|
2285
|
-
case "multipleRefEvent":
|
|
2286
|
-
case "multipleRefPropertyChangeEvent":
|
|
2287
|
-
case "multipleSlotEvent":
|
|
2288
|
-
case "multipleSlotPropertyChangeEvent":
|
|
2289
|
-
o = s.valueToCode(n, "INSTANCE", u.NONE) || "''";
|
|
2290
|
-
}
|
|
2261
|
+
n.getInput("INSTANCE") && (o = s.valueToCode(n, "INSTANCE", u.NONE) || "''");
|
|
2291
2262
|
let i = "";
|
|
2292
2263
|
if (n.event.params)
|
|
2293
2264
|
for (let c = 0; c < n.event.params.length; c++) {
|
|
@@ -2320,7 +2291,7 @@ g([
|
|
|
2320
2291
|
}
|
|
2321
2292
|
]);
|
|
2322
2293
|
s.forBlock.watch_effect_v1 = function(t) {
|
|
2323
|
-
const e =
|
|
2294
|
+
const e = wo(t.id), n = s.statementToCode(t, "HANDLE");
|
|
2324
2295
|
return `function __watchEffect$${e}__() {
|
|
2325
2296
|
${n}};
|
|
2326
2297
|
`;
|
|
@@ -2364,9 +2335,9 @@ const is = {
|
|
|
2364
2335
|
updateShadow_: function() {
|
|
2365
2336
|
if (this.isInsertionMarker())
|
|
2366
2337
|
return;
|
|
2367
|
-
const t =
|
|
2338
|
+
const t = gt("title");
|
|
2368
2339
|
this.getInput("TITLE").connection.setShadowDom(t);
|
|
2369
|
-
const e =
|
|
2340
|
+
const e = gt("text");
|
|
2370
2341
|
this.getInput("TEXT").connection.setShadowDom(e);
|
|
2371
2342
|
},
|
|
2372
2343
|
ensureBlocks_: function() {
|
|
@@ -2401,11 +2372,11 @@ const ss = {
|
|
|
2401
2372
|
updateShadow_: function() {
|
|
2402
2373
|
if (this.isInsertionMarker())
|
|
2403
2374
|
return;
|
|
2404
|
-
const t =
|
|
2375
|
+
const t = gt("title");
|
|
2405
2376
|
this.getInput("TITLE").connection.setShadowDom(t);
|
|
2406
|
-
const e =
|
|
2377
|
+
const e = gt("label");
|
|
2407
2378
|
this.getInput("LABEL").connection.setShadowDom(e);
|
|
2408
|
-
const n =
|
|
2379
|
+
const n = gt("");
|
|
2409
2380
|
this.getInput("VALUE").connection.setShadowDom(n);
|
|
2410
2381
|
},
|
|
2411
2382
|
ensureBlocks_: function() {
|
|
@@ -2576,7 +2547,7 @@ const as = {
|
|
|
2576
2547
|
t = !0;
|
|
2577
2548
|
}
|
|
2578
2549
|
if (t) {
|
|
2579
|
-
const e =
|
|
2550
|
+
const e = st("string");
|
|
2580
2551
|
this.getInput("INSTANCE").setShadowDom(e);
|
|
2581
2552
|
}
|
|
2582
2553
|
if (this.method.inputs)
|
|
@@ -2584,7 +2555,7 @@ const as = {
|
|
|
2584
2555
|
const n = this.method.inputs[e];
|
|
2585
2556
|
if (!n.type)
|
|
2586
2557
|
continue;
|
|
2587
|
-
const o =
|
|
2558
|
+
const o = st(n.type);
|
|
2588
2559
|
this.getInput("INPUT" + e).setShadowDom(o);
|
|
2589
2560
|
}
|
|
2590
2561
|
},
|
|
@@ -2743,7 +2714,7 @@ const cs = {
|
|
|
2743
2714
|
return Pt("implementMethod");
|
|
2744
2715
|
},
|
|
2745
2716
|
genMethodOpts_: function() {
|
|
2746
|
-
return
|
|
2717
|
+
return uo(this.node.id);
|
|
2747
2718
|
},
|
|
2748
2719
|
onchange: function(t) {
|
|
2749
2720
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -2764,14 +2735,14 @@ const cs = {
|
|
|
2764
2735
|
const n = this.node.key !== e.key;
|
|
2765
2736
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2766
2737
|
const o = this.getField("METHOD");
|
|
2767
|
-
if (o.getOptions(!1), n || !
|
|
2738
|
+
if (o.getOptions(!1), n || !At(this.method.id)) {
|
|
2768
2739
|
const i = Xt(this.node.id)?.[0];
|
|
2769
2740
|
o.setValue(i?.id ?? "");
|
|
2770
2741
|
}
|
|
2771
2742
|
o.setValue(o.getValue());
|
|
2772
2743
|
},
|
|
2773
2744
|
onMethodChange_: function(t) {
|
|
2774
|
-
const e =
|
|
2745
|
+
const e = At(t);
|
|
2775
2746
|
e ? (this.method.id = e.id, this.method.kind = e.kind, this.method.names = e.names, this.method.inputs = e.inputs) : (this.method.id = "", this.method.kind = "", this.method.names = [], this.method.inputs = []), this.updateShape_(), setTimeout(() => {
|
|
2776
2747
|
this.ensureBlocks_();
|
|
2777
2748
|
}, 0);
|
|
@@ -2807,7 +2778,7 @@ const cs = {
|
|
|
2807
2778
|
return;
|
|
2808
2779
|
}
|
|
2809
2780
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
2810
|
-
const e =
|
|
2781
|
+
const e = At(this.method.id);
|
|
2811
2782
|
if (!e) {
|
|
2812
2783
|
this.setWarningText(m("WARN_METHOD_NOT_FOUND"));
|
|
2813
2784
|
return;
|
|
@@ -2898,7 +2869,7 @@ const rs = {
|
|
|
2898
2869
|
return Pt("implementMethod");
|
|
2899
2870
|
},
|
|
2900
2871
|
genMethodOpts_: function() {
|
|
2901
|
-
return
|
|
2872
|
+
return uo(this.node.id);
|
|
2902
2873
|
},
|
|
2903
2874
|
genOutputOpts_: function() {
|
|
2904
2875
|
return ji(this.method.id);
|
|
@@ -2922,14 +2893,14 @@ const rs = {
|
|
|
2922
2893
|
const n = this.node.key !== e.key;
|
|
2923
2894
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2924
2895
|
const o = this.getField("METHOD");
|
|
2925
|
-
if (o.getOptions(!1), n || !
|
|
2896
|
+
if (o.getOptions(!1), n || !At(this.method.id)) {
|
|
2926
2897
|
const i = Xt(this.node.id)?.[0];
|
|
2927
2898
|
o.setValue(i?.id ?? "");
|
|
2928
2899
|
}
|
|
2929
2900
|
o.setValue(o.getValue());
|
|
2930
2901
|
},
|
|
2931
2902
|
onMethodChange_: function(t) {
|
|
2932
|
-
const e =
|
|
2903
|
+
const e = At(t);
|
|
2933
2904
|
if (!e) {
|
|
2934
2905
|
console.assert(!1);
|
|
2935
2906
|
return;
|
|
@@ -2958,7 +2929,7 @@ const rs = {
|
|
|
2958
2929
|
updateShadows_: function() {
|
|
2959
2930
|
if (this.isInsertionMarker())
|
|
2960
2931
|
return;
|
|
2961
|
-
const t =
|
|
2932
|
+
const t = st(this.output.type);
|
|
2962
2933
|
this.getInput("VALUE").connection.setShadowDom(t);
|
|
2963
2934
|
},
|
|
2964
2935
|
checkWarning_: function() {
|
|
@@ -2972,7 +2943,7 @@ const rs = {
|
|
|
2972
2943
|
return;
|
|
2973
2944
|
}
|
|
2974
2945
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
2975
|
-
const e =
|
|
2946
|
+
const e = At(this.method.id);
|
|
2976
2947
|
if (!e) {
|
|
2977
2948
|
this.setWarningText(m("WARN_METHOD_NOT_FOUND"));
|
|
2978
2949
|
return;
|
|
@@ -3060,7 +3031,7 @@ const ls = {
|
|
|
3060
3031
|
initData_: function() {
|
|
3061
3032
|
if (this.app.id)
|
|
3062
3033
|
return;
|
|
3063
|
-
const t =
|
|
3034
|
+
const t = ro()?.[0];
|
|
3064
3035
|
if (!t)
|
|
3065
3036
|
return;
|
|
3066
3037
|
this.app.id = t.id, this.app.name = t.name;
|
|
@@ -3149,7 +3120,7 @@ const us = {
|
|
|
3149
3120
|
initData_: function() {
|
|
3150
3121
|
if (this.comp.id)
|
|
3151
3122
|
return;
|
|
3152
|
-
const t =
|
|
3123
|
+
const t = lo()?.[0];
|
|
3153
3124
|
if (!t)
|
|
3154
3125
|
return;
|
|
3155
3126
|
this.comp.id = t.id, this.comp.name = t.name;
|
|
@@ -3207,7 +3178,7 @@ const _s = {
|
|
|
3207
3178
|
initData_: function() {
|
|
3208
3179
|
if (this.slot.id)
|
|
3209
3180
|
return;
|
|
3210
|
-
const t =
|
|
3181
|
+
const t = ho()?.[0];
|
|
3211
3182
|
if (!t)
|
|
3212
3183
|
return;
|
|
3213
3184
|
this.slot.id = t.id, this.slot.name = t.name;
|
|
@@ -3268,7 +3239,7 @@ const ps = {
|
|
|
3268
3239
|
}, this.appendDummyInput().appendField("%{BKY_APP_V1_GET_APP_PROPERTY_TITLE}").appendField(new O(() => this.genNodeOpts_()), "NODE").appendField(
|
|
3269
3240
|
new O(() => this.genPropertyOpts_()),
|
|
3270
3241
|
"PROPERTY"
|
|
3271
|
-
)
|
|
3242
|
+
), this.setOutput(!0, null), this.setInputsInline(!0), this.setStyle("property_blocks"), this.setTooltip("%{BKY_APP_V1_GET_APP_PROPERTY_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_GET_APP_PROPERTY_HELPURL}"), this.initData_(), this.updateShape_();
|
|
3272
3243
|
},
|
|
3273
3244
|
initData_: function() {
|
|
3274
3245
|
if (this.node.id)
|
|
@@ -3301,7 +3272,7 @@ const ps = {
|
|
|
3301
3272
|
return Pt("getProperty");
|
|
3302
3273
|
},
|
|
3303
3274
|
genPropertyOpts_: function() {
|
|
3304
|
-
return
|
|
3275
|
+
return po(this.node.id, "read");
|
|
3305
3276
|
},
|
|
3306
3277
|
onchange: function(t) {
|
|
3307
3278
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -3330,7 +3301,7 @@ const ps = {
|
|
|
3330
3301
|
},
|
|
3331
3302
|
onPropChange_: function(t) {
|
|
3332
3303
|
const e = bt(t);
|
|
3333
|
-
e ? (this.property.id = e.id, this.property.kind = e.kind, this.property.names = e.names) : (this.property.id = "", this.property.kind = "", this.property.names = []), this.updateShape_();
|
|
3304
|
+
e ? (this.property.id = e.id, this.property.kind = e.kind, this.property.names = e.names) : (this.property.id = "", this.property.kind = "", this.property.names = []), this.updateShape_(), this.updateShadow_();
|
|
3334
3305
|
},
|
|
3335
3306
|
updateShape_: function() {
|
|
3336
3307
|
let t = !1;
|
|
@@ -3339,7 +3310,22 @@ const ps = {
|
|
|
3339
3310
|
case "multipleSlotProperty":
|
|
3340
3311
|
t = !0;
|
|
3341
3312
|
}
|
|
3342
|
-
|
|
3313
|
+
if (t)
|
|
3314
|
+
this.getInput("INSTANCE") || this.appendValueInput("INSTANCE").setAlign(k.Align.RIGHT).appendField("%{BKY_APP_INSTANCE}").setCheck("String");
|
|
3315
|
+
else if (this.getInput("INSTANCE")) {
|
|
3316
|
+
const e = this.getInput("INSTANCE").connection.targetBlock();
|
|
3317
|
+
e && e.dispose(), this.removeInput("INSTANCE");
|
|
3318
|
+
}
|
|
3319
|
+
},
|
|
3320
|
+
updateShadow_: function() {
|
|
3321
|
+
if (this.isInsertionMarker())
|
|
3322
|
+
return;
|
|
3323
|
+
const t = this.getInput("INSTANCE");
|
|
3324
|
+
if (t) {
|
|
3325
|
+
t.setShadowDom(null);
|
|
3326
|
+
const e = t.connection?.targetBlock();
|
|
3327
|
+
e && e.dispose(), t.setShadowDom(st("string"));
|
|
3328
|
+
}
|
|
3343
3329
|
},
|
|
3344
3330
|
checkWarning_: function() {
|
|
3345
3331
|
const t = J(this.node.id);
|
|
@@ -3367,13 +3353,8 @@ const ps = {
|
|
|
3367
3353
|
I.get_app_property_v1 = ps;
|
|
3368
3354
|
s.forBlock.get_app_property_v1 = function(t) {
|
|
3369
3355
|
const e = s.quote_, n = t;
|
|
3370
|
-
let o = "";
|
|
3371
|
-
|
|
3372
|
-
case "multipleRefProperty":
|
|
3373
|
-
case "multipleSlotProperty":
|
|
3374
|
-
o = n.getFieldValue("INSTANCE1");
|
|
3375
|
-
}
|
|
3376
|
-
return [`__getPropertyV1__(${e(n.property.id)}, ${e(o)})`, u.ATOMIC];
|
|
3356
|
+
let o = "''";
|
|
3357
|
+
return n.getInput("INSTANCE") && (o = s.valueToCode(n, "INSTANCE", u.NONE) || "''"), [`__getPropertyV1__(${e(n.property.id)}, ${o})`, u.ATOMIC];
|
|
3377
3358
|
};
|
|
3378
3359
|
const ds = {
|
|
3379
3360
|
init: function() {
|
|
@@ -3388,7 +3369,7 @@ const ds = {
|
|
|
3388
3369
|
}, this.appendValueInput("VALUE").appendField("%{BKY_APP_V1_SET_APP_PROPERTY_TITLE}").appendField(new O(() => this.genNodeOpts_()), "NODE").appendField(
|
|
3389
3370
|
new O(() => this.genPropertyOpts_()),
|
|
3390
3371
|
"PROPERTY"
|
|
3391
|
-
)
|
|
3372
|
+
), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setInputsInline(!0), this.setStyle("property_blocks"), this.setTooltip("%{BKY_APP_V1_SET_APP_PROPERTY_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_SET_APP_PROPERTY_HELPURL}"), this.initData_(), this.updateShape_(), this.isInFlyout && this.updateShadow_();
|
|
3392
3373
|
},
|
|
3393
3374
|
initData_: function() {
|
|
3394
3375
|
if (this.node.id)
|
|
@@ -3421,7 +3402,7 @@ const ds = {
|
|
|
3421
3402
|
return Pt("setProperty");
|
|
3422
3403
|
},
|
|
3423
3404
|
genPropertyOpts_: function() {
|
|
3424
|
-
return
|
|
3405
|
+
return po(this.node.id, "write");
|
|
3425
3406
|
},
|
|
3426
3407
|
onchange: function(t) {
|
|
3427
3408
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -3459,7 +3440,12 @@ const ds = {
|
|
|
3459
3440
|
case "multipleSlotProperty":
|
|
3460
3441
|
t = !0;
|
|
3461
3442
|
}
|
|
3462
|
-
|
|
3443
|
+
if (t)
|
|
3444
|
+
this.getInput("INSTANCE") || this.appendValueInput("INSTANCE").setAlign(k.Align.RIGHT).appendField("%{BKY_APP_INSTANCE}").setCheck("String");
|
|
3445
|
+
else if (this.getInput("INSTANCE")) {
|
|
3446
|
+
const e = this.getInput("INSTANCE").connection.targetBlock();
|
|
3447
|
+
e && e.dispose(), this.removeInput("INSTANCE");
|
|
3448
|
+
}
|
|
3463
3449
|
},
|
|
3464
3450
|
updateShadow_: function() {
|
|
3465
3451
|
if (this.isInsertionMarker())
|
|
@@ -3467,14 +3453,17 @@ const ds = {
|
|
|
3467
3453
|
const t = bt(this.property.id);
|
|
3468
3454
|
if (!t)
|
|
3469
3455
|
return;
|
|
3470
|
-
this.getInput("
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
const
|
|
3474
|
-
|
|
3475
|
-
}
|
|
3476
|
-
|
|
3477
|
-
|
|
3456
|
+
const e = this.getInput("INSTANCE");
|
|
3457
|
+
if (e) {
|
|
3458
|
+
e.setShadowDom(null);
|
|
3459
|
+
const o = e.connection?.targetBlock();
|
|
3460
|
+
o && o.dispose(), e.setShadowDom(st("string"));
|
|
3461
|
+
}
|
|
3462
|
+
const n = this.getInput("VALUE");
|
|
3463
|
+
if (n) {
|
|
3464
|
+
n.setShadowDom(null);
|
|
3465
|
+
const o = n.connection?.targetBlock();
|
|
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));
|
|
3478
3467
|
}
|
|
3479
3468
|
},
|
|
3480
3469
|
checkWarning_: function() {
|
|
@@ -3503,14 +3492,14 @@ const ds = {
|
|
|
3503
3492
|
I.set_app_property_v1 = ds;
|
|
3504
3493
|
s.forBlock.set_app_property_v1 = function(t) {
|
|
3505
3494
|
const e = s.quote_, n = t;
|
|
3506
|
-
let o = "";
|
|
3495
|
+
let o = "''";
|
|
3507
3496
|
switch (n.property.kind) {
|
|
3508
3497
|
case "multipleRefProperty":
|
|
3509
3498
|
case "multipleSlotProperty":
|
|
3510
|
-
o =
|
|
3499
|
+
o = s.valueToCode(n, "INSTANCE", u.NONE) || "''";
|
|
3511
3500
|
}
|
|
3512
3501
|
const i = s.valueToCode(n, "VALUE", u.NONE);
|
|
3513
|
-
return `__setPropertyV1__(${e(n.property.id)}, ${i}, ${
|
|
3502
|
+
return `__setPropertyV1__(${e(n.property.id)}, ${i}, ${o});
|
|
3514
3503
|
`;
|
|
3515
3504
|
};
|
|
3516
3505
|
const hs = {
|
|
@@ -3545,7 +3534,7 @@ const hs = {
|
|
|
3545
3534
|
}, 0);
|
|
3546
3535
|
},
|
|
3547
3536
|
genStateOpts_: function() {
|
|
3548
|
-
return
|
|
3537
|
+
return fo();
|
|
3549
3538
|
},
|
|
3550
3539
|
onchange: function(t) {
|
|
3551
3540
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -3607,7 +3596,7 @@ const fs = {
|
|
|
3607
3596
|
this.state.id = t.state?.id ?? "", this.state.name = t.state?.name ?? "", this.state.type = t.state?.type ?? "string";
|
|
3608
3597
|
},
|
|
3609
3598
|
genStateOpts_: function() {
|
|
3610
|
-
return
|
|
3599
|
+
return fo();
|
|
3611
3600
|
},
|
|
3612
3601
|
onchange: function(t) {
|
|
3613
3602
|
if (t.type === v.BLOCK_CHANGE) {
|
|
@@ -3625,7 +3614,7 @@ const fs = {
|
|
|
3625
3614
|
this.getInput("VALUE").setShadowDom(null);
|
|
3626
3615
|
const t = this.getInput("VALUE").connection.targetBlock();
|
|
3627
3616
|
t && t.dispose();
|
|
3628
|
-
const e = kt(this.state.type), n =
|
|
3617
|
+
const e = kt(this.state.type), n = st(this.state.type);
|
|
3629
3618
|
this.getInput("VALUE").setCheck(e).setShadowDom(n);
|
|
3630
3619
|
},
|
|
3631
3620
|
checkWarning_: function() {
|
|
@@ -4393,6 +4382,7 @@ const ms = S.xml, Ts = [
|
|
|
4393
4382
|
},
|
|
4394
4383
|
{
|
|
4395
4384
|
type: "on_app_event_v1",
|
|
4385
|
+
inputs: ["INSTANCE"],
|
|
4396
4386
|
prefixInputs: ["PARAM"]
|
|
4397
4387
|
},
|
|
4398
4388
|
{
|
|
@@ -4497,7 +4487,7 @@ function xt(t, e) {
|
|
|
4497
4487
|
if (n)
|
|
4498
4488
|
return n.funcs.find((o) => o.id === e);
|
|
4499
4489
|
}
|
|
4500
|
-
function
|
|
4490
|
+
function mo(t) {
|
|
4501
4491
|
const e = [];
|
|
4502
4492
|
return qt(t).forEach(({ id: o, name: i }) => {
|
|
4503
4493
|
e.push([i, o]);
|
|
@@ -4525,7 +4515,7 @@ function ee(t) {
|
|
|
4525
4515
|
function me(t) {
|
|
4526
4516
|
return A.compute.spaces.find((e) => e.id === t);
|
|
4527
4517
|
}
|
|
4528
|
-
function
|
|
4518
|
+
function To(t) {
|
|
4529
4519
|
const e = [];
|
|
4530
4520
|
return ee(t).forEach(({ id: o, name: i }) => {
|
|
4531
4521
|
e.push([i, o]);
|
|
@@ -4574,10 +4564,10 @@ const ys = {
|
|
|
4574
4564
|
}, 0);
|
|
4575
4565
|
},
|
|
4576
4566
|
genSpaceOpts_: function() {
|
|
4577
|
-
return
|
|
4567
|
+
return To("func");
|
|
4578
4568
|
},
|
|
4579
4569
|
genFuncOpts_: function() {
|
|
4580
|
-
return
|
|
4570
|
+
return mo(this.space.id);
|
|
4581
4571
|
},
|
|
4582
4572
|
onchange: function(t) {
|
|
4583
4573
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -4641,7 +4631,7 @@ const ys = {
|
|
|
4641
4631
|
updateShadow_: function() {
|
|
4642
4632
|
if (!this.isInsertionMarker())
|
|
4643
4633
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
4644
|
-
const e = this.func.inputs[t], n =
|
|
4634
|
+
const e = this.func.inputs[t], n = st(e.type);
|
|
4645
4635
|
this.getInput("INPUT" + t).setShadowDom(n);
|
|
4646
4636
|
}
|
|
4647
4637
|
},
|
|
@@ -4748,10 +4738,10 @@ const Os = {
|
|
|
4748
4738
|
}, 0);
|
|
4749
4739
|
},
|
|
4750
4740
|
genSpaceOpts_: function() {
|
|
4751
|
-
return
|
|
4741
|
+
return To("func");
|
|
4752
4742
|
},
|
|
4753
4743
|
genFuncOpts_: function() {
|
|
4754
|
-
return
|
|
4744
|
+
return mo(this.space.id);
|
|
4755
4745
|
},
|
|
4756
4746
|
onchange: function(t) {
|
|
4757
4747
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -4815,7 +4805,7 @@ const Os = {
|
|
|
4815
4805
|
updateShadow_: function() {
|
|
4816
4806
|
if (!this.isInsertionMarker())
|
|
4817
4807
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
4818
|
-
const e = this.func.inputs[t], n =
|
|
4808
|
+
const e = this.func.inputs[t], n = st(e.type);
|
|
4819
4809
|
this.getInput("INPUT" + t).setShadowDom(n);
|
|
4820
4810
|
}
|
|
4821
4811
|
},
|
|
@@ -5008,7 +4998,7 @@ const Cs = {
|
|
|
5008
4998
|
updateShadows_: function() {
|
|
5009
4999
|
if (this.isInsertionMarker())
|
|
5010
5000
|
return;
|
|
5011
|
-
const t =
|
|
5001
|
+
const t = st(this.output.type);
|
|
5012
5002
|
this.getInput("VALUE").setShadowDom(t);
|
|
5013
5003
|
},
|
|
5014
5004
|
checkWarning_: function() {
|
|
@@ -5096,7 +5086,7 @@ g([
|
|
|
5096
5086
|
s.forBlock.compute_env_is_v1 = function(t) {
|
|
5097
5087
|
return [`__getEnvV1__() === ${s.quote_(t.getFieldValue("ENV"))}`, u.ATOMIC];
|
|
5098
5088
|
};
|
|
5099
|
-
function
|
|
5089
|
+
function ct() {
|
|
5100
5090
|
const t = [];
|
|
5101
5091
|
return A.data.spaces.forEach((e) => {
|
|
5102
5092
|
e.tables.length > 0 && t.push(e);
|
|
@@ -5108,7 +5098,7 @@ function yt(t) {
|
|
|
5108
5098
|
}
|
|
5109
5099
|
function be() {
|
|
5110
5100
|
const t = [];
|
|
5111
|
-
return
|
|
5101
|
+
return ct().forEach(({ id: n, name: o }) => {
|
|
5112
5102
|
t.push([o, n]);
|
|
5113
5103
|
}), B(t);
|
|
5114
5104
|
}
|
|
@@ -5153,7 +5143,7 @@ function Ns(t) {
|
|
|
5153
5143
|
if (e.targetBlock())
|
|
5154
5144
|
return;
|
|
5155
5145
|
let n, o;
|
|
5156
|
-
const i =
|
|
5146
|
+
const i = ct()?.[0];
|
|
5157
5147
|
if (i) {
|
|
5158
5148
|
const r = q(i.id)?.[0];
|
|
5159
5149
|
if (r) {
|
|
@@ -5284,7 +5274,7 @@ const Bs = {
|
|
|
5284
5274
|
initData_: function() {
|
|
5285
5275
|
if (this.space.id)
|
|
5286
5276
|
return;
|
|
5287
|
-
const t =
|
|
5277
|
+
const t = ct()?.[0];
|
|
5288
5278
|
if (!t)
|
|
5289
5279
|
return;
|
|
5290
5280
|
this.space.id = t.id, this.space.name = t.name;
|
|
@@ -5518,7 +5508,7 @@ function Ds(t) {
|
|
|
5518
5508
|
const e = t.getInput("TABLE").connection;
|
|
5519
5509
|
if (e.targetBlock())
|
|
5520
5510
|
return;
|
|
5521
|
-
const n =
|
|
5511
|
+
const n = ct()?.[0], o = q(n?.id ?? "")?.[0], i = {
|
|
5522
5512
|
type: "select_table_v1",
|
|
5523
5513
|
extraState: {
|
|
5524
5514
|
space: {
|
|
@@ -5537,7 +5527,7 @@ function Ms(t) {
|
|
|
5537
5527
|
const e = t.getInput("CONDITION").connection;
|
|
5538
5528
|
if (e.targetBlock())
|
|
5539
5529
|
return;
|
|
5540
|
-
const n =
|
|
5530
|
+
const n = ct()?.[0], o = q(n?.id ?? "")?.[0], i = Te(n?.id, o?.id)?.[0], a = {
|
|
5541
5531
|
type: "cond_atomic_v1",
|
|
5542
5532
|
extraState: {
|
|
5543
5533
|
space: {
|
|
@@ -5647,7 +5637,7 @@ function xs(t) {
|
|
|
5647
5637
|
if (e.targetBlock())
|
|
5648
5638
|
return;
|
|
5649
5639
|
let n, o;
|
|
5650
|
-
const i =
|
|
5640
|
+
const i = ct()?.[0];
|
|
5651
5641
|
if (i) {
|
|
5652
5642
|
const r = q(i.id)?.[0];
|
|
5653
5643
|
if (r) {
|
|
@@ -5894,7 +5884,7 @@ const Gs = {
|
|
|
5894
5884
|
initData_: function() {
|
|
5895
5885
|
if (this.space.id)
|
|
5896
5886
|
return;
|
|
5897
|
-
const t =
|
|
5887
|
+
const t = ct()?.[0];
|
|
5898
5888
|
if (!t)
|
|
5899
5889
|
return;
|
|
5900
5890
|
this.space.id = t.id, this.space.name = t.name;
|
|
@@ -6041,7 +6031,7 @@ const Gs = {
|
|
|
6041
6031
|
for (let t = 0; t < this.table.columns.length; t++) {
|
|
6042
6032
|
const e = this.table.columns[t], n = new O(
|
|
6043
6033
|
() => this.genColumnOpts_()
|
|
6044
|
-
), o = new
|
|
6034
|
+
), o = new It("");
|
|
6045
6035
|
this.appendDummyInput("ADD" + t).setAlign(k.Align.RIGHT).appendField(n, "COLUMN" + t).appendField("%{BKY_DATA_AS}").appendField(o, "ALIAS" + t), n.setValue(e.id, !1), o.setValue(e.name, !1);
|
|
6046
6036
|
}
|
|
6047
6037
|
},
|
|
@@ -6053,7 +6043,7 @@ const Gs = {
|
|
|
6053
6043
|
continue;
|
|
6054
6044
|
const e = new O(
|
|
6055
6045
|
() => this.genColumnOpts_()
|
|
6056
|
-
), n = new
|
|
6046
|
+
), n = new It("");
|
|
6057
6047
|
this.appendDummyInput("ADD" + t).setAlign(k.Align.RIGHT).appendField(e, "COLUMN" + t).appendField("%{BKY_DATA_AS}").appendField(n, "ALIAS" + t);
|
|
6058
6048
|
const o = this.table.columns[0];
|
|
6059
6049
|
e.setValue(o.id ?? "", !1), n.setValue(o.name ?? "", !1);
|
|
@@ -6109,7 +6099,7 @@ const Ws = {
|
|
|
6109
6099
|
initData_: function() {
|
|
6110
6100
|
if (this.space.id)
|
|
6111
6101
|
return;
|
|
6112
|
-
const t =
|
|
6102
|
+
const t = ct()?.[0];
|
|
6113
6103
|
if (!t)
|
|
6114
6104
|
return;
|
|
6115
6105
|
this.space.id = t.id, this.space.name = t.name;
|
|
@@ -6211,7 +6201,7 @@ const js = {
|
|
|
6211
6201
|
};
|
|
6212
6202
|
I.transaction_v1 = js;
|
|
6213
6203
|
s.forBlock.transaction_v1 = function(t) {
|
|
6214
|
-
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");
|
|
6215
6205
|
return `{
|
|
6216
6206
|
${e}var __error${o}__ = '';
|
|
6217
6207
|
${e}var __txExist${o}__ = typeof(__tx__) !== 'undefined';
|
|
@@ -6290,7 +6280,7 @@ const qs = {
|
|
|
6290
6280
|
initData_: function() {
|
|
6291
6281
|
if (this.space.id)
|
|
6292
6282
|
return;
|
|
6293
|
-
const t =
|
|
6283
|
+
const t = ct()?.[0];
|
|
6294
6284
|
if (!t)
|
|
6295
6285
|
return;
|
|
6296
6286
|
this.space.id = t.id, this.space.name = t.name;
|
|
@@ -6526,7 +6516,7 @@ function Qs(t) {
|
|
|
6526
6516
|
if (e.targetBlock())
|
|
6527
6517
|
return;
|
|
6528
6518
|
let n, o;
|
|
6529
|
-
const i =
|
|
6519
|
+
const i = ct()?.[0];
|
|
6530
6520
|
if (i) {
|
|
6531
6521
|
const r = q(i.id)?.[0];
|
|
6532
6522
|
if (r) {
|
|
@@ -6631,7 +6621,7 @@ ${i}}
|
|
|
6631
6621
|
const ea = S.xml, na = {
|
|
6632
6622
|
init: function() {
|
|
6633
6623
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(k.Align.CENTRE).appendField(
|
|
6634
|
-
new
|
|
6624
|
+
new rt(Vt, 20, 20, void 0, () => {
|
|
6635
6625
|
this.isInFlyout || this.addEntry_();
|
|
6636
6626
|
})
|
|
6637
6627
|
), this.appendDummyInput("CLOSE_BRACKET").appendField(" ] "), this.setInputsInline(!1), this.setOutput(!0, "JsonArray"), this.setColour(350), this.setTooltip(""), this.setHelpUrl("");
|
|
@@ -6650,11 +6640,11 @@ const ea = S.xml, na = {
|
|
|
6650
6640
|
for (let t = 0; t < this.length; t++) {
|
|
6651
6641
|
const e = "ENTRY" + t, n = this.appendValueInput(e);
|
|
6652
6642
|
n.appendField(
|
|
6653
|
-
new
|
|
6643
|
+
new rt(Vt, 20, 20, void 0, () => {
|
|
6654
6644
|
this.isInFlyout || this.addEntry_(n);
|
|
6655
6645
|
})
|
|
6656
6646
|
), n.appendField(new kn(String(t))), n.appendField(
|
|
6657
|
-
new
|
|
6647
|
+
new rt(le, 20, 20, void 0, () => {
|
|
6658
6648
|
this.isInFlyout || this.removeEntry_(n);
|
|
6659
6649
|
})
|
|
6660
6650
|
), this.moveInputBefore(e, "ADD");
|
|
@@ -6669,11 +6659,11 @@ const ea = S.xml, na = {
|
|
|
6669
6659
|
}
|
|
6670
6660
|
const n = this.appendValueInput("ENTRY" + e);
|
|
6671
6661
|
n.appendField(
|
|
6672
|
-
new
|
|
6662
|
+
new rt(Vt, 20, 20, void 0, () => {
|
|
6673
6663
|
this.isInFlyout || this.addEntry_(n);
|
|
6674
6664
|
})
|
|
6675
6665
|
), n.appendField(new kn(String(e))), n.appendField(
|
|
6676
|
-
new
|
|
6666
|
+
new rt(le, 20, 20, void 0, () => {
|
|
6677
6667
|
this.isInFlyout || this.removeEntry_(n);
|
|
6678
6668
|
})
|
|
6679
6669
|
), e === this.length ? this.moveInputBefore("ENTRY" + e, "ADD") : this.moveInputBefore("ENTRY" + e, "ENTRY" + (e + 1)), this.length++;
|
|
@@ -6705,7 +6695,7 @@ I.json_boolean_v1 = oa;
|
|
|
6705
6695
|
const Vn = S.xml, ia = {
|
|
6706
6696
|
init: function() {
|
|
6707
6697
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(k.Align.CENTRE).appendField(
|
|
6708
|
-
new
|
|
6698
|
+
new rt(Vt, 20, 20, void 0, () => {
|
|
6709
6699
|
this.isInFlyout || this.addEntry_();
|
|
6710
6700
|
})
|
|
6711
6701
|
), this.appendDummyInput("CLOSE_BRACHET").appendField(" } "), this.setInputsInline(!1), this.setOutput(!0, "JsonMap"), this.setColour(120), this.setTooltip(""), this.setHelpUrl("");
|
|
@@ -6733,11 +6723,11 @@ const Vn = S.xml, ia = {
|
|
|
6733
6723
|
for (let e = 0; e < t.length; e++) {
|
|
6734
6724
|
const n = t[e], o = "ENTRY" + e, i = this.appendValueInput(o);
|
|
6735
6725
|
i.appendField(
|
|
6736
|
-
new
|
|
6726
|
+
new rt(Vt, 20, 20, void 0, () => {
|
|
6737
6727
|
this.isInFlyout || this.addEntry_(i);
|
|
6738
6728
|
})
|
|
6739
|
-
), i.appendField(new
|
|
6740
|
-
new
|
|
6729
|
+
), i.appendField(new It(n), "KEY" + e), i.appendField(
|
|
6730
|
+
new rt(le, 20, 20, void 0, () => {
|
|
6741
6731
|
this.isInFlyout || this.removeEntry_(i);
|
|
6742
6732
|
})
|
|
6743
6733
|
), this.moveInputBefore(o, "ADD");
|
|
@@ -6750,11 +6740,11 @@ const Vn = S.xml, ia = {
|
|
|
6750
6740
|
this.getField("KEY" + o).name = "KEY" + (o + 1), this.getInput("ENTRY" + o).name = "ENTRY" + (o + 1);
|
|
6751
6741
|
const n = this.appendValueInput("ENTRY" + e);
|
|
6752
6742
|
n.appendField(
|
|
6753
|
-
new
|
|
6743
|
+
new rt(Vt, 20, 20, void 0, () => {
|
|
6754
6744
|
this.isInFlyout || this.addEntry_(n);
|
|
6755
6745
|
})
|
|
6756
|
-
), n.appendField(new
|
|
6757
|
-
new
|
|
6746
|
+
), n.appendField(new It("key"), "KEY" + e), n.appendField(
|
|
6747
|
+
new rt(le, 20, 20, void 0, () => {
|
|
6758
6748
|
this.isInFlyout || this.removeEntry_(n);
|
|
6759
6749
|
})
|
|
6760
6750
|
), e === this.length ? this.moveInputBefore("ENTRY" + e, "ADD") : this.moveInputBefore("ENTRY" + e, "ENTRY" + (e + 1)), this.length++;
|
|
@@ -6783,7 +6773,7 @@ const aa = {
|
|
|
6783
6773
|
I.json_root_v1 = aa;
|
|
6784
6774
|
const ca = {
|
|
6785
6775
|
init: function() {
|
|
6786
|
-
this.appendDummyInput().appendField('"').appendField(new
|
|
6776
|
+
this.appendDummyInput().appendField('"').appendField(new It(""), "VALUE").appendField('"'), this.setOutput(!0, "JsonString"), this.setColour(160);
|
|
6787
6777
|
}
|
|
6788
6778
|
};
|
|
6789
6779
|
I.json_string_v1 = ca;
|
|
@@ -7710,18 +7700,18 @@ ${c}}
|
|
|
7710
7700
|
let r = "", _ = o;
|
|
7711
7701
|
!o.match(/^\w+$/) && !S.string.isNumber(o) && (_ = s.nameDB_.getDistinctName(
|
|
7712
7702
|
`${n}_from`,
|
|
7713
|
-
|
|
7703
|
+
ut.NameType.VARIABLE
|
|
7714
7704
|
), r += `var ${_} = ${o};
|
|
7715
7705
|
`);
|
|
7716
7706
|
let h = i;
|
|
7717
7707
|
!i.match(/^\w+$/) && !S.string.isNumber(i) && (h = s.nameDB_.getDistinctName(
|
|
7718
7708
|
`${n}_to`,
|
|
7719
|
-
|
|
7709
|
+
ut.NameType.VARIABLE
|
|
7720
7710
|
), r += `var ${h} = ${i};
|
|
7721
7711
|
`);
|
|
7722
7712
|
const l = s.nameDB_.getDistinctName(
|
|
7723
7713
|
`${n}_by`,
|
|
7724
|
-
|
|
7714
|
+
ut.NameType.VARIABLE
|
|
7725
7715
|
);
|
|
7726
7716
|
return r += `var ${l} = `, S.string.isNumber(a) ? r += `${Math.abs(Number(a))};
|
|
7727
7717
|
` : r += `Math.abs(${a});
|
|
@@ -7780,12 +7770,12 @@ s.forBlock.for_each_v1 = function(t) {
|
|
|
7780
7770
|
let a = "", c = o;
|
|
7781
7771
|
o.match(/^\w+$/) || (c = s.nameDB_.getDistinctName(
|
|
7782
7772
|
`${n}_list`,
|
|
7783
|
-
|
|
7773
|
+
ut.NameType.VARIABLE
|
|
7784
7774
|
), a += `var ${c} = ${o};
|
|
7785
7775
|
`);
|
|
7786
7776
|
const r = s.nameDB_.getDistinctName(
|
|
7787
7777
|
`${n}_index`,
|
|
7788
|
-
|
|
7778
|
+
ut.NameType.VARIABLE
|
|
7789
7779
|
);
|
|
7790
7780
|
return a += `for (var ${r} in ${c}) {
|
|
7791
7781
|
${e}${n} = ${c}[${r}];
|
|
@@ -7827,12 +7817,12 @@ s.forBlock.repeat_v1 = function(t) {
|
|
|
7827
7817
|
let o = "";
|
|
7828
7818
|
const i = s.nameDB_.getDistinctName(
|
|
7829
7819
|
"count",
|
|
7830
|
-
|
|
7820
|
+
ut.NameType.VARIABLE
|
|
7831
7821
|
);
|
|
7832
7822
|
let a = e;
|
|
7833
7823
|
return !e.match(/^\w+$/) && !S.string.isNumber(e) && (a = s.nameDB_.getDistinctName(
|
|
7834
7824
|
"repeat_end",
|
|
7835
|
-
|
|
7825
|
+
ut.NameType.VARIABLE
|
|
7836
7826
|
), o += `var ${a} = ${e};
|
|
7837
7827
|
`), o += `for (var ${i} = 0; ${i} < ${a}; ${i}++) {
|
|
7838
7828
|
${n}}
|
|
@@ -8611,7 +8601,7 @@ const Oa = {
|
|
|
8611
8601
|
},
|
|
8612
8602
|
updateShape_: function() {
|
|
8613
8603
|
for (let t = 0; t < this.itemCount_; t++)
|
|
8614
|
-
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setAlign(k.Align.RIGHT).appendField(new
|
|
8604
|
+
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setAlign(k.Align.RIGHT).appendField(new It("key"), "KEY" + t);
|
|
8615
8605
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
8616
8606
|
this.removeInput("ADD" + t);
|
|
8617
8607
|
}
|
|
@@ -8860,13 +8850,13 @@ s.forBlock.object_to_json_v1 = function(t) {
|
|
|
8860
8850
|
};
|
|
8861
8851
|
const xn = S.xml, va = {
|
|
8862
8852
|
init: function() {
|
|
8863
|
-
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;
|
|
8864
8854
|
}
|
|
8865
8855
|
};
|
|
8866
8856
|
I.procedure_def_container_v1 = va;
|
|
8867
8857
|
const Ca = {
|
|
8868
8858
|
init: function() {
|
|
8869
|
-
const t = new
|
|
8859
|
+
const t = new It(Ze.DEFAULT_ARG);
|
|
8870
8860
|
t.setValidator(this.validator_), this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_ITEM_TITLE}").appendField(t, "NAME"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
8871
8861
|
},
|
|
8872
8862
|
validator_: function(t) {
|
|
@@ -8890,7 +8880,7 @@ I.procedure_def_item_v1 = Ca;
|
|
|
8890
8880
|
const ka = {
|
|
8891
8881
|
init: function() {
|
|
8892
8882
|
this.withReturn = !1, this.args = [];
|
|
8893
|
-
const t = new
|
|
8883
|
+
const t = new It(
|
|
8894
8884
|
Ze.findLegalName("", this)
|
|
8895
8885
|
);
|
|
8896
8886
|
t.setValidator(Ze.rename), t.setSpellcheck(!1), this.appendDummyInput("DUMMY").appendField(t, "NAME"), this.appendStatementInput("HANDLE"), this.setMutator(
|
|
@@ -9090,7 +9080,7 @@ ${n}
|
|
|
9090
9080
|
}
|
|
9091
9081
|
`;
|
|
9092
9082
|
};
|
|
9093
|
-
function
|
|
9083
|
+
function Eo(t) {
|
|
9094
9084
|
const e = A.resource.spaces.find((i) => i.id === t);
|
|
9095
9085
|
if (!e)
|
|
9096
9086
|
return [];
|
|
@@ -9108,11 +9098,11 @@ function To(t) {
|
|
|
9108
9098
|
}
|
|
9109
9099
|
function Ba(t) {
|
|
9110
9100
|
const e = [];
|
|
9111
|
-
return
|
|
9101
|
+
return Eo(t).forEach(({ id: o, name: i }) => {
|
|
9112
9102
|
e.push([i, o]);
|
|
9113
9103
|
}), B(e);
|
|
9114
9104
|
}
|
|
9115
|
-
function
|
|
9105
|
+
function go(t, e) {
|
|
9116
9106
|
const n = A.resource.spaces.find((i) => i.id === t);
|
|
9117
9107
|
if (!n)
|
|
9118
9108
|
return [];
|
|
@@ -9123,11 +9113,11 @@ function Eo(t, e) {
|
|
|
9123
9113
|
}
|
|
9124
9114
|
function ba(t, e) {
|
|
9125
9115
|
const n = [];
|
|
9126
|
-
return
|
|
9116
|
+
return go(t, e).forEach(({ id: i, name: a }) => {
|
|
9127
9117
|
n.push([a, i]);
|
|
9128
9118
|
}), B(n);
|
|
9129
9119
|
}
|
|
9130
|
-
function
|
|
9120
|
+
function Ao() {
|
|
9131
9121
|
const t = [];
|
|
9132
9122
|
return A.resource.spaces.forEach((e) => {
|
|
9133
9123
|
e.resources.length > 0 && t.push(e);
|
|
@@ -9135,7 +9125,7 @@ function go() {
|
|
|
9135
9125
|
}
|
|
9136
9126
|
function Pa() {
|
|
9137
9127
|
const t = [];
|
|
9138
|
-
return
|
|
9128
|
+
return Ao().forEach(({ id: n, name: o }) => {
|
|
9139
9129
|
t.push([o, n]);
|
|
9140
9130
|
}), B(t);
|
|
9141
9131
|
}
|
|
@@ -9161,19 +9151,19 @@ const Ra = {
|
|
|
9161
9151
|
initData_: function() {
|
|
9162
9152
|
if (this.space.id)
|
|
9163
9153
|
return;
|
|
9164
|
-
const t =
|
|
9154
|
+
const t = Ao()?.[0];
|
|
9165
9155
|
if (!t)
|
|
9166
9156
|
return;
|
|
9167
9157
|
this.space.id = t.id, this.space.name = t.name;
|
|
9168
9158
|
const e = this.getField("SPACE");
|
|
9169
9159
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
9170
|
-
const n =
|
|
9160
|
+
const n = Eo(this.space.id)?.[0];
|
|
9171
9161
|
if (!n)
|
|
9172
9162
|
return;
|
|
9173
9163
|
this.dir.id = n.id, this.dir.name = n.name;
|
|
9174
9164
|
const o = this.getField("DIR");
|
|
9175
9165
|
o.getOptions(!1), o.setValue(this.dir.id);
|
|
9176
|
-
const i =
|
|
9166
|
+
const i = go(this.space.id, this.dir.id)?.[0];
|
|
9177
9167
|
if (!i)
|
|
9178
9168
|
return;
|
|
9179
9169
|
this.resource.id = i.id, this.resource.name = i.name;
|
|
@@ -9224,7 +9214,7 @@ const Da = {
|
|
|
9224
9214
|
updateShadow_: function() {
|
|
9225
9215
|
if (this.isInsertionMarker())
|
|
9226
9216
|
return;
|
|
9227
|
-
const t =
|
|
9217
|
+
const t = gt("");
|
|
9228
9218
|
this.getInput("NAME")?.setShadowDom(t);
|
|
9229
9219
|
},
|
|
9230
9220
|
ensureBlocks_: function() {
|
|
@@ -9303,7 +9293,7 @@ g([
|
|
|
9303
9293
|
s.forBlock.text_append_v1 = function(t) {
|
|
9304
9294
|
const e = s.nameDB_?.getName(
|
|
9305
9295
|
t.getFieldValue("VAR"),
|
|
9306
|
-
|
|
9296
|
+
ut.NameType.VARIABLE
|
|
9307
9297
|
), n = s.valueToCode(t, "TEXT", u.NONE) || "''";
|
|
9308
9298
|
return `${e} += ${ce(n)};
|
|
9309
9299
|
`;
|
|
@@ -9905,7 +9895,7 @@ g([
|
|
|
9905
9895
|
s.forBlock.variable_get_v1 = function(t) {
|
|
9906
9896
|
return [s.nameDB_.getName(
|
|
9907
9897
|
t.getFieldValue("VAR"),
|
|
9908
|
-
|
|
9898
|
+
ut.NameType.VARIABLE
|
|
9909
9899
|
), u.ATOMIC];
|
|
9910
9900
|
};
|
|
9911
9901
|
g([
|
|
@@ -9934,20 +9924,20 @@ g([
|
|
|
9934
9924
|
s.forBlock.variable_set_v1 = function(t) {
|
|
9935
9925
|
const e = s.nameDB_.getName(
|
|
9936
9926
|
t.getFieldValue("VAR"),
|
|
9937
|
-
|
|
9927
|
+
ut.NameType.VARIABLE
|
|
9938
9928
|
), n = s.valueToCode(t, "VALUE", u.ASSIGNMENT) || "0";
|
|
9939
9929
|
return `${e} = ${n};
|
|
9940
9930
|
`;
|
|
9941
9931
|
};
|
|
9942
9932
|
Hn.setConfirm(async (t, e) => {
|
|
9943
|
-
const n = await
|
|
9933
|
+
const n = await oi({
|
|
9944
9934
|
title: "",
|
|
9945
9935
|
text: t
|
|
9946
9936
|
});
|
|
9947
9937
|
e(!!n);
|
|
9948
9938
|
});
|
|
9949
9939
|
Hn.setPrompt(async (t, e, n) => {
|
|
9950
|
-
const o = await
|
|
9940
|
+
const o = await ii({
|
|
9951
9941
|
title: "",
|
|
9952
9942
|
value: e
|
|
9953
9943
|
});
|
|
@@ -10006,7 +9996,7 @@ ne.getText_ = function() {
|
|
|
10006
9996
|
return "<n/a>";
|
|
10007
9997
|
};
|
|
10008
9998
|
const wn = 60;
|
|
10009
|
-
|
|
9999
|
+
Yo.prototype.cleanUp = function() {
|
|
10010
10000
|
this.setResizesEnabled(!1);
|
|
10011
10001
|
const t = v.getGroup();
|
|
10012
10002
|
t || v.setGroup(!0);
|
|
@@ -10029,22 +10019,22 @@ Fo.prototype.cleanUp = function() {
|
|
|
10029
10019
|
}
|
|
10030
10020
|
v.setGroup(t), this.setResizesEnabled(!0);
|
|
10031
10021
|
};
|
|
10032
|
-
function
|
|
10022
|
+
function Io(t) {
|
|
10033
10023
|
const e = t.getParent();
|
|
10034
|
-
return e &&
|
|
10024
|
+
return e && Io(e) ? !0 : !e && !!(t.outputConnection || t.previousConnection);
|
|
10035
10025
|
}
|
|
10036
10026
|
class Ga {
|
|
10037
10027
|
init() {
|
|
10038
|
-
const e =
|
|
10028
|
+
const e = Ko.registry.getItem("blockDisable");
|
|
10039
10029
|
e && (e.preconditionFn = function(n) {
|
|
10040
10030
|
const o = n.block;
|
|
10041
|
-
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";
|
|
10042
10032
|
});
|
|
10043
10033
|
}
|
|
10044
10034
|
}
|
|
10045
|
-
|
|
10046
|
-
|
|
10047
|
-
const Wa = new
|
|
10035
|
+
$o.registerFieldColour();
|
|
10036
|
+
Ho.registry.unregister(Go.names.ESCAPE);
|
|
10037
|
+
const Wa = new Wo.CrossTabCopyPaste();
|
|
10048
10038
|
Wa.init({ contextMenu: !0, shortcut: !0 });
|
|
10049
10039
|
const ja = new Ga();
|
|
10050
10040
|
ja.init();
|
|
@@ -10061,7 +10051,7 @@ function Tn(t) {
|
|
|
10061
10051
|
const i = o.getRelativeToSurfaceXY(), a = i.x * e.scale, c = i.y * e.scale;
|
|
10062
10052
|
e.scroll(-a, -c);
|
|
10063
10053
|
}
|
|
10064
|
-
function
|
|
10054
|
+
function yo() {
|
|
10065
10055
|
const t = Qt();
|
|
10066
10056
|
if (!t)
|
|
10067
10057
|
return;
|
|
@@ -10264,7 +10254,7 @@ function qa(t) {
|
|
|
10264
10254
|
}
|
|
10265
10255
|
}
|
|
10266
10256
|
const un = ["get_app_property_v1", "get_app_state_v1"];
|
|
10267
|
-
function
|
|
10257
|
+
function mt(t, e) {
|
|
10268
10258
|
return t.find((o) => o === e) !== void 0 ? !1 : (t.push(e), !0);
|
|
10269
10259
|
}
|
|
10270
10260
|
function Qa(t) {
|
|
@@ -10280,7 +10270,7 @@ function za(t) {
|
|
|
10280
10270
|
for (const n of t)
|
|
10281
10271
|
if (n.type === "get_app_property_v1") {
|
|
10282
10272
|
const o = n;
|
|
10283
|
-
|
|
10273
|
+
mt(
|
|
10284
10274
|
e,
|
|
10285
10275
|
Bt({
|
|
10286
10276
|
type: "elementProperty",
|
|
@@ -10288,7 +10278,7 @@ function za(t) {
|
|
|
10288
10278
|
propertyKeys: o.property.key
|
|
10289
10279
|
})
|
|
10290
10280
|
);
|
|
10291
|
-
} else n.type === "get_app_state_v1" ?
|
|
10281
|
+
} else n.type === "get_app_state_v1" ? mt(e, Bt({ type: "state", stateId: n.state.id })) : console.assert(!1);
|
|
10292
10282
|
return e;
|
|
10293
10283
|
}
|
|
10294
10284
|
function Za(t) {
|
|
@@ -10318,12 +10308,12 @@ function tc(t) {
|
|
|
10318
10308
|
} : (i.property.kind === "elementSlotProperty" || i.property.kind === "customSlotProperty") && (a = {
|
|
10319
10309
|
type: "customSlotProperty",
|
|
10320
10310
|
propertyId: i.property.key
|
|
10321
|
-
}), !a || !
|
|
10311
|
+
}), !a || !mt(n, Bt(a)))
|
|
10322
10312
|
continue;
|
|
10323
10313
|
e.push(a);
|
|
10324
10314
|
} else if (o.type === "get_app_state_v1") {
|
|
10325
10315
|
const a = { type: "state", stateId: o.state.id };
|
|
10326
|
-
if (!
|
|
10316
|
+
if (!mt(n, Bt(a)))
|
|
10327
10317
|
continue;
|
|
10328
10318
|
e.push(a);
|
|
10329
10319
|
} else if (o.type === "object_get_v1") {
|
|
@@ -10348,7 +10338,7 @@ function tc(t) {
|
|
|
10348
10338
|
type: "customSlotProperty",
|
|
10349
10339
|
propertyId: c.property.key,
|
|
10350
10340
|
subKeys: a
|
|
10351
|
-
}), !r || !
|
|
10341
|
+
}), !r || !mt(n, Bt(r)))
|
|
10352
10342
|
continue;
|
|
10353
10343
|
e.push(r);
|
|
10354
10344
|
} else if (i.type === "get_app_state_v1") {
|
|
@@ -10357,7 +10347,7 @@ function tc(t) {
|
|
|
10357
10347
|
stateId: i.state.id,
|
|
10358
10348
|
subKeys: a
|
|
10359
10349
|
};
|
|
10360
|
-
if (!
|
|
10350
|
+
if (!mt(n, Bt(r)))
|
|
10361
10351
|
continue;
|
|
10362
10352
|
e.push(r);
|
|
10363
10353
|
} else
|
|
@@ -10380,25 +10370,25 @@ function ec(t) {
|
|
|
10380
10370
|
if (o.type === "watch_effect_v1") {
|
|
10381
10371
|
const i = Qa(o), a = za(i);
|
|
10382
10372
|
for (const c of a)
|
|
10383
|
-
e.watchEffect[c] || (e.watchEffect[c] = []),
|
|
10373
|
+
e.watchEffect[c] || (e.watchEffect[c] = []), mt(e.watchEffect[c], o.id);
|
|
10384
10374
|
} else if (o.type === "app_bind_v1") {
|
|
10385
10375
|
const i = Za(o), a = tc(i);
|
|
10386
10376
|
e.bind.sets[o.id] = a;
|
|
10387
10377
|
for (const c of a) {
|
|
10388
10378
|
const r = Bt(c);
|
|
10389
|
-
e.bind.triggers[r] || (e.bind.triggers[r] = []),
|
|
10379
|
+
e.bind.triggers[r] || (e.bind.triggers[r] = []), mt(e.bind.triggers[r], o.id);
|
|
10390
10380
|
}
|
|
10391
10381
|
}
|
|
10392
10382
|
return e;
|
|
10393
10383
|
}
|
|
10394
|
-
const
|
|
10384
|
+
const Oo = /* @__PURE__ */ Symbol();
|
|
10395
10385
|
function nc(t) {
|
|
10396
|
-
|
|
10386
|
+
fi(Oo, t);
|
|
10397
10387
|
}
|
|
10398
10388
|
function En() {
|
|
10399
|
-
return
|
|
10389
|
+
return mi(Oo);
|
|
10400
10390
|
}
|
|
10401
|
-
const oc = /* @__PURE__ */
|
|
10391
|
+
const oc = /* @__PURE__ */ dt({
|
|
10402
10392
|
__name: "index",
|
|
10403
10393
|
props: {
|
|
10404
10394
|
lock: { type: Boolean }
|
|
@@ -10419,11 +10409,11 @@ const oc = /* @__PURE__ */ ht({
|
|
|
10419
10409
|
};
|
|
10420
10410
|
return e({ cleanWorkspace: r }), (h, l) => {
|
|
10421
10411
|
const d = Y("v-btn"), p = Y("v-tooltip");
|
|
10422
|
-
return U(),
|
|
10412
|
+
return U(), _t(p, {
|
|
10423
10413
|
disabled: c.value,
|
|
10424
10414
|
text: F(n)("x-block-lib.tip.hotkeyCtrlQ")
|
|
10425
10415
|
}, {
|
|
10426
|
-
activator:
|
|
10416
|
+
activator: pt(({ props: f }) => [
|
|
10427
10417
|
M(d, dn(f, {
|
|
10428
10418
|
density: "comfortable",
|
|
10429
10419
|
icon: "mdi-broom",
|
|
@@ -10435,7 +10425,7 @@ const oc = /* @__PURE__ */ ht({
|
|
|
10435
10425
|
}, 8, ["disabled", "text"]);
|
|
10436
10426
|
};
|
|
10437
10427
|
}
|
|
10438
|
-
}), ic = /* @__PURE__ */
|
|
10428
|
+
}), ic = /* @__PURE__ */ dt({
|
|
10439
10429
|
__name: "index",
|
|
10440
10430
|
props: {
|
|
10441
10431
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10446,11 +10436,11 @@ const oc = /* @__PURE__ */ ht({
|
|
|
10446
10436
|
const { t: e } = te(), n = hn(), o = Wt(t, "modelValue"), i = $(() => n.smAndDown.value);
|
|
10447
10437
|
return (a, c) => {
|
|
10448
10438
|
const r = Y("v-btn"), _ = Y("v-tooltip");
|
|
10449
|
-
return U(),
|
|
10439
|
+
return U(), _t(_, {
|
|
10450
10440
|
disabled: i.value,
|
|
10451
10441
|
text: F(e)("x-block-lib.tip.hotkeyCtrlW")
|
|
10452
10442
|
}, {
|
|
10453
|
-
activator:
|
|
10443
|
+
activator: pt(({ props: h }) => [
|
|
10454
10444
|
M(r, dn(h, {
|
|
10455
10445
|
density: "comfortable",
|
|
10456
10446
|
icon: o.value ? "mdi-lock" : "mdi-lock-open",
|
|
@@ -10466,7 +10456,7 @@ const oc = /* @__PURE__ */ ht({
|
|
|
10466
10456
|
key: 0,
|
|
10467
10457
|
class: "text-caption text-grey text-truncate ml-6",
|
|
10468
10458
|
style: { maxWidth: "340px" }
|
|
10469
|
-
}, rc = /* @__PURE__ */
|
|
10459
|
+
}, rc = /* @__PURE__ */ dt({
|
|
10470
10460
|
__name: "item",
|
|
10471
10461
|
props: {
|
|
10472
10462
|
id: {},
|
|
@@ -10494,8 +10484,8 @@ const oc = /* @__PURE__ */ ht({
|
|
|
10494
10484
|
pointerEvents: "none"
|
|
10495
10485
|
}));
|
|
10496
10486
|
return (l, d) => {
|
|
10497
|
-
const p = Y("v-spacer"), f = Y("v-icon"), T =
|
|
10498
|
-
return
|
|
10487
|
+
const p = Y("v-spacer"), f = Y("v-icon"), T = Ti("ripple");
|
|
10488
|
+
return Ei((U(), at("div", {
|
|
10499
10489
|
class: "d-flex align-center cursor-pointer",
|
|
10500
10490
|
style: z(_.value),
|
|
10501
10491
|
onClick: d[1] || (d[1] = (E) => c("x-click", a.id)),
|
|
@@ -10504,7 +10494,7 @@ const oc = /* @__PURE__ */ ht({
|
|
|
10504
10494
|
}, [
|
|
10505
10495
|
j("div", sc, [
|
|
10506
10496
|
j("span", ac, jt(a.title), 1),
|
|
10507
|
-
a.desc ? (U(),
|
|
10497
|
+
a.desc ? (U(), at("span", cc, jt(a.desc), 1)) : ft("", !0)
|
|
10508
10498
|
]),
|
|
10509
10499
|
M(p),
|
|
10510
10500
|
M(f, {
|
|
@@ -10524,7 +10514,7 @@ const oc = /* @__PURE__ */ ht({
|
|
|
10524
10514
|
}), lc = {
|
|
10525
10515
|
key: 1,
|
|
10526
10516
|
class: "text-caption text-grey"
|
|
10527
|
-
}, uc = /* @__PURE__ */
|
|
10517
|
+
}, uc = /* @__PURE__ */ dt({
|
|
10528
10518
|
__name: "index",
|
|
10529
10519
|
props: /* @__PURE__ */ tn({
|
|
10530
10520
|
lock: { type: Boolean }
|
|
@@ -10542,7 +10532,7 @@ const oc = /* @__PURE__ */ ht({
|
|
|
10542
10532
|
}
|
|
10543
10533
|
const p = [];
|
|
10544
10534
|
i.workspace.getTopBlocks(!0).forEach((T) => {
|
|
10545
|
-
const E = T.id ===
|
|
10535
|
+
const E = T.id === Xo()?.id;
|
|
10546
10536
|
let y = "";
|
|
10547
10537
|
if (T.type.startsWith("on_app_event_v")) {
|
|
10548
10538
|
const D = T, Rt = P[D.node.key];
|
|
@@ -10599,7 +10589,7 @@ const oc = /* @__PURE__ */ ht({
|
|
|
10599
10589
|
E
|
|
10600
10590
|
).getRelativeToSurfaceXY().y + 10);
|
|
10601
10591
|
const N = T.getRelativeToSurfaceXY();
|
|
10602
|
-
T.moveTo(new S.Coordinate(N.x, y)), i.workspace.cleanUp(),
|
|
10592
|
+
T.moveTo(new S.Coordinate(N.x, y)), i.workspace.cleanUp(), yo();
|
|
10603
10593
|
}, d = async (p) => {
|
|
10604
10594
|
if (!i.workspace) {
|
|
10605
10595
|
console.assert(!1);
|
|
@@ -10608,7 +10598,7 @@ const oc = /* @__PURE__ */ ht({
|
|
|
10608
10598
|
const f = i.workspace.getBlockById(p);
|
|
10609
10599
|
Wn.setSelected(f), Tn(p), o.value = !1;
|
|
10610
10600
|
};
|
|
10611
|
-
return (p, f) => a.value.length > 0 ? (U(),
|
|
10601
|
+
return (p, f) => a.value.length > 0 ? (U(), _t(F(jo), {
|
|
10612
10602
|
key: 0,
|
|
10613
10603
|
modelValue: a.value,
|
|
10614
10604
|
"onUpdate:modelValue": f[0] || (f[0] = (T) => a.value = T),
|
|
@@ -10619,8 +10609,8 @@ const oc = /* @__PURE__ */ ht({
|
|
|
10619
10609
|
onMove: h,
|
|
10620
10610
|
onStart: _
|
|
10621
10611
|
}, {
|
|
10622
|
-
default:
|
|
10623
|
-
(U(!0),
|
|
10612
|
+
default: pt(() => [
|
|
10613
|
+
(U(!0), at(eo, null, gi(a.value, (T) => (U(), _t(rc, {
|
|
10624
10614
|
id: T.id,
|
|
10625
10615
|
key: T.id,
|
|
10626
10616
|
desc: T.desc,
|
|
@@ -10630,14 +10620,14 @@ const oc = /* @__PURE__ */ ht({
|
|
|
10630
10620
|
}, null, 8, ["id", "desc", "select", "title"]))), 128))
|
|
10631
10621
|
]),
|
|
10632
10622
|
_: 1
|
|
10633
|
-
}, 8, ["modelValue"])) : (U(),
|
|
10623
|
+
}, 8, ["modelValue"])) : (U(), at("span", lc, jt(F(n)("x-block-lib.noOption")), 1));
|
|
10634
10624
|
}
|
|
10635
10625
|
}), _c = (t, e) => {
|
|
10636
10626
|
const n = t.__vccOpts || t;
|
|
10637
10627
|
for (const [o, i] of e)
|
|
10638
10628
|
n[o] = i;
|
|
10639
10629
|
return n;
|
|
10640
|
-
}, pc = /* @__PURE__ */ _c(uc, [["__scopeId", "data-v-a77ed323"]]), dc = /* @__PURE__ */
|
|
10630
|
+
}, pc = /* @__PURE__ */ _c(uc, [["__scopeId", "data-v-a77ed323"]]), dc = /* @__PURE__ */ dt({
|
|
10641
10631
|
__name: "index",
|
|
10642
10632
|
props: {
|
|
10643
10633
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10661,11 +10651,11 @@ const oc = /* @__PURE__ */ ht({
|
|
|
10661
10651
|
const _ = r.getBlockById(c);
|
|
10662
10652
|
Wn.setSelected(_), Tn(c), n.value = !1;
|
|
10663
10653
|
};
|
|
10664
|
-
return (c, r) => (U(),
|
|
10654
|
+
return (c, r) => (U(), at("div", {
|
|
10665
10655
|
onClick: r[0] || (r[0] = (_) => a(""))
|
|
10666
10656
|
}, "blockTree"));
|
|
10667
10657
|
}
|
|
10668
|
-
}), hc = { class: "text-subtitle-1" }, fc = /* @__PURE__ */
|
|
10658
|
+
}), hc = { class: "text-subtitle-1" }, fc = /* @__PURE__ */ dt({
|
|
10669
10659
|
__name: "index",
|
|
10670
10660
|
props: {
|
|
10671
10661
|
type: {},
|
|
@@ -10688,7 +10678,7 @@ const oc = /* @__PURE__ */ ht({
|
|
|
10688
10678
|
}), h = $(() => ({
|
|
10689
10679
|
height: "60px"
|
|
10690
10680
|
})), { open: l } = _n(`blocklyNavigatorDlg${en()}`);
|
|
10691
|
-
|
|
10681
|
+
Ai(() => {
|
|
10692
10682
|
l.value = !1;
|
|
10693
10683
|
});
|
|
10694
10684
|
const d = Gt("blockList"), p = Gt("blockTree");
|
|
@@ -10696,7 +10686,7 @@ const oc = /* @__PURE__ */ ht({
|
|
|
10696
10686
|
t.type === "list" ? d.value?.update() : t.type === "tree" && p.value?.update();
|
|
10697
10687
|
} }), (T, E) => {
|
|
10698
10688
|
const y = Y("v-sheet"), N = Y("v-btn"), D = Y("v-spacer"), Rt = Y("v-dialog"), Fe = Y("v-tooltip");
|
|
10699
|
-
return U(),
|
|
10689
|
+
return U(), at(eo, null, [
|
|
10700
10690
|
M(Rt, {
|
|
10701
10691
|
modelValue: F(l),
|
|
10702
10692
|
"onUpdate:modelValue": E[5] || (E[5] = (Q) => ae(l) ? l.value = Q : null),
|
|
@@ -10707,7 +10697,7 @@ const oc = /* @__PURE__ */ ht({
|
|
|
10707
10697
|
transition: "scroll-x-reverse-transition",
|
|
10708
10698
|
onKeydown: E[6] || (E[6] = no(Ht((Q) => l.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
10709
10699
|
}, {
|
|
10710
|
-
default:
|
|
10700
|
+
default: pt(() => [
|
|
10711
10701
|
j("div", {
|
|
10712
10702
|
class: "w-100 h-100 d-flex flex-row-reverse",
|
|
10713
10703
|
onClick: E[3] || (E[3] = Ht((Q) => l.value = !1, ["self"])),
|
|
@@ -10717,17 +10707,17 @@ const oc = /* @__PURE__ */ ht({
|
|
|
10717
10707
|
class: "elevation-2",
|
|
10718
10708
|
style: z(r.value)
|
|
10719
10709
|
}, [
|
|
10720
|
-
F(i) ? (U(),
|
|
10710
|
+
F(i) ? (U(), _t(y, {
|
|
10721
10711
|
key: 0,
|
|
10722
10712
|
color: "transparent",
|
|
10723
10713
|
height: 24
|
|
10724
|
-
})) :
|
|
10714
|
+
})) : ft("", !0),
|
|
10725
10715
|
M(y, {
|
|
10726
10716
|
class: "d-flex align-center px-2",
|
|
10727
10717
|
color: "transparent",
|
|
10728
10718
|
height: 48
|
|
10729
10719
|
}, {
|
|
10730
|
-
default:
|
|
10720
|
+
default: pt(() => [
|
|
10731
10721
|
M(N, {
|
|
10732
10722
|
density: "comfortable",
|
|
10733
10723
|
icon: "mdi-close",
|
|
@@ -10743,20 +10733,20 @@ const oc = /* @__PURE__ */ ht({
|
|
|
10743
10733
|
class: "overflow-y-auto",
|
|
10744
10734
|
style: z(_.value)
|
|
10745
10735
|
}, [
|
|
10746
|
-
t.type === "list" ? (U(),
|
|
10736
|
+
t.type === "list" ? (U(), _t(pc, {
|
|
10747
10737
|
key: 0,
|
|
10748
10738
|
ref_key: "blockList",
|
|
10749
10739
|
ref: d,
|
|
10750
10740
|
modelValue: F(l),
|
|
10751
10741
|
"onUpdate:modelValue": E[1] || (E[1] = (Q) => ae(l) ? l.value = Q : null),
|
|
10752
10742
|
lock: t.lock
|
|
10753
|
-
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (U(),
|
|
10743
|
+
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (U(), _t(dc, {
|
|
10754
10744
|
key: 1,
|
|
10755
10745
|
ref_key: "blockTree",
|
|
10756
10746
|
ref: p,
|
|
10757
10747
|
modelValue: F(l),
|
|
10758
10748
|
"onUpdate:modelValue": E[2] || (E[2] = (Q) => ae(l) ? l.value = Q : null)
|
|
10759
|
-
}, null, 8, ["modelValue"])) :
|
|
10749
|
+
}, null, 8, ["modelValue"])) : ft("", !0),
|
|
10760
10750
|
j("div", {
|
|
10761
10751
|
style: z(h.value)
|
|
10762
10752
|
}, null, 4)
|
|
@@ -10770,7 +10760,7 @@ const oc = /* @__PURE__ */ ht({
|
|
|
10770
10760
|
disabled: c.value,
|
|
10771
10761
|
text: F(n)("x-block-lib.tip.hotkeyCtrlE")
|
|
10772
10762
|
}, {
|
|
10773
|
-
activator:
|
|
10763
|
+
activator: pt(({ props: Q }) => [
|
|
10774
10764
|
M(N, dn(Q, {
|
|
10775
10765
|
density: "comfortable",
|
|
10776
10766
|
icon: "mdi-navigation-variant",
|
|
@@ -10795,7 +10785,7 @@ function C(t, e) {
|
|
|
10795
10785
|
n.appendChild(o);
|
|
10796
10786
|
return n;
|
|
10797
10787
|
}
|
|
10798
|
-
function
|
|
10788
|
+
function vo(t) {
|
|
10799
10789
|
const e = G.createElement("mutation");
|
|
10800
10790
|
for (const { key: n, value: o } of t)
|
|
10801
10791
|
e.setAttribute(n, o);
|
|
@@ -10860,10 +10850,10 @@ function gc() {
|
|
|
10860
10850
|
function Ac() {
|
|
10861
10851
|
const t = [];
|
|
10862
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(
|
|
10863
|
-
C("app_bind_v1", [
|
|
10853
|
+
C("app_bind_v1", [vo([{ key: "items", value: "2" }])])
|
|
10864
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;
|
|
10865
10855
|
}
|
|
10866
|
-
const
|
|
10856
|
+
const Co = { name: "APP_COMP_CATEGORY", callback: Ac };
|
|
10867
10857
|
function Ic() {
|
|
10868
10858
|
const t = [];
|
|
10869
10859
|
return t.push(H(m("LABEL_FUNC"))), t.push(H(m("LABEL_FLOW"))), t;
|
|
@@ -10896,10 +10886,10 @@ function kc() {
|
|
|
10896
10886
|
function Nc() {
|
|
10897
10887
|
const t = [];
|
|
10898
10888
|
return t.push(H(m("LABEL_EVENT"))), Z("onEvent") && t.push(C("on_app_event_v1")), t.push(
|
|
10899
|
-
C("app_bind_v1", [
|
|
10889
|
+
C("app_bind_v1", [vo([{ key: "items", value: "2" }])])
|
|
10900
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;
|
|
10901
10891
|
}
|
|
10902
|
-
const
|
|
10892
|
+
const ko = { name: "APP_PAGE_CATEGORY", callback: Nc };
|
|
10903
10893
|
function Sc() {
|
|
10904
10894
|
const t = [];
|
|
10905
10895
|
return t.push(H(m("LABEL_RESOURCE"))), t.push(C("upload_resource_v1")), t;
|
|
@@ -10928,7 +10918,7 @@ function Lc() {
|
|
|
10928
10918
|
}
|
|
10929
10919
|
return t;
|
|
10930
10920
|
}
|
|
10931
|
-
const
|
|
10921
|
+
const Tt = {
|
|
10932
10922
|
name: "PROCEDURE_CATEGORY",
|
|
10933
10923
|
callback: Lc
|
|
10934
10924
|
}, ie = S.xml;
|
|
@@ -10968,13 +10958,13 @@ function Bc() {
|
|
|
10968
10958
|
}
|
|
10969
10959
|
}), e;
|
|
10970
10960
|
}
|
|
10971
|
-
const
|
|
10961
|
+
const Et = {
|
|
10972
10962
|
name: "VARIABLE_CATEGORY",
|
|
10973
10963
|
callback: Bc
|
|
10974
10964
|
};
|
|
10975
10965
|
function bc() {
|
|
10976
10966
|
const t = [];
|
|
10977
|
-
if (
|
|
10967
|
+
if (ct().length > 0)
|
|
10978
10968
|
t.push(H(m("LABEL_OPERATION"))), t.push(C("add_data_v1")), t.push(C("delete_data_v1")), t.push(C("update_data_v1")), t.push(C("query_data_v1")), t.push(C("transaction_v1")), t.push(
|
|
10979
10969
|
C("interrupt_transaction_v1", [wt("VALUE")])
|
|
10980
10970
|
), t.push(H(m("LABEL_CONDITION"))), t.push(C("cond_logic_v1")), t.push(C("cond_atomic_v1", [wt("VALUE")])), t.push(H(m("LABEL_QUERY_EXTRA"))), t.push(
|
|
@@ -11696,7 +11686,7 @@ const Ce = { name: "COMPUTE_MISC_CATEGORY", callback: Uc }, Re = {
|
|
|
11696
11686
|
type: "text_reverse_v1"
|
|
11697
11687
|
}
|
|
11698
11688
|
]
|
|
11699
|
-
},
|
|
11689
|
+
}, No = {
|
|
11700
11690
|
kind: "category",
|
|
11701
11691
|
name: "%{BKY_CATEGORY_TIME}",
|
|
11702
11692
|
categorystyle: "time_category",
|
|
@@ -11727,7 +11717,7 @@ const Ce = { name: "COMPUTE_MISC_CATEGORY", callback: Uc }, Re = {
|
|
|
11727
11717
|
kind: "category",
|
|
11728
11718
|
name: "%{BKY_CATEGORY_COMP}",
|
|
11729
11719
|
categorystyle: "misc_category",
|
|
11730
|
-
custom:
|
|
11720
|
+
custom: Co.name
|
|
11731
11721
|
},
|
|
11732
11722
|
{
|
|
11733
11723
|
kind: "category",
|
|
@@ -11748,18 +11738,18 @@ const Ce = { name: "COMPUTE_MISC_CATEGORY", callback: Uc }, Re = {
|
|
|
11748
11738
|
De,
|
|
11749
11739
|
xe,
|
|
11750
11740
|
Re,
|
|
11751
|
-
|
|
11741
|
+
No,
|
|
11752
11742
|
{
|
|
11753
11743
|
kind: "category",
|
|
11754
11744
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
11755
11745
|
categorystyle: "variable_category",
|
|
11756
|
-
custom:
|
|
11746
|
+
custom: Et.name
|
|
11757
11747
|
},
|
|
11758
11748
|
{
|
|
11759
11749
|
kind: "category",
|
|
11760
11750
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
11761
11751
|
categorystyle: "procedure_category",
|
|
11762
|
-
custom:
|
|
11752
|
+
custom: Tt.name
|
|
11763
11753
|
},
|
|
11764
11754
|
{
|
|
11765
11755
|
kind: "category",
|
|
@@ -11812,13 +11802,13 @@ const Ce = { name: "COMPUTE_MISC_CATEGORY", callback: Uc }, Re = {
|
|
|
11812
11802
|
kind: "category",
|
|
11813
11803
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
11814
11804
|
categorystyle: "variable_category",
|
|
11815
|
-
custom:
|
|
11805
|
+
custom: Et.name
|
|
11816
11806
|
},
|
|
11817
11807
|
{
|
|
11818
11808
|
kind: "category",
|
|
11819
11809
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
11820
11810
|
categorystyle: "procedure_category",
|
|
11821
|
-
custom:
|
|
11811
|
+
custom: Tt.name
|
|
11822
11812
|
}
|
|
11823
11813
|
]
|
|
11824
11814
|
}, wc = {
|
|
@@ -11859,13 +11849,13 @@ const Ce = { name: "COMPUTE_MISC_CATEGORY", callback: Uc }, Re = {
|
|
|
11859
11849
|
kind: "category",
|
|
11860
11850
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
11861
11851
|
categorystyle: "variable_category",
|
|
11862
|
-
custom:
|
|
11852
|
+
custom: Et.name
|
|
11863
11853
|
},
|
|
11864
11854
|
{
|
|
11865
11855
|
kind: "category",
|
|
11866
11856
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
11867
11857
|
categorystyle: "procedure_category",
|
|
11868
|
-
custom:
|
|
11858
|
+
custom: Tt.name
|
|
11869
11859
|
}
|
|
11870
11860
|
]
|
|
11871
11861
|
}, Fc = {
|
|
@@ -11906,7 +11896,7 @@ const Ce = { name: "COMPUTE_MISC_CATEGORY", callback: Uc }, Re = {
|
|
|
11906
11896
|
kind: "category",
|
|
11907
11897
|
name: "%{BKY_CATEGORY_PAGE}",
|
|
11908
11898
|
categorystyle: "misc_category",
|
|
11909
|
-
custom:
|
|
11899
|
+
custom: ko.name
|
|
11910
11900
|
},
|
|
11911
11901
|
{
|
|
11912
11902
|
kind: "category",
|
|
@@ -11927,18 +11917,18 @@ const Ce = { name: "COMPUTE_MISC_CATEGORY", callback: Uc }, Re = {
|
|
|
11927
11917
|
De,
|
|
11928
11918
|
xe,
|
|
11929
11919
|
Re,
|
|
11930
|
-
|
|
11920
|
+
No,
|
|
11931
11921
|
{
|
|
11932
11922
|
kind: "category",
|
|
11933
11923
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
11934
11924
|
categorystyle: "variable_category",
|
|
11935
|
-
custom:
|
|
11925
|
+
custom: Et.name
|
|
11936
11926
|
},
|
|
11937
11927
|
{
|
|
11938
11928
|
kind: "category",
|
|
11939
11929
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
11940
11930
|
categorystyle: "procedure_category",
|
|
11941
|
-
custom:
|
|
11931
|
+
custom: Tt.name
|
|
11942
11932
|
},
|
|
11943
11933
|
{
|
|
11944
11934
|
kind: "category",
|
|
@@ -11981,10 +11971,10 @@ const Ce = { name: "COMPUTE_MISC_CATEGORY", callback: Uc }, Re = {
|
|
|
11981
11971
|
};
|
|
11982
11972
|
function Kc(t, e, n, o) {
|
|
11983
11973
|
Qe.theme = o ? "dark" : "light", Qe.toolbox = $c(e, n);
|
|
11984
|
-
const i =
|
|
11974
|
+
const i = Jo(t, Qe);
|
|
11985
11975
|
return i.addChangeListener((a) => {
|
|
11986
11976
|
setTimeout(() => {
|
|
11987
|
-
|
|
11977
|
+
qo.shadowBlockConversionChangeListener(a);
|
|
11988
11978
|
}, 0);
|
|
11989
11979
|
}), Hc(i, e, n), Gc(i), i;
|
|
11990
11980
|
}
|
|
@@ -11996,7 +11986,7 @@ function Hc(t, e, n) {
|
|
|
11996
11986
|
function o({ name: i, callback: a }) {
|
|
11997
11987
|
t.registerToolboxCategoryCallback(i, () => a(e));
|
|
11998
11988
|
}
|
|
11999
|
-
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));
|
|
12000
11990
|
}
|
|
12001
11991
|
function Gc(t) {
|
|
12002
11992
|
const { router: e } = vt;
|
|
@@ -12090,7 +12080,7 @@ function jc(t) {
|
|
|
12090
12080
|
if (o.type === "json_root_v1")
|
|
12091
12081
|
return e(o);
|
|
12092
12082
|
}
|
|
12093
|
-
const Xc = { class: "position-relative w-100 h-100" }, Jc = /* @__PURE__ */
|
|
12083
|
+
const Xc = { class: "position-relative w-100 h-100" }, Jc = /* @__PURE__ */ dt({
|
|
12094
12084
|
__name: "index",
|
|
12095
12085
|
props: /* @__PURE__ */ tn({
|
|
12096
12086
|
type: {},
|
|
@@ -12156,21 +12146,21 @@ const Xc = { class: "position-relative w-100 h-100" }, Jc = /* @__PURE__ */ ht({
|
|
|
12156
12146
|
console.assert(!1);
|
|
12157
12147
|
return;
|
|
12158
12148
|
}
|
|
12159
|
-
|
|
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);
|
|
12160
12150
|
const b = document.querySelector(`#${r} .blocklyFlyout`);
|
|
12161
12151
|
new MutationObserver((Ye) => {
|
|
12162
12152
|
Ye.forEach((oe) => {
|
|
12163
12153
|
oe.type === "attributes" && oe.attributeName === "style" && (Ft.value = p.workspace.getFlyout().isVisible());
|
|
12164
12154
|
});
|
|
12165
|
-
}).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");
|
|
12166
12156
|
}), Ln(() => {
|
|
12167
12157
|
Ft.value = !1;
|
|
12168
|
-
}),
|
|
12169
|
-
p.workspace &&
|
|
12158
|
+
}), zo(_, () => {
|
|
12159
|
+
p.workspace && Zo(p.workspace);
|
|
12170
12160
|
});
|
|
12171
|
-
async function
|
|
12161
|
+
async function So(b) {
|
|
12172
12162
|
if (b.type === v.FINISHED_LOADING) {
|
|
12173
|
-
|
|
12163
|
+
yo(), setTimeout(() => {
|
|
12174
12164
|
d.value?.update();
|
|
12175
12165
|
}, 0), f.value = !1;
|
|
12176
12166
|
return;
|
|
@@ -12185,18 +12175,18 @@ const Xc = { class: "position-relative w-100 h-100" }, Jc = /* @__PURE__ */ ht({
|
|
|
12185
12175
|
}, 0);
|
|
12186
12176
|
}
|
|
12187
12177
|
}
|
|
12188
|
-
const
|
|
12178
|
+
const Lo = (b) => {
|
|
12189
12179
|
f.value = !0, t.type === "json" ? Wc(b, p.workspace) : X.workspaces.load(b, p.workspace);
|
|
12190
|
-
},
|
|
12180
|
+
}, Bo = () => t.type === "json" ? jc(p.workspace) : X.workspaces.save(p.workspace), bo = () => {
|
|
12191
12181
|
if (t.type === "json")
|
|
12192
12182
|
console.assert(!1);
|
|
12193
12183
|
else
|
|
12194
12184
|
return s.workspaceToCode(p.workspace);
|
|
12195
|
-
},
|
|
12185
|
+
}, Po = () => ec(p.workspace), An = () => {
|
|
12196
12186
|
p.workspace.setIsReadOnly(i.value), p.workspace.isReadOnly() && (Ft.value = !1);
|
|
12197
12187
|
}, In = () => {
|
|
12198
12188
|
p.workspace.setScale(a.value);
|
|
12199
|
-
},
|
|
12189
|
+
}, Ro = () => {
|
|
12200
12190
|
p.workspace.fireChangeListener(new oo());
|
|
12201
12191
|
}, yn = () => {
|
|
12202
12192
|
l.value?.cleanWorkspace();
|
|
@@ -12227,14 +12217,14 @@ const Xc = { class: "position-relative w-100 h-100" }, Jc = /* @__PURE__ */ ht({
|
|
|
12227
12217
|
In();
|
|
12228
12218
|
}), e({
|
|
12229
12219
|
loading: f,
|
|
12230
|
-
load:
|
|
12231
|
-
save:
|
|
12232
|
-
generateCode:
|
|
12233
|
-
generateReactivity:
|
|
12234
|
-
fireStateChange:
|
|
12220
|
+
load: Lo,
|
|
12221
|
+
save: Bo,
|
|
12222
|
+
generateCode: bo,
|
|
12223
|
+
generateReactivity: Po,
|
|
12224
|
+
fireStateChange: Ro
|
|
12235
12225
|
}), (b, St) => {
|
|
12236
12226
|
const Ye = Y("v-icon"), oe = Y("x-loading");
|
|
12237
|
-
return U(),
|
|
12227
|
+
return U(), at("div", Xc, [
|
|
12238
12228
|
j("div", {
|
|
12239
12229
|
id: r,
|
|
12240
12230
|
ref_key: "blocklyDiv",
|
|
@@ -12244,9 +12234,9 @@ const Xc = { class: "position-relative w-100 h-100" }, Jc = /* @__PURE__ */ ht({
|
|
|
12244
12234
|
j("div", {
|
|
12245
12235
|
style: z(N.value)
|
|
12246
12236
|
}, [
|
|
12247
|
-
|
|
12237
|
+
yi(b.$slots, "bottom")
|
|
12248
12238
|
], 4),
|
|
12249
|
-
T.value ? (U(),
|
|
12239
|
+
T.value ? (U(), at("div", {
|
|
12250
12240
|
key: 0,
|
|
12251
12241
|
class: "d-flex flex-column justify-center align-center",
|
|
12252
12242
|
style: z(D.value)
|
|
@@ -12255,8 +12245,8 @@ const Xc = { class: "position-relative w-100 h-100" }, Jc = /* @__PURE__ */ ht({
|
|
|
12255
12245
|
icon: "mdi-delete",
|
|
12256
12246
|
size: "x-large"
|
|
12257
12247
|
})
|
|
12258
|
-
], 4)) :
|
|
12259
|
-
f.value ?
|
|
12248
|
+
], 4)) : ft("", !0),
|
|
12249
|
+
f.value ? ft("", !0) : (U(), at("div", {
|
|
12260
12250
|
key: 1,
|
|
12261
12251
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
12262
12252
|
style: z(Rt.value)
|
|
@@ -12268,7 +12258,7 @@ const Xc = { class: "position-relative w-100 h-100" }, Jc = /* @__PURE__ */ ht({
|
|
|
12268
12258
|
}, null, 8, ["lock"]),
|
|
12269
12259
|
M(ic, {
|
|
12270
12260
|
modelValue: i.value,
|
|
12271
|
-
"onUpdate:modelValue": St[0] || (St[0] = (
|
|
12261
|
+
"onUpdate:modelValue": St[0] || (St[0] = (Do) => i.value = Do)
|
|
12272
12262
|
}, null, 8, ["modelValue"]),
|
|
12273
12263
|
M(fc, {
|
|
12274
12264
|
ref_key: "navigator",
|
|
@@ -12277,14 +12267,14 @@ const Xc = { class: "position-relative w-100 h-100" }, Jc = /* @__PURE__ */ ht({
|
|
|
12277
12267
|
type: E.value
|
|
12278
12268
|
}, null, 8, ["lock", "type"])
|
|
12279
12269
|
], 4)),
|
|
12280
|
-
i.value ? (U(),
|
|
12270
|
+
i.value ? (U(), at("div", {
|
|
12281
12271
|
key: 2,
|
|
12282
12272
|
style: z(Q.value)
|
|
12283
|
-
}, null, 4)) :
|
|
12284
|
-
i.value ? (U(),
|
|
12273
|
+
}, null, 4)) : ft("", !0),
|
|
12274
|
+
i.value ? (U(), at("div", {
|
|
12285
12275
|
key: 3,
|
|
12286
12276
|
style: z(Fe.value)
|
|
12287
|
-
}, null, 4)) :
|
|
12277
|
+
}, null, 4)) : ft("", !0),
|
|
12288
12278
|
j("div", {
|
|
12289
12279
|
ref_key: "parentContainer",
|
|
12290
12280
|
ref: h,
|
|
@@ -12297,23 +12287,23 @@ const Xc = { class: "position-relative w-100 h-100" }, Jc = /* @__PURE__ */ ht({
|
|
|
12297
12287
|
]);
|
|
12298
12288
|
};
|
|
12299
12289
|
}
|
|
12300
|
-
}), qc = /* @__PURE__ */
|
|
12290
|
+
}), qc = /* @__PURE__ */ dt({
|
|
12301
12291
|
__name: "index",
|
|
12302
12292
|
props: {
|
|
12303
12293
|
code: {}
|
|
12304
12294
|
},
|
|
12305
12295
|
setup(t) {
|
|
12306
12296
|
const e = t;
|
|
12307
|
-
|
|
12308
|
-
const n =
|
|
12297
|
+
ti.registerLanguage("javascript", ei);
|
|
12298
|
+
const n = ni.component, { backgroundColor2: o } = zt();
|
|
12309
12299
|
return (i, a) => {
|
|
12310
12300
|
const c = Y("v-sheet");
|
|
12311
|
-
return U(),
|
|
12301
|
+
return U(), _t(c, {
|
|
12312
12302
|
color: F(o),
|
|
12313
12303
|
height: "100%",
|
|
12314
12304
|
width: "100%"
|
|
12315
12305
|
}, {
|
|
12316
|
-
default:
|
|
12306
|
+
default: pt(() => [
|
|
12317
12307
|
M(F(n), {
|
|
12318
12308
|
code: e.code,
|
|
12319
12309
|
language: "js"
|
|
@@ -12323,7 +12313,7 @@ const Xc = { class: "position-relative w-100 h-100" }, Jc = /* @__PURE__ */ ht({
|
|
|
12323
12313
|
}, 8, ["color"]);
|
|
12324
12314
|
};
|
|
12325
12315
|
}
|
|
12326
|
-
}), Qc = { class: "text-subtitle-1" }, zc = { class: "w-100 h-100 overflow-auto" }, Zc = /* @__PURE__ */
|
|
12316
|
+
}), Qc = { class: "text-subtitle-1" }, zc = { class: "w-100 h-100 overflow-auto" }, Zc = /* @__PURE__ */ dt({
|
|
12327
12317
|
__name: "index",
|
|
12328
12318
|
setup(t) {
|
|
12329
12319
|
const { t: e } = te(), { sysBarAvail: n } = Xn(), { backgroundColor0: o, backgroundColor2: i } = zt(), a = Ut(""), c = $(() => {
|
|
@@ -12337,7 +12327,7 @@ const Xc = { class: "position-relative w-100 h-100" }, Jc = /* @__PURE__ */ ht({
|
|
|
12337
12327
|
}, { open: _ } = _n("sourceDlg", r);
|
|
12338
12328
|
return (h, l) => {
|
|
12339
12329
|
const d = Y("v-sheet"), p = Y("v-btn"), f = Y("v-spacer"), T = Y("v-dialog");
|
|
12340
|
-
return U(),
|
|
12330
|
+
return U(), _t(T, {
|
|
12341
12331
|
modelValue: F(_),
|
|
12342
12332
|
"onUpdate:modelValue": l[1] || (l[1] = (E) => ae(_) ? _.value = E : null),
|
|
12343
12333
|
fullscreen: "",
|
|
@@ -12346,24 +12336,24 @@ const Xc = { class: "position-relative w-100 h-100" }, Jc = /* @__PURE__ */ ht({
|
|
|
12346
12336
|
transition: "dialog-bottom-transition",
|
|
12347
12337
|
onKeydown: l[2] || (l[2] = no(Ht((E) => _.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
12348
12338
|
}, {
|
|
12349
|
-
default:
|
|
12339
|
+
default: pt(() => [
|
|
12350
12340
|
M(d, {
|
|
12351
12341
|
color: F(o),
|
|
12352
12342
|
height: "100%",
|
|
12353
12343
|
width: "100%"
|
|
12354
12344
|
}, {
|
|
12355
|
-
default:
|
|
12356
|
-
F(n) ? (U(),
|
|
12345
|
+
default: pt(() => [
|
|
12346
|
+
F(n) ? (U(), _t(d, {
|
|
12357
12347
|
key: 0,
|
|
12358
12348
|
color: F(i),
|
|
12359
12349
|
height: 24
|
|
12360
|
-
}, null, 8, ["color"])) :
|
|
12350
|
+
}, null, 8, ["color"])) : ft("", !0),
|
|
12361
12351
|
M(d, {
|
|
12362
12352
|
class: "d-flex align-center px-2",
|
|
12363
12353
|
color: F(i),
|
|
12364
12354
|
height: 48
|
|
12365
12355
|
}, {
|
|
12366
|
-
default:
|
|
12356
|
+
default: pt(() => [
|
|
12367
12357
|
M(p, {
|
|
12368
12358
|
density: "comfortable",
|
|
12369
12359
|
icon: "mdi-close",
|