x-block-lib 0.8.59 → 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/core/blocks/app/misc/selectSlot/v1/index.d.ts +1 -0
- package/dist/core/locale/msg/en.d.ts +3 -0
- package/dist/core/locale/msg/zhHans.d.ts +3 -0
- package/dist/core/utils/app/app.d.ts +14 -17
- package/dist/core/utils/app/index.d.ts +1 -0
- package/dist/core/utils/app/slot.d.ts +9 -0
- package/dist/core/utils/common/shadow.d.ts +2 -1
- package/dist/index.js +822 -717
- package/dist/{msg-en.jch03670.js → msg-en.lazlimvt.js} +3 -0
- package/dist/{msg-zhHans.dkvb4o7c.js → msg-zhHans.b1gbdbmm.js} +3 -0
- package/package.json +8 -8
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,19 +46,19 @@ 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) {
|
|
59
59
|
return !!(t.startsWith("basic.") || !e.ui || e.readonly);
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function L(t) {
|
|
62
62
|
return t.startsWith("globality_v");
|
|
63
63
|
}
|
|
64
64
|
function et(t) {
|
|
@@ -67,31 +67,31 @@ 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) {
|
|
74
74
|
const e = `<block type="text_v1"><field name="TEXT">${t}</field></block>`;
|
|
75
|
-
return
|
|
75
|
+
return N.xml.textToDom(e);
|
|
76
76
|
}
|
|
77
77
|
function bn(t) {
|
|
78
78
|
const e = `<block type="math_number_v1"><field name="NUM">${t}</field></block>`;
|
|
79
|
-
return
|
|
79
|
+
return N.xml.textToDom(e);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
return
|
|
81
|
+
function Is(t) {
|
|
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
|
|
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 === "
|
|
91
|
+
function ys(t) {
|
|
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) {
|
|
@@ -99,8 +99,8 @@ function pn(t, e, n, o) {
|
|
|
99
99
|
<block type="parameter_v1">
|
|
100
100
|
<mutation key="${e}" name="${n}" locale="${o ? "TRUE" : "FALSE"}"/>
|
|
101
101
|
</block>
|
|
102
|
-
`, a =
|
|
103
|
-
return
|
|
102
|
+
`, a = N.xml.textToDom(s);
|
|
103
|
+
return $n.domToBlock(a, t);
|
|
104
104
|
}
|
|
105
105
|
function j(t, e) {
|
|
106
106
|
try {
|
|
@@ -128,46 +128,49 @@ function j(t, e) {
|
|
|
128
128
|
}
|
|
129
129
|
function Tt(t) {
|
|
130
130
|
const e = `<shadow type="text_v1"><field name="TEXT">${t}</field></shadow>`;
|
|
131
|
-
return
|
|
131
|
+
return N.xml.textToDom(e);
|
|
132
132
|
}
|
|
133
133
|
function ue(t) {
|
|
134
134
|
const e = `<shadow type="math_number_v1"><field name="NUM">${t}</field></shadow>`;
|
|
135
|
-
return
|
|
135
|
+
return N.xml.textToDom(e);
|
|
136
136
|
}
|
|
137
137
|
function le(t) {
|
|
138
138
|
const e = `<shadow type="logic_boolean_v1"><field name="BOOL">${t ? "TRUE" : "FALSE"}</field></shadow>`;
|
|
139
|
-
return
|
|
140
|
-
}
|
|
141
|
-
function ys() {
|
|
142
|
-
return L.xml.textToDom('<shadow type="list_create_v1"></shadow>');
|
|
139
|
+
return N.xml.textToDom(e);
|
|
143
140
|
}
|
|
144
141
|
function Os() {
|
|
145
|
-
return
|
|
142
|
+
return N.xml.textToDom('<shadow type="list_create_v1"></shadow>');
|
|
146
143
|
}
|
|
147
|
-
function vs(
|
|
148
|
-
|
|
149
|
-
return L.xml.textToDom(e);
|
|
144
|
+
function vs() {
|
|
145
|
+
return N.xml.textToDom('<shadow type="object_create_v1"></shadow>');
|
|
150
146
|
}
|
|
151
147
|
function Cs(t) {
|
|
152
148
|
const e = `<shadow type="${Ce(t)}"></shadow>`;
|
|
153
|
-
return
|
|
149
|
+
return N.xml.textToDom(e);
|
|
154
150
|
}
|
|
155
151
|
function ks(t) {
|
|
156
|
-
const e = `<shadow type="
|
|
157
|
-
return
|
|
152
|
+
const e = `<shadow type="${Ce(t)}"></shadow>`;
|
|
153
|
+
return N.xml.textToDom(e);
|
|
154
|
+
}
|
|
155
|
+
function Ss() {
|
|
156
|
+
return N.xml.textToDom('<shadow type="select_comp_v1"></shadow>');
|
|
158
157
|
}
|
|
159
158
|
function Ns() {
|
|
160
|
-
return
|
|
159
|
+
return N.xml.textToDom('<shadow type="select_slot_v1"></shadow>');
|
|
161
160
|
}
|
|
162
|
-
function
|
|
161
|
+
function Ls(t) {
|
|
162
|
+
const e = `<shadow type="color_picker_v1"><field name="COLOR">${t}</field></shadow>`;
|
|
163
|
+
return N.xml.textToDom(e);
|
|
164
|
+
}
|
|
165
|
+
function vt(t) {
|
|
163
166
|
let e = null;
|
|
164
|
-
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;
|
|
165
168
|
}
|
|
166
|
-
function
|
|
169
|
+
function Bs(t) {
|
|
167
170
|
let e = null;
|
|
168
|
-
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;
|
|
169
172
|
}
|
|
170
|
-
function
|
|
173
|
+
function bs() {
|
|
171
174
|
const { activeObject: t, activePage: e } = I.app, n = [];
|
|
172
175
|
if (t.type === "page" && e.meta.arguments)
|
|
173
176
|
for (const { id: o, name: s, type: a } of e.meta.arguments)
|
|
@@ -186,13 +189,13 @@ function Pn(t) {
|
|
|
186
189
|
};
|
|
187
190
|
}
|
|
188
191
|
}
|
|
189
|
-
function
|
|
192
|
+
function Ps() {
|
|
190
193
|
const t = [];
|
|
191
|
-
return
|
|
194
|
+
return bs().forEach(({ key: n, name: o }) => {
|
|
192
195
|
t.push([o, n]);
|
|
193
196
|
}), B(t);
|
|
194
197
|
}
|
|
195
|
-
const
|
|
198
|
+
const Rs = {
|
|
196
199
|
init: function() {
|
|
197
200
|
this.argument = {
|
|
198
201
|
key: "",
|
|
@@ -214,10 +217,10 @@ const bs = {
|
|
|
214
217
|
}, 0);
|
|
215
218
|
},
|
|
216
219
|
genArgumentOpts_: function() {
|
|
217
|
-
return
|
|
220
|
+
return Ps();
|
|
218
221
|
},
|
|
219
222
|
onchange: function(t) {
|
|
220
|
-
if (t.type ===
|
|
223
|
+
if (t.type === P.STATE_CHANGE)
|
|
221
224
|
this.checkWarning_();
|
|
222
225
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
223
226
|
const e = t;
|
|
@@ -235,7 +238,7 @@ const bs = {
|
|
|
235
238
|
this.argument.key = e.key, this.argument.name = e.name, this.argument.type = e.type, this.updateShape_();
|
|
236
239
|
},
|
|
237
240
|
updateShape_: function() {
|
|
238
|
-
this.setOutput(!0,
|
|
241
|
+
this.setOutput(!0, Ot(this.argument.type));
|
|
239
242
|
},
|
|
240
243
|
checkWarning_: function() {
|
|
241
244
|
const t = Pn(this.argument.key);
|
|
@@ -250,12 +253,12 @@ const bs = {
|
|
|
250
253
|
this.setWarningText(null);
|
|
251
254
|
}
|
|
252
255
|
};
|
|
253
|
-
A.get_page_argument_v1 =
|
|
256
|
+
A.get_page_argument_v1 = Rs;
|
|
254
257
|
i.forBlock.get_page_argument_v1 = function(t) {
|
|
255
258
|
const e = t;
|
|
256
259
|
return [`__getPageArgumentV1__(${i.quote_(e.argument.key)})`, _.FUNCTION_CALL];
|
|
257
260
|
};
|
|
258
|
-
const
|
|
261
|
+
const Ds = (t, e) => {
|
|
259
262
|
const n = Ce(t), o = re(t);
|
|
260
263
|
A[n] = {
|
|
261
264
|
init: function() {
|
|
@@ -265,7 +268,7 @@ const Ps = (t, e) => {
|
|
|
265
268
|
), this.setOutput(!0, o), this.setStyle("property_blocks"), this.setTooltip(""), this.setHelpUrl("");
|
|
266
269
|
},
|
|
267
270
|
genOpts_: function() {
|
|
268
|
-
const { i18n: s } =
|
|
271
|
+
const { i18n: s } = yt, a = [];
|
|
269
272
|
for (const { title: r, value: c } of e)
|
|
270
273
|
a.push([s.global.t(r), c]);
|
|
271
274
|
return B(a);
|
|
@@ -278,9 +281,9 @@ const Ps = (t, e) => {
|
|
|
278
281
|
for (const t in ie) {
|
|
279
282
|
const e = ie[t];
|
|
280
283
|
for (const n in e.items)
|
|
281
|
-
|
|
284
|
+
Ds(n, e.items[n]);
|
|
282
285
|
}
|
|
283
|
-
const
|
|
286
|
+
const Ms = (t, e) => {
|
|
284
287
|
const n = Ce(t), o = re(t);
|
|
285
288
|
A[n] = {
|
|
286
289
|
init: function() {
|
|
@@ -298,13 +301,13 @@ const Rs = (t, e) => {
|
|
|
298
301
|
}, 0);
|
|
299
302
|
},
|
|
300
303
|
genOpts_: function() {
|
|
301
|
-
const { i18n: s } =
|
|
304
|
+
const { i18n: s } = yt, a = [];
|
|
302
305
|
for (const { title: r, value: c } of e)
|
|
303
306
|
a.push([s.global.t(r), c]);
|
|
304
307
|
return B(a);
|
|
305
308
|
},
|
|
306
309
|
onchange: function(s) {
|
|
307
|
-
if (s.type ===
|
|
310
|
+
if (s.type === P.STATE_CHANGE)
|
|
308
311
|
this.checkWarning_();
|
|
309
312
|
else if (s.type === O.BLOCK_CHANGE) {
|
|
310
313
|
const a = s;
|
|
@@ -333,7 +336,7 @@ const Rs = (t, e) => {
|
|
|
333
336
|
s.removeField("VALUE", !0), s.removeField("SUFFIX", !0);
|
|
334
337
|
let c, l;
|
|
335
338
|
if (r.ui === "pixelInput") {
|
|
336
|
-
const d =
|
|
339
|
+
const d = is(this.value) ?? 0;
|
|
337
340
|
c = new je(
|
|
338
341
|
d,
|
|
339
342
|
r.min,
|
|
@@ -344,7 +347,7 @@ const Rs = (t, e) => {
|
|
|
344
347
|
}
|
|
345
348
|
), l = "px";
|
|
346
349
|
} else if (r.ui === "percentInput") {
|
|
347
|
-
const d =
|
|
350
|
+
const d = as(this.value) ?? 0;
|
|
348
351
|
c = new je(
|
|
349
352
|
d,
|
|
350
353
|
r.min,
|
|
@@ -373,35 +376,35 @@ const Rs = (t, e) => {
|
|
|
373
376
|
for (const t in ie) {
|
|
374
377
|
const e = ie[t];
|
|
375
378
|
for (const n in e.types)
|
|
376
|
-
|
|
379
|
+
Ms(n, e.types[n]);
|
|
377
380
|
}
|
|
378
|
-
const
|
|
381
|
+
const Us = N.xml, Vs = {
|
|
379
382
|
init: function() {
|
|
380
383
|
this.appendDummyInput().appendField(
|
|
381
384
|
"%{BKY_APP_V1_APP_BIND_CONTAINER_TITLE}"
|
|
382
385
|
), this.appendStatementInput("STACK"), this.setStyle("event_blocks"), this.contextMenu = !1;
|
|
383
386
|
}
|
|
384
387
|
};
|
|
385
|
-
A.app_bind_container_v1 =
|
|
386
|
-
const
|
|
388
|
+
A.app_bind_container_v1 = Vs;
|
|
389
|
+
const xs = {
|
|
387
390
|
init: function() {
|
|
388
391
|
this.appendDummyInput().appendField("%{BKY_APP_V1_APP_BIND_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("event_blocks"), this.contextMenu = !1;
|
|
389
392
|
}
|
|
390
393
|
};
|
|
391
|
-
A.app_bind_item_v1 =
|
|
392
|
-
const
|
|
394
|
+
A.app_bind_item_v1 = xs;
|
|
395
|
+
const Ys = {
|
|
393
396
|
init: function() {
|
|
394
397
|
this.itemCount_ = 0, this.setMutator(
|
|
395
398
|
new It.MutatorIcon(
|
|
396
399
|
["app_bind_item_v1"],
|
|
397
400
|
this
|
|
398
401
|
)
|
|
399
|
-
), this.debounce_ =
|
|
402
|
+
), this.debounce_ = xo(() => {
|
|
400
403
|
this.checkWarning_();
|
|
401
404
|
}, 250), this.setStyle("event_blocks"), this.setTooltip("%{BKY_APP_V1_APP_BIND_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_APP_BIND_HELPURL}"), this.updateShape_();
|
|
402
405
|
},
|
|
403
406
|
mutationToDom: function() {
|
|
404
|
-
const t =
|
|
407
|
+
const t = Us.createElement("mutation");
|
|
405
408
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
406
409
|
},
|
|
407
410
|
domToMutation: function(t) {
|
|
@@ -477,7 +480,7 @@ const Vs = {
|
|
|
477
480
|
"Boolean",
|
|
478
481
|
"Array",
|
|
479
482
|
"Object"
|
|
480
|
-
]), t === 0 && this.getInput("ADD" + t).setAlign(
|
|
483
|
+
]), t === 0 && this.getInput("ADD" + t).setAlign(S.Align.RIGHT).appendField("%{BKY_APP_V1_APP_BIND_TITLE}"));
|
|
481
484
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
482
485
|
this.removeInput("ADD" + t);
|
|
483
486
|
},
|
|
@@ -507,52 +510,74 @@ const Vs = {
|
|
|
507
510
|
this.setWarningText(null);
|
|
508
511
|
}
|
|
509
512
|
};
|
|
510
|
-
A.app_bind_v1 =
|
|
513
|
+
A.app_bind_v1 = Ys;
|
|
511
514
|
i.forBlock.app_bind_v1 = function() {
|
|
512
515
|
return "";
|
|
513
516
|
};
|
|
514
|
-
function
|
|
515
|
-
|
|
517
|
+
function co() {
|
|
518
|
+
const t = [], { appList: e } = I.app;
|
|
519
|
+
for (const { id: n, name: o } of e)
|
|
520
|
+
t.push({ id: n, name: o });
|
|
521
|
+
return t;
|
|
516
522
|
}
|
|
517
523
|
function Rn(t) {
|
|
518
|
-
|
|
524
|
+
const { appList: e } = I.app, n = e.find((o) => o.id === t);
|
|
525
|
+
if (n)
|
|
526
|
+
return {
|
|
527
|
+
id: n.id,
|
|
528
|
+
name: n.name
|
|
529
|
+
};
|
|
519
530
|
}
|
|
520
|
-
function
|
|
531
|
+
function Fs() {
|
|
521
532
|
const t = [];
|
|
522
|
-
return
|
|
533
|
+
return co().forEach(({ id: n, name: o }) => {
|
|
523
534
|
t.push([o, n]);
|
|
524
535
|
}), B(t);
|
|
525
536
|
}
|
|
526
537
|
function en(t) {
|
|
527
|
-
const e = I.app.
|
|
528
|
-
|
|
538
|
+
const { appList: e } = I.app, n = [], o = e.find((s) => s.id === t);
|
|
539
|
+
if (!o)
|
|
540
|
+
return n;
|
|
541
|
+
for (const { id: s, name: a } of o.pages)
|
|
542
|
+
n.push({ id: s, name: a });
|
|
543
|
+
return n;
|
|
529
544
|
}
|
|
530
545
|
function we(t, e) {
|
|
531
|
-
const n = I.app.
|
|
532
|
-
if (
|
|
533
|
-
return
|
|
546
|
+
const { appList: n } = I.app, o = n.find((a) => a.id === t);
|
|
547
|
+
if (!o)
|
|
548
|
+
return;
|
|
549
|
+
const s = o.pages.find((a) => a.id === e);
|
|
550
|
+
if (s)
|
|
551
|
+
return {
|
|
552
|
+
id: s.id,
|
|
553
|
+
name: s.name
|
|
554
|
+
};
|
|
534
555
|
}
|
|
535
|
-
function
|
|
556
|
+
function ws(t) {
|
|
536
557
|
const e = [];
|
|
537
558
|
return en(t).forEach(({ id: o, name: s }) => {
|
|
538
559
|
e.push([s, o]);
|
|
539
560
|
}), B(e);
|
|
540
561
|
}
|
|
541
|
-
const co = {
|
|
542
|
-
id: "",
|
|
543
|
-
groupId: "",
|
|
544
|
-
name: "",
|
|
545
|
-
position: 0
|
|
546
|
-
};
|
|
547
562
|
function ro() {
|
|
548
|
-
const {
|
|
549
|
-
|
|
563
|
+
const { activeApp: t } = I.app, e = [{ id: "", name: "" }];
|
|
564
|
+
for (const { id: n, name: o } of t.comps)
|
|
565
|
+
e.push({ id: n, name: o });
|
|
566
|
+
return e;
|
|
550
567
|
}
|
|
551
568
|
function Dn(t) {
|
|
552
|
-
|
|
569
|
+
const { activeApp: e } = I.app;
|
|
570
|
+
if (!t)
|
|
571
|
+
return { id: "", name: "" };
|
|
572
|
+
const n = e.comps.find((o) => o.id === t);
|
|
573
|
+
if (n)
|
|
574
|
+
return {
|
|
575
|
+
id: n.id,
|
|
576
|
+
name: n.name
|
|
577
|
+
};
|
|
553
578
|
}
|
|
554
|
-
function
|
|
555
|
-
const { i18n: t } =
|
|
579
|
+
function Ks() {
|
|
580
|
+
const { i18n: t } = yt, e = [];
|
|
556
581
|
return ro().forEach(({ id: o, name: s }) => {
|
|
557
582
|
let a = s;
|
|
558
583
|
o === "" && (a = t.global.t("x-runtime-lib.notSet")), e.push([a, o]);
|
|
@@ -612,7 +637,7 @@ function nn(t) {
|
|
|
612
637
|
params: ot(f)
|
|
613
638
|
});
|
|
614
639
|
}
|
|
615
|
-
if (
|
|
640
|
+
if (L(d.key) && n.type === "comp" && s.meta.events)
|
|
616
641
|
for (const { id: u, name: h, params: p } of s.meta.events)
|
|
617
642
|
r.push({
|
|
618
643
|
id: K("customEvent", t, u),
|
|
@@ -620,7 +645,7 @@ function nn(t) {
|
|
|
620
645
|
names: [h],
|
|
621
646
|
params: ot(p)
|
|
622
647
|
});
|
|
623
|
-
if (
|
|
648
|
+
if (L(d.key) && n.type === "comp" && s.meta.slots) {
|
|
624
649
|
for (const u of s.meta.slots)
|
|
625
650
|
if (u.events)
|
|
626
651
|
for (const h of u.events)
|
|
@@ -635,7 +660,7 @@ function nn(t) {
|
|
|
635
660
|
params: ot(h.params)
|
|
636
661
|
});
|
|
637
662
|
}
|
|
638
|
-
if (
|
|
663
|
+
if (L(d.key) && n.type === "comp" && l.settings && l.settings.adaptSlot) {
|
|
639
664
|
const u = ae(l.settings.adaptSlot);
|
|
640
665
|
if (u) {
|
|
641
666
|
if (u.kind === "elementSlot") {
|
|
@@ -650,7 +675,7 @@ function nn(t) {
|
|
|
650
675
|
id: K(
|
|
651
676
|
"adaptSlotElementEvent",
|
|
652
677
|
t,
|
|
653
|
-
|
|
678
|
+
rs(
|
|
654
679
|
u.mainKey,
|
|
655
680
|
u.slotKey,
|
|
656
681
|
f.key
|
|
@@ -689,7 +714,7 @@ function nn(t) {
|
|
|
689
714
|
id: K("elementPropertyChangeEvent", t, u),
|
|
690
715
|
kind: "elementPropertyChangeEvent",
|
|
691
716
|
names: h,
|
|
692
|
-
params: x(
|
|
717
|
+
params: x(so(p))
|
|
693
718
|
});
|
|
694
719
|
if (et(d.key) && l.settings && l.settings.comp) {
|
|
695
720
|
const u = a[l.settings.comp];
|
|
@@ -713,7 +738,7 @@ function nn(t) {
|
|
|
713
738
|
params: x(f)
|
|
714
739
|
});
|
|
715
740
|
}
|
|
716
|
-
if (
|
|
741
|
+
if (L(d.key) && n.type === "comp" && s.meta.properties)
|
|
717
742
|
for (const { id: u, name: h, type: p } of s.meta.properties)
|
|
718
743
|
r.push({
|
|
719
744
|
id: K("customPropertyChangeEvent", t, u),
|
|
@@ -721,7 +746,7 @@ function nn(t) {
|
|
|
721
746
|
names: [h],
|
|
722
747
|
params: x(p)
|
|
723
748
|
});
|
|
724
|
-
if (
|
|
749
|
+
if (L(d.key) && n.type === "comp" && s.meta.slots) {
|
|
725
750
|
for (const u of s.meta.slots)
|
|
726
751
|
if (u.properties)
|
|
727
752
|
for (const h of u.properties)
|
|
@@ -736,7 +761,7 @@ function nn(t) {
|
|
|
736
761
|
params: x(h.type)
|
|
737
762
|
});
|
|
738
763
|
}
|
|
739
|
-
if (
|
|
764
|
+
if (L(d.key) && n.type === "comp" && l.settings && l.settings.adaptSlot) {
|
|
740
765
|
const u = ae(l.settings.adaptSlot);
|
|
741
766
|
if (u) {
|
|
742
767
|
if (u.kind === "elementSlot") {
|
|
@@ -751,7 +776,7 @@ function nn(t) {
|
|
|
751
776
|
id: K(
|
|
752
777
|
"adaptSlotElementPropertyChangeEvent",
|
|
753
778
|
t,
|
|
754
|
-
|
|
779
|
+
Qn(
|
|
755
780
|
h.key,
|
|
756
781
|
p.key,
|
|
757
782
|
f.key
|
|
@@ -788,7 +813,7 @@ function nn(t) {
|
|
|
788
813
|
}
|
|
789
814
|
}
|
|
790
815
|
}
|
|
791
|
-
if (
|
|
816
|
+
if (L(d.key)) {
|
|
792
817
|
if (n.type === "page") {
|
|
793
818
|
if (o.meta.states)
|
|
794
819
|
for (const { id: u, name: h, type: p } of o.meta.states)
|
|
@@ -861,7 +886,7 @@ function Ke(t) {
|
|
|
861
886
|
}
|
|
862
887
|
}
|
|
863
888
|
} else if (c === "customEvent") {
|
|
864
|
-
if (
|
|
889
|
+
if (L(h.key) && n.type === "comp") {
|
|
865
890
|
const p = s.meta.events?.find((f) => f.id === d);
|
|
866
891
|
if (p)
|
|
867
892
|
return {
|
|
@@ -872,7 +897,7 @@ function Ke(t) {
|
|
|
872
897
|
};
|
|
873
898
|
}
|
|
874
899
|
} else if (c === "customSlotEvent") {
|
|
875
|
-
if (
|
|
900
|
+
if (L(h.key) && n.type === "comp" && s.meta.slots) {
|
|
876
901
|
const { slotId: p, eventId: f } = Cn(d), T = s.meta.slots.find((E) => E.id === p);
|
|
877
902
|
if (T && T.events) {
|
|
878
903
|
const E = T.events.find((y) => y.id === f);
|
|
@@ -886,16 +911,16 @@ function Ke(t) {
|
|
|
886
911
|
}
|
|
887
912
|
}
|
|
888
913
|
} else if (c === "adaptSlotElementEvent") {
|
|
889
|
-
if (
|
|
914
|
+
if (L(h.key) && n.type === "comp") {
|
|
890
915
|
const {
|
|
891
916
|
elementKey: p,
|
|
892
917
|
slotKey: f,
|
|
893
918
|
eventKey: T
|
|
894
|
-
} =
|
|
919
|
+
} = cs(d), E = V[p];
|
|
895
920
|
if (E && E.slots) {
|
|
896
921
|
const y = E.slots.find((k) => k.key === f);
|
|
897
922
|
if (y && y.events) {
|
|
898
|
-
const k = y.events.find((
|
|
923
|
+
const k = y.events.find((R) => R.key === T);
|
|
899
924
|
if (k)
|
|
900
925
|
return {
|
|
901
926
|
id: t,
|
|
@@ -907,12 +932,12 @@ function Ke(t) {
|
|
|
907
932
|
}
|
|
908
933
|
}
|
|
909
934
|
} else if (c === "adaptSlotCustomEvent") {
|
|
910
|
-
if (
|
|
935
|
+
if (L(h.key) && n.type === "comp") {
|
|
911
936
|
const { compId: p, slotId: f, eventId: T } = Cn(d), E = a[p];
|
|
912
937
|
if (E && E.meta.slots) {
|
|
913
938
|
const y = E.meta.slots.find((k) => k.id === f);
|
|
914
939
|
if (y && y.events) {
|
|
915
|
-
const k = y.events.find((
|
|
940
|
+
const k = y.events.find((R) => R.id === T);
|
|
916
941
|
if (k)
|
|
917
942
|
return {
|
|
918
943
|
id: t,
|
|
@@ -933,7 +958,7 @@ function Ke(t) {
|
|
|
933
958
|
id: t,
|
|
934
959
|
kind: c,
|
|
935
960
|
names: p.names,
|
|
936
|
-
params: x(
|
|
961
|
+
params: x(so(p.raw))
|
|
937
962
|
};
|
|
938
963
|
}
|
|
939
964
|
} else if (c === "referencePropertyChangeEvent") {
|
|
@@ -969,7 +994,7 @@ function Ke(t) {
|
|
|
969
994
|
}
|
|
970
995
|
}
|
|
971
996
|
} else if (c === "customPropertyChangeEvent") {
|
|
972
|
-
if (
|
|
997
|
+
if (L(h.key) && n.type === "comp") {
|
|
973
998
|
const p = s.meta.properties?.find(
|
|
974
999
|
(f) => f.id === d
|
|
975
1000
|
);
|
|
@@ -982,7 +1007,7 @@ function Ke(t) {
|
|
|
982
1007
|
};
|
|
983
1008
|
}
|
|
984
1009
|
} else if (c === "customSlotPropertyChangeEvent") {
|
|
985
|
-
if (
|
|
1010
|
+
if (L(h.key) && n.type === "comp" && s.meta.slots) {
|
|
986
1011
|
const { slotId: p, propertyId: f } = Je(d), T = s.meta.slots.find((E) => E.id === p);
|
|
987
1012
|
if (T && T.properties) {
|
|
988
1013
|
const E = T.properties.find((y) => y.id === f);
|
|
@@ -996,13 +1021,13 @@ function Ke(t) {
|
|
|
996
1021
|
}
|
|
997
1022
|
}
|
|
998
1023
|
} else if (c === "adaptSlotElementPropertyChangeEvent") {
|
|
999
|
-
if (
|
|
1000
|
-
const { elementKey: p, slotKey: f, propertyKey: T } =
|
|
1024
|
+
if (L(h.key) && n.type === "comp") {
|
|
1025
|
+
const { elementKey: p, slotKey: f, propertyKey: T } = qn(d), E = V[p];
|
|
1001
1026
|
if (E && E.slots) {
|
|
1002
1027
|
const y = E.slots.find((k) => k.key === f);
|
|
1003
1028
|
if (y && y.properties) {
|
|
1004
1029
|
const k = y.properties.find(
|
|
1005
|
-
(
|
|
1030
|
+
(R) => R.key === T
|
|
1006
1031
|
);
|
|
1007
1032
|
if (k)
|
|
1008
1033
|
return {
|
|
@@ -1019,7 +1044,7 @@ function Ke(t) {
|
|
|
1019
1044
|
if (E && E.meta.slots) {
|
|
1020
1045
|
const y = E.meta.slots.find((k) => k.id === f);
|
|
1021
1046
|
if (y && y.properties) {
|
|
1022
|
-
const k = y.properties.find((
|
|
1047
|
+
const k = y.properties.find((R) => R.id === T);
|
|
1023
1048
|
if (k)
|
|
1024
1049
|
return {
|
|
1025
1050
|
id: t,
|
|
@@ -1029,7 +1054,7 @@ function Ke(t) {
|
|
|
1029
1054
|
};
|
|
1030
1055
|
}
|
|
1031
1056
|
}
|
|
1032
|
-
} else if (c === "stateChangeEvent" &&
|
|
1057
|
+
} else if (c === "stateChangeEvent" && L(h.key)) {
|
|
1033
1058
|
if (n.type === "page") {
|
|
1034
1059
|
const p = o.meta.states?.find(
|
|
1035
1060
|
(f) => f.id === d
|
|
@@ -1055,7 +1080,7 @@ function Ke(t) {
|
|
|
1055
1080
|
}
|
|
1056
1081
|
}
|
|
1057
1082
|
}
|
|
1058
|
-
function
|
|
1083
|
+
function $s(t) {
|
|
1059
1084
|
const e = [], n = nn(t);
|
|
1060
1085
|
for (const { id: o, kind: s, names: a } of n)
|
|
1061
1086
|
e.push([Oe(s, a), o]);
|
|
@@ -1090,7 +1115,7 @@ function Mn(t) {
|
|
|
1090
1115
|
};
|
|
1091
1116
|
}
|
|
1092
1117
|
}
|
|
1093
|
-
function
|
|
1118
|
+
function Hs() {
|
|
1094
1119
|
const t = [], e = uo();
|
|
1095
1120
|
for (const { id: n, kind: o, names: s } of e)
|
|
1096
1121
|
t.push([Oe(o, s), n]);
|
|
@@ -1152,7 +1177,7 @@ function on(t) {
|
|
|
1152
1177
|
outputs: tt(h)
|
|
1153
1178
|
});
|
|
1154
1179
|
}
|
|
1155
|
-
if (
|
|
1180
|
+
if (L(r.key) && e.type === "comp" && n.meta.methods)
|
|
1156
1181
|
for (const { id: c, name: l, inputs: d, outputs: u } of n.meta.methods)
|
|
1157
1182
|
s.push({
|
|
1158
1183
|
id: _t("customMethod", t, c),
|
|
@@ -1161,7 +1186,7 @@ function on(t) {
|
|
|
1161
1186
|
inputs: H(d),
|
|
1162
1187
|
outputs: tt(u)
|
|
1163
1188
|
});
|
|
1164
|
-
if (
|
|
1189
|
+
if (L(r.key) && e.type === "comp" && n.meta.slots) {
|
|
1165
1190
|
for (const c of n.meta.slots)
|
|
1166
1191
|
if (c.methods)
|
|
1167
1192
|
for (const l of c.methods)
|
|
@@ -1169,7 +1194,7 @@ function on(t) {
|
|
|
1169
1194
|
id: _t(
|
|
1170
1195
|
"customSlotMethod",
|
|
1171
1196
|
t,
|
|
1172
|
-
|
|
1197
|
+
Sn("", c.id, l.id)
|
|
1173
1198
|
),
|
|
1174
1199
|
kind: "customSlotMethod",
|
|
1175
1200
|
names: [c.name, l.name],
|
|
@@ -1177,7 +1202,7 @@ function on(t) {
|
|
|
1177
1202
|
outputs: tt(l.outputs)
|
|
1178
1203
|
});
|
|
1179
1204
|
}
|
|
1180
|
-
if (
|
|
1205
|
+
if (L(r.key) && e.type === "comp" && a.settings && a.settings.adaptSlot) {
|
|
1181
1206
|
const c = ae(a.settings.adaptSlot);
|
|
1182
1207
|
if (c) {
|
|
1183
1208
|
if (c.kind === "elementSlot") {
|
|
@@ -1192,7 +1217,7 @@ function on(t) {
|
|
|
1192
1217
|
id: _t(
|
|
1193
1218
|
"adaptSlotElementMethod",
|
|
1194
1219
|
t,
|
|
1195
|
-
|
|
1220
|
+
ls(l.key, d.key, u.key)
|
|
1196
1221
|
),
|
|
1197
1222
|
kind: "adaptSlotElementMethod",
|
|
1198
1223
|
names: [l.name, d.name, u.name],
|
|
@@ -1212,7 +1237,7 @@ function on(t) {
|
|
|
1212
1237
|
id: _t(
|
|
1213
1238
|
"adaptSlotCustomMethod",
|
|
1214
1239
|
t,
|
|
1215
|
-
|
|
1240
|
+
Sn(
|
|
1216
1241
|
c.mainKey,
|
|
1217
1242
|
d.id,
|
|
1218
1243
|
u.id
|
|
@@ -1285,7 +1310,7 @@ function $e(t) {
|
|
|
1285
1310
|
}
|
|
1286
1311
|
}
|
|
1287
1312
|
} else if (s === "customMethod") {
|
|
1288
|
-
if (
|
|
1313
|
+
if (L(l.key) && e.type === "comp") {
|
|
1289
1314
|
const d = n.meta.methods?.find(
|
|
1290
1315
|
(u) => u.id === r
|
|
1291
1316
|
);
|
|
@@ -1299,7 +1324,7 @@ function $e(t) {
|
|
|
1299
1324
|
};
|
|
1300
1325
|
}
|
|
1301
1326
|
} else if (s === "customSlotMethod") {
|
|
1302
|
-
if (
|
|
1327
|
+
if (L(l.key) && e.type === "comp" && n.meta.slots) {
|
|
1303
1328
|
const { slotId: d, methodId: u } = Qe(r), h = n.meta.slots.find((p) => p.id === d);
|
|
1304
1329
|
if (h && h.methods) {
|
|
1305
1330
|
const p = h.methods.find((f) => f.id === u);
|
|
@@ -1314,12 +1339,12 @@ function $e(t) {
|
|
|
1314
1339
|
}
|
|
1315
1340
|
}
|
|
1316
1341
|
} else if (s === "adaptSlotElementMethod") {
|
|
1317
|
-
if (
|
|
1342
|
+
if (L(l.key) && e.type === "comp") {
|
|
1318
1343
|
const {
|
|
1319
1344
|
elementKey: d,
|
|
1320
1345
|
slotKey: u,
|
|
1321
1346
|
methodKey: h
|
|
1322
|
-
} =
|
|
1347
|
+
} = us(r), p = V[d];
|
|
1323
1348
|
if (p && p.slots) {
|
|
1324
1349
|
const f = p.slots.find((T) => T.key === u);
|
|
1325
1350
|
if (f && f.methods) {
|
|
@@ -1335,7 +1360,7 @@ function $e(t) {
|
|
|
1335
1360
|
}
|
|
1336
1361
|
}
|
|
1337
1362
|
}
|
|
1338
|
-
} else if (s === "adaptSlotCustomMethod" &&
|
|
1363
|
+
} else if (s === "adaptSlotCustomMethod" && L(l.key) && e.type === "comp") {
|
|
1339
1364
|
const { compId: d, slotId: u, methodId: h } = Qe(r), p = o[d];
|
|
1340
1365
|
if (p && p.meta.slots) {
|
|
1341
1366
|
const f = p.meta.slots.find((T) => T.id === u);
|
|
@@ -1353,7 +1378,7 @@ function $e(t) {
|
|
|
1353
1378
|
}
|
|
1354
1379
|
}
|
|
1355
1380
|
}
|
|
1356
|
-
function
|
|
1381
|
+
function Gs(t) {
|
|
1357
1382
|
const e = [], n = on(t);
|
|
1358
1383
|
for (const { id: o, kind: s, names: a } of n)
|
|
1359
1384
|
e.push([ve(s, a), o]);
|
|
@@ -1432,14 +1457,14 @@ function He(t, e) {
|
|
|
1432
1457
|
if (n)
|
|
1433
1458
|
return n.outputs?.find((o) => o.key === e);
|
|
1434
1459
|
}
|
|
1435
|
-
function
|
|
1460
|
+
function Ws(t) {
|
|
1436
1461
|
const e = [], n = sn(t);
|
|
1437
1462
|
if (n)
|
|
1438
1463
|
for (const { name: o, key: s } of n)
|
|
1439
1464
|
e.push([o, s]);
|
|
1440
1465
|
return B(e);
|
|
1441
1466
|
}
|
|
1442
|
-
function
|
|
1467
|
+
function js(t, e, n) {
|
|
1443
1468
|
const { properties: o } = I.runtime, { activeObject: s, activePage: a, activeComp: r, depends: c } = I.app;
|
|
1444
1469
|
if (t.events && t.events.length > 0)
|
|
1445
1470
|
return !1;
|
|
@@ -1453,7 +1478,7 @@ function Gs(t, e, n) {
|
|
|
1453
1478
|
if (l && l.meta.events && l.meta.events.length > 0)
|
|
1454
1479
|
return !1;
|
|
1455
1480
|
}
|
|
1456
|
-
if (
|
|
1481
|
+
if (L(t.key) && s.type === "comp" && r.meta.events && r.meta.events.length > 0)
|
|
1457
1482
|
return !1;
|
|
1458
1483
|
if (o[t.key] && o[t.key][e]) {
|
|
1459
1484
|
for (const { keys: l, raw: d } of o[t.key][e])
|
|
@@ -1470,9 +1495,9 @@ function Gs(t, e, n) {
|
|
|
1470
1495
|
if (l && l.meta.properties && l.meta.properties.length > 0)
|
|
1471
1496
|
return !1;
|
|
1472
1497
|
}
|
|
1473
|
-
if (
|
|
1498
|
+
if (L(t.key) && s.type === "comp" && r.meta.properties && r.meta.properties.length > 0)
|
|
1474
1499
|
return !1;
|
|
1475
|
-
if (
|
|
1500
|
+
if (L(t.key)) {
|
|
1476
1501
|
if (s.type === "page") {
|
|
1477
1502
|
if (a.meta.states && a.meta.states.length > 0)
|
|
1478
1503
|
return !1;
|
|
@@ -1481,7 +1506,7 @@ function Gs(t, e, n) {
|
|
|
1481
1506
|
}
|
|
1482
1507
|
return !0;
|
|
1483
1508
|
}
|
|
1484
|
-
function
|
|
1509
|
+
function Xs(t, e) {
|
|
1485
1510
|
const { activeObject: n, activeComp: o, depends: s } = I.app;
|
|
1486
1511
|
if (t.methods && t.methods.length > 0)
|
|
1487
1512
|
return !1;
|
|
@@ -1495,9 +1520,9 @@ function Ws(t, e) {
|
|
|
1495
1520
|
if (a && a.meta.methods && a.meta.methods.length > 0)
|
|
1496
1521
|
return !1;
|
|
1497
1522
|
}
|
|
1498
|
-
return
|
|
1523
|
+
return L(t.key) && n.type === "comp" && o.meta.methods && o.meta.methods.length > 0 ? !1 : (L(t.key) && n.type, !0);
|
|
1499
1524
|
}
|
|
1500
|
-
function
|
|
1525
|
+
function Js(t, e, n) {
|
|
1501
1526
|
const { properties: o } = I.runtime, { activeObject: s, activeComp: a, depends: r } = I.app;
|
|
1502
1527
|
if (o[t.key] && o[t.key][e] && o[t.key][e].length > 0)
|
|
1503
1528
|
return !1;
|
|
@@ -1511,9 +1536,9 @@ function js(t, e, n) {
|
|
|
1511
1536
|
if (c && c.meta.properties && c.meta.properties.length > 0)
|
|
1512
1537
|
return !1;
|
|
1513
1538
|
}
|
|
1514
|
-
return !(
|
|
1539
|
+
return !(L(t.key) && s.type === "comp" && a.meta.properties && a.meta.properties.length > 0);
|
|
1515
1540
|
}
|
|
1516
|
-
function
|
|
1541
|
+
function qs(t, e, n) {
|
|
1517
1542
|
const { properties: o } = I.runtime, { activeObject: s, activeComp: a, depends: r } = I.app;
|
|
1518
1543
|
if (o[t.key] && o[t.key][e]) {
|
|
1519
1544
|
for (const { keys: c, raw: l } of o[t.key][e])
|
|
@@ -1530,10 +1555,10 @@ function Xs(t, e, n) {
|
|
|
1530
1555
|
if (c && c.meta.properties && c.meta.properties.length > 0)
|
|
1531
1556
|
return !1;
|
|
1532
1557
|
}
|
|
1533
|
-
return !(
|
|
1558
|
+
return !(L(t.key) && s.type === "comp" && a.meta.properties && a.meta.properties.length > 0);
|
|
1534
1559
|
}
|
|
1535
1560
|
function _o(t, e, n, o) {
|
|
1536
|
-
return t ? t === "onEvent" ?
|
|
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;
|
|
1537
1562
|
}
|
|
1538
1563
|
function Z(t) {
|
|
1539
1564
|
const { activeObject: e } = I.app, n = Vt(e.type, e.subtype);
|
|
@@ -1585,8 +1610,8 @@ function gt(t) {
|
|
|
1585
1610
|
alias: n.alias
|
|
1586
1611
|
};
|
|
1587
1612
|
}
|
|
1588
|
-
function
|
|
1589
|
-
const { i18n: e } =
|
|
1613
|
+
function Se(t) {
|
|
1614
|
+
const { i18n: e } = yt, n = [], o = zt(t);
|
|
1590
1615
|
for (const { id: s, name: a, alias: r } of o) {
|
|
1591
1616
|
let c = e.global.t(a);
|
|
1592
1617
|
r && (c += " / " + r), n.push([c, s]);
|
|
@@ -1606,7 +1631,7 @@ function Wt(t, e) {
|
|
|
1606
1631
|
if (n[d.key] && n[d.key][c])
|
|
1607
1632
|
for (const { keys: u, names: h, raw: p } of n[d.key][c])
|
|
1608
1633
|
e === "write" && ke(u, p) || r.push({
|
|
1609
|
-
id:
|
|
1634
|
+
id: kt("elementProperty", t, u),
|
|
1610
1635
|
kind: "elementProperty",
|
|
1611
1636
|
names: h,
|
|
1612
1637
|
meta: {
|
|
@@ -1619,7 +1644,7 @@ function Wt(t, e) {
|
|
|
1619
1644
|
if (u && u.meta.properties)
|
|
1620
1645
|
for (const { id: h, name: p, type: f } of u.meta.properties)
|
|
1621
1646
|
r.push({
|
|
1622
|
-
id:
|
|
1647
|
+
id: kt("referenceProperty", t, h),
|
|
1623
1648
|
kind: "referenceProperty",
|
|
1624
1649
|
names: [p],
|
|
1625
1650
|
meta: {
|
|
@@ -1632,7 +1657,7 @@ function Wt(t, e) {
|
|
|
1632
1657
|
if (u && u.meta.properties)
|
|
1633
1658
|
for (const { id: h, name: p, type: f } of u.meta.properties)
|
|
1634
1659
|
r.push({
|
|
1635
|
-
id:
|
|
1660
|
+
id: kt("multipleRefProperty", t, h),
|
|
1636
1661
|
kind: "multipleRefProperty",
|
|
1637
1662
|
names: [p],
|
|
1638
1663
|
meta: {
|
|
@@ -1640,24 +1665,24 @@ function Wt(t, e) {
|
|
|
1640
1665
|
}
|
|
1641
1666
|
});
|
|
1642
1667
|
}
|
|
1643
|
-
if (
|
|
1668
|
+
if (L(d.key) && o.type === "comp" && s.meta.properties)
|
|
1644
1669
|
for (const { id: u, name: h, type: p } of s.meta.properties)
|
|
1645
1670
|
r.push({
|
|
1646
|
-
id:
|
|
1671
|
+
id: kt("customProperty", t, u),
|
|
1647
1672
|
kind: "customProperty",
|
|
1648
1673
|
names: [h],
|
|
1649
1674
|
meta: {
|
|
1650
1675
|
raw: { type: p }
|
|
1651
1676
|
}
|
|
1652
1677
|
});
|
|
1653
|
-
if (
|
|
1678
|
+
if (io(d.key) && l.settings && l.settings.slot && o.type === "comp" && s.meta.slots) {
|
|
1654
1679
|
const u = s.meta.slots.find(
|
|
1655
1680
|
(h) => h.id === l.settings.slot
|
|
1656
1681
|
);
|
|
1657
1682
|
if (u && u.properties)
|
|
1658
1683
|
for (const h of u.properties)
|
|
1659
1684
|
r.push({
|
|
1660
|
-
id:
|
|
1685
|
+
id: kt("customSlotProperty", t, h.id),
|
|
1661
1686
|
kind: "customSlotProperty",
|
|
1662
1687
|
names: [u.name, h.name],
|
|
1663
1688
|
meta: {
|
|
@@ -1665,7 +1690,7 @@ function Wt(t, e) {
|
|
|
1665
1690
|
}
|
|
1666
1691
|
});
|
|
1667
1692
|
}
|
|
1668
|
-
if (
|
|
1693
|
+
if (L(d.key) && o.type === "comp" && l.settings && l.settings.adaptSlot) {
|
|
1669
1694
|
const u = ae(l.settings.adaptSlot);
|
|
1670
1695
|
if (u) {
|
|
1671
1696
|
if (u.kind === "elementSlot") {
|
|
@@ -1677,10 +1702,10 @@ function Wt(t, e) {
|
|
|
1677
1702
|
if (p && p.properties)
|
|
1678
1703
|
for (const f of p.properties)
|
|
1679
1704
|
r.push({
|
|
1680
|
-
id:
|
|
1705
|
+
id: kt(
|
|
1681
1706
|
"adaptSlotElementProperty",
|
|
1682
1707
|
t,
|
|
1683
|
-
|
|
1708
|
+
Qn(
|
|
1684
1709
|
h.key,
|
|
1685
1710
|
p.key,
|
|
1686
1711
|
f.key
|
|
@@ -1702,7 +1727,7 @@ function Wt(t, e) {
|
|
|
1702
1727
|
if (p && p.properties)
|
|
1703
1728
|
for (const f of p.properties)
|
|
1704
1729
|
r.push({
|
|
1705
|
-
id:
|
|
1730
|
+
id: kt(
|
|
1706
1731
|
"adaptSlotCustomProperty",
|
|
1707
1732
|
t,
|
|
1708
1733
|
qe(
|
|
@@ -1729,7 +1754,7 @@ function Nt(t) {
|
|
|
1729
1754
|
const { properties: e } = I.runtime, { activeObject: n, activeComp: o, depends: s } = I.app, a = Vt(n.type, n.subtype);
|
|
1730
1755
|
if (!a)
|
|
1731
1756
|
return;
|
|
1732
|
-
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);
|
|
1733
1758
|
if (!d)
|
|
1734
1759
|
return;
|
|
1735
1760
|
const u = V[d.key];
|
|
@@ -1790,7 +1815,7 @@ function Nt(t) {
|
|
|
1790
1815
|
}
|
|
1791
1816
|
}
|
|
1792
1817
|
} else if (r === "customProperty") {
|
|
1793
|
-
if (
|
|
1818
|
+
if (L(u.key) && n.type === "comp") {
|
|
1794
1819
|
const h = o.meta.properties?.find(
|
|
1795
1820
|
(p) => p.id === l
|
|
1796
1821
|
);
|
|
@@ -1805,7 +1830,7 @@ function Nt(t) {
|
|
|
1805
1830
|
};
|
|
1806
1831
|
}
|
|
1807
1832
|
} else if (r === "customSlotProperty") {
|
|
1808
|
-
if (
|
|
1833
|
+
if (io(u.key) && d.settings && d.settings.slot && n.type === "comp" && o.meta.slots) {
|
|
1809
1834
|
const h = o.meta.slots.find(
|
|
1810
1835
|
(p) => p.id === d.settings.slot
|
|
1811
1836
|
);
|
|
@@ -1823,12 +1848,12 @@ function Nt(t) {
|
|
|
1823
1848
|
}
|
|
1824
1849
|
}
|
|
1825
1850
|
} else if (r === "adaptSlotElementProperty") {
|
|
1826
|
-
if (
|
|
1851
|
+
if (L(u.key) && n.type === "comp") {
|
|
1827
1852
|
const {
|
|
1828
1853
|
elementKey: h,
|
|
1829
1854
|
slotKey: p,
|
|
1830
1855
|
propertyKey: f
|
|
1831
|
-
} =
|
|
1856
|
+
} = qn(l), T = V[h];
|
|
1832
1857
|
if (T && T.slots) {
|
|
1833
1858
|
const E = T.slots.find((y) => y.key === p);
|
|
1834
1859
|
if (E && E.properties) {
|
|
@@ -1847,7 +1872,7 @@ function Nt(t) {
|
|
|
1847
1872
|
}
|
|
1848
1873
|
}
|
|
1849
1874
|
}
|
|
1850
|
-
} else if (r === "adaptSlotCustomProperty" &&
|
|
1875
|
+
} else if (r === "adaptSlotCustomProperty" && L(u.key) && n.type === "comp") {
|
|
1851
1876
|
const { compId: h, slotId: p, propertyId: f } = Je(l), T = s[h];
|
|
1852
1877
|
if (T && T.meta.slots) {
|
|
1853
1878
|
const E = T.meta.slots.find((y) => y.id === p);
|
|
@@ -1871,9 +1896,38 @@ function Nt(t) {
|
|
|
1871
1896
|
function po(t, e) {
|
|
1872
1897
|
const n = [], o = Wt(t, e);
|
|
1873
1898
|
for (const { id: s, kind: a, names: r } of o)
|
|
1874
|
-
n.push([
|
|
1899
|
+
n.push([zn(a, r), s]);
|
|
1875
1900
|
return B(n);
|
|
1876
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
|
+
}
|
|
1877
1931
|
function hn() {
|
|
1878
1932
|
const { activeObject: t, activePage: e, activeComp: n } = I.app;
|
|
1879
1933
|
return t.type === "page" ? e.meta.states ?? [] : t.type === "comp" ? n.meta.states ?? [] : [];
|
|
@@ -1885,13 +1939,13 @@ function _e(t) {
|
|
|
1885
1939
|
if (e.type === "comp")
|
|
1886
1940
|
return o.meta.states?.find((s) => s.id === t);
|
|
1887
1941
|
}
|
|
1888
|
-
function
|
|
1942
|
+
function fo() {
|
|
1889
1943
|
const t = [], e = hn();
|
|
1890
1944
|
for (const { id: n, name: o } of e)
|
|
1891
1945
|
t.push([o, n]);
|
|
1892
1946
|
return B(t);
|
|
1893
1947
|
}
|
|
1894
|
-
const
|
|
1948
|
+
const zs = {
|
|
1895
1949
|
init: function() {
|
|
1896
1950
|
this.node = {
|
|
1897
1951
|
id: "",
|
|
@@ -1934,13 +1988,13 @@ const Js = {
|
|
|
1934
1988
|
}, 0);
|
|
1935
1989
|
},
|
|
1936
1990
|
genNodeOpts_: function() {
|
|
1937
|
-
return
|
|
1991
|
+
return Se("onEvent");
|
|
1938
1992
|
},
|
|
1939
1993
|
genEventOpts_: function() {
|
|
1940
|
-
return
|
|
1994
|
+
return $s(this.node.id);
|
|
1941
1995
|
},
|
|
1942
1996
|
onchange: function(t) {
|
|
1943
|
-
if (t.type ===
|
|
1997
|
+
if (t.type === P.STATE_CHANGE)
|
|
1944
1998
|
this.checkWarning_();
|
|
1945
1999
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
1946
2000
|
const e = t;
|
|
@@ -2026,7 +2080,7 @@ const Js = {
|
|
|
2026
2080
|
this.setWarningText(null);
|
|
2027
2081
|
}
|
|
2028
2082
|
};
|
|
2029
|
-
A.on_app_event_v1 =
|
|
2083
|
+
A.on_app_event_v1 = zs;
|
|
2030
2084
|
i.forBlock.on_app_event_v1 = function(t) {
|
|
2031
2085
|
const e = i.quote_, n = t, o = n.event.id;
|
|
2032
2086
|
let s = "";
|
|
@@ -2038,7 +2092,7 @@ i.forBlock.on_app_event_v1 = function(t) {
|
|
|
2038
2092
|
${a}});
|
|
2039
2093
|
`;
|
|
2040
2094
|
};
|
|
2041
|
-
const
|
|
2095
|
+
const Zs = {
|
|
2042
2096
|
init: function() {
|
|
2043
2097
|
this.event = {
|
|
2044
2098
|
id: "",
|
|
@@ -2070,10 +2124,10 @@ const qs = {
|
|
|
2070
2124
|
}, 0);
|
|
2071
2125
|
},
|
|
2072
2126
|
genEventOpts_: function() {
|
|
2073
|
-
return
|
|
2127
|
+
return Hs();
|
|
2074
2128
|
},
|
|
2075
2129
|
onchange: function(t) {
|
|
2076
|
-
if (t.type ===
|
|
2130
|
+
if (t.type === P.STATE_CHANGE)
|
|
2077
2131
|
this.checkWarning_();
|
|
2078
2132
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
2079
2133
|
const e = t;
|
|
@@ -2098,14 +2152,14 @@ const qs = {
|
|
|
2098
2152
|
const { type: e } = this.event.params[t], n = this.getInput("PARAM" + t);
|
|
2099
2153
|
n.connection.setShadowDom(null);
|
|
2100
2154
|
const o = n.connection.targetBlock();
|
|
2101
|
-
o && !o.isShadow() && o.dispose(), n.setCheck(
|
|
2155
|
+
o && !o.isShadow() && o.dispose(), n.setCheck(Ot(e));
|
|
2102
2156
|
}
|
|
2103
2157
|
}
|
|
2104
2158
|
},
|
|
2105
2159
|
updateShadows_: function() {
|
|
2106
2160
|
if (!this.isInsertionMarker() && this.event.params)
|
|
2107
2161
|
for (let t = 0; t < this.event.params.length; t++) {
|
|
2108
|
-
const e = this.event.params[t], n =
|
|
2162
|
+
const e = this.event.params[t], n = vt(e.type);
|
|
2109
2163
|
this.getInput("PARAM" + t)?.connection?.setShadowDom(n);
|
|
2110
2164
|
}
|
|
2111
2165
|
},
|
|
@@ -2126,7 +2180,7 @@ const qs = {
|
|
|
2126
2180
|
this.setWarningText(null);
|
|
2127
2181
|
}
|
|
2128
2182
|
};
|
|
2129
|
-
A.trigger_app_event_v1 =
|
|
2183
|
+
A.trigger_app_event_v1 = Zs;
|
|
2130
2184
|
i.forBlock.trigger_app_event_v1 = function(t) {
|
|
2131
2185
|
const e = i.quote_, n = t;
|
|
2132
2186
|
let o = "";
|
|
@@ -2161,7 +2215,7 @@ g([
|
|
|
2161
2215
|
}
|
|
2162
2216
|
]);
|
|
2163
2217
|
i.forBlock.watch_effect_v1 = function(t) {
|
|
2164
|
-
const e =
|
|
2218
|
+
const e = Yo(t.id), n = i.statementToCode(t, "HANDLE");
|
|
2165
2219
|
return `function __watchEffect$${e}__() {
|
|
2166
2220
|
${n}};
|
|
2167
2221
|
`;
|
|
@@ -2187,7 +2241,7 @@ i.forBlock.app_debug_trace_v1 = function(t) {
|
|
|
2187
2241
|
return `__debugTraceV1__(${i.valueToCode(t, "OBJECT", _.NONE)});
|
|
2188
2242
|
`;
|
|
2189
2243
|
};
|
|
2190
|
-
const
|
|
2244
|
+
const ti = {
|
|
2191
2245
|
init: function() {
|
|
2192
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}");
|
|
2193
2247
|
},
|
|
@@ -2200,7 +2254,7 @@ const Qs = {
|
|
|
2200
2254
|
}, 0);
|
|
2201
2255
|
},
|
|
2202
2256
|
updateShape_: function() {
|
|
2203
|
-
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_APP_DO}"), this.getInput("RESULT") || (this.appendValueInput("RESULT").appendField("%{BKY_APP_RETURN}"), this.moveInputBefore("RESULT", "HANDLE")), this.getInput("TEXT") || (this.appendValueInput("TEXT").setCheck("String").setAlign(
|
|
2257
|
+
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_APP_DO}"), this.getInput("RESULT") || (this.appendValueInput("RESULT").appendField("%{BKY_APP_RETURN}"), this.moveInputBefore("RESULT", "HANDLE")), this.getInput("TEXT") || (this.appendValueInput("TEXT").setCheck("String").setAlign(S.Align.RIGHT).appendField("%{BKY_APP_TEXT}"), this.moveInputBefore("TEXT", "RESULT")), this.getInput("TITLE") || (this.appendValueInput("TITLE").setCheck("String").setAlign(S.Align.RIGHT).appendField("%{BKY_APP_TITLE}"), this.moveInputBefore("TITLE", "TEXT"));
|
|
2204
2258
|
},
|
|
2205
2259
|
updateShadow_: function() {
|
|
2206
2260
|
if (this.isInsertionMarker())
|
|
@@ -2216,7 +2270,7 @@ const Qs = {
|
|
|
2216
2270
|
]);
|
|
2217
2271
|
}
|
|
2218
2272
|
};
|
|
2219
|
-
A.open_confirm_dlg_v1 =
|
|
2273
|
+
A.open_confirm_dlg_v1 = ti;
|
|
2220
2274
|
i.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
2221
2275
|
const e = i.valueToCode(t, "TITLE", _.ATOMIC), n = i.valueToCode(t, "TEXT", _.ATOMIC), o = i.statementToCode(t, "HANDLE");
|
|
2222
2276
|
return `{
|
|
@@ -2224,7 +2278,7 @@ i.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
|
2224
2278
|
${o}}
|
|
2225
2279
|
`;
|
|
2226
2280
|
};
|
|
2227
|
-
const
|
|
2281
|
+
const ei = {
|
|
2228
2282
|
init: function() {
|
|
2229
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}");
|
|
2230
2284
|
},
|
|
@@ -2237,7 +2291,7 @@ const zs = {
|
|
|
2237
2291
|
}, 0);
|
|
2238
2292
|
},
|
|
2239
2293
|
updateShape_: function() {
|
|
2240
|
-
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_APP_DO}"), this.getInput("RESULT") || (this.appendValueInput("RESULT").appendField("%{BKY_APP_RETURN}"), this.moveInputBefore("RESULT", "HANDLE")), this.getInput("VALUE") || (this.appendValueInput("VALUE").setCheck("String").setAlign(
|
|
2294
|
+
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_APP_DO}"), this.getInput("RESULT") || (this.appendValueInput("RESULT").appendField("%{BKY_APP_RETURN}"), this.moveInputBefore("RESULT", "HANDLE")), this.getInput("VALUE") || (this.appendValueInput("VALUE").setCheck("String").setAlign(S.Align.RIGHT).appendField("%{BKY_APP_VALUE}"), this.moveInputBefore("VALUE", "RESULT")), this.getInput("LABEL") || (this.appendValueInput("LABEL").setCheck("String").setAlign(S.Align.RIGHT).appendField("%{BKY_APP_LABEL}"), this.moveInputBefore("LABEL", "VALUE")), this.getInput("TITLE") || (this.appendValueInput("TITLE").setCheck("String").setAlign(S.Align.RIGHT).appendField("%{BKY_APP_TITLE}"), this.moveInputBefore("TITLE", "LABEL"));
|
|
2241
2295
|
},
|
|
2242
2296
|
updateShadow_: function() {
|
|
2243
2297
|
if (this.isInsertionMarker())
|
|
@@ -2255,7 +2309,7 @@ const zs = {
|
|
|
2255
2309
|
]);
|
|
2256
2310
|
}
|
|
2257
2311
|
};
|
|
2258
|
-
A.open_prompt_dlg_v1 =
|
|
2312
|
+
A.open_prompt_dlg_v1 = ei;
|
|
2259
2313
|
i.forBlock.open_prompt_dlg_v1 = function(t) {
|
|
2260
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");
|
|
2261
2315
|
return `{
|
|
@@ -2295,7 +2349,7 @@ i.forBlock.popup_message_v1 = function(t) {
|
|
|
2295
2349
|
return `__messageV1__(${e}, ${n});
|
|
2296
2350
|
`;
|
|
2297
2351
|
};
|
|
2298
|
-
const
|
|
2352
|
+
const ni = {
|
|
2299
2353
|
init: function() {
|
|
2300
2354
|
this.node = {
|
|
2301
2355
|
id: "",
|
|
@@ -2338,13 +2392,13 @@ const Zs = {
|
|
|
2338
2392
|
}, 0);
|
|
2339
2393
|
},
|
|
2340
2394
|
genNodeOpts_: function() {
|
|
2341
|
-
return
|
|
2395
|
+
return Se("callMethod");
|
|
2342
2396
|
},
|
|
2343
2397
|
genMethodOpts_: function() {
|
|
2344
|
-
return
|
|
2398
|
+
return Gs(this.node.id);
|
|
2345
2399
|
},
|
|
2346
2400
|
onchange: function(t) {
|
|
2347
|
-
if (t.type ===
|
|
2401
|
+
if (t.type === P.STATE_CHANGE)
|
|
2348
2402
|
this.checkWarning_();
|
|
2349
2403
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
2350
2404
|
const e = t;
|
|
@@ -2392,10 +2446,10 @@ const Zs = {
|
|
|
2392
2446
|
if (this.method.inputs)
|
|
2393
2447
|
for (let t = 0; t < this.method.inputs.length; t++) {
|
|
2394
2448
|
const e = this.method.inputs[t];
|
|
2395
|
-
this.getInput("INPUT" + t) || (this.appendValueInput("INPUT" + t).setAlign(
|
|
2449
|
+
this.getInput("INPUT" + t) || (this.appendValueInput("INPUT" + t).setAlign(S.Align.RIGHT).appendField(m(e.name)), this.method.outputs && this.method.outputs.length > 0 && this.moveInputBefore("INPUT" + t, "OUTPUT0"));
|
|
2396
2450
|
}
|
|
2397
2451
|
if (this.method.kind === "multipleRefMethod")
|
|
2398
|
-
this.getInput("REF_KEY") || this.appendValueInput("REF_KEY").setAlign(
|
|
2452
|
+
this.getInput("REF_KEY") || this.appendValueInput("REF_KEY").setAlign(S.Align.RIGHT).appendField(m("BKY_APP_REF_KEY")), this.method.inputs && this.method.inputs.length > 0 ? this.moveInputBefore("REF_KEY", "INPUT0") : this.method.outputs && this.method.outputs.length > 0 && this.moveInputBefore("REF_KEY", "OUTPUT0");
|
|
2399
2453
|
else if (this.getInput("REF_KEY")) {
|
|
2400
2454
|
const t = this.getInput("REF_KEY").connection.targetBlock();
|
|
2401
2455
|
t && t.dispose(), this.removeInput("REF_KEY");
|
|
@@ -2407,14 +2461,14 @@ const Zs = {
|
|
|
2407
2461
|
const e = this.method.inputs[t];
|
|
2408
2462
|
if (!e.type)
|
|
2409
2463
|
continue;
|
|
2410
|
-
const n =
|
|
2464
|
+
const n = vt(e.type);
|
|
2411
2465
|
this.getInput("INPUT" + t).setShadowDom(n);
|
|
2412
2466
|
}
|
|
2413
2467
|
},
|
|
2414
2468
|
ensureBlocks_: function() {
|
|
2415
2469
|
if (this.isInsertionMarker())
|
|
2416
2470
|
return;
|
|
2417
|
-
const { kind: t } = qt(this.method.id), e =
|
|
2471
|
+
const { kind: t } = qt(this.method.id), e = Zn(t), n = [];
|
|
2418
2472
|
if (this.method.outputs)
|
|
2419
2473
|
for (let o = 0; o < this.method.outputs.length; o++) {
|
|
2420
2474
|
const { key: s, name: a } = this.method.outputs[o];
|
|
@@ -2453,7 +2507,7 @@ const Zs = {
|
|
|
2453
2507
|
this.setWarningText(null);
|
|
2454
2508
|
}
|
|
2455
2509
|
};
|
|
2456
|
-
A.call_app_method_v1 =
|
|
2510
|
+
A.call_app_method_v1 = ni;
|
|
2457
2511
|
i.forBlock.call_app_method_v1 = function(t) {
|
|
2458
2512
|
const e = i.INDENT, n = i.quote_, o = t;
|
|
2459
2513
|
let s;
|
|
@@ -2516,7 +2570,7 @@ ${r}${c}}
|
|
|
2516
2570
|
return `__callMethodV1__(${n(o.method.id)}, ${s}, ${a});
|
|
2517
2571
|
`;
|
|
2518
2572
|
};
|
|
2519
|
-
const
|
|
2573
|
+
const oi = {
|
|
2520
2574
|
init: function() {
|
|
2521
2575
|
this.method = {
|
|
2522
2576
|
id: "",
|
|
@@ -2549,7 +2603,7 @@ const ti = {
|
|
|
2549
2603
|
return lo();
|
|
2550
2604
|
},
|
|
2551
2605
|
onchange: function(t) {
|
|
2552
|
-
if (t.type ===
|
|
2606
|
+
if (t.type === P.STATE_CHANGE)
|
|
2553
2607
|
this.checkWarning_();
|
|
2554
2608
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
2555
2609
|
const e = t;
|
|
@@ -2576,7 +2630,7 @@ const ti = {
|
|
|
2576
2630
|
ensureBlocks_: function() {
|
|
2577
2631
|
if (this.isInsertionMarker() || !this.method.id)
|
|
2578
2632
|
return;
|
|
2579
|
-
const t =
|
|
2633
|
+
const t = Zn(this.method.kind), e = [];
|
|
2580
2634
|
if (this.method.inputs)
|
|
2581
2635
|
for (let n = 0; n < this.method.inputs.length; n++) {
|
|
2582
2636
|
const { key: o, name: s } = this.method.inputs[n];
|
|
@@ -2601,7 +2655,7 @@ const ti = {
|
|
|
2601
2655
|
this.setWarningText(null);
|
|
2602
2656
|
}
|
|
2603
2657
|
};
|
|
2604
|
-
A.implement_app_method_v1 =
|
|
2658
|
+
A.implement_app_method_v1 = oi;
|
|
2605
2659
|
i.forBlock.implement_app_method_v1 = function(t) {
|
|
2606
2660
|
const e = i.INDENT, n = i.quote_, o = t, { methodKey: s } = qt(o.method.id);
|
|
2607
2661
|
let a = "";
|
|
@@ -2616,7 +2670,7 @@ ${r}${e}return __outputs__;
|
|
|
2616
2670
|
}
|
|
2617
2671
|
`;
|
|
2618
2672
|
};
|
|
2619
|
-
const
|
|
2673
|
+
const si = {
|
|
2620
2674
|
init: function() {
|
|
2621
2675
|
this.method = {
|
|
2622
2676
|
id: "",
|
|
@@ -2665,10 +2719,10 @@ const ei = {
|
|
|
2665
2719
|
return lo();
|
|
2666
2720
|
},
|
|
2667
2721
|
genOutputOpts_: function() {
|
|
2668
|
-
return
|
|
2722
|
+
return Ws(this.method.id);
|
|
2669
2723
|
},
|
|
2670
2724
|
onchange: function(t) {
|
|
2671
|
-
if (t.type ===
|
|
2725
|
+
if (t.type === P.STATE_CHANGE)
|
|
2672
2726
|
this.checkWarning_();
|
|
2673
2727
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
2674
2728
|
const e = t;
|
|
@@ -2701,13 +2755,13 @@ const ei = {
|
|
|
2701
2755
|
t.connection.setShadowDom(null);
|
|
2702
2756
|
const e = t.connection.targetBlock();
|
|
2703
2757
|
e && !e.isShadow() && e.dispose();
|
|
2704
|
-
const n =
|
|
2758
|
+
const n = Ot(this.output.type);
|
|
2705
2759
|
t.setCheck(n);
|
|
2706
2760
|
},
|
|
2707
2761
|
updateShadows_: function() {
|
|
2708
2762
|
if (this.isInsertionMarker())
|
|
2709
2763
|
return;
|
|
2710
|
-
const t =
|
|
2764
|
+
const t = vt(this.output.type);
|
|
2711
2765
|
this.getInput("VALUE").connection.setShadowDom(t);
|
|
2712
2766
|
},
|
|
2713
2767
|
checkWarning_: function() {
|
|
@@ -2736,7 +2790,7 @@ const ei = {
|
|
|
2736
2790
|
this.setWarningText(null);
|
|
2737
2791
|
}
|
|
2738
2792
|
};
|
|
2739
|
-
A.set_app_method_output_v1 =
|
|
2793
|
+
A.set_app_method_output_v1 = si;
|
|
2740
2794
|
i.forBlock.set_app_method_output_v1 = function(t) {
|
|
2741
2795
|
const e = i.quote_, n = t;
|
|
2742
2796
|
let o = i.valueToCode(n, "VALUE", _.ATOMIC);
|
|
@@ -2786,7 +2840,7 @@ g([
|
|
|
2786
2840
|
i.forBlock.app_env_is_v1 = function(t) {
|
|
2787
2841
|
return [`__getEnvV1__() === ${i.quote_(t.getFieldValue("ENV"))}`, _.ATOMIC];
|
|
2788
2842
|
};
|
|
2789
|
-
const
|
|
2843
|
+
const ii = {
|
|
2790
2844
|
init: function() {
|
|
2791
2845
|
this.app = {
|
|
2792
2846
|
id: "",
|
|
@@ -2799,7 +2853,7 @@ const ni = {
|
|
|
2799
2853
|
initData_: function() {
|
|
2800
2854
|
if (this.app.id)
|
|
2801
2855
|
return;
|
|
2802
|
-
const t =
|
|
2856
|
+
const t = co()?.[0];
|
|
2803
2857
|
if (!t)
|
|
2804
2858
|
return;
|
|
2805
2859
|
this.app.id = t.id, this.app.name = t.name;
|
|
@@ -2824,13 +2878,13 @@ const ni = {
|
|
|
2824
2878
|
}, 0);
|
|
2825
2879
|
},
|
|
2826
2880
|
genAppOpts_: function() {
|
|
2827
|
-
return
|
|
2881
|
+
return Fs();
|
|
2828
2882
|
},
|
|
2829
2883
|
genPageOpts_: function() {
|
|
2830
|
-
return
|
|
2884
|
+
return ws(this.app.id);
|
|
2831
2885
|
},
|
|
2832
2886
|
onchange: function(t) {
|
|
2833
|
-
if (t.type ===
|
|
2887
|
+
if (t.type === P.STATE_CHANGE)
|
|
2834
2888
|
this.checkWarning_();
|
|
2835
2889
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
2836
2890
|
const e = t;
|
|
@@ -2872,21 +2926,21 @@ const ni = {
|
|
|
2872
2926
|
e.name !== this.page.name && (this.page.name = e.name), this.setWarningText(null);
|
|
2873
2927
|
}
|
|
2874
2928
|
};
|
|
2875
|
-
A.navigate_to_v1 =
|
|
2929
|
+
A.navigate_to_v1 = ii;
|
|
2876
2930
|
i.forBlock.navigate_to_v1 = function(t) {
|
|
2877
2931
|
const e = t, n = i.quote_(e.app.id), o = i.quote_(e.page.id);
|
|
2878
2932
|
return `__navigateToV1__(${n}, ${o});
|
|
2879
2933
|
`;
|
|
2880
2934
|
};
|
|
2881
|
-
const
|
|
2935
|
+
const ai = {
|
|
2882
2936
|
init: function() {
|
|
2883
2937
|
this.comp = {
|
|
2884
|
-
id:
|
|
2938
|
+
id: "",
|
|
2885
2939
|
name: ""
|
|
2886
2940
|
}, this.appendDummyInput().appendField("%{BKY_APP_V1_SELECT_COMP_TITLE}").appendField(new v(() => this.genCompOpts_()), "COMP"), this.setOutput(!0, "Comp"), this.setStyle("property_blocks"), this.setTooltip("%{BKY_APP_V1_SELECT_COMP_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_SELECT_COMP_HELPURL}"), this.initData_();
|
|
2887
2941
|
},
|
|
2888
2942
|
initData_: function() {
|
|
2889
|
-
if (this.comp.id
|
|
2943
|
+
if (this.comp.id)
|
|
2890
2944
|
return;
|
|
2891
2945
|
const t = ro()?.[0];
|
|
2892
2946
|
if (!t)
|
|
@@ -2906,10 +2960,10 @@ const oi = {
|
|
|
2906
2960
|
}, 0);
|
|
2907
2961
|
},
|
|
2908
2962
|
genCompOpts_: function() {
|
|
2909
|
-
return
|
|
2963
|
+
return Ks();
|
|
2910
2964
|
},
|
|
2911
2965
|
onchange: function(t) {
|
|
2912
|
-
if (t.type ===
|
|
2966
|
+
if (t.type === P.STATE_CHANGE)
|
|
2913
2967
|
this.checkWarning_();
|
|
2914
2968
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
2915
2969
|
const e = t;
|
|
@@ -2920,30 +2974,81 @@ const oi = {
|
|
|
2920
2974
|
},
|
|
2921
2975
|
onCompChange_: function(t) {
|
|
2922
2976
|
const e = Dn(t);
|
|
2923
|
-
|
|
2924
|
-
console.assert(!1);
|
|
2925
|
-
return;
|
|
2926
|
-
}
|
|
2927
|
-
this.comp.id = e.id, this.comp.name = e.name;
|
|
2977
|
+
e ? (this.comp.id = e.id, this.comp.name = e.name) : (this.comp.id = "", this.comp.name = "");
|
|
2928
2978
|
},
|
|
2929
2979
|
checkWarning_: function() {
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
return;
|
|
2933
|
-
}
|
|
2934
|
-
if (!Dn(this.comp.id)) {
|
|
2980
|
+
const t = Dn(this.comp.id);
|
|
2981
|
+
if (!t) {
|
|
2935
2982
|
this.setWarningText(m("WARN_COMP_NOT_FOUND"));
|
|
2936
2983
|
return;
|
|
2937
2984
|
}
|
|
2938
|
-
this.setWarningText(null);
|
|
2985
|
+
t.name !== this.comp.name && (this.comp.name = t.name), this.setWarningText(null);
|
|
2939
2986
|
}
|
|
2940
2987
|
};
|
|
2941
|
-
A.select_comp_v1 =
|
|
2988
|
+
A.select_comp_v1 = ai;
|
|
2942
2989
|
i.forBlock.select_comp_v1 = function(t) {
|
|
2943
2990
|
const e = i.quote_, o = t.comp.id ?? "";
|
|
2944
2991
|
return [e(o), _.ATOMIC];
|
|
2945
2992
|
};
|
|
2946
|
-
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 = {
|
|
2947
3052
|
init: function() {
|
|
2948
3053
|
this.node = {
|
|
2949
3054
|
id: "",
|
|
@@ -2986,13 +3091,13 @@ const si = {
|
|
|
2986
3091
|
}, 0);
|
|
2987
3092
|
},
|
|
2988
3093
|
genNodeOpts_: function() {
|
|
2989
|
-
return
|
|
3094
|
+
return Se("getProperty");
|
|
2990
3095
|
},
|
|
2991
3096
|
genPropertyOpts_: function() {
|
|
2992
3097
|
return po(this.node.id, "read");
|
|
2993
3098
|
},
|
|
2994
3099
|
onchange: function(t) {
|
|
2995
|
-
if (t.type ===
|
|
3100
|
+
if (t.type === P.STATE_CHANGE)
|
|
2996
3101
|
this.checkWarning_();
|
|
2997
3102
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
2998
3103
|
const e = t;
|
|
@@ -3043,12 +3148,12 @@ const si = {
|
|
|
3043
3148
|
w(e.names, this.property.names) || (this.property.names = e.names), this.setWarningText(null);
|
|
3044
3149
|
}
|
|
3045
3150
|
};
|
|
3046
|
-
A.get_app_property_v1 =
|
|
3151
|
+
A.get_app_property_v1 = ri;
|
|
3047
3152
|
i.forBlock.get_app_property_v1 = function(t) {
|
|
3048
3153
|
const e = i.quote_;
|
|
3049
3154
|
return [`__getPropertyV1__(${e(t.property.id)}, ${e("")})`, _.ATOMIC];
|
|
3050
3155
|
};
|
|
3051
|
-
const
|
|
3156
|
+
const ui = {
|
|
3052
3157
|
init: function() {
|
|
3053
3158
|
this.node = {
|
|
3054
3159
|
id: "",
|
|
@@ -3091,13 +3196,13 @@ const ii = {
|
|
|
3091
3196
|
}, 0);
|
|
3092
3197
|
},
|
|
3093
3198
|
genNodeOpts_: function() {
|
|
3094
|
-
return
|
|
3199
|
+
return Se("setProperty");
|
|
3095
3200
|
},
|
|
3096
3201
|
genPropertyOpts_: function() {
|
|
3097
3202
|
return po(this.node.id, "write");
|
|
3098
3203
|
},
|
|
3099
3204
|
onchange: function(t) {
|
|
3100
|
-
if (t.type ===
|
|
3205
|
+
if (t.type === P.STATE_CHANGE)
|
|
3101
3206
|
this.checkWarning_();
|
|
3102
3207
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
3103
3208
|
const e = t;
|
|
@@ -3134,10 +3239,10 @@ const ii = {
|
|
|
3134
3239
|
this.getInput("VALUE").setShadowDom(null);
|
|
3135
3240
|
const e = this.getInput("VALUE").connection.targetBlock();
|
|
3136
3241
|
if (e && e.dispose(), t.meta.element) {
|
|
3137
|
-
const n =
|
|
3242
|
+
const n = ys(t.meta.raw), o = Bs(t.meta.raw);
|
|
3138
3243
|
this.getInput("VALUE").setCheck(n).setShadowDom(o);
|
|
3139
3244
|
} else {
|
|
3140
|
-
const n =
|
|
3245
|
+
const n = Ot(t.meta.raw.type), o = vt(t.meta.raw.type);
|
|
3141
3246
|
this.getInput("VALUE").setCheck(n).setShadowDom(o);
|
|
3142
3247
|
}
|
|
3143
3248
|
},
|
|
@@ -3164,13 +3269,13 @@ const ii = {
|
|
|
3164
3269
|
w(e.names, this.property.names) || (this.property.names = e.names), this.setWarningText(null);
|
|
3165
3270
|
}
|
|
3166
3271
|
};
|
|
3167
|
-
A.set_app_property_v1 =
|
|
3272
|
+
A.set_app_property_v1 = ui;
|
|
3168
3273
|
i.forBlock.set_app_property_v1 = function(t) {
|
|
3169
3274
|
const e = i.quote_, n = t, o = "", s = i.valueToCode(n, "VALUE", _.NONE);
|
|
3170
3275
|
return `__setPropertyV1__(${e(n.property.id)}, ${e(o)}, ${s});
|
|
3171
3276
|
`;
|
|
3172
3277
|
};
|
|
3173
|
-
const
|
|
3278
|
+
const li = {
|
|
3174
3279
|
init: function() {
|
|
3175
3280
|
this.state = {
|
|
3176
3281
|
id: "",
|
|
@@ -3202,10 +3307,10 @@ const ai = {
|
|
|
3202
3307
|
}, 0);
|
|
3203
3308
|
},
|
|
3204
3309
|
genStateOpts_: function() {
|
|
3205
|
-
return
|
|
3310
|
+
return fo();
|
|
3206
3311
|
},
|
|
3207
3312
|
onchange: function(t) {
|
|
3208
|
-
if (t.type ===
|
|
3313
|
+
if (t.type === P.STATE_CHANGE)
|
|
3209
3314
|
this.checkWarning_();
|
|
3210
3315
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
3211
3316
|
const e = t;
|
|
@@ -3229,12 +3334,12 @@ const ai = {
|
|
|
3229
3334
|
this.setWarningText(null);
|
|
3230
3335
|
}
|
|
3231
3336
|
};
|
|
3232
|
-
A.get_app_state_v1 =
|
|
3337
|
+
A.get_app_state_v1 = li;
|
|
3233
3338
|
i.forBlock.get_app_state_v1 = function(t) {
|
|
3234
3339
|
const e = i.quote_;
|
|
3235
3340
|
return [`__getStateV1__(${e(t.state.id)})`, _.ATOMIC];
|
|
3236
3341
|
};
|
|
3237
|
-
const
|
|
3342
|
+
const _i = {
|
|
3238
3343
|
init: function() {
|
|
3239
3344
|
this.state = {
|
|
3240
3345
|
id: "",
|
|
@@ -3264,7 +3369,7 @@ const ci = {
|
|
|
3264
3369
|
this.state.id = t.state?.id ?? "", this.state.name = t.state?.name ?? "", this.state.type = t.state?.type ?? "string";
|
|
3265
3370
|
},
|
|
3266
3371
|
genStateOpts_: function() {
|
|
3267
|
-
return
|
|
3372
|
+
return fo();
|
|
3268
3373
|
},
|
|
3269
3374
|
onchange: function(t) {
|
|
3270
3375
|
if (t.type === O.BLOCK_CHANGE) {
|
|
@@ -3282,7 +3387,7 @@ const ci = {
|
|
|
3282
3387
|
this.getInput("VALUE").setShadowDom(null);
|
|
3283
3388
|
const t = this.getInput("VALUE").connection.targetBlock();
|
|
3284
3389
|
t && t.dispose();
|
|
3285
|
-
const e =
|
|
3390
|
+
const e = Ot(this.state.type), n = vt(this.state.type);
|
|
3286
3391
|
this.getInput("VALUE").setCheck(e).setShadowDom(n);
|
|
3287
3392
|
},
|
|
3288
3393
|
checkWarning_: function() {
|
|
@@ -3298,7 +3403,7 @@ const ci = {
|
|
|
3298
3403
|
this.setWarningText(null);
|
|
3299
3404
|
}
|
|
3300
3405
|
};
|
|
3301
|
-
A.set_app_state_v1 =
|
|
3406
|
+
A.set_app_state_v1 = _i;
|
|
3302
3407
|
i.forBlock.set_app_state_v1 = function(t) {
|
|
3303
3408
|
const e = i.quote_, n = t, o = i.valueToCode(n, "VALUE", _.NONE);
|
|
3304
3409
|
return `__setStateV1__(${e(n.state.id)}, ${o});
|
|
@@ -4007,7 +4112,7 @@ function ${i.FUNCTION_NAME_PLACEHOLDER_}(r, g, b) {
|
|
|
4007
4112
|
`
|
|
4008
4113
|
)}(${e}, ${n}, ${o})`, _.FUNCTION_CALL];
|
|
4009
4114
|
};
|
|
4010
|
-
const
|
|
4115
|
+
const pi = N.xml, di = [
|
|
4011
4116
|
{
|
|
4012
4117
|
type: "add_data_v1",
|
|
4013
4118
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
@@ -4069,16 +4174,16 @@ const ri = L.xml, ui = [
|
|
|
4069
4174
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
4070
4175
|
}
|
|
4071
4176
|
];
|
|
4072
|
-
function
|
|
4073
|
-
const n =
|
|
4177
|
+
function hi(t, e) {
|
|
4178
|
+
const n = di.find((o) => o.type === t);
|
|
4074
4179
|
return n ? !!(n.prefixInputs?.some((o) => e.startsWith(o)) || n.inputs?.some((o) => o === e)) : !1;
|
|
4075
4180
|
}
|
|
4076
|
-
const
|
|
4181
|
+
const fi = {
|
|
4077
4182
|
init: function() {
|
|
4078
4183
|
this.key = "", this.name = "", this.locale = !1, this.appendDummyInput().appendField("", "LABEL"), this.setOutput(!0), this.setColour(220);
|
|
4079
4184
|
},
|
|
4080
4185
|
mutationToDom: function() {
|
|
4081
|
-
const t =
|
|
4186
|
+
const t = pi.createElement("mutation");
|
|
4082
4187
|
return t.setAttribute("key", this.key), t.setAttribute("name", this.name), t.setAttribute("locale", this.locale ? "TRUE" : "FALSE"), t;
|
|
4083
4188
|
},
|
|
4084
4189
|
domToMutation: function(t) {
|
|
@@ -4107,7 +4212,7 @@ const _i = {
|
|
|
4107
4212
|
},
|
|
4108
4213
|
tryDuplicate_: function(t) {
|
|
4109
4214
|
const e = this.workspace.getBlockById(t.oldParentId);
|
|
4110
|
-
if (e &&
|
|
4215
|
+
if (e && hi(e.type, t.oldInputName))
|
|
4111
4216
|
try {
|
|
4112
4217
|
O.disable();
|
|
4113
4218
|
const n = e.getInput(t.oldInputName)?.connection;
|
|
@@ -4126,21 +4231,21 @@ const _i = {
|
|
|
4126
4231
|
},
|
|
4127
4232
|
updateShape_: function() {
|
|
4128
4233
|
if (this.locale) {
|
|
4129
|
-
const { i18n: t } =
|
|
4234
|
+
const { i18n: t } = yt;
|
|
4130
4235
|
this.setFieldValue(t.global.t(this.name), "LABEL");
|
|
4131
4236
|
} else
|
|
4132
4237
|
this.setFieldValue(this.name, "LABEL");
|
|
4133
4238
|
}
|
|
4134
4239
|
};
|
|
4135
|
-
A.parameter_v1 =
|
|
4240
|
+
A.parameter_v1 = fi;
|
|
4136
4241
|
i.forBlock.parameter_v1 = function(t) {
|
|
4137
4242
|
return [t.key, _.ATOMIC];
|
|
4138
4243
|
};
|
|
4139
|
-
const
|
|
4244
|
+
const mi = {
|
|
4140
4245
|
init: function() {
|
|
4141
4246
|
}
|
|
4142
4247
|
};
|
|
4143
|
-
A.on_flow_state_event_v1 =
|
|
4248
|
+
A.on_flow_state_event_v1 = mi;
|
|
4144
4249
|
i.forBlock.on_flow_state_event_v1 = function() {
|
|
4145
4250
|
return `__onFlowStateEventV1__();
|
|
4146
4251
|
`;
|
|
@@ -4154,7 +4259,7 @@ function Dt(t, e) {
|
|
|
4154
4259
|
if (n)
|
|
4155
4260
|
return n.funcs.find((o) => o.id === e);
|
|
4156
4261
|
}
|
|
4157
|
-
function
|
|
4262
|
+
function mo(t) {
|
|
4158
4263
|
const e = [];
|
|
4159
4264
|
return jt(t).forEach(({ id: o, name: s }) => {
|
|
4160
4265
|
e.push([s, o]);
|
|
@@ -4163,11 +4268,11 @@ function fo(t) {
|
|
|
4163
4268
|
function an() {
|
|
4164
4269
|
return I.compute.activeFunc;
|
|
4165
4270
|
}
|
|
4166
|
-
function
|
|
4271
|
+
function Vn(t) {
|
|
4167
4272
|
const { activeFunc: e } = I.compute;
|
|
4168
4273
|
return e.outputs?.find((n) => n.id === t);
|
|
4169
4274
|
}
|
|
4170
|
-
function
|
|
4275
|
+
function Ti() {
|
|
4171
4276
|
const { activeFunc: t } = I.compute, e = [];
|
|
4172
4277
|
return t.outputs?.forEach(({ id: n, name: o }) => {
|
|
4173
4278
|
e.push([o, n]);
|
|
@@ -4182,13 +4287,13 @@ function Zt(t) {
|
|
|
4182
4287
|
function pe(t) {
|
|
4183
4288
|
return I.compute.spaces.find((e) => e.id === t);
|
|
4184
4289
|
}
|
|
4185
|
-
function
|
|
4290
|
+
function To(t) {
|
|
4186
4291
|
const e = [];
|
|
4187
4292
|
return Zt(t).forEach(({ id: o, name: s }) => {
|
|
4188
4293
|
e.push([s, o]);
|
|
4189
4294
|
}), B(e);
|
|
4190
4295
|
}
|
|
4191
|
-
const
|
|
4296
|
+
const Ei = {
|
|
4192
4297
|
init: function() {
|
|
4193
4298
|
this.space = {
|
|
4194
4299
|
id: "",
|
|
@@ -4231,13 +4336,13 @@ const hi = {
|
|
|
4231
4336
|
}, 0);
|
|
4232
4337
|
},
|
|
4233
4338
|
genSpaceOpts_: function() {
|
|
4234
|
-
return
|
|
4339
|
+
return To("func");
|
|
4235
4340
|
},
|
|
4236
4341
|
genFuncOpts_: function() {
|
|
4237
|
-
return
|
|
4342
|
+
return mo(this.space.id);
|
|
4238
4343
|
},
|
|
4239
4344
|
onchange: function(t) {
|
|
4240
|
-
if (t.type ===
|
|
4345
|
+
if (t.type === P.STATE_CHANGE)
|
|
4241
4346
|
this.checkWarning_();
|
|
4242
4347
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
4243
4348
|
const e = t;
|
|
@@ -4286,19 +4391,19 @@ const hi = {
|
|
|
4286
4391
|
}
|
|
4287
4392
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
4288
4393
|
const { name: e } = this.func.inputs[t], n = this.getInput("INPUT" + t);
|
|
4289
|
-
n ? (this.setFieldValue(e, "NAME" + t), n.setCheck(null)) : (this.appendValueInput("INPUT" + t).setAlign(
|
|
4394
|
+
n ? (this.setFieldValue(e, "NAME" + t), n.setCheck(null)) : (this.appendValueInput("INPUT" + t).setAlign(S.Align.RIGHT).appendField(e, "NAME" + t).setCheck(null), this.getInput("OUTPUT0") ? this.moveInputBefore("INPUT" + t, "OUTPUT0") : this.moveInputBefore("INPUT" + t, "CALLBACK"));
|
|
4290
4395
|
}
|
|
4291
4396
|
},
|
|
4292
4397
|
updateCheck_: function() {
|
|
4293
4398
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
4294
|
-
const { type: e } = this.func.inputs[t], n =
|
|
4399
|
+
const { type: e } = this.func.inputs[t], n = Ot(e);
|
|
4295
4400
|
this.getInput("INPUT" + t).connection.setCheck(n);
|
|
4296
4401
|
}
|
|
4297
4402
|
},
|
|
4298
4403
|
updateShadow_: function() {
|
|
4299
4404
|
if (!this.isInsertionMarker())
|
|
4300
4405
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
4301
|
-
const e = this.func.inputs[t], n =
|
|
4406
|
+
const e = this.func.inputs[t], n = vt(e.type);
|
|
4302
4407
|
this.getInput("INPUT" + t).setShadowDom(n);
|
|
4303
4408
|
}
|
|
4304
4409
|
},
|
|
@@ -4335,7 +4440,7 @@ const hi = {
|
|
|
4335
4440
|
this.setWarningText(null);
|
|
4336
4441
|
}
|
|
4337
4442
|
};
|
|
4338
|
-
A.call_func_v1 =
|
|
4443
|
+
A.call_func_v1 = Ei;
|
|
4339
4444
|
i.forBlock.call_func_v1 = function(t) {
|
|
4340
4445
|
const e = i.INDENT, n = i.quote_, o = t, s = n(o.space.id), a = n(o.func.id);
|
|
4341
4446
|
let r = "";
|
|
@@ -4362,7 +4467,7 @@ ${e}var __result__ = __callFuncV1__(${s},${a},__inputs__,__getEnvV1__(),${c});
|
|
|
4362
4467
|
${l}${d}}
|
|
4363
4468
|
`;
|
|
4364
4469
|
};
|
|
4365
|
-
const
|
|
4470
|
+
const gi = {
|
|
4366
4471
|
init: function() {
|
|
4367
4472
|
this.space = {
|
|
4368
4473
|
id: "",
|
|
@@ -4405,13 +4510,13 @@ const fi = {
|
|
|
4405
4510
|
}, 0);
|
|
4406
4511
|
},
|
|
4407
4512
|
genSpaceOpts_: function() {
|
|
4408
|
-
return
|
|
4513
|
+
return To("func");
|
|
4409
4514
|
},
|
|
4410
4515
|
genFuncOpts_: function() {
|
|
4411
|
-
return
|
|
4516
|
+
return mo(this.space.id);
|
|
4412
4517
|
},
|
|
4413
4518
|
onchange: function(t) {
|
|
4414
|
-
if (t.type ===
|
|
4519
|
+
if (t.type === P.STATE_CHANGE)
|
|
4415
4520
|
this.checkWarning_();
|
|
4416
4521
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
4417
4522
|
const e = t;
|
|
@@ -4460,19 +4565,19 @@ const fi = {
|
|
|
4460
4565
|
}
|
|
4461
4566
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
4462
4567
|
const { name: e } = this.func.inputs[t], n = this.getInput("INPUT" + t);
|
|
4463
|
-
n ? (this.setFieldValue(e, "NAME" + t), n.setCheck(null)) : (this.appendValueInput("INPUT" + t).setAlign(
|
|
4568
|
+
n ? (this.setFieldValue(e, "NAME" + t), n.setCheck(null)) : (this.appendValueInput("INPUT" + t).setAlign(S.Align.RIGHT).appendField(e, "NAME" + t).setCheck(null), this.getInput("OUTPUT0") ? this.moveInputBefore("INPUT" + t, "OUTPUT0") : this.moveInputBefore("INPUT" + t, "CALLBACK"));
|
|
4464
4569
|
}
|
|
4465
4570
|
},
|
|
4466
4571
|
updateCheck_: function() {
|
|
4467
4572
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
4468
|
-
const { type: e } = this.func.inputs[t], n =
|
|
4573
|
+
const { type: e } = this.func.inputs[t], n = Ot(e);
|
|
4469
4574
|
this.getInput("INPUT" + t).connection.setCheck(n);
|
|
4470
4575
|
}
|
|
4471
4576
|
},
|
|
4472
4577
|
updateShadow_: function() {
|
|
4473
4578
|
if (!this.isInsertionMarker())
|
|
4474
4579
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
4475
|
-
const e = this.func.inputs[t], n =
|
|
4580
|
+
const e = this.func.inputs[t], n = vt(e.type);
|
|
4476
4581
|
this.getInput("INPUT" + t).setShadowDom(n);
|
|
4477
4582
|
}
|
|
4478
4583
|
},
|
|
@@ -4509,7 +4614,7 @@ const fi = {
|
|
|
4509
4614
|
this.setWarningText(null);
|
|
4510
4615
|
}
|
|
4511
4616
|
};
|
|
4512
|
-
A.call_func_internal_v1 =
|
|
4617
|
+
A.call_func_internal_v1 = gi;
|
|
4513
4618
|
i.forBlock.call_func_internal_v1 = function(t) {
|
|
4514
4619
|
const e = i.INDENT, n = i.quote_, o = t, s = n(o.space.id), a = n(o.func.id);
|
|
4515
4620
|
let r = `${e}var __inputs__ = {
|
|
@@ -4539,7 +4644,7 @@ ${e}}
|
|
|
4539
4644
|
${l}${d}}
|
|
4540
4645
|
`;
|
|
4541
4646
|
};
|
|
4542
|
-
const
|
|
4647
|
+
const Ai = {
|
|
4543
4648
|
init: function() {
|
|
4544
4649
|
this.func = {
|
|
4545
4650
|
id: ""
|
|
@@ -4595,7 +4700,7 @@ const mi = {
|
|
|
4595
4700
|
this.setWarningText(null);
|
|
4596
4701
|
}
|
|
4597
4702
|
};
|
|
4598
|
-
A.func_entry_v1 =
|
|
4703
|
+
A.func_entry_v1 = Ai;
|
|
4599
4704
|
i.forBlock.func_entry_v1 = function(t) {
|
|
4600
4705
|
const e = t, n = i.statementToCode(e, "HANDLE"), o = [];
|
|
4601
4706
|
if (e.func.inputs)
|
|
@@ -4606,7 +4711,7 @@ i.forBlock.func_entry_v1 = function(t) {
|
|
|
4606
4711
|
return `function __funcEntryV1__(${o.join(", ")}) {
|
|
4607
4712
|
${n}}`;
|
|
4608
4713
|
};
|
|
4609
|
-
const
|
|
4714
|
+
const Ii = {
|
|
4610
4715
|
init: function() {
|
|
4611
4716
|
this.output = {
|
|
4612
4717
|
id: "",
|
|
@@ -4634,10 +4739,10 @@ const Ti = {
|
|
|
4634
4739
|
}, 0);
|
|
4635
4740
|
},
|
|
4636
4741
|
genOutputOpts_: function() {
|
|
4637
|
-
return
|
|
4742
|
+
return Ti();
|
|
4638
4743
|
},
|
|
4639
4744
|
onchange: function(t) {
|
|
4640
|
-
if (t.type ===
|
|
4745
|
+
if (t.type === P.STATE_CHANGE)
|
|
4641
4746
|
this.checkWarning_();
|
|
4642
4747
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
4643
4748
|
const e = t;
|
|
@@ -4647,7 +4752,7 @@ const Ti = {
|
|
|
4647
4752
|
}
|
|
4648
4753
|
},
|
|
4649
4754
|
onOutputChange_: function(t) {
|
|
4650
|
-
const e =
|
|
4755
|
+
const e = Vn(t);
|
|
4651
4756
|
if (!e) {
|
|
4652
4757
|
console.assert(!1);
|
|
4653
4758
|
return;
|
|
@@ -4659,17 +4764,17 @@ const Ti = {
|
|
|
4659
4764
|
t.connection.setShadowDom(null);
|
|
4660
4765
|
const e = t.connection.targetBlock();
|
|
4661
4766
|
e && !e.isShadow() && e.dispose();
|
|
4662
|
-
const n =
|
|
4767
|
+
const n = Ot(this.output.type);
|
|
4663
4768
|
t.setCheck(n);
|
|
4664
4769
|
},
|
|
4665
4770
|
updateShadows_: function() {
|
|
4666
4771
|
if (this.isInsertionMarker())
|
|
4667
4772
|
return;
|
|
4668
|
-
const t =
|
|
4773
|
+
const t = vt(this.output.type);
|
|
4669
4774
|
this.getInput("VALUE").setShadowDom(t);
|
|
4670
4775
|
},
|
|
4671
4776
|
checkWarning_: function() {
|
|
4672
|
-
const t =
|
|
4777
|
+
const t = Vn(this.output.id);
|
|
4673
4778
|
if (!t) {
|
|
4674
4779
|
this.setWarningText(m("WARN_FUNC_HAS_CHANGED"));
|
|
4675
4780
|
return;
|
|
@@ -4681,7 +4786,7 @@ const Ti = {
|
|
|
4681
4786
|
this.setWarningText(null);
|
|
4682
4787
|
}
|
|
4683
4788
|
};
|
|
4684
|
-
A.set_func_output_v1 =
|
|
4789
|
+
A.set_func_output_v1 = Ii;
|
|
4685
4790
|
i.forBlock.set_func_output_v1 = function(t) {
|
|
4686
4791
|
const e = i.quote_, n = t, { id: o, type: s } = n.output;
|
|
4687
4792
|
let a = i.valueToCode(n, "VALUE", _.ATOMIC);
|
|
@@ -4763,7 +4868,7 @@ function At(t) {
|
|
|
4763
4868
|
const { spaces: e } = I.data;
|
|
4764
4869
|
return e.find((n) => n.id === t);
|
|
4765
4870
|
}
|
|
4766
|
-
function
|
|
4871
|
+
function Ne() {
|
|
4767
4872
|
const t = [];
|
|
4768
4873
|
return at().forEach(({ id: n, name: o }) => {
|
|
4769
4874
|
t.push([o, n]);
|
|
@@ -4799,13 +4904,13 @@ function Ge(t, e, n) {
|
|
|
4799
4904
|
if (a)
|
|
4800
4905
|
return a.columns.find((r) => r.id === n);
|
|
4801
4906
|
}
|
|
4802
|
-
function
|
|
4907
|
+
function yi(t, e) {
|
|
4803
4908
|
const n = [];
|
|
4804
4909
|
return de(t, e).forEach(({ id: s, name: a }) => {
|
|
4805
4910
|
n.push([a, s]);
|
|
4806
4911
|
}), B(n);
|
|
4807
4912
|
}
|
|
4808
|
-
function
|
|
4913
|
+
function Oi(t) {
|
|
4809
4914
|
const e = t.getInput("TABLE").connection;
|
|
4810
4915
|
if (e.targetBlock())
|
|
4811
4916
|
return;
|
|
@@ -4839,7 +4944,7 @@ function gi(t) {
|
|
|
4839
4944
|
}, r = J.blocks.append(a, t.workspace);
|
|
4840
4945
|
e.connect(r.outputConnection);
|
|
4841
4946
|
}
|
|
4842
|
-
function
|
|
4947
|
+
function vi(t) {
|
|
4843
4948
|
const e = t.getInput("HANDLE").connection;
|
|
4844
4949
|
if (e.targetBlock())
|
|
4845
4950
|
return;
|
|
@@ -4863,7 +4968,7 @@ function Ai(t) {
|
|
|
4863
4968
|
}, o = J.blocks.append(n, t.workspace);
|
|
4864
4969
|
e.connect(o.previousConnection);
|
|
4865
4970
|
}
|
|
4866
|
-
const
|
|
4971
|
+
const Ci = {
|
|
4867
4972
|
init: function() {
|
|
4868
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}");
|
|
4869
4974
|
},
|
|
@@ -4876,17 +4981,17 @@ const Ii = {
|
|
|
4876
4981
|
}, 0);
|
|
4877
4982
|
},
|
|
4878
4983
|
updateShape_: function() {
|
|
4879
|
-
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(
|
|
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"));
|
|
4880
4985
|
},
|
|
4881
4986
|
ensureBlocks_: function() {
|
|
4882
|
-
this.isInsertionMarker() || (
|
|
4987
|
+
this.isInsertionMarker() || (Oi(this), j(this, [
|
|
4883
4988
|
["SUCCESS", "__success__", "x-runtime-lib.success", !0],
|
|
4884
4989
|
["MESSAGE", "__message__", "x-runtime-lib.message", !0],
|
|
4885
4990
|
["DATA", "__data__", "x-runtime-lib.data", !0]
|
|
4886
|
-
]),
|
|
4991
|
+
]), vi(this));
|
|
4887
4992
|
}
|
|
4888
4993
|
};
|
|
4889
|
-
A.add_data_v1 =
|
|
4994
|
+
A.add_data_v1 = Ci;
|
|
4890
4995
|
i.forBlock.add_data_v1 = function(t) {
|
|
4891
4996
|
const e = i.INDENT, n = i.valueToCode(t, "TABLE", _.ATOMIC) || "null", o = i.statementToCode(t, "HANDLE");
|
|
4892
4997
|
return `{
|
|
@@ -4902,7 +5007,7 @@ ${e}}
|
|
|
4902
5007
|
${o}}
|
|
4903
5008
|
`;
|
|
4904
5009
|
};
|
|
4905
|
-
const
|
|
5010
|
+
const ki = {
|
|
4906
5011
|
init: function() {
|
|
4907
5012
|
this.space = {
|
|
4908
5013
|
id: "",
|
|
@@ -4965,16 +5070,16 @@ const yi = {
|
|
|
4965
5070
|
}, 0);
|
|
4966
5071
|
},
|
|
4967
5072
|
genSpaceOpts_: function() {
|
|
4968
|
-
return
|
|
5073
|
+
return Ne();
|
|
4969
5074
|
},
|
|
4970
5075
|
genTableOpts_: function() {
|
|
4971
5076
|
return Le(this.space.id);
|
|
4972
5077
|
},
|
|
4973
5078
|
genColumnOpts_: function() {
|
|
4974
|
-
return
|
|
5079
|
+
return yi(this.space.id, this.table.id);
|
|
4975
5080
|
},
|
|
4976
5081
|
onchange: function(t) {
|
|
4977
|
-
if (t.type ===
|
|
5082
|
+
if (t.type === P.STATE_CHANGE)
|
|
4978
5083
|
this.checkWarning_();
|
|
4979
5084
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
4980
5085
|
const e = t;
|
|
@@ -5031,7 +5136,7 @@ const yi = {
|
|
|
5031
5136
|
o && (e.setCheck(null), e.connect(o.outputConnection));
|
|
5032
5137
|
},
|
|
5033
5138
|
updateCheck_: function() {
|
|
5034
|
-
const t =
|
|
5139
|
+
const t = ao(this.column.type);
|
|
5035
5140
|
this.getInput("VALUE").connection.setCheck(t);
|
|
5036
5141
|
},
|
|
5037
5142
|
checkWarning_: function() {
|
|
@@ -5063,7 +5168,7 @@ const yi = {
|
|
|
5063
5168
|
this.setWarningText(null);
|
|
5064
5169
|
}
|
|
5065
5170
|
};
|
|
5066
|
-
A.cond_atomic_v1 =
|
|
5171
|
+
A.cond_atomic_v1 = ki;
|
|
5067
5172
|
i.forBlock.cond_atomic_v1 = function(t) {
|
|
5068
5173
|
const e = i.quote_, n = t, o = n.column.name, s = i.valueToCode(n, "VALUE", _.ATOMIC) || null, r = {
|
|
5069
5174
|
EQ: "=",
|
|
@@ -5075,19 +5180,19 @@ i.forBlock.cond_atomic_v1 = function(t) {
|
|
|
5075
5180
|
}[n.getFieldValue("OP")];
|
|
5076
5181
|
return [`{type:'ATOMIC',key:${e(o)},value:${s},operator:${e(r)}}`, _.ATOMIC];
|
|
5077
5182
|
};
|
|
5078
|
-
const
|
|
5183
|
+
const Si = {
|
|
5079
5184
|
init: function() {
|
|
5080
5185
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
5081
5186
|
}
|
|
5082
5187
|
};
|
|
5083
|
-
A.cond_logic_container_v1 =
|
|
5084
|
-
const
|
|
5188
|
+
A.cond_logic_container_v1 = Si;
|
|
5189
|
+
const Ni = {
|
|
5085
5190
|
init: function() {
|
|
5086
5191
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
5087
5192
|
}
|
|
5088
5193
|
};
|
|
5089
|
-
A.cond_logic_item_v1 =
|
|
5090
|
-
const
|
|
5194
|
+
A.cond_logic_item_v1 = Ni;
|
|
5195
|
+
const Li = {
|
|
5091
5196
|
init: function() {
|
|
5092
5197
|
this.itemCount_ = 1, this.appendValueInput("VALUE").setCheck("Condition").appendField(
|
|
5093
5198
|
new v([
|
|
@@ -5161,7 +5266,7 @@ const Ci = {
|
|
|
5161
5266
|
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setCheck("Condition");
|
|
5162
5267
|
}
|
|
5163
5268
|
};
|
|
5164
|
-
A.cond_logic_v1 =
|
|
5269
|
+
A.cond_logic_v1 = Li;
|
|
5165
5270
|
i.forBlock.cond_logic_v1 = function(t) {
|
|
5166
5271
|
const e = i.quote_, n = t, o = n.getFieldValue("TYPE"), s = [], a = i.valueToCode(n, "VALUE", _.ATOMIC) || null;
|
|
5167
5272
|
s.push(a);
|
|
@@ -5171,7 +5276,7 @@ i.forBlock.cond_logic_v1 = function(t) {
|
|
|
5171
5276
|
}
|
|
5172
5277
|
return [`{type:${e(o)},entries:[${s}]}`, _.ATOMIC];
|
|
5173
5278
|
};
|
|
5174
|
-
function
|
|
5279
|
+
function Bi(t) {
|
|
5175
5280
|
const e = t.getInput("TABLE").connection;
|
|
5176
5281
|
if (e.targetBlock())
|
|
5177
5282
|
return;
|
|
@@ -5190,7 +5295,7 @@ function ki(t) {
|
|
|
5190
5295
|
}, a = J.blocks.append(s, t.workspace);
|
|
5191
5296
|
e.connect(a.outputConnection);
|
|
5192
5297
|
}
|
|
5193
|
-
function
|
|
5298
|
+
function bi(t) {
|
|
5194
5299
|
const e = t.getInput("CONDITION").connection;
|
|
5195
5300
|
if (e.targetBlock())
|
|
5196
5301
|
return;
|
|
@@ -5215,7 +5320,7 @@ function Ni(t) {
|
|
|
5215
5320
|
}, r = J.blocks.append(a, t.workspace);
|
|
5216
5321
|
e.connect(r.outputConnection);
|
|
5217
5322
|
}
|
|
5218
|
-
function
|
|
5323
|
+
function Pi(t) {
|
|
5219
5324
|
const e = t.getInput("HANDLE").connection;
|
|
5220
5325
|
if (e.targetBlock())
|
|
5221
5326
|
return;
|
|
@@ -5239,7 +5344,7 @@ function Si(t) {
|
|
|
5239
5344
|
}, o = J.blocks.append(n, t.workspace);
|
|
5240
5345
|
e.connect(o.previousConnection);
|
|
5241
5346
|
}
|
|
5242
|
-
const
|
|
5347
|
+
const Ri = {
|
|
5243
5348
|
init: function() {
|
|
5244
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}");
|
|
5245
5350
|
},
|
|
@@ -5252,16 +5357,16 @@ const Li = {
|
|
|
5252
5357
|
}, 0);
|
|
5253
5358
|
},
|
|
5254
5359
|
updateShape_: function() {
|
|
5255
|
-
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(
|
|
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"));
|
|
5256
5361
|
},
|
|
5257
5362
|
ensureBlocks_: function() {
|
|
5258
|
-
this.isInsertionMarker() || (
|
|
5363
|
+
this.isInsertionMarker() || (Bi(this), bi(this), j(this, [
|
|
5259
5364
|
["SUCCESS", "__success__", "x-runtime-lib.success", !0],
|
|
5260
5365
|
["MESSAGE", "__message__", "x-runtime-lib.message", !0]
|
|
5261
|
-
]),
|
|
5366
|
+
]), Pi(this));
|
|
5262
5367
|
}
|
|
5263
5368
|
};
|
|
5264
|
-
A.delete_data_v1 =
|
|
5369
|
+
A.delete_data_v1 = Ri;
|
|
5265
5370
|
i.forBlock.delete_data_v1 = function(t) {
|
|
5266
5371
|
const e = i.INDENT, n = i.valueToCode(t, "TABLE", _.ATOMIC) || "null", o = i.valueToCode(t, "CONDITION", _.ATOMIC) || "null", s = i.statementToCode(t, "HANDLE");
|
|
5267
5372
|
return `{
|
|
@@ -5299,7 +5404,7 @@ i.forBlock.interrupt_transaction_v1 = function(t) {
|
|
|
5299
5404
|
return `throw ${i.valueToCode(t, "VALUE", _.NONE) || "''"};
|
|
5300
5405
|
`;
|
|
5301
5406
|
};
|
|
5302
|
-
function
|
|
5407
|
+
function Di(t) {
|
|
5303
5408
|
const e = t.getInput("TABLE").connection;
|
|
5304
5409
|
if (e.targetBlock())
|
|
5305
5410
|
return;
|
|
@@ -5333,7 +5438,7 @@ function Bi(t) {
|
|
|
5333
5438
|
}, r = J.blocks.append(a, t.workspace);
|
|
5334
5439
|
e.connect(r.outputConnection);
|
|
5335
5440
|
}
|
|
5336
|
-
function
|
|
5441
|
+
function Mi(t) {
|
|
5337
5442
|
const e = t.getInput("CONDITION").connection;
|
|
5338
5443
|
if (e.targetBlock())
|
|
5339
5444
|
return;
|
|
@@ -5342,7 +5447,7 @@ function bi(t) {
|
|
|
5342
5447
|
}, o = J.blocks.append(n, t.workspace);
|
|
5343
5448
|
e.connect(o.outputConnection);
|
|
5344
5449
|
}
|
|
5345
|
-
function
|
|
5450
|
+
function Ui(t) {
|
|
5346
5451
|
const e = t.getInput("EXTRA").connection;
|
|
5347
5452
|
if (e.targetBlock())
|
|
5348
5453
|
return;
|
|
@@ -5379,7 +5484,7 @@ function Pi(t) {
|
|
|
5379
5484
|
}, o = J.blocks.append(n, t.workspace);
|
|
5380
5485
|
e.connect(o.outputConnection);
|
|
5381
5486
|
}
|
|
5382
|
-
function
|
|
5487
|
+
function Vi(t) {
|
|
5383
5488
|
const e = t.getInput("HANDLE").connection;
|
|
5384
5489
|
if (e.targetBlock())
|
|
5385
5490
|
return;
|
|
@@ -5417,7 +5522,7 @@ g([
|
|
|
5417
5522
|
style: "procedure_blocks"
|
|
5418
5523
|
}
|
|
5419
5524
|
]);
|
|
5420
|
-
const
|
|
5525
|
+
const xi = {
|
|
5421
5526
|
init: function() {
|
|
5422
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}");
|
|
5423
5528
|
},
|
|
@@ -5430,18 +5535,18 @@ const Di = {
|
|
|
5430
5535
|
}, 0);
|
|
5431
5536
|
},
|
|
5432
5537
|
updateShape_: function() {
|
|
5433
|
-
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(
|
|
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"));
|
|
5434
5539
|
},
|
|
5435
5540
|
ensureBlocks_: function() {
|
|
5436
|
-
this.isInsertionMarker() || (
|
|
5541
|
+
this.isInsertionMarker() || (Di(this), Mi(this), Ui(this), j(this, [
|
|
5437
5542
|
["SUCCESS", "__success__", "x-runtime-lib.success", !0],
|
|
5438
5543
|
["MESSAGE", "__message__", "x-runtime-lib.message", !0],
|
|
5439
5544
|
["MAIN_DATA", "__mainData__", "x-runtime-lib.mainData", !0],
|
|
5440
5545
|
["EXTRA_DATA", "__extraData__", "x-runtime-lib.extraData", !0]
|
|
5441
|
-
]),
|
|
5546
|
+
]), Vi(this));
|
|
5442
5547
|
}
|
|
5443
5548
|
};
|
|
5444
|
-
A.query_data_v1 =
|
|
5549
|
+
A.query_data_v1 = xi;
|
|
5445
5550
|
i.forBlock.query_data_v1 = function(t) {
|
|
5446
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");
|
|
5447
5552
|
return `{
|
|
@@ -5514,19 +5619,19 @@ i.forBlock.query_extra_sortby_v1 = function(t) {
|
|
|
5514
5619
|
const e = i.valueToCode(t, "COLUMN", _.ATOMIC) || "''", n = i.valueToCode(t, "DESC", _.ATOMIC) || !1;
|
|
5515
5620
|
return [`{type:'sortby',value:${e},value2:${n}}`, _.ATOMIC];
|
|
5516
5621
|
};
|
|
5517
|
-
const
|
|
5622
|
+
const Yi = {
|
|
5518
5623
|
init: function() {
|
|
5519
5624
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
5520
5625
|
}
|
|
5521
5626
|
};
|
|
5522
|
-
A.select_column_container_v1 =
|
|
5523
|
-
const
|
|
5627
|
+
A.select_column_container_v1 = Yi;
|
|
5628
|
+
const Fi = {
|
|
5524
5629
|
init: function() {
|
|
5525
5630
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
5526
5631
|
}
|
|
5527
5632
|
};
|
|
5528
|
-
A.select_column_item_v1 =
|
|
5529
|
-
const
|
|
5633
|
+
A.select_column_item_v1 = Fi;
|
|
5634
|
+
const wi = {
|
|
5530
5635
|
init: function() {
|
|
5531
5636
|
this.space = {
|
|
5532
5637
|
id: "",
|
|
@@ -5577,7 +5682,7 @@ const Vi = {
|
|
|
5577
5682
|
}, 0);
|
|
5578
5683
|
},
|
|
5579
5684
|
genSpaceOpts_: function() {
|
|
5580
|
-
return
|
|
5685
|
+
return Ne();
|
|
5581
5686
|
},
|
|
5582
5687
|
genTableOpts_: function() {
|
|
5583
5688
|
return Le(this.space.id);
|
|
@@ -5589,7 +5694,7 @@ const Vi = {
|
|
|
5589
5694
|
}), B(t);
|
|
5590
5695
|
},
|
|
5591
5696
|
onchange: function(t) {
|
|
5592
|
-
if (t.type ===
|
|
5697
|
+
if (t.type === P.STATE_CHANGE)
|
|
5593
5698
|
this.checkWarning_();
|
|
5594
5699
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
5595
5700
|
const e = t;
|
|
@@ -5699,7 +5804,7 @@ const Vi = {
|
|
|
5699
5804
|
const e = this.table.columns[t], n = new v(
|
|
5700
5805
|
() => this.genColumnOpts_()
|
|
5701
5806
|
), o = new Et("");
|
|
5702
|
-
this.appendDummyInput("ADD" + t).setAlign(
|
|
5807
|
+
this.appendDummyInput("ADD" + t).setAlign(S.Align.RIGHT).appendField(n, "COLUMN" + t).appendField("%{BKY_DATA_AS}").appendField(o, "ALIAS" + t), n.setValue(e.id, !1), o.setValue(e.name, !1);
|
|
5703
5808
|
}
|
|
5704
5809
|
},
|
|
5705
5810
|
updateShape_: function() {
|
|
@@ -5711,7 +5816,7 @@ const Vi = {
|
|
|
5711
5816
|
const e = new v(
|
|
5712
5817
|
() => this.genColumnOpts_()
|
|
5713
5818
|
), n = new Et("");
|
|
5714
|
-
this.appendDummyInput("ADD" + t).setAlign(
|
|
5819
|
+
this.appendDummyInput("ADD" + t).setAlign(S.Align.RIGHT).appendField(e, "COLUMN" + t).appendField("%{BKY_DATA_AS}").appendField(n, "ALIAS" + t);
|
|
5715
5820
|
const o = this.table.columns[0];
|
|
5716
5821
|
e.setValue(o.id ?? "", !1), n.setValue(o.name ?? "", !1);
|
|
5717
5822
|
}
|
|
@@ -5735,7 +5840,7 @@ const Vi = {
|
|
|
5735
5840
|
this.setWarningText(null);
|
|
5736
5841
|
}
|
|
5737
5842
|
};
|
|
5738
|
-
A.select_column_v1 =
|
|
5843
|
+
A.select_column_v1 = wi;
|
|
5739
5844
|
i.forBlock.select_column_v1 = function(t) {
|
|
5740
5845
|
const e = i.quote_, n = t, o = n.space.id, s = n.table.id, a = [];
|
|
5741
5846
|
for (let l = 0; l < n.itemCount_; l++) {
|
|
@@ -5747,7 +5852,7 @@ i.forBlock.select_column_v1 = function(t) {
|
|
|
5747
5852
|
u !== 0 && (r += ","), r += `{name:${e(l)},alias:${e(d)}}`;
|
|
5748
5853
|
}), r += "]", [`{spaceId:${e(o)},tableId:${e(s)},columns:${r}}`, _.ATOMIC];
|
|
5749
5854
|
};
|
|
5750
|
-
const
|
|
5855
|
+
const Ki = {
|
|
5751
5856
|
init: function() {
|
|
5752
5857
|
this.space = {
|
|
5753
5858
|
id: "",
|
|
@@ -5789,13 +5894,13 @@ const xi = {
|
|
|
5789
5894
|
this.space.id = t.space?.id ?? "", this.space.name = t.space?.name ?? "", this.table.id = t.table?.id ?? "", this.table.name = t.table?.name ?? "", this.checkWarning_();
|
|
5790
5895
|
},
|
|
5791
5896
|
genSpaceOpts_: function() {
|
|
5792
|
-
return
|
|
5897
|
+
return Ne();
|
|
5793
5898
|
},
|
|
5794
5899
|
genTableOpts_: function() {
|
|
5795
5900
|
return Le(this.space.id);
|
|
5796
5901
|
},
|
|
5797
5902
|
onchange: function(t) {
|
|
5798
|
-
if (t.type ===
|
|
5903
|
+
if (t.type === P.STATE_CHANGE)
|
|
5799
5904
|
this.checkWarning_();
|
|
5800
5905
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
5801
5906
|
const e = t;
|
|
@@ -5839,12 +5944,12 @@ const xi = {
|
|
|
5839
5944
|
e.name !== this.table.name && (this.table.name = e.name), this.setWarningText(null);
|
|
5840
5945
|
}
|
|
5841
5946
|
};
|
|
5842
|
-
A.select_table_v1 =
|
|
5947
|
+
A.select_table_v1 = Ki;
|
|
5843
5948
|
i.forBlock.select_table_v1 = function(t) {
|
|
5844
5949
|
const e = i.quote_, n = t, o = n.space.id, s = n.table.id;
|
|
5845
5950
|
return [`{spaceId:${e(o)},tableId:${e(s)}}`, _.ATOMIC];
|
|
5846
5951
|
};
|
|
5847
|
-
const
|
|
5952
|
+
const $i = {
|
|
5848
5953
|
init: function() {
|
|
5849
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}");
|
|
5850
5955
|
},
|
|
@@ -5866,9 +5971,9 @@ const Yi = {
|
|
|
5866
5971
|
]);
|
|
5867
5972
|
}
|
|
5868
5973
|
};
|
|
5869
|
-
A.transaction_v1 =
|
|
5974
|
+
A.transaction_v1 = $i;
|
|
5870
5975
|
i.forBlock.transaction_v1 = function(t) {
|
|
5871
|
-
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");
|
|
5872
5977
|
return `{
|
|
5873
5978
|
${e}var __error${o}__ = '';
|
|
5874
5979
|
${e}var __txExist${o}__ = typeof(__tx__) !== 'undefined';
|
|
@@ -5910,19 +6015,19 @@ ${e}}
|
|
|
5910
6015
|
}
|
|
5911
6016
|
`;
|
|
5912
6017
|
};
|
|
5913
|
-
const
|
|
6018
|
+
const Hi = {
|
|
5914
6019
|
init: function() {
|
|
5915
6020
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
5916
6021
|
}
|
|
5917
6022
|
};
|
|
5918
|
-
A.update_column_container_v1 =
|
|
5919
|
-
const
|
|
6023
|
+
A.update_column_container_v1 = Hi;
|
|
6024
|
+
const Gi = {
|
|
5920
6025
|
init: function() {
|
|
5921
6026
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
5922
6027
|
}
|
|
5923
6028
|
};
|
|
5924
|
-
A.update_column_item_v1 =
|
|
5925
|
-
const
|
|
6029
|
+
A.update_column_item_v1 = Gi;
|
|
6030
|
+
const Wi = {
|
|
5926
6031
|
init: function() {
|
|
5927
6032
|
this.space = {
|
|
5928
6033
|
id: "",
|
|
@@ -5973,7 +6078,7 @@ const Ki = {
|
|
|
5973
6078
|
}, 0);
|
|
5974
6079
|
},
|
|
5975
6080
|
genSpaceOpts_: function() {
|
|
5976
|
-
return
|
|
6081
|
+
return Ne();
|
|
5977
6082
|
},
|
|
5978
6083
|
genTableOpts_: function() {
|
|
5979
6084
|
return Le(this.space.id);
|
|
@@ -5985,7 +6090,7 @@ const Ki = {
|
|
|
5985
6090
|
}), B(t);
|
|
5986
6091
|
},
|
|
5987
6092
|
onchange: function(t) {
|
|
5988
|
-
if (t.type ===
|
|
6093
|
+
if (t.type === P.STATE_CHANGE)
|
|
5989
6094
|
this.checkWarning_();
|
|
5990
6095
|
else if (t.type === O.BLOCK_CHANGE) {
|
|
5991
6096
|
const e = t;
|
|
@@ -6105,7 +6210,7 @@ const Ki = {
|
|
|
6105
6210
|
const e = this.table.columns[t], n = new v(
|
|
6106
6211
|
() => this.genColumnOpts_()
|
|
6107
6212
|
);
|
|
6108
|
-
this.appendValueInput("ADD" + t).setAlign(
|
|
6213
|
+
this.appendValueInput("ADD" + t).setAlign(S.Align.RIGHT).appendField(n, "COLUMN" + t), n.setValue(e.id, !1);
|
|
6109
6214
|
}
|
|
6110
6215
|
},
|
|
6111
6216
|
updateShape_: function() {
|
|
@@ -6119,7 +6224,7 @@ const Ki = {
|
|
|
6119
6224
|
const e = new v(
|
|
6120
6225
|
() => this.genColumnOpts_()
|
|
6121
6226
|
);
|
|
6122
|
-
this.appendValueInput("ADD" + t).setAlign(
|
|
6227
|
+
this.appendValueInput("ADD" + t).setAlign(S.Align.RIGHT).appendField(e, "COLUMN" + t);
|
|
6123
6228
|
}
|
|
6124
6229
|
},
|
|
6125
6230
|
updateBlocks_: function(t) {
|
|
@@ -6143,7 +6248,7 @@ const Ki = {
|
|
|
6143
6248
|
const e = this.getFieldValue("COLUMN" + t), n = this.table.columns.find((s) => s.id === e);
|
|
6144
6249
|
if (!n)
|
|
6145
6250
|
continue;
|
|
6146
|
-
const o =
|
|
6251
|
+
const o = ao(n.type);
|
|
6147
6252
|
this.getInput("ADD" + t).setCheck(o);
|
|
6148
6253
|
}
|
|
6149
6254
|
},
|
|
@@ -6166,7 +6271,7 @@ const Ki = {
|
|
|
6166
6271
|
this.setWarningText(null);
|
|
6167
6272
|
}
|
|
6168
6273
|
};
|
|
6169
|
-
A.update_column_v1 =
|
|
6274
|
+
A.update_column_v1 = Wi;
|
|
6170
6275
|
i.forBlock.update_column_v1 = function(t) {
|
|
6171
6276
|
const e = i.quote_, n = t, o = n.space.id, s = n.table.id, a = [];
|
|
6172
6277
|
for (let l = 0; l < n.itemCount_; l++) {
|
|
@@ -6178,7 +6283,7 @@ i.forBlock.update_column_v1 = function(t) {
|
|
|
6178
6283
|
u !== 0 && (r += ","), r += `{name:${e(l)},value:${d}}`;
|
|
6179
6284
|
}), r += "]", [`{spaceId:${e(o)},tableId:${e(s)},columns:${r}}`, _.ATOMIC];
|
|
6180
6285
|
};
|
|
6181
|
-
function
|
|
6286
|
+
function ji(t) {
|
|
6182
6287
|
const e = t.getInput("TABLE").connection;
|
|
6183
6288
|
if (e.targetBlock())
|
|
6184
6289
|
return;
|
|
@@ -6212,7 +6317,7 @@ function $i(t) {
|
|
|
6212
6317
|
}, r = J.blocks.append(a, t.workspace);
|
|
6213
6318
|
e.connect(r.outputConnection);
|
|
6214
6319
|
}
|
|
6215
|
-
function
|
|
6320
|
+
function Xi(t) {
|
|
6216
6321
|
const e = t.getInput("CONDITION").connection;
|
|
6217
6322
|
if (e.targetBlock())
|
|
6218
6323
|
return;
|
|
@@ -6221,7 +6326,7 @@ function Hi(t) {
|
|
|
6221
6326
|
}, o = J.blocks.append(n, t.workspace);
|
|
6222
6327
|
e.connect(o.outputConnection);
|
|
6223
6328
|
}
|
|
6224
|
-
function
|
|
6329
|
+
function Ji(t) {
|
|
6225
6330
|
const e = t.getInput("HANDLE").connection;
|
|
6226
6331
|
if (e.targetBlock())
|
|
6227
6332
|
return;
|
|
@@ -6245,7 +6350,7 @@ function Gi(t) {
|
|
|
6245
6350
|
}, o = J.blocks.append(n, t.workspace);
|
|
6246
6351
|
e.connect(o.previousConnection);
|
|
6247
6352
|
}
|
|
6248
|
-
const
|
|
6353
|
+
const qi = {
|
|
6249
6354
|
init: function() {
|
|
6250
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}");
|
|
6251
6356
|
},
|
|
@@ -6258,17 +6363,17 @@ const Wi = {
|
|
|
6258
6363
|
}, 0);
|
|
6259
6364
|
},
|
|
6260
6365
|
updateShape_: function() {
|
|
6261
|
-
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(
|
|
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"));
|
|
6262
6367
|
},
|
|
6263
6368
|
ensureBlocks: function() {
|
|
6264
|
-
this.isInsertionMarker() || (
|
|
6369
|
+
this.isInsertionMarker() || (ji(this), Xi(this), j(this, [
|
|
6265
6370
|
["SUCCESS", "__success__", "x-runtime-lib.success", !0],
|
|
6266
6371
|
["MESSAGE", "__message__", "x-runtime-lib.message", !0],
|
|
6267
6372
|
["DATA", "__data__", "x-runtime-lib.data", !0]
|
|
6268
|
-
]),
|
|
6373
|
+
]), Ji(this));
|
|
6269
6374
|
}
|
|
6270
6375
|
};
|
|
6271
|
-
A.update_data_v1 =
|
|
6376
|
+
A.update_data_v1 = qi;
|
|
6272
6377
|
i.forBlock.update_data_v1 = function(t) {
|
|
6273
6378
|
const e = i.INDENT, n = i.valueToCode(t, "TABLE", _.ATOMIC) || "null", o = i.valueToCode(t, "CONDITION", _.ATOMIC) || "null", s = i.statementToCode(t, "HANDLE");
|
|
6274
6379
|
return `{
|
|
@@ -6285,16 +6390,16 @@ ${e}}
|
|
|
6285
6390
|
${s}}
|
|
6286
6391
|
`;
|
|
6287
6392
|
};
|
|
6288
|
-
const
|
|
6393
|
+
const Qi = N.xml, zi = {
|
|
6289
6394
|
init: function() {
|
|
6290
|
-
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(
|
|
6395
|
+
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(S.Align.CENTRE).appendField(
|
|
6291
6396
|
new ct(Rt, 20, 20, void 0, () => {
|
|
6292
6397
|
this.isInFlyout || this.addEntry_();
|
|
6293
6398
|
})
|
|
6294
6399
|
), this.appendDummyInput("CLOSE_BRACKET").appendField(" ] "), this.setInputsInline(!1), this.setOutput(!0, "JsonArray"), this.setColour(350), this.setTooltip(""), this.setHelpUrl("");
|
|
6295
6400
|
},
|
|
6296
6401
|
mutationToDom: function() {
|
|
6297
|
-
const t =
|
|
6402
|
+
const t = Qi.createElement("mutation");
|
|
6298
6403
|
return t.setAttribute("items", String(this.length)), t;
|
|
6299
6404
|
},
|
|
6300
6405
|
domToMutation: function(t) {
|
|
@@ -6346,8 +6451,8 @@ const ji = L.xml, Xi = {
|
|
|
6346
6451
|
this.length--;
|
|
6347
6452
|
}
|
|
6348
6453
|
};
|
|
6349
|
-
A.json_array_v1 =
|
|
6350
|
-
const
|
|
6454
|
+
A.json_array_v1 = zi;
|
|
6455
|
+
const Zi = {
|
|
6351
6456
|
init: function() {
|
|
6352
6457
|
this.appendDummyInput().appendField(
|
|
6353
6458
|
new v([
|
|
@@ -6358,19 +6463,19 @@ const Ji = {
|
|
|
6358
6463
|
), this.setOutput(!0, "JsonBoolean"), this.setColour(210);
|
|
6359
6464
|
}
|
|
6360
6465
|
};
|
|
6361
|
-
A.json_boolean_v1 =
|
|
6362
|
-
const
|
|
6466
|
+
A.json_boolean_v1 = Zi;
|
|
6467
|
+
const xn = N.xml, ta = {
|
|
6363
6468
|
init: function() {
|
|
6364
|
-
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(
|
|
6469
|
+
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(S.Align.CENTRE).appendField(
|
|
6365
6470
|
new ct(Rt, 20, 20, void 0, () => {
|
|
6366
6471
|
this.isInFlyout || this.addEntry_();
|
|
6367
6472
|
})
|
|
6368
6473
|
), this.appendDummyInput("CLOSE_BRACHET").appendField(" } "), this.setInputsInline(!1), this.setOutput(!0, "JsonMap"), this.setColour(120), this.setTooltip(""), this.setHelpUrl("");
|
|
6369
6474
|
},
|
|
6370
6475
|
mutationToDom: function() {
|
|
6371
|
-
const t =
|
|
6476
|
+
const t = xn.createElement("mutation");
|
|
6372
6477
|
for (let e = 0; e < this.length; e++) {
|
|
6373
|
-
const n =
|
|
6478
|
+
const n = xn.createElement("item");
|
|
6374
6479
|
n.setAttribute("key", this.getFieldValue("KEY" + e)), t.appendChild(n);
|
|
6375
6480
|
}
|
|
6376
6481
|
return t;
|
|
@@ -6425,38 +6530,38 @@ const Vn = L.xml, qi = {
|
|
|
6425
6530
|
this.length--;
|
|
6426
6531
|
}
|
|
6427
6532
|
};
|
|
6428
|
-
A.json_map_v1 =
|
|
6429
|
-
const
|
|
6533
|
+
A.json_map_v1 = ta;
|
|
6534
|
+
const ea = {
|
|
6430
6535
|
init: function() {
|
|
6431
6536
|
this.appendDummyInput().appendField(new je(0), "VALUE"), this.setOutput(!0, "JsonNumber"), this.setColour(230);
|
|
6432
6537
|
}
|
|
6433
6538
|
};
|
|
6434
|
-
A.json_number_v1 =
|
|
6435
|
-
const
|
|
6539
|
+
A.json_number_v1 = ea;
|
|
6540
|
+
const na = {
|
|
6436
6541
|
init: function() {
|
|
6437
|
-
this.appendDummyInput().setAlign(
|
|
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("");
|
|
6438
6543
|
}
|
|
6439
6544
|
};
|
|
6440
|
-
A.json_root_v1 =
|
|
6441
|
-
const
|
|
6545
|
+
A.json_root_v1 = na;
|
|
6546
|
+
const oa = {
|
|
6442
6547
|
init: function() {
|
|
6443
6548
|
this.appendDummyInput().appendField('"').appendField(new Et(""), "VALUE").appendField('"'), this.setOutput(!0, "JsonString"), this.setColour(160);
|
|
6444
6549
|
}
|
|
6445
6550
|
};
|
|
6446
|
-
A.json_string_v1 =
|
|
6447
|
-
const
|
|
6551
|
+
A.json_string_v1 = oa;
|
|
6552
|
+
const sa = N.xml, ia = {
|
|
6448
6553
|
init: function() {
|
|
6449
6554
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
6450
6555
|
}
|
|
6451
6556
|
};
|
|
6452
|
-
A.list_create_container_v1 =
|
|
6453
|
-
const
|
|
6557
|
+
A.list_create_container_v1 = ia;
|
|
6558
|
+
const aa = {
|
|
6454
6559
|
init: function() {
|
|
6455
6560
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
6456
6561
|
}
|
|
6457
6562
|
};
|
|
6458
|
-
A.list_create_item_v1 =
|
|
6459
|
-
const
|
|
6563
|
+
A.list_create_item_v1 = aa;
|
|
6564
|
+
const ca = {
|
|
6460
6565
|
init: function() {
|
|
6461
6566
|
this.itemCount_ = 0, this.setMutator(
|
|
6462
6567
|
new It.MutatorIcon(
|
|
@@ -6466,7 +6571,7 @@ const oa = {
|
|
|
6466
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_();
|
|
6467
6572
|
},
|
|
6468
6573
|
mutationToDom: function() {
|
|
6469
|
-
const t =
|
|
6574
|
+
const t = sa.createElement("mutation");
|
|
6470
6575
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
6471
6576
|
},
|
|
6472
6577
|
domToMutation: function(t) {
|
|
@@ -6533,12 +6638,12 @@ const oa = {
|
|
|
6533
6638
|
"Boolean",
|
|
6534
6639
|
"Array",
|
|
6535
6640
|
"Object"
|
|
6536
|
-
]), t === 0 && this.getInput("ADD" + t).setAlign(
|
|
6641
|
+
]), t === 0 && this.getInput("ADD" + t).setAlign(S.Align.RIGHT).appendField("%{BKY_LIST_V1_CREATE_TITLE}"));
|
|
6537
6642
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
6538
6643
|
this.removeInput("ADD" + t);
|
|
6539
6644
|
}
|
|
6540
6645
|
};
|
|
6541
|
-
A.list_create_v1 =
|
|
6646
|
+
A.list_create_v1 = ca;
|
|
6542
6647
|
i.forBlock.list_create_v1 = function(t) {
|
|
6543
6648
|
const e = t, n = new Array(e.itemCount_);
|
|
6544
6649
|
for (let s = 0; s < e.itemCount_; s++)
|
|
@@ -6754,7 +6859,7 @@ i.forBlock.list_set_v1 = function(t) {
|
|
|
6754
6859
|
return `${e}[${n}] = ${o};
|
|
6755
6860
|
`;
|
|
6756
6861
|
};
|
|
6757
|
-
const
|
|
6862
|
+
const ra = {
|
|
6758
6863
|
// logic_compare
|
|
6759
6864
|
EQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_EQ}",
|
|
6760
6865
|
NEQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_NEQ}",
|
|
@@ -6766,9 +6871,9 @@ const sa = {
|
|
|
6766
6871
|
AND: "%{BKY_LOGIC_V1_OPERATION_TOOLTIP_AND}",
|
|
6767
6872
|
OR: "%{BKY_LOGIC_V1_OPERATION_TOOLTIP_OR}"
|
|
6768
6873
|
};
|
|
6769
|
-
|
|
6874
|
+
U.register(
|
|
6770
6875
|
"logic_op_tooltip_v1",
|
|
6771
|
-
|
|
6876
|
+
U.buildTooltipForDropdown("OP", ra)
|
|
6772
6877
|
);
|
|
6773
6878
|
g([
|
|
6774
6879
|
{
|
|
@@ -6793,7 +6898,7 @@ g([
|
|
|
6793
6898
|
i.forBlock.logic_boolean_v1 = function(t) {
|
|
6794
6899
|
return [t.getFieldValue("BOOL") === "TRUE" ? "true" : "false", _.ATOMIC];
|
|
6795
6900
|
};
|
|
6796
|
-
const
|
|
6901
|
+
const ua = {
|
|
6797
6902
|
onchange: function(t) {
|
|
6798
6903
|
this.prevBlocks_ || (this.prevBlocks_ = [null, null]);
|
|
6799
6904
|
const e = this.getInputTargetBlock("A"), n = this.getInputTargetBlock("B");
|
|
@@ -6810,10 +6915,10 @@ const ia = {
|
|
|
6810
6915
|
this.prevBlocks_[0] = this.getInputTargetBlock("A"), this.prevBlocks_[1] = this.getInputTargetBlock("B");
|
|
6811
6916
|
}
|
|
6812
6917
|
};
|
|
6813
|
-
|
|
6918
|
+
U.register(
|
|
6814
6919
|
"logic_compare_v1",
|
|
6815
6920
|
function() {
|
|
6816
|
-
this.mixin(
|
|
6921
|
+
this.mixin(ua);
|
|
6817
6922
|
}
|
|
6818
6923
|
);
|
|
6819
6924
|
g([
|
|
@@ -6863,13 +6968,13 @@ i.forBlock.logic_compare_v1 = function(t) {
|
|
|
6863
6968
|
const s = i.valueToCode(t, "A", o) || "0", a = i.valueToCode(t, "B", o) || "0";
|
|
6864
6969
|
return [`${s} ${n} ${a}`, o];
|
|
6865
6970
|
};
|
|
6866
|
-
const
|
|
6971
|
+
const la = {
|
|
6867
6972
|
elseIfCount_: 0,
|
|
6868
6973
|
hasElse_: !1,
|
|
6869
6974
|
mutationToDom: function() {
|
|
6870
6975
|
if (this.elseIfCount_ <= 0 && !this.hasElse_)
|
|
6871
6976
|
return null;
|
|
6872
|
-
const t =
|
|
6977
|
+
const t = N.xml.createElement("mutation");
|
|
6873
6978
|
return this.elseIfCount_ > 0 && t.setAttribute("elseIf", String(this.elseIfCount_)), this.hasElse_ && t.setAttribute("else", "TRUE"), t;
|
|
6874
6979
|
},
|
|
6875
6980
|
domToMutation: function(t) {
|
|
@@ -6988,9 +7093,9 @@ const aa = {
|
|
|
6988
7093
|
n?.reconnect(this, "ELSE");
|
|
6989
7094
|
}
|
|
6990
7095
|
};
|
|
6991
|
-
|
|
7096
|
+
U.registerMutator(
|
|
6992
7097
|
"logic_if_v1_mutator",
|
|
6993
|
-
|
|
7098
|
+
la,
|
|
6994
7099
|
void 0,
|
|
6995
7100
|
["logic_if_else_if_v1", "logic_if_else_v1"]
|
|
6996
7101
|
);
|
|
@@ -7136,7 +7241,7 @@ i.forBlock.logic_operation_v1 = function(t) {
|
|
|
7136
7241
|
}
|
|
7137
7242
|
return [`${o} ${e} ${s}`, n];
|
|
7138
7243
|
};
|
|
7139
|
-
const
|
|
7244
|
+
const _a = {
|
|
7140
7245
|
prevParentConnection_: null,
|
|
7141
7246
|
onchange: function(t) {
|
|
7142
7247
|
const e = this.getInputTargetBlock("THEN"), n = this.getInputTargetBlock("ELSE"), o = this.outputConnection.targetConnection;
|
|
@@ -7151,7 +7256,7 @@ const ca = {
|
|
|
7151
7256
|
this.prevParentConnection_ = o;
|
|
7152
7257
|
}
|
|
7153
7258
|
};
|
|
7154
|
-
|
|
7259
|
+
U.registerMixin("logic_ternary_v1", _a);
|
|
7155
7260
|
g([
|
|
7156
7261
|
{
|
|
7157
7262
|
type: "logic_ternary_v1",
|
|
@@ -7188,7 +7293,7 @@ i.forBlock.logic_ternary_v1 = function(t) {
|
|
|
7188
7293
|
const e = i.valueToCode(t, "IF", _.CONDITIONAL) || "false", n = i.valueToCode(t, "THEN", _.CONDITIONAL) || "null", o = i.valueToCode(t, "ELSE", _.CONDITIONAL) || "null";
|
|
7189
7294
|
return [e + " ? " + n + " : " + o, _.CONDITIONAL];
|
|
7190
7295
|
};
|
|
7191
|
-
const
|
|
7296
|
+
const pa = {
|
|
7192
7297
|
customContextMenu: function(t) {
|
|
7193
7298
|
if (this.isInFlyout)
|
|
7194
7299
|
return;
|
|
@@ -7203,32 +7308,32 @@ const ra = {
|
|
|
7203
7308
|
t.push({
|
|
7204
7309
|
enabled: !0,
|
|
7205
7310
|
text: m("VARIABLE_SET_CREATE_GET").replace("%1", o),
|
|
7206
|
-
callback:
|
|
7311
|
+
callback: Hn.callbackFactory(this, s)
|
|
7207
7312
|
});
|
|
7208
7313
|
}
|
|
7209
7314
|
}
|
|
7210
7315
|
};
|
|
7211
|
-
|
|
7316
|
+
U.registerMixin(
|
|
7212
7317
|
"contextMenu_newGetVariableBlock_v1",
|
|
7213
|
-
|
|
7318
|
+
pa
|
|
7214
7319
|
);
|
|
7215
|
-
|
|
7320
|
+
U.register(
|
|
7216
7321
|
"flow_control_tooltip_v1",
|
|
7217
|
-
|
|
7322
|
+
U.buildTooltipForDropdown("MODE", {
|
|
7218
7323
|
BREAK: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_BREAK}",
|
|
7219
7324
|
CONTINUE: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_CONTINUE}"
|
|
7220
7325
|
})
|
|
7221
7326
|
);
|
|
7222
|
-
const
|
|
7327
|
+
const da = /* @__PURE__ */ new Set([
|
|
7223
7328
|
"repeat_v1",
|
|
7224
7329
|
"for_each_v1",
|
|
7225
7330
|
"for_v1",
|
|
7226
7331
|
"while_until_v1"
|
|
7227
|
-
]),
|
|
7332
|
+
]), ha = {
|
|
7228
7333
|
getSurroundLoop: function() {
|
|
7229
7334
|
let t = this;
|
|
7230
7335
|
do {
|
|
7231
|
-
if (
|
|
7336
|
+
if (da.has(t.type))
|
|
7232
7337
|
return t;
|
|
7233
7338
|
t = t?.getSurroundParent();
|
|
7234
7339
|
} while (t);
|
|
@@ -7247,9 +7352,9 @@ const ua = /* @__PURE__ */ new Set([
|
|
|
7247
7352
|
}
|
|
7248
7353
|
}
|
|
7249
7354
|
};
|
|
7250
|
-
|
|
7355
|
+
U.registerMixin(
|
|
7251
7356
|
"flow_control_in_loop_check_v1",
|
|
7252
|
-
|
|
7357
|
+
ha
|
|
7253
7358
|
);
|
|
7254
7359
|
g([
|
|
7255
7360
|
{
|
|
@@ -7298,9 +7403,9 @@ i.forBlock.flow_control_v1 = function(t) {
|
|
|
7298
7403
|
throw "unknown mode";
|
|
7299
7404
|
}
|
|
7300
7405
|
};
|
|
7301
|
-
|
|
7406
|
+
U.register(
|
|
7302
7407
|
"for_tooltip_v1",
|
|
7303
|
-
|
|
7408
|
+
U.buildTooltipWithFieldText(
|
|
7304
7409
|
"%{BKY_LOOP_V1_FOR_TOOLTIP}",
|
|
7305
7410
|
"VAR"
|
|
7306
7411
|
)
|
|
@@ -7356,7 +7461,7 @@ i.forBlock.for_v1 = function(t) {
|
|
|
7356
7461
|
i.statementToCode(t, "DO"),
|
|
7357
7462
|
t
|
|
7358
7463
|
);
|
|
7359
|
-
if (
|
|
7464
|
+
if (N.string.isNumber(o) && N.string.isNumber(s) && N.string.isNumber(a)) {
|
|
7360
7465
|
const c = Math.abs(Number(a));
|
|
7361
7466
|
return Number(o) <= Number(s) ? `for (${n} = ${o}; ${n} <= ${s}; ${n} += ${c}) {
|
|
7362
7467
|
${r}}
|
|
@@ -7365,13 +7470,13 @@ ${r}}
|
|
|
7365
7470
|
`;
|
|
7366
7471
|
} else {
|
|
7367
7472
|
let c = "", l = o;
|
|
7368
|
-
!o.match(/^\w+$/) && !
|
|
7473
|
+
!o.match(/^\w+$/) && !N.string.isNumber(o) && (l = i.nameDB_.getDistinctName(
|
|
7369
7474
|
`${n}_from`,
|
|
7370
7475
|
rt.NameType.VARIABLE
|
|
7371
7476
|
), c += `var ${l} = ${o};
|
|
7372
7477
|
`);
|
|
7373
7478
|
let d = s;
|
|
7374
|
-
!s.match(/^\w+$/) && !
|
|
7479
|
+
!s.match(/^\w+$/) && !N.string.isNumber(s) && (d = i.nameDB_.getDistinctName(
|
|
7375
7480
|
`${n}_to`,
|
|
7376
7481
|
rt.NameType.VARIABLE
|
|
7377
7482
|
), c += `var ${d} = ${s};
|
|
@@ -7380,7 +7485,7 @@ ${r}}
|
|
|
7380
7485
|
`${n}_by`,
|
|
7381
7486
|
rt.NameType.VARIABLE
|
|
7382
7487
|
);
|
|
7383
|
-
return c += `var ${u} = `,
|
|
7488
|
+
return c += `var ${u} = `, N.string.isNumber(a) ? c += `${Math.abs(Number(a))};
|
|
7384
7489
|
` : c += `Math.abs(${a});
|
|
7385
7490
|
`, c += `if (${l} > ${d}) {
|
|
7386
7491
|
${e}${u} = -${u};
|
|
@@ -7390,9 +7495,9 @@ ${r}}
|
|
|
7390
7495
|
`, c;
|
|
7391
7496
|
}
|
|
7392
7497
|
};
|
|
7393
|
-
|
|
7498
|
+
U.register(
|
|
7394
7499
|
"for_each_tooltip_v1",
|
|
7395
|
-
|
|
7500
|
+
U.buildTooltipWithFieldText(
|
|
7396
7501
|
"%{BKY_LOOP_V1_FOR_EACH_TOOLTIP}",
|
|
7397
7502
|
"VAR"
|
|
7398
7503
|
)
|
|
@@ -7487,7 +7592,7 @@ i.forBlock.repeat_v1 = function(t) {
|
|
|
7487
7592
|
rt.NameType.VARIABLE
|
|
7488
7593
|
);
|
|
7489
7594
|
let a = e;
|
|
7490
|
-
return !e.match(/^\w+$/) && !
|
|
7595
|
+
return !e.match(/^\w+$/) && !N.string.isNumber(e) && (a = i.nameDB_.getDistinctName(
|
|
7491
7596
|
"repeat_end",
|
|
7492
7597
|
rt.NameType.VARIABLE
|
|
7493
7598
|
), o += `var ${a} = ${e};
|
|
@@ -7495,9 +7600,9 @@ i.forBlock.repeat_v1 = function(t) {
|
|
|
7495
7600
|
${n}}
|
|
7496
7601
|
`, o;
|
|
7497
7602
|
};
|
|
7498
|
-
|
|
7603
|
+
U.register(
|
|
7499
7604
|
"while_until_tooltip_v1",
|
|
7500
|
-
|
|
7605
|
+
U.buildTooltipForDropdown("MODE", {
|
|
7501
7606
|
WHILE: "%{BKY_LOOP_V1_WHILE_UNTIL_TOOLTIP_WHILE}",
|
|
7502
7607
|
UNTIL: "%{BKY_LOOP_V1_WHILE_UNTIL_TOOLTIP_UNTIL}"
|
|
7503
7608
|
})
|
|
@@ -7551,7 +7656,7 @@ i.forBlock.while_until_v1 = function(t) {
|
|
|
7551
7656
|
${o}}
|
|
7552
7657
|
`;
|
|
7553
7658
|
};
|
|
7554
|
-
const
|
|
7659
|
+
const fa = {
|
|
7555
7660
|
// math_arithmetic
|
|
7556
7661
|
ADD: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_ADD}",
|
|
7557
7662
|
SUBTRACT: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_SUBTRACT}",
|
|
@@ -7583,9 +7688,9 @@ const _a = {
|
|
|
7583
7688
|
STD_DEV: "%{BKY_MATH_V1_ON_LIST_TOOLTIP_STD_DEV}",
|
|
7584
7689
|
RANDOM: "%{BKY_MATH_V1_ON_LIST_TOOLTIP_RANDOM}"
|
|
7585
7690
|
};
|
|
7586
|
-
|
|
7691
|
+
U.register(
|
|
7587
7692
|
"math_op_tooltip_v1",
|
|
7588
|
-
|
|
7693
|
+
U.buildTooltipForDropdown("OP", fa)
|
|
7589
7694
|
);
|
|
7590
7695
|
g([
|
|
7591
7696
|
{
|
|
@@ -8188,21 +8293,21 @@ i.forBlock.math_trig_v1 = function(t) {
|
|
|
8188
8293
|
}
|
|
8189
8294
|
return [o, _.DIVISION];
|
|
8190
8295
|
};
|
|
8191
|
-
const
|
|
8296
|
+
const ma = N.xml, Ta = {
|
|
8192
8297
|
init: function() {
|
|
8193
8298
|
this.appendDummyInput().appendField(
|
|
8194
8299
|
"%{BKY_OBJECT_V1_CREATE_CONTAINER_TITLE}"
|
|
8195
8300
|
), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
8196
8301
|
}
|
|
8197
8302
|
};
|
|
8198
|
-
A.object_create_container_v1 =
|
|
8199
|
-
const
|
|
8303
|
+
A.object_create_container_v1 = Ta;
|
|
8304
|
+
const Ea = {
|
|
8200
8305
|
init: function() {
|
|
8201
8306
|
this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
8202
8307
|
}
|
|
8203
8308
|
};
|
|
8204
|
-
A.object_create_item_v1 =
|
|
8205
|
-
const
|
|
8309
|
+
A.object_create_item_v1 = Ea;
|
|
8310
|
+
const ga = {
|
|
8206
8311
|
init: function() {
|
|
8207
8312
|
this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(
|
|
8208
8313
|
new It.MutatorIcon(
|
|
@@ -8212,7 +8317,7 @@ const fa = {
|
|
|
8212
8317
|
), this.setOutput(!0, "Object"), this.setStyle("object_blocks"), this.setTooltip("%{BKY_OBJECT_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_OBJECT_V1_CREATE_HELPURL}");
|
|
8213
8318
|
},
|
|
8214
8319
|
mutationToDom: function() {
|
|
8215
|
-
const t =
|
|
8320
|
+
const t = ma.createElement("mutation");
|
|
8216
8321
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
8217
8322
|
},
|
|
8218
8323
|
domToMutation: function(t) {
|
|
@@ -8271,12 +8376,12 @@ const fa = {
|
|
|
8271
8376
|
},
|
|
8272
8377
|
updateShape_: function() {
|
|
8273
8378
|
for (let t = 0; t < this.itemCount_; t++)
|
|
8274
|
-
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setAlign(
|
|
8379
|
+
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setAlign(S.Align.RIGHT).appendField(new Et("key"), "KEY" + t);
|
|
8275
8380
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
8276
8381
|
this.removeInput("ADD" + t);
|
|
8277
8382
|
}
|
|
8278
8383
|
};
|
|
8279
|
-
A.object_create_v1 =
|
|
8384
|
+
A.object_create_v1 = ga;
|
|
8280
8385
|
i.forBlock.object_create_v1 = function(t) {
|
|
8281
8386
|
const e = t;
|
|
8282
8387
|
let n = "{";
|
|
@@ -8518,13 +8623,13 @@ g([
|
|
|
8518
8623
|
i.forBlock.object_to_json_v1 = function(t) {
|
|
8519
8624
|
return [`__jsonStringifyV1__(${i.valueToCode(t, "OBJECT", _.NONE) || "null"})`, _.FUNCTION_CALL];
|
|
8520
8625
|
};
|
|
8521
|
-
const
|
|
8626
|
+
const Yn = N.xml, Aa = {
|
|
8522
8627
|
init: function() {
|
|
8523
|
-
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;
|
|
8524
8629
|
}
|
|
8525
8630
|
};
|
|
8526
|
-
A.procedure_def_container_v1 =
|
|
8527
|
-
const
|
|
8631
|
+
A.procedure_def_container_v1 = Aa;
|
|
8632
|
+
const Ia = {
|
|
8528
8633
|
init: function() {
|
|
8529
8634
|
const t = new Et(Xe.DEFAULT_ARG);
|
|
8530
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;
|
|
@@ -8546,8 +8651,8 @@ const Ta = {
|
|
|
8546
8651
|
return t;
|
|
8547
8652
|
}
|
|
8548
8653
|
};
|
|
8549
|
-
A.procedure_def_item_v1 =
|
|
8550
|
-
const
|
|
8654
|
+
A.procedure_def_item_v1 = Ia;
|
|
8655
|
+
const ya = {
|
|
8551
8656
|
init: function() {
|
|
8552
8657
|
this.withReturn = !1, this.args = [];
|
|
8553
8658
|
const t = new Et(
|
|
@@ -8561,9 +8666,9 @@ const Ea = {
|
|
|
8561
8666
|
), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_PROCEDURE_V1_DEF_TOOLTIP}"), this.setHelpUrl("%{BKY_PROCEDURE_V1_DEF_HELPURL}");
|
|
8562
8667
|
},
|
|
8563
8668
|
mutationToDom: function() {
|
|
8564
|
-
const t =
|
|
8669
|
+
const t = Yn.createElement("mutation");
|
|
8565
8670
|
return t.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), this.args.forEach((e) => {
|
|
8566
|
-
const n =
|
|
8671
|
+
const n = Yn.createElement("arg");
|
|
8567
8672
|
n.setAttribute("name", e.name), n.setAttribute("id", e.id), t.appendChild(n);
|
|
8568
8673
|
}), t;
|
|
8569
8674
|
},
|
|
@@ -8651,13 +8756,13 @@ const Ea = {
|
|
|
8651
8756
|
}
|
|
8652
8757
|
}
|
|
8653
8758
|
};
|
|
8654
|
-
A.procedure_def_v1 =
|
|
8655
|
-
const
|
|
8759
|
+
A.procedure_def_v1 = ya;
|
|
8760
|
+
const Oa = N.xml, va = {
|
|
8656
8761
|
init: function() {
|
|
8657
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}");
|
|
8658
8763
|
},
|
|
8659
8764
|
mutationToDom: function() {
|
|
8660
|
-
const t =
|
|
8765
|
+
const t = Oa.createElement("mutation");
|
|
8661
8766
|
return t.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), t;
|
|
8662
8767
|
},
|
|
8663
8768
|
domToMutation: function(t) {
|
|
@@ -8676,7 +8781,7 @@ const ga = L.xml, Aa = {
|
|
|
8676
8781
|
}, 0);
|
|
8677
8782
|
},
|
|
8678
8783
|
onchange: function(t) {
|
|
8679
|
-
if (t.type ===
|
|
8784
|
+
if (t.type === P.STATE_CHANGE)
|
|
8680
8785
|
this.checkWarning_();
|
|
8681
8786
|
else if (t.type === O.BLOCK_DRAG) {
|
|
8682
8787
|
const e = t;
|
|
@@ -8708,14 +8813,14 @@ const ga = L.xml, Aa = {
|
|
|
8708
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");
|
|
8709
8814
|
}
|
|
8710
8815
|
};
|
|
8711
|
-
A.procedure_return_v1 =
|
|
8816
|
+
A.procedure_return_v1 = va;
|
|
8712
8817
|
i.forBlock.procedure_return_v1 = function(t) {
|
|
8713
8818
|
const e = t;
|
|
8714
8819
|
return e.withReturn ? `return ${i.valueToCode(e, "VALUE", _.NONE) || "null"};
|
|
8715
8820
|
` : `return;
|
|
8716
8821
|
`;
|
|
8717
8822
|
};
|
|
8718
|
-
const
|
|
8823
|
+
const Ca = {
|
|
8719
8824
|
init: function() {
|
|
8720
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}");
|
|
8721
8826
|
},
|
|
@@ -8728,7 +8833,7 @@ const Ia = {
|
|
|
8728
8833
|
}, 0);
|
|
8729
8834
|
},
|
|
8730
8835
|
updateShape_: function() {
|
|
8731
|
-
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_ASSET_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_ASSET_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("ASSET") || (this.appendValueInput("ASSET").setCheck("Resource").setAlign(
|
|
8836
|
+
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_ASSET_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_ASSET_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("ASSET") || (this.appendValueInput("ASSET").setCheck("Resource").setAlign(S.Align.RIGHT).appendField("%{BKY_ASSET_ASSET}"), this.moveInputBefore("ASSET", "SUCCESS"));
|
|
8732
8837
|
},
|
|
8733
8838
|
ensureBlocks_: function() {
|
|
8734
8839
|
this.isInsertionMarker() || j(this, [
|
|
@@ -8738,7 +8843,7 @@ const Ia = {
|
|
|
8738
8843
|
]);
|
|
8739
8844
|
}
|
|
8740
8845
|
};
|
|
8741
|
-
A.download_resource_v1 =
|
|
8846
|
+
A.download_resource_v1 = Ca;
|
|
8742
8847
|
i.forBlock.download_resource_v1 = function(t) {
|
|
8743
8848
|
const e = i.valueToCode(t, "ASSET", _.ATOMIC) || null, n = i.statementToCode(t, "HANDLE");
|
|
8744
8849
|
return `{
|
|
@@ -8750,7 +8855,7 @@ ${n}
|
|
|
8750
8855
|
}
|
|
8751
8856
|
`;
|
|
8752
8857
|
};
|
|
8753
|
-
function
|
|
8858
|
+
function Eo(t) {
|
|
8754
8859
|
const e = I.resource.spaces.find((s) => s.id === t);
|
|
8755
8860
|
if (!e)
|
|
8756
8861
|
return [];
|
|
@@ -8766,13 +8871,13 @@ function To(t) {
|
|
|
8766
8871
|
}
|
|
8767
8872
|
return o(e.dirTree, ""), n;
|
|
8768
8873
|
}
|
|
8769
|
-
function
|
|
8874
|
+
function ka(t) {
|
|
8770
8875
|
const e = [];
|
|
8771
|
-
return
|
|
8876
|
+
return Eo(t).forEach(({ id: o, name: s }) => {
|
|
8772
8877
|
e.push([s, o]);
|
|
8773
8878
|
}), B(e);
|
|
8774
8879
|
}
|
|
8775
|
-
function
|
|
8880
|
+
function go(t, e) {
|
|
8776
8881
|
const n = I.resource.spaces.find((s) => s.id === t);
|
|
8777
8882
|
if (!n)
|
|
8778
8883
|
return [];
|
|
@@ -8781,25 +8886,25 @@ function Eo(t, e) {
|
|
|
8781
8886
|
s.dirid === e && o.push(s);
|
|
8782
8887
|
}), o;
|
|
8783
8888
|
}
|
|
8784
|
-
function
|
|
8889
|
+
function Sa(t, e) {
|
|
8785
8890
|
const n = [];
|
|
8786
|
-
return
|
|
8891
|
+
return go(t, e).forEach(({ id: s, name: a }) => {
|
|
8787
8892
|
n.push([a, s]);
|
|
8788
8893
|
}), B(n);
|
|
8789
8894
|
}
|
|
8790
|
-
function
|
|
8895
|
+
function Ao() {
|
|
8791
8896
|
const t = [];
|
|
8792
8897
|
return I.resource.spaces.forEach((e) => {
|
|
8793
8898
|
e.resources.length > 0 && t.push(e);
|
|
8794
8899
|
}), t;
|
|
8795
8900
|
}
|
|
8796
|
-
function
|
|
8901
|
+
function Na() {
|
|
8797
8902
|
const t = [];
|
|
8798
|
-
return
|
|
8903
|
+
return Ao().forEach(({ id: n, name: o }) => {
|
|
8799
8904
|
t.push([o, n]);
|
|
8800
8905
|
}), B(t);
|
|
8801
8906
|
}
|
|
8802
|
-
const
|
|
8907
|
+
const La = {
|
|
8803
8908
|
init: function() {
|
|
8804
8909
|
this.space = {
|
|
8805
8910
|
id: "",
|
|
@@ -8821,19 +8926,19 @@ const Ca = {
|
|
|
8821
8926
|
initData_: function() {
|
|
8822
8927
|
if (this.space.id)
|
|
8823
8928
|
return;
|
|
8824
|
-
const t =
|
|
8929
|
+
const t = Ao()?.[0];
|
|
8825
8930
|
if (!t)
|
|
8826
8931
|
return;
|
|
8827
8932
|
this.space.id = t.id, this.space.name = t.name;
|
|
8828
8933
|
const e = this.getField("SPACE");
|
|
8829
8934
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
8830
|
-
const n =
|
|
8935
|
+
const n = Eo(this.space.id)?.[0];
|
|
8831
8936
|
if (!n)
|
|
8832
8937
|
return;
|
|
8833
8938
|
this.dir.id = n.id, this.dir.name = n.name;
|
|
8834
8939
|
const o = this.getField("DIR");
|
|
8835
8940
|
o.getOptions(!1), o.setValue(this.dir.id);
|
|
8836
|
-
const s =
|
|
8941
|
+
const s = go(this.space.id, this.dir.id)?.[0];
|
|
8837
8942
|
if (!s)
|
|
8838
8943
|
return;
|
|
8839
8944
|
this.resource.id = s.id, this.resource.name = s.name;
|
|
@@ -8851,20 +8956,20 @@ const Ca = {
|
|
|
8851
8956
|
this.space = Ye(t.space), this.dir = Ye(t.dir), this.resource = Ye(t.resource);
|
|
8852
8957
|
},
|
|
8853
8958
|
genSpaceOpts_: function() {
|
|
8854
|
-
return
|
|
8959
|
+
return Na();
|
|
8855
8960
|
},
|
|
8856
8961
|
genDirOpts_: function() {
|
|
8857
|
-
return
|
|
8962
|
+
return ka(this.space.id);
|
|
8858
8963
|
},
|
|
8859
8964
|
genResourceOpts_: function() {
|
|
8860
|
-
return
|
|
8965
|
+
return Sa(this.space.id, this.dir.id);
|
|
8861
8966
|
}
|
|
8862
8967
|
};
|
|
8863
|
-
A.select_resource_v1 =
|
|
8968
|
+
A.select_resource_v1 = La;
|
|
8864
8969
|
i.forBlock.select_resource_v1 = function() {
|
|
8865
8970
|
return "";
|
|
8866
8971
|
};
|
|
8867
|
-
const
|
|
8972
|
+
const Ba = {
|
|
8868
8973
|
init: function() {
|
|
8869
8974
|
this.appendDummyInput().appendField(
|
|
8870
8975
|
"%{BKY_RESOURCE_V1_UPLOAD_RESOURCE_TITLE}"
|
|
@@ -8879,7 +8984,7 @@ const ka = {
|
|
|
8879
8984
|
}, 0);
|
|
8880
8985
|
},
|
|
8881
8986
|
updateShape_: function() {
|
|
8882
|
-
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_RESOURCE_DO}"), this.getInput("RESULT") || (this.appendValueInput("RESULT"), this.moveInputBefore("RESULT", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "RESULT")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_RESOURCE_RESULT}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("DATA") || (this.appendValueInput("DATA").setAlign(
|
|
8987
|
+
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_RESOURCE_DO}"), this.getInput("RESULT") || (this.appendValueInput("RESULT"), this.moveInputBefore("RESULT", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "RESULT")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_RESOURCE_RESULT}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("DATA") || (this.appendValueInput("DATA").setAlign(S.Align.RIGHT).appendField("%{BKY_RESOURCE_DATA}"), this.moveInputBefore("DATA", "SUCCESS")), this.getInput("DIR") || (this.appendValueInput("DIR").setCheck("SelectDir").setAlign(S.Align.RIGHT).appendField("%{BKY_RESOURCE_DIR}"), this.moveInputBefore("DIR", "DATA")), this.getInput("NAME") || (this.appendValueInput("NAME").setCheck("String").setAlign(S.Align.RIGHT).appendField("%{BKY_RESOURCE_NAME}"), this.moveInputBefore("NAME", "DIR"));
|
|
8883
8988
|
},
|
|
8884
8989
|
updateShadow_: function() {
|
|
8885
8990
|
if (this.isInsertionMarker())
|
|
@@ -8895,7 +9000,7 @@ const ka = {
|
|
|
8895
9000
|
]);
|
|
8896
9001
|
}
|
|
8897
9002
|
};
|
|
8898
|
-
A.upload_resource_v1 =
|
|
9003
|
+
A.upload_resource_v1 = Ba;
|
|
8899
9004
|
i.forBlock.upload_resource_v1 = function(t) {
|
|
8900
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");
|
|
8901
9006
|
return `{
|
|
@@ -8928,13 +9033,13 @@ g([
|
|
|
8928
9033
|
i.forBlock.text_v1 = function(t) {
|
|
8929
9034
|
return [i.quote_(t.getFieldValue("TEXT")), _.ATOMIC];
|
|
8930
9035
|
};
|
|
8931
|
-
const
|
|
9036
|
+
const ba = /^\s*'([^']|\\')*'\s*$/;
|
|
8932
9037
|
function se(t) {
|
|
8933
|
-
return
|
|
9038
|
+
return ba.test(t) ? [t, _.ATOMIC] : [`String(${t})`, _.FUNCTION_CALL];
|
|
8934
9039
|
}
|
|
8935
|
-
|
|
9040
|
+
U.register(
|
|
8936
9041
|
"text_append_tooltip_v1",
|
|
8937
|
-
|
|
9042
|
+
U.buildTooltipWithFieldText(
|
|
8938
9043
|
"%{BKY_TEXT_V1_APPEND_TOOLTIP}",
|
|
8939
9044
|
"VAR"
|
|
8940
9045
|
)
|
|
@@ -9134,10 +9239,10 @@ g([
|
|
|
9134
9239
|
i.forBlock.text_is_empty_v1 = function(t) {
|
|
9135
9240
|
return [`!${i.valueToCode(t, "VALUE", _.MEMBER) || "''"}.length`, _.LOGICAL_NOT];
|
|
9136
9241
|
};
|
|
9137
|
-
const
|
|
9242
|
+
const Pa = N.xml, Ra = {
|
|
9138
9243
|
itemCount_: 0,
|
|
9139
9244
|
mutationToDom: function() {
|
|
9140
|
-
const t =
|
|
9245
|
+
const t = Pa.createElement("mutation");
|
|
9141
9246
|
return t.setAttribute("items", `${this.itemCount_}`), t;
|
|
9142
9247
|
},
|
|
9143
9248
|
domToMutation: function(t) {
|
|
@@ -9201,20 +9306,20 @@ const Sa = L.xml, La = {
|
|
|
9201
9306
|
for (let t = 0; t < this.itemCount_; t++)
|
|
9202
9307
|
if (!this.getInput("ADD" + t)) {
|
|
9203
9308
|
const e = this.appendValueInput("ADD" + t).setAlign(
|
|
9204
|
-
|
|
9309
|
+
S.Align.RIGHT
|
|
9205
9310
|
);
|
|
9206
9311
|
t === 0 && e.appendField("%{BKY_TEXT_V1_JOIN_TITLE}");
|
|
9207
9312
|
}
|
|
9208
9313
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
9209
9314
|
this.removeInput("ADD" + t);
|
|
9210
9315
|
}
|
|
9211
|
-
},
|
|
9316
|
+
}, Da = function() {
|
|
9212
9317
|
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new It.MutatorIcon(["text_join_item_v1"], this));
|
|
9213
9318
|
};
|
|
9214
|
-
|
|
9319
|
+
U.registerMutator(
|
|
9215
9320
|
"text_join_mutator_v1",
|
|
9216
|
-
|
|
9217
|
-
|
|
9321
|
+
Ra,
|
|
9322
|
+
Da
|
|
9218
9323
|
);
|
|
9219
9324
|
g([
|
|
9220
9325
|
{
|
|
@@ -9446,7 +9551,7 @@ i.forBlock.text_trim_v1 = function(t) {
|
|
|
9446
9551
|
}[t.getFieldValue("MODE")];
|
|
9447
9552
|
return [`__trimV1__(${e}, ${o})`, _.ATOMIC];
|
|
9448
9553
|
};
|
|
9449
|
-
const
|
|
9554
|
+
const Ma = {
|
|
9450
9555
|
init: function() {
|
|
9451
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}");
|
|
9452
9557
|
},
|
|
@@ -9457,7 +9562,7 @@ const ba = {
|
|
|
9457
9562
|
this.updateShape_(), this.updateShadow_();
|
|
9458
9563
|
},
|
|
9459
9564
|
updateShape_: function() {
|
|
9460
|
-
this.getInput("CALLBACK") || this.appendStatementInput("CALLBACK").appendField("%{BKY_TIME_DO}"), this.getInput("IMMEDIATE") || (this.appendValueInput("IMMEDIATE").setCheck("Boolean").setAlign(
|
|
9565
|
+
this.getInput("CALLBACK") || this.appendStatementInput("CALLBACK").appendField("%{BKY_TIME_DO}"), this.getInput("IMMEDIATE") || (this.appendValueInput("IMMEDIATE").setCheck("Boolean").setAlign(S.Align.RIGHT).appendField("%{BKY_TIME_IMMEDIATE}"), this.moveInputBefore("IMMEDIATE", "CALLBACK")), this.getInput("COUNT") || (this.appendValueInput("COUNT").setCheck("Number").setAlign(S.Align.RIGHT).appendField("%{BKY_TIME_COUNT}"), this.moveInputBefore("COUNT", "IMMEDIATE")), this.getInput("LOOP") || (this.appendValueInput("LOOP").setCheck("Boolean").setAlign(S.Align.RIGHT).appendField("%{BKY_TIME_LOOP}"), this.moveInputBefore("LOOP", "COUNT")), this.getInput("INTERVAL") || (this.appendValueInput("INTERVAL").setCheck("Number").setAlign(S.Align.RIGHT).appendField("%{BKY_TIME_INTERVAL_MS}"), this.moveInputBefore("INTERVAL", "LOOP"));
|
|
9461
9566
|
},
|
|
9462
9567
|
updateShadow_: function() {
|
|
9463
9568
|
if (this.isInsertionMarker())
|
|
@@ -9472,7 +9577,7 @@ const ba = {
|
|
|
9472
9577
|
this.getInput("IMMEDIATE")?.setShadowDom(o);
|
|
9473
9578
|
}
|
|
9474
9579
|
};
|
|
9475
|
-
A.create_timer_v1 =
|
|
9580
|
+
A.create_timer_v1 = Ma;
|
|
9476
9581
|
i.forBlock.create_timer_v1 = function(t) {
|
|
9477
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");
|
|
9478
9583
|
return `__createTimerV1__(${e}, ${n}, ${o}, ${s}, async function() {
|
|
@@ -9501,18 +9606,18 @@ i.forBlock.delay_v1 = function(t) {
|
|
|
9501
9606
|
return `await __delayV1__(${i.valueToCode(t, "DURATION", _.ATOMIC) || "0"});
|
|
9502
9607
|
`;
|
|
9503
9608
|
};
|
|
9504
|
-
const
|
|
9609
|
+
const Ua = {
|
|
9505
9610
|
customContextMenu: function(t) {
|
|
9506
9611
|
if (this.isInFlyout) {
|
|
9507
9612
|
if (this.type === "variable_get_v1") {
|
|
9508
9613
|
const e = {
|
|
9509
9614
|
text: m("RENAME_VARIABLE"),
|
|
9510
9615
|
enabled: !0,
|
|
9511
|
-
callback:
|
|
9616
|
+
callback: Va(this)
|
|
9512
9617
|
}, n = this.getField("VAR").getText(), o = {
|
|
9513
9618
|
text: m("DELETE_VARIABLE").replace("%1", n),
|
|
9514
9619
|
enabled: !0,
|
|
9515
|
-
callback:
|
|
9620
|
+
callback: xa(this)
|
|
9516
9621
|
};
|
|
9517
9622
|
t.unshift(e), t.unshift(o);
|
|
9518
9623
|
}
|
|
@@ -9526,24 +9631,24 @@ const Pa = {
|
|
|
9526
9631
|
t.push({
|
|
9527
9632
|
enabled: this.workspace.remainingCapacity() > 0,
|
|
9528
9633
|
text: n.replace("%1", o.getText()),
|
|
9529
|
-
callback:
|
|
9634
|
+
callback: Hn.callbackFactory(this, s)
|
|
9530
9635
|
});
|
|
9531
9636
|
}
|
|
9532
9637
|
}
|
|
9533
|
-
},
|
|
9638
|
+
}, Va = function(t) {
|
|
9534
9639
|
return function() {
|
|
9535
9640
|
const e = t.workspace, o = t.getField("VAR").getVariable();
|
|
9536
9641
|
bt.renameVariable(e, o);
|
|
9537
9642
|
};
|
|
9538
|
-
},
|
|
9643
|
+
}, xa = function(t) {
|
|
9539
9644
|
return function() {
|
|
9540
9645
|
const n = t.getField("VAR").getVariable();
|
|
9541
9646
|
n && bt.deleteVariable(n.getWorkspace(), n, t);
|
|
9542
9647
|
};
|
|
9543
9648
|
};
|
|
9544
|
-
|
|
9649
|
+
U.registerMixin(
|
|
9545
9650
|
"context_menu_variable_v1",
|
|
9546
|
-
|
|
9651
|
+
Ua
|
|
9547
9652
|
);
|
|
9548
9653
|
g([
|
|
9549
9654
|
{
|
|
@@ -9599,15 +9704,15 @@ i.forBlock.variable_set_v1 = function(t) {
|
|
|
9599
9704
|
return `${e} = ${n};
|
|
9600
9705
|
`;
|
|
9601
9706
|
};
|
|
9602
|
-
|
|
9603
|
-
const n = await
|
|
9707
|
+
Gn.setConfirm(async (t, e) => {
|
|
9708
|
+
const n = await os({
|
|
9604
9709
|
title: "",
|
|
9605
9710
|
text: t
|
|
9606
9711
|
});
|
|
9607
9712
|
e(!!n);
|
|
9608
9713
|
});
|
|
9609
|
-
|
|
9610
|
-
const o = await
|
|
9714
|
+
Gn.setPrompt(async (t, e, n) => {
|
|
9715
|
+
const o = await ss({
|
|
9611
9716
|
title: "",
|
|
9612
9717
|
value: e
|
|
9613
9718
|
});
|
|
@@ -9617,15 +9722,15 @@ const te = v.prototype;
|
|
|
9617
9722
|
te.doClassValidation_ = function(t) {
|
|
9618
9723
|
return t;
|
|
9619
9724
|
};
|
|
9620
|
-
const
|
|
9725
|
+
const Ya = te.doValueUpdate_;
|
|
9621
9726
|
te.doValueUpdate_ = function(t) {
|
|
9622
|
-
|
|
9727
|
+
Ya.call(this, t), this.selectedOption && this.selectedOption[1] !== t && (this.selectedOption = null);
|
|
9623
9728
|
};
|
|
9624
|
-
const
|
|
9729
|
+
const Fa = te.getText_;
|
|
9625
9730
|
te.getText_ = function() {
|
|
9626
9731
|
if (this.selectedOption)
|
|
9627
|
-
return
|
|
9628
|
-
const { i18n: t } =
|
|
9732
|
+
return Fa.call(this);
|
|
9733
|
+
const { i18n: t } = yt, e = this.getSourceBlock();
|
|
9629
9734
|
if (this.name === "APP")
|
|
9630
9735
|
return e.app.name;
|
|
9631
9736
|
if (this.name === "PAGE")
|
|
@@ -9640,7 +9745,7 @@ te.getText_ = function() {
|
|
|
9640
9745
|
}
|
|
9641
9746
|
} else if (this.name === "PROPERTY") {
|
|
9642
9747
|
const { kind: n, names: o } = e.property;
|
|
9643
|
-
return
|
|
9748
|
+
return zn(n, o);
|
|
9644
9749
|
} else if (this.name === "EVENT") {
|
|
9645
9750
|
const { kind: n, names: o } = e.event;
|
|
9646
9751
|
return console.log(e.event), Oe(n, o);
|
|
@@ -9665,8 +9770,8 @@ te.getText_ = function() {
|
|
|
9665
9770
|
}
|
|
9666
9771
|
return "<n/a>";
|
|
9667
9772
|
};
|
|
9668
|
-
const
|
|
9669
|
-
|
|
9773
|
+
const Fn = 60;
|
|
9774
|
+
wo.prototype.cleanUp = function() {
|
|
9670
9775
|
this.setResizesEnabled(!1);
|
|
9671
9776
|
const t = O.getGroup();
|
|
9672
9777
|
t || O.setGroup(!0);
|
|
@@ -9684,30 +9789,30 @@ Fo.prototype.cleanUp = function() {
|
|
|
9684
9789
|
c.moveBy(-l.left, r - l.top, ["cleanup"]), c.snapToGrid(), l = c.getBoundingRectangle();
|
|
9685
9790
|
let d = a(l);
|
|
9686
9791
|
for (; d != null; )
|
|
9687
|
-
r = d.top + d.getHeight() +
|
|
9688
|
-
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;
|
|
9689
9794
|
}
|
|
9690
9795
|
O.setGroup(t), this.setResizesEnabled(!0);
|
|
9691
9796
|
};
|
|
9692
|
-
function
|
|
9797
|
+
function Io(t) {
|
|
9693
9798
|
const e = t.getParent();
|
|
9694
|
-
return e &&
|
|
9799
|
+
return e && Io(e) ? !0 : !e && !!(t.outputConnection || t.previousConnection);
|
|
9695
9800
|
}
|
|
9696
|
-
class
|
|
9801
|
+
class wa {
|
|
9697
9802
|
init() {
|
|
9698
|
-
const e =
|
|
9803
|
+
const e = Ko.registry.getItem("blockDisable");
|
|
9699
9804
|
e && (e.preconditionFn = function(n) {
|
|
9700
9805
|
const o = n.block;
|
|
9701
|
-
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";
|
|
9702
9807
|
});
|
|
9703
9808
|
}
|
|
9704
9809
|
}
|
|
9705
|
-
|
|
9706
|
-
|
|
9707
|
-
const
|
|
9708
|
-
|
|
9709
|
-
const
|
|
9710
|
-
|
|
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();
|
|
9711
9816
|
function fn(t) {
|
|
9712
9817
|
const e = Xt();
|
|
9713
9818
|
if (!e)
|
|
@@ -9721,7 +9826,7 @@ function fn(t) {
|
|
|
9721
9826
|
const s = o.getRelativeToSurfaceXY(), a = s.x * e.scale, r = s.y * e.scale;
|
|
9722
9827
|
e.scroll(-a, -r);
|
|
9723
9828
|
}
|
|
9724
|
-
function
|
|
9829
|
+
function yo() {
|
|
9725
9830
|
const t = Xt();
|
|
9726
9831
|
if (!t)
|
|
9727
9832
|
return;
|
|
@@ -9879,7 +9984,7 @@ ye.Classic.categoryStyles = {
|
|
|
9879
9984
|
colour: "#a55b80"
|
|
9880
9985
|
}
|
|
9881
9986
|
};
|
|
9882
|
-
const
|
|
9987
|
+
const Ha = Wn.defineTheme("light", {
|
|
9883
9988
|
name: "light",
|
|
9884
9989
|
base: ye.Classic,
|
|
9885
9990
|
componentStyles: {
|
|
@@ -9895,7 +10000,7 @@ const Fa = Gn.defineTheme("light", {
|
|
|
9895
10000
|
scrollbarOpacity: 0.4,
|
|
9896
10001
|
cursorColour: ""
|
|
9897
10002
|
}
|
|
9898
|
-
}),
|
|
10003
|
+
}), Ga = Wn.defineTheme("dark", {
|
|
9899
10004
|
name: "dark",
|
|
9900
10005
|
base: ye.Classic,
|
|
9901
10006
|
componentStyles: {
|
|
@@ -9912,14 +10017,14 @@ const Fa = Gn.defineTheme("light", {
|
|
|
9912
10017
|
cursorColour: ""
|
|
9913
10018
|
}
|
|
9914
10019
|
});
|
|
9915
|
-
function
|
|
10020
|
+
function Wa(t) {
|
|
9916
10021
|
const e = Xt();
|
|
9917
10022
|
switch (t) {
|
|
9918
10023
|
case "light":
|
|
9919
|
-
e.setTheme(
|
|
10024
|
+
e.setTheme(Ha);
|
|
9920
10025
|
break;
|
|
9921
10026
|
case "dark":
|
|
9922
|
-
e.setTheme(
|
|
10027
|
+
e.setTheme(Ga);
|
|
9923
10028
|
break;
|
|
9924
10029
|
}
|
|
9925
10030
|
}
|
|
@@ -9927,7 +10032,7 @@ const cn = ["get_app_property_v1", "get_app_state_v1"];
|
|
|
9927
10032
|
function ht(t, e) {
|
|
9928
10033
|
return t.find((o) => o === e) !== void 0 ? !1 : (t.push(e), !0);
|
|
9929
10034
|
}
|
|
9930
|
-
function
|
|
10035
|
+
function ja(t) {
|
|
9931
10036
|
const e = [];
|
|
9932
10037
|
function n(o) {
|
|
9933
10038
|
for (const s of o.getChildren(!0))
|
|
@@ -9935,23 +10040,23 @@ function $a(t) {
|
|
|
9935
10040
|
}
|
|
9936
10041
|
return n(t), e;
|
|
9937
10042
|
}
|
|
9938
|
-
function
|
|
10043
|
+
function Xa(t) {
|
|
9939
10044
|
const e = [];
|
|
9940
10045
|
for (const n of t)
|
|
9941
10046
|
if (n.type === "get_app_property_v1") {
|
|
9942
10047
|
const o = n;
|
|
9943
10048
|
ht(
|
|
9944
10049
|
e,
|
|
9945
|
-
|
|
10050
|
+
St({
|
|
9946
10051
|
type: "elementProperty",
|
|
9947
10052
|
nodeId: o.node.id,
|
|
9948
10053
|
propertyKeys: o.property.key
|
|
9949
10054
|
})
|
|
9950
10055
|
);
|
|
9951
|
-
} 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);
|
|
9952
10057
|
return e;
|
|
9953
10058
|
}
|
|
9954
|
-
function
|
|
10059
|
+
function Ja(t) {
|
|
9955
10060
|
const e = [];
|
|
9956
10061
|
for (const n of t.getChildren(!0))
|
|
9957
10062
|
if (cn.includes(n.type))
|
|
@@ -9962,7 +10067,7 @@ function Ga(t) {
|
|
|
9962
10067
|
}
|
|
9963
10068
|
return e;
|
|
9964
10069
|
}
|
|
9965
|
-
function
|
|
10070
|
+
function qa(t) {
|
|
9966
10071
|
const e = [], n = [];
|
|
9967
10072
|
for (const o of t)
|
|
9968
10073
|
if (o.type === "get_app_property_v1") {
|
|
@@ -9978,12 +10083,12 @@ function Wa(t) {
|
|
|
9978
10083
|
} : (s.property.kind === "elementSlotProperty" || s.property.kind === "customSlotProperty") && (a = {
|
|
9979
10084
|
type: "adaptSlotProperty",
|
|
9980
10085
|
propertyId: s.property.key
|
|
9981
|
-
}), !a || !ht(n,
|
|
10086
|
+
}), !a || !ht(n, St(a)))
|
|
9982
10087
|
continue;
|
|
9983
10088
|
e.push(a);
|
|
9984
10089
|
} else if (o.type === "get_app_state_v1") {
|
|
9985
10090
|
const a = { type: "state", stateId: o.state.id };
|
|
9986
|
-
if (!ht(n,
|
|
10091
|
+
if (!ht(n, St(a)))
|
|
9987
10092
|
continue;
|
|
9988
10093
|
e.push(a);
|
|
9989
10094
|
} else if (o.type === "object_get_v1") {
|
|
@@ -10008,7 +10113,7 @@ function Wa(t) {
|
|
|
10008
10113
|
type: "adaptSlotProperty",
|
|
10009
10114
|
propertyId: r.property.key,
|
|
10010
10115
|
subKeys: a
|
|
10011
|
-
}), !c || !ht(n,
|
|
10116
|
+
}), !c || !ht(n, St(c)))
|
|
10012
10117
|
continue;
|
|
10013
10118
|
e.push(c);
|
|
10014
10119
|
} else if (s.type === "get_app_state_v1") {
|
|
@@ -10017,7 +10122,7 @@ function Wa(t) {
|
|
|
10017
10122
|
stateId: s.state.id,
|
|
10018
10123
|
subKeys: a
|
|
10019
10124
|
};
|
|
10020
|
-
if (!ht(n,
|
|
10125
|
+
if (!ht(n, St(c)))
|
|
10021
10126
|
continue;
|
|
10022
10127
|
e.push(c);
|
|
10023
10128
|
} else
|
|
@@ -10026,7 +10131,7 @@ function Wa(t) {
|
|
|
10026
10131
|
console.assert(!1);
|
|
10027
10132
|
return e;
|
|
10028
10133
|
}
|
|
10029
|
-
function
|
|
10134
|
+
function Qa(t) {
|
|
10030
10135
|
const e = {
|
|
10031
10136
|
watchEffect: {},
|
|
10032
10137
|
bind: {
|
|
@@ -10038,27 +10143,27 @@ function ja(t) {
|
|
|
10038
10143
|
return e;
|
|
10039
10144
|
for (const o of n)
|
|
10040
10145
|
if (o.type === "watch_effect_v1") {
|
|
10041
|
-
const s =
|
|
10146
|
+
const s = ja(o), a = Xa(s);
|
|
10042
10147
|
for (const r of a)
|
|
10043
10148
|
e.watchEffect[r] || (e.watchEffect[r] = []), ht(e.watchEffect[r], o.id);
|
|
10044
10149
|
} else if (o.type === "app_bind_v1") {
|
|
10045
|
-
const s =
|
|
10150
|
+
const s = Ja(o), a = qa(s);
|
|
10046
10151
|
e.bind.sets[o.id] = a;
|
|
10047
10152
|
for (const r of a) {
|
|
10048
|
-
const c =
|
|
10153
|
+
const c = St(r);
|
|
10049
10154
|
e.bind.triggers[c] || (e.bind.triggers[c] = []), ht(e.bind.triggers[c], o.id);
|
|
10050
10155
|
}
|
|
10051
10156
|
}
|
|
10052
10157
|
return e;
|
|
10053
10158
|
}
|
|
10054
|
-
const
|
|
10055
|
-
function
|
|
10056
|
-
|
|
10159
|
+
const Oo = Symbol();
|
|
10160
|
+
function za(t) {
|
|
10161
|
+
ps(Oo, t);
|
|
10057
10162
|
}
|
|
10058
10163
|
function mn() {
|
|
10059
|
-
return
|
|
10164
|
+
return ds(Oo);
|
|
10060
10165
|
}
|
|
10061
|
-
const
|
|
10166
|
+
const Za = /* @__PURE__ */ pt({
|
|
10062
10167
|
__name: "index",
|
|
10063
10168
|
props: {
|
|
10064
10169
|
lock: { type: Boolean }
|
|
@@ -10070,7 +10175,7 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10070
10175
|
return;
|
|
10071
10176
|
}
|
|
10072
10177
|
if (s.lock) {
|
|
10073
|
-
|
|
10178
|
+
Xn(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
10074
10179
|
return;
|
|
10075
10180
|
}
|
|
10076
10181
|
a.workspace.cleanUp();
|
|
@@ -10079,12 +10184,12 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10079
10184
|
};
|
|
10080
10185
|
return e({ cleanWorkspace: c }), (d, u) => {
|
|
10081
10186
|
const h = F("v-btn"), p = F("v-tooltip");
|
|
10082
|
-
return
|
|
10187
|
+
return M(), ut(p, {
|
|
10083
10188
|
disabled: r.value,
|
|
10084
10189
|
text: Y(n)("x-block-lib.tip.hotkeyCtrlQ")
|
|
10085
10190
|
}, {
|
|
10086
10191
|
activator: lt(({ props: f }) => [
|
|
10087
|
-
|
|
10192
|
+
D(h, ln(f, {
|
|
10088
10193
|
density: "comfortable",
|
|
10089
10194
|
icon: "mdi-broom",
|
|
10090
10195
|
variant: "outlined",
|
|
@@ -10095,7 +10200,7 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10095
10200
|
}, 8, ["disabled", "text"]);
|
|
10096
10201
|
};
|
|
10097
10202
|
}
|
|
10098
|
-
}),
|
|
10203
|
+
}), tc = /* @__PURE__ */ pt({
|
|
10099
10204
|
__name: "index",
|
|
10100
10205
|
props: {
|
|
10101
10206
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10106,12 +10211,12 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10106
10211
|
const { t: e } = Qt(), n = _n(), o = Ht(t, "modelValue"), s = $(() => n.smAndDown.value);
|
|
10107
10212
|
return (a, r) => {
|
|
10108
10213
|
const c = F("v-btn"), l = F("v-tooltip");
|
|
10109
|
-
return
|
|
10214
|
+
return M(), ut(l, {
|
|
10110
10215
|
disabled: s.value,
|
|
10111
10216
|
text: Y(e)("x-block-lib.tip.hotkeyCtrlW")
|
|
10112
10217
|
}, {
|
|
10113
10218
|
activator: lt(({ props: d }) => [
|
|
10114
|
-
|
|
10219
|
+
D(c, ln(d, {
|
|
10115
10220
|
density: "comfortable",
|
|
10116
10221
|
icon: o.value ? "mdi-lock" : "mdi-lock-open",
|
|
10117
10222
|
variant: "outlined",
|
|
@@ -10122,11 +10227,11 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10122
10227
|
}, 8, ["disabled", "text"]);
|
|
10123
10228
|
};
|
|
10124
10229
|
}
|
|
10125
|
-
}),
|
|
10230
|
+
}), ec = { class: "d-flex flex-column" }, nc = { class: "text-subtitle-1 ml-6" }, oc = {
|
|
10126
10231
|
key: 0,
|
|
10127
10232
|
class: "text-caption text-grey text-truncate ml-6",
|
|
10128
10233
|
style: { maxWidth: "340px" }
|
|
10129
|
-
},
|
|
10234
|
+
}, sc = /* @__PURE__ */ pt({
|
|
10130
10235
|
__name: "item",
|
|
10131
10236
|
props: {
|
|
10132
10237
|
id: {},
|
|
@@ -10154,20 +10259,20 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10154
10259
|
pointerEvents: "none"
|
|
10155
10260
|
}));
|
|
10156
10261
|
return (u, h) => {
|
|
10157
|
-
const p = F("v-spacer"), f = F("v-icon"), T =
|
|
10158
|
-
return
|
|
10262
|
+
const p = F("v-spacer"), f = F("v-icon"), T = hs("ripple");
|
|
10263
|
+
return fs((M(), it("div", {
|
|
10159
10264
|
class: "d-flex align-center cursor-pointer",
|
|
10160
10265
|
style: z(l.value),
|
|
10161
10266
|
onClick: h[1] || (h[1] = (E) => r("x-click", a.id)),
|
|
10162
10267
|
onMouseout: h[2] || (h[2] = (E) => c.value = !1),
|
|
10163
10268
|
onMouseover: h[3] || (h[3] = (E) => c.value = !0)
|
|
10164
10269
|
}, [
|
|
10165
|
-
X("div",
|
|
10166
|
-
X("span",
|
|
10167
|
-
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)
|
|
10168
10273
|
]),
|
|
10169
|
-
|
|
10170
|
-
|
|
10274
|
+
D(p),
|
|
10275
|
+
D(f, {
|
|
10171
10276
|
class: "x-handle cursor-move mr-3",
|
|
10172
10277
|
icon: "mdi-drag-horizontal-variant",
|
|
10173
10278
|
onMousedown: h[0] || (h[0] = Kt(() => {
|
|
@@ -10181,10 +10286,10 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10181
10286
|
]);
|
|
10182
10287
|
};
|
|
10183
10288
|
}
|
|
10184
|
-
}),
|
|
10289
|
+
}), ic = {
|
|
10185
10290
|
key: 1,
|
|
10186
10291
|
class: "text-caption text-grey"
|
|
10187
|
-
},
|
|
10292
|
+
}, ac = /* @__PURE__ */ pt({
|
|
10188
10293
|
__name: "index",
|
|
10189
10294
|
props: /* @__PURE__ */ ze({
|
|
10190
10295
|
lock: { type: Boolean }
|
|
@@ -10202,18 +10307,18 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10202
10307
|
}
|
|
10203
10308
|
const p = [];
|
|
10204
10309
|
s.workspace.getTopBlocks(!0).forEach((T) => {
|
|
10205
|
-
const E = T.id ===
|
|
10310
|
+
const E = T.id === Xo()?.id;
|
|
10206
10311
|
let y = "";
|
|
10207
10312
|
if (T.type.startsWith("on_app_event_v")) {
|
|
10208
|
-
const
|
|
10209
|
-
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));
|
|
10210
10315
|
} else if (T.type.startsWith("watch_effect_v"))
|
|
10211
10316
|
y = n("x-block-lib.watchEffect");
|
|
10212
10317
|
else if (T.type.startsWith("app_bind_v"))
|
|
10213
10318
|
y = n("x-block-lib.bind");
|
|
10214
10319
|
else if (T.type.startsWith("implement_app_method_v")) {
|
|
10215
|
-
const
|
|
10216
|
-
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);
|
|
10217
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");
|
|
10218
10323
|
const k = T.getCommentText() ?? "";
|
|
10219
10324
|
p.push({
|
|
@@ -10227,7 +10332,7 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10227
10332
|
let c = [];
|
|
10228
10333
|
const l = () => {
|
|
10229
10334
|
if (t.lock) {
|
|
10230
|
-
|
|
10335
|
+
Xn(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
10231
10336
|
return;
|
|
10232
10337
|
}
|
|
10233
10338
|
const p = [];
|
|
@@ -10259,16 +10364,16 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10259
10364
|
E
|
|
10260
10365
|
).getRelativeToSurfaceXY().y + 10);
|
|
10261
10366
|
const k = T.getRelativeToSurfaceXY();
|
|
10262
|
-
T.moveTo(new
|
|
10367
|
+
T.moveTo(new N.Coordinate(k.x, y)), s.workspace.cleanUp(), yo();
|
|
10263
10368
|
}, h = async (p) => {
|
|
10264
10369
|
if (!s.workspace) {
|
|
10265
10370
|
console.assert(!1);
|
|
10266
10371
|
return;
|
|
10267
10372
|
}
|
|
10268
10373
|
const f = s.workspace.getBlockById(p);
|
|
10269
|
-
|
|
10374
|
+
jn.setSelected(f), fn(p), o.value = !1;
|
|
10270
10375
|
};
|
|
10271
|
-
return (p, f) => a.value.length > 0 ? (
|
|
10376
|
+
return (p, f) => a.value.length > 0 ? (M(), ut(Y(jo), {
|
|
10272
10377
|
key: 0,
|
|
10273
10378
|
modelValue: a.value,
|
|
10274
10379
|
"onUpdate:modelValue": f[0] || (f[0] = (T) => a.value = T),
|
|
@@ -10280,7 +10385,7 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10280
10385
|
onStart: l
|
|
10281
10386
|
}, {
|
|
10282
10387
|
default: lt(() => [
|
|
10283
|
-
(
|
|
10388
|
+
(M(!0), it(to, null, ms(a.value, (T) => (M(), ut(sc, {
|
|
10284
10389
|
id: T.id,
|
|
10285
10390
|
key: T.id,
|
|
10286
10391
|
desc: T.desc,
|
|
@@ -10290,14 +10395,14 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10290
10395
|
}, null, 8, ["id", "desc", "select", "title"]))), 128))
|
|
10291
10396
|
]),
|
|
10292
10397
|
_: 1
|
|
10293
|
-
}, 8, ["modelValue"])) : (
|
|
10398
|
+
}, 8, ["modelValue"])) : (M(), it("span", ic, Gt(Y(n)("x-block-lib.noOption")), 1));
|
|
10294
10399
|
}
|
|
10295
|
-
}),
|
|
10400
|
+
}), cc = (t, e) => {
|
|
10296
10401
|
const n = t.__vccOpts || t;
|
|
10297
10402
|
for (const [o, s] of e)
|
|
10298
10403
|
n[o] = s;
|
|
10299
10404
|
return n;
|
|
10300
|
-
},
|
|
10405
|
+
}, rc = /* @__PURE__ */ cc(ac, [["__scopeId", "data-v-a77ed323"]]), uc = /* @__PURE__ */ pt({
|
|
10301
10406
|
__name: "index",
|
|
10302
10407
|
props: {
|
|
10303
10408
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10319,20 +10424,20 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10319
10424
|
return;
|
|
10320
10425
|
}
|
|
10321
10426
|
const l = c.getBlockById(r);
|
|
10322
|
-
|
|
10427
|
+
jn.setSelected(l), fn(r), n.value = !1;
|
|
10323
10428
|
};
|
|
10324
|
-
return (r, c) => (
|
|
10429
|
+
return (r, c) => (M(), it("div", {
|
|
10325
10430
|
onClick: c[0] || (c[0] = (l) => a(""))
|
|
10326
10431
|
}, "blockTree"));
|
|
10327
10432
|
}
|
|
10328
|
-
}),
|
|
10433
|
+
}), lc = { class: "text-subtitle-1" }, _c = /* @__PURE__ */ pt({
|
|
10329
10434
|
__name: "index",
|
|
10330
10435
|
props: {
|
|
10331
10436
|
type: {},
|
|
10332
10437
|
lock: { type: Boolean }
|
|
10333
10438
|
},
|
|
10334
10439
|
setup(t, { expose: e }) {
|
|
10335
|
-
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 = $(() => {
|
|
10336
10441
|
let T = "100%";
|
|
10337
10442
|
return o.mdAndUp.value && (T = "400px"), {
|
|
10338
10443
|
background: a.value,
|
|
@@ -10348,16 +10453,16 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10348
10453
|
}), d = $(() => ({
|
|
10349
10454
|
height: "60px"
|
|
10350
10455
|
})), { open: u } = rn(`blocklyNavigatorDlg${Ze()}`);
|
|
10351
|
-
|
|
10456
|
+
Ts(() => {
|
|
10352
10457
|
u.value = !1;
|
|
10353
10458
|
});
|
|
10354
10459
|
const h = $t("blockList"), p = $t("blockTree");
|
|
10355
10460
|
return e({ open: u, update: () => {
|
|
10356
10461
|
t.type === "list" ? h.value?.update() : t.type === "tree" && p.value?.update();
|
|
10357
10462
|
} }), (T, E) => {
|
|
10358
|
-
const y = F("v-sheet"), k = F("v-btn"),
|
|
10359
|
-
return
|
|
10360
|
-
|
|
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, {
|
|
10361
10466
|
modelValue: Y(u),
|
|
10362
10467
|
"onUpdate:modelValue": E[5] || (E[5] = (Q) => oe(u) ? u.value = Q : null),
|
|
10363
10468
|
eager: "",
|
|
@@ -10365,7 +10470,7 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10365
10470
|
"no-click-animation": "",
|
|
10366
10471
|
persistent: "",
|
|
10367
10472
|
transition: "scroll-x-reverse-transition",
|
|
10368
|
-
onKeydown: E[6] || (E[6] =
|
|
10473
|
+
onKeydown: E[6] || (E[6] = eo(Kt((Q) => u.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
10369
10474
|
}, {
|
|
10370
10475
|
default: lt(() => [
|
|
10371
10476
|
X("div", {
|
|
@@ -10377,25 +10482,25 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10377
10482
|
class: "elevation-2",
|
|
10378
10483
|
style: z(c.value)
|
|
10379
10484
|
}, [
|
|
10380
|
-
Y(s) ? (
|
|
10485
|
+
Y(s) ? (M(), ut(y, {
|
|
10381
10486
|
key: 0,
|
|
10382
10487
|
color: "transparent",
|
|
10383
10488
|
height: 24
|
|
10384
10489
|
})) : dt("", !0),
|
|
10385
|
-
|
|
10490
|
+
D(y, {
|
|
10386
10491
|
class: "d-flex align-center px-2",
|
|
10387
10492
|
color: "transparent",
|
|
10388
10493
|
height: 48
|
|
10389
10494
|
}, {
|
|
10390
10495
|
default: lt(() => [
|
|
10391
|
-
|
|
10496
|
+
D(k, {
|
|
10392
10497
|
density: "comfortable",
|
|
10393
10498
|
icon: "mdi-close",
|
|
10394
10499
|
variant: "text",
|
|
10395
10500
|
onClick: E[0] || (E[0] = (Q) => u.value = !1)
|
|
10396
10501
|
}),
|
|
10397
|
-
X("span",
|
|
10398
|
-
R
|
|
10502
|
+
X("span", lc, Gt(Y(n)("x-block-lib.navigator")), 1),
|
|
10503
|
+
D(R)
|
|
10399
10504
|
]),
|
|
10400
10505
|
_: 1
|
|
10401
10506
|
}),
|
|
@@ -10403,14 +10508,14 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10403
10508
|
class: "overflow-y-auto",
|
|
10404
10509
|
style: z(l.value)
|
|
10405
10510
|
}, [
|
|
10406
|
-
t.type === "list" ? (
|
|
10511
|
+
t.type === "list" ? (M(), ut(rc, {
|
|
10407
10512
|
key: 0,
|
|
10408
10513
|
ref_key: "blockList",
|
|
10409
10514
|
ref: h,
|
|
10410
10515
|
modelValue: Y(u),
|
|
10411
10516
|
"onUpdate:modelValue": E[1] || (E[1] = (Q) => oe(u) ? u.value = Q : null),
|
|
10412
10517
|
lock: t.lock
|
|
10413
|
-
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (
|
|
10518
|
+
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (M(), ut(uc, {
|
|
10414
10519
|
key: 1,
|
|
10415
10520
|
ref_key: "blockTree",
|
|
10416
10521
|
ref: p,
|
|
@@ -10426,12 +10531,12 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10426
10531
|
]),
|
|
10427
10532
|
_: 1
|
|
10428
10533
|
}, 8, ["modelValue"]),
|
|
10429
|
-
|
|
10534
|
+
D(Ve, {
|
|
10430
10535
|
disabled: r.value,
|
|
10431
10536
|
text: Y(n)("x-block-lib.tip.hotkeyCtrlE")
|
|
10432
10537
|
}, {
|
|
10433
10538
|
activator: lt(({ props: Q }) => [
|
|
10434
|
-
|
|
10539
|
+
D(k, ln(Q, {
|
|
10435
10540
|
density: "comfortable",
|
|
10436
10541
|
icon: "mdi-navigation-variant",
|
|
10437
10542
|
variant: "outlined",
|
|
@@ -10443,7 +10548,7 @@ const Ja = /* @__PURE__ */ pt({
|
|
|
10443
10548
|
], 64);
|
|
10444
10549
|
};
|
|
10445
10550
|
}
|
|
10446
|
-
}), W =
|
|
10551
|
+
}), W = N.xml;
|
|
10447
10552
|
function G(t) {
|
|
10448
10553
|
const e = W.createElement("label");
|
|
10449
10554
|
return e.setAttribute("text", t), e;
|
|
@@ -10455,7 +10560,7 @@ function C(t, e) {
|
|
|
10455
10560
|
n.appendChild(o);
|
|
10456
10561
|
return n;
|
|
10457
10562
|
}
|
|
10458
|
-
function
|
|
10563
|
+
function vo(t) {
|
|
10459
10564
|
const e = W.createElement("mutation");
|
|
10460
10565
|
for (const { key: n, value: o } of t)
|
|
10461
10566
|
e.setAttribute(n, o);
|
|
@@ -10472,7 +10577,7 @@ function Mt(t, e) {
|
|
|
10472
10577
|
const a = W.createTextNode(e);
|
|
10473
10578
|
return s.appendChild(a), o.appendChild(s), n.appendChild(o), n;
|
|
10474
10579
|
}
|
|
10475
|
-
function
|
|
10580
|
+
function wn(t, e) {
|
|
10476
10581
|
e === void 0 && (e = 0);
|
|
10477
10582
|
const n = W.createElement("value");
|
|
10478
10583
|
n.setAttribute("name", t);
|
|
@@ -10483,7 +10588,7 @@ function Fn(t, e) {
|
|
|
10483
10588
|
const a = W.createTextNode(String(e));
|
|
10484
10589
|
return s.appendChild(a), o.appendChild(s), n.appendChild(o), n;
|
|
10485
10590
|
}
|
|
10486
|
-
function
|
|
10591
|
+
function pc(t, e) {
|
|
10487
10592
|
e === void 0 && (e = !1);
|
|
10488
10593
|
const n = W.createElement("value");
|
|
10489
10594
|
n.setAttribute("name", t);
|
|
@@ -10494,19 +10599,19 @@ function rc(t, e) {
|
|
|
10494
10599
|
const a = W.createTextNode(e ? "TRUE" : "FALSE");
|
|
10495
10600
|
return s.appendChild(a), o.appendChild(s), n.appendChild(o), n;
|
|
10496
10601
|
}
|
|
10497
|
-
function
|
|
10602
|
+
function dc() {
|
|
10498
10603
|
const { activeObject: t, activeComp: e } = I.app;
|
|
10499
10604
|
return !(t.type !== "comp" || !e.meta.events || e.meta.events.length <= 0);
|
|
10500
10605
|
}
|
|
10501
|
-
function
|
|
10606
|
+
function hc() {
|
|
10502
10607
|
const { activeObject: t, activeComp: e } = I.app;
|
|
10503
10608
|
return !(t.type !== "comp" || !e.meta.states || e.meta.states.length <= 0);
|
|
10504
10609
|
}
|
|
10505
|
-
function
|
|
10610
|
+
function Kn() {
|
|
10506
10611
|
const { activeObject: t, activeComp: e } = I.app;
|
|
10507
10612
|
return !(t.type !== "comp" || !e.meta.methods || e.meta.methods.length <= 0);
|
|
10508
10613
|
}
|
|
10509
|
-
function
|
|
10614
|
+
function fc() {
|
|
10510
10615
|
const { activeObject: t, activeComp: e } = I.app;
|
|
10511
10616
|
if (t.type !== "comp")
|
|
10512
10617
|
return !1;
|
|
@@ -10517,55 +10622,55 @@ function _c() {
|
|
|
10517
10622
|
}
|
|
10518
10623
|
return !1;
|
|
10519
10624
|
}
|
|
10520
|
-
function
|
|
10625
|
+
function mc() {
|
|
10521
10626
|
const t = [];
|
|
10522
|
-
return t.push(G(m("LABEL_EVENT"))), Z("onEvent") && t.push(C("on_app_event_v1")),
|
|
10523
|
-
C("app_bind_v1", [
|
|
10524
|
-
), 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;
|
|
10525
10630
|
}
|
|
10526
|
-
const
|
|
10527
|
-
function
|
|
10631
|
+
const Co = { name: "APP_COMP_CATEGORY", callback: mc };
|
|
10632
|
+
function Tc() {
|
|
10528
10633
|
const t = [];
|
|
10529
10634
|
return t.push(G(m("LABEL_FUNC"))), t.push(G(m("LABEL_FLOW"))), t;
|
|
10530
10635
|
}
|
|
10531
|
-
const he = { name: "APP_COMPUTE_CATEGORY", callback:
|
|
10532
|
-
function
|
|
10636
|
+
const he = { name: "APP_COMPUTE_CATEGORY", callback: Tc };
|
|
10637
|
+
function Ec() {
|
|
10533
10638
|
const t = [];
|
|
10534
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;
|
|
10535
10640
|
}
|
|
10536
|
-
const fe = { name: "APP_MESSAGE_CATEGORY", callback:
|
|
10537
|
-
function
|
|
10641
|
+
const fe = { name: "APP_MESSAGE_CATEGORY", callback: Ec };
|
|
10642
|
+
function gc() {
|
|
10538
10643
|
for (const t of I.app.appList)
|
|
10539
10644
|
if (t.pages.length > 0)
|
|
10540
10645
|
return !0;
|
|
10541
10646
|
return !1;
|
|
10542
10647
|
}
|
|
10543
|
-
function
|
|
10648
|
+
function Ac() {
|
|
10544
10649
|
const t = [];
|
|
10545
|
-
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;
|
|
10546
10651
|
}
|
|
10547
|
-
const me = { name: "APP_MISC_CATEGORY", callback:
|
|
10548
|
-
function
|
|
10652
|
+
const me = { name: "APP_MISC_CATEGORY", callback: Ac };
|
|
10653
|
+
function Ic() {
|
|
10549
10654
|
const { activeObject: t, activePage: e } = I.app;
|
|
10550
10655
|
return !(t.type !== "page" || !e.meta.states || e.meta.states.length <= 0);
|
|
10551
10656
|
}
|
|
10552
|
-
function
|
|
10657
|
+
function yc() {
|
|
10553
10658
|
const { activeObject: t, activePage: e } = I.app;
|
|
10554
10659
|
return !(t.type !== "page" || !e.meta.arguments || e.meta.arguments.length <= 0);
|
|
10555
10660
|
}
|
|
10556
|
-
function
|
|
10661
|
+
function Oc() {
|
|
10557
10662
|
const t = [];
|
|
10558
10663
|
return t.push(G(m("LABEL_EVENT"))), Z("onEvent") && t.push(C("on_app_event_v1")), t.push(
|
|
10559
|
-
C("app_bind_v1", [
|
|
10560
|
-
), 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;
|
|
10561
10666
|
}
|
|
10562
|
-
const
|
|
10563
|
-
function
|
|
10667
|
+
const ko = { name: "APP_PAGE_CATEGORY", callback: Oc };
|
|
10668
|
+
function vc() {
|
|
10564
10669
|
const t = [];
|
|
10565
10670
|
return t.push(G(m("LABEL_RESOURCE"))), t.push(C("upload_resource_v1")), t;
|
|
10566
10671
|
}
|
|
10567
|
-
const Te = { name: "APP_RESOURCE_CATEGORY", callback:
|
|
10568
|
-
function
|
|
10672
|
+
const Te = { name: "APP_RESOURCE_CATEGORY", callback: vc }, Ft = N.xml;
|
|
10673
|
+
function Cc() {
|
|
10569
10674
|
const t = [];
|
|
10570
10675
|
{
|
|
10571
10676
|
const e = Ft.createElement("label");
|
|
@@ -10590,9 +10695,9 @@ function Ic() {
|
|
|
10590
10695
|
}
|
|
10591
10696
|
const ft = {
|
|
10592
10697
|
name: "PROCEDURE_CATEGORY",
|
|
10593
|
-
callback:
|
|
10594
|
-
}, ne =
|
|
10595
|
-
function
|
|
10698
|
+
callback: Cc
|
|
10699
|
+
}, ne = N.xml;
|
|
10700
|
+
function kc() {
|
|
10596
10701
|
const t = Xt(), e = [];
|
|
10597
10702
|
{
|
|
10598
10703
|
const o = ne.createElement("label");
|
|
@@ -10630,22 +10735,22 @@ function yc() {
|
|
|
10630
10735
|
}
|
|
10631
10736
|
const mt = {
|
|
10632
10737
|
name: "VARIABLE_CATEGORY",
|
|
10633
|
-
callback:
|
|
10738
|
+
callback: kc
|
|
10634
10739
|
};
|
|
10635
|
-
function
|
|
10740
|
+
function Sc() {
|
|
10636
10741
|
const t = [];
|
|
10637
10742
|
if (at().length > 0)
|
|
10638
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(
|
|
10639
10744
|
C("interrupt_transaction_v1", [Mt("VALUE")])
|
|
10640
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(
|
|
10641
10746
|
C("query_extra_limit_v1", [
|
|
10642
|
-
|
|
10643
|
-
|
|
10747
|
+
wn("OFFSET", 0),
|
|
10748
|
+
wn("LIMIT", 1)
|
|
10644
10749
|
])
|
|
10645
10750
|
), t.push(
|
|
10646
10751
|
C("query_extra_sortby_v1", [
|
|
10647
10752
|
Mt("COLUMN"),
|
|
10648
|
-
|
|
10753
|
+
pc("DESC")
|
|
10649
10754
|
])
|
|
10650
10755
|
);
|
|
10651
10756
|
else {
|
|
@@ -10654,30 +10759,30 @@ function Oc() {
|
|
|
10654
10759
|
}
|
|
10655
10760
|
return t;
|
|
10656
10761
|
}
|
|
10657
|
-
const Ee = { name: "COMPUTE_DATA_CATEGORY", callback:
|
|
10658
|
-
function
|
|
10762
|
+
const Ee = { name: "COMPUTE_DATA_CATEGORY", callback: Sc };
|
|
10763
|
+
function Nc() {
|
|
10659
10764
|
return Zt("flow").length > 0;
|
|
10660
10765
|
}
|
|
10661
|
-
function
|
|
10766
|
+
function Lc() {
|
|
10662
10767
|
const t = [];
|
|
10663
|
-
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;
|
|
10664
10769
|
}
|
|
10665
|
-
const ge = { name: "COMPUTE_FLOW_CATEGORY", callback:
|
|
10666
|
-
function
|
|
10770
|
+
const ge = { name: "COMPUTE_FLOW_CATEGORY", callback: Lc };
|
|
10771
|
+
function Bc() {
|
|
10667
10772
|
return Zt("func").length > 0;
|
|
10668
10773
|
}
|
|
10669
|
-
function
|
|
10774
|
+
function bc() {
|
|
10670
10775
|
const { activeObject: t, activeFunc: e } = I.compute, n = [];
|
|
10671
|
-
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;
|
|
10672
10777
|
}
|
|
10673
|
-
const Ae = { name: "COMPUTE_FUNC_CATEGORY", callback:
|
|
10674
|
-
function
|
|
10778
|
+
const Ae = { name: "COMPUTE_FUNC_CATEGORY", callback: bc };
|
|
10779
|
+
function Pc() {
|
|
10675
10780
|
const t = [];
|
|
10676
10781
|
return t.push(
|
|
10677
10782
|
C("compute_debug_trace_v1", [Mt("OBJECT")])
|
|
10678
10783
|
), t;
|
|
10679
10784
|
}
|
|
10680
|
-
const Ie = { name: "COMPUTE_MISC_CATEGORY", callback:
|
|
10785
|
+
const Ie = { name: "COMPUTE_MISC_CATEGORY", callback: Pc }, Be = {
|
|
10681
10786
|
kind: "category",
|
|
10682
10787
|
name: "%{BKY_CATEGORY_COLOR}",
|
|
10683
10788
|
categorystyle: "color_category",
|
|
@@ -11356,7 +11461,7 @@ const Ie = { name: "COMPUTE_MISC_CATEGORY", callback: Sc }, Be = {
|
|
|
11356
11461
|
type: "text_reverse_v1"
|
|
11357
11462
|
}
|
|
11358
11463
|
]
|
|
11359
|
-
},
|
|
11464
|
+
}, So = {
|
|
11360
11465
|
kind: "category",
|
|
11361
11466
|
name: "%{BKY_CATEGORY_TIME}",
|
|
11362
11467
|
categorystyle: "time_category",
|
|
@@ -11380,14 +11485,14 @@ const Ie = { name: "COMPUTE_MISC_CATEGORY", callback: Sc }, Be = {
|
|
|
11380
11485
|
}
|
|
11381
11486
|
}
|
|
11382
11487
|
]
|
|
11383
|
-
},
|
|
11488
|
+
}, Rc = {
|
|
11384
11489
|
kind: "categoryToolbox",
|
|
11385
11490
|
contents: [
|
|
11386
11491
|
{
|
|
11387
11492
|
kind: "category",
|
|
11388
11493
|
name: "%{BKY_CATEGORY_COMP}",
|
|
11389
11494
|
categorystyle: "misc_category",
|
|
11390
|
-
custom:
|
|
11495
|
+
custom: Co.name
|
|
11391
11496
|
},
|
|
11392
11497
|
{
|
|
11393
11498
|
kind: "category",
|
|
@@ -11408,7 +11513,7 @@ const Ie = { name: "COMPUTE_MISC_CATEGORY", callback: Sc }, Be = {
|
|
|
11408
11513
|
be,
|
|
11409
11514
|
Me,
|
|
11410
11515
|
Be,
|
|
11411
|
-
|
|
11516
|
+
So,
|
|
11412
11517
|
{
|
|
11413
11518
|
kind: "category",
|
|
11414
11519
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -11434,7 +11539,7 @@ const Ie = { name: "COMPUTE_MISC_CATEGORY", callback: Sc }, Be = {
|
|
|
11434
11539
|
custom: he.name
|
|
11435
11540
|
}
|
|
11436
11541
|
]
|
|
11437
|
-
},
|
|
11542
|
+
}, Dc = {
|
|
11438
11543
|
kind: "categoryToolbox",
|
|
11439
11544
|
contents: [
|
|
11440
11545
|
{
|
|
@@ -11481,7 +11586,7 @@ const Ie = { name: "COMPUTE_MISC_CATEGORY", callback: Sc }, Be = {
|
|
|
11481
11586
|
custom: ft.name
|
|
11482
11587
|
}
|
|
11483
11588
|
]
|
|
11484
|
-
},
|
|
11589
|
+
}, Mc = {
|
|
11485
11590
|
kind: "categoryToolbox",
|
|
11486
11591
|
contents: [
|
|
11487
11592
|
{
|
|
@@ -11528,7 +11633,7 @@ const Ie = { name: "COMPUTE_MISC_CATEGORY", callback: Sc }, Be = {
|
|
|
11528
11633
|
custom: ft.name
|
|
11529
11634
|
}
|
|
11530
11635
|
]
|
|
11531
|
-
},
|
|
11636
|
+
}, Uc = {
|
|
11532
11637
|
kind: "categoryToolbox",
|
|
11533
11638
|
contents: [
|
|
11534
11639
|
{
|
|
@@ -11559,14 +11664,14 @@ const Ie = { name: "COMPUTE_MISC_CATEGORY", callback: Sc }, Be = {
|
|
|
11559
11664
|
]
|
|
11560
11665
|
}
|
|
11561
11666
|
]
|
|
11562
|
-
},
|
|
11667
|
+
}, Vc = {
|
|
11563
11668
|
kind: "categoryToolbox",
|
|
11564
11669
|
contents: [
|
|
11565
11670
|
{
|
|
11566
11671
|
kind: "category",
|
|
11567
11672
|
name: "%{BKY_CATEGORY_PAGE}",
|
|
11568
11673
|
categorystyle: "misc_category",
|
|
11569
|
-
custom:
|
|
11674
|
+
custom: ko.name
|
|
11570
11675
|
},
|
|
11571
11676
|
{
|
|
11572
11677
|
kind: "category",
|
|
@@ -11587,7 +11692,7 @@ const Ie = { name: "COMPUTE_MISC_CATEGORY", callback: Sc }, Be = {
|
|
|
11587
11692
|
be,
|
|
11588
11693
|
Me,
|
|
11589
11694
|
Be,
|
|
11590
|
-
|
|
11695
|
+
So,
|
|
11591
11696
|
{
|
|
11592
11697
|
kind: "category",
|
|
11593
11698
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -11639,23 +11744,23 @@ const Ie = { name: "COMPUTE_MISC_CATEGORY", callback: Sc }, Be = {
|
|
|
11639
11744
|
wheel: !0
|
|
11640
11745
|
}
|
|
11641
11746
|
};
|
|
11642
|
-
function
|
|
11643
|
-
We.theme = o ? "dark" : "light", We.toolbox =
|
|
11644
|
-
const s =
|
|
11645
|
-
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;
|
|
11646
11751
|
}
|
|
11647
|
-
function
|
|
11752
|
+
function Yc(t, e) {
|
|
11648
11753
|
let n;
|
|
11649
|
-
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;
|
|
11650
11755
|
}
|
|
11651
|
-
function
|
|
11756
|
+
function Fc(t, e, n) {
|
|
11652
11757
|
function o({ name: s, callback: a }) {
|
|
11653
11758
|
t.registerToolboxCategoryCallback(s, () => a(e));
|
|
11654
11759
|
}
|
|
11655
|
-
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));
|
|
11656
11761
|
}
|
|
11657
|
-
function
|
|
11658
|
-
const { router: e } =
|
|
11762
|
+
function wc(t) {
|
|
11763
|
+
const { router: e } = yt;
|
|
11659
11764
|
t.registerButtonCallback("NO_COMPUTE", () => {
|
|
11660
11765
|
const n = e.resolve({
|
|
11661
11766
|
path: "/compute/" + Date.now()
|
|
@@ -11672,7 +11777,7 @@ function Vc(t) {
|
|
|
11672
11777
|
}, 100);
|
|
11673
11778
|
});
|
|
11674
11779
|
}
|
|
11675
|
-
function
|
|
11780
|
+
function Kc(t, e) {
|
|
11676
11781
|
const n = e.newBlock("json_root_v1");
|
|
11677
11782
|
n.initSvg(), n.render();
|
|
11678
11783
|
const o = (s, a) => {
|
|
@@ -11714,7 +11819,7 @@ function xc(t, e) {
|
|
|
11714
11819
|
new (O.get(O.FINISHED_LOADING))(e)
|
|
11715
11820
|
);
|
|
11716
11821
|
}
|
|
11717
|
-
function
|
|
11822
|
+
function $c(t) {
|
|
11718
11823
|
const e = (o) => {
|
|
11719
11824
|
if (!o)
|
|
11720
11825
|
return null;
|
|
@@ -11746,7 +11851,7 @@ function Yc(t) {
|
|
|
11746
11851
|
if (o.type === "json_root_v1")
|
|
11747
11852
|
return e(o);
|
|
11748
11853
|
}
|
|
11749
|
-
const
|
|
11854
|
+
const Hc = { class: "position-relative w-100 h-100" }, Gc = /* @__PURE__ */ pt({
|
|
11750
11855
|
__name: "index",
|
|
11751
11856
|
props: /* @__PURE__ */ ze({
|
|
11752
11857
|
type: {},
|
|
@@ -11762,7 +11867,7 @@ const Fc = { class: "position-relative w-100 h-100" }, wc = /* @__PURE__ */ pt({
|
|
|
11762
11867
|
emits: /* @__PURE__ */ ze(["ready"], ["update:lock", "update:scale"]),
|
|
11763
11868
|
setup(t, { expose: e, emit: n }) {
|
|
11764
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 = {};
|
|
11765
|
-
|
|
11870
|
+
za(p);
|
|
11766
11871
|
const f = Pt(!0), T = Pt(!1), E = $(() => t.type === "json" ? "tree" : "list"), y = $(() => ({
|
|
11767
11872
|
width: "100%",
|
|
11768
11873
|
height: "calc(100% - 48px)"
|
|
@@ -11772,7 +11877,7 @@ const Fc = { class: "position-relative w-100 h-100" }, wc = /* @__PURE__ */ pt({
|
|
|
11772
11877
|
bottom: "0px",
|
|
11773
11878
|
width: "100%",
|
|
11774
11879
|
height: "48px"
|
|
11775
|
-
})),
|
|
11880
|
+
})), R = $(() => ({
|
|
11776
11881
|
position: "absolute",
|
|
11777
11882
|
background: t.dark ? "#0000007f" : "#ffffff7f",
|
|
11778
11883
|
top: "1px",
|
|
@@ -11807,26 +11912,26 @@ const Fc = { class: "position-relative w-100 h-100" }, wc = /* @__PURE__ */ pt({
|
|
|
11807
11912
|
left: 0,
|
|
11808
11913
|
zIndex: 3e3
|
|
11809
11914
|
})), { open: xt } = rn(`blocklyEditorFlyout${Ze()}`);
|
|
11810
|
-
|
|
11915
|
+
Nn(async () => {
|
|
11811
11916
|
if (!l.value || !d.value) {
|
|
11812
11917
|
console.assert(!1);
|
|
11813
11918
|
return;
|
|
11814
11919
|
}
|
|
11815
|
-
|
|
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);
|
|
11816
11921
|
const b = document.querySelector(`#${c} .blocklyFlyout`);
|
|
11817
11922
|
new MutationObserver((xe) => {
|
|
11818
11923
|
xe.forEach((ee) => {
|
|
11819
11924
|
ee.type === "attributes" && ee.attributeName === "style" && (xt.value = p.workspace.getFlyout().isVisible());
|
|
11820
11925
|
});
|
|
11821
|
-
}).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");
|
|
11822
11927
|
}), Ln(() => {
|
|
11823
11928
|
xt.value = !1;
|
|
11824
|
-
}),
|
|
11825
|
-
p.workspace &&
|
|
11929
|
+
}), zo(l, () => {
|
|
11930
|
+
p.workspace && Zo(p.workspace);
|
|
11826
11931
|
});
|
|
11827
11932
|
async function No(b) {
|
|
11828
11933
|
if (b.type === O.FINISHED_LOADING) {
|
|
11829
|
-
|
|
11934
|
+
yo(), setTimeout(() => {
|
|
11830
11935
|
h.value?.update();
|
|
11831
11936
|
}, 0), f.value = !1;
|
|
11832
11937
|
return;
|
|
@@ -11841,19 +11946,19 @@ const Fc = { class: "position-relative w-100 h-100" }, wc = /* @__PURE__ */ pt({
|
|
|
11841
11946
|
}, 0);
|
|
11842
11947
|
}
|
|
11843
11948
|
}
|
|
11844
|
-
const
|
|
11845
|
-
f.value = !0, t.type === "json" ?
|
|
11846
|
-
},
|
|
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 = () => {
|
|
11847
11952
|
if (t.type === "json")
|
|
11848
11953
|
console.assert(!1);
|
|
11849
11954
|
else
|
|
11850
11955
|
return i.workspaceToCode(p.workspace);
|
|
11851
|
-
},
|
|
11956
|
+
}, Po = () => Qa(p.workspace), En = () => {
|
|
11852
11957
|
p.workspace.setIsReadOnly(s.value), p.workspace.isReadOnly() && (xt.value = !1);
|
|
11853
11958
|
}, gn = () => {
|
|
11854
11959
|
p.workspace.setScale(a.value);
|
|
11855
|
-
},
|
|
11856
|
-
p.workspace.fireChangeListener(new
|
|
11960
|
+
}, Ro = () => {
|
|
11961
|
+
p.workspace.fireChangeListener(new no());
|
|
11857
11962
|
}, An = () => {
|
|
11858
11963
|
u.value?.cleanWorkspace();
|
|
11859
11964
|
}, In = () => {
|
|
@@ -11861,7 +11966,7 @@ const Fc = { class: "position-relative w-100 h-100" }, wc = /* @__PURE__ */ pt({
|
|
|
11861
11966
|
}, yn = () => {
|
|
11862
11967
|
h.value && (h.value.open = !0);
|
|
11863
11968
|
};
|
|
11864
|
-
return
|
|
11969
|
+
return Nn(() => {
|
|
11865
11970
|
Bt.on("cleanWorkspace", An), Bt.on("toggleBlocklyLock", In), Bt.on("openBlocklyNavigator", yn);
|
|
11866
11971
|
}), Ln(() => {
|
|
11867
11972
|
Bt.off("cleanWorkspace", An), Bt.off("toggleBlocklyLock", In), Bt.off("openBlocklyNavigator", yn);
|
|
@@ -11873,7 +11978,7 @@ const Fc = { class: "position-relative w-100 h-100" }, wc = /* @__PURE__ */ pt({
|
|
|
11873
11978
|
), Yt(
|
|
11874
11979
|
() => t.dark,
|
|
11875
11980
|
(b) => {
|
|
11876
|
-
|
|
11981
|
+
Wa(b ? "dark" : "light");
|
|
11877
11982
|
}
|
|
11878
11983
|
), Yt(xt, (b) => {
|
|
11879
11984
|
b || p.workspace?.hideChaff();
|
|
@@ -11883,14 +11988,14 @@ const Fc = { class: "position-relative w-100 h-100" }, wc = /* @__PURE__ */ pt({
|
|
|
11883
11988
|
gn();
|
|
11884
11989
|
}), e({
|
|
11885
11990
|
loading: f,
|
|
11886
|
-
load:
|
|
11887
|
-
save:
|
|
11888
|
-
generateCode:
|
|
11889
|
-
generateReactivity:
|
|
11890
|
-
fireStateChange:
|
|
11891
|
-
}), (b,
|
|
11991
|
+
load: Lo,
|
|
11992
|
+
save: Bo,
|
|
11993
|
+
generateCode: bo,
|
|
11994
|
+
generateReactivity: Po,
|
|
11995
|
+
fireStateChange: Ro
|
|
11996
|
+
}), (b, Ct) => {
|
|
11892
11997
|
const xe = F("v-icon"), ee = F("x-loading");
|
|
11893
|
-
return
|
|
11998
|
+
return M(), it("div", Hc, [
|
|
11894
11999
|
X("div", {
|
|
11895
12000
|
id: c,
|
|
11896
12001
|
ref_key: "blocklyDiv",
|
|
@@ -11900,44 +12005,44 @@ const Fc = { class: "position-relative w-100 h-100" }, wc = /* @__PURE__ */ pt({
|
|
|
11900
12005
|
X("div", {
|
|
11901
12006
|
style: z(k.value)
|
|
11902
12007
|
}, [
|
|
11903
|
-
|
|
12008
|
+
gs(b.$slots, "bottom")
|
|
11904
12009
|
], 4),
|
|
11905
|
-
T.value ? (
|
|
12010
|
+
T.value ? (M(), it("div", {
|
|
11906
12011
|
key: 0,
|
|
11907
12012
|
class: "d-flex flex-column justify-center align-center",
|
|
11908
|
-
style: z(
|
|
12013
|
+
style: z(R.value)
|
|
11909
12014
|
}, [
|
|
11910
|
-
|
|
12015
|
+
D(xe, {
|
|
11911
12016
|
icon: "mdi-delete",
|
|
11912
12017
|
size: "x-large"
|
|
11913
12018
|
})
|
|
11914
12019
|
], 4)) : dt("", !0),
|
|
11915
|
-
f.value ? dt("", !0) : (
|
|
12020
|
+
f.value ? dt("", !0) : (M(), it("div", {
|
|
11916
12021
|
key: 1,
|
|
11917
12022
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
11918
12023
|
style: z(Lt.value)
|
|
11919
12024
|
}, [
|
|
11920
|
-
|
|
12025
|
+
D(Za, {
|
|
11921
12026
|
ref_key: "clean",
|
|
11922
12027
|
ref: u,
|
|
11923
12028
|
lock: s.value
|
|
11924
12029
|
}, null, 8, ["lock"]),
|
|
11925
|
-
|
|
12030
|
+
D(tc, {
|
|
11926
12031
|
modelValue: s.value,
|
|
11927
|
-
"onUpdate:modelValue":
|
|
12032
|
+
"onUpdate:modelValue": Ct[0] || (Ct[0] = (Do) => s.value = Do)
|
|
11928
12033
|
}, null, 8, ["modelValue"]),
|
|
11929
|
-
|
|
12034
|
+
D(_c, {
|
|
11930
12035
|
ref_key: "navigator",
|
|
11931
12036
|
ref: h,
|
|
11932
12037
|
lock: s.value,
|
|
11933
12038
|
type: E.value
|
|
11934
12039
|
}, null, 8, ["lock", "type"])
|
|
11935
12040
|
], 4)),
|
|
11936
|
-
s.value ? (
|
|
12041
|
+
s.value ? (M(), it("div", {
|
|
11937
12042
|
key: 2,
|
|
11938
12043
|
style: z(Q.value)
|
|
11939
12044
|
}, null, 4)) : dt("", !0),
|
|
11940
|
-
s.value ? (
|
|
12045
|
+
s.value ? (M(), it("div", {
|
|
11941
12046
|
key: 3,
|
|
11942
12047
|
style: z(Ve.value)
|
|
11943
12048
|
}, null, 4)) : dt("", !0),
|
|
@@ -11946,31 +12051,31 @@ const Fc = { class: "position-relative w-100 h-100" }, wc = /* @__PURE__ */ pt({
|
|
|
11946
12051
|
ref: d,
|
|
11947
12052
|
style: z(Tn.value)
|
|
11948
12053
|
}, null, 4),
|
|
11949
|
-
|
|
12054
|
+
D(ee, {
|
|
11950
12055
|
open: f.value,
|
|
11951
12056
|
"z-index": 99
|
|
11952
12057
|
}, null, 8, ["open"])
|
|
11953
12058
|
]);
|
|
11954
12059
|
};
|
|
11955
12060
|
}
|
|
11956
|
-
}),
|
|
12061
|
+
}), Wc = /* @__PURE__ */ pt({
|
|
11957
12062
|
__name: "index",
|
|
11958
12063
|
props: {
|
|
11959
12064
|
code: {}
|
|
11960
12065
|
},
|
|
11961
12066
|
setup(t) {
|
|
11962
12067
|
const e = t;
|
|
11963
|
-
|
|
11964
|
-
const n =
|
|
12068
|
+
ts.registerLanguage("javascript", es);
|
|
12069
|
+
const n = ns.component, { backgroundColor2: o } = Jt();
|
|
11965
12070
|
return (s, a) => {
|
|
11966
12071
|
const r = F("v-sheet");
|
|
11967
|
-
return
|
|
12072
|
+
return M(), ut(r, {
|
|
11968
12073
|
color: Y(o),
|
|
11969
12074
|
height: "100%",
|
|
11970
12075
|
width: "100%"
|
|
11971
12076
|
}, {
|
|
11972
12077
|
default: lt(() => [
|
|
11973
|
-
|
|
12078
|
+
D(Y(n), {
|
|
11974
12079
|
code: e.code,
|
|
11975
12080
|
language: "js"
|
|
11976
12081
|
}, null, 8, ["code"])
|
|
@@ -11979,10 +12084,10 @@ const Fc = { class: "position-relative w-100 h-100" }, wc = /* @__PURE__ */ pt({
|
|
|
11979
12084
|
}, 8, ["color"]);
|
|
11980
12085
|
};
|
|
11981
12086
|
}
|
|
11982
|
-
}),
|
|
12087
|
+
}), jc = { class: "text-subtitle-1" }, Xc = { class: "w-100 h-100 overflow-auto" }, Jc = /* @__PURE__ */ pt({
|
|
11983
12088
|
__name: "index",
|
|
11984
12089
|
setup(t) {
|
|
11985
|
-
const { t: e } = Qt(), { sysBarAvail: n } =
|
|
12090
|
+
const { t: e } = Qt(), { sysBarAvail: n } = Jn(), { backgroundColor0: o, backgroundColor2: s } = Jt(), a = Pt(""), r = $(() => {
|
|
11986
12091
|
let d = 48;
|
|
11987
12092
|
return n.value && (d += 24), {
|
|
11988
12093
|
position: "relative",
|
|
@@ -11993,49 +12098,49 @@ const Fc = { class: "position-relative w-100 h-100" }, wc = /* @__PURE__ */ pt({
|
|
|
11993
12098
|
}, { open: l } = rn("sourceDlg", c);
|
|
11994
12099
|
return (d, u) => {
|
|
11995
12100
|
const h = F("v-sheet"), p = F("v-btn"), f = F("v-spacer"), T = F("v-dialog");
|
|
11996
|
-
return
|
|
12101
|
+
return M(), ut(T, {
|
|
11997
12102
|
modelValue: Y(l),
|
|
11998
12103
|
"onUpdate:modelValue": u[1] || (u[1] = (E) => oe(l) ? l.value = E : null),
|
|
11999
12104
|
fullscreen: "",
|
|
12000
12105
|
"no-click-animation": "",
|
|
12001
12106
|
persistent: "",
|
|
12002
12107
|
transition: "dialog-bottom-transition",
|
|
12003
|
-
onKeydown: u[2] || (u[2] =
|
|
12108
|
+
onKeydown: u[2] || (u[2] = eo(Kt((E) => l.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
12004
12109
|
}, {
|
|
12005
12110
|
default: lt(() => [
|
|
12006
|
-
|
|
12111
|
+
D(h, {
|
|
12007
12112
|
color: Y(o),
|
|
12008
12113
|
height: "100%",
|
|
12009
12114
|
width: "100%"
|
|
12010
12115
|
}, {
|
|
12011
12116
|
default: lt(() => [
|
|
12012
|
-
Y(n) ? (
|
|
12117
|
+
Y(n) ? (M(), ut(h, {
|
|
12013
12118
|
key: 0,
|
|
12014
12119
|
color: Y(s),
|
|
12015
12120
|
height: 24
|
|
12016
12121
|
}, null, 8, ["color"])) : dt("", !0),
|
|
12017
|
-
|
|
12122
|
+
D(h, {
|
|
12018
12123
|
class: "d-flex align-center px-2",
|
|
12019
12124
|
color: Y(s),
|
|
12020
12125
|
height: 48
|
|
12021
12126
|
}, {
|
|
12022
12127
|
default: lt(() => [
|
|
12023
|
-
|
|
12128
|
+
D(p, {
|
|
12024
12129
|
density: "comfortable",
|
|
12025
12130
|
icon: "mdi-close",
|
|
12026
12131
|
variant: "text",
|
|
12027
12132
|
onClick: u[0] || (u[0] = (E) => l.value = !1)
|
|
12028
12133
|
}),
|
|
12029
|
-
X("span",
|
|
12030
|
-
|
|
12134
|
+
X("span", jc, Gt(Y(e)("x-block-lib.dlg.source.title")), 1),
|
|
12135
|
+
D(f)
|
|
12031
12136
|
]),
|
|
12032
12137
|
_: 1
|
|
12033
12138
|
}, 8, ["color"]),
|
|
12034
12139
|
X("div", {
|
|
12035
12140
|
style: z(r.value)
|
|
12036
12141
|
}, [
|
|
12037
|
-
X("div",
|
|
12038
|
-
|
|
12142
|
+
X("div", Xc, [
|
|
12143
|
+
D(Wc, { code: a.value }, null, 8, ["code"])
|
|
12039
12144
|
])
|
|
12040
12145
|
], 4)
|
|
12041
12146
|
]),
|
|
@@ -12046,16 +12151,16 @@ const Fc = { class: "position-relative w-100 h-100" }, wc = /* @__PURE__ */ pt({
|
|
|
12046
12151
|
}, 8, ["modelValue"]);
|
|
12047
12152
|
};
|
|
12048
12153
|
}
|
|
12049
|
-
}),
|
|
12050
|
-
t.component("XBlockly",
|
|
12154
|
+
}), qc = (t) => {
|
|
12155
|
+
t.component("XBlockly", Gc), t.component("XSourceDlg", Jc);
|
|
12051
12156
|
};
|
|
12052
|
-
async function
|
|
12053
|
-
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;
|
|
12054
12159
|
}
|
|
12055
|
-
const
|
|
12160
|
+
const ir = { install: qc };
|
|
12056
12161
|
export {
|
|
12057
|
-
|
|
12058
|
-
|
|
12059
|
-
|
|
12060
|
-
|
|
12162
|
+
Gc as XBlockly,
|
|
12163
|
+
ir as default,
|
|
12164
|
+
qc as install,
|
|
12165
|
+
sr as loadLocaleMessageBlock
|
|
12061
12166
|
};
|