@aplus-frontend/ui 6.24.2 → 6.25.0

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.
Files changed (30) hide show
  1. package/es/src/ap-form/interface.d.ts +1 -2
  2. package/es/src/ap-form/search-form/hooks/use-count-per-row.mjs +27 -24
  3. package/es/src/ap-form/search-form/index.vue.d.ts +9 -3
  4. package/es/src/ap-form/search-form/index.vue.mjs +116 -108
  5. package/es/src/ap-pro-card/components/card/index.vue.d.ts +1 -1
  6. package/es/src/ap-pro-card/components/statistic/index.vue.d.ts +2 -1
  7. package/es/src/ap-pro-card/components/statistic/index.vue2.mjs +43 -37
  8. package/es/src/ap-pro-card/interface.d.ts +3 -1
  9. package/es/src/business/ap-value-select-card/index.vue.d.ts +6 -0
  10. package/es/src/business/ap-value-select-card/index.vue2.mjs +88 -80
  11. package/es/src/version.d.ts +1 -1
  12. package/es/src/version.mjs +1 -1
  13. package/lib/src/ap-form/interface.d.ts +1 -2
  14. package/lib/src/ap-form/search-form/hooks/use-count-per-row.js +1 -1
  15. package/lib/src/ap-form/search-form/index.vue.d.ts +9 -3
  16. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  17. package/lib/src/ap-pro-card/components/card/index.vue.d.ts +1 -1
  18. package/lib/src/ap-pro-card/components/statistic/index.vue.d.ts +2 -1
  19. package/lib/src/ap-pro-card/components/statistic/index.vue2.js +1 -1
  20. package/lib/src/ap-pro-card/interface.d.ts +3 -1
  21. package/lib/src/business/ap-value-select-card/index.vue.d.ts +6 -0
  22. package/lib/src/business/ap-value-select-card/index.vue2.js +1 -1
  23. package/lib/src/version.d.ts +1 -1
  24. package/lib/src/version.js +1 -1
  25. package/package.json +5 -5
  26. package/theme/ap-pro-card/index.css +29 -25
  27. package/theme/ap-pro-card/index.less +32 -16
  28. package/theme/ap-value-select-card/index.css +1 -0
  29. package/theme/ap-value-select-card/index.less +1 -0
  30. package/theme/index.css +30 -25
@@ -1,11 +1,11 @@
1
- import { defineComponent as q, ref as N, computed as R, resolveComponent as J, createElementBlock as u, openBlock as c, normalizeStyle as $, normalizeClass as d, unref as l, createVNode as I, withCtx as _, createElementVNode as h, createCommentVNode as f, Fragment as D, renderList as E, withModifiers as y, renderSlot as v, createTextVNode as O, toDisplayString as g, createBlock as Q } from "vue";
1
+ import { defineComponent as q, ref as N, computed as R, resolveComponent as J, createElementBlock as u, openBlock as r, normalizeStyle as I, normalizeClass as d, unref as l, createVNode as O, withCtx as D, createElementVNode as h, createCommentVNode as v, Fragment as E, renderList as M, withModifiers as K, renderSlot as g, createTextVNode as m, toDisplayString as p, createBlock as Q } from "vue";
2
2
  import { Popover as U } from "@aplus-frontend/antdv";
3
3
  import { PlusOutlined as W } from "@ant-design/icons-vue";
4
4
  import { IconApAdLinePoor as X } from "@aplus-frontend/icon";
5
5
  import "../../config-provider/index.mjs";
6
6
  import { useNamespace as Y } from "../../config-provider/hooks/use-namespace.mjs";
7
7
  import { useGlobalConfig as Z } from "../../config-provider/hooks/use-global-config.mjs";
8
- const x = ["onClick"], ee = { class: "label" }, te = { class: "value" }, le = ["onClick"], se = ["onClick"], ie = { class: "label" }, oe = { class: "value" }, ne = { class: "text" }, pe = /* @__PURE__ */ q({
8
+ const x = ["onClick"], ee = { class: "label" }, te = { class: "value" }, le = ["onClick"], se = ["onClick"], oe = { class: "label" }, ie = { class: "value" }, ne = { class: "text" }, pe = /* @__PURE__ */ q({
9
9
  name: "ApValueSelectCard",
10
10
  __name: "index",
11
11
  props: {
@@ -19,159 +19,167 @@ const x = ["onClick"], ee = { class: "label" }, te = { class: "value" }, le = ["
19
19
  showCloseIcon: { type: Boolean, default: !0 },
20
20
  showAddButton: { type: Boolean, default: !0 },
21
21
  addButtonText: { default: "" },
22
- getContainer: { type: Function, default: (K) => K.parentElement || document.body },
22
+ getContainer: { type: Function, default: (C) => C.parentElement || document.body },
23
23
  getCardStyle: { type: Function, default: () => ({}) },
24
24
  wrapperStyle: { type: [Boolean, null, String, Object, Array] }
25
25
  },
26
26
  emits: ["update:selectedKeys", "update:highlightedKeys", "change", "select", "remove", "highlight"],
27
- setup(K, { expose: M, emit: P }) {
28
- const o = P, t = K, { b: n, m: z } = Y("ap-value-select-card"), L = Z("uiMode", "aplus"), p = N(null), m = N(!1), C = R(() => t.options), S = R(() => C.value.filter(
27
+ setup(C, { expose: P, emit: z }) {
28
+ const n = z, t = C, { b: a, m: L } = Y("ap-value-select-card"), _ = Z("uiMode", "aplus"), f = N(null), y = N(!1), S = R(() => t.options), k = R(() => S.value.filter(
29
29
  (e) => t.selectedKeys.includes(e.key)
30
- )), T = (e) => t.selectedKeys.includes(e), k = (e) => t.highlightedKeys.includes(e), H = (e) => {
31
- t.selectedKeys.includes(e) ? w(e) : A(e);
30
+ )), T = (e) => t.selectedKeys.includes(e), w = (e) => t.highlightedKeys.includes(e), H = (e) => {
31
+ t.selectedKeys.includes(e) ? b(e) : A(e);
32
32
  }, A = (e) => {
33
33
  if (t.maxSelected && t.selectedKeys.length >= t.maxSelected)
34
34
  return;
35
35
  const s = [...t.selectedKeys, e];
36
- o("update:selectedKeys", s), o("change", s), o("select", e), t.highlightedKeys.includes(e) || b(e);
37
- }, w = (e) => {
36
+ n("update:selectedKeys", s), n("change", s), n("select", e), t.highlightedKeys.includes(e) || $(e);
37
+ }, b = (e) => {
38
38
  if (t.selectedKeys.length <= 1 || t.highlightedKeys.length <= 1 && t.highlightedKeys.includes(e))
39
39
  return;
40
- const s = t.selectedKeys.filter((r) => r !== e);
41
- if (o("update:selectedKeys", s), o("change", s), o("remove", e), t.highlightedKeys.includes(e)) {
42
- const r = t.highlightedKeys.filter((a) => a !== e);
43
- o("update:highlightedKeys", r), o("highlight", r);
40
+ const s = t.selectedKeys.filter((c) => c !== e);
41
+ if (n("update:selectedKeys", s), n("change", s), n("remove", e), t.highlightedKeys.includes(e)) {
42
+ const c = t.highlightedKeys.filter((i) => i !== e);
43
+ n("update:highlightedKeys", c), n("highlight", c);
44
44
  }
45
- }, b = (e) => {
45
+ }, $ = (e) => {
46
46
  let s;
47
47
  if (t.highlightedKeys.includes(e))
48
48
  if (t.highlightedKeys.length > 1)
49
- s = t.highlightedKeys.filter((r) => r !== e);
49
+ s = t.highlightedKeys.filter((c) => c !== e);
50
50
  else
51
51
  return;
52
52
  else
53
53
  s = [...t.highlightedKeys, e];
54
- o("update:highlightedKeys", s), o("highlight", s);
54
+ n("update:highlightedKeys", s), n("highlight", s);
55
55
  }, j = (e) => {
56
- e || (m.value = e);
56
+ e || (y.value = e);
57
57
  };
58
- return M({
59
- popoverVisible: m,
60
- allOptions: C,
61
- selectedOptions: S,
58
+ return P({
59
+ popoverVisible: y,
60
+ allOptions: S,
61
+ selectedOptions: k,
62
62
  isSelected: T,
63
- isHighlighted: k,
63
+ isHighlighted: w,
64
64
  toggleOption: H,
65
65
  addOption: A,
66
- removeOption: w,
67
- highlightOption: b
66
+ removeOption: b,
67
+ highlightOption: $
68
68
  }), (e, s) => {
69
- const r = J("InfoCircleFilled");
70
- return c(), u("div", {
71
- class: d([l(n)(), `${l(z)(l(L))}`]),
72
- style: $({
69
+ const c = J("InfoCircleFilled");
70
+ return r(), u("div", {
71
+ class: d([l(a)(), `${l(L)(l(_))}`]),
72
+ style: I({
73
73
  ...e.wrapperStyle,
74
74
  "--ap-value-select-card-column-count": e.maxRowDisplay
75
75
  })
76
76
  }, [
77
- I(l(U), {
78
- open: m.value,
77
+ O(l(U), {
78
+ open: y.value,
79
79
  trigger: "click",
80
80
  placement: "bottomRight",
81
81
  arrow: !1,
82
82
  "get-popup-container": e.getContainer,
83
83
  onOpenChange: j
84
84
  }, {
85
- content: _(() => [
85
+ content: D(() => [
86
86
  h("div", {
87
- class: d(l(n)("popover"))
87
+ class: d(l(a)("popover"))
88
88
  }, [
89
- e.popoverTitle ? (c(), u("div", {
89
+ e.popoverTitle ? (r(), u("div", {
90
90
  key: 0,
91
- class: d(l(n)("title"))
91
+ class: d(l(a)("title"))
92
92
  }, [
93
- e.showTitleIcon ? (c(), Q(r, {
93
+ e.showTitleIcon ? (r(), Q(c, {
94
94
  key: 0,
95
- class: d(l(n)("title-icon"))
96
- }, null, 8, ["class"])) : f("", !0),
97
- O(" " + g(e.popoverTitle), 1)
98
- ], 2)) : f("", !0),
95
+ class: d(l(a)("title-icon"))
96
+ }, null, 8, ["class"])) : v("", !0),
97
+ m(" " + p(e.popoverTitle), 1)
98
+ ], 2)) : v("", !0),
99
99
  h("div", {
100
- class: d(l(n)("list"))
100
+ class: d(l(a)("list"))
101
101
  }, [
102
- (c(!0), u(D, null, E(C.value, (a) => (c(), u("div", {
103
- key: a.key,
102
+ (r(!0), u(E, null, M(S.value, (i) => (r(), u("div", {
103
+ key: i.key,
104
104
  class: d([
105
- l(n)("list-item"),
105
+ l(a)("list-item"),
106
106
  "all",
107
107
  {
108
- select: T(a.key),
108
+ select: T(i.key),
109
109
  disabled: e.maxSelected && e.selectedKeys.length >= e.maxSelected
110
110
  }
111
111
  ]),
112
- onClick: y((B) => H(a.key), ["stop"])
112
+ onClick: K((B) => H(i.key), ["stop"])
113
113
  }, [
114
- h("div", ee, g(a.label), 1),
115
- h("div", te, g(a.value), 1)
114
+ h("div", ee, [
115
+ g(e.$slots, "popover-label", { option: i }, () => [
116
+ m(p(i.label), 1)
117
+ ])
118
+ ]),
119
+ h("div", te, [
120
+ g(e.$slots, "popover-value", { option: i }, () => [
121
+ m(p(i.value), 1)
122
+ ])
123
+ ])
116
124
  ], 10, x))), 128))
117
125
  ], 2)
118
126
  ], 2)
119
127
  ]),
120
- default: _(() => {
121
- var a, B, V, F;
128
+ default: D(() => {
129
+ var i, B, V, F;
122
130
  return [
123
131
  h("div", {
124
- class: d(l(n)("list"))
132
+ class: d(l(a)("list"))
125
133
  }, [
126
- (c(!0), u(D, null, E(S.value, (i) => (c(), u("div", {
127
- key: i.key,
134
+ (r(!0), u(E, null, M(k.value, (o) => (r(), u("div", {
135
+ key: o.key,
128
136
  ref_for: !0,
129
137
  ref_key: "listItemRef",
130
- ref: p,
138
+ ref: f,
131
139
  class: d([
132
- l(n)("list-item"),
140
+ l(a)("list-item"),
133
141
  {
134
- select: k(i.key),
135
- custom: i.customClass
142
+ select: w(o.key),
143
+ custom: o.customClass
136
144
  },
137
- i.customClass
145
+ o.customClass
138
146
  ]),
139
- style: $(e.getCardStyle(i.key)),
140
- onClick: y((G) => b(i.key), ["stop"])
147
+ style: I(e.getCardStyle(o.key)),
148
+ onClick: K((G) => $(o.key), ["stop"])
141
149
  }, [
142
- e.showCloseIcon && (!(e.highlightedKeys.length === 1 && k(i.key)) && S.value.length > 1) ? (c(), u("div", {
150
+ e.showCloseIcon && (!(e.highlightedKeys.length === 1 && w(o.key)) && k.value.length > 1) ? (r(), u("div", {
143
151
  key: 0,
144
- class: d(l(n)("list-item-close")),
145
- onClick: y((G) => w(i.key), ["stop"])
152
+ class: d(l(a)("list-item-close")),
153
+ onClick: K((G) => b(o.key), ["stop"])
146
154
  }, [
147
- v(e.$slots, "close-icon", {}, () => [
148
- I(l(X))
155
+ g(e.$slots, "close-icon", {}, () => [
156
+ O(l(X))
149
157
  ])
150
- ], 10, se)) : f("", !0),
151
- h("div", ie, [
152
- v(e.$slots, "label", { option: i }, () => [
153
- O(g(i.label), 1)
158
+ ], 10, se)) : v("", !0),
159
+ h("div", oe, [
160
+ g(e.$slots, "label", { option: o }, () => [
161
+ m(p(o.label), 1)
154
162
  ])
155
163
  ]),
156
- h("div", oe, [
157
- v(e.$slots, "value", { option: i }, () => [
158
- O(g(i.value), 1)
164
+ h("div", ie, [
165
+ g(e.$slots, "value", { option: o }, () => [
166
+ m(p(o.value), 1)
159
167
  ])
160
168
  ])
161
169
  ], 14, le))), 128)),
162
- e.showAddButton && (!e.maxSelected || e.selectedKeys.length < e.maxSelected) ? (c(), u("div", {
170
+ e.showAddButton && (!e.maxSelected || e.selectedKeys.length < e.maxSelected) ? (r(), u("div", {
163
171
  key: 0,
164
- class: d([l(n)("list-item"), "choose"]),
165
- style: $({
166
- minHeight: p.value ? `${(B = (a = p.value) == null ? void 0 : a[0]) != null && B.offsetHeight ? `${(F = (V = p.value) == null ? void 0 : V[0]) == null ? void 0 : F.offsetHeight}px` : "auto"}` : "auto"
172
+ class: d([l(a)("list-item"), "choose"]),
173
+ style: I({
174
+ minHeight: f.value ? `${(B = (i = f.value) == null ? void 0 : i[0]) != null && B.offsetHeight ? `${(F = (V = f.value) == null ? void 0 : V[0]) == null ? void 0 : F.offsetHeight}px` : "auto"}` : "auto"
167
175
  }),
168
- onClick: s[0] || (s[0] = y((i) => m.value = !0, ["stop"]))
176
+ onClick: s[0] || (s[0] = K((o) => y.value = !0, ["stop"]))
169
177
  }, [
170
- v(e.$slots, "add-button", {}, () => [
171
- I(l(W)),
172
- h("span", ne, g(e.addButtonText), 1)
178
+ g(e.$slots, "add-button", {}, () => [
179
+ O(l(W)),
180
+ h("span", ne, p(e.addButtonText), 1)
173
181
  ])
174
- ], 6)) : f("", !0)
182
+ ], 6)) : v("", !0)
175
183
  ], 2)
176
184
  ];
177
185
  }),
@@ -1,2 +1,2 @@
1
- declare const _default: "6.24.2";
1
+ declare const _default: "6.25.0";
2
2
  export default _default;
@@ -1,4 +1,4 @@
1
- const e = "6.24.2";
1
+ const e = "6.25.0";
2
2
  export {
3
3
  e as default
4
4
  };
@@ -151,7 +151,6 @@ export type ApFormListProps = {
151
151
  initialValue?: any[];
152
152
  transform?: ApFormItemTransformType;
153
153
  };
154
- type AllowCountPerRowType = 1 | 2 | 3 | 4 | 6 | 8 | 12 | 24;
155
154
  export type ApFormSearchFormProps = ApFormProps & {
156
155
  collapse?: boolean;
157
156
  defaultCollapse?: boolean;
@@ -163,7 +162,7 @@ export type ApFormSearchFormProps = ApFormProps & {
163
162
  customReset?: boolean;
164
163
  extraInAction?: boolean;
165
164
  forceExpand?: boolean;
166
- countPerRow?: AllowCountPerRowType;
165
+ countPerRow?: number;
167
166
  submitLoading?: boolean;
168
167
  /**
169
168
  * 最大显示的行(超出后将会收起进入更多筛选)
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),a=require("@vueuse/core"),m=require("lodash-unified"),s=[1,2,3,4,6,8,12,24],w={xs:0,sm:768,md:1280,lg:1728},P=Object.entries(w).sort((e,o)=>o[1]-e[1]),l=e=>{const o=r.ref(0);r.watchEffect(t=>{const n=m.isUndefined(e.resizeTarget)?document.documentElement:e.resizeTarget,{stop:c}=a.useResizeObserver(n,i=>{const d=i[0],{width:f}=d.contentRect;o.value=f});t(()=>{c()})},{flush:"post"});const u=r.computed(()=>{for(const[t,n]of P)if(r.unref(o)>n)return t;return"md"});return r.computed(()=>{const t=s.findIndex(c=>c===e.countPerRow),n=r.unref(u);return n==="lg"?s[t+1]||e.countPerRow:n==="xs"&&s[t-1]||e.countPerRow})};exports.useCountPerRow=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),d=require("@vueuse/core"),m=require("lodash-unified"),f={xs:0,sm:768,md:1280,lg:1728},l=Object.entries(f).sort((t,s)=>s[1]-t[1]),w=t=>{const s=n.ref(0);n.watchEffect(e=>{const o=m.isUndefined(t.resizeTarget)?document.documentElement:t.resizeTarget,{stop:c}=d.useResizeObserver(o,u=>{const i=u[0],{width:a}=i.contentRect;s.value=a});e(()=>{c()})},{flush:"post"});const r=n.computed(()=>{for(const[e,o]of l)if(n.unref(s)>o)return e;return"md"});return n.computed(()=>{const e=t.countPerRow,o={xs:e-2,sm:e-1,md:e,lg:e+1};return Math.max(1,o[r.value])})};exports.useCountPerRow=w;
@@ -414,7 +414,10 @@ declare function __VLS_template(): {
414
414
  default: string | number | ColSize;
415
415
  };
416
416
  xl: {
417
- type: PropType<string | number | ColSize>;
417
+ type: PropType<string | number | **
418
+ *最后一行剩余的空间
419
+ tips: 如果有小数,则其包含误差, 会比实际值更大
420
+ */).ColSize>;
418
421
  default: string | number | ColSize;
419
422
  };
420
423
  xxl: {
@@ -851,7 +854,7 @@ declare const __VLS_component: DefineComponent<ApFormSearchFormProps, {
851
854
  validateTrigger: string | string[];
852
855
  hideRequiredMark: boolean;
853
856
  validateOnRuleChange: boolean;
854
- countPerRow: 1 | 2 | 3 | 4 | 6 | 8 | 12 | 24;
857
+ countPerRow: number;
855
858
  defaultCollapse: boolean;
856
859
  customReset: boolean;
857
860
  extraInAction: boolean;
@@ -1253,7 +1256,10 @@ declare const __VLS_component: DefineComponent<ApFormSearchFormProps, {
1253
1256
  default: string | number | ColSize;
1254
1257
  };
1255
1258
  xl: {
1256
- type: PropType<string | number | ColSize>;
1259
+ type: PropType<string | number | **
1260
+ *最后一行剩余的空间
1261
+ tips: 如果有小数,则其包含误差, 会比实际值更大
1262
+ */).ColSize>;
1257
1263
  default: string | number | ColSize;
1258
1264
  };
1259
1265
  xxl: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("@aplus-frontend/antdv");require("../ap-form.vue.js");require("../item/index.vue2.js");const T=require("../item-group/helper.js");require("../../config-provider/index.js");const w=require("lodash-unified"),P=require("../../utils/index.js"),S=require("./utils.js");require("./components/popover-filter.vue.js");const G=require("./hooks/use-count-per-row.js");require("./components/popover-sorter/index.vue.js");const J=require("./hooks/use-sorter.js"),K=require("./hooks/use-collapse-input-count.js"),Q=require("../../config-provider/hooks/use-namespace.js"),X=require("../../config-provider/hooks/use-locale.js"),E=require("../item/index.vue.js"),Y=require("./components/popover-filter.vue2.js"),Z=require("./components/popover-sorter/index.vue2.js"),ee=require("../ap-form.vue2.js");function te(p){return typeof p=="function"||Object.prototype.toString.call(p)==="[object Object]"&&!e.isVNode(p)}const s=24,oe=e.defineComponent({name:"ApFormSearchForm",__name:"index",props:{layout:{default:"horizontal"},labelCol:{},wrapperCol:{},colon:{type:Boolean,default:!0},labelAlign:{default:"right"},labelWrap:{type:Boolean},prefixCls:{},requiredMark:{},hideRequiredMark:{type:Boolean,default:!1},rules:{},validateMessages:{},validateOnRuleChange:{type:Boolean,default:!0},scrollToFirstError:{},onSubmit:{},name:{},validateTrigger:{default:"change"},size:{},disabled:{type:Boolean},onFieldsChange:{},onFinish:{},onFinishFailed:{},onValidate:{},initialValues:{},onValuesChange:{},syncToUrl:{type:[Boolean,Function]},syncToUrlPriority:{type:Boolean},collapse:{type:Boolean,default:void 0},defaultCollapse:{type:Boolean,default:!0},"onUpdate:collapse":{},searchText:{},resetText:{},onReset:{},customReset:{type:Boolean,default:!1},extraInAction:{type:Boolean,default:!1},forceExpand:{type:Boolean,default:!1},countPerRow:{default:4},submitLoading:{type:Boolean},maxRows:{default:2},sortable:{type:Boolean,default:!0},resizeTarget:{},loadingDelay:{default:300}},setup(p,{expose:O}){var q;const u=e.useSlots(),o=p,{b:f}=Q.useNamespace("ap-form-search-form"),{t:B}=X.useLocale(),D=G.useCountPerRow(o),g=e.ref(),L=e.ref();function F(){var a;const t=(a=g.value)==null?void 0:a.getFieldsValueTransformed(!0);S.execFunc(o.onSubmit,t)}function j(){var t,a;o.customReset||(a=(t=g.value)==null?void 0:t.resetFields)==null||a.call(t),S.execFunc(o.onReset)}const M=t=>P.isDef(t)?(w.isArray(t)?t:[t]).join(""):Date.now();let R=[];const m=e.shallowRef(T.genRealChildren(u.default())),i=e.shallowRef((q=u.extra)==null?void 0:q.call(u)),b=e.computed(()=>Math.floor(s/e.unref(D))),{items:y,sorted:k,handleClickConfirm:v}=J.useSorter(m);e.watch(()=>u.default(),t=>{R=m.value,m.value=S.diffFormItem(R,T.genRealChildren(t)),k.value=!1}),e.watch(()=>{var t;return(t=u.extra)==null?void 0:t.call(u)},t=>{i.value=t});const n=e.computed(()=>{const t=m.value,a=[],l=[],h=[],c=e.unref(b);let x=0,C=0;const z=s*o.maxRows-c*(e.unref(i)&&!o.extraInAction?2:1);t.forEach(N=>{const d=K.getTargetNode(N).props;if(w.isBoolean(d.hidden)?!!d.hidden:P.isDef(d.hidden))a.push(N);else{let _=d.span||c;const A={node:N,span:_,key:`ApFormSearchFormItem-${M(d.name)}-${d._signal}`},I=s-x%s;I<_&&(_+=I),x+=_,x>z?l.push(A):(C=x,h.push(A))}});const V=s-(C+c)%s,$=C%s<c,H=V<c?s:V;return{hideNode:e.createVNode(e.Fragment,null,[a]),nodes:h,collapseNodes:l,extraSpan:H,lastRowOnlyIncludeActionAndExtra:$}}),U=e.computed(()=>{let t;const a=n.value.collapseNodes.length||o.sortable&&m.value.length,l=e.createVNode(r.Col,{span:e.unref(b),key:"actionWrapper"},{default:()=>[e.createVNode(E.default,null,{default:()=>[e.createVNode(r.Flex,{wrap:"wrap",justify:n.value.lastRowOnlyIncludeActionAndExtra&&!(e.unref(i)&&o.extraInAction)?"flex-end":"space-between"},{default:()=>[e.createVNode(r.Flex,{gap:8,wrap:"wrap"},{default:()=>[a?e.createVNode("div",{class:f("column-setting-trigger-wrapper")},[n.value.collapseNodes.length?e.createVNode(Y.default,{onSubmit:F,config:n.value.collapseNodes,submitLoading:o.submitLoading},null):null,o.sortable&&y.value.length?e.createVNode(Z.default,{ref:"sorterIns",items:y.value,onClickConfirm:v,sorted:k.value},null):null]):null,e.createVNode(r.Button,{type:"primary",onClick:F,loading:o.submitLoading?{delay:o.loadingDelay}:!1,htmlType:"submit",class:f("action-btn")},{default:()=>[o.searchText||B("ap.apForm.search.search")]}),e.createVNode(r.Button,{onClick:j,type:"text",class:[f("action-btn"),f("action-btn-reset")]},{default:()=>[o.resetText||B("ap.apForm.search.reset")]})]}),o.extraInAction?e.unref(i):null]})]})]}),h=!o.extraInAction&&e.unref(i)?e.createVNode(r.Col,{span:n.value.extraSpan,key:"extraNode"},{default:()=>[e.createVNode(E.default,null,{default:()=>[e.createVNode(r.Flex,{justify:n.value.extraSpan===s||n.value.lastRowOnlyIncludeActionAndExtra?"start":"flex-end"},te(t=e.unref(i))?t:{default:()=>[t]})]})]}):null,c=e.createVNode(r.Col,{span:n.value.extraSpan},null);return n.value.lastRowOnlyIncludeActionAndExtra?e.createVNode(e.Fragment,null,[h||c,l]):e.createVNode(e.Fragment,null,[l,h])});function W(){var a;const t=(a=L.value)==null?void 0:a.getCachedList();v(t)}return O({apForm:e.computed(()=>e.unref(g)),getSorterItems:()=>y.value,setSorterItems:v,resetSorterItems:W}),(t,a)=>(e.openBlock(),e.createBlock(ee.default,e.mergeProps({ref_key:"apForm",ref:g,class:e.unref(f)()},e.unref(w.omit)(o,["collapse","defaultCollapse","onUpdate:collapse","searchText","resetText","onSubmit","onReset","extraInAction","forceExpand","countPerRow"])),{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value.hideNode))),e.createVNode(e.unref(r.Row),{gutter:8},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value.nodes,l=>(e.openBlock(),e.createBlock(e.unref(r.Col),{key:l.key,span:l.span},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.node)))]),_:2},1032,["span"]))),128)),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(U.value)))]),_:1})]),_:1},16,["class"]))}});exports.default=oe;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("@aplus-frontend/antdv");require("../ap-form.vue.js");require("../item/index.vue2.js");const P=require("../item-group/helper.js");require("../../config-provider/index.js");const w=require("lodash-unified"),E=require("../../utils/index.js"),F=require("./utils.js");require("./components/popover-filter.vue.js");const Q=require("./hooks/use-count-per-row.js");require("./components/popover-sorter/index.vue.js");const X=require("./hooks/use-sorter.js"),Y=require("./hooks/use-collapse-input-count.js"),O=require("@fruits-chain/utils"),Z=require("../../config-provider/hooks/use-namespace.js"),ee=require("../../config-provider/hooks/use-locale.js"),D=require("../item/index.vue.js"),te=require("./components/popover-filter.vue2.js"),oe=require("./components/popover-sorter/index.vue2.js"),ne=require("../ap-form.vue2.js");function ae(p){return typeof p=="function"||Object.prototype.toString.call(p)==="[object Object]"&&!e.isVNode(p)}const s=100,le=e.defineComponent({name:"ApFormSearchForm",__name:"index",props:{layout:{default:"horizontal"},labelCol:{},wrapperCol:{},colon:{type:Boolean,default:!0},labelAlign:{default:"right"},labelWrap:{type:Boolean},prefixCls:{},requiredMark:{},hideRequiredMark:{type:Boolean,default:!1},rules:{},validateMessages:{},validateOnRuleChange:{type:Boolean,default:!0},scrollToFirstError:{},onSubmit:{},name:{},validateTrigger:{default:"change"},size:{},disabled:{type:Boolean},onFieldsChange:{},onFinish:{},onFinishFailed:{},onValidate:{},initialValues:{},onValuesChange:{},syncToUrl:{type:[Boolean,Function]},syncToUrlPriority:{type:Boolean},collapse:{type:Boolean,default:void 0},defaultCollapse:{type:Boolean,default:!0},"onUpdate:collapse":{},searchText:{},resetText:{},onReset:{},customReset:{type:Boolean,default:!1},extraInAction:{type:Boolean,default:!1},forceExpand:{type:Boolean,default:!1},countPerRow:{default:5},submitLoading:{type:Boolean},maxRows:{default:2},sortable:{type:Boolean,default:!0},resizeTarget:{},loadingDelay:{default:300}},setup(p,{expose:L}){var V;const u=e.useSlots(),o=p,{b:f}=Z.useNamespace("ap-form-search-form"),{t:B}=ee.useLocale(),W=Q.useCountPerRow(o),g=e.ref(),j=e.ref();function R(){var n;const t=(n=g.value)==null?void 0:n.getFieldsValueTransformed(!0);F.execFunc(o.onSubmit,t)}function M(){var t,n;o.customReset||(n=(t=g.value)==null?void 0:t.resetFields)==null||n.call(t),F.execFunc(o.onReset)}const U=t=>E.isDef(t)?(w.isArray(t)?t:[t]).join(""):Date.now();let b=[];const m=e.shallowRef(P.genRealChildren(u.default())),d=e.shallowRef((V=u.extra)==null?void 0:V.call(u)),k=e.computed(()=>O.floorWith(s/e.unref(W),4)),{items:v,sorted:q,handleClickConfirm:C}=X.useSorter(m);e.watch(()=>u.default(),t=>{b=m.value,m.value=F.diffFormItem(b,P.genRealChildren(t)),q.value=!1}),e.watch(()=>{var t;return(t=u.extra)==null?void 0:t.call(u)},t=>{d.value=t});function $(t){return O.floorWith(t*(s/24),4)}const a=e.computed(()=>{const t=m.value,n=[],l=[],x=[],c=e.unref(k);console.log("_spanPerCol",c);let y=0,N=0;const G=s*o.maxRows-c*(e.unref(d)&&!o.extraInAction?2:1);t.forEach(S=>{const i=Y.getTargetNode(S).props;if(w.isBoolean(i.hidden)?!!i.hidden:E.isDef(i.hidden))n.push(S);else{let _=i.span?$(i.span):c;const I={node:S,span:_,key:`ApFormSearchFormItem-${U(i.name)}-${i._signal}`},T=s-y%s;T<_&&(_+=T),y+=_,y>G?l.push(I):(N=y,x.push(I))}});const A=s-(N+c)%s,J=Math.ceil(N)%s<c,K=A<c?s:A;return{hideNode:e.createVNode(e.Fragment,null,[n]),nodes:x,collapseNodes:l,extraSpan:K,lastRowOnlyIncludeActionAndExtra:J}}),h=t=>`${t}%`,z=e.computed(()=>{let t;const n=a.value.collapseNodes.length||o.sortable&&m.value.length,l=e.createVNode(r.Col,{flex:h(e.unref(k)),key:"actionWrapper"},{default:()=>[e.createVNode(D.default,null,{default:()=>[e.createVNode(r.Flex,{wrap:"wrap",justify:a.value.lastRowOnlyIncludeActionAndExtra&&!(e.unref(d)&&o.extraInAction)?"flex-end":"space-between"},{default:()=>[e.createVNode(r.Flex,{gap:8,wrap:"wrap"},{default:()=>[n?e.createVNode("div",{class:f("column-setting-trigger-wrapper")},[a.value.collapseNodes.length?e.createVNode(te.default,{onSubmit:R,config:a.value.collapseNodes,submitLoading:o.submitLoading},null):null,o.sortable&&v.value.length?e.createVNode(oe.default,{ref:"sorterIns",items:v.value,onClickConfirm:C,sorted:q.value},null):null]):null,e.createVNode(r.Button,{type:"primary",onClick:R,loading:o.submitLoading?{delay:o.loadingDelay}:!1,htmlType:"submit",class:f("action-btn")},{default:()=>[o.searchText||B("ap.apForm.search.search")]}),e.createVNode(r.Button,{onClick:M,type:"text",class:[f("action-btn"),f("action-btn-reset")]},{default:()=>[o.resetText||B("ap.apForm.search.reset")]})]}),o.extraInAction?e.unref(d):null]})]})]}),x=!o.extraInAction&&e.unref(d)?e.createVNode(r.Col,{flex:h(a.value.extraSpan),key:"extraNode"},{default:()=>[e.createVNode(D.default,null,{default:()=>[e.createVNode(r.Flex,{justify:a.value.extraSpan===s||a.value.lastRowOnlyIncludeActionAndExtra?"start":"flex-end"},ae(t=e.unref(d))?t:{default:()=>[t]})]})]}):null,c=e.createVNode(r.Col,{flex:h(a.value.extraSpan)},null);return a.value.lastRowOnlyIncludeActionAndExtra?e.createVNode(e.Fragment,null,[x||c,l]):e.createVNode(e.Fragment,null,[l,x])});function H(){var n;const t=(n=j.value)==null?void 0:n.getCachedList();C(t)}return L({apForm:e.computed(()=>e.unref(g)),getSorterItems:()=>v.value,setSorterItems:C,resetSorterItems:H}),(t,n)=>(e.openBlock(),e.createBlock(ne.default,e.mergeProps({ref_key:"apForm",ref:g,class:e.unref(f)()},e.unref(w.omit)(o,["collapse","defaultCollapse","onUpdate:collapse","searchText","resetText","onSubmit","onReset","extraInAction","forceExpand","countPerRow"])),{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value.hideNode))),e.createVNode(e.unref(r.Row),{gutter:8},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value.nodes,l=>(e.openBlock(),e.createBlock(e.unref(r.Col),{key:l.key,flex:h(l.span),style:e.normalizeStyle({maxWidth:h(l.span)})},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.node)))]),_:2},1032,["flex","style"]))),128)),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(z.value)))]),_:1})]),_:1},16,["class"]))}});exports.default=le;
@@ -21,9 +21,9 @@ declare const __VLS_component: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}
21
21
  gutter: ApProCardGutter | ApProCardGutter[];
22
22
  ghost: boolean;
23
23
  bordered: boolean;
24
+ collapsible: boolean;
24
25
  headerBordered: boolean;
25
26
  hoverable: boolean;
26
- collapsible: boolean;
27
27
  defaultCollapsed: boolean;
28
28
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
29
29
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -8,6 +8,7 @@ declare function __VLS_template(): {
8
8
  };
9
9
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
10
  declare const __VLS_component: DefineComponent<ApProCardStatisticProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApProCardStatisticProps> & Readonly<{}>, {
11
+ size: "default" | "small";
11
12
  title: string | number | boolean | void | VNode<RendererNode, RendererElement, {
12
13
  [key: string]: any;
13
14
  }> | (string | number | boolean | void | VNode<RendererNode, RendererElement, {
@@ -15,7 +16,7 @@ declare const __VLS_component: DefineComponent<ApProCardStatisticProps, {}, {},
15
16
  }> | null | undefined)[] | VNode<RendererNode, RendererElement, {
16
17
  [key: string]: any;
17
18
  }> | null;
18
- layout: "horizontal" | "vertical" | "inline";
19
+ layout: "horizontal" | "vertical" | "vertical-center" | "inline";
19
20
  icon: string | number | boolean | void | VNodeArrayChildren | VNode<RendererNode, RendererElement, {
20
21
  [key: string]: any;
21
22
  }> | null;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),S=require("@ant-design/icons-vue"),i=require("@aplus-frontend/antdv"),b=require("lodash-unified");require("../../../config-provider/index.js");const s=require("../../../editable-table/utils.js"),V=require("../../../config-provider/hooks/use-namespace.js"),M=e.defineComponent({name:"ApProCardStatistic",__name:"index",props:{prefixCls:{},decimalSeparator:{},groupSeparator:{},format:{},value:{},valueStyle:{},valueRender:{},formatter:{type:[Boolean,String,Function]},precision:{},prefix:{type:[Object,String,Number,Boolean,null,Array],default:void 0},suffix:{type:[Object,String,Number,Boolean,null,Array],default:void 0},title:{type:[Object,String,Number,Boolean,null,Array],default:void 0},loading:{type:Boolean},description:{type:[Object,String,Number,Boolean,null,Array],default:void 0},tip:{type:[Object,String,Number,Boolean,null,Array],default:void 0},status:{default:void 0},icon:{type:[Object,String,Number,Boolean,null,Array],default:void 0},layout:{default:"inline"},trend:{default:void 0}},setup(p){const n=e.useSlots(),o=p,{b:r}=V.useNamespace("pro-card-statistic"),f=e.computed(()=>r()),m=e.computed(()=>r("tip")),v=e.computed(()=>{const t=r();return s.mergeClass(`${t}-trend-icon`,[o.trend?`${t}-trend-icon-${o.trend}`:void 0].filter(Boolean))}),y=e.computed(()=>r("status")),C=e.computed(()=>r("icon")),B=e.computed(()=>r("wrapper")),x=e.computed(()=>r("content")),k=e.computed(()=>{const t=r();return s.mergeClass(`${t}-layout`,[o.layout?`${t}-layout-${o.layout}`:void 0,o.trend?`${t}-trend-${o.trend}`:void 0].filter(Boolean))}),N=e.computed(()=>r("description")),u=e.computed(()=>{var t;return o.tip||n.tip?e.createVNode(i.Tooltip,{title:o.tip??((t=n.tip)==null?void 0:t.call(n))},{default:()=>[e.createVNode(S.QuestionCircleOutlined,{class:m.value},null)]}):void 0}),c=e.computed(()=>o.trend?e.createVNode("div",{class:v.value},null):void 0),g=e.computed(()=>o.status?e.createVNode(i.Badge,{class:y.value,status:o.status},null):void 0),D=e.computed(()=>{var t;return o.icon||n.icon?e.createVNode("div",{class:C.value},[o.icon??((t=n.icon)==null?void 0:t.call(n))]):void 0}),l=e.computed(()=>{var t;return o.title||n.title?e.createVNode(e.Fragment,null,[o.title||((t=n.title)==null?void 0:t.call(n))]):void 0}),a=e.computed(()=>{var t;return o.prefix||n.prefix?e.createVNode(e.Fragment,null,[o.prefix||((t=n.prefix)==null?void 0:t.call(n))]):void 0}),d=e.computed(()=>{var t;return o.suffix||n.suffix?e.createVNode(e.Fragment,null,[o.suffix||((t=n.suffix)==null?void 0:t.call(n))]):void 0}),O=e.computed(()=>{var t;return o.description||n.description?e.createVNode("div",{class:N.value},[o.description||((t=n.description)==null?void 0:t.call(n))]):void 0});return(t,$)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({...t.$attrs},{class:f.value}),[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(D.value))),e.createElementVNode("div",{class:e.normalizeClass(B.value)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g.value))),e.createElementVNode("div",{class:e.normalizeClass(x.value)},[e.createVNode(e.unref(i.Statistic),e.mergeProps({class:k.value},{...e.unref(b.omit)(o,["title","prefix"])}),e.createSlots({_:2},[l.value||u.value?{name:"title",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value))),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.value)))]),key:"0"}:void 0,c.value||a.value?{name:"prefix",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.value))),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value)))]),key:"1"}:void 0,d.value?{name:"suffix",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.value)))]),key:"2"}:void 0]),1040,["class"]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(O.value)))],2)],2)],16))}});exports.default=M;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),S=require("@ant-design/icons-vue"),i=require("@aplus-frontend/antdv"),b=require("lodash-unified");require("../../../config-provider/index.js");const l=require("../../../editable-table/utils.js"),V=require("../../../config-provider/hooks/use-namespace.js"),$=e.defineComponent({name:"ApProCardStatistic",__name:"index",props:{prefixCls:{},decimalSeparator:{},groupSeparator:{},format:{},value:{},valueStyle:{},valueRender:{},formatter:{type:[Boolean,String,Function]},precision:{},prefix:{type:[Object,String,Number,Boolean,null,Array],default:void 0},suffix:{type:[Object,String,Number,Boolean,null,Array],default:void 0},title:{type:[Object,String,Number,Boolean,null,Array],default:void 0},loading:{type:Boolean},description:{type:[Object,String,Number,Boolean,null,Array],default:void 0},tip:{type:[Object,String,Number,Boolean,null,Array],default:void 0},status:{default:void 0},icon:{type:[Object,String,Number,Boolean,null,Array],default:void 0},layout:{default:"inline"},trend:{default:void 0},size:{default:"default"}},setup(p){const n=e.useSlots(),o=p,{b:r}=V.useNamespace("pro-card-statistic"),f=e.computed(()=>{const t=r();return l.mergeClass(`${t}`,[o.size?`${t}-size-${o.size}`:void 0].filter(Boolean))}),m=e.computed(()=>r("tip")),v=e.computed(()=>{const t=r();return l.mergeClass(`${t}-trend-icon`,[o.trend?`${t}-trend-icon-${o.trend}`:void 0].filter(Boolean))}),y=e.computed(()=>r("status")),C=e.computed(()=>r("icon")),B=e.computed(()=>r("wrapper")),x=e.computed(()=>r("content")),k=e.computed(()=>{const t=r();return l.mergeClass(`${t}-layout`,[o.layout?`${t}-layout-${o.layout}`:void 0,o.trend?`${t}-trend-${o.trend}`:void 0].filter(Boolean))}),g=e.computed(()=>r("description")),u=e.computed(()=>{var t;return o.tip||n.tip?e.createVNode(i.Tooltip,{title:o.tip??((t=n.tip)==null?void 0:t.call(n))},{default:()=>[e.createVNode(S.QuestionCircleOutlined,{class:m.value},null)]}):void 0}),a=e.computed(()=>o.trend?e.createVNode("div",{class:v.value},null):void 0),N=e.computed(()=>o.status?e.createVNode(i.Badge,{class:y.value,status:o.status},null):void 0),D=e.computed(()=>{var t;return o.icon||n.icon?e.createVNode("div",{class:C.value},[o.icon??((t=n.icon)==null?void 0:t.call(n))]):void 0}),c=e.computed(()=>{var t;return o.title||n.title?e.createVNode(e.Fragment,null,[o.title||((t=n.title)==null?void 0:t.call(n))]):void 0}),d=e.computed(()=>{var t;return o.prefix||n.prefix?e.createVNode(e.Fragment,null,[o.prefix||((t=n.prefix)==null?void 0:t.call(n))]):void 0}),s=e.computed(()=>{var t;return o.suffix||n.suffix?e.createVNode(e.Fragment,null,[o.suffix||((t=n.suffix)==null?void 0:t.call(n))]):void 0}),O=e.computed(()=>{var t;return o.description||n.description?e.createVNode("div",{class:g.value},[o.description||((t=n.description)==null?void 0:t.call(n))]):void 0});return(t,M)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({...t.$attrs},{class:f.value}),[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(D.value))),e.createElementVNode("div",{class:e.normalizeClass(B.value)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N.value))),e.createElementVNode("div",{class:e.normalizeClass(x.value)},[e.createVNode(e.unref(i.Statistic),e.mergeProps({class:k.value},{...e.unref(b.omit)(o,["title","prefix"])}),e.createSlots({_:2},[c.value||u.value?{name:"title",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.value))),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.value)))]),key:"0"}:void 0,a.value||d.value?{name:"prefix",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value))),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.value)))]),key:"1"}:void 0,s.value?{name:"suffix",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value)))]),key:"2"}:void 0]),1040,["class"]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(O.value)))],2)],2)],16))}});exports.default=$;
@@ -79,9 +79,11 @@ export type ApProCardStatisticProps = StatisticProps & {
79
79
  /** Icon 图标 */
80
80
  icon?: VNodeChild;
81
81
  /** Layout 布局 */
82
- layout?: 'horizontal' | 'vertical' | 'inline';
82
+ layout?: 'horizontal' | 'vertical' | 'vertical-center' | 'inline';
83
83
  /** 趋势 */
84
84
  trend?: 'up' | 'down';
85
+ /** 尺寸 */
86
+ size?: 'default' | 'small';
85
87
  };
86
88
  export type ApProCardStatisticSolts = {
87
89
  /**
@@ -22,6 +22,12 @@ declare const _default: <T extends Record<string, any> = Record<string, any>>(__
22
22
  }>): void;
23
23
  attrs: any;
24
24
  slots: {
25
+ 'popover-label'?(_: {
26
+ option: ApValueSelectCardOption<T>;
27
+ }): any;
28
+ 'popover-value'?(_: {
29
+ option: ApValueSelectCardOption<T>;
30
+ }): any;
25
31
  'close-icon'?(_: {}): any;
26
32
  label?(_: {
27
33
  option: ApValueSelectCardOption<T>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),z=require("@aplus-frontend/antdv"),T=require("@ant-design/icons-vue"),$=require("@aplus-frontend/icon");require("../../config-provider/index.js");const I=require("../../config-provider/hooks/use-namespace.js"),O=require("../../config-provider/hooks/use-global-config.js"),D=["onClick"],M={class:"label"},q={class:"value"},H=["onClick"],A=["onClick"],F={class:"label"},_={class:"value"},R={class:"text"},P=e.defineComponent({name:"ApValueSelectCard",__name:"index",props:{options:{},selectedKeys:{default:()=>[]},highlightedKeys:{default:()=>[]},maxSelected:{default:4},maxRowDisplay:{default:4},popoverTitle:{default:""},showTitleIcon:{type:Boolean,default:!0},showCloseIcon:{type:Boolean,default:!0},showAddButton:{type:Boolean,default:!0},addButtonText:{default:""},getContainer:{type:Function,default:u=>u.parentElement||document.body},getCardStyle:{type:Function,default:()=>({})},wrapperStyle:{type:[Boolean,null,String,Object,Array]}},emits:["update:selectedKeys","update:highlightedKeys","change","select","remove","highlight"],setup(u,{expose:B,emit:w}){const n=w,l=u,{b:i,m:N}=I.useNamespace("ap-value-select-card"),V=O.useGlobalConfig("uiMode","aplus"),c=e.ref(null),d=e.ref(!1),h=e.computed(()=>l.options),g=e.computed(()=>h.value.filter(t=>l.selectedKeys.includes(t.key))),v=t=>l.selectedKeys.includes(t),m=t=>l.highlightedKeys.includes(t),C=t=>{l.selectedKeys.includes(t)?p(t):k(t)},k=t=>{if(l.maxSelected&&l.selectedKeys.length>=l.maxSelected)return;const s=[...l.selectedKeys,t];n("update:selectedKeys",s),n("change",s),n("select",t),l.highlightedKeys.includes(t)||f(t)},p=t=>{if(l.selectedKeys.length<=1||l.highlightedKeys.length<=1&&l.highlightedKeys.includes(t))return;const s=l.selectedKeys.filter(r=>r!==t);if(n("update:selectedKeys",s),n("change",s),n("remove",t),l.highlightedKeys.includes(t)){const r=l.highlightedKeys.filter(a=>a!==t);n("update:highlightedKeys",r),n("highlight",r)}},f=t=>{let s;if(l.highlightedKeys.includes(t))if(l.highlightedKeys.length>1)s=l.highlightedKeys.filter(r=>r!==t);else return;else s=[...l.highlightedKeys,t];n("update:highlightedKeys",s),n("highlight",s)},E=t=>{t||(d.value=t)};return B({popoverVisible:d,allOptions:h,selectedOptions:g,isSelected:v,isHighlighted:m,toggleOption:C,addOption:k,removeOption:p,highlightOption:f}),(t,s)=>{const r=e.resolveComponent("InfoCircleFilled");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(i)(),`${e.unref(N)(e.unref(V))}`]),style:e.normalizeStyle({...t.wrapperStyle,"--ap-value-select-card-column-count":t.maxRowDisplay})},[e.createVNode(e.unref(z.Popover),{open:d.value,trigger:"click",placement:"bottomRight",arrow:!1,"get-popup-container":t.getContainer,onOpenChange:E},{content:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(e.unref(i)("popover"))},[t.popoverTitle?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(i)("title"))},[t.showTitleIcon?(e.openBlock(),e.createBlock(r,{key:0,class:e.normalizeClass(e.unref(i)("title-icon"))},null,8,["class"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.popoverTitle),1)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(i)("list"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,a=>(e.openBlock(),e.createElementBlock("div",{key:a.key,class:e.normalizeClass([e.unref(i)("list-item"),"all",{select:v(a.key),disabled:t.maxSelected&&t.selectedKeys.length>=t.maxSelected}]),onClick:e.withModifiers(y=>C(a.key),["stop"])},[e.createElementVNode("div",M,e.toDisplayString(a.label),1),e.createElementVNode("div",q,e.toDisplayString(a.value),1)],10,D))),128))],2)],2)]),default:e.withCtx(()=>{var a,y,S,K;return[e.createElementVNode("div",{class:e.normalizeClass(e.unref(i)("list"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,o=>(e.openBlock(),e.createElementBlock("div",{key:o.key,ref_for:!0,ref_key:"listItemRef",ref:c,class:e.normalizeClass([e.unref(i)("list-item"),{select:m(o.key),custom:o.customClass},o.customClass]),style:e.normalizeStyle(t.getCardStyle(o.key)),onClick:e.withModifiers(b=>f(o.key),["stop"])},[t.showCloseIcon&&(!(t.highlightedKeys.length===1&&m(o.key))&&g.value.length>1)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(i)("list-item-close")),onClick:e.withModifiers(b=>p(o.key),["stop"])},[e.renderSlot(t.$slots,"close-icon",{},()=>[e.createVNode(e.unref($.IconApAdLinePoor))])],10,A)):e.createCommentVNode("",!0),e.createElementVNode("div",F,[e.renderSlot(t.$slots,"label",{option:o},()=>[e.createTextVNode(e.toDisplayString(o.label),1)])]),e.createElementVNode("div",_,[e.renderSlot(t.$slots,"value",{option:o},()=>[e.createTextVNode(e.toDisplayString(o.value),1)])])],14,H))),128)),t.showAddButton&&(!t.maxSelected||t.selectedKeys.length<t.maxSelected)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(i)("list-item"),"choose"]),style:e.normalizeStyle({minHeight:c.value?`${(y=(a=c.value)==null?void 0:a[0])!=null&&y.offsetHeight?`${(K=(S=c.value)==null?void 0:S[0])==null?void 0:K.offsetHeight}px`:"auto"}`:"auto"}),onClick:s[0]||(s[0]=e.withModifiers(o=>d.value=!0,["stop"]))},[e.renderSlot(t.$slots,"add-button",{},()=>[e.createVNode(e.unref(T.PlusOutlined)),e.createElementVNode("span",R,e.toDisplayString(t.addButtonText),1)])],6)):e.createCommentVNode("",!0)],2)]}),_:3},8,["open","get-popup-container"])],6)}}});exports.default=P;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),z=require("@aplus-frontend/antdv"),T=require("@ant-design/icons-vue"),$=require("@aplus-frontend/icon");require("../../config-provider/index.js");const I=require("../../config-provider/hooks/use-namespace.js"),O=require("../../config-provider/hooks/use-global-config.js"),D=["onClick"],M={class:"label"},q={class:"value"},H=["onClick"],A=["onClick"],F={class:"label"},R={class:"value"},P={class:"text"},_=e.defineComponent({name:"ApValueSelectCard",__name:"index",props:{options:{},selectedKeys:{default:()=>[]},highlightedKeys:{default:()=>[]},maxSelected:{default:4},maxRowDisplay:{default:4},popoverTitle:{default:""},showTitleIcon:{type:Boolean,default:!0},showCloseIcon:{type:Boolean,default:!0},showAddButton:{type:Boolean,default:!0},addButtonText:{default:""},getContainer:{type:Function,default:u=>u.parentElement||document.body},getCardStyle:{type:Function,default:()=>({})},wrapperStyle:{type:[Boolean,null,String,Object,Array]}},emits:["update:selectedKeys","update:highlightedKeys","change","select","remove","highlight"],setup(u,{expose:B,emit:N}){const i=N,l=u,{b:r,m:V}=I.useNamespace("ap-value-select-card"),w=O.useGlobalConfig("uiMode","aplus"),c=e.ref(null),d=e.ref(!1),h=e.computed(()=>l.options),g=e.computed(()=>h.value.filter(t=>l.selectedKeys.includes(t.key))),v=t=>l.selectedKeys.includes(t),m=t=>l.highlightedKeys.includes(t),C=t=>{l.selectedKeys.includes(t)?p(t):S(t)},S=t=>{if(l.maxSelected&&l.selectedKeys.length>=l.maxSelected)return;const s=[...l.selectedKeys,t];i("update:selectedKeys",s),i("change",s),i("select",t),l.highlightedKeys.includes(t)||f(t)},p=t=>{if(l.selectedKeys.length<=1||l.highlightedKeys.length<=1&&l.highlightedKeys.includes(t))return;const s=l.selectedKeys.filter(a=>a!==t);if(i("update:selectedKeys",s),i("change",s),i("remove",t),l.highlightedKeys.includes(t)){const a=l.highlightedKeys.filter(n=>n!==t);i("update:highlightedKeys",a),i("highlight",a)}},f=t=>{let s;if(l.highlightedKeys.includes(t))if(l.highlightedKeys.length>1)s=l.highlightedKeys.filter(a=>a!==t);else return;else s=[...l.highlightedKeys,t];i("update:highlightedKeys",s),i("highlight",s)},E=t=>{t||(d.value=t)};return B({popoverVisible:d,allOptions:h,selectedOptions:g,isSelected:v,isHighlighted:m,toggleOption:C,addOption:S,removeOption:p,highlightOption:f}),(t,s)=>{const a=e.resolveComponent("InfoCircleFilled");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(r)(),`${e.unref(V)(e.unref(w))}`]),style:e.normalizeStyle({...t.wrapperStyle,"--ap-value-select-card-column-count":t.maxRowDisplay})},[e.createVNode(e.unref(z.Popover),{open:d.value,trigger:"click",placement:"bottomRight",arrow:!1,"get-popup-container":t.getContainer,onOpenChange:E},{content:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(e.unref(r)("popover"))},[t.popoverTitle?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(r)("title"))},[t.showTitleIcon?(e.openBlock(),e.createBlock(a,{key:0,class:e.normalizeClass(e.unref(r)("title-icon"))},null,8,["class"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.popoverTitle),1)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(r)("list"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,n=>(e.openBlock(),e.createElementBlock("div",{key:n.key,class:e.normalizeClass([e.unref(r)("list-item"),"all",{select:v(n.key),disabled:t.maxSelected&&t.selectedKeys.length>=t.maxSelected}]),onClick:e.withModifiers(y=>C(n.key),["stop"])},[e.createElementVNode("div",M,[e.renderSlot(t.$slots,"popover-label",{option:n},()=>[e.createTextVNode(e.toDisplayString(n.label),1)])]),e.createElementVNode("div",q,[e.renderSlot(t.$slots,"popover-value",{option:n},()=>[e.createTextVNode(e.toDisplayString(n.value),1)])])],10,D))),128))],2)],2)]),default:e.withCtx(()=>{var n,y,k,K;return[e.createElementVNode("div",{class:e.normalizeClass(e.unref(r)("list"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,o=>(e.openBlock(),e.createElementBlock("div",{key:o.key,ref_for:!0,ref_key:"listItemRef",ref:c,class:e.normalizeClass([e.unref(r)("list-item"),{select:m(o.key),custom:o.customClass},o.customClass]),style:e.normalizeStyle(t.getCardStyle(o.key)),onClick:e.withModifiers(b=>f(o.key),["stop"])},[t.showCloseIcon&&(!(t.highlightedKeys.length===1&&m(o.key))&&g.value.length>1)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(r)("list-item-close")),onClick:e.withModifiers(b=>p(o.key),["stop"])},[e.renderSlot(t.$slots,"close-icon",{},()=>[e.createVNode(e.unref($.IconApAdLinePoor))])],10,A)):e.createCommentVNode("",!0),e.createElementVNode("div",F,[e.renderSlot(t.$slots,"label",{option:o},()=>[e.createTextVNode(e.toDisplayString(o.label),1)])]),e.createElementVNode("div",R,[e.renderSlot(t.$slots,"value",{option:o},()=>[e.createTextVNode(e.toDisplayString(o.value),1)])])],14,H))),128)),t.showAddButton&&(!t.maxSelected||t.selectedKeys.length<t.maxSelected)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(r)("list-item"),"choose"]),style:e.normalizeStyle({minHeight:c.value?`${(y=(n=c.value)==null?void 0:n[0])!=null&&y.offsetHeight?`${(K=(k=c.value)==null?void 0:k[0])==null?void 0:K.offsetHeight}px`:"auto"}`:"auto"}),onClick:s[0]||(s[0]=e.withModifiers(o=>d.value=!0,["stop"]))},[e.renderSlot(t.$slots,"add-button",{},()=>[e.createVNode(e.unref(T.PlusOutlined)),e.createElementVNode("span",P,e.toDisplayString(t.addButtonText),1)])],6)):e.createCommentVNode("",!0)],2)]}),_:3},8,["open","get-popup-container"])],6)}}});exports.default=_;
@@ -1,2 +1,2 @@
1
- declare const _default: "6.24.2";
1
+ declare const _default: "6.25.0";
2
2
  export default _default;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="6.24.2";exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="6.25.0";exports.default=e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aplus-frontend/ui",
3
- "version": "6.24.2",
3
+ "version": "6.25.0",
4
4
  "main": "./lib/index.js",
5
5
  "type": "module",
6
6
  "files": [
@@ -37,18 +37,18 @@
37
37
  "scroll-into-view-if-needed": "^3.1.0",
38
38
  "vue-virtual-scroller": "2.0.0-beta.8",
39
39
  "vuedraggable": "^4.1.0",
40
- "@aplus-frontend/hooks": "1.0.7",
41
- "@aplus-frontend/utils": "1.0.61"
40
+ "@aplus-frontend/utils": "1.0.61",
41
+ "@aplus-frontend/hooks": "1.0.7"
42
42
  },
43
43
  "peerDependencies": {
44
- "@aplus-frontend/antdv": "^1.2.2",
44
+ "@aplus-frontend/antdv": "^1.2.3",
45
45
  "@aplus-frontend/icon": "^1.2.6",
46
46
  "@aplus-frontend/oss": "^1.1.2",
47
47
  "vue": "^3.5.14",
48
48
  "vxe-table": "^4.13.37"
49
49
  },
50
50
  "devDependencies": {
51
- "@aplus-frontend/antdv": "^1.2.2",
51
+ "@aplus-frontend/antdv": "^1.2.3",
52
52
  "@aplus-frontend/icon": "^1.2.6",
53
53
  "@aplus-frontend/oss": "^1.1.2",
54
54
  "@types/sortablejs": "^1.15.8",
@@ -384,17 +384,11 @@
384
384
  .aplus-pro-card-statistic-content {
385
385
  width: 100%;
386
386
  }
387
- .aplus-pro-card-statistic-content .ant-statistic-content-value-int {
388
- font-size: 22px;
389
- font-weight: bold;
390
- }
391
- .aplus-pro-card-statistic-content .ant-statistic-content-value {
392
- font-size: 22px;
393
- font-weight: bold;
394
- }
395
- .aplus-pro-card-statistic-content .ant-statistic-content-value-decimal {
387
+ .aplus-pro-card-statistic-content .ant-statistic-content {
396
388
  font-size: 22px;
389
+ line-height: 24px;
397
390
  font-weight: bold;
391
+ font-family: DDinBold, OPPOSans, sans-serif;
398
392
  }
399
393
  .aplus-pro-card-statistic-description {
400
394
  width: 100%;
@@ -403,6 +397,13 @@
403
397
  color: var(--ap-text-color-1);
404
398
  font-size: 12px;
405
399
  line-height: 18px;
400
+ margin-bottom: 8px;
401
+ }
402
+ .aplus-pro-card-statistic-size-small .ant-statistic-title {
403
+ margin-bottom: 4px;
404
+ }
405
+ .aplus-pro-card-statistic-size-small .ant-statistic-content {
406
+ font-size: 16px;
406
407
  }
407
408
  .aplus-pro-card-statistic-trend-up .ant-statistic-content {
408
409
  color: var(--ap-color-error);
@@ -422,18 +423,18 @@
422
423
  }
423
424
  .aplus-pro-card-statistic .aplus-pro-card-statistic-layout-horizontal .ant-statistic-title {
424
425
  margin-block-end: 0;
426
+ color: var(--ap-text-color-3);
425
427
  }
426
- .aplus-pro-card-statistic .aplus-pro-card-statistic-layout-horizontal .ant-statistic-content-value {
428
+ .aplus-pro-card-statistic .aplus-pro-card-statistic-layout-horizontal .ant-statistic-content {
429
+ color: var(--ap-text-color-2);
430
+ font-size: 12px;
431
+ line-height: 18px;
427
432
  font-weight: 500;
428
433
  }
429
- .aplus-pro-card-statistic .aplus-pro-card-statistic-layout-horizontal .ant-statistic-title,
430
- .aplus-pro-card-statistic .aplus-pro-card-statistic-layout-horizontal .ant-statistic-content-value,
431
- .aplus-pro-card-statistic .aplus-pro-card-statistic-layout-horizontal .ant-statistic-content-value-int,
432
- .aplus-pro-card-statistic .aplus-pro-card-statistic-layout-horizontal .ant-statistic-content,
433
- .aplus-pro-card-statistic .aplus-pro-card-statistic-layout-horizontal .ant-statistic-content-suffix,
434
- .aplus-pro-card-statistic .aplus-pro-card-statistic-layout-horizontal .ant-statistic-content-prefix,
435
- .aplus-pro-card-statistic .aplus-pro-card-statistic-layout-horizontal .ant-statistic-content-value-decimal {
436
- font-size: 14px;
434
+ .aplus-pro-card-statistic .aplus-pro-card-statistic-layout-horizontal .ant-statistic-title {
435
+ font-size: 12px;
436
+ line-height: 18px;
437
+ font-weight: 500;
437
438
  }
438
439
  .aplus-pro-card-statistic .aplus-pro-card-statistic-layout-inline {
439
440
  display: inline-flex;
@@ -445,17 +446,20 @@
445
446
  }
446
447
  .aplus-pro-card-statistic .aplus-pro-card-statistic-layout-inline .ant-statistic-content {
447
448
  color: var(--ap-text-color-2);
449
+ font-size: 12px;
450
+ line-height: 18px;
451
+ font-weight: 500;
448
452
  }
449
- .aplus-pro-card-statistic .aplus-pro-card-statistic-layout-inline .ant-statistic-title,
450
- .aplus-pro-card-statistic .aplus-pro-card-statistic-layout-inline .ant-statistic-content-value,
451
- .aplus-pro-card-statistic .aplus-pro-card-statistic-layout-inline .ant-statistic-content-value-int,
452
- .aplus-pro-card-statistic .aplus-pro-card-statistic-layout-inline .ant-statistic-content,
453
- .aplus-pro-card-statistic .aplus-pro-card-statistic-layout-inline .ant-statistic-content-suffix,
454
- .aplus-pro-card-statistic .aplus-pro-card-statistic-layout-inline .ant-statistic-content-prefix,
455
- .aplus-pro-card-statistic .aplus-pro-card-statistic-layout-inline .ant-statistic-content-value-decimal {
453
+ .aplus-pro-card-statistic .aplus-pro-card-statistic-layout-inline .ant-statistic-title {
456
454
  font-size: 12px;
455
+ line-height: 18px;
457
456
  font-weight: 500;
458
457
  }
458
+ .aplus-pro-card-statistic .aplus-pro-card-statistic-layout-vertical-center {
459
+ display: flex;
460
+ flex-direction: column;
461
+ align-items: center;
462
+ }
459
463
  .aplus-statistic-card-chart {
460
464
  display: flex;
461
465
  flex-direction: column;