x-prop-tree 0.8.29 → 0.8.31
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/index.d.ts +2 -2
- package/dist/index.js +106 -77
- package/dist/{vendor.o2dszt6f.js → vendor.mu9vrf3y.js} +1993 -1889
- package/package.json +20 -20
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/i18n/index.d.ts
|
|
2
|
-
declare function loadLocaleMessagePropTree(locale: string): Promise<{
|
|
2
|
+
export declare function loadLocaleMessagePropTree(locale: string): Promise<{
|
|
3
3
|
'x-prop-tree': {
|
|
4
4
|
copy: string;
|
|
5
5
|
jsonEditor: string;
|
|
@@ -19,4 +19,4 @@ declare const _default: {
|
|
|
19
19
|
install: (app: import("vue").App) => void;
|
|
20
20
|
};
|
|
21
21
|
//#endregion
|
|
22
|
-
export { _default as default
|
|
22
|
+
export { _default as default };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(){try{document.getElementById(`x-prop-tree`)?.remove();const e = document.createElement(`style`);e.setAttribute(`id`, `x-prop-tree`);const t = document.createTextNode(``);e.appendChild(t);document.head.appendChild(e);}catch(e){console.error('rolldown-plugin-inject-css', e);}})()
|
|
2
|
-
import { n as isEqual, r as cloneDeep, t as omit } from "./vendor.
|
|
2
|
+
import { n as isEqual, r as cloneDeep, t as omit } from "./vendor.mu9vrf3y.js";
|
|
3
3
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, h, inject, isRef, mergeModels, mergeProps, normalizeStyle, onBeforeUnmount, onMounted, onUnmounted, openBlock, provide, ref, renderList, renderSlot, resolveComponent, resolveDirective, toDisplayString, unref, useId, useModel, useTemplateRef, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
4
4
|
import { eventBus, globalObjects, injectDark, injectLocale, openNumberDlg, openPromptDlg, useColor, useSystem, useViewStack } from "x-essential-lib";
|
|
5
5
|
import { getElement, getItems, getPropertyDefault, getPropertyDefaultArray, getTag, getTypes, isHexColor, isThemeColor, makeSlotId, parseNumberUnit, pkgs, rules, themeColors, unwrapSlotId } from "x-runtime-lib";
|
|
@@ -166,9 +166,10 @@ function execProperty$1(keys, property, object, state, arrayIndex, isBranch, lea
|
|
|
166
166
|
warning: state.warning
|
|
167
167
|
};
|
|
168
168
|
}
|
|
169
|
-
if (property.ui)
|
|
170
|
-
|
|
171
|
-
|
|
169
|
+
if (property.ui) {
|
|
170
|
+
if (property.array && !leafArrayEntry) return execPropertyLeafArray(keys, property, object, state, arrayIndex, isBranch);
|
|
171
|
+
else return execPropertyLeafScalar(property, object, state, arrayIndex, isBranch);
|
|
172
|
+
} else if (property.array) return execPropertyBranchArray(keys, property, object, state, arrayIndex, isBranch);
|
|
172
173
|
else return execPropertyBranchScalar(keys, property, object, state, arrayIndex, isBranch);
|
|
173
174
|
}
|
|
174
175
|
function execPropertyBranchArray(keys, property, object, state, arrayIndex, isBranch) {
|
|
@@ -441,14 +442,25 @@ function resetProperty(root, properties, keys, changeEvent) {
|
|
|
441
442
|
if (!property) return;
|
|
442
443
|
if (property.ui) {
|
|
443
444
|
if (property.readonly || property.static) return;
|
|
444
|
-
if (property.array)
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
445
|
+
if (property.array) {
|
|
446
|
+
if (typeof lastKey === "string") {
|
|
447
|
+
const object = unpkgObject(root, keys.slice(0, -1));
|
|
448
|
+
if (!object) return;
|
|
449
|
+
const oldValue = object[lastKey];
|
|
450
|
+
const newValue = getPropertyDefaultArray(property);
|
|
451
|
+
if (!isEqual(newValue, oldValue)) {
|
|
452
|
+
object[lastKey] = newValue;
|
|
453
|
+
changeEvent(keys, newValue);
|
|
454
|
+
}
|
|
455
|
+
} else {
|
|
456
|
+
const object = unpkgObject(root, keys.slice(0, -1));
|
|
457
|
+
if (!object) return;
|
|
458
|
+
const oldValue = object[lastKey];
|
|
459
|
+
const newValue = getPropertyDefault(property);
|
|
460
|
+
if (!isEqual(newValue, oldValue)) {
|
|
461
|
+
object[lastKey] = newValue;
|
|
462
|
+
changeEvent(keys, newValue);
|
|
463
|
+
}
|
|
452
464
|
}
|
|
453
465
|
} else {
|
|
454
466
|
const object = unpkgObject(root, keys.slice(0, -1));
|
|
@@ -460,35 +472,26 @@ function resetProperty(root, properties, keys, changeEvent) {
|
|
|
460
472
|
changeEvent(keys, newValue);
|
|
461
473
|
}
|
|
462
474
|
}
|
|
463
|
-
|
|
475
|
+
} else if (property.array) {
|
|
476
|
+
if (typeof lastKey === "string") {
|
|
464
477
|
const object = unpkgObject(root, keys.slice(0, -1));
|
|
465
478
|
if (!object) return;
|
|
466
479
|
const oldValue = object[lastKey];
|
|
467
|
-
const newValue =
|
|
480
|
+
const newValue = getPropertyDefaultArray(property);
|
|
468
481
|
if (!isEqual(newValue, oldValue)) {
|
|
469
482
|
object[lastKey] = newValue;
|
|
470
483
|
changeEvent(keys, newValue);
|
|
471
484
|
}
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
const oldValue = object[lastKey];
|
|
477
|
-
const newValue = getPropertyDefaultArray(property);
|
|
478
|
-
if (!isEqual(newValue, oldValue)) {
|
|
479
|
-
object[lastKey] = newValue;
|
|
480
|
-
changeEvent(keys, newValue);
|
|
485
|
+
} else {
|
|
486
|
+
const object = unpkgObject(root, keys);
|
|
487
|
+
if (!object) return;
|
|
488
|
+
for (const child of property.children) execProperty(object, child, keys, changeEvent);
|
|
481
489
|
}
|
|
482
490
|
} else {
|
|
483
491
|
const object = unpkgObject(root, keys);
|
|
484
492
|
if (!object) return;
|
|
485
493
|
for (const child of property.children) execProperty(object, child, keys, changeEvent);
|
|
486
494
|
}
|
|
487
|
-
else {
|
|
488
|
-
const object = unpkgObject(root, keys);
|
|
489
|
-
if (!object) return;
|
|
490
|
-
for (const child of property.children) execProperty(object, child, keys, changeEvent);
|
|
491
|
-
}
|
|
492
495
|
}
|
|
493
496
|
|
|
494
497
|
//#endregion
|
|
@@ -960,7 +963,7 @@ function useSlotList() {
|
|
|
960
963
|
//#endregion
|
|
961
964
|
//#region src/components/values/adaptSlot/adaptSlotList/group.vue?vue&type=script&setup=true&lang.ts
|
|
962
965
|
const _hoisted_1$19 = { class: "text-label-large ml-1" };
|
|
963
|
-
const _hoisted_2$
|
|
966
|
+
const _hoisted_2$3 = { class: "text-body-small text-grey ml-1" };
|
|
964
967
|
var group_vue_vue_type_script_setup_true_lang_default$1 = /*@__PURE__*/ defineComponent({
|
|
965
968
|
__name: "group",
|
|
966
969
|
props: {
|
|
@@ -990,7 +993,6 @@ var group_vue_vue_type_script_setup_true_lang_default$1 = /*@__PURE__*/ defineCo
|
|
|
990
993
|
return {
|
|
991
994
|
background: mouseOver.value ? highlightColor.value : backgroundColor2.value,
|
|
992
995
|
height: "30px",
|
|
993
|
-
marginTop: "1px",
|
|
994
996
|
userSelect: "none"
|
|
995
997
|
};
|
|
996
998
|
});
|
|
@@ -1009,7 +1011,7 @@ var group_vue_vue_type_script_setup_true_lang_default$1 = /*@__PURE__*/ defineCo
|
|
|
1009
1011
|
size: "small"
|
|
1010
1012
|
}, null, 8, ["icon"]),
|
|
1011
1013
|
createElementVNode("span", _hoisted_1$19, toDisplayString(__props.title), 1),
|
|
1012
|
-
createElementVNode("span", _hoisted_2$
|
|
1014
|
+
createElementVNode("span", _hoisted_2$3, toDisplayString(__props.count), 1)
|
|
1013
1015
|
], 36)), [[_directive_ripple]]);
|
|
1014
1016
|
};
|
|
1015
1017
|
}
|
|
@@ -1043,7 +1045,6 @@ var item_vue_vue_type_script_setup_true_lang_default$2 = /*@__PURE__*/ defineCom
|
|
|
1043
1045
|
return {
|
|
1044
1046
|
background: mouseOver.value ? highlightColor.value : backgroundColor2.value,
|
|
1045
1047
|
height: "48px",
|
|
1046
|
-
marginTop: "1px",
|
|
1047
1048
|
userSelect: "none"
|
|
1048
1049
|
};
|
|
1049
1050
|
});
|
|
@@ -1066,8 +1067,7 @@ var item_default$2 = item_vue_vue_type_script_setup_true_lang_default$2;
|
|
|
1066
1067
|
|
|
1067
1068
|
//#endregion
|
|
1068
1069
|
//#region src/components/values/adaptSlot/adaptSlotList/index.vue?vue&type=script&setup=true&lang.ts
|
|
1069
|
-
const _hoisted_1$17 = {
|
|
1070
|
-
const _hoisted_2$5 = {
|
|
1070
|
+
const _hoisted_1$17 = {
|
|
1071
1071
|
key: 1,
|
|
1072
1072
|
class: "text-body-medium text-grey ml-3"
|
|
1073
1073
|
};
|
|
@@ -1086,17 +1086,27 @@ var index_vue_vue_type_script_setup_true_lang_default$15 = /*@__PURE__*/ defineC
|
|
|
1086
1086
|
const open = useModel(__props, "open");
|
|
1087
1087
|
const emit = __emit;
|
|
1088
1088
|
const adaptSlotList = injectAdaptSlotList();
|
|
1089
|
-
const
|
|
1089
|
+
const style = computed(() => {
|
|
1090
|
+
return {
|
|
1091
|
+
display: "flex",
|
|
1092
|
+
flexDirection: "column",
|
|
1093
|
+
gap: "1px"
|
|
1094
|
+
};
|
|
1095
|
+
});
|
|
1096
|
+
function onGroupClick(id) {
|
|
1090
1097
|
const group = getListEntry(adaptSlotList, id);
|
|
1091
1098
|
if (!group) return;
|
|
1092
1099
|
setCollapse(adaptSlotList, id, !group.collapse);
|
|
1093
|
-
}
|
|
1094
|
-
|
|
1100
|
+
}
|
|
1101
|
+
function onItemClick(id) {
|
|
1095
1102
|
open.value = false;
|
|
1096
1103
|
emit("x-select", id);
|
|
1097
|
-
}
|
|
1104
|
+
}
|
|
1098
1105
|
return (_ctx, _cache) => {
|
|
1099
|
-
return unref(adaptSlotList).length > 0 ? (openBlock(), createElementBlock("div",
|
|
1106
|
+
return unref(adaptSlotList).length > 0 ? (openBlock(), createElementBlock("div", {
|
|
1107
|
+
key: 0,
|
|
1108
|
+
style: normalizeStyle(style.value)
|
|
1109
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(adaptSlotList), (item) => {
|
|
1100
1110
|
return openBlock(), createElementBlock(Fragment, { key: item.id }, [item.type === 0 ? (openBlock(), createBlock(group_default$1, {
|
|
1101
1111
|
key: 0,
|
|
1102
1112
|
id: item.id,
|
|
@@ -1115,7 +1125,7 @@ var index_vue_vue_type_script_setup_true_lang_default$15 = /*@__PURE__*/ defineC
|
|
|
1115
1125
|
title: item.name,
|
|
1116
1126
|
onXClick: onItemClick
|
|
1117
1127
|
}, null, 8, ["id", "title"])) : createCommentVNode("v-if", true)], 64);
|
|
1118
|
-
}), 128))])) : (openBlock(), createElementBlock("div",
|
|
1128
|
+
}), 128))], 4)) : (openBlock(), createElementBlock("div", _hoisted_1$17, toDisplayString(unref(t)("x-prop-tree.noAdaptSlot")), 1));
|
|
1119
1129
|
};
|
|
1120
1130
|
}
|
|
1121
1131
|
});
|
|
@@ -1286,7 +1296,7 @@ var adaptSlot_default = index_vue_vue_type_script_setup_true_lang_default$14;
|
|
|
1286
1296
|
//#endregion
|
|
1287
1297
|
//#region src/components/values/comp/compList/group.vue?vue&type=script&setup=true&lang.ts
|
|
1288
1298
|
const _hoisted_1$15 = { class: "text-label-large ml-1" };
|
|
1289
|
-
const _hoisted_2$
|
|
1299
|
+
const _hoisted_2$2 = { class: "text-body-small text-grey ml-1" };
|
|
1290
1300
|
var group_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
1291
1301
|
__name: "group",
|
|
1292
1302
|
props: {
|
|
@@ -1316,7 +1326,6 @@ var group_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
1316
1326
|
return {
|
|
1317
1327
|
background: mouseOver.value ? highlightColor.value : backgroundColor2.value,
|
|
1318
1328
|
height: "30px",
|
|
1319
|
-
marginTop: "1px",
|
|
1320
1329
|
userSelect: "none"
|
|
1321
1330
|
};
|
|
1322
1331
|
});
|
|
@@ -1335,7 +1344,7 @@ var group_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
1335
1344
|
size: "small"
|
|
1336
1345
|
}, null, 8, ["icon"]),
|
|
1337
1346
|
createElementVNode("span", _hoisted_1$15, toDisplayString(__props.title), 1),
|
|
1338
|
-
createElementVNode("span", _hoisted_2$
|
|
1347
|
+
createElementVNode("span", _hoisted_2$2, toDisplayString(__props.count), 1)
|
|
1339
1348
|
], 36)), [[_directive_ripple]]);
|
|
1340
1349
|
};
|
|
1341
1350
|
}
|
|
@@ -1369,7 +1378,6 @@ var item_vue_vue_type_script_setup_true_lang_default$1 = /*@__PURE__*/ defineCom
|
|
|
1369
1378
|
return {
|
|
1370
1379
|
background: mouseOver.value ? highlightColor.value : backgroundColor2.value,
|
|
1371
1380
|
height: "48px",
|
|
1372
|
-
marginTop: "1px",
|
|
1373
1381
|
userSelect: "none"
|
|
1374
1382
|
};
|
|
1375
1383
|
});
|
|
@@ -1392,8 +1400,7 @@ var item_default$1 = item_vue_vue_type_script_setup_true_lang_default$1;
|
|
|
1392
1400
|
|
|
1393
1401
|
//#endregion
|
|
1394
1402
|
//#region src/components/values/comp/compList/index.vue?vue&type=script&setup=true&lang.ts
|
|
1395
|
-
const _hoisted_1$13 = {
|
|
1396
|
-
const _hoisted_2$3 = {
|
|
1403
|
+
const _hoisted_1$13 = {
|
|
1397
1404
|
key: 1,
|
|
1398
1405
|
class: "text-body-medium text-grey ml-3"
|
|
1399
1406
|
};
|
|
@@ -1412,6 +1419,13 @@ var index_vue_vue_type_script_setup_true_lang_default$13 = /*@__PURE__*/ defineC
|
|
|
1412
1419
|
const open = useModel(__props, "open");
|
|
1413
1420
|
const emit = __emit;
|
|
1414
1421
|
const compList = injectCompList();
|
|
1422
|
+
const style = computed(() => {
|
|
1423
|
+
return {
|
|
1424
|
+
display: "flex",
|
|
1425
|
+
flexDirection: "column",
|
|
1426
|
+
gap: "1px"
|
|
1427
|
+
};
|
|
1428
|
+
});
|
|
1415
1429
|
function onGroupClick(id) {
|
|
1416
1430
|
const group = getListEntry(compList, id);
|
|
1417
1431
|
if (!group) return;
|
|
@@ -1423,7 +1437,10 @@ var index_vue_vue_type_script_setup_true_lang_default$13 = /*@__PURE__*/ defineC
|
|
|
1423
1437
|
eventBus.emit("refreshDepends");
|
|
1424
1438
|
}
|
|
1425
1439
|
return (_ctx, _cache) => {
|
|
1426
|
-
return unref(compList).length > 0 ? (openBlock(), createElementBlock("div",
|
|
1440
|
+
return unref(compList).length > 0 ? (openBlock(), createElementBlock("div", {
|
|
1441
|
+
key: 0,
|
|
1442
|
+
style: normalizeStyle(style.value)
|
|
1443
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(compList), (item) => {
|
|
1427
1444
|
return openBlock(), createElementBlock(Fragment, { key: item.id }, [item.type === 0 ? (openBlock(), createBlock(group_default, {
|
|
1428
1445
|
key: 0,
|
|
1429
1446
|
id: item.id,
|
|
@@ -1442,7 +1459,7 @@ var index_vue_vue_type_script_setup_true_lang_default$13 = /*@__PURE__*/ defineC
|
|
|
1442
1459
|
title: item.name,
|
|
1443
1460
|
onXClick: onItemClick
|
|
1444
1461
|
}, null, 8, ["id", "title"])) : createCommentVNode("v-if", true)], 64);
|
|
1445
|
-
}), 128))])) : (openBlock(), createElementBlock("div",
|
|
1462
|
+
}), 128))], 4)) : (openBlock(), createElementBlock("div", _hoisted_1$13, toDisplayString(unref(t)("x-prop-tree.noComp")), 1));
|
|
1446
1463
|
};
|
|
1447
1464
|
}
|
|
1448
1465
|
});
|
|
@@ -1635,7 +1652,7 @@ var index_vue_vue_type_script_setup_true_lang_default$11 = /*@__PURE__*/ defineC
|
|
|
1635
1652
|
const { isMobile } = useSystem();
|
|
1636
1653
|
const input = useModel(__props, "modelValue");
|
|
1637
1654
|
const emit = __emit;
|
|
1638
|
-
|
|
1655
|
+
async function onUpdateFocused(focus) {
|
|
1639
1656
|
if (!focus || __props.readonly || !isMobile()) return;
|
|
1640
1657
|
const res = await openPromptDlg({
|
|
1641
1658
|
title: "",
|
|
@@ -1643,7 +1660,7 @@ var index_vue_vue_type_script_setup_true_lang_default$11 = /*@__PURE__*/ defineC
|
|
|
1643
1660
|
});
|
|
1644
1661
|
if (res === void 0) return;
|
|
1645
1662
|
input.value = res;
|
|
1646
|
-
}
|
|
1663
|
+
}
|
|
1647
1664
|
return (_ctx, _cache) => {
|
|
1648
1665
|
const _component_v_text_field = resolveComponent("v-text-field");
|
|
1649
1666
|
const _component_v_btn = resolveComponent("v-btn");
|
|
@@ -1711,14 +1728,14 @@ var editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
1711
1728
|
const locale = injectLocale();
|
|
1712
1729
|
const version = injectVersion();
|
|
1713
1730
|
const target = useTemplateRef("target");
|
|
1714
|
-
|
|
1731
|
+
function onReady() {
|
|
1715
1732
|
const object = JSON.parse(json.value);
|
|
1716
1733
|
target.value?.load(object);
|
|
1717
|
-
}
|
|
1718
|
-
|
|
1734
|
+
}
|
|
1735
|
+
function save() {
|
|
1719
1736
|
const object = target.value.save();
|
|
1720
1737
|
json.value = JSON.stringify(object, null, 2);
|
|
1721
|
-
}
|
|
1738
|
+
}
|
|
1722
1739
|
__expose({ save });
|
|
1723
1740
|
return (_ctx, _cache) => {
|
|
1724
1741
|
return openBlock(), createBlock(unref(XBlockly), {
|
|
@@ -1971,7 +1988,7 @@ var color_default = color_vue_vue_type_script_setup_true_lang_default;
|
|
|
1971
1988
|
//#endregion
|
|
1972
1989
|
//#region src/components/values/multiTypes/index.vue?vue&type=script&setup=true&lang.ts
|
|
1973
1990
|
const _hoisted_1$8 = { class: "d-flex justify-space-between align-center my-2" };
|
|
1974
|
-
const _hoisted_2$
|
|
1991
|
+
const _hoisted_2$1 = { class: "flex-grow-1" };
|
|
1975
1992
|
var index_vue_vue_type_script_setup_true_lang_default$9 = /*@__PURE__*/ defineComponent({
|
|
1976
1993
|
__name: "index",
|
|
1977
1994
|
props: /*@__PURE__*/ mergeModels({
|
|
@@ -2083,7 +2100,7 @@ var index_vue_vue_type_script_setup_true_lang_default$9 = /*@__PURE__*/ defineCo
|
|
|
2083
2100
|
const _component_v_number_input = resolveComponent("v-number-input");
|
|
2084
2101
|
const _component_v_btn = resolveComponent("v-btn");
|
|
2085
2102
|
const _directive_ripple = resolveDirective("ripple");
|
|
2086
|
-
return openBlock(), createElementBlock("div", _hoisted_1$8, [createElementVNode("div", _hoisted_2$
|
|
2103
|
+
return openBlock(), createElementBlock("div", _hoisted_1$8, [createElementVNode("div", _hoisted_2$1, [
|
|
2087
2104
|
withDirectives(createVNode(_component_v_select, {
|
|
2088
2105
|
modelValue: select.value,
|
|
2089
2106
|
"onUpdate:modelValue": [_cache[0] || (_cache[0] = ($event) => select.value = $event), onSelectUpdate],
|
|
@@ -2273,7 +2290,7 @@ var number_default = index_vue_vue_type_script_setup_true_lang_default$8;
|
|
|
2273
2290
|
//#endregion
|
|
2274
2291
|
//#region src/components/values/rule/index.vue?vue&type=script&setup=true&lang.ts
|
|
2275
2292
|
const _hoisted_1$6 = { class: "d-flex justify-space-between align-center my-2" };
|
|
2276
|
-
const _hoisted_2
|
|
2293
|
+
const _hoisted_2 = { class: "flex-grow-1" };
|
|
2277
2294
|
var index_vue_vue_type_script_setup_true_lang_default$7 = /*@__PURE__*/ defineComponent({
|
|
2278
2295
|
__name: "index",
|
|
2279
2296
|
props: /*@__PURE__*/ mergeModels({
|
|
@@ -2306,8 +2323,10 @@ var index_vue_vue_type_script_setup_true_lang_default$7 = /*@__PURE__*/ defineCo
|
|
|
2306
2323
|
const parts = rule.value.split(",");
|
|
2307
2324
|
if (parts.length < 1) return;
|
|
2308
2325
|
select.value = parts[0];
|
|
2309
|
-
if (parts[0] === "minLength" || parts[1] === "maxLength" || parts[2] === "length")
|
|
2310
|
-
|
|
2326
|
+
if (parts[0] === "minLength" || parts[1] === "maxLength" || parts[2] === "length") {
|
|
2327
|
+
if (parts.length > 1) number.value = parseInt(parts[1]);
|
|
2328
|
+
else number.value = 0;
|
|
2329
|
+
}
|
|
2311
2330
|
});
|
|
2312
2331
|
function syncRule() {
|
|
2313
2332
|
if (select.value === "minLength" || select.value === "maxLength" || select.value === "length") rule.value = `${select.value},${number.value}`;
|
|
@@ -2354,7 +2373,7 @@ var index_vue_vue_type_script_setup_true_lang_default$7 = /*@__PURE__*/ defineCo
|
|
|
2354
2373
|
const _component_v_number_input = resolveComponent("v-number-input");
|
|
2355
2374
|
const _component_v_btn = resolveComponent("v-btn");
|
|
2356
2375
|
const _directive_ripple = resolveDirective("ripple");
|
|
2357
|
-
return openBlock(), createElementBlock("div", _hoisted_1$6, [createElementVNode("div", _hoisted_2
|
|
2376
|
+
return openBlock(), createElementBlock("div", _hoisted_1$6, [createElementVNode("div", _hoisted_2, [withDirectives(createVNode(_component_v_select, {
|
|
2358
2377
|
modelValue: select.value,
|
|
2359
2378
|
"onUpdate:modelValue": [_cache[0] || (_cache[0] = ($event) => select.value = $event), onSelectUpdate],
|
|
2360
2379
|
density: "compact",
|
|
@@ -2508,7 +2527,6 @@ var item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
2508
2527
|
return {
|
|
2509
2528
|
background: mouseOver.value ? highlightColor.value : backgroundColor2.value,
|
|
2510
2529
|
height: "48px",
|
|
2511
|
-
marginTop: "1px",
|
|
2512
2530
|
userSelect: "none"
|
|
2513
2531
|
};
|
|
2514
2532
|
});
|
|
@@ -2531,8 +2549,7 @@ var item_default = item_vue_vue_type_script_setup_true_lang_default;
|
|
|
2531
2549
|
|
|
2532
2550
|
//#endregion
|
|
2533
2551
|
//#region src/components/values/slot/slotList/index.vue?vue&type=script&setup=true&lang.ts
|
|
2534
|
-
const _hoisted_1$3 = {
|
|
2535
|
-
const _hoisted_2 = {
|
|
2552
|
+
const _hoisted_1$3 = {
|
|
2536
2553
|
key: 1,
|
|
2537
2554
|
class: "text-body-medium text-grey ml-3"
|
|
2538
2555
|
};
|
|
@@ -2551,19 +2568,29 @@ var index_vue_vue_type_script_setup_true_lang_default$5 = /*@__PURE__*/ defineCo
|
|
|
2551
2568
|
const open = useModel(__props, "open");
|
|
2552
2569
|
const emit = __emit;
|
|
2553
2570
|
const slotList = injectSlotList();
|
|
2554
|
-
const
|
|
2571
|
+
const style = computed(() => {
|
|
2572
|
+
return {
|
|
2573
|
+
display: "flex",
|
|
2574
|
+
flexDirection: "column",
|
|
2575
|
+
gap: "1px"
|
|
2576
|
+
};
|
|
2577
|
+
});
|
|
2578
|
+
function onItemClick(id) {
|
|
2555
2579
|
open.value = false;
|
|
2556
2580
|
emit("x-select", id);
|
|
2557
|
-
}
|
|
2581
|
+
}
|
|
2558
2582
|
return (_ctx, _cache) => {
|
|
2559
|
-
return unref(slotList).length > 0 ? (openBlock(), createElementBlock("div",
|
|
2583
|
+
return unref(slotList).length > 0 ? (openBlock(), createElementBlock("div", {
|
|
2584
|
+
key: 0,
|
|
2585
|
+
style: normalizeStyle(style.value)
|
|
2586
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(slotList), (item) => {
|
|
2560
2587
|
return openBlock(), createBlock(item_default, {
|
|
2561
2588
|
key: item.id,
|
|
2562
2589
|
id: item.id,
|
|
2563
2590
|
title: item.name,
|
|
2564
2591
|
onXClick: onItemClick
|
|
2565
2592
|
}, null, 8, ["id", "title"]);
|
|
2566
|
-
}), 128))])) : (openBlock(), createElementBlock("div",
|
|
2593
|
+
}), 128))], 4)) : (openBlock(), createElementBlock("div", _hoisted_1$3, toDisplayString(unref(t)("x-prop-tree.noSlot")), 1));
|
|
2567
2594
|
};
|
|
2568
2595
|
}
|
|
2569
2596
|
});
|
|
@@ -2807,7 +2834,7 @@ var index_vue_vue_type_script_setup_true_lang_default$2 = /*@__PURE__*/ defineCo
|
|
|
2807
2834
|
const { isMobile } = useSystem();
|
|
2808
2835
|
const input = useModel(__props, "modelValue");
|
|
2809
2836
|
const emit = __emit;
|
|
2810
|
-
|
|
2837
|
+
async function onUpdateFocused(focus) {
|
|
2811
2838
|
if (!focus || __props.readonly || !isMobile()) return;
|
|
2812
2839
|
const res = await openPromptDlg({
|
|
2813
2840
|
title: "",
|
|
@@ -2815,7 +2842,7 @@ var index_vue_vue_type_script_setup_true_lang_default$2 = /*@__PURE__*/ defineCo
|
|
|
2815
2842
|
});
|
|
2816
2843
|
if (res === void 0) return;
|
|
2817
2844
|
input.value = res;
|
|
2818
|
-
}
|
|
2845
|
+
}
|
|
2819
2846
|
return (_ctx, _cache) => {
|
|
2820
2847
|
const _component_v_text_field = resolveComponent("v-text-field");
|
|
2821
2848
|
const _component_v_btn = resolveComponent("v-btn");
|
|
@@ -3251,9 +3278,10 @@ var main_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
3251
3278
|
if (isBranch) keys.push(property.key);
|
|
3252
3279
|
} else keys.push(property.key);
|
|
3253
3280
|
if (keys?.[0] === "runtime") return;
|
|
3254
|
-
if (property.ui)
|
|
3255
|
-
|
|
3256
|
-
|
|
3281
|
+
if (property.ui) {
|
|
3282
|
+
if (property.array && !leafArrayEntry) return renderLeafArray(keys, property, object, arrayIndex, isBranch);
|
|
3283
|
+
else return renderLeafScalar(keys, property, object, arrayIndex, isBranch);
|
|
3284
|
+
} else if (property.array) return renderBranchArray(keys, property, object, arrayIndex, isBranch);
|
|
3257
3285
|
else return renderBranchScalar(keys, property, object, arrayIndex, isBranch);
|
|
3258
3286
|
};
|
|
3259
3287
|
const renderBranchArray = (keys, property, object, arrayIndex, isBranch) => {
|
|
@@ -3323,7 +3351,7 @@ var main_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
3323
3351
|
}
|
|
3324
3352
|
return entries;
|
|
3325
3353
|
})());
|
|
3326
|
-
return h("div", { style: {
|
|
3354
|
+
return h("div", { style: { marginBottom: "1px" } }, (() => {
|
|
3327
3355
|
const nodes = [];
|
|
3328
3356
|
nodes.push(title);
|
|
3329
3357
|
if (!isCollapse(collapseState, keys)) nodes.push(content);
|
|
@@ -3369,7 +3397,7 @@ var main_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
3369
3397
|
})(), void 0, false));
|
|
3370
3398
|
return nodes;
|
|
3371
3399
|
})());
|
|
3372
|
-
return h("div", { style: {
|
|
3400
|
+
return h("div", { style: { marginBottom: "1px" } }, (() => {
|
|
3373
3401
|
const nodes = [];
|
|
3374
3402
|
nodes.push(title);
|
|
3375
3403
|
if (!isCollapse(collapseState, keys)) nodes.push(content);
|
|
@@ -3409,7 +3437,7 @@ var main_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
3409
3437
|
for (let i = 0; i < value.length; i++) nodes.push(renderNode(keys, property, value, i, false, true));
|
|
3410
3438
|
return nodes;
|
|
3411
3439
|
})());
|
|
3412
|
-
return h("div", { style: {
|
|
3440
|
+
return h("div", { style: { marginBottom: "1px" } }, (() => {
|
|
3413
3441
|
const nodes = [];
|
|
3414
3442
|
nodes.push(title);
|
|
3415
3443
|
if (!isCollapse(collapseState, keys)) nodes.push(content);
|
|
@@ -3509,10 +3537,11 @@ var index_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
3509
3537
|
watchEffect(() => {
|
|
3510
3538
|
subtypeRef.value = __props.subtype;
|
|
3511
3539
|
});
|
|
3512
|
-
|
|
3540
|
+
const collapseState = ref({
|
|
3513
3541
|
collapse: true,
|
|
3514
3542
|
children: {}
|
|
3515
|
-
})
|
|
3543
|
+
});
|
|
3544
|
+
provideCollapseState(collapseState);
|
|
3516
3545
|
const propertyState = ref({
|
|
3517
3546
|
change: false,
|
|
3518
3547
|
warning: false,
|