@aplus-frontend/ui 6.34.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 (55) hide show
  1. package/es/src/ag-grid/components/tooltip/index.vue2.mjs +1 -1
  2. package/es/src/ag-grid/hooks/use-selection-col-def.mjs +28 -22
  3. package/es/src/ag-grid/index.vue.mjs +77 -72
  4. package/es/src/ag-grid/interface.d.ts +5 -1
  5. package/es/src/ap-form/ap-form.vue.d.ts +2 -6
  6. package/es/src/ap-form/ap-form.vue2.mjs +71 -69
  7. package/es/src/ap-grid/editable/form-item.vue.mjs +74 -71
  8. package/es/src/ap-grid/editable/index.vue.mjs +94 -91
  9. package/es/src/ap-grid/index.vue.mjs +74 -69
  10. package/es/src/ap-pro-card/components/statistic/index.vue.d.ts +1 -1
  11. package/es/src/ap-table/ap-table.vue2.mjs +72 -69
  12. package/es/src/ap-tag/ap-tag-group.vue.mjs +33 -30
  13. package/es/src/ap-upload/components/SingleFile.vue2.mjs +103 -103
  14. package/es/src/business/ap-attachment/ApAttachment.mjs +16 -15
  15. package/es/src/business/ap-copy/ApCopy.mjs +5 -6
  16. package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue2.mjs +176 -175
  17. package/es/src/business/ap-keep-alive/keeper/ap-view-keeper.mjs +4 -4
  18. package/es/src/business/ap-label/ApLabel.d.ts +1 -1
  19. package/es/src/business/ap-label/index.d.ts +3 -3
  20. package/es/src/business/hooks/usePageListApTable.mjs +10 -9
  21. package/es/src/editable-table/form-item.vue.mjs +75 -72
  22. package/es/src/editable-table/hooks/use-get-columns.mjs +35 -34
  23. package/es/src/editable-table/index.vue.mjs +68 -65
  24. package/es/src/utils/warning.d.ts +25 -0
  25. package/es/src/utils/warning.mjs +74 -0
  26. package/es/src/version.d.ts +1 -1
  27. package/es/src/version.mjs +1 -1
  28. package/lib/src/ag-grid/components/tooltip/index.vue2.js +1 -1
  29. package/lib/src/ag-grid/hooks/use-selection-col-def.js +1 -1
  30. package/lib/src/ag-grid/index.vue.js +1 -1
  31. package/lib/src/ag-grid/interface.d.ts +5 -1
  32. package/lib/src/ap-form/ap-form.vue.d.ts +2 -6
  33. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  34. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  35. package/lib/src/ap-grid/editable/index.vue.js +1 -1
  36. package/lib/src/ap-grid/index.vue.js +1 -1
  37. package/lib/src/ap-pro-card/components/statistic/index.vue.d.ts +1 -1
  38. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  39. package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
  40. package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
  41. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  42. package/lib/src/business/ap-copy/ApCopy.js +1 -1
  43. package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue2.js +1 -1
  44. package/lib/src/business/ap-keep-alive/keeper/ap-view-keeper.js +1 -1
  45. package/lib/src/business/ap-label/ApLabel.d.ts +1 -1
  46. package/lib/src/business/ap-label/index.d.ts +3 -3
  47. package/lib/src/business/hooks/usePageListApTable.js +1 -1
  48. package/lib/src/editable-table/form-item.vue.js +1 -1
  49. package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
  50. package/lib/src/editable-table/index.vue.js +1 -1
  51. package/lib/src/utils/warning.d.ts +25 -0
  52. package/lib/src/utils/warning.js +1 -0
  53. package/lib/src/version.d.ts +1 -1
  54. package/lib/src/version.js +1 -1
  55. package/package.json +1 -1
@@ -1,16 +1,17 @@
1
- import { defineComponent as K, ref as p, unref as r, useSlots as P, toRef as A, watch as O, nextTick as G, createBlock as H, openBlock as U, mergeProps as c, withCtx as h, createVNode as W, createSlots as $, renderList as q, renderSlot as J, normalizeProps as Q, guardReactiveProps as X } from "vue";
1
+ import { defineComponent as z, ref as p, unref as r, useSlots as A, toRef as K, watch as O, nextTick as G, createBlock as W, openBlock as H, mergeProps as c, withCtx as g, createVNode as U, createSlots as $, renderList as q, renderSlot as J, normalizeProps as Q, guardReactiveProps as X } from "vue";
2
2
  import { Table as Y } from "@aplus-frontend/antdv";
3
- import { ApForm as g } from "../ap-form/index.mjs";
4
- import { isUndefined as Z, isNumber as d, cloneDeep as M, isArray as ee, omit as w } from "lodash-unified";
3
+ import { ApForm as h } from "../ap-form/index.mjs";
4
+ import { isUndefined as Z, isNumber as d, cloneDeep as M, isArray as ee, omit as b } from "lodash-unified";
5
5
  import "../config-provider/index.mjs";
6
6
  import { useInjectForm as te } from "../ap-form/context.mjs";
7
- import { isDef as x } from "../utils/index.mjs";
8
- import oe from "./hooks/use-get-columns.mjs";
9
- import { scrollToRowIndex as ae } from "./utils.mjs";
7
+ import { isDef as w } from "../utils/index.mjs";
8
+ import ae from "./hooks/use-get-columns.mjs";
9
+ import { scrollToRowIndex as oe } from "./utils.mjs";
10
10
  import { getModelValue as ne } from "../ap-form/utils/get.mjs";
11
- import { useNamespace as le } from "../config-provider/hooks/use-namespace.mjs";
12
- import { useGlobalConfig as se } from "../config-provider/hooks/use-global-config.mjs";
13
- const ye = /* @__PURE__ */ K({
11
+ import { useDevWarning as le } from "../utils/warning.mjs";
12
+ import { useNamespace as se } from "../config-provider/hooks/use-namespace.mjs";
13
+ import { useGlobalConfig as re } from "../config-provider/hooks/use-global-config.mjs";
14
+ const Re = /* @__PURE__ */ z({
14
15
  name: "EditableTableFormItem",
15
16
  __name: "form-item",
16
17
  props: {
@@ -111,116 +112,118 @@ const ye = /* @__PURE__ */ K({
111
112
  default: () => ({})
112
113
  }
113
114
  },
114
- setup(y, {
115
- expose: b
115
+ setup(x, {
116
+ expose: y
116
117
  }) {
117
- const a = y, {
118
- internalInstance: u,
118
+ const o = x;
119
+ le("EditableTableFormItem")(!1, "breaking", "EditableTableFormItem has been EOL, Please use EditableAgGridFormItem(https://aplus.aplnk.com/aplus-ui/components/ag-grid/editable/) instead.");
120
+ const {
121
+ internalInstance: i,
119
122
  model: C
120
- } = te(), i = p(ne(r(C), a.name) || []), R = P(), B = A(a, "name"), F = g.useWatch(B);
121
- O(() => F.value, async (e) => {
122
- await G(), i.value = e, a.onChange?.(e);
123
+ } = te(), u = p(ne(r(C), o.name) || []), R = A(), F = K(o, "name"), B = h.useWatch(F);
124
+ O(() => B.value, async (e) => {
125
+ await G(), u.value = e, o.onChange?.(e);
123
126
  }, {
124
127
  deep: !0
125
128
  });
126
129
  const {
127
- b: v
128
- } = le("editable-table"), m = p(), T = se("valueTypeMap"), D = oe(a, T);
129
- function I(e, n) {
130
- const l = r(i)?.length || 0;
131
- if (x(a.maxLength) && l >= a.maxLength)
130
+ b: T
131
+ } = se("editable-table"), m = p(), v = re("valueTypeMap"), I = ae(o, v);
132
+ function D(e, n) {
133
+ const l = r(u)?.length || 0;
134
+ if (w(o.maxLength) && l >= o.maxLength)
132
135
  return;
133
136
  const t = {
134
137
  ...e || {}
135
138
  };
136
- u?.setFieldValue(a.name, t, !0, (o, s) => {
137
- if (!o[s]) {
138
- o[s] = [t];
139
+ i?.setFieldValue(o.name, t, !0, (a, s) => {
140
+ if (!a[s]) {
141
+ a[s] = [t];
139
142
  return;
140
143
  }
141
- Z(n) ? o[s].push(t) : o[s].splice(n, 0, t);
144
+ Z(n) ? a[s].push(t) : a[s].splice(n, 0, t);
142
145
  });
143
146
  }
144
- function S(e, n = "suffix") {
145
- const l = r(i)?.length || 0, t = d(e) ? e : e.length;
146
- if (x(a.maxLength) && l + t > a.maxLength)
147
+ function E(e, n = "suffix") {
148
+ const l = r(u)?.length || 0, t = d(e) ? e : e.length;
149
+ if (w(o.maxLength) && l + t > o.maxLength)
147
150
  return;
148
- const o = d(e) ? new Array(e).fill(0).map(() => ({})) : M(e);
149
- u?.setFieldValue(a.name, o, !0, (s, f) => {
151
+ const a = d(e) ? new Array(e).fill(0).map(() => ({})) : M(e);
152
+ i?.setFieldValue(o.name, a, !0, (s, f) => {
150
153
  if (!s[f]) {
151
- s[f] = [...o];
154
+ s[f] = [...a];
152
155
  return;
153
156
  }
154
- n === "suffix" ? s[f].push(...o) : s[f].unshift(...o);
157
+ n === "suffix" ? s[f].push(...a) : s[f].unshift(...a);
155
158
  });
156
159
  }
157
- function V(e) {
160
+ function L(e) {
158
161
  const n = new Set(d(e) ? [e] : e);
159
- u?.setFieldValue(a.name, void 0, !0, (l, t) => {
160
- l[t] = l[t].filter((o, s) => !n.has(s));
162
+ i?.setFieldValue(o.name, void 0, !0, (l, t) => {
163
+ l[t] = l[t].filter((a, s) => !n.has(s));
161
164
  });
162
165
  }
163
- function L(e) {
166
+ function S(e) {
164
167
  const n = new Set(ee(e) ? e : [e]);
165
- n.size !== 0 && u?.setFieldValue?.(a.name, void 0, !0, (l, t) => {
166
- l[t] = l[t].filter((o) => !n.has(o[a.rowKey]));
168
+ n.size !== 0 && i?.setFieldValue?.(o.name, void 0, !0, (l, t) => {
169
+ l[t] = l[t].filter((a) => !n.has(a[o.rowKey]));
167
170
  });
168
171
  }
169
- function N() {
170
- return r(i);
172
+ function V() {
173
+ return r(u);
171
174
  }
172
- function E(e) {
173
- return r(i)?.[e];
175
+ function k(e) {
176
+ return r(u)?.[e];
174
177
  }
175
- function _(e, n, l = !0) {
176
- u?.setFieldValue(a.name, void 0, !0, (t, o) => {
177
- !t[o] || !t[o][e] || (t[o][e] = {
178
- ...l ? t[o][e] : {},
178
+ function N(e, n, l = !0) {
179
+ i?.setFieldValue(o.name, void 0, !0, (t, a) => {
180
+ !t[a] || !t[a][e] || (t[a][e] = {
181
+ ...l ? t[a][e] : {},
179
182
  ...n
180
183
  });
181
184
  });
182
185
  }
183
- function k(e) {
184
- u?.setFieldValue(a.name, e);
186
+ function _(e) {
187
+ i?.setFieldValue(o.name, e);
185
188
  }
186
- function j(e, n) {
187
- const l = e === "end" ? i.value.length - 1 : e;
188
- ae(l, m.value?.$el, n);
189
+ function P(e, n) {
190
+ const l = e === "end" ? u.value.length - 1 : e;
191
+ oe(l, m.value?.$el, n);
189
192
  }
190
- function z() {
191
- u?.setFieldValue?.(a.name, []);
193
+ function j() {
194
+ i?.setFieldValue?.(o.name, []);
192
195
  }
193
- return b({
194
- add: I,
195
- remove: V,
196
- getRowData: E,
197
- getRowsData: N,
198
- setRowData: _,
199
- addMultiple: S,
200
- scrollTo: j,
201
- setTableData: k,
202
- clear: z,
203
- removeByKey: L
204
- }), (e, n) => (U(), H(r(g).FormItem, c(e.formItem, {
196
+ return y({
197
+ add: D,
198
+ remove: L,
199
+ getRowData: k,
200
+ getRowsData: V,
201
+ setRowData: N,
202
+ addMultiple: E,
203
+ scrollTo: P,
204
+ setTableData: _,
205
+ clear: j,
206
+ removeByKey: S
207
+ }), (e, n) => (H(), W(r(h).FormItem, c(e.formItem, {
205
208
  name: e.name,
206
209
  label: e.label
207
210
  }), {
208
- default: h(() => [W(r(Y), c(r(w)(a, ["name", "maxLength", "onChange"]), {
211
+ default: g(() => [U(r(Y), c(r(b)(o, ["name", "maxLength", "onChange"]), {
209
212
  ref_key: "tableRef",
210
213
  ref: m,
211
- class: r(v)(),
212
- columns: r(D),
213
- "data-source": i.value
214
+ class: r(T)(),
215
+ columns: r(I),
216
+ "data-source": u.value
214
217
  }), $({
215
218
  _: 2
216
- }, [q(r(w)(R, ["headerCell"]), (l, t) => ({
219
+ }, [q(r(b)(R, ["headerCell"]), (l, t) => ({
217
220
  name: t,
218
- fn: h((o) => [J(e.$slots, t, Q(X(o || {})))])
221
+ fn: g((a) => [J(e.$slots, t, Q(X(a || {})))])
219
222
  }))]), 1040, ["class", "columns", "data-source"])]),
220
223
  _: 3
221
224
  }, 16, ["name", "label"]));
222
225
  }
223
226
  });
224
227
  export {
225
- ye as default
228
+ Re as default
226
229
  };
@@ -1,61 +1,62 @@
1
- import { useSlots as T, computed as C, unref as i } from "vue";
2
- import { omit as p, isFunction as N, isArray as m } from "lodash-unified";
3
- import { getEditableTableTitle as y, mergeClass as k, getFinalNode as w } from "../utils.mjs";
4
- import { updateFormProps as A, getFieldProps as q, getTableRenderProps as v } from "../../ap-table/utils.mjs";
1
+ import { useSlots as p, computed as C, unref as u } from "vue";
2
+ import { omit as N, isFunction as y, isArray as m } from "lodash-unified";
3
+ import { getEditableTableTitle as k, mergeClass as v, getFinalNode as w } from "../utils.mjs";
4
+ import { updateFormProps as A, getFieldProps as E, getTableRenderProps as q } from "../../ap-table/utils.mjs";
5
5
  import "../../config-provider/index.mjs";
6
- import { useToken as E } from "@aplus-frontend/antdv/es/theme/internal";
7
- import { useNamespace as G } from "../../config-provider/hooks/use-namespace.mjs";
8
- const K = (o, f) => {
6
+ import { useToken as D } from "@aplus-frontend/antdv/es/theme/internal";
7
+ import { useDevWarning as G } from "../../utils/warning.mjs";
8
+ import { useNamespace as S } from "../../config-provider/hooks/use-namespace.mjs";
9
+ const M = (r, f) => {
9
10
  const {
10
11
  em: b,
11
- be: x
12
- } = G("editable-table"), g = T(), [, F] = E();
12
+ be: g
13
+ } = S("editable-table"), x = G("EditableTable"), F = p(), [, T] = D();
13
14
  return C(() => {
14
- const d = o.columns;
15
+ const d = r.columns;
15
16
  if (!d)
16
17
  return [];
17
18
  function c(h) {
18
19
  return h.map((e) => ({
19
- ...p(e, ["ellipsis"]),
20
+ ...N(e, ["ellipsis"]),
20
21
  children: c(e.children || []),
21
- title: y(e, x("table-header", "title"), b("header-cell", "required"), g.headerCell, i(F).colorTextTertiary),
22
+ title: k(e, g("table-header", "title"), b("header-cell", "required"), F.headerCell, u(T).colorTextTertiary),
22
23
  customRender({
23
- value: r,
24
+ value: a,
24
25
  ...n
25
26
  }) {
26
- const t = N(e.editable) ? e.editable(n.text, n.record, n.index) : !!e.editable;
27
+ const l = y(e.editable) ? e.editable(n.text, n.record, n.index) : !!e.editable;
27
28
  if (!e.valueType && !e.customRender && !e.customRenderFormItem)
28
- return console.warn("can not render table cell because no `valueType` / `customRender` / `customRenderFormItem`"), null;
29
- let a;
30
- if (t) {
31
- const l = A(e, q(e.fieldProps, {
32
- value: r,
29
+ return x(!1, "usage", "'can not render table cell because no `valueType` / `customRender` / `customRenderFormItem`'"), null;
30
+ let t;
31
+ if (l) {
32
+ const o = A(e, E(e.fieldProps, {
33
+ value: a,
33
34
  ...n
34
- })), u = {};
35
- o.onFieldChange && (u[`onUpdate:${l.valuePropName || "value"}`] = (R) => o.onFieldChange?.(n.index, e.dataIndex, R));
35
+ })), i = {};
36
+ r.onFieldChange && (i[`onUpdate:${o.valuePropName || "value"}`] = (R) => r.onFieldChange?.(n.index, e.dataIndex, R));
36
37
  const I = m(e.dataIndex) ? e.dataIndex : [e.dataIndex];
37
- a = {
38
- name: [...m(o.name) ? o.name : [o.name], n.index, ...I],
39
- ...l || {},
38
+ t = {
39
+ name: [...m(r.name) ? r.name : [r.name], n.index, ...I],
40
+ ...o || {},
40
41
  field: {
41
42
  style: "width: 100%",
42
- ...l?.field || {},
43
- ...u,
44
- class: k("is-editable", l.class)
43
+ ...o?.field || {},
44
+ ...i,
45
+ class: v("is-editable", o.class)
45
46
  }
46
47
  };
47
48
  } else
48
- a = {
49
- field: v(e, {
50
- value: r,
49
+ t = {
50
+ field: q(e, {
51
+ value: a,
51
52
  ...n
52
53
  })
53
54
  };
54
- const s = w(e, t, a, r, n.record, i(f));
55
+ const s = w(e, l, t, a, n.record, u(f));
55
56
  return e.customRender ? e.customRender({
56
- value: r,
57
+ value: a,
57
58
  ...n,
58
- editable: t,
59
+ editable: l,
59
60
  originalNode: s
60
61
  }) : s;
61
62
  }
@@ -65,5 +66,5 @@ const K = (o, f) => {
65
66
  });
66
67
  };
67
68
  export {
68
- K as default
69
+ M as default
69
70
  };
@@ -1,16 +1,17 @@
1
- import { defineComponent as H, useSlots as W, ref as g, watch as v, unref as s, createBlock as $, openBlock as q, withCtx as p, createVNode as y, mergeProps as J, createSlots as Q, renderList as X, renderSlot as Y, normalizeProps as Z, guardReactiveProps as M } from "vue";
1
+ import { defineComponent as W, useSlots as H, ref as b, watch as v, unref as s, createBlock as $, openBlock as q, withCtx as p, createVNode as w, mergeProps as J, createSlots as Q, renderList as X, renderSlot as Y, normalizeProps as Z, guardReactiveProps as M } from "vue";
2
2
  import { Table as ee } from "@aplus-frontend/antdv";
3
3
  import { ApForm as m } from "../ap-form/index.mjs";
4
- import { isEqual as te, isArray as c, isUndefined as ae, isNumber as h, cloneDeep as ne, omit as w } from "lodash-unified";
4
+ import { isEqual as te, isArray as c, isUndefined as ae, isNumber as g, cloneDeep as ne, omit as x } from "lodash-unified";
5
5
  import "../config-provider/index.mjs";
6
6
  import "../hooks/index.mjs";
7
- import { isDef as C } from "../utils/index.mjs";
7
+ import { isDef as y } from "../utils/index.mjs";
8
8
  import { scrollToRowIndex as oe } from "./utils.mjs";
9
9
  import le from "./hooks/use-get-columns.mjs";
10
- import { useNamespace as se } from "../config-provider/hooks/use-namespace.mjs";
10
+ import { useDevWarning as se } from "../utils/warning.mjs";
11
+ import { useNamespace as re } from "../config-provider/hooks/use-namespace.mjs";
11
12
  import { useControllableValue as ue } from "../hooks/useControllableValue.mjs";
12
- import { useGlobalConfig as re } from "../config-provider/hooks/use-global-config.mjs";
13
- const Ce = /* @__PURE__ */ H({
13
+ import { useGlobalConfig as ie } from "../config-provider/hooks/use-global-config.mjs";
14
+ const Fe = /* @__PURE__ */ W({
14
15
  name: "EditableTable",
15
16
  __name: "index",
16
17
  props: {
@@ -110,133 +111,135 @@ const Ce = /* @__PURE__ */ H({
110
111
  onFieldChange: {}
111
112
  },
112
113
  emits: ["update:value"],
113
- setup(b, {
114
+ setup(C, {
114
115
  expose: R,
115
116
  emit: F
116
117
  }) {
117
- const t = b, {
118
+ const t = C;
119
+ se("EditableTable")(!1, "breaking", "EditableTable has been EOL, Please use EditableAgGrid(https://aplus.aplnk.com/aplus-ui/components/ag-grid/editable/) instead.");
120
+ const {
118
121
  b: B
119
- } = se("editable-table"), V = W(), T = F, x = g(), {
122
+ } = re("editable-table"), T = H(), E = F, h = b(), {
120
123
  value: i,
121
- updateValue: S
122
- } = ue(t, T), u = g(), D = re("valueTypeMap"), d = m.useWatch(t.name, u);
123
- v(() => d.value, (e) => {
124
- S(e), t.onChange?.(e);
124
+ updateValue: V
125
+ } = ue(t, E), r = b(), D = ie("valueTypeMap"), f = m.useWatch(t.name, r);
126
+ v(() => f.value, (e) => {
127
+ V(e), t.onChange?.(e);
125
128
  }, {
126
129
  deep: !0,
127
130
  flush: "post"
128
131
  }), v(i, (e) => {
129
- e !== s(d) && (te(e, s(d)) || u.value?.setFieldValue(t.name, e));
132
+ e !== s(f) && (te(e, s(f)) || r.value?.setFieldValue(t.name, e));
130
133
  }, {
131
134
  deep: !0
132
135
  });
133
136
  const L = le(t, D);
134
- function _() {
135
- u.value?.resetFields();
137
+ function S() {
138
+ r.value?.resetFields();
136
139
  }
137
- function E(e) {
140
+ function _(e) {
138
141
  return e ? (c(e) ? e : [e]).map((n) => c(n) ? [t.name, ...n] : [t.name, n]) : void 0;
139
142
  }
140
- async function N(e, l) {
141
- return (await u.value?.validateFields(E(e), l))?.[t.name];
143
+ async function k(e, l) {
144
+ return (await r.value?.validateFields(_(e), l))?.[t.name];
142
145
  }
143
- function k(e, l) {
146
+ function N(e, l) {
144
147
  const n = s(i)?.length || 0;
145
- if (C(t.maxLength) && n >= t.maxLength)
148
+ if (y(t.maxLength) && n >= t.maxLength)
146
149
  return;
147
150
  const a = {
148
151
  ...e || {}
149
152
  };
150
- u.value?.setFieldValue?.(t.name, a, !0, (o, r) => {
151
- if (!o[r]) {
152
- o[r] = [a];
153
+ r.value?.setFieldValue?.(t.name, a, !0, (o, u) => {
154
+ if (!o[u]) {
155
+ o[u] = [a];
153
156
  return;
154
157
  }
155
- ae(l) ? o[r].push(a) : o[r].splice(l, 0, a);
158
+ ae(l) ? o[u].push(a) : o[u].splice(l, 0, a);
156
159
  });
157
160
  }
158
161
  function A(e, l = "suffix") {
159
- const n = s(i)?.length || 0, a = h(e) ? e : e.length;
160
- if (C(t.maxLength) && n + a > t.maxLength)
162
+ const n = s(i)?.length || 0, a = g(e) ? e : e.length;
163
+ if (y(t.maxLength) && n + a > t.maxLength)
161
164
  return;
162
- const o = h(e) ? new Array(e).fill(0).map(() => ({})) : ne(e);
163
- u.value?.setFieldValue?.(t.name, o, !0, (r, f) => {
164
- if (!r[f]) {
165
- r[f] = [...o];
165
+ const o = g(e) ? new Array(e).fill(0).map(() => ({})) : ne(e);
166
+ r.value?.setFieldValue?.(t.name, o, !0, (u, d) => {
167
+ if (!u[d]) {
168
+ u[d] = [...o];
166
169
  return;
167
170
  }
168
- l === "suffix" ? r[f].push(...o) : r[f].unshift(...o);
171
+ l === "suffix" ? u[d].push(...o) : u[d].unshift(...o);
169
172
  });
170
173
  }
171
- function z(e) {
172
- const l = new Set(h(e) ? [e] : e);
173
- u.value?.setFieldValue?.(t.name, void 0, !0, (n, a) => {
174
- n[a] = n[a].filter((o, r) => !l.has(r));
174
+ function P(e) {
175
+ const l = new Set(g(e) ? [e] : e);
176
+ r.value?.setFieldValue?.(t.name, void 0, !0, (n, a) => {
177
+ n[a] = n[a].filter((o, u) => !l.has(u));
175
178
  });
176
179
  }
177
- function I(e) {
180
+ function z(e) {
178
181
  const l = new Set(c(e) ? e : [e]);
179
- l.size !== 0 && u.value?.setFieldValue?.(t.name, void 0, !0, (n, a) => {
182
+ l.size !== 0 && r.value?.setFieldValue?.(t.name, void 0, !0, (n, a) => {
180
183
  n[a] = n[a].filter((o) => !l.has(o[t.rowKey]));
181
184
  });
182
185
  }
183
- function K() {
186
+ function I() {
184
187
  return s(i);
185
188
  }
186
- function P(e) {
187
- u.value?.setFieldValue(t.name, e);
189
+ function K(e) {
190
+ r.value?.setFieldValue(t.name, e);
188
191
  }
189
- function j(e) {
192
+ function O(e) {
190
193
  return s(i)?.[e];
191
194
  }
192
- function O(e, l, n = !0) {
193
- u.value?.setFieldValue?.(t.name, void 0, !0, (a, o) => {
195
+ function j(e, l, n = !0) {
196
+ r.value?.setFieldValue?.(t.name, void 0, !0, (a, o) => {
194
197
  !a[o] || !a[o][e] || (a[o][e] = {
195
198
  ...n ? a[o][e] : {},
196
199
  ...l
197
200
  });
198
201
  });
199
202
  }
200
- function U(e, l) {
203
+ function G(e, l) {
201
204
  const n = e === "end" ? i.value.length - 1 : e;
202
- oe(n, x.value?.$el, l);
205
+ oe(n, h.value?.$el, l);
203
206
  }
204
- function G() {
205
- u.value?.setFieldValue?.(t.name, []);
207
+ function U() {
208
+ r.value?.setFieldValue?.(t.name, []);
206
209
  }
207
210
  return R({
208
- resetFields: _,
209
- validateFields: N,
210
- add: k,
211
- remove: z,
212
- getRowData: j,
213
- getRowsData: K,
214
- setRowData: O,
211
+ resetFields: S,
212
+ validateFields: k,
213
+ add: N,
214
+ remove: P,
215
+ getRowData: O,
216
+ getRowsData: I,
217
+ setRowData: j,
215
218
  addMultiple: A,
216
- scrollTo: U,
217
- clear: G,
218
- setTableData: P,
219
- removeByKey: I
219
+ scrollTo: G,
220
+ clear: U,
221
+ setTableData: K,
222
+ removeByKey: z
220
223
  }), (e, l) => (q(), $(s(m), {
221
224
  ref_key: "formRef",
222
- ref: u,
225
+ ref: r,
223
226
  "initial-values": {
224
227
  [t.name]: s(i)
225
228
  }
226
229
  }, {
227
- default: p(() => [y(s(m).FormItem, {
230
+ default: p(() => [w(s(m).FormItem, {
228
231
  name: e.name,
229
232
  "no-style": ""
230
233
  }, {
231
- default: p(() => [y(s(ee), J(s(w)(t, ["name", "value", "onUpdate:value", "maxLength", "onChange"]), {
234
+ default: p(() => [w(s(ee), J(s(x)(t, ["name", "value", "onUpdate:value", "maxLength", "onChange"]), {
232
235
  ref_key: "tableRef",
233
- ref: x,
236
+ ref: h,
234
237
  class: s(B)(),
235
238
  columns: s(L),
236
239
  "data-source": s(i)
237
240
  }), Q({
238
241
  _: 2
239
- }, [X(s(w)(V, ["headerCell"]), (n, a) => ({
242
+ }, [X(s(x)(T, ["headerCell"]), (n, a) => ({
240
243
  name: a,
241
244
  fn: p((o) => [Y(e.$slots, a, Z(M(o || {})))])
242
245
  }))]), 1040, ["class", "columns", "data-source"])]),
@@ -247,5 +250,5 @@ const Ce = /* @__PURE__ */ H({
247
250
  }
248
251
  });
249
252
  export {
250
- Ce as default
253
+ Fe as default
251
254
  };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * copy from rc-util/warnings
3
+ */
4
+ type preMessageFn = (message: string, type: 'warning' | 'note') => string | null | undefined | number;
5
+ export declare function warning(valid: boolean, message: string): void;
6
+ export declare function note(valid: boolean, message: string): void;
7
+ export declare function warningOnce(valid: boolean, message: string): void;
8
+ export declare namespace warningOnce {
9
+ var preMessage: (fn: preMessageFn) => void;
10
+ var resetWarned: () => void;
11
+ var noteOnce: (valid: boolean, message: string) => void;
12
+ }
13
+ type BaseTypeWarning = (valid: boolean,
14
+ /**
15
+ * - deprecated: Some API will be removed in future but still support now.
16
+ * - usage: Some API usage is not correct.
17
+ * - breaking: Breaking change like API is removed.
18
+ */
19
+ type: 'deprecated' | 'usage' | 'breaking', message?: string) => void;
20
+ type TypeWarning = BaseTypeWarning & {
21
+ deprecated: (valid: boolean, oldProp: string, newProp: string, message?: string) => void;
22
+ };
23
+ export declare function resetWarning(): void;
24
+ export declare function useDevWarning(component: string): TypeWarning;
25
+ export {};
@@ -0,0 +1,74 @@
1
+ let a = {};
2
+ const u = [], l = (e) => {
3
+ u.push(e);
4
+ };
5
+ function p(e, r) {
6
+ if (process.env.NODE_ENV !== "production" && !e && console !== void 0) {
7
+ const n = u.reduce(
8
+ (t, i) => i(t ?? "", "warning"),
9
+ r
10
+ );
11
+ n && console.error(`Warning: ${n}`);
12
+ }
13
+ }
14
+ function g(e, r) {
15
+ if (process.env.NODE_ENV !== "production" && !e && console !== void 0) {
16
+ const n = u.reduce(
17
+ (t, i) => i(t ?? "", "note"),
18
+ r
19
+ );
20
+ n && console.warn(`Note: ${n}`);
21
+ }
22
+ }
23
+ function d() {
24
+ a = {};
25
+ }
26
+ function f(e, r, n) {
27
+ !r && !a[n] && (e(!1, n), a[n] = !0);
28
+ }
29
+ function s(e, r) {
30
+ f(p, e, r);
31
+ }
32
+ function W(e, r) {
33
+ f(g, e, r);
34
+ }
35
+ s.preMessage = l;
36
+ s.resetWarned = d;
37
+ s.noteOnce = W;
38
+ function $() {
39
+ }
40
+ let o = null;
41
+ function w() {
42
+ d(), o = null;
43
+ }
44
+ function N(e) {
45
+ const r = (n, t, i) => {
46
+ if (!n)
47
+ if (t === "deprecated") {
48
+ const c = o;
49
+ o || (o = {}), o[e] = o[e] || [], o[e].includes(i || "") || o[e].push(i || ""), c || console.warn(
50
+ "[aplus-ui] There exists deprecated usage in your code:",
51
+ o
52
+ );
53
+ } else
54
+ s(n, `[aplus-ui: ${e}] ${i}`);
55
+ };
56
+ return r.deprecated = (n, t, i, c) => {
57
+ r(
58
+ n,
59
+ "deprecated",
60
+ `\`${t}\` is deprecated. Please use \`${i}\` instead.${c ? ` ${c}` : ""}`
61
+ );
62
+ }, process.env.NODE_ENV !== "production" ? r : (() => {
63
+ const n = () => {
64
+ };
65
+ return n.deprecated = $, n;
66
+ })();
67
+ }
68
+ export {
69
+ g as note,
70
+ w as resetWarning,
71
+ N as useDevWarning,
72
+ p as warning,
73
+ s as warningOnce
74
+ };
@@ -1,2 +1,2 @@
1
- declare const _default: "6.34.0";
1
+ declare const _default: "6.35.0";
2
2
  export default _default;
@@ -1,4 +1,4 @@
1
- const e = "6.34.0";
1
+ const e = "6.35.0";
2
2
  export {
3
3
  e as default
4
4
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../config-provider/index.js");const p=require("../../../config-provider/hooks/use-namespace.js"),d=e.defineComponent({__name:"index",props:{params:{}},setup(n){const s=n,r=e.ref(!1),{e:c}=p.useNamespace("ag-grid");return e.onMounted(()=>{const{rowIndex:t,column:o,gridWrapperRef:i,lineClamp:u}=s.params,a=i.value.querySelector(`div.ag-row[row-index="${t}"] .ag-cell[col-id="${o.colId}"] span.ag-cell-value`);if(!a){r.value=!0;return}const l=u===1?"Width":"Height";r.value=a[`scroll${l}`]>a[`client${l}`]}),(t,o)=>r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(c)("tooltip"))},e.toDisplayString(t.params.value),3)):e.createCommentVNode("",!0)}});exports.default=d;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../config-provider/index.js");const p=require("../../../config-provider/hooks/use-namespace.js"),d=e.defineComponent({__name:"index",props:{params:{}},setup(n){const s=n,r=e.ref(!1),{e:c}=p.useNamespace("ag-grid");return e.onMounted(()=>{const{rowIndex:t,column:o,gridWrapperRef:i,lineClamp:u}=s.params,a=i.value?.querySelector(`div.ag-row[row-index="${t}"] .ag-cell[col-id="${o.colId}"] span.ag-cell-value`);if(!a){r.value=!0;return}const l=u===1?"Width":"Height";r.value=a[`scroll${l}`]>a[`client${l}`]}),(t,o)=>r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(c)("tooltip"))},e.toDisplayString(t.params.value),3)):e.createCommentVNode("",!0)}});exports.default=d;