@aplus-frontend/ui 7.7.8 → 7.7.10

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 (47) hide show
  1. package/es/src/ag-grid/editable/form-item.vue.mjs +67 -66
  2. package/es/src/ag-grid/hooks/use-editable-form-item-api.d.ts +1 -0
  3. package/es/src/ag-grid/hooks/use-editable-form-item-api.mjs +98 -94
  4. package/es/src/ap-action/item-dropdown/index.vue.mjs +23 -21
  5. package/es/src/ap-action/item-popconfirm/index.vue.d.ts +1 -0
  6. package/es/src/ap-action/style/dropdown-item.mjs +7 -9
  7. package/es/src/ap-action/style/index.d.ts +3 -0
  8. package/es/src/ap-action/style/index.mjs +22 -26
  9. package/es/src/ap-field/style/textarea.mjs +10 -4
  10. package/es/src/ap-field/text-area/index.vue.mjs +24 -23
  11. package/es/src/ap-form/ap-form.vue2.mjs +27 -27
  12. package/es/src/ap-form/drawer-form/index.vue.d.ts +4 -4
  13. package/es/src/ap-form/interface.d.ts +2 -1
  14. package/es/src/ap-form/modal-form/index.vue.d.ts +4 -4
  15. package/es/src/ap-form/search-form/index.vue.d.ts +2 -2
  16. package/es/src/ap-form/style/item.mjs +13 -19
  17. package/es/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
  18. package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +1 -1
  19. package/es/src/check-card/style/index.mjs +39 -37
  20. package/es/src/version.d.ts +1 -1
  21. package/es/src/version.mjs +1 -1
  22. package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
  23. package/lib/src/ag-grid/hooks/use-editable-form-item-api.d.ts +1 -0
  24. package/lib/src/ag-grid/hooks/use-editable-form-item-api.js +1 -1
  25. package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
  26. package/lib/src/ap-action/item-popconfirm/index.vue.d.ts +1 -0
  27. package/lib/src/ap-action/style/dropdown-item.js +1 -1
  28. package/lib/src/ap-action/style/index.d.ts +3 -0
  29. package/lib/src/ap-action/style/index.js +1 -1
  30. package/lib/src/ap-field/style/textarea.js +1 -1
  31. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  32. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  33. package/lib/src/ap-form/drawer-form/index.vue.d.ts +4 -4
  34. package/lib/src/ap-form/interface.d.ts +2 -1
  35. package/lib/src/ap-form/modal-form/index.vue.d.ts +4 -4
  36. package/lib/src/ap-form/search-form/index.vue.d.ts +2 -2
  37. package/lib/src/ap-form/style/item.js +1 -1
  38. package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
  39. package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +1 -1
  40. package/lib/src/check-card/style/index.js +1 -1
  41. package/lib/src/version.d.ts +1 -1
  42. package/lib/src/version.js +1 -1
  43. package/package.json +3 -3
  44. package/es/src/check-card/group/style/css.d.ts +0 -1
  45. package/es/src/check-card/group/style/index.d.ts +0 -1
  46. package/lib/src/check-card/group/style/css.d.ts +0 -1
  47. package/lib/src/check-card/group/style/index.d.ts +0 -1
@@ -1,13 +1,12 @@
1
- import { resetComponent as s } from "../../style/index.mjs";
2
- import { genComponentStyleHook as d } from "../../utils/cssinjs/index.mjs";
3
- const p = (o) => {
1
+ import { resetComponent as t } from "../../style/index.mjs";
2
+ import { genComponentStyleHook as s } from "../../utils/cssinjs/index.mjs";
3
+ const d = (o) => {
4
4
  const {
5
- loadingOpacity: r,
6
- colorLink: n,
7
- colorLinkHover: a,
8
- colorSuccess: l,
9
- colorError: c,
10
- colorWarn: e,
5
+ loadingOpacity: n,
6
+ colorLink: r,
7
+ colorSuccess: a,
8
+ colorError: l,
9
+ colorWarn: c,
11
10
  componentCls: i
12
11
  } = o;
13
12
  return {
@@ -19,41 +18,38 @@ const p = (o) => {
19
18
  textAlign: "center",
20
19
  gap: o.spaceXS,
21
20
  cursor: "pointer",
22
- ...s(o),
21
+ ...t(o),
22
+ [`&:not(${i}--disabled):hover`]: {
23
+ opacity: 0.7
24
+ },
23
25
  "&--primary": {
24
- color: n,
25
- [`&:not(${i}--disabled):hover`]: {
26
- color: a
27
- },
26
+ color: r,
28
27
  [`&${i}--disabled`]: {
29
28
  color: o.colorLinkDisabled
30
29
  }
31
30
  },
32
31
  "&--success": {
33
- color: l,
32
+ color: a,
34
33
  [`&${i}--disabled`]: {
35
34
  color: o.colorSuccessDisabled
36
35
  }
37
36
  },
38
37
  "&--error": {
39
- color: c,
38
+ color: l,
40
39
  [`&${i}--disabled`]: {
41
40
  color: o.colorErrorDisabled
42
41
  }
43
42
  },
44
43
  "&--warn": {
45
- color: e,
44
+ color: c,
46
45
  [`&${i}--disabled`]: {
47
46
  color: o.colorWarnDisabled
48
47
  }
49
48
  },
50
49
  "&--loading": {
51
- opacity: r,
50
+ opacity: n,
52
51
  transition: `opacity ${o.motionDurationMid}`,
53
52
  cursor: "default",
54
- // [`${componentCls}-loading-icon`]: {
55
- // marginRight: token.spaceXS
56
- // },
57
53
  [`&${i}--disabled`]: {
58
54
  opacity: 1
59
55
  }
@@ -71,7 +67,7 @@ const p = (o) => {
71
67
  display: "inline-block",
72
68
  lineHeight: 0,
73
69
  transition: ["width", "opacity", "margin"].map(
74
- (t) => `${t} ${o.motionDurationSlow} ${o.apActionLoadingIconEase}`
70
+ (e) => `${e} ${o.motionDurationSlow} ${o.apActionLoadingIconEase}`
75
71
  ).join(",")
76
72
  },
77
73
  [`${i}-loading-icon-motion`]: {
@@ -90,9 +86,9 @@ const p = (o) => {
90
86
  }
91
87
  }
92
88
  };
93
- }, u = d(
89
+ }, g = s(
94
90
  "ApAction",
95
- (o) => [p(o)],
91
+ (o) => [d(o)],
96
92
  {
97
93
  loadingOpacity: 0.35,
98
94
  apActionLoadingIconEase: "cubic-bezier(0.645, 0.045, 0.355, 1)"
@@ -102,6 +98,6 @@ const p = (o) => {
102
98
  }
103
99
  );
104
100
  export {
105
- u as default,
106
- p as genActionItemStyle
101
+ g as default,
102
+ d as genActionItemStyle
107
103
  };
@@ -1,13 +1,19 @@
1
- const a = (e) => {
2
- const { componentCls: r } = e;
1
+ const t = (a) => {
2
+ const { componentCls: e } = a;
3
3
  return {
4
- [`${r}-text-area`]: {
4
+ [`${e}-textarea--read`]: {
5
5
  whiteSpace: "pre-wrap",
6
6
  wordWrap: "break-word",
7
7
  wordBreak: "break-all"
8
+ },
9
+ [`${e}-textarea`]: {
10
+ "&.ant-input-affix-wrapper-textarea-with-clear-btn .ant-input-clear-icon": {
11
+ insetBlockStart: "9px"
12
+ // (28 - 10) / 2
13
+ }
8
14
  }
9
15
  };
10
16
  };
11
17
  export {
12
- a as genTextareaStyle
18
+ t as genTextareaStyle
13
19
  };
@@ -1,13 +1,13 @@
1
- import { defineComponent as h, shallowRef as B, computed as b, createElementBlock as I, createBlock as A, openBlock as p, normalizeClass as C, unref as e, toDisplayString as g, mergeProps as z } from "vue";
2
- import { isNil as T, omit as w } from "lodash-unified";
1
+ import { defineComponent as B, shallowRef as b, computed as I, createElementBlock as A, createBlock as C, openBlock as s, normalizeClass as g, unref as e, toDisplayString as z, mergeProps as T } from "vue";
2
+ import { isNil as w, omit as k } from "lodash-unified";
3
3
  import "../../hooks/index.mjs";
4
4
  import "../../config-provider/index.mjs";
5
- import { Input as k } from "@aplus-frontend/antdv";
6
- import { useDefaultPlaceholder as R } from "../hooks/use-default-placeholder.mjs";
7
- import S from "../style/index.mjs";
8
- import { useControllableValue as _ } from "../../hooks/useControllableValue.mjs";
9
- import { useNamespace as U } from "../../config-provider/hooks/use-namespace.mjs";
10
- const O = /* @__PURE__ */ h({
5
+ import { Input as R } from "@aplus-frontend/antdv";
6
+ import { useDefaultPlaceholder as S } from "../hooks/use-default-placeholder.mjs";
7
+ import _ from "../style/index.mjs";
8
+ import { useControllableValue as U } from "../../hooks/useControllableValue.mjs";
9
+ import { useNamespace as V } from "../../config-provider/hooks/use-namespace.mjs";
10
+ const q = /* @__PURE__ */ B({
11
11
  name: "ApFieldTextArea",
12
12
  __name: "index",
13
13
  props: {
@@ -62,36 +62,37 @@ const O = /* @__PURE__ */ h({
62
62
  beforeInput: {}
63
63
  },
64
64
  emits: ["update:value"],
65
- setup(s, { expose: i, emit: d }) {
66
- const o = B(), a = s, m = d, { value: l, updateValue: c } = _(a, m), { b: f } = U("field-text-area"), y = S("field"), x = R("TextArea", a);
67
- function v(t) {
68
- const n = t.target.value || "", r = a.beforeInput ? a.beforeInput?.(n) : n, u = o.value?.$el?.querySelector("textarea");
69
- u && (u.value = r), c(r);
65
+ setup(i, { expose: d, emit: c }) {
66
+ const o = b(), a = i, m = c, { value: l, updateValue: f } = U(a, m), { b: y, m: x } = V("field-textarea"), r = _("field"), v = S("TextArea", a);
67
+ function h(t) {
68
+ const n = t.target.value || "", u = a.beforeInput ? a.beforeInput?.(n) : n, p = o.value?.$el?.querySelector("textarea");
69
+ p && (p.value = u), f(u);
70
70
  }
71
- return i({
71
+ return d({
72
72
  focus: (t) => {
73
73
  o.value?.focus(t);
74
74
  },
75
75
  blur: () => {
76
76
  o.value?.blur();
77
77
  },
78
- resizableTextArea: b(() => o.value?.resizableTextArea)
79
- }), (t, n) => t.mode === "read" ? (p(), I("span", {
78
+ resizableTextArea: I(() => o.value?.resizableTextArea)
79
+ }), (t, n) => t.mode === "read" ? (s(), A("span", {
80
80
  key: 0,
81
- class: C([e(f)(), e(y)])
82
- }, g(e(T)(e(l)) || e(l) === "" ? t.emptyText : e(l)), 3)) : (p(), A(e(k).TextArea, z(
81
+ class: g([e(x)("read"), e(r)])
82
+ }, z(e(w)(e(l)) || e(l) === "" ? t.emptyText : e(l)), 3)) : (s(), C(e(R).TextArea, T(
83
83
  { key: 1 },
84
- e(w)(a, ["onUpdate:value", "value", "beforeInput", "emptyText"]),
84
+ e(k)(a, ["onUpdate:value", "value", "beforeInput", "emptyText"]),
85
85
  {
86
86
  ref_key: "textAreaRef",
87
87
  ref: o,
88
- placeholder: e(x),
88
+ placeholder: e(v),
89
89
  value: e(l),
90
- onInput: v
90
+ class: [e(y)(), e(r)],
91
+ onInput: h
91
92
  }
92
- ), null, 16, ["placeholder", "value"]));
93
+ ), null, 16, ["placeholder", "value", "class"]));
93
94
  }
94
95
  });
95
96
  export {
96
- O as default
97
+ q as default
97
98
  };
@@ -1,12 +1,12 @@
1
- import { defineComponent as ee, reactive as te, shallowRef as re, ref as oe, unref as h, nextTick as ne, toRaw as P, watch as ie, onWatcherCleanup as le, computed as se, createBlock as ae, openBlock as ue, mergeProps as ce, withCtx as fe, renderSlot as de } from "vue";
1
+ import { defineComponent as ee, reactive as te, shallowRef as re, ref as oe, unref as h, nextTick as ne, toRaw as R, watch as ie, onWatcherCleanup as le, computed as se, createBlock as ae, openBlock as ue, mergeProps as ce, withCtx as fe, renderSlot as de } from "vue";
2
2
  import { Form as ge } from "@aplus-frontend/antdv";
3
3
  import { useProvideForm as me } from "./context.mjs";
4
- import { isArray as f, cloneDeep as pe, isEqual as he, isFunction as R, isPlainObject as M, omit as Fe } from "lodash-unified";
4
+ import { isArray as f, cloneDeep as pe, isEqual as he, isFunction as M, isPlainObject as B, omit as Fe } from "lodash-unified";
5
5
  import { useUrlSearchParams as ye } from "@vueuse/core";
6
6
  import { INTERNAL_FORM_INSTANCE_MARK as O } from "./constant.mjs";
7
7
  import { getRouteType as Te } from "../utils/index.mjs";
8
8
  import Ve from "./utils/set.mjs";
9
- import { genParams as B, setToParams as j } from "./utils/params.mjs";
9
+ import { genParams as _, setToParams as j } from "./utils/params.mjs";
10
10
  import { useInjectFormProvider as ve } from "./provider/context.mjs";
11
11
  import { getModelValue as x } from "./utils/get.mjs";
12
12
  import { useDevWarning as Ce } from "../utils/warning.mjs";
@@ -61,12 +61,12 @@ const xe = /* @__PURE__ */ ee({
61
61
  y();
62
62
  }
63
63
  const s = re(), v = ye(Te()), F = ve(), S = Ce("ApForm"), C = oe(
64
- n.syncToUrl ? B(n.syncToUrl, v, "get") : {}
64
+ n.syncToUrl ? _(n.syncToUrl, v, "get") : {}
65
65
  );
66
- let d = pe(_()), g = {};
67
- const l = te(_());
66
+ let d = pe(b()), g = {};
67
+ const l = te(b());
68
68
  let m = [];
69
- function _() {
69
+ function b() {
70
70
  const e = n.initialValues || {};
71
71
  return n.syncToUrlPriority ? {
72
72
  ...e,
@@ -78,13 +78,13 @@ const xe = /* @__PURE__ */ ee({
78
78
  }
79
79
  function q(e) {
80
80
  const t = p(e, g);
81
- F.triggerFormFinish(n.name, e), n.syncToUrl && j(v, B(n.syncToUrl, t, "set")), n.onFinish?.(t);
81
+ F.triggerFormFinish(n.name, e), n.syncToUrl && j(v, _(n.syncToUrl, t, "set")), n.onFinish?.(t);
82
82
  }
83
83
  const D = async () => {
84
84
  s.value?.resetFields(), await ne(() => {
85
85
  Object.keys(l).forEach((e) => delete l[e]), Object.assign(l, d), y(), n.syncToUrl && j(
86
86
  v,
87
- B(
87
+ _(
88
88
  n.syncToUrl,
89
89
  p(d, g),
90
90
  "set"
@@ -99,18 +99,18 @@ const xe = /* @__PURE__ */ ee({
99
99
  t
100
100
  );
101
101
  return p(r, g);
102
- }, b = (e) => e === !0 ? P(l) : s.value?.getFieldsValue(e), k = (e) => {
103
- const t = b(e);
102
+ }, I = (e) => e === !0 ? R(l) : s.value?.getFieldsValue(e), k = (e) => {
103
+ const t = I(e);
104
104
  return p(t, g);
105
105
  }, G = (e, t) => s.value?.validate(e, t), H = (e, t = {}) => {
106
106
  s.value?.scrollToField(e, t);
107
107
  }, J = (e) => {
108
108
  Object.assign(l, e), y();
109
- }, I = (e, t, r = !0, o) => {
109
+ }, U = (e, t, r = !0, o) => {
110
110
  V(e, t, r, o), y();
111
111
  };
112
- function U(e) {
113
- return e(P(l)), m.push(e), () => {
112
+ function P(e) {
113
+ return e(R(l)), m.push(e), () => {
114
114
  m = m.filter((t) => t !== e);
115
115
  };
116
116
  }
@@ -154,14 +154,14 @@ const xe = /* @__PURE__ */ ee({
154
154
  ), e === O)
155
155
  return {
156
156
  registerField: w,
157
- registerWatch: U,
158
- setFieldValue: I,
157
+ registerWatch: P,
158
+ setFieldValue: U,
159
159
  getInitialValues: A
160
160
  };
161
161
  }
162
162
  function y() {
163
163
  if (m.length) {
164
- const e = P(l);
164
+ const e = R(l);
165
165
  m.forEach((t) => {
166
166
  t(e);
167
167
  });
@@ -172,14 +172,14 @@ const xe = /* @__PURE__ */ ee({
172
172
  return;
173
173
  let r = f(e) ? [] : {};
174
174
  return Object.keys(e).forEach((o) => {
175
- const a = e[o], i = t?.[o], u = R(i) ? i : i?.transformer, z = R(i) ? !0 : i?.flat;
176
- if (R(u)) {
177
- const c = u(a);
178
- z ? f(c) && f(r) ? r = [...r, ...c] : M(c) && M(r) ? r = {
175
+ const a = e[o], i = t?.[o], u = M(i) ? i : i?.transformer, z = M(i) ? !0 : i?.flat;
176
+ if (M(u)) {
177
+ const c = u(a, { getFieldsValue: I });
178
+ z ? f(c) && f(r) ? r = [...r, ...c] : B(c) && B(r) ? r = {
179
179
  ...r,
180
180
  ...c
181
181
  } : r[o] = c : r[o] = c;
182
- } else if (M(a) || f(a)) {
182
+ } else if (B(a) || f(a)) {
183
183
  const c = p(
184
184
  a,
185
185
  i
@@ -193,12 +193,12 @@ const xe = /* @__PURE__ */ ee({
193
193
  resetFields: D,
194
194
  clearValidate: K,
195
195
  validateFields: L,
196
- getFieldsValue: b,
196
+ getFieldsValue: I,
197
197
  validate: G,
198
198
  scrollToField: H,
199
199
  setFieldsValue: J,
200
- setFieldValue: I,
201
- registerWatch: U,
200
+ setFieldValue: U,
201
+ registerWatch: P,
202
202
  validateFieldsReturnTransformed: $,
203
203
  getFieldsValueTransformed: k,
204
204
  getInternalInstance: Z
@@ -217,9 +217,9 @@ const xe = /* @__PURE__ */ ee({
217
217
  model: se(() => l),
218
218
  updateModel: V,
219
219
  internalInstance: {
220
- registerWatch: U,
220
+ registerWatch: P,
221
221
  registerField: w,
222
- setFieldValue: I,
222
+ setFieldValue: U,
223
223
  getInitialValues: A
224
224
  }
225
225
  }), N(E), (e, t) => (ue(), ae(h(ge), ce(
@@ -829,7 +829,7 @@ declare function __VLS_template(): {
829
829
  validateOnRuleChange: boolean;
830
830
  validateTrigger: string | string[];
831
831
  syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
832
- }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "registerWatch" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | ("layout" | "colon" | "labelAlign" | "hideRequiredMark" | "validateOnRuleChange" | "validateTrigger" | "syncToUrl")> & ShallowUnwrapRef<{
832
+ }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "getFieldsValue" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "validate" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | "registerWatch" | ("layout" | "colon" | "labelAlign" | "hideRequiredMark" | "validateOnRuleChange" | "validateTrigger" | "syncToUrl")> & ShallowUnwrapRef<{
833
833
  setFieldsValue: (fields: Partial<any>) => void;
834
834
  setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
835
835
  resetFields: () => Promise<void>;
@@ -852,13 +852,13 @@ declare function __VLS_template(): {
852
852
  };
853
853
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
854
854
  declare const __VLS_component: DefineComponent<ApFormDrawerFormProps, {
855
- validate: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
855
+ getFieldsValue: (nameList?: true | InternalNamePath[]) => Partial<any> | undefined;
856
856
  setFieldsValue: (fields: Partial<any>) => void;
857
857
  setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
858
858
  resetFields: () => Promise<void>;
859
859
  clearValidate: (name?: NamePath) => void;
860
860
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
861
- getFieldsValue: (nameList?: true | InternalNamePath[]) => Partial<any> | undefined;
861
+ validate: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
862
862
  scrollToField: (name: NamePath, options?: any) => void;
863
863
  getInternalInstance: (mark: string) => ApFormInternalInstance | undefined;
864
864
  validateFieldsReturnTransformed: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
@@ -1792,7 +1792,7 @@ declare const __VLS_component: DefineComponent<ApFormDrawerFormProps, {
1792
1792
  validateOnRuleChange: boolean;
1793
1793
  validateTrigger: string | string[];
1794
1794
  syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
1795
- }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "registerWatch" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | ("layout" | "colon" | "labelAlign" | "hideRequiredMark" | "validateOnRuleChange" | "validateTrigger" | "syncToUrl")> & ShallowUnwrapRef<{
1795
+ }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "getFieldsValue" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "validate" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | "registerWatch" | ("layout" | "colon" | "labelAlign" | "hideRequiredMark" | "validateOnRuleChange" | "validateTrigger" | "syncToUrl")> & ShallowUnwrapRef<{
1796
1796
  setFieldsValue: (fields: Partial<any>) => void;
1797
1797
  setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
1798
1798
  resetFields: () => Promise<void>;
@@ -4,9 +4,10 @@ import { InternalNamePath, NamePath, ValidateOptions } from '@aplus-frontend/ant
4
4
  import { LiteralUnion, Recordable } from '../type';
5
5
  import { VNode } from 'vue';
6
6
  import { BreakPointType } from './search-form/hooks/use-count-per-row';
7
+ import { ApFormInstance } from './provider/interface';
7
8
  export type { ApFormChangeInfo, ApFormFinishInfo } from './provider/interface';
8
9
  export type ApFormColProps = Omit<ColProps, 'prefixCls'>;
9
- export type ApFormItemTransformFn = (value: any) => any;
10
+ export type ApFormItemTransformFn = (value: any, api?: Pick<ApFormInstance, 'getFieldsValue'>) => any;
10
11
  export type ApFormItemTransformType = ApFormItemTransformFn | {
11
12
  transformer: ApFormItemTransformFn;
12
13
  /**
@@ -830,7 +830,7 @@ declare function __VLS_template(): {
830
830
  validateOnRuleChange: boolean;
831
831
  validateTrigger: string | string[];
832
832
  syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
833
- }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "registerWatch" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | ("layout" | "colon" | "labelAlign" | "hideRequiredMark" | "validateOnRuleChange" | "validateTrigger" | "syncToUrl")> & ShallowUnwrapRef<{
833
+ }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "getFieldsValue" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "validate" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | "registerWatch" | ("layout" | "colon" | "labelAlign" | "hideRequiredMark" | "validateOnRuleChange" | "validateTrigger" | "syncToUrl")> & ShallowUnwrapRef<{
834
834
  setFieldsValue: (fields: Partial<any>) => void;
835
835
  setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
836
836
  resetFields: () => Promise<void>;
@@ -853,13 +853,13 @@ declare function __VLS_template(): {
853
853
  };
854
854
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
855
855
  declare const __VLS_component: DefineComponent<ApFormModalFormProps, {
856
- validate: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
856
+ getFieldsValue: (nameList?: true | InternalNamePath[]) => Partial<any> | undefined;
857
857
  setFieldsValue: (fields: Partial<any>) => void;
858
858
  setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
859
859
  resetFields: () => Promise<void>;
860
860
  clearValidate: (name?: NamePath) => void;
861
861
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
862
- getFieldsValue: (nameList?: true | InternalNamePath[]) => Partial<any> | undefined;
862
+ validate: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
863
863
  scrollToField: (name: NamePath, options?: any) => void;
864
864
  getInternalInstance: (mark: string) => ApFormInternalInstance | undefined;
865
865
  validateFieldsReturnTransformed: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
@@ -2033,7 +2033,7 @@ declare const __VLS_component: DefineComponent<ApFormModalFormProps, {
2033
2033
  validateOnRuleChange: boolean;
2034
2034
  validateTrigger: string | string[];
2035
2035
  syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
2036
- }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "registerWatch" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | ("layout" | "colon" | "labelAlign" | "hideRequiredMark" | "validateOnRuleChange" | "validateTrigger" | "syncToUrl")> & ShallowUnwrapRef<{
2036
+ }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "getFieldsValue" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "validate" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | "registerWatch" | ("layout" | "colon" | "labelAlign" | "hideRequiredMark" | "validateOnRuleChange" | "validateTrigger" | "syncToUrl")> & ShallowUnwrapRef<{
2037
2037
  setFieldsValue: (fields: Partial<any>) => void;
2038
2038
  setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
2039
2039
  resetFields: () => Promise<void>;
@@ -829,7 +829,7 @@ declare function __VLS_template(): {
829
829
  validateOnRuleChange: boolean;
830
830
  validateTrigger: string | string[];
831
831
  syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
832
- }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "registerWatch" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | ("layout" | "colon" | "labelAlign" | "hideRequiredMark" | "validateOnRuleChange" | "validateTrigger" | "syncToUrl")> & ShallowUnwrapRef<{
832
+ }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "getFieldsValue" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "validate" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | "registerWatch" | ("layout" | "colon" | "labelAlign" | "hideRequiredMark" | "validateOnRuleChange" | "validateTrigger" | "syncToUrl")> & ShallowUnwrapRef<{
833
833
  setFieldsValue: (fields: Partial<any>) => void;
834
834
  setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
835
835
  resetFields: () => Promise<void>;
@@ -1817,7 +1817,7 @@ declare const __VLS_component: DefineComponent<ApFormSearchFormProps, {
1817
1817
  validateOnRuleChange: boolean;
1818
1818
  validateTrigger: string | string[];
1819
1819
  syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
1820
- }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "registerWatch" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | ("layout" | "colon" | "labelAlign" | "hideRequiredMark" | "validateOnRuleChange" | "validateTrigger" | "syncToUrl")> & ShallowUnwrapRef<{
1820
+ }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "getFieldsValue" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "validate" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | "registerWatch" | ("layout" | "colon" | "labelAlign" | "hideRequiredMark" | "validateOnRuleChange" | "validateTrigger" | "syncToUrl")> & ShallowUnwrapRef<{
1821
1821
  setFieldsValue: (fields: Partial<any>) => void;
1822
1822
  setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
1823
1823
  resetFields: () => Promise<void>;
@@ -1,8 +1,8 @@
1
- import { genComponentStyleHook as i } from "../../utils/cssinjs/index.mjs";
2
- const r = (n) => {
3
- const { componentCls: a, namespace: t } = n, e = `${a}--disabled`;
1
+ import { genComponentStyleHook as r } from "../../utils/cssinjs/index.mjs";
2
+ const o = (n) => {
3
+ const { componentCls: e, namespace: a } = n, i = `${e}--disabled`, t = n.calc(n.controlHeight).sub(n.calc(n.lineWidth).mul(2)).equal();
4
4
  return {
5
- [a]: {
5
+ [e]: {
6
6
  // bordered
7
7
  "&--bordered": {
8
8
  boxSizing: "border-box",
@@ -12,7 +12,7 @@ const r = (n) => {
12
12
  ".ant-input-affix-wrapper": {
13
13
  padding: 0
14
14
  },
15
- [`&:has(.${t}-batch-input-group):has(.ant-select)`]: {
15
+ [`&:has(.${a}-batch-input-group):has(.ant-select)`]: {
16
16
  ".ant-input-affix-wrapper": {
17
17
  paddingInlineEnd: n.space
18
18
  }
@@ -23,7 +23,7 @@ const r = (n) => {
23
23
  paddingInlineStart: 0
24
24
  }
25
25
  },
26
- [`&:has(div.${t}-batch-input-group .ant-input)`]: {
26
+ [`&:has(div.${a}-batch-input-group .ant-input)`]: {
27
27
  paddingInlineEnd: n.space,
28
28
  ".ant-input": {
29
29
  paddingInlineStart: 0
@@ -52,7 +52,7 @@ const r = (n) => {
52
52
  background: "unset !important"
53
53
  },
54
54
  ".ant-select-single .ant-select-selector": {
55
- height: `${n.controlHeight} !important`
55
+ height: `${t} !important`
56
56
  },
57
57
  "input.ant-input-number-input": {
58
58
  paddingInlineStart: 0
@@ -72,25 +72,25 @@ const r = (n) => {
72
72
  },
73
73
  ".ant-form-item-label > label": {
74
74
  paddingRight: n.spaceLG,
75
- height: n.controlHeight,
75
+ height: t,
76
76
  "&::after": {
77
77
  margin: 0
78
78
  }
79
79
  },
80
80
  ".ant-form-item-control-input": {
81
- minHeight: n.controlHeight,
81
+ minHeight: t,
82
82
  ".ant-select-single": {
83
83
  height: "unset"
84
84
  }
85
85
  },
86
- [`&:hover:not(${e})`]: {
86
+ [`&:hover:not(${i})`]: {
87
87
  borderColor: n.hoverColorBase
88
88
  },
89
89
  "&:focus": {
90
90
  borderColor: n.activeColorBase,
91
91
  boxShadow: "0 0 0 2px rgba(5, 155, 255, 0.1)"
92
92
  },
93
- [`.${t}-batch-input-group-popover-input__popover`]: {
93
+ [`.${a}-batch-input-group-popover-input__popover`]: {
94
94
  width: "calc(100% + 12px)"
95
95
  }
96
96
  },
@@ -129,17 +129,11 @@ const r = (n) => {
129
129
  paddingInline: n.space,
130
130
  flex: 1
131
131
  }
132
- },
133
- textarea: {
134
- lineHeight: "20px"
135
- },
136
- "& .ant-input-affix-wrapper-textarea-with-clear-btn .ant-input-clear-icon": {
137
- insetBlockStart: "8px"
138
132
  }
139
133
  }
140
134
  };
141
- }, p = i("ApForm", (n) => [r(n)]);
135
+ }, p = r("ApForm", (n) => [o(n)]);
142
136
  export {
143
137
  p as default,
144
- r as genApFormItemStyle
138
+ o as genApFormItemStyle
145
139
  };
@@ -820,7 +820,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
820
820
  validateOnRuleChange: boolean;
821
821
  validateTrigger: string | string[];
822
822
  syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
823
- }> & Omit<Readonly<ApFormProps> & Readonly<{}>, "validate" | "registerWatch" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | ("layout" | "colon" | "labelAlign" | "hideRequiredMark" | "validateOnRuleChange" | "validateTrigger" | "syncToUrl")> & ShallowUnwrapRef<{
823
+ }> & Omit<Readonly<ApFormProps> & Readonly<{}>, "getFieldsValue" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "validate" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | "registerWatch" | ("layout" | "colon" | "labelAlign" | "hideRequiredMark" | "validateOnRuleChange" | "validateTrigger" | "syncToUrl")> & ShallowUnwrapRef<{
824
824
  setFieldsValue: (fields: Partial<any>) => void;
825
825
  setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
826
826
  resetFields: () => Promise<void>;
@@ -821,7 +821,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
821
821
  validateOnRuleChange: boolean;
822
822
  validateTrigger: string | string[];
823
823
  syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
824
- }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "registerWatch" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | ("layout" | "colon" | "labelAlign" | "hideRequiredMark" | "validateOnRuleChange" | "validateTrigger" | "syncToUrl")> & ShallowUnwrapRef<{
824
+ }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "getFieldsValue" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "validate" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | "registerWatch" | ("layout" | "colon" | "labelAlign" | "hideRequiredMark" | "validateOnRuleChange" | "validateTrigger" | "syncToUrl")> & ShallowUnwrapRef<{
825
825
  setFieldsValue: (fields: Partial<any>) => void;
826
826
  setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
827
827
  resetFields: () => Promise<void>;