x-block-lib 0.10.15 → 0.10.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +822 -823
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -10,13 +10,13 @@
|
|
|
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-a710550b]{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
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.7ekzovn9.js";
|
|
12
12
|
import { globalState as S } from "x-state-lib";
|
|
13
|
-
import { addIndent as Ae, finalProperties as C, getElement as w, getImplementMethodName as je,
|
|
14
|
-
import { eventBus as
|
|
15
|
-
import { Fragment as
|
|
16
|
-
import { useDisplay as
|
|
17
|
-
import { useI18n as
|
|
13
|
+
import { addIndent as Ae, finalProperties as C, getElement as w, getImplementMethodName as je, getItems as Me, getTag as Ne, getTypes as Pe, makeEventId as T, makeEventKeyOfCustomSlot as Fe, makeEventKeyOfElementSlot as Ie, makeMethodId as Le, makeMethodKeyOfCustomSlot as Re, makeMethodKeyOfElementSlot as ze, makePropertyId as Be, makePropertyKeyOfCustomSlot as Ve, makePropertyKeyOfElementSlot as He, makeTriggerId as Ue, parsePercent as We, parsePixel as Ge, pkgs as Ke, themeColors as qe, toEventName as Je, toMethodName as Ye, toPropertyName as Xe, unwrapEventId as Ze, unwrapEventKeyOfCustomSlot as Qe, unwrapEventKeyOfElementSlot as $e, unwrapMethodId as et, unwrapMethodKeyOfCustomSlot as tt, unwrapMethodKeyOfElementSlot as nt, unwrapPropertyId as rt, unwrapPropertyKeyOfCustomSlot as it, unwrapPropertyKeyOfElementSlot as at, unwrapSlotId as ot } from "x-runtime-lib";
|
|
14
|
+
import { eventBus as st, globalObjects as ct, messageWarning as lt, openConfirmDlg as ut, openPromptDlg as dt, useColor as ft, useSystem as pt, useViewStack as mt } from "x-essential-lib";
|
|
15
|
+
import { Fragment as ht, computed as E, createBlock as gt, createCommentVNode as _t, createElementBlock as D, createElementVNode as O, createVNode as k, defineComponent as vt, inject as yt, isRef as bt, mergeModels as xt, mergeProps as St, nextTick as Ct, normalizeStyle as A, onBeforeUnmount as wt, onMounted as Tt, onUnmounted as Et, openBlock as j, provide as Dt, ref as Ot, renderList as kt, renderSlot as At, resolveComponent as M, resolveDirective as jt, toDisplayString as Mt, unref as N, useId as Nt, useModel as Pt, useTemplateRef as Ft, watch as It, withCtx as Lt, withDirectives as Rt, withKeys as zt, withModifiers as Bt } from "vue";
|
|
16
|
+
import { useDisplay as Vt } from "vuetify";
|
|
17
|
+
import { useI18n as Ht } from "vue-i18n";
|
|
18
18
|
//#region \0rolldown_dynamic_import_helper.js
|
|
19
|
-
var
|
|
19
|
+
var Ut = (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,8 +24,8 @@ var Vt = (e, t, n) => {
|
|
|
24
24
|
};
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region src/core/locale/index.ts
|
|
27
|
-
async function
|
|
28
|
-
ce((await
|
|
27
|
+
async function Wt(e) {
|
|
28
|
+
ce((await Ut(/* @__PURE__ */ Object.assign({
|
|
29
29
|
"./msg/en.ts": () => import("./msg-en.mdggqv1h.js").then((e) => e.t),
|
|
30
30
|
"./msg/zhHans.ts": () => import("./msg-zhHans.nnp59bv2.js").then((e) => e.t)
|
|
31
31
|
}), `./msg/${e}.ts`, 3)).default);
|
|
@@ -35,12 +35,13 @@ function P(e) {
|
|
|
35
35
|
}
|
|
36
36
|
//#endregion
|
|
37
37
|
//#region src/core/utils/common/misc.ts
|
|
38
|
-
var
|
|
39
|
-
function
|
|
38
|
+
var Gt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", Kt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
|
|
39
|
+
function qt(e) {
|
|
40
40
|
let t = e.lastIndexOf("V");
|
|
41
|
-
|
|
41
|
+
if (t <= 0 || t >= e.length - 1) throw Error("must has V");
|
|
42
|
+
return `${pe(e.substring(0, t))}_${"v" + e.substring(t + 1)}`;
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
+
function Jt(e) {
|
|
44
45
|
let t = e.lastIndexOf("V");
|
|
45
46
|
if (t <= 0 || t >= e.length - 1) return console.assert(!1, `invalid key=${e}`), "";
|
|
46
47
|
let n = e.substring(0, t - 1);
|
|
@@ -49,15 +50,15 @@ function Kt(e) {
|
|
|
49
50
|
function F(e) {
|
|
50
51
|
return e.length <= 0 && e.push([P("NO_OPTION"), ""]), e;
|
|
51
52
|
}
|
|
52
|
-
function
|
|
53
|
+
function Yt(e) {
|
|
53
54
|
let t = 0;
|
|
54
55
|
for (; e;) t++, e = e.getParent();
|
|
55
56
|
return t;
|
|
56
57
|
}
|
|
57
|
-
function
|
|
58
|
+
function Xt(e) {
|
|
58
59
|
return e.ui === "strInput" ? "string" : e.ui === "numInput" ? "number" : e.ui === "switch" ? "boolean" : "string";
|
|
59
60
|
}
|
|
60
|
-
function
|
|
61
|
+
function Zt(e, t) {
|
|
61
62
|
return !!(e.startsWith("basic.") || !t.ui || t.readonly);
|
|
62
63
|
}
|
|
63
64
|
function I(e) {
|
|
@@ -75,49 +76,49 @@ function z(e) {
|
|
|
75
76
|
function B(e) {
|
|
76
77
|
return e.startsWith("multiple_slot_v");
|
|
77
78
|
}
|
|
78
|
-
function
|
|
79
|
-
let { kind: r, mainKey: i, slotKey: a } =
|
|
79
|
+
function Qt(e, t, n) {
|
|
80
|
+
let { kind: r, mainKey: i, slotKey: a } = ot(e);
|
|
80
81
|
return !(r !== "elementSlot" && r !== "multipleElementSlot" || t !== i || n !== a);
|
|
81
82
|
}
|
|
82
|
-
function
|
|
83
|
-
let { kind: r, mainKey: i, slotKey: a } =
|
|
83
|
+
function $t(e, t, n) {
|
|
84
|
+
let { kind: r, mainKey: i, slotKey: a } = ot(e);
|
|
84
85
|
return !(r !== "customSlot" && r !== "multipleCustomSlot" || t !== i || n !== a);
|
|
85
86
|
}
|
|
86
87
|
//#endregion
|
|
87
88
|
//#region src/core/utils/common/block.ts
|
|
88
|
-
function
|
|
89
|
+
function en(e) {
|
|
89
90
|
let t = `<block type="text_v1"><field name="TEXT">${e}</field></block>`;
|
|
90
91
|
return p.xml.textToDom(t);
|
|
91
92
|
}
|
|
92
|
-
function
|
|
93
|
+
function tn(e) {
|
|
93
94
|
let t = `<block type="math_number_v1"><field name="NUM">${e}</field></block>`;
|
|
94
95
|
return p.xml.textToDom(t);
|
|
95
96
|
}
|
|
96
|
-
function
|
|
97
|
+
function nn(e) {
|
|
97
98
|
let t = `<block type="logic_boolean_v1"><field name="BOOL">${e ? "TRUE" : "FALSE"}</field></block>`;
|
|
98
99
|
return p.xml.textToDom(t);
|
|
99
100
|
}
|
|
100
|
-
function
|
|
101
|
+
function rn(e, t) {
|
|
101
102
|
let n = null;
|
|
102
|
-
return t === "string" ? n =
|
|
103
|
+
return t === "string" ? n = en("") : t === "integer" || t === "decimal" ? n = tn(0) : t === "boolean" ? n = nn(!1) : t === "enum" || t === "dateTime" ? n = en("") : console.assert(!1), n ? re.domToBlock(n, e) : null;
|
|
103
104
|
}
|
|
104
105
|
//#endregion
|
|
105
106
|
//#region src/core/utils/common/check.ts
|
|
106
|
-
function
|
|
107
|
+
function an(e) {
|
|
107
108
|
return e === "string" ? "String" : e === "number" ? "Number" : e === "boolean" ? "Boolean" : e === "array" ? "Array" : e === "object" ? "Object" : (e === "any" || console.assert(!1), null);
|
|
108
109
|
}
|
|
109
|
-
function
|
|
110
|
-
return e.array ? "Array" : e.ui === "dummy" ? null : e.ui === "strInput" ? "String" : e.ui === "numInput" ? "Number" : e.ui === "switch" ? "Boolean" : e.ui === "select" ?
|
|
110
|
+
function on(e) {
|
|
111
|
+
return e.array ? "Array" : e.ui === "dummy" ? null : e.ui === "strInput" ? "String" : e.ui === "numInput" ? "Number" : e.ui === "switch" ? "Boolean" : e.ui === "select" ? Jt(e.items) : e.ui === "multiTypes" ? Jt(e.types) : e.ui === "selectComp" ? "Comp" : e.ui === "selectSlot" ? "Slot" : e.ui === "selectAdaptSlot" ? "AdaptSlot" : e.ui === "colorPicker" ? "Color" : (console.assert(!1), null);
|
|
111
112
|
}
|
|
112
|
-
function
|
|
113
|
+
function sn(e) {
|
|
113
114
|
return e === "string" ? "String" : e === "integer" || e === "decimal" ? "Number" : e === "boolean" ? "Boolean" : e === "enum" || e === "dateTime" ? "String" : (console.assert(!1), null);
|
|
114
115
|
}
|
|
115
116
|
//#endregion
|
|
116
117
|
//#region src/core/utils/common/colour.ts
|
|
117
|
-
var
|
|
118
|
+
var cn = /* @__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(".");
|
|
118
119
|
//#endregion
|
|
119
120
|
//#region src/core/utils/common/parameter.ts
|
|
120
|
-
function
|
|
121
|
+
function ln(e, t, n, r) {
|
|
121
122
|
let i = `
|
|
122
123
|
<block type="parameter_v1">
|
|
123
124
|
<mutation key="${t}" name="${n}" locale="${r ? "TRUE" : "FALSE"}"/>
|
|
@@ -136,7 +137,7 @@ function V(e, t) {
|
|
|
136
137
|
if (e && e.key === r && e.name === i && e.locale === a) return;
|
|
137
138
|
s.dispose();
|
|
138
139
|
}
|
|
139
|
-
s =
|
|
140
|
+
s = ln(e.workspace, r, i, a), s.outputConnection.connect(o);
|
|
140
141
|
});
|
|
141
142
|
} finally {
|
|
142
143
|
x.enable();
|
|
@@ -144,56 +145,56 @@ function V(e, t) {
|
|
|
144
145
|
}
|
|
145
146
|
//#endregion
|
|
146
147
|
//#region src/core/utils/common/shadow.ts
|
|
147
|
-
function
|
|
148
|
+
function un(e) {
|
|
148
149
|
let t = `<shadow type="text_v1"><field name="TEXT">${e}</field></shadow>`;
|
|
149
150
|
return p.xml.textToDom(t);
|
|
150
151
|
}
|
|
151
|
-
function
|
|
152
|
+
function dn(e) {
|
|
152
153
|
let t = `<shadow type="math_number_v1"><field name="NUM">${e}</field></shadow>`;
|
|
153
154
|
return p.xml.textToDom(t);
|
|
154
155
|
}
|
|
155
|
-
function
|
|
156
|
+
function fn(e) {
|
|
156
157
|
let t = `<shadow type="logic_boolean_v1"><field name="BOOL">${e ? "TRUE" : "FALSE"}</field></shadow>`;
|
|
157
158
|
return p.xml.textToDom(t);
|
|
158
159
|
}
|
|
159
|
-
function
|
|
160
|
+
function pn() {
|
|
160
161
|
return p.xml.textToDom("<shadow type=\"list_create_v1\"></shadow>");
|
|
161
162
|
}
|
|
162
|
-
function
|
|
163
|
+
function mn() {
|
|
163
164
|
return p.xml.textToDom("<shadow type=\"object_create_v1\"></shadow>");
|
|
164
165
|
}
|
|
165
|
-
function
|
|
166
|
-
let t = `<shadow type="${
|
|
166
|
+
function hn(e) {
|
|
167
|
+
let t = `<shadow type="${qt(e)}"></shadow>`;
|
|
167
168
|
return p.xml.textToDom(t);
|
|
168
169
|
}
|
|
169
|
-
function
|
|
170
|
-
let t = `<shadow type="${
|
|
170
|
+
function gn(e) {
|
|
171
|
+
let t = `<shadow type="${qt(e)}"></shadow>`;
|
|
171
172
|
return p.xml.textToDom(t);
|
|
172
173
|
}
|
|
173
|
-
function
|
|
174
|
+
function _n() {
|
|
174
175
|
return p.xml.textToDom("<shadow type=\"select_comp_v1\"></shadow>");
|
|
175
176
|
}
|
|
176
|
-
function
|
|
177
|
+
function vn() {
|
|
177
178
|
return p.xml.textToDom("<shadow type=\"select_slot_v1\"></shadow>");
|
|
178
179
|
}
|
|
179
|
-
function
|
|
180
|
+
function yn(e) {
|
|
180
181
|
let t = `<shadow type="color_picker_v1"><field name="COLOR">${e}</field></shadow>`;
|
|
181
182
|
return p.xml.textToDom(t);
|
|
182
183
|
}
|
|
183
|
-
function
|
|
184
|
+
function bn() {
|
|
184
185
|
return p.xml.textToDom("\n<shadow type=\"app_bind_entry_v1\">\n <field name=\"KIND\">notSet</field>\n</shadow>");
|
|
185
186
|
}
|
|
186
187
|
function H(e) {
|
|
187
188
|
let t = null;
|
|
188
|
-
return e === "string" ? t =
|
|
189
|
+
return e === "string" ? t = un("") : e === "number" ? t = dn(0) : e === "boolean" ? t = fn(!1) : e === "array" ? t = pn() : e === "object" ? t = mn() : e === "any" ? t = null : console.assert(!1), t;
|
|
189
190
|
}
|
|
190
|
-
function
|
|
191
|
+
function xn(e) {
|
|
191
192
|
let t = null;
|
|
192
|
-
return e.array ? t =
|
|
193
|
+
return e.array ? t = pn() : e.ui === "dummy" ? t = null : e.ui === "strInput" ? t = un(e.default) : e.ui === "numInput" ? t = dn(e.default) : e.ui === "switch" ? t = fn(e.default) : e.ui === "select" ? t = hn(e.items) : e.ui === "multiTypes" ? t = gn(e.types) : e.ui === "selectComp" ? t = _n() : e.ui === "selectSlot" ? t = vn() : e.ui === "colorPicker" ? t = yn(e.default ?? "#ff0000") : console.assert(!1), t;
|
|
193
194
|
}
|
|
194
195
|
//#endregion
|
|
195
196
|
//#region src/core/utils/app/argument.ts
|
|
196
|
-
function
|
|
197
|
+
function Sn() {
|
|
197
198
|
let { activeObject: e, activePage: t } = S.app, n = [];
|
|
198
199
|
if (e.type === "page" && t.meta.arguments) for (let { id: e, name: r, type: i } of t.meta.arguments) n.push({
|
|
199
200
|
key: e,
|
|
@@ -202,7 +203,7 @@ function bn() {
|
|
|
202
203
|
});
|
|
203
204
|
return n;
|
|
204
205
|
}
|
|
205
|
-
function
|
|
206
|
+
function Cn(e) {
|
|
206
207
|
let { activeObject: t, activePage: n } = S.app;
|
|
207
208
|
if (t.type === "page") {
|
|
208
209
|
let t = n.meta.arguments?.find((t) => t.id === e);
|
|
@@ -213,9 +214,9 @@ function xn(e) {
|
|
|
213
214
|
};
|
|
214
215
|
}
|
|
215
216
|
}
|
|
216
|
-
function
|
|
217
|
+
function wn() {
|
|
217
218
|
let e = [];
|
|
218
|
-
return
|
|
219
|
+
return Sn().forEach(({ key: t, name: n }) => {
|
|
219
220
|
e.push([n, t]);
|
|
220
221
|
}), F(e);
|
|
221
222
|
}
|
|
@@ -236,7 +237,7 @@ y.get_page_argument_v1 = {
|
|
|
236
237
|
}, 0);
|
|
237
238
|
},
|
|
238
239
|
genArgumentOpts_: function() {
|
|
239
|
-
return
|
|
240
|
+
return wn();
|
|
240
241
|
},
|
|
241
242
|
onchange: function(e) {
|
|
242
243
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -247,7 +248,7 @@ y.get_page_argument_v1 = {
|
|
|
247
248
|
}
|
|
248
249
|
},
|
|
249
250
|
onArgumentChange_: function(e) {
|
|
250
|
-
let t =
|
|
251
|
+
let t = Cn(e);
|
|
251
252
|
if (!t) {
|
|
252
253
|
console.assert(!1);
|
|
253
254
|
return;
|
|
@@ -255,10 +256,10 @@ y.get_page_argument_v1 = {
|
|
|
255
256
|
this.argument.key = t.key, this.argument.name = t.name, this.argument.type = t.type, this.updateShape_();
|
|
256
257
|
},
|
|
257
258
|
updateShape_: function() {
|
|
258
|
-
this.setOutput(!0,
|
|
259
|
+
this.setOutput(!0, an(this.argument.type));
|
|
259
260
|
},
|
|
260
261
|
checkWarning_: function() {
|
|
261
|
-
let e =
|
|
262
|
+
let e = Cn(this.argument.key);
|
|
262
263
|
if (!e) {
|
|
263
264
|
this.setWarningText(P("WARN_ARGUMENT_NOT_FOUND"));
|
|
264
265
|
return;
|
|
@@ -275,14 +276,14 @@ y.get_page_argument_v1 = {
|
|
|
275
276
|
};
|
|
276
277
|
//#endregion
|
|
277
278
|
//#region src/core/blocks/app/define/items/v1/index.ts
|
|
278
|
-
var
|
|
279
|
-
let n =
|
|
279
|
+
var Tn = (e, t) => {
|
|
280
|
+
let n = qt(e), r = Jt(e);
|
|
280
281
|
y[n] = {
|
|
281
282
|
init: function() {
|
|
282
283
|
this.appendDummyInput().appendField(new b(() => this.genOpts_()), "ITEM"), this.setOutput(!0, r), this.setStyle("property_blocks"), this.setTooltip(""), this.setHelpUrl("");
|
|
283
284
|
},
|
|
284
285
|
genOpts_: function() {
|
|
285
|
-
let { i18n: e } =
|
|
286
|
+
let { i18n: e } = ct, n = [];
|
|
286
287
|
for (let { title: r, value: i } of t) n.push([e.global.t(r), i]);
|
|
287
288
|
return F(n);
|
|
288
289
|
}
|
|
@@ -291,14 +292,14 @@ var Cn = (e, t) => {
|
|
|
291
292
|
return [t(e.getFieldValue("ITEM")), _.ATOMIC];
|
|
292
293
|
};
|
|
293
294
|
};
|
|
294
|
-
for (let e in
|
|
295
|
-
let t =
|
|
296
|
-
for (let e
|
|
295
|
+
for (let e in Ke) {
|
|
296
|
+
let t = Ke[e];
|
|
297
|
+
for (let e of t.items) Tn(e, Me(e));
|
|
297
298
|
}
|
|
298
299
|
//#endregion
|
|
299
300
|
//#region src/core/blocks/app/define/types/v1/index.ts
|
|
300
|
-
var
|
|
301
|
-
let n =
|
|
301
|
+
var En = ye(), Dn = (e, t) => {
|
|
302
|
+
let n = qt(e), i = Jt(e);
|
|
302
303
|
y[n] = {
|
|
303
304
|
init: function() {
|
|
304
305
|
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_();
|
|
@@ -312,7 +313,7 @@ var wn = ye(), Tn = (e, t) => {
|
|
|
312
313
|
}, 0);
|
|
313
314
|
},
|
|
314
315
|
genOpts_: function() {
|
|
315
|
-
let { i18n: e } =
|
|
316
|
+
let { i18n: e } = ct, n = [];
|
|
316
317
|
for (let { title: r, value: i } of t) n.push([e.global.t(r), i]);
|
|
317
318
|
return F(n);
|
|
318
319
|
},
|
|
@@ -339,23 +340,23 @@ var wn = ye(), Tn = (e, t) => {
|
|
|
339
340
|
if (!n) return;
|
|
340
341
|
e.removeField("VALUE", !0), e.removeField("SUFFIX", !0);
|
|
341
342
|
let i, a;
|
|
342
|
-
if (n.trait === "pixel") i = new r(
|
|
343
|
+
if (n.trait === "pixel") i = new r(Ge(this.value) ?? 0, n.min, n.max, n.precision ? 1 / 10 ** n.precision : null, (e) => {
|
|
343
344
|
this.value = e + "px";
|
|
344
345
|
}), a = "px";
|
|
345
|
-
else if (n.trait === "percent") i = new r(
|
|
346
|
+
else if (n.trait === "percent") i = new r(We(this.value) ?? 0, n.min, n.max, n.precision ? 1 / 10 ** n.precision : null, (e) => {
|
|
346
347
|
this.value = e + "%";
|
|
347
348
|
}), a = "%";
|
|
348
|
-
else if (n.trait === "hexColor") i = new
|
|
349
|
+
else if (n.trait === "hexColor") i = new En.FieldColour(this.value, (e) => {
|
|
349
350
|
this.value = e;
|
|
350
351
|
}, {
|
|
351
|
-
colourOptions:
|
|
352
|
+
colourOptions: cn,
|
|
352
353
|
columns: 14
|
|
353
354
|
});
|
|
354
355
|
else if (n.trait === "themeColor") {
|
|
355
|
-
let { i18n: e } =
|
|
356
|
+
let { i18n: e } = ct;
|
|
356
357
|
i = new b(() => {
|
|
357
358
|
let t = [];
|
|
358
|
-
for (let { value: n, title: r } of
|
|
359
|
+
for (let { value: n, title: r } of qe) t.push([e.global.t(r), n]);
|
|
359
360
|
return t;
|
|
360
361
|
}, (e) => {
|
|
361
362
|
this.value = e;
|
|
@@ -375,13 +376,13 @@ var wn = ye(), Tn = (e, t) => {
|
|
|
375
376
|
return [t(e.value), _.ATOMIC];
|
|
376
377
|
};
|
|
377
378
|
};
|
|
378
|
-
for (let e in
|
|
379
|
-
let t =
|
|
380
|
-
for (let e
|
|
379
|
+
for (let e in Ke) {
|
|
380
|
+
let t = Ke[e];
|
|
381
|
+
for (let e of t.types) Dn(e, Pe(e));
|
|
381
382
|
}
|
|
382
383
|
//#endregion
|
|
383
384
|
//#region src/core/utils/app/app.ts
|
|
384
|
-
function
|
|
385
|
+
function On() {
|
|
385
386
|
let e = [], { appList: t } = S.app;
|
|
386
387
|
for (let { id: n, name: r } of t) e.push({
|
|
387
388
|
id: n,
|
|
@@ -389,26 +390,26 @@ function En() {
|
|
|
389
390
|
});
|
|
390
391
|
return e;
|
|
391
392
|
}
|
|
392
|
-
function
|
|
393
|
+
function kn(e) {
|
|
393
394
|
let { appList: t } = S.app, n = t.find((t) => t.id === e);
|
|
394
395
|
if (n) return {
|
|
395
396
|
id: n.id,
|
|
396
397
|
name: n.name
|
|
397
398
|
};
|
|
398
399
|
}
|
|
399
|
-
function
|
|
400
|
+
function An() {
|
|
400
401
|
let e = [];
|
|
401
|
-
return
|
|
402
|
+
return On().forEach(({ id: t, name: n }) => {
|
|
402
403
|
e.push([n, t]);
|
|
403
404
|
}), F(e);
|
|
404
405
|
}
|
|
405
406
|
//#endregion
|
|
406
407
|
//#region src/core/utils/app/node.ts
|
|
407
|
-
function
|
|
408
|
+
function jn(e, t, n, r, i) {
|
|
408
409
|
let { activeObject: a, activePage: o, activeComp: s, depends: c } = S.app;
|
|
409
410
|
if (e.events && e.events.length > 0) return !1;
|
|
410
411
|
if (C[e.key] && C[e.key][t]) {
|
|
411
|
-
for (let { keys: n, raw: r } of C[e.key][t]) if (!
|
|
412
|
+
for (let { keys: n, raw: r } of C[e.key][t]) if (!Zt(n, r)) return !1;
|
|
412
413
|
}
|
|
413
414
|
if (L(e.key) && r) {
|
|
414
415
|
let e = c[r];
|
|
@@ -444,7 +445,7 @@ function kn(e, t, n, r, i) {
|
|
|
444
445
|
}
|
|
445
446
|
if (I(e.key) && a.type === "comp" && s.meta.events && s.meta.events.length > 0 || I(e.key) && a.type === "comp" && s.meta.properties && s.meta.properties.length > 0) return !1;
|
|
446
447
|
if (I(e.key) && a.type === "comp" && i) {
|
|
447
|
-
let { kind: e, mainKey: t, slotKey: n } =
|
|
448
|
+
let { kind: e, mainKey: t, slotKey: n } = ot(i);
|
|
448
449
|
if (e === "elementSlot") {
|
|
449
450
|
let e = w(t);
|
|
450
451
|
if (e && e.slots) {
|
|
@@ -466,7 +467,7 @@ function kn(e, t, n, r, i) {
|
|
|
466
467
|
}
|
|
467
468
|
return !0;
|
|
468
469
|
}
|
|
469
|
-
function
|
|
470
|
+
function Mn(e, t) {
|
|
470
471
|
let { activeObject: n, activeComp: r } = S.app;
|
|
471
472
|
if (z(e.key) && t && n.type === "comp" && r.meta.slots) {
|
|
472
473
|
let e = r.meta.slots.find((e) => e.id === t);
|
|
@@ -478,7 +479,7 @@ function An(e, t) {
|
|
|
478
479
|
}
|
|
479
480
|
return !(I(e.key) && n.type === "comp" && r.meta.events && r.meta.events.length > 0);
|
|
480
481
|
}
|
|
481
|
-
function
|
|
482
|
+
function Nn(e, t, n) {
|
|
482
483
|
let { activeObject: r, activeComp: i, depends: a } = S.app;
|
|
483
484
|
if (e.methods && e.methods.length > 0) return !1;
|
|
484
485
|
if (L(e.key) && t) {
|
|
@@ -491,7 +492,7 @@ function jn(e, t, n) {
|
|
|
491
492
|
}
|
|
492
493
|
if (I(e.key) && r.type === "comp" && i.meta.methods && i.meta.methods.length > 0) return !1;
|
|
493
494
|
if (I(e.key) && n && r.type === "comp") {
|
|
494
|
-
let { kind: e, mainKey: t, slotKey: r } =
|
|
495
|
+
let { kind: e, mainKey: t, slotKey: r } = ot(n);
|
|
495
496
|
if (e === "elementSlot") {
|
|
496
497
|
let e = w(t);
|
|
497
498
|
if (e && e.slots) {
|
|
@@ -508,7 +509,7 @@ function jn(e, t, n) {
|
|
|
508
509
|
}
|
|
509
510
|
return !0;
|
|
510
511
|
}
|
|
511
|
-
function
|
|
512
|
+
function Pn(e, t) {
|
|
512
513
|
let { activeObject: n, activeComp: r } = S.app;
|
|
513
514
|
if (z(e.key) && t && n.type === "comp" && r.meta.slots) {
|
|
514
515
|
let e = r.meta.slots.find((e) => e.id === t);
|
|
@@ -520,7 +521,7 @@ function Mn(e, t) {
|
|
|
520
521
|
}
|
|
521
522
|
return !(I(e.key) && n.type === "comp" && r.meta.methods && r.meta.methods.length > 0);
|
|
522
523
|
}
|
|
523
|
-
function
|
|
524
|
+
function Fn(e, t) {
|
|
524
525
|
let { activeObject: n, activeComp: r } = S.app;
|
|
525
526
|
if (z(e.key) && t && n.type === "comp" && r.meta.slots) {
|
|
526
527
|
let e = r.meta.slots.find((e) => e.id === t);
|
|
@@ -539,7 +540,7 @@ function Nn(e, t) {
|
|
|
539
540
|
}
|
|
540
541
|
return !0;
|
|
541
542
|
}
|
|
542
|
-
function
|
|
543
|
+
function In(e, t, n, r, i) {
|
|
543
544
|
let { activeObject: a, activeComp: o, depends: s } = S.app;
|
|
544
545
|
if (C[e.key] && C[e.key][t] && C[e.key][t].length > 0) return !1;
|
|
545
546
|
if (L(e.key) && r) {
|
|
@@ -560,7 +561,7 @@ function Pn(e, t, n, r, i) {
|
|
|
560
561
|
}
|
|
561
562
|
if (I(e.key) && a.type === "comp" && o.meta.properties && o.meta.properties.length > 0) return !1;
|
|
562
563
|
if (I(e.key) && i && a.type === "comp") {
|
|
563
|
-
let { kind: e, mainKey: t, slotKey: n } =
|
|
564
|
+
let { kind: e, mainKey: t, slotKey: n } = ot(i);
|
|
564
565
|
if (e === "elementSlot") {
|
|
565
566
|
let e = w(t);
|
|
566
567
|
if (e && e.slots) {
|
|
@@ -577,10 +578,10 @@ function Pn(e, t, n, r, i) {
|
|
|
577
578
|
}
|
|
578
579
|
return !0;
|
|
579
580
|
}
|
|
580
|
-
function
|
|
581
|
+
function Ln(e, t, n, r, i) {
|
|
581
582
|
let { activeObject: a, activeComp: o, depends: s } = S.app;
|
|
582
583
|
if (C[e.key] && C[e.key][t]) {
|
|
583
|
-
for (let { keys: n, raw: r } of C[e.key][t]) if (!
|
|
584
|
+
for (let { keys: n, raw: r } of C[e.key][t]) if (!Zt(n, r)) return !1;
|
|
584
585
|
}
|
|
585
586
|
if (L(e.key) && r) {
|
|
586
587
|
let e = s[r];
|
|
@@ -600,7 +601,7 @@ function Fn(e, t, n, r, i) {
|
|
|
600
601
|
}
|
|
601
602
|
if (I(e.key) && a.type === "comp" && o.meta.properties && o.meta.properties.length > 0) return !1;
|
|
602
603
|
if (I(e.key) && i && a.type === "comp") {
|
|
603
|
-
let { kind: e, mainKey: t, slotKey: n } =
|
|
604
|
+
let { kind: e, mainKey: t, slotKey: n } = ot(i);
|
|
604
605
|
if (e === "elementSlot") {
|
|
605
606
|
let e = w(t);
|
|
606
607
|
if (e && e.slots) {
|
|
@@ -617,30 +618,30 @@ function Fn(e, t, n, r, i) {
|
|
|
617
618
|
}
|
|
618
619
|
return !0;
|
|
619
620
|
}
|
|
620
|
-
function
|
|
621
|
-
return e ? e === "onEvent" ?
|
|
621
|
+
function Rn(e, t, n, r, i, a) {
|
|
622
|
+
return e ? e === "onEvent" ? jn(t, n, r, i, a) : e === "triggerEvent" ? Mn(t, r) : e === "callMethod" ? Nn(t, i, a) : e === "implementMethod" ? Pn(t, r) : e === "implementMethodOutput" ? Fn(t, r) : e === "getProperty" ? In(t, n, r, i, a) : e === "setProperty" ? Ln(t, n, r, i, a) : !1 : !1;
|
|
622
623
|
}
|
|
623
624
|
function U(e) {
|
|
624
|
-
let { activeObject: t } = S.app, n =
|
|
625
|
+
let { activeObject: t } = S.app, n = Ne(t.type, t.subtype);
|
|
625
626
|
for (let r of t.nodes) {
|
|
626
627
|
let t = w(r.key);
|
|
627
628
|
if (!t) {
|
|
628
629
|
console.assert(!1, "invalid element", r.key);
|
|
629
630
|
continue;
|
|
630
631
|
}
|
|
631
|
-
if (!
|
|
632
|
+
if (!Rn(e, t, n, r.slot, r.comp, r.adaptSlot)) return !0;
|
|
632
633
|
}
|
|
633
634
|
return !1;
|
|
634
635
|
}
|
|
635
|
-
function
|
|
636
|
-
let { activeObject: t } = S.app, n = [], r =
|
|
636
|
+
function zn(e) {
|
|
637
|
+
let { activeObject: t } = S.app, n = [], r = Ne(t.type, t.subtype);
|
|
637
638
|
for (let i of t.nodes) {
|
|
638
639
|
let t = w(i.key);
|
|
639
640
|
if (!t) {
|
|
640
641
|
console.assert(!1, "invalid element", i.key);
|
|
641
642
|
continue;
|
|
642
643
|
}
|
|
643
|
-
|
|
644
|
+
Rn(e, t, r, i.slot, i.comp, i.adaptSlot) || n.push({
|
|
644
645
|
id: i.id,
|
|
645
646
|
key: i.key,
|
|
646
647
|
name: t.name,
|
|
@@ -664,8 +665,8 @@ function W(e) {
|
|
|
664
665
|
alias: n.alias
|
|
665
666
|
};
|
|
666
667
|
}
|
|
667
|
-
function
|
|
668
|
-
let { i18n: t } =
|
|
668
|
+
function Bn(e) {
|
|
669
|
+
let { i18n: t } = ct, n = [], r = zn(e);
|
|
669
670
|
for (let { id: e, name: i, alias: a } of r) {
|
|
670
671
|
let r = t.global.t(i);
|
|
671
672
|
a && (r += " / " + a), n.push([r, e]);
|
|
@@ -674,33 +675,33 @@ function Rn(e) {
|
|
|
674
675
|
}
|
|
675
676
|
//#endregion
|
|
676
677
|
//#region src/core/utils/app/state.ts
|
|
677
|
-
function
|
|
678
|
+
function Vn() {
|
|
678
679
|
let { activeObject: e, activePage: t, activeComp: n } = S.app;
|
|
679
680
|
return e.type === "page" ? t.meta.states ?? [] : e.type === "comp" ? n.meta.states ?? [] : [];
|
|
680
681
|
}
|
|
681
|
-
function
|
|
682
|
+
function Hn(e) {
|
|
682
683
|
let { activeObject: t, activePage: n, activeComp: r } = S.app;
|
|
683
684
|
if (t.type === "page") return n.meta.states?.find((t) => t.id === e);
|
|
684
685
|
if (t.type === "comp") return r.meta.states?.find((t) => t.id === e);
|
|
685
686
|
}
|
|
686
|
-
function
|
|
687
|
-
let e = [], t =
|
|
687
|
+
function Un() {
|
|
688
|
+
let e = [], t = Vn();
|
|
688
689
|
for (let { id: n, name: r } of t) e.push([r, n]);
|
|
689
690
|
return F(e);
|
|
690
691
|
}
|
|
691
692
|
//#endregion
|
|
692
693
|
//#region src/core/utils/app/bind.ts
|
|
693
|
-
function
|
|
694
|
+
function Wn() {
|
|
694
695
|
let e = ["notSet"];
|
|
695
|
-
return
|
|
696
|
+
return zn("setProperty").length > 0 && e.push("property"), Vn().length > 0 && e.push("state"), e;
|
|
696
697
|
}
|
|
697
|
-
function
|
|
698
|
-
let { i18n: e } =
|
|
699
|
-
return F(
|
|
698
|
+
function Gn() {
|
|
699
|
+
let { i18n: e } = ct;
|
|
700
|
+
return F(Wn().map((t) => t === "notSet" ? [e.global.t(`x-runtime-lib.${t}`), t] : [P(`APP_${De(t)}`), t]));
|
|
700
701
|
}
|
|
701
702
|
//#endregion
|
|
702
703
|
//#region src/core/utils/app/comp.ts
|
|
703
|
-
function
|
|
704
|
+
function Kn() {
|
|
704
705
|
let { activeApp: e } = S.app, t = [{
|
|
705
706
|
id: "",
|
|
706
707
|
name: ""
|
|
@@ -711,7 +712,7 @@ function Wn() {
|
|
|
711
712
|
});
|
|
712
713
|
return t;
|
|
713
714
|
}
|
|
714
|
-
function
|
|
715
|
+
function qn(e) {
|
|
715
716
|
let { activeApp: t } = S.app;
|
|
716
717
|
if (!e) return {
|
|
717
718
|
id: "",
|
|
@@ -723,9 +724,9 @@ function Gn(e) {
|
|
|
723
724
|
name: n.name
|
|
724
725
|
};
|
|
725
726
|
}
|
|
726
|
-
function
|
|
727
|
-
let { i18n: e } =
|
|
728
|
-
return
|
|
727
|
+
function Jn() {
|
|
728
|
+
let { i18n: e } = ct, t = [];
|
|
729
|
+
return Kn().forEach(({ id: n, name: r }) => {
|
|
729
730
|
let i = r;
|
|
730
731
|
n === "" && (i = e.global.t("x-runtime-lib.notSet")), t.push([i, n]);
|
|
731
732
|
}), F(t);
|
|
@@ -753,7 +754,7 @@ function K(e) {
|
|
|
753
754
|
type: e
|
|
754
755
|
}];
|
|
755
756
|
}
|
|
756
|
-
function
|
|
757
|
+
function Yn(e) {
|
|
757
758
|
let t = !0;
|
|
758
759
|
switch (e) {
|
|
759
760
|
case "": break;
|
|
@@ -794,8 +795,8 @@ function qn(e) {
|
|
|
794
795
|
}
|
|
795
796
|
return t;
|
|
796
797
|
}
|
|
797
|
-
function
|
|
798
|
-
let { activeObject: t, activePage: n, activeComp: r, depends: i } = S.app, a = [], o =
|
|
798
|
+
function Xn(e) {
|
|
799
|
+
let { activeObject: t, activePage: n, activeComp: r, depends: i } = S.app, a = [], o = Ne(t.type, t.subtype), s = t.nodes.find((t) => t.id === e);
|
|
799
800
|
if (!s) return a;
|
|
800
801
|
let c = w(s.key);
|
|
801
802
|
if (!c) return console.assert(!1, "invalid element", s.key), a;
|
|
@@ -805,11 +806,11 @@ function Jn(e) {
|
|
|
805
806
|
names: [n],
|
|
806
807
|
params: r
|
|
807
808
|
});
|
|
808
|
-
if (C[c.key] && C[c.key][o]) for (let { keys: t, names: n, raw: r } of C[c.key][o])
|
|
809
|
+
if (C[c.key] && C[c.key][o]) for (let { keys: t, names: n, raw: r } of C[c.key][o]) Zt(t, r) || a.push({
|
|
809
810
|
id: T("elementPropertyChangeEvent", e, t),
|
|
810
811
|
kind: "elementPropertyChangeEvent",
|
|
811
812
|
names: n,
|
|
812
|
-
params: K(
|
|
813
|
+
params: K(Xt(r))
|
|
813
814
|
});
|
|
814
815
|
if (L(c.key) && s.comp) {
|
|
815
816
|
let t = i[s.comp];
|
|
@@ -850,7 +851,7 @@ function Jn(e) {
|
|
|
850
851
|
if (z(c.key) && s.slot && t.type === "comp" && r.meta.slots) {
|
|
851
852
|
let t = r.meta.slots.find((e) => e.id === s.slot);
|
|
852
853
|
if (t && t.events) for (let n of t.events) a.push({
|
|
853
|
-
id: T("customSlotEvent", e,
|
|
854
|
+
id: T("customSlotEvent", e, Fe(r.id, t.id, n.id)),
|
|
854
855
|
kind: "customSlotEvent",
|
|
855
856
|
names: [t.name, n.name],
|
|
856
857
|
params: G(n.params)
|
|
@@ -859,7 +860,7 @@ function Jn(e) {
|
|
|
859
860
|
if (z(c.key) && s.slot && t.type === "comp" && r.meta.slots) {
|
|
860
861
|
let t = r.meta.slots.find((e) => e.id === s.slot);
|
|
861
862
|
if (t && t.properties) for (let n of t.properties) a.push({
|
|
862
|
-
id: T("customSlotPropertyChangeEvent", e,
|
|
863
|
+
id: T("customSlotPropertyChangeEvent", e, Ve(r.id, t.id, n.id)),
|
|
863
864
|
kind: "customSlotPropertyChangeEvent",
|
|
864
865
|
names: [t.name, n.name],
|
|
865
866
|
params: K(n.type)
|
|
@@ -868,7 +869,7 @@ function Jn(e) {
|
|
|
868
869
|
if (B(c.key) && s.slot && t.type === "comp" && r.meta.slots) {
|
|
869
870
|
let t = r.meta.slots.find((e) => e.id === s.slot);
|
|
870
871
|
if (t && t.events) for (let n of t.events) a.push({
|
|
871
|
-
id: T("multipleCustomSlotEvent", e,
|
|
872
|
+
id: T("multipleCustomSlotEvent", e, Fe(r.id, t.id, n.id)),
|
|
872
873
|
kind: "multipleCustomSlotEvent",
|
|
873
874
|
names: [t.name, n.name],
|
|
874
875
|
params: G(n.params)
|
|
@@ -877,7 +878,7 @@ function Jn(e) {
|
|
|
877
878
|
if (B(c.key) && s.slot && t.type === "comp" && r.meta.slots) {
|
|
878
879
|
let t = r.meta.slots.find((e) => e.id === s.slot);
|
|
879
880
|
if (t && t.properties) for (let n of t.properties) a.push({
|
|
880
|
-
id: T("multipleCustomSlotPropertyChangeEvent", e,
|
|
881
|
+
id: T("multipleCustomSlotPropertyChangeEvent", e, Ve(r.id, t.id, n.id)),
|
|
881
882
|
kind: "multipleCustomSlotPropertyChangeEvent",
|
|
882
883
|
names: [t.name, n.name],
|
|
883
884
|
params: K(n.type)
|
|
@@ -896,13 +897,13 @@ function Jn(e) {
|
|
|
896
897
|
params: K(i)
|
|
897
898
|
});
|
|
898
899
|
if (I(c.key) && t.type === "comp" && s.adaptSlot) {
|
|
899
|
-
let { kind: t, mainKey: n, slotKey: r } =
|
|
900
|
+
let { kind: t, mainKey: n, slotKey: r } = ot(s.adaptSlot);
|
|
900
901
|
if (t === "elementSlot") {
|
|
901
902
|
let t = w(n);
|
|
902
903
|
if (t && t.slots) {
|
|
903
904
|
let i = t.slots.find((e) => e.key === r);
|
|
904
905
|
if (i && i.events) for (let o of i.events) a.push({
|
|
905
|
-
id: T("elementAdaptSlotEvent", e,
|
|
906
|
+
id: T("elementAdaptSlotEvent", e, Ie(n, r, o.key)),
|
|
906
907
|
kind: "elementAdaptSlotEvent",
|
|
907
908
|
names: [
|
|
908
909
|
t.name,
|
|
@@ -912,7 +913,7 @@ function Jn(e) {
|
|
|
912
913
|
params: o.params
|
|
913
914
|
});
|
|
914
915
|
if (i && i.properties) for (let n of i.properties) a.push({
|
|
915
|
-
id: T("elementAdaptSlotPropertyChangeEvent", e,
|
|
916
|
+
id: T("elementAdaptSlotPropertyChangeEvent", e, He(t.key, i.key, n.key)),
|
|
916
917
|
kind: "elementAdaptSlotPropertyChangeEvent",
|
|
917
918
|
names: [
|
|
918
919
|
t.name,
|
|
@@ -927,7 +928,7 @@ function Jn(e) {
|
|
|
927
928
|
if (t && t.meta.slots) {
|
|
928
929
|
let i = t.meta.slots.find((e) => e.id === r);
|
|
929
930
|
if (i && i.events) for (let r of i.events) a.push({
|
|
930
|
-
id: T("customAdaptSlotEvent", e,
|
|
931
|
+
id: T("customAdaptSlotEvent", e, Fe(n, i.id, r.id)),
|
|
931
932
|
kind: "customAdaptSlotEvent",
|
|
932
933
|
names: [
|
|
933
934
|
t.name,
|
|
@@ -937,7 +938,7 @@ function Jn(e) {
|
|
|
937
938
|
params: G(r.params)
|
|
938
939
|
});
|
|
939
940
|
if (i && i.properties) for (let r of i.properties) a.push({
|
|
940
|
-
id: T("customAdaptSlotPropertyChangeEvent", e,
|
|
941
|
+
id: T("customAdaptSlotPropertyChangeEvent", e, Ve(n, i.id, r.id)),
|
|
941
942
|
kind: "customAdaptSlotPropertyChangeEvent",
|
|
942
943
|
names: [
|
|
943
944
|
t.name,
|
|
@@ -966,9 +967,9 @@ function Jn(e) {
|
|
|
966
967
|
}
|
|
967
968
|
return a;
|
|
968
969
|
}
|
|
969
|
-
function
|
|
970
|
+
function Zn(e) {
|
|
970
971
|
if (!e) return;
|
|
971
|
-
let { activeObject: t, activePage: n, activeComp: r, depends: i } = S.app, a =
|
|
972
|
+
let { activeObject: t, activePage: n, activeComp: r, depends: i } = S.app, a = Ne(t.type, t.subtype), { kind: o, nodeId: s, eventKey: c } = Ze(e), l = t.nodes.find((e) => e.id === s);
|
|
972
973
|
if (!l) return;
|
|
973
974
|
let u = w(l.key);
|
|
974
975
|
if (!u) {
|
|
@@ -990,7 +991,7 @@ function Yn(e) {
|
|
|
990
991
|
id: e,
|
|
991
992
|
kind: o,
|
|
992
993
|
names: t.names,
|
|
993
|
-
params: K(
|
|
994
|
+
params: K(Xt(t.raw))
|
|
994
995
|
};
|
|
995
996
|
}
|
|
996
997
|
} else if (o === "refEvent") {
|
|
@@ -1047,7 +1048,7 @@ function Yn(e) {
|
|
|
1047
1048
|
}
|
|
1048
1049
|
} else if (o === "customSlotEvent") {
|
|
1049
1050
|
if (z(u.key) && l.slot && t.type === "comp" && r.meta.slots) {
|
|
1050
|
-
let { compId: t, slotId: n, eventId: i } =
|
|
1051
|
+
let { compId: t, slotId: n, eventId: i } = Qe(c);
|
|
1051
1052
|
if (r.id === t && l.slot === n) {
|
|
1052
1053
|
let t = r.meta.slots.find((e) => e.id === n);
|
|
1053
1054
|
if (t && t.events) {
|
|
@@ -1063,7 +1064,7 @@ function Yn(e) {
|
|
|
1063
1064
|
}
|
|
1064
1065
|
} else if (o === "customSlotPropertyChangeEvent") {
|
|
1065
1066
|
if (z(u.key) && l.slot && t.type === "comp" && r.meta.slots) {
|
|
1066
|
-
let { compId: t, slotId: n, eventId: i } =
|
|
1067
|
+
let { compId: t, slotId: n, eventId: i } = Qe(c);
|
|
1067
1068
|
if (r.id === t && l.slot === n) {
|
|
1068
1069
|
let t = r.meta.slots.find((e) => e.id === n);
|
|
1069
1070
|
if (t && t.properties) {
|
|
@@ -1079,7 +1080,7 @@ function Yn(e) {
|
|
|
1079
1080
|
}
|
|
1080
1081
|
} else if (o === "multipleCustomSlotEvent") {
|
|
1081
1082
|
if (B(u.key) && l.slot && t.type === "comp" && r.meta.slots) {
|
|
1082
|
-
let { compId: t, slotId: n, eventId: i } =
|
|
1083
|
+
let { compId: t, slotId: n, eventId: i } = Qe(c);
|
|
1083
1084
|
if (r.id === t && l.slot && n) {
|
|
1084
1085
|
let t = r.meta.slots.find((e) => e.id === n);
|
|
1085
1086
|
if (t && t.events) {
|
|
@@ -1095,7 +1096,7 @@ function Yn(e) {
|
|
|
1095
1096
|
}
|
|
1096
1097
|
} else if (o === "multipleCustomSlotPropertyChangeEvent") {
|
|
1097
1098
|
if (B(u.key) && l.slot && t.type === "comp" && r.meta.slots) {
|
|
1098
|
-
let { compId: t, slotId: n, eventId: i } =
|
|
1099
|
+
let { compId: t, slotId: n, eventId: i } = Qe(c);
|
|
1099
1100
|
if (r.id === t && l.slot === n) {
|
|
1100
1101
|
let t = r.meta.slots.find((e) => e.id === n);
|
|
1101
1102
|
if (t && t.properties) {
|
|
@@ -1131,8 +1132,8 @@ function Yn(e) {
|
|
|
1131
1132
|
}
|
|
1132
1133
|
} else if (o === "elementAdaptSlotEvent") {
|
|
1133
1134
|
if (I(u.key) && t.type === "comp" && l.adaptSlot) {
|
|
1134
|
-
let { elementKey: t, slotKey: n, eventKey: r } =
|
|
1135
|
-
if (
|
|
1135
|
+
let { elementKey: t, slotKey: n, eventKey: r } = $e(c);
|
|
1136
|
+
if (Qt(l.adaptSlot, t, n)) {
|
|
1136
1137
|
let i = w(t);
|
|
1137
1138
|
if (i && i.slots) {
|
|
1138
1139
|
let t = i.slots.find((e) => e.key === n);
|
|
@@ -1154,8 +1155,8 @@ function Yn(e) {
|
|
|
1154
1155
|
}
|
|
1155
1156
|
} else if (o === "elementAdaptSlotPropertyChangeEvent") {
|
|
1156
1157
|
if (I(u.key) && t.type === "comp" && l.adaptSlot) {
|
|
1157
|
-
let { elementKey: t, slotKey: n, propertyKey: r } =
|
|
1158
|
-
if (
|
|
1158
|
+
let { elementKey: t, slotKey: n, propertyKey: r } = at(c);
|
|
1159
|
+
if (Qt(l.adaptSlot, t, n)) {
|
|
1159
1160
|
let i = w(t);
|
|
1160
1161
|
if (i && i.slots) {
|
|
1161
1162
|
let t = i.slots.find((e) => e.key === n);
|
|
@@ -1177,8 +1178,8 @@ function Yn(e) {
|
|
|
1177
1178
|
}
|
|
1178
1179
|
} else if (o === "customAdaptSlotEvent") {
|
|
1179
1180
|
if (I(u.key) && t.type === "comp" && l.adaptSlot) {
|
|
1180
|
-
let { compId: t, slotId: n, eventId: r } =
|
|
1181
|
-
if (
|
|
1181
|
+
let { compId: t, slotId: n, eventId: r } = Qe(c);
|
|
1182
|
+
if ($t(l.adaptSlot, t, n)) {
|
|
1182
1183
|
let a = i[t];
|
|
1183
1184
|
if (a && a.meta.slots) {
|
|
1184
1185
|
let t = a.meta.slots.find((e) => e.id === n);
|
|
@@ -1200,8 +1201,8 @@ function Yn(e) {
|
|
|
1200
1201
|
}
|
|
1201
1202
|
} else if (o === "customAdaptSlotPropertyChangeEvent") {
|
|
1202
1203
|
if (I(u.key) && t.type === "comp" && l.adaptSlot) {
|
|
1203
|
-
let { compId: t, slotId: n, propertyId: r } =
|
|
1204
|
-
if (
|
|
1204
|
+
let { compId: t, slotId: n, propertyId: r } = it(c);
|
|
1205
|
+
if ($t(l.adaptSlot, t, n)) {
|
|
1205
1206
|
let a = i[t];
|
|
1206
1207
|
if (a && a.meta.slots) {
|
|
1207
1208
|
let t = a.meta.slots.find((e) => e.id === n);
|
|
@@ -1241,12 +1242,12 @@ function Yn(e) {
|
|
|
1241
1242
|
}
|
|
1242
1243
|
}
|
|
1243
1244
|
}
|
|
1244
|
-
function
|
|
1245
|
-
let t = [], n =
|
|
1246
|
-
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([
|
|
1245
|
+
function Qn(e) {
|
|
1246
|
+
let t = [], n = Xn(e), r;
|
|
1247
|
+
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([Je(i, a), e]);
|
|
1247
1248
|
return F(t);
|
|
1248
1249
|
}
|
|
1249
|
-
function
|
|
1250
|
+
function $n(e) {
|
|
1250
1251
|
let { activeObject: t, activeComp: n } = S.app, r = [], i = t.nodes.find((t) => t.id === e);
|
|
1251
1252
|
if (!i) return r;
|
|
1252
1253
|
let a = w(i.key);
|
|
@@ -1254,7 +1255,7 @@ function Zn(e) {
|
|
|
1254
1255
|
if (z(a.key) && i.slot && t.type === "comp" && n.meta.slots) {
|
|
1255
1256
|
let t = n.meta.slots.find((e) => e.id === i.slot);
|
|
1256
1257
|
if (t && t.events) for (let i of t.events) r.push({
|
|
1257
|
-
id: T("customSlotEvent", e,
|
|
1258
|
+
id: T("customSlotEvent", e, Fe(n.id, t.id, i.id)),
|
|
1258
1259
|
kind: "customSlotEvent",
|
|
1259
1260
|
names: [t.name, i.name],
|
|
1260
1261
|
params: G(i.params)
|
|
@@ -1263,7 +1264,7 @@ function Zn(e) {
|
|
|
1263
1264
|
if (B(a.key) && i.slot && t.type === "comp" && n.meta.slots) {
|
|
1264
1265
|
let t = n.meta.slots.find((e) => e.id === i.slot);
|
|
1265
1266
|
if (t && t.events) for (let i of t.events) r.push({
|
|
1266
|
-
id: T("multipleCustomSlotEvent", e,
|
|
1267
|
+
id: T("multipleCustomSlotEvent", e, Fe(n.id, t.id, i.id)),
|
|
1267
1268
|
kind: "multipleCustomSlotEvent",
|
|
1268
1269
|
names: [t.name, i.name],
|
|
1269
1270
|
params: G(i.params)
|
|
@@ -1277,9 +1278,9 @@ function Zn(e) {
|
|
|
1277
1278
|
});
|
|
1278
1279
|
return r;
|
|
1279
1280
|
}
|
|
1280
|
-
function
|
|
1281
|
+
function er(e) {
|
|
1281
1282
|
if (!e) return;
|
|
1282
|
-
let { activeObject: t, activeComp: n } = S.app, { kind: r, nodeId: i, eventKey: a } =
|
|
1283
|
+
let { activeObject: t, activeComp: n } = S.app, { kind: r, nodeId: i, eventKey: a } = Ze(e), o = t.nodes.find((e) => e.id === i);
|
|
1283
1284
|
if (!o) return;
|
|
1284
1285
|
let s = w(o.key);
|
|
1285
1286
|
if (!s) {
|
|
@@ -1288,7 +1289,7 @@ function Qn(e) {
|
|
|
1288
1289
|
}
|
|
1289
1290
|
if (r === "customSlotEvent") {
|
|
1290
1291
|
if (z(s.key) && o.slot && t.type === "comp" && n.meta.slots) {
|
|
1291
|
-
let { compId: t, slotId: i, eventId: s } =
|
|
1292
|
+
let { compId: t, slotId: i, eventId: s } = Qe(a);
|
|
1292
1293
|
if (n.id === t && o.slot === i) {
|
|
1293
1294
|
let t = n.meta.slots.find((e) => e.id === i);
|
|
1294
1295
|
if (t && t.events) {
|
|
@@ -1304,7 +1305,7 @@ function Qn(e) {
|
|
|
1304
1305
|
}
|
|
1305
1306
|
} else if (r === "multipleCustomSlotEvent") {
|
|
1306
1307
|
if (B(s.key) && o.slot && t.type === "comp" && n.meta.slots) {
|
|
1307
|
-
let { compId: t, slotId: i, eventId: s } =
|
|
1308
|
+
let { compId: t, slotId: i, eventId: s } = Qe(a);
|
|
1308
1309
|
if (n.id === t && o.slot && i) {
|
|
1309
1310
|
let t = n.meta.slots.find((e) => e.id === i);
|
|
1310
1311
|
if (t && t.events) {
|
|
@@ -1328,9 +1329,9 @@ function Qn(e) {
|
|
|
1328
1329
|
};
|
|
1329
1330
|
}
|
|
1330
1331
|
}
|
|
1331
|
-
function
|
|
1332
|
-
let t = [], n =
|
|
1333
|
-
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([
|
|
1332
|
+
function tr(e) {
|
|
1333
|
+
let t = [], n = $n(e), r;
|
|
1334
|
+
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([Je(i, a), e]);
|
|
1334
1335
|
return F(t);
|
|
1335
1336
|
}
|
|
1336
1337
|
//#endregion
|
|
@@ -1355,7 +1356,7 @@ function J(e) {
|
|
|
1355
1356
|
});
|
|
1356
1357
|
return t;
|
|
1357
1358
|
}
|
|
1358
|
-
function
|
|
1359
|
+
function nr(e) {
|
|
1359
1360
|
let t = !0;
|
|
1360
1361
|
switch (e) {
|
|
1361
1362
|
case "": break;
|
|
@@ -1381,13 +1382,13 @@ function er(e) {
|
|
|
1381
1382
|
}
|
|
1382
1383
|
return t;
|
|
1383
1384
|
}
|
|
1384
|
-
function
|
|
1385
|
+
function rr(e) {
|
|
1385
1386
|
let { activeObject: t, activeComp: n, depends: r } = S.app, i = [], a = t.nodes.find((t) => t.id === e);
|
|
1386
1387
|
if (!a) return i;
|
|
1387
1388
|
let o = w(a.key);
|
|
1388
1389
|
if (!o) return console.assert(!1, "inavlid element", a.key), i;
|
|
1389
1390
|
if (o.methods) for (let { key: t, name: n, inputs: r, outputs: a } of o.methods) i.push({
|
|
1390
|
-
id:
|
|
1391
|
+
id: Le("elementMethod", e, t),
|
|
1391
1392
|
kind: "elementMethod",
|
|
1392
1393
|
names: [n],
|
|
1393
1394
|
inputs: r,
|
|
@@ -1396,7 +1397,7 @@ function tr(e) {
|
|
|
1396
1397
|
if (L(o.key) && a.comp) {
|
|
1397
1398
|
let t = r[a.comp];
|
|
1398
1399
|
if (t && t.meta.methods) for (let { id: n, name: r, inputs: a, outputs: o } of t.meta.methods) i.push({
|
|
1399
|
-
id:
|
|
1400
|
+
id: Le("refMethod", e, n),
|
|
1400
1401
|
kind: "refMethod",
|
|
1401
1402
|
names: [r],
|
|
1402
1403
|
inputs: q(a),
|
|
@@ -1406,7 +1407,7 @@ function tr(e) {
|
|
|
1406
1407
|
if (R(o.key) && a.comp) {
|
|
1407
1408
|
let t = r[a.comp];
|
|
1408
1409
|
if (t && t.meta.methods) for (let { id: n, name: r, inputs: a, outputs: o } of t.meta.methods) i.push({
|
|
1409
|
-
id:
|
|
1410
|
+
id: Le("multipleRefMethod", e, n),
|
|
1410
1411
|
kind: "multipleRefMethod",
|
|
1411
1412
|
names: [r],
|
|
1412
1413
|
inputs: q(a),
|
|
@@ -1414,20 +1415,20 @@ function tr(e) {
|
|
|
1414
1415
|
});
|
|
1415
1416
|
}
|
|
1416
1417
|
if (I(o.key) && t.type === "comp" && n.meta.methods) for (let { id: t, name: r, inputs: a, outputs: o } of n.meta.methods) i.push({
|
|
1417
|
-
id:
|
|
1418
|
+
id: Le("customMethod", e, t),
|
|
1418
1419
|
kind: "customMethod",
|
|
1419
1420
|
names: [r],
|
|
1420
1421
|
inputs: q(a),
|
|
1421
1422
|
outputs: J(o)
|
|
1422
1423
|
});
|
|
1423
1424
|
if (I(o.key) && t.type === "comp" && a.adaptSlot) {
|
|
1424
|
-
let { kind: t, mainKey: n, slotKey: o } =
|
|
1425
|
+
let { kind: t, mainKey: n, slotKey: o } = ot(a.adaptSlot);
|
|
1425
1426
|
if (t === "elementSlot") {
|
|
1426
1427
|
let t = w(n);
|
|
1427
1428
|
if (t && t.slots) {
|
|
1428
1429
|
let n = t.slots.find((e) => e.key === o);
|
|
1429
1430
|
if (n && n.methods) for (let r of n.methods) i.push({
|
|
1430
|
-
id:
|
|
1431
|
+
id: Le("elementAdaptSlotMethod", e, ze(t.key, n.key, r.key)),
|
|
1431
1432
|
kind: "elementAdaptSlotMethod",
|
|
1432
1433
|
names: [
|
|
1433
1434
|
t.name,
|
|
@@ -1443,7 +1444,7 @@ function tr(e) {
|
|
|
1443
1444
|
if (t && t.meta.slots) {
|
|
1444
1445
|
let r = t.meta.slots.find((e) => e.id === o);
|
|
1445
1446
|
if (r && r.methods) for (let a of r.methods) i.push({
|
|
1446
|
-
id:
|
|
1447
|
+
id: Le("customAdaptSlotMethod", e, Re(n, r.id, a.id)),
|
|
1447
1448
|
kind: "customAdaptSlotMethod",
|
|
1448
1449
|
names: [
|
|
1449
1450
|
t.name,
|
|
@@ -1458,9 +1459,9 @@ function tr(e) {
|
|
|
1458
1459
|
}
|
|
1459
1460
|
return i;
|
|
1460
1461
|
}
|
|
1461
|
-
function
|
|
1462
|
+
function ir(e) {
|
|
1462
1463
|
if (!e) return;
|
|
1463
|
-
let { activeObject: t, activeComp: n, depends: r } = S.app, { kind: i, nodeId: a, methodKey: o } =
|
|
1464
|
+
let { activeObject: t, activeComp: n, depends: r } = S.app, { kind: i, nodeId: a, methodKey: o } = et(e), s = t.nodes.find((e) => e.id === a);
|
|
1464
1465
|
if (!s) return;
|
|
1465
1466
|
let c = w(s.key);
|
|
1466
1467
|
if (!c) {
|
|
@@ -1517,7 +1518,7 @@ function nr(e) {
|
|
|
1517
1518
|
}
|
|
1518
1519
|
} else if (i === "customSlotMethod") {
|
|
1519
1520
|
if (I(c.key) && t.type === "comp" && n.meta.slots) {
|
|
1520
|
-
let { slotId: t, methodId: r } =
|
|
1521
|
+
let { slotId: t, methodId: r } = tt(o), a = n.meta.slots.find((e) => e.id === t);
|
|
1521
1522
|
if (a && a.methods) {
|
|
1522
1523
|
let t = a.methods.find((e) => e.id === r);
|
|
1523
1524
|
if (t) return {
|
|
@@ -1531,8 +1532,8 @@ function nr(e) {
|
|
|
1531
1532
|
}
|
|
1532
1533
|
} else if (i === "elementAdaptSlotMethod") {
|
|
1533
1534
|
if (I(c.key) && t.type === "comp" && s.adaptSlot) {
|
|
1534
|
-
let { elementKey: t, slotKey: n, methodKey: r } =
|
|
1535
|
-
if (
|
|
1535
|
+
let { elementKey: t, slotKey: n, methodKey: r } = nt(o);
|
|
1536
|
+
if (Qt(s.adaptSlot, t, n)) {
|
|
1536
1537
|
let a = w(t);
|
|
1537
1538
|
if (a && a.slots) {
|
|
1538
1539
|
let t = a.slots.find((e) => e.key === n);
|
|
@@ -1554,8 +1555,8 @@ function nr(e) {
|
|
|
1554
1555
|
}
|
|
1555
1556
|
}
|
|
1556
1557
|
} else if (i === "customAdaptSlotMethod" && I(c.key) && t.type === "comp" && s.adaptSlot) {
|
|
1557
|
-
let { compId: t, slotId: n, methodId: a } =
|
|
1558
|
-
if (
|
|
1558
|
+
let { compId: t, slotId: n, methodId: a } = tt(o);
|
|
1559
|
+
if ($t(s.adaptSlot, t, n)) {
|
|
1559
1560
|
let o = r[t];
|
|
1560
1561
|
if (o && o.meta.slots) {
|
|
1561
1562
|
let t = o.meta.slots.find((e) => e.id === n);
|
|
@@ -1577,12 +1578,12 @@ function nr(e) {
|
|
|
1577
1578
|
}
|
|
1578
1579
|
}
|
|
1579
1580
|
}
|
|
1580
|
-
function
|
|
1581
|
-
let t = [], n =
|
|
1582
|
-
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([
|
|
1581
|
+
function ar(e) {
|
|
1582
|
+
let t = [], n = rr(e), r;
|
|
1583
|
+
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([Ye(i, a), e]);
|
|
1583
1584
|
return F(t);
|
|
1584
1585
|
}
|
|
1585
|
-
function
|
|
1586
|
+
function or(e) {
|
|
1586
1587
|
let t = !0;
|
|
1587
1588
|
switch (e) {
|
|
1588
1589
|
case "": break;
|
|
@@ -1608,7 +1609,7 @@ function ir(e) {
|
|
|
1608
1609
|
}
|
|
1609
1610
|
return t;
|
|
1610
1611
|
}
|
|
1611
|
-
function
|
|
1612
|
+
function sr(e) {
|
|
1612
1613
|
let { activeObject: t, activeComp: n } = S.app, r = [], i = t.nodes.find((t) => t.id === e);
|
|
1613
1614
|
if (!i) return r;
|
|
1614
1615
|
let a = w(i.key);
|
|
@@ -1616,7 +1617,7 @@ function ar(e) {
|
|
|
1616
1617
|
if (z(a.key) && i.slot && t.type === "comp" && n.meta.slots) {
|
|
1617
1618
|
let t = n.meta.slots.find((e) => e.id === i.slot);
|
|
1618
1619
|
if (t && t.methods) for (let i of t.methods) r.push({
|
|
1619
|
-
id:
|
|
1620
|
+
id: Le("customSlotMethod", e, Re(n.id, t.id, i.id)),
|
|
1620
1621
|
kind: "customSlotMethod",
|
|
1621
1622
|
names: [t.name, i.name],
|
|
1622
1623
|
inputs: q(i.inputs),
|
|
@@ -1626,7 +1627,7 @@ function ar(e) {
|
|
|
1626
1627
|
if (B(a.key) && i.slot && t.type === "comp" && n.meta.slots) {
|
|
1627
1628
|
let t = n.meta.slots.find((e) => e.id === i.slot);
|
|
1628
1629
|
if (t && t.methods) for (let i of t.methods) r.push({
|
|
1629
|
-
id:
|
|
1630
|
+
id: Le("multipleCustomSlotMethod", e, Re(n.id, t.id, i.id)),
|
|
1630
1631
|
kind: "multipleCustomSlotMethod",
|
|
1631
1632
|
names: [t.name, i.name],
|
|
1632
1633
|
inputs: q(i.inputs),
|
|
@@ -1634,7 +1635,7 @@ function ar(e) {
|
|
|
1634
1635
|
});
|
|
1635
1636
|
}
|
|
1636
1637
|
if (I(a.key) && t.type === "comp" && n.meta.methods) for (let { id: t, name: i, inputs: a, outputs: o } of n.meta.methods) r.push({
|
|
1637
|
-
id:
|
|
1638
|
+
id: Le("customMethod", e, t),
|
|
1638
1639
|
kind: "customMethod",
|
|
1639
1640
|
names: [i],
|
|
1640
1641
|
inputs: q(a),
|
|
@@ -1642,9 +1643,9 @@ function ar(e) {
|
|
|
1642
1643
|
});
|
|
1643
1644
|
return r;
|
|
1644
1645
|
}
|
|
1645
|
-
function
|
|
1646
|
+
function cr(e) {
|
|
1646
1647
|
if (!e) return;
|
|
1647
|
-
let { activeObject: t, activeComp: n } = S.app, { kind: r, nodeId: i, methodKey: a } =
|
|
1648
|
+
let { activeObject: t, activeComp: n } = S.app, { kind: r, nodeId: i, methodKey: a } = et(e), o = t.nodes.find((e) => e.id === i);
|
|
1648
1649
|
if (!o) return;
|
|
1649
1650
|
let s = w(o.key);
|
|
1650
1651
|
if (!s) {
|
|
@@ -1653,7 +1654,7 @@ function or(e) {
|
|
|
1653
1654
|
}
|
|
1654
1655
|
if (r === "customSlotMethod") {
|
|
1655
1656
|
if (z(s.key) && o.slot && t.type === "comp" && n.meta.slots) {
|
|
1656
|
-
let { compId: t, slotId: i, methodId: s } =
|
|
1657
|
+
let { compId: t, slotId: i, methodId: s } = tt(a);
|
|
1657
1658
|
if (n.id === t && i === o.slot) {
|
|
1658
1659
|
let t = n.meta.slots.find((e) => e.id === i);
|
|
1659
1660
|
if (t && t.methods) {
|
|
@@ -1670,7 +1671,7 @@ function or(e) {
|
|
|
1670
1671
|
}
|
|
1671
1672
|
} else if (r === "multipleCustomSlotMethod") {
|
|
1672
1673
|
if (B(s.key) && o.slot && t.type === "comp" && n.meta.slots) {
|
|
1673
|
-
let { compId: t, slotId: i, methodId: s } =
|
|
1674
|
+
let { compId: t, slotId: i, methodId: s } = tt(a);
|
|
1674
1675
|
if (n.id === t && o.slot === i) {
|
|
1675
1676
|
let t = n.meta.slots.find((e) => e.id === i);
|
|
1676
1677
|
if (t && t.methods) {
|
|
@@ -1696,27 +1697,27 @@ function or(e) {
|
|
|
1696
1697
|
};
|
|
1697
1698
|
}
|
|
1698
1699
|
}
|
|
1699
|
-
function
|
|
1700
|
-
let t = [], n =
|
|
1701
|
-
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([
|
|
1700
|
+
function lr(e) {
|
|
1701
|
+
let t = [], n = sr(e), r;
|
|
1702
|
+
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([Ye(i, a), e]);
|
|
1702
1703
|
return F(t);
|
|
1703
1704
|
}
|
|
1704
|
-
function
|
|
1705
|
-
let t =
|
|
1705
|
+
function ur(e) {
|
|
1706
|
+
let t = cr(e);
|
|
1706
1707
|
return t ? t.outputs : [];
|
|
1707
1708
|
}
|
|
1708
|
-
function
|
|
1709
|
-
let n =
|
|
1709
|
+
function dr(e, t) {
|
|
1710
|
+
let n = cr(e);
|
|
1710
1711
|
if (n) return n.outputs?.find((e) => e.key === t);
|
|
1711
1712
|
}
|
|
1712
|
-
function
|
|
1713
|
-
let t = [], n =
|
|
1713
|
+
function fr(e) {
|
|
1714
|
+
let t = [], n = ur(e);
|
|
1714
1715
|
if (n) for (let { name: e, key: r } of n) t.push([e, r]);
|
|
1715
1716
|
return F(t);
|
|
1716
1717
|
}
|
|
1717
1718
|
//#endregion
|
|
1718
1719
|
//#region src/core/utils/app/page.ts
|
|
1719
|
-
function
|
|
1720
|
+
function pr(e) {
|
|
1720
1721
|
let { appList: t } = S.app, n = [], r = t.find((t) => t.id === e);
|
|
1721
1722
|
if (!r) return n;
|
|
1722
1723
|
for (let { id: e, name: t } of r.pages) n.push({
|
|
@@ -1725,7 +1726,7 @@ function dr(e) {
|
|
|
1725
1726
|
});
|
|
1726
1727
|
return n;
|
|
1727
1728
|
}
|
|
1728
|
-
function
|
|
1729
|
+
function mr(e, t) {
|
|
1729
1730
|
let { appList: n } = S.app, r = n.find((t) => t.id === e);
|
|
1730
1731
|
if (!r) return;
|
|
1731
1732
|
let i = r.pages.find((e) => e.id === t);
|
|
@@ -1734,21 +1735,21 @@ function fr(e, t) {
|
|
|
1734
1735
|
name: i.name
|
|
1735
1736
|
};
|
|
1736
1737
|
}
|
|
1737
|
-
function
|
|
1738
|
+
function hr(e) {
|
|
1738
1739
|
let t = [];
|
|
1739
|
-
return
|
|
1740
|
+
return pr(e).forEach(({ id: e, name: n }) => {
|
|
1740
1741
|
t.push([n, e]);
|
|
1741
1742
|
}), F(t);
|
|
1742
1743
|
}
|
|
1743
1744
|
//#endregion
|
|
1744
1745
|
//#region src/core/utils/app/property.ts
|
|
1745
|
-
function
|
|
1746
|
-
let { activeObject: n, activeComp: r, depends: i } = S.app, a = [], o =
|
|
1746
|
+
function gr(e, t) {
|
|
1747
|
+
let { activeObject: n, activeComp: r, depends: i } = S.app, a = [], o = Ne(n.type, n.subtype), s = n.nodes.find((t) => t.id === e);
|
|
1747
1748
|
if (!s) return a;
|
|
1748
1749
|
let c = w(s.key);
|
|
1749
1750
|
if (!c) return console.assert(!1, "invalid element", s.key), a;
|
|
1750
|
-
if (C[c.key] && C[c.key][o]) for (let { keys: n, names: r, raw: i } of C[c.key][o]) t === "write" &&
|
|
1751
|
-
id:
|
|
1751
|
+
if (C[c.key] && C[c.key][o]) for (let { keys: n, names: r, raw: i } of C[c.key][o]) t === "write" && Zt(n, i) || a.push({
|
|
1752
|
+
id: Be("elementProperty", e, n),
|
|
1752
1753
|
kind: "elementProperty",
|
|
1753
1754
|
names: r,
|
|
1754
1755
|
meta: {
|
|
@@ -1759,7 +1760,7 @@ function mr(e, t) {
|
|
|
1759
1760
|
if (L(c.key) && s.comp) {
|
|
1760
1761
|
let t = i[s.comp];
|
|
1761
1762
|
if (t && t.meta.properties) for (let { id: n, name: r, type: i } of t.meta.properties) a.push({
|
|
1762
|
-
id:
|
|
1763
|
+
id: Be("refProperty", e, n),
|
|
1763
1764
|
kind: "refProperty",
|
|
1764
1765
|
names: [r],
|
|
1765
1766
|
meta: { raw: { type: i } }
|
|
@@ -1768,7 +1769,7 @@ function mr(e, t) {
|
|
|
1768
1769
|
if (R(c.key) && s.comp) {
|
|
1769
1770
|
let t = i[s.comp];
|
|
1770
1771
|
if (t && t.meta.properties) for (let { id: n, name: r, type: i } of t.meta.properties) a.push({
|
|
1771
|
-
id:
|
|
1772
|
+
id: Be("multipleRefProperty", e, n),
|
|
1772
1773
|
kind: "multipleRefProperty",
|
|
1773
1774
|
names: [r],
|
|
1774
1775
|
meta: { raw: { type: i } }
|
|
@@ -1777,7 +1778,7 @@ function mr(e, t) {
|
|
|
1777
1778
|
if (z(c.key) && s.slot && n.type === "comp" && r.meta.slots) {
|
|
1778
1779
|
let t = r.meta.slots.find((e) => e.id === s.slot);
|
|
1779
1780
|
if (t && t.properties) for (let n of t.properties) a.push({
|
|
1780
|
-
id:
|
|
1781
|
+
id: Be("customSlotProperty", e, Ve(r.id, t.id, n.id)),
|
|
1781
1782
|
kind: "customSlotProperty",
|
|
1782
1783
|
names: [t.name, n.name],
|
|
1783
1784
|
meta: { raw: { type: n.type } }
|
|
@@ -1786,26 +1787,26 @@ function mr(e, t) {
|
|
|
1786
1787
|
if (B(c.key) && s.slot && n.type === "comp" && r.meta.slots) {
|
|
1787
1788
|
let t = r.meta.slots.find((e) => e.id === s.slot);
|
|
1788
1789
|
if (t && t.properties) for (let n of t.properties) a.push({
|
|
1789
|
-
id:
|
|
1790
|
+
id: Be("multipleCustomSlotProperty", e, Ve(r.id, t.id, n.id)),
|
|
1790
1791
|
kind: "multipleCustomSlotProperty",
|
|
1791
1792
|
names: [t.name, n.name],
|
|
1792
1793
|
meta: { raw: { type: n.type } }
|
|
1793
1794
|
});
|
|
1794
1795
|
}
|
|
1795
1796
|
if (I(c.key) && n.type === "comp" && r.meta.properties) for (let { id: t, name: n, type: i } of r.meta.properties) a.push({
|
|
1796
|
-
id:
|
|
1797
|
+
id: Be("customProperty", e, t),
|
|
1797
1798
|
kind: "customProperty",
|
|
1798
1799
|
names: [n],
|
|
1799
1800
|
meta: { raw: { type: i } }
|
|
1800
1801
|
});
|
|
1801
1802
|
if (I(c.key) && n.type === "comp" && s.adaptSlot) {
|
|
1802
|
-
let { kind: n, mainKey: r, slotKey: o } =
|
|
1803
|
+
let { kind: n, mainKey: r, slotKey: o } = ot(s.adaptSlot);
|
|
1803
1804
|
if (n === "elementSlot") {
|
|
1804
1805
|
let n = w(r);
|
|
1805
1806
|
if (n && n.slots) {
|
|
1806
1807
|
let r = n.slots.find((e) => e.key === o);
|
|
1807
1808
|
if (r && r.properties) for (let i of r.properties) t === "write" && i.readonly || a.push({
|
|
1808
|
-
id:
|
|
1809
|
+
id: Be("elementAdaptSlotProperty", e, He(n.key, r.key, i.key)),
|
|
1809
1810
|
kind: "elementAdaptSlotProperty",
|
|
1810
1811
|
names: [
|
|
1811
1812
|
n.name,
|
|
@@ -1820,7 +1821,7 @@ function mr(e, t) {
|
|
|
1820
1821
|
if (t && t.meta.slots) {
|
|
1821
1822
|
let n = t.meta.slots.find((e) => e.id === o);
|
|
1822
1823
|
if (n && n.properties) for (let i of n.properties) a.push({
|
|
1823
|
-
id:
|
|
1824
|
+
id: Be("customAdaptSlotProperty", e, Ve(r, n.id, i.id)),
|
|
1824
1825
|
kind: "customAdaptSlotProperty",
|
|
1825
1826
|
names: [
|
|
1826
1827
|
t.name,
|
|
@@ -1834,9 +1835,9 @@ function mr(e, t) {
|
|
|
1834
1835
|
}
|
|
1835
1836
|
return a;
|
|
1836
1837
|
}
|
|
1837
|
-
function
|
|
1838
|
+
function _r(e) {
|
|
1838
1839
|
if (!e) return;
|
|
1839
|
-
let { activeObject: t, activeComp: n, depends: r } = S.app, i =
|
|
1840
|
+
let { activeObject: t, activeComp: n, depends: r } = S.app, i = Ne(t.type, t.subtype), { kind: a, nodeId: o, propertyKey: s } = rt(e), c = t.nodes.find((e) => e.id === o);
|
|
1840
1841
|
if (!c) return;
|
|
1841
1842
|
let l = w(c.key);
|
|
1842
1843
|
if (!l) {
|
|
@@ -1884,7 +1885,7 @@ function hr(e) {
|
|
|
1884
1885
|
}
|
|
1885
1886
|
} else if (a === "customSlotProperty") {
|
|
1886
1887
|
if (z(l.key) && c.slot && t.type === "comp" && n.meta.slots) {
|
|
1887
|
-
let { compId: t, slotId: r, propertyId: i } =
|
|
1888
|
+
let { compId: t, slotId: r, propertyId: i } = it(s);
|
|
1888
1889
|
if (n.id === t && c.slot === r) {
|
|
1889
1890
|
let t = n.meta.slots.find((e) => e.id === r);
|
|
1890
1891
|
if (t && t.properties) {
|
|
@@ -1900,7 +1901,7 @@ function hr(e) {
|
|
|
1900
1901
|
}
|
|
1901
1902
|
} else if (a === "multipleCustomSlotProperty") {
|
|
1902
1903
|
if (B(l.key) && c.slot && t.type === "comp" && n.meta.slots) {
|
|
1903
|
-
let { compId: t, slotId: r, propertyId: i } =
|
|
1904
|
+
let { compId: t, slotId: r, propertyId: i } = it(s);
|
|
1904
1905
|
if (n.id === t && c.slot === r) {
|
|
1905
1906
|
let t = n.meta.slots.find((e) => e.id === r);
|
|
1906
1907
|
if (t && t.properties) {
|
|
@@ -1926,8 +1927,8 @@ function hr(e) {
|
|
|
1926
1927
|
}
|
|
1927
1928
|
} else if (a === "elementAdaptSlotProperty") {
|
|
1928
1929
|
if (I(l.key) && t.type === "comp" && c.adaptSlot) {
|
|
1929
|
-
let { elementKey: t, slotKey: n, propertyKey: r } =
|
|
1930
|
-
if (
|
|
1930
|
+
let { elementKey: t, slotKey: n, propertyKey: r } = at(s);
|
|
1931
|
+
if (Qt(c.adaptSlot, t, n)) {
|
|
1931
1932
|
let i = w(t);
|
|
1932
1933
|
if (i && i.slots) {
|
|
1933
1934
|
let t = i.slots.find((e) => e.key === n);
|
|
@@ -1948,8 +1949,8 @@ function hr(e) {
|
|
|
1948
1949
|
}
|
|
1949
1950
|
}
|
|
1950
1951
|
} else if (a === "customAdaptSlotProperty" && I(l.key) && t.type === "comp" && c.adaptSlot) {
|
|
1951
|
-
let { compId: t, slotId: n, propertyId: i } =
|
|
1952
|
-
if (
|
|
1952
|
+
let { compId: t, slotId: n, propertyId: i } = it(s);
|
|
1953
|
+
if ($t(c.adaptSlot, t, n)) {
|
|
1953
1954
|
let o = r[t];
|
|
1954
1955
|
if (o && o.meta.slots) {
|
|
1955
1956
|
let t = o.meta.slots.find((e) => e.id === n);
|
|
@@ -1970,14 +1971,14 @@ function hr(e) {
|
|
|
1970
1971
|
}
|
|
1971
1972
|
}
|
|
1972
1973
|
}
|
|
1973
|
-
function
|
|
1974
|
-
let n = [], r =
|
|
1975
|
-
for (let { id: e, kind: t, names: a } of r) t !== i && (i && n.push("separator"), i = t), n.push([
|
|
1974
|
+
function vr(e, t) {
|
|
1975
|
+
let n = [], r = gr(e, t), i;
|
|
1976
|
+
for (let { id: e, kind: t, names: a } of r) t !== i && (i && n.push("separator"), i = t), n.push([Xe(t, a), e]);
|
|
1976
1977
|
return F(n);
|
|
1977
1978
|
}
|
|
1978
1979
|
//#endregion
|
|
1979
1980
|
//#region src/core/utils/app/slot.ts
|
|
1980
|
-
function
|
|
1981
|
+
function yr() {
|
|
1981
1982
|
let { activeObject: e, activeComp: t } = S.app, n = [{
|
|
1982
1983
|
id: "",
|
|
1983
1984
|
name: ""
|
|
@@ -1989,7 +1990,7 @@ function _r() {
|
|
|
1989
1990
|
});
|
|
1990
1991
|
return n;
|
|
1991
1992
|
}
|
|
1992
|
-
function
|
|
1993
|
+
function br(e) {
|
|
1993
1994
|
let { activeObject: t, activeComp: n } = S.app;
|
|
1994
1995
|
if (t.type !== "comp" || !n.meta.slots) return;
|
|
1995
1996
|
if (!e) return {
|
|
@@ -2002,8 +2003,8 @@ function vr(e) {
|
|
|
2002
2003
|
name: r.name
|
|
2003
2004
|
};
|
|
2004
2005
|
}
|
|
2005
|
-
function
|
|
2006
|
-
let { i18n: e } =
|
|
2006
|
+
function xr() {
|
|
2007
|
+
let { i18n: e } = ct, t = [], n = yr();
|
|
2007
2008
|
for (let { id: r, name: i } of n) {
|
|
2008
2009
|
let n = i;
|
|
2009
2010
|
r === "" && (n = e.global.t("x-runtime-lib.notSet")), t.push([n, r]);
|
|
@@ -2012,7 +2013,7 @@ function yr() {
|
|
|
2012
2013
|
}
|
|
2013
2014
|
//#endregion
|
|
2014
2015
|
//#region src/core/blocks/app/event/appBind/v1/index.ts
|
|
2015
|
-
var
|
|
2016
|
+
var Sr = p.xml;
|
|
2016
2017
|
y.app_bind_container_v1 = { init: function() {
|
|
2017
2018
|
this.appendDummyInput().appendField("%{BKY_APP_V1_APP_BIND_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("event_blocks"), this.contextMenu = !1;
|
|
2018
2019
|
} }, y.app_bind_item_v1 = { init: function() {
|
|
@@ -2024,7 +2025,7 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2024
2025
|
}, 250), this.setStyle("event_blocks"), this.setTooltip("%{BKY_APP_V1_APP_BIND_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_APP_BIND_HELPURL}");
|
|
2025
2026
|
},
|
|
2026
2027
|
mutationToDom: function() {
|
|
2027
|
-
let e =
|
|
2028
|
+
let e = Sr.createElement("mutation");
|
|
2028
2029
|
return e.setAttribute("items", String(this.itemCount_)), e;
|
|
2029
2030
|
},
|
|
2030
2031
|
domToMutation: function(e) {
|
|
@@ -2091,7 +2092,7 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2091
2092
|
for (let e = this.itemCount_; this.getInput("ADD" + e); e++) this.removeInput("ADD" + e);
|
|
2092
2093
|
},
|
|
2093
2094
|
updateShadow_: function() {
|
|
2094
|
-
if (!this.isInsertionMarker()) for (let e = 0; e < this.itemCount_; e++) this.getInput("ADD" + e).setShadowDom(
|
|
2095
|
+
if (!this.isInsertionMarker()) for (let e = 0; e < this.itemCount_; e++) this.getInput("ADD" + e).setShadowDom(bn());
|
|
2095
2096
|
},
|
|
2096
2097
|
checkWarning_: function() {
|
|
2097
2098
|
let e;
|
|
@@ -2100,11 +2101,11 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2100
2101
|
if (!n) continue;
|
|
2101
2102
|
let r;
|
|
2102
2103
|
if (n.kind === "property") {
|
|
2103
|
-
let e =
|
|
2104
|
-
e && (r = e.meta.element ?
|
|
2104
|
+
let e = _r(n.property.id);
|
|
2105
|
+
e && (r = e.meta.element ? on(e.meta.raw) : an(e.meta.raw.type));
|
|
2105
2106
|
} else if (n.kind === "state") {
|
|
2106
|
-
let e =
|
|
2107
|
-
e && (r =
|
|
2107
|
+
let e = Hn(n.state.id);
|
|
2108
|
+
e && (r = an(e.type));
|
|
2108
2109
|
}
|
|
2109
2110
|
if (r && (e ||= r, r !== e)) {
|
|
2110
2111
|
this.setWarningText(P("WARN_TYPE_NOT_MATCH"));
|
|
@@ -2145,16 +2146,16 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2145
2146
|
}, 0);
|
|
2146
2147
|
},
|
|
2147
2148
|
genKindOpts_: function() {
|
|
2148
|
-
return
|
|
2149
|
+
return Gn();
|
|
2149
2150
|
},
|
|
2150
2151
|
genNodeOpts_: function() {
|
|
2151
|
-
return this.kind === "property" ?
|
|
2152
|
+
return this.kind === "property" ? Bn("setProperty") : F([]);
|
|
2152
2153
|
},
|
|
2153
2154
|
genPropertyOpts_: function() {
|
|
2154
|
-
return this.kind === "property" ?
|
|
2155
|
+
return this.kind === "property" ? vr(this.node.id, "write") : F([]);
|
|
2155
2156
|
},
|
|
2156
2157
|
genStateOpts_: function() {
|
|
2157
|
-
return this.kind === "state" ?
|
|
2158
|
+
return this.kind === "state" ? Un() : F([]);
|
|
2158
2159
|
},
|
|
2159
2160
|
onchange: function(e) {
|
|
2160
2161
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -2170,14 +2171,14 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2170
2171
|
else if (this.kind === "property") {
|
|
2171
2172
|
let e = this.getField("NODE");
|
|
2172
2173
|
if (e.getOptions(!1), t) {
|
|
2173
|
-
let t =
|
|
2174
|
+
let t = zn("setProperty")?.[0];
|
|
2174
2175
|
e.setValue(t?.id ?? "");
|
|
2175
2176
|
}
|
|
2176
2177
|
this.onNodeChange_(e.getValue());
|
|
2177
2178
|
} else if (this.kind === "state") {
|
|
2178
2179
|
let e = this.getField("STATE");
|
|
2179
2180
|
if (e.getOptions(!1), t) {
|
|
2180
|
-
let t =
|
|
2181
|
+
let t = Vn()?.[0];
|
|
2181
2182
|
e.setValue(t?.id ?? "");
|
|
2182
2183
|
}
|
|
2183
2184
|
this.onStateChange_(e.getValue());
|
|
@@ -2193,13 +2194,13 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2193
2194
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2194
2195
|
let r = this.getField("PROPERTY");
|
|
2195
2196
|
if (r.getOptions(!1), n) {
|
|
2196
|
-
let e =
|
|
2197
|
+
let e = gr(this.node.id, "write")?.[0];
|
|
2197
2198
|
r.setValue(e?.id ?? "");
|
|
2198
2199
|
}
|
|
2199
2200
|
this.onPropertyChange_(r.getValue());
|
|
2200
2201
|
},
|
|
2201
2202
|
onPropertyChange_: function(e) {
|
|
2202
|
-
let t =
|
|
2203
|
+
let t = _r(e);
|
|
2203
2204
|
if (!t) {
|
|
2204
2205
|
console.assert(!1);
|
|
2205
2206
|
return;
|
|
@@ -2207,7 +2208,7 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2207
2208
|
this.property.id = t.id, this.property.kind = t.kind, this.property.names = t.names, this.updateShape_();
|
|
2208
2209
|
},
|
|
2209
2210
|
onStateChange_: function(e) {
|
|
2210
|
-
let t =
|
|
2211
|
+
let t = Hn(e);
|
|
2211
2212
|
if (!t) {
|
|
2212
2213
|
console.assert(!1);
|
|
2213
2214
|
return;
|
|
@@ -2231,7 +2232,7 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2231
2232
|
return;
|
|
2232
2233
|
}
|
|
2233
2234
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
2234
|
-
let t =
|
|
2235
|
+
let t = _r(this.property.id);
|
|
2235
2236
|
if (!t) {
|
|
2236
2237
|
this.setWarningText(P("WARN_PROPERTY_NOT_FOUND"));
|
|
2237
2238
|
return;
|
|
@@ -2242,7 +2243,7 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2242
2243
|
}
|
|
2243
2244
|
v(t.names, this.property.names) || (this.property.names = t.names);
|
|
2244
2245
|
} else if (this.kind === "state") {
|
|
2245
|
-
let e =
|
|
2246
|
+
let e = Hn(this.state.id);
|
|
2246
2247
|
if (!e) {
|
|
2247
2248
|
this.setWarningText(P("WARN_STATE_NOT_FOUND"));
|
|
2248
2249
|
return;
|
|
@@ -2270,12 +2271,12 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2270
2271
|
},
|
|
2271
2272
|
initData_: function() {
|
|
2272
2273
|
if (this.node.id) return;
|
|
2273
|
-
let e =
|
|
2274
|
+
let e = zn("onEvent")?.[0];
|
|
2274
2275
|
if (!e) return;
|
|
2275
2276
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2276
2277
|
let t = this.getField("NODE");
|
|
2277
2278
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
2278
|
-
let n =
|
|
2279
|
+
let n = Xn(this.node.id)?.[0];
|
|
2279
2280
|
if (!n) return;
|
|
2280
2281
|
this.event.id = n.id, this.event.kind = n.kind, this.event.names = n.names, this.event.params = n.params;
|
|
2281
2282
|
let r = this.getField("EVENT");
|
|
@@ -2293,10 +2294,10 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2293
2294
|
}, 0);
|
|
2294
2295
|
},
|
|
2295
2296
|
genNodeOpts_: function() {
|
|
2296
|
-
return
|
|
2297
|
+
return Bn("onEvent");
|
|
2297
2298
|
},
|
|
2298
2299
|
genEventOpts_: function() {
|
|
2299
|
-
return
|
|
2300
|
+
return Qn(this.node.id);
|
|
2300
2301
|
},
|
|
2301
2302
|
onchange: function(e) {
|
|
2302
2303
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -2316,13 +2317,13 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2316
2317
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2317
2318
|
let r = this.getField("EVENT");
|
|
2318
2319
|
if (r.getOptions(!1), n) {
|
|
2319
|
-
let e =
|
|
2320
|
+
let e = Xn(this.node.id)?.[0];
|
|
2320
2321
|
r.setValue(e?.id ?? "");
|
|
2321
2322
|
}
|
|
2322
2323
|
this.onEventChange_(r.getValue());
|
|
2323
2324
|
},
|
|
2324
2325
|
onEventChange_: function(e) {
|
|
2325
|
-
let t =
|
|
2326
|
+
let t = Zn(e);
|
|
2326
2327
|
if (!t) {
|
|
2327
2328
|
console.assert(!1);
|
|
2328
2329
|
return;
|
|
@@ -2359,7 +2360,7 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2359
2360
|
"x-runtime-lib.instance",
|
|
2360
2361
|
!0
|
|
2361
2362
|
]);
|
|
2362
|
-
let t =
|
|
2363
|
+
let t = Yn(this.event.kind);
|
|
2363
2364
|
if (this.event.params) for (let n = 0; n < this.event.params.length; n++) {
|
|
2364
2365
|
let { key: r, name: i } = this.event.params[n];
|
|
2365
2366
|
e.push([
|
|
@@ -2382,7 +2383,7 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2382
2383
|
return;
|
|
2383
2384
|
}
|
|
2384
2385
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
2385
|
-
let t =
|
|
2386
|
+
let t = Zn(this.event.id);
|
|
2386
2387
|
if (!t) {
|
|
2387
2388
|
this.setWarningText(P("WARN_EVENT_NOT_FOUND"));
|
|
2388
2389
|
return;
|
|
@@ -2425,12 +2426,12 @@ ${Ae(r, 4)}${Ae(i, 2)} } catch (e) {
|
|
|
2425
2426
|
},
|
|
2426
2427
|
initData_: function() {
|
|
2427
2428
|
if (this.node.id) return;
|
|
2428
|
-
let e =
|
|
2429
|
+
let e = zn("triggerEvent")?.[0];
|
|
2429
2430
|
if (!e) return;
|
|
2430
2431
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2431
2432
|
let t = this.getField("NODE");
|
|
2432
2433
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
2433
|
-
let n =
|
|
2434
|
+
let n = $n(this.node.id)?.[0];
|
|
2434
2435
|
if (!n) return;
|
|
2435
2436
|
this.event.id = n.id, this.event.kind = n.kind, this.event.names = n.names, this.event.params = n.params;
|
|
2436
2437
|
let r = this.getField("EVENT");
|
|
@@ -2448,10 +2449,10 @@ ${Ae(r, 4)}${Ae(i, 2)} } catch (e) {
|
|
|
2448
2449
|
}, 0);
|
|
2449
2450
|
},
|
|
2450
2451
|
genNodeOpts_: function() {
|
|
2451
|
-
return
|
|
2452
|
+
return Bn("triggerEvent");
|
|
2452
2453
|
},
|
|
2453
2454
|
genEventOpts_: function() {
|
|
2454
|
-
return
|
|
2455
|
+
return tr(this.node.id);
|
|
2455
2456
|
},
|
|
2456
2457
|
onchange: function(e) {
|
|
2457
2458
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -2471,13 +2472,13 @@ ${Ae(r, 4)}${Ae(i, 2)} } catch (e) {
|
|
|
2471
2472
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2472
2473
|
let r = this.getField("EVENT");
|
|
2473
2474
|
if (r.getOptions(!1), n) {
|
|
2474
|
-
let e =
|
|
2475
|
+
let e = $n(this.node.id)?.[0];
|
|
2475
2476
|
r.setValue(e?.id ?? "");
|
|
2476
2477
|
}
|
|
2477
2478
|
this.onEventChange_(r.getValue());
|
|
2478
2479
|
},
|
|
2479
2480
|
onEventChange_: function(e) {
|
|
2480
|
-
let t =
|
|
2481
|
+
let t = er(e);
|
|
2481
2482
|
if (!t) {
|
|
2482
2483
|
console.assert(!1);
|
|
2483
2484
|
return;
|
|
@@ -2495,7 +2496,7 @@ ${Ae(r, 4)}${Ae(i, 2)} } catch (e) {
|
|
|
2495
2496
|
let { type: t } = this.event.params[e], n = this.getInput("PARAM" + e);
|
|
2496
2497
|
n.connection.setShadowDom(null);
|
|
2497
2498
|
let r = n.connection.targetBlock();
|
|
2498
|
-
r && !r.isShadow() && r.dispose(), n.setCheck(
|
|
2499
|
+
r && !r.isShadow() && r.dispose(), n.setCheck(an(t));
|
|
2499
2500
|
}
|
|
2500
2501
|
}
|
|
2501
2502
|
let e = !1;
|
|
@@ -2534,7 +2535,7 @@ ${Ae(r, 4)}${Ae(i, 2)} } catch (e) {
|
|
|
2534
2535
|
return;
|
|
2535
2536
|
}
|
|
2536
2537
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
2537
|
-
let t =
|
|
2538
|
+
let t = er(this.event.id);
|
|
2538
2539
|
if (!t) {
|
|
2539
2540
|
this.setWarningText(P("WARN_EVENT_NOT_FOUND"));
|
|
2540
2541
|
return;
|
|
@@ -2603,9 +2604,9 @@ ${g.statementToCode(e, "HANDLE")}};
|
|
|
2603
2604
|
},
|
|
2604
2605
|
updateShadow_: function() {
|
|
2605
2606
|
if (this.isInsertionMarker()) return;
|
|
2606
|
-
let e =
|
|
2607
|
+
let e = un("title");
|
|
2607
2608
|
this.getInput("TITLE").connection.setShadowDom(e);
|
|
2608
|
-
let t =
|
|
2609
|
+
let t = un("text");
|
|
2609
2610
|
this.getInput("TEXT").connection.setShadowDom(t);
|
|
2610
2611
|
},
|
|
2611
2612
|
ensureBlocks_: function() {
|
|
@@ -2638,11 +2639,11 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
2638
2639
|
},
|
|
2639
2640
|
updateShadow_: function() {
|
|
2640
2641
|
if (this.isInsertionMarker()) return;
|
|
2641
|
-
let e =
|
|
2642
|
+
let e = un("title");
|
|
2642
2643
|
this.getInput("TITLE").connection.setShadowDom(e);
|
|
2643
|
-
let t =
|
|
2644
|
+
let t = un("label");
|
|
2644
2645
|
this.getInput("LABEL").connection.setShadowDom(t);
|
|
2645
|
-
let n =
|
|
2646
|
+
let n = un("");
|
|
2646
2647
|
this.getInput("VALUE").connection.setShadowDom(n);
|
|
2647
2648
|
},
|
|
2648
2649
|
ensureBlocks_: function() {
|
|
@@ -2695,12 +2696,12 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
2695
2696
|
},
|
|
2696
2697
|
initData_: function() {
|
|
2697
2698
|
if (this.node.id) return;
|
|
2698
|
-
let e =
|
|
2699
|
+
let e = zn("callMethod")?.[0];
|
|
2699
2700
|
if (!e) return;
|
|
2700
2701
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2701
2702
|
let t = this.getField("NODE");
|
|
2702
2703
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
2703
|
-
let n =
|
|
2704
|
+
let n = rr(this.node.id)?.[0];
|
|
2704
2705
|
if (!n) return;
|
|
2705
2706
|
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;
|
|
2706
2707
|
let r = this.getField("METHOD");
|
|
@@ -2718,10 +2719,10 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
2718
2719
|
}, 0);
|
|
2719
2720
|
},
|
|
2720
2721
|
genNodeOpts_: function() {
|
|
2721
|
-
return
|
|
2722
|
+
return Bn("callMethod");
|
|
2722
2723
|
},
|
|
2723
2724
|
genMethodOpts_: function() {
|
|
2724
|
-
return
|
|
2725
|
+
return ar(this.node.id);
|
|
2725
2726
|
},
|
|
2726
2727
|
onchange: function(e) {
|
|
2727
2728
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -2741,13 +2742,13 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
2741
2742
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2742
2743
|
let r = this.getField("METHOD");
|
|
2743
2744
|
if (r.getOptions(!1), n) {
|
|
2744
|
-
let e =
|
|
2745
|
+
let e = rr(this.node.id)?.[0];
|
|
2745
2746
|
r.setValue(e?.id ?? "");
|
|
2746
2747
|
}
|
|
2747
2748
|
this.onMethodChange_(r.getValue());
|
|
2748
2749
|
},
|
|
2749
2750
|
onMethodChange_: function(e) {
|
|
2750
|
-
let t =
|
|
2751
|
+
let t = ir(e);
|
|
2751
2752
|
if (!t) {
|
|
2752
2753
|
console.assert(!1);
|
|
2753
2754
|
return;
|
|
@@ -2803,7 +2804,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
2803
2804
|
},
|
|
2804
2805
|
ensureBlocks_: function() {
|
|
2805
2806
|
if (this.isInsertionMarker()) return;
|
|
2806
|
-
let e = [], t =
|
|
2807
|
+
let e = [], t = nr(this.method.kind);
|
|
2807
2808
|
if (this.method.outputs) for (let n = 0; n < this.method.outputs.length; n++) {
|
|
2808
2809
|
let { key: r, name: i } = this.method.outputs[n];
|
|
2809
2810
|
e.push([
|
|
@@ -2826,7 +2827,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
2826
2827
|
return;
|
|
2827
2828
|
}
|
|
2828
2829
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
2829
|
-
let t =
|
|
2830
|
+
let t = ir(this.method.id);
|
|
2830
2831
|
if (!t) {
|
|
2831
2832
|
this.setWarningText(P("WARN_METHOD_NOT_FOUND"));
|
|
2832
2833
|
return;
|
|
@@ -2878,7 +2879,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
2878
2879
|
let o = "";
|
|
2879
2880
|
if (r.method.outputs) for (let { key: e } of r.method.outputs) o += `${t}const __output$${e}__ = __outputs__[${n(e)}];\n`;
|
|
2880
2881
|
if (r.method.kind === "customMethod") {
|
|
2881
|
-
let { kind: e, nodeId: t, methodKey: n } =
|
|
2882
|
+
let { kind: e, nodeId: t, methodKey: n } = et(r.method.id), s = je(e, t, n);
|
|
2882
2883
|
if (r.method.outputs && r.method.outputs.length > 0) {
|
|
2883
2884
|
let e = g.statementToCode(r, "HANDLE");
|
|
2884
2885
|
return `{
|
|
@@ -2907,12 +2908,12 @@ ${o}${e}}
|
|
|
2907
2908
|
},
|
|
2908
2909
|
initData_: function() {
|
|
2909
2910
|
if (this.node.id) return;
|
|
2910
|
-
let e =
|
|
2911
|
+
let e = zn("implementMethod")?.[0];
|
|
2911
2912
|
if (!e) return;
|
|
2912
2913
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2913
2914
|
let t = this.getField("NODE");
|
|
2914
2915
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
2915
|
-
let n =
|
|
2916
|
+
let n = sr(this.node.id)?.[0];
|
|
2916
2917
|
if (!n) return;
|
|
2917
2918
|
this.method.id = n.id, this.method.kind = n.kind, this.method.names = n.names, this.method.inputs = n.inputs;
|
|
2918
2919
|
let r = this.getField("METHOD");
|
|
@@ -2930,10 +2931,10 @@ ${o}${e}}
|
|
|
2930
2931
|
}, 0);
|
|
2931
2932
|
},
|
|
2932
2933
|
genNodeOpts_: function() {
|
|
2933
|
-
return
|
|
2934
|
+
return Bn("implementMethod");
|
|
2934
2935
|
},
|
|
2935
2936
|
genMethodOpts_: function() {
|
|
2936
|
-
return
|
|
2937
|
+
return lr(this.node.id);
|
|
2937
2938
|
},
|
|
2938
2939
|
onchange: function(e) {
|
|
2939
2940
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -2953,13 +2954,13 @@ ${o}${e}}
|
|
|
2953
2954
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2954
2955
|
let r = this.getField("METHOD");
|
|
2955
2956
|
if (r.getOptions(!1), n) {
|
|
2956
|
-
let e =
|
|
2957
|
+
let e = sr(this.node.id)?.[0];
|
|
2957
2958
|
r.setValue(e?.id ?? "");
|
|
2958
2959
|
}
|
|
2959
2960
|
r.setValue(r.getValue());
|
|
2960
2961
|
},
|
|
2961
2962
|
onMethodChange_: function(e) {
|
|
2962
|
-
let t =
|
|
2963
|
+
let t = cr(e);
|
|
2963
2964
|
if (!t) {
|
|
2964
2965
|
console.assert(!1);
|
|
2965
2966
|
return;
|
|
@@ -2993,7 +2994,7 @@ ${o}${e}}
|
|
|
2993
2994
|
"x-runtime-lib.instance",
|
|
2994
2995
|
!0
|
|
2995
2996
|
]);
|
|
2996
|
-
let t =
|
|
2997
|
+
let t = or(this.method.kind);
|
|
2997
2998
|
if (this.method.inputs) for (let n = 0; n < this.method.inputs.length; n++) {
|
|
2998
2999
|
let { key: r, name: i } = this.method.inputs[n];
|
|
2999
3000
|
e.push([
|
|
@@ -3016,7 +3017,7 @@ ${o}${e}}
|
|
|
3016
3017
|
return;
|
|
3017
3018
|
}
|
|
3018
3019
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
3019
|
-
let t =
|
|
3020
|
+
let t = cr(this.method.id);
|
|
3020
3021
|
if (!t) {
|
|
3021
3022
|
this.setWarningText(P("WARN_METHOD_NOT_FOUND"));
|
|
3022
3023
|
return;
|
|
@@ -3032,7 +3033,7 @@ ${o}${e}}
|
|
|
3032
3033
|
this.setWarningText(null);
|
|
3033
3034
|
}
|
|
3034
3035
|
}, g.forBlock.implement_app_method_v1 = function(e) {
|
|
3035
|
-
let t = g.INDENT, n = g.quote_, r = e, { kind: i, nodeId: a, methodKey: o } =
|
|
3036
|
+
let t = g.INDENT, n = g.quote_, r = e, { kind: i, nodeId: a, methodKey: o } = et(r.method.id), s = "";
|
|
3036
3037
|
if (r.method.inputs) for (let { key: e } of r.method.inputs) s += `${t}const __input$${e}__ = __inputs__[${n(e)}];\n`;
|
|
3037
3038
|
let c = g.statementToCode(r, "HANDLE");
|
|
3038
3039
|
return `async function ${je(i, a, o)}(__instance__, __inputs__) {
|
|
@@ -3058,17 +3059,17 @@ ${c}${t}return __outputs__;
|
|
|
3058
3059
|
},
|
|
3059
3060
|
initData_: function() {
|
|
3060
3061
|
if (this.node.id) return;
|
|
3061
|
-
let e =
|
|
3062
|
+
let e = zn("implementMethod")?.[0];
|
|
3062
3063
|
if (!e) return;
|
|
3063
3064
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
3064
3065
|
let t = this.getField("NODE");
|
|
3065
3066
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
3066
|
-
let n =
|
|
3067
|
+
let n = sr(this.node.id)?.[0];
|
|
3067
3068
|
if (!n) return;
|
|
3068
3069
|
this.method.id = n.id, this.method.kind = n.kind, this.method.names = n.names;
|
|
3069
3070
|
let r = this.getField("METHOD");
|
|
3070
3071
|
r.getOptions(!1), r.setValue(this.method.id);
|
|
3071
|
-
let i =
|
|
3072
|
+
let i = ur(this.method.id)?.[0];
|
|
3072
3073
|
if (!i) return;
|
|
3073
3074
|
this.output.key = i.key, this.output.name = i.name, this.output.type = i.type;
|
|
3074
3075
|
let a = this.getField("OUTPUT");
|
|
@@ -3087,13 +3088,13 @@ ${c}${t}return __outputs__;
|
|
|
3087
3088
|
}, 0);
|
|
3088
3089
|
},
|
|
3089
3090
|
genNodeOpts_: function() {
|
|
3090
|
-
return
|
|
3091
|
+
return Bn("implementMethod");
|
|
3091
3092
|
},
|
|
3092
3093
|
genMethodOpts_: function() {
|
|
3093
|
-
return
|
|
3094
|
+
return lr(this.node.id);
|
|
3094
3095
|
},
|
|
3095
3096
|
genOutputOpts_: function() {
|
|
3096
|
-
return
|
|
3097
|
+
return fr(this.method.id);
|
|
3097
3098
|
},
|
|
3098
3099
|
onchange: function(e) {
|
|
3099
3100
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -3113,13 +3114,13 @@ ${c}${t}return __outputs__;
|
|
|
3113
3114
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
3114
3115
|
let r = this.getField("METHOD");
|
|
3115
3116
|
if (r.getOptions(!1), n) {
|
|
3116
|
-
let e =
|
|
3117
|
+
let e = sr(this.node.id)?.[0];
|
|
3117
3118
|
r.setValue(e?.id ?? "");
|
|
3118
3119
|
}
|
|
3119
3120
|
r.setValue(r.getValue());
|
|
3120
3121
|
},
|
|
3121
3122
|
onMethodChange_: function(e) {
|
|
3122
|
-
let t =
|
|
3123
|
+
let t = cr(e);
|
|
3123
3124
|
if (!t) {
|
|
3124
3125
|
console.assert(!1);
|
|
3125
3126
|
return;
|
|
@@ -3127,14 +3128,14 @@ ${c}${t}return __outputs__;
|
|
|
3127
3128
|
let n = this.method.id !== t.id;
|
|
3128
3129
|
this.method.id = t.id, this.method.kind = t.kind, this.method.names = t.names;
|
|
3129
3130
|
let r = this.getField("OUTPUT");
|
|
3130
|
-
if (r.getOptions(!1), n || !
|
|
3131
|
-
let e =
|
|
3131
|
+
if (r.getOptions(!1), n || !dr(this.method.id, this.output.key)) {
|
|
3132
|
+
let e = ur(this.method.id)?.[0];
|
|
3132
3133
|
r.setValue(e?.key ?? "");
|
|
3133
3134
|
}
|
|
3134
3135
|
this.onOutputChange_(r.getValue());
|
|
3135
3136
|
},
|
|
3136
3137
|
onOutputChange_: function(e) {
|
|
3137
|
-
let t =
|
|
3138
|
+
let t = dr(this.method.id, e);
|
|
3138
3139
|
if (!t) {
|
|
3139
3140
|
console.assert(!1);
|
|
3140
3141
|
return;
|
|
@@ -3146,7 +3147,7 @@ ${c}${t}return __outputs__;
|
|
|
3146
3147
|
e.connection.setShadowDom(null);
|
|
3147
3148
|
let t = e.connection.targetBlock();
|
|
3148
3149
|
t && !t.isShadow() && t.dispose();
|
|
3149
|
-
let n =
|
|
3150
|
+
let n = an(this.output.type);
|
|
3150
3151
|
e.setCheck(n);
|
|
3151
3152
|
},
|
|
3152
3153
|
updateShadows_: function() {
|
|
@@ -3165,7 +3166,7 @@ ${c}${t}return __outputs__;
|
|
|
3165
3166
|
return;
|
|
3166
3167
|
}
|
|
3167
3168
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
3168
|
-
let t =
|
|
3169
|
+
let t = cr(this.method.id);
|
|
3169
3170
|
if (!t) {
|
|
3170
3171
|
this.setWarningText(P("WARN_METHOD_NOT_FOUND"));
|
|
3171
3172
|
return;
|
|
@@ -3175,7 +3176,7 @@ ${c}${t}return __outputs__;
|
|
|
3175
3176
|
return;
|
|
3176
3177
|
}
|
|
3177
3178
|
t.names !== this.method.names && (this.method.names = t.names);
|
|
3178
|
-
let n =
|
|
3179
|
+
let n = dr(this.method.id, this.output.key);
|
|
3179
3180
|
if (!n) {
|
|
3180
3181
|
this.setWarningText(P("WARN_OUTPUT_NOT_FOUND"));
|
|
3181
3182
|
return;
|
|
@@ -3233,12 +3234,12 @@ ${c}${t}return __outputs__;
|
|
|
3233
3234
|
},
|
|
3234
3235
|
initData_: function() {
|
|
3235
3236
|
if (this.app.id) return;
|
|
3236
|
-
let e =
|
|
3237
|
+
let e = On()?.[0];
|
|
3237
3238
|
if (!e) return;
|
|
3238
3239
|
this.app.id = e.id, this.app.name = e.name;
|
|
3239
3240
|
let t = this.getField("APP");
|
|
3240
3241
|
t.getOptions(!1), t.setValue(this.app.id);
|
|
3241
|
-
let n =
|
|
3242
|
+
let n = pr(this.app.id)?.[0];
|
|
3242
3243
|
if (!n) return;
|
|
3243
3244
|
this.page.id = n.id, this.page.name = n.name;
|
|
3244
3245
|
let r = this.getField("PAGE");
|
|
@@ -3256,10 +3257,10 @@ ${c}${t}return __outputs__;
|
|
|
3256
3257
|
}, 0);
|
|
3257
3258
|
},
|
|
3258
3259
|
genAppOpts_: function() {
|
|
3259
|
-
return
|
|
3260
|
+
return An();
|
|
3260
3261
|
},
|
|
3261
3262
|
genPageOpts_: function() {
|
|
3262
|
-
return
|
|
3263
|
+
return hr(this.app.id);
|
|
3263
3264
|
},
|
|
3264
3265
|
onchange: function(e) {
|
|
3265
3266
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -3270,7 +3271,7 @@ ${c}${t}return __outputs__;
|
|
|
3270
3271
|
}
|
|
3271
3272
|
},
|
|
3272
3273
|
onAppChange_: function(e) {
|
|
3273
|
-
let t =
|
|
3274
|
+
let t = kn(e);
|
|
3274
3275
|
if (!t) {
|
|
3275
3276
|
console.assert(!1);
|
|
3276
3277
|
return;
|
|
@@ -3279,13 +3280,13 @@ ${c}${t}return __outputs__;
|
|
|
3279
3280
|
this.app.id = t.id, this.app.name = t.name;
|
|
3280
3281
|
let r = this.getField("PAGE");
|
|
3281
3282
|
if (r.getOptions(!1), n) {
|
|
3282
|
-
let e =
|
|
3283
|
+
let e = pr(this.app.id)?.[0];
|
|
3283
3284
|
r.setValue(e?.id ?? "");
|
|
3284
3285
|
}
|
|
3285
3286
|
this.onPageChange_(r.getValue());
|
|
3286
3287
|
},
|
|
3287
3288
|
onPageChange_: function(e) {
|
|
3288
|
-
let t =
|
|
3289
|
+
let t = mr(this.app.id, e);
|
|
3289
3290
|
if (!t) {
|
|
3290
3291
|
console.assert(!1);
|
|
3291
3292
|
return;
|
|
@@ -3293,13 +3294,13 @@ ${c}${t}return __outputs__;
|
|
|
3293
3294
|
this.page.id = t.id, this.page.name = t.name;
|
|
3294
3295
|
},
|
|
3295
3296
|
checkWarning_: function() {
|
|
3296
|
-
let e =
|
|
3297
|
+
let e = kn(this.app.id);
|
|
3297
3298
|
if (!e) {
|
|
3298
3299
|
this.setWarningText(P("WARN_APP_NOT_FOUND"));
|
|
3299
3300
|
return;
|
|
3300
3301
|
}
|
|
3301
3302
|
e.name !== this.app.name && (this.app.name = e.name);
|
|
3302
|
-
let t =
|
|
3303
|
+
let t = mr(this.app.id, this.page.id);
|
|
3303
3304
|
if (!t) {
|
|
3304
3305
|
this.setWarningText(P("WARN_PAGE_NOT_FOUND"));
|
|
3305
3306
|
return;
|
|
@@ -3318,7 +3319,7 @@ ${c}${t}return __outputs__;
|
|
|
3318
3319
|
},
|
|
3319
3320
|
initData_: function() {
|
|
3320
3321
|
if (this.comp.id) return;
|
|
3321
|
-
let e =
|
|
3322
|
+
let e = Kn()?.[0];
|
|
3322
3323
|
if (!e) return;
|
|
3323
3324
|
this.comp.id = e.id, this.comp.name = e.name;
|
|
3324
3325
|
let t = this.getField("COMP");
|
|
@@ -3333,7 +3334,7 @@ ${c}${t}return __outputs__;
|
|
|
3333
3334
|
}, 0);
|
|
3334
3335
|
},
|
|
3335
3336
|
genCompOpts_: function() {
|
|
3336
|
-
return
|
|
3337
|
+
return Jn();
|
|
3337
3338
|
},
|
|
3338
3339
|
onchange: function(e) {
|
|
3339
3340
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -3344,7 +3345,7 @@ ${c}${t}return __outputs__;
|
|
|
3344
3345
|
}
|
|
3345
3346
|
},
|
|
3346
3347
|
onCompChange_: function(e) {
|
|
3347
|
-
let t =
|
|
3348
|
+
let t = qn(e);
|
|
3348
3349
|
if (!t) {
|
|
3349
3350
|
console.assert(!1);
|
|
3350
3351
|
return;
|
|
@@ -3352,7 +3353,7 @@ ${c}${t}return __outputs__;
|
|
|
3352
3353
|
this.comp.id = t.id, this.comp.name = t.name;
|
|
3353
3354
|
},
|
|
3354
3355
|
checkWarning_: function() {
|
|
3355
|
-
let e =
|
|
3356
|
+
let e = qn(this.comp.id);
|
|
3356
3357
|
if (!e) {
|
|
3357
3358
|
this.setWarningText(P("WARN_COMP_NOT_FOUND"));
|
|
3358
3359
|
return;
|
|
@@ -3371,7 +3372,7 @@ ${c}${t}return __outputs__;
|
|
|
3371
3372
|
},
|
|
3372
3373
|
initData_: function() {
|
|
3373
3374
|
if (this.slot.id) return;
|
|
3374
|
-
let e =
|
|
3375
|
+
let e = yr()?.[0];
|
|
3375
3376
|
if (!e) return;
|
|
3376
3377
|
this.slot.id = e.id, this.slot.name = e.name;
|
|
3377
3378
|
let t = this.getField("SLOT");
|
|
@@ -3386,7 +3387,7 @@ ${c}${t}return __outputs__;
|
|
|
3386
3387
|
}, 0);
|
|
3387
3388
|
},
|
|
3388
3389
|
genSlotOpts_: function() {
|
|
3389
|
-
return
|
|
3390
|
+
return xr();
|
|
3390
3391
|
},
|
|
3391
3392
|
onchange: function(e) {
|
|
3392
3393
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -3397,7 +3398,7 @@ ${c}${t}return __outputs__;
|
|
|
3397
3398
|
}
|
|
3398
3399
|
},
|
|
3399
3400
|
onSlotChange_: function(e) {
|
|
3400
|
-
let t =
|
|
3401
|
+
let t = br(e);
|
|
3401
3402
|
if (!t) {
|
|
3402
3403
|
console.assert(!1);
|
|
3403
3404
|
return;
|
|
@@ -3405,7 +3406,7 @@ ${c}${t}return __outputs__;
|
|
|
3405
3406
|
this.slot.id = t.id, this.slot.name = t.name;
|
|
3406
3407
|
},
|
|
3407
3408
|
checkWarning_: function() {
|
|
3408
|
-
let e =
|
|
3409
|
+
let e = br(this.slot.id);
|
|
3409
3410
|
if (!e) {
|
|
3410
3411
|
this.setWarningText(P("WARN_SLOT_NOT_FOUND"));
|
|
3411
3412
|
return;
|
|
@@ -3429,12 +3430,12 @@ ${c}${t}return __outputs__;
|
|
|
3429
3430
|
},
|
|
3430
3431
|
initData_: function() {
|
|
3431
3432
|
if (this.node.id) return;
|
|
3432
|
-
let e =
|
|
3433
|
+
let e = zn("getProperty")?.[0];
|
|
3433
3434
|
if (!e) return;
|
|
3434
3435
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
3435
3436
|
let t = this.getField("NODE");
|
|
3436
3437
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
3437
|
-
let n =
|
|
3438
|
+
let n = gr(this.node.id, "read")?.[0];
|
|
3438
3439
|
if (!n) return;
|
|
3439
3440
|
this.property.id = n.id, this.property.kind = n.kind, this.property.names = n.names;
|
|
3440
3441
|
let r = this.getField("PROPERTY");
|
|
@@ -3452,10 +3453,10 @@ ${c}${t}return __outputs__;
|
|
|
3452
3453
|
}, 0);
|
|
3453
3454
|
},
|
|
3454
3455
|
genNodeOpts_: function() {
|
|
3455
|
-
return
|
|
3456
|
+
return Bn("getProperty");
|
|
3456
3457
|
},
|
|
3457
3458
|
genPropertyOpts_: function() {
|
|
3458
|
-
return
|
|
3459
|
+
return vr(this.node.id, "read");
|
|
3459
3460
|
},
|
|
3460
3461
|
onchange: function(e) {
|
|
3461
3462
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -3475,13 +3476,13 @@ ${c}${t}return __outputs__;
|
|
|
3475
3476
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
3476
3477
|
let r = this.getField("PROPERTY");
|
|
3477
3478
|
if (r.getOptions(!1), n) {
|
|
3478
|
-
let e =
|
|
3479
|
+
let e = gr(this.node.id, "read")?.[0];
|
|
3479
3480
|
r.setValue(e?.id ?? "");
|
|
3480
3481
|
}
|
|
3481
3482
|
this.onPropertyChange_(r.getValue());
|
|
3482
3483
|
},
|
|
3483
3484
|
onPropertyChange_: function(e) {
|
|
3484
|
-
let t =
|
|
3485
|
+
let t = _r(e);
|
|
3485
3486
|
if (!t) {
|
|
3486
3487
|
console.assert(!1);
|
|
3487
3488
|
return;
|
|
@@ -3520,7 +3521,7 @@ ${c}${t}return __outputs__;
|
|
|
3520
3521
|
return;
|
|
3521
3522
|
}
|
|
3522
3523
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
3523
|
-
let t =
|
|
3524
|
+
let t = _r(this.property.id);
|
|
3524
3525
|
if (!t) {
|
|
3525
3526
|
this.setWarningText(P("WARN_PROPERTY_NOT_FOUND"));
|
|
3526
3527
|
return;
|
|
@@ -3548,12 +3549,12 @@ ${c}${t}return __outputs__;
|
|
|
3548
3549
|
},
|
|
3549
3550
|
initData_: function() {
|
|
3550
3551
|
if (this.node.id) return;
|
|
3551
|
-
let e =
|
|
3552
|
+
let e = zn("setProperty")?.[0];
|
|
3552
3553
|
if (!e) return;
|
|
3553
3554
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
3554
3555
|
let t = this.getField("NODE");
|
|
3555
3556
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
3556
|
-
let n =
|
|
3557
|
+
let n = gr(this.node.id, "write")?.[0];
|
|
3557
3558
|
if (!n) return;
|
|
3558
3559
|
this.property.id = n.id, this.property.kind = n.kind, this.property.names = n.names;
|
|
3559
3560
|
let r = this.getField("PROPERTY");
|
|
@@ -3571,10 +3572,10 @@ ${c}${t}return __outputs__;
|
|
|
3571
3572
|
}, 0);
|
|
3572
3573
|
},
|
|
3573
3574
|
genNodeOpts_: function() {
|
|
3574
|
-
return
|
|
3575
|
+
return Bn("setProperty");
|
|
3575
3576
|
},
|
|
3576
3577
|
genPropertyOpts_: function() {
|
|
3577
|
-
return
|
|
3578
|
+
return vr(this.node.id, "write");
|
|
3578
3579
|
},
|
|
3579
3580
|
onchange: function(e) {
|
|
3580
3581
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -3594,13 +3595,13 @@ ${c}${t}return __outputs__;
|
|
|
3594
3595
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
3595
3596
|
let r = this.getField("PROPERTY");
|
|
3596
3597
|
if (r.getOptions(!1), n) {
|
|
3597
|
-
let e =
|
|
3598
|
+
let e = gr(this.node.id, "write")?.[0];
|
|
3598
3599
|
r.setValue(e?.id ?? "");
|
|
3599
3600
|
}
|
|
3600
3601
|
this.onPropertyChange_(r.getValue());
|
|
3601
3602
|
},
|
|
3602
3603
|
onPropertyChange_: function(e) {
|
|
3603
|
-
let t =
|
|
3604
|
+
let t = _r(e);
|
|
3604
3605
|
if (!t) {
|
|
3605
3606
|
console.assert(!1);
|
|
3606
3607
|
return;
|
|
@@ -3621,7 +3622,7 @@ ${c}${t}return __outputs__;
|
|
|
3621
3622
|
},
|
|
3622
3623
|
updateShadow_: function() {
|
|
3623
3624
|
if (this.isInsertionMarker()) return;
|
|
3624
|
-
let e =
|
|
3625
|
+
let e = _r(this.property.id);
|
|
3625
3626
|
if (!e) return;
|
|
3626
3627
|
let t = this.getInput("INSTANCE");
|
|
3627
3628
|
if (t) {
|
|
@@ -3633,7 +3634,7 @@ ${c}${t}return __outputs__;
|
|
|
3633
3634
|
if (n) {
|
|
3634
3635
|
n.setShadowDom(null);
|
|
3635
3636
|
let t = n.connection?.targetBlock();
|
|
3636
|
-
t && t.dispose(), e.meta.element ? n.setCheck(
|
|
3637
|
+
t && t.dispose(), e.meta.element ? n.setCheck(on(e.meta.raw)).setShadowDom(xn(e.meta.raw)) : n.setCheck(an(e.meta.raw.type)).setShadowDom(H(e.meta.raw.type));
|
|
3637
3638
|
}
|
|
3638
3639
|
},
|
|
3639
3640
|
checkWarning_: function() {
|
|
@@ -3647,7 +3648,7 @@ ${c}${t}return __outputs__;
|
|
|
3647
3648
|
return;
|
|
3648
3649
|
}
|
|
3649
3650
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
3650
|
-
let t =
|
|
3651
|
+
let t = _r(this.property.id);
|
|
3651
3652
|
if (!t) {
|
|
3652
3653
|
this.setWarningText(P("WARN_PROPERTY_NOT_FOUND"));
|
|
3653
3654
|
return;
|
|
@@ -3676,7 +3677,7 @@ ${c}${t}return __outputs__;
|
|
|
3676
3677
|
},
|
|
3677
3678
|
initData_: function() {
|
|
3678
3679
|
if (this.state.id) return;
|
|
3679
|
-
let e =
|
|
3680
|
+
let e = Vn()?.[0];
|
|
3680
3681
|
if (!e) return;
|
|
3681
3682
|
this.state.id = e.id, this.state.name = e.name, this.state.type = e.type;
|
|
3682
3683
|
let t = this.getField("STATE");
|
|
@@ -3691,7 +3692,7 @@ ${c}${t}return __outputs__;
|
|
|
3691
3692
|
}, 0);
|
|
3692
3693
|
},
|
|
3693
3694
|
genStateOpts_: function() {
|
|
3694
|
-
return
|
|
3695
|
+
return Un();
|
|
3695
3696
|
},
|
|
3696
3697
|
onchange: function(e) {
|
|
3697
3698
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -3700,7 +3701,7 @@ ${c}${t}return __outputs__;
|
|
|
3700
3701
|
}
|
|
3701
3702
|
},
|
|
3702
3703
|
onStateChange_: function(e) {
|
|
3703
|
-
let t =
|
|
3704
|
+
let t = Hn(e);
|
|
3704
3705
|
if (!t) {
|
|
3705
3706
|
console.assert(!1);
|
|
3706
3707
|
return;
|
|
@@ -3708,7 +3709,7 @@ ${c}${t}return __outputs__;
|
|
|
3708
3709
|
this.state.id = t.id, this.state.name = t.name, this.state.type = t.type;
|
|
3709
3710
|
},
|
|
3710
3711
|
checkWarning_: function() {
|
|
3711
|
-
let e =
|
|
3712
|
+
let e = Hn(this.state.id);
|
|
3712
3713
|
if (!e) {
|
|
3713
3714
|
this.setWarningText(P("WARN_STATE_NOT_FOUND"));
|
|
3714
3715
|
return;
|
|
@@ -3732,7 +3733,7 @@ ${c}${t}return __outputs__;
|
|
|
3732
3733
|
},
|
|
3733
3734
|
initData_: function() {
|
|
3734
3735
|
if (this.state.id) return;
|
|
3735
|
-
let e =
|
|
3736
|
+
let e = Vn()?.[0];
|
|
3736
3737
|
if (!e) return;
|
|
3737
3738
|
this.state.id = e.id, this.state.name = e.name, this.state.type = e.type;
|
|
3738
3739
|
let t = this.getField("STATE");
|
|
@@ -3745,7 +3746,7 @@ ${c}${t}return __outputs__;
|
|
|
3745
3746
|
this.state.id = e.state?.id ?? "", this.state.name = e.state?.name ?? "", this.state.type = e.state?.type ?? "string";
|
|
3746
3747
|
},
|
|
3747
3748
|
genStateOpts_: function() {
|
|
3748
|
-
return
|
|
3749
|
+
return Un();
|
|
3749
3750
|
},
|
|
3750
3751
|
onchange: function(e) {
|
|
3751
3752
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -3754,7 +3755,7 @@ ${c}${t}return __outputs__;
|
|
|
3754
3755
|
}
|
|
3755
3756
|
},
|
|
3756
3757
|
onStateChange_: function(e) {
|
|
3757
|
-
let t =
|
|
3758
|
+
let t = Hn(e);
|
|
3758
3759
|
if (!t) {
|
|
3759
3760
|
console.assert(!1);
|
|
3760
3761
|
return;
|
|
@@ -3766,11 +3767,11 @@ ${c}${t}return __outputs__;
|
|
|
3766
3767
|
this.getInput("VALUE").setShadowDom(null);
|
|
3767
3768
|
let e = this.getInput("VALUE").connection.targetBlock();
|
|
3768
3769
|
e && e.dispose();
|
|
3769
|
-
let t =
|
|
3770
|
+
let t = an(this.state.type), n = H(this.state.type);
|
|
3770
3771
|
this.getInput("VALUE").setCheck(t).setShadowDom(n);
|
|
3771
3772
|
},
|
|
3772
3773
|
checkWarning_: function() {
|
|
3773
|
-
let e =
|
|
3774
|
+
let e = Hn(this.state.id);
|
|
3774
3775
|
if (!e) {
|
|
3775
3776
|
this.setWarningText(P("WARN_STATE_NOT_FOUND"));
|
|
3776
3777
|
return;
|
|
@@ -3838,7 +3839,7 @@ function ${g.FUNCTION_NAME_PLACEHOLDER_}(c1, c2, ratio) {
|
|
|
3838
3839
|
type: "field_colour",
|
|
3839
3840
|
name: "COLOR",
|
|
3840
3841
|
colour: "#ff0000",
|
|
3841
|
-
colourOptions:
|
|
3842
|
+
colourOptions: cn,
|
|
3842
3843
|
columns: 14
|
|
3843
3844
|
}],
|
|
3844
3845
|
output: "Color",
|
|
@@ -3904,7 +3905,7 @@ function ${g.FUNCTION_NAME_PLACEHOLDER_}(r, g, b) {
|
|
|
3904
3905
|
};
|
|
3905
3906
|
//#endregion
|
|
3906
3907
|
//#region src/core/blocks/common/parameter/v1/whiteList.ts
|
|
3907
|
-
var
|
|
3908
|
+
var Cr = [
|
|
3908
3909
|
"add_data_v",
|
|
3909
3910
|
"call_app_method_v",
|
|
3910
3911
|
"call_func_v",
|
|
@@ -3920,18 +3921,18 @@ var xr = [
|
|
|
3920
3921
|
"query_data_v",
|
|
3921
3922
|
"update_data_v"
|
|
3922
3923
|
];
|
|
3923
|
-
function
|
|
3924
|
-
return !!
|
|
3924
|
+
function wr(e) {
|
|
3925
|
+
return !!Cr.find((t) => e.startsWith(t));
|
|
3925
3926
|
}
|
|
3926
3927
|
//#endregion
|
|
3927
3928
|
//#region src/core/blocks/common/parameter/v1/index.ts
|
|
3928
|
-
var
|
|
3929
|
+
var Tr = p.xml;
|
|
3929
3930
|
y.parameter_v1 = {
|
|
3930
3931
|
init: function() {
|
|
3931
3932
|
this.key = "", this.name = "", this.locale = !1, this.appendDummyInput().appendField("", "LABEL"), this.setOutput(!0), this.setColour(220);
|
|
3932
3933
|
},
|
|
3933
3934
|
mutationToDom: function() {
|
|
3934
|
-
let e =
|
|
3935
|
+
let e = Tr.createElement("mutation");
|
|
3935
3936
|
return e.setAttribute("key", this.key), e.setAttribute("name", this.name), e.setAttribute("locale", this.locale ? "TRUE" : "FALSE"), e;
|
|
3936
3937
|
},
|
|
3937
3938
|
domToMutation: function(e) {
|
|
@@ -3968,11 +3969,11 @@ y.parameter_v1 = {
|
|
|
3968
3969
|
},
|
|
3969
3970
|
tryDuplicate_: function(e) {
|
|
3970
3971
|
let t = this.workspace.getBlockById(e.oldParentId);
|
|
3971
|
-
if (t &&
|
|
3972
|
+
if (t && wr(t.type)) try {
|
|
3972
3973
|
x.disable();
|
|
3973
3974
|
let n = t.getInput(e.oldInputName)?.connection;
|
|
3974
3975
|
if (n) {
|
|
3975
|
-
let e =
|
|
3976
|
+
let e = ln(this.workspace, this.key, this.name, this.locale);
|
|
3976
3977
|
n.connect(e.outputConnection);
|
|
3977
3978
|
}
|
|
3978
3979
|
} finally {
|
|
@@ -3981,14 +3982,14 @@ y.parameter_v1 = {
|
|
|
3981
3982
|
},
|
|
3982
3983
|
updateShape_: function() {
|
|
3983
3984
|
if (this.locale) {
|
|
3984
|
-
let { i18n: e } =
|
|
3985
|
+
let { i18n: e } = ct;
|
|
3985
3986
|
this.setFieldValue(e.global.t(this.name), "LABEL");
|
|
3986
3987
|
} else this.setFieldValue(this.name, "LABEL");
|
|
3987
3988
|
},
|
|
3988
3989
|
checkWarning_: function() {
|
|
3989
3990
|
let e = this.getSurroundParent();
|
|
3990
3991
|
for (; e;) {
|
|
3991
|
-
if (
|
|
3992
|
+
if (wr(e.type)) for (let t of e.inputList) {
|
|
3992
3993
|
let e = t.connection?.targetBlock();
|
|
3993
3994
|
if (!e || e.type !== "parameter_v1") continue;
|
|
3994
3995
|
let n = e;
|
|
@@ -4008,28 +4009,28 @@ y.parameter_v1 = {
|
|
|
4008
4009
|
};
|
|
4009
4010
|
//#endregion
|
|
4010
4011
|
//#region src/core/utils/compute/func.ts
|
|
4011
|
-
function
|
|
4012
|
+
function Er(e) {
|
|
4012
4013
|
let t = S.compute.spaces.find((t) => t.id === e);
|
|
4013
4014
|
return t ? t.funcs : [];
|
|
4014
4015
|
}
|
|
4015
|
-
function
|
|
4016
|
+
function Dr(e, t) {
|
|
4016
4017
|
let n = S.compute.spaces.find((t) => t.id === e);
|
|
4017
4018
|
if (n) return n.funcs.find((e) => e.id === t);
|
|
4018
4019
|
}
|
|
4019
|
-
function
|
|
4020
|
+
function Or(e) {
|
|
4020
4021
|
let t = [];
|
|
4021
|
-
return
|
|
4022
|
+
return Er(e).forEach(({ id: e, name: n }) => {
|
|
4022
4023
|
t.push([n, e]);
|
|
4023
4024
|
}), F(t);
|
|
4024
4025
|
}
|
|
4025
|
-
function
|
|
4026
|
+
function kr() {
|
|
4026
4027
|
return S.compute.activeFunc;
|
|
4027
4028
|
}
|
|
4028
|
-
function
|
|
4029
|
+
function Ar(e) {
|
|
4029
4030
|
let { activeFunc: t } = S.compute;
|
|
4030
4031
|
return t.outputs?.find((t) => t.id === e);
|
|
4031
4032
|
}
|
|
4032
|
-
function
|
|
4033
|
+
function jr() {
|
|
4033
4034
|
let { activeFunc: e } = S.compute, t = [];
|
|
4034
4035
|
return e.outputs?.forEach(({ id: e, name: n }) => {
|
|
4035
4036
|
t.push([n, e]);
|
|
@@ -4037,18 +4038,18 @@ function kr() {
|
|
|
4037
4038
|
}
|
|
4038
4039
|
//#endregion
|
|
4039
4040
|
//#region src/core/utils/compute/space.ts
|
|
4040
|
-
function
|
|
4041
|
+
function Mr(e) {
|
|
4041
4042
|
let t = [];
|
|
4042
4043
|
return S.compute.spaces.forEach((n) => {
|
|
4043
4044
|
e === "func" && n.funcs.length > 0 && t.push(n), e === "flow" && n.flows.length > 0 && t.push(n);
|
|
4044
4045
|
}), t;
|
|
4045
4046
|
}
|
|
4046
|
-
function
|
|
4047
|
+
function Nr(e) {
|
|
4047
4048
|
return S.compute.spaces.find((t) => t.id === e);
|
|
4048
4049
|
}
|
|
4049
|
-
function
|
|
4050
|
+
function Pr(e) {
|
|
4050
4051
|
let t = [];
|
|
4051
|
-
return
|
|
4052
|
+
return Mr(e).forEach(({ id: e, name: n }) => {
|
|
4052
4053
|
t.push([n, e]);
|
|
4053
4054
|
}), F(t);
|
|
4054
4055
|
}
|
|
@@ -4066,12 +4067,12 @@ y.call_func_v1 = {
|
|
|
4066
4067
|
},
|
|
4067
4068
|
initData_: function() {
|
|
4068
4069
|
if (this.space.id) return;
|
|
4069
|
-
let e =
|
|
4070
|
+
let e = Mr("func")?.[0];
|
|
4070
4071
|
if (!e) return;
|
|
4071
4072
|
this.space.id = e.id, this.space.name = e.name;
|
|
4072
4073
|
let t = this.getField("SPACE");
|
|
4073
4074
|
t.getOptions(!1), t.setValue(this.space.id);
|
|
4074
|
-
let n =
|
|
4075
|
+
let n = Er(this.space.id)?.[0];
|
|
4075
4076
|
if (!n) return;
|
|
4076
4077
|
this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
|
|
4077
4078
|
let r = this.getField("FUNC");
|
|
@@ -4089,10 +4090,10 @@ y.call_func_v1 = {
|
|
|
4089
4090
|
}, 0);
|
|
4090
4091
|
},
|
|
4091
4092
|
genSpaceOpts_: function() {
|
|
4092
|
-
return
|
|
4093
|
+
return Pr("func");
|
|
4093
4094
|
},
|
|
4094
4095
|
genFuncOpts_: function() {
|
|
4095
|
-
return
|
|
4096
|
+
return Or(this.space.id);
|
|
4096
4097
|
},
|
|
4097
4098
|
onchange: function(e) {
|
|
4098
4099
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -4103,7 +4104,7 @@ y.call_func_v1 = {
|
|
|
4103
4104
|
}
|
|
4104
4105
|
},
|
|
4105
4106
|
onSpaceChange_: function(e) {
|
|
4106
|
-
let t =
|
|
4107
|
+
let t = Nr(e);
|
|
4107
4108
|
if (!t) {
|
|
4108
4109
|
console.assert(!1);
|
|
4109
4110
|
return;
|
|
@@ -4112,13 +4113,13 @@ y.call_func_v1 = {
|
|
|
4112
4113
|
this.space.id = t.id, this.space.name = t.name;
|
|
4113
4114
|
let r = this.getField("FUNC");
|
|
4114
4115
|
if (r.getOptions(!1), n) {
|
|
4115
|
-
let e =
|
|
4116
|
+
let e = Er(this.space.id)?.[0];
|
|
4116
4117
|
r.setValue(e?.id ?? "");
|
|
4117
4118
|
}
|
|
4118
4119
|
this.onFuncChange_(r.getValue());
|
|
4119
4120
|
},
|
|
4120
4121
|
onFuncChange_: function(e) {
|
|
4121
|
-
let t =
|
|
4122
|
+
let t = Dr(this.space.id, e);
|
|
4122
4123
|
if (!t) {
|
|
4123
4124
|
console.assert(!1);
|
|
4124
4125
|
return;
|
|
@@ -4149,7 +4150,7 @@ y.call_func_v1 = {
|
|
|
4149
4150
|
},
|
|
4150
4151
|
updateCheck_: function() {
|
|
4151
4152
|
for (let e = 0; e < this.func.inputs.length; e++) {
|
|
4152
|
-
let { type: t } = this.func.inputs[e], n =
|
|
4153
|
+
let { type: t } = this.func.inputs[e], n = an(t);
|
|
4153
4154
|
this.getInput("INPUT" + e).connection.setCheck(n);
|
|
4154
4155
|
}
|
|
4155
4156
|
},
|
|
@@ -4174,13 +4175,13 @@ y.call_func_v1 = {
|
|
|
4174
4175
|
V(this, e);
|
|
4175
4176
|
},
|
|
4176
4177
|
checkWarning_: function() {
|
|
4177
|
-
let e =
|
|
4178
|
+
let e = Nr(this.space.id);
|
|
4178
4179
|
if (!e) {
|
|
4179
4180
|
this.setWarningText(P("WARN_SPACE_NOT_FOUND"));
|
|
4180
4181
|
return;
|
|
4181
4182
|
}
|
|
4182
4183
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
4183
|
-
let t =
|
|
4184
|
+
let t = Dr(this.space.id, this.func.id);
|
|
4184
4185
|
if (!t) {
|
|
4185
4186
|
this.setWarningText(P("WARN_FUNC_NOT_FOUND"));
|
|
4186
4187
|
return;
|
|
@@ -4225,12 +4226,12 @@ ${c}${l}}
|
|
|
4225
4226
|
},
|
|
4226
4227
|
initData_: function() {
|
|
4227
4228
|
if (this.space.id) return;
|
|
4228
|
-
let e =
|
|
4229
|
+
let e = Mr("func")?.[0];
|
|
4229
4230
|
if (!e) return;
|
|
4230
4231
|
this.space.id = e.id, this.space.name = e.name;
|
|
4231
4232
|
let t = this.getField("SPACE");
|
|
4232
4233
|
t.getOptions(!1), t.setValue(this.space.id);
|
|
4233
|
-
let n =
|
|
4234
|
+
let n = Er(this.space.id)?.[0];
|
|
4234
4235
|
if (!n) return;
|
|
4235
4236
|
this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
|
|
4236
4237
|
let r = this.getField("FUNC");
|
|
@@ -4248,10 +4249,10 @@ ${c}${l}}
|
|
|
4248
4249
|
}, 0);
|
|
4249
4250
|
},
|
|
4250
4251
|
genSpaceOpts_: function() {
|
|
4251
|
-
return
|
|
4252
|
+
return Pr("func");
|
|
4252
4253
|
},
|
|
4253
4254
|
genFuncOpts_: function() {
|
|
4254
|
-
return
|
|
4255
|
+
return Or(this.space.id);
|
|
4255
4256
|
},
|
|
4256
4257
|
onchange: function(e) {
|
|
4257
4258
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -4262,7 +4263,7 @@ ${c}${l}}
|
|
|
4262
4263
|
}
|
|
4263
4264
|
},
|
|
4264
4265
|
onSpaceChange_: function(e) {
|
|
4265
|
-
let t =
|
|
4266
|
+
let t = Nr(e);
|
|
4266
4267
|
if (!t) {
|
|
4267
4268
|
console.assert(!1);
|
|
4268
4269
|
return;
|
|
@@ -4271,13 +4272,13 @@ ${c}${l}}
|
|
|
4271
4272
|
this.space.id = t.id, this.space.name = t.name;
|
|
4272
4273
|
let r = this.getField("FUNC");
|
|
4273
4274
|
if (r.getOptions(!1), n) {
|
|
4274
|
-
let e =
|
|
4275
|
+
let e = Er(this.space.id)?.[0];
|
|
4275
4276
|
r.setValue(e?.id ?? "");
|
|
4276
4277
|
}
|
|
4277
4278
|
this.onFuncChange_(r.getValue());
|
|
4278
4279
|
},
|
|
4279
4280
|
onFuncChange_: function(e) {
|
|
4280
|
-
let t =
|
|
4281
|
+
let t = Dr(this.space.id, e);
|
|
4281
4282
|
if (!t) {
|
|
4282
4283
|
console.assert(!1);
|
|
4283
4284
|
return;
|
|
@@ -4308,7 +4309,7 @@ ${c}${l}}
|
|
|
4308
4309
|
},
|
|
4309
4310
|
updateCheck_: function() {
|
|
4310
4311
|
for (let e = 0; e < this.func.inputs.length; e++) {
|
|
4311
|
-
let { type: t } = this.func.inputs[e], n =
|
|
4312
|
+
let { type: t } = this.func.inputs[e], n = an(t);
|
|
4312
4313
|
this.getInput("INPUT" + e).connection.setCheck(n);
|
|
4313
4314
|
}
|
|
4314
4315
|
},
|
|
@@ -4333,13 +4334,13 @@ ${c}${l}}
|
|
|
4333
4334
|
V(this, e);
|
|
4334
4335
|
},
|
|
4335
4336
|
checkWarning_: function() {
|
|
4336
|
-
let e =
|
|
4337
|
+
let e = Nr(this.space.id);
|
|
4337
4338
|
if (!e) {
|
|
4338
4339
|
this.setWarningText(P("WARN_SPACE_NOT_FOUND"));
|
|
4339
4340
|
return;
|
|
4340
4341
|
}
|
|
4341
4342
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
4342
|
-
let t =
|
|
4343
|
+
let t = Dr(this.space.id, this.func.id);
|
|
4343
4344
|
if (!t) {
|
|
4344
4345
|
this.setWarningText(P("WARN_FUNC_NOT_FOUND"));
|
|
4345
4346
|
return;
|
|
@@ -4379,7 +4380,7 @@ ${c}${l}}
|
|
|
4379
4380
|
},
|
|
4380
4381
|
initData_: function() {
|
|
4381
4382
|
if (this.func.id) return;
|
|
4382
|
-
let { id: e, inputs: t } =
|
|
4383
|
+
let { id: e, inputs: t } = kr();
|
|
4383
4384
|
this.func.id = e, this.func.inputs = t;
|
|
4384
4385
|
},
|
|
4385
4386
|
saveExtraState: function() {
|
|
@@ -4417,7 +4418,7 @@ ${c}${l}}
|
|
|
4417
4418
|
V(this, e);
|
|
4418
4419
|
},
|
|
4419
4420
|
checkWarning_: function() {
|
|
4420
|
-
let { id: e, inputs: t } =
|
|
4421
|
+
let { id: e, inputs: t } = kr();
|
|
4421
4422
|
if (this.func.id !== e && (this.func.id = e), !v(t, this.func.inputs)) {
|
|
4422
4423
|
this.setWarningText(P("WARN_FUNC_HAS_CHANGED"));
|
|
4423
4424
|
return;
|
|
@@ -4442,7 +4443,7 @@ ${n}}`;
|
|
|
4442
4443
|
},
|
|
4443
4444
|
initData_: function() {
|
|
4444
4445
|
if (this.output.id) return;
|
|
4445
|
-
let e =
|
|
4446
|
+
let e = kr().outputs?.[0];
|
|
4446
4447
|
e && (this.output.id = e.id, this.output.name = e.name, this.output.type = e.type);
|
|
4447
4448
|
},
|
|
4448
4449
|
saveExtraState: function() {
|
|
@@ -4454,7 +4455,7 @@ ${n}}`;
|
|
|
4454
4455
|
}, 0);
|
|
4455
4456
|
},
|
|
4456
4457
|
genOutputOpts_: function() {
|
|
4457
|
-
return
|
|
4458
|
+
return jr();
|
|
4458
4459
|
},
|
|
4459
4460
|
onchange: function(e) {
|
|
4460
4461
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -4465,7 +4466,7 @@ ${n}}`;
|
|
|
4465
4466
|
}
|
|
4466
4467
|
},
|
|
4467
4468
|
onOutputChange_: function(e) {
|
|
4468
|
-
let t =
|
|
4469
|
+
let t = Ar(e);
|
|
4469
4470
|
if (!t) {
|
|
4470
4471
|
console.assert(!1);
|
|
4471
4472
|
return;
|
|
@@ -4477,7 +4478,7 @@ ${n}}`;
|
|
|
4477
4478
|
e.connection.setShadowDom(null);
|
|
4478
4479
|
let t = e.connection.targetBlock();
|
|
4479
4480
|
t && !t.isShadow() && t.dispose();
|
|
4480
|
-
let n =
|
|
4481
|
+
let n = an(this.output.type);
|
|
4481
4482
|
e.setCheck(n);
|
|
4482
4483
|
},
|
|
4483
4484
|
updateShadows_: function() {
|
|
@@ -4486,7 +4487,7 @@ ${n}}`;
|
|
|
4486
4487
|
this.getInput("VALUE").setShadowDom(e);
|
|
4487
4488
|
},
|
|
4488
4489
|
checkWarning_: function() {
|
|
4489
|
-
let e =
|
|
4490
|
+
let e = Ar(this.output.id);
|
|
4490
4491
|
if (!e) {
|
|
4491
4492
|
this.setWarningText(P("WARN_FUNC_HAS_CHANGED"));
|
|
4492
4493
|
return;
|
|
@@ -4556,11 +4557,11 @@ function Y() {
|
|
|
4556
4557
|
t.tables.length > 0 && e.push(t);
|
|
4557
4558
|
}), e;
|
|
4558
4559
|
}
|
|
4559
|
-
function
|
|
4560
|
+
function Fr(e) {
|
|
4560
4561
|
let { spaces: t } = S.data;
|
|
4561
4562
|
return t.find((t) => t.id === e);
|
|
4562
4563
|
}
|
|
4563
|
-
function
|
|
4564
|
+
function Ir() {
|
|
4564
4565
|
let e = [];
|
|
4565
4566
|
return Y().forEach(({ id: t, name: n }) => {
|
|
4566
4567
|
e.push([n, t]);
|
|
@@ -4572,37 +4573,37 @@ function X(e) {
|
|
|
4572
4573
|
let { spaces: t } = S.data, n = t.find((t) => t.id === e);
|
|
4573
4574
|
return n ? n.tables : [];
|
|
4574
4575
|
}
|
|
4575
|
-
function
|
|
4576
|
+
function Lr(e, t) {
|
|
4576
4577
|
let { spaces: n } = S.data, r = n.find((t) => t.id === e);
|
|
4577
4578
|
if (r) return r.tables.find((e) => e.id === t);
|
|
4578
4579
|
}
|
|
4579
|
-
function
|
|
4580
|
+
function Rr(e) {
|
|
4580
4581
|
let t = [];
|
|
4581
4582
|
return X(e).forEach(({ id: e, name: n }) => {
|
|
4582
4583
|
t.push([n, e]);
|
|
4583
4584
|
}), F(t);
|
|
4584
4585
|
}
|
|
4585
|
-
function
|
|
4586
|
+
function zr(e, t) {
|
|
4586
4587
|
let { spaces: n } = S.data, r = n.find((t) => t.id === e);
|
|
4587
4588
|
if (!r) return [];
|
|
4588
4589
|
let i = r.tables.find((e) => e.id === t);
|
|
4589
4590
|
return i ? i.columns : [];
|
|
4590
4591
|
}
|
|
4591
|
-
function
|
|
4592
|
+
function Br(e, t, n) {
|
|
4592
4593
|
let { spaces: r } = S.data, i = r.find((t) => t.id === e);
|
|
4593
4594
|
if (!i) return;
|
|
4594
4595
|
let a = i.tables.find((e) => e.id === t);
|
|
4595
4596
|
if (a) return a.columns.find((e) => e.id === n);
|
|
4596
4597
|
}
|
|
4597
|
-
function
|
|
4598
|
+
function Vr(e, t) {
|
|
4598
4599
|
let n = [];
|
|
4599
|
-
return
|
|
4600
|
+
return zr(e, t).forEach(({ id: e, name: t }) => {
|
|
4600
4601
|
n.push([t, e]);
|
|
4601
4602
|
}), F(n);
|
|
4602
4603
|
}
|
|
4603
4604
|
//#endregion
|
|
4604
4605
|
//#region src/core/blocks/data/addData/v1/blocks.ts
|
|
4605
|
-
function
|
|
4606
|
+
function Hr(e) {
|
|
4606
4607
|
let t = e.getInput("TABLE").connection;
|
|
4607
4608
|
if (t.targetBlock()) return;
|
|
4608
4609
|
let n, r, i = Y()?.[0];
|
|
@@ -4634,7 +4635,7 @@ function Br(e) {
|
|
|
4634
4635
|
}, o = l.blocks.append(a, e.workspace);
|
|
4635
4636
|
t.connect(o.outputConnection);
|
|
4636
4637
|
}
|
|
4637
|
-
function
|
|
4638
|
+
function Ur(e) {
|
|
4638
4639
|
let t = e.getInput("HANDLE").connection;
|
|
4639
4640
|
if (t.targetBlock()) return;
|
|
4640
4641
|
let n = l.blocks.append({
|
|
@@ -4669,7 +4670,7 @@ y.add_data_v1 = {
|
|
|
4669
4670
|
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"));
|
|
4670
4671
|
},
|
|
4671
4672
|
ensureBlocks_: function() {
|
|
4672
|
-
this.isInsertionMarker() || (
|
|
4673
|
+
this.isInsertionMarker() || (Hr(this), V(this, [
|
|
4673
4674
|
[
|
|
4674
4675
|
"SUCCESS",
|
|
4675
4676
|
"__success__",
|
|
@@ -4688,7 +4689,7 @@ y.add_data_v1 = {
|
|
|
4688
4689
|
"x-runtime-lib.data",
|
|
4689
4690
|
!0
|
|
4690
4691
|
]
|
|
4691
|
-
]),
|
|
4692
|
+
]), Ur(this));
|
|
4692
4693
|
}
|
|
4693
4694
|
}, g.forBlock.add_data_v1 = function(e) {
|
|
4694
4695
|
let t = g.INDENT;
|
|
@@ -4736,7 +4737,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
4736
4737
|
let t = X(this.space.id)?.[0];
|
|
4737
4738
|
if (!t) return;
|
|
4738
4739
|
this.table.id = t.id, this.table.name = t.name;
|
|
4739
|
-
let n =
|
|
4740
|
+
let n = zr(this.space.id, this.table.id)?.[0];
|
|
4740
4741
|
n && (this.column.id = n.id, this.column.name = n.name, this.column.type = n.type, this.column.extend = n.extend);
|
|
4741
4742
|
},
|
|
4742
4743
|
saveExtraState: function() {
|
|
@@ -4752,13 +4753,13 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
4752
4753
|
}, 0);
|
|
4753
4754
|
},
|
|
4754
4755
|
genSpaceOpts_: function() {
|
|
4755
|
-
return
|
|
4756
|
+
return Ir();
|
|
4756
4757
|
},
|
|
4757
4758
|
genTableOpts_: function() {
|
|
4758
|
-
return
|
|
4759
|
+
return Rr(this.space.id);
|
|
4759
4760
|
},
|
|
4760
4761
|
genColumnOpts_: function() {
|
|
4761
|
-
return
|
|
4762
|
+
return Vr(this.space.id, this.table.id);
|
|
4762
4763
|
},
|
|
4763
4764
|
onchange: function(e) {
|
|
4764
4765
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -4769,7 +4770,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
4769
4770
|
}
|
|
4770
4771
|
},
|
|
4771
4772
|
onSpaceChange_: function(e) {
|
|
4772
|
-
let t =
|
|
4773
|
+
let t = Fr(e);
|
|
4773
4774
|
if (!t) {
|
|
4774
4775
|
console.assert(!1);
|
|
4775
4776
|
return;
|
|
@@ -4784,7 +4785,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
4784
4785
|
this.onTableChange_(r.getValue());
|
|
4785
4786
|
},
|
|
4786
4787
|
onTableChange_: function(e) {
|
|
4787
|
-
let t =
|
|
4788
|
+
let t = Lr(this.space.id, e);
|
|
4788
4789
|
if (!t) {
|
|
4789
4790
|
console.assert(!1);
|
|
4790
4791
|
return;
|
|
@@ -4793,13 +4794,13 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
4793
4794
|
this.table.id = t.id, this.table.name = t.name;
|
|
4794
4795
|
let r = this.getField("COLUMN");
|
|
4795
4796
|
if (r.getOptions(!1), n) {
|
|
4796
|
-
let e =
|
|
4797
|
+
let e = zr(this.space.id, this.table.id)?.[0];
|
|
4797
4798
|
r.setValue(e?.id ?? "");
|
|
4798
4799
|
}
|
|
4799
4800
|
this.onColumnChange_(r.getValue());
|
|
4800
4801
|
},
|
|
4801
4802
|
onColumnChange_: function(e) {
|
|
4802
|
-
let t =
|
|
4803
|
+
let t = Br(this.space.id, this.table.id, e);
|
|
4803
4804
|
if (!t) {
|
|
4804
4805
|
console.assert(!1);
|
|
4805
4806
|
return;
|
|
@@ -4819,27 +4820,27 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
4819
4820
|
let t = this.getInput("VALUE").connection, n = t.targetBlock();
|
|
4820
4821
|
if (e) n && n.dispose();
|
|
4821
4822
|
else if (n) return;
|
|
4822
|
-
let r =
|
|
4823
|
+
let r = rn(this.workspace, this.column.type);
|
|
4823
4824
|
r && (t.setCheck(null), t.connect(r.outputConnection));
|
|
4824
4825
|
},
|
|
4825
4826
|
updateCheck_: function() {
|
|
4826
|
-
let e =
|
|
4827
|
+
let e = sn(this.column.type);
|
|
4827
4828
|
this.getInput("VALUE").connection.setCheck(e);
|
|
4828
4829
|
},
|
|
4829
4830
|
checkWarning_: function() {
|
|
4830
|
-
let e =
|
|
4831
|
+
let e = Fr(this.space.id);
|
|
4831
4832
|
if (!e) {
|
|
4832
4833
|
this.setWarningText(P("WARN_SPACE_NOT_FOUND"));
|
|
4833
4834
|
return;
|
|
4834
4835
|
}
|
|
4835
4836
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
4836
|
-
let t =
|
|
4837
|
+
let t = Lr(this.space.id, this.table.id);
|
|
4837
4838
|
if (!t) {
|
|
4838
4839
|
this.setWarningText(P("WARN_TABLE_NOT_FOUND"));
|
|
4839
4840
|
return;
|
|
4840
4841
|
}
|
|
4841
4842
|
t.name !== this.table.name && (this.table.name = t.name);
|
|
4842
|
-
let n =
|
|
4843
|
+
let n = Br(this.space.id, this.table.id, this.column.id);
|
|
4843
4844
|
if (!n) {
|
|
4844
4845
|
this.setWarningText(P("WARN_COLUMN_NOT_FOUND"));
|
|
4845
4846
|
return;
|
|
@@ -4925,7 +4926,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
4925
4926
|
};
|
|
4926
4927
|
//#endregion
|
|
4927
4928
|
//#region src/core/blocks/data/deleteData/v1/blocks.ts
|
|
4928
|
-
function
|
|
4929
|
+
function Wr(e) {
|
|
4929
4930
|
let t = e.getInput("TABLE").connection;
|
|
4930
4931
|
if (t.targetBlock()) return;
|
|
4931
4932
|
let n = Y()?.[0], r = X(n?.id ?? "")?.[0], i = {
|
|
@@ -4943,10 +4944,10 @@ function Hr(e) {
|
|
|
4943
4944
|
}, a = l.blocks.append(i, e.workspace);
|
|
4944
4945
|
t.connect(a.outputConnection);
|
|
4945
4946
|
}
|
|
4946
|
-
function
|
|
4947
|
+
function Gr(e) {
|
|
4947
4948
|
let t = e.getInput("CONDITION").connection;
|
|
4948
4949
|
if (t.targetBlock()) return;
|
|
4949
|
-
let n = Y()?.[0], r = X(n?.id ?? "")?.[0], i =
|
|
4950
|
+
let n = Y()?.[0], r = X(n?.id ?? "")?.[0], i = zr(n?.id, r?.id)?.[0], a = {
|
|
4950
4951
|
type: "cond_atomic_v1",
|
|
4951
4952
|
extraState: {
|
|
4952
4953
|
space: {
|
|
@@ -4967,7 +4968,7 @@ function Ur(e) {
|
|
|
4967
4968
|
}, o = l.blocks.append(a, e.workspace);
|
|
4968
4969
|
t.connect(o.outputConnection);
|
|
4969
4970
|
}
|
|
4970
|
-
function
|
|
4971
|
+
function Kr(e) {
|
|
4971
4972
|
let t = e.getInput("HANDLE").connection;
|
|
4972
4973
|
if (t.targetBlock()) return;
|
|
4973
4974
|
let n = l.blocks.append({
|
|
@@ -5002,7 +5003,7 @@ y.delete_data_v1 = {
|
|
|
5002
5003
|
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"));
|
|
5003
5004
|
},
|
|
5004
5005
|
ensureBlocks_: function() {
|
|
5005
|
-
this.isInsertionMarker() || (
|
|
5006
|
+
this.isInsertionMarker() || (Wr(this), Gr(this), V(this, [[
|
|
5006
5007
|
"SUCCESS",
|
|
5007
5008
|
"__success__",
|
|
5008
5009
|
"x-runtime-lib.success",
|
|
@@ -5012,7 +5013,7 @@ y.delete_data_v1 = {
|
|
|
5012
5013
|
"__message__",
|
|
5013
5014
|
"x-runtime-lib.message",
|
|
5014
5015
|
!0
|
|
5015
|
-
]]),
|
|
5016
|
+
]]), Kr(this));
|
|
5016
5017
|
}
|
|
5017
5018
|
}, g.forBlock.delete_data_v1 = function(e) {
|
|
5018
5019
|
let t = g.INDENT;
|
|
@@ -5046,7 +5047,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5046
5047
|
};
|
|
5047
5048
|
//#endregion
|
|
5048
5049
|
//#region src/core/blocks/data/queryData/v1/blocks.ts
|
|
5049
|
-
function
|
|
5050
|
+
function qr(e) {
|
|
5050
5051
|
let t = e.getInput("TABLE").connection;
|
|
5051
5052
|
if (t.targetBlock()) return;
|
|
5052
5053
|
let n, r, i = Y()?.[0];
|
|
@@ -5078,13 +5079,13 @@ function Gr(e) {
|
|
|
5078
5079
|
}, o = l.blocks.append(a, e.workspace);
|
|
5079
5080
|
t.connect(o.outputConnection);
|
|
5080
5081
|
}
|
|
5081
|
-
function
|
|
5082
|
+
function Jr(e) {
|
|
5082
5083
|
let t = e.getInput("CONDITION").connection;
|
|
5083
5084
|
if (t.targetBlock()) return;
|
|
5084
5085
|
let n = l.blocks.append({ type: "cond_atomic_v1" }, e.workspace);
|
|
5085
5086
|
t.connect(n.outputConnection);
|
|
5086
5087
|
}
|
|
5087
|
-
function
|
|
5088
|
+
function Yr(e) {
|
|
5088
5089
|
let t = e.getInput("EXTRA").connection;
|
|
5089
5090
|
if (t.targetBlock()) return;
|
|
5090
5091
|
let n = l.blocks.append({
|
|
@@ -5106,7 +5107,7 @@ function qr(e) {
|
|
|
5106
5107
|
}, e.workspace);
|
|
5107
5108
|
t.connect(n.outputConnection);
|
|
5108
5109
|
}
|
|
5109
|
-
function
|
|
5110
|
+
function Xr(e) {
|
|
5110
5111
|
let t = e.getInput("HANDLE").connection;
|
|
5111
5112
|
if (t.targetBlock()) return;
|
|
5112
5113
|
let n = l.blocks.append({
|
|
@@ -5150,7 +5151,7 @@ t([{
|
|
|
5150
5151
|
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"));
|
|
5151
5152
|
},
|
|
5152
5153
|
ensureBlocks_: function() {
|
|
5153
|
-
this.isInsertionMarker() || (
|
|
5154
|
+
this.isInsertionMarker() || (qr(this), Jr(this), Yr(this), V(this, [
|
|
5154
5155
|
[
|
|
5155
5156
|
"SUCCESS",
|
|
5156
5157
|
"__success__",
|
|
@@ -5175,7 +5176,7 @@ t([{
|
|
|
5175
5176
|
"x-runtime-lib.extraData",
|
|
5176
5177
|
!0
|
|
5177
5178
|
]
|
|
5178
|
-
]),
|
|
5179
|
+
]), Xr(this));
|
|
5179
5180
|
}
|
|
5180
5181
|
}, g.forBlock.query_data_v1 = function(e) {
|
|
5181
5182
|
let t = g.INDENT;
|
|
@@ -5273,10 +5274,10 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5273
5274
|
}, 0);
|
|
5274
5275
|
},
|
|
5275
5276
|
genSpaceOpts_: function() {
|
|
5276
|
-
return
|
|
5277
|
+
return Ir();
|
|
5277
5278
|
},
|
|
5278
5279
|
genTableOpts_: function() {
|
|
5279
|
-
return
|
|
5280
|
+
return Rr(this.space.id);
|
|
5280
5281
|
},
|
|
5281
5282
|
genColumnOpts_: function() {
|
|
5282
5283
|
let e = [];
|
|
@@ -5303,7 +5304,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5303
5304
|
}
|
|
5304
5305
|
},
|
|
5305
5306
|
onSpaceChange_: function(e) {
|
|
5306
|
-
let t =
|
|
5307
|
+
let t = Fr(e);
|
|
5307
5308
|
if (!t) {
|
|
5308
5309
|
console.assert(!1);
|
|
5309
5310
|
return;
|
|
@@ -5318,7 +5319,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5318
5319
|
this.onTableChange_(r.getValue());
|
|
5319
5320
|
},
|
|
5320
5321
|
onTableChange_: function(e) {
|
|
5321
|
-
let t =
|
|
5322
|
+
let t = Lr(this.space.id, e);
|
|
5322
5323
|
if (!t) {
|
|
5323
5324
|
console.assert(!1);
|
|
5324
5325
|
return;
|
|
@@ -5392,13 +5393,13 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5392
5393
|
}
|
|
5393
5394
|
},
|
|
5394
5395
|
checkWarning_: function() {
|
|
5395
|
-
let e =
|
|
5396
|
+
let e = Fr(this.space.id);
|
|
5396
5397
|
if (!e) {
|
|
5397
5398
|
this.setWarningText(P("WARN_SPACE_NOT_FOUND"));
|
|
5398
5399
|
return;
|
|
5399
5400
|
}
|
|
5400
5401
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
5401
|
-
let t =
|
|
5402
|
+
let t = Lr(this.space.id, this.table.id);
|
|
5402
5403
|
if (!t) {
|
|
5403
5404
|
this.setWarningText(P("WARN_TABLE_NOT_FOUND"));
|
|
5404
5405
|
return;
|
|
@@ -5455,10 +5456,10 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5455
5456
|
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_();
|
|
5456
5457
|
},
|
|
5457
5458
|
genSpaceOpts_: function() {
|
|
5458
|
-
return
|
|
5459
|
+
return Ir();
|
|
5459
5460
|
},
|
|
5460
5461
|
genTableOpts_: function() {
|
|
5461
|
-
return
|
|
5462
|
+
return Rr(this.space.id);
|
|
5462
5463
|
},
|
|
5463
5464
|
onchange: function(e) {
|
|
5464
5465
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -5469,7 +5470,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5469
5470
|
}
|
|
5470
5471
|
},
|
|
5471
5472
|
onSpaceChange_: function(e) {
|
|
5472
|
-
let t =
|
|
5473
|
+
let t = Fr(e);
|
|
5473
5474
|
if (!t) {
|
|
5474
5475
|
console.assert(!1);
|
|
5475
5476
|
return;
|
|
@@ -5484,7 +5485,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5484
5485
|
this.onTableChange_(r.getValue());
|
|
5485
5486
|
},
|
|
5486
5487
|
onTableChange_: function(e) {
|
|
5487
|
-
let t =
|
|
5488
|
+
let t = Lr(this.space.id, e);
|
|
5488
5489
|
if (!t) {
|
|
5489
5490
|
console.assert(!1);
|
|
5490
5491
|
return;
|
|
@@ -5492,13 +5493,13 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5492
5493
|
this.table.id = t.id, this.table.name = t.name;
|
|
5493
5494
|
},
|
|
5494
5495
|
checkWarning_: function() {
|
|
5495
|
-
let e =
|
|
5496
|
+
let e = Fr(this.space.id);
|
|
5496
5497
|
if (!e) {
|
|
5497
5498
|
this.setWarningText(P("WARN_SPACE_NOT_FOUND"));
|
|
5498
5499
|
return;
|
|
5499
5500
|
}
|
|
5500
5501
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
5501
|
-
let t =
|
|
5502
|
+
let t = Lr(this.space.id, this.table.id);
|
|
5502
5503
|
if (!t) {
|
|
5503
5504
|
this.setWarningText(P("WARN_TABLE_NOT_FOUND"));
|
|
5504
5505
|
return;
|
|
@@ -5537,7 +5538,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5537
5538
|
]]);
|
|
5538
5539
|
}
|
|
5539
5540
|
}, g.forBlock.transaction_v1 = function(e) {
|
|
5540
|
-
let t = g.INDENT, n = e, r =
|
|
5541
|
+
let t = g.INDENT, n = e, r = Yt(n), i = g.statementToCode(n, "HANDLE"), a = g.statementToCode(n, "FINALLY");
|
|
5541
5542
|
return `{
|
|
5542
5543
|
${t}var __error${r}__ = '';
|
|
5543
5544
|
${t}var __txExist${r}__ = typeof(__tx__) !== 'undefined';
|
|
@@ -5619,10 +5620,10 @@ ${t}}
|
|
|
5619
5620
|
}, 0);
|
|
5620
5621
|
},
|
|
5621
5622
|
genSpaceOpts_: function() {
|
|
5622
|
-
return
|
|
5623
|
+
return Ir();
|
|
5623
5624
|
},
|
|
5624
5625
|
genTableOpts_: function() {
|
|
5625
|
-
return
|
|
5626
|
+
return Rr(this.space.id);
|
|
5626
5627
|
},
|
|
5627
5628
|
genColumnOpts_: function() {
|
|
5628
5629
|
let e = [];
|
|
@@ -5649,7 +5650,7 @@ ${t}}
|
|
|
5649
5650
|
}
|
|
5650
5651
|
},
|
|
5651
5652
|
onSpaceChange_: function(e) {
|
|
5652
|
-
let t =
|
|
5653
|
+
let t = Fr(e);
|
|
5653
5654
|
if (!t) {
|
|
5654
5655
|
console.assert(!1);
|
|
5655
5656
|
return;
|
|
@@ -5664,7 +5665,7 @@ ${t}}
|
|
|
5664
5665
|
this.onTableChange_(r.getValue());
|
|
5665
5666
|
},
|
|
5666
5667
|
onTableChange_: function(e) {
|
|
5667
|
-
let t =
|
|
5668
|
+
let t = Lr(this.space.id, e);
|
|
5668
5669
|
if (!t) {
|
|
5669
5670
|
console.assert(!1);
|
|
5670
5671
|
return;
|
|
@@ -5686,7 +5687,7 @@ ${t}}
|
|
|
5686
5687
|
}
|
|
5687
5688
|
let r = this.getInput("ADD" + e).connection, i = r.targetBlock();
|
|
5688
5689
|
i && i.dispose();
|
|
5689
|
-
let a =
|
|
5690
|
+
let a = rn(this.workspace, n.type);
|
|
5690
5691
|
a && (r.setCheck(null), r.connect(a.outputConnection)), this.updateCheck_();
|
|
5691
5692
|
},
|
|
5692
5693
|
decompose: function(e) {
|
|
@@ -5757,7 +5758,7 @@ ${t}}
|
|
|
5757
5758
|
let a = this.getFieldValue("COLUMN" + t), o = this.table.columns.find((e) => e.id === a);
|
|
5758
5759
|
if (!o) continue;
|
|
5759
5760
|
n.setCheck(null);
|
|
5760
|
-
let s =
|
|
5761
|
+
let s = rn(this.workspace, o.type);
|
|
5761
5762
|
s && r.connect(s.outputConnection);
|
|
5762
5763
|
}
|
|
5763
5764
|
},
|
|
@@ -5765,18 +5766,18 @@ ${t}}
|
|
|
5765
5766
|
for (let e = 0; e < this.itemCount_; e++) {
|
|
5766
5767
|
let t = this.getFieldValue("COLUMN" + e), n = this.table.columns.find((e) => e.id === t);
|
|
5767
5768
|
if (!n) continue;
|
|
5768
|
-
let r =
|
|
5769
|
+
let r = sn(n.type);
|
|
5769
5770
|
this.getInput("ADD" + e).setCheck(r);
|
|
5770
5771
|
}
|
|
5771
5772
|
},
|
|
5772
5773
|
checkWarning_: function() {
|
|
5773
|
-
let e =
|
|
5774
|
+
let e = Fr(this.space.id);
|
|
5774
5775
|
if (!e) {
|
|
5775
5776
|
this.setWarningText(P("WARN_SPACE_NOT_FOUND"));
|
|
5776
5777
|
return;
|
|
5777
5778
|
}
|
|
5778
5779
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
5779
|
-
let t =
|
|
5780
|
+
let t = Lr(this.space.id, this.table.id);
|
|
5780
5781
|
if (!t) {
|
|
5781
5782
|
this.setWarningText(P("WARN_TABLE_NOT_FOUND"));
|
|
5782
5783
|
return;
|
|
@@ -5803,7 +5804,7 @@ ${t}}
|
|
|
5803
5804
|
};
|
|
5804
5805
|
//#endregion
|
|
5805
5806
|
//#region src/core/blocks/data/updateData/v1/blocks.ts
|
|
5806
|
-
function
|
|
5807
|
+
function Zr(e) {
|
|
5807
5808
|
let t = e.getInput("TABLE").connection;
|
|
5808
5809
|
if (t.targetBlock()) return;
|
|
5809
5810
|
let n, r, i = Y()?.[0];
|
|
@@ -5835,13 +5836,13 @@ function Yr(e) {
|
|
|
5835
5836
|
}, o = l.blocks.append(a, e.workspace);
|
|
5836
5837
|
t.connect(o.outputConnection);
|
|
5837
5838
|
}
|
|
5838
|
-
function
|
|
5839
|
+
function Qr(e) {
|
|
5839
5840
|
let t = e.getInput("CONDITION").connection;
|
|
5840
5841
|
if (t.targetBlock()) return;
|
|
5841
5842
|
let n = l.blocks.append({ type: "cond_atomic_v1" }, e.workspace);
|
|
5842
5843
|
t.connect(n.outputConnection);
|
|
5843
5844
|
}
|
|
5844
|
-
function
|
|
5845
|
+
function $r(e) {
|
|
5845
5846
|
let t = e.getInput("HANDLE").connection;
|
|
5846
5847
|
if (t.targetBlock()) return;
|
|
5847
5848
|
let n = l.blocks.append({
|
|
@@ -5876,7 +5877,7 @@ y.update_data_v1 = {
|
|
|
5876
5877
|
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"));
|
|
5877
5878
|
},
|
|
5878
5879
|
ensureBlocks: function() {
|
|
5879
|
-
this.isInsertionMarker() || (
|
|
5880
|
+
this.isInsertionMarker() || (Zr(this), Qr(this), V(this, [
|
|
5880
5881
|
[
|
|
5881
5882
|
"SUCCESS",
|
|
5882
5883
|
"__success__",
|
|
@@ -5895,7 +5896,7 @@ y.update_data_v1 = {
|
|
|
5895
5896
|
"x-runtime-lib.data",
|
|
5896
5897
|
!0
|
|
5897
5898
|
]
|
|
5898
|
-
]),
|
|
5899
|
+
]), $r(this));
|
|
5899
5900
|
}
|
|
5900
5901
|
}, g.forBlock.update_data_v1 = function(e) {
|
|
5901
5902
|
let t = g.INDENT;
|
|
@@ -5915,15 +5916,15 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5915
5916
|
};
|
|
5916
5917
|
//#endregion
|
|
5917
5918
|
//#region src/core/blocks/json/jsonArray/v1/index.ts
|
|
5918
|
-
var
|
|
5919
|
+
var ei = p.xml;
|
|
5919
5920
|
y.json_array_v1 = {
|
|
5920
5921
|
init: function() {
|
|
5921
|
-
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(u.Align.CENTRE).appendField(new h(
|
|
5922
|
+
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(u.Align.CENTRE).appendField(new h(Gt, 20, 20, void 0, () => {
|
|
5922
5923
|
this.isInFlyout || this.addEntry_();
|
|
5923
5924
|
})), this.appendDummyInput("CLOSE_BRACKET").appendField(" ] "), this.setInputsInline(!1), this.setOutput(!0, "JsonArray"), this.setColour(350), this.setTooltip(""), this.setHelpUrl("");
|
|
5924
5925
|
},
|
|
5925
5926
|
mutationToDom: function() {
|
|
5926
|
-
let e =
|
|
5927
|
+
let e = ei.createElement("mutation");
|
|
5927
5928
|
return e.setAttribute("items", String(this.length)), e;
|
|
5928
5929
|
},
|
|
5929
5930
|
domToMutation: function(e) {
|
|
@@ -5935,9 +5936,9 @@ y.json_array_v1 = {
|
|
|
5935
5936
|
initShape_: function() {
|
|
5936
5937
|
for (let e = 0; e < this.length; e++) {
|
|
5937
5938
|
let t = "ENTRY" + e, n = this.appendValueInput(t);
|
|
5938
|
-
n.appendField(new h(
|
|
5939
|
+
n.appendField(new h(Gt, 20, 20, void 0, () => {
|
|
5939
5940
|
this.isInFlyout || this.addEntry_(n);
|
|
5940
|
-
})), n.appendField(new i(String(e))), n.appendField(new h(
|
|
5941
|
+
})), n.appendField(new i(String(e))), n.appendField(new h(Kt, 20, 20, void 0, () => {
|
|
5941
5942
|
this.isInFlyout || this.removeEntry_(n);
|
|
5942
5943
|
})), this.moveInputBefore(t, "ADD");
|
|
5943
5944
|
}
|
|
@@ -5950,9 +5951,9 @@ y.json_array_v1 = {
|
|
|
5950
5951
|
t.name = "ENTRY" + (e + 1), t.fieldRow[1].setValue(e + 1);
|
|
5951
5952
|
}
|
|
5952
5953
|
let n = this.appendValueInput("ENTRY" + t);
|
|
5953
|
-
n.appendField(new h(
|
|
5954
|
+
n.appendField(new h(Gt, 20, 20, void 0, () => {
|
|
5954
5955
|
this.isInFlyout || this.addEntry_(n);
|
|
5955
|
-
})), n.appendField(new i(String(t))), n.appendField(new h(
|
|
5956
|
+
})), n.appendField(new i(String(t))), n.appendField(new h(Kt, 20, 20, void 0, () => {
|
|
5956
5957
|
this.isInFlyout || this.removeEntry_(n);
|
|
5957
5958
|
})), t === this.length ? this.moveInputBefore("ENTRY" + t, "ADD") : this.moveInputBefore("ENTRY" + t, "ENTRY" + (t + 1)), this.length++;
|
|
5958
5959
|
},
|
|
@@ -5971,17 +5972,17 @@ y.json_array_v1 = {
|
|
|
5971
5972
|
} };
|
|
5972
5973
|
//#endregion
|
|
5973
5974
|
//#region src/core/blocks/json/jsonMap/v1/index.ts
|
|
5974
|
-
var
|
|
5975
|
+
var ti = p.xml;
|
|
5975
5976
|
y.json_map_v1 = {
|
|
5976
5977
|
init: function() {
|
|
5977
|
-
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(u.Align.CENTRE).appendField(new h(
|
|
5978
|
+
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(u.Align.CENTRE).appendField(new h(Gt, 20, 20, void 0, () => {
|
|
5978
5979
|
this.isInFlyout || this.addEntry_();
|
|
5979
5980
|
})), this.appendDummyInput("CLOSE_BRACHET").appendField(" } "), this.setInputsInline(!1), this.setOutput(!0, "JsonMap"), this.setColour(120), this.setTooltip(""), this.setHelpUrl("");
|
|
5980
5981
|
},
|
|
5981
5982
|
mutationToDom: function() {
|
|
5982
|
-
let e =
|
|
5983
|
+
let e = ti.createElement("mutation");
|
|
5983
5984
|
for (let t = 0; t < this.length; t++) {
|
|
5984
|
-
let n =
|
|
5985
|
+
let n = ti.createElement("item");
|
|
5985
5986
|
n.setAttribute("key", this.getFieldValue("KEY" + t)), e.appendChild(n);
|
|
5986
5987
|
}
|
|
5987
5988
|
return e;
|
|
@@ -6000,9 +6001,9 @@ y.json_map_v1 = {
|
|
|
6000
6001
|
initShape_: function(e) {
|
|
6001
6002
|
for (let t = 0; t < e.length; t++) {
|
|
6002
6003
|
let n = e[t], r = "ENTRY" + t, i = this.appendValueInput(r);
|
|
6003
|
-
i.appendField(new h(
|
|
6004
|
+
i.appendField(new h(Gt, 20, 20, void 0, () => {
|
|
6004
6005
|
this.isInFlyout || this.addEntry_(i);
|
|
6005
|
-
})), i.appendField(new f(n), "KEY" + t), i.appendField(new h(
|
|
6006
|
+
})), i.appendField(new f(n), "KEY" + t), i.appendField(new h(Kt, 20, 20, void 0, () => {
|
|
6006
6007
|
this.isInFlyout || this.removeEntry_(i);
|
|
6007
6008
|
})), this.moveInputBefore(r, "ADD");
|
|
6008
6009
|
}
|
|
@@ -6012,9 +6013,9 @@ y.json_map_v1 = {
|
|
|
6012
6013
|
e && (t = me(e.name.substring(5)));
|
|
6013
6014
|
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);
|
|
6014
6015
|
let n = this.appendValueInput("ENTRY" + t);
|
|
6015
|
-
n.appendField(new h(
|
|
6016
|
+
n.appendField(new h(Gt, 20, 20, void 0, () => {
|
|
6016
6017
|
this.isInFlyout || this.addEntry_(n);
|
|
6017
|
-
})), n.appendField(new f("key"), "KEY" + t), n.appendField(new h(
|
|
6018
|
+
})), n.appendField(new f("key"), "KEY" + t), n.appendField(new h(Kt, 20, 20, void 0, () => {
|
|
6018
6019
|
this.isInFlyout || this.removeEntry_(n);
|
|
6019
6020
|
})), t === this.length ? this.moveInputBefore("ENTRY" + t, "ADD") : this.moveInputBefore("ENTRY" + t, "ENTRY" + (t + 1)), this.length++;
|
|
6020
6021
|
},
|
|
@@ -6034,7 +6035,7 @@ y.json_map_v1 = {
|
|
|
6034
6035
|
} };
|
|
6035
6036
|
//#endregion
|
|
6036
6037
|
//#region src/core/blocks/list/listCreate/v1/index.ts
|
|
6037
|
-
var
|
|
6038
|
+
var ni = p.xml;
|
|
6038
6039
|
y.list_create_container_v1 = { init: function() {
|
|
6039
6040
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
6040
6041
|
} }, y.list_create_item_v1 = { init: function() {
|
|
@@ -6044,7 +6045,7 @@ y.list_create_container_v1 = { init: function() {
|
|
|
6044
6045
|
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_();
|
|
6045
6046
|
},
|
|
6046
6047
|
mutationToDom: function() {
|
|
6047
|
-
let e =
|
|
6048
|
+
let e = ni.createElement("mutation");
|
|
6048
6049
|
return e.setAttribute("items", String(this.itemCount_)), e;
|
|
6049
6050
|
},
|
|
6050
6051
|
domToMutation: function(e) {
|
|
@@ -6291,7 +6292,7 @@ y.list_create_container_v1 = { init: function() {
|
|
|
6291
6292
|
};
|
|
6292
6293
|
//#endregion
|
|
6293
6294
|
//#region src/core/blocks/logic/logicCompare/v1/index.ts
|
|
6294
|
-
var
|
|
6295
|
+
var ri = { onchange: function(e) {
|
|
6295
6296
|
this.prevBlocks_ ||= [null, null];
|
|
6296
6297
|
let t = this.getInputTargetBlock("A"), n = this.getInputTargetBlock("B");
|
|
6297
6298
|
if (t && n && !this.workspace.connectionChecker.doTypeChecks(t.outputConnection, n.outputConnection)) {
|
|
@@ -6306,7 +6307,7 @@ var ti = { onchange: function(e) {
|
|
|
6306
6307
|
//#endregion
|
|
6307
6308
|
//#region src/core/blocks/loop/flowControl/v1/extensions.ts
|
|
6308
6309
|
m.register("logic_compare_v1", function() {
|
|
6309
|
-
this.mixin(
|
|
6310
|
+
this.mixin(ri);
|
|
6310
6311
|
}), t([{
|
|
6311
6312
|
type: "logic_compare_v1",
|
|
6312
6313
|
message0: "%1 %2 %3",
|
|
@@ -6600,7 +6601,7 @@ m.register("logic_compare_v1", function() {
|
|
|
6600
6601
|
BREAK: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_BREAK}",
|
|
6601
6602
|
CONTINUE: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_CONTINUE}"
|
|
6602
6603
|
}));
|
|
6603
|
-
var
|
|
6604
|
+
var ii = new Set([
|
|
6604
6605
|
"repeat_v1",
|
|
6605
6606
|
"for_each_v1",
|
|
6606
6607
|
"for_v1",
|
|
@@ -6610,7 +6611,7 @@ m.registerMixin("flow_control_in_loop_check_v1", {
|
|
|
6610
6611
|
getSurroundLoop: function() {
|
|
6611
6612
|
let e = this;
|
|
6612
6613
|
do {
|
|
6613
|
-
if (
|
|
6614
|
+
if (ii.has(e.type)) return e;
|
|
6614
6615
|
e = e?.getSurroundParent();
|
|
6615
6616
|
} while (e);
|
|
6616
6617
|
return null;
|
|
@@ -7334,7 +7335,7 @@ function ${g.FUNCTION_NAME_PLACEHOLDER_}(a, b) {
|
|
|
7334
7335
|
};
|
|
7335
7336
|
//#endregion
|
|
7336
7337
|
//#region src/core/blocks/object/objectCreate/v1/index.ts
|
|
7337
|
-
var
|
|
7338
|
+
var ai = p.xml;
|
|
7338
7339
|
y.object_create_container_v1 = { init: function() {
|
|
7339
7340
|
this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
7340
7341
|
} }, y.object_create_item_v1 = { init: function() {
|
|
@@ -7344,7 +7345,7 @@ y.object_create_container_v1 = { init: function() {
|
|
|
7344
7345
|
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}");
|
|
7345
7346
|
},
|
|
7346
7347
|
mutationToDom: function() {
|
|
7347
|
-
let e =
|
|
7348
|
+
let e = ai.createElement("mutation");
|
|
7348
7349
|
return e.setAttribute("items", String(this.itemCount_)), e;
|
|
7349
7350
|
},
|
|
7350
7351
|
domToMutation: function(e) {
|
|
@@ -7601,7 +7602,7 @@ function ${g.FUNCTION_NAME_PLACEHOLDER_}(obj, key, val) {
|
|
|
7601
7602
|
};
|
|
7602
7603
|
//#endregion
|
|
7603
7604
|
//#region src/core/blocks/procedure/procedureDef/v1/index.ts
|
|
7604
|
-
var
|
|
7605
|
+
var oi = p.xml;
|
|
7605
7606
|
y.procedure_def_container_v1 = { init: function() {
|
|
7606
7607
|
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new n(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
7607
7608
|
} }, y.procedure_def_item_v1 = {
|
|
@@ -7629,9 +7630,9 @@ y.procedure_def_container_v1 = { init: function() {
|
|
|
7629
7630
|
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}");
|
|
7630
7631
|
},
|
|
7631
7632
|
mutationToDom: function() {
|
|
7632
|
-
let e =
|
|
7633
|
+
let e = oi.createElement("mutation");
|
|
7633
7634
|
return e.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), this.args.forEach((t) => {
|
|
7634
|
-
let n =
|
|
7635
|
+
let n = oi.createElement("arg");
|
|
7635
7636
|
n.setAttribute("name", t.name), n.setAttribute("id", t.id), e.appendChild(n);
|
|
7636
7637
|
}), e;
|
|
7637
7638
|
},
|
|
@@ -7708,7 +7709,7 @@ y.procedure_def_container_v1 = { init: function() {
|
|
|
7708
7709
|
let t = this.args[e], n = this.getInput("ARG" + e).connection, r = n.targetBlock();
|
|
7709
7710
|
if (r) r.setKeyName(`__param@${t.id}__`, t.name, !1);
|
|
7710
7711
|
else try {
|
|
7711
|
-
x.disable(), r =
|
|
7712
|
+
x.disable(), r = ln(this.workspace, `__param@${t.id}__`, t.name, !1), r.outputConnection.connect(n);
|
|
7712
7713
|
} finally {
|
|
7713
7714
|
x.enable();
|
|
7714
7715
|
}
|
|
@@ -7717,13 +7718,13 @@ y.procedure_def_container_v1 = { init: function() {
|
|
|
7717
7718
|
};
|
|
7718
7719
|
//#endregion
|
|
7719
7720
|
//#region src/core/blocks/procedure/procedureReturn/v1/index.ts
|
|
7720
|
-
var
|
|
7721
|
+
var si = p.xml;
|
|
7721
7722
|
y.procedure_return_v1 = {
|
|
7722
7723
|
init: function() {
|
|
7723
7724
|
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}");
|
|
7724
7725
|
},
|
|
7725
7726
|
mutationToDom: function() {
|
|
7726
|
-
let e =
|
|
7727
|
+
let e = si.createElement("mutation");
|
|
7727
7728
|
return e.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), e;
|
|
7728
7729
|
},
|
|
7729
7730
|
domToMutation: function(e) {
|
|
@@ -7819,7 +7820,7 @@ ${g.statementToCode(e, "HANDLE")}
|
|
|
7819
7820
|
};
|
|
7820
7821
|
//#endregion
|
|
7821
7822
|
//#region src/core/utils/resource/dir.ts
|
|
7822
|
-
function
|
|
7823
|
+
function ci(e) {
|
|
7823
7824
|
let t = S.resource.spaces.find((t) => t.id === e);
|
|
7824
7825
|
if (!t) return [];
|
|
7825
7826
|
let n = [];
|
|
@@ -7834,15 +7835,15 @@ function oi(e) {
|
|
|
7834
7835
|
}
|
|
7835
7836
|
return r(t.dirTree, ""), n;
|
|
7836
7837
|
}
|
|
7837
|
-
function
|
|
7838
|
+
function li(e) {
|
|
7838
7839
|
let t = [];
|
|
7839
|
-
return
|
|
7840
|
+
return ci(e).forEach(({ id: e, name: n }) => {
|
|
7840
7841
|
t.push([n, e]);
|
|
7841
7842
|
}), F(t);
|
|
7842
7843
|
}
|
|
7843
7844
|
//#endregion
|
|
7844
7845
|
//#region src/core/utils/resource/resource.ts
|
|
7845
|
-
function
|
|
7846
|
+
function ui(e, t) {
|
|
7846
7847
|
let n = S.resource.spaces.find((t) => t.id === e);
|
|
7847
7848
|
if (!n) return [];
|
|
7848
7849
|
let r = [];
|
|
@@ -7850,23 +7851,23 @@ function ci(e, t) {
|
|
|
7850
7851
|
e.dirid === t && r.push(e);
|
|
7851
7852
|
}), r;
|
|
7852
7853
|
}
|
|
7853
|
-
function
|
|
7854
|
+
function di(e, t) {
|
|
7854
7855
|
let n = [];
|
|
7855
|
-
return
|
|
7856
|
+
return ui(e, t).forEach(({ id: e, name: t }) => {
|
|
7856
7857
|
n.push([t, e]);
|
|
7857
7858
|
}), F(n);
|
|
7858
7859
|
}
|
|
7859
7860
|
//#endregion
|
|
7860
7861
|
//#region src/core/utils/resource/space.ts
|
|
7861
|
-
function
|
|
7862
|
+
function fi() {
|
|
7862
7863
|
let e = [];
|
|
7863
7864
|
return S.resource.spaces.forEach((t) => {
|
|
7864
7865
|
t.resources.length > 0 && e.push(t);
|
|
7865
7866
|
}), e;
|
|
7866
7867
|
}
|
|
7867
|
-
function
|
|
7868
|
+
function pi() {
|
|
7868
7869
|
let e = [];
|
|
7869
|
-
return
|
|
7870
|
+
return fi().forEach(({ id: t, name: n }) => {
|
|
7870
7871
|
e.push([n, t]);
|
|
7871
7872
|
}), F(e);
|
|
7872
7873
|
}
|
|
@@ -7885,17 +7886,17 @@ y.select_resource_v1 = {
|
|
|
7885
7886
|
},
|
|
7886
7887
|
initData_: function() {
|
|
7887
7888
|
if (this.space.id) return;
|
|
7888
|
-
let e =
|
|
7889
|
+
let e = fi()?.[0];
|
|
7889
7890
|
if (!e) return;
|
|
7890
7891
|
this.space.id = e.id, this.space.name = e.name;
|
|
7891
7892
|
let t = this.getField("SPACE");
|
|
7892
7893
|
t.getOptions(!1), t.setValue(this.space.id);
|
|
7893
|
-
let n =
|
|
7894
|
+
let n = ci(this.space.id)?.[0];
|
|
7894
7895
|
if (!n) return;
|
|
7895
7896
|
this.dir.id = n.id, this.dir.name = n.name;
|
|
7896
7897
|
let r = this.getField("DIR");
|
|
7897
7898
|
r.getOptions(!1), r.setValue(this.dir.id);
|
|
7898
|
-
let i =
|
|
7899
|
+
let i = ui(this.space.id, this.dir.id)?.[0];
|
|
7899
7900
|
if (!i) return;
|
|
7900
7901
|
this.resource.id = i.id, this.resource.name = i.name;
|
|
7901
7902
|
let a = this.getField("RESOURCE");
|
|
@@ -7912,13 +7913,13 @@ y.select_resource_v1 = {
|
|
|
7912
7913
|
this.space = he(e.space), this.dir = he(e.dir), this.resource = he(e.resource);
|
|
7913
7914
|
},
|
|
7914
7915
|
genSpaceOpts_: function() {
|
|
7915
|
-
return
|
|
7916
|
+
return pi();
|
|
7916
7917
|
},
|
|
7917
7918
|
genDirOpts_: function() {
|
|
7918
|
-
return
|
|
7919
|
+
return li(this.space.id);
|
|
7919
7920
|
},
|
|
7920
7921
|
genResourceOpts_: function() {
|
|
7921
|
-
return
|
|
7922
|
+
return di(this.space.id, this.dir.id);
|
|
7922
7923
|
}
|
|
7923
7924
|
}, g.forBlock.select_resource_v1 = function() {
|
|
7924
7925
|
return "";
|
|
@@ -7939,7 +7940,7 @@ y.select_resource_v1 = {
|
|
|
7939
7940
|
},
|
|
7940
7941
|
updateShadow_: function() {
|
|
7941
7942
|
if (this.isInsertionMarker()) return;
|
|
7942
|
-
let e =
|
|
7943
|
+
let e = un("");
|
|
7943
7944
|
this.getInput("NAME")?.setShadowDom(e);
|
|
7944
7945
|
},
|
|
7945
7946
|
ensureBlocks_: function() {
|
|
@@ -7991,9 +7992,9 @@ ${g.statementToCode(e, "HANDLE")}
|
|
|
7991
7992
|
};
|
|
7992
7993
|
//#endregion
|
|
7993
7994
|
//#region src/core/blocks/text/utils/index.ts
|
|
7994
|
-
var
|
|
7995
|
-
function
|
|
7996
|
-
return
|
|
7995
|
+
var mi = /^\s*'([^']|\\')*'\s*$/;
|
|
7996
|
+
function hi(e) {
|
|
7997
|
+
return mi.test(e) ? [e, _.ATOMIC] : [`String(${e})`, _.FUNCTION_CALL];
|
|
7997
7998
|
}
|
|
7998
7999
|
m.register("text_append_tooltip_v1", m.buildTooltipWithFieldText("%{BKY_TEXT_V1_APPEND_TOOLTIP}", "VAR")), t([{
|
|
7999
8000
|
type: "text_append_v1",
|
|
@@ -8011,7 +8012,7 @@ m.register("text_append_tooltip_v1", m.buildTooltipWithFieldText("%{BKY_TEXT_V1_
|
|
|
8011
8012
|
helpUrl: "%{BKY_TEXT_V1_APPEND_HELPURL}",
|
|
8012
8013
|
extensions: ["text_append_tooltip_v1"]
|
|
8013
8014
|
}]), g.forBlock.text_append_v1 = function(t) {
|
|
8014
|
-
return `${g.nameDB_?.getName(t.getFieldValue("VAR"), e.NameType.VARIABLE)} += ${
|
|
8015
|
+
return `${g.nameDB_?.getName(t.getFieldValue("VAR"), e.NameType.VARIABLE)} += ${hi(g.valueToCode(t, "TEXT", _.NONE) || "''")};\n`;
|
|
8015
8016
|
}, t([{
|
|
8016
8017
|
type: "text_change_case_v1",
|
|
8017
8018
|
message0: "%{BKY_TEXT_V1_CHANGE_CASE_TITLE}",
|
|
@@ -8135,11 +8136,11 @@ function ${g.FUNCTION_NAME_PLACEHOLDER_}(haystack, needle) {
|
|
|
8135
8136
|
};
|
|
8136
8137
|
//#endregion
|
|
8137
8138
|
//#region src/core/blocks/text/textJoin/v1/index.ts
|
|
8138
|
-
var
|
|
8139
|
+
var gi = p.xml;
|
|
8139
8140
|
m.registerMutator("text_join_mutator_v1", {
|
|
8140
8141
|
itemCount_: 0,
|
|
8141
8142
|
mutationToDom: function() {
|
|
8142
|
-
let e =
|
|
8143
|
+
let e = gi.createElement("mutation");
|
|
8143
8144
|
return e.setAttribute("items", `${this.itemCount_}`), e;
|
|
8144
8145
|
},
|
|
8145
8146
|
domToMutation: function(e) {
|
|
@@ -8230,10 +8231,10 @@ m.registerMutator("text_join_mutator_v1", {
|
|
|
8230
8231
|
let t = e;
|
|
8231
8232
|
switch (t.itemCount_) {
|
|
8232
8233
|
case 0: return ["''", _.ATOMIC];
|
|
8233
|
-
case 1: return
|
|
8234
|
+
case 1: return hi(g.valueToCode(t, "ADD0", _.NONE) || "''");
|
|
8234
8235
|
case 2: {
|
|
8235
8236
|
let e = g.valueToCode(t, "ADD0", _.NONE) || "''", n = g.valueToCode(t, "ADD1", _.NONE) || "''";
|
|
8236
|
-
return [
|
|
8237
|
+
return [hi(e)[0] + " + " + hi(n)[0], _.ADDITION];
|
|
8237
8238
|
}
|
|
8238
8239
|
default: {
|
|
8239
8240
|
let e = Array(t.itemCount_);
|
|
@@ -8391,13 +8392,13 @@ function ${g.FUNCTION_NAME_PLACEHOLDER_}(haystack, needle, replacement) {
|
|
|
8391
8392
|
},
|
|
8392
8393
|
updateShadow_: function() {
|
|
8393
8394
|
if (this.isInsertionMarker()) return;
|
|
8394
|
-
let e =
|
|
8395
|
+
let e = dn(1e3);
|
|
8395
8396
|
this.getInput("INTERVAL")?.setShadowDom(e);
|
|
8396
|
-
let t =
|
|
8397
|
+
let t = fn(!1);
|
|
8397
8398
|
this.getInput("LOOP")?.setShadowDom(t);
|
|
8398
|
-
let n =
|
|
8399
|
+
let n = dn(1);
|
|
8399
8400
|
this.getInput("COUNT")?.setShadowDom(n);
|
|
8400
|
-
let r =
|
|
8401
|
+
let r = fn(!1);
|
|
8401
8402
|
this.getInput("IMMEDIATE")?.setShadowDom(r);
|
|
8402
8403
|
}
|
|
8403
8404
|
}, g.forBlock.create_timer_v1 = function(e) {
|
|
@@ -8421,7 +8422,7 @@ ${g.statementToCode(e, "CALLBACK")}});\n`;
|
|
|
8421
8422
|
};
|
|
8422
8423
|
//#endregion
|
|
8423
8424
|
//#region src/core/blocks/variable/extensions/v1/index.ts
|
|
8424
|
-
var
|
|
8425
|
+
var _i = { customContextMenu: function(e) {
|
|
8425
8426
|
if (!this.isInFlyout) {
|
|
8426
8427
|
let t, n;
|
|
8427
8428
|
this.type === "variable_get_v1" ? (t = "variable_set_v1", n = P("VARIABLE_GET_CREATE_SET")) : this.type === "variable_set_v1" ? (t = "variable_get_v1", n = P("VARIABLE_SET_CREATE_GET")) : console.assert(!1);
|
|
@@ -8438,26 +8439,26 @@ var hi = { customContextMenu: function(e) {
|
|
|
8438
8439
|
let t = {
|
|
8439
8440
|
text: P("RENAME_VARIABLE"),
|
|
8440
8441
|
enabled: !0,
|
|
8441
|
-
callback:
|
|
8442
|
+
callback: vi(this)
|
|
8442
8443
|
}, n = this.getField("VAR").getText(), r = {
|
|
8443
8444
|
text: P("DELETE_VARIABLE").replace("%1", n),
|
|
8444
8445
|
enabled: !0,
|
|
8445
|
-
callback:
|
|
8446
|
+
callback: yi(this)
|
|
8446
8447
|
};
|
|
8447
8448
|
e.unshift(t), e.unshift(r);
|
|
8448
8449
|
}
|
|
8449
|
-
} },
|
|
8450
|
+
} }, vi = function(e) {
|
|
8450
8451
|
return function() {
|
|
8451
8452
|
let t = e.workspace, n = e.getField("VAR").getVariable();
|
|
8452
8453
|
c.renameVariable(t, n);
|
|
8453
8454
|
};
|
|
8454
|
-
},
|
|
8455
|
+
}, yi = function(e) {
|
|
8455
8456
|
return function() {
|
|
8456
8457
|
let t = e.getField("VAR").getVariable();
|
|
8457
8458
|
t && c.deleteVariable(t.getWorkspace(), t, e);
|
|
8458
8459
|
};
|
|
8459
8460
|
};
|
|
8460
|
-
m.registerMixin("context_menu_variable_v1",
|
|
8461
|
+
m.registerMixin("context_menu_variable_v1", _i), t([{
|
|
8461
8462
|
type: "variable_get_v1",
|
|
8462
8463
|
message0: "%1",
|
|
8463
8464
|
args0: [{
|
|
@@ -8491,12 +8492,12 @@ m.registerMixin("context_menu_variable_v1", hi), t([{
|
|
|
8491
8492
|
}]), g.forBlock.variable_set_v1 = function(t) {
|
|
8492
8493
|
return `${g.nameDB_.getName(t.getFieldValue("VAR"), e.NameType.VARIABLE)} = ${g.valueToCode(t, "VALUE", _.ASSIGNMENT) || "0"};\n`;
|
|
8493
8494
|
}, ae.setConfirm(async (e, t) => {
|
|
8494
|
-
t(!!await
|
|
8495
|
+
t(!!await ut({
|
|
8495
8496
|
title: "",
|
|
8496
8497
|
text: e
|
|
8497
8498
|
}));
|
|
8498
8499
|
}), ae.setPrompt(async (e, t, n) => {
|
|
8499
|
-
let r = await
|
|
8500
|
+
let r = await dt({
|
|
8500
8501
|
title: "",
|
|
8501
8502
|
value: t
|
|
8502
8503
|
});
|
|
@@ -8504,18 +8505,18 @@ m.registerMixin("context_menu_variable_v1", hi), t([{
|
|
|
8504
8505
|
});
|
|
8505
8506
|
//#endregion
|
|
8506
8507
|
//#region src/core/plugins/fieldDropdown/index.ts
|
|
8507
|
-
var
|
|
8508
|
-
|
|
8508
|
+
var bi = b.prototype;
|
|
8509
|
+
bi.doClassValidation_ = function(e) {
|
|
8509
8510
|
return e;
|
|
8510
8511
|
};
|
|
8511
|
-
var
|
|
8512
|
-
|
|
8513
|
-
|
|
8512
|
+
var xi = bi.doValueUpdate_;
|
|
8513
|
+
bi.doValueUpdate_ = function(e) {
|
|
8514
|
+
xi.call(this, e), this.selectedOption && this.selectedOption[1] !== e && (this.selectedOption = null);
|
|
8514
8515
|
};
|
|
8515
|
-
var
|
|
8516
|
-
|
|
8517
|
-
if (this.selectedOption) return
|
|
8518
|
-
let { i18n: e } =
|
|
8516
|
+
var Si = bi.getText_;
|
|
8517
|
+
bi.getText_ = function() {
|
|
8518
|
+
if (this.selectedOption) return Si.call(this);
|
|
8519
|
+
let { i18n: e } = ct, t = this.getSourceBlock();
|
|
8519
8520
|
if (this.name === "APP") return t.app.name;
|
|
8520
8521
|
if (this.name === "PAGE") return t.page.name;
|
|
8521
8522
|
if (this.name === "ELEMENT") return t.element.name;
|
|
@@ -8524,13 +8525,13 @@ vi.getText_ = function() {
|
|
|
8524
8525
|
if (n) return `${e.global.t(n.name)} / ${t.node.alias}`;
|
|
8525
8526
|
} else if (this.name === "PROPERTY") {
|
|
8526
8527
|
let { kind: e, names: n } = t.property;
|
|
8527
|
-
return
|
|
8528
|
+
return Xe(e, n);
|
|
8528
8529
|
} else if (this.name === "EVENT") {
|
|
8529
8530
|
let { kind: e, names: n } = t.event;
|
|
8530
|
-
return
|
|
8531
|
+
return Je(e, n);
|
|
8531
8532
|
} else if (this.name === "METHOD") {
|
|
8532
8533
|
let { kind: e, names: n } = t.method;
|
|
8533
|
-
return
|
|
8534
|
+
return Ye(e, n);
|
|
8534
8535
|
} else if (this.name === "SPACE") return t.space.name;
|
|
8535
8536
|
else if (this.name === "FUNC") return t.func.name;
|
|
8536
8537
|
else if (this.name === "OUTPUT") return t.output.name;
|
|
@@ -8542,7 +8543,7 @@ vi.getText_ = function() {
|
|
|
8542
8543
|
};
|
|
8543
8544
|
//#endregion
|
|
8544
8545
|
//#region src/core/plugins/workspaceCleanUp/index.ts
|
|
8545
|
-
var
|
|
8546
|
+
var Ci = 60;
|
|
8546
8547
|
ee.prototype.cleanUp = function() {
|
|
8547
8548
|
this.setResizesEnabled(!1);
|
|
8548
8549
|
let e = x.getGroup();
|
|
@@ -8555,47 +8556,47 @@ ee.prototype.cleanUp = function() {
|
|
|
8555
8556
|
let t = e.getBoundingRectangle();
|
|
8556
8557
|
e.moveBy(-t.left, a - t.top, ["cleanup"]), e.snapToGrid(), t = e.getBoundingRectangle();
|
|
8557
8558
|
let n = i(t);
|
|
8558
|
-
for (; n != null;) a = n.top + n.getHeight() +
|
|
8559
|
-
a = e.getRelativeToSurfaceXY().y + e.getHeightWidth().height +
|
|
8559
|
+
for (; n != null;) a = n.top + n.getHeight() + Ci, e.moveBy(0, a - t.top, ["cleanup"]), e.snapToGrid(), t = e.getBoundingRectangle(), n = i(t);
|
|
8560
|
+
a = e.getRelativeToSurfaceXY().y + e.getHeightWidth().height + Ci;
|
|
8560
8561
|
}
|
|
8561
8562
|
x.setGroup(e), this.setResizesEnabled(!0);
|
|
8562
8563
|
};
|
|
8563
8564
|
//#endregion
|
|
8564
8565
|
//#region src/core/plugins/disableTopBlocks/index.ts
|
|
8565
|
-
var
|
|
8566
|
-
function
|
|
8566
|
+
var wi = Te();
|
|
8567
|
+
function Ti(e) {
|
|
8567
8568
|
let t = e.getParent();
|
|
8568
|
-
return t &&
|
|
8569
|
+
return t && Ti(t) ? !0 : !t && !!(e.outputConnection || e.previousConnection);
|
|
8569
8570
|
}
|
|
8570
|
-
var
|
|
8571
|
+
var Ei = class {
|
|
8571
8572
|
init() {
|
|
8572
8573
|
let e = de.registry.getItem("blockDisable");
|
|
8573
8574
|
e && (e.preconditionFn = function(e) {
|
|
8574
8575
|
let t = e.block;
|
|
8575
|
-
return t && !t.isInFlyout && t.workspace.options.disable && t.isEditable() ? t.getInheritedDisabled() ||
|
|
8576
|
+
return t && !t.isInFlyout && t.workspace.options.disable && t.isEditable() ? t.getInheritedDisabled() || Ti(t) ? "disabled" : "enabled" : "hidden";
|
|
8576
8577
|
});
|
|
8577
8578
|
}
|
|
8578
8579
|
};
|
|
8579
|
-
(0,
|
|
8580
|
+
(0, En.registerFieldColour)(), d.registry.unregister(te.names.ESCAPE), new wi.CrossTabCopyPaste().init({
|
|
8580
8581
|
contextMenu: !0,
|
|
8581
8582
|
shortcut: !0
|
|
8582
|
-
}), new
|
|
8583
|
+
}), new Ei().init();
|
|
8583
8584
|
//#endregion
|
|
8584
8585
|
//#region src/core/events/index.ts
|
|
8585
|
-
var
|
|
8586
|
+
var Di = /* @__PURE__ */ function(e) {
|
|
8586
8587
|
return e.STATE_CHANGE = "state_change", e;
|
|
8587
|
-
}({}),
|
|
8588
|
+
}({}), Oi = class extends x.Abstract {
|
|
8588
8589
|
isBlank = !0;
|
|
8589
8590
|
recordUndo = !1;
|
|
8590
|
-
type =
|
|
8591
|
+
type = Di.STATE_CHANGE;
|
|
8591
8592
|
constructor(e) {
|
|
8592
8593
|
super(), this.workspaceId = e.id;
|
|
8593
8594
|
}
|
|
8594
8595
|
};
|
|
8595
|
-
Ce.register(Ce.Type.EVENT,
|
|
8596
|
+
Ce.register(Ce.Type.EVENT, Di.STATE_CHANGE, Oi);
|
|
8596
8597
|
//#endregion
|
|
8597
8598
|
//#region src/core/misc/index.ts
|
|
8598
|
-
function
|
|
8599
|
+
function ki(e) {
|
|
8599
8600
|
let t = s();
|
|
8600
8601
|
if (!t) return;
|
|
8601
8602
|
let n = t.getBlockById(e);
|
|
@@ -8605,11 +8606,11 @@ function Di(e) {
|
|
|
8605
8606
|
let i = r.getRelativeToSurfaceXY(), a = i.x * t.scale, o = i.y * t.scale;
|
|
8606
8607
|
t.scroll(-a, -o);
|
|
8607
8608
|
}
|
|
8608
|
-
function
|
|
8609
|
+
function Ai() {
|
|
8609
8610
|
let e = s();
|
|
8610
8611
|
if (!e) return;
|
|
8611
8612
|
let t = e.getTopBlocks(!0)?.[0];
|
|
8612
|
-
t &&
|
|
8613
|
+
t && ki(t.id);
|
|
8613
8614
|
}
|
|
8614
8615
|
a.Classic.blockStyles = {
|
|
8615
8616
|
color_blocks: {
|
|
@@ -8719,7 +8720,7 @@ a.Classic.blockStyles = {
|
|
|
8719
8720
|
time_category: { colour: "#5b99a5" },
|
|
8720
8721
|
variable_category: { colour: "#a55b80" }
|
|
8721
8722
|
};
|
|
8722
|
-
var
|
|
8723
|
+
var ji = ne.defineTheme("light", {
|
|
8723
8724
|
name: "light",
|
|
8724
8725
|
base: a.Classic,
|
|
8725
8726
|
componentStyles: {
|
|
@@ -8735,7 +8736,7 @@ var ki = ne.defineTheme("light", {
|
|
|
8735
8736
|
scrollbarOpacity: .4,
|
|
8736
8737
|
cursorColour: ""
|
|
8737
8738
|
}
|
|
8738
|
-
}),
|
|
8739
|
+
}), Mi = ne.defineTheme("dark", {
|
|
8739
8740
|
name: "dark",
|
|
8740
8741
|
base: a.Classic,
|
|
8741
8742
|
componentStyles: {
|
|
@@ -8752,45 +8753,45 @@ var ki = ne.defineTheme("light", {
|
|
|
8752
8753
|
cursorColour: ""
|
|
8753
8754
|
}
|
|
8754
8755
|
});
|
|
8755
|
-
function
|
|
8756
|
+
function Ni(e) {
|
|
8756
8757
|
let t = s();
|
|
8757
8758
|
switch (e) {
|
|
8758
8759
|
case "light":
|
|
8759
|
-
t.setTheme(
|
|
8760
|
+
t.setTheme(ji);
|
|
8760
8761
|
break;
|
|
8761
8762
|
case "dark":
|
|
8762
|
-
t.setTheme(
|
|
8763
|
+
t.setTheme(Mi);
|
|
8763
8764
|
break;
|
|
8764
8765
|
}
|
|
8765
8766
|
}
|
|
8766
8767
|
//#endregion
|
|
8767
8768
|
//#region src/components/blockly/buildReactivity.ts
|
|
8768
|
-
function
|
|
8769
|
+
function Pi(e, t) {
|
|
8769
8770
|
e.find((e) => e === t) || e.push(t);
|
|
8770
8771
|
}
|
|
8771
|
-
var
|
|
8772
|
-
function
|
|
8772
|
+
var Fi = ["get_app_property_v1", "get_app_state_v1"];
|
|
8773
|
+
function Ii(e) {
|
|
8773
8774
|
let t = [];
|
|
8774
8775
|
function n(e) {
|
|
8775
|
-
for (let r of e.getChildren(!0))
|
|
8776
|
+
for (let r of e.getChildren(!0)) Fi.includes(r.type) && t.push(r), n(r);
|
|
8776
8777
|
}
|
|
8777
8778
|
return n(e), t;
|
|
8778
8779
|
}
|
|
8779
|
-
function
|
|
8780
|
+
function Li(e) {
|
|
8780
8781
|
let t = [];
|
|
8781
|
-
for (let n of e) n.type === "get_app_property_v1" ?
|
|
8782
|
+
for (let n of e) n.type === "get_app_property_v1" ? Pi(t, Ue("propertyTrigger", n.property.id)) : n.type === "get_app_state_v1" ? Pi(t, Ue("stateTrigger", n.state.id)) : console.assert(!1);
|
|
8782
8783
|
return t;
|
|
8783
8784
|
}
|
|
8784
|
-
function
|
|
8785
|
+
function Ri(e) {
|
|
8785
8786
|
let t = [];
|
|
8786
8787
|
for (let n of e) {
|
|
8787
8788
|
if (n.type !== "app_bind_entry_v1") continue;
|
|
8788
8789
|
let e = n;
|
|
8789
|
-
e.kind === "property" ?
|
|
8790
|
+
e.kind === "property" ? Pi(t, Ue("propertyTrigger", e.property.id)) : e.kind === "state" && Pi(t, Ue("stateTrigger", e.state.id));
|
|
8790
8791
|
}
|
|
8791
8792
|
return t;
|
|
8792
8793
|
}
|
|
8793
|
-
function
|
|
8794
|
+
function zi(e) {
|
|
8794
8795
|
let t = {
|
|
8795
8796
|
watchEffect: {
|
|
8796
8797
|
ids: [],
|
|
@@ -8803,38 +8804,38 @@ function Li(e) {
|
|
|
8803
8804
|
}, n = e.getTopBlocks(!0);
|
|
8804
8805
|
if (!n) return t;
|
|
8805
8806
|
for (let e of n) if (e.type === "watch_effect_v1") {
|
|
8806
|
-
let n =
|
|
8807
|
-
for (let r of n) t.watchEffect.triggers[r] || (t.watchEffect.triggers[r] = []),
|
|
8807
|
+
let n = Li(Ii(e));
|
|
8808
|
+
for (let r of n) t.watchEffect.triggers[r] || (t.watchEffect.triggers[r] = []), Pi(t.watchEffect.triggers[r], e.id);
|
|
8808
8809
|
t.watchEffect.ids.push(e.id);
|
|
8809
8810
|
} else if (e.type === "app_bind_v1") {
|
|
8810
|
-
let n =
|
|
8811
|
+
let n = Ri(e.getChildren(!0));
|
|
8811
8812
|
t.bind.sets[e.id] = n;
|
|
8812
|
-
for (let r of n) t.bind.triggers[r] || (t.bind.triggers[r] = []),
|
|
8813
|
+
for (let r of n) t.bind.triggers[r] || (t.bind.triggers[r] = []), Pi(t.bind.triggers[r], e.id);
|
|
8813
8814
|
}
|
|
8814
8815
|
return t;
|
|
8815
8816
|
}
|
|
8816
8817
|
//#endregion
|
|
8817
8818
|
//#region src/components/blockly/provideInject.ts
|
|
8818
|
-
var
|
|
8819
|
-
function
|
|
8820
|
-
|
|
8819
|
+
var Bi = Symbol();
|
|
8820
|
+
function Vi(e) {
|
|
8821
|
+
Dt(Bi, e);
|
|
8821
8822
|
}
|
|
8822
|
-
function
|
|
8823
|
-
return
|
|
8823
|
+
function Hi() {
|
|
8824
|
+
return yt(Bi);
|
|
8824
8825
|
}
|
|
8825
8826
|
//#endregion
|
|
8826
8827
|
//#region src/components/blockly/clean/index.vue
|
|
8827
|
-
var
|
|
8828
|
+
var Ui = /* @__PURE__ */ vt({
|
|
8828
8829
|
__name: "index",
|
|
8829
8830
|
props: { lock: { type: Boolean } },
|
|
8830
8831
|
setup(e, { expose: t }) {
|
|
8831
|
-
let { t: n } =
|
|
8832
|
+
let { t: n } = Ht(), r = Vt(), i = e, a = Hi(), o = E(() => r.smAndDown.value), s = () => {
|
|
8832
8833
|
if (!a.workspace) {
|
|
8833
8834
|
console.assert(!1);
|
|
8834
8835
|
return;
|
|
8835
8836
|
}
|
|
8836
8837
|
if (i.lock) {
|
|
8837
|
-
|
|
8838
|
+
lt(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
8838
8839
|
return;
|
|
8839
8840
|
}
|
|
8840
8841
|
a.workspace.cleanUp();
|
|
@@ -8843,11 +8844,11 @@ var Vi = /* @__PURE__ */ gt({
|
|
|
8843
8844
|
};
|
|
8844
8845
|
return t({ cleanWorkspace: s }), (e, t) => {
|
|
8845
8846
|
let r = M("v-btn"), i = M("v-tooltip");
|
|
8846
|
-
return j(),
|
|
8847
|
+
return j(), gt(i, {
|
|
8847
8848
|
disabled: o.value,
|
|
8848
8849
|
text: N(n)("x-block-lib.tip.hotkeyCtrlQ")
|
|
8849
8850
|
}, {
|
|
8850
|
-
activator:
|
|
8851
|
+
activator: Lt(({ props: e }) => [k(r, St(e, {
|
|
8851
8852
|
density: "comfortable",
|
|
8852
8853
|
icon: "mdi-broom",
|
|
8853
8854
|
variant: "outlined",
|
|
@@ -8857,7 +8858,7 @@ var Vi = /* @__PURE__ */ gt({
|
|
|
8857
8858
|
}, 8, ["disabled", "text"]);
|
|
8858
8859
|
};
|
|
8859
8860
|
}
|
|
8860
|
-
}),
|
|
8861
|
+
}), Wi = /* @__PURE__ */ vt({
|
|
8861
8862
|
__name: "index",
|
|
8862
8863
|
props: {
|
|
8863
8864
|
modelValue: {
|
|
@@ -8868,14 +8869,14 @@ var Vi = /* @__PURE__ */ gt({
|
|
|
8868
8869
|
},
|
|
8869
8870
|
emits: ["update:modelValue"],
|
|
8870
8871
|
setup(e) {
|
|
8871
|
-
let { t } =
|
|
8872
|
+
let { t } = Ht(), n = Vt(), r = Pt(e, "modelValue"), i = E(() => n.smAndDown.value);
|
|
8872
8873
|
return (e, n) => {
|
|
8873
8874
|
let a = M("v-btn"), o = M("v-tooltip");
|
|
8874
|
-
return j(),
|
|
8875
|
+
return j(), gt(o, {
|
|
8875
8876
|
disabled: i.value,
|
|
8876
8877
|
text: N(t)("x-block-lib.tip.hotkeyCtrlW")
|
|
8877
8878
|
}, {
|
|
8878
|
-
activator:
|
|
8879
|
+
activator: Lt(({ props: e }) => [k(a, St(e, {
|
|
8879
8880
|
density: "comfortable",
|
|
8880
8881
|
icon: r.value ? "mdi-lock" : "mdi-lock-open",
|
|
8881
8882
|
variant: "outlined",
|
|
@@ -8885,11 +8886,11 @@ var Vi = /* @__PURE__ */ gt({
|
|
|
8885
8886
|
}, 8, ["disabled", "text"]);
|
|
8886
8887
|
};
|
|
8887
8888
|
}
|
|
8888
|
-
}),
|
|
8889
|
+
}), Gi = { class: "d-flex flex-column" }, Ki = { class: "text-body-large ml-6" }, qi = {
|
|
8889
8890
|
key: 0,
|
|
8890
8891
|
class: "text-body-small text-grey text-truncate ml-6",
|
|
8891
8892
|
style: { maxWidth: "340px" }
|
|
8892
|
-
},
|
|
8893
|
+
}, Ji = /* @__PURE__ */ vt({
|
|
8893
8894
|
__name: "item",
|
|
8894
8895
|
props: {
|
|
8895
8896
|
id: {},
|
|
@@ -8899,48 +8900,46 @@ var Vi = /* @__PURE__ */ gt({
|
|
|
8899
8900
|
},
|
|
8900
8901
|
emits: ["x-click"],
|
|
8901
8902
|
setup(e, { emit: t }) {
|
|
8902
|
-
let { primaryColor: n, backgroundColor2: r, highlightColor: i } =
|
|
8903
|
+
let { primaryColor: n, backgroundColor2: r, highlightColor: i } = ft(), a = t, o = Ot(!1), s = E(() => {
|
|
8903
8904
|
let t = {
|
|
8904
8905
|
position: "relative",
|
|
8905
8906
|
background: o.value ? i.value : r.value,
|
|
8906
8907
|
width: "100%",
|
|
8907
8908
|
height: "48px",
|
|
8908
8909
|
marginTop: "1px",
|
|
8909
|
-
marginLeft: "1px",
|
|
8910
|
-
marginRight: "1px",
|
|
8911
8910
|
userSelect: "none"
|
|
8912
8911
|
};
|
|
8913
8912
|
return e.select ? t.outline = "1px solid " + n.value : t.outline = void 0, t;
|
|
8914
8913
|
});
|
|
8915
8914
|
return (t, n) => {
|
|
8916
|
-
let r = M("v-spacer"), i = M("v-icon"), c =
|
|
8917
|
-
return
|
|
8915
|
+
let r = M("v-spacer"), i = M("v-icon"), c = jt("ripple");
|
|
8916
|
+
return Rt((j(), D("div", {
|
|
8918
8917
|
class: "d-flex align-center cursor-pointer",
|
|
8919
8918
|
style: A(s.value),
|
|
8920
8919
|
onClick: n[1] ||= (t) => a("x-click", e.id),
|
|
8921
8920
|
onMouseout: n[2] ||= (e) => o.value = !1,
|
|
8922
8921
|
onMouseover: n[3] ||= (e) => o.value = !0
|
|
8923
8922
|
}, [
|
|
8924
|
-
O("div",
|
|
8923
|
+
O("div", Gi, [O("span", Ki, Mt(e.title), 1), e.desc ? (j(), D("span", qi, Mt(e.desc), 1)) : _t("", !0)]),
|
|
8925
8924
|
k(r),
|
|
8926
8925
|
k(i, {
|
|
8927
8926
|
class: "x-handle cursor-move mr-3",
|
|
8928
8927
|
icon: "mdi-drag-horizontal-variant",
|
|
8929
|
-
onMousedown: n[0] ||=
|
|
8928
|
+
onMousedown: n[0] ||= Bt(() => {}, ["stop"])
|
|
8930
8929
|
})
|
|
8931
8930
|
], 36)), [[c]]);
|
|
8932
8931
|
};
|
|
8933
8932
|
}
|
|
8934
|
-
}),
|
|
8933
|
+
}), Yi = {
|
|
8935
8934
|
key: 1,
|
|
8936
8935
|
class: "text-body-small text-grey"
|
|
8937
|
-
},
|
|
8936
|
+
}, Xi = /* @__PURE__ */ ((e, t) => {
|
|
8938
8937
|
let n = e.__vccOpts || e;
|
|
8939
8938
|
for (let [e, r] of t) n[e] = r;
|
|
8940
8939
|
return n;
|
|
8941
|
-
})(/* @__PURE__ */
|
|
8940
|
+
})(/* @__PURE__ */ vt({
|
|
8942
8941
|
__name: "index",
|
|
8943
|
-
props: /* @__PURE__ */
|
|
8942
|
+
props: /* @__PURE__ */ xt({ lock: { type: Boolean } }, {
|
|
8944
8943
|
modelValue: {
|
|
8945
8944
|
type: Boolean,
|
|
8946
8945
|
required: !0
|
|
@@ -8949,7 +8948,7 @@ var Vi = /* @__PURE__ */ gt({
|
|
|
8949
8948
|
}),
|
|
8950
8949
|
emits: ["update:modelValue"],
|
|
8951
8950
|
setup(e, { expose: t }) {
|
|
8952
|
-
let { t: n } =
|
|
8951
|
+
let { t: n } = Ht(), r = Pt(e, "modelValue"), i = Hi(), a = Ot([]);
|
|
8953
8952
|
t({ update: () => {
|
|
8954
8953
|
if (!i.workspace) {
|
|
8955
8954
|
console.assert(!1);
|
|
@@ -8960,12 +8959,12 @@ var Vi = /* @__PURE__ */ gt({
|
|
|
8960
8959
|
let r = t.id === ie()?.id, i = "";
|
|
8961
8960
|
if (t.type.startsWith("on_app_event_v")) {
|
|
8962
8961
|
let e = t, r = w(e.node.key);
|
|
8963
|
-
r && (i = n(r.name), e.node.alias && (i += " / " + e.node.alias), i += " - " +
|
|
8962
|
+
r && (i = n(r.name), e.node.alias && (i += " / " + e.node.alias), i += " - " + Je(e.event.kind, e.event.names));
|
|
8964
8963
|
} else if (t.type.startsWith("watch_effect_v")) i = n("x-block-lib.watchEffect");
|
|
8965
8964
|
else if (t.type.startsWith("app_bind_v")) i = n("x-block-lib.bind");
|
|
8966
8965
|
else if (t.type.startsWith("implement_app_method_v")) {
|
|
8967
8966
|
let e = t;
|
|
8968
|
-
i = n("x-block-lib.implementMethod"), i += " - " +
|
|
8967
|
+
i = n("x-block-lib.implementMethod"), i += " - " + Ye(e.method.kind, e.method.names);
|
|
8969
8968
|
} 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");
|
|
8970
8969
|
let a = t.getCommentText() ?? "";
|
|
8971
8970
|
e.push({
|
|
@@ -8978,7 +8977,7 @@ var Vi = /* @__PURE__ */ gt({
|
|
|
8978
8977
|
} });
|
|
8979
8978
|
let o = [], s = () => {
|
|
8980
8979
|
if (e.lock) {
|
|
8981
|
-
|
|
8980
|
+
lt(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
8982
8981
|
return;
|
|
8983
8982
|
}
|
|
8984
8983
|
let t = [];
|
|
@@ -9005,16 +9004,16 @@ var Vi = /* @__PURE__ */ gt({
|
|
|
9005
9004
|
let a = -10;
|
|
9006
9005
|
r !== "" && (a = i.workspace.getBlockById(r).getRelativeToSurfaceXY().y + 10);
|
|
9007
9006
|
let s = n.getRelativeToSurfaceXY();
|
|
9008
|
-
n.moveTo(new p.Coordinate(s.x, a)), i.workspace.cleanUp(),
|
|
9007
|
+
n.moveTo(new p.Coordinate(s.x, a)), i.workspace.cleanUp(), Ai();
|
|
9009
9008
|
}, u = async (e) => {
|
|
9010
9009
|
if (!i.workspace) {
|
|
9011
9010
|
console.assert(!1);
|
|
9012
9011
|
return;
|
|
9013
9012
|
}
|
|
9014
9013
|
let t = i.workspace.getBlockById(e);
|
|
9015
|
-
ke.setSelected(t),
|
|
9014
|
+
ke.setSelected(t), ki(e), r.value = !1;
|
|
9016
9015
|
};
|
|
9017
|
-
return (e, t) => a.value.length > 0 ? (j(),
|
|
9016
|
+
return (e, t) => a.value.length > 0 ? (j(), gt(N(ue), {
|
|
9018
9017
|
key: 0,
|
|
9019
9018
|
modelValue: a.value,
|
|
9020
9019
|
"onUpdate:modelValue": t[0] ||= (e) => a.value = e,
|
|
@@ -9025,7 +9024,7 @@ var Vi = /* @__PURE__ */ gt({
|
|
|
9025
9024
|
onMove: c,
|
|
9026
9025
|
onStart: s
|
|
9027
9026
|
}, {
|
|
9028
|
-
default:
|
|
9027
|
+
default: Lt(() => [(j(!0), D(ht, null, kt(a.value, (e) => (j(), gt(Ji, {
|
|
9029
9028
|
id: e.id,
|
|
9030
9029
|
key: e.id,
|
|
9031
9030
|
desc: e.desc,
|
|
@@ -9039,9 +9038,9 @@ var Vi = /* @__PURE__ */ gt({
|
|
|
9039
9038
|
"title"
|
|
9040
9039
|
]))), 128))]),
|
|
9041
9040
|
_: 1
|
|
9042
|
-
}, 8, ["modelValue"])) : (j(), D("span",
|
|
9041
|
+
}, 8, ["modelValue"])) : (j(), D("span", Yi, Mt(N(n)("x-block-lib.noOption")), 1));
|
|
9043
9042
|
}
|
|
9044
|
-
}), [["__scopeId", "data-v-a710550b"]]),
|
|
9043
|
+
}), [["__scopeId", "data-v-a710550b"]]), Zi = /* @__PURE__ */ vt({
|
|
9045
9044
|
__name: "index",
|
|
9046
9045
|
props: {
|
|
9047
9046
|
modelValue: {
|
|
@@ -9052,7 +9051,7 @@ var Vi = /* @__PURE__ */ gt({
|
|
|
9052
9051
|
},
|
|
9053
9052
|
emits: ["update:modelValue"],
|
|
9054
9053
|
setup(e, { expose: t }) {
|
|
9055
|
-
let n =
|
|
9054
|
+
let n = Pt(e, "modelValue"), r = Hi();
|
|
9056
9055
|
t({ update: () => {
|
|
9057
9056
|
if (!r.workspace) {
|
|
9058
9057
|
console.assert(!1);
|
|
@@ -9066,18 +9065,18 @@ var Vi = /* @__PURE__ */ gt({
|
|
|
9066
9065
|
return;
|
|
9067
9066
|
}
|
|
9068
9067
|
let r = t.getBlockById(e);
|
|
9069
|
-
ke.setSelected(r),
|
|
9068
|
+
ke.setSelected(r), ki(e), n.value = !1;
|
|
9070
9069
|
};
|
|
9071
9070
|
return (e, t) => (j(), D("div", { onClick: t[0] ||= (e) => i("") }, "blockTree"));
|
|
9072
9071
|
}
|
|
9073
|
-
}),
|
|
9072
|
+
}), Qi = { class: "text-body-large" }, $i = /* @__PURE__ */ vt({
|
|
9074
9073
|
__name: "index",
|
|
9075
9074
|
props: {
|
|
9076
9075
|
type: {},
|
|
9077
9076
|
lock: { type: Boolean }
|
|
9078
9077
|
},
|
|
9079
9078
|
setup(e, { expose: t }) {
|
|
9080
|
-
let { t: n } =
|
|
9079
|
+
let { t: n } = Ht(), r = Vt(), { sysBarAvail: i } = pt(), { backgroundColor1: a } = ft(), o = E(() => r.smAndDown.value), s = E(() => {
|
|
9081
9080
|
let e = "100%";
|
|
9082
9081
|
return r.mdAndUp.value && (e = "400px"), {
|
|
9083
9082
|
background: a.value,
|
|
@@ -9090,11 +9089,11 @@ var Vi = /* @__PURE__ */ gt({
|
|
|
9090
9089
|
position: "relative",
|
|
9091
9090
|
height: `calc(100% - ${e}px)`
|
|
9092
9091
|
};
|
|
9093
|
-
}), l = E(() => ({ height: "60px" })), { open: u } =
|
|
9094
|
-
|
|
9092
|
+
}), l = E(() => ({ height: "60px" })), { open: u } = mt(`blocklyNavigatorDlg${Nt()}`);
|
|
9093
|
+
Et(() => {
|
|
9095
9094
|
u.value = !1;
|
|
9096
9095
|
});
|
|
9097
|
-
let ee =
|
|
9096
|
+
let ee = Ft("blockList"), te = Ft("blockTree");
|
|
9098
9097
|
return t({
|
|
9099
9098
|
open: u,
|
|
9100
9099
|
update: () => {
|
|
@@ -9102,42 +9101,42 @@ var Vi = /* @__PURE__ */ gt({
|
|
|
9102
9101
|
}
|
|
9103
9102
|
}), (t, r) => {
|
|
9104
9103
|
let a = M("v-sheet"), d = M("v-btn"), f = M("v-spacer"), ne = M("v-dialog"), p = M("v-tooltip");
|
|
9105
|
-
return j(), D(
|
|
9104
|
+
return j(), D(ht, null, [k(ne, {
|
|
9106
9105
|
modelValue: N(u),
|
|
9107
|
-
"onUpdate:modelValue": r[5] ||= (e) =>
|
|
9106
|
+
"onUpdate:modelValue": r[5] ||= (e) => bt(u) ? u.value = e : null,
|
|
9108
9107
|
eager: "",
|
|
9109
9108
|
fullscreen: "",
|
|
9110
9109
|
"no-click-animation": "",
|
|
9111
9110
|
persistent: "",
|
|
9112
9111
|
transition: "scroll-x-reverse-transition",
|
|
9113
|
-
onKeydown: r[6] ||=
|
|
9112
|
+
onKeydown: r[6] ||= zt(Bt((e) => u.value = !1, ["stop", "prevent"]), ["esc"])
|
|
9114
9113
|
}, {
|
|
9115
|
-
default:
|
|
9114
|
+
default: Lt(() => [O("div", {
|
|
9116
9115
|
class: "w-100 h-100 d-flex flex-row-reverse",
|
|
9117
|
-
onClick: r[3] ||=
|
|
9118
|
-
onContextmenu: r[4] ||=
|
|
9116
|
+
onClick: r[3] ||= Bt((e) => u.value = !1, ["self"]),
|
|
9117
|
+
onContextmenu: r[4] ||= Bt((e) => u.value = !1, ["self", "prevent"])
|
|
9119
9118
|
}, [O("div", {
|
|
9120
9119
|
class: "elevation-2",
|
|
9121
9120
|
style: A(s.value)
|
|
9122
9121
|
}, [
|
|
9123
|
-
N(i) ? (j(),
|
|
9122
|
+
N(i) ? (j(), gt(a, {
|
|
9124
9123
|
key: 0,
|
|
9125
9124
|
color: "transparent",
|
|
9126
9125
|
height: 24
|
|
9127
|
-
})) :
|
|
9126
|
+
})) : _t("", !0),
|
|
9128
9127
|
k(a, {
|
|
9129
9128
|
class: "d-flex align-center px-2",
|
|
9130
9129
|
color: "transparent",
|
|
9131
9130
|
height: 48
|
|
9132
9131
|
}, {
|
|
9133
|
-
default:
|
|
9132
|
+
default: Lt(() => [
|
|
9134
9133
|
k(d, {
|
|
9135
9134
|
density: "comfortable",
|
|
9136
9135
|
icon: "mdi-close",
|
|
9137
9136
|
variant: "text",
|
|
9138
9137
|
onClick: r[0] ||= (e) => u.value = !1
|
|
9139
9138
|
}),
|
|
9140
|
-
O("span",
|
|
9139
|
+
O("span", Qi, Mt(N(n)("x-block-lib.navigator")), 1),
|
|
9141
9140
|
k(f)
|
|
9142
9141
|
]),
|
|
9143
9142
|
_: 1
|
|
@@ -9145,27 +9144,27 @@ var Vi = /* @__PURE__ */ gt({
|
|
|
9145
9144
|
O("div", {
|
|
9146
9145
|
class: "overflow-y-auto",
|
|
9147
9146
|
style: A(c.value)
|
|
9148
|
-
}, [e.type === "list" ? (j(),
|
|
9147
|
+
}, [e.type === "list" ? (j(), gt(Xi, {
|
|
9149
9148
|
key: 0,
|
|
9150
9149
|
ref_key: "blockList",
|
|
9151
9150
|
ref: ee,
|
|
9152
9151
|
modelValue: N(u),
|
|
9153
|
-
"onUpdate:modelValue": r[1] ||= (e) =>
|
|
9152
|
+
"onUpdate:modelValue": r[1] ||= (e) => bt(u) ? u.value = e : null,
|
|
9154
9153
|
lock: e.lock
|
|
9155
|
-
}, null, 8, ["modelValue", "lock"])) : e.type === "tree" ? (j(),
|
|
9154
|
+
}, null, 8, ["modelValue", "lock"])) : e.type === "tree" ? (j(), gt(Zi, {
|
|
9156
9155
|
key: 1,
|
|
9157
9156
|
ref_key: "blockTree",
|
|
9158
9157
|
ref: te,
|
|
9159
9158
|
modelValue: N(u),
|
|
9160
|
-
"onUpdate:modelValue": r[2] ||= (e) =>
|
|
9161
|
-
}, null, 8, ["modelValue"])) :
|
|
9159
|
+
"onUpdate:modelValue": r[2] ||= (e) => bt(u) ? u.value = e : null
|
|
9160
|
+
}, null, 8, ["modelValue"])) : _t("", !0), O("div", { style: A(l.value) }, null, 4)], 4)
|
|
9162
9161
|
], 4)], 32)]),
|
|
9163
9162
|
_: 1
|
|
9164
9163
|
}, 8, ["modelValue"]), k(p, {
|
|
9165
9164
|
disabled: o.value,
|
|
9166
9165
|
text: N(n)("x-block-lib.tip.hotkeyCtrlE")
|
|
9167
9166
|
}, {
|
|
9168
|
-
activator:
|
|
9167
|
+
activator: Lt(({ props: e }) => [k(d, St(e, {
|
|
9169
9168
|
density: "comfortable",
|
|
9170
9169
|
icon: "mdi-navigation-variant",
|
|
9171
9170
|
variant: "outlined",
|
|
@@ -9175,7 +9174,7 @@ var Vi = /* @__PURE__ */ gt({
|
|
|
9175
9174
|
}, 8, ["disabled", "text"])], 64);
|
|
9176
9175
|
};
|
|
9177
9176
|
}
|
|
9178
|
-
}),
|
|
9177
|
+
}), ea = ge(), Z = p.xml;
|
|
9179
9178
|
function Q(e) {
|
|
9180
9179
|
let t = Z.createElement("label");
|
|
9181
9180
|
return t.setAttribute("text", e), t;
|
|
@@ -9185,12 +9184,12 @@ function $(e, t) {
|
|
|
9185
9184
|
if (n.setAttribute("type", e), t) for (let e of t) n.appendChild(e);
|
|
9186
9185
|
return n;
|
|
9187
9186
|
}
|
|
9188
|
-
function
|
|
9187
|
+
function ta(e) {
|
|
9189
9188
|
let t = Z.createElement("mutation");
|
|
9190
9189
|
for (let { key: n, value: r } of e) t.setAttribute(n, r);
|
|
9191
9190
|
return t;
|
|
9192
9191
|
}
|
|
9193
|
-
function
|
|
9192
|
+
function na(e, t) {
|
|
9194
9193
|
t === void 0 && (t = "");
|
|
9195
9194
|
let n = Z.createElement("value");
|
|
9196
9195
|
n.setAttribute("name", e);
|
|
@@ -9201,7 +9200,7 @@ function ea(e, t) {
|
|
|
9201
9200
|
let a = Z.createTextNode(t);
|
|
9202
9201
|
return i.appendChild(a), r.appendChild(i), n.appendChild(r), n;
|
|
9203
9202
|
}
|
|
9204
|
-
function
|
|
9203
|
+
function ra(e, t) {
|
|
9205
9204
|
t === void 0 && (t = 0);
|
|
9206
9205
|
let n = Z.createElement("value");
|
|
9207
9206
|
n.setAttribute("name", e);
|
|
@@ -9212,7 +9211,7 @@ function ta(e, t) {
|
|
|
9212
9211
|
let a = Z.createTextNode(String(t));
|
|
9213
9212
|
return i.appendChild(a), r.appendChild(i), n.appendChild(r), n;
|
|
9214
9213
|
}
|
|
9215
|
-
function
|
|
9214
|
+
function ia(e, t) {
|
|
9216
9215
|
t === void 0 && (t = !1);
|
|
9217
9216
|
let n = Z.createElement("value");
|
|
9218
9217
|
n.setAttribute("name", e);
|
|
@@ -9225,117 +9224,117 @@ function na(e, t) {
|
|
|
9225
9224
|
}
|
|
9226
9225
|
//#endregion
|
|
9227
9226
|
//#region src/core/category/app/comp/v1/index.ts
|
|
9228
|
-
function
|
|
9227
|
+
function aa() {
|
|
9229
9228
|
let { activeObject: e, activeComp: t } = S.app;
|
|
9230
9229
|
return !(e.type !== "comp" || !t.meta.states || t.meta.states.length <= 0);
|
|
9231
9230
|
}
|
|
9232
|
-
function
|
|
9231
|
+
function oa() {
|
|
9233
9232
|
let e = [];
|
|
9234
|
-
return e.push(Q(P("LABEL_EVENT"))), U("onEvent") && e.push($("on_app_event_v1")), U("triggerEvent") && e.push($("trigger_app_event_v1")), e.push($("app_bind_v1", [
|
|
9233
|
+
return e.push(Q(P("LABEL_EVENT"))), U("onEvent") && e.push($("on_app_event_v1")), U("triggerEvent") && e.push($("trigger_app_event_v1")), e.push($("app_bind_v1", [ta([{
|
|
9235
9234
|
key: "items",
|
|
9236
9235
|
value: "2"
|
|
9237
|
-
}])])), e.push($("watch_effect_v1")), (U("getProperty") || U("setProperty")) && e.push(Q(P("LABEL_PROPERTY"))), U("getProperty") && e.push($("get_app_property_v1")), U("setProperty") && e.push($("set_app_property_v1")),
|
|
9236
|
+
}])])), e.push($("watch_effect_v1")), (U("getProperty") || U("setProperty")) && e.push(Q(P("LABEL_PROPERTY"))), U("getProperty") && e.push($("get_app_property_v1")), U("setProperty") && e.push($("set_app_property_v1")), aa() && (e.push(Q(P("LABEL_STATE"))), e.push($("get_app_state_v1")), e.push($("set_app_state_v1"))), (U("callMethod") || U("implementMethod")) && e.push(Q(P("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;
|
|
9238
9237
|
}
|
|
9239
|
-
var
|
|
9238
|
+
var sa = {
|
|
9240
9239
|
name: "APP_COMP_CATEGORY",
|
|
9241
|
-
callback:
|
|
9240
|
+
callback: oa
|
|
9242
9241
|
};
|
|
9243
9242
|
//#endregion
|
|
9244
9243
|
//#region src/core/category/app/compute/v1/index.ts
|
|
9245
|
-
function
|
|
9244
|
+
function ca() {
|
|
9246
9245
|
let e = [];
|
|
9247
9246
|
return e.push(Q(P("LABEL_FUNC"))), e.push(Q(P("LABEL_FLOW"))), e;
|
|
9248
9247
|
}
|
|
9249
|
-
var
|
|
9248
|
+
var la = {
|
|
9250
9249
|
name: "APP_COMPUTE_CATEGORY",
|
|
9251
|
-
callback:
|
|
9250
|
+
callback: ca
|
|
9252
9251
|
};
|
|
9253
9252
|
//#endregion
|
|
9254
9253
|
//#region src/core/category/app/message/v1/index.ts
|
|
9255
|
-
function
|
|
9254
|
+
function ua() {
|
|
9256
9255
|
let e = [];
|
|
9257
|
-
return e.push($("app_debug_trace_v1", [
|
|
9256
|
+
return e.push($("app_debug_trace_v1", [na("OBJECT")])), e.push($("popup_message_v1", [na("TEXT")])), e.push($("open_confirm_dlg_v1")), e.push($("open_prompt_dlg_v1")), e;
|
|
9258
9257
|
}
|
|
9259
|
-
var
|
|
9258
|
+
var da = {
|
|
9260
9259
|
name: "APP_MESSAGE_CATEGORY",
|
|
9261
|
-
callback:
|
|
9260
|
+
callback: ua
|
|
9262
9261
|
};
|
|
9263
9262
|
//#endregion
|
|
9264
9263
|
//#region src/core/category/app/misc/v1/index.ts
|
|
9265
|
-
function
|
|
9264
|
+
function fa() {
|
|
9266
9265
|
for (let e of S.app.appList) if (e.pages.length > 0) return !0;
|
|
9267
9266
|
return !1;
|
|
9268
9267
|
}
|
|
9269
|
-
function
|
|
9268
|
+
function pa() {
|
|
9270
9269
|
let e = [];
|
|
9271
|
-
return e.push($("app_env_is_v1")),
|
|
9270
|
+
return e.push($("app_env_is_v1")), fa() && e.push($("navigate_to_v1")), e;
|
|
9272
9271
|
}
|
|
9273
|
-
var
|
|
9272
|
+
var ma = {
|
|
9274
9273
|
name: "APP_MISC_CATEGORY",
|
|
9275
|
-
callback:
|
|
9274
|
+
callback: pa
|
|
9276
9275
|
};
|
|
9277
9276
|
//#endregion
|
|
9278
9277
|
//#region src/core/category/app/page/v1/index.ts
|
|
9279
|
-
function
|
|
9278
|
+
function ha() {
|
|
9280
9279
|
let { activeObject: e, activePage: t } = S.app;
|
|
9281
9280
|
return !(e.type !== "page" || !t.meta.states || t.meta.states.length <= 0);
|
|
9282
9281
|
}
|
|
9283
|
-
function
|
|
9282
|
+
function ga() {
|
|
9284
9283
|
let { activeObject: e, activePage: t } = S.app;
|
|
9285
9284
|
return !(e.type !== "page" || !t.meta.arguments || t.meta.arguments.length <= 0);
|
|
9286
9285
|
}
|
|
9287
|
-
function
|
|
9286
|
+
function _a() {
|
|
9288
9287
|
let e = [];
|
|
9289
|
-
return e.push(Q(P("LABEL_EVENT"))), U("onEvent") && e.push($("on_app_event_v1")), e.push($("app_bind_v1", [
|
|
9288
|
+
return e.push(Q(P("LABEL_EVENT"))), U("onEvent") && e.push($("on_app_event_v1")), e.push($("app_bind_v1", [ta([{
|
|
9290
9289
|
key: "items",
|
|
9291
9290
|
value: "2"
|
|
9292
|
-
}])])), e.push($("watch_effect_v1")), (U("getProperty") || U("setProperty")) && e.push(Q(P("LABEL_PROPERTY"))), U("getProperty") && e.push($("get_app_property_v1")), U("setProperty") && e.push($("set_app_property_v1")),
|
|
9291
|
+
}])])), e.push($("watch_effect_v1")), (U("getProperty") || U("setProperty")) && e.push(Q(P("LABEL_PROPERTY"))), U("getProperty") && e.push($("get_app_property_v1")), U("setProperty") && e.push($("set_app_property_v1")), ha() && (e.push(Q(P("LABEL_STATE"))), e.push($("get_app_state_v1")), e.push($("set_app_state_v1"))), U("callMethod") && (e.push(Q(P("LABEL_METHOD"))), e.push($("call_app_method_v1"))), ga() && (e.push(Q(P("LABEL_ARGUMENT"))), e.push($("get_page_argument_v1"))), e;
|
|
9293
9292
|
}
|
|
9294
|
-
var
|
|
9293
|
+
var va = {
|
|
9295
9294
|
name: "APP_PAGE_CATEGORY",
|
|
9296
|
-
callback:
|
|
9295
|
+
callback: _a
|
|
9297
9296
|
};
|
|
9298
9297
|
//#endregion
|
|
9299
9298
|
//#region src/core/category/app/resource/v1/index.ts
|
|
9300
|
-
function
|
|
9299
|
+
function ya() {
|
|
9301
9300
|
let e = [];
|
|
9302
9301
|
return e.push(Q(P("LABEL_RESOURCE"))), e.push($("upload_resource_v1")), e;
|
|
9303
9302
|
}
|
|
9304
|
-
var
|
|
9303
|
+
var ba = {
|
|
9305
9304
|
name: "APP_RESOURCE_CATEGORY",
|
|
9306
|
-
callback:
|
|
9307
|
-
},
|
|
9308
|
-
function
|
|
9305
|
+
callback: ya
|
|
9306
|
+
}, xa = p.xml;
|
|
9307
|
+
function Sa() {
|
|
9309
9308
|
let e = [];
|
|
9310
9309
|
{
|
|
9311
|
-
let t =
|
|
9310
|
+
let t = xa.createElement("label");
|
|
9312
9311
|
t.setAttribute("text", "%{BKY_LABEL_PROCEDURE}"), e.push(t);
|
|
9313
9312
|
}
|
|
9314
9313
|
{
|
|
9315
|
-
let t =
|
|
9314
|
+
let t = xa.createElement("block");
|
|
9316
9315
|
t.setAttribute("type", "procedure_def_v1");
|
|
9317
9316
|
{
|
|
9318
|
-
let e =
|
|
9317
|
+
let e = xa.createElement("field");
|
|
9319
9318
|
e.setAttribute("name", "NAME");
|
|
9320
|
-
let n =
|
|
9319
|
+
let n = xa.createTextNode(P("PROCEDURE_DEFAULT_NAME"));
|
|
9321
9320
|
e.appendChild(n), t.appendChild(e);
|
|
9322
9321
|
}
|
|
9323
9322
|
e.push(t);
|
|
9324
9323
|
}
|
|
9325
9324
|
{
|
|
9326
|
-
let t =
|
|
9325
|
+
let t = xa.createElement("block");
|
|
9327
9326
|
t.setAttribute("type", "procedure_return_v1"), e.push(t);
|
|
9328
9327
|
}
|
|
9329
9328
|
return e;
|
|
9330
9329
|
}
|
|
9331
|
-
var
|
|
9330
|
+
var Ca = {
|
|
9332
9331
|
name: "PROCEDURE_CATEGORY",
|
|
9333
|
-
callback:
|
|
9334
|
-
},
|
|
9335
|
-
function
|
|
9332
|
+
callback: Sa
|
|
9333
|
+
}, wa = p.xml;
|
|
9334
|
+
function Ta() {
|
|
9336
9335
|
let e = s(), t = [];
|
|
9337
9336
|
{
|
|
9338
|
-
let e =
|
|
9337
|
+
let e = wa.createElement("label");
|
|
9339
9338
|
e.setAttribute("text", "%{BKY_LABEL_VARIABLE}"), t.push(e);
|
|
9340
9339
|
}
|
|
9341
9340
|
{
|
|
@@ -9348,75 +9347,75 @@ function Ca() {
|
|
|
9348
9347
|
if (n.length <= 0) return t;
|
|
9349
9348
|
n.sort(c.compareByName);
|
|
9350
9349
|
{
|
|
9351
|
-
let e =
|
|
9350
|
+
let e = wa.createElement("label");
|
|
9352
9351
|
e.setAttribute("text", P("LABEL_CREATED")), t.push(e);
|
|
9353
9352
|
}
|
|
9354
9353
|
return n.forEach((e) => {
|
|
9355
9354
|
{
|
|
9356
|
-
let n =
|
|
9355
|
+
let n = wa.createElement("block");
|
|
9357
9356
|
n.setAttribute("type", "variable_get_v1"), n.appendChild(c.generateVariableFieldDom(e)), t.push(n);
|
|
9358
9357
|
}
|
|
9359
9358
|
{
|
|
9360
|
-
let n =
|
|
9359
|
+
let n = wa.createElement("block");
|
|
9361
9360
|
n.setAttribute("type", "variable_set_v1"), n.appendChild(c.generateVariableFieldDom(e)), t.push(n);
|
|
9362
9361
|
}
|
|
9363
9362
|
}), t;
|
|
9364
9363
|
}
|
|
9365
|
-
var
|
|
9364
|
+
var Ea = {
|
|
9366
9365
|
name: "VARIABLE_CATEGORY",
|
|
9367
|
-
callback:
|
|
9366
|
+
callback: Ta
|
|
9368
9367
|
};
|
|
9369
9368
|
//#endregion
|
|
9370
9369
|
//#region src/core/category/compute/data/v1/index.ts
|
|
9371
|
-
function
|
|
9370
|
+
function Da() {
|
|
9372
9371
|
let e = [];
|
|
9373
|
-
if (Y().length > 0) e.push(Q(P("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", [
|
|
9372
|
+
if (Y().length > 0) e.push(Q(P("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", [na("VALUE")])), e.push(Q(P("LABEL_CONDITION"))), e.push($("cond_logic_v1")), e.push($("cond_atomic_v1", [na("VALUE")])), e.push(Q(P("LABEL_QUERY_EXTRA"))), e.push($("query_extra_limit_v1", [ra("OFFSET", 0), ra("LIMIT", 1)])), e.push($("query_extra_sortby_v1", [na("COLUMN"), ia("DESC")]));
|
|
9374
9373
|
else {
|
|
9375
9374
|
let t = document.createElement("button");
|
|
9376
9375
|
t.setAttribute("text", P("BUTTON_NO_TABLE")), t.setAttribute("callbackKey", "NO_TABLE"), e.push(t);
|
|
9377
9376
|
}
|
|
9378
9377
|
return e;
|
|
9379
9378
|
}
|
|
9380
|
-
var
|
|
9379
|
+
var Oa = {
|
|
9381
9380
|
name: "COMPUTE_DATA_CATEGORY",
|
|
9382
|
-
callback:
|
|
9381
|
+
callback: Da
|
|
9383
9382
|
};
|
|
9384
9383
|
//#endregion
|
|
9385
9384
|
//#region src/core/category/compute/flow/v1/index.ts
|
|
9386
|
-
function
|
|
9387
|
-
return
|
|
9385
|
+
function ka() {
|
|
9386
|
+
return Mr("flow").length > 0;
|
|
9388
9387
|
}
|
|
9389
|
-
function
|
|
9388
|
+
function Aa() {
|
|
9390
9389
|
let e = [];
|
|
9391
|
-
return S.compute.activeObject.type === "flow" && e.push($("on_flow_state_event_v1")),
|
|
9390
|
+
return S.compute.activeObject.type === "flow" && e.push($("on_flow_state_event_v1")), ka() && console.assert(!0), e;
|
|
9392
9391
|
}
|
|
9393
|
-
var
|
|
9392
|
+
var ja = {
|
|
9394
9393
|
name: "COMPUTE_FLOW_CATEGORY",
|
|
9395
|
-
callback:
|
|
9394
|
+
callback: Aa
|
|
9396
9395
|
};
|
|
9397
9396
|
//#endregion
|
|
9398
9397
|
//#region src/core/category/compute/func/v1/index.ts
|
|
9399
|
-
function
|
|
9400
|
-
return
|
|
9398
|
+
function Ma() {
|
|
9399
|
+
return Mr("func").length > 0;
|
|
9401
9400
|
}
|
|
9402
|
-
function
|
|
9401
|
+
function Na() {
|
|
9403
9402
|
let { activeObject: e, activeFunc: t } = S.compute, n = [];
|
|
9404
|
-
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"))),
|
|
9403
|
+
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"))), Ma() && n.push($("call_func_internal_v1")), n;
|
|
9405
9404
|
}
|
|
9406
|
-
var
|
|
9405
|
+
var Pa = {
|
|
9407
9406
|
name: "COMPUTE_FUNC_CATEGORY",
|
|
9408
|
-
callback:
|
|
9407
|
+
callback: Na
|
|
9409
9408
|
};
|
|
9410
9409
|
//#endregion
|
|
9411
9410
|
//#region src/core/category/compute/misc/v1/index.ts
|
|
9412
|
-
function
|
|
9411
|
+
function Fa() {
|
|
9413
9412
|
let e = [];
|
|
9414
|
-
return e.push($("compute_debug_trace_v1", [
|
|
9413
|
+
return e.push($("compute_debug_trace_v1", [na("OBJECT")])), e;
|
|
9415
9414
|
}
|
|
9416
|
-
var
|
|
9415
|
+
var Ia = {
|
|
9417
9416
|
name: "COMPUTE_MISC_CATEGORY",
|
|
9418
|
-
callback:
|
|
9419
|
-
},
|
|
9417
|
+
callback: Fa
|
|
9418
|
+
}, La = {
|
|
9420
9419
|
kind: "category",
|
|
9421
9420
|
name: "%{BKY_CATEGORY_COLOR}",
|
|
9422
9421
|
categorystyle: "color_category",
|
|
@@ -9466,7 +9465,7 @@ var Pa = {
|
|
|
9466
9465
|
}
|
|
9467
9466
|
}
|
|
9468
9467
|
]
|
|
9469
|
-
},
|
|
9468
|
+
}, Ra = {
|
|
9470
9469
|
kind: "category",
|
|
9471
9470
|
name: "%{BKY_CATEGORY_LIST}",
|
|
9472
9471
|
categorystyle: "list_category",
|
|
@@ -9547,7 +9546,7 @@ var Pa = {
|
|
|
9547
9546
|
type: "list_reverse_v1"
|
|
9548
9547
|
}
|
|
9549
9548
|
]
|
|
9550
|
-
},
|
|
9549
|
+
}, za = {
|
|
9551
9550
|
kind: "category",
|
|
9552
9551
|
name: "%{BKY_CATEGORY_LOGIC}",
|
|
9553
9552
|
categorystyle: "logic_category",
|
|
@@ -9589,7 +9588,7 @@ var Pa = {
|
|
|
9589
9588
|
type: "logic_ternary_v1"
|
|
9590
9589
|
}
|
|
9591
9590
|
]
|
|
9592
|
-
},
|
|
9591
|
+
}, Ba = {
|
|
9593
9592
|
kind: "category",
|
|
9594
9593
|
name: "%{BKY_CATEGORY_LOOP}",
|
|
9595
9594
|
categorystyle: "loop_category",
|
|
@@ -9633,7 +9632,7 @@ var Pa = {
|
|
|
9633
9632
|
type: "flow_control_v1"
|
|
9634
9633
|
}
|
|
9635
9634
|
]
|
|
9636
|
-
},
|
|
9635
|
+
}, Va = {
|
|
9637
9636
|
kind: "category",
|
|
9638
9637
|
name: "%{BKY_CATEGORY_MATH}",
|
|
9639
9638
|
categorystyle: "math_category",
|
|
@@ -9738,7 +9737,7 @@ var Pa = {
|
|
|
9738
9737
|
type: "math_on_list_v1"
|
|
9739
9738
|
}
|
|
9740
9739
|
]
|
|
9741
|
-
},
|
|
9740
|
+
}, Ha = {
|
|
9742
9741
|
kind: "category",
|
|
9743
9742
|
name: "%{BKY_CATEGORY_OBJECT}",
|
|
9744
9743
|
categorystyle: "object_category",
|
|
@@ -9788,7 +9787,7 @@ var Pa = {
|
|
|
9788
9787
|
} } }
|
|
9789
9788
|
}
|
|
9790
9789
|
]
|
|
9791
|
-
},
|
|
9790
|
+
}, Ua = {
|
|
9792
9791
|
kind: "category",
|
|
9793
9792
|
name: "%{BKY_CATEGORY_TEXT}",
|
|
9794
9793
|
categorystyle: "text_category",
|
|
@@ -9903,7 +9902,7 @@ var Pa = {
|
|
|
9903
9902
|
type: "text_reverse_v1"
|
|
9904
9903
|
}
|
|
9905
9904
|
]
|
|
9906
|
-
},
|
|
9905
|
+
}, Wa = {
|
|
9907
9906
|
kind: "category",
|
|
9908
9907
|
name: "%{BKY_CATEGORY_TIME}",
|
|
9909
9908
|
categorystyle: "time_category",
|
|
@@ -9918,155 +9917,155 @@ var Pa = {
|
|
|
9918
9917
|
fields: { NUM: 1e3 }
|
|
9919
9918
|
} } }
|
|
9920
9919
|
}]
|
|
9921
|
-
},
|
|
9920
|
+
}, Ga = {
|
|
9922
9921
|
kind: "categoryToolbox",
|
|
9923
9922
|
contents: [
|
|
9924
9923
|
{
|
|
9925
9924
|
kind: "category",
|
|
9926
9925
|
name: "%{BKY_CATEGORY_COMP}",
|
|
9927
9926
|
categorystyle: "misc_category",
|
|
9928
|
-
custom:
|
|
9927
|
+
custom: sa.name
|
|
9929
9928
|
},
|
|
9930
9929
|
{
|
|
9931
9930
|
kind: "category",
|
|
9932
9931
|
name: "%{BKY_CATEGORY_MESSAGE}",
|
|
9933
9932
|
categorystyle: "misc_category",
|
|
9934
|
-
custom:
|
|
9933
|
+
custom: da.name
|
|
9935
9934
|
},
|
|
9936
9935
|
{
|
|
9937
9936
|
kind: "category",
|
|
9938
9937
|
name: "%{BKY_CATEGORY_MISC}",
|
|
9939
9938
|
categorystyle: "misc_category",
|
|
9940
|
-
custom:
|
|
9939
|
+
custom: ma.name
|
|
9941
9940
|
},
|
|
9942
|
-
|
|
9943
|
-
La,
|
|
9941
|
+
Ba,
|
|
9944
9942
|
za,
|
|
9945
9943
|
Va,
|
|
9946
|
-
|
|
9947
|
-
|
|
9948
|
-
Fa,
|
|
9944
|
+
Ua,
|
|
9945
|
+
Ra,
|
|
9949
9946
|
Ha,
|
|
9947
|
+
La,
|
|
9948
|
+
Wa,
|
|
9950
9949
|
{
|
|
9951
9950
|
kind: "category",
|
|
9952
9951
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
9953
9952
|
categorystyle: "variable_category",
|
|
9954
|
-
custom:
|
|
9953
|
+
custom: Ea.name
|
|
9955
9954
|
},
|
|
9956
9955
|
{
|
|
9957
9956
|
kind: "category",
|
|
9958
9957
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
9959
9958
|
categorystyle: "procedure_category",
|
|
9960
|
-
custom:
|
|
9959
|
+
custom: Ca.name
|
|
9961
9960
|
},
|
|
9962
9961
|
{
|
|
9963
9962
|
kind: "category",
|
|
9964
9963
|
name: "%{BKY_CATEGORY_RESOURCE}",
|
|
9965
9964
|
categorystyle: "resource_category",
|
|
9966
|
-
custom:
|
|
9965
|
+
custom: ba.name
|
|
9967
9966
|
},
|
|
9968
9967
|
{
|
|
9969
9968
|
kind: "category",
|
|
9970
9969
|
name: "%{BKY_CATEGORY_COMPUTE}",
|
|
9971
9970
|
categorystyle: "compute_category",
|
|
9972
|
-
custom:
|
|
9971
|
+
custom: la.name
|
|
9973
9972
|
}
|
|
9974
9973
|
]
|
|
9975
|
-
},
|
|
9974
|
+
}, Ka = {
|
|
9976
9975
|
kind: "categoryToolbox",
|
|
9977
9976
|
contents: [
|
|
9978
9977
|
{
|
|
9979
9978
|
kind: "category",
|
|
9980
9979
|
name: "%{BKY_CATEGORY_FUNC}",
|
|
9981
9980
|
categorystyle: "func_category",
|
|
9982
|
-
custom:
|
|
9981
|
+
custom: Pa.name
|
|
9983
9982
|
},
|
|
9984
9983
|
{
|
|
9985
9984
|
kind: "category",
|
|
9986
9985
|
name: "%{BKY_CATEGORY_FLOW}",
|
|
9987
9986
|
categorystyle: "flow_category",
|
|
9988
|
-
custom:
|
|
9987
|
+
custom: ja.name
|
|
9989
9988
|
},
|
|
9990
9989
|
{
|
|
9991
9990
|
kind: "category",
|
|
9992
9991
|
name: "%{BKY_CATEGORY_DATA}",
|
|
9993
9992
|
categorystyle: "data_category",
|
|
9994
|
-
custom:
|
|
9993
|
+
custom: Oa.name
|
|
9995
9994
|
},
|
|
9996
9995
|
{
|
|
9997
9996
|
kind: "category",
|
|
9998
9997
|
name: "%{BKY_CATEGORY_MISC}",
|
|
9999
9998
|
categorystyle: "misc_category",
|
|
10000
|
-
custom:
|
|
9999
|
+
custom: Ia.name
|
|
10001
10000
|
},
|
|
10002
|
-
|
|
10003
|
-
La,
|
|
10001
|
+
Ba,
|
|
10004
10002
|
za,
|
|
10005
10003
|
Va,
|
|
10006
|
-
|
|
10007
|
-
|
|
10008
|
-
|
|
10004
|
+
Ua,
|
|
10005
|
+
Ra,
|
|
10006
|
+
Ha,
|
|
10007
|
+
La,
|
|
10009
10008
|
{
|
|
10010
10009
|
kind: "category",
|
|
10011
10010
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
10012
10011
|
categorystyle: "variable_category",
|
|
10013
|
-
custom:
|
|
10012
|
+
custom: Ea.name
|
|
10014
10013
|
},
|
|
10015
10014
|
{
|
|
10016
10015
|
kind: "category",
|
|
10017
10016
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
10018
10017
|
categorystyle: "procedure_category",
|
|
10019
|
-
custom:
|
|
10018
|
+
custom: Ca.name
|
|
10020
10019
|
}
|
|
10021
10020
|
]
|
|
10022
|
-
},
|
|
10021
|
+
}, qa = {
|
|
10023
10022
|
kind: "categoryToolbox",
|
|
10024
10023
|
contents: [
|
|
10025
10024
|
{
|
|
10026
10025
|
kind: "category",
|
|
10027
10026
|
name: "%{BKY_CATEGORY_FUNC}",
|
|
10028
10027
|
categorystyle: "func_category",
|
|
10029
|
-
custom:
|
|
10028
|
+
custom: Pa.name
|
|
10030
10029
|
},
|
|
10031
10030
|
{
|
|
10032
10031
|
kind: "category",
|
|
10033
10032
|
name: "%{BKY_CATEGORY_FLOW}",
|
|
10034
10033
|
categorystyle: "flow_category",
|
|
10035
|
-
custom:
|
|
10034
|
+
custom: ja.name
|
|
10036
10035
|
},
|
|
10037
10036
|
{
|
|
10038
10037
|
kind: "category",
|
|
10039
10038
|
name: "%{BKY_CATEGORY_DATA}",
|
|
10040
10039
|
categorystyle: "data_category",
|
|
10041
|
-
custom:
|
|
10040
|
+
custom: Oa.name
|
|
10042
10041
|
},
|
|
10043
10042
|
{
|
|
10044
10043
|
kind: "category",
|
|
10045
10044
|
name: "%{BKY_CATEGORY_MISC}",
|
|
10046
10045
|
categorystyle: "misc_category",
|
|
10047
|
-
custom:
|
|
10046
|
+
custom: Ia.name
|
|
10048
10047
|
},
|
|
10049
|
-
|
|
10050
|
-
La,
|
|
10048
|
+
Ba,
|
|
10051
10049
|
za,
|
|
10052
10050
|
Va,
|
|
10053
|
-
|
|
10054
|
-
|
|
10055
|
-
|
|
10051
|
+
Ua,
|
|
10052
|
+
Ra,
|
|
10053
|
+
Ha,
|
|
10054
|
+
La,
|
|
10056
10055
|
{
|
|
10057
10056
|
kind: "category",
|
|
10058
10057
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
10059
10058
|
categorystyle: "variable_category",
|
|
10060
|
-
custom:
|
|
10059
|
+
custom: Ea.name
|
|
10061
10060
|
},
|
|
10062
10061
|
{
|
|
10063
10062
|
kind: "category",
|
|
10064
10063
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
10065
10064
|
categorystyle: "procedure_category",
|
|
10066
|
-
custom:
|
|
10065
|
+
custom: Ca.name
|
|
10067
10066
|
}
|
|
10068
10067
|
]
|
|
10069
|
-
},
|
|
10068
|
+
}, Ja = {
|
|
10070
10069
|
kind: "categoryToolbox",
|
|
10071
10070
|
contents: [{
|
|
10072
10071
|
kind: "category",
|
|
@@ -10095,61 +10094,61 @@ var Pa = {
|
|
|
10095
10094
|
}
|
|
10096
10095
|
]
|
|
10097
10096
|
}]
|
|
10098
|
-
},
|
|
10097
|
+
}, Ya = {
|
|
10099
10098
|
kind: "categoryToolbox",
|
|
10100
10099
|
contents: [
|
|
10101
10100
|
{
|
|
10102
10101
|
kind: "category",
|
|
10103
10102
|
name: "%{BKY_CATEGORY_PAGE}",
|
|
10104
10103
|
categorystyle: "misc_category",
|
|
10105
|
-
custom:
|
|
10104
|
+
custom: va.name
|
|
10106
10105
|
},
|
|
10107
10106
|
{
|
|
10108
10107
|
kind: "category",
|
|
10109
10108
|
name: "%{BKY_CATEGORY_MESSAGE}",
|
|
10110
10109
|
categorystyle: "misc_category",
|
|
10111
|
-
custom:
|
|
10110
|
+
custom: da.name
|
|
10112
10111
|
},
|
|
10113
10112
|
{
|
|
10114
10113
|
kind: "category",
|
|
10115
10114
|
name: "%{BKY_CATEGORY_MISC}",
|
|
10116
10115
|
categorystyle: "misc_category",
|
|
10117
|
-
custom:
|
|
10116
|
+
custom: ma.name
|
|
10118
10117
|
},
|
|
10119
|
-
|
|
10120
|
-
La,
|
|
10118
|
+
Ba,
|
|
10121
10119
|
za,
|
|
10122
10120
|
Va,
|
|
10123
|
-
|
|
10124
|
-
|
|
10125
|
-
Fa,
|
|
10121
|
+
Ua,
|
|
10122
|
+
Ra,
|
|
10126
10123
|
Ha,
|
|
10124
|
+
La,
|
|
10125
|
+
Wa,
|
|
10127
10126
|
{
|
|
10128
10127
|
kind: "category",
|
|
10129
10128
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
10130
10129
|
categorystyle: "variable_category",
|
|
10131
|
-
custom:
|
|
10130
|
+
custom: Ea.name
|
|
10132
10131
|
},
|
|
10133
10132
|
{
|
|
10134
10133
|
kind: "category",
|
|
10135
10134
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
10136
10135
|
categorystyle: "procedure_category",
|
|
10137
|
-
custom:
|
|
10136
|
+
custom: Ca.name
|
|
10138
10137
|
},
|
|
10139
10138
|
{
|
|
10140
10139
|
kind: "category",
|
|
10141
10140
|
name: "%{BKY_CATEGORY_RESOURCE}",
|
|
10142
10141
|
categorystyle: "resource_category",
|
|
10143
|
-
custom:
|
|
10142
|
+
custom: ba.name
|
|
10144
10143
|
},
|
|
10145
10144
|
{
|
|
10146
10145
|
kind: "category",
|
|
10147
10146
|
name: "%{BKY_CATEGORY_COMPUTE}",
|
|
10148
10147
|
categorystyle: "compute_category",
|
|
10149
|
-
custom:
|
|
10148
|
+
custom: la.name
|
|
10150
10149
|
}
|
|
10151
10150
|
]
|
|
10152
|
-
},
|
|
10151
|
+
}, Xa = {
|
|
10153
10152
|
grid: {
|
|
10154
10153
|
length: 2,
|
|
10155
10154
|
snap: !0,
|
|
@@ -10173,11 +10172,11 @@ var Pa = {
|
|
|
10173
10172
|
wheel: !0
|
|
10174
10173
|
}
|
|
10175
10174
|
};
|
|
10176
|
-
function
|
|
10177
|
-
|
|
10178
|
-
let i = o(e,
|
|
10175
|
+
function Za(e, t, n, r) {
|
|
10176
|
+
Xa.theme = r ? "dark" : "light", Xa.toolbox = Qa(t, n);
|
|
10177
|
+
let i = o(e, Xa);
|
|
10179
10178
|
return i.addChangeListener((e) => {
|
|
10180
|
-
if (e.type ===
|
|
10179
|
+
if (e.type === Di.STATE_CHANGE) {
|
|
10181
10180
|
let e = i.getAllBlocks();
|
|
10182
10181
|
for (let t of e) {
|
|
10183
10182
|
let e = t;
|
|
@@ -10185,22 +10184,22 @@ function Ya(e, t, n, r) {
|
|
|
10185
10184
|
}
|
|
10186
10185
|
}
|
|
10187
10186
|
setTimeout(() => {
|
|
10188
|
-
(0,
|
|
10187
|
+
(0, ea.shadowBlockConversionChangeListener)(e);
|
|
10189
10188
|
}, 0);
|
|
10190
|
-
}),
|
|
10189
|
+
}), $a(i, t, n), eo(i), i;
|
|
10191
10190
|
}
|
|
10192
|
-
function
|
|
10191
|
+
function Qa(e, t) {
|
|
10193
10192
|
let n;
|
|
10194
|
-
return e === "page" ? t === "v1" && (n =
|
|
10193
|
+
return e === "page" ? t === "v1" && (n = Ya) : e === "comp" ? t === "v1" && (n = Ga) : e === "func" ? t === "v1" && (n = qa) : e === "flow" ? t === "v1" && (n = Ka) : e === "json" && t === "v1" && (n = Ja), console.assert(!!n, `invalid toolbox type=${e} version=${t}`), n;
|
|
10195
10194
|
}
|
|
10196
|
-
function
|
|
10195
|
+
function $a(e, t, n) {
|
|
10197
10196
|
function r({ name: n, callback: r }) {
|
|
10198
10197
|
e.registerToolboxCategoryCallback(n, () => r(t));
|
|
10199
10198
|
}
|
|
10200
|
-
t === "page" ? n === "v1" && (r(
|
|
10199
|
+
t === "page" ? n === "v1" && (r(va), r(da), r(ma), r(Ea), r(Ca), r(ba), r(la)) : t === "comp" ? n === "v1" && (r(sa), r(da), r(ma), r(Ea), r(Ca), r(ba), r(la)) : t === "func" ? n === "v1" && (r(Pa), r(ja), r(Oa), r(Ia), r(Ea), r(Ca)) : t === "flow" && n === "v1" && (r(Pa), r(ja), r(Oa), r(Ia), r(Ea), r(Ca));
|
|
10201
10200
|
}
|
|
10202
|
-
function
|
|
10203
|
-
let { router: t } =
|
|
10201
|
+
function eo(e) {
|
|
10202
|
+
let { router: t } = ct;
|
|
10204
10203
|
e.registerButtonCallback("NO_COMPUTE", () => {
|
|
10205
10204
|
let e = t.resolve({ path: "/compute/" + Date.now() });
|
|
10206
10205
|
setTimeout(() => {
|
|
@@ -10215,7 +10214,7 @@ function Qa(e) {
|
|
|
10215
10214
|
}
|
|
10216
10215
|
//#endregion
|
|
10217
10216
|
//#region src/components/blockly/jsonHelper.ts
|
|
10218
|
-
function
|
|
10217
|
+
function to(e, t) {
|
|
10219
10218
|
let n = t.newBlock("json_root_v1");
|
|
10220
10219
|
n.initSvg(), n.render();
|
|
10221
10220
|
let r = (e, n) => {
|
|
@@ -10246,7 +10245,7 @@ function $a(e, t) {
|
|
|
10246
10245
|
};
|
|
10247
10246
|
r(e, n.getInput("JSON").connection), x.fire(new (x.get(x.FINISHED_LOADING))(t));
|
|
10248
10247
|
}
|
|
10249
|
-
function
|
|
10248
|
+
function no(e) {
|
|
10250
10249
|
let t = (e) => {
|
|
10251
10250
|
if (!e) return null;
|
|
10252
10251
|
if (e.type === "json_root_v1") return t(e.getInputTargetBlock("JSON"));
|
|
@@ -10270,9 +10269,9 @@ function eo(e) {
|
|
|
10270
10269
|
}
|
|
10271
10270
|
//#endregion
|
|
10272
10271
|
//#region src/components/blockly/index.vue?vue&type=script&setup=true&lang.ts
|
|
10273
|
-
var
|
|
10272
|
+
var ro = { class: "position-relative w-100 h-100" }, io = /* @__PURE__ */ vt({
|
|
10274
10273
|
__name: "index",
|
|
10275
|
-
props: /* @__PURE__ */
|
|
10274
|
+
props: /* @__PURE__ */ xt({
|
|
10276
10275
|
type: {},
|
|
10277
10276
|
version: {},
|
|
10278
10277
|
locale: {},
|
|
@@ -10286,11 +10285,11 @@ var to = { class: "position-relative w-100 h-100" }, no = /* @__PURE__ */ gt({
|
|
|
10286
10285
|
scale: { required: !0 },
|
|
10287
10286
|
scaleModifiers: {}
|
|
10288
10287
|
}),
|
|
10289
|
-
emits: /* @__PURE__ */
|
|
10288
|
+
emits: /* @__PURE__ */ xt(["ready"], ["update:lock", "update:scale"]),
|
|
10290
10289
|
setup(e, { expose: t, emit: n }) {
|
|
10291
|
-
let { backgroundColor2: r } =
|
|
10292
|
-
|
|
10293
|
-
let f =
|
|
10290
|
+
let { backgroundColor2: r } = ft(), i = Pt(e, "lock"), a = Pt(e, "scale"), o = n, s = `blocklyEditor${Nt()}`, c = Ot(), u = Ft("parentContainer"), ee = Ft("clean"), te = Ft("navigator"), d = {};
|
|
10291
|
+
Vi(d);
|
|
10292
|
+
let f = Ot(!0), ne = Ot(!1), p = E(() => e.type === "json" ? "tree" : "list"), re = E(() => ({
|
|
10294
10293
|
width: "100%",
|
|
10295
10294
|
height: "calc(100% - 48px)"
|
|
10296
10295
|
})), m = E(() => ({
|
|
@@ -10333,27 +10332,27 @@ var to = { class: "position-relative w-100 h-100" }, no = /* @__PURE__ */ gt({
|
|
|
10333
10332
|
top: 0,
|
|
10334
10333
|
left: 0,
|
|
10335
10334
|
zIndex: 3e3
|
|
10336
|
-
})), { open: ue } =
|
|
10337
|
-
|
|
10335
|
+
})), { open: ue } = mt(`blocklyEditorFlyout${Nt()}`);
|
|
10336
|
+
Tt(async () => {
|
|
10338
10337
|
if (!c.value || !u.value) {
|
|
10339
10338
|
console.assert(!1);
|
|
10340
10339
|
return;
|
|
10341
10340
|
}
|
|
10342
|
-
se(u.value), await
|
|
10341
|
+
se(u.value), await Wt(e.locale), d.workspace = Za(c.value, e.type, e.version, e.dark), d.workspace.addChangeListener(x.disableOrphans), d.workspace.addChangeListener(de);
|
|
10343
10342
|
let t = document.querySelector(`#${s} .blocklyFlyout`);
|
|
10344
10343
|
new MutationObserver((e) => {
|
|
10345
10344
|
e.forEach((e) => {
|
|
10346
10345
|
e.type === "attributes" && e.attributeName === "style" && (ue.value = d.workspace.getFlyout().isVisible());
|
|
10347
10346
|
});
|
|
10348
|
-
}).observe(t, { attributes: !0 }), ue.value = d.workspace.getFlyout().isVisible(), he(), ge(), await
|
|
10349
|
-
}),
|
|
10347
|
+
}).observe(t, { attributes: !0 }), ue.value = d.workspace.getFlyout().isVisible(), he(), ge(), await Ct(), o("ready");
|
|
10348
|
+
}), wt(() => {
|
|
10350
10349
|
ue.value = !1;
|
|
10351
10350
|
}), Se(c, () => {
|
|
10352
10351
|
d.workspace && le(d.workspace);
|
|
10353
10352
|
});
|
|
10354
10353
|
async function de(e) {
|
|
10355
10354
|
if (e.type === x.FINISHED_LOADING) {
|
|
10356
|
-
|
|
10355
|
+
Ai(), setTimeout(() => {
|
|
10357
10356
|
te.value?.update();
|
|
10358
10357
|
}, 0), f.value = !1;
|
|
10359
10358
|
return;
|
|
@@ -10369,16 +10368,16 @@ var to = { class: "position-relative w-100 h-100" }, no = /* @__PURE__ */ gt({
|
|
|
10369
10368
|
}
|
|
10370
10369
|
}
|
|
10371
10370
|
let fe = (t) => {
|
|
10372
|
-
f.value = !0, e.type === "json" ?
|
|
10373
|
-
}, pe = () => e.type === "json" ?
|
|
10371
|
+
f.value = !0, e.type === "json" ? to(t, d.workspace) : l.workspaces.load(t, d.workspace);
|
|
10372
|
+
}, pe = () => e.type === "json" ? no(d.workspace) : l.workspaces.save(d.workspace), me = () => {
|
|
10374
10373
|
if (e.type === "json") console.assert(!1);
|
|
10375
10374
|
else return g.workspaceToCode(d.workspace);
|
|
10376
|
-
}, _ = () =>
|
|
10375
|
+
}, _ = () => zi(d.workspace), he = () => {
|
|
10377
10376
|
d.workspace.setIsReadOnly(i.value), d.workspace.isReadOnly() && (ue.value = !1);
|
|
10378
10377
|
}, ge = () => {
|
|
10379
10378
|
d.workspace.setScale(a.value);
|
|
10380
10379
|
}, _e = () => {
|
|
10381
|
-
x.fire(new (x.get(
|
|
10380
|
+
x.fire(new (x.get(Di.STATE_CHANGE))(d.workspace));
|
|
10382
10381
|
}, ve = () => {
|
|
10383
10382
|
ee.value?.cleanWorkspace();
|
|
10384
10383
|
}, ye = () => {
|
|
@@ -10386,19 +10385,19 @@ var to = { class: "position-relative w-100 h-100" }, no = /* @__PURE__ */ gt({
|
|
|
10386
10385
|
}, be = () => {
|
|
10387
10386
|
te.value && (te.value.open = !0);
|
|
10388
10387
|
};
|
|
10389
|
-
return
|
|
10390
|
-
|
|
10391
|
-
}),
|
|
10392
|
-
|
|
10393
|
-
}),
|
|
10394
|
-
|
|
10395
|
-
}),
|
|
10396
|
-
|
|
10397
|
-
}),
|
|
10388
|
+
return Tt(() => {
|
|
10389
|
+
st.on("cleanWorkspace", ve), st.on("toggleBlocklyLock", ye), st.on("openBlocklyNavigator", be);
|
|
10390
|
+
}), wt(() => {
|
|
10391
|
+
st.off("cleanWorkspace", ve), st.off("toggleBlocklyLock", ye), st.off("openBlocklyNavigator", be);
|
|
10392
|
+
}), It(() => e.locale, (e) => {
|
|
10393
|
+
Wt(e);
|
|
10394
|
+
}), It(() => e.dark, (e) => {
|
|
10395
|
+
Ni(e ? "dark" : "light");
|
|
10396
|
+
}), It(ue, (e) => {
|
|
10398
10397
|
e || d.workspace?.hideChaff();
|
|
10399
|
-
}),
|
|
10398
|
+
}), It(i, () => {
|
|
10400
10399
|
he();
|
|
10401
|
-
}),
|
|
10400
|
+
}), It(a, () => {
|
|
10402
10401
|
ge();
|
|
10403
10402
|
}), t({
|
|
10404
10403
|
loading: f,
|
|
@@ -10409,14 +10408,14 @@ var to = { class: "position-relative w-100 h-100" }, no = /* @__PURE__ */ gt({
|
|
|
10409
10408
|
fireStateChange: _e
|
|
10410
10409
|
}), (e, t) => {
|
|
10411
10410
|
let n = M("v-icon"), r = M("x-loading");
|
|
10412
|
-
return j(), D("div",
|
|
10411
|
+
return j(), D("div", ro, [
|
|
10413
10412
|
O("div", {
|
|
10414
10413
|
id: s,
|
|
10415
10414
|
ref_key: "blocklyDiv",
|
|
10416
10415
|
ref: c,
|
|
10417
10416
|
style: A(re.value)
|
|
10418
10417
|
}, null, 4),
|
|
10419
|
-
O("div", { style: A(m.value) }, [
|
|
10418
|
+
O("div", { style: A(m.value) }, [At(e.$slots, "bottom")], 4),
|
|
10420
10419
|
ne.value ? (j(), D("div", {
|
|
10421
10420
|
key: 0,
|
|
10422
10421
|
class: "d-flex flex-column justify-center align-center",
|
|
@@ -10424,22 +10423,22 @@ var to = { class: "position-relative w-100 h-100" }, no = /* @__PURE__ */ gt({
|
|
|
10424
10423
|
}, [k(n, {
|
|
10425
10424
|
icon: "mdi-delete",
|
|
10426
10425
|
size: "x-large"
|
|
10427
|
-
})], 4)) :
|
|
10428
|
-
f.value ?
|
|
10426
|
+
})], 4)) : _t("", !0),
|
|
10427
|
+
f.value ? _t("", !0) : (j(), D("div", {
|
|
10429
10428
|
key: 1,
|
|
10430
10429
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
10431
10430
|
style: A(ie.value)
|
|
10432
10431
|
}, [
|
|
10433
|
-
k(
|
|
10432
|
+
k(Ui, {
|
|
10434
10433
|
ref_key: "clean",
|
|
10435
10434
|
ref: ee,
|
|
10436
10435
|
lock: i.value
|
|
10437
10436
|
}, null, 8, ["lock"]),
|
|
10438
|
-
k(
|
|
10437
|
+
k(Wi, {
|
|
10439
10438
|
modelValue: i.value,
|
|
10440
10439
|
"onUpdate:modelValue": t[0] ||= (e) => i.value = e
|
|
10441
10440
|
}, null, 8, ["modelValue"]),
|
|
10442
|
-
k(
|
|
10441
|
+
k($i, {
|
|
10443
10442
|
ref_key: "navigator",
|
|
10444
10443
|
ref: te,
|
|
10445
10444
|
lock: i.value,
|
|
@@ -10449,11 +10448,11 @@ var to = { class: "position-relative w-100 h-100" }, no = /* @__PURE__ */ gt({
|
|
|
10449
10448
|
i.value ? (j(), D("div", {
|
|
10450
10449
|
key: 2,
|
|
10451
10450
|
style: A(oe.value)
|
|
10452
|
-
}, null, 4)) :
|
|
10451
|
+
}, null, 4)) : _t("", !0),
|
|
10453
10452
|
i.value ? (j(), D("div", {
|
|
10454
10453
|
key: 3,
|
|
10455
10454
|
style: A(ae.value)
|
|
10456
|
-
}, null, 4)) :
|
|
10455
|
+
}, null, 4)) : _t("", !0),
|
|
10457
10456
|
O("div", {
|
|
10458
10457
|
ref_key: "parentContainer",
|
|
10459
10458
|
ref: u,
|
|
@@ -10466,21 +10465,21 @@ var to = { class: "position-relative w-100 h-100" }, no = /* @__PURE__ */ gt({
|
|
|
10466
10465
|
]);
|
|
10467
10466
|
};
|
|
10468
10467
|
}
|
|
10469
|
-
}),
|
|
10468
|
+
}), ao = /* @__PURE__ */ vt({
|
|
10470
10469
|
__name: "index",
|
|
10471
10470
|
props: { code: {} },
|
|
10472
10471
|
setup(e) {
|
|
10473
10472
|
let t = e;
|
|
10474
10473
|
we.registerLanguage("javascript", xe);
|
|
10475
|
-
let n = Ee.component, { backgroundColor2: r } =
|
|
10474
|
+
let n = Ee.component, { backgroundColor2: r } = ft();
|
|
10476
10475
|
return (e, i) => {
|
|
10477
10476
|
let a = M("v-sheet");
|
|
10478
|
-
return j(),
|
|
10477
|
+
return j(), gt(a, {
|
|
10479
10478
|
color: N(r),
|
|
10480
10479
|
height: "100%",
|
|
10481
10480
|
width: "100%"
|
|
10482
10481
|
}, {
|
|
10483
|
-
default:
|
|
10482
|
+
default: Lt(() => [k(N(n), {
|
|
10484
10483
|
code: t.code,
|
|
10485
10484
|
language: "js"
|
|
10486
10485
|
}, null, 8, ["code"])]),
|
|
@@ -10488,58 +10487,58 @@ var to = { class: "position-relative w-100 h-100" }, no = /* @__PURE__ */ gt({
|
|
|
10488
10487
|
}, 8, ["color"]);
|
|
10489
10488
|
};
|
|
10490
10489
|
}
|
|
10491
|
-
}),
|
|
10490
|
+
}), oo = { class: "text-body-large" }, so = { class: "w-100 h-100 overflow-auto" }, co = /* @__PURE__ */ vt({
|
|
10492
10491
|
__name: "index",
|
|
10493
10492
|
setup(e) {
|
|
10494
|
-
let { t } =
|
|
10493
|
+
let { t } = Ht(), { sysBarAvail: n } = pt(), { backgroundColor0: r, backgroundColor2: i } = ft(), a = Ot(""), o = E(() => {
|
|
10495
10494
|
let e = 48;
|
|
10496
10495
|
return n.value && (e += 24), {
|
|
10497
10496
|
position: "relative",
|
|
10498
10497
|
height: `calc(100% - ${e}px)`
|
|
10499
10498
|
};
|
|
10500
|
-
}), { open: s } =
|
|
10499
|
+
}), { open: s } = mt("sourceDlg", (e) => {
|
|
10501
10500
|
a.value = e.code;
|
|
10502
10501
|
});
|
|
10503
10502
|
return (e, c) => {
|
|
10504
10503
|
let l = M("v-sheet"), u = M("v-btn"), ee = M("v-spacer"), te = M("v-dialog");
|
|
10505
|
-
return j(),
|
|
10504
|
+
return j(), gt(te, {
|
|
10506
10505
|
modelValue: N(s),
|
|
10507
|
-
"onUpdate:modelValue": c[1] ||= (e) =>
|
|
10506
|
+
"onUpdate:modelValue": c[1] ||= (e) => bt(s) ? s.value = e : null,
|
|
10508
10507
|
fullscreen: "",
|
|
10509
10508
|
"no-click-animation": "",
|
|
10510
10509
|
persistent: "",
|
|
10511
10510
|
transition: "dialog-bottom-transition",
|
|
10512
|
-
onKeydown: c[2] ||=
|
|
10511
|
+
onKeydown: c[2] ||= zt(Bt((e) => s.value = !1, ["stop", "prevent"]), ["esc"])
|
|
10513
10512
|
}, {
|
|
10514
|
-
default:
|
|
10513
|
+
default: Lt(() => [k(l, {
|
|
10515
10514
|
color: N(r),
|
|
10516
10515
|
height: "100%",
|
|
10517
10516
|
width: "100%"
|
|
10518
10517
|
}, {
|
|
10519
|
-
default:
|
|
10520
|
-
N(n) ? (j(),
|
|
10518
|
+
default: Lt(() => [
|
|
10519
|
+
N(n) ? (j(), gt(l, {
|
|
10521
10520
|
key: 0,
|
|
10522
10521
|
color: N(i),
|
|
10523
10522
|
height: 24
|
|
10524
|
-
}, null, 8, ["color"])) :
|
|
10523
|
+
}, null, 8, ["color"])) : _t("", !0),
|
|
10525
10524
|
k(l, {
|
|
10526
10525
|
class: "d-flex align-center px-2",
|
|
10527
10526
|
color: N(i),
|
|
10528
10527
|
height: 48
|
|
10529
10528
|
}, {
|
|
10530
|
-
default:
|
|
10529
|
+
default: Lt(() => [
|
|
10531
10530
|
k(u, {
|
|
10532
10531
|
density: "comfortable",
|
|
10533
10532
|
icon: "mdi-close",
|
|
10534
10533
|
variant: "text",
|
|
10535
10534
|
onClick: c[0] ||= (e) => s.value = !1
|
|
10536
10535
|
}),
|
|
10537
|
-
O("span",
|
|
10536
|
+
O("span", oo, Mt(N(t)("x-block-lib.dlg.source.title")), 1),
|
|
10538
10537
|
k(ee)
|
|
10539
10538
|
]),
|
|
10540
10539
|
_: 1
|
|
10541
10540
|
}, 8, ["color"]),
|
|
10542
|
-
O("div", { style: A(o.value) }, [O("div",
|
|
10541
|
+
O("div", { style: A(o.value) }, [O("div", so, [k(ao, { code: a.value }, null, 8, ["code"])])], 4)
|
|
10543
10542
|
]),
|
|
10544
10543
|
_: 1
|
|
10545
10544
|
}, 8, ["color"])]),
|
|
@@ -10547,19 +10546,19 @@ var to = { class: "position-relative w-100 h-100" }, no = /* @__PURE__ */ gt({
|
|
|
10547
10546
|
}, 8, ["modelValue"]);
|
|
10548
10547
|
};
|
|
10549
10548
|
}
|
|
10550
|
-
}),
|
|
10551
|
-
e.component("XBlockly",
|
|
10549
|
+
}), lo = (e) => {
|
|
10550
|
+
e.component("XBlockly", io), e.component("XSourceDlg", co);
|
|
10552
10551
|
};
|
|
10553
10552
|
//#endregion
|
|
10554
10553
|
//#region src/i18n/index.ts
|
|
10555
|
-
async function
|
|
10556
|
-
return (await
|
|
10554
|
+
async function uo(e) {
|
|
10555
|
+
return (await Ut(/* @__PURE__ */ Object.assign({
|
|
10557
10556
|
"./locales/en/index.ts": () => import("./i18n-en.nyqc9jvc.js").then((e) => e.t),
|
|
10558
10557
|
"./locales/zhHans/index.ts": () => import("./i18n-zhHans.hgqwzee0.js").then((e) => e.t)
|
|
10559
10558
|
}), `./locales/${e}/index.ts`, 4)).default;
|
|
10560
10559
|
}
|
|
10561
10560
|
//#endregion
|
|
10562
10561
|
//#region src/index.ts
|
|
10563
|
-
var
|
|
10562
|
+
var fo = { install: lo };
|
|
10564
10563
|
//#endregion
|
|
10565
|
-
export {
|
|
10564
|
+
export { io as XBlockly, fo as default, lo as install, uo as loadLocaleMessageBlock };
|