@kingteza/crud-component 1.29.1 → 1.31.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.
- package/dist/common/report/SelectFieldInReport.cjs.js +1 -1
- package/dist/common/report/SelectFieldInReport.d.ts +2 -0
- package/dist/common/report/SelectFieldInReport.es.js +88 -25
- package/dist/crud/CrudComponent.d.ts +1 -1
- package/dist/crud/CrudReportComponent.cjs.js +1 -1
- package/dist/crud/CrudReportComponent.d.ts +3 -1
- package/dist/crud/CrudReportComponent.es.js +69 -66
- package/dist/crud/modal/index.cjs.js +1 -1
- package/dist/crud/modal/index.es.js +124 -107
- package/dist/locale/translations/en.cjs.js +1 -1
- package/dist/locale/translations/en.d.ts +1 -0
- package/dist/locale/translations/en.es.js +2 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),s=require("antd"),i=require("react"),I=require("../select/SelectComponent.cjs.js"),v=require("../../util/ValidationUtil.cjs.js"),V=({className:x,onSelect:p,label:r,required:a,name:l,mode:d,items:n,selectingMode:k})=>{const o=s.Form.useFormInstance(),[b,S]=i.useState(!0);i.useEffect(()=>{if(n&&b){const e=n.filter(h=>h.alreadySelected).map(h=>h.id);o==null||o.setFieldsValue({[l]:d==="multiple"?e:e==null?void 0:e[0]}),S(!1)}},[b,o,n,d,l]);const[F,u]=i.useState(!1),[f,C]=i.useState(void 0),O=i.useCallback(()=>{u(!1),o.setFieldsValue({[l]:f})},[f,o,l]),g=i.useCallback(()=>{u(!1),C(void 0)},[]),j=i.useCallback(()=>{C(o.getFieldValue(l)),u(!0)},[o,l]),c=k==="checkbox",y=i.useCallback(e=>{c&&e&&j()},[c,j]);return t.jsxs(t.Fragment,{children:[c&&t.jsx(s.Modal,{open:F,onCancel:O,onOk:g,destroyOnHidden:!0,title:r,children:t.jsx(s.Form.Item,{name:l,required:a,rules:[...a?v.required(r):[]],className:x,children:t.jsx(s.Checkbox.Group,{onChange:p,style:{width:"100%"},children:t.jsx(s.List,{size:"small",style:{width:"100%"},dataSource:n,renderItem:e=>t.jsx(s.List.Item,{style:{width:"100%"},children:t.jsx(s.List.Item.Meta,{avatar:t.jsx(s.Checkbox,{value:e.id,disabled:e.lock}),title:e.label})},e.id)})})})}),t.jsx(I,{required:a,label:r,mode:d,className:x,name:l,onSelect:p,items:n,showSearch:!1,...c?{open:!1,onOpenChange:y}:{},itemBuilder:e=>t.jsx(s.Select.Option,{value:e.id,disabled:e.lock,children:e.label},e.id)})]})};exports.SelectFieldInReport=V;
|
|
@@ -5,6 +5,7 @@ export interface ReportSelectFieldItems {
|
|
|
5
5
|
lock?: boolean;
|
|
6
6
|
alreadySelected?: boolean;
|
|
7
7
|
}
|
|
8
|
+
export type SelectFieldInReportSelectingMode = "checkbox" | "select";
|
|
8
9
|
export declare const SelectFieldInReport: FC<{
|
|
9
10
|
mode?: "multiple" | "tags" | undefined;
|
|
10
11
|
name: string;
|
|
@@ -13,4 +14,5 @@ export declare const SelectFieldInReport: FC<{
|
|
|
13
14
|
required?: boolean;
|
|
14
15
|
onSelect?: (val: any) => void;
|
|
15
16
|
items: ReportSelectFieldItems[];
|
|
17
|
+
selectingMode?: SelectFieldInReportSelectingMode;
|
|
16
18
|
}>;
|
|
@@ -1,30 +1,93 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Form as
|
|
3
|
-
import { useState as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
items: e,
|
|
24
|
-
itemBuilder: (t) => /* @__PURE__ */ s(m.Option, { value: t.id, disabled: t.lock, children: t.label }, t.id)
|
|
1
|
+
import { jsxs as w, Fragment as M, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Form as O, Modal as j, Checkbox as S, List as p, Select as B } from "antd";
|
|
3
|
+
import { useState as f, useEffect as z, useCallback as r } from "react";
|
|
4
|
+
import E from "../select/SelectComponent.es.js";
|
|
5
|
+
import G from "../../util/ValidationUtil.es.js";
|
|
6
|
+
const D = ({
|
|
7
|
+
className: h,
|
|
8
|
+
onSelect: C,
|
|
9
|
+
label: n,
|
|
10
|
+
required: c,
|
|
11
|
+
name: l,
|
|
12
|
+
mode: d,
|
|
13
|
+
items: i,
|
|
14
|
+
selectingMode: x
|
|
15
|
+
}) => {
|
|
16
|
+
const o = O.useFormInstance(), [k, I] = f(!0);
|
|
17
|
+
z(() => {
|
|
18
|
+
if (i && k) {
|
|
19
|
+
const e = i.filter((u) => u.alreadySelected).map((u) => u.id);
|
|
20
|
+
o == null || o.setFieldsValue({
|
|
21
|
+
[l]: d === "multiple" ? e : e == null ? void 0 : e[0]
|
|
22
|
+
}), I(!1);
|
|
25
23
|
}
|
|
24
|
+
}, [k, o, i, d, l]);
|
|
25
|
+
const [V, a] = f(!1), [F, b] = f(void 0), g = r(() => {
|
|
26
|
+
a(!1), o.setFieldsValue({
|
|
27
|
+
[l]: F
|
|
28
|
+
});
|
|
29
|
+
}, [F, o, l]), v = r(() => {
|
|
30
|
+
a(!1), b(void 0);
|
|
31
|
+
}, []), m = r(() => {
|
|
32
|
+
b(o.getFieldValue(l)), a(!0);
|
|
33
|
+
}, [o, l]), s = x === "checkbox", y = r(
|
|
34
|
+
(e) => {
|
|
35
|
+
s && e && m();
|
|
36
|
+
},
|
|
37
|
+
[s, m]
|
|
26
38
|
);
|
|
39
|
+
return /* @__PURE__ */ w(M, { children: [
|
|
40
|
+
s && /* @__PURE__ */ t(
|
|
41
|
+
j,
|
|
42
|
+
{
|
|
43
|
+
open: V,
|
|
44
|
+
onCancel: g,
|
|
45
|
+
onOk: v,
|
|
46
|
+
destroyOnHidden: !0,
|
|
47
|
+
title: n,
|
|
48
|
+
children: /* @__PURE__ */ t(
|
|
49
|
+
O.Item,
|
|
50
|
+
{
|
|
51
|
+
name: l,
|
|
52
|
+
required: c,
|
|
53
|
+
rules: [...c ? G.required(n) : []],
|
|
54
|
+
className: h,
|
|
55
|
+
children: /* @__PURE__ */ t(S.Group, { onChange: C, style: { width: "100%" }, children: /* @__PURE__ */ t(
|
|
56
|
+
p,
|
|
57
|
+
{
|
|
58
|
+
size: "small",
|
|
59
|
+
style: { width: "100%" },
|
|
60
|
+
dataSource: i,
|
|
61
|
+
renderItem: (e) => /* @__PURE__ */ t(p.Item, { style: { width: "100%" }, children: /* @__PURE__ */ t(
|
|
62
|
+
p.Item.Meta,
|
|
63
|
+
{
|
|
64
|
+
avatar: /* @__PURE__ */ t(S, { value: e.id, disabled: e.lock }),
|
|
65
|
+
title: e.label
|
|
66
|
+
}
|
|
67
|
+
) }, e.id)
|
|
68
|
+
}
|
|
69
|
+
) })
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ t(
|
|
75
|
+
E,
|
|
76
|
+
{
|
|
77
|
+
required: c,
|
|
78
|
+
label: n,
|
|
79
|
+
mode: d,
|
|
80
|
+
className: h,
|
|
81
|
+
name: l,
|
|
82
|
+
onSelect: C,
|
|
83
|
+
items: i,
|
|
84
|
+
showSearch: !1,
|
|
85
|
+
...s ? { open: !1, onOpenChange: y } : {},
|
|
86
|
+
itemBuilder: (e) => /* @__PURE__ */ t(B.Option, { value: e.id, disabled: e.lock, children: e.label }, e.id)
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
] });
|
|
27
90
|
};
|
|
28
91
|
export {
|
|
29
|
-
|
|
92
|
+
D as SelectFieldInReport
|
|
30
93
|
};
|
|
@@ -27,7 +27,7 @@ export interface InitialCrudField<T> {
|
|
|
27
27
|
updatingValue?: T;
|
|
28
28
|
render?: (value: any, obj: T, index: number) => any;
|
|
29
29
|
required?: boolean;
|
|
30
|
-
updatable?: boolean;
|
|
30
|
+
updatable?: boolean | ((data: T) => boolean);
|
|
31
31
|
fieldTooltip?: string;
|
|
32
32
|
hideInTable?: boolean;
|
|
33
33
|
hideInDescList?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),K=require("@ant-design/icons"),s=require("antd"),i=require("react"),x=require("./CrudField.cjs.js"),Q=require("./view/CrudViewer.cjs.js"),W=require("../common/report/SelectFieldInReport.cjs.js"),V=require("./view/CrudViewerUtil.cjs.js"),X=require("../locale/index.cjs.js"),Y=require("../common/select/SelectComponent.cjs.js"),v=require("../common/button/Button.cjs.js"),Z=require("../common/button/PrintButton.cjs.js"),A={lg:6,md:8,sm:12,xs:24},E={lg:12,md:16,sm:24,xs:24};function k({fields:d,data:u,idField:L,loadingData:f,onSubmit:g,paginateProps:G,size:M,onClickPrint:h,onClickExcelExport:y,minusHeight:O,extraSearchFields:R,searchOnMount:B,summary:U,showFieldsSelectingMode:_="checkbox"}){const{t:$}=X.useTranslationLib(),{searchable:z,selectable:c,sortable:q,defaultSort:p}=i.useMemo(()=>{var b,m,N,T,I;const e=[],r=[],o=[];let n;for(const l of d.filter(J=>!J.hidden))l.type==="image"||!l.report||((b=l.report)!=null&&b.searchable&&e.push(l),(m=l.report)!=null&&m.sortable&&(r.push(l),!n&&((N=l.report)!=null&&N.defaultSort)&&(n=l)),l.hideInTable||o.push({id:l.name,label:l.label,lock:(T=l.report)==null?void 0:T.lock,alreadySelected:(I=l.report)==null?void 0:I.alreadySelected}));return{defaultSort:n,searchable:e,sortable:r,selectable:o}},[d]),[S,F]=i.useState([]),j=i.useCallback(async({sortBy:e,sortByType:r,showFields:o=[],...n})=>{const b=[];e&&b.push({field:e,sort:r??"DESC"}),F(d.filter(m=>o.includes(m.name)).map(m=>({...m,hideInTable:!1}))),g({showFields:o,sortBy:b,...n})},[d,g]),[a]=s.Form.useForm(),[w,D]=i.useState(!1),[C,H]=i.useState(!0);return i.useEffect(()=>{if(B&&C){const e=setTimeout(()=>{a.validateFields().then(r=>{j(r)}),H(!1)},200);return()=>clearTimeout(e)}},[j,a,C,B]),i.useEffect(()=>{var r,o;!a.getFieldValue("sortBy")&&p&&a.setFieldsValue({sortBy:p.name,sortByType:typeof((r=p.report)==null?void 0:r.defaultSort)=="string"?(o=p.report)==null?void 0:o.defaultSort:"ASC"})},[p,a]),i.useEffect(()=>{if(w){const e=c.filter(r=>r.alreadySelected).map(r=>r.id);F(d.filter(r=>e.includes(r.name)).map(r=>({...r,hideInTable:!1}))),D(!1)}},[d,w,c]),t.jsxs(s.Space,{className:"w-100",direction:"vertical",children:[t.jsxs(s.Form,{form:a,layout:"vertical",onFinish:j,children:[t.jsxs(s.Row,{gutter:[8,8],children:[z.map(e=>{var r,o,n;return t.jsx(s.Col,{...e.grid??A,style:{alignSelf:"end"},children:(r=e.report)!=null&&r.customRender?e.report.customRender(a):e.type==="date"?t.jsx(x.default,{...e,type:"date",range:(o=e.report)==null?void 0:o.range,required:!!((n=e.report)!=null&&n.required),readonly:!1,fieldClassName:"mb-0"}):e.type==="select"?t.jsx(x.default,{...e,type:"select",multiple:!0,required:!1,readonly:!1,fieldClassName:"mb-0"}):t.jsx(x.default,{...e,readonly:!1,required:!1,fieldClassName:"mb-0"})},e.name)}),!!(c!=null&&c.length)&&t.jsx(s.Col,{...E,children:t.jsx(W.SelectFieldInReport,{items:c,name:"showFields",mode:"multiple",label:$("str.showFields"),className:"mb-0",selectingMode:_})}),!!q.length&&t.jsx(s.Col,{...A,children:t.jsx(Y,{label:"Sort By",name:"sortBy",items:q.map(e=>({id:e.name,label:e.label})),nameFieldInArray:"label",fieldId:"id",className:"mb-0",dropdownRender:e=>t.jsxs(t.Fragment,{children:[e,t.jsx(s.Form.Item,{name:"sortByType",noStyle:!0,className:"mt-3",children:t.jsx(s.Radio.Group,{className:"w-100",defaultValue:"DESC",optionType:"button",children:t.jsxs(s.Row,{children:[t.jsx(s.Col,{xs:12,children:t.jsx(s.Radio,{className:"w-100",style:{borderTopRightRadius:0,borderBottomRightRadius:0},value:"ASC",children:"Ascending"})}),t.jsx(s.Col,{xs:12,children:t.jsx(s.Radio,{className:"w-100",style:{borderTopLeftRadius:0,borderBottomLeftRadius:0},value:"DESC",children:"Descending"})})]})})})]})})}),R?R(a):null]}),t.jsx(v,{className:"mt-3",type:"primary",block:!0,htmlType:"submit",disabled:f,children:"Submit"})]}),t.jsxs(s.Space,{children:[!!h&&t.jsx(Z.PrintButton,{disabled:f||!u.length,onClick:()=>h==null?void 0:h({tableId:"#crud-table table",data:u,fields:S.map(e=>({...e,render:V.getRendererValueCrudViewer(e)}))})}),!!y&&t.jsx(v,{disabled:f||!u.length,onClick:()=>y==null?void 0:y({tableId:"#crud-table table",data:u,fields:S.map(e=>({...e,render:V.getRendererValueCrudViewer(e)}))}),icon:t.jsx(K.FileExcelOutlined,{}),className:`group ${f||!u.length?"":"crud-excel-export-btn"}`,children:"Excel"})]}),U,t.jsx(Q,{minusHeight:O,data:u,size:M,fields:S,idField:L,loadingData:f,paginateProps:G,viewable:!1})]})}module.exports=k;
|
|
@@ -2,6 +2,7 @@ import { SizeType } from 'antd/es/config-provider/SizeContext';
|
|
|
2
2
|
import { FormInstance } from 'antd/lib';
|
|
3
3
|
import { default as React, ReactElement } from 'react';
|
|
4
4
|
import { CrudFieldProps, CrudPaginateProps } from './CrudComponent';
|
|
5
|
+
import { SelectFieldInReportSelectingMode } from '../common/report/SelectFieldInReport';
|
|
5
6
|
export type CrudReportSubmitForm<T> = {
|
|
6
7
|
sortBy: {
|
|
7
8
|
field: keyof T;
|
|
@@ -39,6 +40,7 @@ export interface CrudReportComponentProps<T_Data, F_Search> {
|
|
|
39
40
|
minusHeight?: string;
|
|
40
41
|
extraSearchFields?: (form: FormInstance<any>) => ReactElement;
|
|
41
42
|
searchOnMount?: boolean;
|
|
43
|
+
showFieldsSelectingMode?: SelectFieldInReportSelectingMode;
|
|
42
44
|
}
|
|
43
|
-
declare function CrudReportComponent<T, F = T>({ fields, data, idField, loadingData, onSubmit, paginateProps, size, onClickPrint, onClickExcelExport, minusHeight, extraSearchFields, searchOnMount, summary, }: Readonly<CrudReportComponentProps<T, F>>): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
declare function CrudReportComponent<T, F = T>({ fields, data, idField, loadingData, onSubmit, paginateProps, size, onClickPrint, onClickExcelExport, minusHeight, extraSearchFields, searchOnMount, summary, showFieldsSelectingMode, }: Readonly<CrudReportComponentProps<T, F>>): import("react/jsx-runtime").JSX.Element;
|
|
44
46
|
export default CrudReportComponent;
|
|
@@ -1,40 +1,42 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { FileExcelOutlined as
|
|
3
|
-
import { Form as B, Space as
|
|
4
|
-
import { useMemo as
|
|
1
|
+
import { jsxs as c, jsx as t, Fragment as k } from "react/jsx-runtime";
|
|
2
|
+
import { FileExcelOutlined as E } from "@ant-design/icons";
|
|
3
|
+
import { Form as B, Space as G, Row as M, Col as b, Radio as R } from "antd";
|
|
4
|
+
import { useMemo as P, useState as F, useCallback as ee, useEffect as w } from "react";
|
|
5
5
|
import N from "./CrudField.es.js";
|
|
6
|
-
import
|
|
7
|
-
import { SelectFieldInReport as
|
|
8
|
-
import { getRendererValueCrudViewer as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
import re from "./view/CrudViewer.es.js";
|
|
7
|
+
import { SelectFieldInReport as te } from "../common/report/SelectFieldInReport.es.js";
|
|
8
|
+
import { getRendererValueCrudViewer as O } from "./view/CrudViewerUtil.es.js";
|
|
9
|
+
import { useTranslationLib as le } from "../locale/index.es.js";
|
|
10
|
+
import oe from "../common/select/SelectComponent.es.js";
|
|
11
|
+
import _ from "../common/button/Button.es.js";
|
|
12
|
+
import { PrintButton as se } from "../common/button/PrintButton.es.js";
|
|
13
|
+
const $ = { lg: 6, md: 8, sm: 12, xs: 24 }, ae = { lg: 12, md: 16, sm: 24, xs: 24 };
|
|
14
|
+
function ge({
|
|
14
15
|
fields: i,
|
|
15
|
-
data:
|
|
16
|
-
idField:
|
|
17
|
-
loadingData:
|
|
16
|
+
data: n,
|
|
17
|
+
idField: z,
|
|
18
|
+
loadingData: u,
|
|
18
19
|
onSubmit: T,
|
|
19
|
-
paginateProps:
|
|
20
|
-
size:
|
|
20
|
+
paginateProps: D,
|
|
21
|
+
size: H,
|
|
21
22
|
onClickPrint: h,
|
|
22
23
|
onClickExcelExport: y,
|
|
23
|
-
minusHeight:
|
|
24
|
+
minusHeight: J,
|
|
24
25
|
extraSearchFields: C,
|
|
25
26
|
searchOnMount: I,
|
|
26
|
-
summary:
|
|
27
|
+
summary: K,
|
|
28
|
+
showFieldsSelectingMode: Q = "checkbox"
|
|
27
29
|
}) {
|
|
28
|
-
const { searchable:
|
|
29
|
-
var f, m,
|
|
30
|
+
const { t: U } = le(), { searchable: W, selectable: d, sortable: v, defaultSort: p } = P(() => {
|
|
31
|
+
var f, m, L, j, x;
|
|
30
32
|
const e = [], r = [], o = [];
|
|
31
33
|
let a;
|
|
32
|
-
for (const l of i.filter((
|
|
33
|
-
l.type === "image" || !l.report || ((f = l.report) != null && f.searchable && e.push(l), (m = l.report) != null && m.sortable && (r.push(l), !a && ((
|
|
34
|
+
for (const l of i.filter((Z) => !Z.hidden))
|
|
35
|
+
l.type === "image" || !l.report || ((f = l.report) != null && f.searchable && e.push(l), (m = l.report) != null && m.sortable && (r.push(l), !a && ((L = l.report) != null && L.defaultSort) && (a = l)), l.hideInTable || o.push({
|
|
34
36
|
id: l.name,
|
|
35
37
|
label: l.label,
|
|
36
|
-
lock: (
|
|
37
|
-
alreadySelected: (
|
|
38
|
+
lock: (j = l.report) == null ? void 0 : j.lock,
|
|
39
|
+
alreadySelected: (x = l.report) == null ? void 0 : x.alreadySelected
|
|
38
40
|
}));
|
|
39
41
|
return {
|
|
40
42
|
defaultSort: a,
|
|
@@ -44,7 +46,7 @@ function be({
|
|
|
44
46
|
};
|
|
45
47
|
}, [i]), [S, V] = F(
|
|
46
48
|
[]
|
|
47
|
-
), g =
|
|
49
|
+
), g = ee(
|
|
48
50
|
async ({
|
|
49
51
|
sortBy: e,
|
|
50
52
|
sortByType: r,
|
|
@@ -60,13 +62,13 @@ function be({
|
|
|
60
62
|
), T({ showFields: o, sortBy: f, ...a });
|
|
61
63
|
},
|
|
62
64
|
[i, T]
|
|
63
|
-
), [s] = B.useForm(), [q,
|
|
65
|
+
), [s] = B.useForm(), [q, X] = F(!1), [A, Y] = F(!0);
|
|
64
66
|
return w(() => {
|
|
65
67
|
if (I && A) {
|
|
66
68
|
const e = setTimeout(() => {
|
|
67
69
|
s.validateFields().then((r) => {
|
|
68
70
|
g(r);
|
|
69
|
-
}),
|
|
71
|
+
}), Y(!1);
|
|
70
72
|
}, 200);
|
|
71
73
|
return () => clearTimeout(e);
|
|
72
74
|
}
|
|
@@ -78,20 +80,20 @@ function be({
|
|
|
78
80
|
});
|
|
79
81
|
}, [p, s]), w(() => {
|
|
80
82
|
if (q) {
|
|
81
|
-
const e =
|
|
83
|
+
const e = d.filter((r) => r.alreadySelected).map((r) => r.id);
|
|
82
84
|
V(
|
|
83
85
|
i.filter((r) => e.includes(r.name)).map((r) => ({ ...r, hideInTable: !1 }))
|
|
84
|
-
),
|
|
86
|
+
), X(!1);
|
|
85
87
|
}
|
|
86
|
-
}, [i, q,
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
|
|
88
|
+
}, [i, q, d]), /* @__PURE__ */ c(G, { className: "w-100", direction: "vertical", children: [
|
|
89
|
+
/* @__PURE__ */ c(B, { form: s, layout: "vertical", onFinish: g, children: [
|
|
90
|
+
/* @__PURE__ */ c(M, { gutter: [8, 8], children: [
|
|
91
|
+
W.map((e) => {
|
|
90
92
|
var r, o, a;
|
|
91
93
|
return /* @__PURE__ */ t(
|
|
92
94
|
b,
|
|
93
95
|
{
|
|
94
|
-
...e.grid ??
|
|
96
|
+
...e.grid ?? $,
|
|
95
97
|
style: { alignSelf: "end" },
|
|
96
98
|
children: (r = e.report) != null && r.customRender ? e.report.customRender(s) : e.type === "date" ? /* @__PURE__ */ t(
|
|
97
99
|
N,
|
|
@@ -126,18 +128,19 @@ function be({
|
|
|
126
128
|
e.name
|
|
127
129
|
);
|
|
128
130
|
}),
|
|
129
|
-
!!(
|
|
130
|
-
|
|
131
|
+
!!(d != null && d.length) && /* @__PURE__ */ t(b, { ...ae, children: /* @__PURE__ */ t(
|
|
132
|
+
te,
|
|
131
133
|
{
|
|
132
|
-
items:
|
|
134
|
+
items: d,
|
|
133
135
|
name: "showFields",
|
|
134
136
|
mode: "multiple",
|
|
135
|
-
label: "
|
|
136
|
-
className: "mb-0"
|
|
137
|
+
label: U("str.showFields"),
|
|
138
|
+
className: "mb-0",
|
|
139
|
+
selectingMode: Q
|
|
137
140
|
}
|
|
138
141
|
) }),
|
|
139
|
-
!!v.length && /* @__PURE__ */ t(b, {
|
|
140
|
-
|
|
142
|
+
!!v.length && /* @__PURE__ */ t(b, { ...$, children: /* @__PURE__ */ t(
|
|
143
|
+
oe,
|
|
141
144
|
{
|
|
142
145
|
label: "Sort By",
|
|
143
146
|
name: "sortBy",
|
|
@@ -145,7 +148,7 @@ function be({
|
|
|
145
148
|
nameFieldInArray: "label",
|
|
146
149
|
fieldId: "id",
|
|
147
150
|
className: "mb-0",
|
|
148
|
-
dropdownRender: (e) => /* @__PURE__ */
|
|
151
|
+
dropdownRender: (e) => /* @__PURE__ */ c(k, { children: [
|
|
149
152
|
e,
|
|
150
153
|
/* @__PURE__ */ t(B.Item, { name: "sortByType", noStyle: !0, className: "mt-3", children: /* @__PURE__ */ t(
|
|
151
154
|
R.Group,
|
|
@@ -153,7 +156,7 @@ function be({
|
|
|
153
156
|
className: "w-100",
|
|
154
157
|
defaultValue: "DESC",
|
|
155
158
|
optionType: "button",
|
|
156
|
-
children: /* @__PURE__ */
|
|
159
|
+
children: /* @__PURE__ */ c(M, { children: [
|
|
157
160
|
/* @__PURE__ */ t(b, { xs: 12, children: /* @__PURE__ */ t(
|
|
158
161
|
R,
|
|
159
162
|
{
|
|
@@ -187,66 +190,66 @@ function be({
|
|
|
187
190
|
C ? C(s) : null
|
|
188
191
|
] }),
|
|
189
192
|
/* @__PURE__ */ t(
|
|
190
|
-
|
|
193
|
+
_,
|
|
191
194
|
{
|
|
192
195
|
className: "mt-3",
|
|
193
196
|
type: "primary",
|
|
194
197
|
block: !0,
|
|
195
198
|
htmlType: "submit",
|
|
196
|
-
disabled:
|
|
199
|
+
disabled: u,
|
|
197
200
|
children: "Submit"
|
|
198
201
|
}
|
|
199
202
|
)
|
|
200
203
|
] }),
|
|
201
|
-
/* @__PURE__ */
|
|
204
|
+
/* @__PURE__ */ c(G, { children: [
|
|
202
205
|
!!h && /* @__PURE__ */ t(
|
|
203
|
-
|
|
206
|
+
se,
|
|
204
207
|
{
|
|
205
|
-
disabled:
|
|
208
|
+
disabled: u || !n.length,
|
|
206
209
|
onClick: () => h == null ? void 0 : h({
|
|
207
210
|
tableId: "#crud-table table",
|
|
208
|
-
data:
|
|
211
|
+
data: n,
|
|
209
212
|
fields: S.map((e) => ({
|
|
210
213
|
...e,
|
|
211
|
-
render:
|
|
214
|
+
render: O(e)
|
|
212
215
|
}))
|
|
213
216
|
})
|
|
214
217
|
}
|
|
215
218
|
),
|
|
216
219
|
!!y && /* @__PURE__ */ t(
|
|
217
|
-
|
|
220
|
+
_,
|
|
218
221
|
{
|
|
219
|
-
disabled:
|
|
222
|
+
disabled: u || !n.length,
|
|
220
223
|
onClick: () => y == null ? void 0 : y({
|
|
221
224
|
tableId: "#crud-table table",
|
|
222
|
-
data:
|
|
225
|
+
data: n,
|
|
223
226
|
fields: S.map((e) => ({
|
|
224
227
|
...e,
|
|
225
|
-
render:
|
|
228
|
+
render: O(e)
|
|
226
229
|
}))
|
|
227
230
|
}),
|
|
228
|
-
icon: /* @__PURE__ */ t(
|
|
229
|
-
className: `group ${
|
|
231
|
+
icon: /* @__PURE__ */ t(E, {}),
|
|
232
|
+
className: `group ${u || !n.length ? "" : "crud-excel-export-btn"}`,
|
|
230
233
|
children: "Excel"
|
|
231
234
|
}
|
|
232
235
|
)
|
|
233
236
|
] }),
|
|
234
|
-
|
|
237
|
+
K,
|
|
235
238
|
/* @__PURE__ */ t(
|
|
236
|
-
|
|
239
|
+
re,
|
|
237
240
|
{
|
|
238
|
-
minusHeight:
|
|
239
|
-
data:
|
|
240
|
-
size:
|
|
241
|
+
minusHeight: J,
|
|
242
|
+
data: n,
|
|
243
|
+
size: H,
|
|
241
244
|
fields: S,
|
|
242
|
-
idField:
|
|
243
|
-
loadingData:
|
|
244
|
-
paginateProps:
|
|
245
|
+
idField: z,
|
|
246
|
+
loadingData: u,
|
|
247
|
+
paginateProps: D,
|
|
245
248
|
viewable: !1
|
|
246
249
|
}
|
|
247
250
|
)
|
|
248
251
|
] });
|
|
249
252
|
}
|
|
250
253
|
export {
|
|
251
|
-
|
|
254
|
+
ge as default
|
|
252
255
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const g=require("react/jsx-runtime"),q=require("antd"),t=require("react"),Z=require("../CrudForm.cjs.js"),z=require("../CrudFormWizard.cjs.js"),ee=require("../../locale/index.cjs.js"),B=require("../../util/CrudUtil.cjs.js"),te=require("dayjs"),r=require("../../util/ObjectUtil.cjs.js"),ae=({fields:l,wizard:i,grid:_,fullWidthModal:A,isCreating:N,isUpdating:M,onCreate:V,onUpdate:h,idField:v="id",formBuilder:L,onValuesChange:U},E)=>{const[n]=q.Form.useForm(),{t:S}=ee.useTranslationLib(),[k,y]=t.useState(!1),[p,R]=t.useState("new"),[f,F]=t.useState(),[$,b]=t.useState(),[G,O]=t.useState(!1),[J,P]=t.useState(!1),[K,w]=t.useState(!1),W=t.useCallback(async s=>{var m;const d=i?s:await n.validateFields(),u=l.filter(a=>a.type==="color"),o={};for(const a of u){const c=B.getRealName(a.name,"upsertFieldName"),e=n.getFieldValue(c);r.setValueByPath(o,c,typeof e=="string"?e:(m=e==null?void 0:e.toHexString())==null?void 0:m.toUpperCase())}Object.assign(d,o),f&&h?(await h({...d,[v]:f[v]}),F(void 0)):!f&&V&&await V(d),b(void 0),x(new Map),n.resetFields(),y(!1)},[l,n,v,V,h,f,i]),D=t.useCallback(async s=>{O(s),P(!0)},[]),H=t.useCallback(async()=>{P(!0)},[]),I=t.useCallback(()=>{y(!0),R("new"),n.resetFields(),F(void 0),b(void 0)},[n]),[C,x]=t.useState(new Map),Q=t.useMemo(()=>C.size===0?l:l.map(s=>typeof s.updatable=="function"?{...s,updatable:C.get(B.getRealName(s.name,"name"))??s.updatable}:s),[l,C]),T=t.useCallback(async(s,d=!0,u=!1)=>{try{w(!0),y(!0),R(u?"clone":"update");const o={};for(const a of l){const c=B.getRealName(a.name,"upsertFieldName"),e=r.getValueByPath(s,c);if(u&&a.type==="image"){const j=e;try{const Y=await a.provider.clone(j);r.setValueByPath(o,c,Y);continue}catch{continue}}a.type==="date"||a.type==="time"?e&&r.setValueByPath(o,c,te(e)):a.type==="select"?a.multiple&&Array.isArray(e)?r.setValueByPath(o,c,e.map(j=>j[a.innerFieldId??"id"])):e&&typeof e=="object"?r.setValueByPath(o,c,e[a.innerFieldId??"id"]):(e&&typeof e=="string"||typeof e=="number")&&r.setValueByPath(o,c,e):r.setValueByPath(o,c,e)}n.setFieldsValue(o);const m=new Map;for(const a of l)typeof a.updatable=="function"&&m.set(B.getRealName(a.name,"name"),a.updatable(s));x(m),b(o),d&&F(s)}finally{w(!1)}},[l,n]);t.useImperativeHandle(E,()=>({create:I,update:T}),[I,T]),t.useEffect(()=>{k&&(O(!1),P(!1))},[k]);const X=t.useCallback(async()=>{x(new Map);try{if(p==="clone"){const s=i?f:n.getFieldsValue(),d=l.filter(u=>u.type==="image");for(const u of d)s[u.name]&&u.provider.delete(s[u.name])}}finally{}i||n.resetFields(),b(void 0),F(void 0),y(!1)},[p,i,n,f,l]);return g.jsx(q.Modal,{width:A?"100%":void 0,title:S("str."+(p??"new")),open:k,confirmLoading:N||M,okText:S("str."+(p==="update"?"update":"save")),cancelText:S("str.cancel"),cancelButtonProps:{disabled:J,hidden:!!i},okButtonProps:{disabled:G,hidden:!!i},onCancel:X,onOk:()=>W(),destroyOnHidden:!0,children:g.jsxs(q.Spin,{spinning:K,children:[i?null:g.jsx(Z.CrudForm,{purpose:p,fields:Q,form:n,formBuilder:L,grid:_,onDeleteFile:H,onUploadFile:D,onValuesChange:U}),i&&g.jsx(z,{submitting:N||M,className:"mt-2",onSave:W,updatingValue:$,fields:l,onDeleteFile:H,onUploadFile:D,purpose:p,wizard:i,onValuesChange:U})]})})},se=t.forwardRef(ae);module.exports=se;
|
|
@@ -1,154 +1,171 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Form as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { CrudForm as
|
|
5
|
-
import
|
|
6
|
-
import { useTranslationLib as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { setValueByPath as
|
|
10
|
-
const
|
|
11
|
-
fields:
|
|
12
|
-
wizard:
|
|
13
|
-
grid:
|
|
14
|
-
fullWidthModal:
|
|
15
|
-
isCreating:
|
|
16
|
-
isUpdating:
|
|
17
|
-
onCreate:
|
|
18
|
-
onUpdate:
|
|
1
|
+
import { jsx as x, jsxs as Z } from "react/jsx-runtime";
|
|
2
|
+
import { Form as z, Modal as ee, Spin as te } from "antd";
|
|
3
|
+
import { forwardRef as oe, useState as c, useCallback as m, useMemo as ae, useImperativeHandle as ne, useEffect as le } from "react";
|
|
4
|
+
import { CrudForm as se } from "../CrudForm.es.js";
|
|
5
|
+
import ie from "../CrudFormWizard.es.js";
|
|
6
|
+
import { useTranslationLib as re } from "../../locale/index.es.js";
|
|
7
|
+
import v from "../../util/CrudUtil.es.js";
|
|
8
|
+
import ce from "dayjs";
|
|
9
|
+
import { setValueByPath as d, getValueByPath as ue } from "../../util/ObjectUtil.es.js";
|
|
10
|
+
const de = ({
|
|
11
|
+
fields: n,
|
|
12
|
+
wizard: s,
|
|
13
|
+
grid: A,
|
|
14
|
+
fullWidthModal: L,
|
|
15
|
+
isCreating: C,
|
|
16
|
+
isUpdating: j,
|
|
17
|
+
onCreate: B,
|
|
18
|
+
onUpdate: V,
|
|
19
19
|
idField: h = "id",
|
|
20
|
-
formBuilder:
|
|
21
|
-
onValuesChange:
|
|
22
|
-
},
|
|
23
|
-
const [
|
|
24
|
-
async (
|
|
25
|
-
var
|
|
26
|
-
const
|
|
27
|
-
for (const
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
typeof
|
|
20
|
+
formBuilder: E,
|
|
21
|
+
onValuesChange: R
|
|
22
|
+
}, $) => {
|
|
23
|
+
const [a] = z.useForm(), { t: N } = re(), [k, y] = c(!1), [p, w] = c("new"), [f, g] = c(), [q, b] = c(), [G, O] = c(!1), [J, M] = c(!1), [K, W] = c(!1), D = m(
|
|
24
|
+
async (o) => {
|
|
25
|
+
var F;
|
|
26
|
+
const u = s ? o : await a.validateFields(), i = n.filter((t) => t.type === "color"), l = {};
|
|
27
|
+
for (const t of i) {
|
|
28
|
+
const r = v.getRealName(t.name, "upsertFieldName"), e = a.getFieldValue(r);
|
|
29
|
+
d(
|
|
30
|
+
l,
|
|
31
|
+
r,
|
|
32
|
+
typeof e == "string" ? e : (F = e == null ? void 0 : e.toHexString()) == null ? void 0 : F.toUpperCase()
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
|
-
Object.assign(
|
|
36
|
-
...
|
|
37
|
-
[h]:
|
|
38
|
-
}), g(void 0)) : !
|
|
35
|
+
Object.assign(u, l), f && V ? (await V({
|
|
36
|
+
...u,
|
|
37
|
+
[h]: f[h]
|
|
38
|
+
}), g(void 0)) : !f && B && await B(u), b(void 0), S(/* @__PURE__ */ new Map()), a.resetFields(), y(!1);
|
|
39
39
|
},
|
|
40
|
-
[
|
|
41
|
-
), H =
|
|
42
|
-
|
|
43
|
-
}, []), I =
|
|
44
|
-
|
|
45
|
-
}, []),
|
|
46
|
-
y(!0),
|
|
47
|
-
}, [
|
|
48
|
-
|
|
40
|
+
[n, a, h, B, V, f, s]
|
|
41
|
+
), H = m(async (o) => {
|
|
42
|
+
O(o), M(!0);
|
|
43
|
+
}, []), I = m(async () => {
|
|
44
|
+
M(!0);
|
|
45
|
+
}, []), T = m(() => {
|
|
46
|
+
y(!0), w("new"), a.resetFields(), g(void 0), b(void 0);
|
|
47
|
+
}, [a]), [P, S] = c(/* @__PURE__ */ new Map()), Q = ae(() => P.size === 0 ? n : n.map((o) => typeof o.updatable == "function" ? {
|
|
48
|
+
...o,
|
|
49
|
+
updatable: P.get(v.getRealName(o.name, "name")) ?? o.updatable
|
|
50
|
+
} : o), [n, P]), _ = m(
|
|
51
|
+
async (o, u = !0, i = !1) => {
|
|
49
52
|
try {
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
for (const
|
|
53
|
-
const
|
|
54
|
-
|
|
53
|
+
W(!0), y(!0), w(i ? "clone" : "update");
|
|
54
|
+
const l = {};
|
|
55
|
+
for (const t of n) {
|
|
56
|
+
const r = v.getRealName(
|
|
57
|
+
t.name,
|
|
55
58
|
"upsertFieldName"
|
|
56
|
-
), e =
|
|
57
|
-
if (
|
|
58
|
-
const
|
|
59
|
+
), e = ue(o, r);
|
|
60
|
+
if (i && t.type === "image") {
|
|
61
|
+
const U = e;
|
|
59
62
|
try {
|
|
60
|
-
const
|
|
61
|
-
|
|
63
|
+
const Y = await t.provider.clone(U);
|
|
64
|
+
d(l, r, Y);
|
|
62
65
|
continue;
|
|
63
66
|
} catch {
|
|
64
67
|
continue;
|
|
65
68
|
}
|
|
66
69
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
t.type === "date" || t.type === "time" ? e && d(l, r, ce(e)) : t.type === "select" ? t.multiple && Array.isArray(e) ? d(
|
|
71
|
+
l,
|
|
72
|
+
r,
|
|
73
|
+
e.map((U) => U[t.innerFieldId ?? "id"])
|
|
74
|
+
) : e && typeof e == "object" ? d(
|
|
75
|
+
l,
|
|
76
|
+
r,
|
|
77
|
+
e[t.innerFieldId ?? "id"]
|
|
78
|
+
) : (e && typeof e == "string" || typeof e == "number") && d(l, r, e) : d(l, r, e);
|
|
70
79
|
}
|
|
71
|
-
|
|
80
|
+
a.setFieldsValue(l);
|
|
81
|
+
const F = /* @__PURE__ */ new Map();
|
|
82
|
+
for (const t of n)
|
|
83
|
+
typeof t.updatable == "function" && F.set(
|
|
84
|
+
v.getRealName(t.name, "name"),
|
|
85
|
+
t.updatable(o)
|
|
86
|
+
);
|
|
87
|
+
S(F), b(l), u && g(o);
|
|
72
88
|
} finally {
|
|
73
|
-
|
|
89
|
+
W(!1);
|
|
74
90
|
}
|
|
75
91
|
},
|
|
76
|
-
[
|
|
92
|
+
[n, a]
|
|
77
93
|
);
|
|
78
|
-
|
|
79
|
-
|
|
94
|
+
ne(
|
|
95
|
+
$,
|
|
80
96
|
() => ({
|
|
81
|
-
create:
|
|
82
|
-
update:
|
|
97
|
+
create: T,
|
|
98
|
+
update: _
|
|
83
99
|
}),
|
|
84
|
-
[
|
|
85
|
-
),
|
|
86
|
-
|
|
87
|
-
}, [
|
|
88
|
-
const
|
|
100
|
+
[T, _]
|
|
101
|
+
), le(() => {
|
|
102
|
+
k && (O(!1), M(!1));
|
|
103
|
+
}, [k]);
|
|
104
|
+
const X = m(async () => {
|
|
105
|
+
S(/* @__PURE__ */ new Map());
|
|
89
106
|
try {
|
|
90
|
-
if (
|
|
91
|
-
const
|
|
92
|
-
for (const
|
|
93
|
-
i
|
|
107
|
+
if (p === "clone") {
|
|
108
|
+
const o = s ? f : a.getFieldsValue(), u = n.filter((i) => i.type === "image");
|
|
109
|
+
for (const i of u)
|
|
110
|
+
o[i.name] && i.provider.delete(o[i.name]);
|
|
94
111
|
}
|
|
95
112
|
} finally {
|
|
96
113
|
}
|
|
97
|
-
|
|
98
|
-
}, [
|
|
99
|
-
return /* @__PURE__ */
|
|
100
|
-
|
|
114
|
+
s || a.resetFields(), b(void 0), g(void 0), y(!1);
|
|
115
|
+
}, [p, s, a, f, n]);
|
|
116
|
+
return /* @__PURE__ */ x(
|
|
117
|
+
ee,
|
|
101
118
|
{
|
|
102
|
-
width:
|
|
103
|
-
title:
|
|
104
|
-
open:
|
|
105
|
-
confirmLoading:
|
|
106
|
-
okText:
|
|
107
|
-
cancelText:
|
|
119
|
+
width: L ? "100%" : void 0,
|
|
120
|
+
title: N("str." + (p ?? "new")),
|
|
121
|
+
open: k,
|
|
122
|
+
confirmLoading: C || j,
|
|
123
|
+
okText: N("str." + (p === "update" ? "update" : "save")),
|
|
124
|
+
cancelText: N("str.cancel"),
|
|
108
125
|
cancelButtonProps: {
|
|
109
|
-
disabled:
|
|
110
|
-
hidden: !!
|
|
126
|
+
disabled: J,
|
|
127
|
+
hidden: !!s
|
|
111
128
|
},
|
|
112
129
|
okButtonProps: {
|
|
113
|
-
disabled:
|
|
114
|
-
hidden: !!
|
|
130
|
+
disabled: G,
|
|
131
|
+
hidden: !!s
|
|
115
132
|
},
|
|
116
|
-
onCancel:
|
|
133
|
+
onCancel: X,
|
|
117
134
|
onOk: () => D(),
|
|
118
135
|
destroyOnHidden: !0,
|
|
119
|
-
children: /* @__PURE__ */
|
|
120
|
-
|
|
121
|
-
|
|
136
|
+
children: /* @__PURE__ */ Z(te, { spinning: K, children: [
|
|
137
|
+
s ? null : /* @__PURE__ */ x(
|
|
138
|
+
se,
|
|
122
139
|
{
|
|
123
|
-
purpose:
|
|
124
|
-
fields:
|
|
125
|
-
form:
|
|
126
|
-
formBuilder:
|
|
127
|
-
grid:
|
|
140
|
+
purpose: p,
|
|
141
|
+
fields: Q,
|
|
142
|
+
form: a,
|
|
143
|
+
formBuilder: E,
|
|
144
|
+
grid: A,
|
|
128
145
|
onDeleteFile: I,
|
|
129
146
|
onUploadFile: H,
|
|
130
|
-
onValuesChange:
|
|
147
|
+
onValuesChange: R
|
|
131
148
|
}
|
|
132
149
|
),
|
|
133
|
-
|
|
134
|
-
|
|
150
|
+
s && /* @__PURE__ */ x(
|
|
151
|
+
ie,
|
|
135
152
|
{
|
|
136
|
-
submitting:
|
|
153
|
+
submitting: C || j,
|
|
137
154
|
className: "mt-2",
|
|
138
155
|
onSave: D,
|
|
139
|
-
updatingValue:
|
|
140
|
-
fields:
|
|
156
|
+
updatingValue: q,
|
|
157
|
+
fields: n,
|
|
141
158
|
onDeleteFile: I,
|
|
142
159
|
onUploadFile: H,
|
|
143
|
-
purpose:
|
|
144
|
-
wizard:
|
|
145
|
-
onValuesChange:
|
|
160
|
+
purpose: p,
|
|
161
|
+
wizard: s,
|
|
162
|
+
onValuesChange: R
|
|
146
163
|
}
|
|
147
164
|
)
|
|
148
165
|
] })
|
|
149
166
|
}
|
|
150
167
|
);
|
|
151
|
-
},
|
|
168
|
+
}, Ve = oe(de);
|
|
152
169
|
export {
|
|
153
|
-
|
|
170
|
+
Ve as default
|
|
154
171
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e={str:{delete:"Delete",clone:"Clone",update:"Update",new:"New",back:"Back",next:"Next",save:"Save",import:"Import",cancel:"Cancel",print:"Print",hide:"Hide",no:"No",action:"Action",remove:"Remove",view:"View",ok:"Ok",yes:"Yes",warning:"Warning",success:"Success",error:"Error",retry:"Retry",previous:"Previous",unhide:"Unhide",downloadCsvTemplate:"Download CSV Template",importCsvFile:"Import CSV File",export:"Export",goBack:"Go Back",refresh:"Refresh",fileUploadMessage1:"Drag file here or ",fileUploadMessage2:"Click to Upload",rotateLeft:"Rotate Left",rotateRight:"Rotate Right",flipHorizontal:"Flip Horizontal",flipVertical:"Flip Vertical",skipCrop:"Skip Crop"},err:{save:"An error occurred while saving",validation:{required:"is required",minLength8:"must be at least 8 characters",percentage:"must be a percentage",maximumValueExceeded:"must be less than %maxValue%",invalidNic:"must be a valid NIC",invalid:"must be a valid"},notFound:"Not Found"},message:{loading:{saving:"Saving"},uploadButtonText:"Click to Upload"},qus:{importWithIssues:"Some fields have issues. Do you want to proceed with the import?",doYouWantToDelete:"Do you want to delete?",doYouWantToHide:"Do you want to hide?",doYouWantToUnhide:"Do you want to unhide?"}};module.exports=e;
|
|
1
|
+
"use strict";const e={str:{delete:"Delete",clone:"Clone",update:"Update",new:"New",back:"Back",next:"Next",save:"Save",import:"Import",cancel:"Cancel",print:"Print",hide:"Hide",no:"No",action:"Action",remove:"Remove",view:"View",ok:"Ok",yes:"Yes",warning:"Warning",success:"Success",error:"Error",retry:"Retry",previous:"Previous",unhide:"Unhide",downloadCsvTemplate:"Download CSV Template",importCsvFile:"Import CSV File",export:"Export",goBack:"Go Back",refresh:"Refresh",fileUploadMessage1:"Drag file here or ",fileUploadMessage2:"Click to Upload",rotateLeft:"Rotate Left",rotateRight:"Rotate Right",flipHorizontal:"Flip Horizontal",flipVertical:"Flip Vertical",skipCrop:"Skip Crop",showFields:"Show Fields"},err:{save:"An error occurred while saving",validation:{required:"is required",minLength8:"must be at least 8 characters",percentage:"must be a percentage",maximumValueExceeded:"must be less than %maxValue%",invalidNic:"must be a valid NIC",invalid:"must be a valid"},notFound:"Not Found"},message:{loading:{saving:"Saving"},uploadButtonText:"Click to Upload"},qus:{importWithIssues:"Some fields have issues. Do you want to proceed with the import?",doYouWantToDelete:"Do you want to delete?",doYouWantToHide:"Do you want to hide?",doYouWantToUnhide:"Do you want to unhide?"}};module.exports=e;
|