@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.
@@ -1,4 +1,4 @@
1
- import { defineComponent as E, ref as P, computed as p, unref as r, watch as U, openBlock as a, 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";
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((s) => s.key === o);
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((s) => s.show), N = n.children.some((s) => s.show);
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 a(), f("div", null, [
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
- (a(), h(k(r(b)(m.value.title))))
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), null, {
72
+ u(r(z), { align: "middle" }, {
73
73
  default: i(() => [
74
- (a(!0), f(D, null, L(m.value.children, (l) => (a(), h(r(F), {
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
- (a(), h(k(r(b)(l.title))))
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 c, openBlock as l, createElementBlock as s, createVNode as i, withCtx as d, Fragment as m, renderList as w, createBlock as u, mergeProps as B, resolveDynamicComponent as I } from "vue";
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: y } = P(), g = x(() => [...c(y) || []].sort((e, n) => {
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) => (l(), s("div", null, [
32
- i(c(L), { gutter: [24, 16] }, {
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
- (l(!0), s(m, null, w(g.value, (n) => {
37
+ (c(!0), i(m, null, w(y.value, (n) => {
35
38
  var t;
36
- return l(), s(m, {
39
+ return c(), i(m, {
37
40
  key: n.key
38
41
  }, [
39
- (t = n.children) != null && t.length ? (l(), u(c(k), {
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
- i(j, {
47
+ s(j, {
45
48
  value: f(n)
46
49
  }, null, 8, ["value"])
47
50
  ]),
48
51
  _: 2
49
- }, 1024)) : (l(), u(c(k), {
52
+ }, 1024)) : (c(), u(l(k), {
50
53
  key: 0,
51
54
  span: 8
52
55
  }, {
53
56
  default: d(() => [
54
- i(c(N), B({ ref_for: !0 }, C(n), {
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
- (l(), u(I(c(U)(n.title))))
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, omit as u } from "lodash-unified";
2
- import { isVNode as c, cloneVNode as f } from "vue";
3
- function d(t, o) {
4
- var i;
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 e of o) {
7
- const l = t.find((r) => r.key === e.key);
8
- if ((i = e.children) != null && i.length) {
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
- e.children
11
+ t.children
12
12
  );
13
13
  r.length && n.push({
14
14
  ...l,
15
- fixed: e.fixed,
15
+ fixed: t.fixed,
16
16
  children: r
17
17
  });
18
18
  } else {
19
- if (!e.show)
19
+ if (!t.show)
20
20
  continue;
21
- n.push({ ...l, fixed: e.fixed });
21
+ n.push({ ...l, fixed: t.fixed });
22
22
  }
23
23
  }
24
24
  return n;
25
25
  }
26
- function p(t) {
27
- return s(t, (o, n) => {
26
+ function y(e) {
27
+ return s(e, (i, n) => {
28
28
  if (n === "label")
29
- return o;
29
+ return i;
30
30
  });
31
31
  }
32
- const a = {
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 y(t) {
42
- return c(t) ? f(t, { style: a }) : t;
41
+ function b(e) {
42
+ return f(e) ? a(e, { style: h }) : u(e) ? e[0] : e;
43
43
  }
44
- function b(t) {
45
- function o(n) {
46
- const i = {};
47
- return n.forEach((e, l) => {
44
+ function g(e) {
45
+ function i(n) {
46
+ const o = {};
47
+ return n.forEach((t, l) => {
48
48
  var r;
49
- i[e.key] = {
50
- ...u(e, ["label", "key", "children"]),
49
+ o[t.key] = {
50
+ ...c(t, ["label", "key", "children"]),
51
51
  order: l,
52
- children: (r = e.children) != null && r.length ? o(e.children) : void 0
52
+ children: (r = t.children) != null && r.length ? i(t.children) : void 0
53
53
  };
54
- }), i;
54
+ }), o;
55
55
  }
56
- return o(t);
56
+ return i(e);
57
57
  }
58
58
  export {
59
- y as cloneLabelNode,
60
- p as customCloneColumnStates,
59
+ b as cloneLabelNode,
60
+ y as customCloneColumnStates,
61
61
  d as default,
62
- b as getColumnStateString
62
+ g as getColumnStateString
63
63
  };
@@ -77,4 +77,5 @@
77
77
  }
78
78
  .aplus-check-card__checked-icon > img {
79
79
  width: calc(var(--check-card-indicator-size, 16px) - 2px);
80
+ vertical-align: top;
80
81
  }
@@ -77,4 +77,5 @@
77
77
  }
78
78
  .aplus-check-card__checked-icon > img {
79
79
  width: calc(var(--check-card-indicator-size, 16px) - 2px);
80
+ vertical-align: top;
80
81
  }
@@ -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:f}=y.useNamespace("select-group"),s=e.ref(!1),{columnsBackup:m}=C.useInjectApTable(),d=e.computed(()=>{var n;return(n=e.unref(m))==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,s.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 a=t.children.every(c=>c.show),b=t.children.some(c=>c.show);t.show=a,s.value=b&&!a}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);s.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(f)("header"))},[e.createVNode(e.unref(u.Checkbox),{indeterminate:s.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),null,{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":a=>v(l.key,a)}),{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
+ "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"),v=e.defineComponent({__name:"index",props:{value:{}},setup(d){const u=d,{columnsBackup:k}=_.useInjectApTable(),f=e.computed(()=>[...e.unref(k)||[]].sort((t,n)=>{var r,c,i,a;return(r=t.children)!=null&&r.length&&!((c=n.children)!=null&&c.length)?1:!((i=t.children)!=null&&i.length)&&((a=n.children)!=null&&a.length)?-1:0}));function s(o){return u.value.find(t=>t.key===o.key)}function p(o){const t=s(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]},{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:s(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=v;
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 s=require("lodash-unified"),u=require("vue");function c(t,r){var i;const n=[];for(const e of r){const l=t.find(o=>o.key===e.key);if((i=e.children)!=null&&i.length){const o=c(l.children,e.children);o.length&&n.push({...l,fixed:e.fixed,children:o})}else{if(!e.show)continue;n.push({...l,fixed:e.fixed})}}return n}function d(t){return s.cloneDeepWith(t,(r,n)=>{if(n==="label")return r})}const a={display:"inline","-webkit-line-clamp":"unset","-webkit-box-orient":"unset",overflow:"unset","text-overflow":"unset","white-space":"unset",wordBreak:"unset"};function f(t){return u.isVNode(t)?u.cloneVNode(t,{style:a}):t}function h(t){function r(n){const i={};return n.forEach((e,l)=>{var o;i[e.key]={...s.omit(e,["label","key","children"]),order:l,children:(o=e.children)!=null&&o.length?r(e.children):void 0}}),i}return r(t)}exports.cloneLabelNode=f;exports.customCloneColumnStates=d;exports.default=c;exports.getColumnStateString=h;
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;
@@ -77,4 +77,5 @@
77
77
  }
78
78
  .aplus-check-card__checked-icon > img {
79
79
  width: calc(var(--check-card-indicator-size, 16px) - 2px);
80
+ vertical-align: top;
80
81
  }
@@ -77,4 +77,5 @@
77
77
  }
78
78
  .aplus-check-card__checked-icon > img {
79
79
  width: calc(var(--check-card-indicator-size, 16px) - 2px);
80
+ vertical-align: top;
80
81
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aplus-frontend/ui",
3
- "version": "0.1.33",
3
+ "version": "0.1.34",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.mjs",
6
6
  "files": [