@aplus-frontend/ui 7.7.11 → 7.9.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 (153) hide show
  1. package/es/index.mjs +230 -226
  2. package/es/src/ag-grid/index.vue.mjs +53 -52
  3. package/es/src/ag-grid/style/index.mjs +9 -4
  4. package/es/src/ap-field/hooks/use-default-placeholder.d.ts +2 -1
  5. package/es/src/ap-field/hooks/use-default-placeholder.mjs +8 -7
  6. package/es/src/ap-field/index.d.ts +10 -2
  7. package/es/src/ap-field/index.mjs +65 -58
  8. package/es/src/ap-field/interface.d.ts +11 -0
  9. package/es/src/ap-field/second/helper.d.ts +7 -0
  10. package/es/src/ap-field/second/helper.mjs +9 -0
  11. package/es/src/ap-field/second/index.vue.d.ts +44 -0
  12. package/es/src/ap-field/second/index.vue.mjs +90 -0
  13. package/es/src/ap-field/second/index.vue2.mjs +4 -0
  14. package/es/src/ap-field/second/read.vue.d.ts +6 -0
  15. package/es/src/ap-field/second/read.vue.mjs +4 -0
  16. package/es/src/ap-field/second/read.vue2.mjs +58 -0
  17. package/es/src/ap-field/style/textarea.mjs +15 -5
  18. package/es/src/ap-field/text-area/index.vue.d.ts +3 -0
  19. package/es/src/ap-field/text-area/index.vue.mjs +44 -28
  20. package/es/src/ap-field/text-area/read.vue.d.ts +3 -0
  21. package/es/src/ap-field/text-area/read.vue2.mjs +26 -8
  22. package/es/src/ap-field/text-area/utils.d.ts +1 -0
  23. package/es/src/ap-field/text-area/utils.mjs +13 -0
  24. package/es/src/ap-form/items/text-area/index.vue.d.ts +12 -0
  25. package/es/src/ap-table/constants.d.ts +9 -0
  26. package/es/src/ap-table/style/index.d.ts +2 -2
  27. package/es/src/ap-table/style/index.mjs +3 -3
  28. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.mjs +20 -19
  29. package/es/src/business/ag-grid-modal/hooks/use-modal-title.d.ts +9 -0
  30. package/es/src/business/ag-grid-modal/hooks/use-modal-title.mjs +14 -10
  31. package/es/src/business/ap-batch-action-group/MenuItemGroup.vue2.mjs +19 -19
  32. package/es/src/business/ap-batch-action-group/interface.d.ts +4 -1
  33. package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +73 -71
  34. package/es/src/index.d.ts +1 -0
  35. package/es/src/index.mjs +290 -286
  36. package/es/src/skeleton/components/desc/index.vue.d.ts +6 -0
  37. package/es/src/skeleton/components/desc/index.vue.mjs +4 -0
  38. package/es/src/skeleton/components/desc/index.vue2.mjs +37 -0
  39. package/es/src/skeleton/components/desc/item-large.vue.d.ts +6 -0
  40. package/es/src/skeleton/components/desc/item-large.vue.mjs +4 -0
  41. package/es/src/skeleton/components/desc/item-large.vue2.mjs +72 -0
  42. package/es/src/skeleton/components/desc/item.vue.d.ts +7 -0
  43. package/es/src/skeleton/components/desc/item.vue.mjs +4 -0
  44. package/es/src/skeleton/components/desc/item.vue2.mjs +69 -0
  45. package/es/src/skeleton/components/line/index.d.ts +14 -0
  46. package/es/src/skeleton/components/line/index.mjs +26 -0
  47. package/es/src/skeleton/components/list/index.vue.d.ts +10 -0
  48. package/es/src/skeleton/components/list/index.vue.mjs +4 -0
  49. package/es/src/skeleton/components/list/index.vue2.mjs +49 -0
  50. package/es/src/skeleton/components/list/item.vue.d.ts +6 -0
  51. package/es/src/skeleton/components/list/item.vue.mjs +4 -0
  52. package/es/src/skeleton/components/list/item.vue2.mjs +57 -0
  53. package/es/src/skeleton/components/page-header/index.vue.d.ts +6 -0
  54. package/es/src/skeleton/components/page-header/index.vue.mjs +4 -0
  55. package/es/src/skeleton/components/page-header/index.vue2.mjs +24 -0
  56. package/es/src/skeleton/components/search-form/index.vue.d.ts +6 -0
  57. package/es/src/skeleton/components/search-form/index.vue.mjs +4 -0
  58. package/es/src/skeleton/components/search-form/index.vue2.mjs +99 -0
  59. package/es/src/skeleton/components/table/index.vue.d.ts +11 -0
  60. package/es/src/skeleton/components/table/index.vue.mjs +4 -0
  61. package/es/src/skeleton/components/table/index.vue2.mjs +78 -0
  62. package/es/src/skeleton/components/table/item.vue.d.ts +9 -0
  63. package/es/src/skeleton/components/table/item.vue.mjs +4 -0
  64. package/es/src/skeleton/components/table/item.vue2.mjs +80 -0
  65. package/es/src/skeleton/descriptions.vue.d.ts +8 -0
  66. package/es/src/skeleton/descriptions.vue.mjs +4 -0
  67. package/es/src/skeleton/descriptions.vue2.mjs +37 -0
  68. package/es/src/skeleton/index.d.ts +9 -0
  69. package/es/src/skeleton/index.mjs +12 -0
  70. package/es/src/skeleton/interface.d.ts +12 -0
  71. package/es/src/skeleton/interface.mjs +1 -0
  72. package/es/src/skeleton/list-page.vue.d.ts +10 -0
  73. package/es/src/skeleton/list-page.vue.mjs +4 -0
  74. package/es/src/skeleton/list-page.vue2.mjs +50 -0
  75. package/es/src/version.d.ts +1 -1
  76. package/es/src/version.mjs +1 -1
  77. package/lib/index.js +1 -1
  78. package/lib/src/ag-grid/index.vue.js +1 -1
  79. package/lib/src/ag-grid/style/index.js +1 -1
  80. package/lib/src/ap-field/hooks/use-default-placeholder.d.ts +2 -1
  81. package/lib/src/ap-field/hooks/use-default-placeholder.js +1 -1
  82. package/lib/src/ap-field/index.d.ts +10 -2
  83. package/lib/src/ap-field/index.js +1 -1
  84. package/lib/src/ap-field/interface.d.ts +11 -0
  85. package/lib/src/ap-field/second/helper.d.ts +7 -0
  86. package/lib/src/ap-field/second/helper.js +1 -0
  87. package/lib/src/ap-field/second/index.vue.d.ts +44 -0
  88. package/lib/src/ap-field/second/index.vue.js +1 -0
  89. package/lib/src/ap-field/second/index.vue2.js +1 -0
  90. package/lib/src/ap-field/second/read.vue.d.ts +6 -0
  91. package/lib/src/ap-field/second/read.vue.js +1 -0
  92. package/lib/src/ap-field/second/read.vue2.js +1 -0
  93. package/lib/src/ap-field/style/textarea.js +1 -1
  94. package/lib/src/ap-field/text-area/index.vue.d.ts +3 -0
  95. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  96. package/lib/src/ap-field/text-area/read.vue.d.ts +3 -0
  97. package/lib/src/ap-field/text-area/read.vue2.js +1 -1
  98. package/lib/src/ap-field/text-area/utils.d.ts +1 -0
  99. package/lib/src/ap-field/text-area/utils.js +1 -0
  100. package/lib/src/ap-form/items/text-area/index.vue.d.ts +12 -0
  101. package/lib/src/ap-table/constants.d.ts +9 -0
  102. package/lib/src/ap-table/style/index.d.ts +2 -2
  103. package/lib/src/ap-table/style/index.js +1 -1
  104. package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.js +1 -1
  105. package/lib/src/business/ag-grid-modal/hooks/use-modal-title.d.ts +9 -0
  106. package/lib/src/business/ag-grid-modal/hooks/use-modal-title.js +1 -1
  107. package/lib/src/business/ap-batch-action-group/MenuItemGroup.vue2.js +1 -1
  108. package/lib/src/business/ap-batch-action-group/interface.d.ts +4 -1
  109. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
  110. package/lib/src/index.d.ts +1 -0
  111. package/lib/src/index.js +1 -1
  112. package/lib/src/skeleton/components/desc/index.vue.d.ts +6 -0
  113. package/lib/src/skeleton/components/desc/index.vue.js +1 -0
  114. package/lib/src/skeleton/components/desc/index.vue2.js +1 -0
  115. package/lib/src/skeleton/components/desc/item-large.vue.d.ts +6 -0
  116. package/lib/src/skeleton/components/desc/item-large.vue.js +1 -0
  117. package/lib/src/skeleton/components/desc/item-large.vue2.js +1 -0
  118. package/lib/src/skeleton/components/desc/item.vue.d.ts +7 -0
  119. package/lib/src/skeleton/components/desc/item.vue.js +1 -0
  120. package/lib/src/skeleton/components/desc/item.vue2.js +1 -0
  121. package/lib/src/skeleton/components/line/index.d.ts +14 -0
  122. package/lib/src/skeleton/components/line/index.js +1 -0
  123. package/lib/src/skeleton/components/list/index.vue.d.ts +10 -0
  124. package/lib/src/skeleton/components/list/index.vue.js +1 -0
  125. package/lib/src/skeleton/components/list/index.vue2.js +1 -0
  126. package/lib/src/skeleton/components/list/item.vue.d.ts +6 -0
  127. package/lib/src/skeleton/components/list/item.vue.js +1 -0
  128. package/lib/src/skeleton/components/list/item.vue2.js +1 -0
  129. package/lib/src/skeleton/components/page-header/index.vue.d.ts +6 -0
  130. package/lib/src/skeleton/components/page-header/index.vue.js +1 -0
  131. package/lib/src/skeleton/components/page-header/index.vue2.js +1 -0
  132. package/lib/src/skeleton/components/search-form/index.vue.d.ts +6 -0
  133. package/lib/src/skeleton/components/search-form/index.vue.js +1 -0
  134. package/lib/src/skeleton/components/search-form/index.vue2.js +1 -0
  135. package/lib/src/skeleton/components/table/index.vue.d.ts +11 -0
  136. package/lib/src/skeleton/components/table/index.vue.js +1 -0
  137. package/lib/src/skeleton/components/table/index.vue2.js +1 -0
  138. package/lib/src/skeleton/components/table/item.vue.d.ts +9 -0
  139. package/lib/src/skeleton/components/table/item.vue.js +1 -0
  140. package/lib/src/skeleton/components/table/item.vue2.js +1 -0
  141. package/lib/src/skeleton/descriptions.vue.d.ts +8 -0
  142. package/lib/src/skeleton/descriptions.vue.js +1 -0
  143. package/lib/src/skeleton/descriptions.vue2.js +1 -0
  144. package/lib/src/skeleton/index.d.ts +9 -0
  145. package/lib/src/skeleton/index.js +1 -0
  146. package/lib/src/skeleton/interface.d.ts +12 -0
  147. package/lib/src/skeleton/interface.js +1 -0
  148. package/lib/src/skeleton/list-page.vue.d.ts +10 -0
  149. package/lib/src/skeleton/list-page.vue.js +1 -0
  150. package/lib/src/skeleton/list-page.vue2.js +1 -0
  151. package/lib/src/version.d.ts +1 -1
  152. package/lib/src/version.js +1 -1
  153. package/package.json +3 -3
@@ -1,4 +1,4 @@
1
- import { defineComponent as po, useSlots as fo, ref as M, toRef as F, unref as t, computed as n, nextTick as z, watch as G, createElementBlock as O, openBlock as h, normalizeStyle as L, normalizeClass as f, createCommentVNode as se, createElementVNode as B, createVNode as ie, mergeProps as W, createSlots as go, withCtx as ue, Fragment as wo, renderList as So, createBlock as H, resolveDynamicComponent as Co, renderSlot as de, withDirectives as ho, vShow as yo } from "vue";
1
+ import { defineComponent as po, useSlots as fo, ref as M, toRef as F, unref as t, computed as n, nextTick as z, watch as G, createElementBlock as O, openBlock as C, normalizeStyle as L, normalizeClass as g, createCommentVNode as se, createElementVNode as B, createVNode as ie, mergeProps as W, createSlots as go, withCtx as ue, Fragment as wo, renderList as So, createBlock as H, resolveDynamicComponent as ho, renderSlot as de, withDirectives as Co, vShow as yo } from "vue";
2
2
  import { AgGridVue as Ro } from "ag-grid-vue3";
3
3
  import { ModuleRegistry as vo, ValidationModule as bo, ColumnAutoSizeModule as Mo, PinnedRowModule as Fo, RowAutoHeightModule as Bo, RowStyleModule as ko, CellSpanModule as xo, CellStyleModule as Io, TooltipModule as Ao, RowSelectionModule as No, LocaleModule as To, ValueCacheModule as Do, GridStateModule as Eo, ColumnApiModule as Po, RowApiModule as Ko, CellApiModule as Vo, RenderApiModule as zo, EventApiModule as Go, ScrollApiModule as Oo, ClientSideRowModelApiModule as Lo, ClientSideRowModelModule as Wo } from "ag-grid-community";
4
4
  import { mergeProps as Ho } from "./utils.mjs";
@@ -139,11 +139,11 @@ const Yt = /* @__PURE__ */ po({
139
139
  y,
140
140
  F(o, "rowHeight"),
141
141
  F(o, "theme")
142
- ), Ce = nt(F(o, "virtual")), { rowPinnedGridConfig: j, getRowPinnedCellClass: he } = st(
142
+ ), he = nt(F(o, "virtual")), { rowPinnedGridConfig: j, getRowPinnedCellClass: Ce } = st(
143
143
  F(o, "summary")
144
144
  ), ye = ft("apGrid"), s = M(), [, Re] = et();
145
145
  let R = !!o.dataSource;
146
- const $ = at(o), { shownColumns: g, columns: q, columnKeys: ve, getTargetColumnByKey: be } = tt(o), { defaultColDef: Me, columnDefs: Fe, gridWrapperRef: Be } = rt(q, o, he), I = M({});
146
+ const $ = at(o), { shownColumns: w, columns: q, columnKeys: ve, getTargetColumnByKey: be } = tt(o), { defaultColDef: Me, columnDefs: Fe, gridWrapperRef: Be } = rt(q, o, Ce), I = M({});
147
147
  Qo({
148
148
  sorter: I,
149
149
  setSorter(e) {
@@ -164,14 +164,14 @@ const Yt = /* @__PURE__ */ po({
164
164
  }
165
165
  if (!l)
166
166
  return;
167
- const u = l.getColDef(), m = l.getSort(), p = be(u.colId);
167
+ const u = l.getColDef(), p = l.getSort(), f = be(u.colId);
168
168
  Q(void 0, void 0, {
169
169
  column: u,
170
- field: p?.field ?? u.field ?? u.colId,
171
- order: m ? ke[m] : null
170
+ field: f?.field ?? u.field ?? u.colId,
171
+ order: p ? ke[p] : null
172
172
  });
173
173
  }
174
- const Ie = n(() => $o(t(g), (e) => {
174
+ const Ie = n(() => $o(t(w), (e) => {
175
175
  if (e.sorter === !0)
176
176
  return e.field ?? e.dataIndex ?? e.key;
177
177
  }).filter(Boolean)), Ae = () => {
@@ -182,10 +182,10 @@ const Yt = /* @__PURE__ */ po({
182
182
  const r = e.getColumnState()?.map((l) => ({ ...l, sort: null }));
183
183
  e.applyColumnState({ state: r });
184
184
  }, T = M(!0), Ne = n(() => gt(o.manual) ? o.manual : lt(U.searchFormExtra?.() || []).some((r) => r.type?.name === "ApView")), {
185
- formRef: w,
185
+ formRef: S,
186
186
  submit: D,
187
187
  reset: E,
188
- data: S,
188
+ data: m,
189
189
  tableProps: J,
190
190
  handleTableChangeOptional: Q,
191
191
  submitWith: X,
@@ -195,7 +195,7 @@ const Yt = /* @__PURE__ */ po({
195
195
  setDataSource: Ee
196
196
  } = qo({
197
197
  async request(e) {
198
- if (R = !1, C.value && !C.value.preserveSelectedRowKeys && k(o.dataSource) && !T.value && V(), T.value && (T.value = !1), !k(o.dataSource)) {
198
+ if (R = !1, h.value && !h.value.preserveSelectedRowKeys && k(o.dataSource) && !T.value && V(), T.value && (T.value = !1), !k(o.dataSource)) {
199
199
  const l = e.pageSize * (e.current - 1);
200
200
  return {
201
201
  data: (o.pagination === !1 ? o.dataSource : o.dataSource.slice(l, l + e.pageSize)) || [],
@@ -217,15 +217,15 @@ const Yt = /* @__PURE__ */ po({
217
217
  pagination: o.pagination,
218
218
  sortFields: Ie,
219
219
  onClickReset: Ae
220
- }), C = n(() => {
220
+ }), h = n(() => {
221
221
  const e = o.rowSelection || ye.value?.rowSelection;
222
222
  if (e)
223
223
  return e === !0 ? ce : {
224
224
  ...ce,
225
225
  ...e
226
226
  };
227
- }), Pe = it(o, g), Ke = n(
228
- () => k(o.dataSource) ? S.records : o.dataSource
227
+ }), Pe = it(o, w), Ke = n(
228
+ () => k(o.dataSource) ? m.records : o.dataSource
229
229
  ), {
230
230
  select: Ve,
231
231
  unSelect: ze,
@@ -236,14 +236,14 @@ const Yt = /* @__PURE__ */ po({
236
236
  selectMulti: We,
237
237
  unSelectMulti: He
238
238
  } = Jo({
239
- ...C.value,
239
+ ...h.value,
240
240
  dataSource: Ke,
241
241
  rowKey: o.rowKey
242
242
  }), Ue = {
243
243
  checkbox: "multiRow",
244
244
  radio: "singleRow"
245
245
  }, _e = n(() => {
246
- const e = C.value;
246
+ const e = h.value;
247
247
  if (!e)
248
248
  return;
249
249
  const { type: r = "checkbox", disabled: l } = e;
@@ -259,19 +259,19 @@ const Yt = /* @__PURE__ */ po({
259
259
  const A = ({
260
260
  api: e = s.value
261
261
  }) => {
262
- if (o.onUpdate?.(), !C.value)
262
+ if (o.onUpdate?.(), !h.value)
263
263
  return;
264
264
  const r = P.value || [];
265
265
  R = !1;
266
266
  const l = [];
267
267
  e.forEachNode((i) => {
268
- const v = i.data, u = K(v), m = i.isSelected();
269
- r.find((p) => K(p) === u) ? !m && l.push(i) : m && i.setSelected(!1);
268
+ const v = i.data, u = K(v), p = i.isSelected();
269
+ r.find((f) => K(f) === u) ? !p && l.push(i) : p && i.setSelected(!1);
270
270
  }), e.setNodesSelected({ nodes: l, newValue: !0 }), setTimeout(() => {
271
271
  R = !0;
272
272
  }, 0);
273
273
  }, je = (e) => {
274
- R && (e.node.isSelected() ? Ve(e.data) : ze(e.data), N(C.value?.tooltip) && e.api.refreshCells({
274
+ R && (e.node.isSelected() ? Ve(e.data) : ze(e.data), N(h.value?.tooltip) && e.api.refreshCells({
275
275
  rowNodes: [e.node],
276
276
  // todo: 取消硬编码
277
277
  columns: ["ag-Grid-SelectionColumn"],
@@ -309,19 +309,19 @@ const Yt = /* @__PURE__ */ po({
309
309
  }
310
310
  function Z(e = !1) {
311
311
  const r = e ? "getFieldsValueTransformed" : "getFieldsValue";
312
- return w.value?.apForm?.[r]?.(!0);
312
+ return S.value?.apForm?.[r]?.(!0);
313
313
  }
314
314
  function ee(e) {
315
- w.value?.apForm?.setFieldsValue?.(e);
315
+ S.value?.apForm?.setFieldsValue?.(e);
316
316
  }
317
317
  function oe() {
318
- return w.value?.getSorterItems() || [];
318
+ return S.value?.getSorterItems() || [];
319
319
  }
320
320
  function te(e) {
321
- w.value?.setSorterItems(e);
321
+ S.value?.setSorterItems(e);
322
322
  }
323
323
  function re() {
324
- w.value?.resetSorterItems();
324
+ S.value?.resetSorterItems();
325
325
  }
326
326
  function le(e) {
327
327
  return e && String(e);
@@ -342,23 +342,23 @@ const Yt = /* @__PURE__ */ po({
342
342
  return ne && (ae.pinned = ne.fixed || null), ae;
343
343
  }), u = new Map(
344
344
  e.map((a, b) => [le(a.key), b])
345
- ), m = v.filter((a) => u.has(a.colId)).sort(
345
+ ), p = v.filter((a) => u.has(a.colId)).sort(
346
346
  (a, b) => u.get(a.colId) - u.get(b.colId)
347
- ), p = [];
347
+ ), f = [];
348
348
  let c = 0;
349
349
  for (const a of v)
350
- u.has(a.colId) ? p.push(m[c++]) : p.push(a);
350
+ u.has(a.colId) ? f.push(p[c++]) : f.push(a);
351
351
  r.applyColumnState({
352
- state: p,
352
+ state: f,
353
353
  applyOrder: !0
354
354
  });
355
355
  }
356
356
  Xo({
357
- columns: n(() => g.value),
357
+ columns: n(() => w.value),
358
358
  columnsBackup: n(() => q.value),
359
359
  size: n(() => Zo[y.value]),
360
360
  updateColumns(e) {
361
- g.value = e, o.onShownColumnsChange?.(e), Ye(e);
361
+ w.value = e, o.onShownColumnsChange?.(e), Ye(e);
362
362
  },
363
363
  updateSize(e) {
364
364
  y.value = Yo[e];
@@ -367,7 +367,7 @@ const Yt = /* @__PURE__ */ po({
367
367
  className: ge("table-header", "title"),
368
368
  color: Re.value.colorTextTertiary
369
369
  })),
370
- dataSource: n(() => t(S).records),
370
+ dataSource: n(() => t(m).records),
371
371
  getSearchFormValues: Z,
372
372
  setSearchFormValues: ee,
373
373
  submit: D,
@@ -379,12 +379,13 @@ const Yt = /* @__PURE__ */ po({
379
379
  resetSearchFormSorterItems: re
380
380
  });
381
381
  const Ze = n(
382
- () => k(o.loading) ? S.loading : o.loading
382
+ () => k(o.loading) ? m.loading : o.loading
383
383
  ), eo = n(() => [
384
384
  d(),
385
385
  o.card ? null : d("wrapper"),
386
386
  d("adaptive"),
387
387
  d(`size-${y.value}`),
388
+ o.autoHeight && m.records.length ? d("auto-height") : null,
388
389
  we.value
389
390
  ].filter(Boolean)), oo = n(() => ({
390
391
  height: "100%",
@@ -436,7 +437,7 @@ const Yt = /* @__PURE__ */ po({
436
437
  y.value = e;
437
438
  }
438
439
  ), G(
439
- () => t(S).loading,
440
+ () => t(m).loading,
440
441
  (e) => {
441
442
  o.onLoadingChange?.(e);
442
443
  }
@@ -447,7 +448,7 @@ const Yt = /* @__PURE__ */ po({
447
448
  submitWith: X,
448
449
  setSearchFormValues: ee,
449
450
  getSearchFormValues: Z,
450
- getShowColumns: () => t(g),
451
+ getShowColumns: () => t(w),
451
452
  rowSelection: {
452
453
  selectedRows: n(() => P.value),
453
454
  setSelectedRowKeys: qe,
@@ -457,7 +458,7 @@ const Yt = /* @__PURE__ */ po({
457
458
  },
458
459
  scrollToRow: lo,
459
460
  scrollToColumn: ao,
460
- getDataSource: () => t(S.records),
461
+ getDataSource: () => t(m.records),
461
462
  getPaging: Te,
462
463
  setPaging: De,
463
464
  getSearchFormSorterItems: oe,
@@ -466,25 +467,25 @@ const Yt = /* @__PURE__ */ po({
466
467
  refreshCells: io,
467
468
  redrawRows: uo,
468
469
  _internalGridApi: n(() => s.value)
469
- }), (e, r) => (h(), O("div", {
470
- class: f(eo.value),
470
+ }), (e, r) => (C(), O("div", {
471
+ class: g(eo.value),
471
472
  style: L(e.wrapperStyle)
472
473
  }, [
473
- t(k)(e.dataSource) && e.searchForm !== !1 && t($).length > 0 ? (h(), O("div", {
474
+ t(k)(e.dataSource) && e.searchForm !== !1 && t($).length > 0 ? (C(), O("div", {
474
475
  key: 0,
475
- class: f(e.card ? t(x)("search-wrapper") : null),
476
+ class: g(e.card ? t(x)("search-wrapper") : null),
476
477
  style: L(e.searchFormWrapperStyle)
477
478
  }, [
478
479
  ie(t(jo).SearchForm, W(e.searchForm || {}, {
479
480
  ref_key: "formRef",
480
- ref: w,
481
+ ref: S,
481
482
  "custom-reset": "",
482
483
  "submit-loading": t(J).loading,
483
484
  onSubmit: t(D),
484
485
  onReset: t(E)
485
486
  }), go({
486
487
  default: ue(() => [
487
- (h(!0), O(wo, null, So(t($), (l) => (h(), H(Co(l.renderNode), {
488
+ (C(!0), O(wo, null, So(t($), (l) => (C(), H(ho(l.renderNode), {
488
489
  key: l.dataIndex
489
490
  }))), 128))
490
491
  ]),
@@ -500,31 +501,31 @@ const Yt = /* @__PURE__ */ po({
500
501
  ]), 1040, ["submit-loading", "onSubmit", "onReset"])
501
502
  ], 6)) : se("", !0),
502
503
  B("div", {
503
- class: f([t(x)("table-wrapper"), e.card ? t(x)("table-wrapper-card") : null]),
504
+ class: g([t(x)("table-wrapper"), e.card ? t(x)("table-wrapper-card") : null]),
504
505
  style: L(e.tableWrapperStyle)
505
506
  }, [
506
507
  B("div", {
507
- class: f(t(d)("header-wrapper"))
508
+ class: g(t(d)("header-wrapper"))
508
509
  }, [
509
510
  de(e.$slots, "title", {
510
511
  selectedRows: t(P),
511
512
  selectedRowKeys: t(Ge),
512
- shownColumns: t(g),
513
+ shownColumns: t(w),
513
514
  clearAll: V
514
515
  })
515
516
  ], 2),
516
517
  B("div", {
517
518
  ref_key: "gridWrapperRef",
518
519
  ref: Be,
519
- class: f(t(d)("grid-wrapper"))
520
+ class: g(t(d)("grid-wrapper"))
520
521
  }, [
521
- (h(), H(t(Ro), W(
522
- t(Ho)(t(Ce), t(j), Je.value),
522
+ (C(), H(t(Ro), W(
523
+ t(Ho)(t(he), t(j), Je.value),
523
524
  {
524
525
  key: t(_),
525
526
  "get-row-class": co,
526
527
  style: oo.value,
527
- "row-data": t(S).records,
528
+ "row-data": t(m).records,
528
529
  "column-defs": t(Fe),
529
530
  "default-col-def": t(Me),
530
531
  "suppress-loading-overlay": "",
@@ -551,8 +552,8 @@ const Yt = /* @__PURE__ */ po({
551
552
  onBodyScrollEnd: so
552
553
  }
553
554
  ), null, 16, ["style", "row-data", "column-defs", "default-col-def", "row-selection", "selection-column-def", "get-row-height", "theme", "enable-browser-tooltips", "row-class-rules", "dom-layout", "locale-text"])),
554
- ho(B("div", {
555
- class: f(t(x)("table-loading-wrapper"))
555
+ Co(B("div", {
556
+ class: g(t(x)("table-loading-wrapper"))
556
557
  }, [
557
558
  ie(t(Uo), { delay: 300 })
558
559
  ], 2), [
@@ -560,9 +561,9 @@ const Yt = /* @__PURE__ */ po({
560
561
  ])
561
562
  ], 2),
562
563
  B("div", {
563
- class: f(t(d)("pagination-wrapper"))
564
+ class: g(t(d)("pagination-wrapper"))
564
565
  }, [
565
- e.pagination !== !1 ? (h(), H(t(_o), W({
566
+ e.pagination !== !1 ? (C(), H(t(_o), W({
566
567
  key: 0,
567
568
  class: t(d)("pagination")
568
569
  }, t(J).pagination, { onChange: to }), null, 16, ["class"])) : se("", !0)
@@ -1,6 +1,6 @@
1
1
  import { genSettingTriggerBtnStyle as a } from "../../ap-table/style/index.mjs";
2
- import { multiRows as l, resetScrollbar as d } from "../../style/index.mjs";
3
- import { genComponentStyleHook as r } from "../../utils/cssinjs/index.mjs";
2
+ import { multiRows as l, resetScrollbar as r } from "../../style/index.mjs";
3
+ import { genComponentStyleHook as d } from "../../utils/cssinjs/index.mjs";
4
4
  const t = {
5
5
  agGridSearchFormWrapperMarginBlockEnd: 10,
6
6
  agGridCellPaddingBlockMedium: 9,
@@ -12,7 +12,7 @@ const t = {
12
12
  const { componentCls: e } = i;
13
13
  return {
14
14
  [e]: {
15
- ...d(i),
15
+ ...r(i),
16
16
  "&-adaptive": {
17
17
  height: "100%",
18
18
  display: "flex",
@@ -23,6 +23,11 @@ const t = {
23
23
  position: "relative"
24
24
  }
25
25
  },
26
+ "&-auto-height": {
27
+ ".ag-center-cols-viewport": {
28
+ minHeight: "unset !important"
29
+ }
30
+ },
26
31
  "&-wrapper": {
27
32
  padding: i.space,
28
33
  paddingBlockEnd: i.spaceLG,
@@ -150,7 +155,7 @@ const t = {
150
155
  }
151
156
  }
152
157
  };
153
- }, s = r(
158
+ }, s = d(
154
159
  "AgGrid",
155
160
  (i) => [n(i)],
156
161
  t,
@@ -1,5 +1,5 @@
1
1
  import { ComputedRef } from 'vue';
2
- import { ApFieldTextPasswordProps, ApFieldTextProps, ApFieldTextAreaProps, ApFieldNumberProps, ApFieldDateProps, ApFieldDateRangeProps, ApFieldSelectProps, BasicApFieldProps } from '../interface';
2
+ import { ApFieldTextPasswordProps, ApFieldTextProps, ApFieldTextAreaProps, ApFieldNumberProps, ApFieldDateProps, ApFieldDateRangeProps, ApFieldSelectProps, BasicApFieldProps, ApFieldSecondProps } from '../interface';
3
3
  type FieldType = {
4
4
  Text: ApFieldTextProps;
5
5
  TextArea: ApFieldTextAreaProps;
@@ -8,6 +8,7 @@ type FieldType = {
8
8
  DateRange: ApFieldDateRangeProps;
9
9
  Select: ApFieldSelectProps;
10
10
  TextPassword: ApFieldTextPasswordProps;
11
+ Second: ApFieldSecondProps;
11
12
  };
12
13
  type FieldNames = keyof FieldType;
13
14
  export declare const useDefaultPlaceholder: <FieldName extends FieldNames>(fieldName: FieldName, props: BasicApFieldProps<{
@@ -1,4 +1,4 @@
1
- import { computed as o } from "vue";
1
+ import { computed as r } from "vue";
2
2
  import "../../config-provider/index.mjs";
3
3
  import "../../utils/index.mjs";
4
4
  import { useLocale as n } from "../../config-provider/hooks/use-locale.mjs";
@@ -7,12 +7,13 @@ const c = ["Select", "Date"], a = [
7
7
  "Text",
8
8
  "TextArea",
9
9
  "Number",
10
- "TextPassword"
11
- ], d = (t, r) => {
10
+ "TextPassword",
11
+ "Second"
12
+ ], m = (t, o) => {
12
13
  const { t: e } = n();
13
- return o(() => {
14
- if (i(r.placeholder))
15
- return r.placeholder;
14
+ return r(() => {
15
+ if (i(o.placeholder))
16
+ return o.placeholder;
16
17
  if (t === "DateRange")
17
18
  return [e("ap.field.startDateText"), e("ap.field.endDateText")];
18
19
  if (c.includes(t))
@@ -22,5 +23,5 @@ const c = ["Select", "Date"], a = [
22
23
  });
23
24
  };
24
25
  export {
25
- d as useDefaultPlaceholder
26
+ m as useDefaultPlaceholder
26
27
  };
@@ -11,8 +11,9 @@ import { default as ApFieldSlider } from './slider/index.vue';
11
11
  import { default as ApFieldSegmented } from './segmented/index.vue';
12
12
  import { default as ApFieldRate } from './rate/index.vue';
13
13
  import { default as ApFieldTreeSelect } from './tree-select/index.vue';
14
+ import { default as ApFieldSecond } from './second/index.vue';
14
15
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, CreateComponentPublicInstanceWithMixins, GlobalComponents, GlobalDirectives, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
15
- import { ApFieldTextProps, FieldMode, ApFieldTextAreaProps, ApFieldNumberProps, ApFieldDateProps, ApFieldDateRangeProps, ApFieldRadioProps, ApFieldCheckboxProps, ApFieldSelectProps, ApFieldSwitchProps, ApFieldTreeSelectProps, ApFieldTextPasswordProps } from './interface';
16
+ import { ApFieldTextProps, FieldMode, ApFieldTextAreaProps, ApFieldNumberProps, ApFieldDateProps, ApFieldDateRangeProps, ApFieldRadioProps, ApFieldCheckboxProps, ApFieldSelectProps, ApFieldSwitchProps, ApFieldTreeSelectProps, ApFieldTextPasswordProps, ApFieldSecondProps } from './interface';
16
17
  import { LiteralUnion } from '../type';
17
18
  import { ApFormatPresetType } from './date/interface';
18
19
  import { CheckboxOptionType } from '@aplus-frontend/antdv';
@@ -30,6 +31,7 @@ export type FieldType = {
30
31
  Segmented: typeof ApFieldSegmented;
31
32
  Rate: typeof ApFieldRate;
32
33
  TreeSelect: typeof ApFieldTreeSelect;
34
+ Second: typeof ApFieldSecond;
33
35
  };
34
36
  export declare const ApFieldRead: {
35
37
  readonly Text: DefineComponent<ApFieldTextProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ApFieldTextProps> & Readonly<{}>, {
@@ -43,6 +45,9 @@ export declare const ApFieldRead: {
43
45
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLSpanElement>;
44
46
  readonly TextArea: DefineComponent<ApFieldTextAreaProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ApFieldTextAreaProps> & Readonly<{}>, {
45
47
  type: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "image" | "tel" | "url" | "email" | "datetime-local" | "file" | "password";
48
+ code: boolean | {
49
+ language?: "text" | "json";
50
+ };
46
51
  mode: FieldMode;
47
52
  disabled: boolean;
48
53
  bordered: boolean;
@@ -124,7 +129,10 @@ export declare const ApFieldRead: {
124
129
  action: string;
125
130
  visibilityToggle: boolean;
126
131
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
132
+ readonly Second: DefineComponent<ApFieldSecondProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ApFieldSecondProps> & Readonly<{}>, {
133
+ emptyText: string;
134
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLSpanElement>;
127
135
  };
128
136
  export declare const ApField: FieldType;
129
137
  export * from './interface';
130
- export { ApFieldText, ApFieldCheckbox, ApFieldDate, ApFieldNumber, ApFieldRadio, ApFieldSwitch, ApFieldTextArea, ApFieldDateRange, ApFieldSelect, ApFieldPassword, ApFieldSlider, ApFieldSegmented, ApFieldRate, ApFieldTreeSelect };
138
+ export { ApFieldText, ApFieldCheckbox, ApFieldDate, ApFieldNumber, ApFieldRadio, ApFieldSwitch, ApFieldTextArea, ApFieldDateRange, ApFieldSelect, ApFieldPassword, ApFieldSlider, ApFieldSegmented, ApFieldRate, ApFieldTreeSelect, ApFieldSecond };
@@ -22,71 +22,78 @@ import "./checkbox/read.vue.mjs";
22
22
  import "./select/read.vue.mjs";
23
23
  import "./switch/read.vue.mjs";
24
24
  import "./tree-select/read.vue.mjs";
25
+ import "./second/index.vue2.mjs";
26
+ import "./second/read.vue.mjs";
25
27
  import "./interface.mjs";
26
- import i from "./text/read-password.vue2.mjs";
28
+ import i from "./second/read.vue2.mjs";
29
+ import o from "./text/read-password.vue2.mjs";
27
30
  import r from "./tree-select/read.vue2.mjs";
28
- import o from "./switch/read.vue2.mjs";
29
- import t from "./select/read.vue2.mjs";
30
- import e from "./checkbox/read.vue2.mjs";
31
- import p from "./radio/read.vue2.mjs";
32
- import a from "./date-range/read.vue2.mjs";
33
- import f from "./date/read.vue2.mjs";
34
- import _ from "./number/read.vue2.mjs";
31
+ import t from "./switch/read.vue2.mjs";
32
+ import e from "./select/read.vue2.mjs";
33
+ import p from "./checkbox/read.vue2.mjs";
34
+ import a from "./radio/read.vue2.mjs";
35
+ import f from "./date-range/read.vue2.mjs";
36
+ import _ from "./date/read.vue2.mjs";
37
+ import c from "./number/read.vue2.mjs";
35
38
  import s from "./text-area/read.vue2.mjs";
36
- import c from "./text/read.vue2.mjs";
37
- import n from "./tree-select/index.vue.mjs";
38
- import d from "./rate/index.vue.mjs";
39
- import l from "./segmented/index.vue.mjs";
40
- import $ from "./slider/index.vue.mjs";
41
- import A from "./switch/index.vue.mjs";
42
- import F from "./select/index.vue.mjs";
43
- import S from "./checkbox/index.vue.mjs";
44
- import x from "./radio/index.vue.mjs";
45
- import R from "./date-range/index.vue.mjs";
46
- import T from "./date/index.vue.mjs";
47
- import b from "./number/index.vue.mjs";
48
- import h from "./text-area/index.vue.mjs";
49
- const Sm = {
50
- Text: c,
39
+ import n from "./text/read.vue2.mjs";
40
+ import d from "./second/index.vue.mjs";
41
+ import l from "./tree-select/index.vue.mjs";
42
+ import $ from "./rate/index.vue.mjs";
43
+ import A from "./segmented/index.vue.mjs";
44
+ import F from "./slider/index.vue.mjs";
45
+ import S from "./switch/index.vue.mjs";
46
+ import x from "./select/index.vue.mjs";
47
+ import R from "./checkbox/index.vue.mjs";
48
+ import T from "./radio/index.vue.mjs";
49
+ import b from "./date-range/index.vue.mjs";
50
+ import h from "./date/index.vue.mjs";
51
+ import g from "./number/index.vue.mjs";
52
+ import D from "./text-area/index.vue.mjs";
53
+ const gm = {
54
+ Text: n,
51
55
  TextArea: s,
52
- Number: _,
53
- Date: f,
54
- DateRange: a,
55
- Radio: p,
56
- Checkbox: e,
57
- Select: t,
58
- Switch: o,
56
+ Number: c,
57
+ Date: _,
58
+ DateRange: f,
59
+ Radio: a,
60
+ Checkbox: p,
61
+ Select: e,
62
+ Switch: t,
59
63
  TreeSelect: r,
60
- Password: i
61
- }, xm = {
64
+ Password: o,
65
+ Second: i
66
+ }, Dm = {
62
67
  Text: m,
63
- TextArea: h,
64
- Number: b,
65
- Date: T,
66
- DateRange: R,
67
- Radio: x,
68
- Checkbox: S,
69
- Select: F,
70
- Switch: A,
71
- Slider: $,
72
- Segmented: l,
73
- Rate: d,
74
- TreeSelect: n
68
+ TextArea: D,
69
+ Number: g,
70
+ Date: h,
71
+ DateRange: b,
72
+ Radio: T,
73
+ Checkbox: R,
74
+ Select: x,
75
+ Switch: S,
76
+ Slider: F,
77
+ Segmented: A,
78
+ Rate: $,
79
+ TreeSelect: l,
80
+ Second: d
75
81
  };
76
82
  export {
77
- xm as ApField,
78
- S as ApFieldCheckbox,
79
- T as ApFieldDate,
80
- R as ApFieldDateRange,
81
- b as ApFieldNumber,
82
- x as ApFieldRadio,
83
- d as ApFieldRate,
84
- Sm as ApFieldRead,
85
- l as ApFieldSegmented,
86
- F as ApFieldSelect,
87
- $ as ApFieldSlider,
88
- A as ApFieldSwitch,
83
+ Dm as ApField,
84
+ R as ApFieldCheckbox,
85
+ h as ApFieldDate,
86
+ b as ApFieldDateRange,
87
+ g as ApFieldNumber,
88
+ T as ApFieldRadio,
89
+ $ as ApFieldRate,
90
+ gm as ApFieldRead,
91
+ d as ApFieldSecond,
92
+ A as ApFieldSegmented,
93
+ x as ApFieldSelect,
94
+ F as ApFieldSlider,
95
+ S as ApFieldSwitch,
89
96
  m as ApFieldText,
90
- h as ApFieldTextArea,
91
- n as ApFieldTreeSelect
97
+ D as ApFieldTextArea,
98
+ l as ApFieldTreeSelect
92
99
  };
@@ -107,6 +107,12 @@ export type ApFieldTextAreaProps = BasicApFieldProps<Omit<TextAreaProps, 'autosi
107
107
  * @returns
108
108
  */
109
109
  beforeInput?: (nextVal: string) => string;
110
+ /**
111
+ * 是否是代码片段
112
+ */
113
+ code?: boolean | {
114
+ language?: 'text' | 'json';
115
+ };
110
116
  };
111
117
  export type ApFieldTextAreaExpose = {
112
118
  focus: (options?: InputFocusOptions) => void;
@@ -225,3 +231,8 @@ export type ApFieldRateExpose = {
225
231
  focus: () => void;
226
232
  blur: () => void;
227
233
  };
234
+ export type ApFieldSecondProps = BasicApFieldProps<InputNumberProps> & {
235
+ placeholder?: string;
236
+ emptyText?: string;
237
+ };
238
+ export type ApFieldSecondExpose = ApiFieldNumberExpose;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 格式化秒
3
+ *
4
+ * @param result
5
+ * @returns {string}
6
+ */
7
+ export declare function formatSecond(result: number): string;
@@ -0,0 +1,9 @@
1
+ function a(n) {
2
+ let o = n, t = "", f = !1;
3
+ o < 0 && (o = -o, f = !0);
4
+ const e = Math.floor(o / (3600 * 24)), r = Math.floor(o / 3600 % 24), l = Math.floor(o / 60 % 60);
5
+ return t = `${Math.floor(o % 60)}秒`, l > 0 && (t = `${l}分钟${t}`), r > 0 && (t = `${r}小时${t}`), e > 0 && (t = `${e}天${t}`), f && (t += "前"), t;
6
+ }
7
+ export {
8
+ a as formatSecond
9
+ };