@aplus-frontend/ui 6.29.3 → 6.30.1

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 (205) hide show
  1. package/es/src/ag-grid/index.vue.mjs +228 -222
  2. package/es/src/ag-grid/renderer/select.mjs +8 -11
  3. package/es/src/ap-action/item-popconfirm/index.vue.d.ts +5 -6
  4. package/es/src/ap-field/checkbox/index.vue.d.ts +1 -1
  5. package/es/src/ap-field/checkbox/read.vue.d.ts +1 -1
  6. package/es/src/ap-field/date/index.vue.d.ts +4 -4
  7. package/es/src/ap-field/date/index.vue.mjs +11 -10
  8. package/es/src/ap-field/date/read.vue.d.ts +1 -1
  9. package/es/src/ap-field/date/read.vue2.mjs +8 -7
  10. package/es/src/ap-field/date-range/index.vue.d.ts +4 -4
  11. package/es/src/ap-field/date-range/index.vue.mjs +1 -0
  12. package/es/src/ap-field/date-range/read.vue.d.ts +1 -1
  13. package/es/src/ap-field/date-range/read.vue2.mjs +1 -0
  14. package/es/src/ap-field/index.d.ts +7 -7
  15. package/es/src/ap-field/number/index.vue.d.ts +90 -50
  16. package/es/src/ap-field/number/index.vue.mjs +14 -12
  17. package/es/src/ap-field/number/read.vue2.mjs +8 -6
  18. package/es/src/ap-field/rate/index.vue.d.ts +6 -6
  19. package/es/src/ap-field/select/index.vue.d.ts +241 -241
  20. package/es/src/ap-field/select/index.vue.mjs +27 -27
  21. package/es/src/ap-field/select/read.vue2.mjs +27 -27
  22. package/es/src/ap-field/slider/index.vue.d.ts +9 -9
  23. package/es/src/ap-field/switch/index.vue.d.ts +1 -1
  24. package/es/src/ap-field/switch/read.vue.d.ts +1 -1
  25. package/es/src/ap-field/text/index.vue.d.ts +1 -1
  26. package/es/src/ap-field/text/index.vue2.mjs +39 -38
  27. package/es/src/ap-field/text/password.vue.d.ts +1 -1
  28. package/es/src/ap-field/text/password.vue.mjs +34 -33
  29. package/es/src/ap-field/text/read-password.vue.d.ts +1 -1
  30. package/es/src/ap-field/text/read-password.vue2.mjs +31 -30
  31. package/es/src/ap-field/text/read.vue.d.ts +1 -1
  32. package/es/src/ap-field/text/read.vue2.mjs +21 -20
  33. package/es/src/ap-field/text-area/index.vue.d.ts +67 -57
  34. package/es/src/ap-field/text-area/index.vue.mjs +15 -14
  35. package/es/src/ap-field/text-area/read.vue.d.ts +1 -1
  36. package/es/src/ap-field/text-area/read.vue2.mjs +11 -10
  37. package/es/src/ap-field/tree-select/index.vue.d.ts +326 -326
  38. package/es/src/ap-field/tree-select/index.vue.mjs +46 -46
  39. package/es/src/ap-field/tree-select/read.vue2.mjs +45 -45
  40. package/es/src/ap-form/ap-form.vue.d.ts +71 -67
  41. package/es/src/ap-form/drawer-form/index.vue.d.ts +65 -65
  42. package/es/src/ap-form/item/index.vue.d.ts +36 -36
  43. package/es/src/ap-form/item/index.vue.mjs +10 -10
  44. package/es/src/ap-form/items/number/index.vue.d.ts +103 -59
  45. package/es/src/ap-form/items/select/index.vue.d.ts +306 -306
  46. package/es/src/ap-form/items/text/index.vue.d.ts +19 -17
  47. package/es/src/ap-form/items/text/password.vue.d.ts +19 -17
  48. package/es/src/ap-form/items/text-area/index.vue.d.ts +138 -118
  49. package/es/src/ap-form/items/tree-select/index.vue.d.ts +407 -407
  50. package/es/src/ap-form/modal-form/index.vue.d.ts +69 -70
  51. package/es/src/ap-form/search-form/components/popover-filter.vue.d.ts +5 -6
  52. package/es/src/ap-form/search-form/index.vue.d.ts +67 -67
  53. package/es/src/ap-form/search-form/index.vue.mjs +40 -40
  54. package/es/src/ap-grid/constants.d.ts +3 -0
  55. package/es/src/ap-grid/constants.mjs +6 -3
  56. package/es/src/ap-grid/index.vue.mjs +221 -214
  57. package/es/src/ap-grid/utils/table.d.ts +1 -1
  58. package/es/src/ap-grid/utils/table.mjs +59 -62
  59. package/es/src/ap-table/constants.d.ts +499 -465
  60. package/es/src/ap-table/utils.d.ts +1 -1
  61. package/es/src/ap-upload/components/MultipleFile.vue.d.ts +8 -8
  62. package/es/src/business/ap-batch-action-group/index.d.ts +7 -8
  63. package/es/src/business/ap-label/ApLabel.d.ts +4 -4
  64. package/es/src/business/ap-label/constans.d.ts +1 -1
  65. package/es/src/business/ap-label/index.d.ts +9 -9
  66. package/es/src/business/ap-radio-group/ap-radio-group.vue.d.ts +1 -1
  67. package/es/src/business/ap-radio-group/index.d.ts +3 -3
  68. package/es/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +1 -1
  69. package/es/src/business/ap-table-modal/hooks/use-table-modal.d.ts +1 -1
  70. package/es/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +1 -1
  71. package/es/src/business/ap-table-modal/index.d.ts +3 -3
  72. package/es/src/business/ap-table-modal/table-modal.vue.d.ts +1 -1
  73. package/es/src/business/ap-table-modal/table-modal.vue2.mjs +3 -2
  74. package/es/src/business/ap-view/ap-view.vue2.mjs +80 -80
  75. package/es/src/business/ap-view/components/main-button-content.vue.d.ts +33 -33
  76. package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +33 -33
  77. package/es/src/business/ap-view/interface.d.ts +13 -3
  78. package/es/src/business/batch-input-group/index.vue.d.ts +11 -10
  79. package/es/src/business/batch-input-group/index.vue.mjs +20 -19
  80. package/es/src/business/batch-input-group/popover-input/index.vue.d.ts +66 -56
  81. package/es/src/business/hooks/usePageListApTable.d.ts +1 -1
  82. package/es/src/config-provider/config-provider-props.d.ts +64 -52
  83. package/es/src/config-provider/config-provider-props.mjs +10 -2
  84. package/es/src/config-provider/config-provider.d.ts +130 -113
  85. package/es/src/config-provider/config-provider.mjs +26 -24
  86. package/es/src/config-provider/hooks/use-global-config.d.ts +60 -49
  87. package/es/src/config-provider/index.d.ts +214 -197
  88. package/es/src/mask/utils.d.ts +1 -1
  89. package/es/src/mask/utils.mjs +29 -13
  90. package/es/src/text/index.vue.mjs +3 -3
  91. package/es/src/utils/config-provider-preset.d.ts +36 -49
  92. package/es/src/version.d.ts +1 -1
  93. package/es/src/version.mjs +1 -1
  94. package/es/src/work-order-modal/work-order-modal.vue.d.ts +33 -33
  95. package/lib/src/ag-grid/index.vue.js +1 -1
  96. package/lib/src/ag-grid/renderer/select.js +1 -1
  97. package/lib/src/ap-action/item-popconfirm/index.vue.d.ts +5 -6
  98. package/lib/src/ap-field/checkbox/index.vue.d.ts +1 -1
  99. package/lib/src/ap-field/checkbox/read.vue.d.ts +1 -1
  100. package/lib/src/ap-field/date/index.vue.d.ts +4 -4
  101. package/lib/src/ap-field/date/index.vue.js +1 -1
  102. package/lib/src/ap-field/date/read.vue.d.ts +1 -1
  103. package/lib/src/ap-field/date/read.vue2.js +1 -1
  104. package/lib/src/ap-field/date-range/index.vue.d.ts +4 -4
  105. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  106. package/lib/src/ap-field/date-range/read.vue.d.ts +1 -1
  107. package/lib/src/ap-field/date-range/read.vue2.js +1 -1
  108. package/lib/src/ap-field/index.d.ts +7 -7
  109. package/lib/src/ap-field/number/index.vue.d.ts +90 -50
  110. package/lib/src/ap-field/number/index.vue.js +1 -1
  111. package/lib/src/ap-field/number/read.vue2.js +1 -1
  112. package/lib/src/ap-field/rate/index.vue.d.ts +6 -6
  113. package/lib/src/ap-field/select/index.vue.d.ts +241 -241
  114. package/lib/src/ap-field/select/index.vue.js +1 -1
  115. package/lib/src/ap-field/select/read.vue2.js +1 -1
  116. package/lib/src/ap-field/slider/index.vue.d.ts +9 -9
  117. package/lib/src/ap-field/switch/index.vue.d.ts +1 -1
  118. package/lib/src/ap-field/switch/read.vue.d.ts +1 -1
  119. package/lib/src/ap-field/text/index.vue.d.ts +1 -1
  120. package/lib/src/ap-field/text/index.vue2.js +1 -1
  121. package/lib/src/ap-field/text/password.vue.d.ts +1 -1
  122. package/lib/src/ap-field/text/password.vue.js +1 -1
  123. package/lib/src/ap-field/text/read-password.vue.d.ts +1 -1
  124. package/lib/src/ap-field/text/read-password.vue2.js +1 -1
  125. package/lib/src/ap-field/text/read.vue.d.ts +1 -1
  126. package/lib/src/ap-field/text/read.vue2.js +1 -1
  127. package/lib/src/ap-field/text-area/index.vue.d.ts +67 -57
  128. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  129. package/lib/src/ap-field/text-area/read.vue.d.ts +1 -1
  130. package/lib/src/ap-field/text-area/read.vue2.js +1 -1
  131. package/lib/src/ap-field/tree-select/index.vue.d.ts +326 -326
  132. package/lib/src/ap-field/tree-select/index.vue.js +1 -1
  133. package/lib/src/ap-field/tree-select/read.vue2.js +1 -1
  134. package/lib/src/ap-form/ap-form.vue.d.ts +71 -67
  135. package/lib/src/ap-form/drawer-form/index.vue.d.ts +65 -65
  136. package/lib/src/ap-form/item/index.vue.d.ts +36 -36
  137. package/lib/src/ap-form/item/index.vue.js +1 -1
  138. package/lib/src/ap-form/items/number/index.vue.d.ts +103 -59
  139. package/lib/src/ap-form/items/select/index.vue.d.ts +306 -306
  140. package/lib/src/ap-form/items/text/index.vue.d.ts +19 -17
  141. package/lib/src/ap-form/items/text/password.vue.d.ts +19 -17
  142. package/lib/src/ap-form/items/text-area/index.vue.d.ts +138 -118
  143. package/lib/src/ap-form/items/tree-select/index.vue.d.ts +407 -407
  144. package/lib/src/ap-form/modal-form/index.vue.d.ts +69 -70
  145. package/lib/src/ap-form/search-form/components/popover-filter.vue.d.ts +5 -6
  146. package/lib/src/ap-form/search-form/index.vue.d.ts +67 -67
  147. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  148. package/lib/src/ap-grid/constants.d.ts +3 -0
  149. package/lib/src/ap-grid/constants.js +1 -1
  150. package/lib/src/ap-grid/index.vue.js +1 -1
  151. package/lib/src/ap-grid/utils/table.d.ts +1 -1
  152. package/lib/src/ap-grid/utils/table.js +1 -1
  153. package/lib/src/ap-table/constants.d.ts +499 -465
  154. package/lib/src/ap-table/utils.d.ts +1 -1
  155. package/lib/src/ap-upload/components/MultipleFile.vue.d.ts +8 -8
  156. package/lib/src/business/ap-batch-action-group/index.d.ts +7 -8
  157. package/lib/src/business/ap-label/ApLabel.d.ts +4 -4
  158. package/lib/src/business/ap-label/constans.d.ts +1 -1
  159. package/lib/src/business/ap-label/index.d.ts +9 -9
  160. package/lib/src/business/ap-radio-group/ap-radio-group.vue.d.ts +1 -1
  161. package/lib/src/business/ap-radio-group/index.d.ts +3 -3
  162. package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +1 -1
  163. package/lib/src/business/ap-table-modal/hooks/use-table-modal.d.ts +1 -1
  164. package/lib/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +1 -1
  165. package/lib/src/business/ap-table-modal/index.d.ts +3 -3
  166. package/lib/src/business/ap-table-modal/table-modal.vue.d.ts +1 -1
  167. package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
  168. package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
  169. package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +33 -33
  170. package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +33 -33
  171. package/lib/src/business/ap-view/interface.d.ts +13 -3
  172. package/lib/src/business/batch-input-group/index.vue.d.ts +11 -10
  173. package/lib/src/business/batch-input-group/index.vue.js +1 -1
  174. package/lib/src/business/batch-input-group/popover-input/index.vue.d.ts +66 -56
  175. package/lib/src/business/hooks/usePageListApTable.d.ts +1 -1
  176. package/lib/src/config-provider/config-provider-props.d.ts +64 -52
  177. package/lib/src/config-provider/config-provider-props.js +1 -1
  178. package/lib/src/config-provider/config-provider.d.ts +130 -113
  179. package/lib/src/config-provider/config-provider.js +1 -1
  180. package/lib/src/config-provider/hooks/use-global-config.d.ts +60 -49
  181. package/lib/src/config-provider/index.d.ts +214 -197
  182. package/lib/src/mask/utils.d.ts +1 -1
  183. package/lib/src/mask/utils.js +3 -3
  184. package/lib/src/text/index.vue.js +1 -1
  185. package/lib/src/utils/config-provider-preset.d.ts +36 -49
  186. package/lib/src/version.d.ts +1 -1
  187. package/lib/src/version.js +1 -1
  188. package/lib/src/work-order-modal/work-order-modal.vue.d.ts +33 -33
  189. package/package.json +3 -3
  190. package/theme/ag-grid/index.css +0 -6
  191. package/theme/antdv-override.css +0 -6
  192. package/theme/antdv-override.less +0 -8
  193. package/theme/ap-expand-alert/ap-expand-alert.css +0 -4
  194. package/theme/ap-expand-alert/ap-expand-alert.less +6 -5
  195. package/theme/ap-form/ap-form-item.css +0 -6
  196. package/theme/ap-form/ap-form-item.less +0 -6
  197. package/theme/ap-form/index.css +0 -6
  198. package/theme/ap-form/search-form.css +0 -6
  199. package/theme/ap-grid/index.css +0 -6
  200. package/theme/ap-table/ap-table.css +0 -6
  201. package/theme/ap-table-modal/index.css +0 -6
  202. package/theme/ap-view/ap-view.css +4 -0
  203. package/theme/ap-view/ap-view.less +4 -0
  204. package/theme/editable-table/index.css +0 -6
  205. package/theme/index.css +4 -16
@@ -1,31 +1,32 @@
1
- import { defineComponent as Ze, useSlots as _e, ref as x, toRef as I, unref as t, computed as l, nextTick as eo, watch as z, createElementBlock as E, openBlock as R, normalizeStyle as V, normalizeClass as m, createCommentVNode as te, createElementVNode as b, createVNode as A, mergeProps as M, createSlots as oo, withCtx as re, Fragment as to, renderList as ro, createBlock as ae, resolveDynamicComponent as ao, renderSlot as ne, withDirectives as no, vShow as lo } from "vue";
2
- import { AgGridVue as so } from "ag-grid-vue3";
3
- import { ModuleRegistry as io, AllCommunityModule as co } from "ag-grid-community";
4
- import { mergeProps as uo } from "./utils.mjs";
5
- import { Spin as mo, Pagination as po } from "@aplus-frontend/antdv";
6
- import { isUndefined as B, isFunction as le } from "lodash-unified";
1
+ import { defineComponent as eo, useSlots as oo, ref as I, toRef as T, unref as t, computed as l, nextTick as to, watch as z, createElementBlock as A, openBlock as b, normalizeStyle as V, normalizeClass as m, createCommentVNode as re, createElementVNode as B, createVNode as M, mergeProps as O, createSlots as ro, withCtx as ae, Fragment as ao, renderList as no, createBlock as ne, resolveDynamicComponent as lo, renderSlot as le, withDirectives as so, vShow as io } from "vue";
2
+ import { AgGridVue as co } from "ag-grid-vue3";
3
+ import { ModuleRegistry as uo, AllCommunityModule as mo } from "ag-grid-community";
4
+ import { mergeProps as po } from "./utils.mjs";
5
+ import { Spin as fo, Pagination as go } from "@aplus-frontend/antdv";
6
+ import { isUndefined as F, isFunction as se } from "lodash-unified";
7
7
  import "../config-provider/index.mjs";
8
- import { ApForm as fo } from "../ap-form/index.mjs";
9
- import { recursionApColumns as wo } from "../ap-table/utils.mjs";
10
- import { useTablePaging as go } from "../ap-table/hooks/use-table-paging-ng.mjs";
11
- import So from "./hooks/use-row-selection.mjs";
12
- import { useProvideSorter as yo } from "./context.mjs";
13
- import { useProvideApTable as Co } from "../ap-table/context.mjs";
14
- import { sizeReverseMap as ho, sizeMap as vo } from "../ap-grid/constants.mjs";
15
- import { useToken as Ro } from "@aplus-frontend/antdv/es/theme/internal";
16
- import { useTheme as bo } from "./theme.mjs";
17
- import { useColumns as Bo } from "./hooks/use-columns.mjs";
18
- import { useColumnsDef as Fo } from "./hooks/use-columns-def.mjs";
19
- import { isDef as ko } from "../utils/index.mjs";
20
- import { getValidVNodeList as xo } from "../utils/slot.mjs";
21
- import { useSearchForm as Io } from "./hooks/use-search-form.mjs";
8
+ import { ApForm as wo } from "../ap-form/index.mjs";
9
+ import { recursionApColumns as So } from "../ap-table/utils.mjs";
10
+ import { useTablePaging as yo } from "../ap-table/hooks/use-table-paging-ng.mjs";
11
+ import Co from "./hooks/use-row-selection.mjs";
12
+ import { useProvideSorter as ho } from "./context.mjs";
13
+ import { useProvideApTable as vo } from "../ap-table/context.mjs";
14
+ import { DEFAULT_ROW_SELECTION_CONFIG as ie, sizeReverseMap as Ro, sizeMap as bo } from "../ap-grid/constants.mjs";
15
+ import { useToken as Bo } from "@aplus-frontend/antdv/es/theme/internal";
16
+ import { useTheme as Fo } from "./theme.mjs";
17
+ import { useColumns as ko } from "./hooks/use-columns.mjs";
18
+ import { useColumnsDef as xo } from "./hooks/use-columns-def.mjs";
19
+ import { isDef as Io } from "../utils/index.mjs";
20
+ import { getValidVNodeList as To } from "../utils/slot.mjs";
21
+ import { useSearchForm as No } from "./hooks/use-search-form.mjs";
22
22
  import "./components/empty/index.vue.mjs";
23
- import To from "./hooks/use-virtual-config.mjs";
24
- import { usePinnedRow as Do } from "./hooks/use-pinned-row.mjs";
23
+ import Do from "./hooks/use-virtual-config.mjs";
24
+ import { usePinnedRow as Eo } from "./hooks/use-pinned-row.mjs";
25
25
  import Ko from "./hooks/use-selection-col-def.mjs";
26
- import { useNamespace as No } from "../config-provider/hooks/use-namespace.mjs";
27
- import Po from "./components/empty/index.vue2.mjs";
28
- const st = /* @__PURE__ */ Ze({
26
+ import { useNamespace as Po } from "../config-provider/hooks/use-namespace.mjs";
27
+ import { useGlobalConfig as zo } from "../config-provider/hooks/use-global-config.mjs";
28
+ import Ao from "./components/empty/index.vue2.mjs";
29
+ const ut = /* @__PURE__ */ eo({
29
30
  name: "AgGrid",
30
31
  __name: "index",
31
32
  props: {
@@ -96,69 +97,69 @@ const st = /* @__PURE__ */ Ze({
96
97
  rowClassName: {},
97
98
  rowClassRules: {}
98
99
  },
99
- setup(se, { expose: ie }) {
100
- io.registerModules([co]);
101
- const o = se, O = _e(), { e: F, b: c, be: ce } = No("ag-grid"), y = x(o.size), de = bo(y, I(o, "rowHeight")), ue = To(I(o, "virtual")), { rowPinnedGridConfig: W, getRowPinnedCellClass: me } = Do(
102
- I(o, "summary")
103
- ), i = x(), [, pe] = Ro();
100
+ setup(de, { expose: ce }) {
101
+ uo.registerModules([mo]);
102
+ const o = de, G = oo(), { e: k, b: c, be: ue } = Po("ag-grid"), y = I(o.size), me = Fo(y, T(o, "rowHeight")), pe = Do(T(o, "virtual")), { rowPinnedGridConfig: L, getRowPinnedCellClass: fe } = Eo(
103
+ T(o, "summary")
104
+ ), ge = zo("apGrid"), i = I(), [, we] = Bo();
104
105
  let p = !!o.dataSource;
105
- const j = Io(o), { shownColumns: f, columns: L, columnKeys: fe, getTargetColumnByKey: we } = Bo(o), { defaultColDef: ge, columnDefs: Se } = Fo(
106
- L,
106
+ const W = No(o), { shownColumns: f, columns: j, columnKeys: Se, getTargetColumnByKey: ye } = ko(o), { defaultColDef: Ce, columnDefs: he } = xo(
107
+ j,
107
108
  o,
108
- me
109
- ), k = x({});
110
- yo({
111
- sorter: k,
109
+ fe
110
+ ), x = I({});
111
+ ho({
112
+ sorter: x,
112
113
  setSorter(e) {
113
- k.value = e;
114
+ x.value = e;
114
115
  }
115
116
  });
116
- const ye = {
117
+ const ve = {
117
118
  asc: "ascend",
118
119
  desc: "descend"
119
120
  };
120
- function Ce() {
121
- const e = i.value.getColumns()?.filter((d) => d.getSort() !== void 0), r = t(k) || {};
121
+ function Re() {
122
+ const e = i.value.getColumns()?.filter((u) => u.getSort() !== void 0), r = t(x) || {};
122
123
  let a = e?.[0];
123
- const u = Object.keys(r);
124
- if (u.length && u.every((d) => r[d] === null)) {
125
- const d = Object.keys(r)[0];
126
- d && (a = i.value?.getColumn(d));
124
+ const d = Object.keys(r);
125
+ if (d.length && d.every((u) => r[u] === null)) {
126
+ const u = Object.keys(r)[0];
127
+ u && (a = i.value?.getColumn(u));
127
128
  }
128
129
  if (!a)
129
130
  return;
130
- const s = a.getColDef(), S = a.getSort(), h = we(s.colId);
131
+ const s = a.getColDef(), S = a.getSort(), v = ye(s.colId);
131
132
  H(void 0, void 0, {
132
133
  column: s,
133
- field: h?.field ?? s.field ?? s.colId,
134
- order: S ? ye[S] : null
134
+ field: v?.field ?? s.field ?? s.colId,
135
+ order: S ? ve[S] : null
135
136
  });
136
137
  }
137
- const he = l(() => wo(t(f), (e) => {
138
+ const be = l(() => So(t(f), (e) => {
138
139
  if (e.sorter === !0)
139
140
  return e.field ?? e.dataIndex ?? e.key;
140
- }).filter(Boolean)), ve = () => {
141
- k.value = {};
141
+ }).filter(Boolean)), Be = () => {
142
+ x.value = {};
142
143
  const e = i.value;
143
144
  if (!e)
144
145
  return;
145
146
  const r = e.getColumnState()?.map((a) => ({ ...a, sort: null }));
146
147
  e.applyColumnState({ state: r });
147
- }, Re = l(() => ko(o.manual) ? o.manual : xo(O.searchFormExtra?.() || []).some((r) => r.type?.name === "ApView")), {
148
- formRef: w,
149
- submit: T,
148
+ }, Fe = l(() => Io(o.manual) ? o.manual : To(G.searchFormExtra?.() || []).some((r) => r.type?.name === "ApView")), {
149
+ formRef: g,
150
+ submit: N,
150
151
  reset: D,
151
- data: g,
152
- tableProps: G,
152
+ data: w,
153
+ tableProps: U,
153
154
  handleTableChangeOptional: H,
154
- submitWith: U,
155
- refresh: $,
156
- getPaging: be,
157
- setPaging: Be,
158
- setDataSource: Fe
159
- } = go({
155
+ submitWith: $,
156
+ refresh: q,
157
+ getPaging: ke,
158
+ setPaging: xe,
159
+ setDataSource: Ie
160
+ } = yo({
160
161
  async request(e) {
161
- if (p = !1, !Ie.value && B(o.dataSource) && P(), !B(o.dataSource)) {
162
+ if (p = !1, C.value && !C.value.preserveSelectedRowKeys && F(o.dataSource) && P(), !F(o.dataSource)) {
162
163
  const a = e.pageSize * (e.current - 1);
163
164
  return {
164
165
  data: (o.pagination === !1 ? o.dataSource : o.dataSource.slice(a, a + e.pageSize)) || [],
@@ -172,51 +173,56 @@ const st = /* @__PURE__ */ Ze({
172
173
  };
173
174
  },
174
175
  namespace: "ap-grid",
175
- filterFields: x([]),
176
- params: I(o, "params"),
176
+ filterFields: I([]),
177
+ params: T(o, "params"),
177
178
  defaultData: o.defaultData,
178
- manual: t(Re),
179
+ manual: t(Fe),
179
180
  formatParams: o.beforeSearchSubmit,
180
181
  pagination: o.pagination,
181
- sortFields: he,
182
- onClickReset: ve
183
- }), ke = Ko(o, f), xe = l(
184
- () => B(o.dataSource) ? g.records : o.dataSource
185
- ), Ie = l(() => {
186
- const e = o.rowSelection === !0 ? {} : o.rowSelection;
187
- return e ? e.preserveSelectedRowKeys !== !1 : !1;
188
- }), {
189
- select: Te,
190
- unSelect: De,
191
- selectedRows: K,
182
+ sortFields: be,
183
+ onClickReset: Be
184
+ }), C = l(() => {
185
+ const e = o.rowSelection || ge.value?.rowSelection;
186
+ if (e)
187
+ return e === !0 ? ie : {
188
+ ...ie,
189
+ ...e
190
+ };
191
+ }), Te = Ko(o, f), Ne = l(
192
+ () => F(o.dataSource) ? w.records : o.dataSource
193
+ ), {
194
+ select: De,
195
+ unSelect: Ee,
196
+ selectedRows: E,
192
197
  selectedRowKeys: Ke,
193
- clearAll: Ne,
194
- selectMultiByKeys: Pe
195
- } = So({
196
- ...o.rowSelection === !0 ? {} : o.rowSelection,
197
- dataSource: xe,
198
+ clearAll: Pe,
199
+ selectMultiByKeys: ze
200
+ } = Co({
201
+ ...C,
202
+ dataSource: Ne,
198
203
  rowKey: o.rowKey
199
- }), ze = {
204
+ }), Ae = {
200
205
  checkbox: "multiRow",
201
206
  radio: "singleRow"
202
- }, Ee = l(() => {
203
- if (!o.rowSelection)
207
+ }, Ve = l(() => {
208
+ const e = C.value;
209
+ if (!e)
204
210
  return;
205
- const { type: e = "checkbox", disabled: r } = o.rowSelection === !0 ? {} : o.rowSelection;
211
+ const { type: r = "checkbox", disabled: a } = e;
206
212
  return {
207
- mode: ze[e],
208
- isRowSelectable: (a) => r ? !r(a.data) : !0
213
+ mode: Ae[r],
214
+ isRowSelectable: (d) => a ? !a(d.data) : !0
209
215
  };
210
216
  });
211
- function N(e) {
212
- return le(o.rowKey) ? o.rowKey(e) : e[o.rowKey];
217
+ function K(e) {
218
+ return se(o.rowKey) ? o.rowKey(e) : e[o.rowKey];
213
219
  }
214
- const q = ({
220
+ const J = ({
215
221
  api: e = i.value
216
222
  }) => {
217
- if (!o.rowSelection)
223
+ if (!C.value)
218
224
  return;
219
- const r = K.value;
225
+ const r = E.value;
220
226
  if (!r.length) {
221
227
  setTimeout(() => {
222
228
  p = !0;
@@ -225,133 +231,133 @@ const st = /* @__PURE__ */ Ze({
225
231
  }
226
232
  p = !1;
227
233
  const a = [];
228
- e.forEachNode((u) => {
229
- const C = u.data, s = N(C);
230
- r.find((S) => N(S) === s) && a.push(u);
234
+ e.forEachNode((d) => {
235
+ const h = d.data, s = K(h);
236
+ r.find((S) => K(S) === s) && a.push(d);
231
237
  }), e.setNodesSelected({ nodes: a, newValue: !0 }), setTimeout(() => {
232
238
  p = !0;
233
239
  }, 0);
234
- }, Ve = (e) => {
235
- p && (e.node.isSelected() ? Te(e.data) : De(e.data));
236
- }, Ae = () => {
240
+ }, Me = (e) => {
241
+ p && (e.node.isSelected() ? De(e.data) : Ee(e.data));
242
+ }, Oe = () => {
237
243
  p = !0;
238
244
  }, P = () => {
239
- Ne(), i.value?.deselectAll();
245
+ Pe(), i.value?.deselectAll();
240
246
  };
241
- function Me(e) {
242
- Pe(e), eo(() => {
243
- q({});
247
+ function Ge(e) {
248
+ ze(e), to(() => {
249
+ J({});
244
250
  });
245
251
  }
246
- function J(e = !1) {
252
+ function Q(e = !1) {
247
253
  const r = e ? "getFieldsValueTransformed" : "getFieldsValue";
248
- return w.value?.apForm?.[r]?.(!0);
254
+ return g.value?.apForm?.[r]?.(!0);
249
255
  }
250
- function Q(e) {
251
- w.value?.apForm?.setFieldsValue?.(e);
256
+ function X(e) {
257
+ g.value?.apForm?.setFieldsValue?.(e);
252
258
  }
253
- function X() {
254
- return w.value?.getSorterItems() || [];
259
+ function Y() {
260
+ return g.value?.getSorterItems() || [];
255
261
  }
256
- function Y(e) {
257
- w.value?.setSorterItems(e);
262
+ function Z(e) {
263
+ g.value?.setSorterItems(e);
258
264
  }
259
- function Z() {
260
- w.value?.resetSorterItems();
265
+ function _() {
266
+ g.value?.resetSorterItems();
261
267
  }
262
- function _(e) {
268
+ function ee(e) {
263
269
  return e && String(e);
264
270
  }
265
- function Oe(e) {
271
+ function Le(e) {
266
272
  const r = i.value;
267
273
  if (!r)
268
274
  return;
269
- const a = r.getColumnState() || [], u = e.map((n) => n.key ? String(n.key) : n.key).filter(Boolean), C = a.map((n) => {
270
- if (!fe.value.includes(n.colId))
275
+ const a = r.getColumnState() || [], d = e.map((n) => n.key ? String(n.key) : n.key).filter(Boolean), h = a.map((n) => {
276
+ if (!Se.value.includes(n.colId))
271
277
  return n;
272
- const v = !u.includes(n.colId), ee = {
278
+ const R = !d.includes(n.colId), oe = {
273
279
  ...n,
274
- hide: v
275
- }, oe = e.find(
276
- (Ye) => _(Ye.key) === n.colId
280
+ hide: R
281
+ }, te = e.find(
282
+ (_e) => ee(_e.key) === n.colId
277
283
  );
278
- return oe && (ee.pinned = oe.fixed || null), ee;
284
+ return te && (oe.pinned = te.fixed || null), oe;
279
285
  }), s = new Map(
280
- e.map((n, v) => [_(n.key), v])
281
- ), S = C.filter((n) => s.has(n.colId)).sort(
282
- (n, v) => s.get(n.colId) - s.get(v.colId)
283
- ), h = [];
284
- let d = 0;
285
- for (const n of C)
286
- s.has(n.colId) ? h.push(S[d++]) : h.push(n);
286
+ e.map((n, R) => [ee(n.key), R])
287
+ ), S = h.filter((n) => s.has(n.colId)).sort(
288
+ (n, R) => s.get(n.colId) - s.get(R.colId)
289
+ ), v = [];
290
+ let u = 0;
291
+ for (const n of h)
292
+ s.has(n.colId) ? v.push(S[u++]) : v.push(n);
287
293
  r.applyColumnState({
288
- state: h,
294
+ state: v,
289
295
  applyOrder: !0
290
296
  });
291
297
  }
292
- Co({
298
+ vo({
293
299
  columns: l(() => f.value),
294
- columnsBackup: l(() => L.value),
295
- size: l(() => vo[y.value]),
300
+ columnsBackup: l(() => j.value),
301
+ size: l(() => bo[y.value]),
296
302
  updateColumns(e) {
297
- f.value = e, o.onShownColumnsChange?.(e), Oe(e);
303
+ f.value = e, o.onShownColumnsChange?.(e), Le(e);
298
304
  },
299
305
  updateSize(e) {
300
- y.value = ho[e];
306
+ y.value = Ro[e];
301
307
  },
302
308
  renderConfig: l(() => ({
303
- className: ce("table-header", "title"),
304
- color: pe.value.colorTextTertiary
309
+ className: ue("table-header", "title"),
310
+ color: we.value.colorTextTertiary
305
311
  })),
306
- dataSource: l(() => t(g).records),
307
- getSearchFormValues: J,
308
- setSearchFormValues: Q,
309
- submit: T,
310
- submitWith: U,
312
+ dataSource: l(() => t(w).records),
313
+ getSearchFormValues: Q,
314
+ setSearchFormValues: X,
315
+ submit: N,
316
+ submitWith: $,
311
317
  reset: D,
312
- refresh: $,
313
- getSearchFormSorterItems: X,
314
- setSearchFormSorterItems: Y,
315
- resetSearchFormSorterItems: Z
318
+ refresh: q,
319
+ getSearchFormSorterItems: Y,
320
+ setSearchFormSorterItems: Z,
321
+ resetSearchFormSorterItems: _
316
322
  });
317
323
  const We = l(
318
- () => B(o.loading) ? g.loading : o.loading
324
+ () => F(o.loading) ? w.loading : o.loading
319
325
  ), je = l(() => [
320
326
  c(),
321
327
  o.card ? null : c("wrapper"),
322
328
  c("adaptive"),
323
329
  c(`size-${y.value}`)
324
- ].filter(Boolean)), Le = l(() => ({
330
+ ].filter(Boolean)), Ue = l(() => ({
325
331
  height: "100%",
326
332
  ...o.tableStyle || {}
327
- })), Ge = (e, r) => {
333
+ })), He = (e, r) => {
328
334
  H({ current: e, pageSize: r });
329
335
  };
330
- function He(e) {
336
+ function $e(e) {
331
337
  const r = e.data;
332
- return N(r);
338
+ return K(r);
333
339
  }
334
- function Ue(e, r) {
340
+ function qe(e, r) {
335
341
  i.value?.ensureIndexVisible(e, r);
336
342
  }
337
- function $e(e) {
343
+ function Je(e) {
338
344
  o.onRowClicked?.(e.data, e.event);
339
345
  }
340
- function qe(e) {
346
+ function Qe(e) {
341
347
  o.onScrollEnd?.(e.direction);
342
348
  }
343
- function Je(e) {
349
+ function Xe(e) {
344
350
  return i.value?.refreshCells(e);
345
351
  }
346
- function Qe(e) {
352
+ function Ye(e) {
347
353
  return i.value?.redrawRows(e);
348
354
  }
349
- const Xe = (e) => {
355
+ const Ze = (e) => {
350
356
  const r = [
351
- W.value.getRowClass?.(e)
357
+ L.value.getRowClass?.(e)
352
358
  ];
353
359
  if (!e.node.rowPinned) {
354
- const a = le(o.rowClassName) ? o.rowClassName(e.data, e.rowIndex) : o.rowClassName;
360
+ const a = se(o.rowClassName) ? o.rowClassName(e.data, e.rowIndex) : o.rowClassName;
355
361
  r.push(a);
356
362
  }
357
363
  return r.flat().filter(Boolean);
@@ -359,7 +365,7 @@ const st = /* @__PURE__ */ Ze({
359
365
  return z(
360
366
  () => o.dataSource,
361
367
  (e) => {
362
- Fe(e);
368
+ Ie(e);
363
369
  },
364
370
  { immediate: !0, deep: !0 }
365
371
  ), z(
@@ -368,127 +374,127 @@ const st = /* @__PURE__ */ Ze({
368
374
  y.value = e;
369
375
  }
370
376
  ), z(
371
- () => t(g).loading,
377
+ () => t(w).loading,
372
378
  (e) => {
373
379
  o.onLoadingChange?.(e);
374
380
  }
375
- ), ie({
376
- submit: T,
381
+ ), ce({
382
+ submit: N,
377
383
  reset: D,
378
- refresh: $,
379
- submitWith: U,
380
- setSearchFormValues: Q,
381
- getSearchFormValues: J,
384
+ refresh: q,
385
+ submitWith: $,
386
+ setSearchFormValues: X,
387
+ getSearchFormValues: Q,
382
388
  getShowColumns: () => t(f),
383
389
  rowSelection: {
384
- selectedRows: l(() => K.value),
385
- setSelectedRowKeys: Me,
390
+ selectedRows: l(() => E.value),
391
+ setSelectedRowKeys: Ge,
386
392
  clearAll: P
387
393
  },
388
- scrollToRow: Ue,
389
- getDataSource: () => t(g.records),
390
- getPaging: be,
391
- setPaging: Be,
392
- getSearchFormSorterItems: X,
393
- setSearchFormSorterItems: Y,
394
- resetSearchFormSorterItems: Z,
395
- refreshCells: Je,
396
- redrawRows: Qe
397
- }), (e, r) => (R(), E("div", {
394
+ scrollToRow: qe,
395
+ getDataSource: () => t(w.records),
396
+ getPaging: ke,
397
+ setPaging: xe,
398
+ getSearchFormSorterItems: Y,
399
+ setSearchFormSorterItems: Z,
400
+ resetSearchFormSorterItems: _,
401
+ refreshCells: Xe,
402
+ redrawRows: Ye
403
+ }), (e, r) => (b(), A("div", {
398
404
  class: m(je.value),
399
405
  style: V(e.wrapperStyle)
400
406
  }, [
401
- t(B)(e.dataSource) && e.searchForm !== !1 && t(j).length > 0 ? (R(), E("div", {
407
+ t(F)(e.dataSource) && e.searchForm !== !1 && t(W).length > 0 ? (b(), A("div", {
402
408
  key: 0,
403
- class: m(e.card ? t(F)("search-wrapper") : null),
409
+ class: m(e.card ? t(k)("search-wrapper") : null),
404
410
  style: V(e.searchFormWrapperStyle)
405
411
  }, [
406
- A(t(fo).SearchForm, M(e.searchForm || {}, {
412
+ M(t(wo).SearchForm, O(e.searchForm || {}, {
407
413
  ref_key: "formRef",
408
- ref: w,
414
+ ref: g,
409
415
  "custom-reset": "",
410
- "submit-loading": t(G).loading,
411
- onSubmit: t(T),
416
+ "submit-loading": t(U).loading,
417
+ onSubmit: t(N),
412
418
  onReset: t(D)
413
- }), oo({
414
- default: re(() => [
415
- (R(!0), E(to, null, ro(t(j), (a) => (R(), ae(ao(a.renderNode), {
419
+ }), ro({
420
+ default: ae(() => [
421
+ (b(!0), A(ao, null, no(t(W), (a) => (b(), ne(lo(a.renderNode), {
416
422
  key: a.dataIndex
417
423
  }))), 128))
418
424
  ]),
419
425
  _: 2
420
426
  }, [
421
- O.searchFormExtra ? {
427
+ G.searchFormExtra ? {
422
428
  name: "extra",
423
- fn: re(() => [
424
- ne(e.$slots, "searchFormExtra")
429
+ fn: ae(() => [
430
+ le(e.$slots, "searchFormExtra")
425
431
  ]),
426
432
  key: "0"
427
433
  } : void 0
428
434
  ]), 1040, ["submit-loading", "onSubmit", "onReset"])
429
- ], 6)) : te("", !0),
430
- b("div", {
431
- class: m([t(F)("table-wrapper"), e.card ? t(F)("table-wrapper-card") : null]),
435
+ ], 6)) : re("", !0),
436
+ B("div", {
437
+ class: m([t(k)("table-wrapper"), e.card ? t(k)("table-wrapper-card") : null]),
432
438
  style: V(e.tableWrapperStyle)
433
439
  }, [
434
- b("div", {
440
+ B("div", {
435
441
  class: m(t(c)("header-wrapper"))
436
442
  }, [
437
- ne(e.$slots, "title", {
438
- selectedRows: t(K),
443
+ le(e.$slots, "title", {
444
+ selectedRows: t(E),
439
445
  selectedRowKeys: t(Ke),
440
446
  shownColumns: t(f),
441
447
  clearAll: P
442
448
  })
443
449
  ], 2),
444
- b("div", {
450
+ B("div", {
445
451
  class: m(t(c)("grid-wrapper"))
446
452
  }, [
447
- A(t(so), M(t(uo)(t(ue), t(W)), {
448
- "get-row-class": Xe,
449
- style: Le.value,
450
- "row-data": t(g).records,
451
- "column-defs": t(Se),
452
- "default-col-def": t(ge),
453
+ M(t(co), O(t(po)(t(pe), t(L)), {
454
+ "get-row-class": Ze,
455
+ style: Ue.value,
456
+ "row-data": t(w).records,
457
+ "column-defs": t(he),
458
+ "default-col-def": t(Ce),
453
459
  "suppress-loading-overlay": "",
454
- "row-selection": Ee.value,
455
- "selection-column-def": t(ke),
456
- "get-row-id": He,
457
- theme: t(de),
460
+ "row-selection": Ve.value,
461
+ "selection-column-def": t(Te),
462
+ "get-row-id": $e,
463
+ theme: t(me),
458
464
  "tooltip-show-delay": 500,
459
465
  "enable-browser-tooltips": e.browserTooltips,
460
466
  "tooltip-interaction": "",
461
467
  "row-class-rules": e.rowClassRules,
462
- "no-rows-overlay-component": Po,
468
+ "no-rows-overlay-component": Ao,
463
469
  "suppress-cell-focus": "",
464
- onSortChanged: Ce,
470
+ onSortChanged: Re,
465
471
  onGridReady: r[0] || (r[0] = (a) => i.value = a.api),
466
- onRowDataUpdated: q,
467
- onRowSelected: Ve,
468
- onFirstDataRendered: Ae,
469
- onRowClicked: $e,
470
- onBodyScrollEnd: qe
472
+ onRowDataUpdated: J,
473
+ onRowSelected: Me,
474
+ onFirstDataRendered: Oe,
475
+ onRowClicked: Je,
476
+ onBodyScrollEnd: Qe
471
477
  }), null, 16, ["style", "row-data", "column-defs", "default-col-def", "row-selection", "selection-column-def", "theme", "enable-browser-tooltips", "row-class-rules"]),
472
- no(b("div", {
473
- class: m(t(F)("table-loading-wrapper"))
478
+ so(B("div", {
479
+ class: m(t(k)("table-loading-wrapper"))
474
480
  }, [
475
- A(t(mo), { delay: 300 })
481
+ M(t(fo), { delay: 300 })
476
482
  ], 2), [
477
- [lo, We.value]
483
+ [io, We.value]
478
484
  ])
479
485
  ], 2),
480
- b("div", {
486
+ B("div", {
481
487
  class: m(t(c)("pagination-wrapper"))
482
488
  }, [
483
- e.pagination !== !1 ? (R(), ae(t(po), M({
489
+ e.pagination !== !1 ? (b(), ne(t(go), O({
484
490
  key: 0,
485
491
  class: t(c)("pagination")
486
- }, t(G).pagination, { onChange: Ge }), null, 16, ["class"])) : te("", !0)
492
+ }, t(U).pagination, { onChange: He }), null, 16, ["class"])) : re("", !0)
487
493
  ], 2)
488
494
  ], 6)
489
495
  ], 6));
490
496
  }
491
497
  });
492
498
  export {
493
- st as default
499
+ ut as default
494
500
  };