@kingteza/crud-component 1.0.28 → 1.0.29
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/common/DatePicker/DatePicker.cjs +1 -0
- package/{components/common → common}/DatePicker/DatePicker.js +1 -1
- package/common/DatePicker/TimePicker.cjs +1 -0
- package/{components/common → common}/DatePicker/TimePicker.js +1 -1
- package/common/button/Button.cjs +1 -0
- package/{components/common → common}/button/Button.js +1 -1
- package/common/button/CloneButtonTable.cjs +1 -0
- package/{components/common → common}/button/CloneButtonTable.js +1 -1
- package/common/button/DeleteButtonTable.cjs +1 -0
- package/{components/common → common}/button/DeleteButtonTable.js +1 -1
- package/common/button/ExportButton.cjs +1 -0
- package/{components/common → common}/button/ExportButton.js +1 -1
- package/common/button/HideButtonTable.cjs +1 -0
- package/{components/common → common}/button/HideButtonTable.js +1 -1
- package/common/button/ImportButton.cjs +1 -0
- package/{components/common → common}/button/ImportButton.js +1 -1
- package/common/button/NewButton.cjs +1 -0
- package/{components/common → common}/button/NewButton.js +1 -1
- package/common/button/PrintButton.cjs +1 -0
- package/{components/common → common}/button/PrintButton.js +1 -1
- package/common/button/RefreshButton.cjs +1 -0
- package/{components/common → common}/button/RefreshButton.js +1 -1
- package/common/button/UnHideButton.cjs +1 -0
- package/{components/common → common}/button/UnHideButton.js +1 -1
- package/common/button/UpdateButtonTable.cjs +1 -0
- package/{components/common → common}/button/UpdateButtonTable.js +1 -1
- package/common/button/ViewButtonTable.cjs +1 -0
- package/{components/common → common}/button/ViewButtonTable.js +1 -1
- package/common/description/DescList.cjs +1 -0
- package/{components/common → common}/description/DescList.js +1 -1
- package/common/index.cjs +1 -1
- package/common/index.js +36 -36
- package/common/loading/LoadingIndicator.cjs +1 -0
- package/{components/common → common}/loading/LoadingIndicator.js +1 -1
- package/common/picker/ImagePicker.cjs +1 -0
- package/{components/common → common}/picker/ImagePicker.js +3 -3
- package/common/select/SelectComponent.cjs +1 -0
- package/{components/common → common}/select/SelectComponent.js +1 -1
- package/common/tab/TabViewWithRoute.cjs +1 -0
- package/{components/common → common}/tab/TabViewWithRoute.js +1 -1
- package/common/tag/StatusTag.cjs +1 -0
- package/{components/common → common}/tag/StatusTag.js +1 -1
- package/common/text-field/NumberField.cjs +1 -0
- package/{components/common → common}/text-field/NumberField.js +1 -1
- package/common/text-field/PhoneNumberField.cjs +1 -0
- package/{components/common → common}/text-field/PhoneNumberField.js +1 -1
- package/common/text-field/TextArea.cjs +1 -0
- package/{components/common → common}/text-field/TextArea.js +1 -1
- package/common/text-field/TextField.cjs +1 -0
- package/{components/common → common}/text-field/TextField.js +1 -1
- package/common/wizard/WizardResult.cjs +1 -0
- package/{components/common → common}/wizard/WizardResult.js +1 -1
- package/index.cjs +1 -1
- package/index.d.ts +2 -2
- package/index.js +8 -8
- package/package.json +5 -5
- package/components/common/DatePicker/DatePicker.cjs +0 -1
- package/components/common/DatePicker/TimePicker.cjs +0 -1
- package/components/common/button/Button.cjs +0 -1
- package/components/common/button/CloneButtonTable.cjs +0 -1
- package/components/common/button/DeleteButtonTable.cjs +0 -1
- package/components/common/button/ExportButton.cjs +0 -1
- package/components/common/button/HideButtonTable.cjs +0 -1
- package/components/common/button/ImportButton.cjs +0 -1
- package/components/common/button/NewButton.cjs +0 -1
- package/components/common/button/PrintButton.cjs +0 -1
- package/components/common/button/RefreshButton.cjs +0 -1
- package/components/common/button/UnHideButton.cjs +0 -1
- package/components/common/button/UpdateButtonTable.cjs +0 -1
- package/components/common/button/ViewButtonTable.cjs +0 -1
- package/components/common/description/DescList.cjs +0 -1
- package/components/common/loading/LoadingIndicator.cjs +0 -1
- package/components/common/picker/ImagePicker.cjs +0 -1
- package/components/common/select/SelectComponent.cjs +0 -1
- package/components/common/tab/TabViewWithRoute.cjs +0 -1
- package/components/common/tag/StatusTag.cjs +0 -1
- package/components/common/text-field/NumberField.cjs +0 -1
- package/components/common/text-field/PhoneNumberField.cjs +0 -1
- package/components/common/text-field/TextArea.cjs +0 -1
- package/components/common/text-field/TextField.cjs +0 -1
- package/components/common/wizard/WizardResult.cjs +0 -1
- package/components/crud/CrudComponent.cjs +0 -1
- package/components/crud/CrudComponent.d.ts +0 -237
- package/components/crud/CrudComponent.js +0 -210
- package/components/crud/CrudField.cjs +0 -1
- package/components/crud/CrudField.d.ts +0 -4
- package/components/crud/CrudField.js +0 -459
- package/components/crud/CrudForm.cjs +0 -1
- package/components/crud/CrudForm.d.ts +0 -14
- package/components/crud/CrudForm.js +0 -91
- package/components/crud/CrudFormWizard.cjs +0 -1
- package/components/crud/CrudFormWizard.d.ts +0 -14
- package/components/crud/CrudFormWizard.js +0 -140
- package/components/crud/CrudReportComponent.cjs +0 -4
- package/components/crud/CrudReportComponent.d.ts +0 -44
- package/components/crud/CrudReportComponent.js +0 -255
- package/components/crud/CrudSearchComponent.cjs +0 -1
- package/components/crud/CrudSearchComponent.d.ts +0 -21
- package/components/crud/CrudSearchComponent.js +0 -95
- package/components/crud/FileCrudField.cjs +0 -1
- package/components/crud/FileCrudField.d.ts +0 -25
- package/components/crud/FileCrudField.js +0 -220
- package/components/crud/ImageCrudField.cjs +0 -1
- package/components/crud/ImageCrudField.d.ts +0 -38
- package/components/crud/ImageCrudField.js +0 -113
- package/components/crud/import/CrudImportButton.cjs +0 -1
- package/components/crud/import/CrudImportButton.d.ts +0 -3
- package/components/crud/import/CrudImportButton.js +0 -31
- package/components/crud/import/CrudImportComponent.cjs +0 -2
- package/components/crud/import/CrudImportComponent.d.ts +0 -14
- package/components/crud/import/CrudImportComponent.js +0 -223
- package/components/crud/index.d.ts +0 -15
- package/components/crud/view/CrudDecListView.cjs +0 -1
- package/components/crud/view/CrudDecListView.d.ts +0 -14
- package/components/crud/view/CrudDecListView.js +0 -42
- package/components/crud/view/CrudViewer.cjs +0 -1
- package/components/crud/view/CrudViewer.d.ts +0 -43
- package/components/crud/view/CrudViewer.js +0 -217
- package/components/crud/view/CrudViewerUtil.cjs +0 -1
- package/components/crud/view/CrudViewerUtil.d.ts +0 -2
- package/components/crud/view/CrudViewerUtil.js +0 -57
- package/components/crud/view/index.d.ts +0 -5
- /package/{components/common → common}/DatePicker/DatePicker.d.ts +0 -0
- /package/{components/common → common}/DatePicker/TimePicker.d.ts +0 -0
- /package/{components/common → common}/DatePicker/index.d.ts +0 -0
- /package/{components/common → common}/appearance/Hider.cjs +0 -0
- /package/{components/common → common}/appearance/Hider.d.ts +0 -0
- /package/{components/common → common}/appearance/Hider.js +0 -0
- /package/{components/common → common}/appearance/index.d.ts +0 -0
- /package/{components/common → common}/button/Button.d.ts +0 -0
- /package/{components/common → common}/button/CloneButtonTable.d.ts +0 -0
- /package/{components/common → common}/button/DeleteButtonTable.d.ts +0 -0
- /package/{components/common → common}/button/ExportButton.d.ts +0 -0
- /package/{components/common → common}/button/HideButtonTable.d.ts +0 -0
- /package/{components/common → common}/button/ImportButton.d.ts +0 -0
- /package/{components/common → common}/button/NewButton.d.ts +0 -0
- /package/{components/common → common}/button/PrintButton.d.ts +0 -0
- /package/{components/common → common}/button/RefreshButton.d.ts +0 -0
- /package/{components/common → common}/button/UnHideButton.d.ts +0 -0
- /package/{components/common → common}/button/UpdateButtonTable.d.ts +0 -0
- /package/{components/common → common}/button/ViewButtonTable.d.ts +0 -0
- /package/{components/common → common}/button/index.d.ts +0 -0
- /package/{components/common → common}/check-box/CheckBox.cjs +0 -0
- /package/{components/common → common}/check-box/CheckBox.d.ts +0 -0
- /package/{components/common → common}/check-box/CheckBox.js +0 -0
- /package/{components/common → common}/check-box/index.d.ts +0 -0
- /package/{components/common → common}/description/DescList.d.ts +0 -0
- /package/{components/common → common}/description/DescriptionComponent.d.ts +0 -0
- /package/{components/common → common}/description/index.d.ts +0 -0
- /package/{components/common → common}/index.d.ts +0 -0
- /package/{components/common → common}/layout/VerticalSpace.cjs +0 -0
- /package/{components/common → common}/layout/VerticalSpace.d.ts +0 -0
- /package/{components/common → common}/layout/VerticalSpace.js +0 -0
- /package/{components/common → common}/layout/index.d.ts +0 -0
- /package/{components/common → common}/loading/LoadingIndicator.d.ts +0 -0
- /package/{components/common → common}/loading/index.d.ts +0 -0
- /package/{components/common → common}/picker/ImagePicker.d.ts +0 -0
- /package/{components/common → common}/picker/index.d.ts +0 -0
- /package/{components/common → common}/radio/RadioGroupComponent.cjs +0 -0
- /package/{components/common → common}/radio/RadioGroupComponent.d.ts +0 -0
- /package/{components/common → common}/radio/RadioGroupComponent.js +0 -0
- /package/{components/common → common}/radio/index.d.ts +0 -0
- /package/{components/common → common}/report/SelectFieldInReport.cjs +0 -0
- /package/{components/common → common}/report/SelectFieldInReport.d.ts +0 -0
- /package/{components/common → common}/report/SelectFieldInReport.js +0 -0
- /package/{components/common → common}/report/index.d.ts +0 -0
- /package/{components/common → common}/select/CustomSelectOption.cjs +0 -0
- /package/{components/common → common}/select/CustomSelectOption.d.ts +0 -0
- /package/{components/common → common}/select/CustomSelectOption.js +0 -0
- /package/{components/common → common}/select/SelectComponent.d.ts +0 -0
- /package/{components/common → common}/select/index.d.ts +0 -0
- /package/{components/common → common}/show-more/index.cjs +0 -0
- /package/{components/common → common}/show-more/index.d.ts +0 -0
- /package/{components/common → common}/show-more/index.js +0 -0
- /package/{components/common → common}/tab/TabViewWithRoute.d.ts +0 -0
- /package/{components/common → common}/tab/index.d.ts +0 -0
- /package/{components/common → common}/table/index.d.ts +0 -0
- /package/{components/common → common}/table/table.cjs +0 -0
- /package/{components/common → common}/table/table.d.ts +0 -0
- /package/{components/common → common}/table/table.js +0 -0
- /package/{components/common → common}/tag/StatusTag.d.ts +0 -0
- /package/{components/common → common}/tag/index.d.ts +0 -0
- /package/{components/common → common}/text/index.cjs +0 -0
- /package/{components/common → common}/text/index.d.ts +0 -0
- /package/{components/common → common}/text/index.js +0 -0
- /package/{components/common → common}/text/title/TitleWithHeadTitle.d.ts +0 -0
- /package/{components/common → common}/text/title/index.cjs +0 -0
- /package/{components/common → common}/text/title/index.d.ts +0 -0
- /package/{components/common → common}/text/title/index.js +0 -0
- /package/{components/common → common}/text-field/NumberField.d.ts +0 -0
- /package/{components/common → common}/text-field/PhoneNumberField.d.ts +0 -0
- /package/{components/common → common}/text-field/TextArea.d.ts +0 -0
- /package/{components/common → common}/text-field/TextField.d.ts +0 -0
- /package/{components/common → common}/text-field/index.d.ts +0 -0
- /package/{components/common → common}/tooltip/TooltipComponent.cjs +0 -0
- /package/{components/common → common}/tooltip/TooltipComponent.d.ts +0 -0
- /package/{components/common → common}/tooltip/TooltipComponent.js +0 -0
- /package/{components/common → common}/tooltip/index.d.ts +0 -0
- /package/{components/common → common}/wizard/WizardResult.d.ts +0 -0
- /package/{components/common → common}/wizard/WizardViewForm.cjs +0 -0
- /package/{components/common → common}/wizard/WizardViewForm.d.ts +0 -0
- /package/{components/common → common}/wizard/WizardViewForm.js +0 -0
- /package/{components/common → common}/wizard/index.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const d=require("react/jsx-runtime"),s=require("antd"),t=require("dayjs"),E=require("dayjs/plugin/advancedFormat"),F=require("dayjs/plugin/customParseFormat"),I=require("dayjs/plugin/localeData"),v=require("dayjs/plugin/weekday"),S=require("dayjs/plugin/weekOfYear"),T=require("dayjs/plugin/weekYear"),Y=require("../../locale/hooks/translation-constants.cjs"),$=require("react"),L=require("react-i18next");t.extend(F);t.extend(E);t.extend(v);t.extend(I);t.extend(S);t.extend(T);const M=({type:_,required:q,label:o,rules:x=[],placeholder:a,disabledPastDays:c=!1,disableToday:i=!1,onEnter:z,disabled:f,nextFocus:B,onChange:r,range:m,showTime:l,disabledFutureDays:u,picker:k,defaultValue:O,value:y,format:P,autoComplete:G="off",enabledDates:H=[],renderExtraFooter:j,...p})=>{const{t:w}=L.useTranslation(Y.TRANSLATION_NAMESPACE),A=m?s.DatePicker.RangePicker:s.DatePicker,D=$.useCallback(e=>{if(!e)return!1;const n=t(),N=c&&e<n.startOf("day"),R=u&&e>n.endOf("day"),C=i&&e<n.endOf("day")&&n.startOf("day")<e;return N||R||C},[c,u,i]);return d.jsx(s.Form.Item,{...p,label:o,rules:[{required:q,message:`${o??a??""} ${w("err.validation.required")}`},...x],children:d.jsx(A,{renderExtraFooter:j,value:y,picker:k,defaultValue:O,format:P,onChange:e=>r==null?void 0:r(e),disabledDate:D,disabled:f,className:"w-100",placeholder:a,showTime:l})})};module.exports=M;
|
|
@@ -7,7 +7,7 @@ import S from "dayjs/plugin/localeData";
|
|
|
7
7
|
import T from "dayjs/plugin/weekday";
|
|
8
8
|
import Y from "dayjs/plugin/weekOfYear";
|
|
9
9
|
import $ from "dayjs/plugin/weekYear";
|
|
10
|
-
import { TRANSLATION_NAMESPACE as q } from "
|
|
10
|
+
import { TRANSLATION_NAMESPACE as q } from "../../locale/hooks/translation-constants.js";
|
|
11
11
|
import { useCallback as L } from "react";
|
|
12
12
|
import { useTranslation as M } from "react-i18next";
|
|
13
13
|
e.extend(R);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const l=require("react/jsx-runtime"),c=require("antd"),C=require("dayjs"),q=require("react"),F=require("react-i18next"),M=require("../../locale/hooks/translation-constants.cjs"),$=({type:v,required:T,label:r,rules:f=[],placeholder:t,disabledPast:i=!1,disableCurrent:m=!1,onEnter:w,disabled:x,use12Hours:k,nextFocus:D,onChange:s,range:n,disabledFuture:a,defaultValue:j,value:p,format:A,autoComplete:H="off",renderExtraFooter:N,...P})=>{const{t:R}=F.useTranslation(M.TRANSLATION_NAMESPACE),u=q.useMemo(()=>t||(n?["From","To"]:"Select time"),[t,n]);console.log(u);const y=n?c.TimePicker.RangePicker:c.TimePicker,E=q.useCallback(e=>{if(!e)return!1;const o=C(),I=i&&e<o,S=a&&e>o,d=m&&e<o&&o<e;return I||S||d},[m,a,i]);return l.jsx(c.Form.Item,{...P,label:r,rules:[{required:T,message:`${r??t??""} ${R("err.validation.required")}`},...f],children:l.jsx(y,{use12Hours:k,renderExtraFooter:N,value:p,defaultValue:j,format:A,onChange:e=>s==null?void 0:s(e),disabledDate:E,disabled:x,className:"w-100",placeholder:u})})};module.exports=$;
|
|
@@ -3,7 +3,7 @@ import { TimePicker as a, Form as M } from "antd";
|
|
|
3
3
|
import R from "dayjs";
|
|
4
4
|
import { useMemo as $, useCallback as q } from "react";
|
|
5
5
|
import { useTranslation as v } from "react-i18next";
|
|
6
|
-
import { TRANSLATION_NAMESPACE as w } from "
|
|
6
|
+
import { TRANSLATION_NAMESPACE as w } from "../../locale/hooks/translation-constants.js";
|
|
7
7
|
const K = ({
|
|
8
8
|
type: C,
|
|
9
9
|
required: l,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const y=require("react/jsx-runtime"),f=require("antd"),g=require("../../locale/hooks/translation-constants.cjs"),l=require("react"),A=require("react-i18next");;/* empty css */const d=require("react-router-dom"),q=({className:i,to:t,onClick:n,tooltip:o,ref:x,...r})=>{var a;const{t:e}=A.useTranslation(g.TRANSLATION_NAMESPACE);let s;try{s=(a=d.useNavigate)==null?void 0:a.call(d)}catch(u){console.error(u)}const c=l.useMemo(()=>y.jsx(f.Button,{onClick:n||(t&&s?()=>s(t):void 0),className:i,...r,children:r.children||e(`button.${r.type}`)}),[i,s,n,r,e,t]);return o?y.jsx(f.Tooltip,{title:o,children:c}):c},j=({className:i,to:t,onClick:n,tooltip:o,ref:x,...r})=>{let e;try{e=d.useNavigate()}catch(h){console.error(h)}const[s,c]=l.useState(!1),a=l.useCallback(async h=>{try{return c(!0),await n(h)}finally{c(!1)}},[n]),u=l.useMemo(()=>y.jsx(f.Button,{loading:s||r.loading,onClick:n?a:t?()=>{e?e==null||e(t):window.location.href=t}:void 0,className:i,...r}),[a,i,s,e,n,r,t]);return o?y.jsx(f.Tooltip,{title:o,children:u}):u};q.Async=j;module.exports=q;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as f } from "react/jsx-runtime";
|
|
2
2
|
import { Button as u, Tooltip as d } from "antd";
|
|
3
|
-
import { TRANSLATION_NAMESPACE as g } from "
|
|
3
|
+
import { TRANSLATION_NAMESPACE as g } from "../../locale/hooks/translation-constants.js";
|
|
4
4
|
import { useMemo as y, useState as b, useCallback as T } from "react";
|
|
5
5
|
import { useTranslation as v } from "react-i18next";
|
|
6
6
|
/* empty css */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),s=require("@ant-design/icons"),r=require("./Button.cjs"),i=require("react-i18next"),c=require("../../locale/hooks/translation-constants.cjs");function u({value:n,onClick:e}){const{t:o}=i.useTranslation(c.TRANSLATION_NAMESPACE);return t.jsx(r,{type:"link",onClick:()=>e(n),icon:t.jsx(s.CopyOutlined,{}),tooltip:o("clone")})}module.exports=u;
|
|
@@ -2,7 +2,7 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { CopyOutlined as i } from "@ant-design/icons";
|
|
3
3
|
import m from "./Button.js";
|
|
4
4
|
import { useTranslation as e } from "react-i18next";
|
|
5
|
-
import { TRANSLATION_NAMESPACE as p } from "
|
|
5
|
+
import { TRANSLATION_NAMESPACE as p } from "../../locale/hooks/translation-constants.js";
|
|
6
6
|
function s({ value: t, onClick: n }) {
|
|
7
7
|
const { t: r } = e(p);
|
|
8
8
|
return /* @__PURE__ */ o(
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),q=require("@ant-design/icons"),T=require("antd"),n=require("react"),p=require("./Button.cjs"),j=require("react-i18next"),g=require("../../locale/hooks/translation-constants.cjs");function m({shouldConfirm:C=!0,block:r,value:i,loading:a,onClick:u,text:c,disabled:l,type:f="link"}){const{t}=j.useTranslation(g.TRANSLATION_NAMESPACE),o=n.useMemo(()=>c??t("str.delete"),[c,t]),[x,s]=n.useState(!1);n.useEffect(()=>{s(a??!1)},[a]);const d=n.useCallback(async()=>{try{s(!0),await u(i)}finally{s(!1)}},[u,i]);return C?e.jsx(T.Popconfirm,{title:t("qus.doYouWantToDelete"),okText:o.toUpperCase(),cancelText:t("str.no").toUpperCase(),onConfirm:d,children:e.jsx(p,{tooltip:o,icon:e.jsx(q.DeleteOutlined,{}),disabled:l,loading:x,type:f,danger:!0,block:r})}):e.jsx(p,{tooltip:o,icon:e.jsx(q.DeleteOutlined,{}),disabled:l,loading:x,type:f,danger:!0,block:r,onClick:d})}module.exports=m;
|
|
@@ -4,7 +4,7 @@ import { Popconfirm as T } from "antd";
|
|
|
4
4
|
import { useMemo as g, useState as x, useEffect as A, useCallback as _ } from "react";
|
|
5
5
|
import d from "./Button.js";
|
|
6
6
|
import { useTranslation as k } from "react-i18next";
|
|
7
|
-
import { TRANSLATION_NAMESPACE as D } from "
|
|
7
|
+
import { TRANSLATION_NAMESPACE as D } from "../../locale/hooks/translation-constants.js";
|
|
8
8
|
function P({
|
|
9
9
|
shouldConfirm: C = !0,
|
|
10
10
|
block: n,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),u=require("@ant-design/icons"),r=require("react"),a=require("react-i18next"),l=require("./Button.cjs"),x=require("../../locale/hooks/translation-constants.cjs");function p({value:t,onClick:e}){const[s,n]=r.useState(!1),{t:i}=a.useTranslation(x.TRANSLATION_NAMESPACE),c=r.useCallback(async()=>{n(!0),e(t).finally(()=>n(!1))},[e,t]);return o.jsx(l,{loading:s,type:"link",onClick:c,icon:o.jsx(u.ExportOutlined,{}),tooltip:i("str.export")})}exports.ExportButton=p;
|
|
@@ -3,7 +3,7 @@ import { ExportOutlined as p } from "@ant-design/icons";
|
|
|
3
3
|
import { useState as s, useCallback as l } from "react";
|
|
4
4
|
import { useTranslation as a } from "react-i18next";
|
|
5
5
|
import f from "./Button.js";
|
|
6
|
-
import { TRANSLATION_NAMESPACE as c } from "
|
|
6
|
+
import { TRANSLATION_NAMESPACE as c } from "../../locale/hooks/translation-constants.js";
|
|
7
7
|
function y({
|
|
8
8
|
value: t,
|
|
9
9
|
onClick: o
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),C=require("@ant-design/icons"),T=require("antd"),n=require("react"),j=require("react-i18next"),g=require("../../locale/hooks/translation-constants.cjs"),q=require("./Button.cjs");function m({shouldConfirm:p=!0,block:s,value:i,loading:c,onClick:a,text:u,disabled:l,type:d="link"}){const{t:e}=j.useTranslation(g.TRANSLATION_NAMESPACE),o=n.useMemo(()=>u??e("str.hide"),[u,e]),[f,r]=n.useState(!1);n.useEffect(()=>{r(c??!1)},[c]);const x=n.useCallback(async()=>{try{r(!0),await a(i)}finally{r(!1)}},[a,i]);return p?t.jsx(T.Popconfirm,{title:e("qus.doYouWantToHide"),okText:o.toUpperCase(),cancelText:e("str.no").toUpperCase(),onConfirm:x,children:t.jsx(q,{tooltip:o,icon:t.jsx(C.DownCircleOutlined,{}),disabled:l,loading:f,type:d,danger:!0,block:s})}):t.jsx(q,{tooltip:o,icon:t.jsx(C.DownCircleOutlined,{}),disabled:l,loading:f,type:d,danger:!0,block:s,onClick:x})}module.exports=m;
|
|
@@ -3,7 +3,7 @@ import { DownCircleOutlined as p } from "@ant-design/icons";
|
|
|
3
3
|
import { Popconfirm as T } from "antd";
|
|
4
4
|
import { useMemo as g, useState as x, useEffect as A, useCallback as _ } from "react";
|
|
5
5
|
import { useTranslation as k } from "react-i18next";
|
|
6
|
-
import { TRANSLATION_NAMESPACE as E } from "
|
|
6
|
+
import { TRANSLATION_NAMESPACE as E } from "../../locale/hooks/translation-constants.js";
|
|
7
7
|
import d from "./Button.js";
|
|
8
8
|
function M({
|
|
9
9
|
shouldConfirm: C = !0,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),k=require("@ant-design/icons"),n=require("react"),q=require("react-i18next"),x=require("../../locale/hooks/translation-constants.cjs"),C=require("./Button.cjs");function S({onClick:o,children:c,accept:u,className:a,disabled:l,type:f="link"}){const[d,i]=n.useState(!1),{t:p}=q.useTranslation(x.TRANSLATION_NAMESPACE),e=n.useRef(null),y=n.useCallback(()=>{m(t=>t+1),e.current&&setTimeout(()=>{var t;(t=e==null?void 0:e.current)==null||t.click()},10)},[]),[g,m]=n.useState(0),j=n.useCallback(async t=>{i(!0);const r=t.target.files[0];r&&await o(r),i(!1)},[o]);return s.jsxs("div",{className:a,children:[s.jsx("input",{type:"file",style:{display:"none"},ref:e,onChange:j,accept:u},g),s.jsx(C,{loading:d,type:f,disabled:l,onClick:y,icon:s.jsx(k.ImportOutlined,{}),tooltip:p("str.import"),children:c})]})}exports.ImportButton=S;
|
|
@@ -2,7 +2,7 @@ import { jsxs as A, jsx as n } from "react/jsx-runtime";
|
|
|
2
2
|
import { ImportOutlined as T } from "@ant-design/icons";
|
|
3
3
|
import { useState as s, useRef as h, useCallback as l } from "react";
|
|
4
4
|
import { useTranslation as x } from "react-i18next";
|
|
5
|
-
import { TRANSLATION_NAMESPACE as N } from "
|
|
5
|
+
import { TRANSLATION_NAMESPACE as N } from "../../locale/hooks/translation-constants.js";
|
|
6
6
|
import S from "./Button.js";
|
|
7
7
|
function _({
|
|
8
8
|
onClick: e,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("@ant-design/icons"),l=require("react-i18next"),q=require("./Button.cjs"),N=require("../../locale/hooks/translation-constants.cjs"),d=({size:n,block:r,className:s,type:o="primary",onClick:t,title:u,to:i})=>{const{t:c}=l.useTranslation(N.TRANSLATION_NAMESPACE);return e.jsx(q,{type:o,className:s,to:i,block:r,size:n,onClick:t&&(()=>t(!0)),icon:e.jsx(a.PlusOutlined,{}),children:u??c("str.new")})};exports.NewButton=d;
|
|
@@ -2,7 +2,7 @@ import { jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { PlusOutlined as u } from "@ant-design/icons";
|
|
3
3
|
import { useTranslation as f } from "react-i18next";
|
|
4
4
|
import c from "./Button.js";
|
|
5
|
-
import { TRANSLATION_NAMESPACE as l } from "
|
|
5
|
+
import { TRANSLATION_NAMESPACE as l } from "../../locale/hooks/translation-constants.js";
|
|
6
6
|
const w = ({ size: t, block: n, className: m, type: i = "primary", onClick: o, title: e, to: p }) => {
|
|
7
7
|
const { t: s } = f(l);
|
|
8
8
|
return /* @__PURE__ */ r(
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),p=require("@ant-design/icons"),q=require("react-i18next"),P=require("./Button.cjs"),d=require("../../locale/hooks/translation-constants.cjs"),j=({disabled:e,loading:i,block:o,className:s,type:u="primary",onClick:c,title:a,to:l})=>{const{t:n}=q.useTranslation(d.TRANSLATION_NAMESPACE),t=a??n("str.print");return r.jsx(P,{type:u,className:s,to:l,loading:i,disabled:e,block:o,onClick:c,tooltip:t!=null&&t.trim()?"":n("str.print"),icon:r.jsx(p.PrinterOutlined,{}),children:t})};exports.PrintButton=j;
|
|
@@ -2,7 +2,7 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { PrinterOutlined as u } from "@ant-design/icons";
|
|
3
3
|
import { useTranslation as A } from "react-i18next";
|
|
4
4
|
import a from "./Button.js";
|
|
5
|
-
import { TRANSLATION_NAMESPACE as l } from "
|
|
5
|
+
import { TRANSLATION_NAMESPACE as l } from "../../locale/hooks/translation-constants.js";
|
|
6
6
|
const B = ({ disabled: n, loading: i, block: m, className: p, type: s = "primary", onClick: e, title: c, to: f }) => {
|
|
7
7
|
const { t } = A(l), r = c ?? t("str.print");
|
|
8
8
|
return /* @__PURE__ */ o(
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),a=require("@ant-design/icons"),l=require("react-i18next"),d=require("../../locale/hooks/translation-constants.cjs"),q=require("./Button.cjs"),R=({disabled:r,block:n,className:s,type:o="primary",onClick:e,title:i,to:u})=>{const{t:c}=l.useTranslation(d.TRANSLATION_NAMESPACE);return t.jsx(q,{type:o,disabled:r,className:s,to:u,block:n,onClick:e&&(()=>e(!0)),icon:t.jsx(a.ReloadOutlined,{}),children:i??c("str.refresh")})};exports.RefreshButton=R;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { ReloadOutlined as f } from "@ant-design/icons";
|
|
3
3
|
import { useTranslation as u } from "react-i18next";
|
|
4
|
-
import { TRANSLATION_NAMESPACE as a } from "
|
|
4
|
+
import { TRANSLATION_NAMESPACE as a } from "../../locale/hooks/translation-constants.js";
|
|
5
5
|
import c from "./Button.js";
|
|
6
6
|
const R = ({ disabled: t, block: e, className: m, type: n = "primary", onClick: r, title: i, to: p }) => {
|
|
7
7
|
const { t: s } = u(a);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),p=require("@ant-design/icons"),T=require("antd"),n=require("react"),g=require("react-i18next"),C=require("./Button.cjs"),U=require("../../locale/hooks/translation-constants.cjs");function m({shouldConfirm:q=!0,block:s,value:i,loading:c,onClick:u,text:a,disabled:l,type:d="link",hidden:j}){const{t:e}=g.useTranslation(U.TRANSLATION_NAMESPACE),o=n.useMemo(()=>a??e("str.unhide"),[a,e]),[f,r]=n.useState(!1);n.useEffect(()=>{r(c??!1)},[c]);const x=n.useCallback(async()=>{try{r(!0),await u(i)}finally{r(!1)}},[u,i]);return q?t.jsx(T.Popconfirm,{title:e("qus.doYouWantToHide"),okText:o.toUpperCase(),cancelText:e("str.no").toUpperCase(),onConfirm:x,children:t.jsx(C,{tooltip:o,icon:t.jsx(p.UpCircleOutlined,{}),disabled:l,loading:f,type:d,danger:!0,hidden:j,block:s})}):t.jsx(C,{tooltip:o,icon:t.jsx(p.UpCircleOutlined,{}),disabled:l,loading:f,type:d,danger:!0,block:s,onClick:x})}module.exports=m;
|
|
@@ -4,7 +4,7 @@ import { Popconfirm as g } from "antd";
|
|
|
4
4
|
import { useMemo as x, useState as A, useEffect as U, useCallback as _ } from "react";
|
|
5
5
|
import { useTranslation as k } from "react-i18next";
|
|
6
6
|
import d from "./Button.js";
|
|
7
|
-
import { TRANSLATION_NAMESPACE as E } from "
|
|
7
|
+
import { TRANSLATION_NAMESPACE as E } from "../../locale/hooks/translation-constants.js";
|
|
8
8
|
function O({
|
|
9
9
|
shouldConfirm: C = !0,
|
|
10
10
|
block: e,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),o=require("@ant-design/icons"),r=require("react-i18next"),i=require("./Button.cjs"),u=require("../../locale/hooks/translation-constants.cjs");function c({value:n,onClick:e}){const{t:s}=r.useTranslation(u.TRANSLATION_NAMESPACE);return t.jsx(i,{tooltip:s("str.update"),type:"link",onClick:()=>e(n),icon:t.jsx(o.EditOutlined,{})})}module.exports=c;
|
|
@@ -2,7 +2,7 @@ import { jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import { EditOutlined as i } from "@ant-design/icons";
|
|
3
3
|
import { useTranslation as m } from "react-i18next";
|
|
4
4
|
import p from "./Button.js";
|
|
5
|
-
import { TRANSLATION_NAMESPACE as e } from "
|
|
5
|
+
import { TRANSLATION_NAMESPACE as e } from "../../locale/hooks/translation-constants.js";
|
|
6
6
|
function d({ value: o, onClick: r }) {
|
|
7
7
|
const { t: n } = m(e);
|
|
8
8
|
return /* @__PURE__ */ t(
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),i=require("@ant-design/icons"),o=require("react-i18next"),r=require("./Button.cjs"),u=require("../../locale/hooks/translation-constants.cjs");function c({value:n,onClick:e}){const{t:s}=o.useTranslation(u.TRANSLATION_NAMESPACE);return t.jsx(r,{type:"link",onClick:()=>e(n),icon:t.jsx(i.EyeOutlined,{}),tooltip:s("str.view")})}module.exports=c;
|
|
@@ -2,7 +2,7 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { EyeOutlined as n } from "@ant-design/icons";
|
|
3
3
|
import { useTranslation as e } from "react-i18next";
|
|
4
4
|
import m from "./Button.js";
|
|
5
|
-
import { TRANSLATION_NAMESPACE as p } from "
|
|
5
|
+
import { TRANSLATION_NAMESPACE as p } from "../../locale/hooks/translation-constants.js";
|
|
6
6
|
function c({ value: t, onClick: r }) {
|
|
7
7
|
const { t: i } = e(p);
|
|
8
8
|
return /* @__PURE__ */ o(
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),o=require("antd"),u=require("react"),a=require("../../util/NumberUtil.cjs"),l=o.Descriptions.Item,m=({list:r,keepEmptyValues:s,...i})=>{const c=u.useMemo(()=>{const t=s?r:r.filter(e=>e&&!!e.value);return t.forEach(e=>{!e.noFormatting&&!isNaN(e.value)&&(e.value=a.default.toMoney(e.value))}),t},[s,r]);return n.jsx(o.Descriptions,{...i,children:c.map(({label:t,value:e})=>n.jsx(l,{label:t,children:e},t))})};module.exports=m;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { Descriptions as n } from "antd";
|
|
3
3
|
import { useMemo as c } from "react";
|
|
4
|
-
import a from "
|
|
4
|
+
import a from "../../util/NumberUtil.js";
|
|
5
5
|
const u = n.Item, h = ({ list: t, keepEmptyValues: e, ...m }) => {
|
|
6
6
|
const s = c(() => {
|
|
7
7
|
const r = e ? t : t.filter((o) => o && !!o.value);
|
package/common/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./layout/VerticalSpace.cjs"),o=require("./text/index.cjs"),r=require("./show-more/index.cjs"),n=require("./button/CloneButtonTable.cjs"),i=require("./button/DeleteButtonTable.cjs"),u=require("./button/HideButtonTable.cjs"),c=require("./button/UnHideButton.cjs"),s=require("./button/UpdateButtonTable.cjs"),a=require("./button/ViewButtonTable.cjs"),l=require("./description/DescList.cjs"),q=require("./loading/LoadingIndicator.cjs"),d=require("./select/CustomSelectOption.cjs"),p=require("./table/table.cjs"),B=require("./tag/StatusTag.cjs"),T=require("./text-field/PhoneNumberField.cjs"),m=require("./tooltip/TooltipComponent.cjs"),b=require("./wizard/WizardResult.cjs"),C=require("./wizard/WizardViewForm.cjs"),x=require("./DatePicker/DatePicker.cjs"),S=require("./DatePicker/TimePicker.cjs"),e=require("./button/Button.cjs"),R=require("./button/ExportButton.cjs"),h=require("./button/ImportButton.cjs"),w=require("./button/NewButton.cjs"),P=require("./button/PrintButton.cjs"),F=require("./button/RefreshButton.cjs"),I=require("./check-box/CheckBox.cjs"),V=require("./picker/ImagePicker.cjs"),g=require("./radio/RadioGroupComponent.cjs"),k=require("./report/SelectFieldInReport.cjs"),f=require("./select/SelectComponent.cjs"),W=require("./tab/TabViewWithRoute.cjs"),D=require("./text/title/index.cjs"),N=require("./text-field/TextField.cjs"),z=require("./text-field/TextArea.cjs"),H=require("./text-field/NumberField.cjs");exports.VerticalSpace=t;exports.Text=o.Text;exports.ShowMore=r.ShowMore;exports.CloneButtonTable=n;exports.DeleteButtonTable=i;exports.HideButtonTable=u;exports.UnHideButton=c;exports.UpdateButtonTable=s;exports.ViewButtonTable=a;exports.DescList=l;exports.LoadingIndicator=q;exports.CustomSelectOption=d;exports.TableComponent=p;exports.StatusTag=B;exports.PhoneField=T;exports.TooltipComponent=m;exports.WizardResult=b;exports.WizardViewForm=C;exports.DatePickerComponent=x;exports.TimePickerComponent=S;exports.Button=e;exports.ButtonComponent=e;exports.ExportButton=R.ExportButton;exports.ImportButton=h.ImportButton;exports.NewButton=w.NewButton;exports.PrintButton=P.PrintButton;exports.RefreshButton=F.RefreshButton;exports.CheckBoxComponent=I;exports.ImagePicker=V.default;exports.RadioGroupComponent=g;exports.SelectFieldInReport=k.SelectFieldInReport;exports.SelectComponent=f;exports.TabViewWithRoute=W.TabViewWithRoute;exports.Title=D.Title;exports.TextField=N.default;exports.TextAreaComponent=z.default;exports.NumberTextField=H;
|
package/common/index.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { default as o } from "
|
|
2
|
-
import { Text as a } from "
|
|
3
|
-
import { ShowMore as p } from "
|
|
4
|
-
import { default as l } from "
|
|
5
|
-
import { default as x } from "
|
|
6
|
-
import { default as n } from "
|
|
7
|
-
import { default as i } from "
|
|
8
|
-
import { default as B } from "
|
|
9
|
-
import { default as c } from "
|
|
10
|
-
import { default as S } from "
|
|
11
|
-
import { default as w } from "
|
|
12
|
-
import { default as P } from "
|
|
13
|
-
import { default as k } from "
|
|
14
|
-
import { default as V } from "
|
|
15
|
-
import { default as D } from "
|
|
16
|
-
import { default as z } from "
|
|
17
|
-
import { default as L } from "
|
|
18
|
-
import { default as U } from "
|
|
19
|
-
import { default as E } from "
|
|
20
|
-
import { default as M } from "
|
|
21
|
-
import { default as j, default as q } from "
|
|
22
|
-
import { ExportButton as y } from "
|
|
23
|
-
import { ImportButton as K } from "
|
|
24
|
-
import { NewButton as X } from "
|
|
25
|
-
import { PrintButton as Z } from "
|
|
26
|
-
import { RefreshButton as $ } from "
|
|
27
|
-
import { default as et } from "
|
|
28
|
-
import { default as rt } from "
|
|
29
|
-
import { default as ft } from "
|
|
30
|
-
import { SelectFieldInReport as mt } from "
|
|
31
|
-
import { default as ut } from "
|
|
32
|
-
import { TabViewWithRoute as dt } from "
|
|
33
|
-
import { Title as st } from "
|
|
34
|
-
import { default as Tt } from "
|
|
35
|
-
import { default as Ct } from "
|
|
36
|
-
import { default as bt } from "
|
|
1
|
+
import { default as o } from "./layout/VerticalSpace.js";
|
|
2
|
+
import { Text as a } from "./text/index.js";
|
|
3
|
+
import { ShowMore as p } from "./show-more/index.js";
|
|
4
|
+
import { default as l } from "./button/CloneButtonTable.js";
|
|
5
|
+
import { default as x } from "./button/DeleteButtonTable.js";
|
|
6
|
+
import { default as n } from "./button/HideButtonTable.js";
|
|
7
|
+
import { default as i } from "./button/UnHideButton.js";
|
|
8
|
+
import { default as B } from "./button/UpdateButtonTable.js";
|
|
9
|
+
import { default as c } from "./button/ViewButtonTable.js";
|
|
10
|
+
import { default as S } from "./description/DescList.js";
|
|
11
|
+
import { default as w } from "./loading/LoadingIndicator.js";
|
|
12
|
+
import { default as P } from "./select/CustomSelectOption.js";
|
|
13
|
+
import { default as k } from "./table/table.js";
|
|
14
|
+
import { default as V } from "./tag/StatusTag.js";
|
|
15
|
+
import { default as D } from "./text-field/PhoneNumberField.js";
|
|
16
|
+
import { default as z } from "./tooltip/TooltipComponent.js";
|
|
17
|
+
import { default as L } from "./wizard/WizardResult.js";
|
|
18
|
+
import { default as U } from "./wizard/WizardViewForm.js";
|
|
19
|
+
import { default as E } from "./DatePicker/DatePicker.js";
|
|
20
|
+
import { default as M } from "./DatePicker/TimePicker.js";
|
|
21
|
+
import { default as j, default as q } from "./button/Button.js";
|
|
22
|
+
import { ExportButton as y } from "./button/ExportButton.js";
|
|
23
|
+
import { ImportButton as K } from "./button/ImportButton.js";
|
|
24
|
+
import { NewButton as X } from "./button/NewButton.js";
|
|
25
|
+
import { PrintButton as Z } from "./button/PrintButton.js";
|
|
26
|
+
import { RefreshButton as $ } from "./button/RefreshButton.js";
|
|
27
|
+
import { default as et } from "./check-box/CheckBox.js";
|
|
28
|
+
import { default as rt } from "./picker/ImagePicker.js";
|
|
29
|
+
import { default as ft } from "./radio/RadioGroupComponent.js";
|
|
30
|
+
import { SelectFieldInReport as mt } from "./report/SelectFieldInReport.js";
|
|
31
|
+
import { default as ut } from "./select/SelectComponent.js";
|
|
32
|
+
import { TabViewWithRoute as dt } from "./tab/TabViewWithRoute.js";
|
|
33
|
+
import { Title as st } from "./text/title/index.js";
|
|
34
|
+
import { default as Tt } from "./text-field/TextField.js";
|
|
35
|
+
import { default as Ct } from "./text-field/TextArea.js";
|
|
36
|
+
import { default as bt } from "./text-field/NumberField.js";
|
|
37
37
|
export {
|
|
38
38
|
j as Button,
|
|
39
39
|
q as ButtonComponent,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),r=require("antd"),o=require("react-i18next"),i=require("../button/Button.cjs"),c=require("../../locale/hooks/translation-constants.cjs"),u=({loading:s,children:n,error:a})=>{const{t:e}=o.useTranslation(c.TRANSLATION_NAMESPACE);return t.jsx(r.Skeleton,{loading:s,paragraph:!0,className:"h-100",children:a?t.jsx(r.Result,{status:"404",title:404,subTitle:e("err.notFound"),className:"",extra:t.jsx(i,{to:-1,type:"primary",children:e("str.goBack")})}):n})};module.exports=u;
|
|
@@ -2,7 +2,7 @@ import { jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import { Skeleton as n, Result as s } from "antd";
|
|
3
3
|
import { useTranslation as m } from "react-i18next";
|
|
4
4
|
import i from "../button/Button.js";
|
|
5
|
-
import { TRANSLATION_NAMESPACE as p } from "
|
|
5
|
+
import { TRANSLATION_NAMESPACE as p } from "../../locale/hooks/translation-constants.js";
|
|
6
6
|
const N = ({ loading: o, children: e, error: a }) => {
|
|
7
7
|
const { t: r } = m(p);
|
|
8
8
|
return (
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime");;/* empty css */;/* empty css */const S=require("@ant-design/icons"),F=require("antd"),s=require("react"),xe=require("react-cropper"),he=require("react-i18next"),je=require("../../locale/hooks/translation-constants.cjs"),E=require("../button/Button.cjs"),we=require("../../util/ImageUtil.cjs"),Ce=F.Form.Item;function X(r){return new Promise((d,p)=>{const n=new FileReader;n.readAsDataURL(r),n.onload=()=>d(n.result),n.onerror=f=>p(f)})}const ve=({values:r=[],required:d,buttonType:p,label:n,name:f,onChange:m,aspectRatio:N,buttonTitle:j,hidePreview:w,buttonSize:g="large",showButtonText:x=!0,showOnlyIcon:D=!1,icon:y=t.jsx(S.UploadOutlined,{}),loading:O,maxCount:C=1,onAdd:l,onRemove:U,listType:I,..._})=>{const[Z,ee]=s.useState(""),[te,se]=s.useState(""),[re,z]=s.useState(!1),q=s.useRef(),a=s.useRef(),[i,M]=s.useState([]),[h,k]=s.useState(),ne=s.useRef(),oe=()=>z(!1),ae=async e=>{!e.url&&!e.preview&&(e.preview=await X(e.originFileObj)),se(e.url||e.preview),z(!0),ee(e.name)},[B,R]=s.useState(!1),ie=()=>{},T=e=>{var o;(o=a==null?void 0:a.current)==null||o.cropper.rotate(e?-90:90)};s.useEffect(()=>{m==null||m(i[0],i)},[i,m]);const ce=()=>{var b;const e=(b=a==null?void 0:a.current)==null?void 0:b.cropper.getCroppedCanvas(),{type:o,size:c,name:u,uid:v}=q.current;R(!0),e==null||e.toBlob(async me=>{const ge=Object.assign(new File([me],u,{type:o}),{uid:v}),G=await we.resizeImage(ge),K=await X(G),Q={url:K,name:u,uid:v,type:o,size:c,thumbUrl:K,originFileObj:G};if(l)try{R(!0),await l(Q)}finally{R(!1)}M([Q,...i]),R(!1)}),k(void 0)},le=()=>{k(void 0),q.current=void 0},L=s.useCallback(e=>{const o=e;if(o){q.current=o;const c=new FileReader;c.addEventListener("load",()=>{var u;if(typeof c.result=="string"){k(c.result);const v=localStorage.getItem("cropper.box"),b=v?JSON.parse(v):void 0;b&&((u=a==null?void 0:a.current)==null||u.cropper.setCropBoxData(b)),setTimeout(()=>{H()},100)}}),c.readAsDataURL(o)}},[]);s.useEffect(()=>{if(r!=null&&r.length||typeof r=="string"){const e=Array.isArray(r)?r.map(o=>[{uid:r,url:o}]):[{uid:r,url:r}];M(e)}},[r]);const{t:P}=he.useTranslation(je.TRANSLATION_NAMESPACE),de=s.useMemo(()=>d?{required:d,validator:(e,o,c)=>{h||i!=null&&i.length?c():c(`${n??""} ${P("err.validation.required")}`)}}:void 0,[d,h,i==null?void 0:i.length,n,P]),J=j??P("message.fileUploadMessage2"),V=s.useMemo(()=>t.jsx(Y,{showLoadingIndicator:B,_buttonTitle:J,buttonSize:g,buttonType:p,fileList:i,hidePreview:w,icon:y,loading:O,listType:I,maxCount:C,onChangeFile:L,onRemove:U,showButtonText:x,handlePreview:ae,setFileList:M}),[B,J,g,p,i,w,y,O,I,C,L,U,x]);ne.current=V.props.beforeUpload;const[ue,W]=s.useState(0),[pe,$]=s.useState(0),[A,fe]=s.useState();s.useEffect(()=>{const e=setTimeout(()=>{A&&localStorage.setItem("cropper.box",JSON.stringify(A))},400);return()=>clearTimeout(e)},[A]),s.useEffect(()=>{h||(W(0),$(0))},[h]);const H=s.useCallback(async()=>{var o;const e=(o=a==null?void 0:a.current)==null?void 0:o.cropper;if(e){const{width:c,height:u}=e.getCroppedCanvas();fe(e.getCropBoxData()),W(c),$(u)}},[]);return t.jsxs(t.Fragment,{children:[t.jsx(Ce,{label:n,..._,name:f,className:"mb-0",rules:[de,..._.rules??[]],children:V}),t.jsxs(F.Modal,{open:!!h,maskClosable:!1,onOk:ce,closable:!1,onCancel:le,children:[t.jsx(xe.Cropper,{ref:a,src:h,cropmove:H,viewMode:1,aspectRatio:N,cropend:()=>ie()}),t.jsx("p",{className:"text-center",children:[ue,pe].join(" ⨉ ")}),t.jsxs("div",{className:"mt-2 d-flex justify-content-center",children:[t.jsx(E,{size:"large",icon:t.jsx(S.RotateLeftOutlined,{}),onClick:()=>T(!0)}),t.jsx(E,{size:"large",icon:t.jsx(S.RotateRightOutlined,{}),onClick:()=>T(!1)})]})]}),t.jsx(F.Modal,{open:re,title:Z,footer:null,onCancel:oe,children:t.jsx("div",{className:"text-center",children:t.jsx("img",{alt:"example",style:{maxWidth:"400px"},src:te})})})]})},Y=({_buttonTitle:r,buttonSize:d,buttonType:p,fileList:n,hidePreview:f,icon:m,loading:N,maxCount:j,onChangeFile:w,onRemove:g,showButtonText:x,handlePreview:D,setFileList:y,showLoadingIndicator:O,listType:C="picture"})=>t.jsx(t.Fragment,{children:t.jsxs(F.Upload,{accept:"image/x-png,image/gif,image/jpeg",fileList:n,defaultFileList:n,onChange:()=>{},className:(n.length>=j?" hide-upload ":"")+" mb-0",multiple:!1,onPreview:f?void 0:D,onDrop:l=>(w(l.dataTransfer.files.item(0)),!1),listType:C,showUploadList:!f,onRemove:l=>{const U=n.filter(I=>l.uid!==I.uid);g==null||g(l),y(U)},beforeUpload:async l=>(w(l),!1),maxCount:j,children:[O&&t.jsx(S.LoadingOutlined,{}),t.jsx("div",{className:"d-flex flex-column",children:n.length<j&&(C==="picture-circle"?t.jsx(S.UploadOutlined,{}):t.jsx(E,{loading:N,tooltip:x?void 0:r,size:d,icon:m,type:x?p:"text",children:x?r:void 0}))})]},n.length)});exports.UploadComponent=Y;exports.default=ve;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as t, jsxs as S, Fragment as oe } from "react/jsx-runtime";
|
|
2
|
-
/* empty css
|
|
2
|
+
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import { RotateLeftOutlined as ye, RotateRightOutlined as Ie, UploadOutlined as ne, LoadingOutlined as Oe } from "@ant-design/icons";
|
|
5
5
|
import { Form as Ue, Modal as q, Upload as Ne } from "antd";
|
|
6
6
|
import z, { useRef as B, useState as w, useEffect as R, useCallback as ee, useMemo as te } from "react";
|
|
7
7
|
import { Cropper as Fe } from "react-cropper";
|
|
8
8
|
import { useTranslation as Re } from "react-i18next";
|
|
9
|
-
import { TRANSLATION_NAMESPACE as Se } from "
|
|
9
|
+
import { TRANSLATION_NAMESPACE as Se } from "../../locale/hooks/translation-constants.js";
|
|
10
10
|
import E from "../button/Button.js";
|
|
11
|
-
import je from "
|
|
11
|
+
import je from "../../util/ImageUtil.js";
|
|
12
12
|
const ke = Ue.Item;
|
|
13
13
|
function re(r) {
|
|
14
14
|
return new Promise((l, p) => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),a=require("antd"),k=require("react"),H=require("react-i18next"),P=require("../../locale/hooks/translation-constants.cjs"),b=require("../tooltip/TooltipComponent.cjs");function B({label:l,rules:j=[],required:w,placeholder:h,notSearch:q,children:x,readOnly:s,items:o,dropdownRender:L,itemBuilder:T,loading:f,showLoadingInEmptyIndicator:N,nameFieldInArray:m="name",innerRef:_,tooltip:I,filterOption:p,tagRender:A,...n}){const{t:E}=H.useTranslation(P.TRANSLATION_NAMESPACE),M=k.useCallback(e=>{const t=typeof e=="string"||typeof e=="number"?e:e==null?void 0:e.id,c=typeof e=="string"||typeof e=="number"?e:e==null?void 0:e[m];return r.jsx("option",{value:t,children:r.jsx("div",{dangerouslySetInnerHTML:{__html:c}})},t)},[m]);return r.jsx(a.ConfigProvider,{renderEmpty:N&&f?()=>r.jsx(a.Spin,{}):void 0,children:r.jsx(b,{title:I,children:r.jsx(a.Form.Item,{label:l,name:n.name,help:n.help,className:n.className,rules:[...j,{required:w,message:`${l??h??""} ${E("err.validation.required")}`}],children:r.jsx(a.Select,{ref:_,loading:f,open:s?!1:void 0,onChange:!s&&n.onChange,allowClear:!s&&n.allowClear,showSearch:!q,className:`max-width ${s?"readOnly":""}`,...n,tagRender:A,placeholder:h??l,filterOption:p??((e,t)=>{var c,C,u,g;try{const i=(u=(C=(c=t==null?void 0:t.children)==null?void 0:c.props)==null?void 0:C.dangerouslySetInnerHTML)==null?void 0:u.__html,O=e.toLowerCase().split(/\s+/),S=(t==null?void 0:t.children)??"",y=typeof S=="string"?S.toLowerCase():typeof i=="string"?i.toLowerCase():"",R=(((g=t==null?void 0:t.value)==null?void 0:g.toString())??"").toLowerCase(),$=y.replace(/\s/g,"");return O.every(d=>y.indexOf(d)>=0||R.indexOf(d)>=0||$.indexOf(d)>=0)}catch(i){return console.log(i),!0}}),dropdownRender:L,children:x===null?void 0:x??(o&&(o==null?void 0:o.map(T??M)))})})})})}module.exports=B;
|
|
@@ -2,7 +2,7 @@ import { jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import { ConfigProvider as P, Spin as b, Form as j, Select as q } from "antd";
|
|
3
3
|
import { useCallback as B } from "react";
|
|
4
4
|
import { useTranslation as D } from "react-i18next";
|
|
5
|
-
import { TRANSLATION_NAMESPACE as F } from "
|
|
5
|
+
import { TRANSLATION_NAMESPACE as F } from "../../locale/hooks/translation-constants.js";
|
|
6
6
|
import R from "../tooltip/TooltipComponent.js";
|
|
7
7
|
function Q({
|
|
8
8
|
label: m,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),c=require("antd"),g=require("../../context/WindowDimension.cjs"),i=require("react"),u=require("react-router"),q=require("react-router-dom"),{Content:T}=c.Layout,y=({positionOfRoute:n,initialKey:s="*",tabs:l,className:d="",mode:h="default"})=>{const[b,m]=i.useState(s),o=u.useNavigate(),p=e=>{o(e)},r=q.useLocation();i.useEffect(()=>{const e=r.pathname.split("/")[n];m(e??""),e||o(s,{replace:!0})},[s,r.pathname,o,n]);const{isDesktop:x}=g(),a=h==="side"&&x,f=a?"left":"top",j=a?"d-flex h-100":"";return t.jsxs("div",{className:`${d} ${j}`,children:[t.jsx(c.Tabs,{type:"card",tabPosition:f,activeKey:b,onChange:p,children:l.map(({key:e,label:v})=>t.jsx(c.Tabs.TabPane,{tab:v},e))}),t.jsx(T,{className:`max-height ${a?"overflow-auto":""}`,children:t.jsx(u.Outlet,{})})]})};exports.TabViewWithRoute=y;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as v, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Tabs as r, Layout as x } from "antd";
|
|
3
|
-
import g from "
|
|
3
|
+
import g from "../../context/WindowDimension.js";
|
|
4
4
|
import { useState as y, useEffect as S } from "react";
|
|
5
5
|
import { useNavigate as w, Outlet as N } from "react-router";
|
|
6
6
|
import { useLocation as P } from "react-router-dom";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const p=require("react/jsx-runtime"),u=require("antd"),x=require("../../locale/hooks/translation-constants.cjs"),T=require("react-i18next"),q=({onClick:n,clickable:o,colorFunction:s,translation:c,value:e})=>{var r;const t=s==null?void 0:s(e),{t:i}=T.useTranslation(x.TRANSLATION_NAMESPACE),a=u.Tag;return p.jsx(a,{onClick:n,color:t==null?void 0:t.color,icon:t==null?void 0:t.icon,style:{color:t==null?void 0:t.text,cursor:o?"pointer":void 0},children:(r=i(c[e]))==null?void 0:r.toUpperCase()})};module.exports=q;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { Tag as f } from "antd";
|
|
3
|
-
import { TRANSLATION_NAMESPACE as T } from "
|
|
3
|
+
import { TRANSLATION_NAMESPACE as T } from "../../locale/hooks/translation-constants.js";
|
|
4
4
|
import { useTranslation as A } from "react-i18next";
|
|
5
5
|
const S = ({
|
|
6
6
|
onClick: e,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=require("react/jsx-runtime"),p=require("antd"),m=require("react"),M=require("react-i18next"),P=require("../../locale/hooks/translation-constants.cjs"),S=require("../tooltip/TooltipComponent.cjs"),L=require("./TextField.cjs"),O=m.forwardRef(function({type:b,required:i,label:e,rules:c=[],placeholder:r,onEnter:x,form:q,nextFocus:T,min:d,moneyField:n,addonAfter:f,minLength:N,defaultValue:j,pattern:l,disabled:I,readOnly:$,onChange:g,value:A,max:E,addonBefore:R,size:C,isInt:u=!1,tooltip:h,...w},B){const{t:a}=M.useTranslation(P.TRANSLATION_NAMESPACE),F=m.useMemo(()=>[...c,{required:i,message:`${e??r??""} ${a("err.validation.required")}`}],[c,e,r,a,i]);return o.jsx(S,{title:h,children:o.jsx(p.Form.Item,{...w,label:e,rules:F,children:o.jsx(p.InputNumber,{ref:B,disabled:I,defaultValue:j,value:A,readOnly:$,addonBefore:R,minLength:N,addonAfter:f,step:u?1:void 0,pattern:u?"d*":l,onChange:g,onPressEnter:t=>L.onEnterInternalTextField(t,T,q,x),className:"max-width",min:d===null?void 0:d??0,max:E,type:n?void 0:"number",size:C,formatter:n?t=>{if(t.includes(".")){const s=`${t}`.split(".");return s[0]=s[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),s.join(".")}else return`${t}`.replace(/\B(?=(\d{3})+(?!\d))/g,",")}:void 0,parser:n?t=>t==null?void 0:t.replace(/\$\s?|(,*)/g,""):void 0,placeholder:r??e})})})});module.exports=O;
|
|
@@ -2,7 +2,7 @@ import { jsx as i } from "react/jsx-runtime";
|
|
|
2
2
|
import { Form as P, InputNumber as R } from "antd";
|
|
3
3
|
import { forwardRef as S, useMemo as F } from "react";
|
|
4
4
|
import { useTranslation as L } from "react-i18next";
|
|
5
|
-
import { TRANSLATION_NAMESPACE as O } from "
|
|
5
|
+
import { TRANSLATION_NAMESPACE as O } from "../../locale/hooks/translation-constants.js";
|
|
6
6
|
import _ from "../tooltip/TooltipComponent.js";
|
|
7
7
|
import { onEnterInternalTextField as b } from "./TextField.js";
|
|
8
8
|
const K = S(
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),i=require("../../util/ValidationUtil.cjs"),l=require("./TextField.cjs"),r=e=>t.jsx(l.default,{...e,rules:[...e.rules??[],...i.phoneValidation(e.label??e.placeholder??"")]});module.exports=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react/jsx-runtime"),i=require("antd"),x=require("react-i18next"),A=require("../../locale/hooks/translation-constants.cjs"),c=(n,e,t,r)=>{var s;e&&t&&(n.preventDefault(),(s=t==null?void 0:t.getFieldInstance(e))==null||s.focus()),r&&r(n)},q=({required:n,label:e,rules:t=[],placeholder:r,onEnter:s,nextFocus:l,className:o,...u})=>{const{t:d}=x.useTranslation(A.TRANSLATION_NAMESPACE),I=i.Form.useFormInstance();return a.jsx(i.Form.Item,{...u,className:o,label:e,rules:[...t,{required:n,message:`${e} ${d("err.validation.required")}`}],children:a.jsx(i.Input.TextArea,{...u,className:o,onPressEnter:T=>c(T,l,I,s),placeholder:r??e})})};exports.default=q;exports.onEnterInternalTextField=c;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { Form as m, Input as l } from "antd";
|
|
3
3
|
import { useTranslation as A } from "react-i18next";
|
|
4
|
-
import { TRANSLATION_NAMESPACE as I } from "
|
|
4
|
+
import { TRANSLATION_NAMESPACE as I } from "../../locale/hooks/translation-constants.js";
|
|
5
5
|
const T = (r, e, t, n) => {
|
|
6
6
|
var o;
|
|
7
7
|
e && t && (r.preventDefault(), (o = t == null ? void 0 : t.getFieldInstance(e)) == null || o.focus()), n && n(r);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),O=require("@ant-design/icons"),c=require("antd"),R=require("react"),_=require("react-i18next"),w=require("../../locale/hooks/translation-constants.cjs"),L=require("../tooltip/TooltipComponent.cjs"),d=(t,n,e,i)=>{var s;n&&e&&(t.preventDefault(),(s=e==null?void 0:e.getFieldInstance(n))==null||s.focus()),i&&i(t)},$=({type:t,required:n,label:e,disabled:i,rules:s=[],placeholder:a,onEnter:l,size:p,form:x,addonAfter:I,addonBefore:T,nextFocus:g,autoComplete:m="off",defaultValue:q,readOnly:f,value:j,loading:v,onBlur:A,inputRef:C,status:E,autoFocus:P,onChange:D,tooltip:F,...M})=>{const{t:u}=_.useTranslation(w.TRANSLATION_NAMESPACE),S=R.useMemo(()=>{const r=[...s,{required:n,message:`${e??a??""} ${u("err.validation.required")}`}];return t==="email"&&r.push({type:"email",message:u("err.validation.invalidEmail")}),r},[s,n,e,a,u,t]),h={disabled:i,value:j,readOnly:f,defaultValue:q,autoFocus:P,addonBefore:T,ref:C,onBlur:A,addonAfter:v?o.jsx(O.LoadingOutlined,{}):I,status:E,size:p,autoComplete:m,onPressEnter:r=>d(r,g,x,l),type:t,placeholder:a??e},N=t=="password"?c.Input.Password:c.Input;return o.jsx(L,{title:F,children:o.jsx(c.Form.Item,{...M,label:e,rules:S,children:o.jsx(N,{...h})})})};exports.default=$;exports.onEnterInternalTextField=d;
|
|
@@ -3,7 +3,7 @@ import { LoadingOutlined as O } from "@ant-design/icons";
|
|
|
3
3
|
import { Input as d, Form as S } from "antd";
|
|
4
4
|
import { useMemo as $ } from "react";
|
|
5
5
|
import { useTranslation as j } from "react-i18next";
|
|
6
|
-
import { TRANSLATION_NAMESPACE as D } from "
|
|
6
|
+
import { TRANSLATION_NAMESPACE as D } from "../../locale/hooks/translation-constants.js";
|
|
7
7
|
import R from "../tooltip/TooltipComponent.js";
|
|
8
8
|
const _ = (o, n, t, r) => {
|
|
9
9
|
var i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),a=require("@ant-design/icons"),y=require("antd"),o=require("i18next"),A=require("react-i18next"),d=require("../button/Button.cjs"),T=require("../../locale/hooks/translation-constants.cjs"),h=({errorChildren:l,children:v,onRetry:r,onClickBack:c,success:n,loading:s,error:e,successTitle:x=o.t("str.success"),successMessage:j,errorMessage:u=o.t("err.save"),errorTitle:m=o.t("str.error"),loadingTitle:p=o.t("message.loading.saving"),loadingMessage:q})=>{const{t:i}=A.useTranslation(T.TRANSLATION_NAMESPACE);return t.jsx(y.Result,{status:s?void 0:n?"success":e?["403","404","500"].includes(e==null?void 0:e.code)?e.code:e?"error":void 0:void 0,title:s?p:n?x:e?m:void 0,icon:s?t.jsx(a.LoadingOutlined,{}):void 0,subTitle:s?q:n?j:e?typeof u=="function"?u()??i("err.save"):u??i("err.save"):void 0,extra:[n?t.jsx(t.Fragment,{children:v}):e?t.jsxs(t.Fragment,{children:[!!c&&t.jsx(d,{onClick:c,htmlType:"button",type:"primary",icon:t.jsx(a.ArrowLeftOutlined,{}),children:i("str.previous")}),!!r&&t.jsx(d,{type:"primary",onClick:()=>r(void 0,void 0,!0),children:i("str.retry")},"retry"),l]}):t.jsx(t.Fragment,{})]})};module.exports=h;
|
|
@@ -4,7 +4,7 @@ import { Result as C } from "antd";
|
|
|
4
4
|
import { t as m } from "i18next";
|
|
5
5
|
import { useTranslation as L } from "react-i18next";
|
|
6
6
|
import l from "../button/Button.js";
|
|
7
|
-
import { TRANSLATION_NAMESPACE as N } from "
|
|
7
|
+
import { TRANSLATION_NAMESPACE as N } from "../../locale/hooks/translation-constants.js";
|
|
8
8
|
const w = ({
|
|
9
9
|
errorChildren: u,
|
|
10
10
|
children: a,
|
package/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./locale/hooks/translation-constants.cjs"),o=require("./locale/index.cjs"),C=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./locale/hooks/translation-constants.cjs"),o=require("./locale/index.cjs"),C=require("./crud/CrudComponent.cjs"),r=require("./crud/CrudField.cjs"),i=require("./crud/CrudFormWizard.cjs"),n=require("./crud/CrudReportComponent.cjs"),t=require("./crud/CrudSearchComponent.cjs"),d=require("./crud/CrudForm.cjs"),l=require("./crud/FileCrudField.cjs"),e=require("./crud/ImageCrudField.cjs");exports.TRANSLATION_NAMESPACE=u.TRANSLATION_NAMESPACE;exports.setupI18n=o.setupI18n;exports.updateTranslations=o.updateTranslations;exports.CrudComponent=C;exports.ColorCrudFieldComponent=r.ColorCrudFieldComponent;exports.CrudField=r.default;exports.SelectCrudFieldComponent=r.SelectCrudFieldComponent;exports.CrudFormWizard=i;exports.CrudReportComponent=n;exports.CrudSearchComponent=t;exports.CrudForm=d.CrudForm;exports.CrudFormFields=d.CrudFormFields;exports.FileCellValue=l.FileCellValue;exports.FileCrudCellValue=l.FileCrudCellValue;exports.FileCrudField=l.default;exports.FileDownloadProvider=e.FileDownloadProvider;exports.FileUploadProvider=e.FileUploadProvider;exports.ImageCellValue=e.ImageCellValue;exports.ImageCrudCellValue=e.ImageCrudCellValue;exports.ImageCrudField=e.default;
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { TRANSLATION_NAMESPACE } from './locale/hooks/translation-constants';
|
|
2
2
|
export { setupI18n, updateTranslations } from './locale';
|
|
3
|
-
export { ColorCrudFieldComponent, CrudComponent, CrudField, CrudForm, CrudFormFields, CrudFormWizard, CrudReportComponent, CrudSearchComponent, FileCellValue, FileCrudCellValue, FileCrudField, FileDownloadProvider, FileUploadProvider, ImageCellValue, ImageCrudCellValue, ImageCrudField, SelectCrudFieldComponent, } from './
|
|
4
|
-
export type { CheckboxBasedFieldProps, ColorPickerFieldProps, CrudComponentProps, CrudFieldGrid, CrudFieldProps, CrudFormWizardProps, CrudPaginateProps, CrudPurpose, CrudReportComponentProps, CrudReportSubmitForm, CrudSearchComponentProps, CrudSearchOption, CrudWizardProp, CurdFormFieldsProps, DateBasedFieldProps, EnumCrudField, FileCrudFieldProps, FormBuilderFunc, FormBuilderFunc0, GetFormFieldOptions, ImageCrudFieldProps, InitialCrudField, NumberBasedFieldProps, ObjectCrudField, ReportCrudFields, SearchOnlyFields, SelectCrudField, SelectFieldItem, TextAreaBasedFieldProps, TextBasedFieldProps, TimeBasedFieldProps, } from './
|
|
3
|
+
export { ColorCrudFieldComponent, CrudComponent, CrudField, CrudForm, CrudFormFields, CrudFormWizard, CrudReportComponent, CrudSearchComponent, FileCellValue, FileCrudCellValue, FileCrudField, FileDownloadProvider, FileUploadProvider, ImageCellValue, ImageCrudCellValue, ImageCrudField, SelectCrudFieldComponent, } from './crud';
|
|
4
|
+
export type { CheckboxBasedFieldProps, ColorPickerFieldProps, CrudComponentProps, CrudFieldGrid, CrudFieldProps, CrudFormWizardProps, CrudPaginateProps, CrudPurpose, CrudReportComponentProps, CrudReportSubmitForm, CrudSearchComponentProps, CrudSearchOption, CrudWizardProp, CurdFormFieldsProps, DateBasedFieldProps, EnumCrudField, FileCrudFieldProps, FormBuilderFunc, FormBuilderFunc0, GetFormFieldOptions, ImageCrudFieldProps, InitialCrudField, NumberBasedFieldProps, ObjectCrudField, ReportCrudFields, SearchOnlyFields, SelectCrudField, SelectFieldItem, TextAreaBasedFieldProps, TextBasedFieldProps, TimeBasedFieldProps, } from './crud';
|
package/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { TRANSLATION_NAMESPACE as o } from "./locale/hooks/translation-constants.js";
|
|
2
2
|
import { setupI18n as d, updateTranslations as a } from "./locale/index.js";
|
|
3
|
-
import { default as u } from "./
|
|
4
|
-
import { ColorCrudFieldComponent as m, default as p, SelectCrudFieldComponent as f } from "./
|
|
5
|
-
import { default as n } from "./
|
|
6
|
-
import { default as s } from "./
|
|
7
|
-
import { default as I } from "./
|
|
8
|
-
import { CrudForm as S, CrudFormFields as V } from "./
|
|
9
|
-
import { FileCellValue as N, FileCrudCellValue as P, default as T } from "./
|
|
10
|
-
import { FileDownloadProvider as v, FileUploadProvider as E, ImageCellValue as R, ImageCrudCellValue as h, default as w } from "./
|
|
3
|
+
import { default as u } from "./crud/CrudComponent.js";
|
|
4
|
+
import { ColorCrudFieldComponent as m, default as p, SelectCrudFieldComponent as f } from "./crud/CrudField.js";
|
|
5
|
+
import { default as n } from "./crud/CrudFormWizard.js";
|
|
6
|
+
import { default as s } from "./crud/CrudReportComponent.js";
|
|
7
|
+
import { default as I } from "./crud/CrudSearchComponent.js";
|
|
8
|
+
import { CrudForm as S, CrudFormFields as V } from "./crud/CrudForm.js";
|
|
9
|
+
import { FileCellValue as N, FileCrudCellValue as P, default as T } from "./crud/FileCrudField.js";
|
|
10
|
+
import { FileDownloadProvider as v, FileUploadProvider as E, ImageCellValue as R, ImageCrudCellValue as h, default as w } from "./crud/ImageCrudField.js";
|
|
11
11
|
export {
|
|
12
12
|
m as ColorCrudFieldComponent,
|
|
13
13
|
u as CrudComponent,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kingteza/crud-component",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.29",
|
|
5
5
|
"description": "React CRUD component library with Ant Design",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"react",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"scripts": {
|
|
34
34
|
"dev": "vite",
|
|
35
35
|
"clean": "rm -rf dist",
|
|
36
|
-
"build": "npm run clean && tsc && vite build && cp package.json README.md dist/",
|
|
36
|
+
"build": "npm run clean && tsc && vite build && cp package.json README.md .npmignore dist/",
|
|
37
37
|
"publish-npm": "yarn build && cd dist && npm whoami >/dev/null 2>&1 || npm login && npm publish",
|
|
38
38
|
"lint": "eslint .",
|
|
39
39
|
"preview": "vite preview"
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"require": "./index.cjs"
|
|
46
46
|
},
|
|
47
47
|
"./common": {
|
|
48
|
-
"types": "./
|
|
49
|
-
"import": "./
|
|
50
|
-
"require": "./
|
|
48
|
+
"types": "./common/index.d.ts",
|
|
49
|
+
"import": "./common/index.js",
|
|
50
|
+
"require": "./common/index.cjs"
|
|
51
51
|
},
|
|
52
52
|
"./util": {
|
|
53
53
|
"types": "./util/index.d.ts",
|