x-block-lib 0.8.60 → 0.8.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/blocks/app/misc/index.d.ts +1 -0
- package/dist/index.js +708 -621
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
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 O, r as On, M as
|
|
2
|
+
import { E as O, r as On, M as Mo, s as Uo, a as Vo, X as $n, u as N, B as A, j as i, O as _, F as v, b as je, i as S, c as It, d as xo, e as w, f as g, g as Yo, h as J, k as Et, p as wt, l as ct, m as vn, n as U, C as Hn, N as rt, o as Fo, P as Xe, q as Ye, V as bt, t as Gn, W as wo, v as Ko, w as $o, S as Ho, x as Go, y as Wo, z as Xt, T as ye, A as Wn, D as jo, G as Xo, H as jn, I as Jo, J as qo, K as Qo, L as zo, Q as Zo, R as ts, U as es, Y as ns } from "./vendor.je7mkgas.js";
|
|
3
3
|
import { globalState as I } from "x-state-lib";
|
|
4
|
-
import { globalObjects as
|
|
5
|
-
import { pkgs as ie, parsePixelStr as
|
|
6
|
-
import { provide as
|
|
4
|
+
import { globalObjects as yt, openConfirmDlg as os, openPromptDlg as ss, messageWarning as Xn, useColor as Jt, useSystem as Jn, useViewStack as rn, eventBus as Bt } from "x-essential-lib";
|
|
5
|
+
import { pkgs as ie, parsePixelStr as is, parsePercentStr as as, getPropertyTag as Vt, unwrapEventId as un, elements as V, unwrapEventKeyOfCustomSlot as Cn, unwrapEventKeyOfElementSlot as cs, unwrapPropertyKeyOfCustomSlot as Je, unwrapPropertyKeyOfElementSlot as qn, makeEventId as K, makeEventKeyOfCustomSlot as kn, unwrapSlotId as ae, makeEventKeyOfElementSlot as rs, makePropertyKeyOfCustomSlot as qe, makePropertyKeyOfElementSlot as Qn, toEventName as Oe, unwrapMethodId as qt, unwrapMethodKeyOfCustomSlot as Qe, unwrapMethodKeyOfElementSlot as us, makeMethodId as _t, makeMethodKeyOfCustomSlot as Sn, makeMethodKeyOfElementSlot as ls, toMethodName as ve, unwrapPropertyId as _s, makePropertyId as kt, toPropertyName as zn, isLocaleOfMethodKind as Zn, makeTriggerId as St } from "x-runtime-lib";
|
|
6
|
+
import { provide as ps, inject as ds, defineComponent as pt, computed as $, resolveComponent as F, createBlock as ut, openBlock as M, unref as Y, withCtx as lt, createVNode as D, mergeProps as ln, useModel as Ht, ref as Pt, resolveDirective as hs, withDirectives as fs, createElementBlock as it, normalizeStyle as z, createElementVNode as X, createCommentVNode as dt, toDisplayString as Gt, withModifiers as Kt, mergeModels as ze, Fragment as to, renderList as ms, useId as Ze, onUnmounted as Ts, useTemplateRef as $t, withKeys as eo, isRef as oe, onMounted as Nn, nextTick as Es, onBeforeUnmount as Ln, watch as Yt, renderSlot as gs } from "vue";
|
|
7
7
|
import { useDisplay as _n } from "vuetify";
|
|
8
8
|
import { useI18n as Qt } from "vue-i18n";
|
|
9
|
-
var
|
|
10
|
-
class
|
|
9
|
+
var P = /* @__PURE__ */ ((t) => (t.STATE_CHANGE = "state_change", t))(P || {});
|
|
10
|
+
class no extends O.Abstract {
|
|
11
11
|
isBlank = !0;
|
|
12
12
|
}
|
|
13
13
|
On.register(
|
|
14
14
|
On.Type.EVENT,
|
|
15
15
|
"state_change",
|
|
16
|
-
|
|
16
|
+
no
|
|
17
17
|
);
|
|
18
|
-
const
|
|
18
|
+
const oo = (t, e, n) => {
|
|
19
19
|
const o = t[e];
|
|
20
20
|
return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((s, a) => {
|
|
21
21
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(a.bind(null, /* @__PURE__ */ new Error("Unknown variable dynamic import: " + e + (e.split("/").length !== n ? ". Note that variables only represent file names one level deep." : ""))));
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
async function Bn(t) {
|
|
25
|
-
const e = await
|
|
26
|
-
|
|
25
|
+
const e = await oo(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.lazlimvt.js"), "./msg/zhHans.ts": () => import("./msg-zhHans.b1gbdbmm.js") }), `./msg/${t}.ts`, 3);
|
|
26
|
+
Uo(e.default);
|
|
27
27
|
}
|
|
28
28
|
function m(t) {
|
|
29
|
-
return
|
|
29
|
+
return Mo[t] ?? t;
|
|
30
30
|
}
|
|
31
31
|
const Rt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", ce = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
|
|
32
32
|
function Ce(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 re(t) {
|
|
@@ -46,13 +46,13 @@ function re(t) {
|
|
|
46
46
|
function B(t) {
|
|
47
47
|
return t.length <= 0 && t.push([m("NO_OPTION"), ""]), t;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function As(t) {
|
|
50
50
|
let e = 0;
|
|
51
51
|
for (; t; )
|
|
52
52
|
e++, t = t.getParent();
|
|
53
53
|
return e;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function so(t) {
|
|
56
56
|
return t.ui === "strInput" ? "string" : t.ui === "numInput" ? "number" : t.ui === "switch" ? "boolean" : "string";
|
|
57
57
|
}
|
|
58
58
|
function ke(t, e) {
|
|
@@ -67,7 +67,7 @@ function et(t) {
|
|
|
67
67
|
function nt(t) {
|
|
68
68
|
return t.startsWith("multiple_ref_v");
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function io(t) {
|
|
71
71
|
return t.startsWith("slot_v");
|
|
72
72
|
}
|
|
73
73
|
function Fe(t) {
|
|
@@ -78,20 +78,20 @@ function bn(t) {
|
|
|
78
78
|
const e = `<block type="math_number_v1"><field name="NUM">${t}</field></block>`;
|
|
79
79
|
return N.xml.textToDom(e);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function Is(t) {
|
|
82
82
|
return N.xml.textToDom('<block type="logic_boolean_v1"><field name="BOOL">FALSE</field></block>');
|
|
83
83
|
}
|
|
84
84
|
function tn(t, e) {
|
|
85
85
|
let n = null;
|
|
86
|
-
return e === "string" ? n = Fe("") : e === "integer" || e === "decimal" ? n = bn(0) : e === "boolean" ? n =
|
|
86
|
+
return e === "string" ? n = Fe("") : e === "integer" || e === "decimal" ? n = bn(0) : e === "boolean" ? n = Is() : e === "enum" || e === "dateTime" ? n = Fe("") : console.assert(!1), n ? $n.domToBlock(n, t) : null;
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function Ot(t) {
|
|
89
89
|
return t === "string" ? "String" : t === "number" ? "Number" : t === "boolean" ? "Boolean" : t === "array" ? "Array" : t === "object" ? "Object" : (console.assert(!1), null);
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function ys(t) {
|
|
92
92
|
return t.ui === "dummy" ? null : t.ui === "strInput" ? "String" : t.ui === "numInput" ? "Number" : t.ui === "switch" ? "Boolean" : t.ui === "select" ? re(t.items) : t.ui === "multiTypes" ? re(t.types) : t.ui === "selectComp" ? "Comp" : t.ui === "selectSlot" ? "Slot" : t.ui === "selectAdaptSlot" ? "AdaptSlot" : t.ui === "colorPicker" ? "Color" : (console.assert(!1), null);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function ao(t) {
|
|
95
95
|
return t === "string" ? "String" : t === "integer" || t === "decimal" ? "Number" : t === "boolean" ? "Boolean" : t === "enum" || t === "dateTime" ? "String" : (console.assert(!1), null);
|
|
96
96
|
}
|
|
97
97
|
function pn(t, e, n, o) {
|
|
@@ -100,7 +100,7 @@ function pn(t, e, n, o) {
|
|
|
100
100
|
<mutation key="${e}" name="${n}" locale="${o ? "TRUE" : "FALSE"}"/>
|
|
101
101
|
</block>
|
|
102
102
|
`, a = N.xml.textToDom(s);
|
|
103
|
-
return
|
|
103
|
+
return $n.domToBlock(a, t);
|
|
104
104
|
}
|
|
105
105
|
function j(t, e) {
|
|
106
106
|
try {
|
|
@@ -138,39 +138,39 @@ function le(t) {
|
|
|
138
138
|
const e = `<shadow type="logic_boolean_v1"><field name="BOOL">${t ? "TRUE" : "FALSE"}</field></shadow>`;
|
|
139
139
|
return N.xml.textToDom(e);
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function Os() {
|
|
142
142
|
return N.xml.textToDom('<shadow type="list_create_v1"></shadow>');
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function vs() {
|
|
145
145
|
return N.xml.textToDom('<shadow type="object_create_v1"></shadow>');
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function Cs(t) {
|
|
148
148
|
const e = `<shadow type="${Ce(t)}"></shadow>`;
|
|
149
149
|
return N.xml.textToDom(e);
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function ks(t) {
|
|
152
152
|
const e = `<shadow type="${Ce(t)}"></shadow>`;
|
|
153
153
|
return N.xml.textToDom(e);
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function Ss() {
|
|
156
156
|
return N.xml.textToDom('<shadow type="select_comp_v1"></shadow>');
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function Ns() {
|
|
159
159
|
return N.xml.textToDom('<shadow type="select_slot_v1"></shadow>');
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function Ls(t) {
|
|
162
162
|
const e = `<shadow type="color_picker_v1"><field name="COLOR">${t}</field></shadow>`;
|
|
163
163
|
return N.xml.textToDom(e);
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function vt(t) {
|
|
166
166
|
let e = null;
|
|
167
|
-
return t === "string" ? e = Tt("") : t === "number" ? e = ue(0) : t === "boolean" ? e = le(!1) : t === "array" ? e =
|
|
167
|
+
return t === "string" ? e = Tt("") : t === "number" ? e = ue(0) : t === "boolean" ? e = le(!1) : t === "array" ? e = Os() : t === "object" ? e = vs() : console.assert(!1), e;
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function Bs(t) {
|
|
170
170
|
let e = null;
|
|
171
|
-
return t.ui === "dummy" ? console.assert(!0) : t.ui === "strInput" ? e = Tt(t.default) : t.ui === "numInput" ? e = ue(t.default) : t.ui === "switch" ? e = le(t.default) : t.ui === "select" ? e =
|
|
171
|
+
return t.ui === "dummy" ? console.assert(!0) : t.ui === "strInput" ? e = Tt(t.default) : t.ui === "numInput" ? e = ue(t.default) : t.ui === "switch" ? e = le(t.default) : t.ui === "select" ? e = Cs(t.items) : t.ui === "multiTypes" ? e = ks(t.types) : t.ui === "selectComp" ? e = Ss() : t.ui === "selectSlot" ? e = Ns() : t.ui === "colorPicker" ? e = Ls(t.default ?? "#ff0000") : console.assert(!1), e;
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function bs() {
|
|
174
174
|
const { activeObject: t, activePage: e } = I.app, n = [];
|
|
175
175
|
if (t.type === "page" && e.meta.arguments)
|
|
176
176
|
for (const { id: o, name: s, type: a } of e.meta.arguments)
|
|
@@ -189,13 +189,13 @@ function Pn(t) {
|
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function Ps() {
|
|
193
193
|
const t = [];
|
|
194
|
-
return
|
|
194
|
+
return bs().forEach(({ key: n, name: o }) => {
|
|
195
195
|
t.push([o, n]);
|
|
196
196
|
}), B(t);
|
|
197
197
|
}
|
|
198
|
-
const
|
|
198
|
+
const Rs = {
|
|
199
199
|
init: function() {
|
|
200
200
|
this.argument = {
|
|
201
201
|
key: "",
|
|
@@ -217,10 +217,10 @@ const bs = {
|
|
|
217
217
|
}, 0);
|
|
218
218
|
},
|
|
219
219
|
genArgumentOpts_: function() {
|
|
220
|
-
return
|
|
220
|
+
return Ps();
|
|
221
221
|
},
|
|
222
222
|
onchange: function(t) {
|
|
223
|
-
if (t.type ===
|
|
223
|
+
if (t.type === P.STATE_CHANGE)
|
|
224
224
|
this.checkWarning_();
|
|
225
225
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
226
226
|
const e = t;
|
|
@@ -238,7 +238,7 @@ const bs = {
|
|
|
238
238
|
this.argument.key = e.key, this.argument.name = e.name, this.argument.type = e.type, this.updateShape_();
|
|
239
239
|
},
|
|
240
240
|
updateShape_: function() {
|
|
241
|
-
this.setOutput(!0,
|
|
241
|
+
this.setOutput(!0, Ot(this.argument.type));
|
|
242
242
|
},
|
|
243
243
|
checkWarning_: function() {
|
|
244
244
|
const t = Pn(this.argument.key);
|
|
@@ -253,12 +253,12 @@ const bs = {
|
|
|
253
253
|
this.setWarningText(null);
|
|
254
254
|
}
|
|
255
255
|
};
|
|
256
|
-
A.get_page_argument_v1 =
|
|
256
|
+
A.get_page_argument_v1 = Rs;
|
|
257
257
|
i.forBlock.get_page_argument_v1 = function(t) {
|
|
258
258
|
const e = t;
|
|
259
259
|
return [`__getPageArgumentV1__(${i.quote_(e.argument.key)})`, _.FUNCTION_CALL];
|
|
260
260
|
};
|
|
261
|
-
const
|
|
261
|
+
const Ds = (t, e) => {
|
|
262
262
|
const n = Ce(t), o = re(t);
|
|
263
263
|
A[n] = {
|
|
264
264
|
init: function() {
|
|
@@ -268,7 +268,7 @@ const Ps = (t, e) => {
|
|
|
268
268
|
), this.setOutput(!0, o), this.setStyle("property_blocks"), this.setTooltip(""), this.setHelpUrl("");
|
|
269
269
|
},
|
|
270
270
|
genOpts_: function() {
|
|
271
|
-
const { i18n: s } =
|
|
271
|
+
const { i18n: s } = yt, a = [];
|
|
272
272
|
for (const { title: r, value: c } of e)
|
|
273
273
|
a.push([s.global.t(r), c]);
|
|
274
274
|
return B(a);
|
|
@@ -281,9 +281,9 @@ const Ps = (t, e) => {
|
|
|
281
281
|
for (const t in ie) {
|
|
282
282
|
const e = ie[t];
|
|
283
283
|
for (const n in e.items)
|
|
284
|
-
|
|
284
|
+
Ds(n, e.items[n]);
|
|
285
285
|
}
|
|
286
|
-
const
|
|
286
|
+
const Ms = (t, e) => {
|
|
287
287
|
const n = Ce(t), o = re(t);
|
|
288
288
|
A[n] = {
|
|
289
289
|
init: function() {
|
|
@@ -301,13 +301,13 @@ const Rs = (t, e) => {
|
|
|
301
301
|
}, 0);
|
|
302
302
|
},
|
|
303
303
|
genOpts_: function() {
|
|
304
|
-
const { i18n: s } =
|
|
304
|
+
const { i18n: s } = yt, a = [];
|
|
305
305
|
for (const { title: r, value: c } of e)
|
|
306
306
|
a.push([s.global.t(r), c]);
|
|
307
307
|
return B(a);
|
|
308
308
|
},
|
|
309
309
|
onchange: function(s) {
|
|
310
|
-
if (s.type ===
|
|
310
|
+
if (s.type === P.STATE_CHANGE)
|
|
311
311
|
this.checkWarning_();
|
|
312
312
|
else if (s.type === O.BLOCK_CHANGE) {
|
|
313
313
|
const a = s;
|
|
@@ -336,7 +336,7 @@ const Rs = (t, e) => {
|
|
|
336
336
|
s.removeField("VALUE", !0), s.removeField("SUFFIX", !0);
|
|
337
337
|
let c, l;
|
|
338
338
|
if (r.ui === "pixelInput") {
|
|
339
|
-
const d =
|
|
339
|
+
const d = is(this.value) ?? 0;
|
|
340
340
|
c = new je(
|
|
341
341
|
d,
|
|
342
342
|
r.min,
|
|
@@ -347,7 +347,7 @@ const Rs = (t, e) => {
|
|
|
347
347
|
}
|
|
348
348
|
), l = "px";
|
|
349
349
|
} else if (r.ui === "percentInput") {
|
|
350
|
-
const d =
|
|
350
|
+
const d = as(this.value) ?? 0;
|
|
351
351
|
c = new je(
|
|
352
352
|
d,
|
|
353
353
|
r.min,
|
|
@@ -376,35 +376,35 @@ const Rs = (t, e) => {
|
|
|
376
376
|
for (const t in ie) {
|
|
377
377
|
const e = ie[t];
|
|
378
378
|
for (const n in e.types)
|
|
379
|
-
|
|
379
|
+
Ms(n, e.types[n]);
|
|
380
380
|
}
|
|
381
|
-
const
|
|
381
|
+
const Us = N.xml, Vs = {
|
|
382
382
|
init: function() {
|
|
383
383
|
this.appendDummyInput().appendField(
|
|
384
384
|
"%{BKY_APP_V1_APP_BIND_CONTAINER_TITLE}"
|
|
385
385
|
), this.appendStatementInput("STACK"), this.setStyle("event_blocks"), this.contextMenu = !1;
|
|
386
386
|
}
|
|
387
387
|
};
|
|
388
|
-
A.app_bind_container_v1 =
|
|
389
|
-
const
|
|
388
|
+
A.app_bind_container_v1 = Vs;
|
|
389
|
+
const xs = {
|
|
390
390
|
init: function() {
|
|
391
391
|
this.appendDummyInput().appendField("%{BKY_APP_V1_APP_BIND_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("event_blocks"), this.contextMenu = !1;
|
|
392
392
|
}
|
|
393
393
|
};
|
|
394
|
-
A.app_bind_item_v1 =
|
|
395
|
-
const
|
|
394
|
+
A.app_bind_item_v1 = xs;
|
|
395
|
+
const Ys = {
|
|
396
396
|
init: function() {
|
|
397
397
|
this.itemCount_ = 0, this.setMutator(
|
|
398
398
|
new It.MutatorIcon(
|
|
399
399
|
["app_bind_item_v1"],
|
|
400
400
|
this
|
|
401
401
|
)
|
|
402
|
-
), this.debounce_ =
|
|
402
|
+
), this.debounce_ = xo(() => {
|
|
403
403
|
this.checkWarning_();
|
|
404
404
|
}, 250), this.setStyle("event_blocks"), this.setTooltip("%{BKY_APP_V1_APP_BIND_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_APP_BIND_HELPURL}"), this.updateShape_();
|
|
405
405
|
},
|
|
406
406
|
mutationToDom: function() {
|
|
407
|
-
const t =
|
|
407
|
+
const t = Us.createElement("mutation");
|
|
408
408
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
409
409
|
},
|
|
410
410
|
domToMutation: function(t) {
|
|
@@ -510,11 +510,11 @@ const Vs = {
|
|
|
510
510
|
this.setWarningText(null);
|
|
511
511
|
}
|
|
512
512
|
};
|
|
513
|
-
A.app_bind_v1 =
|
|
513
|
+
A.app_bind_v1 = Ys;
|
|
514
514
|
i.forBlock.app_bind_v1 = function() {
|
|
515
515
|
return "";
|
|
516
516
|
};
|
|
517
|
-
function
|
|
517
|
+
function co() {
|
|
518
518
|
const t = [], { appList: e } = I.app;
|
|
519
519
|
for (const { id: n, name: o } of e)
|
|
520
520
|
t.push({ id: n, name: o });
|
|
@@ -528,9 +528,9 @@ function Rn(t) {
|
|
|
528
528
|
name: n.name
|
|
529
529
|
};
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function Fs() {
|
|
532
532
|
const t = [];
|
|
533
|
-
return
|
|
533
|
+
return co().forEach(({ id: n, name: o }) => {
|
|
534
534
|
t.push([o, n]);
|
|
535
535
|
}), B(t);
|
|
536
536
|
}
|
|
@@ -553,13 +553,13 @@ function we(t, e) {
|
|
|
553
553
|
name: s.name
|
|
554
554
|
};
|
|
555
555
|
}
|
|
556
|
-
function
|
|
556
|
+
function ws(t) {
|
|
557
557
|
const e = [];
|
|
558
558
|
return en(t).forEach(({ id: o, name: s }) => {
|
|
559
559
|
e.push([s, o]);
|
|
560
560
|
}), B(e);
|
|
561
561
|
}
|
|
562
|
-
function
|
|
562
|
+
function ro() {
|
|
563
563
|
const { activeApp: t } = I.app, e = [{ id: "", name: "" }];
|
|
564
564
|
for (const { id: n, name: o } of t.comps)
|
|
565
565
|
e.push({ id: n, name: o });
|
|
@@ -568,7 +568,7 @@ function co() {
|
|
|
568
568
|
function Dn(t) {
|
|
569
569
|
const { activeApp: e } = I.app;
|
|
570
570
|
if (!t)
|
|
571
|
-
return;
|
|
571
|
+
return { id: "", name: "" };
|
|
572
572
|
const n = e.comps.find((o) => o.id === t);
|
|
573
573
|
if (n)
|
|
574
574
|
return {
|
|
@@ -576,9 +576,9 @@ function Dn(t) {
|
|
|
576
576
|
name: n.name
|
|
577
577
|
};
|
|
578
578
|
}
|
|
579
|
-
function
|
|
580
|
-
const { i18n: t } =
|
|
581
|
-
return
|
|
579
|
+
function Ks() {
|
|
580
|
+
const { i18n: t } = yt, e = [];
|
|
581
|
+
return ro().forEach(({ id: o, name: s }) => {
|
|
582
582
|
let a = s;
|
|
583
583
|
o === "" && (a = t.global.t("x-runtime-lib.notSet")), e.push([a, o]);
|
|
584
584
|
}), B(e);
|
|
@@ -675,7 +675,7 @@ function nn(t) {
|
|
|
675
675
|
id: K(
|
|
676
676
|
"adaptSlotElementEvent",
|
|
677
677
|
t,
|
|
678
|
-
|
|
678
|
+
rs(
|
|
679
679
|
u.mainKey,
|
|
680
680
|
u.slotKey,
|
|
681
681
|
f.key
|
|
@@ -714,7 +714,7 @@ function nn(t) {
|
|
|
714
714
|
id: K("elementPropertyChangeEvent", t, u),
|
|
715
715
|
kind: "elementPropertyChangeEvent",
|
|
716
716
|
names: h,
|
|
717
|
-
params: x(
|
|
717
|
+
params: x(so(p))
|
|
718
718
|
});
|
|
719
719
|
if (et(d.key) && l.settings && l.settings.comp) {
|
|
720
720
|
const u = a[l.settings.comp];
|
|
@@ -776,7 +776,7 @@ function nn(t) {
|
|
|
776
776
|
id: K(
|
|
777
777
|
"adaptSlotElementPropertyChangeEvent",
|
|
778
778
|
t,
|
|
779
|
-
|
|
779
|
+
Qn(
|
|
780
780
|
h.key,
|
|
781
781
|
p.key,
|
|
782
782
|
f.key
|
|
@@ -916,11 +916,11 @@ function Ke(t) {
|
|
|
916
916
|
elementKey: p,
|
|
917
917
|
slotKey: f,
|
|
918
918
|
eventKey: T
|
|
919
|
-
} =
|
|
919
|
+
} = cs(d), E = V[p];
|
|
920
920
|
if (E && E.slots) {
|
|
921
921
|
const y = E.slots.find((k) => k.key === f);
|
|
922
922
|
if (y && y.events) {
|
|
923
|
-
const k = y.events.find((
|
|
923
|
+
const k = y.events.find((R) => R.key === T);
|
|
924
924
|
if (k)
|
|
925
925
|
return {
|
|
926
926
|
id: t,
|
|
@@ -937,7 +937,7 @@ function Ke(t) {
|
|
|
937
937
|
if (E && E.meta.slots) {
|
|
938
938
|
const y = E.meta.slots.find((k) => k.id === f);
|
|
939
939
|
if (y && y.events) {
|
|
940
|
-
const k = y.events.find((
|
|
940
|
+
const k = y.events.find((R) => R.id === T);
|
|
941
941
|
if (k)
|
|
942
942
|
return {
|
|
943
943
|
id: t,
|
|
@@ -958,7 +958,7 @@ function Ke(t) {
|
|
|
958
958
|
id: t,
|
|
959
959
|
kind: c,
|
|
960
960
|
names: p.names,
|
|
961
|
-
params: x(
|
|
961
|
+
params: x(so(p.raw))
|
|
962
962
|
};
|
|
963
963
|
}
|
|
964
964
|
} else if (c === "referencePropertyChangeEvent") {
|
|
@@ -1022,12 +1022,12 @@ function Ke(t) {
|
|
|
1022
1022
|
}
|
|
1023
1023
|
} else if (c === "adaptSlotElementPropertyChangeEvent") {
|
|
1024
1024
|
if (L(h.key) && n.type === "comp") {
|
|
1025
|
-
const { elementKey: p, slotKey: f, propertyKey: T } =
|
|
1025
|
+
const { elementKey: p, slotKey: f, propertyKey: T } = qn(d), E = V[p];
|
|
1026
1026
|
if (E && E.slots) {
|
|
1027
1027
|
const y = E.slots.find((k) => k.key === f);
|
|
1028
1028
|
if (y && y.properties) {
|
|
1029
1029
|
const k = y.properties.find(
|
|
1030
|
-
(
|
|
1030
|
+
(R) => R.key === T
|
|
1031
1031
|
);
|
|
1032
1032
|
if (k)
|
|
1033
1033
|
return {
|
|
@@ -1044,7 +1044,7 @@ function Ke(t) {
|
|
|
1044
1044
|
if (E && E.meta.slots) {
|
|
1045
1045
|
const y = E.meta.slots.find((k) => k.id === f);
|
|
1046
1046
|
if (y && y.properties) {
|
|
1047
|
-
const k = y.properties.find((
|
|
1047
|
+
const k = y.properties.find((R) => R.id === T);
|
|
1048
1048
|
if (k)
|
|
1049
1049
|
return {
|
|
1050
1050
|
id: t,
|
|
@@ -1080,13 +1080,13 @@ function Ke(t) {
|
|
|
1080
1080
|
}
|
|
1081
1081
|
}
|
|
1082
1082
|
}
|
|
1083
|
-
function
|
|
1083
|
+
function $s(t) {
|
|
1084
1084
|
const e = [], n = nn(t);
|
|
1085
1085
|
for (const { id: o, kind: s, names: a } of n)
|
|
1086
1086
|
e.push([Oe(s, a), o]);
|
|
1087
1087
|
return B(e);
|
|
1088
1088
|
}
|
|
1089
|
-
function
|
|
1089
|
+
function uo() {
|
|
1090
1090
|
const { activeObject: t, activeComp: e } = I.app, n = [];
|
|
1091
1091
|
if (t.type === "comp" && e.meta.events)
|
|
1092
1092
|
for (const { id: o, name: s, params: a } of e.meta.events)
|
|
@@ -1115,8 +1115,8 @@ function Mn(t) {
|
|
|
1115
1115
|
};
|
|
1116
1116
|
}
|
|
1117
1117
|
}
|
|
1118
|
-
function
|
|
1119
|
-
const t = [], e =
|
|
1118
|
+
function Hs() {
|
|
1119
|
+
const t = [], e = uo();
|
|
1120
1120
|
for (const { id: n, kind: o, names: s } of e)
|
|
1121
1121
|
t.push([Oe(o, s), n]);
|
|
1122
1122
|
return B(t);
|
|
@@ -1217,7 +1217,7 @@ function on(t) {
|
|
|
1217
1217
|
id: _t(
|
|
1218
1218
|
"adaptSlotElementMethod",
|
|
1219
1219
|
t,
|
|
1220
|
-
|
|
1220
|
+
ls(l.key, d.key, u.key)
|
|
1221
1221
|
),
|
|
1222
1222
|
kind: "adaptSlotElementMethod",
|
|
1223
1223
|
names: [l.name, d.name, u.name],
|
|
@@ -1344,7 +1344,7 @@ function $e(t) {
|
|
|
1344
1344
|
elementKey: d,
|
|
1345
1345
|
slotKey: u,
|
|
1346
1346
|
methodKey: h
|
|
1347
|
-
} =
|
|
1347
|
+
} = us(r), p = V[d];
|
|
1348
1348
|
if (p && p.slots) {
|
|
1349
1349
|
const f = p.slots.find((T) => T.key === u);
|
|
1350
1350
|
if (f && f.methods) {
|
|
@@ -1378,7 +1378,7 @@ function $e(t) {
|
|
|
1378
1378
|
}
|
|
1379
1379
|
}
|
|
1380
1380
|
}
|
|
1381
|
-
function
|
|
1381
|
+
function Gs(t) {
|
|
1382
1382
|
const e = [], n = on(t);
|
|
1383
1383
|
for (const { id: o, kind: s, names: a } of n)
|
|
1384
1384
|
e.push([ve(s, a), o]);
|
|
@@ -1442,7 +1442,7 @@ function Ut(t) {
|
|
|
1442
1442
|
}
|
|
1443
1443
|
}
|
|
1444
1444
|
}
|
|
1445
|
-
function
|
|
1445
|
+
function lo() {
|
|
1446
1446
|
const t = [], e = dn();
|
|
1447
1447
|
for (const { id: n, kind: o, names: s } of e)
|
|
1448
1448
|
t.push([ve(o, s), n]);
|
|
@@ -1457,14 +1457,14 @@ function He(t, e) {
|
|
|
1457
1457
|
if (n)
|
|
1458
1458
|
return n.outputs?.find((o) => o.key === e);
|
|
1459
1459
|
}
|
|
1460
|
-
function
|
|
1460
|
+
function Ws(t) {
|
|
1461
1461
|
const e = [], n = sn(t);
|
|
1462
1462
|
if (n)
|
|
1463
1463
|
for (const { name: o, key: s } of n)
|
|
1464
1464
|
e.push([o, s]);
|
|
1465
1465
|
return B(e);
|
|
1466
1466
|
}
|
|
1467
|
-
function
|
|
1467
|
+
function js(t, e, n) {
|
|
1468
1468
|
const { properties: o } = I.runtime, { activeObject: s, activePage: a, activeComp: r, depends: c } = I.app;
|
|
1469
1469
|
if (t.events && t.events.length > 0)
|
|
1470
1470
|
return !1;
|
|
@@ -1506,7 +1506,7 @@ function Gs(t, e, n) {
|
|
|
1506
1506
|
}
|
|
1507
1507
|
return !0;
|
|
1508
1508
|
}
|
|
1509
|
-
function
|
|
1509
|
+
function Xs(t, e) {
|
|
1510
1510
|
const { activeObject: n, activeComp: o, depends: s } = I.app;
|
|
1511
1511
|
if (t.methods && t.methods.length > 0)
|
|
1512
1512
|
return !1;
|
|
@@ -1522,7 +1522,7 @@ function Ws(t, e) {
|
|
|
1522
1522
|
}
|
|
1523
1523
|
return L(t.key) && n.type === "comp" && o.meta.methods && o.meta.methods.length > 0 ? !1 : (L(t.key) && n.type, !0);
|
|
1524
1524
|
}
|
|
1525
|
-
function
|
|
1525
|
+
function Js(t, e, n) {
|
|
1526
1526
|
const { properties: o } = I.runtime, { activeObject: s, activeComp: a, depends: r } = I.app;
|
|
1527
1527
|
if (o[t.key] && o[t.key][e] && o[t.key][e].length > 0)
|
|
1528
1528
|
return !1;
|
|
@@ -1538,7 +1538,7 @@ function js(t, e, n) {
|
|
|
1538
1538
|
}
|
|
1539
1539
|
return !(L(t.key) && s.type === "comp" && a.meta.properties && a.meta.properties.length > 0);
|
|
1540
1540
|
}
|
|
1541
|
-
function
|
|
1541
|
+
function qs(t, e, n) {
|
|
1542
1542
|
const { properties: o } = I.runtime, { activeObject: s, activeComp: a, depends: r } = I.app;
|
|
1543
1543
|
if (o[t.key] && o[t.key][e]) {
|
|
1544
1544
|
for (const { keys: c, raw: l } of o[t.key][e])
|
|
@@ -1557,8 +1557,8 @@ function Xs(t, e, n) {
|
|
|
1557
1557
|
}
|
|
1558
1558
|
return !(L(t.key) && s.type === "comp" && a.meta.properties && a.meta.properties.length > 0);
|
|
1559
1559
|
}
|
|
1560
|
-
function
|
|
1561
|
-
return t ? t === "onEvent" ?
|
|
1560
|
+
function _o(t, e, n, o) {
|
|
1561
|
+
return t ? t === "onEvent" ? js(e, n, o) : t === "callMethod" ? Xs(e, o) : t === "getProperty" ? Js(e, n, o) : t === "setProperty" ? qs(e, n, o) : !1 : !1;
|
|
1562
1562
|
}
|
|
1563
1563
|
function Z(t) {
|
|
1564
1564
|
const { activeObject: e } = I.app, n = Vt(e.type, e.subtype);
|
|
@@ -1570,7 +1570,7 @@ function Z(t) {
|
|
|
1570
1570
|
console.assert(!1, "invalid element", o.key);
|
|
1571
1571
|
continue;
|
|
1572
1572
|
}
|
|
1573
|
-
if (!
|
|
1573
|
+
if (!_o(t, s, n, o.settings?.comp))
|
|
1574
1574
|
return !0;
|
|
1575
1575
|
}
|
|
1576
1576
|
return !1;
|
|
@@ -1585,7 +1585,7 @@ function zt(t) {
|
|
|
1585
1585
|
console.assert(!1, "invalid element", s.key);
|
|
1586
1586
|
continue;
|
|
1587
1587
|
}
|
|
1588
|
-
|
|
1588
|
+
_o(t, a, o, s.settings?.comp) || n.push({
|
|
1589
1589
|
id: s.id,
|
|
1590
1590
|
key: s.key,
|
|
1591
1591
|
name: a.name,
|
|
@@ -1611,7 +1611,7 @@ function gt(t) {
|
|
|
1611
1611
|
};
|
|
1612
1612
|
}
|
|
1613
1613
|
function Se(t) {
|
|
1614
|
-
const { i18n: e } =
|
|
1614
|
+
const { i18n: e } = yt, n = [], o = zt(t);
|
|
1615
1615
|
for (const { id: s, name: a, alias: r } of o) {
|
|
1616
1616
|
let c = e.global.t(a);
|
|
1617
1617
|
r && (c += " / " + r), n.push([c, s]);
|
|
@@ -1631,7 +1631,7 @@ function Wt(t, e) {
|
|
|
1631
1631
|
if (n[d.key] && n[d.key][c])
|
|
1632
1632
|
for (const { keys: u, names: h, raw: p } of n[d.key][c])
|
|
1633
1633
|
e === "write" && ke(u, p) || r.push({
|
|
1634
|
-
id:
|
|
1634
|
+
id: kt("elementProperty", t, u),
|
|
1635
1635
|
kind: "elementProperty",
|
|
1636
1636
|
names: h,
|
|
1637
1637
|
meta: {
|
|
@@ -1644,7 +1644,7 @@ function Wt(t, e) {
|
|
|
1644
1644
|
if (u && u.meta.properties)
|
|
1645
1645
|
for (const { id: h, name: p, type: f } of u.meta.properties)
|
|
1646
1646
|
r.push({
|
|
1647
|
-
id:
|
|
1647
|
+
id: kt("referenceProperty", t, h),
|
|
1648
1648
|
kind: "referenceProperty",
|
|
1649
1649
|
names: [p],
|
|
1650
1650
|
meta: {
|
|
@@ -1657,7 +1657,7 @@ function Wt(t, e) {
|
|
|
1657
1657
|
if (u && u.meta.properties)
|
|
1658
1658
|
for (const { id: h, name: p, type: f } of u.meta.properties)
|
|
1659
1659
|
r.push({
|
|
1660
|
-
id:
|
|
1660
|
+
id: kt("multipleRefProperty", t, h),
|
|
1661
1661
|
kind: "multipleRefProperty",
|
|
1662
1662
|
names: [p],
|
|
1663
1663
|
meta: {
|
|
@@ -1668,21 +1668,21 @@ function Wt(t, e) {
|
|
|
1668
1668
|
if (L(d.key) && o.type === "comp" && s.meta.properties)
|
|
1669
1669
|
for (const { id: u, name: h, type: p } of s.meta.properties)
|
|
1670
1670
|
r.push({
|
|
1671
|
-
id:
|
|
1671
|
+
id: kt("customProperty", t, u),
|
|
1672
1672
|
kind: "customProperty",
|
|
1673
1673
|
names: [h],
|
|
1674
1674
|
meta: {
|
|
1675
1675
|
raw: { type: p }
|
|
1676
1676
|
}
|
|
1677
1677
|
});
|
|
1678
|
-
if (
|
|
1678
|
+
if (io(d.key) && l.settings && l.settings.slot && o.type === "comp" && s.meta.slots) {
|
|
1679
1679
|
const u = s.meta.slots.find(
|
|
1680
1680
|
(h) => h.id === l.settings.slot
|
|
1681
1681
|
);
|
|
1682
1682
|
if (u && u.properties)
|
|
1683
1683
|
for (const h of u.properties)
|
|
1684
1684
|
r.push({
|
|
1685
|
-
id:
|
|
1685
|
+
id: kt("customSlotProperty", t, h.id),
|
|
1686
1686
|
kind: "customSlotProperty",
|
|
1687
1687
|
names: [u.name, h.name],
|
|
1688
1688
|
meta: {
|
|
@@ -1702,10 +1702,10 @@ function Wt(t, e) {
|
|
|
1702
1702
|
if (p && p.properties)
|
|
1703
1703
|
for (const f of p.properties)
|
|
1704
1704
|
r.push({
|
|
1705
|
-
id:
|
|
1705
|
+
id: kt(
|
|
1706
1706
|
"adaptSlotElementProperty",
|
|
1707
1707
|
t,
|
|
1708
|
-
|
|
1708
|
+
Qn(
|
|
1709
1709
|
h.key,
|
|
1710
1710
|
p.key,
|
|
1711
1711
|
f.key
|
|
@@ -1727,7 +1727,7 @@ function Wt(t, e) {
|
|
|
1727
1727
|
if (p && p.properties)
|
|
1728
1728
|
for (const f of p.properties)
|
|
1729
1729
|
r.push({
|
|
1730
|
-
id:
|
|
1730
|
+
id: kt(
|
|
1731
1731
|
"adaptSlotCustomProperty",
|
|
1732
1732
|
t,
|
|
1733
1733
|
qe(
|
|
@@ -1748,13 +1748,13 @@ function Wt(t, e) {
|
|
|
1748
1748
|
}
|
|
1749
1749
|
return r;
|
|
1750
1750
|
}
|
|
1751
|
-
function
|
|
1751
|
+
function Nt(t) {
|
|
1752
1752
|
if (!t)
|
|
1753
1753
|
return;
|
|
1754
1754
|
const { properties: e } = I.runtime, { activeObject: n, activeComp: o, depends: s } = I.app, a = Vt(n.type, n.subtype);
|
|
1755
1755
|
if (!a)
|
|
1756
1756
|
return;
|
|
1757
|
-
const { kind: r, nodeId: c, propertyKey: l } =
|
|
1757
|
+
const { kind: r, nodeId: c, propertyKey: l } = _s(t), d = n.nodes.find((h) => h.id === c);
|
|
1758
1758
|
if (!d)
|
|
1759
1759
|
return;
|
|
1760
1760
|
const u = V[d.key];
|
|
@@ -1830,7 +1830,7 @@ function St(t) {
|
|
|
1830
1830
|
};
|
|
1831
1831
|
}
|
|
1832
1832
|
} else if (r === "customSlotProperty") {
|
|
1833
|
-
if (
|
|
1833
|
+
if (io(u.key) && d.settings && d.settings.slot && n.type === "comp" && o.meta.slots) {
|
|
1834
1834
|
const h = o.meta.slots.find(
|
|
1835
1835
|
(p) => p.id === d.settings.slot
|
|
1836
1836
|
);
|
|
@@ -1853,7 +1853,7 @@ function St(t) {
|
|
|
1853
1853
|
elementKey: h,
|
|
1854
1854
|
slotKey: p,
|
|
1855
1855
|
propertyKey: f
|
|
1856
|
-
} =
|
|
1856
|
+
} = qn(l), T = V[h];
|
|
1857
1857
|
if (T && T.slots) {
|
|
1858
1858
|
const E = T.slots.find((y) => y.key === p);
|
|
1859
1859
|
if (E && E.properties) {
|
|
@@ -1893,12 +1893,41 @@ function St(t) {
|
|
|
1893
1893
|
}
|
|
1894
1894
|
}
|
|
1895
1895
|
}
|
|
1896
|
-
function
|
|
1896
|
+
function po(t, e) {
|
|
1897
1897
|
const n = [], o = Wt(t, e);
|
|
1898
1898
|
for (const { id: s, kind: a, names: r } of o)
|
|
1899
|
-
n.push([
|
|
1899
|
+
n.push([zn(a, r), s]);
|
|
1900
1900
|
return B(n);
|
|
1901
1901
|
}
|
|
1902
|
+
function ho() {
|
|
1903
|
+
const { activeObject: t, activeComp: e } = I.app, n = [{ id: "", name: "" }];
|
|
1904
|
+
if (t.type !== "comp" || !e.meta.slots)
|
|
1905
|
+
return n;
|
|
1906
|
+
for (const { id: o, name: s } of e.meta.slots)
|
|
1907
|
+
n.push({ id: o, name: s });
|
|
1908
|
+
return n;
|
|
1909
|
+
}
|
|
1910
|
+
function Un(t) {
|
|
1911
|
+
const { activeObject: e, activeComp: n } = I.app;
|
|
1912
|
+
if (e.type !== "comp" || !n.meta.slots)
|
|
1913
|
+
return;
|
|
1914
|
+
if (!t)
|
|
1915
|
+
return { id: "", name: "" };
|
|
1916
|
+
const o = n.meta.slots.find((s) => s.id === t);
|
|
1917
|
+
if (o)
|
|
1918
|
+
return {
|
|
1919
|
+
id: o.id,
|
|
1920
|
+
name: o.name
|
|
1921
|
+
};
|
|
1922
|
+
}
|
|
1923
|
+
function Qs() {
|
|
1924
|
+
const { i18n: t } = yt, e = [], n = ho();
|
|
1925
|
+
for (const { id: o, name: s } of n) {
|
|
1926
|
+
let a = s;
|
|
1927
|
+
o === "" && (a = t.global.t("x-runtime-lib.notSet")), e.push([a, o]);
|
|
1928
|
+
}
|
|
1929
|
+
return B(e);
|
|
1930
|
+
}
|
|
1902
1931
|
function hn() {
|
|
1903
1932
|
const { activeObject: t, activePage: e, activeComp: n } = I.app;
|
|
1904
1933
|
return t.type === "page" ? e.meta.states ?? [] : t.type === "comp" ? n.meta.states ?? [] : [];
|
|
@@ -1910,13 +1939,13 @@ function _e(t) {
|
|
|
1910
1939
|
if (e.type === "comp")
|
|
1911
1940
|
return o.meta.states?.find((s) => s.id === t);
|
|
1912
1941
|
}
|
|
1913
|
-
function
|
|
1942
|
+
function fo() {
|
|
1914
1943
|
const t = [], e = hn();
|
|
1915
1944
|
for (const { id: n, name: o } of e)
|
|
1916
1945
|
t.push([o, n]);
|
|
1917
1946
|
return B(t);
|
|
1918
1947
|
}
|
|
1919
|
-
const
|
|
1948
|
+
const zs = {
|
|
1920
1949
|
init: function() {
|
|
1921
1950
|
this.node = {
|
|
1922
1951
|
id: "",
|
|
@@ -1962,10 +1991,10 @@ const Js = {
|
|
|
1962
1991
|
return Se("onEvent");
|
|
1963
1992
|
},
|
|
1964
1993
|
genEventOpts_: function() {
|
|
1965
|
-
return
|
|
1994
|
+
return $s(this.node.id);
|
|
1966
1995
|
},
|
|
1967
1996
|
onchange: function(t) {
|
|
1968
|
-
if (t.type ===
|
|
1997
|
+
if (t.type === P.STATE_CHANGE)
|
|
1969
1998
|
this.checkWarning_();
|
|
1970
1999
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
1971
2000
|
const e = t;
|
|
@@ -2051,7 +2080,7 @@ const Js = {
|
|
|
2051
2080
|
this.setWarningText(null);
|
|
2052
2081
|
}
|
|
2053
2082
|
};
|
|
2054
|
-
A.on_app_event_v1 =
|
|
2083
|
+
A.on_app_event_v1 = zs;
|
|
2055
2084
|
i.forBlock.on_app_event_v1 = function(t) {
|
|
2056
2085
|
const e = i.quote_, n = t, o = n.event.id;
|
|
2057
2086
|
let s = "";
|
|
@@ -2063,7 +2092,7 @@ i.forBlock.on_app_event_v1 = function(t) {
|
|
|
2063
2092
|
${a}});
|
|
2064
2093
|
`;
|
|
2065
2094
|
};
|
|
2066
|
-
const
|
|
2095
|
+
const Zs = {
|
|
2067
2096
|
init: function() {
|
|
2068
2097
|
this.event = {
|
|
2069
2098
|
id: "",
|
|
@@ -2077,7 +2106,7 @@ const qs = {
|
|
|
2077
2106
|
initData_: function() {
|
|
2078
2107
|
if (this.event.id)
|
|
2079
2108
|
return;
|
|
2080
|
-
const t =
|
|
2109
|
+
const t = uo()?.[0];
|
|
2081
2110
|
if (!t)
|
|
2082
2111
|
return;
|
|
2083
2112
|
this.event.id = t.id, this.event.kind = t.kind, this.event.names = t.names, this.event.params = t.params;
|
|
@@ -2095,10 +2124,10 @@ const qs = {
|
|
|
2095
2124
|
}, 0);
|
|
2096
2125
|
},
|
|
2097
2126
|
genEventOpts_: function() {
|
|
2098
|
-
return
|
|
2127
|
+
return Hs();
|
|
2099
2128
|
},
|
|
2100
2129
|
onchange: function(t) {
|
|
2101
|
-
if (t.type ===
|
|
2130
|
+
if (t.type === P.STATE_CHANGE)
|
|
2102
2131
|
this.checkWarning_();
|
|
2103
2132
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
2104
2133
|
const e = t;
|
|
@@ -2123,14 +2152,14 @@ const qs = {
|
|
|
2123
2152
|
const { type: e } = this.event.params[t], n = this.getInput("PARAM" + t);
|
|
2124
2153
|
n.connection.setShadowDom(null);
|
|
2125
2154
|
const o = n.connection.targetBlock();
|
|
2126
|
-
o && !o.isShadow() && o.dispose(), n.setCheck(
|
|
2155
|
+
o && !o.isShadow() && o.dispose(), n.setCheck(Ot(e));
|
|
2127
2156
|
}
|
|
2128
2157
|
}
|
|
2129
2158
|
},
|
|
2130
2159
|
updateShadows_: function() {
|
|
2131
2160
|
if (!this.isInsertionMarker() && this.event.params)
|
|
2132
2161
|
for (let t = 0; t < this.event.params.length; t++) {
|
|
2133
|
-
const e = this.event.params[t], n =
|
|
2162
|
+
const e = this.event.params[t], n = vt(e.type);
|
|
2134
2163
|
this.getInput("PARAM" + t)?.connection?.setShadowDom(n);
|
|
2135
2164
|
}
|
|
2136
2165
|
},
|
|
@@ -2151,7 +2180,7 @@ const qs = {
|
|
|
2151
2180
|
this.setWarningText(null);
|
|
2152
2181
|
}
|
|
2153
2182
|
};
|
|
2154
|
-
A.trigger_app_event_v1 =
|
|
2183
|
+
A.trigger_app_event_v1 = Zs;
|
|
2155
2184
|
i.forBlock.trigger_app_event_v1 = function(t) {
|
|
2156
2185
|
const e = i.quote_, n = t;
|
|
2157
2186
|
let o = "";
|
|
@@ -2186,7 +2215,7 @@ g([
|
|
|
2186
2215
|
}
|
|
2187
2216
|
]);
|
|
2188
2217
|
i.forBlock.watch_effect_v1 = function(t) {
|
|
2189
|
-
const e =
|
|
2218
|
+
const e = Yo(t.id), n = i.statementToCode(t, "HANDLE");
|
|
2190
2219
|
return `function __watchEffect$${e}__() {
|
|
2191
2220
|
${n}};
|
|
2192
2221
|
`;
|
|
@@ -2212,7 +2241,7 @@ i.forBlock.app_debug_trace_v1 = function(t) {
|
|
|
2212
2241
|
return `__debugTraceV1__(${i.valueToCode(t, "OBJECT", _.NONE)});
|
|
2213
2242
|
`;
|
|
2214
2243
|
};
|
|
2215
|
-
const
|
|
2244
|
+
const ti = {
|
|
2216
2245
|
init: function() {
|
|
2217
2246
|
this.appendDummyInput().appendField("%{BKY_APP_V1_OPEN_CONFIRM_DLG_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_APP_V1_OPEN_CONFIRM_DLG_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_OPEN_CONFIRM_DLG_HELPURL}");
|
|
2218
2247
|
},
|
|
@@ -2241,7 +2270,7 @@ const Qs = {
|
|
|
2241
2270
|
]);
|
|
2242
2271
|
}
|
|
2243
2272
|
};
|
|
2244
|
-
A.open_confirm_dlg_v1 =
|
|
2273
|
+
A.open_confirm_dlg_v1 = ti;
|
|
2245
2274
|
i.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
2246
2275
|
const e = i.valueToCode(t, "TITLE", _.ATOMIC), n = i.valueToCode(t, "TEXT", _.ATOMIC), o = i.statementToCode(t, "HANDLE");
|
|
2247
2276
|
return `{
|
|
@@ -2249,7 +2278,7 @@ i.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
|
2249
2278
|
${o}}
|
|
2250
2279
|
`;
|
|
2251
2280
|
};
|
|
2252
|
-
const
|
|
2281
|
+
const ei = {
|
|
2253
2282
|
init: function() {
|
|
2254
2283
|
this.appendDummyInput().appendField("%{BKY_APP_V1_OPEN_PROMPT_DLG_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_APP_V1_OPEN_PROMPT_DLG_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_OPEN_PROMPT_DLG_HELPURL}");
|
|
2255
2284
|
},
|
|
@@ -2280,7 +2309,7 @@ const zs = {
|
|
|
2280
2309
|
]);
|
|
2281
2310
|
}
|
|
2282
2311
|
};
|
|
2283
|
-
A.open_prompt_dlg_v1 =
|
|
2312
|
+
A.open_prompt_dlg_v1 = ei;
|
|
2284
2313
|
i.forBlock.open_prompt_dlg_v1 = function(t) {
|
|
2285
2314
|
const e = i.valueToCode(t, "TITLE", _.ATOMIC), n = i.valueToCode(t, "LABEL", _.ATOMIC), o = i.valueToCode(t, "VALUE", _.ATOMIC), s = i.statementToCode(t, "HANDLE");
|
|
2286
2315
|
return `{
|
|
@@ -2320,7 +2349,7 @@ i.forBlock.popup_message_v1 = function(t) {
|
|
|
2320
2349
|
return `__messageV1__(${e}, ${n});
|
|
2321
2350
|
`;
|
|
2322
2351
|
};
|
|
2323
|
-
const
|
|
2352
|
+
const ni = {
|
|
2324
2353
|
init: function() {
|
|
2325
2354
|
this.node = {
|
|
2326
2355
|
id: "",
|
|
@@ -2366,10 +2395,10 @@ const Zs = {
|
|
|
2366
2395
|
return Se("callMethod");
|
|
2367
2396
|
},
|
|
2368
2397
|
genMethodOpts_: function() {
|
|
2369
|
-
return
|
|
2398
|
+
return Gs(this.node.id);
|
|
2370
2399
|
},
|
|
2371
2400
|
onchange: function(t) {
|
|
2372
|
-
if (t.type ===
|
|
2401
|
+
if (t.type === P.STATE_CHANGE)
|
|
2373
2402
|
this.checkWarning_();
|
|
2374
2403
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
2375
2404
|
const e = t;
|
|
@@ -2432,14 +2461,14 @@ const Zs = {
|
|
|
2432
2461
|
const e = this.method.inputs[t];
|
|
2433
2462
|
if (!e.type)
|
|
2434
2463
|
continue;
|
|
2435
|
-
const n =
|
|
2464
|
+
const n = vt(e.type);
|
|
2436
2465
|
this.getInput("INPUT" + t).setShadowDom(n);
|
|
2437
2466
|
}
|
|
2438
2467
|
},
|
|
2439
2468
|
ensureBlocks_: function() {
|
|
2440
2469
|
if (this.isInsertionMarker())
|
|
2441
2470
|
return;
|
|
2442
|
-
const { kind: t } = qt(this.method.id), e =
|
|
2471
|
+
const { kind: t } = qt(this.method.id), e = Zn(t), n = [];
|
|
2443
2472
|
if (this.method.outputs)
|
|
2444
2473
|
for (let o = 0; o < this.method.outputs.length; o++) {
|
|
2445
2474
|
const { key: s, name: a } = this.method.outputs[o];
|
|
@@ -2478,7 +2507,7 @@ const Zs = {
|
|
|
2478
2507
|
this.setWarningText(null);
|
|
2479
2508
|
}
|
|
2480
2509
|
};
|
|
2481
|
-
A.call_app_method_v1 =
|
|
2510
|
+
A.call_app_method_v1 = ni;
|
|
2482
2511
|
i.forBlock.call_app_method_v1 = function(t) {
|
|
2483
2512
|
const e = i.INDENT, n = i.quote_, o = t;
|
|
2484
2513
|
let s;
|
|
@@ -2541,7 +2570,7 @@ ${r}${c}}
|
|
|
2541
2570
|
return `__callMethodV1__(${n(o.method.id)}, ${s}, ${a});
|
|
2542
2571
|
`;
|
|
2543
2572
|
};
|
|
2544
|
-
const
|
|
2573
|
+
const oi = {
|
|
2545
2574
|
init: function() {
|
|
2546
2575
|
this.method = {
|
|
2547
2576
|
id: "",
|
|
@@ -2571,10 +2600,10 @@ const ti = {
|
|
|
2571
2600
|
}, 0);
|
|
2572
2601
|
},
|
|
2573
2602
|
genMethodOpts_: function() {
|
|
2574
|
-
return
|
|
2603
|
+
return lo();
|
|
2575
2604
|
},
|
|
2576
2605
|
onchange: function(t) {
|
|
2577
|
-
if (t.type ===
|
|
2606
|
+
if (t.type === P.STATE_CHANGE)
|
|
2578
2607
|
this.checkWarning_();
|
|
2579
2608
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
2580
2609
|
const e = t;
|
|
@@ -2601,7 +2630,7 @@ const ti = {
|
|
|
2601
2630
|
ensureBlocks_: function() {
|
|
2602
2631
|
if (this.isInsertionMarker() || !this.method.id)
|
|
2603
2632
|
return;
|
|
2604
|
-
const t =
|
|
2633
|
+
const t = Zn(this.method.kind), e = [];
|
|
2605
2634
|
if (this.method.inputs)
|
|
2606
2635
|
for (let n = 0; n < this.method.inputs.length; n++) {
|
|
2607
2636
|
const { key: o, name: s } = this.method.inputs[n];
|
|
@@ -2626,7 +2655,7 @@ const ti = {
|
|
|
2626
2655
|
this.setWarningText(null);
|
|
2627
2656
|
}
|
|
2628
2657
|
};
|
|
2629
|
-
A.implement_app_method_v1 =
|
|
2658
|
+
A.implement_app_method_v1 = oi;
|
|
2630
2659
|
i.forBlock.implement_app_method_v1 = function(t) {
|
|
2631
2660
|
const e = i.INDENT, n = i.quote_, o = t, { methodKey: s } = qt(o.method.id);
|
|
2632
2661
|
let a = "";
|
|
@@ -2641,7 +2670,7 @@ ${r}${e}return __outputs__;
|
|
|
2641
2670
|
}
|
|
2642
2671
|
`;
|
|
2643
2672
|
};
|
|
2644
|
-
const
|
|
2673
|
+
const si = {
|
|
2645
2674
|
init: function() {
|
|
2646
2675
|
this.method = {
|
|
2647
2676
|
id: "",
|
|
@@ -2687,13 +2716,13 @@ const ei = {
|
|
|
2687
2716
|
}, 0);
|
|
2688
2717
|
},
|
|
2689
2718
|
genMethodOpts_: function() {
|
|
2690
|
-
return
|
|
2719
|
+
return lo();
|
|
2691
2720
|
},
|
|
2692
2721
|
genOutputOpts_: function() {
|
|
2693
|
-
return
|
|
2722
|
+
return Ws(this.method.id);
|
|
2694
2723
|
},
|
|
2695
2724
|
onchange: function(t) {
|
|
2696
|
-
if (t.type ===
|
|
2725
|
+
if (t.type === P.STATE_CHANGE)
|
|
2697
2726
|
this.checkWarning_();
|
|
2698
2727
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
2699
2728
|
const e = t;
|
|
@@ -2726,13 +2755,13 @@ const ei = {
|
|
|
2726
2755
|
t.connection.setShadowDom(null);
|
|
2727
2756
|
const e = t.connection.targetBlock();
|
|
2728
2757
|
e && !e.isShadow() && e.dispose();
|
|
2729
|
-
const n =
|
|
2758
|
+
const n = Ot(this.output.type);
|
|
2730
2759
|
t.setCheck(n);
|
|
2731
2760
|
},
|
|
2732
2761
|
updateShadows_: function() {
|
|
2733
2762
|
if (this.isInsertionMarker())
|
|
2734
2763
|
return;
|
|
2735
|
-
const t =
|
|
2764
|
+
const t = vt(this.output.type);
|
|
2736
2765
|
this.getInput("VALUE").connection.setShadowDom(t);
|
|
2737
2766
|
},
|
|
2738
2767
|
checkWarning_: function() {
|
|
@@ -2761,7 +2790,7 @@ const ei = {
|
|
|
2761
2790
|
this.setWarningText(null);
|
|
2762
2791
|
}
|
|
2763
2792
|
};
|
|
2764
|
-
A.set_app_method_output_v1 =
|
|
2793
|
+
A.set_app_method_output_v1 = si;
|
|
2765
2794
|
i.forBlock.set_app_method_output_v1 = function(t) {
|
|
2766
2795
|
const e = i.quote_, n = t;
|
|
2767
2796
|
let o = i.valueToCode(n, "VALUE", _.ATOMIC);
|
|
@@ -2811,7 +2840,7 @@ g([
|
|
|
2811
2840
|
i.forBlock.app_env_is_v1 = function(t) {
|
|
2812
2841
|
return [`__getEnvV1__() === ${i.quote_(t.getFieldValue("ENV"))}`, _.ATOMIC];
|
|
2813
2842
|
};
|
|
2814
|
-
const
|
|
2843
|
+
const ii = {
|
|
2815
2844
|
init: function() {
|
|
2816
2845
|
this.app = {
|
|
2817
2846
|
id: "",
|
|
@@ -2824,7 +2853,7 @@ const ni = {
|
|
|
2824
2853
|
initData_: function() {
|
|
2825
2854
|
if (this.app.id)
|
|
2826
2855
|
return;
|
|
2827
|
-
const t =
|
|
2856
|
+
const t = co()?.[0];
|
|
2828
2857
|
if (!t)
|
|
2829
2858
|
return;
|
|
2830
2859
|
this.app.id = t.id, this.app.name = t.name;
|
|
@@ -2849,13 +2878,13 @@ const ni = {
|
|
|
2849
2878
|
}, 0);
|
|
2850
2879
|
},
|
|
2851
2880
|
genAppOpts_: function() {
|
|
2852
|
-
return
|
|
2881
|
+
return Fs();
|
|
2853
2882
|
},
|
|
2854
2883
|
genPageOpts_: function() {
|
|
2855
|
-
return
|
|
2884
|
+
return ws(this.app.id);
|
|
2856
2885
|
},
|
|
2857
2886
|
onchange: function(t) {
|
|
2858
|
-
if (t.type ===
|
|
2887
|
+
if (t.type === P.STATE_CHANGE)
|
|
2859
2888
|
this.checkWarning_();
|
|
2860
2889
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
2861
2890
|
const e = t;
|
|
@@ -2897,13 +2926,13 @@ const ni = {
|
|
|
2897
2926
|
e.name !== this.page.name && (this.page.name = e.name), this.setWarningText(null);
|
|
2898
2927
|
}
|
|
2899
2928
|
};
|
|
2900
|
-
A.navigate_to_v1 =
|
|
2929
|
+
A.navigate_to_v1 = ii;
|
|
2901
2930
|
i.forBlock.navigate_to_v1 = function(t) {
|
|
2902
2931
|
const e = t, n = i.quote_(e.app.id), o = i.quote_(e.page.id);
|
|
2903
2932
|
return `__navigateToV1__(${n}, ${o});
|
|
2904
2933
|
`;
|
|
2905
2934
|
};
|
|
2906
|
-
const
|
|
2935
|
+
const ai = {
|
|
2907
2936
|
init: function() {
|
|
2908
2937
|
this.comp = {
|
|
2909
2938
|
id: "",
|
|
@@ -2913,7 +2942,7 @@ const oi = {
|
|
|
2913
2942
|
initData_: function() {
|
|
2914
2943
|
if (this.comp.id)
|
|
2915
2944
|
return;
|
|
2916
|
-
const t =
|
|
2945
|
+
const t = ro()?.[0];
|
|
2917
2946
|
if (!t)
|
|
2918
2947
|
return;
|
|
2919
2948
|
this.comp.id = t.id, this.comp.name = t.name;
|
|
@@ -2931,10 +2960,10 @@ const oi = {
|
|
|
2931
2960
|
}, 0);
|
|
2932
2961
|
},
|
|
2933
2962
|
genCompOpts_: function() {
|
|
2934
|
-
return
|
|
2963
|
+
return Ks();
|
|
2935
2964
|
},
|
|
2936
2965
|
onchange: function(t) {
|
|
2937
|
-
if (t.type ===
|
|
2966
|
+
if (t.type === P.STATE_CHANGE)
|
|
2938
2967
|
this.checkWarning_();
|
|
2939
2968
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
2940
2969
|
const e = t;
|
|
@@ -2956,12 +2985,70 @@ const oi = {
|
|
|
2956
2985
|
t.name !== this.comp.name && (this.comp.name = t.name), this.setWarningText(null);
|
|
2957
2986
|
}
|
|
2958
2987
|
};
|
|
2959
|
-
A.select_comp_v1 =
|
|
2988
|
+
A.select_comp_v1 = ai;
|
|
2960
2989
|
i.forBlock.select_comp_v1 = function(t) {
|
|
2961
2990
|
const e = i.quote_, o = t.comp.id ?? "";
|
|
2962
2991
|
return [e(o), _.ATOMIC];
|
|
2963
2992
|
};
|
|
2964
|
-
const
|
|
2993
|
+
const ci = {
|
|
2994
|
+
init: function() {
|
|
2995
|
+
this.slot = {
|
|
2996
|
+
id: "",
|
|
2997
|
+
name: ""
|
|
2998
|
+
}, this.appendDummyInput().appendField("%{BKY_APP_V1_SELECT_SLOT_TITLE}").appendField(new v(() => this.genSlotOpts_()), "SLOT"), this.setOutput(!0, "Slot"), this.setStyle("property_blocks"), this.setTooltip("%{BKY_APP_V1_SELECT_SLOT_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_SELECT_SLOT_HELPURL}"), this.initData_();
|
|
2999
|
+
},
|
|
3000
|
+
initData_: function() {
|
|
3001
|
+
if (this.slot.id)
|
|
3002
|
+
return;
|
|
3003
|
+
const t = ho()?.[0];
|
|
3004
|
+
if (!t)
|
|
3005
|
+
return;
|
|
3006
|
+
this.slot.id = t.id, this.slot.name = t.name;
|
|
3007
|
+
const e = this.getField("SLOT");
|
|
3008
|
+
e.getOptions(!1), e.setValue(this.slot.id);
|
|
3009
|
+
},
|
|
3010
|
+
saveExtraState: function() {
|
|
3011
|
+
return {
|
|
3012
|
+
slot: this.slot
|
|
3013
|
+
};
|
|
3014
|
+
},
|
|
3015
|
+
loadExtraState: function(t) {
|
|
3016
|
+
this.slot.id = t.slot?.id ?? "", this.slot.name = t.slot?.name ?? "", setTimeout(() => {
|
|
3017
|
+
this.checkWarning_();
|
|
3018
|
+
}, 0);
|
|
3019
|
+
},
|
|
3020
|
+
genSlotOpts_: function() {
|
|
3021
|
+
return Qs();
|
|
3022
|
+
},
|
|
3023
|
+
onchange: function(t) {
|
|
3024
|
+
if (t.type === P.STATE_CHANGE)
|
|
3025
|
+
this.checkWarning_();
|
|
3026
|
+
else if (t.type === O.BLOCK_CHANGE) {
|
|
3027
|
+
const e = t;
|
|
3028
|
+
e.blockId === this.id && (e.element === "field" && e.name === "SLOT" && this.onSlotChange_(e.newValue), setTimeout(() => {
|
|
3029
|
+
this.checkWarning_();
|
|
3030
|
+
}, 0));
|
|
3031
|
+
}
|
|
3032
|
+
},
|
|
3033
|
+
onSlotChange_: function(t) {
|
|
3034
|
+
const e = Un(t);
|
|
3035
|
+
e ? (this.slot.id = e.id, this.slot.name = e.name) : (this.slot.id = "", this.slot.name = "");
|
|
3036
|
+
},
|
|
3037
|
+
checkWarning_: function() {
|
|
3038
|
+
const t = Un(this.slot.id);
|
|
3039
|
+
if (!t) {
|
|
3040
|
+
this.setWarningText(m("WARN_SLOT_NOT_FOUND"));
|
|
3041
|
+
return;
|
|
3042
|
+
}
|
|
3043
|
+
t.name !== this.slot.name && (this.slot.name = t.name), this.setWarningText(null);
|
|
3044
|
+
}
|
|
3045
|
+
};
|
|
3046
|
+
A.select_slot_v1 = ci;
|
|
3047
|
+
i.forBlock.select_slot_v1 = function(t) {
|
|
3048
|
+
const e = i.quote_, o = t.slot.id ?? "";
|
|
3049
|
+
return [e(o), _.ATOMIC];
|
|
3050
|
+
};
|
|
3051
|
+
const ri = {
|
|
2965
3052
|
init: function() {
|
|
2966
3053
|
this.node = {
|
|
2967
3054
|
id: "",
|
|
@@ -3007,10 +3094,10 @@ const si = {
|
|
|
3007
3094
|
return Se("getProperty");
|
|
3008
3095
|
},
|
|
3009
3096
|
genPropertyOpts_: function() {
|
|
3010
|
-
return
|
|
3097
|
+
return po(this.node.id, "read");
|
|
3011
3098
|
},
|
|
3012
3099
|
onchange: function(t) {
|
|
3013
|
-
if (t.type ===
|
|
3100
|
+
if (t.type === P.STATE_CHANGE)
|
|
3014
3101
|
this.checkWarning_();
|
|
3015
3102
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
3016
3103
|
const e = t;
|
|
@@ -3028,14 +3115,14 @@ const si = {
|
|
|
3028
3115
|
const n = this.node.key !== e.key;
|
|
3029
3116
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
3030
3117
|
const o = this.getField("PROPERTY");
|
|
3031
|
-
if (o.getOptions(!1), n || !
|
|
3118
|
+
if (o.getOptions(!1), n || !Nt(this.property.id)) {
|
|
3032
3119
|
const s = Wt(this.node.id, "read")?.[0];
|
|
3033
3120
|
o.setValue(s?.id ?? "");
|
|
3034
3121
|
}
|
|
3035
3122
|
this.onPropChange_(o.getValue());
|
|
3036
3123
|
},
|
|
3037
3124
|
onPropChange_: function(t) {
|
|
3038
|
-
const e =
|
|
3125
|
+
const e = Nt(t);
|
|
3039
3126
|
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 = []);
|
|
3040
3127
|
},
|
|
3041
3128
|
checkWarning_: function() {
|
|
@@ -3049,7 +3136,7 @@ const si = {
|
|
|
3049
3136
|
return;
|
|
3050
3137
|
}
|
|
3051
3138
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
3052
|
-
const e =
|
|
3139
|
+
const e = Nt(this.property.id);
|
|
3053
3140
|
if (!e) {
|
|
3054
3141
|
this.setWarningText(m("WARN_PROPERTY_NOT_FOUND"));
|
|
3055
3142
|
return;
|
|
@@ -3061,12 +3148,12 @@ const si = {
|
|
|
3061
3148
|
w(e.names, this.property.names) || (this.property.names = e.names), this.setWarningText(null);
|
|
3062
3149
|
}
|
|
3063
3150
|
};
|
|
3064
|
-
A.get_app_property_v1 =
|
|
3151
|
+
A.get_app_property_v1 = ri;
|
|
3065
3152
|
i.forBlock.get_app_property_v1 = function(t) {
|
|
3066
3153
|
const e = i.quote_;
|
|
3067
3154
|
return [`__getPropertyV1__(${e(t.property.id)}, ${e("")})`, _.ATOMIC];
|
|
3068
3155
|
};
|
|
3069
|
-
const
|
|
3156
|
+
const ui = {
|
|
3070
3157
|
init: function() {
|
|
3071
3158
|
this.node = {
|
|
3072
3159
|
id: "",
|
|
@@ -3112,10 +3199,10 @@ const ii = {
|
|
|
3112
3199
|
return Se("setProperty");
|
|
3113
3200
|
},
|
|
3114
3201
|
genPropertyOpts_: function() {
|
|
3115
|
-
return
|
|
3202
|
+
return po(this.node.id, "write");
|
|
3116
3203
|
},
|
|
3117
3204
|
onchange: function(t) {
|
|
3118
|
-
if (t.type ===
|
|
3205
|
+
if (t.type === P.STATE_CHANGE)
|
|
3119
3206
|
this.checkWarning_();
|
|
3120
3207
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
3121
3208
|
const e = t;
|
|
@@ -3133,29 +3220,29 @@ const ii = {
|
|
|
3133
3220
|
const n = this.node.key !== e.key;
|
|
3134
3221
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
3135
3222
|
const o = this.getField("PROPERTY");
|
|
3136
|
-
if (o.getOptions(!1), n || !
|
|
3223
|
+
if (o.getOptions(!1), n || !Nt(this.property.id)) {
|
|
3137
3224
|
const s = Wt(this.node.id, "write")?.[0];
|
|
3138
3225
|
o.setValue(s?.id ?? "");
|
|
3139
3226
|
}
|
|
3140
3227
|
this.onPropChange_(o.getValue());
|
|
3141
3228
|
},
|
|
3142
3229
|
onPropChange_: function(t) {
|
|
3143
|
-
const e =
|
|
3230
|
+
const e = Nt(t);
|
|
3144
3231
|
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.updateShadow_();
|
|
3145
3232
|
},
|
|
3146
3233
|
updateShadow_: function() {
|
|
3147
3234
|
if (this.isInsertionMarker())
|
|
3148
3235
|
return;
|
|
3149
|
-
const t =
|
|
3236
|
+
const t = Nt(this.property.id);
|
|
3150
3237
|
if (!t)
|
|
3151
3238
|
return;
|
|
3152
3239
|
this.getInput("VALUE").setShadowDom(null);
|
|
3153
3240
|
const e = this.getInput("VALUE").connection.targetBlock();
|
|
3154
3241
|
if (e && e.dispose(), t.meta.element) {
|
|
3155
|
-
const n =
|
|
3242
|
+
const n = ys(t.meta.raw), o = Bs(t.meta.raw);
|
|
3156
3243
|
this.getInput("VALUE").setCheck(n).setShadowDom(o);
|
|
3157
3244
|
} else {
|
|
3158
|
-
const n =
|
|
3245
|
+
const n = Ot(t.meta.raw.type), o = vt(t.meta.raw.type);
|
|
3159
3246
|
this.getInput("VALUE").setCheck(n).setShadowDom(o);
|
|
3160
3247
|
}
|
|
3161
3248
|
},
|
|
@@ -3170,7 +3257,7 @@ const ii = {
|
|
|
3170
3257
|
return;
|
|
3171
3258
|
}
|
|
3172
3259
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
3173
|
-
const e =
|
|
3260
|
+
const e = Nt(this.property.id);
|
|
3174
3261
|
if (!e) {
|
|
3175
3262
|
this.setWarningText(m("WARN_PROPERTY_NOT_FOUND"));
|
|
3176
3263
|
return;
|
|
@@ -3182,13 +3269,13 @@ const ii = {
|
|
|
3182
3269
|
w(e.names, this.property.names) || (this.property.names = e.names), this.setWarningText(null);
|
|
3183
3270
|
}
|
|
3184
3271
|
};
|
|
3185
|
-
A.set_app_property_v1 =
|
|
3272
|
+
A.set_app_property_v1 = ui;
|
|
3186
3273
|
i.forBlock.set_app_property_v1 = function(t) {
|
|
3187
3274
|
const e = i.quote_, n = t, o = "", s = i.valueToCode(n, "VALUE", _.NONE);
|
|
3188
3275
|
return `__setPropertyV1__(${e(n.property.id)}, ${e(o)}, ${s});
|
|
3189
3276
|
`;
|
|
3190
3277
|
};
|
|
3191
|
-
const
|
|
3278
|
+
const li = {
|
|
3192
3279
|
init: function() {
|
|
3193
3280
|
this.state = {
|
|
3194
3281
|
id: "",
|
|
@@ -3220,10 +3307,10 @@ const ai = {
|
|
|
3220
3307
|
}, 0);
|
|
3221
3308
|
},
|
|
3222
3309
|
genStateOpts_: function() {
|
|
3223
|
-
return
|
|
3310
|
+
return fo();
|
|
3224
3311
|
},
|
|
3225
3312
|
onchange: function(t) {
|
|
3226
|
-
if (t.type ===
|
|
3313
|
+
if (t.type === P.STATE_CHANGE)
|
|
3227
3314
|
this.checkWarning_();
|
|
3228
3315
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
3229
3316
|
const e = t;
|
|
@@ -3247,12 +3334,12 @@ const ai = {
|
|
|
3247
3334
|
this.setWarningText(null);
|
|
3248
3335
|
}
|
|
3249
3336
|
};
|
|
3250
|
-
A.get_app_state_v1 =
|
|
3337
|
+
A.get_app_state_v1 = li;
|
|
3251
3338
|
i.forBlock.get_app_state_v1 = function(t) {
|
|
3252
3339
|
const e = i.quote_;
|
|
3253
3340
|
return [`__getStateV1__(${e(t.state.id)})`, _.ATOMIC];
|
|
3254
3341
|
};
|
|
3255
|
-
const
|
|
3342
|
+
const _i = {
|
|
3256
3343
|
init: function() {
|
|
3257
3344
|
this.state = {
|
|
3258
3345
|
id: "",
|
|
@@ -3282,7 +3369,7 @@ const ci = {
|
|
|
3282
3369
|
this.state.id = t.state?.id ?? "", this.state.name = t.state?.name ?? "", this.state.type = t.state?.type ?? "string";
|
|
3283
3370
|
},
|
|
3284
3371
|
genStateOpts_: function() {
|
|
3285
|
-
return
|
|
3372
|
+
return fo();
|
|
3286
3373
|
},
|
|
3287
3374
|
onchange: function(t) {
|
|
3288
3375
|
if (t.type === O.BLOCK_CHANGE) {
|
|
@@ -3300,7 +3387,7 @@ const ci = {
|
|
|
3300
3387
|
this.getInput("VALUE").setShadowDom(null);
|
|
3301
3388
|
const t = this.getInput("VALUE").connection.targetBlock();
|
|
3302
3389
|
t && t.dispose();
|
|
3303
|
-
const e =
|
|
3390
|
+
const e = Ot(this.state.type), n = vt(this.state.type);
|
|
3304
3391
|
this.getInput("VALUE").setCheck(e).setShadowDom(n);
|
|
3305
3392
|
},
|
|
3306
3393
|
checkWarning_: function() {
|
|
@@ -3316,7 +3403,7 @@ const ci = {
|
|
|
3316
3403
|
this.setWarningText(null);
|
|
3317
3404
|
}
|
|
3318
3405
|
};
|
|
3319
|
-
A.set_app_state_v1 =
|
|
3406
|
+
A.set_app_state_v1 = _i;
|
|
3320
3407
|
i.forBlock.set_app_state_v1 = function(t) {
|
|
3321
3408
|
const e = i.quote_, n = t, o = i.valueToCode(n, "VALUE", _.NONE);
|
|
3322
3409
|
return `__setStateV1__(${e(n.state.id)}, ${o});
|
|
@@ -4025,7 +4112,7 @@ function ${i.FUNCTION_NAME_PLACEHOLDER_}(r, g, b) {
|
|
|
4025
4112
|
`
|
|
4026
4113
|
)}(${e}, ${n}, ${o})`, _.FUNCTION_CALL];
|
|
4027
4114
|
};
|
|
4028
|
-
const
|
|
4115
|
+
const pi = N.xml, di = [
|
|
4029
4116
|
{
|
|
4030
4117
|
type: "add_data_v1",
|
|
4031
4118
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
@@ -4087,16 +4174,16 @@ const ri = N.xml, ui = [
|
|
|
4087
4174
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
4088
4175
|
}
|
|
4089
4176
|
];
|
|
4090
|
-
function
|
|
4091
|
-
const n =
|
|
4177
|
+
function hi(t, e) {
|
|
4178
|
+
const n = di.find((o) => o.type === t);
|
|
4092
4179
|
return n ? !!(n.prefixInputs?.some((o) => e.startsWith(o)) || n.inputs?.some((o) => o === e)) : !1;
|
|
4093
4180
|
}
|
|
4094
|
-
const
|
|
4181
|
+
const fi = {
|
|
4095
4182
|
init: function() {
|
|
4096
4183
|
this.key = "", this.name = "", this.locale = !1, this.appendDummyInput().appendField("", "LABEL"), this.setOutput(!0), this.setColour(220);
|
|
4097
4184
|
},
|
|
4098
4185
|
mutationToDom: function() {
|
|
4099
|
-
const t =
|
|
4186
|
+
const t = pi.createElement("mutation");
|
|
4100
4187
|
return t.setAttribute("key", this.key), t.setAttribute("name", this.name), t.setAttribute("locale", this.locale ? "TRUE" : "FALSE"), t;
|
|
4101
4188
|
},
|
|
4102
4189
|
domToMutation: function(t) {
|
|
@@ -4125,7 +4212,7 @@ const _i = {
|
|
|
4125
4212
|
},
|
|
4126
4213
|
tryDuplicate_: function(t) {
|
|
4127
4214
|
const e = this.workspace.getBlockById(t.oldParentId);
|
|
4128
|
-
if (e &&
|
|
4215
|
+
if (e && hi(e.type, t.oldInputName))
|
|
4129
4216
|
try {
|
|
4130
4217
|
O.disable();
|
|
4131
4218
|
const n = e.getInput(t.oldInputName)?.connection;
|
|
@@ -4144,21 +4231,21 @@ const _i = {
|
|
|
4144
4231
|
},
|
|
4145
4232
|
updateShape_: function() {
|
|
4146
4233
|
if (this.locale) {
|
|
4147
|
-
const { i18n: t } =
|
|
4234
|
+
const { i18n: t } = yt;
|
|
4148
4235
|
this.setFieldValue(t.global.t(this.name), "LABEL");
|
|
4149
4236
|
} else
|
|
4150
4237
|
this.setFieldValue(this.name, "LABEL");
|
|
4151
4238
|
}
|
|
4152
4239
|
};
|
|
4153
|
-
A.parameter_v1 =
|
|
4240
|
+
A.parameter_v1 = fi;
|
|
4154
4241
|
i.forBlock.parameter_v1 = function(t) {
|
|
4155
4242
|
return [t.key, _.ATOMIC];
|
|
4156
4243
|
};
|
|
4157
|
-
const
|
|
4244
|
+
const mi = {
|
|
4158
4245
|
init: function() {
|
|
4159
4246
|
}
|
|
4160
4247
|
};
|
|
4161
|
-
A.on_flow_state_event_v1 =
|
|
4248
|
+
A.on_flow_state_event_v1 = mi;
|
|
4162
4249
|
i.forBlock.on_flow_state_event_v1 = function() {
|
|
4163
4250
|
return `__onFlowStateEventV1__();
|
|
4164
4251
|
`;
|
|
@@ -4172,7 +4259,7 @@ function Dt(t, e) {
|
|
|
4172
4259
|
if (n)
|
|
4173
4260
|
return n.funcs.find((o) => o.id === e);
|
|
4174
4261
|
}
|
|
4175
|
-
function
|
|
4262
|
+
function mo(t) {
|
|
4176
4263
|
const e = [];
|
|
4177
4264
|
return jt(t).forEach(({ id: o, name: s }) => {
|
|
4178
4265
|
e.push([s, o]);
|
|
@@ -4181,11 +4268,11 @@ function ho(t) {
|
|
|
4181
4268
|
function an() {
|
|
4182
4269
|
return I.compute.activeFunc;
|
|
4183
4270
|
}
|
|
4184
|
-
function
|
|
4271
|
+
function Vn(t) {
|
|
4185
4272
|
const { activeFunc: e } = I.compute;
|
|
4186
4273
|
return e.outputs?.find((n) => n.id === t);
|
|
4187
4274
|
}
|
|
4188
|
-
function
|
|
4275
|
+
function Ti() {
|
|
4189
4276
|
const { activeFunc: t } = I.compute, e = [];
|
|
4190
4277
|
return t.outputs?.forEach(({ id: n, name: o }) => {
|
|
4191
4278
|
e.push([o, n]);
|
|
@@ -4200,13 +4287,13 @@ function Zt(t) {
|
|
|
4200
4287
|
function pe(t) {
|
|
4201
4288
|
return I.compute.spaces.find((e) => e.id === t);
|
|
4202
4289
|
}
|
|
4203
|
-
function
|
|
4290
|
+
function To(t) {
|
|
4204
4291
|
const e = [];
|
|
4205
4292
|
return Zt(t).forEach(({ id: o, name: s }) => {
|
|
4206
4293
|
e.push([s, o]);
|
|
4207
4294
|
}), B(e);
|
|
4208
4295
|
}
|
|
4209
|
-
const
|
|
4296
|
+
const Ei = {
|
|
4210
4297
|
init: function() {
|
|
4211
4298
|
this.space = {
|
|
4212
4299
|
id: "",
|
|
@@ -4249,13 +4336,13 @@ const hi = {
|
|
|
4249
4336
|
}, 0);
|
|
4250
4337
|
},
|
|
4251
4338
|
genSpaceOpts_: function() {
|
|
4252
|
-
return
|
|
4339
|
+
return To("func");
|
|
4253
4340
|
},
|
|
4254
4341
|
genFuncOpts_: function() {
|
|
4255
|
-
return
|
|
4342
|
+
return mo(this.space.id);
|
|
4256
4343
|
},
|
|
4257
4344
|
onchange: function(t) {
|
|
4258
|
-
if (t.type ===
|
|
4345
|
+
if (t.type === P.STATE_CHANGE)
|
|
4259
4346
|
this.checkWarning_();
|
|
4260
4347
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
4261
4348
|
const e = t;
|
|
@@ -4309,14 +4396,14 @@ const hi = {
|
|
|
4309
4396
|
},
|
|
4310
4397
|
updateCheck_: function() {
|
|
4311
4398
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
4312
|
-
const { type: e } = this.func.inputs[t], n =
|
|
4399
|
+
const { type: e } = this.func.inputs[t], n = Ot(e);
|
|
4313
4400
|
this.getInput("INPUT" + t).connection.setCheck(n);
|
|
4314
4401
|
}
|
|
4315
4402
|
},
|
|
4316
4403
|
updateShadow_: function() {
|
|
4317
4404
|
if (!this.isInsertionMarker())
|
|
4318
4405
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
4319
|
-
const e = this.func.inputs[t], n =
|
|
4406
|
+
const e = this.func.inputs[t], n = vt(e.type);
|
|
4320
4407
|
this.getInput("INPUT" + t).setShadowDom(n);
|
|
4321
4408
|
}
|
|
4322
4409
|
},
|
|
@@ -4353,7 +4440,7 @@ const hi = {
|
|
|
4353
4440
|
this.setWarningText(null);
|
|
4354
4441
|
}
|
|
4355
4442
|
};
|
|
4356
|
-
A.call_func_v1 =
|
|
4443
|
+
A.call_func_v1 = Ei;
|
|
4357
4444
|
i.forBlock.call_func_v1 = function(t) {
|
|
4358
4445
|
const e = i.INDENT, n = i.quote_, o = t, s = n(o.space.id), a = n(o.func.id);
|
|
4359
4446
|
let r = "";
|
|
@@ -4380,7 +4467,7 @@ ${e}var __result__ = __callFuncV1__(${s},${a},__inputs__,__getEnvV1__(),${c});
|
|
|
4380
4467
|
${l}${d}}
|
|
4381
4468
|
`;
|
|
4382
4469
|
};
|
|
4383
|
-
const
|
|
4470
|
+
const gi = {
|
|
4384
4471
|
init: function() {
|
|
4385
4472
|
this.space = {
|
|
4386
4473
|
id: "",
|
|
@@ -4423,13 +4510,13 @@ const fi = {
|
|
|
4423
4510
|
}, 0);
|
|
4424
4511
|
},
|
|
4425
4512
|
genSpaceOpts_: function() {
|
|
4426
|
-
return
|
|
4513
|
+
return To("func");
|
|
4427
4514
|
},
|
|
4428
4515
|
genFuncOpts_: function() {
|
|
4429
|
-
return
|
|
4516
|
+
return mo(this.space.id);
|
|
4430
4517
|
},
|
|
4431
4518
|
onchange: function(t) {
|
|
4432
|
-
if (t.type ===
|
|
4519
|
+
if (t.type === P.STATE_CHANGE)
|
|
4433
4520
|
this.checkWarning_();
|
|
4434
4521
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
4435
4522
|
const e = t;
|
|
@@ -4483,14 +4570,14 @@ const fi = {
|
|
|
4483
4570
|
},
|
|
4484
4571
|
updateCheck_: function() {
|
|
4485
4572
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
4486
|
-
const { type: e } = this.func.inputs[t], n =
|
|
4573
|
+
const { type: e } = this.func.inputs[t], n = Ot(e);
|
|
4487
4574
|
this.getInput("INPUT" + t).connection.setCheck(n);
|
|
4488
4575
|
}
|
|
4489
4576
|
},
|
|
4490
4577
|
updateShadow_: function() {
|
|
4491
4578
|
if (!this.isInsertionMarker())
|
|
4492
4579
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
4493
|
-
const e = this.func.inputs[t], n =
|
|
4580
|
+
const e = this.func.inputs[t], n = vt(e.type);
|
|
4494
4581
|
this.getInput("INPUT" + t).setShadowDom(n);
|
|
4495
4582
|
}
|
|
4496
4583
|
},
|
|
@@ -4527,7 +4614,7 @@ const fi = {
|
|
|
4527
4614
|
this.setWarningText(null);
|
|
4528
4615
|
}
|
|
4529
4616
|
};
|
|
4530
|
-
A.call_func_internal_v1 =
|
|
4617
|
+
A.call_func_internal_v1 = gi;
|
|
4531
4618
|
i.forBlock.call_func_internal_v1 = function(t) {
|
|
4532
4619
|
const e = i.INDENT, n = i.quote_, o = t, s = n(o.space.id), a = n(o.func.id);
|
|
4533
4620
|
let r = `${e}var __inputs__ = {
|
|
@@ -4557,7 +4644,7 @@ ${e}}
|
|
|
4557
4644
|
${l}${d}}
|
|
4558
4645
|
`;
|
|
4559
4646
|
};
|
|
4560
|
-
const
|
|
4647
|
+
const Ai = {
|
|
4561
4648
|
init: function() {
|
|
4562
4649
|
this.func = {
|
|
4563
4650
|
id: ""
|
|
@@ -4613,7 +4700,7 @@ const mi = {
|
|
|
4613
4700
|
this.setWarningText(null);
|
|
4614
4701
|
}
|
|
4615
4702
|
};
|
|
4616
|
-
A.func_entry_v1 =
|
|
4703
|
+
A.func_entry_v1 = Ai;
|
|
4617
4704
|
i.forBlock.func_entry_v1 = function(t) {
|
|
4618
4705
|
const e = t, n = i.statementToCode(e, "HANDLE"), o = [];
|
|
4619
4706
|
if (e.func.inputs)
|
|
@@ -4624,7 +4711,7 @@ i.forBlock.func_entry_v1 = function(t) {
|
|
|
4624
4711
|
return `function __funcEntryV1__(${o.join(", ")}) {
|
|
4625
4712
|
${n}}`;
|
|
4626
4713
|
};
|
|
4627
|
-
const
|
|
4714
|
+
const Ii = {
|
|
4628
4715
|
init: function() {
|
|
4629
4716
|
this.output = {
|
|
4630
4717
|
id: "",
|
|
@@ -4652,10 +4739,10 @@ const Ti = {
|
|
|
4652
4739
|
}, 0);
|
|
4653
4740
|
},
|
|
4654
4741
|
genOutputOpts_: function() {
|
|
4655
|
-
return
|
|
4742
|
+
return Ti();
|
|
4656
4743
|
},
|
|
4657
4744
|
onchange: function(t) {
|
|
4658
|
-
if (t.type ===
|
|
4745
|
+
if (t.type === P.STATE_CHANGE)
|
|
4659
4746
|
this.checkWarning_();
|
|
4660
4747
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
4661
4748
|
const e = t;
|
|
@@ -4665,7 +4752,7 @@ const Ti = {
|
|
|
4665
4752
|
}
|
|
4666
4753
|
},
|
|
4667
4754
|
onOutputChange_: function(t) {
|
|
4668
|
-
const e =
|
|
4755
|
+
const e = Vn(t);
|
|
4669
4756
|
if (!e) {
|
|
4670
4757
|
console.assert(!1);
|
|
4671
4758
|
return;
|
|
@@ -4677,17 +4764,17 @@ const Ti = {
|
|
|
4677
4764
|
t.connection.setShadowDom(null);
|
|
4678
4765
|
const e = t.connection.targetBlock();
|
|
4679
4766
|
e && !e.isShadow() && e.dispose();
|
|
4680
|
-
const n =
|
|
4767
|
+
const n = Ot(this.output.type);
|
|
4681
4768
|
t.setCheck(n);
|
|
4682
4769
|
},
|
|
4683
4770
|
updateShadows_: function() {
|
|
4684
4771
|
if (this.isInsertionMarker())
|
|
4685
4772
|
return;
|
|
4686
|
-
const t =
|
|
4773
|
+
const t = vt(this.output.type);
|
|
4687
4774
|
this.getInput("VALUE").setShadowDom(t);
|
|
4688
4775
|
},
|
|
4689
4776
|
checkWarning_: function() {
|
|
4690
|
-
const t =
|
|
4777
|
+
const t = Vn(this.output.id);
|
|
4691
4778
|
if (!t) {
|
|
4692
4779
|
this.setWarningText(m("WARN_FUNC_HAS_CHANGED"));
|
|
4693
4780
|
return;
|
|
@@ -4699,7 +4786,7 @@ const Ti = {
|
|
|
4699
4786
|
this.setWarningText(null);
|
|
4700
4787
|
}
|
|
4701
4788
|
};
|
|
4702
|
-
A.set_func_output_v1 =
|
|
4789
|
+
A.set_func_output_v1 = Ii;
|
|
4703
4790
|
i.forBlock.set_func_output_v1 = function(t) {
|
|
4704
4791
|
const e = i.quote_, n = t, { id: o, type: s } = n.output;
|
|
4705
4792
|
let a = i.valueToCode(n, "VALUE", _.ATOMIC);
|
|
@@ -4817,13 +4904,13 @@ function Ge(t, e, n) {
|
|
|
4817
4904
|
if (a)
|
|
4818
4905
|
return a.columns.find((r) => r.id === n);
|
|
4819
4906
|
}
|
|
4820
|
-
function
|
|
4907
|
+
function yi(t, e) {
|
|
4821
4908
|
const n = [];
|
|
4822
4909
|
return de(t, e).forEach(({ id: s, name: a }) => {
|
|
4823
4910
|
n.push([a, s]);
|
|
4824
4911
|
}), B(n);
|
|
4825
4912
|
}
|
|
4826
|
-
function
|
|
4913
|
+
function Oi(t) {
|
|
4827
4914
|
const e = t.getInput("TABLE").connection;
|
|
4828
4915
|
if (e.targetBlock())
|
|
4829
4916
|
return;
|
|
@@ -4857,7 +4944,7 @@ function gi(t) {
|
|
|
4857
4944
|
}, r = J.blocks.append(a, t.workspace);
|
|
4858
4945
|
e.connect(r.outputConnection);
|
|
4859
4946
|
}
|
|
4860
|
-
function
|
|
4947
|
+
function vi(t) {
|
|
4861
4948
|
const e = t.getInput("HANDLE").connection;
|
|
4862
4949
|
if (e.targetBlock())
|
|
4863
4950
|
return;
|
|
@@ -4881,7 +4968,7 @@ function Ai(t) {
|
|
|
4881
4968
|
}, o = J.blocks.append(n, t.workspace);
|
|
4882
4969
|
e.connect(o.previousConnection);
|
|
4883
4970
|
}
|
|
4884
|
-
const
|
|
4971
|
+
const Ci = {
|
|
4885
4972
|
init: function() {
|
|
4886
4973
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_ADD_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_ADD_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_ADD_DATA_HELPURL}");
|
|
4887
4974
|
},
|
|
@@ -4897,14 +4984,14 @@ const Ii = {
|
|
|
4897
4984
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("DATA") || (this.appendValueInput("DATA"), this.moveInputBefore("DATA", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(S.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "SUCCESS"));
|
|
4898
4985
|
},
|
|
4899
4986
|
ensureBlocks_: function() {
|
|
4900
|
-
this.isInsertionMarker() || (
|
|
4987
|
+
this.isInsertionMarker() || (Oi(this), j(this, [
|
|
4901
4988
|
["SUCCESS", "__success__", "x-runtime-lib.success", !0],
|
|
4902
4989
|
["MESSAGE", "__message__", "x-runtime-lib.message", !0],
|
|
4903
4990
|
["DATA", "__data__", "x-runtime-lib.data", !0]
|
|
4904
|
-
]),
|
|
4991
|
+
]), vi(this));
|
|
4905
4992
|
}
|
|
4906
4993
|
};
|
|
4907
|
-
A.add_data_v1 =
|
|
4994
|
+
A.add_data_v1 = Ci;
|
|
4908
4995
|
i.forBlock.add_data_v1 = function(t) {
|
|
4909
4996
|
const e = i.INDENT, n = i.valueToCode(t, "TABLE", _.ATOMIC) || "null", o = i.statementToCode(t, "HANDLE");
|
|
4910
4997
|
return `{
|
|
@@ -4920,7 +5007,7 @@ ${e}}
|
|
|
4920
5007
|
${o}}
|
|
4921
5008
|
`;
|
|
4922
5009
|
};
|
|
4923
|
-
const
|
|
5010
|
+
const ki = {
|
|
4924
5011
|
init: function() {
|
|
4925
5012
|
this.space = {
|
|
4926
5013
|
id: "",
|
|
@@ -4989,10 +5076,10 @@ const yi = {
|
|
|
4989
5076
|
return Le(this.space.id);
|
|
4990
5077
|
},
|
|
4991
5078
|
genColumnOpts_: function() {
|
|
4992
|
-
return
|
|
5079
|
+
return yi(this.space.id, this.table.id);
|
|
4993
5080
|
},
|
|
4994
5081
|
onchange: function(t) {
|
|
4995
|
-
if (t.type ===
|
|
5082
|
+
if (t.type === P.STATE_CHANGE)
|
|
4996
5083
|
this.checkWarning_();
|
|
4997
5084
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
4998
5085
|
const e = t;
|
|
@@ -5049,7 +5136,7 @@ const yi = {
|
|
|
5049
5136
|
o && (e.setCheck(null), e.connect(o.outputConnection));
|
|
5050
5137
|
},
|
|
5051
5138
|
updateCheck_: function() {
|
|
5052
|
-
const t =
|
|
5139
|
+
const t = ao(this.column.type);
|
|
5053
5140
|
this.getInput("VALUE").connection.setCheck(t);
|
|
5054
5141
|
},
|
|
5055
5142
|
checkWarning_: function() {
|
|
@@ -5081,7 +5168,7 @@ const yi = {
|
|
|
5081
5168
|
this.setWarningText(null);
|
|
5082
5169
|
}
|
|
5083
5170
|
};
|
|
5084
|
-
A.cond_atomic_v1 =
|
|
5171
|
+
A.cond_atomic_v1 = ki;
|
|
5085
5172
|
i.forBlock.cond_atomic_v1 = function(t) {
|
|
5086
5173
|
const e = i.quote_, n = t, o = n.column.name, s = i.valueToCode(n, "VALUE", _.ATOMIC) || null, r = {
|
|
5087
5174
|
EQ: "=",
|
|
@@ -5093,19 +5180,19 @@ i.forBlock.cond_atomic_v1 = function(t) {
|
|
|
5093
5180
|
}[n.getFieldValue("OP")];
|
|
5094
5181
|
return [`{type:'ATOMIC',key:${e(o)},value:${s},operator:${e(r)}}`, _.ATOMIC];
|
|
5095
5182
|
};
|
|
5096
|
-
const
|
|
5183
|
+
const Si = {
|
|
5097
5184
|
init: function() {
|
|
5098
5185
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
5099
5186
|
}
|
|
5100
5187
|
};
|
|
5101
|
-
A.cond_logic_container_v1 =
|
|
5102
|
-
const
|
|
5188
|
+
A.cond_logic_container_v1 = Si;
|
|
5189
|
+
const Ni = {
|
|
5103
5190
|
init: function() {
|
|
5104
5191
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
5105
5192
|
}
|
|
5106
5193
|
};
|
|
5107
|
-
A.cond_logic_item_v1 =
|
|
5108
|
-
const
|
|
5194
|
+
A.cond_logic_item_v1 = Ni;
|
|
5195
|
+
const Li = {
|
|
5109
5196
|
init: function() {
|
|
5110
5197
|
this.itemCount_ = 1, this.appendValueInput("VALUE").setCheck("Condition").appendField(
|
|
5111
5198
|
new v([
|
|
@@ -5179,7 +5266,7 @@ const Ci = {
|
|
|
5179
5266
|
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setCheck("Condition");
|
|
5180
5267
|
}
|
|
5181
5268
|
};
|
|
5182
|
-
A.cond_logic_v1 =
|
|
5269
|
+
A.cond_logic_v1 = Li;
|
|
5183
5270
|
i.forBlock.cond_logic_v1 = function(t) {
|
|
5184
5271
|
const e = i.quote_, n = t, o = n.getFieldValue("TYPE"), s = [], a = i.valueToCode(n, "VALUE", _.ATOMIC) || null;
|
|
5185
5272
|
s.push(a);
|
|
@@ -5189,7 +5276,7 @@ i.forBlock.cond_logic_v1 = function(t) {
|
|
|
5189
5276
|
}
|
|
5190
5277
|
return [`{type:${e(o)},entries:[${s}]}`, _.ATOMIC];
|
|
5191
5278
|
};
|
|
5192
|
-
function
|
|
5279
|
+
function Bi(t) {
|
|
5193
5280
|
const e = t.getInput("TABLE").connection;
|
|
5194
5281
|
if (e.targetBlock())
|
|
5195
5282
|
return;
|
|
@@ -5208,7 +5295,7 @@ function ki(t) {
|
|
|
5208
5295
|
}, a = J.blocks.append(s, t.workspace);
|
|
5209
5296
|
e.connect(a.outputConnection);
|
|
5210
5297
|
}
|
|
5211
|
-
function
|
|
5298
|
+
function bi(t) {
|
|
5212
5299
|
const e = t.getInput("CONDITION").connection;
|
|
5213
5300
|
if (e.targetBlock())
|
|
5214
5301
|
return;
|
|
@@ -5233,7 +5320,7 @@ function Si(t) {
|
|
|
5233
5320
|
}, r = J.blocks.append(a, t.workspace);
|
|
5234
5321
|
e.connect(r.outputConnection);
|
|
5235
5322
|
}
|
|
5236
|
-
function
|
|
5323
|
+
function Pi(t) {
|
|
5237
5324
|
const e = t.getInput("HANDLE").connection;
|
|
5238
5325
|
if (e.targetBlock())
|
|
5239
5326
|
return;
|
|
@@ -5257,7 +5344,7 @@ function Ni(t) {
|
|
|
5257
5344
|
}, o = J.blocks.append(n, t.workspace);
|
|
5258
5345
|
e.connect(o.previousConnection);
|
|
5259
5346
|
}
|
|
5260
|
-
const
|
|
5347
|
+
const Ri = {
|
|
5261
5348
|
init: function() {
|
|
5262
5349
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_DELETE_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_DELETE_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_DELETE_DATA_HELPURL}");
|
|
5263
5350
|
},
|
|
@@ -5273,13 +5360,13 @@ const Li = {
|
|
|
5273
5360
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "HANDLE")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(S.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("SelectTable").setAlign(S.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
5274
5361
|
},
|
|
5275
5362
|
ensureBlocks_: function() {
|
|
5276
|
-
this.isInsertionMarker() || (
|
|
5363
|
+
this.isInsertionMarker() || (Bi(this), bi(this), j(this, [
|
|
5277
5364
|
["SUCCESS", "__success__", "x-runtime-lib.success", !0],
|
|
5278
5365
|
["MESSAGE", "__message__", "x-runtime-lib.message", !0]
|
|
5279
|
-
]),
|
|
5366
|
+
]), Pi(this));
|
|
5280
5367
|
}
|
|
5281
5368
|
};
|
|
5282
|
-
A.delete_data_v1 =
|
|
5369
|
+
A.delete_data_v1 = Ri;
|
|
5283
5370
|
i.forBlock.delete_data_v1 = function(t) {
|
|
5284
5371
|
const e = i.INDENT, n = i.valueToCode(t, "TABLE", _.ATOMIC) || "null", o = i.valueToCode(t, "CONDITION", _.ATOMIC) || "null", s = i.statementToCode(t, "HANDLE");
|
|
5285
5372
|
return `{
|
|
@@ -5317,7 +5404,7 @@ i.forBlock.interrupt_transaction_v1 = function(t) {
|
|
|
5317
5404
|
return `throw ${i.valueToCode(t, "VALUE", _.NONE) || "''"};
|
|
5318
5405
|
`;
|
|
5319
5406
|
};
|
|
5320
|
-
function
|
|
5407
|
+
function Di(t) {
|
|
5321
5408
|
const e = t.getInput("TABLE").connection;
|
|
5322
5409
|
if (e.targetBlock())
|
|
5323
5410
|
return;
|
|
@@ -5351,7 +5438,7 @@ function Bi(t) {
|
|
|
5351
5438
|
}, r = J.blocks.append(a, t.workspace);
|
|
5352
5439
|
e.connect(r.outputConnection);
|
|
5353
5440
|
}
|
|
5354
|
-
function
|
|
5441
|
+
function Mi(t) {
|
|
5355
5442
|
const e = t.getInput("CONDITION").connection;
|
|
5356
5443
|
if (e.targetBlock())
|
|
5357
5444
|
return;
|
|
@@ -5360,7 +5447,7 @@ function bi(t) {
|
|
|
5360
5447
|
}, o = J.blocks.append(n, t.workspace);
|
|
5361
5448
|
e.connect(o.outputConnection);
|
|
5362
5449
|
}
|
|
5363
|
-
function
|
|
5450
|
+
function Ui(t) {
|
|
5364
5451
|
const e = t.getInput("EXTRA").connection;
|
|
5365
5452
|
if (e.targetBlock())
|
|
5366
5453
|
return;
|
|
@@ -5397,7 +5484,7 @@ function Pi(t) {
|
|
|
5397
5484
|
}, o = J.blocks.append(n, t.workspace);
|
|
5398
5485
|
e.connect(o.outputConnection);
|
|
5399
5486
|
}
|
|
5400
|
-
function
|
|
5487
|
+
function Vi(t) {
|
|
5401
5488
|
const e = t.getInput("HANDLE").connection;
|
|
5402
5489
|
if (e.targetBlock())
|
|
5403
5490
|
return;
|
|
@@ -5435,7 +5522,7 @@ g([
|
|
|
5435
5522
|
style: "procedure_blocks"
|
|
5436
5523
|
}
|
|
5437
5524
|
]);
|
|
5438
|
-
const
|
|
5525
|
+
const xi = {
|
|
5439
5526
|
init: function() {
|
|
5440
5527
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_QUERY_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_QUERY_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_QUERY_DATA_HELPURL}");
|
|
5441
5528
|
},
|
|
@@ -5451,15 +5538,15 @@ const Di = {
|
|
|
5451
5538
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("EXTRA_DATA") || (this.appendValueInput("EXTRA_DATA"), this.moveInputBefore("EXTRA_DATA", "HANDLE")), this.getInput("MAIN_DATA") || (this.appendValueInput("MAIN_DATA"), this.moveInputBefore("MAIN_DATA", "EXTRA_DATA")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "MAIN_DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("EXTRA") || (this.appendValueInput("EXTRA").setCheck(["QueryExtra", "Array"]).setAlign(S.Align.RIGHT).appendField("%{BKY_DATA_EXTRA}"), this.moveInputBefore("EXTRA", "SUCCESS")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(S.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "EXTRA")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck(["SelectColumn", "Array"]).setAlign(S.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
5452
5539
|
},
|
|
5453
5540
|
ensureBlocks_: function() {
|
|
5454
|
-
this.isInsertionMarker() || (
|
|
5541
|
+
this.isInsertionMarker() || (Di(this), Mi(this), Ui(this), j(this, [
|
|
5455
5542
|
["SUCCESS", "__success__", "x-runtime-lib.success", !0],
|
|
5456
5543
|
["MESSAGE", "__message__", "x-runtime-lib.message", !0],
|
|
5457
5544
|
["MAIN_DATA", "__mainData__", "x-runtime-lib.mainData", !0],
|
|
5458
5545
|
["EXTRA_DATA", "__extraData__", "x-runtime-lib.extraData", !0]
|
|
5459
|
-
]),
|
|
5546
|
+
]), Vi(this));
|
|
5460
5547
|
}
|
|
5461
5548
|
};
|
|
5462
|
-
A.query_data_v1 =
|
|
5549
|
+
A.query_data_v1 = xi;
|
|
5463
5550
|
i.forBlock.query_data_v1 = function(t) {
|
|
5464
5551
|
const e = i.INDENT, n = i.valueToCode(t, "TABLE", _.ATOMIC) || "null", o = i.valueToCode(t, "CONDITION", _.ATOMIC) || "null", s = i.valueToCode(t, "EXTRA", _.ATOMIC) || "null", a = i.statementToCode(t, "HANDLE");
|
|
5465
5552
|
return `{
|
|
@@ -5532,19 +5619,19 @@ i.forBlock.query_extra_sortby_v1 = function(t) {
|
|
|
5532
5619
|
const e = i.valueToCode(t, "COLUMN", _.ATOMIC) || "''", n = i.valueToCode(t, "DESC", _.ATOMIC) || !1;
|
|
5533
5620
|
return [`{type:'sortby',value:${e},value2:${n}}`, _.ATOMIC];
|
|
5534
5621
|
};
|
|
5535
|
-
const
|
|
5622
|
+
const Yi = {
|
|
5536
5623
|
init: function() {
|
|
5537
5624
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
5538
5625
|
}
|
|
5539
5626
|
};
|
|
5540
|
-
A.select_column_container_v1 =
|
|
5541
|
-
const
|
|
5627
|
+
A.select_column_container_v1 = Yi;
|
|
5628
|
+
const Fi = {
|
|
5542
5629
|
init: function() {
|
|
5543
5630
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
5544
5631
|
}
|
|
5545
5632
|
};
|
|
5546
|
-
A.select_column_item_v1 =
|
|
5547
|
-
const
|
|
5633
|
+
A.select_column_item_v1 = Fi;
|
|
5634
|
+
const wi = {
|
|
5548
5635
|
init: function() {
|
|
5549
5636
|
this.space = {
|
|
5550
5637
|
id: "",
|
|
@@ -5607,7 +5694,7 @@ const Vi = {
|
|
|
5607
5694
|
}), B(t);
|
|
5608
5695
|
},
|
|
5609
5696
|
onchange: function(t) {
|
|
5610
|
-
if (t.type ===
|
|
5697
|
+
if (t.type === P.STATE_CHANGE)
|
|
5611
5698
|
this.checkWarning_();
|
|
5612
5699
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
5613
5700
|
const e = t;
|
|
@@ -5753,7 +5840,7 @@ const Vi = {
|
|
|
5753
5840
|
this.setWarningText(null);
|
|
5754
5841
|
}
|
|
5755
5842
|
};
|
|
5756
|
-
A.select_column_v1 =
|
|
5843
|
+
A.select_column_v1 = wi;
|
|
5757
5844
|
i.forBlock.select_column_v1 = function(t) {
|
|
5758
5845
|
const e = i.quote_, n = t, o = n.space.id, s = n.table.id, a = [];
|
|
5759
5846
|
for (let l = 0; l < n.itemCount_; l++) {
|
|
@@ -5765,7 +5852,7 @@ i.forBlock.select_column_v1 = function(t) {
|
|
|
5765
5852
|
u !== 0 && (r += ","), r += `{name:${e(l)},alias:${e(d)}}`;
|
|
5766
5853
|
}), r += "]", [`{spaceId:${e(o)},tableId:${e(s)},columns:${r}}`, _.ATOMIC];
|
|
5767
5854
|
};
|
|
5768
|
-
const
|
|
5855
|
+
const Ki = {
|
|
5769
5856
|
init: function() {
|
|
5770
5857
|
this.space = {
|
|
5771
5858
|
id: "",
|
|
@@ -5813,7 +5900,7 @@ const xi = {
|
|
|
5813
5900
|
return Le(this.space.id);
|
|
5814
5901
|
},
|
|
5815
5902
|
onchange: function(t) {
|
|
5816
|
-
if (t.type ===
|
|
5903
|
+
if (t.type === P.STATE_CHANGE)
|
|
5817
5904
|
this.checkWarning_();
|
|
5818
5905
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
5819
5906
|
const e = t;
|
|
@@ -5857,12 +5944,12 @@ const xi = {
|
|
|
5857
5944
|
e.name !== this.table.name && (this.table.name = e.name), this.setWarningText(null);
|
|
5858
5945
|
}
|
|
5859
5946
|
};
|
|
5860
|
-
A.select_table_v1 =
|
|
5947
|
+
A.select_table_v1 = Ki;
|
|
5861
5948
|
i.forBlock.select_table_v1 = function(t) {
|
|
5862
5949
|
const e = i.quote_, n = t, o = n.space.id, s = n.table.id;
|
|
5863
5950
|
return [`{spaceId:${e(o)},tableId:${e(s)}}`, _.ATOMIC];
|
|
5864
5951
|
};
|
|
5865
|
-
const
|
|
5952
|
+
const $i = {
|
|
5866
5953
|
init: function() {
|
|
5867
5954
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_TRANSACTION_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_TRANSACTION_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_TRANSACTION_HELPURL}");
|
|
5868
5955
|
},
|
|
@@ -5884,9 +5971,9 @@ const Yi = {
|
|
|
5884
5971
|
]);
|
|
5885
5972
|
}
|
|
5886
5973
|
};
|
|
5887
|
-
A.transaction_v1 =
|
|
5974
|
+
A.transaction_v1 = $i;
|
|
5888
5975
|
i.forBlock.transaction_v1 = function(t) {
|
|
5889
|
-
const e = i.INDENT, n = t, o =
|
|
5976
|
+
const e = i.INDENT, n = t, o = As(n), s = i.statementToCode(n, "HANDLE"), a = i.statementToCode(n, "FINALLY");
|
|
5890
5977
|
return `{
|
|
5891
5978
|
${e}var __error${o}__ = '';
|
|
5892
5979
|
${e}var __txExist${o}__ = typeof(__tx__) !== 'undefined';
|
|
@@ -5928,19 +6015,19 @@ ${e}}
|
|
|
5928
6015
|
}
|
|
5929
6016
|
`;
|
|
5930
6017
|
};
|
|
5931
|
-
const
|
|
6018
|
+
const Hi = {
|
|
5932
6019
|
init: function() {
|
|
5933
6020
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
5934
6021
|
}
|
|
5935
6022
|
};
|
|
5936
|
-
A.update_column_container_v1 =
|
|
5937
|
-
const
|
|
6023
|
+
A.update_column_container_v1 = Hi;
|
|
6024
|
+
const Gi = {
|
|
5938
6025
|
init: function() {
|
|
5939
6026
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
5940
6027
|
}
|
|
5941
6028
|
};
|
|
5942
|
-
A.update_column_item_v1 =
|
|
5943
|
-
const
|
|
6029
|
+
A.update_column_item_v1 = Gi;
|
|
6030
|
+
const Wi = {
|
|
5944
6031
|
init: function() {
|
|
5945
6032
|
this.space = {
|
|
5946
6033
|
id: "",
|
|
@@ -6003,7 +6090,7 @@ const Ki = {
|
|
|
6003
6090
|
}), B(t);
|
|
6004
6091
|
},
|
|
6005
6092
|
onchange: function(t) {
|
|
6006
|
-
if (t.type ===
|
|
6093
|
+
if (t.type === P.STATE_CHANGE)
|
|
6007
6094
|
this.checkWarning_();
|
|
6008
6095
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
6009
6096
|
const e = t;
|
|
@@ -6161,7 +6248,7 @@ const Ki = {
|
|
|
6161
6248
|
const e = this.getFieldValue("COLUMN" + t), n = this.table.columns.find((s) => s.id === e);
|
|
6162
6249
|
if (!n)
|
|
6163
6250
|
continue;
|
|
6164
|
-
const o =
|
|
6251
|
+
const o = ao(n.type);
|
|
6165
6252
|
this.getInput("ADD" + t).setCheck(o);
|
|
6166
6253
|
}
|
|
6167
6254
|
},
|
|
@@ -6184,7 +6271,7 @@ const Ki = {
|
|
|
6184
6271
|
this.setWarningText(null);
|
|
6185
6272
|
}
|
|
6186
6273
|
};
|
|
6187
|
-
A.update_column_v1 =
|
|
6274
|
+
A.update_column_v1 = Wi;
|
|
6188
6275
|
i.forBlock.update_column_v1 = function(t) {
|
|
6189
6276
|
const e = i.quote_, n = t, o = n.space.id, s = n.table.id, a = [];
|
|
6190
6277
|
for (let l = 0; l < n.itemCount_; l++) {
|
|
@@ -6196,7 +6283,7 @@ i.forBlock.update_column_v1 = function(t) {
|
|
|
6196
6283
|
u !== 0 && (r += ","), r += `{name:${e(l)},value:${d}}`;
|
|
6197
6284
|
}), r += "]", [`{spaceId:${e(o)},tableId:${e(s)},columns:${r}}`, _.ATOMIC];
|
|
6198
6285
|
};
|
|
6199
|
-
function
|
|
6286
|
+
function ji(t) {
|
|
6200
6287
|
const e = t.getInput("TABLE").connection;
|
|
6201
6288
|
if (e.targetBlock())
|
|
6202
6289
|
return;
|
|
@@ -6230,7 +6317,7 @@ function $i(t) {
|
|
|
6230
6317
|
}, r = J.blocks.append(a, t.workspace);
|
|
6231
6318
|
e.connect(r.outputConnection);
|
|
6232
6319
|
}
|
|
6233
|
-
function
|
|
6320
|
+
function Xi(t) {
|
|
6234
6321
|
const e = t.getInput("CONDITION").connection;
|
|
6235
6322
|
if (e.targetBlock())
|
|
6236
6323
|
return;
|
|
@@ -6239,7 +6326,7 @@ function Hi(t) {
|
|
|
6239
6326
|
}, o = J.blocks.append(n, t.workspace);
|
|
6240
6327
|
e.connect(o.outputConnection);
|
|
6241
6328
|
}
|
|
6242
|
-
function
|
|
6329
|
+
function Ji(t) {
|
|
6243
6330
|
const e = t.getInput("HANDLE").connection;
|
|
6244
6331
|
if (e.targetBlock())
|
|
6245
6332
|
return;
|
|
@@ -6263,7 +6350,7 @@ function Gi(t) {
|
|
|
6263
6350
|
}, o = J.blocks.append(n, t.workspace);
|
|
6264
6351
|
e.connect(o.previousConnection);
|
|
6265
6352
|
}
|
|
6266
|
-
const
|
|
6353
|
+
const qi = {
|
|
6267
6354
|
init: function() {
|
|
6268
6355
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_UPDATE_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_UPDATE_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_UPDATE_DATA_HELPURL}");
|
|
6269
6356
|
},
|
|
@@ -6279,14 +6366,14 @@ const Wi = {
|
|
|
6279
6366
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("DATA") || (this.appendValueInput("DATA"), this.moveInputBefore("DATA", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(S.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(S.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
6280
6367
|
},
|
|
6281
6368
|
ensureBlocks: function() {
|
|
6282
|
-
this.isInsertionMarker() || (
|
|
6369
|
+
this.isInsertionMarker() || (ji(this), Xi(this), j(this, [
|
|
6283
6370
|
["SUCCESS", "__success__", "x-runtime-lib.success", !0],
|
|
6284
6371
|
["MESSAGE", "__message__", "x-runtime-lib.message", !0],
|
|
6285
6372
|
["DATA", "__data__", "x-runtime-lib.data", !0]
|
|
6286
|
-
]),
|
|
6373
|
+
]), Ji(this));
|
|
6287
6374
|
}
|
|
6288
6375
|
};
|
|
6289
|
-
A.update_data_v1 =
|
|
6376
|
+
A.update_data_v1 = qi;
|
|
6290
6377
|
i.forBlock.update_data_v1 = function(t) {
|
|
6291
6378
|
const e = i.INDENT, n = i.valueToCode(t, "TABLE", _.ATOMIC) || "null", o = i.valueToCode(t, "CONDITION", _.ATOMIC) || "null", s = i.statementToCode(t, "HANDLE");
|
|
6292
6379
|
return `{
|
|
@@ -6303,7 +6390,7 @@ ${e}}
|
|
|
6303
6390
|
${s}}
|
|
6304
6391
|
`;
|
|
6305
6392
|
};
|
|
6306
|
-
const
|
|
6393
|
+
const Qi = N.xml, zi = {
|
|
6307
6394
|
init: function() {
|
|
6308
6395
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(S.Align.CENTRE).appendField(
|
|
6309
6396
|
new ct(Rt, 20, 20, void 0, () => {
|
|
@@ -6312,7 +6399,7 @@ const ji = N.xml, Xi = {
|
|
|
6312
6399
|
), this.appendDummyInput("CLOSE_BRACKET").appendField(" ] "), this.setInputsInline(!1), this.setOutput(!0, "JsonArray"), this.setColour(350), this.setTooltip(""), this.setHelpUrl("");
|
|
6313
6400
|
},
|
|
6314
6401
|
mutationToDom: function() {
|
|
6315
|
-
const t =
|
|
6402
|
+
const t = Qi.createElement("mutation");
|
|
6316
6403
|
return t.setAttribute("items", String(this.length)), t;
|
|
6317
6404
|
},
|
|
6318
6405
|
domToMutation: function(t) {
|
|
@@ -6364,8 +6451,8 @@ const ji = N.xml, Xi = {
|
|
|
6364
6451
|
this.length--;
|
|
6365
6452
|
}
|
|
6366
6453
|
};
|
|
6367
|
-
A.json_array_v1 =
|
|
6368
|
-
const
|
|
6454
|
+
A.json_array_v1 = zi;
|
|
6455
|
+
const Zi = {
|
|
6369
6456
|
init: function() {
|
|
6370
6457
|
this.appendDummyInput().appendField(
|
|
6371
6458
|
new v([
|
|
@@ -6376,8 +6463,8 @@ const Ji = {
|
|
|
6376
6463
|
), this.setOutput(!0, "JsonBoolean"), this.setColour(210);
|
|
6377
6464
|
}
|
|
6378
6465
|
};
|
|
6379
|
-
A.json_boolean_v1 =
|
|
6380
|
-
const
|
|
6466
|
+
A.json_boolean_v1 = Zi;
|
|
6467
|
+
const xn = N.xml, ta = {
|
|
6381
6468
|
init: function() {
|
|
6382
6469
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(S.Align.CENTRE).appendField(
|
|
6383
6470
|
new ct(Rt, 20, 20, void 0, () => {
|
|
@@ -6386,9 +6473,9 @@ const Vn = N.xml, qi = {
|
|
|
6386
6473
|
), this.appendDummyInput("CLOSE_BRACHET").appendField(" } "), this.setInputsInline(!1), this.setOutput(!0, "JsonMap"), this.setColour(120), this.setTooltip(""), this.setHelpUrl("");
|
|
6387
6474
|
},
|
|
6388
6475
|
mutationToDom: function() {
|
|
6389
|
-
const t =
|
|
6476
|
+
const t = xn.createElement("mutation");
|
|
6390
6477
|
for (let e = 0; e < this.length; e++) {
|
|
6391
|
-
const n =
|
|
6478
|
+
const n = xn.createElement("item");
|
|
6392
6479
|
n.setAttribute("key", this.getFieldValue("KEY" + e)), t.appendChild(n);
|
|
6393
6480
|
}
|
|
6394
6481
|
return t;
|
|
@@ -6443,38 +6530,38 @@ const Vn = N.xml, qi = {
|
|
|
6443
6530
|
this.length--;
|
|
6444
6531
|
}
|
|
6445
6532
|
};
|
|
6446
|
-
A.json_map_v1 =
|
|
6447
|
-
const
|
|
6533
|
+
A.json_map_v1 = ta;
|
|
6534
|
+
const ea = {
|
|
6448
6535
|
init: function() {
|
|
6449
6536
|
this.appendDummyInput().appendField(new je(0), "VALUE"), this.setOutput(!0, "JsonNumber"), this.setColour(230);
|
|
6450
6537
|
}
|
|
6451
6538
|
};
|
|
6452
|
-
A.json_number_v1 =
|
|
6453
|
-
const
|
|
6539
|
+
A.json_number_v1 = ea;
|
|
6540
|
+
const na = {
|
|
6454
6541
|
init: function() {
|
|
6455
6542
|
this.appendDummyInput().setAlign(S.Align.CENTRE).appendField("JSON"), this.appendValueInput("JSON").setCheck(["JsonMap", "JsonArray"]), this.setDeletable(!1), this.setColour(250), this.setTooltip(""), this.setHelpUrl("");
|
|
6456
6543
|
}
|
|
6457
6544
|
};
|
|
6458
|
-
A.json_root_v1 =
|
|
6459
|
-
const
|
|
6545
|
+
A.json_root_v1 = na;
|
|
6546
|
+
const oa = {
|
|
6460
6547
|
init: function() {
|
|
6461
6548
|
this.appendDummyInput().appendField('"').appendField(new Et(""), "VALUE").appendField('"'), this.setOutput(!0, "JsonString"), this.setColour(160);
|
|
6462
6549
|
}
|
|
6463
6550
|
};
|
|
6464
|
-
A.json_string_v1 =
|
|
6465
|
-
const
|
|
6551
|
+
A.json_string_v1 = oa;
|
|
6552
|
+
const sa = N.xml, ia = {
|
|
6466
6553
|
init: function() {
|
|
6467
6554
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
6468
6555
|
}
|
|
6469
6556
|
};
|
|
6470
|
-
A.list_create_container_v1 =
|
|
6471
|
-
const
|
|
6557
|
+
A.list_create_container_v1 = ia;
|
|
6558
|
+
const aa = {
|
|
6472
6559
|
init: function() {
|
|
6473
6560
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
6474
6561
|
}
|
|
6475
6562
|
};
|
|
6476
|
-
A.list_create_item_v1 =
|
|
6477
|
-
const
|
|
6563
|
+
A.list_create_item_v1 = aa;
|
|
6564
|
+
const ca = {
|
|
6478
6565
|
init: function() {
|
|
6479
6566
|
this.itemCount_ = 0, this.setMutator(
|
|
6480
6567
|
new It.MutatorIcon(
|
|
@@ -6484,7 +6571,7 @@ const oa = {
|
|
|
6484
6571
|
), this.setOutput(!0, "Array"), this.setStyle("list_blocks"), this.setTooltip("%{BKY_LIST_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_LIST_V1_CREATE_HELPURL}"), this.updateShape_();
|
|
6485
6572
|
},
|
|
6486
6573
|
mutationToDom: function() {
|
|
6487
|
-
const t =
|
|
6574
|
+
const t = sa.createElement("mutation");
|
|
6488
6575
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
6489
6576
|
},
|
|
6490
6577
|
domToMutation: function(t) {
|
|
@@ -6556,7 +6643,7 @@ const oa = {
|
|
|
6556
6643
|
this.removeInput("ADD" + t);
|
|
6557
6644
|
}
|
|
6558
6645
|
};
|
|
6559
|
-
A.list_create_v1 =
|
|
6646
|
+
A.list_create_v1 = ca;
|
|
6560
6647
|
i.forBlock.list_create_v1 = function(t) {
|
|
6561
6648
|
const e = t, n = new Array(e.itemCount_);
|
|
6562
6649
|
for (let s = 0; s < e.itemCount_; s++)
|
|
@@ -6772,7 +6859,7 @@ i.forBlock.list_set_v1 = function(t) {
|
|
|
6772
6859
|
return `${e}[${n}] = ${o};
|
|
6773
6860
|
`;
|
|
6774
6861
|
};
|
|
6775
|
-
const
|
|
6862
|
+
const ra = {
|
|
6776
6863
|
// logic_compare
|
|
6777
6864
|
EQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_EQ}",
|
|
6778
6865
|
NEQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_NEQ}",
|
|
@@ -6784,9 +6871,9 @@ const sa = {
|
|
|
6784
6871
|
AND: "%{BKY_LOGIC_V1_OPERATION_TOOLTIP_AND}",
|
|
6785
6872
|
OR: "%{BKY_LOGIC_V1_OPERATION_TOOLTIP_OR}"
|
|
6786
6873
|
};
|
|
6787
|
-
|
|
6874
|
+
U.register(
|
|
6788
6875
|
"logic_op_tooltip_v1",
|
|
6789
|
-
|
|
6876
|
+
U.buildTooltipForDropdown("OP", ra)
|
|
6790
6877
|
);
|
|
6791
6878
|
g([
|
|
6792
6879
|
{
|
|
@@ -6811,7 +6898,7 @@ g([
|
|
|
6811
6898
|
i.forBlock.logic_boolean_v1 = function(t) {
|
|
6812
6899
|
return [t.getFieldValue("BOOL") === "TRUE" ? "true" : "false", _.ATOMIC];
|
|
6813
6900
|
};
|
|
6814
|
-
const
|
|
6901
|
+
const ua = {
|
|
6815
6902
|
onchange: function(t) {
|
|
6816
6903
|
this.prevBlocks_ || (this.prevBlocks_ = [null, null]);
|
|
6817
6904
|
const e = this.getInputTargetBlock("A"), n = this.getInputTargetBlock("B");
|
|
@@ -6828,10 +6915,10 @@ const ia = {
|
|
|
6828
6915
|
this.prevBlocks_[0] = this.getInputTargetBlock("A"), this.prevBlocks_[1] = this.getInputTargetBlock("B");
|
|
6829
6916
|
}
|
|
6830
6917
|
};
|
|
6831
|
-
|
|
6918
|
+
U.register(
|
|
6832
6919
|
"logic_compare_v1",
|
|
6833
6920
|
function() {
|
|
6834
|
-
this.mixin(
|
|
6921
|
+
this.mixin(ua);
|
|
6835
6922
|
}
|
|
6836
6923
|
);
|
|
6837
6924
|
g([
|
|
@@ -6881,7 +6968,7 @@ i.forBlock.logic_compare_v1 = function(t) {
|
|
|
6881
6968
|
const s = i.valueToCode(t, "A", o) || "0", a = i.valueToCode(t, "B", o) || "0";
|
|
6882
6969
|
return [`${s} ${n} ${a}`, o];
|
|
6883
6970
|
};
|
|
6884
|
-
const
|
|
6971
|
+
const la = {
|
|
6885
6972
|
elseIfCount_: 0,
|
|
6886
6973
|
hasElse_: !1,
|
|
6887
6974
|
mutationToDom: function() {
|
|
@@ -7006,9 +7093,9 @@ const aa = {
|
|
|
7006
7093
|
n?.reconnect(this, "ELSE");
|
|
7007
7094
|
}
|
|
7008
7095
|
};
|
|
7009
|
-
|
|
7096
|
+
U.registerMutator(
|
|
7010
7097
|
"logic_if_v1_mutator",
|
|
7011
|
-
|
|
7098
|
+
la,
|
|
7012
7099
|
void 0,
|
|
7013
7100
|
["logic_if_else_if_v1", "logic_if_else_v1"]
|
|
7014
7101
|
);
|
|
@@ -7154,7 +7241,7 @@ i.forBlock.logic_operation_v1 = function(t) {
|
|
|
7154
7241
|
}
|
|
7155
7242
|
return [`${o} ${e} ${s}`, n];
|
|
7156
7243
|
};
|
|
7157
|
-
const
|
|
7244
|
+
const _a = {
|
|
7158
7245
|
prevParentConnection_: null,
|
|
7159
7246
|
onchange: function(t) {
|
|
7160
7247
|
const e = this.getInputTargetBlock("THEN"), n = this.getInputTargetBlock("ELSE"), o = this.outputConnection.targetConnection;
|
|
@@ -7169,7 +7256,7 @@ const ca = {
|
|
|
7169
7256
|
this.prevParentConnection_ = o;
|
|
7170
7257
|
}
|
|
7171
7258
|
};
|
|
7172
|
-
|
|
7259
|
+
U.registerMixin("logic_ternary_v1", _a);
|
|
7173
7260
|
g([
|
|
7174
7261
|
{
|
|
7175
7262
|
type: "logic_ternary_v1",
|
|
@@ -7206,7 +7293,7 @@ i.forBlock.logic_ternary_v1 = function(t) {
|
|
|
7206
7293
|
const e = i.valueToCode(t, "IF", _.CONDITIONAL) || "false", n = i.valueToCode(t, "THEN", _.CONDITIONAL) || "null", o = i.valueToCode(t, "ELSE", _.CONDITIONAL) || "null";
|
|
7207
7294
|
return [e + " ? " + n + " : " + o, _.CONDITIONAL];
|
|
7208
7295
|
};
|
|
7209
|
-
const
|
|
7296
|
+
const pa = {
|
|
7210
7297
|
customContextMenu: function(t) {
|
|
7211
7298
|
if (this.isInFlyout)
|
|
7212
7299
|
return;
|
|
@@ -7221,32 +7308,32 @@ const ra = {
|
|
|
7221
7308
|
t.push({
|
|
7222
7309
|
enabled: !0,
|
|
7223
7310
|
text: m("VARIABLE_SET_CREATE_GET").replace("%1", o),
|
|
7224
|
-
callback:
|
|
7311
|
+
callback: Hn.callbackFactory(this, s)
|
|
7225
7312
|
});
|
|
7226
7313
|
}
|
|
7227
7314
|
}
|
|
7228
7315
|
};
|
|
7229
|
-
|
|
7316
|
+
U.registerMixin(
|
|
7230
7317
|
"contextMenu_newGetVariableBlock_v1",
|
|
7231
|
-
|
|
7318
|
+
pa
|
|
7232
7319
|
);
|
|
7233
|
-
|
|
7320
|
+
U.register(
|
|
7234
7321
|
"flow_control_tooltip_v1",
|
|
7235
|
-
|
|
7322
|
+
U.buildTooltipForDropdown("MODE", {
|
|
7236
7323
|
BREAK: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_BREAK}",
|
|
7237
7324
|
CONTINUE: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_CONTINUE}"
|
|
7238
7325
|
})
|
|
7239
7326
|
);
|
|
7240
|
-
const
|
|
7327
|
+
const da = /* @__PURE__ */ new Set([
|
|
7241
7328
|
"repeat_v1",
|
|
7242
7329
|
"for_each_v1",
|
|
7243
7330
|
"for_v1",
|
|
7244
7331
|
"while_until_v1"
|
|
7245
|
-
]),
|
|
7332
|
+
]), ha = {
|
|
7246
7333
|
getSurroundLoop: function() {
|
|
7247
7334
|
let t = this;
|
|
7248
7335
|
do {
|
|
7249
|
-
if (
|
|
7336
|
+
if (da.has(t.type))
|
|
7250
7337
|
return t;
|
|
7251
7338
|
t = t?.getSurroundParent();
|
|
7252
7339
|
} while (t);
|
|
@@ -7265,9 +7352,9 @@ const ua = /* @__PURE__ */ new Set([
|
|
|
7265
7352
|
}
|
|
7266
7353
|
}
|
|
7267
7354
|
};
|
|
7268
|
-
|
|
7355
|
+
U.registerMixin(
|
|
7269
7356
|
"flow_control_in_loop_check_v1",
|
|
7270
|
-
|
|
7357
|
+
ha
|
|
7271
7358
|
);
|
|
7272
7359
|
g([
|
|
7273
7360
|
{
|
|
@@ -7316,9 +7403,9 @@ i.forBlock.flow_control_v1 = function(t) {
|
|
|
7316
7403
|
throw "unknown mode";
|
|
7317
7404
|
}
|
|
7318
7405
|
};
|
|
7319
|
-
|
|
7406
|
+
U.register(
|
|
7320
7407
|
"for_tooltip_v1",
|
|
7321
|
-
|
|
7408
|
+
U.buildTooltipWithFieldText(
|
|
7322
7409
|
"%{BKY_LOOP_V1_FOR_TOOLTIP}",
|
|
7323
7410
|
"VAR"
|
|
7324
7411
|
)
|
|
@@ -7408,9 +7495,9 @@ ${r}}
|
|
|
7408
7495
|
`, c;
|
|
7409
7496
|
}
|
|
7410
7497
|
};
|
|
7411
|
-
|
|
7498
|
+
U.register(
|
|
7412
7499
|
"for_each_tooltip_v1",
|
|
7413
|
-
|
|
7500
|
+
U.buildTooltipWithFieldText(
|
|
7414
7501
|
"%{BKY_LOOP_V1_FOR_EACH_TOOLTIP}",
|
|
7415
7502
|
"VAR"
|
|
7416
7503
|
)
|
|
@@ -7513,9 +7600,9 @@ i.forBlock.repeat_v1 = function(t) {
|
|
|
7513
7600
|
${n}}
|
|
7514
7601
|
`, o;
|
|
7515
7602
|
};
|
|
7516
|
-
|
|
7603
|
+
U.register(
|
|
7517
7604
|
"while_until_tooltip_v1",
|
|
7518
|
-
|
|
7605
|
+
U.buildTooltipForDropdown("MODE", {
|
|
7519
7606
|
WHILE: "%{BKY_LOOP_V1_WHILE_UNTIL_TOOLTIP_WHILE}",
|
|
7520
7607
|
UNTIL: "%{BKY_LOOP_V1_WHILE_UNTIL_TOOLTIP_UNTIL}"
|
|
7521
7608
|
})
|
|
@@ -7569,7 +7656,7 @@ i.forBlock.while_until_v1 = function(t) {
|
|
|
7569
7656
|
${o}}
|
|
7570
7657
|
`;
|
|
7571
7658
|
};
|
|
7572
|
-
const
|
|
7659
|
+
const fa = {
|
|
7573
7660
|
// math_arithmetic
|
|
7574
7661
|
ADD: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_ADD}",
|
|
7575
7662
|
SUBTRACT: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_SUBTRACT}",
|
|
@@ -7601,9 +7688,9 @@ const _a = {
|
|
|
7601
7688
|
STD_DEV: "%{BKY_MATH_V1_ON_LIST_TOOLTIP_STD_DEV}",
|
|
7602
7689
|
RANDOM: "%{BKY_MATH_V1_ON_LIST_TOOLTIP_RANDOM}"
|
|
7603
7690
|
};
|
|
7604
|
-
|
|
7691
|
+
U.register(
|
|
7605
7692
|
"math_op_tooltip_v1",
|
|
7606
|
-
|
|
7693
|
+
U.buildTooltipForDropdown("OP", fa)
|
|
7607
7694
|
);
|
|
7608
7695
|
g([
|
|
7609
7696
|
{
|
|
@@ -8206,21 +8293,21 @@ i.forBlock.math_trig_v1 = function(t) {
|
|
|
8206
8293
|
}
|
|
8207
8294
|
return [o, _.DIVISION];
|
|
8208
8295
|
};
|
|
8209
|
-
const
|
|
8296
|
+
const ma = N.xml, Ta = {
|
|
8210
8297
|
init: function() {
|
|
8211
8298
|
this.appendDummyInput().appendField(
|
|
8212
8299
|
"%{BKY_OBJECT_V1_CREATE_CONTAINER_TITLE}"
|
|
8213
8300
|
), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
8214
8301
|
}
|
|
8215
8302
|
};
|
|
8216
|
-
A.object_create_container_v1 =
|
|
8217
|
-
const
|
|
8303
|
+
A.object_create_container_v1 = Ta;
|
|
8304
|
+
const Ea = {
|
|
8218
8305
|
init: function() {
|
|
8219
8306
|
this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
8220
8307
|
}
|
|
8221
8308
|
};
|
|
8222
|
-
A.object_create_item_v1 =
|
|
8223
|
-
const
|
|
8309
|
+
A.object_create_item_v1 = Ea;
|
|
8310
|
+
const ga = {
|
|
8224
8311
|
init: function() {
|
|
8225
8312
|
this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(
|
|
8226
8313
|
new It.MutatorIcon(
|
|
@@ -8230,7 +8317,7 @@ const fa = {
|
|
|
8230
8317
|
), this.setOutput(!0, "Object"), this.setStyle("object_blocks"), this.setTooltip("%{BKY_OBJECT_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_OBJECT_V1_CREATE_HELPURL}");
|
|
8231
8318
|
},
|
|
8232
8319
|
mutationToDom: function() {
|
|
8233
|
-
const t =
|
|
8320
|
+
const t = ma.createElement("mutation");
|
|
8234
8321
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
8235
8322
|
},
|
|
8236
8323
|
domToMutation: function(t) {
|
|
@@ -8294,7 +8381,7 @@ const fa = {
|
|
|
8294
8381
|
this.removeInput("ADD" + t);
|
|
8295
8382
|
}
|
|
8296
8383
|
};
|
|
8297
|
-
A.object_create_v1 =
|
|
8384
|
+
A.object_create_v1 = ga;
|
|
8298
8385
|
i.forBlock.object_create_v1 = function(t) {
|
|
8299
8386
|
const e = t;
|
|
8300
8387
|
let n = "{";
|
|
@@ -8536,13 +8623,13 @@ g([
|
|
|
8536
8623
|
i.forBlock.object_to_json_v1 = function(t) {
|
|
8537
8624
|
return [`__jsonStringifyV1__(${i.valueToCode(t, "OBJECT", _.NONE) || "null"})`, _.FUNCTION_CALL];
|
|
8538
8625
|
};
|
|
8539
|
-
const
|
|
8626
|
+
const Yn = N.xml, Aa = {
|
|
8540
8627
|
init: function() {
|
|
8541
|
-
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new
|
|
8628
|
+
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new Fo(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
8542
8629
|
}
|
|
8543
8630
|
};
|
|
8544
|
-
A.procedure_def_container_v1 =
|
|
8545
|
-
const
|
|
8631
|
+
A.procedure_def_container_v1 = Aa;
|
|
8632
|
+
const Ia = {
|
|
8546
8633
|
init: function() {
|
|
8547
8634
|
const t = new Et(Xe.DEFAULT_ARG);
|
|
8548
8635
|
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;
|
|
@@ -8564,8 +8651,8 @@ const Ta = {
|
|
|
8564
8651
|
return t;
|
|
8565
8652
|
}
|
|
8566
8653
|
};
|
|
8567
|
-
A.procedure_def_item_v1 =
|
|
8568
|
-
const
|
|
8654
|
+
A.procedure_def_item_v1 = Ia;
|
|
8655
|
+
const ya = {
|
|
8569
8656
|
init: function() {
|
|
8570
8657
|
this.withReturn = !1, this.args = [];
|
|
8571
8658
|
const t = new Et(
|
|
@@ -8579,9 +8666,9 @@ const Ea = {
|
|
|
8579
8666
|
), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_PROCEDURE_V1_DEF_TOOLTIP}"), this.setHelpUrl("%{BKY_PROCEDURE_V1_DEF_HELPURL}");
|
|
8580
8667
|
},
|
|
8581
8668
|
mutationToDom: function() {
|
|
8582
|
-
const t =
|
|
8669
|
+
const t = Yn.createElement("mutation");
|
|
8583
8670
|
return t.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), this.args.forEach((e) => {
|
|
8584
|
-
const n =
|
|
8671
|
+
const n = Yn.createElement("arg");
|
|
8585
8672
|
n.setAttribute("name", e.name), n.setAttribute("id", e.id), t.appendChild(n);
|
|
8586
8673
|
}), t;
|
|
8587
8674
|
},
|
|
@@ -8669,13 +8756,13 @@ const Ea = {
|
|
|
8669
8756
|
}
|
|
8670
8757
|
}
|
|
8671
8758
|
};
|
|
8672
|
-
A.procedure_def_v1 =
|
|
8673
|
-
const
|
|
8759
|
+
A.procedure_def_v1 = ya;
|
|
8760
|
+
const Oa = N.xml, va = {
|
|
8674
8761
|
init: function() {
|
|
8675
8762
|
this.withReturn = !1, this.appendDummyInput("DUMMY").appendField("%{BKY_PROCEDURE_RETURN}"), this.appendValueInput("VALUE").appendField("%{BKY_PROCEDURE_RETURN}").setVisible(!1), this.setPreviousStatement(!0), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_PROCEDURE_V1_RETURN_TOOLTIP}"), this.setHelpUrl("%{BKY_PROCEDURE_V1_RETURN_HELPURL}");
|
|
8676
8763
|
},
|
|
8677
8764
|
mutationToDom: function() {
|
|
8678
|
-
const t =
|
|
8765
|
+
const t = Oa.createElement("mutation");
|
|
8679
8766
|
return t.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), t;
|
|
8680
8767
|
},
|
|
8681
8768
|
domToMutation: function(t) {
|
|
@@ -8694,7 +8781,7 @@ const ga = N.xml, Aa = {
|
|
|
8694
8781
|
}, 0);
|
|
8695
8782
|
},
|
|
8696
8783
|
onchange: function(t) {
|
|
8697
|
-
if (t.type ===
|
|
8784
|
+
if (t.type === P.STATE_CHANGE)
|
|
8698
8785
|
this.checkWarning_();
|
|
8699
8786
|
else if (t.type === O.BLOCK_DRAG) {
|
|
8700
8787
|
const e = t;
|
|
@@ -8726,14 +8813,14 @@ const ga = N.xml, Aa = {
|
|
|
8726
8813
|
t.type === "procedure_def_v1" || t.type === "func_entry_v1" ? this.setWarningText(null) : this.setWarningText("the block can only be used in procedure block");
|
|
8727
8814
|
}
|
|
8728
8815
|
};
|
|
8729
|
-
A.procedure_return_v1 =
|
|
8816
|
+
A.procedure_return_v1 = va;
|
|
8730
8817
|
i.forBlock.procedure_return_v1 = function(t) {
|
|
8731
8818
|
const e = t;
|
|
8732
8819
|
return e.withReturn ? `return ${i.valueToCode(e, "VALUE", _.NONE) || "null"};
|
|
8733
8820
|
` : `return;
|
|
8734
8821
|
`;
|
|
8735
8822
|
};
|
|
8736
|
-
const
|
|
8823
|
+
const Ca = {
|
|
8737
8824
|
init: function() {
|
|
8738
8825
|
this.appendDummyInput().appendField("%{BKY_ASSET_V1_DOWNLOAD_ASSET_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_ASSET_V1_DOWNLOAD_ASSET_TOOLTIP}"), this.setHelpUrl("%{BKY_ASSET_V1_DOWNLOAD_ASSET_HELPURL}");
|
|
8739
8826
|
},
|
|
@@ -8756,7 +8843,7 @@ const Ia = {
|
|
|
8756
8843
|
]);
|
|
8757
8844
|
}
|
|
8758
8845
|
};
|
|
8759
|
-
A.download_resource_v1 =
|
|
8846
|
+
A.download_resource_v1 = Ca;
|
|
8760
8847
|
i.forBlock.download_resource_v1 = function(t) {
|
|
8761
8848
|
const e = i.valueToCode(t, "ASSET", _.ATOMIC) || null, n = i.statementToCode(t, "HANDLE");
|
|
8762
8849
|
return `{
|
|
@@ -8768,7 +8855,7 @@ ${n}
|
|
|
8768
8855
|
}
|
|
8769
8856
|
`;
|
|
8770
8857
|
};
|
|
8771
|
-
function
|
|
8858
|
+
function Eo(t) {
|
|
8772
8859
|
const e = I.resource.spaces.find((s) => s.id === t);
|
|
8773
8860
|
if (!e)
|
|
8774
8861
|
return [];
|
|
@@ -8784,13 +8871,13 @@ function mo(t) {
|
|
|
8784
8871
|
}
|
|
8785
8872
|
return o(e.dirTree, ""), n;
|
|
8786
8873
|
}
|
|
8787
|
-
function
|
|
8874
|
+
function ka(t) {
|
|
8788
8875
|
const e = [];
|
|
8789
|
-
return
|
|
8876
|
+
return Eo(t).forEach(({ id: o, name: s }) => {
|
|
8790
8877
|
e.push([s, o]);
|
|
8791
8878
|
}), B(e);
|
|
8792
8879
|
}
|
|
8793
|
-
function
|
|
8880
|
+
function go(t, e) {
|
|
8794
8881
|
const n = I.resource.spaces.find((s) => s.id === t);
|
|
8795
8882
|
if (!n)
|
|
8796
8883
|
return [];
|
|
@@ -8799,25 +8886,25 @@ function To(t, e) {
|
|
|
8799
8886
|
s.dirid === e && o.push(s);
|
|
8800
8887
|
}), o;
|
|
8801
8888
|
}
|
|
8802
|
-
function
|
|
8889
|
+
function Sa(t, e) {
|
|
8803
8890
|
const n = [];
|
|
8804
|
-
return
|
|
8891
|
+
return go(t, e).forEach(({ id: s, name: a }) => {
|
|
8805
8892
|
n.push([a, s]);
|
|
8806
8893
|
}), B(n);
|
|
8807
8894
|
}
|
|
8808
|
-
function
|
|
8895
|
+
function Ao() {
|
|
8809
8896
|
const t = [];
|
|
8810
8897
|
return I.resource.spaces.forEach((e) => {
|
|
8811
8898
|
e.resources.length > 0 && t.push(e);
|
|
8812
8899
|
}), t;
|
|
8813
8900
|
}
|
|
8814
|
-
function
|
|
8901
|
+
function Na() {
|
|
8815
8902
|
const t = [];
|
|
8816
|
-
return
|
|
8903
|
+
return Ao().forEach(({ id: n, name: o }) => {
|
|
8817
8904
|
t.push([o, n]);
|
|
8818
8905
|
}), B(t);
|
|
8819
8906
|
}
|
|
8820
|
-
const
|
|
8907
|
+
const La = {
|
|
8821
8908
|
init: function() {
|
|
8822
8909
|
this.space = {
|
|
8823
8910
|
id: "",
|
|
@@ -8839,19 +8926,19 @@ const Ca = {
|
|
|
8839
8926
|
initData_: function() {
|
|
8840
8927
|
if (this.space.id)
|
|
8841
8928
|
return;
|
|
8842
|
-
const t =
|
|
8929
|
+
const t = Ao()?.[0];
|
|
8843
8930
|
if (!t)
|
|
8844
8931
|
return;
|
|
8845
8932
|
this.space.id = t.id, this.space.name = t.name;
|
|
8846
8933
|
const e = this.getField("SPACE");
|
|
8847
8934
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
8848
|
-
const n =
|
|
8935
|
+
const n = Eo(this.space.id)?.[0];
|
|
8849
8936
|
if (!n)
|
|
8850
8937
|
return;
|
|
8851
8938
|
this.dir.id = n.id, this.dir.name = n.name;
|
|
8852
8939
|
const o = this.getField("DIR");
|
|
8853
8940
|
o.getOptions(!1), o.setValue(this.dir.id);
|
|
8854
|
-
const s =
|
|
8941
|
+
const s = go(this.space.id, this.dir.id)?.[0];
|
|
8855
8942
|
if (!s)
|
|
8856
8943
|
return;
|
|
8857
8944
|
this.resource.id = s.id, this.resource.name = s.name;
|
|
@@ -8869,20 +8956,20 @@ const Ca = {
|
|
|
8869
8956
|
this.space = Ye(t.space), this.dir = Ye(t.dir), this.resource = Ye(t.resource);
|
|
8870
8957
|
},
|
|
8871
8958
|
genSpaceOpts_: function() {
|
|
8872
|
-
return
|
|
8959
|
+
return Na();
|
|
8873
8960
|
},
|
|
8874
8961
|
genDirOpts_: function() {
|
|
8875
|
-
return
|
|
8962
|
+
return ka(this.space.id);
|
|
8876
8963
|
},
|
|
8877
8964
|
genResourceOpts_: function() {
|
|
8878
|
-
return
|
|
8965
|
+
return Sa(this.space.id, this.dir.id);
|
|
8879
8966
|
}
|
|
8880
8967
|
};
|
|
8881
|
-
A.select_resource_v1 =
|
|
8968
|
+
A.select_resource_v1 = La;
|
|
8882
8969
|
i.forBlock.select_resource_v1 = function() {
|
|
8883
8970
|
return "";
|
|
8884
8971
|
};
|
|
8885
|
-
const
|
|
8972
|
+
const Ba = {
|
|
8886
8973
|
init: function() {
|
|
8887
8974
|
this.appendDummyInput().appendField(
|
|
8888
8975
|
"%{BKY_RESOURCE_V1_UPLOAD_RESOURCE_TITLE}"
|
|
@@ -8913,7 +9000,7 @@ const ka = {
|
|
|
8913
9000
|
]);
|
|
8914
9001
|
}
|
|
8915
9002
|
};
|
|
8916
|
-
A.upload_resource_v1 =
|
|
9003
|
+
A.upload_resource_v1 = Ba;
|
|
8917
9004
|
i.forBlock.upload_resource_v1 = function(t) {
|
|
8918
9005
|
const e = i.valueToCode(t, "NAME", _.ATOMIC) || "''", n = i.valueToCode(t, "DIR", _.ATOMIC) || "null", o = i.valueToCode(t, "DATA", _.ATOMIC) || "null", s = i.statementToCode(t, "HANDLE");
|
|
8919
9006
|
return `{
|
|
@@ -8946,13 +9033,13 @@ g([
|
|
|
8946
9033
|
i.forBlock.text_v1 = function(t) {
|
|
8947
9034
|
return [i.quote_(t.getFieldValue("TEXT")), _.ATOMIC];
|
|
8948
9035
|
};
|
|
8949
|
-
const
|
|
9036
|
+
const ba = /^\s*'([^']|\\')*'\s*$/;
|
|
8950
9037
|
function se(t) {
|
|
8951
|
-
return
|
|
9038
|
+
return ba.test(t) ? [t, _.ATOMIC] : [`String(${t})`, _.FUNCTION_CALL];
|
|
8952
9039
|
}
|
|
8953
|
-
|
|
9040
|
+
U.register(
|
|
8954
9041
|
"text_append_tooltip_v1",
|
|
8955
|
-
|
|
9042
|
+
U.buildTooltipWithFieldText(
|
|
8956
9043
|
"%{BKY_TEXT_V1_APPEND_TOOLTIP}",
|
|
8957
9044
|
"VAR"
|
|
8958
9045
|
)
|
|
@@ -9152,10 +9239,10 @@ g([
|
|
|
9152
9239
|
i.forBlock.text_is_empty_v1 = function(t) {
|
|
9153
9240
|
return [`!${i.valueToCode(t, "VALUE", _.MEMBER) || "''"}.length`, _.LOGICAL_NOT];
|
|
9154
9241
|
};
|
|
9155
|
-
const
|
|
9242
|
+
const Pa = N.xml, Ra = {
|
|
9156
9243
|
itemCount_: 0,
|
|
9157
9244
|
mutationToDom: function() {
|
|
9158
|
-
const t =
|
|
9245
|
+
const t = Pa.createElement("mutation");
|
|
9159
9246
|
return t.setAttribute("items", `${this.itemCount_}`), t;
|
|
9160
9247
|
},
|
|
9161
9248
|
domToMutation: function(t) {
|
|
@@ -9226,13 +9313,13 @@ const Na = N.xml, La = {
|
|
|
9226
9313
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
9227
9314
|
this.removeInput("ADD" + t);
|
|
9228
9315
|
}
|
|
9229
|
-
},
|
|
9316
|
+
}, Da = function() {
|
|
9230
9317
|
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new It.MutatorIcon(["text_join_item_v1"], this));
|
|
9231
9318
|
};
|
|
9232
|
-
|
|
9319
|
+
U.registerMutator(
|
|
9233
9320
|
"text_join_mutator_v1",
|
|
9234
|
-
|
|
9235
|
-
|
|
9321
|
+
Ra,
|
|
9322
|
+
Da
|
|
9236
9323
|
);
|
|
9237
9324
|
g([
|
|
9238
9325
|
{
|
|
@@ -9464,7 +9551,7 @@ i.forBlock.text_trim_v1 = function(t) {
|
|
|
9464
9551
|
}[t.getFieldValue("MODE")];
|
|
9465
9552
|
return [`__trimV1__(${e}, ${o})`, _.ATOMIC];
|
|
9466
9553
|
};
|
|
9467
|
-
const
|
|
9554
|
+
const Ma = {
|
|
9468
9555
|
init: function() {
|
|
9469
9556
|
this.appendDummyInput().appendField("%{BKY_TIME_V1_CREATE_TIMER_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("time_blocks"), this.setTooltip("%{BKY_TIME_V1_CREATE_TIMER_TOOLTIP}"), this.setHelpUrl("%{BKY_TIME_V1_CREATE_TIMER_HELPURL}");
|
|
9470
9557
|
},
|
|
@@ -9490,7 +9577,7 @@ const ba = {
|
|
|
9490
9577
|
this.getInput("IMMEDIATE")?.setShadowDom(o);
|
|
9491
9578
|
}
|
|
9492
9579
|
};
|
|
9493
|
-
A.create_timer_v1 =
|
|
9580
|
+
A.create_timer_v1 = Ma;
|
|
9494
9581
|
i.forBlock.create_timer_v1 = function(t) {
|
|
9495
9582
|
const e = i.valueToCode(t, "INTERVAL", _.ATOMIC) || "1000", n = i.valueToCode(t, "LOOP", _.ATOMIC) || "false", o = i.valueToCode(t, "COUNT", _.ATOMIC) || "1", s = i.valueToCode(t, "IMMEDIATE", _.ATOMIC) || "false", a = i.statementToCode(t, "CALLBACK");
|
|
9496
9583
|
return `__createTimerV1__(${e}, ${n}, ${o}, ${s}, async function() {
|
|
@@ -9519,18 +9606,18 @@ i.forBlock.delay_v1 = function(t) {
|
|
|
9519
9606
|
return `await __delayV1__(${i.valueToCode(t, "DURATION", _.ATOMIC) || "0"});
|
|
9520
9607
|
`;
|
|
9521
9608
|
};
|
|
9522
|
-
const
|
|
9609
|
+
const Ua = {
|
|
9523
9610
|
customContextMenu: function(t) {
|
|
9524
9611
|
if (this.isInFlyout) {
|
|
9525
9612
|
if (this.type === "variable_get_v1") {
|
|
9526
9613
|
const e = {
|
|
9527
9614
|
text: m("RENAME_VARIABLE"),
|
|
9528
9615
|
enabled: !0,
|
|
9529
|
-
callback:
|
|
9616
|
+
callback: Va(this)
|
|
9530
9617
|
}, n = this.getField("VAR").getText(), o = {
|
|
9531
9618
|
text: m("DELETE_VARIABLE").replace("%1", n),
|
|
9532
9619
|
enabled: !0,
|
|
9533
|
-
callback:
|
|
9620
|
+
callback: xa(this)
|
|
9534
9621
|
};
|
|
9535
9622
|
t.unshift(e), t.unshift(o);
|
|
9536
9623
|
}
|
|
@@ -9544,24 +9631,24 @@ const Pa = {
|
|
|
9544
9631
|
t.push({
|
|
9545
9632
|
enabled: this.workspace.remainingCapacity() > 0,
|
|
9546
9633
|
text: n.replace("%1", o.getText()),
|
|
9547
|
-
callback:
|
|
9634
|
+
callback: Hn.callbackFactory(this, s)
|
|
9548
9635
|
});
|
|
9549
9636
|
}
|
|
9550
9637
|
}
|
|
9551
|
-
},
|
|
9638
|
+
}, Va = function(t) {
|
|
9552
9639
|
return function() {
|
|
9553
9640
|
const e = t.workspace, o = t.getField("VAR").getVariable();
|
|
9554
9641
|
bt.renameVariable(e, o);
|
|
9555
9642
|
};
|
|
9556
|
-
},
|
|
9643
|
+
}, xa = function(t) {
|
|
9557
9644
|
return function() {
|
|
9558
9645
|
const n = t.getField("VAR").getVariable();
|
|
9559
9646
|
n && bt.deleteVariable(n.getWorkspace(), n, t);
|
|
9560
9647
|
};
|
|
9561
9648
|
};
|
|
9562
|
-
|
|
9649
|
+
U.registerMixin(
|
|
9563
9650
|
"context_menu_variable_v1",
|
|
9564
|
-
|
|
9651
|
+
Ua
|
|
9565
9652
|
);
|
|
9566
9653
|
g([
|
|
9567
9654
|
{
|
|
@@ -9617,15 +9704,15 @@ i.forBlock.variable_set_v1 = function(t) {
|
|
|
9617
9704
|
return `${e} = ${n};
|
|
9618
9705
|
`;
|
|
9619
9706
|
};
|
|
9620
|
-
|
|
9621
|
-
const n = await
|
|
9707
|
+
Gn.setConfirm(async (t, e) => {
|
|
9708
|
+
const n = await os({
|
|
9622
9709
|
title: "",
|
|
9623
9710
|
text: t
|
|
9624
9711
|
});
|
|
9625
9712
|
e(!!n);
|
|
9626
9713
|
});
|
|
9627
|
-
|
|
9628
|
-
const o = await
|
|
9714
|
+
Gn.setPrompt(async (t, e, n) => {
|
|
9715
|
+
const o = await ss({
|
|
9629
9716
|
title: "",
|
|
9630
9717
|
value: e
|
|
9631
9718
|
});
|
|
@@ -9635,15 +9722,15 @@ const te = v.prototype;
|
|
|
9635
9722
|
te.doClassValidation_ = function(t) {
|
|
9636
9723
|
return t;
|
|
9637
9724
|
};
|
|
9638
|
-
const
|
|
9725
|
+
const Ya = te.doValueUpdate_;
|
|
9639
9726
|
te.doValueUpdate_ = function(t) {
|
|
9640
|
-
|
|
9727
|
+
Ya.call(this, t), this.selectedOption && this.selectedOption[1] !== t && (this.selectedOption = null);
|
|
9641
9728
|
};
|
|
9642
|
-
const
|
|
9729
|
+
const Fa = te.getText_;
|
|
9643
9730
|
te.getText_ = function() {
|
|
9644
9731
|
if (this.selectedOption)
|
|
9645
|
-
return
|
|
9646
|
-
const { i18n: t } =
|
|
9732
|
+
return Fa.call(this);
|
|
9733
|
+
const { i18n: t } = yt, e = this.getSourceBlock();
|
|
9647
9734
|
if (this.name === "APP")
|
|
9648
9735
|
return e.app.name;
|
|
9649
9736
|
if (this.name === "PAGE")
|
|
@@ -9658,7 +9745,7 @@ te.getText_ = function() {
|
|
|
9658
9745
|
}
|
|
9659
9746
|
} else if (this.name === "PROPERTY") {
|
|
9660
9747
|
const { kind: n, names: o } = e.property;
|
|
9661
|
-
return
|
|
9748
|
+
return zn(n, o);
|
|
9662
9749
|
} else if (this.name === "EVENT") {
|
|
9663
9750
|
const { kind: n, names: o } = e.event;
|
|
9664
9751
|
return console.log(e.event), Oe(n, o);
|
|
@@ -9683,8 +9770,8 @@ te.getText_ = function() {
|
|
|
9683
9770
|
}
|
|
9684
9771
|
return "<n/a>";
|
|
9685
9772
|
};
|
|
9686
|
-
const
|
|
9687
|
-
|
|
9773
|
+
const Fn = 60;
|
|
9774
|
+
wo.prototype.cleanUp = function() {
|
|
9688
9775
|
this.setResizesEnabled(!1);
|
|
9689
9776
|
const t = O.getGroup();
|
|
9690
9777
|
t || O.setGroup(!0);
|
|
@@ -9702,30 +9789,30 @@ Yo.prototype.cleanUp = function() {
|
|
|
9702
9789
|
c.moveBy(-l.left, r - l.top, ["cleanup"]), c.snapToGrid(), l = c.getBoundingRectangle();
|
|
9703
9790
|
let d = a(l);
|
|
9704
9791
|
for (; d != null; )
|
|
9705
|
-
r = d.top + d.getHeight() +
|
|
9706
|
-
r = c.getRelativeToSurfaceXY().y + c.getHeightWidth().height +
|
|
9792
|
+
r = d.top + d.getHeight() + Fn, c.moveBy(0, r - l.top, ["cleanup"]), c.snapToGrid(), l = c.getBoundingRectangle(), d = a(l);
|
|
9793
|
+
r = c.getRelativeToSurfaceXY().y + c.getHeightWidth().height + Fn;
|
|
9707
9794
|
}
|
|
9708
9795
|
O.setGroup(t), this.setResizesEnabled(!0);
|
|
9709
9796
|
};
|
|
9710
|
-
function
|
|
9797
|
+
function Io(t) {
|
|
9711
9798
|
const e = t.getParent();
|
|
9712
|
-
return e &&
|
|
9799
|
+
return e && Io(e) ? !0 : !e && !!(t.outputConnection || t.previousConnection);
|
|
9713
9800
|
}
|
|
9714
|
-
class
|
|
9801
|
+
class wa {
|
|
9715
9802
|
init() {
|
|
9716
|
-
const e =
|
|
9803
|
+
const e = Ko.registry.getItem("blockDisable");
|
|
9717
9804
|
e && (e.preconditionFn = function(n) {
|
|
9718
9805
|
const o = n.block;
|
|
9719
|
-
return o && !o.isInFlyout && o.workspace.options.disable && o.isEditable() ? o.getInheritedDisabled() ||
|
|
9806
|
+
return o && !o.isInFlyout && o.workspace.options.disable && o.isEditable() ? o.getInheritedDisabled() || Io(o) ? "disabled" : "enabled" : "hidden";
|
|
9720
9807
|
});
|
|
9721
9808
|
}
|
|
9722
9809
|
}
|
|
9723
|
-
|
|
9724
|
-
|
|
9725
|
-
const
|
|
9726
|
-
|
|
9727
|
-
const
|
|
9728
|
-
|
|
9810
|
+
$o.registerFieldColour();
|
|
9811
|
+
Ho.registry.unregister(Go.names.ESCAPE);
|
|
9812
|
+
const Ka = new Wo.CrossTabCopyPaste();
|
|
9813
|
+
Ka.init({ contextMenu: !0, shortcut: !0 });
|
|
9814
|
+
const $a = new wa();
|
|
9815
|
+
$a.init();
|
|
9729
9816
|
function fn(t) {
|
|
9730
9817
|
const e = Xt();
|
|
9731
9818
|
if (!e)
|
|
@@ -9739,7 +9826,7 @@ function fn(t) {
|
|
|
9739
9826
|
const s = o.getRelativeToSurfaceXY(), a = s.x * e.scale, r = s.y * e.scale;
|
|
9740
9827
|
e.scroll(-a, -r);
|
|
9741
9828
|
}
|
|
9742
|
-
function
|
|
9829
|
+
function yo() {
|
|
9743
9830
|
const t = Xt();
|
|
9744
9831
|
if (!t)
|
|
9745
9832
|
return;
|
|
@@ -9897,7 +9984,7 @@ ye.Classic.categoryStyles = {
|
|
|
9897
9984
|
colour: "#a55b80"
|
|
9898
9985
|
}
|
|
9899
9986
|
};
|
|
9900
|
-
const
|
|
9987
|
+
const Ha = Wn.defineTheme("light", {
|
|
9901
9988
|
name: "light",
|
|
9902
9989
|
base: ye.Classic,
|
|
9903
9990
|
componentStyles: {
|
|
@@ -9913,7 +10000,7 @@ const Fa = Gn.defineTheme("light", {
|
|
|
9913
10000
|
scrollbarOpacity: 0.4,
|
|
9914
10001
|
cursorColour: ""
|
|
9915
10002
|
}
|
|
9916
|
-
}),
|
|
10003
|
+
}), Ga = Wn.defineTheme("dark", {
|
|
9917
10004
|
name: "dark",
|
|
9918
10005
|
base: ye.Classic,
|
|
9919
10006
|
componentStyles: {
|
|
@@ -9930,14 +10017,14 @@ const Fa = Gn.defineTheme("light", {
|
|
|
9930
10017
|
cursorColour: ""
|
|
9931
10018
|
}
|
|
9932
10019
|
});
|
|
9933
|
-
function
|
|
10020
|
+
function Wa(t) {
|
|
9934
10021
|
const e = Xt();
|
|
9935
10022
|
switch (t) {
|
|
9936
10023
|
case "light":
|
|
9937
|
-
e.setTheme(
|
|
10024
|
+
e.setTheme(Ha);
|
|
9938
10025
|
break;
|
|
9939
10026
|
case "dark":
|
|
9940
|
-
e.setTheme(
|
|
10027
|
+
e.setTheme(Ga);
|
|
9941
10028
|
break;
|
|
9942
10029
|
}
|
|
9943
10030
|
}
|
|
@@ -9945,7 +10032,7 @@ const cn = ["get_app_property_v1", "get_app_state_v1"];
|
|
|
9945
10032
|
function ht(t, e) {
|
|
9946
10033
|
return t.find((o) => o === e) !== void 0 ? !1 : (t.push(e), !0);
|
|
9947
10034
|
}
|
|
9948
|
-
function
|
|
10035
|
+
function ja(t) {
|
|
9949
10036
|
const e = [];
|
|
9950
10037
|
function n(o) {
|
|
9951
10038
|
for (const s of o.getChildren(!0))
|
|
@@ -9953,23 +10040,23 @@ function $a(t) {
|
|
|
9953
10040
|
}
|
|
9954
10041
|
return n(t), e;
|
|
9955
10042
|
}
|
|
9956
|
-
function
|
|
10043
|
+
function Xa(t) {
|
|
9957
10044
|
const e = [];
|
|
9958
10045
|
for (const n of t)
|
|
9959
10046
|
if (n.type === "get_app_property_v1") {
|
|
9960
10047
|
const o = n;
|
|
9961
10048
|
ht(
|
|
9962
10049
|
e,
|
|
9963
|
-
|
|
10050
|
+
St({
|
|
9964
10051
|
type: "elementProperty",
|
|
9965
10052
|
nodeId: o.node.id,
|
|
9966
10053
|
propertyKeys: o.property.key
|
|
9967
10054
|
})
|
|
9968
10055
|
);
|
|
9969
|
-
} else n.type === "get_app_state_v1" ? ht(e,
|
|
10056
|
+
} else n.type === "get_app_state_v1" ? ht(e, St({ type: "state", stateId: n.state.id })) : console.assert(!1);
|
|
9970
10057
|
return e;
|
|
9971
10058
|
}
|
|
9972
|
-
function
|
|
10059
|
+
function Ja(t) {
|
|
9973
10060
|
const e = [];
|
|
9974
10061
|
for (const n of t.getChildren(!0))
|
|
9975
10062
|
if (cn.includes(n.type))
|
|
@@ -9980,7 +10067,7 @@ function Ga(t) {
|
|
|
9980
10067
|
}
|
|
9981
10068
|
return e;
|
|
9982
10069
|
}
|
|
9983
|
-
function
|
|
10070
|
+
function qa(t) {
|
|
9984
10071
|
const e = [], n = [];
|
|
9985
10072
|
for (const o of t)
|
|
9986
10073
|
if (o.type === "get_app_property_v1") {
|
|
@@ -9996,12 +10083,12 @@ function Wa(t) {
|
|
|
9996
10083
|
} : (s.property.kind === "elementSlotProperty" || s.property.kind === "customSlotProperty") && (a = {
|
|
9997
10084
|
type: "adaptSlotProperty",
|
|
9998
10085
|
propertyId: s.property.key
|
|
9999
|
-
}), !a || !ht(n,
|
|
10086
|
+
}), !a || !ht(n, St(a)))
|
|
10000
10087
|
continue;
|
|
10001
10088
|
e.push(a);
|
|
10002
10089
|
} else if (o.type === "get_app_state_v1") {
|
|
10003
10090
|
const a = { type: "state", stateId: o.state.id };
|
|
10004
|
-
if (!ht(n,
|
|
10091
|
+
if (!ht(n, St(a)))
|
|
10005
10092
|
continue;
|
|
10006
10093
|
e.push(a);
|
|
10007
10094
|
} else if (o.type === "object_get_v1") {
|
|
@@ -10026,7 +10113,7 @@ function Wa(t) {
|
|
|
10026
10113
|
type: "adaptSlotProperty",
|
|
10027
10114
|
propertyId: r.property.key,
|
|
10028
10115
|
subKeys: a
|
|
10029
|
-
}), !c || !ht(n,
|
|
10116
|
+
}), !c || !ht(n, St(c)))
|
|
10030
10117
|
continue;
|
|
10031
10118
|
e.push(c);
|
|
10032
10119
|
} else if (s.type === "get_app_state_v1") {
|
|
@@ -10035,7 +10122,7 @@ function Wa(t) {
|
|
|
10035
10122
|
stateId: s.state.id,
|
|
10036
10123
|
subKeys: a
|
|
10037
10124
|
};
|
|
10038
|
-
if (!ht(n,
|
|
10125
|
+
if (!ht(n, St(c)))
|
|
10039
10126
|
continue;
|
|
10040
10127
|
e.push(c);
|
|
10041
10128
|
} else
|
|
@@ -10044,7 +10131,7 @@ function Wa(t) {
|
|
|
10044
10131
|
console.assert(!1);
|
|
10045
10132
|
return e;
|
|
10046
10133
|
}
|
|
10047
|
-
function
|
|
10134
|
+
function Qa(t) {
|
|
10048
10135
|
const e = {
|
|
10049
10136
|
watchEffect: {},
|
|
10050
10137
|
bind: {
|
|
@@ -10056,27 +10143,27 @@ function ja(t) {
|
|
|
10056
10143
|
return e;
|
|
10057
10144
|
for (const o of n)
|
|
10058
10145
|
if (o.type === "watch_effect_v1") {
|
|
10059
|
-
const s =
|
|
10146
|
+
const s = ja(o), a = Xa(s);
|
|
10060
10147
|
for (const r of a)
|
|
10061
10148
|
e.watchEffect[r] || (e.watchEffect[r] = []), ht(e.watchEffect[r], o.id);
|
|
10062
10149
|
} else if (o.type === "app_bind_v1") {
|
|
10063
|
-
const s =
|
|
10150
|
+
const s = Ja(o), a = qa(s);
|
|
10064
10151
|
e.bind.sets[o.id] = a;
|
|
10065
10152
|
for (const r of a) {
|
|
10066
|
-
const c =
|
|
10153
|
+
const c = St(r);
|
|
10067
10154
|
e.bind.triggers[c] || (e.bind.triggers[c] = []), ht(e.bind.triggers[c], o.id);
|
|
10068
10155
|
}
|
|
10069
10156
|
}
|
|
10070
10157
|
return e;
|
|
10071
10158
|
}
|
|
10072
|
-
const
|
|
10073
|
-
function
|
|
10074
|
-
|
|
10159
|
+
const Oo = Symbol();
|
|
10160
|
+
function za(t) {
|
|
10161
|
+
ps(Oo, t);
|
|
10075
10162
|
}
|
|
10076
10163
|
function mn() {
|
|
10077
|
-
return
|
|
10164
|
+
return ds(Oo);
|
|
10078
10165
|
}
|
|
10079
|
-
const
|
|
10166
|
+
const Za = /* @__PURE__ */ pt({
|
|
10080
10167
|
__name: "index",
|
|
10081
10168
|
props: {
|
|
10082
10169
|
lock: { type: Boolean }
|
|
@@ -10088,7 +10175,7 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10088
10175
|
return;
|
|
10089
10176
|
}
|
|
10090
10177
|
if (s.lock) {
|
|
10091
|
-
|
|
10178
|
+
Xn(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
10092
10179
|
return;
|
|
10093
10180
|
}
|
|
10094
10181
|
a.workspace.cleanUp();
|
|
@@ -10097,12 +10184,12 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10097
10184
|
};
|
|
10098
10185
|
return e({ cleanWorkspace: c }), (d, u) => {
|
|
10099
10186
|
const h = F("v-btn"), p = F("v-tooltip");
|
|
10100
|
-
return
|
|
10187
|
+
return M(), ut(p, {
|
|
10101
10188
|
disabled: r.value,
|
|
10102
10189
|
text: Y(n)("x-block-lib.tip.hotkeyCtrlQ")
|
|
10103
10190
|
}, {
|
|
10104
10191
|
activator: lt(({ props: f }) => [
|
|
10105
|
-
|
|
10192
|
+
D(h, ln(f, {
|
|
10106
10193
|
density: "comfortable",
|
|
10107
10194
|
icon: "mdi-broom",
|
|
10108
10195
|
variant: "outlined",
|
|
@@ -10113,7 +10200,7 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10113
10200
|
}, 8, ["disabled", "text"]);
|
|
10114
10201
|
};
|
|
10115
10202
|
}
|
|
10116
|
-
}),
|
|
10203
|
+
}), tc = /* @__PURE__ */ pt({
|
|
10117
10204
|
__name: "index",
|
|
10118
10205
|
props: {
|
|
10119
10206
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10124,12 +10211,12 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10124
10211
|
const { t: e } = Qt(), n = _n(), o = Ht(t, "modelValue"), s = $(() => n.smAndDown.value);
|
|
10125
10212
|
return (a, r) => {
|
|
10126
10213
|
const c = F("v-btn"), l = F("v-tooltip");
|
|
10127
|
-
return
|
|
10214
|
+
return M(), ut(l, {
|
|
10128
10215
|
disabled: s.value,
|
|
10129
10216
|
text: Y(e)("x-block-lib.tip.hotkeyCtrlW")
|
|
10130
10217
|
}, {
|
|
10131
10218
|
activator: lt(({ props: d }) => [
|
|
10132
|
-
|
|
10219
|
+
D(c, ln(d, {
|
|
10133
10220
|
density: "comfortable",
|
|
10134
10221
|
icon: o.value ? "mdi-lock" : "mdi-lock-open",
|
|
10135
10222
|
variant: "outlined",
|
|
@@ -10140,11 +10227,11 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10140
10227
|
}, 8, ["disabled", "text"]);
|
|
10141
10228
|
};
|
|
10142
10229
|
}
|
|
10143
|
-
}),
|
|
10230
|
+
}), ec = { class: "d-flex flex-column" }, nc = { class: "text-subtitle-1 ml-6" }, oc = {
|
|
10144
10231
|
key: 0,
|
|
10145
10232
|
class: "text-caption text-grey text-truncate ml-6",
|
|
10146
10233
|
style: { maxWidth: "340px" }
|
|
10147
|
-
},
|
|
10234
|
+
}, sc = /* @__PURE__ */ pt({
|
|
10148
10235
|
__name: "item",
|
|
10149
10236
|
props: {
|
|
10150
10237
|
id: {},
|
|
@@ -10172,20 +10259,20 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10172
10259
|
pointerEvents: "none"
|
|
10173
10260
|
}));
|
|
10174
10261
|
return (u, h) => {
|
|
10175
|
-
const p = F("v-spacer"), f = F("v-icon"), T =
|
|
10176
|
-
return
|
|
10262
|
+
const p = F("v-spacer"), f = F("v-icon"), T = hs("ripple");
|
|
10263
|
+
return fs((M(), it("div", {
|
|
10177
10264
|
class: "d-flex align-center cursor-pointer",
|
|
10178
10265
|
style: z(l.value),
|
|
10179
10266
|
onClick: h[1] || (h[1] = (E) => r("x-click", a.id)),
|
|
10180
10267
|
onMouseout: h[2] || (h[2] = (E) => c.value = !1),
|
|
10181
10268
|
onMouseover: h[3] || (h[3] = (E) => c.value = !0)
|
|
10182
10269
|
}, [
|
|
10183
|
-
X("div",
|
|
10184
|
-
X("span",
|
|
10185
|
-
a.desc ? (
|
|
10270
|
+
X("div", ec, [
|
|
10271
|
+
X("span", nc, Gt(a.title), 1),
|
|
10272
|
+
a.desc ? (M(), it("span", oc, Gt(a.desc), 1)) : dt("", !0)
|
|
10186
10273
|
]),
|
|
10187
|
-
|
|
10188
|
-
|
|
10274
|
+
D(p),
|
|
10275
|
+
D(f, {
|
|
10189
10276
|
class: "x-handle cursor-move mr-3",
|
|
10190
10277
|
icon: "mdi-drag-horizontal-variant",
|
|
10191
10278
|
onMousedown: h[0] || (h[0] = Kt(() => {
|
|
@@ -10199,10 +10286,10 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10199
10286
|
]);
|
|
10200
10287
|
};
|
|
10201
10288
|
}
|
|
10202
|
-
}),
|
|
10289
|
+
}), ic = {
|
|
10203
10290
|
key: 1,
|
|
10204
10291
|
class: "text-caption text-grey"
|
|
10205
|
-
},
|
|
10292
|
+
}, ac = /* @__PURE__ */ pt({
|
|
10206
10293
|
__name: "index",
|
|
10207
10294
|
props: /* @__PURE__ */ ze({
|
|
10208
10295
|
lock: { type: Boolean }
|
|
@@ -10220,18 +10307,18 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10220
10307
|
}
|
|
10221
10308
|
const p = [];
|
|
10222
10309
|
s.workspace.getTopBlocks(!0).forEach((T) => {
|
|
10223
|
-
const E = T.id ===
|
|
10310
|
+
const E = T.id === Xo()?.id;
|
|
10224
10311
|
let y = "";
|
|
10225
10312
|
if (T.type.startsWith("on_app_event_v")) {
|
|
10226
|
-
const
|
|
10227
|
-
Lt && (y = n(Lt.name),
|
|
10313
|
+
const R = T, Lt = V[R.node.key];
|
|
10314
|
+
Lt && (y = n(Lt.name), R.node.alias && (y += " / " + R.node.alias), y += " - " + Oe(R.event.kind, R.event.names));
|
|
10228
10315
|
} else if (T.type.startsWith("watch_effect_v"))
|
|
10229
10316
|
y = n("x-block-lib.watchEffect");
|
|
10230
10317
|
else if (T.type.startsWith("app_bind_v"))
|
|
10231
10318
|
y = n("x-block-lib.bind");
|
|
10232
10319
|
else if (T.type.startsWith("implement_app_method_v")) {
|
|
10233
|
-
const
|
|
10234
|
-
y = n("x-block-lib.implementMethod"), y += " - " + ve(
|
|
10320
|
+
const R = T;
|
|
10321
|
+
y = n("x-block-lib.implementMethod"), y += " - " + ve(R.method.kind, R.method.names);
|
|
10235
10322
|
} else T.type.startsWith("func_entry_v") ? y = n("x-block-lib.funcEntry") : T.type.startsWith("procedure_def_v") ? y = n("x-block-lib.procedure") + " - " + T.getFieldValue("NAME") : y = n("x-block-lib.temporaryBlock");
|
|
10236
10323
|
const k = T.getCommentText() ?? "";
|
|
10237
10324
|
p.push({
|
|
@@ -10245,7 +10332,7 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10245
10332
|
let c = [];
|
|
10246
10333
|
const l = () => {
|
|
10247
10334
|
if (t.lock) {
|
|
10248
|
-
|
|
10335
|
+
Xn(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
10249
10336
|
return;
|
|
10250
10337
|
}
|
|
10251
10338
|
const p = [];
|
|
@@ -10277,16 +10364,16 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10277
10364
|
E
|
|
10278
10365
|
).getRelativeToSurfaceXY().y + 10);
|
|
10279
10366
|
const k = T.getRelativeToSurfaceXY();
|
|
10280
|
-
T.moveTo(new N.Coordinate(k.x, y)), s.workspace.cleanUp(),
|
|
10367
|
+
T.moveTo(new N.Coordinate(k.x, y)), s.workspace.cleanUp(), yo();
|
|
10281
10368
|
}, h = async (p) => {
|
|
10282
10369
|
if (!s.workspace) {
|
|
10283
10370
|
console.assert(!1);
|
|
10284
10371
|
return;
|
|
10285
10372
|
}
|
|
10286
10373
|
const f = s.workspace.getBlockById(p);
|
|
10287
|
-
|
|
10374
|
+
jn.setSelected(f), fn(p), o.value = !1;
|
|
10288
10375
|
};
|
|
10289
|
-
return (p, f) => a.value.length > 0 ? (
|
|
10376
|
+
return (p, f) => a.value.length > 0 ? (M(), ut(Y(jo), {
|
|
10290
10377
|
key: 0,
|
|
10291
10378
|
modelValue: a.value,
|
|
10292
10379
|
"onUpdate:modelValue": f[0] || (f[0] = (T) => a.value = T),
|
|
@@ -10298,7 +10385,7 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10298
10385
|
onStart: l
|
|
10299
10386
|
}, {
|
|
10300
10387
|
default: lt(() => [
|
|
10301
|
-
(
|
|
10388
|
+
(M(!0), it(to, null, ms(a.value, (T) => (M(), ut(sc, {
|
|
10302
10389
|
id: T.id,
|
|
10303
10390
|
key: T.id,
|
|
10304
10391
|
desc: T.desc,
|
|
@@ -10308,14 +10395,14 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10308
10395
|
}, null, 8, ["id", "desc", "select", "title"]))), 128))
|
|
10309
10396
|
]),
|
|
10310
10397
|
_: 1
|
|
10311
|
-
}, 8, ["modelValue"])) : (
|
|
10398
|
+
}, 8, ["modelValue"])) : (M(), it("span", ic, Gt(Y(n)("x-block-lib.noOption")), 1));
|
|
10312
10399
|
}
|
|
10313
|
-
}),
|
|
10400
|
+
}), cc = (t, e) => {
|
|
10314
10401
|
const n = t.__vccOpts || t;
|
|
10315
10402
|
for (const [o, s] of e)
|
|
10316
10403
|
n[o] = s;
|
|
10317
10404
|
return n;
|
|
10318
|
-
},
|
|
10405
|
+
}, rc = /* @__PURE__ */ cc(ac, [["__scopeId", "data-v-a77ed323"]]), uc = /* @__PURE__ */ pt({
|
|
10319
10406
|
__name: "index",
|
|
10320
10407
|
props: {
|
|
10321
10408
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10337,20 +10424,20 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10337
10424
|
return;
|
|
10338
10425
|
}
|
|
10339
10426
|
const l = c.getBlockById(r);
|
|
10340
|
-
|
|
10427
|
+
jn.setSelected(l), fn(r), n.value = !1;
|
|
10341
10428
|
};
|
|
10342
|
-
return (r, c) => (
|
|
10429
|
+
return (r, c) => (M(), it("div", {
|
|
10343
10430
|
onClick: c[0] || (c[0] = (l) => a(""))
|
|
10344
10431
|
}, "blockTree"));
|
|
10345
10432
|
}
|
|
10346
|
-
}),
|
|
10433
|
+
}), lc = { class: "text-subtitle-1" }, _c = /* @__PURE__ */ pt({
|
|
10347
10434
|
__name: "index",
|
|
10348
10435
|
props: {
|
|
10349
10436
|
type: {},
|
|
10350
10437
|
lock: { type: Boolean }
|
|
10351
10438
|
},
|
|
10352
10439
|
setup(t, { expose: e }) {
|
|
10353
|
-
const { t: n } = Qt(), o = _n(), { sysBarAvail: s } =
|
|
10440
|
+
const { t: n } = Qt(), o = _n(), { sysBarAvail: s } = Jn(), { backgroundColor1: a } = Jt(), r = $(() => o.smAndDown.value), c = $(() => {
|
|
10354
10441
|
let T = "100%";
|
|
10355
10442
|
return o.mdAndUp.value && (T = "400px"), {
|
|
10356
10443
|
background: a.value,
|
|
@@ -10366,16 +10453,16 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10366
10453
|
}), d = $(() => ({
|
|
10367
10454
|
height: "60px"
|
|
10368
10455
|
})), { open: u } = rn(`blocklyNavigatorDlg${Ze()}`);
|
|
10369
|
-
|
|
10456
|
+
Ts(() => {
|
|
10370
10457
|
u.value = !1;
|
|
10371
10458
|
});
|
|
10372
10459
|
const h = $t("blockList"), p = $t("blockTree");
|
|
10373
10460
|
return e({ open: u, update: () => {
|
|
10374
10461
|
t.type === "list" ? h.value?.update() : t.type === "tree" && p.value?.update();
|
|
10375
10462
|
} }), (T, E) => {
|
|
10376
|
-
const y = F("v-sheet"), k = F("v-btn"),
|
|
10377
|
-
return
|
|
10378
|
-
|
|
10463
|
+
const y = F("v-sheet"), k = F("v-btn"), R = F("v-spacer"), Lt = F("v-dialog"), Ve = F("v-tooltip");
|
|
10464
|
+
return M(), it(to, null, [
|
|
10465
|
+
D(Lt, {
|
|
10379
10466
|
modelValue: Y(u),
|
|
10380
10467
|
"onUpdate:modelValue": E[5] || (E[5] = (Q) => oe(u) ? u.value = Q : null),
|
|
10381
10468
|
eager: "",
|
|
@@ -10383,7 +10470,7 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10383
10470
|
"no-click-animation": "",
|
|
10384
10471
|
persistent: "",
|
|
10385
10472
|
transition: "scroll-x-reverse-transition",
|
|
10386
|
-
onKeydown: E[6] || (E[6] =
|
|
10473
|
+
onKeydown: E[6] || (E[6] = eo(Kt((Q) => u.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
10387
10474
|
}, {
|
|
10388
10475
|
default: lt(() => [
|
|
10389
10476
|
X("div", {
|
|
@@ -10395,25 +10482,25 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10395
10482
|
class: "elevation-2",
|
|
10396
10483
|
style: z(c.value)
|
|
10397
10484
|
}, [
|
|
10398
|
-
Y(s) ? (
|
|
10485
|
+
Y(s) ? (M(), ut(y, {
|
|
10399
10486
|
key: 0,
|
|
10400
10487
|
color: "transparent",
|
|
10401
10488
|
height: 24
|
|
10402
10489
|
})) : dt("", !0),
|
|
10403
|
-
|
|
10490
|
+
D(y, {
|
|
10404
10491
|
class: "d-flex align-center px-2",
|
|
10405
10492
|
color: "transparent",
|
|
10406
10493
|
height: 48
|
|
10407
10494
|
}, {
|
|
10408
10495
|
default: lt(() => [
|
|
10409
|
-
|
|
10496
|
+
D(k, {
|
|
10410
10497
|
density: "comfortable",
|
|
10411
10498
|
icon: "mdi-close",
|
|
10412
10499
|
variant: "text",
|
|
10413
10500
|
onClick: E[0] || (E[0] = (Q) => u.value = !1)
|
|
10414
10501
|
}),
|
|
10415
|
-
X("span",
|
|
10416
|
-
R
|
|
10502
|
+
X("span", lc, Gt(Y(n)("x-block-lib.navigator")), 1),
|
|
10503
|
+
D(R)
|
|
10417
10504
|
]),
|
|
10418
10505
|
_: 1
|
|
10419
10506
|
}),
|
|
@@ -10421,14 +10508,14 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10421
10508
|
class: "overflow-y-auto",
|
|
10422
10509
|
style: z(l.value)
|
|
10423
10510
|
}, [
|
|
10424
|
-
t.type === "list" ? (
|
|
10511
|
+
t.type === "list" ? (M(), ut(rc, {
|
|
10425
10512
|
key: 0,
|
|
10426
10513
|
ref_key: "blockList",
|
|
10427
10514
|
ref: h,
|
|
10428
10515
|
modelValue: Y(u),
|
|
10429
10516
|
"onUpdate:modelValue": E[1] || (E[1] = (Q) => oe(u) ? u.value = Q : null),
|
|
10430
10517
|
lock: t.lock
|
|
10431
|
-
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (
|
|
10518
|
+
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (M(), ut(uc, {
|
|
10432
10519
|
key: 1,
|
|
10433
10520
|
ref_key: "blockTree",
|
|
10434
10521
|
ref: p,
|
|
@@ -10444,12 +10531,12 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10444
10531
|
]),
|
|
10445
10532
|
_: 1
|
|
10446
10533
|
}, 8, ["modelValue"]),
|
|
10447
|
-
|
|
10534
|
+
D(Ve, {
|
|
10448
10535
|
disabled: r.value,
|
|
10449
10536
|
text: Y(n)("x-block-lib.tip.hotkeyCtrlE")
|
|
10450
10537
|
}, {
|
|
10451
10538
|
activator: lt(({ props: Q }) => [
|
|
10452
|
-
|
|
10539
|
+
D(k, ln(Q, {
|
|
10453
10540
|
density: "comfortable",
|
|
10454
10541
|
icon: "mdi-navigation-variant",
|
|
10455
10542
|
variant: "outlined",
|
|
@@ -10473,7 +10560,7 @@ function C(t, e) {
|
|
|
10473
10560
|
n.appendChild(o);
|
|
10474
10561
|
return n;
|
|
10475
10562
|
}
|
|
10476
|
-
function
|
|
10563
|
+
function vo(t) {
|
|
10477
10564
|
const e = W.createElement("mutation");
|
|
10478
10565
|
for (const { key: n, value: o } of t)
|
|
10479
10566
|
e.setAttribute(n, o);
|
|
@@ -10490,7 +10577,7 @@ function Mt(t, e) {
|
|
|
10490
10577
|
const a = W.createTextNode(e);
|
|
10491
10578
|
return s.appendChild(a), o.appendChild(s), n.appendChild(o), n;
|
|
10492
10579
|
}
|
|
10493
|
-
function
|
|
10580
|
+
function wn(t, e) {
|
|
10494
10581
|
e === void 0 && (e = 0);
|
|
10495
10582
|
const n = W.createElement("value");
|
|
10496
10583
|
n.setAttribute("name", t);
|
|
@@ -10501,7 +10588,7 @@ function Fn(t, e) {
|
|
|
10501
10588
|
const a = W.createTextNode(String(e));
|
|
10502
10589
|
return s.appendChild(a), o.appendChild(s), n.appendChild(o), n;
|
|
10503
10590
|
}
|
|
10504
|
-
function
|
|
10591
|
+
function pc(t, e) {
|
|
10505
10592
|
e === void 0 && (e = !1);
|
|
10506
10593
|
const n = W.createElement("value");
|
|
10507
10594
|
n.setAttribute("name", t);
|
|
@@ -10512,19 +10599,19 @@ function rc(t, e) {
|
|
|
10512
10599
|
const a = W.createTextNode(e ? "TRUE" : "FALSE");
|
|
10513
10600
|
return s.appendChild(a), o.appendChild(s), n.appendChild(o), n;
|
|
10514
10601
|
}
|
|
10515
|
-
function
|
|
10602
|
+
function dc() {
|
|
10516
10603
|
const { activeObject: t, activeComp: e } = I.app;
|
|
10517
10604
|
return !(t.type !== "comp" || !e.meta.events || e.meta.events.length <= 0);
|
|
10518
10605
|
}
|
|
10519
|
-
function
|
|
10606
|
+
function hc() {
|
|
10520
10607
|
const { activeObject: t, activeComp: e } = I.app;
|
|
10521
10608
|
return !(t.type !== "comp" || !e.meta.states || e.meta.states.length <= 0);
|
|
10522
10609
|
}
|
|
10523
|
-
function
|
|
10610
|
+
function Kn() {
|
|
10524
10611
|
const { activeObject: t, activeComp: e } = I.app;
|
|
10525
10612
|
return !(t.type !== "comp" || !e.meta.methods || e.meta.methods.length <= 0);
|
|
10526
10613
|
}
|
|
10527
|
-
function
|
|
10614
|
+
function fc() {
|
|
10528
10615
|
const { activeObject: t, activeComp: e } = I.app;
|
|
10529
10616
|
if (t.type !== "comp")
|
|
10530
10617
|
return !1;
|
|
@@ -10535,55 +10622,55 @@ function _c() {
|
|
|
10535
10622
|
}
|
|
10536
10623
|
return !1;
|
|
10537
10624
|
}
|
|
10538
|
-
function
|
|
10625
|
+
function mc() {
|
|
10539
10626
|
const t = [];
|
|
10540
|
-
return t.push(G(m("LABEL_EVENT"))), Z("onEvent") && t.push(C("on_app_event_v1")),
|
|
10541
|
-
C("app_bind_v1", [
|
|
10542
|
-
), t.push(C("watch_effect_v1")), (Z("getProperty") || Z("setProperty")) && t.push(G(m("LABEL_PROPERTY"))), Z("getProperty") && t.push(C("get_app_property_v1")), Z("setProperty") && t.push(C("set_app_property_v1")),
|
|
10627
|
+
return t.push(G(m("LABEL_EVENT"))), Z("onEvent") && t.push(C("on_app_event_v1")), dc() && t.push(C("trigger_app_event_v1")), t.push(
|
|
10628
|
+
C("app_bind_v1", [vo([{ key: "items", value: "2" }])])
|
|
10629
|
+
), t.push(C("watch_effect_v1")), (Z("getProperty") || Z("setProperty")) && t.push(G(m("LABEL_PROPERTY"))), Z("getProperty") && t.push(C("get_app_property_v1")), Z("setProperty") && t.push(C("set_app_property_v1")), hc() && (t.push(G(m("LABEL_STATE"))), t.push(C("get_app_state_v1")), t.push(C("set_app_state_v1"))), (Z("callMethod") || Kn()) && t.push(G(m("LABEL_METHOD"))), Z("callMethod") && t.push(C("call_app_method_v1")), Kn() && (t.push(C("implement_app_method_v1")), fc() && t.push(C("set_app_method_output_v1")), t.push(C("procedure_return_v1"))), t;
|
|
10543
10630
|
}
|
|
10544
|
-
const
|
|
10545
|
-
function
|
|
10631
|
+
const Co = { name: "APP_COMP_CATEGORY", callback: mc };
|
|
10632
|
+
function Tc() {
|
|
10546
10633
|
const t = [];
|
|
10547
10634
|
return t.push(G(m("LABEL_FUNC"))), t.push(G(m("LABEL_FLOW"))), t;
|
|
10548
10635
|
}
|
|
10549
|
-
const he = { name: "APP_COMPUTE_CATEGORY", callback:
|
|
10550
|
-
function
|
|
10636
|
+
const he = { name: "APP_COMPUTE_CATEGORY", callback: Tc };
|
|
10637
|
+
function Ec() {
|
|
10551
10638
|
const t = [];
|
|
10552
10639
|
return t.push(C("app_debug_trace_v1", [Mt("OBJECT")])), t.push(C("popup_message_v1", [Mt("TEXT")])), t.push(C("open_confirm_dlg_v1")), t.push(C("open_prompt_dlg_v1")), t;
|
|
10553
10640
|
}
|
|
10554
|
-
const fe = { name: "APP_MESSAGE_CATEGORY", callback:
|
|
10555
|
-
function
|
|
10641
|
+
const fe = { name: "APP_MESSAGE_CATEGORY", callback: Ec };
|
|
10642
|
+
function gc() {
|
|
10556
10643
|
for (const t of I.app.appList)
|
|
10557
10644
|
if (t.pages.length > 0)
|
|
10558
10645
|
return !0;
|
|
10559
10646
|
return !1;
|
|
10560
10647
|
}
|
|
10561
|
-
function
|
|
10648
|
+
function Ac() {
|
|
10562
10649
|
const t = [];
|
|
10563
|
-
return t.push(C("app_env_is_v1")),
|
|
10650
|
+
return t.push(C("app_env_is_v1")), gc() && t.push(C("navigate_to_v1")), t;
|
|
10564
10651
|
}
|
|
10565
|
-
const me = { name: "APP_MISC_CATEGORY", callback:
|
|
10566
|
-
function
|
|
10652
|
+
const me = { name: "APP_MISC_CATEGORY", callback: Ac };
|
|
10653
|
+
function Ic() {
|
|
10567
10654
|
const { activeObject: t, activePage: e } = I.app;
|
|
10568
10655
|
return !(t.type !== "page" || !e.meta.states || e.meta.states.length <= 0);
|
|
10569
10656
|
}
|
|
10570
|
-
function
|
|
10657
|
+
function yc() {
|
|
10571
10658
|
const { activeObject: t, activePage: e } = I.app;
|
|
10572
10659
|
return !(t.type !== "page" || !e.meta.arguments || e.meta.arguments.length <= 0);
|
|
10573
10660
|
}
|
|
10574
|
-
function
|
|
10661
|
+
function Oc() {
|
|
10575
10662
|
const t = [];
|
|
10576
10663
|
return t.push(G(m("LABEL_EVENT"))), Z("onEvent") && t.push(C("on_app_event_v1")), t.push(
|
|
10577
|
-
C("app_bind_v1", [
|
|
10578
|
-
), t.push(C("watch_effect_v1")), (Z("getProperty") || Z("setProperty")) && t.push(G(m("LABEL_PROPERTY"))), Z("getProperty") && t.push(C("get_app_property_v1")), Z("setProperty") && t.push(C("set_app_property_v1")),
|
|
10664
|
+
C("app_bind_v1", [vo([{ key: "items", value: "2" }])])
|
|
10665
|
+
), t.push(C("watch_effect_v1")), (Z("getProperty") || Z("setProperty")) && t.push(G(m("LABEL_PROPERTY"))), Z("getProperty") && t.push(C("get_app_property_v1")), Z("setProperty") && t.push(C("set_app_property_v1")), Ic() && (t.push(G(m("LABEL_STATE"))), t.push(C("get_app_state_v1")), t.push(C("set_app_state_v1"))), Z("callMethod") && (t.push(G(m("LABEL_METHOD"))), t.push(C("call_app_method_v1"))), yc() && (t.push(G(m("LABEL_ARGUMENT"))), t.push(C("get_page_argument_v1"))), t;
|
|
10579
10666
|
}
|
|
10580
|
-
const
|
|
10581
|
-
function
|
|
10667
|
+
const ko = { name: "APP_PAGE_CATEGORY", callback: Oc };
|
|
10668
|
+
function vc() {
|
|
10582
10669
|
const t = [];
|
|
10583
10670
|
return t.push(G(m("LABEL_RESOURCE"))), t.push(C("upload_resource_v1")), t;
|
|
10584
10671
|
}
|
|
10585
|
-
const Te = { name: "APP_RESOURCE_CATEGORY", callback:
|
|
10586
|
-
function
|
|
10672
|
+
const Te = { name: "APP_RESOURCE_CATEGORY", callback: vc }, Ft = N.xml;
|
|
10673
|
+
function Cc() {
|
|
10587
10674
|
const t = [];
|
|
10588
10675
|
{
|
|
10589
10676
|
const e = Ft.createElement("label");
|
|
@@ -10608,9 +10695,9 @@ function Ic() {
|
|
|
10608
10695
|
}
|
|
10609
10696
|
const ft = {
|
|
10610
10697
|
name: "PROCEDURE_CATEGORY",
|
|
10611
|
-
callback:
|
|
10698
|
+
callback: Cc
|
|
10612
10699
|
}, ne = N.xml;
|
|
10613
|
-
function
|
|
10700
|
+
function kc() {
|
|
10614
10701
|
const t = Xt(), e = [];
|
|
10615
10702
|
{
|
|
10616
10703
|
const o = ne.createElement("label");
|
|
@@ -10648,22 +10735,22 @@ function yc() {
|
|
|
10648
10735
|
}
|
|
10649
10736
|
const mt = {
|
|
10650
10737
|
name: "VARIABLE_CATEGORY",
|
|
10651
|
-
callback:
|
|
10738
|
+
callback: kc
|
|
10652
10739
|
};
|
|
10653
|
-
function
|
|
10740
|
+
function Sc() {
|
|
10654
10741
|
const t = [];
|
|
10655
10742
|
if (at().length > 0)
|
|
10656
10743
|
t.push(G(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(
|
|
10657
10744
|
C("interrupt_transaction_v1", [Mt("VALUE")])
|
|
10658
10745
|
), t.push(G(m("LABEL_CONDITION"))), t.push(C("cond_logic_v1")), t.push(C("cond_atomic_v1", [Mt("VALUE")])), t.push(G(m("LABEL_QUERY_EXTRA"))), t.push(
|
|
10659
10746
|
C("query_extra_limit_v1", [
|
|
10660
|
-
|
|
10661
|
-
|
|
10747
|
+
wn("OFFSET", 0),
|
|
10748
|
+
wn("LIMIT", 1)
|
|
10662
10749
|
])
|
|
10663
10750
|
), t.push(
|
|
10664
10751
|
C("query_extra_sortby_v1", [
|
|
10665
10752
|
Mt("COLUMN"),
|
|
10666
|
-
|
|
10753
|
+
pc("DESC")
|
|
10667
10754
|
])
|
|
10668
10755
|
);
|
|
10669
10756
|
else {
|
|
@@ -10672,30 +10759,30 @@ function Oc() {
|
|
|
10672
10759
|
}
|
|
10673
10760
|
return t;
|
|
10674
10761
|
}
|
|
10675
|
-
const Ee = { name: "COMPUTE_DATA_CATEGORY", callback:
|
|
10676
|
-
function
|
|
10762
|
+
const Ee = { name: "COMPUTE_DATA_CATEGORY", callback: Sc };
|
|
10763
|
+
function Nc() {
|
|
10677
10764
|
return Zt("flow").length > 0;
|
|
10678
10765
|
}
|
|
10679
|
-
function
|
|
10766
|
+
function Lc() {
|
|
10680
10767
|
const t = [];
|
|
10681
|
-
return I.compute.activeObject.type === "flow" && t.push(C("on_flow_state_event_v1")),
|
|
10768
|
+
return I.compute.activeObject.type === "flow" && t.push(C("on_flow_state_event_v1")), Nc() && console.assert(!0), t;
|
|
10682
10769
|
}
|
|
10683
|
-
const ge = { name: "COMPUTE_FLOW_CATEGORY", callback:
|
|
10684
|
-
function
|
|
10770
|
+
const ge = { name: "COMPUTE_FLOW_CATEGORY", callback: Lc };
|
|
10771
|
+
function Bc() {
|
|
10685
10772
|
return Zt("func").length > 0;
|
|
10686
10773
|
}
|
|
10687
|
-
function
|
|
10774
|
+
function bc() {
|
|
10688
10775
|
const { activeObject: t, activeFunc: e } = I.compute, n = [];
|
|
10689
|
-
return t.type === "func" && (n.push(C("func_entry_v1")), e.outputs && e.outputs.length > 0 && n.push(C("set_func_output_v1")), n.push(C("procedure_return_v1"))),
|
|
10776
|
+
return t.type === "func" && (n.push(C("func_entry_v1")), e.outputs && e.outputs.length > 0 && n.push(C("set_func_output_v1")), n.push(C("procedure_return_v1"))), Bc() && n.push(C("call_func_internal_v1")), n;
|
|
10690
10777
|
}
|
|
10691
|
-
const Ae = { name: "COMPUTE_FUNC_CATEGORY", callback:
|
|
10692
|
-
function
|
|
10778
|
+
const Ae = { name: "COMPUTE_FUNC_CATEGORY", callback: bc };
|
|
10779
|
+
function Pc() {
|
|
10693
10780
|
const t = [];
|
|
10694
10781
|
return t.push(
|
|
10695
10782
|
C("compute_debug_trace_v1", [Mt("OBJECT")])
|
|
10696
10783
|
), t;
|
|
10697
10784
|
}
|
|
10698
|
-
const Ie = { name: "COMPUTE_MISC_CATEGORY", callback:
|
|
10785
|
+
const Ie = { name: "COMPUTE_MISC_CATEGORY", callback: Pc }, Be = {
|
|
10699
10786
|
kind: "category",
|
|
10700
10787
|
name: "%{BKY_CATEGORY_COLOR}",
|
|
10701
10788
|
categorystyle: "color_category",
|
|
@@ -11374,7 +11461,7 @@ const Ie = { name: "COMPUTE_MISC_CATEGORY", callback: Nc }, Be = {
|
|
|
11374
11461
|
type: "text_reverse_v1"
|
|
11375
11462
|
}
|
|
11376
11463
|
]
|
|
11377
|
-
},
|
|
11464
|
+
}, So = {
|
|
11378
11465
|
kind: "category",
|
|
11379
11466
|
name: "%{BKY_CATEGORY_TIME}",
|
|
11380
11467
|
categorystyle: "time_category",
|
|
@@ -11398,14 +11485,14 @@ const Ie = { name: "COMPUTE_MISC_CATEGORY", callback: Nc }, Be = {
|
|
|
11398
11485
|
}
|
|
11399
11486
|
}
|
|
11400
11487
|
]
|
|
11401
|
-
},
|
|
11488
|
+
}, Rc = {
|
|
11402
11489
|
kind: "categoryToolbox",
|
|
11403
11490
|
contents: [
|
|
11404
11491
|
{
|
|
11405
11492
|
kind: "category",
|
|
11406
11493
|
name: "%{BKY_CATEGORY_COMP}",
|
|
11407
11494
|
categorystyle: "misc_category",
|
|
11408
|
-
custom:
|
|
11495
|
+
custom: Co.name
|
|
11409
11496
|
},
|
|
11410
11497
|
{
|
|
11411
11498
|
kind: "category",
|
|
@@ -11426,7 +11513,7 @@ const Ie = { name: "COMPUTE_MISC_CATEGORY", callback: Nc }, Be = {
|
|
|
11426
11513
|
be,
|
|
11427
11514
|
Me,
|
|
11428
11515
|
Be,
|
|
11429
|
-
|
|
11516
|
+
So,
|
|
11430
11517
|
{
|
|
11431
11518
|
kind: "category",
|
|
11432
11519
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -11452,7 +11539,7 @@ const Ie = { name: "COMPUTE_MISC_CATEGORY", callback: Nc }, Be = {
|
|
|
11452
11539
|
custom: he.name
|
|
11453
11540
|
}
|
|
11454
11541
|
]
|
|
11455
|
-
},
|
|
11542
|
+
}, Dc = {
|
|
11456
11543
|
kind: "categoryToolbox",
|
|
11457
11544
|
contents: [
|
|
11458
11545
|
{
|
|
@@ -11499,7 +11586,7 @@ const Ie = { name: "COMPUTE_MISC_CATEGORY", callback: Nc }, Be = {
|
|
|
11499
11586
|
custom: ft.name
|
|
11500
11587
|
}
|
|
11501
11588
|
]
|
|
11502
|
-
},
|
|
11589
|
+
}, Mc = {
|
|
11503
11590
|
kind: "categoryToolbox",
|
|
11504
11591
|
contents: [
|
|
11505
11592
|
{
|
|
@@ -11546,7 +11633,7 @@ const Ie = { name: "COMPUTE_MISC_CATEGORY", callback: Nc }, Be = {
|
|
|
11546
11633
|
custom: ft.name
|
|
11547
11634
|
}
|
|
11548
11635
|
]
|
|
11549
|
-
},
|
|
11636
|
+
}, Uc = {
|
|
11550
11637
|
kind: "categoryToolbox",
|
|
11551
11638
|
contents: [
|
|
11552
11639
|
{
|
|
@@ -11577,14 +11664,14 @@ const Ie = { name: "COMPUTE_MISC_CATEGORY", callback: Nc }, Be = {
|
|
|
11577
11664
|
]
|
|
11578
11665
|
}
|
|
11579
11666
|
]
|
|
11580
|
-
},
|
|
11667
|
+
}, Vc = {
|
|
11581
11668
|
kind: "categoryToolbox",
|
|
11582
11669
|
contents: [
|
|
11583
11670
|
{
|
|
11584
11671
|
kind: "category",
|
|
11585
11672
|
name: "%{BKY_CATEGORY_PAGE}",
|
|
11586
11673
|
categorystyle: "misc_category",
|
|
11587
|
-
custom:
|
|
11674
|
+
custom: ko.name
|
|
11588
11675
|
},
|
|
11589
11676
|
{
|
|
11590
11677
|
kind: "category",
|
|
@@ -11605,7 +11692,7 @@ const Ie = { name: "COMPUTE_MISC_CATEGORY", callback: Nc }, Be = {
|
|
|
11605
11692
|
be,
|
|
11606
11693
|
Me,
|
|
11607
11694
|
Be,
|
|
11608
|
-
|
|
11695
|
+
So,
|
|
11609
11696
|
{
|
|
11610
11697
|
kind: "category",
|
|
11611
11698
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -11657,23 +11744,23 @@ const Ie = { name: "COMPUTE_MISC_CATEGORY", callback: Nc }, Be = {
|
|
|
11657
11744
|
wheel: !0
|
|
11658
11745
|
}
|
|
11659
11746
|
};
|
|
11660
|
-
function
|
|
11661
|
-
We.theme = o ? "dark" : "light", We.toolbox =
|
|
11662
|
-
const s =
|
|
11663
|
-
return s.addChangeListener(
|
|
11747
|
+
function xc(t, e, n, o) {
|
|
11748
|
+
We.theme = o ? "dark" : "light", We.toolbox = Yc(e, n);
|
|
11749
|
+
const s = Jo(t, We);
|
|
11750
|
+
return s.addChangeListener(qo.shadowBlockConversionChangeListener), Fc(s, e, n), wc(s), s;
|
|
11664
11751
|
}
|
|
11665
|
-
function
|
|
11752
|
+
function Yc(t, e) {
|
|
11666
11753
|
let n;
|
|
11667
|
-
return t === "page" ? e === "v1" && (n =
|
|
11754
|
+
return t === "page" ? e === "v1" && (n = Vc) : t === "comp" ? e === "v1" && (n = Rc) : t === "func" ? e === "v1" && (n = Mc) : t === "flow" ? e === "v1" && (n = Dc) : t === "json" && e === "v1" && (n = Uc), console.assert(!!n, `invalid toolbox type=${t} version=${e}`), n;
|
|
11668
11755
|
}
|
|
11669
|
-
function
|
|
11756
|
+
function Fc(t, e, n) {
|
|
11670
11757
|
function o({ name: s, callback: a }) {
|
|
11671
11758
|
t.registerToolboxCategoryCallback(s, () => a(e));
|
|
11672
11759
|
}
|
|
11673
|
-
e === "page" ? n === "v1" && (o(
|
|
11760
|
+
e === "page" ? n === "v1" && (o(ko), o(fe), o(me), o(mt), o(ft), o(Te), o(he)) : e === "comp" ? n === "v1" && (o(Co), o(fe), o(me), o(mt), o(ft), o(Te), o(he)) : e === "func" ? n === "v1" && (o(Ae), o(ge), o(Ee), o(Ie), o(mt), o(ft)) : e === "flow" && n === "v1" && (o(Ae), o(ge), o(Ee), o(Ie), o(mt), o(ft));
|
|
11674
11761
|
}
|
|
11675
|
-
function
|
|
11676
|
-
const { router: e } =
|
|
11762
|
+
function wc(t) {
|
|
11763
|
+
const { router: e } = yt;
|
|
11677
11764
|
t.registerButtonCallback("NO_COMPUTE", () => {
|
|
11678
11765
|
const n = e.resolve({
|
|
11679
11766
|
path: "/compute/" + Date.now()
|
|
@@ -11690,7 +11777,7 @@ function Vc(t) {
|
|
|
11690
11777
|
}, 100);
|
|
11691
11778
|
});
|
|
11692
11779
|
}
|
|
11693
|
-
function
|
|
11780
|
+
function Kc(t, e) {
|
|
11694
11781
|
const n = e.newBlock("json_root_v1");
|
|
11695
11782
|
n.initSvg(), n.render();
|
|
11696
11783
|
const o = (s, a) => {
|
|
@@ -11732,7 +11819,7 @@ function xc(t, e) {
|
|
|
11732
11819
|
new (O.get(O.FINISHED_LOADING))(e)
|
|
11733
11820
|
);
|
|
11734
11821
|
}
|
|
11735
|
-
function
|
|
11822
|
+
function $c(t) {
|
|
11736
11823
|
const e = (o) => {
|
|
11737
11824
|
if (!o)
|
|
11738
11825
|
return null;
|
|
@@ -11764,7 +11851,7 @@ function Yc(t) {
|
|
|
11764
11851
|
if (o.type === "json_root_v1")
|
|
11765
11852
|
return e(o);
|
|
11766
11853
|
}
|
|
11767
|
-
const
|
|
11854
|
+
const Hc = { class: "position-relative w-100 h-100" }, Gc = /* @__PURE__ */ pt({
|
|
11768
11855
|
__name: "index",
|
|
11769
11856
|
props: /* @__PURE__ */ ze({
|
|
11770
11857
|
type: {},
|
|
@@ -11780,7 +11867,7 @@ const Fc = { class: "position-relative w-100 h-100" }, wc = /* @__PURE__ */ pt({
|
|
|
11780
11867
|
emits: /* @__PURE__ */ ze(["ready"], ["update:lock", "update:scale"]),
|
|
11781
11868
|
setup(t, { expose: e, emit: n }) {
|
|
11782
11869
|
const { backgroundColor2: o } = Jt(), s = Ht(t, "lock"), a = Ht(t, "scale"), r = n, c = `blocklyEditor${Ze()}`, l = Pt(), d = $t("parentContainer"), u = $t("clean"), h = $t("navigator"), p = {};
|
|
11783
|
-
|
|
11870
|
+
za(p);
|
|
11784
11871
|
const f = Pt(!0), T = Pt(!1), E = $(() => t.type === "json" ? "tree" : "list"), y = $(() => ({
|
|
11785
11872
|
width: "100%",
|
|
11786
11873
|
height: "calc(100% - 48px)"
|
|
@@ -11790,7 +11877,7 @@ const Fc = { class: "position-relative w-100 h-100" }, wc = /* @__PURE__ */ pt({
|
|
|
11790
11877
|
bottom: "0px",
|
|
11791
11878
|
width: "100%",
|
|
11792
11879
|
height: "48px"
|
|
11793
|
-
})),
|
|
11880
|
+
})), R = $(() => ({
|
|
11794
11881
|
position: "absolute",
|
|
11795
11882
|
background: t.dark ? "#0000007f" : "#ffffff7f",
|
|
11796
11883
|
top: "1px",
|
|
@@ -11830,21 +11917,21 @@ const Fc = { class: "position-relative w-100 h-100" }, wc = /* @__PURE__ */ pt({
|
|
|
11830
11917
|
console.assert(!1);
|
|
11831
11918
|
return;
|
|
11832
11919
|
}
|
|
11833
|
-
|
|
11920
|
+
Qo(d.value), await Bn(t.locale), p.workspace = xc(l.value, t.type, t.version, t.dark), p.workspace.addChangeListener(O.disableOrphans), p.workspace.addChangeListener(No);
|
|
11834
11921
|
const b = document.querySelector(`#${c} .blocklyFlyout`);
|
|
11835
11922
|
new MutationObserver((xe) => {
|
|
11836
11923
|
xe.forEach((ee) => {
|
|
11837
11924
|
ee.type === "attributes" && ee.attributeName === "style" && (xt.value = p.workspace.getFlyout().isVisible());
|
|
11838
11925
|
});
|
|
11839
|
-
}).observe(b, { attributes: !0 }), xt.value = p.workspace.getFlyout().isVisible(), En(), gn(), await
|
|
11926
|
+
}).observe(b, { attributes: !0 }), xt.value = p.workspace.getFlyout().isVisible(), En(), gn(), await Es(), r("ready");
|
|
11840
11927
|
}), Ln(() => {
|
|
11841
11928
|
xt.value = !1;
|
|
11842
|
-
}),
|
|
11843
|
-
p.workspace &&
|
|
11929
|
+
}), zo(l, () => {
|
|
11930
|
+
p.workspace && Zo(p.workspace);
|
|
11844
11931
|
});
|
|
11845
|
-
async function
|
|
11932
|
+
async function No(b) {
|
|
11846
11933
|
if (b.type === O.FINISHED_LOADING) {
|
|
11847
|
-
|
|
11934
|
+
yo(), setTimeout(() => {
|
|
11848
11935
|
h.value?.update();
|
|
11849
11936
|
}, 0), f.value = !1;
|
|
11850
11937
|
return;
|
|
@@ -11859,19 +11946,19 @@ const Fc = { class: "position-relative w-100 h-100" }, wc = /* @__PURE__ */ pt({
|
|
|
11859
11946
|
}, 0);
|
|
11860
11947
|
}
|
|
11861
11948
|
}
|
|
11862
|
-
const
|
|
11863
|
-
f.value = !0, t.type === "json" ?
|
|
11864
|
-
},
|
|
11949
|
+
const Lo = (b) => {
|
|
11950
|
+
f.value = !0, t.type === "json" ? Kc(b, p.workspace) : J.workspaces.load(b, p.workspace);
|
|
11951
|
+
}, Bo = () => t.type === "json" ? $c(p.workspace) : J.workspaces.save(p.workspace), bo = () => {
|
|
11865
11952
|
if (t.type === "json")
|
|
11866
11953
|
console.assert(!1);
|
|
11867
11954
|
else
|
|
11868
11955
|
return i.workspaceToCode(p.workspace);
|
|
11869
|
-
},
|
|
11956
|
+
}, Po = () => Qa(p.workspace), En = () => {
|
|
11870
11957
|
p.workspace.setIsReadOnly(s.value), p.workspace.isReadOnly() && (xt.value = !1);
|
|
11871
11958
|
}, gn = () => {
|
|
11872
11959
|
p.workspace.setScale(a.value);
|
|
11873
|
-
},
|
|
11874
|
-
p.workspace.fireChangeListener(new
|
|
11960
|
+
}, Ro = () => {
|
|
11961
|
+
p.workspace.fireChangeListener(new no());
|
|
11875
11962
|
}, An = () => {
|
|
11876
11963
|
u.value?.cleanWorkspace();
|
|
11877
11964
|
}, In = () => {
|
|
@@ -11891,7 +11978,7 @@ const Fc = { class: "position-relative w-100 h-100" }, wc = /* @__PURE__ */ pt({
|
|
|
11891
11978
|
), Yt(
|
|
11892
11979
|
() => t.dark,
|
|
11893
11980
|
(b) => {
|
|
11894
|
-
|
|
11981
|
+
Wa(b ? "dark" : "light");
|
|
11895
11982
|
}
|
|
11896
11983
|
), Yt(xt, (b) => {
|
|
11897
11984
|
b || p.workspace?.hideChaff();
|
|
@@ -11901,14 +11988,14 @@ const Fc = { class: "position-relative w-100 h-100" }, wc = /* @__PURE__ */ pt({
|
|
|
11901
11988
|
gn();
|
|
11902
11989
|
}), e({
|
|
11903
11990
|
loading: f,
|
|
11904
|
-
load:
|
|
11905
|
-
save:
|
|
11906
|
-
generateCode:
|
|
11907
|
-
generateReactivity:
|
|
11908
|
-
fireStateChange:
|
|
11909
|
-
}), (b,
|
|
11991
|
+
load: Lo,
|
|
11992
|
+
save: Bo,
|
|
11993
|
+
generateCode: bo,
|
|
11994
|
+
generateReactivity: Po,
|
|
11995
|
+
fireStateChange: Ro
|
|
11996
|
+
}), (b, Ct) => {
|
|
11910
11997
|
const xe = F("v-icon"), ee = F("x-loading");
|
|
11911
|
-
return
|
|
11998
|
+
return M(), it("div", Hc, [
|
|
11912
11999
|
X("div", {
|
|
11913
12000
|
id: c,
|
|
11914
12001
|
ref_key: "blocklyDiv",
|
|
@@ -11918,44 +12005,44 @@ const Fc = { class: "position-relative w-100 h-100" }, wc = /* @__PURE__ */ pt({
|
|
|
11918
12005
|
X("div", {
|
|
11919
12006
|
style: z(k.value)
|
|
11920
12007
|
}, [
|
|
11921
|
-
|
|
12008
|
+
gs(b.$slots, "bottom")
|
|
11922
12009
|
], 4),
|
|
11923
|
-
T.value ? (
|
|
12010
|
+
T.value ? (M(), it("div", {
|
|
11924
12011
|
key: 0,
|
|
11925
12012
|
class: "d-flex flex-column justify-center align-center",
|
|
11926
|
-
style: z(
|
|
12013
|
+
style: z(R.value)
|
|
11927
12014
|
}, [
|
|
11928
|
-
|
|
12015
|
+
D(xe, {
|
|
11929
12016
|
icon: "mdi-delete",
|
|
11930
12017
|
size: "x-large"
|
|
11931
12018
|
})
|
|
11932
12019
|
], 4)) : dt("", !0),
|
|
11933
|
-
f.value ? dt("", !0) : (
|
|
12020
|
+
f.value ? dt("", !0) : (M(), it("div", {
|
|
11934
12021
|
key: 1,
|
|
11935
12022
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
11936
12023
|
style: z(Lt.value)
|
|
11937
12024
|
}, [
|
|
11938
|
-
|
|
12025
|
+
D(Za, {
|
|
11939
12026
|
ref_key: "clean",
|
|
11940
12027
|
ref: u,
|
|
11941
12028
|
lock: s.value
|
|
11942
12029
|
}, null, 8, ["lock"]),
|
|
11943
|
-
|
|
12030
|
+
D(tc, {
|
|
11944
12031
|
modelValue: s.value,
|
|
11945
|
-
"onUpdate:modelValue":
|
|
12032
|
+
"onUpdate:modelValue": Ct[0] || (Ct[0] = (Do) => s.value = Do)
|
|
11946
12033
|
}, null, 8, ["modelValue"]),
|
|
11947
|
-
|
|
12034
|
+
D(_c, {
|
|
11948
12035
|
ref_key: "navigator",
|
|
11949
12036
|
ref: h,
|
|
11950
12037
|
lock: s.value,
|
|
11951
12038
|
type: E.value
|
|
11952
12039
|
}, null, 8, ["lock", "type"])
|
|
11953
12040
|
], 4)),
|
|
11954
|
-
s.value ? (
|
|
12041
|
+
s.value ? (M(), it("div", {
|
|
11955
12042
|
key: 2,
|
|
11956
12043
|
style: z(Q.value)
|
|
11957
12044
|
}, null, 4)) : dt("", !0),
|
|
11958
|
-
s.value ? (
|
|
12045
|
+
s.value ? (M(), it("div", {
|
|
11959
12046
|
key: 3,
|
|
11960
12047
|
style: z(Ve.value)
|
|
11961
12048
|
}, null, 4)) : dt("", !0),
|
|
@@ -11964,31 +12051,31 @@ const Fc = { class: "position-relative w-100 h-100" }, wc = /* @__PURE__ */ pt({
|
|
|
11964
12051
|
ref: d,
|
|
11965
12052
|
style: z(Tn.value)
|
|
11966
12053
|
}, null, 4),
|
|
11967
|
-
|
|
12054
|
+
D(ee, {
|
|
11968
12055
|
open: f.value,
|
|
11969
12056
|
"z-index": 99
|
|
11970
12057
|
}, null, 8, ["open"])
|
|
11971
12058
|
]);
|
|
11972
12059
|
};
|
|
11973
12060
|
}
|
|
11974
|
-
}),
|
|
12061
|
+
}), Wc = /* @__PURE__ */ pt({
|
|
11975
12062
|
__name: "index",
|
|
11976
12063
|
props: {
|
|
11977
12064
|
code: {}
|
|
11978
12065
|
},
|
|
11979
12066
|
setup(t) {
|
|
11980
12067
|
const e = t;
|
|
11981
|
-
|
|
11982
|
-
const n =
|
|
12068
|
+
ts.registerLanguage("javascript", es);
|
|
12069
|
+
const n = ns.component, { backgroundColor2: o } = Jt();
|
|
11983
12070
|
return (s, a) => {
|
|
11984
12071
|
const r = F("v-sheet");
|
|
11985
|
-
return
|
|
12072
|
+
return M(), ut(r, {
|
|
11986
12073
|
color: Y(o),
|
|
11987
12074
|
height: "100%",
|
|
11988
12075
|
width: "100%"
|
|
11989
12076
|
}, {
|
|
11990
12077
|
default: lt(() => [
|
|
11991
|
-
|
|
12078
|
+
D(Y(n), {
|
|
11992
12079
|
code: e.code,
|
|
11993
12080
|
language: "js"
|
|
11994
12081
|
}, null, 8, ["code"])
|
|
@@ -11997,10 +12084,10 @@ const Fc = { class: "position-relative w-100 h-100" }, wc = /* @__PURE__ */ pt({
|
|
|
11997
12084
|
}, 8, ["color"]);
|
|
11998
12085
|
};
|
|
11999
12086
|
}
|
|
12000
|
-
}),
|
|
12087
|
+
}), jc = { class: "text-subtitle-1" }, Xc = { class: "w-100 h-100 overflow-auto" }, Jc = /* @__PURE__ */ pt({
|
|
12001
12088
|
__name: "index",
|
|
12002
12089
|
setup(t) {
|
|
12003
|
-
const { t: e } = Qt(), { sysBarAvail: n } =
|
|
12090
|
+
const { t: e } = Qt(), { sysBarAvail: n } = Jn(), { backgroundColor0: o, backgroundColor2: s } = Jt(), a = Pt(""), r = $(() => {
|
|
12004
12091
|
let d = 48;
|
|
12005
12092
|
return n.value && (d += 24), {
|
|
12006
12093
|
position: "relative",
|
|
@@ -12011,49 +12098,49 @@ const Fc = { class: "position-relative w-100 h-100" }, wc = /* @__PURE__ */ pt({
|
|
|
12011
12098
|
}, { open: l } = rn("sourceDlg", c);
|
|
12012
12099
|
return (d, u) => {
|
|
12013
12100
|
const h = F("v-sheet"), p = F("v-btn"), f = F("v-spacer"), T = F("v-dialog");
|
|
12014
|
-
return
|
|
12101
|
+
return M(), ut(T, {
|
|
12015
12102
|
modelValue: Y(l),
|
|
12016
12103
|
"onUpdate:modelValue": u[1] || (u[1] = (E) => oe(l) ? l.value = E : null),
|
|
12017
12104
|
fullscreen: "",
|
|
12018
12105
|
"no-click-animation": "",
|
|
12019
12106
|
persistent: "",
|
|
12020
12107
|
transition: "dialog-bottom-transition",
|
|
12021
|
-
onKeydown: u[2] || (u[2] =
|
|
12108
|
+
onKeydown: u[2] || (u[2] = eo(Kt((E) => l.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
12022
12109
|
}, {
|
|
12023
12110
|
default: lt(() => [
|
|
12024
|
-
|
|
12111
|
+
D(h, {
|
|
12025
12112
|
color: Y(o),
|
|
12026
12113
|
height: "100%",
|
|
12027
12114
|
width: "100%"
|
|
12028
12115
|
}, {
|
|
12029
12116
|
default: lt(() => [
|
|
12030
|
-
Y(n) ? (
|
|
12117
|
+
Y(n) ? (M(), ut(h, {
|
|
12031
12118
|
key: 0,
|
|
12032
12119
|
color: Y(s),
|
|
12033
12120
|
height: 24
|
|
12034
12121
|
}, null, 8, ["color"])) : dt("", !0),
|
|
12035
|
-
|
|
12122
|
+
D(h, {
|
|
12036
12123
|
class: "d-flex align-center px-2",
|
|
12037
12124
|
color: Y(s),
|
|
12038
12125
|
height: 48
|
|
12039
12126
|
}, {
|
|
12040
12127
|
default: lt(() => [
|
|
12041
|
-
|
|
12128
|
+
D(p, {
|
|
12042
12129
|
density: "comfortable",
|
|
12043
12130
|
icon: "mdi-close",
|
|
12044
12131
|
variant: "text",
|
|
12045
12132
|
onClick: u[0] || (u[0] = (E) => l.value = !1)
|
|
12046
12133
|
}),
|
|
12047
|
-
X("span",
|
|
12048
|
-
|
|
12134
|
+
X("span", jc, Gt(Y(e)("x-block-lib.dlg.source.title")), 1),
|
|
12135
|
+
D(f)
|
|
12049
12136
|
]),
|
|
12050
12137
|
_: 1
|
|
12051
12138
|
}, 8, ["color"]),
|
|
12052
12139
|
X("div", {
|
|
12053
12140
|
style: z(r.value)
|
|
12054
12141
|
}, [
|
|
12055
|
-
X("div",
|
|
12056
|
-
|
|
12142
|
+
X("div", Xc, [
|
|
12143
|
+
D(Wc, { code: a.value }, null, 8, ["code"])
|
|
12057
12144
|
])
|
|
12058
12145
|
], 4)
|
|
12059
12146
|
]),
|
|
@@ -12064,16 +12151,16 @@ const Fc = { class: "position-relative w-100 h-100" }, wc = /* @__PURE__ */ pt({
|
|
|
12064
12151
|
}, 8, ["modelValue"]);
|
|
12065
12152
|
};
|
|
12066
12153
|
}
|
|
12067
|
-
}),
|
|
12068
|
-
t.component("XBlockly",
|
|
12154
|
+
}), qc = (t) => {
|
|
12155
|
+
t.component("XBlockly", Gc), t.component("XSourceDlg", Jc);
|
|
12069
12156
|
};
|
|
12070
|
-
async function
|
|
12071
|
-
return (await
|
|
12157
|
+
async function sr(t) {
|
|
12158
|
+
return (await oo(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en.gy41k67q.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans.b828ufea.js") }), `./locales/${t}/index.ts`, 4)).default;
|
|
12072
12159
|
}
|
|
12073
|
-
const
|
|
12160
|
+
const ir = { install: qc };
|
|
12074
12161
|
export {
|
|
12075
|
-
|
|
12076
|
-
|
|
12077
|
-
|
|
12078
|
-
|
|
12162
|
+
Gc as XBlockly,
|
|
12163
|
+
ir as default,
|
|
12164
|
+
qc as install,
|
|
12165
|
+
sr as loadLocaleMessageBlock
|
|
12079
12166
|
};
|