@aplus-frontend/ui 6.33.0 → 6.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/es/src/ag-grid/components/tooltip/index.vue.d.ts +6 -0
  2. package/es/src/ag-grid/components/tooltip/index.vue.mjs +4 -0
  3. package/es/src/ag-grid/components/tooltip/index.vue2.mjs +29 -0
  4. package/es/src/ag-grid/hooks/use-columns-def.d.ts +1 -0
  5. package/es/src/ag-grid/hooks/use-columns-def.mjs +94 -87
  6. package/es/src/ag-grid/hooks/use-selection-col-def.mjs +28 -22
  7. package/es/src/ag-grid/index.vue.mjs +164 -161
  8. package/es/src/ag-grid/interface.d.ts +5 -1
  9. package/es/src/ap-download/ap-download.vue.mjs +31 -25
  10. package/es/src/ap-form/ap-form.vue.d.ts +2 -6
  11. package/es/src/ap-form/ap-form.vue2.mjs +71 -69
  12. package/es/src/ap-grid/editable/form-item.vue.mjs +74 -71
  13. package/es/src/ap-grid/editable/index.vue.mjs +94 -91
  14. package/es/src/ap-grid/index.vue.mjs +74 -69
  15. package/es/src/ap-pro-card/components/statistic/index.vue.d.ts +1 -1
  16. package/es/src/ap-table/ap-table.vue2.mjs +72 -69
  17. package/es/src/ap-tag/ap-tag-group.vue.mjs +33 -30
  18. package/es/src/ap-upload/components/SingleFile.vue2.mjs +103 -103
  19. package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +21 -18
  20. package/es/src/business/ap-attachment/ApAttachment.mjs +16 -15
  21. package/es/src/business/ap-copy/ApCopy.mjs +5 -6
  22. package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue2.mjs +176 -175
  23. package/es/src/business/ap-keep-alive/keeper/ap-view-keeper.mjs +4 -4
  24. package/es/src/business/ap-label/ApLabel.d.ts +1 -1
  25. package/es/src/business/ap-label/index.d.ts +3 -3
  26. package/es/src/business/hooks/usePageListApTable.mjs +10 -9
  27. package/es/src/editable-table/form-item.vue.mjs +75 -72
  28. package/es/src/editable-table/hooks/use-get-columns.mjs +35 -34
  29. package/es/src/editable-table/index.vue.mjs +68 -65
  30. package/es/src/utils/warning.d.ts +25 -0
  31. package/es/src/utils/warning.mjs +74 -0
  32. package/es/src/version.d.ts +1 -1
  33. package/es/src/version.mjs +1 -1
  34. package/lib/src/ag-grid/components/tooltip/index.vue.d.ts +6 -0
  35. package/lib/src/ag-grid/components/tooltip/index.vue.js +1 -0
  36. package/lib/src/ag-grid/components/tooltip/index.vue2.js +1 -0
  37. package/lib/src/ag-grid/hooks/use-columns-def.d.ts +1 -0
  38. package/lib/src/ag-grid/hooks/use-columns-def.js +1 -1
  39. package/lib/src/ag-grid/hooks/use-selection-col-def.js +1 -1
  40. package/lib/src/ag-grid/index.vue.js +1 -1
  41. package/lib/src/ag-grid/interface.d.ts +5 -1
  42. package/lib/src/ap-download/ap-download.vue.js +1 -1
  43. package/lib/src/ap-form/ap-form.vue.d.ts +2 -6
  44. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  45. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  46. package/lib/src/ap-grid/editable/index.vue.js +1 -1
  47. package/lib/src/ap-grid/index.vue.js +1 -1
  48. package/lib/src/ap-pro-card/components/statistic/index.vue.d.ts +1 -1
  49. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  50. package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
  51. package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
  52. package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
  53. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  54. package/lib/src/business/ap-copy/ApCopy.js +1 -1
  55. package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue2.js +1 -1
  56. package/lib/src/business/ap-keep-alive/keeper/ap-view-keeper.js +1 -1
  57. package/lib/src/business/ap-label/ApLabel.d.ts +1 -1
  58. package/lib/src/business/ap-label/index.d.ts +3 -3
  59. package/lib/src/business/hooks/usePageListApTable.js +1 -1
  60. package/lib/src/editable-table/form-item.vue.js +1 -1
  61. package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
  62. package/lib/src/editable-table/index.vue.js +1 -1
  63. package/lib/src/utils/warning.d.ts +25 -0
  64. package/lib/src/utils/warning.js +1 -0
  65. package/lib/src/version.d.ts +1 -1
  66. package/lib/src/version.js +1 -1
  67. package/package.json +1 -1
  68. package/theme/ag-grid/index.css +5 -1
  69. package/theme/ag-grid/index.less +5 -1
  70. package/theme/index.css +5 -1
@@ -1,4 +1,4 @@
1
- import { defineComponent as We, useSlots as $e, ref as h, computed as n, unref as o, toRef as De, createVNode as c, Fragment as te, watch as x, createElementBlock as B, openBlock as p, normalizeStyle as E, normalizeClass as f, createCommentVNode as ae, createElementVNode as K, mergeProps as k, createSlots as le, withCtx as w, renderList as ne, createBlock as se, resolveDynamicComponent as je, renderSlot as v, normalizeProps as He, guardReactiveProps as _e } from "vue";
1
+ import { defineComponent as We, useSlots as De, ref as h, computed as n, unref as o, toRef as $e, createVNode as c, Fragment as te, watch as x, createElementBlock as B, openBlock as p, normalizeStyle as A, normalizeClass as f, createCommentVNode as ae, createElementVNode as E, mergeProps as k, createSlots as le, withCtx as w, renderList as ne, createBlock as se, resolveDynamicComponent as je, renderSlot as v, normalizeProps as He, guardReactiveProps as _e } from "vue";
2
2
  import { Divider as Ue, Table as qe } from "@aplus-frontend/antdv";
3
3
  import { useToken as Me } from "@aplus-frontend/antdv/es/theme/internal";
4
4
  import { ApForm as Ge } from "../ap-form/index.mjs";
@@ -16,12 +16,13 @@ import { useProvideApTable as ir } from "./context.mjs";
16
16
  import "../scroll-bar/index.mjs";
17
17
  import { useStickyScroll as cr } from "./hooks/use-sticky-scroll.mjs";
18
18
  import { getValidVNodeList as pr } from "../utils/slot.mjs";
19
- import { useNamespace as fr } from "../config-provider/hooks/use-namespace.mjs";
20
- import { useGlobalConfig as mr } from "../config-provider/hooks/use-global-config.mjs";
21
- import yr from "./components/paragraph-ellipsis/index.vue2.mjs";
22
- import gr from "./components/setting/modal/index.vue2.mjs";
23
- import br from "../scroll-bar/index.vue.mjs";
24
- const Dr = /* @__PURE__ */ We({
19
+ import { useDevWarning as fr } from "../utils/warning.mjs";
20
+ import { useNamespace as mr } from "../config-provider/hooks/use-namespace.mjs";
21
+ import { useGlobalConfig as gr } from "../config-provider/hooks/use-global-config.mjs";
22
+ import br from "./components/paragraph-ellipsis/index.vue2.mjs";
23
+ import yr from "./components/setting/modal/index.vue2.mjs";
24
+ import Sr from "../scroll-bar/index.vue.mjs";
25
+ const _r = /* @__PURE__ */ We({
25
26
  name: "ApTable",
26
27
  __name: "ap-table",
27
28
  props: {
@@ -150,20 +151,22 @@ const Dr = /* @__PURE__ */ We({
150
151
  expose: me
151
152
  }) {
152
153
  const r = fe;
153
- let L = 0;
154
- const y = $e(), [, ye] = Me(), {
154
+ let K = 0;
155
+ const g = De(), [, ge] = Me();
156
+ fr("ApTable")(!1, "breaking", "ApTable has been EOL, Please use AgGrid(https://aplus.aplnk.com/aplus-ui/components/ag-grid/) instead.");
157
+ const {
155
158
  e: I,
156
159
  b: u,
157
- be: O,
158
- m: ge,
159
- cssVar: be
160
- } = fr("ap-table"), A = mr("valueTypeMap"), {
160
+ be: L,
161
+ m: be,
162
+ cssVar: ye
163
+ } = mr("ap-table"), O = gr("valueTypeMap"), {
161
164
  height: Se,
162
165
  contentRef: he
163
- } = sr(), W = h(), $ = h(), {
164
- isStickyMode: D,
166
+ } = sr(), W = h(), D = h(), {
167
+ isStickyMode: $,
165
168
  scrollBarRef: R
166
- } = cr(W), z = h(r.size), s = h([]), j = h([]), H = ur(), _ = n(() => (L++, r.columns?.filter((e) => !e.hideInSearch && e.dataIndex && (e.valueType || e.customRenderFormItem) && !de.includes(e.valueType))?.sort((e, a) => {
169
+ } = cr(W), z = h(r.size), s = h([]), j = h([]), H = ur(), _ = n(() => (K++, r.columns?.filter((e) => !e.hideInSearch && e.dataIndex && (e.valueType || e.customRenderFormItem) && !de.includes(e.valueType))?.sort((e, a) => {
167
170
  let t = ie(e.order);
168
171
  return ie(a.order) - t;
169
172
  })?.map((e) => {
@@ -175,18 +178,18 @@ const Dr = /* @__PURE__ */ We({
175
178
  // tips: 在表格中的查询表单项默认是带边框的
176
179
  bordered: !0,
177
180
  ...a || {},
178
- _signal: L
181
+ _signal: K
179
182
  },
180
183
  renderNode: void 0
181
184
  };
182
- return t.renderNode = Ze(t, o(A)), t;
185
+ return t.renderNode = Ze(t, o(O)), t;
183
186
  }) || [])), we = n(() => ce(o(s), (e) => {
184
187
  if (e.sorter === !0)
185
188
  return e.key || e?.dataIndex;
186
189
  }).filter(Boolean)), ve = n(() => ce(o(s), (e) => {
187
190
  if (e.filters && !e.onFilter)
188
191
  return e.key || e?.dataIndex;
189
- }).filter(Boolean)), Re = n(() => m(r.dataSource) ? g.records : r.dataSource), Ce = n(() => pe(r.manual) ? r.manual : pr(y.searchFormExtra?.() || []).some((a) => a.type?.name === "ApView")), {
192
+ }).filter(Boolean)), Re = n(() => m(r.dataSource) ? b.records : r.dataSource), Ce = n(() => pe(r.manual) ? r.manual : pr(g.searchFormExtra?.() || []).some((a) => a.type?.name === "ApView")), {
190
193
  rowSelection: C,
191
194
  selectedRows: T,
192
195
  ...F
@@ -197,11 +200,11 @@ const Dr = /* @__PURE__ */ We({
197
200
  dataSource: Re
198
201
  }), {
199
202
  formRef: i,
200
- submit: N,
201
- reset: P,
203
+ submit: P,
204
+ reset: N,
202
205
  tableProps: U,
203
206
  refresh: q,
204
- data: g,
207
+ data: b,
205
208
  setDataSource: Te,
206
209
  getColumnSFConfig: M,
207
210
  sortedInfo: Fe,
@@ -224,7 +227,7 @@ const Dr = /* @__PURE__ */ We({
224
227
  },
225
228
  filterFields: ve,
226
229
  sortFields: we,
227
- params: De(r, "params"),
230
+ params: $e(r, "params"),
228
231
  defaultData: r.defaultData,
229
232
  manual: o(Ce),
230
233
  formatParams: r.beforeSearchSubmit,
@@ -240,12 +243,12 @@ const Dr = /* @__PURE__ */ We({
240
243
  updateSize(e) {
241
244
  z.value = e;
242
245
  },
243
- dataSource: n(() => o(g).records),
246
+ dataSource: n(() => o(b).records),
244
247
  getSearchFormValues: X,
245
248
  setSearchFormValues: Q,
246
- submit: N,
249
+ submit: P,
247
250
  submitWith: G,
248
- reset: P,
251
+ reset: N,
249
252
  refresh: q,
250
253
  getSearchFormSorterItems: Y,
251
254
  setSearchFormSorterItems: Z,
@@ -260,27 +263,27 @@ const Dr = /* @__PURE__ */ We({
260
263
  // tips: 此函数内部依赖查询&筛选的相应式值
261
264
  ...M(l),
262
265
  fixed: d ? d.fixed : l.fixed,
263
- title: er(l, O("table-header", "title"), y.headerCell, o(ye).colorTextTertiary),
266
+ title: er(l, L("table-header", "title"), g.headerCell, o(ge).colorTextTertiary),
264
267
  customRender({
265
- value: b,
268
+ value: y,
266
269
  ...S
267
270
  }) {
268
- const re = rr(l), Le = or({
271
+ const re = rr(l), Ke = or({
269
272
  ...l,
270
273
  valueType: re
271
274
  }, {
272
- value: b,
275
+ value: y,
273
276
  ...S
274
- }), Oe = tr(re, Le, S.record, o(A)), oe = l.renderText?.({
275
- value: b,
277
+ }), Le = tr(re, Ke, S.record, o(O)), oe = l.renderText?.({
278
+ value: y,
276
279
  ...S
277
- }) || b, Ae = l.renderText ? c(te, null, [l.renderText?.({
278
- value: b,
280
+ }) || y, Oe = l.renderText ? c(te, null, [l.renderText?.({
281
+ value: y,
279
282
  ...S
280
- })]) : Oe;
281
- let V = Ee(l, oe, Ae);
283
+ })]) : Le;
284
+ let V = Ae(l, oe, Oe);
282
285
  return l.customRender && (V = l.customRender({
283
- value: b,
286
+ value: y,
284
287
  ...S,
285
288
  column: l,
286
289
  originalNode: V,
@@ -309,15 +312,15 @@ const Dr = /* @__PURE__ */ We({
309
312
  }, {
310
313
  deep: !0
311
314
  });
312
- const Ne = n(() => {
313
- if (r.adaptive && (g.total > 0 || r.dataSource?.length))
315
+ const Pe = n(() => {
316
+ if (r.adaptive && (b.total > 0 || r.dataSource?.length))
314
317
  return {
315
318
  y: o(Se),
316
319
  x: r.scroll?.x || "100%"
317
320
  };
318
321
  if (r.scroll)
319
322
  return r.scroll;
320
- }), Pe = n(() => {
323
+ }), Ne = n(() => {
321
324
  if (r.tableLayout)
322
325
  return r.tableLayout;
323
326
  if (r.columns?.some((e) => e.ellipsis))
@@ -334,14 +337,14 @@ const Dr = /* @__PURE__ */ We({
334
337
  } : lr(r.rowSelection),
335
338
  loading: m(r.loading) ? e.loading : r.loading,
336
339
  pagination: r.pagination === !1 ? !1 : e.pagination,
337
- scroll: o(Ne)
340
+ scroll: o(Pe)
338
341
  };
339
- }), Ve = n(() => [u(), r.card ? null : u("wrapper"), r.adaptive ? u("adaptive") : null, D.value && R.value?.visible ? ge(`sticky-${H === 0 ? "absolute" : "relative"}`) : null].filter(Boolean));
340
- function Ee(e, a, t) {
342
+ }), Ve = n(() => [u(), r.card ? null : u("wrapper"), r.adaptive ? u("adaptive") : null, $.value && R.value?.visible ? be(`sticky-${H === 0 ? "absolute" : "relative"}`) : null].filter(Boolean));
343
+ function Ae(e, a, t) {
341
344
  if (de.includes(e.valueType))
342
345
  return t;
343
346
  const d = nr(a);
344
- return e.copyable || e.ellipsis ? c(yr, {
347
+ return e.copyable || e.ellipsis ? c(br, {
345
348
  copyable: e.copyable,
346
349
  rawValue: d,
347
350
  ellipsis: e.ellipsis ? Qe(e.ellipsis) ? {
@@ -354,7 +357,7 @@ const Dr = /* @__PURE__ */ We({
354
357
  content: t
355
358
  }, null) : t;
356
359
  }
357
- x(() => o(g).loading, (e) => {
360
+ x(() => o(b).loading, (e) => {
358
361
  r.onLoadingChange?.(e);
359
362
  }), x(() => r.dataSource, (e) => {
360
363
  Te(e);
@@ -377,20 +380,20 @@ const Dr = /* @__PURE__ */ We({
377
380
  function ee() {
378
381
  i.value?.resetSorterItems();
379
382
  }
380
- function Ke() {
383
+ function Ee() {
381
384
  return o(s);
382
385
  }
383
386
  return me({
384
- submit: () => N(),
385
- reset: () => P(),
387
+ submit: () => P(),
388
+ reset: () => N(),
386
389
  refresh: () => q(),
387
390
  submitWith: () => G(),
388
391
  setSearchFormValues: Q,
389
392
  getSearchFormValues: X,
390
393
  setPaging: Be,
391
394
  getPaging: ke,
392
- getShownColumns: Ke,
393
- dataSource: n(() => o(g).records),
395
+ getShownColumns: Ee,
396
+ dataSource: n(() => o(b).records),
394
397
  rowSelection: {
395
398
  selectedRows: n(() => o(T)),
396
399
  ...F
@@ -409,49 +412,49 @@ const Dr = /* @__PURE__ */ We({
409
412
  ref_key: "tableWrapperRef",
410
413
  ref: W,
411
414
  class: f(Ve.value),
412
- style: E(o(be)({
415
+ style: A(o(ye)({
413
416
  "scroll-bar-width": `${o(H)}px`
414
417
  }))
415
418
  }, [o(m)(e.dataSource) && e.searchForm !== !1 && _.value.length > 0 ? (p(), B("div", {
416
419
  key: 0,
417
420
  class: f(e.card ? o(I)("search-wrapper") : null),
418
- style: E(e.searchFormWrapperStyle)
421
+ style: A(e.searchFormWrapperStyle)
419
422
  }, [c(o(Ge).SearchForm, k(e.searchForm || {}, {
420
423
  ref_key: "formRef",
421
424
  ref: i,
422
425
  "custom-reset": "",
423
426
  "submit-loading": o(U).loading,
424
- onSubmit: o(N),
425
- onReset: o(P)
427
+ onSubmit: o(P),
428
+ onReset: o(N)
426
429
  }), le({
427
430
  default: w(() => [(p(!0), B(te, null, ne(_.value, (t) => (p(), se(je(t.renderNode), {
428
431
  key: t.dataIndex
429
432
  }))), 128))]),
430
433
  _: 2
431
- }, [y.searchFormExtra ? {
434
+ }, [g.searchFormExtra ? {
432
435
  name: "extra",
433
436
  fn: w(() => [v(e.$slots, "searchFormExtra")]),
434
437
  key: "0"
435
- } : void 0]), 1040, ["submit-loading", "onSubmit", "onReset"])], 6)) : ae("", !0), K("div", {
438
+ } : void 0]), 1040, ["submit-loading", "onSubmit", "onReset"])], 6)) : ae("", !0), E("div", {
436
439
  ref_key: "contentRef",
437
440
  ref: he,
438
441
  class: f([o(I)("table-wrapper"), e.card ? o(I)("table-wrapper-card") : null]),
439
- style: E(e.tableWrapperStyle)
440
- }, [K("div", {
442
+ style: A(e.tableWrapperStyle)
443
+ }, [E("div", {
441
444
  class: f(o(u)("header-wrapper"))
442
445
  }, [e.settings ? (p(), B("div", {
443
446
  key: 0,
444
447
  class: f(o(u)("header"))
445
- }, [K("div", {
446
- class: f(o(O)("header", "title"))
448
+ }, [E("div", {
449
+ class: f(o(L)("header", "title"))
447
450
  }, [v(e.$slots, "title", k({
448
451
  selectedRows: o(T),
449
452
  selectedRowKeys: o(C).selectedRowKeys,
450
453
  shownColumns: s.value
451
- }, F))], 2), y.title ? (p(), se(o(Ue), {
454
+ }, F))], 2), g.title ? (p(), se(o(Ue), {
452
455
  key: 0,
453
456
  type: "vertical"
454
- })) : ae("", !0), c(gr, {
457
+ })) : ae("", !0), c(yr, {
455
458
  config: e.settings === !0 ? {} : e.settings
456
459
  }, null, 8, ["config"])], 2)) : v(e.$slots, "title", k({
457
460
  key: 1,
@@ -460,11 +463,11 @@ const Dr = /* @__PURE__ */ We({
460
463
  shownColumns: s.value
461
464
  }, F))], 2), c(o(qe), k({
462
465
  ref_key: "antdTableRef",
463
- ref: $,
466
+ ref: D,
464
467
  class: o(u)("table")
465
468
  }, J.value, {
466
469
  size: z.value,
467
- "table-layout": Pe.value,
470
+ "table-layout": Ne.value,
468
471
  columns: s.value,
469
472
  onResizeColumn: a[0] || (a[0] = (t, d) => d.width = t)
470
473
  }), le({
@@ -474,23 +477,23 @@ const Dr = /* @__PURE__ */ We({
474
477
  selectedRows: o(T)
475
478
  })]),
476
479
  _: 2
477
- }, [o(D) ? {
480
+ }, [o($) ? {
478
481
  name: "bottomPaginationTop",
479
- fn: w(() => [c(o(br), {
482
+ fn: w(() => [c(o(Sr), {
480
483
  ref_key: "scrollBarRef",
481
484
  ref: R,
482
- "scroll-container": $.value?.table?.scrollBodyRef,
485
+ "scroll-container": D.value?.table?.scrollBodyRef,
483
486
  direction: "horizontal",
484
487
  "bar-color": "var(--ap-scrollbar-thumb-color-base)",
485
488
  "track-color": "var(--ap-table-header-bg, #f2f6f9)"
486
489
  }, null, 8, ["scroll-container"])]),
487
490
  key: "0"
488
- } : void 0, ne(o(ue)(y, ["title", "searchFormExtra", "headerCell", "summary"]), (t, d) => ({
491
+ } : void 0, ne(o(ue)(g, ["title", "searchFormExtra", "headerCell", "summary"]), (t, d) => ({
489
492
  name: d,
490
493
  fn: w((l) => [v(e.$slots, d, He(_e(l || {})))])
491
494
  }))]), 1040, ["class", "size", "table-layout", "columns"])], 6)], 6));
492
495
  }
493
496
  });
494
497
  export {
495
- Dr as default
498
+ _r as default
496
499
  };
@@ -1,17 +1,18 @@
1
- import { defineComponent as S, ref as C, computed as n, unref as f, watch as j, nextTick as G, onMounted as L, onUnmounted as A, createBlock as g, openBlock as a, mergeProps as w, withCtx as d, createElementVNode as t, normalizeStyle as b, normalizeClass as k, createElementBlock as _, createCommentVNode as F, Fragment as I, renderList as U, toDisplayString as W, renderSlot as q, createTextVNode as H } from "vue";
2
- import { Tooltip as J } from "@aplus-frontend/antdv";
3
- import K from "@ant-design/icons-vue";
1
+ import { defineComponent as j, ref as C, computed as n, unref as f, watch as G, nextTick as L, onMounted as A, onUnmounted as F, createBlock as g, openBlock as a, mergeProps as w, withCtx as d, createElementVNode as t, normalizeStyle as b, normalizeClass as k, createElementBlock as _, createCommentVNode as I, Fragment as U, renderList as q, toDisplayString as W, renderSlot as H, createTextVNode as J } from "vue";
2
+ import { Tooltip as K } from "@aplus-frontend/antdv";
3
+ import O from "@ant-design/icons-vue";
4
4
  import "./ap-tag.vue2.mjs";
5
5
  import "../config-provider/index.mjs";
6
- import { omit as O } from "lodash-unified";
6
+ import { omit as Q } from "lodash-unified";
7
7
  import { getTextWidth as T } from "./utils.mjs";
8
8
  import "../hooks/index.mjs";
9
- import { useLocale as Q } from "../config-provider/hooks/use-locale.mjs";
10
- import { useGlobalConfig as X } from "../config-provider/hooks/use-global-config.mjs";
11
- import { useNamespace as Y } from "../config-provider/hooks/use-namespace.mjs";
12
- import { useResize as Z } from "../hooks/useResize.mjs";
13
- import ee from "./ap-tag.vue.mjs";
14
- const de = /* @__PURE__ */ S({
9
+ import { useDevWarning as X } from "../utils/warning.mjs";
10
+ import { useLocale as Y } from "../config-provider/hooks/use-locale.mjs";
11
+ import { useGlobalConfig as Z } from "../config-provider/hooks/use-global-config.mjs";
12
+ import { useNamespace as ee } from "../config-provider/hooks/use-namespace.mjs";
13
+ import { useResize as te } from "../hooks/useResize.mjs";
14
+ import le from "./ap-tag.vue.mjs";
15
+ const ye = /* @__PURE__ */ j({
15
16
  __name: "ap-tag-group",
16
17
  props: {
17
18
  list: { default: () => [] },
@@ -20,14 +21,14 @@ const de = /* @__PURE__ */ S({
20
21
  ellipsis: { default: () => ({}) }
21
22
  },
22
23
  setup(z) {
23
- const { t: V } = Q(), o = z, v = X("uiMode"), { b: B, bm: h } = Y("tag-group"), r = C(), { observe: E, unobserve: $ } = Z(), i = n(() => ({
24
+ const { t: V } = Y(), o = z, B = X("ApTagGroup"), v = Z("uiMode"), { b: E, bm: h } = ee("tag-group"), r = C(), { observe: D, unobserve: M } = te(), i = n(() => ({
24
25
  ...{
25
26
  iconColor: v.value === "aplus" ? "#182948" : "#333",
26
27
  symbol: "icon",
27
28
  text: V("ap.common.more")
28
29
  },
29
30
  ...o.ellipsis
30
- })), M = n(() => i.value.tooltip && typeof i.value.tooltip == "object" ? O(i.value.tooltip, ["trigger", "title"]) : {}), p = n(() => f(c) < o.list.length), c = C(0), P = n(() => o.list.map((e) => e.text).join("、")), D = n(() => [B()].filter(Boolean)), N = n(() => v.value === "aplus" ? [h("ellipsis-text", "aplus")] : [h("ellipsis-text", "admin")]), y = () => {
31
+ })), P = n(() => i.value.tooltip && typeof i.value.tooltip == "object" ? Q(i.value.tooltip, ["trigger", "title"]) : {}), p = n(() => f(c) < o.list.length), c = C(0), N = n(() => o.list.map((e) => e.text).join("、")), R = n(() => [E()].filter(Boolean)), S = n(() => v.value === "aplus" ? [h("ellipsis-text", "aplus")] : [h("ellipsis-text", "admin")]), y = () => {
31
32
  let e = 0, l = 0;
32
33
  if (!r.value) return;
33
34
  const u = r.value.offsetWidth;
@@ -48,10 +49,10 @@ const de = /* @__PURE__ */ S({
48
49
  }
49
50
  c.value = l;
50
51
  };
51
- j(
52
+ G(
52
53
  () => o.list,
53
54
  (e, l) => {
54
- e !== l && G(() => {
55
+ e !== l && L(() => {
55
56
  y();
56
57
  });
57
58
  },
@@ -59,43 +60,45 @@ const de = /* @__PURE__ */ S({
59
60
  immediate: !0
60
61
  }
61
62
  );
62
- const R = () => {
63
+ const $ = () => {
63
64
  y();
64
65
  };
65
- return L(() => {
66
+ return A(() => {
66
67
  [["ellipsisColor", "ellipse.color"]].forEach(
67
68
  ([e, l]) => {
68
- o[e] && console.error(
69
- `[ApTagGroup]: \`${e}\` is deprecated, please use \`${l}\` instead.`
69
+ B.deprecated(
70
+ !o[e],
71
+ e,
72
+ l
70
73
  );
71
74
  }
72
- ), r.value && E(r.value, R);
73
- }), A(() => {
74
- r.value && $(r.value);
75
- }), (e, l) => (a(), g(f(J), w({ trigger: "hover" }, M.value), {
75
+ ), r.value && D(r.value, $);
76
+ }), F(() => {
77
+ r.value && M(r.value);
78
+ }), (e, l) => (a(), g(f(K), w({ trigger: "hover" }, P.value), {
76
79
  title: d(() => [
77
- q(e.$slots, "tooltip", { tags: e.list }, () => [
78
- H(W(P.value), 1)
80
+ H(e.$slots, "tooltip", { tags: e.list }, () => [
81
+ J(W(N.value), 1)
79
82
  ])
80
83
  ]),
81
84
  default: d(() => [
82
85
  t("div", {
83
86
  ref_key: "container",
84
87
  ref: r,
85
- class: k(D.value),
88
+ class: k(R.value),
86
89
  style: b({
87
90
  pointerEvents: p.value ? "auto" : "none"
88
91
  // opacity: isUpdating ? '0' : '1'
89
92
  })
90
93
  }, [
91
- (a(!0), _(I, null, U(e.list, (u, s) => (a(), g(ee, w({ ref_for: !0 }, u, {
94
+ (a(!0), _(U, null, q(e.list, (u, s) => (a(), g(le, w({ ref_for: !0 }, u, {
92
95
  key: s,
93
96
  style: {
94
97
  display: s >= c.value ? "none" : "inline-flex",
95
98
  marginRight: `${e.space}px`
96
99
  }
97
100
  }), null, 16, ["style"]))), 128)),
98
- p.value && i.value.symbol === "icon" ? (a(), g(f(K), {
101
+ p.value && i.value.symbol === "icon" ? (a(), g(f(O), {
99
102
  key: 0,
100
103
  style: b({
101
104
  color: e.ellipsisColor || i.value.iconColor,
@@ -160,9 +163,9 @@ const de = /* @__PURE__ */ S({
160
163
  _: 1
161
164
  }, 8, ["style"])) : p.value && i.value.symbol === "text" ? (a(), _("span", {
162
165
  key: 1,
163
- class: k(N.value),
166
+ class: k(S.value),
164
167
  style: { cursor: "pointer" }
165
- }, W(i.value.text), 3)) : F("", !0)
168
+ }, W(i.value.text), 3)) : I("", !0)
166
169
  ], 6)
167
170
  ]),
168
171
  _: 3
@@ -170,5 +173,5 @@ const de = /* @__PURE__ */ S({
170
173
  }
171
174
  });
172
175
  export {
173
- de as default
176
+ ye as default
174
177
  };