x-block-lib 0.8.34 → 0.8.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/blocks/app/method/index.d.ts +1 -1
- package/dist/core/utils/app/method.d.ts +6 -6
- package/dist/{i18n-en.h3b844ct.js → i18n-en.gy41k67q.js} +1 -0
- package/dist/{i18n-zhHans.mk5971y3.js → i18n-zhHans.jba8gtia.js} +1 -0
- package/dist/index.js +368 -346
- package/package.json +2 -2
- /package/dist/core/blocks/app/method/{implAppMethod → implementAppMethod}/v1/index.d.ts +0 -0
package/dist/index.js
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
Website: https://highlightjs.org/
|
|
7
7
|
License: see project LICENSE
|
|
8
8
|
Touched: 2021
|
|
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-
|
|
10
|
-
import { E as I, r as Tn, M as vo, s as yo, a as Co, X as Rn, u as C, B as E, j as s, O as r, F as O, b as
|
|
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-daa85471]{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 Tn, M as vo, s as yo, a as Co, X as Rn, u as C, B as E, j as s, O as r, F as O, b as Ge, i as y, c as Tt, d as ko, e as U, f as T, g as No, h as $, k as ht, p as Yt, l as ot, m as En, n as B, C as Dn, N as it, o as Lo, P as We, q as Ve, V as Nt, t as Mn, 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 Un, D as Mo, G as Uo, H as Vn, I as Vo, J as xo, K as Yo, L as Fo, Q as wo, R as Ko, U as $o, Y as Ho } from "./vendor.txua272r.js";
|
|
11
11
|
import { globalState as g } from "x-state-lib";
|
|
12
|
-
import { globalObjects as yt, openConfirmDlg as Go, openPromptDlg as Wo, messageWarning as xn, useColor as jt, useSystem as Yn, useViewStack as
|
|
13
|
-
import { pkgs as ie, parsePixelStr as jo, parsePercentStr as Xo, getPropertyTag as Mt, unwrapEventId as
|
|
14
|
-
import { provide as qo, inject as Qo, defineComponent as ct, resolveComponent as
|
|
12
|
+
import { globalObjects as yt, openConfirmDlg as Go, openPromptDlg as Wo, messageWarning as xn, useColor as jt, useSystem as Yn, useViewStack as nn, eventBus as kt } from "x-essential-lib";
|
|
13
|
+
import { pkgs as ie, parsePixelStr as jo, parsePercentStr as Xo, getPropertyTag as Mt, unwrapEventId as on, elements as et, makeEventId as Z, toEventName as Ie, unwrapMethodId as Oe, makeMethodId as ee, toMethodName as ve, unwrapPropertyId as Jo, makePropertyId as Zt, toPropertyName as Fn, isLocaleOfMethodKind as wn, makeTriggerId as Ot } from "x-runtime-lib";
|
|
14
|
+
import { provide as qo, inject as Qo, defineComponent as ct, resolveComponent as M, createBlock as st, openBlock as S, unref as D, 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 tt, normalizeStyle as j, createElementVNode as w, createCommentVNode as rt, toDisplayString as $t, withModifiers as Ft, mergeModels as je, Fragment as Kn, renderList as ti, useId as Xe, 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 || {});
|
|
@@ -37,7 +37,7 @@ function f(t) {
|
|
|
37
37
|
return vo[t] ?? t;
|
|
38
38
|
}
|
|
39
39
|
const St = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", se = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
|
|
40
|
-
function
|
|
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}`), "";
|
|
@@ -63,19 +63,19 @@ function si(t) {
|
|
|
63
63
|
function Wn(t) {
|
|
64
64
|
return t.ui === "strInput" ? "string" : t.ui === "numInput" ? "number" : t.ui === "switch" ? "boolean" : "string";
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function Ce(t, e) {
|
|
67
67
|
return !!(t.startsWith("basic.") || !e.ui || e.readonly);
|
|
68
68
|
}
|
|
69
69
|
function K(t) {
|
|
70
70
|
return t.startsWith("globality_v");
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function Q(t) {
|
|
73
73
|
return t.startsWith("reference_v");
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function z(t) {
|
|
76
76
|
return t.startsWith("multiple_ref_v");
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function xe(t) {
|
|
79
79
|
const e = `<block type="text_v1"><field name="TEXT">${t}</field></block>`;
|
|
80
80
|
return C.xml.textToDom(e);
|
|
81
81
|
}
|
|
@@ -86,9 +86,9 @@ function On(t) {
|
|
|
86
86
|
function ai(t) {
|
|
87
87
|
return C.xml.textToDom('<block type="logic_boolean_v1"><field name="BOOL">FALSE</field></block>');
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function Je(t, e) {
|
|
90
90
|
let n = null;
|
|
91
|
-
return e === "string" ? n =
|
|
91
|
+
return e === "string" ? n = xe("") : e === "integer" || e === "decimal" ? n = On(0) : e === "boolean" ? n = ai() : e === "enum" || e === "dateTime" ? n = xe("") : console.assert(!1), n ? Rn.domToBlock(n, t) : null;
|
|
92
92
|
}
|
|
93
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);
|
|
@@ -150,11 +150,11 @@ function ui() {
|
|
|
150
150
|
return C.xml.textToDom('<shadow type="object_create_v1"></shadow>');
|
|
151
151
|
}
|
|
152
152
|
function li(t) {
|
|
153
|
-
const e = `<shadow type="${
|
|
153
|
+
const e = `<shadow type="${ye(t)}"></shadow>`;
|
|
154
154
|
return C.xml.textToDom(e);
|
|
155
155
|
}
|
|
156
156
|
function _i(t) {
|
|
157
|
-
const e = `<shadow type="${
|
|
157
|
+
const e = `<shadow type="${ye(t)}"></shadow>`;
|
|
158
158
|
return C.xml.textToDom(e);
|
|
159
159
|
}
|
|
160
160
|
function pi(t) {
|
|
@@ -261,7 +261,7 @@ s.forBlock.get_page_argument_v1 = function(t) {
|
|
|
261
261
|
return [`__getPageArgumentV1__(${s.quote_(e.argument.key)})`, r.FUNCTION_CALL];
|
|
262
262
|
};
|
|
263
263
|
const Ei = (t, e) => {
|
|
264
|
-
const n =
|
|
264
|
+
const n = ye(t), o = ae(t);
|
|
265
265
|
E[n] = {
|
|
266
266
|
init: function() {
|
|
267
267
|
this.appendDummyInput().appendField(
|
|
@@ -286,7 +286,7 @@ for (const t in ie) {
|
|
|
286
286
|
Ei(n, e.items[n]);
|
|
287
287
|
}
|
|
288
288
|
const gi = (t, e) => {
|
|
289
|
-
const n =
|
|
289
|
+
const n = ye(t), o = ae(t);
|
|
290
290
|
E[n] = {
|
|
291
291
|
init: function() {
|
|
292
292
|
this.value = e[0].default ?? "", this.appendDummyInput("DUMMY").appendField(
|
|
@@ -339,7 +339,7 @@ const gi = (t, e) => {
|
|
|
339
339
|
let u, l;
|
|
340
340
|
if (c.ui === "pixelInput") {
|
|
341
341
|
const _ = jo(this.value) ?? 0;
|
|
342
|
-
u = new
|
|
342
|
+
u = new Ge(
|
|
343
343
|
_,
|
|
344
344
|
c.min,
|
|
345
345
|
c.max,
|
|
@@ -350,7 +350,7 @@ const gi = (t, e) => {
|
|
|
350
350
|
), l = "px";
|
|
351
351
|
} else if (c.ui === "percentInput") {
|
|
352
352
|
const _ = Xo(this.value) ?? 0;
|
|
353
|
-
u = new
|
|
353
|
+
u = new Ge(
|
|
354
354
|
_,
|
|
355
355
|
c.min,
|
|
356
356
|
c.max,
|
|
@@ -528,18 +528,18 @@ function yi() {
|
|
|
528
528
|
t.push([o, n]);
|
|
529
529
|
}), k(t);
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function qe(t) {
|
|
532
532
|
const e = g.app.appList.find((n) => n.id === t);
|
|
533
533
|
return e ? e.pages : [];
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function Ye(t, e) {
|
|
536
536
|
const n = g.app.appList.find((o) => o.id === t);
|
|
537
537
|
if (n)
|
|
538
538
|
return n.pages.find((o) => o.id === e);
|
|
539
539
|
}
|
|
540
540
|
function Ci(t) {
|
|
541
541
|
const e = [];
|
|
542
|
-
return
|
|
542
|
+
return qe(t).forEach(({ id: o, name: i }) => {
|
|
543
543
|
e.push([i, o]);
|
|
544
544
|
}), k(e);
|
|
545
545
|
}
|
|
@@ -569,46 +569,46 @@ function dt(t) {
|
|
|
569
569
|
e.push({ key: n, name: o, type: i });
|
|
570
570
|
return e;
|
|
571
571
|
}
|
|
572
|
-
function
|
|
572
|
+
function J(t) {
|
|
573
573
|
return [
|
|
574
574
|
{ key: "newValue", name: "x-runtime-lib.newValue", type: t },
|
|
575
575
|
{ key: "oldValue", name: "x-runtime-lib.oldValue", type: t }
|
|
576
576
|
];
|
|
577
577
|
}
|
|
578
|
-
function
|
|
578
|
+
function Qe(t) {
|
|
579
579
|
const { properties: e } = g.runtime, { activeObject: n, activePage: o, activeComp: i, depends: a } = g.app, c = [], u = Mt(n.type, n.subtype);
|
|
580
580
|
if (!u)
|
|
581
581
|
return c;
|
|
582
582
|
const l = n.nodes.find((d) => d.id === t);
|
|
583
583
|
if (!l)
|
|
584
584
|
return c;
|
|
585
|
-
const _ =
|
|
585
|
+
const _ = et[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
|
|
594
594
|
});
|
|
595
|
-
if (
|
|
595
|
+
if (Q(_.key) && l.reference && l.reference.comp) {
|
|
596
596
|
const d = a[l.reference.comp];
|
|
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
603
|
params: dt(m)
|
|
604
604
|
});
|
|
605
605
|
}
|
|
606
|
-
if (
|
|
606
|
+
if (z(_.key) && l.reference && l.reference.comp) {
|
|
607
607
|
const d = a[l.reference.comp];
|
|
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
614
|
params: dt(m)
|
|
@@ -617,79 +617,79 @@ function qe(t) {
|
|
|
617
617
|
if (K(_.key) && n.type === "comp")
|
|
618
618
|
for (const { id: d, name: h, params: p } of i.meta.events)
|
|
619
619
|
c.push({
|
|
620
|
-
id:
|
|
620
|
+
id: Z("customEvent", t, d),
|
|
621
621
|
kind: "customEvent",
|
|
622
622
|
names: [h],
|
|
623
623
|
params: dt(p)
|
|
624
624
|
});
|
|
625
625
|
if (e[_.key] && e[_.key][u])
|
|
626
626
|
for (const { keys: d, names: h, raw: p } of e[_.key][u])
|
|
627
|
-
|
|
628
|
-
id:
|
|
627
|
+
Ce(d, p) || c.push({
|
|
628
|
+
id: Z("elementPropertyChangeEvent", t, d),
|
|
629
629
|
kind: "elementPropertyChangeEvent",
|
|
630
630
|
names: h,
|
|
631
|
-
params:
|
|
631
|
+
params: J(Wn(p))
|
|
632
632
|
});
|
|
633
|
-
if (
|
|
633
|
+
if (Q(_.key) && l.reference && l.reference.comp) {
|
|
634
634
|
const d = a[l.reference.comp];
|
|
635
635
|
if (d)
|
|
636
636
|
for (const { id: h, name: p, type: m } of d.meta.properties)
|
|
637
637
|
c.push({
|
|
638
|
-
id:
|
|
638
|
+
id: Z("referencePropertyChangeEvent", t, h),
|
|
639
639
|
kind: "referencePropertyChangeEvent",
|
|
640
640
|
names: [p],
|
|
641
|
-
params:
|
|
641
|
+
params: J(m)
|
|
642
642
|
});
|
|
643
643
|
}
|
|
644
|
-
if (
|
|
644
|
+
if (z(_.key) && l.reference && l.reference.comp) {
|
|
645
645
|
const d = a[l.reference.comp];
|
|
646
646
|
if (d)
|
|
647
647
|
for (const { id: h, name: p, type: m } of d.meta.properties)
|
|
648
648
|
c.push({
|
|
649
|
-
id:
|
|
649
|
+
id: Z("multipleRefPropertyChangeEvent", t, h),
|
|
650
650
|
kind: "multipleRefPropertyChangeEvent",
|
|
651
651
|
names: [p],
|
|
652
|
-
params:
|
|
652
|
+
params: J(m)
|
|
653
653
|
});
|
|
654
654
|
}
|
|
655
655
|
if (K(_.key) && n.type === "comp")
|
|
656
656
|
for (const { id: d, name: h, type: p } of i.meta.properties)
|
|
657
657
|
c.push({
|
|
658
|
-
id:
|
|
658
|
+
id: Z("customPropertyChangeEvent", t, d),
|
|
659
659
|
kind: "customPropertyChangeEvent",
|
|
660
660
|
names: [h],
|
|
661
|
-
params:
|
|
661
|
+
params: J(p)
|
|
662
662
|
});
|
|
663
663
|
if (K(_.key)) {
|
|
664
664
|
if (n.type === "page")
|
|
665
665
|
for (const { id: d, name: h, type: p } of o.meta.states)
|
|
666
666
|
c.push({
|
|
667
|
-
id:
|
|
667
|
+
id: Z("stateChangeEvent", "globality", d),
|
|
668
668
|
kind: "stateChangeEvent",
|
|
669
669
|
names: [h],
|
|
670
|
-
params:
|
|
670
|
+
params: J(p)
|
|
671
671
|
});
|
|
672
672
|
else if (n.type === "comp")
|
|
673
673
|
for (const { id: d, name: h, type: p } of i.meta.states)
|
|
674
674
|
c.push({
|
|
675
|
-
id:
|
|
675
|
+
id: Z("stateChangeEvent", "globality", d),
|
|
676
676
|
kind: "stateChangeEvent",
|
|
677
677
|
names: [h],
|
|
678
|
-
params:
|
|
678
|
+
params: J(p)
|
|
679
679
|
});
|
|
680
680
|
}
|
|
681
681
|
return c;
|
|
682
682
|
}
|
|
683
|
-
function
|
|
683
|
+
function Fe(t) {
|
|
684
684
|
if (!t)
|
|
685
685
|
return;
|
|
686
686
|
const { properties: e } = g.runtime, { activeObject: n, activePage: o, activeComp: i, depends: a } = g.app, c = Mt(n.type, n.subtype);
|
|
687
687
|
if (!c)
|
|
688
688
|
return;
|
|
689
|
-
const { kind: u, nodeId: l, eventKey: _ } =
|
|
689
|
+
const { kind: u, nodeId: l, eventKey: _ } = on(t), d = n.nodes.find((p) => p.id === l);
|
|
690
690
|
if (!d)
|
|
691
691
|
return;
|
|
692
|
-
const h =
|
|
692
|
+
const h = et[d.key];
|
|
693
693
|
if (!h) {
|
|
694
694
|
console.assert(!1, "invalid element", d.key);
|
|
695
695
|
return;
|
|
@@ -704,7 +704,7 @@ function Ye(t) {
|
|
|
704
704
|
params: p.params
|
|
705
705
|
};
|
|
706
706
|
} else if (u === "referenceEvent") {
|
|
707
|
-
if (
|
|
707
|
+
if (Q(h.key) && d.reference && d.reference.comp) {
|
|
708
708
|
const p = a[d.reference.comp];
|
|
709
709
|
if (p) {
|
|
710
710
|
const m = p.meta.events.find((A) => A.id === _);
|
|
@@ -718,7 +718,7 @@ function Ye(t) {
|
|
|
718
718
|
}
|
|
719
719
|
}
|
|
720
720
|
} else if (u === "multipleRefEvent") {
|
|
721
|
-
if (
|
|
721
|
+
if (z(h.key) && d.reference && d.reference.comp) {
|
|
722
722
|
const p = a[d.reference.comp];
|
|
723
723
|
if (p) {
|
|
724
724
|
const m = p.meta.events.find((A) => A.id === _);
|
|
@@ -752,11 +752,11 @@ function Ye(t) {
|
|
|
752
752
|
id: t,
|
|
753
753
|
kind: u,
|
|
754
754
|
names: p.names,
|
|
755
|
-
params:
|
|
755
|
+
params: J(Wn(p.raw))
|
|
756
756
|
};
|
|
757
757
|
}
|
|
758
758
|
} else if (u === "referencePropertyChangeEvent") {
|
|
759
|
-
if (
|
|
759
|
+
if (Q(h.key) && d.reference && d.reference.comp) {
|
|
760
760
|
const p = a[d.reference.comp];
|
|
761
761
|
if (p) {
|
|
762
762
|
const m = p.meta.properties.find(
|
|
@@ -767,12 +767,12 @@ function Ye(t) {
|
|
|
767
767
|
id: t,
|
|
768
768
|
kind: u,
|
|
769
769
|
names: [m.name],
|
|
770
|
-
params:
|
|
770
|
+
params: J(m.type)
|
|
771
771
|
};
|
|
772
772
|
}
|
|
773
773
|
}
|
|
774
774
|
} else if (u === "multipleRefPropertyChangeEvent") {
|
|
775
|
-
if (
|
|
775
|
+
if (z(h.key) && d.reference && d.reference.comp) {
|
|
776
776
|
const p = a[d.reference.comp];
|
|
777
777
|
if (p) {
|
|
778
778
|
const m = p.meta.properties.find(
|
|
@@ -783,7 +783,7 @@ function Ye(t) {
|
|
|
783
783
|
id: t,
|
|
784
784
|
kind: u,
|
|
785
785
|
names: [m.name],
|
|
786
|
-
params:
|
|
786
|
+
params: J(m.type)
|
|
787
787
|
};
|
|
788
788
|
}
|
|
789
789
|
}
|
|
@@ -797,7 +797,7 @@ function Ye(t) {
|
|
|
797
797
|
id: t,
|
|
798
798
|
kind: u,
|
|
799
799
|
names: [p.name],
|
|
800
|
-
params:
|
|
800
|
+
params: J(p.type)
|
|
801
801
|
};
|
|
802
802
|
}
|
|
803
803
|
} else if (u === "stateChangeEvent" && K(h.key)) {
|
|
@@ -810,7 +810,7 @@ function Ye(t) {
|
|
|
810
810
|
id: t,
|
|
811
811
|
kind: u,
|
|
812
812
|
names: [p.name],
|
|
813
|
-
params:
|
|
813
|
+
params: J(p.type)
|
|
814
814
|
};
|
|
815
815
|
} else if (n.type === "comp") {
|
|
816
816
|
const p = i.meta.states.find(
|
|
@@ -821,13 +821,13 @@ function Ye(t) {
|
|
|
821
821
|
id: t,
|
|
822
822
|
kind: u,
|
|
823
823
|
names: [p.name],
|
|
824
|
-
params:
|
|
824
|
+
params: J(p.type)
|
|
825
825
|
};
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
828
|
}
|
|
829
829
|
function Ni(t) {
|
|
830
|
-
const e = [], n =
|
|
830
|
+
const e = [], n = Qe(t);
|
|
831
831
|
for (const { id: o, kind: i, names: a } of n)
|
|
832
832
|
e.push([Ie(i, a), o]);
|
|
833
833
|
return k(e);
|
|
@@ -837,7 +837,7 @@ function Qn() {
|
|
|
837
837
|
if (t.type === "comp")
|
|
838
838
|
for (const { id: o, name: i, params: a } of e.meta.events)
|
|
839
839
|
n.push({
|
|
840
|
-
id:
|
|
840
|
+
id: Z("customEvent", "globality", o),
|
|
841
841
|
kind: "customEvent",
|
|
842
842
|
names: [i],
|
|
843
843
|
params: dt(a)
|
|
@@ -847,7 +847,7 @@ function Qn() {
|
|
|
847
847
|
function kn(t) {
|
|
848
848
|
if (!t)
|
|
849
849
|
return;
|
|
850
|
-
const { activeObject: e, activeComp: n } = g.app, { kind: o, nodeId: i, eventKey: a } =
|
|
850
|
+
const { activeObject: e, activeComp: n } = g.app, { kind: o, nodeId: i, eventKey: a } = on(t);
|
|
851
851
|
if (o === "customEvent" && i === "globality" && e.type === "comp") {
|
|
852
852
|
const c = n.meta.events.find(
|
|
853
853
|
(u) => u.id === a
|
|
@@ -879,11 +879,11 @@ function Rt(t) {
|
|
|
879
879
|
e.push({ key: n, name: o, type: i });
|
|
880
880
|
return e;
|
|
881
881
|
}
|
|
882
|
-
function
|
|
882
|
+
function ze(t) {
|
|
883
883
|
const { activeObject: e, depends: n } = g.app, o = [], i = e.nodes.find((c) => c.id === t);
|
|
884
884
|
if (!i)
|
|
885
885
|
return o;
|
|
886
|
-
const a =
|
|
886
|
+
const a = et[i.key];
|
|
887
887
|
if (!a)
|
|
888
888
|
return console.assert(!1, "inavlid element", i.key), o;
|
|
889
889
|
for (const { key: c, name: u, inputs: l, outputs: _ } of a.methods)
|
|
@@ -894,7 +894,7 @@ function Qe(t) {
|
|
|
894
894
|
inputs: l,
|
|
895
895
|
outputs: _
|
|
896
896
|
});
|
|
897
|
-
if (
|
|
897
|
+
if (Q(a.key) && i.reference && i.reference.comp) {
|
|
898
898
|
const c = n[i.reference.comp];
|
|
899
899
|
if (c)
|
|
900
900
|
for (const { id: u, name: l, inputs: _, outputs: d } of c.meta.methods)
|
|
@@ -906,7 +906,7 @@ function Qe(t) {
|
|
|
906
906
|
outputs: Rt(d)
|
|
907
907
|
});
|
|
908
908
|
}
|
|
909
|
-
if (
|
|
909
|
+
if (z(a.key) && i.reference && i.reference.comp) {
|
|
910
910
|
const c = n[i.reference.comp];
|
|
911
911
|
if (c)
|
|
912
912
|
for (const { id: u, name: l, inputs: _, outputs: d } of c.meta.methods)
|
|
@@ -920,13 +920,13 @@ function Qe(t) {
|
|
|
920
920
|
}
|
|
921
921
|
return K(a.key) && e.type, o;
|
|
922
922
|
}
|
|
923
|
-
function
|
|
923
|
+
function we(t) {
|
|
924
924
|
if (!t)
|
|
925
925
|
return;
|
|
926
926
|
const { activeObject: e, depends: n } = g.app, { kind: o, nodeId: i, methodKey: a } = Oe(t), c = e.nodes.find((l) => l.id === i);
|
|
927
927
|
if (!c)
|
|
928
928
|
return;
|
|
929
|
-
const u =
|
|
929
|
+
const u = et[c.key];
|
|
930
930
|
if (!u) {
|
|
931
931
|
console.assert(!1, "invalid element", c.key);
|
|
932
932
|
return;
|
|
@@ -942,7 +942,7 @@ function Fe(t) {
|
|
|
942
942
|
outputs: l.outputs
|
|
943
943
|
};
|
|
944
944
|
} else if (o === "referenceMethod") {
|
|
945
|
-
if (
|
|
945
|
+
if (Q(u.key) && c.reference && c.reference.comp) {
|
|
946
946
|
const l = n[c.reference.comp];
|
|
947
947
|
if (l) {
|
|
948
948
|
const _ = l.meta.methods.find(
|
|
@@ -958,7 +958,7 @@ function Fe(t) {
|
|
|
958
958
|
};
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
|
-
} else if (o === "multipleRefMethod" &&
|
|
961
|
+
} else if (o === "multipleRefMethod" && z(u.key) && c.reference && c.reference.comp) {
|
|
962
962
|
const l = n[c.reference.comp];
|
|
963
963
|
if (l) {
|
|
964
964
|
const _ = l.meta.methods.find(
|
|
@@ -976,9 +976,9 @@ function Fe(t) {
|
|
|
976
976
|
}
|
|
977
977
|
}
|
|
978
978
|
function Si(t) {
|
|
979
|
-
const e = [], n =
|
|
979
|
+
const e = [], n = ze(t);
|
|
980
980
|
for (const { id: o, kind: i, names: a } of n)
|
|
981
|
-
e.push([
|
|
981
|
+
e.push([ve(i, a), o]);
|
|
982
982
|
return k(e);
|
|
983
983
|
}
|
|
984
984
|
function cn() {
|
|
@@ -1015,20 +1015,20 @@ function Dt(t) {
|
|
|
1015
1015
|
function zn() {
|
|
1016
1016
|
const t = [], e = cn();
|
|
1017
1017
|
for (const { id: n, kind: o, names: i } of e)
|
|
1018
|
-
t.push([
|
|
1018
|
+
t.push([ve(o, i), n]);
|
|
1019
1019
|
return k(t);
|
|
1020
1020
|
}
|
|
1021
|
-
function
|
|
1021
|
+
function Ze(t) {
|
|
1022
1022
|
const e = Dt(t);
|
|
1023
1023
|
return e ? e.outputs : [];
|
|
1024
1024
|
}
|
|
1025
|
-
function
|
|
1025
|
+
function Ke(t, e) {
|
|
1026
1026
|
const n = Dt(t);
|
|
1027
1027
|
if (n)
|
|
1028
1028
|
return n.outputs.find((o) => o.key === e);
|
|
1029
1029
|
}
|
|
1030
1030
|
function Bi(t) {
|
|
1031
|
-
const e = [], n =
|
|
1031
|
+
const e = [], n = Ze(t);
|
|
1032
1032
|
for (const { name: o, key: i } of n)
|
|
1033
1033
|
e.push([o, i]);
|
|
1034
1034
|
return k(e);
|
|
@@ -1037,19 +1037,19 @@ function bi(t, e, n) {
|
|
|
1037
1037
|
const { properties: o } = g.runtime, { activeObject: i, activePage: a, activeComp: c, depends: u } = g.app;
|
|
1038
1038
|
if (t.events.length > 0)
|
|
1039
1039
|
return !1;
|
|
1040
|
-
if (
|
|
1040
|
+
if (Q(t.key) && n) {
|
|
1041
1041
|
const l = u[n];
|
|
1042
1042
|
if (l && l.meta.events.length > 0)
|
|
1043
1043
|
return !1;
|
|
1044
1044
|
}
|
|
1045
|
-
if (
|
|
1045
|
+
if (z(t.key) && n) {
|
|
1046
1046
|
const l = u[n];
|
|
1047
1047
|
if (l && l.meta.events.length > 0)
|
|
1048
1048
|
return !1;
|
|
1049
1049
|
}
|
|
1050
1050
|
if (o[t.key] && o[t.key][e]) {
|
|
1051
1051
|
for (const { keys: l, raw: _ } of o[t.key][e])
|
|
1052
|
-
if (!
|
|
1052
|
+
if (!Ce(l, _))
|
|
1053
1053
|
return !1;
|
|
1054
1054
|
}
|
|
1055
1055
|
if (K(t.key) && i.type === "comp" && c.meta.properties.length > 0)
|
|
@@ -1067,12 +1067,12 @@ function Pi(t, e) {
|
|
|
1067
1067
|
const { activeObject: n, depends: o } = g.app;
|
|
1068
1068
|
if (t.methods.length > 0)
|
|
1069
1069
|
return !1;
|
|
1070
|
-
if (
|
|
1070
|
+
if (Q(t.key) && e) {
|
|
1071
1071
|
const i = o[e];
|
|
1072
1072
|
if (i && i.meta.methods.length > 0)
|
|
1073
1073
|
return !1;
|
|
1074
1074
|
}
|
|
1075
|
-
if (
|
|
1075
|
+
if (z(t.key) && e) {
|
|
1076
1076
|
const i = o[e];
|
|
1077
1077
|
if (i && i.meta.methods.length > 0)
|
|
1078
1078
|
return !1;
|
|
@@ -1083,12 +1083,12 @@ function Ri(t, e, n) {
|
|
|
1083
1083
|
const { properties: o } = g.runtime, { activeObject: i, activeComp: a, depends: c } = g.app;
|
|
1084
1084
|
if (o[t.key] && o[t.key][e] && o[t.key][e].length > 0)
|
|
1085
1085
|
return !1;
|
|
1086
|
-
if (
|
|
1086
|
+
if (Q(t.key) && n) {
|
|
1087
1087
|
const u = c[n];
|
|
1088
1088
|
if (u && u.meta.properties.length > 0)
|
|
1089
1089
|
return !1;
|
|
1090
1090
|
}
|
|
1091
|
-
if (
|
|
1091
|
+
if (z(t.key) && n) {
|
|
1092
1092
|
const u = c[n];
|
|
1093
1093
|
if (u && u.meta.properties.length > 0)
|
|
1094
1094
|
return !1;
|
|
@@ -1099,15 +1099,15 @@ function Di(t, e, n) {
|
|
|
1099
1099
|
const { properties: o } = g.runtime, { activeObject: i, activeComp: a, depends: c } = g.app;
|
|
1100
1100
|
if (o[t.key] && o[t.key][e]) {
|
|
1101
1101
|
for (const { keys: u, raw: l } of o[t.key][e])
|
|
1102
|
-
if (!
|
|
1102
|
+
if (!Ce(u, l))
|
|
1103
1103
|
return !1;
|
|
1104
1104
|
}
|
|
1105
|
-
if (
|
|
1105
|
+
if (Q(t.key) && n) {
|
|
1106
1106
|
const u = c[n];
|
|
1107
1107
|
if (u && u.meta.properties.length > 0)
|
|
1108
1108
|
return !1;
|
|
1109
1109
|
}
|
|
1110
|
-
if (
|
|
1110
|
+
if (z(t.key) && n) {
|
|
1111
1111
|
const u = c[n];
|
|
1112
1112
|
if (u && u.meta.properties.length > 0)
|
|
1113
1113
|
return !1;
|
|
@@ -1117,12 +1117,12 @@ function Di(t, e, n) {
|
|
|
1117
1117
|
function Zn(t, e, n, o) {
|
|
1118
1118
|
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;
|
|
1119
1119
|
}
|
|
1120
|
-
function
|
|
1120
|
+
function X(t) {
|
|
1121
1121
|
const { activeObject: e } = g.app, n = Mt(e.type, e.subtype);
|
|
1122
1122
|
if (!n)
|
|
1123
1123
|
return !1;
|
|
1124
1124
|
for (const o of e.nodes) {
|
|
1125
|
-
const i =
|
|
1125
|
+
const i = et[o.key];
|
|
1126
1126
|
if (!i) {
|
|
1127
1127
|
console.assert(!1, "invalid element", o.key);
|
|
1128
1128
|
continue;
|
|
@@ -1137,7 +1137,7 @@ function Jt(t) {
|
|
|
1137
1137
|
if (!o)
|
|
1138
1138
|
return n;
|
|
1139
1139
|
for (const i of e.nodes) {
|
|
1140
|
-
const a =
|
|
1140
|
+
const a = et[i.key];
|
|
1141
1141
|
if (!a) {
|
|
1142
1142
|
console.assert(!1, "invalid element", i.key);
|
|
1143
1143
|
continue;
|
|
@@ -1155,7 +1155,7 @@ function ft(t) {
|
|
|
1155
1155
|
const { activeObject: e } = g.app, n = e.nodes.find((i) => i.id === t);
|
|
1156
1156
|
if (!n)
|
|
1157
1157
|
return;
|
|
1158
|
-
const o =
|
|
1158
|
+
const o = et[n.key];
|
|
1159
1159
|
if (!o) {
|
|
1160
1160
|
console.assert(!1, "invalid element", n.key);
|
|
1161
1161
|
return;
|
|
@@ -1167,7 +1167,7 @@ function ft(t) {
|
|
|
1167
1167
|
alias: n.alias
|
|
1168
1168
|
};
|
|
1169
1169
|
}
|
|
1170
|
-
function
|
|
1170
|
+
function ke(t) {
|
|
1171
1171
|
const { i18n: e } = yt, n = [], o = Jt(t);
|
|
1172
1172
|
for (const { id: i, name: a, alias: c } of o) {
|
|
1173
1173
|
let u = e.global.t(a);
|
|
@@ -1182,12 +1182,12 @@ function Ht(t, e) {
|
|
|
1182
1182
|
const l = o.nodes.find((d) => d.id === t);
|
|
1183
1183
|
if (!l)
|
|
1184
1184
|
return c;
|
|
1185
|
-
const _ =
|
|
1185
|
+
const _ = et[l.key];
|
|
1186
1186
|
if (!_)
|
|
1187
1187
|
return console.assert(!1, "invalid element", l.key), c;
|
|
1188
1188
|
if (n[_.key] && n[_.key][u])
|
|
1189
1189
|
for (const { keys: d, names: h, raw: p } of n[_.key][u])
|
|
1190
|
-
e === "write" &&
|
|
1190
|
+
e === "write" && Ce(d, p) || c.push({
|
|
1191
1191
|
id: Zt("elementProperty", t, d),
|
|
1192
1192
|
kind: "elementProperty",
|
|
1193
1193
|
names: h,
|
|
@@ -1196,7 +1196,7 @@ function Ht(t, e) {
|
|
|
1196
1196
|
raw: p
|
|
1197
1197
|
}
|
|
1198
1198
|
});
|
|
1199
|
-
if (
|
|
1199
|
+
if (Q(_.key) && l.reference && l.reference.comp) {
|
|
1200
1200
|
const d = a[l.reference.comp];
|
|
1201
1201
|
if (d)
|
|
1202
1202
|
for (const { id: h, name: p, type: m } of d.meta.properties)
|
|
@@ -1209,7 +1209,7 @@ function Ht(t, e) {
|
|
|
1209
1209
|
}
|
|
1210
1210
|
});
|
|
1211
1211
|
}
|
|
1212
|
-
if (
|
|
1212
|
+
if (z(_.key) && l.reference && l.reference.comp) {
|
|
1213
1213
|
const d = a[l.reference.comp];
|
|
1214
1214
|
if (d)
|
|
1215
1215
|
for (const { id: h, name: p, type: m } of d.meta.properties)
|
|
@@ -1243,7 +1243,7 @@ function vt(t) {
|
|
|
1243
1243
|
const { kind: c, nodeId: u, propertyKey: l } = Jo(t), _ = n.nodes.find((h) => h.id === u);
|
|
1244
1244
|
if (!_)
|
|
1245
1245
|
return;
|
|
1246
|
-
const d =
|
|
1246
|
+
const d = et[_.key];
|
|
1247
1247
|
if (!d) {
|
|
1248
1248
|
console.assert(!1, "invalid element", _.key);
|
|
1249
1249
|
return;
|
|
@@ -1265,7 +1265,7 @@ function vt(t) {
|
|
|
1265
1265
|
};
|
|
1266
1266
|
}
|
|
1267
1267
|
} else if (c === "referenceProperty") {
|
|
1268
|
-
if (
|
|
1268
|
+
if (Q(d.key) && _.reference && _.reference.comp) {
|
|
1269
1269
|
const h = i[_.reference.comp];
|
|
1270
1270
|
if (h) {
|
|
1271
1271
|
const p = h.meta.properties.find(
|
|
@@ -1283,7 +1283,7 @@ function vt(t) {
|
|
|
1283
1283
|
}
|
|
1284
1284
|
}
|
|
1285
1285
|
} else if (c === "multipleRefProperty") {
|
|
1286
|
-
if (
|
|
1286
|
+
if (z(d.key) && _.reference && _.reference.comp) {
|
|
1287
1287
|
const h = i[_.reference.comp];
|
|
1288
1288
|
if (h) {
|
|
1289
1289
|
const p = h.meta.properties.find(
|
|
@@ -1363,7 +1363,7 @@ const Mi = {
|
|
|
1363
1363
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
1364
1364
|
const e = this.getField("NODE");
|
|
1365
1365
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
1366
|
-
const n =
|
|
1366
|
+
const n = Qe(this.node.id)?.[0];
|
|
1367
1367
|
if (!n)
|
|
1368
1368
|
return;
|
|
1369
1369
|
this.event.id = n.id, this.event.kind = n.kind, this.event.names = n.names, this.event.params = n.params;
|
|
@@ -1382,7 +1382,7 @@ const Mi = {
|
|
|
1382
1382
|
}, 0);
|
|
1383
1383
|
},
|
|
1384
1384
|
genNodeOpts_: function() {
|
|
1385
|
-
return
|
|
1385
|
+
return ke("onEvent");
|
|
1386
1386
|
},
|
|
1387
1387
|
genEventOpts_: function() {
|
|
1388
1388
|
return Ni(this.node.id);
|
|
@@ -1406,14 +1406,14 @@ const Mi = {
|
|
|
1406
1406
|
const n = this.node.key !== e.key;
|
|
1407
1407
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
1408
1408
|
const o = this.getField("EVENT");
|
|
1409
|
-
if (o.getOptions(!1), n || !
|
|
1410
|
-
const i =
|
|
1409
|
+
if (o.getOptions(!1), n || !Fe(this.event.id)) {
|
|
1410
|
+
const i = Qe(this.node.id)?.[0];
|
|
1411
1411
|
o.setValue(i?.id ?? "");
|
|
1412
1412
|
}
|
|
1413
1413
|
this.onEventChange_(o.getValue());
|
|
1414
1414
|
},
|
|
1415
1415
|
onEventChange_: function(t) {
|
|
1416
|
-
const e =
|
|
1416
|
+
const e = Fe(t);
|
|
1417
1417
|
e ? (this.event.id = e.id, this.event.kind = e.kind, this.event.names = e.names, this.event.params = e.params) : (this.event.id = "", this.event.kind = "", this.event.names = [], this.event.params = []), this.updateShape_(), setTimeout(() => {
|
|
1418
1418
|
this.ensureBlocks_();
|
|
1419
1419
|
}, 0);
|
|
@@ -1425,7 +1425,7 @@ const Mi = {
|
|
|
1425
1425
|
}
|
|
1426
1426
|
for (let e = 0; e < this.event.params.length; e++)
|
|
1427
1427
|
this.getInput("PARAM" + e) || (this.appendValueInput("PARAM" + e), this.moveInputBefore("PARAM" + e, "HANDLE"));
|
|
1428
|
-
const { kind: t } =
|
|
1428
|
+
const { kind: t } = on(this.event.id);
|
|
1429
1429
|
if (t === "multipleRefEvent")
|
|
1430
1430
|
this.getInput("REF_KEY") || this.appendValueInput("REF_KEY"), this.event.params.length > 0 ? this.moveInputBefore("REF_KEY", "PARAM0") : this.moveInputBefore("REF_KEY", "HANDLE");
|
|
1431
1431
|
else if (this.getInput("REF_KEY")) {
|
|
@@ -1454,7 +1454,7 @@ const Mi = {
|
|
|
1454
1454
|
return;
|
|
1455
1455
|
}
|
|
1456
1456
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
1457
|
-
const e =
|
|
1457
|
+
const e = Fe(this.event.id);
|
|
1458
1458
|
if (!e) {
|
|
1459
1459
|
this.setWarningText(f("WARN_EVENT_NOT_FOUND"));
|
|
1460
1460
|
return;
|
|
@@ -1463,7 +1463,7 @@ const Mi = {
|
|
|
1463
1463
|
this.setWarningText(f("WARN_EVENT_HAS_CHANGED"));
|
|
1464
1464
|
return;
|
|
1465
1465
|
}
|
|
1466
|
-
if (
|
|
1466
|
+
if (U(e.names, this.event.names) || (this.event.names = e.names), !U(e.params, this.event.params)) {
|
|
1467
1467
|
this.setWarningText(f("WARN_EVENT_HAS_CHANGED"));
|
|
1468
1468
|
return;
|
|
1469
1469
|
}
|
|
@@ -1564,7 +1564,7 @@ const Ui = {
|
|
|
1564
1564
|
this.setWarningText(f("WARN_EVENT_HAS_CHANGED"));
|
|
1565
1565
|
return;
|
|
1566
1566
|
}
|
|
1567
|
-
if (
|
|
1567
|
+
if (U(t.names, this.event.names) || (this.event.names = t.names), !U(t.params, this.event.params)) {
|
|
1568
1568
|
this.setWarningText(f("WARN_EVENT_HAS_CHANGED"));
|
|
1569
1569
|
return;
|
|
1570
1570
|
}
|
|
@@ -1765,7 +1765,7 @@ const Yi = {
|
|
|
1765
1765
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
1766
1766
|
const e = this.getField("NODE");
|
|
1767
1767
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
1768
|
-
const n =
|
|
1768
|
+
const n = ze(this.node.id)?.[0];
|
|
1769
1769
|
if (!n)
|
|
1770
1770
|
return;
|
|
1771
1771
|
this.method.id = n.id, this.method.kind = n.kind, this.method.names = n.names, this.method.inputs = n.inputs, this.method.outputs = n.outputs;
|
|
@@ -1784,7 +1784,7 @@ const Yi = {
|
|
|
1784
1784
|
}, 0);
|
|
1785
1785
|
},
|
|
1786
1786
|
genNodeOpts_: function() {
|
|
1787
|
-
return
|
|
1787
|
+
return ke("callMethod");
|
|
1788
1788
|
},
|
|
1789
1789
|
genMethodOpts_: function() {
|
|
1790
1790
|
return Si(this.node.id);
|
|
@@ -1808,14 +1808,14 @@ const Yi = {
|
|
|
1808
1808
|
const n = this.node.key !== e.key;
|
|
1809
1809
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
1810
1810
|
const o = this.getField("METHOD");
|
|
1811
|
-
if (o.getOptions(!1), n || !
|
|
1812
|
-
const i =
|
|
1811
|
+
if (o.getOptions(!1), n || !we(this.method.id)) {
|
|
1812
|
+
const i = ze(this.node.id)?.[0];
|
|
1813
1813
|
o.setValue(i?.id ?? "");
|
|
1814
1814
|
}
|
|
1815
1815
|
this.onMethodChange_(o.getValue());
|
|
1816
1816
|
},
|
|
1817
1817
|
onMethodChange_: function(t) {
|
|
1818
|
-
const e =
|
|
1818
|
+
const e = we(t);
|
|
1819
1819
|
e ? (this.method.id = e.id, this.method.kind = e.kind, this.method.names = e.names, this.method.inputs = e.inputs, this.method.outputs = e.outputs) : (this.method.id = "", this.method.kind = "", this.method.names = [], this.method.inputs = [], this.method.outputs = []), this.updateShape_(), this.updateShadow_(), setTimeout(() => {
|
|
1820
1820
|
this.ensureBlocks_();
|
|
1821
1821
|
}, 0);
|
|
@@ -1876,7 +1876,7 @@ const Yi = {
|
|
|
1876
1876
|
return;
|
|
1877
1877
|
}
|
|
1878
1878
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
1879
|
-
const e =
|
|
1879
|
+
const e = we(this.method.id);
|
|
1880
1880
|
if (!e) {
|
|
1881
1881
|
this.setWarningText(f("WARN_METHOD_NOT_FOUND"));
|
|
1882
1882
|
return;
|
|
@@ -1885,11 +1885,11 @@ const Yi = {
|
|
|
1885
1885
|
this.setWarningText(f("WARN_METHOD_HAS_CHANGED"));
|
|
1886
1886
|
return;
|
|
1887
1887
|
}
|
|
1888
|
-
if (
|
|
1888
|
+
if (U(e.names, this.method.names) || (this.method.names = e.names), !U(e.inputs, this.method.inputs)) {
|
|
1889
1889
|
this.setWarningText(f("WARN_METHOD_HAS_CHANGED"));
|
|
1890
1890
|
return;
|
|
1891
1891
|
}
|
|
1892
|
-
if (!
|
|
1892
|
+
if (!U(e.outputs, this.method.outputs)) {
|
|
1893
1893
|
this.setWarningText(f("WARN_METHOD_HAS_CHANGED"));
|
|
1894
1894
|
return;
|
|
1895
1895
|
}
|
|
@@ -1898,42 +1898,50 @@ const Yi = {
|
|
|
1898
1898
|
};
|
|
1899
1899
|
E.call_app_method_v1 = Yi;
|
|
1900
1900
|
s.forBlock.call_app_method_v1 = function(t) {
|
|
1901
|
-
const e = s.
|
|
1902
|
-
let
|
|
1903
|
-
|
|
1904
|
-
let
|
|
1905
|
-
|
|
1906
|
-
let
|
|
1907
|
-
|
|
1908
|
-
"INPUT" +
|
|
1901
|
+
const e = s.INDENT, n = s.quote_, o = t;
|
|
1902
|
+
let i;
|
|
1903
|
+
o.method.kind === "multipleRefMethod" && (i = s.valueToCode(o, "REF_KEY", r.NONE) || "''");
|
|
1904
|
+
let a = "{";
|
|
1905
|
+
if (o.method.inputs.forEach(({ key: c, type: u }, l) => {
|
|
1906
|
+
let _ = s.valueToCode(
|
|
1907
|
+
o,
|
|
1908
|
+
"INPUT" + l,
|
|
1909
1909
|
r.ATOMIC
|
|
1910
1910
|
);
|
|
1911
|
-
if (
|
|
1912
|
-
switch (
|
|
1911
|
+
if (_ === void 0)
|
|
1912
|
+
switch (u) {
|
|
1913
1913
|
case "string":
|
|
1914
|
-
|
|
1914
|
+
_ = "''";
|
|
1915
1915
|
break;
|
|
1916
1916
|
case "number":
|
|
1917
|
-
|
|
1917
|
+
_ = "0";
|
|
1918
1918
|
break;
|
|
1919
1919
|
case "boolean":
|
|
1920
|
-
|
|
1920
|
+
_ = "false";
|
|
1921
1921
|
break;
|
|
1922
1922
|
case "array":
|
|
1923
|
-
|
|
1923
|
+
_ = "[]";
|
|
1924
1924
|
break;
|
|
1925
1925
|
case "object":
|
|
1926
|
-
|
|
1926
|
+
_ = "{}";
|
|
1927
1927
|
break;
|
|
1928
1928
|
default:
|
|
1929
|
-
|
|
1929
|
+
_ = "null";
|
|
1930
1930
|
}
|
|
1931
|
-
|
|
1932
|
-
}),
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1931
|
+
a !== "{" && (a += ", "), a += `${n(c)}: ${_}`;
|
|
1932
|
+
}), a += "}", o.method.outputs.length > 0) {
|
|
1933
|
+
let c = "";
|
|
1934
|
+
o.method.outputs.forEach(({ key: _ }) => {
|
|
1935
|
+
c += `${e}__output$${_}__ = __outputs__[${n(_)}];
|
|
1936
|
+
`;
|
|
1937
|
+
});
|
|
1938
|
+
const u = s.statementToCode(o, "HANDLE");
|
|
1939
|
+
return `{
|
|
1940
|
+
var __outputs__ = __callMethodV1__(${n(o.method.id)}, ${i}, ${a});
|
|
1941
|
+
${c}${u}}
|
|
1942
|
+
`;
|
|
1943
|
+
} else
|
|
1944
|
+
return `__callMethodV1__(${n(o.method.id)}, ${i}, ${a});
|
|
1937
1945
|
`;
|
|
1938
1946
|
};
|
|
1939
1947
|
const Fi = {
|
|
@@ -1943,10 +1951,10 @@ const Fi = {
|
|
|
1943
1951
|
kind: "",
|
|
1944
1952
|
names: [],
|
|
1945
1953
|
inputs: []
|
|
1946
|
-
}, this.appendDummyInput().appendField("%{
|
|
1954
|
+
}, this.appendDummyInput().appendField("%{BKY_APP_V1_IMPLEMENT_APP_METHOD_TITLE}").appendField(
|
|
1947
1955
|
new O(() => this.genMethodOpts_()),
|
|
1948
1956
|
"METHOD"
|
|
1949
|
-
), this.appendStatementInput("HANDLE").appendField("%{BKY_APP_DO}"), this.setStyle("procedure_blocks"), this.setTooltip("%{
|
|
1957
|
+
), this.appendStatementInput("HANDLE").appendField("%{BKY_APP_DO}"), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_APP_V1_IMPLEMENT_APP_METHOD_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_IMPLEMENT_APP_METHOD_HELPURL}"), this.initData_();
|
|
1950
1958
|
},
|
|
1951
1959
|
initData_: function() {
|
|
1952
1960
|
const t = cn()?.[0];
|
|
@@ -1991,7 +1999,7 @@ const Fi = {
|
|
|
1991
1999
|
e && e.dispose(), this.removeInput("INPUT" + t);
|
|
1992
2000
|
}
|
|
1993
2001
|
for (let t = 0; t < this.method.inputs.length; t++)
|
|
1994
|
-
this.appendValueInput("INPUT" + t), this.moveInputBefore("INPUT" + t, "HANDLE");
|
|
2002
|
+
this.getInput("INPUT" + t) || (this.appendValueInput("INPUT" + t), this.moveInputBefore("INPUT" + t, "HANDLE"));
|
|
1995
2003
|
},
|
|
1996
2004
|
ensureBlocks_: function() {
|
|
1997
2005
|
if (this.isInsertionMarker() || !this.method.id)
|
|
@@ -2013,19 +2021,26 @@ const Fi = {
|
|
|
2013
2021
|
this.setWarningText(f("WARN_METHOD_HAS_CHANGED"));
|
|
2014
2022
|
return;
|
|
2015
2023
|
}
|
|
2016
|
-
if (
|
|
2024
|
+
if (U(t.names, this.method.names) || (this.method.names = t.names), !U(t.inputs, this.method.inputs)) {
|
|
2017
2025
|
this.setWarningText(f("WARN_METHOD_HAS_CHANGED"));
|
|
2018
2026
|
return;
|
|
2019
2027
|
}
|
|
2020
2028
|
this.setWarningText(null);
|
|
2021
2029
|
}
|
|
2022
2030
|
};
|
|
2023
|
-
E.
|
|
2024
|
-
s.forBlock.
|
|
2025
|
-
const e = t, { methodKey:
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
${
|
|
2031
|
+
E.implement_app_method_v1 = Fi;
|
|
2032
|
+
s.forBlock.implement_app_method_v1 = function(t) {
|
|
2033
|
+
const e = s.INDENT, n = s.quote_, o = t, { methodKey: i } = Oe(o.method.id);
|
|
2034
|
+
let a = "";
|
|
2035
|
+
o.method.inputs.forEach(({ key: l }) => {
|
|
2036
|
+
a += `${e}var __input$${l}__ = __inputs__[${n(l)}];
|
|
2037
|
+
`;
|
|
2038
|
+
});
|
|
2039
|
+
const c = s.statementToCode(o, "HANDLE");
|
|
2040
|
+
return `function __implementMethod$${i}__(__inputs__) {
|
|
2041
|
+
${a}${e}var __outputs__ = {};
|
|
2042
|
+
${c}${e}return __outputs__;
|
|
2043
|
+
}
|
|
2029
2044
|
`;
|
|
2030
2045
|
};
|
|
2031
2046
|
const wi = {
|
|
@@ -2055,7 +2070,7 @@ const wi = {
|
|
|
2055
2070
|
this.method.id = t.id, this.method.kind = t.kind, this.method.names = t.names;
|
|
2056
2071
|
const e = this.getField("METHOD");
|
|
2057
2072
|
e.getOptions(!1), e.setValue(this.method.id);
|
|
2058
|
-
const n =
|
|
2073
|
+
const n = Ze(this.method.id)?.[0];
|
|
2059
2074
|
if (!n)
|
|
2060
2075
|
return;
|
|
2061
2076
|
this.output.key = n.key, this.output.name = n.name, this.output.type = n.type;
|
|
@@ -2098,14 +2113,14 @@ const wi = {
|
|
|
2098
2113
|
const n = this.method.id !== e.id;
|
|
2099
2114
|
this.method.id = e.id, this.method.kind = e.kind, this.method.names = e.names;
|
|
2100
2115
|
const o = this.getField("OUTPUT");
|
|
2101
|
-
if (o.getOptions(!1), n || !
|
|
2102
|
-
const i =
|
|
2116
|
+
if (o.getOptions(!1), n || !Ke(this.method.id, this.output.key)) {
|
|
2117
|
+
const i = Ze(this.method.id)?.[0];
|
|
2103
2118
|
o.setValue(i?.key ?? "");
|
|
2104
2119
|
}
|
|
2105
2120
|
this.onOutputChange_(o.getValue());
|
|
2106
2121
|
},
|
|
2107
2122
|
onOutputChange_: function(t) {
|
|
2108
|
-
const e =
|
|
2123
|
+
const e = Ke(this.method.id, t);
|
|
2109
2124
|
e ? (this.output.key = e.key, this.output.name = e.name, this.output.type = e.type) : (this.output.key = "", this.output.name = "", this.output.type = "string");
|
|
2110
2125
|
},
|
|
2111
2126
|
updateShape_: function() {
|
|
@@ -2133,7 +2148,7 @@ const wi = {
|
|
|
2133
2148
|
return;
|
|
2134
2149
|
}
|
|
2135
2150
|
t.names !== this.method.names && (this.method.names = t.names);
|
|
2136
|
-
const e =
|
|
2151
|
+
const e = Ke(this.method.id, this.output.key);
|
|
2137
2152
|
if (!e) {
|
|
2138
2153
|
this.setWarningText(f("WARN_OUTPUT_NOT_FOUND"));
|
|
2139
2154
|
return;
|
|
@@ -2214,7 +2229,7 @@ const Ki = {
|
|
|
2214
2229
|
this.app.id = t.id, this.app.name = t.name;
|
|
2215
2230
|
const e = this.getField("APP");
|
|
2216
2231
|
e.getOptions(!1), e.setValue(this.app.id);
|
|
2217
|
-
const n =
|
|
2232
|
+
const n = qe(this.app.id)?.[0];
|
|
2218
2233
|
if (!n)
|
|
2219
2234
|
return;
|
|
2220
2235
|
this.page.id = n.id, this.page.name = n.name;
|
|
@@ -2257,13 +2272,13 @@ const Ki = {
|
|
|
2257
2272
|
const n = this.app.id !== e.id;
|
|
2258
2273
|
this.app.id = e.id, this.app.name = e.name;
|
|
2259
2274
|
const o = this.getField("PAGE");
|
|
2260
|
-
if (o.getOptions(!1), n || !
|
|
2261
|
-
const a =
|
|
2275
|
+
if (o.getOptions(!1), n || !Ye(this.app.id, this.page.id)) {
|
|
2276
|
+
const a = qe(this.app.id)?.[0]?.id ?? "";
|
|
2262
2277
|
o.setValue(a), this.page.id === a && this.onPageChange_(a);
|
|
2263
2278
|
}
|
|
2264
2279
|
},
|
|
2265
2280
|
onPageChange_: function(t) {
|
|
2266
|
-
const e =
|
|
2281
|
+
const e = Ye(this.app.id, t);
|
|
2267
2282
|
e ? (this.page.id = e.id, this.page.name = e.name) : (this.page.id = "", this.page.name = "");
|
|
2268
2283
|
},
|
|
2269
2284
|
checkWarning_: function() {
|
|
@@ -2273,7 +2288,7 @@ const Ki = {
|
|
|
2273
2288
|
return;
|
|
2274
2289
|
}
|
|
2275
2290
|
t.name !== this.app.name && (this.app.name = t.name);
|
|
2276
|
-
const e =
|
|
2291
|
+
const e = Ye(this.app.id, this.page.id);
|
|
2277
2292
|
if (!e) {
|
|
2278
2293
|
this.setWarningText(f("WARN_PAGE_NOT_FOUND"));
|
|
2279
2294
|
return;
|
|
@@ -2395,7 +2410,7 @@ const Hi = {
|
|
|
2395
2410
|
}, 0);
|
|
2396
2411
|
},
|
|
2397
2412
|
genNodeOpts_: function() {
|
|
2398
|
-
return
|
|
2413
|
+
return ke("getProperty");
|
|
2399
2414
|
},
|
|
2400
2415
|
genPropertyOpts_: function() {
|
|
2401
2416
|
return to(this.node.id, "read");
|
|
@@ -2449,7 +2464,7 @@ const Hi = {
|
|
|
2449
2464
|
this.setWarningText(f("WARN_PROPERTY_HAS_CHANGED"));
|
|
2450
2465
|
return;
|
|
2451
2466
|
}
|
|
2452
|
-
|
|
2467
|
+
U(e.names, this.property.names) || (this.property.names = e.names), this.setWarningText(null);
|
|
2453
2468
|
}
|
|
2454
2469
|
};
|
|
2455
2470
|
E.get_app_property_v1 = Hi;
|
|
@@ -2500,7 +2515,7 @@ const Gi = {
|
|
|
2500
2515
|
}, 0);
|
|
2501
2516
|
},
|
|
2502
2517
|
genNodeOpts_: function() {
|
|
2503
|
-
return
|
|
2518
|
+
return ke("setProperty");
|
|
2504
2519
|
},
|
|
2505
2520
|
genPropertyOpts_: function() {
|
|
2506
2521
|
return to(this.node.id, "write");
|
|
@@ -2570,7 +2585,7 @@ const Gi = {
|
|
|
2570
2585
|
this.setWarningText(f("WARN_PROPERTY_HAS_CHANGED"));
|
|
2571
2586
|
return;
|
|
2572
2587
|
}
|
|
2573
|
-
|
|
2588
|
+
U(e.names, this.property.names) || (this.property.names = e.names), this.setWarningText(null);
|
|
2574
2589
|
}
|
|
2575
2590
|
};
|
|
2576
2591
|
E.set_app_property_v1 = Gi;
|
|
@@ -3442,7 +3457,7 @@ const Xi = C.xml, Ji = [
|
|
|
3442
3457
|
prefixInputs: ["INPUT"]
|
|
3443
3458
|
},
|
|
3444
3459
|
{
|
|
3445
|
-
type: "
|
|
3460
|
+
type: "implement_app_method_v1",
|
|
3446
3461
|
prefixInputs: ["INPUT"]
|
|
3447
3462
|
},
|
|
3448
3463
|
{
|
|
@@ -3569,7 +3584,7 @@ function no(t) {
|
|
|
3569
3584
|
e.push([i, o]);
|
|
3570
3585
|
}), k(e);
|
|
3571
3586
|
}
|
|
3572
|
-
function
|
|
3587
|
+
function tn() {
|
|
3573
3588
|
return g.compute.activeFunc;
|
|
3574
3589
|
}
|
|
3575
3590
|
function Nn(t) {
|
|
@@ -3733,11 +3748,11 @@ const ts = {
|
|
|
3733
3748
|
this.setWarningText(f("WARN_FUNC_NOT_FOUND"));
|
|
3734
3749
|
return;
|
|
3735
3750
|
}
|
|
3736
|
-
if (!
|
|
3751
|
+
if (!U(e.inputs, this.func.inputs)) {
|
|
3737
3752
|
this.setWarningText(f("WARN_FUNC_HAS_CHANGED"));
|
|
3738
3753
|
return;
|
|
3739
3754
|
}
|
|
3740
|
-
if (!
|
|
3755
|
+
if (!U(e.outputs, this.func.outputs)) {
|
|
3741
3756
|
this.setWarningText(f("WARN_FUNC_HAS_CHANGED"));
|
|
3742
3757
|
return;
|
|
3743
3758
|
}
|
|
@@ -3907,11 +3922,11 @@ const es = {
|
|
|
3907
3922
|
this.setWarningText(f("WARN_FUNC_NOT_FOUND"));
|
|
3908
3923
|
return;
|
|
3909
3924
|
}
|
|
3910
|
-
if (!
|
|
3925
|
+
if (!U(e.inputs, this.func.inputs)) {
|
|
3911
3926
|
this.setWarningText(f("WARN_FUNC_HAS_CHANGED"));
|
|
3912
3927
|
return;
|
|
3913
3928
|
}
|
|
3914
|
-
if (!
|
|
3929
|
+
if (!U(e.outputs, this.func.outputs)) {
|
|
3915
3930
|
this.setWarningText(f("WARN_FUNC_HAS_CHANGED"));
|
|
3916
3931
|
return;
|
|
3917
3932
|
}
|
|
@@ -3958,7 +3973,7 @@ const ns = {
|
|
|
3958
3973
|
initData_: function() {
|
|
3959
3974
|
if (this.func.id)
|
|
3960
3975
|
return;
|
|
3961
|
-
const { id: t, inputs: e } =
|
|
3976
|
+
const { id: t, inputs: e } = tn();
|
|
3962
3977
|
this.func.id = t, this.func.inputs = e;
|
|
3963
3978
|
},
|
|
3964
3979
|
saveExtraState: function() {
|
|
@@ -3995,8 +4010,8 @@ const ns = {
|
|
|
3995
4010
|
Y(this, t);
|
|
3996
4011
|
},
|
|
3997
4012
|
checkWarning_: function() {
|
|
3998
|
-
const { id: t, inputs: e } =
|
|
3999
|
-
if (this.func.id !== t && (this.func.id = t), !
|
|
4013
|
+
const { id: t, inputs: e } = tn();
|
|
4014
|
+
if (this.func.id !== t && (this.func.id = t), !U(e, this.func.inputs)) {
|
|
4000
4015
|
this.setWarningText(f("WARN_FUNC_HAS_CHANGED"));
|
|
4001
4016
|
return;
|
|
4002
4017
|
}
|
|
@@ -4027,7 +4042,7 @@ const os = {
|
|
|
4027
4042
|
initData_: function() {
|
|
4028
4043
|
if (this.output.id)
|
|
4029
4044
|
return;
|
|
4030
|
-
const t =
|
|
4045
|
+
const t = tn().outputs?.[0];
|
|
4031
4046
|
t && (this.output.id = t.id, this.output.name = t.name, this.output.type = t.type);
|
|
4032
4047
|
},
|
|
4033
4048
|
saveExtraState: function() {
|
|
@@ -4160,7 +4175,7 @@ T([
|
|
|
4160
4175
|
s.forBlock.compute_env_is_v1 = function(t) {
|
|
4161
4176
|
return [`__getEnvV1__() === ${s.quote_(t.getFieldValue("ENV"))}`, r.ATOMIC];
|
|
4162
4177
|
};
|
|
4163
|
-
function
|
|
4178
|
+
function nt() {
|
|
4164
4179
|
const t = [];
|
|
4165
4180
|
return g.data.spaces.forEach((e) => {
|
|
4166
4181
|
e.tables.length > 0 && t.push(e);
|
|
@@ -4170,9 +4185,9 @@ function mt(t) {
|
|
|
4170
4185
|
const { spaces: e } = g.data;
|
|
4171
4186
|
return e.find((n) => n.id === t);
|
|
4172
4187
|
}
|
|
4173
|
-
function
|
|
4188
|
+
function Ne() {
|
|
4174
4189
|
const t = [];
|
|
4175
|
-
return
|
|
4190
|
+
return nt().forEach(({ id: n, name: o }) => {
|
|
4176
4191
|
t.push([o, n]);
|
|
4177
4192
|
}), k(t);
|
|
4178
4193
|
}
|
|
@@ -4180,12 +4195,12 @@ function H(t) {
|
|
|
4180
4195
|
const { spaces: e } = g.data, n = e.find((o) => o.id === t);
|
|
4181
4196
|
return n ? n.tables : [];
|
|
4182
4197
|
}
|
|
4183
|
-
function
|
|
4198
|
+
function q(t, e) {
|
|
4184
4199
|
const { spaces: n } = g.data, o = n.find((i) => i.id === t);
|
|
4185
4200
|
if (o)
|
|
4186
4201
|
return o.tables.find((i) => i.id === e);
|
|
4187
4202
|
}
|
|
4188
|
-
function
|
|
4203
|
+
function Le(t) {
|
|
4189
4204
|
const e = [];
|
|
4190
4205
|
return H(t).forEach(({ id: o, name: i }) => {
|
|
4191
4206
|
e.push([i, o]);
|
|
@@ -4198,7 +4213,7 @@ function _e(t, e) {
|
|
|
4198
4213
|
const i = o.tables.find((a) => a.id === e);
|
|
4199
4214
|
return i ? i.columns : [];
|
|
4200
4215
|
}
|
|
4201
|
-
function
|
|
4216
|
+
function $e(t, e, n) {
|
|
4202
4217
|
const { spaces: o } = g.data, i = o.find((c) => c.id === t);
|
|
4203
4218
|
if (!i)
|
|
4204
4219
|
return;
|
|
@@ -4217,7 +4232,7 @@ function ss(t) {
|
|
|
4217
4232
|
if (e.targetBlock())
|
|
4218
4233
|
return;
|
|
4219
4234
|
let n, o;
|
|
4220
|
-
const i =
|
|
4235
|
+
const i = nt()?.[0];
|
|
4221
4236
|
if (i) {
|
|
4222
4237
|
const u = H(i.id)?.[0];
|
|
4223
4238
|
if (u) {
|
|
@@ -4348,7 +4363,7 @@ const rs = {
|
|
|
4348
4363
|
initData_: function() {
|
|
4349
4364
|
if (this.space.id)
|
|
4350
4365
|
return;
|
|
4351
|
-
const t =
|
|
4366
|
+
const t = nt()?.[0];
|
|
4352
4367
|
if (!t)
|
|
4353
4368
|
return;
|
|
4354
4369
|
this.space.id = t.id, this.space.name = t.name;
|
|
@@ -4372,10 +4387,10 @@ const rs = {
|
|
|
4372
4387
|
}, 0);
|
|
4373
4388
|
},
|
|
4374
4389
|
genSpaceOpts_: function() {
|
|
4375
|
-
return
|
|
4390
|
+
return Ne();
|
|
4376
4391
|
},
|
|
4377
4392
|
genTableOpts_: function() {
|
|
4378
|
-
return
|
|
4393
|
+
return Le(this.space.id);
|
|
4379
4394
|
},
|
|
4380
4395
|
genColumnOpts_: function() {
|
|
4381
4396
|
return is(this.space.id, this.table.id);
|
|
@@ -4397,25 +4412,25 @@ const rs = {
|
|
|
4397
4412
|
return;
|
|
4398
4413
|
}
|
|
4399
4414
|
const n = e.id !== this.space.id;
|
|
4400
|
-
if (this.space.id = e.id, this.space.name = e.name, n || !
|
|
4415
|
+
if (this.space.id = e.id, this.space.name = e.name, n || !q(this.space.id, this.table.id)) {
|
|
4401
4416
|
const o = H(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
|
|
4402
4417
|
i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
|
|
4403
4418
|
}
|
|
4404
4419
|
},
|
|
4405
4420
|
onTableChange_: function(t) {
|
|
4406
|
-
const e =
|
|
4421
|
+
const e = q(this.space.id, t);
|
|
4407
4422
|
if (!e) {
|
|
4408
4423
|
console.assert(!1);
|
|
4409
4424
|
return;
|
|
4410
4425
|
}
|
|
4411
4426
|
const n = e.id !== this.table.id;
|
|
4412
|
-
if (this.table.id = e.id, this.table.name = e.name, n ||
|
|
4427
|
+
if (this.table.id = e.id, this.table.name = e.name, n || !$e(this.space.id, this.table.id, this.column.id)) {
|
|
4413
4428
|
const o = _e(this.space.id, this.table.id)?.[0]?.id ?? "", i = this.getField("COLUMN");
|
|
4414
4429
|
i.getOptions(!1), i.setValue(o, !1), this.onColumnChange_(o);
|
|
4415
4430
|
}
|
|
4416
4431
|
},
|
|
4417
4432
|
onColumnChange_: function(t) {
|
|
4418
|
-
const e =
|
|
4433
|
+
const e = $e(this.space.id, this.table.id, t);
|
|
4419
4434
|
e ? (this.column.id = e.id, this.column.name = e.name, this.column.type = e.type, this.column.extend = e.extend) : (this.column.id = "", this.column.name = "", this.column.type = "", this.column.extend = ""), this.updateShape_(), this.updateBlocks_(!0), this.updateCheck_();
|
|
4420
4435
|
},
|
|
4421
4436
|
updateShape_: function() {
|
|
@@ -4434,7 +4449,7 @@ const rs = {
|
|
|
4434
4449
|
n && n.dispose();
|
|
4435
4450
|
else if (n)
|
|
4436
4451
|
return;
|
|
4437
|
-
const o =
|
|
4452
|
+
const o = Je(this.workspace, this.column.type);
|
|
4438
4453
|
o && (e.setCheck(null), e.connect(o.outputConnection));
|
|
4439
4454
|
},
|
|
4440
4455
|
updateCheck_: function() {
|
|
@@ -4448,13 +4463,13 @@ const rs = {
|
|
|
4448
4463
|
return;
|
|
4449
4464
|
}
|
|
4450
4465
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
4451
|
-
const e =
|
|
4466
|
+
const e = q(this.space.id, this.table.id);
|
|
4452
4467
|
if (!e) {
|
|
4453
4468
|
this.setWarningText(f("WARN_TABLE_NOT_FOUND"));
|
|
4454
4469
|
return;
|
|
4455
4470
|
}
|
|
4456
4471
|
e.name !== this.table.name && (this.table.name = e.name);
|
|
4457
|
-
const n =
|
|
4472
|
+
const n = $e(
|
|
4458
4473
|
this.space.id,
|
|
4459
4474
|
this.table.id,
|
|
4460
4475
|
this.column.id
|
|
@@ -4582,7 +4597,7 @@ function ps(t) {
|
|
|
4582
4597
|
const e = t.getInput("TABLE").connection;
|
|
4583
4598
|
if (e.targetBlock())
|
|
4584
4599
|
return;
|
|
4585
|
-
const n =
|
|
4600
|
+
const n = nt()?.[0], o = H(n?.id ?? "")?.[0], i = {
|
|
4586
4601
|
type: "select_table_v1",
|
|
4587
4602
|
extraState: {
|
|
4588
4603
|
space: {
|
|
@@ -4601,7 +4616,7 @@ function ds(t) {
|
|
|
4601
4616
|
const e = t.getInput("CONDITION").connection;
|
|
4602
4617
|
if (e.targetBlock())
|
|
4603
4618
|
return;
|
|
4604
|
-
const n =
|
|
4619
|
+
const n = nt()?.[0], o = H(n?.id ?? "")?.[0], i = _e(n?.id, o?.id)?.[0], a = {
|
|
4605
4620
|
type: "cond_atomic_v1",
|
|
4606
4621
|
extraState: {
|
|
4607
4622
|
space: {
|
|
@@ -4711,7 +4726,7 @@ function ms(t) {
|
|
|
4711
4726
|
if (e.targetBlock())
|
|
4712
4727
|
return;
|
|
4713
4728
|
let n, o;
|
|
4714
|
-
const i =
|
|
4729
|
+
const i = nt()?.[0];
|
|
4715
4730
|
if (i) {
|
|
4716
4731
|
const u = H(i.id)?.[0];
|
|
4717
4732
|
if (u) {
|
|
@@ -4958,7 +4973,7 @@ const vs = {
|
|
|
4958
4973
|
initData_: function() {
|
|
4959
4974
|
if (this.space.id)
|
|
4960
4975
|
return;
|
|
4961
|
-
const t =
|
|
4976
|
+
const t = nt()?.[0];
|
|
4962
4977
|
if (!t)
|
|
4963
4978
|
return;
|
|
4964
4979
|
this.space.id = t.id, this.space.name = t.name;
|
|
@@ -4984,10 +4999,10 @@ const vs = {
|
|
|
4984
4999
|
}, 0);
|
|
4985
5000
|
},
|
|
4986
5001
|
genSpaceOpts_: function() {
|
|
4987
|
-
return
|
|
5002
|
+
return Ne();
|
|
4988
5003
|
},
|
|
4989
5004
|
genTableOpts_: function() {
|
|
4990
|
-
return
|
|
5005
|
+
return Le(this.space.id);
|
|
4991
5006
|
},
|
|
4992
5007
|
genColumnOpts_: function() {
|
|
4993
5008
|
const t = [];
|
|
@@ -5024,13 +5039,13 @@ const vs = {
|
|
|
5024
5039
|
return;
|
|
5025
5040
|
}
|
|
5026
5041
|
const n = e.id !== this.space.id;
|
|
5027
|
-
if (this.space.id = e.id, this.space.name = e.name, n || !
|
|
5042
|
+
if (this.space.id = e.id, this.space.name = e.name, n || !q(this.space.id, this.table.id)) {
|
|
5028
5043
|
const o = H(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
|
|
5029
5044
|
i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
|
|
5030
5045
|
}
|
|
5031
5046
|
},
|
|
5032
5047
|
onTableChange_: function(t) {
|
|
5033
|
-
const e =
|
|
5048
|
+
const e = q(this.space.id, t);
|
|
5034
5049
|
if (!e) {
|
|
5035
5050
|
console.assert(!1);
|
|
5036
5051
|
return;
|
|
@@ -5130,12 +5145,12 @@ const vs = {
|
|
|
5130
5145
|
return;
|
|
5131
5146
|
}
|
|
5132
5147
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
5133
|
-
const e =
|
|
5148
|
+
const e = q(this.space.id, this.table.id);
|
|
5134
5149
|
if (!e) {
|
|
5135
5150
|
this.setWarningText(f("WARN_TABLE_NOT_FOUND"));
|
|
5136
5151
|
return;
|
|
5137
5152
|
}
|
|
5138
|
-
if (e.name !== this.table.name && (this.table.name = e.name), !
|
|
5153
|
+
if (e.name !== this.table.name && (this.table.name = e.name), !U(e.columns, this.table.columns)) {
|
|
5139
5154
|
this.setWarningText(f("WARN_TABLE_HAS_CHANGED"));
|
|
5140
5155
|
return;
|
|
5141
5156
|
}
|
|
@@ -5173,7 +5188,7 @@ const ys = {
|
|
|
5173
5188
|
initData_: function() {
|
|
5174
5189
|
if (this.space.id)
|
|
5175
5190
|
return;
|
|
5176
|
-
const t =
|
|
5191
|
+
const t = nt()?.[0];
|
|
5177
5192
|
if (!t)
|
|
5178
5193
|
return;
|
|
5179
5194
|
this.space.id = t.id, this.space.name = t.name;
|
|
@@ -5196,10 +5211,10 @@ const ys = {
|
|
|
5196
5211
|
this.space.id = t.space?.id ?? "", this.space.name = t.space?.name ?? "", this.table.id = t.table?.id ?? "", this.table.name = t.table?.name ?? "", this.checkWarning_();
|
|
5197
5212
|
},
|
|
5198
5213
|
genSpaceOpts_: function() {
|
|
5199
|
-
return
|
|
5214
|
+
return Ne();
|
|
5200
5215
|
},
|
|
5201
5216
|
genTableOpts_: function() {
|
|
5202
|
-
return
|
|
5217
|
+
return Le(this.space.id);
|
|
5203
5218
|
},
|
|
5204
5219
|
onchange: function(t) {
|
|
5205
5220
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -5218,13 +5233,13 @@ const ys = {
|
|
|
5218
5233
|
return;
|
|
5219
5234
|
}
|
|
5220
5235
|
let n = !1;
|
|
5221
|
-
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("TABLE").getOptions(!1), n || !
|
|
5236
|
+
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("TABLE").getOptions(!1), n || !q(this.space.id, this.table.id)) {
|
|
5222
5237
|
const i = H(this.space.id)?.[0];
|
|
5223
5238
|
i ? this.setFieldValue(i.id, "TABLE") : this.setFieldValue("", "TABLE");
|
|
5224
5239
|
}
|
|
5225
5240
|
},
|
|
5226
5241
|
onTableChange_: function(t) {
|
|
5227
|
-
const e =
|
|
5242
|
+
const e = q(this.space.id, t);
|
|
5228
5243
|
if (!e) {
|
|
5229
5244
|
console.assert(!1);
|
|
5230
5245
|
return;
|
|
@@ -5238,7 +5253,7 @@ const ys = {
|
|
|
5238
5253
|
return;
|
|
5239
5254
|
}
|
|
5240
5255
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
5241
|
-
const e =
|
|
5256
|
+
const e = q(this.space.id, this.table.id);
|
|
5242
5257
|
if (!e) {
|
|
5243
5258
|
this.setWarningText(f("WARN_TABLE_NOT_FOUND"));
|
|
5244
5259
|
return;
|
|
@@ -5354,7 +5369,7 @@ const Ls = {
|
|
|
5354
5369
|
initData_: function() {
|
|
5355
5370
|
if (this.space.id)
|
|
5356
5371
|
return;
|
|
5357
|
-
const t =
|
|
5372
|
+
const t = nt()?.[0];
|
|
5358
5373
|
if (!t)
|
|
5359
5374
|
return;
|
|
5360
5375
|
this.space.id = t.id, this.space.name = t.name;
|
|
@@ -5380,10 +5395,10 @@ const Ls = {
|
|
|
5380
5395
|
}, 0);
|
|
5381
5396
|
},
|
|
5382
5397
|
genSpaceOpts_: function() {
|
|
5383
|
-
return
|
|
5398
|
+
return Ne();
|
|
5384
5399
|
},
|
|
5385
5400
|
genTableOpts_: function() {
|
|
5386
|
-
return
|
|
5401
|
+
return Le(this.space.id);
|
|
5387
5402
|
},
|
|
5388
5403
|
genColumnOpts_: function() {
|
|
5389
5404
|
const t = [];
|
|
@@ -5420,13 +5435,13 @@ const Ls = {
|
|
|
5420
5435
|
return;
|
|
5421
5436
|
}
|
|
5422
5437
|
const n = e.id !== this.space.id;
|
|
5423
|
-
if (this.space.id = e.id, this.space.name = e.name, n || !
|
|
5438
|
+
if (this.space.id = e.id, this.space.name = e.name, n || !q(this.space.id, this.table.id)) {
|
|
5424
5439
|
const o = H(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
|
|
5425
5440
|
i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
|
|
5426
5441
|
}
|
|
5427
5442
|
},
|
|
5428
5443
|
onTableChange_: function(t) {
|
|
5429
|
-
const e =
|
|
5444
|
+
const e = q(this.space.id, t);
|
|
5430
5445
|
if (!e) {
|
|
5431
5446
|
console.assert(!1);
|
|
5432
5447
|
return;
|
|
@@ -5450,7 +5465,7 @@ const Ls = {
|
|
|
5450
5465
|
}
|
|
5451
5466
|
const o = this.getInput("ADD" + t).connection, i = o.targetBlock();
|
|
5452
5467
|
i && i.dispose();
|
|
5453
|
-
const a =
|
|
5468
|
+
const a = Je(this.workspace, n.type);
|
|
5454
5469
|
a && (o.setCheck(null), o.connect(a.outputConnection)), this.updateCheck_();
|
|
5455
5470
|
},
|
|
5456
5471
|
decompose: function(t) {
|
|
@@ -5541,7 +5556,7 @@ const Ls = {
|
|
|
5541
5556
|
if (!c)
|
|
5542
5557
|
continue;
|
|
5543
5558
|
n.setCheck(null);
|
|
5544
|
-
const u =
|
|
5559
|
+
const u = Je(this.workspace, c.type);
|
|
5545
5560
|
u && o.connect(u.outputConnection);
|
|
5546
5561
|
}
|
|
5547
5562
|
},
|
|
@@ -5561,12 +5576,12 @@ const Ls = {
|
|
|
5561
5576
|
return;
|
|
5562
5577
|
}
|
|
5563
5578
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
5564
|
-
const e =
|
|
5579
|
+
const e = q(this.space.id, this.table.id);
|
|
5565
5580
|
if (!e) {
|
|
5566
5581
|
this.setWarningText(f("WARN_TABLE_NOT_FOUND"));
|
|
5567
5582
|
return;
|
|
5568
5583
|
}
|
|
5569
|
-
if (e.name !== this.table.name && (this.table.name = e.name), !
|
|
5584
|
+
if (e.name !== this.table.name && (this.table.name = e.name), !U(e.columns, this.table.columns)) {
|
|
5570
5585
|
this.setWarningText(f("WARN_TABLE_HAS_CHANGED"));
|
|
5571
5586
|
return;
|
|
5572
5587
|
}
|
|
@@ -5590,7 +5605,7 @@ function Ss(t) {
|
|
|
5590
5605
|
if (e.targetBlock())
|
|
5591
5606
|
return;
|
|
5592
5607
|
let n, o;
|
|
5593
|
-
const i =
|
|
5608
|
+
const i = nt()?.[0];
|
|
5594
5609
|
if (i) {
|
|
5595
5610
|
const u = H(i.id)?.[0];
|
|
5596
5611
|
if (u) {
|
|
@@ -5835,7 +5850,7 @@ const Ln = C.xml, Us = {
|
|
|
5835
5850
|
E.json_map_v1 = Us;
|
|
5836
5851
|
const Vs = {
|
|
5837
5852
|
init: function() {
|
|
5838
|
-
this.appendDummyInput().appendField(new
|
|
5853
|
+
this.appendDummyInput().appendField(new Ge(0), "VALUE"), this.setOutput(!0, "JsonNumber"), this.setColour(230);
|
|
5839
5854
|
}
|
|
5840
5855
|
};
|
|
5841
5856
|
E.json_number_v1 = Vs;
|
|
@@ -7933,7 +7948,7 @@ const Sn = C.xml, na = {
|
|
|
7933
7948
|
E.procedure_def_container_v1 = na;
|
|
7934
7949
|
const oa = {
|
|
7935
7950
|
init: function() {
|
|
7936
|
-
const t = new ht(
|
|
7951
|
+
const t = new ht(We.DEFAULT_ARG);
|
|
7937
7952
|
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;
|
|
7938
7953
|
},
|
|
7939
7954
|
validator_: function(t) {
|
|
@@ -7958,9 +7973,9 @@ const ia = {
|
|
|
7958
7973
|
init: function() {
|
|
7959
7974
|
this.withReturn = !1, this.args = [];
|
|
7960
7975
|
const t = new ht(
|
|
7961
|
-
|
|
7976
|
+
We.findLegalName("", this)
|
|
7962
7977
|
);
|
|
7963
|
-
t.setValidator(
|
|
7978
|
+
t.setValidator(We.rename), t.setSpellcheck(!1), this.appendDummyInput("DUMMY").appendField(t, "NAME"), this.appendStatementInput("HANDLE"), this.setMutator(
|
|
7964
7979
|
new Tt.MutatorIcon(
|
|
7965
7980
|
["procedure_def_item_v1"],
|
|
7966
7981
|
this
|
|
@@ -8255,7 +8270,7 @@ const _a = {
|
|
|
8255
8270
|
};
|
|
8256
8271
|
},
|
|
8257
8272
|
loadExtraState: function(t) {
|
|
8258
|
-
this.space =
|
|
8273
|
+
this.space = Ve(t.space), this.dir = Ve(t.dir), this.resource = Ve(t.resource);
|
|
8259
8274
|
},
|
|
8260
8275
|
genSpaceOpts_: function() {
|
|
8261
8276
|
return la();
|
|
@@ -9040,7 +9055,7 @@ Qt.getText_ = function() {
|
|
|
9040
9055
|
if (this.name === "ELEMENT")
|
|
9041
9056
|
return e.element.name;
|
|
9042
9057
|
if (this.name === "NODE") {
|
|
9043
|
-
const n =
|
|
9058
|
+
const n = et[e.node.key];
|
|
9044
9059
|
if (n) {
|
|
9045
9060
|
const o = t.global.t(n.name), i = e.node.alias;
|
|
9046
9061
|
return `${o} / ${i}`;
|
|
@@ -9053,7 +9068,7 @@ Qt.getText_ = function() {
|
|
|
9053
9068
|
return console.log(e.event), Ie(n, o);
|
|
9054
9069
|
} else if (this.name === "METHOD") {
|
|
9055
9070
|
const { kind: n, names: o } = e.method;
|
|
9056
|
-
return
|
|
9071
|
+
return ve(n, o);
|
|
9057
9072
|
} else {
|
|
9058
9073
|
if (this.name === "SPACE")
|
|
9059
9074
|
return e.space.name;
|
|
@@ -9330,7 +9345,7 @@ function La(t) {
|
|
|
9330
9345
|
break;
|
|
9331
9346
|
}
|
|
9332
9347
|
}
|
|
9333
|
-
const
|
|
9348
|
+
const en = ["get_app_property_v1", "get_app_state_v1"];
|
|
9334
9349
|
function ut(t, e) {
|
|
9335
9350
|
return t.find((o) => o === e) !== void 0 ? !1 : (t.push(e), !0);
|
|
9336
9351
|
}
|
|
@@ -9338,7 +9353,7 @@ function Sa(t) {
|
|
|
9338
9353
|
const e = [];
|
|
9339
9354
|
function n(o) {
|
|
9340
9355
|
for (const i of o.getChildren(!0))
|
|
9341
|
-
|
|
9356
|
+
en.includes(i.type) && e.push(i), n(i);
|
|
9342
9357
|
}
|
|
9343
9358
|
return n(t), e;
|
|
9344
9359
|
}
|
|
@@ -9361,11 +9376,11 @@ function Ba(t) {
|
|
|
9361
9376
|
function ba(t) {
|
|
9362
9377
|
const e = [];
|
|
9363
9378
|
for (const n of t.getChildren(!0))
|
|
9364
|
-
if (
|
|
9379
|
+
if (en.includes(n.type))
|
|
9365
9380
|
e.push(n);
|
|
9366
9381
|
else if (n.type === "object_get_v1") {
|
|
9367
9382
|
const o = n.getInputTargetBlock("OBJECT");
|
|
9368
|
-
o &&
|
|
9383
|
+
o && en.includes(o.type) && e.push(n);
|
|
9369
9384
|
}
|
|
9370
9385
|
return e;
|
|
9371
9386
|
}
|
|
@@ -9485,9 +9500,9 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9485
9500
|
a();
|
|
9486
9501
|
};
|
|
9487
9502
|
return e({ cleanWorkspace: a }), (u, l) => {
|
|
9488
|
-
const _ =
|
|
9503
|
+
const _ = M("v-btn"), d = M("v-tooltip");
|
|
9489
9504
|
return S(), st(d, {
|
|
9490
|
-
text:
|
|
9505
|
+
text: D(n)("x-block-lib.tip.hotkeyCtrlQ")
|
|
9491
9506
|
}, {
|
|
9492
9507
|
activator: at(({ props: h }) => [
|
|
9493
9508
|
L(_, sn(h, {
|
|
@@ -9511,9 +9526,9 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9511
9526
|
setup(t) {
|
|
9512
9527
|
const { t: e } = Xt(), n = Kt(t, "modelValue");
|
|
9513
9528
|
return (o, i) => {
|
|
9514
|
-
const a =
|
|
9529
|
+
const a = M("v-btn"), c = M("v-tooltip");
|
|
9515
9530
|
return S(), st(c, {
|
|
9516
|
-
text:
|
|
9531
|
+
text: D(e)("x-block-lib.tip.hotkeyCtrlW")
|
|
9517
9532
|
}, {
|
|
9518
9533
|
activator: at(({ props: u }) => [
|
|
9519
9534
|
L(a, sn(u, {
|
|
@@ -9559,17 +9574,17 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9559
9574
|
pointerEvents: "none"
|
|
9560
9575
|
}));
|
|
9561
9576
|
return (d, h) => {
|
|
9562
|
-
const p =
|
|
9563
|
-
return Zo((S(),
|
|
9577
|
+
const p = M("v-spacer"), m = M("v-icon"), A = zo("ripple");
|
|
9578
|
+
return Zo((S(), tt("div", {
|
|
9564
9579
|
class: "d-flex align-center cursor-pointer",
|
|
9565
|
-
style:
|
|
9566
|
-
onClick: h[1] || (h[1] = (
|
|
9567
|
-
onMouseout: h[2] || (h[2] = (
|
|
9568
|
-
onMouseover: h[3] || (h[3] = (
|
|
9580
|
+
style: j(l.value),
|
|
9581
|
+
onClick: h[1] || (h[1] = (R) => c("x-click", a.id)),
|
|
9582
|
+
onMouseout: h[2] || (h[2] = (R) => u.value = !1),
|
|
9583
|
+
onMouseover: h[3] || (h[3] = (R) => u.value = !0)
|
|
9569
9584
|
}, [
|
|
9570
9585
|
w("div", Va, [
|
|
9571
9586
|
w("span", xa, $t(a.title), 1),
|
|
9572
|
-
a.desc ? (S(),
|
|
9587
|
+
a.desc ? (S(), tt("span", Ya, $t(a.desc), 1)) : rt("", !0)
|
|
9573
9588
|
]),
|
|
9574
9589
|
L(p),
|
|
9575
9590
|
L(m, {
|
|
@@ -9579,7 +9594,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9579
9594
|
}, ["stop"]))
|
|
9580
9595
|
}),
|
|
9581
9596
|
w("div", {
|
|
9582
|
-
style:
|
|
9597
|
+
style: j(_.value)
|
|
9583
9598
|
}, null, 4)
|
|
9584
9599
|
], 36)), [
|
|
9585
9600
|
[A]
|
|
@@ -9591,7 +9606,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9591
9606
|
class: "text-caption text-grey"
|
|
9592
9607
|
}, Ka = /* @__PURE__ */ ct({
|
|
9593
9608
|
__name: "index",
|
|
9594
|
-
props: /* @__PURE__ */
|
|
9609
|
+
props: /* @__PURE__ */ je({
|
|
9595
9610
|
lock: { type: Boolean }
|
|
9596
9611
|
}, {
|
|
9597
9612
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -9607,18 +9622,25 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9607
9622
|
}
|
|
9608
9623
|
const p = [];
|
|
9609
9624
|
i.workspace.getTopBlocks(!0).forEach((A) => {
|
|
9610
|
-
const
|
|
9611
|
-
let
|
|
9625
|
+
const R = A.id === Uo()?.id;
|
|
9626
|
+
let P = "";
|
|
9612
9627
|
if (A.type.startsWith("on_app_event_v")) {
|
|
9613
|
-
const
|
|
9614
|
-
Ct && (
|
|
9615
|
-
} else
|
|
9628
|
+
const G = A, Ct = et[G.node.key];
|
|
9629
|
+
Ct && (P = n(Ct.name), G.node.alias && (P += " / " + G.node.alias), P += " - " + Ie(G.event.kind, G.event.names));
|
|
9630
|
+
} else if (A.type.startsWith("watch_effect_v"))
|
|
9631
|
+
P = n("x-block-lib.watchEffect");
|
|
9632
|
+
else if (A.type.startsWith("app_bind_v"))
|
|
9633
|
+
P = n("x-block-lib.bind");
|
|
9634
|
+
else if (A.type.startsWith("implement_app_method_v")) {
|
|
9635
|
+
const G = A;
|
|
9636
|
+
P = n("x-block-lib.implementMethod"), P += " - " + ve(G.method.kind, G.method.names);
|
|
9637
|
+
} else A.type.startsWith("func_entry_v") ? P = n("x-block-lib.funcEntry") : A.type.startsWith("procedure_def_v") ? P = n("x-block-lib.procedure") + " - " + A.getFieldValue("NAME") : P = n("x-block-lib.temporaryBlock");
|
|
9616
9638
|
const At = A.getCommentText() ?? "";
|
|
9617
9639
|
p.push({
|
|
9618
9640
|
id: A.id,
|
|
9619
|
-
name:
|
|
9641
|
+
name: P,
|
|
9620
9642
|
desc: At,
|
|
9621
|
-
select:
|
|
9643
|
+
select: R
|
|
9622
9644
|
});
|
|
9623
9645
|
}), a.value = p;
|
|
9624
9646
|
} });
|
|
@@ -9650,14 +9672,14 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9650
9672
|
console.assert(!1);
|
|
9651
9673
|
return;
|
|
9652
9674
|
}
|
|
9653
|
-
let
|
|
9654
|
-
p.newIndex > p.oldIndex ?
|
|
9655
|
-
let
|
|
9656
|
-
|
|
9657
|
-
|
|
9675
|
+
let R = "";
|
|
9676
|
+
p.newIndex > p.oldIndex ? R = u[p.newIndex] : p.newIndex > 0 && (R = u[p.newIndex - 1]);
|
|
9677
|
+
let P = -10;
|
|
9678
|
+
R !== "" && (P = i.workspace.getBlockById(
|
|
9679
|
+
R
|
|
9658
9680
|
).getRelativeToSurfaceXY().y + 10);
|
|
9659
9681
|
const At = A.getRelativeToSurfaceXY();
|
|
9660
|
-
A.moveTo(new C.Coordinate(At.x,
|
|
9682
|
+
A.moveTo(new C.Coordinate(At.x, P)), i.workspace.cleanUp(), ro();
|
|
9661
9683
|
}, h = async (p) => {
|
|
9662
9684
|
if (!i.workspace) {
|
|
9663
9685
|
console.assert(!1);
|
|
@@ -9666,7 +9688,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9666
9688
|
const m = i.workspace.getBlockById(p);
|
|
9667
9689
|
Vn.setSelected(m), un(p), o.value = !1;
|
|
9668
9690
|
};
|
|
9669
|
-
return (p, m) => a.value.length > 0 ? (S(), st(
|
|
9691
|
+
return (p, m) => a.value.length > 0 ? (S(), st(D(Mo), {
|
|
9670
9692
|
key: 0,
|
|
9671
9693
|
modelValue: a.value,
|
|
9672
9694
|
"onUpdate:modelValue": m[0] || (m[0] = (A) => a.value = A),
|
|
@@ -9678,7 +9700,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9678
9700
|
onStart: l
|
|
9679
9701
|
}, {
|
|
9680
9702
|
default: at(() => [
|
|
9681
|
-
(S(!0),
|
|
9703
|
+
(S(!0), tt(Kn, null, ti(a.value, (A) => (S(), st(Fa, {
|
|
9682
9704
|
id: A.id,
|
|
9683
9705
|
key: A.id,
|
|
9684
9706
|
desc: A.desc,
|
|
@@ -9688,14 +9710,14 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9688
9710
|
}, null, 8, ["id", "desc", "select", "title"]))), 128))
|
|
9689
9711
|
]),
|
|
9690
9712
|
_: 1
|
|
9691
|
-
}, 8, ["modelValue"])) : (S(),
|
|
9713
|
+
}, 8, ["modelValue"])) : (S(), tt("span", wa, $t(D(n)("x-block-lib.noOption")), 1));
|
|
9692
9714
|
}
|
|
9693
9715
|
}), $a = (t, e) => {
|
|
9694
9716
|
const n = t.__vccOpts || t;
|
|
9695
9717
|
for (const [o, i] of e)
|
|
9696
9718
|
n[o] = i;
|
|
9697
9719
|
return n;
|
|
9698
|
-
}, Ha = /* @__PURE__ */ $a(Ka, [["__scopeId", "data-v-
|
|
9720
|
+
}, Ha = /* @__PURE__ */ $a(Ka, [["__scopeId", "data-v-daa85471"]]), Ga = /* @__PURE__ */ ct({
|
|
9699
9721
|
__name: "index",
|
|
9700
9722
|
props: {
|
|
9701
9723
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -9719,7 +9741,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9719
9741
|
const l = u.getBlockById(c);
|
|
9720
9742
|
Vn.setSelected(l), un(c), n.value = !1;
|
|
9721
9743
|
};
|
|
9722
|
-
return (c, u) => (S(),
|
|
9744
|
+
return (c, u) => (S(), tt("div", {
|
|
9723
9745
|
onClick: u[0] || (u[0] = (l) => a(""))
|
|
9724
9746
|
}, "blockTree"));
|
|
9725
9747
|
}
|
|
@@ -9745,7 +9767,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9745
9767
|
};
|
|
9746
9768
|
}), l = F(() => ({
|
|
9747
9769
|
height: "60px"
|
|
9748
|
-
})), { open: _ } =
|
|
9770
|
+
})), { open: _ } = nn(`blocklyNavigatorDlg${Xe()}`);
|
|
9749
9771
|
ei(() => {
|
|
9750
9772
|
_.value = !1;
|
|
9751
9773
|
});
|
|
@@ -9753,70 +9775,70 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9753
9775
|
return e({ open: _, update: () => {
|
|
9754
9776
|
t.type === "list" ? d.value?.update() : t.type === "tree" && h.value?.update();
|
|
9755
9777
|
} }), (m, A) => {
|
|
9756
|
-
const
|
|
9757
|
-
return S(),
|
|
9758
|
-
L(
|
|
9759
|
-
modelValue:
|
|
9760
|
-
"onUpdate:modelValue": A[5] || (A[5] = (
|
|
9778
|
+
const R = M("v-sheet"), P = M("v-btn"), At = M("v-spacer"), G = M("v-dialog"), Ct = M("v-tooltip");
|
|
9779
|
+
return S(), tt(Kn, null, [
|
|
9780
|
+
L(G, {
|
|
9781
|
+
modelValue: D(_),
|
|
9782
|
+
"onUpdate:modelValue": A[5] || (A[5] = (W) => ne(_) ? _.value = W : null),
|
|
9761
9783
|
eager: "",
|
|
9762
9784
|
fullscreen: "",
|
|
9763
9785
|
"no-click-animation": "",
|
|
9764
9786
|
persistent: "",
|
|
9765
9787
|
transition: "scroll-x-reverse-transition",
|
|
9766
|
-
onKeydown: A[6] || (A[6] = $n(Ft((
|
|
9788
|
+
onKeydown: A[6] || (A[6] = $n(Ft((W) => _.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
9767
9789
|
}, {
|
|
9768
9790
|
default: at(() => [
|
|
9769
9791
|
w("div", {
|
|
9770
9792
|
class: "w-100 h-100 d-flex flex-row-reverse",
|
|
9771
|
-
onClick: A[3] || (A[3] = Ft((
|
|
9772
|
-
onContextmenu: A[4] || (A[4] = Ft((
|
|
9793
|
+
onClick: A[3] || (A[3] = Ft((W) => _.value = !1, ["self"])),
|
|
9794
|
+
onContextmenu: A[4] || (A[4] = Ft((W) => _.value = !1, ["self", "prevent"]))
|
|
9773
9795
|
}, [
|
|
9774
9796
|
w("div", {
|
|
9775
9797
|
class: "elevation-2",
|
|
9776
|
-
style:
|
|
9798
|
+
style: j(c.value)
|
|
9777
9799
|
}, [
|
|
9778
|
-
|
|
9800
|
+
D(i) ? (S(), st(R, {
|
|
9779
9801
|
key: 0,
|
|
9780
9802
|
color: "transparent",
|
|
9781
9803
|
height: 24
|
|
9782
9804
|
})) : rt("", !0),
|
|
9783
|
-
L(
|
|
9805
|
+
L(R, {
|
|
9784
9806
|
class: "d-flex align-center px-2",
|
|
9785
9807
|
color: "transparent",
|
|
9786
9808
|
height: 48
|
|
9787
9809
|
}, {
|
|
9788
9810
|
default: at(() => [
|
|
9789
|
-
L(
|
|
9811
|
+
L(P, {
|
|
9790
9812
|
density: "comfortable",
|
|
9791
9813
|
icon: "mdi-close",
|
|
9792
9814
|
variant: "text",
|
|
9793
|
-
onClick: A[0] || (A[0] = (
|
|
9815
|
+
onClick: A[0] || (A[0] = (W) => _.value = !1)
|
|
9794
9816
|
}),
|
|
9795
|
-
w("span", Wa, $t(
|
|
9817
|
+
w("span", Wa, $t(D(n)("x-block-lib.navigator")), 1),
|
|
9796
9818
|
L(At)
|
|
9797
9819
|
]),
|
|
9798
9820
|
_: 1
|
|
9799
9821
|
}),
|
|
9800
9822
|
w("div", {
|
|
9801
9823
|
class: "overflow-y-auto",
|
|
9802
|
-
style:
|
|
9824
|
+
style: j(u.value)
|
|
9803
9825
|
}, [
|
|
9804
9826
|
t.type === "list" ? (S(), st(Ha, {
|
|
9805
9827
|
key: 0,
|
|
9806
9828
|
ref_key: "blockList",
|
|
9807
9829
|
ref: d,
|
|
9808
|
-
modelValue:
|
|
9809
|
-
"onUpdate:modelValue": A[1] || (A[1] = (
|
|
9830
|
+
modelValue: D(_),
|
|
9831
|
+
"onUpdate:modelValue": A[1] || (A[1] = (W) => ne(_) ? _.value = W : null),
|
|
9810
9832
|
lock: t.lock
|
|
9811
9833
|
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (S(), st(Ga, {
|
|
9812
9834
|
key: 1,
|
|
9813
9835
|
ref_key: "blockTree",
|
|
9814
9836
|
ref: h,
|
|
9815
|
-
modelValue:
|
|
9816
|
-
"onUpdate:modelValue": A[2] || (A[2] = (
|
|
9837
|
+
modelValue: D(_),
|
|
9838
|
+
"onUpdate:modelValue": A[2] || (A[2] = (W) => ne(_) ? _.value = W : null)
|
|
9817
9839
|
}, null, 8, ["modelValue"])) : rt("", !0),
|
|
9818
9840
|
w("div", {
|
|
9819
|
-
style:
|
|
9841
|
+
style: j(l.value)
|
|
9820
9842
|
}, null, 4)
|
|
9821
9843
|
], 4)
|
|
9822
9844
|
], 4)
|
|
@@ -9825,10 +9847,10 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9825
9847
|
_: 1
|
|
9826
9848
|
}, 8, ["modelValue"]),
|
|
9827
9849
|
L(Ct, {
|
|
9828
|
-
text:
|
|
9850
|
+
text: D(n)("x-block-lib.tip.hotkeyCtrlE")
|
|
9829
9851
|
}, {
|
|
9830
|
-
activator: at(({ props:
|
|
9831
|
-
L(
|
|
9852
|
+
activator: at(({ props: W }) => [
|
|
9853
|
+
L(P, sn(W, {
|
|
9832
9854
|
density: "comfortable",
|
|
9833
9855
|
icon: "mdi-navigation-variant",
|
|
9834
9856
|
variant: "outlined",
|
|
@@ -9914,9 +9936,9 @@ function Qa() {
|
|
|
9914
9936
|
}
|
|
9915
9937
|
function za() {
|
|
9916
9938
|
const t = [];
|
|
9917
|
-
return t.push(V(f("LABEL_EVENT"))),
|
|
9939
|
+
return t.push(V(f("LABEL_EVENT"))), X("onEvent") && t.push(v("on_app_event_v1")), Ja() && t.push(v("trigger_app_event_v1")), t.push(
|
|
9918
9940
|
v("app_bind_v1", [lo([{ key: "items", value: "2" }])])
|
|
9919
|
-
), t.push(v("watch_effect_v1")), (
|
|
9941
|
+
), t.push(v("watch_effect_v1")), (X("getProperty") || X("setProperty")) && t.push(V(f("LABEL_PROPERTY"))), X("getProperty") && t.push(v("get_app_property_v1")), X("setProperty") && t.push(v("set_app_property_v1")), qa() && (t.push(V(f("LABEL_STATE"))), t.push(v("get_app_state_v1")), t.push(v("set_app_state_v1"))), (X("callMethod") || Pn()) && t.push(V(f("LABEL_METHOD"))), X("callMethod") && t.push(v("call_app_method_v1")), Pn() && (t.push(v("implement_app_method_v1")), Qa() && t.push(v("set_app_method_output_v1")), t.push(v("procedure_return_v1"))), t;
|
|
9920
9942
|
}
|
|
9921
9943
|
const _o = { name: "APP_COMP_CATEGORY", callback: za };
|
|
9922
9944
|
function Za() {
|
|
@@ -9950,9 +9972,9 @@ function ic() {
|
|
|
9950
9972
|
}
|
|
9951
9973
|
function sc() {
|
|
9952
9974
|
const t = [];
|
|
9953
|
-
return t.push(V(f("LABEL_EVENT"))),
|
|
9975
|
+
return t.push(V(f("LABEL_EVENT"))), X("onEvent") && t.push(v("on_app_event_v1")), t.push(
|
|
9954
9976
|
v("app_bind_v1", [lo([{ key: "items", value: "2" }])])
|
|
9955
|
-
), t.push(v("watch_effect_v1")), (
|
|
9977
|
+
), t.push(v("watch_effect_v1")), (X("getProperty") || X("setProperty")) && t.push(V(f("LABEL_PROPERTY"))), X("getProperty") && t.push(v("get_app_property_v1")), X("setProperty") && t.push(v("set_app_property_v1")), oc() && (t.push(V(f("LABEL_STATE"))), t.push(v("get_app_state_v1")), t.push(v("set_app_state_v1"))), X("callMethod") && (t.push(V(f("LABEL_METHOD"))), t.push(v("call_app_method_v1"))), ic() && (t.push(V(f("LABEL_ARGUMENT"))), t.push(v("get_page_argument_v1"))), t;
|
|
9956
9978
|
}
|
|
9957
9979
|
const po = { name: "APP_PAGE_CATEGORY", callback: sc };
|
|
9958
9980
|
function ac() {
|
|
@@ -10029,7 +10051,7 @@ const _t = {
|
|
|
10029
10051
|
};
|
|
10030
10052
|
function uc() {
|
|
10031
10053
|
const t = [];
|
|
10032
|
-
if (
|
|
10054
|
+
if (nt().length > 0)
|
|
10033
10055
|
t.push(V(f("LABEL_OPERATION"))), t.push(v("add_data_v1")), t.push(v("delete_data_v1")), t.push(v("update_data_v1")), t.push(v("query_data_v1")), t.push(v("transaction_v1")), t.push(
|
|
10034
10056
|
v("interrupt_transaction_v1", [bt("VALUE")])
|
|
10035
10057
|
), t.push(V(f("LABEL_CONDITION"))), t.push(v("cond_logic_v1")), t.push(v("cond_atomic_v1", [bt("VALUE")])), t.push(V(f("LABEL_QUERY_EXTRA"))), t.push(
|
|
@@ -10072,7 +10094,7 @@ function hc() {
|
|
|
10072
10094
|
v("compute_debug_trace_v1", [bt("OBJECT")])
|
|
10073
10095
|
), t;
|
|
10074
10096
|
}
|
|
10075
|
-
const ge = { name: "COMPUTE_MISC_CATEGORY", callback: hc },
|
|
10097
|
+
const ge = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Se = {
|
|
10076
10098
|
kind: "category",
|
|
10077
10099
|
name: "%{BKY_CATEGORY_COLOR}",
|
|
10078
10100
|
categorystyle: "color_category",
|
|
@@ -10146,7 +10168,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Le = {
|
|
|
10146
10168
|
}
|
|
10147
10169
|
}
|
|
10148
10170
|
]
|
|
10149
|
-
},
|
|
10171
|
+
}, Be = {
|
|
10150
10172
|
kind: "category",
|
|
10151
10173
|
name: "%{BKY_CATEGORY_LIST}",
|
|
10152
10174
|
categorystyle: "list_category",
|
|
@@ -10261,7 +10283,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Le = {
|
|
|
10261
10283
|
type: "list_reverse_v1"
|
|
10262
10284
|
}
|
|
10263
10285
|
]
|
|
10264
|
-
},
|
|
10286
|
+
}, be = {
|
|
10265
10287
|
kind: "category",
|
|
10266
10288
|
name: "%{BKY_CATEGORY_LOGIC}",
|
|
10267
10289
|
categorystyle: "logic_category",
|
|
@@ -10303,7 +10325,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Le = {
|
|
|
10303
10325
|
type: "logic_ternary_v1"
|
|
10304
10326
|
}
|
|
10305
10327
|
]
|
|
10306
|
-
},
|
|
10328
|
+
}, Pe = {
|
|
10307
10329
|
kind: "category",
|
|
10308
10330
|
name: "%{BKY_CATEGORY_LOOP}",
|
|
10309
10331
|
categorystyle: "loop_category",
|
|
@@ -10365,7 +10387,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Le = {
|
|
|
10365
10387
|
type: "flow_control_v1"
|
|
10366
10388
|
}
|
|
10367
10389
|
]
|
|
10368
|
-
},
|
|
10390
|
+
}, Re = {
|
|
10369
10391
|
kind: "category",
|
|
10370
10392
|
name: "%{BKY_CATEGORY_MATH}",
|
|
10371
10393
|
categorystyle: "math_category",
|
|
@@ -10520,7 +10542,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Le = {
|
|
|
10520
10542
|
type: "math_on_list_v1"
|
|
10521
10543
|
}
|
|
10522
10544
|
]
|
|
10523
|
-
},
|
|
10545
|
+
}, De = {
|
|
10524
10546
|
kind: "category",
|
|
10525
10547
|
name: "%{BKY_CATEGORY_OBJECT}",
|
|
10526
10548
|
categorystyle: "object_category",
|
|
@@ -10588,7 +10610,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Le = {
|
|
|
10588
10610
|
}
|
|
10589
10611
|
}
|
|
10590
10612
|
]
|
|
10591
|
-
},
|
|
10613
|
+
}, Me = {
|
|
10592
10614
|
kind: "category",
|
|
10593
10615
|
name: "%{BKY_CATEGORY_TEXT}",
|
|
10594
10616
|
categorystyle: "text_category",
|
|
@@ -10796,13 +10818,13 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Le = {
|
|
|
10796
10818
|
categorystyle: "misc_category",
|
|
10797
10819
|
custom: he.name
|
|
10798
10820
|
},
|
|
10821
|
+
Pe,
|
|
10799
10822
|
be,
|
|
10823
|
+
Re,
|
|
10824
|
+
Me,
|
|
10800
10825
|
Be,
|
|
10801
|
-
Pe,
|
|
10802
10826
|
De,
|
|
10803
10827
|
Se,
|
|
10804
|
-
Re,
|
|
10805
|
-
Le,
|
|
10806
10828
|
ho,
|
|
10807
10829
|
{
|
|
10808
10830
|
kind: "category",
|
|
@@ -10856,13 +10878,13 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Le = {
|
|
|
10856
10878
|
categorystyle: "misc_category",
|
|
10857
10879
|
custom: ge.name
|
|
10858
10880
|
},
|
|
10881
|
+
Pe,
|
|
10859
10882
|
be,
|
|
10883
|
+
Re,
|
|
10884
|
+
Me,
|
|
10860
10885
|
Be,
|
|
10861
|
-
Pe,
|
|
10862
10886
|
De,
|
|
10863
10887
|
Se,
|
|
10864
|
-
Re,
|
|
10865
|
-
Le,
|
|
10866
10888
|
{
|
|
10867
10889
|
kind: "category",
|
|
10868
10890
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10903,13 +10925,13 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Le = {
|
|
|
10903
10925
|
categorystyle: "misc_category",
|
|
10904
10926
|
custom: ge.name
|
|
10905
10927
|
},
|
|
10928
|
+
Pe,
|
|
10906
10929
|
be,
|
|
10930
|
+
Re,
|
|
10931
|
+
Me,
|
|
10907
10932
|
Be,
|
|
10908
|
-
Pe,
|
|
10909
10933
|
De,
|
|
10910
10934
|
Se,
|
|
10911
|
-
Re,
|
|
10912
|
-
Le,
|
|
10913
10935
|
{
|
|
10914
10936
|
kind: "category",
|
|
10915
10937
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10975,13 +10997,13 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Le = {
|
|
|
10975
10997
|
categorystyle: "misc_category",
|
|
10976
10998
|
custom: he.name
|
|
10977
10999
|
},
|
|
11000
|
+
Pe,
|
|
10978
11001
|
be,
|
|
11002
|
+
Re,
|
|
11003
|
+
Me,
|
|
10979
11004
|
Be,
|
|
10980
|
-
Pe,
|
|
10981
11005
|
De,
|
|
10982
11006
|
Se,
|
|
10983
|
-
Re,
|
|
10984
|
-
Le,
|
|
10985
11007
|
ho,
|
|
10986
11008
|
{
|
|
10987
11009
|
kind: "category",
|
|
@@ -11008,7 +11030,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Le = {
|
|
|
11008
11030
|
custom: pe.name
|
|
11009
11031
|
}
|
|
11010
11032
|
]
|
|
11011
|
-
},
|
|
11033
|
+
}, He = {
|
|
11012
11034
|
grid: {
|
|
11013
11035
|
length: 2,
|
|
11014
11036
|
snap: !0,
|
|
@@ -11035,8 +11057,8 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Le = {
|
|
|
11035
11057
|
}
|
|
11036
11058
|
};
|
|
11037
11059
|
function Ac(t, e, n, o) {
|
|
11038
|
-
|
|
11039
|
-
const i = Vo(t,
|
|
11060
|
+
He.theme = o ? "dark" : "light", He.toolbox = Ic(e, n);
|
|
11061
|
+
const i = Vo(t, He);
|
|
11040
11062
|
return i.addChangeListener(xo.shadowBlockConversionChangeListener), Oc(i, e, n), vc(i), i;
|
|
11041
11063
|
}
|
|
11042
11064
|
function Ic(t, e) {
|
|
@@ -11143,7 +11165,7 @@ function Cc(t) {
|
|
|
11143
11165
|
}
|
|
11144
11166
|
const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ ct({
|
|
11145
11167
|
__name: "index",
|
|
11146
|
-
props: /* @__PURE__ */
|
|
11168
|
+
props: /* @__PURE__ */ je({
|
|
11147
11169
|
type: {},
|
|
11148
11170
|
version: {},
|
|
11149
11171
|
locale: {},
|
|
@@ -11154,11 +11176,11 @@ const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ ct({
|
|
|
11154
11176
|
scale: { required: !0 },
|
|
11155
11177
|
scaleModifiers: {}
|
|
11156
11178
|
}),
|
|
11157
|
-
emits: /* @__PURE__ */
|
|
11179
|
+
emits: /* @__PURE__ */ je(["ready"], ["update:lock", "update:scale"]),
|
|
11158
11180
|
setup(t, { expose: e, emit: n }) {
|
|
11159
|
-
const { backgroundColor2: o } = jt(), i = Kt(t, "lock"), a = Kt(t, "scale"), c = n, u = `blocklyEditor${
|
|
11181
|
+
const { backgroundColor2: o } = jt(), i = Kt(t, "lock"), a = Kt(t, "scale"), c = n, u = `blocklyEditor${Xe()}`, l = Lt(), _ = wt("parentContainer"), d = wt("clean"), h = wt("navigator"), p = {};
|
|
11160
11182
|
Da(p);
|
|
11161
|
-
const m = Lt(!0), A = Lt(!1),
|
|
11183
|
+
const m = Lt(!0), A = Lt(!1), R = F(() => t.type === "json" ? "tree" : "list"), P = F(() => ({
|
|
11162
11184
|
width: "100%",
|
|
11163
11185
|
height: "calc(100% - 48px)"
|
|
11164
11186
|
})), At = F(() => ({
|
|
@@ -11167,7 +11189,7 @@ const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ ct({
|
|
|
11167
11189
|
bottom: "0px",
|
|
11168
11190
|
width: "100%",
|
|
11169
11191
|
height: "48px"
|
|
11170
|
-
})),
|
|
11192
|
+
})), G = F(() => ({
|
|
11171
11193
|
position: "absolute",
|
|
11172
11194
|
background: t.dark ? "#0000007f" : "#ffffff7f",
|
|
11173
11195
|
top: "1px",
|
|
@@ -11180,7 +11202,7 @@ const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ ct({
|
|
|
11180
11202
|
top: "0px",
|
|
11181
11203
|
right: "0px",
|
|
11182
11204
|
zIndex: 20
|
|
11183
|
-
})),
|
|
11205
|
+
})), W = F(() => ({
|
|
11184
11206
|
position: "absolute",
|
|
11185
11207
|
background: t.dark ? "#0000007f" : "#ffffff7f",
|
|
11186
11208
|
top: "0px",
|
|
@@ -11201,7 +11223,7 @@ const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ ct({
|
|
|
11201
11223
|
top: 0,
|
|
11202
11224
|
left: 0,
|
|
11203
11225
|
zIndex: 3e3
|
|
11204
|
-
})), { open: Ut } =
|
|
11226
|
+
})), { open: Ut } = nn(`blocklyEditorFlyout${Xe()}`);
|
|
11205
11227
|
gn(async () => {
|
|
11206
11228
|
if (!l.value || !_.value) {
|
|
11207
11229
|
console.assert(!1);
|
|
@@ -11209,8 +11231,8 @@ const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ ct({
|
|
|
11209
11231
|
}
|
|
11210
11232
|
Yo(_.value), await In(t.locale), p.workspace = Ac(l.value, t.type, t.version, t.dark), p.workspace.addChangeListener(I.disableOrphans), p.workspace.addChangeListener(mo);
|
|
11211
11233
|
const N = document.querySelector(`#${u} .blocklyFlyout`);
|
|
11212
|
-
new MutationObserver((
|
|
11213
|
-
|
|
11234
|
+
new MutationObserver((Ue) => {
|
|
11235
|
+
Ue.forEach((zt) => {
|
|
11214
11236
|
zt.type === "attributes" && zt.attributeName === "style" && (Ut.value = p.workspace.getFlyout().isVisible());
|
|
11215
11237
|
});
|
|
11216
11238
|
}).observe(N, { attributes: !0 }), Ut.value = p.workspace.getFlyout().isVisible(), pn(), dn(), await ni(), c("ready");
|
|
@@ -11284,33 +11306,33 @@ const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ ct({
|
|
|
11284
11306
|
generateReactivity: Ao,
|
|
11285
11307
|
fireStateChange: Io
|
|
11286
11308
|
}), (N, It) => {
|
|
11287
|
-
const
|
|
11288
|
-
return S(),
|
|
11309
|
+
const Ue = M("v-icon"), zt = M("x-loading");
|
|
11310
|
+
return S(), tt("div", kc, [
|
|
11289
11311
|
w("div", {
|
|
11290
11312
|
id: u,
|
|
11291
11313
|
ref_key: "blocklyDiv",
|
|
11292
11314
|
ref: l,
|
|
11293
|
-
style:
|
|
11315
|
+
style: j(P.value)
|
|
11294
11316
|
}, null, 4),
|
|
11295
11317
|
w("div", {
|
|
11296
|
-
style:
|
|
11318
|
+
style: j(At.value)
|
|
11297
11319
|
}, [
|
|
11298
11320
|
oi(N.$slots, "bottom")
|
|
11299
11321
|
], 4),
|
|
11300
|
-
A.value ? (S(),
|
|
11322
|
+
A.value ? (S(), tt("div", {
|
|
11301
11323
|
key: 0,
|
|
11302
11324
|
class: "d-flex flex-column justify-center align-center",
|
|
11303
|
-
style:
|
|
11325
|
+
style: j(G.value)
|
|
11304
11326
|
}, [
|
|
11305
|
-
L(
|
|
11327
|
+
L(Ue, {
|
|
11306
11328
|
icon: "mdi-delete",
|
|
11307
11329
|
size: "x-large"
|
|
11308
11330
|
})
|
|
11309
11331
|
], 4)) : rt("", !0),
|
|
11310
|
-
m.value ? rt("", !0) : (S(),
|
|
11332
|
+
m.value ? rt("", !0) : (S(), tt("div", {
|
|
11311
11333
|
key: 1,
|
|
11312
11334
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
11313
|
-
style:
|
|
11335
|
+
style: j(Ct.value)
|
|
11314
11336
|
}, [
|
|
11315
11337
|
L(Ma, {
|
|
11316
11338
|
ref_key: "clean",
|
|
@@ -11325,21 +11347,21 @@ const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ ct({
|
|
|
11325
11347
|
ref_key: "navigator",
|
|
11326
11348
|
ref: h,
|
|
11327
11349
|
lock: i.value,
|
|
11328
|
-
type:
|
|
11350
|
+
type: R.value
|
|
11329
11351
|
}, null, 8, ["lock", "type"])
|
|
11330
11352
|
], 4)),
|
|
11331
|
-
i.value ? (S(),
|
|
11353
|
+
i.value ? (S(), tt("div", {
|
|
11332
11354
|
key: 2,
|
|
11333
|
-
style:
|
|
11355
|
+
style: j(_n.value)
|
|
11334
11356
|
}, null, 4)) : rt("", !0),
|
|
11335
|
-
i.value ? (S(),
|
|
11357
|
+
i.value ? (S(), tt("div", {
|
|
11336
11358
|
key: 3,
|
|
11337
|
-
style: W
|
|
11359
|
+
style: j(W.value)
|
|
11338
11360
|
}, null, 4)) : rt("", !0),
|
|
11339
11361
|
w("div", {
|
|
11340
11362
|
ref_key: "parentContainer",
|
|
11341
11363
|
ref: _,
|
|
11342
|
-
style:
|
|
11364
|
+
style: j(fo.value)
|
|
11343
11365
|
}, null, 4),
|
|
11344
11366
|
L(zt, {
|
|
11345
11367
|
open: m.value,
|
|
@@ -11358,14 +11380,14 @@ const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ ct({
|
|
|
11358
11380
|
Ko.registerLanguage("javascript", $o);
|
|
11359
11381
|
const n = Ho.component, { backgroundColor2: o } = jt();
|
|
11360
11382
|
return (i, a) => {
|
|
11361
|
-
const c =
|
|
11383
|
+
const c = M("v-sheet");
|
|
11362
11384
|
return S(), st(c, {
|
|
11363
|
-
color:
|
|
11385
|
+
color: D(o),
|
|
11364
11386
|
height: "100%",
|
|
11365
11387
|
width: "100%"
|
|
11366
11388
|
}, {
|
|
11367
11389
|
default: at(() => [
|
|
11368
|
-
L(
|
|
11390
|
+
L(D(n), {
|
|
11369
11391
|
code: e.code,
|
|
11370
11392
|
language: "js"
|
|
11371
11393
|
}, null, 8, ["code"])
|
|
@@ -11385,33 +11407,33 @@ const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ ct({
|
|
|
11385
11407
|
};
|
|
11386
11408
|
}), u = (_) => {
|
|
11387
11409
|
a.value = _.code;
|
|
11388
|
-
}, { open: l } =
|
|
11410
|
+
}, { open: l } = nn("sourceDlg", u);
|
|
11389
11411
|
return (_, d) => {
|
|
11390
|
-
const h =
|
|
11412
|
+
const h = M("v-sheet"), p = M("v-btn"), m = M("v-spacer"), A = M("v-dialog");
|
|
11391
11413
|
return S(), st(A, {
|
|
11392
|
-
modelValue:
|
|
11393
|
-
"onUpdate:modelValue": d[1] || (d[1] = (
|
|
11414
|
+
modelValue: D(l),
|
|
11415
|
+
"onUpdate:modelValue": d[1] || (d[1] = (R) => ne(l) ? l.value = R : null),
|
|
11394
11416
|
fullscreen: "",
|
|
11395
11417
|
"no-click-animation": "",
|
|
11396
11418
|
persistent: "",
|
|
11397
11419
|
transition: "dialog-bottom-transition",
|
|
11398
|
-
onKeydown: d[2] || (d[2] = $n(Ft((
|
|
11420
|
+
onKeydown: d[2] || (d[2] = $n(Ft((R) => l.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
11399
11421
|
}, {
|
|
11400
11422
|
default: at(() => [
|
|
11401
11423
|
L(h, {
|
|
11402
|
-
color:
|
|
11424
|
+
color: D(o),
|
|
11403
11425
|
height: "100%",
|
|
11404
11426
|
width: "100%"
|
|
11405
11427
|
}, {
|
|
11406
11428
|
default: at(() => [
|
|
11407
|
-
|
|
11429
|
+
D(n) ? (S(), st(h, {
|
|
11408
11430
|
key: 0,
|
|
11409
|
-
color:
|
|
11431
|
+
color: D(i),
|
|
11410
11432
|
height: 24
|
|
11411
11433
|
}, null, 8, ["color"])) : rt("", !0),
|
|
11412
11434
|
L(h, {
|
|
11413
11435
|
class: "d-flex align-center px-2",
|
|
11414
|
-
color:
|
|
11436
|
+
color: D(i),
|
|
11415
11437
|
height: 48
|
|
11416
11438
|
}, {
|
|
11417
11439
|
default: at(() => [
|
|
@@ -11419,15 +11441,15 @@ const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ ct({
|
|
|
11419
11441
|
density: "comfortable",
|
|
11420
11442
|
icon: "mdi-close",
|
|
11421
11443
|
variant: "text",
|
|
11422
|
-
onClick: d[0] || (d[0] = (
|
|
11444
|
+
onClick: d[0] || (d[0] = (R) => l.value = !1)
|
|
11423
11445
|
}),
|
|
11424
|
-
w("span", Sc, $t(
|
|
11446
|
+
w("span", Sc, $t(D(e)("x-block-lib.dlg.source.title")), 1),
|
|
11425
11447
|
L(m)
|
|
11426
11448
|
]),
|
|
11427
11449
|
_: 1
|
|
11428
11450
|
}, 8, ["color"]),
|
|
11429
11451
|
w("div", {
|
|
11430
|
-
style:
|
|
11452
|
+
style: j(c.value)
|
|
11431
11453
|
}, [
|
|
11432
11454
|
w("div", Bc, [
|
|
11433
11455
|
L(Lc, { code: a.value }, null, 8, ["code"])
|
|
@@ -11445,7 +11467,7 @@ const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ ct({
|
|
|
11445
11467
|
t.component("XBlockly", Nc), t.component("XSourceDlg", bc);
|
|
11446
11468
|
};
|
|
11447
11469
|
async function Fc(t) {
|
|
11448
|
-
return (await Gn(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en.
|
|
11470
|
+
return (await Gn(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en.gy41k67q.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans.jba8gtia.js") }), `./locales/${t}/index.ts`, 4)).default;
|
|
11449
11471
|
}
|
|
11450
11472
|
const wc = { install: Pc };
|
|
11451
11473
|
export {
|