@tmagic/editor 1.5.21 → 1.5.24
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/style.css +16 -11
- package/dist/tmagic-editor.js +1596 -344
- package/dist/tmagic-editor.umd.cjs +1592 -340
- package/package.json +15 -15
- package/src/Editor.vue +5 -0
- package/src/components/CodeBlockEditor.vue +3 -3
- package/src/editorProps.ts +6 -0
- package/src/fields/DataSourceFieldSelect/Index.vue +8 -3
- package/src/fields/DataSourceFields.vue +1 -1
- package/src/fields/DataSourceInput.vue +12 -3
- package/src/fields/DataSourceMethods.vue +1 -1
- package/src/fields/EventSelect.vue +34 -19
- package/src/fields/StyleSetter/pro/Position.vue +10 -2
- package/src/hooks/use-filter.ts +6 -4
- package/src/hooks/use-stage.ts +1 -0
- package/src/index.ts +3 -0
- package/src/initService.ts +81 -11
- package/src/layouts/CodeEditor.vue +36 -10
- package/src/layouts/page-bar/PageBarScrollContainer.vue +2 -1
- package/src/layouts/props-panel/FormPanel.vue +6 -1
- package/src/layouts/props-panel/PropsPanel.vue +6 -0
- package/src/layouts/sidebar/Sidebar.vue +14 -2
- package/src/layouts/workspace/viewer/Stage.vue +21 -32
- package/src/layouts/workspace/viewer/StageOverlay.vue +25 -6
- package/src/services/BaseService.ts +17 -8
- package/src/services/keybinding.ts +12 -0
- package/src/services/props.ts +25 -1
- package/src/services/stageOverlay.ts +1 -1
- package/src/theme/code-editor.scss +7 -2
- package/src/theme/props-panel.scss +10 -0
- package/src/theme/stage.scss +6 -11
- package/src/type.ts +17 -0
- package/src/utils/props.ts +54 -19
- package/types/index.d.ts +395 -457
|
@@ -4820,7 +4820,7 @@
|
|
|
4820
4820
|
return (array && array.length) ? baseUniq(array) : [];
|
|
4821
4821
|
}
|
|
4822
4822
|
|
|
4823
|
-
const _hoisted_1
|
|
4823
|
+
const _hoisted_1$10 = ["src"];
|
|
4824
4824
|
const _sfc_main$1r = /* @__PURE__ */ vue.defineComponent({
|
|
4825
4825
|
...{
|
|
4826
4826
|
name: "MEditorIcon"
|
|
@@ -4846,7 +4846,7 @@
|
|
|
4846
4846
|
class: "magic-editor-icon"
|
|
4847
4847
|
}, {
|
|
4848
4848
|
default: vue.withCtx(() => [
|
|
4849
|
-
vue.createElementVNode("img", { src: _ctx.icon }, null, 8, _hoisted_1
|
|
4849
|
+
vue.createElementVNode("img", { src: _ctx.icon }, null, 8, _hoisted_1$10)
|
|
4850
4850
|
]),
|
|
4851
4851
|
_: 1
|
|
4852
4852
|
/* STABLE */
|
|
@@ -4882,7 +4882,7 @@
|
|
|
4882
4882
|
emmetMonacoEs.emmetHTML(monaco__namespace);
|
|
4883
4883
|
emmetMonacoEs.emmetCSS(monaco__namespace, ["css", "scss"]);
|
|
4884
4884
|
|
|
4885
|
-
const _hoisted_1
|
|
4885
|
+
const _hoisted_1$$ = {
|
|
4886
4886
|
class: /* @__PURE__ */ vue.normalizeClass(`magic-code-editor`)
|
|
4887
4887
|
};
|
|
4888
4888
|
const _hoisted_2$n = {
|
|
@@ -4904,7 +4904,8 @@
|
|
|
4904
4904
|
}) },
|
|
4905
4905
|
height: {},
|
|
4906
4906
|
autoSave: { type: Boolean, default: true },
|
|
4907
|
-
parse: { type: Boolean, default: false }
|
|
4907
|
+
parse: { type: Boolean, default: false },
|
|
4908
|
+
disabledFullScreen: { type: Boolean, default: false }
|
|
4908
4909
|
},
|
|
4909
4910
|
emits: ["initd", "save"],
|
|
4910
4911
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -4964,6 +4965,9 @@
|
|
|
4964
4965
|
const getEditorValue = () => (props.type === "diff" ? vsDiffEditor?.getModifiedEditor().getValue() : vsEditor?.getValue()) || "";
|
|
4965
4966
|
const init = async () => {
|
|
4966
4967
|
if (!codeEditorEl.value) return;
|
|
4968
|
+
if (codeEditorEl.value.clientHeight === 0) {
|
|
4969
|
+
await vue.nextTick();
|
|
4970
|
+
}
|
|
4967
4971
|
const options = {
|
|
4968
4972
|
value: values.value,
|
|
4969
4973
|
language: props.language,
|
|
@@ -4971,12 +4975,11 @@
|
|
|
4971
4975
|
...props.options
|
|
4972
4976
|
};
|
|
4973
4977
|
if (props.type === "diff") {
|
|
4974
|
-
vsDiffEditor = monaco__namespace
|
|
4978
|
+
vsDiffEditor = getEditorConfig("customCreateMonacoDiffEditor")(monaco__namespace, codeEditorEl.value, options);
|
|
4975
4979
|
} else {
|
|
4976
|
-
vsEditor = monaco__namespace
|
|
4980
|
+
vsEditor = getEditorConfig("customCreateMonacoEditor")(monaco__namespace, codeEditorEl.value, options);
|
|
4977
4981
|
}
|
|
4978
4982
|
setEditorValue(props.initValues, props.modifiedValues);
|
|
4979
|
-
loading.value = false;
|
|
4980
4983
|
emit("initd", vsEditor);
|
|
4981
4984
|
codeEditorEl.value.addEventListener("keydown", (e) => {
|
|
4982
4985
|
if (e.keyCode === 83 && (navigator.platform.match("Mac") ? e.metaKey : e.ctrlKey)) {
|
|
@@ -5010,12 +5013,27 @@
|
|
|
5010
5013
|
immediate: true
|
|
5011
5014
|
}
|
|
5012
5015
|
);
|
|
5016
|
+
vue.watch(
|
|
5017
|
+
() => props.options,
|
|
5018
|
+
(v) => {
|
|
5019
|
+
vsEditor?.updateOptions(v);
|
|
5020
|
+
vsDiffEditor?.updateOptions(v);
|
|
5021
|
+
},
|
|
5022
|
+
{
|
|
5023
|
+
deep: true
|
|
5024
|
+
}
|
|
5025
|
+
);
|
|
5013
5026
|
vue.onMounted(async () => {
|
|
5014
5027
|
loading.value = true;
|
|
5015
|
-
init();
|
|
5028
|
+
await init();
|
|
5029
|
+
loading.value = false;
|
|
5016
5030
|
});
|
|
5017
5031
|
vue.onBeforeUnmount(() => {
|
|
5018
5032
|
resizeObserver.disconnect();
|
|
5033
|
+
vsEditor?.dispose();
|
|
5034
|
+
vsDiffEditor?.dispose();
|
|
5035
|
+
vsEditor = null;
|
|
5036
|
+
vsDiffEditor = null;
|
|
5019
5037
|
});
|
|
5020
5038
|
const fullScreen = vue.ref(false);
|
|
5021
5039
|
const fullScreenHandler = () => {
|
|
@@ -5046,7 +5064,7 @@
|
|
|
5046
5064
|
}
|
|
5047
5065
|
});
|
|
5048
5066
|
return (_ctx, _cache) => {
|
|
5049
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1
|
|
5067
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$$, [
|
|
5050
5068
|
(vue.openBlock(), vue.createBlock(vue.Teleport, {
|
|
5051
5069
|
to: "body",
|
|
5052
5070
|
disabled: !fullScreen.value
|
|
@@ -5058,7 +5076,8 @@
|
|
|
5058
5076
|
style: vue.normalizeStyle(!fullScreen.value && _ctx.height ? `height: ${_ctx.height}` : "100%")
|
|
5059
5077
|
},
|
|
5060
5078
|
[
|
|
5061
|
-
vue.
|
|
5079
|
+
!_ctx.disabledFullScreen ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicButton), {
|
|
5080
|
+
key: 0,
|
|
5062
5081
|
class: "magic-code-editor-full-screen-icon",
|
|
5063
5082
|
circle: "",
|
|
5064
5083
|
size: "small",
|
|
@@ -5069,7 +5088,7 @@
|
|
|
5069
5088
|
]),
|
|
5070
5089
|
_: 1
|
|
5071
5090
|
/* STABLE */
|
|
5072
|
-
}),
|
|
5091
|
+
})) : vue.createCommentVNode("v-if", true),
|
|
5073
5092
|
vue.createElementVNode(
|
|
5074
5093
|
"div",
|
|
5075
5094
|
_hoisted_2$n,
|
|
@@ -5435,6 +5454,20 @@
|
|
|
5435
5454
|
title: "高级",
|
|
5436
5455
|
lazy: true,
|
|
5437
5456
|
items: [
|
|
5457
|
+
{
|
|
5458
|
+
name: core.NODE_DISABLE_CODE_BLOCK_KEY,
|
|
5459
|
+
text: "禁用代码块",
|
|
5460
|
+
type: "switch",
|
|
5461
|
+
defaultValue: false,
|
|
5462
|
+
extra: "开启后,配置的代码块将不会被执行"
|
|
5463
|
+
},
|
|
5464
|
+
{
|
|
5465
|
+
name: core.NODE_DISABLE_DATA_SOURCE_KEY,
|
|
5466
|
+
text: "禁用数据源",
|
|
5467
|
+
type: "switch",
|
|
5468
|
+
defaultValue: false,
|
|
5469
|
+
extra: "开启后,组件内配置的数据源相关配置将不会被编译,显隐条件将失效"
|
|
5470
|
+
},
|
|
5438
5471
|
{
|
|
5439
5472
|
name: "created",
|
|
5440
5473
|
text: "created",
|
|
@@ -5470,7 +5503,11 @@
|
|
|
5470
5503
|
}
|
|
5471
5504
|
]
|
|
5472
5505
|
};
|
|
5473
|
-
const fillConfig$1 = (config = [],
|
|
5506
|
+
const fillConfig$1 = (config = [], {
|
|
5507
|
+
labelWidth = "80px",
|
|
5508
|
+
disabledDataSource = false,
|
|
5509
|
+
disabledCodeBlock = false
|
|
5510
|
+
} = {}) => {
|
|
5474
5511
|
const propsConfig = [];
|
|
5475
5512
|
if (!config.find((item) => item.name === "type")) {
|
|
5476
5513
|
propsConfig.push({
|
|
@@ -5504,22 +5541,31 @@
|
|
|
5504
5541
|
text: "组件名称"
|
|
5505
5542
|
});
|
|
5506
5543
|
}
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5544
|
+
const noCodeAdvancedTabItems = advancedTabConfig.items.filter((item) => item.type !== "code-select");
|
|
5545
|
+
if (noCodeAdvancedTabItems.length > 0 && disabledCodeBlock) {
|
|
5546
|
+
advancedTabConfig.items = noCodeAdvancedTabItems;
|
|
5547
|
+
}
|
|
5548
|
+
const tabConfig = {
|
|
5549
|
+
type: "tab",
|
|
5550
|
+
labelWidth,
|
|
5551
|
+
items: [
|
|
5552
|
+
{
|
|
5553
|
+
title: "属性",
|
|
5554
|
+
items: [...propsConfig, ...config]
|
|
5555
|
+
},
|
|
5556
|
+
{ ...styleTabConfig },
|
|
5557
|
+
{ ...eventTabConfig }
|
|
5558
|
+
]
|
|
5559
|
+
};
|
|
5560
|
+
if (!disabledCodeBlock) {
|
|
5561
|
+
tabConfig.items.push({ ...advancedTabConfig });
|
|
5562
|
+
} else if (noCodeAdvancedTabItems.length > 0) {
|
|
5563
|
+
tabConfig.items.push({ ...advancedTabConfig });
|
|
5564
|
+
}
|
|
5565
|
+
if (!disabledDataSource) {
|
|
5566
|
+
tabConfig.items.push({ ...displayTabConfig });
|
|
5567
|
+
}
|
|
5568
|
+
return [tabConfig];
|
|
5523
5569
|
};
|
|
5524
5570
|
|
|
5525
5571
|
const log = (...args) => {
|
|
@@ -5974,22 +6020,29 @@
|
|
|
5974
6020
|
* @deprecated 请使用usePlugin代替
|
|
5975
6021
|
*/
|
|
5976
6022
|
use(options) {
|
|
5977
|
-
|
|
6023
|
+
for (const [methodName2, method] of Object.entries(options)) {
|
|
5978
6024
|
if (typeof method === "function") this.middleware[methodName2].push(method);
|
|
5979
|
-
}
|
|
6025
|
+
}
|
|
5980
6026
|
}
|
|
5981
6027
|
usePlugin(options) {
|
|
5982
|
-
|
|
6028
|
+
for (const [methodName2, method] of Object.entries(options)) {
|
|
5983
6029
|
if (typeof method === "function") this.pluginOptionsList[methodName2].push(method);
|
|
5984
|
-
}
|
|
6030
|
+
}
|
|
6031
|
+
}
|
|
6032
|
+
removePlugin(options) {
|
|
6033
|
+
for (const [methodName2, method] of Object.entries(options)) {
|
|
6034
|
+
if (Array.isArray(this.pluginOptionsList[methodName2])) {
|
|
6035
|
+
this.pluginOptionsList[methodName2] = this.pluginOptionsList[methodName2].filter((item) => item !== method);
|
|
6036
|
+
}
|
|
6037
|
+
}
|
|
5985
6038
|
}
|
|
5986
6039
|
removeAllPlugins() {
|
|
5987
|
-
Object.keys(this.pluginOptionsList)
|
|
6040
|
+
for (const key of Object.keys(this.pluginOptionsList)) {
|
|
5988
6041
|
this.pluginOptionsList[key] = [];
|
|
5989
|
-
}
|
|
5990
|
-
Object.keys(this.middleware)
|
|
6042
|
+
}
|
|
6043
|
+
for (const key of Object.keys(this.middleware)) {
|
|
5991
6044
|
this.middleware[key] = [];
|
|
5992
|
-
}
|
|
6045
|
+
}
|
|
5993
6046
|
}
|
|
5994
6047
|
async doTask() {
|
|
5995
6048
|
this.doingTask = true;
|
|
@@ -6017,7 +6070,11 @@
|
|
|
6017
6070
|
state = vue.reactive({
|
|
6018
6071
|
propsConfigMap: {},
|
|
6019
6072
|
propsValueMap: {},
|
|
6020
|
-
relateIdMap: {}
|
|
6073
|
+
relateIdMap: {},
|
|
6074
|
+
/** 禁用数据源 */
|
|
6075
|
+
disabledDataSource: false,
|
|
6076
|
+
/** 禁用代码块 */
|
|
6077
|
+
disabledCodeBlock: false
|
|
6021
6078
|
});
|
|
6022
6079
|
constructor() {
|
|
6023
6080
|
super([
|
|
@@ -6025,6 +6082,18 @@
|
|
|
6025
6082
|
...canUsePluginMethods$7.sync.map((methodName) => ({ name: methodName, isAsync: false }))
|
|
6026
6083
|
]);
|
|
6027
6084
|
}
|
|
6085
|
+
setDisabledDataSource(disabled) {
|
|
6086
|
+
this.state.disabledDataSource = disabled;
|
|
6087
|
+
}
|
|
6088
|
+
setDisabledCodeBlock(disabled) {
|
|
6089
|
+
this.state.disabledCodeBlock = disabled;
|
|
6090
|
+
}
|
|
6091
|
+
getDisabledDataSource() {
|
|
6092
|
+
return this.state.disabledDataSource;
|
|
6093
|
+
}
|
|
6094
|
+
getDisabledCodeBlock() {
|
|
6095
|
+
return this.state.disabledCodeBlock;
|
|
6096
|
+
}
|
|
6028
6097
|
setPropsConfigs(configs) {
|
|
6029
6098
|
Object.keys(configs).forEach((type) => {
|
|
6030
6099
|
this.setPropsConfig(utils.toLine(type), configs[type]);
|
|
@@ -6032,7 +6101,11 @@
|
|
|
6032
6101
|
this.emit("props-configs-change");
|
|
6033
6102
|
}
|
|
6034
6103
|
async fillConfig(config, labelWidth) {
|
|
6035
|
-
return fillConfig$1(config,
|
|
6104
|
+
return fillConfig$1(config, {
|
|
6105
|
+
labelWidth: typeof labelWidth !== "function" ? labelWidth : "80px",
|
|
6106
|
+
disabledDataSource: this.getDisabledDataSource(),
|
|
6107
|
+
disabledCodeBlock: this.getDisabledCodeBlock()
|
|
6108
|
+
});
|
|
6036
6109
|
}
|
|
6037
6110
|
async setPropsConfig(type, config) {
|
|
6038
6111
|
let c = config;
|
|
@@ -7952,7 +8025,7 @@
|
|
|
7952
8025
|
}
|
|
7953
8026
|
});
|
|
7954
8027
|
|
|
7955
|
-
const _hoisted_1$
|
|
8028
|
+
const _hoisted_1$_ = { class: "m-fields-code-select-col" };
|
|
7956
8029
|
const _hoisted_2$m = { class: "code-select-container" };
|
|
7957
8030
|
const _sfc_main$1l = /* @__PURE__ */ vue.defineComponent({
|
|
7958
8031
|
...{
|
|
@@ -8053,7 +8126,7 @@
|
|
|
8053
8126
|
eventBus?.emit("edit-code", id);
|
|
8054
8127
|
};
|
|
8055
8128
|
return (_ctx, _cache) => {
|
|
8056
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
8129
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$_, [
|
|
8057
8130
|
vue.createElementVNode("div", _hoisted_2$m, [
|
|
8058
8131
|
vue.createCommentVNode(" 代码块下拉框 "),
|
|
8059
8132
|
vue.createVNode(vue.unref(formPlugin.MContainer), {
|
|
@@ -8165,9 +8238,9 @@
|
|
|
8165
8238
|
vue.mergeProps(
|
|
8166
8239
|
{
|
|
8167
8240
|
class: "tmagic-design-option",
|
|
8168
|
-
key: option.value
|
|
8169
|
-
ref_for: true
|
|
8241
|
+
key: option.value
|
|
8170
8242
|
},
|
|
8243
|
+
{ ref_for: true },
|
|
8171
8244
|
vue.unref(optionComponent)?.props({
|
|
8172
8245
|
label: option.text,
|
|
8173
8246
|
value: option.value
|
|
@@ -8192,7 +8265,7 @@
|
|
|
8192
8265
|
}
|
|
8193
8266
|
});
|
|
8194
8267
|
|
|
8195
|
-
const _hoisted_1$
|
|
8268
|
+
const _hoisted_1$Z = {
|
|
8196
8269
|
ref: "title",
|
|
8197
8270
|
class: "m-editor-float-box-title"
|
|
8198
8271
|
};
|
|
@@ -8340,7 +8413,7 @@
|
|
|
8340
8413
|
[
|
|
8341
8414
|
vue.createElementVNode(
|
|
8342
8415
|
"div",
|
|
8343
|
-
_hoisted_1$
|
|
8416
|
+
_hoisted_1$Z,
|
|
8344
8417
|
[
|
|
8345
8418
|
vue.renderSlot(_ctx.$slots, "title", {}, () => [
|
|
8346
8419
|
vue.createElementVNode(
|
|
@@ -8574,7 +8647,8 @@
|
|
|
8574
8647
|
moveableOptions: stageOptions.moveableOptions,
|
|
8575
8648
|
updateDragEl: stageOptions.updateDragEl,
|
|
8576
8649
|
guidesOptions: stageOptions.guidesOptions,
|
|
8577
|
-
disabledMultiSelect: stageOptions.disabledMultiSelect
|
|
8650
|
+
disabledMultiSelect: stageOptions.disabledMultiSelect,
|
|
8651
|
+
disabledRule: stageOptions.disabledRule
|
|
8578
8652
|
});
|
|
8579
8653
|
vue.watch(
|
|
8580
8654
|
() => editorService.get("disabledMultiSelect"),
|
|
@@ -8782,10 +8856,12 @@
|
|
|
8782
8856
|
const visible = filterIsMatch(text, node2);
|
|
8783
8857
|
if (visible && parents.length) {
|
|
8784
8858
|
parents.forEach((parent) => {
|
|
8785
|
-
|
|
8786
|
-
|
|
8787
|
-
|
|
8788
|
-
|
|
8859
|
+
if (text || text.length) {
|
|
8860
|
+
updateStatus(nodeStatusMap.value, parent.id, {
|
|
8861
|
+
visible,
|
|
8862
|
+
expand: true
|
|
8863
|
+
});
|
|
8864
|
+
}
|
|
8789
8865
|
});
|
|
8790
8866
|
}
|
|
8791
8867
|
updateStatus(nodeStatusMap.value, node2.id, {
|
|
@@ -8886,7 +8962,7 @@
|
|
|
8886
8962
|
};
|
|
8887
8963
|
};
|
|
8888
8964
|
|
|
8889
|
-
const _hoisted_1$
|
|
8965
|
+
const _hoisted_1$Y = { class: "m-editor-data-source-fields" };
|
|
8890
8966
|
const _hoisted_2$l = { class: "m-editor-data-source-fields-footer" };
|
|
8891
8967
|
const _sfc_main$1i = /* @__PURE__ */ vue.defineComponent({
|
|
8892
8968
|
...{
|
|
@@ -9153,10 +9229,11 @@
|
|
|
9153
9229
|
const parentFloating = vue.inject("parentFloating", vue.ref(null));
|
|
9154
9230
|
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(uiService, parentFloating);
|
|
9155
9231
|
return (_ctx, _cache) => {
|
|
9156
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
9232
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$Y, [
|
|
9157
9233
|
vue.createVNode(vue.unref(tablePlugin.MagicTable), {
|
|
9158
9234
|
data: _ctx.model[_ctx.name],
|
|
9159
|
-
columns: fieldColumns
|
|
9235
|
+
columns: fieldColumns,
|
|
9236
|
+
border: true
|
|
9160
9237
|
}, null, 8, ["data"]),
|
|
9161
9238
|
vue.createElementVNode("div", _hoisted_2$l, [
|
|
9162
9239
|
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
@@ -9168,8 +9245,8 @@
|
|
|
9168
9245
|
default: vue.withCtx(() => _cache[8] || (_cache[8] = [
|
|
9169
9246
|
vue.createTextVNode("快速添加")
|
|
9170
9247
|
])),
|
|
9171
|
-
_: 1
|
|
9172
|
-
|
|
9248
|
+
_: 1,
|
|
9249
|
+
__: [8]
|
|
9173
9250
|
}, 8, ["disabled"]),
|
|
9174
9251
|
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
9175
9252
|
size: "small",
|
|
@@ -9181,8 +9258,8 @@
|
|
|
9181
9258
|
default: vue.withCtx(() => _cache[9] || (_cache[9] = [
|
|
9182
9259
|
vue.createTextVNode("添加")
|
|
9183
9260
|
])),
|
|
9184
|
-
_: 1
|
|
9185
|
-
|
|
9261
|
+
_: 1,
|
|
9262
|
+
__: [9]
|
|
9186
9263
|
}, 8, ["disabled"])
|
|
9187
9264
|
]),
|
|
9188
9265
|
vue.createVNode(_sfc_main$1j, {
|
|
@@ -9235,7 +9312,7 @@
|
|
|
9235
9312
|
}
|
|
9236
9313
|
});
|
|
9237
9314
|
|
|
9238
|
-
const _hoisted_1$
|
|
9315
|
+
const _hoisted_1$X = { class: "m-editor-data-source-field-select" };
|
|
9239
9316
|
const _sfc_main$1h = /* @__PURE__ */ vue.defineComponent({
|
|
9240
9317
|
__name: "FieldSelect",
|
|
9241
9318
|
props: /* @__PURE__ */ vue.mergeModels({
|
|
@@ -9244,7 +9321,7 @@
|
|
|
9244
9321
|
checkStrictly: { type: Boolean },
|
|
9245
9322
|
size: {},
|
|
9246
9323
|
dataSourceFieldType: {},
|
|
9247
|
-
notEditable: { type: Boolean }
|
|
9324
|
+
notEditable: { type: [Boolean, Function] }
|
|
9248
9325
|
}, {
|
|
9249
9326
|
"modelValue": { default: [] },
|
|
9250
9327
|
"modelModifiers": {}
|
|
@@ -9317,7 +9394,7 @@
|
|
|
9317
9394
|
eventBus?.emit("edit-data-source", removeDataSourceFieldPrefix(id));
|
|
9318
9395
|
};
|
|
9319
9396
|
return (_ctx, _cache) => {
|
|
9320
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
9397
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$X, [
|
|
9321
9398
|
_ctx.checkStrictly ? (vue.openBlock(), vue.createElementBlock(
|
|
9322
9399
|
vue.Fragment,
|
|
9323
9400
|
{ key: 0 },
|
|
@@ -9340,9 +9417,9 @@
|
|
|
9340
9417
|
vue.mergeProps(
|
|
9341
9418
|
{
|
|
9342
9419
|
class: "tmagic-design-option",
|
|
9343
|
-
key: option.value
|
|
9344
|
-
ref_for: true
|
|
9420
|
+
key: option.value
|
|
9345
9421
|
},
|
|
9422
|
+
{ ref_for: true },
|
|
9346
9423
|
vue.unref(optionComponent)?.props({
|
|
9347
9424
|
label: option.text,
|
|
9348
9425
|
value: option.value,
|
|
@@ -9420,7 +9497,7 @@
|
|
|
9420
9497
|
}
|
|
9421
9498
|
});
|
|
9422
9499
|
|
|
9423
|
-
const _hoisted_1$
|
|
9500
|
+
const _hoisted_1$W = { class: "m-fields-data-source-field-select" };
|
|
9424
9501
|
const _sfc_main$1g = /* @__PURE__ */ vue.defineComponent({
|
|
9425
9502
|
...{
|
|
9426
9503
|
name: "MFieldsDataSourceFieldSelect"
|
|
@@ -9455,9 +9532,10 @@
|
|
|
9455
9532
|
immediate: true
|
|
9456
9533
|
}
|
|
9457
9534
|
);
|
|
9458
|
-
const { dataSourceService } = useServices();
|
|
9535
|
+
const { dataSourceService, propsService } = useServices();
|
|
9459
9536
|
const mForm = vue.inject("mForm");
|
|
9460
9537
|
const dataSources = vue.computed(() => dataSourceService.get("dataSources") || []);
|
|
9538
|
+
const disabledDataSource = vue.computed(() => propsService.getDisabledDataSource());
|
|
9461
9539
|
const type = vue.computed(() => {
|
|
9462
9540
|
let type2 = props.config.fieldConfig?.type;
|
|
9463
9541
|
if (typeof type2 === "function") {
|
|
@@ -9522,8 +9600,8 @@
|
|
|
9522
9600
|
}
|
|
9523
9601
|
};
|
|
9524
9602
|
return (_ctx, _cache) => {
|
|
9525
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
9526
|
-
showDataSourceFieldSelect.value || !_ctx.config.fieldConfig ? (vue.openBlock(), vue.createBlock(_sfc_main$1h, {
|
|
9603
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$W, [
|
|
9604
|
+
!disabledDataSource.value && (showDataSourceFieldSelect.value || !_ctx.config.fieldConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$1h, {
|
|
9527
9605
|
key: 0,
|
|
9528
9606
|
"model-value": _ctx.model[_ctx.name],
|
|
9529
9607
|
disabled: _ctx.disabled,
|
|
@@ -9545,7 +9623,7 @@
|
|
|
9545
9623
|
prop: _ctx.prop,
|
|
9546
9624
|
onChange: onChangeHandler
|
|
9547
9625
|
}, null, 40, ["config", "model", "name", "disabled", "size", "last-values", "init-values", "values", "prop"])),
|
|
9548
|
-
_ctx.config.fieldConfig ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicTooltip), {
|
|
9626
|
+
_ctx.config.fieldConfig && !disabledDataSource.value ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicTooltip), {
|
|
9549
9627
|
key: 2,
|
|
9550
9628
|
disabled: showDataSourceFieldSelect.value,
|
|
9551
9629
|
content: "选择数据源"
|
|
@@ -9572,7 +9650,7 @@
|
|
|
9572
9650
|
}
|
|
9573
9651
|
});
|
|
9574
9652
|
|
|
9575
|
-
const _hoisted_1$
|
|
9653
|
+
const _hoisted_1$V = { style: { "display": "flex", "flex-direction": "column", "line-height": "1.2em" } };
|
|
9576
9654
|
const _hoisted_2$k = { style: { "font-size": "10px", "color": "rgba(0, 0, 0, 0.6)" } };
|
|
9577
9655
|
const _hoisted_3$7 = { class: "el-input__inner t-input__inner" };
|
|
9578
9656
|
const _sfc_main$1f = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -9595,13 +9673,14 @@
|
|
|
9595
9673
|
setup(__props, { emit: __emit }) {
|
|
9596
9674
|
const props = __props;
|
|
9597
9675
|
const emit = __emit;
|
|
9598
|
-
const { dataSourceService } = useServices();
|
|
9676
|
+
const { dataSourceService, propsService } = useServices();
|
|
9599
9677
|
const autocompleteRef = vue.useTemplateRef("autocomplete");
|
|
9600
9678
|
const isFocused = vue.ref(false);
|
|
9601
9679
|
const state = vue.ref("");
|
|
9602
9680
|
const displayState = vue.ref([]);
|
|
9603
9681
|
const input = vue.computed(() => autocompleteRef.value?.inputRef?.input);
|
|
9604
9682
|
const dataSources = vue.computed(() => dataSourceService.get("dataSources"));
|
|
9683
|
+
const disabledDataSource = vue.computed(() => propsService.getDisabledDataSource());
|
|
9605
9684
|
const setDisplayState = () => {
|
|
9606
9685
|
displayState.value = getDisplayField(dataSources.value, state.value);
|
|
9607
9686
|
};
|
|
@@ -9751,13 +9830,21 @@
|
|
|
9751
9830
|
changeHandler(state.value);
|
|
9752
9831
|
};
|
|
9753
9832
|
return (_ctx, _cache) => {
|
|
9754
|
-
return
|
|
9833
|
+
return disabledDataSource.value ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicInput), {
|
|
9834
|
+
key: 0,
|
|
9835
|
+
modelValue: state.value,
|
|
9836
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.value = $event),
|
|
9837
|
+
disabled: _ctx.disabled,
|
|
9838
|
+
size: _ctx.size,
|
|
9839
|
+
clearable: true,
|
|
9840
|
+
onChange: changeHandler
|
|
9841
|
+
}, null, 8, ["modelValue", "disabled", "size"])) : _ctx.disabled || isFocused.value ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(designPlugin.getDesignConfig)("components")?.autocomplete.component || "el-autocomplete"), vue.mergeProps(
|
|
9755
9842
|
{
|
|
9756
|
-
key:
|
|
9843
|
+
key: 1,
|
|
9757
9844
|
class: "tmagic-design-auto-complete",
|
|
9758
9845
|
ref: "autocomplete",
|
|
9759
9846
|
modelValue: state.value,
|
|
9760
|
-
"onUpdate:modelValue": _cache[
|
|
9847
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => state.value = $event)
|
|
9761
9848
|
},
|
|
9762
9849
|
vue.unref(designPlugin.getDesignConfig)("components")?.autocomplete.props({
|
|
9763
9850
|
disabled: _ctx.disabled,
|
|
@@ -9777,7 +9864,7 @@
|
|
|
9777
9864
|
vue.createVNode(_sfc_main$1r, { icon: vue.unref(iconsVue.Coin) }, null, 8, ["icon"])
|
|
9778
9865
|
]),
|
|
9779
9866
|
default: vue.withCtx(({ item }) => [
|
|
9780
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
9867
|
+
vue.createElementVNode("div", _hoisted_1$V, [
|
|
9781
9868
|
vue.createElementVNode(
|
|
9782
9869
|
"div",
|
|
9783
9870
|
null,
|
|
@@ -9799,7 +9886,7 @@
|
|
|
9799
9886
|
}, 16, ["modelValue"])) : (vue.openBlock(), vue.createElementBlock(
|
|
9800
9887
|
"div",
|
|
9801
9888
|
{
|
|
9802
|
-
key:
|
|
9889
|
+
key: 2,
|
|
9803
9890
|
class: vue.normalizeClass(`tmagic-data-source-input-text el-input t-input t-size-${_ctx.size?.[0]} el-input--${_ctx.size}`),
|
|
9804
9891
|
onMouseup: mouseupHandler
|
|
9805
9892
|
},
|
|
@@ -9868,7 +9955,7 @@
|
|
|
9868
9955
|
}
|
|
9869
9956
|
});
|
|
9870
9957
|
|
|
9871
|
-
const _hoisted_1$
|
|
9958
|
+
const _hoisted_1$U = { style: { "display": "flex", "margin-bottom": "10px" } };
|
|
9872
9959
|
const _hoisted_2$j = { style: { "flex": "1" } };
|
|
9873
9960
|
const _hoisted_3$6 = { style: { "flex": "1" } };
|
|
9874
9961
|
const _hoisted_4$5 = { class: "dialog-footer" };
|
|
@@ -10096,8 +10183,8 @@
|
|
|
10096
10183
|
default: vue.withCtx(() => _cache[6] || (_cache[6] = [
|
|
10097
10184
|
vue.createTextVNode("查看修改")
|
|
10098
10185
|
])),
|
|
10099
|
-
_: 1
|
|
10100
|
-
|
|
10186
|
+
_: 1,
|
|
10187
|
+
__: [6]
|
|
10101
10188
|
})) : vue.createCommentVNode("v-if", true)
|
|
10102
10189
|
]),
|
|
10103
10190
|
_: 1
|
|
@@ -10112,7 +10199,8 @@
|
|
|
10112
10199
|
title: "查看修改",
|
|
10113
10200
|
modelValue: difVisible.value,
|
|
10114
10201
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => difVisible.value = $event),
|
|
10115
|
-
fullscreen: ""
|
|
10202
|
+
fullscreen: "",
|
|
10203
|
+
"destroy-on-close": ""
|
|
10116
10204
|
}, {
|
|
10117
10205
|
footer: vue.withCtx(() => [
|
|
10118
10206
|
vue.createElementVNode("span", _hoisted_4$5, [
|
|
@@ -10123,8 +10211,8 @@
|
|
|
10123
10211
|
default: vue.withCtx(() => _cache[9] || (_cache[9] = [
|
|
10124
10212
|
vue.createTextVNode("取消")
|
|
10125
10213
|
])),
|
|
10126
|
-
_: 1
|
|
10127
|
-
|
|
10214
|
+
_: 1,
|
|
10215
|
+
__: [9]
|
|
10128
10216
|
}),
|
|
10129
10217
|
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
10130
10218
|
size: "small",
|
|
@@ -10134,13 +10222,13 @@
|
|
|
10134
10222
|
default: vue.withCtx(() => _cache[10] || (_cache[10] = [
|
|
10135
10223
|
vue.createTextVNode("确定")
|
|
10136
10224
|
])),
|
|
10137
|
-
_: 1
|
|
10138
|
-
|
|
10225
|
+
_: 1,
|
|
10226
|
+
__: [10]
|
|
10139
10227
|
})
|
|
10140
10228
|
])
|
|
10141
10229
|
]),
|
|
10142
10230
|
default: vue.withCtx(() => [
|
|
10143
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
10231
|
+
vue.createElementVNode("div", _hoisted_1$U, [
|
|
10144
10232
|
vue.createElementVNode("div", _hoisted_2$j, [
|
|
10145
10233
|
vue.createVNode(vue.unref(designPlugin.TMagicTag), {
|
|
10146
10234
|
size: "small",
|
|
@@ -10149,8 +10237,8 @@
|
|
|
10149
10237
|
default: vue.withCtx(() => _cache[7] || (_cache[7] = [
|
|
10150
10238
|
vue.createTextVNode("修改前")
|
|
10151
10239
|
])),
|
|
10152
|
-
_: 1
|
|
10153
|
-
|
|
10240
|
+
_: 1,
|
|
10241
|
+
__: [7]
|
|
10154
10242
|
})
|
|
10155
10243
|
]),
|
|
10156
10244
|
vue.createElementVNode("div", _hoisted_3$6, [
|
|
@@ -10161,20 +10249,20 @@
|
|
|
10161
10249
|
default: vue.withCtx(() => _cache[8] || (_cache[8] = [
|
|
10162
10250
|
vue.createTextVNode("修改后")
|
|
10163
10251
|
])),
|
|
10164
|
-
_: 1
|
|
10165
|
-
|
|
10252
|
+
_: 1,
|
|
10253
|
+
__: [8]
|
|
10166
10254
|
})
|
|
10167
10255
|
])
|
|
10168
10256
|
]),
|
|
10169
|
-
|
|
10170
|
-
key: 0,
|
|
10257
|
+
vue.createVNode(_sfc_main$1q, {
|
|
10171
10258
|
ref: "magicVsEditor",
|
|
10172
10259
|
type: "diff",
|
|
10173
10260
|
language: "json",
|
|
10261
|
+
"disabled-full-screen": true,
|
|
10174
10262
|
initValues: _ctx.content.content,
|
|
10175
|
-
modifiedValues:
|
|
10176
|
-
|
|
10177
|
-
}, null, 8, ["initValues", "modifiedValues", "
|
|
10263
|
+
modifiedValues: formBox.value?.form?.values.content,
|
|
10264
|
+
height: `${vue.unref(windowRect).height - 150}px`
|
|
10265
|
+
}, null, 8, ["initValues", "modifiedValues", "height"])
|
|
10178
10266
|
]),
|
|
10179
10267
|
_: 1
|
|
10180
10268
|
/* STABLE */
|
|
@@ -10188,7 +10276,7 @@
|
|
|
10188
10276
|
}
|
|
10189
10277
|
});
|
|
10190
10278
|
|
|
10191
|
-
const _hoisted_1$
|
|
10279
|
+
const _hoisted_1$T = { class: "m-editor-data-source-methods" };
|
|
10192
10280
|
const _hoisted_2$i = { class: "m-editor-data-source-methods-footer" };
|
|
10193
10281
|
const _sfc_main$1d = /* @__PURE__ */ vue.defineComponent({
|
|
10194
10282
|
...{
|
|
@@ -10307,10 +10395,11 @@
|
|
|
10307
10395
|
codeBlockEditorRef.value?.hide();
|
|
10308
10396
|
};
|
|
10309
10397
|
return (_ctx, _cache) => {
|
|
10310
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
10398
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$T, [
|
|
10311
10399
|
vue.createVNode(vue.unref(tablePlugin.MagicTable), {
|
|
10312
10400
|
data: _ctx.model[_ctx.name],
|
|
10313
|
-
columns: methodColumns
|
|
10401
|
+
columns: methodColumns,
|
|
10402
|
+
border: true
|
|
10314
10403
|
}, null, 8, ["data"]),
|
|
10315
10404
|
vue.createElementVNode("div", _hoisted_2$i, [
|
|
10316
10405
|
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
@@ -10323,8 +10412,8 @@
|
|
|
10323
10412
|
default: vue.withCtx(() => _cache[0] || (_cache[0] = [
|
|
10324
10413
|
vue.createTextVNode("添加")
|
|
10325
10414
|
])),
|
|
10326
|
-
_: 1
|
|
10327
|
-
|
|
10415
|
+
_: 1,
|
|
10416
|
+
__: [0]
|
|
10328
10417
|
}, 8, ["disabled"])
|
|
10329
10418
|
]),
|
|
10330
10419
|
codeConfig.value ? (vue.openBlock(), vue.createBlock(_sfc_main$1e, {
|
|
@@ -10341,7 +10430,7 @@
|
|
|
10341
10430
|
}
|
|
10342
10431
|
});
|
|
10343
10432
|
|
|
10344
|
-
const _hoisted_1$
|
|
10433
|
+
const _hoisted_1$S = { class: "m-fields-data-source-method-select" };
|
|
10345
10434
|
const _hoisted_2$h = { class: "data-source-method-select-container" };
|
|
10346
10435
|
const _sfc_main$1c = /* @__PURE__ */ vue.defineComponent({
|
|
10347
10436
|
...{
|
|
@@ -10428,7 +10517,7 @@
|
|
|
10428
10517
|
eventBus?.emit("edit-data-source", id);
|
|
10429
10518
|
};
|
|
10430
10519
|
return (_ctx, _cache) => {
|
|
10431
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
10520
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$S, [
|
|
10432
10521
|
vue.createElementVNode("div", _hoisted_2$h, [
|
|
10433
10522
|
vue.createVNode(vue.unref(formPlugin.MContainer), {
|
|
10434
10523
|
class: "select",
|
|
@@ -10474,7 +10563,7 @@
|
|
|
10474
10563
|
}
|
|
10475
10564
|
});
|
|
10476
10565
|
|
|
10477
|
-
const _hoisted_1$
|
|
10566
|
+
const _hoisted_1$R = { class: "m-editor-data-source-fields" };
|
|
10478
10567
|
const _hoisted_2$g = { class: "m-editor-data-source-fields-footer" };
|
|
10479
10568
|
const _sfc_main$1b = /* @__PURE__ */ vue.defineComponent({
|
|
10480
10569
|
...{
|
|
@@ -10680,7 +10769,7 @@
|
|
|
10680
10769
|
const parentFloating = vue.inject("parentFloating", vue.ref(null));
|
|
10681
10770
|
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(uiService, parentFloating);
|
|
10682
10771
|
return (_ctx, _cache) => {
|
|
10683
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
10772
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$R, [
|
|
10684
10773
|
vue.createVNode(vue.unref(tablePlugin.MagicTable), {
|
|
10685
10774
|
data: _ctx.model[_ctx.name],
|
|
10686
10775
|
columns
|
|
@@ -10696,8 +10785,8 @@
|
|
|
10696
10785
|
default: vue.withCtx(() => _cache[4] || (_cache[4] = [
|
|
10697
10786
|
vue.createTextVNode("添加")
|
|
10698
10787
|
])),
|
|
10699
|
-
_: 1
|
|
10700
|
-
|
|
10788
|
+
_: 1,
|
|
10789
|
+
__: [4]
|
|
10701
10790
|
}, 8, ["disabled"])
|
|
10702
10791
|
]),
|
|
10703
10792
|
vue.createVNode(_sfc_main$1j, {
|
|
@@ -10728,7 +10817,7 @@
|
|
|
10728
10817
|
}
|
|
10729
10818
|
});
|
|
10730
10819
|
|
|
10731
|
-
const _hoisted_1$
|
|
10820
|
+
const _hoisted_1$Q = { class: "m-fields-data-source-select" };
|
|
10732
10821
|
const _sfc_main$1a = /* @__PURE__ */ vue.defineComponent({
|
|
10733
10822
|
...{
|
|
10734
10823
|
name: "MFieldsDataSourceSelect"
|
|
@@ -10786,7 +10875,7 @@
|
|
|
10786
10875
|
eventBus?.emit("edit-data-source", id);
|
|
10787
10876
|
};
|
|
10788
10877
|
return (_ctx, _cache) => {
|
|
10789
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
10878
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$Q, [
|
|
10790
10879
|
vue.createVNode(vue.unref(formPlugin.MSelect), {
|
|
10791
10880
|
model: _ctx.model,
|
|
10792
10881
|
name: _ctx.name,
|
|
@@ -10956,7 +11045,7 @@
|
|
|
10956
11045
|
}
|
|
10957
11046
|
});
|
|
10958
11047
|
|
|
10959
|
-
const _hoisted_1$
|
|
11048
|
+
const _hoisted_1$P = { class: "m-fields-event-select" };
|
|
10960
11049
|
const _hoisted_2$f = {
|
|
10961
11050
|
key: 1,
|
|
10962
11051
|
class: "fullWidth"
|
|
@@ -10981,7 +11070,7 @@
|
|
|
10981
11070
|
setup(__props, { emit: __emit }) {
|
|
10982
11071
|
const props = __props;
|
|
10983
11072
|
const emit = __emit;
|
|
10984
|
-
const { editorService, dataSourceService, eventsService, codeBlockService } = useServices();
|
|
11073
|
+
const { editorService, dataSourceService, eventsService, codeBlockService, propsService } = useServices();
|
|
10985
11074
|
const eventNameConfig = vue.computed(() => {
|
|
10986
11075
|
const defaultEventNameConfig = {
|
|
10987
11076
|
name: "name",
|
|
@@ -11053,24 +11142,31 @@
|
|
|
11053
11142
|
text: "联动类型",
|
|
11054
11143
|
type: "select",
|
|
11055
11144
|
defaultValue: core.ActionType.COMP,
|
|
11056
|
-
options: () =>
|
|
11057
|
-
|
|
11058
|
-
|
|
11059
|
-
|
|
11060
|
-
|
|
11061
|
-
|
|
11062
|
-
|
|
11063
|
-
|
|
11064
|
-
|
|
11065
|
-
|
|
11066
|
-
|
|
11067
|
-
|
|
11068
|
-
|
|
11069
|
-
|
|
11070
|
-
|
|
11071
|
-
value: core.ActionType.DATA_SOURCE
|
|
11145
|
+
options: () => {
|
|
11146
|
+
const o = [
|
|
11147
|
+
{
|
|
11148
|
+
text: "组件",
|
|
11149
|
+
label: "组件",
|
|
11150
|
+
value: core.ActionType.COMP
|
|
11151
|
+
}
|
|
11152
|
+
];
|
|
11153
|
+
if (!propsService.getDisabledCodeBlock()) {
|
|
11154
|
+
o.push({
|
|
11155
|
+
text: "代码",
|
|
11156
|
+
label: "代码",
|
|
11157
|
+
disabled: !Object.keys(codeBlockService.getCodeDsl() || {}).length,
|
|
11158
|
+
value: core.ActionType.CODE
|
|
11159
|
+
});
|
|
11072
11160
|
}
|
|
11073
|
-
|
|
11161
|
+
if (!propsService.getDisabledDataSource()) {
|
|
11162
|
+
o.push({
|
|
11163
|
+
text: "数据源",
|
|
11164
|
+
label: "数据源",
|
|
11165
|
+
value: core.ActionType.DATA_SOURCE
|
|
11166
|
+
});
|
|
11167
|
+
}
|
|
11168
|
+
return o;
|
|
11169
|
+
}
|
|
11074
11170
|
};
|
|
11075
11171
|
return { ...defaultActionTypeConfig, ...props.config.actionTypeConfig };
|
|
11076
11172
|
});
|
|
@@ -11231,7 +11327,7 @@
|
|
|
11231
11327
|
const onChangeHandler = (v, eventData) => emit("change", props.model[props.name], eventData);
|
|
11232
11328
|
return (_ctx, _cache) => {
|
|
11233
11329
|
const _component_m_form_table = vue.resolveComponent("m-form-table");
|
|
11234
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
11330
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$P, [
|
|
11235
11331
|
isOldVersion.value ? (vue.openBlock(), vue.createBlock(_component_m_form_table, {
|
|
11236
11332
|
key: 0,
|
|
11237
11333
|
name: "events",
|
|
@@ -11251,8 +11347,8 @@
|
|
|
11251
11347
|
default: vue.withCtx(() => _cache[1] || (_cache[1] = [
|
|
11252
11348
|
vue.createTextVNode("添加事件")
|
|
11253
11349
|
])),
|
|
11254
|
-
_: 1
|
|
11255
|
-
|
|
11350
|
+
_: 1,
|
|
11351
|
+
__: [1]
|
|
11256
11352
|
}, 8, ["size", "disabled"]),
|
|
11257
11353
|
(vue.openBlock(true), vue.createElementBlock(
|
|
11258
11354
|
vue.Fragment,
|
|
@@ -11300,7 +11396,7 @@
|
|
|
11300
11396
|
}
|
|
11301
11397
|
});
|
|
11302
11398
|
|
|
11303
|
-
const _hoisted_1$
|
|
11399
|
+
const _hoisted_1$O = {
|
|
11304
11400
|
viewBox: "0 0 32 32",
|
|
11305
11401
|
version: "1.1",
|
|
11306
11402
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -11313,14 +11409,14 @@
|
|
|
11313
11409
|
__name: "CodeIcon",
|
|
11314
11410
|
setup(__props) {
|
|
11315
11411
|
return (_ctx, _cache) => {
|
|
11316
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
11412
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$O, _cache[0] || (_cache[0] = [
|
|
11317
11413
|
vue.createStaticVNode('<defs><rect id="path-1" x="0" y="0" width="32" height="32"></rect></defs><g id="组件规范" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="03图标" transform="translate(-561.000000, -2356.000000)"><g id="icon/line/Universal/code" transform="translate(561.000000, 2356.000000)"><g id="路径"><mask id="mask-2" fill="white"><use xlink:href="#path-1"></use></mask><use id="蒙版" fill="#D8D8D8" opacity="0" xlink:href="#path-1"></use><path d="M21.9284587,7.9482233 L29.8079004,15.827665 C29.9055315,15.9252961 29.9055315,16.0835874 29.8079004,16.1812184 L21.9284587,24.0606602 C21.8308276,24.1582912 21.6725364,24.1582912 21.5749053,24.0606602 L20.3374684,22.8232233 C20.2419143,22.7276698 20.2398813,22.5740096 20.331369,22.4759832 L20.3374687,22.4696702 L26.8027181,16.0044417 L20.3374687,9.53921328 C20.2398372,9.44158265 20.2398369,9.2832914 20.3374679,9.18566017 L21.5749053,7.9482233 C21.6725364,7.85059223 21.8308276,7.85059223 21.9284587,7.9482233 Z M10.3999684,7.9482233 L11.6374053,9.18566017 C11.7329594,9.28121371 11.7349925,9.43487387 11.6435048,9.53290029 L11.637405,9.53921328 L5.17215562,16.0044417 L11.637405,22.4696702 C11.7329593,22.5652236 11.7349926,22.7188837 11.643505,22.8169103 L11.6374053,22.8232233 L10.3999684,24.0606602 C10.3023374,24.1582912 10.1440461,24.1582912 10.046415,24.0606602 L2.1669733,16.1812184 C2.06934223,16.0835874 2.06934223,15.9252961 2.1669733,15.827665 L10.046415,7.9482233 C10.1440461,7.85059223 10.3023374,7.85059223 10.3999684,7.9482233 Z M17.2612532,9.29310422 L18.9262468,9.83189578 C19.0576112,9.87440526 19.1296423,10.0153579 19.0871328,10.1467222 L15.0848232,22.514807 C15.0423138,22.6461714 14.9013612,22.7182025 14.7699968,22.675693 L13.1050032,22.1369014 C12.9736388,22.0943919 12.9016077,21.9534393 12.9441172,21.822075 L16.9464268,9.45399022 C16.9889362,9.32262585 17.1298888,9.25059474 17.2612532,9.29310422 Z" id="形状" fill="#1D1F24" mask="url(#mask-2)"></path></g></g><g id="icon切图" transform="translate(226.000000, 1782.000000)"></g></g></g>', 2)
|
|
11318
11414
|
]));
|
|
11319
11415
|
};
|
|
11320
11416
|
}
|
|
11321
11417
|
});
|
|
11322
11418
|
|
|
11323
|
-
const _hoisted_1$
|
|
11419
|
+
const _hoisted_1$N = { class: "m-fields-key-value" };
|
|
11324
11420
|
const _hoisted_2$e = { key: 0 };
|
|
11325
11421
|
const _sfc_main$16 = /* @__PURE__ */ vue.defineComponent({
|
|
11326
11422
|
...{
|
|
@@ -11384,7 +11480,7 @@
|
|
|
11384
11480
|
emit("change", v);
|
|
11385
11481
|
};
|
|
11386
11482
|
return (_ctx, _cache) => {
|
|
11387
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
11483
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$N, [
|
|
11388
11484
|
!showCode.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$e, [
|
|
11389
11485
|
(vue.openBlock(true), vue.createElementBlock(
|
|
11390
11486
|
vue.Fragment,
|
|
@@ -11407,7 +11503,7 @@
|
|
|
11407
11503
|
{ class: "m-fields-key-value-delimiter" },
|
|
11408
11504
|
":",
|
|
11409
11505
|
-1
|
|
11410
|
-
/*
|
|
11506
|
+
/* CACHED */
|
|
11411
11507
|
)),
|
|
11412
11508
|
vue.createVNode(vue.unref(designPlugin.TMagicInput), {
|
|
11413
11509
|
placeholder: "value",
|
|
@@ -11443,8 +11539,8 @@
|
|
|
11443
11539
|
default: vue.withCtx(() => _cache[2] || (_cache[2] = [
|
|
11444
11540
|
vue.createTextVNode("添加")
|
|
11445
11541
|
])),
|
|
11446
|
-
_: 1
|
|
11447
|
-
|
|
11542
|
+
_: 1,
|
|
11543
|
+
__: [2]
|
|
11448
11544
|
}, 8, ["size", "disabled", "icon"])
|
|
11449
11545
|
])) : vue.createCommentVNode("v-if", true),
|
|
11450
11546
|
_ctx.config.advanced && showCode.value ? (vue.openBlock(), vue.createBlock(_sfc_main$1q, {
|
|
@@ -11471,7 +11567,7 @@
|
|
|
11471
11567
|
}
|
|
11472
11568
|
});
|
|
11473
11569
|
|
|
11474
|
-
const _hoisted_1$
|
|
11570
|
+
const _hoisted_1$M = { class: "m-fields-page-fragment-select" };
|
|
11475
11571
|
const _hoisted_2$d = { class: "page-fragment-select-container" };
|
|
11476
11572
|
const _sfc_main$15 = /* @__PURE__ */ vue.defineComponent({
|
|
11477
11573
|
...{
|
|
@@ -11519,7 +11615,7 @@
|
|
|
11519
11615
|
};
|
|
11520
11616
|
return (_ctx, _cache) => {
|
|
11521
11617
|
const _component_m_form_container = vue.resolveComponent("m-form-container");
|
|
11522
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
11618
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$M, [
|
|
11523
11619
|
vue.createElementVNode("div", _hoisted_2$d, [
|
|
11524
11620
|
vue.createCommentVNode(" 页面片下拉框 "),
|
|
11525
11621
|
vue.createVNode(_component_m_form_container, {
|
|
@@ -11542,7 +11638,7 @@
|
|
|
11542
11638
|
}
|
|
11543
11639
|
});
|
|
11544
11640
|
|
|
11545
|
-
const _hoisted_1$
|
|
11641
|
+
const _hoisted_1$L = { class: "background-position-container" };
|
|
11546
11642
|
const _hoisted_2$c = { class: "presets-value-list" };
|
|
11547
11643
|
const _hoisted_3$5 = { class: "custom-value" };
|
|
11548
11644
|
const _sfc_main$14 = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -11600,7 +11696,7 @@
|
|
|
11600
11696
|
emit("change", v);
|
|
11601
11697
|
};
|
|
11602
11698
|
return (_ctx, _cache) => {
|
|
11603
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
11699
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$L, [
|
|
11604
11700
|
vue.createElementVNode("div", _hoisted_2$c, [
|
|
11605
11701
|
(vue.openBlock(true), vue.createElementBlock(
|
|
11606
11702
|
vue.Fragment,
|
|
@@ -11656,13 +11752,13 @@
|
|
|
11656
11752
|
|
|
11657
11753
|
const _sfc_main$13 = { };
|
|
11658
11754
|
|
|
11659
|
-
const _hoisted_1$
|
|
11755
|
+
const _hoisted_1$K = {
|
|
11660
11756
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11661
11757
|
viewBox: "0 0 1024 1024"
|
|
11662
11758
|
};
|
|
11663
11759
|
|
|
11664
11760
|
function _sfc_render$k(_ctx, _cache) {
|
|
11665
|
-
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
11761
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$K, _cache[0] || (_cache[0] = [
|
|
11666
11762
|
vue.createStaticVNode("<path d=\"M884.736 102.4l-147.456 0c-20.48 0-36.864 16.384-36.864 36.864l0 147.456C696.32 311.296 712.704 327.68 733.184 327.68l147.456 0c20.48 0 36.864-16.384 36.864-36.864L917.504 139.264C921.6 118.784 905.216 102.4 884.736 102.4zM884.736 290.816l-147.456 0L737.28 139.264l147.456 0L884.736 290.816z\"></path><path d=\"M884.736 696.32l-147.456 0c-20.48 0-36.864 16.384-36.864 36.864l0 147.456c0 20.48 16.384 36.864 36.864 36.864l147.456 0c20.48 0 36.864-16.384 36.864-36.864l0-147.456C921.6 712.704 905.216 696.32 884.736 696.32zM884.736 884.736l-147.456 0 0-147.456 147.456 0L884.736 884.736z\"></path><path d=\"M884.736 401.408l-147.456 0c-20.48 0-36.864 16.384-36.864 36.864l0 147.456c0 20.48 16.384 36.864 36.864 36.864l147.456 0c20.48 0 36.864-16.384 36.864-36.864l0-147.456C921.6 417.792 905.216 401.408 884.736 401.408zM884.736 585.728l-147.456 0 0-147.456 147.456 0L884.736 585.728z\"></path><path d=\"M585.728 401.408l-147.456 0c-20.48 0-36.864 16.384-36.864 36.864l0 147.456c0 20.48 16.384 36.864 36.864 36.864l147.456 0c20.48 0 36.864-16.384 36.864-36.864l0-147.456C622.592 417.792 606.208 401.408 585.728 401.408zM585.728 585.728l-147.456 0 0-147.456 147.456 0L585.728 585.728z\"></path><path d=\"M585.728 102.4l-147.456 0c-20.48 0-36.864 16.384-36.864 36.864l0 147.456c0 20.48 16.384 36.864 36.864 36.864l147.456 0c20.48 0 36.864-16.384 36.864-36.864L622.592 139.264C622.592 118.784 606.208 102.4 585.728 102.4zM585.728 290.816l-147.456 0L438.272 139.264l147.456 0L585.728 290.816z\"></path><path d=\"M585.728 696.32l-147.456 0c-20.48 0-36.864 16.384-36.864 36.864l0 147.456c0 20.48 16.384 36.864 36.864 36.864l147.456 0c20.48 0 36.864-16.384 36.864-36.864l0-147.456C622.592 712.704 606.208 696.32 585.728 696.32zM585.728 884.736l-147.456 0 0-147.456 147.456 0L585.728 884.736z\"></path><path d=\"M290.816 696.32 139.264 696.32c-20.48 0-36.864 16.384-36.864 36.864l0 147.456c0 20.48 16.384 36.864 36.864 36.864l147.456 0c20.48 0 36.864-16.384 36.864-36.864l0-147.456C327.68 712.704 311.296 696.32 290.816 696.32zM290.816 884.736 139.264 884.736l0-147.456 147.456 0L286.72 884.736z\"></path><path d=\"M290.816 401.408 139.264 401.408c-20.48 0-36.864 16.384-36.864 36.864l0 147.456c0 20.48 16.384 36.864 36.864 36.864l147.456 0c20.48 0 36.864-16.384 36.864-36.864l0-147.456C327.68 417.792 311.296 401.408 290.816 401.408zM290.816 585.728 139.264 585.728l0-147.456 147.456 0L286.72 585.728z\"></path><path d=\"M290.816 102.4 139.264 102.4c-20.48 0-36.864 16.384-36.864 36.864l0 147.456C102.4 311.296 118.784 327.68 139.264 327.68l147.456 0C311.296 327.68 327.68 311.296 327.68 290.816L327.68 139.264C327.68 118.784 311.296 102.4 290.816 102.4zM290.816 290.816 139.264 290.816 139.264 139.264l147.456 0L286.72 290.816z\"></path>", 9)
|
|
11667
11763
|
])))
|
|
11668
11764
|
}
|
|
@@ -11670,51 +11766,51 @@
|
|
|
11670
11766
|
|
|
11671
11767
|
const _sfc_main$12 = { };
|
|
11672
11768
|
|
|
11673
|
-
const _hoisted_1$
|
|
11769
|
+
const _hoisted_1$J = {
|
|
11674
11770
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11675
11771
|
viewBox: "0 0 1024 1024"
|
|
11676
11772
|
};
|
|
11677
11773
|
|
|
11678
11774
|
function _sfc_render$j(_ctx, _cache) {
|
|
11679
|
-
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
11775
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$J, _cache[0] || (_cache[0] = [
|
|
11680
11776
|
vue.createElementVNode("path", {
|
|
11681
11777
|
d: "M796.444444 170.666667h-227.555555v682.666666h227.555555V170.666667z m-56.888888 625.777777h-113.777778V227.555556h113.777778v568.888888zM455.111111 170.666667H227.555556v682.666666h227.555555V170.666667zM398.222222 796.444444H284.444444V227.555556h113.777778v568.888888zM910.222222 56.888889h56.888889v910.222222h-56.888889zM56.888889 56.888889h56.888889v910.222222H56.888889z",
|
|
11682
11778
|
fill: "#333333"
|
|
11683
|
-
}, null, -1 /*
|
|
11779
|
+
}, null, -1 /* CACHED */)
|
|
11684
11780
|
])))
|
|
11685
11781
|
}
|
|
11686
11782
|
const BackgroundRepeatX = /*#__PURE__*/_export_sfc(_sfc_main$12, [['render',_sfc_render$j]]);
|
|
11687
11783
|
|
|
11688
11784
|
const _sfc_main$11 = { };
|
|
11689
11785
|
|
|
11690
|
-
const _hoisted_1$
|
|
11786
|
+
const _hoisted_1$I = {
|
|
11691
11787
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11692
11788
|
viewBox: "0 0 1024 1024"
|
|
11693
11789
|
};
|
|
11694
11790
|
|
|
11695
11791
|
function _sfc_render$i(_ctx, _cache) {
|
|
11696
|
-
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
11792
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$I, _cache[0] || (_cache[0] = [
|
|
11697
11793
|
vue.createElementVNode("path", {
|
|
11698
11794
|
d: "M170.666667 227.555556v227.555555h682.666666V227.555556H170.666667z m625.777777 56.888888v113.777778H227.555556V284.444444h568.888888zM170.666667 568.888889v227.555555h682.666666v-227.555555H170.666667z m625.777777 56.888889v113.777778H227.555556v-113.777778h568.888888zM56.888889 56.888889h910.222222v56.888889H56.888889zM56.888889 910.222222h910.222222v56.888889H56.888889z",
|
|
11699
11795
|
fill: "#333333"
|
|
11700
|
-
}, null, -1 /*
|
|
11796
|
+
}, null, -1 /* CACHED */)
|
|
11701
11797
|
])))
|
|
11702
11798
|
}
|
|
11703
11799
|
const BackgroundRepeatY = /*#__PURE__*/_export_sfc(_sfc_main$11, [['render',_sfc_render$i]]);
|
|
11704
11800
|
|
|
11705
11801
|
const _sfc_main$10 = { };
|
|
11706
11802
|
|
|
11707
|
-
const _hoisted_1$
|
|
11803
|
+
const _hoisted_1$H = {
|
|
11708
11804
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11709
11805
|
viewBox: "0 0 1024 1024"
|
|
11710
11806
|
};
|
|
11711
11807
|
|
|
11712
11808
|
function _sfc_render$h(_ctx, _cache) {
|
|
11713
|
-
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
11809
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$H, _cache[0] || (_cache[0] = [
|
|
11714
11810
|
vue.createElementVNode("path", {
|
|
11715
11811
|
d: "M912.526651 867.741144 555.540144 510.712681l356.986507-357.000833c11.171434-11.18576 11.171434-29.257348 0-40.443108-11.20111-11.18576-29.272697-11.18576-40.444131 0L515.096013 470.267527 158.096203 113.267716c-11.187807-11.159154-29.258371-11.159154-40.444131 0-11.186783 11.186783-11.186783 29.286 0 40.47176L474.623229 510.712681 117.623419 867.741144c-11.159154 11.172457-11.159154 29.216415 0 40.443108 11.18576 11.17348 29.284977 11.17348 40.47176 0l357.000833-357.027439 356.985484 357.027439c11.171434 11.17348 29.243021 11.17348 40.444131 0C923.698085 896.957559 923.725714 878.913601 912.526651 867.741144z",
|
|
11716
11812
|
fill: "#5D5D5D"
|
|
11717
|
-
}, null, -1 /*
|
|
11813
|
+
}, null, -1 /* CACHED */)
|
|
11718
11814
|
])))
|
|
11719
11815
|
}
|
|
11720
11816
|
const BackgroundNoRepeat = /*#__PURE__*/_export_sfc(_sfc_main$10, [['render',_sfc_render$h]]);
|
|
@@ -11796,42 +11892,42 @@
|
|
|
11796
11892
|
|
|
11797
11893
|
const _sfc_main$_ = { };
|
|
11798
11894
|
|
|
11799
|
-
const _hoisted_1$
|
|
11895
|
+
const _hoisted_1$G = {
|
|
11800
11896
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11801
11897
|
viewBox: "0 0 1024 1024"
|
|
11802
11898
|
};
|
|
11803
11899
|
|
|
11804
11900
|
function _sfc_render$g(_ctx, _cache) {
|
|
11805
|
-
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
11806
|
-
vue.createElementVNode("path", { d: "M128 810.666667h768v85.333333H128z m0-170.666667h512v85.333333H128z m0-170.666667h768v85.333334H128z m0-341.333333h768v85.333333H128z m0 170.666667h512v85.333333H128z" }, null, -1 /*
|
|
11901
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$G, _cache[0] || (_cache[0] = [
|
|
11902
|
+
vue.createElementVNode("path", { d: "M128 810.666667h768v85.333333H128z m0-170.666667h512v85.333333H128z m0-170.666667h768v85.333334H128z m0-341.333333h768v85.333333H128z m0 170.666667h512v85.333333H128z" }, null, -1 /* CACHED */)
|
|
11807
11903
|
])))
|
|
11808
11904
|
}
|
|
11809
11905
|
const AlignLeft = /*#__PURE__*/_export_sfc(_sfc_main$_, [['render',_sfc_render$g]]);
|
|
11810
11906
|
|
|
11811
11907
|
const _sfc_main$Z = { };
|
|
11812
11908
|
|
|
11813
|
-
const _hoisted_1$
|
|
11909
|
+
const _hoisted_1$F = {
|
|
11814
11910
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11815
11911
|
viewBox: "0 0 1024 1024"
|
|
11816
11912
|
};
|
|
11817
11913
|
|
|
11818
11914
|
function _sfc_render$f(_ctx, _cache) {
|
|
11819
|
-
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
11820
|
-
vue.createElementVNode("path", { d: "M128 810.666667h768v85.333333H128z m128-170.666667h512v85.333333H256z m-128-170.666667h768v85.333334H128z m0-341.333333h768v85.333333H128z m128 170.666667h512v85.333333H256z" }, null, -1 /*
|
|
11915
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$F, _cache[0] || (_cache[0] = [
|
|
11916
|
+
vue.createElementVNode("path", { d: "M128 810.666667h768v85.333333H128z m128-170.666667h512v85.333333H256z m-128-170.666667h768v85.333334H128z m0-341.333333h768v85.333333H128z m128 170.666667h512v85.333333H256z" }, null, -1 /* CACHED */)
|
|
11821
11917
|
])))
|
|
11822
11918
|
}
|
|
11823
11919
|
const AlignCenter = /*#__PURE__*/_export_sfc(_sfc_main$Z, [['render',_sfc_render$f]]);
|
|
11824
11920
|
|
|
11825
11921
|
const _sfc_main$Y = { };
|
|
11826
11922
|
|
|
11827
|
-
const _hoisted_1$
|
|
11923
|
+
const _hoisted_1$E = {
|
|
11828
11924
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11829
11925
|
viewBox: "0 0 1024 1024"
|
|
11830
11926
|
};
|
|
11831
11927
|
|
|
11832
11928
|
function _sfc_render$e(_ctx, _cache) {
|
|
11833
|
-
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
11834
|
-
vue.createElementVNode("path", { d: "M128 128h768v85.333333H128z m0 682.666667h768v85.333333H128z m213.333333-170.666667h554.666667v85.333333H341.333333z m-213.333333-170.666667h768v85.333334H128z m213.333333-170.666666h554.666667v85.333333H341.333333z" }, null, -1 /*
|
|
11929
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$E, _cache[0] || (_cache[0] = [
|
|
11930
|
+
vue.createElementVNode("path", { d: "M128 128h768v85.333333H128z m0 682.666667h768v85.333333H128z m213.333333-170.666667h554.666667v85.333333H341.333333z m-213.333333-170.666667h768v85.333334H128z m213.333333-170.666666h554.666667v85.333333H341.333333z" }, null, -1 /* CACHED */)
|
|
11835
11931
|
])))
|
|
11836
11932
|
}
|
|
11837
11933
|
const AlignRight = /*#__PURE__*/_export_sfc(_sfc_main$Y, [['render',_sfc_render$e]]);
|
|
@@ -11920,7 +12016,7 @@
|
|
|
11920
12016
|
}
|
|
11921
12017
|
});
|
|
11922
12018
|
|
|
11923
|
-
const _hoisted_1$
|
|
12019
|
+
const _hoisted_1$D = { class: "layout-box-container" };
|
|
11924
12020
|
const _hoisted_2$b = {
|
|
11925
12021
|
key: 0,
|
|
11926
12022
|
class: "help-txt"
|
|
@@ -11977,7 +12073,7 @@
|
|
|
11977
12073
|
});
|
|
11978
12074
|
};
|
|
11979
12075
|
return (_ctx, _cache) => {
|
|
11980
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
12076
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$D, [
|
|
11981
12077
|
(vue.openBlock(), vue.createElementBlock(
|
|
11982
12078
|
vue.Fragment,
|
|
11983
12079
|
null,
|
|
@@ -12021,196 +12117,196 @@
|
|
|
12021
12117
|
|
|
12022
12118
|
const _sfc_main$V = { };
|
|
12023
12119
|
|
|
12024
|
-
const _hoisted_1$
|
|
12120
|
+
const _hoisted_1$C = {
|
|
12025
12121
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12026
12122
|
viewBox: "0 0 1024 1024"
|
|
12027
12123
|
};
|
|
12028
12124
|
|
|
12029
12125
|
function _sfc_render$d(_ctx, _cache) {
|
|
12030
|
-
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
12031
|
-
vue.createElementVNode("path", { d: "M960 128a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H64a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h896z m0 64H64v640h896V192z m-96 64a32 32 0 0 1 32 32v448a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32h704z" }, null, -1 /*
|
|
12126
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$C, _cache[0] || (_cache[0] = [
|
|
12127
|
+
vue.createElementVNode("path", { d: "M960 128a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H64a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h896z m0 64H64v640h896V192z m-96 64a32 32 0 0 1 32 32v448a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32h704z" }, null, -1 /* CACHED */)
|
|
12032
12128
|
])))
|
|
12033
12129
|
}
|
|
12034
12130
|
const DisplayBlock = /*#__PURE__*/_export_sfc(_sfc_main$V, [['render',_sfc_render$d]]);
|
|
12035
12131
|
|
|
12036
12132
|
const _sfc_main$U = { };
|
|
12037
12133
|
|
|
12038
|
-
const _hoisted_1$
|
|
12134
|
+
const _hoisted_1$B = {
|
|
12039
12135
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12040
12136
|
viewBox: "0 0 1024 1024"
|
|
12041
12137
|
};
|
|
12042
12138
|
|
|
12043
12139
|
function _sfc_render$c(_ctx, _cache) {
|
|
12044
|
-
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
12045
|
-
vue.createElementVNode("path", { d: "M960 128a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H64a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h896z m0 64H64v640h896V192zM352 256v512H160V256h192z m256 0v512h-192V256h192z m256 0v512h-192V256h192z" }, null, -1 /*
|
|
12140
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$B, _cache[0] || (_cache[0] = [
|
|
12141
|
+
vue.createElementVNode("path", { d: "M960 128a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H64a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h896z m0 64H64v640h896V192zM352 256v512H160V256h192z m256 0v512h-192V256h192z m256 0v512h-192V256h192z" }, null, -1 /* CACHED */)
|
|
12046
12142
|
])))
|
|
12047
12143
|
}
|
|
12048
12144
|
const DisplayFlex = /*#__PURE__*/_export_sfc(_sfc_main$U, [['render',_sfc_render$c]]);
|
|
12049
12145
|
|
|
12050
12146
|
const _sfc_main$T = { };
|
|
12051
12147
|
|
|
12052
|
-
const _hoisted_1$
|
|
12148
|
+
const _hoisted_1$A = {
|
|
12053
12149
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12054
12150
|
viewBox: "0 0 1024 1024"
|
|
12055
12151
|
};
|
|
12056
12152
|
|
|
12057
12153
|
function _sfc_render$b(_ctx, _cache) {
|
|
12058
|
-
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
12059
|
-
vue.createElementVNode("path", { d: "M787.616 651.36a142.72 142.72 0 0 0 52.864 31.904 205.504 205.504 0 0 0 67.264 10.848 245.76 245.76 0 0 0 38.784-2.4c9.504-1.6 19.36-4 30.208-7.04 8.16-2.24 15.968-5.12 23.36-8.32l23.392-10.816V587.52h-8.736c-3.968 3.424-8.96 7.648-15.104 12.544a190.272 190.272 0 0 1-19.936 13.504 120.32 120.32 0 0 1-27.616 12.544 102.528 102.528 0 0 1-62.72-0.576 80 80 0 0 1-29.824-17.088 89.28 89.28 0 0 1-21.664-32.512c-5.696-13.664-8.64-30.784-8.64-51.296 0-19.744 2.72-36.384 7.968-50.08 5.248-13.664 12.384-24.896 20.992-33.056 9.12-8.832 18.816-14.816 29.632-18.816a101.824 101.824 0 0 1 63.68-0.736c9.408 3.136 18.08 7.04 26.112 11.68 13.024 7.808 25.28 16.768 36.672 26.784H1024v-78.72c-6.08-2.88-13.12-6.08-21.12-9.6a205.984 205.984 0 0 0-57.152-15.36 270.016 270.016 0 0 0-37.056-2.304c-24.864 0-47.744 4-68.704 11.84-20.992 7.776-38.432 18.784-52.64 33.6a144.256 144.256 0 0 0-33.632 54.176 207.68 207.68 0 0 0-12.48 70.176c0 27.84 3.968 52.352 12.16 73.568a146.08 146.08 0 0 0 34.176 53.184l0.064 0.416z m-186.112 34.656a122.912 122.912 0 0 0 42.784-21.504c11.2-8.32 20.224-19.296 26.24-31.936 6.56-13.664 9.888-28.704 9.664-43.904 0-22.784-6.272-41.024-18.912-54.72-12.544-13.92-29.664-23.04-51.104-27.36v-2.304c14.4-6.24 26.688-16.448 35.52-29.408 8.384-12.544 12.544-27.008 12.544-43.52 0-14.24-2.944-26.784-9.12-37.6a65.696 65.696 0 0 0-27.936-26.24 117.44 117.44 0 0 0-36.48-12.096A437.312 437.312 0 0 0 526.656 352h-127.552v340.384h143.392c23.84 0 43.52-2.112 59.008-6.4z m-118.112-271.584h7.968c16.544 0 29.472 0.128 38.656 0.352 9.248 0.576 16.864 1.728 23.04 4a26.24 26.24 0 0 1 14.4 13.12c2.656 5.28 4.064 11.072 4.128 16.96 0.16 6.656-1.056 13.248-3.52 19.392a28.064 28.064 0 0 1-15.04 13.696c-7.04 2.912-14.56 4.48-22.208 4.576-9.472 0.32-20.864 0.544-34.24 0.544h-13.184v-72.64z m6.144 215.52h-6.144v-84.8h18.464c12.64 0 24.736 0 36.384 0.256 9.216-0.16 18.432 0.896 27.36 3.2 9.696 2.848 16.544 7.232 20.512 13.12 4 5.92 6.08 14.24 6.08 25.088 0 8.192-1.728 15.488-4.992 21.824-3.232 6.336-9.696 11.392-18.24 15.392-8.544 4-18.24 5.696-28.48 6.272-10.304 0.224-27.392 0.224-51.328 0.224l0.384-0.576z m-378.56-6.016h124.672l23.36 68.416H348.8L224.32 353.728H124.416L0 692.384h87.52l23.488-68.416-0.064-0.032z m62.336-183.552l41.472 121.44h-82.88l41.408-121.44z" }, null, -1 /*
|
|
12154
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$A, _cache[0] || (_cache[0] = [
|
|
12155
|
+
vue.createElementVNode("path", { d: "M787.616 651.36a142.72 142.72 0 0 0 52.864 31.904 205.504 205.504 0 0 0 67.264 10.848 245.76 245.76 0 0 0 38.784-2.4c9.504-1.6 19.36-4 30.208-7.04 8.16-2.24 15.968-5.12 23.36-8.32l23.392-10.816V587.52h-8.736c-3.968 3.424-8.96 7.648-15.104 12.544a190.272 190.272 0 0 1-19.936 13.504 120.32 120.32 0 0 1-27.616 12.544 102.528 102.528 0 0 1-62.72-0.576 80 80 0 0 1-29.824-17.088 89.28 89.28 0 0 1-21.664-32.512c-5.696-13.664-8.64-30.784-8.64-51.296 0-19.744 2.72-36.384 7.968-50.08 5.248-13.664 12.384-24.896 20.992-33.056 9.12-8.832 18.816-14.816 29.632-18.816a101.824 101.824 0 0 1 63.68-0.736c9.408 3.136 18.08 7.04 26.112 11.68 13.024 7.808 25.28 16.768 36.672 26.784H1024v-78.72c-6.08-2.88-13.12-6.08-21.12-9.6a205.984 205.984 0 0 0-57.152-15.36 270.016 270.016 0 0 0-37.056-2.304c-24.864 0-47.744 4-68.704 11.84-20.992 7.776-38.432 18.784-52.64 33.6a144.256 144.256 0 0 0-33.632 54.176 207.68 207.68 0 0 0-12.48 70.176c0 27.84 3.968 52.352 12.16 73.568a146.08 146.08 0 0 0 34.176 53.184l0.064 0.416z m-186.112 34.656a122.912 122.912 0 0 0 42.784-21.504c11.2-8.32 20.224-19.296 26.24-31.936 6.56-13.664 9.888-28.704 9.664-43.904 0-22.784-6.272-41.024-18.912-54.72-12.544-13.92-29.664-23.04-51.104-27.36v-2.304c14.4-6.24 26.688-16.448 35.52-29.408 8.384-12.544 12.544-27.008 12.544-43.52 0-14.24-2.944-26.784-9.12-37.6a65.696 65.696 0 0 0-27.936-26.24 117.44 117.44 0 0 0-36.48-12.096A437.312 437.312 0 0 0 526.656 352h-127.552v340.384h143.392c23.84 0 43.52-2.112 59.008-6.4z m-118.112-271.584h7.968c16.544 0 29.472 0.128 38.656 0.352 9.248 0.576 16.864 1.728 23.04 4a26.24 26.24 0 0 1 14.4 13.12c2.656 5.28 4.064 11.072 4.128 16.96 0.16 6.656-1.056 13.248-3.52 19.392a28.064 28.064 0 0 1-15.04 13.696c-7.04 2.912-14.56 4.48-22.208 4.576-9.472 0.32-20.864 0.544-34.24 0.544h-13.184v-72.64z m6.144 215.52h-6.144v-84.8h18.464c12.64 0 24.736 0 36.384 0.256 9.216-0.16 18.432 0.896 27.36 3.2 9.696 2.848 16.544 7.232 20.512 13.12 4 5.92 6.08 14.24 6.08 25.088 0 8.192-1.728 15.488-4.992 21.824-3.232 6.336-9.696 11.392-18.24 15.392-8.544 4-18.24 5.696-28.48 6.272-10.304 0.224-27.392 0.224-51.328 0.224l0.384-0.576z m-378.56-6.016h124.672l23.36 68.416H348.8L224.32 353.728H124.416L0 692.384h87.52l23.488-68.416-0.064-0.032z m62.336-183.552l41.472 121.44h-82.88l41.408-121.44z" }, null, -1 /* CACHED */)
|
|
12060
12156
|
])))
|
|
12061
12157
|
}
|
|
12062
12158
|
const DisplayInline = /*#__PURE__*/_export_sfc(_sfc_main$T, [['render',_sfc_render$b]]);
|
|
12063
12159
|
|
|
12064
12160
|
const _sfc_main$S = { };
|
|
12065
12161
|
|
|
12066
|
-
const _hoisted_1$
|
|
12162
|
+
const _hoisted_1$z = {
|
|
12067
12163
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12068
12164
|
viewBox: "0 0 1024 1024"
|
|
12069
12165
|
};
|
|
12070
12166
|
|
|
12071
12167
|
function _sfc_render$a(_ctx, _cache) {
|
|
12072
|
-
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
12073
|
-
vue.createElementVNode("path", { d: "M960 128a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H64a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h896z m0 64H64v640h896V192z m-131.936 158.496c65.984 1.824 109.024 32.512 129.184 92.064l-65.952 15.136-1.856-5.664c-9.984-27.52-30.432-42.112-61.376-43.84-46.72 2.784-71.456 35.296-74.208 97.6 1.856 63.2 26.56 96.64 74.24 100.32 37.536-0.928 59.52-23.36 65.92-67.328L960 559.36l-1.792 7.232c-16.96 63.872-60.352 95.84-130.144 95.84-93.44-4.608-142.464-56.8-147.04-156.672 4.576-98.048 53.6-149.792 147.04-155.296z m-568.928 4.128l114.08 302.336H297.6l-22.016-65.984H160.192L138.24 656.96H64l112.672-302.336h82.464z m278.976 0l7.68 0.32c62.816 3.36 96 27.104 99.52 71.136 0 35.744-19.712 59.552-59.104 71.456 42.144 9.184 65.952 32.544 71.456 70.08 0 59.552-37.568 89.344-112.672 89.344h-148.416v-302.336h141.536z m-4.128 173.152H465.28v81.088h67.328c33.92 0 51.296-13.76 52.224-41.248-2.752-25.632-19.68-38.912-50.848-39.84zM217.92 408.224h-1.376l-0.96 7.36c-1.184 7.232-3.168 13.92-5.92 20.128l-34.336 103.04h87.936l-38.464-104.416-2.624-9.024c-1.6-5.888-3.04-11.584-4.256-17.088z m309.184-2.752H465.28v71.456h61.824c29.344-0.928 44.448-13.76 45.376-38.464-0.96-22.016-16.032-32.992-45.376-32.992z" }, null, -1 /*
|
|
12168
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$z, _cache[0] || (_cache[0] = [
|
|
12169
|
+
vue.createElementVNode("path", { d: "M960 128a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H64a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h896z m0 64H64v640h896V192z m-131.936 158.496c65.984 1.824 109.024 32.512 129.184 92.064l-65.952 15.136-1.856-5.664c-9.984-27.52-30.432-42.112-61.376-43.84-46.72 2.784-71.456 35.296-74.208 97.6 1.856 63.2 26.56 96.64 74.24 100.32 37.536-0.928 59.52-23.36 65.92-67.328L960 559.36l-1.792 7.232c-16.96 63.872-60.352 95.84-130.144 95.84-93.44-4.608-142.464-56.8-147.04-156.672 4.576-98.048 53.6-149.792 147.04-155.296z m-568.928 4.128l114.08 302.336H297.6l-22.016-65.984H160.192L138.24 656.96H64l112.672-302.336h82.464z m278.976 0l7.68 0.32c62.816 3.36 96 27.104 99.52 71.136 0 35.744-19.712 59.552-59.104 71.456 42.144 9.184 65.952 32.544 71.456 70.08 0 59.552-37.568 89.344-112.672 89.344h-148.416v-302.336h141.536z m-4.128 173.152H465.28v81.088h67.328c33.92 0 51.296-13.76 52.224-41.248-2.752-25.632-19.68-38.912-50.848-39.84zM217.92 408.224h-1.376l-0.96 7.36c-1.184 7.232-3.168 13.92-5.92 20.128l-34.336 103.04h87.936l-38.464-104.416-2.624-9.024c-1.6-5.888-3.04-11.584-4.256-17.088z m309.184-2.752H465.28v71.456h61.824c29.344-0.928 44.448-13.76 45.376-38.464-0.96-22.016-16.032-32.992-45.376-32.992z" }, null, -1 /* CACHED */)
|
|
12074
12170
|
])))
|
|
12075
12171
|
}
|
|
12076
12172
|
const DisplayInlineBlock = /*#__PURE__*/_export_sfc(_sfc_main$S, [['render',_sfc_render$a]]);
|
|
12077
12173
|
|
|
12078
12174
|
const _sfc_main$R = { };
|
|
12079
12175
|
|
|
12080
|
-
const _hoisted_1$
|
|
12176
|
+
const _hoisted_1$y = {
|
|
12081
12177
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12082
12178
|
viewBox: "0 0 1024 1024"
|
|
12083
12179
|
};
|
|
12084
12180
|
|
|
12085
12181
|
function _sfc_render$9(_ctx, _cache) {
|
|
12086
|
-
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
12087
|
-
vue.createElementVNode("path", { d: "M931.37 477.14c-43.94-69.49-93.39-125.03-147.99-166.35L663.31 441.46c8.79 21.36 13.63 44.91 13.63 69.62 0 96.27-73.84 174.32-164.95 174.32-21.63 0-42.28-4.39-61.32-12.47l-94.09 102.52a455.097 455.097 0 0 0 155.41 26.2c172.62 0 312.43-85.54 419.59-256.63 12.83-20.43 12.72-47.45-0.21-67.88zM795.52 127.99L682.24 252.82C627.73 231 570.1 220.04 512.11 220.5c-171.15 0-310.99 85.66-419.48 256.75-12.93 20.43-13.04 47.33-0.2 67.78 46.95 75.15 100.3 133.68 160.01 175.82L131.9 853.65l38.9 42.36 663.6-725.76-38.88-42.26zM519.68 438.37c-3.72-0.59-7.46-0.81-11.27-0.81-45.63 0-82.43 39.03-82.43 87.16 0 4.97 0.42 9.81 1.14 14.54l-57.15 60.14-5.92 8.33c-13.15-24.94-20.5-53.68-20.5-84.28 0-96.3 73.84-174.45 164.95-174.45 27.2 0 52.76 6.93 75.4 19.29l-64.22 70.08z m52.05 135.53c21.74-23.26 27.17-55.48 16.31-81.39l-96.42 103.16c26.59 9.08 58.38 1.48 80.11-21.77z" }, null, -1 /*
|
|
12182
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$y, _cache[0] || (_cache[0] = [
|
|
12183
|
+
vue.createElementVNode("path", { d: "M931.37 477.14c-43.94-69.49-93.39-125.03-147.99-166.35L663.31 441.46c8.79 21.36 13.63 44.91 13.63 69.62 0 96.27-73.84 174.32-164.95 174.32-21.63 0-42.28-4.39-61.32-12.47l-94.09 102.52a455.097 455.097 0 0 0 155.41 26.2c172.62 0 312.43-85.54 419.59-256.63 12.83-20.43 12.72-47.45-0.21-67.88zM795.52 127.99L682.24 252.82C627.73 231 570.1 220.04 512.11 220.5c-171.15 0-310.99 85.66-419.48 256.75-12.93 20.43-13.04 47.33-0.2 67.78 46.95 75.15 100.3 133.68 160.01 175.82L131.9 853.65l38.9 42.36 663.6-725.76-38.88-42.26zM519.68 438.37c-3.72-0.59-7.46-0.81-11.27-0.81-45.63 0-82.43 39.03-82.43 87.16 0 4.97 0.42 9.81 1.14 14.54l-57.15 60.14-5.92 8.33c-13.15-24.94-20.5-53.68-20.5-84.28 0-96.3 73.84-174.45 164.95-174.45 27.2 0 52.76 6.93 75.4 19.29l-64.22 70.08z m52.05 135.53c21.74-23.26 27.17-55.48 16.31-81.39l-96.42 103.16c26.59 9.08 58.38 1.48 80.11-21.77z" }, null, -1 /* CACHED */)
|
|
12088
12184
|
])))
|
|
12089
12185
|
}
|
|
12090
12186
|
const DisplayNone = /*#__PURE__*/_export_sfc(_sfc_main$R, [['render',_sfc_render$9]]);
|
|
12091
12187
|
|
|
12092
12188
|
const _sfc_main$Q = { };
|
|
12093
12189
|
|
|
12094
|
-
const _hoisted_1$
|
|
12190
|
+
const _hoisted_1$x = {
|
|
12095
12191
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12096
12192
|
viewBox: "0 0 1024 1024"
|
|
12097
12193
|
};
|
|
12098
12194
|
|
|
12099
12195
|
function _sfc_render$8(_ctx, _cache) {
|
|
12100
|
-
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
12101
|
-
vue.createElementVNode("path", { d: "M896 320H128V0h768v320z m0 320H128v-256h768v256z m-128 192l-256 192-256-192 192-0.032V704h128v128h192z" }, null, -1 /*
|
|
12196
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$x, _cache[0] || (_cache[0] = [
|
|
12197
|
+
vue.createElementVNode("path", { d: "M896 320H128V0h768v320z m0 320H128v-256h768v256z m-128 192l-256 192-256-192 192-0.032V704h128v128h192z" }, null, -1 /* CACHED */)
|
|
12102
12198
|
])))
|
|
12103
12199
|
}
|
|
12104
12200
|
const FlexDirectionColumn = /*#__PURE__*/_export_sfc(_sfc_main$Q, [['render',_sfc_render$8]]);
|
|
12105
12201
|
|
|
12106
12202
|
const _sfc_main$P = { };
|
|
12107
12203
|
|
|
12108
|
-
const _hoisted_1$
|
|
12204
|
+
const _hoisted_1$w = {
|
|
12109
12205
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12110
12206
|
viewBox: "0 0 1024 1024"
|
|
12111
12207
|
};
|
|
12112
12208
|
|
|
12113
12209
|
function _sfc_render$7(_ctx, _cache) {
|
|
12114
|
-
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
12115
|
-
vue.createElementVNode("path", { d: "M896 704H128v320h768V704z m0-320H128v256h768v-256z m-128-192l-256-192-256 192 192 0.032V320h128V192h192z" }, null, -1 /*
|
|
12210
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$w, _cache[0] || (_cache[0] = [
|
|
12211
|
+
vue.createElementVNode("path", { d: "M896 704H128v320h768V704z m0-320H128v256h768v-256z m-128-192l-256-192-256 192 192 0.032V320h128V192h192z" }, null, -1 /* CACHED */)
|
|
12116
12212
|
])))
|
|
12117
12213
|
}
|
|
12118
12214
|
const FlexDirectionColumnReverse = /*#__PURE__*/_export_sfc(_sfc_main$P, [['render',_sfc_render$7]]);
|
|
12119
12215
|
|
|
12120
12216
|
const _sfc_main$O = { };
|
|
12121
12217
|
|
|
12122
|
-
const _hoisted_1$
|
|
12218
|
+
const _hoisted_1$v = {
|
|
12123
12219
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12124
12220
|
viewBox: "0 0 1024 1024"
|
|
12125
12221
|
};
|
|
12126
12222
|
|
|
12127
12223
|
function _sfc_render$6(_ctx, _cache) {
|
|
12128
|
-
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
12129
|
-
vue.createElementVNode("path", { d: "M320 128v768H0V128h320z m320 0v768h-256V128h256z m192 128l192 256-192 256-0.032-192H704v-128h128V256z" }, null, -1 /*
|
|
12224
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$v, _cache[0] || (_cache[0] = [
|
|
12225
|
+
vue.createElementVNode("path", { d: "M320 128v768H0V128h320z m320 0v768h-256V128h256z m192 128l192 256-192 256-0.032-192H704v-128h128V256z" }, null, -1 /* CACHED */)
|
|
12130
12226
|
])))
|
|
12131
12227
|
}
|
|
12132
12228
|
const FlexDirectionRow = /*#__PURE__*/_export_sfc(_sfc_main$O, [['render',_sfc_render$6]]);
|
|
12133
12229
|
|
|
12134
12230
|
const _sfc_main$N = { };
|
|
12135
12231
|
|
|
12136
|
-
const _hoisted_1$
|
|
12232
|
+
const _hoisted_1$u = {
|
|
12137
12233
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12138
12234
|
viewBox: "0 0 1024 1024"
|
|
12139
12235
|
};
|
|
12140
12236
|
|
|
12141
12237
|
function _sfc_render$5(_ctx, _cache) {
|
|
12142
|
-
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
12143
|
-
vue.createElementVNode("path", { d: "M704 128v768h320V128H704zM384 128v768h256V128h-256zM192 256l-192 256 192 256 0.032-192H320v-128H192V256z" }, null, -1 /*
|
|
12238
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$u, _cache[0] || (_cache[0] = [
|
|
12239
|
+
vue.createElementVNode("path", { d: "M704 128v768h320V128H704zM384 128v768h256V128h-256zM192 256l-192 256 192 256 0.032-192H320v-128H192V256z" }, null, -1 /* CACHED */)
|
|
12144
12240
|
])))
|
|
12145
12241
|
}
|
|
12146
12242
|
const FlexDirectionRowReverse = /*#__PURE__*/_export_sfc(_sfc_main$N, [['render',_sfc_render$5]]);
|
|
12147
12243
|
|
|
12148
12244
|
const _sfc_main$M = { };
|
|
12149
12245
|
|
|
12150
|
-
const _hoisted_1$
|
|
12246
|
+
const _hoisted_1$t = {
|
|
12151
12247
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12152
12248
|
viewBox: "0 0 1024 1024"
|
|
12153
12249
|
};
|
|
12154
12250
|
|
|
12155
12251
|
function _sfc_render$4(_ctx, _cache) {
|
|
12156
|
-
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
12157
|
-
vue.createElementVNode("path", { d: "M480 1024V0h64v1024h-64z m128-64V64h320v896H608zM96 960V64h320v896H96z" }, null, -1 /*
|
|
12252
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$t, _cache[0] || (_cache[0] = [
|
|
12253
|
+
vue.createElementVNode("path", { d: "M480 1024V0h64v1024h-64z m128-64V64h320v896H608zM96 960V64h320v896H96z" }, null, -1 /* CACHED */)
|
|
12158
12254
|
])))
|
|
12159
12255
|
}
|
|
12160
12256
|
const JustifyContentCenter = /*#__PURE__*/_export_sfc(_sfc_main$M, [['render',_sfc_render$4]]);
|
|
12161
12257
|
|
|
12162
12258
|
const _sfc_main$L = { };
|
|
12163
12259
|
|
|
12164
|
-
const _hoisted_1$
|
|
12260
|
+
const _hoisted_1$s = {
|
|
12165
12261
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12166
12262
|
viewBox: "0 0 1024 1024"
|
|
12167
12263
|
};
|
|
12168
12264
|
|
|
12169
12265
|
function _sfc_render$3(_ctx, _cache) {
|
|
12170
|
-
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
12171
|
-
vue.createElementVNode("path", { d: "M416 160H96v704h320V160z m384 0H480v704h320V160z m128-160h-64v1024h64V0z" }, null, -1 /*
|
|
12266
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$s, _cache[0] || (_cache[0] = [
|
|
12267
|
+
vue.createElementVNode("path", { d: "M416 160H96v704h320V160z m384 0H480v704h320V160z m128-160h-64v1024h64V0z" }, null, -1 /* CACHED */)
|
|
12172
12268
|
])))
|
|
12173
12269
|
}
|
|
12174
12270
|
const JustifyContentFlexEnd = /*#__PURE__*/_export_sfc(_sfc_main$L, [['render',_sfc_render$3]]);
|
|
12175
12271
|
|
|
12176
12272
|
const _sfc_main$K = { };
|
|
12177
12273
|
|
|
12178
|
-
const _hoisted_1$
|
|
12274
|
+
const _hoisted_1$r = {
|
|
12179
12275
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12180
12276
|
viewBox: "0 0 1024 1024"
|
|
12181
12277
|
};
|
|
12182
12278
|
|
|
12183
12279
|
function _sfc_render$2(_ctx, _cache) {
|
|
12184
|
-
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
12185
|
-
vue.createElementVNode("path", { d: "M608 160h320v704H608V160zM224 160h320v704H224V160zM96 0h64v1024H96V0z" }, null, -1 /*
|
|
12280
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$r, _cache[0] || (_cache[0] = [
|
|
12281
|
+
vue.createElementVNode("path", { d: "M608 160h320v704H608V160zM224 160h320v704H224V160zM96 0h64v1024H96V0z" }, null, -1 /* CACHED */)
|
|
12186
12282
|
])))
|
|
12187
12283
|
}
|
|
12188
12284
|
const JustifyContentFlexStart = /*#__PURE__*/_export_sfc(_sfc_main$K, [['render',_sfc_render$2]]);
|
|
12189
12285
|
|
|
12190
12286
|
const _sfc_main$J = { };
|
|
12191
12287
|
|
|
12192
|
-
const _hoisted_1$
|
|
12288
|
+
const _hoisted_1$q = {
|
|
12193
12289
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12194
12290
|
viewBox: "0 0 1024 1024"
|
|
12195
12291
|
};
|
|
12196
12292
|
|
|
12197
12293
|
function _sfc_render$1(_ctx, _cache) {
|
|
12198
|
-
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
12199
|
-
vue.createElementVNode("path", { d: "M320 864H192v160H128v-160H0V160h128V0h64v160h128v704z m704 0h-128v160h-64v-160h-128V160h128V0h64v160h128v704z" }, null, -1 /*
|
|
12294
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$q, _cache[0] || (_cache[0] = [
|
|
12295
|
+
vue.createElementVNode("path", { d: "M320 864H192v160H128v-160H0V160h128V0h64v160h128v704z m704 0h-128v160h-64v-160h-128V160h128V0h64v160h128v704z" }, null, -1 /* CACHED */)
|
|
12200
12296
|
])))
|
|
12201
12297
|
}
|
|
12202
12298
|
const JustifyContentSpaceAround = /*#__PURE__*/_export_sfc(_sfc_main$J, [['render',_sfc_render$1]]);
|
|
12203
12299
|
|
|
12204
12300
|
const _sfc_main$I = { };
|
|
12205
12301
|
|
|
12206
|
-
const _hoisted_1$
|
|
12302
|
+
const _hoisted_1$p = {
|
|
12207
12303
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12208
12304
|
viewBox: "0 0 1024 1024"
|
|
12209
12305
|
};
|
|
12210
12306
|
|
|
12211
12307
|
function _sfc_render(_ctx, _cache) {
|
|
12212
|
-
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
12213
|
-
vue.createElementVNode("path", { d: "M64 1024H0V0h64v1024z m384-160H128V160h320v704z m448 0H576V160h320v704z m128 160h-64V0h64v1024z" }, null, -1 /*
|
|
12308
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$p, _cache[0] || (_cache[0] = [
|
|
12309
|
+
vue.createElementVNode("path", { d: "M64 1024H0V0h64v1024z m384-160H128V160h320v704z m448 0H576V160h320v704z m128 160h-64V0h64v1024z" }, null, -1 /* CACHED */)
|
|
12214
12310
|
])))
|
|
12215
12311
|
}
|
|
12216
12312
|
const JustifyContentSpaceBetween = /*#__PURE__*/_export_sfc(_sfc_main$I, [['render',_sfc_render]]);
|
|
@@ -12398,6 +12494,13 @@
|
|
|
12398
12494
|
setup(__props, { emit: __emit }) {
|
|
12399
12495
|
const props = __props;
|
|
12400
12496
|
const emit = __emit;
|
|
12497
|
+
const positionText = {
|
|
12498
|
+
static: "不定位",
|
|
12499
|
+
relative: "相对定位",
|
|
12500
|
+
absolute: "绝对定位",
|
|
12501
|
+
fixed: "固定定位",
|
|
12502
|
+
sticky: "粘性定位"
|
|
12503
|
+
};
|
|
12401
12504
|
const config = {
|
|
12402
12505
|
items: [
|
|
12403
12506
|
{
|
|
@@ -12407,9 +12510,9 @@
|
|
|
12407
12510
|
type: "data-source-field-select",
|
|
12408
12511
|
fieldConfig: {
|
|
12409
12512
|
type: "select",
|
|
12410
|
-
options:
|
|
12513
|
+
options: Object.keys(positionText).map((item) => ({
|
|
12411
12514
|
value: item,
|
|
12412
|
-
text: item
|
|
12515
|
+
text: `${item}(${positionText[item]})`
|
|
12413
12516
|
}))
|
|
12414
12517
|
}
|
|
12415
12518
|
},
|
|
@@ -12483,7 +12586,7 @@
|
|
|
12483
12586
|
}
|
|
12484
12587
|
});
|
|
12485
12588
|
|
|
12486
|
-
const _hoisted_1$
|
|
12589
|
+
const _hoisted_1$o = { class: "border-box-container" };
|
|
12487
12590
|
const _hoisted_2$a = { class: "border-icon-container" };
|
|
12488
12591
|
const _hoisted_3$3 = { class: "border-icon-container-row" };
|
|
12489
12592
|
const _hoisted_4$3 = { class: "border-icon-container-row" };
|
|
@@ -12542,7 +12645,7 @@
|
|
|
12542
12645
|
});
|
|
12543
12646
|
};
|
|
12544
12647
|
return (_ctx, _cache) => {
|
|
12545
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
12648
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$o, [
|
|
12546
12649
|
vue.createElementVNode("div", _hoisted_2$a, [
|
|
12547
12650
|
vue.createElementVNode("div", _hoisted_3$3, [
|
|
12548
12651
|
vue.createElementVNode(
|
|
@@ -12659,7 +12762,7 @@
|
|
|
12659
12762
|
}
|
|
12660
12763
|
});
|
|
12661
12764
|
|
|
12662
|
-
const _hoisted_1$
|
|
12765
|
+
const _hoisted_1$n = { class: "m-fields-style-setter" };
|
|
12663
12766
|
const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
12664
12767
|
...{
|
|
12665
12768
|
name: "MFieldsStyleSetter"
|
|
@@ -12713,7 +12816,7 @@
|
|
|
12713
12816
|
emit("change", v, eventData);
|
|
12714
12817
|
};
|
|
12715
12818
|
return (_ctx, _cache) => {
|
|
12716
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
12819
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$n, [
|
|
12717
12820
|
vue.createVNode(vue.unref(designPlugin.TMagicCollapse), { "model-value": collapseValue.value }, {
|
|
12718
12821
|
default: vue.withCtx(() => [
|
|
12719
12822
|
(vue.openBlock(), vue.createElementBlock(
|
|
@@ -12755,7 +12858,7 @@
|
|
|
12755
12858
|
}
|
|
12756
12859
|
});
|
|
12757
12860
|
|
|
12758
|
-
const _hoisted_1$
|
|
12861
|
+
const _hoisted_1$m = {
|
|
12759
12862
|
key: 1,
|
|
12760
12863
|
class: "m-fields-ui-select",
|
|
12761
12864
|
style: { "display": "flex" }
|
|
@@ -12851,10 +12954,10 @@
|
|
|
12851
12954
|
default: vue.withCtx(() => _cache[2] || (_cache[2] = [
|
|
12852
12955
|
vue.createTextVNode("取消")
|
|
12853
12956
|
])),
|
|
12854
|
-
_: 1
|
|
12855
|
-
|
|
12957
|
+
_: 1,
|
|
12958
|
+
__: [2]
|
|
12856
12959
|
}, 8, ["icon", "disabled", "size"])
|
|
12857
|
-
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
12960
|
+
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$m, [
|
|
12858
12961
|
val.value ? (vue.openBlock(), vue.createElementBlock(
|
|
12859
12962
|
vue.Fragment,
|
|
12860
12963
|
{ key: 0 },
|
|
@@ -12924,8 +13027,8 @@
|
|
|
12924
13027
|
default: vue.withCtx(() => _cache[3] || (_cache[3] = [
|
|
12925
13028
|
vue.createTextVNode("点击此处选择")
|
|
12926
13029
|
])),
|
|
12927
|
-
_: 1
|
|
12928
|
-
|
|
13030
|
+
_: 1,
|
|
13031
|
+
__: [3]
|
|
12929
13032
|
}, 8, ["disabled", "size"])
|
|
12930
13033
|
]),
|
|
12931
13034
|
_: 1
|
|
@@ -13163,7 +13266,7 @@
|
|
|
13163
13266
|
}
|
|
13164
13267
|
});
|
|
13165
13268
|
|
|
13166
|
-
const _hoisted_1$
|
|
13269
|
+
const _hoisted_1$l = {
|
|
13167
13270
|
key: 1,
|
|
13168
13271
|
class: "menu-item-text"
|
|
13169
13272
|
};
|
|
@@ -13244,7 +13347,7 @@
|
|
|
13244
13347
|
direction: _ctx.data.direction || "vertical"
|
|
13245
13348
|
}, null, 8, ["direction"])) : _ctx.data.type === "text" ? (vue.openBlock(), vue.createElementBlock(
|
|
13246
13349
|
"div",
|
|
13247
|
-
_hoisted_1$
|
|
13350
|
+
_hoisted_1$l,
|
|
13248
13351
|
vue.toDisplayString(_ctx.data.text),
|
|
13249
13352
|
1
|
|
13250
13353
|
/* TEXT */
|
|
@@ -13378,7 +13481,7 @@
|
|
|
13378
13481
|
}
|
|
13379
13482
|
});
|
|
13380
13483
|
|
|
13381
|
-
const _hoisted_1$
|
|
13484
|
+
const _hoisted_1$k = {
|
|
13382
13485
|
key: 0,
|
|
13383
13486
|
id: "m-editor-page-bar-add-icon",
|
|
13384
13487
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon"
|
|
@@ -13406,7 +13509,7 @@
|
|
|
13406
13509
|
editorService.add(pageConfig);
|
|
13407
13510
|
};
|
|
13408
13511
|
return (_ctx, _cache) => {
|
|
13409
|
-
return showAddPageButton.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
13512
|
+
return showAddPageButton.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$k, [
|
|
13410
13513
|
vue.createVNode(vue.unref(designPlugin.TMagicPopover), { "popper-class": "data-source-list-panel-add-menu" }, {
|
|
13411
13514
|
reference: vue.withCtx(() => [
|
|
13412
13515
|
vue.createVNode(_sfc_main$1r, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
|
|
@@ -13439,7 +13542,7 @@
|
|
|
13439
13542
|
}
|
|
13440
13543
|
});
|
|
13441
13544
|
|
|
13442
|
-
const _hoisted_1$
|
|
13545
|
+
const _hoisted_1$j = {
|
|
13443
13546
|
class: "m-editor-page-bar",
|
|
13444
13547
|
ref: "pageBar"
|
|
13445
13548
|
};
|
|
@@ -13479,6 +13582,7 @@
|
|
|
13479
13582
|
});
|
|
13480
13583
|
vue.onMounted(() => {
|
|
13481
13584
|
pageBarEl.value && resizeObserver.observe(pageBarEl.value);
|
|
13585
|
+
itemsContainerEl.value && resizeObserver.observe(itemsContainerEl.value);
|
|
13482
13586
|
});
|
|
13483
13587
|
vue.onBeforeUnmount(() => {
|
|
13484
13588
|
resizeObserver.disconnect();
|
|
@@ -13526,7 +13630,7 @@
|
|
|
13526
13630
|
let beforeDragList = [];
|
|
13527
13631
|
const options = {
|
|
13528
13632
|
...{
|
|
13529
|
-
dataIdAttr: "page-id",
|
|
13633
|
+
dataIdAttr: "data-page-id",
|
|
13530
13634
|
// 获取排序后的数据
|
|
13531
13635
|
onStart: async (event) => {
|
|
13532
13636
|
if (typeof props.pageBarSortOptions?.beforeStart === "function") {
|
|
@@ -13568,7 +13672,7 @@
|
|
|
13568
13672
|
return (_ctx, _cache) => {
|
|
13569
13673
|
return vue.openBlock(), vue.createElementBlock(
|
|
13570
13674
|
"div",
|
|
13571
|
-
_hoisted_1$
|
|
13675
|
+
_hoisted_1$j,
|
|
13572
13676
|
[
|
|
13573
13677
|
vue.renderSlot(_ctx.$slots, "prepend"),
|
|
13574
13678
|
_ctx.length ? (vue.openBlock(), vue.createElementBlock(
|
|
@@ -13602,7 +13706,7 @@
|
|
|
13602
13706
|
}
|
|
13603
13707
|
});
|
|
13604
13708
|
|
|
13605
|
-
const _hoisted_1$
|
|
13709
|
+
const _hoisted_1$i = {
|
|
13606
13710
|
key: 0,
|
|
13607
13711
|
id: "m-editor-page-bar-list-icon",
|
|
13608
13712
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon"
|
|
@@ -13623,7 +13727,7 @@
|
|
|
13623
13727
|
await editorService.select(id);
|
|
13624
13728
|
};
|
|
13625
13729
|
return (_ctx, _cache) => {
|
|
13626
|
-
return showPageListButton.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
13730
|
+
return showPageListButton.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$i, [
|
|
13627
13731
|
vue.createVNode(vue.unref(designPlugin.TMagicPopover), {
|
|
13628
13732
|
"popper-class": "page-bar-popover",
|
|
13629
13733
|
placement: "top",
|
|
@@ -13671,7 +13775,7 @@
|
|
|
13671
13775
|
}
|
|
13672
13776
|
});
|
|
13673
13777
|
|
|
13674
|
-
const _hoisted_1$
|
|
13778
|
+
const _hoisted_1$h = { class: "m-editor-page-bar-item m-editor-page-bar-item-icon m-editor-page-bar-search" };
|
|
13675
13779
|
const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
13676
13780
|
__name: "Search",
|
|
13677
13781
|
props: {
|
|
@@ -13710,7 +13814,7 @@
|
|
|
13710
13814
|
emit("search", values);
|
|
13711
13815
|
};
|
|
13712
13816
|
return (_ctx, _cache) => {
|
|
13713
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
13817
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$h, [
|
|
13714
13818
|
vue.createVNode(_sfc_main$1r, {
|
|
13715
13819
|
icon: vue.unref(iconsVue.Search),
|
|
13716
13820
|
onClick: _cache[0] || (_cache[0] = ($event) => visible.value = !visible.value),
|
|
@@ -13735,7 +13839,7 @@
|
|
|
13735
13839
|
}
|
|
13736
13840
|
});
|
|
13737
13841
|
|
|
13738
|
-
const _hoisted_1$
|
|
13842
|
+
const _hoisted_1$g = { class: "m-editor-page-bar-tabs" };
|
|
13739
13843
|
const _hoisted_2$6 = ["data-page-id", "onClick"];
|
|
13740
13844
|
const _hoisted_3$2 = { class: "m-editor-page-bar-title" };
|
|
13741
13845
|
const _hoisted_4$2 = ["title"];
|
|
@@ -13814,7 +13918,7 @@
|
|
|
13814
13918
|
}
|
|
13815
13919
|
});
|
|
13816
13920
|
return (_ctx, _cache) => {
|
|
13817
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
13921
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$g, [
|
|
13818
13922
|
vue.createVNode(_sfc_main$x, {
|
|
13819
13923
|
ref: "pageBarScrollContainer",
|
|
13820
13924
|
"page-bar-sort-options": _ctx.pageBarSortOptions,
|
|
@@ -13917,7 +14021,7 @@
|
|
|
13917
14021
|
}
|
|
13918
14022
|
});
|
|
13919
14023
|
|
|
13920
|
-
const _hoisted_1$
|
|
14024
|
+
const _hoisted_1$f = { class: "m-editor-empty-panel" };
|
|
13921
14025
|
const _hoisted_2$5 = { class: "m-editor-empty-content" };
|
|
13922
14026
|
const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
13923
14027
|
...{
|
|
@@ -13939,7 +14043,7 @@
|
|
|
13939
14043
|
});
|
|
13940
14044
|
};
|
|
13941
14045
|
return (_ctx, _cache) => {
|
|
13942
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
14046
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, [
|
|
13943
14047
|
vue.createElementVNode("div", _hoisted_2$5, [
|
|
13944
14048
|
vue.createElementVNode("div", {
|
|
13945
14049
|
class: "m-editor-empty-button",
|
|
@@ -13953,7 +14057,7 @@
|
|
|
13953
14057
|
null,
|
|
13954
14058
|
"新增页面",
|
|
13955
14059
|
-1
|
|
13956
|
-
/*
|
|
14060
|
+
/* CACHED */
|
|
13957
14061
|
))
|
|
13958
14062
|
]),
|
|
13959
14063
|
!_ctx.disabledPageFragment ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -13969,7 +14073,7 @@
|
|
|
13969
14073
|
null,
|
|
13970
14074
|
"新增页面片",
|
|
13971
14075
|
-1
|
|
13972
|
-
/*
|
|
14076
|
+
/* CACHED */
|
|
13973
14077
|
))
|
|
13974
14078
|
])) : vue.createCommentVNode("v-if", true)
|
|
13975
14079
|
])
|
|
@@ -13978,7 +14082,7 @@
|
|
|
13978
14082
|
}
|
|
13979
14083
|
});
|
|
13980
14084
|
|
|
13981
|
-
const _hoisted_1$
|
|
14085
|
+
const _hoisted_1$e = {
|
|
13982
14086
|
class: "m-editor",
|
|
13983
14087
|
ref: "content",
|
|
13984
14088
|
style: { "min-width": "900px" }
|
|
@@ -14049,7 +14153,7 @@
|
|
|
14049
14153
|
return (_ctx, _cache) => {
|
|
14050
14154
|
return vue.openBlock(), vue.createElementBlock(
|
|
14051
14155
|
"div",
|
|
14052
|
-
_hoisted_1$
|
|
14156
|
+
_hoisted_1$e,
|
|
14053
14157
|
[
|
|
14054
14158
|
vue.renderSlot(_ctx.$slots, "header"),
|
|
14055
14159
|
vue.renderSlot(_ctx.$slots, "nav"),
|
|
@@ -14343,7 +14447,7 @@
|
|
|
14343
14447
|
}
|
|
14344
14448
|
});
|
|
14345
14449
|
|
|
14346
|
-
const _hoisted_1$
|
|
14450
|
+
const _hoisted_1$d = { class: "m-editor-props-form-panel" };
|
|
14347
14451
|
const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
14348
14452
|
...{
|
|
14349
14453
|
name: "MEditorFormPanel"
|
|
@@ -14358,7 +14462,7 @@
|
|
|
14358
14462
|
labelPosition: {},
|
|
14359
14463
|
extendState: { type: Function }
|
|
14360
14464
|
},
|
|
14361
|
-
emits: ["submit", "submit-error", "form-error", "mounted"],
|
|
14465
|
+
emits: ["submit", "submit-error", "form-error", "mounted", "unmounted"],
|
|
14362
14466
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
14363
14467
|
const props = __props;
|
|
14364
14468
|
const emit = __emit;
|
|
@@ -14380,6 +14484,9 @@
|
|
|
14380
14484
|
vue.onMounted(() => {
|
|
14381
14485
|
emit("mounted", internalInstance?.proxy);
|
|
14382
14486
|
});
|
|
14487
|
+
vue.onUnmounted(() => {
|
|
14488
|
+
emit("unmounted");
|
|
14489
|
+
});
|
|
14383
14490
|
const submit = async (v, eventData) => {
|
|
14384
14491
|
try {
|
|
14385
14492
|
const values = await configFormRef.value?.submitForm();
|
|
@@ -14396,7 +14503,7 @@
|
|
|
14396
14503
|
};
|
|
14397
14504
|
__expose({ configForm: configFormRef, submit });
|
|
14398
14505
|
return (_ctx, _cache) => {
|
|
14399
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
14506
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$d, [
|
|
14400
14507
|
vue.renderSlot(_ctx.$slots, "props-form-panel-header"),
|
|
14401
14508
|
vue.createVNode(vue.unref(designPlugin.TMagicScrollbar), null, {
|
|
14402
14509
|
default: vue.withCtx(() => [
|
|
@@ -14491,7 +14598,7 @@
|
|
|
14491
14598
|
};
|
|
14492
14599
|
};
|
|
14493
14600
|
|
|
14494
|
-
const _hoisted_1$
|
|
14601
|
+
const _hoisted_1$c = {
|
|
14495
14602
|
ref: "propsPanel",
|
|
14496
14603
|
class: "m-editor-props-panel"
|
|
14497
14604
|
};
|
|
@@ -14505,7 +14612,7 @@
|
|
|
14505
14612
|
disabledShowSrc: { type: Boolean },
|
|
14506
14613
|
extendState: { type: Function }
|
|
14507
14614
|
},
|
|
14508
|
-
emits: ["submit-error", "form-error", "mounted"],
|
|
14615
|
+
emits: ["submit-error", "form-error", "mounted", "unmounted"],
|
|
14509
14616
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
14510
14617
|
const emit = __emit;
|
|
14511
14618
|
const { editorService, uiService, propsService, storageService } = useServices();
|
|
@@ -14567,6 +14674,9 @@
|
|
|
14567
14674
|
emit("mounted", propertyFormPanelRef.value);
|
|
14568
14675
|
}
|
|
14569
14676
|
};
|
|
14677
|
+
const unmountedHandler = () => {
|
|
14678
|
+
emit("unmounted");
|
|
14679
|
+
};
|
|
14570
14680
|
const propsPanelEl = vue.useTemplateRef("propsPanel");
|
|
14571
14681
|
const propsPanelWidth = vue.ref(
|
|
14572
14682
|
storageService.getItem(PROPS_PANEL_WIDTH_STORAGE_KEY, { protocol: Protocol.NUMBER }) || 300
|
|
@@ -14608,7 +14718,7 @@
|
|
|
14608
14718
|
return (_ctx, _cache) => {
|
|
14609
14719
|
return vue.withDirectives((vue.openBlock(), vue.createElementBlock(
|
|
14610
14720
|
"div",
|
|
14611
|
-
_hoisted_1$
|
|
14721
|
+
_hoisted_1$c,
|
|
14612
14722
|
[
|
|
14613
14723
|
vue.renderSlot(_ctx.$slots, "props-panel-header"),
|
|
14614
14724
|
vue.createVNode(_sfc_main$q, {
|
|
@@ -14621,7 +14731,8 @@
|
|
|
14621
14731
|
onSubmit: submit,
|
|
14622
14732
|
onSubmitError: errorHandler,
|
|
14623
14733
|
onFormError: errorHandler,
|
|
14624
|
-
onMounted: mountedHandler
|
|
14734
|
+
onMounted: mountedHandler,
|
|
14735
|
+
onUnmounted: unmountedHandler
|
|
14625
14736
|
}, null, 8, ["class", "config", "values", "disabledShowSrc", "extendState"]),
|
|
14626
14737
|
vue.unref(showStylePanel) ? (vue.openBlock(), vue.createBlock(_sfc_main$B, {
|
|
14627
14738
|
key: 0,
|
|
@@ -14647,7 +14758,7 @@
|
|
|
14647
14758
|
null,
|
|
14648
14759
|
"样式",
|
|
14649
14760
|
-1
|
|
14650
|
-
/*
|
|
14761
|
+
/* CACHED */
|
|
14651
14762
|
)),
|
|
14652
14763
|
vue.createElementVNode("div", null, [
|
|
14653
14764
|
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
@@ -14912,7 +15023,7 @@
|
|
|
14912
15023
|
}
|
|
14913
15024
|
});
|
|
14914
15025
|
|
|
14915
|
-
const _hoisted_1$
|
|
15026
|
+
const _hoisted_1$b = ["draggable", "data-node-id", "data-parent-id", "data-parents-id", "data-is-container"];
|
|
14916
15027
|
const _hoisted_2$3 = { class: "tree-node-label" };
|
|
14917
15028
|
const _hoisted_3$1 = { class: "tree-node-tool" };
|
|
14918
15029
|
const _hoisted_4$1 = {
|
|
@@ -15055,14 +15166,14 @@
|
|
|
15055
15166
|
/* KEYED_FRAGMENT */
|
|
15056
15167
|
))
|
|
15057
15168
|
])) : vue.createCommentVNode("v-if", true)
|
|
15058
|
-
], 40, _hoisted_1$
|
|
15169
|
+
], 40, _hoisted_1$b)), [
|
|
15059
15170
|
[vue.vShow, visible.value]
|
|
15060
15171
|
]);
|
|
15061
15172
|
};
|
|
15062
15173
|
}
|
|
15063
15174
|
});
|
|
15064
15175
|
|
|
15065
|
-
const _hoisted_1$
|
|
15176
|
+
const _hoisted_1$a = {
|
|
15066
15177
|
key: 1,
|
|
15067
15178
|
class: "m-editor-tree-empty"
|
|
15068
15179
|
};
|
|
@@ -15119,7 +15230,7 @@
|
|
|
15119
15230
|
}),
|
|
15120
15231
|
128
|
|
15121
15232
|
/* KEYED_FRAGMENT */
|
|
15122
|
-
)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
15233
|
+
)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
|
|
15123
15234
|
vue.createElementVNode(
|
|
15124
15235
|
"p",
|
|
15125
15236
|
null,
|
|
@@ -15382,7 +15493,7 @@
|
|
|
15382
15493
|
};
|
|
15383
15494
|
};
|
|
15384
15495
|
|
|
15385
|
-
const _hoisted_1$
|
|
15496
|
+
const _hoisted_1$9 = { class: "search-wrapper" };
|
|
15386
15497
|
const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
15387
15498
|
...{
|
|
15388
15499
|
name: "MEditorCodeBlockListPanel"
|
|
@@ -15437,7 +15548,7 @@
|
|
|
15437
15548
|
vue.createVNode(vue.unref(designPlugin.TMagicScrollbar), { class: "m-editor-code-block-list m-editor-layer-panel" }, {
|
|
15438
15549
|
default: vue.withCtx(() => [
|
|
15439
15550
|
vue.renderSlot(_ctx.$slots, "code-block-panel-header", {}, () => [
|
|
15440
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
15551
|
+
vue.createElementVNode("div", _hoisted_1$9, [
|
|
15441
15552
|
vue.createVNode(_sfc_main$n, { onSearch: filterTextChangeHandler }),
|
|
15442
15553
|
editable.value ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicButton), {
|
|
15443
15554
|
key: 0,
|
|
@@ -15449,8 +15560,8 @@
|
|
|
15449
15560
|
default: vue.withCtx(() => _cache[0] || (_cache[0] = [
|
|
15450
15561
|
vue.createTextVNode("新增")
|
|
15451
15562
|
])),
|
|
15452
|
-
_: 1
|
|
15453
|
-
|
|
15563
|
+
_: 1,
|
|
15564
|
+
__: [0]
|
|
15454
15565
|
}, 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
|
|
15455
15566
|
vue.renderSlot(_ctx.$slots, "code-block-panel-search")
|
|
15456
15567
|
])
|
|
@@ -15856,7 +15967,7 @@
|
|
|
15856
15967
|
};
|
|
15857
15968
|
};
|
|
15858
15969
|
|
|
15859
|
-
const _hoisted_1$
|
|
15970
|
+
const _hoisted_1$8 = { class: "search-wrapper" };
|
|
15860
15971
|
const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
15861
15972
|
...{
|
|
15862
15973
|
name: "MEditorDataSourceListPanel"
|
|
@@ -15936,7 +16047,7 @@
|
|
|
15936
16047
|
[
|
|
15937
16048
|
vue.createVNode(vue.unref(designPlugin.TMagicScrollbar), { class: "data-source-list-panel m-editor-layer-panel" }, {
|
|
15938
16049
|
default: vue.withCtx(() => [
|
|
15939
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
16050
|
+
vue.createElementVNode("div", _hoisted_1$8, [
|
|
15940
16051
|
vue.createVNode(_sfc_main$n, { onSearch: filterTextChangeHandler }),
|
|
15941
16052
|
vue.unref(editable) ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicPopover), {
|
|
15942
16053
|
key: 0,
|
|
@@ -15953,8 +16064,8 @@
|
|
|
15953
16064
|
default: vue.withCtx(() => _cache[0] || (_cache[0] = [
|
|
15954
16065
|
vue.createTextVNode("新增")
|
|
15955
16066
|
])),
|
|
15956
|
-
_: 1
|
|
15957
|
-
|
|
16067
|
+
_: 1,
|
|
16068
|
+
__: [0]
|
|
15958
16069
|
})
|
|
15959
16070
|
]),
|
|
15960
16071
|
default: vue.withCtx(() => [
|
|
@@ -16021,7 +16132,7 @@
|
|
|
16021
16132
|
}
|
|
16022
16133
|
});
|
|
16023
16134
|
|
|
16024
|
-
const _hoisted_1$
|
|
16135
|
+
const _hoisted_1$7 = {
|
|
16025
16136
|
width: "1em",
|
|
16026
16137
|
height: "1em",
|
|
16027
16138
|
viewBox: "0 0 16 16",
|
|
@@ -16036,7 +16147,7 @@
|
|
|
16036
16147
|
__name: "FolderMinusIcon",
|
|
16037
16148
|
setup(__props) {
|
|
16038
16149
|
return (_ctx, _cache) => {
|
|
16039
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
16150
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$7, _cache[0] || (_cache[0] = [
|
|
16040
16151
|
vue.createElementVNode(
|
|
16041
16152
|
"path",
|
|
16042
16153
|
{
|
|
@@ -16045,7 +16156,7 @@
|
|
|
16045
16156
|
},
|
|
16046
16157
|
null,
|
|
16047
16158
|
-1
|
|
16048
|
-
/*
|
|
16159
|
+
/* CACHED */
|
|
16049
16160
|
),
|
|
16050
16161
|
vue.createElementVNode(
|
|
16051
16162
|
"path",
|
|
@@ -16055,7 +16166,7 @@
|
|
|
16055
16166
|
},
|
|
16056
16167
|
null,
|
|
16057
16168
|
-1
|
|
16058
|
-
/*
|
|
16169
|
+
/* CACHED */
|
|
16059
16170
|
)
|
|
16060
16171
|
]));
|
|
16061
16172
|
};
|
|
@@ -16839,7 +16950,7 @@
|
|
|
16839
16950
|
}
|
|
16840
16951
|
});
|
|
16841
16952
|
|
|
16842
|
-
const _hoisted_1$
|
|
16953
|
+
const _hoisted_1$6 = ["onClick", "onDragstart"];
|
|
16843
16954
|
const _hoisted_2$2 = ["title"];
|
|
16844
16955
|
const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
16845
16956
|
...{
|
|
@@ -16974,7 +17085,7 @@
|
|
|
16974
17085
|
title: item.text
|
|
16975
17086
|
}, vue.toDisplayString(item.text), 9, _hoisted_2$2)
|
|
16976
17087
|
])
|
|
16977
|
-
], 40, _hoisted_1$
|
|
17088
|
+
], 40, _hoisted_1$6);
|
|
16978
17089
|
}),
|
|
16979
17090
|
128
|
|
16980
17091
|
/* KEYED_FRAGMENT */
|
|
@@ -17004,7 +17115,7 @@
|
|
|
17004
17115
|
}
|
|
17005
17116
|
});
|
|
17006
17117
|
|
|
17007
|
-
const _hoisted_1$
|
|
17118
|
+
const _hoisted_1$5 = {
|
|
17008
17119
|
key: 0,
|
|
17009
17120
|
class: "m-editor-sidebar"
|
|
17010
17121
|
};
|
|
@@ -17037,7 +17148,7 @@
|
|
|
17037
17148
|
},
|
|
17038
17149
|
setup(__props, { expose: __expose }) {
|
|
17039
17150
|
const props = __props;
|
|
17040
|
-
const { depService, uiService } = useServices();
|
|
17151
|
+
const { depService, uiService, propsService } = useServices();
|
|
17041
17152
|
const collecting = vue.computed(() => depService.get("collecting"));
|
|
17042
17153
|
const taskLength = vue.computed(() => depService.get("taskLength"));
|
|
17043
17154
|
const tipsBarVisible = vue.ref(true);
|
|
@@ -17112,7 +17223,17 @@
|
|
|
17112
17223
|
};
|
|
17113
17224
|
return typeof data === "string" ? map[data] : data;
|
|
17114
17225
|
};
|
|
17115
|
-
const sideBarItems = vue.computed(
|
|
17226
|
+
const sideBarItems = vue.computed(
|
|
17227
|
+
() => props.data.items.map((item) => getItemConfig(item)).filter((item) => {
|
|
17228
|
+
if (item.$key === SideItemKey.DATA_SOURCE) {
|
|
17229
|
+
return !propsService.getDisabledDataSource();
|
|
17230
|
+
}
|
|
17231
|
+
if (item.$key === SideItemKey.CODE_BLOCK) {
|
|
17232
|
+
return !propsService.getDisabledCodeBlock();
|
|
17233
|
+
}
|
|
17234
|
+
return true;
|
|
17235
|
+
})
|
|
17236
|
+
);
|
|
17116
17237
|
vue.watch(
|
|
17117
17238
|
sideBarItems,
|
|
17118
17239
|
(items) => {
|
|
@@ -17163,7 +17284,7 @@
|
|
|
17163
17284
|
vue.Fragment,
|
|
17164
17285
|
null,
|
|
17165
17286
|
[
|
|
17166
|
-
_ctx.data.type === "tabs" && _ctx.data.items.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
17287
|
+
_ctx.data.type === "tabs" && _ctx.data.items.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, [
|
|
17167
17288
|
vue.createElementVNode("div", _hoisted_2$1, [
|
|
17168
17289
|
(vue.openBlock(true), vue.createElementBlock(
|
|
17169
17290
|
vue.Fragment,
|
|
@@ -17517,7 +17638,7 @@
|
|
|
17517
17638
|
}
|
|
17518
17639
|
});
|
|
17519
17640
|
|
|
17520
|
-
const _hoisted_1$
|
|
17641
|
+
const _hoisted_1$4 = {
|
|
17521
17642
|
class: "m-editor-scroll-viewer-container",
|
|
17522
17643
|
ref: "container"
|
|
17523
17644
|
};
|
|
@@ -17596,7 +17717,7 @@
|
|
|
17596
17717
|
return (_ctx, _cache) => {
|
|
17597
17718
|
return vue.openBlock(), vue.createElementBlock(
|
|
17598
17719
|
"div",
|
|
17599
|
-
_hoisted_1$
|
|
17720
|
+
_hoisted_1$4,
|
|
17600
17721
|
[
|
|
17601
17722
|
vue.createElementVNode(
|
|
17602
17723
|
"div",
|
|
@@ -17750,19 +17871,25 @@
|
|
|
17750
17871
|
}
|
|
17751
17872
|
});
|
|
17752
17873
|
|
|
17874
|
+
const _hoisted_1$3 = {
|
|
17875
|
+
key: 0,
|
|
17876
|
+
class: "m-editor-stage-overlay"
|
|
17877
|
+
};
|
|
17753
17878
|
const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
17754
17879
|
__name: "StageOverlay",
|
|
17755
17880
|
setup(__props) {
|
|
17756
|
-
const { stageOverlayService, editorService } = useServices();
|
|
17881
|
+
const { stageOverlayService, editorService, uiService } = useServices();
|
|
17757
17882
|
const stageOptions = vue.inject("stageOptions");
|
|
17758
17883
|
const stageOverlayEl = vue.useTemplateRef("stageOverlay");
|
|
17759
17884
|
const stageOverlayVisible = vue.computed(() => stageOverlayService.get("stageOverlayVisible"));
|
|
17760
17885
|
const wrapWidth = vue.computed(() => stageOverlayService.get("wrapWidth"));
|
|
17761
17886
|
const wrapHeight = vue.computed(() => stageOverlayService.get("wrapHeight"));
|
|
17762
17887
|
const stage = vue.computed(() => editorService.get("stage"));
|
|
17888
|
+
const zoom = vue.computed(() => uiService.get("zoom"));
|
|
17889
|
+
const columnWidth = vue.computed(() => uiService.get("columnWidth"));
|
|
17890
|
+
const frameworkRect = vue.computed(() => uiService.get("frameworkRect"));
|
|
17763
17891
|
const style = vue.computed(() => ({
|
|
17764
|
-
|
|
17765
|
-
height: `${wrapHeight.value}px`
|
|
17892
|
+
transform: `scale(${zoom.value})`
|
|
17766
17893
|
}));
|
|
17767
17894
|
vue.watch(stage, (stage2) => {
|
|
17768
17895
|
if (stage2) {
|
|
@@ -17774,6 +17901,11 @@
|
|
|
17774
17901
|
stageOverlayService.closeOverlay();
|
|
17775
17902
|
}
|
|
17776
17903
|
});
|
|
17904
|
+
vue.watch(zoom, (zoom2) => {
|
|
17905
|
+
const stage2 = stageOverlayService.get("stage");
|
|
17906
|
+
if (!stage2 || !zoom2) return;
|
|
17907
|
+
stage2.setZoom(zoom2);
|
|
17908
|
+
});
|
|
17777
17909
|
vue.watch(stageOverlayEl, (stageOverlay) => {
|
|
17778
17910
|
const subStage = stageOverlayService.createStage(stageOptions);
|
|
17779
17911
|
stageOverlayService.set("stage", subStage);
|
|
@@ -17794,14 +17926,10 @@
|
|
|
17794
17926
|
stageOverlayService.closeOverlay();
|
|
17795
17927
|
};
|
|
17796
17928
|
return (_ctx, _cache) => {
|
|
17797
|
-
return stageOverlayVisible.value ? (vue.openBlock(), vue.createElementBlock("div",
|
|
17798
|
-
key: 0,
|
|
17799
|
-
class: "m-editor-stage-overlay",
|
|
17800
|
-
onClick: closeOverlayHandler
|
|
17801
|
-
}, [
|
|
17929
|
+
return stageOverlayVisible.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [
|
|
17802
17930
|
vue.createVNode(vue.unref(designPlugin.TMagicIcon), {
|
|
17803
17931
|
class: "m-editor-stage-overlay-close",
|
|
17804
|
-
size: "
|
|
17932
|
+
size: "30",
|
|
17805
17933
|
onClick: closeOverlayHandler
|
|
17806
17934
|
}, {
|
|
17807
17935
|
default: vue.withCtx(() => [
|
|
@@ -17810,19 +17938,30 @@
|
|
|
17810
17938
|
_: 1
|
|
17811
17939
|
/* STABLE */
|
|
17812
17940
|
}),
|
|
17813
|
-
vue.
|
|
17814
|
-
"
|
|
17815
|
-
|
|
17816
|
-
|
|
17817
|
-
|
|
17818
|
-
|
|
17819
|
-
|
|
17820
|
-
|
|
17821
|
-
|
|
17822
|
-
|
|
17823
|
-
|
|
17824
|
-
|
|
17825
|
-
|
|
17941
|
+
vue.createVNode(_sfc_main$8, {
|
|
17942
|
+
class: "m-editor-stage",
|
|
17943
|
+
width: wrapWidth.value,
|
|
17944
|
+
height: wrapHeight.value,
|
|
17945
|
+
"wrap-width": columnWidth.value.center,
|
|
17946
|
+
"wrap-height": frameworkRect.value.height,
|
|
17947
|
+
zoom: zoom.value
|
|
17948
|
+
}, {
|
|
17949
|
+
default: vue.withCtx(() => [
|
|
17950
|
+
vue.createElementVNode(
|
|
17951
|
+
"div",
|
|
17952
|
+
{
|
|
17953
|
+
ref: "stageOverlay",
|
|
17954
|
+
class: "m-editor-stage-container",
|
|
17955
|
+
style: vue.normalizeStyle(style.value)
|
|
17956
|
+
},
|
|
17957
|
+
null,
|
|
17958
|
+
4
|
|
17959
|
+
/* STYLE */
|
|
17960
|
+
)
|
|
17961
|
+
]),
|
|
17962
|
+
_: 1
|
|
17963
|
+
/* STABLE */
|
|
17964
|
+
}, 8, ["width", "height", "wrap-width", "wrap-height", "zoom"])
|
|
17826
17965
|
])) : vue.createCommentVNode("v-if", true);
|
|
17827
17966
|
};
|
|
17828
17967
|
}
|
|
@@ -17852,7 +17991,7 @@
|
|
|
17852
17991
|
},
|
|
17853
17992
|
null,
|
|
17854
17993
|
-1
|
|
17855
|
-
/*
|
|
17994
|
+
/* CACHED */
|
|
17856
17995
|
),
|
|
17857
17996
|
vue.createElementVNode(
|
|
17858
17997
|
"path",
|
|
@@ -17865,7 +18004,7 @@
|
|
|
17865
18004
|
},
|
|
17866
18005
|
null,
|
|
17867
18006
|
-1
|
|
17868
|
-
/*
|
|
18007
|
+
/* CACHED */
|
|
17869
18008
|
),
|
|
17870
18009
|
vue.createElementVNode(
|
|
17871
18010
|
"path",
|
|
@@ -17878,7 +18017,7 @@
|
|
|
17878
18017
|
},
|
|
17879
18018
|
null,
|
|
17880
18019
|
-1
|
|
17881
|
-
/*
|
|
18020
|
+
/* CACHED */
|
|
17882
18021
|
)
|
|
17883
18022
|
]));
|
|
17884
18023
|
};
|
|
@@ -18055,11 +18194,6 @@
|
|
|
18055
18194
|
}
|
|
18056
18195
|
stage.on("runtime-ready", (rt) => {
|
|
18057
18196
|
runtime = rt;
|
|
18058
|
-
root.value && runtime?.updateRootConfig?.(cloneDeep(vue.toRaw(root.value)));
|
|
18059
|
-
page.value?.id && runtime?.updatePageId?.(page.value.id);
|
|
18060
|
-
setTimeout(() => {
|
|
18061
|
-
node.value && stage?.select(vue.toRaw(node.value.id));
|
|
18062
|
-
});
|
|
18063
18197
|
});
|
|
18064
18198
|
});
|
|
18065
18199
|
vue.onBeforeUnmount(() => {
|
|
@@ -18082,17 +18216,23 @@
|
|
|
18082
18216
|
timeoutId = null;
|
|
18083
18217
|
}, 3e3);
|
|
18084
18218
|
runtime.updatePageId?.(page2.id);
|
|
18085
|
-
vue.
|
|
18086
|
-
|
|
18087
|
-
|
|
18219
|
+
const unWatch = vue.watch(
|
|
18220
|
+
stageLoading,
|
|
18221
|
+
() => {
|
|
18222
|
+
if (stageLoading.value) {
|
|
18223
|
+
return;
|
|
18224
|
+
}
|
|
18225
|
+
vue.nextTick(() => {
|
|
18226
|
+
stage?.select(page2.id);
|
|
18227
|
+
unWatch();
|
|
18228
|
+
});
|
|
18229
|
+
},
|
|
18230
|
+
{
|
|
18231
|
+
immediate: true
|
|
18232
|
+
}
|
|
18233
|
+
);
|
|
18088
18234
|
}
|
|
18089
18235
|
});
|
|
18090
|
-
const rootChangeHandler = (root2) => {
|
|
18091
|
-
if (runtime && root2) {
|
|
18092
|
-
runtime.updateRootConfig?.(cloneDeep(vue.toRaw(root2)));
|
|
18093
|
-
}
|
|
18094
|
-
};
|
|
18095
|
-
editorService.on("root-change", rootChangeHandler);
|
|
18096
18236
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
18097
18237
|
for (const { contentRect } of entries) {
|
|
18098
18238
|
uiService.set("stageContainerRect", {
|
|
@@ -18109,10 +18249,10 @@
|
|
|
18109
18249
|
});
|
|
18110
18250
|
vue.onBeforeUnmount(() => {
|
|
18111
18251
|
stage?.destroy();
|
|
18252
|
+
stage = null;
|
|
18112
18253
|
resizeObserver.disconnect();
|
|
18113
18254
|
editorService.set("stage", null);
|
|
18114
18255
|
keybindingService.unregisterEl("stage");
|
|
18115
|
-
editorService.off("root-change", rootChangeHandler);
|
|
18116
18256
|
});
|
|
18117
18257
|
const parseDSL = getEditorConfig("parseDSL");
|
|
18118
18258
|
const contextmenuHandler = (e) => {
|
|
@@ -18188,7 +18328,7 @@
|
|
|
18188
18328
|
width: 60,
|
|
18189
18329
|
height: 50
|
|
18190
18330
|
},
|
|
18191
|
-
onClick: _cache[0] || (_cache[0] = ($event) =>
|
|
18331
|
+
onClick: _cache[0] || (_cache[0] = ($event) => stageWrapRef.value?.container?.focus())
|
|
18192
18332
|
}, {
|
|
18193
18333
|
content: vue.withCtx(() => [
|
|
18194
18334
|
!_ctx.disabledStageOverlay ? (vue.openBlock(), vue.createBlock(_sfc_main$6, { key: 0 })) : vue.createCommentVNode("v-if", true),
|
|
@@ -18746,33 +18886,1074 @@
|
|
|
18746
18886
|
}
|
|
18747
18887
|
const dataSourceService = new DataSource();
|
|
18748
18888
|
|
|
18749
|
-
const jsContent = "(function () {\n 'use strict';\n\n var events = {exports: {}};\n\n var hasRequiredEvents;\n\n function requireEvents () {\n \tif (hasRequiredEvents) return events.exports;\n \thasRequiredEvents = 1;\n\n \tvar R = typeof Reflect === 'object' ? Reflect : null;\n \tvar ReflectApply = R && typeof R.apply === 'function'\n \t ? R.apply\n \t : function ReflectApply(target, receiver, args) {\n \t return Function.prototype.apply.call(target, receiver, args);\n \t };\n\n \tvar ReflectOwnKeys;\n \tif (R && typeof R.ownKeys === 'function') {\n \t ReflectOwnKeys = R.ownKeys;\n \t} else if (Object.getOwnPropertySymbols) {\n \t ReflectOwnKeys = function ReflectOwnKeys(target) {\n \t return Object.getOwnPropertyNames(target)\n \t .concat(Object.getOwnPropertySymbols(target));\n \t };\n \t} else {\n \t ReflectOwnKeys = function ReflectOwnKeys(target) {\n \t return Object.getOwnPropertyNames(target);\n \t };\n \t}\n\n \tfunction ProcessEmitWarning(warning) {\n \t if (console && console.warn) console.warn(warning);\n \t}\n\n \tvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n \t return value !== value;\n \t};\n\n \tfunction EventEmitter() {\n \t EventEmitter.init.call(this);\n \t}\n \tevents.exports = EventEmitter;\n \tevents.exports.once = once;\n\n \t// Backwards-compat with node 0.10.x\n \tEventEmitter.EventEmitter = EventEmitter;\n\n \tEventEmitter.prototype._events = undefined;\n \tEventEmitter.prototype._eventsCount = 0;\n \tEventEmitter.prototype._maxListeners = undefined;\n\n \t// By default EventEmitters will print a warning if more than 10 listeners are\n \t// added to it. This is a useful default which helps finding memory leaks.\n \tvar defaultMaxListeners = 10;\n\n \tfunction checkListener(listener) {\n \t if (typeof listener !== 'function') {\n \t throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n \t }\n \t}\n\n \tObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n \t enumerable: true,\n \t get: function() {\n \t return defaultMaxListeners;\n \t },\n \t set: function(arg) {\n \t if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n \t throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n \t }\n \t defaultMaxListeners = arg;\n \t }\n \t});\n\n \tEventEmitter.init = function() {\n\n \t if (this._events === undefined ||\n \t this._events === Object.getPrototypeOf(this)._events) {\n \t this._events = Object.create(null);\n \t this._eventsCount = 0;\n \t }\n\n \t this._maxListeners = this._maxListeners || undefined;\n \t};\n\n \t// Obviously not all Emitters should be limited to 10. This function allows\n \t// that to be increased. Set to zero for unlimited.\n \tEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n \t if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n \t throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n \t }\n \t this._maxListeners = n;\n \t return this;\n \t};\n\n \tfunction _getMaxListeners(that) {\n \t if (that._maxListeners === undefined)\n \t return EventEmitter.defaultMaxListeners;\n \t return that._maxListeners;\n \t}\n\n \tEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n \t return _getMaxListeners(this);\n \t};\n\n \tEventEmitter.prototype.emit = function emit(type) {\n \t var args = [];\n \t for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n \t var doError = (type === 'error');\n\n \t var events = this._events;\n \t if (events !== undefined)\n \t doError = (doError && events.error === undefined);\n \t else if (!doError)\n \t return false;\n\n \t // If there is no 'error' event listener then throw.\n \t if (doError) {\n \t var er;\n \t if (args.length > 0)\n \t er = args[0];\n \t if (er instanceof Error) {\n \t // Note: The comments on the `throw` lines are intentional, they show\n \t // up in Node's output if this results in an unhandled exception.\n \t throw er; // Unhandled 'error' event\n \t }\n \t // At least give some kind of context to the user\n \t var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n \t err.context = er;\n \t throw err; // Unhandled 'error' event\n \t }\n\n \t var handler = events[type];\n\n \t if (handler === undefined)\n \t return false;\n\n \t if (typeof handler === 'function') {\n \t ReflectApply(handler, this, args);\n \t } else {\n \t var len = handler.length;\n \t var listeners = arrayClone(handler, len);\n \t for (var i = 0; i < len; ++i)\n \t ReflectApply(listeners[i], this, args);\n \t }\n\n \t return true;\n \t};\n\n \tfunction _addListener(target, type, listener, prepend) {\n \t var m;\n \t var events;\n \t var existing;\n\n \t checkListener(listener);\n\n \t events = target._events;\n \t if (events === undefined) {\n \t events = target._events = Object.create(null);\n \t target._eventsCount = 0;\n \t } else {\n \t // To avoid recursion in the case that type === \"newListener\"! Before\n \t // adding it to the listeners, first emit \"newListener\".\n \t if (events.newListener !== undefined) {\n \t target.emit('newListener', type,\n \t listener.listener ? listener.listener : listener);\n\n \t // Re-assign `events` because a newListener handler could have caused the\n \t // this._events to be assigned to a new object\n \t events = target._events;\n \t }\n \t existing = events[type];\n \t }\n\n \t if (existing === undefined) {\n \t // Optimize the case of one listener. Don't need the extra array object.\n \t existing = events[type] = listener;\n \t ++target._eventsCount;\n \t } else {\n \t if (typeof existing === 'function') {\n \t // Adding the second element, need to change to array.\n \t existing = events[type] =\n \t prepend ? [listener, existing] : [existing, listener];\n \t // If we've already got an array, just append.\n \t } else if (prepend) {\n \t existing.unshift(listener);\n \t } else {\n \t existing.push(listener);\n \t }\n\n \t // Check for listener leak\n \t m = _getMaxListeners(target);\n \t if (m > 0 && existing.length > m && !existing.warned) {\n \t existing.warned = true;\n \t // No error code for this since it is a Warning\n \t // eslint-disable-next-line no-restricted-syntax\n \t var w = new Error('Possible EventEmitter memory leak detected. ' +\n \t existing.length + ' ' + String(type) + ' listeners ' +\n \t 'added. Use emitter.setMaxListeners() to ' +\n \t 'increase limit');\n \t w.name = 'MaxListenersExceededWarning';\n \t w.emitter = target;\n \t w.type = type;\n \t w.count = existing.length;\n \t ProcessEmitWarning(w);\n \t }\n \t }\n\n \t return target;\n \t}\n\n \tEventEmitter.prototype.addListener = function addListener(type, listener) {\n \t return _addListener(this, type, listener, false);\n \t};\n\n \tEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\n \tEventEmitter.prototype.prependListener =\n \t function prependListener(type, listener) {\n \t return _addListener(this, type, listener, true);\n \t };\n\n \tfunction onceWrapper() {\n \t if (!this.fired) {\n \t this.target.removeListener(this.type, this.wrapFn);\n \t this.fired = true;\n \t if (arguments.length === 0)\n \t return this.listener.call(this.target);\n \t return this.listener.apply(this.target, arguments);\n \t }\n \t}\n\n \tfunction _onceWrap(target, type, listener) {\n \t var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n \t var wrapped = onceWrapper.bind(state);\n \t wrapped.listener = listener;\n \t state.wrapFn = wrapped;\n \t return wrapped;\n \t}\n\n \tEventEmitter.prototype.once = function once(type, listener) {\n \t checkListener(listener);\n \t this.on(type, _onceWrap(this, type, listener));\n \t return this;\n \t};\n\n \tEventEmitter.prototype.prependOnceListener =\n \t function prependOnceListener(type, listener) {\n \t checkListener(listener);\n \t this.prependListener(type, _onceWrap(this, type, listener));\n \t return this;\n \t };\n\n \t// Emits a 'removeListener' event if and only if the listener was removed.\n \tEventEmitter.prototype.removeListener =\n \t function removeListener(type, listener) {\n \t var list, events, position, i, originalListener;\n\n \t checkListener(listener);\n\n \t events = this._events;\n \t if (events === undefined)\n \t return this;\n\n \t list = events[type];\n \t if (list === undefined)\n \t return this;\n\n \t if (list === listener || list.listener === listener) {\n \t if (--this._eventsCount === 0)\n \t this._events = Object.create(null);\n \t else {\n \t delete events[type];\n \t if (events.removeListener)\n \t this.emit('removeListener', type, list.listener || listener);\n \t }\n \t } else if (typeof list !== 'function') {\n \t position = -1;\n\n \t for (i = list.length - 1; i >= 0; i--) {\n \t if (list[i] === listener || list[i].listener === listener) {\n \t originalListener = list[i].listener;\n \t position = i;\n \t break;\n \t }\n \t }\n\n \t if (position < 0)\n \t return this;\n\n \t if (position === 0)\n \t list.shift();\n \t else {\n \t spliceOne(list, position);\n \t }\n\n \t if (list.length === 1)\n \t events[type] = list[0];\n\n \t if (events.removeListener !== undefined)\n \t this.emit('removeListener', type, originalListener || listener);\n \t }\n\n \t return this;\n \t };\n\n \tEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\n \tEventEmitter.prototype.removeAllListeners =\n \t function removeAllListeners(type) {\n \t var listeners, events, i;\n\n \t events = this._events;\n \t if (events === undefined)\n \t return this;\n\n \t // not listening for removeListener, no need to emit\n \t if (events.removeListener === undefined) {\n \t if (arguments.length === 0) {\n \t this._events = Object.create(null);\n \t this._eventsCount = 0;\n \t } else if (events[type] !== undefined) {\n \t if (--this._eventsCount === 0)\n \t this._events = Object.create(null);\n \t else\n \t delete events[type];\n \t }\n \t return this;\n \t }\n\n \t // emit removeListener for all listeners on all events\n \t if (arguments.length === 0) {\n \t var keys = Object.keys(events);\n \t var key;\n \t for (i = 0; i < keys.length; ++i) {\n \t key = keys[i];\n \t if (key === 'removeListener') continue;\n \t this.removeAllListeners(key);\n \t }\n \t this.removeAllListeners('removeListener');\n \t this._events = Object.create(null);\n \t this._eventsCount = 0;\n \t return this;\n \t }\n\n \t listeners = events[type];\n\n \t if (typeof listeners === 'function') {\n \t this.removeListener(type, listeners);\n \t } else if (listeners !== undefined) {\n \t // LIFO order\n \t for (i = listeners.length - 1; i >= 0; i--) {\n \t this.removeListener(type, listeners[i]);\n \t }\n \t }\n\n \t return this;\n \t };\n\n \tfunction _listeners(target, type, unwrap) {\n \t var events = target._events;\n\n \t if (events === undefined)\n \t return [];\n\n \t var evlistener = events[type];\n \t if (evlistener === undefined)\n \t return [];\n\n \t if (typeof evlistener === 'function')\n \t return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n \t return unwrap ?\n \t unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n \t}\n\n \tEventEmitter.prototype.listeners = function listeners(type) {\n \t return _listeners(this, type, true);\n \t};\n\n \tEventEmitter.prototype.rawListeners = function rawListeners(type) {\n \t return _listeners(this, type, false);\n \t};\n\n \tEventEmitter.listenerCount = function(emitter, type) {\n \t if (typeof emitter.listenerCount === 'function') {\n \t return emitter.listenerCount(type);\n \t } else {\n \t return listenerCount.call(emitter, type);\n \t }\n \t};\n\n \tEventEmitter.prototype.listenerCount = listenerCount;\n \tfunction listenerCount(type) {\n \t var events = this._events;\n\n \t if (events !== undefined) {\n \t var evlistener = events[type];\n\n \t if (typeof evlistener === 'function') {\n \t return 1;\n \t } else if (evlistener !== undefined) {\n \t return evlistener.length;\n \t }\n \t }\n\n \t return 0;\n \t}\n\n \tEventEmitter.prototype.eventNames = function eventNames() {\n \t return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n \t};\n\n \tfunction arrayClone(arr, n) {\n \t var copy = new Array(n);\n \t for (var i = 0; i < n; ++i)\n \t copy[i] = arr[i];\n \t return copy;\n \t}\n\n \tfunction spliceOne(list, index) {\n \t for (; index + 1 < list.length; index++)\n \t list[index] = list[index + 1];\n \t list.pop();\n \t}\n\n \tfunction unwrapListeners(arr) {\n \t var ret = new Array(arr.length);\n \t for (var i = 0; i < ret.length; ++i) {\n \t ret[i] = arr[i].listener || arr[i];\n \t }\n \t return ret;\n \t}\n\n \tfunction once(emitter, name) {\n \t return new Promise(function (resolve, reject) {\n \t function errorListener(err) {\n \t emitter.removeListener(name, resolver);\n \t reject(err);\n \t }\n\n \t function resolver() {\n \t if (typeof emitter.removeListener === 'function') {\n \t emitter.removeListener('error', errorListener);\n \t }\n \t resolve([].slice.call(arguments));\n \t }\n \t eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n \t if (name !== 'error') {\n \t addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n \t }\n \t });\n \t}\n\n \tfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n \t if (typeof emitter.on === 'function') {\n \t eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n \t }\n \t}\n\n \tfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n \t if (typeof emitter.on === 'function') {\n \t if (flags.once) {\n \t emitter.once(name, listener);\n \t } else {\n \t emitter.on(name, listener);\n \t }\n \t } else if (typeof emitter.addEventListener === 'function') {\n \t // EventTarget does not have `error` event semantics like Node\n \t // EventEmitters, we do not listen for `error` events here.\n \t emitter.addEventListener(name, function wrapListener(arg) {\n \t // IE does not have builtin `{ once: true }` support so we\n \t // have to do it manually.\n \t if (flags.once) {\n \t emitter.removeEventListener(name, wrapListener);\n \t }\n \t listener(arg);\n \t });\n \t } else {\n \t throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n \t }\n \t}\n \treturn events.exports;\n }\n\n requireEvents();\n\n /*! *****************************************************************************\r\n Copyright (c) Microsoft Corporation.\r\n\r\n Permission to use, copy, modify, and/or distribute this software for any\r\n purpose with or without fee is hereby granted.\r\n\r\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\n AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\n LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\n OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\n PERFORMANCE OF THIS SOFTWARE.\r\n ***************************************************************************** */\r\n\r\n\n let cachedTextEncoder = new TextEncoder(\"utf-8\");\n\n typeof cachedTextEncoder.encodeInto === \"function\"\n ? function (arg, view) {\n return cachedTextEncoder.encodeInto(arg, view);\n }\n : function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length,\n };\n };\n\n const NODE_CONDS_KEY = \"displayConds\";\n var HookType = /* @__PURE__ */ ((HookType2) => {\n HookType2[\"CODE\"] = \"code\";\n return HookType2;\n })(HookType || {});\n\n const isObject = (obj) => Object.prototype.toString.call(obj) === \"[object Object]\";\n const getKeysArray = (keys) => (\n // 将 array[0] 转成 array.0\n `${keys}`.replaceAll(/\\[(\\d+)\\]/g, \".$1\").split(\".\")\n );\n const DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX = \"ds-field::\";\n const dataSourceTemplateRegExp = /\\$\\{([\\s\\S]+?)\\}/g;\n\n var DepTargetType = /* @__PURE__ */ ((DepTargetType2) => {\n DepTargetType2[\"DEFAULT\"] = \"default\";\n DepTargetType2[\"CODE_BLOCK\"] = \"code-block\";\n DepTargetType2[\"DATA_SOURCE\"] = \"data-source\";\n DepTargetType2[\"DATA_SOURCE_METHOD\"] = \"data-source-method\";\n DepTargetType2[\"DATA_SOURCE_COND\"] = \"data-source-cond\";\n return DepTargetType2;\n })(DepTargetType || {});\n\n class Target {\n /**\n * 如何识别目标\n */\n isTarget;\n /**\n * 目标id,不可重复\n * 例如目标是代码块,则为代码块id\n */\n id;\n /**\n * 目标名称,用于显示在依赖列表中\n */\n name;\n /**\n * 不同的目标可以进行分类,例如代码块,数据源可以为两个不同的type\n */\n type = DepTargetType.DEFAULT;\n /**\n * 依赖详情\n * 实例:{ 'node_id': { name: 'node_name', keys: [ created, mounted ] } }\n */\n deps = {};\n /**\n * 是否默认收集,默认为true,当值为false时需要传入type参数给collect方法才会被收集\n */\n isCollectByDefault;\n constructor(options) {\n this.isTarget = options.isTarget;\n this.id = options.id;\n this.name = options.name;\n this.isCollectByDefault = options.isCollectByDefault ?? true;\n if (options.type) {\n this.type = options.type;\n }\n if (options.initialDeps) {\n this.deps = options.initialDeps;\n }\n }\n /**\n * 更新依赖\n * @param option 节点配置\n * @param key 哪个key配置了这个目标的id\n */\n updateDep({ id, name, key, data }) {\n const dep = this.deps[id] || {\n name,\n keys: []\n };\n dep.name = name;\n dep.data = data;\n this.deps[id] = dep;\n if (dep.keys.indexOf(key) === -1) {\n dep.keys.push(key);\n }\n }\n /**\n * 删除依赖\n * @param node 哪个节点的依赖需要移除,如果为空,则移除所有依赖\n * @param key 节点下哪个key需要移除,如果为空,则移除改节点下的所有依赖key\n * @returns void\n */\n removeDep(id, key) {\n if (typeof id === \"undefined\") {\n Object.keys(this.deps).forEach((depKey) => {\n delete this.deps[depKey];\n });\n return;\n }\n const dep = this.deps[id];\n if (!dep) return;\n if (key) {\n const index = dep.keys.indexOf(key);\n dep.keys.splice(index, 1);\n if (dep.keys.length === 0) {\n delete this.deps[id];\n }\n } else {\n delete this.deps[id];\n }\n }\n /**\n * 判断指定节点下的指定key是否存在在依赖列表中\n * @param node 哪个节点\n * @param key 哪个key\n * @returns boolean\n */\n hasDep(id, key) {\n const dep = this.deps[id];\n return Boolean(dep?.keys.find((d) => d === key));\n }\n destroy() {\n this.deps = {};\n }\n }\n\n const createCodeBlockTarget = (id, codeBlock, initialDeps = {}) => new Target({\n type: DepTargetType.CODE_BLOCK,\n id,\n initialDeps,\n name: codeBlock.name,\n isTarget: (_key, value) => {\n if (id === value) {\n return true;\n }\n if (value?.hookType === HookType.CODE && Array.isArray(value.hookData)) {\n const index = value.hookData.findIndex((item) => item.codeId === id);\n return Boolean(index > -1);\n }\n return false;\n }\n });\n const isIncludeArrayField = (keys, fields) => {\n let f = fields;\n return keys.some((key, index) => {\n const field = f.find(({ name }) => name === key);\n f = field?.fields || [];\n return field && field.type === \"array\" && // 不是整数\n /^(?!\\d+$).*$/.test(`${keys[index + 1]}`) && index < keys.length - 1;\n });\n };\n const isDataSourceTemplate = (value, ds, hasArray = false) => {\n const templates = value.match(dataSourceTemplateRegExp) || [];\n if (templates.length <= 0) {\n return false;\n }\n const arrayFieldTemplates = [];\n const fieldTemplates = [];\n templates.forEach((tpl) => {\n const expression = tpl.substring(2, tpl.length - 1);\n const keys = getKeysArray(expression);\n const dsId = keys.shift();\n if (!dsId || dsId !== ds.id) {\n return;\n }\n if (isIncludeArrayField(keys, ds.fields)) {\n arrayFieldTemplates.push(tpl);\n } else {\n fieldTemplates.push(tpl);\n }\n });\n if (hasArray) {\n return arrayFieldTemplates.length > 0;\n }\n return fieldTemplates.length > 0;\n };\n const isSpecificDataSourceTemplate = (value, dsId) => value?.isBindDataSourceField && value.dataSourceId && value.dataSourceId === dsId && typeof value.template === \"string\";\n const isUseDataSourceField = (value, id) => {\n if (!Array.isArray(value) || typeof value[0] !== \"string\") {\n return false;\n }\n const [prefixId] = value;\n const prefixIndex = prefixId.indexOf(DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX);\n if (prefixIndex === -1) {\n return false;\n }\n const dsId = prefixId.substring(prefixIndex + DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX.length);\n return dsId === id;\n };\n const isDataSourceTarget = (ds, key, value, hasArray = false) => {\n if (!value || ![\"string\", \"object\"].includes(typeof value)) {\n return false;\n }\n if (`${key}`.startsWith(NODE_CONDS_KEY)) {\n return false;\n }\n if (typeof value === \"string\") {\n return isDataSourceTemplate(value, ds, hasArray);\n }\n if (isObject(value) && value?.isBindDataSource && value.dataSourceId && value.dataSourceId === ds.id) {\n return true;\n }\n if (isSpecificDataSourceTemplate(value, ds.id)) {\n return true;\n }\n if (isUseDataSourceField(value, ds.id)) {\n const [, ...keys] = value;\n const includeArray = isIncludeArrayField(keys, ds.fields);\n if (hasArray) {\n return includeArray;\n }\n return !includeArray;\n }\n return false;\n };\n const isDataSourceCondTarget = (ds, key, value, hasArray = false) => {\n if (!Array.isArray(value) || !ds) {\n return false;\n }\n const [dsId, ...keys] = value;\n if (dsId !== ds.id || !`${key}`.startsWith(NODE_CONDS_KEY)) {\n return false;\n }\n if (ds.fields?.find((field) => field.name === keys[0])) {\n const includeArray = isIncludeArrayField(keys, ds.fields);\n if (hasArray) {\n return includeArray;\n }\n return !includeArray;\n }\n return false;\n };\n const createDataSourceTarget = (ds, initialDeps = {}) => new Target({\n type: DepTargetType.DATA_SOURCE,\n id: ds.id,\n initialDeps,\n isTarget: (key, value) => isDataSourceTarget(ds, key, value)\n });\n const createDataSourceCondTarget = (ds, initialDeps = {}) => new Target({\n type: DepTargetType.DATA_SOURCE_COND,\n id: ds.id,\n initialDeps,\n isTarget: (key, value) => isDataSourceCondTarget(ds, key, value)\n });\n const createDataSourceMethodTarget = (ds, initialDeps = {}) => new Target({\n type: DepTargetType.DATA_SOURCE_METHOD,\n id: ds.id,\n initialDeps,\n isTarget: (_key, value) => {\n if (!Array.isArray(value)) {\n return false;\n }\n const [dsId, methodName] = value;\n if (!methodName || dsId !== ds.id) {\n return false;\n }\n if (ds.methods?.find((method) => method.name === methodName)) {\n return true;\n }\n if (ds.fields?.find((field) => field.name === methodName)) {\n return false;\n }\n return true;\n }\n });\n const traverseTarget = (targetsList, cb, type) => {\n for (const targets of Object.values(targetsList)) {\n for (const target of Object.values(targets)) {\n if (type && target.type !== type) {\n continue;\n }\n cb(target);\n }\n }\n };\n\n class Watcher {\n targetsList = {};\n childrenProp = \"items\";\n idProp = \"id\";\n nameProp = \"name\";\n constructor(options) {\n if (options?.initialTargets) {\n this.targetsList = options.initialTargets;\n }\n if (options?.childrenProp) {\n this.childrenProp = options.childrenProp;\n }\n }\n getTargetsList() {\n return this.targetsList;\n }\n /**\n * 获取指定类型中的所有target\n * @param type 分类\n * @returns Target[]\n */\n getTargets(type = DepTargetType.DEFAULT) {\n return this.targetsList[type] || {};\n }\n /**\n * 添加新的目标\n * @param target Target\n */\n addTarget(target) {\n const targets = this.getTargets(target.type) || {};\n this.targetsList[target.type] = targets;\n targets[target.id] = target;\n }\n /**\n * 获取指定id的target\n * @param id target id\n * @returns Target\n */\n getTarget(id, type = DepTargetType.DEFAULT) {\n return this.getTargets(type)[id];\n }\n /**\n * 判断是否存在指定id的target\n * @param id target id\n * @returns boolean\n */\n hasTarget(id, type = DepTargetType.DEFAULT) {\n return Boolean(this.getTarget(id, type));\n }\n /**\n * 判断是否存在指定类型的target\n * @param type target type\n * @returns boolean\n */\n hasSpecifiedTypeTarget(type = DepTargetType.DEFAULT) {\n return Object.keys(this.getTargets(type)).length > 0;\n }\n /**\n * 删除指定id的target\n * @param id target id\n */\n removeTarget(id, type = DepTargetType.DEFAULT) {\n const targets = this.getTargets(type);\n if (targets[id]) {\n targets[id].destroy();\n delete targets[id];\n }\n }\n /**\n * 删除指定分类的所有target\n * @param type 分类\n * @returns void\n */\n removeTargets(type = DepTargetType.DEFAULT) {\n const targets = this.targetsList[type];\n if (!targets) return;\n for (const target of Object.values(targets)) {\n target.destroy();\n }\n delete this.targetsList[type];\n }\n /**\n * 删除所有target\n */\n clearTargets() {\n for (const key of Object.keys(this.targetsList)) {\n delete this.targetsList[key];\n }\n }\n /**\n * 收集依赖\n * @param nodes 需要收集的节点\n * @param deep 是否需要收集子节点\n * @param type 强制收集指定类型的依赖\n */\n collect(nodes, depExtendedData = {}, deep = false, type) {\n this.collectByCallback(nodes, type, ({ node, target }) => {\n this.removeTargetDep(target, node);\n this.collectItem(node, target, depExtendedData, deep);\n });\n }\n collectByCallback(nodes, type, cb) {\n traverseTarget(\n this.targetsList,\n (target) => {\n if (!type && !target.isCollectByDefault) {\n return;\n }\n for (const node of nodes) {\n cb({ node, target });\n }\n },\n type\n );\n }\n /**\n * 清除所有目标的依赖\n * @param nodes 需要清除依赖的节点\n */\n clear(nodes, type) {\n let { targetsList } = this;\n if (type) {\n targetsList = {\n [type]: this.getTargets(type)\n };\n }\n const clearedItemsNodeIds = [];\n traverseTarget(targetsList, (target) => {\n if (nodes) {\n for (const node of nodes) {\n target.removeDep(node[this.idProp]);\n if (Array.isArray(node[this.childrenProp]) && node[this.childrenProp].length && !clearedItemsNodeIds.includes(node[this.idProp])) {\n clearedItemsNodeIds.push(node[this.idProp]);\n this.clear(node[this.childrenProp]);\n }\n }\n } else {\n target.removeDep();\n }\n });\n }\n /**\n * 清除指定类型的依赖\n * @param type 类型\n * @param nodes 需要清除依赖的节点\n */\n clearByType(type, nodes) {\n this.clear(nodes, type);\n }\n collectItem(node, target, depExtendedData = {}, deep = false) {\n const collectTarget = (config, prop = \"\") => {\n const doCollect = (key, value) => {\n const keyIsItems = key === this.childrenProp;\n const fullKey = prop ? `${prop}.${key}` : key;\n if (target.isTarget(fullKey, value)) {\n target.updateDep({\n id: node[this.idProp],\n name: `${node[this.nameProp] || node[this.idProp]}`,\n data: depExtendedData,\n key: fullKey\n });\n } else if (!keyIsItems && Array.isArray(value)) {\n for (let i = 0, l = value.length; i < l; i++) {\n const item = value[i];\n if (isObject(item)) {\n collectTarget(item, `${fullKey}[${i}]`);\n }\n }\n } else if (isObject(value)) {\n collectTarget(value, fullKey);\n }\n if (keyIsItems && deep && Array.isArray(value)) {\n for (const child of value) {\n this.collectItem(child, target, depExtendedData, deep);\n }\n }\n };\n for (const [key, value] of Object.entries(config)) {\n if (typeof value === \"undefined\" || value === \"\") continue;\n doCollect(key, value);\n }\n };\n collectTarget(node);\n }\n removeTargetDep(target, node, key) {\n target.removeDep(node[this.idProp], key);\n if (typeof key === \"undefined\" && Array.isArray(node[this.childrenProp]) && node[this.childrenProp].length) {\n for (const item of node[this.childrenProp]) {\n this.removeTargetDep(target, item, key);\n }\n }\n }\n }\n\n const error = (...args) => {\n if (process.env.NODE_ENV === \"development\") {\n console.error(\"magic editor: \", ...args);\n }\n };\n\n onmessage = (e) => {\n const watcher = new Watcher({ initialTargets: {} });\n const { dsl } = e.data;\n try {\n const mApp = eval(`(${dsl})`);\n if (!mApp) {\n postMessage({});\n }\n watcher.clearTargets();\n if (mApp.codeBlocks) {\n for (const [id, code] of Object.entries(mApp.codeBlocks)) {\n watcher.addTarget(createCodeBlockTarget(id, code));\n }\n }\n if (mApp.dataSources) {\n for (const ds of mApp.dataSources) {\n watcher.addTarget(createDataSourceTarget(ds, {}));\n watcher.addTarget(createDataSourceMethodTarget(ds, {}));\n watcher.addTarget(createDataSourceCondTarget(ds, {}));\n }\n }\n watcher.collectByCallback(mApp.items, void 0, ({ node, target }) => {\n watcher.collectItem(node, target, { pageId: node.id }, true);\n });\n const data = {\n [DepTargetType.DATA_SOURCE]: {},\n [DepTargetType.DATA_SOURCE_METHOD]: {},\n [DepTargetType.DATA_SOURCE_COND]: {},\n [DepTargetType.CODE_BLOCK]: {}\n };\n traverseTarget(watcher.getTargetsList(), (target) => {\n data[target.type][target.id] = target.deps;\n });\n postMessage(data);\n } catch (e2) {\n error(e2);\n postMessage({});\n }\n };\n\n})();\n";
|
|
18750
|
-
|
|
18751
|
-
|
|
18752
|
-
|
|
18753
|
-
|
|
18754
|
-
|
|
18755
|
-
|
|
18756
|
-
|
|
18757
|
-
|
|
18758
|
-
|
|
18889
|
+
const jsContent = `(function () {
|
|
18890
|
+
'use strict';
|
|
18891
|
+
|
|
18892
|
+
var events = {exports: {}};
|
|
18893
|
+
|
|
18894
|
+
var hasRequiredEvents;
|
|
18895
|
+
|
|
18896
|
+
function requireEvents () {
|
|
18897
|
+
if (hasRequiredEvents) return events.exports;
|
|
18898
|
+
hasRequiredEvents = 1;
|
|
18899
|
+
|
|
18900
|
+
var R = typeof Reflect === 'object' ? Reflect : null;
|
|
18901
|
+
var ReflectApply = R && typeof R.apply === 'function'
|
|
18902
|
+
? R.apply
|
|
18903
|
+
: function ReflectApply(target, receiver, args) {
|
|
18904
|
+
return Function.prototype.apply.call(target, receiver, args);
|
|
18905
|
+
};
|
|
18906
|
+
|
|
18907
|
+
var ReflectOwnKeys;
|
|
18908
|
+
if (R && typeof R.ownKeys === 'function') {
|
|
18909
|
+
ReflectOwnKeys = R.ownKeys;
|
|
18910
|
+
} else if (Object.getOwnPropertySymbols) {
|
|
18911
|
+
ReflectOwnKeys = function ReflectOwnKeys(target) {
|
|
18912
|
+
return Object.getOwnPropertyNames(target)
|
|
18913
|
+
.concat(Object.getOwnPropertySymbols(target));
|
|
18914
|
+
};
|
|
18915
|
+
} else {
|
|
18916
|
+
ReflectOwnKeys = function ReflectOwnKeys(target) {
|
|
18917
|
+
return Object.getOwnPropertyNames(target);
|
|
18918
|
+
};
|
|
18919
|
+
}
|
|
18920
|
+
|
|
18921
|
+
function ProcessEmitWarning(warning) {
|
|
18922
|
+
if (console && console.warn) console.warn(warning);
|
|
18923
|
+
}
|
|
18924
|
+
|
|
18925
|
+
var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {
|
|
18926
|
+
return value !== value;
|
|
18927
|
+
};
|
|
18928
|
+
|
|
18929
|
+
function EventEmitter() {
|
|
18930
|
+
EventEmitter.init.call(this);
|
|
18931
|
+
}
|
|
18932
|
+
events.exports = EventEmitter;
|
|
18933
|
+
events.exports.once = once;
|
|
18934
|
+
|
|
18935
|
+
// Backwards-compat with node 0.10.x
|
|
18936
|
+
EventEmitter.EventEmitter = EventEmitter;
|
|
18937
|
+
|
|
18938
|
+
EventEmitter.prototype._events = undefined;
|
|
18939
|
+
EventEmitter.prototype._eventsCount = 0;
|
|
18940
|
+
EventEmitter.prototype._maxListeners = undefined;
|
|
18941
|
+
|
|
18942
|
+
// By default EventEmitters will print a warning if more than 10 listeners are
|
|
18943
|
+
// added to it. This is a useful default which helps finding memory leaks.
|
|
18944
|
+
var defaultMaxListeners = 10;
|
|
18945
|
+
|
|
18946
|
+
function checkListener(listener) {
|
|
18947
|
+
if (typeof listener !== 'function') {
|
|
18948
|
+
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
|
|
18949
|
+
}
|
|
18950
|
+
}
|
|
18951
|
+
|
|
18952
|
+
Object.defineProperty(EventEmitter, 'defaultMaxListeners', {
|
|
18953
|
+
enumerable: true,
|
|
18954
|
+
get: function() {
|
|
18955
|
+
return defaultMaxListeners;
|
|
18956
|
+
},
|
|
18957
|
+
set: function(arg) {
|
|
18958
|
+
if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {
|
|
18959
|
+
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.');
|
|
18960
|
+
}
|
|
18961
|
+
defaultMaxListeners = arg;
|
|
18962
|
+
}
|
|
18963
|
+
});
|
|
18964
|
+
|
|
18965
|
+
EventEmitter.init = function() {
|
|
18966
|
+
|
|
18967
|
+
if (this._events === undefined ||
|
|
18968
|
+
this._events === Object.getPrototypeOf(this)._events) {
|
|
18969
|
+
this._events = Object.create(null);
|
|
18970
|
+
this._eventsCount = 0;
|
|
18971
|
+
}
|
|
18972
|
+
|
|
18973
|
+
this._maxListeners = this._maxListeners || undefined;
|
|
18974
|
+
};
|
|
18975
|
+
|
|
18976
|
+
// Obviously not all Emitters should be limited to 10. This function allows
|
|
18977
|
+
// that to be increased. Set to zero for unlimited.
|
|
18978
|
+
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
|
|
18979
|
+
if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {
|
|
18980
|
+
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.');
|
|
18981
|
+
}
|
|
18982
|
+
this._maxListeners = n;
|
|
18983
|
+
return this;
|
|
18984
|
+
};
|
|
18985
|
+
|
|
18986
|
+
function _getMaxListeners(that) {
|
|
18987
|
+
if (that._maxListeners === undefined)
|
|
18988
|
+
return EventEmitter.defaultMaxListeners;
|
|
18989
|
+
return that._maxListeners;
|
|
18990
|
+
}
|
|
18991
|
+
|
|
18992
|
+
EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
|
|
18993
|
+
return _getMaxListeners(this);
|
|
18994
|
+
};
|
|
18995
|
+
|
|
18996
|
+
EventEmitter.prototype.emit = function emit(type) {
|
|
18997
|
+
var args = [];
|
|
18998
|
+
for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);
|
|
18999
|
+
var doError = (type === 'error');
|
|
19000
|
+
|
|
19001
|
+
var events = this._events;
|
|
19002
|
+
if (events !== undefined)
|
|
19003
|
+
doError = (doError && events.error === undefined);
|
|
19004
|
+
else if (!doError)
|
|
19005
|
+
return false;
|
|
19006
|
+
|
|
19007
|
+
// If there is no 'error' event listener then throw.
|
|
19008
|
+
if (doError) {
|
|
19009
|
+
var er;
|
|
19010
|
+
if (args.length > 0)
|
|
19011
|
+
er = args[0];
|
|
19012
|
+
if (er instanceof Error) {
|
|
19013
|
+
// Note: The comments on the \`throw\` lines are intentional, they show
|
|
19014
|
+
// up in Node's output if this results in an unhandled exception.
|
|
19015
|
+
throw er; // Unhandled 'error' event
|
|
19016
|
+
}
|
|
19017
|
+
// At least give some kind of context to the user
|
|
19018
|
+
var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));
|
|
19019
|
+
err.context = er;
|
|
19020
|
+
throw err; // Unhandled 'error' event
|
|
19021
|
+
}
|
|
19022
|
+
|
|
19023
|
+
var handler = events[type];
|
|
19024
|
+
|
|
19025
|
+
if (handler === undefined)
|
|
19026
|
+
return false;
|
|
19027
|
+
|
|
19028
|
+
if (typeof handler === 'function') {
|
|
19029
|
+
ReflectApply(handler, this, args);
|
|
19030
|
+
} else {
|
|
19031
|
+
var len = handler.length;
|
|
19032
|
+
var listeners = arrayClone(handler, len);
|
|
19033
|
+
for (var i = 0; i < len; ++i)
|
|
19034
|
+
ReflectApply(listeners[i], this, args);
|
|
19035
|
+
}
|
|
19036
|
+
|
|
19037
|
+
return true;
|
|
19038
|
+
};
|
|
19039
|
+
|
|
19040
|
+
function _addListener(target, type, listener, prepend) {
|
|
19041
|
+
var m;
|
|
19042
|
+
var events;
|
|
19043
|
+
var existing;
|
|
19044
|
+
|
|
19045
|
+
checkListener(listener);
|
|
19046
|
+
|
|
19047
|
+
events = target._events;
|
|
19048
|
+
if (events === undefined) {
|
|
19049
|
+
events = target._events = Object.create(null);
|
|
19050
|
+
target._eventsCount = 0;
|
|
19051
|
+
} else {
|
|
19052
|
+
// To avoid recursion in the case that type === "newListener"! Before
|
|
19053
|
+
// adding it to the listeners, first emit "newListener".
|
|
19054
|
+
if (events.newListener !== undefined) {
|
|
19055
|
+
target.emit('newListener', type,
|
|
19056
|
+
listener.listener ? listener.listener : listener);
|
|
19057
|
+
|
|
19058
|
+
// Re-assign \`events\` because a newListener handler could have caused the
|
|
19059
|
+
// this._events to be assigned to a new object
|
|
19060
|
+
events = target._events;
|
|
19061
|
+
}
|
|
19062
|
+
existing = events[type];
|
|
19063
|
+
}
|
|
19064
|
+
|
|
19065
|
+
if (existing === undefined) {
|
|
19066
|
+
// Optimize the case of one listener. Don't need the extra array object.
|
|
19067
|
+
existing = events[type] = listener;
|
|
19068
|
+
++target._eventsCount;
|
|
19069
|
+
} else {
|
|
19070
|
+
if (typeof existing === 'function') {
|
|
19071
|
+
// Adding the second element, need to change to array.
|
|
19072
|
+
existing = events[type] =
|
|
19073
|
+
prepend ? [listener, existing] : [existing, listener];
|
|
19074
|
+
// If we've already got an array, just append.
|
|
19075
|
+
} else if (prepend) {
|
|
19076
|
+
existing.unshift(listener);
|
|
19077
|
+
} else {
|
|
19078
|
+
existing.push(listener);
|
|
19079
|
+
}
|
|
19080
|
+
|
|
19081
|
+
// Check for listener leak
|
|
19082
|
+
m = _getMaxListeners(target);
|
|
19083
|
+
if (m > 0 && existing.length > m && !existing.warned) {
|
|
19084
|
+
existing.warned = true;
|
|
19085
|
+
// No error code for this since it is a Warning
|
|
19086
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
19087
|
+
var w = new Error('Possible EventEmitter memory leak detected. ' +
|
|
19088
|
+
existing.length + ' ' + String(type) + ' listeners ' +
|
|
19089
|
+
'added. Use emitter.setMaxListeners() to ' +
|
|
19090
|
+
'increase limit');
|
|
19091
|
+
w.name = 'MaxListenersExceededWarning';
|
|
19092
|
+
w.emitter = target;
|
|
19093
|
+
w.type = type;
|
|
19094
|
+
w.count = existing.length;
|
|
19095
|
+
ProcessEmitWarning(w);
|
|
19096
|
+
}
|
|
19097
|
+
}
|
|
19098
|
+
|
|
19099
|
+
return target;
|
|
19100
|
+
}
|
|
19101
|
+
|
|
19102
|
+
EventEmitter.prototype.addListener = function addListener(type, listener) {
|
|
19103
|
+
return _addListener(this, type, listener, false);
|
|
19104
|
+
};
|
|
19105
|
+
|
|
19106
|
+
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
|
|
19107
|
+
|
|
19108
|
+
EventEmitter.prototype.prependListener =
|
|
19109
|
+
function prependListener(type, listener) {
|
|
19110
|
+
return _addListener(this, type, listener, true);
|
|
19111
|
+
};
|
|
19112
|
+
|
|
19113
|
+
function onceWrapper() {
|
|
19114
|
+
if (!this.fired) {
|
|
19115
|
+
this.target.removeListener(this.type, this.wrapFn);
|
|
19116
|
+
this.fired = true;
|
|
19117
|
+
if (arguments.length === 0)
|
|
19118
|
+
return this.listener.call(this.target);
|
|
19119
|
+
return this.listener.apply(this.target, arguments);
|
|
19120
|
+
}
|
|
19121
|
+
}
|
|
19122
|
+
|
|
19123
|
+
function _onceWrap(target, type, listener) {
|
|
19124
|
+
var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };
|
|
19125
|
+
var wrapped = onceWrapper.bind(state);
|
|
19126
|
+
wrapped.listener = listener;
|
|
19127
|
+
state.wrapFn = wrapped;
|
|
19128
|
+
return wrapped;
|
|
19129
|
+
}
|
|
19130
|
+
|
|
19131
|
+
EventEmitter.prototype.once = function once(type, listener) {
|
|
19132
|
+
checkListener(listener);
|
|
19133
|
+
this.on(type, _onceWrap(this, type, listener));
|
|
19134
|
+
return this;
|
|
19135
|
+
};
|
|
19136
|
+
|
|
19137
|
+
EventEmitter.prototype.prependOnceListener =
|
|
19138
|
+
function prependOnceListener(type, listener) {
|
|
19139
|
+
checkListener(listener);
|
|
19140
|
+
this.prependListener(type, _onceWrap(this, type, listener));
|
|
19141
|
+
return this;
|
|
19142
|
+
};
|
|
19143
|
+
|
|
19144
|
+
// Emits a 'removeListener' event if and only if the listener was removed.
|
|
19145
|
+
EventEmitter.prototype.removeListener =
|
|
19146
|
+
function removeListener(type, listener) {
|
|
19147
|
+
var list, events, position, i, originalListener;
|
|
19148
|
+
|
|
19149
|
+
checkListener(listener);
|
|
19150
|
+
|
|
19151
|
+
events = this._events;
|
|
19152
|
+
if (events === undefined)
|
|
19153
|
+
return this;
|
|
19154
|
+
|
|
19155
|
+
list = events[type];
|
|
19156
|
+
if (list === undefined)
|
|
19157
|
+
return this;
|
|
19158
|
+
|
|
19159
|
+
if (list === listener || list.listener === listener) {
|
|
19160
|
+
if (--this._eventsCount === 0)
|
|
19161
|
+
this._events = Object.create(null);
|
|
19162
|
+
else {
|
|
19163
|
+
delete events[type];
|
|
19164
|
+
if (events.removeListener)
|
|
19165
|
+
this.emit('removeListener', type, list.listener || listener);
|
|
19166
|
+
}
|
|
19167
|
+
} else if (typeof list !== 'function') {
|
|
19168
|
+
position = -1;
|
|
19169
|
+
|
|
19170
|
+
for (i = list.length - 1; i >= 0; i--) {
|
|
19171
|
+
if (list[i] === listener || list[i].listener === listener) {
|
|
19172
|
+
originalListener = list[i].listener;
|
|
19173
|
+
position = i;
|
|
19174
|
+
break;
|
|
19175
|
+
}
|
|
19176
|
+
}
|
|
19177
|
+
|
|
19178
|
+
if (position < 0)
|
|
19179
|
+
return this;
|
|
19180
|
+
|
|
19181
|
+
if (position === 0)
|
|
19182
|
+
list.shift();
|
|
19183
|
+
else {
|
|
19184
|
+
spliceOne(list, position);
|
|
19185
|
+
}
|
|
19186
|
+
|
|
19187
|
+
if (list.length === 1)
|
|
19188
|
+
events[type] = list[0];
|
|
19189
|
+
|
|
19190
|
+
if (events.removeListener !== undefined)
|
|
19191
|
+
this.emit('removeListener', type, originalListener || listener);
|
|
19192
|
+
}
|
|
19193
|
+
|
|
19194
|
+
return this;
|
|
19195
|
+
};
|
|
19196
|
+
|
|
19197
|
+
EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
|
|
19198
|
+
|
|
19199
|
+
EventEmitter.prototype.removeAllListeners =
|
|
19200
|
+
function removeAllListeners(type) {
|
|
19201
|
+
var listeners, events, i;
|
|
19202
|
+
|
|
19203
|
+
events = this._events;
|
|
19204
|
+
if (events === undefined)
|
|
19205
|
+
return this;
|
|
19206
|
+
|
|
19207
|
+
// not listening for removeListener, no need to emit
|
|
19208
|
+
if (events.removeListener === undefined) {
|
|
19209
|
+
if (arguments.length === 0) {
|
|
19210
|
+
this._events = Object.create(null);
|
|
19211
|
+
this._eventsCount = 0;
|
|
19212
|
+
} else if (events[type] !== undefined) {
|
|
19213
|
+
if (--this._eventsCount === 0)
|
|
19214
|
+
this._events = Object.create(null);
|
|
19215
|
+
else
|
|
19216
|
+
delete events[type];
|
|
19217
|
+
}
|
|
19218
|
+
return this;
|
|
19219
|
+
}
|
|
19220
|
+
|
|
19221
|
+
// emit removeListener for all listeners on all events
|
|
19222
|
+
if (arguments.length === 0) {
|
|
19223
|
+
var keys = Object.keys(events);
|
|
19224
|
+
var key;
|
|
19225
|
+
for (i = 0; i < keys.length; ++i) {
|
|
19226
|
+
key = keys[i];
|
|
19227
|
+
if (key === 'removeListener') continue;
|
|
19228
|
+
this.removeAllListeners(key);
|
|
19229
|
+
}
|
|
19230
|
+
this.removeAllListeners('removeListener');
|
|
19231
|
+
this._events = Object.create(null);
|
|
19232
|
+
this._eventsCount = 0;
|
|
19233
|
+
return this;
|
|
19234
|
+
}
|
|
19235
|
+
|
|
19236
|
+
listeners = events[type];
|
|
19237
|
+
|
|
19238
|
+
if (typeof listeners === 'function') {
|
|
19239
|
+
this.removeListener(type, listeners);
|
|
19240
|
+
} else if (listeners !== undefined) {
|
|
19241
|
+
// LIFO order
|
|
19242
|
+
for (i = listeners.length - 1; i >= 0; i--) {
|
|
19243
|
+
this.removeListener(type, listeners[i]);
|
|
19244
|
+
}
|
|
19245
|
+
}
|
|
19246
|
+
|
|
19247
|
+
return this;
|
|
19248
|
+
};
|
|
19249
|
+
|
|
19250
|
+
function _listeners(target, type, unwrap) {
|
|
19251
|
+
var events = target._events;
|
|
19252
|
+
|
|
19253
|
+
if (events === undefined)
|
|
19254
|
+
return [];
|
|
19255
|
+
|
|
19256
|
+
var evlistener = events[type];
|
|
19257
|
+
if (evlistener === undefined)
|
|
19258
|
+
return [];
|
|
19259
|
+
|
|
19260
|
+
if (typeof evlistener === 'function')
|
|
19261
|
+
return unwrap ? [evlistener.listener || evlistener] : [evlistener];
|
|
19262
|
+
|
|
19263
|
+
return unwrap ?
|
|
19264
|
+
unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
|
|
19265
|
+
}
|
|
19266
|
+
|
|
19267
|
+
EventEmitter.prototype.listeners = function listeners(type) {
|
|
19268
|
+
return _listeners(this, type, true);
|
|
19269
|
+
};
|
|
19270
|
+
|
|
19271
|
+
EventEmitter.prototype.rawListeners = function rawListeners(type) {
|
|
19272
|
+
return _listeners(this, type, false);
|
|
19273
|
+
};
|
|
19274
|
+
|
|
19275
|
+
EventEmitter.listenerCount = function(emitter, type) {
|
|
19276
|
+
if (typeof emitter.listenerCount === 'function') {
|
|
19277
|
+
return emitter.listenerCount(type);
|
|
19278
|
+
} else {
|
|
19279
|
+
return listenerCount.call(emitter, type);
|
|
19280
|
+
}
|
|
19281
|
+
};
|
|
19282
|
+
|
|
19283
|
+
EventEmitter.prototype.listenerCount = listenerCount;
|
|
19284
|
+
function listenerCount(type) {
|
|
19285
|
+
var events = this._events;
|
|
19286
|
+
|
|
19287
|
+
if (events !== undefined) {
|
|
19288
|
+
var evlistener = events[type];
|
|
19289
|
+
|
|
19290
|
+
if (typeof evlistener === 'function') {
|
|
19291
|
+
return 1;
|
|
19292
|
+
} else if (evlistener !== undefined) {
|
|
19293
|
+
return evlistener.length;
|
|
19294
|
+
}
|
|
19295
|
+
}
|
|
19296
|
+
|
|
19297
|
+
return 0;
|
|
19298
|
+
}
|
|
19299
|
+
|
|
19300
|
+
EventEmitter.prototype.eventNames = function eventNames() {
|
|
19301
|
+
return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
|
|
19302
|
+
};
|
|
19303
|
+
|
|
19304
|
+
function arrayClone(arr, n) {
|
|
19305
|
+
var copy = new Array(n);
|
|
19306
|
+
for (var i = 0; i < n; ++i)
|
|
19307
|
+
copy[i] = arr[i];
|
|
19308
|
+
return copy;
|
|
19309
|
+
}
|
|
19310
|
+
|
|
19311
|
+
function spliceOne(list, index) {
|
|
19312
|
+
for (; index + 1 < list.length; index++)
|
|
19313
|
+
list[index] = list[index + 1];
|
|
19314
|
+
list.pop();
|
|
19315
|
+
}
|
|
19316
|
+
|
|
19317
|
+
function unwrapListeners(arr) {
|
|
19318
|
+
var ret = new Array(arr.length);
|
|
19319
|
+
for (var i = 0; i < ret.length; ++i) {
|
|
19320
|
+
ret[i] = arr[i].listener || arr[i];
|
|
19321
|
+
}
|
|
19322
|
+
return ret;
|
|
19323
|
+
}
|
|
19324
|
+
|
|
19325
|
+
function once(emitter, name) {
|
|
19326
|
+
return new Promise(function (resolve, reject) {
|
|
19327
|
+
function errorListener(err) {
|
|
19328
|
+
emitter.removeListener(name, resolver);
|
|
19329
|
+
reject(err);
|
|
19330
|
+
}
|
|
19331
|
+
|
|
19332
|
+
function resolver() {
|
|
19333
|
+
if (typeof emitter.removeListener === 'function') {
|
|
19334
|
+
emitter.removeListener('error', errorListener);
|
|
19335
|
+
}
|
|
19336
|
+
resolve([].slice.call(arguments));
|
|
19337
|
+
}
|
|
19338
|
+
eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
|
|
19339
|
+
if (name !== 'error') {
|
|
19340
|
+
addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
|
|
19341
|
+
}
|
|
19342
|
+
});
|
|
19343
|
+
}
|
|
19344
|
+
|
|
19345
|
+
function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
|
|
19346
|
+
if (typeof emitter.on === 'function') {
|
|
19347
|
+
eventTargetAgnosticAddListener(emitter, 'error', handler, flags);
|
|
19348
|
+
}
|
|
19349
|
+
}
|
|
19350
|
+
|
|
19351
|
+
function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
|
|
19352
|
+
if (typeof emitter.on === 'function') {
|
|
19353
|
+
if (flags.once) {
|
|
19354
|
+
emitter.once(name, listener);
|
|
19355
|
+
} else {
|
|
19356
|
+
emitter.on(name, listener);
|
|
19357
|
+
}
|
|
19358
|
+
} else if (typeof emitter.addEventListener === 'function') {
|
|
19359
|
+
// EventTarget does not have \`error\` event semantics like Node
|
|
19360
|
+
// EventEmitters, we do not listen for \`error\` events here.
|
|
19361
|
+
emitter.addEventListener(name, function wrapListener(arg) {
|
|
19362
|
+
// IE does not have builtin \`{ once: true }\` support so we
|
|
19363
|
+
// have to do it manually.
|
|
19364
|
+
if (flags.once) {
|
|
19365
|
+
emitter.removeEventListener(name, wrapListener);
|
|
19366
|
+
}
|
|
19367
|
+
listener(arg);
|
|
19368
|
+
});
|
|
19369
|
+
} else {
|
|
19370
|
+
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
|
|
19371
|
+
}
|
|
19372
|
+
}
|
|
19373
|
+
return events.exports;
|
|
19374
|
+
}
|
|
19375
|
+
|
|
19376
|
+
requireEvents();
|
|
19377
|
+
|
|
19378
|
+
/*! *****************************************************************************\r
|
|
19379
|
+
Copyright (c) Microsoft Corporation.\r
|
|
19380
|
+
\r
|
|
19381
|
+
Permission to use, copy, modify, and/or distribute this software for any\r
|
|
19382
|
+
purpose with or without fee is hereby granted.\r
|
|
19383
|
+
\r
|
|
19384
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r
|
|
19385
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r
|
|
19386
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r
|
|
19387
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r
|
|
19388
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r
|
|
19389
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r
|
|
19390
|
+
PERFORMANCE OF THIS SOFTWARE.\r
|
|
19391
|
+
***************************************************************************** */\r
|
|
19392
|
+
\r
|
|
19393
|
+
|
|
19394
|
+
let cachedTextEncoder = new TextEncoder("utf-8");
|
|
19395
|
+
|
|
19396
|
+
typeof cachedTextEncoder.encodeInto === "function"
|
|
19397
|
+
? function (arg, view) {
|
|
19398
|
+
return cachedTextEncoder.encodeInto(arg, view);
|
|
19399
|
+
}
|
|
19400
|
+
: function (arg, view) {
|
|
19401
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
19402
|
+
view.set(buf);
|
|
19403
|
+
return {
|
|
19404
|
+
read: arg.length,
|
|
19405
|
+
written: buf.length,
|
|
19406
|
+
};
|
|
19407
|
+
};
|
|
19408
|
+
|
|
19409
|
+
const NODE_CONDS_KEY = "displayConds";
|
|
19410
|
+
const NODE_DISABLE_DATA_SOURCE_KEY = "_tmagic_node_disabled_data_source";
|
|
19411
|
+
const NODE_DISABLE_CODE_BLOCK_KEY = "_tmagic_node_disabled_code_block";
|
|
19412
|
+
var HookType = /* @__PURE__ */ ((HookType2) => {
|
|
19413
|
+
HookType2["CODE"] = "code";
|
|
19414
|
+
return HookType2;
|
|
19415
|
+
})(HookType || {});
|
|
19416
|
+
|
|
19417
|
+
const isObject = (obj) => Object.prototype.toString.call(obj) === "[object Object]";
|
|
19418
|
+
const getKeysArray = (keys) => (
|
|
19419
|
+
// 将 array[0] 转成 array.0
|
|
19420
|
+
\`\${keys}\`.replace(/\\[(\\d+)\\]/g, ".$1").split(".")
|
|
19421
|
+
);
|
|
19422
|
+
const DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX = "ds-field::";
|
|
19423
|
+
const dataSourceTemplateRegExp = /\\$\\{([\\s\\S]+?)\\}/g;
|
|
19424
|
+
|
|
19425
|
+
var DepTargetType = /* @__PURE__ */ ((DepTargetType2) => {
|
|
19426
|
+
DepTargetType2["DEFAULT"] = "default";
|
|
19427
|
+
DepTargetType2["CODE_BLOCK"] = "code-block";
|
|
19428
|
+
DepTargetType2["DATA_SOURCE"] = "data-source";
|
|
19429
|
+
DepTargetType2["DATA_SOURCE_METHOD"] = "data-source-method";
|
|
19430
|
+
DepTargetType2["DATA_SOURCE_COND"] = "data-source-cond";
|
|
19431
|
+
return DepTargetType2;
|
|
19432
|
+
})(DepTargetType || {});
|
|
19433
|
+
|
|
19434
|
+
class Target {
|
|
19435
|
+
/**
|
|
19436
|
+
* 如何识别目标
|
|
19437
|
+
*/
|
|
19438
|
+
isTarget;
|
|
19439
|
+
/**
|
|
19440
|
+
* 目标id,不可重复
|
|
19441
|
+
* 例如目标是代码块,则为代码块id
|
|
19442
|
+
*/
|
|
19443
|
+
id;
|
|
19444
|
+
/**
|
|
19445
|
+
* 目标名称,用于显示在依赖列表中
|
|
19446
|
+
*/
|
|
19447
|
+
name;
|
|
19448
|
+
/**
|
|
19449
|
+
* 不同的目标可以进行分类,例如代码块,数据源可以为两个不同的type
|
|
19450
|
+
*/
|
|
19451
|
+
type = DepTargetType.DEFAULT;
|
|
19452
|
+
/**
|
|
19453
|
+
* 依赖详情
|
|
19454
|
+
* 实例:{ 'node_id': { name: 'node_name', keys: [ created, mounted ] } }
|
|
19455
|
+
*/
|
|
19456
|
+
deps = {};
|
|
19457
|
+
/**
|
|
19458
|
+
* 是否默认收集,默认为true,当值为false时需要传入type参数给collect方法才会被收集
|
|
19459
|
+
*/
|
|
19460
|
+
isCollectByDefault;
|
|
19461
|
+
constructor(options) {
|
|
19462
|
+
this.isTarget = options.isTarget;
|
|
19463
|
+
this.id = options.id;
|
|
19464
|
+
this.name = options.name;
|
|
19465
|
+
this.isCollectByDefault = options.isCollectByDefault ?? true;
|
|
19466
|
+
if (options.type) {
|
|
19467
|
+
this.type = options.type;
|
|
19468
|
+
}
|
|
19469
|
+
if (options.initialDeps) {
|
|
19470
|
+
this.deps = options.initialDeps;
|
|
19471
|
+
}
|
|
19472
|
+
}
|
|
19473
|
+
/**
|
|
19474
|
+
* 更新依赖
|
|
19475
|
+
* @param option 节点配置
|
|
19476
|
+
* @param key 哪个key配置了这个目标的id
|
|
19477
|
+
*/
|
|
19478
|
+
updateDep({ id, name, key, data }) {
|
|
19479
|
+
const dep = this.deps[id] || {
|
|
19480
|
+
name,
|
|
19481
|
+
keys: []
|
|
19482
|
+
};
|
|
19483
|
+
dep.name = name;
|
|
19484
|
+
dep.data = data;
|
|
19485
|
+
this.deps[id] = dep;
|
|
19486
|
+
if (dep.keys.indexOf(key) === -1) {
|
|
19487
|
+
dep.keys.push(key);
|
|
19488
|
+
}
|
|
19489
|
+
}
|
|
19490
|
+
/**
|
|
19491
|
+
* 删除依赖
|
|
19492
|
+
* @param node 哪个节点的依赖需要移除,如果为空,则移除所有依赖
|
|
19493
|
+
* @param key 节点下哪个key需要移除,如果为空,则移除改节点下的所有依赖key
|
|
19494
|
+
* @returns void
|
|
19495
|
+
*/
|
|
19496
|
+
removeDep(id, key) {
|
|
19497
|
+
if (typeof id === "undefined") {
|
|
19498
|
+
Object.keys(this.deps).forEach((depKey) => {
|
|
19499
|
+
delete this.deps[depKey];
|
|
18759
19500
|
});
|
|
18760
|
-
|
|
18761
|
-
|
|
18762
|
-
|
|
18763
|
-
|
|
18764
|
-
|
|
18765
|
-
|
|
18766
|
-
|
|
18767
|
-
|
|
18768
|
-
|
|
18769
|
-
name: options?.name
|
|
19501
|
+
return;
|
|
19502
|
+
}
|
|
19503
|
+
const dep = this.deps[id];
|
|
19504
|
+
if (!dep) return;
|
|
19505
|
+
if (key) {
|
|
19506
|
+
const index = dep.keys.indexOf(key);
|
|
19507
|
+
dep.keys.splice(index, 1);
|
|
19508
|
+
if (dep.keys.length === 0) {
|
|
19509
|
+
delete this.deps[id];
|
|
18770
19510
|
}
|
|
18771
|
-
|
|
18772
|
-
|
|
18773
|
-
|
|
18774
|
-
|
|
19511
|
+
} else {
|
|
19512
|
+
delete this.deps[id];
|
|
19513
|
+
}
|
|
19514
|
+
}
|
|
19515
|
+
/**
|
|
19516
|
+
* 判断指定节点下的指定key是否存在在依赖列表中
|
|
19517
|
+
* @param node 哪个节点
|
|
19518
|
+
* @param key 哪个key
|
|
19519
|
+
* @returns boolean
|
|
19520
|
+
*/
|
|
19521
|
+
hasDep(id, key) {
|
|
19522
|
+
const dep = this.deps[id];
|
|
19523
|
+
return Boolean(dep?.keys.find((d) => d === key));
|
|
19524
|
+
}
|
|
19525
|
+
destroy() {
|
|
19526
|
+
this.deps = {};
|
|
19527
|
+
}
|
|
19528
|
+
}
|
|
19529
|
+
|
|
19530
|
+
const createCodeBlockTarget = (id, codeBlock, initialDeps = {}) => new Target({
|
|
19531
|
+
type: DepTargetType.CODE_BLOCK,
|
|
19532
|
+
id,
|
|
19533
|
+
initialDeps,
|
|
19534
|
+
name: codeBlock.name,
|
|
19535
|
+
isTarget: (_key, value) => {
|
|
19536
|
+
if (id === value) {
|
|
19537
|
+
return true;
|
|
19538
|
+
}
|
|
19539
|
+
if (value?.hookType === HookType.CODE && Array.isArray(value.hookData)) {
|
|
19540
|
+
const index = value.hookData.findIndex((item) => item.codeId === id);
|
|
19541
|
+
return Boolean(index > -1);
|
|
19542
|
+
}
|
|
19543
|
+
return false;
|
|
19544
|
+
}
|
|
19545
|
+
});
|
|
19546
|
+
const isIncludeArrayField = (keys, fields) => {
|
|
19547
|
+
let f = fields;
|
|
19548
|
+
return keys.some((key, index) => {
|
|
19549
|
+
const field = f.find(({ name }) => name === key);
|
|
19550
|
+
f = field?.fields || [];
|
|
19551
|
+
return field && field.type === "array" && // 不是整数
|
|
19552
|
+
/^(?!\\d+$).*$/.test(\`\${keys[index + 1]}\`) && index < keys.length - 1;
|
|
19553
|
+
});
|
|
19554
|
+
};
|
|
19555
|
+
const isDataSourceTemplate = (value, ds, hasArray = false) => {
|
|
19556
|
+
const templates = value.match(dataSourceTemplateRegExp) || [];
|
|
19557
|
+
if (templates.length <= 0) {
|
|
19558
|
+
return false;
|
|
19559
|
+
}
|
|
19560
|
+
const arrayFieldTemplates = [];
|
|
19561
|
+
const fieldTemplates = [];
|
|
19562
|
+
templates.forEach((tpl) => {
|
|
19563
|
+
const expression = tpl.substring(2, tpl.length - 1);
|
|
19564
|
+
const keys = getKeysArray(expression);
|
|
19565
|
+
const dsId = keys.shift();
|
|
19566
|
+
if (!dsId || dsId !== ds.id) {
|
|
19567
|
+
return;
|
|
19568
|
+
}
|
|
19569
|
+
if (isIncludeArrayField(keys, ds.fields)) {
|
|
19570
|
+
arrayFieldTemplates.push(tpl);
|
|
19571
|
+
} else {
|
|
19572
|
+
fieldTemplates.push(tpl);
|
|
19573
|
+
}
|
|
19574
|
+
});
|
|
19575
|
+
if (hasArray) {
|
|
19576
|
+
return arrayFieldTemplates.length > 0;
|
|
19577
|
+
}
|
|
19578
|
+
return fieldTemplates.length > 0;
|
|
19579
|
+
};
|
|
19580
|
+
const isSpecificDataSourceTemplate = (value, dsId) => value?.isBindDataSourceField && value.dataSourceId && value.dataSourceId === dsId && typeof value.template === "string";
|
|
19581
|
+
const isUseDataSourceField = (value, id) => {
|
|
19582
|
+
if (!Array.isArray(value) || typeof value[0] !== "string") {
|
|
19583
|
+
return false;
|
|
19584
|
+
}
|
|
19585
|
+
const [prefixId] = value;
|
|
19586
|
+
const prefixIndex = prefixId.indexOf(DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX);
|
|
19587
|
+
if (prefixIndex === -1) {
|
|
19588
|
+
return false;
|
|
19589
|
+
}
|
|
19590
|
+
const dsId = prefixId.substring(prefixIndex + DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX.length);
|
|
19591
|
+
return dsId === id;
|
|
19592
|
+
};
|
|
19593
|
+
const isDataSourceTarget = (ds, key, value, hasArray = false) => {
|
|
19594
|
+
if (!value || !["string", "object"].includes(typeof value)) {
|
|
19595
|
+
return false;
|
|
19596
|
+
}
|
|
19597
|
+
if (\`\${key}\`.startsWith(NODE_CONDS_KEY)) {
|
|
19598
|
+
return false;
|
|
19599
|
+
}
|
|
19600
|
+
if (typeof value === "string") {
|
|
19601
|
+
return isDataSourceTemplate(value, ds, hasArray);
|
|
19602
|
+
}
|
|
19603
|
+
if (isObject(value) && value?.isBindDataSource && value.dataSourceId && value.dataSourceId === ds.id) {
|
|
19604
|
+
return true;
|
|
19605
|
+
}
|
|
19606
|
+
if (isSpecificDataSourceTemplate(value, ds.id)) {
|
|
19607
|
+
return true;
|
|
19608
|
+
}
|
|
19609
|
+
if (isUseDataSourceField(value, ds.id)) {
|
|
19610
|
+
const [, ...keys] = value;
|
|
19611
|
+
const includeArray = isIncludeArrayField(keys, ds.fields);
|
|
19612
|
+
if (hasArray) {
|
|
19613
|
+
return includeArray;
|
|
19614
|
+
}
|
|
19615
|
+
return !includeArray;
|
|
19616
|
+
}
|
|
19617
|
+
return false;
|
|
19618
|
+
};
|
|
19619
|
+
const isDataSourceCondTarget = (ds, key, value, hasArray = false) => {
|
|
19620
|
+
if (!Array.isArray(value) || !ds) {
|
|
19621
|
+
return false;
|
|
19622
|
+
}
|
|
19623
|
+
const [dsId, ...keys] = value;
|
|
19624
|
+
if (dsId !== ds.id || !\`\${key}\`.startsWith(NODE_CONDS_KEY)) {
|
|
19625
|
+
return false;
|
|
19626
|
+
}
|
|
19627
|
+
if (ds.fields?.find((field) => field.name === keys[0])) {
|
|
19628
|
+
const includeArray = isIncludeArrayField(keys, ds.fields);
|
|
19629
|
+
if (hasArray) {
|
|
19630
|
+
return includeArray;
|
|
19631
|
+
}
|
|
19632
|
+
return !includeArray;
|
|
19633
|
+
}
|
|
19634
|
+
return false;
|
|
19635
|
+
};
|
|
19636
|
+
const createDataSourceTarget = (ds, initialDeps = {}) => new Target({
|
|
19637
|
+
type: DepTargetType.DATA_SOURCE,
|
|
19638
|
+
id: ds.id,
|
|
19639
|
+
initialDeps,
|
|
19640
|
+
isTarget: (key, value) => isDataSourceTarget(ds, key, value)
|
|
19641
|
+
});
|
|
19642
|
+
const createDataSourceCondTarget = (ds, initialDeps = {}) => new Target({
|
|
19643
|
+
type: DepTargetType.DATA_SOURCE_COND,
|
|
19644
|
+
id: ds.id,
|
|
19645
|
+
initialDeps,
|
|
19646
|
+
isTarget: (key, value) => isDataSourceCondTarget(ds, key, value)
|
|
19647
|
+
});
|
|
19648
|
+
const createDataSourceMethodTarget = (ds, initialDeps = {}) => new Target({
|
|
19649
|
+
type: DepTargetType.DATA_SOURCE_METHOD,
|
|
19650
|
+
id: ds.id,
|
|
19651
|
+
initialDeps,
|
|
19652
|
+
isTarget: (_key, value) => {
|
|
19653
|
+
if (!Array.isArray(value)) {
|
|
19654
|
+
return false;
|
|
19655
|
+
}
|
|
19656
|
+
const [dsId, methodName] = value;
|
|
19657
|
+
if (!methodName || dsId !== ds.id) {
|
|
19658
|
+
return false;
|
|
19659
|
+
}
|
|
19660
|
+
if (ds.methods?.find((method) => method.name === methodName)) {
|
|
19661
|
+
return true;
|
|
19662
|
+
}
|
|
19663
|
+
if (ds.fields?.find((field) => field.name === methodName)) {
|
|
19664
|
+
return false;
|
|
19665
|
+
}
|
|
19666
|
+
return true;
|
|
19667
|
+
}
|
|
19668
|
+
});
|
|
19669
|
+
const traverseTarget = (targetsList, cb, type) => {
|
|
19670
|
+
for (const targets of Object.values(targetsList)) {
|
|
19671
|
+
for (const target of Object.values(targets)) {
|
|
19672
|
+
if (type && target.type !== type) {
|
|
19673
|
+
continue;
|
|
19674
|
+
}
|
|
19675
|
+
cb(target);
|
|
19676
|
+
}
|
|
19677
|
+
}
|
|
19678
|
+
};
|
|
19679
|
+
|
|
19680
|
+
class Watcher {
|
|
19681
|
+
targetsList = {};
|
|
19682
|
+
childrenProp = "items";
|
|
19683
|
+
idProp = "id";
|
|
19684
|
+
nameProp = "name";
|
|
19685
|
+
constructor(options) {
|
|
19686
|
+
if (options?.initialTargets) {
|
|
19687
|
+
this.targetsList = options.initialTargets;
|
|
19688
|
+
}
|
|
19689
|
+
if (options?.childrenProp) {
|
|
19690
|
+
this.childrenProp = options.childrenProp;
|
|
19691
|
+
}
|
|
19692
|
+
}
|
|
19693
|
+
getTargetsList() {
|
|
19694
|
+
return this.targetsList;
|
|
19695
|
+
}
|
|
19696
|
+
/**
|
|
19697
|
+
* 获取指定类型中的所有target
|
|
19698
|
+
* @param type 分类
|
|
19699
|
+
* @returns Target[]
|
|
19700
|
+
*/
|
|
19701
|
+
getTargets(type = DepTargetType.DEFAULT) {
|
|
19702
|
+
return this.targetsList[type] || {};
|
|
19703
|
+
}
|
|
19704
|
+
/**
|
|
19705
|
+
* 添加新的目标
|
|
19706
|
+
* @param target Target
|
|
19707
|
+
*/
|
|
19708
|
+
addTarget(target) {
|
|
19709
|
+
const targets = this.getTargets(target.type) || {};
|
|
19710
|
+
this.targetsList[target.type] = targets;
|
|
19711
|
+
targets[target.id] = target;
|
|
19712
|
+
}
|
|
19713
|
+
/**
|
|
19714
|
+
* 获取指定id的target
|
|
19715
|
+
* @param id target id
|
|
19716
|
+
* @returns Target
|
|
19717
|
+
*/
|
|
19718
|
+
getTarget(id, type = DepTargetType.DEFAULT) {
|
|
19719
|
+
return this.getTargets(type)[id];
|
|
19720
|
+
}
|
|
19721
|
+
/**
|
|
19722
|
+
* 判断是否存在指定id的target
|
|
19723
|
+
* @param id target id
|
|
19724
|
+
* @returns boolean
|
|
19725
|
+
*/
|
|
19726
|
+
hasTarget(id, type = DepTargetType.DEFAULT) {
|
|
19727
|
+
return Boolean(this.getTarget(id, type));
|
|
19728
|
+
}
|
|
19729
|
+
/**
|
|
19730
|
+
* 判断是否存在指定类型的target
|
|
19731
|
+
* @param type target type
|
|
19732
|
+
* @returns boolean
|
|
19733
|
+
*/
|
|
19734
|
+
hasSpecifiedTypeTarget(type = DepTargetType.DEFAULT) {
|
|
19735
|
+
return Object.keys(this.getTargets(type)).length > 0;
|
|
19736
|
+
}
|
|
19737
|
+
/**
|
|
19738
|
+
* 删除指定id的target
|
|
19739
|
+
* @param id target id
|
|
19740
|
+
*/
|
|
19741
|
+
removeTarget(id, type = DepTargetType.DEFAULT) {
|
|
19742
|
+
const targets = this.getTargets(type);
|
|
19743
|
+
if (targets[id]) {
|
|
19744
|
+
targets[id].destroy();
|
|
19745
|
+
delete targets[id];
|
|
19746
|
+
}
|
|
19747
|
+
}
|
|
19748
|
+
/**
|
|
19749
|
+
* 删除指定分类的所有target
|
|
19750
|
+
* @param type 分类
|
|
19751
|
+
* @returns void
|
|
19752
|
+
*/
|
|
19753
|
+
removeTargets(type = DepTargetType.DEFAULT) {
|
|
19754
|
+
const targets = this.targetsList[type];
|
|
19755
|
+
if (!targets) return;
|
|
19756
|
+
for (const target of Object.values(targets)) {
|
|
19757
|
+
target.destroy();
|
|
19758
|
+
}
|
|
19759
|
+
delete this.targetsList[type];
|
|
19760
|
+
}
|
|
19761
|
+
/**
|
|
19762
|
+
* 删除所有target
|
|
19763
|
+
*/
|
|
19764
|
+
clearTargets() {
|
|
19765
|
+
for (const key of Object.keys(this.targetsList)) {
|
|
19766
|
+
delete this.targetsList[key];
|
|
19767
|
+
}
|
|
19768
|
+
}
|
|
19769
|
+
/**
|
|
19770
|
+
* 收集依赖
|
|
19771
|
+
* @param nodes 需要收集的节点
|
|
19772
|
+
* @param deep 是否需要收集子节点
|
|
19773
|
+
* @param type 强制收集指定类型的依赖
|
|
19774
|
+
*/
|
|
19775
|
+
collect(nodes, depExtendedData = {}, deep = false, type) {
|
|
19776
|
+
this.collectByCallback(nodes, type, ({ node, target }) => {
|
|
19777
|
+
this.removeTargetDep(target, node);
|
|
19778
|
+
this.collectItem(node, target, depExtendedData, deep);
|
|
19779
|
+
});
|
|
19780
|
+
}
|
|
19781
|
+
collectByCallback(nodes, type, cb) {
|
|
19782
|
+
traverseTarget(
|
|
19783
|
+
this.targetsList,
|
|
19784
|
+
(target) => {
|
|
19785
|
+
if (!type && !target.isCollectByDefault) {
|
|
19786
|
+
return;
|
|
19787
|
+
}
|
|
19788
|
+
for (const node of nodes) {
|
|
19789
|
+
cb({ node, target });
|
|
19790
|
+
}
|
|
19791
|
+
},
|
|
19792
|
+
type
|
|
19793
|
+
);
|
|
19794
|
+
}
|
|
19795
|
+
/**
|
|
19796
|
+
* 清除所有目标的依赖
|
|
19797
|
+
* @param nodes 需要清除依赖的节点
|
|
19798
|
+
*/
|
|
19799
|
+
clear(nodes, type) {
|
|
19800
|
+
let { targetsList } = this;
|
|
19801
|
+
if (type) {
|
|
19802
|
+
targetsList = {
|
|
19803
|
+
[type]: this.getTargets(type)
|
|
19804
|
+
};
|
|
19805
|
+
}
|
|
19806
|
+
const clearedItemsNodeIds = [];
|
|
19807
|
+
traverseTarget(targetsList, (target) => {
|
|
19808
|
+
if (nodes) {
|
|
19809
|
+
for (const node of nodes) {
|
|
19810
|
+
target.removeDep(node[this.idProp]);
|
|
19811
|
+
if (Array.isArray(node[this.childrenProp]) && node[this.childrenProp].length && !clearedItemsNodeIds.includes(node[this.idProp])) {
|
|
19812
|
+
clearedItemsNodeIds.push(node[this.idProp]);
|
|
19813
|
+
this.clear(node[this.childrenProp]);
|
|
18775
19814
|
}
|
|
19815
|
+
}
|
|
19816
|
+
} else {
|
|
19817
|
+
target.removeDep();
|
|
19818
|
+
}
|
|
19819
|
+
});
|
|
19820
|
+
}
|
|
19821
|
+
/**
|
|
19822
|
+
* 清除指定类型的依赖
|
|
19823
|
+
* @param type 类型
|
|
19824
|
+
* @param nodes 需要清除依赖的节点
|
|
19825
|
+
*/
|
|
19826
|
+
clearByType(type, nodes) {
|
|
19827
|
+
this.clear(nodes, type);
|
|
19828
|
+
}
|
|
19829
|
+
collectItem(node, target, depExtendedData = {}, deep = false) {
|
|
19830
|
+
const dataSourceTargetTypes = [
|
|
19831
|
+
DepTargetType.DATA_SOURCE,
|
|
19832
|
+
DepTargetType.DATA_SOURCE_COND,
|
|
19833
|
+
DepTargetType.DATA_SOURCE_METHOD
|
|
19834
|
+
];
|
|
19835
|
+
if (node[NODE_DISABLE_DATA_SOURCE_KEY] && dataSourceTargetTypes.includes(target.type)) {
|
|
19836
|
+
return;
|
|
19837
|
+
}
|
|
19838
|
+
if (node[NODE_DISABLE_CODE_BLOCK_KEY] && target.type === DepTargetType.CODE_BLOCK) {
|
|
19839
|
+
return;
|
|
19840
|
+
}
|
|
19841
|
+
const collectTarget = (config, prop = "") => {
|
|
19842
|
+
const doCollect = (key, value) => {
|
|
19843
|
+
const keyIsItems = key === this.childrenProp;
|
|
19844
|
+
const fullKey = prop ? \`\${prop}.\${key}\` : key;
|
|
19845
|
+
if (target.isTarget(fullKey, value)) {
|
|
19846
|
+
target.updateDep({
|
|
19847
|
+
id: node[this.idProp],
|
|
19848
|
+
name: \`\${node[this.nameProp] || node[this.idProp]}\`,
|
|
19849
|
+
data: depExtendedData,
|
|
19850
|
+
key: fullKey
|
|
19851
|
+
});
|
|
19852
|
+
} else if (!keyIsItems && Array.isArray(value)) {
|
|
19853
|
+
for (let i = 0, l = value.length; i < l; i++) {
|
|
19854
|
+
const item = value[i];
|
|
19855
|
+
if (isObject(item)) {
|
|
19856
|
+
collectTarget(item, \`\${fullKey}[\${i}]\`);
|
|
19857
|
+
}
|
|
19858
|
+
}
|
|
19859
|
+
} else if (isObject(value)) {
|
|
19860
|
+
collectTarget(value, fullKey);
|
|
19861
|
+
}
|
|
19862
|
+
if (keyIsItems && deep && Array.isArray(value)) {
|
|
19863
|
+
for (const child of value) {
|
|
19864
|
+
this.collectItem(child, target, depExtendedData, deep);
|
|
19865
|
+
}
|
|
19866
|
+
}
|
|
19867
|
+
};
|
|
19868
|
+
for (const [key, value] of Object.entries(config)) {
|
|
19869
|
+
if (typeof value === "undefined" || value === "") continue;
|
|
19870
|
+
doCollect(key, value);
|
|
19871
|
+
}
|
|
19872
|
+
};
|
|
19873
|
+
collectTarget(node);
|
|
19874
|
+
}
|
|
19875
|
+
removeTargetDep(target, node, key) {
|
|
19876
|
+
target.removeDep(node[this.idProp], key);
|
|
19877
|
+
if (typeof key === "undefined" && Array.isArray(node[this.childrenProp]) && node[this.childrenProp].length) {
|
|
19878
|
+
for (const item of node[this.childrenProp]) {
|
|
19879
|
+
this.removeTargetDep(target, item, key);
|
|
19880
|
+
}
|
|
19881
|
+
}
|
|
19882
|
+
}
|
|
19883
|
+
}
|
|
19884
|
+
|
|
19885
|
+
const error = (...args) => {
|
|
19886
|
+
if (process.env.NODE_ENV === "development") {
|
|
19887
|
+
console.error("magic editor: ", ...args);
|
|
19888
|
+
}
|
|
19889
|
+
};
|
|
19890
|
+
|
|
19891
|
+
onmessage = (e) => {
|
|
19892
|
+
const watcher = new Watcher({ initialTargets: {} });
|
|
19893
|
+
const { dsl } = e.data;
|
|
19894
|
+
try {
|
|
19895
|
+
const mApp = eval(\`(\${dsl})\`);
|
|
19896
|
+
if (!mApp) {
|
|
19897
|
+
postMessage({});
|
|
19898
|
+
}
|
|
19899
|
+
watcher.clearTargets();
|
|
19900
|
+
if (mApp.codeBlocks) {
|
|
19901
|
+
for (const [id, code] of Object.entries(mApp.codeBlocks)) {
|
|
19902
|
+
watcher.addTarget(createCodeBlockTarget(id, code));
|
|
19903
|
+
}
|
|
19904
|
+
}
|
|
19905
|
+
if (mApp.dataSources) {
|
|
19906
|
+
for (const ds of mApp.dataSources) {
|
|
19907
|
+
watcher.addTarget(createDataSourceTarget(ds, {}));
|
|
19908
|
+
watcher.addTarget(createDataSourceMethodTarget(ds, {}));
|
|
19909
|
+
watcher.addTarget(createDataSourceCondTarget(ds, {}));
|
|
19910
|
+
}
|
|
19911
|
+
}
|
|
19912
|
+
watcher.collectByCallback(mApp.items, void 0, ({ node, target }) => {
|
|
19913
|
+
watcher.collectItem(node, target, { pageId: node.id }, true);
|
|
19914
|
+
});
|
|
19915
|
+
const data = {
|
|
19916
|
+
[DepTargetType.DATA_SOURCE]: {},
|
|
19917
|
+
[DepTargetType.DATA_SOURCE_METHOD]: {},
|
|
19918
|
+
[DepTargetType.DATA_SOURCE_COND]: {},
|
|
19919
|
+
[DepTargetType.CODE_BLOCK]: {}
|
|
19920
|
+
};
|
|
19921
|
+
traverseTarget(watcher.getTargetsList(), (target) => {
|
|
19922
|
+
data[target.type][target.id] = target.deps;
|
|
19923
|
+
});
|
|
19924
|
+
postMessage(data);
|
|
19925
|
+
} catch (e2) {
|
|
19926
|
+
error(e2);
|
|
19927
|
+
postMessage({});
|
|
19928
|
+
}
|
|
19929
|
+
};
|
|
19930
|
+
|
|
19931
|
+
})();
|
|
19932
|
+
`;
|
|
19933
|
+
const blob = typeof self !== "undefined" && self.Blob && new Blob([jsContent], { type: "text/javascript;charset=utf-8" });
|
|
19934
|
+
function WorkerWrapper(options) {
|
|
19935
|
+
let objURL;
|
|
19936
|
+
try {
|
|
19937
|
+
objURL = blob && (self.URL || self.webkitURL).createObjectURL(blob);
|
|
19938
|
+
if (!objURL) throw "";
|
|
19939
|
+
const worker = new Worker(objURL, {
|
|
19940
|
+
name: options?.name
|
|
19941
|
+
});
|
|
19942
|
+
worker.addEventListener("error", () => {
|
|
19943
|
+
(self.URL || self.webkitURL).revokeObjectURL(objURL);
|
|
19944
|
+
});
|
|
19945
|
+
return worker;
|
|
19946
|
+
} catch (e) {
|
|
19947
|
+
return new Worker(
|
|
19948
|
+
"data:text/javascript;charset=utf-8," + encodeURIComponent(jsContent),
|
|
19949
|
+
{
|
|
19950
|
+
name: options?.name
|
|
19951
|
+
}
|
|
19952
|
+
);
|
|
19953
|
+
} finally {
|
|
19954
|
+
objURL && (self.URL || self.webkitURL).revokeObjectURL(objURL);
|
|
19955
|
+
}
|
|
19956
|
+
}
|
|
18776
19957
|
|
|
18777
19958
|
class Dep extends BaseService {
|
|
18778
19959
|
state = vue.shallowReactive({
|
|
@@ -19134,6 +20315,11 @@
|
|
|
19134
20315
|
const { command, keybinding, when } = keybindingItem;
|
|
19135
20316
|
for (const [type = "", eventType = "keydown"] of when) {
|
|
19136
20317
|
const cacheItem = { type, command, keybinding, eventType, bound: false };
|
|
20318
|
+
if (this.bindingList.find(
|
|
20319
|
+
(item) => item.command === command && item.eventType === eventType && item.type === type && item.keybinding === keybinding
|
|
20320
|
+
)) {
|
|
20321
|
+
continue;
|
|
20322
|
+
}
|
|
19137
20323
|
this.bindingList.push(cacheItem);
|
|
19138
20324
|
}
|
|
19139
20325
|
}
|
|
@@ -19257,9 +20443,9 @@
|
|
|
19257
20443
|
createStage(stageOptions = {}) {
|
|
19258
20444
|
return useStage({
|
|
19259
20445
|
...stageOptions,
|
|
19260
|
-
zoom: 1,
|
|
19261
20446
|
runtimeUrl: "",
|
|
19262
20447
|
autoScrollIntoView: false,
|
|
20448
|
+
disabledRule: true,
|
|
19263
20449
|
render: async (stage) => {
|
|
19264
20450
|
this.copyDocumentElement();
|
|
19265
20451
|
const rootEls = stage.renderer?.getDocument()?.body.children;
|
|
@@ -19361,6 +20547,8 @@
|
|
|
19361
20547
|
containerHighlightDuration: 800,
|
|
19362
20548
|
containerHighlightType: StageCore.ContainerHighlightType.DEFAULT,
|
|
19363
20549
|
disabledShowSrc: false,
|
|
20550
|
+
disabledDataSource: false,
|
|
20551
|
+
disabledCodeBlock: false,
|
|
19364
20552
|
componentGroupList: () => [],
|
|
19365
20553
|
datasourceList: () => [],
|
|
19366
20554
|
menu: () => ({ left: [], right: [] }),
|
|
@@ -19517,6 +20705,20 @@
|
|
|
19517
20705
|
immediate: true
|
|
19518
20706
|
}
|
|
19519
20707
|
);
|
|
20708
|
+
vue.watch(
|
|
20709
|
+
() => props.disabledCodeBlock,
|
|
20710
|
+
(disabledCodeBlock) => propsService.setDisabledCodeBlock(disabledCodeBlock ?? false),
|
|
20711
|
+
{
|
|
20712
|
+
immediate: true
|
|
20713
|
+
}
|
|
20714
|
+
);
|
|
20715
|
+
vue.watch(
|
|
20716
|
+
() => props.disabledDataSource,
|
|
20717
|
+
(disabledDataSource) => propsService.setDisabledDataSource(disabledDataSource ?? false),
|
|
20718
|
+
{
|
|
20719
|
+
immediate: true
|
|
20720
|
+
}
|
|
20721
|
+
);
|
|
19520
20722
|
vue.onBeforeUnmount(() => {
|
|
19521
20723
|
editorService.resetState();
|
|
19522
20724
|
historyService.resetState();
|
|
@@ -19530,13 +20732,14 @@
|
|
|
19530
20732
|
};
|
|
19531
20733
|
const initServiceEvents = (props, emit, { editorService, codeBlockService, dataSourceService, depService }) => {
|
|
19532
20734
|
let getTMagicAppPrimise = null;
|
|
19533
|
-
const getTMagicApp = () => {
|
|
19534
|
-
const
|
|
20735
|
+
const getTMagicApp = async () => {
|
|
20736
|
+
const stage = await getStage();
|
|
20737
|
+
const { renderer } = stage;
|
|
19535
20738
|
if (!renderer) {
|
|
19536
|
-
return
|
|
20739
|
+
return void 0;
|
|
19537
20740
|
}
|
|
19538
20741
|
if (renderer.runtime) {
|
|
19539
|
-
return
|
|
20742
|
+
return renderer.runtime.getApp?.();
|
|
19540
20743
|
}
|
|
19541
20744
|
if (getTMagicAppPrimise) {
|
|
19542
20745
|
return getTMagicAppPrimise;
|
|
@@ -19618,6 +20821,50 @@
|
|
|
19618
20821
|
});
|
|
19619
20822
|
}
|
|
19620
20823
|
);
|
|
20824
|
+
const getStage = () => {
|
|
20825
|
+
const stage = editorService.get("stage");
|
|
20826
|
+
if (stage) {
|
|
20827
|
+
return Promise.resolve(stage);
|
|
20828
|
+
}
|
|
20829
|
+
return new Promise((resolve) => {
|
|
20830
|
+
const unWatch = vue.watch(
|
|
20831
|
+
() => editorService.get("stage"),
|
|
20832
|
+
(stage2) => {
|
|
20833
|
+
if (stage2) {
|
|
20834
|
+
resolve(stage2);
|
|
20835
|
+
vue.nextTick(() => {
|
|
20836
|
+
unWatch();
|
|
20837
|
+
});
|
|
20838
|
+
}
|
|
20839
|
+
}
|
|
20840
|
+
);
|
|
20841
|
+
});
|
|
20842
|
+
};
|
|
20843
|
+
const updateStageDsl = async (value) => {
|
|
20844
|
+
const stage = await getStage();
|
|
20845
|
+
const runtime = await stage.renderer?.getRuntime();
|
|
20846
|
+
const app = await getTMagicApp();
|
|
20847
|
+
if (!app?.dataSourceManager) {
|
|
20848
|
+
runtime?.updateRootConfig?.(cloneDeep(vue.toRaw(value)));
|
|
20849
|
+
}
|
|
20850
|
+
const page = editorService.get("page");
|
|
20851
|
+
const node = editorService.get("node");
|
|
20852
|
+
page?.id && runtime?.updatePageId?.(page.id);
|
|
20853
|
+
setTimeout(() => {
|
|
20854
|
+
node && stage?.select(vue.toRaw(node.id));
|
|
20855
|
+
});
|
|
20856
|
+
if (value) {
|
|
20857
|
+
depService.clearIdleTasks();
|
|
20858
|
+
const dsl = cloneDeep(vue.toRaw(value));
|
|
20859
|
+
await (typeof Worker === "undefined" ? collectIdle(dsl.items, true) : depService.collectByWorker(dsl));
|
|
20860
|
+
if (dsl.dataSources && dsl.dataSourceDeps && app?.dataSourceManager) {
|
|
20861
|
+
for (const node2 of utils.getNodes(utils.getDepNodeIds(dsl.dataSourceDeps), dsl.items)) {
|
|
20862
|
+
core.updateNode(app.dataSourceManager.compiledNode(node2), dsl);
|
|
20863
|
+
}
|
|
20864
|
+
}
|
|
20865
|
+
runtime?.updateRootConfig?.(dsl);
|
|
20866
|
+
}
|
|
20867
|
+
};
|
|
19621
20868
|
const initDataSourceDepTarget = (ds) => {
|
|
19622
20869
|
depService.addTarget(core.createDataSourceTarget(ds, vue.reactive({})));
|
|
19623
20870
|
depService.addTarget(core.createDataSourceMethodTarget(ds, vue.reactive({})));
|
|
@@ -19637,10 +20884,7 @@
|
|
|
19637
20884
|
initDataSourceDepTarget(ds);
|
|
19638
20885
|
}
|
|
19639
20886
|
if (Array.isArray(value.items)) {
|
|
19640
|
-
|
|
19641
|
-
(typeof Worker === "undefined" ? collectIdle(value.items, true) : depService.collectByWorker(value)).then(() => {
|
|
19642
|
-
updateStageNodes(value.items);
|
|
19643
|
-
});
|
|
20887
|
+
updateStageDsl(value);
|
|
19644
20888
|
} else {
|
|
19645
20889
|
depService.clear();
|
|
19646
20890
|
delete value.dataSourceDeps;
|
|
@@ -19933,6 +21177,8 @@
|
|
|
19933
21177
|
disabledPageFragment: { type: Boolean },
|
|
19934
21178
|
disabledStageOverlay: { type: Boolean },
|
|
19935
21179
|
disabledShowSrc: { type: Boolean },
|
|
21180
|
+
disabledDataSource: { type: Boolean },
|
|
21181
|
+
disabledCodeBlock: { type: Boolean },
|
|
19936
21182
|
treeIndent: {},
|
|
19937
21183
|
treeNextLevelIndentIncrement: {},
|
|
19938
21184
|
render: { type: Function },
|
|
@@ -19944,7 +21190,7 @@
|
|
|
19944
21190
|
pageBarSortOptions: {},
|
|
19945
21191
|
pageFilterFunction: { type: Function }
|
|
19946
21192
|
}, defaultEditorProps),
|
|
19947
|
-
emits: ["props-panel-mounted", "update:modelValue", "props-form-error", "props-submit-error"],
|
|
21193
|
+
emits: ["props-panel-mounted", "props-panel-unmounted", "update:modelValue", "props-form-error", "props-submit-error"],
|
|
19948
21194
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
19949
21195
|
const emit = __emit;
|
|
19950
21196
|
const props = __props;
|
|
@@ -20003,6 +21249,9 @@
|
|
|
20003
21249
|
const propsPanelMountedHandler = (e) => {
|
|
20004
21250
|
emit("props-panel-mounted", e);
|
|
20005
21251
|
};
|
|
21252
|
+
const propsPanelUnmountedHandler = () => {
|
|
21253
|
+
emit("props-panel-unmounted");
|
|
21254
|
+
};
|
|
20006
21255
|
const propsPanelSubmitErrorHandler = (e) => {
|
|
20007
21256
|
emit("props-submit-error", e);
|
|
20008
21257
|
};
|
|
@@ -20107,6 +21356,7 @@
|
|
|
20107
21356
|
"extend-state": _ctx.extendFormState,
|
|
20108
21357
|
"disabled-show-src": _ctx.disabledShowSrc,
|
|
20109
21358
|
onMounted: propsPanelMountedHandler,
|
|
21359
|
+
onUnmounted: propsPanelUnmountedHandler,
|
|
20110
21360
|
onFormError: propsPanelFormErrorHandler,
|
|
20111
21361
|
onSubmitError: propsPanelSubmitErrorHandler
|
|
20112
21362
|
}, {
|
|
@@ -20151,7 +21401,9 @@
|
|
|
20151
21401
|
|
|
20152
21402
|
const defaultInstallOpt = {
|
|
20153
21403
|
// eslint-disable-next-line no-eval
|
|
20154
|
-
parseDSL: (dsl) => eval(dsl)
|
|
21404
|
+
parseDSL: (dsl) => eval(dsl),
|
|
21405
|
+
customCreateMonacoEditor: (monaco, codeEditorEl, options) => monaco.editor.create(codeEditorEl, options),
|
|
21406
|
+
customCreateMonacoDiffEditor: (monaco, codeEditorEl, options) => monaco.editor.createDiffEditor(codeEditorEl, options)
|
|
20155
21407
|
};
|
|
20156
21408
|
const index = {
|
|
20157
21409
|
install: (app, opt) => {
|