@aplus-frontend/ui 6.39.0 → 6.39.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 (63) hide show
  1. package/es/index.mjs +62 -60
  2. package/es/src/ap-form/drawer-form/index.vue.d.ts +4 -0
  3. package/es/src/ap-form/modal-form/index.vue.d.ts +9 -1
  4. package/es/src/ap-modal/utils/createModal.mjs +34 -36
  5. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-modal.d.ts +1 -1
  6. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-modal.mjs +74 -37
  7. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.mjs +142 -99
  8. package/es/src/business/ag-grid-modal/index.d.ts +1 -0
  9. package/es/src/business/ag-grid-modal/index.mjs +4 -2
  10. package/es/src/business/ag-grid-modal/interface.d.ts +15 -4
  11. package/es/src/business/ag-grid-modal/modal-layout/index.vue.d.ts +1 -0
  12. package/es/src/business/ag-grid-modal/modal-layout/index.vue2.mjs +48 -44
  13. package/es/src/business/ag-grid-modal/selected-items/default.vue.d.ts +25 -0
  14. package/es/src/business/ag-grid-modal/selected-items/default.vue.mjs +4 -0
  15. package/es/src/business/ag-grid-modal/selected-items/default.vue2.mjs +33 -0
  16. package/es/src/business/ag-grid-modal/selected-items/index.d.ts +36 -0
  17. package/es/src/business/ag-grid-modal/selected-items/index.mjs +8 -0
  18. package/es/src/business/ag-grid-modal/selected-items/style/css.d.ts +0 -0
  19. package/es/src/business/ag-grid-modal/selected-items/style/css.js +1 -0
  20. package/es/src/business/ag-grid-modal/selected-items/style/index.d.ts +0 -0
  21. package/es/src/business/ag-grid-modal/selected-items/style/index.js +1 -0
  22. package/es/src/business/ag-grid-modal/utils.d.ts +2 -0
  23. package/es/src/business/ag-grid-modal/utils.mjs +1 -1
  24. package/es/src/business/ap-table-modal/table-modal.vue2.mjs +23 -23
  25. package/es/src/index.mjs +66 -64
  26. package/es/src/path-map.mjs +2 -1
  27. package/es/src/version.d.ts +1 -1
  28. package/es/src/version.mjs +1 -1
  29. package/lib/index.js +1 -1
  30. package/lib/src/ap-form/drawer-form/index.vue.d.ts +4 -0
  31. package/lib/src/ap-form/modal-form/index.vue.d.ts +9 -1
  32. package/lib/src/ap-modal/utils/createModal.js +1 -1
  33. package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-modal.d.ts +1 -1
  34. package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-modal.js +1 -1
  35. package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.js +1 -1
  36. package/lib/src/business/ag-grid-modal/index.d.ts +1 -0
  37. package/lib/src/business/ag-grid-modal/index.js +1 -1
  38. package/lib/src/business/ag-grid-modal/interface.d.ts +15 -4
  39. package/lib/src/business/ag-grid-modal/modal-layout/index.vue.d.ts +1 -0
  40. package/lib/src/business/ag-grid-modal/modal-layout/index.vue2.js +1 -1
  41. package/lib/src/business/ag-grid-modal/selected-items/default.vue.d.ts +25 -0
  42. package/lib/src/business/ag-grid-modal/selected-items/default.vue.js +1 -0
  43. package/lib/src/business/ag-grid-modal/selected-items/default.vue2.js +1 -0
  44. package/lib/src/business/ag-grid-modal/selected-items/index.d.ts +36 -0
  45. package/lib/src/business/ag-grid-modal/selected-items/index.js +1 -0
  46. package/lib/src/business/ag-grid-modal/selected-items/style/css.cjs +1 -0
  47. package/lib/src/business/ag-grid-modal/selected-items/style/css.d.ts +0 -0
  48. package/lib/src/business/ag-grid-modal/selected-items/style/index.cjs +1 -0
  49. package/lib/src/business/ag-grid-modal/selected-items/style/index.d.ts +0 -0
  50. package/lib/src/business/ag-grid-modal/utils.d.ts +2 -0
  51. package/lib/src/business/ag-grid-modal/utils.js +1 -1
  52. package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
  53. package/lib/src/index.js +1 -1
  54. package/lib/src/path-map.js +1 -1
  55. package/lib/src/version.d.ts +1 -1
  56. package/lib/src/version.js +1 -1
  57. package/package.json +3 -3
  58. package/theme/ag-grid-modal/index.css +18 -2
  59. package/theme/ag-grid-modal/index.less +23 -8
  60. package/theme/ag-grid-modal/selected-items.css +72 -0
  61. package/theme/ag-grid-modal/selected-items.less +34 -0
  62. package/theme/index.css +44 -2
  63. package/theme/index.less +2 -1
package/es/index.mjs CHANGED
@@ -116,36 +116,37 @@ import { ApDraggableGrid as Ut } from "./src/business/ap-draggable-grid/index.mj
116
116
  import { ApValueSelectCard as Vt } from "./src/business/ap-value-select-card/index.mjs";
117
117
  import { useAgGridModal as zt } from "./src/business/ag-grid-modal/hooks/use-ag-grid-modal.mjs";
118
118
  import { useAgGridSelectModal as jt } from "./src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.mjs";
119
- import { useTablePaging as Wt } from "./src/ap-table/hooks/use-table-paging.mjs";
120
- import { ApTable as Jt } from "./src/ap-table/index.mjs";
121
- import { default as Xt } from "./src/editable-table/index.vue.mjs";
122
- import { default as Zt } from "./src/editable-table/form-item.vue.mjs";
123
- import { default as op } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
124
- import { ensureRangeValue as tp } from "./src/scroll-bar/utils/index.mjs";
125
- import { default as ap } from "./src/scroll-bar/index.vue.mjs";
126
- import { default as mp } from "./src/scroll-bar/internal.vue.mjs";
127
- import { default as xp } from "./src/scroll-view/index.vue.mjs";
128
- import { default as sp } from "./src/portal/index.vue.mjs";
129
- import { default as Ap } from "./src/full-screen/index.vue.mjs";
130
- import { default as np } from "./src/resize-observer/index.vue.mjs";
131
- import { ROW_SELECTION_FIELD as Fp } from "./src/ap-grid/constants.mjs";
132
- import { toTreeArray as gp } from "./src/ap-grid/utils/to-tree-array.mjs";
133
- import { default as bp } from "./src/ap-grid/index.vue.mjs";
134
- import { default as Cp } from "./src/ap-grid/editable/index.vue.mjs";
135
- import { default as Dp } from "./src/ap-grid/editable/form-item.vue.mjs";
136
- import { default as Pp } from "./src/text/index.vue.mjs";
137
- import { default as Rp } from "./src/text/group.vue.mjs";
138
- import { default as Mp } from "./src/mask/index.vue.mjs";
139
- import { Splitter as vp } from "./src/splitter/index.mjs";
140
- import { default as wp } from "./src/ag-grid/index.vue.mjs";
141
- import { default as Kp } from "./src/ag-grid/editable/index.vue.mjs";
142
- import { default as Up } from "./src/ag-grid/editable/form-item.vue.mjs";
143
- import { useMessage as Vp } from "./src/hooks/useMessage.mjs";
144
- import { useControllableValue as zp } from "./src/hooks/useControllableValue.mjs";
145
- import { useManualRef as jp } from "./src/hooks/useManualRef.mjs";
146
- import { useThrottleRef as Wp } from "./src/hooks/useThrottleRef.mjs";
147
- import { useFullScreen as Jp } from "./src/hooks/useFullScreen.mjs";
148
- import { useResize as Xp } from "./src/hooks/useResize.mjs";
119
+ import { ApSelectedItems as Wt } from "./src/business/ag-grid-modal/selected-items/index.mjs";
120
+ import { useTablePaging as Jt } from "./src/ap-table/hooks/use-table-paging.mjs";
121
+ import { ApTable as Xt } from "./src/ap-table/index.mjs";
122
+ import { default as Zt } from "./src/editable-table/index.vue.mjs";
123
+ import { default as op } from "./src/editable-table/form-item.vue.mjs";
124
+ import { default as tp } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
125
+ import { ensureRangeValue as ap } from "./src/scroll-bar/utils/index.mjs";
126
+ import { default as mp } from "./src/scroll-bar/index.vue.mjs";
127
+ import { default as xp } from "./src/scroll-bar/internal.vue.mjs";
128
+ import { default as sp } from "./src/scroll-view/index.vue.mjs";
129
+ import { default as Ap } from "./src/portal/index.vue.mjs";
130
+ import { default as np } from "./src/full-screen/index.vue.mjs";
131
+ import { default as Fp } from "./src/resize-observer/index.vue.mjs";
132
+ import { ROW_SELECTION_FIELD as gp } from "./src/ap-grid/constants.mjs";
133
+ import { toTreeArray as bp } from "./src/ap-grid/utils/to-tree-array.mjs";
134
+ import { default as Cp } from "./src/ap-grid/index.vue.mjs";
135
+ import { default as Dp } from "./src/ap-grid/editable/index.vue.mjs";
136
+ import { default as Pp } from "./src/ap-grid/editable/form-item.vue.mjs";
137
+ import { default as Rp } from "./src/text/index.vue.mjs";
138
+ import { default as Mp } from "./src/text/group.vue.mjs";
139
+ import { default as vp } from "./src/mask/index.vue.mjs";
140
+ import { Splitter as wp } from "./src/splitter/index.mjs";
141
+ import { default as Kp } from "./src/ag-grid/index.vue.mjs";
142
+ import { default as Up } from "./src/ag-grid/editable/index.vue.mjs";
143
+ import { default as Vp } from "./src/ag-grid/editable/form-item.vue.mjs";
144
+ import { useMessage as zp } from "./src/hooks/useMessage.mjs";
145
+ import { useControllableValue as jp } from "./src/hooks/useControllableValue.mjs";
146
+ import { useManualRef as Wp } from "./src/hooks/useManualRef.mjs";
147
+ import { useThrottleRef as Jp } from "./src/hooks/useThrottleRef.mjs";
148
+ import { useFullScreen as Xp } from "./src/hooks/useFullScreen.mjs";
149
+ import { useResize as Zp } from "./src/hooks/useResize.mjs";
149
150
  const a = console.log;
150
151
  a(`APlus-UI version ${p}`);
151
152
  const l = {
@@ -158,7 +159,7 @@ const l = {
158
159
  };
159
160
  export {
160
161
  K as APConfigProvider,
161
- wp as AgGrid,
162
+ Kp as AgGrid,
162
163
  $o as ApActionButton,
163
164
  To as ApActionGroup,
164
165
  uo as ApActionItem,
@@ -174,7 +175,7 @@ export {
174
175
  nr as ApCard,
175
176
  Ho as ApConfirmButton,
176
177
  St as ApCopy,
177
- op as ApDescriptions,
178
+ tp as ApDescriptions,
178
179
  Lo as ApDownLoadNeedNameKeyDefault,
179
180
  No as ApDownload,
180
181
  Ut as ApDraggableGrid,
@@ -222,7 +223,7 @@ export {
222
223
  Re as ApFormProvider,
223
224
  ne as ApFormSearchForm,
224
225
  be as ApFormSet,
225
- bp as ApGrid,
226
+ Cp as ApGrid,
226
227
  Pr as ApImage,
227
228
  Rr as ApInputRadio,
228
229
  Mt as ApKeepAlive,
@@ -237,17 +238,18 @@ export {
237
238
  Tt as ApProductInfo,
238
239
  ht as ApRadioGroup,
239
240
  kr as ApSelectLayout,
241
+ Wt as ApSelectedItems,
240
242
  It as ApSizeInput,
241
243
  Xo as ApStatisticCard,
242
244
  Or as ApStatus,
243
245
  Vr as ApStatusGroup,
244
246
  ft as ApSummary,
245
- Jt as ApTable,
247
+ Xt as ApTable,
246
248
  or as ApTableModal,
247
249
  So as ApTag,
248
250
  Go as ApTagGroup,
249
- Pp as ApText,
250
- Rp as ApTextGroup,
251
+ Rp as ApText,
252
+ Mp as ApTextGroup,
251
253
  zr as ApTitle,
252
254
  Zo as ApTransformDataHelper,
253
255
  Eo as ApUpload,
@@ -260,23 +262,23 @@ export {
260
262
  y as ConfigProvider,
261
263
  n as DEFAULT_NAMESPACE,
262
264
  c as DEFAULT_UIMODE,
263
- Kp as EditableAgGrid,
264
- Up as EditableAgGridFormItem,
265
- Cp as EditableGrid,
266
- Dp as EditableGridFormItem,
267
- Xt as EditableTable,
268
- Zt as EditableTableFormItem,
269
- Ap as FullScreen,
270
- mp as InternalScrollBar,
265
+ Up as EditableAgGrid,
266
+ Vp as EditableAgGridFormItem,
267
+ Dp as EditableGrid,
268
+ Pp as EditableGridFormItem,
269
+ Zt as EditableTable,
270
+ op as EditableTableFormItem,
271
+ np as FullScreen,
272
+ xp as InternalScrollBar,
271
273
  vt as LruCacher,
272
- Mp as Mask,
274
+ vp as Mask,
273
275
  ho as NeedNameKeyDefault,
274
- sp as Portal,
275
- Fp as ROW_SELECTION_FIELD,
276
- np as ResizeObserver,
277
- ap as ScrollBar,
278
- xp as ScrollView,
279
- vp as Splitter,
276
+ Ap as Portal,
277
+ gp as ROW_SELECTION_FIELD,
278
+ Fp as ResizeObserver,
279
+ mp as ScrollBar,
280
+ sp as ScrollView,
281
+ wp as Splitter,
280
282
  lo as adminToken,
281
283
  xo as aplusToken,
282
284
  C as buildLocaleContext,
@@ -287,7 +289,7 @@ export {
287
289
  Dr as convertExportField,
288
290
  l as default,
289
291
  R as defaultNamespace,
290
- tp as ensureRangeValue,
292
+ ap as ensureRangeValue,
291
293
  rt as flattenColumns,
292
294
  Rt as forceStopTags,
293
295
  tt as formatDataIndex,
@@ -301,27 +303,27 @@ export {
301
303
  L as namespaceContextKey,
302
304
  s as pathMap,
303
305
  T as provideGlobalConfig,
304
- gp as toTreeArray,
306
+ bp as toTreeArray,
305
307
  h as translate,
306
308
  zt as useAgGridModal,
307
309
  jt as useAgGridSelectModal,
308
310
  wt as useApKeepAliveInject,
309
- zp as useControllableValue,
310
- Jp as useFullScreen,
311
+ jp as useControllableValue,
312
+ Xp as useFullScreen,
311
313
  M as useGetDerivedNamespace,
312
314
  b as useGlobalConfig,
313
315
  Xr as useGridRefresh,
314
316
  P as useLocale,
315
- jp as useManualRef,
316
- Vp as useMessage,
317
+ Wp as useManualRef,
318
+ zp as useMessage,
317
319
  N as useNamespace,
318
320
  Zr as usePageListAgGrid,
319
321
  Jr as usePageListApGrid,
320
322
  jr as usePageListApTable,
321
- Xp as useResize,
323
+ Zp as useResize,
322
324
  tr as useTableModal,
323
- Wt as useTablePaging,
325
+ Jt as useTablePaging,
324
326
  Wr as useTableRefresh,
325
327
  ar as useTableSelectModal,
326
- Wp as useThrottleRef
328
+ Jp as useThrottleRef
327
329
  };
@@ -980,6 +980,10 @@ declare const __VLS_component: DefineComponent<ApFormDrawerFormProps, {
980
980
  type: BooleanConstructor;
981
981
  default: boolean;
982
982
  };
983
+ loading: {
984
+ type: BooleanConstructor;
985
+ default: boolean;
986
+ };
983
987
  }>>, "open" | "onUpdate:open">;
984
988
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
985
989
  formRef: ({
@@ -912,7 +912,15 @@ declare const __VLS_component: DefineComponent<ApFormModalFormProps, {
912
912
  type: PropType<string | number | Partial<Record< Breakpoint, string | number>>>;
913
913
  default: string | number | Partial<Record< Breakpoint, string | number>>;
914
914
  };
915
- footer: VueTypeValidableDef<any>;
915
+ footer: {
916
+ type: PropType< VueNode | ((params: {
917
+ originNode: VueNode;
918
+ extra: {
919
+ okBtn: VueNode;
920
+ cancelBtn: VueNode;
921
+ };
922
+ }) => VueNode)>;
923
+ };
916
924
  okText: VueTypeValidableDef<any>;
917
925
  okType: PropType<LegacyButtonType>;
918
926
  cancelText: VueTypeValidableDef<any>;
@@ -1,38 +1,39 @@
1
- import { defineComponent as w, createVNode as l, mergeProps as P, render as h, h as N } from "vue";
2
- import { Modal as L } from "@aplus-frontend/antdv";
3
- import { ConfigProvider as M, globalConfigCached as C } from "../../config-provider/config-provider.mjs";
4
- import { omit as A } from "lodash-unified";
5
- import { isNumeric as D } from "@aplus-frontend/utils";
1
+ import { render as m, defineComponent as b, createVNode as l, mergeProps as k, h as w } from "vue";
2
+ import { Modal as P } from "@aplus-frontend/antdv";
3
+ import { ConfigProvider as N, globalConfigCached as f } from "../../config-provider/config-provider.mjs";
4
+ import { omit as L } from "lodash-unified";
5
+ import { isNumeric as M } from "@aplus-frontend/utils";
6
6
  import "../../config-provider/index.mjs";
7
- import { getContainerDom as u, getModalGlobalAppContext as E } from "./util.mjs";
8
- import { getTopWindow as G } from "../../utils/index.mjs";
9
- import { useNamespace as H } from "../../config-provider/hooks/use-namespace.mjs";
10
- const F = (a) => {
7
+ import { getContainerDom as u, getModalGlobalAppContext as A } from "./util.mjs";
8
+ import { getTopWindow as E } from "../../utils/index.mjs";
9
+ import { useNamespace as T } from "../../config-provider/hooks/use-namespace.mjs";
10
+ const z = (p) => {
11
11
  let o, t;
12
12
  const {
13
- destroyOnClose: p = !0,
13
+ destroyOnClose: a = !0,
14
14
  wrapperOffset: n = !1
15
- } = a, {
15
+ } = p, {
16
16
  b: s
17
- } = H("ap-modal");
18
- let m = !1;
17
+ } = T("ap-modal");
19
18
  function i() {
20
- o && o(!1), m = !0;
19
+ o && o(!1), setTimeout(() => {
20
+ m(null, r), r.parentElement?.removeChild(r);
21
+ }, 500);
21
22
  }
22
- function g() {
23
+ function h() {
23
24
  o && o(!0);
24
25
  }
25
26
  function c() {
26
27
  o && o(!1);
27
28
  }
28
- function x(e) {
29
+ function C(e) {
29
30
  t && t(e);
30
31
  }
31
- const O = /* @__PURE__ */ w({
32
+ const g = /* @__PURE__ */ b({
32
33
  data() {
33
34
  return {
34
- open: p,
35
- props: a
35
+ open: a,
36
+ props: p
36
37
  };
37
38
  },
38
39
  created() {
@@ -51,7 +52,7 @@ const F = (a) => {
51
52
  const e = this.props?.content?.component?.exposed ?? void 0;
52
53
  await this.props?.onCancel(e);
53
54
  }
54
- p ? i() : c();
55
+ a ? i() : c();
55
56
  },
56
57
  async handleOk() {
57
58
  try {
@@ -63,7 +64,7 @@ const F = (a) => {
63
64
  }
64
65
  t({
65
66
  confirmLoading: !1
66
- }), p ? i() : c();
67
+ }), a ? i() : c();
67
68
  } catch {
68
69
  t({
69
70
  confirmLoading: !1
@@ -72,9 +73,9 @@ const F = (a) => {
72
73
  }
73
74
  },
74
75
  render() {
75
- const e = A(this.props, ["onCancel", "onOk", "open", "onUpdate:open", "getContainer", "icon"]);
76
- return l(M, C.value, {
77
- default: () => [l(L, P({
76
+ const e = L(this.props, ["onCancel", "onOk", "open", "onUpdate:open", "getContainer", "icon"]);
77
+ return l(N, f.value, {
78
+ default: () => [l(P, k({
78
79
  class: {
79
80
  [s()]: !0,
80
81
  [s("wrapper")]: n
@@ -83,32 +84,29 @@ const F = (a) => {
83
84
  }, e, {
84
85
  open: this.open,
85
86
  onCancel: this.handleCancel,
86
- onOk: this.handleOk,
87
- afterOpenChange: (f) => {
88
- !f && m && (h(null, r), r.parentElement?.removeChild(r)), e?.afterOpenChange && e?.afterOpenChange?.(f);
89
- }
87
+ onOk: this.handleOk
90
88
  }), {
91
89
  default: () => [l("div", {
92
90
  class: {
93
91
  [s("body-wrapper")]: n
94
92
  },
95
93
  style: n === !1 ? {} : {
96
- maxHeight: `calc(100vh - ${(n === !0 ? 100 : D(n) ? Number(n) : 100) * 2}px)`
94
+ maxHeight: `calc(100vh - ${(n === !0 ? 100 : M(n) ? Number(n) : 100) * 2}px)`
97
95
  }
98
96
  }, [this.props?.content])]
99
97
  })]
100
98
  });
101
99
  }
102
- }), v = u(C?.value?.getPopupContainer), y = u(a.getContainer), b = v || y || G().document.body, r = document.createElement("div");
103
- b.appendChild(r);
104
- const d = N(O), k = E();
105
- return d.appContext = a.appContext || k || d.appContext, h(d, r), {
100
+ }), x = u(f?.value?.getPopupContainer), v = u(p.getContainer), O = x || v || E().document.body, r = document.createElement("div");
101
+ O.appendChild(r);
102
+ const d = w(g), y = A();
103
+ return d.appContext = p.appContext || y || d.appContext, m(d, r), {
106
104
  destroy: i,
107
- update: x,
108
- open: g,
105
+ update: C,
106
+ open: h,
109
107
  close: c
110
108
  };
111
109
  };
112
110
  export {
113
- F as createModal
111
+ z as createModal
114
112
  };
@@ -1,3 +1,3 @@
1
1
  import { AgGridPreviewModalProps, PreviewModalReturnType } from '../interface';
2
2
  /** ag-grid弹框 */
3
- export declare function useAgGridModal<T = any>(props: AgGridPreviewModalProps<T>): PreviewModalReturnType;
3
+ export declare function useAgGridModal<T = any>(props: AgGridPreviewModalProps<T>): PreviewModalReturnType<T>;
@@ -1,58 +1,95 @@
1
- import { createVNode as r } from "vue";
2
- import { ApModal as m } from "../../../ap-modal/index.mjs";
1
+ import { defineComponent as v, ref as w, createVNode as n } from "vue";
2
+ import { ApModal as P } from "../../../ap-modal/index.mjs";
3
3
  import "../../../ag-grid/index.mjs";
4
- import { genRequest as d } from "../utils.mjs";
5
- import { useAgGridInstance as l } from "./use-ag-grid-instance.mjs";
6
- import { omit as c } from "lodash-unified";
4
+ import { genRequest as y } from "../utils.mjs";
5
+ import { useAgGridInstance as I } from "./use-ag-grid-instance.mjs";
6
+ import { isFunction as A, isEmpty as f, omitBy as M, isUndefined as _, omit as q } from "lodash-unified";
7
7
  import "../wrapper/index.vue.mjs";
8
- import f from "../wrapper/index.vue2.mjs";
9
- import u from "../../../ag-grid/index.vue.mjs";
10
- function C(e) {
11
- const [t, n] = l(), o = d(e.api, e.getRowKey, t.setDataSourceLength);
12
- function a() {
13
- m.createModal({
14
- title: e.title,
15
- width: e.width,
16
- destroyOnClose: !0,
17
- maskClosable: !1,
18
- footer: null,
19
- onCancel() {
20
- t.setInstance(void 0), t.setDataSourceLength(0);
21
- },
22
- content: r(n, null, {
23
- default: () => [r(f, {
24
- rowHeight: e.rowHeight
8
+ import G from "../wrapper/index.vue2.mjs";
9
+ import H from "../../../ag-grid/index.vue.mjs";
10
+ function L(o) {
11
+ let a = null, s = null;
12
+ const [r, c] = I(), l = y(o.api, o.getRowKey, r.setDataSourceLength), u = (t) => {
13
+ const {
14
+ title: e,
15
+ width: i,
16
+ modalProps: C,
17
+ ...d
18
+ } = A(t) ? t(o) : t;
19
+ f(d) || s?.(d);
20
+ const m = M({
21
+ title: e,
22
+ width: i,
23
+ modalProps: C
24
+ }, _);
25
+ f(m) || a?.update(m);
26
+ }, g = /* @__PURE__ */ v({
27
+ name: "AgGridModalPreviewContent",
28
+ props: {
29
+ modalConfig: {
30
+ type: Object,
31
+ required: !0
32
+ }
33
+ },
34
+ setup(t) {
35
+ const e = w(t.modalConfig);
36
+ return s = (i) => {
37
+ e.value = {
38
+ ...e.value,
39
+ ...i
40
+ };
41
+ }, () => n(c, null, {
42
+ default: () => [n(G, {
43
+ rowHeight: e.value.rowHeight
25
44
  }, {
26
- default: () => [e.renderHeader?.(c(t, "setInstance")), r(u, {
27
- ref: t.setInstance,
45
+ default: () => [e.value.renderHeader?.(q(r, "setInstance"), {
46
+ updateProps: u
47
+ }), n(H, {
48
+ ref: r.setInstance,
28
49
  searchForm: {
29
50
  sortable: !1,
30
51
  resize: {
31
52
  target: "form"
32
53
  }
33
54
  },
34
- rowKey: e.getRowKey,
35
- request: o.request,
55
+ rowKey: e.value.getRowKey,
56
+ request: l.request,
36
57
  style: {
37
58
  padding: "0px"
38
59
  },
39
- rowHeight: e.rowHeight,
40
- columns: e.columns
41
- }, e.gridSlots)]
60
+ rowHeight: e.value.rowHeight,
61
+ columns: e.value.columns
62
+ }, e.value.gridSlots)]
42
63
  })]
43
- }),
44
- ...e.modalProps || {}
64
+ });
65
+ }
66
+ });
67
+ function p() {
68
+ a = P.createModal({
69
+ title: o.title,
70
+ width: o.width,
71
+ destroyOnClose: !0,
72
+ maskClosable: !1,
73
+ footer: null,
74
+ afterOpenChange(t) {
75
+ t === !1 && (r.setInstance(void 0), r.setDataSourceLength(0), a = null);
76
+ },
77
+ content: n(g, {
78
+ modalConfig: o
79
+ }, null),
80
+ ...o.modalProps || {}
45
81
  });
46
82
  }
47
- function i(s) {
48
- o.setExtraParams(s?.extraParams), a();
83
+ function h(t) {
84
+ l.setExtraParams(t?.extraParams), p();
49
85
  }
50
86
  return {
51
- open: i,
52
- refresh: t.refresh,
53
- getAgGridInstance: t.getInstance
87
+ open: h,
88
+ refresh: r.refresh,
89
+ getAgGridInstance: r.getInstance,
90
+ updateProps: u
54
91
  };
55
92
  }
56
93
  export {
57
- C as useAgGridModal
94
+ L as useAgGridModal
58
95
  };