@aplus-frontend/ui 0.2.11 → 0.2.13

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 (113) hide show
  1. package/es/index.mjs +41 -39
  2. package/es/src/ap-list/index.vue.d.ts +1 -0
  3. package/es/src/ap-list/index.vue.mjs +85 -79
  4. package/es/src/ap-list/interface.d.ts +7 -0
  5. package/es/src/ap-table/ap-table.vue2.mjs +64 -65
  6. package/es/src/ap-table/components/paragraph-ellipsis/index.vue.d.ts +20 -0
  7. package/es/src/ap-table/components/paragraph-ellipsis/index.vue.mjs +4 -0
  8. package/es/src/ap-table/components/paragraph-ellipsis/index.vue2.mjs +82 -0
  9. package/es/src/ap-table/hooks/use-table-column-state.mjs +84 -75
  10. package/es/src/business/ap-image/ApImage.vue.d.ts +39 -1
  11. package/es/src/business/ap-image/ApImage.vue2.mjs +89 -39
  12. package/es/src/business/ap-image/hooks/useOss.mjs +35 -26
  13. package/es/src/business/ap-image/index.d.ts +41 -1
  14. package/es/src/business/ap-image/interface.d.ts +1 -0
  15. package/es/src/business/ap-image/style/css.d.ts +0 -1
  16. package/es/src/business/ap-image/style/css.js +1 -1
  17. package/es/src/business/ap-image/style/index.d.ts +0 -1
  18. package/es/src/business/ap-image/style/index.js +1 -1
  19. package/es/src/business/ap-summary/ap-summary.vue2.mjs +30 -30
  20. package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.d.ts +50 -0
  21. package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs +227 -0
  22. package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue2.mjs +4 -0
  23. package/es/src/business/ap-upload-file/ap-upload-single/style/css.d.ts +0 -0
  24. package/es/src/business/ap-upload-file/ap-upload-single/style/css.js +1 -0
  25. package/es/src/business/ap-upload-file/ap-upload-single/style/index.d.ts +0 -0
  26. package/es/src/business/ap-upload-file/ap-upload-single/style/index.js +1 -0
  27. package/es/src/business/ap-upload-file/hook/useInjectContext.d.ts +4 -0
  28. package/es/src/business/ap-upload-file/hook/useInjectContext.mjs +9 -0
  29. package/es/src/business/ap-upload-file/hook/useOss.d.ts +8 -0
  30. package/es/src/business/ap-upload-file/hook/useOss.mjs +30 -0
  31. package/es/src/business/ap-upload-file/hook/useProps.d.ts +12 -0
  32. package/es/src/business/ap-upload-file/hook/useProps.mjs +28 -0
  33. package/es/src/business/ap-upload-file/icon/delete-icon.vue.d.ts +3 -0
  34. package/es/src/business/ap-upload-file/icon/delete-icon.vue.mjs +27 -0
  35. package/es/src/business/ap-upload-file/icon/file-icon.vue.d.ts +3 -0
  36. package/es/src/business/ap-upload-file/icon/file-icon.vue.mjs +18 -0
  37. package/es/src/business/ap-upload-file/index.d.ts +3 -0
  38. package/es/src/business/ap-upload-file/index.mjs +2 -0
  39. package/es/src/business/ap-upload-file/interface.d.ts +29 -0
  40. package/es/src/business/ap-upload-file/interface.mjs +1 -0
  41. package/es/src/business/ap-upload-file/utils/accept.d.ts +16 -0
  42. package/es/src/business/ap-upload-file/utils/accept.mjs +55 -0
  43. package/es/src/business/ap-upload-file/utils/fileList.d.ts +5 -0
  44. package/es/src/business/ap-upload-file/utils/fileList.mjs +16 -0
  45. package/es/src/business/ap-upload-file/utils/upload.d.ts +10 -0
  46. package/es/src/business/ap-upload-file/utils/upload.mjs +62 -0
  47. package/es/src/business/index.d.ts +1 -0
  48. package/es/src/business/index.mjs +43 -42
  49. package/es/src/config-provider/config-provider.d.ts +8 -0
  50. package/es/src/config-provider/css-var.d.ts +8 -0
  51. package/es/src/config-provider/css-var.mjs +25 -9
  52. package/es/src/config-provider/index.d.ts +48 -0
  53. package/es/src/index.mjs +33 -31
  54. package/es/src/locale/lang/en.mjs +4 -0
  55. package/es/src/locale/lang/zh-cn.mjs +4 -0
  56. package/es/src/path-map.mjs +2 -1
  57. package/lib/index.js +1 -1
  58. package/lib/src/ap-list/index.vue.d.ts +1 -0
  59. package/lib/src/ap-list/index.vue.js +1 -1
  60. package/lib/src/ap-list/interface.d.ts +7 -0
  61. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  62. package/lib/src/ap-table/components/paragraph-ellipsis/index.vue.d.ts +20 -0
  63. package/lib/src/ap-table/components/paragraph-ellipsis/index.vue.js +1 -0
  64. package/lib/src/ap-table/components/paragraph-ellipsis/index.vue2.js +1 -0
  65. package/lib/src/ap-table/hooks/use-table-column-state.js +1 -1
  66. package/lib/src/business/ap-image/ApImage.vue.d.ts +39 -1
  67. package/lib/src/business/ap-image/ApImage.vue2.js +1 -1
  68. package/lib/src/business/ap-image/hooks/useOss.js +1 -1
  69. package/lib/src/business/ap-image/index.d.ts +41 -1
  70. package/lib/src/business/ap-image/interface.d.ts +1 -0
  71. package/lib/src/business/ap-image/style/css.d.ts +0 -1
  72. package/lib/src/business/ap-image/style/css.js +1 -1
  73. package/lib/src/business/ap-image/style/index.d.ts +0 -1
  74. package/lib/src/business/ap-image/style/index.js +1 -1
  75. package/lib/src/business/ap-summary/ap-summary.vue2.js +1 -1
  76. package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.d.ts +50 -0
  77. package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.js +1 -0
  78. package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue2.js +1 -0
  79. package/lib/src/business/ap-upload-file/ap-upload-single/style/css.d.ts +0 -0
  80. package/lib/src/business/ap-upload-file/ap-upload-single/style/css.js +1 -0
  81. package/lib/src/business/ap-upload-file/ap-upload-single/style/index.d.ts +0 -0
  82. package/lib/src/business/ap-upload-file/ap-upload-single/style/index.js +1 -0
  83. package/lib/src/business/ap-upload-file/hook/useInjectContext.d.ts +4 -0
  84. package/lib/src/business/ap-upload-file/hook/useInjectContext.js +1 -0
  85. package/lib/src/business/ap-upload-file/hook/useOss.d.ts +8 -0
  86. package/lib/src/business/ap-upload-file/hook/useOss.js +1 -0
  87. package/lib/src/business/ap-upload-file/hook/useProps.d.ts +12 -0
  88. package/lib/src/business/ap-upload-file/hook/useProps.js +1 -0
  89. package/lib/src/business/ap-upload-file/icon/delete-icon.vue.d.ts +3 -0
  90. package/lib/src/business/ap-upload-file/icon/delete-icon.vue.js +1 -0
  91. package/lib/src/business/ap-upload-file/icon/file-icon.vue.d.ts +3 -0
  92. package/lib/src/business/ap-upload-file/icon/file-icon.vue.js +1 -0
  93. package/lib/src/business/ap-upload-file/index.d.ts +3 -0
  94. package/lib/src/business/ap-upload-file/index.js +1 -0
  95. package/lib/src/business/ap-upload-file/interface.d.ts +29 -0
  96. package/lib/src/business/ap-upload-file/interface.js +1 -0
  97. package/lib/src/business/ap-upload-file/utils/accept.d.ts +16 -0
  98. package/lib/src/business/ap-upload-file/utils/accept.js +1 -0
  99. package/lib/src/business/ap-upload-file/utils/fileList.d.ts +5 -0
  100. package/lib/src/business/ap-upload-file/utils/fileList.js +1 -0
  101. package/lib/src/business/ap-upload-file/utils/upload.d.ts +10 -0
  102. package/lib/src/business/ap-upload-file/utils/upload.js +1 -0
  103. package/lib/src/business/index.d.ts +1 -0
  104. package/lib/src/business/index.js +1 -1
  105. package/lib/src/config-provider/config-provider.d.ts +8 -0
  106. package/lib/src/config-provider/css-var.d.ts +8 -0
  107. package/lib/src/config-provider/css-var.js +1 -1
  108. package/lib/src/config-provider/index.d.ts +48 -0
  109. package/lib/src/index.js +1 -1
  110. package/lib/src/locale/lang/en.js +1 -1
  111. package/lib/src/locale/lang/zh-cn.js +1 -1
  112. package/lib/src/path-map.js +1 -1
  113. package/package.json +2 -2
@@ -1,22 +1,24 @@
1
- import { defineComponent as ve, useSlots as Te, ref as z, computed as s, unref as r, createVNode as y, Fragment as U, watchEffect as Fe, watch as G, openBlock as p, createElementBlock as T, normalizeClass as f, normalizeStyle as M, mergeProps as h, createSlots as J, withCtx as F, renderList as Q, createBlock as X, resolveDynamicComponent as Be, renderSlot as w, createCommentVNode as Y, createElementVNode as I, normalizeProps as xe, guardReactiveProps as ke } from "vue";
2
- import { Typography as Pe, Divider as ze, Table as Ie } from "@aplus-frontend/antdv";
3
- import { useToken as Ne } from "@aplus-frontend/antdv/es/theme/internal";
4
- import { ApForm as Ee } from "../ap-form/index.mjs";
5
- import { noRenderAsFormItemValueList as Z } from "./constants.mjs";
1
+ import { defineComponent as ve, useSlots as Te, ref as P, computed as s, unref as r, createVNode as y, Fragment as U, watchEffect as Fe, watch as G, openBlock as p, createElementBlock as T, normalizeClass as f, normalizeStyle as M, mergeProps as w, createSlots as _, withCtx as F, renderList as J, createBlock as Q, resolveDynamicComponent as Be, renderSlot as h, createCommentVNode as X, createElementVNode as I, normalizeProps as xe, guardReactiveProps as ke } from "vue";
2
+ import { Divider as ze, Table as Pe } from "@aplus-frontend/antdv";
3
+ import { useToken as Ie } from "@aplus-frontend/antdv/es/theme/internal";
4
+ import { ApForm as Ne } from "../ap-form/index.mjs";
5
+ import { noRenderAsFormItemValueList as Y } from "./constants.mjs";
6
6
  import "../config-provider/index.mjs";
7
- import { useTablePaging as Ke } from "./hooks/use-table-paging.mjs";
8
- import { omit as _, isUndefined as m, isBoolean as Le } from "lodash-unified";
9
- import { apColumnToColumn as Oe, getTableTitle as Ve, getTableRenderType as De, getTableRenderProps as Ae, getTableCellRenderNode as je, getColumnOrder as ee, updateFormProps as We, getFieldProps as $e, getSearchFormItemRenderNode as He, recursionApColumns as ae, objectToString as qe } from "./utils.mjs";
10
- import Ue from "./hooks/use-table-content-height.mjs";
11
- import { getRawDisplayValue as Ge } from "../editable-table/utils.mjs";
12
- import Me from "./hooks/use-table-row-selection.mjs";
13
- import { isDef as Je } from "../utils/index.mjs";
7
+ import { useTablePaging as Ee } from "./hooks/use-table-paging.mjs";
8
+ import { omit as Z, isUndefined as m, isBoolean as Ke } from "lodash-unified";
9
+ import { apColumnToColumn as Le, getTableTitle as Oe, getTableRenderType as Ve, getTableRenderProps as De, getTableCellRenderNode as Ae, getColumnOrder as ee, updateFormProps as je, getFieldProps as $e, getSearchFormItemRenderNode as We, recursionApColumns as ae, objectToString as He } from "./utils.mjs";
10
+ import qe from "./hooks/use-table-content-height.mjs";
11
+ import { getRawDisplayValue as Ue } from "../editable-table/utils.mjs";
12
+ import Ge from "./hooks/use-table-row-selection.mjs";
13
+ import { isDef as Me } from "../utils/index.mjs";
14
14
  import "./components/setting/modal/index.vue.mjs";
15
- import { useProvideApTable as Qe } from "./context.mjs";
16
- import { useNamespace as Xe } from "../config-provider/hooks/use-namespace.mjs";
17
- import { useGlobalConfig as Ye } from "../config-provider/hooks/use-global-config.mjs";
18
- import Ze from "./components/setting/modal/index.vue2.mjs";
19
- const ha = /* @__PURE__ */ ve({
15
+ import "./components/paragraph-ellipsis/index.vue.mjs";
16
+ import { useProvideApTable as _e } from "./context.mjs";
17
+ import { useNamespace as Je } from "../config-provider/hooks/use-namespace.mjs";
18
+ import { useGlobalConfig as Qe } from "../config-provider/hooks/use-global-config.mjs";
19
+ import Xe from "./components/paragraph-ellipsis/index.vue2.mjs";
20
+ import Ye from "./components/setting/modal/index.vue2.mjs";
21
+ const Sa = /* @__PURE__ */ ve({
20
22
  name: "ApTable",
21
23
  __name: "ap-table",
22
24
  props: {
@@ -145,15 +147,15 @@ const ha = /* @__PURE__ */ ve({
145
147
  }) {
146
148
  const a = oe;
147
149
  let N = 0;
148
- const S = Te(), [, re] = Ne(), {
150
+ const S = Te(), [, re] = Ie(), {
149
151
  e: B,
150
152
  b: i,
151
153
  be: E
152
- } = Xe("ap-table"), K = Ye("valueTypeMap"), {
154
+ } = Je("ap-table"), K = Qe("valueTypeMap"), {
153
155
  height: le,
154
156
  contentRef: ne
155
- } = Ue(), x = z(a.size), d = z([]), L = z([]);
156
- Qe({
157
+ } = qe(), x = P(a.size), d = P([]), L = P([]);
158
+ _e({
157
159
  columns: s(() => d.value),
158
160
  columnsBackup: s(() => L.value),
159
161
  size: s(() => x.value),
@@ -169,36 +171,36 @@ const ha = /* @__PURE__ */ ve({
169
171
  let e = ((t = a.columns) == null ? void 0 : t.filter((l) => !l.hideInTable)) || [];
170
172
  function o(l, u) {
171
173
  return l.map((n) => ({
172
- resizable: Je(n.resizable) ? n.resizable : a.columnResizable,
173
- ..._(Oe(n), ["ellipsis"]),
174
+ resizable: Me(n.resizable) ? n.resizable : a.columnResizable,
175
+ ...Z(Le(n), ["ellipsis"]),
174
176
  fixed: u ? u.fixed : n.fixed,
175
- title: Ve(n, E("table-header", "title"), S.headerCell, r(re).colorPrimary),
177
+ title: Oe(n, E("table-header", "title"), S.headerCell, r(re).colorPrimary),
176
178
  customRender({
177
179
  value: c,
178
180
  ...g
179
181
  }) {
180
182
  var H, q;
181
- const W = De(n), be = Ae({
183
+ const $ = Ve(n), be = De({
182
184
  ...n,
183
- valueType: W
185
+ valueType: $
184
186
  }, {
185
187
  value: c,
186
188
  ...g
187
- }), Re = je(W, be, g.record, r(K)), $ = ((H = n.renderText) == null ? void 0 : H.call(n, {
189
+ }), Re = Ae($, be, g.record, r(K)), W = ((H = n.renderText) == null ? void 0 : H.call(n, {
188
190
  value: c,
189
191
  ...g
190
192
  })) || c, Ce = n.renderText ? y(U, null, [(q = n.renderText) == null ? void 0 : q.call(n, {
191
193
  value: c,
192
194
  ...g
193
195
  })]) : Re;
194
- let P = ye(n, $, Ce);
195
- return n.customRender && (P = n.customRender({
196
+ let z = ye(n, W, Ce);
197
+ return n.customRender && (z = n.customRender({
196
198
  value: c,
197
199
  ...g,
198
200
  column: n,
199
- originalNode: P,
200
- originalText: $
201
- })), P;
201
+ originalNode: z,
202
+ originalText: W
203
+ })), z;
202
204
  },
203
205
  children: o(n.children || [], u || n)
204
206
  }));
@@ -211,11 +213,11 @@ const ha = /* @__PURE__ */ ve({
211
213
  });
212
214
  const O = s(() => {
213
215
  var e, o, t;
214
- return N++, ((t = (o = (e = a.columns) == null ? void 0 : e.filter((l) => !l.hideInSearch && l.dataIndex && (l.valueType || l.customRenderFormItem) && !Z.includes(l.valueType))) == null ? void 0 : o.sort((l, u) => {
216
+ return N++, ((t = (o = (e = a.columns) == null ? void 0 : e.filter((l) => !l.hideInSearch && l.dataIndex && (l.valueType || l.customRenderFormItem) && !Y.includes(l.valueType))) == null ? void 0 : o.sort((l, u) => {
215
217
  let n = ee(l.order);
216
218
  return ee(u.order) - n;
217
219
  })) == null ? void 0 : t.map((l) => {
218
- const u = We(l, $e(l.fieldProps, {})), n = {
220
+ const u = je(l, $e(l.fieldProps, {})), n = {
219
221
  ...l,
220
222
  fieldProps: {
221
223
  label: l.title,
@@ -225,7 +227,7 @@ const ha = /* @__PURE__ */ ve({
225
227
  },
226
228
  renderNode: void 0
227
229
  };
228
- return n.renderNode = He(n, r(K)), n;
230
+ return n.renderNode = We(n, r(K)), n;
229
231
  })) || [];
230
232
  }), de = s(() => ae(r(d), (e) => {
231
233
  if (e.sorter === !0)
@@ -237,7 +239,7 @@ const ha = /* @__PURE__ */ ve({
237
239
  rowSelection: b,
238
240
  selectedRows: R,
239
241
  ...C
240
- } = Me({
242
+ } = Ge({
241
243
  ...a.rowSelection === !0 ? {} : a.rowSelection,
242
244
  rowKey: a.rowKey,
243
245
  dataSource: ie
@@ -249,7 +251,7 @@ const ha = /* @__PURE__ */ ve({
249
251
  refresh: ce,
250
252
  data: v,
251
253
  setDataSource: pe
252
- } = Ke({
254
+ } = Ee({
253
255
  async request(e) {
254
256
  var t, l;
255
257
  if (!b.value.preserveSelectedRowKeys && m(a.dataSource) && C.clearAll(), !m(a.dataSource))
@@ -305,21 +307,18 @@ const ha = /* @__PURE__ */ ve({
305
307
  };
306
308
  }), ge = s(() => [i(), a.card ? null : i("wrapper"), a.adaptive ? i("adaptive") : null].filter(Boolean));
307
309
  function ye(e, o, t) {
308
- if (Z.includes(e.valueType))
310
+ if (Y.includes(e.valueType))
309
311
  return t;
310
- const l = qe(o);
311
- return e.copyable || e.ellipsis ? y(Pe.Paragraph, {
312
- copyable: e.copyable ? {
313
- text: l,
314
- tooltip: !1
315
- } : !1,
316
- ellipsis: e.ellipsis ? Le(e.ellipsis) ? {
312
+ const l = He(o);
313
+ return e.copyable || e.ellipsis ? y(Xe, {
314
+ copyable: e.copyable,
315
+ ellipsis: e.ellipsis ? Ke(e.ellipsis) ? {
317
316
  tooltip: l
318
317
  } : {
319
318
  ...e.ellipsis,
320
319
  tooltip: l
321
320
  } : !1,
322
- content: e.ellipsis ? Ge(e, o) : t
321
+ content: e.ellipsis ? Ue(e, o) : t
323
322
  }, null) : t;
324
323
  }
325
324
  G(() => r(v).loading, (e) => {
@@ -330,11 +329,11 @@ const ha = /* @__PURE__ */ ve({
330
329
  }, {
331
330
  immediate: !0
332
331
  });
333
- function he(e) {
332
+ function we(e) {
334
333
  var o, t, l;
335
334
  (l = (t = (o = k.value) == null ? void 0 : o.apForm) == null ? void 0 : t.setFieldsValue) == null || l.call(t, e);
336
335
  }
337
- function we() {
336
+ function he() {
338
337
  var e, o, t;
339
338
  return (t = (o = (e = k.value) == null ? void 0 : e.apForm) == null ? void 0 : o.getFieldsValue) == null ? void 0 : t.call(o, !0);
340
339
  }
@@ -345,8 +344,8 @@ const ha = /* @__PURE__ */ ve({
345
344
  submit: () => V(),
346
345
  reset: () => D(),
347
346
  refresh: () => ce(),
348
- setSearchFormValues: he,
349
- getSearchFormValues: we,
347
+ setSearchFormValues: we,
348
+ getSearchFormValues: he,
350
349
  getShownColumns: Se,
351
350
  dataSource: s(() => r(v).records),
352
351
  rowSelection: {
@@ -359,15 +358,15 @@ const ha = /* @__PURE__ */ ve({
359
358
  key: 0,
360
359
  class: f(e.card ? r(B)("search-wrapper") : null),
361
360
  style: M(e.searchFormWrapperStyle)
362
- }, [y(r(Ee).SearchForm, h(e.searchForm || {}, {
361
+ }, [y(r(Ne).SearchForm, w(e.searchForm || {}, {
363
362
  ref_key: "formRef",
364
363
  ref: k,
365
364
  "custom-reset": "",
366
365
  onSubmit: r(V),
367
366
  onReset: r(D),
368
367
  "submit-loading": r(A).loading
369
- }), J({
370
- default: F(() => [(p(!0), T(U, null, Q(O.value, (t) => (p(), X(Be(t.renderNode), h({
368
+ }), _({
369
+ default: F(() => [(p(!0), T(U, null, J(O.value, (t) => (p(), Q(Be(t.renderNode), w({
371
370
  key: t.dataIndex,
372
371
  ref_for: !0
373
372
  }, t.fieldProps || {}, {
@@ -376,9 +375,9 @@ const ha = /* @__PURE__ */ ve({
376
375
  _: 2
377
376
  }, [S.searchFormExtra ? {
378
377
  name: "extra",
379
- fn: F(() => [w(e.$slots, "searchFormExtra")]),
378
+ fn: F(() => [h(e.$slots, "searchFormExtra")]),
380
379
  key: "0"
381
- } : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : Y("", !0), I("div", {
380
+ } : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : X("", !0), I("div", {
382
381
  ref_key: "contentRef",
383
382
  ref: ne,
384
383
  class: f([r(B)("table-wrapper"), e.card ? r(B)("table-wrapper-card") : null]),
@@ -390,40 +389,40 @@ const ha = /* @__PURE__ */ ve({
390
389
  class: f(r(i)("header"))
391
390
  }, [I("div", {
392
391
  class: f(r(E)("header", "title"))
393
- }, [w(e.$slots, "title", h({
392
+ }, [h(e.$slots, "title", w({
394
393
  selectedRows: r(R),
395
394
  selectedRowKeys: r(b).selectedRowKeys,
396
395
  shownColumns: d.value
397
- }, C))], 2), S.title ? (p(), X(r(ze), {
396
+ }, C))], 2), S.title ? (p(), Q(r(ze), {
398
397
  key: 0,
399
398
  type: "vertical"
400
- })) : Y("", !0), y(Ze, {
399
+ })) : X("", !0), y(Ye, {
401
400
  config: e.settings === !0 ? {} : e.settings
402
- }, null, 8, ["config"])], 2)) : w(e.$slots, "title", h({
401
+ }, null, 8, ["config"])], 2)) : h(e.$slots, "title", w({
403
402
  key: 1,
404
403
  selectedRows: r(R),
405
404
  selectedRowKeys: r(b).selectedRowKeys,
406
405
  shownColumns: d.value
407
- }, C))], 2), y(r(Ie), h({
406
+ }, C))], 2), y(r(Pe), w({
408
407
  class: r(i)("table")
409
408
  }, j.value, {
410
409
  size: x.value,
411
410
  "table-layout": me.value,
412
411
  columns: d.value,
413
412
  onResizeColumn: o[0] || (o[0] = (t, l) => l.width = t)
414
- }), J({
415
- summary: F(() => [w(e.$slots, "summary", {
413
+ }), _({
414
+ summary: F(() => [h(e.$slots, "summary", {
416
415
  columns: d.value,
417
416
  records: j.value.dataSource,
418
417
  selectedRows: r(R)
419
418
  })]),
420
419
  _: 2
421
- }, [Q(r(_)(S, ["title", "searchFormExtra", "headerCell", "summary"]), (t, l) => ({
420
+ }, [J(r(Z)(S, ["title", "searchFormExtra", "headerCell", "summary"]), (t, l) => ({
422
421
  name: l,
423
- fn: F((u) => [w(e.$slots, l, xe(ke(u || {})))])
422
+ fn: F((u) => [h(e.$slots, l, xe(ke(u || {})))])
424
423
  }))]), 1040, ["class", "size", "table-layout", "columns"])], 6)], 2));
425
424
  }
426
425
  });
427
426
  export {
428
- ha as default
427
+ Sa as default
429
428
  };
@@ -0,0 +1,20 @@
1
+ import { VNodeChild, DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
2
+ interface Props {
3
+ copyable?: boolean;
4
+ content?: VNodeChild;
5
+ ellipsis?: boolean | {
6
+ rows?: number;
7
+ tooltip?: VNodeChild;
8
+ };
9
+ }
10
+ declare const _default: DefineComponent<__VLS_TypePropsToOption<Props>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToOption<Props>>>, {}, {}>;
11
+ export default _default;
12
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
13
+ type __VLS_TypePropsToOption<T> = {
14
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
15
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
16
+ } : {
17
+ type: PropType<T[K]>;
18
+ required: true;
19
+ };
20
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,82 @@
1
+ import { defineComponent as T, ref as _, computed as w, openBlock as o, createElementBlock as f, mergeProps as B, unref as t, createElementVNode as O, normalizeClass as y, createVNode as d, createSlots as x, withCtx as u, createBlock as s, resolveDynamicComponent as v, h as b, Fragment as h, createCommentVNode as E } from "vue";
2
+ import "../../../config-provider/index.mjs";
3
+ import { Tooltip as C } from "@aplus-frontend/antdv";
4
+ import { CopyOutlined as N, CheckOutlined as j } from "@ant-design/icons-vue";
5
+ import { useNamespace as S } from "../../../config-provider/hooks/use-namespace.mjs";
6
+ import { useLocale as V } from "../../../config-provider/hooks/use-locale.mjs";
7
+ const $ = /* @__PURE__ */ T({
8
+ name: "ApTableParagraphEllipsis",
9
+ __name: "index",
10
+ props: {
11
+ copyable: { type: Boolean },
12
+ content: { type: [Object, String, Number, Boolean, null, Array] },
13
+ ellipsis: { type: [Boolean, Object] }
14
+ },
15
+ setup(g) {
16
+ const { b: i } = S("ap-table-paragraph-ellipsis"), { t: m } = V(), e = g, l = _(!1), r = w(() => e.ellipsis === !0 ? {
17
+ rows: 1,
18
+ tooltip: e.content
19
+ } : typeof e.ellipsis == "object" ? Object.assign(
20
+ {
21
+ rows: 1,
22
+ tooltip: e.content
23
+ },
24
+ e.ellipsis
25
+ ) : {});
26
+ function k() {
27
+ var c, a, p;
28
+ const n = ((c = r.value) == null ? void 0 : c.tooltip) ?? ((p = (a = e.content) == null ? void 0 : a.props) == null ? void 0 : p.value) ?? e.content;
29
+ navigator.clipboard.writeText(n), l.value || (l.value = !0, setTimeout(() => {
30
+ l.value = !1;
31
+ }, 2200));
32
+ }
33
+ return (n, c) => {
34
+ var a, p;
35
+ return o(), f("div", B({
36
+ class: [t(i)()]
37
+ }, {
38
+ ...n.$attrs
39
+ }, {
40
+ style: {
41
+ "--ap-table-paragraph-ellipsis-rows": (a = r.value) == null ? void 0 : a.rows
42
+ }
43
+ }), [
44
+ O("div", {
45
+ class: y([t(i)("content")])
46
+ }, [
47
+ d(t(C), null, x({
48
+ default: u(() => [
49
+ (o(), s(v(b(h, [e.content]))))
50
+ ]),
51
+ _: 2
52
+ }, [
53
+ (p = r.value) != null && p.tooltip ? {
54
+ name: "title",
55
+ fn: u(() => [
56
+ (o(), s(v(b(h, [r.value.tooltip]))))
57
+ ]),
58
+ key: "0"
59
+ } : void 0
60
+ ]), 1024)
61
+ ], 2),
62
+ e.copyable ? (o(), f("div", {
63
+ key: 0,
64
+ class: y([t(i)("copyable")]),
65
+ onClick: k
66
+ }, [
67
+ d(t(C), {
68
+ title: l.value ? t(m)("ap.apTable.paragraphEllipsis.copySuccess") : t(m)("ap.apTable.paragraphEllipsis.copy")
69
+ }, {
70
+ default: u(() => [
71
+ l.value ? (o(), s(t(j), { key: 1 })) : (o(), s(t(N), { key: 0 }))
72
+ ]),
73
+ _: 1
74
+ }, 8, ["title"])
75
+ ], 2)) : E("", !0)
76
+ ], 16);
77
+ };
78
+ }
79
+ });
80
+ export {
81
+ $ as default
82
+ };
@@ -1,118 +1,127 @@
1
- import { ref as _, shallowRef as j, unref as f, computed as z, watchEffect as D } from "vue";
2
- import { isDef as G } from "../../utils/index.mjs";
3
- import W, { customCloneColumnStates as k, getColumnStateString as X } from "../components/setting/utils.mjs";
4
- import { useInjectApTable as q } from "../context.mjs";
5
- import { isObject as B, mergeWith as E, isBoolean as H, omit as L, isNumber as N } from "lodash-unified";
6
- function a(r, n) {
7
- r.forEach((o) => {
8
- var c;
9
- n(o), (c = o.children) != null && c.length && a(o.children, n);
1
+ import { ref as j, shallowRef as z, unref as d, computed as D, watchEffect as G } from "vue";
2
+ import { isDef as W } from "../../utils/index.mjs";
3
+ import X, { customCloneColumnStates as A, getColumnStateString as q } from "../components/setting/utils.mjs";
4
+ import { useInjectApTable as H } from "../context.mjs";
5
+ import { isObject as B, mergeWith as E, isBoolean as L, omit as P, isNumber as N } from "lodash-unified";
6
+ function a(t, n) {
7
+ t.forEach((o) => {
8
+ var i;
9
+ n(o), (i = o.children) != null && i.length && a(o.children, n);
10
10
  });
11
11
  }
12
- function P(r, n) {
12
+ function Q(t, n) {
13
13
  if (!n)
14
14
  return {};
15
- const o = r.getItem(n);
15
+ const o = t.getItem(n);
16
16
  return o ? JSON.parse(o) : {};
17
17
  }
18
- function I(r, n) {
19
- if (B(r) && B(n))
20
- return E({}, r, n, I);
18
+ function F(t, n) {
19
+ if (B(t) && B(n))
20
+ return E({}, t, n, F);
21
21
  }
22
- const b = Number.MAX_SAFE_INTEGER, V = (r, n) => {
23
- const o = _(n), c = j(
24
- k(n)
25
- ), { columnsBackup: m, updateColumns: d } = q(), T = r.persistenceType || "localStorage", p = window[T];
26
- function F() {
27
- const e = P(
28
- p,
29
- r.persistenceKey
30
- ), t = E(
22
+ const b = Number.MAX_SAFE_INTEGER;
23
+ function U(t, n, o, i) {
24
+ return i ? i.fixed : n ? n.fixed : o && "fixed" in o ? o.fixed : L(t.fixed) ? t.fixed ? "left" : void 0 : t.fixed;
25
+ }
26
+ const te = (t, n) => {
27
+ const o = j(n), i = z(
28
+ A(n)
29
+ ), { columnsBackup: p, updateColumns: l } = H(), I = t.persistenceType || "localStorage", x = window[I];
30
+ function T() {
31
+ const e = Q(
32
+ x,
33
+ t.persistenceKey
34
+ ), r = E(
31
35
  {},
32
- r.defaultValue || {},
36
+ t.defaultValue || {},
33
37
  e,
34
- I
35
- ), s = f(m);
36
- function l(R, u, y) {
37
- return R.map((i) => {
38
- var A;
39
- const v = (u == null ? void 0 : u[i.key]) || {}, h = {
40
- key: i.key,
41
- label: i.title,
38
+ F
39
+ ), s = d(p);
40
+ function c(R, u, _) {
41
+ return R.map((f) => {
42
+ var k, v;
43
+ const w = (u == null ? void 0 : u[f.key]) || {}, h = {
44
+ key: f.key,
45
+ label: f.title,
42
46
  show: !0,
43
- fixed: y ? y.fixed : H(i.fixed) ? i.fixed ? "left" : void 0 : i.fixed,
47
+ fixed: U(
48
+ f,
49
+ e[f.key],
50
+ (k = t.defaultValue) == null ? void 0 : k[f.key],
51
+ _
52
+ ),
44
53
  disabled: !1,
45
- ...L(v, "children")
54
+ ...P(w, ["children", "fixed"])
46
55
  };
47
- return h.children = (A = i.children) != null && A.length ? l(
48
- i.children,
49
- v.children,
56
+ return h.children = (v = f.children) != null && v.length ? c(
57
+ f.children,
58
+ w.children,
50
59
  h
51
60
  ) : void 0, h;
52
61
  }).sort(O);
53
62
  }
54
- return l(s || [], t);
63
+ return c(s || [], r);
55
64
  }
56
- function O(e, t) {
65
+ function O(e, r) {
57
66
  const s = N(e.order) ? e.order : b;
58
- let l = N(t.order) ? t.order : b;
59
- return e.fixed === "right" && t.fixed !== "right" && (l = s - 1), t.fixed === "left" && e.fixed !== "left" && (l = s - 1), s - l;
67
+ let c = N(r.order) ? r.order : b;
68
+ return e.fixed === "right" && r.fixed !== "right" && (c = s - 1), r.fixed === "left" && e.fixed !== "left" && (c = s - 1), s - c;
60
69
  }
61
- const C = z(() => f(o).every((e) => e.show));
62
- function S() {
63
- const e = f(o);
64
- a(e, (t) => {
65
- !t.disabled && (t.show = !0);
70
+ const g = D(() => d(o).every((e) => e.show));
71
+ function C() {
72
+ const e = d(o);
73
+ a(e, (r) => {
74
+ !r.disabled && (r.show = !0);
66
75
  });
67
76
  }
68
- function g() {
69
- const e = f(o);
70
- a(e, (t) => {
71
- !t.disabled && (t.show = !1);
77
+ function y() {
78
+ const e = d(o);
79
+ a(e, (r) => {
80
+ !r.disabled && (r.show = !1);
72
81
  });
73
82
  }
74
83
  function K() {
75
- f(C) ? g() : S();
84
+ d(g) ? y() : C();
76
85
  }
77
- function J(e, t) {
78
- a(f(o), (s) => {
79
- s.key === e && (s.show = G(t) ? t : !s.show);
86
+ function J(e, r) {
87
+ a(d(o), (s) => {
88
+ s.key === e && (s.show = W(r) ? r : !s.show);
80
89
  });
81
90
  }
82
- function w(e) {
91
+ function S(e) {
83
92
  o.value = e;
84
93
  }
85
94
  function M(e) {
86
- c.value = e;
95
+ i.value = e;
87
96
  }
88
- function x(e) {
89
- if (r.persistenceKey) {
90
- const t = X(e);
91
- p.setItem(r.persistenceKey, JSON.stringify(t));
97
+ function m(e) {
98
+ if (t.persistenceKey) {
99
+ const r = q(e);
100
+ x.setItem(t.persistenceKey, JSON.stringify(r));
92
101
  }
93
102
  }
94
- return D(() => {
95
- var t;
96
- const e = F();
97
- w(e), (t = r.onChange) == null || t.call(r, e), d == null || d(
98
- W(
99
- f(m),
100
- f(e)
103
+ return G(() => {
104
+ var r;
105
+ const e = T();
106
+ S(e), (r = t.onChange) == null || r.call(t, e), l == null || l(
107
+ X(
108
+ d(p),
109
+ d(e)
101
110
  )
102
- ), c.value = k(e), x(e);
111
+ ), i.value = A(e), m(e);
103
112
  }), {
104
113
  columnState: o,
105
- selectAll: S,
106
- unSelectAll: g,
114
+ selectAll: C,
115
+ unSelectAll: y,
107
116
  toggleSelect: J,
108
- setColumnState: w,
109
- isAllSelected: C,
117
+ setColumnState: S,
118
+ isAllSelected: g,
110
119
  toggleSelectAll: K,
111
- columnStateBackup: c,
120
+ columnStateBackup: i,
112
121
  setColumnStateBackup: M,
113
- cacheColumnStateIfNeeded: x
122
+ cacheColumnStateIfNeeded: m
114
123
  };
115
124
  };
116
125
  export {
117
- V as useTableColumnState
126
+ te as useTableColumnState
118
127
  };
@@ -1,6 +1,38 @@
1
1
  import { ApImageProps } from './interface';
2
+ import { ImgInfo } from '@aplus-frontend/antdv/es/vc-image/src/Preview';
2
3
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
- declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApImageProps>, {
4
+ declare function __VLS_template(): {
5
+ slots: {
6
+ toolbarRender?(_: {
7
+ originalNodes: import("vue/jsx-runtime").JSX.Element[];
8
+ actions: {
9
+ onFlipX: () => void;
10
+ onFlipY: () => void;
11
+ onRotateLeft: () => void;
12
+ onRotateRight: () => void;
13
+ onZoomIn: () => void;
14
+ onZoomOut: () => void;
15
+ };
16
+ transform: {
17
+ x: number;
18
+ y: number;
19
+ scale: number;
20
+ rotate: number;
21
+ flip: {
22
+ x: number;
23
+ y: number;
24
+ };
25
+ };
26
+ image: ImgInfo;
27
+ current?: number;
28
+ total?: number;
29
+ }): any;
30
+ };
31
+ refs: {};
32
+ attrs: Partial<{}>;
33
+ };
34
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
35
+ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApImageProps>, {
4
36
  preview: boolean;
5
37
  }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApImageProps>, {
6
38
  preview: boolean;
@@ -14,6 +46,7 @@ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOpti
14
46
  current?: number;
15
47
  };
16
48
  }, {}>;
49
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
17
50
  export default _default;
18
51
  type __VLS_WithDefaults<P, D> = {
19
52
  [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
@@ -29,6 +62,11 @@ type __VLS_TypePropsToOption<T> = {
29
62
  required: true;
30
63
  };
31
64
  };
65
+ type __VLS_WithTemplateSlots<T, S> = T & {
66
+ new (): {
67
+ $slots: S;
68
+ };
69
+ };
32
70
  type __VLS_PrettifyLocal<T> = {
33
71
  [K in keyof T]: T[K];
34
72
  } & {};