@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,30 @@
|
|
|
1
|
+
import { j as c } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { Form as f, Select as m } from "antd";
|
|
3
|
+
import { useState as x, useEffect as F } from "react";
|
|
4
|
+
import S from "../select/SelectComponent.js";
|
|
5
|
+
const R = ({ className: n, onSelect: p, label: u, required: a, name: l, mode: o, items: e }) => {
|
|
6
|
+
const r = f.useFormInstance(), [s, d] = x(!0);
|
|
7
|
+
return F(() => {
|
|
8
|
+
if (e && s) {
|
|
9
|
+
const t = e.filter((i) => i.alreadySelected).map((i) => i.id);
|
|
10
|
+
r == null || r.setFieldsValue({
|
|
11
|
+
[l]: o === "multiple" ? t : t == null ? void 0 : t[0]
|
|
12
|
+
}), d(!1);
|
|
13
|
+
}
|
|
14
|
+
}, [s, r, e, o, l]), /* @__PURE__ */ c.jsx(
|
|
15
|
+
S,
|
|
16
|
+
{
|
|
17
|
+
required: a,
|
|
18
|
+
label: u,
|
|
19
|
+
mode: o,
|
|
20
|
+
className: n,
|
|
21
|
+
name: l,
|
|
22
|
+
onSelect: p,
|
|
23
|
+
items: e,
|
|
24
|
+
itemBuilder: (t) => /* @__PURE__ */ c.jsx(m.Option, { value: t.id, disabled: t.lock, children: t.label }, t.id)
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
R as SelectFieldInReport
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../../_virtual/jsx-runtime.cjs"),e=require("antd"),n=e.List.Item.Meta,o=e.List.Item,u=({title:s,description:i,children:r})=>t.jsxRuntimeExports.jsxs(o,{className:"",children:[t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(n,{title:s,description:i})}),t.jsxRuntimeExports.jsx("div",{className:"float-right",children:r})]});exports.default=u;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { j as t } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { List as s } from "antd";
|
|
3
|
+
const r = s.Item.Meta, a = s.Item, n = ({
|
|
4
|
+
title: e,
|
|
5
|
+
description: o,
|
|
6
|
+
children: m
|
|
7
|
+
}) => /* @__PURE__ */ t.jsxs(a, { className: "", children: [
|
|
8
|
+
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(r, { title: e, description: o }) }),
|
|
9
|
+
/* @__PURE__ */ t.jsx("div", { className: "float-right", children: m })
|
|
10
|
+
] });
|
|
11
|
+
export {
|
|
12
|
+
n as default
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("../../../../_virtual/jsx-runtime.cjs"),x=require("antd"),P=require("react"),$=require("react-i18next"),k=require("../../../locale/hooks/translation-constants.cjs"),H=require("../tooltip/TooltipComponent.cjs");function B({label:a,rules:p=[],required:y,placeholder:u,notSearch:E,children:d,readOnly:s,items:o,dropdownRender:R,itemBuilder:w,loading:m,showLoadingInEmptyIndicator:T,nameFieldInArray:f="name",innerRef:_,tooltip:q,filterOption:L,tagRender:N,...n}){const{t:M}=$.useTranslation(k.TRANSLATION_NAMESPACE),I=P.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[f];return r.jsxRuntimeExports.jsx("option",{value:t,children:r.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:c}})},t)},[f]);return r.jsxRuntimeExports.jsx(x.ConfigProvider,{renderEmpty:T&&m?()=>r.jsxRuntimeExports.jsx(x.Spin,{}):void 0,children:r.jsxRuntimeExports.jsx(H.default,{title:q,children:r.jsxRuntimeExports.jsx(x.Form.Item,{label:a,name:n.name,help:n.help,className:n.className,rules:[...p,{required:y,message:`${a??u??""} ${M("err.validation.required")}`}],children:r.jsxRuntimeExports.jsx(x.Select,{ref:_,loading:m,open:s?!1:void 0,onChange:!s&&n.onChange,allowClear:!s&&n.allowClear,showSearch:!E,className:`max-width ${s?"readOnly":""}`,...n,tagRender:N,placeholder:u??a,filterOption:L??((e,t)=>{var c,h,j,g;try{const i=(j=(h=(c=t==null?void 0:t.children)==null?void 0:c.props)==null?void 0:h.dangerouslySetInnerHTML)==null?void 0:j.__html,O=e.toLowerCase().split(/\s+/),C=(t==null?void 0:t.children)??"",S=typeof C=="string"?C.toLowerCase():typeof i=="string"?i.toLowerCase():"",b=(((g=t==null?void 0:t.value)==null?void 0:g.toString())??"").toLowerCase(),A=S.replace(/\s/g,"");return O.every(l=>S.indexOf(l)>=0||b.indexOf(l)>=0||A.indexOf(l)>=0)}catch(i){return console.log(i),!0}}),dropdownRender:R,children:d===null?void 0:d??(o&&(o==null?void 0:o.map(w??I)))})})})})}exports.default=B;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { j as t } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { ConfigProvider as H, Spin as P, Form as R, Select as b } from "antd";
|
|
3
|
+
import { useCallback as q } from "react";
|
|
4
|
+
import { useTranslation as B } from "react-i18next";
|
|
5
|
+
import { TRANSLATION_NAMESPACE as D } from "../../../locale/hooks/translation-constants.js";
|
|
6
|
+
import F from "../tooltip/TooltipComponent.js";
|
|
7
|
+
function Q({
|
|
8
|
+
label: m,
|
|
9
|
+
rules: j = [],
|
|
10
|
+
required: y,
|
|
11
|
+
placeholder: l,
|
|
12
|
+
notSearch: w,
|
|
13
|
+
children: a,
|
|
14
|
+
readOnly: o,
|
|
15
|
+
items: s,
|
|
16
|
+
dropdownRender: u,
|
|
17
|
+
itemBuilder: L,
|
|
18
|
+
loading: d,
|
|
19
|
+
showLoadingInEmptyIndicator: T,
|
|
20
|
+
nameFieldInArray: h = "name",
|
|
21
|
+
innerRef: N,
|
|
22
|
+
tooltip: _,
|
|
23
|
+
filterOption: E,
|
|
24
|
+
tagRender: A,
|
|
25
|
+
...n
|
|
26
|
+
}) {
|
|
27
|
+
const { t: I } = B(D), M = q(
|
|
28
|
+
(e) => {
|
|
29
|
+
const r = 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[h];
|
|
30
|
+
return /* @__PURE__ */ t.jsx("option", { value: r, children: /* @__PURE__ */ t.jsx("div", { dangerouslySetInnerHTML: { __html: c } }) }, r);
|
|
31
|
+
},
|
|
32
|
+
[h]
|
|
33
|
+
);
|
|
34
|
+
return /* @__PURE__ */ t.jsx(
|
|
35
|
+
H,
|
|
36
|
+
{
|
|
37
|
+
renderEmpty: T && d ? () => /* @__PURE__ */ t.jsx(P, {}) : void 0,
|
|
38
|
+
children: /* @__PURE__ */ t.jsx(F, { title: _, children: /* @__PURE__ */ t.jsx(
|
|
39
|
+
R.Item,
|
|
40
|
+
{
|
|
41
|
+
label: m,
|
|
42
|
+
name: n.name,
|
|
43
|
+
help: n.help,
|
|
44
|
+
className: n.className,
|
|
45
|
+
rules: [
|
|
46
|
+
...j,
|
|
47
|
+
{
|
|
48
|
+
required: y,
|
|
49
|
+
message: `${m ?? l ?? ""} ${I(
|
|
50
|
+
"err.validation.required"
|
|
51
|
+
)}`
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
children: /* @__PURE__ */ t.jsx(
|
|
55
|
+
b,
|
|
56
|
+
{
|
|
57
|
+
ref: N,
|
|
58
|
+
loading: d,
|
|
59
|
+
open: o ? !1 : void 0,
|
|
60
|
+
onChange: !o && n.onChange,
|
|
61
|
+
allowClear: !o && n.allowClear,
|
|
62
|
+
showSearch: !w,
|
|
63
|
+
className: `max-width ${o ? "readOnly" : ""}`,
|
|
64
|
+
...n,
|
|
65
|
+
tagRender: A,
|
|
66
|
+
placeholder: l ?? m,
|
|
67
|
+
filterOption: E ?? ((e, r) => {
|
|
68
|
+
var c, x, C, g;
|
|
69
|
+
try {
|
|
70
|
+
const i = (C = (x = (c = r == null ? void 0 : r.children) == null ? void 0 : c.props) == null ? void 0 : x.dangerouslySetInnerHTML) == null ? void 0 : C.__html, O = e.toLowerCase().split(/\s+/), p = (r == null ? void 0 : r.children) ?? "", S = typeof p == "string" ? p.toLowerCase() : typeof i == "string" ? i.toLowerCase() : "", $ = (((g = r == null ? void 0 : r.value) == null ? void 0 : g.toString()) ?? "").toLowerCase(), k = S.replace(/\s/g, "");
|
|
71
|
+
return O.every(
|
|
72
|
+
(f) => S.indexOf(f) >= 0 || $.indexOf(f) >= 0 || k.indexOf(f) >= 0
|
|
73
|
+
);
|
|
74
|
+
} catch (i) {
|
|
75
|
+
return console.log(i), !0;
|
|
76
|
+
}
|
|
77
|
+
}),
|
|
78
|
+
dropdownRender: u,
|
|
79
|
+
children: a === null ? void 0 : a ?? (s && (s == null ? void 0 : s.map(L ?? M)))
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
) })
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
export {
|
|
88
|
+
Q as default
|
|
89
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../../_virtual/jsx-runtime.cjs"),o=require("react-show-more-text");;/* empty css */const e=r=>t.jsxRuntimeExports.jsx(o,{...r});exports.ShowMore=e;exports.default=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../../_virtual/jsx-runtime.cjs"),a=require("antd"),v=require("../../../context/WindowDimension.cjs"),i=require("react"),u=require("react-router"),g=require("react-router-dom"),{Content:q}=a.Layout,E=({positionOfRoute:c,initialKey:s="*",tabs:l,className:x="",mode:d="default"})=>{const[m,p]=i.useState(s),o=u.useNavigate(),j=e=>{o(e)},r=g.useLocation();i.useEffect(()=>{const e=r.pathname.split("/")[c];p(e??""),e||o(s,{replace:!0})},[s,r.pathname,o,c]);const{isDesktop:h}=v.default(),n=d==="side"&&h,b=n?"left":"top",R=n?"d-flex h-100":"";return t.jsxRuntimeExports.jsxs("div",{className:`${x} ${R}`,children:[t.jsxRuntimeExports.jsx(a.Tabs,{type:"card",tabPosition:b,activeKey:m,onChange:j,children:l.map(({key:e,label:f})=>t.jsxRuntimeExports.jsx(a.Tabs.TabPane,{tab:f},e))}),t.jsxRuntimeExports.jsx(q,{className:`max-height ${n?"overflow-auto":""}`,children:t.jsxRuntimeExports.jsx(u.Outlet,{})})]})};exports.TabViewWithRoute=E;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { j as e } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { Tabs as r, Layout as b } from "antd";
|
|
3
|
+
import v from "../../../context/WindowDimension.js";
|
|
4
|
+
import { useState as g, useEffect as w } from "react";
|
|
5
|
+
import { useNavigate as y, Outlet as N } from "react-router";
|
|
6
|
+
import { useLocation as P } from "react-router-dom";
|
|
7
|
+
const { Content: S } = b, L = ({
|
|
8
|
+
positionOfRoute: n,
|
|
9
|
+
initialKey: s = "*",
|
|
10
|
+
tabs: i,
|
|
11
|
+
className: m = "",
|
|
12
|
+
mode: p = "default"
|
|
13
|
+
}) => {
|
|
14
|
+
const [l, u] = g(s), o = y(), f = (t) => {
|
|
15
|
+
o(t);
|
|
16
|
+
}, c = P();
|
|
17
|
+
w(() => {
|
|
18
|
+
const t = c.pathname.split("/")[n];
|
|
19
|
+
u(t ?? ""), t || o(s, { replace: !0 });
|
|
20
|
+
}, [s, c.pathname, o, n]);
|
|
21
|
+
const { isDesktop: d } = v(), a = p === "side" && d, h = a ? "left" : "top", x = a ? "d-flex h-100" : "";
|
|
22
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `${m} ${x}`, children: [
|
|
23
|
+
/* @__PURE__ */ e.jsx(
|
|
24
|
+
r,
|
|
25
|
+
{
|
|
26
|
+
type: "card",
|
|
27
|
+
tabPosition: h,
|
|
28
|
+
activeKey: l,
|
|
29
|
+
onChange: f,
|
|
30
|
+
children: i.map(({ key: t, label: j }) => /* @__PURE__ */ e.jsx(r.TabPane, { tab: j }, t))
|
|
31
|
+
}
|
|
32
|
+
),
|
|
33
|
+
/* @__PURE__ */ e.jsx(S, { className: `max-height ${a ? "overflow-auto" : ""}`, children: /* @__PURE__ */ e.jsx(N, {}) })
|
|
34
|
+
] });
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
L as TabViewWithRoute
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("../../../../_virtual/jsx-runtime.cjs"),a=require("antd"),c=require("react");function d({minusHeight:g,onRow:m,count:h=1,onPageSizeChanged:f,pagination:e=!1,rowKey:s="id",columns:t,className:o,scroll:n,...i}){const u=c.useMemo(()=>t.filter(r=>!r.hidden),[t]);return l.jsxRuntimeExports.jsx(a.Table,{className:`custom-scroll ${o}`,style:{width:"100%"},columns:u,rowKey:s,...i,scroll:n||{x:!0},pagination:e&&{...e,hideOnSinglePage:!0,showSizeChanger:!1}})}exports.default=d;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { j as l } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { Table as m } from "antd";
|
|
3
|
+
import { useMemo as u } from "react";
|
|
4
|
+
function j({
|
|
5
|
+
minusHeight: f,
|
|
6
|
+
onRow: c,
|
|
7
|
+
count: d = 1,
|
|
8
|
+
onPageSizeChanged: h,
|
|
9
|
+
pagination: e = !1,
|
|
10
|
+
rowKey: s = "id",
|
|
11
|
+
columns: o,
|
|
12
|
+
className: n,
|
|
13
|
+
scroll: t,
|
|
14
|
+
...i
|
|
15
|
+
}) {
|
|
16
|
+
const r = u(() => o.filter((a) => !a.hidden), [o]);
|
|
17
|
+
return /* @__PURE__ */ l.jsx(
|
|
18
|
+
m,
|
|
19
|
+
{
|
|
20
|
+
className: `custom-scroll ${n}`,
|
|
21
|
+
style: { width: "100%" },
|
|
22
|
+
columns: r,
|
|
23
|
+
rowKey: s,
|
|
24
|
+
...i,
|
|
25
|
+
scroll: t || {
|
|
26
|
+
// y: `calc(100vh - ${minusHeight ?? 0}px)`,
|
|
27
|
+
x: !0
|
|
28
|
+
// scrollToFirstRowOnChange: true,
|
|
29
|
+
},
|
|
30
|
+
pagination: e && {
|
|
31
|
+
...e,
|
|
32
|
+
hideOnSinglePage: !0,
|
|
33
|
+
showSizeChanger: !1
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
j as default
|
|
40
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../../../../_virtual/jsx-runtime.cjs"),d=require("antd"),p=require("../../../locale/hooks/translation-constants.cjs"),x=require("react-i18next"),T=({onClick:n,clickable:o,colorFunction:t,translation:i,value:s})=>{var r;const e=t==null?void 0:t(s),{t:u}=x.useTranslation(p.TRANSLATION_NAMESPACE),c=d.Tag;return a.jsxRuntimeExports.jsx(c,{onClick:n,color:e==null?void 0:e.color,icon:e==null?void 0:e.icon,style:{color:e==null?void 0:e.text,cursor:o?"pointer":void 0},children:(r=u(i[s]))==null?void 0:r.toUpperCase()})};exports.default=T;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { j as f } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { Tag as x } from "antd";
|
|
3
|
+
import { TRANSLATION_NAMESPACE as T } from "../../../locale/hooks/translation-constants.js";
|
|
4
|
+
import { useTranslation as A } from "react-i18next";
|
|
5
|
+
const C = ({
|
|
6
|
+
onClick: e,
|
|
7
|
+
clickable: m,
|
|
8
|
+
colorFunction: o,
|
|
9
|
+
translation: p,
|
|
10
|
+
value: r
|
|
11
|
+
}) => {
|
|
12
|
+
var s;
|
|
13
|
+
const t = o == null ? void 0 : o(r), { t: i } = A(T), n = x;
|
|
14
|
+
return /* @__PURE__ */ f.jsx(
|
|
15
|
+
n,
|
|
16
|
+
{
|
|
17
|
+
onClick: e,
|
|
18
|
+
color: t == null ? void 0 : t.color,
|
|
19
|
+
icon: t == null ? void 0 : t.icon,
|
|
20
|
+
style: {
|
|
21
|
+
color: t == null ? void 0 : t.text,
|
|
22
|
+
cursor: m ? "pointer" : void 0
|
|
23
|
+
},
|
|
24
|
+
children: (s = i(p[r])) == null ? void 0 : s.toUpperCase()
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
C as default
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../../../../_virtual/jsx-runtime.cjs"),p=require("antd"),x=require("react"),b=require("react-i18next"),h=require("../../../locale/hooks/translation-constants.cjs"),v=require("../tooltip/TooltipComponent.cjs"),w=require("./TextField.cjs"),B=x.forwardRef(function({type:O,required:i,label:t,rules:u=[],placeholder:r,onEnter:m,form:l,nextFocus:f,min:c,moneyField:n,addonAfter:j,minLength:T,defaultValue:q,pattern:E,disabled:R,readOnly:g,onChange:N,value:I,max:$,addonBefore:A,size:M,isInt:d=!1,tooltip:S,...C},P){const{t:a}=b.useTranslation(h.TRANSLATION_NAMESPACE),_=x.useMemo(()=>[...u,{required:i,message:`${t??r??""} ${a("err.validation.required")}`}],[u,t,r,a,i]);return o.jsxRuntimeExports.jsx(v.default,{title:S,children:o.jsxRuntimeExports.jsx(p.Form.Item,{...C,label:t,rules:_,children:o.jsxRuntimeExports.jsx(p.InputNumber,{ref:P,disabled:R,defaultValue:q,value:I,readOnly:g,addonBefore:A,minLength:T,addonAfter:j,step:d?1:void 0,pattern:d?"d*":E,onChange:N,onPressEnter:e=>w.onEnterInternalTextField(e,f,l,m),className:"max-width",min:c===null?void 0:c??0,max:$,type:n?void 0:"number",size:M,formatter:n?e=>{if(e.includes(".")){const s=`${e}`.split(".");return s[0]=s[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),s.join(".")}else return`${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,",")}:void 0,parser:n?e=>e==null?void 0:e.replace(/\$\s?|(,*)/g,""):void 0,placeholder:r??t})})})});exports.default=B;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { j as s } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { Form as M, InputNumber as P } from "antd";
|
|
3
|
+
import { forwardRef as S, useMemo as F } from "react";
|
|
4
|
+
import { useTranslation as L } from "react-i18next";
|
|
5
|
+
import { TRANSLATION_NAMESPACE as O } from "../../../locale/hooks/translation-constants.js";
|
|
6
|
+
import _ from "../tooltip/TooltipComponent.js";
|
|
7
|
+
import { onEnterInternalTextField as b } from "./TextField.js";
|
|
8
|
+
const K = S(
|
|
9
|
+
function({
|
|
10
|
+
// eslint-disable-next-line no-unused-vars
|
|
11
|
+
type: q,
|
|
12
|
+
required: i,
|
|
13
|
+
label: t,
|
|
14
|
+
rules: m = [],
|
|
15
|
+
placeholder: o,
|
|
16
|
+
onEnter: a,
|
|
17
|
+
form: c,
|
|
18
|
+
nextFocus: u,
|
|
19
|
+
min: p,
|
|
20
|
+
moneyField: e,
|
|
21
|
+
addonAfter: x,
|
|
22
|
+
minLength: j,
|
|
23
|
+
defaultValue: N,
|
|
24
|
+
pattern: T,
|
|
25
|
+
disabled: E,
|
|
26
|
+
readOnly: $,
|
|
27
|
+
onChange: g,
|
|
28
|
+
value: l,
|
|
29
|
+
max: A,
|
|
30
|
+
addonBefore: I,
|
|
31
|
+
size: R,
|
|
32
|
+
isInt: d = !1,
|
|
33
|
+
tooltip: h,
|
|
34
|
+
...w
|
|
35
|
+
}, B) {
|
|
36
|
+
const { t: f } = L(O), C = F(
|
|
37
|
+
() => [
|
|
38
|
+
...m,
|
|
39
|
+
{
|
|
40
|
+
required: i,
|
|
41
|
+
message: `${t ?? o ?? ""} ${f(
|
|
42
|
+
"err.validation.required"
|
|
43
|
+
)}`
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
[m, t, o, f, i]
|
|
47
|
+
);
|
|
48
|
+
return /* @__PURE__ */ s.jsx(_, { title: h, children: /* @__PURE__ */ s.jsx(M.Item, { ...w, label: t, rules: C, children: /* @__PURE__ */ s.jsx(
|
|
49
|
+
P,
|
|
50
|
+
{
|
|
51
|
+
ref: B,
|
|
52
|
+
disabled: E,
|
|
53
|
+
defaultValue: N,
|
|
54
|
+
value: l,
|
|
55
|
+
readOnly: $,
|
|
56
|
+
addonBefore: I,
|
|
57
|
+
minLength: j,
|
|
58
|
+
addonAfter: x,
|
|
59
|
+
step: d ? 1 : void 0,
|
|
60
|
+
pattern: d ? "d*" : T,
|
|
61
|
+
onChange: g,
|
|
62
|
+
onPressEnter: (r) => b(r, u, c, a),
|
|
63
|
+
className: "max-width",
|
|
64
|
+
min: p === null ? void 0 : p ?? 0,
|
|
65
|
+
max: A,
|
|
66
|
+
type: e ? void 0 : "number",
|
|
67
|
+
size: R,
|
|
68
|
+
formatter: e ? (r) => {
|
|
69
|
+
if (r.includes(".")) {
|
|
70
|
+
const n = `${r}`.split(".");
|
|
71
|
+
return n[0] = n[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), n.join(".");
|
|
72
|
+
} else
|
|
73
|
+
return `${r}`.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
74
|
+
} : void 0,
|
|
75
|
+
parser: e ? (r) => r == null ? void 0 : r.replace(/\$\s?|(,*)/g, "") : void 0,
|
|
76
|
+
placeholder: o ?? t
|
|
77
|
+
}
|
|
78
|
+
) }) });
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
export {
|
|
82
|
+
K as default
|
|
83
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../../_virtual/jsx-runtime.cjs"),l=require("../../../util/ValidationUtil.cjs"),u=require("./TextField.cjs"),i=e=>t.jsxRuntimeExports.jsx(u.default,{...e,rules:[...e.rules??[],...l.default.phoneValidation(e.label??e.placeholder??"")]});exports.default=i;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { j as t } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import l from "../../../util/ValidationUtil.js";
|
|
3
|
+
import i from "./TextField.js";
|
|
4
|
+
const m = (e) => /* @__PURE__ */ t.jsx(
|
|
5
|
+
i,
|
|
6
|
+
{
|
|
7
|
+
...e,
|
|
8
|
+
rules: [
|
|
9
|
+
...e.rules ?? [],
|
|
10
|
+
...l.phoneValidation(
|
|
11
|
+
e.label ?? e.placeholder ?? ""
|
|
12
|
+
)
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
export {
|
|
17
|
+
m as default
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../../../../_virtual/jsx-runtime.cjs"),i=require("antd"),T=require("react-i18next"),j=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)},A=({required:n,label:e,rules:t=[],placeholder:r,onEnter:s,nextFocus:l,className:o,...u})=>{const{t:d}=T.useTranslation(j.TRANSLATION_NAMESPACE),x=i.Form.useFormInstance();return a.jsxRuntimeExports.jsx(i.Form.Item,{...u,className:o,label:e,rules:[...t,{required:n,message:`${e} ${d("err.validation.required")}`}],children:a.jsxRuntimeExports.jsx(i.Input.TextArea,{...u,className:o,onPressEnter:I=>c(I,l,x,s),placeholder:r??e})})};exports.default=A;exports.onEnterInternalTextField=c;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { j as a } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { Form as m, Input as x } from "antd";
|
|
3
|
+
import { useTranslation as l } from "react-i18next";
|
|
4
|
+
import { TRANSLATION_NAMESPACE as A } from "../../../locale/hooks/translation-constants.js";
|
|
5
|
+
const I = (r, e, t, n) => {
|
|
6
|
+
var o;
|
|
7
|
+
e && t && (r.preventDefault(), (o = t == null ? void 0 : t.getFieldInstance(e)) == null || o.focus()), n && n(r);
|
|
8
|
+
}, F = ({
|
|
9
|
+
required: r,
|
|
10
|
+
label: e,
|
|
11
|
+
rules: t = [],
|
|
12
|
+
placeholder: n,
|
|
13
|
+
onEnter: o,
|
|
14
|
+
nextFocus: u,
|
|
15
|
+
className: s,
|
|
16
|
+
...i
|
|
17
|
+
}) => {
|
|
18
|
+
const { t: p } = l(A), c = m.useFormInstance();
|
|
19
|
+
return /* @__PURE__ */ a.jsx(
|
|
20
|
+
m.Item,
|
|
21
|
+
{
|
|
22
|
+
...i,
|
|
23
|
+
className: s,
|
|
24
|
+
label: e,
|
|
25
|
+
rules: [
|
|
26
|
+
...t,
|
|
27
|
+
{
|
|
28
|
+
required: r,
|
|
29
|
+
message: `${e} ${p("err.validation.required")}`
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
children: /* @__PURE__ */ a.jsx(
|
|
33
|
+
x.TextArea,
|
|
34
|
+
{
|
|
35
|
+
...i,
|
|
36
|
+
className: s,
|
|
37
|
+
onPressEnter: (d) => I(d, u, c, o),
|
|
38
|
+
placeholder: n ?? e
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
F as default,
|
|
46
|
+
I as onEnterInternalTextField
|
|
47
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../../../../_virtual/jsx-runtime.cjs"),N=require("@ant-design/icons"),c=require("antd"),O=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:u,onEnter:l,size:x,form:p,addonAfter:m,addonBefore:j,nextFocus:E,autoComplete:I="off",defaultValue:T,readOnly:f,value:g,loading:q,onBlur:R,inputRef:v,status:A,autoFocus:C,onChange:D,tooltip:P,...F})=>{const{t:a}=_.useTranslation(w.TRANSLATION_NAMESPACE),M=O.useMemo(()=>{const r=[...s,{required:n,message:`${e??u??""} ${a("err.validation.required")}`}];return t==="email"&&r.push({type:"email",message:a("err.validation.invalidEmail")}),r},[s,n,e,u,a,t]),S={disabled:i,value:g,readOnly:f,defaultValue:T,autoFocus:C,addonBefore:j,ref:v,onBlur:R,addonAfter:q?o.jsxRuntimeExports.jsx(N.LoadingOutlined,{}):m,status:A,size:x,autoComplete:I,onPressEnter:r=>d(r,E,p,l),type:t,placeholder:u??e},h=t=="password"?c.Input.Password:c.Input;return o.jsxRuntimeExports.jsx(L.default,{title:P,children:o.jsxRuntimeExports.jsx(c.Form.Item,{...F,label:e,rules:M,children:o.jsxRuntimeExports.jsx(h,{...S})})})};exports.default=$;exports.onEnterInternalTextField=d;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { j as e } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { LoadingOutlined as M } from "@ant-design/icons";
|
|
3
|
+
import { Input as p, Form as O } from "antd";
|
|
4
|
+
import { useMemo as R } from "react";
|
|
5
|
+
import { useTranslation as S } from "react-i18next";
|
|
6
|
+
import { TRANSLATION_NAMESPACE as $ } from "../../../locale/hooks/translation-constants.js";
|
|
7
|
+
import D from "../tooltip/TooltipComponent.js";
|
|
8
|
+
const _ = (o, n, t, r) => {
|
|
9
|
+
var i;
|
|
10
|
+
n && t && (o.preventDefault(), (i = t == null ? void 0 : t.getFieldInstance(n)) == null || i.focus()), r && r(o);
|
|
11
|
+
}, Q = ({
|
|
12
|
+
type: o,
|
|
13
|
+
required: n,
|
|
14
|
+
label: t,
|
|
15
|
+
disabled: r,
|
|
16
|
+
rules: i = [],
|
|
17
|
+
placeholder: m,
|
|
18
|
+
onEnter: d,
|
|
19
|
+
size: f,
|
|
20
|
+
form: l,
|
|
21
|
+
addonAfter: u,
|
|
22
|
+
addonBefore: c,
|
|
23
|
+
nextFocus: x,
|
|
24
|
+
autoComplete: j = "off",
|
|
25
|
+
defaultValue: T,
|
|
26
|
+
readOnly: g,
|
|
27
|
+
value: A,
|
|
28
|
+
loading: E,
|
|
29
|
+
onBlur: I,
|
|
30
|
+
inputRef: v,
|
|
31
|
+
status: C,
|
|
32
|
+
autoFocus: P,
|
|
33
|
+
onChange: k,
|
|
34
|
+
tooltip: h,
|
|
35
|
+
...F
|
|
36
|
+
}) => {
|
|
37
|
+
const { t: a } = S($), N = R(() => {
|
|
38
|
+
const s = [
|
|
39
|
+
...i,
|
|
40
|
+
{
|
|
41
|
+
required: n,
|
|
42
|
+
message: `${t ?? m ?? ""} ${a(
|
|
43
|
+
"err.validation.required"
|
|
44
|
+
)}`
|
|
45
|
+
}
|
|
46
|
+
];
|
|
47
|
+
return o === "email" && s.push({
|
|
48
|
+
type: "email",
|
|
49
|
+
message: a("err.validation.invalidEmail")
|
|
50
|
+
}), s;
|
|
51
|
+
}, [i, n, t, m, a, o]), w = {
|
|
52
|
+
disabled: r,
|
|
53
|
+
value: A,
|
|
54
|
+
readOnly: g,
|
|
55
|
+
defaultValue: T,
|
|
56
|
+
autoFocus: P,
|
|
57
|
+
addonBefore: c,
|
|
58
|
+
ref: v,
|
|
59
|
+
onBlur: I,
|
|
60
|
+
addonAfter: E ? /* @__PURE__ */ e.jsx(M, {}) : u,
|
|
61
|
+
status: C,
|
|
62
|
+
size: f,
|
|
63
|
+
autoComplete: j,
|
|
64
|
+
onPressEnter: (s) => _(s, x, l, d),
|
|
65
|
+
type: o,
|
|
66
|
+
placeholder: m ?? t
|
|
67
|
+
}, L = o == "password" ? p.Password : p;
|
|
68
|
+
return /* @__PURE__ */ e.jsx(D, { title: h, children: /* @__PURE__ */ e.jsx(O.Item, { ...F, label: t, rules: N, children: /* @__PURE__ */ e.jsx(L, { ...w }) }) });
|
|
69
|
+
};
|
|
70
|
+
export {
|
|
71
|
+
Q as default,
|
|
72
|
+
_ as onEnterInternalTextField
|
|
73
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../../../../_virtual/jsx-runtime.cjs"),r=require("antd"),u=({children:e,title:t})=>t?o.jsxRuntimeExports.jsx(r.Tooltip,{title:t,children:e}):e;exports.default=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../../_virtual/jsx-runtime.cjs"),a=require("@ant-design/icons"),E=require("antd"),u=require("i18next"),y=require("react-i18next"),d=require("../button/Button.cjs"),f=require("../../../locale/hooks/translation-constants.cjs"),q=({errorChildren:l,children:j,onRetry:r,onClickBack:x,success:s,loading:i,error:e,successTitle:c=u.t("str.success"),successMessage:m,errorMessage:o=u.t("err.save"),errorTitle:p=u.t("str.error"),loadingTitle:v=u.t("message.loading.saving"),loadingMessage:R})=>{const{t:n}=y.useTranslation(f.TRANSLATION_NAMESPACE);return t.jsxRuntimeExports.jsx(E.Result,{status:i?void 0:s?"success":e?["403","404","500"].includes(e==null?void 0:e.code)?e.code:e?"error":void 0:void 0,title:i?v:s?c:e?p:void 0,icon:i?t.jsxRuntimeExports.jsx(a.LoadingOutlined,{}):void 0,subTitle:i?R:s?m:e?typeof o=="function"?o()??n("err.save"):o??n("err.save"):void 0,extra:[s?t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:j}):e?t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[!!x&&t.jsxRuntimeExports.jsx(d.default,{onClick:x,htmlType:"button",type:"primary",icon:t.jsxRuntimeExports.jsx(a.ArrowLeftOutlined,{}),children:n("str.previous")}),!!r&&t.jsxRuntimeExports.jsx(d.default,{type:"primary",onClick:()=>r(void 0,void 0,!0),children:n("str.retry")},"retry"),l]}):t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{})]})};exports.default=q;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { j as t } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { LoadingOutlined as c, ArrowLeftOutlined as y } from "@ant-design/icons";
|
|
3
|
+
import { Result as A } from "antd";
|
|
4
|
+
import { t as n } from "i18next";
|
|
5
|
+
import { useTranslation as T } from "react-i18next";
|
|
6
|
+
import p from "../button/Button.js";
|
|
7
|
+
import { TRANSLATION_NAMESPACE as h } from "../../../locale/hooks/translation-constants.js";
|
|
8
|
+
const b = ({
|
|
9
|
+
errorChildren: a,
|
|
10
|
+
children: u,
|
|
11
|
+
onRetry: r,
|
|
12
|
+
onClickBack: d,
|
|
13
|
+
success: o,
|
|
14
|
+
loading: s,
|
|
15
|
+
error: i,
|
|
16
|
+
successTitle: l = n("str.success"),
|
|
17
|
+
successMessage: v,
|
|
18
|
+
errorMessage: m = n("err.save"),
|
|
19
|
+
errorTitle: x = n("str.error"),
|
|
20
|
+
loadingTitle: f = n("message.loading.saving"),
|
|
21
|
+
loadingMessage: j
|
|
22
|
+
}) => {
|
|
23
|
+
const { t: e } = T(h);
|
|
24
|
+
return /* @__PURE__ */ t.jsx(
|
|
25
|
+
A,
|
|
26
|
+
{
|
|
27
|
+
status: s ? void 0 : o ? "success" : i ? ["403", "404", "500"].includes(i == null ? void 0 : i.code) ? i.code : i ? "error" : void 0 : void 0,
|
|
28
|
+
title: s ? f : o ? l : i ? x : void 0,
|
|
29
|
+
icon: s ? /* @__PURE__ */ t.jsx(c, {}) : void 0,
|
|
30
|
+
subTitle: s ? j : o ? v : i ? typeof m == "function" ? m() ?? e("err.save") : m ?? e("err.save") : void 0,
|
|
31
|
+
extra: [
|
|
32
|
+
o ? /* @__PURE__ */ t.jsx(t.Fragment, { children: u }) : i ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
33
|
+
!!d && /* @__PURE__ */ t.jsx(
|
|
34
|
+
p,
|
|
35
|
+
{
|
|
36
|
+
onClick: d,
|
|
37
|
+
htmlType: "button",
|
|
38
|
+
type: "primary",
|
|
39
|
+
icon: /* @__PURE__ */ t.jsx(y, {}),
|
|
40
|
+
children: e("str.previous")
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
!!r && /* @__PURE__ */ t.jsx(
|
|
44
|
+
p,
|
|
45
|
+
{
|
|
46
|
+
type: "primary",
|
|
47
|
+
onClick: () => r(void 0, void 0, !0),
|
|
48
|
+
children: e("str.retry")
|
|
49
|
+
},
|
|
50
|
+
"retry"
|
|
51
|
+
),
|
|
52
|
+
a
|
|
53
|
+
] }) : /* @__PURE__ */ t.jsx(t.Fragment, {})
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
export {
|
|
59
|
+
b as default
|
|
60
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("../../../../_virtual/jsx-runtime.cjs"),S=require("antd"),o=require("react"),q=require("../appearance/Hider.cjs"),{Step:_}=S.Steps,y=o.forwardRef(({pages:d,onSubmit:a,initPosition:p=0,progressDot:v,type:E,labelPlacement:b,className:g,pageStyle:w},k)=>{const[s,c]=o.useState(0),[r,f]=o.useState([]);o.useEffect(()=>{c(p)},[p]),o.useImperativeHandle(k,()=>({gotTo:t=>c(t)}),[]);const x=o.useCallback((t,u=!1,l=!1)=>{const e=[...r];if(t!==void 0&&(e[s]=t,f(e)),l||c(s+1),u&&a){const n={};for(const h of e)for(const R in h)n[R]=h[R];a(e,n)}},[s,r,a]),m=o.useCallback(()=>{const t=[...r];t[s]=void 0,f(t),c(s-1)},[s,r]),j=o.useMemo(()=>{const t=[],u=[],l=d.filter(e=>!e.hidden);for(let e=0;e<l.length;e++){const n=l[e];u.push(i.jsxRuntimeExports.jsx(q.default,{hide:s!==e,children:n.component({forward:x,backward:m},r,s===e)},`${n.title}${e}`)),t.push(i.jsxRuntimeExports.jsx(_,{icon:n.icon,title:n.title},n.title))}return{_pages:u,steps:t}},[m,s,r,x,d]);return i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(S.Steps,{labelPlacement:b,progressDot:v,className:[g,"pb-3"].join(" "),current:s,type:E,children:j.steps}),i.jsxRuntimeExports.jsx("div",{style:w,children:j._pages})]})});exports.default=y;
|