element-less 0.0.59 → 0.0.60
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/element-less.cjs +1 -1
- package/element-less.iife.js +1 -1
- package/element-less.js +1 -1
- package/element-less.umd.cjs +1 -1
- package/{index-MWurG0GS.js → index-B3gKKAuH.js} +116 -12
- package/{index-xLaB9nEb.cjs → index-C1528TKm.cjs} +1 -1
- package/{inner-frTCxHRb.js → inner-DcyBCxEU.js} +1 -1
- package/{inner-Do6X5BKD.cjs → inner-IgIIiP37.cjs} +1 -1
- package/{innerItem-6jjczNMN.js → innerItem-B7YlXTWE.js} +1 -1
- package/{innerItem-ChfE0m96.cjs → innerItem-CLI4Q3_9.cjs} +1 -1
- package/{mode-csharp-DMUZXPUb.cjs → mode-csharp-BaSdHqEj.cjs} +1 -1
- package/{mode-csharp-CJbnBiAM.js → mode-csharp-CeawYoKB.js} +1 -1
- package/{mode-css-ahvzq88w.cjs → mode-css-DtGahwXM.cjs} +1 -1
- package/{mode-css-BbPnszzY.js → mode-css-oOW9LZxM.js} +1 -1
- package/{mode-javascript-Ps1PYrL2.cjs → mode-javascript-DNNf1vtw.cjs} +1 -1
- package/{mode-javascript-Dsq67B_5.js → mode-javascript-Um7L44Eo.js} +1 -1
- package/{mode-json-BEsOdBY4.js → mode-json-Cto-DCln.js} +1 -1
- package/{mode-json-CHVIdOM7.cjs → mode-json-D6r7CiV5.cjs} +1 -1
- package/{mode-mysql-Cj4XZrWT.js → mode-mysql-CGwsxeGV.js} +1 -1
- package/{mode-mysql-BF4ihCVO.cjs → mode-mysql-CwqBsdzv.cjs} +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
|
@@ -72877,7 +72877,7 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
|
72877
72877
|
emits: /* @__PURE__ */ mergeModels(["removeItem"], ["update:children"]),
|
|
72878
72878
|
setup(__props, { emit: __emit }) {
|
|
72879
72879
|
const DynamicDesignerInnerItem = defineAsyncComponent(() => {
|
|
72880
|
-
return import("./innerItem-
|
|
72880
|
+
return import("./innerItem-B7YlXTWE.js");
|
|
72881
72881
|
});
|
|
72882
72882
|
const { getValue: getValue2 } = useProps();
|
|
72883
72883
|
const tagID = getValue2("tagID");
|
|
@@ -73367,6 +73367,27 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
73367
73367
|
}
|
|
73368
73368
|
});
|
|
73369
73369
|
}
|
|
73370
|
+
const conditionBuilderTypes = [{
|
|
73371
|
+
componentName: "ElsConditionBuilder",
|
|
73372
|
+
label: "条件构建器",
|
|
73373
|
+
value: "ConditionBuilder",
|
|
73374
|
+
type: "ConditionBuilder",
|
|
73375
|
+
group: "Form",
|
|
73376
|
+
formItem: true,
|
|
73377
|
+
dataTypes: ["String"],
|
|
73378
|
+
isShow: false
|
|
73379
|
+
}];
|
|
73380
|
+
const expressionInputTypes = [{
|
|
73381
|
+
componentName: "ElsExpressionInput",
|
|
73382
|
+
label: "表达式输入框",
|
|
73383
|
+
value: "ExpressionInput",
|
|
73384
|
+
type: "ExpressionInput",
|
|
73385
|
+
group: "Form",
|
|
73386
|
+
formItem: true,
|
|
73387
|
+
dataTypes: ["String"],
|
|
73388
|
+
isShow: false
|
|
73389
|
+
}];
|
|
73390
|
+
currComponentTypes.value.push(...conditionBuilderTypes, ...expressionInputTypes);
|
|
73370
73391
|
const dynamicHandler = new DynamicHandler(currDynamicDataType.value, currComponentTypes.value);
|
|
73371
73392
|
function getConverToJsonResult(obj2) {
|
|
73372
73393
|
return dynamicHandler.jsonToConfig(obj2);
|
|
@@ -73557,6 +73578,72 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
73557
73578
|
}
|
|
73558
73579
|
return props2.visibleFields.includes(field);
|
|
73559
73580
|
}
|
|
73581
|
+
const SELECT_TYPES_DESIGNER = ["Select", "Radio", "Checkbox"];
|
|
73582
|
+
function resolveTypeName(dataType) {
|
|
73583
|
+
var _a;
|
|
73584
|
+
return ((_a = currDynamicDataType.value.find((dt2) => dt2.value === dataType)) == null ? void 0 : _a.type) || dataType || "";
|
|
73585
|
+
}
|
|
73586
|
+
function resolveComponentTypeName(componentType) {
|
|
73587
|
+
var _a;
|
|
73588
|
+
return ((_a = currComponentTypes.value.find((ct2) => ct2.value === componentType)) == null ? void 0 : _a.type) || componentType || "";
|
|
73589
|
+
}
|
|
73590
|
+
const allFormFields = computed(() => {
|
|
73591
|
+
const result = [];
|
|
73592
|
+
function collect(items, containerPath = [], containerKeyNames = []) {
|
|
73593
|
+
var _a, _b;
|
|
73594
|
+
if (!items) return;
|
|
73595
|
+
for (const item of items) {
|
|
73596
|
+
const dataTypeName = resolveTypeName(item.dataType);
|
|
73597
|
+
const isObjContainer = dataTypeName === "Object" && item.keyCode && !item.componentType;
|
|
73598
|
+
const isArrayContainer = dataTypeName === "Array";
|
|
73599
|
+
if (item.keyCode && dataTypeName !== "Object" && dataTypeName !== "None" && dataTypeName !== "Array") {
|
|
73600
|
+
const typeName = resolveComponentTypeName(item.componentType);
|
|
73601
|
+
result.push({
|
|
73602
|
+
keyCode: item.keyCode,
|
|
73603
|
+
keyName: item.keyName,
|
|
73604
|
+
dataTypeName: dataTypeName || "String",
|
|
73605
|
+
containerPath,
|
|
73606
|
+
containerKeyNames,
|
|
73607
|
+
componentType: typeName,
|
|
73608
|
+
componentOptions: SELECT_TYPES_DESIGNER.includes(typeName) ? ((_b = (_a = item.config) == null ? void 0 : _a.baseConfig) == null ? void 0 : _b.data) || null : null
|
|
73609
|
+
});
|
|
73610
|
+
}
|
|
73611
|
+
if (!isArrayContainer) {
|
|
73612
|
+
const newPath = isObjContainer ? [...containerPath, item.keyCode] : containerPath;
|
|
73613
|
+
const newNames = isObjContainer ? [...containerKeyNames, item.keyName || item.keyCode] : containerKeyNames;
|
|
73614
|
+
collect(item.children || [], newPath, newNames);
|
|
73615
|
+
}
|
|
73616
|
+
}
|
|
73617
|
+
}
|
|
73618
|
+
collect(designerObj.value);
|
|
73619
|
+
return result;
|
|
73620
|
+
});
|
|
73621
|
+
function findItemContextDesigner(targetKeyID) {
|
|
73622
|
+
function traverse(items) {
|
|
73623
|
+
for (const item of items || []) {
|
|
73624
|
+
const children = item.children || [];
|
|
73625
|
+
if (children.some((c) => c.keyID === targetKeyID)) {
|
|
73626
|
+
return { siblings: children.filter((c) => c.keyID !== targetKeyID), parent: item };
|
|
73627
|
+
}
|
|
73628
|
+
const result = traverse(children);
|
|
73629
|
+
if (result) return result;
|
|
73630
|
+
}
|
|
73631
|
+
return null;
|
|
73632
|
+
}
|
|
73633
|
+
return traverse(designerObj.value);
|
|
73634
|
+
}
|
|
73635
|
+
function toFieldItemDesigner(item) {
|
|
73636
|
+
var _a, _b;
|
|
73637
|
+
const dataTypeName = resolveTypeName(item.dataType);
|
|
73638
|
+
const typeName = resolveComponentTypeName(item.componentType);
|
|
73639
|
+
return {
|
|
73640
|
+
keyCode: item.keyCode,
|
|
73641
|
+
keyName: item.keyName,
|
|
73642
|
+
dataTypeName: dataTypeName || "String",
|
|
73643
|
+
componentType: typeName,
|
|
73644
|
+
componentOptions: SELECT_TYPES_DESIGNER.includes(typeName) ? ((_b = (_a = item.config) == null ? void 0 : _a.baseConfig) == null ? void 0 : _b.data) || null : null
|
|
73645
|
+
};
|
|
73646
|
+
}
|
|
73560
73647
|
initData();
|
|
73561
73648
|
setValue({
|
|
73562
73649
|
"tagID": "els-dynamic-designer-" + utils.shortid(),
|
|
@@ -73570,7 +73657,24 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
73570
73657
|
setSelectItem,
|
|
73571
73658
|
openCreateType,
|
|
73572
73659
|
openCreateComponent,
|
|
73573
|
-
getConverToJsonResult
|
|
73660
|
+
getConverToJsonResult,
|
|
73661
|
+
getAllFormFields: () => allFormFields.value,
|
|
73662
|
+
getGlobalDataTemplate: () => null,
|
|
73663
|
+
getSiblingFields: () => {
|
|
73664
|
+
if (!currSelectItemKey.value) return allFormFields.value;
|
|
73665
|
+
const ctx = findItemContextDesigner(currSelectItemKey.value);
|
|
73666
|
+
if (!ctx) return allFormFields.value;
|
|
73667
|
+
return ctx.siblings.filter((item) => item.keyCode && resolveTypeName(item.dataType) !== "None" && resolveTypeName(item.dataType) !== "Object").map(toFieldItemDesigner);
|
|
73668
|
+
},
|
|
73669
|
+
getParentFields: () => {
|
|
73670
|
+
if (!currSelectItemKey.value) return [];
|
|
73671
|
+
const ctx = findItemContextDesigner(currSelectItemKey.value);
|
|
73672
|
+
if (!(ctx == null ? void 0 : ctx.parent)) return [];
|
|
73673
|
+
const parentCtx = findItemContextDesigner(ctx.parent.keyID);
|
|
73674
|
+
const parentSiblings = ((parentCtx == null ? void 0 : parentCtx.siblings) || []).filter((item) => item.keyCode && resolveTypeName(item.dataType) !== "None" && resolveTypeName(item.dataType) !== "Object").map(toFieldItemDesigner);
|
|
73675
|
+
const parentSelf = ctx.parent.keyCode ? [toFieldItemDesigner(ctx.parent)] : [];
|
|
73676
|
+
return [...parentSelf, ...parentSiblings];
|
|
73677
|
+
}
|
|
73574
73678
|
});
|
|
73575
73679
|
__expose({
|
|
73576
73680
|
initData,
|
|
@@ -73628,7 +73732,7 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
73628
73732
|
};
|
|
73629
73733
|
}
|
|
73630
73734
|
});
|
|
73631
|
-
const Designer = /* @__PURE__ */ _export_sfc$1(_sfc_main$1k, [["__scopeId", "data-v-
|
|
73735
|
+
const Designer = /* @__PURE__ */ _export_sfc$1(_sfc_main$1k, [["__scopeId", "data-v-abd9a30e"]]);
|
|
73632
73736
|
const ElsDynamicDesigner = withInstall$1(Designer);
|
|
73633
73737
|
const renderProps = buildProps({
|
|
73634
73738
|
...formItemProps$1,
|
|
@@ -73727,10 +73831,10 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
73727
73831
|
emits: ["update:modelValue"],
|
|
73728
73832
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
73729
73833
|
const DynamicRenderInner = defineAsyncComponent(() => {
|
|
73730
|
-
return import("./inner-
|
|
73834
|
+
return import("./inner-DcyBCxEU.js").then((n) => n.i);
|
|
73731
73835
|
});
|
|
73732
73836
|
const DynamicRenderForm = defineAsyncComponent(() => {
|
|
73733
|
-
return import("./inner-
|
|
73837
|
+
return import("./inner-DcyBCxEU.js").then((n) => n.f);
|
|
73734
73838
|
});
|
|
73735
73839
|
const props2 = __props;
|
|
73736
73840
|
const { getValue: getValue2, setValue, formNodeProps } = useProps(props2);
|
|
@@ -73960,10 +74064,10 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
73960
74064
|
emits: ["update:modelValue"],
|
|
73961
74065
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
73962
74066
|
const DynamicRenderInnerAsync = defineAsyncComponent(() => {
|
|
73963
|
-
return import("./inner-
|
|
74067
|
+
return import("./inner-DcyBCxEU.js").then((n) => n.i);
|
|
73964
74068
|
});
|
|
73965
74069
|
const DynamicRenderFormAsync = defineAsyncComponent(() => {
|
|
73966
|
-
return import("./inner-
|
|
74070
|
+
return import("./inner-DcyBCxEU.js").then((n) => n.f);
|
|
73967
74071
|
});
|
|
73968
74072
|
const props2 = __props;
|
|
73969
74073
|
const { getValue: getValue2, setValue, formNodeProps } = useProps(props2);
|
|
@@ -79091,31 +79195,31 @@ let AceEditor$1 = class AceEditor extends TBaseFormItem {
|
|
|
79091
79195
|
__publicField(this, "editor", ref());
|
|
79092
79196
|
onMounted(() => {
|
|
79093
79197
|
if (props2.language === "json") {
|
|
79094
|
-
const currModule = import("./mode-json-
|
|
79198
|
+
const currModule = import("./mode-json-Cto-DCln.js").then((n) => n.m);
|
|
79095
79199
|
currModule.then((res) => {
|
|
79096
79200
|
ace.config.setModuleUrl("ace/mode/json", res);
|
|
79097
79201
|
this.init();
|
|
79098
79202
|
});
|
|
79099
79203
|
} else if (props2.language === "javascript") {
|
|
79100
|
-
const currModule = import("./mode-javascript-
|
|
79204
|
+
const currModule = import("./mode-javascript-Um7L44Eo.js").then((n) => n.m);
|
|
79101
79205
|
currModule.then((res) => {
|
|
79102
79206
|
ace.config.setModuleUrl("ace/mode/javascript", res);
|
|
79103
79207
|
this.init();
|
|
79104
79208
|
});
|
|
79105
79209
|
} else if (props2.language === "csharp") {
|
|
79106
|
-
const currModule = import("./mode-csharp-
|
|
79210
|
+
const currModule = import("./mode-csharp-CeawYoKB.js").then((n) => n.m);
|
|
79107
79211
|
currModule.then((res) => {
|
|
79108
79212
|
ace.config.setModuleUrl("ace/mode/csharp", res);
|
|
79109
79213
|
this.init();
|
|
79110
79214
|
});
|
|
79111
79215
|
} else if (props2.language === "mysql") {
|
|
79112
|
-
const currModule = import("./mode-mysql-
|
|
79216
|
+
const currModule = import("./mode-mysql-CGwsxeGV.js").then((n) => n.m);
|
|
79113
79217
|
currModule.then((res) => {
|
|
79114
79218
|
ace.config.setModuleUrl("ace/mode/mysql", res);
|
|
79115
79219
|
this.init();
|
|
79116
79220
|
});
|
|
79117
79221
|
} else if (props2.language === "css") {
|
|
79118
|
-
const currModule = import("./mode-css-
|
|
79222
|
+
const currModule = import("./mode-css-oOW9LZxM.js").then((n) => n.m);
|
|
79119
79223
|
currModule.then((res) => {
|
|
79120
79224
|
ace.config.setModuleUrl("ace/mode/css", res);
|
|
79121
79225
|
this.init();
|