@kingteza/crud-component 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.d.ts +2 -0
- package/dist/_virtual/_commonjsHelpers.cjs +1 -0
- package/dist/_virtual/_commonjsHelpers.js +6 -1
- package/dist/_virtual/advancedFormat.cjs +1 -0
- package/dist/_virtual/advancedFormat.js +7 -1
- package/dist/_virtual/advancedFormat2.js +4 -1
- package/dist/_virtual/customParseFormat.cjs +1 -0
- package/dist/_virtual/customParseFormat.js +7 -1
- package/dist/_virtual/customParseFormat2.js +4 -1
- package/dist/_virtual/dayjs.min.cjs +1 -0
- package/dist/_virtual/dayjs.min.js +7 -1
- package/dist/_virtual/dayjs.min2.js +4 -1
- package/dist/_virtual/index.cjs +1 -0
- package/dist/_virtual/index.js +7 -1
- package/dist/_virtual/index2.cjs +1 -0
- package/dist/_virtual/index2.js +7 -1
- package/dist/_virtual/index3.cjs +1 -0
- package/dist/_virtual/index3.js +4 -1
- package/dist/_virtual/index4.js +4 -1
- package/dist/_virtual/index5.cjs +1 -0
- package/dist/_virtual/index5.js +4 -1
- package/dist/_virtual/jsx-runtime.cjs +1 -0
- package/dist/_virtual/jsx-runtime.js +5 -1
- package/dist/_virtual/jsx-runtime2.cjs +1 -0
- package/dist/_virtual/jsx-runtime2.js +4 -1
- package/dist/_virtual/localeData.cjs +1 -0
- package/dist/_virtual/localeData.js +7 -1
- package/dist/_virtual/localeData2.cjs +1 -0
- package/dist/_virtual/localeData2.js +4 -1
- package/dist/_virtual/react-is.development.js +4 -1
- package/dist/_virtual/react-is.production.min.js +4 -1
- package/dist/_virtual/react-jsx-runtime.development.js +4 -1
- package/dist/_virtual/react-jsx-runtime.production.min.cjs +1 -0
- package/dist/_virtual/react-jsx-runtime.production.min.js +4 -1
- package/dist/_virtual/weekOfYear.cjs +1 -0
- package/dist/_virtual/weekOfYear.js +7 -1
- package/dist/_virtual/weekOfYear2.cjs +1 -0
- package/dist/_virtual/weekOfYear2.js +4 -1
- package/dist/_virtual/weekYear.cjs +1 -0
- package/dist/_virtual/weekYear.js +7 -1
- package/dist/_virtual/weekYear2.cjs +1 -0
- package/dist/_virtual/weekYear2.js +4 -1
- package/dist/_virtual/weekday.cjs +1 -0
- package/dist/_virtual/weekday.js +7 -1
- package/dist/_virtual/weekday2.cjs +1 -0
- package/dist/_virtual/weekday2.js +4 -1
- package/dist/common/index.cjs +1 -0
- package/dist/common/index.js +75 -1
- package/dist/components/common/DatePicker/DatePicker.d.ts +37 -0
- package/dist/components/common/DatePicker/TimePicker.d.ts +34 -0
- package/dist/components/common/DatePicker/index.d.ts +3 -0
- package/dist/components/common/appearance/Hider.d.ts +6 -0
- package/dist/components/common/appearance/index.d.ts +0 -0
- package/dist/components/common/button/Button.d.ts +12 -0
- package/dist/components/common/button/CloneButtonTable.d.ts +6 -0
- package/dist/components/common/button/DeleteButtonTable.d.ts +13 -0
- package/dist/components/common/button/ExportButton.d.ts +4 -0
- package/dist/components/common/button/HideButtonTable.d.ts +13 -0
- package/dist/components/common/button/ImportButton.d.ts +9 -0
- package/dist/components/common/button/NewButton.d.ts +12 -0
- package/dist/components/common/button/PrintButton.d.ts +12 -0
- package/dist/components/common/button/RefreshButton.d.ts +11 -0
- package/dist/components/common/button/UnHideButton.d.ts +14 -0
- package/dist/components/common/button/UpdateButtonTable.d.ts +6 -0
- package/dist/components/common/button/ViewButtonTable.d.ts +6 -0
- package/dist/components/common/button/index.d.ts +14 -0
- package/dist/components/common/check-box/CheckBox.d.ts +9 -0
- package/dist/components/common/check-box/index.d.ts +2 -0
- package/dist/components/common/description/DescList.d.ts +18 -0
- package/dist/components/common/description/DescriptionComponent.d.ts +7 -0
- package/dist/components/common/description/index.d.ts +3 -0
- package/dist/components/common/index.d.ts +22 -0
- package/dist/components/common/layout/VerticalSpace.d.ts +5 -0
- package/dist/components/common/layout/index.d.ts +2 -0
- package/dist/components/common/loading/LoadingIndicator.d.ts +6 -0
- package/dist/components/common/loading/index.d.ts +2 -0
- package/dist/components/common/picker/ImagePicker.d.ts +56 -0
- package/dist/components/common/picker/index.d.ts +2 -0
- package/dist/components/common/radio/RadioGroupComponent.d.ts +18 -0
- package/dist/components/common/radio/index.d.ts +2 -0
- package/dist/components/common/report/SelectFieldInReport.d.ts +16 -0
- package/dist/components/common/report/index.d.ts +3 -0
- package/dist/components/common/select/CustomSelectOption.d.ts +7 -0
- package/dist/components/common/select/SelectComponent.d.ts +21 -0
- package/dist/components/common/select/index.d.ts +3 -0
- package/dist/components/common/show-more/index.d.ts +4 -0
- package/dist/components/common/tab/TabViewWithRoute.d.ts +13 -0
- package/dist/components/common/tab/index.d.ts +2 -0
- package/dist/components/common/table/index.d.ts +3 -0
- package/dist/components/common/table/table.d.ts +19 -0
- package/dist/components/common/tag/StatusTag.d.ts +14 -0
- package/dist/components/common/tag/index.d.ts +2 -0
- package/dist/components/common/text/index.d.ts +3 -0
- package/dist/components/common/text/title/TitleWithHeadTitle.d.ts +7 -0
- package/dist/components/common/text/title/index.d.ts +1 -0
- package/dist/components/common/text-field/NumberField.d.ts +13 -0
- package/dist/components/common/text-field/PhoneNumberField.d.ts +4 -0
- package/dist/components/common/text-field/TextArea.d.ts +17 -0
- package/dist/components/common/text-field/TextField.d.ts +27 -0
- package/dist/components/common/text-field/index.d.ts +5 -0
- package/dist/components/common/tooltip/TooltipComponent.d.ts +5 -0
- package/dist/components/common/tooltip/index.d.ts +2 -0
- package/dist/components/common/wizard/WizardResult.d.ts +16 -0
- package/dist/components/common/wizard/WizardViewForm.d.ts +24 -0
- package/dist/components/common/wizard/index.d.ts +3 -0
- package/dist/components/crud/CrudComponent.d.ts +237 -0
- package/dist/components/crud/CrudField.d.ts +4 -0
- package/dist/components/crud/CrudForm.d.ts +14 -0
- package/dist/components/crud/CrudFormWizard.d.ts +14 -0
- package/dist/components/crud/CrudReportComponent.d.ts +44 -0
- package/dist/components/crud/CrudSearchComponent.d.ts +21 -0
- package/dist/components/crud/FileCrudField.d.ts +25 -0
- package/dist/components/crud/ImageCrudField.d.ts +38 -0
- package/dist/components/crud/import/CrudImportButton.d.ts +3 -0
- package/dist/components/crud/import/CrudImportComponent.d.ts +14 -0
- package/dist/components/crud/index.d.ts +15 -0
- package/dist/components/crud/view/CrudDecListView.d.ts +14 -0
- package/dist/components/crud/view/CrudViewer.d.ts +43 -0
- package/dist/components/crud/view/CrudViewerUtil.d.ts +2 -0
- package/dist/components/crud/view/index.d.ts +5 -0
- package/dist/context/WindowDimension.d.ts +4 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +4 -63
- package/dist/index.js +32 -1
- package/dist/locale/hooks/translation-constants.d.ts +1 -0
- package/dist/locale/index.d.ts +69 -0
- package/dist/locale/translations/en.d.ts +58 -0
- package/dist/main.d.ts +0 -0
- package/dist/src/components/common/DatePicker/DatePicker.cjs +1 -0
- package/dist/src/components/common/DatePicker/DatePicker.js +88 -0
- package/dist/src/components/common/DatePicker/TimePicker.cjs +1 -0
- package/dist/src/components/common/DatePicker/TimePicker.js +78 -0
- package/dist/src/components/common/appearance/Hider.cjs +1 -0
- package/dist/src/components/common/appearance/Hider.js +5 -0
- package/dist/src/components/common/button/Button.cjs +1 -0
- package/dist/src/components/common/button/Button.js +64 -0
- package/dist/src/components/common/button/CloneButtonTable.cjs +1 -0
- package/dist/src/components/common/button/CloneButtonTable.js +20 -0
- package/dist/src/components/common/button/DeleteButtonTable.cjs +1 -0
- package/dist/src/components/common/button/DeleteButtonTable.js +68 -0
- package/dist/src/components/common/button/ExportButton.cjs +1 -0
- package/dist/src/components/common/button/ExportButton.js +27 -0
- package/dist/src/components/common/button/HideButtonTable.cjs +1 -0
- package/dist/src/components/common/button/HideButtonTable.js +68 -0
- package/dist/src/components/common/button/ImportButton.cjs +1 -0
- package/dist/src/components/common/button/ImportButton.js +56 -0
- package/dist/src/components/common/button/NewButton.cjs +1 -0
- package/dist/src/components/common/button/NewButton.js +24 -0
- package/dist/src/components/common/button/PrintButton.cjs +1 -0
- package/dist/src/components/common/button/PrintButton.js +26 -0
- package/dist/src/components/common/button/RefreshButton.cjs +1 -0
- package/dist/src/components/common/button/RefreshButton.js +24 -0
- package/dist/src/components/common/button/UnHideButton.cjs +1 -0
- package/dist/src/components/common/button/UnHideButton.js +70 -0
- package/dist/src/components/common/button/UpdateButtonTable.cjs +1 -0
- package/dist/src/components/common/button/UpdateButtonTable.js +20 -0
- package/dist/src/components/common/button/ViewButtonTable.cjs +1 -0
- package/dist/src/components/common/button/ViewButtonTable.js +20 -0
- package/dist/src/components/common/check-box/CheckBox.cjs +1 -0
- package/dist/src/components/common/check-box/CheckBox.js +40 -0
- package/dist/src/components/common/description/DescList.cjs +1 -0
- package/dist/src/components/common/description/DescList.js +16 -0
- package/dist/src/components/common/layout/VerticalSpace.cjs +1 -0
- package/dist/src/components/common/layout/VerticalSpace.js +6 -0
- package/dist/src/components/common/loading/LoadingIndicator.cjs +1 -0
- package/dist/src/components/common/loading/LoadingIndicator.js +24 -0
- package/dist/src/components/common/picker/ImagePicker.cjs +1 -0
- package/dist/src/components/common/picker/ImagePicker.js +282 -0
- package/dist/src/components/common/radio/RadioGroupComponent.cjs +1 -0
- package/dist/src/components/common/radio/RadioGroupComponent.js +19 -0
- package/dist/src/components/common/report/SelectFieldInReport.cjs +1 -0
- package/dist/src/components/common/report/SelectFieldInReport.js +30 -0
- package/dist/src/components/common/select/CustomSelectOption.cjs +1 -0
- package/dist/src/components/common/select/CustomSelectOption.js +13 -0
- package/dist/src/components/common/select/SelectComponent.cjs +1 -0
- package/dist/src/components/common/select/SelectComponent.js +89 -0
- package/dist/src/components/common/show-more/index.cjs +1 -0
- package/dist/src/components/common/show-more/index.js +8 -0
- package/dist/src/components/common/tab/TabViewWithRoute.cjs +1 -0
- package/dist/src/components/common/tab/TabViewWithRoute.js +38 -0
- package/dist/src/components/common/table/table.cjs +1 -0
- package/dist/src/components/common/table/table.js +40 -0
- package/dist/src/components/common/tag/StatusTag.cjs +1 -0
- package/dist/src/components/common/tag/StatusTag.js +30 -0
- package/dist/src/components/common/text/index.js +5 -0
- package/dist/src/components/common/text/title/index.js +5 -0
- package/dist/src/components/common/text-field/NumberField.cjs +1 -0
- package/dist/src/components/common/text-field/NumberField.js +83 -0
- package/dist/src/components/common/text-field/PhoneNumberField.cjs +1 -0
- package/dist/src/components/common/text-field/PhoneNumberField.js +18 -0
- package/dist/src/components/common/text-field/TextArea.cjs +1 -0
- package/dist/src/components/common/text-field/TextArea.js +47 -0
- package/dist/src/components/common/text-field/TextField.cjs +1 -0
- package/dist/src/components/common/text-field/TextField.js +73 -0
- package/dist/src/components/common/tooltip/TooltipComponent.cjs +1 -0
- package/dist/src/components/common/tooltip/TooltipComponent.js +9 -0
- package/dist/src/components/common/wizard/WizardResult.cjs +1 -0
- package/dist/src/components/common/wizard/WizardResult.js +60 -0
- package/dist/src/components/common/wizard/WizardViewForm.cjs +1 -0
- package/dist/src/components/common/wizard/WizardViewForm.js +74 -0
- package/dist/src/components/crud/CrudComponent.cjs +1 -0
- package/dist/src/components/crud/CrudComponent.js +210 -0
- package/dist/src/components/crud/CrudField.cjs +1 -0
- package/dist/src/components/crud/CrudField.js +459 -0
- package/dist/src/components/crud/CrudForm.cjs +1 -0
- package/dist/src/components/crud/CrudForm.js +91 -0
- package/dist/src/components/crud/CrudFormWizard.cjs +1 -0
- package/dist/src/components/crud/CrudFormWizard.js +140 -0
- package/dist/src/components/crud/CrudReportComponent.cjs +4 -0
- package/dist/src/components/crud/CrudReportComponent.js +255 -0
- package/dist/src/components/crud/CrudSearchComponent.cjs +1 -0
- package/dist/src/components/crud/CrudSearchComponent.js +95 -0
- package/dist/src/components/crud/FileCrudField.cjs +1 -0
- package/dist/src/components/crud/FileCrudField.js +220 -0
- package/dist/src/components/crud/ImageCrudField.cjs +1 -0
- package/dist/src/components/crud/ImageCrudField.js +113 -0
- package/dist/src/components/crud/import/CrudImportButton.cjs +1 -0
- package/dist/src/components/crud/import/CrudImportButton.js +31 -0
- package/dist/src/components/crud/import/CrudImportComponent.cjs +2 -0
- package/dist/src/components/crud/import/CrudImportComponent.js +221 -0
- package/dist/src/components/crud/view/CrudDecListView.cjs +1 -0
- package/dist/src/components/crud/view/CrudDecListView.js +42 -0
- package/dist/src/components/crud/view/CrudViewer.cjs +1 -0
- package/dist/src/components/crud/view/CrudViewer.js +217 -0
- package/dist/src/components/crud/view/CrudViewerUtil.cjs +1 -0
- package/dist/src/components/crud/view/CrudViewerUtil.js +57 -0
- package/dist/src/context/WindowDimension.cjs +1 -0
- package/dist/src/context/WindowDimension.js +8 -0
- package/dist/src/locale/hooks/translation-constants.js +4 -0
- package/dist/src/locale/index.cjs +1 -0
- package/dist/src/locale/index.js +33 -0
- package/dist/src/locale/translations/en.cjs +1 -0
- package/dist/src/locale/translations/en.js +60 -0
- package/dist/src/util/DateUtil.cjs +1 -0
- package/dist/src/util/DateUtil.js +6 -0
- package/dist/src/util/ImageUtil.cjs +1 -0
- package/dist/src/util/ImageUtil.js +63 -0
- package/dist/src/util/NumberUtil.js +60 -0
- package/dist/src/util/ValidationUtil.cjs +1 -0
- package/dist/src/util/ValidationUtil.js +60 -0
- package/dist/types/DialogComponentProp.d.ts +8 -0
- package/dist/types/Id.d.ts +10 -0
- package/dist/util/DateUtil.d.ts +7 -0
- package/dist/util/ImageUtil.d.ts +14 -0
- package/dist/util/NumberUtil.d.ts +17 -0
- package/dist/util/ValidationUtil.d.ts +14 -0
- package/dist/util/index.cjs +1 -0
- package/dist/util/index.js +10 -1
- package/dist/vite-env.d.ts +1 -0
- package/package.json +1 -1
- package/dist/_virtual/FileSaver.min.js +0 -1
- package/dist/_virtual/ShowMoreText.js +0 -1
- package/dist/_virtual/index6.js +0 -1
- package/dist/_virtual/index7.js +0 -1
- package/dist/_virtual/index8.js +0 -1
- package/dist/_virtual/main.js +0 -1
- package/dist/_virtual/papaparse.min.js +0 -1
- package/dist/components/common/DatePicker/DatePicker.js +0 -1
- package/dist/components/common/DatePicker/TimePicker.js +0 -1
- package/dist/components/common/appearance/Hider.js +0 -1
- package/dist/components/common/button/Button.js +0 -1
- package/dist/components/common/button/CloneButtonTable.js +0 -1
- package/dist/components/common/button/DeleteButtonTable.js +0 -1
- package/dist/components/common/button/ExportButton.js +0 -1
- package/dist/components/common/button/HideButtonTable.js +0 -1
- package/dist/components/common/button/ImportButton.js +0 -1
- package/dist/components/common/button/NewButton.js +0 -1
- package/dist/components/common/button/PrintButton.js +0 -1
- package/dist/components/common/button/RefreshButton.js +0 -1
- package/dist/components/common/button/UnHideButton.js +0 -1
- package/dist/components/common/button/UpdateButtonTable.js +0 -1
- package/dist/components/common/button/ViewButtonTable.js +0 -1
- package/dist/components/common/check-box/CheckBox.js +0 -1
- package/dist/components/common/description/DescList.js +0 -1
- package/dist/components/common/layout/VerticalSpace.js +0 -1
- package/dist/components/common/loading/LoadingIndicator.js +0 -1
- package/dist/components/common/picker/ImagePicker.js +0 -1
- package/dist/components/common/radio/RadioGroupComponent.js +0 -1
- package/dist/components/common/report/SelectFieldInReport.js +0 -1
- package/dist/components/common/select/CustomSelectOption.js +0 -1
- package/dist/components/common/select/SelectComponent.js +0 -1
- package/dist/components/common/show-more/index.js +0 -1
- package/dist/components/common/tab/TabViewWithRoute.js +0 -1
- package/dist/components/common/table/table.js +0 -1
- package/dist/components/common/tag/StatusTag.js +0 -1
- package/dist/components/common/text-field/NumberField.js +0 -1
- package/dist/components/common/text-field/PhoneNumberField.js +0 -1
- package/dist/components/common/text-field/TextArea.js +0 -1
- package/dist/components/common/text-field/TextField.js +0 -1
- package/dist/components/common/tooltip/TooltipComponent.js +0 -1
- package/dist/components/common/wizard/WizardResult.js +0 -1
- package/dist/components/common/wizard/WizardViewForm.js +0 -1
- package/dist/components/crud/CrudComponent.js +0 -1
- package/dist/components/crud/CrudField.js +0 -1
- package/dist/components/crud/CrudForm.js +0 -1
- package/dist/components/crud/CrudFormWizard.js +0 -1
- package/dist/components/crud/CrudReportComponent.js +0 -4
- package/dist/components/crud/CrudSearchComponent.js +0 -1
- package/dist/components/crud/FileCrudField.js +0 -1
- package/dist/components/crud/ImageCrudField.js +0 -1
- package/dist/components/crud/import/CrudImportButton.js +0 -1
- package/dist/components/crud/import/CrudImportComponent.js +0 -2
- package/dist/components/crud/view/CrudDecListView.js +0 -1
- package/dist/components/crud/view/CrudViewer.js +0 -1
- package/dist/components/crud/view/CrudViewerUtil.js +0 -1
- package/dist/context/WindowDimension.js +0 -1
- package/dist/locale/index.js +0 -1
- package/dist/locale/translations/en.js +0 -1
- package/dist/util/DateUtil.js +0 -1
- package/dist/util/ImageUtil.js +0 -1
- package/dist/util/ValidationUtil.js +0 -1
- /package/dist/_virtual/{FileSaver.min2.js → advancedFormat2.cjs} +0 -0
- /package/dist/_virtual/{main2.js → customParseFormat2.cjs} +0 -0
- /package/dist/_virtual/{papaparse.min2.js → dayjs.min2.cjs} +0 -0
- /package/dist/_virtual/{ShowMoreText2.js → index4.cjs} +0 -0
- /package/dist/_virtual/{Truncate.js → react-is.development.cjs} +0 -0
- /package/dist/_virtual/{index10.js → react-is.production.min.cjs} +0 -0
- /package/dist/_virtual/{index9.js → react-jsx-runtime.development.cjs} +0 -0
- /package/dist/{components/common/text/index.js → src/components/common/text/index.cjs} +0 -0
- /package/dist/{components/common/text/title/index.js → src/components/common/text/title/index.cjs} +0 -0
- /package/dist/{locale/hooks/translation-constants.js → src/locale/hooks/translation-constants.cjs} +0 -0
- /package/dist/{util/NumberUtil.js → src/util/NumberUtil.cjs} +0 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { default as en } from './translations/en';
|
|
2
|
+
export declare const defaultTranslations: {
|
|
3
|
+
en: {
|
|
4
|
+
"crud-component": {
|
|
5
|
+
str: {
|
|
6
|
+
delete: string;
|
|
7
|
+
clone: string;
|
|
8
|
+
update: string;
|
|
9
|
+
new: string;
|
|
10
|
+
back: string;
|
|
11
|
+
next: string;
|
|
12
|
+
save: string;
|
|
13
|
+
import: string;
|
|
14
|
+
cancel: string;
|
|
15
|
+
print: string;
|
|
16
|
+
hide: string;
|
|
17
|
+
no: string;
|
|
18
|
+
action: string;
|
|
19
|
+
remove: string;
|
|
20
|
+
view: string;
|
|
21
|
+
ok: string;
|
|
22
|
+
yes: string;
|
|
23
|
+
warning: string;
|
|
24
|
+
success: string;
|
|
25
|
+
error: string;
|
|
26
|
+
retry: string;
|
|
27
|
+
previous: string;
|
|
28
|
+
unhide: string;
|
|
29
|
+
downloadCsvTemplate: string;
|
|
30
|
+
importCsvFile: string;
|
|
31
|
+
export: string;
|
|
32
|
+
goBack: string;
|
|
33
|
+
refresh: string;
|
|
34
|
+
fileUploadMessage1: string;
|
|
35
|
+
fileUploadMessage2: string;
|
|
36
|
+
};
|
|
37
|
+
err: {
|
|
38
|
+
save: string;
|
|
39
|
+
validation: {
|
|
40
|
+
required: string;
|
|
41
|
+
minLength8: string;
|
|
42
|
+
percentage: string;
|
|
43
|
+
maximumValueExceeded: string;
|
|
44
|
+
invalidNic: string;
|
|
45
|
+
invalid: string;
|
|
46
|
+
};
|
|
47
|
+
notFound: string;
|
|
48
|
+
};
|
|
49
|
+
message: {
|
|
50
|
+
loading: {
|
|
51
|
+
saving: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
qus: {
|
|
55
|
+
importWithIssues: string;
|
|
56
|
+
doYouWantToDelete: string;
|
|
57
|
+
doYouWantToHide: string;
|
|
58
|
+
doYouWantToUnhide: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
export type LibTranslations = typeof en;
|
|
64
|
+
export interface SetupI18nOptions {
|
|
65
|
+
translations?: typeof defaultTranslations;
|
|
66
|
+
language?: string;
|
|
67
|
+
}
|
|
68
|
+
export declare const setupI18n: (options?: SetupI18nOptions) => import('i18next').i18n;
|
|
69
|
+
export declare const updateTranslations: (language: string, translations: Record<string, any>) => void;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
str: {
|
|
3
|
+
delete: string;
|
|
4
|
+
clone: string;
|
|
5
|
+
update: string;
|
|
6
|
+
new: string;
|
|
7
|
+
back: string;
|
|
8
|
+
next: string;
|
|
9
|
+
save: string;
|
|
10
|
+
import: string;
|
|
11
|
+
cancel: string;
|
|
12
|
+
print: string;
|
|
13
|
+
hide: string;
|
|
14
|
+
no: string;
|
|
15
|
+
action: string;
|
|
16
|
+
remove: string;
|
|
17
|
+
view: string;
|
|
18
|
+
ok: string;
|
|
19
|
+
yes: string;
|
|
20
|
+
warning: string;
|
|
21
|
+
success: string;
|
|
22
|
+
error: string;
|
|
23
|
+
retry: string;
|
|
24
|
+
previous: string;
|
|
25
|
+
unhide: string;
|
|
26
|
+
downloadCsvTemplate: string;
|
|
27
|
+
importCsvFile: string;
|
|
28
|
+
export: string;
|
|
29
|
+
goBack: string;
|
|
30
|
+
refresh: string;
|
|
31
|
+
fileUploadMessage1: string;
|
|
32
|
+
fileUploadMessage2: string;
|
|
33
|
+
};
|
|
34
|
+
err: {
|
|
35
|
+
save: string;
|
|
36
|
+
validation: {
|
|
37
|
+
required: string;
|
|
38
|
+
minLength8: string;
|
|
39
|
+
percentage: string;
|
|
40
|
+
maximumValueExceeded: string;
|
|
41
|
+
invalidNic: string;
|
|
42
|
+
invalid: string;
|
|
43
|
+
};
|
|
44
|
+
notFound: string;
|
|
45
|
+
};
|
|
46
|
+
message: {
|
|
47
|
+
loading: {
|
|
48
|
+
saving: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
qus: {
|
|
52
|
+
importWithIssues: string;
|
|
53
|
+
doYouWantToDelete: string;
|
|
54
|
+
doYouWantToHide: string;
|
|
55
|
+
doYouWantToUnhide: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export default _default;
|
package/dist/main.d.ts
ADDED
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("../../../../_virtual/jsx-runtime.cjs"),r=require("antd"),t=require("../../../../_virtual/dayjs.min.cjs"),N=require("../../../../_virtual/advancedFormat.cjs"),S=require("../../../../_virtual/customParseFormat.cjs"),_=require("../../../../_virtual/localeData.cjs"),C=require("../../../../_virtual/weekday.cjs"),F=require("../../../../_virtual/weekOfYear.cjs"),I=require("../../../../_virtual/weekYear.cjs"),M=require("../../../locale/hooks/translation-constants.cjs"),T=require("react"),Y=require("react-i18next");t.default.extend(S.default);t.default.extend(N.default);t.default.extend(C.default);t.default.extend(_.default);t.default.extend(F.default);t.default.extend(I.default);const $=({type:b,required:l,label:s,rules:f=[],placeholder:o,disabledPastDays:u=!1,disableToday:d=!1,onEnter:g,disabled:m,nextFocus:L,onChange:n,range:x,showTime:q,disabledFutureDays:c,picker:k,defaultValue:j,value:O,format:p,autoComplete:z="off",enabledDates:B=[],renderExtraFooter:y,...P})=>{const{t:R}=Y.useTranslation(M.TRANSLATION_NAMESPACE),E=x?r.DatePicker.RangePicker:r.DatePicker,v=T.useCallback(e=>{if(!e)return!1;const a=t.default(),w=u&&e<a.startOf("day"),A=c&&e>a.endOf("day"),D=d&&e<a.endOf("day")&&a.startOf("day")<e;return w||A||D},[u,c,d]);return i.jsxRuntimeExports.jsx(r.Form.Item,{...P,label:s,rules:[{required:l,message:`${s??o??""} ${R("err.validation.required")}`},...f],children:i.jsxRuntimeExports.jsx(E,{renderExtraFooter:y,value:O,picker:k,defaultValue:j,format:p,onChange:e=>n==null?void 0:n(e),disabledDate:v,disabled:m,className:"w-100",placeholder:o,showTime:q})})};exports.default=$;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { j as i } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { DatePicker as d, Form as v } from "antd";
|
|
3
|
+
import e from "../../../../_virtual/dayjs.min.js";
|
|
4
|
+
import C from "../../../../_virtual/advancedFormat.js";
|
|
5
|
+
import I from "../../../../_virtual/customParseFormat.js";
|
|
6
|
+
import S from "../../../../_virtual/localeData.js";
|
|
7
|
+
import T from "../../../../_virtual/weekday.js";
|
|
8
|
+
import Y from "../../../../_virtual/weekOfYear.js";
|
|
9
|
+
import $ from "../../../../_virtual/weekYear.js";
|
|
10
|
+
import { TRANSLATION_NAMESPACE as q } from "../../../locale/hooks/translation-constants.js";
|
|
11
|
+
import { useCallback as L } from "react";
|
|
12
|
+
import { useTranslation as M } from "react-i18next";
|
|
13
|
+
e.extend(I);
|
|
14
|
+
e.extend(C);
|
|
15
|
+
e.extend(T);
|
|
16
|
+
e.extend(S);
|
|
17
|
+
e.extend(Y);
|
|
18
|
+
e.extend($);
|
|
19
|
+
const et = ({
|
|
20
|
+
type: _,
|
|
21
|
+
required: p,
|
|
22
|
+
label: m,
|
|
23
|
+
rules: c = [],
|
|
24
|
+
placeholder: a,
|
|
25
|
+
disabledPastDays: n = !1,
|
|
26
|
+
disableToday: s = !1,
|
|
27
|
+
onEnter: z,
|
|
28
|
+
disabled: x,
|
|
29
|
+
nextFocus: B,
|
|
30
|
+
onChange: r,
|
|
31
|
+
range: l,
|
|
32
|
+
showTime: k,
|
|
33
|
+
disabledFutureDays: f,
|
|
34
|
+
picker: u,
|
|
35
|
+
defaultValue: O,
|
|
36
|
+
value: j,
|
|
37
|
+
format: y,
|
|
38
|
+
autoComplete: G = "off",
|
|
39
|
+
enabledDates: H = [],
|
|
40
|
+
renderExtraFooter: w,
|
|
41
|
+
...A
|
|
42
|
+
}) => {
|
|
43
|
+
const { t: E } = M(q), N = l ? d.RangePicker : d, P = L(
|
|
44
|
+
(t) => {
|
|
45
|
+
if (!t)
|
|
46
|
+
return !1;
|
|
47
|
+
const o = e(), D = n && t < o.startOf("day"), F = f && t > o.endOf("day"), R = s && t < o.endOf("day") && o.startOf("day") < t;
|
|
48
|
+
return D || F || R;
|
|
49
|
+
},
|
|
50
|
+
[n, f, s]
|
|
51
|
+
// Dependencies for useCallback
|
|
52
|
+
);
|
|
53
|
+
return /* @__PURE__ */ i.jsx(
|
|
54
|
+
v.Item,
|
|
55
|
+
{
|
|
56
|
+
...A,
|
|
57
|
+
label: m,
|
|
58
|
+
rules: [
|
|
59
|
+
{
|
|
60
|
+
required: p,
|
|
61
|
+
message: `${m ?? a ?? ""} ${E(
|
|
62
|
+
"err.validation.required"
|
|
63
|
+
)}`
|
|
64
|
+
},
|
|
65
|
+
...c
|
|
66
|
+
],
|
|
67
|
+
children: /* @__PURE__ */ i.jsx(
|
|
68
|
+
N,
|
|
69
|
+
{
|
|
70
|
+
renderExtraFooter: w,
|
|
71
|
+
value: j,
|
|
72
|
+
picker: u,
|
|
73
|
+
defaultValue: O,
|
|
74
|
+
format: y,
|
|
75
|
+
onChange: (t) => r == null ? void 0 : r(t),
|
|
76
|
+
disabledDate: P,
|
|
77
|
+
disabled: x,
|
|
78
|
+
className: "w-100",
|
|
79
|
+
placeholder: a,
|
|
80
|
+
showTime: k
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
};
|
|
86
|
+
export {
|
|
87
|
+
et as default
|
|
88
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("../../../../_virtual/jsx-runtime.cjs"),c=require("antd"),_=require("../../../../_virtual/dayjs.min.cjs"),f=require("react"),v=require("react-i18next"),I=require("../../../locale/hooks/translation-constants.cjs"),C=({type:F,required:x,label:i,rules:T=[],placeholder:t,disabledPast:r=!1,disableCurrent:u=!1,onEnter:O,disabled:d,use12Hours:j,nextFocus:$,onChange:s,range:n,disabledFuture:a,defaultValue:q,value:p,format:R,autoComplete:w="off",renderExtraFooter:k,...E})=>{const{t:P}=v.useTranslation(I.TRANSLATION_NAMESPACE),m=f.useMemo(()=>t||(n?["From","To"]:"Select time"),[t,n]);console.log(m);const S=n?c.TimePicker.RangePicker:c.TimePicker,y=f.useCallback(e=>{if(!e)return!1;const o=_.default(),A=r&&e<o,M=a&&e>o,N=u&&e<o&&o<e;return A||M||N},[u,a,r]);return l.jsxRuntimeExports.jsx(c.Form.Item,{...E,label:i,rules:[{required:x,message:`${i??t??""} ${P("err.validation.required")}`},...T],children:l.jsxRuntimeExports.jsx(S,{use12Hours:j,renderExtraFooter:k,value:p,defaultValue:q,format:R,onChange:e=>s==null?void 0:s(e),disabledDate:y,disabled:d,className:"w-100",placeholder:m})})};exports.default=C;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { j as p } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { TimePicker as a, Form as I } from "antd";
|
|
3
|
+
import M from "../../../../_virtual/dayjs.min.js";
|
|
4
|
+
import { useMemo as $, useCallback as q } from "react";
|
|
5
|
+
import { useTranslation as v } from "react-i18next";
|
|
6
|
+
import { TRANSLATION_NAMESPACE as w } from "../../../locale/hooks/translation-constants.js";
|
|
7
|
+
const K = ({
|
|
8
|
+
type: C,
|
|
9
|
+
required: l,
|
|
10
|
+
label: r,
|
|
11
|
+
rules: x = [],
|
|
12
|
+
placeholder: t,
|
|
13
|
+
disabledPast: i = !1,
|
|
14
|
+
disableCurrent: c = !1,
|
|
15
|
+
onEnter: D,
|
|
16
|
+
disabled: T,
|
|
17
|
+
use12Hours: j,
|
|
18
|
+
nextFocus: H,
|
|
19
|
+
onChange: m,
|
|
20
|
+
range: e,
|
|
21
|
+
disabledFuture: n,
|
|
22
|
+
defaultValue: u,
|
|
23
|
+
value: k,
|
|
24
|
+
format: A,
|
|
25
|
+
autoComplete: L = "off",
|
|
26
|
+
renderExtraFooter: E,
|
|
27
|
+
...N
|
|
28
|
+
}) => {
|
|
29
|
+
const { t: y } = v(w), f = $(
|
|
30
|
+
() => t || (e ? ["From", "To"] : "Select time"),
|
|
31
|
+
[t, e]
|
|
32
|
+
);
|
|
33
|
+
console.log(f);
|
|
34
|
+
const P = e ? a.RangePicker : a, R = q(
|
|
35
|
+
(o) => {
|
|
36
|
+
if (!o)
|
|
37
|
+
return !1;
|
|
38
|
+
const s = M(), S = i && o < s, d = n && o > s, F = c && o < s && s < o;
|
|
39
|
+
return S || d || F;
|
|
40
|
+
},
|
|
41
|
+
[c, n, i]
|
|
42
|
+
// Dependencies for useCallback
|
|
43
|
+
);
|
|
44
|
+
return /* @__PURE__ */ p.jsx(
|
|
45
|
+
I.Item,
|
|
46
|
+
{
|
|
47
|
+
...N,
|
|
48
|
+
label: r,
|
|
49
|
+
rules: [
|
|
50
|
+
{
|
|
51
|
+
required: l,
|
|
52
|
+
message: `${r ?? t ?? ""} ${y(
|
|
53
|
+
"err.validation.required"
|
|
54
|
+
)}`
|
|
55
|
+
},
|
|
56
|
+
...x
|
|
57
|
+
],
|
|
58
|
+
children: /* @__PURE__ */ p.jsx(
|
|
59
|
+
P,
|
|
60
|
+
{
|
|
61
|
+
use12Hours: j,
|
|
62
|
+
renderExtraFooter: E,
|
|
63
|
+
value: k,
|
|
64
|
+
defaultValue: u,
|
|
65
|
+
format: A,
|
|
66
|
+
onChange: (o) => m == null ? void 0 : m(o),
|
|
67
|
+
disabledDate: R,
|
|
68
|
+
disabled: T,
|
|
69
|
+
className: "w-100",
|
|
70
|
+
placeholder: f
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
};
|
|
76
|
+
export {
|
|
77
|
+
K as default
|
|
78
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("../../../../_virtual/jsx-runtime.cjs"),r=({children:e,hide:t})=>s.jsxRuntimeExports.jsx("div",{className:t?"d-none":"",children:e});exports.default=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("../../../../_virtual/jsx-runtime.cjs"),x=require("antd"),q=require("../../../locale/hooks/translation-constants.cjs"),l=require("react"),y=require("react-i18next"),c=require("react-router-dom");;/* empty css */const v=({className:i,to:n,onClick:t,tooltip:o,ref:j,...e})=>{var r;const{t:a}=y.useTranslation(q.TRANSLATION_NAMESPACE),s=l.useContext(c.UNSAFE_NavigationContext)?(r=c.useNavigate)==null?void 0:r.call(c):void 0,u=l.useMemo(()=>d.jsxRuntimeExports.jsx(x.Button,{onClick:t||(n&&s?()=>s(n):void 0),className:i,...e,children:e.children||a(`button.${e.type}`)}),[i,s,t,e,a,n]);return o?d.jsxRuntimeExports.jsx(x.Tooltip,{title:o,children:u}):u},A=({className:i,to:n,onClick:t,tooltip:o,ref:j,...e})=>{const a=c.useNavigate(),[g,s]=l.useState(!1),u=l.useCallback(async f=>{try{return s(!0),await t(f)}finally{s(!1)}},[t]),r=l.useMemo(()=>d.jsxRuntimeExports.jsx(x.Button,{loading:g||e.loading,onClick:t?u:n?()=>a(n):void 0,className:i,...e}),[u,i,g,a,t,e,n]);return o?d.jsxRuntimeExports.jsx(x.Tooltip,{title:o,children:r}):r};v.Async=A;exports.default=v;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { j as c } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { Button as d, Tooltip as f } from "antd";
|
|
3
|
+
import { TRANSLATION_NAMESPACE as A } from "../../../locale/hooks/translation-constants.js";
|
|
4
|
+
import { useContext as j, useMemo as l, useState as y, useCallback as b } from "react";
|
|
5
|
+
import { useTranslation as h } from "react-i18next";
|
|
6
|
+
import { UNSAFE_NavigationContext as E, useNavigate as g } from "react-router-dom";
|
|
7
|
+
/* empty css */
|
|
8
|
+
const N = ({
|
|
9
|
+
className: i,
|
|
10
|
+
to: e,
|
|
11
|
+
onClick: t,
|
|
12
|
+
tooltip: a,
|
|
13
|
+
ref: v,
|
|
14
|
+
...n
|
|
15
|
+
}) => {
|
|
16
|
+
var u;
|
|
17
|
+
const { t: r } = h(A), o = j(E) ? (u = g) == null ? void 0 : u() : void 0, s = l(
|
|
18
|
+
() => /* @__PURE__ */ c.jsx(
|
|
19
|
+
d,
|
|
20
|
+
{
|
|
21
|
+
onClick: t || (e && o ? () => o(e) : void 0),
|
|
22
|
+
className: i,
|
|
23
|
+
...n,
|
|
24
|
+
children: n.children || r(`button.${n.type}`)
|
|
25
|
+
}
|
|
26
|
+
),
|
|
27
|
+
[i, o, t, n, r, e]
|
|
28
|
+
);
|
|
29
|
+
return a ? /* @__PURE__ */ c.jsx(f, { title: a, children: s }) : s;
|
|
30
|
+
}, S = ({
|
|
31
|
+
className: i,
|
|
32
|
+
to: e,
|
|
33
|
+
onClick: t,
|
|
34
|
+
tooltip: a,
|
|
35
|
+
ref: v,
|
|
36
|
+
...n
|
|
37
|
+
}) => {
|
|
38
|
+
const r = g(), [m, o] = y(!1), s = b(
|
|
39
|
+
async (x) => {
|
|
40
|
+
try {
|
|
41
|
+
return o(!0), await t(x);
|
|
42
|
+
} finally {
|
|
43
|
+
o(!1);
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
[t]
|
|
47
|
+
), u = l(
|
|
48
|
+
() => /* @__PURE__ */ c.jsx(
|
|
49
|
+
d,
|
|
50
|
+
{
|
|
51
|
+
loading: m || n.loading,
|
|
52
|
+
onClick: t ? s : e ? () => r(e) : void 0,
|
|
53
|
+
className: i,
|
|
54
|
+
...n
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
[s, i, m, r, t, n, e]
|
|
58
|
+
);
|
|
59
|
+
return a ? /* @__PURE__ */ c.jsx(f, { title: a, children: u }) : u;
|
|
60
|
+
};
|
|
61
|
+
N.Async = S;
|
|
62
|
+
export {
|
|
63
|
+
N as default
|
|
64
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../../_virtual/jsx-runtime.cjs"),s=require("@ant-design/icons"),r=require("./Button.cjs"),u=require("react-i18next"),i=require("../../../locale/hooks/translation-constants.cjs");function l({value:e,onClick:n}){const{t:o}=u.useTranslation(i.TRANSLATION_NAMESPACE);return t.jsxRuntimeExports.jsx(r.default,{type:"link",onClick:()=>n(e),icon:t.jsxRuntimeExports.jsx(s.CopyOutlined,{}),tooltip:o("clone")})}exports.default=l;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { j as o } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { CopyOutlined as i } from "@ant-design/icons";
|
|
3
|
+
import m from "./Button.js";
|
|
4
|
+
import { useTranslation as e } from "react-i18next";
|
|
5
|
+
import { TRANSLATION_NAMESPACE as p } from "../../../locale/hooks/translation-constants.js";
|
|
6
|
+
function c({ value: t, onClick: n }) {
|
|
7
|
+
const { t: r } = e(p);
|
|
8
|
+
return /* @__PURE__ */ o.jsx(
|
|
9
|
+
m,
|
|
10
|
+
{
|
|
11
|
+
type: "link",
|
|
12
|
+
onClick: () => n(t),
|
|
13
|
+
icon: /* @__PURE__ */ o.jsx(i, {}),
|
|
14
|
+
tooltip: r("clone")
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
c as default
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../../../_virtual/jsx-runtime.cjs"),j=require("@ant-design/icons"),q=require("antd"),n=require("react"),p=require("./Button.cjs"),E=require("react-i18next"),R=require("../../../locale/hooks/translation-constants.cjs");function T({shouldConfirm:m=!0,block:r,value:u,loading:i,onClick:a,text:l,disabled:c,type:x="link"}){const{t}=E.useTranslation(R.TRANSLATION_NAMESPACE),s=n.useMemo(()=>l??t("str.delete"),[l,t]),[d,o]=n.useState(!1);n.useEffect(()=>{o(i??!1)},[i]);const f=n.useCallback(async()=>{try{o(!0),await a(u)}finally{o(!1)}},[a,u]);return m?e.jsxRuntimeExports.jsx(q.Popconfirm,{title:t("qus.doYouWantToDelete"),okText:s.toUpperCase(),cancelText:t("str.no").toUpperCase(),onConfirm:f,children:e.jsxRuntimeExports.jsx(p.default,{tooltip:s,icon:e.jsxRuntimeExports.jsx(j.DeleteOutlined,{}),disabled:c,loading:d,type:x,danger:!0,block:r})}):e.jsxRuntimeExports.jsx(p.default,{tooltip:s,icon:e.jsxRuntimeExports.jsx(j.DeleteOutlined,{}),disabled:c,loading:d,type:x,danger:!0,block:r,onClick:f})}exports.default=T;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { j as t } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { DeleteOutlined as c } from "@ant-design/icons";
|
|
3
|
+
import { Popconfirm as j } from "antd";
|
|
4
|
+
import { useMemo as C, useState as T, useEffect as g, useCallback as A } from "react";
|
|
5
|
+
import x from "./Button.js";
|
|
6
|
+
import { useTranslation as E } from "react-i18next";
|
|
7
|
+
import { TRANSLATION_NAMESPACE as _ } from "../../../locale/hooks/translation-constants.js";
|
|
8
|
+
function O({
|
|
9
|
+
shouldConfirm: d = !0,
|
|
10
|
+
block: n,
|
|
11
|
+
value: s,
|
|
12
|
+
loading: i,
|
|
13
|
+
onClick: a,
|
|
14
|
+
text: l,
|
|
15
|
+
disabled: m,
|
|
16
|
+
type: f = "link"
|
|
17
|
+
}) {
|
|
18
|
+
const { t: o } = E(_), e = C(() => l ?? o("str.delete"), [l, o]), [u, r] = T(!1);
|
|
19
|
+
g(() => {
|
|
20
|
+
r(i ?? !1);
|
|
21
|
+
}, [i]);
|
|
22
|
+
const p = A(
|
|
23
|
+
async () => {
|
|
24
|
+
try {
|
|
25
|
+
r(!0), await a(s);
|
|
26
|
+
} finally {
|
|
27
|
+
r(!1);
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
[a, s]
|
|
31
|
+
);
|
|
32
|
+
return d ? /* @__PURE__ */ t.jsx(
|
|
33
|
+
j,
|
|
34
|
+
{
|
|
35
|
+
title: o("qus.doYouWantToDelete"),
|
|
36
|
+
okText: e.toUpperCase(),
|
|
37
|
+
cancelText: o("str.no").toUpperCase(),
|
|
38
|
+
onConfirm: p,
|
|
39
|
+
children: /* @__PURE__ */ t.jsx(
|
|
40
|
+
x,
|
|
41
|
+
{
|
|
42
|
+
tooltip: e,
|
|
43
|
+
icon: /* @__PURE__ */ t.jsx(c, {}),
|
|
44
|
+
disabled: m,
|
|
45
|
+
loading: u,
|
|
46
|
+
type: f,
|
|
47
|
+
danger: !0,
|
|
48
|
+
block: n
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
) : /* @__PURE__ */ t.jsx(
|
|
53
|
+
x,
|
|
54
|
+
{
|
|
55
|
+
tooltip: e,
|
|
56
|
+
icon: /* @__PURE__ */ t.jsx(c, {}),
|
|
57
|
+
disabled: m,
|
|
58
|
+
loading: u,
|
|
59
|
+
type: f,
|
|
60
|
+
danger: !0,
|
|
61
|
+
block: n,
|
|
62
|
+
onClick: p
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
export {
|
|
67
|
+
O as default
|
|
68
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../../../_virtual/jsx-runtime.cjs"),c=require("@ant-design/icons"),s=require("react"),a=require("react-i18next"),l=require("./Button.cjs"),x=require("../../../locale/hooks/translation-constants.cjs");function p({value:t,onClick:e}){const[r,n]=s.useState(!1),{t:i}=a.useTranslation(x.TRANSLATION_NAMESPACE),u=s.useCallback(async()=>{n(!0),e(t).finally(()=>n(!1))},[e,t]);return o.jsxRuntimeExports.jsx(l.default,{loading:r,type:"link",onClick:u,icon:o.jsxRuntimeExports.jsx(c.ExportOutlined,{}),tooltip:i("str.export")})}exports.ExportButton=p;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { j as n } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { ExportOutlined as m } from "@ant-design/icons";
|
|
3
|
+
import { useState as p, useCallback as a } from "react";
|
|
4
|
+
import { useTranslation as l } from "react-i18next";
|
|
5
|
+
import f from "./Button.js";
|
|
6
|
+
import { TRANSLATION_NAMESPACE as c } from "../../../locale/hooks/translation-constants.js";
|
|
7
|
+
function k({
|
|
8
|
+
value: t,
|
|
9
|
+
onClick: o
|
|
10
|
+
}) {
|
|
11
|
+
const [i, r] = p(!1), { t: s } = l(c), e = a(async () => {
|
|
12
|
+
r(!0), o(t).finally(() => r(!1));
|
|
13
|
+
}, [o, t]);
|
|
14
|
+
return /* @__PURE__ */ n.jsx(
|
|
15
|
+
f,
|
|
16
|
+
{
|
|
17
|
+
loading: i,
|
|
18
|
+
type: "link",
|
|
19
|
+
onClick: e,
|
|
20
|
+
icon: /* @__PURE__ */ n.jsx(m, {}),
|
|
21
|
+
tooltip: s("str.export")
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
k as ExportButton
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../../_virtual/jsx-runtime.cjs"),j=require("@ant-design/icons"),C=require("antd"),n=require("react"),q=require("react-i18next"),E=require("../../../locale/hooks/translation-constants.cjs"),p=require("./Button.cjs");function R({shouldConfirm:m=!0,block:r,value:i,loading:u,onClick:a,text:l,disabled:c,type:x="link"}){const{t:e}=q.useTranslation(E.TRANSLATION_NAMESPACE),o=n.useMemo(()=>l??e("str.hide"),[l,e]),[d,s]=n.useState(!1);n.useEffect(()=>{s(u??!1)},[u]);const f=n.useCallback(async()=>{try{s(!0),await a(i)}finally{s(!1)}},[a,i]);return m?t.jsxRuntimeExports.jsx(C.Popconfirm,{title:e("qus.doYouWantToHide"),okText:o.toUpperCase(),cancelText:e("str.no").toUpperCase(),onConfirm:f,children:t.jsxRuntimeExports.jsx(p.default,{tooltip:o,icon:t.jsxRuntimeExports.jsx(j.DownCircleOutlined,{}),disabled:c,loading:d,type:x,danger:!0,block:r})}):t.jsxRuntimeExports.jsx(p.default,{tooltip:o,icon:t.jsxRuntimeExports.jsx(j.DownCircleOutlined,{}),disabled:c,loading:d,type:x,danger:!0,block:r,onClick:f})}exports.default=R;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { j as o } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { DownCircleOutlined as c } from "@ant-design/icons";
|
|
3
|
+
import { Popconfirm as C } from "antd";
|
|
4
|
+
import { useMemo as j, useState as T, useEffect as g, useCallback as A } from "react";
|
|
5
|
+
import { useTranslation as E } from "react-i18next";
|
|
6
|
+
import { TRANSLATION_NAMESPACE as _ } from "../../../locale/hooks/translation-constants.js";
|
|
7
|
+
import d from "./Button.js";
|
|
8
|
+
function H({
|
|
9
|
+
shouldConfirm: x = !0,
|
|
10
|
+
block: n,
|
|
11
|
+
value: i,
|
|
12
|
+
loading: s,
|
|
13
|
+
onClick: a,
|
|
14
|
+
text: l,
|
|
15
|
+
disabled: m,
|
|
16
|
+
type: f = "link"
|
|
17
|
+
}) {
|
|
18
|
+
const { t } = E(_), r = j(() => l ?? t("str.hide"), [l, t]), [u, e] = T(!1);
|
|
19
|
+
g(() => {
|
|
20
|
+
e(s ?? !1);
|
|
21
|
+
}, [s]);
|
|
22
|
+
const p = A(
|
|
23
|
+
async () => {
|
|
24
|
+
try {
|
|
25
|
+
e(!0), await a(i);
|
|
26
|
+
} finally {
|
|
27
|
+
e(!1);
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
[a, i]
|
|
31
|
+
);
|
|
32
|
+
return x ? /* @__PURE__ */ o.jsx(
|
|
33
|
+
C,
|
|
34
|
+
{
|
|
35
|
+
title: t("qus.doYouWantToHide"),
|
|
36
|
+
okText: r.toUpperCase(),
|
|
37
|
+
cancelText: t("str.no").toUpperCase(),
|
|
38
|
+
onConfirm: p,
|
|
39
|
+
children: /* @__PURE__ */ o.jsx(
|
|
40
|
+
d,
|
|
41
|
+
{
|
|
42
|
+
tooltip: r,
|
|
43
|
+
icon: /* @__PURE__ */ o.jsx(c, {}),
|
|
44
|
+
disabled: m,
|
|
45
|
+
loading: u,
|
|
46
|
+
type: f,
|
|
47
|
+
danger: !0,
|
|
48
|
+
block: n
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
) : /* @__PURE__ */ o.jsx(
|
|
53
|
+
d,
|
|
54
|
+
{
|
|
55
|
+
tooltip: r,
|
|
56
|
+
icon: /* @__PURE__ */ o.jsx(c, {}),
|
|
57
|
+
disabled: m,
|
|
58
|
+
loading: u,
|
|
59
|
+
type: f,
|
|
60
|
+
danger: !0,
|
|
61
|
+
block: n,
|
|
62
|
+
onClick: p
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
export {
|
|
67
|
+
H as default
|
|
68
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../../../../_virtual/jsx-runtime.cjs"),g=require("@ant-design/icons"),n=require("react"),R=require("react-i18next"),k=require("../../../locale/hooks/translation-constants.cjs"),q=require("./Button.cjs");function C({onClick:o,children:u,accept:c,className:a,disabled:l,type:x="link"}){const[p,i]=n.useState(!1),{t:m}=R.useTranslation(k.TRANSLATION_NAMESPACE),e=n.useRef(null),f=n.useCallback(()=>{d(t=>t+1),e.current&&setTimeout(()=>{var t;(t=e==null?void 0:e.current)==null||t.click()},10)},[]),[j,d]=n.useState(0),y=n.useCallback(async t=>{i(!0);const r=t.target.files[0];r&&await o(r),i(!1)},[o]);return s.jsxRuntimeExports.jsxs("div",{className:a,children:[s.jsxRuntimeExports.jsx("input",{type:"file",style:{display:"none"},ref:e,onChange:y,accept:c},j),s.jsxRuntimeExports.jsx(q.default,{loading:p,type:x,disabled:l,onClick:f,icon:s.jsxRuntimeExports.jsx(g.ImportOutlined,{}),tooltip:m("str.import"),children:u})]})}exports.ImportButton=C;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { j as n } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { ImportOutlined as k } from "@ant-design/icons";
|
|
3
|
+
import { useState as r, useRef as C, useCallback as l } from "react";
|
|
4
|
+
import { useTranslation as A } from "react-i18next";
|
|
5
|
+
import { TRANSLATION_NAMESPACE as T } from "../../../locale/hooks/translation-constants.js";
|
|
6
|
+
import h from "./Button.js";
|
|
7
|
+
function O({
|
|
8
|
+
onClick: e,
|
|
9
|
+
children: c,
|
|
10
|
+
accept: m,
|
|
11
|
+
className: a,
|
|
12
|
+
disabled: p,
|
|
13
|
+
type: u = "link"
|
|
14
|
+
}) {
|
|
15
|
+
const [f, s] = r(!1), { t: x } = A(T), o = C(null), d = l(() => {
|
|
16
|
+
y((t) => t + 1), o.current && setTimeout(() => {
|
|
17
|
+
var t;
|
|
18
|
+
(t = o == null ? void 0 : o.current) == null || t.click();
|
|
19
|
+
}, 10);
|
|
20
|
+
}, []), [j, y] = r(0), g = l(
|
|
21
|
+
async (t) => {
|
|
22
|
+
s(!0);
|
|
23
|
+
const i = t.target.files[0];
|
|
24
|
+
i && await e(i), s(!1);
|
|
25
|
+
},
|
|
26
|
+
[e]
|
|
27
|
+
);
|
|
28
|
+
return /* @__PURE__ */ n.jsxs("div", { className: a, children: [
|
|
29
|
+
/* @__PURE__ */ n.jsx(
|
|
30
|
+
"input",
|
|
31
|
+
{
|
|
32
|
+
type: "file",
|
|
33
|
+
style: { display: "none" },
|
|
34
|
+
ref: o,
|
|
35
|
+
onChange: g,
|
|
36
|
+
accept: m
|
|
37
|
+
},
|
|
38
|
+
j
|
|
39
|
+
),
|
|
40
|
+
/* @__PURE__ */ n.jsx(
|
|
41
|
+
h,
|
|
42
|
+
{
|
|
43
|
+
loading: f,
|
|
44
|
+
type: u,
|
|
45
|
+
disabled: p,
|
|
46
|
+
onClick: d,
|
|
47
|
+
icon: /* @__PURE__ */ n.jsx(k, {}),
|
|
48
|
+
tooltip: x("str.import"),
|
|
49
|
+
children: c
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
] });
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
O as ImportButton
|
|
56
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../_virtual/jsx-runtime.cjs"),a=require("@ant-design/icons"),l=require("react-i18next"),x=require("./Button.cjs"),j=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(j.TRANSLATION_NAMESPACE);return e.jsxRuntimeExports.jsx(x.default,{type:o,className:s,to:i,block:r,size:n,onClick:t&&(()=>t(!0)),icon:e.jsxRuntimeExports.jsx(a.PlusOutlined,{}),children:u??c("str.new")})};exports.NewButton=d;
|