x-block-lib 0.7.14 → 0.7.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/utils/common/block.d.ts +5 -7
- package/dist/index.js +883 -888
- package/package.json +2 -2
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
|
|
10
|
+
import { provide as Qn, inject as zn, defineComponent as oe, resolveComponent as V, createBlock as Z, openBlock as D, unref as P, withCtx as ee, createVNode as B, mergeProps as Yt, useModel as Be, ref as Ee, computed as K, resolveDirective as Zn, withDirectives as eo, createElementBlock as Q, normalizeStyle as W, createElementVNode as j, toDisplayString as it, withModifiers as Ne, mergeModels as Nt, Fragment as un, renderList as to, useId as Lt, onUnmounted as rn, useTemplateRef as Le, withKeys as _n, isRef as Ge, createCommentVNode as de, onMounted as Qt, nextTick as no, onBeforeUnmount as oo, watch as ve, renderSlot as io } from "vue";
|
|
11
|
+
import { d as h, j as s, O as c, f as so, F as pn, M as _, E, r as zt, u as v, s as ao, X as wt, B as d, i as U, a as k, c as Se, b as St, e as $, g as fe, h as ue, p as be, k as z, l as Zt, m as R, C as hn, N as te, n as co, P as bt, V as Te, o as Ve, q as dn, t as lo, v as uo, w as ro, S as _o, x as po, y as ho, T as st, z as fn, A as fo, D as mo, G as mn, H as To, I as Eo, J as go, K as Io, L as Ao, Q as Oo, R as Co, U as ko } from "./vendor.gwcdj52j.js";
|
|
12
|
+
import { globalObjects as ie, openConfirmDlg as vo, openPromptDlg as yo, messageWarning as Tn, useColor as xe, useSystem as En, useViewStack as Kt } from "x-essential-lib";
|
|
13
|
+
import { elements as x, pkgs as Re, getPropTag as at, parsePixelStr as No, parsePercentStr as Lo } from "x-runtime-lib";
|
|
14
14
|
import { globalState as T } from "x-state-lib";
|
|
15
|
-
import { useI18n as
|
|
16
|
-
import { useDisplay as
|
|
15
|
+
import { useI18n as Fe } from "vue-i18n";
|
|
16
|
+
import { useDisplay as So } 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 pn {
|
|
62
62
|
constructor(e, n, o) {
|
|
63
63
|
super(e, n, o);
|
|
64
64
|
}
|
|
@@ -115,25 +115,25 @@ class m extends dn {
|
|
|
115
115
|
return "<n/a>";
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
|
|
118
|
+
so.register("field_dropdown2", m);
|
|
119
119
|
var L = /* @__PURE__ */ ((t) => (t.STATE_CHANGE = "state_change", t))(L || {});
|
|
120
|
-
class
|
|
120
|
+
class gn extends E.Abstract {
|
|
121
121
|
isBlank = !0;
|
|
122
122
|
}
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
zt.register(
|
|
124
|
+
zt.Type.EVENT,
|
|
125
125
|
"state_change",
|
|
126
|
-
|
|
126
|
+
gn
|
|
127
127
|
);
|
|
128
|
-
const
|
|
129
|
-
function
|
|
128
|
+
const ge = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", Xe = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
|
|
129
|
+
function ct(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 = ao(t.substring(0, e - 1)), o = "v" + t.substring(e + 1);
|
|
134
134
|
return `${n}_${o}`;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function Je(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,51 +157,65 @@ 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 bo(t) {
|
|
161
161
|
let e = 0;
|
|
162
162
|
for (; t; )
|
|
163
163
|
e++, t = t.getParent();
|
|
164
164
|
return e;
|
|
165
165
|
}
|
|
166
|
-
function
|
|
167
|
-
const
|
|
168
|
-
return
|
|
166
|
+
function We(t) {
|
|
167
|
+
const e = `<block type="text_v1"><field name="TEXT">${t}</field></block>`;
|
|
168
|
+
return v.xml.textToDom(e);
|
|
169
169
|
}
|
|
170
|
-
function
|
|
171
|
-
const
|
|
172
|
-
return
|
|
170
|
+
function Bt(t) {
|
|
171
|
+
const e = `<block type="math_number_v1"><field name="NUM">${t}</field></block>`;
|
|
172
|
+
return v.xml.textToDom(e);
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
const
|
|
176
|
-
return
|
|
174
|
+
function In(t) {
|
|
175
|
+
const e = `<block type="logic_boolean_v1"><field name="BOOL">${t ? "TRUE" : "FALSE"}</field></block>`;
|
|
176
|
+
return v.xml.textToDom(e);
|
|
177
177
|
}
|
|
178
|
-
function
|
|
179
|
-
const
|
|
180
|
-
return
|
|
178
|
+
function Bo(t) {
|
|
179
|
+
const e = `<block type="${ct(t)}"></block>`;
|
|
180
|
+
return v.xml.textToDom(e);
|
|
181
181
|
}
|
|
182
|
-
function
|
|
183
|
-
const
|
|
184
|
-
return
|
|
182
|
+
function Ro(t) {
|
|
183
|
+
const e = `<block type="${ct(t)}"></block>`;
|
|
184
|
+
return v.xml.textToDom(e);
|
|
185
|
+
}
|
|
186
|
+
function Do() {
|
|
187
|
+
return v.xml.textToDom('<block type="select_comp_v1"></block>');
|
|
188
|
+
}
|
|
189
|
+
function Uo(t) {
|
|
190
|
+
const e = `<block type="color_picker_v1"><field name="COLOR">${t}</field></block>`;
|
|
191
|
+
return v.xml.textToDom(e);
|
|
185
192
|
}
|
|
186
|
-
function
|
|
187
|
-
|
|
188
|
-
return
|
|
193
|
+
function Mo(t) {
|
|
194
|
+
let e = null;
|
|
195
|
+
return t.ui === "dummy" ? console.assert(!0) : t.ui === "strInput" ? e = We(t.default) : t.ui === "numInput" ? e = Bt(t.default) : t.ui === "switch" ? e = In(t.default) : t.ui === "select" ? e = Bo(t.items) : t.ui === "multiTypes" ? e = Ro(t.types) : t.ui === "compSelect" ? e = Do() : t.ui === "colorPicker" ? e = Uo(t.default ?? "#ff0000") : console.assert(!1), e;
|
|
189
196
|
}
|
|
190
|
-
function
|
|
191
|
-
const n =
|
|
192
|
-
return
|
|
197
|
+
function An(t, e) {
|
|
198
|
+
const n = Mo(e);
|
|
199
|
+
return n ? wt.domToBlock(n, t) : null;
|
|
193
200
|
}
|
|
194
|
-
function
|
|
195
|
-
let
|
|
196
|
-
return
|
|
201
|
+
function Po(t) {
|
|
202
|
+
let e = null;
|
|
203
|
+
return t === "string" ? e = We("") : t === "integer" || t === "float" ? e = Bt(0) : t === "boolean" ? e = In(!1) : t === "enum" || t === "dateTime" ? e = We("") : console.assert(!1), e;
|
|
197
204
|
}
|
|
198
|
-
function
|
|
205
|
+
function Rt(t, e) {
|
|
206
|
+
const n = Po(e);
|
|
207
|
+
return n ? wt.domToBlock(n, t) : null;
|
|
208
|
+
}
|
|
209
|
+
function On(t) {
|
|
210
|
+
return t.ui === "dummy" ? null : t.ui === "strInput" ? "String" : t.ui === "numInput" ? "Number" : t.ui === "switch" ? "Boolean" : t.ui === "select" ? Je(t.items) : t.ui === "multiTypes" ? Je(t.types) : t.ui === "compSelect" ? "Comp" : t.ui === "colorPicker" ? "Color" : (console.assert(!1), null);
|
|
211
|
+
}
|
|
212
|
+
function $t(t, e, n, o) {
|
|
199
213
|
const i = `
|
|
200
214
|
<block type="parameter_v1">
|
|
201
215
|
<mutation key="${e}" name="${n}" locale="${o ? "TRUE" : "FALSE"}"/>
|
|
202
216
|
</block>
|
|
203
217
|
`, a = v.xml.textToDom(i);
|
|
204
|
-
return
|
|
218
|
+
return wt.domToBlock(a, t);
|
|
205
219
|
}
|
|
206
220
|
function F(t, e) {
|
|
207
221
|
try {
|
|
@@ -216,7 +230,7 @@ function F(t, e) {
|
|
|
216
230
|
return;
|
|
217
231
|
r.dispose();
|
|
218
232
|
}
|
|
219
|
-
r =
|
|
233
|
+
r = $t(
|
|
220
234
|
t.workspace,
|
|
221
235
|
i,
|
|
222
236
|
a,
|
|
@@ -227,9 +241,9 @@ function F(t, e) {
|
|
|
227
241
|
E.enable();
|
|
228
242
|
}
|
|
229
243
|
}
|
|
230
|
-
function
|
|
244
|
+
function Ye(t) {
|
|
231
245
|
const { version: e } = T.app.activeObject;
|
|
232
|
-
if (!
|
|
246
|
+
if (!Re[e])
|
|
233
247
|
return console.assert(!1, "invalid pkg version", e), [];
|
|
234
248
|
const o = [];
|
|
235
249
|
for (const i in x) {
|
|
@@ -238,49 +252,49 @@ function He(t) {
|
|
|
238
252
|
}
|
|
239
253
|
return o;
|
|
240
254
|
}
|
|
241
|
-
function
|
|
255
|
+
function re(t) {
|
|
242
256
|
const e = x[t];
|
|
243
257
|
if (e)
|
|
244
258
|
return e;
|
|
245
259
|
}
|
|
246
|
-
function
|
|
260
|
+
function Ae(t) {
|
|
247
261
|
const { i18n: e } = ie, n = [];
|
|
248
|
-
return
|
|
262
|
+
return Ye(t).forEach(({ key: i, name: a }) => {
|
|
249
263
|
n.push([e.global.t(a), i]);
|
|
250
264
|
}), N(n);
|
|
251
265
|
}
|
|
252
|
-
function
|
|
266
|
+
function Dt(t) {
|
|
253
267
|
const e = x[t];
|
|
254
268
|
return e ? e.events : [];
|
|
255
269
|
}
|
|
256
|
-
function
|
|
270
|
+
function gt(t, e) {
|
|
257
271
|
const n = x[t];
|
|
258
272
|
if (n)
|
|
259
273
|
return n.events.find((o) => o.key === e);
|
|
260
274
|
}
|
|
261
|
-
function
|
|
275
|
+
function Vo(t) {
|
|
262
276
|
const e = [];
|
|
263
|
-
return
|
|
277
|
+
return Dt(t).forEach(({ key: o, name: i }) => {
|
|
264
278
|
e.push([_[i] ?? i, o]);
|
|
265
279
|
}), N(e);
|
|
266
280
|
}
|
|
267
|
-
function
|
|
281
|
+
function Ut(t) {
|
|
268
282
|
const e = x[t];
|
|
269
283
|
return e ? e.methods : [];
|
|
270
284
|
}
|
|
271
|
-
function
|
|
285
|
+
function It(t, e) {
|
|
272
286
|
const n = x[t];
|
|
273
287
|
if (n)
|
|
274
288
|
return n.methods.find((o) => o.key === e);
|
|
275
289
|
}
|
|
276
|
-
function
|
|
290
|
+
function xo(t) {
|
|
277
291
|
const e = [];
|
|
278
|
-
return
|
|
292
|
+
return Ut(t).forEach(({ key: o, name: i }) => {
|
|
279
293
|
e.push([_[i] ?? i, o]);
|
|
280
294
|
}), N(e);
|
|
281
295
|
}
|
|
282
|
-
function
|
|
283
|
-
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a =
|
|
296
|
+
function De(t, e) {
|
|
297
|
+
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a = at(o, i);
|
|
284
298
|
if (!a)
|
|
285
299
|
return console.assert(!1, "invalid prop tag", o, i), [];
|
|
286
300
|
if (!x[t])
|
|
@@ -291,23 +305,23 @@ function Ve(t, e) {
|
|
|
291
305
|
}), u;
|
|
292
306
|
}
|
|
293
307
|
function se(t, e) {
|
|
294
|
-
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a =
|
|
308
|
+
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a = at(o, i);
|
|
295
309
|
if (!a) {
|
|
296
310
|
console.assert(!1, "invalid prop tag", o, i);
|
|
297
311
|
return;
|
|
298
312
|
}
|
|
299
313
|
return n[t]?.[a]?.find((l) => l.keys === e);
|
|
300
314
|
}
|
|
301
|
-
function
|
|
315
|
+
function Cn(t, e) {
|
|
302
316
|
const { i18n: n } = ie, o = [];
|
|
303
|
-
return
|
|
317
|
+
return De(t, e).forEach(({ keys: a, names: l }) => {
|
|
304
318
|
let u = "";
|
|
305
319
|
l.forEach((r, p) => {
|
|
306
320
|
p !== 0 && (u += " - "), u += n.global.t(r);
|
|
307
321
|
}), o.push([u, a]);
|
|
308
322
|
}), N(o);
|
|
309
323
|
}
|
|
310
|
-
function
|
|
324
|
+
function Ce(t) {
|
|
311
325
|
const { nodes: e } = T.app.activeObject, n = [];
|
|
312
326
|
for (const o in e) {
|
|
313
327
|
const i = e[o], a = x[i.key];
|
|
@@ -324,12 +338,12 @@ function Ne(t) {
|
|
|
324
338
|
}
|
|
325
339
|
return n;
|
|
326
340
|
}
|
|
327
|
-
function
|
|
341
|
+
function Y(t) {
|
|
328
342
|
return T.app.activeObject.nodes.find((e) => e.id === t);
|
|
329
343
|
}
|
|
330
|
-
function
|
|
344
|
+
function we(t) {
|
|
331
345
|
const { i18n: e } = ie, n = [];
|
|
332
|
-
return
|
|
346
|
+
return Ce(t).forEach(({ id: i, key: a, alias: l }) => {
|
|
333
347
|
const u = x[a];
|
|
334
348
|
if (!u) {
|
|
335
349
|
console.assert(!1, "invalid element", a);
|
|
@@ -339,15 +353,15 @@ function Ge(t) {
|
|
|
339
353
|
l && (r += ` / ${l}`), n.push([r, i]);
|
|
340
354
|
}), N(n);
|
|
341
355
|
}
|
|
342
|
-
function
|
|
343
|
-
const e =
|
|
356
|
+
function Mt(t) {
|
|
357
|
+
const e = Y(t);
|
|
344
358
|
if (!e)
|
|
345
359
|
return [];
|
|
346
360
|
const n = x[e.key];
|
|
347
361
|
return n ? n.events : (console.assert(!1, "invalid element", e.key), []);
|
|
348
362
|
}
|
|
349
|
-
function
|
|
350
|
-
const n =
|
|
363
|
+
function At(t, e) {
|
|
364
|
+
const n = Y(t);
|
|
351
365
|
if (!n)
|
|
352
366
|
return;
|
|
353
367
|
const o = x[n.key];
|
|
@@ -357,21 +371,21 @@ function kt(t, e) {
|
|
|
357
371
|
}
|
|
358
372
|
return o.events.find((i) => i.key === e);
|
|
359
373
|
}
|
|
360
|
-
function
|
|
374
|
+
function Fo(t) {
|
|
361
375
|
const e = [];
|
|
362
|
-
return
|
|
376
|
+
return Mt(t).forEach(({ key: o, name: i }) => {
|
|
363
377
|
e.push([_[i] ?? i, o]);
|
|
364
378
|
}), N(e);
|
|
365
379
|
}
|
|
366
|
-
function
|
|
367
|
-
const e =
|
|
380
|
+
function Pt(t) {
|
|
381
|
+
const e = Y(t);
|
|
368
382
|
if (!e)
|
|
369
383
|
return [];
|
|
370
384
|
const n = x[e.key];
|
|
371
385
|
return n ? n.methods : (console.assert(!1, "invalid element", e.key), []);
|
|
372
386
|
}
|
|
373
|
-
function
|
|
374
|
-
const n =
|
|
387
|
+
function Ot(t, e) {
|
|
388
|
+
const n = Y(t);
|
|
375
389
|
if (!n)
|
|
376
390
|
return;
|
|
377
391
|
const o = x[n.key];
|
|
@@ -381,41 +395,41 @@ function vt(t, e) {
|
|
|
381
395
|
}
|
|
382
396
|
return o.methods.find((i) => i.key === e);
|
|
383
397
|
}
|
|
384
|
-
function
|
|
398
|
+
function Yo(t) {
|
|
385
399
|
const e = [];
|
|
386
|
-
return
|
|
400
|
+
return Pt(t).forEach(({ key: o, name: i }) => {
|
|
387
401
|
e.push([_[i] ?? i, o]);
|
|
388
402
|
}), N(e);
|
|
389
403
|
}
|
|
390
|
-
function
|
|
391
|
-
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a = [], l =
|
|
404
|
+
function Ue(t, e) {
|
|
405
|
+
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a = [], l = at(o, i);
|
|
392
406
|
if (!l)
|
|
393
407
|
return console.assert(!1, "invalid prop tag", o, i), a;
|
|
394
|
-
const u =
|
|
408
|
+
const u = Y(t);
|
|
395
409
|
return u ? x[u.key] ? (n[u.key]?.[l]?.forEach((p) => {
|
|
396
410
|
e && (!p.raw.ui || p.raw.readonly || p.keys === "alias") || a.push(p);
|
|
397
411
|
}), a) : (console.assert(!1, "invalid element", u.key), a) : a;
|
|
398
412
|
}
|
|
399
413
|
function ae(t, e) {
|
|
400
|
-
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a =
|
|
414
|
+
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a = at(o, i);
|
|
401
415
|
if (!a) {
|
|
402
416
|
console.assert(!1, "invalid prop tag", o, i);
|
|
403
417
|
return;
|
|
404
418
|
}
|
|
405
|
-
const l =
|
|
419
|
+
const l = Y(t);
|
|
406
420
|
if (l)
|
|
407
421
|
return n[l.key]?.[a]?.find((u) => u.keys === e);
|
|
408
422
|
}
|
|
409
|
-
function
|
|
423
|
+
function kn(t, e) {
|
|
410
424
|
const { i18n: n } = ie, o = [];
|
|
411
|
-
return
|
|
425
|
+
return Ue(t, e).forEach(({ keys: a, names: l }) => {
|
|
412
426
|
let u = "";
|
|
413
427
|
l.forEach((r, p) => {
|
|
414
428
|
p !== 0 && (u += " - "), u += n.global.t(r);
|
|
415
429
|
}), o.push([u, a]);
|
|
416
430
|
}), N(o);
|
|
417
431
|
}
|
|
418
|
-
const
|
|
432
|
+
const wo = {
|
|
419
433
|
init: function() {
|
|
420
434
|
this.node = {
|
|
421
435
|
id: "",
|
|
@@ -431,13 +445,13 @@ const Vo = {
|
|
|
431
445
|
initData_: function() {
|
|
432
446
|
if (this.node.id)
|
|
433
447
|
return;
|
|
434
|
-
const t =
|
|
448
|
+
const t = Ce()?.[0];
|
|
435
449
|
if (!t)
|
|
436
450
|
return;
|
|
437
451
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
438
452
|
const e = this.getField("NODE");
|
|
439
453
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
440
|
-
const n =
|
|
454
|
+
const n = Pt(this.node.id)?.[0];
|
|
441
455
|
if (!n)
|
|
442
456
|
return;
|
|
443
457
|
this.method.key = n.key, this.method.name = n.name, this.method.inputs = n.inputs, this.method.outputs = n.outputs;
|
|
@@ -456,13 +470,13 @@ const Vo = {
|
|
|
456
470
|
}, 0);
|
|
457
471
|
},
|
|
458
472
|
genNodeOpts_: function() {
|
|
459
|
-
return
|
|
473
|
+
return we("method");
|
|
460
474
|
},
|
|
461
475
|
genMethodOpts_: function() {
|
|
462
|
-
return
|
|
476
|
+
return Yo(this.node.id);
|
|
463
477
|
},
|
|
464
478
|
genElementOpts_: function() {
|
|
465
|
-
return
|
|
479
|
+
return Ae();
|
|
466
480
|
},
|
|
467
481
|
onchange: function(t) {
|
|
468
482
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -477,7 +491,7 @@ const Vo = {
|
|
|
477
491
|
}
|
|
478
492
|
},
|
|
479
493
|
onNodeChange_: function(t) {
|
|
480
|
-
const e =
|
|
494
|
+
const e = Y(t);
|
|
481
495
|
if (!e) {
|
|
482
496
|
console.assert(!1);
|
|
483
497
|
return;
|
|
@@ -485,13 +499,13 @@ const Vo = {
|
|
|
485
499
|
const n = this.node.key !== e.key;
|
|
486
500
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
487
501
|
const o = this.getField("METHOD");
|
|
488
|
-
if (o.getOptions(!1), n || !
|
|
489
|
-
const a =
|
|
502
|
+
if (o.getOptions(!1), n || !Ot(this.node.id, this.method.key)) {
|
|
503
|
+
const a = Pt(this.node.id)?.[0]?.key ?? "";
|
|
490
504
|
o.setValue(a), this.method.key === a && this.onMethodChange_(a);
|
|
491
505
|
}
|
|
492
506
|
},
|
|
493
507
|
onMethodChange_: function(t) {
|
|
494
|
-
const e =
|
|
508
|
+
const e = Ot(this.node.id, t);
|
|
495
509
|
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(() => {
|
|
496
510
|
this.ensureBlocks_();
|
|
497
511
|
}, 0);
|
|
@@ -550,7 +564,7 @@ const Vo = {
|
|
|
550
564
|
t.length > 0 && F(this, t);
|
|
551
565
|
},
|
|
552
566
|
checkWarning_: function() {
|
|
553
|
-
const t =
|
|
567
|
+
const t = Y(this.node.id);
|
|
554
568
|
if (!t) {
|
|
555
569
|
this.setWarningText(_.WARN_NODE_NOT_FOUND);
|
|
556
570
|
return;
|
|
@@ -560,7 +574,7 @@ const Vo = {
|
|
|
560
574
|
return;
|
|
561
575
|
}
|
|
562
576
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
563
|
-
const e =
|
|
577
|
+
const e = Ot(this.node.id, this.method.key);
|
|
564
578
|
if (!e) {
|
|
565
579
|
this.setWarningText(_.WARN_METHOD_NOT_FOUND);
|
|
566
580
|
return;
|
|
@@ -572,7 +586,7 @@ const Vo = {
|
|
|
572
586
|
this.setWarningText(null);
|
|
573
587
|
}
|
|
574
588
|
};
|
|
575
|
-
d.call_node_method_v1 =
|
|
589
|
+
d.call_node_method_v1 = wo;
|
|
576
590
|
s.forBlock.call_node_method_v1 = function(t) {
|
|
577
591
|
const e = s.quote_, n = t;
|
|
578
592
|
let o = n.node.id;
|
|
@@ -595,7 +609,7 @@ ${a}}
|
|
|
595
609
|
`;
|
|
596
610
|
}
|
|
597
611
|
};
|
|
598
|
-
const
|
|
612
|
+
const Ko = {
|
|
599
613
|
init: function() {
|
|
600
614
|
this.element = {
|
|
601
615
|
key: "",
|
|
@@ -610,16 +624,16 @@ const xo = {
|
|
|
610
624
|
initData_: function() {
|
|
611
625
|
if (this.element.key)
|
|
612
626
|
return;
|
|
613
|
-
const t =
|
|
627
|
+
const t = Ye("method")?.[0];
|
|
614
628
|
if (!t)
|
|
615
629
|
return;
|
|
616
630
|
this.element.key = t.key, this.element.name = t.name;
|
|
617
631
|
const e = this.getField("ELEMENT");
|
|
618
632
|
e.getOptions(!1), e.setValue(this.element.key);
|
|
619
|
-
const n =
|
|
633
|
+
const n = Ut(this.element.key)?.[0];
|
|
620
634
|
if (!n)
|
|
621
635
|
return;
|
|
622
|
-
this.method =
|
|
636
|
+
this.method = Se(n);
|
|
623
637
|
const o = this.getField("METHOD");
|
|
624
638
|
o.getOptions(!1), o.setValue(this.method.key);
|
|
625
639
|
},
|
|
@@ -635,10 +649,10 @@ const xo = {
|
|
|
635
649
|
}, 0);
|
|
636
650
|
},
|
|
637
651
|
genElementOpts_: function() {
|
|
638
|
-
return
|
|
652
|
+
return Ae("method");
|
|
639
653
|
},
|
|
640
654
|
genMethodOpts_: function() {
|
|
641
|
-
return
|
|
655
|
+
return xo(this.element.key);
|
|
642
656
|
},
|
|
643
657
|
onchange: function(t) {
|
|
644
658
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -653,7 +667,7 @@ const xo = {
|
|
|
653
667
|
}
|
|
654
668
|
},
|
|
655
669
|
onElementChange_: function(t) {
|
|
656
|
-
const e =
|
|
670
|
+
const e = re(t);
|
|
657
671
|
if (!e) {
|
|
658
672
|
console.assert(!1);
|
|
659
673
|
return;
|
|
@@ -661,13 +675,13 @@ const xo = {
|
|
|
661
675
|
const n = this.element.key !== e.key;
|
|
662
676
|
this.element.key = e.key, this.element.name = e.name;
|
|
663
677
|
const o = this.getField("METHOD");
|
|
664
|
-
if (o.getOptions(!1), n || !
|
|
665
|
-
const a =
|
|
678
|
+
if (o.getOptions(!1), n || !It(this.element.key, this.method.key)) {
|
|
679
|
+
const a = Ut(this.element.key)?.[0]?.key ?? "";
|
|
666
680
|
o.setValue(a), this.method.key === a && this.onMethodChange_(a);
|
|
667
681
|
}
|
|
668
682
|
},
|
|
669
683
|
onMethodChange_: function(t) {
|
|
670
|
-
const e =
|
|
684
|
+
const e = It(this.element.key, t);
|
|
671
685
|
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(() => {
|
|
672
686
|
this.ensureBlocks_();
|
|
673
687
|
}, 0);
|
|
@@ -678,7 +692,7 @@ const xo = {
|
|
|
678
692
|
console.assert(!1);
|
|
679
693
|
return;
|
|
680
694
|
}
|
|
681
|
-
t.removeField("EXTRA1", !0), this.method.key === "add" && t.appendField(new m(() =>
|
|
695
|
+
t.removeField("EXTRA1", !0), this.method.key === "add" && t.appendField(new m(() => Ae()), "EXTRA1");
|
|
682
696
|
},
|
|
683
697
|
updateShape2_: function() {
|
|
684
698
|
this.method.outputs.length > 0 ? this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_UI_DO}") : this.getInput("HANDLE") && this.removeInput("HANDLE");
|
|
@@ -723,13 +737,13 @@ const xo = {
|
|
|
723
737
|
t.length > 0 && F(this, t);
|
|
724
738
|
},
|
|
725
739
|
checkWarning_: function() {
|
|
726
|
-
const t =
|
|
740
|
+
const t = re(this.element.key);
|
|
727
741
|
if (!t) {
|
|
728
742
|
this.setWarningText(_.WARN_ELEMENT_NOT_FOUND);
|
|
729
743
|
return;
|
|
730
744
|
}
|
|
731
745
|
this.element.name !== t.name && (this.element.name = t.name);
|
|
732
|
-
const e =
|
|
746
|
+
const e = It(this.element.key, this.method.key);
|
|
733
747
|
if (!e) {
|
|
734
748
|
this.setWarningText(_.WARN_METHOD_NOT_FOUND);
|
|
735
749
|
return;
|
|
@@ -741,7 +755,7 @@ const xo = {
|
|
|
741
755
|
this.setWarningText(null);
|
|
742
756
|
}
|
|
743
757
|
};
|
|
744
|
-
d.call_node_method_as_v1 =
|
|
758
|
+
d.call_node_method_as_v1 = Ko;
|
|
745
759
|
s.forBlock.call_node_method_as_v1 = function(t) {
|
|
746
760
|
const e = s.quote_, n = t, o = s.valueToCode(n, "NODE", c.NONE) || "";
|
|
747
761
|
if (!o)
|
|
@@ -765,53 +779,53 @@ ${a}}
|
|
|
765
779
|
`;
|
|
766
780
|
}
|
|
767
781
|
};
|
|
768
|
-
function
|
|
782
|
+
function $o() {
|
|
769
783
|
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;
|
|
770
784
|
}
|
|
771
|
-
function
|
|
785
|
+
function Me() {
|
|
772
786
|
return T.app.activeComp.meta.methods;
|
|
773
787
|
}
|
|
774
|
-
function
|
|
788
|
+
function qe(t) {
|
|
775
789
|
return T.app.activeComp.meta.methods.find((e) => e.id === t);
|
|
776
790
|
}
|
|
777
|
-
function
|
|
791
|
+
function vn() {
|
|
778
792
|
const t = [];
|
|
779
|
-
return
|
|
793
|
+
return Me().forEach(({ id: n, name: o }) => {
|
|
780
794
|
t.push([o, n]);
|
|
781
795
|
}), N(t);
|
|
782
796
|
}
|
|
783
|
-
function
|
|
797
|
+
function Vt(t) {
|
|
784
798
|
const e = T.app.activeComp.meta.methods.find(
|
|
785
799
|
(n) => n.id === t
|
|
786
800
|
);
|
|
787
801
|
return e ? e.outputs : [];
|
|
788
802
|
}
|
|
789
|
-
function
|
|
803
|
+
function Ct(t, e) {
|
|
790
804
|
const n = T.app.activeComp.meta.methods.find(
|
|
791
805
|
(o) => o.id === t
|
|
792
806
|
);
|
|
793
807
|
if (n)
|
|
794
808
|
return n.outputs.find((o) => o.id === e);
|
|
795
809
|
}
|
|
796
|
-
function
|
|
810
|
+
function Ho(t) {
|
|
797
811
|
const e = [];
|
|
798
|
-
return
|
|
812
|
+
return Vt(t).forEach(({ id: o, name: i }) => {
|
|
799
813
|
e.push([i, o]);
|
|
800
814
|
}), N(e);
|
|
801
815
|
}
|
|
802
|
-
function
|
|
816
|
+
function yn() {
|
|
803
817
|
return T.app.activeComp.meta.events;
|
|
804
818
|
}
|
|
805
|
-
function
|
|
819
|
+
function en(t) {
|
|
806
820
|
return T.app.activeComp.meta.events.find((e) => e.id === t);
|
|
807
821
|
}
|
|
808
|
-
function
|
|
822
|
+
function Go() {
|
|
809
823
|
const t = [];
|
|
810
|
-
return
|
|
824
|
+
return yn().forEach(({ id: n, name: o }) => {
|
|
811
825
|
t.push([o, n]);
|
|
812
826
|
}), N(t);
|
|
813
827
|
}
|
|
814
|
-
const
|
|
828
|
+
const Wo = {
|
|
815
829
|
init: function() {
|
|
816
830
|
this.method = {
|
|
817
831
|
id: "",
|
|
@@ -822,7 +836,7 @@ const Ko = {
|
|
|
822
836
|
initData_: function() {
|
|
823
837
|
if (this.method.id)
|
|
824
838
|
return;
|
|
825
|
-
const t =
|
|
839
|
+
const t = Me()?.[0];
|
|
826
840
|
if (!t)
|
|
827
841
|
return;
|
|
828
842
|
this.method.id = t.id, this.method.name = t.name, this.method.inputs = t.inputs;
|
|
@@ -840,7 +854,7 @@ const Ko = {
|
|
|
840
854
|
}, 0);
|
|
841
855
|
},
|
|
842
856
|
genMethodOpts_: function() {
|
|
843
|
-
return
|
|
857
|
+
return vn();
|
|
844
858
|
},
|
|
845
859
|
onchange: function(t) {
|
|
846
860
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -855,7 +869,7 @@ const Ko = {
|
|
|
855
869
|
}
|
|
856
870
|
},
|
|
857
871
|
onMethodChange_: function(t) {
|
|
858
|
-
const e =
|
|
872
|
+
const e = qe(t);
|
|
859
873
|
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(() => {
|
|
860
874
|
this.rebuildBlocks();
|
|
861
875
|
}, 0);
|
|
@@ -879,7 +893,7 @@ const Ko = {
|
|
|
879
893
|
F(this, t);
|
|
880
894
|
},
|
|
881
895
|
checkWarning_: function() {
|
|
882
|
-
const t =
|
|
896
|
+
const t = qe(this.method.id);
|
|
883
897
|
if (!t) {
|
|
884
898
|
this.setWarningText(_.WARN_METHOD_NOT_FOUND);
|
|
885
899
|
return;
|
|
@@ -891,15 +905,15 @@ const Ko = {
|
|
|
891
905
|
this.setWarningText(null);
|
|
892
906
|
}
|
|
893
907
|
};
|
|
894
|
-
d.comp_method_impl_v1 =
|
|
908
|
+
d.comp_method_impl_v1 = Wo;
|
|
895
909
|
s.forBlock.comp_method_impl_v1 = function(t) {
|
|
896
910
|
const e = t;
|
|
897
911
|
return `{
|
|
898
912
|
${s.statementToCode(e, "HANDLE")}}
|
|
899
913
|
`;
|
|
900
914
|
};
|
|
901
|
-
const
|
|
902
|
-
const n =
|
|
915
|
+
const jo = (t, e) => {
|
|
916
|
+
const n = ct(t), o = Je(t);
|
|
903
917
|
d[n] = {
|
|
904
918
|
init: function() {
|
|
905
919
|
this.appendDummyInput().appendField(
|
|
@@ -918,13 +932,13 @@ const $o = (t, e) => {
|
|
|
918
932
|
return [a(l), c.ATOMIC];
|
|
919
933
|
};
|
|
920
934
|
};
|
|
921
|
-
for (const t in
|
|
922
|
-
const e =
|
|
935
|
+
for (const t in Re) {
|
|
936
|
+
const e = Re[t];
|
|
923
937
|
for (const n in e.items)
|
|
924
|
-
|
|
938
|
+
jo(n, e.items[n]);
|
|
925
939
|
}
|
|
926
|
-
const
|
|
927
|
-
const n =
|
|
940
|
+
const Xo = (t, e) => {
|
|
941
|
+
const n = ct(t), o = Je(t);
|
|
928
942
|
d[n] = {
|
|
929
943
|
init: function() {
|
|
930
944
|
this.value = e[0].default ?? "", this.appendDummyInput("DUMMY").appendField(
|
|
@@ -978,8 +992,8 @@ const Ho = (t, e) => {
|
|
|
978
992
|
i.removeField("VALUE", !0), i.removeField("SUFFIX", !0);
|
|
979
993
|
let u, r;
|
|
980
994
|
if (l.ui === "pixelInput") {
|
|
981
|
-
const p =
|
|
982
|
-
u = new
|
|
995
|
+
const p = No(this.value) ?? 0;
|
|
996
|
+
u = new St(
|
|
983
997
|
p,
|
|
984
998
|
l.min,
|
|
985
999
|
l.max,
|
|
@@ -989,8 +1003,8 @@ const Ho = (t, e) => {
|
|
|
989
1003
|
}
|
|
990
1004
|
), r = "px";
|
|
991
1005
|
} else if (l.ui === "percentInput") {
|
|
992
|
-
const p =
|
|
993
|
-
u = new
|
|
1006
|
+
const p = Lo(this.value) ?? 0;
|
|
1007
|
+
u = new St(
|
|
994
1008
|
p,
|
|
995
1009
|
l.min,
|
|
996
1010
|
l.max,
|
|
@@ -1015,12 +1029,12 @@ const Ho = (t, e) => {
|
|
|
1015
1029
|
return [a(i.value), c.ATOMIC];
|
|
1016
1030
|
};
|
|
1017
1031
|
};
|
|
1018
|
-
for (const t in
|
|
1019
|
-
const e =
|
|
1032
|
+
for (const t in Re) {
|
|
1033
|
+
const e = Re[t];
|
|
1020
1034
|
for (const n in e.types)
|
|
1021
|
-
|
|
1035
|
+
Xo(n, e.types[n]);
|
|
1022
1036
|
}
|
|
1023
|
-
const
|
|
1037
|
+
const Jo = {
|
|
1024
1038
|
init: function() {
|
|
1025
1039
|
this.node = {
|
|
1026
1040
|
id: "",
|
|
@@ -1031,7 +1045,7 @@ const Go = {
|
|
|
1031
1045
|
initData_: function() {
|
|
1032
1046
|
if (this.node.id)
|
|
1033
1047
|
return;
|
|
1034
|
-
const t =
|
|
1048
|
+
const t = Ce()?.[0];
|
|
1035
1049
|
if (!t)
|
|
1036
1050
|
return;
|
|
1037
1051
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
@@ -1049,7 +1063,7 @@ const Go = {
|
|
|
1049
1063
|
}, 0);
|
|
1050
1064
|
},
|
|
1051
1065
|
genNodeOpts_: function() {
|
|
1052
|
-
return
|
|
1066
|
+
return we();
|
|
1053
1067
|
},
|
|
1054
1068
|
onchange: function(t) {
|
|
1055
1069
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1064,7 +1078,7 @@ const Go = {
|
|
|
1064
1078
|
}
|
|
1065
1079
|
},
|
|
1066
1080
|
onNodeChange_: function(t) {
|
|
1067
|
-
const e =
|
|
1081
|
+
const e = Y(t);
|
|
1068
1082
|
if (!e) {
|
|
1069
1083
|
console.assert(!1);
|
|
1070
1084
|
return;
|
|
@@ -1072,7 +1086,7 @@ const Go = {
|
|
|
1072
1086
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
1073
1087
|
},
|
|
1074
1088
|
checkWarning_: function() {
|
|
1075
|
-
const t =
|
|
1089
|
+
const t = Y(this.node.id);
|
|
1076
1090
|
if (!t) {
|
|
1077
1091
|
this.setWarningText(_.WARN_NODE_NOT_FOUND);
|
|
1078
1092
|
return;
|
|
@@ -1084,12 +1098,12 @@ const Go = {
|
|
|
1084
1098
|
this.node.alias !== t.alias && (this.node.alias = t.alias), this.setWarningText(null);
|
|
1085
1099
|
}
|
|
1086
1100
|
};
|
|
1087
|
-
d.get_node_v1 =
|
|
1101
|
+
d.get_node_v1 = Jo;
|
|
1088
1102
|
s.forBlock.get_node_v1 = function(t) {
|
|
1089
1103
|
const e = t;
|
|
1090
1104
|
return [s.quote_(e.node.id), c.ATOMIC];
|
|
1091
1105
|
};
|
|
1092
|
-
const
|
|
1106
|
+
const qo = {
|
|
1093
1107
|
init: function() {
|
|
1094
1108
|
this.node = {
|
|
1095
1109
|
id: "",
|
|
@@ -1103,13 +1117,13 @@ const Wo = {
|
|
|
1103
1117
|
initData_: function() {
|
|
1104
1118
|
if (this.node.id)
|
|
1105
1119
|
return;
|
|
1106
|
-
const t =
|
|
1120
|
+
const t = Ce()?.[0];
|
|
1107
1121
|
if (!t)
|
|
1108
1122
|
return;
|
|
1109
1123
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
1110
1124
|
const e = this.getField("NODE");
|
|
1111
1125
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
1112
|
-
const n =
|
|
1126
|
+
const n = Ue(this.node.id)?.[0];
|
|
1113
1127
|
if (!n)
|
|
1114
1128
|
return;
|
|
1115
1129
|
this.prop.keys = n.keys, this.prop.names = n.names;
|
|
@@ -1128,10 +1142,10 @@ const Wo = {
|
|
|
1128
1142
|
}, 0);
|
|
1129
1143
|
},
|
|
1130
1144
|
genNodeOpts_: function() {
|
|
1131
|
-
return
|
|
1145
|
+
return we();
|
|
1132
1146
|
},
|
|
1133
1147
|
genPropOpts_: function() {
|
|
1134
|
-
return
|
|
1148
|
+
return kn(this.node.id);
|
|
1135
1149
|
},
|
|
1136
1150
|
onchange: function(t) {
|
|
1137
1151
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1146,7 +1160,7 @@ const Wo = {
|
|
|
1146
1160
|
}
|
|
1147
1161
|
},
|
|
1148
1162
|
onNodeChange_: function(t) {
|
|
1149
|
-
const e =
|
|
1163
|
+
const e = Y(t);
|
|
1150
1164
|
if (!e) {
|
|
1151
1165
|
console.assert(!1);
|
|
1152
1166
|
return;
|
|
@@ -1155,7 +1169,7 @@ const Wo = {
|
|
|
1155
1169
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
1156
1170
|
const o = this.getField("PROP");
|
|
1157
1171
|
if (o.getOptions(!1), n || !ae(this.node.id, this.prop.keys)) {
|
|
1158
|
-
const a =
|
|
1172
|
+
const a = Ue(this.node.id)?.[0]?.keys ?? "";
|
|
1159
1173
|
o.setValue(a), this.prop.keys === a && this.onPropChange_(a);
|
|
1160
1174
|
}
|
|
1161
1175
|
},
|
|
@@ -1164,7 +1178,7 @@ const Wo = {
|
|
|
1164
1178
|
e ? (this.prop.keys = e.keys, this.prop.names = e.names) : (this.prop.keys = "", this.prop.names = []);
|
|
1165
1179
|
},
|
|
1166
1180
|
checkWarning_: function() {
|
|
1167
|
-
const t =
|
|
1181
|
+
const t = Y(this.node.id);
|
|
1168
1182
|
if (!t) {
|
|
1169
1183
|
this.setWarningText(_.WARN_NODE_NOT_FOUND);
|
|
1170
1184
|
return;
|
|
@@ -1182,12 +1196,12 @@ const Wo = {
|
|
|
1182
1196
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
1183
1197
|
}
|
|
1184
1198
|
};
|
|
1185
|
-
d.get_node_prop_v1 =
|
|
1199
|
+
d.get_node_prop_v1 = qo;
|
|
1186
1200
|
s.forBlock.get_node_prop_v1 = function(t) {
|
|
1187
1201
|
const e = t, n = s.quote_(e.node.id), o = s.quote_(e.prop.keys);
|
|
1188
1202
|
return [`__getNodePropV1__(${n}, ${o})`, c.ATOMIC];
|
|
1189
1203
|
};
|
|
1190
|
-
const
|
|
1204
|
+
const Qo = {
|
|
1191
1205
|
init: function() {
|
|
1192
1206
|
this.element = {
|
|
1193
1207
|
key: "",
|
|
@@ -1200,16 +1214,16 @@ const jo = {
|
|
|
1200
1214
|
initData_: function() {
|
|
1201
1215
|
if (this.element.key)
|
|
1202
1216
|
return;
|
|
1203
|
-
const t =
|
|
1217
|
+
const t = Ye()?.[0];
|
|
1204
1218
|
if (!t)
|
|
1205
1219
|
return;
|
|
1206
1220
|
this.element.key = t.key, this.element.name = t.name;
|
|
1207
1221
|
const e = this.getField("ELEMENT");
|
|
1208
1222
|
e.getOptions(!1), e.setValue(this.element.key);
|
|
1209
|
-
const n =
|
|
1223
|
+
const n = De(this.element.key)?.[0];
|
|
1210
1224
|
if (!n)
|
|
1211
1225
|
return;
|
|
1212
|
-
this.prop.keys = n.keys, this.prop.names =
|
|
1226
|
+
this.prop.keys = n.keys, this.prop.names = Se(n.names);
|
|
1213
1227
|
const o = this.getField("PROP");
|
|
1214
1228
|
o.getOptions(!1), o.setValue(this.prop.keys);
|
|
1215
1229
|
},
|
|
@@ -1225,10 +1239,10 @@ const jo = {
|
|
|
1225
1239
|
}, 0);
|
|
1226
1240
|
},
|
|
1227
1241
|
genElementOpts_: function() {
|
|
1228
|
-
return
|
|
1242
|
+
return Ae();
|
|
1229
1243
|
},
|
|
1230
1244
|
genPropOpts_: function() {
|
|
1231
|
-
return
|
|
1245
|
+
return Cn(this.element.key);
|
|
1232
1246
|
},
|
|
1233
1247
|
onchange: function(t) {
|
|
1234
1248
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1243,7 +1257,7 @@ const jo = {
|
|
|
1243
1257
|
}
|
|
1244
1258
|
},
|
|
1245
1259
|
onElementChange_: function(t) {
|
|
1246
|
-
const e =
|
|
1260
|
+
const e = re(t);
|
|
1247
1261
|
if (!e) {
|
|
1248
1262
|
console.assert(!1);
|
|
1249
1263
|
return;
|
|
@@ -1252,7 +1266,7 @@ const jo = {
|
|
|
1252
1266
|
this.element.key = e.key, this.element.name = e.name;
|
|
1253
1267
|
const o = this.getField("PROP");
|
|
1254
1268
|
if (o.getOptions(!1), n || !se(this.element.key, this.prop.keys)) {
|
|
1255
|
-
const a =
|
|
1269
|
+
const a = De(this.element.key)?.[0]?.keys ?? "";
|
|
1256
1270
|
o.setValue(a), this.prop.keys === a && this.onPropChange_(a);
|
|
1257
1271
|
}
|
|
1258
1272
|
},
|
|
@@ -1261,7 +1275,7 @@ const jo = {
|
|
|
1261
1275
|
e ? (this.prop.keys = e.keys, this.prop.names = e.names) : (this.prop.keys = "", this.prop.names = []);
|
|
1262
1276
|
},
|
|
1263
1277
|
checkWarning_: function() {
|
|
1264
|
-
const t =
|
|
1278
|
+
const t = re(this.element.key);
|
|
1265
1279
|
if (!t) {
|
|
1266
1280
|
this.setWarningText(_.WARN_ELEMENT_NOT_FOUND);
|
|
1267
1281
|
return;
|
|
@@ -1275,29 +1289,29 @@ const jo = {
|
|
|
1275
1289
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
1276
1290
|
}
|
|
1277
1291
|
};
|
|
1278
|
-
d.get_node_prop_as_v1 =
|
|
1292
|
+
d.get_node_prop_as_v1 = Qo;
|
|
1279
1293
|
s.forBlock.get_node_prop_as_v1 = function(t) {
|
|
1280
1294
|
const e = t, n = s.valueToCode(e, "NODE", c.ATOMIC) || "null", o = s.quote_(e.prop.keys);
|
|
1281
1295
|
return [`__getNodePropV1__(${n}, ${o})`, c.ATOMIC];
|
|
1282
1296
|
};
|
|
1283
|
-
function
|
|
1297
|
+
function zo() {
|
|
1284
1298
|
if (T.app.activeObject.type !== "page" || T.app.activePage.meta.arguments.length > 0) return !1;
|
|
1285
1299
|
}
|
|
1286
|
-
function
|
|
1300
|
+
function Nn() {
|
|
1287
1301
|
return T.app.activePage.meta.arguments;
|
|
1288
1302
|
}
|
|
1289
|
-
function
|
|
1303
|
+
function tn(t) {
|
|
1290
1304
|
return T.app.activePage.meta.arguments.find(
|
|
1291
1305
|
(e) => e.id === t
|
|
1292
1306
|
);
|
|
1293
1307
|
}
|
|
1294
|
-
function
|
|
1308
|
+
function Zo() {
|
|
1295
1309
|
const t = [];
|
|
1296
|
-
return
|
|
1310
|
+
return Nn().forEach(({ id: n, name: o }) => {
|
|
1297
1311
|
t.push([o, n]);
|
|
1298
1312
|
}), N(t);
|
|
1299
1313
|
}
|
|
1300
|
-
const
|
|
1314
|
+
const ei = {
|
|
1301
1315
|
init: function() {
|
|
1302
1316
|
this.argument = {
|
|
1303
1317
|
id: "",
|
|
@@ -1319,7 +1333,7 @@ const qo = {
|
|
|
1319
1333
|
}, 0);
|
|
1320
1334
|
},
|
|
1321
1335
|
genArgumentOpts_: function() {
|
|
1322
|
-
return
|
|
1336
|
+
return Zo();
|
|
1323
1337
|
},
|
|
1324
1338
|
onchange: function(t) {
|
|
1325
1339
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1334,7 +1348,7 @@ const qo = {
|
|
|
1334
1348
|
}
|
|
1335
1349
|
},
|
|
1336
1350
|
onArgumentChange_: function(t) {
|
|
1337
|
-
const e =
|
|
1351
|
+
const e = tn(t);
|
|
1338
1352
|
if (!e) {
|
|
1339
1353
|
console.assert(!1);
|
|
1340
1354
|
return;
|
|
@@ -1345,7 +1359,7 @@ const qo = {
|
|
|
1345
1359
|
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);
|
|
1346
1360
|
},
|
|
1347
1361
|
checkWarning_: function() {
|
|
1348
|
-
const t =
|
|
1362
|
+
const t = tn(this.argument.id);
|
|
1349
1363
|
if (!t) {
|
|
1350
1364
|
this.setWarningText(_.WARN_ARGUMENT_NOT_FOUND);
|
|
1351
1365
|
return;
|
|
@@ -1357,59 +1371,59 @@ const qo = {
|
|
|
1357
1371
|
this.setWarningText(null);
|
|
1358
1372
|
}
|
|
1359
1373
|
};
|
|
1360
|
-
d.get_page_argument_v1 =
|
|
1374
|
+
d.get_page_argument_v1 = ei;
|
|
1361
1375
|
s.forBlock.get_page_argument_v1 = function(t) {
|
|
1362
1376
|
const e = t;
|
|
1363
1377
|
return [`__getPageArgumentV1__(${s.quote_(e.argument.id)})`, c.FUNCTION_CALL];
|
|
1364
1378
|
};
|
|
1365
|
-
function
|
|
1379
|
+
function Ht() {
|
|
1366
1380
|
return T.app.appList;
|
|
1367
1381
|
}
|
|
1368
|
-
function
|
|
1382
|
+
function nn(t) {
|
|
1369
1383
|
return T.app.appList.find((e) => e.id === t);
|
|
1370
1384
|
}
|
|
1371
|
-
function
|
|
1385
|
+
function ti() {
|
|
1372
1386
|
const t = [];
|
|
1373
|
-
return
|
|
1387
|
+
return Ht().forEach(({ id: n, name: o }) => {
|
|
1374
1388
|
t.push([o, n]);
|
|
1375
1389
|
}), N(t);
|
|
1376
1390
|
}
|
|
1377
|
-
function
|
|
1391
|
+
function xt(t) {
|
|
1378
1392
|
const e = T.app.appList.find((n) => n.id === t);
|
|
1379
1393
|
return e ? e.pages : [];
|
|
1380
1394
|
}
|
|
1381
|
-
function
|
|
1395
|
+
function kt(t, e) {
|
|
1382
1396
|
const n = T.app.appList.find((o) => o.id === t);
|
|
1383
1397
|
if (n)
|
|
1384
1398
|
return n.pages.find((o) => o.id === e);
|
|
1385
1399
|
}
|
|
1386
|
-
function
|
|
1400
|
+
function ni(t) {
|
|
1387
1401
|
const e = [];
|
|
1388
|
-
return
|
|
1402
|
+
return xt(t).forEach(({ id: o, name: i }) => {
|
|
1389
1403
|
e.push([i, o]);
|
|
1390
1404
|
}), N(e);
|
|
1391
1405
|
}
|
|
1392
|
-
const
|
|
1406
|
+
const Ln = {
|
|
1393
1407
|
id: "",
|
|
1394
1408
|
groupid: "",
|
|
1395
1409
|
name: "",
|
|
1396
1410
|
position: 0
|
|
1397
1411
|
};
|
|
1398
|
-
function
|
|
1412
|
+
function Sn() {
|
|
1399
1413
|
const { comps: t } = T.app.activeApp;
|
|
1400
|
-
return [
|
|
1414
|
+
return [Ln, ...t];
|
|
1401
1415
|
}
|
|
1402
|
-
function
|
|
1403
|
-
return t === "" ?
|
|
1416
|
+
function on(t) {
|
|
1417
|
+
return t === "" ? Ln : T.app.activeApp.comps.find((e) => e.id === t);
|
|
1404
1418
|
}
|
|
1405
|
-
function
|
|
1419
|
+
function oi() {
|
|
1406
1420
|
const { i18n: t } = ie, e = [];
|
|
1407
|
-
return
|
|
1421
|
+
return Sn().forEach(({ id: o, name: i }) => {
|
|
1408
1422
|
let a = i;
|
|
1409
1423
|
o === "" && (a = t.global.t("x-runtime-lib.notSet")), e.push([a, o]);
|
|
1410
1424
|
}), N(e);
|
|
1411
1425
|
}
|
|
1412
|
-
const
|
|
1426
|
+
const ii = {
|
|
1413
1427
|
init: function() {
|
|
1414
1428
|
this.app = {
|
|
1415
1429
|
id: "",
|
|
@@ -1422,13 +1436,13 @@ const ei = {
|
|
|
1422
1436
|
initData_: function() {
|
|
1423
1437
|
if (this.app.id)
|
|
1424
1438
|
return;
|
|
1425
|
-
const t =
|
|
1439
|
+
const t = Ht()?.[0];
|
|
1426
1440
|
if (!t)
|
|
1427
1441
|
return;
|
|
1428
1442
|
this.app.id = t.id, this.app.name = t.name;
|
|
1429
1443
|
const e = this.getField("APP");
|
|
1430
1444
|
e.getOptions(!1), e.setValue(this.app.id);
|
|
1431
|
-
const n =
|
|
1445
|
+
const n = xt(this.app.id)?.[0];
|
|
1432
1446
|
if (!n)
|
|
1433
1447
|
return;
|
|
1434
1448
|
this.page.id = n.id, this.page.name = n.name;
|
|
@@ -1447,10 +1461,10 @@ const ei = {
|
|
|
1447
1461
|
}, 0);
|
|
1448
1462
|
},
|
|
1449
1463
|
genAppOpts_: function() {
|
|
1450
|
-
return
|
|
1464
|
+
return ti();
|
|
1451
1465
|
},
|
|
1452
1466
|
genPageOpts_: function() {
|
|
1453
|
-
return
|
|
1467
|
+
return ni(this.app.id);
|
|
1454
1468
|
},
|
|
1455
1469
|
onchange: function(t) {
|
|
1456
1470
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1465,7 +1479,7 @@ const ei = {
|
|
|
1465
1479
|
}
|
|
1466
1480
|
},
|
|
1467
1481
|
onAppChange_: function(t) {
|
|
1468
|
-
const e =
|
|
1482
|
+
const e = nn(t);
|
|
1469
1483
|
if (!e) {
|
|
1470
1484
|
console.assert(!1);
|
|
1471
1485
|
return;
|
|
@@ -1473,23 +1487,23 @@ const ei = {
|
|
|
1473
1487
|
const n = this.app.id !== e.id;
|
|
1474
1488
|
this.app.id = e.id, this.app.name = e.name;
|
|
1475
1489
|
const o = this.getField("PAGE");
|
|
1476
|
-
if (o.getOptions(!1), n || !
|
|
1477
|
-
const a =
|
|
1490
|
+
if (o.getOptions(!1), n || !kt(this.app.id, this.page.id)) {
|
|
1491
|
+
const a = xt(this.app.id)?.[0]?.id ?? "";
|
|
1478
1492
|
o.setValue(a), this.page.id === a && this.onPageChange_(a);
|
|
1479
1493
|
}
|
|
1480
1494
|
},
|
|
1481
1495
|
onPageChange_: function(t) {
|
|
1482
|
-
const e =
|
|
1496
|
+
const e = kt(this.app.id, t);
|
|
1483
1497
|
e ? (this.page.id = e.id, this.page.name = e.name) : (this.page.id = "", this.page.name = "");
|
|
1484
1498
|
},
|
|
1485
1499
|
checkWarning_: function() {
|
|
1486
|
-
const t =
|
|
1500
|
+
const t = nn(this.app.id);
|
|
1487
1501
|
if (!t) {
|
|
1488
1502
|
this.setWarningText(_.WARN_APP_NOT_FOUND);
|
|
1489
1503
|
return;
|
|
1490
1504
|
}
|
|
1491
1505
|
t.name !== this.app.name && (this.app.name = t.name);
|
|
1492
|
-
const e =
|
|
1506
|
+
const e = kt(this.app.id, this.page.id);
|
|
1493
1507
|
if (!e) {
|
|
1494
1508
|
this.setWarningText(_.WARN_PAGE_NOT_FOUND);
|
|
1495
1509
|
return;
|
|
@@ -1497,13 +1511,13 @@ const ei = {
|
|
|
1497
1511
|
e.name !== this.page.name && (this.page.name = e.name), this.setWarningText(null);
|
|
1498
1512
|
}
|
|
1499
1513
|
};
|
|
1500
|
-
d.navigate_to_v1 =
|
|
1514
|
+
d.navigate_to_v1 = ii;
|
|
1501
1515
|
s.forBlock.navigate_to_v1 = function(t) {
|
|
1502
1516
|
const e = t, n = s.quote_(e.app.id), o = s.quote_(e.page.id);
|
|
1503
1517
|
return `__navigateToV1__(${n}, ${o});
|
|
1504
1518
|
`;
|
|
1505
1519
|
};
|
|
1506
|
-
const
|
|
1520
|
+
const si = {
|
|
1507
1521
|
init: function() {
|
|
1508
1522
|
this.node = {
|
|
1509
1523
|
id: "",
|
|
@@ -1518,13 +1532,13 @@ const ti = {
|
|
|
1518
1532
|
initData_: function() {
|
|
1519
1533
|
if (this.node.id)
|
|
1520
1534
|
return;
|
|
1521
|
-
const t =
|
|
1535
|
+
const t = Ce("event")?.[0];
|
|
1522
1536
|
if (!t)
|
|
1523
1537
|
return;
|
|
1524
1538
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
1525
1539
|
const e = this.getField("NODE");
|
|
1526
1540
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
1527
|
-
const n =
|
|
1541
|
+
const n = Mt(this.node.id)?.[0];
|
|
1528
1542
|
if (!n)
|
|
1529
1543
|
return;
|
|
1530
1544
|
this.event.key = n.key, this.event.name = n.name, this.event.params = n.params;
|
|
@@ -1543,10 +1557,10 @@ const ti = {
|
|
|
1543
1557
|
}, 0);
|
|
1544
1558
|
},
|
|
1545
1559
|
genNodeOpts_: function() {
|
|
1546
|
-
return
|
|
1560
|
+
return we("event");
|
|
1547
1561
|
},
|
|
1548
1562
|
genEventOpts_: function() {
|
|
1549
|
-
return
|
|
1563
|
+
return Fo(this.node.id);
|
|
1550
1564
|
},
|
|
1551
1565
|
onchange: function(t) {
|
|
1552
1566
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1561,7 +1575,7 @@ const ti = {
|
|
|
1561
1575
|
}
|
|
1562
1576
|
},
|
|
1563
1577
|
onNodeChange_: function(t) {
|
|
1564
|
-
const e =
|
|
1578
|
+
const e = Y(t);
|
|
1565
1579
|
if (!e) {
|
|
1566
1580
|
console.assert(!1);
|
|
1567
1581
|
return;
|
|
@@ -1569,13 +1583,13 @@ const ti = {
|
|
|
1569
1583
|
const n = this.node.key !== e.key;
|
|
1570
1584
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
1571
1585
|
const o = this.getField("EVENT");
|
|
1572
|
-
if (o.getOptions(!1), n || !
|
|
1573
|
-
const a =
|
|
1586
|
+
if (o.getOptions(!1), n || !At(this.node.id, this.event.key)) {
|
|
1587
|
+
const a = Mt(this.node.id)?.[0]?.key ?? "";
|
|
1574
1588
|
o.setValue(a), this.event.key === a && this.onEventChange_(a);
|
|
1575
1589
|
}
|
|
1576
1590
|
},
|
|
1577
1591
|
onEventChange_: function(t) {
|
|
1578
|
-
const e =
|
|
1592
|
+
const e = At(this.node.id, t);
|
|
1579
1593
|
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(() => {
|
|
1580
1594
|
this.ensureBlocks_();
|
|
1581
1595
|
}, 0);
|
|
@@ -1597,7 +1611,7 @@ const ti = {
|
|
|
1597
1611
|
}), t.length > 0 && F(this, t);
|
|
1598
1612
|
},
|
|
1599
1613
|
checkWarning_: function() {
|
|
1600
|
-
const t =
|
|
1614
|
+
const t = Y(this.node.id);
|
|
1601
1615
|
if (!t) {
|
|
1602
1616
|
this.setWarningText(_.WARN_NODE_NOT_FOUND);
|
|
1603
1617
|
return;
|
|
@@ -1607,7 +1621,7 @@ const ti = {
|
|
|
1607
1621
|
return;
|
|
1608
1622
|
}
|
|
1609
1623
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
1610
|
-
const e =
|
|
1624
|
+
const e = At(this.node.id, this.event.key);
|
|
1611
1625
|
if (!e) {
|
|
1612
1626
|
this.setWarningText(_.WARN_EVENT_NOT_FOUND);
|
|
1613
1627
|
return;
|
|
@@ -1619,7 +1633,7 @@ const ti = {
|
|
|
1619
1633
|
this.setWarningText(null);
|
|
1620
1634
|
}
|
|
1621
1635
|
};
|
|
1622
|
-
d.on_node_event_v1 =
|
|
1636
|
+
d.on_node_event_v1 = si;
|
|
1623
1637
|
s.forBlock.on_node_event_v1 = function(t) {
|
|
1624
1638
|
const e = t, n = s.quote_(e.node.id), o = s.quote_(e.event.key);
|
|
1625
1639
|
let i = "";
|
|
@@ -1631,7 +1645,7 @@ s.forBlock.on_node_event_v1 = function(t) {
|
|
|
1631
1645
|
${a}});
|
|
1632
1646
|
`;
|
|
1633
1647
|
};
|
|
1634
|
-
const
|
|
1648
|
+
const ai = {
|
|
1635
1649
|
init: function() {
|
|
1636
1650
|
this.element = {
|
|
1637
1651
|
key: "",
|
|
@@ -1645,13 +1659,13 @@ const ni = {
|
|
|
1645
1659
|
initData_: function() {
|
|
1646
1660
|
if (this.element.key)
|
|
1647
1661
|
return;
|
|
1648
|
-
const t =
|
|
1662
|
+
const t = Ye("event")?.[0];
|
|
1649
1663
|
if (!t)
|
|
1650
1664
|
return;
|
|
1651
1665
|
this.element.key = t.key, this.element.name = t.name;
|
|
1652
1666
|
const e = this.getField("ELEMENT");
|
|
1653
1667
|
e.getOptions(!1), e.setValue(this.element.key);
|
|
1654
|
-
const n =
|
|
1668
|
+
const n = Dt(this.element.key)?.[0];
|
|
1655
1669
|
if (!n)
|
|
1656
1670
|
return;
|
|
1657
1671
|
this.event.key = n.key, this.event.name = n.name, this.event.params = n.params;
|
|
@@ -1670,10 +1684,10 @@ const ni = {
|
|
|
1670
1684
|
}, 0);
|
|
1671
1685
|
},
|
|
1672
1686
|
genElementOpts_: function() {
|
|
1673
|
-
return
|
|
1687
|
+
return Ae("event");
|
|
1674
1688
|
},
|
|
1675
1689
|
genEventOpts_: function() {
|
|
1676
|
-
return
|
|
1690
|
+
return Vo(this.element.key);
|
|
1677
1691
|
},
|
|
1678
1692
|
onchange: function(t) {
|
|
1679
1693
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1688,7 +1702,7 @@ const ni = {
|
|
|
1688
1702
|
}
|
|
1689
1703
|
},
|
|
1690
1704
|
onElementChange_: function(t) {
|
|
1691
|
-
const e =
|
|
1705
|
+
const e = re(t);
|
|
1692
1706
|
if (!e) {
|
|
1693
1707
|
console.assert(!1);
|
|
1694
1708
|
return;
|
|
@@ -1696,13 +1710,13 @@ const ni = {
|
|
|
1696
1710
|
const n = this.element.key !== e.key;
|
|
1697
1711
|
this.element.key = e.key, this.element.name = e.name;
|
|
1698
1712
|
const o = this.getField("EVENT");
|
|
1699
|
-
if (o.getOptions(!1), n || !
|
|
1700
|
-
const a =
|
|
1713
|
+
if (o.getOptions(!1), n || !gt(this.element.key, this.event.key)) {
|
|
1714
|
+
const a = Dt(this.element.key)?.[0]?.key ?? "";
|
|
1701
1715
|
o.setValue(a, !1), this.event.key !== a && this.onEventChange_(a);
|
|
1702
1716
|
}
|
|
1703
1717
|
},
|
|
1704
1718
|
onEventChange_: function(t) {
|
|
1705
|
-
const e =
|
|
1719
|
+
const e = gt(this.element.key, t);
|
|
1706
1720
|
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(() => {
|
|
1707
1721
|
this.ensureBlocks_();
|
|
1708
1722
|
}, 0);
|
|
@@ -1724,13 +1738,13 @@ const ni = {
|
|
|
1724
1738
|
}), t.length > 0 && F(this, t);
|
|
1725
1739
|
},
|
|
1726
1740
|
checkWarning_: function() {
|
|
1727
|
-
const t =
|
|
1741
|
+
const t = re(this.element.key);
|
|
1728
1742
|
if (!t) {
|
|
1729
1743
|
this.setWarningText(_.WARN_ELEMENT_NOT_FOUND);
|
|
1730
1744
|
return;
|
|
1731
1745
|
}
|
|
1732
1746
|
t.name !== this.element.name && (this.element.name = t.name);
|
|
1733
|
-
const e =
|
|
1747
|
+
const e = gt(this.element.key, this.event.key);
|
|
1734
1748
|
if (!e) {
|
|
1735
1749
|
this.setWarningText(_.WARN_EVENT_NOT_FOUND);
|
|
1736
1750
|
return;
|
|
@@ -1742,7 +1756,7 @@ const ni = {
|
|
|
1742
1756
|
this.setWarningText(null);
|
|
1743
1757
|
}
|
|
1744
1758
|
};
|
|
1745
|
-
d.on_node_event_as_v1 =
|
|
1759
|
+
d.on_node_event_as_v1 = ai;
|
|
1746
1760
|
s.forBlock.on_node_event_as_v1 = function(t) {
|
|
1747
1761
|
const e = t, n = s.valueToCode(e, "NODE", c.NONE), o = s.quote_(e.event.key);
|
|
1748
1762
|
let i = "";
|
|
@@ -1754,7 +1768,7 @@ s.forBlock.on_node_event_as_v1 = function(t) {
|
|
|
1754
1768
|
${a}});
|
|
1755
1769
|
`;
|
|
1756
1770
|
};
|
|
1757
|
-
const
|
|
1771
|
+
const ci = {
|
|
1758
1772
|
init: function() {
|
|
1759
1773
|
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}");
|
|
1760
1774
|
},
|
|
@@ -1783,7 +1797,7 @@ const oi = {
|
|
|
1783
1797
|
]);
|
|
1784
1798
|
}
|
|
1785
1799
|
};
|
|
1786
|
-
d.open_confirm_dlg_v1 =
|
|
1800
|
+
d.open_confirm_dlg_v1 = ci;
|
|
1787
1801
|
s.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
1788
1802
|
const e = s.valueToCode(t, "TITLE", c.ATOMIC), n = s.valueToCode(t, "TEXT", c.ATOMIC), o = s.statementToCode(t, "HANDLE");
|
|
1789
1803
|
return `{
|
|
@@ -1791,7 +1805,7 @@ s.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
|
1791
1805
|
${o}}
|
|
1792
1806
|
`;
|
|
1793
1807
|
};
|
|
1794
|
-
const
|
|
1808
|
+
const li = {
|
|
1795
1809
|
init: function() {
|
|
1796
1810
|
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}");
|
|
1797
1811
|
},
|
|
@@ -1822,7 +1836,7 @@ const ii = {
|
|
|
1822
1836
|
]);
|
|
1823
1837
|
}
|
|
1824
1838
|
};
|
|
1825
|
-
d.open_prompt_dlg_v1 =
|
|
1839
|
+
d.open_prompt_dlg_v1 = li;
|
|
1826
1840
|
s.forBlock.open_prompt_dlg_v1 = function(t) {
|
|
1827
1841
|
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");
|
|
1828
1842
|
return `{
|
|
@@ -1862,7 +1876,7 @@ s.forBlock.popup_message_v1 = function(t) {
|
|
|
1862
1876
|
return `__messageV1__(${e}, ${n});
|
|
1863
1877
|
`;
|
|
1864
1878
|
};
|
|
1865
|
-
const
|
|
1879
|
+
const ui = {
|
|
1866
1880
|
init: function() {
|
|
1867
1881
|
this.comp = {
|
|
1868
1882
|
id: void 0,
|
|
@@ -1872,7 +1886,7 @@ const si = {
|
|
|
1872
1886
|
initData_: function() {
|
|
1873
1887
|
if (this.comp.id !== void 0)
|
|
1874
1888
|
return;
|
|
1875
|
-
const t =
|
|
1889
|
+
const t = Sn()?.[0];
|
|
1876
1890
|
if (!t)
|
|
1877
1891
|
return;
|
|
1878
1892
|
this.comp.id = t.id, this.comp.name = t.name;
|
|
@@ -1890,7 +1904,7 @@ const si = {
|
|
|
1890
1904
|
}, 0);
|
|
1891
1905
|
},
|
|
1892
1906
|
genCompOpts_: function() {
|
|
1893
|
-
return
|
|
1907
|
+
return oi();
|
|
1894
1908
|
},
|
|
1895
1909
|
onchange: function(t) {
|
|
1896
1910
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1905,7 +1919,7 @@ const si = {
|
|
|
1905
1919
|
}
|
|
1906
1920
|
},
|
|
1907
1921
|
onCompChange_: function(t) {
|
|
1908
|
-
const e =
|
|
1922
|
+
const e = on(t);
|
|
1909
1923
|
if (!e) {
|
|
1910
1924
|
console.assert(!1);
|
|
1911
1925
|
return;
|
|
@@ -1917,19 +1931,19 @@ const si = {
|
|
|
1917
1931
|
this.setWarningText(_.WARN_COMP_NOT_FOUND);
|
|
1918
1932
|
return;
|
|
1919
1933
|
}
|
|
1920
|
-
if (!
|
|
1934
|
+
if (!on(this.comp.id)) {
|
|
1921
1935
|
this.setWarningText(_.WARN_COMP_NOT_FOUND);
|
|
1922
1936
|
return;
|
|
1923
1937
|
}
|
|
1924
1938
|
this.setWarningText(null);
|
|
1925
1939
|
}
|
|
1926
1940
|
};
|
|
1927
|
-
d.select_comp_v1 =
|
|
1941
|
+
d.select_comp_v1 = ui;
|
|
1928
1942
|
s.forBlock.select_comp_v1 = function(t) {
|
|
1929
1943
|
const e = s.quote_, o = t.comp.id ?? "";
|
|
1930
1944
|
return [e(o), c.ATOMIC];
|
|
1931
1945
|
};
|
|
1932
|
-
const
|
|
1946
|
+
const ri = {
|
|
1933
1947
|
init: function() {
|
|
1934
1948
|
this.method = {
|
|
1935
1949
|
id: "",
|
|
@@ -1943,13 +1957,13 @@ const ai = {
|
|
|
1943
1957
|
initData_: function() {
|
|
1944
1958
|
if (this.method.id)
|
|
1945
1959
|
return;
|
|
1946
|
-
const t =
|
|
1960
|
+
const t = Me()?.[0];
|
|
1947
1961
|
if (!t)
|
|
1948
1962
|
return;
|
|
1949
1963
|
this.method.id = t.id, this.method.name = t.name;
|
|
1950
1964
|
const e = this.getField("METHOD");
|
|
1951
1965
|
e.getOptions(!1), e.setValue(this.method.id);
|
|
1952
|
-
const n =
|
|
1966
|
+
const n = Vt(this.method.id)?.[0];
|
|
1953
1967
|
if (!n)
|
|
1954
1968
|
return;
|
|
1955
1969
|
this.output.id = n.id, this.output.name = n.name, this.output.type = n.type;
|
|
@@ -1967,10 +1981,10 @@ const ai = {
|
|
|
1967
1981
|
}, 0);
|
|
1968
1982
|
},
|
|
1969
1983
|
genMethodOpts_: function() {
|
|
1970
|
-
return
|
|
1984
|
+
return vn();
|
|
1971
1985
|
},
|
|
1972
1986
|
genOutputOpts_: function() {
|
|
1973
|
-
return
|
|
1987
|
+
return Ho(this.method.id);
|
|
1974
1988
|
},
|
|
1975
1989
|
onchange: function(t) {
|
|
1976
1990
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1986,7 +2000,7 @@ const ai = {
|
|
|
1986
2000
|
}, 0);
|
|
1987
2001
|
},
|
|
1988
2002
|
onMethodChange_: function(t) {
|
|
1989
|
-
const e =
|
|
2003
|
+
const e = qe(t);
|
|
1990
2004
|
if (!e) {
|
|
1991
2005
|
console.assert(!1);
|
|
1992
2006
|
return;
|
|
@@ -1994,13 +2008,13 @@ const ai = {
|
|
|
1994
2008
|
const n = this.method.id !== e.id;
|
|
1995
2009
|
this.method.id = e.id, this.method.name = e.name;
|
|
1996
2010
|
const o = this.getField("OUTPUT");
|
|
1997
|
-
if (o.getOptions(!1), n || !
|
|
1998
|
-
const a =
|
|
2011
|
+
if (o.getOptions(!1), n || !Ct(this.method.id, this.output.id)) {
|
|
2012
|
+
const a = Vt(this.method.id)?.[0]?.id ?? "";
|
|
1999
2013
|
o.setValue(a), this.output.id === a && this.onOutputChange_(a);
|
|
2000
2014
|
}
|
|
2001
2015
|
},
|
|
2002
2016
|
onOutputChange_: function(t) {
|
|
2003
|
-
const e =
|
|
2017
|
+
const e = Ct(this.method.id, t);
|
|
2004
2018
|
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 = "");
|
|
2005
2019
|
},
|
|
2006
2020
|
updateShape_: function() {
|
|
@@ -2019,13 +2033,13 @@ const ai = {
|
|
|
2019
2033
|
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);
|
|
2020
2034
|
},
|
|
2021
2035
|
checkWarning_: function() {
|
|
2022
|
-
const t =
|
|
2036
|
+
const t = qe(this.method.id);
|
|
2023
2037
|
if (!t) {
|
|
2024
2038
|
this.setWarningText(_.WARN_METHOD_NOT_FOUND);
|
|
2025
2039
|
return;
|
|
2026
2040
|
}
|
|
2027
2041
|
t.name !== this.method.name && (this.method.name = t.name);
|
|
2028
|
-
const e =
|
|
2042
|
+
const e = Ct(this.method.id, this.output.id);
|
|
2029
2043
|
if (!e) {
|
|
2030
2044
|
this.setWarningText(_.WARN_OUTPUT_NOT_FOUND);
|
|
2031
2045
|
return;
|
|
@@ -2037,7 +2051,7 @@ const ai = {
|
|
|
2037
2051
|
this.setWarningText(null);
|
|
2038
2052
|
}
|
|
2039
2053
|
};
|
|
2040
|
-
d.set_comp_method_output_v1 =
|
|
2054
|
+
d.set_comp_method_output_v1 = ri;
|
|
2041
2055
|
s.forBlock.set_comp_method_output_v1 = function(t) {
|
|
2042
2056
|
const e = t;
|
|
2043
2057
|
let n = s.valueToCode(e, "VALUE", c.ATOMIC);
|
|
@@ -2064,7 +2078,7 @@ s.forBlock.set_comp_method_output_v1 = function(t) {
|
|
|
2064
2078
|
return `__setCompMethodOutputV1__(${n});
|
|
2065
2079
|
`;
|
|
2066
2080
|
};
|
|
2067
|
-
const
|
|
2081
|
+
const _i = {
|
|
2068
2082
|
init: function() {
|
|
2069
2083
|
this.node = {
|
|
2070
2084
|
id: "",
|
|
@@ -2078,13 +2092,13 @@ const ci = {
|
|
|
2078
2092
|
initData_: function() {
|
|
2079
2093
|
if (this.node.id)
|
|
2080
2094
|
return;
|
|
2081
|
-
const t =
|
|
2095
|
+
const t = Ce()?.[0];
|
|
2082
2096
|
if (!t)
|
|
2083
2097
|
return;
|
|
2084
2098
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2085
2099
|
const e = this.getField("NODE");
|
|
2086
2100
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
2087
|
-
const n =
|
|
2101
|
+
const n = Ue(this.node.id, !0)?.[0];
|
|
2088
2102
|
if (!n)
|
|
2089
2103
|
return;
|
|
2090
2104
|
this.prop.keys = n.keys, this.prop.names = n.names;
|
|
@@ -2103,10 +2117,10 @@ const ci = {
|
|
|
2103
2117
|
}, 0);
|
|
2104
2118
|
},
|
|
2105
2119
|
genNodeOpts_: function() {
|
|
2106
|
-
return
|
|
2120
|
+
return we();
|
|
2107
2121
|
},
|
|
2108
2122
|
genPropOpts_: function() {
|
|
2109
|
-
return
|
|
2123
|
+
return kn(this.node.id);
|
|
2110
2124
|
},
|
|
2111
2125
|
onchange: function(t) {
|
|
2112
2126
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -2121,7 +2135,7 @@ const ci = {
|
|
|
2121
2135
|
}
|
|
2122
2136
|
},
|
|
2123
2137
|
onNodeChange_: function(t) {
|
|
2124
|
-
const e =
|
|
2138
|
+
const e = Y(t);
|
|
2125
2139
|
if (!e) {
|
|
2126
2140
|
console.assert(!1);
|
|
2127
2141
|
return;
|
|
@@ -2130,7 +2144,7 @@ const ci = {
|
|
|
2130
2144
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2131
2145
|
const o = this.getField("PROP");
|
|
2132
2146
|
if (o.getOptions(!1), n || !ae(this.node.id, this.prop.keys)) {
|
|
2133
|
-
const a =
|
|
2147
|
+
const a = Ue(this.node.id)?.[0]?.keys ?? "";
|
|
2134
2148
|
o.setValue(a), this.prop.keys === a && this.onPropChange_(a);
|
|
2135
2149
|
}
|
|
2136
2150
|
},
|
|
@@ -2146,19 +2160,18 @@ const ci = {
|
|
|
2146
2160
|
return;
|
|
2147
2161
|
const e = this.getInput("VALUE"), n = e.connection.targetBlock();
|
|
2148
2162
|
n && n.dispose();
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
i.ui === "dummy" ? console.assert(!0) : i.ui === "strInput" ? o = ue(this.workspace, i.default) : i.ui === "numInput" ? o = ke(this.workspace, i.default) : i.ui === "switch" ? o = rt(this.workspace, i.default) : i.ui === "select" ? o = On(this.workspace, i.items) : i.ui === "multiTypes" ? o = Cn(this.workspace, i.types) : i.ui === "compSelect" ? o = kn(this.workspace) : i.ui === "colorPicker" && (o = $t(this.workspace, i.default ?? "#ff0000")), o && (e.connection.setCheck(null), e.connection.connect(o.outputConnection));
|
|
2163
|
+
const o = An(this.workspace, t.raw);
|
|
2164
|
+
o && (e.connection.setCheck(null), e.connection.connect(o.outputConnection));
|
|
2152
2165
|
},
|
|
2153
2166
|
updateCheck_: function() {
|
|
2154
2167
|
const t = ae(this.node.id, this.prop.keys);
|
|
2155
2168
|
if (!t)
|
|
2156
2169
|
return;
|
|
2157
|
-
const e =
|
|
2158
|
-
|
|
2170
|
+
const e = On(t.raw);
|
|
2171
|
+
this.getInput("VALUE").connection.setCheck(e);
|
|
2159
2172
|
},
|
|
2160
2173
|
checkWarning_: function() {
|
|
2161
|
-
const t =
|
|
2174
|
+
const t = Y(this.node.id);
|
|
2162
2175
|
if (!t) {
|
|
2163
2176
|
this.setWarningText(_.WARN_NODE_NOT_FOUND);
|
|
2164
2177
|
return;
|
|
@@ -2176,13 +2189,13 @@ const ci = {
|
|
|
2176
2189
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
2177
2190
|
}
|
|
2178
2191
|
};
|
|
2179
|
-
d.set_node_prop_v1 =
|
|
2192
|
+
d.set_node_prop_v1 = _i;
|
|
2180
2193
|
s.forBlock.set_node_prop_v1 = function(t) {
|
|
2181
2194
|
const e = t, n = s.quote_(e.node.id), o = s.quote_(e.prop.keys), i = s.valueToCode(e, "VALUE", c.NONE);
|
|
2182
2195
|
return `__setNodePropV1__(${n}, ${o}, ${i});
|
|
2183
2196
|
`;
|
|
2184
2197
|
};
|
|
2185
|
-
const
|
|
2198
|
+
const pi = {
|
|
2186
2199
|
init: function() {
|
|
2187
2200
|
this.element = {
|
|
2188
2201
|
key: "",
|
|
@@ -2195,13 +2208,13 @@ const li = {
|
|
|
2195
2208
|
initData_: function() {
|
|
2196
2209
|
if (this.element.key)
|
|
2197
2210
|
return;
|
|
2198
|
-
const t =
|
|
2211
|
+
const t = Ye()?.[0];
|
|
2199
2212
|
if (!t)
|
|
2200
2213
|
return;
|
|
2201
2214
|
this.element.key = t.key, this.element.name = t.name;
|
|
2202
2215
|
const e = this.getField("ELEMENT");
|
|
2203
2216
|
e.getOptions(!1), e.setValue(this.element.key);
|
|
2204
|
-
const n =
|
|
2217
|
+
const n = De(this.element.key, !0)?.[0];
|
|
2205
2218
|
if (!n)
|
|
2206
2219
|
return;
|
|
2207
2220
|
this.prop.keys = n.keys, this.prop.names = n.names;
|
|
@@ -2220,10 +2233,10 @@ const li = {
|
|
|
2220
2233
|
}, 0);
|
|
2221
2234
|
},
|
|
2222
2235
|
genElementOpts_: function() {
|
|
2223
|
-
return
|
|
2236
|
+
return Ae();
|
|
2224
2237
|
},
|
|
2225
2238
|
genPropOpts_: function() {
|
|
2226
|
-
return
|
|
2239
|
+
return Cn(this.element.key);
|
|
2227
2240
|
},
|
|
2228
2241
|
onchange: function(t) {
|
|
2229
2242
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -2238,7 +2251,7 @@ const li = {
|
|
|
2238
2251
|
}
|
|
2239
2252
|
},
|
|
2240
2253
|
onElementChange_: function(t) {
|
|
2241
|
-
const e =
|
|
2254
|
+
const e = re(t);
|
|
2242
2255
|
if (!e) {
|
|
2243
2256
|
console.assert(!1);
|
|
2244
2257
|
return;
|
|
@@ -2247,7 +2260,7 @@ const li = {
|
|
|
2247
2260
|
this.element.key = e.key, this.element.name = e.name;
|
|
2248
2261
|
const o = this.getField("PROP");
|
|
2249
2262
|
if (o.getOptions(!1), n || !se(this.element.key, this.prop.keys)) {
|
|
2250
|
-
const a =
|
|
2263
|
+
const a = De(this.element.key)?.[0]?.keys ?? "";
|
|
2251
2264
|
o.setValue(a), this.prop.keys === a && this.onPropChange_(a);
|
|
2252
2265
|
}
|
|
2253
2266
|
},
|
|
@@ -2263,19 +2276,18 @@ const li = {
|
|
|
2263
2276
|
return;
|
|
2264
2277
|
const e = this.getInput("VALUE"), n = e.connection.targetBlock();
|
|
2265
2278
|
n && n.dispose();
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
i.ui === "dummy" ? console.assert(!0) : i.ui === "strInput" ? o = ue(this.workspace, i.default) : i.ui === "numInput" ? o = ke(this.workspace, i.default) : i.ui === "switch" ? o = rt(this.workspace, i.default) : i.ui === "select" ? o = On(this.workspace, i.items) : i.ui === "multiTypes" ? o = Cn(this.workspace, i.types) : i.ui === "compSelect" ? o = kn(this.workspace) : i.ui === "colorPicker" && (o = $t(this.workspace, i.default ?? "#ff0000")), o && (e.connection.setCheck(null), e.connection.connect(o.outputConnection));
|
|
2279
|
+
const o = An(this.workspace, t.raw);
|
|
2280
|
+
o && (e.connection.setCheck(null), e.connection.connect(o.outputConnection));
|
|
2269
2281
|
},
|
|
2270
2282
|
updateCheck_: function() {
|
|
2271
2283
|
const t = se(this.element.key, this.prop.keys);
|
|
2272
2284
|
if (!t)
|
|
2273
2285
|
return;
|
|
2274
|
-
const e =
|
|
2275
|
-
|
|
2286
|
+
const e = On(t.raw);
|
|
2287
|
+
this.getInput("VALUE").connection.setCheck(e);
|
|
2276
2288
|
},
|
|
2277
2289
|
checkWarning_: function() {
|
|
2278
|
-
const t =
|
|
2290
|
+
const t = re(this.element.key);
|
|
2279
2291
|
if (!t) {
|
|
2280
2292
|
this.setWarningText(_.WARN_ELEMENT_NOT_FOUND);
|
|
2281
2293
|
return;
|
|
@@ -2293,13 +2305,13 @@ const li = {
|
|
|
2293
2305
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
2294
2306
|
}
|
|
2295
2307
|
};
|
|
2296
|
-
d.set_node_prop_as_v1 =
|
|
2308
|
+
d.set_node_prop_as_v1 = pi;
|
|
2297
2309
|
s.forBlock.set_node_prop_as_v1 = function(t) {
|
|
2298
2310
|
const e = t, n = s.valueToCode(e, "NODE", c.NONE), o = s.quote_(e.prop.keys), i = s.valueToCode(e, "VALUE", c.NONE);
|
|
2299
2311
|
return `__setNodePropV1__(${n}, ${o}, ${i});
|
|
2300
2312
|
`;
|
|
2301
2313
|
};
|
|
2302
|
-
const
|
|
2314
|
+
const hi = {
|
|
2303
2315
|
init: function() {
|
|
2304
2316
|
this.event = {
|
|
2305
2317
|
id: "",
|
|
@@ -2310,7 +2322,7 @@ const ui = {
|
|
|
2310
2322
|
initData_: function() {
|
|
2311
2323
|
if (this.event.id)
|
|
2312
2324
|
return;
|
|
2313
|
-
const t =
|
|
2325
|
+
const t = yn()?.[0];
|
|
2314
2326
|
if (!t)
|
|
2315
2327
|
return;
|
|
2316
2328
|
this.event.id = t.id, this.event.name = t.name, this.event.params = t.params;
|
|
@@ -2328,7 +2340,7 @@ const ui = {
|
|
|
2328
2340
|
}, 0);
|
|
2329
2341
|
},
|
|
2330
2342
|
genEventOpts_: function() {
|
|
2331
|
-
return
|
|
2343
|
+
return Go();
|
|
2332
2344
|
},
|
|
2333
2345
|
onchange: function(t) {
|
|
2334
2346
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -2343,7 +2355,7 @@ const ui = {
|
|
|
2343
2355
|
}
|
|
2344
2356
|
},
|
|
2345
2357
|
onEventChange_: function(t) {
|
|
2346
|
-
const e =
|
|
2358
|
+
const e = en(t);
|
|
2347
2359
|
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 = []);
|
|
2348
2360
|
},
|
|
2349
2361
|
updateShape_: function() {
|
|
@@ -2371,7 +2383,7 @@ const ui = {
|
|
|
2371
2383
|
}
|
|
2372
2384
|
},
|
|
2373
2385
|
checkWarning_: function() {
|
|
2374
|
-
const t =
|
|
2386
|
+
const t = en(this.event.id);
|
|
2375
2387
|
if (!t) {
|
|
2376
2388
|
this.setWarningText(_.WARN_EVENT_NOT_FOUND);
|
|
2377
2389
|
return;
|
|
@@ -2383,7 +2395,7 @@ const ui = {
|
|
|
2383
2395
|
this.setWarningText(null);
|
|
2384
2396
|
}
|
|
2385
2397
|
};
|
|
2386
|
-
d.trigger_comp_event_v1 =
|
|
2398
|
+
d.trigger_comp_event_v1 = hi;
|
|
2387
2399
|
s.forBlock.trigger_comp_event_v1 = function() {
|
|
2388
2400
|
return "";
|
|
2389
2401
|
};
|
|
@@ -3090,7 +3102,7 @@ function ${s.FUNCTION_NAME_PLACEHOLDER_}(r, g, b) {
|
|
|
3090
3102
|
`
|
|
3091
3103
|
)}(${e}, ${n}, ${o})`, c.FUNCTION_CALL];
|
|
3092
3104
|
};
|
|
3093
|
-
const
|
|
3105
|
+
const di = v.xml, fi = [
|
|
3094
3106
|
{
|
|
3095
3107
|
type: "add_data_v1",
|
|
3096
3108
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
@@ -3152,16 +3164,16 @@ const ri = v.xml, _i = [
|
|
|
3152
3164
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
3153
3165
|
}
|
|
3154
3166
|
];
|
|
3155
|
-
function
|
|
3156
|
-
const n =
|
|
3167
|
+
function mi(t, e) {
|
|
3168
|
+
const n = fi.find((o) => o.type === t);
|
|
3157
3169
|
return n ? !!(n.prefixInputs?.some((o) => e.startsWith(o)) || n.inputs?.some((o) => o === e)) : !1;
|
|
3158
3170
|
}
|
|
3159
|
-
const
|
|
3171
|
+
const Ti = {
|
|
3160
3172
|
init: function() {
|
|
3161
3173
|
this.key = "", this.name = "", this.locale = !1, this.appendDummyInput().appendField("", "LABEL"), this.setOutput(!0), this.setColour(220);
|
|
3162
3174
|
},
|
|
3163
3175
|
mutationToDom: function() {
|
|
3164
|
-
const t =
|
|
3176
|
+
const t = di.createElement("mutation");
|
|
3165
3177
|
return t.setAttribute("key", this.key), t.setAttribute("name", this.name), t.setAttribute("locale", this.locale ? "TRUE" : "FALSE"), t;
|
|
3166
3178
|
},
|
|
3167
3179
|
domToMutation: function(t) {
|
|
@@ -3190,12 +3202,12 @@ const hi = {
|
|
|
3190
3202
|
},
|
|
3191
3203
|
tryDuplicate_: function(t) {
|
|
3192
3204
|
const e = this.workspace.getBlockById(t.oldParentId);
|
|
3193
|
-
if (e &&
|
|
3205
|
+
if (e && mi(e.type, t.oldInputName))
|
|
3194
3206
|
try {
|
|
3195
3207
|
E.disable();
|
|
3196
3208
|
const n = e.getInput(t.oldInputName)?.connection;
|
|
3197
3209
|
if (n) {
|
|
3198
|
-
const o =
|
|
3210
|
+
const o = $t(
|
|
3199
3211
|
this.workspace,
|
|
3200
3212
|
this.key,
|
|
3201
3213
|
this.name,
|
|
@@ -3211,54 +3223,54 @@ const hi = {
|
|
|
3211
3223
|
this.locale ? this.setFieldValue(_[this.name], "LABEL") : this.setFieldValue(this.name, "LABEL");
|
|
3212
3224
|
}
|
|
3213
3225
|
};
|
|
3214
|
-
d.parameter_v1 =
|
|
3226
|
+
d.parameter_v1 = Ti;
|
|
3215
3227
|
s.forBlock.parameter_v1 = function(t) {
|
|
3216
3228
|
return [t.key, c.ATOMIC];
|
|
3217
3229
|
};
|
|
3218
|
-
function
|
|
3230
|
+
function Oe(t) {
|
|
3219
3231
|
const e = [];
|
|
3220
3232
|
return T.compute.spaces.forEach((n) => {
|
|
3221
3233
|
n.funcs.length > 0 && e.push(n);
|
|
3222
3234
|
}), e;
|
|
3223
3235
|
}
|
|
3224
|
-
function
|
|
3236
|
+
function Qe(t) {
|
|
3225
3237
|
return T.compute.spaces.find((e) => e.id === t);
|
|
3226
3238
|
}
|
|
3227
|
-
function
|
|
3239
|
+
function bn(t) {
|
|
3228
3240
|
const e = [];
|
|
3229
|
-
return
|
|
3241
|
+
return Oe().forEach(({ id: o, name: i }) => {
|
|
3230
3242
|
e.push([i, o]);
|
|
3231
3243
|
}), N(e);
|
|
3232
3244
|
}
|
|
3233
|
-
function
|
|
3245
|
+
function Pe(t) {
|
|
3234
3246
|
const e = T.compute.spaces.find((n) => n.id === t);
|
|
3235
3247
|
return e ? e.funcs : [];
|
|
3236
3248
|
}
|
|
3237
|
-
function
|
|
3249
|
+
function Ie(t, e) {
|
|
3238
3250
|
const n = T.compute.spaces.find((o) => o.id === t);
|
|
3239
3251
|
if (n)
|
|
3240
3252
|
return n.funcs.find((o) => o.id === e);
|
|
3241
3253
|
}
|
|
3242
|
-
function
|
|
3254
|
+
function Bn(t) {
|
|
3243
3255
|
const e = [];
|
|
3244
|
-
return
|
|
3256
|
+
return Pe(t).forEach(({ id: o, name: i }) => {
|
|
3245
3257
|
e.push([i, o]);
|
|
3246
3258
|
}), N(e);
|
|
3247
3259
|
}
|
|
3248
|
-
function
|
|
3260
|
+
function Ft() {
|
|
3249
3261
|
return T.compute.activeFunc;
|
|
3250
3262
|
}
|
|
3251
|
-
function
|
|
3263
|
+
function sn(t) {
|
|
3252
3264
|
const { outputs: e } = T.compute.activeFunc;
|
|
3253
3265
|
return e.find((n) => n.id === t);
|
|
3254
3266
|
}
|
|
3255
|
-
function
|
|
3267
|
+
function Ei() {
|
|
3256
3268
|
const t = [], { outputs: e } = T.compute.activeFunc;
|
|
3257
3269
|
return e.forEach(({ id: n, name: o }) => {
|
|
3258
3270
|
t.push([o, n]);
|
|
3259
3271
|
}), N(t);
|
|
3260
3272
|
}
|
|
3261
|
-
const
|
|
3273
|
+
const gi = {
|
|
3262
3274
|
init: function() {
|
|
3263
3275
|
this.space = {
|
|
3264
3276
|
id: "",
|
|
@@ -3273,13 +3285,13 @@ const fi = {
|
|
|
3273
3285
|
initData_: function() {
|
|
3274
3286
|
if (this.space.id)
|
|
3275
3287
|
return;
|
|
3276
|
-
const t =
|
|
3288
|
+
const t = Oe()?.[0];
|
|
3277
3289
|
if (!t)
|
|
3278
3290
|
return;
|
|
3279
3291
|
this.space.id = t.id, this.space.name = t.name;
|
|
3280
3292
|
const e = this.getField("SPACE");
|
|
3281
3293
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
3282
|
-
const n =
|
|
3294
|
+
const n = Pe(this.space.id)?.[0];
|
|
3283
3295
|
if (!n)
|
|
3284
3296
|
return;
|
|
3285
3297
|
this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
|
|
@@ -3298,10 +3310,10 @@ const fi = {
|
|
|
3298
3310
|
}, 0);
|
|
3299
3311
|
},
|
|
3300
3312
|
genSpaceOpts_: function() {
|
|
3301
|
-
return
|
|
3313
|
+
return bn();
|
|
3302
3314
|
},
|
|
3303
3315
|
genFuncOpts_: function() {
|
|
3304
|
-
return
|
|
3316
|
+
return Bn(this.space.id);
|
|
3305
3317
|
},
|
|
3306
3318
|
onchange: function(t) {
|
|
3307
3319
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -3316,19 +3328,19 @@ const fi = {
|
|
|
3316
3328
|
}
|
|
3317
3329
|
},
|
|
3318
3330
|
onSpaceChange_: function(t) {
|
|
3319
|
-
const e =
|
|
3331
|
+
const e = Qe(t);
|
|
3320
3332
|
if (!e) {
|
|
3321
3333
|
console.assert(!1);
|
|
3322
3334
|
return;
|
|
3323
3335
|
}
|
|
3324
3336
|
let n = !1;
|
|
3325
|
-
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !
|
|
3326
|
-
const i =
|
|
3337
|
+
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !Ie(this.space.id, this.func.id)) {
|
|
3338
|
+
const i = Pe(this.space.id)?.[0];
|
|
3327
3339
|
this.setFieldValue(i?.id ?? "", "FUNC");
|
|
3328
3340
|
}
|
|
3329
3341
|
},
|
|
3330
3342
|
onFuncChange_: function(t) {
|
|
3331
|
-
const e =
|
|
3343
|
+
const e = Ie(this.space.id, t);
|
|
3332
3344
|
if (!e) {
|
|
3333
3345
|
console.assert(!1);
|
|
3334
3346
|
return;
|
|
@@ -3391,13 +3403,13 @@ const fi = {
|
|
|
3391
3403
|
F(this, t);
|
|
3392
3404
|
},
|
|
3393
3405
|
checkWarning_: function() {
|
|
3394
|
-
const t =
|
|
3406
|
+
const t = Qe(this.space.id);
|
|
3395
3407
|
if (!t) {
|
|
3396
3408
|
this.setWarningText(_.WARN_SPACE_NOT_FOUND);
|
|
3397
3409
|
return;
|
|
3398
3410
|
}
|
|
3399
3411
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
3400
|
-
const e =
|
|
3412
|
+
const e = Ie(this.space.id, this.func.id);
|
|
3401
3413
|
if (!e) {
|
|
3402
3414
|
this.setWarningText(_.WARN_FUNC_NOT_FOUND);
|
|
3403
3415
|
return;
|
|
@@ -3413,7 +3425,7 @@ const fi = {
|
|
|
3413
3425
|
this.setWarningText(null);
|
|
3414
3426
|
}
|
|
3415
3427
|
};
|
|
3416
|
-
d.call_func_v1 =
|
|
3428
|
+
d.call_func_v1 = gi;
|
|
3417
3429
|
s.forBlock.call_func_v1 = function(t) {
|
|
3418
3430
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3419
3431
|
let l = "";
|
|
@@ -3440,7 +3452,7 @@ ${e}var __result__ = __callFuncV1__(${i},${a},__inputs__,__getEnvV1__(),${u});
|
|
|
3440
3452
|
${r}${p}}
|
|
3441
3453
|
`;
|
|
3442
3454
|
};
|
|
3443
|
-
const
|
|
3455
|
+
const Ii = {
|
|
3444
3456
|
init: function() {
|
|
3445
3457
|
this.space = {
|
|
3446
3458
|
id: "",
|
|
@@ -3455,13 +3467,13 @@ const mi = {
|
|
|
3455
3467
|
initData_: function() {
|
|
3456
3468
|
if (this.space.id)
|
|
3457
3469
|
return;
|
|
3458
|
-
const t =
|
|
3470
|
+
const t = Oe()?.[0];
|
|
3459
3471
|
if (!t)
|
|
3460
3472
|
return;
|
|
3461
3473
|
this.space.id = t.id, this.space.name = t.name;
|
|
3462
3474
|
const e = this.getField("SPACE");
|
|
3463
3475
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
3464
|
-
const n =
|
|
3476
|
+
const n = Pe(this.space.id)?.[0];
|
|
3465
3477
|
if (!n)
|
|
3466
3478
|
return;
|
|
3467
3479
|
this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
|
|
@@ -3480,10 +3492,10 @@ const mi = {
|
|
|
3480
3492
|
}, 0);
|
|
3481
3493
|
},
|
|
3482
3494
|
genSpaceOpts_: function() {
|
|
3483
|
-
return
|
|
3495
|
+
return bn();
|
|
3484
3496
|
},
|
|
3485
3497
|
genFuncOpts_: function() {
|
|
3486
|
-
return
|
|
3498
|
+
return Bn(this.space.id);
|
|
3487
3499
|
},
|
|
3488
3500
|
onchange: function(t) {
|
|
3489
3501
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -3498,19 +3510,19 @@ const mi = {
|
|
|
3498
3510
|
}
|
|
3499
3511
|
},
|
|
3500
3512
|
onSpaceChange_: function(t) {
|
|
3501
|
-
const e =
|
|
3513
|
+
const e = Qe(t);
|
|
3502
3514
|
if (!e) {
|
|
3503
3515
|
console.assert(!1);
|
|
3504
3516
|
return;
|
|
3505
3517
|
}
|
|
3506
3518
|
let n = !1;
|
|
3507
|
-
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !
|
|
3508
|
-
const i =
|
|
3519
|
+
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !Ie(this.space.id, this.func.id)) {
|
|
3520
|
+
const i = Pe(this.space.id)?.[0];
|
|
3509
3521
|
i ? this.setFieldValue(i.id, "FUNC") : this.setFieldValue("", "FUNC");
|
|
3510
3522
|
}
|
|
3511
3523
|
},
|
|
3512
3524
|
onFuncChange_: function(t) {
|
|
3513
|
-
const e =
|
|
3525
|
+
const e = Ie(this.space.id, t);
|
|
3514
3526
|
if (!e) {
|
|
3515
3527
|
console.assert(!1);
|
|
3516
3528
|
return;
|
|
@@ -3573,13 +3585,13 @@ const mi = {
|
|
|
3573
3585
|
F(this, t);
|
|
3574
3586
|
},
|
|
3575
3587
|
checkWarning_: function() {
|
|
3576
|
-
const t =
|
|
3588
|
+
const t = Qe(this.space.id);
|
|
3577
3589
|
if (!t) {
|
|
3578
3590
|
this.setWarningText(_.WARN_SPACE_NOT_FOUND);
|
|
3579
3591
|
return;
|
|
3580
3592
|
}
|
|
3581
3593
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
3582
|
-
const e =
|
|
3594
|
+
const e = Ie(this.space.id, this.func.id);
|
|
3583
3595
|
if (!e) {
|
|
3584
3596
|
this.setWarningText(_.WARN_FUNC_NOT_FOUND);
|
|
3585
3597
|
return;
|
|
@@ -3595,7 +3607,7 @@ const mi = {
|
|
|
3595
3607
|
this.setWarningText(null);
|
|
3596
3608
|
}
|
|
3597
3609
|
};
|
|
3598
|
-
d.call_func_internal_v1 =
|
|
3610
|
+
d.call_func_internal_v1 = Ii;
|
|
3599
3611
|
s.forBlock.call_func_internal_v1 = function(t) {
|
|
3600
3612
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3601
3613
|
let l = `${e}var __inputs__ = {
|
|
@@ -3647,7 +3659,7 @@ s.forBlock.compute_debug_trace_v1 = function(t) {
|
|
|
3647
3659
|
return `__debugTraceV1__(${s.valueToCode(t, "OBJECT", c.ATOMIC)});
|
|
3648
3660
|
`;
|
|
3649
3661
|
};
|
|
3650
|
-
const
|
|
3662
|
+
const Ai = {
|
|
3651
3663
|
init: function() {
|
|
3652
3664
|
this.func = {
|
|
3653
3665
|
id: "",
|
|
@@ -3657,7 +3669,7 @@ const Ti = {
|
|
|
3657
3669
|
initData_: function() {
|
|
3658
3670
|
if (this.func.id)
|
|
3659
3671
|
return;
|
|
3660
|
-
const { id: t, inputs: e } =
|
|
3672
|
+
const { id: t, inputs: e } = Ft();
|
|
3661
3673
|
this.func.id = t, this.func.inputs = e;
|
|
3662
3674
|
},
|
|
3663
3675
|
saveExtraState: function() {
|
|
@@ -3694,7 +3706,7 @@ const Ti = {
|
|
|
3694
3706
|
F(this, t);
|
|
3695
3707
|
},
|
|
3696
3708
|
checkWarning_: function() {
|
|
3697
|
-
const { id: t, inputs: e } =
|
|
3709
|
+
const { id: t, inputs: e } = Ft();
|
|
3698
3710
|
if (this.func.id !== t && (this.func.id = t), !U(e, this.func.inputs)) {
|
|
3699
3711
|
this.setWarningText(_.WARN_FUNC_HAS_CHANGED);
|
|
3700
3712
|
return;
|
|
@@ -3702,7 +3714,7 @@ const Ti = {
|
|
|
3702
3714
|
this.setWarningText(null);
|
|
3703
3715
|
}
|
|
3704
3716
|
};
|
|
3705
|
-
d.func_entry_v1 =
|
|
3717
|
+
d.func_entry_v1 = Ai;
|
|
3706
3718
|
s.forBlock.func_entry_v1 = function(t) {
|
|
3707
3719
|
const e = t, n = s.statementToCode(e, "HANDLE"), o = [];
|
|
3708
3720
|
for (let a = 0; a < e.func.inputs.length; a++) {
|
|
@@ -3712,16 +3724,16 @@ s.forBlock.func_entry_v1 = function(t) {
|
|
|
3712
3724
|
return `function __funcEntryV1__(${o.join(", ")}) {
|
|
3713
3725
|
${n}}`;
|
|
3714
3726
|
};
|
|
3715
|
-
const
|
|
3727
|
+
const Oi = {
|
|
3716
3728
|
init: function() {
|
|
3717
3729
|
}
|
|
3718
3730
|
};
|
|
3719
|
-
d.on_flow_state_event_v1 =
|
|
3731
|
+
d.on_flow_state_event_v1 = Oi;
|
|
3720
3732
|
s.forBlock.on_flow_state_event_v1 = function() {
|
|
3721
3733
|
return `__onFlowStateEventV1__();
|
|
3722
3734
|
`;
|
|
3723
3735
|
};
|
|
3724
|
-
const
|
|
3736
|
+
const Ci = {
|
|
3725
3737
|
init: function() {
|
|
3726
3738
|
this.output = {
|
|
3727
3739
|
id: "",
|
|
@@ -3732,7 +3744,7 @@ const gi = {
|
|
|
3732
3744
|
initData_: function() {
|
|
3733
3745
|
if (this.output.id)
|
|
3734
3746
|
return;
|
|
3735
|
-
const t =
|
|
3747
|
+
const t = Ft().outputs?.[0];
|
|
3736
3748
|
t && (this.output.id = t.id, this.output.name = t.name, this.output.type = t.type);
|
|
3737
3749
|
},
|
|
3738
3750
|
saveExtraState: function() {
|
|
@@ -3746,7 +3758,7 @@ const gi = {
|
|
|
3746
3758
|
}, 0);
|
|
3747
3759
|
},
|
|
3748
3760
|
genOutputOpts_: function() {
|
|
3749
|
-
return
|
|
3761
|
+
return Ei();
|
|
3750
3762
|
},
|
|
3751
3763
|
onchange: function(t) {
|
|
3752
3764
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -3761,7 +3773,7 @@ const gi = {
|
|
|
3761
3773
|
}
|
|
3762
3774
|
},
|
|
3763
3775
|
onOutputChange_: function(t) {
|
|
3764
|
-
const e =
|
|
3776
|
+
const e = sn(t);
|
|
3765
3777
|
if (!e) {
|
|
3766
3778
|
console.assert(!1);
|
|
3767
3779
|
return;
|
|
@@ -3784,7 +3796,7 @@ const gi = {
|
|
|
3784
3796
|
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);
|
|
3785
3797
|
},
|
|
3786
3798
|
checkWarning_: function() {
|
|
3787
|
-
const t =
|
|
3799
|
+
const t = sn(this.output.id);
|
|
3788
3800
|
if (!t) {
|
|
3789
3801
|
this.setWarningText(_.WARN_FUNC_HAS_CHANGED);
|
|
3790
3802
|
return;
|
|
@@ -3796,7 +3808,7 @@ const gi = {
|
|
|
3796
3808
|
this.setWarningText(null);
|
|
3797
3809
|
}
|
|
3798
3810
|
};
|
|
3799
|
-
d.set_func_output_v1 =
|
|
3811
|
+
d.set_func_output_v1 = Ci;
|
|
3800
3812
|
s.forBlock.set_func_output_v1 = function(t) {
|
|
3801
3813
|
const e = s.quote_, n = t, { id: o, type: i } = n.output;
|
|
3802
3814
|
let a = s.valueToCode(n, "VALUE", c.ATOMIC);
|
|
@@ -3829,11 +3841,11 @@ function J() {
|
|
|
3829
3841
|
e.tables.length > 0 && t.push(e);
|
|
3830
3842
|
}), t;
|
|
3831
3843
|
}
|
|
3832
|
-
function
|
|
3844
|
+
function _e(t) {
|
|
3833
3845
|
const { spaces: e } = T.data;
|
|
3834
3846
|
return e.find((n) => n.id === t);
|
|
3835
3847
|
}
|
|
3836
|
-
function
|
|
3848
|
+
function lt() {
|
|
3837
3849
|
const t = [];
|
|
3838
3850
|
return J().forEach(({ id: n, name: o }) => {
|
|
3839
3851
|
t.push([o, n]);
|
|
@@ -3848,20 +3860,20 @@ function X(t, e) {
|
|
|
3848
3860
|
if (o)
|
|
3849
3861
|
return o.tables.find((i) => i.id === e);
|
|
3850
3862
|
}
|
|
3851
|
-
function
|
|
3863
|
+
function ut(t) {
|
|
3852
3864
|
const e = [];
|
|
3853
3865
|
return H(t).forEach(({ id: o, name: i }) => {
|
|
3854
3866
|
e.push([i, o]);
|
|
3855
3867
|
}), N(e);
|
|
3856
3868
|
}
|
|
3857
|
-
function
|
|
3869
|
+
function ze(t, e) {
|
|
3858
3870
|
const { spaces: n } = T.data, o = n.find((a) => a.id === t);
|
|
3859
3871
|
if (!o)
|
|
3860
3872
|
return [];
|
|
3861
3873
|
const i = o.tables.find((a) => a.id === e);
|
|
3862
3874
|
return i ? i.columns : [];
|
|
3863
3875
|
}
|
|
3864
|
-
function
|
|
3876
|
+
function vt(t, e, n) {
|
|
3865
3877
|
const { spaces: o } = T.data, i = o.find((l) => l.id === t);
|
|
3866
3878
|
if (!i)
|
|
3867
3879
|
return;
|
|
@@ -3869,13 +3881,13 @@ function Lt(t, e, n) {
|
|
|
3869
3881
|
if (a)
|
|
3870
3882
|
return a.columns.find((l) => l.id === n);
|
|
3871
3883
|
}
|
|
3872
|
-
function
|
|
3884
|
+
function ki(t, e) {
|
|
3873
3885
|
const n = [];
|
|
3874
|
-
return
|
|
3886
|
+
return ze(t, e).forEach(({ id: i, name: a }) => {
|
|
3875
3887
|
n.push([a, i]);
|
|
3876
3888
|
}), N(n);
|
|
3877
3889
|
}
|
|
3878
|
-
function
|
|
3890
|
+
function vi(t) {
|
|
3879
3891
|
const e = t.getInput("TABLE").connection;
|
|
3880
3892
|
if (e.targetBlock())
|
|
3881
3893
|
return;
|
|
@@ -3909,7 +3921,7 @@ function Ai(t) {
|
|
|
3909
3921
|
}, l = $.blocks.append(a, t.workspace);
|
|
3910
3922
|
e.connect(l.outputConnection);
|
|
3911
3923
|
}
|
|
3912
|
-
function
|
|
3924
|
+
function yi(t) {
|
|
3913
3925
|
const e = t.getInput("HANDLE").connection;
|
|
3914
3926
|
if (e.targetBlock())
|
|
3915
3927
|
return;
|
|
@@ -3933,7 +3945,7 @@ function Oi(t) {
|
|
|
3933
3945
|
}, o = $.blocks.append(n, t.workspace);
|
|
3934
3946
|
e.connect(o.previousConnection);
|
|
3935
3947
|
}
|
|
3936
|
-
const
|
|
3948
|
+
const Ni = {
|
|
3937
3949
|
init: function() {
|
|
3938
3950
|
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}");
|
|
3939
3951
|
},
|
|
@@ -3949,14 +3961,14 @@ const Ci = {
|
|
|
3949
3961
|
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"));
|
|
3950
3962
|
},
|
|
3951
3963
|
ensureBlocks_: function() {
|
|
3952
|
-
this.isInsertionMarker() || (
|
|
3964
|
+
this.isInsertionMarker() || (vi(this), F(this, [
|
|
3953
3965
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
3954
3966
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
3955
3967
|
["DATA", "__data__", "PARAM_DATA", !0]
|
|
3956
|
-
]),
|
|
3968
|
+
]), yi(this));
|
|
3957
3969
|
}
|
|
3958
3970
|
};
|
|
3959
|
-
d.add_data_v1 =
|
|
3971
|
+
d.add_data_v1 = Ni;
|
|
3960
3972
|
s.forBlock.add_data_v1 = function(t) {
|
|
3961
3973
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.statementToCode(t, "HANDLE");
|
|
3962
3974
|
return `{
|
|
@@ -3972,7 +3984,7 @@ ${e}}
|
|
|
3972
3984
|
${o}}
|
|
3973
3985
|
`;
|
|
3974
3986
|
};
|
|
3975
|
-
const
|
|
3987
|
+
const Li = {
|
|
3976
3988
|
init: function() {
|
|
3977
3989
|
this.space = {
|
|
3978
3990
|
id: "",
|
|
@@ -4010,7 +4022,7 @@ const ki = {
|
|
|
4010
4022
|
if (!e)
|
|
4011
4023
|
return;
|
|
4012
4024
|
this.table.id = e.id, this.table.name = e.name;
|
|
4013
|
-
const n =
|
|
4025
|
+
const n = ze(this.space.id, this.table.id)?.[0];
|
|
4014
4026
|
n && (this.column.id = n.id, this.column.name = n.name, this.column.type = n.type, this.column.extend = n.extend);
|
|
4015
4027
|
},
|
|
4016
4028
|
saveExtraState: function() {
|
|
@@ -4026,13 +4038,13 @@ const ki = {
|
|
|
4026
4038
|
}, 0);
|
|
4027
4039
|
},
|
|
4028
4040
|
genSpaceOpts_: function() {
|
|
4029
|
-
return
|
|
4041
|
+
return lt();
|
|
4030
4042
|
},
|
|
4031
4043
|
genTableOpts_: function() {
|
|
4032
|
-
return
|
|
4044
|
+
return ut(this.space.id);
|
|
4033
4045
|
},
|
|
4034
4046
|
genColumnOpts_: function() {
|
|
4035
|
-
return
|
|
4047
|
+
return ki(this.space.id, this.table.id);
|
|
4036
4048
|
},
|
|
4037
4049
|
onchange: function(t) {
|
|
4038
4050
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -4045,7 +4057,7 @@ const ki = {
|
|
|
4045
4057
|
}
|
|
4046
4058
|
},
|
|
4047
4059
|
onSpaceChange_: function(t) {
|
|
4048
|
-
const e =
|
|
4060
|
+
const e = _e(t);
|
|
4049
4061
|
if (!e) {
|
|
4050
4062
|
console.assert(!1);
|
|
4051
4063
|
return;
|
|
@@ -4063,13 +4075,13 @@ const ki = {
|
|
|
4063
4075
|
return;
|
|
4064
4076
|
}
|
|
4065
4077
|
const n = e.id !== this.table.id;
|
|
4066
|
-
if (this.table.id = e.id, this.table.name = e.name, n || !
|
|
4067
|
-
const o =
|
|
4078
|
+
if (this.table.id = e.id, this.table.name = e.name, n || !vt(this.space.id, this.table.id, this.column.id)) {
|
|
4079
|
+
const o = ze(this.space.id, this.table.id)?.[0]?.id ?? "", i = this.getField("COLUMN");
|
|
4068
4080
|
i.getOptions(!1), i.setValue(o, !1), this.onColumnChange_(o);
|
|
4069
4081
|
}
|
|
4070
4082
|
},
|
|
4071
4083
|
onColumnChange_: function(t) {
|
|
4072
|
-
const e =
|
|
4084
|
+
const e = vt(this.space.id, this.table.id, t);
|
|
4073
4085
|
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_();
|
|
4074
4086
|
},
|
|
4075
4087
|
updateShape_: function() {
|
|
@@ -4088,16 +4100,15 @@ const ki = {
|
|
|
4088
4100
|
n && n.dispose();
|
|
4089
4101
|
else if (n)
|
|
4090
4102
|
return;
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
i === "string" ? o = ue(this.workspace, "") : i === "integer" ? o = ke(this.workspace, 0) : i === "float" ? o = ke(this.workspace, 0) : i === "boolean" ? o = rt(this.workspace, !1) : i === "enum" ? o = ue(this.workspace, "") : i === "dateTime" && (o = ue(this.workspace, "")), o && (e.setCheck(null), e.connect(o.outputConnection));
|
|
4103
|
+
const o = Rt(this.workspace, this.column.type);
|
|
4104
|
+
o && (e.setCheck(null), e.connect(o.outputConnection));
|
|
4094
4105
|
},
|
|
4095
4106
|
updateCheck_: function() {
|
|
4096
4107
|
const { type: t } = this.column, e = this.getInput("VALUE");
|
|
4097
4108
|
t === "string" ? e.setCheck("String") : t === "integer" || t === "float" ? e.setCheck("Number") : t === "boolean" ? e.setCheck("Boolean") : t === "enum" || t === "dateTime" ? e.setCheck("String") : e.setCheck(null);
|
|
4098
4109
|
},
|
|
4099
4110
|
checkWarning_: function() {
|
|
4100
|
-
const t =
|
|
4111
|
+
const t = _e(this.space.id);
|
|
4101
4112
|
if (!t) {
|
|
4102
4113
|
this.setWarningText(_.WARN_SPACE_NOT_FOUND);
|
|
4103
4114
|
return;
|
|
@@ -4109,7 +4120,7 @@ const ki = {
|
|
|
4109
4120
|
return;
|
|
4110
4121
|
}
|
|
4111
4122
|
e.name !== this.table.name && (this.table.name = e.name);
|
|
4112
|
-
const n =
|
|
4123
|
+
const n = vt(
|
|
4113
4124
|
this.space.id,
|
|
4114
4125
|
this.table.id,
|
|
4115
4126
|
this.column.id
|
|
@@ -4125,7 +4136,7 @@ const ki = {
|
|
|
4125
4136
|
this.setWarningText(null);
|
|
4126
4137
|
}
|
|
4127
4138
|
};
|
|
4128
|
-
d.cond_atomic_v1 =
|
|
4139
|
+
d.cond_atomic_v1 = Li;
|
|
4129
4140
|
s.forBlock.cond_atomic_v1 = function(t) {
|
|
4130
4141
|
const e = s.quote_, n = t, o = n.column.name, i = s.valueToCode(n, "VALUE", c.ATOMIC) || null, l = {
|
|
4131
4142
|
EQ: "=",
|
|
@@ -4137,19 +4148,19 @@ s.forBlock.cond_atomic_v1 = function(t) {
|
|
|
4137
4148
|
}[n.getFieldValue("OP")];
|
|
4138
4149
|
return [`{type:'ATOMIC',key:${e(o)},value:${i},operator:${e(l)}}`, c.ATOMIC];
|
|
4139
4150
|
};
|
|
4140
|
-
const
|
|
4151
|
+
const Si = {
|
|
4141
4152
|
init: function() {
|
|
4142
4153
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
4143
4154
|
}
|
|
4144
4155
|
};
|
|
4145
|
-
d.cond_logic_container_v1 =
|
|
4146
|
-
const
|
|
4156
|
+
d.cond_logic_container_v1 = Si;
|
|
4157
|
+
const bi = {
|
|
4147
4158
|
init: function() {
|
|
4148
4159
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
4149
4160
|
}
|
|
4150
4161
|
};
|
|
4151
|
-
d.cond_logic_item_v1 =
|
|
4152
|
-
const
|
|
4162
|
+
d.cond_logic_item_v1 = bi;
|
|
4163
|
+
const Bi = {
|
|
4153
4164
|
init: function() {
|
|
4154
4165
|
this.itemCount_ = 1, this.appendValueInput("VALUE").setCheck("Condition").appendField(
|
|
4155
4166
|
new m([
|
|
@@ -4158,7 +4169,7 @@ const Ni = {
|
|
|
4158
4169
|
]),
|
|
4159
4170
|
"TYPE"
|
|
4160
4171
|
), this.setMutator(
|
|
4161
|
-
new
|
|
4172
|
+
new fe.MutatorIcon(
|
|
4162
4173
|
["cond_logic_item_v1"],
|
|
4163
4174
|
this
|
|
4164
4175
|
)
|
|
@@ -4223,7 +4234,7 @@ const Ni = {
|
|
|
4223
4234
|
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setCheck("Condition");
|
|
4224
4235
|
}
|
|
4225
4236
|
};
|
|
4226
|
-
d.cond_logic_v1 =
|
|
4237
|
+
d.cond_logic_v1 = Bi;
|
|
4227
4238
|
s.forBlock.cond_logic_v1 = function(t) {
|
|
4228
4239
|
const e = s.quote_, n = t, o = n.getFieldValue("TYPE"), i = [], a = s.valueToCode(n, "VALUE", c.ATOMIC) || null;
|
|
4229
4240
|
i.push(a);
|
|
@@ -4233,7 +4244,7 @@ s.forBlock.cond_logic_v1 = function(t) {
|
|
|
4233
4244
|
}
|
|
4234
4245
|
return [`{type:${e(o)},entries:[${i}]}`, c.ATOMIC];
|
|
4235
4246
|
};
|
|
4236
|
-
function
|
|
4247
|
+
function Ri(t) {
|
|
4237
4248
|
const e = t.getInput("TABLE").connection;
|
|
4238
4249
|
if (e.targetBlock())
|
|
4239
4250
|
return;
|
|
@@ -4252,11 +4263,11 @@ function Li(t) {
|
|
|
4252
4263
|
}, a = $.blocks.append(i, t.workspace);
|
|
4253
4264
|
e.connect(a.outputConnection);
|
|
4254
4265
|
}
|
|
4255
|
-
function
|
|
4266
|
+
function Di(t) {
|
|
4256
4267
|
const e = t.getInput("CONDITION").connection;
|
|
4257
4268
|
if (e.targetBlock())
|
|
4258
4269
|
return;
|
|
4259
|
-
const n = J()?.[0], o = H(n?.id ?? "")?.[0], i =
|
|
4270
|
+
const n = J()?.[0], o = H(n?.id ?? "")?.[0], i = ze(n?.id, o?.id)?.[0], a = {
|
|
4260
4271
|
type: "cond_atomic_v1",
|
|
4261
4272
|
extraState: {
|
|
4262
4273
|
space: {
|
|
@@ -4277,7 +4288,7 @@ function Si(t) {
|
|
|
4277
4288
|
}, l = $.blocks.append(a, t.workspace);
|
|
4278
4289
|
e.connect(l.outputConnection);
|
|
4279
4290
|
}
|
|
4280
|
-
function
|
|
4291
|
+
function Ui(t) {
|
|
4281
4292
|
const e = t.getInput("HANDLE").connection;
|
|
4282
4293
|
if (e.targetBlock())
|
|
4283
4294
|
return;
|
|
@@ -4301,7 +4312,7 @@ function bi(t) {
|
|
|
4301
4312
|
}, o = $.blocks.append(n, t.workspace);
|
|
4302
4313
|
e.connect(o.previousConnection);
|
|
4303
4314
|
}
|
|
4304
|
-
const
|
|
4315
|
+
const Mi = {
|
|
4305
4316
|
init: function() {
|
|
4306
4317
|
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}");
|
|
4307
4318
|
},
|
|
@@ -4317,13 +4328,13 @@ const Bi = {
|
|
|
4317
4328
|
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"));
|
|
4318
4329
|
},
|
|
4319
4330
|
ensureBlocks_: function() {
|
|
4320
|
-
this.isInsertionMarker() || (
|
|
4331
|
+
this.isInsertionMarker() || (Ri(this), Di(this), F(this, [
|
|
4321
4332
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
4322
4333
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0]
|
|
4323
|
-
]),
|
|
4334
|
+
]), Ui(this));
|
|
4324
4335
|
}
|
|
4325
4336
|
};
|
|
4326
|
-
d.delete_data_v1 =
|
|
4337
|
+
d.delete_data_v1 = Mi;
|
|
4327
4338
|
s.forBlock.delete_data_v1 = function(t) {
|
|
4328
4339
|
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");
|
|
4329
4340
|
return `{
|
|
@@ -4361,7 +4372,7 @@ s.forBlock.interrupt_transaction_v1 = function(t) {
|
|
|
4361
4372
|
return `throw ${s.valueToCode(t, "VALUE", c.NONE) || "''"};
|
|
4362
4373
|
`;
|
|
4363
4374
|
};
|
|
4364
|
-
function
|
|
4375
|
+
function Pi(t) {
|
|
4365
4376
|
const e = t.getInput("TABLE").connection;
|
|
4366
4377
|
if (e.targetBlock())
|
|
4367
4378
|
return;
|
|
@@ -4395,7 +4406,7 @@ function Ri(t) {
|
|
|
4395
4406
|
}, l = $.blocks.append(a, t.workspace);
|
|
4396
4407
|
e.connect(l.outputConnection);
|
|
4397
4408
|
}
|
|
4398
|
-
function
|
|
4409
|
+
function Vi(t) {
|
|
4399
4410
|
const e = t.getInput("CONDITION").connection;
|
|
4400
4411
|
if (e.targetBlock())
|
|
4401
4412
|
return;
|
|
@@ -4404,7 +4415,7 @@ function Di(t) {
|
|
|
4404
4415
|
}, o = $.blocks.append(n, t.workspace);
|
|
4405
4416
|
e.connect(o.outputConnection);
|
|
4406
4417
|
}
|
|
4407
|
-
function
|
|
4418
|
+
function xi(t) {
|
|
4408
4419
|
const e = t.getInput("EXTRA").connection;
|
|
4409
4420
|
if (e.targetBlock())
|
|
4410
4421
|
return;
|
|
@@ -4441,7 +4452,7 @@ function Ui(t) {
|
|
|
4441
4452
|
}, o = $.blocks.append(n, t.workspace);
|
|
4442
4453
|
e.connect(o.outputConnection);
|
|
4443
4454
|
}
|
|
4444
|
-
function
|
|
4455
|
+
function Fi(t) {
|
|
4445
4456
|
const e = t.getInput("HANDLE").connection;
|
|
4446
4457
|
if (e.targetBlock())
|
|
4447
4458
|
return;
|
|
@@ -4479,7 +4490,7 @@ h([
|
|
|
4479
4490
|
style: "procedure_blocks"
|
|
4480
4491
|
}
|
|
4481
4492
|
]);
|
|
4482
|
-
const
|
|
4493
|
+
const Yi = {
|
|
4483
4494
|
init: function() {
|
|
4484
4495
|
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}");
|
|
4485
4496
|
},
|
|
@@ -4495,15 +4506,15 @@ const Pi = {
|
|
|
4495
4506
|
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"));
|
|
4496
4507
|
},
|
|
4497
4508
|
ensureBlocks_: function() {
|
|
4498
|
-
this.isInsertionMarker() || (
|
|
4509
|
+
this.isInsertionMarker() || (Pi(this), Vi(this), xi(this), F(this, [
|
|
4499
4510
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
4500
4511
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
4501
4512
|
["MAIN_DATA", "__mainData__", "PARAM_MAIN_DATA", !0],
|
|
4502
4513
|
["EXTRA_DATA", "__extraData__", "PARAM_EXTRA_DATA", !0]
|
|
4503
|
-
]),
|
|
4514
|
+
]), Fi(this));
|
|
4504
4515
|
}
|
|
4505
4516
|
};
|
|
4506
|
-
d.query_data_v1 =
|
|
4517
|
+
d.query_data_v1 = Yi;
|
|
4507
4518
|
s.forBlock.query_data_v1 = function(t) {
|
|
4508
4519
|
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");
|
|
4509
4520
|
return `{
|
|
@@ -4576,19 +4587,19 @@ s.forBlock.query_extra_sortby_v1 = function(t) {
|
|
|
4576
4587
|
const e = s.valueToCode(t, "COLUMN", c.ATOMIC) || "''", n = s.valueToCode(t, "DESC", c.ATOMIC) || !1;
|
|
4577
4588
|
return [`{type:'sortby',value:${e},value2:${n}}`, c.ATOMIC];
|
|
4578
4589
|
};
|
|
4579
|
-
const
|
|
4590
|
+
const wi = {
|
|
4580
4591
|
init: function() {
|
|
4581
4592
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4582
4593
|
}
|
|
4583
4594
|
};
|
|
4584
|
-
d.select_column_container_v1 =
|
|
4585
|
-
const
|
|
4595
|
+
d.select_column_container_v1 = wi;
|
|
4596
|
+
const Ki = {
|
|
4586
4597
|
init: function() {
|
|
4587
4598
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4588
4599
|
}
|
|
4589
4600
|
};
|
|
4590
|
-
d.select_column_item_v1 =
|
|
4591
|
-
const
|
|
4601
|
+
d.select_column_item_v1 = Ki;
|
|
4602
|
+
const $i = {
|
|
4592
4603
|
init: function() {
|
|
4593
4604
|
this.space = {
|
|
4594
4605
|
id: "",
|
|
@@ -4598,7 +4609,7 @@ const Fi = {
|
|
|
4598
4609
|
name: "",
|
|
4599
4610
|
columns: []
|
|
4600
4611
|
}, this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_DATA_V1_SELECT_COLUMN_TITLE}").appendField(new m(() => this.genSpaceOpts_()), "SPACE").appendField(new m(() => this.genTableOpts_()), "TABLE"), this.setMutator(
|
|
4601
|
-
new
|
|
4612
|
+
new fe.MutatorIcon(
|
|
4602
4613
|
["select_column_item_v1"],
|
|
4603
4614
|
this
|
|
4604
4615
|
)
|
|
@@ -4633,10 +4644,10 @@ const Fi = {
|
|
|
4633
4644
|
}, 0);
|
|
4634
4645
|
},
|
|
4635
4646
|
genSpaceOpts_: function() {
|
|
4636
|
-
return
|
|
4647
|
+
return lt();
|
|
4637
4648
|
},
|
|
4638
4649
|
genTableOpts_: function() {
|
|
4639
|
-
return
|
|
4650
|
+
return ut(this.space.id);
|
|
4640
4651
|
},
|
|
4641
4652
|
genColumnOpts_: function() {
|
|
4642
4653
|
const t = [];
|
|
@@ -4667,7 +4678,7 @@ const Fi = {
|
|
|
4667
4678
|
}
|
|
4668
4679
|
},
|
|
4669
4680
|
onSpaceChange_: function(t) {
|
|
4670
|
-
const e =
|
|
4681
|
+
const e = _e(t);
|
|
4671
4682
|
if (!e) {
|
|
4672
4683
|
console.assert(!1);
|
|
4673
4684
|
return;
|
|
@@ -4748,7 +4759,7 @@ const Fi = {
|
|
|
4748
4759
|
initShape_: function() {
|
|
4749
4760
|
if (!this.isInFlyout && !this.getInput("ADD0"))
|
|
4750
4761
|
for (let t = 0; t < this.table.columns.length; t++) {
|
|
4751
|
-
const e = this.table.columns[t], n = new m(() => this.genColumnOpts_()), o = new
|
|
4762
|
+
const e = this.table.columns[t], n = new m(() => this.genColumnOpts_()), o = new ue("");
|
|
4752
4763
|
this.appendDummyInput("ADD" + t).setAlign(k.Align.RIGHT).appendField(n, "COLUMN" + t).appendField("%{BKY_DATA_AS}").appendField(o, "ALIAS" + t), n.setValue(e.id, !1), o.setValue(e.name, !1);
|
|
4753
4764
|
}
|
|
4754
4765
|
},
|
|
@@ -4758,14 +4769,14 @@ const Fi = {
|
|
|
4758
4769
|
for (let t = 0; t < this.itemCount_; t++) {
|
|
4759
4770
|
if (this.getInput("ADD" + t))
|
|
4760
4771
|
continue;
|
|
4761
|
-
const e = new m(() => this.genColumnOpts_()), n = new
|
|
4772
|
+
const e = new m(() => this.genColumnOpts_()), n = new ue("");
|
|
4762
4773
|
this.appendDummyInput("ADD" + t).setAlign(k.Align.RIGHT).appendField(e, "COLUMN" + t).appendField("%{BKY_DATA_AS}").appendField(n, "ALIAS" + t);
|
|
4763
4774
|
const o = this.table.columns[0];
|
|
4764
4775
|
e.setValue(o.id ?? "", !1), n.setValue(o.name ?? "", !1);
|
|
4765
4776
|
}
|
|
4766
4777
|
},
|
|
4767
4778
|
checkWarning_: function() {
|
|
4768
|
-
const t =
|
|
4779
|
+
const t = _e(this.space.id);
|
|
4769
4780
|
if (!t) {
|
|
4770
4781
|
this.setWarningText(_.WARN_SPACE_NOT_FOUND);
|
|
4771
4782
|
return;
|
|
@@ -4783,7 +4794,7 @@ const Fi = {
|
|
|
4783
4794
|
this.setWarningText(null);
|
|
4784
4795
|
}
|
|
4785
4796
|
};
|
|
4786
|
-
d.select_column_v1 =
|
|
4797
|
+
d.select_column_v1 = $i;
|
|
4787
4798
|
s.forBlock.select_column_v1 = function(t) {
|
|
4788
4799
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
4789
4800
|
for (let r = 0; r < n.itemCount_; r++) {
|
|
@@ -4795,7 +4806,7 @@ s.forBlock.select_column_v1 = function(t) {
|
|
|
4795
4806
|
I !== 0 && (l += ","), l += `{name:${e(r)},alias:${e(p)}}`;
|
|
4796
4807
|
}), l += "]", [`{spaceid:${e(o)},tableid:${e(i)},columns:${l}}`, c.ATOMIC];
|
|
4797
4808
|
};
|
|
4798
|
-
const
|
|
4809
|
+
const Hi = {
|
|
4799
4810
|
init: function() {
|
|
4800
4811
|
this.space = {
|
|
4801
4812
|
id: "",
|
|
@@ -4831,10 +4842,10 @@ const wi = {
|
|
|
4831
4842
|
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_();
|
|
4832
4843
|
},
|
|
4833
4844
|
genSpaceOpts_: function() {
|
|
4834
|
-
return
|
|
4845
|
+
return lt();
|
|
4835
4846
|
},
|
|
4836
4847
|
genTableOpts_: function() {
|
|
4837
|
-
return
|
|
4848
|
+
return ut(this.space.id);
|
|
4838
4849
|
},
|
|
4839
4850
|
onchange: function(t) {
|
|
4840
4851
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -4849,7 +4860,7 @@ const wi = {
|
|
|
4849
4860
|
}
|
|
4850
4861
|
},
|
|
4851
4862
|
onSpaceChange_: function(t) {
|
|
4852
|
-
const e =
|
|
4863
|
+
const e = _e(t);
|
|
4853
4864
|
if (!e) {
|
|
4854
4865
|
console.assert(!1);
|
|
4855
4866
|
return;
|
|
@@ -4869,7 +4880,7 @@ const wi = {
|
|
|
4869
4880
|
this.table.id = e.id, this.table.name = e.name;
|
|
4870
4881
|
},
|
|
4871
4882
|
checkWarning_: function() {
|
|
4872
|
-
const t =
|
|
4883
|
+
const t = _e(this.space.id);
|
|
4873
4884
|
if (!t) {
|
|
4874
4885
|
this.setWarningText(_.WARN_SPACE_NOT_FOUND);
|
|
4875
4886
|
return;
|
|
@@ -4883,12 +4894,12 @@ const wi = {
|
|
|
4883
4894
|
e.name !== this.table.name && (this.table.name = e.name), this.setWarningText(null);
|
|
4884
4895
|
}
|
|
4885
4896
|
};
|
|
4886
|
-
d.select_table_v1 =
|
|
4897
|
+
d.select_table_v1 = Hi;
|
|
4887
4898
|
s.forBlock.select_table_v1 = function(t) {
|
|
4888
4899
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id;
|
|
4889
4900
|
return [`{spaceid:${e(o)},tableid:${e(i)}}`, c.ATOMIC];
|
|
4890
4901
|
};
|
|
4891
|
-
const
|
|
4902
|
+
const Gi = {
|
|
4892
4903
|
init: function() {
|
|
4893
4904
|
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}");
|
|
4894
4905
|
},
|
|
@@ -4910,9 +4921,9 @@ const Yi = {
|
|
|
4910
4921
|
]);
|
|
4911
4922
|
}
|
|
4912
4923
|
};
|
|
4913
|
-
d.transaction_v1 =
|
|
4924
|
+
d.transaction_v1 = Gi;
|
|
4914
4925
|
s.forBlock.transaction_v1 = function(t) {
|
|
4915
|
-
const e = s.INDENT, n = t, o =
|
|
4926
|
+
const e = s.INDENT, n = t, o = bo(n), i = s.statementToCode(n, "HANDLE"), a = s.statementToCode(n, "FINALLY");
|
|
4916
4927
|
return `{
|
|
4917
4928
|
${e}var __error${o}__ = '';
|
|
4918
4929
|
${e}var __txExist${o}__ = typeof(__tx__) !== 'undefined';
|
|
@@ -4954,19 +4965,19 @@ ${e}}
|
|
|
4954
4965
|
}
|
|
4955
4966
|
`;
|
|
4956
4967
|
};
|
|
4957
|
-
const
|
|
4968
|
+
const Wi = {
|
|
4958
4969
|
init: function() {
|
|
4959
4970
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4960
4971
|
}
|
|
4961
4972
|
};
|
|
4962
|
-
d.update_column_container_v1 =
|
|
4963
|
-
const
|
|
4973
|
+
d.update_column_container_v1 = Wi;
|
|
4974
|
+
const ji = {
|
|
4964
4975
|
init: function() {
|
|
4965
4976
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4966
4977
|
}
|
|
4967
4978
|
};
|
|
4968
|
-
d.update_column_item_v1 =
|
|
4969
|
-
const
|
|
4979
|
+
d.update_column_item_v1 = ji;
|
|
4980
|
+
const Xi = {
|
|
4970
4981
|
init: function() {
|
|
4971
4982
|
this.space = {
|
|
4972
4983
|
id: "",
|
|
@@ -4976,7 +4987,7 @@ const Hi = {
|
|
|
4976
4987
|
name: "",
|
|
4977
4988
|
columns: []
|
|
4978
4989
|
}, this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_DATA_V1_UPDATE_COLUMN_TITLE}").appendField(new m(() => this.genSpaceOpts_()), "SPACE").appendField(new m(() => this.genTableOpts_()), "TABLE"), this.setMutator(
|
|
4979
|
-
new
|
|
4990
|
+
new fe.MutatorIcon(
|
|
4980
4991
|
["update_column_item_v1"],
|
|
4981
4992
|
this
|
|
4982
4993
|
)
|
|
@@ -5011,10 +5022,10 @@ const Hi = {
|
|
|
5011
5022
|
}, 0);
|
|
5012
5023
|
},
|
|
5013
5024
|
genSpaceOpts_: function() {
|
|
5014
|
-
return
|
|
5025
|
+
return lt();
|
|
5015
5026
|
},
|
|
5016
5027
|
genTableOpts_: function() {
|
|
5017
|
-
return
|
|
5028
|
+
return ut(this.space.id);
|
|
5018
5029
|
},
|
|
5019
5030
|
genColumnOpts_: function() {
|
|
5020
5031
|
const t = [];
|
|
@@ -5045,7 +5056,7 @@ const Hi = {
|
|
|
5045
5056
|
}
|
|
5046
5057
|
},
|
|
5047
5058
|
onSpaceChange_: function(t) {
|
|
5048
|
-
const e =
|
|
5059
|
+
const e = _e(t);
|
|
5049
5060
|
if (!e) {
|
|
5050
5061
|
console.assert(!1);
|
|
5051
5062
|
return;
|
|
@@ -5079,7 +5090,7 @@ const Hi = {
|
|
|
5079
5090
|
}
|
|
5080
5091
|
const o = this.getInput("ADD" + t).connection, i = o.targetBlock();
|
|
5081
5092
|
i && i.dispose();
|
|
5082
|
-
const a =
|
|
5093
|
+
const a = Rt(this.workspace, n.type);
|
|
5083
5094
|
a && (o.setCheck(null), o.connect(a.outputConnection)), this.updateCheck_();
|
|
5084
5095
|
},
|
|
5085
5096
|
decompose: function(t) {
|
|
@@ -5163,7 +5174,7 @@ const Hi = {
|
|
|
5163
5174
|
const i = this.getFieldValue("COLUMN" + e), a = this.table.columns.find((u) => u.id === i);
|
|
5164
5175
|
if (!a)
|
|
5165
5176
|
continue;
|
|
5166
|
-
const l =
|
|
5177
|
+
const l = Rt(this.workspace, a.type);
|
|
5167
5178
|
l && (n.setCheck(null), n.connect(l.outputConnection));
|
|
5168
5179
|
}
|
|
5169
5180
|
},
|
|
@@ -5177,7 +5188,7 @@ const Hi = {
|
|
|
5177
5188
|
}
|
|
5178
5189
|
},
|
|
5179
5190
|
checkWarning_: function() {
|
|
5180
|
-
const t =
|
|
5191
|
+
const t = _e(this.space.id);
|
|
5181
5192
|
if (!t) {
|
|
5182
5193
|
this.setWarningText(_.WARN_SPACE_NOT_FOUND);
|
|
5183
5194
|
return;
|
|
@@ -5195,7 +5206,7 @@ const Hi = {
|
|
|
5195
5206
|
this.setWarningText(null);
|
|
5196
5207
|
}
|
|
5197
5208
|
};
|
|
5198
|
-
d.update_column_v1 =
|
|
5209
|
+
d.update_column_v1 = Xi;
|
|
5199
5210
|
s.forBlock.update_column_v1 = function(t) {
|
|
5200
5211
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
5201
5212
|
for (let r = 0; r < n.itemCount_; r++) {
|
|
@@ -5207,7 +5218,7 @@ s.forBlock.update_column_v1 = function(t) {
|
|
|
5207
5218
|
I !== 0 && (l += ","), l += `{name:${e(r)},value:${p}}`;
|
|
5208
5219
|
}), l += "]", [`{spaceid:${e(o)},tableid:${e(i)},columns:${l}}`, c.ATOMIC];
|
|
5209
5220
|
};
|
|
5210
|
-
function
|
|
5221
|
+
function Ji(t) {
|
|
5211
5222
|
const e = t.getInput("TABLE").connection;
|
|
5212
5223
|
if (e.targetBlock())
|
|
5213
5224
|
return;
|
|
@@ -5241,7 +5252,7 @@ function Gi(t) {
|
|
|
5241
5252
|
}, l = $.blocks.append(a, t.workspace);
|
|
5242
5253
|
e.connect(l.outputConnection);
|
|
5243
5254
|
}
|
|
5244
|
-
function
|
|
5255
|
+
function qi(t) {
|
|
5245
5256
|
const e = t.getInput("CONDITION").connection;
|
|
5246
5257
|
if (e.targetBlock())
|
|
5247
5258
|
return;
|
|
@@ -5250,7 +5261,7 @@ function Wi(t) {
|
|
|
5250
5261
|
}, o = $.blocks.append(n, t.workspace);
|
|
5251
5262
|
e.connect(o.outputConnection);
|
|
5252
5263
|
}
|
|
5253
|
-
function
|
|
5264
|
+
function Qi(t) {
|
|
5254
5265
|
const e = t.getInput("HANDLE").connection;
|
|
5255
5266
|
if (e.targetBlock())
|
|
5256
5267
|
return;
|
|
@@ -5274,7 +5285,7 @@ function ji(t) {
|
|
|
5274
5285
|
}, o = $.blocks.append(n, t.workspace);
|
|
5275
5286
|
e.connect(o.previousConnection);
|
|
5276
5287
|
}
|
|
5277
|
-
const
|
|
5288
|
+
const zi = {
|
|
5278
5289
|
init: function() {
|
|
5279
5290
|
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}");
|
|
5280
5291
|
},
|
|
@@ -5290,14 +5301,14 @@ const Xi = {
|
|
|
5290
5301
|
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"));
|
|
5291
5302
|
},
|
|
5292
5303
|
ensureBlocks: function() {
|
|
5293
|
-
this.isInsertionMarker() || (
|
|
5304
|
+
this.isInsertionMarker() || (Ji(this), qi(this), F(this, [
|
|
5294
5305
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
5295
5306
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
5296
5307
|
["DATA", "__data__", "PARAM_DATA", !0]
|
|
5297
|
-
]),
|
|
5308
|
+
]), Qi(this));
|
|
5298
5309
|
}
|
|
5299
5310
|
};
|
|
5300
|
-
d.update_data_v1 =
|
|
5311
|
+
d.update_data_v1 = zi;
|
|
5301
5312
|
s.forBlock.update_data_v1 = function(t) {
|
|
5302
5313
|
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");
|
|
5303
5314
|
return `{
|
|
@@ -5314,20 +5325,20 @@ ${e}}
|
|
|
5314
5325
|
${i}}
|
|
5315
5326
|
`;
|
|
5316
5327
|
};
|
|
5317
|
-
const
|
|
5328
|
+
const Zi = v.xml, es = {
|
|
5318
5329
|
init: function() {
|
|
5319
5330
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(k.Align.CENTRE).appendField(
|
|
5320
|
-
new z(
|
|
5331
|
+
new z(ge, 20, 20, void 0, () => {
|
|
5321
5332
|
this.isInFlyout || this.addEntry_();
|
|
5322
5333
|
})
|
|
5323
5334
|
), this.appendDummyInput("CLOSE_BRACKET").appendField(" ] "), this.setInputsInline(!1), this.setOutput(!0, "JsonArray"), this.setColour(350), this.setTooltip(""), this.setHelpUrl("");
|
|
5324
5335
|
},
|
|
5325
5336
|
mutationToDom: function() {
|
|
5326
|
-
const t =
|
|
5337
|
+
const t = Zi.createElement("mutation");
|
|
5327
5338
|
return t.setAttribute("items", String(this.length)), t;
|
|
5328
5339
|
},
|
|
5329
5340
|
domToMutation: function(t) {
|
|
5330
|
-
this.length =
|
|
5341
|
+
this.length = be(t.getAttribute("items") ?? "", 0), this.initShape_();
|
|
5331
5342
|
},
|
|
5332
5343
|
initData: function(t) {
|
|
5333
5344
|
this.length = t, this.initShape_();
|
|
@@ -5336,11 +5347,11 @@ const Ji = v.xml, qi = {
|
|
|
5336
5347
|
for (let t = 0; t < this.length; t++) {
|
|
5337
5348
|
const e = "ENTRY" + t, n = this.appendValueInput(e);
|
|
5338
5349
|
n.appendField(
|
|
5339
|
-
new z(
|
|
5350
|
+
new z(ge, 20, 20, void 0, () => {
|
|
5340
5351
|
this.isInFlyout || this.addEntry_(n);
|
|
5341
5352
|
})
|
|
5342
|
-
), n.appendField(new
|
|
5343
|
-
new z(
|
|
5353
|
+
), n.appendField(new Zt(String(t))), n.appendField(
|
|
5354
|
+
new z(Xe, 20, 20, void 0, () => {
|
|
5344
5355
|
this.isInFlyout || this.removeEntry_(n);
|
|
5345
5356
|
})
|
|
5346
5357
|
), this.moveInputBefore(e, "ADD");
|
|
@@ -5348,18 +5359,18 @@ const Ji = v.xml, qi = {
|
|
|
5348
5359
|
},
|
|
5349
5360
|
addEntry_: function(t) {
|
|
5350
5361
|
let e = this.length;
|
|
5351
|
-
t && (e =
|
|
5362
|
+
t && (e = be(t.name.substring(5)));
|
|
5352
5363
|
for (let o = this.length - 1; o >= e; o--) {
|
|
5353
5364
|
const i = this.getInput("ENTRY" + o);
|
|
5354
5365
|
i.name = "ENTRY" + (o + 1), i.fieldRow[1].setValue(o + 1);
|
|
5355
5366
|
}
|
|
5356
5367
|
const n = this.appendValueInput("ENTRY" + e);
|
|
5357
5368
|
n.appendField(
|
|
5358
|
-
new z(
|
|
5369
|
+
new z(ge, 20, 20, void 0, () => {
|
|
5359
5370
|
this.isInFlyout || this.addEntry_(n);
|
|
5360
5371
|
})
|
|
5361
|
-
), n.appendField(new
|
|
5362
|
-
new z(
|
|
5372
|
+
), n.appendField(new Zt(String(e))), n.appendField(
|
|
5373
|
+
new z(Xe, 20, 20, void 0, () => {
|
|
5363
5374
|
this.isInFlyout || this.removeEntry_(n);
|
|
5364
5375
|
})
|
|
5365
5376
|
), e === this.length ? this.moveInputBefore("ENTRY" + e, "ADD") : this.moveInputBefore("ENTRY" + e, "ENTRY" + (e + 1)), this.length++;
|
|
@@ -5367,7 +5378,7 @@ const Ji = v.xml, qi = {
|
|
|
5367
5378
|
removeEntry_: function(t) {
|
|
5368
5379
|
const e = t.name, n = this.getInputTargetBlock(e);
|
|
5369
5380
|
n && n.dispose(), this.removeInput(e);
|
|
5370
|
-
const o =
|
|
5381
|
+
const o = be(e.substring(5));
|
|
5371
5382
|
for (let i = o + 1; i < this.length; i++) {
|
|
5372
5383
|
const a = this.getInput("ENTRY" + i);
|
|
5373
5384
|
a.name = "ENTRY" + (i - 1), a.fieldRow[1].setValue(i - 1);
|
|
@@ -5375,11 +5386,11 @@ const Ji = v.xml, qi = {
|
|
|
5375
5386
|
this.length--;
|
|
5376
5387
|
}
|
|
5377
5388
|
};
|
|
5378
|
-
d.json_array_v1 =
|
|
5379
|
-
const
|
|
5389
|
+
d.json_array_v1 = es;
|
|
5390
|
+
const ts = {
|
|
5380
5391
|
init: function() {
|
|
5381
5392
|
this.appendDummyInput().appendField(
|
|
5382
|
-
new
|
|
5393
|
+
new pn([
|
|
5383
5394
|
["false", "false"],
|
|
5384
5395
|
["true", "true"]
|
|
5385
5396
|
]),
|
|
@@ -5387,19 +5398,19 @@ const Qi = {
|
|
|
5387
5398
|
), this.setOutput(!0, "JsonBoolean"), this.setColour(210);
|
|
5388
5399
|
}
|
|
5389
5400
|
};
|
|
5390
|
-
d.json_boolean_v1 =
|
|
5391
|
-
const
|
|
5401
|
+
d.json_boolean_v1 = ts;
|
|
5402
|
+
const an = v.xml, ns = {
|
|
5392
5403
|
init: function() {
|
|
5393
5404
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(k.Align.CENTRE).appendField(
|
|
5394
|
-
new z(
|
|
5405
|
+
new z(ge, 20, 20, void 0, () => {
|
|
5395
5406
|
this.isInFlyout || this.addEntry_();
|
|
5396
5407
|
})
|
|
5397
5408
|
), this.appendDummyInput("CLOSE_BRACHET").appendField(" } "), this.setInputsInline(!1), this.setOutput(!0, "JsonMap"), this.setColour(120), this.setTooltip(""), this.setHelpUrl("");
|
|
5398
5409
|
},
|
|
5399
5410
|
mutationToDom: function() {
|
|
5400
|
-
const t =
|
|
5411
|
+
const t = an.createElement("mutation");
|
|
5401
5412
|
for (let e = 0; e < this.length; e++) {
|
|
5402
|
-
const n =
|
|
5413
|
+
const n = an.createElement("item");
|
|
5403
5414
|
n.setAttribute("key", this.getFieldValue("KEY" + e)), t.appendChild(n);
|
|
5404
5415
|
}
|
|
5405
5416
|
return t;
|
|
@@ -5419,11 +5430,11 @@ const ln = v.xml, zi = {
|
|
|
5419
5430
|
for (let e = 0; e < t.length; e++) {
|
|
5420
5431
|
const n = t[e], o = "ENTRY" + e, i = this.appendValueInput(o);
|
|
5421
5432
|
i.appendField(
|
|
5422
|
-
new z(
|
|
5433
|
+
new z(ge, 20, 20, void 0, () => {
|
|
5423
5434
|
this.isInFlyout || this.addEntry_(i);
|
|
5424
5435
|
})
|
|
5425
|
-
), i.appendField(new
|
|
5426
|
-
new z(
|
|
5436
|
+
), i.appendField(new ue(n), "KEY" + e), i.appendField(
|
|
5437
|
+
new z(Xe, 20, 20, void 0, () => {
|
|
5427
5438
|
this.isInFlyout || this.removeEntry_(i);
|
|
5428
5439
|
})
|
|
5429
5440
|
), this.moveInputBefore(o, "ADD");
|
|
@@ -5431,16 +5442,16 @@ const ln = v.xml, zi = {
|
|
|
5431
5442
|
},
|
|
5432
5443
|
addEntry_: function(t) {
|
|
5433
5444
|
let e = this.length;
|
|
5434
|
-
t && (e =
|
|
5445
|
+
t && (e = be(t.name.substring(5)));
|
|
5435
5446
|
for (let o = this.length - 1; o >= e; o--)
|
|
5436
5447
|
this.getField("KEY" + o).name = "KEY" + (o + 1), this.getInput("ENTRY" + o).name = "ENTRY" + (o + 1);
|
|
5437
5448
|
const n = this.appendValueInput("ENTRY" + e);
|
|
5438
5449
|
n.appendField(
|
|
5439
|
-
new z(
|
|
5450
|
+
new z(ge, 20, 20, void 0, () => {
|
|
5440
5451
|
this.isInFlyout || this.addEntry_(n);
|
|
5441
5452
|
})
|
|
5442
|
-
), n.appendField(new
|
|
5443
|
-
new z(
|
|
5453
|
+
), n.appendField(new ue("key"), "KEY" + e), n.appendField(
|
|
5454
|
+
new z(Xe, 20, 20, void 0, () => {
|
|
5444
5455
|
this.isInFlyout || this.removeEntry_(n);
|
|
5445
5456
|
})
|
|
5446
5457
|
), e === this.length ? this.moveInputBefore("ENTRY" + e, "ADD") : this.moveInputBefore("ENTRY" + e, "ENTRY" + (e + 1)), this.length++;
|
|
@@ -5448,54 +5459,54 @@ const ln = v.xml, zi = {
|
|
|
5448
5459
|
removeEntry_: function(t) {
|
|
5449
5460
|
const e = t.name, n = this.getInputTargetBlock(e);
|
|
5450
5461
|
n && n.dispose(), this.removeInput(e);
|
|
5451
|
-
const o =
|
|
5462
|
+
const o = be(e.substring(5));
|
|
5452
5463
|
for (let i = o + 1; i < this.length; i++)
|
|
5453
5464
|
this.getField("KEY" + i).name = "KEY" + (i - 1), this.getInput("ENTRY" + i).name = "ENTRY" + (i - 1);
|
|
5454
5465
|
this.length--;
|
|
5455
5466
|
}
|
|
5456
5467
|
};
|
|
5457
|
-
d.json_map_v1 =
|
|
5458
|
-
const
|
|
5468
|
+
d.json_map_v1 = ns;
|
|
5469
|
+
const os = {
|
|
5459
5470
|
init: function() {
|
|
5460
|
-
this.appendDummyInput().appendField(new
|
|
5471
|
+
this.appendDummyInput().appendField(new St(0), "VALUE"), this.setOutput(!0, "JsonNumber"), this.setColour(230);
|
|
5461
5472
|
}
|
|
5462
5473
|
};
|
|
5463
|
-
d.json_number_v1 =
|
|
5464
|
-
const
|
|
5474
|
+
d.json_number_v1 = os;
|
|
5475
|
+
const is = {
|
|
5465
5476
|
init: function() {
|
|
5466
5477
|
this.appendDummyInput().setAlign(k.Align.CENTRE).appendField("JSON"), this.appendValueInput("JSON").setCheck(["JsonMap", "JsonArray"]), this.setDeletable(!1), this.setColour(250), this.setTooltip(""), this.setHelpUrl("");
|
|
5467
5478
|
}
|
|
5468
5479
|
};
|
|
5469
|
-
d.json_root_v1 =
|
|
5470
|
-
const
|
|
5480
|
+
d.json_root_v1 = is;
|
|
5481
|
+
const ss = {
|
|
5471
5482
|
init: function() {
|
|
5472
|
-
this.appendDummyInput().appendField('"').appendField(new
|
|
5483
|
+
this.appendDummyInput().appendField('"').appendField(new ue(""), "VALUE").appendField('"'), this.setOutput(!0, "JsonString"), this.setColour(160);
|
|
5473
5484
|
}
|
|
5474
5485
|
};
|
|
5475
|
-
d.json_string_v1 =
|
|
5476
|
-
const
|
|
5486
|
+
d.json_string_v1 = ss;
|
|
5487
|
+
const as = v.xml, cs = {
|
|
5477
5488
|
init: function() {
|
|
5478
5489
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5479
5490
|
}
|
|
5480
5491
|
};
|
|
5481
|
-
d.list_create_container_v1 =
|
|
5482
|
-
const
|
|
5492
|
+
d.list_create_container_v1 = cs;
|
|
5493
|
+
const ls = {
|
|
5483
5494
|
init: function() {
|
|
5484
5495
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5485
5496
|
}
|
|
5486
5497
|
};
|
|
5487
|
-
d.list_create_item_v1 =
|
|
5488
|
-
const
|
|
5498
|
+
d.list_create_item_v1 = ls;
|
|
5499
|
+
const us = {
|
|
5489
5500
|
init: function() {
|
|
5490
5501
|
this.itemCount_ = 0, this.setMutator(
|
|
5491
|
-
new
|
|
5502
|
+
new fe.MutatorIcon(
|
|
5492
5503
|
["list_create_item_v1"],
|
|
5493
5504
|
this
|
|
5494
5505
|
)
|
|
5495
5506
|
), this.setOutput(!0, "Array"), this.setStyle("list_blocks"), this.setTooltip("%{BKY_LIST_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_LIST_V1_CREATE_HELPURL}");
|
|
5496
5507
|
},
|
|
5497
5508
|
mutationToDom: function() {
|
|
5498
|
-
const t =
|
|
5509
|
+
const t = as.createElement("mutation");
|
|
5499
5510
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
5500
5511
|
},
|
|
5501
5512
|
domToMutation: function(t) {
|
|
@@ -5568,7 +5579,7 @@ const ss = {
|
|
|
5568
5579
|
this.removeInput("ADD" + t);
|
|
5569
5580
|
}
|
|
5570
5581
|
};
|
|
5571
|
-
d.list_create_v1 =
|
|
5582
|
+
d.list_create_v1 = us;
|
|
5572
5583
|
s.forBlock.list_create_v1 = function(t) {
|
|
5573
5584
|
const e = t, n = new Array(e.itemCount_);
|
|
5574
5585
|
for (let i = 0; i < e.itemCount_; i++)
|
|
@@ -5784,7 +5795,7 @@ s.forBlock.list_set_v1 = function(t) {
|
|
|
5784
5795
|
return `${e}[${n}] = ${o};
|
|
5785
5796
|
`;
|
|
5786
5797
|
};
|
|
5787
|
-
const
|
|
5798
|
+
const rs = {
|
|
5788
5799
|
// logic_compare
|
|
5789
5800
|
EQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_EQ}",
|
|
5790
5801
|
NEQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_NEQ}",
|
|
@@ -5798,7 +5809,7 @@ const as = {
|
|
|
5798
5809
|
};
|
|
5799
5810
|
R.register(
|
|
5800
5811
|
"logic_op_tooltip_v1",
|
|
5801
|
-
R.buildTooltipForDropdown("OP",
|
|
5812
|
+
R.buildTooltipForDropdown("OP", rs)
|
|
5802
5813
|
);
|
|
5803
5814
|
h([
|
|
5804
5815
|
{
|
|
@@ -5823,7 +5834,7 @@ h([
|
|
|
5823
5834
|
s.forBlock.logic_boolean_v1 = function(t) {
|
|
5824
5835
|
return [t.getFieldValue("BOOL") === "TRUE" ? "true" : "false", c.ATOMIC];
|
|
5825
5836
|
};
|
|
5826
|
-
const
|
|
5837
|
+
const _s = {
|
|
5827
5838
|
onchange: function(t) {
|
|
5828
5839
|
this.prevBlocks_ || (this.prevBlocks_ = [null, null]);
|
|
5829
5840
|
const e = this.getInputTargetBlock("A"), n = this.getInputTargetBlock("B");
|
|
@@ -5843,7 +5854,7 @@ const cs = {
|
|
|
5843
5854
|
R.register(
|
|
5844
5855
|
"logic_compare_v1",
|
|
5845
5856
|
function() {
|
|
5846
|
-
this.mixin(
|
|
5857
|
+
this.mixin(_s);
|
|
5847
5858
|
}
|
|
5848
5859
|
);
|
|
5849
5860
|
h([
|
|
@@ -5893,7 +5904,7 @@ s.forBlock.logic_compare_v1 = function(t) {
|
|
|
5893
5904
|
const i = s.valueToCode(t, "A", o) || "0", a = s.valueToCode(t, "B", o) || "0";
|
|
5894
5905
|
return [`${i} ${n} ${a}`, o];
|
|
5895
5906
|
};
|
|
5896
|
-
const
|
|
5907
|
+
const ps = {
|
|
5897
5908
|
elseIfCount_: 0,
|
|
5898
5909
|
hasElse_: !1,
|
|
5899
5910
|
mutationToDom: function() {
|
|
@@ -6020,7 +6031,7 @@ const ls = {
|
|
|
6020
6031
|
};
|
|
6021
6032
|
R.registerMutator(
|
|
6022
6033
|
"logic_if_v1_mutator",
|
|
6023
|
-
|
|
6034
|
+
ps,
|
|
6024
6035
|
void 0,
|
|
6025
6036
|
["logic_if_else_if_v1", "logic_if_else_v1"]
|
|
6026
6037
|
);
|
|
@@ -6166,7 +6177,7 @@ s.forBlock.logic_operation_v1 = function(t) {
|
|
|
6166
6177
|
}
|
|
6167
6178
|
return [`${o} ${e} ${i}`, n];
|
|
6168
6179
|
};
|
|
6169
|
-
const
|
|
6180
|
+
const hs = {
|
|
6170
6181
|
prevParentConnection_: null,
|
|
6171
6182
|
onchange: function(t) {
|
|
6172
6183
|
const e = this.getInputTargetBlock("THEN"), n = this.getInputTargetBlock("ELSE"), o = this.outputConnection.targetConnection;
|
|
@@ -6181,7 +6192,7 @@ const us = {
|
|
|
6181
6192
|
this.prevParentConnection_ = o;
|
|
6182
6193
|
}
|
|
6183
6194
|
};
|
|
6184
|
-
R.registerMixin("logic_ternary_v1",
|
|
6195
|
+
R.registerMixin("logic_ternary_v1", hs);
|
|
6185
6196
|
h([
|
|
6186
6197
|
{
|
|
6187
6198
|
type: "logic_ternary_v1",
|
|
@@ -6218,7 +6229,7 @@ s.forBlock.logic_ternary_v1 = function(t) {
|
|
|
6218
6229
|
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";
|
|
6219
6230
|
return [e + " ? " + n + " : " + o, c.CONDITIONAL];
|
|
6220
6231
|
};
|
|
6221
|
-
const
|
|
6232
|
+
const ds = {
|
|
6222
6233
|
customContextMenu: function(t) {
|
|
6223
6234
|
if (this.isInFlyout)
|
|
6224
6235
|
return;
|
|
@@ -6233,14 +6244,14 @@ const rs = {
|
|
|
6233
6244
|
t.push({
|
|
6234
6245
|
enabled: !0,
|
|
6235
6246
|
text: _.VARIABLE_SET_CREATE_GET.replace("%1", o),
|
|
6236
|
-
callback:
|
|
6247
|
+
callback: hn.callbackFactory(this, i)
|
|
6237
6248
|
});
|
|
6238
6249
|
}
|
|
6239
6250
|
}
|
|
6240
6251
|
};
|
|
6241
6252
|
R.registerMixin(
|
|
6242
6253
|
"contextMenu_newGetVariableBlock_v1",
|
|
6243
|
-
|
|
6254
|
+
ds
|
|
6244
6255
|
);
|
|
6245
6256
|
R.register(
|
|
6246
6257
|
"flow_control_tooltip_v1",
|
|
@@ -6249,16 +6260,16 @@ R.register(
|
|
|
6249
6260
|
CONTINUE: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_CONTINUE}"
|
|
6250
6261
|
})
|
|
6251
6262
|
);
|
|
6252
|
-
const
|
|
6263
|
+
const fs = /* @__PURE__ */ new Set([
|
|
6253
6264
|
"repeat_v1",
|
|
6254
6265
|
"for_each_v1",
|
|
6255
6266
|
"for_v1",
|
|
6256
6267
|
"while_until_v1"
|
|
6257
|
-
]),
|
|
6268
|
+
]), ms = {
|
|
6258
6269
|
getSurroundLoop: function() {
|
|
6259
6270
|
let t = this;
|
|
6260
6271
|
do {
|
|
6261
|
-
if (
|
|
6272
|
+
if (fs.has(t.type))
|
|
6262
6273
|
return t;
|
|
6263
6274
|
t = t?.getSurroundParent();
|
|
6264
6275
|
} while (t);
|
|
@@ -6281,7 +6292,7 @@ const _s = /* @__PURE__ */ new Set([
|
|
|
6281
6292
|
};
|
|
6282
6293
|
R.registerMixin(
|
|
6283
6294
|
"flow_control_in_loop_check_v1",
|
|
6284
|
-
|
|
6295
|
+
ms
|
|
6285
6296
|
);
|
|
6286
6297
|
h([
|
|
6287
6298
|
{
|
|
@@ -6583,7 +6594,7 @@ s.forBlock.while_until_v1 = function(t) {
|
|
|
6583
6594
|
${o}}
|
|
6584
6595
|
`;
|
|
6585
6596
|
};
|
|
6586
|
-
const
|
|
6597
|
+
const Ts = {
|
|
6587
6598
|
// math_arithmetic
|
|
6588
6599
|
ADD: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_ADD}",
|
|
6589
6600
|
SUBTRACT: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_SUBTRACT}",
|
|
@@ -6617,7 +6628,7 @@ const hs = {
|
|
|
6617
6628
|
};
|
|
6618
6629
|
R.register(
|
|
6619
6630
|
"math_op_tooltip_v1",
|
|
6620
|
-
R.buildTooltipForDropdown("OP",
|
|
6631
|
+
R.buildTooltipForDropdown("OP", Ts)
|
|
6621
6632
|
);
|
|
6622
6633
|
h([
|
|
6623
6634
|
{
|
|
@@ -7220,31 +7231,31 @@ s.forBlock.math_trig_v1 = function(t) {
|
|
|
7220
7231
|
}
|
|
7221
7232
|
return [o, c.DIVISION];
|
|
7222
7233
|
};
|
|
7223
|
-
const
|
|
7234
|
+
const Es = v.xml, gs = {
|
|
7224
7235
|
init: function() {
|
|
7225
7236
|
this.appendDummyInput().appendField(
|
|
7226
7237
|
"%{BKY_OBJECT_V1_CREATE_CONTAINER_TITLE}"
|
|
7227
7238
|
), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
7228
7239
|
}
|
|
7229
7240
|
};
|
|
7230
|
-
d.object_create_container_v1 =
|
|
7231
|
-
const
|
|
7241
|
+
d.object_create_container_v1 = gs;
|
|
7242
|
+
const Is = {
|
|
7232
7243
|
init: function() {
|
|
7233
7244
|
this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
7234
7245
|
}
|
|
7235
7246
|
};
|
|
7236
|
-
d.object_create_item_v1 =
|
|
7237
|
-
const
|
|
7247
|
+
d.object_create_item_v1 = Is;
|
|
7248
|
+
const As = {
|
|
7238
7249
|
init: function() {
|
|
7239
7250
|
this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(
|
|
7240
|
-
new
|
|
7251
|
+
new fe.MutatorIcon(
|
|
7241
7252
|
["object_create_item_v1"],
|
|
7242
7253
|
this
|
|
7243
7254
|
)
|
|
7244
7255
|
), this.setOutput(!0, "Object"), this.setStyle("object_blocks"), this.setTooltip("%{BKY_OBJECT_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_OBJECT_V1_CREATE_HELPURL}");
|
|
7245
7256
|
},
|
|
7246
7257
|
mutationToDom: function() {
|
|
7247
|
-
const t =
|
|
7258
|
+
const t = Es.createElement("mutation");
|
|
7248
7259
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
7249
7260
|
},
|
|
7250
7261
|
domToMutation: function(t) {
|
|
@@ -7303,12 +7314,12 @@ const Ts = {
|
|
|
7303
7314
|
},
|
|
7304
7315
|
updateShape_: function() {
|
|
7305
7316
|
for (let t = 0; t < this.itemCount_; t++)
|
|
7306
|
-
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setAlign(k.Align.RIGHT).appendField(new
|
|
7317
|
+
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setAlign(k.Align.RIGHT).appendField(new ue("key"), "KEY" + t);
|
|
7307
7318
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
7308
7319
|
this.removeInput("ADD" + t);
|
|
7309
7320
|
}
|
|
7310
7321
|
};
|
|
7311
|
-
d.object_create_v1 =
|
|
7322
|
+
d.object_create_v1 = As;
|
|
7312
7323
|
s.forBlock.object_create_v1 = function(t) {
|
|
7313
7324
|
const e = t;
|
|
7314
7325
|
let n = "{";
|
|
@@ -7442,15 +7453,7 @@ function ${s.FUNCTION_NAME_PLACEHOLDER_}(obj, key) {
|
|
|
7442
7453
|
if (typeof(key) !== 'string' || key === '') {
|
|
7443
7454
|
return
|
|
7444
7455
|
}
|
|
7445
|
-
var keys =
|
|
7446
|
-
var parts = key.split('.')
|
|
7447
|
-
for (var i = 0; i < parts.length; i++) {
|
|
7448
|
-
var part = parts[i].trim()
|
|
7449
|
-
if (part === '') {
|
|
7450
|
-
continue
|
|
7451
|
-
}
|
|
7452
|
-
keys.push(part)
|
|
7453
|
-
}
|
|
7456
|
+
var keys = __parseKeysV1__(key)
|
|
7454
7457
|
var sz = keys.length
|
|
7455
7458
|
if (sz <= 0) {
|
|
7456
7459
|
return
|
|
@@ -7514,15 +7517,7 @@ function ${s.FUNCTION_NAME_PLACEHOLDER_}(obj, key, val) {
|
|
|
7514
7517
|
if (typeof(key) !== 'string' || key === '') {
|
|
7515
7518
|
return
|
|
7516
7519
|
}
|
|
7517
|
-
var keys =
|
|
7518
|
-
var parts = key.split('.')
|
|
7519
|
-
for (var i = 0; i < parts.length; i++) {
|
|
7520
|
-
var part = parts[i].trim()
|
|
7521
|
-
if (part === '') {
|
|
7522
|
-
continue
|
|
7523
|
-
}
|
|
7524
|
-
keys.push(part)
|
|
7525
|
-
}
|
|
7520
|
+
var keys = __parseKeysV1__(key)
|
|
7526
7521
|
var sz = keys.length
|
|
7527
7522
|
if (sz <= 0) {
|
|
7528
7523
|
return
|
|
@@ -7566,15 +7561,15 @@ h([
|
|
|
7566
7561
|
s.forBlock.object_to_json_v1 = function(t) {
|
|
7567
7562
|
return [`__jsonStringifyV1__(${s.valueToCode(t, "OBJECT", c.NONE) || "null"})`, c.FUNCTION_CALL];
|
|
7568
7563
|
};
|
|
7569
|
-
const
|
|
7564
|
+
const cn = v.xml, Os = {
|
|
7570
7565
|
init: function() {
|
|
7571
|
-
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new
|
|
7566
|
+
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new co(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
7572
7567
|
}
|
|
7573
7568
|
};
|
|
7574
|
-
d.procedure_def_container_v1 =
|
|
7575
|
-
const
|
|
7569
|
+
d.procedure_def_container_v1 = Os;
|
|
7570
|
+
const Cs = {
|
|
7576
7571
|
init: function() {
|
|
7577
|
-
const t = new
|
|
7572
|
+
const t = new ue(bt.DEFAULT_ARG);
|
|
7578
7573
|
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;
|
|
7579
7574
|
},
|
|
7580
7575
|
validator_: function(t) {
|
|
@@ -7594,24 +7589,24 @@ const gs = {
|
|
|
7594
7589
|
return t;
|
|
7595
7590
|
}
|
|
7596
7591
|
};
|
|
7597
|
-
d.procedure_def_item_v1 =
|
|
7598
|
-
const
|
|
7592
|
+
d.procedure_def_item_v1 = Cs;
|
|
7593
|
+
const ks = {
|
|
7599
7594
|
init: function() {
|
|
7600
7595
|
this.withReturn = !1, this.args = [];
|
|
7601
|
-
const t = new
|
|
7602
|
-
|
|
7596
|
+
const t = new ue(
|
|
7597
|
+
bt.findLegalName("", this)
|
|
7603
7598
|
);
|
|
7604
|
-
t.setValidator(
|
|
7605
|
-
new
|
|
7599
|
+
t.setValidator(bt.rename), t.setSpellcheck(!1), this.appendDummyInput("DUMMY").appendField(t, "NAME"), this.appendStatementInput("HANDLE"), this.setMutator(
|
|
7600
|
+
new fe.MutatorIcon(
|
|
7606
7601
|
["procedure_def_item_v1"],
|
|
7607
7602
|
this
|
|
7608
7603
|
)
|
|
7609
7604
|
), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_PROCEDURE_V1_DEF_TOOLTIP}"), this.setHelpUrl("%{BKY_PROCEDURE_V1_DEF_HELPURL}");
|
|
7610
7605
|
},
|
|
7611
7606
|
mutationToDom: function() {
|
|
7612
|
-
const t =
|
|
7607
|
+
const t = cn.createElement("mutation");
|
|
7613
7608
|
return t.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), this.args.forEach((e) => {
|
|
7614
|
-
const n =
|
|
7609
|
+
const n = cn.createElement("arg");
|
|
7615
7610
|
n.setAttribute("name", e.name), n.setAttribute("id", e.id), t.appendChild(n);
|
|
7616
7611
|
}), t;
|
|
7617
7612
|
},
|
|
@@ -7687,7 +7682,7 @@ const Is = {
|
|
|
7687
7682
|
o.setKeyName(`__param@${e.id}__`, e.name, !1);
|
|
7688
7683
|
else
|
|
7689
7684
|
try {
|
|
7690
|
-
E.disable(), o =
|
|
7685
|
+
E.disable(), o = $t(
|
|
7691
7686
|
this.workspace,
|
|
7692
7687
|
`__param@${e.id}__`,
|
|
7693
7688
|
e.name,
|
|
@@ -7699,13 +7694,13 @@ const Is = {
|
|
|
7699
7694
|
}
|
|
7700
7695
|
}
|
|
7701
7696
|
};
|
|
7702
|
-
d.procedure_def_v1 =
|
|
7703
|
-
const
|
|
7697
|
+
d.procedure_def_v1 = ks;
|
|
7698
|
+
const vs = v.xml, ys = {
|
|
7704
7699
|
init: function() {
|
|
7705
7700
|
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}");
|
|
7706
7701
|
},
|
|
7707
7702
|
mutationToDom: function() {
|
|
7708
|
-
const t =
|
|
7703
|
+
const t = vs.createElement("mutation");
|
|
7709
7704
|
return t.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), t;
|
|
7710
7705
|
},
|
|
7711
7706
|
domToMutation: function(t) {
|
|
@@ -7756,14 +7751,14 @@ const As = v.xml, Os = {
|
|
|
7756
7751
|
t.type === "procedure_def_v1" || t.type === "func_entry_v1" ? this.setWarningText(null) : this.setWarningText("the block can only be used in procedure block");
|
|
7757
7752
|
}
|
|
7758
7753
|
};
|
|
7759
|
-
d.procedure_return_v1 =
|
|
7754
|
+
d.procedure_return_v1 = ys;
|
|
7760
7755
|
s.forBlock.procedure_return_v1 = function(t) {
|
|
7761
7756
|
const e = t;
|
|
7762
7757
|
return e.withReturn ? `return ${s.valueToCode(e, "VALUE", c.NONE) || "null"};
|
|
7763
7758
|
` : `return;
|
|
7764
7759
|
`;
|
|
7765
7760
|
};
|
|
7766
|
-
const
|
|
7761
|
+
const Ns = {
|
|
7767
7762
|
init: function() {
|
|
7768
7763
|
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}");
|
|
7769
7764
|
},
|
|
@@ -7786,7 +7781,7 @@ const Cs = {
|
|
|
7786
7781
|
]);
|
|
7787
7782
|
}
|
|
7788
7783
|
};
|
|
7789
|
-
d.download_resource_v1 =
|
|
7784
|
+
d.download_resource_v1 = Ns;
|
|
7790
7785
|
s.forBlock.download_resource_v1 = function(t) {
|
|
7791
7786
|
const e = s.valueToCode(t, "ASSET", c.ATOMIC) || null, n = s.statementToCode(t, "HANDLE");
|
|
7792
7787
|
return `{
|
|
@@ -7798,7 +7793,7 @@ ${n}
|
|
|
7798
7793
|
}
|
|
7799
7794
|
`;
|
|
7800
7795
|
};
|
|
7801
|
-
function
|
|
7796
|
+
function Rn(t) {
|
|
7802
7797
|
const e = T.resource.spaces.find((i) => i.id === t);
|
|
7803
7798
|
if (!e)
|
|
7804
7799
|
return [];
|
|
@@ -7814,13 +7809,13 @@ function Un(t) {
|
|
|
7814
7809
|
}
|
|
7815
7810
|
return o(e.dirTree, ""), n;
|
|
7816
7811
|
}
|
|
7817
|
-
function
|
|
7812
|
+
function Ls(t) {
|
|
7818
7813
|
const e = [];
|
|
7819
|
-
return
|
|
7814
|
+
return Rn(t).forEach(({ id: o, name: i }) => {
|
|
7820
7815
|
e.push([i, o]);
|
|
7821
7816
|
}), N(e);
|
|
7822
7817
|
}
|
|
7823
|
-
function
|
|
7818
|
+
function Dn(t, e) {
|
|
7824
7819
|
const n = T.resource.spaces.find((i) => i.id === t);
|
|
7825
7820
|
if (!n)
|
|
7826
7821
|
return [];
|
|
@@ -7829,25 +7824,25 @@ function Mn(t, e) {
|
|
|
7829
7824
|
i.dirid === e && o.push(i);
|
|
7830
7825
|
}), o;
|
|
7831
7826
|
}
|
|
7832
|
-
function
|
|
7827
|
+
function Ss(t, e) {
|
|
7833
7828
|
const n = [];
|
|
7834
|
-
return
|
|
7829
|
+
return Dn(t, e).forEach(({ id: i, name: a }) => {
|
|
7835
7830
|
n.push([a, i]);
|
|
7836
7831
|
}), N(n);
|
|
7837
7832
|
}
|
|
7838
|
-
function
|
|
7833
|
+
function Un() {
|
|
7839
7834
|
const t = [];
|
|
7840
7835
|
return T.resource.spaces.forEach((e) => {
|
|
7841
7836
|
e.resources.length > 0 && t.push(e);
|
|
7842
7837
|
}), t;
|
|
7843
7838
|
}
|
|
7844
|
-
function
|
|
7839
|
+
function bs() {
|
|
7845
7840
|
const t = [];
|
|
7846
|
-
return
|
|
7841
|
+
return Un().forEach(({ id: n, name: o }) => {
|
|
7847
7842
|
t.push([o, n]);
|
|
7848
7843
|
}), N(t);
|
|
7849
7844
|
}
|
|
7850
|
-
const
|
|
7845
|
+
const Bs = {
|
|
7851
7846
|
init: function() {
|
|
7852
7847
|
this.space = {
|
|
7853
7848
|
id: "",
|
|
@@ -7866,19 +7861,19 @@ const Ns = {
|
|
|
7866
7861
|
initData_: function() {
|
|
7867
7862
|
if (this.space.id)
|
|
7868
7863
|
return;
|
|
7869
|
-
const t =
|
|
7864
|
+
const t = Un()?.[0];
|
|
7870
7865
|
if (!t)
|
|
7871
7866
|
return;
|
|
7872
7867
|
this.space.id = t.id, this.space.name = t.name;
|
|
7873
7868
|
const e = this.getField("SPACE");
|
|
7874
7869
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
7875
|
-
const n =
|
|
7870
|
+
const n = Rn(this.space.id)?.[0];
|
|
7876
7871
|
if (!n)
|
|
7877
7872
|
return;
|
|
7878
7873
|
this.dir.id = n.id, this.dir.name = n.name;
|
|
7879
7874
|
const o = this.getField("DIR");
|
|
7880
7875
|
o.getOptions(!1), o.setValue(this.dir.id);
|
|
7881
|
-
const i =
|
|
7876
|
+
const i = Dn(this.space.id, this.dir.id)?.[0];
|
|
7882
7877
|
if (!i)
|
|
7883
7878
|
return;
|
|
7884
7879
|
this.resource.id = i.id, this.resource.name = i.name;
|
|
@@ -7893,23 +7888,23 @@ const Ns = {
|
|
|
7893
7888
|
};
|
|
7894
7889
|
},
|
|
7895
7890
|
loadExtraState: function(t) {
|
|
7896
|
-
this.space =
|
|
7891
|
+
this.space = Se(t.space), this.dir = Se(t.dir), this.resource = Se(t.resource);
|
|
7897
7892
|
},
|
|
7898
7893
|
genSpaceOpts_: function() {
|
|
7899
|
-
return
|
|
7894
|
+
return bs();
|
|
7900
7895
|
},
|
|
7901
7896
|
genDirOpts_: function() {
|
|
7902
|
-
return
|
|
7897
|
+
return Ls(this.space.id);
|
|
7903
7898
|
},
|
|
7904
7899
|
genResourceOpts_: function() {
|
|
7905
|
-
return
|
|
7900
|
+
return Ss(this.space.id, this.dir.id);
|
|
7906
7901
|
}
|
|
7907
7902
|
};
|
|
7908
|
-
d.select_resource_v1 =
|
|
7903
|
+
d.select_resource_v1 = Bs;
|
|
7909
7904
|
s.forBlock.select_resource_v1 = function() {
|
|
7910
7905
|
return "";
|
|
7911
7906
|
};
|
|
7912
|
-
const
|
|
7907
|
+
const Rs = {
|
|
7913
7908
|
init: function() {
|
|
7914
7909
|
this.appendDummyInput().appendField(
|
|
7915
7910
|
"%{BKY_RESOURCE_V1_UPLOAD_RESOURCE_TITLE}"
|
|
@@ -7940,7 +7935,7 @@ const Ls = {
|
|
|
7940
7935
|
]);
|
|
7941
7936
|
}
|
|
7942
7937
|
};
|
|
7943
|
-
d.upload_resource_v1 =
|
|
7938
|
+
d.upload_resource_v1 = Rs;
|
|
7944
7939
|
s.forBlock.upload_resource_v1 = function(t) {
|
|
7945
7940
|
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");
|
|
7946
7941
|
return `{
|
|
@@ -7973,9 +7968,9 @@ h([
|
|
|
7973
7968
|
s.forBlock.text_v1 = function(t) {
|
|
7974
7969
|
return [s.quote_(t.getFieldValue("TEXT")), c.ATOMIC];
|
|
7975
7970
|
};
|
|
7976
|
-
const
|
|
7977
|
-
function
|
|
7978
|
-
return
|
|
7971
|
+
const Ds = /^\s*'([^']|\\')*'\s*$/;
|
|
7972
|
+
function je(t) {
|
|
7973
|
+
return Ds.test(t) ? [t, c.ATOMIC] : [`String(${t})`, c.FUNCTION_CALL];
|
|
7979
7974
|
}
|
|
7980
7975
|
R.register(
|
|
7981
7976
|
"text_append_tooltip_v1",
|
|
@@ -8010,7 +8005,7 @@ s.forBlock.text_append_v1 = function(t) {
|
|
|
8010
8005
|
t.getFieldValue("VAR"),
|
|
8011
8006
|
te.NameType.VARIABLE
|
|
8012
8007
|
), n = s.valueToCode(t, "TEXT", c.NONE) || "''";
|
|
8013
|
-
return `${e} += ${
|
|
8008
|
+
return `${e} += ${je(n)};
|
|
8014
8009
|
`;
|
|
8015
8010
|
};
|
|
8016
8011
|
h([
|
|
@@ -8179,10 +8174,10 @@ h([
|
|
|
8179
8174
|
s.forBlock.text_is_empty_v1 = function(t) {
|
|
8180
8175
|
return [`!${s.valueToCode(t, "VALUE", c.MEMBER) || "''"}.length`, c.LOGICAL_NOT];
|
|
8181
8176
|
};
|
|
8182
|
-
const
|
|
8177
|
+
const Us = v.xml, Ms = {
|
|
8183
8178
|
itemCount_: 0,
|
|
8184
8179
|
mutationToDom: function() {
|
|
8185
|
-
const t =
|
|
8180
|
+
const t = Us.createElement("mutation");
|
|
8186
8181
|
return t.setAttribute("items", `${this.itemCount_}`), t;
|
|
8187
8182
|
},
|
|
8188
8183
|
domToMutation: function(t) {
|
|
@@ -8253,13 +8248,13 @@ const bs = v.xml, Bs = {
|
|
|
8253
8248
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
8254
8249
|
this.removeInput("ADD" + t);
|
|
8255
8250
|
}
|
|
8256
|
-
},
|
|
8257
|
-
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new
|
|
8251
|
+
}, Ps = function() {
|
|
8252
|
+
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new fe.MutatorIcon(["text_join_item_v1"], this));
|
|
8258
8253
|
};
|
|
8259
8254
|
R.registerMutator(
|
|
8260
8255
|
"text_join_mutator_v1",
|
|
8261
|
-
|
|
8262
|
-
|
|
8256
|
+
Ms,
|
|
8257
|
+
Ps
|
|
8263
8258
|
);
|
|
8264
8259
|
h([
|
|
8265
8260
|
{
|
|
@@ -8302,11 +8297,11 @@ s.forBlock.text_join_v1 = function(t) {
|
|
|
8302
8297
|
return ["''", c.ATOMIC];
|
|
8303
8298
|
case 1: {
|
|
8304
8299
|
const n = s.valueToCode(e, "ADD0", c.NONE) || "''";
|
|
8305
|
-
return
|
|
8300
|
+
return je(n);
|
|
8306
8301
|
}
|
|
8307
8302
|
case 2: {
|
|
8308
8303
|
const n = s.valueToCode(e, "ADD0", c.NONE) || "''", o = s.valueToCode(e, "ADD1", c.NONE) || "''";
|
|
8309
|
-
return [
|
|
8304
|
+
return [je(n)[0] + " + " + je(o)[0], c.ADDITION];
|
|
8310
8305
|
}
|
|
8311
8306
|
default: {
|
|
8312
8307
|
const n = new Array(e.itemCount_);
|
|
@@ -8491,7 +8486,7 @@ s.forBlock.text_trim_v1 = function(t) {
|
|
|
8491
8486
|
}[t.getFieldValue("MODE")];
|
|
8492
8487
|
return [`__trimV1__(${e}, ${o})`, c.ATOMIC];
|
|
8493
8488
|
};
|
|
8494
|
-
const
|
|
8489
|
+
const Vs = {
|
|
8495
8490
|
init: function() {
|
|
8496
8491
|
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}");
|
|
8497
8492
|
},
|
|
@@ -8516,7 +8511,7 @@ const Ds = {
|
|
|
8516
8511
|
));
|
|
8517
8512
|
}
|
|
8518
8513
|
};
|
|
8519
|
-
d.create_timer_v1 =
|
|
8514
|
+
d.create_timer_v1 = Vs;
|
|
8520
8515
|
s.forBlock.create_timer_v1 = function(t) {
|
|
8521
8516
|
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");
|
|
8522
8517
|
return `__createTimerV1__(${e}, ${n}, ${o}, ${i}, function() {
|
|
@@ -8545,18 +8540,18 @@ s.forBlock.delay_v1 = function(t) {
|
|
|
8545
8540
|
return `__delayV1__(${s.valueToCode(t, "DURATION", c.ATOMIC) || "0"});
|
|
8546
8541
|
`;
|
|
8547
8542
|
};
|
|
8548
|
-
const
|
|
8543
|
+
const xs = {
|
|
8549
8544
|
customContextMenu: function(t) {
|
|
8550
8545
|
if (this.isInFlyout) {
|
|
8551
8546
|
if (this.type === "variable_get_v1") {
|
|
8552
8547
|
const e = {
|
|
8553
8548
|
text: _.RENAME_VARIABLE,
|
|
8554
8549
|
enabled: !0,
|
|
8555
|
-
callback:
|
|
8550
|
+
callback: Fs(this)
|
|
8556
8551
|
}, n = this.getField("VAR").getText(), o = {
|
|
8557
8552
|
text: _.DELETE_VARIABLE.replace("%1", n),
|
|
8558
8553
|
enabled: !0,
|
|
8559
|
-
callback:
|
|
8554
|
+
callback: Ys(this)
|
|
8560
8555
|
};
|
|
8561
8556
|
t.unshift(e), t.unshift(o);
|
|
8562
8557
|
}
|
|
@@ -8570,24 +8565,24 @@ const Us = {
|
|
|
8570
8565
|
t.push({
|
|
8571
8566
|
enabled: this.workspace.remainingCapacity() > 0,
|
|
8572
8567
|
text: n.replace("%1", o.getText()),
|
|
8573
|
-
callback:
|
|
8568
|
+
callback: hn.callbackFactory(this, i)
|
|
8574
8569
|
});
|
|
8575
8570
|
}
|
|
8576
8571
|
}
|
|
8577
|
-
},
|
|
8572
|
+
}, Fs = function(t) {
|
|
8578
8573
|
return function() {
|
|
8579
8574
|
const e = t.workspace, o = t.getField("VAR").getVariable();
|
|
8580
|
-
|
|
8575
|
+
Te.renameVariable(e, o);
|
|
8581
8576
|
};
|
|
8582
|
-
},
|
|
8577
|
+
}, Ys = function(t) {
|
|
8583
8578
|
return function() {
|
|
8584
8579
|
const n = t.getField("VAR").getVariable();
|
|
8585
|
-
n &&
|
|
8580
|
+
n && Te.deleteVariable(n.getWorkspace(), n, t);
|
|
8586
8581
|
};
|
|
8587
8582
|
};
|
|
8588
8583
|
R.registerMixin(
|
|
8589
8584
|
"context_menu_variable_v1",
|
|
8590
|
-
|
|
8585
|
+
xs
|
|
8591
8586
|
);
|
|
8592
8587
|
h([
|
|
8593
8588
|
{
|
|
@@ -8643,49 +8638,49 @@ s.forBlock.variable_set_v1 = function(t) {
|
|
|
8643
8638
|
return `${e} = ${n};
|
|
8644
8639
|
`;
|
|
8645
8640
|
};
|
|
8646
|
-
const
|
|
8647
|
-
function
|
|
8641
|
+
const $e = v.xml;
|
|
8642
|
+
function ws() {
|
|
8648
8643
|
const t = [];
|
|
8649
8644
|
{
|
|
8650
|
-
const e =
|
|
8645
|
+
const e = $e.createElement("label");
|
|
8651
8646
|
e.setAttribute("text", _.LABEL_ASSET_LAYER), t.push(e);
|
|
8652
8647
|
}
|
|
8653
8648
|
{
|
|
8654
|
-
const e =
|
|
8649
|
+
const e = $e.createElement("block");
|
|
8655
8650
|
e.setAttribute("type", "upload_resource_v1"), t.push(e);
|
|
8656
8651
|
}
|
|
8657
8652
|
{
|
|
8658
|
-
const e =
|
|
8653
|
+
const e = $e.createElement("label");
|
|
8659
8654
|
e.setAttribute("text", _.LABEL_COMPUTE_LAYER), t.push(e);
|
|
8660
8655
|
}
|
|
8661
8656
|
{
|
|
8662
|
-
const e =
|
|
8657
|
+
const e = $e.createElement("block");
|
|
8663
8658
|
e.setAttribute("type", "call_func_v1"), t.push(e);
|
|
8664
8659
|
}
|
|
8665
8660
|
return t;
|
|
8666
8661
|
}
|
|
8667
|
-
const
|
|
8662
|
+
const Ze = {
|
|
8668
8663
|
name: "INTERFACE_CATEGORY",
|
|
8669
|
-
callback:
|
|
8664
|
+
callback: ws
|
|
8670
8665
|
}, b = v.xml;
|
|
8671
|
-
function
|
|
8666
|
+
function Ks() {
|
|
8672
8667
|
const t = [];
|
|
8673
|
-
if (
|
|
8668
|
+
if (zo()) {
|
|
8674
8669
|
{
|
|
8675
8670
|
const e = b.createElement("label");
|
|
8676
8671
|
e.setAttribute("text", _.LABEL_PAGE), t.push(e);
|
|
8677
8672
|
}
|
|
8678
|
-
if (
|
|
8673
|
+
if (Nn().length > 0) {
|
|
8679
8674
|
const e = b.createElement("block");
|
|
8680
8675
|
e.setAttribute("type", "get_page_argument_v1"), t.push(e);
|
|
8681
8676
|
}
|
|
8682
8677
|
}
|
|
8683
|
-
if (
|
|
8678
|
+
if ($o()) {
|
|
8684
8679
|
{
|
|
8685
8680
|
const e = b.createElement("label");
|
|
8686
8681
|
e.setAttribute("text", _.LABEL_COMP), t.push(e);
|
|
8687
8682
|
}
|
|
8688
|
-
if (
|
|
8683
|
+
if (Me().length > 0) {
|
|
8689
8684
|
{
|
|
8690
8685
|
const e = b.createElement("block");
|
|
8691
8686
|
e.setAttribute("type", "comp_method_impl_v1"), t.push(e);
|
|
@@ -8695,7 +8690,7 @@ function xs() {
|
|
|
8695
8690
|
e.setAttribute("type", "set_comp_method_output_v1"), t.push(e);
|
|
8696
8691
|
}
|
|
8697
8692
|
}
|
|
8698
|
-
if (
|
|
8693
|
+
if (Me().length > 0) {
|
|
8699
8694
|
const e = b.createElement("block");
|
|
8700
8695
|
e.setAttribute("type", "trigger_comp_event_v1"), t.push(e);
|
|
8701
8696
|
}
|
|
@@ -8756,29 +8751,29 @@ function xs() {
|
|
|
8756
8751
|
const e = b.createElement("block");
|
|
8757
8752
|
e.setAttribute("type", "app_env_v1"), t.push(e);
|
|
8758
8753
|
}
|
|
8759
|
-
if (
|
|
8754
|
+
if (Ht().length > 0) {
|
|
8760
8755
|
const e = b.createElement("block");
|
|
8761
8756
|
e.setAttribute("type", "navigate_to_v1"), t.push(e);
|
|
8762
8757
|
}
|
|
8763
8758
|
return t;
|
|
8764
8759
|
}
|
|
8765
|
-
const
|
|
8760
|
+
const et = {
|
|
8766
8761
|
name: "UI_CATEGORY",
|
|
8767
|
-
callback:
|
|
8768
|
-
},
|
|
8769
|
-
function
|
|
8762
|
+
callback: Ks
|
|
8763
|
+
}, ye = v.xml;
|
|
8764
|
+
function $s() {
|
|
8770
8765
|
const t = [];
|
|
8771
8766
|
{
|
|
8772
|
-
const e =
|
|
8767
|
+
const e = ye.createElement("label");
|
|
8773
8768
|
e.setAttribute("text", "%{BKY_LABEL_PROCEDURE}"), t.push(e);
|
|
8774
8769
|
}
|
|
8775
8770
|
{
|
|
8776
|
-
const e =
|
|
8771
|
+
const e = ye.createElement("block");
|
|
8777
8772
|
e.setAttribute("type", "procedure_def_v1");
|
|
8778
8773
|
{
|
|
8779
|
-
const n =
|
|
8774
|
+
const n = ye.createElement("field");
|
|
8780
8775
|
n.setAttribute("name", "NAME");
|
|
8781
|
-
const o =
|
|
8776
|
+
const o = ye.createTextNode(
|
|
8782
8777
|
_.PROCEDURE_DEFAULT_NAME
|
|
8783
8778
|
);
|
|
8784
8779
|
n.appendChild(o), e.appendChild(n);
|
|
@@ -8786,19 +8781,19 @@ function Fs() {
|
|
|
8786
8781
|
t.push(e);
|
|
8787
8782
|
}
|
|
8788
8783
|
{
|
|
8789
|
-
const e =
|
|
8784
|
+
const e = ye.createElement("block");
|
|
8790
8785
|
e.setAttribute("type", "procedure_return_v1"), t.push(e);
|
|
8791
8786
|
}
|
|
8792
8787
|
return t;
|
|
8793
8788
|
}
|
|
8794
8789
|
const ce = {
|
|
8795
8790
|
name: "PROCEDURE_CATEGORY",
|
|
8796
|
-
callback:
|
|
8797
|
-
},
|
|
8798
|
-
function
|
|
8799
|
-
const t =
|
|
8791
|
+
callback: $s
|
|
8792
|
+
}, He = v.xml;
|
|
8793
|
+
function Hs() {
|
|
8794
|
+
const t = Ve(), e = [];
|
|
8800
8795
|
{
|
|
8801
|
-
const o =
|
|
8796
|
+
const o = He.createElement("label");
|
|
8802
8797
|
o.setAttribute("text", "%{BKY_LABEL_VARIABLE}"), e.push(o);
|
|
8803
8798
|
}
|
|
8804
8799
|
{
|
|
@@ -8806,7 +8801,7 @@ function ws() {
|
|
|
8806
8801
|
o.setAttribute("text", "%{BKY_NEW_VARIABLE}"), o.setAttribute("callbackKey", "CREATE_VARIABLE"), t.registerButtonCallback(
|
|
8807
8802
|
"CREATE_VARIABLE",
|
|
8808
8803
|
function(i) {
|
|
8809
|
-
|
|
8804
|
+
Te.createVariableButtonHandler(
|
|
8810
8805
|
i.getTargetWorkspace()
|
|
8811
8806
|
);
|
|
8812
8807
|
}
|
|
@@ -8815,44 +8810,44 @@ function ws() {
|
|
|
8815
8810
|
const n = t.getVariablesOfType("");
|
|
8816
8811
|
if (n.length <= 0)
|
|
8817
8812
|
return e;
|
|
8818
|
-
n.sort(
|
|
8813
|
+
n.sort(Te.compareByName);
|
|
8819
8814
|
{
|
|
8820
|
-
const o =
|
|
8815
|
+
const o = He.createElement("label");
|
|
8821
8816
|
o.setAttribute("text", _.LABEL_CREATED), e.push(o);
|
|
8822
8817
|
}
|
|
8823
8818
|
return n.forEach((o) => {
|
|
8824
8819
|
{
|
|
8825
|
-
const i =
|
|
8826
|
-
i.setAttribute("type", "variable_get_v1"), i.appendChild(
|
|
8820
|
+
const i = He.createElement("block");
|
|
8821
|
+
i.setAttribute("type", "variable_get_v1"), i.appendChild(Te.generateVariableFieldDom(o)), e.push(i);
|
|
8827
8822
|
}
|
|
8828
8823
|
{
|
|
8829
|
-
const i =
|
|
8830
|
-
i.setAttribute("type", "variable_set_v1"), i.appendChild(
|
|
8824
|
+
const i = He.createElement("block");
|
|
8825
|
+
i.setAttribute("type", "variable_set_v1"), i.appendChild(Te.generateVariableFieldDom(o)), e.push(i);
|
|
8831
8826
|
}
|
|
8832
8827
|
}), e;
|
|
8833
8828
|
}
|
|
8834
8829
|
const le = {
|
|
8835
8830
|
name: "VARIABLE_CATEGORY",
|
|
8836
|
-
callback:
|
|
8837
|
-
},
|
|
8838
|
-
function
|
|
8831
|
+
callback: Hs
|
|
8832
|
+
}, me = v.xml;
|
|
8833
|
+
function Gs(t) {
|
|
8839
8834
|
const e = [];
|
|
8840
8835
|
if (t === "flow") {
|
|
8841
8836
|
{
|
|
8842
|
-
const n =
|
|
8837
|
+
const n = me.createElement("block");
|
|
8843
8838
|
n.setAttribute("type", "on_flow_state_event_v1"), e.push(n);
|
|
8844
8839
|
}
|
|
8845
8840
|
{
|
|
8846
|
-
const n =
|
|
8841
|
+
const n = me.createElement("block");
|
|
8847
8842
|
n.setAttribute("type", "compute_debug_trace_v1");
|
|
8848
8843
|
{
|
|
8849
|
-
const o =
|
|
8844
|
+
const o = me.createElement("value");
|
|
8850
8845
|
o.setAttribute("name", "OBJECT");
|
|
8851
8846
|
{
|
|
8852
|
-
const i =
|
|
8847
|
+
const i = me.createElement("shadow");
|
|
8853
8848
|
i.setAttribute("type", "text_v1");
|
|
8854
8849
|
{
|
|
8855
|
-
const a =
|
|
8850
|
+
const a = me.createElement("field");
|
|
8856
8851
|
a.setAttribute("name", "TEXT"), i.appendChild(a);
|
|
8857
8852
|
}
|
|
8858
8853
|
o.appendChild(i);
|
|
@@ -8862,19 +8857,19 @@ function Ys(t) {
|
|
|
8862
8857
|
e.push(n);
|
|
8863
8858
|
}
|
|
8864
8859
|
} else if (t === "func") {
|
|
8865
|
-
if (
|
|
8866
|
-
const n =
|
|
8860
|
+
if (Oe().length > 0) {
|
|
8861
|
+
const n = me.createElement("block");
|
|
8867
8862
|
n.setAttribute("type", "call_func_internal_v1"), e.push(n);
|
|
8868
8863
|
}
|
|
8869
8864
|
} else
|
|
8870
8865
|
console.assert(!1);
|
|
8871
8866
|
return e;
|
|
8872
8867
|
}
|
|
8873
|
-
const
|
|
8868
|
+
const tt = {
|
|
8874
8869
|
name: "FLOW_CATEGORY",
|
|
8875
|
-
callback:
|
|
8870
|
+
callback: Gs
|
|
8876
8871
|
}, ne = v.xml;
|
|
8877
|
-
function
|
|
8872
|
+
function Ws(t) {
|
|
8878
8873
|
const { activeFunc: e } = T.compute, n = [];
|
|
8879
8874
|
if (t === "func") {
|
|
8880
8875
|
{
|
|
@@ -8889,7 +8884,7 @@ function Ks(t) {
|
|
|
8889
8884
|
const o = ne.createElement("block");
|
|
8890
8885
|
o.setAttribute("type", "procedure_return_v1"), n.push(o);
|
|
8891
8886
|
}
|
|
8892
|
-
if (
|
|
8887
|
+
if (Oe().length > 0) {
|
|
8893
8888
|
const o = ne.createElement("block");
|
|
8894
8889
|
o.setAttribute("type", "call_func_internal_v1"), n.push(o);
|
|
8895
8890
|
}
|
|
@@ -8913,7 +8908,7 @@ function Ks(t) {
|
|
|
8913
8908
|
n.push(o);
|
|
8914
8909
|
}
|
|
8915
8910
|
} else if (t === "flow") {
|
|
8916
|
-
if (
|
|
8911
|
+
if (Oe().length > 0) {
|
|
8917
8912
|
const o = ne.createElement("block");
|
|
8918
8913
|
o.setAttribute("type", "call_func_internal_v1"), n.push(o);
|
|
8919
8914
|
}
|
|
@@ -8921,11 +8916,11 @@ function Ks(t) {
|
|
|
8921
8916
|
console.assert(!1);
|
|
8922
8917
|
return n;
|
|
8923
8918
|
}
|
|
8924
|
-
const
|
|
8919
|
+
const nt = {
|
|
8925
8920
|
name: "FUNC_CATEGORY",
|
|
8926
|
-
callback:
|
|
8921
|
+
callback: Ws
|
|
8927
8922
|
}, O = v.xml;
|
|
8928
|
-
function
|
|
8923
|
+
function js() {
|
|
8929
8924
|
const t = [];
|
|
8930
8925
|
if (J().length > 0) {
|
|
8931
8926
|
{
|
|
@@ -9098,36 +9093,36 @@ function $s() {
|
|
|
9098
9093
|
}
|
|
9099
9094
|
return t;
|
|
9100
9095
|
}
|
|
9101
|
-
const
|
|
9096
|
+
const ot = {
|
|
9102
9097
|
name: "DATA_CATEGORY",
|
|
9103
|
-
callback:
|
|
9098
|
+
callback: js
|
|
9104
9099
|
};
|
|
9105
|
-
|
|
9106
|
-
const n = await
|
|
9100
|
+
dn.setConfirm(async (t, e) => {
|
|
9101
|
+
const n = await vo({
|
|
9107
9102
|
title: "",
|
|
9108
9103
|
text: t
|
|
9109
9104
|
});
|
|
9110
9105
|
e(!!n);
|
|
9111
9106
|
});
|
|
9112
|
-
|
|
9113
|
-
const o = await
|
|
9107
|
+
dn.setPrompt(async (t, e, n) => {
|
|
9108
|
+
const o = await yo({
|
|
9114
9109
|
title: "",
|
|
9115
9110
|
value: e
|
|
9116
9111
|
});
|
|
9117
9112
|
o !== void 0 && n(String(o));
|
|
9118
9113
|
});
|
|
9119
|
-
const
|
|
9114
|
+
const Mn = (t, e, n) => {
|
|
9120
9115
|
const o = t[e];
|
|
9121
9116
|
return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((i, a) => {
|
|
9122
9117
|
(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." : ""))));
|
|
9123
9118
|
});
|
|
9124
9119
|
};
|
|
9125
|
-
async function
|
|
9126
|
-
const e = await
|
|
9127
|
-
|
|
9120
|
+
async function ln(t) {
|
|
9121
|
+
const e = await Mn(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.k914lhgs.js"), "./msg/zhHans.ts": () => import("./msg-zhHans.ib2kecyn.js") }), `./msg/${t}.ts`, 3);
|
|
9122
|
+
lo(e.default);
|
|
9128
9123
|
}
|
|
9129
|
-
function
|
|
9130
|
-
const e =
|
|
9124
|
+
function Gt(t) {
|
|
9125
|
+
const e = Ve();
|
|
9131
9126
|
if (!e)
|
|
9132
9127
|
return;
|
|
9133
9128
|
const n = e.getBlockById(t);
|
|
@@ -9139,33 +9134,33 @@ function Wt(t) {
|
|
|
9139
9134
|
const i = o.getRelativeToSurfaceXY(), a = i.x * e.scale, l = i.y * e.scale;
|
|
9140
9135
|
e.scroll(-a, -l);
|
|
9141
9136
|
}
|
|
9142
|
-
function
|
|
9143
|
-
const t =
|
|
9137
|
+
function Pn() {
|
|
9138
|
+
const t = Ve();
|
|
9144
9139
|
if (!t)
|
|
9145
9140
|
return;
|
|
9146
9141
|
const e = t.getTopBlocks(!0)?.[0];
|
|
9147
|
-
e &&
|
|
9142
|
+
e && Gt(e.id);
|
|
9148
9143
|
}
|
|
9149
|
-
function
|
|
9144
|
+
function Vn(t) {
|
|
9150
9145
|
const e = t.getParent();
|
|
9151
|
-
return e &&
|
|
9146
|
+
return e && Vn(e) ? !0 : !e && !!(t.outputConnection || t.previousConnection);
|
|
9152
9147
|
}
|
|
9153
|
-
class
|
|
9148
|
+
class Xs {
|
|
9154
9149
|
init() {
|
|
9155
|
-
const e =
|
|
9150
|
+
const e = uo.registry.getItem("blockDisable");
|
|
9156
9151
|
e && (e.preconditionFn = function(n) {
|
|
9157
9152
|
const o = n.block;
|
|
9158
|
-
return o && !o.isInFlyout && o.workspace.options.disable && o.isEditable() ? o.getInheritedDisabled() ||
|
|
9153
|
+
return o && !o.isInFlyout && o.workspace.options.disable && o.isEditable() ? o.getInheritedDisabled() || Vn(o) ? "disabled" : "enabled" : "hidden";
|
|
9159
9154
|
});
|
|
9160
9155
|
}
|
|
9161
9156
|
}
|
|
9162
|
-
|
|
9163
|
-
|
|
9164
|
-
const
|
|
9165
|
-
|
|
9166
|
-
const
|
|
9167
|
-
|
|
9168
|
-
|
|
9157
|
+
ro.registerFieldColour();
|
|
9158
|
+
_o.registry.unregister(po.names.ESCAPE);
|
|
9159
|
+
const Js = new ho.CrossTabCopyPaste();
|
|
9160
|
+
Js.init({ contextMenu: !0, shortcut: !0 });
|
|
9161
|
+
const qs = new Xs();
|
|
9162
|
+
qs.init();
|
|
9163
|
+
st.Classic.blockStyles = {
|
|
9169
9164
|
color_blocks: {
|
|
9170
9165
|
colourPrimary: "#a5745b",
|
|
9171
9166
|
colourSecondary: "#ede3de",
|
|
@@ -9239,7 +9234,7 @@ ct.Classic.blockStyles = {
|
|
|
9239
9234
|
hat: ""
|
|
9240
9235
|
}
|
|
9241
9236
|
};
|
|
9242
|
-
|
|
9237
|
+
st.Classic.categoryStyles = {
|
|
9243
9238
|
calc_category: {
|
|
9244
9239
|
colour: "#757575"
|
|
9245
9240
|
},
|
|
@@ -9295,9 +9290,9 @@ ct.Classic.categoryStyles = {
|
|
|
9295
9290
|
colour: "#a55b80"
|
|
9296
9291
|
}
|
|
9297
9292
|
};
|
|
9298
|
-
const
|
|
9293
|
+
const Qs = fn.defineTheme("light", {
|
|
9299
9294
|
name: "light",
|
|
9300
|
-
base:
|
|
9295
|
+
base: st.Classic,
|
|
9301
9296
|
componentStyles: {
|
|
9302
9297
|
workspaceBackgroundColour: "#ffffff",
|
|
9303
9298
|
toolboxBackgroundColour: "#eeeeee",
|
|
@@ -9311,9 +9306,9 @@ const js = Tn.defineTheme("light", {
|
|
|
9311
9306
|
scrollbarOpacity: 0.4,
|
|
9312
9307
|
cursorColour: ""
|
|
9313
9308
|
}
|
|
9314
|
-
}),
|
|
9309
|
+
}), zs = fn.defineTheme("dark", {
|
|
9315
9310
|
name: "dark",
|
|
9316
|
-
base:
|
|
9311
|
+
base: st.Classic,
|
|
9317
9312
|
componentStyles: {
|
|
9318
9313
|
workspaceBackgroundColour: "#1e1e1e",
|
|
9319
9314
|
toolboxBackgroundColour: "#272727",
|
|
@@ -9328,18 +9323,18 @@ const js = Tn.defineTheme("light", {
|
|
|
9328
9323
|
cursorColour: ""
|
|
9329
9324
|
}
|
|
9330
9325
|
});
|
|
9331
|
-
function
|
|
9332
|
-
const e =
|
|
9326
|
+
function Zs(t) {
|
|
9327
|
+
const e = Ve();
|
|
9333
9328
|
switch (t) {
|
|
9334
9329
|
case "light":
|
|
9335
|
-
e.setTheme(
|
|
9330
|
+
e.setTheme(Qs);
|
|
9336
9331
|
break;
|
|
9337
9332
|
case "dark":
|
|
9338
|
-
e.setTheme(
|
|
9333
|
+
e.setTheme(zs);
|
|
9339
9334
|
break;
|
|
9340
9335
|
}
|
|
9341
9336
|
}
|
|
9342
|
-
const
|
|
9337
|
+
const rt = {
|
|
9343
9338
|
kind: "category",
|
|
9344
9339
|
name: "%{BKY_CATEGORY_COLOR}",
|
|
9345
9340
|
categorystyle: "color_category",
|
|
@@ -9413,7 +9408,7 @@ const ht = {
|
|
|
9413
9408
|
}
|
|
9414
9409
|
}
|
|
9415
9410
|
]
|
|
9416
|
-
},
|
|
9411
|
+
}, _t = {
|
|
9417
9412
|
kind: "category",
|
|
9418
9413
|
name: "%{BKY_CATEGORY_LIST}",
|
|
9419
9414
|
categorystyle: "list_category",
|
|
@@ -9528,7 +9523,7 @@ const ht = {
|
|
|
9528
9523
|
type: "list_reverse_v1"
|
|
9529
9524
|
}
|
|
9530
9525
|
]
|
|
9531
|
-
},
|
|
9526
|
+
}, pt = {
|
|
9532
9527
|
kind: "category",
|
|
9533
9528
|
name: "%{BKY_CATEGORY_LOGIC}",
|
|
9534
9529
|
categorystyle: "logic_category",
|
|
@@ -9570,7 +9565,7 @@ const ht = {
|
|
|
9570
9565
|
type: "logic_ternary_v1"
|
|
9571
9566
|
}
|
|
9572
9567
|
]
|
|
9573
|
-
},
|
|
9568
|
+
}, ht = {
|
|
9574
9569
|
kind: "category",
|
|
9575
9570
|
name: "%{BKY_CATEGORY_LOOP}",
|
|
9576
9571
|
categorystyle: "loop_category",
|
|
@@ -9632,7 +9627,7 @@ const ht = {
|
|
|
9632
9627
|
type: "flow_control_v1"
|
|
9633
9628
|
}
|
|
9634
9629
|
]
|
|
9635
|
-
},
|
|
9630
|
+
}, dt = {
|
|
9636
9631
|
kind: "category",
|
|
9637
9632
|
name: "%{BKY_CATEGORY_MATH}",
|
|
9638
9633
|
categorystyle: "math_category",
|
|
@@ -9787,7 +9782,7 @@ const ht = {
|
|
|
9787
9782
|
type: "math_on_list_v1"
|
|
9788
9783
|
}
|
|
9789
9784
|
]
|
|
9790
|
-
},
|
|
9785
|
+
}, xn = {
|
|
9791
9786
|
kind: "category",
|
|
9792
9787
|
name: "%{BKY_CATEGORY_MESSAGE}",
|
|
9793
9788
|
categorystyle: "message_category",
|
|
@@ -9823,7 +9818,7 @@ const ht = {
|
|
|
9823
9818
|
type: "open_prompt_dlg_v1"
|
|
9824
9819
|
}
|
|
9825
9820
|
]
|
|
9826
|
-
},
|
|
9821
|
+
}, ft = {
|
|
9827
9822
|
kind: "category",
|
|
9828
9823
|
name: "%{BKY_CATEGORY_OBJECT}",
|
|
9829
9824
|
categorystyle: "object_category",
|
|
@@ -9891,7 +9886,7 @@ const ht = {
|
|
|
9891
9886
|
}
|
|
9892
9887
|
}
|
|
9893
9888
|
]
|
|
9894
|
-
},
|
|
9889
|
+
}, mt = {
|
|
9895
9890
|
kind: "category",
|
|
9896
9891
|
name: "%{BKY_CATEGORY_TEXT}",
|
|
9897
9892
|
categorystyle: "text_category",
|
|
@@ -10054,7 +10049,7 @@ const ht = {
|
|
|
10054
10049
|
type: "text_reverse_v1"
|
|
10055
10050
|
}
|
|
10056
10051
|
]
|
|
10057
|
-
},
|
|
10052
|
+
}, Fn = {
|
|
10058
10053
|
kind: "category",
|
|
10059
10054
|
name: "%{BKY_CATEGORY_TIME}",
|
|
10060
10055
|
categorystyle: "time_category",
|
|
@@ -10078,24 +10073,24 @@ const ht = {
|
|
|
10078
10073
|
}
|
|
10079
10074
|
}
|
|
10080
10075
|
]
|
|
10081
|
-
},
|
|
10076
|
+
}, ea = {
|
|
10082
10077
|
kind: "categoryToolbox",
|
|
10083
10078
|
contents: [
|
|
10084
10079
|
{
|
|
10085
10080
|
kind: "category",
|
|
10086
10081
|
name: "%{BKY_CATEGORY_UI}",
|
|
10087
10082
|
categorystyle: "ui_category",
|
|
10088
|
-
custom:
|
|
10083
|
+
custom: et.name
|
|
10089
10084
|
},
|
|
10090
|
-
|
|
10085
|
+
xn,
|
|
10086
|
+
ht,
|
|
10087
|
+
pt,
|
|
10088
|
+
dt,
|
|
10091
10089
|
mt,
|
|
10090
|
+
_t,
|
|
10092
10091
|
ft,
|
|
10093
|
-
|
|
10094
|
-
|
|
10095
|
-
dt,
|
|
10096
|
-
Et,
|
|
10097
|
-
ht,
|
|
10098
|
-
Yn,
|
|
10092
|
+
rt,
|
|
10093
|
+
Fn,
|
|
10099
10094
|
{
|
|
10100
10095
|
kind: "category",
|
|
10101
10096
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10112,37 +10107,37 @@ const ht = {
|
|
|
10112
10107
|
kind: "category",
|
|
10113
10108
|
name: "%{BKY_CATEGORY_INTERFACE}",
|
|
10114
10109
|
categorystyle: "interface_category",
|
|
10115
|
-
custom:
|
|
10110
|
+
custom: Ze.name
|
|
10116
10111
|
}
|
|
10117
10112
|
]
|
|
10118
|
-
},
|
|
10113
|
+
}, ta = {
|
|
10119
10114
|
kind: "categoryToolbox",
|
|
10120
10115
|
contents: [
|
|
10121
10116
|
{
|
|
10122
10117
|
kind: "category",
|
|
10123
10118
|
name: "%{BKY_CATEGORY_FUNC}",
|
|
10124
10119
|
categorystyle: "func_category",
|
|
10125
|
-
custom:
|
|
10120
|
+
custom: nt.name
|
|
10126
10121
|
},
|
|
10127
10122
|
{
|
|
10128
10123
|
kind: "category",
|
|
10129
10124
|
name: "%{BKY_CATEGORY_FLOW}",
|
|
10130
10125
|
categorystyle: "flow_category",
|
|
10131
|
-
custom:
|
|
10126
|
+
custom: tt.name
|
|
10132
10127
|
},
|
|
10133
10128
|
{
|
|
10134
10129
|
kind: "category",
|
|
10135
10130
|
name: "%{BKY_CATEGORY_DATA}",
|
|
10136
10131
|
categorystyle: "data_category",
|
|
10137
|
-
custom:
|
|
10132
|
+
custom: ot.name
|
|
10138
10133
|
},
|
|
10134
|
+
ht,
|
|
10135
|
+
pt,
|
|
10136
|
+
dt,
|
|
10139
10137
|
mt,
|
|
10138
|
+
_t,
|
|
10140
10139
|
ft,
|
|
10141
|
-
|
|
10142
|
-
gt,
|
|
10143
|
-
dt,
|
|
10144
|
-
Et,
|
|
10145
|
-
ht,
|
|
10140
|
+
rt,
|
|
10146
10141
|
{
|
|
10147
10142
|
kind: "category",
|
|
10148
10143
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10156,34 +10151,34 @@ const ht = {
|
|
|
10156
10151
|
custom: ce.name
|
|
10157
10152
|
}
|
|
10158
10153
|
]
|
|
10159
|
-
},
|
|
10154
|
+
}, na = {
|
|
10160
10155
|
kind: "categoryToolbox",
|
|
10161
10156
|
contents: [
|
|
10162
10157
|
{
|
|
10163
10158
|
kind: "category",
|
|
10164
10159
|
name: "%{BKY_CATEGORY_FUNC}",
|
|
10165
10160
|
categorystyle: "func_category",
|
|
10166
|
-
custom:
|
|
10161
|
+
custom: nt.name
|
|
10167
10162
|
},
|
|
10168
10163
|
{
|
|
10169
10164
|
kind: "category",
|
|
10170
10165
|
name: "%{BKY_CATEGORY_FLOW}",
|
|
10171
10166
|
categorystyle: "flow_category",
|
|
10172
|
-
custom:
|
|
10167
|
+
custom: tt.name
|
|
10173
10168
|
},
|
|
10174
10169
|
{
|
|
10175
10170
|
kind: "category",
|
|
10176
10171
|
name: "%{BKY_CATEGORY_DATA}",
|
|
10177
10172
|
categorystyle: "data_category",
|
|
10178
|
-
custom:
|
|
10173
|
+
custom: ot.name
|
|
10179
10174
|
},
|
|
10175
|
+
ht,
|
|
10176
|
+
pt,
|
|
10177
|
+
dt,
|
|
10180
10178
|
mt,
|
|
10179
|
+
_t,
|
|
10181
10180
|
ft,
|
|
10182
|
-
|
|
10183
|
-
gt,
|
|
10184
|
-
dt,
|
|
10185
|
-
Et,
|
|
10186
|
-
ht,
|
|
10181
|
+
rt,
|
|
10187
10182
|
{
|
|
10188
10183
|
kind: "category",
|
|
10189
10184
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10197,7 +10192,7 @@ const ht = {
|
|
|
10197
10192
|
custom: ce.name
|
|
10198
10193
|
}
|
|
10199
10194
|
]
|
|
10200
|
-
},
|
|
10195
|
+
}, oa = {
|
|
10201
10196
|
kind: "categoryToolbox",
|
|
10202
10197
|
contents: [
|
|
10203
10198
|
{
|
|
@@ -10228,24 +10223,24 @@ const ht = {
|
|
|
10228
10223
|
]
|
|
10229
10224
|
}
|
|
10230
10225
|
]
|
|
10231
|
-
},
|
|
10226
|
+
}, ia = {
|
|
10232
10227
|
kind: "categoryToolbox",
|
|
10233
10228
|
contents: [
|
|
10234
10229
|
{
|
|
10235
10230
|
kind: "category",
|
|
10236
10231
|
name: "%{BKY_CATEGORY_UI}",
|
|
10237
10232
|
categorystyle: "ui_category",
|
|
10238
|
-
custom:
|
|
10233
|
+
custom: et.name
|
|
10239
10234
|
},
|
|
10240
|
-
|
|
10235
|
+
xn,
|
|
10236
|
+
ht,
|
|
10237
|
+
pt,
|
|
10238
|
+
dt,
|
|
10241
10239
|
mt,
|
|
10240
|
+
_t,
|
|
10242
10241
|
ft,
|
|
10243
|
-
|
|
10244
|
-
|
|
10245
|
-
dt,
|
|
10246
|
-
Et,
|
|
10247
|
-
ht,
|
|
10248
|
-
Yn,
|
|
10242
|
+
rt,
|
|
10243
|
+
Fn,
|
|
10249
10244
|
{
|
|
10250
10245
|
kind: "category",
|
|
10251
10246
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10262,29 +10257,29 @@ const ht = {
|
|
|
10262
10257
|
kind: "category",
|
|
10263
10258
|
name: "%{BKY_CATEGORY_INTERFACE}",
|
|
10264
10259
|
categorystyle: "interface_category",
|
|
10265
|
-
custom:
|
|
10260
|
+
custom: Ze.name
|
|
10266
10261
|
}
|
|
10267
10262
|
]
|
|
10268
|
-
},
|
|
10269
|
-
function
|
|
10270
|
-
|
|
10263
|
+
}, Yn = Symbol();
|
|
10264
|
+
function sa(t) {
|
|
10265
|
+
Qn(Yn, t);
|
|
10271
10266
|
}
|
|
10272
|
-
function
|
|
10273
|
-
return
|
|
10267
|
+
function Wt() {
|
|
10268
|
+
return zn(Yn);
|
|
10274
10269
|
}
|
|
10275
|
-
const
|
|
10270
|
+
const aa = /* @__PURE__ */ oe({
|
|
10276
10271
|
__name: "index",
|
|
10277
10272
|
props: {
|
|
10278
10273
|
lock: { type: Boolean }
|
|
10279
10274
|
},
|
|
10280
10275
|
setup(t, { expose: e }) {
|
|
10281
|
-
const { t: n } =
|
|
10276
|
+
const { t: n } = Fe(), o = t, i = Wt(), a = () => {
|
|
10282
10277
|
if (!i.workspace) {
|
|
10283
10278
|
console.assert(!1);
|
|
10284
10279
|
return;
|
|
10285
10280
|
}
|
|
10286
10281
|
if (o.lock) {
|
|
10287
|
-
|
|
10282
|
+
Tn(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
10288
10283
|
return;
|
|
10289
10284
|
}
|
|
10290
10285
|
i.workspace.cleanUp();
|
|
@@ -10308,7 +10303,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10308
10303
|
}, 8, ["text"]);
|
|
10309
10304
|
};
|
|
10310
10305
|
}
|
|
10311
|
-
}),
|
|
10306
|
+
}), ca = /* @__PURE__ */ oe({
|
|
10312
10307
|
__name: "index",
|
|
10313
10308
|
props: {
|
|
10314
10309
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10316,7 +10311,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10316
10311
|
},
|
|
10317
10312
|
emits: ["update:modelValue"],
|
|
10318
10313
|
setup(t) {
|
|
10319
|
-
const { t: e } =
|
|
10314
|
+
const { t: e } = Fe(), n = Be(t, "modelValue");
|
|
10320
10315
|
return (o, i) => {
|
|
10321
10316
|
const a = V("v-btn"), l = V("v-tooltip");
|
|
10322
10317
|
return D(), Z(l, {
|
|
@@ -10334,7 +10329,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10334
10329
|
}, 8, ["text"]);
|
|
10335
10330
|
};
|
|
10336
10331
|
}
|
|
10337
|
-
}),
|
|
10332
|
+
}), la = { class: "text-subtitle-1 ml-6" }, ua = /* @__PURE__ */ oe({
|
|
10338
10333
|
__name: "item",
|
|
10339
10334
|
props: {
|
|
10340
10335
|
id: {},
|
|
@@ -10343,7 +10338,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10343
10338
|
},
|
|
10344
10339
|
emits: ["x-click"],
|
|
10345
10340
|
setup(t, { emit: e }) {
|
|
10346
|
-
const { primaryColor: n, backgroundColor2: o, highlightColor: i } =
|
|
10341
|
+
const { primaryColor: n, backgroundColor2: o, highlightColor: i } = xe(), a = t, l = e, u = Ee(!1), r = K(() => ({
|
|
10347
10342
|
position: "relative",
|
|
10348
10343
|
background: u.value ? i.value : o.value,
|
|
10349
10344
|
height: "48px",
|
|
@@ -10360,20 +10355,20 @@ const na = /* @__PURE__ */ oe({
|
|
|
10360
10355
|
pointerEvents: "none"
|
|
10361
10356
|
}));
|
|
10362
10357
|
return (I, A) => {
|
|
10363
|
-
const f = V("v-spacer"), C = V("v-icon"), g =
|
|
10364
|
-
return
|
|
10358
|
+
const f = V("v-spacer"), C = V("v-icon"), g = Zn("ripple");
|
|
10359
|
+
return eo((D(), Q("div", {
|
|
10365
10360
|
class: "d-flex align-center cursor-pointer",
|
|
10366
10361
|
style: W(r.value),
|
|
10367
10362
|
onClick: A[1] || (A[1] = (M) => l("x-click", a.id)),
|
|
10368
10363
|
onMouseout: A[2] || (A[2] = (M) => u.value = !1),
|
|
10369
10364
|
onMouseover: A[3] || (A[3] = (M) => u.value = !0)
|
|
10370
10365
|
}, [
|
|
10371
|
-
j("span",
|
|
10366
|
+
j("span", la, it(a.title), 1),
|
|
10372
10367
|
B(f),
|
|
10373
10368
|
B(C, {
|
|
10374
10369
|
class: "x-handle cursor-move mr-3",
|
|
10375
10370
|
icon: "mdi-drag-horizontal-variant",
|
|
10376
|
-
onMousedown: A[0] || (A[0] =
|
|
10371
|
+
onMousedown: A[0] || (A[0] = Ne(() => {
|
|
10377
10372
|
}, ["stop"]))
|
|
10378
10373
|
}),
|
|
10379
10374
|
j("div", {
|
|
@@ -10384,12 +10379,12 @@ const na = /* @__PURE__ */ oe({
|
|
|
10384
10379
|
]);
|
|
10385
10380
|
};
|
|
10386
10381
|
}
|
|
10387
|
-
}),
|
|
10382
|
+
}), ra = {
|
|
10388
10383
|
key: 1,
|
|
10389
10384
|
class: "text-caption text-grey"
|
|
10390
|
-
},
|
|
10385
|
+
}, _a = /* @__PURE__ */ oe({
|
|
10391
10386
|
__name: "index",
|
|
10392
|
-
props: /* @__PURE__ */
|
|
10387
|
+
props: /* @__PURE__ */ Nt({
|
|
10393
10388
|
lock: { type: Boolean }
|
|
10394
10389
|
}, {
|
|
10395
10390
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10397,7 +10392,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10397
10392
|
}),
|
|
10398
10393
|
emits: ["update:modelValue"],
|
|
10399
10394
|
setup(t, { expose: e }) {
|
|
10400
|
-
const { t: n } =
|
|
10395
|
+
const { t: n } = Fe(), o = Be(t, "modelValue"), i = Wt(), a = Ee([]);
|
|
10401
10396
|
e({ update: () => {
|
|
10402
10397
|
if (!i.workspace) {
|
|
10403
10398
|
console.assert(!1);
|
|
@@ -10405,15 +10400,15 @@ const na = /* @__PURE__ */ oe({
|
|
|
10405
10400
|
}
|
|
10406
10401
|
const f = [];
|
|
10407
10402
|
i.workspace.getTopBlocks(!0).forEach((g) => {
|
|
10408
|
-
const M = g.id ===
|
|
10409
|
-
let
|
|
10403
|
+
const M = g.id === mo()?.id;
|
|
10404
|
+
let w = "<n/a>";
|
|
10410
10405
|
if (g.type.startsWith("on_node_event_v")) {
|
|
10411
|
-
const q = g,
|
|
10412
|
-
|
|
10413
|
-
} else g.type.startsWith("func_entry_v") ?
|
|
10406
|
+
const q = g, pe = x[q.node.key];
|
|
10407
|
+
pe && (w = n(pe.name), q.node.alias && (w += " / " + q.node.alias), w += " - " + _[q.event.name]);
|
|
10408
|
+
} else g.type.startsWith("func_entry_v") ? w = n("x-block-lib.funcEntry") : g.type.startsWith("procedure_def_v") ? (console.log(g), w = n("x-block-lib.procedure") + " - " + g.getFieldValue("NAME")) : w = n("x-block-lib.temporaryBlock");
|
|
10414
10409
|
f.push({
|
|
10415
10410
|
id: g.id,
|
|
10416
|
-
name:
|
|
10411
|
+
name: w,
|
|
10417
10412
|
select: M
|
|
10418
10413
|
});
|
|
10419
10414
|
}), a.value = f;
|
|
@@ -10421,7 +10416,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10421
10416
|
let u = [];
|
|
10422
10417
|
const r = () => {
|
|
10423
10418
|
if (t.lock) {
|
|
10424
|
-
|
|
10419
|
+
Tn(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
10425
10420
|
return;
|
|
10426
10421
|
}
|
|
10427
10422
|
const f = [];
|
|
@@ -10448,21 +10443,21 @@ const na = /* @__PURE__ */ oe({
|
|
|
10448
10443
|
}
|
|
10449
10444
|
let M = "";
|
|
10450
10445
|
f.newIndex > f.oldIndex ? M = u[f.newIndex] : f.newIndex > 0 && (M = u[f.newIndex - 1]);
|
|
10451
|
-
let
|
|
10452
|
-
M !== "" && (
|
|
10446
|
+
let w = -10;
|
|
10447
|
+
M !== "" && (w = i.workspace.getBlockById(
|
|
10453
10448
|
M
|
|
10454
10449
|
).getRelativeToSurfaceXY().y + 10);
|
|
10455
10450
|
const q = g.getRelativeToSurfaceXY();
|
|
10456
|
-
g.moveTo(new v.Coordinate(q.x,
|
|
10451
|
+
g.moveTo(new v.Coordinate(q.x, w)), i.workspace.cleanUp(), Pn();
|
|
10457
10452
|
}, A = async (f) => {
|
|
10458
10453
|
if (!i.workspace) {
|
|
10459
10454
|
console.assert(!1);
|
|
10460
10455
|
return;
|
|
10461
10456
|
}
|
|
10462
10457
|
const C = i.workspace.getBlockById(f);
|
|
10463
|
-
|
|
10458
|
+
mn.setSelected(C), Gt(f), o.value = !1;
|
|
10464
10459
|
};
|
|
10465
|
-
return (f, C) => a.value.length > 0 ? (D(), Z(P(
|
|
10460
|
+
return (f, C) => a.value.length > 0 ? (D(), Z(P(fo), {
|
|
10466
10461
|
key: 0,
|
|
10467
10462
|
modelValue: a.value,
|
|
10468
10463
|
"onUpdate:modelValue": C[0] || (C[0] = (g) => a.value = g),
|
|
@@ -10474,7 +10469,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10474
10469
|
onStart: r
|
|
10475
10470
|
}, {
|
|
10476
10471
|
default: ee(() => [
|
|
10477
|
-
(D(!0), Q(
|
|
10472
|
+
(D(!0), Q(un, null, to(a.value, (g) => (D(), Z(ua, {
|
|
10478
10473
|
id: g.id,
|
|
10479
10474
|
key: g.id,
|
|
10480
10475
|
select: g.select,
|
|
@@ -10483,14 +10478,14 @@ const na = /* @__PURE__ */ oe({
|
|
|
10483
10478
|
}, null, 8, ["id", "select", "title"]))), 128))
|
|
10484
10479
|
]),
|
|
10485
10480
|
_: 1
|
|
10486
|
-
}, 8, ["modelValue"])) : (D(), Q("span",
|
|
10481
|
+
}, 8, ["modelValue"])) : (D(), Q("span", ra, it(P(n)("x-block-lib.noOption")), 1));
|
|
10487
10482
|
}
|
|
10488
|
-
}),
|
|
10483
|
+
}), pa = (t, e) => {
|
|
10489
10484
|
const n = t.__vccOpts || t;
|
|
10490
10485
|
for (const [o, i] of e)
|
|
10491
10486
|
n[o] = i;
|
|
10492
10487
|
return n;
|
|
10493
|
-
},
|
|
10488
|
+
}, ha = /* @__PURE__ */ pa(_a, [["__scopeId", "data-v-2ba1be08"]]), da = /* @__PURE__ */ oe({
|
|
10494
10489
|
__name: "index",
|
|
10495
10490
|
props: {
|
|
10496
10491
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10498,7 +10493,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10498
10493
|
},
|
|
10499
10494
|
emits: ["update:modelValue"],
|
|
10500
10495
|
setup(t, { expose: e }) {
|
|
10501
|
-
const n =
|
|
10496
|
+
const n = Be(t, "modelValue"), o = Wt();
|
|
10502
10497
|
e({ update: () => {
|
|
10503
10498
|
if (!o.workspace) {
|
|
10504
10499
|
console.assert(!1);
|
|
@@ -10506,26 +10501,26 @@ const na = /* @__PURE__ */ oe({
|
|
|
10506
10501
|
}
|
|
10507
10502
|
} });
|
|
10508
10503
|
const a = (l) => {
|
|
10509
|
-
const u =
|
|
10504
|
+
const u = Ve();
|
|
10510
10505
|
if (!u) {
|
|
10511
10506
|
console.assert(!1);
|
|
10512
10507
|
return;
|
|
10513
10508
|
}
|
|
10514
10509
|
const r = u.getBlockById(l);
|
|
10515
|
-
|
|
10510
|
+
mn.setSelected(r), Gt(l), n.value = !1;
|
|
10516
10511
|
};
|
|
10517
10512
|
return (l, u) => (D(), Q("div", {
|
|
10518
10513
|
onClick: u[0] || (u[0] = (r) => a(""))
|
|
10519
10514
|
}, "blockTree"));
|
|
10520
10515
|
}
|
|
10521
|
-
}),
|
|
10516
|
+
}), fa = { class: "text-subtitle-1" }, ma = /* @__PURE__ */ oe({
|
|
10522
10517
|
__name: "index",
|
|
10523
10518
|
props: {
|
|
10524
10519
|
type: {},
|
|
10525
10520
|
lock: { type: Boolean }
|
|
10526
10521
|
},
|
|
10527
10522
|
setup(t, { expose: e }) {
|
|
10528
|
-
const { t: n } =
|
|
10523
|
+
const { t: n } = Fe(), o = So(), { sysBarAvail: i } = En(), { backgroundColor1: a } = xe(), l = K(() => {
|
|
10529
10524
|
let C = "100%";
|
|
10530
10525
|
return o.mdAndUp.value && (C = "400px"), {
|
|
10531
10526
|
background: a.value,
|
|
@@ -10540,31 +10535,31 @@ const na = /* @__PURE__ */ oe({
|
|
|
10540
10535
|
};
|
|
10541
10536
|
}), r = K(() => ({
|
|
10542
10537
|
height: "60px"
|
|
10543
|
-
})), { open: p } = Kt(`blocklyNavigatorDlg${
|
|
10544
|
-
|
|
10538
|
+
})), { open: p } = Kt(`blocklyNavigatorDlg${Lt()}`);
|
|
10539
|
+
rn(() => {
|
|
10545
10540
|
p.value = !1;
|
|
10546
10541
|
});
|
|
10547
|
-
const I =
|
|
10542
|
+
const I = Le("blockList"), A = Le("blockTree");
|
|
10548
10543
|
return e({ open: p, update: () => {
|
|
10549
10544
|
t.type === "list" ? I.value?.update() : t.type === "tree" && A.value?.update();
|
|
10550
10545
|
} }), (C, g) => {
|
|
10551
|
-
const M = V("v-sheet"),
|
|
10552
|
-
return D(), Q(
|
|
10553
|
-
B(
|
|
10546
|
+
const M = V("v-sheet"), w = V("v-btn"), q = V("v-spacer"), pe = V("v-dialog"), Tt = V("v-tooltip");
|
|
10547
|
+
return D(), Q(un, null, [
|
|
10548
|
+
B(pe, {
|
|
10554
10549
|
modelValue: P(p),
|
|
10555
|
-
"onUpdate:modelValue": g[5] || (g[5] = (G) =>
|
|
10550
|
+
"onUpdate:modelValue": g[5] || (g[5] = (G) => Ge(p) ? p.value = G : null),
|
|
10556
10551
|
eager: "",
|
|
10557
10552
|
fullscreen: "",
|
|
10558
10553
|
"no-click-animation": "",
|
|
10559
10554
|
persistent: "",
|
|
10560
10555
|
transition: "scroll-x-reverse-transition",
|
|
10561
|
-
onKeydown: g[6] || (g[6] =
|
|
10556
|
+
onKeydown: g[6] || (g[6] = _n(Ne((G) => p.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
10562
10557
|
}, {
|
|
10563
10558
|
default: ee(() => [
|
|
10564
10559
|
j("div", {
|
|
10565
10560
|
class: "w-100 h-100 d-flex flex-row-reverse",
|
|
10566
|
-
onClick: g[3] || (g[3] =
|
|
10567
|
-
onContextmenu: g[4] || (g[4] =
|
|
10561
|
+
onClick: g[3] || (g[3] = Ne((G) => p.value = !1, ["self"])),
|
|
10562
|
+
onContextmenu: g[4] || (g[4] = Ne((G) => p.value = !1, ["self", "prevent"]))
|
|
10568
10563
|
}, [
|
|
10569
10564
|
j("div", {
|
|
10570
10565
|
class: "elevation-2",
|
|
@@ -10574,20 +10569,20 @@ const na = /* @__PURE__ */ oe({
|
|
|
10574
10569
|
key: 0,
|
|
10575
10570
|
color: "transparent",
|
|
10576
10571
|
height: 24
|
|
10577
|
-
})) :
|
|
10572
|
+
})) : de("", !0),
|
|
10578
10573
|
B(M, {
|
|
10579
10574
|
class: "d-flex align-center px-2",
|
|
10580
10575
|
color: "transparent",
|
|
10581
10576
|
height: 48
|
|
10582
10577
|
}, {
|
|
10583
10578
|
default: ee(() => [
|
|
10584
|
-
B(
|
|
10579
|
+
B(w, {
|
|
10585
10580
|
density: "comfortable",
|
|
10586
10581
|
icon: "mdi-close",
|
|
10587
10582
|
variant: "text",
|
|
10588
10583
|
onClick: g[0] || (g[0] = (G) => p.value = !1)
|
|
10589
10584
|
}),
|
|
10590
|
-
j("span",
|
|
10585
|
+
j("span", fa, it(P(n)("x-block-lib.navigator")), 1),
|
|
10591
10586
|
B(q)
|
|
10592
10587
|
]),
|
|
10593
10588
|
_: 1
|
|
@@ -10596,20 +10591,20 @@ const na = /* @__PURE__ */ oe({
|
|
|
10596
10591
|
class: "overflow-y-auto",
|
|
10597
10592
|
style: W(u.value)
|
|
10598
10593
|
}, [
|
|
10599
|
-
C.type === "list" ? (D(), Z(
|
|
10594
|
+
C.type === "list" ? (D(), Z(ha, {
|
|
10600
10595
|
key: 0,
|
|
10601
10596
|
ref_key: "blockList",
|
|
10602
10597
|
ref: I,
|
|
10603
10598
|
modelValue: P(p),
|
|
10604
|
-
"onUpdate:modelValue": g[1] || (g[1] = (G) =>
|
|
10599
|
+
"onUpdate:modelValue": g[1] || (g[1] = (G) => Ge(p) ? p.value = G : null),
|
|
10605
10600
|
lock: C.lock
|
|
10606
|
-
}, null, 8, ["modelValue", "lock"])) : C.type === "tree" ? (D(), Z(
|
|
10601
|
+
}, null, 8, ["modelValue", "lock"])) : C.type === "tree" ? (D(), Z(da, {
|
|
10607
10602
|
key: 1,
|
|
10608
10603
|
ref_key: "blockTree",
|
|
10609
10604
|
ref: A,
|
|
10610
10605
|
modelValue: P(p),
|
|
10611
|
-
"onUpdate:modelValue": g[2] || (g[2] = (G) =>
|
|
10612
|
-
}, null, 8, ["modelValue"])) :
|
|
10606
|
+
"onUpdate:modelValue": g[2] || (g[2] = (G) => Ge(p) ? p.value = G : null)
|
|
10607
|
+
}, null, 8, ["modelValue"])) : de("", !0),
|
|
10613
10608
|
j("div", {
|
|
10614
10609
|
style: W(r.value)
|
|
10615
10610
|
}, null, 4)
|
|
@@ -10619,15 +10614,15 @@ const na = /* @__PURE__ */ oe({
|
|
|
10619
10614
|
]),
|
|
10620
10615
|
_: 1
|
|
10621
10616
|
}, 8, ["modelValue"]),
|
|
10622
|
-
B(
|
|
10617
|
+
B(Tt, {
|
|
10623
10618
|
text: P(n)("x-block-lib.tip.hotkeyCtrlE")
|
|
10624
10619
|
}, {
|
|
10625
10620
|
activator: ee(({ props: G }) => [
|
|
10626
|
-
B(
|
|
10621
|
+
B(w, Yt(G, {
|
|
10627
10622
|
density: "comfortable",
|
|
10628
10623
|
icon: "mdi-navigation-variant",
|
|
10629
10624
|
variant: "outlined",
|
|
10630
|
-
onClick: g[7] || (g[7] = (
|
|
10625
|
+
onClick: g[7] || (g[7] = (jt) => p.value = !0)
|
|
10631
10626
|
}), null, 16)
|
|
10632
10627
|
]),
|
|
10633
10628
|
_: 1
|
|
@@ -10635,7 +10630,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10635
10630
|
], 64);
|
|
10636
10631
|
};
|
|
10637
10632
|
}
|
|
10638
|
-
}),
|
|
10633
|
+
}), yt = {
|
|
10639
10634
|
grid: {
|
|
10640
10635
|
length: 2,
|
|
10641
10636
|
snap: !0,
|
|
@@ -10650,9 +10645,9 @@ const na = /* @__PURE__ */ oe({
|
|
|
10650
10645
|
scrollbars: !0,
|
|
10651
10646
|
wheel: !0
|
|
10652
10647
|
},
|
|
10653
|
-
trashcan: !1,
|
|
10654
10648
|
readOnly: !1,
|
|
10655
10649
|
theme: "light",
|
|
10650
|
+
trashcan: !1,
|
|
10656
10651
|
zoom: {
|
|
10657
10652
|
maxScale: 1,
|
|
10658
10653
|
minScale: 0.1,
|
|
@@ -10661,22 +10656,22 @@ const na = /* @__PURE__ */ oe({
|
|
|
10661
10656
|
wheel: !0
|
|
10662
10657
|
}
|
|
10663
10658
|
};
|
|
10664
|
-
function
|
|
10665
|
-
|
|
10666
|
-
const i =
|
|
10667
|
-
return i.addChangeListener(
|
|
10659
|
+
function Ta(t, e, n, o) {
|
|
10660
|
+
yt.theme = o ? "dark" : "light", yt.toolbox = Ea(e, n);
|
|
10661
|
+
const i = To(t, yt);
|
|
10662
|
+
return i.addChangeListener(Eo.shadowBlockConversionChangeListener), ga(i, e, n), Ia(i), i;
|
|
10668
10663
|
}
|
|
10669
|
-
function
|
|
10664
|
+
function Ea(t, e) {
|
|
10670
10665
|
let n;
|
|
10671
|
-
return t === "page" ? e === "v1" && (n =
|
|
10666
|
+
return t === "page" ? e === "v1" && (n = ia) : t === "comp" ? e === "v1" && (n = ea) : t === "func" ? e === "v1" && (n = na) : t === "flow" ? e === "v1" && (n = ta) : t === "json" && e === "v1" && (n = oa), console.assert(!!n, `invalid toolbox type=${t} version=${e}`), n;
|
|
10672
10667
|
}
|
|
10673
|
-
function
|
|
10668
|
+
function ga(t, e, n) {
|
|
10674
10669
|
function o({ name: i, callback: a }) {
|
|
10675
10670
|
t.registerToolboxCategoryCallback(i, () => a(e));
|
|
10676
10671
|
}
|
|
10677
|
-
e === "page" || e === "comp" ? n === "v1" && (o(
|
|
10672
|
+
e === "page" || e === "comp" ? n === "v1" && (o(et), o(le), o(ce), o(Ze)) : e === "func" ? n === "v1" && (o(nt), o(tt), o(ot), o(le), o(ce)) : e === "flow" && n === "v1" && (o(tt), o(nt), o(ot), o(le), o(ce));
|
|
10678
10673
|
}
|
|
10679
|
-
function
|
|
10674
|
+
function Ia(t) {
|
|
10680
10675
|
const { router: e } = ie;
|
|
10681
10676
|
t.registerButtonCallback("NO_COMPUTE", () => {
|
|
10682
10677
|
const n = e.resolve({
|
|
@@ -10694,7 +10689,7 @@ function ma(t) {
|
|
|
10694
10689
|
}, 100);
|
|
10695
10690
|
});
|
|
10696
10691
|
}
|
|
10697
|
-
function
|
|
10692
|
+
function Aa(t, e) {
|
|
10698
10693
|
const n = e.newBlock("json_root_v1");
|
|
10699
10694
|
n.initSvg(), n.render();
|
|
10700
10695
|
const o = (i, a) => {
|
|
@@ -10736,7 +10731,7 @@ function Ta(t, e) {
|
|
|
10736
10731
|
new (E.get(E.FINISHED_LOADING))(e)
|
|
10737
10732
|
);
|
|
10738
10733
|
}
|
|
10739
|
-
function
|
|
10734
|
+
function Oa(t) {
|
|
10740
10735
|
const e = (o) => {
|
|
10741
10736
|
if (!o)
|
|
10742
10737
|
return null;
|
|
@@ -10768,9 +10763,9 @@ function Ea(t) {
|
|
|
10768
10763
|
if (o.type === "json_root_v1")
|
|
10769
10764
|
return e(o);
|
|
10770
10765
|
}
|
|
10771
|
-
const
|
|
10766
|
+
const Ca = { class: "position-relative w-100 h-100" }, ka = /* @__PURE__ */ oe({
|
|
10772
10767
|
__name: "index",
|
|
10773
|
-
props: /* @__PURE__ */
|
|
10768
|
+
props: /* @__PURE__ */ Nt({
|
|
10774
10769
|
type: {},
|
|
10775
10770
|
version: {},
|
|
10776
10771
|
locale: {},
|
|
@@ -10781,11 +10776,11 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
10781
10776
|
scale: { required: !0 },
|
|
10782
10777
|
scaleModifiers: {}
|
|
10783
10778
|
}),
|
|
10784
|
-
emits: /* @__PURE__ */
|
|
10779
|
+
emits: /* @__PURE__ */ Nt(["ready"], ["update:lock", "update:scale"]),
|
|
10785
10780
|
setup(t, { expose: e, emit: n }) {
|
|
10786
|
-
const { backgroundColor2: o } =
|
|
10787
|
-
|
|
10788
|
-
const C =
|
|
10781
|
+
const { backgroundColor2: o } = xe(), i = Be(t, "lock"), a = Be(t, "scale"), l = n, u = `blocklyEditor${Lt()}`, r = Ee(), p = Le("parentContainer"), I = Le("clean"), A = Le("navigator"), f = {};
|
|
10782
|
+
sa(f);
|
|
10783
|
+
const C = Ee(!0), g = Ee(!1), M = K(() => t.type === "json" ? "tree" : "list"), w = K(() => ({
|
|
10789
10784
|
width: "100%",
|
|
10790
10785
|
height: "calc(100% - 48px)"
|
|
10791
10786
|
})), q = K(() => ({
|
|
@@ -10794,7 +10789,7 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
10794
10789
|
bottom: "0px",
|
|
10795
10790
|
width: "100%",
|
|
10796
10791
|
height: "48px"
|
|
10797
|
-
})),
|
|
10792
|
+
})), pe = K(() => ({
|
|
10798
10793
|
position: "absolute",
|
|
10799
10794
|
background: t.dark ? "#0000007f" : "#ffffff7f",
|
|
10800
10795
|
top: "1px",
|
|
@@ -10802,7 +10797,7 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
10802
10797
|
width: "56px",
|
|
10803
10798
|
height: "calc(100% - 49px)",
|
|
10804
10799
|
zIndex: 999
|
|
10805
|
-
})),
|
|
10800
|
+
})), Tt = K(() => ({
|
|
10806
10801
|
position: "absolute",
|
|
10807
10802
|
top: "0px",
|
|
10808
10803
|
right: "0px",
|
|
@@ -10815,7 +10810,7 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
10815
10810
|
width: "100%",
|
|
10816
10811
|
height: "calc(100% - 48px)",
|
|
10817
10812
|
pointerEvents: "none"
|
|
10818
|
-
})),
|
|
10813
|
+
})), jt = K(() => ({
|
|
10819
10814
|
position: "absolute",
|
|
10820
10815
|
background: t.dark ? "#0000007f" : "#ffffff7f",
|
|
10821
10816
|
top: "1px",
|
|
@@ -10823,32 +10818,32 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
10823
10818
|
width: "56px",
|
|
10824
10819
|
height: "calc(100% - 49px)",
|
|
10825
10820
|
zIndex: 999
|
|
10826
|
-
})),
|
|
10821
|
+
})), wn = K(() => ({
|
|
10827
10822
|
position: "fixed",
|
|
10828
10823
|
top: 0,
|
|
10829
10824
|
left: 0,
|
|
10830
10825
|
zIndex: 3e3
|
|
10831
|
-
})), { open:
|
|
10832
|
-
|
|
10826
|
+
})), { open: ke } = Kt(`blocklyEditorFlyout${Lt()}`);
|
|
10827
|
+
Qt(async () => {
|
|
10833
10828
|
if (!r.value || !p.value) {
|
|
10834
10829
|
console.assert(!1);
|
|
10835
10830
|
return;
|
|
10836
10831
|
}
|
|
10837
|
-
|
|
10832
|
+
go(p.value), await ln(t.locale), f.workspace = Ta(r.value, t.type, t.version, t.dark), f.workspace.addChangeListener(E.disableOrphans), f.workspace.addChangeListener(Kn);
|
|
10838
10833
|
const y = document.querySelector(`#${u} .blocklyFlyout`);
|
|
10839
|
-
new MutationObserver((
|
|
10840
|
-
|
|
10841
|
-
|
|
10834
|
+
new MutationObserver((Et) => {
|
|
10835
|
+
Et.forEach((Ke) => {
|
|
10836
|
+
Ke.type === "attributes" && Ke.attributeName === "style" && (ke.value = f.workspace.getFlyout().isVisible());
|
|
10842
10837
|
});
|
|
10843
|
-
}).observe(y, { attributes: !0 }),
|
|
10844
|
-
}),
|
|
10845
|
-
|
|
10846
|
-
}),
|
|
10847
|
-
f.workspace &&
|
|
10838
|
+
}).observe(y, { attributes: !0 }), ke.value = f.workspace.getFlyout().isVisible(), Xt(), Jt(), await no(), l("ready");
|
|
10839
|
+
}), oo(() => {
|
|
10840
|
+
ke.value = !1;
|
|
10841
|
+
}), Io(r, () => {
|
|
10842
|
+
f.workspace && Ao(f.workspace);
|
|
10848
10843
|
});
|
|
10849
|
-
async function
|
|
10844
|
+
async function Kn(y) {
|
|
10850
10845
|
if (y.type === E.FINISHED_LOADING) {
|
|
10851
|
-
|
|
10846
|
+
Pn(), setTimeout(() => {
|
|
10852
10847
|
A.value?.update();
|
|
10853
10848
|
}, 0), C.value = !1;
|
|
10854
10849
|
return;
|
|
@@ -10863,98 +10858,98 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
10863
10858
|
}, 0);
|
|
10864
10859
|
}
|
|
10865
10860
|
}
|
|
10866
|
-
const
|
|
10867
|
-
C.value = !0, t.type === "json" ?
|
|
10868
|
-
},
|
|
10861
|
+
const $n = (y) => {
|
|
10862
|
+
C.value = !0, t.type === "json" ? Aa(y, f.workspace) : $.workspaces.load(y, f.workspace);
|
|
10863
|
+
}, Hn = () => t.type === "json" ? Oa(f.workspace) : $.workspaces.save(f.workspace), Gn = () => {
|
|
10869
10864
|
if (t.type === "json")
|
|
10870
10865
|
console.assert(!1);
|
|
10871
10866
|
else
|
|
10872
10867
|
return s.workspaceToCode(f.workspace);
|
|
10868
|
+
}, Xt = () => {
|
|
10869
|
+
f.workspace.setIsReadOnly(i.value), f.workspace.isReadOnly() && (ke.value = !1);
|
|
10873
10870
|
}, Jt = () => {
|
|
10874
|
-
f.workspace.setIsReadOnly(i.value), f.workspace.isReadOnly() && (Le.value = !1);
|
|
10875
|
-
}, qt = () => {
|
|
10876
10871
|
f.workspace.setScale(a.value);
|
|
10877
|
-
},
|
|
10878
|
-
f.workspace.fireChangeListener(new
|
|
10879
|
-
},
|
|
10872
|
+
}, Wn = () => {
|
|
10873
|
+
f.workspace.fireChangeListener(new gn());
|
|
10874
|
+
}, qt = (y) => {
|
|
10880
10875
|
if (y.key === "q" && y.ctrlKey) {
|
|
10881
|
-
|
|
10876
|
+
jn();
|
|
10882
10877
|
return;
|
|
10883
10878
|
}
|
|
10884
10879
|
if (y.key === "w" && y.ctrlKey) {
|
|
10885
|
-
|
|
10880
|
+
Xn();
|
|
10886
10881
|
return;
|
|
10887
10882
|
}
|
|
10888
10883
|
if (y.key === "e" && y.ctrlKey) {
|
|
10889
|
-
|
|
10884
|
+
Jn();
|
|
10890
10885
|
return;
|
|
10891
10886
|
}
|
|
10892
|
-
},
|
|
10887
|
+
}, jn = () => {
|
|
10893
10888
|
I.value?.cleanWorkspace();
|
|
10894
|
-
},
|
|
10889
|
+
}, Xn = () => {
|
|
10895
10890
|
i.value = !i.value;
|
|
10896
|
-
},
|
|
10891
|
+
}, Jn = () => {
|
|
10897
10892
|
A.value && (A.value.open = !0);
|
|
10898
10893
|
};
|
|
10899
|
-
return
|
|
10900
|
-
window.addEventListener("keydown",
|
|
10901
|
-
}),
|
|
10902
|
-
window.removeEventListener("keydown",
|
|
10903
|
-
}),
|
|
10894
|
+
return Qt(() => {
|
|
10895
|
+
window.addEventListener("keydown", qt, !1);
|
|
10896
|
+
}), rn(() => {
|
|
10897
|
+
window.removeEventListener("keydown", qt, !1);
|
|
10898
|
+
}), ve(
|
|
10904
10899
|
() => t.locale,
|
|
10905
10900
|
(y) => {
|
|
10906
|
-
|
|
10901
|
+
ln(y);
|
|
10907
10902
|
}
|
|
10908
|
-
),
|
|
10903
|
+
), ve(
|
|
10909
10904
|
() => t.dark,
|
|
10910
10905
|
(y) => {
|
|
10911
|
-
|
|
10906
|
+
Zs(y ? "dark" : "light");
|
|
10912
10907
|
}
|
|
10913
|
-
),
|
|
10908
|
+
), ve(ke, (y) => {
|
|
10914
10909
|
y || f.workspace?.hideChaff();
|
|
10915
|
-
}),
|
|
10910
|
+
}), ve(i, () => {
|
|
10911
|
+
Xt();
|
|
10912
|
+
}), ve(a, () => {
|
|
10916
10913
|
Jt();
|
|
10917
|
-
}),
|
|
10918
|
-
|
|
10919
|
-
|
|
10920
|
-
const At = V("v-icon"), We = V("x-loading");
|
|
10921
|
-
return D(), Q("div", ga, [
|
|
10914
|
+
}), e({ loading: C, load: $n, save: Hn, generateCode: Gn, fireStateChange: Wn }), (y, he) => {
|
|
10915
|
+
const Et = V("v-icon"), Ke = V("x-loading");
|
|
10916
|
+
return D(), Q("div", Ca, [
|
|
10922
10917
|
j("div", {
|
|
10923
10918
|
id: u,
|
|
10924
10919
|
ref_key: "blocklyDiv",
|
|
10925
10920
|
ref: r,
|
|
10926
|
-
style: W(
|
|
10921
|
+
style: W(w.value)
|
|
10927
10922
|
}, null, 4),
|
|
10928
10923
|
j("div", {
|
|
10929
10924
|
style: W(q.value)
|
|
10930
10925
|
}, [
|
|
10931
|
-
|
|
10926
|
+
io(y.$slots, "bottom")
|
|
10932
10927
|
], 4),
|
|
10933
10928
|
g.value ? (D(), Q("div", {
|
|
10934
10929
|
key: 0,
|
|
10935
10930
|
class: "d-flex flex-column justify-center align-center",
|
|
10936
|
-
style: W(
|
|
10931
|
+
style: W(pe.value)
|
|
10937
10932
|
}, [
|
|
10938
|
-
B(
|
|
10933
|
+
B(Et, {
|
|
10939
10934
|
icon: "mdi-delete",
|
|
10940
10935
|
size: "x-large"
|
|
10941
10936
|
})
|
|
10942
|
-
], 4)) :
|
|
10943
|
-
C.value ?
|
|
10937
|
+
], 4)) : de("", !0),
|
|
10938
|
+
C.value ? de("", !0) : (D(), Q("div", {
|
|
10944
10939
|
key: 1,
|
|
10945
10940
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
10946
|
-
style: W(
|
|
10941
|
+
style: W(Tt.value)
|
|
10947
10942
|
}, [
|
|
10948
|
-
B(
|
|
10943
|
+
B(aa, {
|
|
10949
10944
|
ref_key: "clean",
|
|
10950
10945
|
ref: I,
|
|
10951
10946
|
lock: i.value
|
|
10952
10947
|
}, null, 8, ["lock"]),
|
|
10953
|
-
B(
|
|
10948
|
+
B(ca, {
|
|
10954
10949
|
modelValue: i.value,
|
|
10955
|
-
"onUpdate:modelValue":
|
|
10950
|
+
"onUpdate:modelValue": he[0] || (he[0] = (qn) => i.value = qn)
|
|
10956
10951
|
}, null, 8, ["modelValue"]),
|
|
10957
|
-
B(
|
|
10952
|
+
B(ma, {
|
|
10958
10953
|
ref_key: "navigator",
|
|
10959
10954
|
ref: A,
|
|
10960
10955
|
lock: i.value,
|
|
@@ -10963,33 +10958,33 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
10963
10958
|
], 4)),
|
|
10964
10959
|
i.value ? (D(), Q("div", {
|
|
10965
10960
|
key: 2,
|
|
10966
|
-
style: W(
|
|
10967
|
-
}, null, 4)) :
|
|
10961
|
+
style: W(jt.value)
|
|
10962
|
+
}, null, 4)) : de("", !0),
|
|
10968
10963
|
i.value ? (D(), Q("div", {
|
|
10969
10964
|
key: 3,
|
|
10970
10965
|
style: W(G.value)
|
|
10971
|
-
}, null, 4)) :
|
|
10966
|
+
}, null, 4)) : de("", !0),
|
|
10972
10967
|
j("div", {
|
|
10973
10968
|
ref_key: "parentContainer",
|
|
10974
10969
|
ref: p,
|
|
10975
|
-
style: W(
|
|
10970
|
+
style: W(wn.value)
|
|
10976
10971
|
}, null, 4),
|
|
10977
|
-
B(
|
|
10972
|
+
B(Ke, {
|
|
10978
10973
|
open: C.value,
|
|
10979
10974
|
"z-index": 99
|
|
10980
10975
|
}, null, 8, ["open"])
|
|
10981
10976
|
]);
|
|
10982
10977
|
};
|
|
10983
10978
|
}
|
|
10984
|
-
}),
|
|
10979
|
+
}), va = /* @__PURE__ */ oe({
|
|
10985
10980
|
__name: "index",
|
|
10986
10981
|
props: {
|
|
10987
10982
|
code: {}
|
|
10988
10983
|
},
|
|
10989
10984
|
setup(t) {
|
|
10990
10985
|
const e = t;
|
|
10991
|
-
|
|
10992
|
-
const n =
|
|
10986
|
+
Oo.registerLanguage("javascript", Co);
|
|
10987
|
+
const n = ko.component, { backgroundColor2: o } = xe();
|
|
10993
10988
|
return (i, a) => {
|
|
10994
10989
|
const l = V("v-sheet");
|
|
10995
10990
|
return D(), Z(l, {
|
|
@@ -11007,10 +11002,10 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
11007
11002
|
}, 8, ["color"]);
|
|
11008
11003
|
};
|
|
11009
11004
|
}
|
|
11010
|
-
}),
|
|
11005
|
+
}), ya = { class: "text-subtitle-1" }, Na = { class: "w-100 h-100 overflow-auto" }, La = /* @__PURE__ */ oe({
|
|
11011
11006
|
__name: "index",
|
|
11012
11007
|
setup(t) {
|
|
11013
|
-
const { t: e } =
|
|
11008
|
+
const { t: e } = Fe(), { sysBarAvail: n } = En(), { backgroundColor0: o, backgroundColor2: i } = xe(), a = Ee(""), l = K(() => {
|
|
11014
11009
|
let p = 48;
|
|
11015
11010
|
return n.value && (p += 24), {
|
|
11016
11011
|
position: "relative",
|
|
@@ -11023,12 +11018,12 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
11023
11018
|
const A = V("v-sheet"), f = V("v-btn"), C = V("v-spacer"), g = V("v-dialog");
|
|
11024
11019
|
return D(), Z(g, {
|
|
11025
11020
|
modelValue: P(r),
|
|
11026
|
-
"onUpdate:modelValue": I[1] || (I[1] = (M) =>
|
|
11021
|
+
"onUpdate:modelValue": I[1] || (I[1] = (M) => Ge(r) ? r.value = M : null),
|
|
11027
11022
|
fullscreen: "",
|
|
11028
11023
|
"no-click-animation": "",
|
|
11029
11024
|
persistent: "",
|
|
11030
11025
|
transition: "dialog-bottom-transition",
|
|
11031
|
-
onKeydown: I[2] || (I[2] =
|
|
11026
|
+
onKeydown: I[2] || (I[2] = _n(Ne((M) => r.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
11032
11027
|
}, {
|
|
11033
11028
|
default: ee(() => [
|
|
11034
11029
|
B(A, {
|
|
@@ -11041,7 +11036,7 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
11041
11036
|
key: 0,
|
|
11042
11037
|
color: P(i),
|
|
11043
11038
|
height: 24
|
|
11044
|
-
}, null, 8, ["color"])) :
|
|
11039
|
+
}, null, 8, ["color"])) : de("", !0),
|
|
11045
11040
|
B(A, {
|
|
11046
11041
|
class: "d-flex align-center px-2",
|
|
11047
11042
|
color: P(i),
|
|
@@ -11054,7 +11049,7 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
11054
11049
|
variant: "text",
|
|
11055
11050
|
onClick: I[0] || (I[0] = (M) => r.value = !1)
|
|
11056
11051
|
}),
|
|
11057
|
-
j("span",
|
|
11052
|
+
j("span", ya, it(P(e)("x-block-lib.dlg.source.title")), 1),
|
|
11058
11053
|
B(C)
|
|
11059
11054
|
]),
|
|
11060
11055
|
_: 1
|
|
@@ -11062,8 +11057,8 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
11062
11057
|
j("div", {
|
|
11063
11058
|
style: W(l.value)
|
|
11064
11059
|
}, [
|
|
11065
|
-
j("div",
|
|
11066
|
-
B(
|
|
11060
|
+
j("div", Na, [
|
|
11061
|
+
B(va, { code: a.value }, null, 8, ["code"])
|
|
11067
11062
|
])
|
|
11068
11063
|
], 4)
|
|
11069
11064
|
]),
|
|
@@ -11074,16 +11069,16 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
11074
11069
|
}, 8, ["modelValue"]);
|
|
11075
11070
|
};
|
|
11076
11071
|
}
|
|
11077
|
-
}),
|
|
11078
|
-
t.component("XBlockly",
|
|
11072
|
+
}), Sa = (t) => {
|
|
11073
|
+
t.component("XBlockly", ka), t.component("XSourceDlg", La);
|
|
11079
11074
|
};
|
|
11080
|
-
async function
|
|
11081
|
-
return (await
|
|
11075
|
+
async function Va(t) {
|
|
11076
|
+
return (await Mn(/* @__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;
|
|
11082
11077
|
}
|
|
11083
|
-
const
|
|
11078
|
+
const xa = { install: Sa };
|
|
11084
11079
|
export {
|
|
11085
|
-
|
|
11086
|
-
|
|
11087
|
-
|
|
11088
|
-
|
|
11080
|
+
ka as XBlockly,
|
|
11081
|
+
xa as default,
|
|
11082
|
+
Sa as install,
|
|
11083
|
+
Va as loadLocaleMessageBlock
|
|
11089
11084
|
};
|