@aplus-frontend/ui 0.1.33 → 0.1.34
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/es/src/ap-table/components/setting/select-group/index.vue2.mjs +8 -8
- package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +14 -11
- package/es/src/ap-table/components/setting/utils.mjs +29 -29
- package/es/src/check-card/style/index.css +1 -0
- package/es/src/theme/check-card/index.css +1 -0
- package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/utils.js +1 -1
- package/lib/src/check-card/style/index.css +1 -0
- package/lib/src/theme/check-card/index.css +1 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as E, ref as P, computed as p, unref as r, watch as U, openBlock as
|
|
1
|
+
import { defineComponent as E, ref as P, computed as p, unref as r, watch as U, openBlock as s, createElementBlock as f, createElementVNode as v, normalizeClass as x, createVNode as u, withCtx as i, createBlock as h, resolveDynamicComponent as k, Fragment as D, renderList as L, mergeProps as j } from "vue";
|
|
2
2
|
import { Checkbox as w, Row as z, Col as F } from "ant-design-vue";
|
|
3
3
|
import "../../style/setting/select-group.css";
|
|
4
4
|
import "../../../../config-provider/index.mjs";
|
|
@@ -32,11 +32,11 @@ const M = /* @__PURE__ */ E({
|
|
|
32
32
|
e.children.forEach((n) => n.show = o), e.show = o, c.value = !1;
|
|
33
33
|
}
|
|
34
34
|
function A(o, e) {
|
|
35
|
-
const n = t.value, l = n.children.find((
|
|
35
|
+
const n = t.value, l = n.children.find((a) => a.key === o);
|
|
36
36
|
if (!l)
|
|
37
37
|
return;
|
|
38
38
|
l.show = e;
|
|
39
|
-
const d = n.children.every((
|
|
39
|
+
const d = n.children.every((a) => a.show), N = n.children.some((a) => a.show);
|
|
40
40
|
n.show = d, c.value = N && !d;
|
|
41
41
|
}
|
|
42
42
|
const B = p(() => t.value.disabled || t.value.children.every((o) => o.disabled));
|
|
@@ -52,7 +52,7 @@ const M = /* @__PURE__ */ E({
|
|
|
52
52
|
}
|
|
53
53
|
), (o, e) => {
|
|
54
54
|
var n;
|
|
55
|
-
return
|
|
55
|
+
return s(), f("div", null, [
|
|
56
56
|
v("div", {
|
|
57
57
|
class: x(r(C)("header"))
|
|
58
58
|
}, [
|
|
@@ -63,15 +63,15 @@ const M = /* @__PURE__ */ E({
|
|
|
63
63
|
disabled: B.value
|
|
64
64
|
}, {
|
|
65
65
|
default: i(() => [
|
|
66
|
-
(
|
|
66
|
+
(s(), h(k(r(b)(m.value.title))))
|
|
67
67
|
]),
|
|
68
68
|
_: 1
|
|
69
69
|
}, 8, ["indeterminate", "checked", "disabled"])
|
|
70
70
|
], 2),
|
|
71
71
|
v("div", null, [
|
|
72
|
-
u(r(z),
|
|
72
|
+
u(r(z), { align: "middle" }, {
|
|
73
73
|
default: i(() => [
|
|
74
|
-
(
|
|
74
|
+
(s(!0), f(D, null, L(m.value.children, (l) => (s(), h(r(F), {
|
|
75
75
|
key: l.key,
|
|
76
76
|
span: 8
|
|
77
77
|
}, {
|
|
@@ -80,7 +80,7 @@ const M = /* @__PURE__ */ E({
|
|
|
80
80
|
"onUpdate:checked": (d) => A(l.key, d)
|
|
81
81
|
}), {
|
|
82
82
|
default: i(() => [
|
|
83
|
-
(
|
|
83
|
+
(s(), h(k(r(b)(l.title))))
|
|
84
84
|
]),
|
|
85
85
|
_: 2
|
|
86
86
|
}, 1040, ["onUpdate:checked"])
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as b, computed as x, unref as
|
|
1
|
+
import { defineComponent as b, computed as x, unref as l, openBlock as c, createElementBlock as i, createVNode as s, withCtx as d, Fragment as m, renderList as w, createBlock as u, mergeProps as B, resolveDynamicComponent as I } from "vue";
|
|
2
2
|
import { Row as L, Col as k, Checkbox as N } from "ant-design-vue";
|
|
3
3
|
import "../select-group/index.vue.mjs";
|
|
4
4
|
import { useInjectApTable as P } from "../../../context.mjs";
|
|
@@ -10,7 +10,7 @@ const $ = /* @__PURE__ */ b({
|
|
|
10
10
|
value: {}
|
|
11
11
|
},
|
|
12
12
|
setup(_) {
|
|
13
|
-
const a = _, { columnsBackup:
|
|
13
|
+
const a = _, { columnsBackup: g } = P(), y = x(() => [...l(g) || []].sort((e, n) => {
|
|
14
14
|
var t, o, p, h;
|
|
15
15
|
return (t = e.children) != null && t.length && !((o = n.children) != null && o.length) ? 1 : !((p = e.children) != null && p.length) && ((h = n.children) != null && h.length) ? -1 : 0;
|
|
16
16
|
}));
|
|
@@ -28,34 +28,37 @@ const $ = /* @__PURE__ */ b({
|
|
|
28
28
|
const n = a.value, t = n == null ? void 0 : n.find((o) => o.key === r);
|
|
29
29
|
t && (t.show = e);
|
|
30
30
|
}
|
|
31
|
-
return (r, e) => (
|
|
32
|
-
|
|
31
|
+
return (r, e) => (c(), i("div", null, [
|
|
32
|
+
s(l(L), {
|
|
33
|
+
gutter: [24, 16],
|
|
34
|
+
align: "middle"
|
|
35
|
+
}, {
|
|
33
36
|
default: d(() => [
|
|
34
|
-
(
|
|
37
|
+
(c(!0), i(m, null, w(y.value, (n) => {
|
|
35
38
|
var t;
|
|
36
|
-
return
|
|
39
|
+
return c(), i(m, {
|
|
37
40
|
key: n.key
|
|
38
41
|
}, [
|
|
39
|
-
(t = n.children) != null && t.length ? (
|
|
42
|
+
(t = n.children) != null && t.length ? (c(), u(l(k), {
|
|
40
43
|
key: 1,
|
|
41
44
|
span: 24
|
|
42
45
|
}, {
|
|
43
46
|
default: d(() => [
|
|
44
|
-
|
|
47
|
+
s(j, {
|
|
45
48
|
value: f(n)
|
|
46
49
|
}, null, 8, ["value"])
|
|
47
50
|
]),
|
|
48
51
|
_: 2
|
|
49
|
-
}, 1024)) : (
|
|
52
|
+
}, 1024)) : (c(), u(l(k), {
|
|
50
53
|
key: 0,
|
|
51
54
|
span: 8
|
|
52
55
|
}, {
|
|
53
56
|
default: d(() => [
|
|
54
|
-
|
|
57
|
+
s(l(N), B({ ref_for: !0 }, C(n), {
|
|
55
58
|
"onUpdate:checked": (o) => v(n.key, o)
|
|
56
59
|
}), {
|
|
57
60
|
default: d(() => [
|
|
58
|
-
(
|
|
61
|
+
(c(), u(I(l(U)(n.title))))
|
|
59
62
|
]),
|
|
60
63
|
_: 2
|
|
61
64
|
}, 1040, ["onUpdate:checked"])
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { cloneDeepWith as s,
|
|
2
|
-
import { isVNode as
|
|
3
|
-
function d(
|
|
4
|
-
var
|
|
1
|
+
import { cloneDeepWith as s, isArray as u, omit as c } from "lodash-unified";
|
|
2
|
+
import { isVNode as f, cloneVNode as a } from "vue";
|
|
3
|
+
function d(e, i) {
|
|
4
|
+
var o;
|
|
5
5
|
const n = [];
|
|
6
|
-
for (const
|
|
7
|
-
const l =
|
|
8
|
-
if ((
|
|
6
|
+
for (const t of i) {
|
|
7
|
+
const l = e.find((r) => r.key === t.key);
|
|
8
|
+
if ((o = t.children) != null && o.length) {
|
|
9
9
|
const r = d(
|
|
10
10
|
l.children,
|
|
11
|
-
|
|
11
|
+
t.children
|
|
12
12
|
);
|
|
13
13
|
r.length && n.push({
|
|
14
14
|
...l,
|
|
15
|
-
fixed:
|
|
15
|
+
fixed: t.fixed,
|
|
16
16
|
children: r
|
|
17
17
|
});
|
|
18
18
|
} else {
|
|
19
|
-
if (!
|
|
19
|
+
if (!t.show)
|
|
20
20
|
continue;
|
|
21
|
-
n.push({ ...l, fixed:
|
|
21
|
+
n.push({ ...l, fixed: t.fixed });
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
return n;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
return s(
|
|
26
|
+
function y(e) {
|
|
27
|
+
return s(e, (i, n) => {
|
|
28
28
|
if (n === "label")
|
|
29
|
-
return
|
|
29
|
+
return i;
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
const
|
|
32
|
+
const h = {
|
|
33
33
|
display: "inline",
|
|
34
34
|
"-webkit-line-clamp": "unset",
|
|
35
35
|
"-webkit-box-orient": "unset",
|
|
@@ -38,26 +38,26 @@ const a = {
|
|
|
38
38
|
"white-space": "unset",
|
|
39
39
|
wordBreak: "unset"
|
|
40
40
|
};
|
|
41
|
-
function
|
|
42
|
-
return
|
|
41
|
+
function b(e) {
|
|
42
|
+
return f(e) ? a(e, { style: h }) : u(e) ? e[0] : e;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
function
|
|
46
|
-
const
|
|
47
|
-
return n.forEach((
|
|
44
|
+
function g(e) {
|
|
45
|
+
function i(n) {
|
|
46
|
+
const o = {};
|
|
47
|
+
return n.forEach((t, l) => {
|
|
48
48
|
var r;
|
|
49
|
-
|
|
50
|
-
...
|
|
49
|
+
o[t.key] = {
|
|
50
|
+
...c(t, ["label", "key", "children"]),
|
|
51
51
|
order: l,
|
|
52
|
-
children: (r =
|
|
52
|
+
children: (r = t.children) != null && r.length ? i(t.children) : void 0
|
|
53
53
|
};
|
|
54
|
-
}),
|
|
54
|
+
}), o;
|
|
55
55
|
}
|
|
56
|
-
return
|
|
56
|
+
return i(e);
|
|
57
57
|
}
|
|
58
58
|
export {
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
b as cloneLabelNode,
|
|
60
|
+
y as customCloneColumnStates,
|
|
61
61
|
d as default,
|
|
62
|
-
|
|
62
|
+
g as getColumnStateString
|
|
63
63
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("ant-design-vue");require("../../style/setting/select-group.css");require("../../../../config-provider/index.js");const C=require("../../../context.js"),i=require("../utils.js"),y=require("../../../../config-provider/hooks/use-namespace.js"),_=e.defineComponent({__name:"index",props:{value:{}},setup(h){const r=h,{b:
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("ant-design-vue");require("../../style/setting/select-group.css");require("../../../../config-provider/index.js");const C=require("../../../context.js"),i=require("../utils.js"),y=require("../../../../config-provider/hooks/use-namespace.js"),_=e.defineComponent({__name:"index",props:{value:{}},setup(h){const r=h,{b:m}=y.useNamespace("select-group"),a=e.ref(!1),{columnsBackup:f}=C.useInjectApTable(),d=e.computed(()=>{var n;return(n=e.unref(f))==null?void 0:n.find(t=>{var l;return t.key===((l=r.value)==null?void 0:l.key)})});function k(o){const n=r.value.children.find(t=>t.key===o.key);return{checked:n==null?void 0:n.show,disabled:r.value.disabled||(n==null?void 0:n.disabled)}}function p(o){const n=r.value;n.children.forEach(t=>t.show=o),n.show=o,a.value=!1}function v(o,n){const t=r.value,l=t.children.find(c=>c.key===o);if(!l)return;l.show=n;const s=t.children.every(c=>c.show),b=t.children.some(c=>c.show);t.show=s,a.value=b&&!s}const w=e.computed(()=>r.value.disabled||r.value.children.every(o=>o.disabled));return e.watch(()=>r.value,o=>{const n=o.children.every(l=>l.show),t=o.children.some(l=>l.show);a.value=t&&!n,o.show!==n&&(o.show=n)},{deep:!0,immediate:!0}),(o,n)=>{var t;return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",{class:e.normalizeClass(e.unref(m)("header"))},[e.createVNode(e.unref(u.Checkbox),{indeterminate:a.value,checked:(t=o.value)==null?void 0:t.show,"onUpdate:checked":p,disabled:w.value},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(i.cloneLabelNode)(d.value.title))))]),_:1},8,["indeterminate","checked","disabled"])],2),e.createElementVNode("div",null,[e.createVNode(e.unref(u.Row),{align:"middle"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.children,l=>(e.openBlock(),e.createBlock(e.unref(u.Col),{key:l.key,span:8},{default:e.withCtx(()=>[e.createVNode(e.unref(u.Checkbox),e.mergeProps({ref_for:!0},k(l),{"onUpdate:checked":s=>v(l.key,s)}),{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(i.cloneLabelNode)(l.title))))]),_:2},1040,["onUpdate:checked"])]),_:2},1024))),128))]),_:1})])])}}});exports.default=_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("ant-design-vue");require("../select-group/index.vue.js");const _=require("../../../context.js"),g=require("../utils.js"),B=require("../select-group/index.vue2.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("ant-design-vue");require("../select-group/index.vue.js");const _=require("../../../context.js"),g=require("../utils.js"),B=require("../select-group/index.vue2.js"),m=e.defineComponent({__name:"index",props:{value:{}},setup(a){const u=a,{columnsBackup:k}=_.useInjectApTable(),f=e.computed(()=>[...e.unref(k)||[]].sort((t,n)=>{var r,c,s,d;return(r=t.children)!=null&&r.length&&!((c=n.children)!=null&&c.length)?1:!((s=t.children)!=null&&s.length)&&((d=n.children)!=null&&d.length)?-1:0}));function i(o){return u.value.find(t=>t.key===o.key)}function p(o){const t=i(o);return{checked:t==null?void 0:t.show,disabled:t==null?void 0:t.disabled}}function h(o,t){const n=u.value,r=n==null?void 0:n.find(c=>c.key===o);r&&(r.show=t)}return(o,t)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(l.Row),{gutter:[24,16],align:"middle"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,n=>{var r;return e.openBlock(),e.createElementBlock(e.Fragment,{key:n.key},[(r=n.children)!=null&&r.length?(e.openBlock(),e.createBlock(e.unref(l.Col),{key:1,span:24},{default:e.withCtx(()=>[e.createVNode(B.default,{value:i(n)},null,8,["value"])]),_:2},1024)):(e.openBlock(),e.createBlock(e.unref(l.Col),{key:0,span:8},{default:e.withCtx(()=>[e.createVNode(e.unref(l.Checkbox),e.mergeProps({ref_for:!0},p(n),{"onUpdate:checked":c=>h(n.key,c)}),{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(g.cloneLabelNode)(n.title))))]),_:2},1040,["onUpdate:checked"])]),_:2},1024))],64)}),128))]),_:1})]))}});exports.default=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("lodash-unified"),s=require("vue");function c(e,i){var o;const n=[];for(const t of i){const l=e.find(r=>r.key===t.key);if((o=t.children)!=null&&o.length){const r=c(l.children,t.children);r.length&&n.push({...l,fixed:t.fixed,children:r})}else{if(!t.show)continue;n.push({...l,fixed:t.fixed})}}return n}function a(e){return u.cloneDeepWith(e,(i,n)=>{if(n==="label")return i})}const f={display:"inline","-webkit-line-clamp":"unset","-webkit-box-orient":"unset",overflow:"unset","text-overflow":"unset","white-space":"unset",wordBreak:"unset"};function d(e){return s.isVNode(e)?s.cloneVNode(e,{style:f}):u.isArray(e)?e[0]:e}function h(e){function i(n){const o={};return n.forEach((t,l)=>{var r;o[t.key]={...u.omit(t,["label","key","children"]),order:l,children:(r=t.children)!=null&&r.length?i(t.children):void 0}}),o}return i(e)}exports.cloneLabelNode=d;exports.customCloneColumnStates=a;exports.default=c;exports.getColumnStateString=h;
|