x-block-lib 0.8.28 → 0.8.30
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 +493 -474
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -7,41 +7,41 @@
|
|
|
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
|
|
10
|
+
import { E as I, r as Tn, M as Rn, s as vo, a as Co, X as Dn, u as C, B as g, j as s, O as r, F as O, b as $e, i as v, c as Tt, d as ko, e as M, f as T, g as No, h as H, k as ht, p as Yt, l as ot, m as En, n as B, C as Mn, N as it, o as Lo, P as Ge, q as Ue, V as Nt, t as Un, W as So, v as Bo, w as bo, S as Po, x as Ro, y as Do, z as Wt, T as Ae, A as Vn, D as Mo, G as Uo, H as xn, I as Vo, J as xo, K as Yo, L as Fo, Q as wo, R as Ko, U as Ho, Y as $o } from "./vendor.txua272r.js";
|
|
11
11
|
import { globalState as E } from "x-state-lib";
|
|
12
|
-
import { globalObjects as
|
|
13
|
-
import { pkgs as ie, parsePixelStr as
|
|
14
|
-
import { provide as qo, inject as Qo, defineComponent as ct, resolveComponent as D, createBlock as st, openBlock as S, unref as R, withCtx as at, createVNode as L, mergeProps as
|
|
12
|
+
import { globalObjects as vt, openConfirmDlg as Go, openPromptDlg as Wo, messageWarning as Yn, useColor as jt, useSystem as Fn, useViewStack as en, eventBus as kt } from "x-essential-lib";
|
|
13
|
+
import { pkgs as ie, parsePixelStr as jo, parsePercentStr as Xo, getPropertyTag as Mt, unwrapEventId as Ie, elements as tt, makeEventId as z, toEventName as Oe, unwrapMethodId as nn, makeMethodId as ee, toMethodName as on, unwrapPropertyId as Jo, makePropertyId as Zt, toPropertyName as wn, isLocaleOfMethodKind as Kn, makeTriggerId as Ot } from "x-runtime-lib";
|
|
14
|
+
import { provide as qo, inject as Qo, defineComponent as ct, resolveComponent as D, createBlock as st, openBlock as S, unref as R, withCtx as at, createVNode as L, mergeProps as sn, useModel as Kt, ref as Lt, computed as F, resolveDirective as zo, withDirectives as Zo, createElementBlock as Z, normalizeStyle as W, createElementVNode as w, createCommentVNode as rt, toDisplayString as Ht, withModifiers as Ft, mergeModels as We, Fragment as Hn, renderList as ti, useId as je, onUnmounted as ei, useTemplateRef as wt, withKeys as $n, isRef as ne, onMounted as gn, nextTick as ni, onBeforeUnmount as An, 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 || {});
|
|
18
|
-
class
|
|
18
|
+
class Gn extends I.Abstract {
|
|
19
19
|
isBlank = !0;
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
Tn.register(
|
|
22
|
+
Tn.Type.EVENT,
|
|
23
23
|
"state_change",
|
|
24
|
-
|
|
24
|
+
Gn
|
|
25
25
|
);
|
|
26
|
-
const
|
|
26
|
+
const Wn = (t, e, n) => {
|
|
27
27
|
const o = t[e];
|
|
28
28
|
return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((i, a) => {
|
|
29
29
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(a.bind(null, /* @__PURE__ */ new Error("Unknown variable dynamic import: " + e + (e.split("/").length !== n ? ". Note that variables only represent file names one level deep." : ""))));
|
|
30
30
|
});
|
|
31
31
|
};
|
|
32
|
-
async function
|
|
33
|
-
const e = await
|
|
34
|
-
|
|
32
|
+
async function In(t) {
|
|
33
|
+
const e = await Wn(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.n1dap9o0.js"), "./msg/zhHans.ts": () => import("./msg-zhHans.m1pmgr3r.js") }), `./msg/${t}.ts`, 3);
|
|
34
|
+
vo(e.default);
|
|
35
35
|
}
|
|
36
36
|
function f(t) {
|
|
37
|
-
return
|
|
37
|
+
return Rn[t] ?? t;
|
|
38
38
|
}
|
|
39
|
-
const
|
|
39
|
+
const St = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", se = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
|
|
40
40
|
function ye(t) {
|
|
41
41
|
const e = t.lastIndexOf("V");
|
|
42
42
|
if (e <= 0 || e >= t.length - 1)
|
|
43
43
|
return console.assert(!1, `invalid key=${t}`), "";
|
|
44
|
-
const n =
|
|
44
|
+
const n = Co(t.substring(0, e - 1)), o = "v" + t.substring(e + 1);
|
|
45
45
|
return `${n}_${o}`;
|
|
46
46
|
}
|
|
47
47
|
function ae(t) {
|
|
@@ -60,13 +60,13 @@ function si(t) {
|
|
|
60
60
|
e++, t = t.getParent();
|
|
61
61
|
return e;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function jn(t) {
|
|
64
64
|
return t.ui === "strInput" ? "string" : t.ui === "numInput" ? "number" : t.ui === "switch" ? "boolean" : "string";
|
|
65
65
|
}
|
|
66
66
|
function ve(t, e) {
|
|
67
67
|
return !!(t.startsWith("basic.") || !e.ui || e.readonly);
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function K(t) {
|
|
70
70
|
return t.startsWith("globality_v");
|
|
71
71
|
}
|
|
72
72
|
function q(t) {
|
|
@@ -79,7 +79,7 @@ function Ve(t) {
|
|
|
79
79
|
const e = `<block type="text_v1"><field name="TEXT">${t}</field></block>`;
|
|
80
80
|
return C.xml.textToDom(e);
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function On(t) {
|
|
83
83
|
const e = `<block type="math_number_v1"><field name="NUM">${t}</field></block>`;
|
|
84
84
|
return C.xml.textToDom(e);
|
|
85
85
|
}
|
|
@@ -88,24 +88,24 @@ function ai(t) {
|
|
|
88
88
|
}
|
|
89
89
|
function Xe(t, e) {
|
|
90
90
|
let n = null;
|
|
91
|
-
return e === "string" ? n = Ve("") : e === "integer" || e === "decimal" ? n =
|
|
91
|
+
return e === "string" ? n = Ve("") : e === "integer" || e === "decimal" ? n = On(0) : e === "boolean" ? n = ai() : e === "enum" || e === "dateTime" ? n = Ve("") : console.assert(!1), n ? Dn.domToBlock(n, t) : null;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function Et(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) {
|
|
97
97
|
return t.ui === "dummy" ? null : t.ui === "strInput" ? "String" : t.ui === "numInput" ? "Number" : t.ui === "switch" ? "Boolean" : t.ui === "select" ? ae(t.items) : t.ui === "multiTypes" ? ae(t.types) : t.ui === "compSelect" ? "Comp" : t.ui === "colorPicker" ? "Color" : (console.assert(!1), null);
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function Xn(t) {
|
|
100
100
|
return t === "string" ? "String" : t === "integer" || t === "decimal" ? "Number" : t === "boolean" ? "Boolean" : t === "enum" || t === "dateTime" ? "String" : (console.assert(!1), null);
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function an(t, e, n, o) {
|
|
103
103
|
const i = `
|
|
104
104
|
<block type="parameter_v1">
|
|
105
105
|
<mutation key="${e}" name="${n}" locale="${o ? "TRUE" : "FALSE"}"/>
|
|
106
106
|
</block>
|
|
107
107
|
`, a = C.xml.textToDom(i);
|
|
108
|
-
return
|
|
108
|
+
return Dn.domToBlock(a, t);
|
|
109
109
|
}
|
|
110
110
|
function Y(t, e) {
|
|
111
111
|
try {
|
|
@@ -120,7 +120,7 @@ function Y(t, e) {
|
|
|
120
120
|
return;
|
|
121
121
|
l.dispose();
|
|
122
122
|
}
|
|
123
|
-
l =
|
|
123
|
+
l = an(
|
|
124
124
|
t.workspace,
|
|
125
125
|
i,
|
|
126
126
|
a,
|
|
@@ -164,7 +164,7 @@ function pi(t) {
|
|
|
164
164
|
function di() {
|
|
165
165
|
return C.xml.textToDom('<shadow type="select_comp_v1"></shadow>');
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function gt(t) {
|
|
168
168
|
let e = null;
|
|
169
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
|
}
|
|
@@ -179,7 +179,7 @@ function fi() {
|
|
|
179
179
|
n.push({ key: o, name: i, type: a });
|
|
180
180
|
return n;
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function yn(t) {
|
|
183
183
|
const { activeObject: e, activePage: n } = E.app;
|
|
184
184
|
if (e.type === "page") {
|
|
185
185
|
const o = n.meta.arguments.find((i) => i.id === t);
|
|
@@ -232,7 +232,7 @@ const Ti = {
|
|
|
232
232
|
}
|
|
233
233
|
},
|
|
234
234
|
onArgumentChange_: function(t) {
|
|
235
|
-
const e =
|
|
235
|
+
const e = yn(t);
|
|
236
236
|
if (!e) {
|
|
237
237
|
console.assert(!1);
|
|
238
238
|
return;
|
|
@@ -240,10 +240,10 @@ 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, Et(this.argument.type));
|
|
244
244
|
},
|
|
245
245
|
checkWarning_: function() {
|
|
246
|
-
const t =
|
|
246
|
+
const t = yn(this.argument.key);
|
|
247
247
|
if (!t) {
|
|
248
248
|
this.setWarningText(f("WARN_ARGUMENT_NOT_FOUND"));
|
|
249
249
|
return;
|
|
@@ -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 } = vt, 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);
|
|
@@ -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 } = vt, 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);
|
|
@@ -338,8 +338,8 @@ const gi = (t, e) => {
|
|
|
338
338
|
i.removeField("VALUE", !0), i.removeField("SUFFIX", !0);
|
|
339
339
|
let u, l;
|
|
340
340
|
if (c.ui === "pixelInput") {
|
|
341
|
-
const _ =
|
|
342
|
-
u = new
|
|
341
|
+
const _ = jo(this.value) ?? 0;
|
|
342
|
+
u = new $e(
|
|
343
343
|
_,
|
|
344
344
|
c.min,
|
|
345
345
|
c.max,
|
|
@@ -349,8 +349,8 @@ const gi = (t, e) => {
|
|
|
349
349
|
}
|
|
350
350
|
), l = "px";
|
|
351
351
|
} else if (c.ui === "percentInput") {
|
|
352
|
-
const _ =
|
|
353
|
-
u = new
|
|
352
|
+
const _ = Xo(this.value) ?? 0;
|
|
353
|
+
u = new $e(
|
|
354
354
|
_,
|
|
355
355
|
c.min,
|
|
356
356
|
c.max,
|
|
@@ -397,11 +397,11 @@ g.app_bind_item_v1 = Oi;
|
|
|
397
397
|
const yi = {
|
|
398
398
|
init: function() {
|
|
399
399
|
this.itemCount_ = 0, this.setMutator(
|
|
400
|
-
new
|
|
400
|
+
new Tt.MutatorIcon(
|
|
401
401
|
["app_bind_item_v1"],
|
|
402
402
|
this
|
|
403
403
|
)
|
|
404
|
-
), this.debounce_ =
|
|
404
|
+
), this.debounce_ = ko(() => {
|
|
405
405
|
this.checkWarning_();
|
|
406
406
|
}, 250), this.setStyle("event_blocks"), this.setTooltip("%{BKY_APP_V1_APP_BIND_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_APP_BIND_HELPURL}"), this.updateShape_();
|
|
407
407
|
},
|
|
@@ -516,15 +516,15 @@ g.app_bind_v1 = yi;
|
|
|
516
516
|
s.forBlock.app_bind_v1 = function() {
|
|
517
517
|
return "";
|
|
518
518
|
};
|
|
519
|
-
function
|
|
519
|
+
function Jn() {
|
|
520
520
|
return E.app.appList;
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function vn(t) {
|
|
523
523
|
return E.app.appList.find((e) => e.id === t);
|
|
524
524
|
}
|
|
525
525
|
function vi() {
|
|
526
526
|
const t = [];
|
|
527
|
-
return
|
|
527
|
+
return Jn().forEach(({ id: n, name: o }) => {
|
|
528
528
|
t.push([o, n]);
|
|
529
529
|
}), k(t);
|
|
530
530
|
}
|
|
@@ -543,33 +543,33 @@ function Ci(t) {
|
|
|
543
543
|
e.push([i, o]);
|
|
544
544
|
}), k(e);
|
|
545
545
|
}
|
|
546
|
-
const
|
|
546
|
+
const qn = {
|
|
547
547
|
id: "",
|
|
548
548
|
groupId: "",
|
|
549
549
|
name: "",
|
|
550
550
|
position: 0
|
|
551
551
|
};
|
|
552
|
-
function
|
|
552
|
+
function Qn() {
|
|
553
553
|
const { comps: t } = E.app.activeApp;
|
|
554
|
-
return [
|
|
554
|
+
return [qn, ...t];
|
|
555
555
|
}
|
|
556
|
-
function
|
|
557
|
-
return t === "" ?
|
|
556
|
+
function Cn(t) {
|
|
557
|
+
return t === "" ? qn : E.app.activeApp.comps.find((e) => e.id === t);
|
|
558
558
|
}
|
|
559
559
|
function ki() {
|
|
560
|
-
const { i18n: t } =
|
|
561
|
-
return
|
|
560
|
+
const { i18n: t } = vt, e = [];
|
|
561
|
+
return Qn().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 dt(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 X(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 }
|
|
@@ -582,12 +582,12 @@ function qe(t) {
|
|
|
582
582
|
const l = n.nodes.find((d) => d.id === t);
|
|
583
583
|
if (!l)
|
|
584
584
|
return c;
|
|
585
|
-
const _ =
|
|
585
|
+
const _ = tt[l.key];
|
|
586
586
|
if (!_)
|
|
587
587
|
return console.assert(!1, "invalid element", l.key), c;
|
|
588
588
|
for (const { key: d, name: h, params: p } of _.events)
|
|
589
589
|
c.push({
|
|
590
|
-
id:
|
|
590
|
+
id: z("elementEvent", t, d),
|
|
591
591
|
kind: "elementEvent",
|
|
592
592
|
names: [h],
|
|
593
593
|
params: p
|
|
@@ -597,10 +597,10 @@ function qe(t) {
|
|
|
597
597
|
if (d)
|
|
598
598
|
for (const { id: h, name: p, params: m } of d.meta.events)
|
|
599
599
|
c.push({
|
|
600
|
-
id:
|
|
600
|
+
id: z("referenceEvent", t, h),
|
|
601
601
|
kind: "referenceEvent",
|
|
602
602
|
names: [p],
|
|
603
|
-
params:
|
|
603
|
+
params: dt(m)
|
|
604
604
|
});
|
|
605
605
|
}
|
|
606
606
|
if (Q(_.key) && l.reference && l.reference.comp) {
|
|
@@ -608,29 +608,37 @@ function qe(t) {
|
|
|
608
608
|
if (d)
|
|
609
609
|
for (const { id: h, name: p, params: m } of d.meta.events)
|
|
610
610
|
c.push({
|
|
611
|
-
id:
|
|
611
|
+
id: z("multipleRefEvent", t, h),
|
|
612
612
|
kind: "multipleRefEvent",
|
|
613
613
|
names: [p],
|
|
614
|
-
params:
|
|
614
|
+
params: dt(m)
|
|
615
615
|
});
|
|
616
616
|
}
|
|
617
|
+
if (K(_.key) && n.type === "comp")
|
|
618
|
+
for (const { id: d, name: h, params: p } of i.meta.events)
|
|
619
|
+
c.push({
|
|
620
|
+
id: z("customEvent", t, d),
|
|
621
|
+
kind: "customEvent",
|
|
622
|
+
names: [h],
|
|
623
|
+
params: dt(p)
|
|
624
|
+
});
|
|
617
625
|
if (e[_.key] && e[_.key][u])
|
|
618
626
|
for (const { keys: d, names: h, raw: p } of e[_.key][u])
|
|
619
627
|
ve(d, p) || c.push({
|
|
620
|
-
id:
|
|
628
|
+
id: z("elementPropertyChangeEvent", t, d),
|
|
621
629
|
kind: "elementPropertyChangeEvent",
|
|
622
630
|
names: h,
|
|
623
|
-
params:
|
|
631
|
+
params: X(jn(p))
|
|
624
632
|
});
|
|
625
633
|
if (q(_.key) && l.reference && l.reference.comp) {
|
|
626
634
|
const d = a[l.reference.comp];
|
|
627
635
|
if (d)
|
|
628
636
|
for (const { id: h, name: p, type: m } of d.meta.properties)
|
|
629
637
|
c.push({
|
|
630
|
-
id:
|
|
638
|
+
id: z("referencePropertyChangeEvent", t, h),
|
|
631
639
|
kind: "referencePropertyChangeEvent",
|
|
632
640
|
names: [p],
|
|
633
|
-
params:
|
|
641
|
+
params: X(m)
|
|
634
642
|
});
|
|
635
643
|
}
|
|
636
644
|
if (Q(_.key) && l.reference && l.reference.comp) {
|
|
@@ -638,36 +646,36 @@ function qe(t) {
|
|
|
638
646
|
if (d)
|
|
639
647
|
for (const { id: h, name: p, type: m } of d.meta.properties)
|
|
640
648
|
c.push({
|
|
641
|
-
id:
|
|
649
|
+
id: z("multipleRefPropertyChangeEvent", t, h),
|
|
642
650
|
kind: "multipleRefPropertyChangeEvent",
|
|
643
651
|
names: [p],
|
|
644
|
-
params:
|
|
652
|
+
params: X(m)
|
|
645
653
|
});
|
|
646
654
|
}
|
|
647
|
-
if (
|
|
655
|
+
if (K(_.key) && n.type === "comp")
|
|
648
656
|
for (const { id: d, name: h, type: p } of i.meta.properties)
|
|
649
657
|
c.push({
|
|
650
|
-
id:
|
|
658
|
+
id: z("customPropertyChangeEvent", t, d),
|
|
651
659
|
kind: "customPropertyChangeEvent",
|
|
652
660
|
names: [h],
|
|
653
|
-
params:
|
|
661
|
+
params: X(p)
|
|
654
662
|
});
|
|
655
|
-
if (
|
|
663
|
+
if (K(_.key)) {
|
|
656
664
|
if (n.type === "page")
|
|
657
665
|
for (const { id: d, name: h, type: p } of o.meta.states)
|
|
658
666
|
c.push({
|
|
659
|
-
id:
|
|
667
|
+
id: z("stateChangeEvent", "globality", d),
|
|
660
668
|
kind: "stateChangeEvent",
|
|
661
669
|
names: [h],
|
|
662
|
-
params:
|
|
670
|
+
params: X(p)
|
|
663
671
|
});
|
|
664
672
|
else if (n.type === "comp")
|
|
665
673
|
for (const { id: d, name: h, type: p } of i.meta.states)
|
|
666
674
|
c.push({
|
|
667
|
-
id:
|
|
675
|
+
id: z("stateChangeEvent", "globality", d),
|
|
668
676
|
kind: "stateChangeEvent",
|
|
669
677
|
names: [h],
|
|
670
|
-
params:
|
|
678
|
+
params: X(p)
|
|
671
679
|
});
|
|
672
680
|
}
|
|
673
681
|
return c;
|
|
@@ -679,7 +687,7 @@ function Ye(t) {
|
|
|
679
687
|
const { kind: u, nodeId: l, eventKey: _ } = Ie(t), d = n.nodes.find((p) => p.id === l);
|
|
680
688
|
if (!d)
|
|
681
689
|
return;
|
|
682
|
-
const h =
|
|
690
|
+
const h = tt[d.key];
|
|
683
691
|
if (!h) {
|
|
684
692
|
console.assert(!1, "invalid element", d.key);
|
|
685
693
|
return;
|
|
@@ -703,7 +711,7 @@ function Ye(t) {
|
|
|
703
711
|
id: t,
|
|
704
712
|
kind: u,
|
|
705
713
|
names: [m.name],
|
|
706
|
-
params:
|
|
714
|
+
params: dt(m.params)
|
|
707
715
|
};
|
|
708
716
|
}
|
|
709
717
|
}
|
|
@@ -717,10 +725,21 @@ function Ye(t) {
|
|
|
717
725
|
id: t,
|
|
718
726
|
kind: u,
|
|
719
727
|
names: [m.name],
|
|
720
|
-
params:
|
|
728
|
+
params: dt(m.params)
|
|
721
729
|
};
|
|
722
730
|
}
|
|
723
731
|
}
|
|
732
|
+
} else if (u === "customEvent") {
|
|
733
|
+
if (K(h.key) && n.type === "comp") {
|
|
734
|
+
const p = i.meta.events.find((m) => m.id === _);
|
|
735
|
+
if (p)
|
|
736
|
+
return {
|
|
737
|
+
id: t,
|
|
738
|
+
kind: u,
|
|
739
|
+
names: [p.name],
|
|
740
|
+
params: dt(p.params)
|
|
741
|
+
};
|
|
742
|
+
}
|
|
724
743
|
} else if (u === "elementPropertyChangeEvent") {
|
|
725
744
|
if (e[h.key] && e[h.key][c]) {
|
|
726
745
|
const p = e[h.key][c].find(
|
|
@@ -731,7 +750,7 @@ function Ye(t) {
|
|
|
731
750
|
id: t,
|
|
732
751
|
kind: u,
|
|
733
752
|
names: p.names,
|
|
734
|
-
params:
|
|
753
|
+
params: X(jn(p.raw))
|
|
735
754
|
};
|
|
736
755
|
}
|
|
737
756
|
} else if (u === "referencePropertyChangeEvent") {
|
|
@@ -746,7 +765,7 @@ function Ye(t) {
|
|
|
746
765
|
id: t,
|
|
747
766
|
kind: u,
|
|
748
767
|
names: [m.name],
|
|
749
|
-
params:
|
|
768
|
+
params: X(m.type)
|
|
750
769
|
};
|
|
751
770
|
}
|
|
752
771
|
}
|
|
@@ -762,12 +781,12 @@ function Ye(t) {
|
|
|
762
781
|
id: t,
|
|
763
782
|
kind: u,
|
|
764
783
|
names: [m.name],
|
|
765
|
-
params:
|
|
784
|
+
params: X(m.type)
|
|
766
785
|
};
|
|
767
786
|
}
|
|
768
787
|
}
|
|
769
788
|
} else if (u === "customPropertyChangeEvent") {
|
|
770
|
-
if (
|
|
789
|
+
if (K(h.key) && n.type === "comp") {
|
|
771
790
|
const p = i.meta.properties.find(
|
|
772
791
|
(m) => m.id === _
|
|
773
792
|
);
|
|
@@ -776,10 +795,10 @@ function Ye(t) {
|
|
|
776
795
|
id: t,
|
|
777
796
|
kind: u,
|
|
778
797
|
names: [p.name],
|
|
779
|
-
params:
|
|
798
|
+
params: X(p.type)
|
|
780
799
|
};
|
|
781
800
|
}
|
|
782
|
-
} else if (u === "stateChangeEvent" &&
|
|
801
|
+
} else if (u === "stateChangeEvent" && K(h.key)) {
|
|
783
802
|
if (n.type === "page") {
|
|
784
803
|
const p = o.meta.states.find(
|
|
785
804
|
(m) => m.id === _
|
|
@@ -789,7 +808,7 @@ function Ye(t) {
|
|
|
789
808
|
id: t,
|
|
790
809
|
kind: u,
|
|
791
810
|
names: [p.name],
|
|
792
|
-
params:
|
|
811
|
+
params: X(p.type)
|
|
793
812
|
};
|
|
794
813
|
} else if (n.type === "comp") {
|
|
795
814
|
const p = i.meta.states.find(
|
|
@@ -800,7 +819,7 @@ function Ye(t) {
|
|
|
800
819
|
id: t,
|
|
801
820
|
kind: u,
|
|
802
821
|
names: [p.name],
|
|
803
|
-
params:
|
|
822
|
+
params: X(p.type)
|
|
804
823
|
};
|
|
805
824
|
}
|
|
806
825
|
}
|
|
@@ -811,19 +830,19 @@ function Ni(t) {
|
|
|
811
830
|
e.push([Oe(i, a), o]);
|
|
812
831
|
return k(e);
|
|
813
832
|
}
|
|
814
|
-
function
|
|
833
|
+
function zn() {
|
|
815
834
|
const { activeObject: t, activeComp: e } = E.app, n = [];
|
|
816
835
|
if (t.type === "comp")
|
|
817
836
|
for (const { id: o, name: i, params: a } of e.meta.events)
|
|
818
837
|
n.push({
|
|
819
|
-
id:
|
|
838
|
+
id: z("customEvent", "globality", o),
|
|
820
839
|
kind: "customEvent",
|
|
821
840
|
names: [i],
|
|
822
|
-
params:
|
|
841
|
+
params: dt(a)
|
|
823
842
|
});
|
|
824
843
|
return n;
|
|
825
844
|
}
|
|
826
|
-
function
|
|
845
|
+
function kn(t) {
|
|
827
846
|
const { activeObject: e, activeComp: n } = E.app, { kind: o, nodeId: i, eventKey: a } = Ie(t);
|
|
828
847
|
if (o === "customEvent" && i === "globality" && e.type === "comp") {
|
|
829
848
|
const c = n.meta.events.find(
|
|
@@ -834,12 +853,12 @@ function Nn(t) {
|
|
|
834
853
|
id: t,
|
|
835
854
|
kind: o,
|
|
836
855
|
names: [c.name],
|
|
837
|
-
params:
|
|
856
|
+
params: dt(c.params)
|
|
838
857
|
};
|
|
839
858
|
}
|
|
840
859
|
}
|
|
841
860
|
function Li() {
|
|
842
|
-
const t = [], e =
|
|
861
|
+
const t = [], e = zn();
|
|
843
862
|
for (const { id: n, kind: o, names: i } of e)
|
|
844
863
|
t.push([Oe(o, i), n]);
|
|
845
864
|
return k(t);
|
|
@@ -860,7 +879,7 @@ function Qe(t) {
|
|
|
860
879
|
const { activeObject: e, depends: n } = E.app, o = [], i = e.nodes.find((c) => c.id === t);
|
|
861
880
|
if (!i)
|
|
862
881
|
return o;
|
|
863
|
-
const a =
|
|
882
|
+
const a = tt[i.key];
|
|
864
883
|
if (!a)
|
|
865
884
|
return console.assert(!1, "inavlid element", i.key), o;
|
|
866
885
|
for (const { key: c, name: u, inputs: l, outputs: _ } of a.methods)
|
|
@@ -895,13 +914,13 @@ function Qe(t) {
|
|
|
895
914
|
outputs: Rt(d)
|
|
896
915
|
});
|
|
897
916
|
}
|
|
898
|
-
return
|
|
917
|
+
return K(a.key) && e.type, o;
|
|
899
918
|
}
|
|
900
919
|
function Fe(t) {
|
|
901
920
|
const { activeObject: e, depends: n } = E.app, { kind: o, nodeId: i, methodKey: a } = nn(t), c = e.nodes.find((l) => l.id === i);
|
|
902
921
|
if (!c)
|
|
903
922
|
return;
|
|
904
|
-
const u =
|
|
923
|
+
const u = tt[c.key];
|
|
905
924
|
if (!u) {
|
|
906
925
|
console.assert(!1, "invalid element", c.key);
|
|
907
926
|
return;
|
|
@@ -956,7 +975,7 @@ function Si(t) {
|
|
|
956
975
|
e.push([on(i, a), o]);
|
|
957
976
|
return k(e);
|
|
958
977
|
}
|
|
959
|
-
function
|
|
978
|
+
function cn() {
|
|
960
979
|
const { activeObject: t, activeComp: e } = E.app, n = [];
|
|
961
980
|
if (t.type === "comp")
|
|
962
981
|
for (const { id: o, name: i, inputs: a, outputs: c } of e.meta.methods)
|
|
@@ -985,8 +1004,8 @@ function Dt(t) {
|
|
|
985
1004
|
};
|
|
986
1005
|
}
|
|
987
1006
|
}
|
|
988
|
-
function
|
|
989
|
-
const t = [], e =
|
|
1007
|
+
function Zn() {
|
|
1008
|
+
const t = [], e = cn();
|
|
990
1009
|
for (const { id: n, kind: o, names: i } of e)
|
|
991
1010
|
t.push([on(o, i), n]);
|
|
992
1011
|
return k(t);
|
|
@@ -1025,9 +1044,9 @@ function bi(t, e, n) {
|
|
|
1025
1044
|
if (!ve(l, _))
|
|
1026
1045
|
return !1;
|
|
1027
1046
|
}
|
|
1028
|
-
if (
|
|
1047
|
+
if (K(t.key) && i.type === "comp" && c.meta.properties.length > 0)
|
|
1029
1048
|
return !1;
|
|
1030
|
-
if (
|
|
1049
|
+
if (K(t.key)) {
|
|
1031
1050
|
if (i.type === "page") {
|
|
1032
1051
|
if (a.meta.states.length > 0)
|
|
1033
1052
|
return !1;
|
|
@@ -1050,7 +1069,7 @@ function Pi(t, e) {
|
|
|
1050
1069
|
if (i && i.meta.methods.length > 0)
|
|
1051
1070
|
return !1;
|
|
1052
1071
|
}
|
|
1053
|
-
return
|
|
1072
|
+
return K(t.key) && n.type, !0;
|
|
1054
1073
|
}
|
|
1055
1074
|
function Ri(t, e, n) {
|
|
1056
1075
|
const { properties: o } = E.runtime, { activeObject: i, activeComp: a, depends: c } = E.app;
|
|
@@ -1066,7 +1085,7 @@ function Ri(t, e, n) {
|
|
|
1066
1085
|
if (u && u.meta.properties.length > 0)
|
|
1067
1086
|
return !1;
|
|
1068
1087
|
}
|
|
1069
|
-
return !(
|
|
1088
|
+
return !(K(t.key) && i.type === "comp" && a.meta.properties.length > 0);
|
|
1070
1089
|
}
|
|
1071
1090
|
function Di(t, e, n) {
|
|
1072
1091
|
const { properties: o } = E.runtime, { activeObject: i, activeComp: a, depends: c } = E.app;
|
|
@@ -1085,22 +1104,22 @@ function Di(t, e, n) {
|
|
|
1085
1104
|
if (u && u.meta.properties.length > 0)
|
|
1086
1105
|
return !1;
|
|
1087
1106
|
}
|
|
1088
|
-
return !(
|
|
1107
|
+
return !(K(t.key) && i.type === "comp" && a.meta.properties.length > 0);
|
|
1089
1108
|
}
|
|
1090
|
-
function
|
|
1109
|
+
function to(t, e, n, o) {
|
|
1091
1110
|
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;
|
|
1092
1111
|
}
|
|
1093
|
-
function
|
|
1112
|
+
function j(t) {
|
|
1094
1113
|
const { activeObject: e } = E.app, n = Mt(e.type, e.subtype);
|
|
1095
1114
|
if (!n)
|
|
1096
1115
|
return !1;
|
|
1097
1116
|
for (const o of e.nodes) {
|
|
1098
|
-
const i =
|
|
1117
|
+
const i = tt[o.key];
|
|
1099
1118
|
if (!i) {
|
|
1100
1119
|
console.assert(!1, "invalid element", o.key);
|
|
1101
1120
|
continue;
|
|
1102
1121
|
}
|
|
1103
|
-
if (!
|
|
1122
|
+
if (!to(t, i, n, o.reference?.comp))
|
|
1104
1123
|
return !0;
|
|
1105
1124
|
}
|
|
1106
1125
|
return !1;
|
|
@@ -1110,12 +1129,12 @@ function Jt(t) {
|
|
|
1110
1129
|
if (!o)
|
|
1111
1130
|
return n;
|
|
1112
1131
|
for (const i of e.nodes) {
|
|
1113
|
-
const a =
|
|
1132
|
+
const a = tt[i.key];
|
|
1114
1133
|
if (!a) {
|
|
1115
1134
|
console.assert(!1, "invalid element", i.key);
|
|
1116
1135
|
continue;
|
|
1117
1136
|
}
|
|
1118
|
-
|
|
1137
|
+
to(t, a, o, i.reference?.comp) || n.push({
|
|
1119
1138
|
id: i.id,
|
|
1120
1139
|
key: i.key,
|
|
1121
1140
|
name: a.name,
|
|
@@ -1124,11 +1143,11 @@ function Jt(t) {
|
|
|
1124
1143
|
}
|
|
1125
1144
|
return n;
|
|
1126
1145
|
}
|
|
1127
|
-
function
|
|
1146
|
+
function ft(t) {
|
|
1128
1147
|
const { activeObject: e } = E.app, n = e.nodes.find((i) => i.id === t);
|
|
1129
1148
|
if (!n)
|
|
1130
1149
|
return;
|
|
1131
|
-
const o =
|
|
1150
|
+
const o = tt[n.key];
|
|
1132
1151
|
if (!o) {
|
|
1133
1152
|
console.assert(!1, "invalid element", n.key);
|
|
1134
1153
|
return;
|
|
@@ -1141,21 +1160,21 @@ function ht(t) {
|
|
|
1141
1160
|
};
|
|
1142
1161
|
}
|
|
1143
1162
|
function Ce(t) {
|
|
1144
|
-
const { i18n: e } =
|
|
1163
|
+
const { i18n: e } = vt, n = [], o = Jt(t);
|
|
1145
1164
|
for (const { id: i, name: a, alias: c } of o) {
|
|
1146
1165
|
let u = e.global.t(a);
|
|
1147
1166
|
c && (u += " / " + c), n.push([u, i]);
|
|
1148
1167
|
}
|
|
1149
1168
|
return k(n);
|
|
1150
1169
|
}
|
|
1151
|
-
function
|
|
1170
|
+
function $t(t, e) {
|
|
1152
1171
|
const { properties: n } = E.runtime, { activeObject: o, activeComp: i, depends: a } = E.app, c = [], u = Mt(o.type, o.subtype);
|
|
1153
1172
|
if (!u)
|
|
1154
1173
|
return c;
|
|
1155
1174
|
const l = o.nodes.find((d) => d.id === t);
|
|
1156
1175
|
if (!l)
|
|
1157
1176
|
return c;
|
|
1158
|
-
const _ =
|
|
1177
|
+
const _ = tt[l.key];
|
|
1159
1178
|
if (!_)
|
|
1160
1179
|
return console.assert(!1, "invalid element", l.key), c;
|
|
1161
1180
|
if (n[_.key] && n[_.key][u])
|
|
@@ -1195,7 +1214,7 @@ function Ht(t, e) {
|
|
|
1195
1214
|
}
|
|
1196
1215
|
});
|
|
1197
1216
|
}
|
|
1198
|
-
if (
|
|
1217
|
+
if (K(_.key) && o.type === "comp")
|
|
1199
1218
|
for (const { id: d, name: h, type: p } of i.meta.properties)
|
|
1200
1219
|
c.push({
|
|
1201
1220
|
id: Zt("customProperty", t, d),
|
|
@@ -1207,14 +1226,14 @@ function Ht(t, e) {
|
|
|
1207
1226
|
});
|
|
1208
1227
|
return c;
|
|
1209
1228
|
}
|
|
1210
|
-
function
|
|
1229
|
+
function yt(t) {
|
|
1211
1230
|
const { properties: e } = E.runtime, { activeObject: n, activeComp: o, depends: i } = E.app, a = Mt(n.type, n.subtype);
|
|
1212
1231
|
if (!a)
|
|
1213
1232
|
return;
|
|
1214
|
-
const { kind: c, nodeId: u, propertyKey: l } =
|
|
1233
|
+
const { kind: c, nodeId: u, propertyKey: l } = Jo(t), _ = n.nodes.find((h) => h.id === u);
|
|
1215
1234
|
if (!_)
|
|
1216
1235
|
return;
|
|
1217
|
-
const d =
|
|
1236
|
+
const d = tt[_.key];
|
|
1218
1237
|
if (!d) {
|
|
1219
1238
|
console.assert(!1, "invalid element", _.key);
|
|
1220
1239
|
return;
|
|
@@ -1271,7 +1290,7 @@ function Ot(t) {
|
|
|
1271
1290
|
};
|
|
1272
1291
|
}
|
|
1273
1292
|
}
|
|
1274
|
-
} else if (c === "customProperty" &&
|
|
1293
|
+
} else if (c === "customProperty" && K(d.key) && n.type === "comp") {
|
|
1275
1294
|
const h = o.meta.properties.find(
|
|
1276
1295
|
(p) => p.id === l
|
|
1277
1296
|
);
|
|
@@ -1286,13 +1305,13 @@ function Ot(t) {
|
|
|
1286
1305
|
};
|
|
1287
1306
|
}
|
|
1288
1307
|
}
|
|
1289
|
-
function
|
|
1290
|
-
const n = [], o =
|
|
1308
|
+
function eo(t, e) {
|
|
1309
|
+
const n = [], o = $t(t, e);
|
|
1291
1310
|
for (const { id: i, kind: a, names: c } of o)
|
|
1292
|
-
n.push([
|
|
1311
|
+
n.push([wn(a, c), i]);
|
|
1293
1312
|
return k(n);
|
|
1294
1313
|
}
|
|
1295
|
-
function
|
|
1314
|
+
function rn() {
|
|
1296
1315
|
const { activeObject: t, activePage: e, activeComp: n } = E.app;
|
|
1297
1316
|
return t.type === "page" ? e.meta.states : t.type === "comp" ? n.meta.states : [];
|
|
1298
1317
|
}
|
|
@@ -1303,8 +1322,8 @@ function ue(t) {
|
|
|
1303
1322
|
if (e.type === "comp")
|
|
1304
1323
|
return o.meta.states.find((i) => i.id === t);
|
|
1305
1324
|
}
|
|
1306
|
-
function
|
|
1307
|
-
const t = [], e =
|
|
1325
|
+
function no() {
|
|
1326
|
+
const t = [], e = rn();
|
|
1308
1327
|
for (const { id: n, name: o } of e)
|
|
1309
1328
|
t.push([o, n]);
|
|
1310
1329
|
return k(t);
|
|
@@ -1369,7 +1388,7 @@ const Mi = {
|
|
|
1369
1388
|
}
|
|
1370
1389
|
},
|
|
1371
1390
|
onNodeChange_: function(t) {
|
|
1372
|
-
const e =
|
|
1391
|
+
const e = ft(t);
|
|
1373
1392
|
if (!e) {
|
|
1374
1393
|
console.assert(!1);
|
|
1375
1394
|
return;
|
|
@@ -1415,7 +1434,7 @@ const Mi = {
|
|
|
1415
1434
|
}), t.length > 0 && Y(this, t);
|
|
1416
1435
|
},
|
|
1417
1436
|
checkWarning_: function() {
|
|
1418
|
-
const t =
|
|
1437
|
+
const t = ft(this.node.id);
|
|
1419
1438
|
if (!t) {
|
|
1420
1439
|
this.setWarningText(f("WARN_NODE_NOT_FOUND"));
|
|
1421
1440
|
return;
|
|
@@ -1468,7 +1487,7 @@ const Ui = {
|
|
|
1468
1487
|
initData_: function() {
|
|
1469
1488
|
if (this.event.id)
|
|
1470
1489
|
return;
|
|
1471
|
-
const t =
|
|
1490
|
+
const t = zn()?.[0];
|
|
1472
1491
|
if (!t)
|
|
1473
1492
|
return;
|
|
1474
1493
|
this.event.id = t.id, this.event.kind = t.kind, this.event.names = t.names, this.event.params = t.params;
|
|
@@ -1499,7 +1518,7 @@ const Ui = {
|
|
|
1499
1518
|
}
|
|
1500
1519
|
},
|
|
1501
1520
|
onEventChange_: function(t) {
|
|
1502
|
-
const e =
|
|
1521
|
+
const e = kn(t);
|
|
1503
1522
|
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 = []);
|
|
1504
1523
|
},
|
|
1505
1524
|
updateShape_: function() {
|
|
@@ -1514,19 +1533,19 @@ const Ui = {
|
|
|
1514
1533
|
e.connection.setShadowDom(null);
|
|
1515
1534
|
const n = e.connection.targetBlock();
|
|
1516
1535
|
n && !n.isShadow() && n.dispose();
|
|
1517
|
-
const { type: o } = this.event.params[t], i =
|
|
1536
|
+
const { type: o } = this.event.params[t], i = Et(o);
|
|
1518
1537
|
e.setCheck(i);
|
|
1519
1538
|
}
|
|
1520
1539
|
},
|
|
1521
1540
|
updateShadows_: function() {
|
|
1522
1541
|
if (!this.isInsertionMarker())
|
|
1523
1542
|
for (let t = 0; t < this.event.params.length; t++) {
|
|
1524
|
-
const e = this.event.params[t], n =
|
|
1543
|
+
const e = this.event.params[t], n = gt(e.type);
|
|
1525
1544
|
this.getInput("PARAM" + t)?.connection?.setShadowDom(n);
|
|
1526
1545
|
}
|
|
1527
1546
|
},
|
|
1528
1547
|
checkWarning_: function() {
|
|
1529
|
-
const t =
|
|
1548
|
+
const t = kn(this.event.id);
|
|
1530
1549
|
if (!t) {
|
|
1531
1550
|
this.setWarningText(f("WARN_EVENT_NOT_FOUND"));
|
|
1532
1551
|
return;
|
|
@@ -1554,7 +1573,7 @@ s.forBlock.trigger_app_event_v1 = function(t) {
|
|
|
1554
1573
|
);
|
|
1555
1574
|
i += ", ", i += u;
|
|
1556
1575
|
}
|
|
1557
|
-
return `__triggerCustomEventV1__(${e(o)}
|
|
1576
|
+
return `__triggerCustomEventV1__(${e(o)}${i});
|
|
1558
1577
|
`;
|
|
1559
1578
|
};
|
|
1560
1579
|
T([
|
|
@@ -1576,7 +1595,7 @@ T([
|
|
|
1576
1595
|
}
|
|
1577
1596
|
]);
|
|
1578
1597
|
s.forBlock.watch_effect_v1 = function(t) {
|
|
1579
|
-
const e =
|
|
1598
|
+
const e = No(t.id), n = s.statementToCode(t, "HANDLE");
|
|
1580
1599
|
return `function __watchEffect$${e}__() {
|
|
1581
1600
|
${n}};
|
|
1582
1601
|
`;
|
|
@@ -1771,7 +1790,7 @@ const Yi = {
|
|
|
1771
1790
|
}
|
|
1772
1791
|
},
|
|
1773
1792
|
onNodeChange_: function(t) {
|
|
1774
|
-
const e =
|
|
1793
|
+
const e = ft(t);
|
|
1775
1794
|
if (!e) {
|
|
1776
1795
|
console.assert(!1);
|
|
1777
1796
|
return;
|
|
@@ -1807,7 +1826,7 @@ const Yi = {
|
|
|
1807
1826
|
this.removeInput("INPUT" + t);
|
|
1808
1827
|
for (let t = 0; t < this.method.inputs.length; t++) {
|
|
1809
1828
|
const e = this.method.inputs[t];
|
|
1810
|
-
this.getInput("INPUT" + t) || (this.appendValueInput("INPUT" + t).setAlign(v.Align.RIGHT).appendField(
|
|
1829
|
+
this.getInput("INPUT" + t) || (this.appendValueInput("INPUT" + t).setAlign(v.Align.RIGHT).appendField(Rn[e.name]), this.method.outputs.length > 0 && this.moveInputBefore("INPUT" + t, "OUTPUT0"));
|
|
1811
1830
|
}
|
|
1812
1831
|
if (this.method.kind === "referenceMethod")
|
|
1813
1832
|
this.getInput("REF_KEY") || this.appendValueInput("REF_KEY"), this.method.inputs.length > 0 ? this.moveInputBefore("REF_KEY", "INPUT0") : this.method.outputs.length > 0 && this.moveInputBefore("REF_KEY", "OUTPUT0");
|
|
@@ -1822,14 +1841,14 @@ const Yi = {
|
|
|
1822
1841
|
const e = this.method.inputs[t];
|
|
1823
1842
|
if (!e.type)
|
|
1824
1843
|
continue;
|
|
1825
|
-
const n =
|
|
1844
|
+
const n = gt(e.type);
|
|
1826
1845
|
this.getInput("INPUT" + t).setShadowDom(n);
|
|
1827
1846
|
}
|
|
1828
1847
|
},
|
|
1829
1848
|
ensureBlocks_: function() {
|
|
1830
1849
|
if (this.isInsertionMarker())
|
|
1831
1850
|
return;
|
|
1832
|
-
const { kind: t } = nn(this.method.id), e =
|
|
1851
|
+
const { kind: t } = nn(this.method.id), e = Kn(t), n = [];
|
|
1833
1852
|
for (let o = 0; o < this.method.outputs.length; o++) {
|
|
1834
1853
|
const { key: i, name: a } = this.method.outputs[o];
|
|
1835
1854
|
n.push(["OUTPUT" + o, `__output$${i}__`, a, e]);
|
|
@@ -1837,7 +1856,7 @@ const Yi = {
|
|
|
1837
1856
|
n.length > 0 && Y(this, n);
|
|
1838
1857
|
},
|
|
1839
1858
|
checkWarning_: function() {
|
|
1840
|
-
const t =
|
|
1859
|
+
const t = ft(this.node.id);
|
|
1841
1860
|
if (!t) {
|
|
1842
1861
|
this.setWarningText(f("WARN_NODE_NOT_FOUND"));
|
|
1843
1862
|
return;
|
|
@@ -1893,7 +1912,7 @@ const Fi = {
|
|
|
1893
1912
|
), this.appendStatementInput("HANDLE").appendField("%{BKY_APP_DO}"), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_APP_V1_IMPL_APP_METHOD_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_IMPL_APP_METHOD_HELPURL}"), this.initData_();
|
|
1894
1913
|
},
|
|
1895
1914
|
initData_: function() {
|
|
1896
|
-
const t =
|
|
1915
|
+
const t = cn()?.[0];
|
|
1897
1916
|
if (!t)
|
|
1898
1917
|
return;
|
|
1899
1918
|
this.method.id = t.id, this.method.kind = t.kind, this.method.names = t.names, this.method.inputs = t.inputs;
|
|
@@ -1911,7 +1930,7 @@ const Fi = {
|
|
|
1911
1930
|
}, 0);
|
|
1912
1931
|
},
|
|
1913
1932
|
genMethodOpts_: function() {
|
|
1914
|
-
return
|
|
1933
|
+
return Zn();
|
|
1915
1934
|
},
|
|
1916
1935
|
onchange: function(t) {
|
|
1917
1936
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -1940,7 +1959,7 @@ const Fi = {
|
|
|
1940
1959
|
ensureBlocks_: function() {
|
|
1941
1960
|
if (this.isInsertionMarker() || !this.method.id)
|
|
1942
1961
|
return;
|
|
1943
|
-
const t =
|
|
1962
|
+
const t = Kn(this.method.kind), e = [];
|
|
1944
1963
|
for (let n = 0; n < this.method.inputs.length; n++) {
|
|
1945
1964
|
const { key: o, name: i } = this.method.inputs[n];
|
|
1946
1965
|
e.push(["INPUT" + n, `__input$${o}__`, i, t]);
|
|
@@ -1992,7 +2011,7 @@ const wi = {
|
|
|
1992
2011
|
initData_: function() {
|
|
1993
2012
|
if (this.method.id)
|
|
1994
2013
|
return;
|
|
1995
|
-
const t =
|
|
2014
|
+
const t = cn()?.[0];
|
|
1996
2015
|
if (!t)
|
|
1997
2016
|
return;
|
|
1998
2017
|
this.method.id = t.id, this.method.kind = t.kind, this.method.names = t.names;
|
|
@@ -2016,7 +2035,7 @@ const wi = {
|
|
|
2016
2035
|
}, 0);
|
|
2017
2036
|
},
|
|
2018
2037
|
genMethodOpts_: function() {
|
|
2019
|
-
return
|
|
2038
|
+
return Zn();
|
|
2020
2039
|
},
|
|
2021
2040
|
genOutputOpts_: function() {
|
|
2022
2041
|
return Bi(this.method.id);
|
|
@@ -2055,13 +2074,13 @@ const wi = {
|
|
|
2055
2074
|
t.connection.setShadowDom(null);
|
|
2056
2075
|
const e = t.connection.targetBlock();
|
|
2057
2076
|
e && !e.isShadow() && e.dispose();
|
|
2058
|
-
const n =
|
|
2077
|
+
const n = Et(this.output.type);
|
|
2059
2078
|
t.setCheck(n);
|
|
2060
2079
|
},
|
|
2061
2080
|
updateShadows_: function() {
|
|
2062
2081
|
if (this.isInsertionMarker())
|
|
2063
2082
|
return;
|
|
2064
|
-
const t =
|
|
2083
|
+
const t = gt(this.output.type);
|
|
2065
2084
|
this.getInput("VALUE").connection.setShadowDom(t);
|
|
2066
2085
|
},
|
|
2067
2086
|
checkWarning_: function() {
|
|
@@ -2150,7 +2169,7 @@ const Ki = {
|
|
|
2150
2169
|
initData_: function() {
|
|
2151
2170
|
if (this.app.id)
|
|
2152
2171
|
return;
|
|
2153
|
-
const t =
|
|
2172
|
+
const t = Jn()?.[0];
|
|
2154
2173
|
if (!t)
|
|
2155
2174
|
return;
|
|
2156
2175
|
this.app.id = t.id, this.app.name = t.name;
|
|
@@ -2191,7 +2210,7 @@ const Ki = {
|
|
|
2191
2210
|
}
|
|
2192
2211
|
},
|
|
2193
2212
|
onAppChange_: function(t) {
|
|
2194
|
-
const e =
|
|
2213
|
+
const e = vn(t);
|
|
2195
2214
|
if (!e) {
|
|
2196
2215
|
console.assert(!1);
|
|
2197
2216
|
return;
|
|
@@ -2209,7 +2228,7 @@ const Ki = {
|
|
|
2209
2228
|
e ? (this.page.id = e.id, this.page.name = e.name) : (this.page.id = "", this.page.name = "");
|
|
2210
2229
|
},
|
|
2211
2230
|
checkWarning_: function() {
|
|
2212
|
-
const t =
|
|
2231
|
+
const t = vn(this.app.id);
|
|
2213
2232
|
if (!t) {
|
|
2214
2233
|
this.setWarningText(f("WARN_APP_NOT_FOUND"));
|
|
2215
2234
|
return;
|
|
@@ -2229,7 +2248,7 @@ s.forBlock.navigate_to_v1 = function(t) {
|
|
|
2229
2248
|
return `__navigateToV1__(${n}, ${o});
|
|
2230
2249
|
`;
|
|
2231
2250
|
};
|
|
2232
|
-
const
|
|
2251
|
+
const Hi = {
|
|
2233
2252
|
init: function() {
|
|
2234
2253
|
this.comp = {
|
|
2235
2254
|
id: void 0,
|
|
@@ -2239,7 +2258,7 @@ const $i = {
|
|
|
2239
2258
|
initData_: function() {
|
|
2240
2259
|
if (this.comp.id !== void 0)
|
|
2241
2260
|
return;
|
|
2242
|
-
const t =
|
|
2261
|
+
const t = Qn()?.[0];
|
|
2243
2262
|
if (!t)
|
|
2244
2263
|
return;
|
|
2245
2264
|
this.comp.id = t.id, this.comp.name = t.name;
|
|
@@ -2270,7 +2289,7 @@ const $i = {
|
|
|
2270
2289
|
}
|
|
2271
2290
|
},
|
|
2272
2291
|
onCompChange_: function(t) {
|
|
2273
|
-
const e =
|
|
2292
|
+
const e = Cn(t);
|
|
2274
2293
|
if (!e) {
|
|
2275
2294
|
console.assert(!1);
|
|
2276
2295
|
return;
|
|
@@ -2282,19 +2301,19 @@ const $i = {
|
|
|
2282
2301
|
this.setWarningText(f("WARN_COMP_NOT_FOUND"));
|
|
2283
2302
|
return;
|
|
2284
2303
|
}
|
|
2285
|
-
if (!
|
|
2304
|
+
if (!Cn(this.comp.id)) {
|
|
2286
2305
|
this.setWarningText(f("WARN_COMP_NOT_FOUND"));
|
|
2287
2306
|
return;
|
|
2288
2307
|
}
|
|
2289
2308
|
this.setWarningText(null);
|
|
2290
2309
|
}
|
|
2291
2310
|
};
|
|
2292
|
-
g.select_comp_v1 =
|
|
2311
|
+
g.select_comp_v1 = Hi;
|
|
2293
2312
|
s.forBlock.select_comp_v1 = function(t) {
|
|
2294
2313
|
const e = s.quote_, o = t.comp.id ?? "";
|
|
2295
2314
|
return [e(o), r.ATOMIC];
|
|
2296
2315
|
};
|
|
2297
|
-
const
|
|
2316
|
+
const $i = {
|
|
2298
2317
|
init: function() {
|
|
2299
2318
|
this.node = {
|
|
2300
2319
|
id: "",
|
|
@@ -2318,7 +2337,7 @@ const Hi = {
|
|
|
2318
2337
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2319
2338
|
const e = this.getField("NODE");
|
|
2320
2339
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
2321
|
-
const n =
|
|
2340
|
+
const n = $t(this.node.id, "read")?.[0];
|
|
2322
2341
|
if (!n)
|
|
2323
2342
|
return;
|
|
2324
2343
|
this.property.id = n.id, this.property.kind = n.kind, this.property.names = n.names;
|
|
@@ -2340,7 +2359,7 @@ const Hi = {
|
|
|
2340
2359
|
return Ce("getProperty");
|
|
2341
2360
|
},
|
|
2342
2361
|
genPropertyOpts_: function() {
|
|
2343
|
-
return
|
|
2362
|
+
return eo(this.node.id, "read");
|
|
2344
2363
|
},
|
|
2345
2364
|
onchange: function(t) {
|
|
2346
2365
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -2353,7 +2372,7 @@ const Hi = {
|
|
|
2353
2372
|
}
|
|
2354
2373
|
},
|
|
2355
2374
|
onNodeChange_: function(t) {
|
|
2356
|
-
const e =
|
|
2375
|
+
const e = ft(t);
|
|
2357
2376
|
if (!e) {
|
|
2358
2377
|
console.assert(!1);
|
|
2359
2378
|
return;
|
|
@@ -2361,18 +2380,18 @@ const Hi = {
|
|
|
2361
2380
|
const n = this.node.key !== e.key;
|
|
2362
2381
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2363
2382
|
const o = this.getField("PROPERTY");
|
|
2364
|
-
if (o.getOptions(!1), n || !
|
|
2365
|
-
const i =
|
|
2383
|
+
if (o.getOptions(!1), n || !yt(this.property.id)) {
|
|
2384
|
+
const i = $t(this.node.id, "read")?.[0];
|
|
2366
2385
|
o.setValue(i?.id ?? "");
|
|
2367
2386
|
}
|
|
2368
2387
|
this.onPropChange_(o.getValue());
|
|
2369
2388
|
},
|
|
2370
2389
|
onPropChange_: function(t) {
|
|
2371
|
-
const e =
|
|
2390
|
+
const e = yt(t);
|
|
2372
2391
|
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 = []);
|
|
2373
2392
|
},
|
|
2374
2393
|
checkWarning_: function() {
|
|
2375
|
-
const t =
|
|
2394
|
+
const t = ft(this.node.id);
|
|
2376
2395
|
if (!t) {
|
|
2377
2396
|
this.setWarningText(f("WARN_NODE_NOT_FOUND"));
|
|
2378
2397
|
return;
|
|
@@ -2382,7 +2401,7 @@ const Hi = {
|
|
|
2382
2401
|
return;
|
|
2383
2402
|
}
|
|
2384
2403
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
2385
|
-
const e =
|
|
2404
|
+
const e = yt(this.property.id);
|
|
2386
2405
|
if (!e) {
|
|
2387
2406
|
this.setWarningText(f("WARN_PROPERTY_NOT_FOUND"));
|
|
2388
2407
|
return;
|
|
@@ -2394,10 +2413,10 @@ const Hi = {
|
|
|
2394
2413
|
M(e.names, this.property.names) || (this.property.names = e.names), this.setWarningText(null);
|
|
2395
2414
|
}
|
|
2396
2415
|
};
|
|
2397
|
-
g.get_app_property_v1 =
|
|
2416
|
+
g.get_app_property_v1 = $i;
|
|
2398
2417
|
s.forBlock.get_app_property_v1 = function(t) {
|
|
2399
|
-
const e = s.quote_
|
|
2400
|
-
return [`__getPropertyV1__(${e(
|
|
2418
|
+
const e = s.quote_;
|
|
2419
|
+
return [`__getPropertyV1__(${e(t.property.id)})`, r.ATOMIC];
|
|
2401
2420
|
};
|
|
2402
2421
|
const Gi = {
|
|
2403
2422
|
init: function() {
|
|
@@ -2423,7 +2442,7 @@ const Gi = {
|
|
|
2423
2442
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2424
2443
|
const e = this.getField("NODE");
|
|
2425
2444
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
2426
|
-
const n =
|
|
2445
|
+
const n = $t(this.node.id, "write")?.[0];
|
|
2427
2446
|
if (!n)
|
|
2428
2447
|
return;
|
|
2429
2448
|
this.property.id = n.id, this.property.kind = n.kind, this.property.names = n.names;
|
|
@@ -2445,7 +2464,7 @@ const Gi = {
|
|
|
2445
2464
|
return Ce("setProperty");
|
|
2446
2465
|
},
|
|
2447
2466
|
genPropertyOpts_: function() {
|
|
2448
|
-
return
|
|
2467
|
+
return eo(this.node.id, "write");
|
|
2449
2468
|
},
|
|
2450
2469
|
onchange: function(t) {
|
|
2451
2470
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -2458,7 +2477,7 @@ const Gi = {
|
|
|
2458
2477
|
}
|
|
2459
2478
|
},
|
|
2460
2479
|
onNodeChange_: function(t) {
|
|
2461
|
-
const e =
|
|
2480
|
+
const e = ft(t);
|
|
2462
2481
|
if (!e) {
|
|
2463
2482
|
console.assert(!1);
|
|
2464
2483
|
return;
|
|
@@ -2466,20 +2485,20 @@ const Gi = {
|
|
|
2466
2485
|
const n = this.node.key !== e.key;
|
|
2467
2486
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2468
2487
|
const o = this.getField("PROPERTY");
|
|
2469
|
-
if (o.getOptions(!1), n || !
|
|
2470
|
-
const i =
|
|
2488
|
+
if (o.getOptions(!1), n || !yt(this.property.id)) {
|
|
2489
|
+
const i = $t(this.node.id, "write")?.[0];
|
|
2471
2490
|
o.setValue(i?.id ?? "");
|
|
2472
2491
|
}
|
|
2473
2492
|
this.onPropChange_(o.getValue());
|
|
2474
2493
|
},
|
|
2475
2494
|
onPropChange_: function(t) {
|
|
2476
|
-
const e =
|
|
2495
|
+
const e = yt(t);
|
|
2477
2496
|
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_();
|
|
2478
2497
|
},
|
|
2479
2498
|
updateShadow_: function() {
|
|
2480
2499
|
if (this.isInsertionMarker())
|
|
2481
2500
|
return;
|
|
2482
|
-
const t =
|
|
2501
|
+
const t = yt(this.property.id);
|
|
2483
2502
|
if (!t)
|
|
2484
2503
|
return;
|
|
2485
2504
|
this.getInput("VALUE").setShadowDom(null);
|
|
@@ -2488,12 +2507,12 @@ const Gi = {
|
|
|
2488
2507
|
const n = ci(t.meta.raw), o = hi(t.meta.raw);
|
|
2489
2508
|
this.getInput("VALUE").setCheck(n).setShadowDom(o);
|
|
2490
2509
|
} else {
|
|
2491
|
-
const n =
|
|
2510
|
+
const n = Et(t.meta.raw.type), o = gt(t.meta.raw.type);
|
|
2492
2511
|
this.getInput("VALUE").setCheck(n).setShadowDom(o);
|
|
2493
2512
|
}
|
|
2494
2513
|
},
|
|
2495
2514
|
checkWarning_: function() {
|
|
2496
|
-
const t =
|
|
2515
|
+
const t = ft(this.node.id);
|
|
2497
2516
|
if (!t) {
|
|
2498
2517
|
this.setWarningText(f("WARN_NODE_NOT_FOUND"));
|
|
2499
2518
|
return;
|
|
@@ -2503,7 +2522,7 @@ const Gi = {
|
|
|
2503
2522
|
return;
|
|
2504
2523
|
}
|
|
2505
2524
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
2506
|
-
const e =
|
|
2525
|
+
const e = yt(this.property.id);
|
|
2507
2526
|
if (!e) {
|
|
2508
2527
|
this.setWarningText(f("WARN_PROPERTY_NOT_FOUND"));
|
|
2509
2528
|
return;
|
|
@@ -2517,8 +2536,8 @@ const Gi = {
|
|
|
2517
2536
|
};
|
|
2518
2537
|
g.set_app_property_v1 = Gi;
|
|
2519
2538
|
s.forBlock.set_app_property_v1 = function(t) {
|
|
2520
|
-
const e = s.quote_, n = t,
|
|
2521
|
-
return `__setPropertyV1__(${e(
|
|
2539
|
+
const e = s.quote_, n = t, o = s.valueToCode(n, "VALUE", r.NONE);
|
|
2540
|
+
return `__setPropertyV1__(${e(n.property.id)}, ${o});
|
|
2522
2541
|
`;
|
|
2523
2542
|
};
|
|
2524
2543
|
const Wi = {
|
|
@@ -2535,7 +2554,7 @@ const Wi = {
|
|
|
2535
2554
|
initData_: function() {
|
|
2536
2555
|
if (this.state.id)
|
|
2537
2556
|
return;
|
|
2538
|
-
const t =
|
|
2557
|
+
const t = rn()?.[0];
|
|
2539
2558
|
if (!t)
|
|
2540
2559
|
return;
|
|
2541
2560
|
this.state.id = t.id, this.state.name = t.name, this.state.type = t.type;
|
|
@@ -2553,7 +2572,7 @@ const Wi = {
|
|
|
2553
2572
|
}, 0);
|
|
2554
2573
|
},
|
|
2555
2574
|
genStateOpts_: function() {
|
|
2556
|
-
return
|
|
2575
|
+
return no();
|
|
2557
2576
|
},
|
|
2558
2577
|
onchange: function(t) {
|
|
2559
2578
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -2599,7 +2618,7 @@ const ji = {
|
|
|
2599
2618
|
initData_: function() {
|
|
2600
2619
|
if (this.state.id)
|
|
2601
2620
|
return;
|
|
2602
|
-
const t =
|
|
2621
|
+
const t = rn()?.[0];
|
|
2603
2622
|
if (!t)
|
|
2604
2623
|
return;
|
|
2605
2624
|
this.state.id = t.id, this.state.name = t.name, this.state.type = t.type;
|
|
@@ -2615,7 +2634,7 @@ const ji = {
|
|
|
2615
2634
|
this.state.id = t.state?.id ?? "", this.state.name = t.state?.name ?? "", this.state.type = t.state?.type ?? "string";
|
|
2616
2635
|
},
|
|
2617
2636
|
genStateOpts_: function() {
|
|
2618
|
-
return
|
|
2637
|
+
return no();
|
|
2619
2638
|
},
|
|
2620
2639
|
onchange: function(t) {
|
|
2621
2640
|
if (t.type === I.BLOCK_CHANGE) {
|
|
@@ -2633,7 +2652,7 @@ const ji = {
|
|
|
2633
2652
|
this.getInput("VALUE").setShadowDom(null);
|
|
2634
2653
|
const t = this.getInput("VALUE").connection.targetBlock();
|
|
2635
2654
|
t && t.dispose();
|
|
2636
|
-
const e =
|
|
2655
|
+
const e = Et(this.state.type), n = gt(this.state.type);
|
|
2637
2656
|
this.getInput("VALUE").setCheck(e).setShadowDom(n);
|
|
2638
2657
|
},
|
|
2639
2658
|
checkWarning_: function() {
|
|
@@ -3467,7 +3486,7 @@ const Qi = {
|
|
|
3467
3486
|
I.disable();
|
|
3468
3487
|
const n = e.getInput(t.oldInputName)?.connection;
|
|
3469
3488
|
if (n) {
|
|
3470
|
-
const o =
|
|
3489
|
+
const o = an(
|
|
3471
3490
|
this.workspace,
|
|
3472
3491
|
this.key,
|
|
3473
3492
|
this.name,
|
|
@@ -3481,7 +3500,7 @@ const Qi = {
|
|
|
3481
3500
|
},
|
|
3482
3501
|
updateShape_: function() {
|
|
3483
3502
|
if (this.locale) {
|
|
3484
|
-
const { i18n: t } =
|
|
3503
|
+
const { i18n: t } = vt;
|
|
3485
3504
|
this.setFieldValue(t.global.t(this.name), "LABEL");
|
|
3486
3505
|
} else
|
|
3487
3506
|
this.setFieldValue(this.name, "LABEL");
|
|
@@ -3504,12 +3523,12 @@ function Gt(t) {
|
|
|
3504
3523
|
const e = E.compute.spaces.find((n) => n.id === t);
|
|
3505
3524
|
return e ? e.funcs : [];
|
|
3506
3525
|
}
|
|
3507
|
-
function
|
|
3526
|
+
function Bt(t, e) {
|
|
3508
3527
|
const n = E.compute.spaces.find((o) => o.id === t);
|
|
3509
3528
|
if (n)
|
|
3510
3529
|
return n.funcs.find((o) => o.id === e);
|
|
3511
3530
|
}
|
|
3512
|
-
function
|
|
3531
|
+
function oo(t) {
|
|
3513
3532
|
const e = [];
|
|
3514
3533
|
return Gt(t).forEach(({ id: o, name: i }) => {
|
|
3515
3534
|
e.push([i, o]);
|
|
@@ -3518,7 +3537,7 @@ function io(t) {
|
|
|
3518
3537
|
function Ze() {
|
|
3519
3538
|
return E.compute.activeFunc;
|
|
3520
3539
|
}
|
|
3521
|
-
function
|
|
3540
|
+
function Nn(t) {
|
|
3522
3541
|
const { outputs: e } = E.compute.activeFunc;
|
|
3523
3542
|
return e.find((n) => n.id === t);
|
|
3524
3543
|
}
|
|
@@ -3537,7 +3556,7 @@ function qt(t) {
|
|
|
3537
3556
|
function le(t) {
|
|
3538
3557
|
return E.compute.spaces.find((e) => e.id === t);
|
|
3539
3558
|
}
|
|
3540
|
-
function
|
|
3559
|
+
function io(t) {
|
|
3541
3560
|
const e = [];
|
|
3542
3561
|
return qt(t).forEach(({ id: o, name: i }) => {
|
|
3543
3562
|
e.push([i, o]);
|
|
@@ -3586,10 +3605,10 @@ const ts = {
|
|
|
3586
3605
|
}, 0);
|
|
3587
3606
|
},
|
|
3588
3607
|
genSpaceOpts_: function() {
|
|
3589
|
-
return
|
|
3608
|
+
return io("func");
|
|
3590
3609
|
},
|
|
3591
3610
|
genFuncOpts_: function() {
|
|
3592
|
-
return
|
|
3611
|
+
return oo(this.space.id);
|
|
3593
3612
|
},
|
|
3594
3613
|
onchange: function(t) {
|
|
3595
3614
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -3608,13 +3627,13 @@ const ts = {
|
|
|
3608
3627
|
return;
|
|
3609
3628
|
}
|
|
3610
3629
|
let n = !1;
|
|
3611
|
-
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !
|
|
3630
|
+
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !Bt(this.space.id, this.func.id)) {
|
|
3612
3631
|
const i = Gt(this.space.id)?.[0];
|
|
3613
3632
|
this.setFieldValue(i?.id ?? "", "FUNC");
|
|
3614
3633
|
}
|
|
3615
3634
|
},
|
|
3616
3635
|
onFuncChange_: function(t) {
|
|
3617
|
-
const e =
|
|
3636
|
+
const e = Bt(this.space.id, t);
|
|
3618
3637
|
if (!e) {
|
|
3619
3638
|
console.assert(!1);
|
|
3620
3639
|
return;
|
|
@@ -3646,14 +3665,14 @@ const ts = {
|
|
|
3646
3665
|
},
|
|
3647
3666
|
updateCheck_: function() {
|
|
3648
3667
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
3649
|
-
const { type: e } = this.func.inputs[t], n =
|
|
3668
|
+
const { type: e } = this.func.inputs[t], n = Et(e);
|
|
3650
3669
|
this.getInput("INPUT" + t).connection.setCheck(n);
|
|
3651
3670
|
}
|
|
3652
3671
|
},
|
|
3653
3672
|
updateShadow_: function() {
|
|
3654
3673
|
if (!this.isInsertionMarker())
|
|
3655
3674
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
3656
|
-
const e = this.func.inputs[t], n =
|
|
3675
|
+
const e = this.func.inputs[t], n = gt(e.type);
|
|
3657
3676
|
this.getInput("INPUT" + t).setShadowDom(n);
|
|
3658
3677
|
}
|
|
3659
3678
|
},
|
|
@@ -3674,7 +3693,7 @@ const ts = {
|
|
|
3674
3693
|
return;
|
|
3675
3694
|
}
|
|
3676
3695
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
3677
|
-
const e =
|
|
3696
|
+
const e = Bt(this.space.id, this.func.id);
|
|
3678
3697
|
if (!e) {
|
|
3679
3698
|
this.setWarningText(f("WARN_FUNC_NOT_FOUND"));
|
|
3680
3699
|
return;
|
|
@@ -3760,10 +3779,10 @@ const es = {
|
|
|
3760
3779
|
}, 0);
|
|
3761
3780
|
},
|
|
3762
3781
|
genSpaceOpts_: function() {
|
|
3763
|
-
return
|
|
3782
|
+
return io("func");
|
|
3764
3783
|
},
|
|
3765
3784
|
genFuncOpts_: function() {
|
|
3766
|
-
return
|
|
3785
|
+
return oo(this.space.id);
|
|
3767
3786
|
},
|
|
3768
3787
|
onchange: function(t) {
|
|
3769
3788
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -3782,13 +3801,13 @@ const es = {
|
|
|
3782
3801
|
return;
|
|
3783
3802
|
}
|
|
3784
3803
|
let n = !1;
|
|
3785
|
-
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !
|
|
3804
|
+
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !Bt(this.space.id, this.func.id)) {
|
|
3786
3805
|
const i = Gt(this.space.id)?.[0];
|
|
3787
3806
|
i ? this.setFieldValue(i.id, "FUNC") : this.setFieldValue("", "FUNC");
|
|
3788
3807
|
}
|
|
3789
3808
|
},
|
|
3790
3809
|
onFuncChange_: function(t) {
|
|
3791
|
-
const e =
|
|
3810
|
+
const e = Bt(this.space.id, t);
|
|
3792
3811
|
if (!e) {
|
|
3793
3812
|
console.assert(!1);
|
|
3794
3813
|
return;
|
|
@@ -3820,14 +3839,14 @@ const es = {
|
|
|
3820
3839
|
},
|
|
3821
3840
|
updateCheck_: function() {
|
|
3822
3841
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
3823
|
-
const { type: e } = this.func.inputs[t], n =
|
|
3842
|
+
const { type: e } = this.func.inputs[t], n = Et(e);
|
|
3824
3843
|
this.getInput("INPUT" + t).connection.setCheck(n);
|
|
3825
3844
|
}
|
|
3826
3845
|
},
|
|
3827
3846
|
updateShadow_: function() {
|
|
3828
3847
|
if (!this.isInsertionMarker())
|
|
3829
3848
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
3830
|
-
const e = this.func.inputs[t], n =
|
|
3849
|
+
const e = this.func.inputs[t], n = gt(e.type);
|
|
3831
3850
|
this.getInput("INPUT" + t).setShadowDom(n);
|
|
3832
3851
|
}
|
|
3833
3852
|
},
|
|
@@ -3848,7 +3867,7 @@ const es = {
|
|
|
3848
3867
|
return;
|
|
3849
3868
|
}
|
|
3850
3869
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
3851
|
-
const e =
|
|
3870
|
+
const e = Bt(this.space.id, this.func.id);
|
|
3852
3871
|
if (!e) {
|
|
3853
3872
|
this.setWarningText(f("WARN_FUNC_NOT_FOUND"));
|
|
3854
3873
|
return;
|
|
@@ -4000,7 +4019,7 @@ const os = {
|
|
|
4000
4019
|
}
|
|
4001
4020
|
},
|
|
4002
4021
|
onOutputChange_: function(t) {
|
|
4003
|
-
const e =
|
|
4022
|
+
const e = Nn(t);
|
|
4004
4023
|
if (!e) {
|
|
4005
4024
|
console.assert(!1);
|
|
4006
4025
|
return;
|
|
@@ -4012,17 +4031,17 @@ const os = {
|
|
|
4012
4031
|
t.connection.setShadowDom(null);
|
|
4013
4032
|
const e = t.connection.targetBlock();
|
|
4014
4033
|
e && !e.isShadow() && e.dispose();
|
|
4015
|
-
const n =
|
|
4034
|
+
const n = Et(this.output.type);
|
|
4016
4035
|
t.setCheck(n);
|
|
4017
4036
|
},
|
|
4018
4037
|
updateShadows_: function() {
|
|
4019
4038
|
if (this.isInsertionMarker())
|
|
4020
4039
|
return;
|
|
4021
|
-
const t =
|
|
4040
|
+
const t = gt(this.output.type);
|
|
4022
4041
|
this.getInput("VALUE").setShadowDom(t);
|
|
4023
4042
|
},
|
|
4024
4043
|
checkWarning_: function() {
|
|
4025
|
-
const t =
|
|
4044
|
+
const t = Nn(this.output.id);
|
|
4026
4045
|
if (!t) {
|
|
4027
4046
|
this.setWarningText(f("WARN_FUNC_HAS_CHANGED"));
|
|
4028
4047
|
return;
|
|
@@ -4106,19 +4125,19 @@ T([
|
|
|
4106
4125
|
s.forBlock.compute_env_is_v1 = function(t) {
|
|
4107
4126
|
return [`__getEnvV1__() === ${s.quote_(t.getFieldValue("ENV"))}`, r.ATOMIC];
|
|
4108
4127
|
};
|
|
4109
|
-
function
|
|
4128
|
+
function et() {
|
|
4110
4129
|
const t = [];
|
|
4111
4130
|
return E.data.spaces.forEach((e) => {
|
|
4112
4131
|
e.tables.length > 0 && t.push(e);
|
|
4113
4132
|
}), t;
|
|
4114
4133
|
}
|
|
4115
|
-
function
|
|
4134
|
+
function mt(t) {
|
|
4116
4135
|
const { spaces: e } = E.data;
|
|
4117
4136
|
return e.find((n) => n.id === t);
|
|
4118
4137
|
}
|
|
4119
4138
|
function ke() {
|
|
4120
4139
|
const t = [];
|
|
4121
|
-
return
|
|
4140
|
+
return et().forEach(({ id: n, name: o }) => {
|
|
4122
4141
|
t.push([o, n]);
|
|
4123
4142
|
}), k(t);
|
|
4124
4143
|
}
|
|
@@ -4126,7 +4145,7 @@ function $(t) {
|
|
|
4126
4145
|
const { spaces: e } = E.data, n = e.find((o) => o.id === t);
|
|
4127
4146
|
return n ? n.tables : [];
|
|
4128
4147
|
}
|
|
4129
|
-
function
|
|
4148
|
+
function J(t, e) {
|
|
4130
4149
|
const { spaces: n } = E.data, o = n.find((i) => i.id === t);
|
|
4131
4150
|
if (o)
|
|
4132
4151
|
return o.tables.find((i) => i.id === e);
|
|
@@ -4163,7 +4182,7 @@ function ss(t) {
|
|
|
4163
4182
|
if (e.targetBlock())
|
|
4164
4183
|
return;
|
|
4165
4184
|
let n, o;
|
|
4166
|
-
const i =
|
|
4185
|
+
const i = et()?.[0];
|
|
4167
4186
|
if (i) {
|
|
4168
4187
|
const u = $(i.id)?.[0];
|
|
4169
4188
|
if (u) {
|
|
@@ -4189,7 +4208,7 @@ function ss(t) {
|
|
|
4189
4208
|
type: "update_column_v1",
|
|
4190
4209
|
extraState: n,
|
|
4191
4210
|
fields: o
|
|
4192
|
-
}, c =
|
|
4211
|
+
}, c = H.blocks.append(a, t.workspace);
|
|
4193
4212
|
e.connect(c.outputConnection);
|
|
4194
4213
|
}
|
|
4195
4214
|
function as(t) {
|
|
@@ -4213,7 +4232,7 @@ function as(t) {
|
|
|
4213
4232
|
}
|
|
4214
4233
|
}
|
|
4215
4234
|
}
|
|
4216
|
-
}, o =
|
|
4235
|
+
}, o = H.blocks.append(n, t.workspace);
|
|
4217
4236
|
e.connect(o.previousConnection);
|
|
4218
4237
|
}
|
|
4219
4238
|
const cs = {
|
|
@@ -4294,7 +4313,7 @@ const rs = {
|
|
|
4294
4313
|
initData_: function() {
|
|
4295
4314
|
if (this.space.id)
|
|
4296
4315
|
return;
|
|
4297
|
-
const t =
|
|
4316
|
+
const t = et()?.[0];
|
|
4298
4317
|
if (!t)
|
|
4299
4318
|
return;
|
|
4300
4319
|
this.space.id = t.id, this.space.name = t.name;
|
|
@@ -4337,19 +4356,19 @@ const rs = {
|
|
|
4337
4356
|
}
|
|
4338
4357
|
},
|
|
4339
4358
|
onSpaceChange_: function(t) {
|
|
4340
|
-
const e =
|
|
4359
|
+
const e = mt(t);
|
|
4341
4360
|
if (!e) {
|
|
4342
4361
|
console.assert(!1);
|
|
4343
4362
|
return;
|
|
4344
4363
|
}
|
|
4345
4364
|
const n = e.id !== this.space.id;
|
|
4346
|
-
if (this.space.id = e.id, this.space.name = e.name, n || !
|
|
4365
|
+
if (this.space.id = e.id, this.space.name = e.name, n || !J(this.space.id, this.table.id)) {
|
|
4347
4366
|
const o = $(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
|
|
4348
4367
|
i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
|
|
4349
4368
|
}
|
|
4350
4369
|
},
|
|
4351
4370
|
onTableChange_: function(t) {
|
|
4352
|
-
const e =
|
|
4371
|
+
const e = J(this.space.id, t);
|
|
4353
4372
|
if (!e) {
|
|
4354
4373
|
console.assert(!1);
|
|
4355
4374
|
return;
|
|
@@ -4384,17 +4403,17 @@ const rs = {
|
|
|
4384
4403
|
o && (e.setCheck(null), e.connect(o.outputConnection));
|
|
4385
4404
|
},
|
|
4386
4405
|
updateCheck_: function() {
|
|
4387
|
-
const t =
|
|
4406
|
+
const t = Xn(this.column.type);
|
|
4388
4407
|
this.getInput("VALUE").connection.setCheck(t);
|
|
4389
4408
|
},
|
|
4390
4409
|
checkWarning_: function() {
|
|
4391
|
-
const t =
|
|
4410
|
+
const t = mt(this.space.id);
|
|
4392
4411
|
if (!t) {
|
|
4393
4412
|
this.setWarningText(f("WARN_SPACE_NOT_FOUND"));
|
|
4394
4413
|
return;
|
|
4395
4414
|
}
|
|
4396
4415
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
4397
|
-
const e =
|
|
4416
|
+
const e = J(this.space.id, this.table.id);
|
|
4398
4417
|
if (!e) {
|
|
4399
4418
|
this.setWarningText(f("WARN_TABLE_NOT_FOUND"));
|
|
4400
4419
|
return;
|
|
@@ -4449,7 +4468,7 @@ const _s = {
|
|
|
4449
4468
|
]),
|
|
4450
4469
|
"TYPE"
|
|
4451
4470
|
), this.setMutator(
|
|
4452
|
-
new
|
|
4471
|
+
new Tt.MutatorIcon(
|
|
4453
4472
|
["cond_logic_item_v1"],
|
|
4454
4473
|
this
|
|
4455
4474
|
)
|
|
@@ -4528,7 +4547,7 @@ function ps(t) {
|
|
|
4528
4547
|
const e = t.getInput("TABLE").connection;
|
|
4529
4548
|
if (e.targetBlock())
|
|
4530
4549
|
return;
|
|
4531
|
-
const n =
|
|
4550
|
+
const n = et()?.[0], o = $(n?.id ?? "")?.[0], i = {
|
|
4532
4551
|
type: "select_table_v1",
|
|
4533
4552
|
extraState: {
|
|
4534
4553
|
space: {
|
|
@@ -4540,14 +4559,14 @@ function ps(t) {
|
|
|
4540
4559
|
name: o?.name ?? ""
|
|
4541
4560
|
}
|
|
4542
4561
|
}
|
|
4543
|
-
}, a =
|
|
4562
|
+
}, a = H.blocks.append(i, t.workspace);
|
|
4544
4563
|
e.connect(a.outputConnection);
|
|
4545
4564
|
}
|
|
4546
4565
|
function ds(t) {
|
|
4547
4566
|
const e = t.getInput("CONDITION").connection;
|
|
4548
4567
|
if (e.targetBlock())
|
|
4549
4568
|
return;
|
|
4550
|
-
const n =
|
|
4569
|
+
const n = et()?.[0], o = $(n?.id ?? "")?.[0], i = _e(n?.id, o?.id)?.[0], a = {
|
|
4551
4570
|
type: "cond_atomic_v1",
|
|
4552
4571
|
extraState: {
|
|
4553
4572
|
space: {
|
|
@@ -4565,7 +4584,7 @@ function ds(t) {
|
|
|
4565
4584
|
extend: i?.extend ?? ""
|
|
4566
4585
|
}
|
|
4567
4586
|
}
|
|
4568
|
-
}, c =
|
|
4587
|
+
}, c = H.blocks.append(a, t.workspace);
|
|
4569
4588
|
e.connect(c.outputConnection);
|
|
4570
4589
|
}
|
|
4571
4590
|
function hs(t) {
|
|
@@ -4589,7 +4608,7 @@ function hs(t) {
|
|
|
4589
4608
|
}
|
|
4590
4609
|
}
|
|
4591
4610
|
}
|
|
4592
|
-
}, o =
|
|
4611
|
+
}, o = H.blocks.append(n, t.workspace);
|
|
4593
4612
|
e.connect(o.previousConnection);
|
|
4594
4613
|
}
|
|
4595
4614
|
const fs = {
|
|
@@ -4657,7 +4676,7 @@ function ms(t) {
|
|
|
4657
4676
|
if (e.targetBlock())
|
|
4658
4677
|
return;
|
|
4659
4678
|
let n, o;
|
|
4660
|
-
const i =
|
|
4679
|
+
const i = et()?.[0];
|
|
4661
4680
|
if (i) {
|
|
4662
4681
|
const u = $(i.id)?.[0];
|
|
4663
4682
|
if (u) {
|
|
@@ -4683,7 +4702,7 @@ function ms(t) {
|
|
|
4683
4702
|
type: "select_column_v1",
|
|
4684
4703
|
extraState: n,
|
|
4685
4704
|
fields: o
|
|
4686
|
-
}, c =
|
|
4705
|
+
}, c = H.blocks.append(a, t.workspace);
|
|
4687
4706
|
e.connect(c.outputConnection);
|
|
4688
4707
|
}
|
|
4689
4708
|
function Ts(t) {
|
|
@@ -4692,7 +4711,7 @@ function Ts(t) {
|
|
|
4692
4711
|
return;
|
|
4693
4712
|
const n = {
|
|
4694
4713
|
type: "cond_atomic_v1"
|
|
4695
|
-
}, o =
|
|
4714
|
+
}, o = H.blocks.append(n, t.workspace);
|
|
4696
4715
|
e.connect(o.outputConnection);
|
|
4697
4716
|
}
|
|
4698
4717
|
function Es(t) {
|
|
@@ -4729,7 +4748,7 @@ function Es(t) {
|
|
|
4729
4748
|
}
|
|
4730
4749
|
}
|
|
4731
4750
|
}
|
|
4732
|
-
}, o =
|
|
4751
|
+
}, o = H.blocks.append(n, t.workspace);
|
|
4733
4752
|
e.connect(o.outputConnection);
|
|
4734
4753
|
}
|
|
4735
4754
|
function gs(t) {
|
|
@@ -4753,7 +4772,7 @@ function gs(t) {
|
|
|
4753
4772
|
}
|
|
4754
4773
|
}
|
|
4755
4774
|
}
|
|
4756
|
-
}, o =
|
|
4775
|
+
}, o = H.blocks.append(n, t.workspace);
|
|
4757
4776
|
e.connect(o.previousConnection);
|
|
4758
4777
|
}
|
|
4759
4778
|
T([
|
|
@@ -4895,7 +4914,7 @@ const ys = {
|
|
|
4895
4914
|
new O(() => this.genTableOpts_()),
|
|
4896
4915
|
"TABLE"
|
|
4897
4916
|
), this.setMutator(
|
|
4898
|
-
new
|
|
4917
|
+
new Tt.MutatorIcon(
|
|
4899
4918
|
["select_column_item_v1"],
|
|
4900
4919
|
this
|
|
4901
4920
|
)
|
|
@@ -4904,7 +4923,7 @@ const ys = {
|
|
|
4904
4923
|
initData_: function() {
|
|
4905
4924
|
if (this.space.id)
|
|
4906
4925
|
return;
|
|
4907
|
-
const t =
|
|
4926
|
+
const t = et()?.[0];
|
|
4908
4927
|
if (!t)
|
|
4909
4928
|
return;
|
|
4910
4929
|
this.space.id = t.id, this.space.name = t.name;
|
|
@@ -4964,19 +4983,19 @@ const ys = {
|
|
|
4964
4983
|
}
|
|
4965
4984
|
},
|
|
4966
4985
|
onSpaceChange_: function(t) {
|
|
4967
|
-
const e =
|
|
4986
|
+
const e = mt(t);
|
|
4968
4987
|
if (!e) {
|
|
4969
4988
|
console.assert(!1);
|
|
4970
4989
|
return;
|
|
4971
4990
|
}
|
|
4972
4991
|
const n = e.id !== this.space.id;
|
|
4973
|
-
if (this.space.id = e.id, this.space.name = e.name, n || !
|
|
4992
|
+
if (this.space.id = e.id, this.space.name = e.name, n || !J(this.space.id, this.table.id)) {
|
|
4974
4993
|
const o = $(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
|
|
4975
4994
|
i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
|
|
4976
4995
|
}
|
|
4977
4996
|
},
|
|
4978
4997
|
onTableChange_: function(t) {
|
|
4979
|
-
const e =
|
|
4998
|
+
const e = J(this.space.id, t);
|
|
4980
4999
|
if (!e) {
|
|
4981
5000
|
console.assert(!1);
|
|
4982
5001
|
return;
|
|
@@ -5051,7 +5070,7 @@ const ys = {
|
|
|
5051
5070
|
for (let t = 0; t < this.table.columns.length; t++) {
|
|
5052
5071
|
const e = this.table.columns[t], n = new O(
|
|
5053
5072
|
() => this.genColumnOpts_()
|
|
5054
|
-
), o = new
|
|
5073
|
+
), o = new ht("");
|
|
5055
5074
|
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);
|
|
5056
5075
|
}
|
|
5057
5076
|
},
|
|
@@ -5063,20 +5082,20 @@ const ys = {
|
|
|
5063
5082
|
continue;
|
|
5064
5083
|
const e = new O(
|
|
5065
5084
|
() => this.genColumnOpts_()
|
|
5066
|
-
), n = new
|
|
5085
|
+
), n = new ht("");
|
|
5067
5086
|
this.appendDummyInput("ADD" + t).setAlign(v.Align.RIGHT).appendField(e, "COLUMN" + t).appendField("%{BKY_DATA_AS}").appendField(n, "ALIAS" + t);
|
|
5068
5087
|
const o = this.table.columns[0];
|
|
5069
5088
|
e.setValue(o.id ?? "", !1), n.setValue(o.name ?? "", !1);
|
|
5070
5089
|
}
|
|
5071
5090
|
},
|
|
5072
5091
|
checkWarning_: function() {
|
|
5073
|
-
const t =
|
|
5092
|
+
const t = mt(this.space.id);
|
|
5074
5093
|
if (!t) {
|
|
5075
5094
|
this.setWarningText(f("WARN_SPACE_NOT_FOUND"));
|
|
5076
5095
|
return;
|
|
5077
5096
|
}
|
|
5078
5097
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
5079
|
-
const e =
|
|
5098
|
+
const e = J(this.space.id, this.table.id);
|
|
5080
5099
|
if (!e) {
|
|
5081
5100
|
this.setWarningText(f("WARN_TABLE_NOT_FOUND"));
|
|
5082
5101
|
return;
|
|
@@ -5119,7 +5138,7 @@ const vs = {
|
|
|
5119
5138
|
initData_: function() {
|
|
5120
5139
|
if (this.space.id)
|
|
5121
5140
|
return;
|
|
5122
|
-
const t =
|
|
5141
|
+
const t = et()?.[0];
|
|
5123
5142
|
if (!t)
|
|
5124
5143
|
return;
|
|
5125
5144
|
this.space.id = t.id, this.space.name = t.name;
|
|
@@ -5158,19 +5177,19 @@ const vs = {
|
|
|
5158
5177
|
}
|
|
5159
5178
|
},
|
|
5160
5179
|
onSpaceChange_: function(t) {
|
|
5161
|
-
const e =
|
|
5180
|
+
const e = mt(t);
|
|
5162
5181
|
if (!e) {
|
|
5163
5182
|
console.assert(!1);
|
|
5164
5183
|
return;
|
|
5165
5184
|
}
|
|
5166
5185
|
let n = !1;
|
|
5167
|
-
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("TABLE").getOptions(!1), n || !
|
|
5186
|
+
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)) {
|
|
5168
5187
|
const i = $(this.space.id)?.[0];
|
|
5169
5188
|
i ? this.setFieldValue(i.id, "TABLE") : this.setFieldValue("", "TABLE");
|
|
5170
5189
|
}
|
|
5171
5190
|
},
|
|
5172
5191
|
onTableChange_: function(t) {
|
|
5173
|
-
const e =
|
|
5192
|
+
const e = J(this.space.id, t);
|
|
5174
5193
|
if (!e) {
|
|
5175
5194
|
console.assert(!1);
|
|
5176
5195
|
return;
|
|
@@ -5178,13 +5197,13 @@ const vs = {
|
|
|
5178
5197
|
this.table.id = e.id, this.table.name = e.name;
|
|
5179
5198
|
},
|
|
5180
5199
|
checkWarning_: function() {
|
|
5181
|
-
const t =
|
|
5200
|
+
const t = mt(this.space.id);
|
|
5182
5201
|
if (!t) {
|
|
5183
5202
|
this.setWarningText(f("WARN_SPACE_NOT_FOUND"));
|
|
5184
5203
|
return;
|
|
5185
5204
|
}
|
|
5186
5205
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
5187
|
-
const e =
|
|
5206
|
+
const e = J(this.space.id, this.table.id);
|
|
5188
5207
|
if (!e) {
|
|
5189
5208
|
this.setWarningText(f("WARN_TABLE_NOT_FOUND"));
|
|
5190
5209
|
return;
|
|
@@ -5291,7 +5310,7 @@ const Ls = {
|
|
|
5291
5310
|
new O(() => this.genTableOpts_()),
|
|
5292
5311
|
"TABLE"
|
|
5293
5312
|
), this.setMutator(
|
|
5294
|
-
new
|
|
5313
|
+
new Tt.MutatorIcon(
|
|
5295
5314
|
["update_column_item_v1"],
|
|
5296
5315
|
this
|
|
5297
5316
|
)
|
|
@@ -5300,7 +5319,7 @@ const Ls = {
|
|
|
5300
5319
|
initData_: function() {
|
|
5301
5320
|
if (this.space.id)
|
|
5302
5321
|
return;
|
|
5303
|
-
const t =
|
|
5322
|
+
const t = et()?.[0];
|
|
5304
5323
|
if (!t)
|
|
5305
5324
|
return;
|
|
5306
5325
|
this.space.id = t.id, this.space.name = t.name;
|
|
@@ -5360,19 +5379,19 @@ const Ls = {
|
|
|
5360
5379
|
}
|
|
5361
5380
|
},
|
|
5362
5381
|
onSpaceChange_: function(t) {
|
|
5363
|
-
const e =
|
|
5382
|
+
const e = mt(t);
|
|
5364
5383
|
if (!e) {
|
|
5365
5384
|
console.assert(!1);
|
|
5366
5385
|
return;
|
|
5367
5386
|
}
|
|
5368
5387
|
const n = e.id !== this.space.id;
|
|
5369
|
-
if (this.space.id = e.id, this.space.name = e.name, n || !
|
|
5388
|
+
if (this.space.id = e.id, this.space.name = e.name, n || !J(this.space.id, this.table.id)) {
|
|
5370
5389
|
const o = $(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
|
|
5371
5390
|
i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
|
|
5372
5391
|
}
|
|
5373
5392
|
},
|
|
5374
5393
|
onTableChange_: function(t) {
|
|
5375
|
-
const e =
|
|
5394
|
+
const e = J(this.space.id, t);
|
|
5376
5395
|
if (!e) {
|
|
5377
5396
|
console.assert(!1);
|
|
5378
5397
|
return;
|
|
@@ -5496,18 +5515,18 @@ const Ls = {
|
|
|
5496
5515
|
const e = this.getFieldValue("COLUMN" + t), n = this.table.columns.find((i) => i.id === e);
|
|
5497
5516
|
if (!n)
|
|
5498
5517
|
continue;
|
|
5499
|
-
const o =
|
|
5518
|
+
const o = Xn(n.type);
|
|
5500
5519
|
this.getInput("ADD" + t).setCheck(o);
|
|
5501
5520
|
}
|
|
5502
5521
|
},
|
|
5503
5522
|
checkWarning_: function() {
|
|
5504
|
-
const t =
|
|
5523
|
+
const t = mt(this.space.id);
|
|
5505
5524
|
if (!t) {
|
|
5506
5525
|
this.setWarningText(f("WARN_SPACE_NOT_FOUND"));
|
|
5507
5526
|
return;
|
|
5508
5527
|
}
|
|
5509
5528
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
5510
|
-
const e =
|
|
5529
|
+
const e = J(this.space.id, this.table.id);
|
|
5511
5530
|
if (!e) {
|
|
5512
5531
|
this.setWarningText(f("WARN_TABLE_NOT_FOUND"));
|
|
5513
5532
|
return;
|
|
@@ -5536,7 +5555,7 @@ function Ss(t) {
|
|
|
5536
5555
|
if (e.targetBlock())
|
|
5537
5556
|
return;
|
|
5538
5557
|
let n, o;
|
|
5539
|
-
const i =
|
|
5558
|
+
const i = et()?.[0];
|
|
5540
5559
|
if (i) {
|
|
5541
5560
|
const u = $(i.id)?.[0];
|
|
5542
5561
|
if (u) {
|
|
@@ -5562,7 +5581,7 @@ function Ss(t) {
|
|
|
5562
5581
|
type: "update_column_v1",
|
|
5563
5582
|
extraState: n,
|
|
5564
5583
|
fields: o
|
|
5565
|
-
}, c =
|
|
5584
|
+
}, c = H.blocks.append(a, t.workspace);
|
|
5566
5585
|
e.connect(c.outputConnection);
|
|
5567
5586
|
}
|
|
5568
5587
|
function Bs(t) {
|
|
@@ -5571,7 +5590,7 @@ function Bs(t) {
|
|
|
5571
5590
|
return;
|
|
5572
5591
|
const n = {
|
|
5573
5592
|
type: "cond_atomic_v1"
|
|
5574
|
-
}, o =
|
|
5593
|
+
}, o = H.blocks.append(n, t.workspace);
|
|
5575
5594
|
e.connect(o.outputConnection);
|
|
5576
5595
|
}
|
|
5577
5596
|
function bs(t) {
|
|
@@ -5595,7 +5614,7 @@ function bs(t) {
|
|
|
5595
5614
|
}
|
|
5596
5615
|
}
|
|
5597
5616
|
}
|
|
5598
|
-
}, o =
|
|
5617
|
+
}, o = H.blocks.append(n, t.workspace);
|
|
5599
5618
|
e.connect(o.previousConnection);
|
|
5600
5619
|
}
|
|
5601
5620
|
const Ps = {
|
|
@@ -5641,7 +5660,7 @@ ${i}}
|
|
|
5641
5660
|
const Rs = C.xml, Ds = {
|
|
5642
5661
|
init: function() {
|
|
5643
5662
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(v.Align.CENTRE).appendField(
|
|
5644
|
-
new ot(
|
|
5663
|
+
new ot(St, 20, 20, void 0, () => {
|
|
5645
5664
|
this.isInFlyout || this.addEntry_();
|
|
5646
5665
|
})
|
|
5647
5666
|
), this.appendDummyInput("CLOSE_BRACKET").appendField(" ] "), this.setInputsInline(!1), this.setOutput(!0, "JsonArray"), this.setColour(350), this.setTooltip(""), this.setHelpUrl("");
|
|
@@ -5660,10 +5679,10 @@ const Rs = C.xml, Ds = {
|
|
|
5660
5679
|
for (let t = 0; t < this.length; t++) {
|
|
5661
5680
|
const e = "ENTRY" + t, n = this.appendValueInput(e);
|
|
5662
5681
|
n.appendField(
|
|
5663
|
-
new ot(
|
|
5682
|
+
new ot(St, 20, 20, void 0, () => {
|
|
5664
5683
|
this.isInFlyout || this.addEntry_(n);
|
|
5665
5684
|
})
|
|
5666
|
-
), n.appendField(new
|
|
5685
|
+
), n.appendField(new En(String(t))), n.appendField(
|
|
5667
5686
|
new ot(se, 20, 20, void 0, () => {
|
|
5668
5687
|
this.isInFlyout || this.removeEntry_(n);
|
|
5669
5688
|
})
|
|
@@ -5679,10 +5698,10 @@ const Rs = C.xml, Ds = {
|
|
|
5679
5698
|
}
|
|
5680
5699
|
const n = this.appendValueInput("ENTRY" + e);
|
|
5681
5700
|
n.appendField(
|
|
5682
|
-
new ot(
|
|
5701
|
+
new ot(St, 20, 20, void 0, () => {
|
|
5683
5702
|
this.isInFlyout || this.addEntry_(n);
|
|
5684
5703
|
})
|
|
5685
|
-
), n.appendField(new
|
|
5704
|
+
), n.appendField(new En(String(e))), n.appendField(
|
|
5686
5705
|
new ot(se, 20, 20, void 0, () => {
|
|
5687
5706
|
this.isInFlyout || this.removeEntry_(n);
|
|
5688
5707
|
})
|
|
@@ -5712,18 +5731,18 @@ const Ms = {
|
|
|
5712
5731
|
}
|
|
5713
5732
|
};
|
|
5714
5733
|
g.json_boolean_v1 = Ms;
|
|
5715
|
-
const
|
|
5734
|
+
const Ln = C.xml, Us = {
|
|
5716
5735
|
init: function() {
|
|
5717
5736
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(v.Align.CENTRE).appendField(
|
|
5718
|
-
new ot(
|
|
5737
|
+
new ot(St, 20, 20, void 0, () => {
|
|
5719
5738
|
this.isInFlyout || this.addEntry_();
|
|
5720
5739
|
})
|
|
5721
5740
|
), this.appendDummyInput("CLOSE_BRACHET").appendField(" } "), this.setInputsInline(!1), this.setOutput(!0, "JsonMap"), this.setColour(120), this.setTooltip(""), this.setHelpUrl("");
|
|
5722
5741
|
},
|
|
5723
5742
|
mutationToDom: function() {
|
|
5724
|
-
const t =
|
|
5743
|
+
const t = Ln.createElement("mutation");
|
|
5725
5744
|
for (let e = 0; e < this.length; e++) {
|
|
5726
|
-
const n =
|
|
5745
|
+
const n = Ln.createElement("item");
|
|
5727
5746
|
n.setAttribute("key", this.getFieldValue("KEY" + e)), t.appendChild(n);
|
|
5728
5747
|
}
|
|
5729
5748
|
return t;
|
|
@@ -5743,10 +5762,10 @@ const Sn = C.xml, Us = {
|
|
|
5743
5762
|
for (let e = 0; e < t.length; e++) {
|
|
5744
5763
|
const n = t[e], o = "ENTRY" + e, i = this.appendValueInput(o);
|
|
5745
5764
|
i.appendField(
|
|
5746
|
-
new ot(
|
|
5765
|
+
new ot(St, 20, 20, void 0, () => {
|
|
5747
5766
|
this.isInFlyout || this.addEntry_(i);
|
|
5748
5767
|
})
|
|
5749
|
-
), i.appendField(new
|
|
5768
|
+
), i.appendField(new ht(n), "KEY" + e), i.appendField(
|
|
5750
5769
|
new ot(se, 20, 20, void 0, () => {
|
|
5751
5770
|
this.isInFlyout || this.removeEntry_(i);
|
|
5752
5771
|
})
|
|
@@ -5760,10 +5779,10 @@ const Sn = C.xml, Us = {
|
|
|
5760
5779
|
this.getField("KEY" + o).name = "KEY" + (o + 1), this.getInput("ENTRY" + o).name = "ENTRY" + (o + 1);
|
|
5761
5780
|
const n = this.appendValueInput("ENTRY" + e);
|
|
5762
5781
|
n.appendField(
|
|
5763
|
-
new ot(
|
|
5782
|
+
new ot(St, 20, 20, void 0, () => {
|
|
5764
5783
|
this.isInFlyout || this.addEntry_(n);
|
|
5765
5784
|
})
|
|
5766
|
-
), n.appendField(new
|
|
5785
|
+
), n.appendField(new ht("key"), "KEY" + e), n.appendField(
|
|
5767
5786
|
new ot(se, 20, 20, void 0, () => {
|
|
5768
5787
|
this.isInFlyout || this.removeEntry_(n);
|
|
5769
5788
|
})
|
|
@@ -5781,7 +5800,7 @@ const Sn = C.xml, Us = {
|
|
|
5781
5800
|
g.json_map_v1 = Us;
|
|
5782
5801
|
const Vs = {
|
|
5783
5802
|
init: function() {
|
|
5784
|
-
this.appendDummyInput().appendField(new
|
|
5803
|
+
this.appendDummyInput().appendField(new $e(0), "VALUE"), this.setOutput(!0, "JsonNumber"), this.setColour(230);
|
|
5785
5804
|
}
|
|
5786
5805
|
};
|
|
5787
5806
|
g.json_number_v1 = Vs;
|
|
@@ -5793,7 +5812,7 @@ const xs = {
|
|
|
5793
5812
|
g.json_root_v1 = xs;
|
|
5794
5813
|
const Ys = {
|
|
5795
5814
|
init: function() {
|
|
5796
|
-
this.appendDummyInput().appendField('"').appendField(new
|
|
5815
|
+
this.appendDummyInput().appendField('"').appendField(new ht(""), "VALUE").appendField('"'), this.setOutput(!0, "JsonString"), this.setColour(160);
|
|
5797
5816
|
}
|
|
5798
5817
|
};
|
|
5799
5818
|
g.json_string_v1 = Ys;
|
|
@@ -5809,10 +5828,10 @@ const Ks = {
|
|
|
5809
5828
|
}
|
|
5810
5829
|
};
|
|
5811
5830
|
g.list_create_item_v1 = Ks;
|
|
5812
|
-
const
|
|
5831
|
+
const Hs = {
|
|
5813
5832
|
init: function() {
|
|
5814
5833
|
this.itemCount_ = 0, this.setMutator(
|
|
5815
|
-
new
|
|
5834
|
+
new Tt.MutatorIcon(
|
|
5816
5835
|
["list_create_item_v1"],
|
|
5817
5836
|
this
|
|
5818
5837
|
)
|
|
@@ -5891,7 +5910,7 @@ const $s = {
|
|
|
5891
5910
|
this.removeInput("ADD" + t);
|
|
5892
5911
|
}
|
|
5893
5912
|
};
|
|
5894
|
-
g.list_create_v1 =
|
|
5913
|
+
g.list_create_v1 = Hs;
|
|
5895
5914
|
s.forBlock.list_create_v1 = function(t) {
|
|
5896
5915
|
const e = t, n = new Array(e.itemCount_);
|
|
5897
5916
|
for (let i = 0; i < e.itemCount_; i++)
|
|
@@ -6107,7 +6126,7 @@ s.forBlock.list_set_v1 = function(t) {
|
|
|
6107
6126
|
return `${e}[${n}] = ${o};
|
|
6108
6127
|
`;
|
|
6109
6128
|
};
|
|
6110
|
-
const
|
|
6129
|
+
const $s = {
|
|
6111
6130
|
// logic_compare
|
|
6112
6131
|
EQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_EQ}",
|
|
6113
6132
|
NEQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_NEQ}",
|
|
@@ -6121,7 +6140,7 @@ const Hs = {
|
|
|
6121
6140
|
};
|
|
6122
6141
|
B.register(
|
|
6123
6142
|
"logic_op_tooltip_v1",
|
|
6124
|
-
B.buildTooltipForDropdown("OP",
|
|
6143
|
+
B.buildTooltipForDropdown("OP", $s)
|
|
6125
6144
|
);
|
|
6126
6145
|
T([
|
|
6127
6146
|
{
|
|
@@ -6556,7 +6575,7 @@ const Xs = {
|
|
|
6556
6575
|
t.push({
|
|
6557
6576
|
enabled: !0,
|
|
6558
6577
|
text: f("VARIABLE_SET_CREATE_GET").replace("%1", o),
|
|
6559
|
-
callback:
|
|
6578
|
+
callback: Mn.callbackFactory(this, i)
|
|
6560
6579
|
});
|
|
6561
6580
|
}
|
|
6562
6581
|
}
|
|
@@ -7558,7 +7577,7 @@ g.object_create_item_v1 = ta;
|
|
|
7558
7577
|
const ea = {
|
|
7559
7578
|
init: function() {
|
|
7560
7579
|
this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(
|
|
7561
|
-
new
|
|
7580
|
+
new Tt.MutatorIcon(
|
|
7562
7581
|
["object_create_item_v1"],
|
|
7563
7582
|
this
|
|
7564
7583
|
)
|
|
@@ -7624,7 +7643,7 @@ const ea = {
|
|
|
7624
7643
|
},
|
|
7625
7644
|
updateShape_: function() {
|
|
7626
7645
|
for (let t = 0; t < this.itemCount_; t++)
|
|
7627
|
-
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setAlign(v.Align.RIGHT).appendField(new
|
|
7646
|
+
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setAlign(v.Align.RIGHT).appendField(new ht("key"), "KEY" + t);
|
|
7628
7647
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
7629
7648
|
this.removeInput("ADD" + t);
|
|
7630
7649
|
}
|
|
@@ -7871,15 +7890,15 @@ T([
|
|
|
7871
7890
|
s.forBlock.object_to_json_v1 = function(t) {
|
|
7872
7891
|
return [`__jsonStringifyV1__(${s.valueToCode(t, "OBJECT", r.NONE) || "null"})`, r.FUNCTION_CALL];
|
|
7873
7892
|
};
|
|
7874
|
-
const
|
|
7893
|
+
const Sn = C.xml, na = {
|
|
7875
7894
|
init: function() {
|
|
7876
|
-
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new
|
|
7895
|
+
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new Lo(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
7877
7896
|
}
|
|
7878
7897
|
};
|
|
7879
7898
|
g.procedure_def_container_v1 = na;
|
|
7880
7899
|
const oa = {
|
|
7881
7900
|
init: function() {
|
|
7882
|
-
const t = new
|
|
7901
|
+
const t = new ht(Ge.DEFAULT_ARG);
|
|
7883
7902
|
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;
|
|
7884
7903
|
},
|
|
7885
7904
|
validator_: function(t) {
|
|
@@ -7903,20 +7922,20 @@ g.procedure_def_item_v1 = oa;
|
|
|
7903
7922
|
const ia = {
|
|
7904
7923
|
init: function() {
|
|
7905
7924
|
this.withReturn = !1, this.args = [];
|
|
7906
|
-
const t = new
|
|
7925
|
+
const t = new ht(
|
|
7907
7926
|
Ge.findLegalName("", this)
|
|
7908
7927
|
);
|
|
7909
7928
|
t.setValidator(Ge.rename), t.setSpellcheck(!1), this.appendDummyInput("DUMMY").appendField(t, "NAME"), this.appendStatementInput("HANDLE"), this.setMutator(
|
|
7910
|
-
new
|
|
7929
|
+
new Tt.MutatorIcon(
|
|
7911
7930
|
["procedure_def_item_v1"],
|
|
7912
7931
|
this
|
|
7913
7932
|
)
|
|
7914
7933
|
), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_PROCEDURE_V1_DEF_TOOLTIP}"), this.setHelpUrl("%{BKY_PROCEDURE_V1_DEF_HELPURL}");
|
|
7915
7934
|
},
|
|
7916
7935
|
mutationToDom: function() {
|
|
7917
|
-
const t =
|
|
7936
|
+
const t = Sn.createElement("mutation");
|
|
7918
7937
|
return t.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), this.args.forEach((e) => {
|
|
7919
|
-
const n =
|
|
7938
|
+
const n = Sn.createElement("arg");
|
|
7920
7939
|
n.setAttribute("name", e.name), n.setAttribute("id", e.id), t.appendChild(n);
|
|
7921
7940
|
}), t;
|
|
7922
7941
|
},
|
|
@@ -7992,7 +8011,7 @@ const ia = {
|
|
|
7992
8011
|
o.setKeyName(`__param@${e.id}__`, e.name, !1);
|
|
7993
8012
|
else
|
|
7994
8013
|
try {
|
|
7995
|
-
I.disable(), o =
|
|
8014
|
+
I.disable(), o = an(
|
|
7996
8015
|
this.workspace,
|
|
7997
8016
|
`__param@${e.id}__`,
|
|
7998
8017
|
e.name,
|
|
@@ -8103,7 +8122,7 @@ ${n}
|
|
|
8103
8122
|
}
|
|
8104
8123
|
`;
|
|
8105
8124
|
};
|
|
8106
|
-
function
|
|
8125
|
+
function so(t) {
|
|
8107
8126
|
const e = E.resource.spaces.find((i) => i.id === t);
|
|
8108
8127
|
if (!e)
|
|
8109
8128
|
return [];
|
|
@@ -8121,11 +8140,11 @@ function ao(t) {
|
|
|
8121
8140
|
}
|
|
8122
8141
|
function ra(t) {
|
|
8123
8142
|
const e = [];
|
|
8124
|
-
return
|
|
8143
|
+
return so(t).forEach(({ id: o, name: i }) => {
|
|
8125
8144
|
e.push([i, o]);
|
|
8126
8145
|
}), k(e);
|
|
8127
8146
|
}
|
|
8128
|
-
function
|
|
8147
|
+
function ao(t, e) {
|
|
8129
8148
|
const n = E.resource.spaces.find((i) => i.id === t);
|
|
8130
8149
|
if (!n)
|
|
8131
8150
|
return [];
|
|
@@ -8136,11 +8155,11 @@ function co(t, e) {
|
|
|
8136
8155
|
}
|
|
8137
8156
|
function ua(t, e) {
|
|
8138
8157
|
const n = [];
|
|
8139
|
-
return
|
|
8158
|
+
return ao(t, e).forEach(({ id: i, name: a }) => {
|
|
8140
8159
|
n.push([a, i]);
|
|
8141
8160
|
}), k(n);
|
|
8142
8161
|
}
|
|
8143
|
-
function
|
|
8162
|
+
function co() {
|
|
8144
8163
|
const t = [];
|
|
8145
8164
|
return E.resource.spaces.forEach((e) => {
|
|
8146
8165
|
e.resources.length > 0 && t.push(e);
|
|
@@ -8148,7 +8167,7 @@ function ro() {
|
|
|
8148
8167
|
}
|
|
8149
8168
|
function la() {
|
|
8150
8169
|
const t = [];
|
|
8151
|
-
return
|
|
8170
|
+
return co().forEach(({ id: n, name: o }) => {
|
|
8152
8171
|
t.push([o, n]);
|
|
8153
8172
|
}), k(t);
|
|
8154
8173
|
}
|
|
@@ -8174,19 +8193,19 @@ const _a = {
|
|
|
8174
8193
|
initData_: function() {
|
|
8175
8194
|
if (this.space.id)
|
|
8176
8195
|
return;
|
|
8177
|
-
const t =
|
|
8196
|
+
const t = co()?.[0];
|
|
8178
8197
|
if (!t)
|
|
8179
8198
|
return;
|
|
8180
8199
|
this.space.id = t.id, this.space.name = t.name;
|
|
8181
8200
|
const e = this.getField("SPACE");
|
|
8182
8201
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
8183
|
-
const n =
|
|
8202
|
+
const n = so(this.space.id)?.[0];
|
|
8184
8203
|
if (!n)
|
|
8185
8204
|
return;
|
|
8186
8205
|
this.dir.id = n.id, this.dir.name = n.name;
|
|
8187
8206
|
const o = this.getField("DIR");
|
|
8188
8207
|
o.getOptions(!1), o.setValue(this.dir.id);
|
|
8189
|
-
const i =
|
|
8208
|
+
const i = ao(this.space.id, this.dir.id)?.[0];
|
|
8190
8209
|
if (!i)
|
|
8191
8210
|
return;
|
|
8192
8211
|
this.resource.id = i.id, this.resource.name = i.name;
|
|
@@ -8562,7 +8581,7 @@ const ha = C.xml, fa = {
|
|
|
8562
8581
|
this.removeInput("ADD" + t);
|
|
8563
8582
|
}
|
|
8564
8583
|
}, ma = function() {
|
|
8565
|
-
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new
|
|
8584
|
+
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new Tt.MutatorIcon(["text_join_item_v1"], this));
|
|
8566
8585
|
};
|
|
8567
8586
|
B.registerMutator(
|
|
8568
8587
|
"text_join_mutator_v1",
|
|
@@ -8879,19 +8898,19 @@ const Ea = {
|
|
|
8879
8898
|
t.push({
|
|
8880
8899
|
enabled: this.workspace.remainingCapacity() > 0,
|
|
8881
8900
|
text: n.replace("%1", o.getText()),
|
|
8882
|
-
callback:
|
|
8901
|
+
callback: Mn.callbackFactory(this, i)
|
|
8883
8902
|
});
|
|
8884
8903
|
}
|
|
8885
8904
|
}
|
|
8886
8905
|
}, ga = function(t) {
|
|
8887
8906
|
return function() {
|
|
8888
8907
|
const e = t.workspace, o = t.getField("VAR").getVariable();
|
|
8889
|
-
|
|
8908
|
+
Nt.renameVariable(e, o);
|
|
8890
8909
|
};
|
|
8891
8910
|
}, Aa = function(t) {
|
|
8892
8911
|
return function() {
|
|
8893
8912
|
const n = t.getField("VAR").getVariable();
|
|
8894
|
-
n &&
|
|
8913
|
+
n && Nt.deleteVariable(n.getWorkspace(), n, t);
|
|
8895
8914
|
};
|
|
8896
8915
|
};
|
|
8897
8916
|
B.registerMixin(
|
|
@@ -8952,15 +8971,15 @@ s.forBlock.variable_set_v1 = function(t) {
|
|
|
8952
8971
|
return `${e} = ${n};
|
|
8953
8972
|
`;
|
|
8954
8973
|
};
|
|
8955
|
-
|
|
8956
|
-
const n = await
|
|
8974
|
+
Un.setConfirm(async (t, e) => {
|
|
8975
|
+
const n = await Go({
|
|
8957
8976
|
title: "",
|
|
8958
8977
|
text: t
|
|
8959
8978
|
});
|
|
8960
8979
|
e(!!n);
|
|
8961
8980
|
});
|
|
8962
|
-
|
|
8963
|
-
const o = await
|
|
8981
|
+
Un.setPrompt(async (t, e, n) => {
|
|
8982
|
+
const o = await Wo({
|
|
8964
8983
|
title: "",
|
|
8965
8984
|
value: e
|
|
8966
8985
|
});
|
|
@@ -8978,7 +8997,7 @@ const Oa = Qt.getText_;
|
|
|
8978
8997
|
Qt.getText_ = function() {
|
|
8979
8998
|
if (this.selectedOption)
|
|
8980
8999
|
return Oa.call(this);
|
|
8981
|
-
const { i18n: t } =
|
|
9000
|
+
const { i18n: t } = vt, e = this.getSourceBlock();
|
|
8982
9001
|
if (this.name === "APP")
|
|
8983
9002
|
return e.app.name;
|
|
8984
9003
|
if (this.name === "PAGE")
|
|
@@ -8986,14 +9005,14 @@ Qt.getText_ = function() {
|
|
|
8986
9005
|
if (this.name === "ELEMENT")
|
|
8987
9006
|
return e.element.name;
|
|
8988
9007
|
if (this.name === "NODE") {
|
|
8989
|
-
const n =
|
|
9008
|
+
const n = tt[e.node.key];
|
|
8990
9009
|
if (n) {
|
|
8991
9010
|
const o = t.global.t(n.name), i = e.node.alias;
|
|
8992
9011
|
return `${o} / ${i}`;
|
|
8993
9012
|
}
|
|
8994
9013
|
} else if (this.name === "PROPERTY") {
|
|
8995
9014
|
const { kind: n, names: o } = e.property;
|
|
8996
|
-
return
|
|
9015
|
+
return wn(n, o);
|
|
8997
9016
|
} else if (this.name === "EVENT") {
|
|
8998
9017
|
const { kind: n, names: o } = e.event;
|
|
8999
9018
|
return console.log(e.event), Oe(n, o);
|
|
@@ -9018,8 +9037,8 @@ Qt.getText_ = function() {
|
|
|
9018
9037
|
}
|
|
9019
9038
|
return "<n/a>";
|
|
9020
9039
|
};
|
|
9021
|
-
const
|
|
9022
|
-
|
|
9040
|
+
const Bn = 60;
|
|
9041
|
+
So.prototype.cleanUp = function() {
|
|
9023
9042
|
this.setResizesEnabled(!1);
|
|
9024
9043
|
const t = I.getGroup();
|
|
9025
9044
|
t || I.setGroup(!0);
|
|
@@ -9037,31 +9056,31 @@ Bo.prototype.cleanUp = function() {
|
|
|
9037
9056
|
u.moveBy(-l.left, c - l.top, ["cleanup"]), u.snapToGrid(), l = u.getBoundingRectangle();
|
|
9038
9057
|
let _ = a(l);
|
|
9039
9058
|
for (; _ != null; )
|
|
9040
|
-
c = _.top + _.getHeight() +
|
|
9041
|
-
c = u.getRelativeToSurfaceXY().y + u.getHeightWidth().height +
|
|
9059
|
+
c = _.top + _.getHeight() + Bn, u.moveBy(0, c - l.top, ["cleanup"]), u.snapToGrid(), l = u.getBoundingRectangle(), _ = a(l);
|
|
9060
|
+
c = u.getRelativeToSurfaceXY().y + u.getHeightWidth().height + Bn;
|
|
9042
9061
|
}
|
|
9043
9062
|
I.setGroup(t), this.setResizesEnabled(!0);
|
|
9044
9063
|
};
|
|
9045
|
-
function
|
|
9064
|
+
function ro(t) {
|
|
9046
9065
|
const e = t.getParent();
|
|
9047
|
-
return e &&
|
|
9066
|
+
return e && ro(e) ? !0 : !e && !!(t.outputConnection || t.previousConnection);
|
|
9048
9067
|
}
|
|
9049
9068
|
class ya {
|
|
9050
9069
|
init() {
|
|
9051
|
-
const e =
|
|
9070
|
+
const e = Bo.registry.getItem("blockDisable");
|
|
9052
9071
|
e && (e.preconditionFn = function(n) {
|
|
9053
9072
|
const o = n.block;
|
|
9054
|
-
return o && !o.isInFlyout && o.workspace.options.disable && o.isEditable() ? o.getInheritedDisabled() ||
|
|
9073
|
+
return o && !o.isInFlyout && o.workspace.options.disable && o.isEditable() ? o.getInheritedDisabled() || ro(o) ? "disabled" : "enabled" : "hidden";
|
|
9055
9074
|
});
|
|
9056
9075
|
}
|
|
9057
9076
|
}
|
|
9058
|
-
|
|
9059
|
-
|
|
9060
|
-
const va = new
|
|
9077
|
+
bo.registerFieldColour();
|
|
9078
|
+
Po.registry.unregister(Ro.names.ESCAPE);
|
|
9079
|
+
const va = new Do.CrossTabCopyPaste();
|
|
9061
9080
|
va.init({ contextMenu: !0, shortcut: !0 });
|
|
9062
9081
|
const Ca = new ya();
|
|
9063
9082
|
Ca.init();
|
|
9064
|
-
function
|
|
9083
|
+
function un(t) {
|
|
9065
9084
|
const e = Wt();
|
|
9066
9085
|
if (!e)
|
|
9067
9086
|
return;
|
|
@@ -9074,12 +9093,12 @@ function ln(t) {
|
|
|
9074
9093
|
const i = o.getRelativeToSurfaceXY(), a = i.x * e.scale, c = i.y * e.scale;
|
|
9075
9094
|
e.scroll(-a, -c);
|
|
9076
9095
|
}
|
|
9077
|
-
function
|
|
9096
|
+
function uo() {
|
|
9078
9097
|
const t = Wt();
|
|
9079
9098
|
if (!t)
|
|
9080
9099
|
return;
|
|
9081
9100
|
const e = t.getTopBlocks(!0)?.[0];
|
|
9082
|
-
e &&
|
|
9101
|
+
e && un(e.id);
|
|
9083
9102
|
}
|
|
9084
9103
|
Ae.Classic.blockStyles = {
|
|
9085
9104
|
color_blocks: {
|
|
@@ -9232,7 +9251,7 @@ Ae.Classic.categoryStyles = {
|
|
|
9232
9251
|
colour: "#a55b80"
|
|
9233
9252
|
}
|
|
9234
9253
|
};
|
|
9235
|
-
const ka =
|
|
9254
|
+
const ka = Vn.defineTheme("light", {
|
|
9236
9255
|
name: "light",
|
|
9237
9256
|
base: Ae.Classic,
|
|
9238
9257
|
componentStyles: {
|
|
@@ -9248,7 +9267,7 @@ const ka = xn.defineTheme("light", {
|
|
|
9248
9267
|
scrollbarOpacity: 0.4,
|
|
9249
9268
|
cursorColour: ""
|
|
9250
9269
|
}
|
|
9251
|
-
}), Na =
|
|
9270
|
+
}), Na = Vn.defineTheme("dark", {
|
|
9252
9271
|
name: "dark",
|
|
9253
9272
|
base: Ae.Classic,
|
|
9254
9273
|
componentStyles: {
|
|
@@ -9295,13 +9314,13 @@ function Ba(t) {
|
|
|
9295
9314
|
const o = n;
|
|
9296
9315
|
ut(
|
|
9297
9316
|
e,
|
|
9298
|
-
|
|
9317
|
+
Ot({
|
|
9299
9318
|
type: "elementProperty",
|
|
9300
9319
|
nodeId: o.node.id,
|
|
9301
9320
|
propertyKeys: o.property.key
|
|
9302
9321
|
})
|
|
9303
9322
|
);
|
|
9304
|
-
} else n.type === "get_app_state_v1" ? ut(e,
|
|
9323
|
+
} else n.type === "get_app_state_v1" ? ut(e, Ot({ type: "state", stateId: n.state.id })) : console.assert(!1);
|
|
9305
9324
|
return e;
|
|
9306
9325
|
}
|
|
9307
9326
|
function ba(t) {
|
|
@@ -9331,12 +9350,12 @@ function Pa(t) {
|
|
|
9331
9350
|
} : (i.property.kind === "elementSlotProperty" || i.property.kind === "customSlotProperty") && (a = {
|
|
9332
9351
|
type: "adaptSlotProperty",
|
|
9333
9352
|
propertyId: i.property.key
|
|
9334
|
-
}), !a || !ut(n,
|
|
9353
|
+
}), !a || !ut(n, Ot(a)))
|
|
9335
9354
|
continue;
|
|
9336
9355
|
e.push(a);
|
|
9337
9356
|
} else if (o.type === "get_app_state_v1") {
|
|
9338
9357
|
const a = { type: "state", stateId: o.state.id };
|
|
9339
|
-
if (!ut(n,
|
|
9358
|
+
if (!ut(n, Ot(a)))
|
|
9340
9359
|
continue;
|
|
9341
9360
|
e.push(a);
|
|
9342
9361
|
} else if (o.type === "object_get_v1") {
|
|
@@ -9361,7 +9380,7 @@ function Pa(t) {
|
|
|
9361
9380
|
type: "adaptSlotProperty",
|
|
9362
9381
|
propertyId: c.property.key,
|
|
9363
9382
|
subKeys: a
|
|
9364
|
-
}), !u || !ut(n,
|
|
9383
|
+
}), !u || !ut(n, Ot(u)))
|
|
9365
9384
|
continue;
|
|
9366
9385
|
e.push(u);
|
|
9367
9386
|
} else if (i.type === "get_app_state_v1") {
|
|
@@ -9370,7 +9389,7 @@ function Pa(t) {
|
|
|
9370
9389
|
stateId: i.state.id,
|
|
9371
9390
|
subKeys: a
|
|
9372
9391
|
};
|
|
9373
|
-
if (!ut(n,
|
|
9392
|
+
if (!ut(n, Ot(u)))
|
|
9374
9393
|
continue;
|
|
9375
9394
|
e.push(u);
|
|
9376
9395
|
} else
|
|
@@ -9398,18 +9417,18 @@ function Ra(t) {
|
|
|
9398
9417
|
const i = ba(o), a = Pa(i);
|
|
9399
9418
|
e.bind.sets[o.id] = a;
|
|
9400
9419
|
for (const c of a) {
|
|
9401
|
-
const u =
|
|
9420
|
+
const u = Ot(c);
|
|
9402
9421
|
e.bind.triggers[u] || (e.bind.triggers[u] = []), ut(e.bind.triggers[u], o.id);
|
|
9403
9422
|
}
|
|
9404
9423
|
}
|
|
9405
9424
|
return e;
|
|
9406
9425
|
}
|
|
9407
|
-
const
|
|
9426
|
+
const lo = Symbol();
|
|
9408
9427
|
function Da(t) {
|
|
9409
|
-
qo(
|
|
9428
|
+
qo(lo, t);
|
|
9410
9429
|
}
|
|
9411
|
-
function
|
|
9412
|
-
return Qo(
|
|
9430
|
+
function ln() {
|
|
9431
|
+
return Qo(lo);
|
|
9413
9432
|
}
|
|
9414
9433
|
const Ma = /* @__PURE__ */ ct({
|
|
9415
9434
|
__name: "index",
|
|
@@ -9417,13 +9436,13 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9417
9436
|
lock: { type: Boolean }
|
|
9418
9437
|
},
|
|
9419
9438
|
setup(t, { expose: e }) {
|
|
9420
|
-
const { t: n } = Xt(), o = t, i =
|
|
9439
|
+
const { t: n } = Xt(), o = t, i = ln(), a = () => {
|
|
9421
9440
|
if (!i.workspace) {
|
|
9422
9441
|
console.assert(!1);
|
|
9423
9442
|
return;
|
|
9424
9443
|
}
|
|
9425
9444
|
if (o.lock) {
|
|
9426
|
-
|
|
9445
|
+
Yn(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
9427
9446
|
return;
|
|
9428
9447
|
}
|
|
9429
9448
|
i.workspace.cleanUp();
|
|
@@ -9436,7 +9455,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9436
9455
|
text: R(n)("x-block-lib.tip.hotkeyCtrlQ")
|
|
9437
9456
|
}, {
|
|
9438
9457
|
activator: at(({ props: h }) => [
|
|
9439
|
-
L(_,
|
|
9458
|
+
L(_, sn(h, {
|
|
9440
9459
|
density: "comfortable",
|
|
9441
9460
|
icon: "mdi-broom",
|
|
9442
9461
|
variant: "outlined",
|
|
@@ -9462,7 +9481,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9462
9481
|
text: R(e)("x-block-lib.tip.hotkeyCtrlW")
|
|
9463
9482
|
}, {
|
|
9464
9483
|
activator: at(({ props: u }) => [
|
|
9465
|
-
L(a,
|
|
9484
|
+
L(a, sn(u, {
|
|
9466
9485
|
density: "comfortable",
|
|
9467
9486
|
icon: n.value ? "mdi-lock" : "mdi-lock-open",
|
|
9468
9487
|
variant: "outlined",
|
|
@@ -9487,7 +9506,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9487
9506
|
},
|
|
9488
9507
|
emits: ["x-click"],
|
|
9489
9508
|
setup(t, { emit: e }) {
|
|
9490
|
-
const { primaryColor: n, backgroundColor2: o, highlightColor: i } = jt(), a = t, c = e, u =
|
|
9509
|
+
const { primaryColor: n, backgroundColor2: o, highlightColor: i } = jt(), a = t, c = e, u = Lt(!1), l = F(() => ({
|
|
9491
9510
|
position: "relative",
|
|
9492
9511
|
background: u.value ? i.value : o.value,
|
|
9493
9512
|
width: "100%",
|
|
@@ -9506,16 +9525,16 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9506
9525
|
}));
|
|
9507
9526
|
return (d, h) => {
|
|
9508
9527
|
const p = D("v-spacer"), m = D("v-icon"), A = zo("ripple");
|
|
9509
|
-
return Zo((S(),
|
|
9528
|
+
return Zo((S(), Z("div", {
|
|
9510
9529
|
class: "d-flex align-center cursor-pointer",
|
|
9511
|
-
style:
|
|
9530
|
+
style: W(l.value),
|
|
9512
9531
|
onClick: h[1] || (h[1] = (P) => c("x-click", a.id)),
|
|
9513
9532
|
onMouseout: h[2] || (h[2] = (P) => u.value = !1),
|
|
9514
9533
|
onMouseover: h[3] || (h[3] = (P) => u.value = !0)
|
|
9515
9534
|
}, [
|
|
9516
9535
|
w("div", Va, [
|
|
9517
|
-
w("span", xa,
|
|
9518
|
-
a.desc ? (S(),
|
|
9536
|
+
w("span", xa, Ht(a.title), 1),
|
|
9537
|
+
a.desc ? (S(), Z("span", Ya, Ht(a.desc), 1)) : rt("", !0)
|
|
9519
9538
|
]),
|
|
9520
9539
|
L(p),
|
|
9521
9540
|
L(m, {
|
|
@@ -9525,7 +9544,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9525
9544
|
}, ["stop"]))
|
|
9526
9545
|
}),
|
|
9527
9546
|
w("div", {
|
|
9528
|
-
style:
|
|
9547
|
+
style: W(_.value)
|
|
9529
9548
|
}, null, 4)
|
|
9530
9549
|
], 36)), [
|
|
9531
9550
|
[A]
|
|
@@ -9545,7 +9564,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9545
9564
|
}),
|
|
9546
9565
|
emits: ["update:modelValue"],
|
|
9547
9566
|
setup(t, { expose: e }) {
|
|
9548
|
-
const { t: n } = Xt(), o = Kt(t, "modelValue"), i =
|
|
9567
|
+
const { t: n } = Xt(), o = Kt(t, "modelValue"), i = ln(), a = Lt([]);
|
|
9549
9568
|
e({ update: () => {
|
|
9550
9569
|
if (!i.workspace) {
|
|
9551
9570
|
console.assert(!1);
|
|
@@ -9553,17 +9572,17 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9553
9572
|
}
|
|
9554
9573
|
const p = [];
|
|
9555
9574
|
i.workspace.getTopBlocks(!0).forEach((A) => {
|
|
9556
|
-
const P = A.id ===
|
|
9575
|
+
const P = A.id === Uo()?.id;
|
|
9557
9576
|
let U = "";
|
|
9558
9577
|
if (A.type.startsWith("on_app_event_v")) {
|
|
9559
|
-
const
|
|
9560
|
-
|
|
9578
|
+
const nt = A, Ct = tt[nt.node.key];
|
|
9579
|
+
Ct && (U = n(Ct.name), nt.node.alias && (U += " / " + nt.node.alias), U += " - " + Oe(nt.event.kind, nt.event.names));
|
|
9561
9580
|
} 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");
|
|
9562
|
-
const
|
|
9581
|
+
const At = A.getCommentText() ?? "";
|
|
9563
9582
|
p.push({
|
|
9564
9583
|
id: A.id,
|
|
9565
9584
|
name: U,
|
|
9566
|
-
desc:
|
|
9585
|
+
desc: At,
|
|
9567
9586
|
select: P
|
|
9568
9587
|
});
|
|
9569
9588
|
}), a.value = p;
|
|
@@ -9571,7 +9590,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9571
9590
|
let u = [];
|
|
9572
9591
|
const l = () => {
|
|
9573
9592
|
if (t.lock) {
|
|
9574
|
-
|
|
9593
|
+
Yn(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
9575
9594
|
return;
|
|
9576
9595
|
}
|
|
9577
9596
|
const p = [];
|
|
@@ -9602,17 +9621,17 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9602
9621
|
P !== "" && (U = i.workspace.getBlockById(
|
|
9603
9622
|
P
|
|
9604
9623
|
).getRelativeToSurfaceXY().y + 10);
|
|
9605
|
-
const
|
|
9606
|
-
A.moveTo(new C.Coordinate(
|
|
9624
|
+
const At = A.getRelativeToSurfaceXY();
|
|
9625
|
+
A.moveTo(new C.Coordinate(At.x, U)), i.workspace.cleanUp(), uo();
|
|
9607
9626
|
}, h = async (p) => {
|
|
9608
9627
|
if (!i.workspace) {
|
|
9609
9628
|
console.assert(!1);
|
|
9610
9629
|
return;
|
|
9611
9630
|
}
|
|
9612
9631
|
const m = i.workspace.getBlockById(p);
|
|
9613
|
-
|
|
9632
|
+
xn.setSelected(m), un(p), o.value = !1;
|
|
9614
9633
|
};
|
|
9615
|
-
return (p, m) => a.value.length > 0 ? (S(), st(R(
|
|
9634
|
+
return (p, m) => a.value.length > 0 ? (S(), st(R(Mo), {
|
|
9616
9635
|
key: 0,
|
|
9617
9636
|
modelValue: a.value,
|
|
9618
9637
|
"onUpdate:modelValue": m[0] || (m[0] = (A) => a.value = A),
|
|
@@ -9624,7 +9643,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9624
9643
|
onStart: l
|
|
9625
9644
|
}, {
|
|
9626
9645
|
default: at(() => [
|
|
9627
|
-
(S(!0),
|
|
9646
|
+
(S(!0), Z(Hn, null, ti(a.value, (A) => (S(), st(Fa, {
|
|
9628
9647
|
id: A.id,
|
|
9629
9648
|
key: A.id,
|
|
9630
9649
|
desc: A.desc,
|
|
@@ -9634,14 +9653,14 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9634
9653
|
}, null, 8, ["id", "desc", "select", "title"]))), 128))
|
|
9635
9654
|
]),
|
|
9636
9655
|
_: 1
|
|
9637
|
-
}, 8, ["modelValue"])) : (S(),
|
|
9656
|
+
}, 8, ["modelValue"])) : (S(), Z("span", wa, Ht(R(n)("x-block-lib.noOption")), 1));
|
|
9638
9657
|
}
|
|
9639
|
-
}),
|
|
9658
|
+
}), Ha = (t, e) => {
|
|
9640
9659
|
const n = t.__vccOpts || t;
|
|
9641
9660
|
for (const [o, i] of e)
|
|
9642
9661
|
n[o] = i;
|
|
9643
9662
|
return n;
|
|
9644
|
-
},
|
|
9663
|
+
}, $a = /* @__PURE__ */ Ha(Ka, [["__scopeId", "data-v-6cb62cd6"]]), Ga = /* @__PURE__ */ ct({
|
|
9645
9664
|
__name: "index",
|
|
9646
9665
|
props: {
|
|
9647
9666
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -9649,7 +9668,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9649
9668
|
},
|
|
9650
9669
|
emits: ["update:modelValue"],
|
|
9651
9670
|
setup(t, { expose: e }) {
|
|
9652
|
-
const n = Kt(t, "modelValue"), o =
|
|
9671
|
+
const n = Kt(t, "modelValue"), o = ln();
|
|
9653
9672
|
e({ update: () => {
|
|
9654
9673
|
if (!o.workspace) {
|
|
9655
9674
|
console.assert(!1);
|
|
@@ -9663,9 +9682,9 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9663
9682
|
return;
|
|
9664
9683
|
}
|
|
9665
9684
|
const l = u.getBlockById(c);
|
|
9666
|
-
|
|
9685
|
+
xn.setSelected(l), un(c), n.value = !1;
|
|
9667
9686
|
};
|
|
9668
|
-
return (c, u) => (S(),
|
|
9687
|
+
return (c, u) => (S(), Z("div", {
|
|
9669
9688
|
onClick: u[0] || (u[0] = (l) => a(""))
|
|
9670
9689
|
}, "blockTree"));
|
|
9671
9690
|
}
|
|
@@ -9676,7 +9695,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9676
9695
|
lock: { type: Boolean }
|
|
9677
9696
|
},
|
|
9678
9697
|
setup(t, { expose: e }) {
|
|
9679
|
-
const { t: n } = Xt(), o = ii(), { sysBarAvail: i } =
|
|
9698
|
+
const { t: n } = Xt(), o = ii(), { sysBarAvail: i } = Fn(), { backgroundColor1: a } = jt(), c = F(() => {
|
|
9680
9699
|
let m = "100%";
|
|
9681
9700
|
return o.mdAndUp.value && (m = "400px"), {
|
|
9682
9701
|
background: a.value,
|
|
@@ -9699,27 +9718,27 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9699
9718
|
return e({ open: _, update: () => {
|
|
9700
9719
|
t.type === "list" ? d.value?.update() : t.type === "tree" && h.value?.update();
|
|
9701
9720
|
} }), (m, A) => {
|
|
9702
|
-
const P = D("v-sheet"), U = D("v-btn"),
|
|
9703
|
-
return S(),
|
|
9704
|
-
L(
|
|
9721
|
+
const P = D("v-sheet"), U = D("v-btn"), At = D("v-spacer"), nt = D("v-dialog"), Ct = D("v-tooltip");
|
|
9722
|
+
return S(), Z(Hn, null, [
|
|
9723
|
+
L(nt, {
|
|
9705
9724
|
modelValue: R(_),
|
|
9706
|
-
"onUpdate:modelValue": A[5] || (A[5] = (
|
|
9725
|
+
"onUpdate:modelValue": A[5] || (A[5] = (G) => ne(_) ? _.value = G : null),
|
|
9707
9726
|
eager: "",
|
|
9708
9727
|
fullscreen: "",
|
|
9709
9728
|
"no-click-animation": "",
|
|
9710
9729
|
persistent: "",
|
|
9711
9730
|
transition: "scroll-x-reverse-transition",
|
|
9712
|
-
onKeydown: A[6] || (A[6] =
|
|
9731
|
+
onKeydown: A[6] || (A[6] = $n(Ft((G) => _.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
9713
9732
|
}, {
|
|
9714
9733
|
default: at(() => [
|
|
9715
9734
|
w("div", {
|
|
9716
9735
|
class: "w-100 h-100 d-flex flex-row-reverse",
|
|
9717
|
-
onClick: A[3] || (A[3] = Ft((
|
|
9718
|
-
onContextmenu: A[4] || (A[4] = Ft((
|
|
9736
|
+
onClick: A[3] || (A[3] = Ft((G) => _.value = !1, ["self"])),
|
|
9737
|
+
onContextmenu: A[4] || (A[4] = Ft((G) => _.value = !1, ["self", "prevent"]))
|
|
9719
9738
|
}, [
|
|
9720
9739
|
w("div", {
|
|
9721
9740
|
class: "elevation-2",
|
|
9722
|
-
style:
|
|
9741
|
+
style: W(c.value)
|
|
9723
9742
|
}, [
|
|
9724
9743
|
R(i) ? (S(), st(P, {
|
|
9725
9744
|
key: 0,
|
|
@@ -9736,33 +9755,33 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9736
9755
|
density: "comfortable",
|
|
9737
9756
|
icon: "mdi-close",
|
|
9738
9757
|
variant: "text",
|
|
9739
|
-
onClick: A[0] || (A[0] = (
|
|
9758
|
+
onClick: A[0] || (A[0] = (G) => _.value = !1)
|
|
9740
9759
|
}),
|
|
9741
|
-
w("span", Wa,
|
|
9742
|
-
L(
|
|
9760
|
+
w("span", Wa, Ht(R(n)("x-block-lib.navigator")), 1),
|
|
9761
|
+
L(At)
|
|
9743
9762
|
]),
|
|
9744
9763
|
_: 1
|
|
9745
9764
|
}),
|
|
9746
9765
|
w("div", {
|
|
9747
9766
|
class: "overflow-y-auto",
|
|
9748
|
-
style:
|
|
9767
|
+
style: W(u.value)
|
|
9749
9768
|
}, [
|
|
9750
|
-
t.type === "list" ? (S(), st(
|
|
9769
|
+
t.type === "list" ? (S(), st($a, {
|
|
9751
9770
|
key: 0,
|
|
9752
9771
|
ref_key: "blockList",
|
|
9753
9772
|
ref: d,
|
|
9754
9773
|
modelValue: R(_),
|
|
9755
|
-
"onUpdate:modelValue": A[1] || (A[1] = (
|
|
9774
|
+
"onUpdate:modelValue": A[1] || (A[1] = (G) => ne(_) ? _.value = G : null),
|
|
9756
9775
|
lock: t.lock
|
|
9757
9776
|
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (S(), st(Ga, {
|
|
9758
9777
|
key: 1,
|
|
9759
9778
|
ref_key: "blockTree",
|
|
9760
9779
|
ref: h,
|
|
9761
9780
|
modelValue: R(_),
|
|
9762
|
-
"onUpdate:modelValue": A[2] || (A[2] = (
|
|
9781
|
+
"onUpdate:modelValue": A[2] || (A[2] = (G) => ne(_) ? _.value = G : null)
|
|
9763
9782
|
}, null, 8, ["modelValue"])) : rt("", !0),
|
|
9764
9783
|
w("div", {
|
|
9765
|
-
style:
|
|
9784
|
+
style: W(l.value)
|
|
9766
9785
|
}, null, 4)
|
|
9767
9786
|
], 4)
|
|
9768
9787
|
], 4)
|
|
@@ -9770,15 +9789,15 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9770
9789
|
]),
|
|
9771
9790
|
_: 1
|
|
9772
9791
|
}, 8, ["modelValue"]),
|
|
9773
|
-
L(
|
|
9792
|
+
L(Ct, {
|
|
9774
9793
|
text: R(n)("x-block-lib.tip.hotkeyCtrlE")
|
|
9775
9794
|
}, {
|
|
9776
|
-
activator: at(({ props:
|
|
9777
|
-
L(U,
|
|
9795
|
+
activator: at(({ props: G }) => [
|
|
9796
|
+
L(U, sn(G, {
|
|
9778
9797
|
density: "comfortable",
|
|
9779
9798
|
icon: "mdi-navigation-variant",
|
|
9780
9799
|
variant: "outlined",
|
|
9781
|
-
onClick: A[7] || (A[7] = (
|
|
9800
|
+
onClick: A[7] || (A[7] = (_n) => _.value = !0)
|
|
9782
9801
|
}), null, 16)
|
|
9783
9802
|
]),
|
|
9784
9803
|
_: 1
|
|
@@ -9798,13 +9817,13 @@ function y(t, e) {
|
|
|
9798
9817
|
n.appendChild(o);
|
|
9799
9818
|
return n;
|
|
9800
9819
|
}
|
|
9801
|
-
function
|
|
9820
|
+
function _o(t) {
|
|
9802
9821
|
const e = x.createElement("mutation");
|
|
9803
9822
|
for (const { key: n, value: o } of t)
|
|
9804
9823
|
e.setAttribute(n, o);
|
|
9805
9824
|
return e;
|
|
9806
9825
|
}
|
|
9807
|
-
function
|
|
9826
|
+
function bt(t, e) {
|
|
9808
9827
|
e === void 0 && (e = "");
|
|
9809
9828
|
const n = x.createElement("value");
|
|
9810
9829
|
n.setAttribute("name", t);
|
|
@@ -9815,7 +9834,7 @@ function Bt(t, e) {
|
|
|
9815
9834
|
const a = x.createTextNode(e);
|
|
9816
9835
|
return i.appendChild(a), o.appendChild(i), n.appendChild(o), n;
|
|
9817
9836
|
}
|
|
9818
|
-
function
|
|
9837
|
+
function bn(t, e) {
|
|
9819
9838
|
e === void 0 && (e = 0);
|
|
9820
9839
|
const n = x.createElement("value");
|
|
9821
9840
|
n.setAttribute("name", t);
|
|
@@ -9843,16 +9862,16 @@ function Ja() {
|
|
|
9843
9862
|
function qa() {
|
|
9844
9863
|
return E.app.activeObject.type === "comp" && E.app.activeComp.meta.states.length > 0;
|
|
9845
9864
|
}
|
|
9846
|
-
function
|
|
9865
|
+
function Pn() {
|
|
9847
9866
|
return E.app.activeObject.type === "comp" && E.app.activeComp.meta.methods.length > 0;
|
|
9848
9867
|
}
|
|
9849
9868
|
function Qa() {
|
|
9850
9869
|
const t = [];
|
|
9851
|
-
return t.push(V(f("LABEL_EVENT"))),
|
|
9852
|
-
y("app_bind_v1", [
|
|
9853
|
-
), t.push(y("watch_effect_v1")), (
|
|
9870
|
+
return t.push(V(f("LABEL_EVENT"))), j("onEvent") && t.push(y("on_app_event_v1")), Ja() && t.push(y("trigger_app_event_v1")), t.push(
|
|
9871
|
+
y("app_bind_v1", [_o([{ key: "items", value: "2" }])])
|
|
9872
|
+
), t.push(y("watch_effect_v1")), (j("getProperty") || j("setProperty")) && t.push(V(f("LABEL_PROPERTY"))), j("getProperty") && t.push(y("get_app_property_v1")), j("setProperty") && t.push(y("set_app_property_v1")), qa() && (t.push(V(f("LABEL_STATE"))), t.push(y("get_app_state_v1")), t.push(y("set_app_state_v1"))), (j("callMethod") || Pn()) && t.push(V(f("LABEL_METHOD"))), j("callMethod") && t.push(y("call_app_method_v1")), Pn() && (t.push(y("impl_app_method_v1")), t.push(y("set_app_method_output_v1")), t.push(y("procedure_return_v1"))), t;
|
|
9854
9873
|
}
|
|
9855
|
-
const
|
|
9874
|
+
const po = { name: "APP_COMP_CATEGORY", callback: Qa };
|
|
9856
9875
|
function za() {
|
|
9857
9876
|
const t = [];
|
|
9858
9877
|
return t.push(V(f("LABEL_FUNC"))), t.push(V(f("LABEL_FLOW"))), t;
|
|
@@ -9860,7 +9879,7 @@ function za() {
|
|
|
9860
9879
|
const pe = { name: "APP_COMPUTE_CATEGORY", callback: za };
|
|
9861
9880
|
function Za() {
|
|
9862
9881
|
const t = [];
|
|
9863
|
-
return t.push(y("app_debug_trace_v1", [
|
|
9882
|
+
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;
|
|
9864
9883
|
}
|
|
9865
9884
|
const de = { name: "APP_MESSAGE_CATEGORY", callback: Za };
|
|
9866
9885
|
function tc() {
|
|
@@ -9882,11 +9901,11 @@ function oc() {
|
|
|
9882
9901
|
}
|
|
9883
9902
|
function ic() {
|
|
9884
9903
|
const t = [];
|
|
9885
|
-
return t.push(V(f("LABEL_EVENT"))),
|
|
9886
|
-
y("app_bind_v1", [
|
|
9887
|
-
), t.push(y("watch_effect_v1")), (
|
|
9904
|
+
return t.push(V(f("LABEL_EVENT"))), j("onEvent") && t.push(y("on_app_event_v1")), t.push(
|
|
9905
|
+
y("app_bind_v1", [_o([{ key: "items", value: "2" }])])
|
|
9906
|
+
), t.push(y("watch_effect_v1")), (j("getProperty") || j("setProperty")) && t.push(V(f("LABEL_PROPERTY"))), j("getProperty") && t.push(y("get_app_property_v1")), j("setProperty") && t.push(y("set_app_property_v1")), nc() && (t.push(V(f("LABEL_STATE"))), t.push(y("get_app_state_v1")), t.push(y("set_app_state_v1"))), j("callMethod") && (t.push(V(f("LABEL_METHOD"))), t.push(y("call_app_method_v1"))), oc() && (t.push(V(f("LABEL_ARGUMENT"))), t.push(y("get_page_argument_v1"))), t;
|
|
9888
9907
|
}
|
|
9889
|
-
const
|
|
9908
|
+
const ho = { name: "APP_PAGE_CATEGORY", callback: ic };
|
|
9890
9909
|
function sc() {
|
|
9891
9910
|
const t = [];
|
|
9892
9911
|
return t.push(V(f("LABEL_RESOURCE"))), t.push(y("upload_resource_v1")), t;
|
|
@@ -9930,7 +9949,7 @@ function cc() {
|
|
|
9930
9949
|
o.setAttribute("text", "%{BKY_NEW_VARIABLE}"), o.setAttribute("callbackKey", "CREATE_VARIABLE"), t.registerButtonCallback(
|
|
9931
9950
|
"CREATE_VARIABLE",
|
|
9932
9951
|
function(i) {
|
|
9933
|
-
|
|
9952
|
+
Nt.createVariableButtonHandler(
|
|
9934
9953
|
i.getTargetWorkspace()
|
|
9935
9954
|
);
|
|
9936
9955
|
}
|
|
@@ -9939,7 +9958,7 @@ function cc() {
|
|
|
9939
9958
|
const n = t.getVariablesOfType("");
|
|
9940
9959
|
if (n.length <= 0)
|
|
9941
9960
|
return e;
|
|
9942
|
-
n.sort(
|
|
9961
|
+
n.sort(Nt.compareByName);
|
|
9943
9962
|
{
|
|
9944
9963
|
const o = te.createElement("label");
|
|
9945
9964
|
o.setAttribute("text", f("LABEL_CREATED")), e.push(o);
|
|
@@ -9947,11 +9966,11 @@ function cc() {
|
|
|
9947
9966
|
return n.forEach((o) => {
|
|
9948
9967
|
{
|
|
9949
9968
|
const i = te.createElement("block");
|
|
9950
|
-
i.setAttribute("type", "variable_get_v1"), i.appendChild(
|
|
9969
|
+
i.setAttribute("type", "variable_get_v1"), i.appendChild(Nt.generateVariableFieldDom(o)), e.push(i);
|
|
9951
9970
|
}
|
|
9952
9971
|
{
|
|
9953
9972
|
const i = te.createElement("block");
|
|
9954
|
-
i.setAttribute("type", "variable_set_v1"), i.appendChild(
|
|
9973
|
+
i.setAttribute("type", "variable_set_v1"), i.appendChild(Nt.generateVariableFieldDom(o)), e.push(i);
|
|
9955
9974
|
}
|
|
9956
9975
|
}), e;
|
|
9957
9976
|
}
|
|
@@ -9961,17 +9980,17 @@ const _t = {
|
|
|
9961
9980
|
};
|
|
9962
9981
|
function rc() {
|
|
9963
9982
|
const t = [];
|
|
9964
|
-
if (
|
|
9983
|
+
if (et().length > 0)
|
|
9965
9984
|
t.push(V(f("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(
|
|
9966
|
-
y("interrupt_transaction_v1", [
|
|
9967
|
-
), t.push(V(f("LABEL_CONDITION"))), t.push(y("cond_logic_v1")), t.push(y("cond_atomic_v1", [
|
|
9985
|
+
y("interrupt_transaction_v1", [bt("VALUE")])
|
|
9986
|
+
), t.push(V(f("LABEL_CONDITION"))), t.push(y("cond_logic_v1")), t.push(y("cond_atomic_v1", [bt("VALUE")])), t.push(V(f("LABEL_QUERY_EXTRA"))), t.push(
|
|
9968
9987
|
y("query_extra_limit_v1", [
|
|
9969
|
-
|
|
9970
|
-
|
|
9988
|
+
bn("OFFSET", 0),
|
|
9989
|
+
bn("LIMIT", 1)
|
|
9971
9990
|
])
|
|
9972
9991
|
), t.push(
|
|
9973
9992
|
y("query_extra_sortby_v1", [
|
|
9974
|
-
|
|
9993
|
+
bt("COLUMN"),
|
|
9975
9994
|
Xa("DESC")
|
|
9976
9995
|
])
|
|
9977
9996
|
);
|
|
@@ -10001,7 +10020,7 @@ const Ee = { name: "COMPUTE_FUNC_CATEGORY", callback: pc };
|
|
|
10001
10020
|
function dc() {
|
|
10002
10021
|
const t = [];
|
|
10003
10022
|
return t.push(
|
|
10004
|
-
y("compute_debug_trace_v1", [
|
|
10023
|
+
y("compute_debug_trace_v1", [bt("OBJECT")])
|
|
10005
10024
|
), t;
|
|
10006
10025
|
}
|
|
10007
10026
|
const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Le = {
|
|
@@ -10683,7 +10702,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Le = {
|
|
|
10683
10702
|
type: "text_reverse_v1"
|
|
10684
10703
|
}
|
|
10685
10704
|
]
|
|
10686
|
-
},
|
|
10705
|
+
}, fo = {
|
|
10687
10706
|
kind: "category",
|
|
10688
10707
|
name: "%{BKY_CATEGORY_TIME}",
|
|
10689
10708
|
categorystyle: "time_category",
|
|
@@ -10714,7 +10733,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Le = {
|
|
|
10714
10733
|
kind: "category",
|
|
10715
10734
|
name: "%{BKY_CATEGORY_COMP}",
|
|
10716
10735
|
categorystyle: "misc_category",
|
|
10717
|
-
custom:
|
|
10736
|
+
custom: po.name
|
|
10718
10737
|
},
|
|
10719
10738
|
{
|
|
10720
10739
|
kind: "category",
|
|
@@ -10735,7 +10754,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Le = {
|
|
|
10735
10754
|
Se,
|
|
10736
10755
|
Re,
|
|
10737
10756
|
Le,
|
|
10738
|
-
|
|
10757
|
+
fo,
|
|
10739
10758
|
{
|
|
10740
10759
|
kind: "category",
|
|
10741
10760
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10893,7 +10912,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Le = {
|
|
|
10893
10912
|
kind: "category",
|
|
10894
10913
|
name: "%{BKY_CATEGORY_PAGE}",
|
|
10895
10914
|
categorystyle: "misc_category",
|
|
10896
|
-
custom:
|
|
10915
|
+
custom: ho.name
|
|
10897
10916
|
},
|
|
10898
10917
|
{
|
|
10899
10918
|
kind: "category",
|
|
@@ -10914,7 +10933,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Le = {
|
|
|
10914
10933
|
Se,
|
|
10915
10934
|
Re,
|
|
10916
10935
|
Le,
|
|
10917
|
-
|
|
10936
|
+
fo,
|
|
10918
10937
|
{
|
|
10919
10938
|
kind: "category",
|
|
10920
10939
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10940,7 +10959,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Le = {
|
|
|
10940
10959
|
custom: pe.name
|
|
10941
10960
|
}
|
|
10942
10961
|
]
|
|
10943
|
-
},
|
|
10962
|
+
}, He = {
|
|
10944
10963
|
grid: {
|
|
10945
10964
|
length: 2,
|
|
10946
10965
|
snap: !0,
|
|
@@ -10967,9 +10986,9 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Le = {
|
|
|
10967
10986
|
}
|
|
10968
10987
|
};
|
|
10969
10988
|
function gc(t, e, n, o) {
|
|
10970
|
-
|
|
10971
|
-
const i =
|
|
10972
|
-
return i.addChangeListener(
|
|
10989
|
+
He.theme = o ? "dark" : "light", He.toolbox = Ac(e, n);
|
|
10990
|
+
const i = Vo(t, He);
|
|
10991
|
+
return i.addChangeListener(xo.shadowBlockConversionChangeListener), Ic(i, e, n), Oc(i), i;
|
|
10973
10992
|
}
|
|
10974
10993
|
function Ac(t, e) {
|
|
10975
10994
|
let n;
|
|
@@ -10979,10 +10998,10 @@ function Ic(t, e, n) {
|
|
|
10979
10998
|
function o({ name: i, callback: a }) {
|
|
10980
10999
|
t.registerToolboxCategoryCallback(i, () => a(e));
|
|
10981
11000
|
}
|
|
10982
|
-
e === "page" ? n === "v1" && (o(
|
|
11001
|
+
e === "page" ? n === "v1" && (o(ho), o(de), o(he), o(_t), o(lt), o(fe), o(pe)) : e === "comp" ? n === "v1" && (o(po), 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));
|
|
10983
11002
|
}
|
|
10984
11003
|
function Oc(t) {
|
|
10985
|
-
const { router: e } =
|
|
11004
|
+
const { router: e } = vt;
|
|
10986
11005
|
t.registerButtonCallback("NO_COMPUTE", () => {
|
|
10987
11006
|
const n = e.resolve({
|
|
10988
11007
|
path: "/compute/" + Date.now()
|
|
@@ -11088,18 +11107,18 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11088
11107
|
}),
|
|
11089
11108
|
emits: /* @__PURE__ */ We(["ready"], ["update:lock", "update:scale"]),
|
|
11090
11109
|
setup(t, { expose: e, emit: n }) {
|
|
11091
|
-
const { backgroundColor2: o } = jt(), i = Kt(t, "lock"), a = Kt(t, "scale"), c = n, u = `blocklyEditor${je()}`, l =
|
|
11110
|
+
const { backgroundColor2: o } = jt(), i = Kt(t, "lock"), a = Kt(t, "scale"), c = n, u = `blocklyEditor${je()}`, l = Lt(), _ = wt("parentContainer"), d = wt("clean"), h = wt("navigator"), p = {};
|
|
11092
11111
|
Da(p);
|
|
11093
|
-
const m =
|
|
11112
|
+
const m = Lt(!0), A = Lt(!1), P = F(() => t.type === "json" ? "tree" : "list"), U = F(() => ({
|
|
11094
11113
|
width: "100%",
|
|
11095
11114
|
height: "calc(100% - 48px)"
|
|
11096
|
-
})),
|
|
11115
|
+
})), At = F(() => ({
|
|
11097
11116
|
position: "absolute",
|
|
11098
11117
|
background: o.value,
|
|
11099
11118
|
bottom: "0px",
|
|
11100
11119
|
width: "100%",
|
|
11101
11120
|
height: "48px"
|
|
11102
|
-
})),
|
|
11121
|
+
})), nt = F(() => ({
|
|
11103
11122
|
position: "absolute",
|
|
11104
11123
|
background: t.dark ? "#0000007f" : "#ffffff7f",
|
|
11105
11124
|
top: "1px",
|
|
@@ -11107,12 +11126,12 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11107
11126
|
width: "56px",
|
|
11108
11127
|
height: "calc(100% - 49px)",
|
|
11109
11128
|
zIndex: 999
|
|
11110
|
-
})),
|
|
11129
|
+
})), Ct = F(() => ({
|
|
11111
11130
|
position: "absolute",
|
|
11112
11131
|
top: "0px",
|
|
11113
11132
|
right: "0px",
|
|
11114
11133
|
zIndex: 20
|
|
11115
|
-
})),
|
|
11134
|
+
})), G = F(() => ({
|
|
11116
11135
|
position: "absolute",
|
|
11117
11136
|
background: t.dark ? "#0000007f" : "#ffffff7f",
|
|
11118
11137
|
top: "0px",
|
|
@@ -11120,7 +11139,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11120
11139
|
width: "100%",
|
|
11121
11140
|
height: "calc(100% - 48px)",
|
|
11122
11141
|
pointerEvents: "none"
|
|
11123
|
-
})),
|
|
11142
|
+
})), _n = F(() => ({
|
|
11124
11143
|
position: "absolute",
|
|
11125
11144
|
background: t.dark ? "#0000007f" : "#ffffff7f",
|
|
11126
11145
|
top: "1px",
|
|
@@ -11128,32 +11147,32 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11128
11147
|
width: "56px",
|
|
11129
11148
|
height: "calc(100% - 49px)",
|
|
11130
11149
|
zIndex: 999
|
|
11131
|
-
})),
|
|
11150
|
+
})), mo = F(() => ({
|
|
11132
11151
|
position: "fixed",
|
|
11133
11152
|
top: 0,
|
|
11134
11153
|
left: 0,
|
|
11135
11154
|
zIndex: 3e3
|
|
11136
11155
|
})), { open: Ut } = en(`blocklyEditorFlyout${je()}`);
|
|
11137
|
-
|
|
11156
|
+
gn(async () => {
|
|
11138
11157
|
if (!l.value || !_.value) {
|
|
11139
11158
|
console.assert(!1);
|
|
11140
11159
|
return;
|
|
11141
11160
|
}
|
|
11142
|
-
|
|
11161
|
+
Yo(_.value), await In(t.locale), p.workspace = gc(l.value, t.type, t.version, t.dark), p.workspace.addChangeListener(I.disableOrphans), p.workspace.addChangeListener(To);
|
|
11143
11162
|
const N = document.querySelector(`#${u} .blocklyFlyout`);
|
|
11144
11163
|
new MutationObserver((Me) => {
|
|
11145
11164
|
Me.forEach((zt) => {
|
|
11146
11165
|
zt.type === "attributes" && zt.attributeName === "style" && (Ut.value = p.workspace.getFlyout().isVisible());
|
|
11147
11166
|
});
|
|
11148
|
-
}).observe(N, { attributes: !0 }), Ut.value = p.workspace.getFlyout().isVisible(),
|
|
11149
|
-
}),
|
|
11167
|
+
}).observe(N, { attributes: !0 }), Ut.value = p.workspace.getFlyout().isVisible(), pn(), dn(), await ni(), c("ready");
|
|
11168
|
+
}), An(() => {
|
|
11150
11169
|
Ut.value = !1;
|
|
11151
|
-
}),
|
|
11152
|
-
p.workspace &&
|
|
11170
|
+
}), Fo(l, () => {
|
|
11171
|
+
p.workspace && wo(p.workspace);
|
|
11153
11172
|
});
|
|
11154
|
-
async function
|
|
11173
|
+
async function To(N) {
|
|
11155
11174
|
if (N.type === I.FINISHED_LOADING) {
|
|
11156
|
-
|
|
11175
|
+
uo(), setTimeout(() => {
|
|
11157
11176
|
h.value?.update();
|
|
11158
11177
|
}, 0), m.value = !1;
|
|
11159
11178
|
return;
|
|
@@ -11168,34 +11187,34 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11168
11187
|
}, 0);
|
|
11169
11188
|
}
|
|
11170
11189
|
}
|
|
11171
|
-
const
|
|
11172
|
-
m.value = !0, t.type === "json" ? yc(N, p.workspace) :
|
|
11173
|
-
},
|
|
11190
|
+
const Eo = (N) => {
|
|
11191
|
+
m.value = !0, t.type === "json" ? yc(N, p.workspace) : H.workspaces.load(N, p.workspace);
|
|
11192
|
+
}, go = () => t.type === "json" ? vc(p.workspace) : H.workspaces.save(p.workspace), Ao = () => {
|
|
11174
11193
|
if (t.type === "json")
|
|
11175
11194
|
console.assert(!1);
|
|
11176
11195
|
else
|
|
11177
11196
|
return s.workspaceToCode(p.workspace);
|
|
11178
|
-
},
|
|
11197
|
+
}, Io = () => Ra(p.workspace), pn = () => {
|
|
11179
11198
|
p.workspace.setIsReadOnly(i.value), p.workspace.isReadOnly() && (Ut.value = !1);
|
|
11180
|
-
},
|
|
11199
|
+
}, dn = () => {
|
|
11181
11200
|
p.workspace.setScale(a.value);
|
|
11182
|
-
},
|
|
11183
|
-
p.workspace.fireChangeListener(new
|
|
11184
|
-
},
|
|
11201
|
+
}, Oo = () => {
|
|
11202
|
+
p.workspace.fireChangeListener(new Gn());
|
|
11203
|
+
}, hn = () => {
|
|
11185
11204
|
d.value?.cleanWorkspace();
|
|
11186
|
-
},
|
|
11205
|
+
}, fn = () => {
|
|
11187
11206
|
i.value = !i.value;
|
|
11188
|
-
},
|
|
11207
|
+
}, mn = () => {
|
|
11189
11208
|
h.value && (h.value.open = !0);
|
|
11190
11209
|
};
|
|
11191
|
-
return
|
|
11192
|
-
|
|
11193
|
-
}),
|
|
11194
|
-
|
|
11210
|
+
return gn(() => {
|
|
11211
|
+
kt.on("cleanWorkspace", hn), kt.on("toggleBlocklyLock", fn), kt.on("openBlocklyNavigator", mn);
|
|
11212
|
+
}), An(() => {
|
|
11213
|
+
kt.off("cleanWorkspace", hn), kt.off("toggleBlocklyLock", fn), kt.off("openBlocklyNavigator", mn);
|
|
11195
11214
|
}), Vt(
|
|
11196
11215
|
() => t.locale,
|
|
11197
11216
|
(N) => {
|
|
11198
|
-
|
|
11217
|
+
In(N);
|
|
11199
11218
|
}
|
|
11200
11219
|
), Vt(
|
|
11201
11220
|
() => t.dark,
|
|
@@ -11205,44 +11224,44 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11205
11224
|
), Vt(Ut, (N) => {
|
|
11206
11225
|
N || p.workspace?.hideChaff();
|
|
11207
11226
|
}), Vt(i, () => {
|
|
11208
|
-
|
|
11227
|
+
pn();
|
|
11209
11228
|
}), Vt(a, () => {
|
|
11210
|
-
|
|
11229
|
+
dn();
|
|
11211
11230
|
}), e({
|
|
11212
11231
|
loading: m,
|
|
11213
|
-
load:
|
|
11214
|
-
save:
|
|
11215
|
-
generateCode:
|
|
11216
|
-
generateReactivity:
|
|
11217
|
-
fireStateChange:
|
|
11218
|
-
}), (N,
|
|
11232
|
+
load: Eo,
|
|
11233
|
+
save: go,
|
|
11234
|
+
generateCode: Ao,
|
|
11235
|
+
generateReactivity: Io,
|
|
11236
|
+
fireStateChange: Oo
|
|
11237
|
+
}), (N, It) => {
|
|
11219
11238
|
const Me = D("v-icon"), zt = D("x-loading");
|
|
11220
|
-
return S(),
|
|
11239
|
+
return S(), Z("div", Cc, [
|
|
11221
11240
|
w("div", {
|
|
11222
11241
|
id: u,
|
|
11223
11242
|
ref_key: "blocklyDiv",
|
|
11224
11243
|
ref: l,
|
|
11225
|
-
style:
|
|
11244
|
+
style: W(U.value)
|
|
11226
11245
|
}, null, 4),
|
|
11227
11246
|
w("div", {
|
|
11228
|
-
style:
|
|
11247
|
+
style: W(At.value)
|
|
11229
11248
|
}, [
|
|
11230
11249
|
oi(N.$slots, "bottom")
|
|
11231
11250
|
], 4),
|
|
11232
|
-
A.value ? (S(),
|
|
11251
|
+
A.value ? (S(), Z("div", {
|
|
11233
11252
|
key: 0,
|
|
11234
11253
|
class: "d-flex flex-column justify-center align-center",
|
|
11235
|
-
style:
|
|
11254
|
+
style: W(nt.value)
|
|
11236
11255
|
}, [
|
|
11237
11256
|
L(Me, {
|
|
11238
11257
|
icon: "mdi-delete",
|
|
11239
11258
|
size: "x-large"
|
|
11240
11259
|
})
|
|
11241
11260
|
], 4)) : rt("", !0),
|
|
11242
|
-
m.value ? rt("", !0) : (S(),
|
|
11261
|
+
m.value ? rt("", !0) : (S(), Z("div", {
|
|
11243
11262
|
key: 1,
|
|
11244
11263
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
11245
|
-
style:
|
|
11264
|
+
style: W(Ct.value)
|
|
11246
11265
|
}, [
|
|
11247
11266
|
L(Ma, {
|
|
11248
11267
|
ref_key: "clean",
|
|
@@ -11251,7 +11270,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11251
11270
|
}, null, 8, ["lock"]),
|
|
11252
11271
|
L(Ua, {
|
|
11253
11272
|
modelValue: i.value,
|
|
11254
|
-
"onUpdate:modelValue":
|
|
11273
|
+
"onUpdate:modelValue": It[0] || (It[0] = (yo) => i.value = yo)
|
|
11255
11274
|
}, null, 8, ["modelValue"]),
|
|
11256
11275
|
L(ja, {
|
|
11257
11276
|
ref_key: "navigator",
|
|
@@ -11260,18 +11279,18 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11260
11279
|
type: P.value
|
|
11261
11280
|
}, null, 8, ["lock", "type"])
|
|
11262
11281
|
], 4)),
|
|
11263
|
-
i.value ? (S(),
|
|
11282
|
+
i.value ? (S(), Z("div", {
|
|
11264
11283
|
key: 2,
|
|
11265
|
-
style:
|
|
11284
|
+
style: W(_n.value)
|
|
11266
11285
|
}, null, 4)) : rt("", !0),
|
|
11267
|
-
i.value ? (S(),
|
|
11286
|
+
i.value ? (S(), Z("div", {
|
|
11268
11287
|
key: 3,
|
|
11269
|
-
style: G
|
|
11288
|
+
style: W(G.value)
|
|
11270
11289
|
}, null, 4)) : rt("", !0),
|
|
11271
11290
|
w("div", {
|
|
11272
11291
|
ref_key: "parentContainer",
|
|
11273
11292
|
ref: _,
|
|
11274
|
-
style:
|
|
11293
|
+
style: W(mo.value)
|
|
11275
11294
|
}, null, 4),
|
|
11276
11295
|
L(zt, {
|
|
11277
11296
|
open: m.value,
|
|
@@ -11287,8 +11306,8 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11287
11306
|
},
|
|
11288
11307
|
setup(t) {
|
|
11289
11308
|
const e = t;
|
|
11290
|
-
|
|
11291
|
-
const n =
|
|
11309
|
+
Ko.registerLanguage("javascript", Ho);
|
|
11310
|
+
const n = $o.component, { backgroundColor2: o } = jt();
|
|
11292
11311
|
return (i, a) => {
|
|
11293
11312
|
const c = D("v-sheet");
|
|
11294
11313
|
return S(), st(c, {
|
|
@@ -11309,7 +11328,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11309
11328
|
}), Lc = { class: "text-subtitle-1" }, Sc = { class: "w-100 h-100 overflow-auto" }, Bc = /* @__PURE__ */ ct({
|
|
11310
11329
|
__name: "index",
|
|
11311
11330
|
setup(t) {
|
|
11312
|
-
const { t: e } = Xt(), { sysBarAvail: n } =
|
|
11331
|
+
const { t: e } = Xt(), { sysBarAvail: n } = Fn(), { backgroundColor0: o, backgroundColor2: i } = jt(), a = Lt(""), c = F(() => {
|
|
11313
11332
|
let _ = 48;
|
|
11314
11333
|
return n.value && (_ += 24), {
|
|
11315
11334
|
position: "relative",
|
|
@@ -11327,7 +11346,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11327
11346
|
"no-click-animation": "",
|
|
11328
11347
|
persistent: "",
|
|
11329
11348
|
transition: "dialog-bottom-transition",
|
|
11330
|
-
onKeydown: d[2] || (d[2] =
|
|
11349
|
+
onKeydown: d[2] || (d[2] = $n(Ft((P) => l.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
11331
11350
|
}, {
|
|
11332
11351
|
default: at(() => [
|
|
11333
11352
|
L(h, {
|
|
@@ -11353,13 +11372,13 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11353
11372
|
variant: "text",
|
|
11354
11373
|
onClick: d[0] || (d[0] = (P) => l.value = !1)
|
|
11355
11374
|
}),
|
|
11356
|
-
w("span", Lc,
|
|
11375
|
+
w("span", Lc, Ht(R(e)("x-block-lib.dlg.source.title")), 1),
|
|
11357
11376
|
L(m)
|
|
11358
11377
|
]),
|
|
11359
11378
|
_: 1
|
|
11360
11379
|
}, 8, ["color"]),
|
|
11361
11380
|
w("div", {
|
|
11362
|
-
style:
|
|
11381
|
+
style: W(c.value)
|
|
11363
11382
|
}, [
|
|
11364
11383
|
w("div", Sc, [
|
|
11365
11384
|
L(Nc, { code: a.value }, null, 8, ["code"])
|
|
@@ -11377,7 +11396,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11377
11396
|
t.component("XBlockly", kc), t.component("XSourceDlg", Bc);
|
|
11378
11397
|
};
|
|
11379
11398
|
async function Yc(t) {
|
|
11380
|
-
return (await
|
|
11399
|
+
return (await Wn(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en.h3b844ct.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans.mk5971y3.js") }), `./locales/${t}/index.ts`, 4)).default;
|
|
11381
11400
|
}
|
|
11382
11401
|
const Fc = { install: bc };
|
|
11383
11402
|
export {
|