x-block-lib 0.11.11 → 0.11.13
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.
|
@@ -301,11 +301,11 @@ var en_default = {
|
|
|
301
301
|
CATEGORY_LOOP: "loop",
|
|
302
302
|
CATEGORY_MATH: "math",
|
|
303
303
|
CATEGORY_MESSAGE: "msg",
|
|
304
|
-
CATEGORY_MISC: "misc",
|
|
305
304
|
CATEGORY_OBJECT: "object",
|
|
306
305
|
CATEGORY_PAGE: "page",
|
|
307
306
|
CATEGORY_PROCEDURE: "proc",
|
|
308
307
|
CATEGORY_RESOURCE: "resource",
|
|
308
|
+
CATEGORY_SYSTEM: "system",
|
|
309
309
|
CATEGORY_TEXT: "text",
|
|
310
310
|
CATEGORY_TIME: "time",
|
|
311
311
|
CATEGORY_TYPE: "type",
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
(function(){try{document.getElementById(`x-block-lib`)?.remove();const e = document.createElement(`style`);e.setAttribute(`id`, `x-block-lib`);const t = document.createTextNode(`.ghost[data-v-x-block-lib-ca7316a0]{opacity:.4;pointer-events:none}.blocklyToolbox{width:56px;overflow-x:hidden}.blocklyMainBackground{stroke-width:0}.blocklyToolboxCategory{margin-bottom:12px!important}.blocklyToolboxCategoryIcon{display:none!important}.blocklyTreeRowContentContainer{place-items:center;height:28px;display:flex;overflow:hidden}.blocklyFlyout{z-index:21}pre code.hljs{padding:1em;display:block;overflow-x:auto}code.hljs{padding:3px 5px}.hljs{color:#444;background:#f3f3f3}.hljs-comment{color:#697070}.hljs-punctuation,.hljs-tag{color:#444a}.hljs-tag .hljs-attr,.hljs-tag .hljs-name{color:#444}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#ab5656}.hljs-literal{color:#695}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta .hljs-string{color:#38a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}`);e.appendChild(t);document.head.appendChild(e);}catch(e){console.error('rolldown-plugin-inject-css', e);}})()
|
|
2
|
-
import { A as Names, B as constants, C as FieldCheckbox, D as FieldNumber, E as FieldLabel, F as Themes, G as icons, H as dialog, I as Variables, J as registry, K as inject$1, L as WorkspaceSvg, M as ShortcutItems, N as ShortcutRegistry, O as FieldTextInput, P as Theme, Q as utils, R as Xml, S as Extensions, T as FieldImage, U as getMainWorkspace, V as defineBlocksWithJsonArray, W as getSelected, X as setLocale$1, Y as serialization, Z as svgResize, _ as javascriptGenerator, a as lo, b as ContextMenuRegistry, c as encodeString, d as snakeCase, f as parseInt$1, g as Order, h as cloneDeep, i as require_dist$2, j as Procedures, k as Msg, l as require_dist, m as debounce, n as o, o as useResizeObserver, p as isEqual, q as inputs, r as core_default, s as require_dist$1, t as javascript, u as upperCase, v as Blocks, w as FieldDropdown, x as Events, y as ContextMenu, z as common } from "./vendor.
|
|
2
|
+
import { A as Names, B as constants, C as FieldCheckbox, D as FieldNumber, E as FieldLabel, F as Themes, G as icons, H as dialog, I as Variables, J as registry, K as inject$1, L as WorkspaceSvg, M as ShortcutItems, N as ShortcutRegistry, O as FieldTextInput, P as Theme, Q as utils, R as Xml, S as Extensions, T as FieldImage, U as getMainWorkspace, V as defineBlocksWithJsonArray, W as getSelected, X as setLocale$1, Y as serialization, Z as svgResize, _ as javascriptGenerator, a as lo, b as ContextMenuRegistry, c as encodeString, d as snakeCase, f as parseInt$1, g as Order, h as cloneDeep, i as require_dist$2, j as Procedures, k as Msg, l as require_dist, m as debounce, n as o, o as useResizeObserver, p as isEqual, q as inputs, r as core_default, s as require_dist$1, t as javascript, u as upperCase, v as Blocks, w as FieldDropdown, x as Events, y as ContextMenu, z as common } from "./vendor.fqjsm3xo.js";
|
|
3
3
|
import { eventBus, globalObjects, messageWarning, openConfirmDlg, openPromptDlg, useColor, useSystem, useViewStack } from "x-essential-lib";
|
|
4
4
|
import { globalState } from "x-state-lib";
|
|
5
5
|
import { addIndent, finalProperties, getElement, getImplementMethodName, getItems, getTag, getTypes, makeEventId, makeEventKeyOfCustomSlot, makeEventKeyOfElementSlot, makeMethodId, makeMethodKeyOfCustomSlot, makeMethodKeyOfElementSlot, makePropertyId, makePropertyKeyOfCustomSlot, makePropertyKeyOfElementSlot, makeTriggerId, parseNumberUnit, pkgs, themeColors, toEventName, toMethodName, toPropertyName, unwrapEventId, unwrapEventKeyOfCustomSlot, unwrapEventKeyOfElementSlot, unwrapMethodId, unwrapMethodKeyOfCustomSlot, unwrapMethodKeyOfElementSlot, unwrapPropertyId, unwrapPropertyKeyOfCustomSlot, unwrapPropertyKeyOfElementSlot, unwrapSlotId } from "x-runtime-lib";
|
|
6
|
+
import { Permission } from "x-permission-lib";
|
|
6
7
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, inject, isRef, mergeModels, mergeProps, nextTick, normalizeStyle, onBeforeUnmount, onMounted, onUnmounted, openBlock, provide, ref, renderList, renderSlot, resolveComponent, resolveDirective, toDisplayString, unref, useId, useModel, useTemplateRef, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
7
8
|
import { useI18n } from "vue-i18n";
|
|
8
9
|
import { useDisplay } from "vuetify";
|
|
9
10
|
|
|
10
11
|
//#region src/core/locale/index.ts
|
|
11
12
|
async function setLocale(locale) {
|
|
12
|
-
if (locale === "en") setLocale$1((await import("./en.
|
|
13
|
-
else if (locale === "zhHans") setLocale$1((await import("./zhHans.
|
|
13
|
+
if (locale === "en") setLocale$1((await import("./en.gpg8dd47.js")).default);
|
|
14
|
+
else if (locale === "zhHans") setLocale$1((await import("./zhHans.b6qujoys.js")).default);
|
|
14
15
|
else throw new Error(`invalid locale=${locale}`);
|
|
15
16
|
}
|
|
16
17
|
function localeMsg(key) {
|
|
@@ -595,6 +596,10 @@ function ensureParameterBlockV1s(scope, params) {
|
|
|
595
596
|
}
|
|
596
597
|
}
|
|
597
598
|
|
|
599
|
+
//#endregion
|
|
600
|
+
//#region src/core/utils/common/permisison.ts
|
|
601
|
+
const filtedPermissions = [Permission.unknown_permission, Permission.UNRECOGNIZED];
|
|
602
|
+
|
|
598
603
|
//#endregion
|
|
599
604
|
//#region src/core/utils/common/shadow.ts
|
|
600
605
|
function shadowOfJsonNullV1() {
|
|
@@ -4228,145 +4233,6 @@ javascriptGenerator.forBlock["set_app_method_output_v1"] = function(blockBase) {
|
|
|
4228
4233
|
return `__outputs__[${javascriptGenerator.quote_(block.output.key)}] = ${value};\n`;
|
|
4229
4234
|
};
|
|
4230
4235
|
|
|
4231
|
-
//#endregion
|
|
4232
|
-
//#region src/core/blocks/app/misc/appEnvIs/v1/index.ts
|
|
4233
|
-
defineBlocksWithJsonArray([{
|
|
4234
|
-
type: "app_env_is_v1",
|
|
4235
|
-
message0: "%{BKY_APP_V1_APP_ENV_IS_TITLE}",
|
|
4236
|
-
args0: [{
|
|
4237
|
-
type: "field_dropdown",
|
|
4238
|
-
name: "ENV",
|
|
4239
|
-
options: [["%{BKY_APP_ENV_DEV}", "dev"], ["%{BKY_APP_ENV_PROD}", "prod"]]
|
|
4240
|
-
}],
|
|
4241
|
-
output: "Boolean",
|
|
4242
|
-
style: "logic_blocks",
|
|
4243
|
-
tooltip: "%{BKY_APP_V1_APP_ENV_IS_TOOLTIP}",
|
|
4244
|
-
helpUrl: "%{BKY_APP_V1_APP_ENV_IS_HELPURL}"
|
|
4245
|
-
}]);
|
|
4246
|
-
javascriptGenerator.forBlock["app_env_is_v1"] = function(block) {
|
|
4247
|
-
return [`__getEnvV1__() === ${javascriptGenerator.quote_(block.getFieldValue("ENV"))}`, Order.ATOMIC];
|
|
4248
|
-
};
|
|
4249
|
-
|
|
4250
|
-
//#endregion
|
|
4251
|
-
//#region src/core/blocks/app/misc/navigateTo/v1/index.ts
|
|
4252
|
-
const NAVIGATE_TO_V1 = {
|
|
4253
|
-
init: function() {
|
|
4254
|
-
this.app = {
|
|
4255
|
-
id: "",
|
|
4256
|
-
name: ""
|
|
4257
|
-
};
|
|
4258
|
-
this.page = {
|
|
4259
|
-
id: "",
|
|
4260
|
-
name: ""
|
|
4261
|
-
};
|
|
4262
|
-
this.appendDummyInput().appendField("%{BKY_APP_V1_NAVIGATE_TO_TITLE}").appendField(new FieldDropdown(() => this.genAppOpts_()), "APP").appendField(new FieldDropdown(() => this.genPageOpts_()), "PAGE");
|
|
4263
|
-
this.setPreviousStatement(true, null);
|
|
4264
|
-
this.setNextStatement(true, null);
|
|
4265
|
-
this.setStyle("procedure_blocks");
|
|
4266
|
-
this.setTooltip("%{BKY_APP_V1_NAVIGATE_TOOLTIP}");
|
|
4267
|
-
this.setHelpUrl("%{BKY_APP_V1_NAVIGATE_HELPURL}");
|
|
4268
|
-
this.initData_();
|
|
4269
|
-
},
|
|
4270
|
-
initData_: function() {
|
|
4271
|
-
if (this.app.id) return;
|
|
4272
|
-
const appInfo = getAllAppInfos()?.[0];
|
|
4273
|
-
if (!appInfo) return;
|
|
4274
|
-
this.app.id = appInfo.id;
|
|
4275
|
-
this.app.name = appInfo.name;
|
|
4276
|
-
const appDropdown = this.getField("APP");
|
|
4277
|
-
appDropdown.getOptions(false);
|
|
4278
|
-
appDropdown.setValue(this.app.id);
|
|
4279
|
-
const pageInfo = getAllPageInfos(this.app.id)?.[0];
|
|
4280
|
-
if (!pageInfo) return;
|
|
4281
|
-
this.page.id = pageInfo.id;
|
|
4282
|
-
this.page.name = pageInfo.name;
|
|
4283
|
-
const pageDropdown = this.getField("PAGE");
|
|
4284
|
-
pageDropdown.getOptions(false);
|
|
4285
|
-
pageDropdown.setValue(this.page.id);
|
|
4286
|
-
},
|
|
4287
|
-
saveExtraState: function() {
|
|
4288
|
-
return {
|
|
4289
|
-
app: this.app,
|
|
4290
|
-
page: this.page
|
|
4291
|
-
};
|
|
4292
|
-
},
|
|
4293
|
-
loadExtraState: function(state) {
|
|
4294
|
-
this.app.id = state.app?.id ?? "";
|
|
4295
|
-
this.app.name = state.app?.name ?? "";
|
|
4296
|
-
this.page.id = state.page?.id ?? "";
|
|
4297
|
-
this.page.name = state.page?.name ?? "";
|
|
4298
|
-
setTimeout(() => {
|
|
4299
|
-
this.checkWarning_();
|
|
4300
|
-
}, 0);
|
|
4301
|
-
},
|
|
4302
|
-
genAppOpts_: function() {
|
|
4303
|
-
return genAppOpts();
|
|
4304
|
-
},
|
|
4305
|
-
genPageOpts_: function() {
|
|
4306
|
-
return genPageOpts(this.app.id);
|
|
4307
|
-
},
|
|
4308
|
-
onchange: function(event) {
|
|
4309
|
-
if (event.type === Events.BLOCK_CHANGE) {
|
|
4310
|
-
const changeEvent = event;
|
|
4311
|
-
if (changeEvent.blockId === this.id) {
|
|
4312
|
-
if (changeEvent.element === "field") {
|
|
4313
|
-
if (changeEvent.name === "APP") this.onAppChange_(changeEvent.newValue);
|
|
4314
|
-
else if (changeEvent.name === "PAGE") this.onPageChange_(changeEvent.newValue);
|
|
4315
|
-
}
|
|
4316
|
-
setTimeout(() => {
|
|
4317
|
-
this.checkWarning_();
|
|
4318
|
-
}, 0);
|
|
4319
|
-
}
|
|
4320
|
-
}
|
|
4321
|
-
},
|
|
4322
|
-
onAppChange_: function(value) {
|
|
4323
|
-
const appInfo = getAppInfo(value);
|
|
4324
|
-
if (!appInfo) {
|
|
4325
|
-
console.assert(false);
|
|
4326
|
-
return;
|
|
4327
|
-
}
|
|
4328
|
-
const change = this.app.id !== appInfo.id;
|
|
4329
|
-
this.app.id = appInfo.id;
|
|
4330
|
-
this.app.name = appInfo.name;
|
|
4331
|
-
const pageDropdown = this.getField("PAGE");
|
|
4332
|
-
pageDropdown.getOptions(false);
|
|
4333
|
-
if (change) {
|
|
4334
|
-
const pageInfo = getAllPageInfos(this.app.id)?.[0];
|
|
4335
|
-
pageDropdown.setValue(pageInfo?.id ?? "");
|
|
4336
|
-
}
|
|
4337
|
-
this.onPageChange_(pageDropdown.getValue());
|
|
4338
|
-
},
|
|
4339
|
-
onPageChange_: function(value) {
|
|
4340
|
-
const pageInfo = getPageInfo(this.app.id, value);
|
|
4341
|
-
if (!pageInfo) {
|
|
4342
|
-
console.assert(false);
|
|
4343
|
-
return;
|
|
4344
|
-
}
|
|
4345
|
-
this.page.id = pageInfo.id;
|
|
4346
|
-
this.page.name = pageInfo.name;
|
|
4347
|
-
},
|
|
4348
|
-
checkWarning_: function() {
|
|
4349
|
-
const appInfo = getAppInfo(this.app.id);
|
|
4350
|
-
if (!appInfo) {
|
|
4351
|
-
this.setWarningText(localeMsg("WARN_APP_NOT_FOUND"));
|
|
4352
|
-
return;
|
|
4353
|
-
}
|
|
4354
|
-
if (appInfo.name !== this.app.name) this.app.name = appInfo.name;
|
|
4355
|
-
const pageInfo = getPageInfo(this.app.id, this.page.id);
|
|
4356
|
-
if (!pageInfo) {
|
|
4357
|
-
this.setWarningText(localeMsg("WARN_PAGE_NOT_FOUND"));
|
|
4358
|
-
return;
|
|
4359
|
-
}
|
|
4360
|
-
if (pageInfo.name !== this.page.name) this.page.name = pageInfo.name;
|
|
4361
|
-
this.setWarningText(null);
|
|
4362
|
-
}
|
|
4363
|
-
};
|
|
4364
|
-
Blocks.navigate_to_v1 = NAVIGATE_TO_V1;
|
|
4365
|
-
javascriptGenerator.forBlock["navigate_to_v1"] = function(blockBase) {
|
|
4366
|
-
const block = blockBase;
|
|
4367
|
-
return `__navigateToV1__(${javascriptGenerator.quote_(block.app.id)}, ${javascriptGenerator.quote_(block.page.id)});\n`;
|
|
4368
|
-
};
|
|
4369
|
-
|
|
4370
4236
|
//#endregion
|
|
4371
4237
|
//#region src/core/blocks/app/misc/selectComp/v1/index.ts
|
|
4372
4238
|
const SELECT_COMP_V1 = {
|
|
@@ -5043,6 +4909,145 @@ javascriptGenerator.forBlock["set_app_state_v1"] = function(blockBase) {
|
|
|
5043
4909
|
return `await __setStateV1__(${javascriptGenerator.quote_(block.state.id)}, ${value});\n`;
|
|
5044
4910
|
};
|
|
5045
4911
|
|
|
4912
|
+
//#endregion
|
|
4913
|
+
//#region src/core/blocks/app/system/appEnvIs/v1/index.ts
|
|
4914
|
+
defineBlocksWithJsonArray([{
|
|
4915
|
+
type: "app_env_is_v1",
|
|
4916
|
+
message0: "%{BKY_APP_V1_APP_ENV_IS_TITLE}",
|
|
4917
|
+
args0: [{
|
|
4918
|
+
type: "field_dropdown",
|
|
4919
|
+
name: "ENV",
|
|
4920
|
+
options: [["%{BKY_APP_ENV_DEV}", "dev"], ["%{BKY_APP_ENV_PROD}", "prod"]]
|
|
4921
|
+
}],
|
|
4922
|
+
output: "Boolean",
|
|
4923
|
+
style: "logic_blocks",
|
|
4924
|
+
tooltip: "%{BKY_APP_V1_APP_ENV_IS_TOOLTIP}",
|
|
4925
|
+
helpUrl: "%{BKY_APP_V1_APP_ENV_IS_HELPURL}"
|
|
4926
|
+
}]);
|
|
4927
|
+
javascriptGenerator.forBlock["app_env_is_v1"] = function(block) {
|
|
4928
|
+
return [`__getEnvV1__() === ${javascriptGenerator.quote_(block.getFieldValue("ENV"))}`, Order.ATOMIC];
|
|
4929
|
+
};
|
|
4930
|
+
|
|
4931
|
+
//#endregion
|
|
4932
|
+
//#region src/core/blocks/app/system/navigateTo/v1/index.ts
|
|
4933
|
+
const NAVIGATE_TO_V1 = {
|
|
4934
|
+
init: function() {
|
|
4935
|
+
this.app = {
|
|
4936
|
+
id: "",
|
|
4937
|
+
name: ""
|
|
4938
|
+
};
|
|
4939
|
+
this.page = {
|
|
4940
|
+
id: "",
|
|
4941
|
+
name: ""
|
|
4942
|
+
};
|
|
4943
|
+
this.appendDummyInput().appendField("%{BKY_APP_V1_NAVIGATE_TO_TITLE}").appendField(new FieldDropdown(() => this.genAppOpts_()), "APP").appendField(new FieldDropdown(() => this.genPageOpts_()), "PAGE");
|
|
4944
|
+
this.setPreviousStatement(true, null);
|
|
4945
|
+
this.setNextStatement(true, null);
|
|
4946
|
+
this.setStyle("procedure_blocks");
|
|
4947
|
+
this.setTooltip("%{BKY_APP_V1_NAVIGATE_TO_TOOLTIP}");
|
|
4948
|
+
this.setHelpUrl("%{BKY_APP_V1_NAVIGATE_TO_HELPURL}");
|
|
4949
|
+
this.initData_();
|
|
4950
|
+
},
|
|
4951
|
+
initData_: function() {
|
|
4952
|
+
if (this.app.id) return;
|
|
4953
|
+
const appInfo = getAllAppInfos()?.[0];
|
|
4954
|
+
if (!appInfo) return;
|
|
4955
|
+
this.app.id = appInfo.id;
|
|
4956
|
+
this.app.name = appInfo.name;
|
|
4957
|
+
const appDropdown = this.getField("APP");
|
|
4958
|
+
appDropdown.getOptions(false);
|
|
4959
|
+
appDropdown.setValue(this.app.id);
|
|
4960
|
+
const pageInfo = getAllPageInfos(this.app.id)?.[0];
|
|
4961
|
+
if (!pageInfo) return;
|
|
4962
|
+
this.page.id = pageInfo.id;
|
|
4963
|
+
this.page.name = pageInfo.name;
|
|
4964
|
+
const pageDropdown = this.getField("PAGE");
|
|
4965
|
+
pageDropdown.getOptions(false);
|
|
4966
|
+
pageDropdown.setValue(this.page.id);
|
|
4967
|
+
},
|
|
4968
|
+
saveExtraState: function() {
|
|
4969
|
+
return {
|
|
4970
|
+
app: this.app,
|
|
4971
|
+
page: this.page
|
|
4972
|
+
};
|
|
4973
|
+
},
|
|
4974
|
+
loadExtraState: function(state) {
|
|
4975
|
+
this.app.id = state.app?.id ?? "";
|
|
4976
|
+
this.app.name = state.app?.name ?? "";
|
|
4977
|
+
this.page.id = state.page?.id ?? "";
|
|
4978
|
+
this.page.name = state.page?.name ?? "";
|
|
4979
|
+
setTimeout(() => {
|
|
4980
|
+
this.checkWarning_();
|
|
4981
|
+
}, 0);
|
|
4982
|
+
},
|
|
4983
|
+
genAppOpts_: function() {
|
|
4984
|
+
return genAppOpts();
|
|
4985
|
+
},
|
|
4986
|
+
genPageOpts_: function() {
|
|
4987
|
+
return genPageOpts(this.app.id);
|
|
4988
|
+
},
|
|
4989
|
+
onchange: function(event) {
|
|
4990
|
+
if (event.type === Events.BLOCK_CHANGE) {
|
|
4991
|
+
const changeEvent = event;
|
|
4992
|
+
if (changeEvent.blockId === this.id) {
|
|
4993
|
+
if (changeEvent.element === "field") {
|
|
4994
|
+
if (changeEvent.name === "APP") this.onAppChange_(changeEvent.newValue);
|
|
4995
|
+
else if (changeEvent.name === "PAGE") this.onPageChange_(changeEvent.newValue);
|
|
4996
|
+
}
|
|
4997
|
+
setTimeout(() => {
|
|
4998
|
+
this.checkWarning_();
|
|
4999
|
+
}, 0);
|
|
5000
|
+
}
|
|
5001
|
+
}
|
|
5002
|
+
},
|
|
5003
|
+
onAppChange_: function(value) {
|
|
5004
|
+
const appInfo = getAppInfo(value);
|
|
5005
|
+
if (!appInfo) {
|
|
5006
|
+
console.assert(false);
|
|
5007
|
+
return;
|
|
5008
|
+
}
|
|
5009
|
+
const change = this.app.id !== appInfo.id;
|
|
5010
|
+
this.app.id = appInfo.id;
|
|
5011
|
+
this.app.name = appInfo.name;
|
|
5012
|
+
const pageDropdown = this.getField("PAGE");
|
|
5013
|
+
pageDropdown.getOptions(false);
|
|
5014
|
+
if (change) {
|
|
5015
|
+
const pageInfo = getAllPageInfos(this.app.id)?.[0];
|
|
5016
|
+
pageDropdown.setValue(pageInfo?.id ?? "");
|
|
5017
|
+
}
|
|
5018
|
+
this.onPageChange_(pageDropdown.getValue());
|
|
5019
|
+
},
|
|
5020
|
+
onPageChange_: function(value) {
|
|
5021
|
+
const pageInfo = getPageInfo(this.app.id, value);
|
|
5022
|
+
if (!pageInfo) {
|
|
5023
|
+
console.assert(false);
|
|
5024
|
+
return;
|
|
5025
|
+
}
|
|
5026
|
+
this.page.id = pageInfo.id;
|
|
5027
|
+
this.page.name = pageInfo.name;
|
|
5028
|
+
},
|
|
5029
|
+
checkWarning_: function() {
|
|
5030
|
+
const appInfo = getAppInfo(this.app.id);
|
|
5031
|
+
if (!appInfo) {
|
|
5032
|
+
this.setWarningText(localeMsg("WARN_APP_NOT_FOUND"));
|
|
5033
|
+
return;
|
|
5034
|
+
}
|
|
5035
|
+
if (appInfo.name !== this.app.name) this.app.name = appInfo.name;
|
|
5036
|
+
const pageInfo = getPageInfo(this.app.id, this.page.id);
|
|
5037
|
+
if (!pageInfo) {
|
|
5038
|
+
this.setWarningText(localeMsg("WARN_PAGE_NOT_FOUND"));
|
|
5039
|
+
return;
|
|
5040
|
+
}
|
|
5041
|
+
if (pageInfo.name !== this.page.name) this.page.name = pageInfo.name;
|
|
5042
|
+
this.setWarningText(null);
|
|
5043
|
+
}
|
|
5044
|
+
};
|
|
5045
|
+
Blocks.navigate_to_v1 = NAVIGATE_TO_V1;
|
|
5046
|
+
javascriptGenerator.forBlock["navigate_to_v1"] = function(blockBase) {
|
|
5047
|
+
const block = blockBase;
|
|
5048
|
+
return `__navigateToV1__(${javascriptGenerator.quote_(block.app.id)}, ${javascriptGenerator.quote_(block.page.id)});\n`;
|
|
5049
|
+
};
|
|
5050
|
+
|
|
5046
5051
|
//#endregion
|
|
5047
5052
|
//#region src/core/blocks/color/colorBlend/v1/index.ts
|
|
5048
5053
|
defineBlocksWithJsonArray([{
|
|
@@ -5192,6 +5197,14 @@ javascriptGenerator.forBlock["custom_flow_trigger_v1"] = function() {
|
|
|
5192
5197
|
return ``;
|
|
5193
5198
|
};
|
|
5194
5199
|
|
|
5200
|
+
//#endregion
|
|
5201
|
+
//#region src/core/blocks/compute/flow/hasRoleFlow/v1/index.ts
|
|
5202
|
+
const HAS_ROLE_FLOW_V1 = { init: function() {} };
|
|
5203
|
+
Blocks.has_role_flow_v1 = HAS_ROLE_FLOW_V1;
|
|
5204
|
+
javascriptGenerator.forBlock["has_role_flow_v1"] = function() {
|
|
5205
|
+
return ``;
|
|
5206
|
+
};
|
|
5207
|
+
|
|
5195
5208
|
//#endregion
|
|
5196
5209
|
//#region src/core/blocks/compute/flow/invokeFlowTrigger/v1/index.ts
|
|
5197
5210
|
const INVOKE_FLOW_TRIGGER_V1 = { init: function() {} };
|
|
@@ -5308,8 +5321,8 @@ const CALL_FUNC_V1 = {
|
|
|
5308
5321
|
if (!funcInfo) return;
|
|
5309
5322
|
this.func.id = funcInfo.id;
|
|
5310
5323
|
this.func.name = funcInfo.name;
|
|
5311
|
-
this.func.inputs = funcInfo.inputs;
|
|
5312
|
-
this.func.outputs = funcInfo.outputs;
|
|
5324
|
+
this.func.inputs = funcInfo.inputs ?? [];
|
|
5325
|
+
this.func.outputs = funcInfo.outputs ?? [];
|
|
5313
5326
|
const funcDropdown = this.getField("FUNC");
|
|
5314
5327
|
funcDropdown.getOptions(false);
|
|
5315
5328
|
funcDropdown.setValue(this.func.id);
|
|
@@ -5379,8 +5392,8 @@ const CALL_FUNC_V1 = {
|
|
|
5379
5392
|
return;
|
|
5380
5393
|
}
|
|
5381
5394
|
this.func.id = funcInfo.id;
|
|
5382
|
-
this.func.inputs = funcInfo.inputs;
|
|
5383
|
-
this.func.outputs = funcInfo.outputs;
|
|
5395
|
+
this.func.inputs = funcInfo.inputs ?? [];
|
|
5396
|
+
this.func.outputs = funcInfo.outputs ?? [];
|
|
5384
5397
|
this.updateShape_();
|
|
5385
5398
|
this.updateCheck_();
|
|
5386
5399
|
this.updateShadow_();
|
|
@@ -5532,8 +5545,8 @@ const CALL_FUNC_INTERNAL_V1 = {
|
|
|
5532
5545
|
if (!funcInfo) return;
|
|
5533
5546
|
this.func.id = funcInfo.id;
|
|
5534
5547
|
this.func.name = funcInfo.name;
|
|
5535
|
-
this.func.inputs = funcInfo.inputs;
|
|
5536
|
-
this.func.outputs = funcInfo.outputs;
|
|
5548
|
+
this.func.inputs = funcInfo.inputs ?? [];
|
|
5549
|
+
this.func.outputs = funcInfo.outputs ?? [];
|
|
5537
5550
|
const funcDropdown = this.getField("FUNC");
|
|
5538
5551
|
funcDropdown.getOptions(false);
|
|
5539
5552
|
funcDropdown.setValue(this.func.id);
|
|
@@ -5603,8 +5616,8 @@ const CALL_FUNC_INTERNAL_V1 = {
|
|
|
5603
5616
|
return;
|
|
5604
5617
|
}
|
|
5605
5618
|
this.func.id = funcInfo.id;
|
|
5606
|
-
this.func.inputs = funcInfo.inputs;
|
|
5607
|
-
this.func.outputs = funcInfo.outputs;
|
|
5619
|
+
this.func.inputs = funcInfo.inputs ?? [];
|
|
5620
|
+
this.func.outputs = funcInfo.outputs ?? [];
|
|
5608
5621
|
this.updateShape_();
|
|
5609
5622
|
this.updateCheck_();
|
|
5610
5623
|
this.updateShadow_();
|
|
@@ -5805,6 +5818,14 @@ javascriptGenerator.forBlock["func_entry_v1"] = function(blockBase) {
|
|
|
5805
5818
|
${handle}}`;
|
|
5806
5819
|
};
|
|
5807
5820
|
|
|
5821
|
+
//#endregion
|
|
5822
|
+
//#region src/core/blocks/compute/func/hasRoleFunc/v1/index.ts
|
|
5823
|
+
const HAS_ROLE_FUNC_V1 = { init: function() {} };
|
|
5824
|
+
Blocks.has_role_func_v1 = HAS_ROLE_FUNC_V1;
|
|
5825
|
+
javascriptGenerator.forBlock["has_role_func_v1"] = function() {
|
|
5826
|
+
return ``;
|
|
5827
|
+
};
|
|
5828
|
+
|
|
5808
5829
|
//#endregion
|
|
5809
5830
|
//#region src/core/blocks/compute/func/setFuncOutput/v1/index.ts
|
|
5810
5831
|
const SET_FUNC_OUTPUT_V1 = {
|
|
@@ -5927,7 +5948,7 @@ javascriptGenerator.forBlock["set_func_output_v1"] = function(blockBase) {
|
|
|
5927
5948
|
};
|
|
5928
5949
|
|
|
5929
5950
|
//#endregion
|
|
5930
|
-
//#region src/core/blocks/compute/
|
|
5951
|
+
//#region src/core/blocks/compute/system/computeDebugTrace/v1/index.ts
|
|
5931
5952
|
defineBlocksWithJsonArray([{
|
|
5932
5953
|
type: "compute_debug_trace_v1",
|
|
5933
5954
|
message0: "%{BKY_COMPUTE_V1_COMPUTE_DEBUG_TRACE_TITLE}",
|
|
@@ -5947,7 +5968,7 @@ javascriptGenerator.forBlock["compute_debug_trace_v1"] = function(block) {
|
|
|
5947
5968
|
};
|
|
5948
5969
|
|
|
5949
5970
|
//#endregion
|
|
5950
|
-
//#region src/core/blocks/compute/
|
|
5971
|
+
//#region src/core/blocks/compute/system/computeEnvIs/v1/index.ts
|
|
5951
5972
|
defineBlocksWithJsonArray([{
|
|
5952
5973
|
type: "compute_env_is_v1",
|
|
5953
5974
|
message0: "%{BKY_COMPUTE_V1_COMPUTE_ENV_IS_TITLE}",
|
|
@@ -11539,7 +11560,7 @@ WorkspaceSvg.prototype.cleanUp = function() {
|
|
|
11539
11560
|
};
|
|
11540
11561
|
|
|
11541
11562
|
//#endregion
|
|
11542
|
-
//#region \0@oxc-project+runtime@0.
|
|
11563
|
+
//#region \0@oxc-project+runtime@0.152.0/helpers/esm/typeof.js
|
|
11543
11564
|
var import_dist$1 = require_dist$1();
|
|
11544
11565
|
function _typeof(o) {
|
|
11545
11566
|
"@babel/helpers - typeof";
|
|
@@ -11551,7 +11572,7 @@ function _typeof(o) {
|
|
|
11551
11572
|
}
|
|
11552
11573
|
|
|
11553
11574
|
//#endregion
|
|
11554
|
-
//#region \0@oxc-project+runtime@0.
|
|
11575
|
+
//#region \0@oxc-project+runtime@0.152.0/helpers/esm/toPrimitive.js
|
|
11555
11576
|
function toPrimitive(t, r) {
|
|
11556
11577
|
if ("object" != _typeof(t) || !t) return t;
|
|
11557
11578
|
var e = t[Symbol.toPrimitive];
|
|
@@ -11564,14 +11585,14 @@ function toPrimitive(t, r) {
|
|
|
11564
11585
|
}
|
|
11565
11586
|
|
|
11566
11587
|
//#endregion
|
|
11567
|
-
//#region \0@oxc-project+runtime@0.
|
|
11588
|
+
//#region \0@oxc-project+runtime@0.152.0/helpers/esm/toPropertyKey.js
|
|
11568
11589
|
function toPropertyKey(t) {
|
|
11569
11590
|
var i = toPrimitive(t, "string");
|
|
11570
11591
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
11571
11592
|
}
|
|
11572
11593
|
|
|
11573
11594
|
//#endregion
|
|
11574
|
-
//#region \0@oxc-project+runtime@0.
|
|
11595
|
+
//#region \0@oxc-project+runtime@0.152.0/helpers/esm/defineProperty.js
|
|
11575
11596
|
function _defineProperty(e, r, t) {
|
|
11576
11597
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
11577
11598
|
value: t,
|
|
@@ -12107,7 +12128,7 @@ var lock_default = index_vue_vue_type_script_setup_true_lang_default$6;
|
|
|
12107
12128
|
//#endregion
|
|
12108
12129
|
//#region src/components/blockly/navigator/blockList/item.vue?vue&type=script&setup=true&lang.ts
|
|
12109
12130
|
const _hoisted_1$4 = { class: "d-flex flex-column" };
|
|
12110
|
-
const _hoisted_2
|
|
12131
|
+
const _hoisted_2 = { class: "text-body-large ml-6" };
|
|
12111
12132
|
const _hoisted_3 = {
|
|
12112
12133
|
key: 0,
|
|
12113
12134
|
class: "text-body-small text-grey text-truncate ml-6",
|
|
@@ -12170,7 +12191,7 @@ var item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
12170
12191
|
key: 0,
|
|
12171
12192
|
style: normalizeStyle(flagStyle.value)
|
|
12172
12193
|
}, null, 4)) : createCommentVNode("v-if", true),
|
|
12173
|
-
createElementVNode("div", _hoisted_1$4, [createElementVNode("span", _hoisted_2
|
|
12194
|
+
createElementVNode("div", _hoisted_1$4, [createElementVNode("span", _hoisted_2, toDisplayString(__props.title), 1), __props.desc ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(__props.desc), 1)) : createCommentVNode("v-if", true)]),
|
|
12174
12195
|
createVNode(_component_v_spacer),
|
|
12175
12196
|
createVNode(_component_v_icon, {
|
|
12176
12197
|
class: "x-handle cursor-move mr-3",
|
|
@@ -12411,7 +12432,7 @@ var index_vue_vue_type_script_setup_true_lang_default$3 = /*@__PURE__*/ defineCo
|
|
|
12411
12432
|
setup(__props, { expose: __expose }) {
|
|
12412
12433
|
const { t } = useI18n();
|
|
12413
12434
|
const display = useDisplay();
|
|
12414
|
-
const {
|
|
12435
|
+
const { safeAreaInset } = useSystem();
|
|
12415
12436
|
const { backgroundColor1 } = useColor();
|
|
12416
12437
|
const disabled = computed(() => {
|
|
12417
12438
|
return display.smAndDown.value;
|
|
@@ -12426,16 +12447,12 @@ var index_vue_vue_type_script_setup_true_lang_default$3 = /*@__PURE__*/ defineCo
|
|
|
12426
12447
|
};
|
|
12427
12448
|
});
|
|
12428
12449
|
const contStyle = computed(() => {
|
|
12429
|
-
let h = 48;
|
|
12430
|
-
if (sysBarAvail.value) h += 24;
|
|
12431
12450
|
return {
|
|
12432
12451
|
position: "relative",
|
|
12433
|
-
height: `calc(100% - ${
|
|
12452
|
+
height: `calc(100% - ${safeAreaInset.top + 48 + safeAreaInset.bottom}px)`,
|
|
12453
|
+
paddingBottom: "60px"
|
|
12434
12454
|
};
|
|
12435
12455
|
});
|
|
12436
|
-
const tailStyle = computed(() => {
|
|
12437
|
-
return { height: "60px" };
|
|
12438
|
-
});
|
|
12439
12456
|
const { open } = useViewStack(`blocklyNavigatorDlg${useId()}`);
|
|
12440
12457
|
onUnmounted(() => {
|
|
12441
12458
|
open.value = false;
|
|
@@ -12474,11 +12491,11 @@ var index_vue_vue_type_script_setup_true_lang_default$3 = /*@__PURE__*/ defineCo
|
|
|
12474
12491
|
class: "elevation-2",
|
|
12475
12492
|
style: normalizeStyle(wrapStyle.value)
|
|
12476
12493
|
}, [
|
|
12477
|
-
unref(
|
|
12494
|
+
unref(safeAreaInset).top ? (openBlock(), createBlock(_component_v_sheet, {
|
|
12478
12495
|
key: 0,
|
|
12479
12496
|
color: "transparent",
|
|
12480
|
-
height:
|
|
12481
|
-
})) : createCommentVNode("v-if", true),
|
|
12497
|
+
height: unref(safeAreaInset).top
|
|
12498
|
+
}, null, 8, ["height"])) : createCommentVNode("v-if", true),
|
|
12482
12499
|
createVNode(_component_v_sheet, {
|
|
12483
12500
|
class: "d-flex align-center px-2",
|
|
12484
12501
|
color: "transparent",
|
|
@@ -12512,7 +12529,7 @@ var index_vue_vue_type_script_setup_true_lang_default$3 = /*@__PURE__*/ defineCo
|
|
|
12512
12529
|
ref: blockTree,
|
|
12513
12530
|
modelValue: unref(open),
|
|
12514
12531
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(open) ? open.value = $event : null)
|
|
12515
|
-
}, null, 8, ["modelValue"])) : createCommentVNode("v-if", true)
|
|
12532
|
+
}, null, 8, ["modelValue"])) : createCommentVNode("v-if", true)], 4)
|
|
12516
12533
|
], 4)], 32)]),
|
|
12517
12534
|
_: 1
|
|
12518
12535
|
}, 8, ["modelValue"]), createVNode(_component_v_tooltip, {
|
|
@@ -12655,7 +12672,6 @@ const appComputeCategoryV1 = {
|
|
|
12655
12672
|
//#region src/core/category/app/message/v1/index.ts
|
|
12656
12673
|
function callback$9() {
|
|
12657
12674
|
const root = [];
|
|
12658
|
-
root.push(createBlock$1("app_debug_trace_v1", [createShadowOfTextV1("OBJECT")]));
|
|
12659
12675
|
root.push(createBlock$1("popup_message_v1", [createShadowOfTextV1("TEXT")]));
|
|
12660
12676
|
root.push(createBlock$1("open_confirm_dlg_v1"));
|
|
12661
12677
|
root.push(createBlock$1("open_prompt_dlg_v1"));
|
|
@@ -12666,23 +12682,6 @@ const appMessageCategoryV1 = {
|
|
|
12666
12682
|
callback: callback$9
|
|
12667
12683
|
};
|
|
12668
12684
|
|
|
12669
|
-
//#endregion
|
|
12670
|
-
//#region src/core/category/app/misc/v1/index.ts
|
|
12671
|
-
function pageAvail() {
|
|
12672
|
-
for (const app of globalState.app.appList) if (app.pages.length > 0) return true;
|
|
12673
|
-
return false;
|
|
12674
|
-
}
|
|
12675
|
-
function callback$8() {
|
|
12676
|
-
const root = [];
|
|
12677
|
-
root.push(createBlock$1("app_env_is_v1"));
|
|
12678
|
-
if (pageAvail()) root.push(createBlock$1("navigate_to_v1"));
|
|
12679
|
-
return root;
|
|
12680
|
-
}
|
|
12681
|
-
const appMiscCategoryV1 = {
|
|
12682
|
-
name: "APP_MISC_CATEGORY",
|
|
12683
|
-
callback: callback$8
|
|
12684
|
-
};
|
|
12685
|
-
|
|
12686
12685
|
//#endregion
|
|
12687
12686
|
//#region src/core/category/app/page/v1/index.ts
|
|
12688
12687
|
function stateAvail() {
|
|
@@ -12697,7 +12696,7 @@ function argumentAvail() {
|
|
|
12697
12696
|
if (!activePage.meta.arguments || activePage.meta.arguments.length <= 0) return false;
|
|
12698
12697
|
return true;
|
|
12699
12698
|
}
|
|
12700
|
-
function callback$
|
|
12699
|
+
function callback$8() {
|
|
12701
12700
|
const root = [];
|
|
12702
12701
|
root.push(createLabel(localeMsg("LABEL_EVENT")));
|
|
12703
12702
|
if (isAvailOfNode("onEvent")) root.push(createBlock$1("on_app_event_v1"));
|
|
@@ -12726,12 +12725,12 @@ function callback$7() {
|
|
|
12726
12725
|
}
|
|
12727
12726
|
const appPageCategoryV1 = {
|
|
12728
12727
|
name: "APP_PAGE_CATEGORY",
|
|
12729
|
-
callback: callback$
|
|
12728
|
+
callback: callback$8
|
|
12730
12729
|
};
|
|
12731
12730
|
|
|
12732
12731
|
//#endregion
|
|
12733
12732
|
//#region src/core/category/app/resource/v1/index.ts
|
|
12734
|
-
function callback$
|
|
12733
|
+
function callback$7() {
|
|
12735
12734
|
const root = [];
|
|
12736
12735
|
root.push(createLabel(localeMsg("LABEL_RESOURCE")));
|
|
12737
12736
|
root.push(createBlock$1("upload_resource_v1"));
|
|
@@ -12739,6 +12738,24 @@ function callback$6() {
|
|
|
12739
12738
|
}
|
|
12740
12739
|
const appResourceCategoryV1 = {
|
|
12741
12740
|
name: "APP_RESOURCE_CATEGORY",
|
|
12741
|
+
callback: callback$7
|
|
12742
|
+
};
|
|
12743
|
+
|
|
12744
|
+
//#endregion
|
|
12745
|
+
//#region src/core/category/app/system/v1/index.ts
|
|
12746
|
+
function pageAvail() {
|
|
12747
|
+
for (const app of globalState.app.appList) if (app.pages.length > 0) return true;
|
|
12748
|
+
return false;
|
|
12749
|
+
}
|
|
12750
|
+
function callback$6() {
|
|
12751
|
+
const root = [];
|
|
12752
|
+
root.push(createBlock$1("app_env_is_v1"));
|
|
12753
|
+
root.push(createBlock$1("app_debug_trace_v1", [createShadowOfTextV1("OBJECT")]));
|
|
12754
|
+
if (pageAvail()) root.push(createBlock$1("navigate_to_v1"));
|
|
12755
|
+
return root;
|
|
12756
|
+
}
|
|
12757
|
+
const appSystemCategoryV1 = {
|
|
12758
|
+
name: "APP_SYSTEM_CATEGORY",
|
|
12742
12759
|
callback: callback$6
|
|
12743
12760
|
};
|
|
12744
12761
|
|
|
@@ -12864,7 +12881,10 @@ function callFlowAvail() {
|
|
|
12864
12881
|
function callback$2() {
|
|
12865
12882
|
const { activeObject } = globalState.compute;
|
|
12866
12883
|
const root = [];
|
|
12867
|
-
if (activeObject.type === "flow")
|
|
12884
|
+
if (activeObject.type === "flow") {
|
|
12885
|
+
root.push(createBlock$1("on_flow_state_event_v1"));
|
|
12886
|
+
root.push(createBlock$1("has_role_flow_v1"));
|
|
12887
|
+
}
|
|
12868
12888
|
if (callFlowAvail()) console.assert(true);
|
|
12869
12889
|
return root;
|
|
12870
12890
|
}
|
|
@@ -12885,6 +12905,7 @@ function callback$1() {
|
|
|
12885
12905
|
root.push(createBlock$1("func_entry_v1"));
|
|
12886
12906
|
if (activeFunc.outputs && activeFunc.outputs.length > 0) root.push(createBlock$1("set_func_output_v1"));
|
|
12887
12907
|
root.push(createBlock$1("procedure_return_v1"));
|
|
12908
|
+
root.push(createBlock$1("has_role_func_v1"));
|
|
12888
12909
|
}
|
|
12889
12910
|
if (callFuncAvail()) root.push(createBlock$1("call_func_internal_v1"));
|
|
12890
12911
|
return root;
|
|
@@ -12895,14 +12916,15 @@ const computeFuncCategoryV1 = {
|
|
|
12895
12916
|
};
|
|
12896
12917
|
|
|
12897
12918
|
//#endregion
|
|
12898
|
-
//#region src/core/category/compute/
|
|
12919
|
+
//#region src/core/category/compute/system/v1/index.ts
|
|
12899
12920
|
function callback() {
|
|
12900
12921
|
const root = [];
|
|
12922
|
+
root.push(createBlock$1("compute_env_is_v1"));
|
|
12901
12923
|
root.push(createBlock$1("compute_debug_trace_v1", [createShadowOfTextV1("OBJECT")]));
|
|
12902
12924
|
return root;
|
|
12903
12925
|
}
|
|
12904
|
-
const
|
|
12905
|
-
name: "
|
|
12926
|
+
const computeSystemCategoryV1 = {
|
|
12927
|
+
name: "COMPUTE_SYSTEM_CATEGORY",
|
|
12906
12928
|
callback
|
|
12907
12929
|
};
|
|
12908
12930
|
|
|
@@ -13459,9 +13481,9 @@ const compToolboxV1 = {
|
|
|
13459
13481
|
},
|
|
13460
13482
|
{
|
|
13461
13483
|
kind: "category",
|
|
13462
|
-
name: "%{
|
|
13484
|
+
name: "%{BKY_CATEGORY_SYSTEM}",
|
|
13463
13485
|
categorystyle: "misc_category",
|
|
13464
|
-
custom:
|
|
13486
|
+
custom: appSystemCategoryV1.name
|
|
13465
13487
|
},
|
|
13466
13488
|
loopV1,
|
|
13467
13489
|
logicV1,
|
|
@@ -13523,9 +13545,9 @@ const flowToolboxV1 = {
|
|
|
13523
13545
|
},
|
|
13524
13546
|
{
|
|
13525
13547
|
kind: "category",
|
|
13526
|
-
name: "%{
|
|
13548
|
+
name: "%{BKY_CATEGORY_SYSTEM}",
|
|
13527
13549
|
categorystyle: "misc_category",
|
|
13528
|
-
custom:
|
|
13550
|
+
custom: computeSystemCategoryV1.name
|
|
13529
13551
|
},
|
|
13530
13552
|
loopV1,
|
|
13531
13553
|
logicV1,
|
|
@@ -13574,9 +13596,9 @@ const funcToolboxV1 = {
|
|
|
13574
13596
|
},
|
|
13575
13597
|
{
|
|
13576
13598
|
kind: "category",
|
|
13577
|
-
name: "%{
|
|
13599
|
+
name: "%{BKY_CATEGORY_SYSTEM}",
|
|
13578
13600
|
categorystyle: "misc_category",
|
|
13579
|
-
custom:
|
|
13601
|
+
custom: computeSystemCategoryV1.name
|
|
13580
13602
|
},
|
|
13581
13603
|
loopV1,
|
|
13582
13604
|
logicV1,
|
|
@@ -13652,9 +13674,9 @@ const pageToolboxV1 = {
|
|
|
13652
13674
|
},
|
|
13653
13675
|
{
|
|
13654
13676
|
kind: "category",
|
|
13655
|
-
name: "%{
|
|
13677
|
+
name: "%{BKY_CATEGORY_SYSTEM}",
|
|
13656
13678
|
categorystyle: "misc_category",
|
|
13657
|
-
custom:
|
|
13679
|
+
custom: appSystemCategoryV1.name
|
|
13658
13680
|
},
|
|
13659
13681
|
loopV1,
|
|
13660
13682
|
logicV1,
|
|
@@ -13761,7 +13783,7 @@ function regCustomCategory(workspace, type, version) {
|
|
|
13761
13783
|
if (version === "v1") {
|
|
13762
13784
|
reg(appPageCategoryV1);
|
|
13763
13785
|
reg(appMessageCategoryV1);
|
|
13764
|
-
reg(
|
|
13786
|
+
reg(appSystemCategoryV1);
|
|
13765
13787
|
reg(variableCategoryV1);
|
|
13766
13788
|
reg(procedureCategoryV1);
|
|
13767
13789
|
reg(appResourceCategoryV1);
|
|
@@ -13771,7 +13793,7 @@ function regCustomCategory(workspace, type, version) {
|
|
|
13771
13793
|
if (version === "v1") {
|
|
13772
13794
|
reg(appCompCategoryV1);
|
|
13773
13795
|
reg(appMessageCategoryV1);
|
|
13774
|
-
reg(
|
|
13796
|
+
reg(appSystemCategoryV1);
|
|
13775
13797
|
reg(variableCategoryV1);
|
|
13776
13798
|
reg(procedureCategoryV1);
|
|
13777
13799
|
reg(appResourceCategoryV1);
|
|
@@ -13782,7 +13804,7 @@ function regCustomCategory(workspace, type, version) {
|
|
|
13782
13804
|
reg(computeFuncCategoryV1);
|
|
13783
13805
|
reg(computeFlowCategoryV1);
|
|
13784
13806
|
reg(computeDataCategoryV1);
|
|
13785
|
-
reg(
|
|
13807
|
+
reg(computeSystemCategoryV1);
|
|
13786
13808
|
reg(variableCategoryV1);
|
|
13787
13809
|
reg(procedureCategoryV1);
|
|
13788
13810
|
}
|
|
@@ -13791,7 +13813,7 @@ function regCustomCategory(workspace, type, version) {
|
|
|
13791
13813
|
reg(computeFuncCategoryV1);
|
|
13792
13814
|
reg(computeFlowCategoryV1);
|
|
13793
13815
|
reg(computeDataCategoryV1);
|
|
13794
|
-
reg(
|
|
13816
|
+
reg(computeSystemCategoryV1);
|
|
13795
13817
|
reg(variableCategoryV1);
|
|
13796
13818
|
reg(procedureCategoryV1);
|
|
13797
13819
|
}
|
|
@@ -14136,20 +14158,17 @@ var content_default = index_vue_vue_type_script_setup_true_lang_default$1;
|
|
|
14136
14158
|
//#endregion
|
|
14137
14159
|
//#region src/components/sourceDlg/index.vue?vue&type=script&setup=true&lang.ts
|
|
14138
14160
|
const _hoisted_1 = { class: "text-body-large" };
|
|
14139
|
-
const _hoisted_2 = { class: "w-100 h-100 overflow-auto" };
|
|
14140
14161
|
var index_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
14141
14162
|
__name: "index",
|
|
14142
14163
|
setup(__props) {
|
|
14143
14164
|
const { t } = useI18n();
|
|
14144
|
-
const {
|
|
14165
|
+
const { safeAreaInset } = useSystem();
|
|
14145
14166
|
const { backgroundColor0, backgroundColor2 } = useColor();
|
|
14146
14167
|
const code = ref("");
|
|
14147
14168
|
const contStyle = computed(() => {
|
|
14148
|
-
let h = 48;
|
|
14149
|
-
if (sysBarAvail.value) h += 24;
|
|
14150
14169
|
return {
|
|
14151
14170
|
position: "relative",
|
|
14152
|
-
height: `calc(100% - ${
|
|
14171
|
+
height: `calc(100% - ${safeAreaInset.top + 48 + safeAreaInset.bottom}px)`
|
|
14153
14172
|
};
|
|
14154
14173
|
});
|
|
14155
14174
|
const onOpen = (params) => {
|
|
@@ -14176,11 +14195,11 @@ var index_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
14176
14195
|
width: "100%"
|
|
14177
14196
|
}, {
|
|
14178
14197
|
default: withCtx(() => [
|
|
14179
|
-
unref(
|
|
14198
|
+
unref(safeAreaInset).top ? (openBlock(), createBlock(_component_v_sheet, {
|
|
14180
14199
|
key: 0,
|
|
14181
14200
|
color: unref(backgroundColor2),
|
|
14182
|
-
height:
|
|
14183
|
-
}, null, 8, ["color"])) : createCommentVNode("v-if", true),
|
|
14201
|
+
height: unref(safeAreaInset).top
|
|
14202
|
+
}, null, 8, ["color", "height"])) : createCommentVNode("v-if", true),
|
|
14184
14203
|
createVNode(_component_v_sheet, {
|
|
14185
14204
|
class: "d-flex align-center px-2",
|
|
14186
14205
|
color: unref(backgroundColor2),
|
|
@@ -14198,7 +14217,10 @@ var index_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
14198
14217
|
]),
|
|
14199
14218
|
_: 1
|
|
14200
14219
|
}, 8, ["color"]),
|
|
14201
|
-
createElementVNode("div", {
|
|
14220
|
+
createElementVNode("div", {
|
|
14221
|
+
class: "overflow-auto",
|
|
14222
|
+
style: normalizeStyle(contStyle.value)
|
|
14223
|
+
}, [createVNode(content_default, { code: code.value }, null, 8, ["code"])], 4)
|
|
14202
14224
|
]),
|
|
14203
14225
|
_: 1
|
|
14204
14226
|
}, 8, ["color"])]),
|
|
@@ -32372,19 +32372,19 @@ var require_dist$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32372
32372
|
}));
|
|
32373
32373
|
|
|
32374
32374
|
//#endregion
|
|
32375
|
-
//#region \0@oxc-project+runtime@0.
|
|
32375
|
+
//#region \0@oxc-project+runtime@0.152.0/helpers/esm/checkPrivateRedeclaration.js
|
|
32376
32376
|
function _checkPrivateRedeclaration(e, t) {
|
|
32377
32377
|
if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
32378
32378
|
}
|
|
32379
32379
|
|
|
32380
32380
|
//#endregion
|
|
32381
|
-
//#region \0@oxc-project+runtime@0.
|
|
32381
|
+
//#region \0@oxc-project+runtime@0.152.0/helpers/esm/classPrivateMethodInitSpec.js
|
|
32382
32382
|
function _classPrivateMethodInitSpec(e, a) {
|
|
32383
32383
|
_checkPrivateRedeclaration(e, a), a.add(e);
|
|
32384
32384
|
}
|
|
32385
32385
|
|
|
32386
32386
|
//#endregion
|
|
32387
|
-
//#region \0@oxc-project+runtime@0.
|
|
32387
|
+
//#region \0@oxc-project+runtime@0.152.0/helpers/esm/assertClassBrand.js
|
|
32388
32388
|
function _assertClassBrand(e, t, n) {
|
|
32389
32389
|
if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
32390
32390
|
throw new TypeError("Private element is not present on this object");
|
|
@@ -32685,7 +32685,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32685
32685
|
}));
|
|
32686
32686
|
|
|
32687
32687
|
//#endregion
|
|
32688
|
-
//#region node_modules/.pnpm/@vueuse+shared@
|
|
32688
|
+
//#region node_modules/.pnpm/@vueuse+shared@15.0.0_vue@3.5.43_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
|
|
32689
32689
|
/**
|
|
32690
32690
|
* Call onScopeDispose() if it's inside an effect scope lifecycle, if not, do nothing
|
|
32691
32691
|
*
|
|
@@ -32714,7 +32714,7 @@ const camelize = cacheStringFunction((str) => {
|
|
|
32714
32714
|
});
|
|
32715
32715
|
|
|
32716
32716
|
//#endregion
|
|
32717
|
-
//#region node_modules/.pnpm/@vueuse+core@
|
|
32717
|
+
//#region node_modules/.pnpm/@vueuse+core@15.0.0_vue@3.5.43_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
|
|
32718
32718
|
const defaultWindow = isClient ? window : void 0;
|
|
32719
32719
|
const defaultDocument = isClient ? window.document : void 0;
|
|
32720
32720
|
const defaultNavigator = isClient ? window.navigator : void 0;
|
|
@@ -32770,14 +32770,15 @@ function useResizeObserver(target, callback, options = {}) {
|
|
|
32770
32770
|
observer = void 0;
|
|
32771
32771
|
}
|
|
32772
32772
|
};
|
|
32773
|
-
const
|
|
32773
|
+
const targets = computed(() => {
|
|
32774
32774
|
const _targets = toValue(target);
|
|
32775
32775
|
return Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)];
|
|
32776
|
-
})
|
|
32776
|
+
});
|
|
32777
|
+
const stopWatch = watch(targets, (els) => {
|
|
32777
32778
|
cleanup();
|
|
32778
32779
|
if (isSupported.value && window) {
|
|
32779
32780
|
observer = new ResizeObserver(callback);
|
|
32780
|
-
for (const _el of els) if (_el) observer.observe(_el, observerOptions);
|
|
32781
|
+
for (const _el of els) if (_el instanceof Element) observer.observe(_el, observerOptions);
|
|
32781
32782
|
}
|
|
32782
32783
|
}, {
|
|
32783
32784
|
immediate: true,
|
|
@@ -32793,43 +32794,6 @@ function useResizeObserver(target, callback, options = {}) {
|
|
|
32793
32794
|
stop
|
|
32794
32795
|
};
|
|
32795
32796
|
}
|
|
32796
|
-
const DEFAULT_UNITS = [
|
|
32797
|
-
{
|
|
32798
|
-
max: 6e4,
|
|
32799
|
-
value: 1e3,
|
|
32800
|
-
name: "second"
|
|
32801
|
-
},
|
|
32802
|
-
{
|
|
32803
|
-
max: 276e4,
|
|
32804
|
-
value: 6e4,
|
|
32805
|
-
name: "minute"
|
|
32806
|
-
},
|
|
32807
|
-
{
|
|
32808
|
-
max: 72e6,
|
|
32809
|
-
value: 36e5,
|
|
32810
|
-
name: "hour"
|
|
32811
|
-
},
|
|
32812
|
-
{
|
|
32813
|
-
max: 5184e5,
|
|
32814
|
-
value: 864e5,
|
|
32815
|
-
name: "day"
|
|
32816
|
-
},
|
|
32817
|
-
{
|
|
32818
|
-
max: 24192e5,
|
|
32819
|
-
value: 6048e5,
|
|
32820
|
-
name: "week"
|
|
32821
|
-
},
|
|
32822
|
-
{
|
|
32823
|
-
max: 28512e6,
|
|
32824
|
-
value: 2592e6,
|
|
32825
|
-
name: "month"
|
|
32826
|
-
},
|
|
32827
|
-
{
|
|
32828
|
-
max: Number.POSITIVE_INFINITY,
|
|
32829
|
-
value: 31536e6,
|
|
32830
|
-
name: "year"
|
|
32831
|
-
}
|
|
32832
|
-
];
|
|
32833
32797
|
|
|
32834
32798
|
//#endregion
|
|
32835
32799
|
//#region node_modules/.pnpm/vue-draggable-plus@0.6.1_@types+sortablejs@1.15.9/node_modules/vue-draggable-plus/dist/vue-draggable-plus.js
|
|
@@ -36323,7 +36287,7 @@ var import_core = /* @__PURE__ */ __toESM(require_core());
|
|
|
36323
36287
|
var core_default = import_core.default;
|
|
36324
36288
|
|
|
36325
36289
|
//#endregion
|
|
36326
|
-
//#region node_modules/.pnpm/@highlightjs+vue-plugin@2.1.0_highlight.js@11.12.0_vue@3.5.
|
|
36290
|
+
//#region node_modules/.pnpm/@highlightjs+vue-plugin@2.1.0_highlight.js@11.12.0_vue@3.5.43_typescript@6.0.3_/node_modules/@highlightjs/vue-plugin/dist/highlightjs-vue.esm.min.js
|
|
36327
36291
|
var r = defineComponent({
|
|
36328
36292
|
props: {
|
|
36329
36293
|
code: {
|
|
@@ -301,11 +301,11 @@ var zhHans_default = {
|
|
|
301
301
|
CATEGORY_LOOP: "循环",
|
|
302
302
|
CATEGORY_MATH: "数学",
|
|
303
303
|
CATEGORY_MESSAGE: "消息",
|
|
304
|
-
CATEGORY_MISC: "杂项",
|
|
305
304
|
CATEGORY_OBJECT: "对象",
|
|
306
305
|
CATEGORY_PAGE: "页面",
|
|
307
306
|
CATEGORY_PROCEDURE: "过程",
|
|
308
307
|
CATEGORY_RESOURCE: "资源",
|
|
308
|
+
CATEGORY_SYSTEM: "系统",
|
|
309
309
|
CATEGORY_TEXT: "文本",
|
|
310
310
|
CATEGORY_TIME: "时间",
|
|
311
311
|
CATEGORY_TYPE: "类型",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-block-lib",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.13",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
"lint": "oxlint",
|
|
18
18
|
"fmt": "oxfmt",
|
|
19
19
|
"build": "tsdown",
|
|
20
|
+
"ncu:check": "ncu --dep dev,peer -x typescript",
|
|
21
|
+
"ncu:update": "ncu --dep dev,peer -x typescript -u",
|
|
20
22
|
"lint-staged": "lint-staged",
|
|
21
23
|
"prepare": "husky"
|
|
22
24
|
},
|
|
@@ -27,32 +29,34 @@
|
|
|
27
29
|
"@highlightjs/vue-plugin": "^2.1.0",
|
|
28
30
|
"@sindresorhus/base62": "^1.0.0",
|
|
29
31
|
"@types/lodash-es": "^4.17.12",
|
|
30
|
-
"@types/node": "^26.
|
|
31
|
-
"@vueuse/core": "^
|
|
32
|
+
"@types/node": "^26.6.4",
|
|
33
|
+
"@vueuse/core": "^15.0.0",
|
|
32
34
|
"blockly": "^13.3.0",
|
|
33
35
|
"highlight.js": "^11.12.0",
|
|
34
36
|
"husky": "^9.1.7",
|
|
35
|
-
"lint-staged": "^17.
|
|
37
|
+
"lint-staged": "^17.6.0",
|
|
36
38
|
"lodash-es": "^4.18.1",
|
|
37
|
-
"oxfmt": "^0.
|
|
38
|
-
"oxlint": "^1.
|
|
39
|
+
"oxfmt": "^0.71.0",
|
|
40
|
+
"oxlint": "^1.86.0",
|
|
41
|
+
"oxlint-tsgolint": "^7.0.2003",
|
|
39
42
|
"picomatch": "^4.0.7",
|
|
40
|
-
"sass": "^1.
|
|
43
|
+
"sass": "^1.105.1",
|
|
41
44
|
"tsdown": "^0.23.0",
|
|
42
45
|
"typescript": "^6.0.3",
|
|
43
|
-
"vite": "^8.3.
|
|
46
|
+
"vite": "^8.3.2",
|
|
44
47
|
"vue-draggable-plus": "^0.6.1",
|
|
45
|
-
"
|
|
46
|
-
"x-config-
|
|
47
|
-
"x-config-
|
|
48
|
+
"vue-tsc": "^3.3.12",
|
|
49
|
+
"x-config-lib": "^0.1.10",
|
|
50
|
+
"x-config-oxfmt": "^0.1.7",
|
|
51
|
+
"x-config-oxlint": "^0.1.8"
|
|
48
52
|
},
|
|
49
53
|
"peerDependencies": {
|
|
50
|
-
"vue": "^3.5.
|
|
51
|
-
"vue-i18n": "^11.4.
|
|
52
|
-
"vuetify": "^4.2.
|
|
53
|
-
"x-
|
|
54
|
-
"x-
|
|
55
|
-
"x-runtime-lib": "^0.10.
|
|
56
|
-
"x-state-lib": "^0.4.
|
|
54
|
+
"vue": "^3.5.43",
|
|
55
|
+
"vue-i18n": "^11.4.13",
|
|
56
|
+
"vuetify": "^4.2.3",
|
|
57
|
+
"x-essential-lib": "^0.11.12",
|
|
58
|
+
"x-permission-lib": "^0.1.7",
|
|
59
|
+
"x-runtime-lib": "^0.10.8",
|
|
60
|
+
"x-state-lib": "^0.4.6"
|
|
57
61
|
}
|
|
58
62
|
}
|