@aplus-frontend/ui 6.31.1 → 6.33.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 (176) hide show
  1. package/es/index.mjs +65 -61
  2. package/es/src/ag-grid/components/body-cell/index.vue2.mjs +14 -12
  3. package/es/src/ag-grid/editable/form-item.vue.d.ts +16 -0
  4. package/es/src/ag-grid/editable/form-item.vue.mjs +215 -0
  5. package/es/src/ag-grid/editable/form-item.vue2.mjs +4 -0
  6. package/es/src/ag-grid/editable/index.vue.d.ts +18 -0
  7. package/es/src/ag-grid/editable/index.vue.mjs +233 -0
  8. package/es/src/ag-grid/editable/index.vue2.mjs +4 -0
  9. package/es/src/ag-grid/editable/interface.d.ts +96 -0
  10. package/es/src/ag-grid/editable/interface.mjs +1 -0
  11. package/es/src/ag-grid/editable/style/css.d.ts +0 -0
  12. package/es/src/ag-grid/editable/style/css.js +1 -0
  13. package/es/src/ag-grid/editable/style/index.d.ts +0 -0
  14. package/es/src/ag-grid/editable/style/index.js +1 -0
  15. package/es/src/ag-grid/editable/utils.d.ts +5 -0
  16. package/es/src/ag-grid/editable/utils.mjs +23 -0
  17. package/es/src/ag-grid/hooks/use-editable-api.d.ts +15 -0
  18. package/es/src/ag-grid/hooks/use-editable-api.mjs +150 -0
  19. package/es/src/ag-grid/hooks/use-editable-columns.d.ts +6 -0
  20. package/es/src/ag-grid/hooks/use-editable-columns.mjs +96 -0
  21. package/es/src/ag-grid/hooks/use-editable-form-item-api.d.ts +15 -0
  22. package/es/src/ag-grid/hooks/use-editable-form-item-api.mjs +174 -0
  23. package/es/src/ag-grid/index.d.ts +4 -1
  24. package/es/src/ag-grid/index.mjs +3 -0
  25. package/es/src/ag-grid/index.vue.mjs +70 -66
  26. package/es/src/ag-grid/interface.d.ts +20 -1
  27. package/es/src/ag-grid/utils.d.ts +2 -0
  28. package/es/src/ag-grid/utils.mjs +12 -7
  29. package/es/src/ap-drawer/interface.d.ts +5 -0
  30. package/es/src/ap-drawer/utils/createDrawer.mjs +22 -19
  31. package/es/src/ap-field/date/index.vue.mjs +29 -28
  32. package/es/src/ap-field/radio/index.vue.d.ts +4 -0
  33. package/es/src/ap-field/radio/index.vue.mjs +9 -8
  34. package/es/src/ap-field/radio/read.vue2.mjs +5 -4
  35. package/es/src/ap-field/rate/index.vue.d.ts +20 -0
  36. package/es/src/ap-field/rate/index.vue.mjs +12 -11
  37. package/es/src/ap-form/interface.d.ts +4 -0
  38. package/es/src/ap-form/item/index.vue.mjs +41 -39
  39. package/es/src/ap-form/items/checkbox/index.vue.mjs +5 -5
  40. package/es/src/ap-form/items/date/index.vue.mjs +9 -9
  41. package/es/src/ap-form/items/date-range/index.vue.mjs +8 -8
  42. package/es/src/ap-form/items/number/index.vue.mjs +11 -11
  43. package/es/src/ap-form/items/radio/index.vue.d.ts +8 -0
  44. package/es/src/ap-form/items/radio/index.vue.mjs +6 -6
  45. package/es/src/ap-form/items/select/index.vue.mjs +3 -3
  46. package/es/src/ap-form/items/switch/index.vue.mjs +2 -2
  47. package/es/src/ap-form/items/text/index.vue2.mjs +12 -12
  48. package/es/src/ap-form/items/text/password.vue.mjs +2 -2
  49. package/es/src/ap-form/items/text-area/index.vue.d.ts +4 -4
  50. package/es/src/ap-form/items/text-area/index.vue.mjs +3 -3
  51. package/es/src/ap-form/items/tree-select/index.vue.mjs +6 -6
  52. package/es/src/ap-form/render/item.vue.mjs +6 -5
  53. package/es/src/ap-grid/utils/editable.d.ts +2 -1
  54. package/es/src/ap-modal/index.d.ts +1 -0
  55. package/es/src/ap-modal/index.mjs +29 -27
  56. package/es/src/ap-modal/interface.d.ts +5 -0
  57. package/es/src/ap-modal/utils/confirm.mjs +35 -34
  58. package/es/src/ap-modal/utils/createModal.mjs +39 -37
  59. package/es/src/ap-modal/utils/util.d.ts +3 -0
  60. package/es/src/ap-modal/utils/util.mjs +8 -2
  61. package/es/src/ap-table/constants.d.ts +4 -0
  62. package/es/src/ap-table/interface.d.ts +5 -0
  63. package/es/src/ap-table/utils.mjs +76 -71
  64. package/es/src/ap-upload/components/MultipleFile.vue.d.ts +10 -0
  65. package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +67 -68
  66. package/es/src/business/ap-view/ap-view.vue2.mjs +20 -18
  67. package/es/src/business/ap-view/interface.d.ts +4 -0
  68. package/es/src/business/batch-input-group/form-item.vue.mjs +1 -1
  69. package/es/src/config-provider/config-provider.mjs +32 -24
  70. package/es/src/editable-table/utils.d.ts +3 -2
  71. package/es/src/index.mjs +57 -53
  72. package/es/src/version.d.ts +1 -1
  73. package/es/src/version.mjs +1 -1
  74. package/lib/index.js +1 -1
  75. package/lib/src/ag-grid/components/body-cell/index.vue2.js +1 -1
  76. package/lib/src/ag-grid/editable/form-item.vue.d.ts +16 -0
  77. package/lib/src/ag-grid/editable/form-item.vue.js +1 -0
  78. package/lib/src/ag-grid/editable/form-item.vue2.js +1 -0
  79. package/lib/src/ag-grid/editable/index.vue.d.ts +18 -0
  80. package/lib/src/ag-grid/editable/index.vue.js +1 -0
  81. package/lib/src/ag-grid/editable/index.vue2.js +1 -0
  82. package/lib/src/ag-grid/editable/interface.d.ts +96 -0
  83. package/lib/src/ag-grid/editable/interface.js +1 -0
  84. package/lib/src/ag-grid/editable/style/css.cjs +1 -0
  85. package/lib/src/ag-grid/editable/style/css.d.ts +0 -0
  86. package/lib/src/ag-grid/editable/style/index.cjs +1 -0
  87. package/lib/src/ag-grid/editable/style/index.d.ts +0 -0
  88. package/lib/src/ag-grid/editable/utils.d.ts +5 -0
  89. package/lib/src/ag-grid/editable/utils.js +1 -0
  90. package/lib/src/ag-grid/hooks/use-editable-api.d.ts +15 -0
  91. package/lib/src/ag-grid/hooks/use-editable-api.js +1 -0
  92. package/lib/src/ag-grid/hooks/use-editable-columns.d.ts +6 -0
  93. package/lib/src/ag-grid/hooks/use-editable-columns.js +1 -0
  94. package/lib/src/ag-grid/hooks/use-editable-form-item-api.d.ts +15 -0
  95. package/lib/src/ag-grid/hooks/use-editable-form-item-api.js +1 -0
  96. package/lib/src/ag-grid/index.d.ts +4 -1
  97. package/lib/src/ag-grid/index.js +1 -1
  98. package/lib/src/ag-grid/index.vue.js +1 -1
  99. package/lib/src/ag-grid/interface.d.ts +20 -1
  100. package/lib/src/ag-grid/utils.d.ts +2 -0
  101. package/lib/src/ag-grid/utils.js +1 -1
  102. package/lib/src/ap-drawer/interface.d.ts +5 -0
  103. package/lib/src/ap-drawer/utils/createDrawer.js +1 -1
  104. package/lib/src/ap-field/date/index.vue.js +1 -1
  105. package/lib/src/ap-field/radio/index.vue.d.ts +4 -0
  106. package/lib/src/ap-field/radio/index.vue.js +1 -1
  107. package/lib/src/ap-field/radio/read.vue2.js +1 -1
  108. package/lib/src/ap-field/rate/index.vue.d.ts +20 -0
  109. package/lib/src/ap-field/rate/index.vue.js +1 -1
  110. package/lib/src/ap-form/interface.d.ts +4 -0
  111. package/lib/src/ap-form/item/index.vue.js +1 -1
  112. package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
  113. package/lib/src/ap-form/items/date/index.vue.js +1 -1
  114. package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
  115. package/lib/src/ap-form/items/number/index.vue.js +1 -1
  116. package/lib/src/ap-form/items/radio/index.vue.d.ts +8 -0
  117. package/lib/src/ap-form/items/radio/index.vue.js +1 -1
  118. package/lib/src/ap-form/items/select/index.vue.js +1 -1
  119. package/lib/src/ap-form/items/switch/index.vue.js +1 -1
  120. package/lib/src/ap-form/items/text/index.vue2.js +1 -1
  121. package/lib/src/ap-form/items/text/password.vue.js +1 -1
  122. package/lib/src/ap-form/items/text-area/index.vue.d.ts +4 -4
  123. package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
  124. package/lib/src/ap-form/items/tree-select/index.vue.js +1 -1
  125. package/lib/src/ap-form/render/item.vue.js +1 -1
  126. package/lib/src/ap-grid/utils/editable.d.ts +2 -1
  127. package/lib/src/ap-modal/index.d.ts +1 -0
  128. package/lib/src/ap-modal/index.js +1 -1
  129. package/lib/src/ap-modal/interface.d.ts +5 -0
  130. package/lib/src/ap-modal/utils/confirm.js +1 -1
  131. package/lib/src/ap-modal/utils/createModal.js +1 -1
  132. package/lib/src/ap-modal/utils/util.d.ts +3 -0
  133. package/lib/src/ap-modal/utils/util.js +1 -1
  134. package/lib/src/ap-table/constants.d.ts +4 -0
  135. package/lib/src/ap-table/interface.d.ts +5 -0
  136. package/lib/src/ap-table/utils.js +1 -1
  137. package/lib/src/ap-upload/components/MultipleFile.vue.d.ts +10 -0
  138. package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
  139. package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
  140. package/lib/src/business/ap-view/interface.d.ts +4 -0
  141. package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
  142. package/lib/src/config-provider/config-provider.js +1 -1
  143. package/lib/src/editable-table/utils.d.ts +3 -2
  144. package/lib/src/index.js +1 -1
  145. package/lib/src/version.d.ts +1 -1
  146. package/lib/src/version.js +1 -1
  147. package/package.json +3 -3
  148. package/theme/ag-grid/editable.css +52 -0
  149. package/theme/ag-grid/editable.less +11 -0
  150. package/theme/ag-grid/index.css +19 -0
  151. package/theme/ag-grid/index.less +2 -0
  152. package/theme/ap-appendix/ap-appendix.css +4 -13
  153. package/theme/ap-appendix/ap-appendix.less +5 -12
  154. package/theme/ap-form/ap-form-item.css +12 -0
  155. package/theme/ap-form/ap-form-item.less +12 -0
  156. package/theme/ap-form/index.css +12 -0
  157. package/theme/ap-form/search-form.css +12 -0
  158. package/theme/ap-grid/editable.css +1 -0
  159. package/theme/ap-grid/editable.less +1 -0
  160. package/theme/ap-grid/index.css +13 -0
  161. package/theme/ap-grid/index.less +1 -0
  162. package/theme/ap-table/ap-table.css +12 -0
  163. package/theme/ap-table-modal/index.css +12 -0
  164. package/theme/css-var.css +2 -0
  165. package/theme/css-var.less +4 -0
  166. package/theme/editable-table/index.css +13 -0
  167. package/theme/editable-table/index.less +1 -0
  168. package/theme/index.css +28 -13
  169. package/es/src/business/ap-appendix/icons/empty-admin-icon.vue.d.ts +0 -3
  170. package/es/src/business/ap-appendix/icons/empty-admin-icon.vue.mjs +0 -20
  171. package/es/src/business/ap-appendix/icons/empty-aplus-icon.vue.d.ts +0 -3
  172. package/es/src/business/ap-appendix/icons/empty-aplus-icon.vue.mjs +0 -20
  173. package/lib/src/business/ap-appendix/icons/empty-admin-icon.vue.d.ts +0 -3
  174. package/lib/src/business/ap-appendix/icons/empty-admin-icon.vue.js +0 -1
  175. package/lib/src/business/ap-appendix/icons/empty-aplus-icon.vue.d.ts +0 -3
  176. package/lib/src/business/ap-appendix/icons/empty-aplus-icon.vue.js +0 -1
@@ -1,29 +1,30 @@
1
- import { render as c, defineComponent as C, createVNode as a, mergeProps as g, h as x } from "vue";
2
- import { Drawer as v } from "@aplus-frontend/antdv";
3
- import { ConfigProvider as b, globalConfigCached as w } from "../../config-provider/config-provider.mjs";
4
- import { omit as P } from "lodash-unified";
1
+ import { render as m, defineComponent as g, createVNode as l, mergeProps as b, h as v } from "vue";
2
+ import { Drawer as w } from "@aplus-frontend/antdv";
3
+ import { ConfigProvider as P, globalConfigCached as y } from "../../config-provider/config-provider.mjs";
4
+ import { omit as A } from "lodash-unified";
5
5
  import "../components/ApDrawerClose.vue.mjs";
6
- import y from "../components/ApDrawerClose.vue2.mjs";
7
- const _ = (n) => {
6
+ import { getModalGlobalAppContext as D } from "../../ap-modal/utils/util.mjs";
7
+ import O from "../components/ApDrawerClose.vue2.mjs";
8
+ const N = (n) => {
8
9
  let o, s;
9
10
  const {
10
11
  destroyOnClose: r = !0
11
12
  } = n;
12
13
  function p() {
13
14
  o && o(!1), setTimeout(() => {
14
- c(null, t), t.parentElement?.removeChild(t);
15
+ m(null, t), t.parentElement?.removeChild(t);
15
16
  }, 500);
16
17
  }
17
- function h() {
18
+ function f() {
18
19
  o && o(!0);
19
20
  }
20
21
  function i() {
21
22
  o && o(!1);
22
23
  }
23
- function m(e) {
24
+ function h(e) {
24
25
  s && s(e);
25
26
  }
26
- const f = /* @__PURE__ */ C({
27
+ const C = /* @__PURE__ */ g({
27
28
  data() {
28
29
  return {
29
30
  open: r,
@@ -50,29 +51,31 @@ const _ = (n) => {
50
51
  }
51
52
  },
52
53
  render() {
53
- const e = P(this.props, ["onClose", "extra", "footer", "visible", "onUpdate:visible", "afterVisibleChange", "onAfterVisibleOChange", "open", "onUpdate:open", "getContainer"]), l = this.props?.content?.component?.exposed ?? void 0, d = () => r ? p() : i();
54
- return a(b, w.value, {
55
- default: () => [a(v, g({
54
+ const e = A(this.props, ["onClose", "extra", "footer", "visible", "onUpdate:visible", "afterVisibleChange", "onAfterVisibleOChange", "open", "onUpdate:open", "getContainer"]), d = this.props?.content?.component?.exposed ?? void 0, c = () => r ? p() : i();
55
+ return l(P, y.value, {
56
+ default: () => [l(w, b({
56
57
  open: this.open,
57
58
  onClose: this.handleClose,
58
59
  closeIcon: this.props?.closeIcon ?? null,
59
- extra: this.props?.extra ? this.props?.extra?.(l, d) : a(y, {
60
+ extra: this.props?.extra ? this.props?.extra?.(d, c) : l(O, {
60
61
  onClose: this.handleClose
61
62
  }, null),
62
- footer: this.props?.footer?.(l, d)
63
+ footer: this.props?.footer?.(d, c)
63
64
  }, e), {
64
65
  default: () => [this.props?.content]
65
66
  })]
66
67
  });
67
68
  }
68
69
  }), u = n.getContainer || document.body, t = document.createElement("div");
69
- return u.appendChild(t), c(x(f), t), {
70
+ u.appendChild(t);
71
+ const a = v(C), x = D();
72
+ return a.appContext = n.appContext || x || a.appContext, m(a, t), {
70
73
  destroy: p,
71
- update: m,
72
- open: h,
74
+ update: h,
75
+ open: f,
73
76
  close: i
74
77
  };
75
78
  };
76
79
  export {
77
- _ as createDrawer
80
+ N as createDrawer
78
81
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as z, computed as r, unref as t, createElementBlock as B, createBlock as y, openBlock as d, Fragment as g, createTextVNode as k, toDisplayString as w, normalizeStyle as E, withCtx as p, createCommentVNode as N, createVNode as j, isRef as I, renderList as P, mergeProps as U, createSlots as H, renderSlot as K, normalizeProps as $, guardReactiveProps as G } from "vue";
1
+ import { defineComponent as z, computed as r, unref as t, createElementBlock as B, createBlock as y, openBlock as i, Fragment as g, createTextVNode as k, toDisplayString as w, normalizeStyle as E, withCtx as p, createCommentVNode as N, createVNode as j, isRef as I, renderList as P, mergeProps as U, createSlots as H, renderSlot as K, normalizeProps as $, guardReactiveProps as G } from "vue";
2
2
  import u from "dayjs";
3
3
  import { InputGroup as L, Select as W, SelectOption as Y, DatePicker as Z } from "@aplus-frontend/antdv";
4
- import { ApFieldDatePresetFormats as q, PRESET_FORMAT_MAP as C, PRESET_FORMAT_PICK_MAP as J, PRESET_FORMAT_TIME_MAP as Q } from "./constant.mjs";
4
+ import { ApFieldDatePresetFormats as q, PRESET_FORMAT_MAP as b, PRESET_FORMAT_PICK_MAP as J, PRESET_FORMAT_TIME_MAP as Q } from "./constant.mjs";
5
5
  import "../../hooks/index.mjs";
6
- import { isNil as S, omit as X } from "lodash-unified";
6
+ import { isNil as C, omit as X } from "lodash-unified";
7
7
  import { formatDayWithTimezone as ee } from "./helper.mjs";
8
8
  import { getTimeFormatToZone as oe } from "@aplus-frontend/utils";
9
9
  import { useDefaultPlaceholder as te } from "../hooks/use-default-placeholder.mjs";
@@ -90,20 +90,20 @@ const ye = /* @__PURE__ */ z({
90
90
  timezone: {}
91
91
  },
92
92
  emits: ["update:value"],
93
- setup(T, { emit: O }) {
94
- const e = T, b = O, { value: f, updateValue: h } = ne(
93
+ setup(S, { emit: T }) {
94
+ const e = S, O = T, { value: f, updateValue: h } = ne(
95
95
  e,
96
- b
97
- ), F = te("Date", e), { currentTimezone: i } = ae(e), l = r(
96
+ O
97
+ ), F = te("Date", e), { currentTimezone: d } = ae(e), l = r(
98
98
  () => q.indexOf(e.format) > -1
99
- ), _ = r(() => e.shownFormat ? e.shownFormat : l.value ? C[e.format] : e.format), s = r(
100
- () => l.value ? C[e.format] : e.format
99
+ ), A = r(() => e.shownFormat ? e.shownFormat : l.value ? b[e.format] : e.format), s = r(
100
+ () => l.value ? b[e.format] : e.format
101
101
  ), c = r(() => {
102
- if (S(t(f)))
102
+ if (C(t(f)))
103
103
  return;
104
104
  let o = u(t(f));
105
- return e.timezone && (o = u(oe(t(f), i.value))), o;
106
- }), A = r(() => t(l) ? e.picker ?? J[e.format] : e.picker), R = r(() => {
105
+ return e.timezone && (o = u(oe(t(f), d.value))), o;
106
+ }), _ = r(() => t(l) ? e.picker ?? J[e.format] : e.picker), R = r(() => {
107
107
  const o = t(l) ? Q[e.format] : {};
108
108
  return {
109
109
  ...X(e, [
@@ -118,9 +118,9 @@ const ye = /* @__PURE__ */ z({
118
118
  placeholder: t(F),
119
119
  ...o
120
120
  };
121
- }), v = (o, n, a = !0) => ee(i.value)(o, n, a);
121
+ }), v = (o, n, a = !0) => ee(d.value)(o, n, a);
122
122
  function M(o) {
123
- if (S(o)) {
123
+ if (C(o)) {
124
124
  h(null);
125
125
  return;
126
126
  }
@@ -141,7 +141,7 @@ const ye = /* @__PURE__ */ z({
141
141
  ) : null;
142
142
  e.onChange?.(m, n);
143
143
  }
144
- function x(o) {
144
+ function V(o) {
145
145
  const n = u(o), a = o ? v(
146
146
  n,
147
147
  t(l) ? t(s) : void 0,
@@ -149,9 +149,9 @@ const ye = /* @__PURE__ */ z({
149
149
  ) : null;
150
150
  e.onOk?.(a);
151
151
  }
152
- return (o, n) => o.mode === "read" ? (d(), B(g, { key: 0 }, [
152
+ return (o, n) => o.mode === "read" ? (i(), B(g, { key: 0 }, [
153
153
  k(w(c.value ? t(u)(c.value).format(s.value) : o.emptyText), 1)
154
- ], 64)) : (d(), y(t(L), {
154
+ ], 64)) : (i(), y(t(L), {
155
155
  key: 1,
156
156
  compact: "",
157
157
  style: E({
@@ -159,16 +159,17 @@ const ye = /* @__PURE__ */ z({
159
159
  })
160
160
  }, {
161
161
  default: p(() => [
162
- Array.isArray(e.timezone) && e.timezone.length ? (d(), y(t(W), {
162
+ Array.isArray(e.timezone) && e.timezone.length ? (i(), y(t(W), {
163
163
  key: 0,
164
- value: t(i),
165
- "onUpdate:value": n[0] || (n[0] = (a) => I(i) ? i.value = a : null),
164
+ value: t(d),
165
+ "onUpdate:value": n[0] || (n[0] = (a) => I(d) ? d.value = a : null),
166
166
  "default-active-first-option": "",
167
167
  "dropdown-match-select-width": !1,
168
- style: { "max-width": "50%" }
168
+ style: { "max-width": "50%" },
169
+ disabled: o.disabled
169
170
  }, {
170
171
  default: p(() => [
171
- (d(!0), B(g, null, P(e.timezone, (a) => (d(), y(t(Y), {
172
+ (i(!0), B(g, null, P(e.timezone, (a) => (i(), y(t(Y), {
172
173
  key: a?.value,
173
174
  value: a?.value
174
175
  }, {
@@ -179,19 +180,19 @@ const ye = /* @__PURE__ */ z({
179
180
  }, 1032, ["value"]))), 128))
180
181
  ]),
181
182
  _: 1
182
- }, 8, ["value"])) : N("", !0),
183
+ }, 8, ["value", "disabled"])) : N("", !0),
183
184
  j(t(Z), U(R.value, {
184
185
  value: c.value,
185
- format: _.value,
186
- picker: A.value,
186
+ format: A.value,
187
+ picker: _.value,
187
188
  "onUpdate:value": M,
188
189
  onChange: D,
189
- onOk: x
190
+ onOk: V
190
191
  }), H({ _: 2 }, [
191
192
  P(o.$slots, (a, m) => ({
192
193
  name: m,
193
- fn: p((V) => [
194
- K(o.$slots, m, $(G(V || {})))
194
+ fn: p((x) => [
195
+ K(o.$slots, m, $(G(x || {})))
195
196
  ])
196
197
  }))
197
198
  ]), 1040, ["value", "format", "picker"])
@@ -40,6 +40,7 @@ declare const _default: DefineComponent<ApFieldRadioProps, {
40
40
  default: RadioGroupButtonStyle;
41
41
  };
42
42
  id: StringConstructor;
43
+ block: BooleanConstructor;
43
44
  optionType: {
44
45
  type: PropType<RadioGroupOptionType>;
45
46
  default: RadioGroupOptionType;
@@ -55,6 +56,7 @@ declare const _default: DefineComponent<ApFieldRadioProps, {
55
56
  }>> & Readonly<{}>, () => VueNode, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
56
57
  size: "default" | "small" | "large";
57
58
  onChange: (e: RadioChangeEvent) => void;
59
+ block: boolean;
58
60
  disabled: boolean;
59
61
  'onUpdate:value': (val: any) => void;
60
62
  options: (string | number | RadioGroupChildOption)[];
@@ -88,6 +90,7 @@ declare const _default: DefineComponent<ApFieldRadioProps, {
88
90
  default: RadioGroupButtonStyle;
89
91
  };
90
92
  id: StringConstructor;
93
+ block: BooleanConstructor;
91
94
  optionType: {
92
95
  type: PropType<RadioGroupOptionType>;
93
96
  default: RadioGroupOptionType;
@@ -103,6 +106,7 @@ declare const _default: DefineComponent<ApFieldRadioProps, {
103
106
  }>> & Readonly<{}>, () => VueNode, {}, {}, {}, {
104
107
  size: "default" | "small" | "large";
105
108
  onChange: (e: RadioChangeEvent) => void;
109
+ block: boolean;
106
110
  disabled: boolean;
107
111
  'onUpdate:value': (val: any) => void;
108
112
  options: (string | number | RadioGroupChildOption)[];
@@ -22,6 +22,7 @@ const W = /* @__PURE__ */ q({
22
22
  name: {},
23
23
  buttonStyle: {},
24
24
  id: {},
25
+ block: { type: Boolean },
25
26
  optionType: {},
26
27
  onChange: {},
27
28
  "onUpdate:value": {},
@@ -30,14 +31,14 @@ const W = /* @__PURE__ */ q({
30
31
  vertical: { type: Boolean, default: !1 }
31
32
  },
32
33
  emits: ["update:value"],
33
- setup(f, { expose: c, emit: v }) {
34
- const t = f, y = v, l = s(), { options: r, updateOptions: g } = D(t), { value: u, updateValue: k } = E(t, y), { b: x, m: b } = L("field-radio"), n = s(!1);
34
+ setup(c, { expose: f, emit: v }) {
35
+ const t = c, y = v, l = s(), { options: r, updateOptions: g } = D(t), { value: u, updateValue: k } = E(t, y), { b, m: x } = L("field-radio"), n = s(!1);
35
36
  C(() => {
36
37
  t.request && (n.value = !0, t.request?.().then((o) => g(o)).finally(() => {
37
38
  n.value = !1;
38
39
  }));
39
40
  });
40
- const T = O(() => {
41
+ const B = O(() => {
41
42
  const o = e(u);
42
43
  if (S(o))
43
44
  return t.emptyText;
@@ -46,17 +47,17 @@ const W = /* @__PURE__ */ q({
46
47
  );
47
48
  return A(i) || t.emptyText;
48
49
  });
49
- function B() {
50
+ function T() {
50
51
  l.value?.focus();
51
52
  }
52
53
  function V() {
53
54
  l.value?.blur();
54
55
  }
55
- return c({
56
- focus: B,
56
+ return f({
57
+ focus: T,
57
58
  blur: V
58
59
  }), (o, i) => o.mode === "read" ? (a(), p(m, { key: 0 }, [
59
- R(U(T.value), 1)
60
+ R(U(B.value), 1)
60
61
  ], 64)) : (a(), p(m, { key: 1 }, [
61
62
  n.value ? (a(), d(e(G), {
62
63
  key: 0,
@@ -75,7 +76,7 @@ const W = /* @__PURE__ */ q({
75
76
  ref: l,
76
77
  value: e(u),
77
78
  options: e(r),
78
- class: [e(x)(), o.vertical ? e(b)("vertical") : null],
79
+ class: [e(b)(), o.vertical ? e(x)("vertical") : null],
79
80
  "onUpdate:value": e(k)
80
81
  }
81
82
  ), null, 16, ["value", "options", "class", "onUpdate:value"]))
@@ -1,7 +1,7 @@
1
- import { defineComponent as i, computed as l, toDisplayString as r } from "vue";
1
+ import { defineComponent as p, computed as i, toDisplayString as r } from "vue";
2
2
  import { isNil as s } from "lodash-unified";
3
3
  import { getOptionValue as d, getOptionLabel as u } from "./helper.mjs";
4
- const y = /* @__PURE__ */ i({
4
+ const y = /* @__PURE__ */ p({
5
5
  name: "ApFieldRadioRead",
6
6
  __name: "read",
7
7
  props: {
@@ -16,6 +16,7 @@ const y = /* @__PURE__ */ i({
16
16
  name: {},
17
17
  buttonStyle: {},
18
18
  id: {},
19
+ block: { type: Boolean },
19
20
  optionType: {},
20
21
  onChange: {},
21
22
  "onUpdate:value": {},
@@ -24,12 +25,12 @@ const y = /* @__PURE__ */ i({
24
25
  vertical: { type: Boolean, default: !1 }
25
26
  },
26
27
  setup(a) {
27
- const e = a, n = l(() => {
28
+ const e = a, n = i(() => {
28
29
  const t = e.value;
29
30
  if (s(t))
30
31
  return e.emptyText;
31
32
  const o = e.options?.find(
32
- (p) => t === d(p)
33
+ (l) => t === d(l)
33
34
  );
34
35
  return u(o) || e.emptyText;
35
36
  });
@@ -35,6 +35,10 @@ declare function __VLS_template(): {
35
35
  type: BooleanConstructor;
36
36
  default: any;
37
37
  };
38
+ keyboard: {
39
+ type: BooleanConstructor;
40
+ default: boolean;
41
+ };
38
42
  tabindex: VueTypeDef<string | number>;
39
43
  direction: PropType<Direction>;
40
44
  id: StringConstructor;
@@ -48,6 +52,7 @@ declare function __VLS_template(): {
48
52
  disabled: boolean;
49
53
  autofocus: boolean;
50
54
  allowClear: boolean;
55
+ keyboard: boolean;
51
56
  allowHalf: boolean;
52
57
  }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
53
58
  P: {};
@@ -78,6 +83,10 @@ declare function __VLS_template(): {
78
83
  type: BooleanConstructor;
79
84
  default: any;
80
85
  };
86
+ keyboard: {
87
+ type: BooleanConstructor;
88
+ default: boolean;
89
+ };
81
90
  tabindex: VueTypeDef<string | number>;
82
91
  direction: PropType<Direction>;
83
92
  id: StringConstructor;
@@ -91,6 +100,7 @@ declare function __VLS_template(): {
91
100
  disabled: boolean;
92
101
  autofocus: boolean;
93
102
  allowClear: boolean;
103
+ keyboard: boolean;
94
104
  allowHalf: boolean;
95
105
  }> | null;
96
106
  };
@@ -135,6 +145,10 @@ declare const __VLS_component: DefineComponent<ApFieldRateProps, {
135
145
  type: BooleanConstructor;
136
146
  default: any;
137
147
  };
148
+ keyboard: {
149
+ type: BooleanConstructor;
150
+ default: boolean;
151
+ };
138
152
  tabindex: VueTypeDef<string | number>;
139
153
  direction: PropType<Direction>;
140
154
  id: StringConstructor;
@@ -148,6 +162,7 @@ declare const __VLS_component: DefineComponent<ApFieldRateProps, {
148
162
  disabled: boolean;
149
163
  autofocus: boolean;
150
164
  allowClear: boolean;
165
+ keyboard: boolean;
151
166
  allowHalf: boolean;
152
167
  }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
153
168
  P: {};
@@ -178,6 +193,10 @@ declare const __VLS_component: DefineComponent<ApFieldRateProps, {
178
193
  type: BooleanConstructor;
179
194
  default: any;
180
195
  };
196
+ keyboard: {
197
+ type: BooleanConstructor;
198
+ default: boolean;
199
+ };
181
200
  tabindex: VueTypeDef<string | number>;
182
201
  direction: PropType<Direction>;
183
202
  id: StringConstructor;
@@ -191,6 +210,7 @@ declare const __VLS_component: DefineComponent<ApFieldRateProps, {
191
210
  disabled: boolean;
192
211
  autofocus: boolean;
193
212
  allowClear: boolean;
213
+ keyboard: boolean;
194
214
  allowHalf: boolean;
195
215
  }> | null;
196
216
  }, any>;
@@ -1,5 +1,5 @@
1
- import { defineComponent as m, ref as v, useSlots as b, computed as h, createBlock as y, openBlock as B, unref as t, mergeProps as C, createSlots as _, withCtx as x, renderSlot as g } from "vue";
2
- import { omit as k } from "lodash-unified";
1
+ import { defineComponent as m, ref as v, useSlots as b, computed as y, createBlock as h, openBlock as B, unref as o, mergeProps as C, createSlots as _, withCtx as x, renderSlot as k } from "vue";
2
+ import { omit as g } from "lodash-unified";
3
3
  import "../../hooks/index.mjs";
4
4
  import { Rate as w } from "@aplus-frontend/antdv";
5
5
  import { useControllableValue as R } from "../../hooks/useControllableValue.mjs";
@@ -19,6 +19,7 @@ const D = /* @__PURE__ */ m({
19
19
  disabled: { type: Boolean, default: void 0 },
20
20
  character: { default: void 0 },
21
21
  autofocus: { type: Boolean, default: !1 },
22
+ keyboard: { type: Boolean },
22
23
  tabindex: {},
23
24
  direction: {},
24
25
  id: {},
@@ -31,28 +32,28 @@ const D = /* @__PURE__ */ m({
31
32
  defaultValue: {}
32
33
  },
33
34
  emits: ["update:value"],
34
- setup(o, { expose: l, emit: r }) {
35
- const e = o, a = v(), u = r, n = b(), { value: d, updateValue: s } = R(e, u), f = h(() => e.mode === "read" ? !0 : e.disabled);
35
+ setup(a, { expose: l, emit: r }) {
36
+ const e = a, t = v(), u = r, n = b(), { value: d, updateValue: s } = R(e, u), f = y(() => e.mode === "read" ? !0 : e.disabled);
36
37
  function c() {
37
- a.value?.focus?.();
38
+ t.value?.focus?.();
38
39
  }
39
40
  function i() {
40
- a.value?.blur?.();
41
+ t.value?.blur?.();
41
42
  }
42
43
  return l({
43
44
  focus: c,
44
45
  blur: i
45
- }), (p, V) => (B(), y(t(w), C(t(k)(e, ["mode", "defaultValue"]), {
46
+ }), (p, V) => (B(), h(o(w), C(o(g)(e, ["mode", "defaultValue"]), {
46
47
  ref_key: "rateRef",
47
- ref: a,
48
- value: t(d),
48
+ ref: t,
49
+ value: o(d),
49
50
  disabled: f.value,
50
- "onUpdate:value": t(s)
51
+ "onUpdate:value": o(s)
51
52
  }), _({ _: 2 }, [
52
53
  n.character ? {
53
54
  name: "character",
54
55
  fn: x(() => [
55
- g(p.$slots, "character")
56
+ k(p.$slots, "character")
56
57
  ]),
57
58
  key: "0"
58
59
  } : void 0
@@ -44,6 +44,10 @@ export type ApFormItemProps = FormItemProps & Partial<ApFormColProps> & {
44
44
  * @returns
45
45
  */
46
46
  customFilled?: (value: any) => boolean;
47
+ /**
48
+ * 是否禁用,禁用时将会有特殊样式,配合bordered=true使用生效
49
+ */
50
+ disabled?: boolean;
47
51
  };
48
52
  export type ApFormItemGroupProps = RowProps & {
49
53
  countPerRow?: number;
@@ -1,15 +1,15 @@
1
- import { defineComponent as A, useSlots as D, ref as c, onMounted as L, computed as M, unref as t, cloneVNode as $, createBlock as v, openBlock as y, mergeProps as j, createSlots as q, withCtx as a, resolveDynamicComponent as E, renderList as K, createElementVNode as O, normalizeClass as Q, createVNode as s, normalizeStyle as U, renderSlot as Y, normalizeProps as G, guardReactiveProps as H } from "vue";
1
+ import { defineComponent as D, useSlots as L, ref as c, onMounted as _, computed as M, unref as l, cloneVNode as $, createBlock as v, openBlock as y, mergeProps as j, createSlots as q, withCtx as a, resolveDynamicComponent as E, renderList as K, createElementVNode as O, normalizeClass as Q, createVNode as u, normalizeStyle as U, renderSlot as Y, normalizeProps as G, guardReactiveProps as H } from "vue";
2
2
  import { Form as J, Tooltip as W, TypographyText as X } from "@aplus-frontend/antdv";
3
3
  import { useToken as Z } from "@aplus-frontend/antdv/es/theme/internal";
4
- import { isFunction as F, cloneDeep as ee, isArray as oe, omit as b } from "lodash-unified";
5
- import { apFormItemColPropKeys as te } from "../constant.mjs";
6
- import { QuestionCircleOutlined as le } from "@ant-design/icons-vue";
4
+ import { isFunction as b, cloneDeep as ee, isArray as oe, omit as F } from "lodash-unified";
5
+ import { apFormItemColPropKeys as le } from "../constant.mjs";
6
+ import { QuestionCircleOutlined as te } from "@ant-design/icons-vue";
7
7
  import "../../config-provider/index.mjs";
8
8
  import { useInjectForm as re } from "../context.mjs";
9
9
  import { isPromise as ae } from "@fruits-chain/utils";
10
10
  import { getValidVNodeList as ne } from "../../utils/slot.mjs";
11
11
  import { useNamespace as ie } from "../../config-provider/hooks/use-namespace.mjs";
12
- const Ve = /* @__PURE__ */ A({
12
+ const Ve = /* @__PURE__ */ D({
13
13
  name: "ApFormItem",
14
14
  __name: "index",
15
15
  props: {
@@ -53,28 +53,29 @@ const Ve = /* @__PURE__ */ A({
53
53
  _signal: {},
54
54
  transform: {},
55
55
  description: {},
56
- customFilled: {}
56
+ customFilled: {},
57
+ disabled: { type: Boolean }
57
58
  },
58
59
  setup(V, { expose: g }) {
59
- const e = V, u = D(), { model: m, updateModel: B, internalInstance: h } = re(), { m: d, b: x } = ie("ap-form-item"), i = c(!1), r = c(), [, C] = Z();
60
- L(async () => {
61
- let o = F(e.initialValue) ? e.initialValue() : e.initialValue;
60
+ const e = V, d = L(), { model: m, updateModel: B, internalInstance: h } = re(), { m: i, b: C } = ie("ap-form-item"), s = c(!1), r = c(), [, k] = Z();
61
+ _(async () => {
62
+ let o = b(e.initialValue) ? e.initialValue() : e.initialValue;
62
63
  ae(o) && (o = await o), h?.registerField({
63
64
  name: e.name,
64
65
  initialValue: ee(o),
65
66
  transform: e.transform
66
67
  });
67
68
  });
68
- const f = M(() => e.name ? oe(e.name) ? e.name.reduce((o, l) => o?.[l], t(m)) : m?.value[e.name] : null);
69
- function k() {
70
- const o = u.default?.() || [];
69
+ const f = M(() => e.name ? oe(e.name) ? e.name.reduce((o, t) => o?.[t], l(m)) : m?.value[e.name] : null);
70
+ function x() {
71
+ const o = d.default?.() || [];
71
72
  if (!e.name)
72
73
  return o[0];
73
- const l = ne(o)[0];
74
- return l ? $(l, {
75
- [e.valuePropName]: t(f),
74
+ const t = ne(o)[0];
75
+ return t ? $(t, {
76
+ [e.valuePropName]: l(f),
76
77
  [`onUpdate:${e.valuePropName}`]: N,
77
- variant: e.bordered ? "borderless" : l?.props?.variant,
78
+ variant: e.bordered ? "borderless" : t?.props?.variant,
78
79
  onFocus: P,
79
80
  onBlur: I
80
81
  }) : null;
@@ -83,10 +84,10 @@ const Ve = /* @__PURE__ */ A({
83
84
  B?.(e.name, o);
84
85
  }
85
86
  function P() {
86
- i.value = !0;
87
+ s.value = !0;
87
88
  }
88
89
  function I() {
89
- i.value = !1;
90
+ s.value = !1;
90
91
  }
91
92
  function S() {
92
93
  r.value?.onFieldBlur();
@@ -97,39 +98,40 @@ const Ve = /* @__PURE__ */ A({
97
98
  function w() {
98
99
  r.value?.clearValidate();
99
100
  }
100
- function _() {
101
+ function z() {
101
102
  r.value?.resetField();
102
103
  }
103
- function z(o = !1) {
104
- const l = t(f);
104
+ function R(o = !1) {
105
+ const t = l(f);
105
106
  if (!o || !e.transform)
106
- return l;
107
- const n = F(e.transform) ? e.transform : e.transform.transformer;
108
- return e.transform ? n(l) : l;
107
+ return t;
108
+ const n = b(e.transform) ? e.transform : e.transform.transformer;
109
+ return e.transform ? n(t) : t;
109
110
  }
110
111
  return g({
111
112
  onFieldBlur: S,
112
113
  onFieldChange: T,
113
114
  clearValidate: w,
114
- resetField: _,
115
- getFieldValue: z
116
- }), (o, l) => (y(), v(t(J).Item, j(
115
+ resetField: z,
116
+ getFieldValue: R
117
+ }), (o, t) => (y(), v(l(J).Item, j(
117
118
  {
118
119
  ref_key: "formItemRef",
119
120
  ref: r
120
121
  },
121
- t(b)(e, [...t(te), "tooltip", "label", "description"]),
122
+ l(F)(e, [...l(le), "tooltip", "label", "description"]),
122
123
  {
123
124
  class: {
124
- [t(d)("bordered")]: o.bordered,
125
- [t(d)("focused")]: o.bordered && i.value,
126
- [t(x)()]: !0
125
+ [l(i)("bordered")]: o.bordered,
126
+ [l(i)("focused")]: o.bordered && s.value,
127
+ [l(i)("disabled")]: o.bordered && o.disabled,
128
+ [l(C)()]: !0
127
129
  },
128
130
  colon: o.bordered ? !1 : e.colon
129
131
  }
130
132
  ), q({
131
133
  default: a(() => [
132
- (y(), v(E(k())))
134
+ (y(), v(E(x())))
133
135
  ]),
134
136
  _: 2
135
137
  }, [
@@ -139,13 +141,13 @@ const Ve = /* @__PURE__ */ A({
139
141
  O("span", {
140
142
  class: Q(n)
141
143
  }, [
142
- s(t(W), {
144
+ u(l(W), {
143
145
  title: e.tooltip
144
146
  }, {
145
147
  default: a(() => [
146
- s(t(le), {
148
+ u(l(te), {
147
149
  style: U({
148
- color: t(C).colorTextTertiary,
150
+ color: l(k).colorTextTertiary,
149
151
  fontSize: "14px",
150
152
  transform: "translateY(1px)"
151
153
  })
@@ -160,7 +162,7 @@ const Ve = /* @__PURE__ */ A({
160
162
  o.label ? {
161
163
  name: "label",
162
164
  fn: a(() => [
163
- s(t(X), {
165
+ u(l(X), {
164
166
  content: o.label,
165
167
  ellipsis: { tooltip: o.label },
166
168
  style: { "min-width": "0px", flex: "1" }
@@ -168,10 +170,10 @@ const Ve = /* @__PURE__ */ A({
168
170
  ]),
169
171
  key: "1"
170
172
  } : void 0,
171
- K(t(b)(u, "default"), (n, p) => ({
173
+ K(l(F)(d, "default"), (n, p) => ({
172
174
  name: p,
173
- fn: a((R) => [
174
- Y(o.$slots, p, G(H(R || {})))
175
+ fn: a((A) => [
176
+ Y(o.$slots, p, G(H(A || {})))
175
177
  ])
176
178
  }))
177
179
  ]), 1040, ["class", "colon"]));
@@ -48,12 +48,12 @@ const w = /* @__PURE__ */ f({
48
48
  transform: {},
49
49
  description: {},
50
50
  customFilled: {},
51
- field: { default: () => ({}) },
52
- disabled: { type: Boolean, default: void 0 }
51
+ disabled: { type: Boolean, default: void 0 },
52
+ field: { default: () => ({}) }
53
53
  },
54
- setup(d) {
55
- const s = d, n = m();
56
- return (e, h) => (c(), u(y, a(t(o(i)(s, ["field", "disabled"]))), b({
54
+ setup(s) {
55
+ const d = s, n = m();
56
+ return (e, h) => (c(), u(y, a(t(o(i)(d, ["field"]))), b({
57
57
  default: r(() => [
58
58
  B(o(g), _({ disabled: e.disabled }, e.field), null, 16, ["disabled"])
59
59
  ]),