x-block-lib 0.10.29 → 0.10.31
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/{i18n-en.nyqc9jvc.js → i18n-en.may04z0x.js} +1 -1
- package/dist/{i18n-zhHans.hgqwzee0.js → i18n-zhHans.co0odqoc.js} +1 -1
- package/dist/index.js +772 -772
- package/dist/{msg-en.mdggqv1h.js → msg-en.k1nt2k1p.js} +1 -1
- package/dist/{msg-zhHans.nnp59bv2.js → msg-zhHans.fw3xr2l3.js} +1 -1
- package/dist/{rolldown-runtime.gq4dspr5.js → rolldown-runtime.expcly8c.js} +1 -1
- package/dist/{vendor.ga0sar06.js → vendor.kijv4sw8.js} +10 -6
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
Touched: 2021
|
|
9
9
|
*/
|
|
10
10
|
pre code.hljs{padding:1em;display:block;overflow-x:auto}code.hljs{padding:3px 5px}.hljs{color:#444;background:#f3f3f3}.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-899634e5]{opacity:.4;pointer-events:none}.blocklyToolbox{width:56px;overflow-x:hidden}.blocklyMainBackground{stroke-width:0}.blocklyToolboxCategory{margin-bottom:12px!important}.blocklyToolboxCategoryIcon{display:none!important}.blocklyTreeRowContentContainer{place-items:center;height:28px;display:flex;overflow:hidden}.blocklyFlyout{z-index:21}
|
|
11
|
-
/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, J as l, K as u, L as ee, M as te, N as d, O as f, P as ne, Q as p, R as re, S as m, T as h, U as ie, V as ae, W as oe, X as se, Y as ce, Z as le, _ as g, a as ue, b as de, c as fe, d as pe, f as me, g as _, h as he, i as ge, j as _e, k as ve, l as ye, m as be, n as xe, o as Se, p as v, q as Ce, r as we, s as Te, t as Ee, u as De, v as y, w as b, x, y as Oe, z as ke } from "./vendor.
|
|
11
|
+
/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, J as l, K as u, L as ee, M as te, N as d, O as f, P as ne, Q as p, R as re, S as m, T as h, U as ie, V as ae, W as oe, X as se, Y as ce, Z as le, _ as g, a as ue, b as de, c as fe, d as pe, f as me, g as _, h as he, i as ge, j as _e, k as ve, l as ye, m as be, n as xe, o as Se, p as v, q as Ce, r as we, s as Te, t as Ee, u as De, v as y, w as b, x, y as Oe, z as ke } from "./vendor.kijv4sw8.js";
|
|
12
12
|
import { eventBus as Ae, globalObjects as je, messageWarning as Me, openConfirmDlg as Ne, openPromptDlg as Pe, useColor as Fe, useSystem as Ie, useViewStack as Le } from "x-essential-lib";
|
|
13
13
|
import { globalState as S } from "x-state-lib";
|
|
14
|
-
import { addIndent as Re, finalProperties as C, getElement as w, getImplementMethodName as ze, getItems as Be, getTag as Ve, getTypes as He, makeEventId as T, makeEventKeyOfCustomSlot as Ue, makeEventKeyOfElementSlot as We, makeMethodId as Ge, makeMethodKeyOfCustomSlot as Ke, makeMethodKeyOfElementSlot as qe, makePropertyId as Je, makePropertyKeyOfCustomSlot as Ye, makePropertyKeyOfElementSlot as Xe, makeTriggerId as Ze,
|
|
15
|
-
import { Fragment as
|
|
16
|
-
import { useI18n as
|
|
17
|
-
import { useDisplay as
|
|
14
|
+
import { addIndent as Re, finalProperties as C, getElement as w, getImplementMethodName as ze, getItems as Be, getTag as Ve, getTypes as He, makeEventId as T, makeEventKeyOfCustomSlot as Ue, makeEventKeyOfElementSlot as We, makeMethodId as Ge, makeMethodKeyOfCustomSlot as Ke, makeMethodKeyOfElementSlot as qe, makePropertyId as Je, makePropertyKeyOfCustomSlot as Ye, makePropertyKeyOfElementSlot as Xe, makeTriggerId as Ze, parsePixel as Qe, pkgs as $e, themeColors as et, toEventName as tt, toMethodName as nt, toPropertyName as rt, unwrapEventId as it, unwrapEventKeyOfCustomSlot as at, unwrapEventKeyOfElementSlot as ot, unwrapMethodId as st, unwrapMethodKeyOfCustomSlot as ct, unwrapMethodKeyOfElementSlot as lt, unwrapPropertyId as ut, unwrapPropertyKeyOfCustomSlot as dt, unwrapPropertyKeyOfElementSlot as ft, unwrapSlotId as pt } from "x-runtime-lib";
|
|
15
|
+
import { Fragment as mt, computed as E, createBlock as ht, createCommentVNode as gt, createElementBlock as D, createElementVNode as O, createVNode as k, defineComponent as _t, inject as vt, isRef as yt, mergeModels as bt, mergeProps as xt, nextTick as St, normalizeStyle as A, onBeforeUnmount as Ct, onMounted as wt, onUnmounted as Tt, openBlock as j, provide as Et, ref as Dt, renderList as Ot, renderSlot as kt, resolveComponent as M, resolveDirective as At, toDisplayString as jt, unref as N, useId as Mt, useModel as Nt, useTemplateRef as Pt, watch as Ft, withCtx as P, withDirectives as It, withKeys as Lt, withModifiers as Rt } from "vue";
|
|
16
|
+
import { useI18n as zt } from "vue-i18n";
|
|
17
|
+
import { useDisplay as Bt } from "vuetify";
|
|
18
18
|
//#region \0rolldown_dynamic_import_helper.js
|
|
19
|
-
var
|
|
19
|
+
var Vt = (e, t, n) => {
|
|
20
20
|
let r = t.lastIndexOf("?"), i = e[r === -1 || r < t.lastIndexOf("/") ? t : t.slice(0, r)];
|
|
21
21
|
return i ? typeof i == "function" ? i() : Promise.resolve(i) : new Promise((e, r) => {
|
|
22
22
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(r.bind(null, /* @__PURE__ */ Error("Unknown variable dynamic import: " + t + (t.split("/").length === n ? "" : ". Note that variables only represent file names one level deep."))));
|
|
@@ -24,10 +24,10 @@ var Ht = (e, t, n) => {
|
|
|
24
24
|
};
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region src/core/locale/index.ts
|
|
27
|
-
async function
|
|
28
|
-
ce((await
|
|
29
|
-
"./msg/en.ts": () => import("./msg-en.
|
|
30
|
-
"./msg/zhHans.ts": () => import("./msg-zhHans.
|
|
27
|
+
async function Ht(e) {
|
|
28
|
+
ce((await Vt(/* @__PURE__ */ Object.assign({
|
|
29
|
+
"./msg/en.ts": () => import("./msg-en.k1nt2k1p.js").then((e) => e.t),
|
|
30
|
+
"./msg/zhHans.ts": () => import("./msg-zhHans.fw3xr2l3.js").then((e) => e.t)
|
|
31
31
|
}), `./msg/${e}.ts`, 3)).default);
|
|
32
32
|
}
|
|
33
33
|
function F(e) {
|
|
@@ -35,31 +35,31 @@ function F(e) {
|
|
|
35
35
|
}
|
|
36
36
|
//#endregion
|
|
37
37
|
//#region src/core/utils/common/block.ts
|
|
38
|
-
function
|
|
38
|
+
function Ut(e) {
|
|
39
39
|
let t = `<block type="text_v1"><field name="TEXT">${e}</field></block>`;
|
|
40
40
|
return p.xml.textToDom(t);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function Wt(e) {
|
|
43
43
|
let t = `<block type="math_number_v1"><field name="NUM">${e}</field></block>`;
|
|
44
44
|
return p.xml.textToDom(t);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function Gt(e) {
|
|
47
47
|
let t = `<block type="logic_boolean_v1"><field name="BOOL">${e ? "TRUE" : "FALSE"}</field></block>`;
|
|
48
48
|
return p.xml.textToDom(t);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function Kt(e, t) {
|
|
51
51
|
let n = null;
|
|
52
|
-
return t === "string" ? n =
|
|
52
|
+
return t === "string" ? n = Ut("") : t === "integer" || t === "decimal" ? n = Wt(0) : t === "boolean" ? n = Gt(!1) : t === "enum" || t === "dateTime" ? n = Ut("") : console.assert(!1, "type not implementd"), n ? re.domToBlock(n, e) : null;
|
|
53
53
|
}
|
|
54
54
|
//#endregion
|
|
55
55
|
//#region src/core/utils/common/misc.ts
|
|
56
|
-
var
|
|
57
|
-
function
|
|
56
|
+
var qt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", Jt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
|
|
57
|
+
function Yt(e) {
|
|
58
58
|
let t = e.lastIndexOf("V");
|
|
59
59
|
if (t <= 0 || t >= e.length - 1) throw Error("must has V");
|
|
60
60
|
return `${pe(e.substring(0, t))}_${"v" + e.substring(t + 1)}`;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function Xt(e) {
|
|
63
63
|
let t = e.lastIndexOf("V");
|
|
64
64
|
if (t <= 0 || t >= e.length - 1) return console.assert(!1, `invalid key=${e}`), "";
|
|
65
65
|
let n = e.substring(0, t - 1);
|
|
@@ -68,24 +68,24 @@ function Zt(e) {
|
|
|
68
68
|
function I(e) {
|
|
69
69
|
return e.length <= 0 && e.push([F("NO_OPTION"), ""]), e;
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function Zt(e) {
|
|
72
72
|
let t = 0;
|
|
73
73
|
for (; e;) t++, e = e.getParent();
|
|
74
74
|
return t;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function Qt(e) {
|
|
77
77
|
return e.ui === "text" ? "string" : e.ui === "number" ? "number" : e.ui === "switch" ? "boolean" : "string";
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function $t(e, t) {
|
|
80
80
|
return !!(e.startsWith("basic.") || !t.ui || t.readonly);
|
|
81
81
|
}
|
|
82
82
|
function L(e) {
|
|
83
83
|
return e.startsWith("globality_v");
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function en(e) {
|
|
86
86
|
return e.startsWith("ref_v");
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function tn(e) {
|
|
89
89
|
return e.startsWith("multiple_ref_v");
|
|
90
90
|
}
|
|
91
91
|
function R(e) {
|
|
@@ -94,12 +94,12 @@ function R(e) {
|
|
|
94
94
|
function z(e) {
|
|
95
95
|
return e.startsWith("multiple_slot_v");
|
|
96
96
|
}
|
|
97
|
-
function
|
|
98
|
-
let { kind: r, mainKey: i, slotKey: a } =
|
|
97
|
+
function nn(e, t, n) {
|
|
98
|
+
let { kind: r, mainKey: i, slotKey: a } = pt(e);
|
|
99
99
|
return !(r !== "elementSlot" && r !== "multipleElementSlot" || t !== i || n !== a);
|
|
100
100
|
}
|
|
101
|
-
function
|
|
102
|
-
let { kind: r, mainKey: i, slotKey: a } =
|
|
101
|
+
function rn(e, t, n) {
|
|
102
|
+
let { kind: r, mainKey: i, slotKey: a } = pt(e);
|
|
103
103
|
return !(r !== "customSlot" && r !== "multipleCustomSlot" || t !== i || n !== a);
|
|
104
104
|
}
|
|
105
105
|
//#endregion
|
|
@@ -107,15 +107,15 @@ function an(e, t, n) {
|
|
|
107
107
|
function B(e) {
|
|
108
108
|
return e === "string" ? "String" : e === "number" ? "Number" : e === "boolean" ? "Boolean" : e === "array" ? "Array" : e === "object" ? "Object" : (e === "any" || console.assert(!1), null);
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
return e.array ? "Array" : e.ui === "transient" ? B(e.type) : e.ui === "dummy" ? null : e.ui === "text" ? "String" : e.ui === "number" ? "Number" : e.ui === "switch" ? "Boolean" : e.ui === "select" ?
|
|
110
|
+
function an(e) {
|
|
111
|
+
return e.array ? "Array" : e.ui === "transient" ? B(e.type) : e.ui === "dummy" ? null : e.ui === "text" ? "String" : e.ui === "number" ? "Number" : e.ui === "switch" ? "Boolean" : e.ui === "select" ? Xt(e.items) : e.ui === "multiTypes" ? Xt(e.types) : e.ui === "comp" ? "Comp" : e.ui === "slot" ? "Slot" : e.ui === "adaptSlot" ? "AdaptSlot" : (console.assert(!1), null);
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function on(e) {
|
|
114
114
|
return e === "string" ? "String" : e === "integer" || e === "decimal" ? "Number" : e === "boolean" ? "Boolean" : e === "enum" || e === "dateTime" ? "String" : (console.assert(!1), null);
|
|
115
115
|
}
|
|
116
116
|
//#endregion
|
|
117
117
|
//#region src/core/utils/common/colour.ts
|
|
118
|
-
var
|
|
118
|
+
var sn = /* @__PURE__ */ "#F44336.#FFEBEE.#FFCDD2.#EF9A9A.#E57373.#EF5350.#E53935.#D32F2F.#C62828.#B71C1C.#FF8A80.#FF5252.#FF1744.#D50000.#e91e63.#fce4ec.#f8bbd0.#f48fb1.#f06292.#ec407a.#d81b60.#c2185b.#ad1457.#880e4f.#ff80ab.#ff4081.#f50057.#c51162.#9c27b0.#f3e5f5.#e1bee7.#ce93d8.#ba68c8.#ab47bc.#8e24aa.#7b1fa2.#6a1b9a.#4a148c.#ea80fc.#e040fb.#d500f9.#aa00ff.#673ab7.#ede7f6.#d1c4e9.#b39ddb.#9575cd.#7e57c2.#5e35b1.#512da8.#4527a0.#311b92.#b388ff.#7c4dff.#651fff.#6200ea.#3f51b5.#e8eaf6.#c5cae9.#9fa8da.#7986cb.#5c6bc0.#3949ab.#303f9f.#283593.#1a237e.#8c9eff.#536dfe.#3d5afe.#304ffe.#2196F3.#E3F2FD.#BBDEFB.#90CAF9.#64B5F6.#42A5F5.#1E88E5.#1976D2.#1565C0.#0D47A1.#82B1FF.#448AFF.#2979FF.#2962FF.#03a9f4.#e1f5fe.#b3e5fc.#81d4fa.#4fc3f7.#29b6f6.#039be5.#0288d1.#0277bd.#01579b.#80d8ff.#40c4ff.#00b0ff.#0091ea.#00bcd4.#e0f7fa.#b2ebf2.#80deea.#4dd0e1.#26c6da.#00acc1.#0097a7.#00838f.#006064.#84ffff.#18ffff.#00e5ff.#00b8d4.#009688.#e0f2f1.#b2dfdb.#80cbc4.#4db6ac.#26a69a.#00897b.#00796b.#00695c.#004d40.#a7ffeb.#64ffda.#1de9b6.#00bfa5.#4CAF50.#E8F5E9.#C8E6C9.#A5D6A7.#81C784.#66BB6A.#43A047.#388E3C.#2E7D32.#1B5E20.#B9F6CA.#69F0AE.#00E676.#00C853.#8bc34a.#f1f8e9.#dcedc8.#c5e1a5.#aed581.#9ccc65.#7cb342.#689f38.#558b2f.#33691e.#ccff90.#b2ff59.#76ff03.#64dd17.#cddc39.#f9fbe7.#f0f4c3.#e6ee9c.#dce775.#d4e157.#c0ca33.#afb42b.#9e9d24.#827717.#f4ff81.#eeff41.#c6ff00.#aeea00.#ffeb3b.#fffde7.#fff9c4.#fff59d.#fff176.#ffee58.#fdd835.#fbc02d.#f9a825.#f57f17.#ffff8d.#ffff00.#ffea00.#ffd600.#ffc107.#fff8e1.#ffecb3.#ffe082.#ffd54f.#ffca28.#ffb300.#ffa000.#ff8f00.#ff6f00.#ffe57f.#ffd740.#ffc400.#ffab00.#ff9800.#fff3e0.#ffe0b2.#ffcc80.#ffb74d.#ffa726.#fb8c00.#f57c00.#ef6c00.#e65100.#ffd180.#ffab40.#ff9100.#ff6d00.#ff5722.#fbe9e7.#ffccbc.#ffab91.#ff8a65.#ff7043.#f4511e.#e64a19.#d84315.#bf360c.#ff9e80.#ff6e40.#ff3d00.#dd2c00.#795548.#efebe9.#d7ccc8.#bcaaa4.#a1887f.#8d6e63.#6d4c41.#5d4037.#4e342e.#3e2723.#.#.#.#.#607d8b.#eceff1.#cfd8dc.#b0bec5.#90a4ae.#78909c.#546e7a.#455a64.#37474f.#263238.#.#.#.#.#9e9e9e.#fafafa.#f5f5f5.#eeeeee.#e0e0e0.#bdbdbd.#757575.#616161.#424242.#212121.#.#.#.#.#000000.#FFFFFF.#FFFFFF00".split("."), cn = [
|
|
119
119
|
"add_data_v",
|
|
120
120
|
"call_app_method_v",
|
|
121
121
|
"call_func_v",
|
|
@@ -131,18 +131,18 @@ var cn = /* @__PURE__ */ "#F44336.#FFEBEE.#FFCDD2.#EF9A9A.#E57373.#EF5350.#E5393
|
|
|
131
131
|
"query_data_v",
|
|
132
132
|
"update_data_v"
|
|
133
133
|
];
|
|
134
|
-
function
|
|
135
|
-
return !!
|
|
134
|
+
function ln(e) {
|
|
135
|
+
return !!cn.find((t) => e.startsWith(t));
|
|
136
136
|
}
|
|
137
137
|
//#endregion
|
|
138
138
|
//#region src/core/blocks/common/parameter/v1/index.ts
|
|
139
|
-
var
|
|
139
|
+
var un = p.xml;
|
|
140
140
|
y.parameter_v1 = {
|
|
141
141
|
init: function() {
|
|
142
142
|
this.key = "", this.name = "", this.locale = !1, this.appendDummyInput().appendField("", "LABEL"), this.setOutput(!0), this.setColour(220);
|
|
143
143
|
},
|
|
144
144
|
mutationToDom: function() {
|
|
145
|
-
let e =
|
|
145
|
+
let e = un.createElement("mutation");
|
|
146
146
|
return e.setAttribute("key", this.key), e.setAttribute("name", this.name), e.setAttribute("locale", this.locale ? "TRUE" : "FALSE"), e;
|
|
147
147
|
},
|
|
148
148
|
domToMutation: function(e) {
|
|
@@ -179,11 +179,11 @@ y.parameter_v1 = {
|
|
|
179
179
|
},
|
|
180
180
|
tryDuplicate_: function(e) {
|
|
181
181
|
let t = this.workspace.getBlockById(e.oldParentId);
|
|
182
|
-
if (t &&
|
|
182
|
+
if (t && ln(t.type)) try {
|
|
183
183
|
x.disable();
|
|
184
184
|
let n = t.getInput(e.oldInputName)?.connection;
|
|
185
185
|
if (n) {
|
|
186
|
-
let e =
|
|
186
|
+
let e = dn(this.workspace, this.key, this.name, this.locale);
|
|
187
187
|
n.connect(e.outputConnection);
|
|
188
188
|
}
|
|
189
189
|
} finally {
|
|
@@ -199,7 +199,7 @@ y.parameter_v1 = {
|
|
|
199
199
|
checkWarning_: function() {
|
|
200
200
|
let e = this.getSurroundParent();
|
|
201
201
|
for (; e;) {
|
|
202
|
-
if (
|
|
202
|
+
if (ln(e.type)) for (let t of e.inputList) {
|
|
203
203
|
let e = t.connection?.targetBlock();
|
|
204
204
|
if (!e || e.type !== "parameter_v1") continue;
|
|
205
205
|
let n = e;
|
|
@@ -217,7 +217,7 @@ y.parameter_v1 = {
|
|
|
217
217
|
};
|
|
218
218
|
//#endregion
|
|
219
219
|
//#region src/core/utils/common/parameter.ts
|
|
220
|
-
function
|
|
220
|
+
function dn(e, t, n, r) {
|
|
221
221
|
let i = `
|
|
222
222
|
<block type="parameter_v1">
|
|
223
223
|
<mutation key="${t}" name="${n}" locale="${r ? "TRUE" : "FALSE"}"/>
|
|
@@ -236,7 +236,7 @@ function V(e, t) {
|
|
|
236
236
|
if (e && e.key === r && e.name === i && e.locale === a) return;
|
|
237
237
|
s.dispose();
|
|
238
238
|
}
|
|
239
|
-
s =
|
|
239
|
+
s = dn(e.workspace, r, i, a), s.outputConnection.connect(o);
|
|
240
240
|
});
|
|
241
241
|
} finally {
|
|
242
242
|
x.enable();
|
|
@@ -244,52 +244,52 @@ function V(e, t) {
|
|
|
244
244
|
}
|
|
245
245
|
//#endregion
|
|
246
246
|
//#region src/core/utils/common/shadow.ts
|
|
247
|
-
function
|
|
247
|
+
function fn(e) {
|
|
248
248
|
let t = `<shadow type="text_v1"><field name="TEXT">${e}</field></shadow>`;
|
|
249
249
|
return p.xml.textToDom(t);
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function pn(e) {
|
|
252
252
|
let t = `<shadow type="math_number_v1"><field name="NUM">${e}</field></shadow>`;
|
|
253
253
|
return p.xml.textToDom(t);
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function mn(e) {
|
|
256
256
|
let t = `<shadow type="logic_boolean_v1"><field name="BOOL">${e ? "TRUE" : "FALSE"}</field></shadow>`;
|
|
257
257
|
return p.xml.textToDom(t);
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function hn() {
|
|
260
260
|
return p.xml.textToDom("<shadow type=\"list_create_v1\"></shadow>");
|
|
261
261
|
}
|
|
262
|
-
function
|
|
262
|
+
function gn() {
|
|
263
263
|
return p.xml.textToDom("<shadow type=\"object_create_v1\"></shadow>");
|
|
264
264
|
}
|
|
265
|
-
function
|
|
266
|
-
let t = `<shadow type="${
|
|
265
|
+
function _n(e) {
|
|
266
|
+
let t = `<shadow type="${Yt(e)}"></shadow>`;
|
|
267
267
|
return p.xml.textToDom(t);
|
|
268
268
|
}
|
|
269
|
-
function
|
|
270
|
-
let t = `<shadow type="${
|
|
269
|
+
function vn(e) {
|
|
270
|
+
let t = `<shadow type="${Yt(e)}"></shadow>`;
|
|
271
271
|
return p.xml.textToDom(t);
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function yn() {
|
|
274
274
|
return p.xml.textToDom("<shadow type=\"select_comp_v1\"></shadow>");
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function bn() {
|
|
277
277
|
return p.xml.textToDom("<shadow type=\"select_slot_v1\"></shadow>");
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function xn() {
|
|
280
280
|
return p.xml.textToDom("\n<shadow type=\"app_bind_entry_v1\">\n <field name=\"KIND\">notSet</field>\n</shadow>");
|
|
281
281
|
}
|
|
282
282
|
function H(e) {
|
|
283
283
|
let t = null;
|
|
284
|
-
return e === "string" ? t =
|
|
284
|
+
return e === "string" ? t = fn("") : e === "number" ? t = pn(0) : e === "boolean" ? t = mn(!1) : e === "array" ? t = hn() : e === "object" ? t = gn() : e === "any" ? t = null : console.assert(!1, "type not implementd"), t;
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function Sn(e) {
|
|
287
287
|
let t = null;
|
|
288
|
-
return e.array ? t =
|
|
288
|
+
return e.array ? t = hn() : e.ui === "transient" ? t = H(e.type) : e.ui === "dummy" ? t = null : e.ui === "text" ? t = fn(e.default) : e.ui === "number" ? t = pn(e.default ?? 0) : e.ui === "switch" ? t = mn(e.default) : e.ui === "select" ? t = _n(e.items) : e.ui === "multiTypes" ? t = vn(e.types) : e.ui === "comp" ? t = yn() : e.ui === "slot" ? t = bn() : console.assert(!1, "property ui not implementd"), t;
|
|
289
289
|
}
|
|
290
290
|
//#endregion
|
|
291
291
|
//#region src/core/utils/app/argument.ts
|
|
292
|
-
function
|
|
292
|
+
function Cn() {
|
|
293
293
|
let { activeObject: e, activePage: t } = S.app, n = [];
|
|
294
294
|
if (e.type === "page" && t.meta.arguments) for (let { id: e, name: r, type: i } of t.meta.arguments) n.push({
|
|
295
295
|
key: e,
|
|
@@ -298,7 +298,7 @@ function wn() {
|
|
|
298
298
|
});
|
|
299
299
|
return n;
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function wn(e) {
|
|
302
302
|
let { activeObject: t, activePage: n } = S.app;
|
|
303
303
|
if (t.type === "page") {
|
|
304
304
|
let t = n.meta.arguments?.find((t) => t.id === e);
|
|
@@ -309,9 +309,9 @@ function Tn(e) {
|
|
|
309
309
|
};
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function Tn() {
|
|
313
313
|
let e = [];
|
|
314
|
-
return
|
|
314
|
+
return Cn().forEach(({ key: t, name: n }) => {
|
|
315
315
|
e.push([n, t]);
|
|
316
316
|
}), I(e);
|
|
317
317
|
}
|
|
@@ -332,7 +332,7 @@ y.get_page_argument_v1 = {
|
|
|
332
332
|
}, 0);
|
|
333
333
|
},
|
|
334
334
|
genArgumentOpts_: function() {
|
|
335
|
-
return
|
|
335
|
+
return Tn();
|
|
336
336
|
},
|
|
337
337
|
onchange: function(e) {
|
|
338
338
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -343,7 +343,7 @@ y.get_page_argument_v1 = {
|
|
|
343
343
|
}
|
|
344
344
|
},
|
|
345
345
|
onArgumentChange_: function(e) {
|
|
346
|
-
let t =
|
|
346
|
+
let t = wn(e);
|
|
347
347
|
if (!t) {
|
|
348
348
|
console.assert(!1);
|
|
349
349
|
return;
|
|
@@ -354,7 +354,7 @@ y.get_page_argument_v1 = {
|
|
|
354
354
|
this.setOutput(!0, B(this.argument.type));
|
|
355
355
|
},
|
|
356
356
|
checkWarning_: function() {
|
|
357
|
-
let e =
|
|
357
|
+
let e = wn(this.argument.key);
|
|
358
358
|
if (!e) {
|
|
359
359
|
this.setWarningText(F("WARN_ARGUMENT_NOT_FOUND"));
|
|
360
360
|
return;
|
|
@@ -371,8 +371,8 @@ y.get_page_argument_v1 = {
|
|
|
371
371
|
};
|
|
372
372
|
//#endregion
|
|
373
373
|
//#region src/core/blocks/app/define/items/v1/index.ts
|
|
374
|
-
var
|
|
375
|
-
let n =
|
|
374
|
+
var En = (e, t) => {
|
|
375
|
+
let n = Yt(e), r = Xt(e);
|
|
376
376
|
y[n] = {
|
|
377
377
|
init: function() {
|
|
378
378
|
this.appendDummyInput().appendField(new b(() => this.genOpts_()), "ITEM"), this.setOutput(!0, r), this.setStyle("property_blocks"), this.setTooltip(""), this.setHelpUrl("");
|
|
@@ -387,14 +387,14 @@ var Dn = (e, t) => {
|
|
|
387
387
|
return [t(e.getFieldValue("ITEM")), _.ATOMIC];
|
|
388
388
|
};
|
|
389
389
|
};
|
|
390
|
-
for (let e in
|
|
391
|
-
let t =
|
|
392
|
-
for (let e of t.items)
|
|
390
|
+
for (let e in $e) {
|
|
391
|
+
let t = $e[e];
|
|
392
|
+
for (let e of t.items) En(e, Be(e));
|
|
393
393
|
}
|
|
394
394
|
//#endregion
|
|
395
395
|
//#region src/core/blocks/app/define/types/v1/index.ts
|
|
396
|
-
var
|
|
397
|
-
let n =
|
|
396
|
+
var Dn = ye(), On = (e, t) => {
|
|
397
|
+
let n = Yt(e), i = Xt(e);
|
|
398
398
|
y[n] = {
|
|
399
399
|
init: function() {
|
|
400
400
|
this.value = t[0].default, this.appendDummyInput("DUMMY").appendField(new b(() => this.genOpts_()), "TYPE"), this.setOutput(!0, i), this.setStyle("property_blocks"), this.setTooltip(""), this.setHelpUrl(""), this.updateShape_();
|
|
@@ -403,7 +403,7 @@ var On = ye(), kn = (e, t) => {
|
|
|
403
403
|
return { value: this.value };
|
|
404
404
|
},
|
|
405
405
|
loadExtraState: function(e) {
|
|
406
|
-
this.value = e.value
|
|
406
|
+
this.value = e.value, this.updateShape_(), setTimeout(() => {
|
|
407
407
|
this.checkWarning_();
|
|
408
408
|
}, 0);
|
|
409
409
|
},
|
|
@@ -435,23 +435,23 @@ var On = ye(), kn = (e, t) => {
|
|
|
435
435
|
if (!n) return;
|
|
436
436
|
e.removeField("VALUE", !0), e.removeField("SUFFIX", !0);
|
|
437
437
|
let i, a;
|
|
438
|
-
if (n.trait === "
|
|
439
|
-
this.value = e
|
|
440
|
-
})
|
|
441
|
-
else if (n.trait === "
|
|
442
|
-
this.value = e +
|
|
443
|
-
}), a =
|
|
444
|
-
else if (n.trait === "hexColor") i = new
|
|
438
|
+
if (n.trait === "number") i = new r(this.value ?? 0, n.min, n.max, n.precision ? 1 / 10 ** n.precision : null, (e) => {
|
|
439
|
+
this.value = e;
|
|
440
|
+
});
|
|
441
|
+
else if (n.trait === "numberUnit") i = new r(Qe(this.value) ?? 0, n.min, n.max, n.precision ? 1 / 10 ** n.precision : null, (e) => {
|
|
442
|
+
this.value = e + n.unit;
|
|
443
|
+
}), a = n.unit;
|
|
444
|
+
else if (n.trait === "hexColor") i = new Dn.FieldColour(this.value, (e) => {
|
|
445
445
|
this.value = e;
|
|
446
446
|
}, {
|
|
447
|
-
colourOptions:
|
|
447
|
+
colourOptions: sn,
|
|
448
448
|
columns: 14
|
|
449
449
|
});
|
|
450
450
|
else if (n.trait === "themeColor") {
|
|
451
451
|
let { i18n: e } = je;
|
|
452
452
|
i = new b(() => {
|
|
453
453
|
let t = [];
|
|
454
|
-
for (let { value: n, title: r } of
|
|
454
|
+
for (let { value: n, title: r } of et) t.push([e.global.t(r), n]);
|
|
455
455
|
return t;
|
|
456
456
|
}, (e) => {
|
|
457
457
|
this.value = e;
|
|
@@ -467,17 +467,17 @@ var On = ye(), kn = (e, t) => {
|
|
|
467
467
|
this.setWarningText(null);
|
|
468
468
|
}
|
|
469
469
|
}, g.forBlock[n] = function(e) {
|
|
470
|
-
let t = g.quote_;
|
|
471
|
-
return [t(
|
|
470
|
+
let t = g.quote_, n = e;
|
|
471
|
+
return typeof n.value == "string" ? [t(n.value), _.ATOMIC] : [n.value, _.ATOMIC];
|
|
472
472
|
};
|
|
473
473
|
};
|
|
474
|
-
for (let e in
|
|
475
|
-
let t =
|
|
476
|
-
for (let e of t.types)
|
|
474
|
+
for (let e in $e) {
|
|
475
|
+
let t = $e[e];
|
|
476
|
+
for (let e of t.types) On(e, He(e));
|
|
477
477
|
}
|
|
478
478
|
//#endregion
|
|
479
479
|
//#region src/core/utils/app/app.ts
|
|
480
|
-
function
|
|
480
|
+
function kn() {
|
|
481
481
|
let e = [], { appList: t } = S.app;
|
|
482
482
|
for (let { id: n, name: r } of t) e.push({
|
|
483
483
|
id: n,
|
|
@@ -485,22 +485,22 @@ function An() {
|
|
|
485
485
|
});
|
|
486
486
|
return e;
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function An(e) {
|
|
489
489
|
let { appList: t } = S.app, n = t.find((t) => t.id === e);
|
|
490
490
|
if (n) return {
|
|
491
491
|
id: n.id,
|
|
492
492
|
name: n.name
|
|
493
493
|
};
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function jn() {
|
|
496
496
|
let e = [];
|
|
497
|
-
return
|
|
497
|
+
return kn().forEach(({ id: t, name: n }) => {
|
|
498
498
|
e.push([n, t]);
|
|
499
499
|
}), I(e);
|
|
500
500
|
}
|
|
501
501
|
//#endregion
|
|
502
502
|
//#region src/core/utils/app/node.ts
|
|
503
|
-
function
|
|
503
|
+
function Mn(e, t) {
|
|
504
504
|
let { activeObject: n, activeComp: r } = S.app;
|
|
505
505
|
if (R(e.key) && t && n.type === "comp" && r.meta.slots) {
|
|
506
506
|
let e = r.meta.slots.find((e) => e.id === t);
|
|
@@ -512,20 +512,20 @@ function Nn(e, t) {
|
|
|
512
512
|
}
|
|
513
513
|
return !(L(e.key) && n.type === "comp" && r.meta.events && r.meta.events.length > 0);
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function Nn(e, t, n) {
|
|
516
516
|
let { activeObject: r, activeComp: i, depends: a } = S.app;
|
|
517
517
|
if (e.methods && e.methods.length > 0) return !1;
|
|
518
|
-
if (
|
|
518
|
+
if (en(e.key) && t) {
|
|
519
519
|
let e = a[t];
|
|
520
520
|
if (e && e.meta.methods && e.meta.methods.length > 0) return !1;
|
|
521
521
|
}
|
|
522
|
-
if (
|
|
522
|
+
if (tn(e.key) && t) {
|
|
523
523
|
let e = a[t];
|
|
524
524
|
if (e && e.meta.methods && e.meta.methods.length > 0) return !1;
|
|
525
525
|
}
|
|
526
526
|
if (L(e.key) && r.type === "comp" && i.meta.methods && i.meta.methods.length > 0) return !1;
|
|
527
527
|
if (L(e.key) && n && r.type === "comp") {
|
|
528
|
-
let { kind: e, mainKey: t, slotKey: r } =
|
|
528
|
+
let { kind: e, mainKey: t, slotKey: r } = pt(n);
|
|
529
529
|
if (e === "elementSlot") {
|
|
530
530
|
let e = w(t);
|
|
531
531
|
if (e && e.slots) {
|
|
@@ -542,7 +542,7 @@ function Pn(e, t, n) {
|
|
|
542
542
|
}
|
|
543
543
|
return !0;
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function Pn(e, t) {
|
|
546
546
|
let { activeObject: n, activeComp: r } = S.app;
|
|
547
547
|
if (R(e.key) && t && n.type === "comp" && r.meta.slots) {
|
|
548
548
|
let e = r.meta.slots.find((e) => e.id === t);
|
|
@@ -554,7 +554,7 @@ function Fn(e, t) {
|
|
|
554
554
|
}
|
|
555
555
|
return !(L(e.key) && n.type === "comp" && r.meta.methods && r.meta.methods.length > 0);
|
|
556
556
|
}
|
|
557
|
-
function
|
|
557
|
+
function Fn(e, t) {
|
|
558
558
|
let { activeObject: n, activeComp: r } = S.app;
|
|
559
559
|
if (R(e.key) && t && n.type === "comp" && r.meta.slots) {
|
|
560
560
|
let e = r.meta.slots.find((e) => e.id === t);
|
|
@@ -573,8 +573,8 @@ function In(e, t) {
|
|
|
573
573
|
}
|
|
574
574
|
return !0;
|
|
575
575
|
}
|
|
576
|
-
function
|
|
577
|
-
return e === "triggerEvent" ?
|
|
576
|
+
function In(e, t, n, r, i) {
|
|
577
|
+
return e === "triggerEvent" ? Mn(t, n) : e === "callMethod" ? Nn(t, r, i) : e === "implementMethod" ? Pn(t, n) : e === "implementMethodOutput" ? Fn(t, n) : !1;
|
|
578
578
|
}
|
|
579
579
|
function U(e) {
|
|
580
580
|
let { activeObject: t } = S.app;
|
|
@@ -584,11 +584,11 @@ function U(e) {
|
|
|
584
584
|
console.assert(!1, "invalid element", n.key);
|
|
585
585
|
continue;
|
|
586
586
|
}
|
|
587
|
-
if (!
|
|
587
|
+
if (!In(e, t, n.slot, n.comp, n.adaptSlot)) return !0;
|
|
588
588
|
}
|
|
589
589
|
return !1;
|
|
590
590
|
}
|
|
591
|
-
function
|
|
591
|
+
function Ln(e) {
|
|
592
592
|
let { activeObject: t } = S.app, n = [];
|
|
593
593
|
for (let r of t.nodes) {
|
|
594
594
|
let t = w(r.key);
|
|
@@ -596,7 +596,7 @@ function Rn(e) {
|
|
|
596
596
|
console.assert(!1, "invalid element", r.key);
|
|
597
597
|
continue;
|
|
598
598
|
}
|
|
599
|
-
|
|
599
|
+
In(e, t, r.slot, r.comp, r.adaptSlot) || n.push({
|
|
600
600
|
id: r.id,
|
|
601
601
|
key: r.key,
|
|
602
602
|
name: t.name,
|
|
@@ -620,8 +620,8 @@ function W(e) {
|
|
|
620
620
|
alias: n.alias
|
|
621
621
|
};
|
|
622
622
|
}
|
|
623
|
-
function
|
|
624
|
-
let { i18n: t } = je, n = [], r =
|
|
623
|
+
function Rn(e) {
|
|
624
|
+
let { i18n: t } = je, n = [], r = Ln(e);
|
|
625
625
|
for (let { id: e, name: i, alias: a } of r) {
|
|
626
626
|
let r = t.global.t(i);
|
|
627
627
|
a && (r += " / " + a), n.push([r, e]);
|
|
@@ -630,33 +630,33 @@ function zn(e) {
|
|
|
630
630
|
}
|
|
631
631
|
//#endregion
|
|
632
632
|
//#region src/core/utils/app/state.ts
|
|
633
|
-
function
|
|
633
|
+
function zn() {
|
|
634
634
|
let { activeObject: e, activePage: t, activeComp: n } = S.app;
|
|
635
635
|
return e.type === "page" ? t.meta.states ?? [] : e.type === "comp" ? n.meta.states ?? [] : [];
|
|
636
636
|
}
|
|
637
|
-
function
|
|
637
|
+
function Bn(e) {
|
|
638
638
|
let { activeObject: t, activePage: n, activeComp: r } = S.app;
|
|
639
639
|
if (t.type === "page") return n.meta.states?.find((t) => t.id === e);
|
|
640
640
|
if (t.type === "comp") return r.meta.states?.find((t) => t.id === e);
|
|
641
641
|
}
|
|
642
|
-
function
|
|
643
|
-
let e = [], t =
|
|
642
|
+
function Vn() {
|
|
643
|
+
let e = [], t = zn();
|
|
644
644
|
for (let { id: n, name: r } of t) e.push([r, n]);
|
|
645
645
|
return I(e);
|
|
646
646
|
}
|
|
647
647
|
//#endregion
|
|
648
648
|
//#region src/core/utils/app/bind.ts
|
|
649
|
-
function
|
|
649
|
+
function Hn() {
|
|
650
650
|
let e = ["notSet"];
|
|
651
|
-
return
|
|
651
|
+
return Ln("setProperty").length > 0 && e.push("property"), zn().length > 0 && e.push("state"), e;
|
|
652
652
|
}
|
|
653
|
-
function
|
|
653
|
+
function Un() {
|
|
654
654
|
let { i18n: e } = je;
|
|
655
|
-
return I(
|
|
655
|
+
return I(Hn().map((t) => t === "notSet" ? [e.global.t(`x-runtime-lib.${t}`), t] : [F(`APP_${De(t)}`), t]));
|
|
656
656
|
}
|
|
657
657
|
//#endregion
|
|
658
658
|
//#region src/core/utils/app/comp.ts
|
|
659
|
-
function
|
|
659
|
+
function Wn() {
|
|
660
660
|
let { activeApp: e } = S.app, t = [{
|
|
661
661
|
id: "",
|
|
662
662
|
name: ""
|
|
@@ -667,7 +667,7 @@ function Gn() {
|
|
|
667
667
|
});
|
|
668
668
|
return t;
|
|
669
669
|
}
|
|
670
|
-
function
|
|
670
|
+
function Gn(e) {
|
|
671
671
|
let { activeApp: t } = S.app;
|
|
672
672
|
if (!e) return {
|
|
673
673
|
id: "",
|
|
@@ -679,9 +679,9 @@ function Kn(e) {
|
|
|
679
679
|
name: n.name
|
|
680
680
|
};
|
|
681
681
|
}
|
|
682
|
-
function
|
|
682
|
+
function Kn() {
|
|
683
683
|
let { i18n: e } = je, t = [];
|
|
684
|
-
return
|
|
684
|
+
return Wn().forEach(({ id: n, name: r }) => {
|
|
685
685
|
let i = r;
|
|
686
686
|
n === "" && (i = e.global.t("x-runtime-lib.notSet")), t.push([i, n]);
|
|
687
687
|
}), I(t);
|
|
@@ -709,7 +709,7 @@ function K(e) {
|
|
|
709
709
|
type: e
|
|
710
710
|
}];
|
|
711
711
|
}
|
|
712
|
-
function
|
|
712
|
+
function qn(e) {
|
|
713
713
|
let t = !0;
|
|
714
714
|
switch (e) {
|
|
715
715
|
case "": break;
|
|
@@ -750,7 +750,7 @@ function Jn(e) {
|
|
|
750
750
|
}
|
|
751
751
|
return t;
|
|
752
752
|
}
|
|
753
|
-
function
|
|
753
|
+
function Jn(e) {
|
|
754
754
|
let { activeObject: t, activePage: n, activeComp: r, depends: i } = S.app, a = [], o = Ve(t.type, t.subtype), s = t.nodes.find((t) => t.id === e);
|
|
755
755
|
if (!s) return a;
|
|
756
756
|
let c = w(s.key);
|
|
@@ -765,9 +765,9 @@ function Yn(e) {
|
|
|
765
765
|
id: T("elementPropertyChangeEvent", e, t),
|
|
766
766
|
kind: "elementPropertyChangeEvent",
|
|
767
767
|
names: n,
|
|
768
|
-
params: K(
|
|
768
|
+
params: K(Qt(r))
|
|
769
769
|
});
|
|
770
|
-
if (
|
|
770
|
+
if (en(c.key) && s.comp) {
|
|
771
771
|
let t = i[s.comp];
|
|
772
772
|
if (t && t.meta.events) for (let { id: n, name: r, params: i } of t.meta.events) a.push({
|
|
773
773
|
id: T("refEvent", e, n),
|
|
@@ -776,7 +776,7 @@ function Yn(e) {
|
|
|
776
776
|
params: G(i)
|
|
777
777
|
});
|
|
778
778
|
}
|
|
779
|
-
if (
|
|
779
|
+
if (en(c.key) && s.comp) {
|
|
780
780
|
let t = i[s.comp];
|
|
781
781
|
if (t && t.meta.properties) for (let { id: n, name: r, type: i } of t.meta.properties) a.push({
|
|
782
782
|
id: T("refPropertyChangeEvent", e, n),
|
|
@@ -785,7 +785,7 @@ function Yn(e) {
|
|
|
785
785
|
params: K(i)
|
|
786
786
|
});
|
|
787
787
|
}
|
|
788
|
-
if (
|
|
788
|
+
if (tn(c.key) && s.comp) {
|
|
789
789
|
let t = i[s.comp];
|
|
790
790
|
if (t && t.meta.events) for (let { id: n, name: r, params: i } of t.meta.events) a.push({
|
|
791
791
|
id: T("multipleRefEvent", e, n),
|
|
@@ -794,7 +794,7 @@ function Yn(e) {
|
|
|
794
794
|
params: G(i)
|
|
795
795
|
});
|
|
796
796
|
}
|
|
797
|
-
if (
|
|
797
|
+
if (tn(c.key) && s.comp) {
|
|
798
798
|
let t = i[s.comp];
|
|
799
799
|
if (t && t.meta.properties) for (let { id: n, name: r, type: i } of t.meta.properties) a.push({
|
|
800
800
|
id: T("multipleRefPropertyChangeEvent", e, n),
|
|
@@ -852,7 +852,7 @@ function Yn(e) {
|
|
|
852
852
|
params: K(i)
|
|
853
853
|
});
|
|
854
854
|
if (L(c.key) && t.type === "comp" && s.adaptSlot) {
|
|
855
|
-
let { kind: t, mainKey: n, slotKey: r } =
|
|
855
|
+
let { kind: t, mainKey: n, slotKey: r } = pt(s.adaptSlot);
|
|
856
856
|
if (t === "elementSlot") {
|
|
857
857
|
let t = w(n);
|
|
858
858
|
if (t && t.slots) {
|
|
@@ -922,9 +922,9 @@ function Yn(e) {
|
|
|
922
922
|
}
|
|
923
923
|
return a;
|
|
924
924
|
}
|
|
925
|
-
function
|
|
925
|
+
function Yn(e) {
|
|
926
926
|
if (!e) return;
|
|
927
|
-
let { activeObject: t, activePage: n, activeComp: r, depends: i } = S.app, a = Ve(t.type, t.subtype), { kind: o, nodeId: s, eventKey: c } =
|
|
927
|
+
let { activeObject: t, activePage: n, activeComp: r, depends: i } = S.app, a = Ve(t.type, t.subtype), { kind: o, nodeId: s, eventKey: c } = it(e), l = t.nodes.find((e) => e.id === s);
|
|
928
928
|
if (!l) return;
|
|
929
929
|
let u = w(l.key);
|
|
930
930
|
if (!u) {
|
|
@@ -946,11 +946,11 @@ function Xn(e) {
|
|
|
946
946
|
id: e,
|
|
947
947
|
kind: o,
|
|
948
948
|
names: t.names,
|
|
949
|
-
params: K(
|
|
949
|
+
params: K(Qt(t.raw))
|
|
950
950
|
};
|
|
951
951
|
}
|
|
952
952
|
} else if (o === "refEvent") {
|
|
953
|
-
if (
|
|
953
|
+
if (en(u.key) && l.comp) {
|
|
954
954
|
let t = i[l.comp];
|
|
955
955
|
if (t) {
|
|
956
956
|
let n = t.meta.events?.find((e) => e.id === c);
|
|
@@ -963,7 +963,7 @@ function Xn(e) {
|
|
|
963
963
|
}
|
|
964
964
|
}
|
|
965
965
|
} else if (o === "refPropertyChangeEvent") {
|
|
966
|
-
if (
|
|
966
|
+
if (en(u.key) && l.comp) {
|
|
967
967
|
let t = i[l.comp];
|
|
968
968
|
if (t) {
|
|
969
969
|
let n = t.meta.properties?.find((e) => e.id === c);
|
|
@@ -976,7 +976,7 @@ function Xn(e) {
|
|
|
976
976
|
}
|
|
977
977
|
}
|
|
978
978
|
} else if (o === "multipleRefEvent") {
|
|
979
|
-
if (
|
|
979
|
+
if (tn(u.key) && l.comp) {
|
|
980
980
|
let t = i[l.comp];
|
|
981
981
|
if (t) {
|
|
982
982
|
let n = t.meta.events?.find((e) => e.id === c);
|
|
@@ -989,7 +989,7 @@ function Xn(e) {
|
|
|
989
989
|
}
|
|
990
990
|
}
|
|
991
991
|
} else if (o === "multipleRefPropertyChangeEvent") {
|
|
992
|
-
if (
|
|
992
|
+
if (tn(u.key) && l.comp) {
|
|
993
993
|
let t = i[l.comp];
|
|
994
994
|
if (t) {
|
|
995
995
|
let n = t.meta.properties?.find((e) => e.id === c);
|
|
@@ -1003,7 +1003,7 @@ function Xn(e) {
|
|
|
1003
1003
|
}
|
|
1004
1004
|
} else if (o === "customSlotEvent") {
|
|
1005
1005
|
if (R(u.key) && l.slot && t.type === "comp" && r.meta.slots) {
|
|
1006
|
-
let { compId: t, slotId: n, eventId: i } =
|
|
1006
|
+
let { compId: t, slotId: n, eventId: i } = at(c);
|
|
1007
1007
|
if (r.id === t && l.slot === n) {
|
|
1008
1008
|
let t = r.meta.slots.find((e) => e.id === n);
|
|
1009
1009
|
if (t && t.events) {
|
|
@@ -1019,7 +1019,7 @@ function Xn(e) {
|
|
|
1019
1019
|
}
|
|
1020
1020
|
} else if (o === "customSlotPropertyChangeEvent") {
|
|
1021
1021
|
if (R(u.key) && l.slot && t.type === "comp" && r.meta.slots) {
|
|
1022
|
-
let { compId: t, slotId: n, eventId: i } =
|
|
1022
|
+
let { compId: t, slotId: n, eventId: i } = at(c);
|
|
1023
1023
|
if (r.id === t && l.slot === n) {
|
|
1024
1024
|
let t = r.meta.slots.find((e) => e.id === n);
|
|
1025
1025
|
if (t && t.properties) {
|
|
@@ -1035,7 +1035,7 @@ function Xn(e) {
|
|
|
1035
1035
|
}
|
|
1036
1036
|
} else if (o === "multipleCustomSlotEvent") {
|
|
1037
1037
|
if (z(u.key) && l.slot && t.type === "comp" && r.meta.slots) {
|
|
1038
|
-
let { compId: t, slotId: n, eventId: i } =
|
|
1038
|
+
let { compId: t, slotId: n, eventId: i } = at(c);
|
|
1039
1039
|
if (r.id === t && l.slot && n) {
|
|
1040
1040
|
let t = r.meta.slots.find((e) => e.id === n);
|
|
1041
1041
|
if (t && t.events) {
|
|
@@ -1051,7 +1051,7 @@ function Xn(e) {
|
|
|
1051
1051
|
}
|
|
1052
1052
|
} else if (o === "multipleCustomSlotPropertyChangeEvent") {
|
|
1053
1053
|
if (z(u.key) && l.slot && t.type === "comp" && r.meta.slots) {
|
|
1054
|
-
let { compId: t, slotId: n, eventId: i } =
|
|
1054
|
+
let { compId: t, slotId: n, eventId: i } = at(c);
|
|
1055
1055
|
if (r.id === t && l.slot === n) {
|
|
1056
1056
|
let t = r.meta.slots.find((e) => e.id === n);
|
|
1057
1057
|
if (t && t.properties) {
|
|
@@ -1087,8 +1087,8 @@ function Xn(e) {
|
|
|
1087
1087
|
}
|
|
1088
1088
|
} else if (o === "elementAdaptSlotEvent") {
|
|
1089
1089
|
if (L(u.key) && t.type === "comp" && l.adaptSlot) {
|
|
1090
|
-
let { elementKey: t, slotKey: n, eventKey: r } =
|
|
1091
|
-
if (
|
|
1090
|
+
let { elementKey: t, slotKey: n, eventKey: r } = ot(c);
|
|
1091
|
+
if (nn(l.adaptSlot, t, n)) {
|
|
1092
1092
|
let i = w(t);
|
|
1093
1093
|
if (i && i.slots) {
|
|
1094
1094
|
let t = i.slots.find((e) => e.key === n);
|
|
@@ -1110,8 +1110,8 @@ function Xn(e) {
|
|
|
1110
1110
|
}
|
|
1111
1111
|
} else if (o === "elementAdaptSlotPropertyChangeEvent") {
|
|
1112
1112
|
if (L(u.key) && t.type === "comp" && l.adaptSlot) {
|
|
1113
|
-
let { elementKey: t, slotKey: n, propertyKey: r } =
|
|
1114
|
-
if (
|
|
1113
|
+
let { elementKey: t, slotKey: n, propertyKey: r } = ft(c);
|
|
1114
|
+
if (nn(l.adaptSlot, t, n)) {
|
|
1115
1115
|
let i = w(t);
|
|
1116
1116
|
if (i && i.slots) {
|
|
1117
1117
|
let t = i.slots.find((e) => e.key === n);
|
|
@@ -1133,8 +1133,8 @@ function Xn(e) {
|
|
|
1133
1133
|
}
|
|
1134
1134
|
} else if (o === "customAdaptSlotEvent") {
|
|
1135
1135
|
if (L(u.key) && t.type === "comp" && l.adaptSlot) {
|
|
1136
|
-
let { compId: t, slotId: n, eventId: r } =
|
|
1137
|
-
if (
|
|
1136
|
+
let { compId: t, slotId: n, eventId: r } = at(c);
|
|
1137
|
+
if (rn(l.adaptSlot, t, n)) {
|
|
1138
1138
|
let a = i[t];
|
|
1139
1139
|
if (a && a.meta.slots) {
|
|
1140
1140
|
let t = a.meta.slots.find((e) => e.id === n);
|
|
@@ -1156,8 +1156,8 @@ function Xn(e) {
|
|
|
1156
1156
|
}
|
|
1157
1157
|
} else if (o === "customAdaptSlotPropertyChangeEvent") {
|
|
1158
1158
|
if (L(u.key) && t.type === "comp" && l.adaptSlot) {
|
|
1159
|
-
let { compId: t, slotId: n, propertyId: r } =
|
|
1160
|
-
if (
|
|
1159
|
+
let { compId: t, slotId: n, propertyId: r } = dt(c);
|
|
1160
|
+
if (rn(l.adaptSlot, t, n)) {
|
|
1161
1161
|
let a = i[t];
|
|
1162
1162
|
if (a && a.meta.slots) {
|
|
1163
1163
|
let t = a.meta.slots.find((e) => e.id === n);
|
|
@@ -1197,12 +1197,12 @@ function Xn(e) {
|
|
|
1197
1197
|
}
|
|
1198
1198
|
}
|
|
1199
1199
|
}
|
|
1200
|
-
function
|
|
1201
|
-
let t = [], n =
|
|
1202
|
-
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([
|
|
1200
|
+
function Xn(e) {
|
|
1201
|
+
let t = [], n = Jn(e), r;
|
|
1202
|
+
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([tt(i, a), e]);
|
|
1203
1203
|
return I(t);
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1205
|
+
function Zn(e) {
|
|
1206
1206
|
let { activeObject: t, activeComp: n } = S.app, r = [], i = t.nodes.find((t) => t.id === e);
|
|
1207
1207
|
if (!i) return r;
|
|
1208
1208
|
let a = w(i.key);
|
|
@@ -1233,9 +1233,9 @@ function Qn(e) {
|
|
|
1233
1233
|
});
|
|
1234
1234
|
return r;
|
|
1235
1235
|
}
|
|
1236
|
-
function
|
|
1236
|
+
function Qn(e) {
|
|
1237
1237
|
if (!e) return;
|
|
1238
|
-
let { activeObject: t, activeComp: n } = S.app, { kind: r, nodeId: i, eventKey: a } =
|
|
1238
|
+
let { activeObject: t, activeComp: n } = S.app, { kind: r, nodeId: i, eventKey: a } = it(e), o = t.nodes.find((e) => e.id === i);
|
|
1239
1239
|
if (!o) return;
|
|
1240
1240
|
let s = w(o.key);
|
|
1241
1241
|
if (!s) {
|
|
@@ -1244,7 +1244,7 @@ function $n(e) {
|
|
|
1244
1244
|
}
|
|
1245
1245
|
if (r === "customSlotEvent") {
|
|
1246
1246
|
if (R(s.key) && o.slot && t.type === "comp" && n.meta.slots) {
|
|
1247
|
-
let { compId: t, slotId: i, eventId: s } =
|
|
1247
|
+
let { compId: t, slotId: i, eventId: s } = at(a);
|
|
1248
1248
|
if (n.id === t && o.slot === i) {
|
|
1249
1249
|
let t = n.meta.slots.find((e) => e.id === i);
|
|
1250
1250
|
if (t && t.events) {
|
|
@@ -1260,7 +1260,7 @@ function $n(e) {
|
|
|
1260
1260
|
}
|
|
1261
1261
|
} else if (r === "multipleCustomSlotEvent") {
|
|
1262
1262
|
if (z(s.key) && o.slot && t.type === "comp" && n.meta.slots) {
|
|
1263
|
-
let { compId: t, slotId: i, eventId: s } =
|
|
1263
|
+
let { compId: t, slotId: i, eventId: s } = at(a);
|
|
1264
1264
|
if (n.id === t && o.slot && i) {
|
|
1265
1265
|
let t = n.meta.slots.find((e) => e.id === i);
|
|
1266
1266
|
if (t && t.events) {
|
|
@@ -1284,9 +1284,9 @@ function $n(e) {
|
|
|
1284
1284
|
};
|
|
1285
1285
|
}
|
|
1286
1286
|
}
|
|
1287
|
-
function
|
|
1288
|
-
let t = [], n =
|
|
1289
|
-
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([
|
|
1287
|
+
function $n(e) {
|
|
1288
|
+
let t = [], n = Zn(e), r;
|
|
1289
|
+
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([tt(i, a), e]);
|
|
1290
1290
|
return I(t);
|
|
1291
1291
|
}
|
|
1292
1292
|
//#endregion
|
|
@@ -1311,7 +1311,7 @@ function J(e) {
|
|
|
1311
1311
|
});
|
|
1312
1312
|
return t;
|
|
1313
1313
|
}
|
|
1314
|
-
function
|
|
1314
|
+
function er(e) {
|
|
1315
1315
|
let t = !0;
|
|
1316
1316
|
switch (e) {
|
|
1317
1317
|
case "": break;
|
|
@@ -1337,7 +1337,7 @@ function tr(e) {
|
|
|
1337
1337
|
}
|
|
1338
1338
|
return t;
|
|
1339
1339
|
}
|
|
1340
|
-
function
|
|
1340
|
+
function tr(e) {
|
|
1341
1341
|
let { activeObject: t, activeComp: n, depends: r } = S.app, i = [], a = t.nodes.find((t) => t.id === e);
|
|
1342
1342
|
if (!a) return i;
|
|
1343
1343
|
let o = w(a.key);
|
|
@@ -1349,7 +1349,7 @@ function nr(e) {
|
|
|
1349
1349
|
inputs: r,
|
|
1350
1350
|
outputs: a
|
|
1351
1351
|
});
|
|
1352
|
-
if (
|
|
1352
|
+
if (en(o.key) && a.comp) {
|
|
1353
1353
|
let t = r[a.comp];
|
|
1354
1354
|
if (t && t.meta.methods) for (let { id: n, name: r, inputs: a, outputs: o } of t.meta.methods) i.push({
|
|
1355
1355
|
id: Ge("refMethod", e, n),
|
|
@@ -1359,7 +1359,7 @@ function nr(e) {
|
|
|
1359
1359
|
outputs: J(o)
|
|
1360
1360
|
});
|
|
1361
1361
|
}
|
|
1362
|
-
if (
|
|
1362
|
+
if (tn(o.key) && a.comp) {
|
|
1363
1363
|
let t = r[a.comp];
|
|
1364
1364
|
if (t && t.meta.methods) for (let { id: n, name: r, inputs: a, outputs: o } of t.meta.methods) i.push({
|
|
1365
1365
|
id: Ge("multipleRefMethod", e, n),
|
|
@@ -1377,7 +1377,7 @@ function nr(e) {
|
|
|
1377
1377
|
outputs: J(o)
|
|
1378
1378
|
});
|
|
1379
1379
|
if (L(o.key) && t.type === "comp" && a.adaptSlot) {
|
|
1380
|
-
let { kind: t, mainKey: n, slotKey: o } =
|
|
1380
|
+
let { kind: t, mainKey: n, slotKey: o } = pt(a.adaptSlot);
|
|
1381
1381
|
if (t === "elementSlot") {
|
|
1382
1382
|
let t = w(n);
|
|
1383
1383
|
if (t && t.slots) {
|
|
@@ -1414,9 +1414,9 @@ function nr(e) {
|
|
|
1414
1414
|
}
|
|
1415
1415
|
return i;
|
|
1416
1416
|
}
|
|
1417
|
-
function
|
|
1417
|
+
function nr(e) {
|
|
1418
1418
|
if (!e) return;
|
|
1419
|
-
let { activeObject: t, activeComp: n, depends: r } = S.app, { kind: i, nodeId: a, methodKey: o } =
|
|
1419
|
+
let { activeObject: t, activeComp: n, depends: r } = S.app, { kind: i, nodeId: a, methodKey: o } = st(e), s = t.nodes.find((e) => e.id === a);
|
|
1420
1420
|
if (!s) return;
|
|
1421
1421
|
let c = w(s.key);
|
|
1422
1422
|
if (!c) {
|
|
@@ -1433,7 +1433,7 @@ function rr(e) {
|
|
|
1433
1433
|
outputs: t.outputs
|
|
1434
1434
|
};
|
|
1435
1435
|
} else if (i === "refMethod") {
|
|
1436
|
-
if (
|
|
1436
|
+
if (en(c.key) && s.comp) {
|
|
1437
1437
|
let t = r[s.comp];
|
|
1438
1438
|
if (t) {
|
|
1439
1439
|
let n = t.meta.methods?.find((e) => e.id === o);
|
|
@@ -1447,7 +1447,7 @@ function rr(e) {
|
|
|
1447
1447
|
}
|
|
1448
1448
|
}
|
|
1449
1449
|
} else if (i === "multipleRefMethod") {
|
|
1450
|
-
if (
|
|
1450
|
+
if (tn(c.key) && s.comp) {
|
|
1451
1451
|
let t = r[s.comp];
|
|
1452
1452
|
if (t) {
|
|
1453
1453
|
let n = t.meta.methods?.find((e) => e.id === o);
|
|
@@ -1473,7 +1473,7 @@ function rr(e) {
|
|
|
1473
1473
|
}
|
|
1474
1474
|
} else if (i === "customSlotMethod") {
|
|
1475
1475
|
if (L(c.key) && t.type === "comp" && n.meta.slots) {
|
|
1476
|
-
let { slotId: t, methodId: r } =
|
|
1476
|
+
let { slotId: t, methodId: r } = ct(o), a = n.meta.slots.find((e) => e.id === t);
|
|
1477
1477
|
if (a && a.methods) {
|
|
1478
1478
|
let t = a.methods.find((e) => e.id === r);
|
|
1479
1479
|
if (t) return {
|
|
@@ -1487,8 +1487,8 @@ function rr(e) {
|
|
|
1487
1487
|
}
|
|
1488
1488
|
} else if (i === "elementAdaptSlotMethod") {
|
|
1489
1489
|
if (L(c.key) && t.type === "comp" && s.adaptSlot) {
|
|
1490
|
-
let { elementKey: t, slotKey: n, methodKey: r } =
|
|
1491
|
-
if (
|
|
1490
|
+
let { elementKey: t, slotKey: n, methodKey: r } = lt(o);
|
|
1491
|
+
if (nn(s.adaptSlot, t, n)) {
|
|
1492
1492
|
let a = w(t);
|
|
1493
1493
|
if (a && a.slots) {
|
|
1494
1494
|
let t = a.slots.find((e) => e.key === n);
|
|
@@ -1510,8 +1510,8 @@ function rr(e) {
|
|
|
1510
1510
|
}
|
|
1511
1511
|
}
|
|
1512
1512
|
} else if (i === "customAdaptSlotMethod" && L(c.key) && t.type === "comp" && s.adaptSlot) {
|
|
1513
|
-
let { compId: t, slotId: n, methodId: a } =
|
|
1514
|
-
if (
|
|
1513
|
+
let { compId: t, slotId: n, methodId: a } = ct(o);
|
|
1514
|
+
if (rn(s.adaptSlot, t, n)) {
|
|
1515
1515
|
let o = r[t];
|
|
1516
1516
|
if (o && o.meta.slots) {
|
|
1517
1517
|
let t = o.meta.slots.find((e) => e.id === n);
|
|
@@ -1533,12 +1533,12 @@ function rr(e) {
|
|
|
1533
1533
|
}
|
|
1534
1534
|
}
|
|
1535
1535
|
}
|
|
1536
|
-
function
|
|
1537
|
-
let t = [], n =
|
|
1538
|
-
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([
|
|
1536
|
+
function rr(e) {
|
|
1537
|
+
let t = [], n = tr(e), r;
|
|
1538
|
+
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([nt(i, a), e]);
|
|
1539
1539
|
return I(t);
|
|
1540
1540
|
}
|
|
1541
|
-
function
|
|
1541
|
+
function ir(e) {
|
|
1542
1542
|
let t = !0;
|
|
1543
1543
|
switch (e) {
|
|
1544
1544
|
case "": break;
|
|
@@ -1564,7 +1564,7 @@ function ar(e) {
|
|
|
1564
1564
|
}
|
|
1565
1565
|
return t;
|
|
1566
1566
|
}
|
|
1567
|
-
function
|
|
1567
|
+
function ar(e) {
|
|
1568
1568
|
let { activeObject: t, activeComp: n } = S.app, r = [], i = t.nodes.find((t) => t.id === e);
|
|
1569
1569
|
if (!i) return r;
|
|
1570
1570
|
let a = w(i.key);
|
|
@@ -1598,9 +1598,9 @@ function or(e) {
|
|
|
1598
1598
|
});
|
|
1599
1599
|
return r;
|
|
1600
1600
|
}
|
|
1601
|
-
function
|
|
1601
|
+
function or(e) {
|
|
1602
1602
|
if (!e) return;
|
|
1603
|
-
let { activeObject: t, activeComp: n } = S.app, { kind: r, nodeId: i, methodKey: a } =
|
|
1603
|
+
let { activeObject: t, activeComp: n } = S.app, { kind: r, nodeId: i, methodKey: a } = st(e), o = t.nodes.find((e) => e.id === i);
|
|
1604
1604
|
if (!o) return;
|
|
1605
1605
|
let s = w(o.key);
|
|
1606
1606
|
if (!s) {
|
|
@@ -1609,7 +1609,7 @@ function sr(e) {
|
|
|
1609
1609
|
}
|
|
1610
1610
|
if (r === "customSlotMethod") {
|
|
1611
1611
|
if (R(s.key) && o.slot && t.type === "comp" && n.meta.slots) {
|
|
1612
|
-
let { compId: t, slotId: i, methodId: s } =
|
|
1612
|
+
let { compId: t, slotId: i, methodId: s } = ct(a);
|
|
1613
1613
|
if (n.id === t && i === o.slot) {
|
|
1614
1614
|
let t = n.meta.slots.find((e) => e.id === i);
|
|
1615
1615
|
if (t && t.methods) {
|
|
@@ -1626,7 +1626,7 @@ function sr(e) {
|
|
|
1626
1626
|
}
|
|
1627
1627
|
} else if (r === "multipleCustomSlotMethod") {
|
|
1628
1628
|
if (z(s.key) && o.slot && t.type === "comp" && n.meta.slots) {
|
|
1629
|
-
let { compId: t, slotId: i, methodId: s } =
|
|
1629
|
+
let { compId: t, slotId: i, methodId: s } = ct(a);
|
|
1630
1630
|
if (n.id === t && o.slot === i) {
|
|
1631
1631
|
let t = n.meta.slots.find((e) => e.id === i);
|
|
1632
1632
|
if (t && t.methods) {
|
|
@@ -1652,27 +1652,27 @@ function sr(e) {
|
|
|
1652
1652
|
};
|
|
1653
1653
|
}
|
|
1654
1654
|
}
|
|
1655
|
-
function
|
|
1656
|
-
let t = [], n =
|
|
1657
|
-
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([
|
|
1655
|
+
function sr(e) {
|
|
1656
|
+
let t = [], n = ar(e), r;
|
|
1657
|
+
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([nt(i, a), e]);
|
|
1658
1658
|
return I(t);
|
|
1659
1659
|
}
|
|
1660
|
-
function
|
|
1661
|
-
let t =
|
|
1660
|
+
function cr(e) {
|
|
1661
|
+
let t = or(e);
|
|
1662
1662
|
return t ? t.outputs : [];
|
|
1663
1663
|
}
|
|
1664
|
-
function
|
|
1665
|
-
let n =
|
|
1664
|
+
function lr(e, t) {
|
|
1665
|
+
let n = or(e);
|
|
1666
1666
|
if (n) return n.outputs?.find((e) => e.key === t);
|
|
1667
1667
|
}
|
|
1668
|
-
function
|
|
1669
|
-
let t = [], n =
|
|
1668
|
+
function ur(e) {
|
|
1669
|
+
let t = [], n = cr(e);
|
|
1670
1670
|
if (n) for (let { name: e, key: r } of n) t.push([e, r]);
|
|
1671
1671
|
return I(t);
|
|
1672
1672
|
}
|
|
1673
1673
|
//#endregion
|
|
1674
1674
|
//#region src/core/utils/app/page.ts
|
|
1675
|
-
function
|
|
1675
|
+
function dr(e) {
|
|
1676
1676
|
let { appList: t } = S.app, n = [], r = t.find((t) => t.id === e);
|
|
1677
1677
|
if (!r) return n;
|
|
1678
1678
|
for (let { id: e, name: t } of r.pages) n.push({
|
|
@@ -1681,7 +1681,7 @@ function fr(e) {
|
|
|
1681
1681
|
});
|
|
1682
1682
|
return n;
|
|
1683
1683
|
}
|
|
1684
|
-
function
|
|
1684
|
+
function fr(e, t) {
|
|
1685
1685
|
let { appList: n } = S.app, r = n.find((t) => t.id === e);
|
|
1686
1686
|
if (!r) return;
|
|
1687
1687
|
let i = r.pages.find((e) => e.id === t);
|
|
@@ -1690,20 +1690,20 @@ function pr(e, t) {
|
|
|
1690
1690
|
name: i.name
|
|
1691
1691
|
};
|
|
1692
1692
|
}
|
|
1693
|
-
function
|
|
1693
|
+
function pr(e) {
|
|
1694
1694
|
let t = [];
|
|
1695
|
-
return
|
|
1695
|
+
return dr(e).forEach(({ id: e, name: n }) => {
|
|
1696
1696
|
t.push([n, e]);
|
|
1697
1697
|
}), I(t);
|
|
1698
1698
|
}
|
|
1699
1699
|
//#endregion
|
|
1700
1700
|
//#region src/core/utils/app/property.ts
|
|
1701
|
-
function
|
|
1701
|
+
function mr(e, t) {
|
|
1702
1702
|
let { activeObject: n, activeComp: r, depends: i } = S.app, a = [], o = Ve(n.type, n.subtype), s = n.nodes.find((t) => t.id === e);
|
|
1703
1703
|
if (!s) return a;
|
|
1704
1704
|
let c = w(s.key);
|
|
1705
1705
|
if (!c) return console.assert(!1, "invalid element", s.key), a;
|
|
1706
|
-
if (C[c.key] && C[c.key][o]) for (let { keys: n, names: r, raw: i } of C[c.key][o]) t === "write" &&
|
|
1706
|
+
if (C[c.key] && C[c.key][o]) for (let { keys: n, names: r, raw: i } of C[c.key][o]) t === "write" && $t(n, i) || a.push({
|
|
1707
1707
|
id: Je("elementProperty", e, n),
|
|
1708
1708
|
kind: "elementProperty",
|
|
1709
1709
|
names: r,
|
|
@@ -1712,7 +1712,7 @@ function hr(e, t) {
|
|
|
1712
1712
|
raw: i
|
|
1713
1713
|
}
|
|
1714
1714
|
});
|
|
1715
|
-
if (
|
|
1715
|
+
if (en(c.key) && s.comp) {
|
|
1716
1716
|
let t = i[s.comp];
|
|
1717
1717
|
if (t && t.meta.properties) for (let { id: n, name: r, type: i } of t.meta.properties) a.push({
|
|
1718
1718
|
id: Je("refProperty", e, n),
|
|
@@ -1721,7 +1721,7 @@ function hr(e, t) {
|
|
|
1721
1721
|
meta: { raw: { type: i } }
|
|
1722
1722
|
});
|
|
1723
1723
|
}
|
|
1724
|
-
if (
|
|
1724
|
+
if (tn(c.key) && s.comp) {
|
|
1725
1725
|
let t = i[s.comp];
|
|
1726
1726
|
if (t && t.meta.properties) for (let { id: n, name: r, type: i } of t.meta.properties) a.push({
|
|
1727
1727
|
id: Je("multipleRefProperty", e, n),
|
|
@@ -1755,7 +1755,7 @@ function hr(e, t) {
|
|
|
1755
1755
|
meta: { raw: { type: i } }
|
|
1756
1756
|
});
|
|
1757
1757
|
if (L(c.key) && n.type === "comp" && s.adaptSlot) {
|
|
1758
|
-
let { kind: n, mainKey: r, slotKey: o } =
|
|
1758
|
+
let { kind: n, mainKey: r, slotKey: o } = pt(s.adaptSlot);
|
|
1759
1759
|
if (n === "elementSlot") {
|
|
1760
1760
|
let n = w(r);
|
|
1761
1761
|
if (n && n.slots) {
|
|
@@ -1790,9 +1790,9 @@ function hr(e, t) {
|
|
|
1790
1790
|
}
|
|
1791
1791
|
return a;
|
|
1792
1792
|
}
|
|
1793
|
-
function
|
|
1793
|
+
function hr(e) {
|
|
1794
1794
|
if (!e) return;
|
|
1795
|
-
let { activeObject: t, activeComp: n, depends: r } = S.app, i = Ve(t.type, t.subtype), { kind: a, nodeId: o, propertyKey: s } =
|
|
1795
|
+
let { activeObject: t, activeComp: n, depends: r } = S.app, i = Ve(t.type, t.subtype), { kind: a, nodeId: o, propertyKey: s } = ut(e), c = t.nodes.find((e) => e.id === o);
|
|
1796
1796
|
if (!c) return;
|
|
1797
1797
|
let l = w(c.key);
|
|
1798
1798
|
if (!l) {
|
|
@@ -1813,7 +1813,7 @@ function gr(e) {
|
|
|
1813
1813
|
};
|
|
1814
1814
|
}
|
|
1815
1815
|
} else if (a === "refProperty") {
|
|
1816
|
-
if (
|
|
1816
|
+
if (en(l.key) && c.comp) {
|
|
1817
1817
|
let t = r[c.comp];
|
|
1818
1818
|
if (t) {
|
|
1819
1819
|
let n = t.meta.properties?.find((e) => e.id === s);
|
|
@@ -1826,7 +1826,7 @@ function gr(e) {
|
|
|
1826
1826
|
}
|
|
1827
1827
|
}
|
|
1828
1828
|
} else if (a === "multipleRefProperty") {
|
|
1829
|
-
if (
|
|
1829
|
+
if (tn(l.key) && c.comp) {
|
|
1830
1830
|
let t = r[c.comp];
|
|
1831
1831
|
if (t) {
|
|
1832
1832
|
let n = t.meta.properties?.find((e) => e.id === s);
|
|
@@ -1840,7 +1840,7 @@ function gr(e) {
|
|
|
1840
1840
|
}
|
|
1841
1841
|
} else if (a === "customSlotProperty") {
|
|
1842
1842
|
if (R(l.key) && c.slot && t.type === "comp" && n.meta.slots) {
|
|
1843
|
-
let { compId: t, slotId: r, propertyId: i } =
|
|
1843
|
+
let { compId: t, slotId: r, propertyId: i } = dt(s);
|
|
1844
1844
|
if (n.id === t && c.slot === r) {
|
|
1845
1845
|
let t = n.meta.slots.find((e) => e.id === r);
|
|
1846
1846
|
if (t && t.properties) {
|
|
@@ -1856,7 +1856,7 @@ function gr(e) {
|
|
|
1856
1856
|
}
|
|
1857
1857
|
} else if (a === "multipleCustomSlotProperty") {
|
|
1858
1858
|
if (z(l.key) && c.slot && t.type === "comp" && n.meta.slots) {
|
|
1859
|
-
let { compId: t, slotId: r, propertyId: i } =
|
|
1859
|
+
let { compId: t, slotId: r, propertyId: i } = dt(s);
|
|
1860
1860
|
if (n.id === t && c.slot === r) {
|
|
1861
1861
|
let t = n.meta.slots.find((e) => e.id === r);
|
|
1862
1862
|
if (t && t.properties) {
|
|
@@ -1882,8 +1882,8 @@ function gr(e) {
|
|
|
1882
1882
|
}
|
|
1883
1883
|
} else if (a === "elementAdaptSlotProperty") {
|
|
1884
1884
|
if (L(l.key) && t.type === "comp" && c.adaptSlot) {
|
|
1885
|
-
let { elementKey: t, slotKey: n, propertyKey: r } =
|
|
1886
|
-
if (
|
|
1885
|
+
let { elementKey: t, slotKey: n, propertyKey: r } = ft(s);
|
|
1886
|
+
if (nn(c.adaptSlot, t, n)) {
|
|
1887
1887
|
let i = w(t);
|
|
1888
1888
|
if (i && i.slots) {
|
|
1889
1889
|
let t = i.slots.find((e) => e.key === n);
|
|
@@ -1904,8 +1904,8 @@ function gr(e) {
|
|
|
1904
1904
|
}
|
|
1905
1905
|
}
|
|
1906
1906
|
} else if (a === "customAdaptSlotProperty" && L(l.key) && t.type === "comp" && c.adaptSlot) {
|
|
1907
|
-
let { compId: t, slotId: n, propertyId: i } =
|
|
1908
|
-
if (
|
|
1907
|
+
let { compId: t, slotId: n, propertyId: i } = dt(s);
|
|
1908
|
+
if (rn(c.adaptSlot, t, n)) {
|
|
1909
1909
|
let o = r[t];
|
|
1910
1910
|
if (o && o.meta.slots) {
|
|
1911
1911
|
let t = o.meta.slots.find((e) => e.id === n);
|
|
@@ -1926,14 +1926,14 @@ function gr(e) {
|
|
|
1926
1926
|
}
|
|
1927
1927
|
}
|
|
1928
1928
|
}
|
|
1929
|
-
function
|
|
1930
|
-
let n = [], r =
|
|
1931
|
-
for (let { id: e, kind: t, names: a } of r) t !== i && (i && n.push("separator"), i = t), n.push([
|
|
1929
|
+
function gr(e, t) {
|
|
1930
|
+
let n = [], r = mr(e, t), i;
|
|
1931
|
+
for (let { id: e, kind: t, names: a } of r) t !== i && (i && n.push("separator"), i = t), n.push([rt(t, a), e]);
|
|
1932
1932
|
return I(n);
|
|
1933
1933
|
}
|
|
1934
1934
|
//#endregion
|
|
1935
1935
|
//#region src/core/utils/app/slot.ts
|
|
1936
|
-
function
|
|
1936
|
+
function _r() {
|
|
1937
1937
|
let { activeObject: e, activeComp: t } = S.app, n = [{
|
|
1938
1938
|
id: "",
|
|
1939
1939
|
name: ""
|
|
@@ -1945,7 +1945,7 @@ function vr() {
|
|
|
1945
1945
|
});
|
|
1946
1946
|
return n;
|
|
1947
1947
|
}
|
|
1948
|
-
function
|
|
1948
|
+
function vr(e) {
|
|
1949
1949
|
let { activeObject: t, activeComp: n } = S.app;
|
|
1950
1950
|
if (t.type !== "comp" || !n.meta.slots) return;
|
|
1951
1951
|
if (!e) return {
|
|
@@ -1958,8 +1958,8 @@ function yr(e) {
|
|
|
1958
1958
|
name: r.name
|
|
1959
1959
|
};
|
|
1960
1960
|
}
|
|
1961
|
-
function
|
|
1962
|
-
let { i18n: e } = je, t = [], n =
|
|
1961
|
+
function yr() {
|
|
1962
|
+
let { i18n: e } = je, t = [], n = _r();
|
|
1963
1963
|
for (let { id: r, name: i } of n) {
|
|
1964
1964
|
let n = i;
|
|
1965
1965
|
r === "" && (n = e.global.t("x-runtime-lib.notSet")), t.push([n, r]);
|
|
@@ -1996,16 +1996,16 @@ y.app_bind_entry_v1 = {
|
|
|
1996
1996
|
}, 0);
|
|
1997
1997
|
},
|
|
1998
1998
|
genKindOpts_: function() {
|
|
1999
|
-
return
|
|
1999
|
+
return Un();
|
|
2000
2000
|
},
|
|
2001
2001
|
genNodeOpts_: function() {
|
|
2002
|
-
return this.kind === "property" ?
|
|
2002
|
+
return this.kind === "property" ? Rn("setProperty") : I([]);
|
|
2003
2003
|
},
|
|
2004
2004
|
genPropertyOpts_: function() {
|
|
2005
|
-
return this.kind === "property" ?
|
|
2005
|
+
return this.kind === "property" ? gr(this.node.id, "write") : I([]);
|
|
2006
2006
|
},
|
|
2007
2007
|
genStateOpts_: function() {
|
|
2008
|
-
return this.kind === "state" ?
|
|
2008
|
+
return this.kind === "state" ? Vn() : I([]);
|
|
2009
2009
|
},
|
|
2010
2010
|
onchange: function(e) {
|
|
2011
2011
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -2021,14 +2021,14 @@ y.app_bind_entry_v1 = {
|
|
|
2021
2021
|
else if (this.kind === "property") {
|
|
2022
2022
|
let e = this.getField("NODE");
|
|
2023
2023
|
if (e.getOptions(!1), t) {
|
|
2024
|
-
let t =
|
|
2024
|
+
let t = Ln("setProperty")?.[0];
|
|
2025
2025
|
e.setValue(t?.id ?? "");
|
|
2026
2026
|
}
|
|
2027
2027
|
this.onNodeChange_(e.getValue());
|
|
2028
2028
|
} else if (this.kind === "state") {
|
|
2029
2029
|
let e = this.getField("STATE");
|
|
2030
2030
|
if (e.getOptions(!1), t) {
|
|
2031
|
-
let t =
|
|
2031
|
+
let t = zn()?.[0];
|
|
2032
2032
|
e.setValue(t?.id ?? "");
|
|
2033
2033
|
}
|
|
2034
2034
|
this.onStateChange_(e.getValue());
|
|
@@ -2044,13 +2044,13 @@ y.app_bind_entry_v1 = {
|
|
|
2044
2044
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2045
2045
|
let r = this.getField("PROPERTY");
|
|
2046
2046
|
if (r.getOptions(!1), n) {
|
|
2047
|
-
let e =
|
|
2047
|
+
let e = mr(this.node.id, "write")?.[0];
|
|
2048
2048
|
r.setValue(e?.id ?? "");
|
|
2049
2049
|
}
|
|
2050
2050
|
this.onPropertyChange_(r.getValue());
|
|
2051
2051
|
},
|
|
2052
2052
|
onPropertyChange_: function(e) {
|
|
2053
|
-
let t =
|
|
2053
|
+
let t = hr(e);
|
|
2054
2054
|
if (!t) {
|
|
2055
2055
|
console.assert(!1);
|
|
2056
2056
|
return;
|
|
@@ -2058,7 +2058,7 @@ y.app_bind_entry_v1 = {
|
|
|
2058
2058
|
this.property.id = t.id, this.property.kind = t.kind, this.property.names = t.names, this.updateShape_();
|
|
2059
2059
|
},
|
|
2060
2060
|
onStateChange_: function(e) {
|
|
2061
|
-
let t =
|
|
2061
|
+
let t = Bn(e);
|
|
2062
2062
|
if (!t) {
|
|
2063
2063
|
console.assert(!1);
|
|
2064
2064
|
return;
|
|
@@ -2082,7 +2082,7 @@ y.app_bind_entry_v1 = {
|
|
|
2082
2082
|
return;
|
|
2083
2083
|
}
|
|
2084
2084
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
2085
|
-
let t =
|
|
2085
|
+
let t = hr(this.property.id);
|
|
2086
2086
|
if (!t) {
|
|
2087
2087
|
this.setWarningText(F("WARN_PROPERTY_NOT_FOUND"));
|
|
2088
2088
|
return;
|
|
@@ -2093,7 +2093,7 @@ y.app_bind_entry_v1 = {
|
|
|
2093
2093
|
}
|
|
2094
2094
|
v(t.names, this.property.names) || (this.property.names = t.names);
|
|
2095
2095
|
} else if (this.kind === "state") {
|
|
2096
|
-
let e =
|
|
2096
|
+
let e = Bn(this.state.id);
|
|
2097
2097
|
if (!e) {
|
|
2098
2098
|
this.setWarningText(F("WARN_STATE_NOT_FOUND"));
|
|
2099
2099
|
return;
|
|
@@ -2110,7 +2110,7 @@ y.app_bind_entry_v1 = {
|
|
|
2110
2110
|
};
|
|
2111
2111
|
//#endregion
|
|
2112
2112
|
//#region src/core/blocks/app/event/appBind/v1/index.ts
|
|
2113
|
-
var
|
|
2113
|
+
var br = p.xml;
|
|
2114
2114
|
y.app_bind_container_v1 = { init: function() {
|
|
2115
2115
|
this.appendDummyInput().appendField("%{BKY_APP_V1_APP_BIND_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("event_blocks"), this.contextMenu = !1;
|
|
2116
2116
|
} }, y.app_bind_item_v1 = { init: function() {
|
|
@@ -2122,7 +2122,7 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2122
2122
|
}, 250), this.setStyle("event_blocks"), this.setTooltip("%{BKY_APP_V1_APP_BIND_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_APP_BIND_HELPURL}");
|
|
2123
2123
|
},
|
|
2124
2124
|
mutationToDom: function() {
|
|
2125
|
-
let e =
|
|
2125
|
+
let e = br.createElement("mutation");
|
|
2126
2126
|
return e.setAttribute("items", String(this.itemCount_)), e;
|
|
2127
2127
|
},
|
|
2128
2128
|
domToMutation: function(e) {
|
|
@@ -2189,7 +2189,7 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2189
2189
|
for (let e = this.itemCount_; this.getInput("ADD" + e); e++) this.removeInput("ADD" + e);
|
|
2190
2190
|
},
|
|
2191
2191
|
updateShadow_: function() {
|
|
2192
|
-
if (!this.isInsertionMarker()) for (let e = 0; e < this.itemCount_; e++) this.getInput("ADD" + e).setShadowDom(
|
|
2192
|
+
if (!this.isInsertionMarker()) for (let e = 0; e < this.itemCount_; e++) this.getInput("ADD" + e).setShadowDom(xn());
|
|
2193
2193
|
},
|
|
2194
2194
|
checkWarning_: function() {
|
|
2195
2195
|
let e;
|
|
@@ -2198,10 +2198,10 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2198
2198
|
if (!n) continue;
|
|
2199
2199
|
let r;
|
|
2200
2200
|
if (n.kind === "property") {
|
|
2201
|
-
let e =
|
|
2202
|
-
e && (r = e.meta.element ?
|
|
2201
|
+
let e = hr(n.property.id);
|
|
2202
|
+
e && (r = e.meta.element ? an(e.meta.raw) : B(e.meta.raw.type));
|
|
2203
2203
|
} else if (n.kind === "state") {
|
|
2204
|
-
let e =
|
|
2204
|
+
let e = Bn(n.state.id);
|
|
2205
2205
|
e && (r = B(e.type));
|
|
2206
2206
|
}
|
|
2207
2207
|
if (r && (e ||= r, r !== e)) {
|
|
@@ -2227,12 +2227,12 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2227
2227
|
},
|
|
2228
2228
|
initData_: function() {
|
|
2229
2229
|
if (this.node.id) return;
|
|
2230
|
-
let e =
|
|
2230
|
+
let e = Ln("onEvent")?.[0];
|
|
2231
2231
|
if (!e) return;
|
|
2232
2232
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2233
2233
|
let t = this.getField("NODE");
|
|
2234
2234
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
2235
|
-
let n =
|
|
2235
|
+
let n = Jn(this.node.id)?.[0];
|
|
2236
2236
|
if (!n) return;
|
|
2237
2237
|
this.event.id = n.id, this.event.kind = n.kind, this.event.names = n.names, this.event.params = n.params;
|
|
2238
2238
|
let r = this.getField("EVENT");
|
|
@@ -2250,10 +2250,10 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2250
2250
|
}, 0);
|
|
2251
2251
|
},
|
|
2252
2252
|
genNodeOpts_: function() {
|
|
2253
|
-
return
|
|
2253
|
+
return Rn("onEvent");
|
|
2254
2254
|
},
|
|
2255
2255
|
genEventOpts_: function() {
|
|
2256
|
-
return
|
|
2256
|
+
return Xn(this.node.id);
|
|
2257
2257
|
},
|
|
2258
2258
|
onchange: function(e) {
|
|
2259
2259
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -2273,13 +2273,13 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2273
2273
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2274
2274
|
let r = this.getField("EVENT");
|
|
2275
2275
|
if (r.getOptions(!1), n) {
|
|
2276
|
-
let e =
|
|
2276
|
+
let e = Jn(this.node.id)?.[0];
|
|
2277
2277
|
r.setValue(e?.id ?? "");
|
|
2278
2278
|
}
|
|
2279
2279
|
this.onEventChange_(r.getValue());
|
|
2280
2280
|
},
|
|
2281
2281
|
onEventChange_: function(e) {
|
|
2282
|
-
let t =
|
|
2282
|
+
let t = Yn(e);
|
|
2283
2283
|
if (!t) {
|
|
2284
2284
|
console.assert(!1);
|
|
2285
2285
|
return;
|
|
@@ -2316,7 +2316,7 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2316
2316
|
"x-runtime-lib.instance",
|
|
2317
2317
|
!0
|
|
2318
2318
|
]);
|
|
2319
|
-
let t =
|
|
2319
|
+
let t = qn(this.event.kind);
|
|
2320
2320
|
if (this.event.params) for (let n = 0; n < this.event.params.length; n++) {
|
|
2321
2321
|
let { key: r, name: i } = this.event.params[n];
|
|
2322
2322
|
e.push([
|
|
@@ -2339,7 +2339,7 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2339
2339
|
return;
|
|
2340
2340
|
}
|
|
2341
2341
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
2342
|
-
let t =
|
|
2342
|
+
let t = Yn(this.event.id);
|
|
2343
2343
|
if (!t) {
|
|
2344
2344
|
this.setWarningText(F("WARN_EVENT_NOT_FOUND"));
|
|
2345
2345
|
return;
|
|
@@ -2382,12 +2382,12 @@ ${Re(r, 4)}${Re(i, 2)} } catch (e) {
|
|
|
2382
2382
|
},
|
|
2383
2383
|
initData_: function() {
|
|
2384
2384
|
if (this.node.id) return;
|
|
2385
|
-
let e =
|
|
2385
|
+
let e = Ln("triggerEvent")?.[0];
|
|
2386
2386
|
if (!e) return;
|
|
2387
2387
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2388
2388
|
let t = this.getField("NODE");
|
|
2389
2389
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
2390
|
-
let n =
|
|
2390
|
+
let n = Zn(this.node.id)?.[0];
|
|
2391
2391
|
if (!n) return;
|
|
2392
2392
|
this.event.id = n.id, this.event.kind = n.kind, this.event.names = n.names, this.event.params = n.params;
|
|
2393
2393
|
let r = this.getField("EVENT");
|
|
@@ -2405,10 +2405,10 @@ ${Re(r, 4)}${Re(i, 2)} } catch (e) {
|
|
|
2405
2405
|
}, 0);
|
|
2406
2406
|
},
|
|
2407
2407
|
genNodeOpts_: function() {
|
|
2408
|
-
return
|
|
2408
|
+
return Rn("triggerEvent");
|
|
2409
2409
|
},
|
|
2410
2410
|
genEventOpts_: function() {
|
|
2411
|
-
return
|
|
2411
|
+
return $n(this.node.id);
|
|
2412
2412
|
},
|
|
2413
2413
|
onchange: function(e) {
|
|
2414
2414
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -2428,13 +2428,13 @@ ${Re(r, 4)}${Re(i, 2)} } catch (e) {
|
|
|
2428
2428
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2429
2429
|
let r = this.getField("EVENT");
|
|
2430
2430
|
if (r.getOptions(!1), n) {
|
|
2431
|
-
let e =
|
|
2431
|
+
let e = Zn(this.node.id)?.[0];
|
|
2432
2432
|
r.setValue(e?.id ?? "");
|
|
2433
2433
|
}
|
|
2434
2434
|
this.onEventChange_(r.getValue());
|
|
2435
2435
|
},
|
|
2436
2436
|
onEventChange_: function(e) {
|
|
2437
|
-
let t =
|
|
2437
|
+
let t = Qn(e);
|
|
2438
2438
|
if (!t) {
|
|
2439
2439
|
console.assert(!1);
|
|
2440
2440
|
return;
|
|
@@ -2491,7 +2491,7 @@ ${Re(r, 4)}${Re(i, 2)} } catch (e) {
|
|
|
2491
2491
|
return;
|
|
2492
2492
|
}
|
|
2493
2493
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
2494
|
-
let t =
|
|
2494
|
+
let t = Qn(this.event.id);
|
|
2495
2495
|
if (!t) {
|
|
2496
2496
|
this.setWarningText(F("WARN_EVENT_NOT_FOUND"));
|
|
2497
2497
|
return;
|
|
@@ -2560,9 +2560,9 @@ ${g.statementToCode(e, "HANDLE")}};
|
|
|
2560
2560
|
},
|
|
2561
2561
|
updateShadow_: function() {
|
|
2562
2562
|
if (this.isInsertionMarker()) return;
|
|
2563
|
-
let e =
|
|
2563
|
+
let e = fn("title");
|
|
2564
2564
|
this.getInput("TITLE").connection.setShadowDom(e);
|
|
2565
|
-
let t =
|
|
2565
|
+
let t = fn("text");
|
|
2566
2566
|
this.getInput("TEXT").connection.setShadowDom(t);
|
|
2567
2567
|
},
|
|
2568
2568
|
ensureBlocks_: function() {
|
|
@@ -2595,11 +2595,11 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
2595
2595
|
},
|
|
2596
2596
|
updateShadow_: function() {
|
|
2597
2597
|
if (this.isInsertionMarker()) return;
|
|
2598
|
-
let e =
|
|
2598
|
+
let e = fn("title");
|
|
2599
2599
|
this.getInput("TITLE").connection.setShadowDom(e);
|
|
2600
|
-
let t =
|
|
2600
|
+
let t = fn("label");
|
|
2601
2601
|
this.getInput("LABEL").connection.setShadowDom(t);
|
|
2602
|
-
let n =
|
|
2602
|
+
let n = fn("");
|
|
2603
2603
|
this.getInput("VALUE").connection.setShadowDom(n);
|
|
2604
2604
|
},
|
|
2605
2605
|
ensureBlocks_: function() {
|
|
@@ -2652,12 +2652,12 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
2652
2652
|
},
|
|
2653
2653
|
initData_: function() {
|
|
2654
2654
|
if (this.node.id) return;
|
|
2655
|
-
let e =
|
|
2655
|
+
let e = Ln("callMethod")?.[0];
|
|
2656
2656
|
if (!e) return;
|
|
2657
2657
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2658
2658
|
let t = this.getField("NODE");
|
|
2659
2659
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
2660
|
-
let n =
|
|
2660
|
+
let n = tr(this.node.id)?.[0];
|
|
2661
2661
|
if (!n) return;
|
|
2662
2662
|
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;
|
|
2663
2663
|
let r = this.getField("METHOD");
|
|
@@ -2675,10 +2675,10 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
2675
2675
|
}, 0);
|
|
2676
2676
|
},
|
|
2677
2677
|
genNodeOpts_: function() {
|
|
2678
|
-
return
|
|
2678
|
+
return Rn("callMethod");
|
|
2679
2679
|
},
|
|
2680
2680
|
genMethodOpts_: function() {
|
|
2681
|
-
return
|
|
2681
|
+
return rr(this.node.id);
|
|
2682
2682
|
},
|
|
2683
2683
|
onchange: function(e) {
|
|
2684
2684
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -2698,13 +2698,13 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
2698
2698
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2699
2699
|
let r = this.getField("METHOD");
|
|
2700
2700
|
if (r.getOptions(!1), n) {
|
|
2701
|
-
let e =
|
|
2701
|
+
let e = tr(this.node.id)?.[0];
|
|
2702
2702
|
r.setValue(e?.id ?? "");
|
|
2703
2703
|
}
|
|
2704
2704
|
this.onMethodChange_(r.getValue());
|
|
2705
2705
|
},
|
|
2706
2706
|
onMethodChange_: function(e) {
|
|
2707
|
-
let t =
|
|
2707
|
+
let t = nr(e);
|
|
2708
2708
|
if (!t) {
|
|
2709
2709
|
console.assert(!1);
|
|
2710
2710
|
return;
|
|
@@ -2760,7 +2760,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
2760
2760
|
},
|
|
2761
2761
|
ensureBlocks_: function() {
|
|
2762
2762
|
if (this.isInsertionMarker()) return;
|
|
2763
|
-
let e = [], t =
|
|
2763
|
+
let e = [], t = er(this.method.kind);
|
|
2764
2764
|
if (this.method.outputs) for (let n = 0; n < this.method.outputs.length; n++) {
|
|
2765
2765
|
let { key: r, name: i } = this.method.outputs[n];
|
|
2766
2766
|
e.push([
|
|
@@ -2783,7 +2783,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
2783
2783
|
return;
|
|
2784
2784
|
}
|
|
2785
2785
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
2786
|
-
let t =
|
|
2786
|
+
let t = nr(this.method.id);
|
|
2787
2787
|
if (!t) {
|
|
2788
2788
|
this.setWarningText(F("WARN_METHOD_NOT_FOUND"));
|
|
2789
2789
|
return;
|
|
@@ -2835,7 +2835,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
2835
2835
|
let o = "";
|
|
2836
2836
|
if (r.method.outputs) for (let { key: e } of r.method.outputs) o += `${t}const __output$${e}__ = __outputs__[${n(e)}];\n`;
|
|
2837
2837
|
if (r.method.kind === "customMethod") {
|
|
2838
|
-
let { kind: e, nodeId: t, methodKey: n } =
|
|
2838
|
+
let { kind: e, nodeId: t, methodKey: n } = st(r.method.id), s = ze(e, t, n);
|
|
2839
2839
|
if (r.method.outputs && r.method.outputs.length > 0) {
|
|
2840
2840
|
let e = g.statementToCode(r, "HANDLE");
|
|
2841
2841
|
return `{
|
|
@@ -2864,12 +2864,12 @@ ${o}${e}}
|
|
|
2864
2864
|
},
|
|
2865
2865
|
initData_: function() {
|
|
2866
2866
|
if (this.node.id) return;
|
|
2867
|
-
let e =
|
|
2867
|
+
let e = Ln("implementMethod")?.[0];
|
|
2868
2868
|
if (!e) return;
|
|
2869
2869
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2870
2870
|
let t = this.getField("NODE");
|
|
2871
2871
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
2872
|
-
let n =
|
|
2872
|
+
let n = ar(this.node.id)?.[0];
|
|
2873
2873
|
if (!n) return;
|
|
2874
2874
|
this.method.id = n.id, this.method.kind = n.kind, this.method.names = n.names, this.method.inputs = n.inputs;
|
|
2875
2875
|
let r = this.getField("METHOD");
|
|
@@ -2887,10 +2887,10 @@ ${o}${e}}
|
|
|
2887
2887
|
}, 0);
|
|
2888
2888
|
},
|
|
2889
2889
|
genNodeOpts_: function() {
|
|
2890
|
-
return
|
|
2890
|
+
return Rn("implementMethod");
|
|
2891
2891
|
},
|
|
2892
2892
|
genMethodOpts_: function() {
|
|
2893
|
-
return
|
|
2893
|
+
return sr(this.node.id);
|
|
2894
2894
|
},
|
|
2895
2895
|
onchange: function(e) {
|
|
2896
2896
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -2910,13 +2910,13 @@ ${o}${e}}
|
|
|
2910
2910
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2911
2911
|
let r = this.getField("METHOD");
|
|
2912
2912
|
if (r.getOptions(!1), n) {
|
|
2913
|
-
let e =
|
|
2913
|
+
let e = ar(this.node.id)?.[0];
|
|
2914
2914
|
r.setValue(e?.id ?? "");
|
|
2915
2915
|
}
|
|
2916
2916
|
r.setValue(r.getValue());
|
|
2917
2917
|
},
|
|
2918
2918
|
onMethodChange_: function(e) {
|
|
2919
|
-
let t =
|
|
2919
|
+
let t = or(e);
|
|
2920
2920
|
if (!t) {
|
|
2921
2921
|
console.assert(!1);
|
|
2922
2922
|
return;
|
|
@@ -2950,7 +2950,7 @@ ${o}${e}}
|
|
|
2950
2950
|
"x-runtime-lib.instance",
|
|
2951
2951
|
!0
|
|
2952
2952
|
]);
|
|
2953
|
-
let t =
|
|
2953
|
+
let t = ir(this.method.kind);
|
|
2954
2954
|
if (this.method.inputs) for (let n = 0; n < this.method.inputs.length; n++) {
|
|
2955
2955
|
let { key: r, name: i } = this.method.inputs[n];
|
|
2956
2956
|
e.push([
|
|
@@ -2973,7 +2973,7 @@ ${o}${e}}
|
|
|
2973
2973
|
return;
|
|
2974
2974
|
}
|
|
2975
2975
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
2976
|
-
let t =
|
|
2976
|
+
let t = or(this.method.id);
|
|
2977
2977
|
if (!t) {
|
|
2978
2978
|
this.setWarningText(F("WARN_METHOD_NOT_FOUND"));
|
|
2979
2979
|
return;
|
|
@@ -2989,7 +2989,7 @@ ${o}${e}}
|
|
|
2989
2989
|
this.setWarningText(null);
|
|
2990
2990
|
}
|
|
2991
2991
|
}, g.forBlock.implement_app_method_v1 = function(e) {
|
|
2992
|
-
let t = g.INDENT, n = g.quote_, r = e, { kind: i, nodeId: a, methodKey: o } =
|
|
2992
|
+
let t = g.INDENT, n = g.quote_, r = e, { kind: i, nodeId: a, methodKey: o } = st(r.method.id), s = "";
|
|
2993
2993
|
if (r.method.inputs) for (let { key: e } of r.method.inputs) s += `${t}const __input$${e}__ = __inputs__[${n(e)}];\n`;
|
|
2994
2994
|
let c = g.statementToCode(r, "HANDLE");
|
|
2995
2995
|
return `async function ${ze(i, a, o)}(__instance__, __inputs__) {
|
|
@@ -3015,17 +3015,17 @@ ${c}${t}return __outputs__;
|
|
|
3015
3015
|
},
|
|
3016
3016
|
initData_: function() {
|
|
3017
3017
|
if (this.node.id) return;
|
|
3018
|
-
let e =
|
|
3018
|
+
let e = Ln("implementMethod")?.[0];
|
|
3019
3019
|
if (!e) return;
|
|
3020
3020
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
3021
3021
|
let t = this.getField("NODE");
|
|
3022
3022
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
3023
|
-
let n =
|
|
3023
|
+
let n = ar(this.node.id)?.[0];
|
|
3024
3024
|
if (!n) return;
|
|
3025
3025
|
this.method.id = n.id, this.method.kind = n.kind, this.method.names = n.names;
|
|
3026
3026
|
let r = this.getField("METHOD");
|
|
3027
3027
|
r.getOptions(!1), r.setValue(this.method.id);
|
|
3028
|
-
let i =
|
|
3028
|
+
let i = cr(this.method.id)?.[0];
|
|
3029
3029
|
if (!i) return;
|
|
3030
3030
|
this.output.key = i.key, this.output.name = i.name, this.output.type = i.type;
|
|
3031
3031
|
let a = this.getField("OUTPUT");
|
|
@@ -3044,13 +3044,13 @@ ${c}${t}return __outputs__;
|
|
|
3044
3044
|
}, 0);
|
|
3045
3045
|
},
|
|
3046
3046
|
genNodeOpts_: function() {
|
|
3047
|
-
return
|
|
3047
|
+
return Rn("implementMethod");
|
|
3048
3048
|
},
|
|
3049
3049
|
genMethodOpts_: function() {
|
|
3050
|
-
return
|
|
3050
|
+
return sr(this.node.id);
|
|
3051
3051
|
},
|
|
3052
3052
|
genOutputOpts_: function() {
|
|
3053
|
-
return
|
|
3053
|
+
return ur(this.method.id);
|
|
3054
3054
|
},
|
|
3055
3055
|
onchange: function(e) {
|
|
3056
3056
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -3070,13 +3070,13 @@ ${c}${t}return __outputs__;
|
|
|
3070
3070
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
3071
3071
|
let r = this.getField("METHOD");
|
|
3072
3072
|
if (r.getOptions(!1), n) {
|
|
3073
|
-
let e =
|
|
3073
|
+
let e = ar(this.node.id)?.[0];
|
|
3074
3074
|
r.setValue(e?.id ?? "");
|
|
3075
3075
|
}
|
|
3076
3076
|
r.setValue(r.getValue());
|
|
3077
3077
|
},
|
|
3078
3078
|
onMethodChange_: function(e) {
|
|
3079
|
-
let t =
|
|
3079
|
+
let t = or(e);
|
|
3080
3080
|
if (!t) {
|
|
3081
3081
|
console.assert(!1);
|
|
3082
3082
|
return;
|
|
@@ -3084,14 +3084,14 @@ ${c}${t}return __outputs__;
|
|
|
3084
3084
|
let n = this.method.id !== t.id;
|
|
3085
3085
|
this.method.id = t.id, this.method.kind = t.kind, this.method.names = t.names;
|
|
3086
3086
|
let r = this.getField("OUTPUT");
|
|
3087
|
-
if (r.getOptions(!1), n || !
|
|
3088
|
-
let e =
|
|
3087
|
+
if (r.getOptions(!1), n || !lr(this.method.id, this.output.key)) {
|
|
3088
|
+
let e = cr(this.method.id)?.[0];
|
|
3089
3089
|
r.setValue(e?.key ?? "");
|
|
3090
3090
|
}
|
|
3091
3091
|
this.onOutputChange_(r.getValue());
|
|
3092
3092
|
},
|
|
3093
3093
|
onOutputChange_: function(e) {
|
|
3094
|
-
let t =
|
|
3094
|
+
let t = lr(this.method.id, e);
|
|
3095
3095
|
if (!t) {
|
|
3096
3096
|
console.assert(!1);
|
|
3097
3097
|
return;
|
|
@@ -3122,7 +3122,7 @@ ${c}${t}return __outputs__;
|
|
|
3122
3122
|
return;
|
|
3123
3123
|
}
|
|
3124
3124
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
3125
|
-
let t =
|
|
3125
|
+
let t = or(this.method.id);
|
|
3126
3126
|
if (!t) {
|
|
3127
3127
|
this.setWarningText(F("WARN_METHOD_NOT_FOUND"));
|
|
3128
3128
|
return;
|
|
@@ -3132,7 +3132,7 @@ ${c}${t}return __outputs__;
|
|
|
3132
3132
|
return;
|
|
3133
3133
|
}
|
|
3134
3134
|
t.names !== this.method.names && (this.method.names = t.names);
|
|
3135
|
-
let n =
|
|
3135
|
+
let n = lr(this.method.id, this.output.key);
|
|
3136
3136
|
if (!n) {
|
|
3137
3137
|
this.setWarningText(F("WARN_OUTPUT_NOT_FOUND"));
|
|
3138
3138
|
return;
|
|
@@ -3190,12 +3190,12 @@ ${c}${t}return __outputs__;
|
|
|
3190
3190
|
},
|
|
3191
3191
|
initData_: function() {
|
|
3192
3192
|
if (this.app.id) return;
|
|
3193
|
-
let e =
|
|
3193
|
+
let e = kn()?.[0];
|
|
3194
3194
|
if (!e) return;
|
|
3195
3195
|
this.app.id = e.id, this.app.name = e.name;
|
|
3196
3196
|
let t = this.getField("APP");
|
|
3197
3197
|
t.getOptions(!1), t.setValue(this.app.id);
|
|
3198
|
-
let n =
|
|
3198
|
+
let n = dr(this.app.id)?.[0];
|
|
3199
3199
|
if (!n) return;
|
|
3200
3200
|
this.page.id = n.id, this.page.name = n.name;
|
|
3201
3201
|
let r = this.getField("PAGE");
|
|
@@ -3213,10 +3213,10 @@ ${c}${t}return __outputs__;
|
|
|
3213
3213
|
}, 0);
|
|
3214
3214
|
},
|
|
3215
3215
|
genAppOpts_: function() {
|
|
3216
|
-
return
|
|
3216
|
+
return jn();
|
|
3217
3217
|
},
|
|
3218
3218
|
genPageOpts_: function() {
|
|
3219
|
-
return
|
|
3219
|
+
return pr(this.app.id);
|
|
3220
3220
|
},
|
|
3221
3221
|
onchange: function(e) {
|
|
3222
3222
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -3227,7 +3227,7 @@ ${c}${t}return __outputs__;
|
|
|
3227
3227
|
}
|
|
3228
3228
|
},
|
|
3229
3229
|
onAppChange_: function(e) {
|
|
3230
|
-
let t =
|
|
3230
|
+
let t = An(e);
|
|
3231
3231
|
if (!t) {
|
|
3232
3232
|
console.assert(!1);
|
|
3233
3233
|
return;
|
|
@@ -3236,13 +3236,13 @@ ${c}${t}return __outputs__;
|
|
|
3236
3236
|
this.app.id = t.id, this.app.name = t.name;
|
|
3237
3237
|
let r = this.getField("PAGE");
|
|
3238
3238
|
if (r.getOptions(!1), n) {
|
|
3239
|
-
let e =
|
|
3239
|
+
let e = dr(this.app.id)?.[0];
|
|
3240
3240
|
r.setValue(e?.id ?? "");
|
|
3241
3241
|
}
|
|
3242
3242
|
this.onPageChange_(r.getValue());
|
|
3243
3243
|
},
|
|
3244
3244
|
onPageChange_: function(e) {
|
|
3245
|
-
let t =
|
|
3245
|
+
let t = fr(this.app.id, e);
|
|
3246
3246
|
if (!t) {
|
|
3247
3247
|
console.assert(!1);
|
|
3248
3248
|
return;
|
|
@@ -3250,13 +3250,13 @@ ${c}${t}return __outputs__;
|
|
|
3250
3250
|
this.page.id = t.id, this.page.name = t.name;
|
|
3251
3251
|
},
|
|
3252
3252
|
checkWarning_: function() {
|
|
3253
|
-
let e =
|
|
3253
|
+
let e = An(this.app.id);
|
|
3254
3254
|
if (!e) {
|
|
3255
3255
|
this.setWarningText(F("WARN_APP_NOT_FOUND"));
|
|
3256
3256
|
return;
|
|
3257
3257
|
}
|
|
3258
3258
|
e.name !== this.app.name && (this.app.name = e.name);
|
|
3259
|
-
let t =
|
|
3259
|
+
let t = fr(this.app.id, this.page.id);
|
|
3260
3260
|
if (!t) {
|
|
3261
3261
|
this.setWarningText(F("WARN_PAGE_NOT_FOUND"));
|
|
3262
3262
|
return;
|
|
@@ -3275,7 +3275,7 @@ ${c}${t}return __outputs__;
|
|
|
3275
3275
|
},
|
|
3276
3276
|
initData_: function() {
|
|
3277
3277
|
if (this.comp.id) return;
|
|
3278
|
-
let e =
|
|
3278
|
+
let e = Wn()?.[0];
|
|
3279
3279
|
if (!e) return;
|
|
3280
3280
|
this.comp.id = e.id, this.comp.name = e.name;
|
|
3281
3281
|
let t = this.getField("COMP");
|
|
@@ -3290,7 +3290,7 @@ ${c}${t}return __outputs__;
|
|
|
3290
3290
|
}, 0);
|
|
3291
3291
|
},
|
|
3292
3292
|
genCompOpts_: function() {
|
|
3293
|
-
return
|
|
3293
|
+
return Kn();
|
|
3294
3294
|
},
|
|
3295
3295
|
onchange: function(e) {
|
|
3296
3296
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -3301,7 +3301,7 @@ ${c}${t}return __outputs__;
|
|
|
3301
3301
|
}
|
|
3302
3302
|
},
|
|
3303
3303
|
onCompChange_: function(e) {
|
|
3304
|
-
let t =
|
|
3304
|
+
let t = Gn(e);
|
|
3305
3305
|
if (!t) {
|
|
3306
3306
|
console.assert(!1);
|
|
3307
3307
|
return;
|
|
@@ -3309,7 +3309,7 @@ ${c}${t}return __outputs__;
|
|
|
3309
3309
|
this.comp.id = t.id, this.comp.name = t.name;
|
|
3310
3310
|
},
|
|
3311
3311
|
checkWarning_: function() {
|
|
3312
|
-
let e =
|
|
3312
|
+
let e = Gn(this.comp.id);
|
|
3313
3313
|
if (!e) {
|
|
3314
3314
|
this.setWarningText(F("WARN_COMP_NOT_FOUND"));
|
|
3315
3315
|
return;
|
|
@@ -3328,7 +3328,7 @@ ${c}${t}return __outputs__;
|
|
|
3328
3328
|
},
|
|
3329
3329
|
initData_: function() {
|
|
3330
3330
|
if (this.slot.id) return;
|
|
3331
|
-
let e =
|
|
3331
|
+
let e = _r()?.[0];
|
|
3332
3332
|
if (!e) return;
|
|
3333
3333
|
this.slot.id = e.id, this.slot.name = e.name;
|
|
3334
3334
|
let t = this.getField("SLOT");
|
|
@@ -3343,7 +3343,7 @@ ${c}${t}return __outputs__;
|
|
|
3343
3343
|
}, 0);
|
|
3344
3344
|
},
|
|
3345
3345
|
genSlotOpts_: function() {
|
|
3346
|
-
return
|
|
3346
|
+
return yr();
|
|
3347
3347
|
},
|
|
3348
3348
|
onchange: function(e) {
|
|
3349
3349
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -3354,7 +3354,7 @@ ${c}${t}return __outputs__;
|
|
|
3354
3354
|
}
|
|
3355
3355
|
},
|
|
3356
3356
|
onSlotChange_: function(e) {
|
|
3357
|
-
let t =
|
|
3357
|
+
let t = vr(e);
|
|
3358
3358
|
if (!t) {
|
|
3359
3359
|
console.assert(!1);
|
|
3360
3360
|
return;
|
|
@@ -3362,7 +3362,7 @@ ${c}${t}return __outputs__;
|
|
|
3362
3362
|
this.slot.id = t.id, this.slot.name = t.name;
|
|
3363
3363
|
},
|
|
3364
3364
|
checkWarning_: function() {
|
|
3365
|
-
let e =
|
|
3365
|
+
let e = vr(this.slot.id);
|
|
3366
3366
|
if (!e) {
|
|
3367
3367
|
this.setWarningText(F("WARN_SLOT_NOT_FOUND"));
|
|
3368
3368
|
return;
|
|
@@ -3386,12 +3386,12 @@ ${c}${t}return __outputs__;
|
|
|
3386
3386
|
},
|
|
3387
3387
|
initData_: function() {
|
|
3388
3388
|
if (this.node.id) return;
|
|
3389
|
-
let e =
|
|
3389
|
+
let e = Ln("getProperty")?.[0];
|
|
3390
3390
|
if (!e) return;
|
|
3391
3391
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
3392
3392
|
let t = this.getField("NODE");
|
|
3393
3393
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
3394
|
-
let n =
|
|
3394
|
+
let n = mr(this.node.id, "read")?.[0];
|
|
3395
3395
|
if (!n) return;
|
|
3396
3396
|
this.property.id = n.id, this.property.kind = n.kind, this.property.names = n.names;
|
|
3397
3397
|
let r = this.getField("PROPERTY");
|
|
@@ -3409,10 +3409,10 @@ ${c}${t}return __outputs__;
|
|
|
3409
3409
|
}, 0);
|
|
3410
3410
|
},
|
|
3411
3411
|
genNodeOpts_: function() {
|
|
3412
|
-
return
|
|
3412
|
+
return Rn("getProperty");
|
|
3413
3413
|
},
|
|
3414
3414
|
genPropertyOpts_: function() {
|
|
3415
|
-
return
|
|
3415
|
+
return gr(this.node.id, "read");
|
|
3416
3416
|
},
|
|
3417
3417
|
onchange: function(e) {
|
|
3418
3418
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -3432,13 +3432,13 @@ ${c}${t}return __outputs__;
|
|
|
3432
3432
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
3433
3433
|
let r = this.getField("PROPERTY");
|
|
3434
3434
|
if (r.getOptions(!1), n) {
|
|
3435
|
-
let e =
|
|
3435
|
+
let e = mr(this.node.id, "read")?.[0];
|
|
3436
3436
|
r.setValue(e?.id ?? "");
|
|
3437
3437
|
}
|
|
3438
3438
|
this.onPropertyChange_(r.getValue());
|
|
3439
3439
|
},
|
|
3440
3440
|
onPropertyChange_: function(e) {
|
|
3441
|
-
let t =
|
|
3441
|
+
let t = hr(e);
|
|
3442
3442
|
if (!t) {
|
|
3443
3443
|
console.assert(!1);
|
|
3444
3444
|
return;
|
|
@@ -3477,7 +3477,7 @@ ${c}${t}return __outputs__;
|
|
|
3477
3477
|
return;
|
|
3478
3478
|
}
|
|
3479
3479
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
3480
|
-
let t =
|
|
3480
|
+
let t = hr(this.property.id);
|
|
3481
3481
|
if (!t) {
|
|
3482
3482
|
this.setWarningText(F("WARN_PROPERTY_NOT_FOUND"));
|
|
3483
3483
|
return;
|
|
@@ -3505,12 +3505,12 @@ ${c}${t}return __outputs__;
|
|
|
3505
3505
|
},
|
|
3506
3506
|
initData_: function() {
|
|
3507
3507
|
if (this.node.id) return;
|
|
3508
|
-
let e =
|
|
3508
|
+
let e = Ln("setProperty")?.[0];
|
|
3509
3509
|
if (!e) return;
|
|
3510
3510
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
3511
3511
|
let t = this.getField("NODE");
|
|
3512
3512
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
3513
|
-
let n =
|
|
3513
|
+
let n = mr(this.node.id, "write")?.[0];
|
|
3514
3514
|
if (!n) return;
|
|
3515
3515
|
this.property.id = n.id, this.property.kind = n.kind, this.property.names = n.names;
|
|
3516
3516
|
let r = this.getField("PROPERTY");
|
|
@@ -3528,10 +3528,10 @@ ${c}${t}return __outputs__;
|
|
|
3528
3528
|
}, 0);
|
|
3529
3529
|
},
|
|
3530
3530
|
genNodeOpts_: function() {
|
|
3531
|
-
return
|
|
3531
|
+
return Rn("setProperty");
|
|
3532
3532
|
},
|
|
3533
3533
|
genPropertyOpts_: function() {
|
|
3534
|
-
return
|
|
3534
|
+
return gr(this.node.id, "write");
|
|
3535
3535
|
},
|
|
3536
3536
|
onchange: function(e) {
|
|
3537
3537
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -3551,13 +3551,13 @@ ${c}${t}return __outputs__;
|
|
|
3551
3551
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
3552
3552
|
let r = this.getField("PROPERTY");
|
|
3553
3553
|
if (r.getOptions(!1), n) {
|
|
3554
|
-
let e =
|
|
3554
|
+
let e = mr(this.node.id, "write")?.[0];
|
|
3555
3555
|
r.setValue(e?.id ?? "");
|
|
3556
3556
|
}
|
|
3557
3557
|
this.onPropertyChange_(r.getValue());
|
|
3558
3558
|
},
|
|
3559
3559
|
onPropertyChange_: function(e) {
|
|
3560
|
-
let t =
|
|
3560
|
+
let t = hr(e);
|
|
3561
3561
|
if (!t) {
|
|
3562
3562
|
console.assert(!1);
|
|
3563
3563
|
return;
|
|
@@ -3578,7 +3578,7 @@ ${c}${t}return __outputs__;
|
|
|
3578
3578
|
},
|
|
3579
3579
|
updateShadow_: function() {
|
|
3580
3580
|
if (this.isInsertionMarker()) return;
|
|
3581
|
-
let e =
|
|
3581
|
+
let e = hr(this.property.id);
|
|
3582
3582
|
if (!e) return;
|
|
3583
3583
|
let t = this.getInput("INSTANCE");
|
|
3584
3584
|
if (t) {
|
|
@@ -3590,7 +3590,7 @@ ${c}${t}return __outputs__;
|
|
|
3590
3590
|
if (n) {
|
|
3591
3591
|
n.setShadowDom(null);
|
|
3592
3592
|
let t = n.connection?.targetBlock();
|
|
3593
|
-
t && t.dispose(), e.meta.element ? n.setCheck(
|
|
3593
|
+
t && t.dispose(), e.meta.element ? n.setCheck(an(e.meta.raw)).setShadowDom(Sn(e.meta.raw)) : n.setCheck(B(e.meta.raw.type)).setShadowDom(H(e.meta.raw.type));
|
|
3594
3594
|
}
|
|
3595
3595
|
},
|
|
3596
3596
|
checkWarning_: function() {
|
|
@@ -3604,7 +3604,7 @@ ${c}${t}return __outputs__;
|
|
|
3604
3604
|
return;
|
|
3605
3605
|
}
|
|
3606
3606
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
3607
|
-
let t =
|
|
3607
|
+
let t = hr(this.property.id);
|
|
3608
3608
|
if (!t) {
|
|
3609
3609
|
this.setWarningText(F("WARN_PROPERTY_NOT_FOUND"));
|
|
3610
3610
|
return;
|
|
@@ -3633,7 +3633,7 @@ ${c}${t}return __outputs__;
|
|
|
3633
3633
|
},
|
|
3634
3634
|
initData_: function() {
|
|
3635
3635
|
if (this.state.id) return;
|
|
3636
|
-
let e =
|
|
3636
|
+
let e = zn()?.[0];
|
|
3637
3637
|
if (!e) return;
|
|
3638
3638
|
this.state.id = e.id, this.state.name = e.name, this.state.type = e.type;
|
|
3639
3639
|
let t = this.getField("STATE");
|
|
@@ -3648,7 +3648,7 @@ ${c}${t}return __outputs__;
|
|
|
3648
3648
|
}, 0);
|
|
3649
3649
|
},
|
|
3650
3650
|
genStateOpts_: function() {
|
|
3651
|
-
return
|
|
3651
|
+
return Vn();
|
|
3652
3652
|
},
|
|
3653
3653
|
onchange: function(e) {
|
|
3654
3654
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -3657,7 +3657,7 @@ ${c}${t}return __outputs__;
|
|
|
3657
3657
|
}
|
|
3658
3658
|
},
|
|
3659
3659
|
onStateChange_: function(e) {
|
|
3660
|
-
let t =
|
|
3660
|
+
let t = Bn(e);
|
|
3661
3661
|
if (!t) {
|
|
3662
3662
|
console.assert(!1);
|
|
3663
3663
|
return;
|
|
@@ -3665,7 +3665,7 @@ ${c}${t}return __outputs__;
|
|
|
3665
3665
|
this.state.id = t.id, this.state.name = t.name, this.state.type = t.type;
|
|
3666
3666
|
},
|
|
3667
3667
|
checkWarning_: function() {
|
|
3668
|
-
let e =
|
|
3668
|
+
let e = Bn(this.state.id);
|
|
3669
3669
|
if (!e) {
|
|
3670
3670
|
this.setWarningText(F("WARN_STATE_NOT_FOUND"));
|
|
3671
3671
|
return;
|
|
@@ -3689,7 +3689,7 @@ ${c}${t}return __outputs__;
|
|
|
3689
3689
|
},
|
|
3690
3690
|
initData_: function() {
|
|
3691
3691
|
if (this.state.id) return;
|
|
3692
|
-
let e =
|
|
3692
|
+
let e = zn()?.[0];
|
|
3693
3693
|
if (!e) return;
|
|
3694
3694
|
this.state.id = e.id, this.state.name = e.name, this.state.type = e.type;
|
|
3695
3695
|
let t = this.getField("STATE");
|
|
@@ -3702,7 +3702,7 @@ ${c}${t}return __outputs__;
|
|
|
3702
3702
|
this.state.id = e.state?.id ?? "", this.state.name = e.state?.name ?? "", this.state.type = e.state?.type ?? "string";
|
|
3703
3703
|
},
|
|
3704
3704
|
genStateOpts_: function() {
|
|
3705
|
-
return
|
|
3705
|
+
return Vn();
|
|
3706
3706
|
},
|
|
3707
3707
|
onchange: function(e) {
|
|
3708
3708
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -3711,7 +3711,7 @@ ${c}${t}return __outputs__;
|
|
|
3711
3711
|
}
|
|
3712
3712
|
},
|
|
3713
3713
|
onStateChange_: function(e) {
|
|
3714
|
-
let t =
|
|
3714
|
+
let t = Bn(e);
|
|
3715
3715
|
if (!t) {
|
|
3716
3716
|
console.assert(!1);
|
|
3717
3717
|
return;
|
|
@@ -3727,7 +3727,7 @@ ${c}${t}return __outputs__;
|
|
|
3727
3727
|
this.getInput("VALUE").setCheck(t).setShadowDom(n);
|
|
3728
3728
|
},
|
|
3729
3729
|
checkWarning_: function() {
|
|
3730
|
-
let e =
|
|
3730
|
+
let e = Bn(this.state.id);
|
|
3731
3731
|
if (!e) {
|
|
3732
3732
|
this.setWarningText(F("WARN_STATE_NOT_FOUND"));
|
|
3733
3733
|
return;
|
|
@@ -3795,7 +3795,7 @@ function ${g.FUNCTION_NAME_PLACEHOLDER_}(c1, c2, ratio) {
|
|
|
3795
3795
|
type: "field_colour",
|
|
3796
3796
|
name: "COLOR",
|
|
3797
3797
|
colour: "#ff0000",
|
|
3798
|
-
colourOptions:
|
|
3798
|
+
colourOptions: sn,
|
|
3799
3799
|
columns: 14
|
|
3800
3800
|
}],
|
|
3801
3801
|
output: "Color",
|
|
@@ -3863,28 +3863,28 @@ function ${g.FUNCTION_NAME_PLACEHOLDER_}(r, g, b) {
|
|
|
3863
3863
|
};
|
|
3864
3864
|
//#endregion
|
|
3865
3865
|
//#region src/core/utils/compute/func.ts
|
|
3866
|
-
function
|
|
3866
|
+
function xr(e) {
|
|
3867
3867
|
let t = S.compute.spaces.find((t) => t.id === e);
|
|
3868
3868
|
return t ? t.funcs : [];
|
|
3869
3869
|
}
|
|
3870
|
-
function
|
|
3870
|
+
function Sr(e, t) {
|
|
3871
3871
|
let n = S.compute.spaces.find((t) => t.id === e);
|
|
3872
3872
|
if (n) return n.funcs.find((e) => e.id === t);
|
|
3873
3873
|
}
|
|
3874
|
-
function
|
|
3874
|
+
function Cr(e) {
|
|
3875
3875
|
let t = [];
|
|
3876
|
-
return
|
|
3876
|
+
return xr(e).forEach(({ id: e, name: n }) => {
|
|
3877
3877
|
t.push([n, e]);
|
|
3878
3878
|
}), I(t);
|
|
3879
3879
|
}
|
|
3880
|
-
function
|
|
3880
|
+
function wr() {
|
|
3881
3881
|
return S.compute.activeFunc;
|
|
3882
3882
|
}
|
|
3883
|
-
function
|
|
3883
|
+
function Tr(e) {
|
|
3884
3884
|
let { activeFunc: t } = S.compute;
|
|
3885
3885
|
return t.outputs?.find((t) => t.id === e);
|
|
3886
3886
|
}
|
|
3887
|
-
function
|
|
3887
|
+
function Er() {
|
|
3888
3888
|
let { activeFunc: e } = S.compute, t = [];
|
|
3889
3889
|
return e.outputs?.forEach(({ id: e, name: n }) => {
|
|
3890
3890
|
t.push([n, e]);
|
|
@@ -3892,18 +3892,18 @@ function Dr() {
|
|
|
3892
3892
|
}
|
|
3893
3893
|
//#endregion
|
|
3894
3894
|
//#region src/core/utils/compute/space.ts
|
|
3895
|
-
function
|
|
3895
|
+
function Dr(e) {
|
|
3896
3896
|
let t = [];
|
|
3897
3897
|
return S.compute.spaces.forEach((n) => {
|
|
3898
3898
|
e === "func" && n.funcs.length > 0 && t.push(n), e === "flow" && n.flows.length > 0 && t.push(n);
|
|
3899
3899
|
}), t;
|
|
3900
3900
|
}
|
|
3901
|
-
function
|
|
3901
|
+
function Or(e) {
|
|
3902
3902
|
return S.compute.spaces.find((t) => t.id === e);
|
|
3903
3903
|
}
|
|
3904
|
-
function
|
|
3904
|
+
function kr(e) {
|
|
3905
3905
|
let t = [];
|
|
3906
|
-
return
|
|
3906
|
+
return Dr(e).forEach(({ id: e, name: n }) => {
|
|
3907
3907
|
t.push([n, e]);
|
|
3908
3908
|
}), I(t);
|
|
3909
3909
|
}
|
|
@@ -3921,12 +3921,12 @@ y.call_func_v1 = {
|
|
|
3921
3921
|
},
|
|
3922
3922
|
initData_: function() {
|
|
3923
3923
|
if (this.space.id) return;
|
|
3924
|
-
let e =
|
|
3924
|
+
let e = Dr("func")?.[0];
|
|
3925
3925
|
if (!e) return;
|
|
3926
3926
|
this.space.id = e.id, this.space.name = e.name;
|
|
3927
3927
|
let t = this.getField("SPACE");
|
|
3928
3928
|
t.getOptions(!1), t.setValue(this.space.id);
|
|
3929
|
-
let n =
|
|
3929
|
+
let n = xr(this.space.id)?.[0];
|
|
3930
3930
|
if (!n) return;
|
|
3931
3931
|
this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
|
|
3932
3932
|
let r = this.getField("FUNC");
|
|
@@ -3944,10 +3944,10 @@ y.call_func_v1 = {
|
|
|
3944
3944
|
}, 0);
|
|
3945
3945
|
},
|
|
3946
3946
|
genSpaceOpts_: function() {
|
|
3947
|
-
return
|
|
3947
|
+
return kr("func");
|
|
3948
3948
|
},
|
|
3949
3949
|
genFuncOpts_: function() {
|
|
3950
|
-
return
|
|
3950
|
+
return Cr(this.space.id);
|
|
3951
3951
|
},
|
|
3952
3952
|
onchange: function(e) {
|
|
3953
3953
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -3958,7 +3958,7 @@ y.call_func_v1 = {
|
|
|
3958
3958
|
}
|
|
3959
3959
|
},
|
|
3960
3960
|
onSpaceChange_: function(e) {
|
|
3961
|
-
let t =
|
|
3961
|
+
let t = Or(e);
|
|
3962
3962
|
if (!t) {
|
|
3963
3963
|
console.assert(!1);
|
|
3964
3964
|
return;
|
|
@@ -3967,13 +3967,13 @@ y.call_func_v1 = {
|
|
|
3967
3967
|
this.space.id = t.id, this.space.name = t.name;
|
|
3968
3968
|
let r = this.getField("FUNC");
|
|
3969
3969
|
if (r.getOptions(!1), n) {
|
|
3970
|
-
let e =
|
|
3970
|
+
let e = xr(this.space.id)?.[0];
|
|
3971
3971
|
r.setValue(e?.id ?? "");
|
|
3972
3972
|
}
|
|
3973
3973
|
this.onFuncChange_(r.getValue());
|
|
3974
3974
|
},
|
|
3975
3975
|
onFuncChange_: function(e) {
|
|
3976
|
-
let t =
|
|
3976
|
+
let t = Sr(this.space.id, e);
|
|
3977
3977
|
if (!t) {
|
|
3978
3978
|
console.assert(!1);
|
|
3979
3979
|
return;
|
|
@@ -4029,13 +4029,13 @@ y.call_func_v1 = {
|
|
|
4029
4029
|
V(this, e);
|
|
4030
4030
|
},
|
|
4031
4031
|
checkWarning_: function() {
|
|
4032
|
-
let e =
|
|
4032
|
+
let e = Or(this.space.id);
|
|
4033
4033
|
if (!e) {
|
|
4034
4034
|
this.setWarningText(F("WARN_SPACE_NOT_FOUND"));
|
|
4035
4035
|
return;
|
|
4036
4036
|
}
|
|
4037
4037
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
4038
|
-
let t =
|
|
4038
|
+
let t = Sr(this.space.id, this.func.id);
|
|
4039
4039
|
if (!t) {
|
|
4040
4040
|
this.setWarningText(F("WARN_FUNC_NOT_FOUND"));
|
|
4041
4041
|
return;
|
|
@@ -4080,12 +4080,12 @@ ${c}${l}}
|
|
|
4080
4080
|
},
|
|
4081
4081
|
initData_: function() {
|
|
4082
4082
|
if (this.space.id) return;
|
|
4083
|
-
let e =
|
|
4083
|
+
let e = Dr("func")?.[0];
|
|
4084
4084
|
if (!e) return;
|
|
4085
4085
|
this.space.id = e.id, this.space.name = e.name;
|
|
4086
4086
|
let t = this.getField("SPACE");
|
|
4087
4087
|
t.getOptions(!1), t.setValue(this.space.id);
|
|
4088
|
-
let n =
|
|
4088
|
+
let n = xr(this.space.id)?.[0];
|
|
4089
4089
|
if (!n) return;
|
|
4090
4090
|
this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
|
|
4091
4091
|
let r = this.getField("FUNC");
|
|
@@ -4103,10 +4103,10 @@ ${c}${l}}
|
|
|
4103
4103
|
}, 0);
|
|
4104
4104
|
},
|
|
4105
4105
|
genSpaceOpts_: function() {
|
|
4106
|
-
return
|
|
4106
|
+
return kr("func");
|
|
4107
4107
|
},
|
|
4108
4108
|
genFuncOpts_: function() {
|
|
4109
|
-
return
|
|
4109
|
+
return Cr(this.space.id);
|
|
4110
4110
|
},
|
|
4111
4111
|
onchange: function(e) {
|
|
4112
4112
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -4117,7 +4117,7 @@ ${c}${l}}
|
|
|
4117
4117
|
}
|
|
4118
4118
|
},
|
|
4119
4119
|
onSpaceChange_: function(e) {
|
|
4120
|
-
let t =
|
|
4120
|
+
let t = Or(e);
|
|
4121
4121
|
if (!t) {
|
|
4122
4122
|
console.assert(!1);
|
|
4123
4123
|
return;
|
|
@@ -4126,13 +4126,13 @@ ${c}${l}}
|
|
|
4126
4126
|
this.space.id = t.id, this.space.name = t.name;
|
|
4127
4127
|
let r = this.getField("FUNC");
|
|
4128
4128
|
if (r.getOptions(!1), n) {
|
|
4129
|
-
let e =
|
|
4129
|
+
let e = xr(this.space.id)?.[0];
|
|
4130
4130
|
r.setValue(e?.id ?? "");
|
|
4131
4131
|
}
|
|
4132
4132
|
this.onFuncChange_(r.getValue());
|
|
4133
4133
|
},
|
|
4134
4134
|
onFuncChange_: function(e) {
|
|
4135
|
-
let t =
|
|
4135
|
+
let t = Sr(this.space.id, e);
|
|
4136
4136
|
if (!t) {
|
|
4137
4137
|
console.assert(!1);
|
|
4138
4138
|
return;
|
|
@@ -4188,13 +4188,13 @@ ${c}${l}}
|
|
|
4188
4188
|
V(this, e);
|
|
4189
4189
|
},
|
|
4190
4190
|
checkWarning_: function() {
|
|
4191
|
-
let e =
|
|
4191
|
+
let e = Or(this.space.id);
|
|
4192
4192
|
if (!e) {
|
|
4193
4193
|
this.setWarningText(F("WARN_SPACE_NOT_FOUND"));
|
|
4194
4194
|
return;
|
|
4195
4195
|
}
|
|
4196
4196
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
4197
|
-
let t =
|
|
4197
|
+
let t = Sr(this.space.id, this.func.id);
|
|
4198
4198
|
if (!t) {
|
|
4199
4199
|
this.setWarningText(F("WARN_FUNC_NOT_FOUND"));
|
|
4200
4200
|
return;
|
|
@@ -4234,7 +4234,7 @@ ${c}${l}}
|
|
|
4234
4234
|
},
|
|
4235
4235
|
initData_: function() {
|
|
4236
4236
|
if (this.func.id) return;
|
|
4237
|
-
let { id: e, inputs: t } =
|
|
4237
|
+
let { id: e, inputs: t } = wr();
|
|
4238
4238
|
this.func.id = e, this.func.inputs = t;
|
|
4239
4239
|
},
|
|
4240
4240
|
saveExtraState: function() {
|
|
@@ -4272,7 +4272,7 @@ ${c}${l}}
|
|
|
4272
4272
|
V(this, e);
|
|
4273
4273
|
},
|
|
4274
4274
|
checkWarning_: function() {
|
|
4275
|
-
let { id: e, inputs: t } =
|
|
4275
|
+
let { id: e, inputs: t } = wr();
|
|
4276
4276
|
if (this.func.id !== e && (this.func.id = e), !v(t, this.func.inputs)) {
|
|
4277
4277
|
this.setWarningText(F("WARN_FUNC_HAS_CHANGED"));
|
|
4278
4278
|
return;
|
|
@@ -4297,7 +4297,7 @@ ${n}}`;
|
|
|
4297
4297
|
},
|
|
4298
4298
|
initData_: function() {
|
|
4299
4299
|
if (this.output.id) return;
|
|
4300
|
-
let e =
|
|
4300
|
+
let e = wr().outputs?.[0];
|
|
4301
4301
|
e && (this.output.id = e.id, this.output.name = e.name, this.output.type = e.type);
|
|
4302
4302
|
},
|
|
4303
4303
|
saveExtraState: function() {
|
|
@@ -4309,7 +4309,7 @@ ${n}}`;
|
|
|
4309
4309
|
}, 0);
|
|
4310
4310
|
},
|
|
4311
4311
|
genOutputOpts_: function() {
|
|
4312
|
-
return
|
|
4312
|
+
return Er();
|
|
4313
4313
|
},
|
|
4314
4314
|
onchange: function(e) {
|
|
4315
4315
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -4320,7 +4320,7 @@ ${n}}`;
|
|
|
4320
4320
|
}
|
|
4321
4321
|
},
|
|
4322
4322
|
onOutputChange_: function(e) {
|
|
4323
|
-
let t =
|
|
4323
|
+
let t = Tr(e);
|
|
4324
4324
|
if (!t) {
|
|
4325
4325
|
console.assert(!1);
|
|
4326
4326
|
return;
|
|
@@ -4341,7 +4341,7 @@ ${n}}`;
|
|
|
4341
4341
|
this.getInput("VALUE").setShadowDom(e);
|
|
4342
4342
|
},
|
|
4343
4343
|
checkWarning_: function() {
|
|
4344
|
-
let e =
|
|
4344
|
+
let e = Tr(this.output.id);
|
|
4345
4345
|
if (!e) {
|
|
4346
4346
|
this.setWarningText(F("WARN_FUNC_HAS_CHANGED"));
|
|
4347
4347
|
return;
|
|
@@ -4411,11 +4411,11 @@ function Y() {
|
|
|
4411
4411
|
t.tables.length > 0 && e.push(t);
|
|
4412
4412
|
}), e;
|
|
4413
4413
|
}
|
|
4414
|
-
function
|
|
4414
|
+
function Ar(e) {
|
|
4415
4415
|
let { spaces: t } = S.data;
|
|
4416
4416
|
return t.find((t) => t.id === e);
|
|
4417
4417
|
}
|
|
4418
|
-
function
|
|
4418
|
+
function jr() {
|
|
4419
4419
|
let e = [];
|
|
4420
4420
|
return Y().forEach(({ id: t, name: n }) => {
|
|
4421
4421
|
e.push([n, t]);
|
|
@@ -4427,37 +4427,37 @@ function X(e) {
|
|
|
4427
4427
|
let { spaces: t } = S.data, n = t.find((t) => t.id === e);
|
|
4428
4428
|
return n ? n.tables : [];
|
|
4429
4429
|
}
|
|
4430
|
-
function
|
|
4430
|
+
function Mr(e, t) {
|
|
4431
4431
|
let { spaces: n } = S.data, r = n.find((t) => t.id === e);
|
|
4432
4432
|
if (r) return r.tables.find((e) => e.id === t);
|
|
4433
4433
|
}
|
|
4434
|
-
function
|
|
4434
|
+
function Nr(e) {
|
|
4435
4435
|
let t = [];
|
|
4436
4436
|
return X(e).forEach(({ id: e, name: n }) => {
|
|
4437
4437
|
t.push([n, e]);
|
|
4438
4438
|
}), I(t);
|
|
4439
4439
|
}
|
|
4440
|
-
function
|
|
4440
|
+
function Pr(e, t) {
|
|
4441
4441
|
let { spaces: n } = S.data, r = n.find((t) => t.id === e);
|
|
4442
4442
|
if (!r) return [];
|
|
4443
4443
|
let i = r.tables.find((e) => e.id === t);
|
|
4444
4444
|
return i ? i.columns : [];
|
|
4445
4445
|
}
|
|
4446
|
-
function
|
|
4446
|
+
function Fr(e, t, n) {
|
|
4447
4447
|
let { spaces: r } = S.data, i = r.find((t) => t.id === e);
|
|
4448
4448
|
if (!i) return;
|
|
4449
4449
|
let a = i.tables.find((e) => e.id === t);
|
|
4450
4450
|
if (a) return a.columns.find((e) => e.id === n);
|
|
4451
4451
|
}
|
|
4452
|
-
function
|
|
4452
|
+
function Ir(e, t) {
|
|
4453
4453
|
let n = [];
|
|
4454
|
-
return
|
|
4454
|
+
return Pr(e, t).forEach(({ id: e, name: t }) => {
|
|
4455
4455
|
n.push([t, e]);
|
|
4456
4456
|
}), I(n);
|
|
4457
4457
|
}
|
|
4458
4458
|
//#endregion
|
|
4459
4459
|
//#region src/core/blocks/data/addData/v1/blocks.ts
|
|
4460
|
-
function
|
|
4460
|
+
function Lr(e) {
|
|
4461
4461
|
let t = e.getInput("TABLE").connection;
|
|
4462
4462
|
if (t.targetBlock()) return;
|
|
4463
4463
|
let n, r, i = Y()?.[0];
|
|
@@ -4489,7 +4489,7 @@ function Rr(e) {
|
|
|
4489
4489
|
}, o = l.blocks.append(a, e.workspace);
|
|
4490
4490
|
t.connect(o.outputConnection);
|
|
4491
4491
|
}
|
|
4492
|
-
function
|
|
4492
|
+
function Rr(e) {
|
|
4493
4493
|
let t = e.getInput("HANDLE").connection;
|
|
4494
4494
|
if (t.targetBlock()) return;
|
|
4495
4495
|
let n = l.blocks.append({
|
|
@@ -4524,7 +4524,7 @@ y.add_data_v1 = {
|
|
|
4524
4524
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("DATA") || (this.appendValueInput("DATA"), this.moveInputBefore("DATA", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(u.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "SUCCESS"));
|
|
4525
4525
|
},
|
|
4526
4526
|
ensureBlocks_: function() {
|
|
4527
|
-
this.isInsertionMarker() || (
|
|
4527
|
+
this.isInsertionMarker() || (Lr(this), V(this, [
|
|
4528
4528
|
[
|
|
4529
4529
|
"SUCCESS",
|
|
4530
4530
|
"__success__",
|
|
@@ -4543,7 +4543,7 @@ y.add_data_v1 = {
|
|
|
4543
4543
|
"x-runtime-lib.data",
|
|
4544
4544
|
!0
|
|
4545
4545
|
]
|
|
4546
|
-
]),
|
|
4546
|
+
]), Rr(this));
|
|
4547
4547
|
}
|
|
4548
4548
|
}, g.forBlock.add_data_v1 = function(e) {
|
|
4549
4549
|
let t = g.INDENT;
|
|
@@ -4591,7 +4591,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
4591
4591
|
let t = X(this.space.id)?.[0];
|
|
4592
4592
|
if (!t) return;
|
|
4593
4593
|
this.table.id = t.id, this.table.name = t.name;
|
|
4594
|
-
let n =
|
|
4594
|
+
let n = Pr(this.space.id, this.table.id)?.[0];
|
|
4595
4595
|
n && (this.column.id = n.id, this.column.name = n.name, this.column.type = n.type, this.column.extend = n.extend);
|
|
4596
4596
|
},
|
|
4597
4597
|
saveExtraState: function() {
|
|
@@ -4607,13 +4607,13 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
4607
4607
|
}, 0);
|
|
4608
4608
|
},
|
|
4609
4609
|
genSpaceOpts_: function() {
|
|
4610
|
-
return
|
|
4610
|
+
return jr();
|
|
4611
4611
|
},
|
|
4612
4612
|
genTableOpts_: function() {
|
|
4613
|
-
return
|
|
4613
|
+
return Nr(this.space.id);
|
|
4614
4614
|
},
|
|
4615
4615
|
genColumnOpts_: function() {
|
|
4616
|
-
return
|
|
4616
|
+
return Ir(this.space.id, this.table.id);
|
|
4617
4617
|
},
|
|
4618
4618
|
onchange: function(e) {
|
|
4619
4619
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -4624,7 +4624,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
4624
4624
|
}
|
|
4625
4625
|
},
|
|
4626
4626
|
onSpaceChange_: function(e) {
|
|
4627
|
-
let t =
|
|
4627
|
+
let t = Ar(e);
|
|
4628
4628
|
if (!t) {
|
|
4629
4629
|
console.assert(!1);
|
|
4630
4630
|
return;
|
|
@@ -4639,7 +4639,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
4639
4639
|
this.onTableChange_(r.getValue());
|
|
4640
4640
|
},
|
|
4641
4641
|
onTableChange_: function(e) {
|
|
4642
|
-
let t =
|
|
4642
|
+
let t = Mr(this.space.id, e);
|
|
4643
4643
|
if (!t) {
|
|
4644
4644
|
console.assert(!1);
|
|
4645
4645
|
return;
|
|
@@ -4648,13 +4648,13 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
4648
4648
|
this.table.id = t.id, this.table.name = t.name;
|
|
4649
4649
|
let r = this.getField("COLUMN");
|
|
4650
4650
|
if (r.getOptions(!1), n) {
|
|
4651
|
-
let e =
|
|
4651
|
+
let e = Pr(this.space.id, this.table.id)?.[0];
|
|
4652
4652
|
r.setValue(e?.id ?? "");
|
|
4653
4653
|
}
|
|
4654
4654
|
this.onColumnChange_(r.getValue());
|
|
4655
4655
|
},
|
|
4656
4656
|
onColumnChange_: function(e) {
|
|
4657
|
-
let t =
|
|
4657
|
+
let t = Fr(this.space.id, this.table.id, e);
|
|
4658
4658
|
if (!t) {
|
|
4659
4659
|
console.assert(!1);
|
|
4660
4660
|
return;
|
|
@@ -4674,27 +4674,27 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
4674
4674
|
let t = this.getInput("VALUE").connection, n = t.targetBlock();
|
|
4675
4675
|
if (e) n && n.dispose();
|
|
4676
4676
|
else if (n) return;
|
|
4677
|
-
let r =
|
|
4677
|
+
let r = Kt(this.workspace, this.column.type);
|
|
4678
4678
|
r && (t.setCheck(null), t.connect(r.outputConnection));
|
|
4679
4679
|
},
|
|
4680
4680
|
updateCheck_: function() {
|
|
4681
|
-
let e =
|
|
4681
|
+
let e = on(this.column.type);
|
|
4682
4682
|
this.getInput("VALUE").connection.setCheck(e);
|
|
4683
4683
|
},
|
|
4684
4684
|
checkWarning_: function() {
|
|
4685
|
-
let e =
|
|
4685
|
+
let e = Ar(this.space.id);
|
|
4686
4686
|
if (!e) {
|
|
4687
4687
|
this.setWarningText(F("WARN_SPACE_NOT_FOUND"));
|
|
4688
4688
|
return;
|
|
4689
4689
|
}
|
|
4690
4690
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
4691
|
-
let t =
|
|
4691
|
+
let t = Mr(this.space.id, this.table.id);
|
|
4692
4692
|
if (!t) {
|
|
4693
4693
|
this.setWarningText(F("WARN_TABLE_NOT_FOUND"));
|
|
4694
4694
|
return;
|
|
4695
4695
|
}
|
|
4696
4696
|
t.name !== this.table.name && (this.table.name = t.name);
|
|
4697
|
-
let n =
|
|
4697
|
+
let n = Fr(this.space.id, this.table.id, this.column.id);
|
|
4698
4698
|
if (!n) {
|
|
4699
4699
|
this.setWarningText(F("WARN_COLUMN_NOT_FOUND"));
|
|
4700
4700
|
return;
|
|
@@ -4780,7 +4780,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
4780
4780
|
};
|
|
4781
4781
|
//#endregion
|
|
4782
4782
|
//#region src/core/blocks/data/deleteData/v1/blocks.ts
|
|
4783
|
-
function
|
|
4783
|
+
function zr(e) {
|
|
4784
4784
|
let t = e.getInput("TABLE").connection;
|
|
4785
4785
|
if (t.targetBlock()) return;
|
|
4786
4786
|
let n = Y()?.[0], r = X(n?.id ?? "")?.[0], i = {
|
|
@@ -4798,10 +4798,10 @@ function Br(e) {
|
|
|
4798
4798
|
}, a = l.blocks.append(i, e.workspace);
|
|
4799
4799
|
t.connect(a.outputConnection);
|
|
4800
4800
|
}
|
|
4801
|
-
function
|
|
4801
|
+
function Br(e) {
|
|
4802
4802
|
let t = e.getInput("CONDITION").connection;
|
|
4803
4803
|
if (t.targetBlock()) return;
|
|
4804
|
-
let n = Y()?.[0], r = X(n?.id ?? "")?.[0], i =
|
|
4804
|
+
let n = Y()?.[0], r = X(n?.id ?? "")?.[0], i = Pr(n?.id, r?.id)?.[0], a = {
|
|
4805
4805
|
type: "cond_atomic_v1",
|
|
4806
4806
|
extraState: {
|
|
4807
4807
|
space: {
|
|
@@ -4822,7 +4822,7 @@ function Vr(e) {
|
|
|
4822
4822
|
}, o = l.blocks.append(a, e.workspace);
|
|
4823
4823
|
t.connect(o.outputConnection);
|
|
4824
4824
|
}
|
|
4825
|
-
function
|
|
4825
|
+
function Vr(e) {
|
|
4826
4826
|
let t = e.getInput("HANDLE").connection;
|
|
4827
4827
|
if (t.targetBlock()) return;
|
|
4828
4828
|
let n = l.blocks.append({
|
|
@@ -4857,7 +4857,7 @@ y.delete_data_v1 = {
|
|
|
4857
4857
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "HANDLE")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(u.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("SelectTable").setAlign(u.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
4858
4858
|
},
|
|
4859
4859
|
ensureBlocks_: function() {
|
|
4860
|
-
this.isInsertionMarker() || (
|
|
4860
|
+
this.isInsertionMarker() || (zr(this), Br(this), V(this, [[
|
|
4861
4861
|
"SUCCESS",
|
|
4862
4862
|
"__success__",
|
|
4863
4863
|
"x-runtime-lib.success",
|
|
@@ -4867,7 +4867,7 @@ y.delete_data_v1 = {
|
|
|
4867
4867
|
"__message__",
|
|
4868
4868
|
"x-runtime-lib.message",
|
|
4869
4869
|
!0
|
|
4870
|
-
]]),
|
|
4870
|
+
]]), Vr(this));
|
|
4871
4871
|
}
|
|
4872
4872
|
}, g.forBlock.delete_data_v1 = function(e) {
|
|
4873
4873
|
let t = g.INDENT;
|
|
@@ -4901,7 +4901,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
4901
4901
|
};
|
|
4902
4902
|
//#endregion
|
|
4903
4903
|
//#region src/core/blocks/data/queryData/v1/blocks.ts
|
|
4904
|
-
function
|
|
4904
|
+
function Hr(e) {
|
|
4905
4905
|
let t = e.getInput("TABLE").connection;
|
|
4906
4906
|
if (t.targetBlock()) return;
|
|
4907
4907
|
let n, r, i = Y()?.[0];
|
|
@@ -4933,13 +4933,13 @@ function Ur(e) {
|
|
|
4933
4933
|
}, o = l.blocks.append(a, e.workspace);
|
|
4934
4934
|
t.connect(o.outputConnection);
|
|
4935
4935
|
}
|
|
4936
|
-
function
|
|
4936
|
+
function Ur(e) {
|
|
4937
4937
|
let t = e.getInput("CONDITION").connection;
|
|
4938
4938
|
if (t.targetBlock()) return;
|
|
4939
4939
|
let n = l.blocks.append({ type: "cond_atomic_v1" }, e.workspace);
|
|
4940
4940
|
t.connect(n.outputConnection);
|
|
4941
4941
|
}
|
|
4942
|
-
function
|
|
4942
|
+
function Wr(e) {
|
|
4943
4943
|
let t = e.getInput("EXTRA").connection;
|
|
4944
4944
|
if (t.targetBlock()) return;
|
|
4945
4945
|
let n = l.blocks.append({
|
|
@@ -4961,7 +4961,7 @@ function Gr(e) {
|
|
|
4961
4961
|
}, e.workspace);
|
|
4962
4962
|
t.connect(n.outputConnection);
|
|
4963
4963
|
}
|
|
4964
|
-
function
|
|
4964
|
+
function Gr(e) {
|
|
4965
4965
|
let t = e.getInput("HANDLE").connection;
|
|
4966
4966
|
if (t.targetBlock()) return;
|
|
4967
4967
|
let n = l.blocks.append({
|
|
@@ -5005,7 +5005,7 @@ t([{
|
|
|
5005
5005
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("EXTRA_DATA") || (this.appendValueInput("EXTRA_DATA"), this.moveInputBefore("EXTRA_DATA", "HANDLE")), this.getInput("MAIN_DATA") || (this.appendValueInput("MAIN_DATA"), this.moveInputBefore("MAIN_DATA", "EXTRA_DATA")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "MAIN_DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("EXTRA") || (this.appendValueInput("EXTRA").setCheck(["QueryExtra", "Array"]).setAlign(u.Align.RIGHT).appendField("%{BKY_DATA_EXTRA}"), this.moveInputBefore("EXTRA", "SUCCESS")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(u.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "EXTRA")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck(["SelectColumn", "Array"]).setAlign(u.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
5006
5006
|
},
|
|
5007
5007
|
ensureBlocks_: function() {
|
|
5008
|
-
this.isInsertionMarker() || (
|
|
5008
|
+
this.isInsertionMarker() || (Hr(this), Ur(this), Wr(this), V(this, [
|
|
5009
5009
|
[
|
|
5010
5010
|
"SUCCESS",
|
|
5011
5011
|
"__success__",
|
|
@@ -5030,7 +5030,7 @@ t([{
|
|
|
5030
5030
|
"x-runtime-lib.extraData",
|
|
5031
5031
|
!0
|
|
5032
5032
|
]
|
|
5033
|
-
]),
|
|
5033
|
+
]), Gr(this));
|
|
5034
5034
|
}
|
|
5035
5035
|
}, g.forBlock.query_data_v1 = function(e) {
|
|
5036
5036
|
let t = g.INDENT;
|
|
@@ -5128,10 +5128,10 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5128
5128
|
}, 0);
|
|
5129
5129
|
},
|
|
5130
5130
|
genSpaceOpts_: function() {
|
|
5131
|
-
return
|
|
5131
|
+
return jr();
|
|
5132
5132
|
},
|
|
5133
5133
|
genTableOpts_: function() {
|
|
5134
|
-
return
|
|
5134
|
+
return Nr(this.space.id);
|
|
5135
5135
|
},
|
|
5136
5136
|
genColumnOpts_: function() {
|
|
5137
5137
|
let e = [];
|
|
@@ -5158,7 +5158,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5158
5158
|
}
|
|
5159
5159
|
},
|
|
5160
5160
|
onSpaceChange_: function(e) {
|
|
5161
|
-
let t =
|
|
5161
|
+
let t = Ar(e);
|
|
5162
5162
|
if (!t) {
|
|
5163
5163
|
console.assert(!1);
|
|
5164
5164
|
return;
|
|
@@ -5173,7 +5173,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5173
5173
|
this.onTableChange_(r.getValue());
|
|
5174
5174
|
},
|
|
5175
5175
|
onTableChange_: function(e) {
|
|
5176
|
-
let t =
|
|
5176
|
+
let t = Mr(this.space.id, e);
|
|
5177
5177
|
if (!t) {
|
|
5178
5178
|
console.assert(!1);
|
|
5179
5179
|
return;
|
|
@@ -5247,13 +5247,13 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5247
5247
|
}
|
|
5248
5248
|
},
|
|
5249
5249
|
checkWarning_: function() {
|
|
5250
|
-
let e =
|
|
5250
|
+
let e = Ar(this.space.id);
|
|
5251
5251
|
if (!e) {
|
|
5252
5252
|
this.setWarningText(F("WARN_SPACE_NOT_FOUND"));
|
|
5253
5253
|
return;
|
|
5254
5254
|
}
|
|
5255
5255
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
5256
|
-
let t =
|
|
5256
|
+
let t = Mr(this.space.id, this.table.id);
|
|
5257
5257
|
if (!t) {
|
|
5258
5258
|
this.setWarningText(F("WARN_TABLE_NOT_FOUND"));
|
|
5259
5259
|
return;
|
|
@@ -5310,10 +5310,10 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5310
5310
|
this.space.id = e.space?.id ?? "", this.space.name = e.space?.name ?? "", this.table.id = e.table?.id ?? "", this.table.name = e.table?.name ?? "", this.checkWarning_();
|
|
5311
5311
|
},
|
|
5312
5312
|
genSpaceOpts_: function() {
|
|
5313
|
-
return
|
|
5313
|
+
return jr();
|
|
5314
5314
|
},
|
|
5315
5315
|
genTableOpts_: function() {
|
|
5316
|
-
return
|
|
5316
|
+
return Nr(this.space.id);
|
|
5317
5317
|
},
|
|
5318
5318
|
onchange: function(e) {
|
|
5319
5319
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -5324,7 +5324,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5324
5324
|
}
|
|
5325
5325
|
},
|
|
5326
5326
|
onSpaceChange_: function(e) {
|
|
5327
|
-
let t =
|
|
5327
|
+
let t = Ar(e);
|
|
5328
5328
|
if (!t) {
|
|
5329
5329
|
console.assert(!1);
|
|
5330
5330
|
return;
|
|
@@ -5339,7 +5339,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5339
5339
|
this.onTableChange_(r.getValue());
|
|
5340
5340
|
},
|
|
5341
5341
|
onTableChange_: function(e) {
|
|
5342
|
-
let t =
|
|
5342
|
+
let t = Mr(this.space.id, e);
|
|
5343
5343
|
if (!t) {
|
|
5344
5344
|
console.assert(!1);
|
|
5345
5345
|
return;
|
|
@@ -5347,13 +5347,13 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5347
5347
|
this.table.id = t.id, this.table.name = t.name;
|
|
5348
5348
|
},
|
|
5349
5349
|
checkWarning_: function() {
|
|
5350
|
-
let e =
|
|
5350
|
+
let e = Ar(this.space.id);
|
|
5351
5351
|
if (!e) {
|
|
5352
5352
|
this.setWarningText(F("WARN_SPACE_NOT_FOUND"));
|
|
5353
5353
|
return;
|
|
5354
5354
|
}
|
|
5355
5355
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
5356
|
-
let t =
|
|
5356
|
+
let t = Mr(this.space.id, this.table.id);
|
|
5357
5357
|
if (!t) {
|
|
5358
5358
|
this.setWarningText(F("WARN_TABLE_NOT_FOUND"));
|
|
5359
5359
|
return;
|
|
@@ -5392,7 +5392,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5392
5392
|
]]);
|
|
5393
5393
|
}
|
|
5394
5394
|
}, g.forBlock.transaction_v1 = function(e) {
|
|
5395
|
-
let t = g.INDENT, n = e, r =
|
|
5395
|
+
let t = g.INDENT, n = e, r = Zt(n), i = g.statementToCode(n, "HANDLE"), a = g.statementToCode(n, "FINALLY");
|
|
5396
5396
|
return `{
|
|
5397
5397
|
${t}var __error${r}__ = '';
|
|
5398
5398
|
${t}var __txExist${r}__ = typeof(__tx__) !== 'undefined';
|
|
@@ -5474,10 +5474,10 @@ ${t}}
|
|
|
5474
5474
|
}, 0);
|
|
5475
5475
|
},
|
|
5476
5476
|
genSpaceOpts_: function() {
|
|
5477
|
-
return
|
|
5477
|
+
return jr();
|
|
5478
5478
|
},
|
|
5479
5479
|
genTableOpts_: function() {
|
|
5480
|
-
return
|
|
5480
|
+
return Nr(this.space.id);
|
|
5481
5481
|
},
|
|
5482
5482
|
genColumnOpts_: function() {
|
|
5483
5483
|
let e = [];
|
|
@@ -5504,7 +5504,7 @@ ${t}}
|
|
|
5504
5504
|
}
|
|
5505
5505
|
},
|
|
5506
5506
|
onSpaceChange_: function(e) {
|
|
5507
|
-
let t =
|
|
5507
|
+
let t = Ar(e);
|
|
5508
5508
|
if (!t) {
|
|
5509
5509
|
console.assert(!1);
|
|
5510
5510
|
return;
|
|
@@ -5519,7 +5519,7 @@ ${t}}
|
|
|
5519
5519
|
this.onTableChange_(r.getValue());
|
|
5520
5520
|
},
|
|
5521
5521
|
onTableChange_: function(e) {
|
|
5522
|
-
let t =
|
|
5522
|
+
let t = Mr(this.space.id, e);
|
|
5523
5523
|
if (!t) {
|
|
5524
5524
|
console.assert(!1);
|
|
5525
5525
|
return;
|
|
@@ -5541,7 +5541,7 @@ ${t}}
|
|
|
5541
5541
|
}
|
|
5542
5542
|
let r = this.getInput("ADD" + e).connection, i = r.targetBlock();
|
|
5543
5543
|
i && i.dispose();
|
|
5544
|
-
let a =
|
|
5544
|
+
let a = Kt(this.workspace, n.type);
|
|
5545
5545
|
a && (r.setCheck(null), r.connect(a.outputConnection)), this.updateCheck_();
|
|
5546
5546
|
},
|
|
5547
5547
|
decompose: function(e) {
|
|
@@ -5612,7 +5612,7 @@ ${t}}
|
|
|
5612
5612
|
let a = this.getFieldValue("COLUMN" + t), o = this.table.columns.find((e) => e.id === a);
|
|
5613
5613
|
if (!o) continue;
|
|
5614
5614
|
n.setCheck(null);
|
|
5615
|
-
let s =
|
|
5615
|
+
let s = Kt(this.workspace, o.type);
|
|
5616
5616
|
s && r.connect(s.outputConnection);
|
|
5617
5617
|
}
|
|
5618
5618
|
},
|
|
@@ -5620,18 +5620,18 @@ ${t}}
|
|
|
5620
5620
|
for (let e = 0; e < this.itemCount_; e++) {
|
|
5621
5621
|
let t = this.getFieldValue("COLUMN" + e), n = this.table.columns.find((e) => e.id === t);
|
|
5622
5622
|
if (!n) continue;
|
|
5623
|
-
let r =
|
|
5623
|
+
let r = on(n.type);
|
|
5624
5624
|
this.getInput("ADD" + e).setCheck(r);
|
|
5625
5625
|
}
|
|
5626
5626
|
},
|
|
5627
5627
|
checkWarning_: function() {
|
|
5628
|
-
let e =
|
|
5628
|
+
let e = Ar(this.space.id);
|
|
5629
5629
|
if (!e) {
|
|
5630
5630
|
this.setWarningText(F("WARN_SPACE_NOT_FOUND"));
|
|
5631
5631
|
return;
|
|
5632
5632
|
}
|
|
5633
5633
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
5634
|
-
let t =
|
|
5634
|
+
let t = Mr(this.space.id, this.table.id);
|
|
5635
5635
|
if (!t) {
|
|
5636
5636
|
this.setWarningText(F("WARN_TABLE_NOT_FOUND"));
|
|
5637
5637
|
return;
|
|
@@ -5658,7 +5658,7 @@ ${t}}
|
|
|
5658
5658
|
};
|
|
5659
5659
|
//#endregion
|
|
5660
5660
|
//#region src/core/blocks/data/updateData/v1/blocks.ts
|
|
5661
|
-
function
|
|
5661
|
+
function Kr(e) {
|
|
5662
5662
|
let t = e.getInput("TABLE").connection;
|
|
5663
5663
|
if (t.targetBlock()) return;
|
|
5664
5664
|
let n, r, i = Y()?.[0];
|
|
@@ -5690,13 +5690,13 @@ function qr(e) {
|
|
|
5690
5690
|
}, o = l.blocks.append(a, e.workspace);
|
|
5691
5691
|
t.connect(o.outputConnection);
|
|
5692
5692
|
}
|
|
5693
|
-
function
|
|
5693
|
+
function qr(e) {
|
|
5694
5694
|
let t = e.getInput("CONDITION").connection;
|
|
5695
5695
|
if (t.targetBlock()) return;
|
|
5696
5696
|
let n = l.blocks.append({ type: "cond_atomic_v1" }, e.workspace);
|
|
5697
5697
|
t.connect(n.outputConnection);
|
|
5698
5698
|
}
|
|
5699
|
-
function
|
|
5699
|
+
function Jr(e) {
|
|
5700
5700
|
let t = e.getInput("HANDLE").connection;
|
|
5701
5701
|
if (t.targetBlock()) return;
|
|
5702
5702
|
let n = l.blocks.append({
|
|
@@ -5731,7 +5731,7 @@ y.update_data_v1 = {
|
|
|
5731
5731
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("DATA") || (this.appendValueInput("DATA"), this.moveInputBefore("DATA", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(u.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(u.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
5732
5732
|
},
|
|
5733
5733
|
ensureBlocks: function() {
|
|
5734
|
-
this.isInsertionMarker() || (
|
|
5734
|
+
this.isInsertionMarker() || (Kr(this), qr(this), V(this, [
|
|
5735
5735
|
[
|
|
5736
5736
|
"SUCCESS",
|
|
5737
5737
|
"__success__",
|
|
@@ -5750,7 +5750,7 @@ y.update_data_v1 = {
|
|
|
5750
5750
|
"x-runtime-lib.data",
|
|
5751
5751
|
!0
|
|
5752
5752
|
]
|
|
5753
|
-
]),
|
|
5753
|
+
]), Jr(this));
|
|
5754
5754
|
}
|
|
5755
5755
|
}, g.forBlock.update_data_v1 = function(e) {
|
|
5756
5756
|
let t = g.INDENT;
|
|
@@ -5770,15 +5770,15 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5770
5770
|
};
|
|
5771
5771
|
//#endregion
|
|
5772
5772
|
//#region src/core/blocks/json/jsonArray/v1/index.ts
|
|
5773
|
-
var
|
|
5773
|
+
var Yr = p.xml;
|
|
5774
5774
|
y.json_array_v1 = {
|
|
5775
5775
|
init: function() {
|
|
5776
|
-
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(u.Align.CENTRE).appendField(new h(
|
|
5776
|
+
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(u.Align.CENTRE).appendField(new h(qt, 20, 20, void 0, () => {
|
|
5777
5777
|
this.isInFlyout || this.addEntry_();
|
|
5778
5778
|
})), this.appendDummyInput("CLOSE_BRACKET").appendField(" ] "), this.setInputsInline(!1), this.setOutput(!0, "JsonArray"), this.setColour(350), this.setTooltip(""), this.setHelpUrl("");
|
|
5779
5779
|
},
|
|
5780
5780
|
mutationToDom: function() {
|
|
5781
|
-
let e =
|
|
5781
|
+
let e = Yr.createElement("mutation");
|
|
5782
5782
|
return e.setAttribute("items", String(this.length)), e;
|
|
5783
5783
|
},
|
|
5784
5784
|
domToMutation: function(e) {
|
|
@@ -5790,9 +5790,9 @@ y.json_array_v1 = {
|
|
|
5790
5790
|
initShape_: function() {
|
|
5791
5791
|
for (let e = 0; e < this.length; e++) {
|
|
5792
5792
|
let t = "ENTRY" + e, n = this.appendValueInput(t);
|
|
5793
|
-
n.appendField(new h(
|
|
5793
|
+
n.appendField(new h(qt, 20, 20, void 0, () => {
|
|
5794
5794
|
this.isInFlyout || this.addEntry_(n);
|
|
5795
|
-
})), n.appendField(new i(String(e))), n.appendField(new h(
|
|
5795
|
+
})), n.appendField(new i(String(e))), n.appendField(new h(Jt, 20, 20, void 0, () => {
|
|
5796
5796
|
this.isInFlyout || this.removeEntry_(n);
|
|
5797
5797
|
})), this.moveInputBefore(t, "ADD");
|
|
5798
5798
|
}
|
|
@@ -5805,9 +5805,9 @@ y.json_array_v1 = {
|
|
|
5805
5805
|
t.name = "ENTRY" + (e + 1), t.fieldRow[1].setValue(e + 1);
|
|
5806
5806
|
}
|
|
5807
5807
|
let n = this.appendValueInput("ENTRY" + t);
|
|
5808
|
-
n.appendField(new h(
|
|
5808
|
+
n.appendField(new h(qt, 20, 20, void 0, () => {
|
|
5809
5809
|
this.isInFlyout || this.addEntry_(n);
|
|
5810
|
-
})), n.appendField(new i(String(t))), n.appendField(new h(
|
|
5810
|
+
})), n.appendField(new i(String(t))), n.appendField(new h(Jt, 20, 20, void 0, () => {
|
|
5811
5811
|
this.isInFlyout || this.removeEntry_(n);
|
|
5812
5812
|
})), t === this.length ? this.moveInputBefore("ENTRY" + t, "ADD") : this.moveInputBefore("ENTRY" + t, "ENTRY" + (t + 1)), this.length++;
|
|
5813
5813
|
},
|
|
@@ -5826,17 +5826,17 @@ y.json_array_v1 = {
|
|
|
5826
5826
|
} };
|
|
5827
5827
|
//#endregion
|
|
5828
5828
|
//#region src/core/blocks/json/jsonMap/v1/index.ts
|
|
5829
|
-
var
|
|
5829
|
+
var Xr = p.xml;
|
|
5830
5830
|
y.json_map_v1 = {
|
|
5831
5831
|
init: function() {
|
|
5832
|
-
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(u.Align.CENTRE).appendField(new h(
|
|
5832
|
+
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(u.Align.CENTRE).appendField(new h(qt, 20, 20, void 0, () => {
|
|
5833
5833
|
this.isInFlyout || this.addEntry_();
|
|
5834
5834
|
})), this.appendDummyInput("CLOSE_BRACHET").appendField(" } "), this.setInputsInline(!1), this.setOutput(!0, "JsonMap"), this.setColour(120), this.setTooltip(""), this.setHelpUrl("");
|
|
5835
5835
|
},
|
|
5836
5836
|
mutationToDom: function() {
|
|
5837
|
-
let e =
|
|
5837
|
+
let e = Xr.createElement("mutation");
|
|
5838
5838
|
for (let t = 0; t < this.length; t++) {
|
|
5839
|
-
let n =
|
|
5839
|
+
let n = Xr.createElement("item");
|
|
5840
5840
|
n.setAttribute("key", this.getFieldValue("KEY" + t)), e.appendChild(n);
|
|
5841
5841
|
}
|
|
5842
5842
|
return e;
|
|
@@ -5855,9 +5855,9 @@ y.json_map_v1 = {
|
|
|
5855
5855
|
initShape_: function(e) {
|
|
5856
5856
|
for (let t = 0; t < e.length; t++) {
|
|
5857
5857
|
let n = e[t], r = "ENTRY" + t, i = this.appendValueInput(r);
|
|
5858
|
-
i.appendField(new h(
|
|
5858
|
+
i.appendField(new h(qt, 20, 20, void 0, () => {
|
|
5859
5859
|
this.isInFlyout || this.addEntry_(i);
|
|
5860
|
-
})), i.appendField(new f(n), "KEY" + t), i.appendField(new h(
|
|
5860
|
+
})), i.appendField(new f(n), "KEY" + t), i.appendField(new h(Jt, 20, 20, void 0, () => {
|
|
5861
5861
|
this.isInFlyout || this.removeEntry_(i);
|
|
5862
5862
|
})), this.moveInputBefore(r, "ADD");
|
|
5863
5863
|
}
|
|
@@ -5867,9 +5867,9 @@ y.json_map_v1 = {
|
|
|
5867
5867
|
e && (t = me(e.name.substring(5)));
|
|
5868
5868
|
for (let e = this.length - 1; e >= t; e--) this.getField("KEY" + e).name = "KEY" + (e + 1), this.getInput("ENTRY" + e).name = "ENTRY" + (e + 1);
|
|
5869
5869
|
let n = this.appendValueInput("ENTRY" + t);
|
|
5870
|
-
n.appendField(new h(
|
|
5870
|
+
n.appendField(new h(qt, 20, 20, void 0, () => {
|
|
5871
5871
|
this.isInFlyout || this.addEntry_(n);
|
|
5872
|
-
})), n.appendField(new f("key"), "KEY" + t), n.appendField(new h(
|
|
5872
|
+
})), n.appendField(new f("key"), "KEY" + t), n.appendField(new h(Jt, 20, 20, void 0, () => {
|
|
5873
5873
|
this.isInFlyout || this.removeEntry_(n);
|
|
5874
5874
|
})), t === this.length ? this.moveInputBefore("ENTRY" + t, "ADD") : this.moveInputBefore("ENTRY" + t, "ENTRY" + (t + 1)), this.length++;
|
|
5875
5875
|
},
|
|
@@ -5889,7 +5889,7 @@ y.json_map_v1 = {
|
|
|
5889
5889
|
} };
|
|
5890
5890
|
//#endregion
|
|
5891
5891
|
//#region src/core/blocks/list/listCreate/v1/index.ts
|
|
5892
|
-
var
|
|
5892
|
+
var Zr = p.xml;
|
|
5893
5893
|
y.list_create_container_v1 = { init: function() {
|
|
5894
5894
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5895
5895
|
} }, y.list_create_item_v1 = { init: function() {
|
|
@@ -5899,7 +5899,7 @@ y.list_create_container_v1 = { init: function() {
|
|
|
5899
5899
|
this.itemCount_ = 0, this.setMutator(new oe.MutatorIcon(["list_create_item_v1"], this)), this.setOutput(!0, "Array"), this.setStyle("list_blocks"), this.setTooltip("%{BKY_LIST_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_LIST_V1_CREATE_HELPURL}"), this.updateShape_();
|
|
5900
5900
|
},
|
|
5901
5901
|
mutationToDom: function() {
|
|
5902
|
-
let e =
|
|
5902
|
+
let e = Zr.createElement("mutation");
|
|
5903
5903
|
return e.setAttribute("items", String(this.itemCount_)), e;
|
|
5904
5904
|
},
|
|
5905
5905
|
domToMutation: function(e) {
|
|
@@ -6146,7 +6146,7 @@ y.list_create_container_v1 = { init: function() {
|
|
|
6146
6146
|
};
|
|
6147
6147
|
//#endregion
|
|
6148
6148
|
//#region src/core/blocks/logic/logicCompare/v1/index.ts
|
|
6149
|
-
var
|
|
6149
|
+
var Qr = { onchange: function(e) {
|
|
6150
6150
|
this.prevBlocks_ ||= [null, null];
|
|
6151
6151
|
let t = this.getInputTargetBlock("A"), n = this.getInputTargetBlock("B");
|
|
6152
6152
|
if (t && n && !this.workspace.connectionChecker.doTypeChecks(t.outputConnection, n.outputConnection)) {
|
|
@@ -6161,7 +6161,7 @@ var $r = { onchange: function(e) {
|
|
|
6161
6161
|
//#endregion
|
|
6162
6162
|
//#region src/core/blocks/loop/flowControl/v1/extensions.ts
|
|
6163
6163
|
m.register("logic_compare_v1", function() {
|
|
6164
|
-
this.mixin(
|
|
6164
|
+
this.mixin(Qr);
|
|
6165
6165
|
}), t([{
|
|
6166
6166
|
type: "logic_compare_v1",
|
|
6167
6167
|
message0: "%1 %2 %3",
|
|
@@ -6455,7 +6455,7 @@ m.register("logic_compare_v1", function() {
|
|
|
6455
6455
|
BREAK: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_BREAK}",
|
|
6456
6456
|
CONTINUE: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_CONTINUE}"
|
|
6457
6457
|
}));
|
|
6458
|
-
var
|
|
6458
|
+
var $r = new Set([
|
|
6459
6459
|
"repeat_v1",
|
|
6460
6460
|
"for_each_v1",
|
|
6461
6461
|
"for_v1",
|
|
@@ -6465,7 +6465,7 @@ m.registerMixin("flow_control_in_loop_check_v1", {
|
|
|
6465
6465
|
getSurroundLoop: function() {
|
|
6466
6466
|
let e = this;
|
|
6467
6467
|
do {
|
|
6468
|
-
if (
|
|
6468
|
+
if ($r.has(e.type)) return e;
|
|
6469
6469
|
e = e?.getSurroundParent();
|
|
6470
6470
|
} while (e);
|
|
6471
6471
|
return null;
|
|
@@ -7189,7 +7189,7 @@ function ${g.FUNCTION_NAME_PLACEHOLDER_}(a, b) {
|
|
|
7189
7189
|
};
|
|
7190
7190
|
//#endregion
|
|
7191
7191
|
//#region src/core/blocks/object/objectCreate/v1/index.ts
|
|
7192
|
-
var
|
|
7192
|
+
var ei = p.xml;
|
|
7193
7193
|
y.object_create_container_v1 = { init: function() {
|
|
7194
7194
|
this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
7195
7195
|
} }, y.object_create_item_v1 = { init: function() {
|
|
@@ -7199,7 +7199,7 @@ y.object_create_container_v1 = { init: function() {
|
|
|
7199
7199
|
this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(new oe.MutatorIcon(["object_create_item_v1"], this)), this.setOutput(!0, "Object"), this.setStyle("object_blocks"), this.setTooltip("%{BKY_OBJECT_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_OBJECT_V1_CREATE_HELPURL}");
|
|
7200
7200
|
},
|
|
7201
7201
|
mutationToDom: function() {
|
|
7202
|
-
let e =
|
|
7202
|
+
let e = ei.createElement("mutation");
|
|
7203
7203
|
return e.setAttribute("items", String(this.itemCount_)), e;
|
|
7204
7204
|
},
|
|
7205
7205
|
domToMutation: function(e) {
|
|
@@ -7456,7 +7456,7 @@ function ${g.FUNCTION_NAME_PLACEHOLDER_}(obj, key, val) {
|
|
|
7456
7456
|
};
|
|
7457
7457
|
//#endregion
|
|
7458
7458
|
//#region src/core/blocks/procedure/procedureDef/v1/index.ts
|
|
7459
|
-
var
|
|
7459
|
+
var ti = p.xml;
|
|
7460
7460
|
y.procedure_def_container_v1 = { init: function() {
|
|
7461
7461
|
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new n(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
7462
7462
|
} }, y.procedure_def_item_v1 = {
|
|
@@ -7484,9 +7484,9 @@ y.procedure_def_container_v1 = { init: function() {
|
|
|
7484
7484
|
e.setValidator(_e.rename), e.setSpellcheck(!1), this.appendDummyInput("DUMMY").appendField(e, "NAME"), this.appendStatementInput("HANDLE"), this.setMutator(new oe.MutatorIcon(["procedure_def_item_v1"], this)), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_PROCEDURE_V1_DEF_TOOLTIP}"), this.setHelpUrl("%{BKY_PROCEDURE_V1_DEF_HELPURL}");
|
|
7485
7485
|
},
|
|
7486
7486
|
mutationToDom: function() {
|
|
7487
|
-
let e =
|
|
7487
|
+
let e = ti.createElement("mutation");
|
|
7488
7488
|
return e.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), this.args.forEach((t) => {
|
|
7489
|
-
let n =
|
|
7489
|
+
let n = ti.createElement("arg");
|
|
7490
7490
|
n.setAttribute("name", t.name), n.setAttribute("id", t.id), e.appendChild(n);
|
|
7491
7491
|
}), e;
|
|
7492
7492
|
},
|
|
@@ -7563,7 +7563,7 @@ y.procedure_def_container_v1 = { init: function() {
|
|
|
7563
7563
|
let t = this.args[e], n = this.getInput("ARG" + e).connection, r = n.targetBlock();
|
|
7564
7564
|
if (r) r.setKeyName(`__param@${t.id}__`, t.name, !1);
|
|
7565
7565
|
else try {
|
|
7566
|
-
x.disable(), r =
|
|
7566
|
+
x.disable(), r = dn(this.workspace, `__param@${t.id}__`, t.name, !1), r.outputConnection.connect(n);
|
|
7567
7567
|
} finally {
|
|
7568
7568
|
x.enable();
|
|
7569
7569
|
}
|
|
@@ -7572,13 +7572,13 @@ y.procedure_def_container_v1 = { init: function() {
|
|
|
7572
7572
|
};
|
|
7573
7573
|
//#endregion
|
|
7574
7574
|
//#region src/core/blocks/procedure/procedureReturn/v1/index.ts
|
|
7575
|
-
var
|
|
7575
|
+
var ni = p.xml;
|
|
7576
7576
|
y.procedure_return_v1 = {
|
|
7577
7577
|
init: function() {
|
|
7578
7578
|
this.withReturn = !1, this.appendDummyInput("DUMMY").appendField("%{BKY_PROCEDURE_RETURN}"), this.appendValueInput("VALUE").appendField("%{BKY_PROCEDURE_RETURN}").setVisible(!1), this.setPreviousStatement(!0), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_PROCEDURE_V1_RETURN_TOOLTIP}"), this.setHelpUrl("%{BKY_PROCEDURE_V1_RETURN_HELPURL}");
|
|
7579
7579
|
},
|
|
7580
7580
|
mutationToDom: function() {
|
|
7581
|
-
let e =
|
|
7581
|
+
let e = ni.createElement("mutation");
|
|
7582
7582
|
return e.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), e;
|
|
7583
7583
|
},
|
|
7584
7584
|
domToMutation: function(e) {
|
|
@@ -7674,7 +7674,7 @@ ${g.statementToCode(e, "HANDLE")}
|
|
|
7674
7674
|
};
|
|
7675
7675
|
//#endregion
|
|
7676
7676
|
//#region src/core/utils/resource/dir.ts
|
|
7677
|
-
function
|
|
7677
|
+
function ri(e) {
|
|
7678
7678
|
let t = S.resource.spaces.find((t) => t.id === e);
|
|
7679
7679
|
if (!t) return [];
|
|
7680
7680
|
let n = [];
|
|
@@ -7689,15 +7689,15 @@ function ii(e) {
|
|
|
7689
7689
|
}
|
|
7690
7690
|
return r(t.dirTree, ""), n;
|
|
7691
7691
|
}
|
|
7692
|
-
function
|
|
7692
|
+
function ii(e) {
|
|
7693
7693
|
let t = [];
|
|
7694
|
-
return
|
|
7694
|
+
return ri(e).forEach(({ id: e, name: n }) => {
|
|
7695
7695
|
t.push([n, e]);
|
|
7696
7696
|
}), I(t);
|
|
7697
7697
|
}
|
|
7698
7698
|
//#endregion
|
|
7699
7699
|
//#region src/core/utils/resource/resource.ts
|
|
7700
|
-
function
|
|
7700
|
+
function ai(e, t) {
|
|
7701
7701
|
let n = S.resource.spaces.find((t) => t.id === e);
|
|
7702
7702
|
if (!n) return [];
|
|
7703
7703
|
let r = [];
|
|
@@ -7705,23 +7705,23 @@ function oi(e, t) {
|
|
|
7705
7705
|
e.dirid === t && r.push(e);
|
|
7706
7706
|
}), r;
|
|
7707
7707
|
}
|
|
7708
|
-
function
|
|
7708
|
+
function oi(e, t) {
|
|
7709
7709
|
let n = [];
|
|
7710
|
-
return
|
|
7710
|
+
return ai(e, t).forEach(({ id: e, name: t }) => {
|
|
7711
7711
|
n.push([t, e]);
|
|
7712
7712
|
}), I(n);
|
|
7713
7713
|
}
|
|
7714
7714
|
//#endregion
|
|
7715
7715
|
//#region src/core/utils/resource/space.ts
|
|
7716
|
-
function
|
|
7716
|
+
function si() {
|
|
7717
7717
|
let e = [];
|
|
7718
7718
|
return S.resource.spaces.forEach((t) => {
|
|
7719
7719
|
t.resources.length > 0 && e.push(t);
|
|
7720
7720
|
}), e;
|
|
7721
7721
|
}
|
|
7722
|
-
function
|
|
7722
|
+
function ci() {
|
|
7723
7723
|
let e = [];
|
|
7724
|
-
return
|
|
7724
|
+
return si().forEach(({ id: t, name: n }) => {
|
|
7725
7725
|
e.push([n, t]);
|
|
7726
7726
|
}), I(e);
|
|
7727
7727
|
}
|
|
@@ -7740,17 +7740,17 @@ y.select_resource_v1 = {
|
|
|
7740
7740
|
},
|
|
7741
7741
|
initData_: function() {
|
|
7742
7742
|
if (this.space.id) return;
|
|
7743
|
-
let e =
|
|
7743
|
+
let e = si()?.[0];
|
|
7744
7744
|
if (!e) return;
|
|
7745
7745
|
this.space.id = e.id, this.space.name = e.name;
|
|
7746
7746
|
let t = this.getField("SPACE");
|
|
7747
7747
|
t.getOptions(!1), t.setValue(this.space.id);
|
|
7748
|
-
let n =
|
|
7748
|
+
let n = ri(this.space.id)?.[0];
|
|
7749
7749
|
if (!n) return;
|
|
7750
7750
|
this.dir.id = n.id, this.dir.name = n.name;
|
|
7751
7751
|
let r = this.getField("DIR");
|
|
7752
7752
|
r.getOptions(!1), r.setValue(this.dir.id);
|
|
7753
|
-
let i =
|
|
7753
|
+
let i = ai(this.space.id, this.dir.id)?.[0];
|
|
7754
7754
|
if (!i) return;
|
|
7755
7755
|
this.resource.id = i.id, this.resource.name = i.name;
|
|
7756
7756
|
let a = this.getField("RESOURCE");
|
|
@@ -7767,13 +7767,13 @@ y.select_resource_v1 = {
|
|
|
7767
7767
|
this.space = he(e.space), this.dir = he(e.dir), this.resource = he(e.resource);
|
|
7768
7768
|
},
|
|
7769
7769
|
genSpaceOpts_: function() {
|
|
7770
|
-
return
|
|
7770
|
+
return ci();
|
|
7771
7771
|
},
|
|
7772
7772
|
genDirOpts_: function() {
|
|
7773
|
-
return
|
|
7773
|
+
return ii(this.space.id);
|
|
7774
7774
|
},
|
|
7775
7775
|
genResourceOpts_: function() {
|
|
7776
|
-
return
|
|
7776
|
+
return oi(this.space.id, this.dir.id);
|
|
7777
7777
|
}
|
|
7778
7778
|
}, g.forBlock.select_resource_v1 = function() {
|
|
7779
7779
|
return "";
|
|
@@ -7794,7 +7794,7 @@ y.select_resource_v1 = {
|
|
|
7794
7794
|
},
|
|
7795
7795
|
updateShadow_: function() {
|
|
7796
7796
|
if (this.isInsertionMarker()) return;
|
|
7797
|
-
let e =
|
|
7797
|
+
let e = fn("");
|
|
7798
7798
|
this.getInput("NAME")?.setShadowDom(e);
|
|
7799
7799
|
},
|
|
7800
7800
|
ensureBlocks_: function() {
|
|
@@ -7846,9 +7846,9 @@ ${g.statementToCode(e, "HANDLE")}
|
|
|
7846
7846
|
};
|
|
7847
7847
|
//#endregion
|
|
7848
7848
|
//#region src/core/blocks/text/utils/index.ts
|
|
7849
|
-
var
|
|
7850
|
-
function
|
|
7851
|
-
return
|
|
7849
|
+
var li = /^\s*'([^']|\\')*'\s*$/;
|
|
7850
|
+
function ui(e) {
|
|
7851
|
+
return li.test(e) ? [e, _.ATOMIC] : [`String(${e})`, _.FUNCTION_CALL];
|
|
7852
7852
|
}
|
|
7853
7853
|
m.register("text_append_tooltip_v1", m.buildTooltipWithFieldText("%{BKY_TEXT_V1_APPEND_TOOLTIP}", "VAR")), t([{
|
|
7854
7854
|
type: "text_append_v1",
|
|
@@ -7866,7 +7866,7 @@ m.register("text_append_tooltip_v1", m.buildTooltipWithFieldText("%{BKY_TEXT_V1_
|
|
|
7866
7866
|
helpUrl: "%{BKY_TEXT_V1_APPEND_HELPURL}",
|
|
7867
7867
|
extensions: ["text_append_tooltip_v1"]
|
|
7868
7868
|
}]), g.forBlock.text_append_v1 = function(t) {
|
|
7869
|
-
return `${g.nameDB_?.getName(t.getFieldValue("VAR"), e.NameType.VARIABLE)} += ${
|
|
7869
|
+
return `${g.nameDB_?.getName(t.getFieldValue("VAR"), e.NameType.VARIABLE)} += ${ui(g.valueToCode(t, "TEXT", _.NONE) || "''")};\n`;
|
|
7870
7870
|
}, t([{
|
|
7871
7871
|
type: "text_change_case_v1",
|
|
7872
7872
|
message0: "%{BKY_TEXT_V1_CHANGE_CASE_TITLE}",
|
|
@@ -7990,11 +7990,11 @@ function ${g.FUNCTION_NAME_PLACEHOLDER_}(haystack, needle) {
|
|
|
7990
7990
|
};
|
|
7991
7991
|
//#endregion
|
|
7992
7992
|
//#region src/core/blocks/text/textJoin/v1/index.ts
|
|
7993
|
-
var
|
|
7993
|
+
var di = p.xml;
|
|
7994
7994
|
m.registerMutator("text_join_mutator_v1", {
|
|
7995
7995
|
itemCount_: 0,
|
|
7996
7996
|
mutationToDom: function() {
|
|
7997
|
-
let e =
|
|
7997
|
+
let e = di.createElement("mutation");
|
|
7998
7998
|
return e.setAttribute("items", `${this.itemCount_}`), e;
|
|
7999
7999
|
},
|
|
8000
8000
|
domToMutation: function(e) {
|
|
@@ -8085,10 +8085,10 @@ m.registerMutator("text_join_mutator_v1", {
|
|
|
8085
8085
|
let t = e;
|
|
8086
8086
|
switch (t.itemCount_) {
|
|
8087
8087
|
case 0: return ["''", _.ATOMIC];
|
|
8088
|
-
case 1: return
|
|
8088
|
+
case 1: return ui(g.valueToCode(t, "ADD0", _.NONE) || "''");
|
|
8089
8089
|
case 2: {
|
|
8090
8090
|
let e = g.valueToCode(t, "ADD0", _.NONE) || "''", n = g.valueToCode(t, "ADD1", _.NONE) || "''";
|
|
8091
|
-
return [
|
|
8091
|
+
return [ui(e)[0] + " + " + ui(n)[0], _.ADDITION];
|
|
8092
8092
|
}
|
|
8093
8093
|
default: {
|
|
8094
8094
|
let e = Array(t.itemCount_);
|
|
@@ -8246,13 +8246,13 @@ function ${g.FUNCTION_NAME_PLACEHOLDER_}(haystack, needle, replacement) {
|
|
|
8246
8246
|
},
|
|
8247
8247
|
updateShadow_: function() {
|
|
8248
8248
|
if (this.isInsertionMarker()) return;
|
|
8249
|
-
let e =
|
|
8249
|
+
let e = pn(1e3);
|
|
8250
8250
|
this.getInput("INTERVAL")?.setShadowDom(e);
|
|
8251
|
-
let t =
|
|
8251
|
+
let t = mn(!1);
|
|
8252
8252
|
this.getInput("LOOP")?.setShadowDom(t);
|
|
8253
|
-
let n =
|
|
8253
|
+
let n = pn(1);
|
|
8254
8254
|
this.getInput("COUNT")?.setShadowDom(n);
|
|
8255
|
-
let r =
|
|
8255
|
+
let r = mn(!1);
|
|
8256
8256
|
this.getInput("IMMEDIATE")?.setShadowDom(r);
|
|
8257
8257
|
}
|
|
8258
8258
|
}, g.forBlock.create_timer_v1 = function(e) {
|
|
@@ -8276,7 +8276,7 @@ ${g.statementToCode(e, "CALLBACK")}});\n`;
|
|
|
8276
8276
|
};
|
|
8277
8277
|
//#endregion
|
|
8278
8278
|
//#region src/core/blocks/variable/extensions/v1/index.ts
|
|
8279
|
-
var
|
|
8279
|
+
var fi = { customContextMenu: function(e) {
|
|
8280
8280
|
if (!this.isInFlyout) {
|
|
8281
8281
|
let t, n;
|
|
8282
8282
|
this.type === "variable_get_v1" ? (t = "variable_set_v1", n = F("VARIABLE_GET_CREATE_SET")) : this.type === "variable_set_v1" ? (t = "variable_get_v1", n = F("VARIABLE_SET_CREATE_GET")) : console.assert(!1);
|
|
@@ -8293,26 +8293,26 @@ var pi = { customContextMenu: function(e) {
|
|
|
8293
8293
|
let t = {
|
|
8294
8294
|
text: F("RENAME_VARIABLE"),
|
|
8295
8295
|
enabled: !0,
|
|
8296
|
-
callback:
|
|
8296
|
+
callback: pi(this)
|
|
8297
8297
|
}, n = this.getField("VAR").getText(), r = {
|
|
8298
8298
|
text: F("DELETE_VARIABLE").replace("%1", n),
|
|
8299
8299
|
enabled: !0,
|
|
8300
|
-
callback:
|
|
8300
|
+
callback: mi(this)
|
|
8301
8301
|
};
|
|
8302
8302
|
e.unshift(t), e.unshift(r);
|
|
8303
8303
|
}
|
|
8304
|
-
} },
|
|
8304
|
+
} }, pi = function(e) {
|
|
8305
8305
|
return function() {
|
|
8306
8306
|
let t = e.workspace, n = e.getField("VAR").getVariable();
|
|
8307
8307
|
c.renameVariable(t, n);
|
|
8308
8308
|
};
|
|
8309
|
-
},
|
|
8309
|
+
}, mi = function(e) {
|
|
8310
8310
|
return function() {
|
|
8311
8311
|
let t = e.getField("VAR").getVariable();
|
|
8312
8312
|
t && c.deleteVariable(t.getWorkspace(), t, e);
|
|
8313
8313
|
};
|
|
8314
8314
|
};
|
|
8315
|
-
m.registerMixin("context_menu_variable_v1",
|
|
8315
|
+
m.registerMixin("context_menu_variable_v1", fi), t([{
|
|
8316
8316
|
type: "variable_get_v1",
|
|
8317
8317
|
message0: "%1",
|
|
8318
8318
|
args0: [{
|
|
@@ -8359,17 +8359,17 @@ m.registerMixin("context_menu_variable_v1", pi), t([{
|
|
|
8359
8359
|
});
|
|
8360
8360
|
//#endregion
|
|
8361
8361
|
//#region src/core/plugins/fieldDropdown/index.ts
|
|
8362
|
-
var
|
|
8363
|
-
|
|
8362
|
+
var hi = b.prototype;
|
|
8363
|
+
hi.doClassValidation_ = function(e) {
|
|
8364
8364
|
return e;
|
|
8365
8365
|
};
|
|
8366
|
-
var
|
|
8367
|
-
|
|
8368
|
-
|
|
8366
|
+
var gi = hi.doValueUpdate_;
|
|
8367
|
+
hi.doValueUpdate_ = function(e) {
|
|
8368
|
+
gi.call(this, e), this.selectedOption && this.selectedOption[1] !== e && (this.selectedOption = null);
|
|
8369
8369
|
};
|
|
8370
|
-
var
|
|
8371
|
-
|
|
8372
|
-
if (this.selectedOption) return
|
|
8370
|
+
var _i = hi.getText_;
|
|
8371
|
+
hi.getText_ = function() {
|
|
8372
|
+
if (this.selectedOption) return _i.call(this);
|
|
8373
8373
|
let { i18n: e } = je, t = this.getSourceBlock();
|
|
8374
8374
|
if (this.name === "APP") return t.app.name;
|
|
8375
8375
|
if (this.name === "PAGE") return t.page.name;
|
|
@@ -8379,13 +8379,13 @@ gi.getText_ = function() {
|
|
|
8379
8379
|
if (n) return `${e.global.t(n.name)} / ${t.node.alias}`;
|
|
8380
8380
|
} else if (this.name === "PROPERTY") {
|
|
8381
8381
|
let { kind: e, names: n } = t.property;
|
|
8382
|
-
return
|
|
8382
|
+
return rt(e, n);
|
|
8383
8383
|
} else if (this.name === "EVENT") {
|
|
8384
8384
|
let { kind: e, names: n } = t.event;
|
|
8385
|
-
return
|
|
8385
|
+
return tt(e, n);
|
|
8386
8386
|
} else if (this.name === "METHOD") {
|
|
8387
8387
|
let { kind: e, names: n } = t.method;
|
|
8388
|
-
return
|
|
8388
|
+
return nt(e, n);
|
|
8389
8389
|
} else if (this.name === "SPACE") return t.space.name;
|
|
8390
8390
|
else if (this.name === "FUNC") return t.func.name;
|
|
8391
8391
|
else if (this.name === "OUTPUT") return t.output.name;
|
|
@@ -8397,7 +8397,7 @@ gi.getText_ = function() {
|
|
|
8397
8397
|
};
|
|
8398
8398
|
//#endregion
|
|
8399
8399
|
//#region src/core/plugins/workspaceCleanUp/index.ts
|
|
8400
|
-
var
|
|
8400
|
+
var vi = 60;
|
|
8401
8401
|
ee.prototype.cleanUp = function() {
|
|
8402
8402
|
this.setResizesEnabled(!1);
|
|
8403
8403
|
let e = x.getGroup();
|
|
@@ -8410,47 +8410,47 @@ ee.prototype.cleanUp = function() {
|
|
|
8410
8410
|
let t = e.getBoundingRectangle();
|
|
8411
8411
|
e.moveBy(-t.left, a - t.top, ["cleanup"]), e.snapToGrid(), t = e.getBoundingRectangle();
|
|
8412
8412
|
let n = i(t);
|
|
8413
|
-
for (; n != null;) a = n.top + n.getHeight() +
|
|
8414
|
-
a = e.getRelativeToSurfaceXY().y + e.getHeightWidth().height +
|
|
8413
|
+
for (; n != null;) a = n.top + n.getHeight() + vi, e.moveBy(0, a - t.top, ["cleanup"]), e.snapToGrid(), t = e.getBoundingRectangle(), n = i(t);
|
|
8414
|
+
a = e.getRelativeToSurfaceXY().y + e.getHeightWidth().height + vi;
|
|
8415
8415
|
}
|
|
8416
8416
|
x.setGroup(e), this.setResizesEnabled(!0);
|
|
8417
8417
|
};
|
|
8418
8418
|
//#endregion
|
|
8419
8419
|
//#region src/core/plugins/disableTopBlocks/index.ts
|
|
8420
|
-
var
|
|
8421
|
-
function
|
|
8420
|
+
var yi = Te();
|
|
8421
|
+
function bi(e) {
|
|
8422
8422
|
let t = e.getParent();
|
|
8423
|
-
return t &&
|
|
8423
|
+
return t && bi(t) ? !0 : !t && !!(e.outputConnection || e.previousConnection);
|
|
8424
8424
|
}
|
|
8425
|
-
var
|
|
8425
|
+
var xi = class {
|
|
8426
8426
|
init() {
|
|
8427
8427
|
let e = de.registry.getItem("blockDisable");
|
|
8428
8428
|
e && (e.preconditionFn = function(e) {
|
|
8429
8429
|
let t = e.block;
|
|
8430
|
-
return t && !t.isInFlyout && t.workspace.options.disable && t.isEditable() ? t.getInheritedDisabled() ||
|
|
8430
|
+
return t && !t.isInFlyout && t.workspace.options.disable && t.isEditable() ? t.getInheritedDisabled() || bi(t) ? "disabled" : "enabled" : "hidden";
|
|
8431
8431
|
});
|
|
8432
8432
|
}
|
|
8433
8433
|
};
|
|
8434
|
-
(0,
|
|
8434
|
+
(0, Dn.registerFieldColour)(), d.registry.unregister(te.names.ESCAPE), new yi.CrossTabCopyPaste().init({
|
|
8435
8435
|
contextMenu: !0,
|
|
8436
8436
|
shortcut: !0
|
|
8437
|
-
}), new
|
|
8437
|
+
}), new xi().init();
|
|
8438
8438
|
//#endregion
|
|
8439
8439
|
//#region src/core/events/index.ts
|
|
8440
|
-
var
|
|
8440
|
+
var Si = /* @__PURE__ */ function(e) {
|
|
8441
8441
|
return e.STATE_CHANGE = "state_change", e;
|
|
8442
|
-
}({}),
|
|
8442
|
+
}({}), Ci = class extends x.Abstract {
|
|
8443
8443
|
isBlank = !0;
|
|
8444
8444
|
recordUndo = !1;
|
|
8445
|
-
type =
|
|
8445
|
+
type = Si.STATE_CHANGE;
|
|
8446
8446
|
constructor(e) {
|
|
8447
8447
|
super(), this.workspaceId = e.id;
|
|
8448
8448
|
}
|
|
8449
8449
|
};
|
|
8450
|
-
Ce.register(Ce.Type.EVENT,
|
|
8450
|
+
Ce.register(Ce.Type.EVENT, Si.STATE_CHANGE, Ci);
|
|
8451
8451
|
//#endregion
|
|
8452
8452
|
//#region src/core/misc/index.ts
|
|
8453
|
-
function
|
|
8453
|
+
function wi(e) {
|
|
8454
8454
|
let t = s();
|
|
8455
8455
|
if (!t) return;
|
|
8456
8456
|
let n = t.getBlockById(e);
|
|
@@ -8460,11 +8460,11 @@ function Ti(e) {
|
|
|
8460
8460
|
let i = r.getRelativeToSurfaceXY(), a = i.x * t.scale, o = i.y * t.scale;
|
|
8461
8461
|
t.scroll(-a, -o);
|
|
8462
8462
|
}
|
|
8463
|
-
function
|
|
8463
|
+
function Ti() {
|
|
8464
8464
|
let e = s();
|
|
8465
8465
|
if (!e) return;
|
|
8466
8466
|
let t = e.getTopBlocks(!0)?.[0];
|
|
8467
|
-
t &&
|
|
8467
|
+
t && wi(t.id);
|
|
8468
8468
|
}
|
|
8469
8469
|
a.Classic.blockStyles = {
|
|
8470
8470
|
color_blocks: {
|
|
@@ -8574,7 +8574,7 @@ a.Classic.blockStyles = {
|
|
|
8574
8574
|
time_category: { colour: "#5b99a5" },
|
|
8575
8575
|
variable_category: { colour: "#a55b80" }
|
|
8576
8576
|
};
|
|
8577
|
-
var
|
|
8577
|
+
var Ei = ne.defineTheme("light", {
|
|
8578
8578
|
name: "light",
|
|
8579
8579
|
base: a.Classic,
|
|
8580
8580
|
componentStyles: {
|
|
@@ -8590,7 +8590,7 @@ var Di = ne.defineTheme("light", {
|
|
|
8590
8590
|
scrollbarOpacity: .4,
|
|
8591
8591
|
cursorColour: ""
|
|
8592
8592
|
}
|
|
8593
|
-
}),
|
|
8593
|
+
}), Di = ne.defineTheme("dark", {
|
|
8594
8594
|
name: "dark",
|
|
8595
8595
|
base: a.Classic,
|
|
8596
8596
|
componentStyles: {
|
|
@@ -8607,45 +8607,45 @@ var Di = ne.defineTheme("light", {
|
|
|
8607
8607
|
cursorColour: ""
|
|
8608
8608
|
}
|
|
8609
8609
|
});
|
|
8610
|
-
function
|
|
8610
|
+
function Oi(e) {
|
|
8611
8611
|
let t = s();
|
|
8612
8612
|
switch (e) {
|
|
8613
8613
|
case "light":
|
|
8614
|
-
t.setTheme(
|
|
8614
|
+
t.setTheme(Ei);
|
|
8615
8615
|
break;
|
|
8616
8616
|
case "dark":
|
|
8617
|
-
t.setTheme(
|
|
8617
|
+
t.setTheme(Di);
|
|
8618
8618
|
break;
|
|
8619
8619
|
}
|
|
8620
8620
|
}
|
|
8621
8621
|
//#endregion
|
|
8622
8622
|
//#region src/components/blockly/buildReactivity.ts
|
|
8623
|
-
function
|
|
8623
|
+
function ki(e, t) {
|
|
8624
8624
|
e.find((e) => e === t) || e.push(t);
|
|
8625
8625
|
}
|
|
8626
|
-
var
|
|
8627
|
-
function
|
|
8626
|
+
var Ai = ["get_app_property_v1", "get_app_state_v1"];
|
|
8627
|
+
function ji(e) {
|
|
8628
8628
|
let t = [];
|
|
8629
8629
|
function n(e) {
|
|
8630
|
-
for (let r of e.getChildren(!0))
|
|
8630
|
+
for (let r of e.getChildren(!0)) Ai.includes(r.type) && t.push(r), n(r);
|
|
8631
8631
|
}
|
|
8632
8632
|
return n(e), t;
|
|
8633
8633
|
}
|
|
8634
|
-
function
|
|
8634
|
+
function Mi(e) {
|
|
8635
8635
|
let t = [];
|
|
8636
|
-
for (let n of e) n.type === "get_app_property_v1" ?
|
|
8636
|
+
for (let n of e) n.type === "get_app_property_v1" ? ki(t, Ze("propertyTrigger", n.property.id)) : n.type === "get_app_state_v1" ? ki(t, Ze("stateTrigger", n.state.id)) : console.assert(!1);
|
|
8637
8637
|
return t;
|
|
8638
8638
|
}
|
|
8639
|
-
function
|
|
8639
|
+
function Ni(e) {
|
|
8640
8640
|
let t = [];
|
|
8641
8641
|
for (let n of e) {
|
|
8642
8642
|
if (n.type !== "app_bind_entry_v1") continue;
|
|
8643
8643
|
let e = n;
|
|
8644
|
-
e.kind === "property" ?
|
|
8644
|
+
e.kind === "property" ? ki(t, Ze("propertyTrigger", e.property.id)) : e.kind === "state" && ki(t, Ze("stateTrigger", e.state.id));
|
|
8645
8645
|
}
|
|
8646
8646
|
return t;
|
|
8647
8647
|
}
|
|
8648
|
-
function
|
|
8648
|
+
function Pi(e) {
|
|
8649
8649
|
let t = {
|
|
8650
8650
|
watchEffect: {
|
|
8651
8651
|
ids: [],
|
|
@@ -8658,32 +8658,32 @@ function Fi(e) {
|
|
|
8658
8658
|
}, n = e.getTopBlocks(!0);
|
|
8659
8659
|
if (!n) return t;
|
|
8660
8660
|
for (let e of n) if (e.type === "watch_effect_v1") {
|
|
8661
|
-
let n =
|
|
8662
|
-
for (let r of n) t.watchEffect.triggers[r] || (t.watchEffect.triggers[r] = []),
|
|
8661
|
+
let n = Mi(ji(e));
|
|
8662
|
+
for (let r of n) t.watchEffect.triggers[r] || (t.watchEffect.triggers[r] = []), ki(t.watchEffect.triggers[r], e.id);
|
|
8663
8663
|
t.watchEffect.ids.push(e.id);
|
|
8664
8664
|
} else if (e.type === "app_bind_v1") {
|
|
8665
|
-
let n =
|
|
8665
|
+
let n = Ni(e.getChildren(!0));
|
|
8666
8666
|
t.bind.sets[e.id] = n;
|
|
8667
|
-
for (let r of n) t.bind.triggers[r] || (t.bind.triggers[r] = []),
|
|
8667
|
+
for (let r of n) t.bind.triggers[r] || (t.bind.triggers[r] = []), ki(t.bind.triggers[r], e.id);
|
|
8668
8668
|
}
|
|
8669
8669
|
return t;
|
|
8670
8670
|
}
|
|
8671
8671
|
//#endregion
|
|
8672
8672
|
//#region src/components/blockly/provideInject.ts
|
|
8673
|
-
var
|
|
8674
|
-
function
|
|
8675
|
-
|
|
8673
|
+
var Fi = Symbol();
|
|
8674
|
+
function Ii(e) {
|
|
8675
|
+
Et(Fi, e);
|
|
8676
8676
|
}
|
|
8677
|
-
function
|
|
8678
|
-
return
|
|
8677
|
+
function Li() {
|
|
8678
|
+
return vt(Fi);
|
|
8679
8679
|
}
|
|
8680
8680
|
//#endregion
|
|
8681
8681
|
//#region src/components/blockly/clean/index.vue
|
|
8682
|
-
var
|
|
8682
|
+
var Ri = /* @__PURE__ */ _t({
|
|
8683
8683
|
__name: "index",
|
|
8684
8684
|
props: { lock: { type: Boolean } },
|
|
8685
8685
|
setup(e, { expose: t }) {
|
|
8686
|
-
let { t: n } =
|
|
8686
|
+
let { t: n } = zt(), r = Bt(), i = e, a = Li(), o = E(() => r.smAndDown.value), s = () => {
|
|
8687
8687
|
if (!a.workspace) {
|
|
8688
8688
|
console.assert(!1);
|
|
8689
8689
|
return;
|
|
@@ -8698,11 +8698,11 @@ var zi = /* @__PURE__ */ vt({
|
|
|
8698
8698
|
};
|
|
8699
8699
|
return t({ cleanWorkspace: s }), (e, t) => {
|
|
8700
8700
|
let r = M("v-btn"), i = M("v-tooltip");
|
|
8701
|
-
return j(),
|
|
8701
|
+
return j(), ht(i, {
|
|
8702
8702
|
disabled: o.value,
|
|
8703
8703
|
text: N(n)("x-block-lib.tip.hotkeyCtrlQ")
|
|
8704
8704
|
}, {
|
|
8705
|
-
activator: P(({ props: e }) => [k(r,
|
|
8705
|
+
activator: P(({ props: e }) => [k(r, xt(e, {
|
|
8706
8706
|
density: "comfortable",
|
|
8707
8707
|
icon: "mdi-broom",
|
|
8708
8708
|
variant: "outlined",
|
|
@@ -8715,7 +8715,7 @@ var zi = /* @__PURE__ */ vt({
|
|
|
8715
8715
|
});
|
|
8716
8716
|
//#endregion
|
|
8717
8717
|
//#region src/components/blockly/jsonHelper.ts
|
|
8718
|
-
function
|
|
8718
|
+
function zi(e, t) {
|
|
8719
8719
|
let n = t.newBlock("json_root_v1");
|
|
8720
8720
|
n.initSvg(), n.render();
|
|
8721
8721
|
let r = (e, n) => {
|
|
@@ -8746,7 +8746,7 @@ function Bi(e, t) {
|
|
|
8746
8746
|
};
|
|
8747
8747
|
r(e, n.getInput("JSON").connection), x.fire(new (x.get(x.FINISHED_LOADING))(t));
|
|
8748
8748
|
}
|
|
8749
|
-
function
|
|
8749
|
+
function Bi(e) {
|
|
8750
8750
|
let t = (e) => {
|
|
8751
8751
|
if (!e) return null;
|
|
8752
8752
|
if (e.type === "json_root_v1") return t(e.getInputTargetBlock("JSON"));
|
|
@@ -8770,7 +8770,7 @@ function Vi(e) {
|
|
|
8770
8770
|
}
|
|
8771
8771
|
//#endregion
|
|
8772
8772
|
//#region src/components/blockly/lock/index.vue
|
|
8773
|
-
var
|
|
8773
|
+
var Vi = /* @__PURE__ */ _t({
|
|
8774
8774
|
__name: "index",
|
|
8775
8775
|
props: {
|
|
8776
8776
|
modelValue: {
|
|
@@ -8781,14 +8781,14 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
8781
8781
|
},
|
|
8782
8782
|
emits: ["update:modelValue"],
|
|
8783
8783
|
setup(e) {
|
|
8784
|
-
let { t } =
|
|
8784
|
+
let { t } = zt(), n = Bt(), r = Nt(e, "modelValue"), i = E(() => n.smAndDown.value);
|
|
8785
8785
|
return (e, n) => {
|
|
8786
8786
|
let a = M("v-btn"), o = M("v-tooltip");
|
|
8787
|
-
return j(),
|
|
8787
|
+
return j(), ht(o, {
|
|
8788
8788
|
disabled: i.value,
|
|
8789
8789
|
text: N(t)("x-block-lib.tip.hotkeyCtrlW")
|
|
8790
8790
|
}, {
|
|
8791
|
-
activator: P(({ props: e }) => [k(a,
|
|
8791
|
+
activator: P(({ props: e }) => [k(a, xt(e, {
|
|
8792
8792
|
density: "comfortable",
|
|
8793
8793
|
icon: r.value ? "mdi-lock" : "mdi-lock-open",
|
|
8794
8794
|
variant: "outlined",
|
|
@@ -8798,11 +8798,11 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
8798
8798
|
}, 8, ["disabled", "text"]);
|
|
8799
8799
|
};
|
|
8800
8800
|
}
|
|
8801
|
-
}),
|
|
8801
|
+
}), Hi = { class: "d-flex flex-column" }, Ui = { class: "text-body-large ml-6" }, Wi = {
|
|
8802
8802
|
key: 0,
|
|
8803
8803
|
class: "text-body-small text-grey text-truncate ml-6",
|
|
8804
8804
|
style: { maxWidth: "340px" }
|
|
8805
|
-
},
|
|
8805
|
+
}, Gi = /* @__PURE__ */ _t({
|
|
8806
8806
|
__name: "item",
|
|
8807
8807
|
props: {
|
|
8808
8808
|
id: {},
|
|
@@ -8812,7 +8812,7 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
8812
8812
|
},
|
|
8813
8813
|
emits: ["x-click"],
|
|
8814
8814
|
setup(e, { emit: t }) {
|
|
8815
|
-
let { primaryColor: n, backgroundColor2: r, highlightColor: i } = Fe(), a = t, o =
|
|
8815
|
+
let { primaryColor: n, backgroundColor2: r, highlightColor: i } = Fe(), a = t, o = Dt(!1), s = E(() => {
|
|
8816
8816
|
let t = {
|
|
8817
8817
|
position: "relative",
|
|
8818
8818
|
background: o.value ? i.value : r.value,
|
|
@@ -8825,34 +8825,34 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
8825
8825
|
return e.select ? (t.borderTop = "1px solid " + n.value, t.borderBottom = "1px solid " + n.value) : (t.borderTop = void 0, t.borderBottom = void 0), t;
|
|
8826
8826
|
});
|
|
8827
8827
|
return (t, n) => {
|
|
8828
|
-
let r = M("v-spacer"), i = M("v-icon"), c =
|
|
8829
|
-
return
|
|
8828
|
+
let r = M("v-spacer"), i = M("v-icon"), c = At("ripple");
|
|
8829
|
+
return It((j(), D("div", {
|
|
8830
8830
|
class: "d-flex align-center cursor-pointer",
|
|
8831
8831
|
style: A(s.value),
|
|
8832
8832
|
onClick: n[1] ||= (t) => a("x-click", e.id),
|
|
8833
8833
|
onMouseout: n[2] ||= (e) => o.value = !1,
|
|
8834
8834
|
onMouseover: n[3] ||= (e) => o.value = !0
|
|
8835
8835
|
}, [
|
|
8836
|
-
O("div",
|
|
8836
|
+
O("div", Hi, [O("span", Ui, jt(e.title), 1), e.desc ? (j(), D("span", Wi, jt(e.desc), 1)) : gt("", !0)]),
|
|
8837
8837
|
k(r),
|
|
8838
8838
|
k(i, {
|
|
8839
8839
|
class: "x-handle cursor-move mr-3",
|
|
8840
8840
|
icon: "mdi-drag-horizontal-variant",
|
|
8841
|
-
onMousedown: n[0] ||=
|
|
8841
|
+
onMousedown: n[0] ||= Rt(() => {}, ["stop"])
|
|
8842
8842
|
})
|
|
8843
8843
|
], 36)), [[c]]);
|
|
8844
8844
|
};
|
|
8845
8845
|
}
|
|
8846
|
-
}),
|
|
8846
|
+
}), Ki = {
|
|
8847
8847
|
key: 1,
|
|
8848
8848
|
class: "text-body-small text-grey"
|
|
8849
|
-
},
|
|
8849
|
+
}, qi = /* @__PURE__ */ ((e, t) => {
|
|
8850
8850
|
let n = e.__vccOpts || e;
|
|
8851
8851
|
for (let [e, r] of t) n[e] = r;
|
|
8852
8852
|
return n;
|
|
8853
|
-
})(/* @__PURE__ */
|
|
8853
|
+
})(/* @__PURE__ */ _t({
|
|
8854
8854
|
__name: "index",
|
|
8855
|
-
props: /* @__PURE__ */
|
|
8855
|
+
props: /* @__PURE__ */ bt({ lock: { type: Boolean } }, {
|
|
8856
8856
|
modelValue: {
|
|
8857
8857
|
type: Boolean,
|
|
8858
8858
|
required: !0
|
|
@@ -8861,7 +8861,7 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
8861
8861
|
}),
|
|
8862
8862
|
emits: ["update:modelValue"],
|
|
8863
8863
|
setup(e, { expose: t }) {
|
|
8864
|
-
let { t: n } =
|
|
8864
|
+
let { t: n } = zt(), r = Nt(e, "modelValue"), i = Li(), a = Dt([]);
|
|
8865
8865
|
t({ update: () => {
|
|
8866
8866
|
if (!i.workspace) {
|
|
8867
8867
|
console.assert(!1);
|
|
@@ -8872,12 +8872,12 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
8872
8872
|
let r = t.id === ie()?.id, i = "";
|
|
8873
8873
|
if (t.type.startsWith("on_app_event_v")) {
|
|
8874
8874
|
let e = t, r = w(e.node.key);
|
|
8875
|
-
r && (i = n(r.name), e.node.alias && (i += " / " + e.node.alias), i += " - " +
|
|
8875
|
+
r && (i = n(r.name), e.node.alias && (i += " / " + e.node.alias), i += " - " + tt(e.event.kind, e.event.names));
|
|
8876
8876
|
} else if (t.type.startsWith("watch_effect_v")) i = n("x-block-lib.watchEffect");
|
|
8877
8877
|
else if (t.type.startsWith("app_bind_v")) i = n("x-block-lib.bind");
|
|
8878
8878
|
else if (t.type.startsWith("implement_app_method_v")) {
|
|
8879
8879
|
let e = t;
|
|
8880
|
-
i = n("x-block-lib.implementMethod"), i += " - " +
|
|
8880
|
+
i = n("x-block-lib.implementMethod"), i += " - " + nt(e.method.kind, e.method.names);
|
|
8881
8881
|
} else i = t.type.startsWith("func_entry_v") ? n("x-block-lib.funcEntry") : t.type.startsWith("procedure_def_v") ? n("x-block-lib.procedure") + " - " + t.getFieldValue("NAME") : n("x-block-lib.temporaryBlock");
|
|
8882
8882
|
let a = t.getCommentText() ?? "";
|
|
8883
8883
|
e.push({
|
|
@@ -8917,16 +8917,16 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
8917
8917
|
let a = -10;
|
|
8918
8918
|
r !== "" && (a = i.workspace.getBlockById(r).getRelativeToSurfaceXY().y + 10);
|
|
8919
8919
|
let s = n.getRelativeToSurfaceXY();
|
|
8920
|
-
n.moveTo(new p.Coordinate(s.x, a)), i.workspace.cleanUp(),
|
|
8920
|
+
n.moveTo(new p.Coordinate(s.x, a)), i.workspace.cleanUp(), Ti();
|
|
8921
8921
|
}, u = async (e) => {
|
|
8922
8922
|
if (!i.workspace) {
|
|
8923
8923
|
console.assert(!1);
|
|
8924
8924
|
return;
|
|
8925
8925
|
}
|
|
8926
8926
|
let t = i.workspace.getBlockById(e);
|
|
8927
|
-
ke.setSelected(t),
|
|
8927
|
+
ke.setSelected(t), wi(e), r.value = !1;
|
|
8928
8928
|
};
|
|
8929
|
-
return (e, t) => a.value.length > 0 ? (j(),
|
|
8929
|
+
return (e, t) => a.value.length > 0 ? (j(), ht(N(ue), {
|
|
8930
8930
|
key: 0,
|
|
8931
8931
|
modelValue: a.value,
|
|
8932
8932
|
"onUpdate:modelValue": t[0] ||= (e) => a.value = e,
|
|
@@ -8937,7 +8937,7 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
8937
8937
|
onMove: c,
|
|
8938
8938
|
onStart: s
|
|
8939
8939
|
}, {
|
|
8940
|
-
default: P(() => [(j(!0), D(
|
|
8940
|
+
default: P(() => [(j(!0), D(mt, null, Ot(a.value, (e) => (j(), ht(Gi, {
|
|
8941
8941
|
id: e.id,
|
|
8942
8942
|
key: e.id,
|
|
8943
8943
|
desc: e.desc,
|
|
@@ -8951,9 +8951,9 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
8951
8951
|
"title"
|
|
8952
8952
|
]))), 128))]),
|
|
8953
8953
|
_: 1
|
|
8954
|
-
}, 8, ["modelValue"])) : (j(), D("span",
|
|
8954
|
+
}, 8, ["modelValue"])) : (j(), D("span", Ki, jt(N(n)("x-block-lib.noOption")), 1));
|
|
8955
8955
|
}
|
|
8956
|
-
}), [["__scopeId", "data-v-899634e5"]]),
|
|
8956
|
+
}), [["__scopeId", "data-v-899634e5"]]), Ji = /* @__PURE__ */ _t({
|
|
8957
8957
|
__name: "index",
|
|
8958
8958
|
props: {
|
|
8959
8959
|
modelValue: {
|
|
@@ -8964,7 +8964,7 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
8964
8964
|
},
|
|
8965
8965
|
emits: ["update:modelValue"],
|
|
8966
8966
|
setup(e, { expose: t }) {
|
|
8967
|
-
let n =
|
|
8967
|
+
let n = Nt(e, "modelValue"), r = Li();
|
|
8968
8968
|
t({ update: () => {
|
|
8969
8969
|
if (!r.workspace) {
|
|
8970
8970
|
console.assert(!1);
|
|
@@ -8978,18 +8978,18 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
8978
8978
|
return;
|
|
8979
8979
|
}
|
|
8980
8980
|
let r = t.getBlockById(e);
|
|
8981
|
-
ke.setSelected(r),
|
|
8981
|
+
ke.setSelected(r), wi(e), n.value = !1;
|
|
8982
8982
|
};
|
|
8983
8983
|
return (e, t) => (j(), D("div", { onClick: t[0] ||= (e) => i("") }, "blockTree"));
|
|
8984
8984
|
}
|
|
8985
|
-
}),
|
|
8985
|
+
}), Yi = { class: "text-body-large" }, Xi = /* @__PURE__ */ _t({
|
|
8986
8986
|
__name: "index",
|
|
8987
8987
|
props: {
|
|
8988
8988
|
type: {},
|
|
8989
8989
|
lock: { type: Boolean }
|
|
8990
8990
|
},
|
|
8991
8991
|
setup(e, { expose: t }) {
|
|
8992
|
-
let { t: n } =
|
|
8992
|
+
let { t: n } = zt(), r = Bt(), { sysBarAvail: i } = Ie(), { backgroundColor1: a } = Fe(), o = E(() => r.smAndDown.value), s = E(() => {
|
|
8993
8993
|
let e = "100%";
|
|
8994
8994
|
return r.mdAndUp.value && (e = "400px"), {
|
|
8995
8995
|
background: a.value,
|
|
@@ -9002,11 +9002,11 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
9002
9002
|
position: "relative",
|
|
9003
9003
|
height: `calc(100% - ${e}px)`
|
|
9004
9004
|
};
|
|
9005
|
-
}), l = E(() => ({ height: "60px" })), { open: u } = Le(`blocklyNavigatorDlg${
|
|
9006
|
-
|
|
9005
|
+
}), l = E(() => ({ height: "60px" })), { open: u } = Le(`blocklyNavigatorDlg${Mt()}`);
|
|
9006
|
+
Tt(() => {
|
|
9007
9007
|
u.value = !1;
|
|
9008
9008
|
});
|
|
9009
|
-
let ee =
|
|
9009
|
+
let ee = Pt("blockList"), te = Pt("blockTree");
|
|
9010
9010
|
return t({
|
|
9011
9011
|
open: u,
|
|
9012
9012
|
update: () => {
|
|
@@ -9014,29 +9014,29 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
9014
9014
|
}
|
|
9015
9015
|
}), (t, r) => {
|
|
9016
9016
|
let a = M("v-sheet"), d = M("v-btn"), f = M("v-spacer"), ne = M("v-dialog"), p = M("v-tooltip");
|
|
9017
|
-
return j(), D(
|
|
9017
|
+
return j(), D(mt, null, [k(ne, {
|
|
9018
9018
|
modelValue: N(u),
|
|
9019
|
-
"onUpdate:modelValue": r[5] ||= (e) =>
|
|
9019
|
+
"onUpdate:modelValue": r[5] ||= (e) => yt(u) ? u.value = e : null,
|
|
9020
9020
|
eager: "",
|
|
9021
9021
|
fullscreen: "",
|
|
9022
9022
|
"no-click-animation": "",
|
|
9023
9023
|
persistent: "",
|
|
9024
9024
|
transition: "scroll-x-reverse-transition",
|
|
9025
|
-
onKeydown: r[6] ||= Rt(
|
|
9025
|
+
onKeydown: r[6] ||= Lt(Rt((e) => u.value = !1, ["stop", "prevent"]), ["esc"])
|
|
9026
9026
|
}, {
|
|
9027
9027
|
default: P(() => [O("div", {
|
|
9028
9028
|
class: "w-100 h-100 d-flex flex-row-reverse",
|
|
9029
|
-
onClick: r[3] ||=
|
|
9030
|
-
onContextmenu: r[4] ||=
|
|
9029
|
+
onClick: r[3] ||= Rt((e) => u.value = !1, ["self"]),
|
|
9030
|
+
onContextmenu: r[4] ||= Rt((e) => u.value = !1, ["self", "prevent"])
|
|
9031
9031
|
}, [O("div", {
|
|
9032
9032
|
class: "elevation-2",
|
|
9033
9033
|
style: A(s.value)
|
|
9034
9034
|
}, [
|
|
9035
|
-
N(i) ? (j(),
|
|
9035
|
+
N(i) ? (j(), ht(a, {
|
|
9036
9036
|
key: 0,
|
|
9037
9037
|
color: "transparent",
|
|
9038
9038
|
height: 24
|
|
9039
|
-
})) :
|
|
9039
|
+
})) : gt("", !0),
|
|
9040
9040
|
k(a, {
|
|
9041
9041
|
class: "d-flex align-center px-2",
|
|
9042
9042
|
color: "transparent",
|
|
@@ -9049,7 +9049,7 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
9049
9049
|
variant: "text",
|
|
9050
9050
|
onClick: r[0] ||= (e) => u.value = !1
|
|
9051
9051
|
}),
|
|
9052
|
-
O("span",
|
|
9052
|
+
O("span", Yi, jt(N(n)("x-block-lib.navigator")), 1),
|
|
9053
9053
|
k(f)
|
|
9054
9054
|
]),
|
|
9055
9055
|
_: 1
|
|
@@ -9057,27 +9057,27 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
9057
9057
|
O("div", {
|
|
9058
9058
|
class: "overflow-y-auto",
|
|
9059
9059
|
style: A(c.value)
|
|
9060
|
-
}, [e.type === "list" ? (j(),
|
|
9060
|
+
}, [e.type === "list" ? (j(), ht(qi, {
|
|
9061
9061
|
key: 0,
|
|
9062
9062
|
ref_key: "blockList",
|
|
9063
9063
|
ref: ee,
|
|
9064
9064
|
modelValue: N(u),
|
|
9065
|
-
"onUpdate:modelValue": r[1] ||= (e) =>
|
|
9065
|
+
"onUpdate:modelValue": r[1] ||= (e) => yt(u) ? u.value = e : null,
|
|
9066
9066
|
lock: e.lock
|
|
9067
|
-
}, null, 8, ["modelValue", "lock"])) : e.type === "tree" ? (j(),
|
|
9067
|
+
}, null, 8, ["modelValue", "lock"])) : e.type === "tree" ? (j(), ht(Ji, {
|
|
9068
9068
|
key: 1,
|
|
9069
9069
|
ref_key: "blockTree",
|
|
9070
9070
|
ref: te,
|
|
9071
9071
|
modelValue: N(u),
|
|
9072
|
-
"onUpdate:modelValue": r[2] ||= (e) =>
|
|
9073
|
-
}, null, 8, ["modelValue"])) :
|
|
9072
|
+
"onUpdate:modelValue": r[2] ||= (e) => yt(u) ? u.value = e : null
|
|
9073
|
+
}, null, 8, ["modelValue"])) : gt("", !0), O("div", { style: A(l.value) }, null, 4)], 4)
|
|
9074
9074
|
], 4)], 32)]),
|
|
9075
9075
|
_: 1
|
|
9076
9076
|
}, 8, ["modelValue"]), k(p, {
|
|
9077
9077
|
disabled: o.value,
|
|
9078
9078
|
text: N(n)("x-block-lib.tip.hotkeyCtrlE")
|
|
9079
9079
|
}, {
|
|
9080
|
-
activator: P(({ props: e }) => [k(d,
|
|
9080
|
+
activator: P(({ props: e }) => [k(d, xt(e, {
|
|
9081
9081
|
density: "comfortable",
|
|
9082
9082
|
icon: "mdi-navigation-variant",
|
|
9083
9083
|
variant: "outlined",
|
|
@@ -9087,7 +9087,7 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
9087
9087
|
}, 8, ["disabled", "text"])], 64);
|
|
9088
9088
|
};
|
|
9089
9089
|
}
|
|
9090
|
-
}),
|
|
9090
|
+
}), Zi = ge(), Z = p.xml;
|
|
9091
9091
|
function Q(e) {
|
|
9092
9092
|
let t = Z.createElement("label");
|
|
9093
9093
|
return t.setAttribute("text", e), t;
|
|
@@ -9097,12 +9097,12 @@ function $(e, t) {
|
|
|
9097
9097
|
if (n.setAttribute("type", e), t) for (let e of t) n.appendChild(e);
|
|
9098
9098
|
return n;
|
|
9099
9099
|
}
|
|
9100
|
-
function
|
|
9100
|
+
function Qi(e) {
|
|
9101
9101
|
let t = Z.createElement("mutation");
|
|
9102
9102
|
for (let { key: n, value: r } of e) t.setAttribute(n, r);
|
|
9103
9103
|
return t;
|
|
9104
9104
|
}
|
|
9105
|
-
function
|
|
9105
|
+
function $i(e, t) {
|
|
9106
9106
|
t === void 0 && (t = "");
|
|
9107
9107
|
let n = Z.createElement("value");
|
|
9108
9108
|
n.setAttribute("name", e);
|
|
@@ -9113,7 +9113,7 @@ function ea(e, t) {
|
|
|
9113
9113
|
let a = Z.createTextNode(t);
|
|
9114
9114
|
return i.appendChild(a), r.appendChild(i), n.appendChild(r), n;
|
|
9115
9115
|
}
|
|
9116
|
-
function
|
|
9116
|
+
function ea(e, t) {
|
|
9117
9117
|
t === void 0 && (t = 0);
|
|
9118
9118
|
let n = Z.createElement("value");
|
|
9119
9119
|
n.setAttribute("name", e);
|
|
@@ -9124,7 +9124,7 @@ function ta(e, t) {
|
|
|
9124
9124
|
let a = Z.createTextNode(String(t));
|
|
9125
9125
|
return i.appendChild(a), r.appendChild(i), n.appendChild(r), n;
|
|
9126
9126
|
}
|
|
9127
|
-
function
|
|
9127
|
+
function ta(e, t) {
|
|
9128
9128
|
t === void 0 && (t = !1);
|
|
9129
9129
|
let n = Z.createElement("value");
|
|
9130
9130
|
n.setAttribute("name", e);
|
|
@@ -9137,117 +9137,117 @@ function na(e, t) {
|
|
|
9137
9137
|
}
|
|
9138
9138
|
//#endregion
|
|
9139
9139
|
//#region src/core/category/app/comp/v1/index.ts
|
|
9140
|
-
function
|
|
9140
|
+
function na() {
|
|
9141
9141
|
let { activeObject: e, activeComp: t } = S.app;
|
|
9142
9142
|
return !(e.type !== "comp" || !t.meta.states || t.meta.states.length <= 0);
|
|
9143
9143
|
}
|
|
9144
|
-
function
|
|
9144
|
+
function ra() {
|
|
9145
9145
|
let e = [];
|
|
9146
|
-
return e.push(Q(F("LABEL_EVENT"))), U("onEvent") && e.push($("on_app_event_v1")), U("triggerEvent") && e.push($("trigger_app_event_v1")), e.push($("app_bind_v1", [
|
|
9146
|
+
return e.push(Q(F("LABEL_EVENT"))), U("onEvent") && e.push($("on_app_event_v1")), U("triggerEvent") && e.push($("trigger_app_event_v1")), e.push($("app_bind_v1", [Qi([{
|
|
9147
9147
|
key: "items",
|
|
9148
9148
|
value: "2"
|
|
9149
|
-
}])])), e.push($("watch_effect_v1")), (U("getProperty") || U("setProperty")) && e.push(Q(F("LABEL_PROPERTY"))), U("getProperty") && e.push($("get_app_property_v1")), U("setProperty") && e.push($("set_app_property_v1")),
|
|
9149
|
+
}])])), e.push($("watch_effect_v1")), (U("getProperty") || U("setProperty")) && e.push(Q(F("LABEL_PROPERTY"))), U("getProperty") && e.push($("get_app_property_v1")), U("setProperty") && e.push($("set_app_property_v1")), na() && (e.push(Q(F("LABEL_STATE"))), e.push($("get_app_state_v1")), e.push($("set_app_state_v1"))), (U("callMethod") || U("implementMethod")) && e.push(Q(F("LABEL_METHOD"))), U("callMethod") && e.push($("call_app_method_v1")), U("implementMethod") && (e.push($("implement_app_method_v1")), U("implementMethodOutput") && e.push($("set_app_method_output_v1")), e.push($("procedure_return_v1"))), e;
|
|
9150
9150
|
}
|
|
9151
|
-
var
|
|
9151
|
+
var ia = {
|
|
9152
9152
|
name: "APP_COMP_CATEGORY",
|
|
9153
|
-
callback:
|
|
9153
|
+
callback: ra
|
|
9154
9154
|
};
|
|
9155
9155
|
//#endregion
|
|
9156
9156
|
//#region src/core/category/app/compute/v1/index.ts
|
|
9157
|
-
function
|
|
9157
|
+
function aa() {
|
|
9158
9158
|
let e = [];
|
|
9159
9159
|
return e.push(Q(F("LABEL_FUNC"))), e.push(Q(F("LABEL_FLOW"))), e;
|
|
9160
9160
|
}
|
|
9161
|
-
var
|
|
9161
|
+
var oa = {
|
|
9162
9162
|
name: "APP_COMPUTE_CATEGORY",
|
|
9163
|
-
callback:
|
|
9163
|
+
callback: aa
|
|
9164
9164
|
};
|
|
9165
9165
|
//#endregion
|
|
9166
9166
|
//#region src/core/category/app/message/v1/index.ts
|
|
9167
|
-
function
|
|
9167
|
+
function sa() {
|
|
9168
9168
|
let e = [];
|
|
9169
|
-
return e.push($("app_debug_trace_v1", [
|
|
9169
|
+
return e.push($("app_debug_trace_v1", [$i("OBJECT")])), e.push($("popup_message_v1", [$i("TEXT")])), e.push($("open_confirm_dlg_v1")), e.push($("open_prompt_dlg_v1")), e;
|
|
9170
9170
|
}
|
|
9171
|
-
var
|
|
9171
|
+
var ca = {
|
|
9172
9172
|
name: "APP_MESSAGE_CATEGORY",
|
|
9173
|
-
callback:
|
|
9173
|
+
callback: sa
|
|
9174
9174
|
};
|
|
9175
9175
|
//#endregion
|
|
9176
9176
|
//#region src/core/category/app/misc/v1/index.ts
|
|
9177
|
-
function
|
|
9177
|
+
function la() {
|
|
9178
9178
|
for (let e of S.app.appList) if (e.pages.length > 0) return !0;
|
|
9179
9179
|
return !1;
|
|
9180
9180
|
}
|
|
9181
|
-
function
|
|
9181
|
+
function ua() {
|
|
9182
9182
|
let e = [];
|
|
9183
|
-
return e.push($("app_env_is_v1")),
|
|
9183
|
+
return e.push($("app_env_is_v1")), la() && e.push($("navigate_to_v1")), e;
|
|
9184
9184
|
}
|
|
9185
|
-
var
|
|
9185
|
+
var da = {
|
|
9186
9186
|
name: "APP_MISC_CATEGORY",
|
|
9187
|
-
callback:
|
|
9187
|
+
callback: ua
|
|
9188
9188
|
};
|
|
9189
9189
|
//#endregion
|
|
9190
9190
|
//#region src/core/category/app/page/v1/index.ts
|
|
9191
|
-
function
|
|
9191
|
+
function fa() {
|
|
9192
9192
|
let { activeObject: e, activePage: t } = S.app;
|
|
9193
9193
|
return !(e.type !== "page" || !t.meta.states || t.meta.states.length <= 0);
|
|
9194
9194
|
}
|
|
9195
|
-
function
|
|
9195
|
+
function pa() {
|
|
9196
9196
|
let { activeObject: e, activePage: t } = S.app;
|
|
9197
9197
|
return !(e.type !== "page" || !t.meta.arguments || t.meta.arguments.length <= 0);
|
|
9198
9198
|
}
|
|
9199
|
-
function
|
|
9199
|
+
function ma() {
|
|
9200
9200
|
let e = [];
|
|
9201
|
-
return e.push(Q(F("LABEL_EVENT"))), U("onEvent") && e.push($("on_app_event_v1")), e.push($("app_bind_v1", [
|
|
9201
|
+
return e.push(Q(F("LABEL_EVENT"))), U("onEvent") && e.push($("on_app_event_v1")), e.push($("app_bind_v1", [Qi([{
|
|
9202
9202
|
key: "items",
|
|
9203
9203
|
value: "2"
|
|
9204
|
-
}])])), e.push($("watch_effect_v1")), (U("getProperty") || U("setProperty")) && e.push(Q(F("LABEL_PROPERTY"))), U("getProperty") && e.push($("get_app_property_v1")), U("setProperty") && e.push($("set_app_property_v1")),
|
|
9204
|
+
}])])), e.push($("watch_effect_v1")), (U("getProperty") || U("setProperty")) && e.push(Q(F("LABEL_PROPERTY"))), U("getProperty") && e.push($("get_app_property_v1")), U("setProperty") && e.push($("set_app_property_v1")), fa() && (e.push(Q(F("LABEL_STATE"))), e.push($("get_app_state_v1")), e.push($("set_app_state_v1"))), U("callMethod") && (e.push(Q(F("LABEL_METHOD"))), e.push($("call_app_method_v1"))), pa() && (e.push(Q(F("LABEL_ARGUMENT"))), e.push($("get_page_argument_v1"))), e;
|
|
9205
9205
|
}
|
|
9206
|
-
var
|
|
9206
|
+
var ha = {
|
|
9207
9207
|
name: "APP_PAGE_CATEGORY",
|
|
9208
|
-
callback:
|
|
9208
|
+
callback: ma
|
|
9209
9209
|
};
|
|
9210
9210
|
//#endregion
|
|
9211
9211
|
//#region src/core/category/app/resource/v1/index.ts
|
|
9212
|
-
function
|
|
9212
|
+
function ga() {
|
|
9213
9213
|
let e = [];
|
|
9214
9214
|
return e.push(Q(F("LABEL_RESOURCE"))), e.push($("upload_resource_v1")), e;
|
|
9215
9215
|
}
|
|
9216
|
-
var
|
|
9216
|
+
var _a = {
|
|
9217
9217
|
name: "APP_RESOURCE_CATEGORY",
|
|
9218
|
-
callback:
|
|
9219
|
-
},
|
|
9220
|
-
function
|
|
9218
|
+
callback: ga
|
|
9219
|
+
}, va = p.xml;
|
|
9220
|
+
function ya() {
|
|
9221
9221
|
let e = [];
|
|
9222
9222
|
{
|
|
9223
|
-
let t =
|
|
9223
|
+
let t = va.createElement("label");
|
|
9224
9224
|
t.setAttribute("text", "%{BKY_LABEL_PROCEDURE}"), e.push(t);
|
|
9225
9225
|
}
|
|
9226
9226
|
{
|
|
9227
|
-
let t =
|
|
9227
|
+
let t = va.createElement("block");
|
|
9228
9228
|
t.setAttribute("type", "procedure_def_v1");
|
|
9229
9229
|
{
|
|
9230
|
-
let e =
|
|
9230
|
+
let e = va.createElement("field");
|
|
9231
9231
|
e.setAttribute("name", "NAME");
|
|
9232
|
-
let n =
|
|
9232
|
+
let n = va.createTextNode(F("PROCEDURE_DEFAULT_NAME"));
|
|
9233
9233
|
e.appendChild(n), t.appendChild(e);
|
|
9234
9234
|
}
|
|
9235
9235
|
e.push(t);
|
|
9236
9236
|
}
|
|
9237
9237
|
{
|
|
9238
|
-
let t =
|
|
9238
|
+
let t = va.createElement("block");
|
|
9239
9239
|
t.setAttribute("type", "procedure_return_v1"), e.push(t);
|
|
9240
9240
|
}
|
|
9241
9241
|
return e;
|
|
9242
9242
|
}
|
|
9243
|
-
var
|
|
9243
|
+
var ba = {
|
|
9244
9244
|
name: "PROCEDURE_CATEGORY",
|
|
9245
|
-
callback:
|
|
9246
|
-
},
|
|
9247
|
-
function
|
|
9245
|
+
callback: ya
|
|
9246
|
+
}, xa = p.xml;
|
|
9247
|
+
function Sa() {
|
|
9248
9248
|
let e = s(), t = [];
|
|
9249
9249
|
{
|
|
9250
|
-
let e =
|
|
9250
|
+
let e = xa.createElement("label");
|
|
9251
9251
|
e.setAttribute("text", "%{BKY_LABEL_VARIABLE}"), t.push(e);
|
|
9252
9252
|
}
|
|
9253
9253
|
{
|
|
@@ -9260,75 +9260,75 @@ function Ca() {
|
|
|
9260
9260
|
if (n.length <= 0) return t;
|
|
9261
9261
|
n.sort(c.compareByName);
|
|
9262
9262
|
{
|
|
9263
|
-
let e =
|
|
9263
|
+
let e = xa.createElement("label");
|
|
9264
9264
|
e.setAttribute("text", F("LABEL_CREATED")), t.push(e);
|
|
9265
9265
|
}
|
|
9266
9266
|
return n.forEach((e) => {
|
|
9267
9267
|
{
|
|
9268
|
-
let n =
|
|
9268
|
+
let n = xa.createElement("block");
|
|
9269
9269
|
n.setAttribute("type", "variable_get_v1"), n.appendChild(c.generateVariableFieldDom(e)), t.push(n);
|
|
9270
9270
|
}
|
|
9271
9271
|
{
|
|
9272
|
-
let n =
|
|
9272
|
+
let n = xa.createElement("block");
|
|
9273
9273
|
n.setAttribute("type", "variable_set_v1"), n.appendChild(c.generateVariableFieldDom(e)), t.push(n);
|
|
9274
9274
|
}
|
|
9275
9275
|
}), t;
|
|
9276
9276
|
}
|
|
9277
|
-
var
|
|
9277
|
+
var Ca = {
|
|
9278
9278
|
name: "VARIABLE_CATEGORY",
|
|
9279
|
-
callback:
|
|
9279
|
+
callback: Sa
|
|
9280
9280
|
};
|
|
9281
9281
|
//#endregion
|
|
9282
9282
|
//#region src/core/category/compute/data/v1/index.ts
|
|
9283
|
-
function
|
|
9283
|
+
function wa() {
|
|
9284
9284
|
let e = [];
|
|
9285
|
-
if (Y().length > 0) e.push(Q(F("LABEL_OPERATION"))), e.push($("add_data_v1")), e.push($("delete_data_v1")), e.push($("update_data_v1")), e.push($("query_data_v1")), e.push($("transaction_v1")), e.push($("interrupt_transaction_v1", [
|
|
9285
|
+
if (Y().length > 0) e.push(Q(F("LABEL_OPERATION"))), e.push($("add_data_v1")), e.push($("delete_data_v1")), e.push($("update_data_v1")), e.push($("query_data_v1")), e.push($("transaction_v1")), e.push($("interrupt_transaction_v1", [$i("VALUE")])), e.push(Q(F("LABEL_CONDITION"))), e.push($("cond_logic_v1")), e.push($("cond_atomic_v1", [$i("VALUE")])), e.push(Q(F("LABEL_QUERY_EXTRA"))), e.push($("query_extra_limit_v1", [ea("OFFSET", 0), ea("LIMIT", 1)])), e.push($("query_extra_sortby_v1", [$i("COLUMN"), ta("DESC")]));
|
|
9286
9286
|
else {
|
|
9287
9287
|
let t = document.createElement("button");
|
|
9288
9288
|
t.setAttribute("text", F("BUTTON_NO_TABLE")), t.setAttribute("callbackKey", "NO_TABLE"), e.push(t);
|
|
9289
9289
|
}
|
|
9290
9290
|
return e;
|
|
9291
9291
|
}
|
|
9292
|
-
var
|
|
9292
|
+
var Ta = {
|
|
9293
9293
|
name: "COMPUTE_DATA_CATEGORY",
|
|
9294
|
-
callback:
|
|
9294
|
+
callback: wa
|
|
9295
9295
|
};
|
|
9296
9296
|
//#endregion
|
|
9297
9297
|
//#region src/core/category/compute/flow/v1/index.ts
|
|
9298
|
-
function
|
|
9299
|
-
return
|
|
9298
|
+
function Ea() {
|
|
9299
|
+
return Dr("flow").length > 0;
|
|
9300
9300
|
}
|
|
9301
|
-
function
|
|
9301
|
+
function Da() {
|
|
9302
9302
|
let e = [];
|
|
9303
|
-
return S.compute.activeObject.type === "flow" && e.push($("on_flow_state_event_v1")),
|
|
9303
|
+
return S.compute.activeObject.type === "flow" && e.push($("on_flow_state_event_v1")), Ea() && console.assert(!0), e;
|
|
9304
9304
|
}
|
|
9305
|
-
var
|
|
9305
|
+
var Oa = {
|
|
9306
9306
|
name: "COMPUTE_FLOW_CATEGORY",
|
|
9307
|
-
callback:
|
|
9307
|
+
callback: Da
|
|
9308
9308
|
};
|
|
9309
9309
|
//#endregion
|
|
9310
9310
|
//#region src/core/category/compute/func/v1/index.ts
|
|
9311
|
-
function
|
|
9312
|
-
return
|
|
9311
|
+
function ka() {
|
|
9312
|
+
return Dr("func").length > 0;
|
|
9313
9313
|
}
|
|
9314
|
-
function
|
|
9314
|
+
function Aa() {
|
|
9315
9315
|
let { activeObject: e, activeFunc: t } = S.compute, n = [];
|
|
9316
|
-
return e.type === "func" && (n.push($("func_entry_v1")), t.outputs && t.outputs.length > 0 && n.push($("set_func_output_v1")), n.push($("procedure_return_v1"))),
|
|
9316
|
+
return e.type === "func" && (n.push($("func_entry_v1")), t.outputs && t.outputs.length > 0 && n.push($("set_func_output_v1")), n.push($("procedure_return_v1"))), ka() && n.push($("call_func_internal_v1")), n;
|
|
9317
9317
|
}
|
|
9318
|
-
var
|
|
9318
|
+
var ja = {
|
|
9319
9319
|
name: "COMPUTE_FUNC_CATEGORY",
|
|
9320
|
-
callback:
|
|
9320
|
+
callback: Aa
|
|
9321
9321
|
};
|
|
9322
9322
|
//#endregion
|
|
9323
9323
|
//#region src/core/category/compute/misc/v1/index.ts
|
|
9324
|
-
function
|
|
9324
|
+
function Ma() {
|
|
9325
9325
|
let e = [];
|
|
9326
|
-
return e.push($("compute_debug_trace_v1", [
|
|
9326
|
+
return e.push($("compute_debug_trace_v1", [$i("OBJECT")])), e;
|
|
9327
9327
|
}
|
|
9328
|
-
var
|
|
9328
|
+
var Na = {
|
|
9329
9329
|
name: "COMPUTE_MISC_CATEGORY",
|
|
9330
|
-
callback:
|
|
9331
|
-
},
|
|
9330
|
+
callback: Ma
|
|
9331
|
+
}, Pa = {
|
|
9332
9332
|
kind: "category",
|
|
9333
9333
|
name: "%{BKY_CATEGORY_COLOR}",
|
|
9334
9334
|
categorystyle: "color_category",
|
|
@@ -9378,7 +9378,7 @@ var Pa = {
|
|
|
9378
9378
|
}
|
|
9379
9379
|
}
|
|
9380
9380
|
]
|
|
9381
|
-
},
|
|
9381
|
+
}, Fa = {
|
|
9382
9382
|
kind: "category",
|
|
9383
9383
|
name: "%{BKY_CATEGORY_LIST}",
|
|
9384
9384
|
categorystyle: "list_category",
|
|
@@ -9459,7 +9459,7 @@ var Pa = {
|
|
|
9459
9459
|
type: "list_reverse_v1"
|
|
9460
9460
|
}
|
|
9461
9461
|
]
|
|
9462
|
-
},
|
|
9462
|
+
}, Ia = {
|
|
9463
9463
|
kind: "category",
|
|
9464
9464
|
name: "%{BKY_CATEGORY_LOGIC}",
|
|
9465
9465
|
categorystyle: "logic_category",
|
|
@@ -9501,7 +9501,7 @@ var Pa = {
|
|
|
9501
9501
|
type: "logic_ternary_v1"
|
|
9502
9502
|
}
|
|
9503
9503
|
]
|
|
9504
|
-
},
|
|
9504
|
+
}, La = {
|
|
9505
9505
|
kind: "category",
|
|
9506
9506
|
name: "%{BKY_CATEGORY_LOOP}",
|
|
9507
9507
|
categorystyle: "loop_category",
|
|
@@ -9545,7 +9545,7 @@ var Pa = {
|
|
|
9545
9545
|
type: "flow_control_v1"
|
|
9546
9546
|
}
|
|
9547
9547
|
]
|
|
9548
|
-
},
|
|
9548
|
+
}, Ra = {
|
|
9549
9549
|
kind: "category",
|
|
9550
9550
|
name: "%{BKY_CATEGORY_MATH}",
|
|
9551
9551
|
categorystyle: "math_category",
|
|
@@ -9650,7 +9650,7 @@ var Pa = {
|
|
|
9650
9650
|
type: "math_on_list_v1"
|
|
9651
9651
|
}
|
|
9652
9652
|
]
|
|
9653
|
-
},
|
|
9653
|
+
}, za = {
|
|
9654
9654
|
kind: "category",
|
|
9655
9655
|
name: "%{BKY_CATEGORY_OBJECT}",
|
|
9656
9656
|
categorystyle: "object_category",
|
|
@@ -9700,7 +9700,7 @@ var Pa = {
|
|
|
9700
9700
|
} } }
|
|
9701
9701
|
}
|
|
9702
9702
|
]
|
|
9703
|
-
},
|
|
9703
|
+
}, Ba = {
|
|
9704
9704
|
kind: "category",
|
|
9705
9705
|
name: "%{BKY_CATEGORY_TEXT}",
|
|
9706
9706
|
categorystyle: "text_category",
|
|
@@ -9815,7 +9815,7 @@ var Pa = {
|
|
|
9815
9815
|
type: "text_reverse_v1"
|
|
9816
9816
|
}
|
|
9817
9817
|
]
|
|
9818
|
-
},
|
|
9818
|
+
}, Va = {
|
|
9819
9819
|
kind: "category",
|
|
9820
9820
|
name: "%{BKY_CATEGORY_TIME}",
|
|
9821
9821
|
categorystyle: "time_category",
|
|
@@ -9830,155 +9830,155 @@ var Pa = {
|
|
|
9830
9830
|
fields: { NUM: 1e3 }
|
|
9831
9831
|
} } }
|
|
9832
9832
|
}]
|
|
9833
|
-
},
|
|
9833
|
+
}, Ha = {
|
|
9834
9834
|
kind: "categoryToolbox",
|
|
9835
9835
|
contents: [
|
|
9836
9836
|
{
|
|
9837
9837
|
kind: "category",
|
|
9838
9838
|
name: "%{BKY_CATEGORY_COMP}",
|
|
9839
9839
|
categorystyle: "misc_category",
|
|
9840
|
-
custom:
|
|
9840
|
+
custom: ia.name
|
|
9841
9841
|
},
|
|
9842
9842
|
{
|
|
9843
9843
|
kind: "category",
|
|
9844
9844
|
name: "%{BKY_CATEGORY_MESSAGE}",
|
|
9845
9845
|
categorystyle: "misc_category",
|
|
9846
|
-
custom:
|
|
9846
|
+
custom: ca.name
|
|
9847
9847
|
},
|
|
9848
9848
|
{
|
|
9849
9849
|
kind: "category",
|
|
9850
9850
|
name: "%{BKY_CATEGORY_MISC}",
|
|
9851
9851
|
categorystyle: "misc_category",
|
|
9852
|
-
custom:
|
|
9852
|
+
custom: da.name
|
|
9853
9853
|
},
|
|
9854
|
-
Ra,
|
|
9855
9854
|
La,
|
|
9856
|
-
za,
|
|
9857
|
-
Va,
|
|
9858
9855
|
Ia,
|
|
9856
|
+
Ra,
|
|
9859
9857
|
Ba,
|
|
9860
9858
|
Fa,
|
|
9861
|
-
|
|
9859
|
+
za,
|
|
9860
|
+
Pa,
|
|
9861
|
+
Va,
|
|
9862
9862
|
{
|
|
9863
9863
|
kind: "category",
|
|
9864
9864
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
9865
9865
|
categorystyle: "variable_category",
|
|
9866
|
-
custom:
|
|
9866
|
+
custom: Ca.name
|
|
9867
9867
|
},
|
|
9868
9868
|
{
|
|
9869
9869
|
kind: "category",
|
|
9870
9870
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
9871
9871
|
categorystyle: "procedure_category",
|
|
9872
|
-
custom:
|
|
9872
|
+
custom: ba.name
|
|
9873
9873
|
},
|
|
9874
9874
|
{
|
|
9875
9875
|
kind: "category",
|
|
9876
9876
|
name: "%{BKY_CATEGORY_RESOURCE}",
|
|
9877
9877
|
categorystyle: "resource_category",
|
|
9878
|
-
custom:
|
|
9878
|
+
custom: _a.name
|
|
9879
9879
|
},
|
|
9880
9880
|
{
|
|
9881
9881
|
kind: "category",
|
|
9882
9882
|
name: "%{BKY_CATEGORY_COMPUTE}",
|
|
9883
9883
|
categorystyle: "compute_category",
|
|
9884
|
-
custom:
|
|
9884
|
+
custom: oa.name
|
|
9885
9885
|
}
|
|
9886
9886
|
]
|
|
9887
|
-
},
|
|
9887
|
+
}, Ua = {
|
|
9888
9888
|
kind: "categoryToolbox",
|
|
9889
9889
|
contents: [
|
|
9890
9890
|
{
|
|
9891
9891
|
kind: "category",
|
|
9892
9892
|
name: "%{BKY_CATEGORY_FUNC}",
|
|
9893
9893
|
categorystyle: "func_category",
|
|
9894
|
-
custom:
|
|
9894
|
+
custom: ja.name
|
|
9895
9895
|
},
|
|
9896
9896
|
{
|
|
9897
9897
|
kind: "category",
|
|
9898
9898
|
name: "%{BKY_CATEGORY_FLOW}",
|
|
9899
9899
|
categorystyle: "flow_category",
|
|
9900
|
-
custom:
|
|
9900
|
+
custom: Oa.name
|
|
9901
9901
|
},
|
|
9902
9902
|
{
|
|
9903
9903
|
kind: "category",
|
|
9904
9904
|
name: "%{BKY_CATEGORY_DATA}",
|
|
9905
9905
|
categorystyle: "data_category",
|
|
9906
|
-
custom:
|
|
9906
|
+
custom: Ta.name
|
|
9907
9907
|
},
|
|
9908
9908
|
{
|
|
9909
9909
|
kind: "category",
|
|
9910
9910
|
name: "%{BKY_CATEGORY_MISC}",
|
|
9911
9911
|
categorystyle: "misc_category",
|
|
9912
|
-
custom:
|
|
9912
|
+
custom: Na.name
|
|
9913
9913
|
},
|
|
9914
|
-
Ra,
|
|
9915
9914
|
La,
|
|
9916
|
-
za,
|
|
9917
|
-
Va,
|
|
9918
9915
|
Ia,
|
|
9916
|
+
Ra,
|
|
9919
9917
|
Ba,
|
|
9920
9918
|
Fa,
|
|
9919
|
+
za,
|
|
9920
|
+
Pa,
|
|
9921
9921
|
{
|
|
9922
9922
|
kind: "category",
|
|
9923
9923
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
9924
9924
|
categorystyle: "variable_category",
|
|
9925
|
-
custom:
|
|
9925
|
+
custom: Ca.name
|
|
9926
9926
|
},
|
|
9927
9927
|
{
|
|
9928
9928
|
kind: "category",
|
|
9929
9929
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
9930
9930
|
categorystyle: "procedure_category",
|
|
9931
|
-
custom:
|
|
9931
|
+
custom: ba.name
|
|
9932
9932
|
}
|
|
9933
9933
|
]
|
|
9934
|
-
},
|
|
9934
|
+
}, Wa = {
|
|
9935
9935
|
kind: "categoryToolbox",
|
|
9936
9936
|
contents: [
|
|
9937
9937
|
{
|
|
9938
9938
|
kind: "category",
|
|
9939
9939
|
name: "%{BKY_CATEGORY_FUNC}",
|
|
9940
9940
|
categorystyle: "func_category",
|
|
9941
|
-
custom:
|
|
9941
|
+
custom: ja.name
|
|
9942
9942
|
},
|
|
9943
9943
|
{
|
|
9944
9944
|
kind: "category",
|
|
9945
9945
|
name: "%{BKY_CATEGORY_FLOW}",
|
|
9946
9946
|
categorystyle: "flow_category",
|
|
9947
|
-
custom:
|
|
9947
|
+
custom: Oa.name
|
|
9948
9948
|
},
|
|
9949
9949
|
{
|
|
9950
9950
|
kind: "category",
|
|
9951
9951
|
name: "%{BKY_CATEGORY_DATA}",
|
|
9952
9952
|
categorystyle: "data_category",
|
|
9953
|
-
custom:
|
|
9953
|
+
custom: Ta.name
|
|
9954
9954
|
},
|
|
9955
9955
|
{
|
|
9956
9956
|
kind: "category",
|
|
9957
9957
|
name: "%{BKY_CATEGORY_MISC}",
|
|
9958
9958
|
categorystyle: "misc_category",
|
|
9959
|
-
custom:
|
|
9959
|
+
custom: Na.name
|
|
9960
9960
|
},
|
|
9961
|
-
Ra,
|
|
9962
9961
|
La,
|
|
9963
|
-
za,
|
|
9964
|
-
Va,
|
|
9965
9962
|
Ia,
|
|
9963
|
+
Ra,
|
|
9966
9964
|
Ba,
|
|
9967
9965
|
Fa,
|
|
9966
|
+
za,
|
|
9967
|
+
Pa,
|
|
9968
9968
|
{
|
|
9969
9969
|
kind: "category",
|
|
9970
9970
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
9971
9971
|
categorystyle: "variable_category",
|
|
9972
|
-
custom:
|
|
9972
|
+
custom: Ca.name
|
|
9973
9973
|
},
|
|
9974
9974
|
{
|
|
9975
9975
|
kind: "category",
|
|
9976
9976
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
9977
9977
|
categorystyle: "procedure_category",
|
|
9978
|
-
custom:
|
|
9978
|
+
custom: ba.name
|
|
9979
9979
|
}
|
|
9980
9980
|
]
|
|
9981
|
-
},
|
|
9981
|
+
}, Ga = {
|
|
9982
9982
|
kind: "categoryToolbox",
|
|
9983
9983
|
contents: [{
|
|
9984
9984
|
kind: "category",
|
|
@@ -10007,61 +10007,61 @@ var Pa = {
|
|
|
10007
10007
|
}
|
|
10008
10008
|
]
|
|
10009
10009
|
}]
|
|
10010
|
-
},
|
|
10010
|
+
}, Ka = {
|
|
10011
10011
|
kind: "categoryToolbox",
|
|
10012
10012
|
contents: [
|
|
10013
10013
|
{
|
|
10014
10014
|
kind: "category",
|
|
10015
10015
|
name: "%{BKY_CATEGORY_PAGE}",
|
|
10016
10016
|
categorystyle: "misc_category",
|
|
10017
|
-
custom:
|
|
10017
|
+
custom: ha.name
|
|
10018
10018
|
},
|
|
10019
10019
|
{
|
|
10020
10020
|
kind: "category",
|
|
10021
10021
|
name: "%{BKY_CATEGORY_MESSAGE}",
|
|
10022
10022
|
categorystyle: "misc_category",
|
|
10023
|
-
custom:
|
|
10023
|
+
custom: ca.name
|
|
10024
10024
|
},
|
|
10025
10025
|
{
|
|
10026
10026
|
kind: "category",
|
|
10027
10027
|
name: "%{BKY_CATEGORY_MISC}",
|
|
10028
10028
|
categorystyle: "misc_category",
|
|
10029
|
-
custom:
|
|
10029
|
+
custom: da.name
|
|
10030
10030
|
},
|
|
10031
|
-
Ra,
|
|
10032
10031
|
La,
|
|
10033
|
-
za,
|
|
10034
|
-
Va,
|
|
10035
10032
|
Ia,
|
|
10033
|
+
Ra,
|
|
10036
10034
|
Ba,
|
|
10037
10035
|
Fa,
|
|
10038
|
-
|
|
10036
|
+
za,
|
|
10037
|
+
Pa,
|
|
10038
|
+
Va,
|
|
10039
10039
|
{
|
|
10040
10040
|
kind: "category",
|
|
10041
10041
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
10042
10042
|
categorystyle: "variable_category",
|
|
10043
|
-
custom:
|
|
10043
|
+
custom: Ca.name
|
|
10044
10044
|
},
|
|
10045
10045
|
{
|
|
10046
10046
|
kind: "category",
|
|
10047
10047
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
10048
10048
|
categorystyle: "procedure_category",
|
|
10049
|
-
custom:
|
|
10049
|
+
custom: ba.name
|
|
10050
10050
|
},
|
|
10051
10051
|
{
|
|
10052
10052
|
kind: "category",
|
|
10053
10053
|
name: "%{BKY_CATEGORY_RESOURCE}",
|
|
10054
10054
|
categorystyle: "resource_category",
|
|
10055
|
-
custom:
|
|
10055
|
+
custom: _a.name
|
|
10056
10056
|
},
|
|
10057
10057
|
{
|
|
10058
10058
|
kind: "category",
|
|
10059
10059
|
name: "%{BKY_CATEGORY_COMPUTE}",
|
|
10060
10060
|
categorystyle: "compute_category",
|
|
10061
|
-
custom:
|
|
10061
|
+
custom: oa.name
|
|
10062
10062
|
}
|
|
10063
10063
|
]
|
|
10064
|
-
},
|
|
10064
|
+
}, qa = {
|
|
10065
10065
|
grid: {
|
|
10066
10066
|
length: 2,
|
|
10067
10067
|
snap: !0,
|
|
@@ -10085,11 +10085,11 @@ var Pa = {
|
|
|
10085
10085
|
wheel: !0
|
|
10086
10086
|
}
|
|
10087
10087
|
};
|
|
10088
|
-
function
|
|
10089
|
-
|
|
10090
|
-
let i = o(e,
|
|
10088
|
+
function Ja(e, t, n, r) {
|
|
10089
|
+
qa.theme = r ? "dark" : "light", qa.toolbox = Ya(t, n);
|
|
10090
|
+
let i = o(e, qa);
|
|
10091
10091
|
return i.addChangeListener((e) => {
|
|
10092
|
-
if (e.type ===
|
|
10092
|
+
if (e.type === Si.STATE_CHANGE) {
|
|
10093
10093
|
let e = i.getAllBlocks();
|
|
10094
10094
|
for (let t of e) {
|
|
10095
10095
|
let e = t;
|
|
@@ -10097,21 +10097,21 @@ function Ya(e, t, n, r) {
|
|
|
10097
10097
|
}
|
|
10098
10098
|
}
|
|
10099
10099
|
setTimeout(() => {
|
|
10100
|
-
(0,
|
|
10100
|
+
(0, Zi.shadowBlockConversionChangeListener)(e);
|
|
10101
10101
|
}, 0);
|
|
10102
|
-
}),
|
|
10102
|
+
}), Xa(i, t, n), Za(i), i;
|
|
10103
10103
|
}
|
|
10104
|
-
function
|
|
10104
|
+
function Ya(e, t) {
|
|
10105
10105
|
let n;
|
|
10106
|
-
return e === "page" ? t === "v1" && (n =
|
|
10106
|
+
return e === "page" ? t === "v1" && (n = Ka) : e === "comp" ? t === "v1" && (n = Ha) : e === "func" ? t === "v1" && (n = Wa) : e === "flow" ? t === "v1" && (n = Ua) : e === "json" && t === "v1" && (n = Ga), console.assert(!!n, `invalid toolbox type=${e} version=${t}`), n;
|
|
10107
10107
|
}
|
|
10108
|
-
function
|
|
10108
|
+
function Xa(e, t, n) {
|
|
10109
10109
|
function r({ name: n, callback: r }) {
|
|
10110
10110
|
e.registerToolboxCategoryCallback(n, () => r(t));
|
|
10111
10111
|
}
|
|
10112
|
-
t === "page" ? n === "v1" && (r(
|
|
10112
|
+
t === "page" ? n === "v1" && (r(ha), r(ca), r(da), r(Ca), r(ba), r(_a), r(oa)) : t === "comp" ? n === "v1" && (r(ia), r(ca), r(da), r(Ca), r(ba), r(_a), r(oa)) : t === "func" ? n === "v1" && (r(ja), r(Oa), r(Ta), r(Na), r(Ca), r(ba)) : t === "flow" && n === "v1" && (r(ja), r(Oa), r(Ta), r(Na), r(Ca), r(ba));
|
|
10113
10113
|
}
|
|
10114
|
-
function
|
|
10114
|
+
function Za(e) {
|
|
10115
10115
|
let { router: t } = je;
|
|
10116
10116
|
e.registerButtonCallback("NO_COMPUTE", () => {
|
|
10117
10117
|
let e = t.resolve({ path: "/compute/" + Date.now() });
|
|
@@ -10127,9 +10127,9 @@ function Qa(e) {
|
|
|
10127
10127
|
}
|
|
10128
10128
|
//#endregion
|
|
10129
10129
|
//#region src/components/blockly/index.vue?vue&type=script&setup=true&lang.ts
|
|
10130
|
-
var
|
|
10130
|
+
var Qa = { class: "position-relative w-100 h-100" }, $a = /* @__PURE__ */ _t({
|
|
10131
10131
|
__name: "index",
|
|
10132
|
-
props: /* @__PURE__ */
|
|
10132
|
+
props: /* @__PURE__ */ bt({
|
|
10133
10133
|
type: {},
|
|
10134
10134
|
version: {},
|
|
10135
10135
|
locale: {},
|
|
@@ -10143,11 +10143,11 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10143
10143
|
scale: { required: !0 },
|
|
10144
10144
|
scaleModifiers: {}
|
|
10145
10145
|
}),
|
|
10146
|
-
emits: /* @__PURE__ */
|
|
10146
|
+
emits: /* @__PURE__ */ bt(["ready"], ["update:lock", "update:scale"]),
|
|
10147
10147
|
setup(e, { expose: t, emit: n }) {
|
|
10148
|
-
let { backgroundColor2: r } = Fe(), i =
|
|
10149
|
-
|
|
10150
|
-
let f =
|
|
10148
|
+
let { backgroundColor2: r } = Fe(), i = Nt(e, "lock"), a = Nt(e, "scale"), o = n, s = `blocklyEditor${Mt()}`, c = Dt(), u = Pt("parentContainer"), ee = Pt("clean"), te = Pt("navigator"), d = {};
|
|
10149
|
+
Ii(d);
|
|
10150
|
+
let f = Dt(!0), ne = Dt(!1), p = E(() => e.type === "json" ? "tree" : "list"), re = E(() => ({
|
|
10151
10151
|
width: "100%",
|
|
10152
10152
|
height: "calc(100% - 48px)"
|
|
10153
10153
|
})), m = E(() => ({
|
|
@@ -10190,27 +10190,27 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10190
10190
|
top: 0,
|
|
10191
10191
|
left: 0,
|
|
10192
10192
|
zIndex: 3e3
|
|
10193
|
-
})), { open: ue } = Le(`blocklyEditorFlyout${
|
|
10194
|
-
|
|
10193
|
+
})), { open: ue } = Le(`blocklyEditorFlyout${Mt()}`);
|
|
10194
|
+
wt(async () => {
|
|
10195
10195
|
if (!c.value || !u.value) {
|
|
10196
10196
|
console.assert(!1);
|
|
10197
10197
|
return;
|
|
10198
10198
|
}
|
|
10199
|
-
se(u.value), await
|
|
10199
|
+
se(u.value), await Ht(e.locale), d.workspace = Ja(c.value, e.type, e.version, e.dark), d.workspace.addChangeListener(x.disableOrphans), d.workspace.addChangeListener(de);
|
|
10200
10200
|
let t = document.querySelector(`#${s} .blocklyFlyout`);
|
|
10201
10201
|
new MutationObserver((e) => {
|
|
10202
10202
|
e.forEach((e) => {
|
|
10203
10203
|
e.type === "attributes" && e.attributeName === "style" && (ue.value = d.workspace.getFlyout().isVisible());
|
|
10204
10204
|
});
|
|
10205
|
-
}).observe(t, { attributes: !0 }), ue.value = d.workspace.getFlyout().isVisible(), ge(), _e(), await
|
|
10206
|
-
}),
|
|
10205
|
+
}).observe(t, { attributes: !0 }), ue.value = d.workspace.getFlyout().isVisible(), ge(), _e(), await St(), o("ready");
|
|
10206
|
+
}), Ct(() => {
|
|
10207
10207
|
ue.value = !1;
|
|
10208
10208
|
}), Se(c, () => {
|
|
10209
10209
|
d.workspace && le(d.workspace);
|
|
10210
10210
|
});
|
|
10211
10211
|
async function de(e) {
|
|
10212
10212
|
if (e.type === x.FINISHED_LOADING) {
|
|
10213
|
-
|
|
10213
|
+
Ti(), setTimeout(() => {
|
|
10214
10214
|
te.value?.update();
|
|
10215
10215
|
}, 0), f.value = !1;
|
|
10216
10216
|
return;
|
|
@@ -10226,18 +10226,18 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10226
10226
|
}
|
|
10227
10227
|
}
|
|
10228
10228
|
let fe = (t) => {
|
|
10229
|
-
f.value = !0, e.type === "json" ?
|
|
10230
|
-
}, pe = () => e.type === "json" ?
|
|
10229
|
+
f.value = !0, e.type === "json" ? zi(t, d.workspace) : l.workspaces.load(t, d.workspace);
|
|
10230
|
+
}, pe = () => e.type === "json" ? Bi(d.workspace) : l.workspaces.save(d.workspace), me = (e) => {
|
|
10231
10231
|
l.blocks.append(e, d.workspace);
|
|
10232
10232
|
}, _ = () => {
|
|
10233
10233
|
if (e.type === "json") console.assert(!1);
|
|
10234
10234
|
else return g.workspaceToCode(d.workspace);
|
|
10235
|
-
}, he = () =>
|
|
10235
|
+
}, he = () => Pi(d.workspace), ge = () => {
|
|
10236
10236
|
d.workspace.setIsReadOnly(i.value), d.workspace.isReadOnly() && (ue.value = !1);
|
|
10237
10237
|
}, _e = () => {
|
|
10238
10238
|
d.workspace.setScale(a.value);
|
|
10239
10239
|
}, ve = () => {
|
|
10240
|
-
x.fire(new (x.get(
|
|
10240
|
+
x.fire(new (x.get(Si.STATE_CHANGE))(d.workspace));
|
|
10241
10241
|
}, ye = () => {
|
|
10242
10242
|
ee.value?.cleanWorkspace();
|
|
10243
10243
|
}, be = () => {
|
|
@@ -10245,19 +10245,19 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10245
10245
|
}, xe = () => {
|
|
10246
10246
|
te.value && (te.value.open = !0);
|
|
10247
10247
|
};
|
|
10248
|
-
return
|
|
10248
|
+
return wt(() => {
|
|
10249
10249
|
Ae.on("cleanWorkspace", ye), Ae.on("toggleBlocklyLock", be), Ae.on("openBlocklyNavigator", xe);
|
|
10250
|
-
}),
|
|
10250
|
+
}), Ct(() => {
|
|
10251
10251
|
Ae.off("cleanWorkspace", ye), Ae.off("toggleBlocklyLock", be), Ae.off("openBlocklyNavigator", xe);
|
|
10252
|
-
}),
|
|
10253
|
-
|
|
10254
|
-
}),
|
|
10255
|
-
|
|
10256
|
-
}),
|
|
10252
|
+
}), Ft(() => e.locale, (e) => {
|
|
10253
|
+
Ht(e);
|
|
10254
|
+
}), Ft(() => e.dark, (e) => {
|
|
10255
|
+
Oi(e ? "dark" : "light");
|
|
10256
|
+
}), Ft(ue, (e) => {
|
|
10257
10257
|
e || d.workspace?.hideChaff();
|
|
10258
|
-
}),
|
|
10258
|
+
}), Ft(i, () => {
|
|
10259
10259
|
ge();
|
|
10260
|
-
}),
|
|
10260
|
+
}), Ft(a, () => {
|
|
10261
10261
|
_e();
|
|
10262
10262
|
}), t({
|
|
10263
10263
|
loading: f,
|
|
@@ -10269,14 +10269,14 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10269
10269
|
fireStateChange: ve
|
|
10270
10270
|
}), (e, t) => {
|
|
10271
10271
|
let n = M("v-icon"), r = M("x-loading");
|
|
10272
|
-
return j(), D("div",
|
|
10272
|
+
return j(), D("div", Qa, [
|
|
10273
10273
|
O("div", {
|
|
10274
10274
|
id: s,
|
|
10275
10275
|
ref_key: "blocklyDiv",
|
|
10276
10276
|
ref: c,
|
|
10277
10277
|
style: A(re.value)
|
|
10278
10278
|
}, null, 4),
|
|
10279
|
-
O("div", { style: A(m.value) }, [
|
|
10279
|
+
O("div", { style: A(m.value) }, [kt(e.$slots, "bottom")], 4),
|
|
10280
10280
|
ne.value ? (j(), D("div", {
|
|
10281
10281
|
key: 0,
|
|
10282
10282
|
class: "d-flex flex-column justify-center align-center",
|
|
@@ -10284,22 +10284,22 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10284
10284
|
}, [k(n, {
|
|
10285
10285
|
icon: "mdi-delete",
|
|
10286
10286
|
size: "x-large"
|
|
10287
|
-
})], 4)) :
|
|
10288
|
-
f.value ?
|
|
10287
|
+
})], 4)) : gt("", !0),
|
|
10288
|
+
f.value ? gt("", !0) : (j(), D("div", {
|
|
10289
10289
|
key: 1,
|
|
10290
10290
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
10291
10291
|
style: A(ie.value)
|
|
10292
10292
|
}, [
|
|
10293
|
-
k(
|
|
10293
|
+
k(Ri, {
|
|
10294
10294
|
ref_key: "clean",
|
|
10295
10295
|
ref: ee,
|
|
10296
10296
|
lock: i.value
|
|
10297
10297
|
}, null, 8, ["lock"]),
|
|
10298
|
-
k(
|
|
10298
|
+
k(Vi, {
|
|
10299
10299
|
modelValue: i.value,
|
|
10300
10300
|
"onUpdate:modelValue": t[0] ||= (e) => i.value = e
|
|
10301
10301
|
}, null, 8, ["modelValue"]),
|
|
10302
|
-
k(
|
|
10302
|
+
k(Xi, {
|
|
10303
10303
|
ref_key: "navigator",
|
|
10304
10304
|
ref: te,
|
|
10305
10305
|
lock: i.value,
|
|
@@ -10309,11 +10309,11 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10309
10309
|
i.value ? (j(), D("div", {
|
|
10310
10310
|
key: 2,
|
|
10311
10311
|
style: A(oe.value)
|
|
10312
|
-
}, null, 4)) :
|
|
10312
|
+
}, null, 4)) : gt("", !0),
|
|
10313
10313
|
i.value ? (j(), D("div", {
|
|
10314
10314
|
key: 3,
|
|
10315
10315
|
style: A(ae.value)
|
|
10316
|
-
}, null, 4)) :
|
|
10316
|
+
}, null, 4)) : gt("", !0),
|
|
10317
10317
|
O("div", {
|
|
10318
10318
|
ref_key: "parentContainer",
|
|
10319
10319
|
ref: u,
|
|
@@ -10326,7 +10326,7 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10326
10326
|
]);
|
|
10327
10327
|
};
|
|
10328
10328
|
}
|
|
10329
|
-
}),
|
|
10329
|
+
}), eo = /* @__PURE__ */ _t({
|
|
10330
10330
|
__name: "index",
|
|
10331
10331
|
props: { code: {} },
|
|
10332
10332
|
setup(e) {
|
|
@@ -10335,7 +10335,7 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10335
10335
|
let n = xe.component, { backgroundColor2: r } = Fe();
|
|
10336
10336
|
return (e, i) => {
|
|
10337
10337
|
let a = M("v-sheet");
|
|
10338
|
-
return j(),
|
|
10338
|
+
return j(), ht(a, {
|
|
10339
10339
|
color: N(r),
|
|
10340
10340
|
height: "100%",
|
|
10341
10341
|
width: "100%"
|
|
@@ -10348,10 +10348,10 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10348
10348
|
}, 8, ["color"]);
|
|
10349
10349
|
};
|
|
10350
10350
|
}
|
|
10351
|
-
}),
|
|
10351
|
+
}), to = { class: "text-body-large" }, no = { class: "w-100 h-100 overflow-auto" }, ro = /* @__PURE__ */ _t({
|
|
10352
10352
|
__name: "index",
|
|
10353
10353
|
setup(e) {
|
|
10354
|
-
let { t } =
|
|
10354
|
+
let { t } = zt(), { sysBarAvail: n } = Ie(), { backgroundColor0: r, backgroundColor2: i } = Fe(), a = Dt(""), o = E(() => {
|
|
10355
10355
|
let e = 48;
|
|
10356
10356
|
return n.value && (e += 24), {
|
|
10357
10357
|
position: "relative",
|
|
@@ -10362,14 +10362,14 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10362
10362
|
});
|
|
10363
10363
|
return (e, c) => {
|
|
10364
10364
|
let l = M("v-sheet"), u = M("v-btn"), ee = M("v-spacer"), te = M("v-dialog");
|
|
10365
|
-
return j(),
|
|
10365
|
+
return j(), ht(te, {
|
|
10366
10366
|
modelValue: N(s),
|
|
10367
|
-
"onUpdate:modelValue": c[1] ||= (e) =>
|
|
10367
|
+
"onUpdate:modelValue": c[1] ||= (e) => yt(s) ? s.value = e : null,
|
|
10368
10368
|
fullscreen: "",
|
|
10369
10369
|
"no-click-animation": "",
|
|
10370
10370
|
persistent: "",
|
|
10371
10371
|
transition: "dialog-bottom-transition",
|
|
10372
|
-
onKeydown: c[2] ||= Rt(
|
|
10372
|
+
onKeydown: c[2] ||= Lt(Rt((e) => s.value = !1, ["stop", "prevent"]), ["esc"])
|
|
10373
10373
|
}, {
|
|
10374
10374
|
default: P(() => [k(l, {
|
|
10375
10375
|
color: N(r),
|
|
@@ -10377,11 +10377,11 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10377
10377
|
width: "100%"
|
|
10378
10378
|
}, {
|
|
10379
10379
|
default: P(() => [
|
|
10380
|
-
N(n) ? (j(),
|
|
10380
|
+
N(n) ? (j(), ht(l, {
|
|
10381
10381
|
key: 0,
|
|
10382
10382
|
color: N(i),
|
|
10383
10383
|
height: 24
|
|
10384
|
-
}, null, 8, ["color"])) :
|
|
10384
|
+
}, null, 8, ["color"])) : gt("", !0),
|
|
10385
10385
|
k(l, {
|
|
10386
10386
|
class: "d-flex align-center px-2",
|
|
10387
10387
|
color: N(i),
|
|
@@ -10394,12 +10394,12 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10394
10394
|
variant: "text",
|
|
10395
10395
|
onClick: c[0] ||= (e) => s.value = !1
|
|
10396
10396
|
}),
|
|
10397
|
-
O("span",
|
|
10397
|
+
O("span", to, jt(N(t)("x-block-lib.dlg.source.title")), 1),
|
|
10398
10398
|
k(ee)
|
|
10399
10399
|
]),
|
|
10400
10400
|
_: 1
|
|
10401
10401
|
}, 8, ["color"]),
|
|
10402
|
-
O("div", { style: A(o.value) }, [O("div",
|
|
10402
|
+
O("div", { style: A(o.value) }, [O("div", no, [k(eo, { code: a.value }, null, 8, ["code"])])], 4)
|
|
10403
10403
|
]),
|
|
10404
10404
|
_: 1
|
|
10405
10405
|
}, 8, ["color"])]),
|
|
@@ -10407,19 +10407,19 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10407
10407
|
}, 8, ["modelValue"]);
|
|
10408
10408
|
};
|
|
10409
10409
|
}
|
|
10410
|
-
}),
|
|
10411
|
-
e.component("XBlockly",
|
|
10410
|
+
}), io = (e) => {
|
|
10411
|
+
e.component("XBlockly", $a), e.component("XSourceDlg", ro);
|
|
10412
10412
|
};
|
|
10413
10413
|
//#endregion
|
|
10414
10414
|
//#region src/i18n/index.ts
|
|
10415
|
-
async function
|
|
10416
|
-
return (await
|
|
10417
|
-
"./locales/en/index.ts": () => import("./i18n-en.
|
|
10418
|
-
"./locales/zhHans/index.ts": () => import("./i18n-zhHans.
|
|
10415
|
+
async function ao(e) {
|
|
10416
|
+
return (await Vt(/* @__PURE__ */ Object.assign({
|
|
10417
|
+
"./locales/en/index.ts": () => import("./i18n-en.may04z0x.js").then((e) => e.t),
|
|
10418
|
+
"./locales/zhHans/index.ts": () => import("./i18n-zhHans.co0odqoc.js").then((e) => e.t)
|
|
10419
10419
|
}), `./locales/${e}/index.ts`, 4)).default;
|
|
10420
10420
|
}
|
|
10421
10421
|
//#endregion
|
|
10422
10422
|
//#region src/index.ts
|
|
10423
|
-
var
|
|
10423
|
+
var oo = { install: io };
|
|
10424
10424
|
//#endregion
|
|
10425
|
-
export {
|
|
10425
|
+
export { $a as XBlockly, oo as default, nr as getCallMethodInfo, or as getImplementMethodInfo, W as getNodeInfo, Yn as getOnEventInfo, hr as getPropertyInfo, Qn as getTriggerEventInfo, io as install, ao as loadLocaleMessageBlock };
|