@kingteza/crud-component 1.0.55 → 1.0.57

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 (38) hide show
  1. package/App.d.ts +5 -0
  2. package/common/button/Button.cjs.js +1 -1
  3. package/common/button/Button.d.ts +2 -3
  4. package/common/button/Button.es.js +54 -61
  5. package/crud/CrudComponent.cjs.js +1 -1
  6. package/crud/CrudComponent.d.ts +5 -1
  7. package/crud/CrudComponent.es.js +138 -137
  8. package/crud/CrudField.cjs.js +1 -1
  9. package/crud/CrudField.es.js +160 -159
  10. package/crud/CrudForm.cjs.js +1 -1
  11. package/crud/CrudForm.es.js +57 -56
  12. package/crud/CrudFormWizard.cjs.js +1 -1
  13. package/crud/CrudFormWizard.es.js +53 -52
  14. package/crud/CrudSearchComponent.cjs.js +1 -1
  15. package/crud/CrudSearchComponent.es.js +39 -38
  16. package/crud/CrudTextAreaComponent.cjs.js +1 -1
  17. package/crud/CrudTextAreaComponent.es.js +29 -28
  18. package/crud/FileCrudField.cjs.js +1 -1
  19. package/crud/FileCrudField.es.js +70 -69
  20. package/crud/view/CrudDecListView.cjs.js +1 -1
  21. package/crud/view/CrudDecListView.es.js +29 -25
  22. package/crud/view/CrudViewer.cjs.js +1 -1
  23. package/crud/view/CrudViewer.es.js +137 -133
  24. package/crud/view/CrudViewerUtil.cjs.js +1 -1
  25. package/crud/view/CrudViewerUtil.es.js +51 -48
  26. package/hooks/NavigatorHooks.cjs.js +1 -0
  27. package/hooks/NavigatorHooks.d.ts +1 -0
  28. package/hooks/NavigatorHooks.es.js +9 -0
  29. package/icons/FlipHIcon.cjs.js +1 -0
  30. package/icons/FlipHIcon.d.ts +3 -0
  31. package/icons/FlipHIcon.es.js +28 -0
  32. package/icons/FlipVIcon.cjs.js +1 -0
  33. package/icons/FlipVIcon.d.ts +3 -0
  34. package/icons/FlipVIcon.es.js +28 -0
  35. package/package.json +3 -2
  36. package/util/CrudUtil.cjs.js +1 -0
  37. package/util/CrudUtil.d.ts +5 -0
  38. package/util/CrudUtil.es.js +8 -0
@@ -1,101 +1,102 @@
1
- import { jsx as d, Fragment as g, jsxs as b } from "react/jsx-runtime";
2
- import k, { useMemo as S, createElement as s, useCallback as j } from "react";
3
- import { Form as A, Col as w, Input as v, Row as H } from "antd";
4
- import p from "./CrudField.es.js";
5
- function _({
6
- form: a,
7
- purpose: y = "new",
8
- ...c
1
+ import { jsx as a, Fragment as y, jsxs as v } from "react/jsx-runtime";
2
+ import S, { useMemo as N, createElement as p, useCallback as j } from "react";
3
+ import { Form as k, Col as w, Input as A, Row as H } from "antd";
4
+ import l from "./CrudField.es.js";
5
+ import C from "../util/CrudUtil.es.js";
6
+ function z({
7
+ form: d,
8
+ purpose: g = "new",
9
+ ...u
9
10
  }) {
10
- return /* @__PURE__ */ d(A, { form: a, layout: "vertical", children: /* @__PURE__ */ d(I, { ...c, purpose: y }) });
11
+ return /* @__PURE__ */ a(k, { form: d, layout: "vertical", children: /* @__PURE__ */ a(I, { ...u, purpose: g }) });
11
12
  }
12
13
  function I({
13
- fields: a,
14
- formBuilder: y,
15
- grid: c,
14
+ fields: d,
15
+ formBuilder: g,
16
+ grid: u,
16
17
  onDeleteFile: m,
17
- onUploadFile: u,
18
- purpose: e
18
+ onUploadFile: e,
19
+ purpose: c
19
20
  }) {
20
- const h = S(
21
- () => a.filter((r) => !r.readonly).map((r) => {
21
+ const h = N(
22
+ () => d.filter((r) => !r.readonly).map((r) => {
22
23
  const i = {
23
- onUploading: r.type === "image" || r.type === "file" ? (n) => {
24
- var t;
25
- r.onUploading && ((t = r.onUploading) == null || t.call(r, n)), u == null || u(n);
24
+ onUploading: r.type === "image" || r.type === "file" ? (t) => {
25
+ var n;
26
+ r.onUploading && ((n = r.onUploading) == null || n.call(r, t)), e == null || e(t);
26
27
  } : void 0,
27
- onDelete: r.type === "image" || r.type === "file" ? (n) => {
28
- var t;
29
- r.onUploading && ((t = r.onDelete) == null || t.call(r, n)), m == null || m(n);
28
+ onDelete: r.type === "image" || r.type === "file" ? (t) => {
29
+ var n;
30
+ r.onUploading && ((n = r.onDelete) == null || n.call(r, t)), m == null || m(t);
30
31
  } : void 0
31
32
  };
32
- return /* @__PURE__ */ d(k.Fragment, { children: r.grid && c ? /* @__PURE__ */ d(w, { ...r.grid, children: /* @__PURE__ */ s(
33
- p,
33
+ return /* @__PURE__ */ a(S.Fragment, { children: r.grid && u ? /* @__PURE__ */ a(w, { ...r.grid, children: /* @__PURE__ */ p(
34
+ l,
34
35
  {
35
36
  ...r,
36
37
  ...i,
37
38
  key: typeof r.name == "string" ? r.name : String(r.name),
38
- updatable: e !== "update" ? !0 : r.updatable
39
+ updatable: c !== "update" ? !0 : r.updatable
39
40
  }
40
- ) }) : /* @__PURE__ */ s(
41
- p,
41
+ ) }) : /* @__PURE__ */ p(
42
+ l,
42
43
  {
43
44
  ...r,
44
45
  ...i,
45
46
  key: typeof r.name == "string" ? r.name : String(r.name),
46
- updatable: e !== "update" ? !0 : r.updatable
47
+ updatable: c !== "update" ? !0 : r.updatable
47
48
  }
48
49
  ) }, r.name);
49
50
  }),
50
- [a, c, m, u, e]
51
- ), C = j(
51
+ [d, u, m, e, c]
52
+ ), R = j(
52
53
  (r, i = {}) => {
53
- const n = a.find((t) => t.name === r);
54
- if (n != null && n.hidden) return /* @__PURE__ */ d(g, {});
55
- if (n) {
56
- const t = {
57
- onUploading: n.type === "image" || n.type === "file" ? (o) => {
54
+ const t = d.find((n) => C.getRealName(n.name) === r);
55
+ if (t != null && t.hidden) return /* @__PURE__ */ a(y, {});
56
+ if (t) {
57
+ const n = {
58
+ onUploading: t.type === "image" || t.type === "file" ? (o) => {
58
59
  var f;
59
- n.onUploading && ((f = n.onUploading) == null || f.call(n, o)), u == null || u(o);
60
+ t.onUploading && ((f = t.onUploading) == null || f.call(t, o)), e == null || e(o);
60
61
  } : void 0,
61
- onDelete: n.type === "image" || n.type === "file" ? (o) => {
62
+ onDelete: t.type === "image" || t.type === "file" ? (o) => {
62
63
  var f;
63
- n.onUploading && ((f = n.onDelete) == null || f.call(n, o)), m == null || m(o);
64
+ t.onUploading && ((f = t.onDelete) == null || f.call(t, o)), m == null || m(o);
64
65
  } : void 0
65
- }, l = /* @__PURE__ */ s(
66
- p,
66
+ }, s = C.getRealName(t.name), b = /* @__PURE__ */ p(
67
+ l,
67
68
  {
68
- ...n,
69
- ...i,
70
69
  ...t,
71
- key: typeof n.name == "string" ? n.name : String(n.name),
72
- updatable: e !== "update" ? !0 : n.updatable
70
+ ...i,
71
+ ...n,
72
+ key: typeof s == "string" ? s : String(s),
73
+ updatable: c !== "update" ? !0 : t.updatable
73
74
  }
74
75
  );
75
- return i.render ? i.render(l) : l;
76
+ return i.render ? i.render(b) : b;
76
77
  }
77
- return /* @__PURE__ */ d(g, {});
78
+ return /* @__PURE__ */ a(y, {});
78
79
  },
79
- [a, e]
80
+ [d, c]
80
81
  );
81
- return /* @__PURE__ */ d(g, { children: y ? /* @__PURE__ */ b(g, { children: [
82
- y(C, {
82
+ return /* @__PURE__ */ a(y, { children: g ? /* @__PURE__ */ v(y, { children: [
83
+ g(R, {
83
84
  isAnyFieldHidden(...r) {
84
85
  const i = Array.isArray(r) ? r : [r];
85
- return a.filter((t) => i.includes(t.name)).some((t) => t.hidden);
86
+ return d.filter((n) => i.includes(n.name)).some((n) => n.hidden);
86
87
  },
87
88
  isAllFieldsHidden(...r) {
88
89
  const i = Array.isArray(r) ? r : [r];
89
- return a.filter((t) => i.includes(t.name)).every((t) => t.hidden);
90
+ return d.filter((n) => i.includes(n.name)).every((n) => n.hidden);
90
91
  }
91
92
  }),
92
- /* @__PURE__ */ b(A.Item, { hidden: !0, noStyle: !0, children: [
93
- /* @__PURE__ */ d(v, { name: "id" }),
94
- /* @__PURE__ */ d(v, {})
93
+ /* @__PURE__ */ v(k.Item, { hidden: !0, noStyle: !0, children: [
94
+ /* @__PURE__ */ a(A, { name: "id" }),
95
+ /* @__PURE__ */ a(A, {})
95
96
  ] })
96
- ] }) : c ? /* @__PURE__ */ d(H, { gutter: [8, 8], children: h }) : h });
97
+ ] }) : u ? /* @__PURE__ */ a(H, { gutter: [8, 8], children: h }) : h });
97
98
  }
98
99
  export {
99
- _ as CrudForm,
100
+ z as CrudForm,
100
101
  I as CrudFormFields
101
102
  };
@@ -1 +1 @@
1
- "use strict";const e=require("react/jsx-runtime"),g=require("@ant-design/icons"),u=require("antd"),b=require("react"),y=require("../locale/index.cjs.js"),C=require("./CrudForm.cjs.js"),S=require("../common/wizard/WizardViewForm.cjs.js"),q=require("../common/button/Button.cjs.js");function v({fields:c,className:m,onDeleteFile:h,onUploadFile:i,purpose:l,wizard:r=[],updatingValue:f,onSave:x,submitting:j}){const d=b.useMemo(()=>r.map(n=>{let t=!0;const o=c.filter(s=>n.fields.includes(s.name));return o.forEach(s=>t&&(t=s.hidden??!1)),{...n,hidden:t,fieldThatShouldShowing:o}}),[c,r]),a=b.useMemo(()=>d.filter(n=>!n.hidden),[d]);return e.jsx(S,{onSubmit:(n,t)=>{console.log(t),x(t)},className:m,pages:a.map(({title:n,icon:t,fieldThatShouldShowing:o,hidden:s},F)=>({title:n,icon:t,hidden:s,component:k=>e.jsx(w,{fields:o,onDeleteFile:h,onUploadFile:i,purpose:l,i:F,updatingValue:f,backward:k.backward,forward:k.forward,wizard:a,submitting:j},F)}))})}function w({fields:c,onDeleteFile:m,onUploadFile:h,purpose:i,wizard:l=[],i:r,forward:f,backward:x,submitting:j,updatingValue:d}){const a=l[r],{t:n}=y.useTranslationLib(),[t]=u.Form.useForm();return b.useEffect(()=>{if(d&&(i==="update"||i==="clone")){const o={};for(const s of c)o[s.name]=d[s.name];t.setFieldsValue(o)}},[c,t,i,d]),e.jsxs(u.Form,{name:String(r),form:t,layout:"vertical",children:[e.jsx(C.CrudFormFields,{fields:c,formBuilder:a.formBuilder,grid:a.grid,onDeleteFile:m,onUploadFile:h,purpose:i}),e.jsx(u.Divider,{}),e.jsxs(u.Row,{gutter:[8,8],children:[r>0&&e.jsx(u.Col,{md:12,children:e.jsx(q,{block:!0,icon:e.jsx(g.LeftOutlined,{}),htmlType:"button",type:"default",size:"large",onClick:()=>x(),children:n("str.back")})}),e.jsx(u.Col,{md:r>0?12:24,children:e.jsx(q,{block:!0,icon:l.length-1===r?e.jsx(g.SaveOutlined,{}):e.jsx(g.RightOutlined,{}),htmlType:"submit",type:"primary",loading:j,size:"large",onClick:()=>{t.validateFields().then(o=>{f(o,l.length-1===r,l.length-1===r)})},children:l.length-1===r?n("str."+(i==="update"?"update":"save")):n("str.next")})})]})]})}module.exports=v;
1
+ "use strict";const e=require("react/jsx-runtime"),j=require("@ant-design/icons"),u=require("antd"),F=require("react"),y=require("../locale/index.cjs.js"),R=require("./CrudForm.cjs.js"),S=require("../common/wizard/WizardViewForm.cjs.js"),b=require("../util/CrudUtil.cjs.js"),C=require("../common/button/Button.cjs.js");function v({fields:d,className:m,onDeleteFile:h,onUploadFile:i,purpose:l,wizard:r=[],updatingValue:f,onSave:x,submitting:g}){const c=F.useMemo(()=>r.map(n=>{let t=!0;const o=d.filter(s=>n.fields.includes(b.getRealName(s.name)));return o.forEach(s=>t&&(t=s.hidden??!1)),{...n,hidden:t,fieldThatShouldShowing:o}}),[d,r]),a=F.useMemo(()=>c.filter(n=>!n.hidden),[c]);return e.jsx(S,{onSubmit:(n,t)=>{console.log(t),x(t)},className:m,pages:a.map(({title:n,icon:t,fieldThatShouldShowing:o,hidden:s},q)=>({title:n,icon:t,hidden:s,component:k=>e.jsx(N,{fields:o,onDeleteFile:h,onUploadFile:i,purpose:l,i:q,updatingValue:f,backward:k.backward,forward:k.forward,wizard:a,submitting:g},q)}))})}function N({fields:d,onDeleteFile:m,onUploadFile:h,purpose:i,wizard:l=[],i:r,forward:f,backward:x,submitting:g,updatingValue:c}){const a=l[r],{t:n}=y.useTranslationLib(),[t]=u.Form.useForm();return F.useEffect(()=>{if(c&&(i==="update"||i==="clone")){const o={};for(const s of d)o[b.getRealName(s.name,"upsertFieldName")]=c[b.getRealName(s.name,"upsertFieldName")];t.setFieldsValue(o)}},[d,t,i,c]),e.jsxs(u.Form,{name:String(r),form:t,layout:"vertical",children:[e.jsx(R.CrudFormFields,{fields:d,formBuilder:a.formBuilder,grid:a.grid,onDeleteFile:m,onUploadFile:h,purpose:i}),e.jsx(u.Divider,{}),e.jsxs(u.Row,{gutter:[8,8],children:[r>0&&e.jsx(u.Col,{md:12,children:e.jsx(C,{block:!0,icon:e.jsx(j.LeftOutlined,{}),htmlType:"button",type:"default",size:"large",onClick:()=>x(),children:n("str.back")})}),e.jsx(u.Col,{md:r>0?12:24,children:e.jsx(C,{block:!0,icon:l.length-1===r?e.jsx(j.SaveOutlined,{}):e.jsx(j.RightOutlined,{}),htmlType:"submit",type:"primary",loading:g,size:"large",onClick:()=>{t.validateFields().then(o=>{f(o,l.length-1===r,l.length-1===r)})},children:l.length-1===r?n("str."+(i==="update"?"update":"save")):n("str.next")})})]})]})}module.exports=v;
@@ -1,59 +1,60 @@
1
- import { jsx as o, jsxs as F } from "react/jsx-runtime";
2
- import { LeftOutlined as v, SaveOutlined as w, RightOutlined as x } from "@ant-design/icons";
3
- import { Form as k, Divider as T, Row as W, Col as y } from "antd";
4
- import { useMemo as C, useEffect as j } from "react";
5
- import { useTranslationLib as z } from "../locale/index.es.js";
6
- import { CrudFormFields as B } from "./CrudForm.es.js";
7
- import O from "../common/wizard/WizardViewForm.es.js";
8
- import S from "../common/button/Button.es.js";
1
+ import { jsx as o, jsxs as k } from "react/jsx-runtime";
2
+ import { LeftOutlined as N, SaveOutlined as R, RightOutlined as w } from "@ant-design/icons";
3
+ import { Form as y, Divider as x, Row as T, Col as C } from "antd";
4
+ import { useMemo as S, useEffect as W } from "react";
5
+ import { useTranslationLib as j } from "../locale/index.es.js";
6
+ import { CrudFormFields as z } from "./CrudForm.es.js";
7
+ import B from "../common/wizard/WizardViewForm.es.js";
8
+ import p from "../util/CrudUtil.es.js";
9
+ import v from "../common/button/Button.es.js";
9
10
  function H({
10
11
  fields: d,
11
- className: f,
12
- onDeleteFile: u,
12
+ className: u,
13
+ onDeleteFile: f,
13
14
  onUploadFile: l,
14
15
  purpose: m,
15
- wizard: e = [],
16
+ wizard: t = [],
16
17
  updatingValue: s,
17
18
  onSave: h,
18
19
  submitting: g
19
20
  }) {
20
- const a = C(() => e.map((r) => {
21
- let t = !0;
21
+ const a = S(() => t.map((r) => {
22
+ let e = !0;
22
23
  const n = d.filter(
23
- (i) => r.fields.includes(i.name)
24
+ (i) => r.fields.includes(p.getRealName(i.name))
24
25
  );
25
- return n.forEach((i) => t && (t = i.hidden ?? !1)), {
26
+ return n.forEach((i) => e && (e = i.hidden ?? !1)), {
26
27
  ...r,
27
- hidden: t,
28
+ hidden: e,
28
29
  fieldThatShouldShowing: n
29
30
  };
30
- }), [d, e]), c = C(
31
+ }), [d, t]), c = S(
31
32
  () => a.filter((r) => !r.hidden),
32
33
  [a]
33
34
  );
34
35
  return /* @__PURE__ */ o(
35
- O,
36
+ B,
36
37
  {
37
- onSubmit: (r, t) => {
38
- console.log(t), h(t);
38
+ onSubmit: (r, e) => {
39
+ console.log(e), h(e);
39
40
  },
40
- className: f,
41
+ className: u,
41
42
  pages: c.map(
42
- ({ title: r, icon: t, fieldThatShouldShowing: n, hidden: i }, b) => ({
43
+ ({ title: r, icon: e, fieldThatShouldShowing: n, hidden: i }, b) => ({
43
44
  title: r,
44
- icon: t,
45
+ icon: e,
45
46
  hidden: i,
46
- component: (p) => /* @__PURE__ */ o(
47
- E,
47
+ component: (F) => /* @__PURE__ */ o(
48
+ O,
48
49
  {
49
50
  fields: n,
50
- onDeleteFile: u,
51
+ onDeleteFile: f,
51
52
  onUploadFile: l,
52
53
  purpose: m,
53
54
  i: b,
54
55
  updatingValue: s,
55
- backward: p.backward,
56
- forward: p.forward,
56
+ backward: F.backward,
57
+ forward: F.forward,
57
58
  wizard: c,
58
59
  submitting: g
59
60
  },
@@ -64,45 +65,45 @@ function H({
64
65
  }
65
66
  );
66
67
  }
67
- function E({
68
+ function O({
68
69
  fields: d,
69
- onDeleteFile: f,
70
- onUploadFile: u,
70
+ onDeleteFile: u,
71
+ onUploadFile: f,
71
72
  purpose: l,
72
73
  wizard: m = [],
73
- i: e,
74
+ i: t,
74
75
  forward: s,
75
76
  backward: h,
76
77
  submitting: g,
77
78
  updatingValue: a
78
79
  }) {
79
- const c = m[e], { t: r } = z(), [t] = k.useForm();
80
- return j(() => {
80
+ const c = m[t], { t: r } = j(), [e] = y.useForm();
81
+ return W(() => {
81
82
  if (a && (l === "update" || l === "clone")) {
82
83
  const n = {};
83
84
  for (const i of d)
84
- n[i.name] = a[i.name];
85
- t.setFieldsValue(n);
85
+ n[p.getRealName(i.name, "upsertFieldName")] = a[p.getRealName(i.name, "upsertFieldName")];
86
+ e.setFieldsValue(n);
86
87
  }
87
- }, [d, t, l, a]), /* @__PURE__ */ F(k, { name: String(e), form: t, layout: "vertical", children: [
88
+ }, [d, e, l, a]), /* @__PURE__ */ k(y, { name: String(t), form: e, layout: "vertical", children: [
88
89
  /* @__PURE__ */ o(
89
- B,
90
+ z,
90
91
  {
91
92
  fields: d,
92
93
  formBuilder: c.formBuilder,
93
94
  grid: c.grid,
94
- onDeleteFile: f,
95
- onUploadFile: u,
95
+ onDeleteFile: u,
96
+ onUploadFile: f,
96
97
  purpose: l
97
98
  }
98
99
  ),
99
- /* @__PURE__ */ o(T, {}),
100
- /* @__PURE__ */ F(W, { gutter: [8, 8], children: [
101
- e > 0 && /* @__PURE__ */ o(y, { md: 12, children: /* @__PURE__ */ o(
102
- S,
100
+ /* @__PURE__ */ o(x, {}),
101
+ /* @__PURE__ */ k(T, { gutter: [8, 8], children: [
102
+ t > 0 && /* @__PURE__ */ o(C, { md: 12, children: /* @__PURE__ */ o(
103
+ v,
103
104
  {
104
105
  block: !0,
105
- icon: /* @__PURE__ */ o(v, {}),
106
+ icon: /* @__PURE__ */ o(N, {}),
106
107
  htmlType: "button",
107
108
  type: "default",
108
109
  size: "large",
@@ -110,25 +111,25 @@ function E({
110
111
  children: r("str.back")
111
112
  }
112
113
  ) }),
113
- /* @__PURE__ */ o(y, { md: e > 0 ? 12 : 24, children: /* @__PURE__ */ o(
114
- S,
114
+ /* @__PURE__ */ o(C, { md: t > 0 ? 12 : 24, children: /* @__PURE__ */ o(
115
+ v,
115
116
  {
116
117
  block: !0,
117
- icon: m.length - 1 === e ? /* @__PURE__ */ o(w, {}) : /* @__PURE__ */ o(x, {}),
118
+ icon: m.length - 1 === t ? /* @__PURE__ */ o(R, {}) : /* @__PURE__ */ o(w, {}),
118
119
  htmlType: "submit",
119
120
  type: "primary",
120
121
  loading: g,
121
122
  size: "large",
122
123
  onClick: () => {
123
- t.validateFields().then((n) => {
124
+ e.validateFields().then((n) => {
124
125
  s(
125
126
  n,
126
- m.length - 1 === e,
127
- m.length - 1 === e
127
+ m.length - 1 === t,
128
+ m.length - 1 === t
128
129
  );
129
130
  });
130
131
  },
131
- children: m.length - 1 === e ? r("str." + (l === "update" ? "update" : "save")) : r("str.next")
132
+ children: m.length - 1 === t ? r("str." + (l === "update" ? "update" : "save")) : r("str.next")
132
133
  }
133
134
  ) })
134
135
  ] })
@@ -1 +1 @@
1
- "use strict";const e=require("react/jsx-runtime"),o=require("react"),w=require("@ant-design/icons"),f=require("antd"),M=require("./CrudField.cjs.js"),N=require("../common/button/Button.cjs.js");function a({searchFields:t=[],fields:b,searchOnChange:x,onSearch:g,searchDefaultValues:m,searchFieldsCustomColumnProps:r}){const p=o.useMemo(()=>t.map(n=>typeof n=="string"?{...b.find(c=>n===c.name),required:!1}:{...b.find(i=>(n==null?void 0:n.name)===i.name),...n}).filter(n=>n&&!(n!=null&&n.hidden)),[t,b]),y=o.useMemo(()=>t.length===1?{field:22,button:2}:t.length===2?{field:11,button:2}:t.length===3?{field:6,button:6}:t.length===4?{field:5,button:4}:t.length===5?{field:4,button:4}:{field:4,button:4},[t.length]),j=o.useMemo(()=>t.length===1?{field:22,button:2}:t.length===2?{field:11,button:2}:t.length===3?{field:6,button:6}:t.length===4?{field:5,button:4}:t.length===5?{field:4,button:4}:{field:4,button:4},[t.length]),q=o.useMemo(()=>t.length===1?{field:21,button:3}:t.length===2?{field:11,button:2}:t.length===3?{field:24,button:24}:t.length===4?{field:5,button:4}:t.length===5?{field:4,button:4}:{field:4,button:4},[t.length]),[u]=f.Form.useForm(),d=o.useCallback(async n=>{if((n||x)&&g){const l=await u.validateFields();g(l)}},[u,g,x]);return o.useEffect(()=>{m&&(u.setFieldsValue(m),d(!0))},[u,m]),t!=null&&t.length?e.jsx(f.Form,{form:u,onFinish:()=>d(!0),layout:"vertical",className:"mb-2",onChange:()=>d(!1),children:e.jsxs(f.Row,{gutter:[4,8],className:"w-100",children:[p.map((n,l)=>{const i=(r==null?void 0:r[l])??{md:y.field,sm:j.field,xs:q.field};return o.createElement(f.Col,{...i,key:`search_field_${String(n.name)}`,className:"align-self-end"},e.jsx(M.default,{...n,readonly:!1,fieldClassName:"mb-0"}))}),e.jsx(f.Col,{md:y.button,sm:j.button,xs:q.button,style:{alignSelf:"end"},children:e.jsx(N,{type:"primary",htmlType:"submit",block:!0,icon:e.jsx(w.SearchOutlined,{})})})]})}):e.jsx(e.Fragment,{})}module.exports=a;
1
+ "use strict";const e=require("react/jsx-runtime"),o=require("react"),p=require("@ant-design/icons"),l=require("antd"),N=require("./CrudField.cjs.js"),w=require("../util/CrudUtil.cjs.js"),M=require("../common/button/Button.cjs.js");function R({searchFields:t=[],fields:g,searchOnChange:y,onSearch:m,searchDefaultValues:b,searchFieldsCustomColumnProps:r}){const c=o.useMemo(()=>t.map(n=>typeof n=="string"?{...g.find(x=>n===x.name),required:!1}:{...g.find(i=>(n==null?void 0:n.name)===i.name),...n}).filter(n=>n&&!(n!=null&&n.hidden)),[t,g]),j=o.useMemo(()=>t.length===1?{field:22,button:2}:t.length===2?{field:11,button:2}:t.length===3?{field:6,button:6}:t.length===4?{field:5,button:4}:t.length===5?{field:4,button:4}:{field:4,button:4},[t.length]),q=o.useMemo(()=>t.length===1?{field:22,button:2}:t.length===2?{field:11,button:2}:t.length===3?{field:6,button:6}:t.length===4?{field:5,button:4}:t.length===5?{field:4,button:4}:{field:4,button:4},[t.length]),a=o.useMemo(()=>t.length===1?{field:21,button:3}:t.length===2?{field:11,button:2}:t.length===3?{field:24,button:24}:t.length===4?{field:5,button:4}:t.length===5?{field:4,button:4}:{field:4,button:4},[t.length]),[u]=l.Form.useForm(),d=o.useCallback(async n=>{if((n||y)&&m){const f=await u.validateFields();m(f)}},[u,m,y]);return o.useEffect(()=>{b&&(u.setFieldsValue(b),d(!0))},[u,b]),t!=null&&t.length?e.jsx(l.Form,{form:u,onFinish:()=>d(!0),layout:"vertical",className:"mb-2",onChange:()=>d(!1),children:e.jsxs(l.Row,{gutter:[4,8],className:"w-100",children:[c.map((n,f)=>{const i=(r==null?void 0:r[f])??{md:j.field,sm:q.field,xs:a.field},x=w.getRealName(n.name);return o.createElement(l.Col,{...i,key:`search_field_${String(x)}`,className:"align-self-end"},e.jsx(N.default,{...n,readonly:!1,fieldClassName:"mb-0"}))}),e.jsx(l.Col,{md:j.button,sm:q.button,xs:a.button,style:{alignSelf:"end"},children:e.jsx(M,{type:"primary",htmlType:"submit",block:!0,icon:e.jsx(p.SearchOutlined,{})})})]})}):e.jsx(e.Fragment,{})}module.exports=R;
@@ -1,87 +1,88 @@
1
1
  import { jsx as o, Fragment as j, jsxs as v } from "react/jsx-runtime";
2
- import { useMemo as u, useCallback as E, useEffect as S, createElement as _ } from "react";
3
- import { SearchOutlined as q } from "@ant-design/icons";
4
- import { Form as w, Row as B, Col as N } from "antd";
5
- import M from "./CrudField.es.js";
6
- import R from "../common/button/Button.es.js";
2
+ import { useMemo as l, useCallback as E, useEffect as R, createElement as S } from "react";
3
+ import { SearchOutlined as _ } from "@ant-design/icons";
4
+ import { Form as N, Row as q, Col as w } from "antd";
5
+ import B from "./CrudField.es.js";
6
+ import M from "../util/CrudUtil.es.js";
7
+ import T from "../common/button/Button.es.js";
7
8
  function I({
8
9
  searchFields: t = [],
9
- fields: e,
10
- searchOnChange: p,
11
- onSearch: b,
10
+ fields: u,
11
+ searchOnChange: d,
12
+ onSearch: i,
12
13
  searchDefaultValues: g,
13
- searchFieldsCustomColumnProps: i
14
+ searchFieldsCustomColumnProps: b
14
15
  }) {
15
- const k = u(
16
+ const k = l(
16
17
  () => t.map((n) => typeof n == "string" ? {
17
- ...e.find((a) => n === a.name),
18
+ ...u.find((p) => n === p.name),
18
19
  required: !1
19
20
  } : {
20
- ...e.find(
21
- (l) => (n == null ? void 0 : n.name) === l.name
21
+ ...u.find(
22
+ (e) => (n == null ? void 0 : n.name) === e.name
22
23
  ),
23
24
  ...n
24
25
  }).filter((n) => n && !(n != null && n.hidden)),
25
- [t, e]
26
- ), d = u(
26
+ [t, u]
27
+ ), y = l(
27
28
  () => t.length === 1 ? { field: 22, button: 2 } : t.length === 2 ? { field: 11, button: 2 } : t.length === 3 ? { field: 6, button: 6 } : t.length === 4 ? { field: 5, button: 4 } : t.length === 5 ? { field: 4, button: 4 } : { field: 4, button: 4 },
28
29
  [t.length]
29
- ), y = u(
30
+ ), a = l(
30
31
  () => t.length === 1 ? { field: 22, button: 2 } : t.length === 2 ? { field: 11, button: 2 } : t.length === 3 ? { field: 6, button: 6 } : t.length === 4 ? { field: 5, button: 4 } : t.length === 5 ? { field: 4, button: 4 } : { field: 4, button: 4 },
31
32
  [t.length]
32
- ), x = u(
33
+ ), x = l(
33
34
  () => t.length === 1 ? { field: 21, button: 3 } : t.length === 2 ? { field: 11, button: 2 } : t.length === 3 ? { field: 24, button: 24 } : t.length === 4 ? { field: 5, button: 4 } : t.length === 5 ? { field: 4, button: 4 } : { field: 4, button: 4 },
34
35
  [t.length]
35
- ), [f] = w.useForm(), r = E(
36
+ ), [f] = N.useForm(), r = E(
36
37
  async (n) => {
37
- if ((n || p) && b) {
38
+ if ((n || d) && i) {
38
39
  const m = await f.validateFields();
39
- b(m);
40
+ i(m);
40
41
  }
41
42
  },
42
- [f, b, p]
43
+ [f, i, d]
43
44
  );
44
- return S(() => {
45
+ return R(() => {
45
46
  g && (f.setFieldsValue(g), r(!0));
46
47
  }, [f, g]), t != null && t.length ? /* @__PURE__ */ o(
47
- w,
48
+ N,
48
49
  {
49
50
  form: f,
50
51
  onFinish: () => r(!0),
51
52
  layout: "vertical",
52
53
  className: "mb-2",
53
54
  onChange: () => r(!1),
54
- children: /* @__PURE__ */ v(B, { gutter: [4, 8], className: "w-100", children: [
55
+ children: /* @__PURE__ */ v(q, { gutter: [4, 8], className: "w-100", children: [
55
56
  k.map((n, m) => {
56
- const l = (i == null ? void 0 : i[m]) ?? {
57
- md: d.field,
58
- sm: y.field,
57
+ const e = (b == null ? void 0 : b[m]) ?? {
58
+ md: y.field,
59
+ sm: a.field,
59
60
  xs: x.field
60
- };
61
- return /* @__PURE__ */ _(
62
- N,
61
+ }, p = M.getRealName(n.name);
62
+ return /* @__PURE__ */ S(
63
+ w,
63
64
  {
64
- ...l,
65
- key: `search_field_${String(n.name)}`,
65
+ ...e,
66
+ key: `search_field_${String(p)}`,
66
67
  className: "align-self-end"
67
68
  },
68
- /* @__PURE__ */ o(M, { ...n, readonly: !1, fieldClassName: "mb-0" })
69
+ /* @__PURE__ */ o(B, { ...n, readonly: !1, fieldClassName: "mb-0" })
69
70
  );
70
71
  }),
71
72
  /* @__PURE__ */ o(
72
- N,
73
+ w,
73
74
  {
74
- md: d.button,
75
- sm: y.button,
75
+ md: y.button,
76
+ sm: a.button,
76
77
  xs: x.button,
77
78
  style: { alignSelf: "end" },
78
79
  children: /* @__PURE__ */ o(
79
- R,
80
+ T,
80
81
  {
81
82
  type: "primary",
82
83
  htmlType: "submit",
83
84
  block: !0,
84
- icon: /* @__PURE__ */ o(q, {})
85
+ icon: /* @__PURE__ */ o(_, {})
85
86
  }
86
87
  )
87
88
  }
@@ -1 +1 @@
1
- "use strict";const u=require("react/jsx-runtime"),h=require("../common/text-field/TextArea.cjs.js"),j=require("../common/rich/index.cjs.js"),q=require("antd"),C=({onChange:t,label:r,required:s,rules:o,name:i,updatable:n=!0,...c})=>{const x=q.Form.useFormInstance();if(c.rich)return u.jsx(j.RichTextEditor,{name:i,label:r,required:s,rules:o,disabled:!n});{const{placeholder:a,rows:l,cols:m,fieldClassName:f,fieldTooltip:T}=c;return u.jsx(h.default,{rules:o,placeholder:a,onChange:t?e=>{var d;return t((d=e==null?void 0:e.target)==null?void 0:d.value,x)}:void 0,tooltip:T,required:s,disabled:!n,name:i,label:r,className:f,rows:l,cols:m})}};module.exports=C;
1
+ "use strict";const u=require("react/jsx-runtime"),C=require("../common/text-field/TextArea.cjs.js"),T=require("../common/rich/index.cjs.js"),h=require("antd"),j=require("../util/CrudUtil.cjs.js"),p=({onChange:t,label:r,required:s,rules:o,name:i,updatable:n=!0,...c})=>{const a=h.Form.useFormInstance(),l=j.getRealName(i,"upsertFieldName");if(c.rich)return u.jsx(T.RichTextEditor,{name:l,label:r,required:s,rules:o,disabled:!n});{const{placeholder:m,rows:x,cols:f,fieldClassName:N,fieldTooltip:q}=c;return u.jsx(C.default,{rules:o,placeholder:m,onChange:t?e=>{var d;return t((d=e==null?void 0:e.target)==null?void 0:d.value,a)}:void 0,tooltip:q,required:s,disabled:!n,name:i,label:r,className:N,rows:x,cols:f})}};module.exports=p;
@@ -1,51 +1,52 @@
1
1
  import { jsx as d } from "react/jsx-runtime";
2
- import C from "../common/text-field/TextArea.es.js";
2
+ import N from "../common/text-field/TextArea.es.js";
3
3
  import { RichTextEditor as T } from "../common/rich/index.es.js";
4
4
  import { Form as h } from "antd";
5
- const j = ({
6
- onChange: t,
7
- label: r,
8
- required: e,
9
- rules: i,
10
- name: m,
5
+ import F from "../util/CrudUtil.es.js";
6
+ const E = ({
7
+ onChange: e,
8
+ label: t,
9
+ required: r,
10
+ rules: m,
11
+ name: i,
11
12
  updatable: s = !0,
12
- ...n
13
+ ...a
13
14
  }) => {
14
- const f = h.useFormInstance();
15
- if (n.rich)
15
+ const c = h.useFormInstance(), f = F.getRealName(i, "upsertFieldName");
16
+ if (a.rich)
16
17
  return /* @__PURE__ */ d(
17
18
  T,
18
19
  {
19
- name: m,
20
- label: r,
21
- required: e,
22
- rules: i,
20
+ name: f,
21
+ label: t,
22
+ required: r,
23
+ rules: m,
23
24
  disabled: !s
24
25
  }
25
26
  );
26
27
  {
27
- const { placeholder: p, rows: a, cols: l, fieldClassName: x, fieldTooltip: u } = n;
28
+ const { placeholder: l, rows: p, cols: u, fieldClassName: x, fieldTooltip: C } = a;
28
29
  return /* @__PURE__ */ d(
29
- C,
30
+ N,
30
31
  {
31
- rules: i,
32
- placeholder: p,
33
- onChange: t ? (o) => {
34
- var c;
35
- return t((c = o == null ? void 0 : o.target) == null ? void 0 : c.value, f);
32
+ rules: m,
33
+ placeholder: l,
34
+ onChange: e ? (o) => {
35
+ var n;
36
+ return e((n = o == null ? void 0 : o.target) == null ? void 0 : n.value, c);
36
37
  } : void 0,
37
- tooltip: u,
38
- required: e,
38
+ tooltip: C,
39
+ required: r,
39
40
  disabled: !s,
40
- name: m,
41
- label: r,
41
+ name: i,
42
+ label: t,
42
43
  className: x,
43
- rows: a,
44
- cols: l
44
+ rows: p,
45
+ cols: u
45
46
  }
46
47
  );
47
48
  }
48
49
  };
49
50
  export {
50
- j as default
51
+ E as default
51
52
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime");;/* empty css */const d=require("@ant-design/icons"),F=require("antd"),k=require("mime"),c=require("react"),W=require("../locale/index.cjs.js"),B=require("../util/ValidationUtil.cjs.js"),p=require("../common/button/Button.cjs.js"),z=require("../common/layout/VerticalSpace.cjs.js");function G({name:n,label:e,required:l,provider:s,onUploading:a,onRemoved:h,fieldClassName:j,accept:P,rules:U,maxCount:O=1,block:_,...$}){const f=F.Form.useFormInstance(),x=F.Form.useWatch(n,f),[b,q]=c.useState(!1),[V,N]=c.useState(!1),A=c.useCallback(async r=>{var i,u;try{const{file:o}=r,g=o.name;q(!0),N(!0),a==null||a(!0);const C=g??"",S=C.split("."),L=S[S.length-1],R=s.generateFileName(C),M=`${await s.getInitialPath()}/${R}.${L}`;console.log({filePath:M});const D=await s.upload({...o,originFileObj:o},M);a==null||a(!1),f.setFieldValue(n,D),(i=r.onSuccess)==null||i.call(r,D)}catch(o){(u=r.onError)==null||u.call(r,o)}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 i=k.getType(r),u=r.split("/").pop(),o=await s.getRealUrl(r);return{uid:r,url:o,type:i,name:u}})).then(r=>I(()=>{const i=r.map(({url:u,type:o,uid:g,name:C})=>({uid:g,url:u,type:o,response:g,thumbUrl:u,name:C}));return console.log(i),i}))},[x,V,b,s]);const H=c.useCallback(async r=>{const i=r.response,u=i||f.getFieldValue(n);await s.delete(u),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?B.required(e):[],...U??[]],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:H,listType:"picture",onChange:({fileList:r})=>{I(r)},style:_?{width:"100%"}:void 0,children:t.jsx(p,{loading:b,children:"Upload File"})})]})}const J=({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]),[h,j]=c.useState(!1),{t:P}=W.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(z,{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=E;exports.FileCrudCellValue=J;exports.default=G;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime");;/* empty css */const d=require("@ant-design/icons"),F=require("antd"),N=require("mime"),c=require("react"),B=require("../locale/index.cjs.js"),z=require("../util/ValidationUtil.cjs.js"),p=require("../common/button/Button.cjs.js"),G=require("../common/layout/VerticalSpace.cjs.js"),J=require("../util/CrudUtil.cjs.js");function K({name:n,label:e,required:l,provider:s,onUploading:a,onRemoved:h,fieldClassName:j,accept:P,rules:k,maxCount:q=1,block:E,..._}){const f=F.Form.useFormInstance(),$=J.getRealName(n,"upsertFieldName"),x=F.Form.useWatch($,f),[O,b]=c.useState(!1),[V,R]=c.useState(!1),A=c.useCallback(async r=>{var i,u;try{const{file:o}=r,g=o.name;b(!0),R(!0),a==null||a(!0);const C=g??"",S=C.split("."),L=S[S.length-1],W=s.generateFileName(C),M=`${await s.getInitialPath()}/${W}.${L}`;console.log({filePath:M});const D=await s.upload({...o,originFileObj:o},M);a==null||a(!1),f.setFieldValue(n,D),(i=r.onSuccess)==null||i.call(r,D)}catch(o){(u=r.onError)==null||u.call(r,o)}finally{b(!1)}},[f,n,a,s]),[w,I]=c.useState([]);c.useEffect(()=>{!V&&x&&Promise.all((Array.isArray(x)?x:[x]).map(async r=>{const i=N.getType(r),u=r.split("/").pop(),o=await s.getRealUrl(r);return{uid:r,url:o,type:i,name:u}})).then(r=>I(()=>{const i=r.map(({url:u,type:o,uid:g,name:C})=>({uid:g,url:u,type:o,response:g,thumbUrl:u,name:C}));return console.log(i),i}))},[x,V,O,s]);const H=c.useCallback(async r=>{const i=r.response,u=i||f.getFieldValue(n);await s.delete(u),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?z.required(e):[],...k??[]],children:[t.jsx("input",{hidden:!0}),t.jsx(F.Upload,{..._,fileList:w,className:((w==null?void 0:w.length)??0)>=q?"hide-upload":"",maxCount:q,customRequest:A,onRemove:H,listType:"picture",onChange:({fileList:r})=>{I(r)},style:E?{width:"100%"}:void 0,children:t.jsx(p,{loading:O,children:"Upload File"})})]})}const Q=({provider:n,value:e})=>{const[l,s]=c.useState();return c.useEffect(()=>{e&&n.getRealUrl(e).then(a=>{s({mimeType:N.getType(e),url:a,fileName:e.split("/").pop()??e})})},[n,e]),l?t.jsx(U,{fileName:l.fileName,url:l==null?void 0:l.url,mimeType:l==null?void 0:l.mimeType}):t.jsx(t.Fragment,{})},U=({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}=B.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(G,{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=U;exports.FileCrudCellValue=Q;exports.default=K;