x-prop-tree 0.8.29 → 0.8.30
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.js +64 -42
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -960,7 +960,7 @@ function useSlotList() {
|
|
|
960
960
|
//#endregion
|
|
961
961
|
//#region src/components/values/adaptSlot/adaptSlotList/group.vue?vue&type=script&setup=true&lang.ts
|
|
962
962
|
const _hoisted_1$19 = { class: "text-label-large ml-1" };
|
|
963
|
-
const _hoisted_2$
|
|
963
|
+
const _hoisted_2$3 = { class: "text-body-small text-grey ml-1" };
|
|
964
964
|
var group_vue_vue_type_script_setup_true_lang_default$1 = /*@__PURE__*/ defineComponent({
|
|
965
965
|
__name: "group",
|
|
966
966
|
props: {
|
|
@@ -990,7 +990,6 @@ var group_vue_vue_type_script_setup_true_lang_default$1 = /*@__PURE__*/ defineCo
|
|
|
990
990
|
return {
|
|
991
991
|
background: mouseOver.value ? highlightColor.value : backgroundColor2.value,
|
|
992
992
|
height: "30px",
|
|
993
|
-
marginTop: "1px",
|
|
994
993
|
userSelect: "none"
|
|
995
994
|
};
|
|
996
995
|
});
|
|
@@ -1009,7 +1008,7 @@ var group_vue_vue_type_script_setup_true_lang_default$1 = /*@__PURE__*/ defineCo
|
|
|
1009
1008
|
size: "small"
|
|
1010
1009
|
}, null, 8, ["icon"]),
|
|
1011
1010
|
createElementVNode("span", _hoisted_1$19, toDisplayString(__props.title), 1),
|
|
1012
|
-
createElementVNode("span", _hoisted_2$
|
|
1011
|
+
createElementVNode("span", _hoisted_2$3, toDisplayString(__props.count), 1)
|
|
1013
1012
|
], 36)), [[_directive_ripple]]);
|
|
1014
1013
|
};
|
|
1015
1014
|
}
|
|
@@ -1043,7 +1042,6 @@ var item_vue_vue_type_script_setup_true_lang_default$2 = /*@__PURE__*/ defineCom
|
|
|
1043
1042
|
return {
|
|
1044
1043
|
background: mouseOver.value ? highlightColor.value : backgroundColor2.value,
|
|
1045
1044
|
height: "48px",
|
|
1046
|
-
marginTop: "1px",
|
|
1047
1045
|
userSelect: "none"
|
|
1048
1046
|
};
|
|
1049
1047
|
});
|
|
@@ -1066,8 +1064,7 @@ var item_default$2 = item_vue_vue_type_script_setup_true_lang_default$2;
|
|
|
1066
1064
|
|
|
1067
1065
|
//#endregion
|
|
1068
1066
|
//#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 = {
|
|
1067
|
+
const _hoisted_1$17 = {
|
|
1071
1068
|
key: 1,
|
|
1072
1069
|
class: "text-body-medium text-grey ml-3"
|
|
1073
1070
|
};
|
|
@@ -1086,17 +1083,27 @@ var index_vue_vue_type_script_setup_true_lang_default$15 = /*@__PURE__*/ defineC
|
|
|
1086
1083
|
const open = useModel(__props, "open");
|
|
1087
1084
|
const emit = __emit;
|
|
1088
1085
|
const adaptSlotList = injectAdaptSlotList();
|
|
1089
|
-
const
|
|
1086
|
+
const style = computed(() => {
|
|
1087
|
+
return {
|
|
1088
|
+
display: "flex",
|
|
1089
|
+
flexDirection: "column",
|
|
1090
|
+
gap: "1px"
|
|
1091
|
+
};
|
|
1092
|
+
});
|
|
1093
|
+
function onGroupClick(id) {
|
|
1090
1094
|
const group = getListEntry(adaptSlotList, id);
|
|
1091
1095
|
if (!group) return;
|
|
1092
1096
|
setCollapse(adaptSlotList, id, !group.collapse);
|
|
1093
|
-
}
|
|
1094
|
-
|
|
1097
|
+
}
|
|
1098
|
+
function onItemClick(id) {
|
|
1095
1099
|
open.value = false;
|
|
1096
1100
|
emit("x-select", id);
|
|
1097
|
-
}
|
|
1101
|
+
}
|
|
1098
1102
|
return (_ctx, _cache) => {
|
|
1099
|
-
return unref(adaptSlotList).length > 0 ? (openBlock(), createElementBlock("div",
|
|
1103
|
+
return unref(adaptSlotList).length > 0 ? (openBlock(), createElementBlock("div", {
|
|
1104
|
+
key: 0,
|
|
1105
|
+
style: normalizeStyle(style.value)
|
|
1106
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(adaptSlotList), (item) => {
|
|
1100
1107
|
return openBlock(), createElementBlock(Fragment, { key: item.id }, [item.type === 0 ? (openBlock(), createBlock(group_default$1, {
|
|
1101
1108
|
key: 0,
|
|
1102
1109
|
id: item.id,
|
|
@@ -1115,7 +1122,7 @@ var index_vue_vue_type_script_setup_true_lang_default$15 = /*@__PURE__*/ defineC
|
|
|
1115
1122
|
title: item.name,
|
|
1116
1123
|
onXClick: onItemClick
|
|
1117
1124
|
}, null, 8, ["id", "title"])) : createCommentVNode("v-if", true)], 64);
|
|
1118
|
-
}), 128))])) : (openBlock(), createElementBlock("div",
|
|
1125
|
+
}), 128))], 4)) : (openBlock(), createElementBlock("div", _hoisted_1$17, toDisplayString(unref(t)("x-prop-tree.noAdaptSlot")), 1));
|
|
1119
1126
|
};
|
|
1120
1127
|
}
|
|
1121
1128
|
});
|
|
@@ -1286,7 +1293,7 @@ var adaptSlot_default = index_vue_vue_type_script_setup_true_lang_default$14;
|
|
|
1286
1293
|
//#endregion
|
|
1287
1294
|
//#region src/components/values/comp/compList/group.vue?vue&type=script&setup=true&lang.ts
|
|
1288
1295
|
const _hoisted_1$15 = { class: "text-label-large ml-1" };
|
|
1289
|
-
const _hoisted_2$
|
|
1296
|
+
const _hoisted_2$2 = { class: "text-body-small text-grey ml-1" };
|
|
1290
1297
|
var group_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
1291
1298
|
__name: "group",
|
|
1292
1299
|
props: {
|
|
@@ -1316,7 +1323,6 @@ var group_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
1316
1323
|
return {
|
|
1317
1324
|
background: mouseOver.value ? highlightColor.value : backgroundColor2.value,
|
|
1318
1325
|
height: "30px",
|
|
1319
|
-
marginTop: "1px",
|
|
1320
1326
|
userSelect: "none"
|
|
1321
1327
|
};
|
|
1322
1328
|
});
|
|
@@ -1335,7 +1341,7 @@ var group_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
1335
1341
|
size: "small"
|
|
1336
1342
|
}, null, 8, ["icon"]),
|
|
1337
1343
|
createElementVNode("span", _hoisted_1$15, toDisplayString(__props.title), 1),
|
|
1338
|
-
createElementVNode("span", _hoisted_2$
|
|
1344
|
+
createElementVNode("span", _hoisted_2$2, toDisplayString(__props.count), 1)
|
|
1339
1345
|
], 36)), [[_directive_ripple]]);
|
|
1340
1346
|
};
|
|
1341
1347
|
}
|
|
@@ -1369,7 +1375,6 @@ var item_vue_vue_type_script_setup_true_lang_default$1 = /*@__PURE__*/ defineCom
|
|
|
1369
1375
|
return {
|
|
1370
1376
|
background: mouseOver.value ? highlightColor.value : backgroundColor2.value,
|
|
1371
1377
|
height: "48px",
|
|
1372
|
-
marginTop: "1px",
|
|
1373
1378
|
userSelect: "none"
|
|
1374
1379
|
};
|
|
1375
1380
|
});
|
|
@@ -1392,8 +1397,7 @@ var item_default$1 = item_vue_vue_type_script_setup_true_lang_default$1;
|
|
|
1392
1397
|
|
|
1393
1398
|
//#endregion
|
|
1394
1399
|
//#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 = {
|
|
1400
|
+
const _hoisted_1$13 = {
|
|
1397
1401
|
key: 1,
|
|
1398
1402
|
class: "text-body-medium text-grey ml-3"
|
|
1399
1403
|
};
|
|
@@ -1412,6 +1416,13 @@ var index_vue_vue_type_script_setup_true_lang_default$13 = /*@__PURE__*/ defineC
|
|
|
1412
1416
|
const open = useModel(__props, "open");
|
|
1413
1417
|
const emit = __emit;
|
|
1414
1418
|
const compList = injectCompList();
|
|
1419
|
+
const style = computed(() => {
|
|
1420
|
+
return {
|
|
1421
|
+
display: "flex",
|
|
1422
|
+
flexDirection: "column",
|
|
1423
|
+
gap: "1px"
|
|
1424
|
+
};
|
|
1425
|
+
});
|
|
1415
1426
|
function onGroupClick(id) {
|
|
1416
1427
|
const group = getListEntry(compList, id);
|
|
1417
1428
|
if (!group) return;
|
|
@@ -1423,7 +1434,10 @@ var index_vue_vue_type_script_setup_true_lang_default$13 = /*@__PURE__*/ defineC
|
|
|
1423
1434
|
eventBus.emit("refreshDepends");
|
|
1424
1435
|
}
|
|
1425
1436
|
return (_ctx, _cache) => {
|
|
1426
|
-
return unref(compList).length > 0 ? (openBlock(), createElementBlock("div",
|
|
1437
|
+
return unref(compList).length > 0 ? (openBlock(), createElementBlock("div", {
|
|
1438
|
+
key: 0,
|
|
1439
|
+
style: normalizeStyle(style.value)
|
|
1440
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(compList), (item) => {
|
|
1427
1441
|
return openBlock(), createElementBlock(Fragment, { key: item.id }, [item.type === 0 ? (openBlock(), createBlock(group_default, {
|
|
1428
1442
|
key: 0,
|
|
1429
1443
|
id: item.id,
|
|
@@ -1442,7 +1456,7 @@ var index_vue_vue_type_script_setup_true_lang_default$13 = /*@__PURE__*/ defineC
|
|
|
1442
1456
|
title: item.name,
|
|
1443
1457
|
onXClick: onItemClick
|
|
1444
1458
|
}, null, 8, ["id", "title"])) : createCommentVNode("v-if", true)], 64);
|
|
1445
|
-
}), 128))])) : (openBlock(), createElementBlock("div",
|
|
1459
|
+
}), 128))], 4)) : (openBlock(), createElementBlock("div", _hoisted_1$13, toDisplayString(unref(t)("x-prop-tree.noComp")), 1));
|
|
1446
1460
|
};
|
|
1447
1461
|
}
|
|
1448
1462
|
});
|
|
@@ -1635,7 +1649,7 @@ var index_vue_vue_type_script_setup_true_lang_default$11 = /*@__PURE__*/ defineC
|
|
|
1635
1649
|
const { isMobile } = useSystem();
|
|
1636
1650
|
const input = useModel(__props, "modelValue");
|
|
1637
1651
|
const emit = __emit;
|
|
1638
|
-
|
|
1652
|
+
async function onUpdateFocused(focus) {
|
|
1639
1653
|
if (!focus || __props.readonly || !isMobile()) return;
|
|
1640
1654
|
const res = await openPromptDlg({
|
|
1641
1655
|
title: "",
|
|
@@ -1643,7 +1657,7 @@ var index_vue_vue_type_script_setup_true_lang_default$11 = /*@__PURE__*/ defineC
|
|
|
1643
1657
|
});
|
|
1644
1658
|
if (res === void 0) return;
|
|
1645
1659
|
input.value = res;
|
|
1646
|
-
}
|
|
1660
|
+
}
|
|
1647
1661
|
return (_ctx, _cache) => {
|
|
1648
1662
|
const _component_v_text_field = resolveComponent("v-text-field");
|
|
1649
1663
|
const _component_v_btn = resolveComponent("v-btn");
|
|
@@ -1711,14 +1725,14 @@ var editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
1711
1725
|
const locale = injectLocale();
|
|
1712
1726
|
const version = injectVersion();
|
|
1713
1727
|
const target = useTemplateRef("target");
|
|
1714
|
-
|
|
1728
|
+
function onReady() {
|
|
1715
1729
|
const object = JSON.parse(json.value);
|
|
1716
1730
|
target.value?.load(object);
|
|
1717
|
-
}
|
|
1718
|
-
|
|
1731
|
+
}
|
|
1732
|
+
function save() {
|
|
1719
1733
|
const object = target.value.save();
|
|
1720
1734
|
json.value = JSON.stringify(object, null, 2);
|
|
1721
|
-
}
|
|
1735
|
+
}
|
|
1722
1736
|
__expose({ save });
|
|
1723
1737
|
return (_ctx, _cache) => {
|
|
1724
1738
|
return openBlock(), createBlock(unref(XBlockly), {
|
|
@@ -1971,7 +1985,7 @@ var color_default = color_vue_vue_type_script_setup_true_lang_default;
|
|
|
1971
1985
|
//#endregion
|
|
1972
1986
|
//#region src/components/values/multiTypes/index.vue?vue&type=script&setup=true&lang.ts
|
|
1973
1987
|
const _hoisted_1$8 = { class: "d-flex justify-space-between align-center my-2" };
|
|
1974
|
-
const _hoisted_2$
|
|
1988
|
+
const _hoisted_2$1 = { class: "flex-grow-1" };
|
|
1975
1989
|
var index_vue_vue_type_script_setup_true_lang_default$9 = /*@__PURE__*/ defineComponent({
|
|
1976
1990
|
__name: "index",
|
|
1977
1991
|
props: /*@__PURE__*/ mergeModels({
|
|
@@ -2083,7 +2097,7 @@ var index_vue_vue_type_script_setup_true_lang_default$9 = /*@__PURE__*/ defineCo
|
|
|
2083
2097
|
const _component_v_number_input = resolveComponent("v-number-input");
|
|
2084
2098
|
const _component_v_btn = resolveComponent("v-btn");
|
|
2085
2099
|
const _directive_ripple = resolveDirective("ripple");
|
|
2086
|
-
return openBlock(), createElementBlock("div", _hoisted_1$8, [createElementVNode("div", _hoisted_2$
|
|
2100
|
+
return openBlock(), createElementBlock("div", _hoisted_1$8, [createElementVNode("div", _hoisted_2$1, [
|
|
2087
2101
|
withDirectives(createVNode(_component_v_select, {
|
|
2088
2102
|
modelValue: select.value,
|
|
2089
2103
|
"onUpdate:modelValue": [_cache[0] || (_cache[0] = ($event) => select.value = $event), onSelectUpdate],
|
|
@@ -2273,7 +2287,7 @@ var number_default = index_vue_vue_type_script_setup_true_lang_default$8;
|
|
|
2273
2287
|
//#endregion
|
|
2274
2288
|
//#region src/components/values/rule/index.vue?vue&type=script&setup=true&lang.ts
|
|
2275
2289
|
const _hoisted_1$6 = { class: "d-flex justify-space-between align-center my-2" };
|
|
2276
|
-
const _hoisted_2
|
|
2290
|
+
const _hoisted_2 = { class: "flex-grow-1" };
|
|
2277
2291
|
var index_vue_vue_type_script_setup_true_lang_default$7 = /*@__PURE__*/ defineComponent({
|
|
2278
2292
|
__name: "index",
|
|
2279
2293
|
props: /*@__PURE__*/ mergeModels({
|
|
@@ -2354,7 +2368,7 @@ var index_vue_vue_type_script_setup_true_lang_default$7 = /*@__PURE__*/ defineCo
|
|
|
2354
2368
|
const _component_v_number_input = resolveComponent("v-number-input");
|
|
2355
2369
|
const _component_v_btn = resolveComponent("v-btn");
|
|
2356
2370
|
const _directive_ripple = resolveDirective("ripple");
|
|
2357
|
-
return openBlock(), createElementBlock("div", _hoisted_1$6, [createElementVNode("div", _hoisted_2
|
|
2371
|
+
return openBlock(), createElementBlock("div", _hoisted_1$6, [createElementVNode("div", _hoisted_2, [withDirectives(createVNode(_component_v_select, {
|
|
2358
2372
|
modelValue: select.value,
|
|
2359
2373
|
"onUpdate:modelValue": [_cache[0] || (_cache[0] = ($event) => select.value = $event), onSelectUpdate],
|
|
2360
2374
|
density: "compact",
|
|
@@ -2508,7 +2522,6 @@ var item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
2508
2522
|
return {
|
|
2509
2523
|
background: mouseOver.value ? highlightColor.value : backgroundColor2.value,
|
|
2510
2524
|
height: "48px",
|
|
2511
|
-
marginTop: "1px",
|
|
2512
2525
|
userSelect: "none"
|
|
2513
2526
|
};
|
|
2514
2527
|
});
|
|
@@ -2531,8 +2544,7 @@ var item_default = item_vue_vue_type_script_setup_true_lang_default;
|
|
|
2531
2544
|
|
|
2532
2545
|
//#endregion
|
|
2533
2546
|
//#region src/components/values/slot/slotList/index.vue?vue&type=script&setup=true&lang.ts
|
|
2534
|
-
const _hoisted_1$3 = {
|
|
2535
|
-
const _hoisted_2 = {
|
|
2547
|
+
const _hoisted_1$3 = {
|
|
2536
2548
|
key: 1,
|
|
2537
2549
|
class: "text-body-medium text-grey ml-3"
|
|
2538
2550
|
};
|
|
@@ -2551,19 +2563,29 @@ var index_vue_vue_type_script_setup_true_lang_default$5 = /*@__PURE__*/ defineCo
|
|
|
2551
2563
|
const open = useModel(__props, "open");
|
|
2552
2564
|
const emit = __emit;
|
|
2553
2565
|
const slotList = injectSlotList();
|
|
2554
|
-
const
|
|
2566
|
+
const style = computed(() => {
|
|
2567
|
+
return {
|
|
2568
|
+
display: "flex",
|
|
2569
|
+
flexDirection: "column",
|
|
2570
|
+
gap: "1px"
|
|
2571
|
+
};
|
|
2572
|
+
});
|
|
2573
|
+
function onItemClick(id) {
|
|
2555
2574
|
open.value = false;
|
|
2556
2575
|
emit("x-select", id);
|
|
2557
|
-
}
|
|
2576
|
+
}
|
|
2558
2577
|
return (_ctx, _cache) => {
|
|
2559
|
-
return unref(slotList).length > 0 ? (openBlock(), createElementBlock("div",
|
|
2578
|
+
return unref(slotList).length > 0 ? (openBlock(), createElementBlock("div", {
|
|
2579
|
+
key: 0,
|
|
2580
|
+
style: normalizeStyle(style.value)
|
|
2581
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(slotList), (item) => {
|
|
2560
2582
|
return openBlock(), createBlock(item_default, {
|
|
2561
2583
|
key: item.id,
|
|
2562
2584
|
id: item.id,
|
|
2563
2585
|
title: item.name,
|
|
2564
2586
|
onXClick: onItemClick
|
|
2565
2587
|
}, null, 8, ["id", "title"]);
|
|
2566
|
-
}), 128))])) : (openBlock(), createElementBlock("div",
|
|
2588
|
+
}), 128))], 4)) : (openBlock(), createElementBlock("div", _hoisted_1$3, toDisplayString(unref(t)("x-prop-tree.noSlot")), 1));
|
|
2567
2589
|
};
|
|
2568
2590
|
}
|
|
2569
2591
|
});
|
|
@@ -2807,7 +2829,7 @@ var index_vue_vue_type_script_setup_true_lang_default$2 = /*@__PURE__*/ defineCo
|
|
|
2807
2829
|
const { isMobile } = useSystem();
|
|
2808
2830
|
const input = useModel(__props, "modelValue");
|
|
2809
2831
|
const emit = __emit;
|
|
2810
|
-
|
|
2832
|
+
async function onUpdateFocused(focus) {
|
|
2811
2833
|
if (!focus || __props.readonly || !isMobile()) return;
|
|
2812
2834
|
const res = await openPromptDlg({
|
|
2813
2835
|
title: "",
|
|
@@ -2815,7 +2837,7 @@ var index_vue_vue_type_script_setup_true_lang_default$2 = /*@__PURE__*/ defineCo
|
|
|
2815
2837
|
});
|
|
2816
2838
|
if (res === void 0) return;
|
|
2817
2839
|
input.value = res;
|
|
2818
|
-
}
|
|
2840
|
+
}
|
|
2819
2841
|
return (_ctx, _cache) => {
|
|
2820
2842
|
const _component_v_text_field = resolveComponent("v-text-field");
|
|
2821
2843
|
const _component_v_btn = resolveComponent("v-btn");
|
|
@@ -3323,7 +3345,7 @@ var main_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
3323
3345
|
}
|
|
3324
3346
|
return entries;
|
|
3325
3347
|
})());
|
|
3326
|
-
return h("div", { style: {
|
|
3348
|
+
return h("div", { style: { marginBottom: "1px" } }, (() => {
|
|
3327
3349
|
const nodes = [];
|
|
3328
3350
|
nodes.push(title);
|
|
3329
3351
|
if (!isCollapse(collapseState, keys)) nodes.push(content);
|
|
@@ -3369,7 +3391,7 @@ var main_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
3369
3391
|
})(), void 0, false));
|
|
3370
3392
|
return nodes;
|
|
3371
3393
|
})());
|
|
3372
|
-
return h("div", { style: {
|
|
3394
|
+
return h("div", { style: { marginBottom: "1px" } }, (() => {
|
|
3373
3395
|
const nodes = [];
|
|
3374
3396
|
nodes.push(title);
|
|
3375
3397
|
if (!isCollapse(collapseState, keys)) nodes.push(content);
|
|
@@ -3409,7 +3431,7 @@ var main_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
3409
3431
|
for (let i = 0; i < value.length; i++) nodes.push(renderNode(keys, property, value, i, false, true));
|
|
3410
3432
|
return nodes;
|
|
3411
3433
|
})());
|
|
3412
|
-
return h("div", { style: {
|
|
3434
|
+
return h("div", { style: { marginBottom: "1px" } }, (() => {
|
|
3413
3435
|
const nodes = [];
|
|
3414
3436
|
nodes.push(title);
|
|
3415
3437
|
if (!isCollapse(collapseState, keys)) nodes.push(content);
|