x-block-lib 0.7.16 → 0.7.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
License: see project LICENSE
|
|
8
8
|
Touched: 2021
|
|
9
9
|
*/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-2ba1be08]{opacity:.4;pointer-events:none}.blocklyToolbox{overflow-x:hidden;width:56px}.blocklyMainBackground{stroke-width:0}.blocklyToolboxCategory{margin-bottom:18px!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(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
10
|
-
import { provide as
|
|
11
|
-
import { d as h, j as s, O as c, f as
|
|
12
|
-
import { globalObjects as ie, openConfirmDlg as
|
|
13
|
-
import { elements as x, pkgs as Re, getPropTag as
|
|
10
|
+
import { provide as Zn, inject as eo, defineComponent as oe, resolveComponent as V, createBlock as Z, openBlock as D, unref as P, withCtx as ee, createVNode as B, mergeProps as wt, useModel as Be, ref as Ee, computed as K, resolveDirective as to, withDirectives as no, createElementBlock as Q, normalizeStyle as W, createElementVNode as j, toDisplayString as st, withModifiers as Ne, mergeModels as Lt, Fragment as rn, renderList as oo, useId as St, onUnmounted as _n, useTemplateRef as Le, withKeys as pn, isRef as We, createCommentVNode as de, onMounted as zt, nextTick as io, onBeforeUnmount as so, watch as ve, renderSlot as ao } from "vue";
|
|
11
|
+
import { d as h, j as s, O as c, f as co, F as hn, M as _, E, r as Zt, u as v, s as lo, X as Kt, B as d, i as U, a as k, c as Se, b as bt, e as $, g as fe, h as ue, p as be, k as z, l as en, m as R, C as dn, N as te, n as uo, P as Bt, V as Te, o as Ve, q as fn, t as ro, v as _o, w as po, S as ho, x as fo, y as mo, T as at, z as mn, A as To, D as Eo, G as Tn, H as go, I as Io, J as Ao, K as Oo, L as Co, Q as ko, R as vo, U as yo } from "./vendor.gwcdj52j.js";
|
|
12
|
+
import { globalObjects as ie, openConfirmDlg as No, openPromptDlg as Lo, messageWarning as En, useColor as xe, useSystem as gn, useViewStack as $t } from "x-essential-lib";
|
|
13
|
+
import { elements as x, pkgs as Re, getPropTag as ct, parsePixelStr as So, parsePercentStr as bo } from "x-runtime-lib";
|
|
14
14
|
import { globalState as T } from "x-state-lib";
|
|
15
15
|
import { useI18n as Fe } from "vue-i18n";
|
|
16
|
-
import { useDisplay as
|
|
16
|
+
import { useDisplay as Bo } from "vuetify";
|
|
17
17
|
h([
|
|
18
18
|
{
|
|
19
19
|
type: "app_debug_trace_v1",
|
|
@@ -58,7 +58,7 @@ h([
|
|
|
58
58
|
s.forBlock.app_env_v1 = function(t) {
|
|
59
59
|
return [`__getEnvV1__() === ${s.quote_(t.getFieldValue("ENV"))}`, c.ATOMIC];
|
|
60
60
|
};
|
|
61
|
-
class m extends
|
|
61
|
+
class m extends hn {
|
|
62
62
|
constructor(e, n, o) {
|
|
63
63
|
super(e, n, o);
|
|
64
64
|
}
|
|
@@ -115,25 +115,25 @@ class m extends pn {
|
|
|
115
115
|
return "<n/a>";
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
|
|
118
|
+
co.register("field_dropdown2", m);
|
|
119
119
|
var L = /* @__PURE__ */ ((t) => (t.STATE_CHANGE = "state_change", t))(L || {});
|
|
120
|
-
class
|
|
120
|
+
class In extends E.Abstract {
|
|
121
121
|
isBlank = !0;
|
|
122
122
|
}
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
Zt.register(
|
|
124
|
+
Zt.Type.EVENT,
|
|
125
125
|
"state_change",
|
|
126
|
-
|
|
126
|
+
In
|
|
127
127
|
);
|
|
128
|
-
const ge = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==",
|
|
129
|
-
function
|
|
128
|
+
const ge = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", Je = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
|
|
129
|
+
function lt(t) {
|
|
130
130
|
const e = t.lastIndexOf("V");
|
|
131
131
|
if (e <= 0 || e >= t.length - 1)
|
|
132
132
|
return console.assert(!1, `invalid key=${t}`), "";
|
|
133
|
-
const n =
|
|
133
|
+
const n = lo(t.substring(0, e - 1)), o = "v" + t.substring(e + 1);
|
|
134
134
|
return `${n}_${o}`;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function qe(t) {
|
|
137
137
|
const e = t.lastIndexOf("V");
|
|
138
138
|
if (e <= 0 || e >= t.length - 1)
|
|
139
139
|
return console.assert(!1, `invalid key=${t}`), "";
|
|
@@ -157,65 +157,71 @@ function S(t) {
|
|
|
157
157
|
} else t.type === "comp" ? e = '<shadow type="select_comp_v1"></shadow>' : console.assert(!1, "invalid param type", t.type);
|
|
158
158
|
return v.xml.textToDom(e);
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function Ro(t) {
|
|
161
161
|
let e = 0;
|
|
162
162
|
for (; t; )
|
|
163
163
|
e++, t = t.getParent();
|
|
164
164
|
return e;
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function je(t) {
|
|
167
167
|
const e = `<block type="text_v1"><field name="TEXT">${t}</field></block>`;
|
|
168
168
|
return v.xml.textToDom(e);
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function Rt(t) {
|
|
171
171
|
const e = `<block type="math_number_v1"><field name="NUM">${t}</field></block>`;
|
|
172
172
|
return v.xml.textToDom(e);
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function An(t) {
|
|
175
175
|
const e = `<block type="logic_boolean_v1"><field name="BOOL">${t ? "TRUE" : "FALSE"}</field></block>`;
|
|
176
176
|
return v.xml.textToDom(e);
|
|
177
177
|
}
|
|
178
|
-
function
|
|
179
|
-
const e = `<block type="${
|
|
178
|
+
function Do(t) {
|
|
179
|
+
const e = `<block type="${lt(t)}"></block>`;
|
|
180
180
|
return v.xml.textToDom(e);
|
|
181
181
|
}
|
|
182
|
-
function
|
|
183
|
-
const e = `<block type="${
|
|
182
|
+
function Uo(t) {
|
|
183
|
+
const e = `<block type="${lt(t)}"></block>`;
|
|
184
184
|
return v.xml.textToDom(e);
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function Mo() {
|
|
187
187
|
return v.xml.textToDom('<block type="select_comp_v1"></block>');
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function Po(t) {
|
|
190
190
|
const e = `<block type="color_picker_v1"><field name="COLOR">${t}</field></block>`;
|
|
191
191
|
return v.xml.textToDom(e);
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function Vo(t) {
|
|
194
194
|
let e = null;
|
|
195
|
-
return t.ui === "dummy" ? console.assert(!0) : t.ui === "strInput" ? e =
|
|
195
|
+
return t.ui === "dummy" ? console.assert(!0) : t.ui === "strInput" ? e = je(t.default) : t.ui === "numInput" ? e = Rt(t.default) : t.ui === "switch" ? e = An(t.default) : t.ui === "select" ? e = Do(t.items) : t.ui === "multiTypes" ? e = Uo(t.types) : t.ui === "compSelect" ? e = Mo() : t.ui === "colorPicker" ? e = Po(t.default ?? "#ff0000") : console.assert(!1), e;
|
|
196
196
|
}
|
|
197
|
-
function
|
|
198
|
-
const n =
|
|
199
|
-
return n ?
|
|
197
|
+
function On(t, e) {
|
|
198
|
+
const n = Vo(e);
|
|
199
|
+
return n ? Kt.domToBlock(n, t) : null;
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function xo(t) {
|
|
202
202
|
let e = null;
|
|
203
|
-
return t === "string" ? e =
|
|
203
|
+
return t === "string" ? e = je("") : t === "integer" || t === "float" ? e = Rt(0) : t === "boolean" ? e = An(!1) : t === "enum" || t === "dateTime" ? e = je("") : console.assert(!1), e;
|
|
204
|
+
}
|
|
205
|
+
function Dt(t, e) {
|
|
206
|
+
const n = xo(e);
|
|
207
|
+
return n ? Kt.domToBlock(n, t) : null;
|
|
208
|
+
}
|
|
209
|
+
function Ye(t) {
|
|
210
|
+
return t === "string" ? "String" : t === "number" ? "Number" : t === "boolean" ? "Boolean" : t === "list" ? "Array" : t === "object" ? "Object" : (console.assert(!1), null);
|
|
204
211
|
}
|
|
205
|
-
function
|
|
206
|
-
|
|
207
|
-
return n ? wt.domToBlock(n, t) : null;
|
|
212
|
+
function Cn(t) {
|
|
213
|
+
return t.ui === "dummy" ? null : t.ui === "strInput" ? "String" : t.ui === "numInput" ? "Number" : t.ui === "switch" ? "Boolean" : t.ui === "select" ? qe(t.items) : t.ui === "multiTypes" ? qe(t.types) : t.ui === "compSelect" ? "Comp" : t.ui === "colorPicker" ? "Color" : (console.assert(!1), null);
|
|
208
214
|
}
|
|
209
|
-
function
|
|
210
|
-
return t
|
|
215
|
+
function kn(t) {
|
|
216
|
+
return t === "string" ? "String" : t === "integer" || t === "float" ? "Number" : t === "boolean" ? "Boolean" : t === "enum" || t === "dateTime" ? "String" : (console.assert(!1), null);
|
|
211
217
|
}
|
|
212
|
-
function
|
|
218
|
+
function Ht(t, e, n, o) {
|
|
213
219
|
const i = `
|
|
214
220
|
<block type="parameter_v1">
|
|
215
221
|
<mutation key="${e}" name="${n}" locale="${o ? "TRUE" : "FALSE"}"/>
|
|
216
222
|
</block>
|
|
217
223
|
`, a = v.xml.textToDom(i);
|
|
218
|
-
return
|
|
224
|
+
return Kt.domToBlock(a, t);
|
|
219
225
|
}
|
|
220
226
|
function F(t, e) {
|
|
221
227
|
try {
|
|
@@ -230,7 +236,7 @@ function F(t, e) {
|
|
|
230
236
|
return;
|
|
231
237
|
r.dispose();
|
|
232
238
|
}
|
|
233
|
-
r =
|
|
239
|
+
r = Ht(
|
|
234
240
|
t.workspace,
|
|
235
241
|
i,
|
|
236
242
|
a,
|
|
@@ -241,7 +247,7 @@ function F(t, e) {
|
|
|
241
247
|
E.enable();
|
|
242
248
|
}
|
|
243
249
|
}
|
|
244
|
-
function
|
|
250
|
+
function we(t) {
|
|
245
251
|
const { version: e } = T.app.activeObject;
|
|
246
252
|
if (!Re[e])
|
|
247
253
|
return console.assert(!1, "invalid pkg version", e), [];
|
|
@@ -259,42 +265,42 @@ function re(t) {
|
|
|
259
265
|
}
|
|
260
266
|
function Ae(t) {
|
|
261
267
|
const { i18n: e } = ie, n = [];
|
|
262
|
-
return
|
|
268
|
+
return we(t).forEach(({ key: i, name: a }) => {
|
|
263
269
|
n.push([e.global.t(a), i]);
|
|
264
270
|
}), N(n);
|
|
265
271
|
}
|
|
266
|
-
function
|
|
272
|
+
function Ut(t) {
|
|
267
273
|
const e = x[t];
|
|
268
274
|
return e ? e.events : [];
|
|
269
275
|
}
|
|
270
|
-
function
|
|
276
|
+
function It(t, e) {
|
|
271
277
|
const n = x[t];
|
|
272
278
|
if (n)
|
|
273
279
|
return n.events.find((o) => o.key === e);
|
|
274
280
|
}
|
|
275
|
-
function
|
|
281
|
+
function Fo(t) {
|
|
276
282
|
const e = [];
|
|
277
|
-
return
|
|
283
|
+
return Ut(t).forEach(({ key: o, name: i }) => {
|
|
278
284
|
e.push([_[i] ?? i, o]);
|
|
279
285
|
}), N(e);
|
|
280
286
|
}
|
|
281
|
-
function
|
|
287
|
+
function Mt(t) {
|
|
282
288
|
const e = x[t];
|
|
283
289
|
return e ? e.methods : [];
|
|
284
290
|
}
|
|
285
|
-
function
|
|
291
|
+
function At(t, e) {
|
|
286
292
|
const n = x[t];
|
|
287
293
|
if (n)
|
|
288
294
|
return n.methods.find((o) => o.key === e);
|
|
289
295
|
}
|
|
290
|
-
function
|
|
296
|
+
function Yo(t) {
|
|
291
297
|
const e = [];
|
|
292
|
-
return
|
|
298
|
+
return Mt(t).forEach(({ key: o, name: i }) => {
|
|
293
299
|
e.push([_[i] ?? i, o]);
|
|
294
300
|
}), N(e);
|
|
295
301
|
}
|
|
296
302
|
function De(t, e) {
|
|
297
|
-
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a =
|
|
303
|
+
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a = ct(o, i);
|
|
298
304
|
if (!a)
|
|
299
305
|
return console.assert(!1, "invalid prop tag", o, i), [];
|
|
300
306
|
if (!x[t])
|
|
@@ -305,14 +311,14 @@ function De(t, e) {
|
|
|
305
311
|
}), u;
|
|
306
312
|
}
|
|
307
313
|
function se(t, e) {
|
|
308
|
-
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a =
|
|
314
|
+
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a = ct(o, i);
|
|
309
315
|
if (!a) {
|
|
310
316
|
console.assert(!1, "invalid prop tag", o, i);
|
|
311
317
|
return;
|
|
312
318
|
}
|
|
313
319
|
return n[t]?.[a]?.find((l) => l.keys === e);
|
|
314
320
|
}
|
|
315
|
-
function
|
|
321
|
+
function vn(t, e) {
|
|
316
322
|
const { i18n: n } = ie, o = [];
|
|
317
323
|
return De(t, e).forEach(({ keys: a, names: l }) => {
|
|
318
324
|
let u = "";
|
|
@@ -341,7 +347,7 @@ function Ce(t) {
|
|
|
341
347
|
function Y(t) {
|
|
342
348
|
return T.app.activeObject.nodes.find((e) => e.id === t);
|
|
343
349
|
}
|
|
344
|
-
function
|
|
350
|
+
function Ke(t) {
|
|
345
351
|
const { i18n: e } = ie, n = [];
|
|
346
352
|
return Ce(t).forEach(({ id: i, key: a, alias: l }) => {
|
|
347
353
|
const u = x[a];
|
|
@@ -353,14 +359,14 @@ function we(t) {
|
|
|
353
359
|
l && (r += ` / ${l}`), n.push([r, i]);
|
|
354
360
|
}), N(n);
|
|
355
361
|
}
|
|
356
|
-
function
|
|
362
|
+
function Pt(t) {
|
|
357
363
|
const e = Y(t);
|
|
358
364
|
if (!e)
|
|
359
365
|
return [];
|
|
360
366
|
const n = x[e.key];
|
|
361
367
|
return n ? n.events : (console.assert(!1, "invalid element", e.key), []);
|
|
362
368
|
}
|
|
363
|
-
function
|
|
369
|
+
function Ot(t, e) {
|
|
364
370
|
const n = Y(t);
|
|
365
371
|
if (!n)
|
|
366
372
|
return;
|
|
@@ -371,20 +377,20 @@ function At(t, e) {
|
|
|
371
377
|
}
|
|
372
378
|
return o.events.find((i) => i.key === e);
|
|
373
379
|
}
|
|
374
|
-
function
|
|
380
|
+
function wo(t) {
|
|
375
381
|
const e = [];
|
|
376
|
-
return
|
|
382
|
+
return Pt(t).forEach(({ key: o, name: i }) => {
|
|
377
383
|
e.push([_[i] ?? i, o]);
|
|
378
384
|
}), N(e);
|
|
379
385
|
}
|
|
380
|
-
function
|
|
386
|
+
function Vt(t) {
|
|
381
387
|
const e = Y(t);
|
|
382
388
|
if (!e)
|
|
383
389
|
return [];
|
|
384
390
|
const n = x[e.key];
|
|
385
391
|
return n ? n.methods : (console.assert(!1, "invalid element", e.key), []);
|
|
386
392
|
}
|
|
387
|
-
function
|
|
393
|
+
function Ct(t, e) {
|
|
388
394
|
const n = Y(t);
|
|
389
395
|
if (!n)
|
|
390
396
|
return;
|
|
@@ -395,14 +401,14 @@ function Ot(t, e) {
|
|
|
395
401
|
}
|
|
396
402
|
return o.methods.find((i) => i.key === e);
|
|
397
403
|
}
|
|
398
|
-
function
|
|
404
|
+
function Ko(t) {
|
|
399
405
|
const e = [];
|
|
400
|
-
return
|
|
406
|
+
return Vt(t).forEach(({ key: o, name: i }) => {
|
|
401
407
|
e.push([_[i] ?? i, o]);
|
|
402
408
|
}), N(e);
|
|
403
409
|
}
|
|
404
410
|
function Ue(t, e) {
|
|
405
|
-
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a = [], l =
|
|
411
|
+
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a = [], l = ct(o, i);
|
|
406
412
|
if (!l)
|
|
407
413
|
return console.assert(!1, "invalid prop tag", o, i), a;
|
|
408
414
|
const u = Y(t);
|
|
@@ -411,7 +417,7 @@ function Ue(t, e) {
|
|
|
411
417
|
}), a) : (console.assert(!1, "invalid element", u.key), a) : a;
|
|
412
418
|
}
|
|
413
419
|
function ae(t, e) {
|
|
414
|
-
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a =
|
|
420
|
+
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a = ct(o, i);
|
|
415
421
|
if (!a) {
|
|
416
422
|
console.assert(!1, "invalid prop tag", o, i);
|
|
417
423
|
return;
|
|
@@ -420,7 +426,7 @@ function ae(t, e) {
|
|
|
420
426
|
if (l)
|
|
421
427
|
return n[l.key]?.[a]?.find((u) => u.keys === e);
|
|
422
428
|
}
|
|
423
|
-
function
|
|
429
|
+
function yn(t, e) {
|
|
424
430
|
const { i18n: n } = ie, o = [];
|
|
425
431
|
return Ue(t, e).forEach(({ keys: a, names: l }) => {
|
|
426
432
|
let u = "";
|
|
@@ -429,7 +435,7 @@ function kn(t, e) {
|
|
|
429
435
|
}), o.push([u, a]);
|
|
430
436
|
}), N(o);
|
|
431
437
|
}
|
|
432
|
-
const
|
|
438
|
+
const $o = {
|
|
433
439
|
init: function() {
|
|
434
440
|
this.node = {
|
|
435
441
|
id: "",
|
|
@@ -451,7 +457,7 @@ const wo = {
|
|
|
451
457
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
452
458
|
const e = this.getField("NODE");
|
|
453
459
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
454
|
-
const n =
|
|
460
|
+
const n = Vt(this.node.id)?.[0];
|
|
455
461
|
if (!n)
|
|
456
462
|
return;
|
|
457
463
|
this.method.key = n.key, this.method.name = n.name, this.method.inputs = n.inputs, this.method.outputs = n.outputs;
|
|
@@ -470,10 +476,10 @@ const wo = {
|
|
|
470
476
|
}, 0);
|
|
471
477
|
},
|
|
472
478
|
genNodeOpts_: function() {
|
|
473
|
-
return
|
|
479
|
+
return Ke("method");
|
|
474
480
|
},
|
|
475
481
|
genMethodOpts_: function() {
|
|
476
|
-
return
|
|
482
|
+
return Ko(this.node.id);
|
|
477
483
|
},
|
|
478
484
|
genElementOpts_: function() {
|
|
479
485
|
return Ae();
|
|
@@ -499,13 +505,13 @@ const wo = {
|
|
|
499
505
|
const n = this.node.key !== e.key;
|
|
500
506
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
501
507
|
const o = this.getField("METHOD");
|
|
502
|
-
if (o.getOptions(!1), n || !
|
|
503
|
-
const a =
|
|
508
|
+
if (o.getOptions(!1), n || !Ct(this.node.id, this.method.key)) {
|
|
509
|
+
const a = Vt(this.node.id)?.[0]?.key ?? "";
|
|
504
510
|
o.setValue(a), this.method.key === a && this.onMethodChange_(a);
|
|
505
511
|
}
|
|
506
512
|
},
|
|
507
513
|
onMethodChange_: function(t) {
|
|
508
|
-
const e =
|
|
514
|
+
const e = Ct(this.node.id, t);
|
|
509
515
|
e ? (this.method.key = e.key, this.method.name = e.name, this.method.inputs = e.inputs, this.method.outputs = e.outputs) : (this.method.key = "", this.method.name = "", this.method.inputs = [], this.method.outputs = []), this.updateShape_(), this.updateShape2_(), this.updateShadow_(), setTimeout(() => {
|
|
510
516
|
this.ensureBlocks_();
|
|
511
517
|
}, 0);
|
|
@@ -574,7 +580,7 @@ const wo = {
|
|
|
574
580
|
return;
|
|
575
581
|
}
|
|
576
582
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
577
|
-
const e =
|
|
583
|
+
const e = Ct(this.node.id, this.method.key);
|
|
578
584
|
if (!e) {
|
|
579
585
|
this.setWarningText(_.WARN_METHOD_NOT_FOUND);
|
|
580
586
|
return;
|
|
@@ -586,7 +592,7 @@ const wo = {
|
|
|
586
592
|
this.setWarningText(null);
|
|
587
593
|
}
|
|
588
594
|
};
|
|
589
|
-
d.call_node_method_v1 =
|
|
595
|
+
d.call_node_method_v1 = $o;
|
|
590
596
|
s.forBlock.call_node_method_v1 = function(t) {
|
|
591
597
|
const e = s.quote_, n = t;
|
|
592
598
|
let o = n.node.id;
|
|
@@ -609,7 +615,7 @@ ${a}}
|
|
|
609
615
|
`;
|
|
610
616
|
}
|
|
611
617
|
};
|
|
612
|
-
const
|
|
618
|
+
const Ho = {
|
|
613
619
|
init: function() {
|
|
614
620
|
this.element = {
|
|
615
621
|
key: "",
|
|
@@ -624,13 +630,13 @@ const Ko = {
|
|
|
624
630
|
initData_: function() {
|
|
625
631
|
if (this.element.key)
|
|
626
632
|
return;
|
|
627
|
-
const t =
|
|
633
|
+
const t = we("method")?.[0];
|
|
628
634
|
if (!t)
|
|
629
635
|
return;
|
|
630
636
|
this.element.key = t.key, this.element.name = t.name;
|
|
631
637
|
const e = this.getField("ELEMENT");
|
|
632
638
|
e.getOptions(!1), e.setValue(this.element.key);
|
|
633
|
-
const n =
|
|
639
|
+
const n = Mt(this.element.key)?.[0];
|
|
634
640
|
if (!n)
|
|
635
641
|
return;
|
|
636
642
|
this.method = Se(n);
|
|
@@ -652,7 +658,7 @@ const Ko = {
|
|
|
652
658
|
return Ae("method");
|
|
653
659
|
},
|
|
654
660
|
genMethodOpts_: function() {
|
|
655
|
-
return
|
|
661
|
+
return Yo(this.element.key);
|
|
656
662
|
},
|
|
657
663
|
onchange: function(t) {
|
|
658
664
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -675,13 +681,13 @@ const Ko = {
|
|
|
675
681
|
const n = this.element.key !== e.key;
|
|
676
682
|
this.element.key = e.key, this.element.name = e.name;
|
|
677
683
|
const o = this.getField("METHOD");
|
|
678
|
-
if (o.getOptions(!1), n || !
|
|
679
|
-
const a =
|
|
684
|
+
if (o.getOptions(!1), n || !At(this.element.key, this.method.key)) {
|
|
685
|
+
const a = Mt(this.element.key)?.[0]?.key ?? "";
|
|
680
686
|
o.setValue(a), this.method.key === a && this.onMethodChange_(a);
|
|
681
687
|
}
|
|
682
688
|
},
|
|
683
689
|
onMethodChange_: function(t) {
|
|
684
|
-
const e =
|
|
690
|
+
const e = At(this.element.key, t);
|
|
685
691
|
e ? (this.method.key = e.key, this.method.name = e.name, this.method.inputs = e.inputs, this.method.outputs = e.outputs) : (this.method.key = "", this.method.name = "", this.method.inputs = [], this.method.outputs = []), this.updateShape_(), this.updateShape2_(), this.updateShadow_(), setTimeout(() => {
|
|
686
692
|
this.ensureBlocks_();
|
|
687
693
|
}, 0);
|
|
@@ -743,7 +749,7 @@ const Ko = {
|
|
|
743
749
|
return;
|
|
744
750
|
}
|
|
745
751
|
this.element.name !== t.name && (this.element.name = t.name);
|
|
746
|
-
const e =
|
|
752
|
+
const e = At(this.element.key, this.method.key);
|
|
747
753
|
if (!e) {
|
|
748
754
|
this.setWarningText(_.WARN_METHOD_NOT_FOUND);
|
|
749
755
|
return;
|
|
@@ -755,7 +761,7 @@ const Ko = {
|
|
|
755
761
|
this.setWarningText(null);
|
|
756
762
|
}
|
|
757
763
|
};
|
|
758
|
-
d.call_node_method_as_v1 =
|
|
764
|
+
d.call_node_method_as_v1 = Ho;
|
|
759
765
|
s.forBlock.call_node_method_as_v1 = function(t) {
|
|
760
766
|
const e = s.quote_, n = t, o = s.valueToCode(n, "NODE", c.NONE) || "";
|
|
761
767
|
if (!o)
|
|
@@ -779,53 +785,53 @@ ${a}}
|
|
|
779
785
|
`;
|
|
780
786
|
}
|
|
781
787
|
};
|
|
782
|
-
function
|
|
788
|
+
function Go() {
|
|
783
789
|
return T.app.activeObject.type !== "comp" ? !1 : T.app.activeComp.meta.properties.length > 0 || T.app.activeComp.meta.methods.length > 0 || T.app.activeComp.meta.events.length > 0;
|
|
784
790
|
}
|
|
785
791
|
function Me() {
|
|
786
792
|
return T.app.activeComp.meta.methods;
|
|
787
793
|
}
|
|
788
|
-
function
|
|
794
|
+
function Qe(t) {
|
|
789
795
|
return T.app.activeComp.meta.methods.find((e) => e.id === t);
|
|
790
796
|
}
|
|
791
|
-
function
|
|
797
|
+
function Nn() {
|
|
792
798
|
const t = [];
|
|
793
799
|
return Me().forEach(({ id: n, name: o }) => {
|
|
794
800
|
t.push([o, n]);
|
|
795
801
|
}), N(t);
|
|
796
802
|
}
|
|
797
|
-
function
|
|
803
|
+
function xt(t) {
|
|
798
804
|
const e = T.app.activeComp.meta.methods.find(
|
|
799
805
|
(n) => n.id === t
|
|
800
806
|
);
|
|
801
807
|
return e ? e.outputs : [];
|
|
802
808
|
}
|
|
803
|
-
function
|
|
809
|
+
function kt(t, e) {
|
|
804
810
|
const n = T.app.activeComp.meta.methods.find(
|
|
805
811
|
(o) => o.id === t
|
|
806
812
|
);
|
|
807
813
|
if (n)
|
|
808
814
|
return n.outputs.find((o) => o.id === e);
|
|
809
815
|
}
|
|
810
|
-
function
|
|
816
|
+
function Wo(t) {
|
|
811
817
|
const e = [];
|
|
812
|
-
return
|
|
818
|
+
return xt(t).forEach(({ id: o, name: i }) => {
|
|
813
819
|
e.push([i, o]);
|
|
814
820
|
}), N(e);
|
|
815
821
|
}
|
|
816
|
-
function
|
|
822
|
+
function Ln() {
|
|
817
823
|
return T.app.activeComp.meta.events;
|
|
818
824
|
}
|
|
819
|
-
function
|
|
825
|
+
function tn(t) {
|
|
820
826
|
return T.app.activeComp.meta.events.find((e) => e.id === t);
|
|
821
827
|
}
|
|
822
|
-
function
|
|
828
|
+
function jo() {
|
|
823
829
|
const t = [];
|
|
824
|
-
return
|
|
830
|
+
return Ln().forEach(({ id: n, name: o }) => {
|
|
825
831
|
t.push([o, n]);
|
|
826
832
|
}), N(t);
|
|
827
833
|
}
|
|
828
|
-
const
|
|
834
|
+
const Xo = {
|
|
829
835
|
init: function() {
|
|
830
836
|
this.method = {
|
|
831
837
|
id: "",
|
|
@@ -854,7 +860,7 @@ const Wo = {
|
|
|
854
860
|
}, 0);
|
|
855
861
|
},
|
|
856
862
|
genMethodOpts_: function() {
|
|
857
|
-
return
|
|
863
|
+
return Nn();
|
|
858
864
|
},
|
|
859
865
|
onchange: function(t) {
|
|
860
866
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -869,7 +875,7 @@ const Wo = {
|
|
|
869
875
|
}
|
|
870
876
|
},
|
|
871
877
|
onMethodChange_: function(t) {
|
|
872
|
-
const e =
|
|
878
|
+
const e = Qe(t);
|
|
873
879
|
e ? (this.method.id = e.id, this.method.name = e.name, this.method.inputs = e.inputs) : (this.method.id = "", this.method.name = "", this.method.inputs = []), this.updateShape_(), setTimeout(() => {
|
|
874
880
|
this.rebuildBlocks();
|
|
875
881
|
}, 0);
|
|
@@ -893,7 +899,7 @@ const Wo = {
|
|
|
893
899
|
F(this, t);
|
|
894
900
|
},
|
|
895
901
|
checkWarning_: function() {
|
|
896
|
-
const t =
|
|
902
|
+
const t = Qe(this.method.id);
|
|
897
903
|
if (!t) {
|
|
898
904
|
this.setWarningText(_.WARN_METHOD_NOT_FOUND);
|
|
899
905
|
return;
|
|
@@ -905,15 +911,15 @@ const Wo = {
|
|
|
905
911
|
this.setWarningText(null);
|
|
906
912
|
}
|
|
907
913
|
};
|
|
908
|
-
d.comp_method_impl_v1 =
|
|
914
|
+
d.comp_method_impl_v1 = Xo;
|
|
909
915
|
s.forBlock.comp_method_impl_v1 = function(t) {
|
|
910
916
|
const e = t;
|
|
911
917
|
return `{
|
|
912
918
|
${s.statementToCode(e, "HANDLE")}}
|
|
913
919
|
`;
|
|
914
920
|
};
|
|
915
|
-
const
|
|
916
|
-
const n =
|
|
921
|
+
const Jo = (t, e) => {
|
|
922
|
+
const n = lt(t), o = qe(t);
|
|
917
923
|
d[n] = {
|
|
918
924
|
init: function() {
|
|
919
925
|
this.appendDummyInput().appendField(
|
|
@@ -935,10 +941,10 @@ const jo = (t, e) => {
|
|
|
935
941
|
for (const t in Re) {
|
|
936
942
|
const e = Re[t];
|
|
937
943
|
for (const n in e.items)
|
|
938
|
-
|
|
944
|
+
Jo(n, e.items[n]);
|
|
939
945
|
}
|
|
940
|
-
const
|
|
941
|
-
const n =
|
|
946
|
+
const qo = (t, e) => {
|
|
947
|
+
const n = lt(t), o = qe(t);
|
|
942
948
|
d[n] = {
|
|
943
949
|
init: function() {
|
|
944
950
|
this.value = e[0].default ?? "", this.appendDummyInput("DUMMY").appendField(
|
|
@@ -992,8 +998,8 @@ const Xo = (t, e) => {
|
|
|
992
998
|
i.removeField("VALUE", !0), i.removeField("SUFFIX", !0);
|
|
993
999
|
let u, r;
|
|
994
1000
|
if (l.ui === "pixelInput") {
|
|
995
|
-
const p =
|
|
996
|
-
u = new
|
|
1001
|
+
const p = So(this.value) ?? 0;
|
|
1002
|
+
u = new bt(
|
|
997
1003
|
p,
|
|
998
1004
|
l.min,
|
|
999
1005
|
l.max,
|
|
@@ -1003,8 +1009,8 @@ const Xo = (t, e) => {
|
|
|
1003
1009
|
}
|
|
1004
1010
|
), r = "px";
|
|
1005
1011
|
} else if (l.ui === "percentInput") {
|
|
1006
|
-
const p =
|
|
1007
|
-
u = new
|
|
1012
|
+
const p = bo(this.value) ?? 0;
|
|
1013
|
+
u = new bt(
|
|
1008
1014
|
p,
|
|
1009
1015
|
l.min,
|
|
1010
1016
|
l.max,
|
|
@@ -1032,9 +1038,9 @@ const Xo = (t, e) => {
|
|
|
1032
1038
|
for (const t in Re) {
|
|
1033
1039
|
const e = Re[t];
|
|
1034
1040
|
for (const n in e.types)
|
|
1035
|
-
|
|
1041
|
+
qo(n, e.types[n]);
|
|
1036
1042
|
}
|
|
1037
|
-
const
|
|
1043
|
+
const Qo = {
|
|
1038
1044
|
init: function() {
|
|
1039
1045
|
this.node = {
|
|
1040
1046
|
id: "",
|
|
@@ -1063,7 +1069,7 @@ const Jo = {
|
|
|
1063
1069
|
}, 0);
|
|
1064
1070
|
},
|
|
1065
1071
|
genNodeOpts_: function() {
|
|
1066
|
-
return
|
|
1072
|
+
return Ke();
|
|
1067
1073
|
},
|
|
1068
1074
|
onchange: function(t) {
|
|
1069
1075
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1098,12 +1104,12 @@ const Jo = {
|
|
|
1098
1104
|
this.node.alias !== t.alias && (this.node.alias = t.alias), this.setWarningText(null);
|
|
1099
1105
|
}
|
|
1100
1106
|
};
|
|
1101
|
-
d.get_node_v1 =
|
|
1107
|
+
d.get_node_v1 = Qo;
|
|
1102
1108
|
s.forBlock.get_node_v1 = function(t) {
|
|
1103
1109
|
const e = t;
|
|
1104
1110
|
return [s.quote_(e.node.id), c.ATOMIC];
|
|
1105
1111
|
};
|
|
1106
|
-
const
|
|
1112
|
+
const zo = {
|
|
1107
1113
|
init: function() {
|
|
1108
1114
|
this.node = {
|
|
1109
1115
|
id: "",
|
|
@@ -1142,10 +1148,10 @@ const qo = {
|
|
|
1142
1148
|
}, 0);
|
|
1143
1149
|
},
|
|
1144
1150
|
genNodeOpts_: function() {
|
|
1145
|
-
return
|
|
1151
|
+
return Ke();
|
|
1146
1152
|
},
|
|
1147
1153
|
genPropOpts_: function() {
|
|
1148
|
-
return
|
|
1154
|
+
return yn(this.node.id);
|
|
1149
1155
|
},
|
|
1150
1156
|
onchange: function(t) {
|
|
1151
1157
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1196,12 +1202,12 @@ const qo = {
|
|
|
1196
1202
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
1197
1203
|
}
|
|
1198
1204
|
};
|
|
1199
|
-
d.get_node_prop_v1 =
|
|
1205
|
+
d.get_node_prop_v1 = zo;
|
|
1200
1206
|
s.forBlock.get_node_prop_v1 = function(t) {
|
|
1201
1207
|
const e = t, n = s.quote_(e.node.id), o = s.quote_(e.prop.keys);
|
|
1202
1208
|
return [`__getNodePropV1__(${n}, ${o})`, c.ATOMIC];
|
|
1203
1209
|
};
|
|
1204
|
-
const
|
|
1210
|
+
const Zo = {
|
|
1205
1211
|
init: function() {
|
|
1206
1212
|
this.element = {
|
|
1207
1213
|
key: "",
|
|
@@ -1214,7 +1220,7 @@ const Qo = {
|
|
|
1214
1220
|
initData_: function() {
|
|
1215
1221
|
if (this.element.key)
|
|
1216
1222
|
return;
|
|
1217
|
-
const t =
|
|
1223
|
+
const t = we()?.[0];
|
|
1218
1224
|
if (!t)
|
|
1219
1225
|
return;
|
|
1220
1226
|
this.element.key = t.key, this.element.name = t.name;
|
|
@@ -1242,7 +1248,7 @@ const Qo = {
|
|
|
1242
1248
|
return Ae();
|
|
1243
1249
|
},
|
|
1244
1250
|
genPropOpts_: function() {
|
|
1245
|
-
return
|
|
1251
|
+
return vn(this.element.key);
|
|
1246
1252
|
},
|
|
1247
1253
|
onchange: function(t) {
|
|
1248
1254
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1289,29 +1295,29 @@ const Qo = {
|
|
|
1289
1295
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
1290
1296
|
}
|
|
1291
1297
|
};
|
|
1292
|
-
d.get_node_prop_as_v1 =
|
|
1298
|
+
d.get_node_prop_as_v1 = Zo;
|
|
1293
1299
|
s.forBlock.get_node_prop_as_v1 = function(t) {
|
|
1294
1300
|
const e = t, n = s.valueToCode(e, "NODE", c.ATOMIC) || "null", o = s.quote_(e.prop.keys);
|
|
1295
1301
|
return [`__getNodePropV1__(${n}, ${o})`, c.ATOMIC];
|
|
1296
1302
|
};
|
|
1297
|
-
function
|
|
1303
|
+
function ei() {
|
|
1298
1304
|
if (T.app.activeObject.type !== "page" || T.app.activePage.meta.arguments.length > 0) return !1;
|
|
1299
1305
|
}
|
|
1300
|
-
function
|
|
1306
|
+
function Sn() {
|
|
1301
1307
|
return T.app.activePage.meta.arguments;
|
|
1302
1308
|
}
|
|
1303
|
-
function
|
|
1309
|
+
function nn(t) {
|
|
1304
1310
|
return T.app.activePage.meta.arguments.find(
|
|
1305
1311
|
(e) => e.id === t
|
|
1306
1312
|
);
|
|
1307
1313
|
}
|
|
1308
|
-
function
|
|
1314
|
+
function ti() {
|
|
1309
1315
|
const t = [];
|
|
1310
|
-
return
|
|
1316
|
+
return Sn().forEach(({ id: n, name: o }) => {
|
|
1311
1317
|
t.push([o, n]);
|
|
1312
1318
|
}), N(t);
|
|
1313
1319
|
}
|
|
1314
|
-
const
|
|
1320
|
+
const ni = {
|
|
1315
1321
|
init: function() {
|
|
1316
1322
|
this.argument = {
|
|
1317
1323
|
id: "",
|
|
@@ -1333,7 +1339,7 @@ const ei = {
|
|
|
1333
1339
|
}, 0);
|
|
1334
1340
|
},
|
|
1335
1341
|
genArgumentOpts_: function() {
|
|
1336
|
-
return
|
|
1342
|
+
return ti();
|
|
1337
1343
|
},
|
|
1338
1344
|
onchange: function(t) {
|
|
1339
1345
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1348,7 +1354,7 @@ const ei = {
|
|
|
1348
1354
|
}
|
|
1349
1355
|
},
|
|
1350
1356
|
onArgumentChange_: function(t) {
|
|
1351
|
-
const e =
|
|
1357
|
+
const e = nn(t);
|
|
1352
1358
|
if (!e) {
|
|
1353
1359
|
console.assert(!1);
|
|
1354
1360
|
return;
|
|
@@ -1359,7 +1365,7 @@ const ei = {
|
|
|
1359
1365
|
this.argument.type === "string" ? this.setOutput(!0, "String") : this.argument.type === "number" ? this.setOutput(!0, "Number") : this.argument.type === "boolean" ? this.setOutput(!0, "Boolean") : this.argument.type === "list" ? this.setOutput(!0, "Array") : this.argument.type === "object" ? this.setOutput(!0, "Object") : this.setOutput(!0, null);
|
|
1360
1366
|
},
|
|
1361
1367
|
checkWarning_: function() {
|
|
1362
|
-
const t =
|
|
1368
|
+
const t = nn(this.argument.id);
|
|
1363
1369
|
if (!t) {
|
|
1364
1370
|
this.setWarningText(_.WARN_ARGUMENT_NOT_FOUND);
|
|
1365
1371
|
return;
|
|
@@ -1371,59 +1377,59 @@ const ei = {
|
|
|
1371
1377
|
this.setWarningText(null);
|
|
1372
1378
|
}
|
|
1373
1379
|
};
|
|
1374
|
-
d.get_page_argument_v1 =
|
|
1380
|
+
d.get_page_argument_v1 = ni;
|
|
1375
1381
|
s.forBlock.get_page_argument_v1 = function(t) {
|
|
1376
1382
|
const e = t;
|
|
1377
1383
|
return [`__getPageArgumentV1__(${s.quote_(e.argument.id)})`, c.FUNCTION_CALL];
|
|
1378
1384
|
};
|
|
1379
|
-
function
|
|
1385
|
+
function Gt() {
|
|
1380
1386
|
return T.app.appList;
|
|
1381
1387
|
}
|
|
1382
|
-
function
|
|
1388
|
+
function on(t) {
|
|
1383
1389
|
return T.app.appList.find((e) => e.id === t);
|
|
1384
1390
|
}
|
|
1385
|
-
function
|
|
1391
|
+
function oi() {
|
|
1386
1392
|
const t = [];
|
|
1387
|
-
return
|
|
1393
|
+
return Gt().forEach(({ id: n, name: o }) => {
|
|
1388
1394
|
t.push([o, n]);
|
|
1389
1395
|
}), N(t);
|
|
1390
1396
|
}
|
|
1391
|
-
function
|
|
1397
|
+
function Ft(t) {
|
|
1392
1398
|
const e = T.app.appList.find((n) => n.id === t);
|
|
1393
1399
|
return e ? e.pages : [];
|
|
1394
1400
|
}
|
|
1395
|
-
function
|
|
1401
|
+
function vt(t, e) {
|
|
1396
1402
|
const n = T.app.appList.find((o) => o.id === t);
|
|
1397
1403
|
if (n)
|
|
1398
1404
|
return n.pages.find((o) => o.id === e);
|
|
1399
1405
|
}
|
|
1400
|
-
function
|
|
1406
|
+
function ii(t) {
|
|
1401
1407
|
const e = [];
|
|
1402
|
-
return
|
|
1408
|
+
return Ft(t).forEach(({ id: o, name: i }) => {
|
|
1403
1409
|
e.push([i, o]);
|
|
1404
1410
|
}), N(e);
|
|
1405
1411
|
}
|
|
1406
|
-
const
|
|
1412
|
+
const bn = {
|
|
1407
1413
|
id: "",
|
|
1408
1414
|
groupid: "",
|
|
1409
1415
|
name: "",
|
|
1410
1416
|
position: 0
|
|
1411
1417
|
};
|
|
1412
|
-
function
|
|
1418
|
+
function Bn() {
|
|
1413
1419
|
const { comps: t } = T.app.activeApp;
|
|
1414
|
-
return [
|
|
1420
|
+
return [bn, ...t];
|
|
1415
1421
|
}
|
|
1416
|
-
function
|
|
1417
|
-
return t === "" ?
|
|
1422
|
+
function sn(t) {
|
|
1423
|
+
return t === "" ? bn : T.app.activeApp.comps.find((e) => e.id === t);
|
|
1418
1424
|
}
|
|
1419
|
-
function
|
|
1425
|
+
function si() {
|
|
1420
1426
|
const { i18n: t } = ie, e = [];
|
|
1421
|
-
return
|
|
1427
|
+
return Bn().forEach(({ id: o, name: i }) => {
|
|
1422
1428
|
let a = i;
|
|
1423
1429
|
o === "" && (a = t.global.t("x-runtime-lib.notSet")), e.push([a, o]);
|
|
1424
1430
|
}), N(e);
|
|
1425
1431
|
}
|
|
1426
|
-
const
|
|
1432
|
+
const ai = {
|
|
1427
1433
|
init: function() {
|
|
1428
1434
|
this.app = {
|
|
1429
1435
|
id: "",
|
|
@@ -1436,13 +1442,13 @@ const ii = {
|
|
|
1436
1442
|
initData_: function() {
|
|
1437
1443
|
if (this.app.id)
|
|
1438
1444
|
return;
|
|
1439
|
-
const t =
|
|
1445
|
+
const t = Gt()?.[0];
|
|
1440
1446
|
if (!t)
|
|
1441
1447
|
return;
|
|
1442
1448
|
this.app.id = t.id, this.app.name = t.name;
|
|
1443
1449
|
const e = this.getField("APP");
|
|
1444
1450
|
e.getOptions(!1), e.setValue(this.app.id);
|
|
1445
|
-
const n =
|
|
1451
|
+
const n = Ft(this.app.id)?.[0];
|
|
1446
1452
|
if (!n)
|
|
1447
1453
|
return;
|
|
1448
1454
|
this.page.id = n.id, this.page.name = n.name;
|
|
@@ -1461,10 +1467,10 @@ const ii = {
|
|
|
1461
1467
|
}, 0);
|
|
1462
1468
|
},
|
|
1463
1469
|
genAppOpts_: function() {
|
|
1464
|
-
return
|
|
1470
|
+
return oi();
|
|
1465
1471
|
},
|
|
1466
1472
|
genPageOpts_: function() {
|
|
1467
|
-
return
|
|
1473
|
+
return ii(this.app.id);
|
|
1468
1474
|
},
|
|
1469
1475
|
onchange: function(t) {
|
|
1470
1476
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1479,7 +1485,7 @@ const ii = {
|
|
|
1479
1485
|
}
|
|
1480
1486
|
},
|
|
1481
1487
|
onAppChange_: function(t) {
|
|
1482
|
-
const e =
|
|
1488
|
+
const e = on(t);
|
|
1483
1489
|
if (!e) {
|
|
1484
1490
|
console.assert(!1);
|
|
1485
1491
|
return;
|
|
@@ -1487,23 +1493,23 @@ const ii = {
|
|
|
1487
1493
|
const n = this.app.id !== e.id;
|
|
1488
1494
|
this.app.id = e.id, this.app.name = e.name;
|
|
1489
1495
|
const o = this.getField("PAGE");
|
|
1490
|
-
if (o.getOptions(!1), n || !
|
|
1491
|
-
const a =
|
|
1496
|
+
if (o.getOptions(!1), n || !vt(this.app.id, this.page.id)) {
|
|
1497
|
+
const a = Ft(this.app.id)?.[0]?.id ?? "";
|
|
1492
1498
|
o.setValue(a), this.page.id === a && this.onPageChange_(a);
|
|
1493
1499
|
}
|
|
1494
1500
|
},
|
|
1495
1501
|
onPageChange_: function(t) {
|
|
1496
|
-
const e =
|
|
1502
|
+
const e = vt(this.app.id, t);
|
|
1497
1503
|
e ? (this.page.id = e.id, this.page.name = e.name) : (this.page.id = "", this.page.name = "");
|
|
1498
1504
|
},
|
|
1499
1505
|
checkWarning_: function() {
|
|
1500
|
-
const t =
|
|
1506
|
+
const t = on(this.app.id);
|
|
1501
1507
|
if (!t) {
|
|
1502
1508
|
this.setWarningText(_.WARN_APP_NOT_FOUND);
|
|
1503
1509
|
return;
|
|
1504
1510
|
}
|
|
1505
1511
|
t.name !== this.app.name && (this.app.name = t.name);
|
|
1506
|
-
const e =
|
|
1512
|
+
const e = vt(this.app.id, this.page.id);
|
|
1507
1513
|
if (!e) {
|
|
1508
1514
|
this.setWarningText(_.WARN_PAGE_NOT_FOUND);
|
|
1509
1515
|
return;
|
|
@@ -1511,13 +1517,13 @@ const ii = {
|
|
|
1511
1517
|
e.name !== this.page.name && (this.page.name = e.name), this.setWarningText(null);
|
|
1512
1518
|
}
|
|
1513
1519
|
};
|
|
1514
|
-
d.navigate_to_v1 =
|
|
1520
|
+
d.navigate_to_v1 = ai;
|
|
1515
1521
|
s.forBlock.navigate_to_v1 = function(t) {
|
|
1516
1522
|
const e = t, n = s.quote_(e.app.id), o = s.quote_(e.page.id);
|
|
1517
1523
|
return `__navigateToV1__(${n}, ${o});
|
|
1518
1524
|
`;
|
|
1519
1525
|
};
|
|
1520
|
-
const
|
|
1526
|
+
const ci = {
|
|
1521
1527
|
init: function() {
|
|
1522
1528
|
this.node = {
|
|
1523
1529
|
id: "",
|
|
@@ -1538,7 +1544,7 @@ const si = {
|
|
|
1538
1544
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
1539
1545
|
const e = this.getField("NODE");
|
|
1540
1546
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
1541
|
-
const n =
|
|
1547
|
+
const n = Pt(this.node.id)?.[0];
|
|
1542
1548
|
if (!n)
|
|
1543
1549
|
return;
|
|
1544
1550
|
this.event.key = n.key, this.event.name = n.name, this.event.params = n.params;
|
|
@@ -1557,10 +1563,10 @@ const si = {
|
|
|
1557
1563
|
}, 0);
|
|
1558
1564
|
},
|
|
1559
1565
|
genNodeOpts_: function() {
|
|
1560
|
-
return
|
|
1566
|
+
return Ke("event");
|
|
1561
1567
|
},
|
|
1562
1568
|
genEventOpts_: function() {
|
|
1563
|
-
return
|
|
1569
|
+
return wo(this.node.id);
|
|
1564
1570
|
},
|
|
1565
1571
|
onchange: function(t) {
|
|
1566
1572
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1583,13 +1589,13 @@ const si = {
|
|
|
1583
1589
|
const n = this.node.key !== e.key;
|
|
1584
1590
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
1585
1591
|
const o = this.getField("EVENT");
|
|
1586
|
-
if (o.getOptions(!1), n || !
|
|
1587
|
-
const a =
|
|
1592
|
+
if (o.getOptions(!1), n || !Ot(this.node.id, this.event.key)) {
|
|
1593
|
+
const a = Pt(this.node.id)?.[0]?.key ?? "";
|
|
1588
1594
|
o.setValue(a), this.event.key === a && this.onEventChange_(a);
|
|
1589
1595
|
}
|
|
1590
1596
|
},
|
|
1591
1597
|
onEventChange_: function(t) {
|
|
1592
|
-
const e =
|
|
1598
|
+
const e = Ot(this.node.id, t);
|
|
1593
1599
|
e ? (this.event.key = e.key, this.event.name = e.name, this.event.params = e.params) : (this.event.key = "", this.event.name = "", this.event.params = []), this.updateShape_(), setTimeout(() => {
|
|
1594
1600
|
this.ensureBlocks_();
|
|
1595
1601
|
}, 0);
|
|
@@ -1621,7 +1627,7 @@ const si = {
|
|
|
1621
1627
|
return;
|
|
1622
1628
|
}
|
|
1623
1629
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
1624
|
-
const e =
|
|
1630
|
+
const e = Ot(this.node.id, this.event.key);
|
|
1625
1631
|
if (!e) {
|
|
1626
1632
|
this.setWarningText(_.WARN_EVENT_NOT_FOUND);
|
|
1627
1633
|
return;
|
|
@@ -1633,7 +1639,7 @@ const si = {
|
|
|
1633
1639
|
this.setWarningText(null);
|
|
1634
1640
|
}
|
|
1635
1641
|
};
|
|
1636
|
-
d.on_node_event_v1 =
|
|
1642
|
+
d.on_node_event_v1 = ci;
|
|
1637
1643
|
s.forBlock.on_node_event_v1 = function(t) {
|
|
1638
1644
|
const e = t, n = s.quote_(e.node.id), o = s.quote_(e.event.key);
|
|
1639
1645
|
let i = "";
|
|
@@ -1645,7 +1651,7 @@ s.forBlock.on_node_event_v1 = function(t) {
|
|
|
1645
1651
|
${a}});
|
|
1646
1652
|
`;
|
|
1647
1653
|
};
|
|
1648
|
-
const
|
|
1654
|
+
const li = {
|
|
1649
1655
|
init: function() {
|
|
1650
1656
|
this.element = {
|
|
1651
1657
|
key: "",
|
|
@@ -1659,13 +1665,13 @@ const ai = {
|
|
|
1659
1665
|
initData_: function() {
|
|
1660
1666
|
if (this.element.key)
|
|
1661
1667
|
return;
|
|
1662
|
-
const t =
|
|
1668
|
+
const t = we("event")?.[0];
|
|
1663
1669
|
if (!t)
|
|
1664
1670
|
return;
|
|
1665
1671
|
this.element.key = t.key, this.element.name = t.name;
|
|
1666
1672
|
const e = this.getField("ELEMENT");
|
|
1667
1673
|
e.getOptions(!1), e.setValue(this.element.key);
|
|
1668
|
-
const n =
|
|
1674
|
+
const n = Ut(this.element.key)?.[0];
|
|
1669
1675
|
if (!n)
|
|
1670
1676
|
return;
|
|
1671
1677
|
this.event.key = n.key, this.event.name = n.name, this.event.params = n.params;
|
|
@@ -1687,7 +1693,7 @@ const ai = {
|
|
|
1687
1693
|
return Ae("event");
|
|
1688
1694
|
},
|
|
1689
1695
|
genEventOpts_: function() {
|
|
1690
|
-
return
|
|
1696
|
+
return Fo(this.element.key);
|
|
1691
1697
|
},
|
|
1692
1698
|
onchange: function(t) {
|
|
1693
1699
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1710,13 +1716,13 @@ const ai = {
|
|
|
1710
1716
|
const n = this.element.key !== e.key;
|
|
1711
1717
|
this.element.key = e.key, this.element.name = e.name;
|
|
1712
1718
|
const o = this.getField("EVENT");
|
|
1713
|
-
if (o.getOptions(!1), n || !
|
|
1714
|
-
const a =
|
|
1719
|
+
if (o.getOptions(!1), n || !It(this.element.key, this.event.key)) {
|
|
1720
|
+
const a = Ut(this.element.key)?.[0]?.key ?? "";
|
|
1715
1721
|
o.setValue(a, !1), this.event.key !== a && this.onEventChange_(a);
|
|
1716
1722
|
}
|
|
1717
1723
|
},
|
|
1718
1724
|
onEventChange_: function(t) {
|
|
1719
|
-
const e =
|
|
1725
|
+
const e = It(this.element.key, t);
|
|
1720
1726
|
e ? (this.event.key = e.key, this.event.name = e.name, this.event.params = e.params) : (this.event.key = "", this.event.name = "", this.event.params = []), this.updateShape_(), setTimeout(() => {
|
|
1721
1727
|
this.ensureBlocks_();
|
|
1722
1728
|
}, 0);
|
|
@@ -1744,7 +1750,7 @@ const ai = {
|
|
|
1744
1750
|
return;
|
|
1745
1751
|
}
|
|
1746
1752
|
t.name !== this.element.name && (this.element.name = t.name);
|
|
1747
|
-
const e =
|
|
1753
|
+
const e = It(this.element.key, this.event.key);
|
|
1748
1754
|
if (!e) {
|
|
1749
1755
|
this.setWarningText(_.WARN_EVENT_NOT_FOUND);
|
|
1750
1756
|
return;
|
|
@@ -1756,7 +1762,7 @@ const ai = {
|
|
|
1756
1762
|
this.setWarningText(null);
|
|
1757
1763
|
}
|
|
1758
1764
|
};
|
|
1759
|
-
d.on_node_event_as_v1 =
|
|
1765
|
+
d.on_node_event_as_v1 = li;
|
|
1760
1766
|
s.forBlock.on_node_event_as_v1 = function(t) {
|
|
1761
1767
|
const e = t, n = s.valueToCode(e, "NODE", c.NONE), o = s.quote_(e.event.key);
|
|
1762
1768
|
let i = "";
|
|
@@ -1768,7 +1774,7 @@ s.forBlock.on_node_event_as_v1 = function(t) {
|
|
|
1768
1774
|
${a}});
|
|
1769
1775
|
`;
|
|
1770
1776
|
};
|
|
1771
|
-
const
|
|
1777
|
+
const ui = {
|
|
1772
1778
|
init: function() {
|
|
1773
1779
|
this.appendDummyInput().appendField("%{BKY_UI_V1_OPEN_CONFIRM_DLG_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_UI_V1_OPEN_CONFIRM_DLG_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_OPEN_CONFIRM_DLG_HELPURL}");
|
|
1774
1780
|
},
|
|
@@ -1797,7 +1803,7 @@ const ci = {
|
|
|
1797
1803
|
]);
|
|
1798
1804
|
}
|
|
1799
1805
|
};
|
|
1800
|
-
d.open_confirm_dlg_v1 =
|
|
1806
|
+
d.open_confirm_dlg_v1 = ui;
|
|
1801
1807
|
s.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
1802
1808
|
const e = s.valueToCode(t, "TITLE", c.ATOMIC), n = s.valueToCode(t, "TEXT", c.ATOMIC), o = s.statementToCode(t, "HANDLE");
|
|
1803
1809
|
return `{
|
|
@@ -1805,7 +1811,7 @@ s.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
|
1805
1811
|
${o}}
|
|
1806
1812
|
`;
|
|
1807
1813
|
};
|
|
1808
|
-
const
|
|
1814
|
+
const ri = {
|
|
1809
1815
|
init: function() {
|
|
1810
1816
|
this.appendDummyInput().appendField("%{BKY_UI_V1_OPEN_PROMPT_DLG_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_UI_V1_OPEN_PROMPT_DLG_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_OPEN_PROMPT_DLG_HELPURL}");
|
|
1811
1817
|
},
|
|
@@ -1836,7 +1842,7 @@ const li = {
|
|
|
1836
1842
|
]);
|
|
1837
1843
|
}
|
|
1838
1844
|
};
|
|
1839
|
-
d.open_prompt_dlg_v1 =
|
|
1845
|
+
d.open_prompt_dlg_v1 = ri;
|
|
1840
1846
|
s.forBlock.open_prompt_dlg_v1 = function(t) {
|
|
1841
1847
|
const e = s.valueToCode(t, "TITLE", c.ATOMIC), n = s.valueToCode(t, "LABEL", c.ATOMIC), o = s.valueToCode(t, "VALUE", c.ATOMIC), i = s.statementToCode(t, "HANDLE");
|
|
1842
1848
|
return `{
|
|
@@ -1876,7 +1882,7 @@ s.forBlock.popup_message_v1 = function(t) {
|
|
|
1876
1882
|
return `__messageV1__(${e}, ${n});
|
|
1877
1883
|
`;
|
|
1878
1884
|
};
|
|
1879
|
-
const
|
|
1885
|
+
const _i = {
|
|
1880
1886
|
init: function() {
|
|
1881
1887
|
this.comp = {
|
|
1882
1888
|
id: void 0,
|
|
@@ -1886,7 +1892,7 @@ const ui = {
|
|
|
1886
1892
|
initData_: function() {
|
|
1887
1893
|
if (this.comp.id !== void 0)
|
|
1888
1894
|
return;
|
|
1889
|
-
const t =
|
|
1895
|
+
const t = Bn()?.[0];
|
|
1890
1896
|
if (!t)
|
|
1891
1897
|
return;
|
|
1892
1898
|
this.comp.id = t.id, this.comp.name = t.name;
|
|
@@ -1904,7 +1910,7 @@ const ui = {
|
|
|
1904
1910
|
}, 0);
|
|
1905
1911
|
},
|
|
1906
1912
|
genCompOpts_: function() {
|
|
1907
|
-
return
|
|
1913
|
+
return si();
|
|
1908
1914
|
},
|
|
1909
1915
|
onchange: function(t) {
|
|
1910
1916
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1919,7 +1925,7 @@ const ui = {
|
|
|
1919
1925
|
}
|
|
1920
1926
|
},
|
|
1921
1927
|
onCompChange_: function(t) {
|
|
1922
|
-
const e =
|
|
1928
|
+
const e = sn(t);
|
|
1923
1929
|
if (!e) {
|
|
1924
1930
|
console.assert(!1);
|
|
1925
1931
|
return;
|
|
@@ -1931,19 +1937,19 @@ const ui = {
|
|
|
1931
1937
|
this.setWarningText(_.WARN_COMP_NOT_FOUND);
|
|
1932
1938
|
return;
|
|
1933
1939
|
}
|
|
1934
|
-
if (!
|
|
1940
|
+
if (!sn(this.comp.id)) {
|
|
1935
1941
|
this.setWarningText(_.WARN_COMP_NOT_FOUND);
|
|
1936
1942
|
return;
|
|
1937
1943
|
}
|
|
1938
1944
|
this.setWarningText(null);
|
|
1939
1945
|
}
|
|
1940
1946
|
};
|
|
1941
|
-
d.select_comp_v1 =
|
|
1947
|
+
d.select_comp_v1 = _i;
|
|
1942
1948
|
s.forBlock.select_comp_v1 = function(t) {
|
|
1943
1949
|
const e = s.quote_, o = t.comp.id ?? "";
|
|
1944
1950
|
return [e(o), c.ATOMIC];
|
|
1945
1951
|
};
|
|
1946
|
-
const
|
|
1952
|
+
const pi = {
|
|
1947
1953
|
init: function() {
|
|
1948
1954
|
this.method = {
|
|
1949
1955
|
id: "",
|
|
@@ -1963,7 +1969,7 @@ const ri = {
|
|
|
1963
1969
|
this.method.id = t.id, this.method.name = t.name;
|
|
1964
1970
|
const e = this.getField("METHOD");
|
|
1965
1971
|
e.getOptions(!1), e.setValue(this.method.id);
|
|
1966
|
-
const n =
|
|
1972
|
+
const n = xt(this.method.id)?.[0];
|
|
1967
1973
|
if (!n)
|
|
1968
1974
|
return;
|
|
1969
1975
|
this.output.id = n.id, this.output.name = n.name, this.output.type = n.type;
|
|
@@ -1981,10 +1987,10 @@ const ri = {
|
|
|
1981
1987
|
}, 0);
|
|
1982
1988
|
},
|
|
1983
1989
|
genMethodOpts_: function() {
|
|
1984
|
-
return
|
|
1990
|
+
return Nn();
|
|
1985
1991
|
},
|
|
1986
1992
|
genOutputOpts_: function() {
|
|
1987
|
-
return
|
|
1993
|
+
return Wo(this.method.id);
|
|
1988
1994
|
},
|
|
1989
1995
|
onchange: function(t) {
|
|
1990
1996
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -2000,7 +2006,7 @@ const ri = {
|
|
|
2000
2006
|
}, 0);
|
|
2001
2007
|
},
|
|
2002
2008
|
onMethodChange_: function(t) {
|
|
2003
|
-
const e =
|
|
2009
|
+
const e = Qe(t);
|
|
2004
2010
|
if (!e) {
|
|
2005
2011
|
console.assert(!1);
|
|
2006
2012
|
return;
|
|
@@ -2008,13 +2014,13 @@ const ri = {
|
|
|
2008
2014
|
const n = this.method.id !== e.id;
|
|
2009
2015
|
this.method.id = e.id, this.method.name = e.name;
|
|
2010
2016
|
const o = this.getField("OUTPUT");
|
|
2011
|
-
if (o.getOptions(!1), n || !
|
|
2012
|
-
const a =
|
|
2017
|
+
if (o.getOptions(!1), n || !kt(this.method.id, this.output.id)) {
|
|
2018
|
+
const a = xt(this.method.id)?.[0]?.id ?? "";
|
|
2013
2019
|
o.setValue(a), this.output.id === a && this.onOutputChange_(a);
|
|
2014
2020
|
}
|
|
2015
2021
|
},
|
|
2016
2022
|
onOutputChange_: function(t) {
|
|
2017
|
-
const e =
|
|
2023
|
+
const e = kt(this.method.id, t);
|
|
2018
2024
|
e ? (this.output.id = e.id, this.output.name = e.name, this.output.type = e.type) : (this.output.id = "", this.output.name = "", this.output.type = "");
|
|
2019
2025
|
},
|
|
2020
2026
|
updateShape_: function() {
|
|
@@ -2022,8 +2028,8 @@ const ri = {
|
|
|
2022
2028
|
t.connection.setShadowDom(null);
|
|
2023
2029
|
const e = t.connection.targetBlock();
|
|
2024
2030
|
e && !e.isShadow() && e.dispose();
|
|
2025
|
-
const n = this.output.type;
|
|
2026
|
-
|
|
2031
|
+
const n = Ye(this.output.type);
|
|
2032
|
+
t.setCheck(n);
|
|
2027
2033
|
},
|
|
2028
2034
|
updateShadows_: function() {
|
|
2029
2035
|
if (this.isInsertionMarker())
|
|
@@ -2033,13 +2039,13 @@ const ri = {
|
|
|
2033
2039
|
e === "string" ? t = S({ type: "string", default: "" }) : e === "number" ? t = S({ type: "number", default: 0 }) : e === "boolean" && (t = S({ type: "boolean", default: !1 })), this.getInput("VALUE").connection.setShadowDom(t);
|
|
2034
2040
|
},
|
|
2035
2041
|
checkWarning_: function() {
|
|
2036
|
-
const t =
|
|
2042
|
+
const t = Qe(this.method.id);
|
|
2037
2043
|
if (!t) {
|
|
2038
2044
|
this.setWarningText(_.WARN_METHOD_NOT_FOUND);
|
|
2039
2045
|
return;
|
|
2040
2046
|
}
|
|
2041
2047
|
t.name !== this.method.name && (this.method.name = t.name);
|
|
2042
|
-
const e =
|
|
2048
|
+
const e = kt(this.method.id, this.output.id);
|
|
2043
2049
|
if (!e) {
|
|
2044
2050
|
this.setWarningText(_.WARN_OUTPUT_NOT_FOUND);
|
|
2045
2051
|
return;
|
|
@@ -2051,7 +2057,7 @@ const ri = {
|
|
|
2051
2057
|
this.setWarningText(null);
|
|
2052
2058
|
}
|
|
2053
2059
|
};
|
|
2054
|
-
d.set_comp_method_output_v1 =
|
|
2060
|
+
d.set_comp_method_output_v1 = pi;
|
|
2055
2061
|
s.forBlock.set_comp_method_output_v1 = function(t) {
|
|
2056
2062
|
const e = t;
|
|
2057
2063
|
let n = s.valueToCode(e, "VALUE", c.ATOMIC);
|
|
@@ -2078,7 +2084,7 @@ s.forBlock.set_comp_method_output_v1 = function(t) {
|
|
|
2078
2084
|
return `__setCompMethodOutputV1__(${n});
|
|
2079
2085
|
`;
|
|
2080
2086
|
};
|
|
2081
|
-
const
|
|
2087
|
+
const hi = {
|
|
2082
2088
|
init: function() {
|
|
2083
2089
|
this.node = {
|
|
2084
2090
|
id: "",
|
|
@@ -2117,10 +2123,10 @@ const _i = {
|
|
|
2117
2123
|
}, 0);
|
|
2118
2124
|
},
|
|
2119
2125
|
genNodeOpts_: function() {
|
|
2120
|
-
return
|
|
2126
|
+
return Ke();
|
|
2121
2127
|
},
|
|
2122
2128
|
genPropOpts_: function() {
|
|
2123
|
-
return
|
|
2129
|
+
return yn(this.node.id);
|
|
2124
2130
|
},
|
|
2125
2131
|
onchange: function(t) {
|
|
2126
2132
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -2159,16 +2165,16 @@ const _i = {
|
|
|
2159
2165
|
if (!t)
|
|
2160
2166
|
return;
|
|
2161
2167
|
const e = this.getInput("VALUE"), n = e.connection.targetBlock();
|
|
2162
|
-
n && n.dispose();
|
|
2163
|
-
const o =
|
|
2164
|
-
o &&
|
|
2168
|
+
n && n.dispose(), e.setCheck(null);
|
|
2169
|
+
const o = On(this.workspace, t.raw);
|
|
2170
|
+
o && e.connection.connect(o.outputConnection);
|
|
2165
2171
|
},
|
|
2166
2172
|
updateCheck_: function() {
|
|
2167
2173
|
const t = ae(this.node.id, this.prop.keys);
|
|
2168
2174
|
if (!t)
|
|
2169
2175
|
return;
|
|
2170
|
-
const e =
|
|
2171
|
-
this.getInput("VALUE").
|
|
2176
|
+
const e = Cn(t.raw);
|
|
2177
|
+
this.getInput("VALUE").setCheck(e);
|
|
2172
2178
|
},
|
|
2173
2179
|
checkWarning_: function() {
|
|
2174
2180
|
const t = Y(this.node.id);
|
|
@@ -2189,13 +2195,13 @@ const _i = {
|
|
|
2189
2195
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
2190
2196
|
}
|
|
2191
2197
|
};
|
|
2192
|
-
d.set_node_prop_v1 =
|
|
2198
|
+
d.set_node_prop_v1 = hi;
|
|
2193
2199
|
s.forBlock.set_node_prop_v1 = function(t) {
|
|
2194
2200
|
const e = t, n = s.quote_(e.node.id), o = s.quote_(e.prop.keys), i = s.valueToCode(e, "VALUE", c.NONE);
|
|
2195
2201
|
return `__setNodePropV1__(${n}, ${o}, ${i});
|
|
2196
2202
|
`;
|
|
2197
2203
|
};
|
|
2198
|
-
const
|
|
2204
|
+
const di = {
|
|
2199
2205
|
init: function() {
|
|
2200
2206
|
this.element = {
|
|
2201
2207
|
key: "",
|
|
@@ -2208,7 +2214,7 @@ const pi = {
|
|
|
2208
2214
|
initData_: function() {
|
|
2209
2215
|
if (this.element.key)
|
|
2210
2216
|
return;
|
|
2211
|
-
const t =
|
|
2217
|
+
const t = we()?.[0];
|
|
2212
2218
|
if (!t)
|
|
2213
2219
|
return;
|
|
2214
2220
|
this.element.key = t.key, this.element.name = t.name;
|
|
@@ -2236,7 +2242,7 @@ const pi = {
|
|
|
2236
2242
|
return Ae();
|
|
2237
2243
|
},
|
|
2238
2244
|
genPropOpts_: function() {
|
|
2239
|
-
return
|
|
2245
|
+
return vn(this.element.key);
|
|
2240
2246
|
},
|
|
2241
2247
|
onchange: function(t) {
|
|
2242
2248
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -2275,15 +2281,15 @@ const pi = {
|
|
|
2275
2281
|
if (!t)
|
|
2276
2282
|
return;
|
|
2277
2283
|
const e = this.getInput("VALUE"), n = e.connection.targetBlock();
|
|
2278
|
-
n && n.dispose();
|
|
2279
|
-
const o =
|
|
2280
|
-
o &&
|
|
2284
|
+
n && n.dispose(), e.setCheck(null);
|
|
2285
|
+
const o = On(this.workspace, t.raw);
|
|
2286
|
+
o && e.connection.connect(o.outputConnection);
|
|
2281
2287
|
},
|
|
2282
2288
|
updateCheck_: function() {
|
|
2283
2289
|
const t = se(this.element.key, this.prop.keys);
|
|
2284
2290
|
if (!t)
|
|
2285
2291
|
return;
|
|
2286
|
-
const e =
|
|
2292
|
+
const e = Cn(t.raw);
|
|
2287
2293
|
this.getInput("VALUE").connection.setCheck(e);
|
|
2288
2294
|
},
|
|
2289
2295
|
checkWarning_: function() {
|
|
@@ -2305,13 +2311,13 @@ const pi = {
|
|
|
2305
2311
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
2306
2312
|
}
|
|
2307
2313
|
};
|
|
2308
|
-
d.set_node_prop_as_v1 =
|
|
2314
|
+
d.set_node_prop_as_v1 = di;
|
|
2309
2315
|
s.forBlock.set_node_prop_as_v1 = function(t) {
|
|
2310
2316
|
const e = t, n = s.valueToCode(e, "NODE", c.NONE), o = s.quote_(e.prop.keys), i = s.valueToCode(e, "VALUE", c.NONE);
|
|
2311
2317
|
return `__setNodePropV1__(${n}, ${o}, ${i});
|
|
2312
2318
|
`;
|
|
2313
2319
|
};
|
|
2314
|
-
const
|
|
2320
|
+
const fi = {
|
|
2315
2321
|
init: function() {
|
|
2316
2322
|
this.event = {
|
|
2317
2323
|
id: "",
|
|
@@ -2322,7 +2328,7 @@ const hi = {
|
|
|
2322
2328
|
initData_: function() {
|
|
2323
2329
|
if (this.event.id)
|
|
2324
2330
|
return;
|
|
2325
|
-
const t =
|
|
2331
|
+
const t = Ln()?.[0];
|
|
2326
2332
|
if (!t)
|
|
2327
2333
|
return;
|
|
2328
2334
|
this.event.id = t.id, this.event.name = t.name, this.event.params = t.params;
|
|
@@ -2340,7 +2346,7 @@ const hi = {
|
|
|
2340
2346
|
}, 0);
|
|
2341
2347
|
},
|
|
2342
2348
|
genEventOpts_: function() {
|
|
2343
|
-
return
|
|
2349
|
+
return jo();
|
|
2344
2350
|
},
|
|
2345
2351
|
onchange: function(t) {
|
|
2346
2352
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -2355,7 +2361,7 @@ const hi = {
|
|
|
2355
2361
|
}
|
|
2356
2362
|
},
|
|
2357
2363
|
onEventChange_: function(t) {
|
|
2358
|
-
const e =
|
|
2364
|
+
const e = tn(t);
|
|
2359
2365
|
e ? (this.event.id = e.id, this.event.name = e.name, this.event.params = e.params) : (this.event.id = "", this.event.name = "", this.event.params = []);
|
|
2360
2366
|
},
|
|
2361
2367
|
updateShape_: function() {
|
|
@@ -2370,8 +2376,8 @@ const hi = {
|
|
|
2370
2376
|
e.connection.setShadowDom(null);
|
|
2371
2377
|
const n = e.connection.targetBlock();
|
|
2372
2378
|
n && !n.isShadow() && n.dispose();
|
|
2373
|
-
const o = this.event.params[t]
|
|
2374
|
-
|
|
2379
|
+
const { type: o } = this.event.params[t], i = Ye(o);
|
|
2380
|
+
e.setCheck(i);
|
|
2375
2381
|
}
|
|
2376
2382
|
},
|
|
2377
2383
|
updateShadows_: function() {
|
|
@@ -2383,7 +2389,7 @@ const hi = {
|
|
|
2383
2389
|
}
|
|
2384
2390
|
},
|
|
2385
2391
|
checkWarning_: function() {
|
|
2386
|
-
const t =
|
|
2392
|
+
const t = tn(this.event.id);
|
|
2387
2393
|
if (!t) {
|
|
2388
2394
|
this.setWarningText(_.WARN_EVENT_NOT_FOUND);
|
|
2389
2395
|
return;
|
|
@@ -2395,7 +2401,7 @@ const hi = {
|
|
|
2395
2401
|
this.setWarningText(null);
|
|
2396
2402
|
}
|
|
2397
2403
|
};
|
|
2398
|
-
d.trigger_comp_event_v1 =
|
|
2404
|
+
d.trigger_comp_event_v1 = fi;
|
|
2399
2405
|
s.forBlock.trigger_comp_event_v1 = function() {
|
|
2400
2406
|
return "";
|
|
2401
2407
|
};
|
|
@@ -3102,7 +3108,7 @@ function ${s.FUNCTION_NAME_PLACEHOLDER_}(r, g, b) {
|
|
|
3102
3108
|
`
|
|
3103
3109
|
)}(${e}, ${n}, ${o})`, c.FUNCTION_CALL];
|
|
3104
3110
|
};
|
|
3105
|
-
const
|
|
3111
|
+
const mi = v.xml, Ti = [
|
|
3106
3112
|
{
|
|
3107
3113
|
type: "add_data_v1",
|
|
3108
3114
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
@@ -3164,16 +3170,16 @@ const di = v.xml, fi = [
|
|
|
3164
3170
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
3165
3171
|
}
|
|
3166
3172
|
];
|
|
3167
|
-
function
|
|
3168
|
-
const n =
|
|
3173
|
+
function Ei(t, e) {
|
|
3174
|
+
const n = Ti.find((o) => o.type === t);
|
|
3169
3175
|
return n ? !!(n.prefixInputs?.some((o) => e.startsWith(o)) || n.inputs?.some((o) => o === e)) : !1;
|
|
3170
3176
|
}
|
|
3171
|
-
const
|
|
3177
|
+
const gi = {
|
|
3172
3178
|
init: function() {
|
|
3173
3179
|
this.key = "", this.name = "", this.locale = !1, this.appendDummyInput().appendField("", "LABEL"), this.setOutput(!0), this.setColour(220);
|
|
3174
3180
|
},
|
|
3175
3181
|
mutationToDom: function() {
|
|
3176
|
-
const t =
|
|
3182
|
+
const t = mi.createElement("mutation");
|
|
3177
3183
|
return t.setAttribute("key", this.key), t.setAttribute("name", this.name), t.setAttribute("locale", this.locale ? "TRUE" : "FALSE"), t;
|
|
3178
3184
|
},
|
|
3179
3185
|
domToMutation: function(t) {
|
|
@@ -3202,12 +3208,12 @@ const Ti = {
|
|
|
3202
3208
|
},
|
|
3203
3209
|
tryDuplicate_: function(t) {
|
|
3204
3210
|
const e = this.workspace.getBlockById(t.oldParentId);
|
|
3205
|
-
if (e &&
|
|
3211
|
+
if (e && Ei(e.type, t.oldInputName))
|
|
3206
3212
|
try {
|
|
3207
3213
|
E.disable();
|
|
3208
3214
|
const n = e.getInput(t.oldInputName)?.connection;
|
|
3209
3215
|
if (n) {
|
|
3210
|
-
const o =
|
|
3216
|
+
const o = Ht(
|
|
3211
3217
|
this.workspace,
|
|
3212
3218
|
this.key,
|
|
3213
3219
|
this.name,
|
|
@@ -3223,7 +3229,7 @@ const Ti = {
|
|
|
3223
3229
|
this.locale ? this.setFieldValue(_[this.name], "LABEL") : this.setFieldValue(this.name, "LABEL");
|
|
3224
3230
|
}
|
|
3225
3231
|
};
|
|
3226
|
-
d.parameter_v1 =
|
|
3232
|
+
d.parameter_v1 = gi;
|
|
3227
3233
|
s.forBlock.parameter_v1 = function(t) {
|
|
3228
3234
|
return [t.key, c.ATOMIC];
|
|
3229
3235
|
};
|
|
@@ -3233,10 +3239,10 @@ function Oe(t) {
|
|
|
3233
3239
|
n.funcs.length > 0 && e.push(n);
|
|
3234
3240
|
}), e;
|
|
3235
3241
|
}
|
|
3236
|
-
function
|
|
3242
|
+
function ze(t) {
|
|
3237
3243
|
return T.compute.spaces.find((e) => e.id === t);
|
|
3238
3244
|
}
|
|
3239
|
-
function
|
|
3245
|
+
function Rn(t) {
|
|
3240
3246
|
const e = [];
|
|
3241
3247
|
return Oe().forEach(({ id: o, name: i }) => {
|
|
3242
3248
|
e.push([i, o]);
|
|
@@ -3251,26 +3257,26 @@ function Ie(t, e) {
|
|
|
3251
3257
|
if (n)
|
|
3252
3258
|
return n.funcs.find((o) => o.id === e);
|
|
3253
3259
|
}
|
|
3254
|
-
function
|
|
3260
|
+
function Dn(t) {
|
|
3255
3261
|
const e = [];
|
|
3256
3262
|
return Pe(t).forEach(({ id: o, name: i }) => {
|
|
3257
3263
|
e.push([i, o]);
|
|
3258
3264
|
}), N(e);
|
|
3259
3265
|
}
|
|
3260
|
-
function
|
|
3266
|
+
function Yt() {
|
|
3261
3267
|
return T.compute.activeFunc;
|
|
3262
3268
|
}
|
|
3263
|
-
function
|
|
3269
|
+
function an(t) {
|
|
3264
3270
|
const { outputs: e } = T.compute.activeFunc;
|
|
3265
3271
|
return e.find((n) => n.id === t);
|
|
3266
3272
|
}
|
|
3267
|
-
function
|
|
3273
|
+
function Ii() {
|
|
3268
3274
|
const t = [], { outputs: e } = T.compute.activeFunc;
|
|
3269
3275
|
return e.forEach(({ id: n, name: o }) => {
|
|
3270
3276
|
t.push([o, n]);
|
|
3271
3277
|
}), N(t);
|
|
3272
3278
|
}
|
|
3273
|
-
const
|
|
3279
|
+
const Ai = {
|
|
3274
3280
|
init: function() {
|
|
3275
3281
|
this.space = {
|
|
3276
3282
|
id: "",
|
|
@@ -3310,10 +3316,10 @@ const gi = {
|
|
|
3310
3316
|
}, 0);
|
|
3311
3317
|
},
|
|
3312
3318
|
genSpaceOpts_: function() {
|
|
3313
|
-
return
|
|
3319
|
+
return Rn();
|
|
3314
3320
|
},
|
|
3315
3321
|
genFuncOpts_: function() {
|
|
3316
|
-
return
|
|
3322
|
+
return Dn(this.space.id);
|
|
3317
3323
|
},
|
|
3318
3324
|
onchange: function(t) {
|
|
3319
3325
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -3328,7 +3334,7 @@ const gi = {
|
|
|
3328
3334
|
}
|
|
3329
3335
|
},
|
|
3330
3336
|
onSpaceChange_: function(t) {
|
|
3331
|
-
const e =
|
|
3337
|
+
const e = ze(t);
|
|
3332
3338
|
if (!e) {
|
|
3333
3339
|
console.assert(!1);
|
|
3334
3340
|
return;
|
|
@@ -3372,8 +3378,8 @@ const gi = {
|
|
|
3372
3378
|
},
|
|
3373
3379
|
updateCheck_: function() {
|
|
3374
3380
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
3375
|
-
const { type: e } = this.func.inputs[t], n =
|
|
3376
|
-
|
|
3381
|
+
const { type: e } = this.func.inputs[t], n = Ye(e);
|
|
3382
|
+
this.getInput("INPUT" + t).connection.setCheck(n);
|
|
3377
3383
|
}
|
|
3378
3384
|
},
|
|
3379
3385
|
updateShadow_: function() {
|
|
@@ -3403,7 +3409,7 @@ const gi = {
|
|
|
3403
3409
|
F(this, t);
|
|
3404
3410
|
},
|
|
3405
3411
|
checkWarning_: function() {
|
|
3406
|
-
const t =
|
|
3412
|
+
const t = ze(this.space.id);
|
|
3407
3413
|
if (!t) {
|
|
3408
3414
|
this.setWarningText(_.WARN_SPACE_NOT_FOUND);
|
|
3409
3415
|
return;
|
|
@@ -3425,7 +3431,7 @@ const gi = {
|
|
|
3425
3431
|
this.setWarningText(null);
|
|
3426
3432
|
}
|
|
3427
3433
|
};
|
|
3428
|
-
d.call_func_v1 =
|
|
3434
|
+
d.call_func_v1 = Ai;
|
|
3429
3435
|
s.forBlock.call_func_v1 = function(t) {
|
|
3430
3436
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3431
3437
|
let l = "";
|
|
@@ -3452,7 +3458,7 @@ ${e}var __result__ = __callFuncV1__(${i},${a},__inputs__,__getEnvV1__(),${u});
|
|
|
3452
3458
|
${r}${p}}
|
|
3453
3459
|
`;
|
|
3454
3460
|
};
|
|
3455
|
-
const
|
|
3461
|
+
const Oi = {
|
|
3456
3462
|
init: function() {
|
|
3457
3463
|
this.space = {
|
|
3458
3464
|
id: "",
|
|
@@ -3492,10 +3498,10 @@ const Ii = {
|
|
|
3492
3498
|
}, 0);
|
|
3493
3499
|
},
|
|
3494
3500
|
genSpaceOpts_: function() {
|
|
3495
|
-
return
|
|
3501
|
+
return Rn();
|
|
3496
3502
|
},
|
|
3497
3503
|
genFuncOpts_: function() {
|
|
3498
|
-
return
|
|
3504
|
+
return Dn(this.space.id);
|
|
3499
3505
|
},
|
|
3500
3506
|
onchange: function(t) {
|
|
3501
3507
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -3510,7 +3516,7 @@ const Ii = {
|
|
|
3510
3516
|
}
|
|
3511
3517
|
},
|
|
3512
3518
|
onSpaceChange_: function(t) {
|
|
3513
|
-
const e =
|
|
3519
|
+
const e = ze(t);
|
|
3514
3520
|
if (!e) {
|
|
3515
3521
|
console.assert(!1);
|
|
3516
3522
|
return;
|
|
@@ -3554,8 +3560,8 @@ const Ii = {
|
|
|
3554
3560
|
},
|
|
3555
3561
|
updateCheck_: function() {
|
|
3556
3562
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
3557
|
-
const { type: e } = this.func.inputs[t], n =
|
|
3558
|
-
|
|
3563
|
+
const { type: e } = this.func.inputs[t], n = Ye(e);
|
|
3564
|
+
this.getInput("INPUT" + t).connection.setCheck(n);
|
|
3559
3565
|
}
|
|
3560
3566
|
},
|
|
3561
3567
|
updateShadow_: function() {
|
|
@@ -3585,7 +3591,7 @@ const Ii = {
|
|
|
3585
3591
|
F(this, t);
|
|
3586
3592
|
},
|
|
3587
3593
|
checkWarning_: function() {
|
|
3588
|
-
const t =
|
|
3594
|
+
const t = ze(this.space.id);
|
|
3589
3595
|
if (!t) {
|
|
3590
3596
|
this.setWarningText(_.WARN_SPACE_NOT_FOUND);
|
|
3591
3597
|
return;
|
|
@@ -3607,7 +3613,7 @@ const Ii = {
|
|
|
3607
3613
|
this.setWarningText(null);
|
|
3608
3614
|
}
|
|
3609
3615
|
};
|
|
3610
|
-
d.call_func_internal_v1 =
|
|
3616
|
+
d.call_func_internal_v1 = Oi;
|
|
3611
3617
|
s.forBlock.call_func_internal_v1 = function(t) {
|
|
3612
3618
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3613
3619
|
let l = `${e}var __inputs__ = {
|
|
@@ -3659,7 +3665,7 @@ s.forBlock.compute_debug_trace_v1 = function(t) {
|
|
|
3659
3665
|
return `__debugTraceV1__(${s.valueToCode(t, "OBJECT", c.ATOMIC)});
|
|
3660
3666
|
`;
|
|
3661
3667
|
};
|
|
3662
|
-
const
|
|
3668
|
+
const Ci = {
|
|
3663
3669
|
init: function() {
|
|
3664
3670
|
this.func = {
|
|
3665
3671
|
id: "",
|
|
@@ -3669,7 +3675,7 @@ const Ai = {
|
|
|
3669
3675
|
initData_: function() {
|
|
3670
3676
|
if (this.func.id)
|
|
3671
3677
|
return;
|
|
3672
|
-
const { id: t, inputs: e } =
|
|
3678
|
+
const { id: t, inputs: e } = Yt();
|
|
3673
3679
|
this.func.id = t, this.func.inputs = e;
|
|
3674
3680
|
},
|
|
3675
3681
|
saveExtraState: function() {
|
|
@@ -3706,7 +3712,7 @@ const Ai = {
|
|
|
3706
3712
|
F(this, t);
|
|
3707
3713
|
},
|
|
3708
3714
|
checkWarning_: function() {
|
|
3709
|
-
const { id: t, inputs: e } =
|
|
3715
|
+
const { id: t, inputs: e } = Yt();
|
|
3710
3716
|
if (this.func.id !== t && (this.func.id = t), !U(e, this.func.inputs)) {
|
|
3711
3717
|
this.setWarningText(_.WARN_FUNC_HAS_CHANGED);
|
|
3712
3718
|
return;
|
|
@@ -3714,7 +3720,7 @@ const Ai = {
|
|
|
3714
3720
|
this.setWarningText(null);
|
|
3715
3721
|
}
|
|
3716
3722
|
};
|
|
3717
|
-
d.func_entry_v1 =
|
|
3723
|
+
d.func_entry_v1 = Ci;
|
|
3718
3724
|
s.forBlock.func_entry_v1 = function(t) {
|
|
3719
3725
|
const e = t, n = s.statementToCode(e, "HANDLE"), o = [];
|
|
3720
3726
|
for (let a = 0; a < e.func.inputs.length; a++) {
|
|
@@ -3724,16 +3730,16 @@ s.forBlock.func_entry_v1 = function(t) {
|
|
|
3724
3730
|
return `function __funcEntryV1__(${o.join(", ")}) {
|
|
3725
3731
|
${n}}`;
|
|
3726
3732
|
};
|
|
3727
|
-
const
|
|
3733
|
+
const ki = {
|
|
3728
3734
|
init: function() {
|
|
3729
3735
|
}
|
|
3730
3736
|
};
|
|
3731
|
-
d.on_flow_state_event_v1 =
|
|
3737
|
+
d.on_flow_state_event_v1 = ki;
|
|
3732
3738
|
s.forBlock.on_flow_state_event_v1 = function() {
|
|
3733
3739
|
return `__onFlowStateEventV1__();
|
|
3734
3740
|
`;
|
|
3735
3741
|
};
|
|
3736
|
-
const
|
|
3742
|
+
const vi = {
|
|
3737
3743
|
init: function() {
|
|
3738
3744
|
this.output = {
|
|
3739
3745
|
id: "",
|
|
@@ -3744,7 +3750,7 @@ const Ci = {
|
|
|
3744
3750
|
initData_: function() {
|
|
3745
3751
|
if (this.output.id)
|
|
3746
3752
|
return;
|
|
3747
|
-
const t =
|
|
3753
|
+
const t = Yt().outputs?.[0];
|
|
3748
3754
|
t && (this.output.id = t.id, this.output.name = t.name, this.output.type = t.type);
|
|
3749
3755
|
},
|
|
3750
3756
|
saveExtraState: function() {
|
|
@@ -3758,7 +3764,7 @@ const Ci = {
|
|
|
3758
3764
|
}, 0);
|
|
3759
3765
|
},
|
|
3760
3766
|
genOutputOpts_: function() {
|
|
3761
|
-
return
|
|
3767
|
+
return Ii();
|
|
3762
3768
|
},
|
|
3763
3769
|
onchange: function(t) {
|
|
3764
3770
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -3773,7 +3779,7 @@ const Ci = {
|
|
|
3773
3779
|
}
|
|
3774
3780
|
},
|
|
3775
3781
|
onOutputChange_: function(t) {
|
|
3776
|
-
const e =
|
|
3782
|
+
const e = an(t);
|
|
3777
3783
|
if (!e) {
|
|
3778
3784
|
console.assert(!1);
|
|
3779
3785
|
return;
|
|
@@ -3785,8 +3791,8 @@ const Ci = {
|
|
|
3785
3791
|
t.connection.setShadowDom(null);
|
|
3786
3792
|
const e = t.connection.targetBlock();
|
|
3787
3793
|
e && !e.isShadow() && e.dispose();
|
|
3788
|
-
const n = this.output.type;
|
|
3789
|
-
|
|
3794
|
+
const n = Ye(this.output.type);
|
|
3795
|
+
t.setCheck(n);
|
|
3790
3796
|
},
|
|
3791
3797
|
updateShadows_: function() {
|
|
3792
3798
|
if (this.isInsertionMarker())
|
|
@@ -3796,7 +3802,7 @@ const Ci = {
|
|
|
3796
3802
|
e === "string" ? t = S({ type: "string", default: "" }) : e === "number" ? t = S({ type: "number", default: 0 }) : e === "boolean" && (t = S({ type: "boolean", default: !1 })), this.getInput("VALUE").connection.setShadowDom(t);
|
|
3797
3803
|
},
|
|
3798
3804
|
checkWarning_: function() {
|
|
3799
|
-
const t =
|
|
3805
|
+
const t = an(this.output.id);
|
|
3800
3806
|
if (!t) {
|
|
3801
3807
|
this.setWarningText(_.WARN_FUNC_HAS_CHANGED);
|
|
3802
3808
|
return;
|
|
@@ -3808,7 +3814,7 @@ const Ci = {
|
|
|
3808
3814
|
this.setWarningText(null);
|
|
3809
3815
|
}
|
|
3810
3816
|
};
|
|
3811
|
-
d.set_func_output_v1 =
|
|
3817
|
+
d.set_func_output_v1 = vi;
|
|
3812
3818
|
s.forBlock.set_func_output_v1 = function(t) {
|
|
3813
3819
|
const e = s.quote_, n = t, { id: o, type: i } = n.output;
|
|
3814
3820
|
let a = s.valueToCode(n, "VALUE", c.ATOMIC);
|
|
@@ -3845,7 +3851,7 @@ function _e(t) {
|
|
|
3845
3851
|
const { spaces: e } = T.data;
|
|
3846
3852
|
return e.find((n) => n.id === t);
|
|
3847
3853
|
}
|
|
3848
|
-
function
|
|
3854
|
+
function ut() {
|
|
3849
3855
|
const t = [];
|
|
3850
3856
|
return J().forEach(({ id: n, name: o }) => {
|
|
3851
3857
|
t.push([o, n]);
|
|
@@ -3860,20 +3866,20 @@ function X(t, e) {
|
|
|
3860
3866
|
if (o)
|
|
3861
3867
|
return o.tables.find((i) => i.id === e);
|
|
3862
3868
|
}
|
|
3863
|
-
function
|
|
3869
|
+
function rt(t) {
|
|
3864
3870
|
const e = [];
|
|
3865
3871
|
return H(t).forEach(({ id: o, name: i }) => {
|
|
3866
3872
|
e.push([i, o]);
|
|
3867
3873
|
}), N(e);
|
|
3868
3874
|
}
|
|
3869
|
-
function
|
|
3875
|
+
function Ze(t, e) {
|
|
3870
3876
|
const { spaces: n } = T.data, o = n.find((a) => a.id === t);
|
|
3871
3877
|
if (!o)
|
|
3872
3878
|
return [];
|
|
3873
3879
|
const i = o.tables.find((a) => a.id === e);
|
|
3874
3880
|
return i ? i.columns : [];
|
|
3875
3881
|
}
|
|
3876
|
-
function
|
|
3882
|
+
function yt(t, e, n) {
|
|
3877
3883
|
const { spaces: o } = T.data, i = o.find((l) => l.id === t);
|
|
3878
3884
|
if (!i)
|
|
3879
3885
|
return;
|
|
@@ -3881,13 +3887,13 @@ function vt(t, e, n) {
|
|
|
3881
3887
|
if (a)
|
|
3882
3888
|
return a.columns.find((l) => l.id === n);
|
|
3883
3889
|
}
|
|
3884
|
-
function
|
|
3890
|
+
function yi(t, e) {
|
|
3885
3891
|
const n = [];
|
|
3886
|
-
return
|
|
3892
|
+
return Ze(t, e).forEach(({ id: i, name: a }) => {
|
|
3887
3893
|
n.push([a, i]);
|
|
3888
3894
|
}), N(n);
|
|
3889
3895
|
}
|
|
3890
|
-
function
|
|
3896
|
+
function Ni(t) {
|
|
3891
3897
|
const e = t.getInput("TABLE").connection;
|
|
3892
3898
|
if (e.targetBlock())
|
|
3893
3899
|
return;
|
|
@@ -3921,7 +3927,7 @@ function vi(t) {
|
|
|
3921
3927
|
}, l = $.blocks.append(a, t.workspace);
|
|
3922
3928
|
e.connect(l.outputConnection);
|
|
3923
3929
|
}
|
|
3924
|
-
function
|
|
3930
|
+
function Li(t) {
|
|
3925
3931
|
const e = t.getInput("HANDLE").connection;
|
|
3926
3932
|
if (e.targetBlock())
|
|
3927
3933
|
return;
|
|
@@ -3945,7 +3951,7 @@ function yi(t) {
|
|
|
3945
3951
|
}, o = $.blocks.append(n, t.workspace);
|
|
3946
3952
|
e.connect(o.previousConnection);
|
|
3947
3953
|
}
|
|
3948
|
-
const
|
|
3954
|
+
const Si = {
|
|
3949
3955
|
init: function() {
|
|
3950
3956
|
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}");
|
|
3951
3957
|
},
|
|
@@ -3961,14 +3967,14 @@ const Ni = {
|
|
|
3961
3967
|
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(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "SUCCESS"));
|
|
3962
3968
|
},
|
|
3963
3969
|
ensureBlocks_: function() {
|
|
3964
|
-
this.isInsertionMarker() || (
|
|
3970
|
+
this.isInsertionMarker() || (Ni(this), F(this, [
|
|
3965
3971
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
3966
3972
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
3967
3973
|
["DATA", "__data__", "PARAM_DATA", !0]
|
|
3968
|
-
]),
|
|
3974
|
+
]), Li(this));
|
|
3969
3975
|
}
|
|
3970
3976
|
};
|
|
3971
|
-
d.add_data_v1 =
|
|
3977
|
+
d.add_data_v1 = Si;
|
|
3972
3978
|
s.forBlock.add_data_v1 = function(t) {
|
|
3973
3979
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.statementToCode(t, "HANDLE");
|
|
3974
3980
|
return `{
|
|
@@ -3984,7 +3990,7 @@ ${e}}
|
|
|
3984
3990
|
${o}}
|
|
3985
3991
|
`;
|
|
3986
3992
|
};
|
|
3987
|
-
const
|
|
3993
|
+
const bi = {
|
|
3988
3994
|
init: function() {
|
|
3989
3995
|
this.space = {
|
|
3990
3996
|
id: "",
|
|
@@ -4022,7 +4028,7 @@ const Li = {
|
|
|
4022
4028
|
if (!e)
|
|
4023
4029
|
return;
|
|
4024
4030
|
this.table.id = e.id, this.table.name = e.name;
|
|
4025
|
-
const n =
|
|
4031
|
+
const n = Ze(this.space.id, this.table.id)?.[0];
|
|
4026
4032
|
n && (this.column.id = n.id, this.column.name = n.name, this.column.type = n.type, this.column.extend = n.extend);
|
|
4027
4033
|
},
|
|
4028
4034
|
saveExtraState: function() {
|
|
@@ -4038,13 +4044,13 @@ const Li = {
|
|
|
4038
4044
|
}, 0);
|
|
4039
4045
|
},
|
|
4040
4046
|
genSpaceOpts_: function() {
|
|
4041
|
-
return
|
|
4047
|
+
return ut();
|
|
4042
4048
|
},
|
|
4043
4049
|
genTableOpts_: function() {
|
|
4044
|
-
return
|
|
4050
|
+
return rt(this.space.id);
|
|
4045
4051
|
},
|
|
4046
4052
|
genColumnOpts_: function() {
|
|
4047
|
-
return
|
|
4053
|
+
return yi(this.space.id, this.table.id);
|
|
4048
4054
|
},
|
|
4049
4055
|
onchange: function(t) {
|
|
4050
4056
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -4075,13 +4081,13 @@ const Li = {
|
|
|
4075
4081
|
return;
|
|
4076
4082
|
}
|
|
4077
4083
|
const n = e.id !== this.table.id;
|
|
4078
|
-
if (this.table.id = e.id, this.table.name = e.name, n || !
|
|
4079
|
-
const o =
|
|
4084
|
+
if (this.table.id = e.id, this.table.name = e.name, n || !yt(this.space.id, this.table.id, this.column.id)) {
|
|
4085
|
+
const o = Ze(this.space.id, this.table.id)?.[0]?.id ?? "", i = this.getField("COLUMN");
|
|
4080
4086
|
i.getOptions(!1), i.setValue(o, !1), this.onColumnChange_(o);
|
|
4081
4087
|
}
|
|
4082
4088
|
},
|
|
4083
4089
|
onColumnChange_: function(t) {
|
|
4084
|
-
const e =
|
|
4090
|
+
const e = yt(this.space.id, this.table.id, t);
|
|
4085
4091
|
e ? (this.column.id = e.id, this.column.name = e.name, this.column.type = e.type, this.column.extend = e.extend) : (this.column.id = "", this.column.name = "", this.column.type = "", this.column.extend = ""), this.updateShape_(), this.updateBlocks_(!0), this.updateCheck_();
|
|
4086
4092
|
},
|
|
4087
4093
|
updateShape_: function() {
|
|
@@ -4100,12 +4106,12 @@ const Li = {
|
|
|
4100
4106
|
n && n.dispose();
|
|
4101
4107
|
else if (n)
|
|
4102
4108
|
return;
|
|
4103
|
-
const o =
|
|
4109
|
+
const o = Dt(this.workspace, this.column.type);
|
|
4104
4110
|
o && (e.setCheck(null), e.connect(o.outputConnection));
|
|
4105
4111
|
},
|
|
4106
4112
|
updateCheck_: function() {
|
|
4107
|
-
const
|
|
4108
|
-
|
|
4113
|
+
const t = kn(this.column.type);
|
|
4114
|
+
this.getInput("VALUE").connection.setCheck(t);
|
|
4109
4115
|
},
|
|
4110
4116
|
checkWarning_: function() {
|
|
4111
4117
|
const t = _e(this.space.id);
|
|
@@ -4120,7 +4126,7 @@ const Li = {
|
|
|
4120
4126
|
return;
|
|
4121
4127
|
}
|
|
4122
4128
|
e.name !== this.table.name && (this.table.name = e.name);
|
|
4123
|
-
const n =
|
|
4129
|
+
const n = yt(
|
|
4124
4130
|
this.space.id,
|
|
4125
4131
|
this.table.id,
|
|
4126
4132
|
this.column.id
|
|
@@ -4136,7 +4142,7 @@ const Li = {
|
|
|
4136
4142
|
this.setWarningText(null);
|
|
4137
4143
|
}
|
|
4138
4144
|
};
|
|
4139
|
-
d.cond_atomic_v1 =
|
|
4145
|
+
d.cond_atomic_v1 = bi;
|
|
4140
4146
|
s.forBlock.cond_atomic_v1 = function(t) {
|
|
4141
4147
|
const e = s.quote_, n = t, o = n.column.name, i = s.valueToCode(n, "VALUE", c.ATOMIC) || null, l = {
|
|
4142
4148
|
EQ: "=",
|
|
@@ -4148,19 +4154,19 @@ s.forBlock.cond_atomic_v1 = function(t) {
|
|
|
4148
4154
|
}[n.getFieldValue("OP")];
|
|
4149
4155
|
return [`{type:'ATOMIC',key:${e(o)},value:${i},operator:${e(l)}}`, c.ATOMIC];
|
|
4150
4156
|
};
|
|
4151
|
-
const
|
|
4157
|
+
const Bi = {
|
|
4152
4158
|
init: function() {
|
|
4153
4159
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
4154
4160
|
}
|
|
4155
4161
|
};
|
|
4156
|
-
d.cond_logic_container_v1 =
|
|
4157
|
-
const
|
|
4162
|
+
d.cond_logic_container_v1 = Bi;
|
|
4163
|
+
const Ri = {
|
|
4158
4164
|
init: function() {
|
|
4159
4165
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
4160
4166
|
}
|
|
4161
4167
|
};
|
|
4162
|
-
d.cond_logic_item_v1 =
|
|
4163
|
-
const
|
|
4168
|
+
d.cond_logic_item_v1 = Ri;
|
|
4169
|
+
const Di = {
|
|
4164
4170
|
init: function() {
|
|
4165
4171
|
this.itemCount_ = 1, this.appendValueInput("VALUE").setCheck("Condition").appendField(
|
|
4166
4172
|
new m([
|
|
@@ -4234,7 +4240,7 @@ const Bi = {
|
|
|
4234
4240
|
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setCheck("Condition");
|
|
4235
4241
|
}
|
|
4236
4242
|
};
|
|
4237
|
-
d.cond_logic_v1 =
|
|
4243
|
+
d.cond_logic_v1 = Di;
|
|
4238
4244
|
s.forBlock.cond_logic_v1 = function(t) {
|
|
4239
4245
|
const e = s.quote_, n = t, o = n.getFieldValue("TYPE"), i = [], a = s.valueToCode(n, "VALUE", c.ATOMIC) || null;
|
|
4240
4246
|
i.push(a);
|
|
@@ -4244,7 +4250,7 @@ s.forBlock.cond_logic_v1 = function(t) {
|
|
|
4244
4250
|
}
|
|
4245
4251
|
return [`{type:${e(o)},entries:[${i}]}`, c.ATOMIC];
|
|
4246
4252
|
};
|
|
4247
|
-
function
|
|
4253
|
+
function Ui(t) {
|
|
4248
4254
|
const e = t.getInput("TABLE").connection;
|
|
4249
4255
|
if (e.targetBlock())
|
|
4250
4256
|
return;
|
|
@@ -4263,11 +4269,11 @@ function Ri(t) {
|
|
|
4263
4269
|
}, a = $.blocks.append(i, t.workspace);
|
|
4264
4270
|
e.connect(a.outputConnection);
|
|
4265
4271
|
}
|
|
4266
|
-
function
|
|
4272
|
+
function Mi(t) {
|
|
4267
4273
|
const e = t.getInput("CONDITION").connection;
|
|
4268
4274
|
if (e.targetBlock())
|
|
4269
4275
|
return;
|
|
4270
|
-
const n = J()?.[0], o = H(n?.id ?? "")?.[0], i =
|
|
4276
|
+
const n = J()?.[0], o = H(n?.id ?? "")?.[0], i = Ze(n?.id, o?.id)?.[0], a = {
|
|
4271
4277
|
type: "cond_atomic_v1",
|
|
4272
4278
|
extraState: {
|
|
4273
4279
|
space: {
|
|
@@ -4288,7 +4294,7 @@ function Di(t) {
|
|
|
4288
4294
|
}, l = $.blocks.append(a, t.workspace);
|
|
4289
4295
|
e.connect(l.outputConnection);
|
|
4290
4296
|
}
|
|
4291
|
-
function
|
|
4297
|
+
function Pi(t) {
|
|
4292
4298
|
const e = t.getInput("HANDLE").connection;
|
|
4293
4299
|
if (e.targetBlock())
|
|
4294
4300
|
return;
|
|
@@ -4312,7 +4318,7 @@ function Ui(t) {
|
|
|
4312
4318
|
}, o = $.blocks.append(n, t.workspace);
|
|
4313
4319
|
e.connect(o.previousConnection);
|
|
4314
4320
|
}
|
|
4315
|
-
const
|
|
4321
|
+
const Vi = {
|
|
4316
4322
|
init: function() {
|
|
4317
4323
|
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}");
|
|
4318
4324
|
},
|
|
@@ -4328,13 +4334,13 @@ const Mi = {
|
|
|
4328
4334
|
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(k.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("SelectTable").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
4329
4335
|
},
|
|
4330
4336
|
ensureBlocks_: function() {
|
|
4331
|
-
this.isInsertionMarker() || (
|
|
4337
|
+
this.isInsertionMarker() || (Ui(this), Mi(this), F(this, [
|
|
4332
4338
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
4333
4339
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0]
|
|
4334
|
-
]),
|
|
4340
|
+
]), Pi(this));
|
|
4335
4341
|
}
|
|
4336
4342
|
};
|
|
4337
|
-
d.delete_data_v1 =
|
|
4343
|
+
d.delete_data_v1 = Vi;
|
|
4338
4344
|
s.forBlock.delete_data_v1 = function(t) {
|
|
4339
4345
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", c.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
|
|
4340
4346
|
return `{
|
|
@@ -4372,7 +4378,7 @@ s.forBlock.interrupt_transaction_v1 = function(t) {
|
|
|
4372
4378
|
return `throw ${s.valueToCode(t, "VALUE", c.NONE) || "''"};
|
|
4373
4379
|
`;
|
|
4374
4380
|
};
|
|
4375
|
-
function
|
|
4381
|
+
function xi(t) {
|
|
4376
4382
|
const e = t.getInput("TABLE").connection;
|
|
4377
4383
|
if (e.targetBlock())
|
|
4378
4384
|
return;
|
|
@@ -4406,7 +4412,7 @@ function Pi(t) {
|
|
|
4406
4412
|
}, l = $.blocks.append(a, t.workspace);
|
|
4407
4413
|
e.connect(l.outputConnection);
|
|
4408
4414
|
}
|
|
4409
|
-
function
|
|
4415
|
+
function Fi(t) {
|
|
4410
4416
|
const e = t.getInput("CONDITION").connection;
|
|
4411
4417
|
if (e.targetBlock())
|
|
4412
4418
|
return;
|
|
@@ -4415,7 +4421,7 @@ function Vi(t) {
|
|
|
4415
4421
|
}, o = $.blocks.append(n, t.workspace);
|
|
4416
4422
|
e.connect(o.outputConnection);
|
|
4417
4423
|
}
|
|
4418
|
-
function
|
|
4424
|
+
function Yi(t) {
|
|
4419
4425
|
const e = t.getInput("EXTRA").connection;
|
|
4420
4426
|
if (e.targetBlock())
|
|
4421
4427
|
return;
|
|
@@ -4452,7 +4458,7 @@ function xi(t) {
|
|
|
4452
4458
|
}, o = $.blocks.append(n, t.workspace);
|
|
4453
4459
|
e.connect(o.outputConnection);
|
|
4454
4460
|
}
|
|
4455
|
-
function
|
|
4461
|
+
function wi(t) {
|
|
4456
4462
|
const e = t.getInput("HANDLE").connection;
|
|
4457
4463
|
if (e.targetBlock())
|
|
4458
4464
|
return;
|
|
@@ -4490,7 +4496,7 @@ h([
|
|
|
4490
4496
|
style: "procedure_blocks"
|
|
4491
4497
|
}
|
|
4492
4498
|
]);
|
|
4493
|
-
const
|
|
4499
|
+
const Ki = {
|
|
4494
4500
|
init: function() {
|
|
4495
4501
|
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}");
|
|
4496
4502
|
},
|
|
@@ -4506,15 +4512,15 @@ const Yi = {
|
|
|
4506
4512
|
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(k.Align.RIGHT).appendField("%{BKY_DATA_EXTRA}"), this.moveInputBefore("EXTRA", "SUCCESS")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "EXTRA")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck(["SelectColumn", "Array"]).setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
4507
4513
|
},
|
|
4508
4514
|
ensureBlocks_: function() {
|
|
4509
|
-
this.isInsertionMarker() || (
|
|
4515
|
+
this.isInsertionMarker() || (xi(this), Fi(this), Yi(this), F(this, [
|
|
4510
4516
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
4511
4517
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
4512
4518
|
["MAIN_DATA", "__mainData__", "PARAM_MAIN_DATA", !0],
|
|
4513
4519
|
["EXTRA_DATA", "__extraData__", "PARAM_EXTRA_DATA", !0]
|
|
4514
|
-
]),
|
|
4520
|
+
]), wi(this));
|
|
4515
4521
|
}
|
|
4516
4522
|
};
|
|
4517
|
-
d.query_data_v1 =
|
|
4523
|
+
d.query_data_v1 = Ki;
|
|
4518
4524
|
s.forBlock.query_data_v1 = function(t) {
|
|
4519
4525
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", c.ATOMIC) || "null", i = s.valueToCode(t, "EXTRA", c.ATOMIC) || "null", a = s.statementToCode(t, "HANDLE");
|
|
4520
4526
|
return `{
|
|
@@ -4587,19 +4593,19 @@ s.forBlock.query_extra_sortby_v1 = function(t) {
|
|
|
4587
4593
|
const e = s.valueToCode(t, "COLUMN", c.ATOMIC) || "''", n = s.valueToCode(t, "DESC", c.ATOMIC) || !1;
|
|
4588
4594
|
return [`{type:'sortby',value:${e},value2:${n}}`, c.ATOMIC];
|
|
4589
4595
|
};
|
|
4590
|
-
const
|
|
4596
|
+
const $i = {
|
|
4591
4597
|
init: function() {
|
|
4592
4598
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4593
4599
|
}
|
|
4594
4600
|
};
|
|
4595
|
-
d.select_column_container_v1 =
|
|
4596
|
-
const
|
|
4601
|
+
d.select_column_container_v1 = $i;
|
|
4602
|
+
const Hi = {
|
|
4597
4603
|
init: function() {
|
|
4598
4604
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4599
4605
|
}
|
|
4600
4606
|
};
|
|
4601
|
-
d.select_column_item_v1 =
|
|
4602
|
-
const
|
|
4607
|
+
d.select_column_item_v1 = Hi;
|
|
4608
|
+
const Gi = {
|
|
4603
4609
|
init: function() {
|
|
4604
4610
|
this.space = {
|
|
4605
4611
|
id: "",
|
|
@@ -4644,10 +4650,10 @@ const $i = {
|
|
|
4644
4650
|
}, 0);
|
|
4645
4651
|
},
|
|
4646
4652
|
genSpaceOpts_: function() {
|
|
4647
|
-
return
|
|
4653
|
+
return ut();
|
|
4648
4654
|
},
|
|
4649
4655
|
genTableOpts_: function() {
|
|
4650
|
-
return
|
|
4656
|
+
return rt(this.space.id);
|
|
4651
4657
|
},
|
|
4652
4658
|
genColumnOpts_: function() {
|
|
4653
4659
|
const t = [];
|
|
@@ -4794,7 +4800,7 @@ const $i = {
|
|
|
4794
4800
|
this.setWarningText(null);
|
|
4795
4801
|
}
|
|
4796
4802
|
};
|
|
4797
|
-
d.select_column_v1 =
|
|
4803
|
+
d.select_column_v1 = Gi;
|
|
4798
4804
|
s.forBlock.select_column_v1 = function(t) {
|
|
4799
4805
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
4800
4806
|
for (let r = 0; r < n.itemCount_; r++) {
|
|
@@ -4806,7 +4812,7 @@ s.forBlock.select_column_v1 = function(t) {
|
|
|
4806
4812
|
I !== 0 && (l += ","), l += `{name:${e(r)},alias:${e(p)}}`;
|
|
4807
4813
|
}), l += "]", [`{spaceid:${e(o)},tableid:${e(i)},columns:${l}}`, c.ATOMIC];
|
|
4808
4814
|
};
|
|
4809
|
-
const
|
|
4815
|
+
const Wi = {
|
|
4810
4816
|
init: function() {
|
|
4811
4817
|
this.space = {
|
|
4812
4818
|
id: "",
|
|
@@ -4842,10 +4848,10 @@ const Hi = {
|
|
|
4842
4848
|
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_();
|
|
4843
4849
|
},
|
|
4844
4850
|
genSpaceOpts_: function() {
|
|
4845
|
-
return
|
|
4851
|
+
return ut();
|
|
4846
4852
|
},
|
|
4847
4853
|
genTableOpts_: function() {
|
|
4848
|
-
return
|
|
4854
|
+
return rt(this.space.id);
|
|
4849
4855
|
},
|
|
4850
4856
|
onchange: function(t) {
|
|
4851
4857
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -4894,12 +4900,12 @@ const Hi = {
|
|
|
4894
4900
|
e.name !== this.table.name && (this.table.name = e.name), this.setWarningText(null);
|
|
4895
4901
|
}
|
|
4896
4902
|
};
|
|
4897
|
-
d.select_table_v1 =
|
|
4903
|
+
d.select_table_v1 = Wi;
|
|
4898
4904
|
s.forBlock.select_table_v1 = function(t) {
|
|
4899
4905
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id;
|
|
4900
4906
|
return [`{spaceid:${e(o)},tableid:${e(i)}}`, c.ATOMIC];
|
|
4901
4907
|
};
|
|
4902
|
-
const
|
|
4908
|
+
const ji = {
|
|
4903
4909
|
init: function() {
|
|
4904
4910
|
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}");
|
|
4905
4911
|
},
|
|
@@ -4921,9 +4927,9 @@ const Gi = {
|
|
|
4921
4927
|
]);
|
|
4922
4928
|
}
|
|
4923
4929
|
};
|
|
4924
|
-
d.transaction_v1 =
|
|
4930
|
+
d.transaction_v1 = ji;
|
|
4925
4931
|
s.forBlock.transaction_v1 = function(t) {
|
|
4926
|
-
const e = s.INDENT, n = t, o =
|
|
4932
|
+
const e = s.INDENT, n = t, o = Ro(n), i = s.statementToCode(n, "HANDLE"), a = s.statementToCode(n, "FINALLY");
|
|
4927
4933
|
return `{
|
|
4928
4934
|
${e}var __error${o}__ = '';
|
|
4929
4935
|
${e}var __txExist${o}__ = typeof(__tx__) !== 'undefined';
|
|
@@ -4965,19 +4971,19 @@ ${e}}
|
|
|
4965
4971
|
}
|
|
4966
4972
|
`;
|
|
4967
4973
|
};
|
|
4968
|
-
const
|
|
4974
|
+
const Xi = {
|
|
4969
4975
|
init: function() {
|
|
4970
4976
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4971
4977
|
}
|
|
4972
4978
|
};
|
|
4973
|
-
d.update_column_container_v1 =
|
|
4974
|
-
const
|
|
4979
|
+
d.update_column_container_v1 = Xi;
|
|
4980
|
+
const Ji = {
|
|
4975
4981
|
init: function() {
|
|
4976
4982
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4977
4983
|
}
|
|
4978
4984
|
};
|
|
4979
|
-
d.update_column_item_v1 =
|
|
4980
|
-
const
|
|
4985
|
+
d.update_column_item_v1 = Ji;
|
|
4986
|
+
const qi = {
|
|
4981
4987
|
init: function() {
|
|
4982
4988
|
this.space = {
|
|
4983
4989
|
id: "",
|
|
@@ -5022,10 +5028,10 @@ const Xi = {
|
|
|
5022
5028
|
}, 0);
|
|
5023
5029
|
},
|
|
5024
5030
|
genSpaceOpts_: function() {
|
|
5025
|
-
return
|
|
5031
|
+
return ut();
|
|
5026
5032
|
},
|
|
5027
5033
|
genTableOpts_: function() {
|
|
5028
|
-
return
|
|
5034
|
+
return rt(this.space.id);
|
|
5029
5035
|
},
|
|
5030
5036
|
genColumnOpts_: function() {
|
|
5031
5037
|
const t = [];
|
|
@@ -5090,7 +5096,7 @@ const Xi = {
|
|
|
5090
5096
|
}
|
|
5091
5097
|
const o = this.getInput("ADD" + t).connection, i = o.targetBlock();
|
|
5092
5098
|
i && i.dispose();
|
|
5093
|
-
const a =
|
|
5099
|
+
const a = Dt(this.workspace, n.type);
|
|
5094
5100
|
a && (o.setCheck(null), o.connect(a.outputConnection)), this.updateCheck_();
|
|
5095
5101
|
},
|
|
5096
5102
|
decompose: function(t) {
|
|
@@ -5166,25 +5172,26 @@ const Xi = {
|
|
|
5166
5172
|
updateBlocks_: function(t) {
|
|
5167
5173
|
if (!this.isInsertionMarker())
|
|
5168
5174
|
for (let e = 0; e < this.itemCount_; e++) {
|
|
5169
|
-
const n = this.getInput("ADD" + e)
|
|
5175
|
+
const n = this.getInput("ADD" + e), o = n.connection, i = o.targetBlock();
|
|
5170
5176
|
if (t)
|
|
5171
|
-
|
|
5172
|
-
else if (
|
|
5177
|
+
i && i.dispose();
|
|
5178
|
+
else if (i)
|
|
5173
5179
|
continue;
|
|
5174
|
-
const
|
|
5175
|
-
if (!
|
|
5180
|
+
const a = this.getFieldValue("COLUMN" + e), l = this.table.columns.find((r) => r.id === a);
|
|
5181
|
+
if (!l)
|
|
5176
5182
|
continue;
|
|
5177
|
-
|
|
5178
|
-
|
|
5183
|
+
n.setCheck(null);
|
|
5184
|
+
const u = Dt(this.workspace, l.type);
|
|
5185
|
+
u && o.connect(u.outputConnection);
|
|
5179
5186
|
}
|
|
5180
5187
|
},
|
|
5181
5188
|
updateCheck_: function() {
|
|
5182
5189
|
for (let t = 0; t < this.itemCount_; t++) {
|
|
5183
|
-
const e = this.getFieldValue("COLUMN" + t), n = this.table.columns.find((
|
|
5190
|
+
const e = this.getFieldValue("COLUMN" + t), n = this.table.columns.find((i) => i.id === e);
|
|
5184
5191
|
if (!n)
|
|
5185
5192
|
continue;
|
|
5186
|
-
const
|
|
5187
|
-
|
|
5193
|
+
const o = kn(n.type);
|
|
5194
|
+
this.getInput("ADD" + t).setCheck(o);
|
|
5188
5195
|
}
|
|
5189
5196
|
},
|
|
5190
5197
|
checkWarning_: function() {
|
|
@@ -5206,7 +5213,7 @@ const Xi = {
|
|
|
5206
5213
|
this.setWarningText(null);
|
|
5207
5214
|
}
|
|
5208
5215
|
};
|
|
5209
|
-
d.update_column_v1 =
|
|
5216
|
+
d.update_column_v1 = qi;
|
|
5210
5217
|
s.forBlock.update_column_v1 = function(t) {
|
|
5211
5218
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
5212
5219
|
for (let r = 0; r < n.itemCount_; r++) {
|
|
@@ -5218,7 +5225,7 @@ s.forBlock.update_column_v1 = function(t) {
|
|
|
5218
5225
|
I !== 0 && (l += ","), l += `{name:${e(r)},value:${p}}`;
|
|
5219
5226
|
}), l += "]", [`{spaceid:${e(o)},tableid:${e(i)},columns:${l}}`, c.ATOMIC];
|
|
5220
5227
|
};
|
|
5221
|
-
function
|
|
5228
|
+
function Qi(t) {
|
|
5222
5229
|
const e = t.getInput("TABLE").connection;
|
|
5223
5230
|
if (e.targetBlock())
|
|
5224
5231
|
return;
|
|
@@ -5252,7 +5259,7 @@ function Ji(t) {
|
|
|
5252
5259
|
}, l = $.blocks.append(a, t.workspace);
|
|
5253
5260
|
e.connect(l.outputConnection);
|
|
5254
5261
|
}
|
|
5255
|
-
function
|
|
5262
|
+
function zi(t) {
|
|
5256
5263
|
const e = t.getInput("CONDITION").connection;
|
|
5257
5264
|
if (e.targetBlock())
|
|
5258
5265
|
return;
|
|
@@ -5261,7 +5268,7 @@ function qi(t) {
|
|
|
5261
5268
|
}, o = $.blocks.append(n, t.workspace);
|
|
5262
5269
|
e.connect(o.outputConnection);
|
|
5263
5270
|
}
|
|
5264
|
-
function
|
|
5271
|
+
function Zi(t) {
|
|
5265
5272
|
const e = t.getInput("HANDLE").connection;
|
|
5266
5273
|
if (e.targetBlock())
|
|
5267
5274
|
return;
|
|
@@ -5285,7 +5292,7 @@ function Qi(t) {
|
|
|
5285
5292
|
}, o = $.blocks.append(n, t.workspace);
|
|
5286
5293
|
e.connect(o.previousConnection);
|
|
5287
5294
|
}
|
|
5288
|
-
const
|
|
5295
|
+
const es = {
|
|
5289
5296
|
init: function() {
|
|
5290
5297
|
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}");
|
|
5291
5298
|
},
|
|
@@ -5301,14 +5308,14 @@ const zi = {
|
|
|
5301
5308
|
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(k.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
5302
5309
|
},
|
|
5303
5310
|
ensureBlocks: function() {
|
|
5304
|
-
this.isInsertionMarker() || (
|
|
5311
|
+
this.isInsertionMarker() || (Qi(this), zi(this), F(this, [
|
|
5305
5312
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
5306
5313
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
5307
5314
|
["DATA", "__data__", "PARAM_DATA", !0]
|
|
5308
|
-
]),
|
|
5315
|
+
]), Zi(this));
|
|
5309
5316
|
}
|
|
5310
5317
|
};
|
|
5311
|
-
d.update_data_v1 =
|
|
5318
|
+
d.update_data_v1 = es;
|
|
5312
5319
|
s.forBlock.update_data_v1 = function(t) {
|
|
5313
5320
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", c.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
|
|
5314
5321
|
return `{
|
|
@@ -5325,7 +5332,7 @@ ${e}}
|
|
|
5325
5332
|
${i}}
|
|
5326
5333
|
`;
|
|
5327
5334
|
};
|
|
5328
|
-
const
|
|
5335
|
+
const ts = v.xml, ns = {
|
|
5329
5336
|
init: function() {
|
|
5330
5337
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(k.Align.CENTRE).appendField(
|
|
5331
5338
|
new z(ge, 20, 20, void 0, () => {
|
|
@@ -5334,7 +5341,7 @@ const Zi = v.xml, es = {
|
|
|
5334
5341
|
), this.appendDummyInput("CLOSE_BRACKET").appendField(" ] "), this.setInputsInline(!1), this.setOutput(!0, "JsonArray"), this.setColour(350), this.setTooltip(""), this.setHelpUrl("");
|
|
5335
5342
|
},
|
|
5336
5343
|
mutationToDom: function() {
|
|
5337
|
-
const t =
|
|
5344
|
+
const t = ts.createElement("mutation");
|
|
5338
5345
|
return t.setAttribute("items", String(this.length)), t;
|
|
5339
5346
|
},
|
|
5340
5347
|
domToMutation: function(t) {
|
|
@@ -5350,8 +5357,8 @@ const Zi = v.xml, es = {
|
|
|
5350
5357
|
new z(ge, 20, 20, void 0, () => {
|
|
5351
5358
|
this.isInFlyout || this.addEntry_(n);
|
|
5352
5359
|
})
|
|
5353
|
-
), n.appendField(new
|
|
5354
|
-
new z(
|
|
5360
|
+
), n.appendField(new en(String(t))), n.appendField(
|
|
5361
|
+
new z(Je, 20, 20, void 0, () => {
|
|
5355
5362
|
this.isInFlyout || this.removeEntry_(n);
|
|
5356
5363
|
})
|
|
5357
5364
|
), this.moveInputBefore(e, "ADD");
|
|
@@ -5369,8 +5376,8 @@ const Zi = v.xml, es = {
|
|
|
5369
5376
|
new z(ge, 20, 20, void 0, () => {
|
|
5370
5377
|
this.isInFlyout || this.addEntry_(n);
|
|
5371
5378
|
})
|
|
5372
|
-
), n.appendField(new
|
|
5373
|
-
new z(
|
|
5379
|
+
), n.appendField(new en(String(e))), n.appendField(
|
|
5380
|
+
new z(Je, 20, 20, void 0, () => {
|
|
5374
5381
|
this.isInFlyout || this.removeEntry_(n);
|
|
5375
5382
|
})
|
|
5376
5383
|
), e === this.length ? this.moveInputBefore("ENTRY" + e, "ADD") : this.moveInputBefore("ENTRY" + e, "ENTRY" + (e + 1)), this.length++;
|
|
@@ -5386,11 +5393,11 @@ const Zi = v.xml, es = {
|
|
|
5386
5393
|
this.length--;
|
|
5387
5394
|
}
|
|
5388
5395
|
};
|
|
5389
|
-
d.json_array_v1 =
|
|
5390
|
-
const
|
|
5396
|
+
d.json_array_v1 = ns;
|
|
5397
|
+
const os = {
|
|
5391
5398
|
init: function() {
|
|
5392
5399
|
this.appendDummyInput().appendField(
|
|
5393
|
-
new
|
|
5400
|
+
new hn([
|
|
5394
5401
|
["false", "false"],
|
|
5395
5402
|
["true", "true"]
|
|
5396
5403
|
]),
|
|
@@ -5398,8 +5405,8 @@ const ts = {
|
|
|
5398
5405
|
), this.setOutput(!0, "JsonBoolean"), this.setColour(210);
|
|
5399
5406
|
}
|
|
5400
5407
|
};
|
|
5401
|
-
d.json_boolean_v1 =
|
|
5402
|
-
const
|
|
5408
|
+
d.json_boolean_v1 = os;
|
|
5409
|
+
const cn = v.xml, is = {
|
|
5403
5410
|
init: function() {
|
|
5404
5411
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(k.Align.CENTRE).appendField(
|
|
5405
5412
|
new z(ge, 20, 20, void 0, () => {
|
|
@@ -5408,9 +5415,9 @@ const an = v.xml, ns = {
|
|
|
5408
5415
|
), this.appendDummyInput("CLOSE_BRACHET").appendField(" } "), this.setInputsInline(!1), this.setOutput(!0, "JsonMap"), this.setColour(120), this.setTooltip(""), this.setHelpUrl("");
|
|
5409
5416
|
},
|
|
5410
5417
|
mutationToDom: function() {
|
|
5411
|
-
const t =
|
|
5418
|
+
const t = cn.createElement("mutation");
|
|
5412
5419
|
for (let e = 0; e < this.length; e++) {
|
|
5413
|
-
const n =
|
|
5420
|
+
const n = cn.createElement("item");
|
|
5414
5421
|
n.setAttribute("key", this.getFieldValue("KEY" + e)), t.appendChild(n);
|
|
5415
5422
|
}
|
|
5416
5423
|
return t;
|
|
@@ -5434,7 +5441,7 @@ const an = v.xml, ns = {
|
|
|
5434
5441
|
this.isInFlyout || this.addEntry_(i);
|
|
5435
5442
|
})
|
|
5436
5443
|
), i.appendField(new ue(n), "KEY" + e), i.appendField(
|
|
5437
|
-
new z(
|
|
5444
|
+
new z(Je, 20, 20, void 0, () => {
|
|
5438
5445
|
this.isInFlyout || this.removeEntry_(i);
|
|
5439
5446
|
})
|
|
5440
5447
|
), this.moveInputBefore(o, "ADD");
|
|
@@ -5451,7 +5458,7 @@ const an = v.xml, ns = {
|
|
|
5451
5458
|
this.isInFlyout || this.addEntry_(n);
|
|
5452
5459
|
})
|
|
5453
5460
|
), n.appendField(new ue("key"), "KEY" + e), n.appendField(
|
|
5454
|
-
new z(
|
|
5461
|
+
new z(Je, 20, 20, void 0, () => {
|
|
5455
5462
|
this.isInFlyout || this.removeEntry_(n);
|
|
5456
5463
|
})
|
|
5457
5464
|
), e === this.length ? this.moveInputBefore("ENTRY" + e, "ADD") : this.moveInputBefore("ENTRY" + e, "ENTRY" + (e + 1)), this.length++;
|
|
@@ -5465,38 +5472,38 @@ const an = v.xml, ns = {
|
|
|
5465
5472
|
this.length--;
|
|
5466
5473
|
}
|
|
5467
5474
|
};
|
|
5468
|
-
d.json_map_v1 =
|
|
5469
|
-
const
|
|
5475
|
+
d.json_map_v1 = is;
|
|
5476
|
+
const ss = {
|
|
5470
5477
|
init: function() {
|
|
5471
|
-
this.appendDummyInput().appendField(new
|
|
5478
|
+
this.appendDummyInput().appendField(new bt(0), "VALUE"), this.setOutput(!0, "JsonNumber"), this.setColour(230);
|
|
5472
5479
|
}
|
|
5473
5480
|
};
|
|
5474
|
-
d.json_number_v1 =
|
|
5475
|
-
const
|
|
5481
|
+
d.json_number_v1 = ss;
|
|
5482
|
+
const as = {
|
|
5476
5483
|
init: function() {
|
|
5477
5484
|
this.appendDummyInput().setAlign(k.Align.CENTRE).appendField("JSON"), this.appendValueInput("JSON").setCheck(["JsonMap", "JsonArray"]), this.setDeletable(!1), this.setColour(250), this.setTooltip(""), this.setHelpUrl("");
|
|
5478
5485
|
}
|
|
5479
5486
|
};
|
|
5480
|
-
d.json_root_v1 =
|
|
5481
|
-
const
|
|
5487
|
+
d.json_root_v1 = as;
|
|
5488
|
+
const cs = {
|
|
5482
5489
|
init: function() {
|
|
5483
5490
|
this.appendDummyInput().appendField('"').appendField(new ue(""), "VALUE").appendField('"'), this.setOutput(!0, "JsonString"), this.setColour(160);
|
|
5484
5491
|
}
|
|
5485
5492
|
};
|
|
5486
|
-
d.json_string_v1 =
|
|
5487
|
-
const
|
|
5493
|
+
d.json_string_v1 = cs;
|
|
5494
|
+
const ls = v.xml, us = {
|
|
5488
5495
|
init: function() {
|
|
5489
5496
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5490
5497
|
}
|
|
5491
5498
|
};
|
|
5492
|
-
d.list_create_container_v1 =
|
|
5493
|
-
const
|
|
5499
|
+
d.list_create_container_v1 = us;
|
|
5500
|
+
const rs = {
|
|
5494
5501
|
init: function() {
|
|
5495
5502
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5496
5503
|
}
|
|
5497
5504
|
};
|
|
5498
|
-
d.list_create_item_v1 =
|
|
5499
|
-
const
|
|
5505
|
+
d.list_create_item_v1 = rs;
|
|
5506
|
+
const _s = {
|
|
5500
5507
|
init: function() {
|
|
5501
5508
|
this.itemCount_ = 0, this.setMutator(
|
|
5502
5509
|
new fe.MutatorIcon(
|
|
@@ -5506,7 +5513,7 @@ const us = {
|
|
|
5506
5513
|
), this.setOutput(!0, "Array"), this.setStyle("list_blocks"), this.setTooltip("%{BKY_LIST_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_LIST_V1_CREATE_HELPURL}");
|
|
5507
5514
|
},
|
|
5508
5515
|
mutationToDom: function() {
|
|
5509
|
-
const t =
|
|
5516
|
+
const t = ls.createElement("mutation");
|
|
5510
5517
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
5511
5518
|
},
|
|
5512
5519
|
domToMutation: function(t) {
|
|
@@ -5573,13 +5580,13 @@ const us = {
|
|
|
5573
5580
|
for (let t = 0; t < this.itemCount_; t++)
|
|
5574
5581
|
if (!this.getInput("ADD" + t)) {
|
|
5575
5582
|
const e = this.appendValueInput("ADD" + t);
|
|
5576
|
-
t === 0 && (e.setAlign(k.Align.RIGHT), e.appendField("%{BKY_LIST_V1_CREATE_TITLE}"));
|
|
5583
|
+
e.setCheck(["String", "Number", "Boolean", "Array", "Object"]), t === 0 && (e.setAlign(k.Align.RIGHT), e.appendField("%{BKY_LIST_V1_CREATE_TITLE}"));
|
|
5577
5584
|
}
|
|
5578
5585
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
5579
5586
|
this.removeInput("ADD" + t);
|
|
5580
5587
|
}
|
|
5581
5588
|
};
|
|
5582
|
-
d.list_create_v1 =
|
|
5589
|
+
d.list_create_v1 = _s;
|
|
5583
5590
|
s.forBlock.list_create_v1 = function(t) {
|
|
5584
5591
|
const e = t, n = new Array(e.itemCount_);
|
|
5585
5592
|
for (let i = 0; i < e.itemCount_; i++)
|
|
@@ -5795,7 +5802,7 @@ s.forBlock.list_set_v1 = function(t) {
|
|
|
5795
5802
|
return `${e}[${n}] = ${o};
|
|
5796
5803
|
`;
|
|
5797
5804
|
};
|
|
5798
|
-
const
|
|
5805
|
+
const ps = {
|
|
5799
5806
|
// logic_compare
|
|
5800
5807
|
EQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_EQ}",
|
|
5801
5808
|
NEQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_NEQ}",
|
|
@@ -5809,7 +5816,7 @@ const rs = {
|
|
|
5809
5816
|
};
|
|
5810
5817
|
R.register(
|
|
5811
5818
|
"logic_op_tooltip_v1",
|
|
5812
|
-
R.buildTooltipForDropdown("OP",
|
|
5819
|
+
R.buildTooltipForDropdown("OP", ps)
|
|
5813
5820
|
);
|
|
5814
5821
|
h([
|
|
5815
5822
|
{
|
|
@@ -5834,7 +5841,7 @@ h([
|
|
|
5834
5841
|
s.forBlock.logic_boolean_v1 = function(t) {
|
|
5835
5842
|
return [t.getFieldValue("BOOL") === "TRUE" ? "true" : "false", c.ATOMIC];
|
|
5836
5843
|
};
|
|
5837
|
-
const
|
|
5844
|
+
const hs = {
|
|
5838
5845
|
onchange: function(t) {
|
|
5839
5846
|
this.prevBlocks_ || (this.prevBlocks_ = [null, null]);
|
|
5840
5847
|
const e = this.getInputTargetBlock("A"), n = this.getInputTargetBlock("B");
|
|
@@ -5854,7 +5861,7 @@ const _s = {
|
|
|
5854
5861
|
R.register(
|
|
5855
5862
|
"logic_compare_v1",
|
|
5856
5863
|
function() {
|
|
5857
|
-
this.mixin(
|
|
5864
|
+
this.mixin(hs);
|
|
5858
5865
|
}
|
|
5859
5866
|
);
|
|
5860
5867
|
h([
|
|
@@ -5904,7 +5911,7 @@ s.forBlock.logic_compare_v1 = function(t) {
|
|
|
5904
5911
|
const i = s.valueToCode(t, "A", o) || "0", a = s.valueToCode(t, "B", o) || "0";
|
|
5905
5912
|
return [`${i} ${n} ${a}`, o];
|
|
5906
5913
|
};
|
|
5907
|
-
const
|
|
5914
|
+
const ds = {
|
|
5908
5915
|
elseIfCount_: 0,
|
|
5909
5916
|
hasElse_: !1,
|
|
5910
5917
|
mutationToDom: function() {
|
|
@@ -6031,7 +6038,7 @@ const ps = {
|
|
|
6031
6038
|
};
|
|
6032
6039
|
R.registerMutator(
|
|
6033
6040
|
"logic_if_v1_mutator",
|
|
6034
|
-
|
|
6041
|
+
ds,
|
|
6035
6042
|
void 0,
|
|
6036
6043
|
["logic_if_else_if_v1", "logic_if_else_v1"]
|
|
6037
6044
|
);
|
|
@@ -6177,7 +6184,7 @@ s.forBlock.logic_operation_v1 = function(t) {
|
|
|
6177
6184
|
}
|
|
6178
6185
|
return [`${o} ${e} ${i}`, n];
|
|
6179
6186
|
};
|
|
6180
|
-
const
|
|
6187
|
+
const fs = {
|
|
6181
6188
|
prevParentConnection_: null,
|
|
6182
6189
|
onchange: function(t) {
|
|
6183
6190
|
const e = this.getInputTargetBlock("THEN"), n = this.getInputTargetBlock("ELSE"), o = this.outputConnection.targetConnection;
|
|
@@ -6192,7 +6199,7 @@ const hs = {
|
|
|
6192
6199
|
this.prevParentConnection_ = o;
|
|
6193
6200
|
}
|
|
6194
6201
|
};
|
|
6195
|
-
R.registerMixin("logic_ternary_v1",
|
|
6202
|
+
R.registerMixin("logic_ternary_v1", fs);
|
|
6196
6203
|
h([
|
|
6197
6204
|
{
|
|
6198
6205
|
type: "logic_ternary_v1",
|
|
@@ -6229,7 +6236,7 @@ s.forBlock.logic_ternary_v1 = function(t) {
|
|
|
6229
6236
|
const e = s.valueToCode(t, "IF", c.CONDITIONAL) || "false", n = s.valueToCode(t, "THEN", c.CONDITIONAL) || "null", o = s.valueToCode(t, "ELSE", c.CONDITIONAL) || "null";
|
|
6230
6237
|
return [e + " ? " + n + " : " + o, c.CONDITIONAL];
|
|
6231
6238
|
};
|
|
6232
|
-
const
|
|
6239
|
+
const ms = {
|
|
6233
6240
|
customContextMenu: function(t) {
|
|
6234
6241
|
if (this.isInFlyout)
|
|
6235
6242
|
return;
|
|
@@ -6244,14 +6251,14 @@ const ds = {
|
|
|
6244
6251
|
t.push({
|
|
6245
6252
|
enabled: !0,
|
|
6246
6253
|
text: _.VARIABLE_SET_CREATE_GET.replace("%1", o),
|
|
6247
|
-
callback:
|
|
6254
|
+
callback: dn.callbackFactory(this, i)
|
|
6248
6255
|
});
|
|
6249
6256
|
}
|
|
6250
6257
|
}
|
|
6251
6258
|
};
|
|
6252
6259
|
R.registerMixin(
|
|
6253
6260
|
"contextMenu_newGetVariableBlock_v1",
|
|
6254
|
-
|
|
6261
|
+
ms
|
|
6255
6262
|
);
|
|
6256
6263
|
R.register(
|
|
6257
6264
|
"flow_control_tooltip_v1",
|
|
@@ -6260,16 +6267,16 @@ R.register(
|
|
|
6260
6267
|
CONTINUE: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_CONTINUE}"
|
|
6261
6268
|
})
|
|
6262
6269
|
);
|
|
6263
|
-
const
|
|
6270
|
+
const Ts = /* @__PURE__ */ new Set([
|
|
6264
6271
|
"repeat_v1",
|
|
6265
6272
|
"for_each_v1",
|
|
6266
6273
|
"for_v1",
|
|
6267
6274
|
"while_until_v1"
|
|
6268
|
-
]),
|
|
6275
|
+
]), Es = {
|
|
6269
6276
|
getSurroundLoop: function() {
|
|
6270
6277
|
let t = this;
|
|
6271
6278
|
do {
|
|
6272
|
-
if (
|
|
6279
|
+
if (Ts.has(t.type))
|
|
6273
6280
|
return t;
|
|
6274
6281
|
t = t?.getSurroundParent();
|
|
6275
6282
|
} while (t);
|
|
@@ -6292,7 +6299,7 @@ const fs = /* @__PURE__ */ new Set([
|
|
|
6292
6299
|
};
|
|
6293
6300
|
R.registerMixin(
|
|
6294
6301
|
"flow_control_in_loop_check_v1",
|
|
6295
|
-
|
|
6302
|
+
Es
|
|
6296
6303
|
);
|
|
6297
6304
|
h([
|
|
6298
6305
|
{
|
|
@@ -6594,7 +6601,7 @@ s.forBlock.while_until_v1 = function(t) {
|
|
|
6594
6601
|
${o}}
|
|
6595
6602
|
`;
|
|
6596
6603
|
};
|
|
6597
|
-
const
|
|
6604
|
+
const gs = {
|
|
6598
6605
|
// math_arithmetic
|
|
6599
6606
|
ADD: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_ADD}",
|
|
6600
6607
|
SUBTRACT: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_SUBTRACT}",
|
|
@@ -6628,7 +6635,7 @@ const Ts = {
|
|
|
6628
6635
|
};
|
|
6629
6636
|
R.register(
|
|
6630
6637
|
"math_op_tooltip_v1",
|
|
6631
|
-
R.buildTooltipForDropdown("OP",
|
|
6638
|
+
R.buildTooltipForDropdown("OP", gs)
|
|
6632
6639
|
);
|
|
6633
6640
|
h([
|
|
6634
6641
|
{
|
|
@@ -7231,21 +7238,21 @@ s.forBlock.math_trig_v1 = function(t) {
|
|
|
7231
7238
|
}
|
|
7232
7239
|
return [o, c.DIVISION];
|
|
7233
7240
|
};
|
|
7234
|
-
const
|
|
7241
|
+
const Is = v.xml, As = {
|
|
7235
7242
|
init: function() {
|
|
7236
7243
|
this.appendDummyInput().appendField(
|
|
7237
7244
|
"%{BKY_OBJECT_V1_CREATE_CONTAINER_TITLE}"
|
|
7238
7245
|
), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
7239
7246
|
}
|
|
7240
7247
|
};
|
|
7241
|
-
d.object_create_container_v1 =
|
|
7242
|
-
const
|
|
7248
|
+
d.object_create_container_v1 = As;
|
|
7249
|
+
const Os = {
|
|
7243
7250
|
init: function() {
|
|
7244
7251
|
this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
7245
7252
|
}
|
|
7246
7253
|
};
|
|
7247
|
-
d.object_create_item_v1 =
|
|
7248
|
-
const
|
|
7254
|
+
d.object_create_item_v1 = Os;
|
|
7255
|
+
const Cs = {
|
|
7249
7256
|
init: function() {
|
|
7250
7257
|
this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(
|
|
7251
7258
|
new fe.MutatorIcon(
|
|
@@ -7255,7 +7262,7 @@ const As = {
|
|
|
7255
7262
|
), this.setOutput(!0, "Object"), this.setStyle("object_blocks"), this.setTooltip("%{BKY_OBJECT_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_OBJECT_V1_CREATE_HELPURL}");
|
|
7256
7263
|
},
|
|
7257
7264
|
mutationToDom: function() {
|
|
7258
|
-
const t =
|
|
7265
|
+
const t = Is.createElement("mutation");
|
|
7259
7266
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
7260
7267
|
},
|
|
7261
7268
|
domToMutation: function(t) {
|
|
@@ -7319,7 +7326,7 @@ const As = {
|
|
|
7319
7326
|
this.removeInput("ADD" + t);
|
|
7320
7327
|
}
|
|
7321
7328
|
};
|
|
7322
|
-
d.object_create_v1 =
|
|
7329
|
+
d.object_create_v1 = Cs;
|
|
7323
7330
|
s.forBlock.object_create_v1 = function(t) {
|
|
7324
7331
|
const e = t;
|
|
7325
7332
|
let n = "{";
|
|
@@ -7494,7 +7501,7 @@ h([
|
|
|
7494
7501
|
{
|
|
7495
7502
|
type: "input_value",
|
|
7496
7503
|
name: "TO",
|
|
7497
|
-
check:
|
|
7504
|
+
check: ["String", "Number", "Boolean", "Array", "Object"],
|
|
7498
7505
|
align: "RIGHT"
|
|
7499
7506
|
}
|
|
7500
7507
|
],
|
|
@@ -7561,15 +7568,15 @@ h([
|
|
|
7561
7568
|
s.forBlock.object_to_json_v1 = function(t) {
|
|
7562
7569
|
return [`__jsonStringifyV1__(${s.valueToCode(t, "OBJECT", c.NONE) || "null"})`, c.FUNCTION_CALL];
|
|
7563
7570
|
};
|
|
7564
|
-
const
|
|
7571
|
+
const ln = v.xml, ks = {
|
|
7565
7572
|
init: function() {
|
|
7566
|
-
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new
|
|
7573
|
+
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new uo(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
7567
7574
|
}
|
|
7568
7575
|
};
|
|
7569
|
-
d.procedure_def_container_v1 =
|
|
7570
|
-
const
|
|
7576
|
+
d.procedure_def_container_v1 = ks;
|
|
7577
|
+
const vs = {
|
|
7571
7578
|
init: function() {
|
|
7572
|
-
const t = new ue(
|
|
7579
|
+
const t = new ue(Bt.DEFAULT_ARG);
|
|
7573
7580
|
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;
|
|
7574
7581
|
},
|
|
7575
7582
|
validator_: function(t) {
|
|
@@ -7589,14 +7596,14 @@ const Cs = {
|
|
|
7589
7596
|
return t;
|
|
7590
7597
|
}
|
|
7591
7598
|
};
|
|
7592
|
-
d.procedure_def_item_v1 =
|
|
7593
|
-
const
|
|
7599
|
+
d.procedure_def_item_v1 = vs;
|
|
7600
|
+
const ys = {
|
|
7594
7601
|
init: function() {
|
|
7595
7602
|
this.withReturn = !1, this.args = [];
|
|
7596
7603
|
const t = new ue(
|
|
7597
|
-
|
|
7604
|
+
Bt.findLegalName("", this)
|
|
7598
7605
|
);
|
|
7599
|
-
t.setValidator(
|
|
7606
|
+
t.setValidator(Bt.rename), t.setSpellcheck(!1), this.appendDummyInput("DUMMY").appendField(t, "NAME"), this.appendStatementInput("HANDLE"), this.setMutator(
|
|
7600
7607
|
new fe.MutatorIcon(
|
|
7601
7608
|
["procedure_def_item_v1"],
|
|
7602
7609
|
this
|
|
@@ -7604,9 +7611,9 @@ const ks = {
|
|
|
7604
7611
|
), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_PROCEDURE_V1_DEF_TOOLTIP}"), this.setHelpUrl("%{BKY_PROCEDURE_V1_DEF_HELPURL}");
|
|
7605
7612
|
},
|
|
7606
7613
|
mutationToDom: function() {
|
|
7607
|
-
const t =
|
|
7614
|
+
const t = ln.createElement("mutation");
|
|
7608
7615
|
return t.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), this.args.forEach((e) => {
|
|
7609
|
-
const n =
|
|
7616
|
+
const n = ln.createElement("arg");
|
|
7610
7617
|
n.setAttribute("name", e.name), n.setAttribute("id", e.id), t.appendChild(n);
|
|
7611
7618
|
}), t;
|
|
7612
7619
|
},
|
|
@@ -7682,7 +7689,7 @@ const ks = {
|
|
|
7682
7689
|
o.setKeyName(`__param@${e.id}__`, e.name, !1);
|
|
7683
7690
|
else
|
|
7684
7691
|
try {
|
|
7685
|
-
E.disable(), o =
|
|
7692
|
+
E.disable(), o = Ht(
|
|
7686
7693
|
this.workspace,
|
|
7687
7694
|
`__param@${e.id}__`,
|
|
7688
7695
|
e.name,
|
|
@@ -7694,13 +7701,13 @@ const ks = {
|
|
|
7694
7701
|
}
|
|
7695
7702
|
}
|
|
7696
7703
|
};
|
|
7697
|
-
d.procedure_def_v1 =
|
|
7698
|
-
const
|
|
7704
|
+
d.procedure_def_v1 = ys;
|
|
7705
|
+
const Ns = v.xml, Ls = {
|
|
7699
7706
|
init: function() {
|
|
7700
7707
|
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}");
|
|
7701
7708
|
},
|
|
7702
7709
|
mutationToDom: function() {
|
|
7703
|
-
const t =
|
|
7710
|
+
const t = Ns.createElement("mutation");
|
|
7704
7711
|
return t.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), t;
|
|
7705
7712
|
},
|
|
7706
7713
|
domToMutation: function(t) {
|
|
@@ -7751,14 +7758,14 @@ const vs = v.xml, ys = {
|
|
|
7751
7758
|
t.type === "procedure_def_v1" || t.type === "func_entry_v1" ? this.setWarningText(null) : this.setWarningText("the block can only be used in procedure block");
|
|
7752
7759
|
}
|
|
7753
7760
|
};
|
|
7754
|
-
d.procedure_return_v1 =
|
|
7761
|
+
d.procedure_return_v1 = Ls;
|
|
7755
7762
|
s.forBlock.procedure_return_v1 = function(t) {
|
|
7756
7763
|
const e = t;
|
|
7757
7764
|
return e.withReturn ? `return ${s.valueToCode(e, "VALUE", c.NONE) || "null"};
|
|
7758
7765
|
` : `return;
|
|
7759
7766
|
`;
|
|
7760
7767
|
};
|
|
7761
|
-
const
|
|
7768
|
+
const Ss = {
|
|
7762
7769
|
init: function() {
|
|
7763
7770
|
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}");
|
|
7764
7771
|
},
|
|
@@ -7781,7 +7788,7 @@ const Ns = {
|
|
|
7781
7788
|
]);
|
|
7782
7789
|
}
|
|
7783
7790
|
};
|
|
7784
|
-
d.download_resource_v1 =
|
|
7791
|
+
d.download_resource_v1 = Ss;
|
|
7785
7792
|
s.forBlock.download_resource_v1 = function(t) {
|
|
7786
7793
|
const e = s.valueToCode(t, "ASSET", c.ATOMIC) || null, n = s.statementToCode(t, "HANDLE");
|
|
7787
7794
|
return `{
|
|
@@ -7793,7 +7800,7 @@ ${n}
|
|
|
7793
7800
|
}
|
|
7794
7801
|
`;
|
|
7795
7802
|
};
|
|
7796
|
-
function
|
|
7803
|
+
function Un(t) {
|
|
7797
7804
|
const e = T.resource.spaces.find((i) => i.id === t);
|
|
7798
7805
|
if (!e)
|
|
7799
7806
|
return [];
|
|
@@ -7809,13 +7816,13 @@ function Rn(t) {
|
|
|
7809
7816
|
}
|
|
7810
7817
|
return o(e.dirTree, ""), n;
|
|
7811
7818
|
}
|
|
7812
|
-
function
|
|
7819
|
+
function bs(t) {
|
|
7813
7820
|
const e = [];
|
|
7814
|
-
return
|
|
7821
|
+
return Un(t).forEach(({ id: o, name: i }) => {
|
|
7815
7822
|
e.push([i, o]);
|
|
7816
7823
|
}), N(e);
|
|
7817
7824
|
}
|
|
7818
|
-
function
|
|
7825
|
+
function Mn(t, e) {
|
|
7819
7826
|
const n = T.resource.spaces.find((i) => i.id === t);
|
|
7820
7827
|
if (!n)
|
|
7821
7828
|
return [];
|
|
@@ -7824,25 +7831,25 @@ function Dn(t, e) {
|
|
|
7824
7831
|
i.dirid === e && o.push(i);
|
|
7825
7832
|
}), o;
|
|
7826
7833
|
}
|
|
7827
|
-
function
|
|
7834
|
+
function Bs(t, e) {
|
|
7828
7835
|
const n = [];
|
|
7829
|
-
return
|
|
7836
|
+
return Mn(t, e).forEach(({ id: i, name: a }) => {
|
|
7830
7837
|
n.push([a, i]);
|
|
7831
7838
|
}), N(n);
|
|
7832
7839
|
}
|
|
7833
|
-
function
|
|
7840
|
+
function Pn() {
|
|
7834
7841
|
const t = [];
|
|
7835
7842
|
return T.resource.spaces.forEach((e) => {
|
|
7836
7843
|
e.resources.length > 0 && t.push(e);
|
|
7837
7844
|
}), t;
|
|
7838
7845
|
}
|
|
7839
|
-
function
|
|
7846
|
+
function Rs() {
|
|
7840
7847
|
const t = [];
|
|
7841
|
-
return
|
|
7848
|
+
return Pn().forEach(({ id: n, name: o }) => {
|
|
7842
7849
|
t.push([o, n]);
|
|
7843
7850
|
}), N(t);
|
|
7844
7851
|
}
|
|
7845
|
-
const
|
|
7852
|
+
const Ds = {
|
|
7846
7853
|
init: function() {
|
|
7847
7854
|
this.space = {
|
|
7848
7855
|
id: "",
|
|
@@ -7861,19 +7868,19 @@ const Bs = {
|
|
|
7861
7868
|
initData_: function() {
|
|
7862
7869
|
if (this.space.id)
|
|
7863
7870
|
return;
|
|
7864
|
-
const t =
|
|
7871
|
+
const t = Pn()?.[0];
|
|
7865
7872
|
if (!t)
|
|
7866
7873
|
return;
|
|
7867
7874
|
this.space.id = t.id, this.space.name = t.name;
|
|
7868
7875
|
const e = this.getField("SPACE");
|
|
7869
7876
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
7870
|
-
const n =
|
|
7877
|
+
const n = Un(this.space.id)?.[0];
|
|
7871
7878
|
if (!n)
|
|
7872
7879
|
return;
|
|
7873
7880
|
this.dir.id = n.id, this.dir.name = n.name;
|
|
7874
7881
|
const o = this.getField("DIR");
|
|
7875
7882
|
o.getOptions(!1), o.setValue(this.dir.id);
|
|
7876
|
-
const i =
|
|
7883
|
+
const i = Mn(this.space.id, this.dir.id)?.[0];
|
|
7877
7884
|
if (!i)
|
|
7878
7885
|
return;
|
|
7879
7886
|
this.resource.id = i.id, this.resource.name = i.name;
|
|
@@ -7891,20 +7898,20 @@ const Bs = {
|
|
|
7891
7898
|
this.space = Se(t.space), this.dir = Se(t.dir), this.resource = Se(t.resource);
|
|
7892
7899
|
},
|
|
7893
7900
|
genSpaceOpts_: function() {
|
|
7894
|
-
return
|
|
7901
|
+
return Rs();
|
|
7895
7902
|
},
|
|
7896
7903
|
genDirOpts_: function() {
|
|
7897
|
-
return
|
|
7904
|
+
return bs(this.space.id);
|
|
7898
7905
|
},
|
|
7899
7906
|
genResourceOpts_: function() {
|
|
7900
|
-
return
|
|
7907
|
+
return Bs(this.space.id, this.dir.id);
|
|
7901
7908
|
}
|
|
7902
7909
|
};
|
|
7903
|
-
d.select_resource_v1 =
|
|
7910
|
+
d.select_resource_v1 = Ds;
|
|
7904
7911
|
s.forBlock.select_resource_v1 = function() {
|
|
7905
7912
|
return "";
|
|
7906
7913
|
};
|
|
7907
|
-
const
|
|
7914
|
+
const Us = {
|
|
7908
7915
|
init: function() {
|
|
7909
7916
|
this.appendDummyInput().appendField(
|
|
7910
7917
|
"%{BKY_RESOURCE_V1_UPLOAD_RESOURCE_TITLE}"
|
|
@@ -7935,7 +7942,7 @@ const Rs = {
|
|
|
7935
7942
|
]);
|
|
7936
7943
|
}
|
|
7937
7944
|
};
|
|
7938
|
-
d.upload_resource_v1 =
|
|
7945
|
+
d.upload_resource_v1 = Us;
|
|
7939
7946
|
s.forBlock.upload_resource_v1 = function(t) {
|
|
7940
7947
|
const e = s.valueToCode(t, "NAME", c.ATOMIC) || "''", n = s.valueToCode(t, "DIR", c.ATOMIC) || "null", o = s.valueToCode(t, "DATA", c.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
|
|
7941
7948
|
return `{
|
|
@@ -7968,9 +7975,9 @@ h([
|
|
|
7968
7975
|
s.forBlock.text_v1 = function(t) {
|
|
7969
7976
|
return [s.quote_(t.getFieldValue("TEXT")), c.ATOMIC];
|
|
7970
7977
|
};
|
|
7971
|
-
const
|
|
7972
|
-
function
|
|
7973
|
-
return
|
|
7978
|
+
const Ms = /^\s*'([^']|\\')*'\s*$/;
|
|
7979
|
+
function Xe(t) {
|
|
7980
|
+
return Ms.test(t) ? [t, c.ATOMIC] : [`String(${t})`, c.FUNCTION_CALL];
|
|
7974
7981
|
}
|
|
7975
7982
|
R.register(
|
|
7976
7983
|
"text_append_tooltip_v1",
|
|
@@ -8005,7 +8012,7 @@ s.forBlock.text_append_v1 = function(t) {
|
|
|
8005
8012
|
t.getFieldValue("VAR"),
|
|
8006
8013
|
te.NameType.VARIABLE
|
|
8007
8014
|
), n = s.valueToCode(t, "TEXT", c.NONE) || "''";
|
|
8008
|
-
return `${e} += ${
|
|
8015
|
+
return `${e} += ${Xe(n)};
|
|
8009
8016
|
`;
|
|
8010
8017
|
};
|
|
8011
8018
|
h([
|
|
@@ -8174,10 +8181,10 @@ h([
|
|
|
8174
8181
|
s.forBlock.text_is_empty_v1 = function(t) {
|
|
8175
8182
|
return [`!${s.valueToCode(t, "VALUE", c.MEMBER) || "''"}.length`, c.LOGICAL_NOT];
|
|
8176
8183
|
};
|
|
8177
|
-
const
|
|
8184
|
+
const Ps = v.xml, Vs = {
|
|
8178
8185
|
itemCount_: 0,
|
|
8179
8186
|
mutationToDom: function() {
|
|
8180
|
-
const t =
|
|
8187
|
+
const t = Ps.createElement("mutation");
|
|
8181
8188
|
return t.setAttribute("items", `${this.itemCount_}`), t;
|
|
8182
8189
|
},
|
|
8183
8190
|
domToMutation: function(t) {
|
|
@@ -8248,13 +8255,13 @@ const Us = v.xml, Ms = {
|
|
|
8248
8255
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
8249
8256
|
this.removeInput("ADD" + t);
|
|
8250
8257
|
}
|
|
8251
|
-
},
|
|
8258
|
+
}, xs = function() {
|
|
8252
8259
|
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new fe.MutatorIcon(["text_join_item_v1"], this));
|
|
8253
8260
|
};
|
|
8254
8261
|
R.registerMutator(
|
|
8255
8262
|
"text_join_mutator_v1",
|
|
8256
|
-
|
|
8257
|
-
|
|
8263
|
+
Vs,
|
|
8264
|
+
xs
|
|
8258
8265
|
);
|
|
8259
8266
|
h([
|
|
8260
8267
|
{
|
|
@@ -8297,11 +8304,11 @@ s.forBlock.text_join_v1 = function(t) {
|
|
|
8297
8304
|
return ["''", c.ATOMIC];
|
|
8298
8305
|
case 1: {
|
|
8299
8306
|
const n = s.valueToCode(e, "ADD0", c.NONE) || "''";
|
|
8300
|
-
return
|
|
8307
|
+
return Xe(n);
|
|
8301
8308
|
}
|
|
8302
8309
|
case 2: {
|
|
8303
8310
|
const n = s.valueToCode(e, "ADD0", c.NONE) || "''", o = s.valueToCode(e, "ADD1", c.NONE) || "''";
|
|
8304
|
-
return [
|
|
8311
|
+
return [Xe(n)[0] + " + " + Xe(o)[0], c.ADDITION];
|
|
8305
8312
|
}
|
|
8306
8313
|
default: {
|
|
8307
8314
|
const n = new Array(e.itemCount_);
|
|
@@ -8486,7 +8493,7 @@ s.forBlock.text_trim_v1 = function(t) {
|
|
|
8486
8493
|
}[t.getFieldValue("MODE")];
|
|
8487
8494
|
return [`__trimV1__(${e}, ${o})`, c.ATOMIC];
|
|
8488
8495
|
};
|
|
8489
|
-
const
|
|
8496
|
+
const Fs = {
|
|
8490
8497
|
init: function() {
|
|
8491
8498
|
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}");
|
|
8492
8499
|
},
|
|
@@ -8511,7 +8518,7 @@ const Vs = {
|
|
|
8511
8518
|
));
|
|
8512
8519
|
}
|
|
8513
8520
|
};
|
|
8514
|
-
d.create_timer_v1 =
|
|
8521
|
+
d.create_timer_v1 = Fs;
|
|
8515
8522
|
s.forBlock.create_timer_v1 = function(t) {
|
|
8516
8523
|
const e = s.valueToCode(t, "INTERVAL", c.ATOMIC) || "1000", n = s.valueToCode(t, "LOOP", c.ATOMIC) || "false", o = s.valueToCode(t, "COUNT", c.ATOMIC) || "1", i = s.valueToCode(t, "IMMEDIATE", c.ATOMIC) || "false", a = s.statementToCode(t, "CALLBACK");
|
|
8517
8524
|
return `__createTimerV1__(${e}, ${n}, ${o}, ${i}, function() {
|
|
@@ -8540,18 +8547,18 @@ s.forBlock.delay_v1 = function(t) {
|
|
|
8540
8547
|
return `__delayV1__(${s.valueToCode(t, "DURATION", c.ATOMIC) || "0"});
|
|
8541
8548
|
`;
|
|
8542
8549
|
};
|
|
8543
|
-
const
|
|
8550
|
+
const Ys = {
|
|
8544
8551
|
customContextMenu: function(t) {
|
|
8545
8552
|
if (this.isInFlyout) {
|
|
8546
8553
|
if (this.type === "variable_get_v1") {
|
|
8547
8554
|
const e = {
|
|
8548
8555
|
text: _.RENAME_VARIABLE,
|
|
8549
8556
|
enabled: !0,
|
|
8550
|
-
callback:
|
|
8557
|
+
callback: ws(this)
|
|
8551
8558
|
}, n = this.getField("VAR").getText(), o = {
|
|
8552
8559
|
text: _.DELETE_VARIABLE.replace("%1", n),
|
|
8553
8560
|
enabled: !0,
|
|
8554
|
-
callback:
|
|
8561
|
+
callback: Ks(this)
|
|
8555
8562
|
};
|
|
8556
8563
|
t.unshift(e), t.unshift(o);
|
|
8557
8564
|
}
|
|
@@ -8565,16 +8572,16 @@ const xs = {
|
|
|
8565
8572
|
t.push({
|
|
8566
8573
|
enabled: this.workspace.remainingCapacity() > 0,
|
|
8567
8574
|
text: n.replace("%1", o.getText()),
|
|
8568
|
-
callback:
|
|
8575
|
+
callback: dn.callbackFactory(this, i)
|
|
8569
8576
|
});
|
|
8570
8577
|
}
|
|
8571
8578
|
}
|
|
8572
|
-
},
|
|
8579
|
+
}, ws = function(t) {
|
|
8573
8580
|
return function() {
|
|
8574
8581
|
const e = t.workspace, o = t.getField("VAR").getVariable();
|
|
8575
8582
|
Te.renameVariable(e, o);
|
|
8576
8583
|
};
|
|
8577
|
-
},
|
|
8584
|
+
}, Ks = function(t) {
|
|
8578
8585
|
return function() {
|
|
8579
8586
|
const n = t.getField("VAR").getVariable();
|
|
8580
8587
|
n && Te.deleteVariable(n.getWorkspace(), n, t);
|
|
@@ -8582,7 +8589,7 @@ const xs = {
|
|
|
8582
8589
|
};
|
|
8583
8590
|
R.registerMixin(
|
|
8584
8591
|
"context_menu_variable_v1",
|
|
8585
|
-
|
|
8592
|
+
Ys
|
|
8586
8593
|
);
|
|
8587
8594
|
h([
|
|
8588
8595
|
{
|
|
@@ -8638,44 +8645,44 @@ s.forBlock.variable_set_v1 = function(t) {
|
|
|
8638
8645
|
return `${e} = ${n};
|
|
8639
8646
|
`;
|
|
8640
8647
|
};
|
|
8641
|
-
const
|
|
8642
|
-
function
|
|
8648
|
+
const He = v.xml;
|
|
8649
|
+
function $s() {
|
|
8643
8650
|
const t = [];
|
|
8644
8651
|
{
|
|
8645
|
-
const e =
|
|
8652
|
+
const e = He.createElement("label");
|
|
8646
8653
|
e.setAttribute("text", _.LABEL_ASSET_LAYER), t.push(e);
|
|
8647
8654
|
}
|
|
8648
8655
|
{
|
|
8649
|
-
const e =
|
|
8656
|
+
const e = He.createElement("block");
|
|
8650
8657
|
e.setAttribute("type", "upload_resource_v1"), t.push(e);
|
|
8651
8658
|
}
|
|
8652
8659
|
{
|
|
8653
|
-
const e =
|
|
8660
|
+
const e = He.createElement("label");
|
|
8654
8661
|
e.setAttribute("text", _.LABEL_COMPUTE_LAYER), t.push(e);
|
|
8655
8662
|
}
|
|
8656
8663
|
{
|
|
8657
|
-
const e =
|
|
8664
|
+
const e = He.createElement("block");
|
|
8658
8665
|
e.setAttribute("type", "call_func_v1"), t.push(e);
|
|
8659
8666
|
}
|
|
8660
8667
|
return t;
|
|
8661
8668
|
}
|
|
8662
|
-
const
|
|
8669
|
+
const et = {
|
|
8663
8670
|
name: "INTERFACE_CATEGORY",
|
|
8664
|
-
callback:
|
|
8671
|
+
callback: $s
|
|
8665
8672
|
}, b = v.xml;
|
|
8666
|
-
function
|
|
8673
|
+
function Hs() {
|
|
8667
8674
|
const t = [];
|
|
8668
|
-
if (
|
|
8675
|
+
if (ei()) {
|
|
8669
8676
|
{
|
|
8670
8677
|
const e = b.createElement("label");
|
|
8671
8678
|
e.setAttribute("text", _.LABEL_PAGE), t.push(e);
|
|
8672
8679
|
}
|
|
8673
|
-
if (
|
|
8680
|
+
if (Sn().length > 0) {
|
|
8674
8681
|
const e = b.createElement("block");
|
|
8675
8682
|
e.setAttribute("type", "get_page_argument_v1"), t.push(e);
|
|
8676
8683
|
}
|
|
8677
8684
|
}
|
|
8678
|
-
if (
|
|
8685
|
+
if (Go()) {
|
|
8679
8686
|
{
|
|
8680
8687
|
const e = b.createElement("label");
|
|
8681
8688
|
e.setAttribute("text", _.LABEL_COMP), t.push(e);
|
|
@@ -8751,17 +8758,17 @@ function Ks() {
|
|
|
8751
8758
|
const e = b.createElement("block");
|
|
8752
8759
|
e.setAttribute("type", "app_env_v1"), t.push(e);
|
|
8753
8760
|
}
|
|
8754
|
-
if (
|
|
8761
|
+
if (Gt().length > 0) {
|
|
8755
8762
|
const e = b.createElement("block");
|
|
8756
8763
|
e.setAttribute("type", "navigate_to_v1"), t.push(e);
|
|
8757
8764
|
}
|
|
8758
8765
|
return t;
|
|
8759
8766
|
}
|
|
8760
|
-
const
|
|
8767
|
+
const tt = {
|
|
8761
8768
|
name: "UI_CATEGORY",
|
|
8762
|
-
callback:
|
|
8769
|
+
callback: Hs
|
|
8763
8770
|
}, ye = v.xml;
|
|
8764
|
-
function
|
|
8771
|
+
function Gs() {
|
|
8765
8772
|
const t = [];
|
|
8766
8773
|
{
|
|
8767
8774
|
const e = ye.createElement("label");
|
|
@@ -8788,12 +8795,12 @@ function $s() {
|
|
|
8788
8795
|
}
|
|
8789
8796
|
const ce = {
|
|
8790
8797
|
name: "PROCEDURE_CATEGORY",
|
|
8791
|
-
callback:
|
|
8792
|
-
},
|
|
8793
|
-
function
|
|
8798
|
+
callback: Gs
|
|
8799
|
+
}, Ge = v.xml;
|
|
8800
|
+
function Ws() {
|
|
8794
8801
|
const t = Ve(), e = [];
|
|
8795
8802
|
{
|
|
8796
|
-
const o =
|
|
8803
|
+
const o = Ge.createElement("label");
|
|
8797
8804
|
o.setAttribute("text", "%{BKY_LABEL_VARIABLE}"), e.push(o);
|
|
8798
8805
|
}
|
|
8799
8806
|
{
|
|
@@ -8812,25 +8819,25 @@ function Hs() {
|
|
|
8812
8819
|
return e;
|
|
8813
8820
|
n.sort(Te.compareByName);
|
|
8814
8821
|
{
|
|
8815
|
-
const o =
|
|
8822
|
+
const o = Ge.createElement("label");
|
|
8816
8823
|
o.setAttribute("text", _.LABEL_CREATED), e.push(o);
|
|
8817
8824
|
}
|
|
8818
8825
|
return n.forEach((o) => {
|
|
8819
8826
|
{
|
|
8820
|
-
const i =
|
|
8827
|
+
const i = Ge.createElement("block");
|
|
8821
8828
|
i.setAttribute("type", "variable_get_v1"), i.appendChild(Te.generateVariableFieldDom(o)), e.push(i);
|
|
8822
8829
|
}
|
|
8823
8830
|
{
|
|
8824
|
-
const i =
|
|
8831
|
+
const i = Ge.createElement("block");
|
|
8825
8832
|
i.setAttribute("type", "variable_set_v1"), i.appendChild(Te.generateVariableFieldDom(o)), e.push(i);
|
|
8826
8833
|
}
|
|
8827
8834
|
}), e;
|
|
8828
8835
|
}
|
|
8829
8836
|
const le = {
|
|
8830
8837
|
name: "VARIABLE_CATEGORY",
|
|
8831
|
-
callback:
|
|
8838
|
+
callback: Ws
|
|
8832
8839
|
}, me = v.xml;
|
|
8833
|
-
function
|
|
8840
|
+
function js(t) {
|
|
8834
8841
|
const e = [];
|
|
8835
8842
|
if (t === "flow") {
|
|
8836
8843
|
{
|
|
@@ -8865,11 +8872,11 @@ function Gs(t) {
|
|
|
8865
8872
|
console.assert(!1);
|
|
8866
8873
|
return e;
|
|
8867
8874
|
}
|
|
8868
|
-
const
|
|
8875
|
+
const nt = {
|
|
8869
8876
|
name: "FLOW_CATEGORY",
|
|
8870
|
-
callback:
|
|
8877
|
+
callback: js
|
|
8871
8878
|
}, ne = v.xml;
|
|
8872
|
-
function
|
|
8879
|
+
function Xs(t) {
|
|
8873
8880
|
const { activeFunc: e } = T.compute, n = [];
|
|
8874
8881
|
if (t === "func") {
|
|
8875
8882
|
{
|
|
@@ -8916,11 +8923,11 @@ function Ws(t) {
|
|
|
8916
8923
|
console.assert(!1);
|
|
8917
8924
|
return n;
|
|
8918
8925
|
}
|
|
8919
|
-
const
|
|
8926
|
+
const ot = {
|
|
8920
8927
|
name: "FUNC_CATEGORY",
|
|
8921
|
-
callback:
|
|
8928
|
+
callback: Xs
|
|
8922
8929
|
}, O = v.xml;
|
|
8923
|
-
function
|
|
8930
|
+
function Js() {
|
|
8924
8931
|
const t = [];
|
|
8925
8932
|
if (J().length > 0) {
|
|
8926
8933
|
{
|
|
@@ -9093,35 +9100,35 @@ function js() {
|
|
|
9093
9100
|
}
|
|
9094
9101
|
return t;
|
|
9095
9102
|
}
|
|
9096
|
-
const
|
|
9103
|
+
const it = {
|
|
9097
9104
|
name: "DATA_CATEGORY",
|
|
9098
|
-
callback:
|
|
9105
|
+
callback: Js
|
|
9099
9106
|
};
|
|
9100
|
-
|
|
9101
|
-
const n = await
|
|
9107
|
+
fn.setConfirm(async (t, e) => {
|
|
9108
|
+
const n = await No({
|
|
9102
9109
|
title: "",
|
|
9103
9110
|
text: t
|
|
9104
9111
|
});
|
|
9105
9112
|
e(!!n);
|
|
9106
9113
|
});
|
|
9107
|
-
|
|
9108
|
-
const o = await
|
|
9114
|
+
fn.setPrompt(async (t, e, n) => {
|
|
9115
|
+
const o = await Lo({
|
|
9109
9116
|
title: "",
|
|
9110
9117
|
value: e
|
|
9111
9118
|
});
|
|
9112
9119
|
o !== void 0 && n(String(o));
|
|
9113
9120
|
});
|
|
9114
|
-
const
|
|
9121
|
+
const Vn = (t, e, n) => {
|
|
9115
9122
|
const o = t[e];
|
|
9116
9123
|
return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((i, a) => {
|
|
9117
9124
|
(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." : ""))));
|
|
9118
9125
|
});
|
|
9119
9126
|
};
|
|
9120
|
-
async function
|
|
9121
|
-
const e = await
|
|
9122
|
-
|
|
9127
|
+
async function un(t) {
|
|
9128
|
+
const e = await Vn(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.k914lhgs.js"), "./msg/zhHans.ts": () => import("./msg-zhHans.ib2kecyn.js") }), `./msg/${t}.ts`, 3);
|
|
9129
|
+
ro(e.default);
|
|
9123
9130
|
}
|
|
9124
|
-
function
|
|
9131
|
+
function Wt(t) {
|
|
9125
9132
|
const e = Ve();
|
|
9126
9133
|
if (!e)
|
|
9127
9134
|
return;
|
|
@@ -9134,33 +9141,33 @@ function Gt(t) {
|
|
|
9134
9141
|
const i = o.getRelativeToSurfaceXY(), a = i.x * e.scale, l = i.y * e.scale;
|
|
9135
9142
|
e.scroll(-a, -l);
|
|
9136
9143
|
}
|
|
9137
|
-
function
|
|
9144
|
+
function xn() {
|
|
9138
9145
|
const t = Ve();
|
|
9139
9146
|
if (!t)
|
|
9140
9147
|
return;
|
|
9141
9148
|
const e = t.getTopBlocks(!0)?.[0];
|
|
9142
|
-
e &&
|
|
9149
|
+
e && Wt(e.id);
|
|
9143
9150
|
}
|
|
9144
|
-
function
|
|
9151
|
+
function Fn(t) {
|
|
9145
9152
|
const e = t.getParent();
|
|
9146
|
-
return e &&
|
|
9153
|
+
return e && Fn(e) ? !0 : !e && !!(t.outputConnection || t.previousConnection);
|
|
9147
9154
|
}
|
|
9148
|
-
class
|
|
9155
|
+
class qs {
|
|
9149
9156
|
init() {
|
|
9150
|
-
const e =
|
|
9157
|
+
const e = _o.registry.getItem("blockDisable");
|
|
9151
9158
|
e && (e.preconditionFn = function(n) {
|
|
9152
9159
|
const o = n.block;
|
|
9153
|
-
return o && !o.isInFlyout && o.workspace.options.disable && o.isEditable() ? o.getInheritedDisabled() ||
|
|
9160
|
+
return o && !o.isInFlyout && o.workspace.options.disable && o.isEditable() ? o.getInheritedDisabled() || Fn(o) ? "disabled" : "enabled" : "hidden";
|
|
9154
9161
|
});
|
|
9155
9162
|
}
|
|
9156
9163
|
}
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
const
|
|
9160
|
-
|
|
9161
|
-
const
|
|
9162
|
-
|
|
9163
|
-
|
|
9164
|
+
po.registerFieldColour();
|
|
9165
|
+
ho.registry.unregister(fo.names.ESCAPE);
|
|
9166
|
+
const Qs = new mo.CrossTabCopyPaste();
|
|
9167
|
+
Qs.init({ contextMenu: !0, shortcut: !0 });
|
|
9168
|
+
const zs = new qs();
|
|
9169
|
+
zs.init();
|
|
9170
|
+
at.Classic.blockStyles = {
|
|
9164
9171
|
color_blocks: {
|
|
9165
9172
|
colourPrimary: "#a5745b",
|
|
9166
9173
|
colourSecondary: "#ede3de",
|
|
@@ -9234,7 +9241,7 @@ st.Classic.blockStyles = {
|
|
|
9234
9241
|
hat: ""
|
|
9235
9242
|
}
|
|
9236
9243
|
};
|
|
9237
|
-
|
|
9244
|
+
at.Classic.categoryStyles = {
|
|
9238
9245
|
calc_category: {
|
|
9239
9246
|
colour: "#757575"
|
|
9240
9247
|
},
|
|
@@ -9290,9 +9297,9 @@ st.Classic.categoryStyles = {
|
|
|
9290
9297
|
colour: "#a55b80"
|
|
9291
9298
|
}
|
|
9292
9299
|
};
|
|
9293
|
-
const
|
|
9300
|
+
const Zs = mn.defineTheme("light", {
|
|
9294
9301
|
name: "light",
|
|
9295
|
-
base:
|
|
9302
|
+
base: at.Classic,
|
|
9296
9303
|
componentStyles: {
|
|
9297
9304
|
workspaceBackgroundColour: "#ffffff",
|
|
9298
9305
|
toolboxBackgroundColour: "#eeeeee",
|
|
@@ -9306,9 +9313,9 @@ const Qs = fn.defineTheme("light", {
|
|
|
9306
9313
|
scrollbarOpacity: 0.4,
|
|
9307
9314
|
cursorColour: ""
|
|
9308
9315
|
}
|
|
9309
|
-
}),
|
|
9316
|
+
}), ea = mn.defineTheme("dark", {
|
|
9310
9317
|
name: "dark",
|
|
9311
|
-
base:
|
|
9318
|
+
base: at.Classic,
|
|
9312
9319
|
componentStyles: {
|
|
9313
9320
|
workspaceBackgroundColour: "#1e1e1e",
|
|
9314
9321
|
toolboxBackgroundColour: "#272727",
|
|
@@ -9323,18 +9330,18 @@ const Qs = fn.defineTheme("light", {
|
|
|
9323
9330
|
cursorColour: ""
|
|
9324
9331
|
}
|
|
9325
9332
|
});
|
|
9326
|
-
function
|
|
9333
|
+
function ta(t) {
|
|
9327
9334
|
const e = Ve();
|
|
9328
9335
|
switch (t) {
|
|
9329
9336
|
case "light":
|
|
9330
|
-
e.setTheme(
|
|
9337
|
+
e.setTheme(Zs);
|
|
9331
9338
|
break;
|
|
9332
9339
|
case "dark":
|
|
9333
|
-
e.setTheme(
|
|
9340
|
+
e.setTheme(ea);
|
|
9334
9341
|
break;
|
|
9335
9342
|
}
|
|
9336
9343
|
}
|
|
9337
|
-
const
|
|
9344
|
+
const _t = {
|
|
9338
9345
|
kind: "category",
|
|
9339
9346
|
name: "%{BKY_CATEGORY_COLOR}",
|
|
9340
9347
|
categorystyle: "color_category",
|
|
@@ -9408,7 +9415,7 @@ const rt = {
|
|
|
9408
9415
|
}
|
|
9409
9416
|
}
|
|
9410
9417
|
]
|
|
9411
|
-
},
|
|
9418
|
+
}, pt = {
|
|
9412
9419
|
kind: "category",
|
|
9413
9420
|
name: "%{BKY_CATEGORY_LIST}",
|
|
9414
9421
|
categorystyle: "list_category",
|
|
@@ -9523,7 +9530,7 @@ const rt = {
|
|
|
9523
9530
|
type: "list_reverse_v1"
|
|
9524
9531
|
}
|
|
9525
9532
|
]
|
|
9526
|
-
},
|
|
9533
|
+
}, ht = {
|
|
9527
9534
|
kind: "category",
|
|
9528
9535
|
name: "%{BKY_CATEGORY_LOGIC}",
|
|
9529
9536
|
categorystyle: "logic_category",
|
|
@@ -9565,7 +9572,7 @@ const rt = {
|
|
|
9565
9572
|
type: "logic_ternary_v1"
|
|
9566
9573
|
}
|
|
9567
9574
|
]
|
|
9568
|
-
},
|
|
9575
|
+
}, dt = {
|
|
9569
9576
|
kind: "category",
|
|
9570
9577
|
name: "%{BKY_CATEGORY_LOOP}",
|
|
9571
9578
|
categorystyle: "loop_category",
|
|
@@ -9627,7 +9634,7 @@ const rt = {
|
|
|
9627
9634
|
type: "flow_control_v1"
|
|
9628
9635
|
}
|
|
9629
9636
|
]
|
|
9630
|
-
},
|
|
9637
|
+
}, ft = {
|
|
9631
9638
|
kind: "category",
|
|
9632
9639
|
name: "%{BKY_CATEGORY_MATH}",
|
|
9633
9640
|
categorystyle: "math_category",
|
|
@@ -9782,7 +9789,7 @@ const rt = {
|
|
|
9782
9789
|
type: "math_on_list_v1"
|
|
9783
9790
|
}
|
|
9784
9791
|
]
|
|
9785
|
-
},
|
|
9792
|
+
}, Yn = {
|
|
9786
9793
|
kind: "category",
|
|
9787
9794
|
name: "%{BKY_CATEGORY_MESSAGE}",
|
|
9788
9795
|
categorystyle: "message_category",
|
|
@@ -9818,7 +9825,7 @@ const rt = {
|
|
|
9818
9825
|
type: "open_prompt_dlg_v1"
|
|
9819
9826
|
}
|
|
9820
9827
|
]
|
|
9821
|
-
},
|
|
9828
|
+
}, mt = {
|
|
9822
9829
|
kind: "category",
|
|
9823
9830
|
name: "%{BKY_CATEGORY_OBJECT}",
|
|
9824
9831
|
categorystyle: "object_category",
|
|
@@ -9886,7 +9893,7 @@ const rt = {
|
|
|
9886
9893
|
}
|
|
9887
9894
|
}
|
|
9888
9895
|
]
|
|
9889
|
-
},
|
|
9896
|
+
}, Tt = {
|
|
9890
9897
|
kind: "category",
|
|
9891
9898
|
name: "%{BKY_CATEGORY_TEXT}",
|
|
9892
9899
|
categorystyle: "text_category",
|
|
@@ -10049,7 +10056,7 @@ const rt = {
|
|
|
10049
10056
|
type: "text_reverse_v1"
|
|
10050
10057
|
}
|
|
10051
10058
|
]
|
|
10052
|
-
},
|
|
10059
|
+
}, wn = {
|
|
10053
10060
|
kind: "category",
|
|
10054
10061
|
name: "%{BKY_CATEGORY_TIME}",
|
|
10055
10062
|
categorystyle: "time_category",
|
|
@@ -10073,24 +10080,24 @@ const rt = {
|
|
|
10073
10080
|
}
|
|
10074
10081
|
}
|
|
10075
10082
|
]
|
|
10076
|
-
},
|
|
10083
|
+
}, na = {
|
|
10077
10084
|
kind: "categoryToolbox",
|
|
10078
10085
|
contents: [
|
|
10079
10086
|
{
|
|
10080
10087
|
kind: "category",
|
|
10081
10088
|
name: "%{BKY_CATEGORY_UI}",
|
|
10082
10089
|
categorystyle: "ui_category",
|
|
10083
|
-
custom:
|
|
10090
|
+
custom: tt.name
|
|
10084
10091
|
},
|
|
10085
|
-
|
|
10092
|
+
Yn,
|
|
10093
|
+
dt,
|
|
10086
10094
|
ht,
|
|
10095
|
+
ft,
|
|
10096
|
+
Tt,
|
|
10087
10097
|
pt,
|
|
10088
|
-
dt,
|
|
10089
10098
|
mt,
|
|
10090
10099
|
_t,
|
|
10091
|
-
|
|
10092
|
-
rt,
|
|
10093
|
-
Fn,
|
|
10100
|
+
wn,
|
|
10094
10101
|
{
|
|
10095
10102
|
kind: "category",
|
|
10096
10103
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10107,37 +10114,37 @@ const rt = {
|
|
|
10107
10114
|
kind: "category",
|
|
10108
10115
|
name: "%{BKY_CATEGORY_INTERFACE}",
|
|
10109
10116
|
categorystyle: "interface_category",
|
|
10110
|
-
custom:
|
|
10117
|
+
custom: et.name
|
|
10111
10118
|
}
|
|
10112
10119
|
]
|
|
10113
|
-
},
|
|
10120
|
+
}, oa = {
|
|
10114
10121
|
kind: "categoryToolbox",
|
|
10115
10122
|
contents: [
|
|
10116
10123
|
{
|
|
10117
10124
|
kind: "category",
|
|
10118
10125
|
name: "%{BKY_CATEGORY_FUNC}",
|
|
10119
10126
|
categorystyle: "func_category",
|
|
10120
|
-
custom:
|
|
10127
|
+
custom: ot.name
|
|
10121
10128
|
},
|
|
10122
10129
|
{
|
|
10123
10130
|
kind: "category",
|
|
10124
10131
|
name: "%{BKY_CATEGORY_FLOW}",
|
|
10125
10132
|
categorystyle: "flow_category",
|
|
10126
|
-
custom:
|
|
10133
|
+
custom: nt.name
|
|
10127
10134
|
},
|
|
10128
10135
|
{
|
|
10129
10136
|
kind: "category",
|
|
10130
10137
|
name: "%{BKY_CATEGORY_DATA}",
|
|
10131
10138
|
categorystyle: "data_category",
|
|
10132
|
-
custom:
|
|
10139
|
+
custom: it.name
|
|
10133
10140
|
},
|
|
10141
|
+
dt,
|
|
10134
10142
|
ht,
|
|
10143
|
+
ft,
|
|
10144
|
+
Tt,
|
|
10135
10145
|
pt,
|
|
10136
|
-
dt,
|
|
10137
10146
|
mt,
|
|
10138
10147
|
_t,
|
|
10139
|
-
ft,
|
|
10140
|
-
rt,
|
|
10141
10148
|
{
|
|
10142
10149
|
kind: "category",
|
|
10143
10150
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10151,34 +10158,34 @@ const rt = {
|
|
|
10151
10158
|
custom: ce.name
|
|
10152
10159
|
}
|
|
10153
10160
|
]
|
|
10154
|
-
},
|
|
10161
|
+
}, ia = {
|
|
10155
10162
|
kind: "categoryToolbox",
|
|
10156
10163
|
contents: [
|
|
10157
10164
|
{
|
|
10158
10165
|
kind: "category",
|
|
10159
10166
|
name: "%{BKY_CATEGORY_FUNC}",
|
|
10160
10167
|
categorystyle: "func_category",
|
|
10161
|
-
custom:
|
|
10168
|
+
custom: ot.name
|
|
10162
10169
|
},
|
|
10163
10170
|
{
|
|
10164
10171
|
kind: "category",
|
|
10165
10172
|
name: "%{BKY_CATEGORY_FLOW}",
|
|
10166
10173
|
categorystyle: "flow_category",
|
|
10167
|
-
custom:
|
|
10174
|
+
custom: nt.name
|
|
10168
10175
|
},
|
|
10169
10176
|
{
|
|
10170
10177
|
kind: "category",
|
|
10171
10178
|
name: "%{BKY_CATEGORY_DATA}",
|
|
10172
10179
|
categorystyle: "data_category",
|
|
10173
|
-
custom:
|
|
10180
|
+
custom: it.name
|
|
10174
10181
|
},
|
|
10182
|
+
dt,
|
|
10175
10183
|
ht,
|
|
10184
|
+
ft,
|
|
10185
|
+
Tt,
|
|
10176
10186
|
pt,
|
|
10177
|
-
dt,
|
|
10178
10187
|
mt,
|
|
10179
10188
|
_t,
|
|
10180
|
-
ft,
|
|
10181
|
-
rt,
|
|
10182
10189
|
{
|
|
10183
10190
|
kind: "category",
|
|
10184
10191
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10192,7 +10199,7 @@ const rt = {
|
|
|
10192
10199
|
custom: ce.name
|
|
10193
10200
|
}
|
|
10194
10201
|
]
|
|
10195
|
-
},
|
|
10202
|
+
}, sa = {
|
|
10196
10203
|
kind: "categoryToolbox",
|
|
10197
10204
|
contents: [
|
|
10198
10205
|
{
|
|
@@ -10223,24 +10230,24 @@ const rt = {
|
|
|
10223
10230
|
]
|
|
10224
10231
|
}
|
|
10225
10232
|
]
|
|
10226
|
-
},
|
|
10233
|
+
}, aa = {
|
|
10227
10234
|
kind: "categoryToolbox",
|
|
10228
10235
|
contents: [
|
|
10229
10236
|
{
|
|
10230
10237
|
kind: "category",
|
|
10231
10238
|
name: "%{BKY_CATEGORY_UI}",
|
|
10232
10239
|
categorystyle: "ui_category",
|
|
10233
|
-
custom:
|
|
10240
|
+
custom: tt.name
|
|
10234
10241
|
},
|
|
10235
|
-
|
|
10242
|
+
Yn,
|
|
10243
|
+
dt,
|
|
10236
10244
|
ht,
|
|
10245
|
+
ft,
|
|
10246
|
+
Tt,
|
|
10237
10247
|
pt,
|
|
10238
|
-
dt,
|
|
10239
10248
|
mt,
|
|
10240
10249
|
_t,
|
|
10241
|
-
|
|
10242
|
-
rt,
|
|
10243
|
-
Fn,
|
|
10250
|
+
wn,
|
|
10244
10251
|
{
|
|
10245
10252
|
kind: "category",
|
|
10246
10253
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10257,29 +10264,29 @@ const rt = {
|
|
|
10257
10264
|
kind: "category",
|
|
10258
10265
|
name: "%{BKY_CATEGORY_INTERFACE}",
|
|
10259
10266
|
categorystyle: "interface_category",
|
|
10260
|
-
custom:
|
|
10267
|
+
custom: et.name
|
|
10261
10268
|
}
|
|
10262
10269
|
]
|
|
10263
|
-
},
|
|
10264
|
-
function
|
|
10265
|
-
|
|
10270
|
+
}, Kn = Symbol();
|
|
10271
|
+
function ca(t) {
|
|
10272
|
+
Zn(Kn, t);
|
|
10266
10273
|
}
|
|
10267
|
-
function
|
|
10268
|
-
return
|
|
10274
|
+
function jt() {
|
|
10275
|
+
return eo(Kn);
|
|
10269
10276
|
}
|
|
10270
|
-
const
|
|
10277
|
+
const la = /* @__PURE__ */ oe({
|
|
10271
10278
|
__name: "index",
|
|
10272
10279
|
props: {
|
|
10273
10280
|
lock: { type: Boolean }
|
|
10274
10281
|
},
|
|
10275
10282
|
setup(t, { expose: e }) {
|
|
10276
|
-
const { t: n } = Fe(), o = t, i =
|
|
10283
|
+
const { t: n } = Fe(), o = t, i = jt(), a = () => {
|
|
10277
10284
|
if (!i.workspace) {
|
|
10278
10285
|
console.assert(!1);
|
|
10279
10286
|
return;
|
|
10280
10287
|
}
|
|
10281
10288
|
if (o.lock) {
|
|
10282
|
-
|
|
10289
|
+
En(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
10283
10290
|
return;
|
|
10284
10291
|
}
|
|
10285
10292
|
i.workspace.cleanUp();
|
|
@@ -10292,7 +10299,7 @@ const aa = /* @__PURE__ */ oe({
|
|
|
10292
10299
|
text: P(n)("x-block-lib.tip.hotkeyCtrlQ")
|
|
10293
10300
|
}, {
|
|
10294
10301
|
activator: ee(({ props: A }) => [
|
|
10295
|
-
B(p,
|
|
10302
|
+
B(p, wt(A, {
|
|
10296
10303
|
density: "comfortable",
|
|
10297
10304
|
icon: "mdi-broom",
|
|
10298
10305
|
variant: "outlined",
|
|
@@ -10303,7 +10310,7 @@ const aa = /* @__PURE__ */ oe({
|
|
|
10303
10310
|
}, 8, ["text"]);
|
|
10304
10311
|
};
|
|
10305
10312
|
}
|
|
10306
|
-
}),
|
|
10313
|
+
}), ua = /* @__PURE__ */ oe({
|
|
10307
10314
|
__name: "index",
|
|
10308
10315
|
props: {
|
|
10309
10316
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10318,7 +10325,7 @@ const aa = /* @__PURE__ */ oe({
|
|
|
10318
10325
|
text: P(e)("x-block-lib.tip.hotkeyCtrlW")
|
|
10319
10326
|
}, {
|
|
10320
10327
|
activator: ee(({ props: u }) => [
|
|
10321
|
-
B(a,
|
|
10328
|
+
B(a, wt(u, {
|
|
10322
10329
|
density: "comfortable",
|
|
10323
10330
|
icon: n.value ? "mdi-lock" : "mdi-lock-open",
|
|
10324
10331
|
variant: "outlined",
|
|
@@ -10329,7 +10336,7 @@ const aa = /* @__PURE__ */ oe({
|
|
|
10329
10336
|
}, 8, ["text"]);
|
|
10330
10337
|
};
|
|
10331
10338
|
}
|
|
10332
|
-
}),
|
|
10339
|
+
}), ra = { class: "text-subtitle-1 ml-6" }, _a = /* @__PURE__ */ oe({
|
|
10333
10340
|
__name: "item",
|
|
10334
10341
|
props: {
|
|
10335
10342
|
id: {},
|
|
@@ -10355,15 +10362,15 @@ const aa = /* @__PURE__ */ oe({
|
|
|
10355
10362
|
pointerEvents: "none"
|
|
10356
10363
|
}));
|
|
10357
10364
|
return (I, A) => {
|
|
10358
|
-
const f = V("v-spacer"), C = V("v-icon"), g =
|
|
10359
|
-
return
|
|
10365
|
+
const f = V("v-spacer"), C = V("v-icon"), g = to("ripple");
|
|
10366
|
+
return no((D(), Q("div", {
|
|
10360
10367
|
class: "d-flex align-center cursor-pointer",
|
|
10361
10368
|
style: W(r.value),
|
|
10362
10369
|
onClick: A[1] || (A[1] = (M) => l("x-click", a.id)),
|
|
10363
10370
|
onMouseout: A[2] || (A[2] = (M) => u.value = !1),
|
|
10364
10371
|
onMouseover: A[3] || (A[3] = (M) => u.value = !0)
|
|
10365
10372
|
}, [
|
|
10366
|
-
j("span",
|
|
10373
|
+
j("span", ra, st(a.title), 1),
|
|
10367
10374
|
B(f),
|
|
10368
10375
|
B(C, {
|
|
10369
10376
|
class: "x-handle cursor-move mr-3",
|
|
@@ -10379,12 +10386,12 @@ const aa = /* @__PURE__ */ oe({
|
|
|
10379
10386
|
]);
|
|
10380
10387
|
};
|
|
10381
10388
|
}
|
|
10382
|
-
}),
|
|
10389
|
+
}), pa = {
|
|
10383
10390
|
key: 1,
|
|
10384
10391
|
class: "text-caption text-grey"
|
|
10385
|
-
},
|
|
10392
|
+
}, ha = /* @__PURE__ */ oe({
|
|
10386
10393
|
__name: "index",
|
|
10387
|
-
props: /* @__PURE__ */
|
|
10394
|
+
props: /* @__PURE__ */ Lt({
|
|
10388
10395
|
lock: { type: Boolean }
|
|
10389
10396
|
}, {
|
|
10390
10397
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10392,7 +10399,7 @@ const aa = /* @__PURE__ */ oe({
|
|
|
10392
10399
|
}),
|
|
10393
10400
|
emits: ["update:modelValue"],
|
|
10394
10401
|
setup(t, { expose: e }) {
|
|
10395
|
-
const { t: n } = Fe(), o = Be(t, "modelValue"), i =
|
|
10402
|
+
const { t: n } = Fe(), o = Be(t, "modelValue"), i = jt(), a = Ee([]);
|
|
10396
10403
|
e({ update: () => {
|
|
10397
10404
|
if (!i.workspace) {
|
|
10398
10405
|
console.assert(!1);
|
|
@@ -10400,7 +10407,7 @@ const aa = /* @__PURE__ */ oe({
|
|
|
10400
10407
|
}
|
|
10401
10408
|
const f = [];
|
|
10402
10409
|
i.workspace.getTopBlocks(!0).forEach((g) => {
|
|
10403
|
-
const M = g.id ===
|
|
10410
|
+
const M = g.id === Eo()?.id;
|
|
10404
10411
|
let w = "<n/a>";
|
|
10405
10412
|
if (g.type.startsWith("on_node_event_v")) {
|
|
10406
10413
|
const q = g, pe = x[q.node.key];
|
|
@@ -10416,7 +10423,7 @@ const aa = /* @__PURE__ */ oe({
|
|
|
10416
10423
|
let u = [];
|
|
10417
10424
|
const r = () => {
|
|
10418
10425
|
if (t.lock) {
|
|
10419
|
-
|
|
10426
|
+
En(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
10420
10427
|
return;
|
|
10421
10428
|
}
|
|
10422
10429
|
const f = [];
|
|
@@ -10448,16 +10455,16 @@ const aa = /* @__PURE__ */ oe({
|
|
|
10448
10455
|
M
|
|
10449
10456
|
).getRelativeToSurfaceXY().y + 10);
|
|
10450
10457
|
const q = g.getRelativeToSurfaceXY();
|
|
10451
|
-
g.moveTo(new v.Coordinate(q.x, w)), i.workspace.cleanUp(),
|
|
10458
|
+
g.moveTo(new v.Coordinate(q.x, w)), i.workspace.cleanUp(), xn();
|
|
10452
10459
|
}, A = async (f) => {
|
|
10453
10460
|
if (!i.workspace) {
|
|
10454
10461
|
console.assert(!1);
|
|
10455
10462
|
return;
|
|
10456
10463
|
}
|
|
10457
10464
|
const C = i.workspace.getBlockById(f);
|
|
10458
|
-
|
|
10465
|
+
Tn.setSelected(C), Wt(f), o.value = !1;
|
|
10459
10466
|
};
|
|
10460
|
-
return (f, C) => a.value.length > 0 ? (D(), Z(P(
|
|
10467
|
+
return (f, C) => a.value.length > 0 ? (D(), Z(P(To), {
|
|
10461
10468
|
key: 0,
|
|
10462
10469
|
modelValue: a.value,
|
|
10463
10470
|
"onUpdate:modelValue": C[0] || (C[0] = (g) => a.value = g),
|
|
@@ -10469,7 +10476,7 @@ const aa = /* @__PURE__ */ oe({
|
|
|
10469
10476
|
onStart: r
|
|
10470
10477
|
}, {
|
|
10471
10478
|
default: ee(() => [
|
|
10472
|
-
(D(!0), Q(
|
|
10479
|
+
(D(!0), Q(rn, null, oo(a.value, (g) => (D(), Z(_a, {
|
|
10473
10480
|
id: g.id,
|
|
10474
10481
|
key: g.id,
|
|
10475
10482
|
select: g.select,
|
|
@@ -10478,14 +10485,14 @@ const aa = /* @__PURE__ */ oe({
|
|
|
10478
10485
|
}, null, 8, ["id", "select", "title"]))), 128))
|
|
10479
10486
|
]),
|
|
10480
10487
|
_: 1
|
|
10481
|
-
}, 8, ["modelValue"])) : (D(), Q("span",
|
|
10488
|
+
}, 8, ["modelValue"])) : (D(), Q("span", pa, st(P(n)("x-block-lib.noOption")), 1));
|
|
10482
10489
|
}
|
|
10483
|
-
}),
|
|
10490
|
+
}), da = (t, e) => {
|
|
10484
10491
|
const n = t.__vccOpts || t;
|
|
10485
10492
|
for (const [o, i] of e)
|
|
10486
10493
|
n[o] = i;
|
|
10487
10494
|
return n;
|
|
10488
|
-
},
|
|
10495
|
+
}, fa = /* @__PURE__ */ da(ha, [["__scopeId", "data-v-2ba1be08"]]), ma = /* @__PURE__ */ oe({
|
|
10489
10496
|
__name: "index",
|
|
10490
10497
|
props: {
|
|
10491
10498
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10493,7 +10500,7 @@ const aa = /* @__PURE__ */ oe({
|
|
|
10493
10500
|
},
|
|
10494
10501
|
emits: ["update:modelValue"],
|
|
10495
10502
|
setup(t, { expose: e }) {
|
|
10496
|
-
const n = Be(t, "modelValue"), o =
|
|
10503
|
+
const n = Be(t, "modelValue"), o = jt();
|
|
10497
10504
|
e({ update: () => {
|
|
10498
10505
|
if (!o.workspace) {
|
|
10499
10506
|
console.assert(!1);
|
|
@@ -10507,20 +10514,20 @@ const aa = /* @__PURE__ */ oe({
|
|
|
10507
10514
|
return;
|
|
10508
10515
|
}
|
|
10509
10516
|
const r = u.getBlockById(l);
|
|
10510
|
-
|
|
10517
|
+
Tn.setSelected(r), Wt(l), n.value = !1;
|
|
10511
10518
|
};
|
|
10512
10519
|
return (l, u) => (D(), Q("div", {
|
|
10513
10520
|
onClick: u[0] || (u[0] = (r) => a(""))
|
|
10514
10521
|
}, "blockTree"));
|
|
10515
10522
|
}
|
|
10516
|
-
}),
|
|
10523
|
+
}), Ta = { class: "text-subtitle-1" }, Ea = /* @__PURE__ */ oe({
|
|
10517
10524
|
__name: "index",
|
|
10518
10525
|
props: {
|
|
10519
10526
|
type: {},
|
|
10520
10527
|
lock: { type: Boolean }
|
|
10521
10528
|
},
|
|
10522
10529
|
setup(t, { expose: e }) {
|
|
10523
|
-
const { t: n } = Fe(), o =
|
|
10530
|
+
const { t: n } = Fe(), o = Bo(), { sysBarAvail: i } = gn(), { backgroundColor1: a } = xe(), l = K(() => {
|
|
10524
10531
|
let C = "100%";
|
|
10525
10532
|
return o.mdAndUp.value && (C = "400px"), {
|
|
10526
10533
|
background: a.value,
|
|
@@ -10535,25 +10542,25 @@ const aa = /* @__PURE__ */ oe({
|
|
|
10535
10542
|
};
|
|
10536
10543
|
}), r = K(() => ({
|
|
10537
10544
|
height: "60px"
|
|
10538
|
-
})), { open: p } =
|
|
10539
|
-
|
|
10545
|
+
})), { open: p } = $t(`blocklyNavigatorDlg${St()}`);
|
|
10546
|
+
_n(() => {
|
|
10540
10547
|
p.value = !1;
|
|
10541
10548
|
});
|
|
10542
10549
|
const I = Le("blockList"), A = Le("blockTree");
|
|
10543
10550
|
return e({ open: p, update: () => {
|
|
10544
10551
|
t.type === "list" ? I.value?.update() : t.type === "tree" && A.value?.update();
|
|
10545
10552
|
} }), (C, g) => {
|
|
10546
|
-
const M = V("v-sheet"), w = V("v-btn"), q = V("v-spacer"), pe = V("v-dialog"),
|
|
10547
|
-
return D(), Q(
|
|
10553
|
+
const M = V("v-sheet"), w = V("v-btn"), q = V("v-spacer"), pe = V("v-dialog"), Et = V("v-tooltip");
|
|
10554
|
+
return D(), Q(rn, null, [
|
|
10548
10555
|
B(pe, {
|
|
10549
10556
|
modelValue: P(p),
|
|
10550
|
-
"onUpdate:modelValue": g[5] || (g[5] = (G) =>
|
|
10557
|
+
"onUpdate:modelValue": g[5] || (g[5] = (G) => We(p) ? p.value = G : null),
|
|
10551
10558
|
eager: "",
|
|
10552
10559
|
fullscreen: "",
|
|
10553
10560
|
"no-click-animation": "",
|
|
10554
10561
|
persistent: "",
|
|
10555
10562
|
transition: "scroll-x-reverse-transition",
|
|
10556
|
-
onKeydown: g[6] || (g[6] =
|
|
10563
|
+
onKeydown: g[6] || (g[6] = pn(Ne((G) => p.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
10557
10564
|
}, {
|
|
10558
10565
|
default: ee(() => [
|
|
10559
10566
|
j("div", {
|
|
@@ -10582,7 +10589,7 @@ const aa = /* @__PURE__ */ oe({
|
|
|
10582
10589
|
variant: "text",
|
|
10583
10590
|
onClick: g[0] || (g[0] = (G) => p.value = !1)
|
|
10584
10591
|
}),
|
|
10585
|
-
j("span",
|
|
10592
|
+
j("span", Ta, st(P(n)("x-block-lib.navigator")), 1),
|
|
10586
10593
|
B(q)
|
|
10587
10594
|
]),
|
|
10588
10595
|
_: 1
|
|
@@ -10591,19 +10598,19 @@ const aa = /* @__PURE__ */ oe({
|
|
|
10591
10598
|
class: "overflow-y-auto",
|
|
10592
10599
|
style: W(u.value)
|
|
10593
10600
|
}, [
|
|
10594
|
-
C.type === "list" ? (D(), Z(
|
|
10601
|
+
C.type === "list" ? (D(), Z(fa, {
|
|
10595
10602
|
key: 0,
|
|
10596
10603
|
ref_key: "blockList",
|
|
10597
10604
|
ref: I,
|
|
10598
10605
|
modelValue: P(p),
|
|
10599
|
-
"onUpdate:modelValue": g[1] || (g[1] = (G) =>
|
|
10606
|
+
"onUpdate:modelValue": g[1] || (g[1] = (G) => We(p) ? p.value = G : null),
|
|
10600
10607
|
lock: C.lock
|
|
10601
|
-
}, null, 8, ["modelValue", "lock"])) : C.type === "tree" ? (D(), Z(
|
|
10608
|
+
}, null, 8, ["modelValue", "lock"])) : C.type === "tree" ? (D(), Z(ma, {
|
|
10602
10609
|
key: 1,
|
|
10603
10610
|
ref_key: "blockTree",
|
|
10604
10611
|
ref: A,
|
|
10605
10612
|
modelValue: P(p),
|
|
10606
|
-
"onUpdate:modelValue": g[2] || (g[2] = (G) =>
|
|
10613
|
+
"onUpdate:modelValue": g[2] || (g[2] = (G) => We(p) ? p.value = G : null)
|
|
10607
10614
|
}, null, 8, ["modelValue"])) : de("", !0),
|
|
10608
10615
|
j("div", {
|
|
10609
10616
|
style: W(r.value)
|
|
@@ -10614,15 +10621,15 @@ const aa = /* @__PURE__ */ oe({
|
|
|
10614
10621
|
]),
|
|
10615
10622
|
_: 1
|
|
10616
10623
|
}, 8, ["modelValue"]),
|
|
10617
|
-
B(
|
|
10624
|
+
B(Et, {
|
|
10618
10625
|
text: P(n)("x-block-lib.tip.hotkeyCtrlE")
|
|
10619
10626
|
}, {
|
|
10620
10627
|
activator: ee(({ props: G }) => [
|
|
10621
|
-
B(w,
|
|
10628
|
+
B(w, wt(G, {
|
|
10622
10629
|
density: "comfortable",
|
|
10623
10630
|
icon: "mdi-navigation-variant",
|
|
10624
10631
|
variant: "outlined",
|
|
10625
|
-
onClick: g[7] || (g[7] = (
|
|
10632
|
+
onClick: g[7] || (g[7] = (Xt) => p.value = !0)
|
|
10626
10633
|
}), null, 16)
|
|
10627
10634
|
]),
|
|
10628
10635
|
_: 1
|
|
@@ -10630,7 +10637,7 @@ const aa = /* @__PURE__ */ oe({
|
|
|
10630
10637
|
], 64);
|
|
10631
10638
|
};
|
|
10632
10639
|
}
|
|
10633
|
-
}),
|
|
10640
|
+
}), Nt = {
|
|
10634
10641
|
grid: {
|
|
10635
10642
|
length: 2,
|
|
10636
10643
|
snap: !0,
|
|
@@ -10656,22 +10663,22 @@ const aa = /* @__PURE__ */ oe({
|
|
|
10656
10663
|
wheel: !0
|
|
10657
10664
|
}
|
|
10658
10665
|
};
|
|
10659
|
-
function
|
|
10660
|
-
|
|
10661
|
-
const i =
|
|
10662
|
-
return i.addChangeListener(
|
|
10666
|
+
function ga(t, e, n, o) {
|
|
10667
|
+
Nt.theme = o ? "dark" : "light", Nt.toolbox = Ia(e, n);
|
|
10668
|
+
const i = go(t, Nt);
|
|
10669
|
+
return i.addChangeListener(Io.shadowBlockConversionChangeListener), Aa(i, e, n), Oa(i), i;
|
|
10663
10670
|
}
|
|
10664
|
-
function
|
|
10671
|
+
function Ia(t, e) {
|
|
10665
10672
|
let n;
|
|
10666
|
-
return t === "page" ? e === "v1" && (n =
|
|
10673
|
+
return t === "page" ? e === "v1" && (n = aa) : t === "comp" ? e === "v1" && (n = na) : t === "func" ? e === "v1" && (n = ia) : t === "flow" ? e === "v1" && (n = oa) : t === "json" && e === "v1" && (n = sa), console.assert(!!n, `invalid toolbox type=${t} version=${e}`), n;
|
|
10667
10674
|
}
|
|
10668
|
-
function
|
|
10675
|
+
function Aa(t, e, n) {
|
|
10669
10676
|
function o({ name: i, callback: a }) {
|
|
10670
10677
|
t.registerToolboxCategoryCallback(i, () => a(e));
|
|
10671
10678
|
}
|
|
10672
|
-
e === "page" || e === "comp" ? n === "v1" && (o(
|
|
10679
|
+
e === "page" || e === "comp" ? n === "v1" && (o(tt), o(le), o(ce), o(et)) : e === "func" ? n === "v1" && (o(ot), o(nt), o(it), o(le), o(ce)) : e === "flow" && n === "v1" && (o(nt), o(ot), o(it), o(le), o(ce));
|
|
10673
10680
|
}
|
|
10674
|
-
function
|
|
10681
|
+
function Oa(t) {
|
|
10675
10682
|
const { router: e } = ie;
|
|
10676
10683
|
t.registerButtonCallback("NO_COMPUTE", () => {
|
|
10677
10684
|
const n = e.resolve({
|
|
@@ -10689,7 +10696,7 @@ function Ia(t) {
|
|
|
10689
10696
|
}, 100);
|
|
10690
10697
|
});
|
|
10691
10698
|
}
|
|
10692
|
-
function
|
|
10699
|
+
function Ca(t, e) {
|
|
10693
10700
|
const n = e.newBlock("json_root_v1");
|
|
10694
10701
|
n.initSvg(), n.render();
|
|
10695
10702
|
const o = (i, a) => {
|
|
@@ -10731,7 +10738,7 @@ function Aa(t, e) {
|
|
|
10731
10738
|
new (E.get(E.FINISHED_LOADING))(e)
|
|
10732
10739
|
);
|
|
10733
10740
|
}
|
|
10734
|
-
function
|
|
10741
|
+
function ka(t) {
|
|
10735
10742
|
const e = (o) => {
|
|
10736
10743
|
if (!o)
|
|
10737
10744
|
return null;
|
|
@@ -10763,9 +10770,9 @@ function Oa(t) {
|
|
|
10763
10770
|
if (o.type === "json_root_v1")
|
|
10764
10771
|
return e(o);
|
|
10765
10772
|
}
|
|
10766
|
-
const
|
|
10773
|
+
const va = { class: "position-relative w-100 h-100" }, ya = /* @__PURE__ */ oe({
|
|
10767
10774
|
__name: "index",
|
|
10768
|
-
props: /* @__PURE__ */
|
|
10775
|
+
props: /* @__PURE__ */ Lt({
|
|
10769
10776
|
type: {},
|
|
10770
10777
|
version: {},
|
|
10771
10778
|
locale: {},
|
|
@@ -10776,10 +10783,10 @@ const Ca = { class: "position-relative w-100 h-100" }, ka = /* @__PURE__ */ oe({
|
|
|
10776
10783
|
scale: { required: !0 },
|
|
10777
10784
|
scaleModifiers: {}
|
|
10778
10785
|
}),
|
|
10779
|
-
emits: /* @__PURE__ */
|
|
10786
|
+
emits: /* @__PURE__ */ Lt(["ready"], ["update:lock", "update:scale"]),
|
|
10780
10787
|
setup(t, { expose: e, emit: n }) {
|
|
10781
|
-
const { backgroundColor2: o } = xe(), i = Be(t, "lock"), a = Be(t, "scale"), l = n, u = `blocklyEditor${
|
|
10782
|
-
|
|
10788
|
+
const { backgroundColor2: o } = xe(), i = Be(t, "lock"), a = Be(t, "scale"), l = n, u = `blocklyEditor${St()}`, r = Ee(), p = Le("parentContainer"), I = Le("clean"), A = Le("navigator"), f = {};
|
|
10789
|
+
ca(f);
|
|
10783
10790
|
const C = Ee(!0), g = Ee(!1), M = K(() => t.type === "json" ? "tree" : "list"), w = K(() => ({
|
|
10784
10791
|
width: "100%",
|
|
10785
10792
|
height: "calc(100% - 48px)"
|
|
@@ -10797,7 +10804,7 @@ const Ca = { class: "position-relative w-100 h-100" }, ka = /* @__PURE__ */ oe({
|
|
|
10797
10804
|
width: "56px",
|
|
10798
10805
|
height: "calc(100% - 49px)",
|
|
10799
10806
|
zIndex: 999
|
|
10800
|
-
})),
|
|
10807
|
+
})), Et = K(() => ({
|
|
10801
10808
|
position: "absolute",
|
|
10802
10809
|
top: "0px",
|
|
10803
10810
|
right: "0px",
|
|
@@ -10810,7 +10817,7 @@ const Ca = { class: "position-relative w-100 h-100" }, ka = /* @__PURE__ */ oe({
|
|
|
10810
10817
|
width: "100%",
|
|
10811
10818
|
height: "calc(100% - 48px)",
|
|
10812
10819
|
pointerEvents: "none"
|
|
10813
|
-
})),
|
|
10820
|
+
})), Xt = K(() => ({
|
|
10814
10821
|
position: "absolute",
|
|
10815
10822
|
background: t.dark ? "#0000007f" : "#ffffff7f",
|
|
10816
10823
|
top: "1px",
|
|
@@ -10818,32 +10825,32 @@ const Ca = { class: "position-relative w-100 h-100" }, ka = /* @__PURE__ */ oe({
|
|
|
10818
10825
|
width: "56px",
|
|
10819
10826
|
height: "calc(100% - 49px)",
|
|
10820
10827
|
zIndex: 999
|
|
10821
|
-
})),
|
|
10828
|
+
})), $n = K(() => ({
|
|
10822
10829
|
position: "fixed",
|
|
10823
10830
|
top: 0,
|
|
10824
10831
|
left: 0,
|
|
10825
10832
|
zIndex: 3e3
|
|
10826
|
-
})), { open: ke } =
|
|
10827
|
-
|
|
10833
|
+
})), { open: ke } = $t(`blocklyEditorFlyout${St()}`);
|
|
10834
|
+
zt(async () => {
|
|
10828
10835
|
if (!r.value || !p.value) {
|
|
10829
10836
|
console.assert(!1);
|
|
10830
10837
|
return;
|
|
10831
10838
|
}
|
|
10832
|
-
|
|
10839
|
+
Ao(p.value), await un(t.locale), f.workspace = ga(r.value, t.type, t.version, t.dark), f.workspace.addChangeListener(E.disableOrphans), f.workspace.addChangeListener(Hn);
|
|
10833
10840
|
const y = document.querySelector(`#${u} .blocklyFlyout`);
|
|
10834
|
-
new MutationObserver((
|
|
10835
|
-
|
|
10836
|
-
|
|
10841
|
+
new MutationObserver((gt) => {
|
|
10842
|
+
gt.forEach(($e) => {
|
|
10843
|
+
$e.type === "attributes" && $e.attributeName === "style" && (ke.value = f.workspace.getFlyout().isVisible());
|
|
10837
10844
|
});
|
|
10838
|
-
}).observe(y, { attributes: !0 }), ke.value = f.workspace.getFlyout().isVisible(),
|
|
10839
|
-
}),
|
|
10845
|
+
}).observe(y, { attributes: !0 }), ke.value = f.workspace.getFlyout().isVisible(), Jt(), qt(), await io(), l("ready");
|
|
10846
|
+
}), so(() => {
|
|
10840
10847
|
ke.value = !1;
|
|
10841
|
-
}),
|
|
10842
|
-
f.workspace &&
|
|
10848
|
+
}), Oo(r, () => {
|
|
10849
|
+
f.workspace && Co(f.workspace);
|
|
10843
10850
|
});
|
|
10844
|
-
async function
|
|
10851
|
+
async function Hn(y) {
|
|
10845
10852
|
if (y.type === E.FINISHED_LOADING) {
|
|
10846
|
-
|
|
10853
|
+
xn(), setTimeout(() => {
|
|
10847
10854
|
A.value?.update();
|
|
10848
10855
|
}, 0), C.value = !1;
|
|
10849
10856
|
return;
|
|
@@ -10858,62 +10865,62 @@ const Ca = { class: "position-relative w-100 h-100" }, ka = /* @__PURE__ */ oe({
|
|
|
10858
10865
|
}, 0);
|
|
10859
10866
|
}
|
|
10860
10867
|
}
|
|
10861
|
-
const
|
|
10862
|
-
C.value = !0, t.type === "json" ?
|
|
10863
|
-
},
|
|
10868
|
+
const Gn = (y) => {
|
|
10869
|
+
C.value = !0, t.type === "json" ? Ca(y, f.workspace) : $.workspaces.load(y, f.workspace);
|
|
10870
|
+
}, Wn = () => t.type === "json" ? ka(f.workspace) : $.workspaces.save(f.workspace), jn = () => {
|
|
10864
10871
|
if (t.type === "json")
|
|
10865
10872
|
console.assert(!1);
|
|
10866
10873
|
else
|
|
10867
10874
|
return s.workspaceToCode(f.workspace);
|
|
10868
|
-
}, Xt = () => {
|
|
10869
|
-
f.workspace.setIsReadOnly(i.value), f.workspace.isReadOnly() && (ke.value = !1);
|
|
10870
10875
|
}, Jt = () => {
|
|
10876
|
+
f.workspace.setIsReadOnly(i.value), f.workspace.isReadOnly() && (ke.value = !1);
|
|
10877
|
+
}, qt = () => {
|
|
10871
10878
|
f.workspace.setScale(a.value);
|
|
10872
|
-
},
|
|
10873
|
-
f.workspace.fireChangeListener(new
|
|
10874
|
-
},
|
|
10879
|
+
}, Xn = () => {
|
|
10880
|
+
f.workspace.fireChangeListener(new In());
|
|
10881
|
+
}, Qt = (y) => {
|
|
10875
10882
|
if (y.key === "q" && y.ctrlKey) {
|
|
10876
|
-
|
|
10883
|
+
Jn();
|
|
10877
10884
|
return;
|
|
10878
10885
|
}
|
|
10879
10886
|
if (y.key === "w" && y.ctrlKey) {
|
|
10880
|
-
|
|
10887
|
+
qn();
|
|
10881
10888
|
return;
|
|
10882
10889
|
}
|
|
10883
10890
|
if (y.key === "e" && y.ctrlKey) {
|
|
10884
|
-
|
|
10891
|
+
Qn();
|
|
10885
10892
|
return;
|
|
10886
10893
|
}
|
|
10887
|
-
},
|
|
10894
|
+
}, Jn = () => {
|
|
10888
10895
|
I.value?.cleanWorkspace();
|
|
10889
|
-
},
|
|
10896
|
+
}, qn = () => {
|
|
10890
10897
|
i.value = !i.value;
|
|
10891
|
-
},
|
|
10898
|
+
}, Qn = () => {
|
|
10892
10899
|
A.value && (A.value.open = !0);
|
|
10893
10900
|
};
|
|
10894
|
-
return
|
|
10895
|
-
window.addEventListener("keydown",
|
|
10896
|
-
}),
|
|
10897
|
-
window.removeEventListener("keydown",
|
|
10901
|
+
return zt(() => {
|
|
10902
|
+
window.addEventListener("keydown", Qt, !1);
|
|
10903
|
+
}), _n(() => {
|
|
10904
|
+
window.removeEventListener("keydown", Qt, !1);
|
|
10898
10905
|
}), ve(
|
|
10899
10906
|
() => t.locale,
|
|
10900
10907
|
(y) => {
|
|
10901
|
-
|
|
10908
|
+
un(y);
|
|
10902
10909
|
}
|
|
10903
10910
|
), ve(
|
|
10904
10911
|
() => t.dark,
|
|
10905
10912
|
(y) => {
|
|
10906
|
-
|
|
10913
|
+
ta(y ? "dark" : "light");
|
|
10907
10914
|
}
|
|
10908
10915
|
), ve(ke, (y) => {
|
|
10909
10916
|
y || f.workspace?.hideChaff();
|
|
10910
10917
|
}), ve(i, () => {
|
|
10911
|
-
Xt();
|
|
10912
|
-
}), ve(a, () => {
|
|
10913
10918
|
Jt();
|
|
10914
|
-
}),
|
|
10915
|
-
|
|
10916
|
-
|
|
10919
|
+
}), ve(a, () => {
|
|
10920
|
+
qt();
|
|
10921
|
+
}), e({ loading: C, load: Gn, save: Wn, generateCode: jn, fireStateChange: Xn }), (y, he) => {
|
|
10922
|
+
const gt = V("v-icon"), $e = V("x-loading");
|
|
10923
|
+
return D(), Q("div", va, [
|
|
10917
10924
|
j("div", {
|
|
10918
10925
|
id: u,
|
|
10919
10926
|
ref_key: "blocklyDiv",
|
|
@@ -10923,14 +10930,14 @@ const Ca = { class: "position-relative w-100 h-100" }, ka = /* @__PURE__ */ oe({
|
|
|
10923
10930
|
j("div", {
|
|
10924
10931
|
style: W(q.value)
|
|
10925
10932
|
}, [
|
|
10926
|
-
|
|
10933
|
+
ao(y.$slots, "bottom")
|
|
10927
10934
|
], 4),
|
|
10928
10935
|
g.value ? (D(), Q("div", {
|
|
10929
10936
|
key: 0,
|
|
10930
10937
|
class: "d-flex flex-column justify-center align-center",
|
|
10931
10938
|
style: W(pe.value)
|
|
10932
10939
|
}, [
|
|
10933
|
-
B(
|
|
10940
|
+
B(gt, {
|
|
10934
10941
|
icon: "mdi-delete",
|
|
10935
10942
|
size: "x-large"
|
|
10936
10943
|
})
|
|
@@ -10938,18 +10945,18 @@ const Ca = { class: "position-relative w-100 h-100" }, ka = /* @__PURE__ */ oe({
|
|
|
10938
10945
|
C.value ? de("", !0) : (D(), Q("div", {
|
|
10939
10946
|
key: 1,
|
|
10940
10947
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
10941
|
-
style: W(
|
|
10948
|
+
style: W(Et.value)
|
|
10942
10949
|
}, [
|
|
10943
|
-
B(
|
|
10950
|
+
B(la, {
|
|
10944
10951
|
ref_key: "clean",
|
|
10945
10952
|
ref: I,
|
|
10946
10953
|
lock: i.value
|
|
10947
10954
|
}, null, 8, ["lock"]),
|
|
10948
|
-
B(
|
|
10955
|
+
B(ua, {
|
|
10949
10956
|
modelValue: i.value,
|
|
10950
|
-
"onUpdate:modelValue": he[0] || (he[0] = (
|
|
10957
|
+
"onUpdate:modelValue": he[0] || (he[0] = (zn) => i.value = zn)
|
|
10951
10958
|
}, null, 8, ["modelValue"]),
|
|
10952
|
-
B(
|
|
10959
|
+
B(Ea, {
|
|
10953
10960
|
ref_key: "navigator",
|
|
10954
10961
|
ref: A,
|
|
10955
10962
|
lock: i.value,
|
|
@@ -10958,7 +10965,7 @@ const Ca = { class: "position-relative w-100 h-100" }, ka = /* @__PURE__ */ oe({
|
|
|
10958
10965
|
], 4)),
|
|
10959
10966
|
i.value ? (D(), Q("div", {
|
|
10960
10967
|
key: 2,
|
|
10961
|
-
style: W(
|
|
10968
|
+
style: W(Xt.value)
|
|
10962
10969
|
}, null, 4)) : de("", !0),
|
|
10963
10970
|
i.value ? (D(), Q("div", {
|
|
10964
10971
|
key: 3,
|
|
@@ -10967,24 +10974,24 @@ const Ca = { class: "position-relative w-100 h-100" }, ka = /* @__PURE__ */ oe({
|
|
|
10967
10974
|
j("div", {
|
|
10968
10975
|
ref_key: "parentContainer",
|
|
10969
10976
|
ref: p,
|
|
10970
|
-
style: W(
|
|
10977
|
+
style: W($n.value)
|
|
10971
10978
|
}, null, 4),
|
|
10972
|
-
B(
|
|
10979
|
+
B($e, {
|
|
10973
10980
|
open: C.value,
|
|
10974
10981
|
"z-index": 99
|
|
10975
10982
|
}, null, 8, ["open"])
|
|
10976
10983
|
]);
|
|
10977
10984
|
};
|
|
10978
10985
|
}
|
|
10979
|
-
}),
|
|
10986
|
+
}), Na = /* @__PURE__ */ oe({
|
|
10980
10987
|
__name: "index",
|
|
10981
10988
|
props: {
|
|
10982
10989
|
code: {}
|
|
10983
10990
|
},
|
|
10984
10991
|
setup(t) {
|
|
10985
10992
|
const e = t;
|
|
10986
|
-
|
|
10987
|
-
const n =
|
|
10993
|
+
ko.registerLanguage("javascript", vo);
|
|
10994
|
+
const n = yo.component, { backgroundColor2: o } = xe();
|
|
10988
10995
|
return (i, a) => {
|
|
10989
10996
|
const l = V("v-sheet");
|
|
10990
10997
|
return D(), Z(l, {
|
|
@@ -11002,10 +11009,10 @@ const Ca = { class: "position-relative w-100 h-100" }, ka = /* @__PURE__ */ oe({
|
|
|
11002
11009
|
}, 8, ["color"]);
|
|
11003
11010
|
};
|
|
11004
11011
|
}
|
|
11005
|
-
}),
|
|
11012
|
+
}), La = { class: "text-subtitle-1" }, Sa = { class: "w-100 h-100 overflow-auto" }, ba = /* @__PURE__ */ oe({
|
|
11006
11013
|
__name: "index",
|
|
11007
11014
|
setup(t) {
|
|
11008
|
-
const { t: e } = Fe(), { sysBarAvail: n } =
|
|
11015
|
+
const { t: e } = Fe(), { sysBarAvail: n } = gn(), { backgroundColor0: o, backgroundColor2: i } = xe(), a = Ee(""), l = K(() => {
|
|
11009
11016
|
let p = 48;
|
|
11010
11017
|
return n.value && (p += 24), {
|
|
11011
11018
|
position: "relative",
|
|
@@ -11013,17 +11020,17 @@ const Ca = { class: "position-relative w-100 h-100" }, ka = /* @__PURE__ */ oe({
|
|
|
11013
11020
|
};
|
|
11014
11021
|
}), u = (p) => {
|
|
11015
11022
|
a.value = p.code;
|
|
11016
|
-
}, { open: r } =
|
|
11023
|
+
}, { open: r } = $t("sourceDlg", u);
|
|
11017
11024
|
return (p, I) => {
|
|
11018
11025
|
const A = V("v-sheet"), f = V("v-btn"), C = V("v-spacer"), g = V("v-dialog");
|
|
11019
11026
|
return D(), Z(g, {
|
|
11020
11027
|
modelValue: P(r),
|
|
11021
|
-
"onUpdate:modelValue": I[1] || (I[1] = (M) =>
|
|
11028
|
+
"onUpdate:modelValue": I[1] || (I[1] = (M) => We(r) ? r.value = M : null),
|
|
11022
11029
|
fullscreen: "",
|
|
11023
11030
|
"no-click-animation": "",
|
|
11024
11031
|
persistent: "",
|
|
11025
11032
|
transition: "dialog-bottom-transition",
|
|
11026
|
-
onKeydown: I[2] || (I[2] =
|
|
11033
|
+
onKeydown: I[2] || (I[2] = pn(Ne((M) => r.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
11027
11034
|
}, {
|
|
11028
11035
|
default: ee(() => [
|
|
11029
11036
|
B(A, {
|
|
@@ -11049,7 +11056,7 @@ const Ca = { class: "position-relative w-100 h-100" }, ka = /* @__PURE__ */ oe({
|
|
|
11049
11056
|
variant: "text",
|
|
11050
11057
|
onClick: I[0] || (I[0] = (M) => r.value = !1)
|
|
11051
11058
|
}),
|
|
11052
|
-
j("span",
|
|
11059
|
+
j("span", La, st(P(e)("x-block-lib.dlg.source.title")), 1),
|
|
11053
11060
|
B(C)
|
|
11054
11061
|
]),
|
|
11055
11062
|
_: 1
|
|
@@ -11057,8 +11064,8 @@ const Ca = { class: "position-relative w-100 h-100" }, ka = /* @__PURE__ */ oe({
|
|
|
11057
11064
|
j("div", {
|
|
11058
11065
|
style: W(l.value)
|
|
11059
11066
|
}, [
|
|
11060
|
-
j("div",
|
|
11061
|
-
B(
|
|
11067
|
+
j("div", Sa, [
|
|
11068
|
+
B(Na, { code: a.value }, null, 8, ["code"])
|
|
11062
11069
|
])
|
|
11063
11070
|
], 4)
|
|
11064
11071
|
]),
|
|
@@ -11069,16 +11076,16 @@ const Ca = { class: "position-relative w-100 h-100" }, ka = /* @__PURE__ */ oe({
|
|
|
11069
11076
|
}, 8, ["modelValue"]);
|
|
11070
11077
|
};
|
|
11071
11078
|
}
|
|
11072
|
-
}),
|
|
11073
|
-
t.component("XBlockly",
|
|
11079
|
+
}), Ba = (t) => {
|
|
11080
|
+
t.component("XBlockly", ya), t.component("XSourceDlg", ba);
|
|
11074
11081
|
};
|
|
11075
|
-
async function
|
|
11076
|
-
return (await
|
|
11082
|
+
async function Fa(t) {
|
|
11083
|
+
return (await Vn(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en.owbcs4f2.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans.j5qa8fnp.js") }), `./locales/${t}/index.ts`, 4)).default;
|
|
11077
11084
|
}
|
|
11078
|
-
const
|
|
11085
|
+
const Ya = { install: Ba };
|
|
11079
11086
|
export {
|
|
11080
|
-
|
|
11081
|
-
|
|
11082
|
-
|
|
11083
|
-
|
|
11087
|
+
ya as XBlockly,
|
|
11088
|
+
Ya as default,
|
|
11089
|
+
Ba as install,
|
|
11090
|
+
Fa as loadLocaleMessageBlock
|
|
11084
11091
|
};
|