x-block-lib 0.11.11 → 0.11.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.
@@ -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
@@ -3,14 +3,15 @@ import { A as Names, B as constants, C as FieldCheckbox, D as FieldNumber, E as
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.non7wgtb.js")).default);
13
- else if (locale === "zhHans") setLocale$1((await import("./zhHans.er5jfqth.js")).default);
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() {} };
@@ -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/misc/computeDebugTrace/v1/index.ts
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/misc/computeEnvIs/v1/index.ts
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}",
@@ -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$1 = { class: "text-body-large ml-6" };
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$1, toDisplayString(__props.title), 1), __props.desc ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(__props.desc), 1)) : createCommentVNode("v-if", true)]),
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 { sysBarAvail } = useSystem();
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% - ${h}px)`
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(sysBarAvail) ? (openBlock(), createBlock(_component_v_sheet, {
12494
+ unref(safeAreaInset).top ? (openBlock(), createBlock(_component_v_sheet, {
12478
12495
  key: 0,
12479
12496
  color: "transparent",
12480
- height: 24
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), createElementVNode("div", { style: normalizeStyle(tailStyle.value) }, null, 4)], 4)
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$7() {
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$7
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$6() {
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") root.push(createBlock$1("on_flow_state_event_v1"));
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/misc/v1/index.ts
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 computeMiscCategoryV1 = {
12905
- name: "COMPUTE_MISC_CATEGORY",
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: "%{BKY_CATEGORY_MISC}",
13484
+ name: "%{BKY_CATEGORY_SYSTEM}",
13463
13485
  categorystyle: "misc_category",
13464
- custom: appMiscCategoryV1.name
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: "%{BKY_CATEGORY_MISC}",
13548
+ name: "%{BKY_CATEGORY_SYSTEM}",
13527
13549
  categorystyle: "misc_category",
13528
- custom: computeMiscCategoryV1.name
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: "%{BKY_CATEGORY_MISC}",
13599
+ name: "%{BKY_CATEGORY_SYSTEM}",
13578
13600
  categorystyle: "misc_category",
13579
- custom: computeMiscCategoryV1.name
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: "%{BKY_CATEGORY_MISC}",
13677
+ name: "%{BKY_CATEGORY_SYSTEM}",
13656
13678
  categorystyle: "misc_category",
13657
- custom: appMiscCategoryV1.name
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(appMiscCategoryV1);
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(appMiscCategoryV1);
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(computeMiscCategoryV1);
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(computeMiscCategoryV1);
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 { sysBarAvail } = useSystem();
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% - ${h}px)`
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(sysBarAvail) ? (openBlock(), createBlock(_component_v_sheet, {
14198
+ unref(safeAreaInset).top ? (openBlock(), createBlock(_component_v_sheet, {
14180
14199
  key: 0,
14181
14200
  color: unref(backgroundColor2),
14182
- height: 24
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", { style: normalizeStyle(contStyle.value) }, [createElementVNode("div", _hoisted_2, [createVNode(content_default, { code: code.value }, null, 8, ["code"])])], 4)
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"])]),
@@ -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.11",
3
+ "version": "0.11.12",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -36,13 +36,14 @@
36
36
  "lodash-es": "^4.18.1",
37
37
  "oxfmt": "^0.67.0",
38
38
  "oxlint": "^1.82.0",
39
+ "oxlint-tsgolint": "^7.0.2002",
39
40
  "picomatch": "^4.0.7",
40
41
  "sass": "^1.104.0",
41
42
  "tsdown": "^0.23.0",
42
43
  "typescript": "^6.0.3",
43
44
  "vite": "^8.3.0",
44
45
  "vue-draggable-plus": "^0.6.1",
45
- "x-config-lib": "^0.1.6",
46
+ "x-config-lib": "^0.1.8",
46
47
  "x-config-oxfmt": "^0.1.6",
47
48
  "x-config-oxlint": "^0.1.7"
48
49
  },
@@ -50,9 +51,9 @@
50
51
  "vue": "^3.5.42",
51
52
  "vue-i18n": "^11.4.10",
52
53
  "vuetify": "^4.2.1",
53
- "x-error-lib": "^0.6.5",
54
- "x-essential-lib": "^0.10.40",
55
- "x-runtime-lib": "^0.10.5",
54
+ "x-essential-lib": "^0.11.11",
55
+ "x-permission-lib": "^0.1.6",
56
+ "x-runtime-lib": "^0.10.7",
56
57
  "x-state-lib": "^0.4.5"
57
58
  }
58
59
  }