x-prop-tree 0.8.35 → 0.8.38
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.
|
@@ -4,10 +4,6 @@ import { t as __exportAll } from "./rolldown-runtime.c6i0pdwe.js";
|
|
|
4
4
|
var en_exports = /* @__PURE__ */ __exportAll({ default: () => en_default });
|
|
5
5
|
var en_default = { "x-prop-tree": {
|
|
6
6
|
copy: "Copy",
|
|
7
|
-
dlg: { saveChange: {
|
|
8
|
-
title: "Save Changes",
|
|
9
|
-
text: "Do you want to save the changes?"
|
|
10
|
-
} },
|
|
11
7
|
json: "JSON",
|
|
12
8
|
jsonEditor: "JSON Editor",
|
|
13
9
|
noAdaptSlot: "No Adapt Slot",
|
|
@@ -4,10 +4,6 @@ import { t as __exportAll } from "./rolldown-runtime.c6i0pdwe.js";
|
|
|
4
4
|
var zhHans_exports = /* @__PURE__ */ __exportAll({ default: () => zhHans_default });
|
|
5
5
|
var zhHans_default = { "x-prop-tree": {
|
|
6
6
|
copy: "拷贝",
|
|
7
|
-
dlg: { saveChange: {
|
|
8
|
-
title: "保存变化",
|
|
9
|
-
text: "你想要保存变化吗?"
|
|
10
|
-
} },
|
|
11
7
|
json: "JSON",
|
|
12
8
|
jsonEditor: "JSON编辑器",
|
|
13
9
|
noAdaptSlot: "没有适配插槽",
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
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
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
|
-
import { eventBus, globalObjects, injectDark, injectLocale,
|
|
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";
|
|
6
|
-
import { getListEntry, setCollapse, tidyList } from "x-group-list";
|
|
7
6
|
import { useI18n } from "vue-i18n";
|
|
8
7
|
import { globalState } from "x-state-lib";
|
|
9
8
|
import { useDisplay } from "vuetify";
|
|
@@ -96,7 +95,7 @@ function isCollapse(root, keys) {
|
|
|
96
95
|
}
|
|
97
96
|
return current.collapse;
|
|
98
97
|
}
|
|
99
|
-
function setCollapse
|
|
98
|
+
function setCollapse(root, keys, collapse) {
|
|
100
99
|
let current = root.value;
|
|
101
100
|
for (const key of keys) {
|
|
102
101
|
if (!current.children[key]) current.children[key] = {
|
|
@@ -664,7 +663,7 @@ var menu_default = index_vue_vue_type_script_setup_true_lang_default$17;
|
|
|
664
663
|
|
|
665
664
|
//#endregion
|
|
666
665
|
//#region src/components/title/index.vue?vue&type=script&setup=true&lang.ts
|
|
667
|
-
const _hoisted_1$
|
|
666
|
+
const _hoisted_1$14 = { style: { pointerEvents: "none" } };
|
|
668
667
|
var index_vue_vue_type_script_setup_true_lang_default$16 = /*@__PURE__*/ defineComponent({
|
|
669
668
|
__name: "index",
|
|
670
669
|
props: {
|
|
@@ -733,7 +732,7 @@ var index_vue_vue_type_script_setup_true_lang_default$16 = /*@__PURE__*/ defineC
|
|
|
733
732
|
class: "mr-1",
|
|
734
733
|
icon: __props.collapse ? "mdi-chevron-right" : "mdi-chevron-down"
|
|
735
734
|
}, null, 8, ["icon"]),
|
|
736
|
-
createElementVNode("span", _hoisted_1$
|
|
735
|
+
createElementVNode("span", _hoisted_1$14, toDisplayString(__props.title), 1),
|
|
737
736
|
createVNode(_component_v_spacer),
|
|
738
737
|
__props.hasCreate ? (openBlock(), createBlock(_component_v_btn, {
|
|
739
738
|
key: 0,
|
|
@@ -767,27 +766,28 @@ function useAdaptSlotList() {
|
|
|
767
766
|
const type = injectType();
|
|
768
767
|
const subtype = injectSubtype();
|
|
769
768
|
const { i18n } = globalObjects;
|
|
770
|
-
const adaptSlotList =
|
|
769
|
+
const adaptSlotList = {
|
|
770
|
+
groups: ref([]),
|
|
771
|
+
items: ref([]),
|
|
772
|
+
state: ref({})
|
|
773
|
+
};
|
|
771
774
|
provideAdaptSlotList(adaptSlotList);
|
|
772
|
-
|
|
773
|
-
|
|
775
|
+
function getLatest() {
|
|
776
|
+
const tmpGroups = [];
|
|
777
|
+
const tmpItems = [];
|
|
778
|
+
if (!version.value || !type.value || !subtype.value) return [tmpGroups, tmpItems];
|
|
774
779
|
const pkg = pkgs[version.value];
|
|
775
780
|
if (!pkg) {
|
|
776
781
|
console.assert(false, `invalid version=${version.value}`);
|
|
777
|
-
return [];
|
|
782
|
+
return [tmpGroups, tmpItems];
|
|
778
783
|
}
|
|
779
784
|
const tag = getTag(type.value, subtype.value);
|
|
780
|
-
const tmpSlotList = [];
|
|
781
785
|
for (let i = 0; i < pkg.groups[tag].length; i++) {
|
|
782
786
|
const group = pkg.groups[tag][i];
|
|
783
|
-
|
|
784
|
-
tmpSlotList.push({
|
|
787
|
+
tmpGroups.push({
|
|
785
788
|
id: group.key,
|
|
786
|
-
type: 0,
|
|
787
|
-
name: i18n.global.t(group.name),
|
|
788
789
|
position: i,
|
|
789
|
-
|
|
790
|
-
count: 0
|
|
790
|
+
name: i18n.global.t(group.name)
|
|
791
791
|
});
|
|
792
792
|
let pos = 0;
|
|
793
793
|
for (const item of group.items) {
|
|
@@ -798,28 +798,22 @@ function useAdaptSlotList() {
|
|
|
798
798
|
for (const slot of element.slots) {
|
|
799
799
|
const id = makeSlotId("elementSlot", element.key, slot.key);
|
|
800
800
|
const name = `${i18n.global.t(element.name)} / ${i18n.global.t(slot.name)}`;
|
|
801
|
-
|
|
801
|
+
tmpItems.push({
|
|
802
802
|
id,
|
|
803
|
-
type: 1,
|
|
804
|
-
name,
|
|
805
|
-
position: pos++,
|
|
806
803
|
group: group.key,
|
|
804
|
+
position: pos++,
|
|
805
|
+
name,
|
|
807
806
|
names: [element.name, slot.name]
|
|
808
807
|
});
|
|
809
808
|
}
|
|
810
809
|
}
|
|
811
810
|
}
|
|
812
811
|
const { activeApp, depends } = globalState.app;
|
|
813
|
-
for (const { id, name, position } of activeApp.compGroups) {
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
name,
|
|
819
|
-
position,
|
|
820
|
-
collapse: last?.collapse ?? true
|
|
821
|
-
});
|
|
822
|
-
}
|
|
812
|
+
for (const { id, name, position } of activeApp.compGroups) tmpGroups.push({
|
|
813
|
+
id,
|
|
814
|
+
position,
|
|
815
|
+
name
|
|
816
|
+
});
|
|
823
817
|
let pos = 0;
|
|
824
818
|
for (const comp of activeApp.comps) {
|
|
825
819
|
const depend = depends[comp.id];
|
|
@@ -828,33 +822,34 @@ function useAdaptSlotList() {
|
|
|
828
822
|
for (const slot of depend.meta.slots) {
|
|
829
823
|
const id = makeSlotId("customSlot", comp.id, slot.id);
|
|
830
824
|
const name = `${comp.name} / ${slot.name}`;
|
|
831
|
-
|
|
825
|
+
tmpItems.push({
|
|
832
826
|
id,
|
|
833
|
-
type: 1,
|
|
834
|
-
name,
|
|
835
|
-
position: pos++,
|
|
836
827
|
group: comp.groupId,
|
|
828
|
+
position: pos++,
|
|
829
|
+
name,
|
|
837
830
|
names: [comp.name, slot.name]
|
|
838
831
|
});
|
|
839
832
|
}
|
|
840
833
|
}
|
|
841
|
-
return
|
|
842
|
-
}
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
834
|
+
return [tmpGroups, tmpItems];
|
|
835
|
+
}
|
|
836
|
+
function refresh() {
|
|
837
|
+
const [groups, items] = getLatest();
|
|
838
|
+
adaptSlotList.groups.value = groups;
|
|
839
|
+
adaptSlotList.items.value = items;
|
|
840
|
+
}
|
|
846
841
|
let handle;
|
|
847
|
-
|
|
842
|
+
function startTimer() {
|
|
848
843
|
clearTimeout(handle);
|
|
849
844
|
handle = window.setTimeout(() => {
|
|
850
845
|
refresh();
|
|
851
846
|
if (handle) startTimer();
|
|
852
847
|
}, 1e3);
|
|
853
|
-
}
|
|
854
|
-
|
|
848
|
+
}
|
|
849
|
+
function stopTimer() {
|
|
855
850
|
clearTimeout(handle);
|
|
856
851
|
handle = void 0;
|
|
857
|
-
}
|
|
852
|
+
}
|
|
858
853
|
onMounted(() => {
|
|
859
854
|
startTimer();
|
|
860
855
|
});
|
|
@@ -874,45 +869,45 @@ function useAdaptSlotList() {
|
|
|
874
869
|
//#endregion
|
|
875
870
|
//#region src/composables/compList/index.ts
|
|
876
871
|
function useCompList() {
|
|
877
|
-
const compList =
|
|
872
|
+
const compList = {
|
|
873
|
+
groups: ref([]),
|
|
874
|
+
items: ref([]),
|
|
875
|
+
state: ref({})
|
|
876
|
+
};
|
|
878
877
|
provideCompList(compList);
|
|
879
|
-
|
|
878
|
+
function refresh() {
|
|
879
|
+
const tmpGroups = [];
|
|
880
|
+
const tmpItems = [];
|
|
880
881
|
const { activeApp, depends } = globalState.app;
|
|
881
|
-
const
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
type: 0,
|
|
887
|
-
name,
|
|
888
|
-
position,
|
|
889
|
-
collapse: last?.collapse ?? true
|
|
890
|
-
});
|
|
891
|
-
}
|
|
882
|
+
for (const { id, name, position } of activeApp.compGroups) tmpGroups.push({
|
|
883
|
+
id,
|
|
884
|
+
position,
|
|
885
|
+
name
|
|
886
|
+
});
|
|
892
887
|
for (const { id, groupId: group, name, position } of activeApp.comps) {
|
|
893
888
|
if (!depends[id]) continue;
|
|
894
|
-
|
|
889
|
+
tmpItems.push({
|
|
895
890
|
id,
|
|
896
|
-
|
|
897
|
-
name,
|
|
891
|
+
group,
|
|
898
892
|
position,
|
|
899
|
-
|
|
893
|
+
name
|
|
900
894
|
});
|
|
901
895
|
}
|
|
902
|
-
compList.value =
|
|
903
|
-
|
|
896
|
+
compList.groups.value = tmpGroups;
|
|
897
|
+
compList.items.value = tmpItems;
|
|
898
|
+
}
|
|
904
899
|
let handle;
|
|
905
|
-
|
|
900
|
+
function startTimer() {
|
|
906
901
|
clearTimeout(handle);
|
|
907
902
|
handle = window.setTimeout(() => {
|
|
908
903
|
refresh();
|
|
909
904
|
if (handle) startTimer();
|
|
910
905
|
}, 1e3);
|
|
911
|
-
}
|
|
912
|
-
|
|
906
|
+
}
|
|
907
|
+
function stopTimer() {
|
|
913
908
|
clearTimeout(handle);
|
|
914
909
|
handle = void 0;
|
|
915
|
-
}
|
|
910
|
+
}
|
|
916
911
|
onMounted(() => {
|
|
917
912
|
startTimer();
|
|
918
913
|
});
|
|
@@ -960,117 +955,8 @@ function useSlotList() {
|
|
|
960
955
|
});
|
|
961
956
|
}
|
|
962
957
|
|
|
963
|
-
//#endregion
|
|
964
|
-
//#region src/components/values/adaptSlot/adaptSlotList/group.vue?vue&type=script&setup=true&lang.ts
|
|
965
|
-
const _hoisted_1$19 = { class: "text-label-large ml-1" };
|
|
966
|
-
const _hoisted_2$3 = { class: "text-body-small text-grey ml-1" };
|
|
967
|
-
var group_vue_vue_type_script_setup_true_lang_default$1 = /*@__PURE__*/ defineComponent({
|
|
968
|
-
__name: "group",
|
|
969
|
-
props: {
|
|
970
|
-
id: {
|
|
971
|
-
type: String,
|
|
972
|
-
required: true
|
|
973
|
-
},
|
|
974
|
-
title: {
|
|
975
|
-
type: String,
|
|
976
|
-
required: true
|
|
977
|
-
},
|
|
978
|
-
collapse: {
|
|
979
|
-
type: Boolean,
|
|
980
|
-
required: true
|
|
981
|
-
},
|
|
982
|
-
count: {
|
|
983
|
-
type: Number,
|
|
984
|
-
required: true
|
|
985
|
-
}
|
|
986
|
-
},
|
|
987
|
-
emits: ["x-click"],
|
|
988
|
-
setup(__props, { emit: __emit }) {
|
|
989
|
-
const { backgroundColor2, highlightColor } = useColor();
|
|
990
|
-
const emit = __emit;
|
|
991
|
-
const mouseOver = ref(false);
|
|
992
|
-
const style = computed(() => {
|
|
993
|
-
return {
|
|
994
|
-
background: mouseOver.value ? highlightColor.value : backgroundColor2.value,
|
|
995
|
-
height: "30px",
|
|
996
|
-
userSelect: "none"
|
|
997
|
-
};
|
|
998
|
-
});
|
|
999
|
-
return (_ctx, _cache) => {
|
|
1000
|
-
const _component_v_icon = resolveComponent("v-icon");
|
|
1001
|
-
const _directive_ripple = resolveDirective("ripple");
|
|
1002
|
-
return withDirectives((openBlock(), createElementBlock("div", {
|
|
1003
|
-
class: "d-flex align-center cursor-pointer",
|
|
1004
|
-
style: normalizeStyle(style.value),
|
|
1005
|
-
onClick: _cache[0] || (_cache[0] = ($event) => emit("x-click", __props.id)),
|
|
1006
|
-
onMouseout: _cache[1] || (_cache[1] = ($event) => mouseOver.value = false),
|
|
1007
|
-
onMouseover: _cache[2] || (_cache[2] = ($event) => mouseOver.value = true)
|
|
1008
|
-
}, [
|
|
1009
|
-
createVNode(_component_v_icon, {
|
|
1010
|
-
icon: __props.collapse ? "mdi-chevron-right" : "mdi-chevron-down",
|
|
1011
|
-
size: "small"
|
|
1012
|
-
}, null, 8, ["icon"]),
|
|
1013
|
-
createElementVNode("span", _hoisted_1$19, toDisplayString(__props.title), 1),
|
|
1014
|
-
createElementVNode("span", _hoisted_2$3, toDisplayString(__props.count), 1)
|
|
1015
|
-
], 36)), [[_directive_ripple]]);
|
|
1016
|
-
};
|
|
1017
|
-
}
|
|
1018
|
-
});
|
|
1019
|
-
|
|
1020
|
-
//#endregion
|
|
1021
|
-
//#region src/components/values/adaptSlot/adaptSlotList/group.vue
|
|
1022
|
-
var group_default$1 = group_vue_vue_type_script_setup_true_lang_default$1;
|
|
1023
|
-
|
|
1024
|
-
//#endregion
|
|
1025
|
-
//#region src/components/values/adaptSlot/adaptSlotList/item.vue?vue&type=script&setup=true&lang.ts
|
|
1026
|
-
const _hoisted_1$18 = { class: "text-body-large ml-6" };
|
|
1027
|
-
var item_vue_vue_type_script_setup_true_lang_default$2 = /*@__PURE__*/ defineComponent({
|
|
1028
|
-
__name: "item",
|
|
1029
|
-
props: {
|
|
1030
|
-
id: {
|
|
1031
|
-
type: String,
|
|
1032
|
-
required: true
|
|
1033
|
-
},
|
|
1034
|
-
title: {
|
|
1035
|
-
type: String,
|
|
1036
|
-
required: true
|
|
1037
|
-
}
|
|
1038
|
-
},
|
|
1039
|
-
emits: ["x-click"],
|
|
1040
|
-
setup(__props, { emit: __emit }) {
|
|
1041
|
-
const { backgroundColor2, highlightColor } = useColor();
|
|
1042
|
-
const emit = __emit;
|
|
1043
|
-
const mouseOver = ref(false);
|
|
1044
|
-
const style = computed(() => {
|
|
1045
|
-
return {
|
|
1046
|
-
background: mouseOver.value ? highlightColor.value : backgroundColor2.value,
|
|
1047
|
-
height: "48px",
|
|
1048
|
-
userSelect: "none"
|
|
1049
|
-
};
|
|
1050
|
-
});
|
|
1051
|
-
return (_ctx, _cache) => {
|
|
1052
|
-
const _directive_ripple = resolveDirective("ripple");
|
|
1053
|
-
return withDirectives((openBlock(), createElementBlock("div", {
|
|
1054
|
-
class: "d-flex align-center cursor-pointer",
|
|
1055
|
-
style: normalizeStyle(style.value),
|
|
1056
|
-
onClick: _cache[0] || (_cache[0] = ($event) => emit("x-click", __props.id)),
|
|
1057
|
-
onMouseout: _cache[1] || (_cache[1] = ($event) => mouseOver.value = false),
|
|
1058
|
-
onMouseover: _cache[2] || (_cache[2] = ($event) => mouseOver.value = true)
|
|
1059
|
-
}, [createElementVNode("span", _hoisted_1$18, toDisplayString(__props.title), 1)], 36)), [[_directive_ripple]]);
|
|
1060
|
-
};
|
|
1061
|
-
}
|
|
1062
|
-
});
|
|
1063
|
-
|
|
1064
|
-
//#endregion
|
|
1065
|
-
//#region src/components/values/adaptSlot/adaptSlotList/item.vue
|
|
1066
|
-
var item_default$2 = item_vue_vue_type_script_setup_true_lang_default$2;
|
|
1067
|
-
|
|
1068
958
|
//#endregion
|
|
1069
959
|
//#region src/components/values/adaptSlot/adaptSlotList/index.vue?vue&type=script&setup=true&lang.ts
|
|
1070
|
-
const _hoisted_1$17 = {
|
|
1071
|
-
key: 1,
|
|
1072
|
-
class: "text-body-medium text-grey ml-3"
|
|
1073
|
-
};
|
|
1074
960
|
var index_vue_vue_type_script_setup_true_lang_default$15 = /*@__PURE__*/ defineComponent({
|
|
1075
961
|
__name: "index",
|
|
1076
962
|
props: {
|
|
@@ -1086,46 +972,25 @@ var index_vue_vue_type_script_setup_true_lang_default$15 = /*@__PURE__*/ defineC
|
|
|
1086
972
|
const open = useModel(__props, "open");
|
|
1087
973
|
const emit = __emit;
|
|
1088
974
|
const adaptSlotList = injectAdaptSlotList();
|
|
1089
|
-
const style = computed(() => {
|
|
1090
|
-
return {
|
|
1091
|
-
display: "flex",
|
|
1092
|
-
flexDirection: "column",
|
|
1093
|
-
gap: "1px"
|
|
1094
|
-
};
|
|
1095
|
-
});
|
|
1096
|
-
function onGroupClick(id) {
|
|
1097
|
-
const group = getListEntry(adaptSlotList, id);
|
|
1098
|
-
if (!group) return;
|
|
1099
|
-
setCollapse(adaptSlotList, id, !group.collapse);
|
|
1100
|
-
}
|
|
1101
975
|
function onItemClick(id) {
|
|
1102
976
|
open.value = false;
|
|
1103
977
|
emit("x-select", id);
|
|
1104
978
|
}
|
|
1105
979
|
return (_ctx, _cache) => {
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
"count",
|
|
1121
|
-
"title"
|
|
1122
|
-
])) : createCommentVNode("v-if", true), item.type === 1 && item.show ? (openBlock(), createBlock(item_default$2, {
|
|
1123
|
-
key: 1,
|
|
1124
|
-
id: item.id,
|
|
1125
|
-
title: item.name,
|
|
1126
|
-
onXClick: onItemClick
|
|
1127
|
-
}, null, 8, ["id", "title"])) : createCommentVNode("v-if", true)], 64);
|
|
1128
|
-
}), 128))], 4)) : (openBlock(), createElementBlock("div", _hoisted_1$17, toDisplayString(unref(t)("x-prop-tree.noAdaptSlot")), 1));
|
|
980
|
+
const _component_x_group_list_lite = resolveComponent("x-group-list-lite");
|
|
981
|
+
return openBlock(), createBlock(_component_x_group_list_lite, {
|
|
982
|
+
state: unref(adaptSlotList).state,
|
|
983
|
+
"onUpdate:state": _cache[0] || (_cache[0] = ($event) => unref(adaptSlotList).state = $event),
|
|
984
|
+
groups: unref(adaptSlotList).groups,
|
|
985
|
+
items: unref(adaptSlotList).items,
|
|
986
|
+
"no-data": unref(t)("x-prop-tree.noAdaptSlot"),
|
|
987
|
+
onXItemClick: onItemClick
|
|
988
|
+
}, null, 8, [
|
|
989
|
+
"state",
|
|
990
|
+
"groups",
|
|
991
|
+
"items",
|
|
992
|
+
"no-data"
|
|
993
|
+
]);
|
|
1129
994
|
};
|
|
1130
995
|
}
|
|
1131
996
|
});
|
|
@@ -1136,7 +1001,7 @@ var adaptSlotList_default = index_vue_vue_type_script_setup_true_lang_default$15
|
|
|
1136
1001
|
|
|
1137
1002
|
//#endregion
|
|
1138
1003
|
//#region src/components/values/adaptSlot/index.vue?vue&type=script&setup=true&lang.ts
|
|
1139
|
-
const _hoisted_1$
|
|
1004
|
+
const _hoisted_1$13 = { class: "text-body-large" };
|
|
1140
1005
|
var index_vue_vue_type_script_setup_true_lang_default$14 = /*@__PURE__*/ defineComponent({
|
|
1141
1006
|
__name: "index",
|
|
1142
1007
|
props: /*@__PURE__*/ mergeModels({
|
|
@@ -1161,7 +1026,7 @@ var index_vue_vue_type_script_setup_true_lang_default$14 = /*@__PURE__*/ defineC
|
|
|
1161
1026
|
setup(__props, { emit: __emit }) {
|
|
1162
1027
|
const { t } = useI18n();
|
|
1163
1028
|
const display = useDisplay();
|
|
1164
|
-
const {
|
|
1029
|
+
const { safeAreaInset } = useSystem();
|
|
1165
1030
|
const { backgroundColor1 } = useColor();
|
|
1166
1031
|
const adaptSlot = useModel(__props, "modelValue");
|
|
1167
1032
|
const emit = __emit;
|
|
@@ -1176,19 +1041,15 @@ var index_vue_vue_type_script_setup_true_lang_default$14 = /*@__PURE__*/ defineC
|
|
|
1176
1041
|
};
|
|
1177
1042
|
});
|
|
1178
1043
|
const contStyle = computed(() => {
|
|
1179
|
-
let h = 48;
|
|
1180
|
-
if (sysBarAvail.value) h += 24;
|
|
1181
1044
|
return {
|
|
1182
1045
|
position: "relative",
|
|
1183
|
-
height: `calc(100% - ${
|
|
1046
|
+
height: `calc(100% - ${safeAreaInset.top + 48 + safeAreaInset.bottom}px)`,
|
|
1047
|
+
paddingBottom: "60px"
|
|
1184
1048
|
};
|
|
1185
1049
|
});
|
|
1186
|
-
const tailStyle = computed(() => {
|
|
1187
|
-
return { height: "60px" };
|
|
1188
|
-
});
|
|
1189
1050
|
watchEffect(() => {
|
|
1190
1051
|
if (!adaptSlot.value) return;
|
|
1191
|
-
const item =
|
|
1052
|
+
const item = adaptSlotList.items.value.find((entry) => entry.id === adaptSlot.value.id);
|
|
1192
1053
|
if (item && !isEqual(item.names, adaptSlot.value.names)) adaptSlot.value = {
|
|
1193
1054
|
...adaptSlot.value,
|
|
1194
1055
|
names: cloneDeep(item.names)
|
|
@@ -1210,7 +1071,7 @@ var index_vue_vue_type_script_setup_true_lang_default$14 = /*@__PURE__*/ defineC
|
|
|
1210
1071
|
adaptSlot.value = null;
|
|
1211
1072
|
return;
|
|
1212
1073
|
}
|
|
1213
|
-
const item =
|
|
1074
|
+
const item = adaptSlotList.items.value.find((entry) => entry.id === id);
|
|
1214
1075
|
if (!item) {
|
|
1215
1076
|
adaptSlot.value = null;
|
|
1216
1077
|
return;
|
|
@@ -1256,11 +1117,11 @@ var index_vue_vue_type_script_setup_true_lang_default$14 = /*@__PURE__*/ defineC
|
|
|
1256
1117
|
class: "elevation-2",
|
|
1257
1118
|
style: normalizeStyle(wrapStyle.value)
|
|
1258
1119
|
}, [
|
|
1259
|
-
unref(
|
|
1120
|
+
unref(safeAreaInset).top ? (openBlock(), createBlock(_component_v_sheet, {
|
|
1260
1121
|
key: 0,
|
|
1261
1122
|
color: "transparent",
|
|
1262
|
-
height:
|
|
1263
|
-
})) : createCommentVNode("v-if", true),
|
|
1123
|
+
height: unref(safeAreaInset).top
|
|
1124
|
+
}, null, 8, ["height"])) : createCommentVNode("v-if", true),
|
|
1264
1125
|
createVNode(_component_v_sheet, {
|
|
1265
1126
|
class: "d-flex align-center px-3",
|
|
1266
1127
|
color: "transparent",
|
|
@@ -1271,7 +1132,7 @@ var index_vue_vue_type_script_setup_true_lang_default$14 = /*@__PURE__*/ defineC
|
|
|
1271
1132
|
icon: "mdi-close",
|
|
1272
1133
|
variant: "text",
|
|
1273
1134
|
onClick: _cache[1] || (_cache[1] = ($event) => open.value = false)
|
|
1274
|
-
}), createElementVNode("span", _hoisted_1$
|
|
1135
|
+
}), createElementVNode("span", _hoisted_1$13, toDisplayString(unref(t)("x-prop-tree.selectAdaptSlot")), 1)]),
|
|
1275
1136
|
_: 1
|
|
1276
1137
|
}),
|
|
1277
1138
|
createElementVNode("div", {
|
|
@@ -1281,7 +1142,7 @@ var index_vue_vue_type_script_setup_true_lang_default$14 = /*@__PURE__*/ defineC
|
|
|
1281
1142
|
open: unref(open),
|
|
1282
1143
|
"onUpdate:open": _cache[2] || (_cache[2] = ($event) => isRef(open) ? open.value = $event : null),
|
|
1283
1144
|
onXSelect: onAdaptSlotSelect
|
|
1284
|
-
}, null, 8, ["open"])
|
|
1145
|
+
}, null, 8, ["open"])], 4)
|
|
1285
1146
|
], 4)], 32)]),
|
|
1286
1147
|
_: 1
|
|
1287
1148
|
}, 8, ["modelValue"]);
|
|
@@ -1293,117 +1154,8 @@ var index_vue_vue_type_script_setup_true_lang_default$14 = /*@__PURE__*/ defineC
|
|
|
1293
1154
|
//#region src/components/values/adaptSlot/index.vue
|
|
1294
1155
|
var adaptSlot_default = index_vue_vue_type_script_setup_true_lang_default$14;
|
|
1295
1156
|
|
|
1296
|
-
//#endregion
|
|
1297
|
-
//#region src/components/values/comp/compList/group.vue?vue&type=script&setup=true&lang.ts
|
|
1298
|
-
const _hoisted_1$15 = { class: "text-label-large ml-1" };
|
|
1299
|
-
const _hoisted_2$2 = { class: "text-body-small text-grey ml-1" };
|
|
1300
|
-
var group_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
1301
|
-
__name: "group",
|
|
1302
|
-
props: {
|
|
1303
|
-
id: {
|
|
1304
|
-
type: String,
|
|
1305
|
-
required: true
|
|
1306
|
-
},
|
|
1307
|
-
title: {
|
|
1308
|
-
type: String,
|
|
1309
|
-
required: true
|
|
1310
|
-
},
|
|
1311
|
-
collapse: {
|
|
1312
|
-
type: Boolean,
|
|
1313
|
-
required: true
|
|
1314
|
-
},
|
|
1315
|
-
count: {
|
|
1316
|
-
type: Number,
|
|
1317
|
-
required: true
|
|
1318
|
-
}
|
|
1319
|
-
},
|
|
1320
|
-
emits: ["x-click"],
|
|
1321
|
-
setup(__props, { emit: __emit }) {
|
|
1322
|
-
const { backgroundColor2, highlightColor } = useColor();
|
|
1323
|
-
const emit = __emit;
|
|
1324
|
-
const mouseOver = ref(false);
|
|
1325
|
-
const style = computed(() => {
|
|
1326
|
-
return {
|
|
1327
|
-
background: mouseOver.value ? highlightColor.value : backgroundColor2.value,
|
|
1328
|
-
height: "30px",
|
|
1329
|
-
userSelect: "none"
|
|
1330
|
-
};
|
|
1331
|
-
});
|
|
1332
|
-
return (_ctx, _cache) => {
|
|
1333
|
-
const _component_v_icon = resolveComponent("v-icon");
|
|
1334
|
-
const _directive_ripple = resolveDirective("ripple");
|
|
1335
|
-
return withDirectives((openBlock(), createElementBlock("div", {
|
|
1336
|
-
class: "d-flex align-center cursor-pointer",
|
|
1337
|
-
style: normalizeStyle(style.value),
|
|
1338
|
-
onClick: _cache[0] || (_cache[0] = ($event) => emit("x-click", __props.id)),
|
|
1339
|
-
onMouseout: _cache[1] || (_cache[1] = ($event) => mouseOver.value = false),
|
|
1340
|
-
onMouseover: _cache[2] || (_cache[2] = ($event) => mouseOver.value = true)
|
|
1341
|
-
}, [
|
|
1342
|
-
createVNode(_component_v_icon, {
|
|
1343
|
-
icon: __props.collapse ? "mdi-chevron-right" : "mdi-chevron-down",
|
|
1344
|
-
size: "small"
|
|
1345
|
-
}, null, 8, ["icon"]),
|
|
1346
|
-
createElementVNode("span", _hoisted_1$15, toDisplayString(__props.title), 1),
|
|
1347
|
-
createElementVNode("span", _hoisted_2$2, toDisplayString(__props.count), 1)
|
|
1348
|
-
], 36)), [[_directive_ripple]]);
|
|
1349
|
-
};
|
|
1350
|
-
}
|
|
1351
|
-
});
|
|
1352
|
-
|
|
1353
|
-
//#endregion
|
|
1354
|
-
//#region src/components/values/comp/compList/group.vue
|
|
1355
|
-
var group_default = group_vue_vue_type_script_setup_true_lang_default;
|
|
1356
|
-
|
|
1357
|
-
//#endregion
|
|
1358
|
-
//#region src/components/values/comp/compList/item.vue?vue&type=script&setup=true&lang.ts
|
|
1359
|
-
const _hoisted_1$14 = { class: "text-body-large ml-6" };
|
|
1360
|
-
var item_vue_vue_type_script_setup_true_lang_default$1 = /*@__PURE__*/ defineComponent({
|
|
1361
|
-
__name: "item",
|
|
1362
|
-
props: {
|
|
1363
|
-
id: {
|
|
1364
|
-
type: String,
|
|
1365
|
-
required: true
|
|
1366
|
-
},
|
|
1367
|
-
title: {
|
|
1368
|
-
type: String,
|
|
1369
|
-
required: true
|
|
1370
|
-
}
|
|
1371
|
-
},
|
|
1372
|
-
emits: ["x-click"],
|
|
1373
|
-
setup(__props, { emit: __emit }) {
|
|
1374
|
-
const { backgroundColor2, highlightColor } = useColor();
|
|
1375
|
-
const emit = __emit;
|
|
1376
|
-
const mouseOver = ref(false);
|
|
1377
|
-
const style = computed(() => {
|
|
1378
|
-
return {
|
|
1379
|
-
background: mouseOver.value ? highlightColor.value : backgroundColor2.value,
|
|
1380
|
-
height: "48px",
|
|
1381
|
-
userSelect: "none"
|
|
1382
|
-
};
|
|
1383
|
-
});
|
|
1384
|
-
return (_ctx, _cache) => {
|
|
1385
|
-
const _directive_ripple = resolveDirective("ripple");
|
|
1386
|
-
return withDirectives((openBlock(), createElementBlock("div", {
|
|
1387
|
-
class: "d-flex align-center cursor-pointer",
|
|
1388
|
-
style: normalizeStyle(style.value),
|
|
1389
|
-
onClick: _cache[0] || (_cache[0] = ($event) => emit("x-click", __props.id)),
|
|
1390
|
-
onMouseout: _cache[1] || (_cache[1] = ($event) => mouseOver.value = false),
|
|
1391
|
-
onMouseover: _cache[2] || (_cache[2] = ($event) => mouseOver.value = true)
|
|
1392
|
-
}, [createElementVNode("span", _hoisted_1$14, toDisplayString(__props.title), 1)], 36)), [[_directive_ripple]]);
|
|
1393
|
-
};
|
|
1394
|
-
}
|
|
1395
|
-
});
|
|
1396
|
-
|
|
1397
|
-
//#endregion
|
|
1398
|
-
//#region src/components/values/comp/compList/item.vue
|
|
1399
|
-
var item_default$1 = item_vue_vue_type_script_setup_true_lang_default$1;
|
|
1400
|
-
|
|
1401
1157
|
//#endregion
|
|
1402
1158
|
//#region src/components/values/comp/compList/index.vue?vue&type=script&setup=true&lang.ts
|
|
1403
|
-
const _hoisted_1$13 = {
|
|
1404
|
-
key: 1,
|
|
1405
|
-
class: "text-body-medium text-grey ml-3"
|
|
1406
|
-
};
|
|
1407
1159
|
var index_vue_vue_type_script_setup_true_lang_default$13 = /*@__PURE__*/ defineComponent({
|
|
1408
1160
|
__name: "index",
|
|
1409
1161
|
props: {
|
|
@@ -1419,47 +1171,26 @@ var index_vue_vue_type_script_setup_true_lang_default$13 = /*@__PURE__*/ defineC
|
|
|
1419
1171
|
const open = useModel(__props, "open");
|
|
1420
1172
|
const emit = __emit;
|
|
1421
1173
|
const compList = injectCompList();
|
|
1422
|
-
const style = computed(() => {
|
|
1423
|
-
return {
|
|
1424
|
-
display: "flex",
|
|
1425
|
-
flexDirection: "column",
|
|
1426
|
-
gap: "1px"
|
|
1427
|
-
};
|
|
1428
|
-
});
|
|
1429
|
-
function onGroupClick(id) {
|
|
1430
|
-
const group = getListEntry(compList, id);
|
|
1431
|
-
if (!group) return;
|
|
1432
|
-
setCollapse(compList, id, !group.collapse);
|
|
1433
|
-
}
|
|
1434
1174
|
function onItemClick(id) {
|
|
1435
1175
|
open.value = false;
|
|
1436
1176
|
emit("x-select", id);
|
|
1437
1177
|
eventBus.emit("refreshDepends");
|
|
1438
1178
|
}
|
|
1439
1179
|
return (_ctx, _cache) => {
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
"count",
|
|
1455
|
-
"title"
|
|
1456
|
-
])) : createCommentVNode("v-if", true), item.type === 1 && item.show ? (openBlock(), createBlock(item_default$1, {
|
|
1457
|
-
key: 1,
|
|
1458
|
-
id: item.id,
|
|
1459
|
-
title: item.name,
|
|
1460
|
-
onXClick: onItemClick
|
|
1461
|
-
}, null, 8, ["id", "title"])) : createCommentVNode("v-if", true)], 64);
|
|
1462
|
-
}), 128))], 4)) : (openBlock(), createElementBlock("div", _hoisted_1$13, toDisplayString(unref(t)("x-prop-tree.noComp")), 1));
|
|
1180
|
+
const _component_x_group_list_lite = resolveComponent("x-group-list-lite");
|
|
1181
|
+
return openBlock(), createBlock(_component_x_group_list_lite, {
|
|
1182
|
+
state: unref(compList).state,
|
|
1183
|
+
"onUpdate:state": _cache[0] || (_cache[0] = ($event) => unref(compList).state = $event),
|
|
1184
|
+
groups: unref(compList).groups,
|
|
1185
|
+
items: unref(compList).items,
|
|
1186
|
+
"no-data": unref(t)("x-prop-tree.noComp"),
|
|
1187
|
+
onXItemClick: onItemClick
|
|
1188
|
+
}, null, 8, [
|
|
1189
|
+
"state",
|
|
1190
|
+
"groups",
|
|
1191
|
+
"items",
|
|
1192
|
+
"no-data"
|
|
1193
|
+
]);
|
|
1463
1194
|
};
|
|
1464
1195
|
}
|
|
1465
1196
|
});
|
|
@@ -1495,7 +1226,7 @@ var index_vue_vue_type_script_setup_true_lang_default$12 = /*@__PURE__*/ defineC
|
|
|
1495
1226
|
setup(__props, { emit: __emit }) {
|
|
1496
1227
|
const { t } = useI18n();
|
|
1497
1228
|
const display = useDisplay();
|
|
1498
|
-
const {
|
|
1229
|
+
const { safeAreaInset } = useSystem();
|
|
1499
1230
|
const { backgroundColor1 } = useColor();
|
|
1500
1231
|
const comp = useModel(__props, "modelValue");
|
|
1501
1232
|
const emit = __emit;
|
|
@@ -1510,19 +1241,18 @@ var index_vue_vue_type_script_setup_true_lang_default$12 = /*@__PURE__*/ defineC
|
|
|
1510
1241
|
};
|
|
1511
1242
|
});
|
|
1512
1243
|
const contStyle = computed(() => {
|
|
1513
|
-
let h = 48;
|
|
1514
|
-
if (sysBarAvail.value) h += 24;
|
|
1515
1244
|
return {
|
|
1516
1245
|
position: "relative",
|
|
1517
|
-
height: `calc(100% - ${
|
|
1246
|
+
height: `calc(100% - ${safeAreaInset.top + 48 + safeAreaInset.bottom}px)`,
|
|
1247
|
+
paddingBottom: "60px"
|
|
1518
1248
|
};
|
|
1519
1249
|
});
|
|
1520
|
-
|
|
1250
|
+
computed(() => {
|
|
1521
1251
|
return { height: "60px" };
|
|
1522
1252
|
});
|
|
1523
1253
|
watchEffect(() => {
|
|
1524
1254
|
if (!comp.value) return;
|
|
1525
|
-
const item =
|
|
1255
|
+
const item = compList.items.value.find((entry) => entry.id === comp.value.id);
|
|
1526
1256
|
if (item && item.name !== comp.value.name) comp.value = {
|
|
1527
1257
|
...comp.value,
|
|
1528
1258
|
name: item.name
|
|
@@ -1541,7 +1271,7 @@ var index_vue_vue_type_script_setup_true_lang_default$12 = /*@__PURE__*/ defineC
|
|
|
1541
1271
|
comp.value = null;
|
|
1542
1272
|
return;
|
|
1543
1273
|
}
|
|
1544
|
-
const item =
|
|
1274
|
+
const item = compList.items.value.find((entry) => entry.id === id);
|
|
1545
1275
|
if (!item) {
|
|
1546
1276
|
comp.value = null;
|
|
1547
1277
|
return;
|
|
@@ -1587,11 +1317,11 @@ var index_vue_vue_type_script_setup_true_lang_default$12 = /*@__PURE__*/ defineC
|
|
|
1587
1317
|
class: "elevation-2",
|
|
1588
1318
|
style: normalizeStyle(wrapStyle.value)
|
|
1589
1319
|
}, [
|
|
1590
|
-
unref(
|
|
1320
|
+
unref(safeAreaInset).top ? (openBlock(), createBlock(_component_v_sheet, {
|
|
1591
1321
|
key: 0,
|
|
1592
1322
|
color: "transparent",
|
|
1593
|
-
height:
|
|
1594
|
-
})) : createCommentVNode("v-if", true),
|
|
1323
|
+
height: unref(safeAreaInset).top
|
|
1324
|
+
}, null, 8, ["height"])) : createCommentVNode("v-if", true),
|
|
1595
1325
|
createVNode(_component_v_sheet, {
|
|
1596
1326
|
class: "d-flex align-center px-3",
|
|
1597
1327
|
color: "transparent",
|
|
@@ -1612,7 +1342,7 @@ var index_vue_vue_type_script_setup_true_lang_default$12 = /*@__PURE__*/ defineC
|
|
|
1612
1342
|
open: unref(open),
|
|
1613
1343
|
"onUpdate:open": _cache[2] || (_cache[2] = ($event) => isRef(open) ? open.value = $event : null),
|
|
1614
1344
|
onXSelect: onCompSelect
|
|
1615
|
-
}, null, 8, ["open"])
|
|
1345
|
+
}, null, 8, ["open"])], 4)
|
|
1616
1346
|
], 4)], 32)]),
|
|
1617
1347
|
_: 1
|
|
1618
1348
|
}, 8, ["modelValue"]);
|
|
@@ -1772,14 +1502,12 @@ var index_vue_vue_type_script_setup_true_lang_default$10 = /*@__PURE__*/ defineC
|
|
|
1772
1502
|
emits: /*@__PURE__*/ mergeModels(["delete"], ["update:modelValue"]),
|
|
1773
1503
|
setup(__props, { emit: __emit }) {
|
|
1774
1504
|
const { t } = useI18n();
|
|
1775
|
-
const {
|
|
1505
|
+
const { safeAreaInset } = useSystem();
|
|
1776
1506
|
const { backgroundColor0, backgroundColor1, backgroundColor2 } = useColor();
|
|
1777
|
-
injectViews();
|
|
1778
1507
|
const json = useModel(__props, "modelValue");
|
|
1779
1508
|
const emit = __emit;
|
|
1780
1509
|
const contStyle = computed(() => {
|
|
1781
|
-
let h = 48;
|
|
1782
|
-
if (sysBarAvail.value) h += 24;
|
|
1510
|
+
let h = safeAreaInset.top + 48 + safeAreaInset.bottom;
|
|
1783
1511
|
return {
|
|
1784
1512
|
position: "relative",
|
|
1785
1513
|
background: backgroundColor1.value,
|
|
@@ -1787,20 +1515,10 @@ var index_vue_vue_type_script_setup_true_lang_default$10 = /*@__PURE__*/ defineC
|
|
|
1787
1515
|
};
|
|
1788
1516
|
});
|
|
1789
1517
|
const editor = useTemplateRef("editor");
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
if (!await openConfirmDlg({
|
|
1795
|
-
title: t("x-prop-tree.dlg.saveChange.title"),
|
|
1796
|
-
text: t("x-prop-tree.dlg.saveChange.text")
|
|
1797
|
-
})) return;
|
|
1798
|
-
json.value = newJson;
|
|
1799
|
-
} finally {
|
|
1800
|
-
open.value = false;
|
|
1801
|
-
}
|
|
1802
|
-
}
|
|
1803
|
-
const { open } = useViewStack(`propTreejsonEditorDlg${useId()}`, void 0, onClose);
|
|
1518
|
+
const { open } = useViewStack(`propTreejsonEditorDlg${useId()}`);
|
|
1519
|
+
watch(open, (val) => {
|
|
1520
|
+
if (!val) json.value = editor.value.save();
|
|
1521
|
+
});
|
|
1804
1522
|
return (_ctx, _cache) => {
|
|
1805
1523
|
const _component_v_btn = resolveComponent("v-btn");
|
|
1806
1524
|
const _component_v_sheet = resolveComponent("v-sheet");
|
|
@@ -1808,13 +1526,13 @@ var index_vue_vue_type_script_setup_true_lang_default$10 = /*@__PURE__*/ defineC
|
|
|
1808
1526
|
const _component_v_dialog = resolveComponent("v-dialog");
|
|
1809
1527
|
return openBlock(), createBlock(_component_v_dialog, {
|
|
1810
1528
|
modelValue: unref(open),
|
|
1811
|
-
"onUpdate:modelValue": _cache[
|
|
1529
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(open) ? open.value = $event : null),
|
|
1812
1530
|
attach: "",
|
|
1813
1531
|
fullscreen: "",
|
|
1814
1532
|
"no-click-animation": "",
|
|
1815
1533
|
persistent: "",
|
|
1816
1534
|
transition: "dialog-bottom-transition",
|
|
1817
|
-
onKeydown: withKeys(withModifiers(
|
|
1535
|
+
onKeydown: _cache[3] || (_cache[3] = withKeys(withModifiers(($event) => open.value = false, ["stop", "prevent"]), ["esc"]))
|
|
1818
1536
|
}, {
|
|
1819
1537
|
activator: withCtx(({ props: activatorProps }) => [createVNode(_component_v_btn, mergeProps(activatorProps, {
|
|
1820
1538
|
block: "",
|
|
@@ -1837,11 +1555,11 @@ var index_vue_vue_type_script_setup_true_lang_default$10 = /*@__PURE__*/ defineC
|
|
|
1837
1555
|
width: "100%"
|
|
1838
1556
|
}, {
|
|
1839
1557
|
default: withCtx(() => [
|
|
1840
|
-
unref(
|
|
1558
|
+
unref(safeAreaInset).top ? (openBlock(), createBlock(_component_v_sheet, {
|
|
1841
1559
|
key: 0,
|
|
1842
1560
|
color: unref(backgroundColor2),
|
|
1843
|
-
height:
|
|
1844
|
-
}, null, 8, ["color"])) : createCommentVNode("v-if", true),
|
|
1561
|
+
height: unref(safeAreaInset).top
|
|
1562
|
+
}, null, 8, ["color", "height"])) : createCommentVNode("v-if", true),
|
|
1845
1563
|
createVNode(_component_v_sheet, {
|
|
1846
1564
|
class: "d-flex align-center px-2",
|
|
1847
1565
|
color: unref(backgroundColor2),
|
|
@@ -1852,7 +1570,7 @@ var index_vue_vue_type_script_setup_true_lang_default$10 = /*@__PURE__*/ defineC
|
|
|
1852
1570
|
density: "comfortable",
|
|
1853
1571
|
icon: "mdi-close",
|
|
1854
1572
|
variant: "text",
|
|
1855
|
-
onClick:
|
|
1573
|
+
onClick: _cache[1] || (_cache[1] = ($event) => open.value = false)
|
|
1856
1574
|
}),
|
|
1857
1575
|
createElementVNode("span", _hoisted_1$10, toDisplayString(unref(t)("x-prop-tree.jsonEditor")), 1),
|
|
1858
1576
|
createVNode(_component_v_spacer)
|
|
@@ -1868,7 +1586,7 @@ var index_vue_vue_type_script_setup_true_lang_default$10 = /*@__PURE__*/ defineC
|
|
|
1868
1586
|
_: 1
|
|
1869
1587
|
}, 8, ["color"])]),
|
|
1870
1588
|
_: 1
|
|
1871
|
-
}, 8, ["modelValue"
|
|
1589
|
+
}, 8, ["modelValue"]);
|
|
1872
1590
|
};
|
|
1873
1591
|
}
|
|
1874
1592
|
});
|
|
@@ -2601,7 +2319,7 @@ var index_vue_vue_type_script_setup_true_lang_default$4 = /*@__PURE__*/ defineCo
|
|
|
2601
2319
|
setup(__props, { emit: __emit }) {
|
|
2602
2320
|
const { t } = useI18n();
|
|
2603
2321
|
const display = useDisplay();
|
|
2604
|
-
const {
|
|
2322
|
+
const { safeAreaInset } = useSystem();
|
|
2605
2323
|
const { backgroundColor1 } = useColor();
|
|
2606
2324
|
const slot = useModel(__props, "modelValue");
|
|
2607
2325
|
const emit = __emit;
|
|
@@ -2616,16 +2334,12 @@ var index_vue_vue_type_script_setup_true_lang_default$4 = /*@__PURE__*/ defineCo
|
|
|
2616
2334
|
};
|
|
2617
2335
|
});
|
|
2618
2336
|
const contStyle = computed(() => {
|
|
2619
|
-
let h = 48;
|
|
2620
|
-
if (sysBarAvail.value) h += 24;
|
|
2621
2337
|
return {
|
|
2622
2338
|
position: "relative",
|
|
2623
|
-
height: `calc(100% - ${
|
|
2339
|
+
height: `calc(100% - ${safeAreaInset.top + 48 + safeAreaInset.bottom}px)`,
|
|
2340
|
+
paddingBottom: "60px"
|
|
2624
2341
|
};
|
|
2625
2342
|
});
|
|
2626
|
-
const tailStyle = computed(() => {
|
|
2627
|
-
return { height: "60px" };
|
|
2628
|
-
});
|
|
2629
2343
|
watchEffect(() => {
|
|
2630
2344
|
if (!slot.value) return;
|
|
2631
2345
|
const item = slotList.value.find((entry) => entry.id === slot.value.id);
|
|
@@ -2693,11 +2407,11 @@ var index_vue_vue_type_script_setup_true_lang_default$4 = /*@__PURE__*/ defineCo
|
|
|
2693
2407
|
class: "elevation-2",
|
|
2694
2408
|
style: normalizeStyle(wrapStyle.value)
|
|
2695
2409
|
}, [
|
|
2696
|
-
unref(
|
|
2410
|
+
unref(safeAreaInset).top ? (openBlock(), createBlock(_component_v_sheet, {
|
|
2697
2411
|
key: 0,
|
|
2698
2412
|
color: "transparent",
|
|
2699
|
-
height:
|
|
2700
|
-
})) : createCommentVNode("v-if", true),
|
|
2413
|
+
height: unref(safeAreaInset).top
|
|
2414
|
+
}, null, 8, ["height"])) : createCommentVNode("v-if", true),
|
|
2701
2415
|
createVNode(_component_v_sheet, {
|
|
2702
2416
|
class: "d-flex align-center px-3",
|
|
2703
2417
|
color: "transparent",
|
|
@@ -2718,7 +2432,7 @@ var index_vue_vue_type_script_setup_true_lang_default$4 = /*@__PURE__*/ defineCo
|
|
|
2718
2432
|
open: unref(open),
|
|
2719
2433
|
"onUpdate:open": _cache[2] || (_cache[2] = ($event) => isRef(open) ? open.value = $event : null),
|
|
2720
2434
|
onXSelect: onSlotSelect
|
|
2721
|
-
}, null, 8, ["open"])
|
|
2435
|
+
}, null, 8, ["open"])], 4)
|
|
2722
2436
|
], 4)], 32)]),
|
|
2723
2437
|
_: 1
|
|
2724
2438
|
}, 8, ["modelValue"]);
|
|
@@ -3273,7 +2987,7 @@ var main_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
3273
2987
|
collapse: isCollapse(collapseState, keys),
|
|
3274
2988
|
hasCreate: true,
|
|
3275
2989
|
onCollapse: (val) => {
|
|
3276
|
-
setCollapse
|
|
2990
|
+
setCollapse(collapseState, keys, val);
|
|
3277
2991
|
},
|
|
3278
2992
|
onMenu: (x, y) => {
|
|
3279
2993
|
eventBus.emit("propTreeMenu", {
|
|
@@ -3302,7 +3016,7 @@ var main_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
3302
3016
|
hasDelete: true,
|
|
3303
3017
|
index: i,
|
|
3304
3018
|
onCollapse: (val) => {
|
|
3305
|
-
setCollapse
|
|
3019
|
+
setCollapse(collapseState, [...keys, i], val);
|
|
3306
3020
|
},
|
|
3307
3021
|
onMenu: (x, y) => {
|
|
3308
3022
|
eventBus.emit("propTreeMenu", {
|
|
@@ -3346,7 +3060,7 @@ var main_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
3346
3060
|
collapse: isCollapse(collapseState, keys),
|
|
3347
3061
|
hasDelete: arrayIndex !== void 0 && !isBranch,
|
|
3348
3062
|
onCollapse: (val) => {
|
|
3349
|
-
setCollapse
|
|
3063
|
+
setCollapse(collapseState, keys, val);
|
|
3350
3064
|
},
|
|
3351
3065
|
onMenu: (x, y) => {
|
|
3352
3066
|
eventBus.emit("propTreeMenu", {
|
|
@@ -3393,7 +3107,7 @@ var main_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
3393
3107
|
collapse: isCollapse(collapseState, keys),
|
|
3394
3108
|
hasCreate: true,
|
|
3395
3109
|
onCollapse: (val) => {
|
|
3396
|
-
setCollapse
|
|
3110
|
+
setCollapse(collapseState, keys, val);
|
|
3397
3111
|
},
|
|
3398
3112
|
onMenu: (x, y) => {
|
|
3399
3113
|
eventBus.emit("propTreeMenu", {
|
|
@@ -3559,8 +3273,8 @@ const install = (app) => {
|
|
|
3559
3273
|
//#endregion
|
|
3560
3274
|
//#region src/i18n/index.ts
|
|
3561
3275
|
async function loadLocaleMessagePropTree(locale) {
|
|
3562
|
-
if (locale === "en") return (await import("./i18n-en.
|
|
3563
|
-
else if (locale === "zhHans") return (await import("./i18n-zhHans.
|
|
3276
|
+
if (locale === "en") return (await import("./i18n-en.fevhb1gv.js").then((n) => n.t)).default;
|
|
3277
|
+
else if (locale === "zhHans") return (await import("./i18n-zhHans.cro9uz6i.js").then((n) => n.t)).default;
|
|
3564
3278
|
else throw new Error(`invalid locale=${locale}`);
|
|
3565
3279
|
}
|
|
3566
3280
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-prop-tree",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.38",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"tsdown": "^0.23.0",
|
|
36
36
|
"typescript": "^6.0.3",
|
|
37
37
|
"vite": "^8.3.0",
|
|
38
|
-
"x-config-lib": "^0.1.
|
|
38
|
+
"x-config-lib": "^0.1.8",
|
|
39
39
|
"x-config-oxfmt": "^0.1.6",
|
|
40
40
|
"x-config-oxlint": "^0.1.7"
|
|
41
41
|
},
|
|
@@ -43,11 +43,10 @@
|
|
|
43
43
|
"vue": "^3.5.42",
|
|
44
44
|
"vue-i18n": "^11.4.10",
|
|
45
45
|
"vuetify": "^4.2.1",
|
|
46
|
-
"x-block-lib": "^0.11.
|
|
47
|
-
"x-
|
|
48
|
-
"x-
|
|
49
|
-
"x-
|
|
50
|
-
"x-runtime-lib": "^0.10.5",
|
|
46
|
+
"x-block-lib": "^0.11.12",
|
|
47
|
+
"x-essential-lib": "^0.11.11",
|
|
48
|
+
"x-group-list": "^0.5.2",
|
|
49
|
+
"x-runtime-lib": "^0.10.7",
|
|
51
50
|
"x-state-lib": "^0.4.5"
|
|
52
51
|
}
|
|
53
52
|
}
|