@aplus-frontend/ui 0.1.29 → 0.1.30

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 (51) hide show
  1. package/es/index.mjs +78 -76
  2. package/es/src/ap-form/ap-form.vue.d.ts +1 -1
  3. package/es/src/ap-form/modal-form/index.vue.d.ts +2 -2
  4. package/es/src/ap-form/search-form/index.vue.d.ts +2 -2
  5. package/es/src/ap-table/ap-table.vue.mjs +1 -1
  6. package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +84 -89
  7. package/es/src/ap-table/utils.mjs +42 -42
  8. package/es/src/business/ap-action-button/ApActionButton.vue.d.ts +43 -0
  9. package/es/src/business/ap-action-button/ApActionButton.vue.mjs +4 -0
  10. package/es/src/business/ap-action-button/ApActionButton.vue2.mjs +97 -0
  11. package/es/src/business/ap-action-button/index.css +6 -0
  12. package/es/src/business/ap-action-button/interface.d.ts +6 -0
  13. package/es/src/business/ap-action-button/interface.mjs +1 -0
  14. package/es/src/business/index.d.ts +265 -0
  15. package/es/src/business/index.mjs +25 -21
  16. package/es/src/editable-table/form-item.vue.d.ts +1 -1
  17. package/es/src/editable-table/form-item.vue.mjs +41 -41
  18. package/es/src/editable-table/index.vue.d.ts +1 -1
  19. package/es/src/editable-table/index.vue.mjs +29 -29
  20. package/es/src/index.mjs +209 -207
  21. package/es/src/theme/ap-action-button/ap-action-button.css +6 -0
  22. package/es/src/work-order-modal/index.mjs +4 -3
  23. package/es/src/work-order-modal/interfaces.d.ts +3 -0
  24. package/es/src/work-order-modal/interfaces.mjs +6 -1
  25. package/es/src/work-order-modal/work-order-modal.vue.mjs +28 -28
  26. package/lib/index.js +1 -1
  27. package/lib/src/ap-form/ap-form.vue.d.ts +1 -1
  28. package/lib/src/ap-form/modal-form/index.vue.d.ts +2 -2
  29. package/lib/src/ap-form/search-form/index.vue.d.ts +2 -2
  30. package/lib/src/ap-table/ap-table.vue.js +1 -1
  31. package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -1
  32. package/lib/src/ap-table/utils.js +1 -1
  33. package/lib/src/business/ap-action-button/ApActionButton.vue.d.ts +43 -0
  34. package/lib/src/business/ap-action-button/ApActionButton.vue.js +1 -0
  35. package/lib/src/business/ap-action-button/ApActionButton.vue2.js +1 -0
  36. package/lib/src/business/ap-action-button/index.css +6 -0
  37. package/lib/src/business/ap-action-button/interface.d.ts +6 -0
  38. package/lib/src/business/ap-action-button/interface.js +1 -0
  39. package/lib/src/business/index.d.ts +265 -0
  40. package/lib/src/business/index.js +1 -1
  41. package/lib/src/editable-table/form-item.vue.d.ts +1 -1
  42. package/lib/src/editable-table/form-item.vue.js +1 -1
  43. package/lib/src/editable-table/index.vue.d.ts +1 -1
  44. package/lib/src/editable-table/index.vue.js +1 -1
  45. package/lib/src/index.js +1 -1
  46. package/lib/src/theme/ap-action-button/ap-action-button.css +6 -0
  47. package/lib/src/work-order-modal/index.js +1 -1
  48. package/lib/src/work-order-modal/interfaces.d.ts +3 -0
  49. package/lib/src/work-order-modal/interfaces.js +1 -1
  50. package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
  51. package/package.json +1 -1
@@ -14,13 +14,15 @@ import "./ap-batch-action-group/ApBatchActionGroup.vue.mjs";
14
14
  import "./ap-image/ApImage.vue.mjs";
15
15
  import "./ap-ladder/ApLadder.vue.mjs";
16
16
  import p from "./ap-attachment/ApAttachment.mjs";
17
- import { ApTransformDataHelper as io } from "../utils/ap-trans-data/index.mjs";
17
+ import "./ap-action-button/ApActionButton.vue.mjs";
18
+ import { ApTransformDataHelper as so } from "../utils/ap-trans-data/index.mjs";
18
19
  import "./ap-batch-action-group/interface.mjs";
19
- import { default as no } from "./ap-table-modal/index.mjs";
20
+ import "./ap-action-button/interface.mjs";
21
+ import { default as Ao } from "./ap-table-modal/index.mjs";
20
22
  import r from "./title/ApTitle.vue2.mjs";
21
23
  import i from "./ap-expand-alert/ApExpandAlert.vue2.mjs";
22
- import a from "./ap-status/ApStatus.vue2.mjs";
23
- import n from "./ap-status/ApStatusGroup.vue2.mjs";
24
+ import n from "./ap-status/ApStatus.vue2.mjs";
25
+ import a from "./ap-status/ApStatusGroup.vue2.mjs";
24
26
  import c from "./ap-select-layout/select-layout.vue2.mjs";
25
27
  import f from "./ap-export-group/ApExportGroup.vue2.mjs";
26
28
  import s from "./ap-input-radio/ApInputRadio.vue2.mjs";
@@ -28,22 +30,24 @@ import _ from "./ap-batch-action/ApBatchAction.vue2.mjs";
28
30
  import A from "./ap-batch-action-group/ApBatchActionGroup.vue2.mjs";
29
31
  import e from "./ap-image/ApImage.vue2.mjs";
30
32
  import l from "./ap-ladder/ApLadder.vue2.mjs";
31
- const K = o(r), N = i, O = o(t), P = o(a), Q = o(n), U = o(c), V = o(f), W = s, X = _, Y = m, Z = A, oo = e, to = o(l), mo = p;
33
+ import u from "./ap-action-button/ApActionButton.vue2.mjs";
34
+ const Q = o(r), U = i, V = o(t), W = o(n), X = o(a), Y = o(c), Z = o(f), oo = s, to = _, mo = m, po = A, ro = e, io = o(l), no = p, ao = o(u);
32
35
  export {
33
- mo as ApAttachment,
34
- X as ApBatchAction,
35
- Z as ApBatchActionGroup,
36
- N as ApExpandAlert,
37
- V as ApExportGroup,
38
- oo as ApImage,
39
- W as ApInputRadio,
40
- O as ApLabel,
41
- Y as ApLabelGroup,
42
- to as ApLadder,
43
- U as ApSelectLayout,
44
- P as ApStatus,
45
- Q as ApStatusGroup,
46
- no as ApTableModal,
47
- K as ApTitle,
48
- io as ApTransformDataHelper
36
+ ao as ApActionButton,
37
+ no as ApAttachment,
38
+ to as ApBatchAction,
39
+ po as ApBatchActionGroup,
40
+ U as ApExpandAlert,
41
+ Z as ApExportGroup,
42
+ ro as ApImage,
43
+ oo as ApInputRadio,
44
+ V as ApLabel,
45
+ mo as ApLabelGroup,
46
+ io as ApLadder,
47
+ Y as ApSelectLayout,
48
+ W as ApStatus,
49
+ X as ApStatusGroup,
50
+ Ao as ApTableModal,
51
+ Q as ApTitle,
52
+ so as ApTransformDataHelper
49
53
  };
@@ -9,7 +9,7 @@ declare const _default: <RecordType = any>(__VLS_props: NonNullable<Awaited<type
9
9
  remove: (index: number | number[]) => void;
10
10
  getRowData: (index: number) => UnwrapRefSimple<RecordType>;
11
11
  getRowsData: () => UnwrapRefSimple<RecordType>[];
12
- setRowData: (index: number, payload: any) => void;
12
+ setRowData: (index: number, payload: any, merge?: boolean) => void;
13
13
  addMultiple: (list: number | Partial<RecordType>[], insetIn?: "prefix" | "suffix") => void;
14
14
  scrollTo: (index: number | "end", options?: StandardBehaviorOptions) => void;
15
15
  setTableData: (nextTableData: RecordType[]) => void;
@@ -1,4 +1,4 @@
1
- import { defineComponent as q, ref as x, unref as a, useSlots as G, watch as H, openBlock as m, createBlock as y, mergeProps as C, withCtx as d, createVNode as b, createSlots as W, createElementBlock as $, normalizeClass as Q, createCommentVNode as w, createElementVNode as U, toDisplayString as I, normalizeStyle as J, renderList as X, renderSlot as Y, normalizeProps as Z, guardReactiveProps as ee } from "vue";
1
+ import { defineComponent as q, ref as x, unref as l, useSlots as G, watch as H, openBlock as m, createBlock as y, mergeProps as C, withCtx as d, createVNode as b, createSlots as W, createElementBlock as $, normalizeClass as Q, createCommentVNode as w, createElementVNode as U, toDisplayString as I, normalizeStyle as J, renderList as X, renderSlot as Y, normalizeProps as Z, guardReactiveProps as ee } from "vue";
2
2
  import { Table as te, Tooltip as oe } from "ant-design-vue";
3
3
  import { ApForm as R } from "../ap-form/index.mjs";
4
4
  import { isArray as ae, isNumber as i, cloneDeep as f, omit as le } from "lodash-unified";
@@ -115,70 +115,70 @@ const Fe = /* @__PURE__ */ q({
115
115
  setup(B, {
116
116
  expose: D
117
117
  }) {
118
- const l = B;
118
+ const n = B;
119
119
  function k(e, t) {
120
- return ae(t) ? t.reduce((o, r) => o == null ? void 0 : o[r], e) : e == null ? void 0 : e[t];
120
+ return ae(t) ? t.reduce((o, a) => o == null ? void 0 : o[a], e) : e == null ? void 0 : e[t];
121
121
  }
122
122
  const {
123
- internalInstance: n,
123
+ internalInstance: r,
124
124
  model: T
125
- } = ne(), u = x(k(a(T), l.name) || []), F = G(), L = R.useWatch(l.name);
125
+ } = ne(), u = x(k(l(T), n.name) || []), F = G(), L = R.useWatch(n.name);
126
126
  H(() => L.value, (e) => {
127
127
  var t;
128
- u.value = e, (t = l.onChange) == null || t.call(l, e);
128
+ u.value = e, (t = n.onChange) == null || t.call(n, e);
129
129
  }, {
130
130
  deep: !0
131
131
  });
132
132
  const {
133
133
  b: E,
134
134
  em: N
135
- } = ie("editable-table"), c = x(), S = fe("valueTypeMap"), [, V] = me(), _ = re(l, S);
135
+ } = ie("editable-table"), c = x(), S = fe("valueTypeMap"), [, V] = me(), _ = re(n, S);
136
136
  function v(e, t) {
137
137
  var s;
138
- const o = ((s = a(u)) == null ? void 0 : s.length) || 0;
139
- if (p(l.maxLength) && o >= l.maxLength)
138
+ const o = ((s = l(u)) == null ? void 0 : s.length) || 0;
139
+ if (p(n.maxLength) && o >= n.maxLength)
140
140
  return;
141
- const r = [...a(u) || []];
142
- p(t) ? r.splice(t, 0, {
141
+ const a = [...l(u) || []];
142
+ p(t) ? a.splice(t, 0, {
143
143
  ...e || {}
144
- }) : r.push({
144
+ }) : a.push({
145
145
  ...e || {}
146
- }), n == null || n.setFieldValue(l.name, r);
146
+ }), r == null || r.setFieldValue(n.name, a);
147
147
  }
148
148
  function z(e, t = "suffix") {
149
149
  var g;
150
- const o = ((g = a(u)) == null ? void 0 : g.length) || 0, r = i(e) ? e : e.length;
151
- if (p(l.maxLength) && o + r > l.maxLength)
150
+ const o = ((g = l(u)) == null ? void 0 : g.length) || 0, a = i(e) ? e : e.length;
151
+ if (p(n.maxLength) && o + a > n.maxLength)
152
152
  return;
153
- const s = [...a(u) || []], h = i(e) ? new Array(e).fill({}) : f(e);
154
- t === "suffix" ? s.push(...h) : s.unshift(...h), n == null || n.setFieldValue(l.name, s);
153
+ const s = [...l(u) || []], h = i(e) ? new Array(e).fill({}) : f(e);
154
+ t === "suffix" ? s.push(...h) : s.unshift(...h), r == null || r.setFieldValue(n.name, s);
155
155
  }
156
156
  function P(e) {
157
- let t = f(a(u) || []);
157
+ let t = f(l(u) || []);
158
158
  const o = i(e) ? [e] : e;
159
- t = t.filter((r, s) => !o.includes(s)), n == null || n.setFieldValue(l.name, t);
159
+ t = t.filter((a, s) => !o.includes(s)), r == null || r.setFieldValue(n.name, t);
160
160
  }
161
161
  function j() {
162
- return a(u);
162
+ return l(u);
163
163
  }
164
164
  function A(e) {
165
165
  var t;
166
- return (t = a(u)) == null ? void 0 : t[e];
166
+ return (t = l(u)) == null ? void 0 : t[e];
167
167
  }
168
- function O(e, t) {
169
- const o = f(a(u));
170
- o[e] && (o[e] = {
171
- ...o[e],
168
+ function O(e, t, o = !0) {
169
+ const a = f(l(u));
170
+ a[e] && (a[e] = {
171
+ ...o ? a[e] : {},
172
172
  ...t
173
- }, n == null || n.setFieldValue(l.name, [...o]));
173
+ }, r == null || r.setFieldValue(n.name, [...a]));
174
174
  }
175
175
  function K(e) {
176
- n == null || n.setFieldValue(l.name, e);
176
+ r == null || r.setFieldValue(n.name, e);
177
177
  }
178
178
  function M(e, t) {
179
- var r;
179
+ var a;
180
180
  const o = e === "end" ? u.value.length - 1 : e;
181
- ue(o, (r = c.value) == null ? void 0 : r.$el, t);
181
+ ue(o, (a = c.value) == null ? void 0 : a.$el, t);
182
182
  }
183
183
  return D({
184
184
  add: v,
@@ -189,39 +189,39 @@ const Fe = /* @__PURE__ */ q({
189
189
  addMultiple: z,
190
190
  scrollTo: M,
191
191
  setTableData: K
192
- }), (e, t) => (m(), y(a(R).FormItem, C(e.formItem, {
192
+ }), (e, t) => (m(), y(l(R).FormItem, C(e.formItem, {
193
193
  name: e.name,
194
194
  label: e.label
195
195
  }), {
196
- default: d(() => [b(a(te), C(a(le)(l, ["name", "maxLength", "onChange"]), {
197
- class: a(E)(),
198
- columns: a(_),
196
+ default: d(() => [b(l(te), C(l(le)(n, ["name", "maxLength", "onChange"]), {
197
+ class: l(E)(),
198
+ columns: l(_),
199
199
  "data-source": u.value,
200
200
  ref_key: "tableRef",
201
201
  ref: c
202
202
  }), W({
203
203
  headerCell: d(({
204
204
  column: o
205
- }) => [a(se)(o) ? (m(), $("span", {
205
+ }) => [l(se)(o) ? (m(), $("span", {
206
206
  key: 0,
207
- class: Q(a(N)("header-cell", "required"))
208
- }, "*", 2)) : w("", !0), U("span", null, I(o.title), 1), o.tooltip ? (m(), y(a(oe), {
207
+ class: Q(l(N)("header-cell", "required"))
208
+ }, "*", 2)) : w("", !0), U("span", null, I(o.title), 1), o.tooltip ? (m(), y(l(oe), {
209
209
  key: 1,
210
210
  title: o.tooltip,
211
211
  placement: "bottom"
212
212
  }, {
213
- default: d(() => [b(a(de), {
213
+ default: d(() => [b(l(de), {
214
214
  style: J({
215
215
  paddingLeft: "4px",
216
- color: a(V).colorPrimary
216
+ color: l(V).colorPrimary
217
217
  })
218
218
  }, null, 8, ["style"])]),
219
219
  _: 2
220
220
  }, 1032, ["title"])) : w("", !0)]),
221
221
  _: 2
222
- }, [X(F, (o, r) => ({
223
- name: r,
224
- fn: d((s) => [Y(e.$slots, r, Z(ee(s || {})))])
222
+ }, [X(F, (o, a) => ({
223
+ name: a,
224
+ fn: d((s) => [Y(e.$slots, a, Z(ee(s || {})))])
225
225
  }))]), 1040, ["class", "columns", "data-source"])]),
226
226
  _: 3
227
227
  }, 16, ["name", "label"]));
@@ -16,7 +16,7 @@ declare const _default: <RecordType extends Recordable = any>(__VLS_props: NonNu
16
16
  remove: (index: number | number[]) => void;
17
17
  getRowData: (index: number) => RecordType;
18
18
  getRowsData: () => RecordType[];
19
- setRowData: (index: number, payload: any) => void;
19
+ setRowData: (index: number, payload: any, merge?: boolean) => void;
20
20
  addMultiple: (list: number | Partial<RecordType>[], insetIn?: "prefix" | "suffix") => void;
21
21
  scrollTo: (index: number | "end", options?: StandardBehaviorOptions) => void;
22
22
  clear: () => void;
@@ -140,38 +140,38 @@ const ze = /* @__PURE__ */ J({
140
140
  (e = s.value) == null || e.resetFields();
141
141
  }
142
142
  function O(e) {
143
- return e ? (k(e) ? e : [e]).map((a) => k(a) ? [l.name, ...a] : [l.name, a]) : void 0;
143
+ return e ? (k(e) ? e : [e]).map((n) => k(n) ? [l.name, ...n] : [l.name, n]) : void 0;
144
144
  }
145
145
  async function j(e, t) {
146
- var n;
147
- const a = await ((n = s.value) == null ? void 0 : n.validateFields(O(e), t));
148
- return a == null ? void 0 : a[l.name];
146
+ var a;
147
+ const n = await ((a = s.value) == null ? void 0 : a.validateFields(O(e), t));
148
+ return n == null ? void 0 : n[l.name];
149
149
  }
150
150
  function q(e, t) {
151
151
  var r, i, d;
152
- const a = ((r = o(u)) == null ? void 0 : r.length) || 0;
153
- if (C(l.maxLength) && a >= l.maxLength)
152
+ const n = ((r = o(u)) == null ? void 0 : r.length) || 0;
153
+ if (C(l.maxLength) && n >= l.maxLength)
154
154
  return;
155
- const n = [...o(u) || []];
156
- C(t) ? n.splice(t, 0, {
155
+ const a = [...o(u) || []];
156
+ C(t) ? a.splice(t, 0, {
157
157
  ...e || {}
158
- }) : n.push({
158
+ }) : a.push({
159
159
  ...e || {}
160
- }), (d = (i = s.value) == null ? void 0 : i.setFieldValue) == null || d.call(i, l.name, n);
160
+ }), (d = (i = s.value) == null ? void 0 : i.setFieldValue) == null || d.call(i, l.name, a);
161
161
  }
162
162
  function K(e, t = "suffix") {
163
163
  var d, f, w;
164
- const a = ((d = o(u)) == null ? void 0 : d.length) || 0, n = g(e) ? e : e.length;
165
- if (C(l.maxLength) && a + n > l.maxLength)
164
+ const n = ((d = o(u)) == null ? void 0 : d.length) || 0, a = g(e) ? e : e.length;
165
+ if (C(l.maxLength) && n + a > l.maxLength)
166
166
  return;
167
167
  const r = [...o(u) || []], i = g(e) ? new Array(e).fill({}) : h(e);
168
168
  t === "suffix" ? r.push(...i) : r.unshift(...i), (w = (f = s.value) == null ? void 0 : f.setFieldValue) == null || w.call(f, l.name, r);
169
169
  }
170
170
  function M(e) {
171
- var n, r;
171
+ var a, r;
172
172
  let t = h(o(u) || []);
173
- const a = g(e) ? [e] : e;
174
- t = t.filter((i, d) => !a.includes(d)), (r = (n = s.value) == null ? void 0 : n.setFieldValue) == null || r.call(n, l.name, t);
173
+ const n = g(e) ? [e] : e;
174
+ t = t.filter((i, d) => !n.includes(d)), (r = (a = s.value) == null ? void 0 : a.setFieldValue) == null || r.call(a, l.name, t);
175
175
  }
176
176
  function G() {
177
177
  return o(u);
@@ -184,18 +184,18 @@ const ze = /* @__PURE__ */ J({
184
184
  var t;
185
185
  return (t = o(u)) == null ? void 0 : t[e];
186
186
  }
187
- function W(e, t) {
188
- var n, r;
187
+ function W(e, t, n = !0) {
188
+ var r, i;
189
189
  const a = h(o(u));
190
190
  a[e] && (a[e] = {
191
- ...a[e],
191
+ ...n ? a[e] : {},
192
192
  ...t
193
- }, (r = (n = s.value) == null ? void 0 : n.setFieldValue) == null || r.call(n, l.name, [...a]));
193
+ }, (i = (r = s.value) == null ? void 0 : r.setFieldValue) == null || i.call(r, l.name, [...a]));
194
194
  }
195
195
  function $(e, t) {
196
- var n;
197
- const a = e === "end" ? u.value.length - 1 : e;
198
- ce(a, (n = v.value) == null ? void 0 : n.$el, t);
196
+ var a;
197
+ const n = e === "end" ? u.value.length - 1 : e;
198
+ ce(n, (a = v.value) == null ? void 0 : a.$el, t);
199
199
  }
200
200
  function Q() {
201
201
  var e, t;
@@ -232,13 +232,13 @@ const ze = /* @__PURE__ */ J({
232
232
  ref: v
233
233
  }), Z({
234
234
  headerCell: m(({
235
- column: a
236
- }) => [o(pe)(a) ? (p(), ee("span", {
235
+ column: n
236
+ }) => [o(pe)(n) ? (p(), ee("span", {
237
237
  key: 0,
238
238
  class: te(o(L)("header-cell", "required"))
239
- }, "*", 2)) : B("", !0), ae("span", null, ne(a.title), 1), a.tooltip ? (p(), F(o(de), {
239
+ }, "*", 2)) : B("", !0), ae("span", null, ne(n.title), 1), n.tooltip ? (p(), F(o(de), {
240
240
  key: 1,
241
- title: a.tooltip,
241
+ title: n.tooltip,
242
242
  placement: "bottom"
243
243
  }, {
244
244
  default: m(() => [x(o(ge), {
@@ -250,9 +250,9 @@ const ze = /* @__PURE__ */ J({
250
250
  _: 2
251
251
  }, 1032, ["title"])) : B("", !0)]),
252
252
  _: 2
253
- }, [le(N, (a, n) => ({
254
- name: n,
255
- fn: m((r) => [re(e.$slots, n, ue(se(r || {})))])
253
+ }, [le(N, (n, a) => ({
254
+ name: a,
255
+ fn: m((r) => [re(e.$slots, a, ue(se(r || {})))])
256
256
  }))]), 1040, ["class", "columns", "data-source"])]),
257
257
  _: 3
258
258
  }, 8, ["name"])]),