@aplus-frontend/ui 6.33.0 → 6.35.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 (70) hide show
  1. package/es/src/ag-grid/components/tooltip/index.vue.d.ts +6 -0
  2. package/es/src/ag-grid/components/tooltip/index.vue.mjs +4 -0
  3. package/es/src/ag-grid/components/tooltip/index.vue2.mjs +29 -0
  4. package/es/src/ag-grid/hooks/use-columns-def.d.ts +1 -0
  5. package/es/src/ag-grid/hooks/use-columns-def.mjs +94 -87
  6. package/es/src/ag-grid/hooks/use-selection-col-def.mjs +28 -22
  7. package/es/src/ag-grid/index.vue.mjs +164 -161
  8. package/es/src/ag-grid/interface.d.ts +5 -1
  9. package/es/src/ap-download/ap-download.vue.mjs +31 -25
  10. package/es/src/ap-form/ap-form.vue.d.ts +2 -6
  11. package/es/src/ap-form/ap-form.vue2.mjs +71 -69
  12. package/es/src/ap-grid/editable/form-item.vue.mjs +74 -71
  13. package/es/src/ap-grid/editable/index.vue.mjs +94 -91
  14. package/es/src/ap-grid/index.vue.mjs +74 -69
  15. package/es/src/ap-pro-card/components/statistic/index.vue.d.ts +1 -1
  16. package/es/src/ap-table/ap-table.vue2.mjs +72 -69
  17. package/es/src/ap-tag/ap-tag-group.vue.mjs +33 -30
  18. package/es/src/ap-upload/components/SingleFile.vue2.mjs +103 -103
  19. package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +21 -18
  20. package/es/src/business/ap-attachment/ApAttachment.mjs +16 -15
  21. package/es/src/business/ap-copy/ApCopy.mjs +5 -6
  22. package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue2.mjs +176 -175
  23. package/es/src/business/ap-keep-alive/keeper/ap-view-keeper.mjs +4 -4
  24. package/es/src/business/ap-label/ApLabel.d.ts +1 -1
  25. package/es/src/business/ap-label/index.d.ts +3 -3
  26. package/es/src/business/hooks/usePageListApTable.mjs +10 -9
  27. package/es/src/editable-table/form-item.vue.mjs +75 -72
  28. package/es/src/editable-table/hooks/use-get-columns.mjs +35 -34
  29. package/es/src/editable-table/index.vue.mjs +68 -65
  30. package/es/src/utils/warning.d.ts +25 -0
  31. package/es/src/utils/warning.mjs +74 -0
  32. package/es/src/version.d.ts +1 -1
  33. package/es/src/version.mjs +1 -1
  34. package/lib/src/ag-grid/components/tooltip/index.vue.d.ts +6 -0
  35. package/lib/src/ag-grid/components/tooltip/index.vue.js +1 -0
  36. package/lib/src/ag-grid/components/tooltip/index.vue2.js +1 -0
  37. package/lib/src/ag-grid/hooks/use-columns-def.d.ts +1 -0
  38. package/lib/src/ag-grid/hooks/use-columns-def.js +1 -1
  39. package/lib/src/ag-grid/hooks/use-selection-col-def.js +1 -1
  40. package/lib/src/ag-grid/index.vue.js +1 -1
  41. package/lib/src/ag-grid/interface.d.ts +5 -1
  42. package/lib/src/ap-download/ap-download.vue.js +1 -1
  43. package/lib/src/ap-form/ap-form.vue.d.ts +2 -6
  44. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  45. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  46. package/lib/src/ap-grid/editable/index.vue.js +1 -1
  47. package/lib/src/ap-grid/index.vue.js +1 -1
  48. package/lib/src/ap-pro-card/components/statistic/index.vue.d.ts +1 -1
  49. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  50. package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
  51. package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
  52. package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
  53. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  54. package/lib/src/business/ap-copy/ApCopy.js +1 -1
  55. package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue2.js +1 -1
  56. package/lib/src/business/ap-keep-alive/keeper/ap-view-keeper.js +1 -1
  57. package/lib/src/business/ap-label/ApLabel.d.ts +1 -1
  58. package/lib/src/business/ap-label/index.d.ts +3 -3
  59. package/lib/src/business/hooks/usePageListApTable.js +1 -1
  60. package/lib/src/editable-table/form-item.vue.js +1 -1
  61. package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
  62. package/lib/src/editable-table/index.vue.js +1 -1
  63. package/lib/src/utils/warning.d.ts +25 -0
  64. package/lib/src/utils/warning.js +1 -0
  65. package/lib/src/version.d.ts +1 -1
  66. package/lib/src/version.js +1 -1
  67. package/package.json +1 -1
  68. package/theme/ag-grid/index.css +5 -1
  69. package/theme/ag-grid/index.less +5 -1
  70. package/theme/index.css +5 -1
@@ -1,12 +1,12 @@
1
- import { defineComponent as F, ref as L, useSlots as S, computed as t, unref as s, createBlock as x, openBlock as l, mergeProps as A, withCtx as j, createElementVNode as p, normalizeClass as I, createElementBlock as m, createCommentVNode as u, createVNode as M, renderSlot as T, toDisplayString as U } from "vue";
1
+ import { defineComponent as F, ref as L, useSlots as S, computed as t, unref as a, createBlock as x, openBlock as i, mergeProps as A, withCtx as j, createElementVNode as m, normalizeClass as I, createElementBlock as u, createCommentVNode as f, createVNode as M, renderSlot as T, toDisplayString as U } from "vue";
2
2
  import { Button as V } from "@aplus-frontend/antdv";
3
3
  import { LoadingOutlined as D } from "@ant-design/icons-vue";
4
4
  import "../config-provider/index.mjs";
5
5
  import { useOssInit as E } from "./hooks/index.mjs";
6
- import { getFileInfo as f } from "./utils/getFileInfo.mjs";
6
+ import { getFileInfo as g } from "./utils/getFileInfo.mjs";
7
7
  import { useStyle as P } from "./hooks/useStyle.mjs";
8
8
  import { useLocale as G } from "../config-provider/hooks/use-locale.mjs";
9
- import { useGlobalConfig as i } from "../config-provider/hooks/use-global-config.mjs";
9
+ import { useGlobalConfig as r } from "../config-provider/hooks/use-global-config.mjs";
10
10
  const R = {
11
11
  key: 0,
12
12
  class: "spin"
@@ -43,27 +43,33 @@ const R = {
43
43
  getOssAccess: {}
44
44
  },
45
45
  emits: ["downloadCallback"],
46
- setup(g, { emit: y }) {
47
- const C = y, n = L(!1), { lang: b } = G(), h = S(), w = t(() => b.value === "zh-cn" ? "zh_CN" : "en_US"), N = i("uiMode"), e = g, _ = i("apUpload"), r = i(
46
+ setup(y, { emit: C }) {
47
+ const N = C, n = L(!1), { lang: b } = G(), v = S(), h = t(() => b.value === "zh-cn" ? "zh_CN" : "en_US"), w = r("uiMode"), e = y, l = r("apUpload"), c = r(
48
48
  "downloadCenterTriggerConfig"
49
- ), c = t(() => e.disabled), v = t(() => e.color ? e.color : N.value === "aplus" ? "#0070FF" : "#1890FF"), k = t(() => e.size), { getInnerWrapperClass: B } = P(v, k, c), z = t(() => e.getOssAccess || _.value?.getOssAccess), O = async () => {
49
+ ), d = t(() => e.disabled), _ = t(() => e.color ? e.color : w.value === "aplus" ? "#0070FF" : "#1890FF"), k = t(() => e.size), { getInnerWrapperClass: B } = P(_, k, d), z = t(() => e.getOssAccess || l.value?.getOssAccess), O = async () => {
50
50
  if (!e.disabled) {
51
51
  n.value = !0;
52
52
  try {
53
- if (r.value?.trigger) {
54
- let a = f(e.needName, e.fileName).map((d) => ({
55
- objectName: d.path,
56
- fileName: d.fileName
53
+ if (c.value?.trigger) {
54
+ let s = g(
55
+ e.needName ?? l?.value?.needName,
56
+ e.fileName
57
+ ).map((p) => ({
58
+ objectName: p.path,
59
+ fileName: p.fileName
57
60
  }));
58
- await r.value?.trigger(a);
61
+ await c.value?.trigger(s);
59
62
  } else {
60
- const a = await (await E(
63
+ const s = await (await E(
61
64
  z.value,
62
- s(w)
65
+ a(h)
63
66
  )).downloadFile(
64
- f(e.needName, e.fileName)
67
+ g(
68
+ e.needName ?? l?.value?.needName,
69
+ e.fileName
70
+ )
65
71
  );
66
- C("downloadCallback", a);
72
+ N("downloadCallback", s);
67
73
  }
68
74
  } catch (o) {
69
75
  console.error(o);
@@ -72,23 +78,23 @@ const R = {
72
78
  }
73
79
  }
74
80
  };
75
- return (o, a) => (l(), x(s(V), A(e, {
81
+ return (o, s) => (i(), x(a(V), A(e, {
76
82
  type: e.type,
77
83
  size: e.size,
78
- disabled: c.value,
84
+ disabled: d.value,
79
85
  onClick: O
80
86
  }), {
81
87
  default: j(() => [
82
- p("div", {
83
- class: I(s(B))
88
+ m("div", {
89
+ class: I(a(B))
84
90
  }, [
85
- n.value ? (l(), m("span", R, [
86
- M(s(D), { spin: !0 })
87
- ])) : u("", !0),
88
- s(h).icon ? (l(), m("span", W, [
91
+ n.value ? (i(), u("span", R, [
92
+ M(a(D), { spin: !0 })
93
+ ])) : f("", !0),
94
+ a(v).icon ? (i(), u("span", W, [
89
95
  T(o.$slots, "icon")
90
- ])) : u("", !0),
91
- p("span", $, U(o.text), 1)
96
+ ])) : f("", !0),
97
+ m("span", $, U(o.text), 1)
92
98
  ], 2)
93
99
  ]),
94
100
  _: 3
@@ -370,9 +370,7 @@ declare function __VLS_template(): {
370
370
  default: string | number | ColSize;
371
371
  };
372
372
  xxl: {
373
- type: **
374
- * 执行Watch回调
375
- */).PropType<string | number | ColSize>;
373
+ type: PropType<string | number | ColSize>;
376
374
  default: string | number | ColSize;
377
375
  };
378
376
  prefixCls: StringConstructor;
@@ -1042,9 +1040,7 @@ declare const __VLS_component: DefineComponent<ApFormProps, {
1042
1040
  default: string | number | ColSize;
1043
1041
  };
1044
1042
  xxl: {
1045
- type: **
1046
- * 执行Watch回调
1047
- */).PropType<string | number | ColSize>;
1043
+ type: PropType<string | number | ColSize>;
1048
1044
  default: string | number | ColSize;
1049
1045
  };
1050
1046
  prefixCls: StringConstructor;
@@ -1,15 +1,16 @@
1
- import { defineComponent as z, reactive as ee, ref as j, unref as h, nextTick as te, toRaw as P, watch as re, onWatcherCleanup as oe, computed as ne, createBlock as ie, openBlock as le, mergeProps as se, withCtx as ae, renderSlot as ue } from "vue";
2
- import { Form as ce } from "@aplus-frontend/antdv";
3
- import { useProvideForm as fe } from "./context.mjs";
4
- import { isArray as f, cloneDeep as de, isEqual as ge, isFunction as M, isPlainObject as R, omit as pe } from "lodash-unified";
5
- import { useUrlSearchParams as me } from "@vueuse/core";
6
- import { INTERNAL_FORM_INSTANCE_MARK as he } from "./constant.mjs";
7
- import { getRouteType as Fe, isDef as T } from "../utils/index.mjs";
8
- import ye from "./utils/set.mjs";
9
- import { genParams as B, setToParams as A } from "./utils/params.mjs";
10
- import { useInjectFormProvider as Te } from "./provider/context.mjs";
11
- import { getModelValue as x } from "./utils/get.mjs";
12
- const we = /* @__PURE__ */ z({
1
+ import { defineComponent as te, reactive as re, ref as O, unref as h, nextTick as oe, toRaw as P, watch as ne, onWatcherCleanup as ie, computed as le, createBlock as se, openBlock as ae, mergeProps as ue, withCtx as ce, renderSlot as fe } from "vue";
2
+ import { Form as de } from "@aplus-frontend/antdv";
3
+ import { useProvideForm as ge } from "./context.mjs";
4
+ import { isArray as f, cloneDeep as pe, isEqual as me, isFunction as M, isPlainObject as R, omit as he } from "lodash-unified";
5
+ import { useUrlSearchParams as Fe } from "@vueuse/core";
6
+ import { INTERNAL_FORM_INSTANCE_MARK as j } from "./constant.mjs";
7
+ import { getRouteType as ye, isDef as T } from "../utils/index.mjs";
8
+ import Te from "./utils/set.mjs";
9
+ import { genParams as B, setToParams as x } from "./utils/params.mjs";
10
+ import { useInjectFormProvider as Ve } from "./provider/context.mjs";
11
+ import { getModelValue as W } from "./utils/get.mjs";
12
+ import { useDevWarning as ve } from "../utils/warning.mjs";
13
+ const Oe = /* @__PURE__ */ te({
13
14
  name: "ApForm",
14
15
  __name: "ap-form",
15
16
  props: {
@@ -58,11 +59,11 @@ const we = /* @__PURE__ */ z({
58
59
  }
59
60
  y();
60
61
  }
61
- const s = j(), v = me(Fe()), F = Te(), C = j(
62
+ const s = O(), v = Fe(ye()), F = Ve(), q = ve("ApForm"), C = O(
62
63
  n.syncToUrl ? B(n.syncToUrl, v, "get") : {}
63
64
  );
64
- let d = de(_()), g = {};
65
- const l = ee(_());
65
+ let d = pe(_()), g = {};
66
+ const l = re(_());
66
67
  let p = [];
67
68
  function _() {
68
69
  const e = n.initialValues || {};
@@ -74,13 +75,13 @@ const we = /* @__PURE__ */ z({
74
75
  ...e
75
76
  };
76
77
  }
77
- function W(e) {
78
+ function D(e) {
78
79
  const t = m(e, g);
79
- F.triggerFormFinish(n.name, e), n.syncToUrl && A(v, B(n.syncToUrl, t, "set")), n.onFinish?.(t);
80
+ F.triggerFormFinish(n.name, e), n.syncToUrl && x(v, B(n.syncToUrl, t, "set")), n.onFinish?.(t);
80
81
  }
81
- const q = async () => {
82
- s.value?.resetFields(), await te(() => {
83
- Object.keys(l).forEach((e) => delete l[e]), Object.assign(l, d), y(), n.syncToUrl && A(
82
+ const K = async () => {
83
+ s.value?.resetFields(), await oe(() => {
84
+ Object.keys(l).forEach((e) => delete l[e]), Object.assign(l, d), y(), n.syncToUrl && x(
84
85
  v,
85
86
  B(
86
87
  n.syncToUrl,
@@ -89,20 +90,20 @@ const we = /* @__PURE__ */ z({
89
90
  )
90
91
  );
91
92
  });
92
- }, D = (e) => {
93
+ }, L = (e) => {
93
94
  s.value?.clearValidate(e);
94
- }, k = (e, t) => s.value?.validateFields(e, t), K = async (e, t) => {
95
+ }, $ = (e, t) => s.value?.validateFields(e, t), k = async (e, t) => {
95
96
  const r = await s.value?.validateFields(
96
97
  e,
97
98
  t
98
99
  );
99
100
  return m(r, g);
100
- }, b = (e) => e === !0 ? P(l) : s.value?.getFieldsValue(e), L = (e) => {
101
+ }, b = (e) => e === !0 ? P(l) : s.value?.getFieldsValue(e), G = (e) => {
101
102
  const t = b(e);
102
103
  return m(t, g);
103
- }, $ = (e, t) => s.value?.validate(e, t), G = (e, t = {}) => {
104
+ }, H = (e, t) => s.value?.validate(e, t), J = (e, t = {}) => {
104
105
  s.value?.scrollToField(e, t);
105
- }, H = (e) => {
106
+ }, Q = (e) => {
106
107
  Object.assign(l, e), y();
107
108
  }, I = (e, t, r = !0, o) => {
108
109
  V(e, t, r, o), y();
@@ -112,7 +113,7 @@ const we = /* @__PURE__ */ z({
112
113
  p = p.filter((t) => t !== e);
113
114
  };
114
115
  }
115
- function J(e, t) {
116
+ function X(e, t) {
116
117
  if (f(e)) {
117
118
  let r = d;
118
119
  for (let o = 0; o < e.length - 1; o++)
@@ -121,17 +122,17 @@ const we = /* @__PURE__ */ z({
121
122
  } else
122
123
  d[e] = t;
123
124
  }
124
- function Q(e, t) {
125
+ function Y(e, t) {
125
126
  if (!T(e) || !T(t))
126
127
  return;
127
- const r = x(d, t);
128
- if (ge(r, e))
128
+ const r = W(d, t);
129
+ if (me(r, e))
129
130
  return;
130
- const o = x(h(C), t);
131
- T(o) && n.syncToUrlPriority || (V(t, e, !1), J(t, e));
131
+ const o = W(h(C), t);
132
+ T(o) && n.syncToUrlPriority || (V(t, e, !1), X(t, e));
132
133
  }
133
- function X(e, t) {
134
- t && (g = ye(
134
+ function Z(e, t) {
135
+ t && (g = Te(
135
136
  g,
136
137
  [e].flat(1),
137
138
  t,
@@ -139,22 +140,23 @@ const we = /* @__PURE__ */ z({
139
140
  ));
140
141
  }
141
142
  function w({ initialValue: e, name: t, transform: r }) {
142
- Q(e, t), X(t, r);
143
+ Y(e, t), Z(t, r);
143
144
  }
144
- function E() {
145
+ function A() {
145
146
  return d;
146
147
  }
147
- function Y(e) {
148
- if (e !== he) {
149
- console.warn("getInternalInstance should only used at internal");
150
- return;
151
- }
152
- return {
153
- registerField: w,
154
- registerWatch: U,
155
- setFieldValue: I,
156
- getInitialValues: E
157
- };
148
+ function z(e) {
149
+ if (q(
150
+ e === j,
151
+ "usage",
152
+ "getInternalInstance should only used at internal"
153
+ ), e === j)
154
+ return {
155
+ registerField: w,
156
+ registerWatch: U,
157
+ setFieldValue: I,
158
+ getInitialValues: A
159
+ };
158
160
  }
159
161
  function y() {
160
162
  if (p.length) {
@@ -169,10 +171,10 @@ const we = /* @__PURE__ */ z({
169
171
  return;
170
172
  let r = f(e) ? [] : {};
171
173
  return Object.keys(e).forEach((o) => {
172
- const a = e[o], i = t?.[o], u = M(i) ? i : i?.transformer, Z = M(i) ? !0 : i?.flat;
174
+ const a = e[o], i = t?.[o], u = M(i) ? i : i?.transformer, ee = M(i) ? !0 : i?.flat;
173
175
  if (M(u)) {
174
176
  const c = u(a);
175
- Z ? f(c) && f(r) ? r = [...r, ...c] : R(c) && R(r) ? r = {
177
+ ee ? f(c) && f(r) ? r = [...r, ...c] : R(c) && R(r) ? r = {
176
178
  ...r,
177
179
  ...c
178
180
  } : r[o] = c : r[o] = c;
@@ -186,45 +188,45 @@ const we = /* @__PURE__ */ z({
186
188
  r[o] = a;
187
189
  }), r;
188
190
  }
189
- const O = {
190
- resetFields: q,
191
- clearValidate: D,
192
- validateFields: k,
191
+ const E = {
192
+ resetFields: K,
193
+ clearValidate: L,
194
+ validateFields: $,
193
195
  getFieldsValue: b,
194
- validate: $,
195
- scrollToField: G,
196
- setFieldsValue: H,
196
+ validate: H,
197
+ scrollToField: J,
198
+ setFieldsValue: Q,
197
199
  setFieldValue: I,
198
200
  registerWatch: U,
199
- validateFieldsReturnTransformed: K,
200
- getFieldsValueTransformed: L,
201
- getInternalInstance: Y
201
+ validateFieldsReturnTransformed: k,
202
+ getFieldsValueTransformed: G,
203
+ getInternalInstance: z
202
204
  };
203
- return re(
205
+ return ne(
204
206
  () => n.name,
205
207
  (e) => {
206
- e && (F.registerForm(e, O), oe(() => {
208
+ e && (F.registerForm(e, E), ie(() => {
207
209
  F.unregisterForm(n.name);
208
210
  }));
209
211
  },
210
212
  {
211
213
  immediate: !0
212
214
  }
213
- ), fe({
214
- model: ne(() => l),
215
+ ), ge({
216
+ model: le(() => l),
215
217
  updateModel: V,
216
218
  internalInstance: {
217
219
  registerWatch: U,
218
220
  registerField: w,
219
221
  setFieldValue: I,
220
- getInitialValues: E
222
+ getInitialValues: A
221
223
  }
222
- }), S(O), (e, t) => (le(), ie(h(ce), se(
224
+ }), S(E), (e, t) => (ae(), se(h(de), ue(
223
225
  {
224
226
  ref_key: "formRef",
225
227
  ref: s
226
228
  },
227
- h(pe)(n, [
229
+ h(he)(n, [
228
230
  "initialValues",
229
231
  "onValuesChange",
230
232
  "onFinish",
@@ -234,16 +236,16 @@ const we = /* @__PURE__ */ z({
234
236
  {
235
237
  model: l,
236
238
  "data-form-name": e.name,
237
- onFinish: W
239
+ onFinish: D
238
240
  }
239
241
  ), {
240
- default: ae(() => [
241
- ue(e.$slots, "default")
242
+ default: ce(() => [
243
+ fe(e.$slots, "default")
242
244
  ]),
243
245
  _: 3
244
246
  }, 16, ["model", "data-form-name"]));
245
247
  }
246
248
  });
247
249
  export {
248
- we as default
250
+ Oe as default
249
251
  };
@@ -1,16 +1,17 @@
1
- import { defineComponent as O, useSlots as z, toRef as K, ref as c, unref as s, watch as H, nextTick as P, createBlock as A, openBlock as W, mergeProps as h, withCtx as y, createVNode as G, createSlots as U, renderList as $, renderSlot as q, normalizeProps as J, guardReactiveProps as Q } from "vue";
2
- import { ApForm as g } from "../../ap-form/index.mjs";
1
+ import { defineComponent as O, useSlots as z, toRef as G, ref as c, unref as s, watch as K, nextTick as P, createBlock as A, openBlock as H, mergeProps as g, withCtx as h, createVNode as W, createSlots as U, renderList as $, renderSlot as q, normalizeProps as J, guardReactiveProps as Q } from "vue";
2
+ import { ApForm as y } from "../../ap-form/index.mjs";
3
3
  import { isUndefined as X, isNumber as d, cloneDeep as Y, isArray as Z, omit as M } from "lodash-unified";
4
4
  import "../../config-provider/index.mjs";
5
5
  import { isDef as C } from "../../utils/index.mjs";
6
6
  import { useGetEditableColumns as ee } from "../hooks/use-editable-columns.mjs";
7
7
  import "../index.vue2.mjs";
8
8
  import { useInjectForm as te } from "../../ap-form/context.mjs";
9
- import { getModelValue as oe } from "../../ap-form/utils/get.mjs";
10
- import { useNamespace as ae } from "../../config-provider/hooks/use-namespace.mjs";
9
+ import { getModelValue as ae } from "../../ap-form/utils/get.mjs";
10
+ import { useDevWarning as oe } from "../../utils/warning.mjs";
11
+ import { useNamespace as ne } from "../../config-provider/hooks/use-namespace.mjs";
11
12
  import { useGlobalConfig as le } from "../../config-provider/hooks/use-global-config.mjs";
12
- import ne from "../index.vue.mjs";
13
- const Ce = /* @__PURE__ */ O({
13
+ import re from "../index.vue.mjs";
14
+ const xe = /* @__PURE__ */ O({
14
15
  name: "EditableGridFormItem",
15
16
  __name: "form-item",
16
17
  props: {
@@ -166,120 +167,122 @@ const Ce = /* @__PURE__ */ O({
166
167
  setup(w, {
167
168
  expose: b
168
169
  }) {
169
- const x = z(), a = w, {
170
+ const x = z(), o = w;
171
+ oe("EditableGridFormItem")(!1, "breaking", "EditableGridFormItem has been EOL, Please use EditableAgGridFormItem(https://aplus.aplnk.com/aplus-ui/components/ag-grid/editable/) instead.");
172
+ const {
170
173
  b: R
171
- } = ae("editable-grid"), {
172
- internalInstance: f,
174
+ } = ne("editable-grid"), {
175
+ internalInstance: i,
173
176
  model: B
174
- } = te(), m = K(a.name), i = c(oe(s(B), m.value) || []), S = g.useWatch(m);
175
- H(() => S.value, async (e) => {
176
- await P(), i.value = e, a.onChange?.(e);
177
+ } = te(), m = G(o.name), f = c(ae(s(B), m.value) || []), F = y.useWatch(m);
178
+ K(() => F.value, async (e) => {
179
+ await P(), f.value = e, o.onChange?.(e);
177
180
  }, {
178
181
  deep: !0
179
182
  });
180
- const p = c(), v = le("valueTypeMap"), F = ee(a, v);
181
- function N(e, l) {
182
- const r = s(i)?.length || 0;
183
- if (C(a.maxLength) && r >= a.maxLength)
183
+ const p = c(), S = le("valueTypeMap"), v = ee(o, S);
184
+ function I(e, n) {
185
+ const r = s(f)?.length || 0;
186
+ if (C(o.maxLength) && r >= o.maxLength)
184
187
  return;
185
188
  const t = {
186
189
  ...e || {}
187
190
  };
188
- f?.setFieldValue(a.name, t, !0, (o, n) => {
189
- if (!o[n]) {
190
- o[n] = [t];
191
+ i?.setFieldValue(o.name, t, !0, (a, l) => {
192
+ if (!a[l]) {
193
+ a[l] = [t];
191
194
  return;
192
195
  }
193
- X(l) ? o[n].push(t) : o[n].splice(l, 0, t);
196
+ X(n) ? a[l].push(t) : a[l].splice(n, 0, t);
194
197
  });
195
198
  }
196
- function D(e, l = "suffix") {
197
- const r = s(i)?.length || 0, t = d(e) ? e : e.length;
198
- if (C(a.maxLength) && r + t > a.maxLength)
199
+ function N(e, n = "suffix") {
200
+ const r = s(f)?.length || 0, t = d(e) ? e : e.length;
201
+ if (C(o.maxLength) && r + t > o.maxLength)
199
202
  return;
200
- const o = d(e) ? new Array(e).fill(0).map(() => ({})) : Y(e);
201
- f?.setFieldValue(a.name, o, !0, (n, u) => {
202
- if (!n[u]) {
203
- n[u] = [...o];
203
+ const a = d(e) ? new Array(e).fill(0).map(() => ({})) : Y(e);
204
+ i?.setFieldValue(o.name, a, !0, (l, u) => {
205
+ if (!l[u]) {
206
+ l[u] = [...a];
204
207
  return;
205
208
  }
206
- l === "suffix" ? n[u].push(...o) : n[u].unshift(...o);
209
+ n === "suffix" ? l[u].push(...a) : l[u].unshift(...a);
207
210
  });
208
211
  }
209
- function I(e) {
210
- const l = new Set(d(e) ? [e] : e);
211
- f?.setFieldValue(a.name, void 0, !0, (r, t) => {
212
- r[t] = r[t].filter((o, n) => !l.has(n));
212
+ function D(e) {
213
+ const n = new Set(d(e) ? [e] : e);
214
+ i?.setFieldValue(o.name, void 0, !0, (r, t) => {
215
+ r[t] = r[t].filter((a, l) => !n.has(l));
213
216
  });
214
217
  }
215
- function V(e) {
216
- const l = new Set(Z(e) ? e : [e]);
217
- l.size !== 0 && f?.setFieldValue?.(a.name, void 0, !0, (r, t) => {
218
- r[t] = r[t].filter((o) => !l.has(o[a.rowKey]));
218
+ function E(e) {
219
+ const n = new Set(Z(e) ? e : [e]);
220
+ n.size !== 0 && i?.setFieldValue?.(o.name, void 0, !0, (r, t) => {
221
+ r[t] = r[t].filter((a) => !n.has(a[o.rowKey]));
219
222
  });
220
223
  }
221
- function L() {
222
- return s(i);
224
+ function k() {
225
+ return s(f);
223
226
  }
224
- function T(e) {
225
- return s(i)?.[e];
227
+ function L(e) {
228
+ return s(f)?.[e];
226
229
  }
227
- function k(e, l, r = !0) {
228
- f?.setFieldValue(a.name, void 0, !0, (t, o) => {
229
- if (!(!t[o] || !t[o][e])) {
230
+ function V(e, n, r = !0) {
231
+ i?.setFieldValue(o.name, void 0, !0, (t, a) => {
232
+ if (!(!t[a] || !t[a][e])) {
230
233
  if (!r) {
231
- const n = Object.keys(t[o][e]);
232
- for (const u of n)
233
- u !== a.rowKey && delete t[o][e][u];
234
+ const l = Object.keys(t[a][e]);
235
+ for (const u of l)
236
+ u !== o.rowKey && delete t[a][e][u];
234
237
  }
235
- Object.assign(t[o][e], {
236
- ...l
238
+ Object.assign(t[a][e], {
239
+ ...n
237
240
  });
238
241
  }
239
242
  });
240
243
  }
241
- function _(e) {
242
- f?.setFieldValue(a.name, e);
244
+ function T(e) {
245
+ i?.setFieldValue(o.name, e);
243
246
  }
244
- function j(e) {
245
- const l = e === "end" ? i.value.length - 1 : e;
246
- p.value?.scrollToRow(l);
247
+ function _(e) {
248
+ const n = e === "end" ? f.value.length - 1 : e;
249
+ p.value?.scrollToRow(n);
247
250
  }
248
- function E() {
249
- f?.setFieldValue?.(a.name, []);
251
+ function j() {
252
+ i?.setFieldValue?.(o.name, []);
250
253
  }
251
254
  return b({
252
- add: N,
253
- remove: I,
254
- getRowData: T,
255
- getRowsData: L,
256
- setRowData: k,
257
- addMultiple: D,
258
- scrollTo: j,
259
- setTableData: _,
260
- clear: E,
261
- removeByKey: V
262
- }), (e, l) => (W(), A(s(g).FormItem, h(e.formItem, {
255
+ add: I,
256
+ remove: D,
257
+ getRowData: L,
258
+ getRowsData: k,
259
+ setRowData: V,
260
+ addMultiple: N,
261
+ scrollTo: _,
262
+ setTableData: T,
263
+ clear: j,
264
+ removeByKey: E
265
+ }), (e, n) => (H(), A(s(y).FormItem, g(e.formItem, {
263
266
  name: e.name,
264
267
  label: e.label
265
268
  }), {
266
- default: y(() => [G(ne, h(s(M)(a, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue", "formItem"]), {
269
+ default: h(() => [W(re, g(s(M)(o, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue", "formItem"]), {
267
270
  ref_key: "tableRef",
268
271
  ref: p,
269
272
  class: s(R)(),
270
- columns: s(F),
271
- "data-source": i.value,
273
+ columns: s(v),
274
+ "data-source": f.value,
272
275
  "search-form": !1
273
276
  }), U({
274
277
  _: 2
275
278
  }, [$(x, (r, t) => ({
276
279
  name: t,
277
- fn: y((o) => [q(e.$slots, t, J(Q(o || {})))])
280
+ fn: h((a) => [q(e.$slots, t, J(Q(a || {})))])
278
281
  }))]), 1040, ["class", "columns", "data-source"])]),
279
282
  _: 3
280
283
  }, 16, ["name", "label"]));
281
284
  }
282
285
  });
283
286
  export {
284
- Ce as default
287
+ xe as default
285
288
  };