x-block-lib 0.8.10 → 0.8.12
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/components/blockly/buildReactivity.d.ts +3 -0
- package/dist/components/blockly/index.vue.d.ts +1 -1
- package/dist/{i18n-en.owbcs4f2.js → i18n-en.h3b844ct.js} +3 -1
- package/dist/{i18n-zhHans.j5qa8fnp.js → i18n-zhHans.mk5971y3.js} +3 -1
- package/dist/index.js +927 -910
- package/package.json +2 -2
- package/dist/components/blockly/buildReactive.d.ts +0 -28
package/dist/index.js
CHANGED
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
Website: https://highlightjs.org/
|
|
7
7
|
License: see project LICENSE
|
|
8
8
|
Touched: 2021
|
|
9
|
-
*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#f3f3f3;color:#444}.hljs-comment{color:#697070}.hljs-punctuation,.hljs-tag{color:#444a}.hljs-tag .hljs-attr,.hljs-tag .hljs-name{color:#444}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#ab5656}.hljs-literal{color:#695}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta .hljs-string{color:#38a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.ghost[data-v-
|
|
10
|
-
import { provide as
|
|
11
|
-
import { f as
|
|
12
|
-
import { globalObjects as nt, openConfirmDlg as
|
|
13
|
-
import { elements as J, pkgs as
|
|
9
|
+
*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#f3f3f3;color:#444}.hljs-comment{color:#697070}.hljs-punctuation,.hljs-tag{color:#444a}.hljs-tag .hljs-attr,.hljs-tag .hljs-name{color:#444}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#ab5656}.hljs-literal{color:#695}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta .hljs-string{color:#38a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.ghost[data-v-4cd8352a]{opacity:.4;pointer-events:none}.blocklyToolbox{overflow-x:hidden;width:56px}.blocklyMainBackground{stroke-width:0}.blocklyToolboxCategory{margin-bottom:12px!important}.blocklyToolboxCategoryIcon{display:none!important}.blocklyTreeRowContentContainer{height:28px;display:flex;align-items:center;justify-items:center;overflow:hidden}.blocklyFlyout{z-index:21}`)),document.head.appendChild(l)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
10
|
+
import { provide as lo, inject as _o, defineComponent as st, resolveComponent as D, createBlock as Z, openBlock as B, unref as R, withCtx as tt, createVNode as L, mergeProps as $e, useModel as Rt, ref as It, computed as Y, resolveDirective as po, withDirectives as ho, createElementBlock as Q, normalizeStyle as H, createElementVNode as W, toDisplayString as ce, withModifiers as Bt, mergeModels as be, Fragment as En, renderList as fo, useId as Pe, onUnmounted as mo, useTemplateRef as bt, withKeys as gn, isRef as $t, createCommentVNode as mt, onMounted as nn, nextTick as To, onBeforeUnmount as on, watch as Lt, renderSlot as Eo } from "vue";
|
|
11
|
+
import { f as go, F as An, E as O, r as sn, M as In, s as Ao, a as Io, X as On, u as C, B as d, j as s, O as c, b as Re, i as v, c as ht, d as Oo, e as M, g as h, h as vo, k as w, l as lt, p as Pt, m as z, n as an, o as S, C as vn, N as et, q as Co, P as De, t as ve, V as At, v as Ut, w as Cn, x as yo, y as ko, S as No, z as Lo, A as So, T as re, D as yn, G as Bo, H as bo, I as kn, J as Po, K as Ro, L as Do, Q as Mo, R as Uo, U as Vo, W as xo, Y as Fo } from "./vendor.cenq5uur.js";
|
|
12
|
+
import { globalObjects as nt, openConfirmDlg as Yo, openPromptDlg as wo, messageWarning as Nn, useColor as Vt, useSystem as Ln, useViewStack as He, eventBus as gt } from "x-essential-lib";
|
|
13
|
+
import { elements as J, pkgs as Gt, parsePixelStr as Ko, parsePercentStr as $o, getPropTag as kt, makeTriggerId as Tt } from "x-runtime-lib";
|
|
14
14
|
import { globalState as f } from "x-state-lib";
|
|
15
|
-
import { useI18n as
|
|
16
|
-
import { useDisplay as
|
|
17
|
-
function
|
|
15
|
+
import { useI18n as xt } from "vue-i18n";
|
|
16
|
+
import { useDisplay as Ho } from "vuetify";
|
|
17
|
+
function ue(t, e) {
|
|
18
18
|
const { i18n: n } = nt;
|
|
19
19
|
let o = "";
|
|
20
20
|
if (e === "regular")
|
|
@@ -32,7 +32,7 @@ function le(t, e) {
|
|
|
32
32
|
console.assert(!1);
|
|
33
33
|
return o;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function Ge(t, e) {
|
|
36
36
|
const { i18n: n } = nt;
|
|
37
37
|
let o = "";
|
|
38
38
|
if (e === "regular")
|
|
@@ -50,7 +50,7 @@ function We(t, e) {
|
|
|
50
50
|
console.assert(!1);
|
|
51
51
|
return o;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function Sn(t, e) {
|
|
54
54
|
const { i18n: n } = nt;
|
|
55
55
|
let o = "";
|
|
56
56
|
if (e === "regular")
|
|
@@ -68,7 +68,7 @@ function Bn(t, e) {
|
|
|
68
68
|
console.assert(!1);
|
|
69
69
|
return o;
|
|
70
70
|
}
|
|
71
|
-
class I extends
|
|
71
|
+
class I extends An {
|
|
72
72
|
constructor(e, n, o) {
|
|
73
73
|
super(e, n, o);
|
|
74
74
|
}
|
|
@@ -98,13 +98,13 @@ class I extends In {
|
|
|
98
98
|
}
|
|
99
99
|
} else if (this.name === "PROP") {
|
|
100
100
|
const { names: o, from: i } = n.prop;
|
|
101
|
-
return
|
|
101
|
+
return Sn(o, i);
|
|
102
102
|
} else if (this.name === "EVENT") {
|
|
103
103
|
const { names: o, from: i } = n.event;
|
|
104
|
-
return
|
|
104
|
+
return ue(o, i);
|
|
105
105
|
} else if (this.name === "METHOD") {
|
|
106
106
|
const { names: o, from: i } = n.prop;
|
|
107
|
-
return
|
|
107
|
+
return Ge(o, i);
|
|
108
108
|
} else {
|
|
109
109
|
if (this.name === "SPACE")
|
|
110
110
|
return n.space.name;
|
|
@@ -124,38 +124,38 @@ class I extends In {
|
|
|
124
124
|
return "<n/a>";
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
|
|
127
|
+
go.register("field_dropdown2", I);
|
|
128
128
|
var b = /* @__PURE__ */ ((t) => (t.STATE_CHANGE = "state_change", t))(b || {});
|
|
129
|
-
class
|
|
129
|
+
class Bn extends O.Abstract {
|
|
130
130
|
isBlank = !0;
|
|
131
131
|
}
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
sn.register(
|
|
133
|
+
sn.Type.EVENT,
|
|
134
134
|
"state_change",
|
|
135
|
-
|
|
135
|
+
Bn
|
|
136
136
|
);
|
|
137
|
-
const
|
|
137
|
+
const bn = (t, e, n) => {
|
|
138
138
|
const o = t[e];
|
|
139
139
|
return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((i, a) => {
|
|
140
140
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(a.bind(null, /* @__PURE__ */ new Error("Unknown variable dynamic import: " + e + (e.split("/").length !== n ? ". Note that variables only represent file names one level deep." : ""))));
|
|
141
141
|
});
|
|
142
142
|
};
|
|
143
|
-
async function
|
|
144
|
-
const e = await
|
|
145
|
-
|
|
143
|
+
async function cn(t) {
|
|
144
|
+
const e = await bn(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.jq2w67rd.js"), "./msg/zhHans.ts": () => import("./msg-zhHans.hsanc2zi.js") }), `./msg/${t}.ts`, 3);
|
|
145
|
+
Ao(e.default);
|
|
146
146
|
}
|
|
147
147
|
function p(t) {
|
|
148
|
-
return
|
|
148
|
+
return In[t] ?? t;
|
|
149
149
|
}
|
|
150
|
-
const
|
|
151
|
-
function
|
|
150
|
+
const Ot = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", Wt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
|
|
151
|
+
function le(t) {
|
|
152
152
|
const e = t.lastIndexOf("V");
|
|
153
153
|
if (e <= 0 || e >= t.length - 1)
|
|
154
154
|
return console.assert(!1, `invalid key=${t}`), "";
|
|
155
|
-
const n =
|
|
155
|
+
const n = Io(t.substring(0, e - 1)), o = "v" + t.substring(e + 1);
|
|
156
156
|
return `${n}_${o}`;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function jt(t) {
|
|
159
159
|
const e = t.lastIndexOf("V");
|
|
160
160
|
if (e <= 0 || e >= t.length - 1)
|
|
161
161
|
return console.assert(!1, `invalid key=${t}`), "";
|
|
@@ -165,49 +165,49 @@ function Wt(t) {
|
|
|
165
165
|
function k(t) {
|
|
166
166
|
return t.length <= 0 && t.push([p("NO_OPTION"), ""]), t;
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function Go(t) {
|
|
169
169
|
let e = 0;
|
|
170
170
|
for (; t; )
|
|
171
171
|
e++, t = t.getParent();
|
|
172
172
|
return e;
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function Pn(t) {
|
|
175
175
|
return t.ui === "strInput" ? "string" : t.ui === "numInput" ? "number" : t.ui === "switch" ? "boolean" : "string";
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function Xt(t, e) {
|
|
178
178
|
return !!(t.startsWith("basic.") || !e.ui || e.readonly);
|
|
179
179
|
}
|
|
180
|
-
function
|
|
180
|
+
function Ce(t) {
|
|
181
181
|
const e = `<block type="text_v1"><field name="TEXT">${t}</field></block>`;
|
|
182
182
|
return C.xml.textToDom(e);
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function rn(t) {
|
|
185
185
|
const e = `<block type="math_number_v1"><field name="NUM">${t}</field></block>`;
|
|
186
186
|
return C.xml.textToDom(e);
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function Wo(t) {
|
|
189
189
|
return C.xml.textToDom('<block type="logic_boolean_v1"><field name="BOOL">FALSE</field></block>');
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function Me(t, e) {
|
|
192
192
|
let n = null;
|
|
193
|
-
return e === "string" ? n =
|
|
193
|
+
return e === "string" ? n = Ce("") : e === "integer" || e === "decimal" ? n = rn(0) : e === "boolean" ? n = Wo() : e === "enum" || e === "dateTime" ? n = Ce("") : console.assert(!1), n ? On.domToBlock(n, t) : null;
|
|
194
194
|
}
|
|
195
195
|
function ot(t) {
|
|
196
196
|
return t === "string" ? "String" : t === "number" ? "Number" : t === "boolean" ? "Boolean" : t === "array" ? "Array" : t === "object" ? "Object" : (console.assert(!1), null);
|
|
197
197
|
}
|
|
198
|
-
function
|
|
199
|
-
return t.ui === "dummy" ? null : t.ui === "strInput" ? "String" : t.ui === "numInput" ? "Number" : t.ui === "switch" ? "Boolean" : t.ui === "select" ?
|
|
198
|
+
function jo(t) {
|
|
199
|
+
return t.ui === "dummy" ? null : t.ui === "strInput" ? "String" : t.ui === "numInput" ? "Number" : t.ui === "switch" ? "Boolean" : t.ui === "select" ? jt(t.items) : t.ui === "multiTypes" ? jt(t.types) : t.ui === "compSelect" ? "Comp" : t.ui === "colorPicker" ? "Color" : (console.assert(!1), null);
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function Rn(t) {
|
|
202
202
|
return t === "string" ? "String" : t === "integer" || t === "decimal" ? "Number" : t === "boolean" ? "Boolean" : t === "enum" || t === "dateTime" ? "String" : (console.assert(!1), null);
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function We(t, e, n, o) {
|
|
205
205
|
const i = `
|
|
206
206
|
<block type="parameter_v1">
|
|
207
207
|
<mutation key="${e}" name="${n}" locale="${o ? "TRUE" : "FALSE"}"/>
|
|
208
208
|
</block>
|
|
209
209
|
`, a = C.xml.textToDom(i);
|
|
210
|
-
return
|
|
210
|
+
return On.domToBlock(a, t);
|
|
211
211
|
}
|
|
212
212
|
function F(t, e) {
|
|
213
213
|
try {
|
|
@@ -222,7 +222,7 @@ function F(t, e) {
|
|
|
222
222
|
return;
|
|
223
223
|
l.dispose();
|
|
224
224
|
}
|
|
225
|
-
l =
|
|
225
|
+
l = We(
|
|
226
226
|
t.workspace,
|
|
227
227
|
i,
|
|
228
228
|
a,
|
|
@@ -237,51 +237,51 @@ function ut(t) {
|
|
|
237
237
|
const e = `<shadow type="text_v1"><field name="TEXT">${t}</field></shadow>`;
|
|
238
238
|
return C.xml.textToDom(e);
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function Jt(t) {
|
|
241
241
|
const e = `<shadow type="math_number_v1"><field name="NUM">${t}</field></shadow>`;
|
|
242
242
|
return C.xml.textToDom(e);
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function qt(t) {
|
|
245
245
|
const e = `<shadow type="logic_boolean_v1"><field name="BOOL">${t ? "TRUE" : "FALSE"}</field></shadow>`;
|
|
246
246
|
return C.xml.textToDom(e);
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function Xo() {
|
|
249
249
|
return C.xml.textToDom('<shadow type="list_create_v1"></shadow>');
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function Jo() {
|
|
252
252
|
return C.xml.textToDom('<shadow type="object_create_v1"></shadow>');
|
|
253
253
|
}
|
|
254
|
-
function
|
|
255
|
-
const e = `<shadow type="${
|
|
254
|
+
function qo(t) {
|
|
255
|
+
const e = `<shadow type="${le(t)}"></shadow>`;
|
|
256
256
|
return C.xml.textToDom(e);
|
|
257
257
|
}
|
|
258
|
-
function
|
|
259
|
-
const e = `<shadow type="${
|
|
258
|
+
function Qo(t) {
|
|
259
|
+
const e = `<shadow type="${le(t)}"></shadow>`;
|
|
260
260
|
return C.xml.textToDom(e);
|
|
261
261
|
}
|
|
262
|
-
function
|
|
262
|
+
function zo(t) {
|
|
263
263
|
const e = `<shadow type="color_picker_v1"><field name="COLOR">${t}</field></shadow>`;
|
|
264
264
|
return C.xml.textToDom(e);
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function Zo() {
|
|
267
267
|
return C.xml.textToDom('<shadow type="select_comp_v1"></shadow>');
|
|
268
268
|
}
|
|
269
269
|
function it(t) {
|
|
270
270
|
let e = null;
|
|
271
|
-
return t === "string" ? e = ut("") : t === "number" ? e =
|
|
271
|
+
return t === "string" ? e = ut("") : t === "number" ? e = Jt(0) : t === "boolean" ? e = qt(!1) : t === "array" ? e = Xo() : t === "object" ? e = Jo() : console.assert(!1), e;
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function ti(t) {
|
|
274
274
|
let e = null;
|
|
275
|
-
return t.ui === "dummy" ? console.assert(!0) : t.ui === "strInput" ? e = ut(t.default) : t.ui === "numInput" ? e =
|
|
275
|
+
return t.ui === "dummy" ? console.assert(!0) : t.ui === "strInput" ? e = ut(t.default) : t.ui === "numInput" ? e = Jt(t.default) : t.ui === "switch" ? e = qt(t.default) : t.ui === "select" ? e = qo(t.items) : t.ui === "multiTypes" ? e = Qo(t.types) : t.ui === "compSelect" ? e = Zo() : t.ui === "colorPicker" ? e = zo(t.default ?? "#ff0000") : console.assert(!1), e;
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function ei() {
|
|
278
278
|
const { activeObject: t, activePage: e } = f.app, n = [];
|
|
279
279
|
if (t.type === "page")
|
|
280
280
|
for (const { id: o, name: i, type: a } of e.meta.arguments)
|
|
281
281
|
n.push({ key: o, name: i, type: a });
|
|
282
282
|
return n;
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function un(t) {
|
|
285
285
|
const { activeObject: e, activePage: n } = f.app;
|
|
286
286
|
if (e.type === "page") {
|
|
287
287
|
const o = n.meta.arguments.find((i) => i.id === t);
|
|
@@ -293,13 +293,13 @@ function ln(t) {
|
|
|
293
293
|
};
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function ni() {
|
|
297
297
|
const t = [];
|
|
298
|
-
return
|
|
298
|
+
return ei().forEach(({ key: n, name: o }) => {
|
|
299
299
|
t.push([o, n]);
|
|
300
300
|
}), k(t);
|
|
301
301
|
}
|
|
302
|
-
const
|
|
302
|
+
const oi = {
|
|
303
303
|
init: function() {
|
|
304
304
|
this.argument = {
|
|
305
305
|
key: "",
|
|
@@ -321,7 +321,7 @@ const ii = {
|
|
|
321
321
|
}, 0);
|
|
322
322
|
},
|
|
323
323
|
genArgumentOpts_: function() {
|
|
324
|
-
return
|
|
324
|
+
return ni();
|
|
325
325
|
},
|
|
326
326
|
onchange: function(t) {
|
|
327
327
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -334,7 +334,7 @@ const ii = {
|
|
|
334
334
|
}
|
|
335
335
|
},
|
|
336
336
|
onArgumentChange_: function(t) {
|
|
337
|
-
const e =
|
|
337
|
+
const e = un(t);
|
|
338
338
|
if (!e) {
|
|
339
339
|
console.assert(!1);
|
|
340
340
|
return;
|
|
@@ -345,7 +345,7 @@ const ii = {
|
|
|
345
345
|
this.setOutput(!0, ot(this.argument.type));
|
|
346
346
|
},
|
|
347
347
|
checkWarning_: function() {
|
|
348
|
-
const t =
|
|
348
|
+
const t = un(this.argument.key);
|
|
349
349
|
if (!t) {
|
|
350
350
|
this.setWarningText(p("WARN_ARGUMENT_NOT_FOUND"));
|
|
351
351
|
return;
|
|
@@ -357,13 +357,13 @@ const ii = {
|
|
|
357
357
|
this.setWarningText(null);
|
|
358
358
|
}
|
|
359
359
|
};
|
|
360
|
-
d.get_page_argument_v1 =
|
|
360
|
+
d.get_page_argument_v1 = oi;
|
|
361
361
|
s.forBlock.get_page_argument_v1 = function(t) {
|
|
362
362
|
const e = t;
|
|
363
363
|
return [`__getPageArgumentV1__(${s.quote_(e.argument.key)})`, c.FUNCTION_CALL];
|
|
364
364
|
};
|
|
365
|
-
const
|
|
366
|
-
const n =
|
|
365
|
+
const ii = (t, e) => {
|
|
366
|
+
const n = le(t), o = jt(t);
|
|
367
367
|
d[n] = {
|
|
368
368
|
init: function() {
|
|
369
369
|
this.appendDummyInput().appendField(
|
|
@@ -382,13 +382,13 @@ const si = (t, e) => {
|
|
|
382
382
|
return [a(r), c.ATOMIC];
|
|
383
383
|
};
|
|
384
384
|
};
|
|
385
|
-
for (const t in
|
|
386
|
-
const e =
|
|
385
|
+
for (const t in Gt) {
|
|
386
|
+
const e = Gt[t];
|
|
387
387
|
for (const n in e.items)
|
|
388
|
-
|
|
388
|
+
ii(n, e.items[n]);
|
|
389
389
|
}
|
|
390
|
-
const
|
|
391
|
-
const n =
|
|
390
|
+
const si = (t, e) => {
|
|
391
|
+
const n = le(t), o = jt(t);
|
|
392
392
|
d[n] = {
|
|
393
393
|
init: function() {
|
|
394
394
|
this.value = e[0].default ?? "", this.appendDummyInput("DUMMY").appendField(
|
|
@@ -440,8 +440,8 @@ const ai = (t, e) => {
|
|
|
440
440
|
i.removeField("VALUE", !0), i.removeField("SUFFIX", !0);
|
|
441
441
|
let u, l;
|
|
442
442
|
if (r.ui === "pixelInput") {
|
|
443
|
-
const _ =
|
|
444
|
-
u = new
|
|
443
|
+
const _ = Ko(this.value) ?? 0;
|
|
444
|
+
u = new Re(
|
|
445
445
|
_,
|
|
446
446
|
r.min,
|
|
447
447
|
r.max,
|
|
@@ -451,8 +451,8 @@ const ai = (t, e) => {
|
|
|
451
451
|
}
|
|
452
452
|
), l = "px";
|
|
453
453
|
} else if (r.ui === "percentInput") {
|
|
454
|
-
const _ =
|
|
455
|
-
u = new
|
|
454
|
+
const _ = $o(this.value) ?? 0;
|
|
455
|
+
u = new Re(
|
|
456
456
|
_,
|
|
457
457
|
r.min,
|
|
458
458
|
r.max,
|
|
@@ -477,38 +477,38 @@ const ai = (t, e) => {
|
|
|
477
477
|
return [a(i.value), c.ATOMIC];
|
|
478
478
|
};
|
|
479
479
|
};
|
|
480
|
-
for (const t in
|
|
481
|
-
const e =
|
|
480
|
+
for (const t in Gt) {
|
|
481
|
+
const e = Gt[t];
|
|
482
482
|
for (const n in e.types)
|
|
483
|
-
|
|
483
|
+
si(n, e.types[n]);
|
|
484
484
|
}
|
|
485
|
-
const
|
|
485
|
+
const ai = C.xml, ci = {
|
|
486
486
|
init: function() {
|
|
487
487
|
this.appendDummyInput().appendField(
|
|
488
488
|
"%{BKY_APP_V1_APP_BIND_CONTAINER_TITLE}"
|
|
489
489
|
), this.appendStatementInput("STACK"), this.setStyle("event_blocks"), this.contextMenu = !1;
|
|
490
490
|
}
|
|
491
491
|
};
|
|
492
|
-
d.app_bind_container_v1 =
|
|
493
|
-
const
|
|
492
|
+
d.app_bind_container_v1 = ci;
|
|
493
|
+
const ri = {
|
|
494
494
|
init: function() {
|
|
495
495
|
this.appendDummyInput().appendField("%{BKY_APP_V1_APP_BIND_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("event_blocks"), this.contextMenu = !1;
|
|
496
496
|
}
|
|
497
497
|
};
|
|
498
|
-
d.app_bind_item_v1 =
|
|
499
|
-
const
|
|
498
|
+
d.app_bind_item_v1 = ri;
|
|
499
|
+
const ui = {
|
|
500
500
|
init: function() {
|
|
501
501
|
this.itemCount_ = 0, this.setMutator(
|
|
502
502
|
new ht.MutatorIcon(
|
|
503
503
|
["app_bind_item_v1"],
|
|
504
504
|
this
|
|
505
505
|
)
|
|
506
|
-
), this.debounce_ =
|
|
506
|
+
), this.debounce_ = Oo(() => {
|
|
507
507
|
this.checkWarning_();
|
|
508
508
|
}, 250), this.setStyle("event_blocks"), this.setTooltip("%{BKY_APP_V1_APP_BIND_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_APP_BIND_HELPURL}"), this.updateShape_();
|
|
509
509
|
},
|
|
510
510
|
mutationToDom: function() {
|
|
511
|
-
const t =
|
|
511
|
+
const t = ai.createElement("mutation");
|
|
512
512
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
513
513
|
},
|
|
514
514
|
domToMutation: function(t) {
|
|
@@ -614,62 +614,62 @@ const li = {
|
|
|
614
614
|
this.setWarningText(null);
|
|
615
615
|
}
|
|
616
616
|
};
|
|
617
|
-
d.app_bind_v1 =
|
|
617
|
+
d.app_bind_v1 = ui;
|
|
618
618
|
s.forBlock.app_bind_v1 = function() {
|
|
619
619
|
return "";
|
|
620
620
|
};
|
|
621
|
-
function
|
|
621
|
+
function Dn() {
|
|
622
622
|
return f.app.appList;
|
|
623
623
|
}
|
|
624
|
-
function
|
|
624
|
+
function ln(t) {
|
|
625
625
|
return f.app.appList.find((e) => e.id === t);
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function li() {
|
|
628
628
|
const t = [];
|
|
629
|
-
return
|
|
629
|
+
return Dn().forEach(({ id: n, name: o }) => {
|
|
630
630
|
t.push([o, n]);
|
|
631
631
|
}), k(t);
|
|
632
632
|
}
|
|
633
|
-
function
|
|
633
|
+
function Ue(t) {
|
|
634
634
|
const e = f.app.appList.find((n) => n.id === t);
|
|
635
635
|
return e ? e.pages : [];
|
|
636
636
|
}
|
|
637
|
-
function
|
|
637
|
+
function ye(t, e) {
|
|
638
638
|
const n = f.app.appList.find((o) => o.id === t);
|
|
639
639
|
if (n)
|
|
640
640
|
return n.pages.find((o) => o.id === e);
|
|
641
641
|
}
|
|
642
|
-
function
|
|
642
|
+
function _i(t) {
|
|
643
643
|
const e = [];
|
|
644
|
-
return
|
|
644
|
+
return Ue(t).forEach(({ id: o, name: i }) => {
|
|
645
645
|
e.push([i, o]);
|
|
646
646
|
}), k(e);
|
|
647
647
|
}
|
|
648
|
-
const
|
|
648
|
+
const Mn = {
|
|
649
649
|
id: "",
|
|
650
650
|
groupid: "",
|
|
651
651
|
name: "",
|
|
652
652
|
position: 0
|
|
653
653
|
};
|
|
654
|
-
function
|
|
654
|
+
function Un() {
|
|
655
655
|
const { comps: t } = f.app.activeApp;
|
|
656
|
-
return [
|
|
656
|
+
return [Mn, ...t];
|
|
657
657
|
}
|
|
658
|
-
function
|
|
659
|
-
return t === "" ?
|
|
658
|
+
function _n(t) {
|
|
659
|
+
return t === "" ? Mn : f.app.activeApp.comps.find((e) => e.id === t);
|
|
660
660
|
}
|
|
661
|
-
function
|
|
661
|
+
function pi() {
|
|
662
662
|
const { i18n: t } = nt, e = [];
|
|
663
|
-
return
|
|
663
|
+
return Un().forEach(({ id: o, name: i }) => {
|
|
664
664
|
let a = i;
|
|
665
665
|
o === "" && (a = t.global.t("x-runtime-lib.notSet")), e.push([a, o]);
|
|
666
666
|
}), k(e);
|
|
667
667
|
}
|
|
668
|
-
function
|
|
668
|
+
function hi(t) {
|
|
669
669
|
return t === "regular" || t === "property";
|
|
670
670
|
}
|
|
671
|
-
function
|
|
672
|
-
const { props: e } = f.runtime, { activeObject: n } = f.app, o = [], i =
|
|
671
|
+
function Ve(t) {
|
|
672
|
+
const { props: e } = f.runtime, { activeObject: n } = f.app, o = [], i = kt(n.type, n.subtype);
|
|
673
673
|
if (!i)
|
|
674
674
|
return o;
|
|
675
675
|
const a = n.nodes.find((u) => u.id === t);
|
|
@@ -687,9 +687,9 @@ function xe(t) {
|
|
|
687
687
|
});
|
|
688
688
|
if (r.key.startsWith("single_ref_v") && console.log("singleRef"), r.key.startsWith("multiple_ref_v") && console.log("multipleRef"), e[r.key] && e[r.key][i])
|
|
689
689
|
for (const { keys: u, names: l, raw: _ } of e[r.key][i]) {
|
|
690
|
-
if (
|
|
690
|
+
if (Xt(u, _))
|
|
691
691
|
continue;
|
|
692
|
-
const T =
|
|
692
|
+
const T = Pn(_);
|
|
693
693
|
o.push({
|
|
694
694
|
key: u,
|
|
695
695
|
names: l,
|
|
@@ -702,8 +702,8 @@ function xe(t) {
|
|
|
702
702
|
}
|
|
703
703
|
return r.key.startsWith("globality_v") && n.type, o;
|
|
704
704
|
}
|
|
705
|
-
function
|
|
706
|
-
const { props: n } = f.runtime, { activeObject: o } = f.app, i =
|
|
705
|
+
function ke(t, e) {
|
|
706
|
+
const { props: n } = f.runtime, { activeObject: o } = f.app, i = kt(o.type, o.subtype);
|
|
707
707
|
if (!i)
|
|
708
708
|
return;
|
|
709
709
|
const a = o.nodes.find((l) => l.id === t);
|
|
@@ -725,7 +725,7 @@ function Ne(t, e) {
|
|
|
725
725
|
if (r.key.startsWith("single_ref_v") && console.log("singleRef"), r.key.startsWith("multiple_ref_v") && console.log("multipleRef"), n[r.key] && n[r.key][i]) {
|
|
726
726
|
const l = n[r.key][i].find((_) => _.keys === e);
|
|
727
727
|
if (l) {
|
|
728
|
-
const _ =
|
|
728
|
+
const _ = Pn(l.raw);
|
|
729
729
|
return {
|
|
730
730
|
key: l.keys,
|
|
731
731
|
names: l.names,
|
|
@@ -739,13 +739,13 @@ function Ne(t, e) {
|
|
|
739
739
|
}
|
|
740
740
|
r.key.startsWith("globality_v") && o.type;
|
|
741
741
|
}
|
|
742
|
-
function
|
|
743
|
-
const e = [], n =
|
|
742
|
+
function di(t) {
|
|
743
|
+
const e = [], n = Ve(t);
|
|
744
744
|
for (const { key: o, names: i, from: a } of n)
|
|
745
|
-
e.push([
|
|
745
|
+
e.push([ue(i, a), o]);
|
|
746
746
|
return k(e);
|
|
747
747
|
}
|
|
748
|
-
function
|
|
748
|
+
function Vn() {
|
|
749
749
|
const { activeObject: t, activeComp: e } = f.app, n = [];
|
|
750
750
|
if (t.type === "comp")
|
|
751
751
|
for (const o of e.meta.events) {
|
|
@@ -761,7 +761,7 @@ function xn() {
|
|
|
761
761
|
}
|
|
762
762
|
return n;
|
|
763
763
|
}
|
|
764
|
-
function
|
|
764
|
+
function pn(t) {
|
|
765
765
|
const { activeObject: e, activeComp: n } = f.app;
|
|
766
766
|
if (e.type === "comp") {
|
|
767
767
|
const o = n.meta.events.find(
|
|
@@ -780,16 +780,16 @@ function hn(t) {
|
|
|
780
780
|
}
|
|
781
781
|
}
|
|
782
782
|
}
|
|
783
|
-
function
|
|
784
|
-
const t = [], e =
|
|
783
|
+
function fi() {
|
|
784
|
+
const t = [], e = Vn();
|
|
785
785
|
for (const { key: n, names: o, from: i } of e)
|
|
786
|
-
t.push([
|
|
786
|
+
t.push([ue(o, i), n]);
|
|
787
787
|
return k(t);
|
|
788
788
|
}
|
|
789
|
-
function
|
|
789
|
+
function xn(t) {
|
|
790
790
|
return t === "regular" || t === "slot";
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function xe(t) {
|
|
793
793
|
const { activeObject: e } = f.app, n = [], o = e.nodes.find((a) => a.id === t);
|
|
794
794
|
if (!o)
|
|
795
795
|
return n;
|
|
@@ -806,7 +806,7 @@ function Fe(t) {
|
|
|
806
806
|
});
|
|
807
807
|
return i.key.startsWith("single_ref_v") && console.log("singleRef"), i.key.startsWith("multiple_ref_v") && console.log("multipleRef"), i.key.startsWith("globality_v") && e.type, n;
|
|
808
808
|
}
|
|
809
|
-
function
|
|
809
|
+
function Ne(t, e) {
|
|
810
810
|
const { activeObject: n } = f.app, o = n.nodes.find((r) => r.id === t);
|
|
811
811
|
if (!o)
|
|
812
812
|
return;
|
|
@@ -826,13 +826,13 @@ function Le(t, e) {
|
|
|
826
826
|
};
|
|
827
827
|
i.key.startsWith("single_ref_v") && console.log("singleRef"), i.key.startsWith("multiple_ref_v") && console.log("multipleRef"), i.key.startsWith("globality_v") && n.type;
|
|
828
828
|
}
|
|
829
|
-
function
|
|
830
|
-
const e = [], n =
|
|
829
|
+
function mi(t) {
|
|
830
|
+
const e = [], n = xe(t);
|
|
831
831
|
for (const { key: o, names: i, from: a } of n)
|
|
832
|
-
e.push([
|
|
832
|
+
e.push([Ge(i, a), o]);
|
|
833
833
|
return k(e);
|
|
834
834
|
}
|
|
835
|
-
function
|
|
835
|
+
function je() {
|
|
836
836
|
const { activeObject: t, activeComp: e } = f.app, n = [];
|
|
837
837
|
if (t.type === "comp")
|
|
838
838
|
for (const o of e.meta.methods) {
|
|
@@ -852,7 +852,7 @@ function Xe() {
|
|
|
852
852
|
}
|
|
853
853
|
return n;
|
|
854
854
|
}
|
|
855
|
-
function
|
|
855
|
+
function yt(t) {
|
|
856
856
|
const { activeObject: e, activeComp: n } = f.app;
|
|
857
857
|
if (e.type === "comp") {
|
|
858
858
|
const o = n.meta.methods.find(
|
|
@@ -875,28 +875,28 @@ function Ct(t) {
|
|
|
875
875
|
}
|
|
876
876
|
}
|
|
877
877
|
}
|
|
878
|
-
function
|
|
879
|
-
const t = [], e =
|
|
878
|
+
function Fn() {
|
|
879
|
+
const t = [], e = je();
|
|
880
880
|
for (const { key: n, names: o, from: i } of e)
|
|
881
|
-
t.push([
|
|
881
|
+
t.push([Ge(o, i), n]);
|
|
882
882
|
return k(t);
|
|
883
883
|
}
|
|
884
|
-
function
|
|
885
|
-
const e =
|
|
884
|
+
function Fe(t) {
|
|
885
|
+
const e = yt(t);
|
|
886
886
|
return e ? e.outputs : [];
|
|
887
887
|
}
|
|
888
|
-
function
|
|
889
|
-
const n =
|
|
888
|
+
function Le(t, e) {
|
|
889
|
+
const n = yt(t);
|
|
890
890
|
if (n)
|
|
891
891
|
return n.outputs.find((o) => o.key === e);
|
|
892
892
|
}
|
|
893
|
-
function
|
|
894
|
-
const e = [], n =
|
|
893
|
+
function Ti(t) {
|
|
894
|
+
const e = [], n = Fe(t);
|
|
895
895
|
for (const { name: o, key: i } of n)
|
|
896
896
|
e.push([o, i]);
|
|
897
897
|
return k(e);
|
|
898
898
|
}
|
|
899
|
-
function
|
|
899
|
+
function Yn(t, e, n) {
|
|
900
900
|
if (!n)
|
|
901
901
|
return !1;
|
|
902
902
|
const { props: o } = f.runtime, { activeObject: i, activeComp: a } = f.app;
|
|
@@ -905,7 +905,7 @@ function wn(t, e, n) {
|
|
|
905
905
|
return !1;
|
|
906
906
|
if (t.key.startsWith("single_ref_v") && console.log("singleRef"), t.key.startsWith("multiple_ref_v") && console.log("multipleRef"), o[t.key] && o[t.key][e]) {
|
|
907
907
|
for (const { keys: r, raw: u } of o[t.key][e])
|
|
908
|
-
if (!
|
|
908
|
+
if (!Xt(r, u))
|
|
909
909
|
return !1;
|
|
910
910
|
}
|
|
911
911
|
return t.key.startsWith("globality_v") && i.type, !0;
|
|
@@ -915,7 +915,7 @@ function wn(t, e, n) {
|
|
|
915
915
|
if (n === "getProp") {
|
|
916
916
|
if (o[t.key] && o[t.key][e]) {
|
|
917
917
|
for (const { keys: r, raw: u } of o[t.key][e])
|
|
918
|
-
if (!
|
|
918
|
+
if (!Xt(r, u))
|
|
919
919
|
return !1;
|
|
920
920
|
}
|
|
921
921
|
return t.key.startsWith("single_ref_v") && console.log("singleRef"), t.key.startsWith("multiple_ref_v") && console.log("multipleRef"), !(t.key.startsWith("globality_v") && i.type === "comp" && a.meta.properties.length > 0);
|
|
@@ -925,7 +925,7 @@ function wn(t, e, n) {
|
|
|
925
925
|
return !1;
|
|
926
926
|
}
|
|
927
927
|
function G(t) {
|
|
928
|
-
const { activeObject: e } = f.app, n =
|
|
928
|
+
const { activeObject: e } = f.app, n = kt(e.type, e.subtype);
|
|
929
929
|
if (!n)
|
|
930
930
|
return !1;
|
|
931
931
|
for (const o of e.nodes) {
|
|
@@ -934,13 +934,13 @@ function G(t) {
|
|
|
934
934
|
console.assert(!1, "invalid element", o.key);
|
|
935
935
|
continue;
|
|
936
936
|
}
|
|
937
|
-
if (!
|
|
937
|
+
if (!Yn(i, n, t))
|
|
938
938
|
return !0;
|
|
939
939
|
}
|
|
940
940
|
return !1;
|
|
941
941
|
}
|
|
942
|
-
function
|
|
943
|
-
const { activeObject: e } = f.app, n = [], o =
|
|
942
|
+
function Ft(t) {
|
|
943
|
+
const { activeObject: e } = f.app, n = [], o = kt(e.type, e.subtype);
|
|
944
944
|
if (!o)
|
|
945
945
|
return n;
|
|
946
946
|
for (const i of e.nodes) {
|
|
@@ -949,7 +949,7 @@ function xt(t) {
|
|
|
949
949
|
console.assert(!1, "invalid element", i.key);
|
|
950
950
|
continue;
|
|
951
951
|
}
|
|
952
|
-
|
|
952
|
+
Yn(a, o, t) || n.push({
|
|
953
953
|
id: i.id,
|
|
954
954
|
key: i.key,
|
|
955
955
|
name: a.name,
|
|
@@ -974,16 +974,16 @@ function _t(t) {
|
|
|
974
974
|
alias: n.alias
|
|
975
975
|
};
|
|
976
976
|
}
|
|
977
|
-
function
|
|
978
|
-
const { i18n: e } = nt, n = [], o =
|
|
977
|
+
function _e(t) {
|
|
978
|
+
const { i18n: e } = nt, n = [], o = Ft(t);
|
|
979
979
|
for (const { id: i, name: a, alias: r } of o) {
|
|
980
980
|
let u = e.global.t(a);
|
|
981
981
|
r && (u += " / " + r), n.push([u, i]);
|
|
982
982
|
}
|
|
983
983
|
return k(n);
|
|
984
984
|
}
|
|
985
|
-
function
|
|
986
|
-
const { props: n } = f.runtime, { activeObject: o, activeComp: i } = f.app, a = [], r =
|
|
985
|
+
function Dt(t, e) {
|
|
986
|
+
const { props: n } = f.runtime, { activeObject: o, activeComp: i } = f.app, a = [], r = kt(o.type, o.subtype);
|
|
987
987
|
if (!r)
|
|
988
988
|
return a;
|
|
989
989
|
const u = o.nodes.find((_) => _.id === t);
|
|
@@ -993,29 +993,29 @@ function Rt(t, e) {
|
|
|
993
993
|
if (!l)
|
|
994
994
|
return console.assert(!1, "invalid element", u.key), a;
|
|
995
995
|
if (n[l.key] && n[l.key][r])
|
|
996
|
-
for (const { keys: _, names: T, raw:
|
|
997
|
-
e === "write" &&
|
|
996
|
+
for (const { keys: _, names: T, raw: g } of n[l.key][r])
|
|
997
|
+
e === "write" && Xt(_, g) || a.push({
|
|
998
998
|
key: _,
|
|
999
999
|
names: T,
|
|
1000
1000
|
meta: {
|
|
1001
1001
|
from: "regular",
|
|
1002
|
-
raw:
|
|
1002
|
+
raw: g
|
|
1003
1003
|
}
|
|
1004
1004
|
});
|
|
1005
1005
|
if (l.key.startsWith("single_ref_v") && console.log("singleRef"), l.key.startsWith("multiple_ref_v") && console.log("multipleRef"), l.key.startsWith("globality_v") && o.type === "comp")
|
|
1006
|
-
for (const { id: _, name: T, type:
|
|
1006
|
+
for (const { id: _, name: T, type: g } of i.meta.properties)
|
|
1007
1007
|
a.push({
|
|
1008
1008
|
key: _,
|
|
1009
1009
|
names: [T],
|
|
1010
1010
|
meta: {
|
|
1011
1011
|
from: "custom",
|
|
1012
|
-
raw: { type:
|
|
1012
|
+
raw: { type: g }
|
|
1013
1013
|
}
|
|
1014
1014
|
});
|
|
1015
1015
|
return a;
|
|
1016
1016
|
}
|
|
1017
|
-
function
|
|
1018
|
-
const { props: n } = f.runtime, { activeObject: o, activeComp: i } = f.app, a =
|
|
1017
|
+
function Et(t, e) {
|
|
1018
|
+
const { props: n } = f.runtime, { activeObject: o, activeComp: i } = f.app, a = kt(o.type, o.subtype);
|
|
1019
1019
|
if (!a)
|
|
1020
1020
|
return;
|
|
1021
1021
|
const r = o.nodes.find((l) => l.id === t);
|
|
@@ -1053,30 +1053,30 @@ function Tt(t, e) {
|
|
|
1053
1053
|
};
|
|
1054
1054
|
}
|
|
1055
1055
|
}
|
|
1056
|
-
function
|
|
1057
|
-
const n = [], o =
|
|
1056
|
+
function wn(t, e) {
|
|
1057
|
+
const n = [], o = Dt(t, e);
|
|
1058
1058
|
for (const { key: i, names: a, meta: r } of o)
|
|
1059
|
-
n.push([
|
|
1059
|
+
n.push([Sn(a, r.from), i]);
|
|
1060
1060
|
return k(n);
|
|
1061
1061
|
}
|
|
1062
|
-
function
|
|
1062
|
+
function Kn() {
|
|
1063
1063
|
const { activeObject: t, activePage: e, activeComp: n } = f.app;
|
|
1064
1064
|
return t.type === "page" ? e.meta.states : t.type === "comp" ? n.meta.states : [];
|
|
1065
1065
|
}
|
|
1066
|
-
function
|
|
1066
|
+
function Ye(t) {
|
|
1067
1067
|
const { activeObject: e, activePage: n, activeComp: o } = f.app;
|
|
1068
1068
|
if (e.type === "page")
|
|
1069
1069
|
return n.meta.states.find((i) => i.id === t);
|
|
1070
1070
|
if (e.type === "comp")
|
|
1071
1071
|
return o.meta.states.find((i) => i.id === t);
|
|
1072
1072
|
}
|
|
1073
|
-
function
|
|
1074
|
-
const t = [], e =
|
|
1073
|
+
function $n() {
|
|
1074
|
+
const t = [], e = Kn();
|
|
1075
1075
|
for (const { id: n, name: o } of e)
|
|
1076
1076
|
t.push([o, n]);
|
|
1077
1077
|
return k(t);
|
|
1078
1078
|
}
|
|
1079
|
-
const
|
|
1079
|
+
const Ei = {
|
|
1080
1080
|
init: function() {
|
|
1081
1081
|
this.node = {
|
|
1082
1082
|
id: "",
|
|
@@ -1092,13 +1092,13 @@ const gi = {
|
|
|
1092
1092
|
initData_: function() {
|
|
1093
1093
|
if (this.node.id)
|
|
1094
1094
|
return;
|
|
1095
|
-
const t =
|
|
1095
|
+
const t = Ft("onEvent")?.[0];
|
|
1096
1096
|
if (!t)
|
|
1097
1097
|
return;
|
|
1098
1098
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
1099
1099
|
const e = this.getField("NODE");
|
|
1100
1100
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
1101
|
-
const n =
|
|
1101
|
+
const n = Ve(this.node.id)?.[0];
|
|
1102
1102
|
if (!n)
|
|
1103
1103
|
return;
|
|
1104
1104
|
this.event.key = n.key, this.event.names = n.names, this.event.from = n.from, this.event.params = n.params;
|
|
@@ -1117,10 +1117,10 @@ const gi = {
|
|
|
1117
1117
|
}, 0);
|
|
1118
1118
|
},
|
|
1119
1119
|
genNodeOpts_: function() {
|
|
1120
|
-
return
|
|
1120
|
+
return _e("onEvent");
|
|
1121
1121
|
},
|
|
1122
1122
|
genEventOpts_: function() {
|
|
1123
|
-
return
|
|
1123
|
+
return di(this.node.id);
|
|
1124
1124
|
},
|
|
1125
1125
|
onchange: function(t) {
|
|
1126
1126
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -1141,14 +1141,14 @@ const gi = {
|
|
|
1141
1141
|
const n = this.node.key !== e.key;
|
|
1142
1142
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
1143
1143
|
const o = this.getField("EVENT");
|
|
1144
|
-
if (o.getOptions(!1), n || !
|
|
1145
|
-
const i =
|
|
1144
|
+
if (o.getOptions(!1), n || !ke(this.node.id, this.event.key)) {
|
|
1145
|
+
const i = Ve(this.node.id)?.[0];
|
|
1146
1146
|
o.setValue(i?.key ?? "");
|
|
1147
1147
|
}
|
|
1148
1148
|
this.onEventChange_(o.getValue());
|
|
1149
1149
|
},
|
|
1150
1150
|
onEventChange_: function(t) {
|
|
1151
|
-
const e =
|
|
1151
|
+
const e = ke(this.node.id, t);
|
|
1152
1152
|
e ? (this.event.key = e.key, this.event.names = e.names, this.event.from = e.from, this.event.params = e.params) : (this.event.key = "", this.event.names = [], this.event.from = "regular", this.event.params = []), this.updateShape_(), setTimeout(() => {
|
|
1153
1153
|
this.ensureBlocks_();
|
|
1154
1154
|
}, 0);
|
|
@@ -1170,7 +1170,7 @@ const gi = {
|
|
|
1170
1170
|
ensureBlocks_: function() {
|
|
1171
1171
|
if (this.isInsertionMarker())
|
|
1172
1172
|
return;
|
|
1173
|
-
const t =
|
|
1173
|
+
const t = hi(this.event.from), e = [];
|
|
1174
1174
|
this.event.from === "multipleRef" && e.push(["REF_KEY", "refKey", "x-runtime-lib.refKey", t]), this.event.params.forEach(({ key: n, name: o }, i) => {
|
|
1175
1175
|
e.push(["PARAM" + i, n, o, t]);
|
|
1176
1176
|
}), e.length > 0 && F(this, e);
|
|
@@ -1186,7 +1186,7 @@ const gi = {
|
|
|
1186
1186
|
return;
|
|
1187
1187
|
}
|
|
1188
1188
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
1189
|
-
const e =
|
|
1189
|
+
const e = ke(this.node.id, this.event.key);
|
|
1190
1190
|
if (!e) {
|
|
1191
1191
|
this.setWarningText(p("WARN_EVENT_NOT_FOUND"));
|
|
1192
1192
|
return;
|
|
@@ -1198,7 +1198,7 @@ const gi = {
|
|
|
1198
1198
|
this.setWarningText(null);
|
|
1199
1199
|
}
|
|
1200
1200
|
};
|
|
1201
|
-
d.on_app_event_v1 =
|
|
1201
|
+
d.on_app_event_v1 = Ei;
|
|
1202
1202
|
s.forBlock.on_app_event_v1 = function(t) {
|
|
1203
1203
|
const e = s.quote_, n = t;
|
|
1204
1204
|
let o = "";
|
|
@@ -1212,7 +1212,7 @@ s.forBlock.on_app_event_v1 = function(t) {
|
|
|
1212
1212
|
${a}});
|
|
1213
1213
|
`;
|
|
1214
1214
|
};
|
|
1215
|
-
const
|
|
1215
|
+
const gi = {
|
|
1216
1216
|
init: function() {
|
|
1217
1217
|
this.event = {
|
|
1218
1218
|
key: "",
|
|
@@ -1224,7 +1224,7 @@ const Ai = {
|
|
|
1224
1224
|
initData_: function() {
|
|
1225
1225
|
if (this.event.key)
|
|
1226
1226
|
return;
|
|
1227
|
-
const t =
|
|
1227
|
+
const t = Vn()?.[0];
|
|
1228
1228
|
if (!t)
|
|
1229
1229
|
return;
|
|
1230
1230
|
this.event.key = t.key, this.event.names = t.names, this.event.from = t.from, this.event.params = t.params;
|
|
@@ -1242,7 +1242,7 @@ const Ai = {
|
|
|
1242
1242
|
}, 0);
|
|
1243
1243
|
},
|
|
1244
1244
|
genEventOpts_: function() {
|
|
1245
|
-
return
|
|
1245
|
+
return fi();
|
|
1246
1246
|
},
|
|
1247
1247
|
onchange: function(t) {
|
|
1248
1248
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -1255,7 +1255,7 @@ const Ai = {
|
|
|
1255
1255
|
}
|
|
1256
1256
|
},
|
|
1257
1257
|
onEventChange_: function(t) {
|
|
1258
|
-
const e =
|
|
1258
|
+
const e = pn(t);
|
|
1259
1259
|
e ? (this.event.key = e.key, this.event.names = e.names, this.event.from = e.from, this.event.params = e.params) : (this.event.key = "", this.event.names = [], this.event.from = "regular", this.event.params = []);
|
|
1260
1260
|
},
|
|
1261
1261
|
updateShape_: function() {
|
|
@@ -1282,7 +1282,7 @@ const Ai = {
|
|
|
1282
1282
|
}
|
|
1283
1283
|
},
|
|
1284
1284
|
checkWarning_: function() {
|
|
1285
|
-
const t =
|
|
1285
|
+
const t = pn(this.event.key);
|
|
1286
1286
|
if (!t) {
|
|
1287
1287
|
this.setWarningText(p("WARN_EVENT_NOT_FOUND"));
|
|
1288
1288
|
return;
|
|
@@ -1294,7 +1294,7 @@ const Ai = {
|
|
|
1294
1294
|
this.setWarningText(null);
|
|
1295
1295
|
}
|
|
1296
1296
|
};
|
|
1297
|
-
d.trigger_app_event_v1 =
|
|
1297
|
+
d.trigger_app_event_v1 = gi;
|
|
1298
1298
|
s.forBlock.trigger_app_event_v1 = function(t) {
|
|
1299
1299
|
const e = s.quote_, n = t;
|
|
1300
1300
|
let o = "";
|
|
@@ -1320,7 +1320,7 @@ h([
|
|
|
1320
1320
|
}
|
|
1321
1321
|
]);
|
|
1322
1322
|
s.forBlock.watch_effect_v1 = function(t) {
|
|
1323
|
-
const e =
|
|
1323
|
+
const e = vo(t.id), n = s.statementToCode(t, "HANDLE");
|
|
1324
1324
|
return `function __watchEffect$${e}__() {
|
|
1325
1325
|
${n}};
|
|
1326
1326
|
`;
|
|
@@ -1346,7 +1346,7 @@ s.forBlock.app_debug_trace_v1 = function(t) {
|
|
|
1346
1346
|
return `__debugTraceV1__(${s.valueToCode(t, "OBJECT", c.NONE)});
|
|
1347
1347
|
`;
|
|
1348
1348
|
};
|
|
1349
|
-
const
|
|
1349
|
+
const Ai = {
|
|
1350
1350
|
init: function() {
|
|
1351
1351
|
this.appendDummyInput().appendField("%{BKY_APP_V1_OPEN_CONFIRM_DLG_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_APP_V1_OPEN_CONFIRM_DLG_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_OPEN_CONFIRM_DLG_HELPURL}");
|
|
1352
1352
|
},
|
|
@@ -1375,7 +1375,7 @@ const Ii = {
|
|
|
1375
1375
|
]);
|
|
1376
1376
|
}
|
|
1377
1377
|
};
|
|
1378
|
-
d.open_confirm_dlg_v1 =
|
|
1378
|
+
d.open_confirm_dlg_v1 = Ai;
|
|
1379
1379
|
s.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
1380
1380
|
const e = s.valueToCode(t, "TITLE", c.ATOMIC), n = s.valueToCode(t, "TEXT", c.ATOMIC), o = s.statementToCode(t, "HANDLE");
|
|
1381
1381
|
return `{
|
|
@@ -1383,7 +1383,7 @@ s.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
|
1383
1383
|
${o}}
|
|
1384
1384
|
`;
|
|
1385
1385
|
};
|
|
1386
|
-
const
|
|
1386
|
+
const Ii = {
|
|
1387
1387
|
init: function() {
|
|
1388
1388
|
this.appendDummyInput().appendField("%{BKY_APP_V1_OPEN_PROMPT_DLG_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_APP_V1_OPEN_PROMPT_DLG_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_OPEN_PROMPT_DLG_HELPURL}");
|
|
1389
1389
|
},
|
|
@@ -1414,7 +1414,7 @@ const Oi = {
|
|
|
1414
1414
|
]);
|
|
1415
1415
|
}
|
|
1416
1416
|
};
|
|
1417
|
-
d.open_prompt_dlg_v1 =
|
|
1417
|
+
d.open_prompt_dlg_v1 = Ii;
|
|
1418
1418
|
s.forBlock.open_prompt_dlg_v1 = function(t) {
|
|
1419
1419
|
const e = s.valueToCode(t, "TITLE", c.ATOMIC), n = s.valueToCode(t, "LABEL", c.ATOMIC), o = s.valueToCode(t, "VALUE", c.ATOMIC), i = s.statementToCode(t, "HANDLE");
|
|
1420
1420
|
return `{
|
|
@@ -1454,7 +1454,7 @@ s.forBlock.popup_message_v1 = function(t) {
|
|
|
1454
1454
|
return `__messageV1__(${e}, ${n});
|
|
1455
1455
|
`;
|
|
1456
1456
|
};
|
|
1457
|
-
const
|
|
1457
|
+
const Oi = {
|
|
1458
1458
|
init: function() {
|
|
1459
1459
|
this.node = {
|
|
1460
1460
|
id: "",
|
|
@@ -1471,13 +1471,13 @@ const vi = {
|
|
|
1471
1471
|
initData_: function() {
|
|
1472
1472
|
if (this.node.id)
|
|
1473
1473
|
return;
|
|
1474
|
-
const t =
|
|
1474
|
+
const t = Ft("callMethod")?.[0];
|
|
1475
1475
|
if (!t)
|
|
1476
1476
|
return;
|
|
1477
1477
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
1478
1478
|
const e = this.getField("NODE");
|
|
1479
1479
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
1480
|
-
const n =
|
|
1480
|
+
const n = xe(this.node.id)?.[0];
|
|
1481
1481
|
if (!n)
|
|
1482
1482
|
return;
|
|
1483
1483
|
this.method.key = n.key, this.method.names = n.names, this.method.from = n.from, this.method.inputs = n.inputs, this.method.outputs = n.outputs;
|
|
@@ -1496,10 +1496,10 @@ const vi = {
|
|
|
1496
1496
|
}, 0);
|
|
1497
1497
|
},
|
|
1498
1498
|
genNodeOpts_: function() {
|
|
1499
|
-
return
|
|
1499
|
+
return _e("callMethod");
|
|
1500
1500
|
},
|
|
1501
1501
|
genMethodOpts_: function() {
|
|
1502
|
-
return
|
|
1502
|
+
return mi(this.node.id);
|
|
1503
1503
|
},
|
|
1504
1504
|
onchange: function(t) {
|
|
1505
1505
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -1520,14 +1520,14 @@ const vi = {
|
|
|
1520
1520
|
const n = this.node.key !== e.key;
|
|
1521
1521
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
1522
1522
|
const o = this.getField("METHOD");
|
|
1523
|
-
if (o.getOptions(!1), n || !
|
|
1524
|
-
const i =
|
|
1523
|
+
if (o.getOptions(!1), n || !Ne(this.node.id, this.method.key)) {
|
|
1524
|
+
const i = xe(this.node.id)?.[0];
|
|
1525
1525
|
o.setValue(i?.key ?? "");
|
|
1526
1526
|
}
|
|
1527
1527
|
this.onMethodChange_(o.getValue());
|
|
1528
1528
|
},
|
|
1529
1529
|
onMethodChange_: function(t) {
|
|
1530
|
-
const e =
|
|
1530
|
+
const e = Ne(this.node.id, t);
|
|
1531
1531
|
e ? (this.method.key = e.key, this.method.names = e.names, this.method.from = e.from, this.method.inputs = e.inputs, this.method.outputs = e.outputs) : (this.method.key = "", this.method.names = [], this.method.from = "regular", this.method.inputs = [], this.method.outputs = []), this.updateShape_(), this.updateShadow_(), setTimeout(() => {
|
|
1532
1532
|
this.ensureBlocks_();
|
|
1533
1533
|
}, 0);
|
|
@@ -1548,7 +1548,7 @@ const vi = {
|
|
|
1548
1548
|
this.removeInput("INPUT" + t);
|
|
1549
1549
|
for (let t = 0; t < this.method.inputs.length; t++) {
|
|
1550
1550
|
const e = this.method.inputs[t];
|
|
1551
|
-
this.getInput("INPUT" + t) || (this.appendValueInput("INPUT" + t).setAlign(v.Align.RIGHT).appendField(
|
|
1551
|
+
this.getInput("INPUT" + t) || (this.appendValueInput("INPUT" + t).setAlign(v.Align.RIGHT).appendField(In[e.name]), this.method.outputs.length > 0 && this.moveInputBefore("INPUT" + t, "OUTPUT0"));
|
|
1552
1552
|
}
|
|
1553
1553
|
if (this.method.from === "multipleRef")
|
|
1554
1554
|
this.getInput("REF_KEY") || this.appendValueInput("REF_KEY"), this.method.inputs.length > 0 ? this.moveInputBefore("REF_KEY", "INPUT0") : this.method.outputs.length > 0 && this.moveInputBefore("REF_KEY", "OUTPUT0");
|
|
@@ -1570,7 +1570,7 @@ const vi = {
|
|
|
1570
1570
|
ensureBlocks_: function() {
|
|
1571
1571
|
if (this.isInsertionMarker())
|
|
1572
1572
|
return;
|
|
1573
|
-
const t =
|
|
1573
|
+
const t = xn(this.method.from), e = [];
|
|
1574
1574
|
for (let n = 0; n < this.method.outputs.length; n++) {
|
|
1575
1575
|
const { key: o, name: i } = this.method.outputs[n];
|
|
1576
1576
|
e.push(["OUTPUT" + n, o, i, t]);
|
|
@@ -1588,7 +1588,7 @@ const vi = {
|
|
|
1588
1588
|
return;
|
|
1589
1589
|
}
|
|
1590
1590
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
1591
|
-
const e =
|
|
1591
|
+
const e = Ne(this.node.id, this.method.key);
|
|
1592
1592
|
if (!e) {
|
|
1593
1593
|
this.setWarningText(p("WARN_METHOD_NOT_FOUND"));
|
|
1594
1594
|
return;
|
|
@@ -1604,7 +1604,7 @@ const vi = {
|
|
|
1604
1604
|
this.setWarningText(null);
|
|
1605
1605
|
}
|
|
1606
1606
|
};
|
|
1607
|
-
d.call_app_method_v1 =
|
|
1607
|
+
d.call_app_method_v1 = Oi;
|
|
1608
1608
|
s.forBlock.call_app_method_v1 = function(t) {
|
|
1609
1609
|
const e = s.quote_, n = t;
|
|
1610
1610
|
let o = n.node.id;
|
|
@@ -1620,7 +1620,7 @@ s.forBlock.call_app_method_v1 = function(t) {
|
|
|
1620
1620
|
return `__callMethodV1__(${e(o)}, ${e(i)});
|
|
1621
1621
|
`;
|
|
1622
1622
|
};
|
|
1623
|
-
const
|
|
1623
|
+
const vi = {
|
|
1624
1624
|
init: function() {
|
|
1625
1625
|
this.method = {
|
|
1626
1626
|
key: "",
|
|
@@ -1630,7 +1630,7 @@ const Ci = {
|
|
|
1630
1630
|
}, this.appendDummyInput().appendField("%{BKY_APP_V1_IMPL_APP_METHOD_TITLE}").appendField(new I(() => this.genMethodOpts_()), "METHOD"), this.appendStatementInput("HANDLE").appendField("%{BKY_APP_DO}"), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_APP_V1_IMPL_APP_METHOD_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_IMPL_APP_METHOD_HELPURL}"), this.initData_();
|
|
1631
1631
|
},
|
|
1632
1632
|
initData_: function() {
|
|
1633
|
-
const t =
|
|
1633
|
+
const t = je()?.[0];
|
|
1634
1634
|
if (!t)
|
|
1635
1635
|
return;
|
|
1636
1636
|
this.method.key = t.key, this.method.names = t.names, this.method.from = t.from, this.method.inputs = t.inputs;
|
|
@@ -1648,7 +1648,7 @@ const Ci = {
|
|
|
1648
1648
|
}, 0);
|
|
1649
1649
|
},
|
|
1650
1650
|
genMethodOpts_: function() {
|
|
1651
|
-
return
|
|
1651
|
+
return Fn();
|
|
1652
1652
|
},
|
|
1653
1653
|
onchange: function(t) {
|
|
1654
1654
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -1661,7 +1661,7 @@ const Ci = {
|
|
|
1661
1661
|
}
|
|
1662
1662
|
},
|
|
1663
1663
|
onMethodChange_: function(t) {
|
|
1664
|
-
const e =
|
|
1664
|
+
const e = yt(t);
|
|
1665
1665
|
e ? (this.method.key = e.key, this.method.names = e.names, this.method.from = e.from, this.method.inputs = e.inputs) : (this.method.key = "", this.method.names = [], this.method.from = "regular", this.method.inputs = []), this.updateShape_(), setTimeout(() => {
|
|
1666
1666
|
this.ensureBlocks_();
|
|
1667
1667
|
}, 0);
|
|
@@ -1677,7 +1677,7 @@ const Ci = {
|
|
|
1677
1677
|
ensureBlocks_: function() {
|
|
1678
1678
|
if (this.isInsertionMarker())
|
|
1679
1679
|
return;
|
|
1680
|
-
const t =
|
|
1680
|
+
const t = xn(this.method.from), e = [];
|
|
1681
1681
|
for (let n = 0; n < this.method.inputs.length; n++) {
|
|
1682
1682
|
const { key: o, name: i } = this.method.inputs[n];
|
|
1683
1683
|
e.push(["INPUT" + n, o, i, t]);
|
|
@@ -1685,7 +1685,7 @@ const Ci = {
|
|
|
1685
1685
|
F(this, e);
|
|
1686
1686
|
},
|
|
1687
1687
|
checkWarning_: function() {
|
|
1688
|
-
const t =
|
|
1688
|
+
const t = yt(this.method.key);
|
|
1689
1689
|
if (!t) {
|
|
1690
1690
|
this.setWarningText(p("WARN_METHOD_NOT_FOUND"));
|
|
1691
1691
|
return;
|
|
@@ -1697,14 +1697,14 @@ const Ci = {
|
|
|
1697
1697
|
this.setWarningText(null);
|
|
1698
1698
|
}
|
|
1699
1699
|
};
|
|
1700
|
-
d.impl_app_method_v1 =
|
|
1700
|
+
d.impl_app_method_v1 = vi;
|
|
1701
1701
|
s.forBlock.impl_app_method_v1 = function(t) {
|
|
1702
1702
|
const e = t;
|
|
1703
1703
|
return `{
|
|
1704
1704
|
${s.statementToCode(e, "HANDLE")}}
|
|
1705
1705
|
`;
|
|
1706
1706
|
};
|
|
1707
|
-
const
|
|
1707
|
+
const Ci = {
|
|
1708
1708
|
init: function() {
|
|
1709
1709
|
this.method = {
|
|
1710
1710
|
key: "",
|
|
@@ -1719,13 +1719,13 @@ const yi = {
|
|
|
1719
1719
|
initData_: function() {
|
|
1720
1720
|
if (this.method.key)
|
|
1721
1721
|
return;
|
|
1722
|
-
const t =
|
|
1722
|
+
const t = je()?.[0];
|
|
1723
1723
|
if (!t)
|
|
1724
1724
|
return;
|
|
1725
1725
|
this.method.key = t.key, this.method.names = t.names, this.method.from = t.from;
|
|
1726
1726
|
const e = this.getField("METHOD");
|
|
1727
1727
|
e.getOptions(!1), e.setValue(this.method.key);
|
|
1728
|
-
const n =
|
|
1728
|
+
const n = Fe(this.method.key)?.[0];
|
|
1729
1729
|
if (!n)
|
|
1730
1730
|
return;
|
|
1731
1731
|
this.output.key = n.key, this.output.name = n.name, this.output.type = n.type;
|
|
@@ -1743,10 +1743,10 @@ const yi = {
|
|
|
1743
1743
|
}, 0);
|
|
1744
1744
|
},
|
|
1745
1745
|
genMethodOpts_: function() {
|
|
1746
|
-
return
|
|
1746
|
+
return Fn();
|
|
1747
1747
|
},
|
|
1748
1748
|
genOutputOpts_: function() {
|
|
1749
|
-
return
|
|
1749
|
+
return Ti(this.method.key);
|
|
1750
1750
|
},
|
|
1751
1751
|
onchange: function(t) {
|
|
1752
1752
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -1759,7 +1759,7 @@ const yi = {
|
|
|
1759
1759
|
}
|
|
1760
1760
|
},
|
|
1761
1761
|
onMethodChange_: function(t) {
|
|
1762
|
-
const e =
|
|
1762
|
+
const e = yt(t);
|
|
1763
1763
|
if (!e) {
|
|
1764
1764
|
console.assert(!1);
|
|
1765
1765
|
return;
|
|
@@ -1767,14 +1767,14 @@ const yi = {
|
|
|
1767
1767
|
const n = this.method.key !== e.key;
|
|
1768
1768
|
this.method.key = e.key, this.method.names = e.names, this.method.from = e.from;
|
|
1769
1769
|
const o = this.getField("OUTPUT");
|
|
1770
|
-
if (o.getOptions(!1), n || !
|
|
1771
|
-
const i =
|
|
1770
|
+
if (o.getOptions(!1), n || !Le(this.method.key, this.output.key)) {
|
|
1771
|
+
const i = Fe(this.method.key)?.[0];
|
|
1772
1772
|
o.setValue(i?.key ?? "");
|
|
1773
1773
|
}
|
|
1774
1774
|
this.onOutputChange_(o.getValue());
|
|
1775
1775
|
},
|
|
1776
1776
|
onOutputChange_: function(t) {
|
|
1777
|
-
const e =
|
|
1777
|
+
const e = Le(this.method.key, t);
|
|
1778
1778
|
e ? (this.output.key = e.key, this.output.name = e.name, this.output.type = e.type) : (this.output.key = "", this.output.name = "", this.output.type = "string");
|
|
1779
1779
|
},
|
|
1780
1780
|
updateShape_: function() {
|
|
@@ -1792,13 +1792,13 @@ const yi = {
|
|
|
1792
1792
|
this.getInput("VALUE").connection.setShadowDom(t);
|
|
1793
1793
|
},
|
|
1794
1794
|
checkWarning_: function() {
|
|
1795
|
-
const t =
|
|
1795
|
+
const t = yt(this.method.key);
|
|
1796
1796
|
if (!t) {
|
|
1797
1797
|
this.setWarningText(p("WARN_METHOD_NOT_FOUND"));
|
|
1798
1798
|
return;
|
|
1799
1799
|
}
|
|
1800
1800
|
t.names !== this.method.names && (this.method.names = t.names);
|
|
1801
|
-
const e =
|
|
1801
|
+
const e = Le(this.method.key, this.output.key);
|
|
1802
1802
|
if (!e) {
|
|
1803
1803
|
this.setWarningText(p("WARN_OUTPUT_NOT_FOUND"));
|
|
1804
1804
|
return;
|
|
@@ -1810,7 +1810,7 @@ const yi = {
|
|
|
1810
1810
|
this.setWarningText(null);
|
|
1811
1811
|
}
|
|
1812
1812
|
};
|
|
1813
|
-
d.set_app_method_output_v1 =
|
|
1813
|
+
d.set_app_method_output_v1 = Ci;
|
|
1814
1814
|
s.forBlock.set_app_method_output_v1 = function(t) {
|
|
1815
1815
|
const e = t;
|
|
1816
1816
|
let n = s.valueToCode(e, "VALUE", c.ATOMIC);
|
|
@@ -1860,7 +1860,7 @@ h([
|
|
|
1860
1860
|
s.forBlock.app_env_is_v1 = function(t) {
|
|
1861
1861
|
return [`__getEnvV1__() === ${s.quote_(t.getFieldValue("ENV"))}`, c.ATOMIC];
|
|
1862
1862
|
};
|
|
1863
|
-
const
|
|
1863
|
+
const yi = {
|
|
1864
1864
|
init: function() {
|
|
1865
1865
|
this.app = {
|
|
1866
1866
|
id: "",
|
|
@@ -1873,13 +1873,13 @@ const ki = {
|
|
|
1873
1873
|
initData_: function() {
|
|
1874
1874
|
if (this.app.id)
|
|
1875
1875
|
return;
|
|
1876
|
-
const t =
|
|
1876
|
+
const t = Dn()?.[0];
|
|
1877
1877
|
if (!t)
|
|
1878
1878
|
return;
|
|
1879
1879
|
this.app.id = t.id, this.app.name = t.name;
|
|
1880
1880
|
const e = this.getField("APP");
|
|
1881
1881
|
e.getOptions(!1), e.setValue(this.app.id);
|
|
1882
|
-
const n =
|
|
1882
|
+
const n = Ue(this.app.id)?.[0];
|
|
1883
1883
|
if (!n)
|
|
1884
1884
|
return;
|
|
1885
1885
|
this.page.id = n.id, this.page.name = n.name;
|
|
@@ -1898,10 +1898,10 @@ const ki = {
|
|
|
1898
1898
|
}, 0);
|
|
1899
1899
|
},
|
|
1900
1900
|
genAppOpts_: function() {
|
|
1901
|
-
return
|
|
1901
|
+
return li();
|
|
1902
1902
|
},
|
|
1903
1903
|
genPageOpts_: function() {
|
|
1904
|
-
return
|
|
1904
|
+
return _i(this.app.id);
|
|
1905
1905
|
},
|
|
1906
1906
|
onchange: function(t) {
|
|
1907
1907
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -1914,7 +1914,7 @@ const ki = {
|
|
|
1914
1914
|
}
|
|
1915
1915
|
},
|
|
1916
1916
|
onAppChange_: function(t) {
|
|
1917
|
-
const e =
|
|
1917
|
+
const e = ln(t);
|
|
1918
1918
|
if (!e) {
|
|
1919
1919
|
console.assert(!1);
|
|
1920
1920
|
return;
|
|
@@ -1922,23 +1922,23 @@ const ki = {
|
|
|
1922
1922
|
const n = this.app.id !== e.id;
|
|
1923
1923
|
this.app.id = e.id, this.app.name = e.name;
|
|
1924
1924
|
const o = this.getField("PAGE");
|
|
1925
|
-
if (o.getOptions(!1), n || !
|
|
1926
|
-
const a =
|
|
1925
|
+
if (o.getOptions(!1), n || !ye(this.app.id, this.page.id)) {
|
|
1926
|
+
const a = Ue(this.app.id)?.[0]?.id ?? "";
|
|
1927
1927
|
o.setValue(a), this.page.id === a && this.onPageChange_(a);
|
|
1928
1928
|
}
|
|
1929
1929
|
},
|
|
1930
1930
|
onPageChange_: function(t) {
|
|
1931
|
-
const e =
|
|
1931
|
+
const e = ye(this.app.id, t);
|
|
1932
1932
|
e ? (this.page.id = e.id, this.page.name = e.name) : (this.page.id = "", this.page.name = "");
|
|
1933
1933
|
},
|
|
1934
1934
|
checkWarning_: function() {
|
|
1935
|
-
const t =
|
|
1935
|
+
const t = ln(this.app.id);
|
|
1936
1936
|
if (!t) {
|
|
1937
1937
|
this.setWarningText(p("WARN_APP_NOT_FOUND"));
|
|
1938
1938
|
return;
|
|
1939
1939
|
}
|
|
1940
1940
|
t.name !== this.app.name && (this.app.name = t.name);
|
|
1941
|
-
const e =
|
|
1941
|
+
const e = ye(this.app.id, this.page.id);
|
|
1942
1942
|
if (!e) {
|
|
1943
1943
|
this.setWarningText(p("WARN_PAGE_NOT_FOUND"));
|
|
1944
1944
|
return;
|
|
@@ -1946,13 +1946,13 @@ const ki = {
|
|
|
1946
1946
|
e.name !== this.page.name && (this.page.name = e.name), this.setWarningText(null);
|
|
1947
1947
|
}
|
|
1948
1948
|
};
|
|
1949
|
-
d.navigate_to_v1 =
|
|
1949
|
+
d.navigate_to_v1 = yi;
|
|
1950
1950
|
s.forBlock.navigate_to_v1 = function(t) {
|
|
1951
1951
|
const e = t, n = s.quote_(e.app.id), o = s.quote_(e.page.id);
|
|
1952
1952
|
return `__navigateToV1__(${n}, ${o});
|
|
1953
1953
|
`;
|
|
1954
1954
|
};
|
|
1955
|
-
const
|
|
1955
|
+
const ki = {
|
|
1956
1956
|
init: function() {
|
|
1957
1957
|
this.comp = {
|
|
1958
1958
|
id: void 0,
|
|
@@ -1962,7 +1962,7 @@ const Ni = {
|
|
|
1962
1962
|
initData_: function() {
|
|
1963
1963
|
if (this.comp.id !== void 0)
|
|
1964
1964
|
return;
|
|
1965
|
-
const t =
|
|
1965
|
+
const t = Un()?.[0];
|
|
1966
1966
|
if (!t)
|
|
1967
1967
|
return;
|
|
1968
1968
|
this.comp.id = t.id, this.comp.name = t.name;
|
|
@@ -1980,7 +1980,7 @@ const Ni = {
|
|
|
1980
1980
|
}, 0);
|
|
1981
1981
|
},
|
|
1982
1982
|
genCompOpts_: function() {
|
|
1983
|
-
return
|
|
1983
|
+
return pi();
|
|
1984
1984
|
},
|
|
1985
1985
|
onchange: function(t) {
|
|
1986
1986
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -1993,7 +1993,7 @@ const Ni = {
|
|
|
1993
1993
|
}
|
|
1994
1994
|
},
|
|
1995
1995
|
onCompChange_: function(t) {
|
|
1996
|
-
const e =
|
|
1996
|
+
const e = _n(t);
|
|
1997
1997
|
if (!e) {
|
|
1998
1998
|
console.assert(!1);
|
|
1999
1999
|
return;
|
|
@@ -2005,19 +2005,19 @@ const Ni = {
|
|
|
2005
2005
|
this.setWarningText(p("WARN_COMP_NOT_FOUND"));
|
|
2006
2006
|
return;
|
|
2007
2007
|
}
|
|
2008
|
-
if (!
|
|
2008
|
+
if (!_n(this.comp.id)) {
|
|
2009
2009
|
this.setWarningText(p("WARN_COMP_NOT_FOUND"));
|
|
2010
2010
|
return;
|
|
2011
2011
|
}
|
|
2012
2012
|
this.setWarningText(null);
|
|
2013
2013
|
}
|
|
2014
2014
|
};
|
|
2015
|
-
d.select_comp_v1 =
|
|
2015
|
+
d.select_comp_v1 = ki;
|
|
2016
2016
|
s.forBlock.select_comp_v1 = function(t) {
|
|
2017
2017
|
const e = s.quote_, o = t.comp.id ?? "";
|
|
2018
2018
|
return [e(o), c.ATOMIC];
|
|
2019
2019
|
};
|
|
2020
|
-
const
|
|
2020
|
+
const Ni = {
|
|
2021
2021
|
init: function() {
|
|
2022
2022
|
this.node = {
|
|
2023
2023
|
id: "",
|
|
@@ -2032,13 +2032,13 @@ const Li = {
|
|
|
2032
2032
|
initData_: function() {
|
|
2033
2033
|
if (this.node.id)
|
|
2034
2034
|
return;
|
|
2035
|
-
const t =
|
|
2035
|
+
const t = Ft("getProp")?.[0];
|
|
2036
2036
|
if (!t)
|
|
2037
2037
|
return;
|
|
2038
2038
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2039
2039
|
const e = this.getField("NODE");
|
|
2040
2040
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
2041
|
-
const n =
|
|
2041
|
+
const n = Dt(this.node.id, "read")?.[0];
|
|
2042
2042
|
if (!n)
|
|
2043
2043
|
return;
|
|
2044
2044
|
this.prop.key = n.key, this.prop.names = n.names, this.prop.from = n.meta.from;
|
|
@@ -2057,10 +2057,10 @@ const Li = {
|
|
|
2057
2057
|
}, 0);
|
|
2058
2058
|
},
|
|
2059
2059
|
genNodeOpts_: function() {
|
|
2060
|
-
return
|
|
2060
|
+
return _e("getProp");
|
|
2061
2061
|
},
|
|
2062
2062
|
genPropOpts_: function() {
|
|
2063
|
-
return
|
|
2063
|
+
return wn(this.node.id, "read");
|
|
2064
2064
|
},
|
|
2065
2065
|
onchange: function(t) {
|
|
2066
2066
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -2081,14 +2081,14 @@ const Li = {
|
|
|
2081
2081
|
const n = this.node.key !== e.key;
|
|
2082
2082
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2083
2083
|
const o = this.getField("PROP");
|
|
2084
|
-
if (o.getOptions(!1), n || !
|
|
2085
|
-
const i =
|
|
2084
|
+
if (o.getOptions(!1), n || !Et(this.node.id, this.prop.key)) {
|
|
2085
|
+
const i = Dt(this.node.id, "read")?.[0];
|
|
2086
2086
|
o.setValue(i?.key ?? "");
|
|
2087
2087
|
}
|
|
2088
2088
|
this.onPropChange_(o.getValue());
|
|
2089
2089
|
},
|
|
2090
2090
|
onPropChange_: function(t) {
|
|
2091
|
-
const e =
|
|
2091
|
+
const e = Et(this.node.id, t);
|
|
2092
2092
|
e ? (this.prop.key = e.key, this.prop.names = e.names, this.prop.from = e.meta.from) : (this.prop.key = "", this.prop.names = [], this.prop.from = "regular");
|
|
2093
2093
|
},
|
|
2094
2094
|
checkWarning_: function() {
|
|
@@ -2102,7 +2102,7 @@ const Li = {
|
|
|
2102
2102
|
return;
|
|
2103
2103
|
}
|
|
2104
2104
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
2105
|
-
const e =
|
|
2105
|
+
const e = Et(this.node.id, this.prop.key);
|
|
2106
2106
|
if (!e) {
|
|
2107
2107
|
this.setWarningText(p("WARN_PROP_NOT_FOUND"));
|
|
2108
2108
|
return;
|
|
@@ -2110,7 +2110,7 @@ const Li = {
|
|
|
2110
2110
|
M(e.names, this.prop.names) || (this.prop.names = e.names), e.meta.from !== this.prop.from && (this.prop.from = e.meta.from), this.setWarningText(null);
|
|
2111
2111
|
}
|
|
2112
2112
|
};
|
|
2113
|
-
d.get_app_prop_v1 =
|
|
2113
|
+
d.get_app_prop_v1 = Ni;
|
|
2114
2114
|
s.forBlock.get_app_prop_v1 = function(t) {
|
|
2115
2115
|
const e = s.quote_, n = t;
|
|
2116
2116
|
if (n.prop.from === "regular") {
|
|
@@ -2118,7 +2118,7 @@ s.forBlock.get_app_prop_v1 = function(t) {
|
|
|
2118
2118
|
return [`__getPropV1__('elementProp', ${o}, ${i})`, c.ATOMIC];
|
|
2119
2119
|
} else return n.prop.from === "custom" ? [`__getPropV1__('customProp', ${e(n.prop.key)})`, c.ATOMIC] : n.prop.from === "slot" ? [`__getPropV1__('adaptSlotProp', ${e(n.prop.key)})`, c.ATOMIC] : "";
|
|
2120
2120
|
};
|
|
2121
|
-
const
|
|
2121
|
+
const Li = {
|
|
2122
2122
|
init: function() {
|
|
2123
2123
|
this.node = {
|
|
2124
2124
|
id: "",
|
|
@@ -2133,13 +2133,13 @@ const Si = {
|
|
|
2133
2133
|
initData_: function() {
|
|
2134
2134
|
if (this.node.id)
|
|
2135
2135
|
return;
|
|
2136
|
-
const t =
|
|
2136
|
+
const t = Ft("setProp")?.[0];
|
|
2137
2137
|
if (!t)
|
|
2138
2138
|
return;
|
|
2139
2139
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2140
2140
|
const e = this.getField("NODE");
|
|
2141
2141
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
2142
|
-
const n =
|
|
2142
|
+
const n = Dt(this.node.id, "write")?.[0];
|
|
2143
2143
|
if (!n)
|
|
2144
2144
|
return;
|
|
2145
2145
|
this.prop.key = n.key, this.prop.names = n.names, this.prop.from = n.meta.from;
|
|
@@ -2158,10 +2158,10 @@ const Si = {
|
|
|
2158
2158
|
}, 0);
|
|
2159
2159
|
},
|
|
2160
2160
|
genNodeOpts_: function() {
|
|
2161
|
-
return
|
|
2161
|
+
return _e("setProp");
|
|
2162
2162
|
},
|
|
2163
2163
|
genPropOpts_: function() {
|
|
2164
|
-
return
|
|
2164
|
+
return wn(this.node.id, "write");
|
|
2165
2165
|
},
|
|
2166
2166
|
onchange: function(t) {
|
|
2167
2167
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -2182,26 +2182,26 @@ const Si = {
|
|
|
2182
2182
|
const n = this.node.key !== e.key;
|
|
2183
2183
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2184
2184
|
const o = this.getField("PROP");
|
|
2185
|
-
if (o.getOptions(!1), n || !
|
|
2186
|
-
const i =
|
|
2185
|
+
if (o.getOptions(!1), n || !Et(this.node.id, this.prop.key)) {
|
|
2186
|
+
const i = Dt(this.node.id, "write")?.[0];
|
|
2187
2187
|
o.setValue(i?.key ?? "");
|
|
2188
2188
|
}
|
|
2189
2189
|
this.onPropChange_(o.getValue());
|
|
2190
2190
|
},
|
|
2191
2191
|
onPropChange_: function(t) {
|
|
2192
|
-
const e =
|
|
2192
|
+
const e = Et(this.node.id, t);
|
|
2193
2193
|
e ? (this.prop.key = e.key, this.prop.names = e.names, this.prop.from = e.meta.from) : (this.prop.key = "", this.prop.names = [], this.prop.from = "regular"), this.updateShadow_();
|
|
2194
2194
|
},
|
|
2195
2195
|
updateShadow_: function() {
|
|
2196
2196
|
if (this.isInsertionMarker())
|
|
2197
2197
|
return;
|
|
2198
|
-
const t =
|
|
2198
|
+
const t = Et(this.node.id, this.prop.key);
|
|
2199
2199
|
if (!t)
|
|
2200
2200
|
return;
|
|
2201
2201
|
this.getInput("VALUE").setShadowDom(null);
|
|
2202
2202
|
const e = this.getInput("VALUE").connection.targetBlock();
|
|
2203
2203
|
if (e && e.dispose(), t.meta.from === "regular") {
|
|
2204
|
-
const n =
|
|
2204
|
+
const n = jo(t.meta.raw), o = ti(t.meta.raw);
|
|
2205
2205
|
this.getInput("VALUE").setCheck(n).setShadowDom(o);
|
|
2206
2206
|
} else if (t.meta.from === "slot") {
|
|
2207
2207
|
const n = ot(t.meta.raw.type), o = it(t.meta.raw.type);
|
|
@@ -2223,7 +2223,7 @@ const Si = {
|
|
|
2223
2223
|
return;
|
|
2224
2224
|
}
|
|
2225
2225
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
2226
|
-
const e =
|
|
2226
|
+
const e = Et(this.node.id, this.prop.key);
|
|
2227
2227
|
if (!e) {
|
|
2228
2228
|
this.setWarningText(p("WARN_PROP_NOT_FOUND"));
|
|
2229
2229
|
return;
|
|
@@ -2231,7 +2231,7 @@ const Si = {
|
|
|
2231
2231
|
M(e.names, this.prop.names) || (this.prop.names = e.names), e.meta.from !== this.prop.from && (this.prop.from = e.meta.from), this.setWarningText(null);
|
|
2232
2232
|
}
|
|
2233
2233
|
};
|
|
2234
|
-
d.set_app_prop_v1 =
|
|
2234
|
+
d.set_app_prop_v1 = Li;
|
|
2235
2235
|
s.forBlock.set_app_prop_v1 = function(t) {
|
|
2236
2236
|
const e = s.quote_, n = t, o = s.valueToCode(n, "VALUE", c.NONE);
|
|
2237
2237
|
if (n.prop.from === "regular") {
|
|
@@ -2242,7 +2242,7 @@ s.forBlock.set_app_prop_v1 = function(t) {
|
|
|
2242
2242
|
` : n.prop.from === "slot" ? `__setPropV1__('adaptSlotProp', ${e(n.prop.key)}, ${o});
|
|
2243
2243
|
` : "";
|
|
2244
2244
|
};
|
|
2245
|
-
const
|
|
2245
|
+
const Si = {
|
|
2246
2246
|
init: function() {
|
|
2247
2247
|
this.state = {
|
|
2248
2248
|
id: "",
|
|
@@ -2264,10 +2264,10 @@ const Bi = {
|
|
|
2264
2264
|
}, 0);
|
|
2265
2265
|
},
|
|
2266
2266
|
genStateOpts_: function() {
|
|
2267
|
-
return
|
|
2267
|
+
return $n();
|
|
2268
2268
|
},
|
|
2269
2269
|
checkWarning_: function() {
|
|
2270
|
-
const t =
|
|
2270
|
+
const t = Ye(this.state.id);
|
|
2271
2271
|
if (!t) {
|
|
2272
2272
|
this.setWarningText(p("WARN_STATE_NOT_FOUND"));
|
|
2273
2273
|
return;
|
|
@@ -2279,11 +2279,11 @@ const Bi = {
|
|
|
2279
2279
|
this.setWarningText(null);
|
|
2280
2280
|
}
|
|
2281
2281
|
};
|
|
2282
|
-
d.get_app_state_v1 =
|
|
2282
|
+
d.get_app_state_v1 = Si;
|
|
2283
2283
|
s.forBlock.get_app_state_v1 = function() {
|
|
2284
2284
|
return ["__getStateV1__()", c.ATOMIC];
|
|
2285
2285
|
};
|
|
2286
|
-
const
|
|
2286
|
+
const Bi = {
|
|
2287
2287
|
init: function() {
|
|
2288
2288
|
this.state = {
|
|
2289
2289
|
id: "",
|
|
@@ -2294,7 +2294,7 @@ const bi = {
|
|
|
2294
2294
|
initData_: function() {
|
|
2295
2295
|
if (this.state.id)
|
|
2296
2296
|
return;
|
|
2297
|
-
const t =
|
|
2297
|
+
const t = Kn()?.[0];
|
|
2298
2298
|
if (!t)
|
|
2299
2299
|
return;
|
|
2300
2300
|
this.state.id = t.id, this.state.name = t.name, this.state.type = t.type;
|
|
@@ -2310,7 +2310,7 @@ const bi = {
|
|
|
2310
2310
|
this.state.id = t.state?.id ?? "", this.state.name = t.state?.name ?? "", this.state.type = t.state?.type ?? "string";
|
|
2311
2311
|
},
|
|
2312
2312
|
genStateOpts_: function() {
|
|
2313
|
-
return
|
|
2313
|
+
return $n();
|
|
2314
2314
|
},
|
|
2315
2315
|
onchange: function(t) {
|
|
2316
2316
|
if (t.type === O.BLOCK_CHANGE) {
|
|
@@ -2319,7 +2319,7 @@ const bi = {
|
|
|
2319
2319
|
}
|
|
2320
2320
|
},
|
|
2321
2321
|
onStateChange_: function(t) {
|
|
2322
|
-
const e =
|
|
2322
|
+
const e = Ye(t);
|
|
2323
2323
|
e ? (this.state.id = e.id, this.state.name = e.name, this.state.type = e.type) : (this.state.id = "", this.state.name = "", this.state.type = "string"), this.updateShadow_();
|
|
2324
2324
|
},
|
|
2325
2325
|
updateShadow_: function() {
|
|
@@ -2332,7 +2332,7 @@ const bi = {
|
|
|
2332
2332
|
this.getInput("VALUE").setCheck(e).setShadowDom(n);
|
|
2333
2333
|
},
|
|
2334
2334
|
checkWarning_: function() {
|
|
2335
|
-
const t =
|
|
2335
|
+
const t = Ye(this.state.id);
|
|
2336
2336
|
if (!t) {
|
|
2337
2337
|
this.setWarningText(p("WARN_STATE_NOT_FOUND"));
|
|
2338
2338
|
return;
|
|
@@ -2344,7 +2344,7 @@ const bi = {
|
|
|
2344
2344
|
this.setWarningText(null);
|
|
2345
2345
|
}
|
|
2346
2346
|
};
|
|
2347
|
-
d.set_app_state_v1 =
|
|
2347
|
+
d.set_app_state_v1 = Bi;
|
|
2348
2348
|
s.forBlock.set_app_state_v1 = function() {
|
|
2349
2349
|
return `__setStateV1__();
|
|
2350
2350
|
`;
|
|
@@ -3052,7 +3052,7 @@ function ${s.FUNCTION_NAME_PLACEHOLDER_}(r, g, b) {
|
|
|
3052
3052
|
`
|
|
3053
3053
|
)}(${e}, ${n}, ${o})`, c.FUNCTION_CALL];
|
|
3054
3054
|
};
|
|
3055
|
-
const
|
|
3055
|
+
const bi = C.xml, Pi = [
|
|
3056
3056
|
{
|
|
3057
3057
|
type: "add_data_v1",
|
|
3058
3058
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
@@ -3118,16 +3118,16 @@ const Pi = C.xml, Ri = [
|
|
|
3118
3118
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
3119
3119
|
}
|
|
3120
3120
|
];
|
|
3121
|
-
function
|
|
3122
|
-
const n =
|
|
3121
|
+
function Ri(t, e) {
|
|
3122
|
+
const n = Pi.find((o) => o.type === t);
|
|
3123
3123
|
return n ? !!(n.prefixInputs?.some((o) => e.startsWith(o)) || n.inputs?.some((o) => o === e)) : !1;
|
|
3124
3124
|
}
|
|
3125
|
-
const
|
|
3125
|
+
const Di = {
|
|
3126
3126
|
init: function() {
|
|
3127
3127
|
this.key = "", this.name = "", this.locale = !1, this.appendDummyInput().appendField("", "LABEL"), this.setOutput(!0), this.setColour(220);
|
|
3128
3128
|
},
|
|
3129
3129
|
mutationToDom: function() {
|
|
3130
|
-
const t =
|
|
3130
|
+
const t = bi.createElement("mutation");
|
|
3131
3131
|
return t.setAttribute("key", this.key), t.setAttribute("name", this.name), t.setAttribute("locale", this.locale ? "TRUE" : "FALSE"), t;
|
|
3132
3132
|
},
|
|
3133
3133
|
domToMutation: function(t) {
|
|
@@ -3156,12 +3156,12 @@ const Mi = {
|
|
|
3156
3156
|
},
|
|
3157
3157
|
tryDuplicate_: function(t) {
|
|
3158
3158
|
const e = this.workspace.getBlockById(t.oldParentId);
|
|
3159
|
-
if (e &&
|
|
3159
|
+
if (e && Ri(e.type, t.oldInputName))
|
|
3160
3160
|
try {
|
|
3161
3161
|
O.disable();
|
|
3162
3162
|
const n = e.getInput(t.oldInputName)?.connection;
|
|
3163
3163
|
if (n) {
|
|
3164
|
-
const o =
|
|
3164
|
+
const o = We(
|
|
3165
3165
|
this.workspace,
|
|
3166
3166
|
this.key,
|
|
3167
3167
|
this.name,
|
|
@@ -3181,63 +3181,63 @@ const Mi = {
|
|
|
3181
3181
|
this.setFieldValue(this.name, "LABEL");
|
|
3182
3182
|
}
|
|
3183
3183
|
};
|
|
3184
|
-
d.parameter_v1 =
|
|
3184
|
+
d.parameter_v1 = Di;
|
|
3185
3185
|
s.forBlock.parameter_v1 = function(t) {
|
|
3186
3186
|
return [t.key, c.ATOMIC];
|
|
3187
3187
|
};
|
|
3188
|
-
const
|
|
3188
|
+
const Mi = {
|
|
3189
3189
|
init: function() {
|
|
3190
3190
|
}
|
|
3191
3191
|
};
|
|
3192
|
-
d.on_flow_state_event_v1 =
|
|
3192
|
+
d.on_flow_state_event_v1 = Mi;
|
|
3193
3193
|
s.forBlock.on_flow_state_event_v1 = function() {
|
|
3194
3194
|
return `__onFlowStateEventV1__();
|
|
3195
3195
|
`;
|
|
3196
3196
|
};
|
|
3197
|
-
function
|
|
3197
|
+
function Mt(t) {
|
|
3198
3198
|
const e = f.compute.spaces.find((n) => n.id === t);
|
|
3199
3199
|
return e ? e.funcs : [];
|
|
3200
3200
|
}
|
|
3201
|
-
function
|
|
3201
|
+
function vt(t, e) {
|
|
3202
3202
|
const n = f.compute.spaces.find((o) => o.id === t);
|
|
3203
3203
|
if (n)
|
|
3204
3204
|
return n.funcs.find((o) => o.id === e);
|
|
3205
3205
|
}
|
|
3206
|
-
function
|
|
3206
|
+
function Hn(t) {
|
|
3207
3207
|
const e = [];
|
|
3208
|
-
return
|
|
3208
|
+
return Mt(t).forEach(({ id: o, name: i }) => {
|
|
3209
3209
|
e.push([i, o]);
|
|
3210
3210
|
}), k(e);
|
|
3211
3211
|
}
|
|
3212
|
-
function
|
|
3212
|
+
function we() {
|
|
3213
3213
|
return f.compute.activeFunc;
|
|
3214
3214
|
}
|
|
3215
|
-
function
|
|
3215
|
+
function hn(t) {
|
|
3216
3216
|
const { outputs: e } = f.compute.activeFunc;
|
|
3217
3217
|
return e.find((n) => n.id === t);
|
|
3218
3218
|
}
|
|
3219
|
-
function
|
|
3219
|
+
function Ui() {
|
|
3220
3220
|
const t = [], { outputs: e } = f.compute.activeFunc;
|
|
3221
3221
|
return e.forEach(({ id: n, name: o }) => {
|
|
3222
3222
|
t.push([o, n]);
|
|
3223
3223
|
}), k(t);
|
|
3224
3224
|
}
|
|
3225
|
-
function
|
|
3225
|
+
function Yt(t) {
|
|
3226
3226
|
const e = [];
|
|
3227
3227
|
return f.compute.spaces.forEach((n) => {
|
|
3228
3228
|
t === "func" && n.funcs.length > 0 && e.push(n), t === "flow" && n.flows.length > 0 && e.push(n);
|
|
3229
3229
|
}), e;
|
|
3230
3230
|
}
|
|
3231
|
-
function
|
|
3231
|
+
function Qt(t) {
|
|
3232
3232
|
return f.compute.spaces.find((e) => e.id === t);
|
|
3233
3233
|
}
|
|
3234
|
-
function
|
|
3234
|
+
function Gn(t) {
|
|
3235
3235
|
const e = [];
|
|
3236
|
-
return
|
|
3236
|
+
return Yt(t).forEach(({ id: o, name: i }) => {
|
|
3237
3237
|
e.push([i, o]);
|
|
3238
3238
|
}), k(e);
|
|
3239
3239
|
}
|
|
3240
|
-
const
|
|
3240
|
+
const Vi = {
|
|
3241
3241
|
init: function() {
|
|
3242
3242
|
this.space = {
|
|
3243
3243
|
id: "",
|
|
@@ -3252,13 +3252,13 @@ const xi = {
|
|
|
3252
3252
|
initData_: function() {
|
|
3253
3253
|
if (this.space.id)
|
|
3254
3254
|
return;
|
|
3255
|
-
const t =
|
|
3255
|
+
const t = Yt("func")?.[0];
|
|
3256
3256
|
if (!t)
|
|
3257
3257
|
return;
|
|
3258
3258
|
this.space.id = t.id, this.space.name = t.name;
|
|
3259
3259
|
const e = this.getField("SPACE");
|
|
3260
3260
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
3261
|
-
const n =
|
|
3261
|
+
const n = Mt(this.space.id)?.[0];
|
|
3262
3262
|
if (!n)
|
|
3263
3263
|
return;
|
|
3264
3264
|
this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
|
|
@@ -3277,10 +3277,10 @@ const xi = {
|
|
|
3277
3277
|
}, 0);
|
|
3278
3278
|
},
|
|
3279
3279
|
genSpaceOpts_: function() {
|
|
3280
|
-
return
|
|
3280
|
+
return Gn("func");
|
|
3281
3281
|
},
|
|
3282
3282
|
genFuncOpts_: function() {
|
|
3283
|
-
return
|
|
3283
|
+
return Hn(this.space.id);
|
|
3284
3284
|
},
|
|
3285
3285
|
onchange: function(t) {
|
|
3286
3286
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -3293,19 +3293,19 @@ const xi = {
|
|
|
3293
3293
|
}
|
|
3294
3294
|
},
|
|
3295
3295
|
onSpaceChange_: function(t) {
|
|
3296
|
-
const e =
|
|
3296
|
+
const e = Qt(t);
|
|
3297
3297
|
if (!e) {
|
|
3298
3298
|
console.assert(!1);
|
|
3299
3299
|
return;
|
|
3300
3300
|
}
|
|
3301
3301
|
let n = !1;
|
|
3302
|
-
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !
|
|
3303
|
-
const i =
|
|
3302
|
+
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !vt(this.space.id, this.func.id)) {
|
|
3303
|
+
const i = Mt(this.space.id)?.[0];
|
|
3304
3304
|
this.setFieldValue(i?.id ?? "", "FUNC");
|
|
3305
3305
|
}
|
|
3306
3306
|
},
|
|
3307
3307
|
onFuncChange_: function(t) {
|
|
3308
|
-
const e =
|
|
3308
|
+
const e = vt(this.space.id, t);
|
|
3309
3309
|
if (!e) {
|
|
3310
3310
|
console.assert(!1);
|
|
3311
3311
|
return;
|
|
@@ -3359,13 +3359,13 @@ const xi = {
|
|
|
3359
3359
|
F(this, t);
|
|
3360
3360
|
},
|
|
3361
3361
|
checkWarning_: function() {
|
|
3362
|
-
const t =
|
|
3362
|
+
const t = Qt(this.space.id);
|
|
3363
3363
|
if (!t) {
|
|
3364
3364
|
this.setWarningText(p("WARN_SPACE_NOT_FOUND"));
|
|
3365
3365
|
return;
|
|
3366
3366
|
}
|
|
3367
3367
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
3368
|
-
const e =
|
|
3368
|
+
const e = vt(this.space.id, this.func.id);
|
|
3369
3369
|
if (!e) {
|
|
3370
3370
|
this.setWarningText(p("WARN_FUNC_NOT_FOUND"));
|
|
3371
3371
|
return;
|
|
@@ -3381,24 +3381,24 @@ const xi = {
|
|
|
3381
3381
|
this.setWarningText(null);
|
|
3382
3382
|
}
|
|
3383
3383
|
};
|
|
3384
|
-
d.call_func_v1 =
|
|
3384
|
+
d.call_func_v1 = Vi;
|
|
3385
3385
|
s.forBlock.call_func_v1 = function(t) {
|
|
3386
3386
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3387
3387
|
let r = "";
|
|
3388
3388
|
r += `${e}var __inputs__ = {
|
|
3389
|
-
`, o.func.inputs.forEach(({ id:
|
|
3389
|
+
`, o.func.inputs.forEach(({ id: g }, m) => {
|
|
3390
3390
|
const y = s.valueToCode(
|
|
3391
3391
|
o,
|
|
3392
3392
|
"INPUT" + m,
|
|
3393
3393
|
c.ATOMIC
|
|
3394
3394
|
);
|
|
3395
|
-
r += `${e}${e}${n(
|
|
3395
|
+
r += `${e}${e}${n(g)}: ${y},
|
|
3396
3396
|
`;
|
|
3397
3397
|
}), r += `${e}};`;
|
|
3398
3398
|
const u = n(o.space.name + "/" + o.func.name);
|
|
3399
3399
|
let l = "";
|
|
3400
|
-
o.func.outputs.forEach(({ id:
|
|
3401
|
-
l += `${e}var __output_${
|
|
3400
|
+
o.func.outputs.forEach(({ id: g }) => {
|
|
3401
|
+
l += `${e}var __output_${g}__ = __result__[${n(g)}];
|
|
3402
3402
|
`;
|
|
3403
3403
|
});
|
|
3404
3404
|
const _ = s.statementToCode(o, "CALLBACK");
|
|
@@ -3408,7 +3408,7 @@ ${e}var __result__ = __callFuncV1__(${i},${a},__inputs__,__getEnvV1__(),${u});
|
|
|
3408
3408
|
${l}${_}}
|
|
3409
3409
|
`;
|
|
3410
3410
|
};
|
|
3411
|
-
const
|
|
3411
|
+
const xi = {
|
|
3412
3412
|
init: function() {
|
|
3413
3413
|
this.space = {
|
|
3414
3414
|
id: "",
|
|
@@ -3423,13 +3423,13 @@ const Fi = {
|
|
|
3423
3423
|
initData_: function() {
|
|
3424
3424
|
if (this.space.id)
|
|
3425
3425
|
return;
|
|
3426
|
-
const t =
|
|
3426
|
+
const t = Yt("func")?.[0];
|
|
3427
3427
|
if (!t)
|
|
3428
3428
|
return;
|
|
3429
3429
|
this.space.id = t.id, this.space.name = t.name;
|
|
3430
3430
|
const e = this.getField("SPACE");
|
|
3431
3431
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
3432
|
-
const n =
|
|
3432
|
+
const n = Mt(this.space.id)?.[0];
|
|
3433
3433
|
if (!n)
|
|
3434
3434
|
return;
|
|
3435
3435
|
this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
|
|
@@ -3448,10 +3448,10 @@ const Fi = {
|
|
|
3448
3448
|
}, 0);
|
|
3449
3449
|
},
|
|
3450
3450
|
genSpaceOpts_: function() {
|
|
3451
|
-
return
|
|
3451
|
+
return Gn("func");
|
|
3452
3452
|
},
|
|
3453
3453
|
genFuncOpts_: function() {
|
|
3454
|
-
return
|
|
3454
|
+
return Hn(this.space.id);
|
|
3455
3455
|
},
|
|
3456
3456
|
onchange: function(t) {
|
|
3457
3457
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -3464,19 +3464,19 @@ const Fi = {
|
|
|
3464
3464
|
}
|
|
3465
3465
|
},
|
|
3466
3466
|
onSpaceChange_: function(t) {
|
|
3467
|
-
const e =
|
|
3467
|
+
const e = Qt(t);
|
|
3468
3468
|
if (!e) {
|
|
3469
3469
|
console.assert(!1);
|
|
3470
3470
|
return;
|
|
3471
3471
|
}
|
|
3472
3472
|
let n = !1;
|
|
3473
|
-
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !
|
|
3474
|
-
const i =
|
|
3473
|
+
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !vt(this.space.id, this.func.id)) {
|
|
3474
|
+
const i = Mt(this.space.id)?.[0];
|
|
3475
3475
|
i ? this.setFieldValue(i.id, "FUNC") : this.setFieldValue("", "FUNC");
|
|
3476
3476
|
}
|
|
3477
3477
|
},
|
|
3478
3478
|
onFuncChange_: function(t) {
|
|
3479
|
-
const e =
|
|
3479
|
+
const e = vt(this.space.id, t);
|
|
3480
3480
|
if (!e) {
|
|
3481
3481
|
console.assert(!1);
|
|
3482
3482
|
return;
|
|
@@ -3530,13 +3530,13 @@ const Fi = {
|
|
|
3530
3530
|
F(this, t);
|
|
3531
3531
|
},
|
|
3532
3532
|
checkWarning_: function() {
|
|
3533
|
-
const t =
|
|
3533
|
+
const t = Qt(this.space.id);
|
|
3534
3534
|
if (!t) {
|
|
3535
3535
|
this.setWarningText(p("WARN_SPACE_NOT_FOUND"));
|
|
3536
3536
|
return;
|
|
3537
3537
|
}
|
|
3538
3538
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
3539
|
-
const e =
|
|
3539
|
+
const e = vt(this.space.id, this.func.id);
|
|
3540
3540
|
if (!e) {
|
|
3541
3541
|
this.setWarningText(p("WARN_FUNC_NOT_FOUND"));
|
|
3542
3542
|
return;
|
|
@@ -3552,24 +3552,24 @@ const Fi = {
|
|
|
3552
3552
|
this.setWarningText(null);
|
|
3553
3553
|
}
|
|
3554
3554
|
};
|
|
3555
|
-
d.call_func_internal_v1 =
|
|
3555
|
+
d.call_func_internal_v1 = xi;
|
|
3556
3556
|
s.forBlock.call_func_internal_v1 = function(t) {
|
|
3557
3557
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3558
3558
|
let r = `${e}var __inputs__ = {
|
|
3559
3559
|
`;
|
|
3560
|
-
o.func.inputs.forEach(({ id:
|
|
3560
|
+
o.func.inputs.forEach(({ id: g }, m) => {
|
|
3561
3561
|
const y = s.valueToCode(
|
|
3562
3562
|
o,
|
|
3563
3563
|
"INPUT" + m,
|
|
3564
3564
|
c.ATOMIC
|
|
3565
3565
|
);
|
|
3566
|
-
r += `${e}${e}${n(
|
|
3566
|
+
r += `${e}${e}${n(g)}: ${y},
|
|
3567
3567
|
`;
|
|
3568
3568
|
}), r += `${e}};`;
|
|
3569
3569
|
const u = o.space.name + "/" + o.func.name;
|
|
3570
3570
|
let l = "";
|
|
3571
|
-
o.func.outputs.forEach(({ id:
|
|
3572
|
-
l += `${e}var __output_${
|
|
3571
|
+
o.func.outputs.forEach(({ id: g }) => {
|
|
3572
|
+
l += `${e}var __output_${g}__ = __result__.outputs[${n(g)}];
|
|
3573
3573
|
`;
|
|
3574
3574
|
});
|
|
3575
3575
|
const _ = s.statementToCode(o, "CALLBACK");
|
|
@@ -3582,7 +3582,7 @@ ${e}}
|
|
|
3582
3582
|
${l}${_}}
|
|
3583
3583
|
`;
|
|
3584
3584
|
};
|
|
3585
|
-
const
|
|
3585
|
+
const Fi = {
|
|
3586
3586
|
init: function() {
|
|
3587
3587
|
this.func = {
|
|
3588
3588
|
id: "",
|
|
@@ -3592,7 +3592,7 @@ const Yi = {
|
|
|
3592
3592
|
initData_: function() {
|
|
3593
3593
|
if (this.func.id)
|
|
3594
3594
|
return;
|
|
3595
|
-
const { id: t, inputs: e } =
|
|
3595
|
+
const { id: t, inputs: e } = we();
|
|
3596
3596
|
this.func.id = t, this.func.inputs = e;
|
|
3597
3597
|
},
|
|
3598
3598
|
saveExtraState: function() {
|
|
@@ -3629,7 +3629,7 @@ const Yi = {
|
|
|
3629
3629
|
F(this, t);
|
|
3630
3630
|
},
|
|
3631
3631
|
checkWarning_: function() {
|
|
3632
|
-
const { id: t, inputs: e } =
|
|
3632
|
+
const { id: t, inputs: e } = we();
|
|
3633
3633
|
if (this.func.id !== t && (this.func.id = t), !M(e, this.func.inputs)) {
|
|
3634
3634
|
this.setWarningText(p("WARN_FUNC_HAS_CHANGED"));
|
|
3635
3635
|
return;
|
|
@@ -3637,7 +3637,7 @@ const Yi = {
|
|
|
3637
3637
|
this.setWarningText(null);
|
|
3638
3638
|
}
|
|
3639
3639
|
};
|
|
3640
|
-
d.func_entry_v1 =
|
|
3640
|
+
d.func_entry_v1 = Fi;
|
|
3641
3641
|
s.forBlock.func_entry_v1 = function(t) {
|
|
3642
3642
|
const e = t, n = s.statementToCode(e, "HANDLE"), o = [];
|
|
3643
3643
|
for (let a = 0; a < e.func.inputs.length; a++) {
|
|
@@ -3647,7 +3647,7 @@ s.forBlock.func_entry_v1 = function(t) {
|
|
|
3647
3647
|
return `function __funcEntryV1__(${o.join(", ")}) {
|
|
3648
3648
|
${n}}`;
|
|
3649
3649
|
};
|
|
3650
|
-
const
|
|
3650
|
+
const Yi = {
|
|
3651
3651
|
init: function() {
|
|
3652
3652
|
this.output = {
|
|
3653
3653
|
id: "",
|
|
@@ -3658,7 +3658,7 @@ const wi = {
|
|
|
3658
3658
|
initData_: function() {
|
|
3659
3659
|
if (this.output.id)
|
|
3660
3660
|
return;
|
|
3661
|
-
const t =
|
|
3661
|
+
const t = we().outputs?.[0];
|
|
3662
3662
|
t && (this.output.id = t.id, this.output.name = t.name, this.output.type = t.type);
|
|
3663
3663
|
},
|
|
3664
3664
|
saveExtraState: function() {
|
|
@@ -3672,7 +3672,7 @@ const wi = {
|
|
|
3672
3672
|
}, 0);
|
|
3673
3673
|
},
|
|
3674
3674
|
genOutputOpts_: function() {
|
|
3675
|
-
return
|
|
3675
|
+
return Ui();
|
|
3676
3676
|
},
|
|
3677
3677
|
onchange: function(t) {
|
|
3678
3678
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -3685,7 +3685,7 @@ const wi = {
|
|
|
3685
3685
|
}
|
|
3686
3686
|
},
|
|
3687
3687
|
onOutputChange_: function(t) {
|
|
3688
|
-
const e =
|
|
3688
|
+
const e = hn(t);
|
|
3689
3689
|
if (!e) {
|
|
3690
3690
|
console.assert(!1);
|
|
3691
3691
|
return;
|
|
@@ -3707,7 +3707,7 @@ const wi = {
|
|
|
3707
3707
|
this.getInput("VALUE").setShadowDom(t);
|
|
3708
3708
|
},
|
|
3709
3709
|
checkWarning_: function() {
|
|
3710
|
-
const t =
|
|
3710
|
+
const t = hn(this.output.id);
|
|
3711
3711
|
if (!t) {
|
|
3712
3712
|
this.setWarningText(p("WARN_FUNC_HAS_CHANGED"));
|
|
3713
3713
|
return;
|
|
@@ -3719,7 +3719,7 @@ const wi = {
|
|
|
3719
3719
|
this.setWarningText(null);
|
|
3720
3720
|
}
|
|
3721
3721
|
};
|
|
3722
|
-
d.set_func_output_v1 =
|
|
3722
|
+
d.set_func_output_v1 = Yi;
|
|
3723
3723
|
s.forBlock.set_func_output_v1 = function(t) {
|
|
3724
3724
|
const e = s.quote_, n = t, { id: o, type: i } = n.output;
|
|
3725
3725
|
let a = s.valueToCode(n, "VALUE", c.ATOMIC);
|
|
@@ -3801,7 +3801,7 @@ function pt(t) {
|
|
|
3801
3801
|
const { spaces: e } = f.data;
|
|
3802
3802
|
return e.find((n) => n.id === t);
|
|
3803
3803
|
}
|
|
3804
|
-
function
|
|
3804
|
+
function pe() {
|
|
3805
3805
|
const t = [];
|
|
3806
3806
|
return q().forEach(({ id: n, name: o }) => {
|
|
3807
3807
|
t.push([o, n]);
|
|
@@ -3816,20 +3816,20 @@ function j(t, e) {
|
|
|
3816
3816
|
if (o)
|
|
3817
3817
|
return o.tables.find((i) => i.id === e);
|
|
3818
3818
|
}
|
|
3819
|
-
function
|
|
3819
|
+
function he(t) {
|
|
3820
3820
|
const e = [];
|
|
3821
3821
|
return K(t).forEach(({ id: o, name: i }) => {
|
|
3822
3822
|
e.push([i, o]);
|
|
3823
3823
|
}), k(e);
|
|
3824
3824
|
}
|
|
3825
|
-
function
|
|
3825
|
+
function zt(t, e) {
|
|
3826
3826
|
const { spaces: n } = f.data, o = n.find((a) => a.id === t);
|
|
3827
3827
|
if (!o)
|
|
3828
3828
|
return [];
|
|
3829
3829
|
const i = o.tables.find((a) => a.id === e);
|
|
3830
3830
|
return i ? i.columns : [];
|
|
3831
3831
|
}
|
|
3832
|
-
function
|
|
3832
|
+
function Se(t, e, n) {
|
|
3833
3833
|
const { spaces: o } = f.data, i = o.find((r) => r.id === t);
|
|
3834
3834
|
if (!i)
|
|
3835
3835
|
return;
|
|
@@ -3837,13 +3837,13 @@ function Be(t, e, n) {
|
|
|
3837
3837
|
if (a)
|
|
3838
3838
|
return a.columns.find((r) => r.id === n);
|
|
3839
3839
|
}
|
|
3840
|
-
function
|
|
3840
|
+
function wi(t, e) {
|
|
3841
3841
|
const n = [];
|
|
3842
|
-
return
|
|
3842
|
+
return zt(t, e).forEach(({ id: i, name: a }) => {
|
|
3843
3843
|
n.push([a, i]);
|
|
3844
3844
|
}), k(n);
|
|
3845
3845
|
}
|
|
3846
|
-
function
|
|
3846
|
+
function Ki(t) {
|
|
3847
3847
|
const e = t.getInput("TABLE").connection;
|
|
3848
3848
|
if (e.targetBlock())
|
|
3849
3849
|
return;
|
|
@@ -3877,7 +3877,7 @@ function $i(t) {
|
|
|
3877
3877
|
}, r = w.blocks.append(a, t.workspace);
|
|
3878
3878
|
e.connect(r.outputConnection);
|
|
3879
3879
|
}
|
|
3880
|
-
function
|
|
3880
|
+
function $i(t) {
|
|
3881
3881
|
const e = t.getInput("HANDLE").connection;
|
|
3882
3882
|
if (e.targetBlock())
|
|
3883
3883
|
return;
|
|
@@ -3901,7 +3901,7 @@ function Hi(t) {
|
|
|
3901
3901
|
}, o = w.blocks.append(n, t.workspace);
|
|
3902
3902
|
e.connect(o.previousConnection);
|
|
3903
3903
|
}
|
|
3904
|
-
const
|
|
3904
|
+
const Hi = {
|
|
3905
3905
|
init: function() {
|
|
3906
3906
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_ADD_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_ADD_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_ADD_DATA_HELPURL}");
|
|
3907
3907
|
},
|
|
@@ -3917,14 +3917,14 @@ const Gi = {
|
|
|
3917
3917
|
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(v.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "SUCCESS"));
|
|
3918
3918
|
},
|
|
3919
3919
|
ensureBlocks_: function() {
|
|
3920
|
-
this.isInsertionMarker() || (
|
|
3920
|
+
this.isInsertionMarker() || (Ki(this), F(this, [
|
|
3921
3921
|
["SUCCESS", "__success__", "x-runtime-lib.success", !0],
|
|
3922
3922
|
["MESSAGE", "__message__", "x-runtime-lib.message", !0],
|
|
3923
3923
|
["DATA", "__data__", "x-runtime-lib.data", !0]
|
|
3924
|
-
]),
|
|
3924
|
+
]), $i(this));
|
|
3925
3925
|
}
|
|
3926
3926
|
};
|
|
3927
|
-
d.add_data_v1 =
|
|
3927
|
+
d.add_data_v1 = Hi;
|
|
3928
3928
|
s.forBlock.add_data_v1 = function(t) {
|
|
3929
3929
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.statementToCode(t, "HANDLE");
|
|
3930
3930
|
return `{
|
|
@@ -3940,7 +3940,7 @@ ${e}}
|
|
|
3940
3940
|
${o}}
|
|
3941
3941
|
`;
|
|
3942
3942
|
};
|
|
3943
|
-
const
|
|
3943
|
+
const Gi = {
|
|
3944
3944
|
init: function() {
|
|
3945
3945
|
this.space = {
|
|
3946
3946
|
id: "",
|
|
@@ -3978,7 +3978,7 @@ const Wi = {
|
|
|
3978
3978
|
if (!e)
|
|
3979
3979
|
return;
|
|
3980
3980
|
this.table.id = e.id, this.table.name = e.name;
|
|
3981
|
-
const n =
|
|
3981
|
+
const n = zt(this.space.id, this.table.id)?.[0];
|
|
3982
3982
|
n && (this.column.id = n.id, this.column.name = n.name, this.column.type = n.type, this.column.extend = n.extend);
|
|
3983
3983
|
},
|
|
3984
3984
|
saveExtraState: function() {
|
|
@@ -3994,13 +3994,13 @@ const Wi = {
|
|
|
3994
3994
|
}, 0);
|
|
3995
3995
|
},
|
|
3996
3996
|
genSpaceOpts_: function() {
|
|
3997
|
-
return
|
|
3997
|
+
return pe();
|
|
3998
3998
|
},
|
|
3999
3999
|
genTableOpts_: function() {
|
|
4000
|
-
return
|
|
4000
|
+
return he(this.space.id);
|
|
4001
4001
|
},
|
|
4002
4002
|
genColumnOpts_: function() {
|
|
4003
|
-
return
|
|
4003
|
+
return wi(this.space.id, this.table.id);
|
|
4004
4004
|
},
|
|
4005
4005
|
onchange: function(t) {
|
|
4006
4006
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -4031,13 +4031,13 @@ const Wi = {
|
|
|
4031
4031
|
return;
|
|
4032
4032
|
}
|
|
4033
4033
|
const n = e.id !== this.table.id;
|
|
4034
|
-
if (this.table.id = e.id, this.table.name = e.name, n || !
|
|
4035
|
-
const o =
|
|
4034
|
+
if (this.table.id = e.id, this.table.name = e.name, n || !Se(this.space.id, this.table.id, this.column.id)) {
|
|
4035
|
+
const o = zt(this.space.id, this.table.id)?.[0]?.id ?? "", i = this.getField("COLUMN");
|
|
4036
4036
|
i.getOptions(!1), i.setValue(o, !1), this.onColumnChange_(o);
|
|
4037
4037
|
}
|
|
4038
4038
|
},
|
|
4039
4039
|
onColumnChange_: function(t) {
|
|
4040
|
-
const e =
|
|
4040
|
+
const e = Se(this.space.id, this.table.id, t);
|
|
4041
4041
|
e ? (this.column.id = e.id, this.column.name = e.name, this.column.type = e.type, this.column.extend = e.extend) : (this.column.id = "", this.column.name = "", this.column.type = "", this.column.extend = ""), this.updateShape_(), this.updateBlocks_(!0), this.updateCheck_();
|
|
4042
4042
|
},
|
|
4043
4043
|
updateShape_: function() {
|
|
@@ -4056,11 +4056,11 @@ const Wi = {
|
|
|
4056
4056
|
n && n.dispose();
|
|
4057
4057
|
else if (n)
|
|
4058
4058
|
return;
|
|
4059
|
-
const o =
|
|
4059
|
+
const o = Me(this.workspace, this.column.type);
|
|
4060
4060
|
o && (e.setCheck(null), e.connect(o.outputConnection));
|
|
4061
4061
|
},
|
|
4062
4062
|
updateCheck_: function() {
|
|
4063
|
-
const t =
|
|
4063
|
+
const t = Rn(this.column.type);
|
|
4064
4064
|
this.getInput("VALUE").connection.setCheck(t);
|
|
4065
4065
|
},
|
|
4066
4066
|
checkWarning_: function() {
|
|
@@ -4076,7 +4076,7 @@ const Wi = {
|
|
|
4076
4076
|
return;
|
|
4077
4077
|
}
|
|
4078
4078
|
e.name !== this.table.name && (this.table.name = e.name);
|
|
4079
|
-
const n =
|
|
4079
|
+
const n = Se(
|
|
4080
4080
|
this.space.id,
|
|
4081
4081
|
this.table.id,
|
|
4082
4082
|
this.column.id
|
|
@@ -4092,7 +4092,7 @@ const Wi = {
|
|
|
4092
4092
|
this.setWarningText(null);
|
|
4093
4093
|
}
|
|
4094
4094
|
};
|
|
4095
|
-
d.cond_atomic_v1 =
|
|
4095
|
+
d.cond_atomic_v1 = Gi;
|
|
4096
4096
|
s.forBlock.cond_atomic_v1 = function(t) {
|
|
4097
4097
|
const e = s.quote_, n = t, o = n.column.name, i = s.valueToCode(n, "VALUE", c.ATOMIC) || null, r = {
|
|
4098
4098
|
EQ: "=",
|
|
@@ -4104,19 +4104,19 @@ s.forBlock.cond_atomic_v1 = function(t) {
|
|
|
4104
4104
|
}[n.getFieldValue("OP")];
|
|
4105
4105
|
return [`{type:'ATOMIC',key:${e(o)},value:${i},operator:${e(r)}}`, c.ATOMIC];
|
|
4106
4106
|
};
|
|
4107
|
-
const
|
|
4107
|
+
const Wi = {
|
|
4108
4108
|
init: function() {
|
|
4109
4109
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
4110
4110
|
}
|
|
4111
4111
|
};
|
|
4112
|
-
d.cond_logic_container_v1 =
|
|
4113
|
-
const
|
|
4112
|
+
d.cond_logic_container_v1 = Wi;
|
|
4113
|
+
const ji = {
|
|
4114
4114
|
init: function() {
|
|
4115
4115
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
4116
4116
|
}
|
|
4117
4117
|
};
|
|
4118
|
-
d.cond_logic_item_v1 =
|
|
4119
|
-
const
|
|
4118
|
+
d.cond_logic_item_v1 = ji;
|
|
4119
|
+
const Xi = {
|
|
4120
4120
|
init: function() {
|
|
4121
4121
|
this.itemCount_ = 1, this.appendValueInput("VALUE").setCheck("Condition").appendField(
|
|
4122
4122
|
new I([
|
|
@@ -4190,7 +4190,7 @@ const Ji = {
|
|
|
4190
4190
|
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setCheck("Condition");
|
|
4191
4191
|
}
|
|
4192
4192
|
};
|
|
4193
|
-
d.cond_logic_v1 =
|
|
4193
|
+
d.cond_logic_v1 = Xi;
|
|
4194
4194
|
s.forBlock.cond_logic_v1 = function(t) {
|
|
4195
4195
|
const e = s.quote_, n = t, o = n.getFieldValue("TYPE"), i = [], a = s.valueToCode(n, "VALUE", c.ATOMIC) || null;
|
|
4196
4196
|
i.push(a);
|
|
@@ -4200,7 +4200,7 @@ s.forBlock.cond_logic_v1 = function(t) {
|
|
|
4200
4200
|
}
|
|
4201
4201
|
return [`{type:${e(o)},entries:[${i}]}`, c.ATOMIC];
|
|
4202
4202
|
};
|
|
4203
|
-
function
|
|
4203
|
+
function Ji(t) {
|
|
4204
4204
|
const e = t.getInput("TABLE").connection;
|
|
4205
4205
|
if (e.targetBlock())
|
|
4206
4206
|
return;
|
|
@@ -4219,11 +4219,11 @@ function qi(t) {
|
|
|
4219
4219
|
}, a = w.blocks.append(i, t.workspace);
|
|
4220
4220
|
e.connect(a.outputConnection);
|
|
4221
4221
|
}
|
|
4222
|
-
function
|
|
4222
|
+
function qi(t) {
|
|
4223
4223
|
const e = t.getInput("CONDITION").connection;
|
|
4224
4224
|
if (e.targetBlock())
|
|
4225
4225
|
return;
|
|
4226
|
-
const n = q()?.[0], o = K(n?.id ?? "")?.[0], i =
|
|
4226
|
+
const n = q()?.[0], o = K(n?.id ?? "")?.[0], i = zt(n?.id, o?.id)?.[0], a = {
|
|
4227
4227
|
type: "cond_atomic_v1",
|
|
4228
4228
|
extraState: {
|
|
4229
4229
|
space: {
|
|
@@ -4244,7 +4244,7 @@ function Qi(t) {
|
|
|
4244
4244
|
}, r = w.blocks.append(a, t.workspace);
|
|
4245
4245
|
e.connect(r.outputConnection);
|
|
4246
4246
|
}
|
|
4247
|
-
function
|
|
4247
|
+
function Qi(t) {
|
|
4248
4248
|
const e = t.getInput("HANDLE").connection;
|
|
4249
4249
|
if (e.targetBlock())
|
|
4250
4250
|
return;
|
|
@@ -4268,7 +4268,7 @@ function zi(t) {
|
|
|
4268
4268
|
}, o = w.blocks.append(n, t.workspace);
|
|
4269
4269
|
e.connect(o.previousConnection);
|
|
4270
4270
|
}
|
|
4271
|
-
const
|
|
4271
|
+
const zi = {
|
|
4272
4272
|
init: function() {
|
|
4273
4273
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_DELETE_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_DELETE_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_DELETE_DATA_HELPURL}");
|
|
4274
4274
|
},
|
|
@@ -4284,13 +4284,13 @@ const Zi = {
|
|
|
4284
4284
|
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(v.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("SelectTable").setAlign(v.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
4285
4285
|
},
|
|
4286
4286
|
ensureBlocks_: function() {
|
|
4287
|
-
this.isInsertionMarker() || (
|
|
4287
|
+
this.isInsertionMarker() || (Ji(this), qi(this), F(this, [
|
|
4288
4288
|
["SUCCESS", "__success__", "x-runtime-lib.success", !0],
|
|
4289
4289
|
["MESSAGE", "__message__", "x-runtime-lib.message", !0]
|
|
4290
|
-
]),
|
|
4290
|
+
]), Qi(this));
|
|
4291
4291
|
}
|
|
4292
4292
|
};
|
|
4293
|
-
d.delete_data_v1 =
|
|
4293
|
+
d.delete_data_v1 = zi;
|
|
4294
4294
|
s.forBlock.delete_data_v1 = function(t) {
|
|
4295
4295
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", c.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
|
|
4296
4296
|
return `{
|
|
@@ -4328,7 +4328,7 @@ s.forBlock.interrupt_transaction_v1 = function(t) {
|
|
|
4328
4328
|
return `throw ${s.valueToCode(t, "VALUE", c.NONE) || "''"};
|
|
4329
4329
|
`;
|
|
4330
4330
|
};
|
|
4331
|
-
function
|
|
4331
|
+
function Zi(t) {
|
|
4332
4332
|
const e = t.getInput("TABLE").connection;
|
|
4333
4333
|
if (e.targetBlock())
|
|
4334
4334
|
return;
|
|
@@ -4362,7 +4362,7 @@ function ts(t) {
|
|
|
4362
4362
|
}, r = w.blocks.append(a, t.workspace);
|
|
4363
4363
|
e.connect(r.outputConnection);
|
|
4364
4364
|
}
|
|
4365
|
-
function
|
|
4365
|
+
function ts(t) {
|
|
4366
4366
|
const e = t.getInput("CONDITION").connection;
|
|
4367
4367
|
if (e.targetBlock())
|
|
4368
4368
|
return;
|
|
@@ -4371,7 +4371,7 @@ function es(t) {
|
|
|
4371
4371
|
}, o = w.blocks.append(n, t.workspace);
|
|
4372
4372
|
e.connect(o.outputConnection);
|
|
4373
4373
|
}
|
|
4374
|
-
function
|
|
4374
|
+
function es(t) {
|
|
4375
4375
|
const e = t.getInput("EXTRA").connection;
|
|
4376
4376
|
if (e.targetBlock())
|
|
4377
4377
|
return;
|
|
@@ -4408,7 +4408,7 @@ function ns(t) {
|
|
|
4408
4408
|
}, o = w.blocks.append(n, t.workspace);
|
|
4409
4409
|
e.connect(o.outputConnection);
|
|
4410
4410
|
}
|
|
4411
|
-
function
|
|
4411
|
+
function ns(t) {
|
|
4412
4412
|
const e = t.getInput("HANDLE").connection;
|
|
4413
4413
|
if (e.targetBlock())
|
|
4414
4414
|
return;
|
|
@@ -4446,7 +4446,7 @@ h([
|
|
|
4446
4446
|
style: "procedure_blocks"
|
|
4447
4447
|
}
|
|
4448
4448
|
]);
|
|
4449
|
-
const
|
|
4449
|
+
const os = {
|
|
4450
4450
|
init: function() {
|
|
4451
4451
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_QUERY_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_QUERY_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_QUERY_DATA_HELPURL}");
|
|
4452
4452
|
},
|
|
@@ -4462,15 +4462,15 @@ const is = {
|
|
|
4462
4462
|
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(v.Align.RIGHT).appendField("%{BKY_DATA_EXTRA}"), this.moveInputBefore("EXTRA", "SUCCESS")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(v.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "EXTRA")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck(["SelectColumn", "Array"]).setAlign(v.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
4463
4463
|
},
|
|
4464
4464
|
ensureBlocks_: function() {
|
|
4465
|
-
this.isInsertionMarker() || (
|
|
4465
|
+
this.isInsertionMarker() || (Zi(this), ts(this), es(this), F(this, [
|
|
4466
4466
|
["SUCCESS", "__success__", "x-runtime-lib.success", !0],
|
|
4467
4467
|
["MESSAGE", "__message__", "x-runtime-lib.message", !0],
|
|
4468
4468
|
["MAIN_DATA", "__mainData__", "x-runtime-lib.mainData", !0],
|
|
4469
4469
|
["EXTRA_DATA", "__extraData__", "x-runtime-lib.extraData", !0]
|
|
4470
|
-
]),
|
|
4470
|
+
]), ns(this));
|
|
4471
4471
|
}
|
|
4472
4472
|
};
|
|
4473
|
-
d.query_data_v1 =
|
|
4473
|
+
d.query_data_v1 = os;
|
|
4474
4474
|
s.forBlock.query_data_v1 = function(t) {
|
|
4475
4475
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", c.ATOMIC) || "null", i = s.valueToCode(t, "EXTRA", c.ATOMIC) || "null", a = s.statementToCode(t, "HANDLE");
|
|
4476
4476
|
return `{
|
|
@@ -4543,19 +4543,19 @@ s.forBlock.query_extra_sortby_v1 = function(t) {
|
|
|
4543
4543
|
const e = s.valueToCode(t, "COLUMN", c.ATOMIC) || "''", n = s.valueToCode(t, "DESC", c.ATOMIC) || !1;
|
|
4544
4544
|
return [`{type:'sortby',value:${e},value2:${n}}`, c.ATOMIC];
|
|
4545
4545
|
};
|
|
4546
|
-
const
|
|
4546
|
+
const is = {
|
|
4547
4547
|
init: function() {
|
|
4548
4548
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4549
4549
|
}
|
|
4550
4550
|
};
|
|
4551
|
-
d.select_column_container_v1 =
|
|
4552
|
-
const
|
|
4551
|
+
d.select_column_container_v1 = is;
|
|
4552
|
+
const ss = {
|
|
4553
4553
|
init: function() {
|
|
4554
4554
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4555
4555
|
}
|
|
4556
4556
|
};
|
|
4557
|
-
d.select_column_item_v1 =
|
|
4558
|
-
const
|
|
4557
|
+
d.select_column_item_v1 = ss;
|
|
4558
|
+
const as = {
|
|
4559
4559
|
init: function() {
|
|
4560
4560
|
this.space = {
|
|
4561
4561
|
id: "",
|
|
@@ -4600,10 +4600,10 @@ const cs = {
|
|
|
4600
4600
|
}, 0);
|
|
4601
4601
|
},
|
|
4602
4602
|
genSpaceOpts_: function() {
|
|
4603
|
-
return
|
|
4603
|
+
return pe();
|
|
4604
4604
|
},
|
|
4605
4605
|
genTableOpts_: function() {
|
|
4606
|
-
return
|
|
4606
|
+
return he(this.space.id);
|
|
4607
4607
|
},
|
|
4608
4608
|
genColumnOpts_: function() {
|
|
4609
4609
|
const t = [];
|
|
@@ -4750,19 +4750,19 @@ const cs = {
|
|
|
4750
4750
|
this.setWarningText(null);
|
|
4751
4751
|
}
|
|
4752
4752
|
};
|
|
4753
|
-
d.select_column_v1 =
|
|
4753
|
+
d.select_column_v1 = as;
|
|
4754
4754
|
s.forBlock.select_column_v1 = function(t) {
|
|
4755
4755
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
4756
4756
|
for (let l = 0; l < n.itemCount_; l++) {
|
|
4757
|
-
const _ = n.getFieldValue("COLUMN" + l), T = n.table.columns.find((m) => m.id === _).name,
|
|
4758
|
-
a.push({ name: T, alias:
|
|
4757
|
+
const _ = n.getFieldValue("COLUMN" + l), T = n.table.columns.find((m) => m.id === _).name, g = n.getFieldValue("ALIAS" + l);
|
|
4758
|
+
a.push({ name: T, alias: g });
|
|
4759
4759
|
}
|
|
4760
4760
|
let r = "[";
|
|
4761
4761
|
return a.forEach(({ name: l, alias: _ }, T) => {
|
|
4762
4762
|
T !== 0 && (r += ","), r += `{name:${e(l)},alias:${e(_)}}`;
|
|
4763
4763
|
}), r += "]", [`{spaceid:${e(o)},tableid:${e(i)},columns:${r}}`, c.ATOMIC];
|
|
4764
4764
|
};
|
|
4765
|
-
const
|
|
4765
|
+
const cs = {
|
|
4766
4766
|
init: function() {
|
|
4767
4767
|
this.space = {
|
|
4768
4768
|
id: "",
|
|
@@ -4798,10 +4798,10 @@ const rs = {
|
|
|
4798
4798
|
this.space.id = t.space?.id ?? "", this.space.name = t.space?.name ?? "", this.table.id = t.table?.id ?? "", this.table.name = t.table?.name ?? "", this.checkWarning_();
|
|
4799
4799
|
},
|
|
4800
4800
|
genSpaceOpts_: function() {
|
|
4801
|
-
return
|
|
4801
|
+
return pe();
|
|
4802
4802
|
},
|
|
4803
4803
|
genTableOpts_: function() {
|
|
4804
|
-
return
|
|
4804
|
+
return he(this.space.id);
|
|
4805
4805
|
},
|
|
4806
4806
|
onchange: function(t) {
|
|
4807
4807
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -4848,12 +4848,12 @@ const rs = {
|
|
|
4848
4848
|
e.name !== this.table.name && (this.table.name = e.name), this.setWarningText(null);
|
|
4849
4849
|
}
|
|
4850
4850
|
};
|
|
4851
|
-
d.select_table_v1 =
|
|
4851
|
+
d.select_table_v1 = cs;
|
|
4852
4852
|
s.forBlock.select_table_v1 = function(t) {
|
|
4853
4853
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id;
|
|
4854
4854
|
return [`{spaceid:${e(o)},tableid:${e(i)}}`, c.ATOMIC];
|
|
4855
4855
|
};
|
|
4856
|
-
const
|
|
4856
|
+
const rs = {
|
|
4857
4857
|
init: function() {
|
|
4858
4858
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_TRANSACTION_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_TRANSACTION_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_TRANSACTION_HELPURL}");
|
|
4859
4859
|
},
|
|
@@ -4875,9 +4875,9 @@ const us = {
|
|
|
4875
4875
|
]);
|
|
4876
4876
|
}
|
|
4877
4877
|
};
|
|
4878
|
-
d.transaction_v1 =
|
|
4878
|
+
d.transaction_v1 = rs;
|
|
4879
4879
|
s.forBlock.transaction_v1 = function(t) {
|
|
4880
|
-
const e = s.INDENT, n = t, o =
|
|
4880
|
+
const e = s.INDENT, n = t, o = Go(n), i = s.statementToCode(n, "HANDLE"), a = s.statementToCode(n, "FINALLY");
|
|
4881
4881
|
return `{
|
|
4882
4882
|
${e}var __error${o}__ = '';
|
|
4883
4883
|
${e}var __txExist${o}__ = typeof(__tx__) !== 'undefined';
|
|
@@ -4919,19 +4919,19 @@ ${e}}
|
|
|
4919
4919
|
}
|
|
4920
4920
|
`;
|
|
4921
4921
|
};
|
|
4922
|
-
const
|
|
4922
|
+
const us = {
|
|
4923
4923
|
init: function() {
|
|
4924
4924
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4925
4925
|
}
|
|
4926
4926
|
};
|
|
4927
|
-
d.update_column_container_v1 =
|
|
4928
|
-
const
|
|
4927
|
+
d.update_column_container_v1 = us;
|
|
4928
|
+
const ls = {
|
|
4929
4929
|
init: function() {
|
|
4930
4930
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4931
4931
|
}
|
|
4932
4932
|
};
|
|
4933
|
-
d.update_column_item_v1 =
|
|
4934
|
-
const
|
|
4933
|
+
d.update_column_item_v1 = ls;
|
|
4934
|
+
const _s = {
|
|
4935
4935
|
init: function() {
|
|
4936
4936
|
this.space = {
|
|
4937
4937
|
id: "",
|
|
@@ -4976,10 +4976,10 @@ const ps = {
|
|
|
4976
4976
|
}, 0);
|
|
4977
4977
|
},
|
|
4978
4978
|
genSpaceOpts_: function() {
|
|
4979
|
-
return
|
|
4979
|
+
return pe();
|
|
4980
4980
|
},
|
|
4981
4981
|
genTableOpts_: function() {
|
|
4982
|
-
return
|
|
4982
|
+
return he(this.space.id);
|
|
4983
4983
|
},
|
|
4984
4984
|
genColumnOpts_: function() {
|
|
4985
4985
|
const t = [];
|
|
@@ -5044,7 +5044,7 @@ const ps = {
|
|
|
5044
5044
|
}
|
|
5045
5045
|
const o = this.getInput("ADD" + t).connection, i = o.targetBlock();
|
|
5046
5046
|
i && i.dispose();
|
|
5047
|
-
const a =
|
|
5047
|
+
const a = Me(this.workspace, n.type);
|
|
5048
5048
|
a && (o.setCheck(null), o.connect(a.outputConnection)), this.updateCheck_();
|
|
5049
5049
|
},
|
|
5050
5050
|
decompose: function(t) {
|
|
@@ -5129,7 +5129,7 @@ const ps = {
|
|
|
5129
5129
|
if (!r)
|
|
5130
5130
|
continue;
|
|
5131
5131
|
n.setCheck(null);
|
|
5132
|
-
const u =
|
|
5132
|
+
const u = Me(this.workspace, r.type);
|
|
5133
5133
|
u && o.connect(u.outputConnection);
|
|
5134
5134
|
}
|
|
5135
5135
|
},
|
|
@@ -5138,7 +5138,7 @@ const ps = {
|
|
|
5138
5138
|
const e = this.getFieldValue("COLUMN" + t), n = this.table.columns.find((i) => i.id === e);
|
|
5139
5139
|
if (!n)
|
|
5140
5140
|
continue;
|
|
5141
|
-
const o =
|
|
5141
|
+
const o = Rn(n.type);
|
|
5142
5142
|
this.getInput("ADD" + t).setCheck(o);
|
|
5143
5143
|
}
|
|
5144
5144
|
},
|
|
@@ -5161,19 +5161,19 @@ const ps = {
|
|
|
5161
5161
|
this.setWarningText(null);
|
|
5162
5162
|
}
|
|
5163
5163
|
};
|
|
5164
|
-
d.update_column_v1 =
|
|
5164
|
+
d.update_column_v1 = _s;
|
|
5165
5165
|
s.forBlock.update_column_v1 = function(t) {
|
|
5166
5166
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
5167
5167
|
for (let l = 0; l < n.itemCount_; l++) {
|
|
5168
|
-
const _ = n.getFieldValue("COLUMN" + l), T = n.table.columns.find((m) => m.id === _).name,
|
|
5169
|
-
a.push({ name: T, value:
|
|
5168
|
+
const _ = n.getFieldValue("COLUMN" + l), T = n.table.columns.find((m) => m.id === _).name, g = s.valueToCode(n, "ADD" + l, c.ATOMIC) || "null";
|
|
5169
|
+
a.push({ name: T, value: g });
|
|
5170
5170
|
}
|
|
5171
5171
|
let r = "[";
|
|
5172
5172
|
return a.forEach(({ name: l, value: _ }, T) => {
|
|
5173
5173
|
T !== 0 && (r += ","), r += `{name:${e(l)},value:${_}}`;
|
|
5174
5174
|
}), r += "]", [`{spaceid:${e(o)},tableid:${e(i)},columns:${r}}`, c.ATOMIC];
|
|
5175
5175
|
};
|
|
5176
|
-
function
|
|
5176
|
+
function ps(t) {
|
|
5177
5177
|
const e = t.getInput("TABLE").connection;
|
|
5178
5178
|
if (e.targetBlock())
|
|
5179
5179
|
return;
|
|
@@ -5207,7 +5207,7 @@ function hs(t) {
|
|
|
5207
5207
|
}, r = w.blocks.append(a, t.workspace);
|
|
5208
5208
|
e.connect(r.outputConnection);
|
|
5209
5209
|
}
|
|
5210
|
-
function
|
|
5210
|
+
function hs(t) {
|
|
5211
5211
|
const e = t.getInput("CONDITION").connection;
|
|
5212
5212
|
if (e.targetBlock())
|
|
5213
5213
|
return;
|
|
@@ -5216,7 +5216,7 @@ function ds(t) {
|
|
|
5216
5216
|
}, o = w.blocks.append(n, t.workspace);
|
|
5217
5217
|
e.connect(o.outputConnection);
|
|
5218
5218
|
}
|
|
5219
|
-
function
|
|
5219
|
+
function ds(t) {
|
|
5220
5220
|
const e = t.getInput("HANDLE").connection;
|
|
5221
5221
|
if (e.targetBlock())
|
|
5222
5222
|
return;
|
|
@@ -5240,7 +5240,7 @@ function fs(t) {
|
|
|
5240
5240
|
}, o = w.blocks.append(n, t.workspace);
|
|
5241
5241
|
e.connect(o.previousConnection);
|
|
5242
5242
|
}
|
|
5243
|
-
const
|
|
5243
|
+
const fs = {
|
|
5244
5244
|
init: function() {
|
|
5245
5245
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_UPDATE_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_UPDATE_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_UPDATE_DATA_HELPURL}");
|
|
5246
5246
|
},
|
|
@@ -5256,14 +5256,14 @@ const ms = {
|
|
|
5256
5256
|
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(v.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(v.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
5257
5257
|
},
|
|
5258
5258
|
ensureBlocks: function() {
|
|
5259
|
-
this.isInsertionMarker() || (
|
|
5259
|
+
this.isInsertionMarker() || (ps(this), hs(this), F(this, [
|
|
5260
5260
|
["SUCCESS", "__success__", "x-runtime-lib.success", !0],
|
|
5261
5261
|
["MESSAGE", "__message__", "x-runtime-lib.message", !0],
|
|
5262
5262
|
["DATA", "__data__", "x-runtime-lib.data", !0]
|
|
5263
|
-
]),
|
|
5263
|
+
]), ds(this));
|
|
5264
5264
|
}
|
|
5265
5265
|
};
|
|
5266
|
-
d.update_data_v1 =
|
|
5266
|
+
d.update_data_v1 = fs;
|
|
5267
5267
|
s.forBlock.update_data_v1 = function(t) {
|
|
5268
5268
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", c.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
|
|
5269
5269
|
return `{
|
|
@@ -5280,20 +5280,20 @@ ${e}}
|
|
|
5280
5280
|
${i}}
|
|
5281
5281
|
`;
|
|
5282
5282
|
};
|
|
5283
|
-
const
|
|
5283
|
+
const ms = C.xml, Ts = {
|
|
5284
5284
|
init: function() {
|
|
5285
5285
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(v.Align.CENTRE).appendField(
|
|
5286
|
-
new z(
|
|
5286
|
+
new z(Ot, 20, 20, void 0, () => {
|
|
5287
5287
|
this.isInFlyout || this.addEntry_();
|
|
5288
5288
|
})
|
|
5289
5289
|
), this.appendDummyInput("CLOSE_BRACKET").appendField(" ] "), this.setInputsInline(!1), this.setOutput(!0, "JsonArray"), this.setColour(350), this.setTooltip(""), this.setHelpUrl("");
|
|
5290
5290
|
},
|
|
5291
5291
|
mutationToDom: function() {
|
|
5292
|
-
const t =
|
|
5292
|
+
const t = ms.createElement("mutation");
|
|
5293
5293
|
return t.setAttribute("items", String(this.length)), t;
|
|
5294
5294
|
},
|
|
5295
5295
|
domToMutation: function(t) {
|
|
5296
|
-
this.length =
|
|
5296
|
+
this.length = Pt(t.getAttribute("items") ?? "", 0), this.initShape_();
|
|
5297
5297
|
},
|
|
5298
5298
|
initData: function(t) {
|
|
5299
5299
|
this.length = t, this.initShape_();
|
|
@@ -5302,11 +5302,11 @@ const Ts = C.xml, Es = {
|
|
|
5302
5302
|
for (let t = 0; t < this.length; t++) {
|
|
5303
5303
|
const e = "ENTRY" + t, n = this.appendValueInput(e);
|
|
5304
5304
|
n.appendField(
|
|
5305
|
-
new z(
|
|
5305
|
+
new z(Ot, 20, 20, void 0, () => {
|
|
5306
5306
|
this.isInFlyout || this.addEntry_(n);
|
|
5307
5307
|
})
|
|
5308
|
-
), n.appendField(new
|
|
5309
|
-
new z(
|
|
5308
|
+
), n.appendField(new an(String(t))), n.appendField(
|
|
5309
|
+
new z(Wt, 20, 20, void 0, () => {
|
|
5310
5310
|
this.isInFlyout || this.removeEntry_(n);
|
|
5311
5311
|
})
|
|
5312
5312
|
), this.moveInputBefore(e, "ADD");
|
|
@@ -5314,18 +5314,18 @@ const Ts = C.xml, Es = {
|
|
|
5314
5314
|
},
|
|
5315
5315
|
addEntry_: function(t) {
|
|
5316
5316
|
let e = this.length;
|
|
5317
|
-
t && (e =
|
|
5317
|
+
t && (e = Pt(t.name.substring(5)));
|
|
5318
5318
|
for (let o = this.length - 1; o >= e; o--) {
|
|
5319
5319
|
const i = this.getInput("ENTRY" + o);
|
|
5320
5320
|
i.name = "ENTRY" + (o + 1), i.fieldRow[1].setValue(o + 1);
|
|
5321
5321
|
}
|
|
5322
5322
|
const n = this.appendValueInput("ENTRY" + e);
|
|
5323
5323
|
n.appendField(
|
|
5324
|
-
new z(
|
|
5324
|
+
new z(Ot, 20, 20, void 0, () => {
|
|
5325
5325
|
this.isInFlyout || this.addEntry_(n);
|
|
5326
5326
|
})
|
|
5327
|
-
), n.appendField(new
|
|
5328
|
-
new z(
|
|
5327
|
+
), n.appendField(new an(String(e))), n.appendField(
|
|
5328
|
+
new z(Wt, 20, 20, void 0, () => {
|
|
5329
5329
|
this.isInFlyout || this.removeEntry_(n);
|
|
5330
5330
|
})
|
|
5331
5331
|
), e === this.length ? this.moveInputBefore("ENTRY" + e, "ADD") : this.moveInputBefore("ENTRY" + e, "ENTRY" + (e + 1)), this.length++;
|
|
@@ -5333,7 +5333,7 @@ const Ts = C.xml, Es = {
|
|
|
5333
5333
|
removeEntry_: function(t) {
|
|
5334
5334
|
const e = t.name, n = this.getInputTargetBlock(e);
|
|
5335
5335
|
n && n.dispose(), this.removeInput(e);
|
|
5336
|
-
const o =
|
|
5336
|
+
const o = Pt(e.substring(5));
|
|
5337
5337
|
for (let i = o + 1; i < this.length; i++) {
|
|
5338
5338
|
const a = this.getInput("ENTRY" + i);
|
|
5339
5339
|
a.name = "ENTRY" + (i - 1), a.fieldRow[1].setValue(i - 1);
|
|
@@ -5341,11 +5341,11 @@ const Ts = C.xml, Es = {
|
|
|
5341
5341
|
this.length--;
|
|
5342
5342
|
}
|
|
5343
5343
|
};
|
|
5344
|
-
d.json_array_v1 =
|
|
5345
|
-
const
|
|
5344
|
+
d.json_array_v1 = Ts;
|
|
5345
|
+
const Es = {
|
|
5346
5346
|
init: function() {
|
|
5347
5347
|
this.appendDummyInput().appendField(
|
|
5348
|
-
new
|
|
5348
|
+
new An([
|
|
5349
5349
|
["false", "false"],
|
|
5350
5350
|
["true", "true"]
|
|
5351
5351
|
]),
|
|
@@ -5353,19 +5353,19 @@ const gs = {
|
|
|
5353
5353
|
), this.setOutput(!0, "JsonBoolean"), this.setColour(210);
|
|
5354
5354
|
}
|
|
5355
5355
|
};
|
|
5356
|
-
d.json_boolean_v1 =
|
|
5357
|
-
const
|
|
5356
|
+
d.json_boolean_v1 = Es;
|
|
5357
|
+
const dn = C.xml, gs = {
|
|
5358
5358
|
init: function() {
|
|
5359
5359
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(v.Align.CENTRE).appendField(
|
|
5360
|
-
new z(
|
|
5360
|
+
new z(Ot, 20, 20, void 0, () => {
|
|
5361
5361
|
this.isInFlyout || this.addEntry_();
|
|
5362
5362
|
})
|
|
5363
5363
|
), this.appendDummyInput("CLOSE_BRACHET").appendField(" } "), this.setInputsInline(!1), this.setOutput(!0, "JsonMap"), this.setColour(120), this.setTooltip(""), this.setHelpUrl("");
|
|
5364
5364
|
},
|
|
5365
5365
|
mutationToDom: function() {
|
|
5366
|
-
const t =
|
|
5366
|
+
const t = dn.createElement("mutation");
|
|
5367
5367
|
for (let e = 0; e < this.length; e++) {
|
|
5368
|
-
const n =
|
|
5368
|
+
const n = dn.createElement("item");
|
|
5369
5369
|
n.setAttribute("key", this.getFieldValue("KEY" + e)), t.appendChild(n);
|
|
5370
5370
|
}
|
|
5371
5371
|
return t;
|
|
@@ -5385,11 +5385,11 @@ const fn = C.xml, As = {
|
|
|
5385
5385
|
for (let e = 0; e < t.length; e++) {
|
|
5386
5386
|
const n = t[e], o = "ENTRY" + e, i = this.appendValueInput(o);
|
|
5387
5387
|
i.appendField(
|
|
5388
|
-
new z(
|
|
5388
|
+
new z(Ot, 20, 20, void 0, () => {
|
|
5389
5389
|
this.isInFlyout || this.addEntry_(i);
|
|
5390
5390
|
})
|
|
5391
5391
|
), i.appendField(new lt(n), "KEY" + e), i.appendField(
|
|
5392
|
-
new z(
|
|
5392
|
+
new z(Wt, 20, 20, void 0, () => {
|
|
5393
5393
|
this.isInFlyout || this.removeEntry_(i);
|
|
5394
5394
|
})
|
|
5395
5395
|
), this.moveInputBefore(o, "ADD");
|
|
@@ -5397,16 +5397,16 @@ const fn = C.xml, As = {
|
|
|
5397
5397
|
},
|
|
5398
5398
|
addEntry_: function(t) {
|
|
5399
5399
|
let e = this.length;
|
|
5400
|
-
t && (e =
|
|
5400
|
+
t && (e = Pt(t.name.substring(5)));
|
|
5401
5401
|
for (let o = this.length - 1; o >= e; o--)
|
|
5402
5402
|
this.getField("KEY" + o).name = "KEY" + (o + 1), this.getInput("ENTRY" + o).name = "ENTRY" + (o + 1);
|
|
5403
5403
|
const n = this.appendValueInput("ENTRY" + e);
|
|
5404
5404
|
n.appendField(
|
|
5405
|
-
new z(
|
|
5405
|
+
new z(Ot, 20, 20, void 0, () => {
|
|
5406
5406
|
this.isInFlyout || this.addEntry_(n);
|
|
5407
5407
|
})
|
|
5408
5408
|
), n.appendField(new lt("key"), "KEY" + e), n.appendField(
|
|
5409
|
-
new z(
|
|
5409
|
+
new z(Wt, 20, 20, void 0, () => {
|
|
5410
5410
|
this.isInFlyout || this.removeEntry_(n);
|
|
5411
5411
|
})
|
|
5412
5412
|
), e === this.length ? this.moveInputBefore("ENTRY" + e, "ADD") : this.moveInputBefore("ENTRY" + e, "ENTRY" + (e + 1)), this.length++;
|
|
@@ -5414,44 +5414,44 @@ const fn = C.xml, As = {
|
|
|
5414
5414
|
removeEntry_: function(t) {
|
|
5415
5415
|
const e = t.name, n = this.getInputTargetBlock(e);
|
|
5416
5416
|
n && n.dispose(), this.removeInput(e);
|
|
5417
|
-
const o =
|
|
5417
|
+
const o = Pt(e.substring(5));
|
|
5418
5418
|
for (let i = o + 1; i < this.length; i++)
|
|
5419
5419
|
this.getField("KEY" + i).name = "KEY" + (i - 1), this.getInput("ENTRY" + i).name = "ENTRY" + (i - 1);
|
|
5420
5420
|
this.length--;
|
|
5421
5421
|
}
|
|
5422
5422
|
};
|
|
5423
|
-
d.json_map_v1 =
|
|
5424
|
-
const
|
|
5423
|
+
d.json_map_v1 = gs;
|
|
5424
|
+
const As = {
|
|
5425
5425
|
init: function() {
|
|
5426
|
-
this.appendDummyInput().appendField(new
|
|
5426
|
+
this.appendDummyInput().appendField(new Re(0), "VALUE"), this.setOutput(!0, "JsonNumber"), this.setColour(230);
|
|
5427
5427
|
}
|
|
5428
5428
|
};
|
|
5429
|
-
d.json_number_v1 =
|
|
5430
|
-
const
|
|
5429
|
+
d.json_number_v1 = As;
|
|
5430
|
+
const Is = {
|
|
5431
5431
|
init: function() {
|
|
5432
5432
|
this.appendDummyInput().setAlign(v.Align.CENTRE).appendField("JSON"), this.appendValueInput("JSON").setCheck(["JsonMap", "JsonArray"]), this.setDeletable(!1), this.setColour(250), this.setTooltip(""), this.setHelpUrl("");
|
|
5433
5433
|
}
|
|
5434
5434
|
};
|
|
5435
|
-
d.json_root_v1 =
|
|
5436
|
-
const
|
|
5435
|
+
d.json_root_v1 = Is;
|
|
5436
|
+
const Os = {
|
|
5437
5437
|
init: function() {
|
|
5438
5438
|
this.appendDummyInput().appendField('"').appendField(new lt(""), "VALUE").appendField('"'), this.setOutput(!0, "JsonString"), this.setColour(160);
|
|
5439
5439
|
}
|
|
5440
5440
|
};
|
|
5441
|
-
d.json_string_v1 =
|
|
5442
|
-
const
|
|
5441
|
+
d.json_string_v1 = Os;
|
|
5442
|
+
const vs = C.xml, Cs = {
|
|
5443
5443
|
init: function() {
|
|
5444
5444
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5445
5445
|
}
|
|
5446
5446
|
};
|
|
5447
|
-
d.list_create_container_v1 =
|
|
5448
|
-
const
|
|
5447
|
+
d.list_create_container_v1 = Cs;
|
|
5448
|
+
const ys = {
|
|
5449
5449
|
init: function() {
|
|
5450
5450
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5451
5451
|
}
|
|
5452
5452
|
};
|
|
5453
|
-
d.list_create_item_v1 =
|
|
5454
|
-
const
|
|
5453
|
+
d.list_create_item_v1 = ys;
|
|
5454
|
+
const ks = {
|
|
5455
5455
|
init: function() {
|
|
5456
5456
|
this.itemCount_ = 0, this.setMutator(
|
|
5457
5457
|
new ht.MutatorIcon(
|
|
@@ -5461,7 +5461,7 @@ const Ns = {
|
|
|
5461
5461
|
), this.setOutput(!0, "Array"), this.setStyle("list_blocks"), this.setTooltip("%{BKY_LIST_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_LIST_V1_CREATE_HELPURL}"), this.updateShape_();
|
|
5462
5462
|
},
|
|
5463
5463
|
mutationToDom: function() {
|
|
5464
|
-
const t =
|
|
5464
|
+
const t = vs.createElement("mutation");
|
|
5465
5465
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
5466
5466
|
},
|
|
5467
5467
|
domToMutation: function(t) {
|
|
@@ -5533,7 +5533,7 @@ const Ns = {
|
|
|
5533
5533
|
this.removeInput("ADD" + t);
|
|
5534
5534
|
}
|
|
5535
5535
|
};
|
|
5536
|
-
d.list_create_v1 =
|
|
5536
|
+
d.list_create_v1 = ks;
|
|
5537
5537
|
s.forBlock.list_create_v1 = function(t) {
|
|
5538
5538
|
const e = t, n = new Array(e.itemCount_);
|
|
5539
5539
|
for (let i = 0; i < e.itemCount_; i++)
|
|
@@ -5749,7 +5749,7 @@ s.forBlock.list_set_v1 = function(t) {
|
|
|
5749
5749
|
return `${e}[${n}] = ${o};
|
|
5750
5750
|
`;
|
|
5751
5751
|
};
|
|
5752
|
-
const
|
|
5752
|
+
const Ns = {
|
|
5753
5753
|
// logic_compare
|
|
5754
5754
|
EQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_EQ}",
|
|
5755
5755
|
NEQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_NEQ}",
|
|
@@ -5763,7 +5763,7 @@ const Ls = {
|
|
|
5763
5763
|
};
|
|
5764
5764
|
S.register(
|
|
5765
5765
|
"logic_op_tooltip_v1",
|
|
5766
|
-
S.buildTooltipForDropdown("OP",
|
|
5766
|
+
S.buildTooltipForDropdown("OP", Ns)
|
|
5767
5767
|
);
|
|
5768
5768
|
h([
|
|
5769
5769
|
{
|
|
@@ -5788,7 +5788,7 @@ h([
|
|
|
5788
5788
|
s.forBlock.logic_boolean_v1 = function(t) {
|
|
5789
5789
|
return [t.getFieldValue("BOOL") === "TRUE" ? "true" : "false", c.ATOMIC];
|
|
5790
5790
|
};
|
|
5791
|
-
const
|
|
5791
|
+
const Ls = {
|
|
5792
5792
|
onchange: function(t) {
|
|
5793
5793
|
this.prevBlocks_ || (this.prevBlocks_ = [null, null]);
|
|
5794
5794
|
const e = this.getInputTargetBlock("A"), n = this.getInputTargetBlock("B");
|
|
@@ -5808,7 +5808,7 @@ const Ss = {
|
|
|
5808
5808
|
S.register(
|
|
5809
5809
|
"logic_compare_v1",
|
|
5810
5810
|
function() {
|
|
5811
|
-
this.mixin(
|
|
5811
|
+
this.mixin(Ls);
|
|
5812
5812
|
}
|
|
5813
5813
|
);
|
|
5814
5814
|
h([
|
|
@@ -5858,7 +5858,7 @@ s.forBlock.logic_compare_v1 = function(t) {
|
|
|
5858
5858
|
const i = s.valueToCode(t, "A", o) || "0", a = s.valueToCode(t, "B", o) || "0";
|
|
5859
5859
|
return [`${i} ${n} ${a}`, o];
|
|
5860
5860
|
};
|
|
5861
|
-
const
|
|
5861
|
+
const Ss = {
|
|
5862
5862
|
elseIfCount_: 0,
|
|
5863
5863
|
hasElse_: !1,
|
|
5864
5864
|
mutationToDom: function() {
|
|
@@ -5985,7 +5985,7 @@ const Bs = {
|
|
|
5985
5985
|
};
|
|
5986
5986
|
S.registerMutator(
|
|
5987
5987
|
"logic_if_v1_mutator",
|
|
5988
|
-
|
|
5988
|
+
Ss,
|
|
5989
5989
|
void 0,
|
|
5990
5990
|
["logic_if_else_if_v1", "logic_if_else_v1"]
|
|
5991
5991
|
);
|
|
@@ -6131,7 +6131,7 @@ s.forBlock.logic_operation_v1 = function(t) {
|
|
|
6131
6131
|
}
|
|
6132
6132
|
return [`${o} ${e} ${i}`, n];
|
|
6133
6133
|
};
|
|
6134
|
-
const
|
|
6134
|
+
const Bs = {
|
|
6135
6135
|
prevParentConnection_: null,
|
|
6136
6136
|
onchange: function(t) {
|
|
6137
6137
|
const e = this.getInputTargetBlock("THEN"), n = this.getInputTargetBlock("ELSE"), o = this.outputConnection.targetConnection;
|
|
@@ -6146,7 +6146,7 @@ const bs = {
|
|
|
6146
6146
|
this.prevParentConnection_ = o;
|
|
6147
6147
|
}
|
|
6148
6148
|
};
|
|
6149
|
-
S.registerMixin("logic_ternary_v1",
|
|
6149
|
+
S.registerMixin("logic_ternary_v1", Bs);
|
|
6150
6150
|
h([
|
|
6151
6151
|
{
|
|
6152
6152
|
type: "logic_ternary_v1",
|
|
@@ -6183,7 +6183,7 @@ s.forBlock.logic_ternary_v1 = function(t) {
|
|
|
6183
6183
|
const e = s.valueToCode(t, "IF", c.CONDITIONAL) || "false", n = s.valueToCode(t, "THEN", c.CONDITIONAL) || "null", o = s.valueToCode(t, "ELSE", c.CONDITIONAL) || "null";
|
|
6184
6184
|
return [e + " ? " + n + " : " + o, c.CONDITIONAL];
|
|
6185
6185
|
};
|
|
6186
|
-
const
|
|
6186
|
+
const bs = {
|
|
6187
6187
|
customContextMenu: function(t) {
|
|
6188
6188
|
if (this.isInFlyout)
|
|
6189
6189
|
return;
|
|
@@ -6198,14 +6198,14 @@ const Ps = {
|
|
|
6198
6198
|
t.push({
|
|
6199
6199
|
enabled: !0,
|
|
6200
6200
|
text: p("VARIABLE_SET_CREATE_GET").replace("%1", o),
|
|
6201
|
-
callback:
|
|
6201
|
+
callback: vn.callbackFactory(this, i)
|
|
6202
6202
|
});
|
|
6203
6203
|
}
|
|
6204
6204
|
}
|
|
6205
6205
|
};
|
|
6206
6206
|
S.registerMixin(
|
|
6207
6207
|
"contextMenu_newGetVariableBlock_v1",
|
|
6208
|
-
|
|
6208
|
+
bs
|
|
6209
6209
|
);
|
|
6210
6210
|
S.register(
|
|
6211
6211
|
"flow_control_tooltip_v1",
|
|
@@ -6214,16 +6214,16 @@ S.register(
|
|
|
6214
6214
|
CONTINUE: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_CONTINUE}"
|
|
6215
6215
|
})
|
|
6216
6216
|
);
|
|
6217
|
-
const
|
|
6217
|
+
const Ps = /* @__PURE__ */ new Set([
|
|
6218
6218
|
"repeat_v1",
|
|
6219
6219
|
"for_each_v1",
|
|
6220
6220
|
"for_v1",
|
|
6221
6221
|
"while_until_v1"
|
|
6222
|
-
]),
|
|
6222
|
+
]), Rs = {
|
|
6223
6223
|
getSurroundLoop: function() {
|
|
6224
6224
|
let t = this;
|
|
6225
6225
|
do {
|
|
6226
|
-
if (
|
|
6226
|
+
if (Ps.has(t.type))
|
|
6227
6227
|
return t;
|
|
6228
6228
|
t = t?.getSurroundParent();
|
|
6229
6229
|
} while (t);
|
|
@@ -6244,7 +6244,7 @@ const Rs = /* @__PURE__ */ new Set([
|
|
|
6244
6244
|
};
|
|
6245
6245
|
S.registerMixin(
|
|
6246
6246
|
"flow_control_in_loop_check_v1",
|
|
6247
|
-
|
|
6247
|
+
Rs
|
|
6248
6248
|
);
|
|
6249
6249
|
h([
|
|
6250
6250
|
{
|
|
@@ -6546,7 +6546,7 @@ s.forBlock.while_until_v1 = function(t) {
|
|
|
6546
6546
|
${o}}
|
|
6547
6547
|
`;
|
|
6548
6548
|
};
|
|
6549
|
-
const
|
|
6549
|
+
const Ds = {
|
|
6550
6550
|
// math_arithmetic
|
|
6551
6551
|
ADD: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_ADD}",
|
|
6552
6552
|
SUBTRACT: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_SUBTRACT}",
|
|
@@ -6580,7 +6580,7 @@ const Ms = {
|
|
|
6580
6580
|
};
|
|
6581
6581
|
S.register(
|
|
6582
6582
|
"math_op_tooltip_v1",
|
|
6583
|
-
S.buildTooltipForDropdown("OP",
|
|
6583
|
+
S.buildTooltipForDropdown("OP", Ds)
|
|
6584
6584
|
);
|
|
6585
6585
|
h([
|
|
6586
6586
|
{
|
|
@@ -7183,21 +7183,21 @@ s.forBlock.math_trig_v1 = function(t) {
|
|
|
7183
7183
|
}
|
|
7184
7184
|
return [o, c.DIVISION];
|
|
7185
7185
|
};
|
|
7186
|
-
const
|
|
7186
|
+
const Ms = C.xml, Us = {
|
|
7187
7187
|
init: function() {
|
|
7188
7188
|
this.appendDummyInput().appendField(
|
|
7189
7189
|
"%{BKY_OBJECT_V1_CREATE_CONTAINER_TITLE}"
|
|
7190
7190
|
), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
7191
7191
|
}
|
|
7192
7192
|
};
|
|
7193
|
-
d.object_create_container_v1 =
|
|
7194
|
-
const
|
|
7193
|
+
d.object_create_container_v1 = Us;
|
|
7194
|
+
const Vs = {
|
|
7195
7195
|
init: function() {
|
|
7196
7196
|
this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
7197
7197
|
}
|
|
7198
7198
|
};
|
|
7199
|
-
d.object_create_item_v1 =
|
|
7200
|
-
const
|
|
7199
|
+
d.object_create_item_v1 = Vs;
|
|
7200
|
+
const xs = {
|
|
7201
7201
|
init: function() {
|
|
7202
7202
|
this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(
|
|
7203
7203
|
new ht.MutatorIcon(
|
|
@@ -7207,7 +7207,7 @@ const Fs = {
|
|
|
7207
7207
|
), this.setOutput(!0, "Object"), this.setStyle("object_blocks"), this.setTooltip("%{BKY_OBJECT_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_OBJECT_V1_CREATE_HELPURL}");
|
|
7208
7208
|
},
|
|
7209
7209
|
mutationToDom: function() {
|
|
7210
|
-
const t =
|
|
7210
|
+
const t = Ms.createElement("mutation");
|
|
7211
7211
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
7212
7212
|
},
|
|
7213
7213
|
domToMutation: function(t) {
|
|
@@ -7271,7 +7271,7 @@ const Fs = {
|
|
|
7271
7271
|
this.removeInput("ADD" + t);
|
|
7272
7272
|
}
|
|
7273
7273
|
};
|
|
7274
|
-
d.object_create_v1 =
|
|
7274
|
+
d.object_create_v1 = xs;
|
|
7275
7275
|
s.forBlock.object_create_v1 = function(t) {
|
|
7276
7276
|
const e = t;
|
|
7277
7277
|
let n = "{";
|
|
@@ -7513,15 +7513,15 @@ h([
|
|
|
7513
7513
|
s.forBlock.object_to_json_v1 = function(t) {
|
|
7514
7514
|
return [`__jsonStringifyV1__(${s.valueToCode(t, "OBJECT", c.NONE) || "null"})`, c.FUNCTION_CALL];
|
|
7515
7515
|
};
|
|
7516
|
-
const
|
|
7516
|
+
const fn = C.xml, Fs = {
|
|
7517
7517
|
init: function() {
|
|
7518
|
-
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new
|
|
7518
|
+
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new Co(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
7519
7519
|
}
|
|
7520
7520
|
};
|
|
7521
|
-
d.procedure_def_container_v1 =
|
|
7522
|
-
const
|
|
7521
|
+
d.procedure_def_container_v1 = Fs;
|
|
7522
|
+
const Ys = {
|
|
7523
7523
|
init: function() {
|
|
7524
|
-
const t = new lt(
|
|
7524
|
+
const t = new lt(De.DEFAULT_ARG);
|
|
7525
7525
|
t.setValidator(this.validator_), this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_ITEM_TITLE}").appendField(t, "NAME"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
7526
7526
|
},
|
|
7527
7527
|
validator_: function(t) {
|
|
@@ -7541,14 +7541,14 @@ const ws = {
|
|
|
7541
7541
|
return t;
|
|
7542
7542
|
}
|
|
7543
7543
|
};
|
|
7544
|
-
d.procedure_def_item_v1 =
|
|
7545
|
-
const
|
|
7544
|
+
d.procedure_def_item_v1 = Ys;
|
|
7545
|
+
const ws = {
|
|
7546
7546
|
init: function() {
|
|
7547
7547
|
this.withReturn = !1, this.args = [];
|
|
7548
7548
|
const t = new lt(
|
|
7549
|
-
|
|
7549
|
+
De.findLegalName("", this)
|
|
7550
7550
|
);
|
|
7551
|
-
t.setValidator(
|
|
7551
|
+
t.setValidator(De.rename), t.setSpellcheck(!1), this.appendDummyInput("DUMMY").appendField(t, "NAME"), this.appendStatementInput("HANDLE"), this.setMutator(
|
|
7552
7552
|
new ht.MutatorIcon(
|
|
7553
7553
|
["procedure_def_item_v1"],
|
|
7554
7554
|
this
|
|
@@ -7556,9 +7556,9 @@ const Ks = {
|
|
|
7556
7556
|
), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_PROCEDURE_V1_DEF_TOOLTIP}"), this.setHelpUrl("%{BKY_PROCEDURE_V1_DEF_HELPURL}");
|
|
7557
7557
|
},
|
|
7558
7558
|
mutationToDom: function() {
|
|
7559
|
-
const t =
|
|
7559
|
+
const t = fn.createElement("mutation");
|
|
7560
7560
|
return t.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), this.args.forEach((e) => {
|
|
7561
|
-
const n =
|
|
7561
|
+
const n = fn.createElement("arg");
|
|
7562
7562
|
n.setAttribute("name", e.name), n.setAttribute("id", e.id), t.appendChild(n);
|
|
7563
7563
|
}), t;
|
|
7564
7564
|
},
|
|
@@ -7634,7 +7634,7 @@ const Ks = {
|
|
|
7634
7634
|
o.setKeyName(`__param@${e.id}__`, e.name, !1);
|
|
7635
7635
|
else
|
|
7636
7636
|
try {
|
|
7637
|
-
O.disable(), o =
|
|
7637
|
+
O.disable(), o = We(
|
|
7638
7638
|
this.workspace,
|
|
7639
7639
|
`__param@${e.id}__`,
|
|
7640
7640
|
e.name,
|
|
@@ -7646,13 +7646,13 @@ const Ks = {
|
|
|
7646
7646
|
}
|
|
7647
7647
|
}
|
|
7648
7648
|
};
|
|
7649
|
-
d.procedure_def_v1 =
|
|
7650
|
-
const
|
|
7649
|
+
d.procedure_def_v1 = ws;
|
|
7650
|
+
const Ks = C.xml, $s = {
|
|
7651
7651
|
init: function() {
|
|
7652
7652
|
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}");
|
|
7653
7653
|
},
|
|
7654
7654
|
mutationToDom: function() {
|
|
7655
|
-
const t =
|
|
7655
|
+
const t = Ks.createElement("mutation");
|
|
7656
7656
|
return t.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), t;
|
|
7657
7657
|
},
|
|
7658
7658
|
domToMutation: function(t) {
|
|
@@ -7703,14 +7703,14 @@ const $s = C.xml, Hs = {
|
|
|
7703
7703
|
t.type === "procedure_def_v1" || t.type === "func_entry_v1" ? this.setWarningText(null) : this.setWarningText("the block can only be used in procedure block");
|
|
7704
7704
|
}
|
|
7705
7705
|
};
|
|
7706
|
-
d.procedure_return_v1 =
|
|
7706
|
+
d.procedure_return_v1 = $s;
|
|
7707
7707
|
s.forBlock.procedure_return_v1 = function(t) {
|
|
7708
7708
|
const e = t;
|
|
7709
7709
|
return e.withReturn ? `return ${s.valueToCode(e, "VALUE", c.NONE) || "null"};
|
|
7710
7710
|
` : `return;
|
|
7711
7711
|
`;
|
|
7712
7712
|
};
|
|
7713
|
-
const
|
|
7713
|
+
const Hs = {
|
|
7714
7714
|
init: function() {
|
|
7715
7715
|
this.appendDummyInput().appendField("%{BKY_ASSET_V1_DOWNLOAD_ASSET_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_ASSET_V1_DOWNLOAD_ASSET_TOOLTIP}"), this.setHelpUrl("%{BKY_ASSET_V1_DOWNLOAD_ASSET_HELPURL}");
|
|
7716
7716
|
},
|
|
@@ -7733,7 +7733,7 @@ const Gs = {
|
|
|
7733
7733
|
]);
|
|
7734
7734
|
}
|
|
7735
7735
|
};
|
|
7736
|
-
d.download_resource_v1 =
|
|
7736
|
+
d.download_resource_v1 = Hs;
|
|
7737
7737
|
s.forBlock.download_resource_v1 = function(t) {
|
|
7738
7738
|
const e = s.valueToCode(t, "ASSET", c.ATOMIC) || null, n = s.statementToCode(t, "HANDLE");
|
|
7739
7739
|
return `{
|
|
@@ -7745,7 +7745,7 @@ ${n}
|
|
|
7745
7745
|
}
|
|
7746
7746
|
`;
|
|
7747
7747
|
};
|
|
7748
|
-
function
|
|
7748
|
+
function Wn(t) {
|
|
7749
7749
|
const e = f.resource.spaces.find((i) => i.id === t);
|
|
7750
7750
|
if (!e)
|
|
7751
7751
|
return [];
|
|
@@ -7761,13 +7761,13 @@ function jn(t) {
|
|
|
7761
7761
|
}
|
|
7762
7762
|
return o(e.dirTree, ""), n;
|
|
7763
7763
|
}
|
|
7764
|
-
function
|
|
7764
|
+
function Gs(t) {
|
|
7765
7765
|
const e = [];
|
|
7766
|
-
return
|
|
7766
|
+
return Wn(t).forEach(({ id: o, name: i }) => {
|
|
7767
7767
|
e.push([i, o]);
|
|
7768
7768
|
}), k(e);
|
|
7769
7769
|
}
|
|
7770
|
-
function
|
|
7770
|
+
function jn(t, e) {
|
|
7771
7771
|
const n = f.resource.spaces.find((i) => i.id === t);
|
|
7772
7772
|
if (!n)
|
|
7773
7773
|
return [];
|
|
@@ -7776,25 +7776,25 @@ function Xn(t, e) {
|
|
|
7776
7776
|
i.dirid === e && o.push(i);
|
|
7777
7777
|
}), o;
|
|
7778
7778
|
}
|
|
7779
|
-
function
|
|
7779
|
+
function Ws(t, e) {
|
|
7780
7780
|
const n = [];
|
|
7781
|
-
return
|
|
7781
|
+
return jn(t, e).forEach(({ id: i, name: a }) => {
|
|
7782
7782
|
n.push([a, i]);
|
|
7783
7783
|
}), k(n);
|
|
7784
7784
|
}
|
|
7785
|
-
function
|
|
7785
|
+
function Xn() {
|
|
7786
7786
|
const t = [];
|
|
7787
7787
|
return f.resource.spaces.forEach((e) => {
|
|
7788
7788
|
e.resources.length > 0 && t.push(e);
|
|
7789
7789
|
}), t;
|
|
7790
7790
|
}
|
|
7791
|
-
function
|
|
7791
|
+
function js() {
|
|
7792
7792
|
const t = [];
|
|
7793
|
-
return
|
|
7793
|
+
return Xn().forEach(({ id: n, name: o }) => {
|
|
7794
7794
|
t.push([o, n]);
|
|
7795
7795
|
}), k(t);
|
|
7796
7796
|
}
|
|
7797
|
-
const
|
|
7797
|
+
const Xs = {
|
|
7798
7798
|
init: function() {
|
|
7799
7799
|
this.space = {
|
|
7800
7800
|
id: "",
|
|
@@ -7813,19 +7813,19 @@ const Js = {
|
|
|
7813
7813
|
initData_: function() {
|
|
7814
7814
|
if (this.space.id)
|
|
7815
7815
|
return;
|
|
7816
|
-
const t =
|
|
7816
|
+
const t = Xn()?.[0];
|
|
7817
7817
|
if (!t)
|
|
7818
7818
|
return;
|
|
7819
7819
|
this.space.id = t.id, this.space.name = t.name;
|
|
7820
7820
|
const e = this.getField("SPACE");
|
|
7821
7821
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
7822
|
-
const n =
|
|
7822
|
+
const n = Wn(this.space.id)?.[0];
|
|
7823
7823
|
if (!n)
|
|
7824
7824
|
return;
|
|
7825
7825
|
this.dir.id = n.id, this.dir.name = n.name;
|
|
7826
7826
|
const o = this.getField("DIR");
|
|
7827
7827
|
o.getOptions(!1), o.setValue(this.dir.id);
|
|
7828
|
-
const i =
|
|
7828
|
+
const i = jn(this.space.id, this.dir.id)?.[0];
|
|
7829
7829
|
if (!i)
|
|
7830
7830
|
return;
|
|
7831
7831
|
this.resource.id = i.id, this.resource.name = i.name;
|
|
@@ -7840,23 +7840,23 @@ const Js = {
|
|
|
7840
7840
|
};
|
|
7841
7841
|
},
|
|
7842
7842
|
loadExtraState: function(t) {
|
|
7843
|
-
this.space =
|
|
7843
|
+
this.space = ve(t.space), this.dir = ve(t.dir), this.resource = ve(t.resource);
|
|
7844
7844
|
},
|
|
7845
7845
|
genSpaceOpts_: function() {
|
|
7846
|
-
return
|
|
7846
|
+
return js();
|
|
7847
7847
|
},
|
|
7848
7848
|
genDirOpts_: function() {
|
|
7849
|
-
return
|
|
7849
|
+
return Gs(this.space.id);
|
|
7850
7850
|
},
|
|
7851
7851
|
genResourceOpts_: function() {
|
|
7852
|
-
return
|
|
7852
|
+
return Ws(this.space.id, this.dir.id);
|
|
7853
7853
|
}
|
|
7854
7854
|
};
|
|
7855
|
-
d.select_resource_v1 =
|
|
7855
|
+
d.select_resource_v1 = Xs;
|
|
7856
7856
|
s.forBlock.select_resource_v1 = function() {
|
|
7857
7857
|
return "";
|
|
7858
7858
|
};
|
|
7859
|
-
const
|
|
7859
|
+
const Js = {
|
|
7860
7860
|
init: function() {
|
|
7861
7861
|
this.appendDummyInput().appendField(
|
|
7862
7862
|
"%{BKY_RESOURCE_V1_UPLOAD_RESOURCE_TITLE}"
|
|
@@ -7887,7 +7887,7 @@ const qs = {
|
|
|
7887
7887
|
]);
|
|
7888
7888
|
}
|
|
7889
7889
|
};
|
|
7890
|
-
d.upload_resource_v1 =
|
|
7890
|
+
d.upload_resource_v1 = Js;
|
|
7891
7891
|
s.forBlock.upload_resource_v1 = function(t) {
|
|
7892
7892
|
const e = s.valueToCode(t, "NAME", c.ATOMIC) || "''", n = s.valueToCode(t, "DIR", c.ATOMIC) || "null", o = s.valueToCode(t, "DATA", c.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
|
|
7893
7893
|
return `{
|
|
@@ -7920,9 +7920,9 @@ h([
|
|
|
7920
7920
|
s.forBlock.text_v1 = function(t) {
|
|
7921
7921
|
return [s.quote_(t.getFieldValue("TEXT")), c.ATOMIC];
|
|
7922
7922
|
};
|
|
7923
|
-
const
|
|
7924
|
-
function
|
|
7925
|
-
return
|
|
7923
|
+
const qs = /^\s*'([^']|\\')*'\s*$/;
|
|
7924
|
+
function Ht(t) {
|
|
7925
|
+
return qs.test(t) ? [t, c.ATOMIC] : [`String(${t})`, c.FUNCTION_CALL];
|
|
7926
7926
|
}
|
|
7927
7927
|
S.register(
|
|
7928
7928
|
"text_append_tooltip_v1",
|
|
@@ -7957,7 +7957,7 @@ s.forBlock.text_append_v1 = function(t) {
|
|
|
7957
7957
|
t.getFieldValue("VAR"),
|
|
7958
7958
|
et.NameType.VARIABLE
|
|
7959
7959
|
), n = s.valueToCode(t, "TEXT", c.NONE) || "''";
|
|
7960
|
-
return `${e} += ${
|
|
7960
|
+
return `${e} += ${Ht(n)};
|
|
7961
7961
|
`;
|
|
7962
7962
|
};
|
|
7963
7963
|
h([
|
|
@@ -8126,10 +8126,10 @@ h([
|
|
|
8126
8126
|
s.forBlock.text_is_empty_v1 = function(t) {
|
|
8127
8127
|
return [`!${s.valueToCode(t, "VALUE", c.MEMBER) || "''"}.length`, c.LOGICAL_NOT];
|
|
8128
8128
|
};
|
|
8129
|
-
const
|
|
8129
|
+
const Qs = C.xml, zs = {
|
|
8130
8130
|
itemCount_: 0,
|
|
8131
8131
|
mutationToDom: function() {
|
|
8132
|
-
const t =
|
|
8132
|
+
const t = Qs.createElement("mutation");
|
|
8133
8133
|
return t.setAttribute("items", `${this.itemCount_}`), t;
|
|
8134
8134
|
},
|
|
8135
8135
|
domToMutation: function(t) {
|
|
@@ -8200,13 +8200,13 @@ const zs = C.xml, Zs = {
|
|
|
8200
8200
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
8201
8201
|
this.removeInput("ADD" + t);
|
|
8202
8202
|
}
|
|
8203
|
-
},
|
|
8203
|
+
}, Zs = function() {
|
|
8204
8204
|
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new ht.MutatorIcon(["text_join_item_v1"], this));
|
|
8205
8205
|
};
|
|
8206
8206
|
S.registerMutator(
|
|
8207
8207
|
"text_join_mutator_v1",
|
|
8208
|
-
|
|
8209
|
-
|
|
8208
|
+
zs,
|
|
8209
|
+
Zs
|
|
8210
8210
|
);
|
|
8211
8211
|
h([
|
|
8212
8212
|
{
|
|
@@ -8249,11 +8249,11 @@ s.forBlock.text_join_v1 = function(t) {
|
|
|
8249
8249
|
return ["''", c.ATOMIC];
|
|
8250
8250
|
case 1: {
|
|
8251
8251
|
const n = s.valueToCode(e, "ADD0", c.NONE) || "''";
|
|
8252
|
-
return
|
|
8252
|
+
return Ht(n);
|
|
8253
8253
|
}
|
|
8254
8254
|
case 2: {
|
|
8255
8255
|
const n = s.valueToCode(e, "ADD0", c.NONE) || "''", o = s.valueToCode(e, "ADD1", c.NONE) || "''";
|
|
8256
|
-
return [
|
|
8256
|
+
return [Ht(n)[0] + " + " + Ht(o)[0], c.ADDITION];
|
|
8257
8257
|
}
|
|
8258
8258
|
default: {
|
|
8259
8259
|
const n = new Array(e.itemCount_);
|
|
@@ -8438,7 +8438,7 @@ s.forBlock.text_trim_v1 = function(t) {
|
|
|
8438
8438
|
}[t.getFieldValue("MODE")];
|
|
8439
8439
|
return [`__trimV1__(${e}, ${o})`, c.ATOMIC];
|
|
8440
8440
|
};
|
|
8441
|
-
const
|
|
8441
|
+
const ta = {
|
|
8442
8442
|
init: function() {
|
|
8443
8443
|
this.appendDummyInput().appendField("%{BKY_TIME_V1_CREATE_TIMER_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("time_blocks"), this.setTooltip("%{BKY_TIME_V1_CREATE_TIMER_TOOLTIP}"), this.setHelpUrl("%{BKY_TIME_V1_CREATE_TIMER_HELPURL}");
|
|
8444
8444
|
},
|
|
@@ -8454,17 +8454,17 @@ const ea = {
|
|
|
8454
8454
|
updateShadow_: function() {
|
|
8455
8455
|
if (this.isInsertionMarker())
|
|
8456
8456
|
return;
|
|
8457
|
-
const t =
|
|
8457
|
+
const t = Jt(1e3);
|
|
8458
8458
|
this.getInput("INTERVAL")?.setShadowDom(t);
|
|
8459
|
-
const e =
|
|
8459
|
+
const e = qt(!1);
|
|
8460
8460
|
this.getInput("LOOP")?.setShadowDom(e);
|
|
8461
|
-
const n =
|
|
8461
|
+
const n = Jt(1);
|
|
8462
8462
|
this.getInput("COUNT")?.setShadowDom(n);
|
|
8463
|
-
const o =
|
|
8463
|
+
const o = qt(!1);
|
|
8464
8464
|
this.getInput("IMMEDIATE")?.setShadowDom(o);
|
|
8465
8465
|
}
|
|
8466
8466
|
};
|
|
8467
|
-
d.create_timer_v1 =
|
|
8467
|
+
d.create_timer_v1 = ta;
|
|
8468
8468
|
s.forBlock.create_timer_v1 = function(t) {
|
|
8469
8469
|
const e = s.valueToCode(t, "INTERVAL", c.ATOMIC) || "1000", n = s.valueToCode(t, "LOOP", c.ATOMIC) || "false", o = s.valueToCode(t, "COUNT", c.ATOMIC) || "1", i = s.valueToCode(t, "IMMEDIATE", c.ATOMIC) || "false", a = s.statementToCode(t, "CALLBACK");
|
|
8470
8470
|
return `__createTimerV1__(${e}, ${n}, ${o}, ${i}, function() {
|
|
@@ -8493,18 +8493,18 @@ s.forBlock.delay_v1 = function(t) {
|
|
|
8493
8493
|
return `__delayV1__(${s.valueToCode(t, "DURATION", c.ATOMIC) || "0"});
|
|
8494
8494
|
`;
|
|
8495
8495
|
};
|
|
8496
|
-
const
|
|
8496
|
+
const ea = {
|
|
8497
8497
|
customContextMenu: function(t) {
|
|
8498
8498
|
if (this.isInFlyout) {
|
|
8499
8499
|
if (this.type === "variable_get_v1") {
|
|
8500
8500
|
const e = {
|
|
8501
8501
|
text: p("RENAME_VARIABLE"),
|
|
8502
8502
|
enabled: !0,
|
|
8503
|
-
callback:
|
|
8503
|
+
callback: na(this)
|
|
8504
8504
|
}, n = this.getField("VAR").getText(), o = {
|
|
8505
8505
|
text: p("DELETE_VARIABLE").replace("%1", n),
|
|
8506
8506
|
enabled: !0,
|
|
8507
|
-
callback:
|
|
8507
|
+
callback: oa(this)
|
|
8508
8508
|
};
|
|
8509
8509
|
t.unshift(e), t.unshift(o);
|
|
8510
8510
|
}
|
|
@@ -8518,24 +8518,24 @@ const na = {
|
|
|
8518
8518
|
t.push({
|
|
8519
8519
|
enabled: this.workspace.remainingCapacity() > 0,
|
|
8520
8520
|
text: n.replace("%1", o.getText()),
|
|
8521
|
-
callback:
|
|
8521
|
+
callback: vn.callbackFactory(this, i)
|
|
8522
8522
|
});
|
|
8523
8523
|
}
|
|
8524
8524
|
}
|
|
8525
|
-
},
|
|
8525
|
+
}, na = function(t) {
|
|
8526
8526
|
return function() {
|
|
8527
8527
|
const e = t.workspace, o = t.getField("VAR").getVariable();
|
|
8528
|
-
|
|
8528
|
+
At.renameVariable(e, o);
|
|
8529
8529
|
};
|
|
8530
|
-
},
|
|
8530
|
+
}, oa = function(t) {
|
|
8531
8531
|
return function() {
|
|
8532
8532
|
const n = t.getField("VAR").getVariable();
|
|
8533
|
-
n &&
|
|
8533
|
+
n && At.deleteVariable(n.getWorkspace(), n, t);
|
|
8534
8534
|
};
|
|
8535
8535
|
};
|
|
8536
8536
|
S.registerMixin(
|
|
8537
8537
|
"context_menu_variable_v1",
|
|
8538
|
-
|
|
8538
|
+
ea
|
|
8539
8539
|
);
|
|
8540
8540
|
h([
|
|
8541
8541
|
{
|
|
@@ -8603,13 +8603,13 @@ function A(t, e) {
|
|
|
8603
8603
|
n.appendChild(o);
|
|
8604
8604
|
return n;
|
|
8605
8605
|
}
|
|
8606
|
-
function
|
|
8606
|
+
function Jn(t) {
|
|
8607
8607
|
const e = x.createElement("mutation");
|
|
8608
8608
|
for (const { key: n, value: o } of t)
|
|
8609
8609
|
e.setAttribute(n, o);
|
|
8610
8610
|
return e;
|
|
8611
8611
|
}
|
|
8612
|
-
function
|
|
8612
|
+
function Ct(t, e) {
|
|
8613
8613
|
e === void 0 && (e = "");
|
|
8614
8614
|
const n = x.createElement("value");
|
|
8615
8615
|
n.setAttribute("name", t);
|
|
@@ -8620,7 +8620,7 @@ function vt(t, e) {
|
|
|
8620
8620
|
const a = x.createTextNode(e);
|
|
8621
8621
|
return i.appendChild(a), o.appendChild(i), n.appendChild(o), n;
|
|
8622
8622
|
}
|
|
8623
|
-
function
|
|
8623
|
+
function mn(t, e) {
|
|
8624
8624
|
e === void 0 && (e = 0);
|
|
8625
8625
|
const n = x.createElement("value");
|
|
8626
8626
|
n.setAttribute("name", t);
|
|
@@ -8631,7 +8631,7 @@ function Tn(t, e) {
|
|
|
8631
8631
|
const a = x.createTextNode(String(e));
|
|
8632
8632
|
return i.appendChild(a), o.appendChild(i), n.appendChild(o), n;
|
|
8633
8633
|
}
|
|
8634
|
-
function
|
|
8634
|
+
function ia(t, e) {
|
|
8635
8635
|
e === void 0 && (e = !1);
|
|
8636
8636
|
const n = x.createElement("value");
|
|
8637
8637
|
n.setAttribute("name", t);
|
|
@@ -8642,92 +8642,92 @@ function sa(t, e) {
|
|
|
8642
8642
|
const a = x.createTextNode(e ? "TRUE" : "FALSE");
|
|
8643
8643
|
return i.appendChild(a), o.appendChild(i), n.appendChild(o), n;
|
|
8644
8644
|
}
|
|
8645
|
-
function
|
|
8645
|
+
function sa() {
|
|
8646
8646
|
return f.app.activeObject.type === "comp" && f.app.activeComp.meta.events.length > 0;
|
|
8647
8647
|
}
|
|
8648
|
-
function
|
|
8648
|
+
function aa() {
|
|
8649
8649
|
return f.app.activeObject.type === "comp" && f.app.activeComp.meta.states.length > 0;
|
|
8650
8650
|
}
|
|
8651
|
-
function
|
|
8651
|
+
function Tn() {
|
|
8652
8652
|
return f.app.activeObject.type === "comp" && f.app.activeComp.meta.methods.length > 0;
|
|
8653
8653
|
}
|
|
8654
|
-
function
|
|
8654
|
+
function ca() {
|
|
8655
8655
|
const t = [];
|
|
8656
|
-
return t.push(V(p("LABEL_EVENT"))), G("onEvent") && t.push(A("on_app_event_v1")),
|
|
8657
|
-
A("app_bind_v1", [
|
|
8658
|
-
), t.push(A("watch_effect_v1")), (G("getProp") || G("setProp")) && t.push(V(p("LABEL_PROPERTY"))), G("getProp") && t.push(A("get_app_prop_v1")), G("setProp") && t.push(A("set_app_prop_v1")),
|
|
8656
|
+
return t.push(V(p("LABEL_EVENT"))), G("onEvent") && t.push(A("on_app_event_v1")), sa() && t.push(A("trigger_app_event_v1")), t.push(
|
|
8657
|
+
A("app_bind_v1", [Jn([{ key: "items", value: "2" }])])
|
|
8658
|
+
), t.push(A("watch_effect_v1")), (G("getProp") || G("setProp")) && t.push(V(p("LABEL_PROPERTY"))), G("getProp") && t.push(A("get_app_prop_v1")), G("setProp") && t.push(A("set_app_prop_v1")), aa() && (t.push(V(p("LABEL_STATE"))), t.push(A("get_app_state_v1")), t.push(A("set_app_state_v1"))), (G("callMethod") || Tn()) && t.push(V(p("LABEL_METHOD"))), G("callMethod") && t.push(A("call_app_method_v1")), Tn() && (t.push(A("impl_app_method_v1")), t.push(A("set_app_method_output_v1")), t.push(A("procedure_return_v1"))), t;
|
|
8659
8659
|
}
|
|
8660
|
-
const
|
|
8661
|
-
function
|
|
8660
|
+
const qn = { name: "APP_COMP_CATEGORY", callback: ca };
|
|
8661
|
+
function ra() {
|
|
8662
8662
|
const t = [];
|
|
8663
8663
|
return t.push(V(p("LABEL_FUNC"))), t.push(V(p("LABEL_FLOW"))), t;
|
|
8664
8664
|
}
|
|
8665
|
-
const
|
|
8666
|
-
function
|
|
8665
|
+
const Zt = { name: "APP_COMPUTE_CATEGORY", callback: ra };
|
|
8666
|
+
function ua() {
|
|
8667
8667
|
const t = [];
|
|
8668
|
-
return t.push(A("app_debug_trace_v1", [
|
|
8668
|
+
return t.push(A("app_debug_trace_v1", [Ct("OBJECT")])), t.push(A("popup_message_v1", [Ct("TEXT")])), t.push(A("open_confirm_dlg_v1")), t.push(A("open_prompt_dlg_v1")), t;
|
|
8669
8669
|
}
|
|
8670
|
-
const
|
|
8671
|
-
function
|
|
8670
|
+
const te = { name: "APP_MESSAGE_CATEGORY", callback: ua };
|
|
8671
|
+
function la() {
|
|
8672
8672
|
for (const t of f.app.appList)
|
|
8673
8673
|
if (t.pages.length > 0)
|
|
8674
8674
|
return !0;
|
|
8675
8675
|
return !1;
|
|
8676
8676
|
}
|
|
8677
|
-
function
|
|
8677
|
+
function _a() {
|
|
8678
8678
|
const t = [];
|
|
8679
|
-
return t.push(A("app_env_is_v1")),
|
|
8679
|
+
return t.push(A("app_env_is_v1")), la() && t.push(A("navigate_to_v1")), t;
|
|
8680
8680
|
}
|
|
8681
|
-
const
|
|
8682
|
-
function
|
|
8681
|
+
const ee = { name: "APP_MISC_CATEGORY", callback: _a };
|
|
8682
|
+
function pa() {
|
|
8683
8683
|
return f.app.activeObject.type === "page" && f.app.activePage.meta.states.length > 0;
|
|
8684
8684
|
}
|
|
8685
|
-
function
|
|
8685
|
+
function ha() {
|
|
8686
8686
|
return f.app.activeObject.type === "page" && f.app.activePage.meta.arguments.length > 0;
|
|
8687
8687
|
}
|
|
8688
|
-
function
|
|
8688
|
+
function da() {
|
|
8689
8689
|
const t = [];
|
|
8690
8690
|
return t.push(V(p("LABEL_EVENT"))), G("onEvent") && t.push(A("on_app_event_v1")), t.push(
|
|
8691
|
-
A("app_bind_v1", [
|
|
8692
|
-
), t.push(A("watch_effect_v1")), (G("getProp") || G("setProp")) && t.push(V(p("LABEL_PROPERTY"))), G("getProp") && t.push(A("get_app_prop_v1")), G("setProp") && t.push(A("set_app_prop_v1")),
|
|
8691
|
+
A("app_bind_v1", [Jn([{ key: "items", value: "2" }])])
|
|
8692
|
+
), t.push(A("watch_effect_v1")), (G("getProp") || G("setProp")) && t.push(V(p("LABEL_PROPERTY"))), G("getProp") && t.push(A("get_app_prop_v1")), G("setProp") && t.push(A("set_app_prop_v1")), pa() && (t.push(V(p("LABEL_STATE"))), t.push(A("get_app_state_v1")), t.push(A("set_app_state_v1"))), G("callMethod") && (t.push(V(p("LABEL_METHOD"))), t.push(A("call_app_method_v1"))), ha() && (t.push(V(p("LABEL_ARGUMENT"))), t.push(A("get_page_argument_v1"))), t;
|
|
8693
8693
|
}
|
|
8694
|
-
const
|
|
8695
|
-
function
|
|
8694
|
+
const Qn = { name: "APP_PAGE_CATEGORY", callback: da };
|
|
8695
|
+
function fa() {
|
|
8696
8696
|
const t = [];
|
|
8697
8697
|
return t.push(V(p("LABEL_RESOURCE"))), t.push(A("upload_resource_v1")), t;
|
|
8698
8698
|
}
|
|
8699
|
-
const
|
|
8700
|
-
function
|
|
8699
|
+
const ne = { name: "APP_RESOURCE_CATEGORY", callback: fa }, St = C.xml;
|
|
8700
|
+
function ma() {
|
|
8701
8701
|
const t = [];
|
|
8702
8702
|
{
|
|
8703
|
-
const e =
|
|
8703
|
+
const e = St.createElement("label");
|
|
8704
8704
|
e.setAttribute("text", "%{BKY_LABEL_PROCEDURE}"), t.push(e);
|
|
8705
8705
|
}
|
|
8706
8706
|
{
|
|
8707
|
-
const e =
|
|
8707
|
+
const e = St.createElement("block");
|
|
8708
8708
|
e.setAttribute("type", "procedure_def_v1");
|
|
8709
8709
|
{
|
|
8710
|
-
const n =
|
|
8710
|
+
const n = St.createElement("field");
|
|
8711
8711
|
n.setAttribute("name", "NAME");
|
|
8712
|
-
const o =
|
|
8712
|
+
const o = St.createTextNode(p("PROCEDURE_DEFAULT_NAME"));
|
|
8713
8713
|
n.appendChild(o), e.appendChild(n);
|
|
8714
8714
|
}
|
|
8715
8715
|
t.push(e);
|
|
8716
8716
|
}
|
|
8717
8717
|
{
|
|
8718
|
-
const e =
|
|
8718
|
+
const e = St.createElement("block");
|
|
8719
8719
|
e.setAttribute("type", "procedure_return_v1"), t.push(e);
|
|
8720
8720
|
}
|
|
8721
8721
|
return t;
|
|
8722
8722
|
}
|
|
8723
8723
|
const at = {
|
|
8724
8724
|
name: "PROCEDURE_CATEGORY",
|
|
8725
|
-
callback:
|
|
8726
|
-
},
|
|
8727
|
-
function
|
|
8728
|
-
const t =
|
|
8725
|
+
callback: ma
|
|
8726
|
+
}, Kt = C.xml;
|
|
8727
|
+
function Ta() {
|
|
8728
|
+
const t = Ut(), e = [];
|
|
8729
8729
|
{
|
|
8730
|
-
const o =
|
|
8730
|
+
const o = Kt.createElement("label");
|
|
8731
8731
|
o.setAttribute("text", "%{BKY_LABEL_VARIABLE}"), e.push(o);
|
|
8732
8732
|
}
|
|
8733
8733
|
{
|
|
@@ -8735,7 +8735,7 @@ function Ea() {
|
|
|
8735
8735
|
o.setAttribute("text", "%{BKY_NEW_VARIABLE}"), o.setAttribute("callbackKey", "CREATE_VARIABLE"), t.registerButtonCallback(
|
|
8736
8736
|
"CREATE_VARIABLE",
|
|
8737
8737
|
function(i) {
|
|
8738
|
-
|
|
8738
|
+
At.createVariableButtonHandler(
|
|
8739
8739
|
i.getTargetWorkspace()
|
|
8740
8740
|
);
|
|
8741
8741
|
}
|
|
@@ -8744,40 +8744,40 @@ function Ea() {
|
|
|
8744
8744
|
const n = t.getVariablesOfType("");
|
|
8745
8745
|
if (n.length <= 0)
|
|
8746
8746
|
return e;
|
|
8747
|
-
n.sort(
|
|
8747
|
+
n.sort(At.compareByName);
|
|
8748
8748
|
{
|
|
8749
|
-
const o =
|
|
8749
|
+
const o = Kt.createElement("label");
|
|
8750
8750
|
o.setAttribute("text", p("LABEL_CREATED")), e.push(o);
|
|
8751
8751
|
}
|
|
8752
8752
|
return n.forEach((o) => {
|
|
8753
8753
|
{
|
|
8754
|
-
const i =
|
|
8755
|
-
i.setAttribute("type", "variable_get_v1"), i.appendChild(
|
|
8754
|
+
const i = Kt.createElement("block");
|
|
8755
|
+
i.setAttribute("type", "variable_get_v1"), i.appendChild(At.generateVariableFieldDom(o)), e.push(i);
|
|
8756
8756
|
}
|
|
8757
8757
|
{
|
|
8758
|
-
const i =
|
|
8759
|
-
i.setAttribute("type", "variable_set_v1"), i.appendChild(
|
|
8758
|
+
const i = Kt.createElement("block");
|
|
8759
|
+
i.setAttribute("type", "variable_set_v1"), i.appendChild(At.generateVariableFieldDom(o)), e.push(i);
|
|
8760
8760
|
}
|
|
8761
8761
|
}), e;
|
|
8762
8762
|
}
|
|
8763
8763
|
const ct = {
|
|
8764
8764
|
name: "VARIABLE_CATEGORY",
|
|
8765
|
-
callback:
|
|
8765
|
+
callback: Ta
|
|
8766
8766
|
};
|
|
8767
|
-
function
|
|
8767
|
+
function Ea() {
|
|
8768
8768
|
const t = [];
|
|
8769
8769
|
if (q().length > 0)
|
|
8770
8770
|
t.push(V(p("LABEL_OPERATION"))), t.push(A("add_data_v1")), t.push(A("delete_data_v1")), t.push(A("update_data_v1")), t.push(A("query_data_v1")), t.push(A("transaction_v1")), t.push(
|
|
8771
|
-
A("interrupt_transaction_v1", [
|
|
8772
|
-
), t.push(V(p("LABEL_CONDITION"))), t.push(A("cond_logic_v1")), t.push(A("cond_atomic_v1", [
|
|
8771
|
+
A("interrupt_transaction_v1", [Ct("VALUE")])
|
|
8772
|
+
), t.push(V(p("LABEL_CONDITION"))), t.push(A("cond_logic_v1")), t.push(A("cond_atomic_v1", [Ct("VALUE")])), t.push(V(p("LABEL_QUERY_EXTRA"))), t.push(
|
|
8773
8773
|
A("query_extra_limit_v1", [
|
|
8774
|
-
|
|
8775
|
-
|
|
8774
|
+
mn("OFFSET", 0),
|
|
8775
|
+
mn("LIMIT", 1)
|
|
8776
8776
|
])
|
|
8777
8777
|
), t.push(
|
|
8778
8778
|
A("query_extra_sortby_v1", [
|
|
8779
|
-
|
|
8780
|
-
|
|
8779
|
+
Ct("COLUMN"),
|
|
8780
|
+
ia("DESC")
|
|
8781
8781
|
])
|
|
8782
8782
|
);
|
|
8783
8783
|
else {
|
|
@@ -8786,46 +8786,46 @@ function ga() {
|
|
|
8786
8786
|
}
|
|
8787
8787
|
return t;
|
|
8788
8788
|
}
|
|
8789
|
-
const
|
|
8789
|
+
const oe = { name: "COMPUTE_DATA_CATEGORY", callback: Ea };
|
|
8790
|
+
function ga() {
|
|
8791
|
+
return Yt("flow").length > 0;
|
|
8792
|
+
}
|
|
8790
8793
|
function Aa() {
|
|
8791
|
-
|
|
8794
|
+
const t = [];
|
|
8795
|
+
return f.compute.activeObject.type === "flow" && t.push(A("on_flow_state_event_v1")), ga() && console.assert(!0), t;
|
|
8792
8796
|
}
|
|
8797
|
+
const ie = { name: "COMPUTE_FLOW_CATEGORY", callback: Aa };
|
|
8793
8798
|
function Ia() {
|
|
8794
|
-
|
|
8795
|
-
return f.compute.activeObject.type === "flow" && t.push(A("on_flow_state_event_v1")), Aa() && console.assert(!0), t;
|
|
8799
|
+
return Yt("func").length > 0;
|
|
8796
8800
|
}
|
|
8797
|
-
const oe = { name: "COMPUTE_FLOW_CATEGORY", callback: Ia };
|
|
8798
8801
|
function Oa() {
|
|
8799
|
-
return Ft("func").length > 0;
|
|
8800
|
-
}
|
|
8801
|
-
function va() {
|
|
8802
8802
|
const t = [];
|
|
8803
|
-
return f.compute.activeObject.type === "func" && (t.push(A("func_entry_v1")), f.compute.activeFunc.outputs.length > 0 && t.push(A("set_func_output_v1")), t.push(A("procedure_return_v1"))),
|
|
8803
|
+
return f.compute.activeObject.type === "func" && (t.push(A("func_entry_v1")), f.compute.activeFunc.outputs.length > 0 && t.push(A("set_func_output_v1")), t.push(A("procedure_return_v1"))), Ia() && t.push(A("call_func_internal_v1")), t;
|
|
8804
8804
|
}
|
|
8805
|
-
const
|
|
8806
|
-
function
|
|
8805
|
+
const se = { name: "COMPUTE_FUNC_CATEGORY", callback: Oa };
|
|
8806
|
+
function va() {
|
|
8807
8807
|
const t = [];
|
|
8808
8808
|
return t.push(
|
|
8809
|
-
A("compute_debug_trace_v1", [
|
|
8809
|
+
A("compute_debug_trace_v1", [Ct("OBJECT")])
|
|
8810
8810
|
), t;
|
|
8811
8811
|
}
|
|
8812
|
-
const
|
|
8813
|
-
|
|
8814
|
-
const n = await
|
|
8812
|
+
const ae = { name: "COMPUTE_MISC_CATEGORY", callback: va };
|
|
8813
|
+
Cn.setConfirm(async (t, e) => {
|
|
8814
|
+
const n = await Yo({
|
|
8815
8815
|
title: "",
|
|
8816
8816
|
text: t
|
|
8817
8817
|
});
|
|
8818
8818
|
e(!!n);
|
|
8819
8819
|
});
|
|
8820
|
-
|
|
8821
|
-
const o = await
|
|
8820
|
+
Cn.setPrompt(async (t, e, n) => {
|
|
8821
|
+
const o = await wo({
|
|
8822
8822
|
title: "",
|
|
8823
8823
|
value: e
|
|
8824
8824
|
});
|
|
8825
8825
|
o !== void 0 && n(String(o));
|
|
8826
8826
|
});
|
|
8827
|
-
function
|
|
8828
|
-
const e =
|
|
8827
|
+
function Xe(t) {
|
|
8828
|
+
const e = Ut();
|
|
8829
8829
|
if (!e)
|
|
8830
8830
|
return;
|
|
8831
8831
|
const n = e.getBlockById(t);
|
|
@@ -8837,33 +8837,33 @@ function Je(t) {
|
|
|
8837
8837
|
const i = o.getRelativeToSurfaceXY(), a = i.x * e.scale, r = i.y * e.scale;
|
|
8838
8838
|
e.scroll(-a, -r);
|
|
8839
8839
|
}
|
|
8840
|
-
function
|
|
8841
|
-
const t =
|
|
8840
|
+
function zn() {
|
|
8841
|
+
const t = Ut();
|
|
8842
8842
|
if (!t)
|
|
8843
8843
|
return;
|
|
8844
8844
|
const e = t.getTopBlocks(!0)?.[0];
|
|
8845
|
-
e &&
|
|
8845
|
+
e && Xe(e.id);
|
|
8846
8846
|
}
|
|
8847
|
-
function
|
|
8847
|
+
function Zn(t) {
|
|
8848
8848
|
const e = t.getParent();
|
|
8849
|
-
return e &&
|
|
8849
|
+
return e && Zn(e) ? !0 : !e && !!(t.outputConnection || t.previousConnection);
|
|
8850
8850
|
}
|
|
8851
|
-
class
|
|
8851
|
+
class Ca {
|
|
8852
8852
|
init() {
|
|
8853
|
-
const e =
|
|
8853
|
+
const e = yo.registry.getItem("blockDisable");
|
|
8854
8854
|
e && (e.preconditionFn = function(n) {
|
|
8855
8855
|
const o = n.block;
|
|
8856
|
-
return o && !o.isInFlyout && o.workspace.options.disable && o.isEditable() ? o.getInheritedDisabled() ||
|
|
8856
|
+
return o && !o.isInFlyout && o.workspace.options.disable && o.isEditable() ? o.getInheritedDisabled() || Zn(o) ? "disabled" : "enabled" : "hidden";
|
|
8857
8857
|
});
|
|
8858
8858
|
}
|
|
8859
8859
|
}
|
|
8860
|
-
|
|
8861
|
-
|
|
8862
|
-
const
|
|
8863
|
-
|
|
8864
|
-
const
|
|
8865
|
-
|
|
8866
|
-
|
|
8860
|
+
ko.registerFieldColour();
|
|
8861
|
+
No.registry.unregister(Lo.names.ESCAPE);
|
|
8862
|
+
const ya = new So.CrossTabCopyPaste();
|
|
8863
|
+
ya.init({ contextMenu: !0, shortcut: !0 });
|
|
8864
|
+
const ka = new Ca();
|
|
8865
|
+
ka.init();
|
|
8866
|
+
re.Classic.blockStyles = {
|
|
8867
8867
|
color_blocks: {
|
|
8868
8868
|
colourPrimary: "#a5745b",
|
|
8869
8869
|
colourSecondary: "#ede3de",
|
|
@@ -8949,7 +8949,7 @@ ue.Classic.blockStyles = {
|
|
|
8949
8949
|
hat: ""
|
|
8950
8950
|
}
|
|
8951
8951
|
};
|
|
8952
|
-
|
|
8952
|
+
re.Classic.categoryStyles = {
|
|
8953
8953
|
color_category: {
|
|
8954
8954
|
colour: "#a5745b"
|
|
8955
8955
|
},
|
|
@@ -9014,9 +9014,9 @@ ue.Classic.categoryStyles = {
|
|
|
9014
9014
|
colour: "#a55b80"
|
|
9015
9015
|
}
|
|
9016
9016
|
};
|
|
9017
|
-
const
|
|
9017
|
+
const Na = yn.defineTheme("light", {
|
|
9018
9018
|
name: "light",
|
|
9019
|
-
base:
|
|
9019
|
+
base: re.Classic,
|
|
9020
9020
|
componentStyles: {
|
|
9021
9021
|
workspaceBackgroundColour: "#ffffff",
|
|
9022
9022
|
toolboxBackgroundColour: "#eeeeee",
|
|
@@ -9030,9 +9030,9 @@ const La = kn.defineTheme("light", {
|
|
|
9030
9030
|
scrollbarOpacity: 0.4,
|
|
9031
9031
|
cursorColour: ""
|
|
9032
9032
|
}
|
|
9033
|
-
}),
|
|
9033
|
+
}), La = yn.defineTheme("dark", {
|
|
9034
9034
|
name: "dark",
|
|
9035
|
-
base:
|
|
9035
|
+
base: re.Classic,
|
|
9036
9036
|
componentStyles: {
|
|
9037
9037
|
workspaceBackgroundColour: "#1e1e1e",
|
|
9038
9038
|
toolboxBackgroundColour: "#272727",
|
|
@@ -9047,18 +9047,18 @@ const La = kn.defineTheme("light", {
|
|
|
9047
9047
|
cursorColour: ""
|
|
9048
9048
|
}
|
|
9049
9049
|
});
|
|
9050
|
-
function
|
|
9051
|
-
const e =
|
|
9050
|
+
function Sa(t) {
|
|
9051
|
+
const e = Ut();
|
|
9052
9052
|
switch (t) {
|
|
9053
9053
|
case "light":
|
|
9054
|
-
e.setTheme(
|
|
9054
|
+
e.setTheme(Na);
|
|
9055
9055
|
break;
|
|
9056
9056
|
case "dark":
|
|
9057
|
-
e.setTheme(
|
|
9057
|
+
e.setTheme(La);
|
|
9058
9058
|
break;
|
|
9059
9059
|
}
|
|
9060
9060
|
}
|
|
9061
|
-
const
|
|
9061
|
+
const de = {
|
|
9062
9062
|
kind: "category",
|
|
9063
9063
|
name: "%{BKY_CATEGORY_COLOR}",
|
|
9064
9064
|
categorystyle: "color_category",
|
|
@@ -9132,7 +9132,7 @@ const fe = {
|
|
|
9132
9132
|
}
|
|
9133
9133
|
}
|
|
9134
9134
|
]
|
|
9135
|
-
},
|
|
9135
|
+
}, fe = {
|
|
9136
9136
|
kind: "category",
|
|
9137
9137
|
name: "%{BKY_CATEGORY_LIST}",
|
|
9138
9138
|
categorystyle: "list_category",
|
|
@@ -9247,7 +9247,7 @@ const fe = {
|
|
|
9247
9247
|
type: "list_reverse_v1"
|
|
9248
9248
|
}
|
|
9249
9249
|
]
|
|
9250
|
-
},
|
|
9250
|
+
}, me = {
|
|
9251
9251
|
kind: "category",
|
|
9252
9252
|
name: "%{BKY_CATEGORY_LOGIC}",
|
|
9253
9253
|
categorystyle: "logic_category",
|
|
@@ -9289,7 +9289,7 @@ const fe = {
|
|
|
9289
9289
|
type: "logic_ternary_v1"
|
|
9290
9290
|
}
|
|
9291
9291
|
]
|
|
9292
|
-
},
|
|
9292
|
+
}, Te = {
|
|
9293
9293
|
kind: "category",
|
|
9294
9294
|
name: "%{BKY_CATEGORY_LOOP}",
|
|
9295
9295
|
categorystyle: "loop_category",
|
|
@@ -9351,7 +9351,7 @@ const fe = {
|
|
|
9351
9351
|
type: "flow_control_v1"
|
|
9352
9352
|
}
|
|
9353
9353
|
]
|
|
9354
|
-
},
|
|
9354
|
+
}, Ee = {
|
|
9355
9355
|
kind: "category",
|
|
9356
9356
|
name: "%{BKY_CATEGORY_MATH}",
|
|
9357
9357
|
categorystyle: "math_category",
|
|
@@ -9506,7 +9506,7 @@ const fe = {
|
|
|
9506
9506
|
type: "math_on_list_v1"
|
|
9507
9507
|
}
|
|
9508
9508
|
]
|
|
9509
|
-
},
|
|
9509
|
+
}, ge = {
|
|
9510
9510
|
kind: "category",
|
|
9511
9511
|
name: "%{BKY_CATEGORY_OBJECT}",
|
|
9512
9512
|
categorystyle: "object_category",
|
|
@@ -9574,7 +9574,7 @@ const fe = {
|
|
|
9574
9574
|
}
|
|
9575
9575
|
}
|
|
9576
9576
|
]
|
|
9577
|
-
},
|
|
9577
|
+
}, Ae = {
|
|
9578
9578
|
kind: "category",
|
|
9579
9579
|
name: "%{BKY_CATEGORY_TEXT}",
|
|
9580
9580
|
categorystyle: "text_category",
|
|
@@ -9737,7 +9737,7 @@ const fe = {
|
|
|
9737
9737
|
type: "text_reverse_v1"
|
|
9738
9738
|
}
|
|
9739
9739
|
]
|
|
9740
|
-
},
|
|
9740
|
+
}, to = {
|
|
9741
9741
|
kind: "category",
|
|
9742
9742
|
name: "%{BKY_CATEGORY_TIME}",
|
|
9743
9743
|
categorystyle: "time_category",
|
|
@@ -9761,35 +9761,35 @@ const fe = {
|
|
|
9761
9761
|
}
|
|
9762
9762
|
}
|
|
9763
9763
|
]
|
|
9764
|
-
},
|
|
9764
|
+
}, Ba = {
|
|
9765
9765
|
kind: "categoryToolbox",
|
|
9766
9766
|
contents: [
|
|
9767
9767
|
{
|
|
9768
9768
|
kind: "category",
|
|
9769
9769
|
name: "%{BKY_CATEGORY_COMP}",
|
|
9770
9770
|
categorystyle: "misc_category",
|
|
9771
|
-
custom:
|
|
9771
|
+
custom: qn.name
|
|
9772
9772
|
},
|
|
9773
9773
|
{
|
|
9774
9774
|
kind: "category",
|
|
9775
9775
|
name: "%{BKY_CATEGORY_MESSAGE}",
|
|
9776
9776
|
categorystyle: "misc_category",
|
|
9777
|
-
custom:
|
|
9777
|
+
custom: te.name
|
|
9778
9778
|
},
|
|
9779
9779
|
{
|
|
9780
9780
|
kind: "category",
|
|
9781
9781
|
name: "%{BKY_CATEGORY_MISC}",
|
|
9782
9782
|
categorystyle: "misc_category",
|
|
9783
|
-
custom:
|
|
9783
|
+
custom: ee.name
|
|
9784
9784
|
},
|
|
9785
|
-
Ee,
|
|
9786
9785
|
Te,
|
|
9787
|
-
ge,
|
|
9788
|
-
Ie,
|
|
9789
9786
|
me,
|
|
9787
|
+
Ee,
|
|
9790
9788
|
Ae,
|
|
9791
9789
|
fe,
|
|
9792
|
-
|
|
9790
|
+
ge,
|
|
9791
|
+
de,
|
|
9792
|
+
to,
|
|
9793
9793
|
{
|
|
9794
9794
|
kind: "category",
|
|
9795
9795
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -9806,49 +9806,49 @@ const fe = {
|
|
|
9806
9806
|
kind: "category",
|
|
9807
9807
|
name: "%{BKY_CATEGORY_RESOURCE}",
|
|
9808
9808
|
categorystyle: "resource_category",
|
|
9809
|
-
custom:
|
|
9809
|
+
custom: ne.name
|
|
9810
9810
|
},
|
|
9811
9811
|
{
|
|
9812
9812
|
kind: "category",
|
|
9813
9813
|
name: "%{BKY_CATEGORY_COMPUTE}",
|
|
9814
9814
|
categorystyle: "compute_category",
|
|
9815
|
-
custom:
|
|
9815
|
+
custom: Zt.name
|
|
9816
9816
|
}
|
|
9817
9817
|
]
|
|
9818
|
-
},
|
|
9818
|
+
}, ba = {
|
|
9819
9819
|
kind: "categoryToolbox",
|
|
9820
9820
|
contents: [
|
|
9821
9821
|
{
|
|
9822
9822
|
kind: "category",
|
|
9823
9823
|
name: "%{BKY_CATEGORY_FUNC}",
|
|
9824
9824
|
categorystyle: "func_category",
|
|
9825
|
-
custom:
|
|
9825
|
+
custom: se.name
|
|
9826
9826
|
},
|
|
9827
9827
|
{
|
|
9828
9828
|
kind: "category",
|
|
9829
9829
|
name: "%{BKY_CATEGORY_FLOW}",
|
|
9830
9830
|
categorystyle: "flow_category",
|
|
9831
|
-
custom:
|
|
9831
|
+
custom: ie.name
|
|
9832
9832
|
},
|
|
9833
9833
|
{
|
|
9834
9834
|
kind: "category",
|
|
9835
9835
|
name: "%{BKY_CATEGORY_DATA}",
|
|
9836
9836
|
categorystyle: "data_category",
|
|
9837
|
-
custom:
|
|
9837
|
+
custom: oe.name
|
|
9838
9838
|
},
|
|
9839
9839
|
{
|
|
9840
9840
|
kind: "category",
|
|
9841
9841
|
name: "%{BKY_CATEGORY_MISC}",
|
|
9842
9842
|
categorystyle: "misc_category",
|
|
9843
|
-
custom:
|
|
9843
|
+
custom: ae.name
|
|
9844
9844
|
},
|
|
9845
|
-
Ee,
|
|
9846
9845
|
Te,
|
|
9847
|
-
ge,
|
|
9848
|
-
Ie,
|
|
9849
9846
|
me,
|
|
9847
|
+
Ee,
|
|
9850
9848
|
Ae,
|
|
9851
9849
|
fe,
|
|
9850
|
+
ge,
|
|
9851
|
+
de,
|
|
9852
9852
|
{
|
|
9853
9853
|
kind: "category",
|
|
9854
9854
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -9862,40 +9862,40 @@ const fe = {
|
|
|
9862
9862
|
custom: at.name
|
|
9863
9863
|
}
|
|
9864
9864
|
]
|
|
9865
|
-
},
|
|
9865
|
+
}, Pa = {
|
|
9866
9866
|
kind: "categoryToolbox",
|
|
9867
9867
|
contents: [
|
|
9868
9868
|
{
|
|
9869
9869
|
kind: "category",
|
|
9870
9870
|
name: "%{BKY_CATEGORY_FUNC}",
|
|
9871
9871
|
categorystyle: "func_category",
|
|
9872
|
-
custom:
|
|
9872
|
+
custom: se.name
|
|
9873
9873
|
},
|
|
9874
9874
|
{
|
|
9875
9875
|
kind: "category",
|
|
9876
9876
|
name: "%{BKY_CATEGORY_FLOW}",
|
|
9877
9877
|
categorystyle: "flow_category",
|
|
9878
|
-
custom:
|
|
9878
|
+
custom: ie.name
|
|
9879
9879
|
},
|
|
9880
9880
|
{
|
|
9881
9881
|
kind: "category",
|
|
9882
9882
|
name: "%{BKY_CATEGORY_DATA}",
|
|
9883
9883
|
categorystyle: "data_category",
|
|
9884
|
-
custom:
|
|
9884
|
+
custom: oe.name
|
|
9885
9885
|
},
|
|
9886
9886
|
{
|
|
9887
9887
|
kind: "category",
|
|
9888
9888
|
name: "%{BKY_CATEGORY_MISC}",
|
|
9889
9889
|
categorystyle: "misc_category",
|
|
9890
|
-
custom:
|
|
9890
|
+
custom: ae.name
|
|
9891
9891
|
},
|
|
9892
|
-
Ee,
|
|
9893
9892
|
Te,
|
|
9894
|
-
ge,
|
|
9895
|
-
Ie,
|
|
9896
9893
|
me,
|
|
9894
|
+
Ee,
|
|
9897
9895
|
Ae,
|
|
9898
9896
|
fe,
|
|
9897
|
+
ge,
|
|
9898
|
+
de,
|
|
9899
9899
|
{
|
|
9900
9900
|
kind: "category",
|
|
9901
9901
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -9909,7 +9909,7 @@ const fe = {
|
|
|
9909
9909
|
custom: at.name
|
|
9910
9910
|
}
|
|
9911
9911
|
]
|
|
9912
|
-
},
|
|
9912
|
+
}, Ra = {
|
|
9913
9913
|
kind: "categoryToolbox",
|
|
9914
9914
|
contents: [
|
|
9915
9915
|
{
|
|
@@ -9940,35 +9940,35 @@ const fe = {
|
|
|
9940
9940
|
]
|
|
9941
9941
|
}
|
|
9942
9942
|
]
|
|
9943
|
-
},
|
|
9943
|
+
}, Da = {
|
|
9944
9944
|
kind: "categoryToolbox",
|
|
9945
9945
|
contents: [
|
|
9946
9946
|
{
|
|
9947
9947
|
kind: "category",
|
|
9948
9948
|
name: "%{BKY_CATEGORY_PAGE}",
|
|
9949
9949
|
categorystyle: "misc_category",
|
|
9950
|
-
custom:
|
|
9950
|
+
custom: Qn.name
|
|
9951
9951
|
},
|
|
9952
9952
|
{
|
|
9953
9953
|
kind: "category",
|
|
9954
9954
|
name: "%{BKY_CATEGORY_MESSAGE}",
|
|
9955
9955
|
categorystyle: "misc_category",
|
|
9956
|
-
custom:
|
|
9956
|
+
custom: te.name
|
|
9957
9957
|
},
|
|
9958
9958
|
{
|
|
9959
9959
|
kind: "category",
|
|
9960
9960
|
name: "%{BKY_CATEGORY_MISC}",
|
|
9961
9961
|
categorystyle: "misc_category",
|
|
9962
|
-
custom:
|
|
9962
|
+
custom: ee.name
|
|
9963
9963
|
},
|
|
9964
|
-
Ee,
|
|
9965
9964
|
Te,
|
|
9966
|
-
ge,
|
|
9967
|
-
Ie,
|
|
9968
9965
|
me,
|
|
9966
|
+
Ee,
|
|
9969
9967
|
Ae,
|
|
9970
9968
|
fe,
|
|
9971
|
-
|
|
9969
|
+
ge,
|
|
9970
|
+
de,
|
|
9971
|
+
to,
|
|
9972
9972
|
{
|
|
9973
9973
|
kind: "category",
|
|
9974
9974
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -9985,73 +9985,81 @@ const fe = {
|
|
|
9985
9985
|
kind: "category",
|
|
9986
9986
|
name: "%{BKY_CATEGORY_RESOURCE}",
|
|
9987
9987
|
categorystyle: "resource_category",
|
|
9988
|
-
custom:
|
|
9988
|
+
custom: ne.name
|
|
9989
9989
|
},
|
|
9990
9990
|
{
|
|
9991
9991
|
kind: "category",
|
|
9992
9992
|
name: "%{BKY_CATEGORY_COMPUTE}",
|
|
9993
9993
|
categorystyle: "compute_category",
|
|
9994
|
-
custom:
|
|
9994
|
+
custom: Zt.name
|
|
9995
9995
|
}
|
|
9996
9996
|
]
|
|
9997
|
-
},
|
|
9998
|
-
function ae(t, e) {
|
|
9999
|
-
return `prop@${t}@${e}`;
|
|
10000
|
-
}
|
|
10001
|
-
function ce(t) {
|
|
10002
|
-
return `state@${t}`;
|
|
10003
|
-
}
|
|
9997
|
+
}, Ke = ["get_app_prop_v1", "get_app_state_v1"];
|
|
10004
9998
|
function rt(t, e) {
|
|
10005
9999
|
return t.find((o) => o === e) !== void 0 ? !1 : (t.push(e), !0);
|
|
10006
10000
|
}
|
|
10007
|
-
function
|
|
10001
|
+
function Ma(t) {
|
|
10008
10002
|
const e = [];
|
|
10009
10003
|
function n(o) {
|
|
10010
10004
|
for (const i of o.getChildren(!0))
|
|
10011
|
-
|
|
10005
|
+
Ke.includes(i.type) && e.push(i), n(i);
|
|
10012
10006
|
}
|
|
10013
10007
|
return n(t), e;
|
|
10014
10008
|
}
|
|
10015
|
-
function
|
|
10009
|
+
function Ua(t) {
|
|
10016
10010
|
const e = [];
|
|
10017
10011
|
for (const n of t)
|
|
10018
10012
|
if (n.type === "get_app_prop_v1") {
|
|
10019
10013
|
const o = n;
|
|
10020
|
-
rt(
|
|
10021
|
-
|
|
10014
|
+
rt(
|
|
10015
|
+
e,
|
|
10016
|
+
Tt({
|
|
10017
|
+
type: "elementProp",
|
|
10018
|
+
nodeId: o.node.id,
|
|
10019
|
+
propKeys: o.prop.key
|
|
10020
|
+
})
|
|
10021
|
+
);
|
|
10022
|
+
} else n.type === "get_app_state_v1" ? rt(
|
|
10023
|
+
e,
|
|
10024
|
+
Tt({ type: "customState", stateId: n.state.id })
|
|
10025
|
+
) : console.assert(!1);
|
|
10022
10026
|
return e;
|
|
10023
10027
|
}
|
|
10024
|
-
function
|
|
10028
|
+
function Va(t) {
|
|
10025
10029
|
const e = [];
|
|
10026
10030
|
for (const n of t.getChildren(!0))
|
|
10027
|
-
if (
|
|
10031
|
+
if (Ke.includes(n.type))
|
|
10028
10032
|
e.push(n);
|
|
10029
10033
|
else if (n.type === "object_get_v1") {
|
|
10030
10034
|
const o = n.getInputTargetBlock("OBJECT");
|
|
10031
|
-
o &&
|
|
10035
|
+
o && Ke.includes(o.type) && e.push(n);
|
|
10032
10036
|
}
|
|
10033
10037
|
return e;
|
|
10034
10038
|
}
|
|
10035
|
-
function
|
|
10039
|
+
function xa(t) {
|
|
10036
10040
|
const e = [], n = [];
|
|
10037
10041
|
for (const o of t)
|
|
10038
10042
|
if (o.type === "get_app_prop_v1") {
|
|
10039
10043
|
const i = o;
|
|
10040
|
-
|
|
10041
|
-
|
|
10042
|
-
|
|
10043
|
-
type: "prop",
|
|
10044
|
+
let a;
|
|
10045
|
+
if (i.prop.from === "regular" ? a = {
|
|
10046
|
+
type: "elementProp",
|
|
10044
10047
|
nodeId: i.node.id,
|
|
10045
10048
|
propKeys: i.prop.key
|
|
10046
|
-
}
|
|
10049
|
+
} : i.prop.from === "custom" ? a = {
|
|
10050
|
+
type: "customProp",
|
|
10051
|
+
propId: i.prop.key
|
|
10052
|
+
} : i.prop.from === "slot" && (a = {
|
|
10053
|
+
type: "adaptSlotProp",
|
|
10054
|
+
propId: i.prop.key
|
|
10055
|
+
}), !a || !rt(n, Tt(a)))
|
|
10056
|
+
continue;
|
|
10057
|
+
e.push(a);
|
|
10047
10058
|
} else if (o.type === "get_app_state_v1") {
|
|
10048
|
-
const
|
|
10049
|
-
if (!rt(n,
|
|
10059
|
+
const a = { type: "customState", stateId: o.state.id };
|
|
10060
|
+
if (!rt(n, Tt(a)))
|
|
10050
10061
|
continue;
|
|
10051
|
-
e.push(
|
|
10052
|
-
type: "state",
|
|
10053
|
-
stateId: i.state.id
|
|
10054
|
-
});
|
|
10062
|
+
e.push(a);
|
|
10055
10063
|
} else if (o.type === "object_get_v1") {
|
|
10056
10064
|
const i = o.getInputTargetBlock("OBJECT"), a = s.valueToCode(
|
|
10057
10065
|
o,
|
|
@@ -10060,30 +10068,39 @@ function Fa(t) {
|
|
|
10060
10068
|
);
|
|
10061
10069
|
if (i.type === "get_app_prop_v1") {
|
|
10062
10070
|
const r = i;
|
|
10063
|
-
|
|
10064
|
-
|
|
10065
|
-
|
|
10066
|
-
type: "prop",
|
|
10071
|
+
let u;
|
|
10072
|
+
if (r.prop.from === "regular" ? u = {
|
|
10073
|
+
type: "elementProp",
|
|
10067
10074
|
nodeId: r.node.id,
|
|
10068
10075
|
propKeys: r.prop.key,
|
|
10069
10076
|
subKeys: a
|
|
10070
|
-
}
|
|
10071
|
-
|
|
10072
|
-
|
|
10073
|
-
|
|
10077
|
+
} : r.prop.from === "custom" ? u = {
|
|
10078
|
+
type: "customProp",
|
|
10079
|
+
propId: r.prop.key,
|
|
10080
|
+
subKeys: a
|
|
10081
|
+
} : r.prop.from === "slot" && (u = {
|
|
10082
|
+
type: "adaptSlotProp",
|
|
10083
|
+
propId: r.prop.key,
|
|
10084
|
+
subKeys: a
|
|
10085
|
+
}), !u || !rt(n, Tt(u)))
|
|
10074
10086
|
continue;
|
|
10075
|
-
e.push(
|
|
10076
|
-
|
|
10077
|
-
|
|
10087
|
+
e.push(u);
|
|
10088
|
+
} else if (i.type === "get_app_state_v1") {
|
|
10089
|
+
const u = {
|
|
10090
|
+
type: "customState",
|
|
10091
|
+
stateId: i.state.id,
|
|
10078
10092
|
subKeys: a
|
|
10079
|
-
}
|
|
10093
|
+
};
|
|
10094
|
+
if (!rt(n, Tt(u)))
|
|
10095
|
+
continue;
|
|
10096
|
+
e.push(u);
|
|
10080
10097
|
} else
|
|
10081
10098
|
console.assert(!1);
|
|
10082
10099
|
} else
|
|
10083
10100
|
console.assert(!1);
|
|
10084
10101
|
return e;
|
|
10085
10102
|
}
|
|
10086
|
-
function
|
|
10103
|
+
function Fa(t) {
|
|
10087
10104
|
const e = {
|
|
10088
10105
|
watchEffect: {},
|
|
10089
10106
|
bind: {
|
|
@@ -10095,39 +10112,39 @@ function Ya(t) {
|
|
|
10095
10112
|
return e;
|
|
10096
10113
|
for (const o of n)
|
|
10097
10114
|
if (o.type === "watch_effect_v1") {
|
|
10098
|
-
const i =
|
|
10115
|
+
const i = Ma(o), a = Ua(i);
|
|
10099
10116
|
for (const r of a)
|
|
10100
10117
|
e.watchEffect[r] || (e.watchEffect[r] = []), rt(e.watchEffect[r], o.id);
|
|
10101
10118
|
} else if (o.type === "app_bind_v1") {
|
|
10102
|
-
const i =
|
|
10119
|
+
const i = Va(o), a = xa(i);
|
|
10103
10120
|
e.bind.sets[o.id] = a;
|
|
10104
10121
|
for (const r of a) {
|
|
10105
|
-
|
|
10106
|
-
|
|
10122
|
+
const u = Tt(r);
|
|
10123
|
+
e.bind.triggers[u] || (e.bind.triggers[u] = []), rt(e.bind.triggers[u], o.id);
|
|
10107
10124
|
}
|
|
10108
10125
|
}
|
|
10109
10126
|
return e;
|
|
10110
10127
|
}
|
|
10111
|
-
const
|
|
10112
|
-
function
|
|
10113
|
-
|
|
10128
|
+
const eo = Symbol();
|
|
10129
|
+
function Ya(t) {
|
|
10130
|
+
lo(eo, t);
|
|
10114
10131
|
}
|
|
10115
|
-
function
|
|
10116
|
-
return
|
|
10132
|
+
function Je() {
|
|
10133
|
+
return _o(eo);
|
|
10117
10134
|
}
|
|
10118
|
-
const
|
|
10135
|
+
const wa = /* @__PURE__ */ st({
|
|
10119
10136
|
__name: "index",
|
|
10120
10137
|
props: {
|
|
10121
10138
|
lock: { type: Boolean }
|
|
10122
10139
|
},
|
|
10123
10140
|
setup(t, { expose: e }) {
|
|
10124
|
-
const { t: n } =
|
|
10141
|
+
const { t: n } = xt(), o = t, i = Je(), a = () => {
|
|
10125
10142
|
if (!i.workspace) {
|
|
10126
10143
|
console.assert(!1);
|
|
10127
10144
|
return;
|
|
10128
10145
|
}
|
|
10129
10146
|
if (o.lock) {
|
|
10130
|
-
|
|
10147
|
+
Nn(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
10131
10148
|
return;
|
|
10132
10149
|
}
|
|
10133
10150
|
i.workspace.cleanUp();
|
|
@@ -10139,8 +10156,8 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10139
10156
|
return B(), Z(T, {
|
|
10140
10157
|
text: R(n)("x-block-lib.tip.hotkeyCtrlQ")
|
|
10141
10158
|
}, {
|
|
10142
|
-
activator: tt(({ props:
|
|
10143
|
-
L(_,
|
|
10159
|
+
activator: tt(({ props: g }) => [
|
|
10160
|
+
L(_, $e(g, {
|
|
10144
10161
|
density: "comfortable",
|
|
10145
10162
|
icon: "mdi-broom",
|
|
10146
10163
|
variant: "outlined",
|
|
@@ -10151,7 +10168,7 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10151
10168
|
}, 8, ["text"]);
|
|
10152
10169
|
};
|
|
10153
10170
|
}
|
|
10154
|
-
}),
|
|
10171
|
+
}), Ka = /* @__PURE__ */ st({
|
|
10155
10172
|
__name: "index",
|
|
10156
10173
|
props: {
|
|
10157
10174
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10159,14 +10176,14 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10159
10176
|
},
|
|
10160
10177
|
emits: ["update:modelValue"],
|
|
10161
10178
|
setup(t) {
|
|
10162
|
-
const { t: e } =
|
|
10179
|
+
const { t: e } = xt(), n = Rt(t, "modelValue");
|
|
10163
10180
|
return (o, i) => {
|
|
10164
10181
|
const a = D("v-btn"), r = D("v-tooltip");
|
|
10165
10182
|
return B(), Z(r, {
|
|
10166
10183
|
text: R(e)("x-block-lib.tip.hotkeyCtrlW")
|
|
10167
10184
|
}, {
|
|
10168
10185
|
activator: tt(({ props: u }) => [
|
|
10169
|
-
L(a,
|
|
10186
|
+
L(a, $e(u, {
|
|
10170
10187
|
density: "comfortable",
|
|
10171
10188
|
icon: n.value ? "mdi-lock" : "mdi-lock-open",
|
|
10172
10189
|
variant: "outlined",
|
|
@@ -10177,7 +10194,7 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10177
10194
|
}, 8, ["text"]);
|
|
10178
10195
|
};
|
|
10179
10196
|
}
|
|
10180
|
-
}),
|
|
10197
|
+
}), $a = { class: "text-subtitle-1 ml-6" }, Ha = /* @__PURE__ */ st({
|
|
10181
10198
|
__name: "item",
|
|
10182
10199
|
props: {
|
|
10183
10200
|
id: {},
|
|
@@ -10186,7 +10203,7 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10186
10203
|
},
|
|
10187
10204
|
emits: ["x-click"],
|
|
10188
10205
|
setup(t, { emit: e }) {
|
|
10189
|
-
const { primaryColor: n, backgroundColor2: o, highlightColor: i } =
|
|
10206
|
+
const { primaryColor: n, backgroundColor2: o, highlightColor: i } = Vt(), a = t, r = e, u = It(!1), l = Y(() => ({
|
|
10190
10207
|
position: "relative",
|
|
10191
10208
|
background: u.value ? i.value : o.value,
|
|
10192
10209
|
height: "48px",
|
|
@@ -10202,37 +10219,37 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10202
10219
|
border: "1px solid " + n.value,
|
|
10203
10220
|
pointerEvents: "none"
|
|
10204
10221
|
}));
|
|
10205
|
-
return (T,
|
|
10206
|
-
const m = D("v-spacer"), y = D("v-icon"),
|
|
10207
|
-
return
|
|
10222
|
+
return (T, g) => {
|
|
10223
|
+
const m = D("v-spacer"), y = D("v-icon"), E = po("ripple");
|
|
10224
|
+
return ho((B(), Q("div", {
|
|
10208
10225
|
class: "d-flex align-center cursor-pointer",
|
|
10209
10226
|
style: H(l.value),
|
|
10210
|
-
onClick:
|
|
10211
|
-
onMouseout:
|
|
10212
|
-
onMouseover:
|
|
10227
|
+
onClick: g[1] || (g[1] = (P) => r("x-click", a.id)),
|
|
10228
|
+
onMouseout: g[2] || (g[2] = (P) => u.value = !1),
|
|
10229
|
+
onMouseover: g[3] || (g[3] = (P) => u.value = !0)
|
|
10213
10230
|
}, [
|
|
10214
|
-
W("span",
|
|
10231
|
+
W("span", $a, ce(a.title), 1),
|
|
10215
10232
|
L(m),
|
|
10216
10233
|
L(y, {
|
|
10217
10234
|
class: "x-handle cursor-move mr-3",
|
|
10218
10235
|
icon: "mdi-drag-horizontal-variant",
|
|
10219
|
-
onMousedown:
|
|
10236
|
+
onMousedown: g[0] || (g[0] = Bt(() => {
|
|
10220
10237
|
}, ["stop"]))
|
|
10221
10238
|
}),
|
|
10222
10239
|
W("div", {
|
|
10223
10240
|
style: H(_.value)
|
|
10224
10241
|
}, null, 4)
|
|
10225
10242
|
], 36)), [
|
|
10226
|
-
[
|
|
10243
|
+
[E]
|
|
10227
10244
|
]);
|
|
10228
10245
|
};
|
|
10229
10246
|
}
|
|
10230
|
-
}),
|
|
10247
|
+
}), Ga = {
|
|
10231
10248
|
key: 1,
|
|
10232
10249
|
class: "text-caption text-grey"
|
|
10233
|
-
},
|
|
10250
|
+
}, Wa = /* @__PURE__ */ st({
|
|
10234
10251
|
__name: "index",
|
|
10235
|
-
props: /* @__PURE__ */
|
|
10252
|
+
props: /* @__PURE__ */ be({
|
|
10236
10253
|
lock: { type: Boolean }
|
|
10237
10254
|
}, {
|
|
10238
10255
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10240,22 +10257,22 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10240
10257
|
}),
|
|
10241
10258
|
emits: ["update:modelValue"],
|
|
10242
10259
|
setup(t, { expose: e }) {
|
|
10243
|
-
const { t: n } =
|
|
10260
|
+
const { t: n } = xt(), o = Rt(t, "modelValue"), i = Je(), a = It([]);
|
|
10244
10261
|
e({ update: () => {
|
|
10245
10262
|
if (!i.workspace) {
|
|
10246
10263
|
console.assert(!1);
|
|
10247
10264
|
return;
|
|
10248
10265
|
}
|
|
10249
10266
|
const m = [];
|
|
10250
|
-
i.workspace.getTopBlocks(!0).forEach((
|
|
10251
|
-
const P =
|
|
10267
|
+
i.workspace.getTopBlocks(!0).forEach((E) => {
|
|
10268
|
+
const P = E.id === bo()?.id;
|
|
10252
10269
|
let U = "<n/a>";
|
|
10253
|
-
if (
|
|
10254
|
-
const X =
|
|
10255
|
-
dt && (U = n(dt.name), X.node.alias && (U += " / " + X.node.alias), U += " - " +
|
|
10256
|
-
} else
|
|
10270
|
+
if (E.type.startsWith("on_app_event_v")) {
|
|
10271
|
+
const X = E, dt = J[X.node.key];
|
|
10272
|
+
dt && (U = n(dt.name), X.node.alias && (U += " / " + X.node.alias), U += " - " + ue(X.event.names, X.event.from));
|
|
10273
|
+
} else E.type.startsWith("watch_effect_v") ? U = n("x-block-lib.watchEffect") : E.type.startsWith("app_bind_v") ? U = n("x-block-lib.bind") : E.type.startsWith("func_entry_v") ? U = n("x-block-lib.funcEntry") : E.type.startsWith("procedure_def_v") ? U = n("x-block-lib.procedure") + " - " + E.getFieldValue("NAME") : U = n("x-block-lib.temporaryBlock");
|
|
10257
10274
|
m.push({
|
|
10258
|
-
id:
|
|
10275
|
+
id: E.id,
|
|
10259
10276
|
name: U,
|
|
10260
10277
|
select: P
|
|
10261
10278
|
});
|
|
@@ -10264,7 +10281,7 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10264
10281
|
let u = [];
|
|
10265
10282
|
const l = () => {
|
|
10266
10283
|
if (t.lock) {
|
|
10267
|
-
|
|
10284
|
+
Nn(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
10268
10285
|
return;
|
|
10269
10286
|
}
|
|
10270
10287
|
const m = [];
|
|
@@ -10282,10 +10299,10 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10282
10299
|
}
|
|
10283
10300
|
if (m.oldIndex === m.newIndex)
|
|
10284
10301
|
return;
|
|
10285
|
-
const y = u[m.oldIndex],
|
|
10302
|
+
const y = u[m.oldIndex], E = i.workspace.getBlockById(
|
|
10286
10303
|
y
|
|
10287
10304
|
);
|
|
10288
|
-
if (!
|
|
10305
|
+
if (!E) {
|
|
10289
10306
|
console.assert(!1);
|
|
10290
10307
|
return;
|
|
10291
10308
|
}
|
|
@@ -10295,20 +10312,20 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10295
10312
|
P !== "" && (U = i.workspace.getBlockById(
|
|
10296
10313
|
P
|
|
10297
10314
|
).getRelativeToSurfaceXY().y + 10);
|
|
10298
|
-
const X =
|
|
10299
|
-
|
|
10300
|
-
},
|
|
10315
|
+
const X = E.getRelativeToSurfaceXY();
|
|
10316
|
+
E.moveTo(new C.Coordinate(X.x, U)), i.workspace.cleanUp(), zn();
|
|
10317
|
+
}, g = async (m) => {
|
|
10301
10318
|
if (!i.workspace) {
|
|
10302
10319
|
console.assert(!1);
|
|
10303
10320
|
return;
|
|
10304
10321
|
}
|
|
10305
10322
|
const y = i.workspace.getBlockById(m);
|
|
10306
|
-
|
|
10323
|
+
kn.setSelected(y), Xe(m), o.value = !1;
|
|
10307
10324
|
};
|
|
10308
|
-
return (m, y) => a.value.length > 0 ? (B(), Z(R(
|
|
10325
|
+
return (m, y) => a.value.length > 0 ? (B(), Z(R(Bo), {
|
|
10309
10326
|
key: 0,
|
|
10310
10327
|
modelValue: a.value,
|
|
10311
|
-
"onUpdate:modelValue": y[0] || (y[0] = (
|
|
10328
|
+
"onUpdate:modelValue": y[0] || (y[0] = (E) => a.value = E),
|
|
10312
10329
|
animation: 150,
|
|
10313
10330
|
"ghost-class": "ghost",
|
|
10314
10331
|
handle: ".x-handle",
|
|
@@ -10317,23 +10334,23 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10317
10334
|
onStart: l
|
|
10318
10335
|
}, {
|
|
10319
10336
|
default: tt(() => [
|
|
10320
|
-
(B(!0), Q(
|
|
10321
|
-
id:
|
|
10322
|
-
key:
|
|
10323
|
-
select:
|
|
10324
|
-
title:
|
|
10325
|
-
onXClick:
|
|
10337
|
+
(B(!0), Q(En, null, fo(a.value, (E) => (B(), Z(Ha, {
|
|
10338
|
+
id: E.id,
|
|
10339
|
+
key: E.id,
|
|
10340
|
+
select: E.select,
|
|
10341
|
+
title: E.name,
|
|
10342
|
+
onXClick: g
|
|
10326
10343
|
}, null, 8, ["id", "select", "title"]))), 128))
|
|
10327
10344
|
]),
|
|
10328
10345
|
_: 1
|
|
10329
|
-
}, 8, ["modelValue"])) : (B(), Q("span",
|
|
10346
|
+
}, 8, ["modelValue"])) : (B(), Q("span", Ga, ce(R(n)("x-block-lib.noOption")), 1));
|
|
10330
10347
|
}
|
|
10331
|
-
}),
|
|
10348
|
+
}), ja = (t, e) => {
|
|
10332
10349
|
const n = t.__vccOpts || t;
|
|
10333
10350
|
for (const [o, i] of e)
|
|
10334
10351
|
n[o] = i;
|
|
10335
10352
|
return n;
|
|
10336
|
-
},
|
|
10353
|
+
}, Xa = /* @__PURE__ */ ja(Wa, [["__scopeId", "data-v-4cd8352a"]]), Ja = /* @__PURE__ */ st({
|
|
10337
10354
|
__name: "index",
|
|
10338
10355
|
props: {
|
|
10339
10356
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10341,7 +10358,7 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10341
10358
|
},
|
|
10342
10359
|
emits: ["update:modelValue"],
|
|
10343
10360
|
setup(t, { expose: e }) {
|
|
10344
|
-
const n =
|
|
10361
|
+
const n = Rt(t, "modelValue"), o = Je();
|
|
10345
10362
|
e({ update: () => {
|
|
10346
10363
|
if (!o.workspace) {
|
|
10347
10364
|
console.assert(!1);
|
|
@@ -10349,26 +10366,26 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10349
10366
|
}
|
|
10350
10367
|
} });
|
|
10351
10368
|
const a = (r) => {
|
|
10352
|
-
const u =
|
|
10369
|
+
const u = Ut();
|
|
10353
10370
|
if (!u) {
|
|
10354
10371
|
console.assert(!1);
|
|
10355
10372
|
return;
|
|
10356
10373
|
}
|
|
10357
10374
|
const l = u.getBlockById(r);
|
|
10358
|
-
|
|
10375
|
+
kn.setSelected(l), Xe(r), n.value = !1;
|
|
10359
10376
|
};
|
|
10360
10377
|
return (r, u) => (B(), Q("div", {
|
|
10361
10378
|
onClick: u[0] || (u[0] = (l) => a(""))
|
|
10362
10379
|
}, "blockTree"));
|
|
10363
10380
|
}
|
|
10364
|
-
}),
|
|
10381
|
+
}), qa = { class: "text-subtitle-1" }, Qa = /* @__PURE__ */ st({
|
|
10365
10382
|
__name: "index",
|
|
10366
10383
|
props: {
|
|
10367
10384
|
type: {},
|
|
10368
10385
|
lock: { type: Boolean }
|
|
10369
10386
|
},
|
|
10370
10387
|
setup(t, { expose: e }) {
|
|
10371
|
-
const { t: n } =
|
|
10388
|
+
const { t: n } = xt(), o = Ho(), { sysBarAvail: i } = Ln(), { backgroundColor1: a } = Vt(), r = Y(() => {
|
|
10372
10389
|
let y = "100%";
|
|
10373
10390
|
return o.mdAndUp.value && (y = "400px"), {
|
|
10374
10391
|
background: a.value,
|
|
@@ -10383,31 +10400,31 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10383
10400
|
};
|
|
10384
10401
|
}), l = Y(() => ({
|
|
10385
10402
|
height: "60px"
|
|
10386
|
-
})), { open: _ } =
|
|
10387
|
-
|
|
10403
|
+
})), { open: _ } = He(`blocklyNavigatorDlg${Pe()}`);
|
|
10404
|
+
mo(() => {
|
|
10388
10405
|
_.value = !1;
|
|
10389
10406
|
});
|
|
10390
|
-
const T =
|
|
10407
|
+
const T = bt("blockList"), g = bt("blockTree");
|
|
10391
10408
|
return e({ open: _, update: () => {
|
|
10392
|
-
t.type === "list" ? T.value?.update() : t.type === "tree" &&
|
|
10393
|
-
} }), (y,
|
|
10394
|
-
const P = D("v-sheet"), U = D("v-btn"), X = D("v-spacer"), dt = D("v-dialog"),
|
|
10395
|
-
return B(), Q(
|
|
10409
|
+
t.type === "list" ? T.value?.update() : t.type === "tree" && g.value?.update();
|
|
10410
|
+
} }), (y, E) => {
|
|
10411
|
+
const P = D("v-sheet"), U = D("v-btn"), X = D("v-spacer"), dt = D("v-dialog"), Ie = D("v-tooltip");
|
|
10412
|
+
return B(), Q(En, null, [
|
|
10396
10413
|
L(dt, {
|
|
10397
10414
|
modelValue: R(_),
|
|
10398
|
-
"onUpdate:modelValue":
|
|
10415
|
+
"onUpdate:modelValue": E[5] || (E[5] = ($) => $t(_) ? _.value = $ : null),
|
|
10399
10416
|
eager: "",
|
|
10400
10417
|
fullscreen: "",
|
|
10401
10418
|
"no-click-animation": "",
|
|
10402
10419
|
persistent: "",
|
|
10403
10420
|
transition: "scroll-x-reverse-transition",
|
|
10404
|
-
onKeydown:
|
|
10421
|
+
onKeydown: E[6] || (E[6] = gn(Bt(($) => _.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
10405
10422
|
}, {
|
|
10406
10423
|
default: tt(() => [
|
|
10407
10424
|
W("div", {
|
|
10408
10425
|
class: "w-100 h-100 d-flex flex-row-reverse",
|
|
10409
|
-
onClick:
|
|
10410
|
-
onContextmenu:
|
|
10426
|
+
onClick: E[3] || (E[3] = Bt(($) => _.value = !1, ["self"])),
|
|
10427
|
+
onContextmenu: E[4] || (E[4] = Bt(($) => _.value = !1, ["self", "prevent"]))
|
|
10411
10428
|
}, [
|
|
10412
10429
|
W("div", {
|
|
10413
10430
|
class: "elevation-2",
|
|
@@ -10428,9 +10445,9 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10428
10445
|
density: "comfortable",
|
|
10429
10446
|
icon: "mdi-close",
|
|
10430
10447
|
variant: "text",
|
|
10431
|
-
onClick:
|
|
10448
|
+
onClick: E[0] || (E[0] = ($) => _.value = !1)
|
|
10432
10449
|
}),
|
|
10433
|
-
W("span",
|
|
10450
|
+
W("span", qa, ce(R(n)("x-block-lib.navigator")), 1),
|
|
10434
10451
|
L(X)
|
|
10435
10452
|
]),
|
|
10436
10453
|
_: 1
|
|
@@ -10439,19 +10456,19 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10439
10456
|
class: "overflow-y-auto",
|
|
10440
10457
|
style: H(u.value)
|
|
10441
10458
|
}, [
|
|
10442
|
-
t.type === "list" ? (B(), Z(
|
|
10459
|
+
t.type === "list" ? (B(), Z(Xa, {
|
|
10443
10460
|
key: 0,
|
|
10444
10461
|
ref_key: "blockList",
|
|
10445
10462
|
ref: T,
|
|
10446
10463
|
modelValue: R(_),
|
|
10447
|
-
"onUpdate:modelValue":
|
|
10464
|
+
"onUpdate:modelValue": E[1] || (E[1] = ($) => $t(_) ? _.value = $ : null),
|
|
10448
10465
|
lock: t.lock
|
|
10449
|
-
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (B(), Z(
|
|
10466
|
+
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (B(), Z(Ja, {
|
|
10450
10467
|
key: 1,
|
|
10451
10468
|
ref_key: "blockTree",
|
|
10452
|
-
ref:
|
|
10469
|
+
ref: g,
|
|
10453
10470
|
modelValue: R(_),
|
|
10454
|
-
"onUpdate:modelValue":
|
|
10471
|
+
"onUpdate:modelValue": E[2] || (E[2] = ($) => $t(_) ? _.value = $ : null)
|
|
10455
10472
|
}, null, 8, ["modelValue"])) : mt("", !0),
|
|
10456
10473
|
W("div", {
|
|
10457
10474
|
style: H(l.value)
|
|
@@ -10462,15 +10479,15 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10462
10479
|
]),
|
|
10463
10480
|
_: 1
|
|
10464
10481
|
}, 8, ["modelValue"]),
|
|
10465
|
-
L(
|
|
10482
|
+
L(Ie, {
|
|
10466
10483
|
text: R(n)("x-block-lib.tip.hotkeyCtrlE")
|
|
10467
10484
|
}, {
|
|
10468
10485
|
activator: tt(({ props: $ }) => [
|
|
10469
|
-
L(U,
|
|
10486
|
+
L(U, $e($, {
|
|
10470
10487
|
density: "comfortable",
|
|
10471
10488
|
icon: "mdi-navigation-variant",
|
|
10472
10489
|
variant: "outlined",
|
|
10473
|
-
onClick:
|
|
10490
|
+
onClick: E[7] || (E[7] = (qe) => _.value = !0)
|
|
10474
10491
|
}), null, 16)
|
|
10475
10492
|
]),
|
|
10476
10493
|
_: 1
|
|
@@ -10478,7 +10495,7 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10478
10495
|
], 64);
|
|
10479
10496
|
};
|
|
10480
10497
|
}
|
|
10481
|
-
}),
|
|
10498
|
+
}), Be = {
|
|
10482
10499
|
grid: {
|
|
10483
10500
|
length: 2,
|
|
10484
10501
|
snap: !0,
|
|
@@ -10504,22 +10521,22 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10504
10521
|
wheel: !0
|
|
10505
10522
|
}
|
|
10506
10523
|
};
|
|
10507
|
-
function
|
|
10508
|
-
|
|
10509
|
-
const i =
|
|
10510
|
-
return i.addChangeListener(
|
|
10524
|
+
function za(t, e, n, o) {
|
|
10525
|
+
Be.theme = o ? "dark" : "light", Be.toolbox = Za(e, n);
|
|
10526
|
+
const i = Po(t, Be);
|
|
10527
|
+
return i.addChangeListener(Ro.shadowBlockConversionChangeListener), tc(i, e, n), ec(i), i;
|
|
10511
10528
|
}
|
|
10512
|
-
function
|
|
10529
|
+
function Za(t, e) {
|
|
10513
10530
|
let n;
|
|
10514
|
-
return t === "page" ? e === "v1" && (n =
|
|
10531
|
+
return t === "page" ? e === "v1" && (n = Da) : t === "comp" ? e === "v1" && (n = Ba) : t === "func" ? e === "v1" && (n = Pa) : t === "flow" ? e === "v1" && (n = ba) : t === "json" && e === "v1" && (n = Ra), console.assert(!!n, `invalid toolbox type=${t} version=${e}`), n;
|
|
10515
10532
|
}
|
|
10516
|
-
function
|
|
10533
|
+
function tc(t, e, n) {
|
|
10517
10534
|
function o({ name: i, callback: a }) {
|
|
10518
10535
|
t.registerToolboxCategoryCallback(i, () => a(e));
|
|
10519
10536
|
}
|
|
10520
|
-
e === "page" ? n === "v1" && (o(
|
|
10537
|
+
e === "page" ? n === "v1" && (o(Qn), o(te), o(ee), o(ct), o(at), o(ne), o(Zt)) : e === "comp" ? n === "v1" && (o(qn), o(te), o(ee), o(ct), o(at), o(ne), o(Zt)) : e === "func" ? n === "v1" && (o(se), o(ie), o(oe), o(ae), o(ct), o(at)) : e === "flow" && n === "v1" && (o(se), o(ie), o(oe), o(ae), o(ct), o(at));
|
|
10521
10538
|
}
|
|
10522
|
-
function
|
|
10539
|
+
function ec(t) {
|
|
10523
10540
|
const { router: e } = nt;
|
|
10524
10541
|
t.registerButtonCallback("NO_COMPUTE", () => {
|
|
10525
10542
|
const n = e.resolve({
|
|
@@ -10537,7 +10554,7 @@ function nc(t) {
|
|
|
10537
10554
|
}, 100);
|
|
10538
10555
|
});
|
|
10539
10556
|
}
|
|
10540
|
-
function
|
|
10557
|
+
function nc(t, e) {
|
|
10541
10558
|
const n = e.newBlock("json_root_v1");
|
|
10542
10559
|
n.initSvg(), n.render();
|
|
10543
10560
|
const o = (i, a) => {
|
|
@@ -10566,8 +10583,8 @@ function oc(t, e) {
|
|
|
10566
10583
|
l.push(_);
|
|
10567
10584
|
u.initData(l);
|
|
10568
10585
|
for (let _ = 0; _ < l.length; _++) {
|
|
10569
|
-
const T = l[_],
|
|
10570
|
-
o(i[T],
|
|
10586
|
+
const T = l[_], g = u.getInput("ENTRY" + _);
|
|
10587
|
+
o(i[T], g.connection);
|
|
10571
10588
|
}
|
|
10572
10589
|
} else if (r === "json_array_v1") {
|
|
10573
10590
|
u.initData(i.length);
|
|
@@ -10579,7 +10596,7 @@ function oc(t, e) {
|
|
|
10579
10596
|
new (O.get(O.FINISHED_LOADING))(e)
|
|
10580
10597
|
);
|
|
10581
10598
|
}
|
|
10582
|
-
function
|
|
10599
|
+
function oc(t) {
|
|
10583
10600
|
const e = (o) => {
|
|
10584
10601
|
if (!o)
|
|
10585
10602
|
return null;
|
|
@@ -10611,9 +10628,9 @@ function ic(t) {
|
|
|
10611
10628
|
if (o.type === "json_root_v1")
|
|
10612
10629
|
return e(o);
|
|
10613
10630
|
}
|
|
10614
|
-
const
|
|
10631
|
+
const ic = { class: "position-relative w-100 h-100" }, sc = /* @__PURE__ */ st({
|
|
10615
10632
|
__name: "index",
|
|
10616
|
-
props: /* @__PURE__ */
|
|
10633
|
+
props: /* @__PURE__ */ be({
|
|
10617
10634
|
type: {},
|
|
10618
10635
|
version: {},
|
|
10619
10636
|
locale: {},
|
|
@@ -10624,11 +10641,11 @@ const sc = { class: "position-relative w-100 h-100" }, ac = /* @__PURE__ */ st({
|
|
|
10624
10641
|
scale: { required: !0 },
|
|
10625
10642
|
scaleModifiers: {}
|
|
10626
10643
|
}),
|
|
10627
|
-
emits: /* @__PURE__ */
|
|
10644
|
+
emits: /* @__PURE__ */ be(["ready"], ["update:lock", "update:scale"]),
|
|
10628
10645
|
setup(t, { expose: e, emit: n }) {
|
|
10629
|
-
const { backgroundColor2: o } =
|
|
10630
|
-
|
|
10631
|
-
const y =
|
|
10646
|
+
const { backgroundColor2: o } = Vt(), i = Rt(t, "lock"), a = Rt(t, "scale"), r = n, u = `blocklyEditor${Pe()}`, l = It(), _ = bt("parentContainer"), T = bt("clean"), g = bt("navigator"), m = {};
|
|
10647
|
+
Ya(m);
|
|
10648
|
+
const y = It(!0), E = It(!1), P = Y(() => t.type === "json" ? "tree" : "list"), U = Y(() => ({
|
|
10632
10649
|
width: "100%",
|
|
10633
10650
|
height: "calc(100% - 48px)"
|
|
10634
10651
|
})), X = Y(() => ({
|
|
@@ -10645,7 +10662,7 @@ const sc = { class: "position-relative w-100 h-100" }, ac = /* @__PURE__ */ st({
|
|
|
10645
10662
|
width: "56px",
|
|
10646
10663
|
height: "calc(100% - 49px)",
|
|
10647
10664
|
zIndex: 999
|
|
10648
|
-
})),
|
|
10665
|
+
})), Ie = Y(() => ({
|
|
10649
10666
|
position: "absolute",
|
|
10650
10667
|
top: "0px",
|
|
10651
10668
|
right: "0px",
|
|
@@ -10658,7 +10675,7 @@ const sc = { class: "position-relative w-100 h-100" }, ac = /* @__PURE__ */ st({
|
|
|
10658
10675
|
width: "100%",
|
|
10659
10676
|
height: "calc(100% - 48px)",
|
|
10660
10677
|
pointerEvents: "none"
|
|
10661
|
-
})),
|
|
10678
|
+
})), qe = Y(() => ({
|
|
10662
10679
|
position: "absolute",
|
|
10663
10680
|
background: t.dark ? "#0000007f" : "#ffffff7f",
|
|
10664
10681
|
top: "1px",
|
|
@@ -10666,33 +10683,33 @@ const sc = { class: "position-relative w-100 h-100" }, ac = /* @__PURE__ */ st({
|
|
|
10666
10683
|
width: "56px",
|
|
10667
10684
|
height: "calc(100% - 49px)",
|
|
10668
10685
|
zIndex: 999
|
|
10669
|
-
})),
|
|
10686
|
+
})), no = Y(() => ({
|
|
10670
10687
|
position: "fixed",
|
|
10671
10688
|
top: 0,
|
|
10672
10689
|
left: 0,
|
|
10673
10690
|
zIndex: 3e3
|
|
10674
|
-
})), { open:
|
|
10675
|
-
|
|
10691
|
+
})), { open: Nt } = He(`blocklyEditorFlyout${Pe()}`);
|
|
10692
|
+
nn(async () => {
|
|
10676
10693
|
if (!l.value || !_.value) {
|
|
10677
10694
|
console.assert(!1);
|
|
10678
10695
|
return;
|
|
10679
10696
|
}
|
|
10680
|
-
|
|
10697
|
+
Do(_.value), await cn(t.locale), m.workspace = za(l.value, t.type, t.version, t.dark), m.workspace.addChangeListener(O.disableOrphans), m.workspace.addChangeListener(oo);
|
|
10681
10698
|
const N = document.querySelector(`#${u} .blocklyFlyout`);
|
|
10682
|
-
new MutationObserver((
|
|
10683
|
-
|
|
10684
|
-
|
|
10699
|
+
new MutationObserver((Oe) => {
|
|
10700
|
+
Oe.forEach((wt) => {
|
|
10701
|
+
wt.type === "attributes" && wt.attributeName === "style" && (Nt.value = m.workspace.getFlyout().isVisible());
|
|
10685
10702
|
});
|
|
10686
|
-
}).observe(N, { attributes: !0 }),
|
|
10687
|
-
}),
|
|
10688
|
-
|
|
10689
|
-
}),
|
|
10690
|
-
m.workspace &&
|
|
10703
|
+
}).observe(N, { attributes: !0 }), Nt.value = m.workspace.getFlyout().isVisible(), Qe(), ze(), await To(), r("ready");
|
|
10704
|
+
}), on(() => {
|
|
10705
|
+
Nt.value = !1;
|
|
10706
|
+
}), Mo(l, () => {
|
|
10707
|
+
m.workspace && Uo(m.workspace);
|
|
10691
10708
|
});
|
|
10692
|
-
async function
|
|
10709
|
+
async function oo(N) {
|
|
10693
10710
|
if (N.type === O.FINISHED_LOADING) {
|
|
10694
|
-
|
|
10695
|
-
|
|
10711
|
+
zn(), setTimeout(() => {
|
|
10712
|
+
g.value?.update();
|
|
10696
10713
|
}, 0), y.value = !1;
|
|
10697
10714
|
return;
|
|
10698
10715
|
}
|
|
@@ -10701,61 +10718,61 @@ const sc = { class: "position-relative w-100 h-100" }, ac = /* @__PURE__ */ st({
|
|
|
10701
10718
|
a.value = m.workspace.getScale();
|
|
10702
10719
|
return;
|
|
10703
10720
|
}
|
|
10704
|
-
N.type === O.BLOCK_DRAG && (N.isStart ?
|
|
10705
|
-
|
|
10721
|
+
N.type === O.BLOCK_DRAG && (N.isStart ? E.value = !0 : E.value = !1), setTimeout(() => {
|
|
10722
|
+
g.value?.update();
|
|
10706
10723
|
}, 0);
|
|
10707
10724
|
}
|
|
10708
10725
|
}
|
|
10709
|
-
const
|
|
10710
|
-
y.value = !0, t.type === "json" ?
|
|
10711
|
-
},
|
|
10726
|
+
const io = (N) => {
|
|
10727
|
+
y.value = !0, t.type === "json" ? nc(N, m.workspace) : w.workspaces.load(N, m.workspace);
|
|
10728
|
+
}, so = () => t.type === "json" ? oc(m.workspace) : w.workspaces.save(m.workspace), ao = () => {
|
|
10712
10729
|
if (t.type === "json")
|
|
10713
10730
|
console.assert(!1);
|
|
10714
10731
|
else
|
|
10715
10732
|
return s.workspaceToCode(m.workspace);
|
|
10733
|
+
}, co = () => Fa(m.workspace), Qe = () => {
|
|
10734
|
+
m.workspace.setIsReadOnly(i.value), m.workspace.isReadOnly() && (Nt.value = !1);
|
|
10716
10735
|
}, ze = () => {
|
|
10717
|
-
m.workspace.setIsReadOnly(i.value), m.workspace.isReadOnly() && (kt.value = !1);
|
|
10718
|
-
}, Ze = () => {
|
|
10719
10736
|
m.workspace.setScale(a.value);
|
|
10720
|
-
},
|
|
10721
|
-
m.workspace.fireChangeListener(new
|
|
10722
|
-
},
|
|
10737
|
+
}, ro = () => {
|
|
10738
|
+
m.workspace.fireChangeListener(new Bn());
|
|
10739
|
+
}, Ze = () => {
|
|
10723
10740
|
T.value?.cleanWorkspace();
|
|
10724
|
-
},
|
|
10741
|
+
}, tn = () => {
|
|
10725
10742
|
i.value = !i.value;
|
|
10726
|
-
},
|
|
10727
|
-
|
|
10743
|
+
}, en = () => {
|
|
10744
|
+
g.value && (g.value.open = !0);
|
|
10728
10745
|
};
|
|
10729
|
-
return
|
|
10730
|
-
|
|
10731
|
-
}),
|
|
10732
|
-
|
|
10733
|
-
}),
|
|
10746
|
+
return nn(() => {
|
|
10747
|
+
gt.on("cleanWorkspace", Ze), gt.on("toggleBlocklyLock", tn), gt.on("openBlocklyNavigator", en);
|
|
10748
|
+
}), on(() => {
|
|
10749
|
+
gt.off("cleanWorkspace", Ze), gt.off("toggleBlocklyLock", tn), gt.off("openBlocklyNavigator", en);
|
|
10750
|
+
}), Lt(
|
|
10734
10751
|
() => t.locale,
|
|
10735
10752
|
(N) => {
|
|
10736
|
-
|
|
10753
|
+
cn(N);
|
|
10737
10754
|
}
|
|
10738
|
-
),
|
|
10755
|
+
), Lt(
|
|
10739
10756
|
() => t.dark,
|
|
10740
10757
|
(N) => {
|
|
10741
|
-
|
|
10758
|
+
Sa(N ? "dark" : "light");
|
|
10742
10759
|
}
|
|
10743
|
-
), Nt
|
|
10760
|
+
), Lt(Nt, (N) => {
|
|
10744
10761
|
N || m.workspace?.hideChaff();
|
|
10745
|
-
}),
|
|
10762
|
+
}), Lt(i, () => {
|
|
10763
|
+
Qe();
|
|
10764
|
+
}), Lt(a, () => {
|
|
10746
10765
|
ze();
|
|
10747
|
-
}), Nt(a, () => {
|
|
10748
|
-
Ze();
|
|
10749
10766
|
}), e({
|
|
10750
10767
|
loading: y,
|
|
10751
|
-
load:
|
|
10752
|
-
save:
|
|
10753
|
-
|
|
10754
|
-
|
|
10755
|
-
fireStateChange:
|
|
10768
|
+
load: io,
|
|
10769
|
+
save: so,
|
|
10770
|
+
generateCode: ao,
|
|
10771
|
+
generateReactivity: co,
|
|
10772
|
+
fireStateChange: ro
|
|
10756
10773
|
}), (N, ft) => {
|
|
10757
|
-
const
|
|
10758
|
-
return B(), Q("div",
|
|
10774
|
+
const Oe = D("v-icon"), wt = D("x-loading");
|
|
10775
|
+
return B(), Q("div", ic, [
|
|
10759
10776
|
W("div", {
|
|
10760
10777
|
id: u,
|
|
10761
10778
|
ref_key: "blocklyDiv",
|
|
@@ -10765,14 +10782,14 @@ const sc = { class: "position-relative w-100 h-100" }, ac = /* @__PURE__ */ st({
|
|
|
10765
10782
|
W("div", {
|
|
10766
10783
|
style: H(X.value)
|
|
10767
10784
|
}, [
|
|
10768
|
-
|
|
10785
|
+
Eo(N.$slots, "bottom")
|
|
10769
10786
|
], 4),
|
|
10770
|
-
|
|
10787
|
+
E.value ? (B(), Q("div", {
|
|
10771
10788
|
key: 0,
|
|
10772
10789
|
class: "d-flex flex-column justify-center align-center",
|
|
10773
10790
|
style: H(dt.value)
|
|
10774
10791
|
}, [
|
|
10775
|
-
L(
|
|
10792
|
+
L(Oe, {
|
|
10776
10793
|
icon: "mdi-delete",
|
|
10777
10794
|
size: "x-large"
|
|
10778
10795
|
})
|
|
@@ -10780,27 +10797,27 @@ const sc = { class: "position-relative w-100 h-100" }, ac = /* @__PURE__ */ st({
|
|
|
10780
10797
|
y.value ? mt("", !0) : (B(), Q("div", {
|
|
10781
10798
|
key: 1,
|
|
10782
10799
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
10783
|
-
style: H(
|
|
10800
|
+
style: H(Ie.value)
|
|
10784
10801
|
}, [
|
|
10785
|
-
L(
|
|
10802
|
+
L(wa, {
|
|
10786
10803
|
ref_key: "clean",
|
|
10787
10804
|
ref: T,
|
|
10788
10805
|
lock: i.value
|
|
10789
10806
|
}, null, 8, ["lock"]),
|
|
10790
|
-
L(
|
|
10807
|
+
L(Ka, {
|
|
10791
10808
|
modelValue: i.value,
|
|
10792
|
-
"onUpdate:modelValue": ft[0] || (ft[0] = (
|
|
10809
|
+
"onUpdate:modelValue": ft[0] || (ft[0] = (uo) => i.value = uo)
|
|
10793
10810
|
}, null, 8, ["modelValue"]),
|
|
10794
|
-
L(
|
|
10811
|
+
L(Qa, {
|
|
10795
10812
|
ref_key: "navigator",
|
|
10796
|
-
ref:
|
|
10813
|
+
ref: g,
|
|
10797
10814
|
lock: i.value,
|
|
10798
10815
|
type: P.value
|
|
10799
10816
|
}, null, 8, ["lock", "type"])
|
|
10800
10817
|
], 4)),
|
|
10801
10818
|
i.value ? (B(), Q("div", {
|
|
10802
10819
|
key: 2,
|
|
10803
|
-
style: H(
|
|
10820
|
+
style: H(qe.value)
|
|
10804
10821
|
}, null, 4)) : mt("", !0),
|
|
10805
10822
|
i.value ? (B(), Q("div", {
|
|
10806
10823
|
key: 3,
|
|
@@ -10809,24 +10826,24 @@ const sc = { class: "position-relative w-100 h-100" }, ac = /* @__PURE__ */ st({
|
|
|
10809
10826
|
W("div", {
|
|
10810
10827
|
ref_key: "parentContainer",
|
|
10811
10828
|
ref: _,
|
|
10812
|
-
style: H(
|
|
10829
|
+
style: H(no.value)
|
|
10813
10830
|
}, null, 4),
|
|
10814
|
-
L(
|
|
10831
|
+
L(wt, {
|
|
10815
10832
|
open: y.value,
|
|
10816
10833
|
"z-index": 99
|
|
10817
10834
|
}, null, 8, ["open"])
|
|
10818
10835
|
]);
|
|
10819
10836
|
};
|
|
10820
10837
|
}
|
|
10821
|
-
}),
|
|
10838
|
+
}), ac = /* @__PURE__ */ st({
|
|
10822
10839
|
__name: "index",
|
|
10823
10840
|
props: {
|
|
10824
10841
|
code: {}
|
|
10825
10842
|
},
|
|
10826
10843
|
setup(t) {
|
|
10827
10844
|
const e = t;
|
|
10828
|
-
|
|
10829
|
-
const n =
|
|
10845
|
+
Vo.registerLanguage("javascript", xo);
|
|
10846
|
+
const n = Fo.component, { backgroundColor2: o } = Vt();
|
|
10830
10847
|
return (i, a) => {
|
|
10831
10848
|
const r = D("v-sheet");
|
|
10832
10849
|
return B(), Z(r, {
|
|
@@ -10844,10 +10861,10 @@ const sc = { class: "position-relative w-100 h-100" }, ac = /* @__PURE__ */ st({
|
|
|
10844
10861
|
}, 8, ["color"]);
|
|
10845
10862
|
};
|
|
10846
10863
|
}
|
|
10847
|
-
}),
|
|
10864
|
+
}), cc = { class: "text-subtitle-1" }, rc = { class: "w-100 h-100 overflow-auto" }, uc = /* @__PURE__ */ st({
|
|
10848
10865
|
__name: "index",
|
|
10849
10866
|
setup(t) {
|
|
10850
|
-
const { t: e } =
|
|
10867
|
+
const { t: e } = xt(), { sysBarAvail: n } = Ln(), { backgroundColor0: o, backgroundColor2: i } = Vt(), a = It(""), r = Y(() => {
|
|
10851
10868
|
let _ = 48;
|
|
10852
10869
|
return n.value && (_ += 24), {
|
|
10853
10870
|
position: "relative",
|
|
@@ -10855,31 +10872,31 @@ const sc = { class: "position-relative w-100 h-100" }, ac = /* @__PURE__ */ st({
|
|
|
10855
10872
|
};
|
|
10856
10873
|
}), u = (_) => {
|
|
10857
10874
|
a.value = _.code;
|
|
10858
|
-
}, { open: l } =
|
|
10875
|
+
}, { open: l } = He("sourceDlg", u);
|
|
10859
10876
|
return (_, T) => {
|
|
10860
|
-
const
|
|
10861
|
-
return B(), Z(
|
|
10877
|
+
const g = D("v-sheet"), m = D("v-btn"), y = D("v-spacer"), E = D("v-dialog");
|
|
10878
|
+
return B(), Z(E, {
|
|
10862
10879
|
modelValue: R(l),
|
|
10863
|
-
"onUpdate:modelValue": T[1] || (T[1] = (P) =>
|
|
10880
|
+
"onUpdate:modelValue": T[1] || (T[1] = (P) => $t(l) ? l.value = P : null),
|
|
10864
10881
|
fullscreen: "",
|
|
10865
10882
|
"no-click-animation": "",
|
|
10866
10883
|
persistent: "",
|
|
10867
10884
|
transition: "dialog-bottom-transition",
|
|
10868
|
-
onKeydown: T[2] || (T[2] =
|
|
10885
|
+
onKeydown: T[2] || (T[2] = gn(Bt((P) => l.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
10869
10886
|
}, {
|
|
10870
10887
|
default: tt(() => [
|
|
10871
|
-
L(
|
|
10888
|
+
L(g, {
|
|
10872
10889
|
color: R(o),
|
|
10873
10890
|
height: "100%",
|
|
10874
10891
|
width: "100%"
|
|
10875
10892
|
}, {
|
|
10876
10893
|
default: tt(() => [
|
|
10877
|
-
R(n) ? (B(), Z(
|
|
10894
|
+
R(n) ? (B(), Z(g, {
|
|
10878
10895
|
key: 0,
|
|
10879
10896
|
color: R(i),
|
|
10880
10897
|
height: 24
|
|
10881
10898
|
}, null, 8, ["color"])) : mt("", !0),
|
|
10882
|
-
L(
|
|
10899
|
+
L(g, {
|
|
10883
10900
|
class: "d-flex align-center px-2",
|
|
10884
10901
|
color: R(i),
|
|
10885
10902
|
height: 48
|
|
@@ -10891,7 +10908,7 @@ const sc = { class: "position-relative w-100 h-100" }, ac = /* @__PURE__ */ st({
|
|
|
10891
10908
|
variant: "text",
|
|
10892
10909
|
onClick: T[0] || (T[0] = (P) => l.value = !1)
|
|
10893
10910
|
}),
|
|
10894
|
-
W("span",
|
|
10911
|
+
W("span", cc, ce(R(e)("x-block-lib.dlg.source.title")), 1),
|
|
10895
10912
|
L(y)
|
|
10896
10913
|
]),
|
|
10897
10914
|
_: 1
|
|
@@ -10899,8 +10916,8 @@ const sc = { class: "position-relative w-100 h-100" }, ac = /* @__PURE__ */ st({
|
|
|
10899
10916
|
W("div", {
|
|
10900
10917
|
style: H(r.value)
|
|
10901
10918
|
}, [
|
|
10902
|
-
W("div",
|
|
10903
|
-
L(
|
|
10919
|
+
W("div", rc, [
|
|
10920
|
+
L(ac, { code: a.value }, null, 8, ["code"])
|
|
10904
10921
|
])
|
|
10905
10922
|
], 4)
|
|
10906
10923
|
]),
|
|
@@ -10911,16 +10928,16 @@ const sc = { class: "position-relative w-100 h-100" }, ac = /* @__PURE__ */ st({
|
|
|
10911
10928
|
}, 8, ["modelValue"]);
|
|
10912
10929
|
};
|
|
10913
10930
|
}
|
|
10914
|
-
}),
|
|
10915
|
-
t.component("XBlockly",
|
|
10931
|
+
}), lc = (t) => {
|
|
10932
|
+
t.component("XBlockly", sc), t.component("XSourceDlg", uc);
|
|
10916
10933
|
};
|
|
10917
|
-
async function
|
|
10918
|
-
return (await
|
|
10934
|
+
async function Ec(t) {
|
|
10935
|
+
return (await bn(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en.h3b844ct.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans.mk5971y3.js") }), `./locales/${t}/index.ts`, 4)).default;
|
|
10919
10936
|
}
|
|
10920
|
-
const
|
|
10937
|
+
const gc = { install: lc };
|
|
10921
10938
|
export {
|
|
10922
|
-
|
|
10923
|
-
|
|
10924
|
-
|
|
10925
|
-
|
|
10939
|
+
sc as XBlockly,
|
|
10940
|
+
gc as default,
|
|
10941
|
+
lc as install,
|
|
10942
|
+
Ec as loadLocaleMessageBlock
|
|
10926
10943
|
};
|