@kingteza/crud-component 1.0.66 → 1.2.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/package.json +21 -11
- package/release.config.cjs +27 -0
- package/App.d.ts +0 -151
- package/Play.d.ts +0 -2
- package/common/appearance/Hider.cjs.js +0 -1
- package/common/appearance/Hider.d.ts +0 -6
- package/common/appearance/Hider.es.js +0 -5
- package/common/appearance/index.d.ts +0 -1
- package/common/button/Button.cjs.js +0 -1
- package/common/button/Button.d.ts +0 -11
- package/common/button/Button.es.js +0 -57
- package/common/button/CloneButtonTable.cjs.js +0 -1
- package/common/button/CloneButtonTable.d.ts +0 -6
- package/common/button/CloneButtonTable.es.js +0 -19
- package/common/button/DeleteButtonTable.cjs.js +0 -1
- package/common/button/DeleteButtonTable.d.ts +0 -13
- package/common/button/DeleteButtonTable.es.js +0 -64
- package/common/button/ExportButton.cjs.js +0 -1
- package/common/button/ExportButton.d.ts +0 -4
- package/common/button/ExportButton.es.js +0 -26
- package/common/button/HideButtonTable.cjs.js +0 -1
- package/common/button/HideButtonTable.d.ts +0 -13
- package/common/button/HideButtonTable.es.js +0 -67
- package/common/button/ImportButton.cjs.js +0 -1
- package/common/button/ImportButton.d.ts +0 -9
- package/common/button/ImportButton.es.js +0 -55
- package/common/button/NewButton.cjs.js +0 -1
- package/common/button/NewButton.d.ts +0 -12
- package/common/button/NewButton.es.js +0 -23
- package/common/button/PrintButton.cjs.js +0 -1
- package/common/button/PrintButton.d.ts +0 -12
- package/common/button/PrintButton.es.js +0 -25
- package/common/button/RefreshButton.cjs.js +0 -1
- package/common/button/RefreshButton.d.ts +0 -11
- package/common/button/RefreshButton.es.js +0 -23
- package/common/button/UnHideButton.cjs.js +0 -1
- package/common/button/UnHideButton.d.ts +0 -14
- package/common/button/UnHideButton.es.js +0 -69
- package/common/button/UpdateButtonTable.cjs.js +0 -1
- package/common/button/UpdateButtonTable.d.ts +0 -6
- package/common/button/UpdateButtonTable.es.js +0 -19
- package/common/button/ViewButtonTable.cjs.js +0 -1
- package/common/button/ViewButtonTable.d.ts +0 -6
- package/common/button/ViewButtonTable.es.js +0 -19
- package/common/button/index.d.ts +0 -14
- package/common/check-box/CheckBox.cjs.js +0 -1
- package/common/check-box/CheckBox.d.ts +0 -9
- package/common/check-box/CheckBox.es.js +0 -40
- package/common/check-box/index.d.ts +0 -2
- package/common/date-picker/DatePicker.cjs.js +0 -1
- package/common/date-picker/DatePicker.d.ts +0 -37
- package/common/date-picker/DatePicker.es.js +0 -87
- package/common/date-picker/TimePicker.cjs.js +0 -1
- package/common/date-picker/TimePicker.d.ts +0 -34
- package/common/date-picker/TimePicker.es.js +0 -77
- package/common/date-picker/index.d.ts +0 -3
- package/common/description/DescList.cjs.js +0 -1
- package/common/description/DescList.d.ts +0 -18
- package/common/description/DescList.es.js +0 -16
- package/common/description/DescriptionComponent.d.ts +0 -7
- package/common/description/index.d.ts +0 -3
- package/common/icon/KIcon.cjs.js +0 -1
- package/common/icon/KIcon.d.ts +0 -9
- package/common/icon/KIcon.es.js +0 -11
- package/common/index.cjs.js +0 -1
- package/common/index.d.ts +0 -20
- package/common/index.es.js +0 -78
- package/common/layout/VerticalSpace.cjs.js +0 -1
- package/common/layout/VerticalSpace.d.ts +0 -5
- package/common/layout/VerticalSpace.es.js +0 -6
- package/common/layout/index.d.ts +0 -2
- package/common/loading/LoadingIndicator.cjs.js +0 -1
- package/common/loading/LoadingIndicator.d.ts +0 -6
- package/common/loading/LoadingIndicator.es.js +0 -23
- package/common/loading/index.d.ts +0 -2
- package/common/picker/ImagePicker.cjs.js +0 -1
- package/common/picker/ImagePicker.d.ts +0 -56
- package/common/picker/ImagePicker.es.js +0 -320
- package/common/picker/index.d.ts +0 -2
- package/common/radio/RadioGroupComponent.cjs.js +0 -1
- package/common/radio/RadioGroupComponent.d.ts +0 -18
- package/common/radio/RadioGroupComponent.es.js +0 -19
- package/common/radio/index.d.ts +0 -2
- package/common/report/SelectFieldInReport.cjs.js +0 -1
- package/common/report/SelectFieldInReport.d.ts +0 -16
- package/common/report/SelectFieldInReport.es.js +0 -30
- package/common/report/index.d.ts +0 -3
- package/common/rich/index.cjs.js +0 -1
- package/common/rich/index.d.ts +0 -10
- package/common/rich/index.es.js +0 -66
- package/common/select/CustomSelectOption.cjs.js +0 -1
- package/common/select/CustomSelectOption.d.ts +0 -7
- package/common/select/CustomSelectOption.es.js +0 -13
- package/common/select/SelectComponent.cjs.js +0 -1
- package/common/select/SelectComponent.d.ts +0 -21
- package/common/select/SelectComponent.es.js +0 -85
- package/common/select/index.d.ts +0 -3
- package/common/show-more/index.cjs.js +0 -1
- package/common/show-more/index.d.ts +0 -4
- package/common/show-more/index.es.js +0 -8
- package/common/tab/TabViewWithRoute.cjs.js +0 -1
- package/common/tab/TabViewWithRoute.d.ts +0 -13
- package/common/tab/TabViewWithRoute.es.js +0 -38
- package/common/tab/index.d.ts +0 -2
- package/common/table/index.d.ts +0 -3
- package/common/table/table.cjs.js +0 -1
- package/common/table/table.d.ts +0 -19
- package/common/table/table.es.js +0 -40
- package/common/tag/StatusTag.cjs.js +0 -1
- package/common/tag/StatusTag.d.ts +0 -14
- package/common/tag/StatusTag.es.js +0 -29
- package/common/tag/index.d.ts +0 -2
- package/common/text/index.cjs.js +0 -1
- package/common/text/index.d.ts +0 -3
- package/common/text/index.es.js +0 -5
- package/common/text/title/TitleWithHeadTitle.d.ts +0 -7
- package/common/text/title/index.cjs.js +0 -1
- package/common/text/title/index.d.ts +0 -1
- package/common/text/title/index.es.js +0 -5
- package/common/text-field/NumberField.cjs.js +0 -1
- package/common/text-field/NumberField.d.ts +0 -13
- package/common/text-field/NumberField.es.js +0 -82
- package/common/text-field/PhoneNumberField.cjs.js +0 -1
- package/common/text-field/PhoneNumberField.d.ts +0 -4
- package/common/text-field/PhoneNumberField.es.js +0 -18
- package/common/text-field/TextArea.cjs.js +0 -1
- package/common/text-field/TextArea.d.ts +0 -17
- package/common/text-field/TextArea.es.js +0 -46
- package/common/text-field/TextField.cjs.js +0 -1
- package/common/text-field/TextField.d.ts +0 -27
- package/common/text-field/TextField.es.js +0 -72
- package/common/text-field/index.d.ts +0 -5
- package/common/tooltip/TooltipComponent.cjs.js +0 -1
- package/common/tooltip/TooltipComponent.d.ts +0 -5
- package/common/tooltip/TooltipComponent.es.js +0 -9
- package/common/tooltip/index.d.ts +0 -2
- package/common/wizard/WizardResult.cjs.js +0 -1
- package/common/wizard/WizardResult.d.ts +0 -16
- package/common/wizard/WizardResult.es.js +0 -58
- package/common/wizard/WizardViewForm.cjs.js +0 -1
- package/common/wizard/WizardViewForm.d.ts +0 -24
- package/common/wizard/WizardViewForm.es.js +0 -74
- package/common/wizard/index.d.ts +0 -3
- package/crud/CrudComponent.cjs.js +0 -1
- package/crud/CrudComponent.d.ts +0 -244
- package/crud/CrudComponent.es.js +0 -123
- package/crud/CrudField.cjs.js +0 -1
- package/crud/CrudField.d.ts +0 -4
- package/crud/CrudField.es.js +0 -449
- package/crud/CrudForm.cjs.js +0 -1
- package/crud/CrudForm.d.ts +0 -14
- package/crud/CrudForm.es.js +0 -103
- package/crud/CrudFormWizard.cjs.js +0 -1
- package/crud/CrudFormWizard.d.ts +0 -14
- package/crud/CrudFormWizard.es.js +0 -140
- package/crud/CrudReportComponent.cjs.js +0 -4
- package/crud/CrudReportComponent.d.ts +0 -44
- package/crud/CrudReportComponent.es.js +0 -255
- package/crud/CrudSearchComponent.cjs.js +0 -1
- package/crud/CrudSearchComponent.d.ts +0 -21
- package/crud/CrudSearchComponent.es.js +0 -96
- package/crud/CrudTextAreaComponent.cjs.js +0 -1
- package/crud/CrudTextAreaComponent.d.ts +0 -22
- package/crud/CrudTextAreaComponent.es.js +0 -52
- package/crud/FileCrudField.cjs.js +0 -1
- package/crud/FileCrudField.d.ts +0 -25
- package/crud/FileCrudField.es.js +0 -219
- package/crud/ImageCrudField.cjs.js +0 -1
- package/crud/ImageCrudField.d.ts +0 -38
- package/crud/ImageCrudField.es.js +0 -113
- package/crud/actions/index.cjs.js +0 -1
- package/crud/actions/index.d.ts +0 -26
- package/crud/actions/index.es.js +0 -88
- package/crud/import/CrudImportButton.cjs.js +0 -1
- package/crud/import/CrudImportButton.d.ts +0 -3
- package/crud/import/CrudImportButton.es.js +0 -30
- package/crud/import/CrudImportComponent.cjs.js +0 -2
- package/crud/import/CrudImportComponent.d.ts +0 -14
- package/crud/import/CrudImportComponent.es.js +0 -222
- package/crud/index.d.ts +0 -23
- package/crud/modal/index.cjs.js +0 -1
- package/crud/modal/index.d.ts +0 -24
- package/crud/modal/index.es.js +0 -146
- package/crud/view/CrudDecListView.cjs.js +0 -1
- package/crud/view/CrudDecListView.d.ts +0 -15
- package/crud/view/CrudDecListView.es.js +0 -57
- package/crud/view/CrudViewer.cjs.js +0 -1
- package/crud/view/CrudViewer.d.ts +0 -43
- package/crud/view/CrudViewer.es.js +0 -304
- package/crud/view/CrudViewerUtil.cjs.js +0 -1
- package/crud/view/CrudViewerUtil.d.ts +0 -2
- package/crud/view/CrudViewerUtil.es.js +0 -98
- package/crud/view/index.d.ts +0 -5
- package/hooks/NavigatorHooks.cjs.js +0 -1
- package/hooks/NavigatorHooks.d.ts +0 -1
- package/hooks/NavigatorHooks.es.js +0 -9
- package/icons/FlipHIcon.cjs.js +0 -1
- package/icons/FlipHIcon.d.ts +0 -3
- package/icons/FlipHIcon.es.js +0 -28
- package/icons/FlipVIcon.cjs.js +0 -1
- package/icons/FlipVIcon.d.ts +0 -3
- package/icons/FlipVIcon.es.js +0 -28
- package/index.cjs.js +0 -1
- package/index.d.ts +0 -4
- package/index.es.js +0 -46
- package/locale/hooks/translation-constants.cjs.js +0 -1
- package/locale/hooks/translation-constants.d.ts +0 -1
- package/locale/hooks/translation-constants.es.js +0 -4
- package/locale/index.cjs.js +0 -1
- package/locale/index.d.ts +0 -85
- package/locale/index.es.js +0 -57
- package/locale/translations/en.cjs.js +0 -1
- package/locale/translations/en.d.ts +0 -63
- package/locale/translations/en.es.js +0 -65
- package/main.d.ts +0 -0
- package/types/DialogComponentProp.d.ts +0 -8
- package/types/Id.d.ts +0 -10
- package/util/CrudUtil.cjs.js +0 -1
- package/util/CrudUtil.d.ts +0 -5
- package/util/CrudUtil.es.js +0 -8
- package/util/DateUtil.cjs.js +0 -1
- package/util/DateUtil.d.ts +0 -7
- package/util/DateUtil.es.js +0 -18
- package/util/ImageUtil.cjs.js +0 -1
- package/util/ImageUtil.d.ts +0 -14
- package/util/ImageUtil.es.js +0 -63
- package/util/NumberUtil.cjs.js +0 -1
- package/util/NumberUtil.d.ts +0 -17
- package/util/NumberUtil.es.js +0 -60
- package/util/ValidationUtil.cjs.js +0 -1
- package/util/ValidationUtil.d.ts +0 -14
- package/util/ValidationUtil.es.js +0 -63
- package/util/index.cjs.js +0 -1
- package/util/index.d.ts +0 -4
- package/util/index.es.js +0 -10
- package/vite-env.d.ts +0 -1
package/common/icon/KIcon.es.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import c from "@ant-design/icons";
|
|
3
|
-
import { Icon as e } from "@iconify/react";
|
|
4
|
-
import { useMemo as s } from "react";
|
|
5
|
-
const f = (o) => (r) => /* @__PURE__ */ t(e, { ...r, icon: o }), u = ({ icon: o, component: r, ...n }) => {
|
|
6
|
-
const m = s(() => r ?? f(o), [o, r]);
|
|
7
|
-
return /* @__PURE__ */ t(c, { ...n, component: m });
|
|
8
|
-
};
|
|
9
|
-
export {
|
|
10
|
-
u as default
|
|
11
|
-
};
|
package/common/index.cjs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./show-more/index.cjs.js"),t=require("./text/index.cjs.js"),o=require("./rich/index.cjs.js"),r=require("./appearance/Hider.cjs.js"),n=require("./button/Button.cjs.js"),i=require("./button/CloneButtonTable.cjs.js"),u=require("./button/DeleteButtonTable.cjs.js"),c=require("./button/HideButtonTable.cjs.js"),s=require("./button/UnHideButton.cjs.js"),a=require("./button/UpdateButtonTable.cjs.js"),l=require("./button/ViewButtonTable.cjs.js"),d=require("./check-box/CheckBox.cjs.js"),q=require("./date-picker/DatePicker.cjs.js"),p=require("./date-picker/TimePicker.cjs.js"),T=require("./description/DescList.cjs.js"),B=require("./layout/VerticalSpace.cjs.js"),m=require("./loading/LoadingIndicator.cjs.js"),b=require("./picker/ImagePicker.cjs.js"),x=require("./select/SelectComponent.cjs.js"),C=require("./select/CustomSelectOption.cjs.js"),R=require("./table/table.cjs.js"),S=require("./tag/StatusTag.cjs.js"),h=require("./text-field/NumberField.cjs.js"),w=require("./text-field/PhoneNumberField.cjs.js"),P=require("./text-field/TextField.cjs.js"),F=require("./text-field/TextArea.cjs.js"),I=require("./tooltip/TooltipComponent.cjs.js"),V=require("./wizard/WizardResult.cjs.js"),g=require("./wizard/WizardViewForm.cjs.js"),k=require("./button/ExportButton.cjs.js"),f=require("./button/ImportButton.cjs.js"),W=require("./button/NewButton.cjs.js"),D=require("./button/PrintButton.cjs.js"),H=require("./button/RefreshButton.cjs.js"),N=require("./radio/RadioGroupComponent.cjs.js"),E=require("./report/SelectFieldInReport.cjs.js"),z=require("./tab/TabViewWithRoute.cjs.js"),L=require("./text/title/index.cjs.js");exports.ShowMore=e.ShowMore;exports.Text=t.Text;exports.RichTextEditor=o.RichTextEditor;exports.Hider=r;exports.ButtonComponent=n;exports.CloneButtonTable=i;exports.DeleteButtonTable=u;exports.HideButtonTable=c;exports.UnHideButton=s;exports.UpdateButtonTable=a;exports.ViewButtonTable=l;exports.CheckBoxComponent=d;exports.DatePickerComponent=q;exports.TimePickerComponent=p;exports.DescList=T;exports.VerticalSpace=B;exports.LoadingIndicator=m;exports.ImagePicker=b.default;exports.SelectComponent=x;exports.CustomSelectOption=C;exports.TableComponent=R;exports.StatusTag=S;exports.NumberTextField=h;exports.PhoneField=w;exports.TextField=P.default;exports.TextAreaComponent=F.default;exports.TooltipComponent=I;exports.WizardResult=V;exports.WizardViewForm=g;exports.ExportButton=k.ExportButton;exports.ImportButton=f.ImportButton;exports.NewButton=W.NewButton;exports.PrintButton=D.PrintButton;exports.RefreshButton=H.RefreshButton;exports.RadioGroupComponent=N;exports.SelectFieldInReport=E.SelectFieldInReport;exports.TabViewWithRoute=z.TabViewWithRoute;exports.Title=L.Title;
|
package/common/index.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export * from './appearance';
|
|
2
|
-
export * from './button';
|
|
3
|
-
export * from './check-box';
|
|
4
|
-
export * from './date-picker';
|
|
5
|
-
export * from './description';
|
|
6
|
-
export * from './layout';
|
|
7
|
-
export * from './loading';
|
|
8
|
-
export * from './picker';
|
|
9
|
-
export * from './radio';
|
|
10
|
-
export * from './report';
|
|
11
|
-
export * from './select';
|
|
12
|
-
export * from './show-more';
|
|
13
|
-
export * from './tab';
|
|
14
|
-
export * from './table';
|
|
15
|
-
export * from './tag';
|
|
16
|
-
export * from './text';
|
|
17
|
-
export * from './text-field';
|
|
18
|
-
export * from './tooltip';
|
|
19
|
-
export * from './wizard';
|
|
20
|
-
export * from './rich';
|
package/common/index.es.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { ShowMore as o } from "./show-more/index.es.js";
|
|
2
|
-
import { Text as a } from "./text/index.es.js";
|
|
3
|
-
import { RichTextEditor as p } from "./rich/index.es.js";
|
|
4
|
-
import { default as l } from "./appearance/Hider.es.js";
|
|
5
|
-
import { default as x } from "./button/Button.es.js";
|
|
6
|
-
import { default as n } from "./button/CloneButtonTable.es.js";
|
|
7
|
-
import { default as i } from "./button/DeleteButtonTable.es.js";
|
|
8
|
-
import { default as B } from "./button/HideButtonTable.es.js";
|
|
9
|
-
import { default as C } from "./button/UnHideButton.es.js";
|
|
10
|
-
import { default as h } from "./button/UpdateButtonTable.es.js";
|
|
11
|
-
import { default as S } from "./button/ViewButtonTable.es.js";
|
|
12
|
-
import { default as F } from "./check-box/CheckBox.es.js";
|
|
13
|
-
import { default as k } from "./date-picker/DatePicker.es.js";
|
|
14
|
-
import { default as V } from "./date-picker/TimePicker.es.js";
|
|
15
|
-
import { default as D } from "./description/DescList.es.js";
|
|
16
|
-
import { default as W } from "./layout/VerticalSpace.es.js";
|
|
17
|
-
import { default as E } from "./loading/LoadingIndicator.es.js";
|
|
18
|
-
import { default as N } from "./picker/ImagePicker.es.js";
|
|
19
|
-
import { default as A } from "./select/SelectComponent.es.js";
|
|
20
|
-
import { default as M } from "./select/CustomSelectOption.es.js";
|
|
21
|
-
import { default as j } from "./table/table.es.js";
|
|
22
|
-
import { default as v } from "./tag/StatusTag.es.js";
|
|
23
|
-
import { default as J } from "./text-field/NumberField.es.js";
|
|
24
|
-
import { default as Q } from "./text-field/PhoneNumberField.es.js";
|
|
25
|
-
import { default as Y } from "./text-field/TextField.es.js";
|
|
26
|
-
import { default as _ } from "./text-field/TextArea.es.js";
|
|
27
|
-
import { default as ee } from "./tooltip/TooltipComponent.es.js";
|
|
28
|
-
import { default as oe } from "./wizard/WizardResult.es.js";
|
|
29
|
-
import { default as ae } from "./wizard/WizardViewForm.es.js";
|
|
30
|
-
import { ExportButton as pe } from "./button/ExportButton.es.js";
|
|
31
|
-
import { ImportButton as le } from "./button/ImportButton.es.js";
|
|
32
|
-
import { NewButton as xe } from "./button/NewButton.es.js";
|
|
33
|
-
import { PrintButton as ne } from "./button/PrintButton.es.js";
|
|
34
|
-
import { RefreshButton as ie } from "./button/RefreshButton.es.js";
|
|
35
|
-
import { default as Be } from "./radio/RadioGroupComponent.es.js";
|
|
36
|
-
import { SelectFieldInReport as Ce } from "./report/SelectFieldInReport.es.js";
|
|
37
|
-
import { TabViewWithRoute as he } from "./tab/TabViewWithRoute.es.js";
|
|
38
|
-
import { Title as Se } from "./text/title/index.es.js";
|
|
39
|
-
export {
|
|
40
|
-
x as ButtonComponent,
|
|
41
|
-
F as CheckBoxComponent,
|
|
42
|
-
n as CloneButtonTable,
|
|
43
|
-
M as CustomSelectOption,
|
|
44
|
-
k as DatePickerComponent,
|
|
45
|
-
i as DeleteButtonTable,
|
|
46
|
-
D as DescList,
|
|
47
|
-
pe as ExportButton,
|
|
48
|
-
B as HideButtonTable,
|
|
49
|
-
l as Hider,
|
|
50
|
-
N as ImagePicker,
|
|
51
|
-
le as ImportButton,
|
|
52
|
-
E as LoadingIndicator,
|
|
53
|
-
xe as NewButton,
|
|
54
|
-
J as NumberTextField,
|
|
55
|
-
Q as PhoneField,
|
|
56
|
-
ne as PrintButton,
|
|
57
|
-
Be as RadioGroupComponent,
|
|
58
|
-
ie as RefreshButton,
|
|
59
|
-
p as RichTextEditor,
|
|
60
|
-
A as SelectComponent,
|
|
61
|
-
Ce as SelectFieldInReport,
|
|
62
|
-
o as ShowMore,
|
|
63
|
-
v as StatusTag,
|
|
64
|
-
he as TabViewWithRoute,
|
|
65
|
-
j as TableComponent,
|
|
66
|
-
a as Text,
|
|
67
|
-
_ as TextAreaComponent,
|
|
68
|
-
Y as TextField,
|
|
69
|
-
V as TimePickerComponent,
|
|
70
|
-
Se as Title,
|
|
71
|
-
ee as TooltipComponent,
|
|
72
|
-
C as UnHideButton,
|
|
73
|
-
h as UpdateButtonTable,
|
|
74
|
-
W as VerticalSpace,
|
|
75
|
-
S as ViewButtonTable,
|
|
76
|
-
oe as WizardResult,
|
|
77
|
-
ae as WizardViewForm
|
|
78
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),c=require("antd"),s=({children:e,className:t=""})=>r.jsx(c.Space,{direction:"vertical",className:[t,"w-100"].join(" "),children:e});module.exports=s;
|
package/common/layout/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),r=require("antd"),i=require("../../locale/index.cjs.js"),o=require("../button/Button.cjs.js"),u=({loading:s,children:n,error:a})=>{const{t:e}=i.useTranslationLib();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(o,{to:-1,type:"primary",children:e("str.goBack")})}):n})};module.exports=u;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { Skeleton as n, Result as s } from "antd";
|
|
3
|
-
import { useTranslationLib as i } from "../../locale/index.es.js";
|
|
4
|
-
import m from "../button/Button.es.js";
|
|
5
|
-
const d = ({ loading: o, children: e, error: a }) => {
|
|
6
|
-
const { t: r } = i();
|
|
7
|
-
return (
|
|
8
|
-
// <Spin spinning={loading} className="h-100">
|
|
9
|
-
/* @__PURE__ */ t(n, { loading: o, paragraph: !0, className: "h-100", children: a ? /* @__PURE__ */ t(
|
|
10
|
-
s,
|
|
11
|
-
{
|
|
12
|
-
status: "404",
|
|
13
|
-
title: 404,
|
|
14
|
-
subTitle: r("err.notFound"),
|
|
15
|
-
className: "",
|
|
16
|
-
extra: /* @__PURE__ */ t(m, { to: -1, type: "primary", children: r("str.goBack") })
|
|
17
|
-
}
|
|
18
|
-
) : e })
|
|
19
|
-
);
|
|
20
|
-
};
|
|
21
|
-
export {
|
|
22
|
-
d as default
|
|
23
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),je=require("react-advanced-cropper");;/* empty css */;/* empty css */const O=require("@ant-design/icons"),U=require("antd"),s=require("react"),he=require("../../locale/index.cjs.js"),I=require("../button/Button.cjs.js"),we=require("../../util/ImageUtil.cjs.js"),Ce=require("../../icons/FlipHIcon.cjs.js"),be=require("../../icons/FlipVIcon.cjs.js"),ve=U.Form.Item,Y="crud-component.image-picker.button-state";function Z(o){return new Promise((u,p)=>{const n=new FileReader;n.readAsDataURL(o),n.onload=()=>u(n.result),n.onerror=m=>p(m)})}const Se=({values:o=[],required:u,buttonType:p,label:n,name:m,onChange:f,aspectRatio:h,buttonTitle:w,hidePreview:C,buttonSize:g="large",showButtonText:x=!0,showOnlyIcon:_=!1,icon:k=t.jsx(O.UploadOutlined,{}),loading:F,maxCount:b=1,onAdd:a,onRemove:R,listType:q,...A})=>{const[te,re]=s.useState(""),[se,oe]=s.useState(""),[ne,B]=s.useState(!1),T=s.useRef(),l=s.useRef(null),[i,z]=s.useState([]),[j,P]=s.useState(),ie=s.useRef(),ae=()=>B(!1),ce=async e=>{!e.url&&!e.preview&&(e.preview=await Z(e.originFileObj)),oe(e.url||e.preview),B(!0),re(e.name)},[D,N]=s.useState(!1),H=e=>{var r;(r=l.current)==null||r.rotateImage(e?-90:90)},L=s.useCallback(e=>{var r;l.current&&((r=l.current)==null||r.flipImage(e==="h",e==="v"))},[]);s.useEffect(()=>{f==null||f(i[0],i)},[i,f]);const le=async()=>{var y;const e=(y=l.current)==null?void 0:y.getCanvas(),{type:r,size:c,name:v,uid:S}=T.current;N(!0),e==null||e.toBlob(async ge=>{const xe=Object.assign(new File([ge],v,{type:r}),{uid:S}),Q=await we.resizeImage(xe),E=await Z(Q);console.log({url:E});const X={url:E,name:v,uid:S,type:r,size:c,thumbUrl:E,originFileObj:Q};if(a)try{N(!0),await a(X)}finally{N(!1)}z([X,...i]),N(!1)}),P(void 0)},ue=()=>{P(void 0),T.current=void 0},V=s.useCallback(e=>{const r=e;if(r){T.current=r;const c=new FileReader;c.addEventListener("load",()=>{var v;if(typeof c.result=="string"){P(c.result);const S=localStorage.getItem(Y),y=S?JSON.parse(S):void 0;y&&((v=l.current)==null||v.setState(y)),setTimeout(()=>{K(l.current)},100)}}),c.readAsDataURL(r)}},[]);s.useEffect(()=>{if(o!=null&&o.length||typeof o=="string"){const e=Array.isArray(o)?o.map(r=>[{uid:o,url:r}]):[{uid:o,url:o}];z(e)}},[o]);const{t:d}=he.useTranslationLib(),de=s.useMemo(()=>u?{required:u,validator:(e,r,c)=>{j||i!=null&&i.length?c():c(`${n??""} ${d("err.validation.required")}`)}}:void 0,[u,j,i==null?void 0:i.length,n,d]),J=w??d("message.uploadButtonText"),W=s.useMemo(()=>t.jsx(ee,{showLoadingIndicator:D,_buttonTitle:J,buttonSize:g,buttonType:p,fileList:i,hidePreview:C,icon:k,loading:F,listType:q,maxCount:b,onChangeFile:V,onRemove:R,showButtonText:x,handlePreview:ce,setFileList:z}),[D,J,g,p,i,C,k,F,q,b,V,R,x]);ie.current=W.props.beforeUpload;const[pe,$]=s.useState(0),[me,G]=s.useState(0),[M,fe]=s.useState();s.useEffect(()=>{const e=setTimeout(()=>{M&&localStorage.setItem(Y,JSON.stringify(M))},400);return()=>clearTimeout(e)},[M]),s.useEffect(()=>{if(!j){$(0),G(0);const e=setTimeout(()=>{var r;(r=l.current)==null||r.reset()},1500);return()=>clearTimeout(e)}},[j]);const K=s.useCallback(async e=>{if(e){const r=e.getCoordinates();fe(e.getState()),$((r==null?void 0:r.width)??10),G((r==null?void 0:r.height)??10)}},[]);return t.jsxs(t.Fragment,{children:[t.jsx(ve,{label:n,...A,name:m,className:"mb-0",rules:[de,...A.rules??[]],children:W}),t.jsxs(U.Modal,{open:!!j,maskClosable:!1,onOk:le,closable:!1,onCancel:ue,destroyOnHidden:!0,children:[t.jsx(je.Cropper,{ref:l,stencilProps:{grid:!0},style:{border:"1px solid black"},src:j,onChange:e=>{K(e)},aspectRatio:h?{minimum:h,maximum:h}:void 0}),t.jsx("p",{className:"text-center",children:[pe,me].join(" ⨉ ")}),t.jsx("div",{className:"mt-2 d-flex justify-content-center",children:t.jsxs(U.Space.Compact,{children:[t.jsx(I,{size:"large",tooltip:d("str.rotateLeft"),icon:t.jsx(O.RotateLeftOutlined,{}),onClick:()=>H(!0)}),t.jsx(I,{size:"large",icon:t.jsx(O.RotateRightOutlined,{}),tooltip:d("str.rotateRight"),onClick:()=>H(!1)}),t.jsx(I,{size:"large",icon:t.jsx(Ce,{}),tooltip:d("str.flipHorizontal"),onClick:()=>L("h")}),t.jsx(I,{size:"large",icon:t.jsx(be,{}),tooltip:d("str.flipVertical"),onClick:()=>L("v")})]})})]}),t.jsx(U.Modal,{open:ne,title:te,footer:null,onCancel:ae,children:t.jsx("div",{className:"text-center",children:t.jsx("img",{alt:"example",style:{maxWidth:"400px"},src:se})})})]})},ee=({_buttonTitle:o,buttonSize:u,buttonType:p,fileList:n,hidePreview:m,icon:f,loading:h,maxCount:w,onChangeFile:C,onRemove:g,showButtonText:x,handlePreview:_,setFileList:k,showLoadingIndicator:F,listType:b="picture"})=>t.jsxs(U.Upload,{accept:"image/x-png,image/gif,image/jpeg",fileList:n,defaultFileList:n,onChange:()=>{},className:(n.length>=w?" hide-upload ":"")+" mb-0",multiple:!1,onPreview:m?void 0:_,onDrop:a=>(C(a.dataTransfer.files.item(0)),!1),listType:b,showUploadList:!m,onRemove:a=>{const R=n.filter(q=>a.uid!==q.uid);g==null||g(a),k(R)},beforeUpload:async a=>(C(a),!1),maxCount:w,children:[F&&t.jsx(O.LoadingOutlined,{}),t.jsx("div",{className:"d-flex flex-column",children:n.length<w&&(b==="picture-circle"?t.jsx(O.UploadOutlined,{}):t.jsx(I,{loading:h,tooltip:x?void 0:o,size:u,icon:f,type:x?p:"text",children:x?o:void 0}))})]},n.length);exports.UploadComponent=ee;exports.default=Se;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { FormItemProps } from 'antd';
|
|
2
|
-
import { UploadFile } from 'antd/lib/upload/interface';
|
|
3
|
-
import { FC, ReactElement } from 'react';
|
|
4
|
-
import { UploadListType } from 'antd/es/upload/interface';
|
|
5
|
-
export declare function dataURLtoFile({ url, name }: {
|
|
6
|
-
url: any;
|
|
7
|
-
name: any;
|
|
8
|
-
}): File;
|
|
9
|
-
interface Props extends FormItemProps {
|
|
10
|
-
values?: string[] | string;
|
|
11
|
-
maxCount?: number;
|
|
12
|
-
onChange?: (file?: UploadFile, allFiles?: UploadFile[]) => void;
|
|
13
|
-
buttonTitle?: string;
|
|
14
|
-
listType?: UploadListType;
|
|
15
|
-
hidePreview?: boolean;
|
|
16
|
-
buttonSize?: string;
|
|
17
|
-
showButtonText?: boolean;
|
|
18
|
-
aspectRatio?: number;
|
|
19
|
-
showOnlyIcon?: boolean;
|
|
20
|
-
icon?: ReactElement;
|
|
21
|
-
loading?: boolean;
|
|
22
|
-
buttonType?: string;
|
|
23
|
-
onAdd?: (file?: UploadFile) => Promise<void>;
|
|
24
|
-
onRemove?: (file?: UploadFile) => void;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* When submitting Uploader
|
|
28
|
-
* ```
|
|
29
|
-
* if(field === undefined)
|
|
30
|
-
* "There is no file uploaded"
|
|
31
|
-
* else if(field.fileList.length === 0)
|
|
32
|
-
* "The initial file is deleted"
|
|
33
|
-
* else if(field.fileList.length > 1)
|
|
34
|
-
* "A new file has been uploaded"
|
|
35
|
-
* ```
|
|
36
|
-
*
|
|
37
|
-
*/
|
|
38
|
-
declare const ImagePicker: FC<Props>;
|
|
39
|
-
export declare const UploadComponent: FC<{
|
|
40
|
-
_buttonTitle: any;
|
|
41
|
-
buttonSize: any;
|
|
42
|
-
buttonType: any;
|
|
43
|
-
fileList: any;
|
|
44
|
-
hidePreview: any;
|
|
45
|
-
icon: any;
|
|
46
|
-
loading: any;
|
|
47
|
-
maxCount: any;
|
|
48
|
-
onChangeFile: any;
|
|
49
|
-
onRemove: any;
|
|
50
|
-
showButtonText: any;
|
|
51
|
-
handlePreview: any;
|
|
52
|
-
setFileList: any;
|
|
53
|
-
showLoadingIndicator?: boolean;
|
|
54
|
-
listType?: UploadListType;
|
|
55
|
-
}>;
|
|
56
|
-
export default ImagePicker;
|
|
@@ -1,320 +0,0 @@
|
|
|
1
|
-
import { jsx as r, jsxs as z, Fragment as Ie } from "react/jsx-runtime";
|
|
2
|
-
import { Cropper as xe } from "react-advanced-cropper";
|
|
3
|
-
/* empty css */
|
|
4
|
-
/* empty css */
|
|
5
|
-
import { RotateLeftOutlined as Fe, RotateRightOutlined as Oe, UploadOutlined as ne, LoadingOutlined as Se } from "@ant-design/icons";
|
|
6
|
-
import { Form as Ue, Modal as te, Space as ke, Upload as Re } from "antd";
|
|
7
|
-
import H, { useRef as L, useState as w, useCallback as V, useEffect as j, useMemo as re } from "react";
|
|
8
|
-
import { useTranslationLib as Ne } from "../../locale/index.es.js";
|
|
9
|
-
import O from "../button/Button.es.js";
|
|
10
|
-
import je from "../../util/ImageUtil.es.js";
|
|
11
|
-
import ze from "../../icons/FlipHIcon.es.js";
|
|
12
|
-
import Te from "../../icons/FlipVIcon.es.js";
|
|
13
|
-
const Pe = Ue.Item, oe = "crud-component.image-picker.button-state";
|
|
14
|
-
function ie(o) {
|
|
15
|
-
return new Promise((c, m) => {
|
|
16
|
-
const i = new FileReader();
|
|
17
|
-
i.readAsDataURL(o), i.onload = () => c(i.result), i.onerror = (p) => m(p);
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
const Ke = ({
|
|
21
|
-
values: o = [],
|
|
22
|
-
required: c,
|
|
23
|
-
buttonType: m,
|
|
24
|
-
label: i,
|
|
25
|
-
name: p,
|
|
26
|
-
onChange: u,
|
|
27
|
-
aspectRatio: C,
|
|
28
|
-
buttonTitle: b,
|
|
29
|
-
hidePreview: v,
|
|
30
|
-
buttonSize: f = "large",
|
|
31
|
-
showButtonText: g = !0,
|
|
32
|
-
showOnlyIcon: _ = !1,
|
|
33
|
-
icon: S = /* @__PURE__ */ r(ne, {}),
|
|
34
|
-
loading: U,
|
|
35
|
-
maxCount: y = 1,
|
|
36
|
-
onAdd: s,
|
|
37
|
-
onRemove: k,
|
|
38
|
-
listType: R,
|
|
39
|
-
...E
|
|
40
|
-
}) => {
|
|
41
|
-
const [se, ae] = H.useState(""), [le, ce] = H.useState(""), [de, M] = H.useState(!1), T = L(), l = L(null), [n, P] = w([]), [h, B] = w(), me = L(), pe = () => M(!1), ue = async (e) => {
|
|
42
|
-
!e.url && !e.preview && (e.preview = await ie(e.originFileObj)), ce(e.url || e.preview), M(!0), ae(e.name);
|
|
43
|
-
}, [J, N] = w(!1), W = (e) => {
|
|
44
|
-
var t;
|
|
45
|
-
(t = l.current) == null || t.rotateImage(e ? -90 : 90);
|
|
46
|
-
}, $ = V((e) => {
|
|
47
|
-
var t;
|
|
48
|
-
l.current && ((t = l.current) == null || t.flipImage(e === "h", e === "v"));
|
|
49
|
-
}, []);
|
|
50
|
-
j(() => {
|
|
51
|
-
u == null || u(n[0], n);
|
|
52
|
-
}, [n, u]);
|
|
53
|
-
const fe = async () => {
|
|
54
|
-
var F;
|
|
55
|
-
const e = (F = l.current) == null ? void 0 : F.getCanvas(), { type: t, size: a, name: I, uid: x } = T.current;
|
|
56
|
-
N(!0), e == null || e.toBlob(async (ve) => {
|
|
57
|
-
const ye = Object.assign(new File([ve], I, { type: t }), {
|
|
58
|
-
uid: x
|
|
59
|
-
}), q = await je.resizeImage(ye), D = await ie(q);
|
|
60
|
-
console.log({ url: D });
|
|
61
|
-
const ee = {
|
|
62
|
-
url: D,
|
|
63
|
-
name: I,
|
|
64
|
-
uid: x,
|
|
65
|
-
type: t,
|
|
66
|
-
size: a,
|
|
67
|
-
thumbUrl: D,
|
|
68
|
-
originFileObj: q
|
|
69
|
-
};
|
|
70
|
-
if (s)
|
|
71
|
-
try {
|
|
72
|
-
N(!0), await s(ee);
|
|
73
|
-
} finally {
|
|
74
|
-
N(!1);
|
|
75
|
-
}
|
|
76
|
-
P([ee, ...n]), N(!1);
|
|
77
|
-
}), B(void 0);
|
|
78
|
-
}, ge = () => {
|
|
79
|
-
B(void 0), T.current = void 0;
|
|
80
|
-
}, G = V((e) => {
|
|
81
|
-
const t = e;
|
|
82
|
-
if (t) {
|
|
83
|
-
T.current = t;
|
|
84
|
-
const a = new FileReader();
|
|
85
|
-
a.addEventListener("load", () => {
|
|
86
|
-
var I;
|
|
87
|
-
if (typeof a.result == "string") {
|
|
88
|
-
B(a.result);
|
|
89
|
-
const x = localStorage.getItem(oe), F = x ? JSON.parse(x) : void 0;
|
|
90
|
-
F && ((I = l.current) == null || I.setState(F)), setTimeout(() => {
|
|
91
|
-
Z(l.current);
|
|
92
|
-
}, 100);
|
|
93
|
-
}
|
|
94
|
-
}), a.readAsDataURL(t);
|
|
95
|
-
}
|
|
96
|
-
}, []);
|
|
97
|
-
j(() => {
|
|
98
|
-
if (o != null && o.length || typeof o == "string") {
|
|
99
|
-
const e = Array.isArray(o) ? o.map((t) => [{ uid: o, url: t }]) : [{ uid: o, url: o }];
|
|
100
|
-
P(e);
|
|
101
|
-
}
|
|
102
|
-
}, [o]);
|
|
103
|
-
const { t: d } = Ne(), he = re(
|
|
104
|
-
() => c ? {
|
|
105
|
-
required: c,
|
|
106
|
-
validator: (e, t, a) => {
|
|
107
|
-
h || n != null && n.length ? a() : a(`${i ?? ""} ${d("err.validation.required")}`);
|
|
108
|
-
}
|
|
109
|
-
} : void 0,
|
|
110
|
-
[c, h, n == null ? void 0 : n.length, i, d]
|
|
111
|
-
), K = b ?? d("message.uploadButtonText"), Q = re(
|
|
112
|
-
() => /* @__PURE__ */ r(
|
|
113
|
-
Be,
|
|
114
|
-
{
|
|
115
|
-
showLoadingIndicator: J,
|
|
116
|
-
_buttonTitle: K,
|
|
117
|
-
buttonSize: f,
|
|
118
|
-
buttonType: m,
|
|
119
|
-
fileList: n,
|
|
120
|
-
hidePreview: v,
|
|
121
|
-
icon: S,
|
|
122
|
-
loading: U,
|
|
123
|
-
listType: R,
|
|
124
|
-
maxCount: y,
|
|
125
|
-
onChangeFile: G,
|
|
126
|
-
onRemove: k,
|
|
127
|
-
showButtonText: g,
|
|
128
|
-
handlePreview: ue,
|
|
129
|
-
setFileList: P
|
|
130
|
-
}
|
|
131
|
-
),
|
|
132
|
-
[
|
|
133
|
-
J,
|
|
134
|
-
K,
|
|
135
|
-
f,
|
|
136
|
-
m,
|
|
137
|
-
n,
|
|
138
|
-
v,
|
|
139
|
-
S,
|
|
140
|
-
U,
|
|
141
|
-
R,
|
|
142
|
-
y,
|
|
143
|
-
G,
|
|
144
|
-
k,
|
|
145
|
-
g
|
|
146
|
-
]
|
|
147
|
-
);
|
|
148
|
-
me.current = Q.props.beforeUpload;
|
|
149
|
-
const [we, X] = w(0), [Ce, Y] = w(0), [A, be] = w();
|
|
150
|
-
j(() => {
|
|
151
|
-
const e = setTimeout(() => {
|
|
152
|
-
A && localStorage.setItem(oe, JSON.stringify(A));
|
|
153
|
-
}, 400);
|
|
154
|
-
return () => clearTimeout(e);
|
|
155
|
-
}, [A]), j(() => {
|
|
156
|
-
if (!h) {
|
|
157
|
-
X(0), Y(0);
|
|
158
|
-
const e = setTimeout(() => {
|
|
159
|
-
var t;
|
|
160
|
-
(t = l.current) == null || t.reset();
|
|
161
|
-
}, 1500);
|
|
162
|
-
return () => clearTimeout(e);
|
|
163
|
-
}
|
|
164
|
-
}, [h]);
|
|
165
|
-
const Z = V(async (e) => {
|
|
166
|
-
if (e) {
|
|
167
|
-
const t = e.getCoordinates();
|
|
168
|
-
be(e.getState()), X((t == null ? void 0 : t.width) ?? 10), Y((t == null ? void 0 : t.height) ?? 10);
|
|
169
|
-
}
|
|
170
|
-
}, []);
|
|
171
|
-
return /* @__PURE__ */ z(Ie, { children: [
|
|
172
|
-
/* @__PURE__ */ r(
|
|
173
|
-
Pe,
|
|
174
|
-
{
|
|
175
|
-
label: i,
|
|
176
|
-
...E,
|
|
177
|
-
name: p,
|
|
178
|
-
className: "mb-0",
|
|
179
|
-
rules: [he, ...E.rules ?? []],
|
|
180
|
-
children: Q
|
|
181
|
-
}
|
|
182
|
-
),
|
|
183
|
-
/* @__PURE__ */ z(
|
|
184
|
-
te,
|
|
185
|
-
{
|
|
186
|
-
open: !!h,
|
|
187
|
-
maskClosable: !1,
|
|
188
|
-
onOk: fe,
|
|
189
|
-
closable: !1,
|
|
190
|
-
onCancel: ge,
|
|
191
|
-
destroyOnHidden: !0,
|
|
192
|
-
children: [
|
|
193
|
-
/* @__PURE__ */ r(
|
|
194
|
-
xe,
|
|
195
|
-
{
|
|
196
|
-
ref: l,
|
|
197
|
-
stencilProps: {
|
|
198
|
-
grid: !0
|
|
199
|
-
},
|
|
200
|
-
style: { border: "1px solid black" },
|
|
201
|
-
src: h,
|
|
202
|
-
onChange: (e) => {
|
|
203
|
-
Z(e);
|
|
204
|
-
},
|
|
205
|
-
aspectRatio: C ? {
|
|
206
|
-
minimum: C,
|
|
207
|
-
maximum: C
|
|
208
|
-
} : void 0
|
|
209
|
-
}
|
|
210
|
-
),
|
|
211
|
-
/* @__PURE__ */ r("p", { className: "text-center", children: [we, Ce].join(" ⨉ ") }),
|
|
212
|
-
/* @__PURE__ */ r("div", { className: "mt-2 d-flex justify-content-center", children: /* @__PURE__ */ z(ke.Compact, { children: [
|
|
213
|
-
/* @__PURE__ */ r(
|
|
214
|
-
O,
|
|
215
|
-
{
|
|
216
|
-
size: "large",
|
|
217
|
-
tooltip: d("str.rotateLeft"),
|
|
218
|
-
icon: /* @__PURE__ */ r(Fe, {}),
|
|
219
|
-
onClick: () => W(!0)
|
|
220
|
-
}
|
|
221
|
-
),
|
|
222
|
-
/* @__PURE__ */ r(
|
|
223
|
-
O,
|
|
224
|
-
{
|
|
225
|
-
size: "large",
|
|
226
|
-
icon: /* @__PURE__ */ r(Oe, {}),
|
|
227
|
-
tooltip: d("str.rotateRight"),
|
|
228
|
-
onClick: () => W(!1)
|
|
229
|
-
}
|
|
230
|
-
),
|
|
231
|
-
/* @__PURE__ */ r(
|
|
232
|
-
O,
|
|
233
|
-
{
|
|
234
|
-
size: "large",
|
|
235
|
-
icon: /* @__PURE__ */ r(ze, {}),
|
|
236
|
-
tooltip: d("str.flipHorizontal"),
|
|
237
|
-
onClick: () => $("h")
|
|
238
|
-
}
|
|
239
|
-
),
|
|
240
|
-
/* @__PURE__ */ r(
|
|
241
|
-
O,
|
|
242
|
-
{
|
|
243
|
-
size: "large",
|
|
244
|
-
icon: /* @__PURE__ */ r(Te, {}),
|
|
245
|
-
tooltip: d("str.flipVertical"),
|
|
246
|
-
onClick: () => $("v")
|
|
247
|
-
}
|
|
248
|
-
)
|
|
249
|
-
] }) })
|
|
250
|
-
]
|
|
251
|
-
}
|
|
252
|
-
),
|
|
253
|
-
/* @__PURE__ */ r(
|
|
254
|
-
te,
|
|
255
|
-
{
|
|
256
|
-
open: de,
|
|
257
|
-
title: se,
|
|
258
|
-
footer: null,
|
|
259
|
-
onCancel: pe,
|
|
260
|
-
children: /* @__PURE__ */ r("div", { className: "text-center", children: /* @__PURE__ */ r("img", { alt: "example", style: { maxWidth: "400px" }, src: le }) })
|
|
261
|
-
}
|
|
262
|
-
)
|
|
263
|
-
] });
|
|
264
|
-
}, Be = ({
|
|
265
|
-
_buttonTitle: o,
|
|
266
|
-
buttonSize: c,
|
|
267
|
-
buttonType: m,
|
|
268
|
-
fileList: i,
|
|
269
|
-
hidePreview: p,
|
|
270
|
-
icon: u,
|
|
271
|
-
loading: C,
|
|
272
|
-
maxCount: b,
|
|
273
|
-
onChangeFile: v,
|
|
274
|
-
onRemove: f,
|
|
275
|
-
showButtonText: g,
|
|
276
|
-
handlePreview: _,
|
|
277
|
-
setFileList: S,
|
|
278
|
-
showLoadingIndicator: U,
|
|
279
|
-
listType: y = "picture"
|
|
280
|
-
}) => /* @__PURE__ */ z(
|
|
281
|
-
Re,
|
|
282
|
-
{
|
|
283
|
-
accept: "image/x-png,image/gif,image/jpeg",
|
|
284
|
-
fileList: i,
|
|
285
|
-
defaultFileList: i,
|
|
286
|
-
onChange: () => {
|
|
287
|
-
},
|
|
288
|
-
className: (i.length >= b ? " hide-upload " : "") + " mb-0",
|
|
289
|
-
multiple: !1,
|
|
290
|
-
onPreview: p ? void 0 : _,
|
|
291
|
-
onDrop: (s) => (v(s.dataTransfer.files.item(0)), !1),
|
|
292
|
-
listType: y,
|
|
293
|
-
showUploadList: !p,
|
|
294
|
-
onRemove: (s) => {
|
|
295
|
-
const k = i.filter((R) => s.uid !== R.uid);
|
|
296
|
-
f == null || f(s), S(k);
|
|
297
|
-
},
|
|
298
|
-
beforeUpload: async (s) => (v(s), !1),
|
|
299
|
-
maxCount: b,
|
|
300
|
-
children: [
|
|
301
|
-
U && /* @__PURE__ */ r(Se, {}),
|
|
302
|
-
/* @__PURE__ */ r("div", { className: "d-flex flex-column", children: i.length < b && (y === "picture-circle" ? /* @__PURE__ */ r(ne, {}) : /* @__PURE__ */ r(
|
|
303
|
-
O,
|
|
304
|
-
{
|
|
305
|
-
loading: C,
|
|
306
|
-
tooltip: g ? void 0 : o,
|
|
307
|
-
size: c,
|
|
308
|
-
icon: u,
|
|
309
|
-
type: g ? m : "text",
|
|
310
|
-
children: g ? o : void 0
|
|
311
|
-
}
|
|
312
|
-
)) })
|
|
313
|
-
]
|
|
314
|
-
},
|
|
315
|
-
i.length
|
|
316
|
-
);
|
|
317
|
-
export {
|
|
318
|
-
Be as UploadComponent,
|
|
319
|
-
Ke as default
|
|
320
|
-
};
|
package/common/picker/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const s=require("react/jsx-runtime"),t=require("antd"),c=require("react"),d=({button:a,disabled:i,...n})=>{const m=c.useMemo(()=>{const{enum:e,translations:o}=n;if(e){const r=[];for(const u of e)r.push({key:u,value:(o==null?void 0:o[u])??u.toUpperCase()});return r}else return n.values},[n]),l=a?t.Radio.Button:t.Radio;return s.jsx(t.Form.Item,{...n,children:s.jsx(t.Radio.Group,{disabled:i,children:m.map(({key:e,value:o})=>s.jsx(l,{value:e,children:o},e))})})},R=c.memo(d);module.exports=R;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { FormItemProps } from 'antd';
|
|
2
|
-
interface GeneralProps extends FormItemProps {
|
|
3
|
-
values: {
|
|
4
|
-
key: string | number | undefined;
|
|
5
|
-
value: string | number;
|
|
6
|
-
}[];
|
|
7
|
-
}
|
|
8
|
-
interface EnumProps extends FormItemProps {
|
|
9
|
-
enum: string[];
|
|
10
|
-
translations?: any;
|
|
11
|
-
}
|
|
12
|
-
type Props = (GeneralProps | EnumProps) & {
|
|
13
|
-
onChange?: (evt: boolean) => void;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
button?: boolean;
|
|
16
|
-
};
|
|
17
|
-
declare const _default: import('react').NamedExoticComponent<Props>;
|
|
18
|
-
export default _default;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { Radio as m, Form as i } from "antd";
|
|
3
|
-
import { memo as p, useMemo as d } from "react";
|
|
4
|
-
const f = ({ button: a, disabled: s, ...n }) => {
|
|
5
|
-
const l = d(() => {
|
|
6
|
-
const { enum: e, translations: o } = n;
|
|
7
|
-
if (e) {
|
|
8
|
-
const r = [];
|
|
9
|
-
for (const t of e)
|
|
10
|
-
r.push({ key: t, value: (o == null ? void 0 : o[t]) ?? t.toUpperCase() });
|
|
11
|
-
return r;
|
|
12
|
-
} else
|
|
13
|
-
return n.values;
|
|
14
|
-
}, [n]), c = a ? m.Button : m;
|
|
15
|
-
return /* @__PURE__ */ u(i.Item, { ...n, children: /* @__PURE__ */ u(m.Group, { disabled: s, children: l.map(({ key: e, value: o }) => /* @__PURE__ */ u(c, { value: e, children: o }, e)) }) });
|
|
16
|
-
}, G = p(f);
|
|
17
|
-
export {
|
|
18
|
-
G as default
|
|
19
|
-
};
|
package/common/radio/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),o=require("antd"),u=require("react"),f=require("../select/SelectComponent.cjs.js"),b=({className:a,onSelect:d,label:S,required:p,name:l,mode:c,items:t})=>{const r=o.Form.useFormInstance(),[s,F]=u.useState(!0);return u.useEffect(()=>{if(t&&s){const e=t.filter(i=>i.alreadySelected).map(i=>i.id);r==null||r.setFieldsValue({[l]:c==="multiple"?e:e==null?void 0:e[0]}),F(!1)}},[s,r,t,c,l]),n.jsx(f,{required:p,label:S,mode:c,className:a,name:l,onSelect:d,items:t,itemBuilder:e=>n.jsx(o.Select.Option,{value:e.id,disabled:e.lock,children:e.label},e.id)})};exports.SelectFieldInReport=b;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
export interface ReportSelectFieldItems {
|
|
3
|
-
id: any;
|
|
4
|
-
label: string;
|
|
5
|
-
lock?: boolean;
|
|
6
|
-
alreadySelected?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare const SelectFieldInReport: FC<{
|
|
9
|
-
mode?: "multiple" | "tags" | undefined;
|
|
10
|
-
name: string;
|
|
11
|
-
label: string;
|
|
12
|
-
className?: string;
|
|
13
|
-
required?: boolean;
|
|
14
|
-
onSelect?: (val: any) => void;
|
|
15
|
-
items: ReportSelectFieldItems[];
|
|
16
|
-
}>;
|