@aplus-frontend/ui 0.4.5 → 0.4.7

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 (57) hide show
  1. package/es/src/ap-field/date/index.vue.d.ts +1 -0
  2. package/es/src/ap-field/date/index.vue.mjs +22 -15
  3. package/es/src/ap-field/date-range/index.vue.mjs +46 -42
  4. package/es/src/ap-field/hooks/use-default-presets.d.ts +11 -0
  5. package/es/src/ap-field/hooks/use-default-presets.mjs +15 -0
  6. package/es/src/ap-field/interface.d.ts +7 -1
  7. package/es/src/ap-table/ap-table.vue2.mjs +87 -85
  8. package/es/src/ap-table/components/dynamic-component/diff.d.ts +2 -0
  9. package/es/src/ap-table/components/dynamic-component/index.vue.d.ts +4 -0
  10. package/es/src/ap-table/components/dynamic-component/index.vue.mjs +4 -0
  11. package/es/src/ap-table/components/dynamic-component/index.vue2.mjs +14 -0
  12. package/es/src/ap-table/components/interface.d.ts +3 -0
  13. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +55 -55
  14. package/es/src/ap-table/constants.d.ts +3 -0
  15. package/es/src/ap-table/hooks/use-table-column-state.d.ts +2 -2
  16. package/es/src/ap-table/hooks/use-table-column-state.mjs +92 -92
  17. package/es/src/ap-table/utils.d.ts +1549 -1539
  18. package/es/src/ap-table/utils.mjs +115 -104
  19. package/es/src/ap-upload/components/Picture.vue2.mjs +59 -55
  20. package/es/src/business/batch-input-group/form-item.vue.mjs +7 -6
  21. package/es/src/business/batch-input-group/interface.d.ts +5 -0
  22. package/es/src/business/hooks/usePageListApTable.d.ts +2 -2
  23. package/es/src/locale/lang/en.mjs +10 -1
  24. package/es/src/locale/lang/zh-cn.mjs +10 -1
  25. package/es/src/utils/data-range-persets.d.ts +87 -0
  26. package/es/src/utils/data-range-persets.mjs +107 -0
  27. package/lib/src/ap-field/date/index.vue.d.ts +1 -0
  28. package/lib/src/ap-field/date/index.vue.js +1 -1
  29. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  30. package/lib/src/ap-field/hooks/use-default-presets.d.ts +11 -0
  31. package/lib/src/ap-field/hooks/use-default-presets.js +1 -0
  32. package/lib/src/ap-field/interface.d.ts +7 -1
  33. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  34. package/lib/src/ap-table/components/dynamic-component/diff.d.ts +2 -0
  35. package/lib/src/ap-table/components/dynamic-component/index.vue.d.ts +4 -0
  36. package/lib/src/ap-table/components/dynamic-component/index.vue.js +1 -0
  37. package/lib/src/ap-table/components/dynamic-component/index.vue2.js +1 -0
  38. package/lib/src/ap-table/components/interface.d.ts +3 -0
  39. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
  40. package/lib/src/ap-table/constants.d.ts +3 -0
  41. package/lib/src/ap-table/hooks/use-table-column-state.d.ts +2 -2
  42. package/lib/src/ap-table/hooks/use-table-column-state.js +1 -1
  43. package/lib/src/ap-table/utils.d.ts +1549 -1539
  44. package/lib/src/ap-table/utils.js +1 -1
  45. package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
  46. package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
  47. package/lib/src/business/batch-input-group/interface.d.ts +5 -0
  48. package/lib/src/business/hooks/usePageListApTable.d.ts +2 -2
  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/utils/data-range-persets.d.ts +87 -0
  52. package/lib/src/utils/data-range-persets.js +1 -0
  53. package/package.json +3 -3
  54. package/theme/ap-table/ap-table.css +4 -4
  55. package/theme/ap-table/ap-table.less +4 -4
  56. package/theme/ap-table-modal/index.css +4 -4
  57. package/theme/index.css +4 -4
@@ -1,12 +1,12 @@
1
- import { defineComponent as Te, useSlots as Fe, ref as P, computed as s, unref as t, createVNode as w, Fragment as q, watchEffect as xe, watch as G, openBlock as p, createElementBlock as T, normalizeClass as f, normalizeStyle as M, mergeProps as S, createSlots as _, withCtx as F, renderList as J, createBlock as Q, resolveDynamicComponent as Be, renderSlot as b, createCommentVNode as X, createElementVNode as I, normalizeProps as ke, guardReactiveProps as ze } from "vue";
2
- import { Divider as Pe, Table as Ie } from "@aplus-frontend/antdv";
3
- import { useToken as Ne } from "@aplus-frontend/antdv/es/theme/internal";
1
+ import { defineComponent as Te, useSlots as Fe, ref as P, computed as s, unref as t, createVNode as w, Fragment as q, watchEffect as xe, watch as G, openBlock as p, createElementBlock as T, normalizeClass as f, normalizeStyle as M, mergeProps as S, createSlots as _, withCtx as F, renderList as J, createBlock as Q, resolveDynamicComponent as Be, renderSlot as b, createCommentVNode as X, createElementVNode as N, normalizeProps as ke, guardReactiveProps as ze } from "vue";
2
+ import { Divider as Pe, Table as Ne } from "@aplus-frontend/antdv";
3
+ import { useToken as Ie } from "@aplus-frontend/antdv/es/theme/internal";
4
4
  import { ApForm as Ee } from "../ap-form/index.mjs";
5
5
  import { noRenderAsFormItemValueList as Y } from "./constants.mjs";
6
6
  import "../config-provider/index.mjs";
7
7
  import { useTablePaging as Ke } from "./hooks/use-table-paging-ng.mjs";
8
8
  import { isUndefined as m, omit as Z, isBoolean as Oe } from "lodash-unified";
9
- import { getColumnOrder as ee, updateFormProps as Le, getFieldProps as Ve, getSearchFormItemRenderNode as Ae, recursionApColumns as ae, apColumnToColumn as De, getTableTitle as je, getTableRenderType as $e, getTableRenderProps as We, getTableCellRenderNode as He, falseToUndefined as Ue } from "./utils.mjs";
9
+ import { getColumnOrder as ee, updateFormProps as Le, getFieldProps as Ve, getSearchFormItemRenderNode as Ae, recursionApColumns as oe, apColumnToColumn as De, getTableTitle as je, getTableRenderType as $e, getTableRenderProps as We, getTableCellRenderNode as He, falseToUndefined as Ue } from "./utils.mjs";
10
10
  import qe from "./hooks/use-table-content-height.mjs";
11
11
  import Ge from "./hooks/use-table-row-selection.mjs";
12
12
  import { isDef as Me } from "../utils/index.mjs";
@@ -17,7 +17,7 @@ import { useNamespace as Je } from "../config-provider/hooks/use-namespace.mjs";
17
17
  import { useGlobalConfig as Qe } from "../config-provider/hooks/use-global-config.mjs";
18
18
  import Xe from "./components/paragraph-ellipsis/index.vue2.mjs";
19
19
  import Ye from "./components/setting/modal/index.vue2.mjs";
20
- const Sa = /* @__PURE__ */ Te({
20
+ const bo = /* @__PURE__ */ Te({
21
21
  name: "ApTable",
22
22
  __name: "ap-table",
23
23
  props: {
@@ -141,19 +141,19 @@ const Sa = /* @__PURE__ */ Te({
141
141
  default: void 0
142
142
  }
143
143
  },
144
- setup(oe, {
144
+ setup(ae, {
145
145
  expose: re
146
146
  }) {
147
- const a = oe;
148
- let N = 0;
149
- const h = Fe(), [, te] = Ne(), {
147
+ const o = ae;
148
+ let I = 0;
149
+ const h = Fe(), [, te] = Ie(), {
150
150
  e: x,
151
151
  b: i,
152
152
  be: E
153
153
  } = Je("ap-table"), K = Qe("valueTypeMap"), {
154
154
  height: le,
155
155
  contentRef: ne
156
- } = qe(), B = P(a.size), u = P([]), O = P([]);
156
+ } = qe(), B = P(o.size), u = P([]), O = P([]);
157
157
  _e({
158
158
  columns: s(() => u.value),
159
159
  columnsBackup: s(() => O.value),
@@ -167,37 +167,37 @@ const Sa = /* @__PURE__ */ Te({
167
167
  dataSource: s(() => t(y).records)
168
168
  });
169
169
  const L = s(() => {
170
- var e, r, o;
171
- return N++, ((o = (r = (e = a.columns) == null ? void 0 : e.filter((l) => !l.hideInSearch && l.dataIndex && (l.valueType || l.customRenderFormItem) && !Y.includes(l.valueType))) == null ? void 0 : r.sort((l, d) => {
170
+ var e, r, a;
171
+ return I++, ((a = (r = (e = o.columns) == null ? void 0 : e.filter((l) => !l.hideInSearch && l.dataIndex && (l.valueType || l.customRenderFormItem) && !Y.includes(l.valueType))) == null ? void 0 : r.sort((l, d) => {
172
172
  let n = ee(l.order);
173
173
  return ee(d.order) - n;
174
- })) == null ? void 0 : o.map((l) => {
174
+ })) == null ? void 0 : a.map((l) => {
175
175
  const d = Le(l, Ve(l.fieldProps, {})), n = {
176
176
  ...l,
177
177
  fieldProps: {
178
178
  label: l.title,
179
179
  name: l.dataIndex,
180
180
  ...d || {},
181
- _signal: N
181
+ _signal: I
182
182
  },
183
183
  renderNode: void 0
184
184
  };
185
185
  return n.renderNode = Ae(n, t(K)), n;
186
186
  })) || [];
187
- }), se = s(() => ae(t(u), (e) => {
187
+ }), se = s(() => oe(t(u), (e) => {
188
188
  if (e.sorter === !0)
189
189
  return e.key || e.dataIndex;
190
- }).filter(Boolean)), de = s(() => ae(t(u), (e) => {
190
+ }).filter(Boolean)), de = s(() => oe(t(u), (e) => {
191
191
  if (e.filters && !e.onFilter)
192
192
  return e.key || e.dataIndex;
193
- }).filter(Boolean)), ue = s(() => m(a.dataSource) ? y.records : a.dataSource), {
194
- rowSelection: R,
195
- selectedRows: C,
193
+ }).filter(Boolean)), ue = s(() => m(o.dataSource) ? y.records : o.dataSource), {
194
+ rowSelection: C,
195
+ selectedRows: R,
196
196
  ...v
197
197
  } = Ge({
198
198
  fixed: !0,
199
- ...a.rowSelection === !0 ? {} : a.rowSelection,
200
- rowKey: a.rowKey,
199
+ ...o.rowSelection === !0 ? {} : o.rowSelection,
200
+ rowKey: o.rowKey,
201
201
  dataSource: ue
202
202
  }), {
203
203
  formRef: k,
@@ -210,31 +210,31 @@ const Sa = /* @__PURE__ */ Te({
210
210
  getColumnSFConfig: pe
211
211
  } = Ke({
212
212
  async request(e) {
213
- var o, l;
214
- if (!R.value.preserveSelectedRowKeys && m(a.dataSource) && v.clearAll(), !m(a.dataSource))
213
+ var a, l;
214
+ if (!C.value.preserveSelectedRowKeys && m(o.dataSource) && v.clearAll(), !m(o.dataSource))
215
215
  return {
216
- data: a.dataSource || [],
217
- total: a.dataSource.length || 0
216
+ data: o.dataSource || [],
217
+ total: o.dataSource.length || 0
218
218
  };
219
- const r = await ((o = a.request) == null ? void 0 : o.call(a, e));
220
- return (l = a.onLoad) == null || l.call(a, (r == null ? void 0 : r.data) || []), {
219
+ const r = await ((a = o.request) == null ? void 0 : a.call(o, e));
220
+ return (l = o.onLoad) == null || l.call(o, (r == null ? void 0 : r.data) || []), {
221
221
  data: (r == null ? void 0 : r.data) || [],
222
222
  total: (r == null ? void 0 : r.total) || 0
223
223
  };
224
224
  },
225
225
  filterFields: de,
226
226
  sortFields: se,
227
- defaultParams: a.params,
228
- defaultData: a.defaultData,
229
- manual: a.manual,
230
- formatParams: a.beforeSearchSubmit,
231
- pagination: a.pagination
227
+ defaultParams: o.params,
228
+ defaultData: o.defaultData,
229
+ manual: o.manual,
230
+ formatParams: o.beforeSearchSubmit,
231
+ pagination: o.pagination
232
232
  }), fe = () => {
233
- var o;
234
- let e = ((o = a.columns) == null ? void 0 : o.filter((l) => !l.hideInTable)) || [];
233
+ var a;
234
+ let e = ((a = o.columns) == null ? void 0 : a.filter((l) => !l.hideInTable)) || [];
235
235
  function r(l, d) {
236
236
  return l.map((n) => ({
237
- resizable: Me(n.resizable) ? n.resizable : a.columnResizable,
237
+ resizable: Me(n.resizable) ? n.resizable : o.columnResizable,
238
238
  ...Z(De(n), ["ellipsis"]),
239
239
  ...pe(n),
240
240
  fixed: d ? d.fixed : n.fixed,
@@ -244,19 +244,19 @@ const Sa = /* @__PURE__ */ Te({
244
244
  ...g
245
245
  }) {
246
246
  var H, U;
247
- const $ = $e(n), Re = We({
247
+ const $ = $e(n), Ce = We({
248
248
  ...n,
249
249
  valueType: $
250
250
  }, {
251
251
  value: c,
252
252
  ...g
253
- }), Ce = He($, Re, g.record, t(K)), W = ((H = n.renderText) == null ? void 0 : H.call(n, {
253
+ }), Re = He($, Ce, g.record, t(K)), W = ((H = n.renderText) == null ? void 0 : H.call(n, {
254
254
  value: c,
255
255
  ...g
256
256
  })) || c, ve = n.renderText ? w(q, null, [(U = n.renderText) == null ? void 0 : U.call(n, {
257
257
  value: c,
258
258
  ...g
259
- })]) : Ce;
259
+ })]) : Re;
260
260
  let z = we(n, W, ve);
261
261
  return n.customRender && (z = n.customRender({
262
262
  value: c,
@@ -276,65 +276,65 @@ const Sa = /* @__PURE__ */ Te({
276
276
  u.value = e, O.value = e;
277
277
  });
278
278
  const me = s(() => {
279
- var r, o;
280
- if (a.adaptive && (y.total > 0 || ((r = a.dataSource) == null ? void 0 : r.length)))
279
+ var r, a;
280
+ if (o.adaptive && (y.total > 0 || ((r = o.dataSource) == null ? void 0 : r.length)))
281
281
  return {
282
282
  y: t(le),
283
- x: ((o = a.scroll) == null ? void 0 : o.x) || "100%"
283
+ x: ((a = o.scroll) == null ? void 0 : a.x) || "100%"
284
284
  };
285
- if (a.scroll)
286
- return a.scroll;
285
+ if (o.scroll)
286
+ return o.scroll;
287
287
  }), ye = s(() => {
288
288
  var e;
289
- if (a.tableLayout)
290
- return a.tableLayout;
291
- if ((e = a.columns) != null && e.some((r) => r.ellipsis))
289
+ if (o.tableLayout)
290
+ return o.tableLayout;
291
+ if ((e = o.columns) != null && e.some((r) => r.ellipsis))
292
292
  return "fixed";
293
293
  }), j = s(() => {
294
- var o;
295
- const e = t(D), r = t(R);
294
+ var a;
295
+ const e = t(D), r = t(C);
296
296
  return {
297
- ...a,
297
+ ...o,
298
298
  ...e,
299
- rowSelection: a.rowSelection === !0 || ((o = a.rowSelection) == null ? void 0 : o.mode) === "internal" ? {
299
+ rowSelection: o.rowSelection === !0 || ((a = o.rowSelection) == null ? void 0 : a.mode) === "internal" ? {
300
300
  ...r,
301
301
  // tips 如果是前端分页,则默认会走缓存
302
- preserveSelectedRowKeys: m(a.dataSource) ? r.preserveSelectedRowKeys : !0
303
- } : Ue(a.rowSelection),
304
- loading: m(a.loading) ? e.loading : a.loading,
305
- pagination: a.pagination === !1 ? !1 : e.pagination,
302
+ preserveSelectedRowKeys: m(o.dataSource) ? r.preserveSelectedRowKeys : !0
303
+ } : Ue(o.rowSelection),
304
+ loading: m(o.loading) ? e.loading : o.loading,
305
+ pagination: o.pagination === !1 ? !1 : e.pagination,
306
306
  scroll: t(me)
307
307
  };
308
- }), ge = s(() => [i(), a.card ? null : i("wrapper"), a.adaptive ? i("adaptive") : null].filter(Boolean));
309
- function we(e, r, o) {
310
- return Y.includes(e.valueType) ? o : e.copyable || e.ellipsis ? w(Xe, {
308
+ }), ge = s(() => [i(), o.card ? null : i("wrapper"), o.adaptive ? i("adaptive") : null].filter(Boolean));
309
+ function we(e, r, a) {
310
+ return Y.includes(e.valueType) ? a : e.copyable || e.ellipsis ? w(Xe, {
311
311
  copyable: e.copyable,
312
312
  ellipsis: e.ellipsis ? Oe(e.ellipsis) ? {
313
- tooltip: o,
313
+ tooltip: a,
314
314
  rows: 1
315
315
  } : {
316
316
  ...e.ellipsis,
317
- tooltip: o
317
+ tooltip: a
318
318
  } : !1,
319
- content: o
320
- }, null) : o;
319
+ content: a
320
+ }, null) : a;
321
321
  }
322
322
  G(() => t(y).loading, (e) => {
323
323
  var r;
324
- (r = a.onLoadingChange) == null || r.call(a, e);
325
- }), G(() => a.dataSource, (e) => {
324
+ (r = o.onLoadingChange) == null || r.call(o, e);
325
+ }), G(() => o.dataSource, (e) => {
326
326
  ce(e);
327
327
  }, {
328
328
  immediate: !0
329
329
  });
330
330
  function Se(e) {
331
- var r, o, l;
332
- (l = (o = (r = k.value) == null ? void 0 : r.apForm) == null ? void 0 : o.setFieldsValue) == null || l.call(o, e);
331
+ var r, a, l;
332
+ (l = (a = (r = k.value) == null ? void 0 : r.apForm) == null ? void 0 : a.setFieldsValue) == null || l.call(a, e);
333
333
  }
334
334
  function be(e = !1) {
335
- var o, l, d;
335
+ var a, l, d;
336
336
  const r = e ? "getFieldsValueTransformed" : "getFieldsValue";
337
- return (d = (l = (o = k.value) == null ? void 0 : o.apForm) == null ? void 0 : l[r]) == null ? void 0 : d.call(l, !0);
337
+ return (d = (l = (a = k.value) == null ? void 0 : a.apForm) == null ? void 0 : l[r]) == null ? void 0 : d.call(l, !0);
338
338
  }
339
339
  function he() {
340
340
  return t(u);
@@ -348,7 +348,7 @@ const Sa = /* @__PURE__ */ Te({
348
348
  getShownColumns: he,
349
349
  dataSource: s(() => t(y).records),
350
350
  rowSelection: {
351
- selectedRows: s(() => t(C)),
351
+ selectedRows: s(() => t(R)),
352
352
  ...v
353
353
  }
354
354
  }), (e, r) => (p(), T("div", {
@@ -365,32 +365,34 @@ const Sa = /* @__PURE__ */ Te({
365
365
  onSubmit: t(V),
366
366
  onReset: t(A)
367
367
  }), _({
368
- default: F(() => [(p(!0), T(q, null, J(L.value, (o) => (p(), Q(Be(o.renderNode), S({
369
- key: o.dataIndex,
368
+ default: F(() => [(p(!0), T(q, null, J(L.value, (a) => (p(), Q(Be(a.renderNode.Comp), S({
369
+ key: a.dataIndex,
370
+ item: a,
370
371
  ref_for: !0
371
- }, o.fieldProps || {}, {
372
- span: o.span
373
- }), null, 16, ["span"]))), 128))]),
372
+ }, a.fieldProps || {}, {
373
+ span: a.span,
374
+ "custom-render": a.renderNode.render
375
+ }), null, 16, ["item", "span", "custom-render"]))), 128))]),
374
376
  _: 2
375
377
  }, [h.searchFormExtra ? {
376
378
  name: "extra",
377
379
  fn: F(() => [b(e.$slots, "searchFormExtra")]),
378
380
  key: "0"
379
- } : void 0]), 1040, ["submit-loading", "onSubmit", "onReset"])], 6)) : X("", !0), I("div", {
381
+ } : void 0]), 1040, ["submit-loading", "onSubmit", "onReset"])], 6)) : X("", !0), N("div", {
380
382
  ref_key: "contentRef",
381
383
  ref: ne,
382
384
  class: f([t(x)("table-wrapper"), e.card ? t(x)("table-wrapper-card") : null]),
383
385
  style: M(e.tableWrapperStyle)
384
- }, [I("div", {
386
+ }, [N("div", {
385
387
  class: f(t(i)("header-wrapper"))
386
388
  }, [e.settings ? (p(), T("div", {
387
389
  key: 0,
388
390
  class: f(t(i)("header"))
389
- }, [I("div", {
391
+ }, [N("div", {
390
392
  class: f(t(E)("header", "title"))
391
393
  }, [b(e.$slots, "title", S({
392
- selectedRows: t(C),
393
- selectedRowKeys: t(R).selectedRowKeys,
394
+ selectedRows: t(R),
395
+ selectedRowKeys: t(C).selectedRowKeys,
394
396
  shownColumns: u.value
395
397
  }, v))], 2), h.title ? (p(), Q(t(Pe), {
396
398
  key: 0,
@@ -399,29 +401,29 @@ const Sa = /* @__PURE__ */ Te({
399
401
  config: e.settings === !0 ? {} : e.settings
400
402
  }, null, 8, ["config"])], 2)) : b(e.$slots, "title", S({
401
403
  key: 1,
402
- selectedRows: t(C),
403
- selectedRowKeys: t(R).selectedRowKeys,
404
+ selectedRows: t(R),
405
+ selectedRowKeys: t(C).selectedRowKeys,
404
406
  shownColumns: u.value
405
- }, v))], 2), w(t(Ie), S({
407
+ }, v))], 2), w(t(Ne), S({
406
408
  class: t(i)("table")
407
409
  }, j.value, {
408
410
  size: B.value,
409
411
  "table-layout": ye.value,
410
412
  columns: u.value,
411
- onResizeColumn: r[0] || (r[0] = (o, l) => l.width = o)
413
+ onResizeColumn: r[0] || (r[0] = (a, l) => l.width = a)
412
414
  }), _({
413
415
  summary: F(() => [b(e.$slots, "summary", {
414
416
  columns: u.value,
415
417
  records: j.value.dataSource,
416
- selectedRows: t(C)
418
+ selectedRows: t(R)
417
419
  })]),
418
420
  _: 2
419
- }, [J(t(Z)(h, ["title", "searchFormExtra", "headerCell", "summary"]), (o, l) => ({
421
+ }, [J(t(Z)(h, ["title", "searchFormExtra", "headerCell", "summary"]), (a, l) => ({
420
422
  name: l,
421
423
  fn: F((d) => [b(e.$slots, l, ke(ze(d || {})))])
422
424
  }))]), 1040, ["class", "size", "table-layout", "columns"])], 6)], 2));
423
425
  }
424
426
  });
425
427
  export {
426
- Sa as default
428
+ bo as default
427
429
  };
@@ -0,0 +1,2 @@
1
+ declare function areVNodesEqual(prevNode: any, currNode: any): boolean;
2
+ export { areVNodesEqual };
@@ -0,0 +1,4 @@
1
+ import { ApTableDynamicCompProps } from '../interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ declare const _default: DefineComponent<ApTableDynamicCompProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApTableDynamicCompProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,14 @@
1
+ import { defineComponent as n, openBlock as o, createBlock as t, resolveDynamicComponent as r } from "vue";
2
+ const c = /* @__PURE__ */ n({
3
+ name: "ApTableDynamicComponent",
4
+ __name: "index",
5
+ props: {
6
+ customRender: { type: Function }
7
+ },
8
+ setup(p) {
9
+ return (e, m) => (o(), t(r(e.customRender(e.$attrs))));
10
+ }
11
+ });
12
+ export {
13
+ c as default
14
+ };
@@ -61,3 +61,6 @@ export type SortableItemMetaProps = {
61
61
  level?: 1 | 2;
62
62
  open?: boolean;
63
63
  };
64
+ export interface ApTableDynamicCompProps {
65
+ customRender: (params: any) => any;
66
+ }
@@ -1,23 +1,23 @@
1
- import { defineComponent as G, ref as x, unref as e, useSlots as H, createVNode as l, cloneVNode as L, openBlock as y, createElementBlock as M, Fragment as q, createBlock as J, resolveDynamicComponent as K, createCommentVNode as P, withCtx as s, createElementVNode as i, normalizeClass as r, toDisplayString as m, createTextVNode as v, isRef as Q } from "vue";
2
- import { Button as B, Modal as W, RadioGroup as X, RadioButton as _, Divider as h } from "@aplus-frontend/antdv";
3
- import { getSingleVNode as Y } from "../../../../utils/slot.mjs";
4
- import { useInjectApTable as Z } from "../../../context.mjs";
1
+ import { defineComponent as G, ref as y, unref as e, computed as H, useSlots as L, createVNode as l, cloneVNode as M, openBlock as x, createElementBlock as P, Fragment as q, createBlock as J, resolveDynamicComponent as Q, createCommentVNode as W, withCtx as i, createElementVNode as s, normalizeClass as r, toDisplayString as c, createTextVNode as C, isRef as X } from "vue";
2
+ import { Button as B, Modal as Y, RadioGroup as Z, RadioButton as _, Divider as h } from "@aplus-frontend/antdv";
3
+ import { getSingleVNode as ee } from "../../../../utils/slot.mjs";
4
+ import { useInjectApTable as te } from "../../../context.mjs";
5
5
  import "../tree-select/index.vue.mjs";
6
- import { useTableColumnState as ee } from "../../../hooks/use-table-column-state.mjs";
6
+ import { useTableColumnState as le } from "../../../hooks/use-table-column-state.mjs";
7
7
  import "../../../../config-provider/index.mjs";
8
8
  import "../sorter/index.vue.mjs";
9
- import te, { customCloneColumnStates as N } from "../utils.mjs";
10
- import { SettingOutlined as le } from "@ant-design/icons-vue";
11
- import { useLocale as oe } from "../../../../config-provider/hooks/use-locale.mjs";
9
+ import oe, { customCloneColumnStates as N } from "../utils.mjs";
10
+ import { SettingOutlined as ne } from "@ant-design/icons-vue";
11
+ import { useLocale as ae } from "../../../../config-provider/hooks/use-locale.mjs";
12
12
  import { useNamespace as T } from "../../../../config-provider/hooks/use-namespace.mjs";
13
- import ne from "../tree-select/index.vue2.mjs";
14
- import ae from "../sorter/index.vue2.mjs";
15
- const ie = {
13
+ import se from "../tree-select/index.vue2.mjs";
14
+ import ie from "../sorter/index.vue2.mjs";
15
+ const re = {
16
16
  style: {
17
17
  lineHeight: "22px",
18
18
  color: "#8896B0"
19
19
  }
20
- }, xe = /* @__PURE__ */ G({
20
+ }, Be = /* @__PURE__ */ G({
21
21
  __name: "index",
22
22
  props: {
23
23
  config: {
@@ -25,46 +25,46 @@ const ie = {
25
25
  }
26
26
  },
27
27
  setup(A) {
28
- const C = A, {
28
+ const m = A, {
29
29
  columnsBackup: V,
30
30
  size: z,
31
- updateSize: c,
32
- updateColumns: d
33
- } = Z(), f = x(e(z)), {
31
+ updateSize: d,
32
+ updateColumns: f
33
+ } = te(), g = y(e(z)), R = H(() => m.config.persistenceKey), {
34
34
  columnState: n,
35
- setColumnState: R,
36
- isAllSelected: w,
37
- toggleSelectAll: D,
38
- columnStateBackup: O,
39
- setColumnStateBackup: U,
40
- cacheColumnStateIfNeeded: E
41
- } = ee(C.config, []), {
35
+ setColumnState: w,
36
+ isAllSelected: D,
37
+ toggleSelectAll: O,
38
+ columnStateBackup: U,
39
+ setColumnStateBackup: E,
40
+ cacheColumnStateIfNeeded: I
41
+ } = le(m.config, R, []), {
42
42
  t: a
43
- } = oe(), {
44
- b: g,
43
+ } = ae(), {
44
+ b: v,
45
45
  be: S
46
46
  } = T("ap-column-setting"), {
47
- b: I
48
- } = T("ap-table"), u = x(!1), $ = H(), b = Y($.trigger) || l(B, {
49
- icon: l(le, null, null),
50
- class: I("setting-trigger-button")
51
- }, null), k = b ? L(b, {
47
+ b: K
48
+ } = T("ap-table"), u = y(!1), $ = L(), b = ee($.trigger) || l(B, {
49
+ icon: l(ne, null, null),
50
+ class: K("setting-trigger-button")
51
+ }, null), k = b ? M(b, {
52
52
  onClick: () => {
53
53
  u.value = !0;
54
54
  }
55
55
  }) : null;
56
56
  function j() {
57
- R(N(e(O)));
57
+ w(N(e(U)));
58
58
  }
59
59
  function F() {
60
60
  var t, o;
61
- d == null || d(te(e(V), e(n))), c == null || c(e(f)), u.value = !1;
61
+ f == null || f(oe(e(V), e(n))), d == null || d(e(g)), u.value = !1;
62
62
  const p = N(n.value);
63
- U(p), E(p), (o = (t = C.config) == null ? void 0 : t.onChange) == null || o.call(t, p);
63
+ E(p), I(p), (o = (t = m.config) == null ? void 0 : t.onChange) == null || o.call(t, p);
64
64
  }
65
- return (p, t) => (y(), M(q, null, [e(k) ? (y(), J(K(e(k)), {
65
+ return (p, t) => (x(), P(q, null, [e(k) ? (x(), J(Q(e(k)), {
66
66
  key: 0
67
- })) : P("", !0), l(e(W), {
67
+ })) : W("", !0), l(e(Y), {
68
68
  open: u.value,
69
69
  "onUpdate:open": t[2] || (t[2] = (o) => u.value = o),
70
70
  title: e(a)("ap.apTable.setting.title"),
@@ -76,32 +76,32 @@ const ie = {
76
76
  },
77
77
  onOk: F
78
78
  }, {
79
- default: s(() => [i("div", {
80
- class: r(e(g)("wrapper"))
81
- }, [i("div", {
82
- class: r(e(g)("left"))
83
- }, [i("div", {
79
+ default: i(() => [s("div", {
80
+ class: r(e(v)("wrapper"))
81
+ }, [s("div", {
82
+ class: r(e(v)("left"))
83
+ }, [s("div", {
84
84
  class: r(e(S)("left", "header"))
85
- }, [i("div", null, [i("span", ie, m(e(a)("ap.apTable.setting.selectAllTip")), 1), l(e(B), {
85
+ }, [s("div", null, [s("span", re, c(e(a)("ap.apTable.setting.selectAllTip")), 1), l(e(B), {
86
86
  type: "link",
87
87
  size: "small",
88
- onClick: e(D)
88
+ onClick: e(O)
89
89
  }, {
90
- default: s(() => [v(m(e(w) ? e(a)("ap.apTable.setting.unSelectAll") : e(a)("ap.apTable.setting.selectAll")), 1)]),
90
+ default: i(() => [C(c(e(D) ? e(a)("ap.apTable.setting.unSelectAll") : e(a)("ap.apTable.setting.selectAll")), 1)]),
91
91
  _: 1
92
- }, 8, ["onClick"])]), l(e(X), {
93
- value: f.value,
94
- "onUpdate:value": t[0] || (t[0] = (o) => f.value = o)
92
+ }, 8, ["onClick"])]), l(e(Z), {
93
+ value: g.value,
94
+ "onUpdate:value": t[0] || (t[0] = (o) => g.value = o)
95
95
  }, {
96
- default: s(() => [l(e(_), {
96
+ default: i(() => [l(e(_), {
97
97
  value: "small"
98
98
  }, {
99
- default: s(() => [v(m(e(a)("ap.apTable.setting.sizeSmall")), 1)]),
99
+ default: i(() => [C(c(e(a)("ap.apTable.setting.sizeSmall")), 1)]),
100
100
  _: 1
101
101
  }), l(e(_), {
102
102
  value: "middle"
103
103
  }, {
104
- default: s(() => [v(m(e(a)("ap.apTable.setting.sizeNormal")), 1)]),
104
+ default: i(() => [C(c(e(a)("ap.apTable.setting.sizeNormal")), 1)]),
105
105
  _: 1
106
106
  })]),
107
107
  _: 1
@@ -110,7 +110,7 @@ const ie = {
110
110
  style: {
111
111
  margin: "0px"
112
112
  }
113
- }), l(ne, {
113
+ }), l(se, {
114
114
  class: r(e(S)("left", "content")),
115
115
  value: e(n)
116
116
  }, null, 8, ["class", "value"])], 2), l(e(h), {
@@ -119,11 +119,11 @@ const ie = {
119
119
  height: "100%",
120
120
  margin: "0px"
121
121
  }
122
- }), i("div", {
123
- class: r(e(g)("right"))
124
- }, [l(ae, {
122
+ }), s("div", {
123
+ class: r(e(v)("right"))
124
+ }, [l(ie, {
125
125
  value: e(n),
126
- "onUpdate:value": t[1] || (t[1] = (o) => Q(n) ? n.value = o : null),
126
+ "onUpdate:value": t[1] || (t[1] = (o) => X(n) ? n.value = o : null),
127
127
  onReset: j
128
128
  }, null, 8, ["value"])], 2)], 2)]),
129
129
  _: 1
@@ -131,5 +131,5 @@ const ie = {
131
131
  }
132
132
  });
133
133
  export {
134
- xe as default
134
+ Be as default
135
135
  };
@@ -1838,6 +1838,7 @@ export declare const apTableRenderItemMap: {
1838
1838
  showToday: boolean;
1839
1839
  showTime: boolean | SharedTimeProps<Dayjs>;
1840
1840
  emptyText: string;
1841
+ formatBegins: boolean;
1841
1842
  }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
1842
1843
  P: {};
1843
1844
  B: {};
@@ -1874,6 +1875,7 @@ export declare const apTableRenderItemMap: {
1874
1875
  showToday: boolean;
1875
1876
  showTime: boolean | SharedTimeProps<Dayjs>;
1876
1877
  emptyText: string;
1878
+ formatBegins: boolean;
1877
1879
  }>;
1878
1880
  __isFragment?: never;
1879
1881
  __isTeleport?: never;
@@ -1909,6 +1911,7 @@ export declare const apTableRenderItemMap: {
1909
1911
  showToday: boolean;
1910
1912
  showTime: boolean | SharedTimeProps<Dayjs>;
1911
1913
  emptyText: string;
1914
+ formatBegins: boolean;
1912
1915
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
1913
1916
  $slots: Readonly<{
1914
1917
  dateRender: any;
@@ -1,6 +1,6 @@
1
- import { ApColumnState, ApTableSettingType } from '../interface';
2
1
  import { Ref, ComputedRef, ShallowRef } from 'vue';
3
- export declare const useTableColumnState: (columnSetting: ApTableSettingType, initialColumnState: ApColumnState[]) => {
2
+ import { ApColumnState, ApTableSettingType } from '../interface';
3
+ export declare const useTableColumnState: (columnSetting: ApTableSettingType, persistenceKey: Ref<string | undefined>, initialColumnState: ApColumnState[]) => {
4
4
  columnState: Ref<{
5
5
  key: string | number;
6
6
  show?: boolean | undefined;