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