@cldemo/ui-kit 1.1.3 → 1.1.4
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/buildLibs/all/index.cjs +8 -8
- package/buildLibs/all/index.js +12157 -12048
- package/buildLibs/common/globalConfig.cjs +1 -1
- package/buildLibs/common/globalConfig.js +29 -15
- package/buildLibs/common/i18n/en.cjs +1 -1
- package/buildLibs/common/i18n/en.js +3 -1
- package/buildLibs/common/i18n/zh_CN.cjs +1 -1
- package/buildLibs/common/i18n/zh_CN.js +3 -1
- package/buildLibs/common/index.cjs +1 -1
- package/buildLibs/common/index.js +26 -24
- package/buildLibs/mobile/index.cjs +5 -5
- package/buildLibs/mobile/index.js +5902 -5852
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-CKoVf-v1.js → Index.vue_vue_type_script_setup_true_lang-88gNFuK4.js} +2 -2
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-BQXxDHbe.js +254 -0
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-D0g1xGPL.js → Index.vue_vue_type_script_setup_true_lang-BR0S3Sfl.js} +3 -3
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-RRUPY9bd.js → Index.vue_vue_type_script_setup_true_lang-BrfAVhNV.js} +153 -145
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-DdLVG0R0.js → Index.vue_vue_type_script_setup_true_lang-Bw_jRoEX.js} +67 -59
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-C6Zd584S.js +2536 -0
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-BOcOO9-n.js → Index.vue_vue_type_script_setup_true_lang-CD66oCaI.js} +386 -375
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-CEBiLDTm.js +310 -0
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-C0DgaU5I.js → Index.vue_vue_type_script_setup_true_lang-CRlBvcCg.js} +53 -47
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-DqZBB8fM.js → Index.vue_vue_type_script_setup_true_lang-CdYh3Pzs.js} +1 -1
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-XiSSYx4X.js → Index.vue_vue_type_script_setup_true_lang-D7YeNBdk.js} +120 -113
- package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-DKMVQrVU.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-D9sq4n9i.js} +66 -60
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-CRKrLCa6.js → Index.vue_vue_type_script_setup_true_lang-DFeBj9IN.js} +209 -201
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-D7bJ5UAn.js → Index.vue_vue_type_script_setup_true_lang-DY3tZQZe.js} +63 -55
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-D_73B6av.js +1533 -0
- package/buildLibs/modules/shared/{Validate.vue_vue_type_script_setup_true_lang-3s_3ut9M.js → Validate.vue_vue_type_script_setup_true_lang-hn1Tat7L.js} +102 -92
- package/buildLibs/types/All/index.d.ts +1 -1
- package/buildLibs/types/Common/globalConfig.d.ts +29 -0
- package/buildLibs/types/Common/globalTypes.d.ts +11 -0
- package/buildLibs/types/Common/i18n/en.d.ts +2 -0
- package/buildLibs/types/Common/i18n/zh_CN.d.ts +2 -0
- package/buildLibs/types/Common/index.d.ts +1 -1
- package/buildLibs/types/Element/CheckBox/Index.vue.d.ts +9 -0
- package/buildLibs/types/Element/Input/Index.vue.d.ts +9 -0
- package/buildLibs/types/Element/InputNumber/Index.vue.d.ts +9 -0
- package/buildLibs/types/Element/InputNumberStepper/Index.vue.d.ts +9 -0
- package/buildLibs/types/Element/InputTextarea/Index.vue.d.ts +9 -0
- package/buildLibs/types/Element/Radio/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/DateTime/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/FileUpload/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/Select/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/SelectCascade/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/SelectMove/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/SelectTag/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/SelectTree/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/Tree/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/componentsInstalls.d.ts +90 -0
- package/buildLibs/utils/Element/ClCheckbox.cjs +1 -1
- package/buildLibs/utils/Element/ClCheckbox.js +1 -1
- package/buildLibs/utils/Element/ClInput.cjs +1 -1
- package/buildLibs/utils/Element/ClInput.js +1 -1
- package/buildLibs/utils/Element/ClInputCaptcha.cjs +1 -1
- package/buildLibs/utils/Element/ClInputCaptcha.js +1 -1
- package/buildLibs/utils/Element/ClInputNumber.cjs +1 -1
- package/buildLibs/utils/Element/ClInputNumber.js +1 -1
- package/buildLibs/utils/Element/ClInputNumberStepper.cjs +1 -1
- package/buildLibs/utils/Element/ClInputNumberStepper.js +1 -1
- package/buildLibs/utils/Element/ClInputPassword.cjs +1 -1
- package/buildLibs/utils/Element/ClInputPassword.js +1 -1
- package/buildLibs/utils/Element/ClInputSearch.cjs +1 -1
- package/buildLibs/utils/Element/ClInputSearch.js +1 -1
- package/buildLibs/utils/Element/ClInputTextarea.cjs +1 -1
- package/buildLibs/utils/Element/ClInputTextarea.js +1 -1
- package/buildLibs/utils/Element/ClRadio.cjs +1 -1
- package/buildLibs/utils/Element/ClRadio.js +1 -1
- package/buildLibs/utils/Element/__provide__/Validate.cjs +1 -1
- package/buildLibs/utils/Element/__provide__/Validate.js +13 -3
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-C1OgPpoJ.js → Index.vue_vue_type_script_setup_true_lang-0S6ab-Lp.js} +120 -113
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-neC9NxKi.js → Index.vue_vue_type_script_setup_true_lang-2Fe9SkjL.js} +209 -201
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-2THK822S.js +254 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BO4cal3i.js → Index.vue_vue_type_script_setup_true_lang-2dwwjiTV.js} +386 -375
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-5itnjwU_.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-ChnRq_PS.js → Index.vue_vue_type_script_setup_true_lang-B0MJO0JM.js} +2 -2
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BIO6Me43.js +1 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BN9ybiKv.js +1 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BpG7AHvM.js +1 -0
- package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-CAe8mhTl.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-CATwJnes.js} +66 -60
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CW4fM0by.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DxYJbPyJ.js → Index.vue_vue_type_script_setup_true_lang-C_exHzjc.js} +3 -3
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CsCn637u.js +2 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-D_XMW7K4.js → Index.vue_vue_type_script_setup_true_lang-D4a5Iaue.js} +153 -145
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DXPZYc0c.js +1 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DY4m6Xyj.js +1 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DZCt32jb.js +1533 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DZF2gj7X.js +2536 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-De1eNjwC.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-C6Evk0-z.js → Index.vue_vue_type_script_setup_true_lang-DtAy8lm9.js} +53 -47
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DvN-fBNd.js +1 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DwBf338f.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Cg_benGj.js → Index.vue_vue_type_script_setup_true_lang-F9tBnc_7.js} +63 -55
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-HfnOtuMz.js +310 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Dwkuei2j.js → Index.vue_vue_type_script_setup_true_lang-VjIva6RM.js} +1 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-j7gxlOeM.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CgdGs-U2.js → Index.vue_vue_type_script_setup_true_lang-lKDQFZtY.js} +67 -59
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Dzm58mMQ.js → Index.vue_vue_type_script_setup_true_lang-nAMiORzN.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CizRrQsH.js → Index.vue_vue_type_script_setup_true_lang-oovIcT38.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BIFHYrzc.js → Index.vue_vue_type_script_setup_true_lang-qqnmaRnk.js} +1 -1
- package/buildLibs/utils/Web/ClColorPicker.cjs +1 -1
- package/buildLibs/utils/Web/ClColorPicker.js +1 -1
- package/buildLibs/utils/Web/ClCropperPreview.cjs +1 -1
- package/buildLibs/utils/Web/ClCropperPreview.js +1 -1
- package/buildLibs/utils/Web/ClDateTime.cjs +1 -1
- package/buildLibs/utils/Web/ClDateTime.js +1 -1
- package/buildLibs/utils/Web/ClFileUpload.cjs +1 -1
- package/buildLibs/utils/Web/ClFileUpload.js +1 -1
- package/buildLibs/utils/Web/ClInputTag.cjs +1 -1
- package/buildLibs/utils/Web/ClInputTag.js +1 -1
- package/buildLibs/utils/Web/ClPaginate.cjs +1 -1
- package/buildLibs/utils/Web/ClPaginate.js +1 -1
- package/buildLibs/utils/Web/ClSelect.cjs +1 -1
- package/buildLibs/utils/Web/ClSelect.js +1 -1
- package/buildLibs/utils/Web/ClSelectCascade.cjs +1 -1
- package/buildLibs/utils/Web/ClSelectCascade.js +1 -1
- package/buildLibs/utils/Web/ClSelectMove.cjs +1 -1
- package/buildLibs/utils/Web/ClSelectMove.js +655 -647
- package/buildLibs/utils/Web/ClSelectTag.cjs +1 -1
- package/buildLibs/utils/Web/ClSelectTag.js +1 -1
- package/buildLibs/utils/Web/ClSelectTree.cjs +1 -1
- package/buildLibs/utils/Web/ClSelectTree.js +71 -63
- package/buildLibs/utils/Web/ClTable.cjs +1 -1
- package/buildLibs/utils/Web/ClTable.js +1 -1
- package/buildLibs/utils/Web/ClTree.cjs +1 -1
- package/buildLibs/utils/Web/ClTree.js +1 -1
- package/buildLibs/utils/Web/ClXEditable.cjs +1 -1
- package/buildLibs/utils/Web/ClXEditable.js +10 -10
- package/buildLibs/web/index.cjs +7 -7
- package/buildLibs/web/index.js +10792 -10685
- package/docs/components/Element/Checkbox.md +2 -1
- package/docs/components/Element/Form.md +15 -0
- package/docs/components/Element/Input.md +2 -1
- package/docs/components/Element/InputNumber.md +2 -1
- package/docs/components/Element/InputNumberStepper.md +2 -1
- package/docs/components/Element/InputTextarea.md +2 -1
- package/docs/components/Element/Radio.md +2 -1
- package/docs/components/Web/DateTime.md +2 -1
- package/docs/components/Web/FileUpload.md +2 -1
- package/docs/components/Web/Select.md +2 -1
- package/docs/components/Web/SelectCascade.md +1 -0
- package/docs/components/Web/SelectMove.md +2 -1
- package/docs/components/Web/SelectTag.md +1 -0
- package/docs/components/Web/SelectTree.md +2 -1
- package/docs/components/Web/Tree.md +2 -1
- package/package.json +1 -1
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-CiNidFJt.js +0 -246
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-DC6727pS.js +0 -2528
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-EXqjkKwS.js +0 -302
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-Hg16dgRQ.js +0 -1527
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-5aX79Fcf.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BRvOcf4B.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-Ba8Z8fOP.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BjNP5odR.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CQ3RGLek.js +0 -302
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CY5fRV6o.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CYN4r-Mx.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-C_7ArHlU.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CuJjJvft.js +0 -2
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CwjigRBx.js +0 -2528
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-D6cmq0Tf.js +0 -1527
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-Dbf-3Nik.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DgD_gHit.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-FowII7_3.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-c7oxeU_j.js +0 -246
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-vLqCsSbV.js +0 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as ae, inject as Oe, computed as T, onBeforeUnmount as ke, openBlock as x, createElementBlock as E, Fragment as j, renderList as xe, normalizeClass as ee, createElementVNode as X, withModifiers as J, withKeys as Ee, toDisplayString as ce, createBlock as de, withCtx as Ce, withDirectives as we, createVNode as Pe, vShow as Te, reactive as Ue, ref as ve, onMounted as be, nextTick as Z, watch as K, provide as _e, unref as oe, mergeProps as Ae } from "vue";
|
|
2
2
|
import n from "@cldemo/ui-kit/common/base";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
3
|
+
import Ve from "@cldemo/ui-kit/common/Element";
|
|
4
|
+
import { getPlaintextOutText as Le } from "@cldemo/ui-kit/common/globalConfig";
|
|
5
|
+
import Be from "@cldemo/ui-kit/common/log";
|
|
6
|
+
import { _ as Ne } from "./SlideUpDown.vue_vue_type_script_setup_true_lang-CRzacfx9.js";
|
|
6
7
|
/* empty css */
|
|
7
|
-
const
|
|
8
|
+
const Je = { class: "tree-ul" }, Ke = ["onClick"], $e = ["aria-checked", "onClick"], Fe = ["tabindex", "aria-disabled", "onClick", "onDblclick", "onKeydown"], Me = ["innerHTML"], Re = { key: 1 }, le = 170, pe = /* @__PURE__ */ ae({
|
|
8
9
|
name: "ClTreeUl",
|
|
9
10
|
__name: "Ul",
|
|
10
11
|
props: {
|
|
@@ -50,96 +51,96 @@ const Be = { class: "tree-ul" }, Ne = ["onClick"], Je = ["aria-checked", "onClic
|
|
|
50
51
|
}
|
|
51
52
|
},
|
|
52
53
|
emits: ["onSelect", "onShrink"],
|
|
53
|
-
setup(y, { emit:
|
|
54
|
-
const
|
|
54
|
+
setup(y, { emit: G }) {
|
|
55
|
+
const O = y, o = G, _ = `tree-${n.getRandom(5)}`;
|
|
55
56
|
let L = !1;
|
|
56
|
-
const
|
|
57
|
-
isCheckChildren: () => (L || (L = !0,
|
|
57
|
+
const l = Oe("$TreeTop", {
|
|
58
|
+
isCheckChildren: () => (L || (L = !0, Be.warn("ClTreeUl", "未检测到 ClTree 容器提供 $TreeTop,子级判断降级为 false")), !1)
|
|
58
59
|
}), h = {
|
|
59
60
|
dbClickTimeOut: null
|
|
60
|
-
},
|
|
61
|
-
n.isUndefined(p) ||
|
|
62
|
-
},
|
|
63
|
-
n.isUndefined(p) ||
|
|
64
|
-
}, w = (p) => n.isUndefined(p.id) ? "" : p.id.toString(),
|
|
61
|
+
}, z = T(() => new Set(O.firstOpenIds)), $ = T(() => new Set(O.selectIds)), B = T(() => new Set(O.selectUnIds)), F = T(() => new Set(O.openIds)), A = (p) => {
|
|
62
|
+
n.isUndefined(p) || o("onSelect", p.toString());
|
|
63
|
+
}, C = (p) => {
|
|
64
|
+
n.isUndefined(p) || o("onShrink", p.toString());
|
|
65
|
+
}, w = (p) => n.isUndefined(p.id) ? "" : p.id.toString(), M = (p) => {
|
|
65
66
|
const S = w(p);
|
|
66
|
-
return
|
|
67
|
+
return $.value.has(S) ? "true" : B.value.has(S) ? "mixed" : "false";
|
|
67
68
|
}, V = (p) => {
|
|
68
69
|
const S = {
|
|
69
70
|
"tree-node": !0
|
|
70
71
|
};
|
|
71
72
|
if (S["tree-node-end"] = p.isEnd, !p.isEnd) {
|
|
72
|
-
const g = n.isUndefined(p.id) ? "" : p.id.toString(),
|
|
73
|
-
S["tree-node-open"] =
|
|
73
|
+
const g = n.isUndefined(p.id) ? "" : p.id.toString(), U = F.value.has(g);
|
|
74
|
+
S["tree-node-open"] = U, S["tree-node-closed"] = !U;
|
|
74
75
|
}
|
|
75
76
|
return S;
|
|
76
|
-
},
|
|
77
|
+
}, W = (p) => {
|
|
77
78
|
const S = n.isUndefined(p.id) ? "" : p.id.toString(), g = {
|
|
78
79
|
"tree-node-text": !0
|
|
79
80
|
};
|
|
80
|
-
return g["tree-node-select"] =
|
|
81
|
+
return g["tree-node-select"] = $.value.has(S), g["tree-node-selectUn"] = B.value.has(S), g;
|
|
81
82
|
};
|
|
82
83
|
ke(() => {
|
|
83
84
|
h.dbClickTimeOut && window.clearTimeout(h.dbClickTimeOut);
|
|
84
85
|
});
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
|
|
89
|
-
},
|
|
90
|
-
if (!
|
|
91
|
-
if (
|
|
86
|
+
const Y = (p) => {
|
|
87
|
+
O.disabled || (window.clearTimeout(h.dbClickTimeOut), C(p.id));
|
|
88
|
+
}, Q = (p) => {
|
|
89
|
+
O.disabled || (window.clearTimeout(h.dbClickTimeOut), A(p.id));
|
|
90
|
+
}, N = (p) => {
|
|
91
|
+
if (!O.disabled)
|
|
92
|
+
if (l.isCheckChildren(p.id)) {
|
|
92
93
|
let S = !0;
|
|
93
|
-
!
|
|
94
|
-
|
|
95
|
-
},
|
|
94
|
+
!O.multiple && !O.isSingleSelectParent && (S = !1), S ? (window.clearTimeout(h.dbClickTimeOut), h.dbClickTimeOut = window.setTimeout(() => {
|
|
95
|
+
O.disabled || A(p.id);
|
|
96
|
+
}, le)) : window.clearTimeout(h.dbClickTimeOut);
|
|
96
97
|
} else
|
|
97
98
|
window.clearTimeout(h.dbClickTimeOut), h.dbClickTimeOut = window.setTimeout(() => {
|
|
98
|
-
|
|
99
|
-
},
|
|
99
|
+
O.disabled || A(p.id);
|
|
100
|
+
}, le);
|
|
101
|
+
}, P = (p) => {
|
|
102
|
+
O.disabled || l.isCheckChildren(p.id) && (h.dbClickTimeOut && window.clearTimeout(h.dbClickTimeOut), C(p.id));
|
|
100
103
|
}, R = (p) => {
|
|
101
|
-
k.disabled || o.isCheckChildren(p.id) && (h.dbClickTimeOut && window.clearTimeout(h.dbClickTimeOut), x(p.id));
|
|
102
|
-
}, D = (p) => {
|
|
103
104
|
A(p);
|
|
104
|
-
},
|
|
105
|
-
|
|
105
|
+
}, D = (p) => {
|
|
106
|
+
C(p);
|
|
106
107
|
};
|
|
107
|
-
return (p, S) => (
|
|
108
|
-
(
|
|
109
|
-
key: `${_}-${g.id}-${
|
|
108
|
+
return (p, S) => (x(), E("ul", Je, [
|
|
109
|
+
(x(!0), E(j, null, xe(y.list, (g, U) => (x(), E("li", {
|
|
110
|
+
key: `${_}-${g.id}-${U}`,
|
|
110
111
|
class: ee(V(g))
|
|
111
112
|
}, [
|
|
112
113
|
X("i", {
|
|
113
114
|
class: "tree-shrink",
|
|
114
|
-
onClick:
|
|
115
|
-
}, null, 8,
|
|
115
|
+
onClick: J((v) => Y(g), ["stop"])
|
|
116
|
+
}, null, 8, Ke),
|
|
116
117
|
X("span", {
|
|
117
|
-
class: ee(
|
|
118
|
+
class: ee(W(g))
|
|
118
119
|
}, [
|
|
119
|
-
y.multiple ? (
|
|
120
|
+
y.multiple ? (x(), E("i", {
|
|
120
121
|
key: 0,
|
|
121
122
|
class: "tree-node-checkbox",
|
|
122
123
|
role: "checkbox",
|
|
123
|
-
"aria-checked":
|
|
124
|
-
onClick:
|
|
125
|
-
}, null, 8,
|
|
124
|
+
"aria-checked": M(g),
|
|
125
|
+
onClick: J((v) => Q(g), ["stop"])
|
|
126
|
+
}, null, 8, $e)) : (x(), E(j, { key: 1 }, [], 64)),
|
|
126
127
|
X("a", {
|
|
127
128
|
href: "javascript:",
|
|
128
129
|
tabindex: y.disabled ? -1 : 0,
|
|
129
130
|
"aria-disabled": y.disabled,
|
|
130
|
-
onClick:
|
|
131
|
-
onDblclick:
|
|
132
|
-
onKeydown: Ee(
|
|
131
|
+
onClick: J((v) => N(g), ["stop"]),
|
|
132
|
+
onDblclick: J((v) => P(g), ["stop"]),
|
|
133
|
+
onKeydown: Ee(J((v) => N(g), ["prevent"]), ["enter"])
|
|
133
134
|
}, [
|
|
134
|
-
g.showTextLabelHtml ? (
|
|
135
|
+
g.showTextLabelHtml ? (x(), E("span", {
|
|
135
136
|
key: 0,
|
|
136
137
|
innerHTML: g.showTextLabel
|
|
137
|
-
}, null, 8,
|
|
138
|
-
], 40,
|
|
138
|
+
}, null, 8, Me)) : (x(), E("span", Re, ce(g.showTextLabel), 1))
|
|
139
|
+
], 40, Fe)
|
|
139
140
|
], 2),
|
|
140
|
-
|
|
141
|
+
z.value.has(w(g)) ? (x(), de(Ne, { key: 0 }, {
|
|
141
142
|
default: Ce(() => [
|
|
142
|
-
|
|
143
|
+
we(Pe(pe, {
|
|
143
144
|
list: g.list,
|
|
144
145
|
multiple: y.multiple,
|
|
145
146
|
isSingleSelectParent: y.isSingleSelectParent,
|
|
@@ -148,18 +149,18 @@ const Be = { class: "tree-ul" }, Ne = ["onClick"], Je = ["aria-checked", "onClic
|
|
|
148
149
|
openIds: y.openIds,
|
|
149
150
|
selectIds: y.selectIds,
|
|
150
151
|
selectUnIds: y.selectUnIds,
|
|
151
|
-
onOnSelect:
|
|
152
|
-
onOnShrink:
|
|
152
|
+
onOnSelect: R,
|
|
153
|
+
onOnShrink: D
|
|
153
154
|
}, null, 8, ["list", "multiple", "isSingleSelectParent", "disabled", "firstOpenIds", "openIds", "selectIds", "selectUnIds"]), [
|
|
154
|
-
[
|
|
155
|
+
[Te, F.value.has(w(g))]
|
|
155
156
|
])
|
|
156
157
|
]),
|
|
157
158
|
_: 2
|
|
158
|
-
}, 1024)) : (
|
|
159
|
+
}, 1024)) : (x(), E(j, { key: 1 }, [], 64))
|
|
159
160
|
], 2))), 128))
|
|
160
161
|
]));
|
|
161
162
|
}
|
|
162
|
-
}),
|
|
163
|
+
}), De = ["id"], qe = ["id"], tt = /* @__PURE__ */ ae({
|
|
163
164
|
name: "ClTree",
|
|
164
165
|
__name: "Index",
|
|
165
166
|
props: {
|
|
@@ -234,6 +235,11 @@ const Be = { class: "tree-ul" }, Ne = ["onClick"], Je = ["aria-checked", "onClic
|
|
|
234
235
|
default: !1
|
|
235
236
|
// desc: 是否纯文本只读模式,只渲染选中项层级文本不挂载树
|
|
236
237
|
},
|
|
238
|
+
plaintextEmptyText: {
|
|
239
|
+
type: String,
|
|
240
|
+
default: void 0
|
|
241
|
+
// desc: 纯文本只读模式下值为空时的显示文本(默认 "-",显式传空串则显示空白;未显式传时依次读取组件配置段与 plaintextGlobal 段)
|
|
242
|
+
},
|
|
237
243
|
plaintextSeparator: {
|
|
238
244
|
type: String,
|
|
239
245
|
default: ","
|
|
@@ -246,8 +252,8 @@ const Be = { class: "tree-ul" }, Ne = ["onClick"], Je = ["aria-checked", "onClic
|
|
|
246
252
|
}
|
|
247
253
|
},
|
|
248
254
|
emits: ["update:value", "update:modelValue", "onChange", "onInit"],
|
|
249
|
-
setup(y, { expose:
|
|
250
|
-
const
|
|
255
|
+
setup(y, { expose: G, emit: O }) {
|
|
256
|
+
const o = y, _ = O, L = o.id, l = Ue({
|
|
251
257
|
firstOpenIds: [],
|
|
252
258
|
openParentIds: [],
|
|
253
259
|
selectedIds: [],
|
|
@@ -259,31 +265,31 @@ const Be = { class: "tree-ul" }, Ne = ["onClick"], Je = ["aria-checked", "onClic
|
|
|
259
265
|
childLastIdsJson: {},
|
|
260
266
|
prevSearchOpenParentIds: "",
|
|
261
267
|
prevSearchFoldParentIds: ""
|
|
262
|
-
},
|
|
263
|
-
multiple:
|
|
264
|
-
disabled:
|
|
265
|
-
isSingleSelectParent:
|
|
266
|
-
})),
|
|
268
|
+
}, z = T(() => ({
|
|
269
|
+
multiple: o.multiple,
|
|
270
|
+
disabled: o.disabled,
|
|
271
|
+
isSingleSelectParent: o.isSingleSelectParent
|
|
272
|
+
})), $ = T(() => n.getJsonMerge(
|
|
267
273
|
{ "panel-tree": !0 },
|
|
268
|
-
|
|
274
|
+
Ve.getClassNameJson(o.className)
|
|
269
275
|
)), B = (t) => {
|
|
270
276
|
_("update:value", t), _("update:modelValue", t);
|
|
271
|
-
},
|
|
277
|
+
}, F = (t, e) => {
|
|
272
278
|
B(t), _("onChange", t, e);
|
|
273
279
|
}, A = () => {
|
|
274
280
|
Z(() => {
|
|
275
281
|
_("onInit");
|
|
276
282
|
});
|
|
277
|
-
},
|
|
283
|
+
}, C = (t) => {
|
|
278
284
|
const e = n.isUndefined(t) ? "" : t.toString();
|
|
279
285
|
return n.isExistJsonKey(h.dataGroup, e);
|
|
280
286
|
}, w = (t) => {
|
|
281
287
|
const e = n.isUndefined(t) ? "" : t.toString();
|
|
282
|
-
return
|
|
283
|
-
},
|
|
288
|
+
return C(e) ? h.dataGroup[e] : [];
|
|
289
|
+
}, M = ve(0), V = (t) => {
|
|
284
290
|
const e = t.toString();
|
|
285
291
|
return n.isExistJsonKey(h.dataJson, e) ? h.dataJson[e] : null;
|
|
286
|
-
},
|
|
292
|
+
}, W = (t) => {
|
|
287
293
|
const e = [], s = /* @__PURE__ */ new Set();
|
|
288
294
|
let i = t;
|
|
289
295
|
for (; n.isNonEmptyString(i) && !s.has(i); ) {
|
|
@@ -291,30 +297,32 @@ const Be = { class: "tree-ul" }, Ne = ["onClick"], Je = ["aria-checked", "onClic
|
|
|
291
297
|
const d = V(i);
|
|
292
298
|
if (!d) break;
|
|
293
299
|
n.isNonEmptyString(d.name) && e.unshift(d.name);
|
|
294
|
-
const c = d[
|
|
295
|
-
if (a === "" || a === String(
|
|
300
|
+
const c = d[o.parentKey], a = c != null ? String(c) : "";
|
|
301
|
+
if (a === "" || a === String(o.topParentValue)) break;
|
|
296
302
|
i = a;
|
|
297
303
|
}
|
|
298
304
|
return e;
|
|
299
|
-
},
|
|
300
|
-
if (
|
|
305
|
+
}, Y = T(() => {
|
|
306
|
+
if (o.list, M.value, n.isEmpty(l.selectedIds))
|
|
301
307
|
return "";
|
|
302
|
-
const t = n.isString(
|
|
303
|
-
return b(
|
|
304
|
-
const d =
|
|
308
|
+
const t = n.isString(o.plaintextLevelSeparator) ? o.plaintextLevelSeparator : " > ", e = n.isString(o.plaintextSeparator) ? o.plaintextSeparator : ",";
|
|
309
|
+
return b(l.selectedIds, o.isOutMerge).map((i) => {
|
|
310
|
+
const d = W(i);
|
|
305
311
|
return n.removeHTMLTags(d.length > 0 ? d.join(t) : i);
|
|
306
312
|
}).join(e);
|
|
307
|
-
}),
|
|
313
|
+
}), Q = T(
|
|
314
|
+
() => Le("tree", o.plaintextEmptyText, Y.value, o.value)
|
|
315
|
+
), N = (t, e, s) => {
|
|
308
316
|
const i = [], d = e + 1;
|
|
309
317
|
return s === void 0 && (s = /* @__PURE__ */ new Set()), s.has(t) || (s.add(t), w(t).forEach((c) => {
|
|
310
|
-
const a = { ...c }, r = a.id.toString(), u =
|
|
311
|
-
a.isEnd = !u, a.level = d, u && (a.list =
|
|
318
|
+
const a = { ...c }, r = a.id.toString(), u = C(r);
|
|
319
|
+
a.isEnd = !u, a.level = d, u && (a.list = N(r, d, s)), i.push(a);
|
|
312
320
|
})), i;
|
|
313
321
|
}, P = (t) => t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), R = (t) => {
|
|
314
|
-
const e =
|
|
322
|
+
const e = o.searchKeyword, s = o.highlightMode;
|
|
315
323
|
if (!n.isNonEmptyString(t) || n.isEmpty(e))
|
|
316
324
|
return P(String(t));
|
|
317
|
-
const i = n.isNonEmptyString(
|
|
325
|
+
const i = n.isNonEmptyString(o.highlightColor) ? o.highlightColor : "#ffe58f", d = (I) => `<mark style="background:${i}">${P(I)}</mark>`;
|
|
318
326
|
if (s === "full")
|
|
319
327
|
return t.includes(e) ? d(t) : P(t);
|
|
320
328
|
const c = t.indexOf(e);
|
|
@@ -323,71 +331,71 @@ const Be = { class: "tree-ul" }, Ne = ["onClick"], Je = ["aria-checked", "onClic
|
|
|
323
331
|
const a = P(t.slice(0, c)), r = d(t.slice(c, c + e.length)), u = P(t.slice(c + e.length));
|
|
324
332
|
return `${a}${r}${u}`;
|
|
325
333
|
}, D = (t) => {
|
|
326
|
-
const { parentKey: e, topParentValue: s } =
|
|
334
|
+
const { parentKey: e, topParentValue: s } = o, i = n.isNonEmptyString(s) ? s : "0", d = {}, c = {};
|
|
327
335
|
n.isEmpty(t) || t.forEach((a) => {
|
|
328
|
-
const r = n.getJsonClone(a), u = !n.isEmpty(
|
|
336
|
+
const r = n.getJsonClone(a), u = !n.isEmpty(o.searchKeyword) && !n.isEmpty(o.highlightMode);
|
|
329
337
|
r.showTextLabelHtml = u, r.showTextLabel = u ? R(n.isString(r.name) ? r.name : "") : n.isString(r.name) ? r.name : "";
|
|
330
338
|
const I = n.isString(r.id) || typeof r.id == "number" && n.isFinite(r.id), f = n.isString(r[e]) || typeof r[e] == "number" && n.isFinite(r[e]);
|
|
331
339
|
if (!I || !f)
|
|
332
340
|
return;
|
|
333
|
-
const
|
|
334
|
-
d[
|
|
335
|
-
}), h.dataJson = d, h.dataGroup = c, h.childLastIdsJson = {},
|
|
336
|
-
},
|
|
341
|
+
const k = r.id.toString(), m = r[e].toString();
|
|
342
|
+
d[k] = r, n.isExistJsonKey(c, m) || (c[m] = []), c[m].push(r);
|
|
343
|
+
}), h.dataJson = d, h.dataGroup = c, h.childLastIdsJson = {}, l.list = N(i, 0), M.value += 1;
|
|
344
|
+
}, p = (t, e) => {
|
|
337
345
|
let s = [];
|
|
338
|
-
const { parentKey: i, topParentValue: d } =
|
|
346
|
+
const { parentKey: i, topParentValue: d } = o, c = n.isNonEmptyString(d) ? d : "0", a = n.isEmpty(t) ? "" : t.toString();
|
|
339
347
|
if (e === void 0 && (e = /* @__PURE__ */ new Set()), n.isExistJsonKey(h.dataJson, a) && !e.has(a)) {
|
|
340
348
|
e.add(a), s.push(a);
|
|
341
349
|
const r = h.dataJson[a][i].toString();
|
|
342
350
|
if (r !== c) {
|
|
343
|
-
const u =
|
|
351
|
+
const u = p(r, e);
|
|
344
352
|
s = s.concat(u);
|
|
345
353
|
}
|
|
346
354
|
}
|
|
347
355
|
return s;
|
|
348
|
-
},
|
|
349
|
-
const e =
|
|
356
|
+
}, S = (t) => {
|
|
357
|
+
const e = p(t);
|
|
350
358
|
return e.splice(0, 1), e.reverse(), e;
|
|
351
|
-
},
|
|
359
|
+
}, g = (t, e) => {
|
|
352
360
|
let s = [];
|
|
353
361
|
const i = n.isEmpty(t) ? "" : t.toString();
|
|
354
|
-
return e === void 0 && (e = /* @__PURE__ */ new Set()), e.has(i) || (e.add(i), s.push(i),
|
|
355
|
-
const c = d.id.toString(), a =
|
|
362
|
+
return e === void 0 && (e = /* @__PURE__ */ new Set()), e.has(i) || (e.add(i), s.push(i), C(i) && w(i).forEach((d) => {
|
|
363
|
+
const c = d.id.toString(), a = g(c, e);
|
|
356
364
|
s = s.concat(a);
|
|
357
365
|
})), s;
|
|
358
|
-
},
|
|
359
|
-
const e =
|
|
366
|
+
}, U = (t) => {
|
|
367
|
+
const e = g(t);
|
|
360
368
|
return e.splice(0, 1), e;
|
|
361
|
-
},
|
|
369
|
+
}, v = (t, e, s, i) => {
|
|
362
370
|
const d = { add: [], del: [] }, c = { add: [], del: [] };
|
|
363
|
-
let a = n.isUndefined(e) ? n.getArrClone(
|
|
371
|
+
let a = n.isUndefined(e) ? n.getArrClone(l.selectedIds) : e, r = n.isUndefined(s) ? n.getArrClone(l.selectedUnIds) : s;
|
|
364
372
|
const u = a.indexOf(t);
|
|
365
373
|
i ? u === -1 && a.push(t) : u === -1 ? a.push(t) : a.splice(u, 1), r = n.getArrRemoveById(r, t);
|
|
366
|
-
const I =
|
|
374
|
+
const I = S(t);
|
|
367
375
|
return I.reverse(), I.length > 0 && I.forEach((f) => {
|
|
368
|
-
let
|
|
369
|
-
h.dataGroup[f].forEach((
|
|
370
|
-
const
|
|
371
|
-
n.isExistValue(a,
|
|
376
|
+
let k = 0, m = 0;
|
|
377
|
+
h.dataGroup[f].forEach((ye) => {
|
|
378
|
+
const ie = ye.id.toString();
|
|
379
|
+
n.isExistValue(a, ie) && (k += 1), n.isExistValue(r, ie) && (m += 1);
|
|
372
380
|
});
|
|
373
|
-
const
|
|
374
|
-
|
|
381
|
+
const H = h.dataGroup[f].length;
|
|
382
|
+
k === 0 && m === 0 ? (d.del.push(f), a = n.getArrRemoveById(a, f), c.del.push(f), r = n.getArrRemoveById(r, f)) : k === H ? (d.add.push(f), a.push(f), c.del.push(f), r = n.getArrRemoveById(r, f)) : (d.del.push(f), a = n.getArrRemoveById(a, f), c.add.push(f), r.push(f));
|
|
375
383
|
}), { select: d, selectUn: c };
|
|
376
|
-
},
|
|
384
|
+
}, te = (t, e) => {
|
|
377
385
|
let s = [];
|
|
378
386
|
if (e === void 0 && (e = /* @__PURE__ */ new Set()), n.isExistJsonKey(h.childLastIdsJson, t) && h.childLastIdsJson[t].length > 0)
|
|
379
387
|
s = h.childLastIdsJson[t];
|
|
380
388
|
else {
|
|
381
389
|
if (e.has(t))
|
|
382
390
|
return s;
|
|
383
|
-
|
|
384
|
-
const d =
|
|
391
|
+
C(t) ? (e.add(t), w(t).forEach((i) => {
|
|
392
|
+
const d = te(i.id.toString(), e);
|
|
385
393
|
d.length > 0 && (s = s.concat(d));
|
|
386
394
|
})) : s.push(t), h.childLastIdsJson[t] = s;
|
|
387
395
|
}
|
|
388
396
|
return s;
|
|
389
|
-
},
|
|
390
|
-
const { parentKey: s, topParentValue: i } =
|
|
397
|
+
}, ne = (t, e) => {
|
|
398
|
+
const { parentKey: s, topParentValue: i } = o, d = n.isNonEmptyString(i) ? i : "0", c = {}, a = [];
|
|
391
399
|
let r = [];
|
|
392
400
|
if (e === void 0 && (e = /* @__PURE__ */ new Set()), t.forEach((u) => {
|
|
393
401
|
const I = V(u);
|
|
@@ -401,10 +409,10 @@ const Be = { class: "tree-ul" }, Ne = ["onClick"], Je = ["aria-checked", "onClic
|
|
|
401
409
|
if (a.length > 0) {
|
|
402
410
|
r.push(...a);
|
|
403
411
|
const u = n.getArrUnique(r), I = a.some((f) => !e.has(f));
|
|
404
|
-
return a.forEach((f) => e.add(f)), I ?
|
|
412
|
+
return a.forEach((f) => e.add(f)), I ? ne(u, e) : r;
|
|
405
413
|
} else
|
|
406
414
|
return r;
|
|
407
|
-
},
|
|
415
|
+
}, ue = (t) => {
|
|
408
416
|
const e = [], s = n.getArrConvertJson(t);
|
|
409
417
|
return t.forEach((d) => {
|
|
410
418
|
const c = w(d);
|
|
@@ -416,159 +424,159 @@ const Be = { class: "tree-ul" }, Ne = ["onClick"], Je = ["aria-checked", "onClic
|
|
|
416
424
|
n.isExistJsonKey(s, r.id.toString()) && a.push(r.id);
|
|
417
425
|
}), c.length !== a.length && e.push(d);
|
|
418
426
|
}
|
|
419
|
-
}),
|
|
420
|
-
},
|
|
427
|
+
}), ne(e);
|
|
428
|
+
}, he = (t) => {
|
|
421
429
|
let e = [];
|
|
422
430
|
return t.forEach((s) => {
|
|
423
|
-
const i =
|
|
431
|
+
const i = te(s);
|
|
424
432
|
e.push(...i);
|
|
425
433
|
}), e = n.getArrUnique(e), e;
|
|
426
|
-
}, b = (t, e) =>
|
|
434
|
+
}, b = (t, e) => o.multiple ? (n.isBoolean(e) ? e : o.isOutMerge) ? ue(t) : he(t) : t, se = (t) => {
|
|
427
435
|
const e = [];
|
|
428
436
|
return t.forEach((s) => {
|
|
429
437
|
const i = V(s);
|
|
430
438
|
n.isUndefined(i) || e.push(i);
|
|
431
439
|
}), e;
|
|
432
|
-
},
|
|
433
|
-
const e =
|
|
440
|
+
}, q = (t) => {
|
|
441
|
+
const e = o.multiple ? t : t.slice(0, 1);
|
|
434
442
|
let s = [], i = [];
|
|
435
443
|
e.forEach((c) => {
|
|
436
444
|
const a = V(c);
|
|
437
445
|
if (!n.isUndefined(a)) {
|
|
438
|
-
const r =
|
|
446
|
+
const r = v(c, s, i, !0);
|
|
439
447
|
s = n.getArrRemoveById(s, r.select.del), r.select.add.length > 0 && s.push(...r.select.add), i = n.getArrRemoveById(i, r.selectUn.del), r.selectUn.add.length > 0 && i.push(...r.selectUn.add);
|
|
440
|
-
const u =
|
|
448
|
+
const u = U(c);
|
|
441
449
|
s.push(...u), s.push(c), s = n.getArrUnique(s), i = n.getArrUnique(i);
|
|
442
450
|
}
|
|
443
|
-
}),
|
|
451
|
+
}), l.selectedIds = s;
|
|
444
452
|
const d = n.getArrRemoveById(i, s);
|
|
445
|
-
|
|
446
|
-
},
|
|
447
|
-
if (D(
|
|
448
|
-
const t =
|
|
449
|
-
|
|
453
|
+
l.selectedUnIds = n.getArrClone(d), l.firstOpenIds = n.getArrUnique(l.firstOpenIds.concat(d)), l.openParentIds = n.getArrUnique(l.openParentIds.concat(d));
|
|
454
|
+
}, fe = () => {
|
|
455
|
+
if (D(o.list), n.isNonEmptyString(o.value)) {
|
|
456
|
+
const t = o.value.split(",");
|
|
457
|
+
q(t);
|
|
450
458
|
}
|
|
451
459
|
A();
|
|
452
460
|
};
|
|
453
461
|
be(() => {
|
|
454
462
|
Z(() => {
|
|
455
|
-
|
|
463
|
+
fe();
|
|
456
464
|
});
|
|
457
|
-
}),
|
|
458
|
-
() =>
|
|
465
|
+
}), K(
|
|
466
|
+
() => o.list,
|
|
459
467
|
(t) => {
|
|
460
468
|
D(t);
|
|
461
|
-
const e =
|
|
462
|
-
|
|
463
|
-
const i = b(
|
|
464
|
-
i.join(",") !==
|
|
469
|
+
const e = l.selectedIds, s = n.isNonEmptyString(o.value) ? o.value.split(",") : [];
|
|
470
|
+
l.selectedIds = [], q(n.getArrUnique(e.concat(s)));
|
|
471
|
+
const i = b(l.selectedIds);
|
|
472
|
+
i.join(",") !== o.value && B(i.join(","));
|
|
465
473
|
}
|
|
466
|
-
),
|
|
467
|
-
() =>
|
|
474
|
+
), K(
|
|
475
|
+
() => o.value,
|
|
468
476
|
(t) => {
|
|
469
477
|
if (t !== void 0) {
|
|
470
|
-
const e =
|
|
471
|
-
n.isEqualArr(i, d) || (
|
|
478
|
+
const e = l.selectedIds, s = n.isNonEmptyString(t) ? t.split(",") : [], i = b(s), d = b(e);
|
|
479
|
+
n.isEqualArr(i, d) || (l.selectedIds = [], q(s));
|
|
472
480
|
}
|
|
473
481
|
}
|
|
474
482
|
);
|
|
475
|
-
const
|
|
483
|
+
const ge = () => {
|
|
476
484
|
const t = n.isNonEmptyString(h.prevSearchFoldParentIds) ? h.prevSearchFoldParentIds.split(",") : [];
|
|
477
|
-
|
|
485
|
+
l.firstOpenIds = n.getArrRemoveById(l.firstOpenIds, t), (n.isNonEmptyString(o.searchFoldParentIds) ? o.searchFoldParentIds.split(",") : []).forEach((s) => {
|
|
478
486
|
const i = s.toString();
|
|
479
|
-
|
|
480
|
-
}), h.prevSearchFoldParentIds = n.isNonEmptyString(
|
|
481
|
-
},
|
|
487
|
+
l.firstOpenIds.indexOf(i) === -1 && l.firstOpenIds.push(i);
|
|
488
|
+
}), h.prevSearchFoldParentIds = n.isNonEmptyString(o.searchFoldParentIds) ? o.searchFoldParentIds : "";
|
|
489
|
+
}, Ie = () => {
|
|
482
490
|
const t = n.isNonEmptyString(h.prevSearchOpenParentIds) ? h.prevSearchOpenParentIds.split(",") : [];
|
|
483
|
-
|
|
491
|
+
l.firstOpenIds = n.getArrRemoveById(l.firstOpenIds, t), l.openParentIds = n.getArrRemoveById(l.openParentIds, t), (n.isNonEmptyString(o.searchOpenParentIds) ? o.searchOpenParentIds.split(",") : []).forEach((s) => {
|
|
484
492
|
const i = s.toString();
|
|
485
|
-
|
|
486
|
-
}), h.prevSearchOpenParentIds = n.isNonEmptyString(
|
|
493
|
+
l.firstOpenIds.indexOf(i) === -1 && l.firstOpenIds.push(i), l.openParentIds.indexOf(i) === -1 && l.openParentIds.push(i);
|
|
494
|
+
}), h.prevSearchOpenParentIds = n.isNonEmptyString(o.searchOpenParentIds) ? o.searchOpenParentIds : "";
|
|
487
495
|
};
|
|
488
|
-
|
|
489
|
-
() =>
|
|
496
|
+
K(
|
|
497
|
+
() => o.searchOpenParentIds,
|
|
498
|
+
() => Ie()
|
|
499
|
+
), K(
|
|
500
|
+
() => o.searchFoldParentIds,
|
|
490
501
|
() => ge()
|
|
491
|
-
), J(
|
|
492
|
-
() => l.searchFoldParentIds,
|
|
493
|
-
() => fe()
|
|
494
502
|
);
|
|
495
|
-
const
|
|
503
|
+
const re = (t) => {
|
|
496
504
|
Array.isArray(t) && t.forEach((e) => {
|
|
497
505
|
if (!e)
|
|
498
506
|
return;
|
|
499
|
-
const s = !n.isEmpty(
|
|
500
|
-
e.showTextLabelHtml = s, e.showTextLabel = s ? R(n.isString(e.name) ? e.name : "") : n.isString(e.name) ? e.name : "", Array.isArray(e.list) &&
|
|
507
|
+
const s = !n.isEmpty(o.searchKeyword) && !n.isEmpty(o.highlightMode);
|
|
508
|
+
e.showTextLabelHtml = s, e.showTextLabel = s ? R(n.isString(e.name) ? e.name : "") : n.isString(e.name) ? e.name : "", Array.isArray(e.list) && re(e.list);
|
|
501
509
|
});
|
|
502
510
|
};
|
|
503
|
-
|
|
504
|
-
() => [
|
|
505
|
-
() =>
|
|
511
|
+
K(
|
|
512
|
+
() => [o.searchKeyword, o.highlightMode, o.highlightColor],
|
|
513
|
+
() => re(l.list)
|
|
506
514
|
);
|
|
507
|
-
const
|
|
515
|
+
const Se = (t) => {
|
|
508
516
|
const e = t.toString();
|
|
509
|
-
n.isExistValue(
|
|
510
|
-
const s =
|
|
511
|
-
s === -1 ?
|
|
517
|
+
n.isExistValue(l.firstOpenIds, e) || l.firstOpenIds.push(e), Z(() => {
|
|
518
|
+
const s = l.openParentIds.indexOf(e);
|
|
519
|
+
s === -1 ? l.openParentIds.push(e) : l.openParentIds.splice(s, 1);
|
|
512
520
|
});
|
|
513
|
-
},
|
|
521
|
+
}, me = (t) => {
|
|
514
522
|
const e = t.toString();
|
|
515
|
-
if (
|
|
516
|
-
const d =
|
|
517
|
-
let r = n.getArrClone(
|
|
518
|
-
a.select.del.forEach((
|
|
519
|
-
const m = r.indexOf(
|
|
523
|
+
if (o.multiple) {
|
|
524
|
+
const d = l.selectedIds.indexOf(e) === -1, c = U(e), a = v(e);
|
|
525
|
+
let r = n.getArrClone(l.selectedIds), u = n.getArrClone(l.selectedUnIds);
|
|
526
|
+
a.select.del.forEach((k) => {
|
|
527
|
+
const m = r.indexOf(k);
|
|
520
528
|
m > -1 && r.splice(m, 1);
|
|
521
|
-
}), a.select.add.length > 0 && (r = r.concat(a.select.add), r = n.getArrUnique(r)), a.selectUn.del.forEach((
|
|
522
|
-
const m = u.indexOf(
|
|
529
|
+
}), a.select.add.length > 0 && (r = r.concat(a.select.add), r = n.getArrUnique(r)), a.selectUn.del.forEach((k) => {
|
|
530
|
+
const m = u.indexOf(k);
|
|
523
531
|
m > -1 && u.splice(m, 1);
|
|
524
|
-
}), a.selectUn.add.length > 0 && (u = u.concat(a.selectUn.add), u = n.getArrUnique(u)), c.length > 0 && c.forEach((
|
|
525
|
-
const m = r.indexOf(
|
|
526
|
-
d ? m === -1 && r.push(
|
|
532
|
+
}), a.selectUn.add.length > 0 && (u = u.concat(a.selectUn.add), u = n.getArrUnique(u)), c.length > 0 && c.forEach((k) => {
|
|
533
|
+
const m = r.indexOf(k), H = u.indexOf(k);
|
|
534
|
+
d ? m === -1 && r.push(k) : m > -1 && r.splice(m, 1), H > -1 && u.splice(H, 1);
|
|
527
535
|
});
|
|
528
536
|
const I = r.indexOf(e);
|
|
529
537
|
I > -1 ? r.splice(I, 1) : r.push(e);
|
|
530
538
|
const f = u.indexOf(e);
|
|
531
|
-
f > -1 && u.splice(f, 1),
|
|
539
|
+
f > -1 && u.splice(f, 1), l.selectedIds = r, l.selectedUnIds = u;
|
|
532
540
|
} else
|
|
533
|
-
|
|
534
|
-
const s = b(
|
|
535
|
-
|
|
541
|
+
l.selectedIds = [e], l.selectedUnIds = [];
|
|
542
|
+
const s = b(l.selectedIds);
|
|
543
|
+
F(s.join(","), se(s));
|
|
536
544
|
};
|
|
537
|
-
return
|
|
538
|
-
isCheckChildren:
|
|
539
|
-
}),
|
|
540
|
-
getValue: () => b(
|
|
545
|
+
return _e("$TreeTop", {
|
|
546
|
+
isCheckChildren: C
|
|
547
|
+
}), G({
|
|
548
|
+
getValue: () => b(l.selectedIds).join(","),
|
|
541
549
|
getValueData: () => {
|
|
542
|
-
const t = b(
|
|
543
|
-
return
|
|
550
|
+
const t = b(l.selectedIds);
|
|
551
|
+
return se(t);
|
|
544
552
|
},
|
|
545
553
|
setValue: (t) => {
|
|
546
554
|
const e = n.isNonEmptyString(t) ? t.split(",") : [];
|
|
547
|
-
|
|
555
|
+
l.selectedIds = [], q(e);
|
|
548
556
|
}
|
|
549
|
-
}), (t, e) => y.isPlaintext ? (
|
|
557
|
+
}), (t, e) => y.isPlaintext ? (x(), E("div", {
|
|
550
558
|
key: 0,
|
|
551
|
-
id:
|
|
559
|
+
id: oe(L),
|
|
552
560
|
class: "cl-plaintext-value"
|
|
553
|
-
},
|
|
561
|
+
}, ce(Q.value), 9, De)) : (x(), E("div", {
|
|
554
562
|
key: 1,
|
|
555
|
-
class: ee(
|
|
556
|
-
id:
|
|
563
|
+
class: ee($.value),
|
|
564
|
+
id: oe(L)
|
|
557
565
|
}, [
|
|
558
|
-
|
|
566
|
+
l.list.length > 0 ? (x(), de(pe, Ae({
|
|
559
567
|
key: 0,
|
|
560
|
-
list:
|
|
561
|
-
firstOpenIds:
|
|
562
|
-
openIds:
|
|
563
|
-
selectIds:
|
|
564
|
-
selectUnIds:
|
|
565
|
-
},
|
|
566
|
-
onOnSelect:
|
|
567
|
-
onOnShrink:
|
|
568
|
-
}), null, 16, ["list", "firstOpenIds", "openIds", "selectIds", "selectUnIds"])) : (
|
|
569
|
-
], 10,
|
|
568
|
+
list: l.list,
|
|
569
|
+
firstOpenIds: l.firstOpenIds,
|
|
570
|
+
openIds: l.openParentIds,
|
|
571
|
+
selectIds: l.selectedIds,
|
|
572
|
+
selectUnIds: l.selectedUnIds
|
|
573
|
+
}, z.value, {
|
|
574
|
+
onOnSelect: me,
|
|
575
|
+
onOnShrink: Se
|
|
576
|
+
}), null, 16, ["list", "firstOpenIds", "openIds", "selectIds", "selectUnIds"])) : (x(), E(j, { key: 1 }, [], 64))
|
|
577
|
+
], 10, qe));
|
|
570
578
|
}
|
|
571
579
|
});
|
|
572
580
|
export {
|
|
573
|
-
|
|
581
|
+
tt as _
|
|
574
582
|
};
|