@kingteza/crud-component 1.45.0 → 1.46.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.
@@ -1,179 +1,180 @@
1
- import { jsxs as f, jsx as s, Fragment as V } from "react/jsx-runtime";
2
- import { FileOutlined as Z, FilePptOutlined as B, FileExcelOutlined as m, FileTextOutlined as v, FileWordOutlined as y, FilePdfOutlined as T, FileImageOutlined as tt, ExportOutlined as et } from "@ant-design/icons";
3
- import { Form as b, Upload as st, Modal as lt } from "antd";
4
- import S from "mime";
5
- import { useState as w, useCallback as j, useEffect as A, useMemo as H } from "react";
6
- import { useTranslationLib as rt } from "../locale/index.es.js";
7
- import nt from "../util/ValidationUtil.es.js";
8
- import P from "../common/button/Button.es.js";
9
- import at from "../common/layout/VerticalSpace.es.js";
10
- import it from "../util/CrudUtil.es.js";
11
- import ct from "../util/ImageUtil.es.js";
12
- function It({
1
+ import { jsxs as h, jsx as e, Fragment as D } from "react/jsx-runtime";
2
+ import { UploadOutlined as B, FileOutlined as v, FilePptOutlined as y, FileExcelOutlined as m, FileTextOutlined as T, FileWordOutlined as tt, FilePdfOutlined as et, FileImageOutlined as st, ExportOutlined as rt } from "@ant-design/icons";
3
+ import { Form as V, Upload as lt, Modal as nt } from "antd";
4
+ import z from "mime";
5
+ import { useState as g, useCallback as H, useEffect as A, useMemo as S } from "react";
6
+ import { useTranslationLib as it } from "../locale/index.es.js";
7
+ import at from "../util/ValidationUtil.es.js";
8
+ import I from "../common/button/Button.es.js";
9
+ import ct from "../common/layout/VerticalSpace.es.js";
10
+ import ot from "../util/CrudUtil.es.js";
11
+ import ut from "../util/ImageUtil.es.js";
12
+ function pt({
13
13
  name: n,
14
14
  label: t,
15
- required: l,
16
- provider: e,
17
- onUploading: a,
18
- onRemoved: u,
19
- fieldClassName: F,
20
- accept: I,
21
- rules: L,
22
- maxCount: D = 1,
23
- block: W,
24
- fieldHelper: _,
25
- formLayoutProps: q,
26
- preprocessBeforeUpload: g,
27
- ...z
15
+ required: r,
16
+ provider: s,
17
+ onUploading: i,
18
+ onRemoved: f,
19
+ onUploadComplete: u,
20
+ fieldClassName: b,
21
+ accept: L,
22
+ rules: W,
23
+ maxCount: N = 1,
24
+ block: _,
25
+ fieldHelper: q,
26
+ formLayoutProps: R,
27
+ preprocessBeforeUpload: w,
28
+ ...G
28
29
  }) {
29
- const d = b.useFormInstance(), R = it.getRealName(n, "upsertFieldName"), h = b.useWatch(R, d), [N, k] = w(!1), [E, G] = w(!1), J = j(
30
- async (r) => {
30
+ const d = V.useFormInstance(), J = ot.getRealName(n, "upsertFieldName"), F = V.useWatch(J, d), [k, E] = g(!1), [M, K] = g(!1), Q = H(
31
+ async (l) => {
31
32
  var o, c;
32
33
  try {
33
- const { file: i } = r, x = i.name;
34
- k(!0), G(!0), a == null || a(!0);
35
- const C = x ?? "", U = C.split("."), Q = U[U.length - 1], X = e.generateFileName(C), Y = `${await e.getInitialPath()}/${X}.${Q}`;
36
- let O = i;
37
- g && (typeof g == "function" ? O = await g(i) : g.compressImage && (O = await ct.resizeImage(i)));
38
- const $ = await e.upload(
39
- { ...i, originFileObj: O },
40
- Y
34
+ const { file: a } = l, O = a.name;
35
+ E(!0), K(!0), i == null || i(!0);
36
+ const P = O ?? "", j = P.split("."), Y = j[j.length - 1], Z = s.generateFileName(P), U = `${await s.getInitialPath()}/${Z}.${Y}`;
37
+ let C = a;
38
+ w && (typeof w == "function" ? C = await w(a) : w.compressImage && (C = await ut.resizeImage(a)));
39
+ const p = await s.upload(
40
+ { ...a, originFileObj: C },
41
+ U
41
42
  );
42
- a == null || a(!1), d.setFieldValue(n, $), (o = r.onSuccess) == null || o.call(r, $);
43
- } catch (i) {
44
- (c = r.onError) == null || c.call(r, i);
43
+ u == null || u(p), i == null || i(!1), d.setFieldValue(n, p), (o = l.onSuccess) == null || o.call(l, p);
44
+ } catch (a) {
45
+ (c = l.onError) == null || c.call(l, a);
45
46
  } finally {
46
- k(!1);
47
+ E(!1);
47
48
  }
48
49
  },
49
- [d, n, a, e]
50
- ), [p, M] = w([]);
50
+ [d, n, u, i, w, s]
51
+ ), [x, $] = g([]);
51
52
  A(() => {
52
- !E && h && Promise.all(
53
- (Array.isArray(h) ? h : [h]).map(
54
- async (r) => {
55
- const o = S.getType(r), c = r.split("/").pop(), i = await e.getRealUrl(r);
53
+ !M && F && Promise.all(
54
+ (Array.isArray(F) ? F : [F]).map(
55
+ async (l) => {
56
+ const o = z.getType(l), c = l.split("/").pop(), a = await s.getRealUrl(l);
56
57
  return {
57
- uid: r,
58
- url: i,
58
+ uid: l,
59
+ url: a,
59
60
  type: o,
60
61
  name: c
61
62
  };
62
63
  }
63
64
  )
64
- ).then((r) => M(() => r.map(({ url: c, type: i, uid: x, name: C }) => ({ uid: x, url: c, type: i, response: x, thumbUrl: c, name: C }))));
65
- }, [h, E, N, e]);
66
- const K = j(
67
- async (r) => {
68
- const o = r.response, c = o || d.getFieldValue(n);
69
- await e.delete(c), u == null || u(), r && d.setFieldsValue({ [n]: null });
65
+ ).then((l) => $(() => l.map(({ url: c, type: a, uid: O, name: P }) => ({ uid: O, url: c, type: a, response: O, thumbUrl: c, name: P }))));
66
+ }, [F, M, k, s]);
67
+ const X = H(
68
+ async (l) => {
69
+ const o = l.response, c = o || d.getFieldValue(n);
70
+ await s.delete(c), f == null || f(), l && d.setFieldsValue({ [n]: null });
70
71
  },
71
- [d, n, u, e]
72
+ [d, n, f, s]
72
73
  );
73
- return /* @__PURE__ */ f(
74
- b.Item,
74
+ return /* @__PURE__ */ h(
75
+ V.Item,
75
76
  {
76
77
  label: t,
77
- required: l,
78
+ required: r,
78
79
  name: n,
79
- ...q,
80
- className: F,
80
+ ...R,
81
+ className: b,
81
82
  rules: [
82
- ...l ? nt.required(t) : [],
83
- ...L ?? []
83
+ ...r ? at.required(t) : [],
84
+ ...W ?? []
84
85
  ],
85
- help: _,
86
+ help: q,
86
87
  children: [
87
- /* @__PURE__ */ s("input", { hidden: !0 }),
88
- /* @__PURE__ */ s(
89
- st,
88
+ /* @__PURE__ */ e("input", { hidden: !0 }),
89
+ /* @__PURE__ */ e(
90
+ lt,
90
91
  {
91
- ...z,
92
- fileList: p,
93
- className: ((p == null ? void 0 : p.length) ?? 0) >= D ? "hide-upload" : "",
94
- maxCount: D,
95
- customRequest: J,
96
- onRemove: K,
92
+ ...G,
93
+ fileList: x,
94
+ className: ((x == null ? void 0 : x.length) ?? 0) >= N ? "hide-upload" : "",
95
+ maxCount: N,
96
+ customRequest: Q,
97
+ onRemove: X,
97
98
  listType: "picture",
98
- onChange: ({ fileList: r }) => {
99
- M(r);
99
+ onChange: ({ fileList: l }) => {
100
+ $(l);
100
101
  },
101
- accept: I,
102
- style: W ? { width: "100%" } : void 0,
103
- children: /* @__PURE__ */ s(P, { loading: N, children: "Upload File" })
102
+ accept: L,
103
+ style: _ ? { width: "100%" } : void 0,
104
+ children: /* @__PURE__ */ e(I, { icon: /* @__PURE__ */ e(B, {}), block: !0, size: "large", loading: k, children: "Upload File" })
104
105
  }
105
106
  )
106
107
  ]
107
108
  }
108
109
  );
109
110
  }
110
- const Ot = ({ provider: n, value: t }) => {
111
- const [l, e] = w();
111
+ const Vt = ({ provider: n, value: t }) => {
112
+ const [r, s] = g();
112
113
  return A(() => {
113
- t && n.getRealUrl(t).then((a) => {
114
- e({
115
- mimeType: S.getType(t),
116
- url: a,
114
+ t && n.getRealUrl(t).then((i) => {
115
+ s({
116
+ mimeType: z.getType(t),
117
+ url: i,
117
118
  fileName: t.split("/").pop() ?? t
118
119
  });
119
120
  });
120
- }, [n, t]), l ? /* @__PURE__ */ s(
121
- ot,
121
+ }, [n, t]), r ? /* @__PURE__ */ e(
122
+ ft,
122
123
  {
123
- fileName: l.fileName,
124
- url: l == null ? void 0 : l.url,
125
- mimeType: l == null ? void 0 : l.mimeType
124
+ fileName: r.fileName,
125
+ url: r == null ? void 0 : r.url,
126
+ mimeType: r == null ? void 0 : r.mimeType
126
127
  }
127
- ) : /* @__PURE__ */ s(V, {});
128
- }, ot = ({ url: n, mimeType: t = "", fileName: l }) => {
129
- const e = H(() => t != null && t.includes("image") ? "image" : t != null && t.includes("pdf") ? "pdf" : t != null && t.includes("word") ? "word" : t != null && t.includes("text") ? "text" : t != null && t.includes("presentation") ? "presentation" : t != null && t.includes("excel") || t != null && t.includes("spreadsheet") ? "excel" : "file", [t]), a = H(() => {
130
- switch (e) {
128
+ ) : /* @__PURE__ */ e(D, {});
129
+ }, ft = ({ url: n, mimeType: t = "", fileName: r }) => {
130
+ const s = S(() => t != null && t.includes("image") ? "image" : t != null && t.includes("pdf") ? "pdf" : t != null && t.includes("word") ? "word" : t != null && t.includes("text") ? "text" : t != null && t.includes("presentation") ? "presentation" : t != null && t.includes("excel") || t != null && t.includes("spreadsheet") ? "excel" : "file", [t]), i = S(() => {
131
+ switch (s) {
131
132
  case "image":
132
- return /* @__PURE__ */ s(tt, {});
133
+ return /* @__PURE__ */ e(st, {});
133
134
  case "pdf":
134
- return /* @__PURE__ */ s(T, {});
135
+ return /* @__PURE__ */ e(et, {});
135
136
  case "word":
136
- return /* @__PURE__ */ s(y, {});
137
+ return /* @__PURE__ */ e(tt, {});
137
138
  case "text":
138
- return /* @__PURE__ */ s(v, {});
139
+ return /* @__PURE__ */ e(T, {});
139
140
  case "excel":
140
- return /* @__PURE__ */ s(m, {});
141
+ return /* @__PURE__ */ e(m, {});
141
142
  case "presentation":
142
- return /* @__PURE__ */ s(B, {});
143
+ return /* @__PURE__ */ e(y, {});
143
144
  default:
144
- return /* @__PURE__ */ s(Z, {});
145
+ return /* @__PURE__ */ e(v, {});
145
146
  }
146
- }, [e]), [u, F] = w(!1), { t: I } = rt();
147
- return e !== "file" && e !== "text" ? /* @__PURE__ */ f(V, { children: [
148
- /* @__PURE__ */ s(
149
- lt,
147
+ }, [s]), [f, u] = g(!1), { t: b } = it();
148
+ return s !== "file" && s !== "text" ? /* @__PURE__ */ h(D, { children: [
149
+ /* @__PURE__ */ e(
150
+ nt,
150
151
  {
151
- open: u,
152
- title: l,
153
- onCancel: () => F(!1),
154
- footer: /* @__PURE__ */ s(V, {}),
152
+ open: f,
153
+ title: r,
154
+ onCancel: () => u(!1),
155
+ footer: /* @__PURE__ */ e(D, {}),
155
156
  width: "100%",
156
157
  style: { top: "8px", minHeight: "700px" },
157
158
  destroyOnHidden: !0,
158
- children: /* @__PURE__ */ f(at, { children: [
159
- /* @__PURE__ */ s(
160
- P,
159
+ children: /* @__PURE__ */ h(ct, { children: [
160
+ /* @__PURE__ */ e(
161
+ I,
161
162
  {
162
- tooltip: l,
163
- icon: /* @__PURE__ */ s(et, {}),
163
+ tooltip: r,
164
+ icon: /* @__PURE__ */ e(rt, {}),
164
165
  target: "_blank",
165
166
  href: n,
166
167
  style: { textDecoration: "none" },
167
- children: I("str.openInNewTab")
168
+ children: b("str.openInNewTab")
168
169
  }
169
170
  ),
170
- e === "image" ? /* @__PURE__ */ s("img", { src: n, alt: l, style: { width: "100%" } }) : e === "pdf" ? /* @__PURE__ */ f("iframe", { title: l, src: n, width: "100%", height: "700px", children: [
171
+ s === "image" ? /* @__PURE__ */ e("img", { src: n, alt: r, style: { width: "100%" } }) : s === "pdf" ? /* @__PURE__ */ h("iframe", { title: r, src: n, width: "100%", height: "700px", children: [
171
172
  "This browser does not support PDFs. Please download the PDF to view it:",
172
- /* @__PURE__ */ s("a", { href: n, children: "Download PDF" })
173
- ] }) : /* @__PURE__ */ f(
173
+ /* @__PURE__ */ e("a", { href: n, children: "Download PDF" })
174
+ ] }) : /* @__PURE__ */ h(
174
175
  "iframe",
175
176
  {
176
- title: l,
177
+ title: r,
177
178
  src: `https://view.officeapps.live.com/op/view.aspx?src=${encodeURIComponent(
178
179
  n
179
180
  )}`,
@@ -181,13 +182,13 @@ const Ot = ({ provider: n, value: t }) => {
181
182
  height: "700px",
182
183
  children: [
183
184
  "This browser does not support open ",
184
- e.toUpperCase(),
185
+ s.toUpperCase(),
185
186
  ". Please download the",
186
- e.toUpperCase(),
187
+ s.toUpperCase(),
187
188
  " to view it:",
188
- /* @__PURE__ */ f("a", { href: n, children: [
189
+ /* @__PURE__ */ h("a", { href: n, children: [
189
190
  "Download ",
190
- e.toUpperCase()
191
+ s.toUpperCase()
191
192
  ] }),
192
193
  "."
193
194
  ]
@@ -196,20 +197,20 @@ const Ot = ({ provider: n, value: t }) => {
196
197
  ] })
197
198
  }
198
199
  ),
199
- /* @__PURE__ */ s(
200
- P,
200
+ /* @__PURE__ */ e(
201
+ I,
201
202
  {
202
- tooltip: l,
203
- icon: a,
203
+ tooltip: r,
204
+ icon: i,
204
205
  shape: "circle",
205
- onClick: () => F(!0)
206
+ onClick: () => u(!0)
206
207
  }
207
208
  )
208
- ] }) : /* @__PURE__ */ s(
209
- P,
209
+ ] }) : /* @__PURE__ */ e(
210
+ I,
210
211
  {
211
- tooltip: l,
212
- icon: a,
212
+ tooltip: r,
213
+ icon: i,
213
214
  target: "_blank",
214
215
  href: n,
215
216
  shape: "circle"
@@ -217,7 +218,7 @@ const Ot = ({ provider: n, value: t }) => {
217
218
  );
218
219
  };
219
220
  export {
220
- ot as FileCellValue,
221
- Ot as FileCrudCellValue,
222
- It as default
221
+ ft as FileCellValue,
222
+ Vt as FileCrudCellValue,
223
+ pt as default
223
224
  };
@@ -1 +1 @@
1
- "use strict";var T=Object.defineProperty;var W=(s,e,t)=>e in s?T(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var q=(s,e,t)=>W(s,typeof e!="symbol"?e+"":e,t);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),G=require("@ant-design/icons"),F=require("antd"),x=require("path-browserify"),d=require("react"),J=require("../util/NumberUtil.cjs.js"),K=require("../util/ValidationUtil.cjs.js"),L=require("uuid"),Q=require("../common/picker/ImagePicker.cjs.js"),X=require("../util/ImageUtil.cjs.js");class N{}class Y extends N{constructor(t="",l=""){super();q(this,"rootPath");q(this,"subPath");this.rootPath=t,this.subPath=l}cloneFilePath(t){const l=x.parse(t),a=`${l.name}_cloned_${J.default.randInt(1e5)}`;return x.format({dir:l.dir,ext:l.ext,name:a})}generateFileName(t){return`${t.split(".")[0]}_${L.v4().replace("-","")}`}}function Z({formLayoutProps:s,name:e,label:t,required:l,provider:a,onUploading:i,aspectRatio:$,onRemoved:m,fieldClassName:A,hideLabel:k=!1,listType:C,fieldHelper:O,showSkipCropButton:S=!1,skipCrop:_=!1,skipResize:B=!1,asyncUpload:M=!1,maxCount:h=1},z){const f=F.Form.useFormInstance(),o=e,y=F.Form.useWatch(o,f),D=d.useCallback(r=>a.getRealUrl(r),[a]),g=d.useCallback(async(r,P)=>{if(P){i==null||i(!0);try{const u=r.name,c=u.split("."),p=c[c.length-1],I=a.generateFileName(u),w=`${await a.getInitialPath()}/${I}.${p}`,j=await a.upload(r,w),V=f.getFieldValue(o);if(h>1){const H=Array.isArray(V)?V:V?[V]:[];f.setFieldValue(o,[...H,j].filter(Boolean))}else f.setFieldValue(o,j);return j}finally{i==null||i(!1)}}else{const u=f.getFieldValue(o);if(h>1){const c=r.response??(typeof r.uid=="string"?r.uid:void 0);if(!c)return;await a.delete(c),m==null||m();const I=(Array.isArray(u)?u:u?[u]:[]).filter(w=>w!==c);f.setFieldValue(o,I.length?I:null)}else{const c=await a.delete(u);m==null||m(),c&&f.setFieldValue(o,null)}}},[f,h,o,m,i,a]);d.useImperativeHandle(z,()=>({async uploadBlob(r,P){const u=await X.getBase64(r),c={name:P,uid:P+Math.random().toString(36).substring(2,15),url:u,originFileObj:r};await g(c,!0)}}),[g]);const E=d.useMemo(()=>y?(Array.isArray(y),y):h>1?[]:void 0,[y,h]);return n.jsxs(F.Form.Item,{rules:l?K.required(t):[],label:k?null:t,required:l,name:o,help:O,...s,className:A,children:[n.jsx(Q.default,{noStyle:!0,asyncUpload:M,listType:C,aspectRatio:$,values:E,getRealUrl:D,onRemove:r=>{r&&g(r,!1)},onAdd:async r=>{if(r)return g(r,!0)},className:A,showSkipCropButton:S,skipCrop:_,skipResize:B,maxCount:h}),n.jsx(F.Input,{hidden:!0})]})}const U=d.forwardRef(Z),R=({provider:s,value:e})=>{const[t,l]=d.useState([]);return d.useEffect(()=>{if(!e){l([]);return}const a=Array.isArray(e)?e:[e];Promise.all(a.filter(Boolean).map(i=>s.getRealUrl(i))).then(l)},[s,e]),t.length?n.jsx(n.Fragment,{children:t.map(a=>n.jsx(b,{url:a},a))}):n.jsx(n.Fragment,{})},b=({url:s})=>n.jsx(F.Avatar,{className:"p-0",children:n.jsx(F.Image,{className:"m-0 p-0 position-relative",src:s,preview:{mask:n.jsx(G.EyeOutlined,{})}})});exports.FileDownloadProvider=N;exports.FileUploadProvider=Y;exports.ImageCellValue=b;exports.ImageCrudCellValue=R;exports.default=U;
1
+ "use strict";var G=Object.defineProperty;var J=(s,e,t)=>e in s?G(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var A=(s,e,t)=>J(s,typeof e!="symbol"?e+"":e,t);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),K=require("@ant-design/icons"),F=require("antd"),b=require("path-browserify"),h=require("react"),L=require("../util/NumberUtil.cjs.js"),Q=require("../util/ValidationUtil.cjs.js"),X=require("uuid"),Y=require("../common/picker/ImagePicker.cjs.js"),Z=require("../util/ImageUtil.cjs.js");class ${}class p extends ${constructor(t="",l=""){super();A(this,"rootPath");A(this,"subPath");this.rootPath=t,this.subPath=l}cloneFilePath(t){const l=b.parse(t),r=`${l.name}_cloned_${L.default.randInt(1e5)}`;return b.format({dir:l.dir,ext:l.ext,name:r})}generateFileName(t){return`${t.split(".")[0]}_${X.v4().replace("-","")}`}}function R({formLayoutProps:s,name:e,label:t,required:l,provider:r,onUploading:i,aspectRatio:O,onRemoved:m,onUploadComplete:g,fieldClassName:x,hideLabel:S=!1,listType:_,fieldHelper:B,showSkipCropButton:M=!1,skipCrop:z=!1,skipResize:D=!1,asyncUpload:E=!1,maxCount:d=1},H){const o=F.Form.useFormInstance(),f=e,y=F.Form.useWatch(f,o),T=h.useCallback(a=>r.getRealUrl(a),[r]),P=h.useCallback(async(a,I)=>{if(I){i==null||i(!0);try{const u=a.name,c=u.split("."),N=c[c.length-1],V=r.generateFileName(u),q=`${await r.getInitialPath()}/${V}.${N}`,w=await r.upload(a,q);g==null||g(w);const j=o.getFieldValue(f);if(d>1){const C=Array.isArray(j)?j:j?[j]:[];o.setFieldValue(f,[...C,w].filter(Boolean))}else o.setFieldValue(f,w);return w}finally{i==null||i(!1)}}else{const u=o.getFieldValue(f);if(d>1){const c=a.response??(typeof a.uid=="string"?a.uid:void 0);if(!c)return;await r.delete(c),m==null||m();const V=(Array.isArray(u)?u:u?[u]:[]).filter(q=>q!==c);o.setFieldValue(f,V.length?V:null)}else{const c=await r.delete(u);m==null||m(),c&&o.setFieldValue(f,null)}}},[o,d,f,m,g,i,r]);h.useImperativeHandle(H,()=>({async uploadBlob(a,I){const u=await Z.getBase64(a),c={name:I,uid:I+Math.random().toString(36).substring(2,15),url:u,originFileObj:a};await P(c,!0)}}),[P]);const W=h.useMemo(()=>y?(Array.isArray(y),y):d>1?[]:void 0,[y,d]);return n.jsxs(F.Form.Item,{rules:l?Q.required(t):[],label:S?null:t,required:l,name:f,help:B,...s,className:x,children:[n.jsx(Y.default,{noStyle:!0,asyncUpload:E,listType:_,aspectRatio:O,values:W,getRealUrl:T,onRemove:a=>{a&&P(a,!1)},onAdd:async a=>{if(a)return P(a,!0)},className:x,showSkipCropButton:M,skipCrop:z,skipResize:D,maxCount:d}),n.jsx(F.Input,{hidden:!0})]})}const U=h.forwardRef(R),v=({provider:s,value:e})=>{const[t,l]=h.useState([]);return h.useEffect(()=>{if(!e){l([]);return}const r=Array.isArray(e)?e:[e];Promise.all(r.filter(Boolean).map(i=>s.getRealUrl(i))).then(l)},[s,e]),t.length?n.jsx(n.Fragment,{children:t.map(r=>n.jsx(k,{url:r},r))}):n.jsx(n.Fragment,{})},k=({url:s})=>n.jsx(F.Avatar,{className:"p-0",children:n.jsx(F.Image,{className:"m-0 p-0 position-relative",src:s,preview:{mask:n.jsx(K.EyeOutlined,{})}})});exports.FileDownloadProvider=$;exports.FileUploadProvider=p;exports.ImageCellValue=k;exports.ImageCrudCellValue=v;exports.default=U;
@@ -6,6 +6,7 @@ export interface _ImageCrudField<T> extends InitialCrudField<T> {
6
6
  provider: FileUploadProvider;
7
7
  onUploading?: (isUploading: boolean) => void;
8
8
  onRemoved?: () => void;
9
+ onUploadComplete?: (finalPath: string) => void;
9
10
  aspectRatio?: number;
10
11
  fieldClassName?: string;
11
12
  listType?: UploadListType;