@aplus-frontend/ui 6.13.2 → 6.13.4

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 (53) hide show
  1. package/es/src/ap-form/ap-form.vue2.mjs +123 -120
  2. package/es/src/ap-form/dependency/index.vue.mjs +26 -28
  3. package/es/src/ap-form/hooks/use-watch.mjs +28 -31
  4. package/es/src/ap-form/interface.d.ts +5 -0
  5. package/es/src/ap-form/search-form/hooks/use-collapse-input-count.mjs +22 -24
  6. package/es/src/ap-form/utils/get.d.ts +2 -0
  7. package/es/src/ap-form/utils/get.mjs +12 -7
  8. package/es/src/ap-grid/editable/form-item.vue.mjs +84 -87
  9. package/es/src/ap-grid/index.vue.mjs +137 -134
  10. package/es/src/ap-grid/interface.d.ts +6 -0
  11. package/es/src/ap-table/ap-table.vue.d.ts +1 -0
  12. package/es/src/ap-table/ap-table.vue2.mjs +189 -186
  13. package/es/src/ap-table/context.d.ts +1 -0
  14. package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +1 -0
  15. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +89 -89
  16. package/es/src/business/ap-table-modal/index.d.ts +1 -0
  17. package/es/src/business/ap-table-modal/table-modal.vue.d.ts +1 -0
  18. package/es/src/business/ap-view/ap-view.vue2.mjs +68 -68
  19. package/es/src/business/ap-view/interface.d.ts +1 -1
  20. package/es/src/business/batch-input-group/form-item.vue.mjs +34 -28
  21. package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +9 -7
  22. package/es/src/editable-table/form-item.vue.mjs +78 -81
  23. package/es/src/locale/lang/en.mjs +1 -1
  24. package/es/src/locale/lang/zh-cn.mjs +1 -1
  25. package/es/src/version.d.ts +1 -1
  26. package/es/src/version.mjs +1 -1
  27. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  28. package/lib/src/ap-form/dependency/index.vue.js +1 -1
  29. package/lib/src/ap-form/hooks/use-watch.js +1 -1
  30. package/lib/src/ap-form/interface.d.ts +5 -0
  31. package/lib/src/ap-form/search-form/hooks/use-collapse-input-count.js +1 -1
  32. package/lib/src/ap-form/utils/get.d.ts +2 -0
  33. package/lib/src/ap-form/utils/get.js +1 -1
  34. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  35. package/lib/src/ap-grid/index.vue.js +1 -1
  36. package/lib/src/ap-grid/interface.d.ts +6 -0
  37. package/lib/src/ap-table/ap-table.vue.d.ts +1 -0
  38. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  39. package/lib/src/ap-table/context.d.ts +1 -0
  40. package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +1 -0
  41. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  42. package/lib/src/business/ap-table-modal/index.d.ts +1 -0
  43. package/lib/src/business/ap-table-modal/table-modal.vue.d.ts +1 -0
  44. package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
  45. package/lib/src/business/ap-view/interface.d.ts +1 -1
  46. package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
  47. package/lib/src/business/batch-input-group/popover-input/index.vue2.js +2 -2
  48. package/lib/src/editable-table/form-item.vue.js +1 -1
  49. package/lib/src/locale/lang/en.js +1 -1
  50. package/lib/src/locale/lang/zh-cn.js +1 -1
  51. package/lib/src/version.d.ts +1 -1
  52. package/lib/src/version.js +1 -1
  53. package/package.json +3 -3
@@ -1,11 +1,11 @@
1
- import { ref as le, reactive as M, unref as S, nextTick as fe, onMounted as ge, watch as de, computed as y, createVNode as C } from "vue";
2
- import { useTableSortedAndFiltered as pe } from "./use-sorted-filtered.mjs";
1
+ import { ref as fe, reactive as Q, unref as m, nextTick as ge, onMounted as de, watch as pe, computed as y, createVNode as x } from "vue";
2
+ import { useTableSortedAndFiltered as me } from "./use-sorted-filtered.mjs";
3
3
  import "../../config-provider/index.mjs";
4
- import { parseFieldValue as me, dataIndexToStr as Se, isEqualCustom as he } from "../utils.mjs";
5
- import { isArray as Q, isEqualWith as ze, isUndefined as Pe } from "lodash-unified";
4
+ import { parseFieldValue as he, dataIndexToStr as Se, isEqualCustom as ze } from "../utils.mjs";
5
+ import { isArray as W, isEqualWith as Pe, isUndefined as Te } from "lodash-unified";
6
6
  import { isDef as $ } from "../../utils/index.mjs";
7
- import { useLocale as Te } from "../../config-provider/hooks/use-locale.mjs";
8
- import { useNamespace as we } from "../../config-provider/hooks/use-namespace.mjs";
7
+ import { useLocale as we } from "../../config-provider/hooks/use-locale.mjs";
8
+ import { useNamespace as be } from "../../config-provider/hooks/use-namespace.mjs";
9
9
  const h = 1, I = 20, G = {
10
10
  defaultCurrent: h,
11
11
  defaultPageSize: I,
@@ -18,11 +18,11 @@ function Fe(c) {
18
18
  ...c
19
19
  };
20
20
  }
21
- function be(c) {
21
+ function xe(c) {
22
22
  const f = {};
23
23
  return c === !1 || (c === !0 || c == null ? (f.current = h, f.pageSize = I) : (f.current = c.defaultCurrent || h, f.pageSize = c.defaultPageSize || I)), f;
24
24
  }
25
- const Ie = ({
25
+ const Ve = ({
26
26
  manual: c = !1,
27
27
  request: f,
28
28
  params: V = {},
@@ -30,38 +30,38 @@ const Ie = ({
30
30
  formatParams: U,
31
31
  paramsValueTypeMap: _,
32
32
  resetFieldsIgnores: A,
33
- filterFields: W,
34
- sortFields: Z,
35
- namespace: H = "ap-table",
36
- pagination: z,
37
- onClickReset: x,
33
+ filterFields: Z,
34
+ sortFields: H,
35
+ namespace: X = "ap-table",
36
+ pagination: S,
37
+ onClickReset: C,
38
38
  onAfterRequest: E
39
39
  }) => {
40
40
  let v = 0, s = {};
41
- const X = Fe(z), Y = (e) => U ? U(e) : e, P = le(), i = M(be(z)), {
42
- getColumnSFConfig: q,
43
- setSF: R,
44
- clearAll: k,
41
+ const Y = Fe(S), q = (e) => U ? U(e) : e, z = fe(), i = Q(xe(S)), {
42
+ getColumnSFConfig: R,
43
+ setSF: k,
44
+ clearAll: ee,
45
45
  sortedInfo: N,
46
46
  filteredInfo: B
47
- } = pe(), {
48
- t: T
49
- } = Te(), {
50
- b: w
51
- } = we(H), o = M({
47
+ } = me(), {
48
+ t: P
49
+ } = we(), {
50
+ b: T
51
+ } = be(X), o = Q({
52
52
  total: j.length,
53
53
  records: j,
54
54
  loading: !1
55
- }), d = () => {
55
+ }), w = () => {
56
56
  var e, t;
57
- return ((t = (e = P.value) == null ? void 0 : e.apForm) == null ? void 0 : t.getFieldsValueTransformed(!0)) || {};
57
+ return ((t = (e = z.value) == null ? void 0 : e.apForm) == null ? void 0 : t.getFieldsValueTransformed(!0)) || {};
58
58
  }, J = async (e) => {
59
59
  var r;
60
- const t = Y(e), n = Date.now();
60
+ const t = q(e), n = Date.now();
61
61
  v = n, o.loading = !0;
62
62
  try {
63
63
  const a = await f({
64
- ...S(V),
64
+ ...m(V),
65
65
  ...t
66
66
  });
67
67
  v === n && (o.total = a.total || ((r = a.data) == null ? void 0 : r.length) || 0, o.records = [...a.data || []], o.loading = !1);
@@ -75,73 +75,72 @@ const Ie = ({
75
75
  return Object.entries(e).forEach(([n, r]) => {
76
76
  if (t[n] = r, _ && r) {
77
77
  const a = _[n];
78
- a && (t[n] = me(a, r));
78
+ a && (t[n] = he(a, r));
79
79
  }
80
80
  }), t;
81
- }, ee = async (e) => {
82
- var r, a, l, g, p;
83
- const t = d(), n = {};
84
- Object.entries(t).forEach(([m, b]) => {
85
- A && A.indexOf(m) > -1 && (n[m] = b);
86
- }), await ((a = (r = P.value) == null ? void 0 : r.apForm) == null ? void 0 : a.resetFields()), (p = (g = (l = P.value) == null ? void 0 : l.apForm) == null ? void 0 : g.setFieldsValue) == null || p.call(g, n), fe(() => {
81
+ }, te = async (e) => {
82
+ var r, a, l, g, d;
83
+ const t = w(), n = {};
84
+ Object.entries(t).forEach(([p, F]) => {
85
+ A && A.indexOf(p) > -1 && (n[p] = F);
86
+ }), await ((a = (r = z.value) == null ? void 0 : r.apForm) == null ? void 0 : a.resetFields()), (d = (g = (l = z.value) == null ? void 0 : l.apForm) == null ? void 0 : g.setFieldsValue) == null || d.call(g, n), ge(() => {
87
87
  e == null || e();
88
88
  });
89
- }, F = (e) => {
89
+ }, b = (e) => {
90
90
  s = e;
91
91
  const t = K(e);
92
92
  J(t);
93
- }, te = (e) => {
94
- F({
93
+ }, ne = (e) => {
94
+ b({
95
95
  ...s,
96
96
  ...e
97
97
  });
98
98
  }, D = () => {
99
- const e = d(), t = z !== !1;
100
- t && (i.current = h), F({
101
- ...e,
99
+ M(!0);
100
+ }, M = (e = !1) => {
101
+ const t = w(), n = S !== !1;
102
+ n && e && (i.current = h), b({
103
+ ...t,
102
104
  filter: s.filter,
103
105
  sort: s.sort,
104
- current: t ? h : void 0,
105
- pageSize: t ? s.pageSize || i.pageSize : void 0
106
+ current: n ? e ? h : s.current || i.current : void 0,
107
+ pageSize: n ? s.pageSize || i.pageSize : void 0
106
108
  });
107
- }, ne = () => {
108
- k(), s.sort = {}, s.filter = {}, x == null || x(), ee(D);
109
+ }, re = () => {
110
+ ee(), s.sort = {}, s.filter = {}, C == null || C(), te(D);
109
111
  }, O = () => {
110
- F({
111
- ...s,
112
- ...d()
113
- });
114
- }, re = (e) => {
115
- if (z === !1)
112
+ b(s);
113
+ }, ae = (e) => {
114
+ if (S === !1)
116
115
  O();
117
116
  else {
118
117
  const {
119
118
  current: t,
120
119
  pageSize: n
121
120
  } = i, r = o.total - e, a = Math.ceil(r / n), l = t > a ? a : t;
122
- te({
121
+ ne({
123
122
  current: l > 0 ? l : 1
124
123
  });
125
124
  }
126
125
  }, L = (e, t, n) => {
127
- var m, b;
128
- const r = d();
129
- i.current = e.current, i.pageSize = e.pageSize, R(t, n);
130
- const a = Q(n) ? [...n] : [n], l = {};
126
+ var p, F;
127
+ const r = w();
128
+ i.current = e.current, i.pageSize = e.pageSize, k(t, n);
129
+ const a = W(n) ? [...n] : [n], l = {};
131
130
  for (const u of a)
132
- (m = S(Z)) != null && m.includes(u.columnKey || u.field) && u.order && (l[Se(u.columnKey || u.field)] = u.order);
131
+ (p = m(H)) != null && p.includes(u.columnKey || u.field) && u.order && (l[Se(u.columnKey || u.field)] = u.order);
133
132
  const g = {};
134
133
  for (const u of Object.keys(t))
135
- (b = S(W)) != null && b.includes(u) && t[u] && (g[u] = t[u]);
136
- const p = {
134
+ (F = m(Z)) != null && F.includes(u) && t[u] && (g[u] = t[u]);
135
+ const d = {
137
136
  ...r,
138
137
  filter: g,
139
138
  sort: l,
140
139
  current: e.current,
141
140
  pageSize: e.pageSize
142
141
  };
143
- ze(s, p, he) || F(p);
144
- }, ae = (e, t = B.value || {}, n = N.value || {}) => {
142
+ Pe(s, d, ze) || b(d);
143
+ }, oe = (e, t = B.value || {}, n = N.value || {}) => {
145
144
  const r = (e == null ? void 0 : e.current) ?? i.current, a = (e == null ? void 0 : e.pageSize) ?? i.pageSize;
146
145
  L(
147
146
  {
@@ -157,8 +156,8 @@ const Ie = ({
157
156
  }
158
157
  );
159
158
  };
160
- ge(() => {
161
- const e = d(), {
159
+ de(() => {
160
+ const e = w(), {
162
161
  current: t,
163
162
  pageSize: n
164
163
  } = i;
@@ -172,12 +171,12 @@ const Ie = ({
172
171
  const r = K(s);
173
172
  J(r);
174
173
  }
175
- }), de(() => S(V), () => {
174
+ }), pe(() => m(V), () => {
176
175
  D();
177
176
  }, {
178
177
  deep: !0
179
178
  });
180
- const oe = y(() => {
179
+ const se = y(() => {
181
180
  if (o.total === 0)
182
181
  return "-";
183
182
  const {
@@ -186,17 +185,17 @@ const Ie = ({
186
185
  } = i;
187
186
  return `${e}/${Math.ceil(o.total / t)}`;
188
187
  });
189
- function se(e) {
190
- Q(e) && (o.records = e, o.total = e.length);
188
+ function ie(e) {
189
+ W(e) && (o.records = e, o.total = e.length);
191
190
  }
192
- const ie = y(() => {
191
+ const ce = y(() => {
193
192
  const {
194
193
  showLessItems: e,
195
194
  showTotal: t,
196
195
  showQuickJumper: n,
197
196
  showSizeChanger: r,
198
197
  pageSizeOptions: a
199
- } = X;
198
+ } = Y;
200
199
  return {
201
200
  loading: o.loading,
202
201
  pagination: {
@@ -207,50 +206,51 @@ const Ie = ({
207
206
  showQuickJumper: $(n) ? n : !e,
208
207
  showLessItems: e,
209
208
  size: "default",
210
- pageSizeOptions: Pe(a) ? ["10", "20", "50", "100"] : a,
211
- showTotal: t ? (l) => C("span", {
212
- class: w("pagination-total-wrapper")
213
- }, [T("ap.apTable.pagination.totalLeftPrefix"), " ", C("span", {
214
- class: w("pagination-count-text")
215
- }, [l]), " ", T("ap.apTable.pagination.totalLeftSuffix"), C("span", {
216
- class: w("pagination--total-right")
217
- }, [T("ap.apTable.pagination.totalRightPrefix"), " ", C("span", {
218
- class: w("pagination-count-text")
219
- }, [S(oe)]), " ", T("ap.apTable.pagination.totalRightSuffix")])]) : void 0
209
+ pageSizeOptions: Te(a) ? ["10", "20", "50", "100"] : a,
210
+ showTotal: t ? (l) => x("span", {
211
+ class: T("pagination-total-wrapper")
212
+ }, [P("ap.apTable.pagination.totalLeftPrefix"), " ", x("span", {
213
+ class: T("pagination-count-text")
214
+ }, [l]), " ", P("ap.apTable.pagination.totalLeftSuffix"), x("span", {
215
+ class: T("pagination--total-right")
216
+ }, [P("ap.apTable.pagination.totalRightPrefix"), " ", x("span", {
217
+ class: T("pagination-count-text")
218
+ }, [m(se)]), " ", P("ap.apTable.pagination.totalRightSuffix")])]) : void 0
220
219
  },
221
220
  onChange: L,
222
221
  dataSource: o.records
223
222
  };
224
223
  });
225
- function ce(e, t = !0) {
224
+ function ue(e, t = !0) {
226
225
  Object.assign(i, e), s.current = e.current, s.pageSize = e.pageSize, t && O();
227
226
  }
228
- function ue() {
227
+ function le() {
229
228
  return {
230
229
  ...i
231
230
  };
232
231
  }
233
232
  return {
234
- formRef: P,
233
+ formRef: z,
235
234
  submit: D,
236
- reset: ne,
235
+ reset: re,
237
236
  refresh: O,
238
- refreshByDelete: re,
237
+ refreshByDelete: ae,
239
238
  data: o,
240
239
  handleTableChange: L,
241
- handleTableChangeOptional: ae,
242
- tableProps: ie,
240
+ handleTableChangeOptional: oe,
241
+ tableProps: ce,
243
242
  dataSource: y(() => o.records),
244
- setDataSource: se,
245
- getColumnSFConfig: q,
243
+ setDataSource: ie,
244
+ getColumnSFConfig: R,
246
245
  sortedInfo: N,
247
246
  filteredInfo: B,
248
- getPaging: ue,
249
- setPaging: ce
247
+ getPaging: le,
248
+ setPaging: ue,
249
+ submitWith: M
250
250
  };
251
251
  };
252
252
  export {
253
253
  h as DEFAULT_CURRENT,
254
254
  I as DEFAULT_PAGE_SIZE,
255
- Ie as useTablePaging
255
+ Ve as useTablePaging
256
256
  };
@@ -78,6 +78,7 @@ declare const ApTableModal: {
78
78
  submit: () => void;
79
79
  reset: () => void;
80
80
  refresh: () => void;
81
+ submitWith: () => void;
81
82
  setSearchFormValues: (fields: any) => void;
82
83
  getSearchFormValues: (transform?: boolean) => Partial<any> | undefined;
83
84
  setPaging: (nextPaging: Partial<{
@@ -67,6 +67,7 @@ declare const _default: DefineComponent<__VLS_Props, {
67
67
  submit: () => void;
68
68
  reset: () => void;
69
69
  refresh: () => void;
70
+ submitWith: () => void;
70
71
  setSearchFormValues: (fields: any) => void;
71
72
  getSearchFormValues: (transform?: boolean) => Partial<any> | undefined;
72
73
  setPaging: (nextPaging: Partial<{
@@ -7,12 +7,12 @@ import "./components/menu-list-content.vue.mjs";
7
7
  import { useViewProvide as le } from "./hooks/use-view-provide.mjs";
8
8
  import { useInjectApTable as se } from "../../ap-table/context.mjs";
9
9
  import { SYSTEM_VIEW_KEY as V } from "./utils/enum.mjs";
10
- import { isValid as re } from "@aplus-frontend/utils";
11
- import { useGlobalConfig as me } from "../../config-provider/hooks/use-global-config.mjs";
12
- import { useNamespace as ne } from "../../config-provider/hooks/use-namespace.mjs";
13
- import { useLocale as oe } from "../../config-provider/hooks/use-locale.mjs";
10
+ import { isValid as me } from "@aplus-frontend/utils";
11
+ import { useGlobalConfig as ne } from "../../config-provider/hooks/use-global-config.mjs";
12
+ import { useNamespace as oe } from "../../config-provider/hooks/use-namespace.mjs";
13
+ import { useLocale as re } from "../../config-provider/hooks/use-locale.mjs";
14
14
  import fe from "./components/main-button-content.vue2.mjs";
15
- import ae from "./components/menu-list-content.vue2.mjs";
15
+ import ue from "./components/menu-list-content.vue2.mjs";
16
16
  const Ie = /* @__PURE__ */ Z({
17
17
  name: "ApView",
18
18
  __name: "ap-view",
@@ -39,63 +39,63 @@ const Ie = /* @__PURE__ */ Z({
39
39
  setup(k, {
40
40
  expose: A
41
41
  }) {
42
- const o = k, L = me("viewCacheOption"), {
42
+ const r = k, L = ne("viewCacheOption"), {
43
43
  b: g
44
- } = ne("ap-view"), {
44
+ } = oe("ap-view"), {
45
45
  t: P
46
- } = oe(), v = E(() => ({
46
+ } = re(), v = E(() => ({
47
47
  viewKey: V,
48
48
  viewName: P("ap.apView.systemView")
49
49
  })), {
50
50
  getSearchFormValues: T,
51
- setSearchFormValues: j,
52
- submit: G,
53
- reset: $,
54
- refresh: Y,
55
- getSearchFormSorterItems: z,
56
- setSearchFormSorterItems: M,
57
- resetSearchFormSorterItems: W
51
+ setSearchFormValues: W,
52
+ submit: j,
53
+ reset: G,
54
+ submitWith: $,
55
+ getSearchFormSorterItems: Y,
56
+ setSearchFormSorterItems: z,
57
+ resetSearchFormSorterItems: M
58
58
  } = se(), q = K(!1), F = K(!1), d = K("");
59
59
  let c = !1, _ = !1;
60
60
  const H = {
61
61
  dropdownType: "dropdown",
62
62
  content: N(fe, {
63
- maxViewNum: o.maxViewNum
63
+ maxViewNum: r.maxViewNum
64
64
  }, null)
65
- }, r = K([v.value]), J = E(() => r.value.map((t) => ({
65
+ }, m = K([v.value]), J = E(() => m.value.map((t) => ({
66
66
  id: t.viewKey,
67
- content: N(ae, {
67
+ content: N(ue, {
68
68
  view: t
69
69
  }, null)
70
70
  }))), e = {
71
71
  getSearchFormValues: T,
72
- setSearchFormValues: j,
73
- submit: G,
74
- reset: $,
75
- refresh: Y,
76
- getSearchFormSorterItems: z,
77
- setSearchFormSorterItems: M,
78
- resetSearchFormSorterItems: W,
79
- ...o.saveDataSource
72
+ setSearchFormValues: W,
73
+ submit: j,
74
+ reset: G,
75
+ submitWith: $,
76
+ getSearchFormSorterItems: Y,
77
+ setSearchFormSorterItems: z,
78
+ resetSearchFormSorterItems: M,
79
+ ...r.saveDataSource
80
80
  }, l = {
81
81
  ...L.value,
82
- ...o.viewCacheOption
82
+ ...r.viewCacheOption
83
83
  }, h = () => {
84
- if (o.isDefaultSystemView)
84
+ if (r.isDefaultSystemView)
85
85
  return V;
86
- if ((o.isFirstDefaultSystemView || _) && c)
86
+ if ((r.isFirstDefaultSystemView || _) && c)
87
87
  return V;
88
- const t = r.value.find((i) => i.isDefault);
88
+ const t = m.value.find((i) => i.isDefault);
89
89
  return (t == null ? void 0 : t.viewKey) ?? V;
90
90
  }, p = (t) => {
91
91
  d.value = t;
92
- const i = r.value.find((s) => s.viewKey === d.value);
92
+ const i = m.value.find((s) => s.viewKey === d.value);
93
93
  i && setTimeout(() => {
94
- var s, m, n, a, f, u, y, I, x, B;
95
- i.viewKey === V ? c ? o.manual || (s = e == null ? void 0 : e.refresh) == null || s.call(e) : ((m = e == null ? void 0 : e.resetSearchFormSorterItems) == null || m.call(e), o.manual || (n = e == null ? void 0 : e.reset) == null || n.call(e)) : ((u = e == null ? void 0 : e.setSearchFormValues) == null || u.call(e, {
96
- ...Object.fromEntries(Object.keys(((a = e == null ? void 0 : e.getSearchFormValues) == null ? void 0 : a.call(e)) ?? {}).map((X) => [X, void 0])) ?? {},
94
+ var s, n, o, u, f, a, y, I, x, B;
95
+ i.viewKey === V ? c ? r.manual || (s = e == null ? void 0 : e.submitWith) == null || s.call(e) : ((n = e == null ? void 0 : e.resetSearchFormSorterItems) == null || n.call(e), r.manual || (o = e == null ? void 0 : e.reset) == null || o.call(e)) : ((a = e == null ? void 0 : e.setSearchFormValues) == null || a.call(e, {
96
+ ...Object.fromEntries(Object.keys(((u = e == null ? void 0 : e.getSearchFormValues) == null ? void 0 : u.call(e)) ?? {}).map((X) => [X, void 0])) ?? {},
97
97
  ...((f = i.viewConfig) == null ? void 0 : f.searchForm) ?? {}
98
- }), (I = e == null ? void 0 : e.setSearchFormSorterItems) == null || I.call(e, ((y = i.viewConfig) == null ? void 0 : y.sorterItems) ?? []), c ? o.manual || (x = e == null ? void 0 : e.refresh) == null || x.call(e) : (B = e == null ? void 0 : e.submit) == null || B.call(e)), c = !1;
98
+ }), (I = e == null ? void 0 : e.setSearchFormSorterItems) == null || I.call(e, ((y = i.viewConfig) == null ? void 0 : y.sorterItems) ?? []), c ? r.manual || (x = e == null ? void 0 : e.submitWith) == null || x.call(e) : (B = e == null ? void 0 : e.submit) == null || B.call(e)), c = !1;
99
99
  });
100
100
  }, w = {
101
101
  getViewList: async (t) => {
@@ -103,12 +103,12 @@ const Ie = /* @__PURE__ */ Z({
103
103
  try {
104
104
  const {
105
105
  tableKey: s
106
- } = t, m = await ((i = l == null ? void 0 : l.getViewList) == null ? void 0 : i.call(l, {
106
+ } = t, n = await ((i = l == null ? void 0 : l.getViewList) == null ? void 0 : i.call(l, {
107
107
  tableKey: s
108
108
  }));
109
- return r.value = [v.value, ...m ?? []], p(h()), r.value;
109
+ return m.value = [v.value, ...n ?? []], p(h()), m.value;
110
110
  } catch {
111
- return r.value = [v.value], p(V), r.value;
111
+ return m.value = [v.value], p(V), m.value;
112
112
  }
113
113
  },
114
114
  addView: async (t) => {
@@ -116,72 +116,72 @@ const Ie = /* @__PURE__ */ Z({
116
116
  const {
117
117
  tableKey: i,
118
118
  viewKey: s,
119
- viewName: m,
120
- isDefault: n,
121
- viewConfig: a
119
+ viewName: n,
120
+ isDefault: o,
121
+ viewConfig: u
122
122
  } = t;
123
123
  await ((f = l == null ? void 0 : l.addView) == null ? void 0 : f.call(l, {
124
124
  tableKey: i,
125
125
  viewKey: s,
126
- viewName: m,
127
- isDefault: n,
128
- viewConfig: a
129
- })), n && (r.value = r.value.map((u) => ({
130
- ...u,
126
+ viewName: n,
127
+ isDefault: o,
128
+ viewConfig: u
129
+ })), o && (m.value = m.value.map((a) => ({
130
+ ...a,
131
131
  isDefault: !1
132
- }))), r.value = [...r.value, {
132
+ }))), m.value = [...m.value, {
133
133
  viewKey: s,
134
- viewName: m,
135
- isDefault: n,
136
- viewConfig: a
134
+ viewName: n,
135
+ isDefault: o,
136
+ viewConfig: u
137
137
  }], p(s);
138
138
  },
139
139
  changeView: async (t) => {
140
- var u;
140
+ var a;
141
141
  const {
142
142
  tableKey: i,
143
143
  viewKey: s,
144
- viewName: m,
145
- isDefault: n,
146
- viewConfig: a
144
+ viewName: n,
145
+ isDefault: o,
146
+ viewConfig: u
147
147
  } = t;
148
- await ((u = l == null ? void 0 : l.changeView) == null ? void 0 : u.call(l, {
148
+ await ((a = l == null ? void 0 : l.changeView) == null ? void 0 : a.call(l, {
149
149
  tableKey: i,
150
150
  viewKey: s,
151
- viewName: m,
152
- isDefault: n,
153
- viewConfig: a
154
- })), n && (r.value = r.value.map((y) => ({
151
+ viewName: n,
152
+ isDefault: o,
153
+ viewConfig: u
154
+ })), o && (m.value = m.value.map((y) => ({
155
155
  ...y,
156
156
  isDefault: !1
157
157
  })));
158
- const f = r.value.find((y) => y.viewKey === s);
159
- f && (f.viewName = m, f.isDefault = n, f.viewConfig = a), p(s);
158
+ const f = m.value.find((y) => y.viewKey === s);
159
+ f && (f.viewName = n, f.isDefault = o, f.viewConfig = u), p(s);
160
160
  },
161
161
  removeView: async (t) => {
162
- var m;
162
+ var n;
163
163
  const {
164
164
  tableKey: i,
165
165
  viewKey: s
166
166
  } = t;
167
- await ((m = l == null ? void 0 : l.removeView) == null ? void 0 : m.call(l, {
167
+ await ((n = l == null ? void 0 : l.removeView) == null ? void 0 : n.call(l, {
168
168
  tableKey: i,
169
169
  viewKey: s
170
- })), r.value = r.value.filter((n) => n.viewKey !== s), s === d.value && p(h());
170
+ })), m.value = m.value.filter((o) => o.viewKey !== s), s === d.value && p(h());
171
171
  }
172
172
  }, Q = {
173
- tableKey: o.tableKey,
173
+ tableKey: r.tableKey,
174
174
  currentViewKey: d,
175
175
  changeCurrentViewKey: p,
176
176
  popoverOpen: q,
177
177
  menuOpen: F,
178
- viewList: r,
178
+ viewList: m,
179
179
  viewListCRUD: w,
180
180
  saveDataSource: e
181
181
  };
182
- return le(Q), U(() => o.tableKey, (t) => {
182
+ return le(Q), U(() => r.tableKey, (t) => {
183
183
  var i;
184
- re(t) && (c = !0, (i = w == null ? void 0 : w.getViewList) == null || i.call(w, {
184
+ me(t) && (c = !0, (i = w == null ? void 0 : w.getViewList) == null || i.call(w, {
185
185
  tableKey: t
186
186
  }));
187
187
  }, {
@@ -4,8 +4,8 @@ export interface SaveDataSource {
4
4
  getSearchFormValues?: (transform?: boolean) => (Partial<Recordable> & Recordable<any>) | undefined;
5
5
  setSearchFormValues?: (values: Partial<Recordable>) => void;
6
6
  submit?: () => void;
7
+ submitWith?: () => void;
7
8
  reset?: () => void;
8
- refresh?: () => void;
9
9
  getSearchFormSorterItems?: () => ApFormSearchFormPopoverSorterItem[];
10
10
  setSearchFormSorterItems?: (sortedItems: ApFormSearchFormPopoverSorterItem[]) => void;
11
11
  resetSearchFormSorterItems?: () => void;