x-block-lib 0.8.23 → 0.8.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +758 -696
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -7,11 +7,11 @@
|
|
|
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-6cb62cd6]{opacity:.4;pointer-events:none}.blocklyToolbox{overflow-x:hidden;width:56px}.blocklyMainBackground{stroke-width:0}.blocklyToolboxCategory{margin-bottom:12px!important}.blocklyToolboxCategoryIcon{display:none!important}.blocklyTreeRowContentContainer{height:28px;display:flex;align-items:center;justify-items:center;overflow:hidden}.blocklyFlyout{z-index:21}`)),document.head.appendChild(l)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
10
|
-
import { E as I, r as En, M as Dn, s as
|
|
11
|
-
import { globalState as
|
|
12
|
-
import { globalObjects as
|
|
13
|
-
import { pkgs as ie, parsePixelStr as Xo, parsePercentStr as Jo, getPropertyTag as
|
|
14
|
-
import { provide as qo, inject as Qo, defineComponent as
|
|
10
|
+
import { E as I, r as En, M as Dn, s as Co, a as ko, X as Mn, u as C, B as g, j as s, O as r, F as O, b as $e, i as v, c as mt, d as No, e as M, f as m, g as Lo, h as K, k as dt, p as Yt, l as Z, m as gn, n as B, C as Un, N as tt, o as So, P as He, q as Me, V as kt, t as Vn, W as Bo, v as bo, w as Po, S as Ro, x as Do, y as Mo, z as Wt, T as Ae, A as xn, D as Uo, G as Vo, H as Yn, I as xo, J as Yo, K as Fo, L as wo, Q as Ko, R as $o, U as Ho, Y as Go } from "./vendor.txua272r.js";
|
|
11
|
+
import { globalState as T } from "x-state-lib";
|
|
12
|
+
import { globalObjects as yt, openConfirmDlg as Wo, openPromptDlg as jo, messageWarning as Fn, useColor as jt, useSystem as wn, useViewStack as tn, eventBus as Ct } from "x-essential-lib";
|
|
13
|
+
import { pkgs as ie, parsePixelStr as Xo, parsePercentStr as Jo, getPropertyTag as Mt, unwrapEventId as en, elements as q, makeEventId as at, toEventName as Ie, unwrapMethodId as nn, makeMethodId as ee, toMethodName as on, unwrapPropertyId as sn, makePropertyId as Zt, toPropertyName as Kn, isLocaleOfMethodKind as $n, makeTriggerId as It } from "x-runtime-lib";
|
|
14
|
+
import { provide as qo, inject as Qo, defineComponent as st, resolveComponent as D, createBlock as et, openBlock as S, unref as R, withCtx as nt, createVNode as L, mergeProps as an, useModel as Kt, ref as Nt, computed as F, resolveDirective as zo, withDirectives as Zo, createElementBlock as J, normalizeStyle as G, createElementVNode as w, createCommentVNode as ct, toDisplayString as $t, withModifiers as Ft, mergeModels as Ge, Fragment as Hn, renderList as ti, useId as We, onUnmounted as ei, useTemplateRef as wt, withKeys as Gn, isRef as ne, onMounted as An, nextTick as ni, onBeforeUnmount as In, watch as Vt, renderSlot as oi } from "vue";
|
|
15
15
|
import { useI18n as Xt } from "vue-i18n";
|
|
16
16
|
import { useDisplay as ii } from "vuetify";
|
|
17
17
|
var b = /* @__PURE__ */ ((t) => (t.STATE_CHANGE = "state_change", t))(b || {});
|
|
@@ -31,12 +31,12 @@ const jn = (t, e, n) => {
|
|
|
31
31
|
};
|
|
32
32
|
async function On(t) {
|
|
33
33
|
const e = await jn(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.o20cskr5.js"), "./msg/zhHans.ts": () => import("./msg-zhHans.cp7hd0rr.js") }), `./msg/${t}.ts`, 3);
|
|
34
|
-
|
|
34
|
+
Co(e.default);
|
|
35
35
|
}
|
|
36
36
|
function h(t) {
|
|
37
37
|
return Dn[t] ?? t;
|
|
38
38
|
}
|
|
39
|
-
const
|
|
39
|
+
const Lt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", se = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
|
|
40
40
|
function Oe(t) {
|
|
41
41
|
const e = t.lastIndexOf("V");
|
|
42
42
|
if (e <= 0 || e >= t.length - 1)
|
|
@@ -63,34 +63,34 @@ function si(t) {
|
|
|
63
63
|
function Xn(t) {
|
|
64
64
|
return t.ui === "strInput" ? "string" : t.ui === "numInput" ? "number" : t.ui === "switch" ? "boolean" : "string";
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function ye(t, e) {
|
|
67
67
|
return !!(t.startsWith("basic.") || !e.ui || e.readonly);
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function X(t) {
|
|
70
70
|
return t.startsWith("globality_v");
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function ot(t) {
|
|
73
73
|
return t.startsWith("reference_v");
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function it(t) {
|
|
76
76
|
return t.startsWith("multiple_ref_v");
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function Ue(t) {
|
|
79
79
|
const e = `<block type="text_v1"><field name="TEXT">${t}</field></block>`;
|
|
80
|
-
return
|
|
80
|
+
return C.xml.textToDom(e);
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function yn(t) {
|
|
83
83
|
const e = `<block type="math_number_v1"><field name="NUM">${t}</field></block>`;
|
|
84
|
-
return
|
|
84
|
+
return C.xml.textToDom(e);
|
|
85
85
|
}
|
|
86
86
|
function ai(t) {
|
|
87
|
-
return
|
|
87
|
+
return C.xml.textToDom('<block type="logic_boolean_v1"><field name="BOOL">FALSE</field></block>');
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function je(t, e) {
|
|
90
90
|
let n = null;
|
|
91
|
-
return e === "string" ? n =
|
|
91
|
+
return e === "string" ? n = Ue("") : e === "integer" || e === "decimal" ? n = yn(0) : e === "boolean" ? n = ai() : e === "enum" || e === "dateTime" ? n = Ue("") : console.assert(!1), n ? Mn.domToBlock(n, t) : null;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function Tt(t) {
|
|
94
94
|
return t === "string" ? "String" : t === "number" ? "Number" : t === "boolean" ? "Boolean" : t === "array" ? "Array" : t === "object" ? "Object" : (console.assert(!1), null);
|
|
95
95
|
}
|
|
96
96
|
function ci(t) {
|
|
@@ -104,7 +104,7 @@ function cn(t, e, n, o) {
|
|
|
104
104
|
<block type="parameter_v1">
|
|
105
105
|
<mutation key="${e}" name="${n}" locale="${o ? "TRUE" : "FALSE"}"/>
|
|
106
106
|
</block>
|
|
107
|
-
`, a =
|
|
107
|
+
`, a = C.xml.textToDom(i);
|
|
108
108
|
return Mn.domToBlock(a, t);
|
|
109
109
|
}
|
|
110
110
|
function Y(t, e) {
|
|
@@ -131,56 +131,56 @@ function Y(t, e) {
|
|
|
131
131
|
I.enable();
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function pt(t) {
|
|
135
135
|
const e = `<shadow type="text_v1"><field name="TEXT">${t}</field></shadow>`;
|
|
136
|
-
return
|
|
136
|
+
return C.xml.textToDom(e);
|
|
137
137
|
}
|
|
138
138
|
function ce(t) {
|
|
139
139
|
const e = `<shadow type="math_number_v1"><field name="NUM">${t}</field></shadow>`;
|
|
140
|
-
return
|
|
140
|
+
return C.xml.textToDom(e);
|
|
141
141
|
}
|
|
142
142
|
function re(t) {
|
|
143
143
|
const e = `<shadow type="logic_boolean_v1"><field name="BOOL">${t ? "TRUE" : "FALSE"}</field></shadow>`;
|
|
144
|
-
return
|
|
144
|
+
return C.xml.textToDom(e);
|
|
145
145
|
}
|
|
146
146
|
function ri() {
|
|
147
|
-
return
|
|
147
|
+
return C.xml.textToDom('<shadow type="list_create_v1"></shadow>');
|
|
148
148
|
}
|
|
149
149
|
function ui() {
|
|
150
|
-
return
|
|
150
|
+
return C.xml.textToDom('<shadow type="object_create_v1"></shadow>');
|
|
151
151
|
}
|
|
152
152
|
function li(t) {
|
|
153
153
|
const e = `<shadow type="${Oe(t)}"></shadow>`;
|
|
154
|
-
return
|
|
154
|
+
return C.xml.textToDom(e);
|
|
155
155
|
}
|
|
156
156
|
function _i(t) {
|
|
157
157
|
const e = `<shadow type="${Oe(t)}"></shadow>`;
|
|
158
|
-
return
|
|
158
|
+
return C.xml.textToDom(e);
|
|
159
159
|
}
|
|
160
160
|
function pi(t) {
|
|
161
161
|
const e = `<shadow type="color_picker_v1"><field name="COLOR">${t}</field></shadow>`;
|
|
162
|
-
return
|
|
162
|
+
return C.xml.textToDom(e);
|
|
163
163
|
}
|
|
164
164
|
function di() {
|
|
165
|
-
return
|
|
165
|
+
return C.xml.textToDom('<shadow type="select_comp_v1"></shadow>');
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function Et(t) {
|
|
168
168
|
let e = null;
|
|
169
|
-
return t === "string" ? e =
|
|
169
|
+
return t === "string" ? e = pt("") : t === "number" ? e = ce(0) : t === "boolean" ? e = re(!1) : t === "array" ? e = ri() : t === "object" ? e = ui() : console.assert(!1), e;
|
|
170
170
|
}
|
|
171
171
|
function hi(t) {
|
|
172
172
|
let e = null;
|
|
173
|
-
return t.ui === "dummy" ? console.assert(!0) : t.ui === "strInput" ? e =
|
|
173
|
+
return t.ui === "dummy" ? console.assert(!0) : t.ui === "strInput" ? e = pt(t.default) : t.ui === "numInput" ? e = ce(t.default) : t.ui === "switch" ? e = re(t.default) : t.ui === "select" ? e = li(t.items) : t.ui === "multiTypes" ? e = _i(t.types) : t.ui === "compSelect" ? e = di() : t.ui === "colorPicker" ? e = pi(t.default ?? "#ff0000") : console.assert(!1), e;
|
|
174
174
|
}
|
|
175
175
|
function fi() {
|
|
176
|
-
const { activeObject: t, activePage: e } =
|
|
176
|
+
const { activeObject: t, activePage: e } = T.app, n = [];
|
|
177
177
|
if (t.type === "page")
|
|
178
178
|
for (const { id: o, name: i, type: a } of e.meta.arguments)
|
|
179
179
|
n.push({ key: o, name: i, type: a });
|
|
180
180
|
return n;
|
|
181
181
|
}
|
|
182
182
|
function vn(t) {
|
|
183
|
-
const { activeObject: e, activePage: n } =
|
|
183
|
+
const { activeObject: e, activePage: n } = T.app;
|
|
184
184
|
if (e.type === "page") {
|
|
185
185
|
const o = n.meta.arguments.find((i) => i.id === t);
|
|
186
186
|
if (o)
|
|
@@ -240,7 +240,7 @@ const Ti = {
|
|
|
240
240
|
this.argument.key = e.key, this.argument.name = e.name, this.argument.type = e.type, this.updateShape_();
|
|
241
241
|
},
|
|
242
242
|
updateShape_: function() {
|
|
243
|
-
this.setOutput(!0,
|
|
243
|
+
this.setOutput(!0, Tt(this.argument.type));
|
|
244
244
|
},
|
|
245
245
|
checkWarning_: function() {
|
|
246
246
|
const t = vn(this.argument.key);
|
|
@@ -255,14 +255,14 @@ const Ti = {
|
|
|
255
255
|
this.setWarningText(null);
|
|
256
256
|
}
|
|
257
257
|
};
|
|
258
|
-
|
|
258
|
+
g.get_page_argument_v1 = Ti;
|
|
259
259
|
s.forBlock.get_page_argument_v1 = function(t) {
|
|
260
260
|
const e = t;
|
|
261
261
|
return [`__getPageArgumentV1__(${s.quote_(e.argument.key)})`, r.FUNCTION_CALL];
|
|
262
262
|
};
|
|
263
263
|
const Ei = (t, e) => {
|
|
264
264
|
const n = Oe(t), o = ae(t);
|
|
265
|
-
|
|
265
|
+
g[n] = {
|
|
266
266
|
init: function() {
|
|
267
267
|
this.appendDummyInput().appendField(
|
|
268
268
|
new O(() => this.genOpts_()),
|
|
@@ -270,7 +270,7 @@ const Ei = (t, e) => {
|
|
|
270
270
|
), this.setOutput(!0, o), this.setStyle("property_blocks"), this.setTooltip(""), this.setHelpUrl("");
|
|
271
271
|
},
|
|
272
272
|
genOpts_: function() {
|
|
273
|
-
const { i18n: i } =
|
|
273
|
+
const { i18n: i } = yt, a = [];
|
|
274
274
|
for (const { title: c, value: u } of e)
|
|
275
275
|
a.push([i.global.t(c), u]);
|
|
276
276
|
return k(a);
|
|
@@ -287,7 +287,7 @@ for (const t in ie) {
|
|
|
287
287
|
}
|
|
288
288
|
const gi = (t, e) => {
|
|
289
289
|
const n = Oe(t), o = ae(t);
|
|
290
|
-
|
|
290
|
+
g[n] = {
|
|
291
291
|
init: function() {
|
|
292
292
|
this.value = e[0].default ?? "", this.appendDummyInput("DUMMY").appendField(
|
|
293
293
|
new O(() => this.genOpts_()),
|
|
@@ -303,7 +303,7 @@ const gi = (t, e) => {
|
|
|
303
303
|
}, 0);
|
|
304
304
|
},
|
|
305
305
|
genOpts_: function() {
|
|
306
|
-
const { i18n: i } =
|
|
306
|
+
const { i18n: i } = yt, a = [];
|
|
307
307
|
for (const { title: c, value: u } of e)
|
|
308
308
|
a.push([i.global.t(c), u]);
|
|
309
309
|
return k(a);
|
|
@@ -339,7 +339,7 @@ const gi = (t, e) => {
|
|
|
339
339
|
let u, l;
|
|
340
340
|
if (c.ui === "pixelInput") {
|
|
341
341
|
const _ = Xo(this.value) ?? 0;
|
|
342
|
-
u = new
|
|
342
|
+
u = new $e(
|
|
343
343
|
_,
|
|
344
344
|
c.min,
|
|
345
345
|
c.max,
|
|
@@ -350,7 +350,7 @@ const gi = (t, e) => {
|
|
|
350
350
|
), l = "px";
|
|
351
351
|
} else if (c.ui === "percentInput") {
|
|
352
352
|
const _ = Jo(this.value) ?? 0;
|
|
353
|
-
u = new
|
|
353
|
+
u = new $e(
|
|
354
354
|
_,
|
|
355
355
|
c.min,
|
|
356
356
|
c.max,
|
|
@@ -380,24 +380,24 @@ for (const t in ie) {
|
|
|
380
380
|
for (const n in e.types)
|
|
381
381
|
gi(n, e.types[n]);
|
|
382
382
|
}
|
|
383
|
-
const Ai =
|
|
383
|
+
const Ai = C.xml, Ii = {
|
|
384
384
|
init: function() {
|
|
385
385
|
this.appendDummyInput().appendField(
|
|
386
386
|
"%{BKY_APP_V1_APP_BIND_CONTAINER_TITLE}"
|
|
387
387
|
), this.appendStatementInput("STACK"), this.setStyle("event_blocks"), this.contextMenu = !1;
|
|
388
388
|
}
|
|
389
389
|
};
|
|
390
|
-
|
|
390
|
+
g.app_bind_container_v1 = Ii;
|
|
391
391
|
const Oi = {
|
|
392
392
|
init: function() {
|
|
393
393
|
this.appendDummyInput().appendField("%{BKY_APP_V1_APP_BIND_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("event_blocks"), this.contextMenu = !1;
|
|
394
394
|
}
|
|
395
395
|
};
|
|
396
|
-
|
|
397
|
-
const
|
|
396
|
+
g.app_bind_item_v1 = Oi;
|
|
397
|
+
const yi = {
|
|
398
398
|
init: function() {
|
|
399
399
|
this.itemCount_ = 0, this.setMutator(
|
|
400
|
-
new
|
|
400
|
+
new mt.MutatorIcon(
|
|
401
401
|
["app_bind_item_v1"],
|
|
402
402
|
this
|
|
403
403
|
)
|
|
@@ -512,15 +512,15 @@ const Ci = {
|
|
|
512
512
|
this.setWarningText(null);
|
|
513
513
|
}
|
|
514
514
|
};
|
|
515
|
-
|
|
515
|
+
g.app_bind_v1 = yi;
|
|
516
516
|
s.forBlock.app_bind_v1 = function() {
|
|
517
517
|
return "";
|
|
518
518
|
};
|
|
519
519
|
function qn() {
|
|
520
|
-
return
|
|
520
|
+
return T.app.appList;
|
|
521
521
|
}
|
|
522
|
-
function
|
|
523
|
-
return
|
|
522
|
+
function Cn(t) {
|
|
523
|
+
return T.app.appList.find((e) => e.id === t);
|
|
524
524
|
}
|
|
525
525
|
function vi() {
|
|
526
526
|
const t = [];
|
|
@@ -528,18 +528,18 @@ function vi() {
|
|
|
528
528
|
t.push([o, n]);
|
|
529
529
|
}), k(t);
|
|
530
530
|
}
|
|
531
|
-
function
|
|
532
|
-
const e =
|
|
531
|
+
function Xe(t) {
|
|
532
|
+
const e = T.app.appList.find((n) => n.id === t);
|
|
533
533
|
return e ? e.pages : [];
|
|
534
534
|
}
|
|
535
|
-
function
|
|
536
|
-
const n =
|
|
535
|
+
function Ve(t, e) {
|
|
536
|
+
const n = T.app.appList.find((o) => o.id === t);
|
|
537
537
|
if (n)
|
|
538
538
|
return n.pages.find((o) => o.id === e);
|
|
539
539
|
}
|
|
540
|
-
function
|
|
540
|
+
function Ci(t) {
|
|
541
541
|
const e = [];
|
|
542
|
-
return
|
|
542
|
+
return Xe(t).forEach(({ id: o, name: i }) => {
|
|
543
543
|
e.push([i, o]);
|
|
544
544
|
}), k(e);
|
|
545
545
|
}
|
|
@@ -550,120 +550,120 @@ const Qn = {
|
|
|
550
550
|
position: 0
|
|
551
551
|
};
|
|
552
552
|
function zn() {
|
|
553
|
-
const { comps: t } =
|
|
553
|
+
const { comps: t } = T.app.activeApp;
|
|
554
554
|
return [Qn, ...t];
|
|
555
555
|
}
|
|
556
556
|
function kn(t) {
|
|
557
|
-
return t === "" ? Qn :
|
|
557
|
+
return t === "" ? Qn : T.app.activeApp.comps.find((e) => e.id === t);
|
|
558
558
|
}
|
|
559
559
|
function ki() {
|
|
560
|
-
const { i18n: t } =
|
|
560
|
+
const { i18n: t } = yt, e = [];
|
|
561
561
|
return zn().forEach(({ id: o, name: i }) => {
|
|
562
562
|
let a = i;
|
|
563
563
|
o === "" && (a = t.global.t("x-runtime-lib.notSet")), e.push([a, o]);
|
|
564
564
|
}), k(e);
|
|
565
565
|
}
|
|
566
|
-
function
|
|
566
|
+
function bt(t) {
|
|
567
567
|
const e = [];
|
|
568
568
|
for (const { id: n, name: o, type: i } of t)
|
|
569
569
|
e.push({ key: n, name: o, type: i });
|
|
570
570
|
return e;
|
|
571
571
|
}
|
|
572
|
-
function
|
|
572
|
+
function rt(t) {
|
|
573
573
|
return [
|
|
574
574
|
{ key: "newValue", name: "x-runtime-lib.newValue", type: t },
|
|
575
575
|
{ key: "oldValue", name: "x-runtime-lib.oldValue", type: t }
|
|
576
576
|
];
|
|
577
577
|
}
|
|
578
|
-
function
|
|
579
|
-
const { properties: e } =
|
|
578
|
+
function Je(t) {
|
|
579
|
+
const { properties: e } = T.runtime, { activeObject: n, activePage: o, activeComp: i, depends: a } = T.app, c = [], u = Mt(n.type, n.subtype);
|
|
580
580
|
if (!u)
|
|
581
581
|
return c;
|
|
582
582
|
const l = n.nodes.find((d) => d.id === t);
|
|
583
583
|
if (!l)
|
|
584
584
|
return c;
|
|
585
|
-
const _ =
|
|
585
|
+
const _ = q[l.key];
|
|
586
586
|
if (!_)
|
|
587
587
|
return console.assert(!1, "invalid element", l.key), c;
|
|
588
588
|
for (const { key: d, name: f, params: p } of _.events)
|
|
589
589
|
c.push({
|
|
590
|
-
id:
|
|
590
|
+
id: at("elementEvent", t, d),
|
|
591
591
|
kind: "elementEvent",
|
|
592
592
|
names: [f],
|
|
593
593
|
params: p
|
|
594
594
|
});
|
|
595
|
-
if (
|
|
595
|
+
if (ot(_.key) && l.reference && l.reference.comp) {
|
|
596
596
|
const d = a[l.reference.comp];
|
|
597
597
|
if (d)
|
|
598
|
-
for (const { id: f, name: p, params:
|
|
598
|
+
for (const { id: f, name: p, params: E } of d.meta.events)
|
|
599
599
|
c.push({
|
|
600
|
-
id:
|
|
600
|
+
id: at("referenceEvent", t, f),
|
|
601
601
|
kind: "referenceEvent",
|
|
602
602
|
names: [p],
|
|
603
|
-
params:
|
|
603
|
+
params: bt(E)
|
|
604
604
|
});
|
|
605
605
|
}
|
|
606
|
-
if (
|
|
606
|
+
if (it(_.key) && l.reference && l.reference.comp) {
|
|
607
607
|
const d = a[l.reference.comp];
|
|
608
608
|
if (d)
|
|
609
|
-
for (const { id: f, name: p, params:
|
|
609
|
+
for (const { id: f, name: p, params: E } of d.meta.events)
|
|
610
610
|
c.push({
|
|
611
|
-
id:
|
|
611
|
+
id: at("multipleRefEvent", t, f),
|
|
612
612
|
kind: "multipleRefEvent",
|
|
613
613
|
names: [p],
|
|
614
|
-
params:
|
|
614
|
+
params: bt(E)
|
|
615
615
|
});
|
|
616
616
|
}
|
|
617
617
|
if (e[_.key] && e[_.key][u])
|
|
618
618
|
for (const { keys: d, names: f, raw: p } of e[_.key][u])
|
|
619
|
-
|
|
620
|
-
id:
|
|
619
|
+
ye(d, p) || c.push({
|
|
620
|
+
id: at("elementPropertyChangeEvent", t, d),
|
|
621
621
|
kind: "elementPropertyChangeEvent",
|
|
622
622
|
names: f,
|
|
623
|
-
params:
|
|
623
|
+
params: rt(Xn(p))
|
|
624
624
|
});
|
|
625
|
-
if (
|
|
625
|
+
if (X(_.key) && n.type === "comp")
|
|
626
626
|
for (const { id: d, name: f, type: p } of i.meta.properties)
|
|
627
627
|
c.push({
|
|
628
|
-
id:
|
|
628
|
+
id: at("customPropertyChangeEvent", t, d),
|
|
629
629
|
kind: "customPropertyChangeEvent",
|
|
630
630
|
names: [f],
|
|
631
|
-
params:
|
|
631
|
+
params: rt(p)
|
|
632
632
|
});
|
|
633
|
-
if (
|
|
633
|
+
if (X(_.key)) {
|
|
634
634
|
if (n.type === "page")
|
|
635
635
|
for (const { id: d, name: f, type: p } of o.meta.states)
|
|
636
636
|
c.push({
|
|
637
|
-
id:
|
|
637
|
+
id: at("stateChangeEvent", "globality", d),
|
|
638
638
|
kind: "stateChangeEvent",
|
|
639
639
|
names: [f],
|
|
640
|
-
params:
|
|
640
|
+
params: rt(p)
|
|
641
641
|
});
|
|
642
642
|
else if (n.type === "comp")
|
|
643
643
|
for (const { id: d, name: f, type: p } of i.meta.states)
|
|
644
644
|
c.push({
|
|
645
|
-
id:
|
|
645
|
+
id: at("stateChangeEvent", "globality", d),
|
|
646
646
|
kind: "stateChangeEvent",
|
|
647
647
|
names: [f],
|
|
648
|
-
params:
|
|
648
|
+
params: rt(p)
|
|
649
649
|
});
|
|
650
650
|
}
|
|
651
651
|
return c;
|
|
652
652
|
}
|
|
653
|
-
function
|
|
654
|
-
const { properties: e } =
|
|
653
|
+
function xe(t) {
|
|
654
|
+
const { properties: e } = T.runtime, { activeObject: n, activePage: o, activeComp: i, depends: a } = T.app, c = Mt(n.type, n.subtype);
|
|
655
655
|
if (!c)
|
|
656
656
|
return;
|
|
657
|
-
const { kind: u, nodeId: l, eventKey: _ } =
|
|
657
|
+
const { kind: u, nodeId: l, eventKey: _ } = en(t), d = n.nodes.find((p) => p.id === l);
|
|
658
658
|
if (!d)
|
|
659
659
|
return;
|
|
660
|
-
const f =
|
|
660
|
+
const f = q[d.key];
|
|
661
661
|
if (!f) {
|
|
662
662
|
console.assert(!1, "invalid element", d.key);
|
|
663
663
|
return;
|
|
664
664
|
}
|
|
665
665
|
if (u === "elementEvent") {
|
|
666
|
-
const p = f.events.find((
|
|
666
|
+
const p = f.events.find((E) => E.key === _);
|
|
667
667
|
if (p)
|
|
668
668
|
return {
|
|
669
669
|
id: t,
|
|
@@ -672,105 +672,105 @@ function Ve(t) {
|
|
|
672
672
|
params: p.params
|
|
673
673
|
};
|
|
674
674
|
} else if (u === "referenceEvent") {
|
|
675
|
-
if (
|
|
675
|
+
if (ot(f.key) && d.reference && d.reference.comp) {
|
|
676
676
|
const p = a[d.reference.comp];
|
|
677
677
|
if (p) {
|
|
678
|
-
const
|
|
679
|
-
if (
|
|
678
|
+
const E = p.meta.events.find((A) => A.id === _);
|
|
679
|
+
if (E)
|
|
680
680
|
return {
|
|
681
681
|
id: t,
|
|
682
682
|
kind: u,
|
|
683
|
-
names: [
|
|
684
|
-
params:
|
|
683
|
+
names: [E.name],
|
|
684
|
+
params: bt(E.params)
|
|
685
685
|
};
|
|
686
686
|
}
|
|
687
687
|
}
|
|
688
688
|
} else if (u === "multipleRefEvent") {
|
|
689
|
-
if (
|
|
689
|
+
if (it(f.key) && d.reference && d.reference.comp) {
|
|
690
690
|
const p = a[d.reference.comp];
|
|
691
691
|
if (p) {
|
|
692
|
-
const
|
|
693
|
-
if (
|
|
692
|
+
const E = p.meta.events.find((A) => A.id === _);
|
|
693
|
+
if (E)
|
|
694
694
|
return {
|
|
695
695
|
id: t,
|
|
696
696
|
kind: u,
|
|
697
|
-
names: [
|
|
698
|
-
params:
|
|
697
|
+
names: [E.name],
|
|
698
|
+
params: bt(E.params)
|
|
699
699
|
};
|
|
700
700
|
}
|
|
701
701
|
}
|
|
702
702
|
} else if (u === "elementPropertyChangeEvent") {
|
|
703
703
|
if (e[f.key] && e[f.key][c]) {
|
|
704
704
|
const p = e[f.key][c].find(
|
|
705
|
-
(
|
|
705
|
+
(E) => E.keys === _
|
|
706
706
|
);
|
|
707
707
|
if (p)
|
|
708
708
|
return {
|
|
709
709
|
id: t,
|
|
710
710
|
kind: u,
|
|
711
711
|
names: p.names,
|
|
712
|
-
params:
|
|
712
|
+
params: rt(Xn(p.raw))
|
|
713
713
|
};
|
|
714
714
|
}
|
|
715
715
|
} else if (u === "customPropertyChangeEvent") {
|
|
716
|
-
if (
|
|
716
|
+
if (X(f.key) && n.type === "comp") {
|
|
717
717
|
const p = i.meta.properties.find(
|
|
718
|
-
(
|
|
718
|
+
(E) => E.id === _
|
|
719
719
|
);
|
|
720
720
|
if (p)
|
|
721
721
|
return {
|
|
722
722
|
id: t,
|
|
723
723
|
kind: u,
|
|
724
724
|
names: [p.name],
|
|
725
|
-
params:
|
|
725
|
+
params: rt(p.type)
|
|
726
726
|
};
|
|
727
727
|
}
|
|
728
|
-
} else if (u === "stateChangeEvent" &&
|
|
728
|
+
} else if (u === "stateChangeEvent" && X(f.key)) {
|
|
729
729
|
if (n.type === "page") {
|
|
730
730
|
const p = o.meta.states.find(
|
|
731
|
-
(
|
|
731
|
+
(E) => E.id === _
|
|
732
732
|
);
|
|
733
733
|
if (p)
|
|
734
734
|
return {
|
|
735
735
|
id: t,
|
|
736
736
|
kind: u,
|
|
737
737
|
names: [p.name],
|
|
738
|
-
params:
|
|
738
|
+
params: rt(p.type)
|
|
739
739
|
};
|
|
740
740
|
} else if (n.type === "comp") {
|
|
741
741
|
const p = i.meta.states.find(
|
|
742
|
-
(
|
|
742
|
+
(E) => E.id === _
|
|
743
743
|
);
|
|
744
744
|
if (p)
|
|
745
745
|
return {
|
|
746
746
|
id: t,
|
|
747
747
|
kind: u,
|
|
748
748
|
names: [p.name],
|
|
749
|
-
params:
|
|
749
|
+
params: rt(p.type)
|
|
750
750
|
};
|
|
751
751
|
}
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
754
|
function Ni(t) {
|
|
755
|
-
const e = [], n =
|
|
755
|
+
const e = [], n = Je(t);
|
|
756
756
|
for (const { id: o, kind: i, names: a } of n)
|
|
757
757
|
e.push([Ie(i, a), o]);
|
|
758
758
|
return k(e);
|
|
759
759
|
}
|
|
760
760
|
function Zn() {
|
|
761
|
-
const { activeObject: t, activeComp: e } =
|
|
761
|
+
const { activeObject: t, activeComp: e } = T.app, n = [];
|
|
762
762
|
if (t.type === "comp")
|
|
763
763
|
for (const { id: o, name: i, params: a } of e.meta.events)
|
|
764
764
|
n.push({
|
|
765
|
-
id:
|
|
765
|
+
id: at("customEvent", "globality", o),
|
|
766
766
|
kind: "customEvent",
|
|
767
767
|
names: [i],
|
|
768
|
-
params:
|
|
768
|
+
params: bt(a)
|
|
769
769
|
});
|
|
770
770
|
return n;
|
|
771
771
|
}
|
|
772
772
|
function Nn(t) {
|
|
773
|
-
const { activeObject: e, activeComp: n } =
|
|
773
|
+
const { activeObject: e, activeComp: n } = T.app, { kind: o, nodeId: i, eventKey: a } = en(t);
|
|
774
774
|
if (o === "customEvent" && i === "globality" && e.type === "comp") {
|
|
775
775
|
const c = n.meta.events.find(
|
|
776
776
|
(u) => u.id === a
|
|
@@ -780,7 +780,7 @@ function Nn(t) {
|
|
|
780
780
|
id: t,
|
|
781
781
|
kind: o,
|
|
782
782
|
names: [c.name],
|
|
783
|
-
params:
|
|
783
|
+
params: bt(c.params)
|
|
784
784
|
};
|
|
785
785
|
}
|
|
786
786
|
}
|
|
@@ -790,23 +790,23 @@ function Li() {
|
|
|
790
790
|
t.push([Ie(o, i), n]);
|
|
791
791
|
return k(t);
|
|
792
792
|
}
|
|
793
|
-
function
|
|
793
|
+
function Pt(t) {
|
|
794
794
|
const e = [];
|
|
795
795
|
for (const { id: n, name: o, type: i } of t)
|
|
796
796
|
e.push({ key: n, name: o, type: i });
|
|
797
797
|
return e;
|
|
798
798
|
}
|
|
799
|
-
function
|
|
799
|
+
function Rt(t) {
|
|
800
800
|
const e = [];
|
|
801
801
|
for (const { id: n, name: o, type: i } of t)
|
|
802
802
|
e.push({ key: n, name: o, type: i });
|
|
803
803
|
return e;
|
|
804
804
|
}
|
|
805
|
-
function
|
|
806
|
-
const { activeObject: e, depends: n } =
|
|
805
|
+
function qe(t) {
|
|
806
|
+
const { activeObject: e, depends: n } = T.app, o = [], i = e.nodes.find((c) => c.id === t);
|
|
807
807
|
if (!i)
|
|
808
808
|
return o;
|
|
809
|
-
const a =
|
|
809
|
+
const a = q[i.key];
|
|
810
810
|
if (!a)
|
|
811
811
|
return console.assert(!1, "inavlid element", i.key), o;
|
|
812
812
|
for (const { key: c, name: u, inputs: l, outputs: _ } of a.methods)
|
|
@@ -817,7 +817,7 @@ function Je(t) {
|
|
|
817
817
|
inputs: l,
|
|
818
818
|
outputs: _
|
|
819
819
|
});
|
|
820
|
-
if (
|
|
820
|
+
if (ot(a.key) && i.reference && i.reference.comp) {
|
|
821
821
|
const c = n[i.reference.comp];
|
|
822
822
|
if (c)
|
|
823
823
|
for (const { id: u, name: l, inputs: _, outputs: d } of c.meta.methods)
|
|
@@ -825,11 +825,11 @@ function Je(t) {
|
|
|
825
825
|
id: ee("referenceMethod", t, u),
|
|
826
826
|
kind: "referenceMethod",
|
|
827
827
|
names: [l],
|
|
828
|
-
inputs:
|
|
829
|
-
outputs:
|
|
828
|
+
inputs: Pt(_),
|
|
829
|
+
outputs: Rt(d)
|
|
830
830
|
});
|
|
831
831
|
}
|
|
832
|
-
if (
|
|
832
|
+
if (it(a.key) && i.reference && i.reference.comp) {
|
|
833
833
|
const c = n[i.reference.comp];
|
|
834
834
|
if (c)
|
|
835
835
|
for (const { id: u, name: l, inputs: _, outputs: d } of c.meta.methods)
|
|
@@ -837,17 +837,17 @@ function Je(t) {
|
|
|
837
837
|
id: ee("multipleRefMethod", t, u),
|
|
838
838
|
kind: "multipleRefMethod",
|
|
839
839
|
names: [l],
|
|
840
|
-
inputs:
|
|
841
|
-
outputs:
|
|
840
|
+
inputs: Pt(_),
|
|
841
|
+
outputs: Rt(d)
|
|
842
842
|
});
|
|
843
843
|
}
|
|
844
|
-
return
|
|
844
|
+
return X(a.key) && e.type, o;
|
|
845
845
|
}
|
|
846
|
-
function
|
|
847
|
-
const { activeObject: e, depends: n } =
|
|
846
|
+
function Ye(t) {
|
|
847
|
+
const { activeObject: e, depends: n } = T.app, { kind: o, nodeId: i, methodKey: a } = nn(t), c = e.nodes.find((l) => l.id === i);
|
|
848
848
|
if (!c)
|
|
849
849
|
return;
|
|
850
|
-
const u =
|
|
850
|
+
const u = q[c.key];
|
|
851
851
|
if (!u) {
|
|
852
852
|
console.assert(!1, "invalid element", c.key);
|
|
853
853
|
return;
|
|
@@ -863,7 +863,7 @@ function xe(t) {
|
|
|
863
863
|
outputs: l.outputs
|
|
864
864
|
};
|
|
865
865
|
} else if (o === "referenceMethod") {
|
|
866
|
-
if (
|
|
866
|
+
if (ot(u.key) && c.reference && c.reference.comp) {
|
|
867
867
|
const l = n[c.reference.comp];
|
|
868
868
|
if (l) {
|
|
869
869
|
const _ = l.meta.methods.find(
|
|
@@ -874,12 +874,12 @@ function xe(t) {
|
|
|
874
874
|
id: t,
|
|
875
875
|
kind: o,
|
|
876
876
|
names: [_.name],
|
|
877
|
-
inputs:
|
|
878
|
-
outputs:
|
|
877
|
+
inputs: Pt(_.inputs),
|
|
878
|
+
outputs: Rt(_.outputs)
|
|
879
879
|
};
|
|
880
880
|
}
|
|
881
881
|
}
|
|
882
|
-
} else if (o === "multipleRefMethod" &&
|
|
882
|
+
} else if (o === "multipleRefMethod" && it(u.key) && c.reference && c.reference.comp) {
|
|
883
883
|
const l = n[c.reference.comp];
|
|
884
884
|
if (l) {
|
|
885
885
|
const _ = l.meta.methods.find(
|
|
@@ -890,33 +890,33 @@ function xe(t) {
|
|
|
890
890
|
id: t,
|
|
891
891
|
kind: o,
|
|
892
892
|
names: [_.name],
|
|
893
|
-
inputs:
|
|
894
|
-
outputs:
|
|
893
|
+
inputs: Pt(_.inputs),
|
|
894
|
+
outputs: Rt(_.outputs)
|
|
895
895
|
};
|
|
896
896
|
}
|
|
897
897
|
}
|
|
898
898
|
}
|
|
899
899
|
function Si(t) {
|
|
900
|
-
const e = [], n =
|
|
900
|
+
const e = [], n = qe(t);
|
|
901
901
|
for (const { id: o, kind: i, names: a } of n)
|
|
902
|
-
e.push([
|
|
902
|
+
e.push([on(i, a), o]);
|
|
903
903
|
return k(e);
|
|
904
904
|
}
|
|
905
905
|
function rn() {
|
|
906
|
-
const { activeObject: t, activeComp: e } =
|
|
906
|
+
const { activeObject: t, activeComp: e } = T.app, n = [];
|
|
907
907
|
if (t.type === "comp")
|
|
908
908
|
for (const { id: o, name: i, inputs: a, outputs: c } of e.meta.methods)
|
|
909
909
|
n.push({
|
|
910
910
|
id: ee("customMethod", "globality", o),
|
|
911
911
|
kind: "customMethod",
|
|
912
912
|
names: [i],
|
|
913
|
-
inputs:
|
|
914
|
-
outputs:
|
|
913
|
+
inputs: Pt(a),
|
|
914
|
+
outputs: Rt(c)
|
|
915
915
|
});
|
|
916
916
|
return n;
|
|
917
917
|
}
|
|
918
|
-
function
|
|
919
|
-
const { activeObject: e, activeComp: n } =
|
|
918
|
+
function Dt(t) {
|
|
919
|
+
const { activeObject: e, activeComp: n } = T.app, { kind: o, nodeId: i, methodKey: a } = nn(t);
|
|
920
920
|
if (o === "customMethod" && i === "globality" && e.type === "comp") {
|
|
921
921
|
const c = n.meta.methods.find(
|
|
922
922
|
(u) => u.id === a
|
|
@@ -926,80 +926,142 @@ function Pt(t) {
|
|
|
926
926
|
id: t,
|
|
927
927
|
kind: o,
|
|
928
928
|
names: [c.name],
|
|
929
|
-
inputs:
|
|
930
|
-
outputs:
|
|
929
|
+
inputs: Pt(c.inputs),
|
|
930
|
+
outputs: Rt(c.outputs)
|
|
931
931
|
};
|
|
932
932
|
}
|
|
933
933
|
}
|
|
934
934
|
function to() {
|
|
935
935
|
const t = [], e = rn();
|
|
936
936
|
for (const { id: n, kind: o, names: i } of e)
|
|
937
|
-
t.push([
|
|
937
|
+
t.push([on(o, i), n]);
|
|
938
938
|
return k(t);
|
|
939
939
|
}
|
|
940
|
-
function
|
|
941
|
-
const e =
|
|
940
|
+
function Qe(t) {
|
|
941
|
+
const e = Dt(t);
|
|
942
942
|
return e ? e.outputs : [];
|
|
943
943
|
}
|
|
944
|
-
function
|
|
945
|
-
const n =
|
|
944
|
+
function Fe(t, e) {
|
|
945
|
+
const n = Dt(t);
|
|
946
946
|
if (n)
|
|
947
947
|
return n.outputs.find((o) => o.key === e);
|
|
948
948
|
}
|
|
949
949
|
function Bi(t) {
|
|
950
|
-
const e = [], n =
|
|
950
|
+
const e = [], n = Qe(t);
|
|
951
951
|
for (const { name: o, key: i } of n)
|
|
952
952
|
e.push([o, i]);
|
|
953
953
|
return k(e);
|
|
954
954
|
}
|
|
955
|
-
function bi(t, e) {
|
|
956
|
-
|
|
955
|
+
function bi(t, e, n) {
|
|
956
|
+
const { properties: o } = T.runtime, { activeObject: i, activePage: a, activeComp: c, depends: u } = T.app;
|
|
957
|
+
if (t.events.length > 0)
|
|
958
|
+
return !1;
|
|
959
|
+
if (ot(t.key) && n) {
|
|
960
|
+
const l = u[n];
|
|
961
|
+
if (l && l.meta.events.length > 0)
|
|
962
|
+
return !1;
|
|
963
|
+
}
|
|
964
|
+
if (it(t.key) && n) {
|
|
965
|
+
const l = u[n];
|
|
966
|
+
if (l && l.meta.events.length > 0)
|
|
967
|
+
return !1;
|
|
968
|
+
}
|
|
969
|
+
if (o[t.key] && o[t.key][e]) {
|
|
970
|
+
for (const { keys: l, raw: _ } of o[t.key][e])
|
|
971
|
+
if (!ye(l, _))
|
|
972
|
+
return !1;
|
|
973
|
+
}
|
|
974
|
+
if (X(t.key) && i.type === "comp" && c.meta.properties.length > 0)
|
|
975
|
+
return !1;
|
|
976
|
+
if (X(t.key)) {
|
|
977
|
+
if (i.type === "page") {
|
|
978
|
+
if (a.meta.states.length > 0)
|
|
979
|
+
return !1;
|
|
980
|
+
} else if (i.type === "comp" && c.meta.states.length > 0)
|
|
981
|
+
return !1;
|
|
982
|
+
}
|
|
983
|
+
return !0;
|
|
957
984
|
}
|
|
958
985
|
function Pi(t, e) {
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
986
|
+
const { activeObject: n, depends: o } = T.app;
|
|
987
|
+
if (t.methods.length > 0)
|
|
988
|
+
return !1;
|
|
989
|
+
if (ot(t.key) && e) {
|
|
990
|
+
const i = o[e];
|
|
991
|
+
if (i && i.meta.methods.length > 0)
|
|
992
|
+
return !1;
|
|
993
|
+
}
|
|
994
|
+
if (it(t.key) && e) {
|
|
995
|
+
const i = o[e];
|
|
996
|
+
if (i && i.meta.methods.length > 0)
|
|
997
|
+
return !1;
|
|
998
|
+
}
|
|
999
|
+
return X(t.key) && n.type, !0;
|
|
964
1000
|
}
|
|
965
|
-
function
|
|
966
|
-
const { properties:
|
|
967
|
-
if (
|
|
968
|
-
|
|
969
|
-
|
|
1001
|
+
function Ri(t, e, n) {
|
|
1002
|
+
const { properties: o } = T.runtime, { activeObject: i, activeComp: a, depends: c } = T.app;
|
|
1003
|
+
if (o[t.key] && o[t.key][e] && o[t.key][e].length > 0)
|
|
1004
|
+
return !1;
|
|
1005
|
+
if (ot(t.key) && n) {
|
|
1006
|
+
const u = c[n];
|
|
1007
|
+
if (u && u.meta.properties.length > 0)
|
|
1008
|
+
return !1;
|
|
1009
|
+
}
|
|
1010
|
+
if (it(t.key) && n) {
|
|
1011
|
+
const u = c[n];
|
|
1012
|
+
if (u && u.meta.properties.length > 0)
|
|
1013
|
+
return !1;
|
|
1014
|
+
}
|
|
1015
|
+
return !(X(t.key) && i.type === "comp" && a.meta.properties.length > 0);
|
|
1016
|
+
}
|
|
1017
|
+
function Di(t, e, n) {
|
|
1018
|
+
const { properties: o } = T.runtime, { activeObject: i, activeComp: a, depends: c } = T.app;
|
|
1019
|
+
if (o[t.key] && o[t.key][e]) {
|
|
1020
|
+
for (const { keys: u, raw: l } of o[t.key][e])
|
|
1021
|
+
if (!ye(u, l))
|
|
970
1022
|
return !1;
|
|
971
1023
|
}
|
|
972
|
-
|
|
1024
|
+
if (ot(t.key) && n) {
|
|
1025
|
+
const u = c[n];
|
|
1026
|
+
if (u && u.meta.properties.length > 0)
|
|
1027
|
+
return !1;
|
|
1028
|
+
}
|
|
1029
|
+
if (it(t.key) && n) {
|
|
1030
|
+
const u = c[n];
|
|
1031
|
+
if (u && u.meta.properties.length > 0)
|
|
1032
|
+
return !1;
|
|
1033
|
+
}
|
|
1034
|
+
return !(X(t.key) && i.type === "comp" && a.meta.properties.length > 0);
|
|
973
1035
|
}
|
|
974
|
-
function eo(t, e, n) {
|
|
975
|
-
return
|
|
1036
|
+
function eo(t, e, n, o) {
|
|
1037
|
+
return t ? t === "onEvent" ? bi(e, n, o) : t === "callMethod" ? Pi(e, o) : t === "getProperty" ? Ri(e, n, o) : t === "setProperty" ? Di(e, n, o) : !1 : !1;
|
|
976
1038
|
}
|
|
977
1039
|
function W(t) {
|
|
978
|
-
const { activeObject: e } =
|
|
1040
|
+
const { activeObject: e } = T.app, n = Mt(e.type, e.subtype);
|
|
979
1041
|
if (!n)
|
|
980
1042
|
return !1;
|
|
981
1043
|
for (const o of e.nodes) {
|
|
982
|
-
const i =
|
|
1044
|
+
const i = q[o.key];
|
|
983
1045
|
if (!i) {
|
|
984
1046
|
console.assert(!1, "invalid element", o.key);
|
|
985
1047
|
continue;
|
|
986
1048
|
}
|
|
987
|
-
if (!eo(i, n,
|
|
1049
|
+
if (!eo(t, i, n, o.reference?.comp))
|
|
988
1050
|
return !0;
|
|
989
1051
|
}
|
|
990
1052
|
return !1;
|
|
991
1053
|
}
|
|
992
1054
|
function Jt(t) {
|
|
993
|
-
const { activeObject: e } =
|
|
1055
|
+
const { activeObject: e } = T.app, n = [], o = Mt(e.type, e.subtype);
|
|
994
1056
|
if (!o)
|
|
995
1057
|
return n;
|
|
996
1058
|
for (const i of e.nodes) {
|
|
997
|
-
const a =
|
|
1059
|
+
const a = q[i.key];
|
|
998
1060
|
if (!a) {
|
|
999
1061
|
console.assert(!1, "invalid element", i.key);
|
|
1000
1062
|
continue;
|
|
1001
1063
|
}
|
|
1002
|
-
eo(a, o,
|
|
1064
|
+
eo(t, a, o, i.reference?.comp) || n.push({
|
|
1003
1065
|
id: i.id,
|
|
1004
1066
|
key: i.key,
|
|
1005
1067
|
name: a.name,
|
|
@@ -1008,11 +1070,11 @@ function Jt(t) {
|
|
|
1008
1070
|
}
|
|
1009
1071
|
return n;
|
|
1010
1072
|
}
|
|
1011
|
-
function
|
|
1012
|
-
const { activeObject: e } =
|
|
1073
|
+
function ht(t) {
|
|
1074
|
+
const { activeObject: e } = T.app, n = e.nodes.find((i) => i.id === t);
|
|
1013
1075
|
if (!n)
|
|
1014
1076
|
return;
|
|
1015
|
-
const o =
|
|
1077
|
+
const o = q[n.key];
|
|
1016
1078
|
if (!o) {
|
|
1017
1079
|
console.assert(!1, "invalid element", n.key);
|
|
1018
1080
|
return;
|
|
@@ -1024,27 +1086,27 @@ function _t(t) {
|
|
|
1024
1086
|
alias: n.alias
|
|
1025
1087
|
};
|
|
1026
1088
|
}
|
|
1027
|
-
function
|
|
1028
|
-
const { i18n: e } =
|
|
1089
|
+
function ve(t) {
|
|
1090
|
+
const { i18n: e } = yt, n = [], o = Jt(t);
|
|
1029
1091
|
for (const { id: i, name: a, alias: c } of o) {
|
|
1030
1092
|
let u = e.global.t(a);
|
|
1031
1093
|
c && (u += " / " + c), n.push([u, i]);
|
|
1032
1094
|
}
|
|
1033
1095
|
return k(n);
|
|
1034
1096
|
}
|
|
1035
|
-
function
|
|
1036
|
-
const { properties: n } =
|
|
1097
|
+
function Ht(t, e) {
|
|
1098
|
+
const { properties: n } = T.runtime, { activeObject: o, activeComp: i, depends: a } = T.app, c = [], u = Mt(o.type, o.subtype);
|
|
1037
1099
|
if (!u)
|
|
1038
1100
|
return c;
|
|
1039
1101
|
const l = o.nodes.find((d) => d.id === t);
|
|
1040
1102
|
if (!l)
|
|
1041
1103
|
return c;
|
|
1042
|
-
const _ =
|
|
1104
|
+
const _ = q[l.key];
|
|
1043
1105
|
if (!_)
|
|
1044
1106
|
return console.assert(!1, "invalid element", l.key), c;
|
|
1045
1107
|
if (n[_.key] && n[_.key][u])
|
|
1046
1108
|
for (const { keys: d, names: f, raw: p } of n[_.key][u])
|
|
1047
|
-
e === "write" &&
|
|
1109
|
+
e === "write" && ye(d, p) || c.push({
|
|
1048
1110
|
id: Zt("elementProperty", t, d),
|
|
1049
1111
|
kind: "elementProperty",
|
|
1050
1112
|
names: f,
|
|
@@ -1053,33 +1115,33 @@ function $t(t, e) {
|
|
|
1053
1115
|
raw: p
|
|
1054
1116
|
}
|
|
1055
1117
|
});
|
|
1056
|
-
if (
|
|
1118
|
+
if (ot(_.key) && l.reference && l.reference.comp) {
|
|
1057
1119
|
const d = a[l.reference.comp];
|
|
1058
1120
|
if (d)
|
|
1059
|
-
for (const { id: f, name: p, type:
|
|
1121
|
+
for (const { id: f, name: p, type: E } of d.meta.properties)
|
|
1060
1122
|
c.push({
|
|
1061
1123
|
id: Zt("referenceProperty", t, f),
|
|
1062
1124
|
kind: "referenceProperty",
|
|
1063
1125
|
names: [p],
|
|
1064
1126
|
meta: {
|
|
1065
|
-
raw: { type:
|
|
1127
|
+
raw: { type: E }
|
|
1066
1128
|
}
|
|
1067
1129
|
});
|
|
1068
1130
|
}
|
|
1069
|
-
if (
|
|
1131
|
+
if (it(_.key) && l.reference && l.reference.comp) {
|
|
1070
1132
|
const d = a[l.reference.comp];
|
|
1071
1133
|
if (d)
|
|
1072
|
-
for (const { id: f, name: p, type:
|
|
1134
|
+
for (const { id: f, name: p, type: E } of d.meta.properties)
|
|
1073
1135
|
c.push({
|
|
1074
1136
|
id: Zt("multipleRefProperty", t, f),
|
|
1075
1137
|
kind: "multipleRefProperty",
|
|
1076
1138
|
names: [p],
|
|
1077
1139
|
meta: {
|
|
1078
|
-
raw: { type:
|
|
1140
|
+
raw: { type: E }
|
|
1079
1141
|
}
|
|
1080
1142
|
});
|
|
1081
1143
|
}
|
|
1082
|
-
if (
|
|
1144
|
+
if (X(_.key) && o.type === "comp")
|
|
1083
1145
|
for (const { id: d, name: f, type: p } of i.meta.properties)
|
|
1084
1146
|
c.push({
|
|
1085
1147
|
id: Zt("customProperty", t, d),
|
|
@@ -1091,14 +1153,14 @@ function $t(t, e) {
|
|
|
1091
1153
|
});
|
|
1092
1154
|
return c;
|
|
1093
1155
|
}
|
|
1094
|
-
function
|
|
1095
|
-
const { properties: e } =
|
|
1156
|
+
function Ot(t) {
|
|
1157
|
+
const { properties: e } = T.runtime, { activeObject: n, activeComp: o, depends: i } = T.app, a = Mt(n.type, n.subtype);
|
|
1096
1158
|
if (!a)
|
|
1097
1159
|
return;
|
|
1098
|
-
const { kind: c, nodeId: u, propertyKey: l } =
|
|
1160
|
+
const { kind: c, nodeId: u, propertyKey: l } = sn(t), _ = n.nodes.find((f) => f.id === u);
|
|
1099
1161
|
if (!_)
|
|
1100
1162
|
return;
|
|
1101
|
-
const d =
|
|
1163
|
+
const d = q[_.key];
|
|
1102
1164
|
if (!d) {
|
|
1103
1165
|
console.assert(!1, "invalid element", _.key);
|
|
1104
1166
|
return;
|
|
@@ -1120,11 +1182,11 @@ function gt(t) {
|
|
|
1120
1182
|
};
|
|
1121
1183
|
}
|
|
1122
1184
|
} else if (c === "referenceProperty") {
|
|
1123
|
-
if (
|
|
1185
|
+
if (ot(d.key) && _.reference && _.reference.comp) {
|
|
1124
1186
|
const f = i[_.reference.comp];
|
|
1125
1187
|
if (f) {
|
|
1126
1188
|
const p = f.meta.properties.find(
|
|
1127
|
-
(
|
|
1189
|
+
(E) => E.id === l
|
|
1128
1190
|
);
|
|
1129
1191
|
if (p)
|
|
1130
1192
|
return {
|
|
@@ -1138,11 +1200,11 @@ function gt(t) {
|
|
|
1138
1200
|
}
|
|
1139
1201
|
}
|
|
1140
1202
|
} else if (c === "multipleRefProperty") {
|
|
1141
|
-
if (
|
|
1203
|
+
if (it(d.key) && _.reference && _.reference.comp) {
|
|
1142
1204
|
const f = i[_.reference.comp];
|
|
1143
1205
|
if (f) {
|
|
1144
1206
|
const p = f.meta.properties.find(
|
|
1145
|
-
(
|
|
1207
|
+
(E) => E.id === l
|
|
1146
1208
|
);
|
|
1147
1209
|
if (p)
|
|
1148
1210
|
return {
|
|
@@ -1155,7 +1217,7 @@ function gt(t) {
|
|
|
1155
1217
|
};
|
|
1156
1218
|
}
|
|
1157
1219
|
}
|
|
1158
|
-
} else if (c === "customProperty" &&
|
|
1220
|
+
} else if (c === "customProperty" && X(d.key) && n.type === "comp") {
|
|
1159
1221
|
const f = o.meta.properties.find(
|
|
1160
1222
|
(p) => p.id === l
|
|
1161
1223
|
);
|
|
@@ -1171,17 +1233,17 @@ function gt(t) {
|
|
|
1171
1233
|
}
|
|
1172
1234
|
}
|
|
1173
1235
|
function no(t, e) {
|
|
1174
|
-
const n = [], o =
|
|
1236
|
+
const n = [], o = Ht(t, e);
|
|
1175
1237
|
for (const { id: i, kind: a, names: c } of o)
|
|
1176
1238
|
n.push([Kn(a, c), i]);
|
|
1177
1239
|
return k(n);
|
|
1178
1240
|
}
|
|
1179
1241
|
function un() {
|
|
1180
|
-
const { activeObject: t, activePage: e, activeComp: n } =
|
|
1242
|
+
const { activeObject: t, activePage: e, activeComp: n } = T.app;
|
|
1181
1243
|
return t.type === "page" ? e.meta.states : t.type === "comp" ? n.meta.states : [];
|
|
1182
1244
|
}
|
|
1183
1245
|
function ue(t) {
|
|
1184
|
-
const { activeObject: e, activePage: n, activeComp: o } =
|
|
1246
|
+
const { activeObject: e, activePage: n, activeComp: o } = T.app;
|
|
1185
1247
|
if (e.type === "page")
|
|
1186
1248
|
return n.meta.states.find((i) => i.id === t);
|
|
1187
1249
|
if (e.type === "comp")
|
|
@@ -1218,7 +1280,7 @@ const Mi = {
|
|
|
1218
1280
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
1219
1281
|
const e = this.getField("NODE");
|
|
1220
1282
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
1221
|
-
const n =
|
|
1283
|
+
const n = Je(this.node.id)?.[0];
|
|
1222
1284
|
if (!n)
|
|
1223
1285
|
return;
|
|
1224
1286
|
this.event.id = n.id, this.event.kind = n.kind, this.event.names = n.names, this.event.params = n.params;
|
|
@@ -1237,7 +1299,7 @@ const Mi = {
|
|
|
1237
1299
|
}, 0);
|
|
1238
1300
|
},
|
|
1239
1301
|
genNodeOpts_: function() {
|
|
1240
|
-
return
|
|
1302
|
+
return ve("onEvent");
|
|
1241
1303
|
},
|
|
1242
1304
|
genEventOpts_: function() {
|
|
1243
1305
|
return Ni(this.node.id);
|
|
@@ -1253,7 +1315,7 @@ const Mi = {
|
|
|
1253
1315
|
}
|
|
1254
1316
|
},
|
|
1255
1317
|
onNodeChange_: function(t) {
|
|
1256
|
-
const e =
|
|
1318
|
+
const e = ht(t);
|
|
1257
1319
|
if (!e) {
|
|
1258
1320
|
console.assert(!1);
|
|
1259
1321
|
return;
|
|
@@ -1261,14 +1323,14 @@ const Mi = {
|
|
|
1261
1323
|
const n = this.node.key !== e.key;
|
|
1262
1324
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
1263
1325
|
const o = this.getField("EVENT");
|
|
1264
|
-
if (o.getOptions(!1), n || !
|
|
1265
|
-
const i =
|
|
1326
|
+
if (o.getOptions(!1), n || !xe(this.event.id)) {
|
|
1327
|
+
const i = Je(this.node.id)?.[0];
|
|
1266
1328
|
o.setValue(i?.id ?? "");
|
|
1267
1329
|
}
|
|
1268
1330
|
this.onEventChange_(o.getValue());
|
|
1269
1331
|
},
|
|
1270
1332
|
onEventChange_: function(t) {
|
|
1271
|
-
const e =
|
|
1333
|
+
const e = xe(t);
|
|
1272
1334
|
e ? (this.event.id = e.id, this.event.kind = e.kind, this.event.names = e.names, this.event.params = e.params) : (this.event.id = "", this.event.kind = "", this.event.names = [], this.event.params = []), this.updateShape_(), setTimeout(() => {
|
|
1273
1335
|
this.ensureBlocks_();
|
|
1274
1336
|
}, 0);
|
|
@@ -1280,8 +1342,8 @@ const Mi = {
|
|
|
1280
1342
|
}
|
|
1281
1343
|
for (let e = 0; e < this.event.params.length; e++)
|
|
1282
1344
|
this.getInput("PARAM" + e) || (this.appendValueInput("PARAM" + e), this.moveInputBefore("PARAM" + e, "HANDLE"));
|
|
1283
|
-
const { kind: t } =
|
|
1284
|
-
if (t === "
|
|
1345
|
+
const { kind: t } = en(this.event.id);
|
|
1346
|
+
if (t === "multipleRefEvent")
|
|
1285
1347
|
this.getInput("REF_KEY") || this.appendValueInput("REF_KEY"), this.event.params.length > 0 ? this.moveInputBefore("REF_KEY", "PARAM0") : this.moveInputBefore("REF_KEY", "HANDLE");
|
|
1286
1348
|
else if (this.getInput("REF_KEY")) {
|
|
1287
1349
|
const e = this.getInput("REF_KEY").connection.targetBlock();
|
|
@@ -1292,14 +1354,14 @@ const Mi = {
|
|
|
1292
1354
|
if (this.isInsertionMarker())
|
|
1293
1355
|
return;
|
|
1294
1356
|
const t = [];
|
|
1295
|
-
this.event.kind === "referenceEvent" && t.push(["REF_KEY", "
|
|
1357
|
+
this.event.kind === "referenceEvent" && t.push(["REF_KEY", "__refKey__", "x-runtime-lib.refKey", !0]);
|
|
1296
1358
|
let e = !0;
|
|
1297
1359
|
(this.event.kind === "referenceEvent" || this.event.kind === "customEvent") && (e = !1), this.event.params.forEach(({ key: n, name: o }, i) => {
|
|
1298
|
-
t.push(["PARAM" + i, n
|
|
1360
|
+
t.push(["PARAM" + i, `__param$${n}__`, o, e]);
|
|
1299
1361
|
}), t.length > 0 && Y(this, t);
|
|
1300
1362
|
},
|
|
1301
1363
|
checkWarning_: function() {
|
|
1302
|
-
const t =
|
|
1364
|
+
const t = ht(this.node.id);
|
|
1303
1365
|
if (!t) {
|
|
1304
1366
|
this.setWarningText(h("WARN_NODE_NOT_FOUND"));
|
|
1305
1367
|
return;
|
|
@@ -1309,7 +1371,7 @@ const Mi = {
|
|
|
1309
1371
|
return;
|
|
1310
1372
|
}
|
|
1311
1373
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
1312
|
-
const e =
|
|
1374
|
+
const e = xe(this.event.id);
|
|
1313
1375
|
if (!e) {
|
|
1314
1376
|
this.setWarningText(h("WARN_EVENT_NOT_FOUND"));
|
|
1315
1377
|
return;
|
|
@@ -1325,12 +1387,12 @@ const Mi = {
|
|
|
1325
1387
|
this.setWarningText(null);
|
|
1326
1388
|
}
|
|
1327
1389
|
};
|
|
1328
|
-
|
|
1390
|
+
g.on_app_event_v1 = Mi;
|
|
1329
1391
|
s.forBlock.on_app_event_v1 = function(t) {
|
|
1330
1392
|
const e = s.quote_, n = t;
|
|
1331
1393
|
let o = "";
|
|
1332
1394
|
n.event.params.forEach((c, u) => {
|
|
1333
|
-
u !== 0 && (o += ", "), o += c.key
|
|
1395
|
+
u !== 0 && (o += ", "), o += `__param$${c.key}__`;
|
|
1334
1396
|
});
|
|
1335
1397
|
const i = s.statementToCode(n, "HANDLE");
|
|
1336
1398
|
return `__onEventV1__(${e(n.event.id)}, function(${o}) {
|
|
@@ -1398,14 +1460,14 @@ const Ui = {
|
|
|
1398
1460
|
e.connection.setShadowDom(null);
|
|
1399
1461
|
const n = e.connection.targetBlock();
|
|
1400
1462
|
n && !n.isShadow() && n.dispose();
|
|
1401
|
-
const { type: o } = this.event.params[t], i =
|
|
1463
|
+
const { type: o } = this.event.params[t], i = Tt(o);
|
|
1402
1464
|
e.setCheck(i);
|
|
1403
1465
|
}
|
|
1404
1466
|
},
|
|
1405
1467
|
updateShadows_: function() {
|
|
1406
1468
|
if (!this.isInsertionMarker())
|
|
1407
1469
|
for (let t = 0; t < this.event.params.length; t++) {
|
|
1408
|
-
const e = this.event.params[t], n =
|
|
1470
|
+
const e = this.event.params[t], n = Et(e.type);
|
|
1409
1471
|
this.getInput("PARAM" + t)?.connection?.setShadowDom(n);
|
|
1410
1472
|
}
|
|
1411
1473
|
},
|
|
@@ -1426,10 +1488,10 @@ const Ui = {
|
|
|
1426
1488
|
this.setWarningText(null);
|
|
1427
1489
|
}
|
|
1428
1490
|
};
|
|
1429
|
-
|
|
1491
|
+
g.trigger_app_event_v1 = Ui;
|
|
1430
1492
|
s.forBlock.trigger_app_event_v1 = function(t) {
|
|
1431
1493
|
const e = s.quote_;
|
|
1432
|
-
return `
|
|
1494
|
+
return `__triggerParentEventV1__(${e(t.event.id)});
|
|
1433
1495
|
`;
|
|
1434
1496
|
};
|
|
1435
1497
|
m([
|
|
@@ -1495,9 +1557,9 @@ const Vi = {
|
|
|
1495
1557
|
updateShadow_: function() {
|
|
1496
1558
|
if (this.isInsertionMarker())
|
|
1497
1559
|
return;
|
|
1498
|
-
const t =
|
|
1560
|
+
const t = pt("title");
|
|
1499
1561
|
this.getInput("TITLE").connection.setShadowDom(t);
|
|
1500
|
-
const e =
|
|
1562
|
+
const e = pt("text");
|
|
1501
1563
|
this.getInput("TEXT").connection.setShadowDom(e);
|
|
1502
1564
|
},
|
|
1503
1565
|
ensureBlocks_: function() {
|
|
@@ -1506,7 +1568,7 @@ const Vi = {
|
|
|
1506
1568
|
]);
|
|
1507
1569
|
}
|
|
1508
1570
|
};
|
|
1509
|
-
|
|
1571
|
+
g.open_confirm_dlg_v1 = Vi;
|
|
1510
1572
|
s.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
1511
1573
|
const e = s.valueToCode(t, "TITLE", r.ATOMIC), n = s.valueToCode(t, "TEXT", r.ATOMIC), o = s.statementToCode(t, "HANDLE");
|
|
1512
1574
|
return `{
|
|
@@ -1532,11 +1594,11 @@ const xi = {
|
|
|
1532
1594
|
updateShadow_: function() {
|
|
1533
1595
|
if (this.isInsertionMarker())
|
|
1534
1596
|
return;
|
|
1535
|
-
const t =
|
|
1597
|
+
const t = pt("title");
|
|
1536
1598
|
this.getInput("TITLE").connection.setShadowDom(t);
|
|
1537
|
-
const e =
|
|
1599
|
+
const e = pt("label");
|
|
1538
1600
|
this.getInput("LABEL").connection.setShadowDom(e);
|
|
1539
|
-
const n =
|
|
1601
|
+
const n = pt("");
|
|
1540
1602
|
this.getInput("VALUE").connection.setShadowDom(n);
|
|
1541
1603
|
},
|
|
1542
1604
|
ensureBlocks_: function() {
|
|
@@ -1545,7 +1607,7 @@ const xi = {
|
|
|
1545
1607
|
]);
|
|
1546
1608
|
}
|
|
1547
1609
|
};
|
|
1548
|
-
|
|
1610
|
+
g.open_prompt_dlg_v1 = xi;
|
|
1549
1611
|
s.forBlock.open_prompt_dlg_v1 = function(t) {
|
|
1550
1612
|
const e = s.valueToCode(t, "TITLE", r.ATOMIC), n = s.valueToCode(t, "LABEL", r.ATOMIC), o = s.valueToCode(t, "VALUE", r.ATOMIC), i = s.statementToCode(t, "HANDLE");
|
|
1551
1613
|
return `{
|
|
@@ -1611,7 +1673,7 @@ const Yi = {
|
|
|
1611
1673
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
1612
1674
|
const e = this.getField("NODE");
|
|
1613
1675
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
1614
|
-
const n =
|
|
1676
|
+
const n = qe(this.node.id)?.[0];
|
|
1615
1677
|
if (!n)
|
|
1616
1678
|
return;
|
|
1617
1679
|
this.method.id = n.id, this.method.kind = n.kind, this.method.names = n.names, this.method.inputs = n.inputs, this.method.outputs = n.outputs;
|
|
@@ -1630,7 +1692,7 @@ const Yi = {
|
|
|
1630
1692
|
}, 0);
|
|
1631
1693
|
},
|
|
1632
1694
|
genNodeOpts_: function() {
|
|
1633
|
-
return
|
|
1695
|
+
return ve("callMethod");
|
|
1634
1696
|
},
|
|
1635
1697
|
genMethodOpts_: function() {
|
|
1636
1698
|
return Si(this.node.id);
|
|
@@ -1646,7 +1708,7 @@ const Yi = {
|
|
|
1646
1708
|
}
|
|
1647
1709
|
},
|
|
1648
1710
|
onNodeChange_: function(t) {
|
|
1649
|
-
const e =
|
|
1711
|
+
const e = ht(t);
|
|
1650
1712
|
if (!e) {
|
|
1651
1713
|
console.assert(!1);
|
|
1652
1714
|
return;
|
|
@@ -1654,14 +1716,14 @@ const Yi = {
|
|
|
1654
1716
|
const n = this.node.key !== e.key;
|
|
1655
1717
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
1656
1718
|
const o = this.getField("METHOD");
|
|
1657
|
-
if (o.getOptions(!1), n || !
|
|
1658
|
-
const i =
|
|
1719
|
+
if (o.getOptions(!1), n || !Ye(this.method.id)) {
|
|
1720
|
+
const i = qe(this.node.id)?.[0];
|
|
1659
1721
|
o.setValue(i?.id ?? "");
|
|
1660
1722
|
}
|
|
1661
1723
|
this.onMethodChange_(o.getValue());
|
|
1662
1724
|
},
|
|
1663
1725
|
onMethodChange_: function(t) {
|
|
1664
|
-
const e =
|
|
1726
|
+
const e = Ye(t);
|
|
1665
1727
|
e ? (this.method.id = e.id, this.method.kind = e.kind, this.method.names = e.names, this.method.inputs = e.inputs, this.method.outputs = e.outputs) : (this.method.id = "", this.method.kind = "", this.method.names = [], this.method.inputs = [], this.method.outputs = []), this.updateShape_(), this.updateShadow_(), setTimeout(() => {
|
|
1666
1728
|
this.ensureBlocks_();
|
|
1667
1729
|
}, 0);
|
|
@@ -1697,22 +1759,22 @@ const Yi = {
|
|
|
1697
1759
|
const e = this.method.inputs[t];
|
|
1698
1760
|
if (!e.type)
|
|
1699
1761
|
continue;
|
|
1700
|
-
const n =
|
|
1762
|
+
const n = Et(e.type);
|
|
1701
1763
|
this.getInput("INPUT" + t).setShadowDom(n);
|
|
1702
1764
|
}
|
|
1703
1765
|
},
|
|
1704
1766
|
ensureBlocks_: function() {
|
|
1705
1767
|
if (this.isInsertionMarker())
|
|
1706
1768
|
return;
|
|
1707
|
-
const { kind: t } =
|
|
1769
|
+
const { kind: t } = nn(this.method.id), e = $n(t), n = [];
|
|
1708
1770
|
for (let o = 0; o < this.method.outputs.length; o++) {
|
|
1709
1771
|
const { key: i, name: a } = this.method.outputs[o];
|
|
1710
|
-
n.push(["OUTPUT" + o, i
|
|
1772
|
+
n.push(["OUTPUT" + o, `__output$${i}__`, a, e]);
|
|
1711
1773
|
}
|
|
1712
1774
|
n.length > 0 && Y(this, n);
|
|
1713
1775
|
},
|
|
1714
1776
|
checkWarning_: function() {
|
|
1715
|
-
const t =
|
|
1777
|
+
const t = ht(this.node.id);
|
|
1716
1778
|
if (!t) {
|
|
1717
1779
|
this.setWarningText(h("WARN_NODE_NOT_FOUND"));
|
|
1718
1780
|
return;
|
|
@@ -1722,7 +1784,7 @@ const Yi = {
|
|
|
1722
1784
|
return;
|
|
1723
1785
|
}
|
|
1724
1786
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
1725
|
-
const e =
|
|
1787
|
+
const e = Ye(this.method.id);
|
|
1726
1788
|
if (!e) {
|
|
1727
1789
|
this.setWarningText(h("WARN_METHOD_NOT_FOUND"));
|
|
1728
1790
|
return;
|
|
@@ -1742,7 +1804,7 @@ const Yi = {
|
|
|
1742
1804
|
this.setWarningText(null);
|
|
1743
1805
|
}
|
|
1744
1806
|
};
|
|
1745
|
-
|
|
1807
|
+
g.call_app_method_v1 = Yi;
|
|
1746
1808
|
s.forBlock.call_app_method_v1 = function(t) {
|
|
1747
1809
|
const e = s.quote_, n = t;
|
|
1748
1810
|
if (n.method.outputs.length > 0) {
|
|
@@ -1799,7 +1861,7 @@ const Fi = {
|
|
|
1799
1861
|
}
|
|
1800
1862
|
},
|
|
1801
1863
|
onMethodChange_: function(t) {
|
|
1802
|
-
const e =
|
|
1864
|
+
const e = Dt(t);
|
|
1803
1865
|
e ? (this.method.id = e.id, this.method.kind = e.kind, this.method.names = e.names, this.method.inputs = e.inputs) : (this.method.id = "", this.method.kind = "", this.method.names = [], this.method.inputs = []), this.updateShape_(), setTimeout(() => {
|
|
1804
1866
|
this.ensureBlocks_();
|
|
1805
1867
|
}, 0);
|
|
@@ -1815,15 +1877,15 @@ const Fi = {
|
|
|
1815
1877
|
ensureBlocks_: function() {
|
|
1816
1878
|
if (this.isInsertionMarker() || !this.method.id)
|
|
1817
1879
|
return;
|
|
1818
|
-
const t =
|
|
1880
|
+
const t = $n(this.method.kind), e = [];
|
|
1819
1881
|
for (let n = 0; n < this.method.inputs.length; n++) {
|
|
1820
1882
|
const { key: o, name: i } = this.method.inputs[n];
|
|
1821
|
-
e.push(["INPUT" + n, o
|
|
1883
|
+
e.push(["INPUT" + n, `__input$${o}__`, i, t]);
|
|
1822
1884
|
}
|
|
1823
1885
|
Y(this, e);
|
|
1824
1886
|
},
|
|
1825
1887
|
checkWarning_: function() {
|
|
1826
|
-
const t =
|
|
1888
|
+
const t = Dt(this.method.id);
|
|
1827
1889
|
if (!t) {
|
|
1828
1890
|
this.setWarningText(h("WARN_METHOD_NOT_FOUND"));
|
|
1829
1891
|
return;
|
|
@@ -1839,7 +1901,7 @@ const Fi = {
|
|
|
1839
1901
|
this.setWarningText(null);
|
|
1840
1902
|
}
|
|
1841
1903
|
};
|
|
1842
|
-
|
|
1904
|
+
g.impl_app_method_v1 = Fi;
|
|
1843
1905
|
s.forBlock.impl_app_method_v1 = function(t) {
|
|
1844
1906
|
const e = t;
|
|
1845
1907
|
return `{
|
|
@@ -1873,7 +1935,7 @@ const wi = {
|
|
|
1873
1935
|
this.method.id = t.id, this.method.kind = t.kind, this.method.names = t.names;
|
|
1874
1936
|
const e = this.getField("METHOD");
|
|
1875
1937
|
e.getOptions(!1), e.setValue(this.method.id);
|
|
1876
|
-
const n =
|
|
1938
|
+
const n = Qe(this.method.id)?.[0];
|
|
1877
1939
|
if (!n)
|
|
1878
1940
|
return;
|
|
1879
1941
|
this.output.key = n.key, this.output.name = n.name, this.output.type = n.type;
|
|
@@ -1907,7 +1969,7 @@ const wi = {
|
|
|
1907
1969
|
}
|
|
1908
1970
|
},
|
|
1909
1971
|
onMethodChange_: function(t) {
|
|
1910
|
-
const e =
|
|
1972
|
+
const e = Dt(t);
|
|
1911
1973
|
if (!e) {
|
|
1912
1974
|
console.assert(!1);
|
|
1913
1975
|
return;
|
|
@@ -1915,14 +1977,14 @@ const wi = {
|
|
|
1915
1977
|
const n = this.method.id !== e.id;
|
|
1916
1978
|
this.method.id = e.id, this.method.kind = e.kind, this.method.names = e.names;
|
|
1917
1979
|
const o = this.getField("OUTPUT");
|
|
1918
|
-
if (o.getOptions(!1), n || !
|
|
1919
|
-
const i =
|
|
1980
|
+
if (o.getOptions(!1), n || !Fe(this.method.id, this.output.key)) {
|
|
1981
|
+
const i = Qe(this.method.id)?.[0];
|
|
1920
1982
|
o.setValue(i?.key ?? "");
|
|
1921
1983
|
}
|
|
1922
1984
|
this.onOutputChange_(o.getValue());
|
|
1923
1985
|
},
|
|
1924
1986
|
onOutputChange_: function(t) {
|
|
1925
|
-
const e =
|
|
1987
|
+
const e = Fe(this.method.id, t);
|
|
1926
1988
|
e ? (this.output.key = e.key, this.output.name = e.name, this.output.type = e.type) : (this.output.key = "", this.output.name = "", this.output.type = "string");
|
|
1927
1989
|
},
|
|
1928
1990
|
updateShape_: function() {
|
|
@@ -1930,17 +1992,17 @@ const wi = {
|
|
|
1930
1992
|
t.connection.setShadowDom(null);
|
|
1931
1993
|
const e = t.connection.targetBlock();
|
|
1932
1994
|
e && !e.isShadow() && e.dispose();
|
|
1933
|
-
const n =
|
|
1995
|
+
const n = Tt(this.output.type);
|
|
1934
1996
|
t.setCheck(n);
|
|
1935
1997
|
},
|
|
1936
1998
|
updateShadows_: function() {
|
|
1937
1999
|
if (this.isInsertionMarker())
|
|
1938
2000
|
return;
|
|
1939
|
-
const t =
|
|
2001
|
+
const t = Et(this.output.type);
|
|
1940
2002
|
this.getInput("VALUE").connection.setShadowDom(t);
|
|
1941
2003
|
},
|
|
1942
2004
|
checkWarning_: function() {
|
|
1943
|
-
const t =
|
|
2005
|
+
const t = Dt(this.method.id);
|
|
1944
2006
|
if (!t) {
|
|
1945
2007
|
this.setWarningText(h("WARN_METHOD_NOT_FOUND"));
|
|
1946
2008
|
return;
|
|
@@ -1950,7 +2012,7 @@ const wi = {
|
|
|
1950
2012
|
return;
|
|
1951
2013
|
}
|
|
1952
2014
|
t.names !== this.method.names && (this.method.names = t.names);
|
|
1953
|
-
const e =
|
|
2015
|
+
const e = Fe(this.method.id, this.output.key);
|
|
1954
2016
|
if (!e) {
|
|
1955
2017
|
this.setWarningText(h("WARN_OUTPUT_NOT_FOUND"));
|
|
1956
2018
|
return;
|
|
@@ -1962,7 +2024,7 @@ const wi = {
|
|
|
1962
2024
|
this.setWarningText(null);
|
|
1963
2025
|
}
|
|
1964
2026
|
};
|
|
1965
|
-
|
|
2027
|
+
g.set_app_method_output_v1 = wi;
|
|
1966
2028
|
s.forBlock.set_app_method_output_v1 = function(t) {
|
|
1967
2029
|
const e = s.quote_, n = t;
|
|
1968
2030
|
let o = s.valueToCode(n, "VALUE", r.ATOMIC);
|
|
@@ -2031,7 +2093,7 @@ const Ki = {
|
|
|
2031
2093
|
this.app.id = t.id, this.app.name = t.name;
|
|
2032
2094
|
const e = this.getField("APP");
|
|
2033
2095
|
e.getOptions(!1), e.setValue(this.app.id);
|
|
2034
|
-
const n =
|
|
2096
|
+
const n = Xe(this.app.id)?.[0];
|
|
2035
2097
|
if (!n)
|
|
2036
2098
|
return;
|
|
2037
2099
|
this.page.id = n.id, this.page.name = n.name;
|
|
@@ -2053,7 +2115,7 @@ const Ki = {
|
|
|
2053
2115
|
return vi();
|
|
2054
2116
|
},
|
|
2055
2117
|
genPageOpts_: function() {
|
|
2056
|
-
return
|
|
2118
|
+
return Ci(this.app.id);
|
|
2057
2119
|
},
|
|
2058
2120
|
onchange: function(t) {
|
|
2059
2121
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -2066,7 +2128,7 @@ const Ki = {
|
|
|
2066
2128
|
}
|
|
2067
2129
|
},
|
|
2068
2130
|
onAppChange_: function(t) {
|
|
2069
|
-
const e =
|
|
2131
|
+
const e = Cn(t);
|
|
2070
2132
|
if (!e) {
|
|
2071
2133
|
console.assert(!1);
|
|
2072
2134
|
return;
|
|
@@ -2074,23 +2136,23 @@ const Ki = {
|
|
|
2074
2136
|
const n = this.app.id !== e.id;
|
|
2075
2137
|
this.app.id = e.id, this.app.name = e.name;
|
|
2076
2138
|
const o = this.getField("PAGE");
|
|
2077
|
-
if (o.getOptions(!1), n || !
|
|
2078
|
-
const a =
|
|
2139
|
+
if (o.getOptions(!1), n || !Ve(this.app.id, this.page.id)) {
|
|
2140
|
+
const a = Xe(this.app.id)?.[0]?.id ?? "";
|
|
2079
2141
|
o.setValue(a), this.page.id === a && this.onPageChange_(a);
|
|
2080
2142
|
}
|
|
2081
2143
|
},
|
|
2082
2144
|
onPageChange_: function(t) {
|
|
2083
|
-
const e =
|
|
2145
|
+
const e = Ve(this.app.id, t);
|
|
2084
2146
|
e ? (this.page.id = e.id, this.page.name = e.name) : (this.page.id = "", this.page.name = "");
|
|
2085
2147
|
},
|
|
2086
2148
|
checkWarning_: function() {
|
|
2087
|
-
const t =
|
|
2149
|
+
const t = Cn(this.app.id);
|
|
2088
2150
|
if (!t) {
|
|
2089
2151
|
this.setWarningText(h("WARN_APP_NOT_FOUND"));
|
|
2090
2152
|
return;
|
|
2091
2153
|
}
|
|
2092
2154
|
t.name !== this.app.name && (this.app.name = t.name);
|
|
2093
|
-
const e =
|
|
2155
|
+
const e = Ve(this.app.id, this.page.id);
|
|
2094
2156
|
if (!e) {
|
|
2095
2157
|
this.setWarningText(h("WARN_PAGE_NOT_FOUND"));
|
|
2096
2158
|
return;
|
|
@@ -2098,13 +2160,13 @@ const Ki = {
|
|
|
2098
2160
|
e.name !== this.page.name && (this.page.name = e.name), this.setWarningText(null);
|
|
2099
2161
|
}
|
|
2100
2162
|
};
|
|
2101
|
-
|
|
2163
|
+
g.navigate_to_v1 = Ki;
|
|
2102
2164
|
s.forBlock.navigate_to_v1 = function(t) {
|
|
2103
2165
|
const e = t, n = s.quote_(e.app.id), o = s.quote_(e.page.id);
|
|
2104
2166
|
return `__navigateToV1__(${n}, ${o});
|
|
2105
2167
|
`;
|
|
2106
2168
|
};
|
|
2107
|
-
const
|
|
2169
|
+
const $i = {
|
|
2108
2170
|
init: function() {
|
|
2109
2171
|
this.comp = {
|
|
2110
2172
|
id: void 0,
|
|
@@ -2164,12 +2226,12 @@ const Hi = {
|
|
|
2164
2226
|
this.setWarningText(null);
|
|
2165
2227
|
}
|
|
2166
2228
|
};
|
|
2167
|
-
|
|
2229
|
+
g.select_comp_v1 = $i;
|
|
2168
2230
|
s.forBlock.select_comp_v1 = function(t) {
|
|
2169
2231
|
const e = s.quote_, o = t.comp.id ?? "";
|
|
2170
2232
|
return [e(o), r.ATOMIC];
|
|
2171
2233
|
};
|
|
2172
|
-
const
|
|
2234
|
+
const Hi = {
|
|
2173
2235
|
init: function() {
|
|
2174
2236
|
this.node = {
|
|
2175
2237
|
id: "",
|
|
@@ -2193,7 +2255,7 @@ const $i = {
|
|
|
2193
2255
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2194
2256
|
const e = this.getField("NODE");
|
|
2195
2257
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
2196
|
-
const n =
|
|
2258
|
+
const n = Ht(this.node.id, "read")?.[0];
|
|
2197
2259
|
if (!n)
|
|
2198
2260
|
return;
|
|
2199
2261
|
this.property.id = n.id, this.property.kind = n.kind, this.property.names = n.names;
|
|
@@ -2212,7 +2274,7 @@ const $i = {
|
|
|
2212
2274
|
}, 0);
|
|
2213
2275
|
},
|
|
2214
2276
|
genNodeOpts_: function() {
|
|
2215
|
-
return
|
|
2277
|
+
return ve("getProperty");
|
|
2216
2278
|
},
|
|
2217
2279
|
genPropertyOpts_: function() {
|
|
2218
2280
|
return no(this.node.id, "read");
|
|
@@ -2228,7 +2290,7 @@ const $i = {
|
|
|
2228
2290
|
}
|
|
2229
2291
|
},
|
|
2230
2292
|
onNodeChange_: function(t) {
|
|
2231
|
-
const e =
|
|
2293
|
+
const e = ht(t);
|
|
2232
2294
|
if (!e) {
|
|
2233
2295
|
console.assert(!1);
|
|
2234
2296
|
return;
|
|
@@ -2236,18 +2298,18 @@ const $i = {
|
|
|
2236
2298
|
const n = this.node.key !== e.key;
|
|
2237
2299
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2238
2300
|
const o = this.getField("PROPERTY");
|
|
2239
|
-
if (o.getOptions(!1), n || !
|
|
2240
|
-
const i =
|
|
2301
|
+
if (o.getOptions(!1), n || !Ot(this.property.id)) {
|
|
2302
|
+
const i = Ht(this.node.id, "read")?.[0];
|
|
2241
2303
|
o.setValue(i?.id ?? "");
|
|
2242
2304
|
}
|
|
2243
2305
|
this.onPropChange_(o.getValue());
|
|
2244
2306
|
},
|
|
2245
2307
|
onPropChange_: function(t) {
|
|
2246
|
-
const e =
|
|
2308
|
+
const e = Ot(t);
|
|
2247
2309
|
e ? (this.property.id = e.id, this.property.kind = e.kind, this.property.names = e.names) : (this.property.id = "", this.property.kind = "", this.property.names = []);
|
|
2248
2310
|
},
|
|
2249
2311
|
checkWarning_: function() {
|
|
2250
|
-
const t =
|
|
2312
|
+
const t = ht(this.node.id);
|
|
2251
2313
|
if (!t) {
|
|
2252
2314
|
this.setWarningText(h("WARN_NODE_NOT_FOUND"));
|
|
2253
2315
|
return;
|
|
@@ -2257,7 +2319,7 @@ const $i = {
|
|
|
2257
2319
|
return;
|
|
2258
2320
|
}
|
|
2259
2321
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
2260
|
-
const e =
|
|
2322
|
+
const e = Ot(this.property.id);
|
|
2261
2323
|
if (!e) {
|
|
2262
2324
|
this.setWarningText(h("WARN_PROPERTY_NOT_FOUND"));
|
|
2263
2325
|
return;
|
|
@@ -2269,9 +2331,9 @@ const $i = {
|
|
|
2269
2331
|
M(e.names, this.property.names) || (this.property.names = e.names), this.setWarningText(null);
|
|
2270
2332
|
}
|
|
2271
2333
|
};
|
|
2272
|
-
|
|
2334
|
+
g.get_app_property_v1 = Hi;
|
|
2273
2335
|
s.forBlock.get_app_property_v1 = function(t) {
|
|
2274
|
-
const e = s.quote_, n = t, { kind: o, nodeId: i, propertyKey: a } =
|
|
2336
|
+
const e = s.quote_, n = t, { kind: o, nodeId: i, propertyKey: a } = sn(n.property.id);
|
|
2275
2337
|
return [`__getPropertyV1__(${e(o)}, ${e(i)}, ${e(a)})`, r.ATOMIC];
|
|
2276
2338
|
};
|
|
2277
2339
|
const Gi = {
|
|
@@ -2298,7 +2360,7 @@ const Gi = {
|
|
|
2298
2360
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2299
2361
|
const e = this.getField("NODE");
|
|
2300
2362
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
2301
|
-
const n =
|
|
2363
|
+
const n = Ht(this.node.id, "write")?.[0];
|
|
2302
2364
|
if (!n)
|
|
2303
2365
|
return;
|
|
2304
2366
|
this.property.id = n.id, this.property.kind = n.kind, this.property.names = n.names;
|
|
@@ -2317,7 +2379,7 @@ const Gi = {
|
|
|
2317
2379
|
}, 0);
|
|
2318
2380
|
},
|
|
2319
2381
|
genNodeOpts_: function() {
|
|
2320
|
-
return
|
|
2382
|
+
return ve("setProperty");
|
|
2321
2383
|
},
|
|
2322
2384
|
genPropertyOpts_: function() {
|
|
2323
2385
|
return no(this.node.id, "write");
|
|
@@ -2333,7 +2395,7 @@ const Gi = {
|
|
|
2333
2395
|
}
|
|
2334
2396
|
},
|
|
2335
2397
|
onNodeChange_: function(t) {
|
|
2336
|
-
const e =
|
|
2398
|
+
const e = ht(t);
|
|
2337
2399
|
if (!e) {
|
|
2338
2400
|
console.assert(!1);
|
|
2339
2401
|
return;
|
|
@@ -2341,20 +2403,20 @@ const Gi = {
|
|
|
2341
2403
|
const n = this.node.key !== e.key;
|
|
2342
2404
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2343
2405
|
const o = this.getField("PROPERTY");
|
|
2344
|
-
if (o.getOptions(!1), n || !
|
|
2345
|
-
const i =
|
|
2406
|
+
if (o.getOptions(!1), n || !Ot(this.property.id)) {
|
|
2407
|
+
const i = Ht(this.node.id, "write")?.[0];
|
|
2346
2408
|
o.setValue(i?.id ?? "");
|
|
2347
2409
|
}
|
|
2348
2410
|
this.onPropChange_(o.getValue());
|
|
2349
2411
|
},
|
|
2350
2412
|
onPropChange_: function(t) {
|
|
2351
|
-
const e =
|
|
2413
|
+
const e = Ot(t);
|
|
2352
2414
|
e ? (this.property.id = e.id, this.property.kind = e.kind, this.property.names = e.names) : (this.property.id = "", this.property.kind = "", this.property.names = []), this.updateShadow_();
|
|
2353
2415
|
},
|
|
2354
2416
|
updateShadow_: function() {
|
|
2355
2417
|
if (this.isInsertionMarker())
|
|
2356
2418
|
return;
|
|
2357
|
-
const t =
|
|
2419
|
+
const t = Ot(this.property.id);
|
|
2358
2420
|
if (!t)
|
|
2359
2421
|
return;
|
|
2360
2422
|
this.getInput("VALUE").setShadowDom(null);
|
|
@@ -2363,12 +2425,12 @@ const Gi = {
|
|
|
2363
2425
|
const n = ci(t.meta.raw), o = hi(t.meta.raw);
|
|
2364
2426
|
this.getInput("VALUE").setCheck(n).setShadowDom(o);
|
|
2365
2427
|
} else {
|
|
2366
|
-
const n =
|
|
2428
|
+
const n = Tt(t.meta.raw.type), o = Et(t.meta.raw.type);
|
|
2367
2429
|
this.getInput("VALUE").setCheck(n).setShadowDom(o);
|
|
2368
2430
|
}
|
|
2369
2431
|
},
|
|
2370
2432
|
checkWarning_: function() {
|
|
2371
|
-
const t =
|
|
2433
|
+
const t = ht(this.node.id);
|
|
2372
2434
|
if (!t) {
|
|
2373
2435
|
this.setWarningText(h("WARN_NODE_NOT_FOUND"));
|
|
2374
2436
|
return;
|
|
@@ -2378,7 +2440,7 @@ const Gi = {
|
|
|
2378
2440
|
return;
|
|
2379
2441
|
}
|
|
2380
2442
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
2381
|
-
const e =
|
|
2443
|
+
const e = Ot(this.property.id);
|
|
2382
2444
|
if (!e) {
|
|
2383
2445
|
this.setWarningText(h("WARN_PROPERTY_NOT_FOUND"));
|
|
2384
2446
|
return;
|
|
@@ -2390,9 +2452,9 @@ const Gi = {
|
|
|
2390
2452
|
M(e.names, this.property.names) || (this.property.names = e.names), this.setWarningText(null);
|
|
2391
2453
|
}
|
|
2392
2454
|
};
|
|
2393
|
-
|
|
2455
|
+
g.set_app_property_v1 = Gi;
|
|
2394
2456
|
s.forBlock.set_app_property_v1 = function(t) {
|
|
2395
|
-
const e = s.quote_, n = t, { kind: o, nodeId: i, propertyKey: a } =
|
|
2457
|
+
const e = s.quote_, n = t, { kind: o, nodeId: i, propertyKey: a } = sn(n.property.id), c = s.valueToCode(n, "VALUE", r.NONE);
|
|
2396
2458
|
return `__setPropertyV1__(${e(o)}, ${e(i)}, ${e(a)}, ${c});
|
|
2397
2459
|
`;
|
|
2398
2460
|
};
|
|
@@ -2455,7 +2517,7 @@ const Wi = {
|
|
|
2455
2517
|
this.setWarningText(null);
|
|
2456
2518
|
}
|
|
2457
2519
|
};
|
|
2458
|
-
|
|
2520
|
+
g.get_app_state_v1 = Wi;
|
|
2459
2521
|
s.forBlock.get_app_state_v1 = function(t) {
|
|
2460
2522
|
const e = s.quote_;
|
|
2461
2523
|
return [`__getStateV1__(${e(t.state.id)})`, r.ATOMIC];
|
|
@@ -2508,7 +2570,7 @@ const ji = {
|
|
|
2508
2570
|
this.getInput("VALUE").setShadowDom(null);
|
|
2509
2571
|
const t = this.getInput("VALUE").connection.targetBlock();
|
|
2510
2572
|
t && t.dispose();
|
|
2511
|
-
const e =
|
|
2573
|
+
const e = Tt(this.state.type), n = Et(this.state.type);
|
|
2512
2574
|
this.getInput("VALUE").setCheck(e).setShadowDom(n);
|
|
2513
2575
|
},
|
|
2514
2576
|
checkWarning_: function() {
|
|
@@ -2524,7 +2586,7 @@ const ji = {
|
|
|
2524
2586
|
this.setWarningText(null);
|
|
2525
2587
|
}
|
|
2526
2588
|
};
|
|
2527
|
-
|
|
2589
|
+
g.set_app_state_v1 = ji;
|
|
2528
2590
|
s.forBlock.set_app_state_v1 = function(t) {
|
|
2529
2591
|
const e = s.quote_, n = t, o = s.valueToCode(n, "VALUE", r.NONE);
|
|
2530
2592
|
return `__setStateV1__(${e(n.state.id)}, ${o});
|
|
@@ -3233,7 +3295,7 @@ function ${s.FUNCTION_NAME_PLACEHOLDER_}(r, g, b) {
|
|
|
3233
3295
|
`
|
|
3234
3296
|
)}(${e}, ${n}, ${o})`, r.FUNCTION_CALL];
|
|
3235
3297
|
};
|
|
3236
|
-
const Xi =
|
|
3298
|
+
const Xi = C.xml, Ji = [
|
|
3237
3299
|
{
|
|
3238
3300
|
type: "add_data_v1",
|
|
3239
3301
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
@@ -3356,13 +3418,13 @@ const Qi = {
|
|
|
3356
3418
|
},
|
|
3357
3419
|
updateShape_: function() {
|
|
3358
3420
|
if (this.locale) {
|
|
3359
|
-
const { i18n: t } =
|
|
3421
|
+
const { i18n: t } = yt;
|
|
3360
3422
|
this.setFieldValue(t.global.t(this.name), "LABEL");
|
|
3361
3423
|
} else
|
|
3362
3424
|
this.setFieldValue(this.name, "LABEL");
|
|
3363
3425
|
}
|
|
3364
3426
|
};
|
|
3365
|
-
|
|
3427
|
+
g.parameter_v1 = Qi;
|
|
3366
3428
|
s.forBlock.parameter_v1 = function(t) {
|
|
3367
3429
|
return [t.key, r.ATOMIC];
|
|
3368
3430
|
};
|
|
@@ -3370,17 +3432,17 @@ const zi = {
|
|
|
3370
3432
|
init: function() {
|
|
3371
3433
|
}
|
|
3372
3434
|
};
|
|
3373
|
-
|
|
3435
|
+
g.on_flow_state_event_v1 = zi;
|
|
3374
3436
|
s.forBlock.on_flow_state_event_v1 = function() {
|
|
3375
3437
|
return `__onFlowStateEventV1__();
|
|
3376
3438
|
`;
|
|
3377
3439
|
};
|
|
3378
3440
|
function Gt(t) {
|
|
3379
|
-
const e =
|
|
3441
|
+
const e = T.compute.spaces.find((n) => n.id === t);
|
|
3380
3442
|
return e ? e.funcs : [];
|
|
3381
3443
|
}
|
|
3382
|
-
function
|
|
3383
|
-
const n =
|
|
3444
|
+
function St(t, e) {
|
|
3445
|
+
const n = T.compute.spaces.find((o) => o.id === t);
|
|
3384
3446
|
if (n)
|
|
3385
3447
|
return n.funcs.find((o) => o.id === e);
|
|
3386
3448
|
}
|
|
@@ -3390,27 +3452,27 @@ function io(t) {
|
|
|
3390
3452
|
e.push([i, o]);
|
|
3391
3453
|
}), k(e);
|
|
3392
3454
|
}
|
|
3393
|
-
function
|
|
3394
|
-
return
|
|
3455
|
+
function ze() {
|
|
3456
|
+
return T.compute.activeFunc;
|
|
3395
3457
|
}
|
|
3396
3458
|
function Ln(t) {
|
|
3397
|
-
const { outputs: e } =
|
|
3459
|
+
const { outputs: e } = T.compute.activeFunc;
|
|
3398
3460
|
return e.find((n) => n.id === t);
|
|
3399
3461
|
}
|
|
3400
3462
|
function Zi() {
|
|
3401
|
-
const t = [], { outputs: e } =
|
|
3463
|
+
const t = [], { outputs: e } = T.compute.activeFunc;
|
|
3402
3464
|
return e.forEach(({ id: n, name: o }) => {
|
|
3403
3465
|
t.push([o, n]);
|
|
3404
3466
|
}), k(t);
|
|
3405
3467
|
}
|
|
3406
3468
|
function qt(t) {
|
|
3407
3469
|
const e = [];
|
|
3408
|
-
return
|
|
3470
|
+
return T.compute.spaces.forEach((n) => {
|
|
3409
3471
|
t === "func" && n.funcs.length > 0 && e.push(n), t === "flow" && n.flows.length > 0 && e.push(n);
|
|
3410
3472
|
}), e;
|
|
3411
3473
|
}
|
|
3412
3474
|
function le(t) {
|
|
3413
|
-
return
|
|
3475
|
+
return T.compute.spaces.find((e) => e.id === t);
|
|
3414
3476
|
}
|
|
3415
3477
|
function so(t) {
|
|
3416
3478
|
const e = [];
|
|
@@ -3483,13 +3545,13 @@ const ts = {
|
|
|
3483
3545
|
return;
|
|
3484
3546
|
}
|
|
3485
3547
|
let n = !1;
|
|
3486
|
-
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !
|
|
3548
|
+
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !St(this.space.id, this.func.id)) {
|
|
3487
3549
|
const i = Gt(this.space.id)?.[0];
|
|
3488
3550
|
this.setFieldValue(i?.id ?? "", "FUNC");
|
|
3489
3551
|
}
|
|
3490
3552
|
},
|
|
3491
3553
|
onFuncChange_: function(t) {
|
|
3492
|
-
const e =
|
|
3554
|
+
const e = St(this.space.id, t);
|
|
3493
3555
|
if (!e) {
|
|
3494
3556
|
console.assert(!1);
|
|
3495
3557
|
return;
|
|
@@ -3521,14 +3583,14 @@ const ts = {
|
|
|
3521
3583
|
},
|
|
3522
3584
|
updateCheck_: function() {
|
|
3523
3585
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
3524
|
-
const { type: e } = this.func.inputs[t], n =
|
|
3586
|
+
const { type: e } = this.func.inputs[t], n = Tt(e);
|
|
3525
3587
|
this.getInput("INPUT" + t).connection.setCheck(n);
|
|
3526
3588
|
}
|
|
3527
3589
|
},
|
|
3528
3590
|
updateShadow_: function() {
|
|
3529
3591
|
if (!this.isInsertionMarker())
|
|
3530
3592
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
3531
|
-
const e = this.func.inputs[t], n =
|
|
3593
|
+
const e = this.func.inputs[t], n = Et(e.type);
|
|
3532
3594
|
this.getInput("INPUT" + t).setShadowDom(n);
|
|
3533
3595
|
}
|
|
3534
3596
|
},
|
|
@@ -3538,7 +3600,7 @@ const ts = {
|
|
|
3538
3600
|
const t = [];
|
|
3539
3601
|
for (let e = 0; e < this.func.outputs.length; e++) {
|
|
3540
3602
|
const { id: n, name: o } = this.func.outputs[e];
|
|
3541
|
-
t.push(["OUTPUT" + e, `
|
|
3603
|
+
t.push(["OUTPUT" + e, `__output$${n}__`, o, !1]);
|
|
3542
3604
|
}
|
|
3543
3605
|
Y(this, t);
|
|
3544
3606
|
},
|
|
@@ -3549,7 +3611,7 @@ const ts = {
|
|
|
3549
3611
|
return;
|
|
3550
3612
|
}
|
|
3551
3613
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
3552
|
-
const e =
|
|
3614
|
+
const e = St(this.space.id, this.func.id);
|
|
3553
3615
|
if (!e) {
|
|
3554
3616
|
this.setWarningText(h("WARN_FUNC_NOT_FOUND"));
|
|
3555
3617
|
return;
|
|
@@ -3565,24 +3627,24 @@ const ts = {
|
|
|
3565
3627
|
this.setWarningText(null);
|
|
3566
3628
|
}
|
|
3567
3629
|
};
|
|
3568
|
-
|
|
3630
|
+
g.call_func_v1 = ts;
|
|
3569
3631
|
s.forBlock.call_func_v1 = function(t) {
|
|
3570
3632
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3571
3633
|
let c = "";
|
|
3572
3634
|
c += `${e}var __inputs__ = {
|
|
3573
3635
|
`, o.func.inputs.forEach(({ id: f }, p) => {
|
|
3574
|
-
const
|
|
3636
|
+
const E = s.valueToCode(
|
|
3575
3637
|
o,
|
|
3576
3638
|
"INPUT" + p,
|
|
3577
3639
|
r.ATOMIC
|
|
3578
3640
|
);
|
|
3579
|
-
c += `${e}${e}${n(f)}: ${
|
|
3641
|
+
c += `${e}${e}${n(f)}: ${E},
|
|
3580
3642
|
`;
|
|
3581
3643
|
}), c += `${e}};`;
|
|
3582
3644
|
const u = n(o.space.name + "/" + o.func.name);
|
|
3583
3645
|
let l = "";
|
|
3584
3646
|
o.func.outputs.forEach(({ id: f }) => {
|
|
3585
|
-
l += `${e}var
|
|
3647
|
+
l += `${e}var __output${f}__ = __result__[${n(f)}];
|
|
3586
3648
|
`;
|
|
3587
3649
|
});
|
|
3588
3650
|
const _ = s.statementToCode(o, "CALLBACK");
|
|
@@ -3657,13 +3719,13 @@ const es = {
|
|
|
3657
3719
|
return;
|
|
3658
3720
|
}
|
|
3659
3721
|
let n = !1;
|
|
3660
|
-
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !
|
|
3722
|
+
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !St(this.space.id, this.func.id)) {
|
|
3661
3723
|
const i = Gt(this.space.id)?.[0];
|
|
3662
3724
|
i ? this.setFieldValue(i.id, "FUNC") : this.setFieldValue("", "FUNC");
|
|
3663
3725
|
}
|
|
3664
3726
|
},
|
|
3665
3727
|
onFuncChange_: function(t) {
|
|
3666
|
-
const e =
|
|
3728
|
+
const e = St(this.space.id, t);
|
|
3667
3729
|
if (!e) {
|
|
3668
3730
|
console.assert(!1);
|
|
3669
3731
|
return;
|
|
@@ -3695,14 +3757,14 @@ const es = {
|
|
|
3695
3757
|
},
|
|
3696
3758
|
updateCheck_: function() {
|
|
3697
3759
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
3698
|
-
const { type: e } = this.func.inputs[t], n =
|
|
3760
|
+
const { type: e } = this.func.inputs[t], n = Tt(e);
|
|
3699
3761
|
this.getInput("INPUT" + t).connection.setCheck(n);
|
|
3700
3762
|
}
|
|
3701
3763
|
},
|
|
3702
3764
|
updateShadow_: function() {
|
|
3703
3765
|
if (!this.isInsertionMarker())
|
|
3704
3766
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
3705
|
-
const e = this.func.inputs[t], n =
|
|
3767
|
+
const e = this.func.inputs[t], n = Et(e.type);
|
|
3706
3768
|
this.getInput("INPUT" + t).setShadowDom(n);
|
|
3707
3769
|
}
|
|
3708
3770
|
},
|
|
@@ -3712,7 +3774,7 @@ const es = {
|
|
|
3712
3774
|
const t = [];
|
|
3713
3775
|
for (let e = 0; e < this.func.outputs.length; e++) {
|
|
3714
3776
|
const { id: n, name: o } = this.func.outputs[e];
|
|
3715
|
-
t.push(["OUTPUT" + e, `
|
|
3777
|
+
t.push(["OUTPUT" + e, `__output$${n}__`, o, !1]);
|
|
3716
3778
|
}
|
|
3717
3779
|
Y(this, t);
|
|
3718
3780
|
},
|
|
@@ -3723,7 +3785,7 @@ const es = {
|
|
|
3723
3785
|
return;
|
|
3724
3786
|
}
|
|
3725
3787
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
3726
|
-
const e =
|
|
3788
|
+
const e = St(this.space.id, this.func.id);
|
|
3727
3789
|
if (!e) {
|
|
3728
3790
|
this.setWarningText(h("WARN_FUNC_NOT_FOUND"));
|
|
3729
3791
|
return;
|
|
@@ -3739,24 +3801,24 @@ const es = {
|
|
|
3739
3801
|
this.setWarningText(null);
|
|
3740
3802
|
}
|
|
3741
3803
|
};
|
|
3742
|
-
|
|
3804
|
+
g.call_func_internal_v1 = es;
|
|
3743
3805
|
s.forBlock.call_func_internal_v1 = function(t) {
|
|
3744
3806
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3745
3807
|
let c = `${e}var __inputs__ = {
|
|
3746
3808
|
`;
|
|
3747
3809
|
o.func.inputs.forEach(({ id: f }, p) => {
|
|
3748
|
-
const
|
|
3810
|
+
const E = s.valueToCode(
|
|
3749
3811
|
o,
|
|
3750
3812
|
"INPUT" + p,
|
|
3751
3813
|
r.ATOMIC
|
|
3752
3814
|
);
|
|
3753
|
-
c += `${e}${e}${n(f)}: ${
|
|
3815
|
+
c += `${e}${e}${n(f)}: ${E},
|
|
3754
3816
|
`;
|
|
3755
3817
|
}), c += `${e}};`;
|
|
3756
3818
|
const u = o.space.name + "/" + o.func.name;
|
|
3757
3819
|
let l = "";
|
|
3758
3820
|
o.func.outputs.forEach(({ id: f }) => {
|
|
3759
|
-
l += `${e}var
|
|
3821
|
+
l += `${e}var __output$${f}__ = __result__.outputs[${n(f)}];
|
|
3760
3822
|
`;
|
|
3761
3823
|
});
|
|
3762
3824
|
const _ = s.statementToCode(o, "CALLBACK");
|
|
@@ -3779,7 +3841,7 @@ const ns = {
|
|
|
3779
3841
|
initData_: function() {
|
|
3780
3842
|
if (this.func.id)
|
|
3781
3843
|
return;
|
|
3782
|
-
const { id: t, inputs: e } =
|
|
3844
|
+
const { id: t, inputs: e } = ze();
|
|
3783
3845
|
this.func.id = t, this.func.inputs = e;
|
|
3784
3846
|
},
|
|
3785
3847
|
saveExtraState: function() {
|
|
@@ -3811,12 +3873,12 @@ const ns = {
|
|
|
3811
3873
|
const t = [];
|
|
3812
3874
|
for (let e = 0; e < this.func.inputs.length; e++) {
|
|
3813
3875
|
const { id: n, name: o } = this.func.inputs[e];
|
|
3814
|
-
t.push(["INPUT" + e, `
|
|
3876
|
+
t.push(["INPUT" + e, `__input$${n}__`, o, !1]);
|
|
3815
3877
|
}
|
|
3816
3878
|
Y(this, t);
|
|
3817
3879
|
},
|
|
3818
3880
|
checkWarning_: function() {
|
|
3819
|
-
const { id: t, inputs: e } =
|
|
3881
|
+
const { id: t, inputs: e } = ze();
|
|
3820
3882
|
if (this.func.id !== t && (this.func.id = t), !M(e, this.func.inputs)) {
|
|
3821
3883
|
this.setWarningText(h("WARN_FUNC_HAS_CHANGED"));
|
|
3822
3884
|
return;
|
|
@@ -3824,12 +3886,12 @@ const ns = {
|
|
|
3824
3886
|
this.setWarningText(null);
|
|
3825
3887
|
}
|
|
3826
3888
|
};
|
|
3827
|
-
|
|
3889
|
+
g.func_entry_v1 = ns;
|
|
3828
3890
|
s.forBlock.func_entry_v1 = function(t) {
|
|
3829
3891
|
const e = t, n = s.statementToCode(e, "HANDLE"), o = [];
|
|
3830
3892
|
for (let a = 0; a < e.func.inputs.length; a++) {
|
|
3831
3893
|
const { id: c } = e.func.inputs[a];
|
|
3832
|
-
o.push(`
|
|
3894
|
+
o.push(`__input$${c}__`);
|
|
3833
3895
|
}
|
|
3834
3896
|
return `function __funcEntryV1__(${o.join(", ")}) {
|
|
3835
3897
|
${n}}`;
|
|
@@ -3848,7 +3910,7 @@ const os = {
|
|
|
3848
3910
|
initData_: function() {
|
|
3849
3911
|
if (this.output.id)
|
|
3850
3912
|
return;
|
|
3851
|
-
const t =
|
|
3913
|
+
const t = ze().outputs?.[0];
|
|
3852
3914
|
t && (this.output.id = t.id, this.output.name = t.name, this.output.type = t.type);
|
|
3853
3915
|
},
|
|
3854
3916
|
saveExtraState: function() {
|
|
@@ -3887,13 +3949,13 @@ const os = {
|
|
|
3887
3949
|
t.connection.setShadowDom(null);
|
|
3888
3950
|
const e = t.connection.targetBlock();
|
|
3889
3951
|
e && !e.isShadow() && e.dispose();
|
|
3890
|
-
const n =
|
|
3952
|
+
const n = Tt(this.output.type);
|
|
3891
3953
|
t.setCheck(n);
|
|
3892
3954
|
},
|
|
3893
3955
|
updateShadows_: function() {
|
|
3894
3956
|
if (this.isInsertionMarker())
|
|
3895
3957
|
return;
|
|
3896
|
-
const t =
|
|
3958
|
+
const t = Et(this.output.type);
|
|
3897
3959
|
this.getInput("VALUE").setShadowDom(t);
|
|
3898
3960
|
},
|
|
3899
3961
|
checkWarning_: function() {
|
|
@@ -3909,7 +3971,7 @@ const os = {
|
|
|
3909
3971
|
this.setWarningText(null);
|
|
3910
3972
|
}
|
|
3911
3973
|
};
|
|
3912
|
-
|
|
3974
|
+
g.set_func_output_v1 = os;
|
|
3913
3975
|
s.forBlock.set_func_output_v1 = function(t) {
|
|
3914
3976
|
const e = s.quote_, n = t, { id: o, type: i } = n.output;
|
|
3915
3977
|
let a = s.valueToCode(n, "VALUE", r.ATOMIC);
|
|
@@ -3981,46 +4043,46 @@ m([
|
|
|
3981
4043
|
s.forBlock.compute_env_is_v1 = function(t) {
|
|
3982
4044
|
return [`__getEnvV1__() === ${s.quote_(t.getFieldValue("ENV"))}`, r.ATOMIC];
|
|
3983
4045
|
};
|
|
3984
|
-
function
|
|
4046
|
+
function Q() {
|
|
3985
4047
|
const t = [];
|
|
3986
|
-
return
|
|
4048
|
+
return T.data.spaces.forEach((e) => {
|
|
3987
4049
|
e.tables.length > 0 && t.push(e);
|
|
3988
4050
|
}), t;
|
|
3989
4051
|
}
|
|
3990
|
-
function
|
|
3991
|
-
const { spaces: e } =
|
|
4052
|
+
function ft(t) {
|
|
4053
|
+
const { spaces: e } = T.data;
|
|
3992
4054
|
return e.find((n) => n.id === t);
|
|
3993
4055
|
}
|
|
3994
|
-
function
|
|
4056
|
+
function Ce() {
|
|
3995
4057
|
const t = [];
|
|
3996
|
-
return
|
|
4058
|
+
return Q().forEach(({ id: n, name: o }) => {
|
|
3997
4059
|
t.push([o, n]);
|
|
3998
4060
|
}), k(t);
|
|
3999
4061
|
}
|
|
4000
|
-
function
|
|
4001
|
-
const { spaces: e } =
|
|
4062
|
+
function $(t) {
|
|
4063
|
+
const { spaces: e } = T.data, n = e.find((o) => o.id === t);
|
|
4002
4064
|
return n ? n.tables : [];
|
|
4003
4065
|
}
|
|
4004
4066
|
function j(t, e) {
|
|
4005
|
-
const { spaces: n } =
|
|
4067
|
+
const { spaces: n } = T.data, o = n.find((i) => i.id === t);
|
|
4006
4068
|
if (o)
|
|
4007
4069
|
return o.tables.find((i) => i.id === e);
|
|
4008
4070
|
}
|
|
4009
|
-
function
|
|
4071
|
+
function ke(t) {
|
|
4010
4072
|
const e = [];
|
|
4011
|
-
return
|
|
4073
|
+
return $(t).forEach(({ id: o, name: i }) => {
|
|
4012
4074
|
e.push([i, o]);
|
|
4013
4075
|
}), k(e);
|
|
4014
4076
|
}
|
|
4015
4077
|
function _e(t, e) {
|
|
4016
|
-
const { spaces: n } =
|
|
4078
|
+
const { spaces: n } = T.data, o = n.find((a) => a.id === t);
|
|
4017
4079
|
if (!o)
|
|
4018
4080
|
return [];
|
|
4019
4081
|
const i = o.tables.find((a) => a.id === e);
|
|
4020
4082
|
return i ? i.columns : [];
|
|
4021
4083
|
}
|
|
4022
|
-
function
|
|
4023
|
-
const { spaces: o } =
|
|
4084
|
+
function we(t, e, n) {
|
|
4085
|
+
const { spaces: o } = T.data, i = o.find((c) => c.id === t);
|
|
4024
4086
|
if (!i)
|
|
4025
4087
|
return;
|
|
4026
4088
|
const a = i.tables.find((c) => c.id === e);
|
|
@@ -4038,9 +4100,9 @@ function ss(t) {
|
|
|
4038
4100
|
if (e.targetBlock())
|
|
4039
4101
|
return;
|
|
4040
4102
|
let n, o;
|
|
4041
|
-
const i =
|
|
4103
|
+
const i = Q()?.[0];
|
|
4042
4104
|
if (i) {
|
|
4043
|
-
const u =
|
|
4105
|
+
const u = $(i.id)?.[0];
|
|
4044
4106
|
if (u) {
|
|
4045
4107
|
n = {
|
|
4046
4108
|
space: {
|
|
@@ -4114,7 +4176,7 @@ const cs = {
|
|
|
4114
4176
|
]), as(this));
|
|
4115
4177
|
}
|
|
4116
4178
|
};
|
|
4117
|
-
|
|
4179
|
+
g.add_data_v1 = cs;
|
|
4118
4180
|
s.forBlock.add_data_v1 = function(t) {
|
|
4119
4181
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", r.ATOMIC) || "null", o = s.statementToCode(t, "HANDLE");
|
|
4120
4182
|
return `{
|
|
@@ -4169,11 +4231,11 @@ const rs = {
|
|
|
4169
4231
|
initData_: function() {
|
|
4170
4232
|
if (this.space.id)
|
|
4171
4233
|
return;
|
|
4172
|
-
const t =
|
|
4234
|
+
const t = Q()?.[0];
|
|
4173
4235
|
if (!t)
|
|
4174
4236
|
return;
|
|
4175
4237
|
this.space.id = t.id, this.space.name = t.name;
|
|
4176
|
-
const e =
|
|
4238
|
+
const e = $(this.space.id)?.[0];
|
|
4177
4239
|
if (!e)
|
|
4178
4240
|
return;
|
|
4179
4241
|
this.table.id = e.id, this.table.name = e.name;
|
|
@@ -4193,10 +4255,10 @@ const rs = {
|
|
|
4193
4255
|
}, 0);
|
|
4194
4256
|
},
|
|
4195
4257
|
genSpaceOpts_: function() {
|
|
4196
|
-
return
|
|
4258
|
+
return Ce();
|
|
4197
4259
|
},
|
|
4198
4260
|
genTableOpts_: function() {
|
|
4199
|
-
return
|
|
4261
|
+
return ke(this.space.id);
|
|
4200
4262
|
},
|
|
4201
4263
|
genColumnOpts_: function() {
|
|
4202
4264
|
return is(this.space.id, this.table.id);
|
|
@@ -4212,14 +4274,14 @@ const rs = {
|
|
|
4212
4274
|
}
|
|
4213
4275
|
},
|
|
4214
4276
|
onSpaceChange_: function(t) {
|
|
4215
|
-
const e =
|
|
4277
|
+
const e = ft(t);
|
|
4216
4278
|
if (!e) {
|
|
4217
4279
|
console.assert(!1);
|
|
4218
4280
|
return;
|
|
4219
4281
|
}
|
|
4220
4282
|
const n = e.id !== this.space.id;
|
|
4221
4283
|
if (this.space.id = e.id, this.space.name = e.name, n || !j(this.space.id, this.table.id)) {
|
|
4222
|
-
const o =
|
|
4284
|
+
const o = $(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
|
|
4223
4285
|
i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
|
|
4224
4286
|
}
|
|
4225
4287
|
},
|
|
@@ -4230,13 +4292,13 @@ const rs = {
|
|
|
4230
4292
|
return;
|
|
4231
4293
|
}
|
|
4232
4294
|
const n = e.id !== this.table.id;
|
|
4233
|
-
if (this.table.id = e.id, this.table.name = e.name, n || !
|
|
4295
|
+
if (this.table.id = e.id, this.table.name = e.name, n || !we(this.space.id, this.table.id, this.column.id)) {
|
|
4234
4296
|
const o = _e(this.space.id, this.table.id)?.[0]?.id ?? "", i = this.getField("COLUMN");
|
|
4235
4297
|
i.getOptions(!1), i.setValue(o, !1), this.onColumnChange_(o);
|
|
4236
4298
|
}
|
|
4237
4299
|
},
|
|
4238
4300
|
onColumnChange_: function(t) {
|
|
4239
|
-
const e =
|
|
4301
|
+
const e = we(this.space.id, this.table.id, t);
|
|
4240
4302
|
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_();
|
|
4241
4303
|
},
|
|
4242
4304
|
updateShape_: function() {
|
|
@@ -4255,7 +4317,7 @@ const rs = {
|
|
|
4255
4317
|
n && n.dispose();
|
|
4256
4318
|
else if (n)
|
|
4257
4319
|
return;
|
|
4258
|
-
const o =
|
|
4320
|
+
const o = je(this.workspace, this.column.type);
|
|
4259
4321
|
o && (e.setCheck(null), e.connect(o.outputConnection));
|
|
4260
4322
|
},
|
|
4261
4323
|
updateCheck_: function() {
|
|
@@ -4263,7 +4325,7 @@ const rs = {
|
|
|
4263
4325
|
this.getInput("VALUE").connection.setCheck(t);
|
|
4264
4326
|
},
|
|
4265
4327
|
checkWarning_: function() {
|
|
4266
|
-
const t =
|
|
4328
|
+
const t = ft(this.space.id);
|
|
4267
4329
|
if (!t) {
|
|
4268
4330
|
this.setWarningText(h("WARN_SPACE_NOT_FOUND"));
|
|
4269
4331
|
return;
|
|
@@ -4275,7 +4337,7 @@ const rs = {
|
|
|
4275
4337
|
return;
|
|
4276
4338
|
}
|
|
4277
4339
|
e.name !== this.table.name && (this.table.name = e.name);
|
|
4278
|
-
const n =
|
|
4340
|
+
const n = we(
|
|
4279
4341
|
this.space.id,
|
|
4280
4342
|
this.table.id,
|
|
4281
4343
|
this.column.id
|
|
@@ -4291,7 +4353,7 @@ const rs = {
|
|
|
4291
4353
|
this.setWarningText(null);
|
|
4292
4354
|
}
|
|
4293
4355
|
};
|
|
4294
|
-
|
|
4356
|
+
g.cond_atomic_v1 = rs;
|
|
4295
4357
|
s.forBlock.cond_atomic_v1 = function(t) {
|
|
4296
4358
|
const e = s.quote_, n = t, o = n.column.name, i = s.valueToCode(n, "VALUE", r.ATOMIC) || null, c = {
|
|
4297
4359
|
EQ: "=",
|
|
@@ -4308,13 +4370,13 @@ const us = {
|
|
|
4308
4370
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
4309
4371
|
}
|
|
4310
4372
|
};
|
|
4311
|
-
|
|
4373
|
+
g.cond_logic_container_v1 = us;
|
|
4312
4374
|
const ls = {
|
|
4313
4375
|
init: function() {
|
|
4314
4376
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
4315
4377
|
}
|
|
4316
4378
|
};
|
|
4317
|
-
|
|
4379
|
+
g.cond_logic_item_v1 = ls;
|
|
4318
4380
|
const _s = {
|
|
4319
4381
|
init: function() {
|
|
4320
4382
|
this.itemCount_ = 1, this.appendValueInput("VALUE").setCheck("Condition").appendField(
|
|
@@ -4324,7 +4386,7 @@ const _s = {
|
|
|
4324
4386
|
]),
|
|
4325
4387
|
"TYPE"
|
|
4326
4388
|
), this.setMutator(
|
|
4327
|
-
new
|
|
4389
|
+
new mt.MutatorIcon(
|
|
4328
4390
|
["cond_logic_item_v1"],
|
|
4329
4391
|
this
|
|
4330
4392
|
)
|
|
@@ -4389,7 +4451,7 @@ const _s = {
|
|
|
4389
4451
|
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setCheck("Condition");
|
|
4390
4452
|
}
|
|
4391
4453
|
};
|
|
4392
|
-
|
|
4454
|
+
g.cond_logic_v1 = _s;
|
|
4393
4455
|
s.forBlock.cond_logic_v1 = function(t) {
|
|
4394
4456
|
const e = s.quote_, n = t, o = n.getFieldValue("TYPE"), i = [], a = s.valueToCode(n, "VALUE", r.ATOMIC) || null;
|
|
4395
4457
|
i.push(a);
|
|
@@ -4403,7 +4465,7 @@ function ps(t) {
|
|
|
4403
4465
|
const e = t.getInput("TABLE").connection;
|
|
4404
4466
|
if (e.targetBlock())
|
|
4405
4467
|
return;
|
|
4406
|
-
const n =
|
|
4468
|
+
const n = Q()?.[0], o = $(n?.id ?? "")?.[0], i = {
|
|
4407
4469
|
type: "select_table_v1",
|
|
4408
4470
|
extraState: {
|
|
4409
4471
|
space: {
|
|
@@ -4422,7 +4484,7 @@ function ds(t) {
|
|
|
4422
4484
|
const e = t.getInput("CONDITION").connection;
|
|
4423
4485
|
if (e.targetBlock())
|
|
4424
4486
|
return;
|
|
4425
|
-
const n =
|
|
4487
|
+
const n = Q()?.[0], o = $(n?.id ?? "")?.[0], i = _e(n?.id, o?.id)?.[0], a = {
|
|
4426
4488
|
type: "cond_atomic_v1",
|
|
4427
4489
|
extraState: {
|
|
4428
4490
|
space: {
|
|
@@ -4489,7 +4551,7 @@ const fs = {
|
|
|
4489
4551
|
]), hs(this));
|
|
4490
4552
|
}
|
|
4491
4553
|
};
|
|
4492
|
-
|
|
4554
|
+
g.delete_data_v1 = fs;
|
|
4493
4555
|
s.forBlock.delete_data_v1 = function(t) {
|
|
4494
4556
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", r.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", r.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
|
|
4495
4557
|
return `{
|
|
@@ -4532,9 +4594,9 @@ function ms(t) {
|
|
|
4532
4594
|
if (e.targetBlock())
|
|
4533
4595
|
return;
|
|
4534
4596
|
let n, o;
|
|
4535
|
-
const i =
|
|
4597
|
+
const i = Q()?.[0];
|
|
4536
4598
|
if (i) {
|
|
4537
|
-
const u =
|
|
4599
|
+
const u = $(i.id)?.[0];
|
|
4538
4600
|
if (u) {
|
|
4539
4601
|
n = {
|
|
4540
4602
|
space: {
|
|
@@ -4669,7 +4731,7 @@ const As = {
|
|
|
4669
4731
|
]), gs(this));
|
|
4670
4732
|
}
|
|
4671
4733
|
};
|
|
4672
|
-
|
|
4734
|
+
g.query_data_v1 = As;
|
|
4673
4735
|
s.forBlock.query_data_v1 = function(t) {
|
|
4674
4736
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", r.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", r.ATOMIC) || "null", i = s.valueToCode(t, "EXTRA", r.ATOMIC) || "null", a = s.statementToCode(t, "HANDLE");
|
|
4675
4737
|
return `{
|
|
@@ -4747,14 +4809,14 @@ const Is = {
|
|
|
4747
4809
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4748
4810
|
}
|
|
4749
4811
|
};
|
|
4750
|
-
|
|
4812
|
+
g.select_column_container_v1 = Is;
|
|
4751
4813
|
const Os = {
|
|
4752
4814
|
init: function() {
|
|
4753
4815
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4754
4816
|
}
|
|
4755
4817
|
};
|
|
4756
|
-
|
|
4757
|
-
const
|
|
4818
|
+
g.select_column_item_v1 = Os;
|
|
4819
|
+
const ys = {
|
|
4758
4820
|
init: function() {
|
|
4759
4821
|
this.space = {
|
|
4760
4822
|
id: "",
|
|
@@ -4770,7 +4832,7 @@ const Cs = {
|
|
|
4770
4832
|
new O(() => this.genTableOpts_()),
|
|
4771
4833
|
"TABLE"
|
|
4772
4834
|
), this.setMutator(
|
|
4773
|
-
new
|
|
4835
|
+
new mt.MutatorIcon(
|
|
4774
4836
|
["select_column_item_v1"],
|
|
4775
4837
|
this
|
|
4776
4838
|
)
|
|
@@ -4779,13 +4841,13 @@ const Cs = {
|
|
|
4779
4841
|
initData_: function() {
|
|
4780
4842
|
if (this.space.id)
|
|
4781
4843
|
return;
|
|
4782
|
-
const t =
|
|
4844
|
+
const t = Q()?.[0];
|
|
4783
4845
|
if (!t)
|
|
4784
4846
|
return;
|
|
4785
4847
|
this.space.id = t.id, this.space.name = t.name;
|
|
4786
4848
|
const e = this.getField("SPACE");
|
|
4787
4849
|
e.getOptions(!1), e.setValue(this.space.id, !1);
|
|
4788
|
-
const n =
|
|
4850
|
+
const n = $(this.space.id)?.[0];
|
|
4789
4851
|
if (!n)
|
|
4790
4852
|
return;
|
|
4791
4853
|
this.table.id = n.id, this.table.name = n.name, this.table.columns = n.columns;
|
|
@@ -4805,10 +4867,10 @@ const Cs = {
|
|
|
4805
4867
|
}, 0);
|
|
4806
4868
|
},
|
|
4807
4869
|
genSpaceOpts_: function() {
|
|
4808
|
-
return
|
|
4870
|
+
return Ce();
|
|
4809
4871
|
},
|
|
4810
4872
|
genTableOpts_: function() {
|
|
4811
|
-
return
|
|
4873
|
+
return ke(this.space.id);
|
|
4812
4874
|
},
|
|
4813
4875
|
genColumnOpts_: function() {
|
|
4814
4876
|
const t = [];
|
|
@@ -4839,14 +4901,14 @@ const Cs = {
|
|
|
4839
4901
|
}
|
|
4840
4902
|
},
|
|
4841
4903
|
onSpaceChange_: function(t) {
|
|
4842
|
-
const e =
|
|
4904
|
+
const e = ft(t);
|
|
4843
4905
|
if (!e) {
|
|
4844
4906
|
console.assert(!1);
|
|
4845
4907
|
return;
|
|
4846
4908
|
}
|
|
4847
4909
|
const n = e.id !== this.space.id;
|
|
4848
4910
|
if (this.space.id = e.id, this.space.name = e.name, n || !j(this.space.id, this.table.id)) {
|
|
4849
|
-
const o =
|
|
4911
|
+
const o = $(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
|
|
4850
4912
|
i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
|
|
4851
4913
|
}
|
|
4852
4914
|
},
|
|
@@ -4926,7 +4988,7 @@ const Cs = {
|
|
|
4926
4988
|
for (let t = 0; t < this.table.columns.length; t++) {
|
|
4927
4989
|
const e = this.table.columns[t], n = new O(
|
|
4928
4990
|
() => this.genColumnOpts_()
|
|
4929
|
-
), o = new
|
|
4991
|
+
), o = new dt("");
|
|
4930
4992
|
this.appendDummyInput("ADD" + t).setAlign(v.Align.RIGHT).appendField(n, "COLUMN" + t).appendField("%{BKY_DATA_AS}").appendField(o, "ALIAS" + t), n.setValue(e.id, !1), o.setValue(e.name, !1);
|
|
4931
4993
|
}
|
|
4932
4994
|
},
|
|
@@ -4938,14 +5000,14 @@ const Cs = {
|
|
|
4938
5000
|
continue;
|
|
4939
5001
|
const e = new O(
|
|
4940
5002
|
() => this.genColumnOpts_()
|
|
4941
|
-
), n = new
|
|
5003
|
+
), n = new dt("");
|
|
4942
5004
|
this.appendDummyInput("ADD" + t).setAlign(v.Align.RIGHT).appendField(e, "COLUMN" + t).appendField("%{BKY_DATA_AS}").appendField(n, "ALIAS" + t);
|
|
4943
5005
|
const o = this.table.columns[0];
|
|
4944
5006
|
e.setValue(o.id ?? "", !1), n.setValue(o.name ?? "", !1);
|
|
4945
5007
|
}
|
|
4946
5008
|
},
|
|
4947
5009
|
checkWarning_: function() {
|
|
4948
|
-
const t =
|
|
5010
|
+
const t = ft(this.space.id);
|
|
4949
5011
|
if (!t) {
|
|
4950
5012
|
this.setWarningText(h("WARN_SPACE_NOT_FOUND"));
|
|
4951
5013
|
return;
|
|
@@ -4963,7 +5025,7 @@ const Cs = {
|
|
|
4963
5025
|
this.setWarningText(null);
|
|
4964
5026
|
}
|
|
4965
5027
|
};
|
|
4966
|
-
|
|
5028
|
+
g.select_column_v1 = ys;
|
|
4967
5029
|
s.forBlock.select_column_v1 = function(t) {
|
|
4968
5030
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
4969
5031
|
for (let l = 0; l < n.itemCount_; l++) {
|
|
@@ -4994,13 +5056,13 @@ const vs = {
|
|
|
4994
5056
|
initData_: function() {
|
|
4995
5057
|
if (this.space.id)
|
|
4996
5058
|
return;
|
|
4997
|
-
const t =
|
|
5059
|
+
const t = Q()?.[0];
|
|
4998
5060
|
if (!t)
|
|
4999
5061
|
return;
|
|
5000
5062
|
this.space.id = t.id, this.space.name = t.name;
|
|
5001
5063
|
const e = this.getField("SPACE");
|
|
5002
5064
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
5003
|
-
const n =
|
|
5065
|
+
const n = $(this.space.id)?.[0];
|
|
5004
5066
|
if (!n)
|
|
5005
5067
|
return;
|
|
5006
5068
|
this.table.id = n.id, this.table.name = n.name;
|
|
@@ -5017,10 +5079,10 @@ const vs = {
|
|
|
5017
5079
|
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_();
|
|
5018
5080
|
},
|
|
5019
5081
|
genSpaceOpts_: function() {
|
|
5020
|
-
return
|
|
5082
|
+
return Ce();
|
|
5021
5083
|
},
|
|
5022
5084
|
genTableOpts_: function() {
|
|
5023
|
-
return
|
|
5085
|
+
return ke(this.space.id);
|
|
5024
5086
|
},
|
|
5025
5087
|
onchange: function(t) {
|
|
5026
5088
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -5033,14 +5095,14 @@ const vs = {
|
|
|
5033
5095
|
}
|
|
5034
5096
|
},
|
|
5035
5097
|
onSpaceChange_: function(t) {
|
|
5036
|
-
const e =
|
|
5098
|
+
const e = ft(t);
|
|
5037
5099
|
if (!e) {
|
|
5038
5100
|
console.assert(!1);
|
|
5039
5101
|
return;
|
|
5040
5102
|
}
|
|
5041
5103
|
let n = !1;
|
|
5042
5104
|
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("TABLE").getOptions(!1), n || !j(this.space.id, this.table.id)) {
|
|
5043
|
-
const i =
|
|
5105
|
+
const i = $(this.space.id)?.[0];
|
|
5044
5106
|
i ? this.setFieldValue(i.id, "TABLE") : this.setFieldValue("", "TABLE");
|
|
5045
5107
|
}
|
|
5046
5108
|
},
|
|
@@ -5053,7 +5115,7 @@ const vs = {
|
|
|
5053
5115
|
this.table.id = e.id, this.table.name = e.name;
|
|
5054
5116
|
},
|
|
5055
5117
|
checkWarning_: function() {
|
|
5056
|
-
const t =
|
|
5118
|
+
const t = ft(this.space.id);
|
|
5057
5119
|
if (!t) {
|
|
5058
5120
|
this.setWarningText(h("WARN_SPACE_NOT_FOUND"));
|
|
5059
5121
|
return;
|
|
@@ -5067,12 +5129,12 @@ const vs = {
|
|
|
5067
5129
|
e.name !== this.table.name && (this.table.name = e.name), this.setWarningText(null);
|
|
5068
5130
|
}
|
|
5069
5131
|
};
|
|
5070
|
-
|
|
5132
|
+
g.select_table_v1 = vs;
|
|
5071
5133
|
s.forBlock.select_table_v1 = function(t) {
|
|
5072
5134
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id;
|
|
5073
5135
|
return [`{spaceId:${e(o)},tableId:${e(i)}}`, r.ATOMIC];
|
|
5074
5136
|
};
|
|
5075
|
-
const
|
|
5137
|
+
const Cs = {
|
|
5076
5138
|
init: function() {
|
|
5077
5139
|
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}");
|
|
5078
5140
|
},
|
|
@@ -5094,7 +5156,7 @@ const ys = {
|
|
|
5094
5156
|
]);
|
|
5095
5157
|
}
|
|
5096
5158
|
};
|
|
5097
|
-
|
|
5159
|
+
g.transaction_v1 = Cs;
|
|
5098
5160
|
s.forBlock.transaction_v1 = function(t) {
|
|
5099
5161
|
const e = s.INDENT, n = t, o = si(n), i = s.statementToCode(n, "HANDLE"), a = s.statementToCode(n, "FINALLY");
|
|
5100
5162
|
return `{
|
|
@@ -5143,13 +5205,13 @@ const ks = {
|
|
|
5143
5205
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
5144
5206
|
}
|
|
5145
5207
|
};
|
|
5146
|
-
|
|
5208
|
+
g.update_column_container_v1 = ks;
|
|
5147
5209
|
const Ns = {
|
|
5148
5210
|
init: function() {
|
|
5149
5211
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
5150
5212
|
}
|
|
5151
5213
|
};
|
|
5152
|
-
|
|
5214
|
+
g.update_column_item_v1 = Ns;
|
|
5153
5215
|
const Ls = {
|
|
5154
5216
|
init: function() {
|
|
5155
5217
|
this.space = {
|
|
@@ -5166,7 +5228,7 @@ const Ls = {
|
|
|
5166
5228
|
new O(() => this.genTableOpts_()),
|
|
5167
5229
|
"TABLE"
|
|
5168
5230
|
), this.setMutator(
|
|
5169
|
-
new
|
|
5231
|
+
new mt.MutatorIcon(
|
|
5170
5232
|
["update_column_item_v1"],
|
|
5171
5233
|
this
|
|
5172
5234
|
)
|
|
@@ -5175,13 +5237,13 @@ const Ls = {
|
|
|
5175
5237
|
initData_: function() {
|
|
5176
5238
|
if (this.space.id)
|
|
5177
5239
|
return;
|
|
5178
|
-
const t =
|
|
5240
|
+
const t = Q()?.[0];
|
|
5179
5241
|
if (!t)
|
|
5180
5242
|
return;
|
|
5181
5243
|
this.space.id = t.id, this.space.name = t.name;
|
|
5182
5244
|
const e = this.getField("SPACE");
|
|
5183
5245
|
e.getOptions(!1), e.setValue(this.space.id, !1);
|
|
5184
|
-
const n =
|
|
5246
|
+
const n = $(this.space.id)?.[0];
|
|
5185
5247
|
if (!n)
|
|
5186
5248
|
return;
|
|
5187
5249
|
this.table.id = n.id, this.table.name = n.name, this.table.columns = n.columns;
|
|
@@ -5201,10 +5263,10 @@ const Ls = {
|
|
|
5201
5263
|
}, 0);
|
|
5202
5264
|
},
|
|
5203
5265
|
genSpaceOpts_: function() {
|
|
5204
|
-
return
|
|
5266
|
+
return Ce();
|
|
5205
5267
|
},
|
|
5206
5268
|
genTableOpts_: function() {
|
|
5207
|
-
return
|
|
5269
|
+
return ke(this.space.id);
|
|
5208
5270
|
},
|
|
5209
5271
|
genColumnOpts_: function() {
|
|
5210
5272
|
const t = [];
|
|
@@ -5235,14 +5297,14 @@ const Ls = {
|
|
|
5235
5297
|
}
|
|
5236
5298
|
},
|
|
5237
5299
|
onSpaceChange_: function(t) {
|
|
5238
|
-
const e =
|
|
5300
|
+
const e = ft(t);
|
|
5239
5301
|
if (!e) {
|
|
5240
5302
|
console.assert(!1);
|
|
5241
5303
|
return;
|
|
5242
5304
|
}
|
|
5243
5305
|
const n = e.id !== this.space.id;
|
|
5244
5306
|
if (this.space.id = e.id, this.space.name = e.name, n || !j(this.space.id, this.table.id)) {
|
|
5245
|
-
const o =
|
|
5307
|
+
const o = $(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
|
|
5246
5308
|
i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
|
|
5247
5309
|
}
|
|
5248
5310
|
},
|
|
@@ -5271,7 +5333,7 @@ const Ls = {
|
|
|
5271
5333
|
}
|
|
5272
5334
|
const o = this.getInput("ADD" + t).connection, i = o.targetBlock();
|
|
5273
5335
|
i && i.dispose();
|
|
5274
|
-
const a =
|
|
5336
|
+
const a = je(this.workspace, n.type);
|
|
5275
5337
|
a && (o.setCheck(null), o.connect(a.outputConnection)), this.updateCheck_();
|
|
5276
5338
|
},
|
|
5277
5339
|
decompose: function(t) {
|
|
@@ -5362,7 +5424,7 @@ const Ls = {
|
|
|
5362
5424
|
if (!c)
|
|
5363
5425
|
continue;
|
|
5364
5426
|
n.setCheck(null);
|
|
5365
|
-
const u =
|
|
5427
|
+
const u = je(this.workspace, c.type);
|
|
5366
5428
|
u && o.connect(u.outputConnection);
|
|
5367
5429
|
}
|
|
5368
5430
|
},
|
|
@@ -5376,7 +5438,7 @@ const Ls = {
|
|
|
5376
5438
|
}
|
|
5377
5439
|
},
|
|
5378
5440
|
checkWarning_: function() {
|
|
5379
|
-
const t =
|
|
5441
|
+
const t = ft(this.space.id);
|
|
5380
5442
|
if (!t) {
|
|
5381
5443
|
this.setWarningText(h("WARN_SPACE_NOT_FOUND"));
|
|
5382
5444
|
return;
|
|
@@ -5394,7 +5456,7 @@ const Ls = {
|
|
|
5394
5456
|
this.setWarningText(null);
|
|
5395
5457
|
}
|
|
5396
5458
|
};
|
|
5397
|
-
|
|
5459
|
+
g.update_column_v1 = Ls;
|
|
5398
5460
|
s.forBlock.update_column_v1 = function(t) {
|
|
5399
5461
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
5400
5462
|
for (let l = 0; l < n.itemCount_; l++) {
|
|
@@ -5411,9 +5473,9 @@ function Ss(t) {
|
|
|
5411
5473
|
if (e.targetBlock())
|
|
5412
5474
|
return;
|
|
5413
5475
|
let n, o;
|
|
5414
|
-
const i =
|
|
5476
|
+
const i = Q()?.[0];
|
|
5415
5477
|
if (i) {
|
|
5416
|
-
const u =
|
|
5478
|
+
const u = $(i.id)?.[0];
|
|
5417
5479
|
if (u) {
|
|
5418
5480
|
n = {
|
|
5419
5481
|
space: {
|
|
@@ -5496,7 +5558,7 @@ const Ps = {
|
|
|
5496
5558
|
]), bs(this));
|
|
5497
5559
|
}
|
|
5498
5560
|
};
|
|
5499
|
-
|
|
5561
|
+
g.update_data_v1 = Ps;
|
|
5500
5562
|
s.forBlock.update_data_v1 = function(t) {
|
|
5501
5563
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", r.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", r.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
|
|
5502
5564
|
return `{
|
|
@@ -5513,10 +5575,10 @@ ${e}}
|
|
|
5513
5575
|
${i}}
|
|
5514
5576
|
`;
|
|
5515
5577
|
};
|
|
5516
|
-
const Rs =
|
|
5578
|
+
const Rs = C.xml, Ds = {
|
|
5517
5579
|
init: function() {
|
|
5518
5580
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(v.Align.CENTRE).appendField(
|
|
5519
|
-
new
|
|
5581
|
+
new Z(Lt, 20, 20, void 0, () => {
|
|
5520
5582
|
this.isInFlyout || this.addEntry_();
|
|
5521
5583
|
})
|
|
5522
5584
|
), this.appendDummyInput("CLOSE_BRACKET").appendField(" ] "), this.setInputsInline(!1), this.setOutput(!0, "JsonArray"), this.setColour(350), this.setTooltip(""), this.setHelpUrl("");
|
|
@@ -5535,11 +5597,11 @@ const Rs = y.xml, Ds = {
|
|
|
5535
5597
|
for (let t = 0; t < this.length; t++) {
|
|
5536
5598
|
const e = "ENTRY" + t, n = this.appendValueInput(e);
|
|
5537
5599
|
n.appendField(
|
|
5538
|
-
new
|
|
5600
|
+
new Z(Lt, 20, 20, void 0, () => {
|
|
5539
5601
|
this.isInFlyout || this.addEntry_(n);
|
|
5540
5602
|
})
|
|
5541
5603
|
), n.appendField(new gn(String(t))), n.appendField(
|
|
5542
|
-
new
|
|
5604
|
+
new Z(se, 20, 20, void 0, () => {
|
|
5543
5605
|
this.isInFlyout || this.removeEntry_(n);
|
|
5544
5606
|
})
|
|
5545
5607
|
), this.moveInputBefore(e, "ADD");
|
|
@@ -5554,11 +5616,11 @@ const Rs = y.xml, Ds = {
|
|
|
5554
5616
|
}
|
|
5555
5617
|
const n = this.appendValueInput("ENTRY" + e);
|
|
5556
5618
|
n.appendField(
|
|
5557
|
-
new
|
|
5619
|
+
new Z(Lt, 20, 20, void 0, () => {
|
|
5558
5620
|
this.isInFlyout || this.addEntry_(n);
|
|
5559
5621
|
})
|
|
5560
5622
|
), n.appendField(new gn(String(e))), n.appendField(
|
|
5561
|
-
new
|
|
5623
|
+
new Z(se, 20, 20, void 0, () => {
|
|
5562
5624
|
this.isInFlyout || this.removeEntry_(n);
|
|
5563
5625
|
})
|
|
5564
5626
|
), e === this.length ? this.moveInputBefore("ENTRY" + e, "ADD") : this.moveInputBefore("ENTRY" + e, "ENTRY" + (e + 1)), this.length++;
|
|
@@ -5574,7 +5636,7 @@ const Rs = y.xml, Ds = {
|
|
|
5574
5636
|
this.length--;
|
|
5575
5637
|
}
|
|
5576
5638
|
};
|
|
5577
|
-
|
|
5639
|
+
g.json_array_v1 = Ds;
|
|
5578
5640
|
const Ms = {
|
|
5579
5641
|
init: function() {
|
|
5580
5642
|
this.appendDummyInput().appendField(
|
|
@@ -5586,11 +5648,11 @@ const Ms = {
|
|
|
5586
5648
|
), this.setOutput(!0, "JsonBoolean"), this.setColour(210);
|
|
5587
5649
|
}
|
|
5588
5650
|
};
|
|
5589
|
-
|
|
5590
|
-
const Sn =
|
|
5651
|
+
g.json_boolean_v1 = Ms;
|
|
5652
|
+
const Sn = C.xml, Us = {
|
|
5591
5653
|
init: function() {
|
|
5592
5654
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(v.Align.CENTRE).appendField(
|
|
5593
|
-
new
|
|
5655
|
+
new Z(Lt, 20, 20, void 0, () => {
|
|
5594
5656
|
this.isInFlyout || this.addEntry_();
|
|
5595
5657
|
})
|
|
5596
5658
|
), this.appendDummyInput("CLOSE_BRACHET").appendField(" } "), this.setInputsInline(!1), this.setOutput(!0, "JsonMap"), this.setColour(120), this.setTooltip(""), this.setHelpUrl("");
|
|
@@ -5618,11 +5680,11 @@ const Sn = y.xml, Us = {
|
|
|
5618
5680
|
for (let e = 0; e < t.length; e++) {
|
|
5619
5681
|
const n = t[e], o = "ENTRY" + e, i = this.appendValueInput(o);
|
|
5620
5682
|
i.appendField(
|
|
5621
|
-
new
|
|
5683
|
+
new Z(Lt, 20, 20, void 0, () => {
|
|
5622
5684
|
this.isInFlyout || this.addEntry_(i);
|
|
5623
5685
|
})
|
|
5624
|
-
), i.appendField(new
|
|
5625
|
-
new
|
|
5686
|
+
), i.appendField(new dt(n), "KEY" + e), i.appendField(
|
|
5687
|
+
new Z(se, 20, 20, void 0, () => {
|
|
5626
5688
|
this.isInFlyout || this.removeEntry_(i);
|
|
5627
5689
|
})
|
|
5628
5690
|
), this.moveInputBefore(o, "ADD");
|
|
@@ -5635,11 +5697,11 @@ const Sn = y.xml, Us = {
|
|
|
5635
5697
|
this.getField("KEY" + o).name = "KEY" + (o + 1), this.getInput("ENTRY" + o).name = "ENTRY" + (o + 1);
|
|
5636
5698
|
const n = this.appendValueInput("ENTRY" + e);
|
|
5637
5699
|
n.appendField(
|
|
5638
|
-
new
|
|
5700
|
+
new Z(Lt, 20, 20, void 0, () => {
|
|
5639
5701
|
this.isInFlyout || this.addEntry_(n);
|
|
5640
5702
|
})
|
|
5641
|
-
), n.appendField(new
|
|
5642
|
-
new
|
|
5703
|
+
), n.appendField(new dt("key"), "KEY" + e), n.appendField(
|
|
5704
|
+
new Z(se, 20, 20, void 0, () => {
|
|
5643
5705
|
this.isInFlyout || this.removeEntry_(n);
|
|
5644
5706
|
})
|
|
5645
5707
|
), e === this.length ? this.moveInputBefore("ENTRY" + e, "ADD") : this.moveInputBefore("ENTRY" + e, "ENTRY" + (e + 1)), this.length++;
|
|
@@ -5653,41 +5715,41 @@ const Sn = y.xml, Us = {
|
|
|
5653
5715
|
this.length--;
|
|
5654
5716
|
}
|
|
5655
5717
|
};
|
|
5656
|
-
|
|
5718
|
+
g.json_map_v1 = Us;
|
|
5657
5719
|
const Vs = {
|
|
5658
5720
|
init: function() {
|
|
5659
|
-
this.appendDummyInput().appendField(new
|
|
5721
|
+
this.appendDummyInput().appendField(new $e(0), "VALUE"), this.setOutput(!0, "JsonNumber"), this.setColour(230);
|
|
5660
5722
|
}
|
|
5661
5723
|
};
|
|
5662
|
-
|
|
5724
|
+
g.json_number_v1 = Vs;
|
|
5663
5725
|
const xs = {
|
|
5664
5726
|
init: function() {
|
|
5665
5727
|
this.appendDummyInput().setAlign(v.Align.CENTRE).appendField("JSON"), this.appendValueInput("JSON").setCheck(["JsonMap", "JsonArray"]), this.setDeletable(!1), this.setColour(250), this.setTooltip(""), this.setHelpUrl("");
|
|
5666
5728
|
}
|
|
5667
5729
|
};
|
|
5668
|
-
|
|
5730
|
+
g.json_root_v1 = xs;
|
|
5669
5731
|
const Ys = {
|
|
5670
5732
|
init: function() {
|
|
5671
|
-
this.appendDummyInput().appendField('"').appendField(new
|
|
5733
|
+
this.appendDummyInput().appendField('"').appendField(new dt(""), "VALUE").appendField('"'), this.setOutput(!0, "JsonString"), this.setColour(160);
|
|
5672
5734
|
}
|
|
5673
5735
|
};
|
|
5674
|
-
|
|
5675
|
-
const Fs =
|
|
5736
|
+
g.json_string_v1 = Ys;
|
|
5737
|
+
const Fs = C.xml, ws = {
|
|
5676
5738
|
init: function() {
|
|
5677
5739
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5678
5740
|
}
|
|
5679
5741
|
};
|
|
5680
|
-
|
|
5742
|
+
g.list_create_container_v1 = ws;
|
|
5681
5743
|
const Ks = {
|
|
5682
5744
|
init: function() {
|
|
5683
5745
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5684
5746
|
}
|
|
5685
5747
|
};
|
|
5686
|
-
|
|
5687
|
-
const
|
|
5748
|
+
g.list_create_item_v1 = Ks;
|
|
5749
|
+
const $s = {
|
|
5688
5750
|
init: function() {
|
|
5689
5751
|
this.itemCount_ = 0, this.setMutator(
|
|
5690
|
-
new
|
|
5752
|
+
new mt.MutatorIcon(
|
|
5691
5753
|
["list_create_item_v1"],
|
|
5692
5754
|
this
|
|
5693
5755
|
)
|
|
@@ -5766,7 +5828,7 @@ const Hs = {
|
|
|
5766
5828
|
this.removeInput("ADD" + t);
|
|
5767
5829
|
}
|
|
5768
5830
|
};
|
|
5769
|
-
|
|
5831
|
+
g.list_create_v1 = $s;
|
|
5770
5832
|
s.forBlock.list_create_v1 = function(t) {
|
|
5771
5833
|
const e = t, n = new Array(e.itemCount_);
|
|
5772
5834
|
for (let i = 0; i < e.itemCount_; i++)
|
|
@@ -5982,7 +6044,7 @@ s.forBlock.list_set_v1 = function(t) {
|
|
|
5982
6044
|
return `${e}[${n}] = ${o};
|
|
5983
6045
|
`;
|
|
5984
6046
|
};
|
|
5985
|
-
const
|
|
6047
|
+
const Hs = {
|
|
5986
6048
|
// logic_compare
|
|
5987
6049
|
EQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_EQ}",
|
|
5988
6050
|
NEQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_NEQ}",
|
|
@@ -5996,7 +6058,7 @@ const $s = {
|
|
|
5996
6058
|
};
|
|
5997
6059
|
B.register(
|
|
5998
6060
|
"logic_op_tooltip_v1",
|
|
5999
|
-
B.buildTooltipForDropdown("OP",
|
|
6061
|
+
B.buildTooltipForDropdown("OP", Hs)
|
|
6000
6062
|
);
|
|
6001
6063
|
m([
|
|
6002
6064
|
{
|
|
@@ -6097,7 +6159,7 @@ const Ws = {
|
|
|
6097
6159
|
mutationToDom: function() {
|
|
6098
6160
|
if (this.elseIfCount_ <= 0 && !this.hasElse_)
|
|
6099
6161
|
return null;
|
|
6100
|
-
const t =
|
|
6162
|
+
const t = C.xml.createElement("mutation");
|
|
6101
6163
|
return this.elseIfCount_ > 0 && t.setAttribute("elseIf", String(this.elseIfCount_)), this.hasElse_ && t.setAttribute("else", "TRUE"), t;
|
|
6102
6164
|
},
|
|
6103
6165
|
domToMutation: function(t) {
|
|
@@ -6584,7 +6646,7 @@ s.forBlock.for_v1 = function(t) {
|
|
|
6584
6646
|
s.statementToCode(t, "DO"),
|
|
6585
6647
|
t
|
|
6586
6648
|
);
|
|
6587
|
-
if (
|
|
6649
|
+
if (C.string.isNumber(o) && C.string.isNumber(i) && C.string.isNumber(a)) {
|
|
6588
6650
|
const u = Math.abs(Number(a));
|
|
6589
6651
|
return Number(o) <= Number(i) ? `for (${n} = ${o}; ${n} <= ${i}; ${n} += ${u}) {
|
|
6590
6652
|
${c}}
|
|
@@ -6593,22 +6655,22 @@ ${c}}
|
|
|
6593
6655
|
`;
|
|
6594
6656
|
} else {
|
|
6595
6657
|
let u = "", l = o;
|
|
6596
|
-
!o.match(/^\w+$/) && !
|
|
6658
|
+
!o.match(/^\w+$/) && !C.string.isNumber(o) && (l = s.nameDB_.getDistinctName(
|
|
6597
6659
|
`${n}_from`,
|
|
6598
|
-
|
|
6660
|
+
tt.NameType.VARIABLE
|
|
6599
6661
|
), u += `var ${l} = ${o};
|
|
6600
6662
|
`);
|
|
6601
6663
|
let _ = i;
|
|
6602
|
-
!i.match(/^\w+$/) && !
|
|
6664
|
+
!i.match(/^\w+$/) && !C.string.isNumber(i) && (_ = s.nameDB_.getDistinctName(
|
|
6603
6665
|
`${n}_to`,
|
|
6604
|
-
|
|
6666
|
+
tt.NameType.VARIABLE
|
|
6605
6667
|
), u += `var ${_} = ${i};
|
|
6606
6668
|
`);
|
|
6607
6669
|
const d = s.nameDB_.getDistinctName(
|
|
6608
6670
|
`${n}_by`,
|
|
6609
|
-
|
|
6671
|
+
tt.NameType.VARIABLE
|
|
6610
6672
|
);
|
|
6611
|
-
return u += `var ${d} = `,
|
|
6673
|
+
return u += `var ${d} = `, C.string.isNumber(a) ? u += `${Math.abs(Number(a))};
|
|
6612
6674
|
` : u += `Math.abs(${a});
|
|
6613
6675
|
`, u += `if (${l} > ${_}) {
|
|
6614
6676
|
${e}${d} = -${d};
|
|
@@ -6665,12 +6727,12 @@ s.forBlock.for_each_v1 = function(t) {
|
|
|
6665
6727
|
let a = "", c = o;
|
|
6666
6728
|
o.match(/^\w+$/) || (c = s.nameDB_.getDistinctName(
|
|
6667
6729
|
`${n}_list`,
|
|
6668
|
-
|
|
6730
|
+
tt.NameType.VARIABLE
|
|
6669
6731
|
), a += `var ${c} = ${o};
|
|
6670
6732
|
`);
|
|
6671
6733
|
const u = s.nameDB_.getDistinctName(
|
|
6672
6734
|
`${n}_index`,
|
|
6673
|
-
|
|
6735
|
+
tt.NameType.VARIABLE
|
|
6674
6736
|
);
|
|
6675
6737
|
return a += `for (var ${u} in ${c}) {
|
|
6676
6738
|
${e}${n} = ${c}[${u}];
|
|
@@ -6712,12 +6774,12 @@ s.forBlock.repeat_v1 = function(t) {
|
|
|
6712
6774
|
let o = "";
|
|
6713
6775
|
const i = s.nameDB_.getDistinctName(
|
|
6714
6776
|
"count",
|
|
6715
|
-
|
|
6777
|
+
tt.NameType.VARIABLE
|
|
6716
6778
|
);
|
|
6717
6779
|
let a = e;
|
|
6718
|
-
return !e.match(/^\w+$/) && !
|
|
6780
|
+
return !e.match(/^\w+$/) && !C.string.isNumber(e) && (a = s.nameDB_.getDistinctName(
|
|
6719
6781
|
"repeat_end",
|
|
6720
|
-
|
|
6782
|
+
tt.NameType.VARIABLE
|
|
6721
6783
|
), o += `var ${a} = ${e};
|
|
6722
6784
|
`), o += `for (var ${i} = 0; ${i} < ${a}; ${i}++) {
|
|
6723
6785
|
${n}}
|
|
@@ -7416,24 +7478,24 @@ s.forBlock.math_trig_v1 = function(t) {
|
|
|
7416
7478
|
}
|
|
7417
7479
|
return [o, r.DIVISION];
|
|
7418
7480
|
};
|
|
7419
|
-
const zs =
|
|
7481
|
+
const zs = C.xml, Zs = {
|
|
7420
7482
|
init: function() {
|
|
7421
7483
|
this.appendDummyInput().appendField(
|
|
7422
7484
|
"%{BKY_OBJECT_V1_CREATE_CONTAINER_TITLE}"
|
|
7423
7485
|
), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
7424
7486
|
}
|
|
7425
7487
|
};
|
|
7426
|
-
|
|
7488
|
+
g.object_create_container_v1 = Zs;
|
|
7427
7489
|
const ta = {
|
|
7428
7490
|
init: function() {
|
|
7429
7491
|
this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
7430
7492
|
}
|
|
7431
7493
|
};
|
|
7432
|
-
|
|
7494
|
+
g.object_create_item_v1 = ta;
|
|
7433
7495
|
const ea = {
|
|
7434
7496
|
init: function() {
|
|
7435
7497
|
this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(
|
|
7436
|
-
new
|
|
7498
|
+
new mt.MutatorIcon(
|
|
7437
7499
|
["object_create_item_v1"],
|
|
7438
7500
|
this
|
|
7439
7501
|
)
|
|
@@ -7499,12 +7561,12 @@ const ea = {
|
|
|
7499
7561
|
},
|
|
7500
7562
|
updateShape_: function() {
|
|
7501
7563
|
for (let t = 0; t < this.itemCount_; t++)
|
|
7502
|
-
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setAlign(v.Align.RIGHT).appendField(new
|
|
7564
|
+
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setAlign(v.Align.RIGHT).appendField(new dt("key"), "KEY" + t);
|
|
7503
7565
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
7504
7566
|
this.removeInput("ADD" + t);
|
|
7505
7567
|
}
|
|
7506
7568
|
};
|
|
7507
|
-
|
|
7569
|
+
g.object_create_v1 = ea;
|
|
7508
7570
|
s.forBlock.object_create_v1 = function(t) {
|
|
7509
7571
|
const e = t;
|
|
7510
7572
|
let n = "{";
|
|
@@ -7746,15 +7808,15 @@ m([
|
|
|
7746
7808
|
s.forBlock.object_to_json_v1 = function(t) {
|
|
7747
7809
|
return [`__jsonStringifyV1__(${s.valueToCode(t, "OBJECT", r.NONE) || "null"})`, r.FUNCTION_CALL];
|
|
7748
7810
|
};
|
|
7749
|
-
const Bn =
|
|
7811
|
+
const Bn = C.xml, na = {
|
|
7750
7812
|
init: function() {
|
|
7751
7813
|
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new So(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
7752
7814
|
}
|
|
7753
7815
|
};
|
|
7754
|
-
|
|
7816
|
+
g.procedure_def_container_v1 = na;
|
|
7755
7817
|
const oa = {
|
|
7756
7818
|
init: function() {
|
|
7757
|
-
const t = new
|
|
7819
|
+
const t = new dt(He.DEFAULT_ARG);
|
|
7758
7820
|
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;
|
|
7759
7821
|
},
|
|
7760
7822
|
validator_: function(t) {
|
|
@@ -7774,15 +7836,15 @@ const oa = {
|
|
|
7774
7836
|
return t;
|
|
7775
7837
|
}
|
|
7776
7838
|
};
|
|
7777
|
-
|
|
7839
|
+
g.procedure_def_item_v1 = oa;
|
|
7778
7840
|
const ia = {
|
|
7779
7841
|
init: function() {
|
|
7780
7842
|
this.withReturn = !1, this.args = [];
|
|
7781
|
-
const t = new
|
|
7843
|
+
const t = new dt(
|
|
7782
7844
|
He.findLegalName("", this)
|
|
7783
7845
|
);
|
|
7784
7846
|
t.setValidator(He.rename), t.setSpellcheck(!1), this.appendDummyInput("DUMMY").appendField(t, "NAME"), this.appendStatementInput("HANDLE"), this.setMutator(
|
|
7785
|
-
new
|
|
7847
|
+
new mt.MutatorIcon(
|
|
7786
7848
|
["procedure_def_item_v1"],
|
|
7787
7849
|
this
|
|
7788
7850
|
)
|
|
@@ -7879,8 +7941,8 @@ const ia = {
|
|
|
7879
7941
|
}
|
|
7880
7942
|
}
|
|
7881
7943
|
};
|
|
7882
|
-
|
|
7883
|
-
const sa =
|
|
7944
|
+
g.procedure_def_v1 = ia;
|
|
7945
|
+
const sa = C.xml, aa = {
|
|
7884
7946
|
init: function() {
|
|
7885
7947
|
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}");
|
|
7886
7948
|
},
|
|
@@ -7936,7 +7998,7 @@ const sa = y.xml, aa = {
|
|
|
7936
7998
|
t.type === "procedure_def_v1" || t.type === "func_entry_v1" ? this.setWarningText(null) : this.setWarningText("the block can only be used in procedure block");
|
|
7937
7999
|
}
|
|
7938
8000
|
};
|
|
7939
|
-
|
|
8001
|
+
g.procedure_return_v1 = aa;
|
|
7940
8002
|
s.forBlock.procedure_return_v1 = function(t) {
|
|
7941
8003
|
const e = t;
|
|
7942
8004
|
return e.withReturn ? `return ${s.valueToCode(e, "VALUE", r.NONE) || "null"};
|
|
@@ -7966,7 +8028,7 @@ const ca = {
|
|
|
7966
8028
|
]);
|
|
7967
8029
|
}
|
|
7968
8030
|
};
|
|
7969
|
-
|
|
8031
|
+
g.download_resource_v1 = ca;
|
|
7970
8032
|
s.forBlock.download_resource_v1 = function(t) {
|
|
7971
8033
|
const e = s.valueToCode(t, "ASSET", r.ATOMIC) || null, n = s.statementToCode(t, "HANDLE");
|
|
7972
8034
|
return `{
|
|
@@ -7979,7 +8041,7 @@ ${n}
|
|
|
7979
8041
|
`;
|
|
7980
8042
|
};
|
|
7981
8043
|
function ao(t) {
|
|
7982
|
-
const e =
|
|
8044
|
+
const e = T.resource.spaces.find((i) => i.id === t);
|
|
7983
8045
|
if (!e)
|
|
7984
8046
|
return [];
|
|
7985
8047
|
const n = [];
|
|
@@ -8001,7 +8063,7 @@ function ra(t) {
|
|
|
8001
8063
|
}), k(e);
|
|
8002
8064
|
}
|
|
8003
8065
|
function co(t, e) {
|
|
8004
|
-
const n =
|
|
8066
|
+
const n = T.resource.spaces.find((i) => i.id === t);
|
|
8005
8067
|
if (!n)
|
|
8006
8068
|
return [];
|
|
8007
8069
|
const o = [];
|
|
@@ -8017,7 +8079,7 @@ function ua(t, e) {
|
|
|
8017
8079
|
}
|
|
8018
8080
|
function ro() {
|
|
8019
8081
|
const t = [];
|
|
8020
|
-
return
|
|
8082
|
+
return T.resource.spaces.forEach((e) => {
|
|
8021
8083
|
e.resources.length > 0 && t.push(e);
|
|
8022
8084
|
}), t;
|
|
8023
8085
|
}
|
|
@@ -8076,7 +8138,7 @@ const _a = {
|
|
|
8076
8138
|
};
|
|
8077
8139
|
},
|
|
8078
8140
|
loadExtraState: function(t) {
|
|
8079
|
-
this.space =
|
|
8141
|
+
this.space = Me(t.space), this.dir = Me(t.dir), this.resource = Me(t.resource);
|
|
8080
8142
|
},
|
|
8081
8143
|
genSpaceOpts_: function() {
|
|
8082
8144
|
return la();
|
|
@@ -8088,7 +8150,7 @@ const _a = {
|
|
|
8088
8150
|
return ua(this.space.id, this.dir.id);
|
|
8089
8151
|
}
|
|
8090
8152
|
};
|
|
8091
|
-
|
|
8153
|
+
g.select_resource_v1 = _a;
|
|
8092
8154
|
s.forBlock.select_resource_v1 = function() {
|
|
8093
8155
|
return "";
|
|
8094
8156
|
};
|
|
@@ -8112,7 +8174,7 @@ const pa = {
|
|
|
8112
8174
|
updateShadow_: function() {
|
|
8113
8175
|
if (this.isInsertionMarker())
|
|
8114
8176
|
return;
|
|
8115
|
-
const t =
|
|
8177
|
+
const t = pt("");
|
|
8116
8178
|
this.getInput("NAME")?.setShadowDom(t);
|
|
8117
8179
|
},
|
|
8118
8180
|
ensureBlocks_: function() {
|
|
@@ -8123,7 +8185,7 @@ const pa = {
|
|
|
8123
8185
|
]);
|
|
8124
8186
|
}
|
|
8125
8187
|
};
|
|
8126
|
-
|
|
8188
|
+
g.upload_resource_v1 = pa;
|
|
8127
8189
|
s.forBlock.upload_resource_v1 = function(t) {
|
|
8128
8190
|
const e = s.valueToCode(t, "NAME", r.ATOMIC) || "''", n = s.valueToCode(t, "DIR", r.ATOMIC) || "null", o = s.valueToCode(t, "DATA", r.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
|
|
8129
8191
|
return `{
|
|
@@ -8191,7 +8253,7 @@ m([
|
|
|
8191
8253
|
s.forBlock.text_append_v1 = function(t) {
|
|
8192
8254
|
const e = s.nameDB_?.getName(
|
|
8193
8255
|
t.getFieldValue("VAR"),
|
|
8194
|
-
|
|
8256
|
+
tt.NameType.VARIABLE
|
|
8195
8257
|
), n = s.valueToCode(t, "TEXT", r.NONE) || "''";
|
|
8196
8258
|
return `${e} += ${oe(n)};
|
|
8197
8259
|
`;
|
|
@@ -8362,7 +8424,7 @@ m([
|
|
|
8362
8424
|
s.forBlock.text_is_empty_v1 = function(t) {
|
|
8363
8425
|
return [`!${s.valueToCode(t, "VALUE", r.MEMBER) || "''"}.length`, r.LOGICAL_NOT];
|
|
8364
8426
|
};
|
|
8365
|
-
const ha =
|
|
8427
|
+
const ha = C.xml, fa = {
|
|
8366
8428
|
itemCount_: 0,
|
|
8367
8429
|
mutationToDom: function() {
|
|
8368
8430
|
const t = ha.createElement("mutation");
|
|
@@ -8437,7 +8499,7 @@ const ha = y.xml, fa = {
|
|
|
8437
8499
|
this.removeInput("ADD" + t);
|
|
8438
8500
|
}
|
|
8439
8501
|
}, ma = function() {
|
|
8440
|
-
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new
|
|
8502
|
+
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new mt.MutatorIcon(["text_join_item_v1"], this));
|
|
8441
8503
|
};
|
|
8442
8504
|
B.registerMutator(
|
|
8443
8505
|
"text_join_mutator_v1",
|
|
@@ -8700,7 +8762,7 @@ const Ta = {
|
|
|
8700
8762
|
this.getInput("IMMEDIATE")?.setShadowDom(o);
|
|
8701
8763
|
}
|
|
8702
8764
|
};
|
|
8703
|
-
|
|
8765
|
+
g.create_timer_v1 = Ta;
|
|
8704
8766
|
s.forBlock.create_timer_v1 = function(t) {
|
|
8705
8767
|
const e = s.valueToCode(t, "INTERVAL", r.ATOMIC) || "1000", n = s.valueToCode(t, "LOOP", r.ATOMIC) || "false", o = s.valueToCode(t, "COUNT", r.ATOMIC) || "1", i = s.valueToCode(t, "IMMEDIATE", r.ATOMIC) || "false", a = s.statementToCode(t, "CALLBACK");
|
|
8706
8768
|
return `__createTimerV1__(${e}, ${n}, ${o}, ${i}, function() {
|
|
@@ -8761,12 +8823,12 @@ const Ea = {
|
|
|
8761
8823
|
}, ga = function(t) {
|
|
8762
8824
|
return function() {
|
|
8763
8825
|
const e = t.workspace, o = t.getField("VAR").getVariable();
|
|
8764
|
-
|
|
8826
|
+
kt.renameVariable(e, o);
|
|
8765
8827
|
};
|
|
8766
8828
|
}, Aa = function(t) {
|
|
8767
8829
|
return function() {
|
|
8768
8830
|
const n = t.getField("VAR").getVariable();
|
|
8769
|
-
n &&
|
|
8831
|
+
n && kt.deleteVariable(n.getWorkspace(), n, t);
|
|
8770
8832
|
};
|
|
8771
8833
|
};
|
|
8772
8834
|
B.registerMixin(
|
|
@@ -8793,7 +8855,7 @@ m([
|
|
|
8793
8855
|
s.forBlock.variable_get_v1 = function(t) {
|
|
8794
8856
|
return [s.nameDB_.getName(
|
|
8795
8857
|
t.getFieldValue("VAR"),
|
|
8796
|
-
|
|
8858
|
+
tt.NameType.VARIABLE
|
|
8797
8859
|
), r.ATOMIC];
|
|
8798
8860
|
};
|
|
8799
8861
|
m([
|
|
@@ -8822,7 +8884,7 @@ m([
|
|
|
8822
8884
|
s.forBlock.variable_set_v1 = function(t) {
|
|
8823
8885
|
const e = s.nameDB_.getName(
|
|
8824
8886
|
t.getFieldValue("VAR"),
|
|
8825
|
-
|
|
8887
|
+
tt.NameType.VARIABLE
|
|
8826
8888
|
), n = s.valueToCode(t, "VALUE", r.ASSIGNMENT) || "0";
|
|
8827
8889
|
return `${e} = ${n};
|
|
8828
8890
|
`;
|
|
@@ -8853,7 +8915,7 @@ const Oa = Qt.getText_;
|
|
|
8853
8915
|
Qt.getText_ = function() {
|
|
8854
8916
|
if (this.selectedOption)
|
|
8855
8917
|
return Oa.call(this);
|
|
8856
|
-
const { i18n: t } =
|
|
8918
|
+
const { i18n: t } = yt, e = this.getSourceBlock();
|
|
8857
8919
|
if (this.name === "APP")
|
|
8858
8920
|
return e.app.name;
|
|
8859
8921
|
if (this.name === "PAGE")
|
|
@@ -8861,7 +8923,7 @@ Qt.getText_ = function() {
|
|
|
8861
8923
|
if (this.name === "ELEMENT")
|
|
8862
8924
|
return e.element.name;
|
|
8863
8925
|
if (this.name === "NODE") {
|
|
8864
|
-
const n =
|
|
8926
|
+
const n = q[e.node.key];
|
|
8865
8927
|
if (n) {
|
|
8866
8928
|
const o = t.global.t(n.name), i = e.node.alias;
|
|
8867
8929
|
return `${o} / ${i}`;
|
|
@@ -8874,7 +8936,7 @@ Qt.getText_ = function() {
|
|
|
8874
8936
|
return console.log(e.event), Ie(n, o);
|
|
8875
8937
|
} else if (this.name === "METHOD") {
|
|
8876
8938
|
const { kind: n, names: o } = e.method;
|
|
8877
|
-
return
|
|
8939
|
+
return on(n, o);
|
|
8878
8940
|
} else {
|
|
8879
8941
|
if (this.name === "SPACE")
|
|
8880
8942
|
return e.space.name;
|
|
@@ -8921,7 +8983,7 @@ function uo(t) {
|
|
|
8921
8983
|
const e = t.getParent();
|
|
8922
8984
|
return e && uo(e) ? !0 : !e && !!(t.outputConnection || t.previousConnection);
|
|
8923
8985
|
}
|
|
8924
|
-
class
|
|
8986
|
+
class ya {
|
|
8925
8987
|
init() {
|
|
8926
8988
|
const e = bo.registry.getItem("blockDisable");
|
|
8927
8989
|
e && (e.preconditionFn = function(n) {
|
|
@@ -8934,8 +8996,8 @@ Po.registerFieldColour();
|
|
|
8934
8996
|
Ro.registry.unregister(Do.names.ESCAPE);
|
|
8935
8997
|
const va = new Mo.CrossTabCopyPaste();
|
|
8936
8998
|
va.init({ contextMenu: !0, shortcut: !0 });
|
|
8937
|
-
const
|
|
8938
|
-
|
|
8999
|
+
const Ca = new ya();
|
|
9000
|
+
Ca.init();
|
|
8939
9001
|
function ln(t) {
|
|
8940
9002
|
const e = Wt();
|
|
8941
9003
|
if (!e)
|
|
@@ -9151,15 +9213,15 @@ function La(t) {
|
|
|
9151
9213
|
break;
|
|
9152
9214
|
}
|
|
9153
9215
|
}
|
|
9154
|
-
const
|
|
9155
|
-
function
|
|
9216
|
+
const Ze = ["get_app_property_v1", "get_app_state_v1"];
|
|
9217
|
+
function ut(t, e) {
|
|
9156
9218
|
return t.find((o) => o === e) !== void 0 ? !1 : (t.push(e), !0);
|
|
9157
9219
|
}
|
|
9158
9220
|
function Sa(t) {
|
|
9159
9221
|
const e = [];
|
|
9160
9222
|
function n(o) {
|
|
9161
9223
|
for (const i of o.getChildren(!0))
|
|
9162
|
-
|
|
9224
|
+
Ze.includes(i.type) && e.push(i), n(i);
|
|
9163
9225
|
}
|
|
9164
9226
|
return n(t), e;
|
|
9165
9227
|
}
|
|
@@ -9168,25 +9230,25 @@ function Ba(t) {
|
|
|
9168
9230
|
for (const n of t)
|
|
9169
9231
|
if (n.type === "get_app_property_v1") {
|
|
9170
9232
|
const o = n;
|
|
9171
|
-
|
|
9233
|
+
ut(
|
|
9172
9234
|
e,
|
|
9173
|
-
|
|
9235
|
+
It({
|
|
9174
9236
|
type: "elementProperty",
|
|
9175
9237
|
nodeId: o.node.id,
|
|
9176
9238
|
propertyKeys: o.property.key
|
|
9177
9239
|
})
|
|
9178
9240
|
);
|
|
9179
|
-
} else n.type === "get_app_state_v1" ?
|
|
9241
|
+
} else n.type === "get_app_state_v1" ? ut(e, It({ type: "state", stateId: n.state.id })) : console.assert(!1);
|
|
9180
9242
|
return e;
|
|
9181
9243
|
}
|
|
9182
9244
|
function ba(t) {
|
|
9183
9245
|
const e = [];
|
|
9184
9246
|
for (const n of t.getChildren(!0))
|
|
9185
|
-
if (
|
|
9247
|
+
if (Ze.includes(n.type))
|
|
9186
9248
|
e.push(n);
|
|
9187
9249
|
else if (n.type === "object_get_v1") {
|
|
9188
9250
|
const o = n.getInputTargetBlock("OBJECT");
|
|
9189
|
-
o &&
|
|
9251
|
+
o && Ze.includes(o.type) && e.push(n);
|
|
9190
9252
|
}
|
|
9191
9253
|
return e;
|
|
9192
9254
|
}
|
|
@@ -9206,12 +9268,12 @@ function Pa(t) {
|
|
|
9206
9268
|
} : (i.property.kind === "elementSlotProperty" || i.property.kind === "customSlotProperty") && (a = {
|
|
9207
9269
|
type: "adaptSlotProperty",
|
|
9208
9270
|
propertyId: i.property.key
|
|
9209
|
-
}), !a || !
|
|
9271
|
+
}), !a || !ut(n, It(a)))
|
|
9210
9272
|
continue;
|
|
9211
9273
|
e.push(a);
|
|
9212
9274
|
} else if (o.type === "get_app_state_v1") {
|
|
9213
9275
|
const a = { type: "state", stateId: o.state.id };
|
|
9214
|
-
if (!
|
|
9276
|
+
if (!ut(n, It(a)))
|
|
9215
9277
|
continue;
|
|
9216
9278
|
e.push(a);
|
|
9217
9279
|
} else if (o.type === "object_get_v1") {
|
|
@@ -9236,7 +9298,7 @@ function Pa(t) {
|
|
|
9236
9298
|
type: "adaptSlotProperty",
|
|
9237
9299
|
propertyId: c.property.key,
|
|
9238
9300
|
subKeys: a
|
|
9239
|
-
}), !u || !
|
|
9301
|
+
}), !u || !ut(n, It(u)))
|
|
9240
9302
|
continue;
|
|
9241
9303
|
e.push(u);
|
|
9242
9304
|
} else if (i.type === "get_app_state_v1") {
|
|
@@ -9245,7 +9307,7 @@ function Pa(t) {
|
|
|
9245
9307
|
stateId: i.state.id,
|
|
9246
9308
|
subKeys: a
|
|
9247
9309
|
};
|
|
9248
|
-
if (!
|
|
9310
|
+
if (!ut(n, It(u)))
|
|
9249
9311
|
continue;
|
|
9250
9312
|
e.push(u);
|
|
9251
9313
|
} else
|
|
@@ -9268,13 +9330,13 @@ function Ra(t) {
|
|
|
9268
9330
|
if (o.type === "watch_effect_v1") {
|
|
9269
9331
|
const i = Sa(o), a = Ba(i);
|
|
9270
9332
|
for (const c of a)
|
|
9271
|
-
e.watchEffect[c] || (e.watchEffect[c] = []),
|
|
9333
|
+
e.watchEffect[c] || (e.watchEffect[c] = []), ut(e.watchEffect[c], o.id);
|
|
9272
9334
|
} else if (o.type === "app_bind_v1") {
|
|
9273
9335
|
const i = ba(o), a = Pa(i);
|
|
9274
9336
|
e.bind.sets[o.id] = a;
|
|
9275
9337
|
for (const c of a) {
|
|
9276
|
-
const u =
|
|
9277
|
-
e.bind.triggers[u] || (e.bind.triggers[u] = []),
|
|
9338
|
+
const u = It(c);
|
|
9339
|
+
e.bind.triggers[u] || (e.bind.triggers[u] = []), ut(e.bind.triggers[u], o.id);
|
|
9278
9340
|
}
|
|
9279
9341
|
}
|
|
9280
9342
|
return e;
|
|
@@ -9286,7 +9348,7 @@ function Da(t) {
|
|
|
9286
9348
|
function _n() {
|
|
9287
9349
|
return Qo(_o);
|
|
9288
9350
|
}
|
|
9289
|
-
const Ma = /* @__PURE__ */
|
|
9351
|
+
const Ma = /* @__PURE__ */ st({
|
|
9290
9352
|
__name: "index",
|
|
9291
9353
|
props: {
|
|
9292
9354
|
lock: { type: Boolean }
|
|
@@ -9307,11 +9369,11 @@ const Ma = /* @__PURE__ */ nt({
|
|
|
9307
9369
|
};
|
|
9308
9370
|
return e({ cleanWorkspace: a }), (u, l) => {
|
|
9309
9371
|
const _ = D("v-btn"), d = D("v-tooltip");
|
|
9310
|
-
return S(),
|
|
9372
|
+
return S(), et(d, {
|
|
9311
9373
|
text: R(n)("x-block-lib.tip.hotkeyCtrlQ")
|
|
9312
9374
|
}, {
|
|
9313
|
-
activator:
|
|
9314
|
-
L(_,
|
|
9375
|
+
activator: nt(({ props: f }) => [
|
|
9376
|
+
L(_, an(f, {
|
|
9315
9377
|
density: "comfortable",
|
|
9316
9378
|
icon: "mdi-broom",
|
|
9317
9379
|
variant: "outlined",
|
|
@@ -9322,7 +9384,7 @@ const Ma = /* @__PURE__ */ nt({
|
|
|
9322
9384
|
}, 8, ["text"]);
|
|
9323
9385
|
};
|
|
9324
9386
|
}
|
|
9325
|
-
}), Ua = /* @__PURE__ */
|
|
9387
|
+
}), Ua = /* @__PURE__ */ st({
|
|
9326
9388
|
__name: "index",
|
|
9327
9389
|
props: {
|
|
9328
9390
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -9333,11 +9395,11 @@ const Ma = /* @__PURE__ */ nt({
|
|
|
9333
9395
|
const { t: e } = Xt(), n = Kt(t, "modelValue");
|
|
9334
9396
|
return (o, i) => {
|
|
9335
9397
|
const a = D("v-btn"), c = D("v-tooltip");
|
|
9336
|
-
return S(),
|
|
9398
|
+
return S(), et(c, {
|
|
9337
9399
|
text: R(e)("x-block-lib.tip.hotkeyCtrlW")
|
|
9338
9400
|
}, {
|
|
9339
|
-
activator:
|
|
9340
|
-
L(a,
|
|
9401
|
+
activator: nt(({ props: u }) => [
|
|
9402
|
+
L(a, an(u, {
|
|
9341
9403
|
density: "comfortable",
|
|
9342
9404
|
icon: n.value ? "mdi-lock" : "mdi-lock-open",
|
|
9343
9405
|
variant: "outlined",
|
|
@@ -9352,7 +9414,7 @@ const Ma = /* @__PURE__ */ nt({
|
|
|
9352
9414
|
key: 0,
|
|
9353
9415
|
class: "text-cation text-grey text-truncate ml-6",
|
|
9354
9416
|
style: { maxWidth: "340px" }
|
|
9355
|
-
}, Fa = /* @__PURE__ */
|
|
9417
|
+
}, Fa = /* @__PURE__ */ st({
|
|
9356
9418
|
__name: "item",
|
|
9357
9419
|
props: {
|
|
9358
9420
|
id: {},
|
|
@@ -9362,7 +9424,7 @@ const Ma = /* @__PURE__ */ nt({
|
|
|
9362
9424
|
},
|
|
9363
9425
|
emits: ["x-click"],
|
|
9364
9426
|
setup(t, { emit: e }) {
|
|
9365
|
-
const { primaryColor: n, backgroundColor2: o, highlightColor: i } = jt(), a = t, c = e, u =
|
|
9427
|
+
const { primaryColor: n, backgroundColor2: o, highlightColor: i } = jt(), a = t, c = e, u = Nt(!1), l = F(() => ({
|
|
9366
9428
|
position: "relative",
|
|
9367
9429
|
background: u.value ? i.value : o.value,
|
|
9368
9430
|
width: "100%",
|
|
@@ -9380,8 +9442,8 @@ const Ma = /* @__PURE__ */ nt({
|
|
|
9380
9442
|
pointerEvents: "none"
|
|
9381
9443
|
}));
|
|
9382
9444
|
return (d, f) => {
|
|
9383
|
-
const p = D("v-spacer"),
|
|
9384
|
-
return Zo((S(),
|
|
9445
|
+
const p = D("v-spacer"), E = D("v-icon"), A = zo("ripple");
|
|
9446
|
+
return Zo((S(), J("div", {
|
|
9385
9447
|
class: "d-flex align-center cursor-pointer",
|
|
9386
9448
|
style: G(l.value),
|
|
9387
9449
|
onClick: f[1] || (f[1] = (P) => c("x-click", a.id)),
|
|
@@ -9389,11 +9451,11 @@ const Ma = /* @__PURE__ */ nt({
|
|
|
9389
9451
|
onMouseover: f[3] || (f[3] = (P) => u.value = !0)
|
|
9390
9452
|
}, [
|
|
9391
9453
|
w("div", Va, [
|
|
9392
|
-
w("span", xa,
|
|
9393
|
-
a.desc ? (S(),
|
|
9454
|
+
w("span", xa, $t(a.title), 1),
|
|
9455
|
+
a.desc ? (S(), J("span", Ya, $t(a.desc), 1)) : ct("", !0)
|
|
9394
9456
|
]),
|
|
9395
9457
|
L(p),
|
|
9396
|
-
L(
|
|
9458
|
+
L(E, {
|
|
9397
9459
|
class: "x-handle cursor-move mr-3",
|
|
9398
9460
|
icon: "mdi-drag-horizontal-variant",
|
|
9399
9461
|
onMousedown: f[0] || (f[0] = Ft(() => {
|
|
@@ -9410,9 +9472,9 @@ const Ma = /* @__PURE__ */ nt({
|
|
|
9410
9472
|
}), wa = {
|
|
9411
9473
|
key: 1,
|
|
9412
9474
|
class: "text-caption text-grey"
|
|
9413
|
-
}, Ka = /* @__PURE__ */
|
|
9475
|
+
}, Ka = /* @__PURE__ */ st({
|
|
9414
9476
|
__name: "index",
|
|
9415
|
-
props: /* @__PURE__ */
|
|
9477
|
+
props: /* @__PURE__ */ Ge({
|
|
9416
9478
|
lock: { type: Boolean }
|
|
9417
9479
|
}, {
|
|
9418
9480
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -9420,7 +9482,7 @@ const Ma = /* @__PURE__ */ nt({
|
|
|
9420
9482
|
}),
|
|
9421
9483
|
emits: ["update:modelValue"],
|
|
9422
9484
|
setup(t, { expose: e }) {
|
|
9423
|
-
const { t: n } = Xt(), o = Kt(t, "modelValue"), i = _n(), a =
|
|
9485
|
+
const { t: n } = Xt(), o = Kt(t, "modelValue"), i = _n(), a = Nt([]);
|
|
9424
9486
|
e({ update: () => {
|
|
9425
9487
|
if (!i.workspace) {
|
|
9426
9488
|
console.assert(!1);
|
|
@@ -9431,14 +9493,14 @@ const Ma = /* @__PURE__ */ nt({
|
|
|
9431
9493
|
const P = A.id === Vo()?.id;
|
|
9432
9494
|
let U = "";
|
|
9433
9495
|
if (A.type.startsWith("on_app_event_v")) {
|
|
9434
|
-
const
|
|
9435
|
-
|
|
9496
|
+
const z = A, vt = q[z.node.key];
|
|
9497
|
+
vt && (U = n(vt.name), z.node.alias && (U += " / " + z.node.alias), U += " - " + Ie(z.event.kind, z.event.names));
|
|
9436
9498
|
} else A.type.startsWith("watch_effect_v") ? U = n("x-block-lib.watchEffect") : A.type.startsWith("app_bind_v") ? U = n("x-block-lib.bind") : A.type.startsWith("func_entry_v") ? U = n("x-block-lib.funcEntry") : A.type.startsWith("procedure_def_v") ? U = n("x-block-lib.procedure") + " - " + A.getFieldValue("NAME") : U = n("x-block-lib.temporaryBlock");
|
|
9437
|
-
const
|
|
9499
|
+
const gt = A.getCommentText() ?? "";
|
|
9438
9500
|
p.push({
|
|
9439
9501
|
id: A.id,
|
|
9440
9502
|
name: U,
|
|
9441
|
-
desc:
|
|
9503
|
+
desc: gt,
|
|
9442
9504
|
select: P
|
|
9443
9505
|
});
|
|
9444
9506
|
}), a.value = p;
|
|
@@ -9450,8 +9512,8 @@ const Ma = /* @__PURE__ */ nt({
|
|
|
9450
9512
|
return;
|
|
9451
9513
|
}
|
|
9452
9514
|
const p = [];
|
|
9453
|
-
a.value.forEach(({ id:
|
|
9454
|
-
p.push(
|
|
9515
|
+
a.value.forEach(({ id: E }) => {
|
|
9516
|
+
p.push(E);
|
|
9455
9517
|
}), u = p;
|
|
9456
9518
|
}, _ = () => !t.lock, d = (p) => {
|
|
9457
9519
|
if (!i.workspace) {
|
|
@@ -9464,8 +9526,8 @@ const Ma = /* @__PURE__ */ nt({
|
|
|
9464
9526
|
}
|
|
9465
9527
|
if (p.oldIndex === p.newIndex)
|
|
9466
9528
|
return;
|
|
9467
|
-
const
|
|
9468
|
-
|
|
9529
|
+
const E = u[p.oldIndex], A = i.workspace.getBlockById(
|
|
9530
|
+
E
|
|
9469
9531
|
);
|
|
9470
9532
|
if (!A) {
|
|
9471
9533
|
console.assert(!1);
|
|
@@ -9477,20 +9539,20 @@ const Ma = /* @__PURE__ */ nt({
|
|
|
9477
9539
|
P !== "" && (U = i.workspace.getBlockById(
|
|
9478
9540
|
P
|
|
9479
9541
|
).getRelativeToSurfaceXY().y + 10);
|
|
9480
|
-
const
|
|
9481
|
-
A.moveTo(new
|
|
9542
|
+
const gt = A.getRelativeToSurfaceXY();
|
|
9543
|
+
A.moveTo(new C.Coordinate(gt.x, U)), i.workspace.cleanUp(), lo();
|
|
9482
9544
|
}, f = async (p) => {
|
|
9483
9545
|
if (!i.workspace) {
|
|
9484
9546
|
console.assert(!1);
|
|
9485
9547
|
return;
|
|
9486
9548
|
}
|
|
9487
|
-
const
|
|
9488
|
-
Yn.setSelected(
|
|
9549
|
+
const E = i.workspace.getBlockById(p);
|
|
9550
|
+
Yn.setSelected(E), ln(p), o.value = !1;
|
|
9489
9551
|
};
|
|
9490
|
-
return (p,
|
|
9552
|
+
return (p, E) => a.value.length > 0 ? (S(), et(R(Uo), {
|
|
9491
9553
|
key: 0,
|
|
9492
9554
|
modelValue: a.value,
|
|
9493
|
-
"onUpdate:modelValue":
|
|
9555
|
+
"onUpdate:modelValue": E[0] || (E[0] = (A) => a.value = A),
|
|
9494
9556
|
animation: 150,
|
|
9495
9557
|
"ghost-class": "ghost",
|
|
9496
9558
|
handle: ".x-handle",
|
|
@@ -9498,8 +9560,8 @@ const Ma = /* @__PURE__ */ nt({
|
|
|
9498
9560
|
onMove: _,
|
|
9499
9561
|
onStart: l
|
|
9500
9562
|
}, {
|
|
9501
|
-
default:
|
|
9502
|
-
(S(!0),
|
|
9563
|
+
default: nt(() => [
|
|
9564
|
+
(S(!0), J(Hn, null, ti(a.value, (A) => (S(), et(Fa, {
|
|
9503
9565
|
id: A.id,
|
|
9504
9566
|
key: A.id,
|
|
9505
9567
|
desc: A.desc,
|
|
@@ -9509,14 +9571,14 @@ const Ma = /* @__PURE__ */ nt({
|
|
|
9509
9571
|
}, null, 8, ["id", "desc", "select", "title"]))), 128))
|
|
9510
9572
|
]),
|
|
9511
9573
|
_: 1
|
|
9512
|
-
}, 8, ["modelValue"])) : (S(),
|
|
9574
|
+
}, 8, ["modelValue"])) : (S(), J("span", wa, $t(R(n)("x-block-lib.noOption")), 1));
|
|
9513
9575
|
}
|
|
9514
|
-
}),
|
|
9576
|
+
}), $a = (t, e) => {
|
|
9515
9577
|
const n = t.__vccOpts || t;
|
|
9516
9578
|
for (const [o, i] of e)
|
|
9517
9579
|
n[o] = i;
|
|
9518
9580
|
return n;
|
|
9519
|
-
},
|
|
9581
|
+
}, Ha = /* @__PURE__ */ $a(Ka, [["__scopeId", "data-v-6cb62cd6"]]), Ga = /* @__PURE__ */ st({
|
|
9520
9582
|
__name: "index",
|
|
9521
9583
|
props: {
|
|
9522
9584
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -9540,11 +9602,11 @@ const Ma = /* @__PURE__ */ nt({
|
|
|
9540
9602
|
const l = u.getBlockById(c);
|
|
9541
9603
|
Yn.setSelected(l), ln(c), n.value = !1;
|
|
9542
9604
|
};
|
|
9543
|
-
return (c, u) => (S(),
|
|
9605
|
+
return (c, u) => (S(), J("div", {
|
|
9544
9606
|
onClick: u[0] || (u[0] = (l) => a(""))
|
|
9545
9607
|
}, "blockTree"));
|
|
9546
9608
|
}
|
|
9547
|
-
}), Wa = { class: "text-subtitle-1" }, ja = /* @__PURE__ */
|
|
9609
|
+
}), Wa = { class: "text-subtitle-1" }, ja = /* @__PURE__ */ st({
|
|
9548
9610
|
__name: "index",
|
|
9549
9611
|
props: {
|
|
9550
9612
|
type: {},
|
|
@@ -9552,69 +9614,69 @@ const Ma = /* @__PURE__ */ nt({
|
|
|
9552
9614
|
},
|
|
9553
9615
|
setup(t, { expose: e }) {
|
|
9554
9616
|
const { t: n } = Xt(), o = ii(), { sysBarAvail: i } = wn(), { backgroundColor1: a } = jt(), c = F(() => {
|
|
9555
|
-
let
|
|
9556
|
-
return o.mdAndUp.value && (
|
|
9617
|
+
let E = "100%";
|
|
9618
|
+
return o.mdAndUp.value && (E = "400px"), {
|
|
9557
9619
|
background: a.value,
|
|
9558
|
-
width:
|
|
9620
|
+
width: E,
|
|
9559
9621
|
height: "100%"
|
|
9560
9622
|
};
|
|
9561
9623
|
}), u = F(() => {
|
|
9562
|
-
let
|
|
9563
|
-
return i.value && (
|
|
9624
|
+
let E = 48;
|
|
9625
|
+
return i.value && (E += 24), {
|
|
9564
9626
|
position: "relative",
|
|
9565
|
-
height: `calc(100% - ${
|
|
9627
|
+
height: `calc(100% - ${E}px)`
|
|
9566
9628
|
};
|
|
9567
9629
|
}), l = F(() => ({
|
|
9568
9630
|
height: "60px"
|
|
9569
|
-
})), { open: _ } =
|
|
9631
|
+
})), { open: _ } = tn(`blocklyNavigatorDlg${We()}`);
|
|
9570
9632
|
ei(() => {
|
|
9571
9633
|
_.value = !1;
|
|
9572
9634
|
});
|
|
9573
9635
|
const d = wt("blockList"), f = wt("blockTree");
|
|
9574
9636
|
return e({ open: _, update: () => {
|
|
9575
9637
|
t.type === "list" ? d.value?.update() : t.type === "tree" && f.value?.update();
|
|
9576
|
-
} }), (
|
|
9577
|
-
const P = D("v-sheet"), U = D("v-btn"),
|
|
9578
|
-
return S(),
|
|
9579
|
-
L(
|
|
9638
|
+
} }), (E, A) => {
|
|
9639
|
+
const P = D("v-sheet"), U = D("v-btn"), gt = D("v-spacer"), z = D("v-dialog"), vt = D("v-tooltip");
|
|
9640
|
+
return S(), J(Hn, null, [
|
|
9641
|
+
L(z, {
|
|
9580
9642
|
modelValue: R(_),
|
|
9581
|
-
"onUpdate:modelValue": A[5] || (A[5] = (
|
|
9643
|
+
"onUpdate:modelValue": A[5] || (A[5] = (H) => ne(_) ? _.value = H : null),
|
|
9582
9644
|
eager: "",
|
|
9583
9645
|
fullscreen: "",
|
|
9584
9646
|
"no-click-animation": "",
|
|
9585
9647
|
persistent: "",
|
|
9586
9648
|
transition: "scroll-x-reverse-transition",
|
|
9587
|
-
onKeydown: A[6] || (A[6] = Gn(Ft((
|
|
9649
|
+
onKeydown: A[6] || (A[6] = Gn(Ft((H) => _.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
9588
9650
|
}, {
|
|
9589
|
-
default:
|
|
9651
|
+
default: nt(() => [
|
|
9590
9652
|
w("div", {
|
|
9591
9653
|
class: "w-100 h-100 d-flex flex-row-reverse",
|
|
9592
|
-
onClick: A[3] || (A[3] = Ft((
|
|
9593
|
-
onContextmenu: A[4] || (A[4] = Ft((
|
|
9654
|
+
onClick: A[3] || (A[3] = Ft((H) => _.value = !1, ["self"])),
|
|
9655
|
+
onContextmenu: A[4] || (A[4] = Ft((H) => _.value = !1, ["self", "prevent"]))
|
|
9594
9656
|
}, [
|
|
9595
9657
|
w("div", {
|
|
9596
9658
|
class: "elevation-2",
|
|
9597
9659
|
style: G(c.value)
|
|
9598
9660
|
}, [
|
|
9599
|
-
R(i) ? (S(),
|
|
9661
|
+
R(i) ? (S(), et(P, {
|
|
9600
9662
|
key: 0,
|
|
9601
9663
|
color: "transparent",
|
|
9602
9664
|
height: 24
|
|
9603
|
-
})) :
|
|
9665
|
+
})) : ct("", !0),
|
|
9604
9666
|
L(P, {
|
|
9605
9667
|
class: "d-flex align-center px-2",
|
|
9606
9668
|
color: "transparent",
|
|
9607
9669
|
height: 48
|
|
9608
9670
|
}, {
|
|
9609
|
-
default:
|
|
9671
|
+
default: nt(() => [
|
|
9610
9672
|
L(U, {
|
|
9611
9673
|
density: "comfortable",
|
|
9612
9674
|
icon: "mdi-close",
|
|
9613
9675
|
variant: "text",
|
|
9614
|
-
onClick: A[0] || (A[0] = (
|
|
9676
|
+
onClick: A[0] || (A[0] = (H) => _.value = !1)
|
|
9615
9677
|
}),
|
|
9616
|
-
w("span", Wa,
|
|
9617
|
-
L(
|
|
9678
|
+
w("span", Wa, $t(R(n)("x-block-lib.navigator")), 1),
|
|
9679
|
+
L(gt)
|
|
9618
9680
|
]),
|
|
9619
9681
|
_: 1
|
|
9620
9682
|
}),
|
|
@@ -9622,20 +9684,20 @@ const Ma = /* @__PURE__ */ nt({
|
|
|
9622
9684
|
class: "overflow-y-auto",
|
|
9623
9685
|
style: G(u.value)
|
|
9624
9686
|
}, [
|
|
9625
|
-
t.type === "list" ? (S(),
|
|
9687
|
+
t.type === "list" ? (S(), et(Ha, {
|
|
9626
9688
|
key: 0,
|
|
9627
9689
|
ref_key: "blockList",
|
|
9628
9690
|
ref: d,
|
|
9629
9691
|
modelValue: R(_),
|
|
9630
|
-
"onUpdate:modelValue": A[1] || (A[1] = (
|
|
9692
|
+
"onUpdate:modelValue": A[1] || (A[1] = (H) => ne(_) ? _.value = H : null),
|
|
9631
9693
|
lock: t.lock
|
|
9632
|
-
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (S(),
|
|
9694
|
+
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (S(), et(Ga, {
|
|
9633
9695
|
key: 1,
|
|
9634
9696
|
ref_key: "blockTree",
|
|
9635
9697
|
ref: f,
|
|
9636
9698
|
modelValue: R(_),
|
|
9637
|
-
"onUpdate:modelValue": A[2] || (A[2] = (
|
|
9638
|
-
}, null, 8, ["modelValue"])) :
|
|
9699
|
+
"onUpdate:modelValue": A[2] || (A[2] = (H) => ne(_) ? _.value = H : null)
|
|
9700
|
+
}, null, 8, ["modelValue"])) : ct("", !0),
|
|
9639
9701
|
w("div", {
|
|
9640
9702
|
style: G(l.value)
|
|
9641
9703
|
}, null, 4)
|
|
@@ -9645,11 +9707,11 @@ const Ma = /* @__PURE__ */ nt({
|
|
|
9645
9707
|
]),
|
|
9646
9708
|
_: 1
|
|
9647
9709
|
}, 8, ["modelValue"]),
|
|
9648
|
-
L(
|
|
9710
|
+
L(vt, {
|
|
9649
9711
|
text: R(n)("x-block-lib.tip.hotkeyCtrlE")
|
|
9650
9712
|
}, {
|
|
9651
|
-
activator:
|
|
9652
|
-
L(U,
|
|
9713
|
+
activator: nt(({ props: H }) => [
|
|
9714
|
+
L(U, an(H, {
|
|
9653
9715
|
density: "comfortable",
|
|
9654
9716
|
icon: "mdi-navigation-variant",
|
|
9655
9717
|
variant: "outlined",
|
|
@@ -9661,12 +9723,12 @@ const Ma = /* @__PURE__ */ nt({
|
|
|
9661
9723
|
], 64);
|
|
9662
9724
|
};
|
|
9663
9725
|
}
|
|
9664
|
-
}), x =
|
|
9726
|
+
}), x = C.xml;
|
|
9665
9727
|
function V(t) {
|
|
9666
9728
|
const e = x.createElement("label");
|
|
9667
9729
|
return e.setAttribute("text", t), e;
|
|
9668
9730
|
}
|
|
9669
|
-
function
|
|
9731
|
+
function y(t, e) {
|
|
9670
9732
|
const n = x.createElement("block");
|
|
9671
9733
|
if (n.setAttribute("type", t), e)
|
|
9672
9734
|
for (const o of e)
|
|
@@ -9679,7 +9741,7 @@ function po(t) {
|
|
|
9679
9741
|
e.setAttribute(n, o);
|
|
9680
9742
|
return e;
|
|
9681
9743
|
}
|
|
9682
|
-
function
|
|
9744
|
+
function Bt(t, e) {
|
|
9683
9745
|
e === void 0 && (e = "");
|
|
9684
9746
|
const n = x.createElement("value");
|
|
9685
9747
|
n.setAttribute("name", t);
|
|
@@ -9713,19 +9775,19 @@ function Xa(t, e) {
|
|
|
9713
9775
|
return i.appendChild(a), o.appendChild(i), n.appendChild(o), n;
|
|
9714
9776
|
}
|
|
9715
9777
|
function Ja() {
|
|
9716
|
-
return
|
|
9778
|
+
return T.app.activeObject.type === "comp" && T.app.activeComp.meta.events.length > 0;
|
|
9717
9779
|
}
|
|
9718
9780
|
function qa() {
|
|
9719
|
-
return
|
|
9781
|
+
return T.app.activeObject.type === "comp" && T.app.activeComp.meta.states.length > 0;
|
|
9720
9782
|
}
|
|
9721
9783
|
function Rn() {
|
|
9722
|
-
return
|
|
9784
|
+
return T.app.activeObject.type === "comp" && T.app.activeComp.meta.methods.length > 0;
|
|
9723
9785
|
}
|
|
9724
9786
|
function Qa() {
|
|
9725
9787
|
const t = [];
|
|
9726
|
-
return t.push(V(h("LABEL_EVENT"))), W("onEvent") && t.push(
|
|
9727
|
-
|
|
9728
|
-
), t.push(
|
|
9788
|
+
return t.push(V(h("LABEL_EVENT"))), W("onEvent") && t.push(y("on_app_event_v1")), Ja() && t.push(y("trigger_app_event_v1")), t.push(
|
|
9789
|
+
y("app_bind_v1", [po([{ key: "items", value: "2" }])])
|
|
9790
|
+
), t.push(y("watch_effect_v1")), (W("getProperty") || W("setProperty")) && t.push(V(h("LABEL_PROPERTY"))), W("getProperty") && t.push(y("get_app_property_v1")), W("setProperty") && t.push(y("set_app_property_v1")), qa() && (t.push(V(h("LABEL_STATE"))), t.push(y("get_app_state_v1")), t.push(y("set_app_state_v1"))), (W("callMethod") || Rn()) && t.push(V(h("LABEL_METHOD"))), W("callMethod") && t.push(y("call_app_method_v1")), Rn() && (t.push(y("impl_app_method_v1")), t.push(y("set_app_method_output_v1")), t.push(y("procedure_return_v1"))), t;
|
|
9729
9791
|
}
|
|
9730
9792
|
const ho = { name: "APP_COMP_CATEGORY", callback: Qa };
|
|
9731
9793
|
function za() {
|
|
@@ -9735,38 +9797,38 @@ function za() {
|
|
|
9735
9797
|
const pe = { name: "APP_COMPUTE_CATEGORY", callback: za };
|
|
9736
9798
|
function Za() {
|
|
9737
9799
|
const t = [];
|
|
9738
|
-
return t.push(
|
|
9800
|
+
return t.push(y("app_debug_trace_v1", [Bt("OBJECT")])), t.push(y("popup_message_v1", [Bt("TEXT")])), t.push(y("open_confirm_dlg_v1")), t.push(y("open_prompt_dlg_v1")), t;
|
|
9739
9801
|
}
|
|
9740
9802
|
const de = { name: "APP_MESSAGE_CATEGORY", callback: Za };
|
|
9741
9803
|
function tc() {
|
|
9742
|
-
for (const t of
|
|
9804
|
+
for (const t of T.app.appList)
|
|
9743
9805
|
if (t.pages.length > 0)
|
|
9744
9806
|
return !0;
|
|
9745
9807
|
return !1;
|
|
9746
9808
|
}
|
|
9747
9809
|
function ec() {
|
|
9748
9810
|
const t = [];
|
|
9749
|
-
return t.push(
|
|
9811
|
+
return t.push(y("app_env_is_v1")), tc() && t.push(y("navigate_to_v1")), t;
|
|
9750
9812
|
}
|
|
9751
9813
|
const he = { name: "APP_MISC_CATEGORY", callback: ec };
|
|
9752
9814
|
function nc() {
|
|
9753
|
-
return
|
|
9815
|
+
return T.app.activeObject.type === "page" && T.app.activePage.meta.states.length > 0;
|
|
9754
9816
|
}
|
|
9755
9817
|
function oc() {
|
|
9756
|
-
return
|
|
9818
|
+
return T.app.activeObject.type === "page" && T.app.activePage.meta.arguments.length > 0;
|
|
9757
9819
|
}
|
|
9758
9820
|
function ic() {
|
|
9759
9821
|
const t = [];
|
|
9760
|
-
return t.push(V(h("LABEL_EVENT"))), W("onEvent") && t.push(
|
|
9761
|
-
|
|
9762
|
-
), t.push(
|
|
9822
|
+
return t.push(V(h("LABEL_EVENT"))), W("onEvent") && t.push(y("on_app_event_v1")), t.push(
|
|
9823
|
+
y("app_bind_v1", [po([{ key: "items", value: "2" }])])
|
|
9824
|
+
), t.push(y("watch_effect_v1")), (W("getProperty") || W("setProperty")) && t.push(V(h("LABEL_PROPERTY"))), W("getProperty") && t.push(y("get_app_property_v1")), W("setProperty") && t.push(y("set_app_property_v1")), nc() && (t.push(V(h("LABEL_STATE"))), t.push(y("get_app_state_v1")), t.push(y("set_app_state_v1"))), W("callMethod") && (t.push(V(h("LABEL_METHOD"))), t.push(y("call_app_method_v1"))), oc() && (t.push(V(h("LABEL_ARGUMENT"))), t.push(y("get_page_argument_v1"))), t;
|
|
9763
9825
|
}
|
|
9764
9826
|
const fo = { name: "APP_PAGE_CATEGORY", callback: ic };
|
|
9765
9827
|
function sc() {
|
|
9766
9828
|
const t = [];
|
|
9767
|
-
return t.push(V(h("LABEL_RESOURCE"))), t.push(
|
|
9829
|
+
return t.push(V(h("LABEL_RESOURCE"))), t.push(y("upload_resource_v1")), t;
|
|
9768
9830
|
}
|
|
9769
|
-
const fe = { name: "APP_RESOURCE_CATEGORY", callback: sc }, xt =
|
|
9831
|
+
const fe = { name: "APP_RESOURCE_CATEGORY", callback: sc }, xt = C.xml;
|
|
9770
9832
|
function ac() {
|
|
9771
9833
|
const t = [];
|
|
9772
9834
|
{
|
|
@@ -9790,10 +9852,10 @@ function ac() {
|
|
|
9790
9852
|
}
|
|
9791
9853
|
return t;
|
|
9792
9854
|
}
|
|
9793
|
-
const
|
|
9855
|
+
const lt = {
|
|
9794
9856
|
name: "PROCEDURE_CATEGORY",
|
|
9795
9857
|
callback: ac
|
|
9796
|
-
}, te =
|
|
9858
|
+
}, te = C.xml;
|
|
9797
9859
|
function cc() {
|
|
9798
9860
|
const t = Wt(), e = [];
|
|
9799
9861
|
{
|
|
@@ -9805,7 +9867,7 @@ function cc() {
|
|
|
9805
9867
|
o.setAttribute("text", "%{BKY_NEW_VARIABLE}"), o.setAttribute("callbackKey", "CREATE_VARIABLE"), t.registerButtonCallback(
|
|
9806
9868
|
"CREATE_VARIABLE",
|
|
9807
9869
|
function(i) {
|
|
9808
|
-
|
|
9870
|
+
kt.createVariableButtonHandler(
|
|
9809
9871
|
i.getTargetWorkspace()
|
|
9810
9872
|
);
|
|
9811
9873
|
}
|
|
@@ -9814,7 +9876,7 @@ function cc() {
|
|
|
9814
9876
|
const n = t.getVariablesOfType("");
|
|
9815
9877
|
if (n.length <= 0)
|
|
9816
9878
|
return e;
|
|
9817
|
-
n.sort(
|
|
9879
|
+
n.sort(kt.compareByName);
|
|
9818
9880
|
{
|
|
9819
9881
|
const o = te.createElement("label");
|
|
9820
9882
|
o.setAttribute("text", h("LABEL_CREATED")), e.push(o);
|
|
@@ -9822,31 +9884,31 @@ function cc() {
|
|
|
9822
9884
|
return n.forEach((o) => {
|
|
9823
9885
|
{
|
|
9824
9886
|
const i = te.createElement("block");
|
|
9825
|
-
i.setAttribute("type", "variable_get_v1"), i.appendChild(
|
|
9887
|
+
i.setAttribute("type", "variable_get_v1"), i.appendChild(kt.generateVariableFieldDom(o)), e.push(i);
|
|
9826
9888
|
}
|
|
9827
9889
|
{
|
|
9828
9890
|
const i = te.createElement("block");
|
|
9829
|
-
i.setAttribute("type", "variable_set_v1"), i.appendChild(
|
|
9891
|
+
i.setAttribute("type", "variable_set_v1"), i.appendChild(kt.generateVariableFieldDom(o)), e.push(i);
|
|
9830
9892
|
}
|
|
9831
9893
|
}), e;
|
|
9832
9894
|
}
|
|
9833
|
-
const
|
|
9895
|
+
const _t = {
|
|
9834
9896
|
name: "VARIABLE_CATEGORY",
|
|
9835
9897
|
callback: cc
|
|
9836
9898
|
};
|
|
9837
9899
|
function rc() {
|
|
9838
9900
|
const t = [];
|
|
9839
|
-
if (
|
|
9840
|
-
t.push(V(h("LABEL_OPERATION"))), t.push(
|
|
9841
|
-
|
|
9842
|
-
), t.push(V(h("LABEL_CONDITION"))), t.push(
|
|
9843
|
-
|
|
9901
|
+
if (Q().length > 0)
|
|
9902
|
+
t.push(V(h("LABEL_OPERATION"))), t.push(y("add_data_v1")), t.push(y("delete_data_v1")), t.push(y("update_data_v1")), t.push(y("query_data_v1")), t.push(y("transaction_v1")), t.push(
|
|
9903
|
+
y("interrupt_transaction_v1", [Bt("VALUE")])
|
|
9904
|
+
), t.push(V(h("LABEL_CONDITION"))), t.push(y("cond_logic_v1")), t.push(y("cond_atomic_v1", [Bt("VALUE")])), t.push(V(h("LABEL_QUERY_EXTRA"))), t.push(
|
|
9905
|
+
y("query_extra_limit_v1", [
|
|
9844
9906
|
Pn("OFFSET", 0),
|
|
9845
9907
|
Pn("LIMIT", 1)
|
|
9846
9908
|
])
|
|
9847
9909
|
), t.push(
|
|
9848
|
-
|
|
9849
|
-
|
|
9910
|
+
y("query_extra_sortby_v1", [
|
|
9911
|
+
Bt("COLUMN"),
|
|
9850
9912
|
Xa("DESC")
|
|
9851
9913
|
])
|
|
9852
9914
|
);
|
|
@@ -9862,7 +9924,7 @@ function uc() {
|
|
|
9862
9924
|
}
|
|
9863
9925
|
function lc() {
|
|
9864
9926
|
const t = [];
|
|
9865
|
-
return
|
|
9927
|
+
return T.compute.activeObject.type === "flow" && t.push(y("on_flow_state_event_v1")), uc() && console.assert(!0), t;
|
|
9866
9928
|
}
|
|
9867
9929
|
const Te = { name: "COMPUTE_FLOW_CATEGORY", callback: lc };
|
|
9868
9930
|
function _c() {
|
|
@@ -9870,16 +9932,16 @@ function _c() {
|
|
|
9870
9932
|
}
|
|
9871
9933
|
function pc() {
|
|
9872
9934
|
const t = [];
|
|
9873
|
-
return
|
|
9935
|
+
return T.compute.activeObject.type === "func" && (t.push(y("func_entry_v1")), T.compute.activeFunc.outputs.length > 0 && t.push(y("set_func_output_v1")), t.push(y("procedure_return_v1"))), _c() && t.push(y("call_func_internal_v1")), t;
|
|
9874
9936
|
}
|
|
9875
9937
|
const Ee = { name: "COMPUTE_FUNC_CATEGORY", callback: pc };
|
|
9876
9938
|
function dc() {
|
|
9877
9939
|
const t = [];
|
|
9878
9940
|
return t.push(
|
|
9879
|
-
|
|
9941
|
+
y("compute_debug_trace_v1", [Bt("OBJECT")])
|
|
9880
9942
|
), t;
|
|
9881
9943
|
}
|
|
9882
|
-
const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc },
|
|
9944
|
+
const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
|
|
9883
9945
|
kind: "category",
|
|
9884
9946
|
name: "%{BKY_CATEGORY_COLOR}",
|
|
9885
9947
|
categorystyle: "color_category",
|
|
@@ -9953,7 +10015,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, ke = {
|
|
|
9953
10015
|
}
|
|
9954
10016
|
}
|
|
9955
10017
|
]
|
|
9956
|
-
},
|
|
10018
|
+
}, Le = {
|
|
9957
10019
|
kind: "category",
|
|
9958
10020
|
name: "%{BKY_CATEGORY_LIST}",
|
|
9959
10021
|
categorystyle: "list_category",
|
|
@@ -10068,7 +10130,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, ke = {
|
|
|
10068
10130
|
type: "list_reverse_v1"
|
|
10069
10131
|
}
|
|
10070
10132
|
]
|
|
10071
|
-
},
|
|
10133
|
+
}, Se = {
|
|
10072
10134
|
kind: "category",
|
|
10073
10135
|
name: "%{BKY_CATEGORY_LOGIC}",
|
|
10074
10136
|
categorystyle: "logic_category",
|
|
@@ -10110,7 +10172,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, ke = {
|
|
|
10110
10172
|
type: "logic_ternary_v1"
|
|
10111
10173
|
}
|
|
10112
10174
|
]
|
|
10113
|
-
},
|
|
10175
|
+
}, Be = {
|
|
10114
10176
|
kind: "category",
|
|
10115
10177
|
name: "%{BKY_CATEGORY_LOOP}",
|
|
10116
10178
|
categorystyle: "loop_category",
|
|
@@ -10172,7 +10234,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, ke = {
|
|
|
10172
10234
|
type: "flow_control_v1"
|
|
10173
10235
|
}
|
|
10174
10236
|
]
|
|
10175
|
-
},
|
|
10237
|
+
}, be = {
|
|
10176
10238
|
kind: "category",
|
|
10177
10239
|
name: "%{BKY_CATEGORY_MATH}",
|
|
10178
10240
|
categorystyle: "math_category",
|
|
@@ -10327,7 +10389,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, ke = {
|
|
|
10327
10389
|
type: "math_on_list_v1"
|
|
10328
10390
|
}
|
|
10329
10391
|
]
|
|
10330
|
-
},
|
|
10392
|
+
}, Pe = {
|
|
10331
10393
|
kind: "category",
|
|
10332
10394
|
name: "%{BKY_CATEGORY_OBJECT}",
|
|
10333
10395
|
categorystyle: "object_category",
|
|
@@ -10395,7 +10457,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, ke = {
|
|
|
10395
10457
|
}
|
|
10396
10458
|
}
|
|
10397
10459
|
]
|
|
10398
|
-
},
|
|
10460
|
+
}, Re = {
|
|
10399
10461
|
kind: "category",
|
|
10400
10462
|
name: "%{BKY_CATEGORY_TEXT}",
|
|
10401
10463
|
categorystyle: "text_category",
|
|
@@ -10603,25 +10665,25 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, ke = {
|
|
|
10603
10665
|
categorystyle: "misc_category",
|
|
10604
10666
|
custom: he.name
|
|
10605
10667
|
},
|
|
10668
|
+
Be,
|
|
10606
10669
|
Se,
|
|
10670
|
+
be,
|
|
10671
|
+
Re,
|
|
10607
10672
|
Le,
|
|
10608
|
-
Be,
|
|
10609
10673
|
Pe,
|
|
10610
10674
|
Ne,
|
|
10611
|
-
be,
|
|
10612
|
-
ke,
|
|
10613
10675
|
mo,
|
|
10614
10676
|
{
|
|
10615
10677
|
kind: "category",
|
|
10616
10678
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
10617
10679
|
categorystyle: "variable_category",
|
|
10618
|
-
custom:
|
|
10680
|
+
custom: _t.name
|
|
10619
10681
|
},
|
|
10620
10682
|
{
|
|
10621
10683
|
kind: "category",
|
|
10622
10684
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
10623
10685
|
categorystyle: "procedure_category",
|
|
10624
|
-
custom:
|
|
10686
|
+
custom: lt.name
|
|
10625
10687
|
},
|
|
10626
10688
|
{
|
|
10627
10689
|
kind: "category",
|
|
@@ -10663,24 +10725,24 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, ke = {
|
|
|
10663
10725
|
categorystyle: "misc_category",
|
|
10664
10726
|
custom: ge.name
|
|
10665
10727
|
},
|
|
10728
|
+
Be,
|
|
10666
10729
|
Se,
|
|
10730
|
+
be,
|
|
10731
|
+
Re,
|
|
10667
10732
|
Le,
|
|
10668
|
-
Be,
|
|
10669
10733
|
Pe,
|
|
10670
10734
|
Ne,
|
|
10671
|
-
be,
|
|
10672
|
-
ke,
|
|
10673
10735
|
{
|
|
10674
10736
|
kind: "category",
|
|
10675
10737
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
10676
10738
|
categorystyle: "variable_category",
|
|
10677
|
-
custom:
|
|
10739
|
+
custom: _t.name
|
|
10678
10740
|
},
|
|
10679
10741
|
{
|
|
10680
10742
|
kind: "category",
|
|
10681
10743
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
10682
10744
|
categorystyle: "procedure_category",
|
|
10683
|
-
custom:
|
|
10745
|
+
custom: lt.name
|
|
10684
10746
|
}
|
|
10685
10747
|
]
|
|
10686
10748
|
}, mc = {
|
|
@@ -10710,24 +10772,24 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, ke = {
|
|
|
10710
10772
|
categorystyle: "misc_category",
|
|
10711
10773
|
custom: ge.name
|
|
10712
10774
|
},
|
|
10775
|
+
Be,
|
|
10713
10776
|
Se,
|
|
10777
|
+
be,
|
|
10778
|
+
Re,
|
|
10714
10779
|
Le,
|
|
10715
|
-
Be,
|
|
10716
10780
|
Pe,
|
|
10717
10781
|
Ne,
|
|
10718
|
-
be,
|
|
10719
|
-
ke,
|
|
10720
10782
|
{
|
|
10721
10783
|
kind: "category",
|
|
10722
10784
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
10723
10785
|
categorystyle: "variable_category",
|
|
10724
|
-
custom:
|
|
10786
|
+
custom: _t.name
|
|
10725
10787
|
},
|
|
10726
10788
|
{
|
|
10727
10789
|
kind: "category",
|
|
10728
10790
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
10729
10791
|
categorystyle: "procedure_category",
|
|
10730
|
-
custom:
|
|
10792
|
+
custom: lt.name
|
|
10731
10793
|
}
|
|
10732
10794
|
]
|
|
10733
10795
|
}, Tc = {
|
|
@@ -10782,25 +10844,25 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, ke = {
|
|
|
10782
10844
|
categorystyle: "misc_category",
|
|
10783
10845
|
custom: he.name
|
|
10784
10846
|
},
|
|
10847
|
+
Be,
|
|
10785
10848
|
Se,
|
|
10849
|
+
be,
|
|
10850
|
+
Re,
|
|
10786
10851
|
Le,
|
|
10787
|
-
Be,
|
|
10788
10852
|
Pe,
|
|
10789
10853
|
Ne,
|
|
10790
|
-
be,
|
|
10791
|
-
ke,
|
|
10792
10854
|
mo,
|
|
10793
10855
|
{
|
|
10794
10856
|
kind: "category",
|
|
10795
10857
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
10796
10858
|
categorystyle: "variable_category",
|
|
10797
|
-
custom:
|
|
10859
|
+
custom: _t.name
|
|
10798
10860
|
},
|
|
10799
10861
|
{
|
|
10800
10862
|
kind: "category",
|
|
10801
10863
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
10802
10864
|
categorystyle: "procedure_category",
|
|
10803
|
-
custom:
|
|
10865
|
+
custom: lt.name
|
|
10804
10866
|
},
|
|
10805
10867
|
{
|
|
10806
10868
|
kind: "category",
|
|
@@ -10815,7 +10877,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, ke = {
|
|
|
10815
10877
|
custom: pe.name
|
|
10816
10878
|
}
|
|
10817
10879
|
]
|
|
10818
|
-
},
|
|
10880
|
+
}, Ke = {
|
|
10819
10881
|
grid: {
|
|
10820
10882
|
length: 2,
|
|
10821
10883
|
snap: !0,
|
|
@@ -10842,8 +10904,8 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, ke = {
|
|
|
10842
10904
|
}
|
|
10843
10905
|
};
|
|
10844
10906
|
function gc(t, e, n, o) {
|
|
10845
|
-
|
|
10846
|
-
const i = xo(t,
|
|
10907
|
+
Ke.theme = o ? "dark" : "light", Ke.toolbox = Ac(e, n);
|
|
10908
|
+
const i = xo(t, Ke);
|
|
10847
10909
|
return i.addChangeListener(Yo.shadowBlockConversionChangeListener), Ic(i, e, n), Oc(i), i;
|
|
10848
10910
|
}
|
|
10849
10911
|
function Ac(t, e) {
|
|
@@ -10854,10 +10916,10 @@ function Ic(t, e, n) {
|
|
|
10854
10916
|
function o({ name: i, callback: a }) {
|
|
10855
10917
|
t.registerToolboxCategoryCallback(i, () => a(e));
|
|
10856
10918
|
}
|
|
10857
|
-
e === "page" ? n === "v1" && (o(fo), o(de), o(he), o(
|
|
10919
|
+
e === "page" ? n === "v1" && (o(fo), o(de), o(he), o(_t), o(lt), o(fe), o(pe)) : e === "comp" ? n === "v1" && (o(ho), o(de), o(he), o(_t), o(lt), o(fe), o(pe)) : e === "func" ? n === "v1" && (o(Ee), o(Te), o(me), o(ge), o(_t), o(lt)) : e === "flow" && n === "v1" && (o(Ee), o(Te), o(me), o(ge), o(_t), o(lt));
|
|
10858
10920
|
}
|
|
10859
10921
|
function Oc(t) {
|
|
10860
|
-
const { router: e } =
|
|
10922
|
+
const { router: e } = yt;
|
|
10861
10923
|
t.registerButtonCallback("NO_COMPUTE", () => {
|
|
10862
10924
|
const n = e.resolve({
|
|
10863
10925
|
path: "/compute/" + Date.now()
|
|
@@ -10874,7 +10936,7 @@ function Oc(t) {
|
|
|
10874
10936
|
}, 100);
|
|
10875
10937
|
});
|
|
10876
10938
|
}
|
|
10877
|
-
function
|
|
10939
|
+
function yc(t, e) {
|
|
10878
10940
|
const n = e.newBlock("json_root_v1");
|
|
10879
10941
|
n.initSvg(), n.render();
|
|
10880
10942
|
const o = (i, a) => {
|
|
@@ -10948,9 +11010,9 @@ function vc(t) {
|
|
|
10948
11010
|
if (o.type === "json_root_v1")
|
|
10949
11011
|
return e(o);
|
|
10950
11012
|
}
|
|
10951
|
-
const
|
|
11013
|
+
const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ st({
|
|
10952
11014
|
__name: "index",
|
|
10953
|
-
props: /* @__PURE__ */
|
|
11015
|
+
props: /* @__PURE__ */ Ge({
|
|
10954
11016
|
type: {},
|
|
10955
11017
|
version: {},
|
|
10956
11018
|
locale: {},
|
|
@@ -10961,20 +11023,20 @@ const yc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ nt({
|
|
|
10961
11023
|
scale: { required: !0 },
|
|
10962
11024
|
scaleModifiers: {}
|
|
10963
11025
|
}),
|
|
10964
|
-
emits: /* @__PURE__ */
|
|
11026
|
+
emits: /* @__PURE__ */ Ge(["ready"], ["update:lock", "update:scale"]),
|
|
10965
11027
|
setup(t, { expose: e, emit: n }) {
|
|
10966
|
-
const { backgroundColor2: o } = jt(), i = Kt(t, "lock"), a = Kt(t, "scale"), c = n, u = `blocklyEditor${
|
|
11028
|
+
const { backgroundColor2: o } = jt(), i = Kt(t, "lock"), a = Kt(t, "scale"), c = n, u = `blocklyEditor${We()}`, l = Nt(), _ = wt("parentContainer"), d = wt("clean"), f = wt("navigator"), p = {};
|
|
10967
11029
|
Da(p);
|
|
10968
|
-
const
|
|
11030
|
+
const E = Nt(!0), A = Nt(!1), P = F(() => t.type === "json" ? "tree" : "list"), U = F(() => ({
|
|
10969
11031
|
width: "100%",
|
|
10970
11032
|
height: "calc(100% - 48px)"
|
|
10971
|
-
})),
|
|
11033
|
+
})), gt = F(() => ({
|
|
10972
11034
|
position: "absolute",
|
|
10973
11035
|
background: o.value,
|
|
10974
11036
|
bottom: "0px",
|
|
10975
11037
|
width: "100%",
|
|
10976
11038
|
height: "48px"
|
|
10977
|
-
})),
|
|
11039
|
+
})), z = F(() => ({
|
|
10978
11040
|
position: "absolute",
|
|
10979
11041
|
background: t.dark ? "#0000007f" : "#ffffff7f",
|
|
10980
11042
|
top: "1px",
|
|
@@ -10982,12 +11044,12 @@ const yc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ nt({
|
|
|
10982
11044
|
width: "56px",
|
|
10983
11045
|
height: "calc(100% - 49px)",
|
|
10984
11046
|
zIndex: 999
|
|
10985
|
-
})),
|
|
11047
|
+
})), vt = F(() => ({
|
|
10986
11048
|
position: "absolute",
|
|
10987
11049
|
top: "0px",
|
|
10988
11050
|
right: "0px",
|
|
10989
11051
|
zIndex: 20
|
|
10990
|
-
})),
|
|
11052
|
+
})), H = F(() => ({
|
|
10991
11053
|
position: "absolute",
|
|
10992
11054
|
background: t.dark ? "#0000007f" : "#ffffff7f",
|
|
10993
11055
|
top: "0px",
|
|
@@ -11008,7 +11070,7 @@ const yc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ nt({
|
|
|
11008
11070
|
top: 0,
|
|
11009
11071
|
left: 0,
|
|
11010
11072
|
zIndex: 3e3
|
|
11011
|
-
})), { open: Ut } =
|
|
11073
|
+
})), { open: Ut } = tn(`blocklyEditorFlyout${We()}`);
|
|
11012
11074
|
An(async () => {
|
|
11013
11075
|
if (!l.value || !_.value) {
|
|
11014
11076
|
console.assert(!1);
|
|
@@ -11016,8 +11078,8 @@ const yc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ nt({
|
|
|
11016
11078
|
}
|
|
11017
11079
|
Fo(_.value), await On(t.locale), p.workspace = gc(l.value, t.type, t.version, t.dark), p.workspace.addChangeListener(I.disableOrphans), p.workspace.addChangeListener(Eo);
|
|
11018
11080
|
const N = document.querySelector(`#${u} .blocklyFlyout`);
|
|
11019
|
-
new MutationObserver((
|
|
11020
|
-
|
|
11081
|
+
new MutationObserver((De) => {
|
|
11082
|
+
De.forEach((zt) => {
|
|
11021
11083
|
zt.type === "attributes" && zt.attributeName === "style" && (Ut.value = p.workspace.getFlyout().isVisible());
|
|
11022
11084
|
});
|
|
11023
11085
|
}).observe(N, { attributes: !0 }), Ut.value = p.workspace.getFlyout().isVisible(), dn(), hn(), await ni(), c("ready");
|
|
@@ -11030,10 +11092,10 @@ const yc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ nt({
|
|
|
11030
11092
|
if (N.type === I.FINISHED_LOADING) {
|
|
11031
11093
|
lo(), setTimeout(() => {
|
|
11032
11094
|
f.value?.update();
|
|
11033
|
-
}, 0),
|
|
11095
|
+
}, 0), E.value = !1;
|
|
11034
11096
|
return;
|
|
11035
11097
|
}
|
|
11036
|
-
if (!
|
|
11098
|
+
if (!E.value) {
|
|
11037
11099
|
if (N.type === I.VIEWPORT_CHANGE) {
|
|
11038
11100
|
a.value = p.workspace.getScale();
|
|
11039
11101
|
return;
|
|
@@ -11044,7 +11106,7 @@ const yc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ nt({
|
|
|
11044
11106
|
}
|
|
11045
11107
|
}
|
|
11046
11108
|
const go = (N) => {
|
|
11047
|
-
|
|
11109
|
+
E.value = !0, t.type === "json" ? yc(N, p.workspace) : K.workspaces.load(N, p.workspace);
|
|
11048
11110
|
}, Ao = () => t.type === "json" ? vc(p.workspace) : K.workspaces.save(p.workspace), Io = () => {
|
|
11049
11111
|
if (t.type === "json")
|
|
11050
11112
|
console.assert(!1);
|
|
@@ -11054,7 +11116,7 @@ const yc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ nt({
|
|
|
11054
11116
|
p.workspace.setIsReadOnly(i.value), p.workspace.isReadOnly() && (Ut.value = !1);
|
|
11055
11117
|
}, hn = () => {
|
|
11056
11118
|
p.workspace.setScale(a.value);
|
|
11057
|
-
},
|
|
11119
|
+
}, yo = () => {
|
|
11058
11120
|
p.workspace.fireChangeListener(new Wn());
|
|
11059
11121
|
}, fn = () => {
|
|
11060
11122
|
d.value?.cleanWorkspace();
|
|
@@ -11084,15 +11146,15 @@ const yc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ nt({
|
|
|
11084
11146
|
}), Vt(a, () => {
|
|
11085
11147
|
hn();
|
|
11086
11148
|
}), e({
|
|
11087
|
-
loading:
|
|
11149
|
+
loading: E,
|
|
11088
11150
|
load: go,
|
|
11089
11151
|
save: Ao,
|
|
11090
11152
|
generateCode: Io,
|
|
11091
11153
|
generateReactivity: Oo,
|
|
11092
|
-
fireStateChange:
|
|
11093
|
-
}), (N,
|
|
11094
|
-
const
|
|
11095
|
-
return S(),
|
|
11154
|
+
fireStateChange: yo
|
|
11155
|
+
}), (N, At) => {
|
|
11156
|
+
const De = D("v-icon"), zt = D("x-loading");
|
|
11157
|
+
return S(), J("div", Cc, [
|
|
11096
11158
|
w("div", {
|
|
11097
11159
|
id: u,
|
|
11098
11160
|
ref_key: "blocklyDiv",
|
|
@@ -11100,24 +11162,24 @@ const yc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ nt({
|
|
|
11100
11162
|
style: G(U.value)
|
|
11101
11163
|
}, null, 4),
|
|
11102
11164
|
w("div", {
|
|
11103
|
-
style: G(
|
|
11165
|
+
style: G(gt.value)
|
|
11104
11166
|
}, [
|
|
11105
11167
|
oi(N.$slots, "bottom")
|
|
11106
11168
|
], 4),
|
|
11107
|
-
A.value ? (S(),
|
|
11169
|
+
A.value ? (S(), J("div", {
|
|
11108
11170
|
key: 0,
|
|
11109
11171
|
class: "d-flex flex-column justify-center align-center",
|
|
11110
|
-
style: G(
|
|
11172
|
+
style: G(z.value)
|
|
11111
11173
|
}, [
|
|
11112
|
-
L(
|
|
11174
|
+
L(De, {
|
|
11113
11175
|
icon: "mdi-delete",
|
|
11114
11176
|
size: "x-large"
|
|
11115
11177
|
})
|
|
11116
|
-
], 4)) :
|
|
11117
|
-
|
|
11178
|
+
], 4)) : ct("", !0),
|
|
11179
|
+
E.value ? ct("", !0) : (S(), J("div", {
|
|
11118
11180
|
key: 1,
|
|
11119
11181
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
11120
|
-
style: G(
|
|
11182
|
+
style: G(vt.value)
|
|
11121
11183
|
}, [
|
|
11122
11184
|
L(Ma, {
|
|
11123
11185
|
ref_key: "clean",
|
|
@@ -11126,7 +11188,7 @@ const yc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ nt({
|
|
|
11126
11188
|
}, null, 8, ["lock"]),
|
|
11127
11189
|
L(Ua, {
|
|
11128
11190
|
modelValue: i.value,
|
|
11129
|
-
"onUpdate:modelValue":
|
|
11191
|
+
"onUpdate:modelValue": At[0] || (At[0] = (vo) => i.value = vo)
|
|
11130
11192
|
}, null, 8, ["modelValue"]),
|
|
11131
11193
|
L(ja, {
|
|
11132
11194
|
ref_key: "navigator",
|
|
@@ -11135,43 +11197,43 @@ const yc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ nt({
|
|
|
11135
11197
|
type: P.value
|
|
11136
11198
|
}, null, 8, ["lock", "type"])
|
|
11137
11199
|
], 4)),
|
|
11138
|
-
i.value ? (S(),
|
|
11200
|
+
i.value ? (S(), J("div", {
|
|
11139
11201
|
key: 2,
|
|
11140
11202
|
style: G(pn.value)
|
|
11141
|
-
}, null, 4)) :
|
|
11142
|
-
i.value ? (S(),
|
|
11203
|
+
}, null, 4)) : ct("", !0),
|
|
11204
|
+
i.value ? (S(), J("div", {
|
|
11143
11205
|
key: 3,
|
|
11144
|
-
style: G(
|
|
11145
|
-
}, null, 4)) :
|
|
11206
|
+
style: G(H.value)
|
|
11207
|
+
}, null, 4)) : ct("", !0),
|
|
11146
11208
|
w("div", {
|
|
11147
11209
|
ref_key: "parentContainer",
|
|
11148
11210
|
ref: _,
|
|
11149
11211
|
style: G(To.value)
|
|
11150
11212
|
}, null, 4),
|
|
11151
11213
|
L(zt, {
|
|
11152
|
-
open:
|
|
11214
|
+
open: E.value,
|
|
11153
11215
|
"z-index": 99
|
|
11154
11216
|
}, null, 8, ["open"])
|
|
11155
11217
|
]);
|
|
11156
11218
|
};
|
|
11157
11219
|
}
|
|
11158
|
-
}), Nc = /* @__PURE__ */
|
|
11220
|
+
}), Nc = /* @__PURE__ */ st({
|
|
11159
11221
|
__name: "index",
|
|
11160
11222
|
props: {
|
|
11161
11223
|
code: {}
|
|
11162
11224
|
},
|
|
11163
11225
|
setup(t) {
|
|
11164
11226
|
const e = t;
|
|
11165
|
-
|
|
11227
|
+
$o.registerLanguage("javascript", Ho);
|
|
11166
11228
|
const n = Go.component, { backgroundColor2: o } = jt();
|
|
11167
11229
|
return (i, a) => {
|
|
11168
11230
|
const c = D("v-sheet");
|
|
11169
|
-
return S(),
|
|
11231
|
+
return S(), et(c, {
|
|
11170
11232
|
color: R(o),
|
|
11171
11233
|
height: "100%",
|
|
11172
11234
|
width: "100%"
|
|
11173
11235
|
}, {
|
|
11174
|
-
default:
|
|
11236
|
+
default: nt(() => [
|
|
11175
11237
|
L(R(n), {
|
|
11176
11238
|
code: e.code,
|
|
11177
11239
|
language: "js"
|
|
@@ -11181,10 +11243,10 @@ const yc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ nt({
|
|
|
11181
11243
|
}, 8, ["color"]);
|
|
11182
11244
|
};
|
|
11183
11245
|
}
|
|
11184
|
-
}), Lc = { class: "text-subtitle-1" }, Sc = { class: "w-100 h-100 overflow-auto" }, Bc = /* @__PURE__ */
|
|
11246
|
+
}), Lc = { class: "text-subtitle-1" }, Sc = { class: "w-100 h-100 overflow-auto" }, Bc = /* @__PURE__ */ st({
|
|
11185
11247
|
__name: "index",
|
|
11186
11248
|
setup(t) {
|
|
11187
|
-
const { t: e } = Xt(), { sysBarAvail: n } = wn(), { backgroundColor0: o, backgroundColor2: i } = jt(), a =
|
|
11249
|
+
const { t: e } = Xt(), { sysBarAvail: n } = wn(), { backgroundColor0: o, backgroundColor2: i } = jt(), a = Nt(""), c = F(() => {
|
|
11188
11250
|
let _ = 48;
|
|
11189
11251
|
return n.value && (_ += 24), {
|
|
11190
11252
|
position: "relative",
|
|
@@ -11192,10 +11254,10 @@ const yc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ nt({
|
|
|
11192
11254
|
};
|
|
11193
11255
|
}), u = (_) => {
|
|
11194
11256
|
a.value = _.code;
|
|
11195
|
-
}, { open: l } =
|
|
11257
|
+
}, { open: l } = tn("sourceDlg", u);
|
|
11196
11258
|
return (_, d) => {
|
|
11197
|
-
const f = D("v-sheet"), p = D("v-btn"),
|
|
11198
|
-
return S(),
|
|
11259
|
+
const f = D("v-sheet"), p = D("v-btn"), E = D("v-spacer"), A = D("v-dialog");
|
|
11260
|
+
return S(), et(A, {
|
|
11199
11261
|
modelValue: R(l),
|
|
11200
11262
|
"onUpdate:modelValue": d[1] || (d[1] = (P) => ne(l) ? l.value = P : null),
|
|
11201
11263
|
fullscreen: "",
|
|
@@ -11204,32 +11266,32 @@ const yc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ nt({
|
|
|
11204
11266
|
transition: "dialog-bottom-transition",
|
|
11205
11267
|
onKeydown: d[2] || (d[2] = Gn(Ft((P) => l.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
11206
11268
|
}, {
|
|
11207
|
-
default:
|
|
11269
|
+
default: nt(() => [
|
|
11208
11270
|
L(f, {
|
|
11209
11271
|
color: R(o),
|
|
11210
11272
|
height: "100%",
|
|
11211
11273
|
width: "100%"
|
|
11212
11274
|
}, {
|
|
11213
|
-
default:
|
|
11214
|
-
R(n) ? (S(),
|
|
11275
|
+
default: nt(() => [
|
|
11276
|
+
R(n) ? (S(), et(f, {
|
|
11215
11277
|
key: 0,
|
|
11216
11278
|
color: R(i),
|
|
11217
11279
|
height: 24
|
|
11218
|
-
}, null, 8, ["color"])) :
|
|
11280
|
+
}, null, 8, ["color"])) : ct("", !0),
|
|
11219
11281
|
L(f, {
|
|
11220
11282
|
class: "d-flex align-center px-2",
|
|
11221
11283
|
color: R(i),
|
|
11222
11284
|
height: 48
|
|
11223
11285
|
}, {
|
|
11224
|
-
default:
|
|
11286
|
+
default: nt(() => [
|
|
11225
11287
|
L(p, {
|
|
11226
11288
|
density: "comfortable",
|
|
11227
11289
|
icon: "mdi-close",
|
|
11228
11290
|
variant: "text",
|
|
11229
11291
|
onClick: d[0] || (d[0] = (P) => l.value = !1)
|
|
11230
11292
|
}),
|
|
11231
|
-
w("span", Lc,
|
|
11232
|
-
L(
|
|
11293
|
+
w("span", Lc, $t(R(e)("x-block-lib.dlg.source.title")), 1),
|
|
11294
|
+
L(E)
|
|
11233
11295
|
]),
|
|
11234
11296
|
_: 1
|
|
11235
11297
|
}, 8, ["color"]),
|