@aplus-frontend/ui 0.1.14 → 0.1.16

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 (73) hide show
  1. package/es/index.mjs +56 -54
  2. package/es/src/ap-table/ap-table.vue.mjs +132 -129
  3. package/es/src/ap-table/interface.d.ts +20 -13
  4. package/es/src/ap-table/utils.d.ts +8340 -1
  5. package/es/src/ap-table/utils.mjs +135 -79
  6. package/es/src/business/ap-input-radio/ApInputRadio.vue2.mjs +31 -28
  7. package/es/src/business/ap-input-radio/interface.d.ts +1 -1
  8. package/es/src/business/ap-label/style.css +3 -0
  9. package/es/src/business/ap-status/ApStatusGroup.vue2.mjs +12 -14
  10. package/es/src/business/index.d.ts +2 -2
  11. package/es/src/business/index.mjs +20 -18
  12. package/es/src/config-provider/config-provider-props.d.ts +5 -1
  13. package/es/src/config-provider/config-provider-props.mjs +4 -0
  14. package/es/src/config-provider/config-provider.d.ts +10 -1
  15. package/es/src/config-provider/config-provider.mjs +18 -17
  16. package/es/src/config-provider/constants.d.ts +6 -2
  17. package/es/src/config-provider/hooks/use-global-config.d.ts +5 -1
  18. package/es/src/config-provider/index.d.ts +20 -1
  19. package/es/src/editable-table/form-item.vue.mjs +85 -72
  20. package/es/src/editable-table/index.vue.d.ts +1 -0
  21. package/es/src/editable-table/index.vue.mjs +118 -95
  22. package/es/src/editable-table/interface.d.ts +6 -1
  23. package/es/src/editable-table/utils.mjs +31 -30
  24. package/es/src/hooks/useControllableValue.mjs +3 -0
  25. package/es/src/index.mjs +45 -43
  26. package/es/src/theme/antd-global-overwrite/admin/form.css +10 -12
  27. package/es/src/theme/antd-global-overwrite/admin/index.css +117 -45
  28. package/es/src/theme/antd-global-overwrite/admin/pagination.css +54 -16
  29. package/es/src/theme/antd-global-overwrite/admin/table.css +53 -17
  30. package/es/src/theme/antd-global-overwrite/aplus/form.css +28 -21
  31. package/es/src/theme/antd-global-overwrite/aplus/index.css +159 -74
  32. package/es/src/theme/antd-global-overwrite/aplus/pagination.css +66 -20
  33. package/es/src/theme/antd-global-overwrite/aplus/table.css +65 -33
  34. package/es/src/theme/ap-label/ap-label.css +3 -0
  35. package/es/src/utils/ap-trans-data/index.d.ts +11 -0
  36. package/es/src/utils/ap-trans-data/index.mjs +20 -0
  37. package/lib/index.js +1 -1
  38. package/lib/src/ap-table/ap-table.vue.js +1 -1
  39. package/lib/src/ap-table/interface.d.ts +20 -13
  40. package/lib/src/ap-table/utils.d.ts +8340 -1
  41. package/lib/src/ap-table/utils.js +1 -1
  42. package/lib/src/business/ap-input-radio/ApInputRadio.vue2.js +1 -1
  43. package/lib/src/business/ap-input-radio/interface.d.ts +1 -1
  44. package/lib/src/business/ap-label/style.css +3 -0
  45. package/lib/src/business/ap-status/ApStatusGroup.vue2.js +1 -1
  46. package/lib/src/business/index.d.ts +2 -2
  47. package/lib/src/business/index.js +1 -1
  48. package/lib/src/config-provider/config-provider-props.d.ts +5 -1
  49. package/lib/src/config-provider/config-provider-props.js +1 -1
  50. package/lib/src/config-provider/config-provider.d.ts +10 -1
  51. package/lib/src/config-provider/config-provider.js +1 -1
  52. package/lib/src/config-provider/constants.d.ts +6 -2
  53. package/lib/src/config-provider/hooks/use-global-config.d.ts +5 -1
  54. package/lib/src/config-provider/index.d.ts +20 -1
  55. package/lib/src/editable-table/form-item.vue.js +1 -1
  56. package/lib/src/editable-table/index.vue.d.ts +1 -0
  57. package/lib/src/editable-table/index.vue.js +1 -1
  58. package/lib/src/editable-table/interface.d.ts +6 -1
  59. package/lib/src/editable-table/utils.js +1 -1
  60. package/lib/src/hooks/useControllableValue.js +1 -1
  61. package/lib/src/index.js +1 -1
  62. package/lib/src/theme/antd-global-overwrite/admin/form.css +10 -12
  63. package/lib/src/theme/antd-global-overwrite/admin/index.css +117 -45
  64. package/lib/src/theme/antd-global-overwrite/admin/pagination.css +54 -16
  65. package/lib/src/theme/antd-global-overwrite/admin/table.css +53 -17
  66. package/lib/src/theme/antd-global-overwrite/aplus/form.css +28 -21
  67. package/lib/src/theme/antd-global-overwrite/aplus/index.css +159 -74
  68. package/lib/src/theme/antd-global-overwrite/aplus/pagination.css +66 -20
  69. package/lib/src/theme/antd-global-overwrite/aplus/table.css +65 -33
  70. package/lib/src/theme/ap-label/ap-label.css +3 -0
  71. package/lib/src/utils/ap-trans-data/index.d.ts +11 -0
  72. package/lib/src/utils/ap-trans-data/index.js +1 -0
  73. package/package.json +3 -3
@@ -1,110 +1,166 @@
1
- import { isObject as s, isArray as c, isUndefined as f, isFunction as l, omit as d, isBoolean as p } from "lodash-unified";
2
- const m = (e, t, n) => {
3
- let o = {};
4
- return s(e) ? Object.keys(e).forEach((u) => {
5
- s(e[u]) ? o[u] = m(e[u], t[u], n) : o[u] = n(e[u], t);
6
- }) : o = n(e, t), o;
7
- }, h = (e, t) => {
8
- switch (e) {
1
+ import { isVNode as m, createVNode as c, mergeProps as i, cloneVNode as p } from "vue";
2
+ import { isObject as s, isArray as l, isUndefined as d, isFunction as b, omit as T, isBoolean as y } from "lodash-unified";
3
+ import { apTableRenderItemMap as j, apTableFormItemMap as h } from "./constants.mjs";
4
+ import { isType as g } from "@fruits-chain/utils";
5
+ import "../ap-form/index.mjs";
6
+ import E from "../ap-form/ap-form-item.vue.mjs";
7
+ function F(t) {
8
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !m(t);
9
+ }
10
+ const O = (t, e, n) => {
11
+ let r = {};
12
+ return s(t) ? Object.keys(t).forEach((o) => {
13
+ s(t[o]) ? r[o] = O(t[o], e[o], n) : r[o] = n(t[o], e);
14
+ }) : r = n(t, e), r;
15
+ }, _ = (t, e) => {
16
+ switch (t) {
9
17
  case "dayjs":
10
- return t.valueOf();
18
+ return e.valueOf();
11
19
  case "dayjsRange":
12
- return t.map((n) => n.valueOf());
20
+ return e.map((n) => n.valueOf());
13
21
  case "dayjsDayRange": {
14
- const [n, o] = t;
15
- return [n.startOf("day").valueOf(), o.endOf("day").valueOf()];
22
+ const [n, r] = e;
23
+ return [n.startOf("day").valueOf(), r.endOf("day").valueOf()];
16
24
  }
17
25
  case "multiple":
18
26
  case "multipleNumber":
19
- return c(t) ? t : [t];
27
+ return l(e) ? e : [e];
20
28
  case "boolean":
21
- return t;
29
+ return e;
22
30
  case "object":
23
- return t;
31
+ return e;
24
32
  default:
25
- return t;
33
+ return e;
26
34
  }
27
35
  };
28
- function y(e) {
29
- return c(e) ? e.join(".") : e;
36
+ function C(t) {
37
+ return l(t) ? t.join(".") : t;
30
38
  }
31
- function x(e) {
32
- const t = Object.prototype.toString.call(e).match(/^\[object (.*)\]$/)[1].toLowerCase();
33
- return t === "string" && typeof e == "object" ? "object" : e === null ? "null" : e === void 0 ? "undefined" : t;
39
+ function N(t) {
40
+ const e = Object.prototype.toString.call(t).match(/^\[object (.*)\]$/)[1].toLowerCase();
41
+ return e === "string" && typeof t == "object" ? "object" : t === null ? "null" : t === void 0 ? "undefined" : e;
34
42
  }
35
- const T = (e) => x(e) === "map" ? e : new Map(Object.entries(e || {})), a = (e) => {
36
- const t = [], n = T(e);
37
- return n.forEach((o, u) => {
38
- const r = n.get(u) || n.get(`${u}`);
39
- if (r) {
40
- if (typeof r == "object" && (r != null && r.text)) {
41
- t.push({
42
- text: r == null ? void 0 : r.text,
43
- value: u,
44
- label: r == null ? void 0 : r.text,
45
- disabled: r.disabled
43
+ const S = (t) => N(t) === "map" ? t : new Map(Object.entries(t || {})), f = (t) => {
44
+ const e = [], n = S(t);
45
+ return n.forEach((r, o) => {
46
+ const u = n.get(o) || n.get(`${o}`);
47
+ if (u) {
48
+ if (typeof u == "object" && (u != null && u.text)) {
49
+ e.push({
50
+ text: u == null ? void 0 : u.text,
51
+ value: o,
52
+ label: u == null ? void 0 : u.text,
53
+ disabled: u.disabled
46
54
  });
47
55
  return;
48
56
  }
49
- t.push({
50
- text: r,
51
- label: r,
52
- value: u
57
+ e.push({
58
+ text: u,
59
+ label: u,
60
+ value: o
53
61
  });
54
62
  }
55
- }), t;
56
- }, E = (e) => f(e) || e < 0 ? 0 : e, j = (e, t, n) => {
63
+ }), e;
64
+ }, R = (t) => d(t) || t < 0 ? 0 : t, $ = (t, e, n) => {
57
65
  if (n)
58
66
  return n;
59
- const o = ["select", "date"], u = [
60
- "text",
61
- "textArea",
62
- "number"
63
- ];
64
- if (t === "dateRange")
65
- return [e("ap.common.chooseText"), e("ap.common.chooseText")];
66
- if (o.includes(t))
67
- return e("ap.common.chooseText");
68
- if (u.includes(t))
69
- return e("ap.common.inputText");
67
+ const r = ["select", "date"], o = ["text", "textArea", "number"];
68
+ if (e === "dateRange")
69
+ return [t("ap.common.chooseText"), t("ap.common.chooseText")];
70
+ if (r.includes(e))
71
+ return t("ap.common.chooseText");
72
+ if (o.includes(e))
73
+ return t("ap.common.inputText");
70
74
  };
71
- function b(e, t) {
72
- return !e || !l(e) ? e : e(t);
75
+ function x(t, e) {
76
+ return !t || !b(t) ? t : t(e);
77
+ }
78
+ function q(t) {
79
+ let e = t.valueType || "text";
80
+ return t.valueEnum && (e = "status"), e;
73
81
  }
74
- function O(e) {
75
- let t = e.valueType || "text";
76
- return e.valueEnum && (t = "status"), t;
82
+ function B(t, e, n) {
83
+ var u;
84
+ const r = j[t];
85
+ if (r)
86
+ return c(r, i(e, {
87
+ mode: "read"
88
+ }), null);
89
+ const o = n == null ? void 0 : n[t];
90
+ return ((u = o == null ? void 0 : o.render) == null ? void 0 : u.call(o, e.value, e)) || e.value;
77
91
  }
78
- function F(e, t) {
79
- const n = b(e.fieldProps, t), o = (n == null ? void 0 : n.field) || n || {}, u = e.valueType === "switch", r = e.valueType === "index", i = u ? { checked: t.value } : { value: r ? t.index + 1 : t.value };
80
- return e.valueEnum && (o.valueEnum = e.valueEnum), {
81
- ...d(o, ["request"]),
82
- ...i
92
+ function D(t, e) {
93
+ if (t.customRenderFormItem)
94
+ return () => {
95
+ const o = t.customRenderFormItem(t);
96
+ return p(o, {
97
+ ...t.fieldProps,
98
+ span: t.span,
99
+ ...o.props || {}
100
+ });
101
+ };
102
+ const n = h[t.valueType];
103
+ if (n)
104
+ return n;
105
+ const r = e == null ? void 0 : e[t.valueType];
106
+ return () => {
107
+ var u;
108
+ const o = (u = r == null ? void 0 : r.renderFormItem) == null ? void 0 : u.call(r, t.fieldProps.field);
109
+ return o ? c(E, i(t.fieldProps, {
110
+ span: t.span
111
+ }), F(o) ? o : {
112
+ default: () => [o]
113
+ }) : null;
83
114
  };
84
115
  }
85
- function v(e) {
86
- const t = { ...e };
87
- return p(e.filters) && e.filters && e.valueEnum && (t.filters = a(e.valueEnum)), t;
116
+ function J(t, e) {
117
+ const n = x(t.fieldProps, e), r = (n == null ? void 0 : n.field) || n || {}, o = t.valueType === "switch", u = t.valueType === "index", a = o ? {
118
+ checked: e.value
119
+ } : {
120
+ value: u ? e.index + 1 : e.value
121
+ };
122
+ return t.valueEnum && (r.valueEnum = t.valueEnum), {
123
+ ...T(r, ["request"]),
124
+ ...a
125
+ };
126
+ }
127
+ function L(t) {
128
+ const e = {
129
+ ...t
130
+ };
131
+ return y(t.filters) && t.filters && t.valueEnum && (e.filters = f(t.valueEnum)), e;
88
132
  }
89
- function w(e, t) {
90
- var o;
91
- const n = t || {};
92
- return e.valueEnum && !((o = n.field) != null && o.options) && (n.field = {
133
+ function U(t, e) {
134
+ var r;
135
+ const n = e || {};
136
+ return t.valueEnum && !((r = n.field) != null && r.options) && (n.field = {
93
137
  ...n.field,
94
- options: a(e.valueEnum)
138
+ options: f(t.valueEnum)
95
139
  }), n;
96
140
  }
141
+ function z(t) {
142
+ if (!g("Object")(t))
143
+ return t;
144
+ try {
145
+ return JSON.stringify(t);
146
+ } catch {
147
+ return t;
148
+ }
149
+ }
97
150
  export {
98
- v as apColumnToColumn,
99
- y as dataIndexToStr,
100
- m as formatParamsValueType,
101
- E as getColumnOrder,
102
- b as getFieldProps,
103
- j as getPlaceholder,
104
- F as getTableRenderProps,
105
- O as getTableRenderType,
106
- T as objectToMap,
107
- h as parseFieldValue,
108
- w as updateFormProps,
109
- a as valueEnumToArray
151
+ L as apColumnToColumn,
152
+ C as dataIndexToStr,
153
+ O as formatParamsValueType,
154
+ R as getColumnOrder,
155
+ x as getFieldProps,
156
+ $ as getPlaceholder,
157
+ D as getSearchFormItemRenderNode,
158
+ B as getTableCellRenderNode,
159
+ J as getTableRenderProps,
160
+ q as getTableRenderType,
161
+ S as objectToMap,
162
+ z as objectToString,
163
+ _ as parseFieldValue,
164
+ U as updateFormProps,
165
+ f as valueEnumToArray
110
166
  };
@@ -1,10 +1,10 @@
1
- import { defineComponent as d, openBlock as f, createElementBlock as v, normalizeClass as g, unref as t, createVNode as a, mergeProps as C } from "vue";
1
+ import { defineComponent as f, openBlock as g, createElementBlock as C, normalizeClass as h, unref as t, createVNode as u, mergeProps as B } from "vue";
2
2
  import "../../config-provider/index.mjs";
3
- import { Form as h, InputNumber as B, RadioGroup as I } from "ant-design-vue";
4
- import { omit as b } from "lodash-unified";
3
+ import { Form as I, InputNumber as b, RadioGroup as _ } from "ant-design-vue";
4
+ import { omit as x } from "lodash-unified";
5
5
  import "./style.css";
6
- import { useNamespace as _ } from "../../config-provider/hooks/use-namespace.mjs";
7
- const A = /* @__PURE__ */ d({
6
+ import { useNamespace as y } from "../../config-provider/hooks/use-namespace.mjs";
7
+ const G = /* @__PURE__ */ f({
8
8
  name: "ApInputRadio",
9
9
  __name: "ApInputRadio",
10
10
  props: {
@@ -29,31 +29,34 @@ const A = /* @__PURE__ */ d({
29
29
  options: {}
30
30
  },
31
31
  emits: ["update:value"],
32
- setup(r, { emit: u }) {
33
- const p = h.useInjectFormItemContext(), o = r, { b: l, e: s } = _("ap-input-radio"), i = u, n = (e) => {
34
- i("update:value", { ...o.value, ...e }), p.onFieldChange();
35
- }, m = (e) => {
36
- n({ inputval: e });
37
- }, c = (e) => {
38
- n({ radioVal: e.target.value });
32
+ setup(p, { emit: l }) {
33
+ const s = I.useInjectFormItemContext(), e = p, { b: i, e: m } = y("ap-input-radio"), c = l, n = (o) => {
34
+ c("update:value", { ...e.value, ...o }), s.onFieldChange();
35
+ }, d = (o) => {
36
+ n({ inputval: o });
37
+ }, v = (o) => {
38
+ n({ radioVal: o.target.value });
39
+ };
40
+ return (o, F) => {
41
+ var a, r;
42
+ return g(), C("div", {
43
+ class: h([t(i)()])
44
+ }, [
45
+ u(t(b), B({
46
+ class: t(m)("input-number")
47
+ }, t(x)(e, ["value", "options"]), {
48
+ value: e.value ? (a = e.value) == null ? void 0 : a.inputval : "",
49
+ onChange: d
50
+ }), null, 16, ["class", "value"]),
51
+ u(t(_), {
52
+ value: e.value ? (r = e.value) == null ? void 0 : r.radioVal : "",
53
+ options: e.options,
54
+ onChange: v
55
+ }, null, 8, ["value", "options"])
56
+ ], 2);
39
57
  };
40
- return (e, x) => (f(), v("div", {
41
- class: g([t(l)()])
42
- }, [
43
- a(t(B), C({
44
- class: t(s)("input-number")
45
- }, t(b)(o, ["value", "options"]), {
46
- value: o.value.inputval,
47
- onChange: m
48
- }), null, 16, ["class", "value"]),
49
- a(t(I), {
50
- value: o.value.radioVal,
51
- options: o.options,
52
- onChange: c
53
- }, null, 8, ["value", "options"])
54
- ], 2));
55
58
  }
56
59
  });
57
60
  export {
58
- A as default
61
+ G as default
59
62
  };
@@ -2,7 +2,7 @@ import { InputNumberProps } from 'ant-design-vue/es/input-number';
2
2
  type ApInputProps = Pick<InputNumberProps, 'disabled' | 'stringMode' | 'precision' | 'max' | 'min' | 'step' | 'bordered' | 'autofocus' | 'decimalSeparator' | 'controls' | 'formatter' | 'onInput' | 'onChange' | 'onPressEnter' | 'onStep' | 'onBlur' | 'onFocus'>;
3
3
  type ApInputValyeName = 'inputval' | 'radioVal';
4
4
  export type ApInputValType = {
5
- value: Record<ApInputValyeName, string | number>;
5
+ value?: Record<ApInputValyeName, string | number>;
6
6
  };
7
7
  export type ApInputRadioOptions = Array<{
8
8
  value: string | number;
@@ -9,6 +9,9 @@
9
9
  flex-direction: row;
10
10
  align-items: center;
11
11
  }
12
+ .aplus-ap-label__custom {
13
+ margin-top: 2px;
14
+ }
12
15
  .aplus-ap-label__custom .ant-tag {
13
16
  height: 24px;
14
17
  line-height: 24px;
@@ -1,8 +1,8 @@
1
- import { defineComponent as p, computed as d, openBlock as a, createElementBlock as r, normalizeClass as c, unref as i, normalizeStyle as o, Fragment as m, renderList as f, createBlock as g, createCommentVNode as y } from "vue";
1
+ import { defineComponent as p, computed as c, openBlock as r, createElementBlock as o, normalizeClass as d, unref as m, normalizeStyle as a, Fragment as i, renderList as f, createBlock as y, createCommentVNode as _ } from "vue";
2
2
  import "../../config-provider/index.mjs";
3
3
  import "./ApStatus.vue.mjs";
4
- import { useNamespace as _ } from "../../config-provider/hooks/use-namespace.mjs";
5
- import x from "./ApStatus.vue2.mjs";
4
+ import { useNamespace as g } from "../../config-provider/hooks/use-namespace.mjs";
5
+ import k from "./ApStatus.vue2.mjs";
6
6
  const w = /* @__PURE__ */ p({
7
7
  name: "ApStatusGroup",
8
8
  __name: "ApStatusGroup",
@@ -14,25 +14,23 @@ const w = /* @__PURE__ */ p({
14
14
  show: { type: Boolean, default: !0 }
15
15
  },
16
16
  setup(s) {
17
- const t = s, l = d(() => ({
18
- "padding-left": t.padding + "px",
19
- "padding-right": t.padding + "px",
17
+ const t = s, u = c(() => ({
20
18
  ...t.style
21
- })), { b: n } = _("ap-status-group");
22
- return (u, h) => t.statusList ? (a(), r("div", {
19
+ })), { b: l } = g("ap-status-group");
20
+ return (n, S) => t.statusList ? (r(), o("div", {
23
21
  key: 0,
24
- class: c([i(n)()]),
25
- style: o(l.value)
22
+ class: d([m(l)()]),
23
+ style: a(u.value)
26
24
  }, [
27
- (a(!0), r(m, null, f(t.statusList, (e) => (a(), g(x, {
25
+ (r(!0), o(i, null, f(t.statusList, (e) => (r(), y(k, {
28
26
  key: e.value,
29
- show: e.value === u.currentValue,
27
+ show: e.value === n.currentValue,
30
28
  color: e.color,
31
29
  text: e.text,
32
30
  padding: t.padding,
33
- style: o(t.style)
31
+ style: a(t.style)
34
32
  }, null, 8, ["show", "color", "text", "padding", "style"]))), 128))
35
- ], 6)) : y("", !0);
33
+ ], 6)) : _("", !0);
36
34
  }
37
35
  });
38
36
  export {
@@ -1,3 +1,4 @@
1
+ import { ApTransformDataHelper } from '../utils/ap-trans-data';
1
2
  import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin, CSSProperties, PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement, DefineComponent } from 'vue';
2
3
  import { TooltipPlacement } from 'ant-design-vue/es/tooltip';
3
4
  import { LiteralUnion } from 'ant-design-vue/es/_util/type';
@@ -1095,7 +1096,6 @@ export declare const ApInputRadio: DefineComponent<{
1095
1096
  };
1096
1097
  value: {
1097
1098
  type: PropType<Record<"inputval" | "radioVal", string | number>>;
1098
- required: true;
1099
1099
  };
1100
1100
  options: {
1101
1101
  type: PropType<ApInputRadioOptions>;
@@ -1166,7 +1166,6 @@ export declare const ApInputRadio: DefineComponent<{
1166
1166
  };
1167
1167
  value: {
1168
1168
  type: PropType<Record<"inputval" | "radioVal", string | number>>;
1169
- required: true;
1170
1169
  };
1171
1170
  options: {
1172
1171
  type: PropType<ApInputRadioOptions>;
@@ -1313,3 +1312,4 @@ export declare const ApLabelGroup: DefineComponent<{
1313
1312
  record: any;
1314
1313
  tagValue: string | number | undefined;
1315
1314
  }, {}>;
1315
+ export { ApTransformDataHelper };
@@ -9,25 +9,27 @@ import "./ap-select-layout/select-layout.vue.mjs";
9
9
  import "./ap-export-group/ApExportGroup.vue.mjs";
10
10
  import "./ap-input-radio/ApInputRadio.vue.mjs";
11
11
  import "./ap-batch-action/ApBatchAction.vue.mjs";
12
- import m from "./title/ApTitle.vue2.mjs";
13
- import p from "./expandAlert/ApExpandAlert.vue2.mjs";
14
- import r from "./ap-label/ApLabel.vue2.mjs";
12
+ import { ApTransformDataHelper as M } from "../utils/ap-trans-data/index.mjs";
13
+ import r from "./title/ApTitle.vue2.mjs";
14
+ import m from "./expandAlert/ApExpandAlert.vue2.mjs";
15
+ import p from "./ap-label/ApLabel.vue2.mjs";
15
16
  import i from "./ap-status/ApStatus.vue2.mjs";
16
17
  import n from "./ap-status/ApStatusGroup.vue2.mjs";
17
- import c from "./ap-select-layout/select-layout.vue2.mjs";
18
- import s from "./ap-export-group/ApExportGroup.vue2.mjs";
19
- import f from "./ap-input-radio/ApInputRadio.vue2.mjs";
20
- import a from "./ap-batch-action/ApBatchAction.vue2.mjs";
21
- const g = o(m), j = p, k = o(r), q = o(i), v = o(n), z = o(c), C = o(s), D = f, F = a, H = t;
18
+ import s from "./ap-select-layout/select-layout.vue2.mjs";
19
+ import a from "./ap-export-group/ApExportGroup.vue2.mjs";
20
+ import c from "./ap-input-radio/ApInputRadio.vue2.mjs";
21
+ import f from "./ap-batch-action/ApBatchAction.vue2.mjs";
22
+ const H = o(r), R = m, g = o(p), j = o(i), k = o(n), q = o(s), v = o(a), z = c, C = f, F = t;
22
23
  export {
23
- F as ApBatchAction,
24
- j as ApExpandAlert,
25
- C as ApExportGroup,
26
- D as ApInputRadio,
27
- k as ApLabel,
28
- H as ApLabelGroup,
29
- z as ApSelectLayout,
30
- q as ApStatus,
31
- v as ApStatusGroup,
32
- g as ApTitle
24
+ C as ApBatchAction,
25
+ R as ApExpandAlert,
26
+ v as ApExportGroup,
27
+ z as ApInputRadio,
28
+ g as ApLabel,
29
+ F as ApLabelGroup,
30
+ q as ApSelectLayout,
31
+ j as ApStatus,
32
+ k as ApStatusGroup,
33
+ H as ApTitle,
34
+ M as ApTransformDataHelper
33
35
  };
@@ -1,6 +1,6 @@
1
1
  import { ExtractPropTypes, PropType } from 'vue';
2
2
  import { LocaleType } from '../locale/interface';
3
- import { ApiType, ScrollbarGlobalConfig, TableDefaultConfig, ApUploadConfig, ApDescriptionsConfig } from './constants';
3
+ import { ApiType, ScrollbarGlobalConfig, TableDefaultConfig, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig } from './constants';
4
4
  import { default as __DTS_DEFAULT_0__ } from 'ant-design-vue/es/config-provider/renderEmpty';
5
5
  import { TransformCellTextProps } from 'ant-design-vue/es/table/interface';
6
6
  import { CSPConfig, SizeType, ThemeConfig } from 'ant-design-vue/es/config-provider/context';
@@ -155,5 +155,9 @@ export declare const configProviderProps: () => {
155
155
  type: PropType<ApDescriptionsConfig>;
156
156
  default: () => {};
157
157
  };
158
+ valueTypeMap: {
159
+ type: PropType<Record<string, ValueTypeRenderConfig>>;
160
+ default: () => {};
161
+ };
158
162
  };
159
163
  export type ConfigProviderProps = Partial<ExtractPropTypes<ReturnType<typeof configProviderProps>>>;
@@ -33,6 +33,10 @@ const p = () => ({
33
33
  type: Object,
34
34
  default: () => ({})
35
35
  },
36
+ valueTypeMap: {
37
+ type: Object,
38
+ default: () => ({})
39
+ },
36
40
  ...e()
37
41
  });
38
42
  export {
@@ -9,7 +9,7 @@ import { ValidateMessages } from 'ant-design-vue/es/form/interface';
9
9
  import { RequiredMark } from 'ant-design-vue/es/form/Form';
10
10
  import { ThemeConfig } from 'ant-design-vue/es/config-provider/context';
11
11
  import { LocaleType } from '..';
12
- import { ApiType, TableDefaultConfig, ScrollbarGlobalConfig, ApUploadConfig, ApDescriptionsConfig } from './constants';
12
+ import { ApiType, TableDefaultConfig, ScrollbarGlobalConfig, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig } from './constants';
13
13
  export declare const globalConfigCached: Ref<ConfigProviderProps>;
14
14
  export declare const ConfigProvider: DefineComponent<{
15
15
  iconPrefixCls: StringConstructor;
@@ -156,6 +156,10 @@ export declare const ConfigProvider: DefineComponent<{
156
156
  type: PropType<ApDescriptionsConfig>;
157
157
  default: () => {};
158
158
  };
159
+ valueTypeMap: {
160
+ type: PropType<Record<string, ValueTypeRenderConfig>>;
161
+ default: () => {};
162
+ };
159
163
  }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
160
164
  iconPrefixCls: StringConstructor;
161
165
  getTargetContainer: {
@@ -301,6 +305,10 @@ export declare const ConfigProvider: DefineComponent<{
301
305
  type: PropType<ApDescriptionsConfig>;
302
306
  default: () => {};
303
307
  };
308
+ valueTypeMap: {
309
+ type: PropType<Record<string, ValueTypeRenderConfig>>;
310
+ default: () => {};
311
+ };
304
312
  }>>, {
305
313
  input: {
306
314
  autocomplete?: string;
@@ -339,5 +347,6 @@ export declare const ConfigProvider: DefineComponent<{
339
347
  uiMode: "aplus" | "admin";
340
348
  apUpload: ApUploadConfig;
341
349
  apDescriptions: ApDescriptionsConfig;
350
+ valueTypeMap: Record<string, ValueTypeRenderConfig>;
342
351
  }, {}>;
343
352
  export type ConfigProviderInstance = InstanceType<typeof ConfigProvider>;
@@ -1,20 +1,20 @@
1
- import { isVNode as n, ref as d, defineComponent as f, computed as m, watch as r, createVNode as c, renderSlot as u } from "vue";
2
- import { ConfigProvider as s } from "ant-design-vue";
3
- import { provideGlobalConfig as p } from "./hooks/use-global-config.mjs";
1
+ import { isVNode as n, ref as u, defineComponent as d, computed as f, watch as a, createVNode as m, renderSlot as c } from "vue";
2
+ import { ConfigProvider as p } from "ant-design-vue";
3
+ import { provideGlobalConfig as s } from "./hooks/use-global-config.mjs";
4
4
  import { configProviderProps as g } from "./config-provider-props.mjs";
5
5
  import { tableDefaultConfig as C } from "./constants.mjs";
6
- import { mergeAntdProvideConfig as b } from "../utils/config-provider-preset.mjs";
7
- import { setCSSVariables as v, aplusCssVar as P, adminCssVar as S } from "../theme/css-var/index.mjs";
8
- function V(e) {
6
+ import { mergeAntdProvideConfig as v } from "../utils/config-provider-preset.mjs";
7
+ import { setCSSVariables as b, aplusCssVar as P, adminCssVar as M } from "../theme/css-var/index.mjs";
8
+ function S(e) {
9
9
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !n(e);
10
10
  }
11
- const a = d({}), N = /* @__PURE__ */ f({
11
+ const i = u({}), N = /* @__PURE__ */ d({
12
12
  name: "AplusConfigProvider",
13
13
  props: g(),
14
14
  setup(e, {
15
- slots: i
15
+ slots: r
16
16
  }) {
17
- const l = m(() => ({
17
+ const l = f(() => ({
18
18
  namespace: e.namespace,
19
19
  aplusLocale: e.aplusLocale,
20
20
  api: e.api,
@@ -25,20 +25,21 @@ const a = d({}), N = /* @__PURE__ */ f({
25
25
  scrollbar: e.scrollbar,
26
26
  uiMode: e.uiMode,
27
27
  apUpload: e.apUpload,
28
- apDescriptions: e.apDescriptions
29
- })), t = p(l);
30
- return r(() => e, (o) => {
31
- a.value = b(o);
28
+ apDescriptions: e.apDescriptions,
29
+ valueTypeMap: e.valueTypeMap
30
+ })), t = s(l);
31
+ return a(() => e, (o) => {
32
+ i.value = v(o);
32
33
  }, {
33
34
  deep: !0,
34
35
  immediate: !0
35
- }), r(() => e.uiMode, (o) => {
36
- v(o === "aplus" ? P : S);
36
+ }), a(() => e.uiMode, (o) => {
37
+ b(o === "aplus" ? P : M);
37
38
  }, {
38
39
  immediate: !0
39
40
  }), () => {
40
41
  let o;
41
- return c(s, a.value, V(o = u(i, "default", {
42
+ return m(p, i.value, S(o = c(r, "default", {
42
43
  config: t == null ? void 0 : t.value
43
44
  })) ? o : {
44
45
  default: () => [o]
@@ -48,5 +49,5 @@ const a = d({}), N = /* @__PURE__ */ f({
48
49
  });
49
50
  export {
50
51
  N as ConfigProvider,
51
- a as globalConfigCached
52
+ i as globalConfigCached
52
53
  };
@@ -1,7 +1,7 @@
1
1
  import { ConfigProviderProps } from './config-provider-props';
2
- import { InjectionKey, Ref } from 'vue';
2
+ import { InjectionKey, Ref, VNode } from 'vue';
3
3
  import { SizeType, SorterResult } from '../pro-table/types/table';
4
- import { Fn } from '../type';
4
+ import { Fn, Recordable } from '../type';
5
5
  import { CommonOptionItem, ApiSelectOption } from '../pro-form/components/interface';
6
6
  import { client } from '@aplus-frontend/oss';
7
7
  export type ConfigProviderContext = Partial<ConfigProviderProps>;
@@ -38,6 +38,10 @@ export type ApUploadConfig = {
38
38
  };
39
39
  accept?: string;
40
40
  };
41
+ export type ValueTypeRenderConfig = {
42
+ render?: (text: any, renderProps: Recordable) => VNode;
43
+ renderFormItem?: (fieldProps: Recordable) => VNode;
44
+ };
41
45
  export type ApDescriptionsConfig = {
42
46
  downloadFile?: (url: string, name: string) => void;
43
47
  };
@@ -1,6 +1,6 @@
1
1
  import { MaybeRef } from '@aplus-frontend/utils';
2
2
  import { App, Ref, ComputedRef, ExtractPropTypes, PropType } from 'vue';
3
- import { ConfigProviderContext, ApiType, TableDefaultConfig, ScrollbarGlobalConfig, ApUploadConfig, ApDescriptionsConfig } from '../constants';
3
+ import { ConfigProviderContext, ApiType, TableDefaultConfig, ScrollbarGlobalConfig, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig } from '../constants';
4
4
  import { default as __DTS_DEFAULT_0__ } from 'ant-design-vue/es/config-provider/renderEmpty';
5
5
  import { TransformCellTextProps } from 'ant-design-vue/es/table/interface';
6
6
  import { CSPConfig } from 'ant-design-vue/es/config-provider';
@@ -158,4 +158,8 @@ export declare const provideGlobalConfig: (config: MaybeRef<ConfigProviderContex
158
158
  type: PropType<ApDescriptionsConfig>;
159
159
  default: () => {};
160
160
  };
161
+ valueTypeMap: {
162
+ type: PropType<Record<string, ValueTypeRenderConfig>>;
163
+ default: () => {};
164
+ };
161
165
  }>>>> | undefined;