@kingteza/crud-component 1.0.4 → 1.0.5
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/FileSaver.min.cjs +1 -0
- package/dist/_virtual/FileSaver.min.js +5 -1
- package/dist/_virtual/FileSaver.min2.cjs +1 -0
- package/dist/_virtual/FileSaver.min2.js +4 -1
- package/dist/_virtual/ShowMoreText.cjs +1 -0
- package/dist/_virtual/ShowMoreText.js +7 -1
- package/dist/_virtual/ShowMoreText2.cjs +1 -0
- package/dist/_virtual/ShowMoreText2.js +4 -1
- package/dist/_virtual/Truncate.cjs +1 -0
- package/dist/_virtual/Truncate.js +4 -1
- package/dist/_virtual/_commonjsHelpers.cjs +1 -0
- package/dist/_virtual/_commonjsHelpers.js +8 -1
- package/dist/_virtual/advancedFormat.cjs +1 -0
- package/dist/_virtual/advancedFormat.js +7 -1
- package/dist/_virtual/advancedFormat2.cjs +1 -0
- 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.cjs +1 -0
- 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.cjs +1 -0
- 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/index10.cjs +1 -0
- package/dist/_virtual/index10.js +4 -1
- package/dist/_virtual/index2.cjs +1 -0
- package/dist/_virtual/index2.js +4 -1
- package/dist/_virtual/index3.cjs +1 -0
- package/dist/_virtual/index3.js +4 -1
- package/dist/_virtual/index4.cjs +1 -0
- package/dist/_virtual/index4.js +4 -1
- package/dist/_virtual/index5.cjs +1 -0
- package/dist/_virtual/index5.js +7 -1
- package/dist/_virtual/index6.cjs +1 -0
- package/dist/_virtual/index6.js +2 -1
- package/dist/_virtual/index7.cjs +1 -0
- package/dist/_virtual/index7.js +7 -1
- package/dist/_virtual/index8.cjs +1 -0
- package/dist/_virtual/index8.js +7 -1
- package/dist/_virtual/index9.cjs +1 -0
- package/dist/_virtual/index9.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/main.cjs +1 -0
- package/dist/_virtual/main.js +7 -1
- package/dist/_virtual/main2.cjs +1 -0
- package/dist/_virtual/main2.js +4 -1
- package/dist/_virtual/papaparse.min.cjs +1 -0
- package/dist/_virtual/papaparse.min.js +7 -1
- package/dist/_virtual/papaparse.min2.cjs +1 -0
- package/dist/_virtual/papaparse.min2.js +4 -1
- package/dist/_virtual/react-is.development.cjs +1 -0
- package/dist/_virtual/react-is.development.js +4 -1
- package/dist/_virtual/react-is.production.min.cjs +1 -0
- package/dist/_virtual/react-is.production.min.js +4 -1
- package/dist/_virtual/react-jsx-runtime.development.cjs +1 -0
- 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 +285 -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 +37 -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 +61 -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 +142 -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 +227 -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/{components/crud/import/CrudImportComponent.js → src/components/crud/import/CrudImportComponent.cjs} +1 -1
- package/dist/src/components/crud/import/CrudImportComponent.js +222 -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 +58 -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.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/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/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/util/DateUtil.js +0 -1
- package/dist/util/ImageUtil.js +0 -1
- package/dist/util/ValidationUtil.js +0 -1
- /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/{locale/translations/en.js → src/locale/translations/en.cjs} +0 -0
- /package/dist/{util/NumberUtil.js → src/util/NumberUtil.cjs} +0 -0
|
@@ -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 { TRANSLATION_NAMESPACE as L } from "../../../locale/hooks/translation-constants.js";
|
|
5
|
+
import O from "../tooltip/TooltipComponent.js";
|
|
6
|
+
import { onEnterInternalTextField as _ } from "./TextField.js";
|
|
7
|
+
import { useTranslation as b } from "../../../../node_modules/react-i18next/dist/es/useTranslation.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 } = b(L), 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(O, { 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) => _(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";const t=require("../../../../_virtual/jsx-runtime.cjs"),i=require("../../../util/ValidationUtil.cjs"),l=require("./TextField.cjs"),r=e=>t.jsxRuntimeExports.jsx(l.default,{...e,rules:[...e.rules??[],...i.phoneValidation(e.label??e.placeholder??"")]});module.exports=r;
|
|
@@ -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"),I=require("../../../locale/hooks/translation-constants.cjs"),j=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),l=(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:c,className:o,...u})=>{const{t:d}=j.useTranslation(I.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:T=>l(T,c,x,s),placeholder:r??e})})};exports.default=A;exports.onEnterInternalTextField=l;
|
|
@@ -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 { TRANSLATION_NAMESPACE as l } from "../../../locale/hooks/translation-constants.js";
|
|
4
|
+
import { useTranslation as A } from "../../../../node_modules/react-i18next/dist/es/useTranslation.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 } = A(l), 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"),l=require("antd"),N=require("react"),O=require("../../../locale/hooks/translation-constants.cjs"),_=require("../tooltip/TooltipComponent.cjs"),w=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),L=require("../../../../node_modules/@ant-design/icons/es/icons/LoadingOutlined.cjs"),c=(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:d,size:x,form:p,addonAfter:m,addonBefore:j,nextFocus:E,autoComplete:T="off",defaultValue:g,readOnly:q,value:I,loading:R,onBlur:f,inputRef:v,status:A,autoFocus:C,onChange:D,tooltip:P,...F})=>{const{t:a}=w.useTranslation(O.TRANSLATION_NAMESPACE),M=N.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:I,readOnly:q,defaultValue:g,autoFocus:C,addonBefore:j,ref:v,onBlur:f,addonAfter:R?o.jsxRuntimeExports.jsx(L,{}):m,status:A,size:x,autoComplete:T,onPressEnter:r=>c(r,E,p,d),type:t,placeholder:u??e},h=t=="password"?l.Input.Password:l.Input;return o.jsxRuntimeExports.jsx(_,{title:P,children:o.jsxRuntimeExports.jsx(l.Form.Item,{...F,label:e,rules:M,children:o.jsxRuntimeExports.jsx(h,{...S})})})};exports.default=$;exports.onEnterInternalTextField=c;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { j as i } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { Input as p, Form as M } from "antd";
|
|
3
|
+
import { useMemo as S } from "react";
|
|
4
|
+
import { TRANSLATION_NAMESPACE as $ } from "../../../locale/hooks/translation-constants.js";
|
|
5
|
+
import D from "../tooltip/TooltipComponent.js";
|
|
6
|
+
import { useTranslation as L } from "../../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
7
|
+
import O from "../../../../node_modules/@ant-design/icons/es/icons/LoadingOutlined.js";
|
|
8
|
+
const _ = (o, n, t, s) => {
|
|
9
|
+
var r;
|
|
10
|
+
n && t && (o.preventDefault(), (r = t == null ? void 0 : t.getFieldInstance(n)) == null || r.focus()), s && s(o);
|
|
11
|
+
}, Q = ({
|
|
12
|
+
type: o,
|
|
13
|
+
required: n,
|
|
14
|
+
label: t,
|
|
15
|
+
disabled: s,
|
|
16
|
+
rules: r = [],
|
|
17
|
+
placeholder: m,
|
|
18
|
+
onEnter: f,
|
|
19
|
+
size: d,
|
|
20
|
+
form: c,
|
|
21
|
+
addonAfter: l,
|
|
22
|
+
addonBefore: u,
|
|
23
|
+
nextFocus: x,
|
|
24
|
+
autoComplete: j = "off",
|
|
25
|
+
defaultValue: I,
|
|
26
|
+
readOnly: T,
|
|
27
|
+
value: A,
|
|
28
|
+
loading: E,
|
|
29
|
+
onBlur: g,
|
|
30
|
+
inputRef: v,
|
|
31
|
+
status: C,
|
|
32
|
+
autoFocus: P,
|
|
33
|
+
onChange: k,
|
|
34
|
+
tooltip: h,
|
|
35
|
+
...F
|
|
36
|
+
}) => {
|
|
37
|
+
const { t: a } = L($), N = S(() => {
|
|
38
|
+
const e = [
|
|
39
|
+
...r,
|
|
40
|
+
{
|
|
41
|
+
required: n,
|
|
42
|
+
message: `${t ?? m ?? ""} ${a(
|
|
43
|
+
"err.validation.required"
|
|
44
|
+
)}`
|
|
45
|
+
}
|
|
46
|
+
];
|
|
47
|
+
return o === "email" && e.push({
|
|
48
|
+
type: "email",
|
|
49
|
+
message: a("err.validation.invalidEmail")
|
|
50
|
+
}), e;
|
|
51
|
+
}, [r, n, t, m, a, o]), R = {
|
|
52
|
+
disabled: s,
|
|
53
|
+
value: A,
|
|
54
|
+
readOnly: T,
|
|
55
|
+
defaultValue: I,
|
|
56
|
+
autoFocus: P,
|
|
57
|
+
addonBefore: u,
|
|
58
|
+
ref: v,
|
|
59
|
+
onBlur: g,
|
|
60
|
+
addonAfter: E ? /* @__PURE__ */ i.jsx(O, {}) : l,
|
|
61
|
+
status: C,
|
|
62
|
+
size: d,
|
|
63
|
+
autoComplete: j,
|
|
64
|
+
onPressEnter: (e) => _(e, x, c, f),
|
|
65
|
+
type: o,
|
|
66
|
+
placeholder: m ?? t
|
|
67
|
+
}, w = o == "password" ? p.Password : p;
|
|
68
|
+
return /* @__PURE__ */ i.jsx(D, { title: h, children: /* @__PURE__ */ i.jsx(M.Item, { ...F, label: t, rules: N, children: /* @__PURE__ */ i.jsx(w, { ...R }) }) });
|
|
69
|
+
};
|
|
70
|
+
export {
|
|
71
|
+
Q as default,
|
|
72
|
+
_ as onEnterInternalTextField
|
|
73
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("../../../../_virtual/jsx-runtime.cjs"),s=require("antd"),e=({children:t,title:o})=>o?r.jsxRuntimeExports.jsx(s.Tooltip,{title:o,children:t}):t;module.exports=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("../../../../_virtual/jsx-runtime.cjs"),v=require("antd"),o=require("../../../../node_modules/i18next/dist/esm/i18next.cjs"),j=require("../button/Button.cjs"),E=require("../../../locale/hooks/translation-constants.cjs"),q=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),y=require("../../../../node_modules/@ant-design/icons/es/icons/LoadingOutlined.cjs"),T=require("../../../../node_modules/@ant-design/icons/es/icons/ArrowLeftOutlined.cjs"),A=({errorChildren:a,children:m,onRetry:x,onClickBack:r,success:e,loading:n,error:s,successTitle:p=o.t("str.success"),successMessage:c,errorMessage:u=o.t("err.save"),errorTitle:d=o.t("str.error"),loadingTitle:l=o.t("message.loading.saving"),loadingMessage:R})=>{const{t:i}=q.useTranslation(E.TRANSLATION_NAMESPACE);return t.jsxRuntimeExports.jsx(v.Result,{status:n?void 0:e?"success":s?["403","404","500"].includes(s==null?void 0:s.code)?s.code:s?"error":void 0:void 0,title:n?l:e?p:s?d:void 0,icon:n?t.jsxRuntimeExports.jsx(y,{}):void 0,subTitle:n?R:e?c:s?typeof u=="function"?u()??i("err.save"):u??i("err.save"):void 0,extra:[e?t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:m}):s?t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[!!r&&t.jsxRuntimeExports.jsx(j,{onClick:r,htmlType:"button",type:"primary",icon:t.jsxRuntimeExports.jsx(T,{}),children:i("str.previous")}),!!x&&t.jsxRuntimeExports.jsx(j,{type:"primary",onClick:()=>x(void 0,void 0,!0),children:i("str.retry")},"retry"),a]}):t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{})]})};module.exports=A;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { j as t } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { Result as j } from "antd";
|
|
3
|
+
import { t as e } from "../../../../node_modules/i18next/dist/esm/i18next.js";
|
|
4
|
+
import a from "../button/Button.js";
|
|
5
|
+
import { TRANSLATION_NAMESPACE as y } from "../../../locale/hooks/translation-constants.js";
|
|
6
|
+
import { useTranslation as R } from "../../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
7
|
+
import T from "../../../../node_modules/@ant-design/icons/es/icons/LoadingOutlined.js";
|
|
8
|
+
import h from "../../../../node_modules/@ant-design/icons/es/icons/ArrowLeftOutlined.js";
|
|
9
|
+
const S = ({
|
|
10
|
+
errorChildren: d,
|
|
11
|
+
children: f,
|
|
12
|
+
onRetry: p,
|
|
13
|
+
onClickBack: r,
|
|
14
|
+
success: i,
|
|
15
|
+
loading: s,
|
|
16
|
+
error: o,
|
|
17
|
+
successTitle: u = e("str.success"),
|
|
18
|
+
successMessage: v,
|
|
19
|
+
errorMessage: n = e("err.save"),
|
|
20
|
+
errorTitle: l = e("str.error"),
|
|
21
|
+
loadingTitle: x = e("message.loading.saving"),
|
|
22
|
+
loadingMessage: c
|
|
23
|
+
}) => {
|
|
24
|
+
const { t: m } = R(y);
|
|
25
|
+
return /* @__PURE__ */ t.jsx(
|
|
26
|
+
j,
|
|
27
|
+
{
|
|
28
|
+
status: s ? void 0 : i ? "success" : o ? ["403", "404", "500"].includes(o == null ? void 0 : o.code) ? o.code : o ? "error" : void 0 : void 0,
|
|
29
|
+
title: s ? x : i ? u : o ? l : void 0,
|
|
30
|
+
icon: s ? /* @__PURE__ */ t.jsx(T, {}) : void 0,
|
|
31
|
+
subTitle: s ? c : i ? v : o ? typeof n == "function" ? n() ?? m("err.save") : n ?? m("err.save") : void 0,
|
|
32
|
+
extra: [
|
|
33
|
+
i ? /* @__PURE__ */ t.jsx(t.Fragment, { children: f }) : o ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
34
|
+
!!r && /* @__PURE__ */ t.jsx(
|
|
35
|
+
a,
|
|
36
|
+
{
|
|
37
|
+
onClick: r,
|
|
38
|
+
htmlType: "button",
|
|
39
|
+
type: "primary",
|
|
40
|
+
icon: /* @__PURE__ */ t.jsx(h, {}),
|
|
41
|
+
children: m("str.previous")
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
!!p && /* @__PURE__ */ t.jsx(
|
|
45
|
+
a,
|
|
46
|
+
{
|
|
47
|
+
type: "primary",
|
|
48
|
+
onClick: () => p(void 0, void 0, !0),
|
|
49
|
+
children: m("str.retry")
|
|
50
|
+
},
|
|
51
|
+
"retry"
|
|
52
|
+
),
|
|
53
|
+
d
|
|
54
|
+
] }) : /* @__PURE__ */ t.jsx(t.Fragment, {})
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
export {
|
|
60
|
+
S as default
|
|
61
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("../../../../_virtual/jsx-runtime.cjs"),E=require("antd"),o=require("react"),q=require("../appearance/Hider.cjs"),{Step:C}=E.Steps,F=o.forwardRef(({pages:p,onSubmit:l,initPosition:x=0,progressDot:S,type:w,labelPlacement:v,className:b,pageStyle:g},k)=>{const[e,c]=o.useState(0),[r,d]=o.useState([]);o.useEffect(()=>{c(x)},[x]),o.useImperativeHandle(k,()=>({gotTo:t=>c(t)}),[]);const f=o.useCallback((t,u=!1,a=!1)=>{const s=[...r];if(t!==void 0&&(s[e]=t,d(s)),a||c(e+1),u&&l){const n={};for(const h of s)for(const R in h)n[R]=h[R];l(s,n)}},[e,r,l]),m=o.useCallback(()=>{const t=[...r];t[e]=void 0,d(t),c(e-1)},[e,r]),j=o.useMemo(()=>{const t=[],u=[],a=p.filter(s=>!s.hidden);for(let s=0;s<a.length;s++){const n=a[s];u.push(i.jsxRuntimeExports.jsx(q,{hide:e!==s,children:n.component({forward:f,backward:m},r,e===s)},`${n.title}${s}`)),t.push(i.jsxRuntimeExports.jsx(C,{icon:n.icon,title:n.title},n.title))}return{_pages:u,steps:t}},[m,e,r,f,p]);return i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(E.Steps,{labelPlacement:v,progressDot:S,className:[b,"pb-3"].join(" "),current:e,type:w,children:j.steps}),i.jsxRuntimeExports.jsx("div",{style:g,children:j._pages})]})});module.exports=F;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { j as n } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { Steps as S } from "antd";
|
|
3
|
+
import { forwardRef as E, useState as w, useEffect as H, useImperativeHandle as R, useCallback as v, useMemo as _ } from "react";
|
|
4
|
+
import $ from "../appearance/Hider.js";
|
|
5
|
+
const { Step: z } = S, V = E(
|
|
6
|
+
({
|
|
7
|
+
pages: a,
|
|
8
|
+
onSubmit: l,
|
|
9
|
+
initPosition: m = 0,
|
|
10
|
+
progressDot: g,
|
|
11
|
+
type: b,
|
|
12
|
+
labelPlacement: k,
|
|
13
|
+
className: F,
|
|
14
|
+
pageStyle: y
|
|
15
|
+
}, C) => {
|
|
16
|
+
const [e, i] = w(0), [r, p] = w(
|
|
17
|
+
[]
|
|
18
|
+
);
|
|
19
|
+
H(() => {
|
|
20
|
+
i(m);
|
|
21
|
+
}, [m]), R(
|
|
22
|
+
C,
|
|
23
|
+
() => ({
|
|
24
|
+
gotTo: (t) => i(t)
|
|
25
|
+
}),
|
|
26
|
+
[]
|
|
27
|
+
);
|
|
28
|
+
const d = v(
|
|
29
|
+
(t, c = !1, f = !1) => {
|
|
30
|
+
const s = [...r];
|
|
31
|
+
if (t !== void 0 && (s[e] = t, p(s)), f || i(e + 1), c && l) {
|
|
32
|
+
const o = {};
|
|
33
|
+
for (const j of s)
|
|
34
|
+
for (const x in j)
|
|
35
|
+
o[x] = j[x];
|
|
36
|
+
l(s, o);
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
[e, r, l]
|
|
40
|
+
), u = v(() => {
|
|
41
|
+
const t = [...r];
|
|
42
|
+
t[e] = void 0, p(t), i(e - 1);
|
|
43
|
+
}, [e, r]), h = _(() => {
|
|
44
|
+
const t = [], c = [], f = a.filter((s) => !s.hidden);
|
|
45
|
+
for (let s = 0; s < f.length; s++) {
|
|
46
|
+
const o = f[s];
|
|
47
|
+
c.push(
|
|
48
|
+
/* @__PURE__ */ n.jsx($, { hide: e !== s, children: o.component({ forward: d, backward: u }, r, e === s) }, `${o.title}${s}`)
|
|
49
|
+
), t.push(/* @__PURE__ */ n.jsx(z, { icon: o.icon, title: o.title }, o.title));
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
_pages: c,
|
|
53
|
+
steps: t
|
|
54
|
+
};
|
|
55
|
+
}, [u, e, r, d, a]);
|
|
56
|
+
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
57
|
+
/* @__PURE__ */ n.jsx(
|
|
58
|
+
S,
|
|
59
|
+
{
|
|
60
|
+
labelPlacement: k,
|
|
61
|
+
progressDot: g,
|
|
62
|
+
className: [F, "pb-3"].join(" "),
|
|
63
|
+
current: e,
|
|
64
|
+
type: b,
|
|
65
|
+
children: h.steps
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ n.jsx("div", { style: y, children: h._pages })
|
|
69
|
+
] });
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
export {
|
|
73
|
+
V as default
|
|
74
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("../../../_virtual/jsx-runtime.cjs"),f=require("antd"),ae=require("../../../_virtual/dayjs.min.cjs"),o=require("react"),ie=require("../../locale/hooks/translation-constants.cjs"),le=require("./CrudForm.cjs"),re=require("./CrudFormWizard.cjs"),ce=require("./import/CrudImportButton.cjs"),ue=require("./view/CrudViewer.cjs"),de=require("../common/button/NewButton.cjs"),pe=require("../common/button/PrintButton.cjs"),me=require("../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),{useForm:xe}=f.Form;function fe({idField:j="id",onCreate:F,onDelete:_,onHide:I,onUpdate:p,fields:i,data:M,grid:w,isHiding:D,isCreating:S,isDeleting:U,isUpdating:b,paginateProps:W,onPrint:h,printing:L,viewable:H,loadingData:G,formBuilder:J,extraAction:K,minusHeight:Q,cloneable:X,fullWidthModal:Y=!0,wizard:l,extraView:Z,importable:q,onClickNew:N,...$}){const{t:g}=me.useTranslation(ie.TRANSLATION_NAMESPACE),[v,y]=o.useState(!1),[m,E]=o.useState(),[z,k]=o.useState(),[r]=xe(),P=o.useCallback(async n=>{const u=l?n:await r.validateFields(),c=i.filter(e=>e.type==="color"),a={};c.forEach(e=>{var d;const t=r.getFieldValue(e.name);a[e.name]=typeof t=="string"?t:(d=t==null?void 0:t.toHexString())==null?void 0:d.toUpperCase()}),Object.assign(u,a),m&&p?(await p({...u,[j]:m[j]}),E(void 0)):!m&&F&&await F(u),k(void 0),r.resetFields(),y(!1)},[i,r,j,F,p,m,l]),[ee,V]=o.useState(!1),[te,B]=o.useState(!1);o.useEffect(()=>{v?(V(!1),B(!1)):C(void 0)},[v]);const A=o.useCallback(async n=>{V(n),B(!0)},[]),T=o.useCallback(async()=>{B(!0)},[]),[se,O]=o.useState(!1),R=o.useCallback(async(n,u=!0,c=!1)=>{try{O(!0),y(!0),u&&C("update");const a={};for(const e of i){const t=n[e.name];if(c&&e.type==="image"){const d=t;try{const oe=await e.provider.clone(d);a[e.name]=oe;continue}catch{continue}}e.type==="date"?t&&(a[e.name]=ae(t)):e.type==="select"?e.multiple&&Array.isArray(t)?a[e.name]=t.map(d=>d[e.innerFieldId??"id"]):t&&typeof t=="object"?a[e.name]=t[e.innerFieldId??"id"]:(t&&typeof t=="string"||typeof t=="number")&&(a[e.name]=t):a[e.name]=t}r.setFieldsValue(a),k(a),u&&E(n)}finally{O(!1)}},[i,r]),[x,C]=o.useState(),ne=o.useCallback(async n=>{C("clone"),R(n,!1,!0)},[R]);return s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsxs(f.Space,{direction:"vertical",className:"w-100",children:[s.jsxRuntimeExports.jsxs("div",{className:"w-100 d-flex",children:[s.jsxRuntimeExports.jsx("div",{style:{flex:1},children:s.jsxRuntimeExports.jsx(de.NewButton,{onClick:()=>{N?N():(y(n=>!n),C("new"))},className:"flex-1"})}),s.jsxRuntimeExports.jsxs(f.Space,{children:[!!h&&s.jsxRuntimeExports.jsx(pe.PrintButton,{className:"float-right",loading:L,onClick:h}),!!q&&s.jsxRuntimeExports.jsx(ce,{fields:i,importProps:q})]})]}),s.jsxRuntimeExports.jsx(ue,{...$,minusHeight:Q,data:M,fields:i,extraAction:K,idField:j,isDeleting:U,loadingData:G,onClickUpdate:p?R:void 0,onHide:I,isHiding:D,onDelete:_,onUpdate:p,onClickClone:X?ne:void 0,paginateProps:W,viewable:H,extraView:Z})]}),s.jsxRuntimeExports.jsx(f.Modal,{width:Y?"100%":void 0,title:g(x??"new"),open:v,confirmLoading:S||b,okText:g("str."+(x==="update"?"update":"save")),cancelText:g("str.cancel"),cancelButtonProps:{disabled:te,hidden:!!l},okButtonProps:{disabled:ee,hidden:!!l},onCancel:async()=>{try{if(x==="clone"){const n=l?m:r.getFieldsValue(),u=i.filter(c=>c.type==="image");for(const c of u)n[c.name]&&c.provider.delete(n[c.name])}}finally{}l||r.resetFields(),k(void 0),E(void 0),y(!1)},onOk:()=>P(),destroyOnClose:!0,children:s.jsxRuntimeExports.jsxs(f.Spin,{spinning:se,children:[!l&&s.jsxRuntimeExports.jsx(le.CrudForm,{purpose:x,fields:i,form:r,formBuilder:J,grid:w,onDeleteFile:T,onUploadFile:A}),l&&s.jsxRuntimeExports.jsx(re,{submitting:S||b,className:"mt-2",onSave:P,updatingValue:z,fields:i,onDeleteFile:T,onUploadFile:A,purpose:x,wizard:l})]})})]})}module.exports=fe;
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { j as o } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { Space as _, Modal as ae, Spin as ie, Form as re } from "antd";
|
|
3
|
+
import ce from "../../../_virtual/dayjs.min.js";
|
|
4
|
+
import { useState as m, useCallback as y, useEffect as me } from "react";
|
|
5
|
+
import { TRANSLATION_NAMESPACE as fe } from "../../locale/hooks/translation-constants.js";
|
|
6
|
+
import { CrudForm as de } from "./CrudForm.js";
|
|
7
|
+
import ue from "./CrudFormWizard.js";
|
|
8
|
+
import pe from "./import/CrudImportButton.js";
|
|
9
|
+
import ye from "./view/CrudViewer.js";
|
|
10
|
+
import { NewButton as xe } from "../common/button/NewButton.js";
|
|
11
|
+
import { PrintButton as Fe } from "../common/button/PrintButton.js";
|
|
12
|
+
import { useTranslation as ge } from "../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
13
|
+
const { useForm: je } = re;
|
|
14
|
+
function Oe({
|
|
15
|
+
idField: x = "id",
|
|
16
|
+
onCreate: j,
|
|
17
|
+
onDelete: D,
|
|
18
|
+
onHide: U,
|
|
19
|
+
onUpdate: d,
|
|
20
|
+
fields: l,
|
|
21
|
+
data: W,
|
|
22
|
+
grid: w,
|
|
23
|
+
isHiding: L,
|
|
24
|
+
isCreating: S,
|
|
25
|
+
isDeleting: R,
|
|
26
|
+
isUpdating: N,
|
|
27
|
+
paginateProps: H,
|
|
28
|
+
onPrint: V,
|
|
29
|
+
printing: q,
|
|
30
|
+
viewable: G,
|
|
31
|
+
loadingData: J,
|
|
32
|
+
formBuilder: K,
|
|
33
|
+
extraAction: Q,
|
|
34
|
+
minusHeight: X,
|
|
35
|
+
cloneable: Y,
|
|
36
|
+
fullWidthModal: Z = !0,
|
|
37
|
+
wizard: a,
|
|
38
|
+
extraView: $,
|
|
39
|
+
importable: P,
|
|
40
|
+
onClickNew: A,
|
|
41
|
+
...z
|
|
42
|
+
}) {
|
|
43
|
+
const { t: v } = ge(fe), [C, F] = m(!1), [u, B] = m(), [ee, h] = m(), [i] = je(), E = y(
|
|
44
|
+
async (n) => {
|
|
45
|
+
const c = a ? n : await i.validateFields(), r = l.filter((e) => e.type === "color"), s = {};
|
|
46
|
+
r.forEach((e) => {
|
|
47
|
+
var f;
|
|
48
|
+
const t = i.getFieldValue(e.name);
|
|
49
|
+
s[e.name] = typeof t == "string" ? t : (f = t == null ? void 0 : t.toHexString()) == null ? void 0 : f.toUpperCase();
|
|
50
|
+
}), Object.assign(c, s), u && d ? (await d({
|
|
51
|
+
...c,
|
|
52
|
+
[x]: u[x]
|
|
53
|
+
}), B(void 0)) : !u && j && await j(c), h(void 0), i.resetFields(), F(!1);
|
|
54
|
+
},
|
|
55
|
+
[l, i, x, j, d, u, a]
|
|
56
|
+
), [te, O] = m(!1), [oe, k] = m(!1);
|
|
57
|
+
me(() => {
|
|
58
|
+
C ? (O(!1), k(!1)) : g(void 0);
|
|
59
|
+
}, [C]);
|
|
60
|
+
const T = y(async (n) => {
|
|
61
|
+
O(n), k(!0);
|
|
62
|
+
}, []), I = y(async () => {
|
|
63
|
+
k(!0);
|
|
64
|
+
}, []), [ne, M] = m(!1), b = y(
|
|
65
|
+
async (n, c = !0, r = !1) => {
|
|
66
|
+
try {
|
|
67
|
+
M(!0), F(!0), c && g("update");
|
|
68
|
+
const s = {};
|
|
69
|
+
for (const e of l) {
|
|
70
|
+
const t = n[e.name];
|
|
71
|
+
if (r && e.type === "image") {
|
|
72
|
+
const f = t;
|
|
73
|
+
try {
|
|
74
|
+
const le = await e.provider.clone(f);
|
|
75
|
+
s[e.name] = le;
|
|
76
|
+
continue;
|
|
77
|
+
} catch {
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
e.type === "date" ? t && (s[e.name] = ce(t)) : e.type === "select" ? e.multiple && Array.isArray(t) ? s[e.name] = t.map(
|
|
82
|
+
(f) => f[e.innerFieldId ?? "id"]
|
|
83
|
+
) : t && typeof t == "object" ? s[e.name] = t[e.innerFieldId ?? "id"] : (t && typeof t == "string" || typeof t == "number") && (s[e.name] = t) : s[e.name] = t;
|
|
84
|
+
}
|
|
85
|
+
i.setFieldsValue(s), h(s), c && B(n);
|
|
86
|
+
} finally {
|
|
87
|
+
M(!1);
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
[l, i]
|
|
91
|
+
), [p, g] = m(), se = y(
|
|
92
|
+
async (n) => {
|
|
93
|
+
g("clone"), b(n, !1, !0);
|
|
94
|
+
},
|
|
95
|
+
[b]
|
|
96
|
+
);
|
|
97
|
+
return /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
98
|
+
/* @__PURE__ */ o.jsxs(_, { direction: "vertical", className: "w-100", children: [
|
|
99
|
+
/* @__PURE__ */ o.jsxs("div", { className: "w-100 d-flex", children: [
|
|
100
|
+
/* @__PURE__ */ o.jsx("div", { style: { flex: 1 }, children: /* @__PURE__ */ o.jsx(
|
|
101
|
+
xe,
|
|
102
|
+
{
|
|
103
|
+
onClick: () => {
|
|
104
|
+
A ? A() : (F((n) => !n), g("new"));
|
|
105
|
+
},
|
|
106
|
+
className: "flex-1"
|
|
107
|
+
}
|
|
108
|
+
) }),
|
|
109
|
+
/* @__PURE__ */ o.jsxs(_, { children: [
|
|
110
|
+
!!V && /* @__PURE__ */ o.jsx(
|
|
111
|
+
Fe,
|
|
112
|
+
{
|
|
113
|
+
className: "float-right",
|
|
114
|
+
loading: q,
|
|
115
|
+
onClick: V
|
|
116
|
+
}
|
|
117
|
+
),
|
|
118
|
+
!!P && /* @__PURE__ */ o.jsx(pe, { fields: l, importProps: P })
|
|
119
|
+
] })
|
|
120
|
+
] }),
|
|
121
|
+
/* @__PURE__ */ o.jsx(
|
|
122
|
+
ye,
|
|
123
|
+
{
|
|
124
|
+
...z,
|
|
125
|
+
minusHeight: X,
|
|
126
|
+
data: W,
|
|
127
|
+
fields: l,
|
|
128
|
+
extraAction: Q,
|
|
129
|
+
idField: x,
|
|
130
|
+
isDeleting: R,
|
|
131
|
+
loadingData: J,
|
|
132
|
+
onClickUpdate: d ? b : void 0,
|
|
133
|
+
onHide: U,
|
|
134
|
+
isHiding: L,
|
|
135
|
+
onDelete: D,
|
|
136
|
+
onUpdate: d,
|
|
137
|
+
onClickClone: Y ? se : void 0,
|
|
138
|
+
paginateProps: H,
|
|
139
|
+
viewable: G,
|
|
140
|
+
extraView: $
|
|
141
|
+
}
|
|
142
|
+
)
|
|
143
|
+
] }),
|
|
144
|
+
/* @__PURE__ */ o.jsx(
|
|
145
|
+
ae,
|
|
146
|
+
{
|
|
147
|
+
width: Z ? "100%" : void 0,
|
|
148
|
+
title: v(p ?? "new"),
|
|
149
|
+
open: C,
|
|
150
|
+
confirmLoading: S || N,
|
|
151
|
+
okText: v("str." + (p === "update" ? "update" : "save")),
|
|
152
|
+
cancelText: v("str.cancel"),
|
|
153
|
+
cancelButtonProps: {
|
|
154
|
+
disabled: oe,
|
|
155
|
+
hidden: !!a
|
|
156
|
+
},
|
|
157
|
+
okButtonProps: {
|
|
158
|
+
disabled: te,
|
|
159
|
+
hidden: !!a
|
|
160
|
+
},
|
|
161
|
+
onCancel: async () => {
|
|
162
|
+
try {
|
|
163
|
+
if (p === "clone") {
|
|
164
|
+
const n = a ? u : i.getFieldsValue(), c = l.filter((r) => r.type === "image");
|
|
165
|
+
for (const r of c)
|
|
166
|
+
n[r.name] && r.provider.delete(
|
|
167
|
+
n[r.name]
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
} finally {
|
|
171
|
+
}
|
|
172
|
+
a || i.resetFields(), h(void 0), B(void 0), F(!1);
|
|
173
|
+
},
|
|
174
|
+
onOk: () => E(),
|
|
175
|
+
destroyOnClose: !0,
|
|
176
|
+
children: /* @__PURE__ */ o.jsxs(ie, { spinning: ne, children: [
|
|
177
|
+
!a && /* @__PURE__ */ o.jsx(
|
|
178
|
+
de,
|
|
179
|
+
{
|
|
180
|
+
purpose: p,
|
|
181
|
+
fields: l,
|
|
182
|
+
form: i,
|
|
183
|
+
formBuilder: K,
|
|
184
|
+
grid: w,
|
|
185
|
+
onDeleteFile: I,
|
|
186
|
+
onUploadFile: T
|
|
187
|
+
}
|
|
188
|
+
),
|
|
189
|
+
a && /* @__PURE__ */ o.jsx(
|
|
190
|
+
ue,
|
|
191
|
+
{
|
|
192
|
+
submitting: S || N,
|
|
193
|
+
className: "mt-2",
|
|
194
|
+
onSave: E,
|
|
195
|
+
updatingValue: ee,
|
|
196
|
+
fields: l,
|
|
197
|
+
onDeleteFile: I,
|
|
198
|
+
onUploadFile: T,
|
|
199
|
+
purpose: p,
|
|
200
|
+
wizard: a
|
|
201
|
+
}
|
|
202
|
+
)
|
|
203
|
+
] })
|
|
204
|
+
}
|
|
205
|
+
)
|
|
206
|
+
] });
|
|
207
|
+
}
|
|
208
|
+
export {
|
|
209
|
+
Oe as default
|
|
210
|
+
};
|
|
@@ -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"),y=require("react"),H=require("../../../_virtual/main.cjs"),W=require("../../locale/hooks/translation-constants.cjs"),G=require("./FileCrudField.cjs"),$=require("./ImageCrudField.cjs"),z=require("../common/DatePicker/DatePicker.cjs"),J=require("../common/DatePicker/TimePicker.cjs"),K=require("../common/check-box/CheckBox.cjs"),L=require("../common/select/SelectComponent.cjs"),Q=require("../common/text-field/NumberField.cjs"),X=require("../common/text-field/TextField.cjs"),Y=require("../common/text-field/TextArea.cjs"),Z=require("../common/tooltip/TooltipComponent.cjs"),V=require("../../../node_modules/react-i18next/dist/es/useTranslation.cjs");function ee(b){const{label:a,name:d,type:C,required:l,hidden:T,rules:x=[],updatable:m=!0,readonly:q=!1,fieldClassName:h,customFormFieldRender:N,fieldTooltip:f,...e}=b,p=E.Form.useFormInstance();y.useEffect(()=>{if(C==="select"){const{items:r=[],onSearch:i,searchOnType:n}=e;!(r!=null&&r.length)&&!n&&(i==null||i(void 0,p,e==null?void 0:e.updatingValue))}},[p,e,C,e==null?void 0:e.updatingValue]);const{t:F}=V.useTranslation(W.TRANSLATION_NAMESPACE);if(q||T)return t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{});if(N)return N(p,b);switch(C){case"text":case"email":case"password":{const{onChange:r,placeholder:i}=e;return t.jsxRuntimeExports.jsx(X.default,{placeholder:i,disabled:!m,rules:x,required:l,onChange:r?n=>r(n,p):void 0,type:C,name:d,tooltip:f,label:a,className:h,autoComplete:"new-password"})}case"number":{const{onChange:r,placeholder:i,allowMinus:n}=e;return t.jsxRuntimeExports.jsx(Q,{placeholder:i,disabled:!m,moneyField:!!e.formatted,type:C,onChange:r?j=>r(j,p):void 0,rules:x,autoComplete:"false",required:l,tooltip:f,className:h,min:n?null:void 0,name:d,label:a})}case"date":{const{range:r,disableToday:i,disabledFutureDays:n,disabledPastDays:j,onChange:g,placeholder:c,format:v}=e;return t.jsxRuntimeExports.jsx(z,{placeholder:c,required:l,disabled:!m,type:C,format:v,tooltip:f,range:r,name:d,label:a,onChange:g?o=>g(o,p):void 0,className:h,disableToday:i,disabledFutureDays:n,disabledPastDays:j})}case"time":{const{range:r=!1,disableCurrent:i,disabledFuture:n,disabledPast:j,onChange:g,use12Hours:c,format:v,placeholder:o}=e;return t.jsxRuntimeExports.jsx(J,{placeholder:o,required:l,format:v,disabled:!m,type:C,tooltip:f,range:r,use12Hours:c,name:d,label:a,onChange:g?R=>g(R,p):void 0,className:h,disableCurrent:i,disabledFuture:n,disabledPast:j})}case"textarea":{const{onChange:r,placeholder:i,rows:n,cols:j}=e;return t.jsxRuntimeExports.jsx(Y.default,{rules:x,placeholder:i,onChange:r?g=>{var c;return r((c=g==null?void 0:g.target)==null?void 0:c.value,p)}:void 0,tooltip:f,required:l,disabled:!m,name:d,label:a,className:h,rows:n,cols:j})}case"image":return t.jsxRuntimeExports.jsx($.default,{...e,required:l,name:d,label:a,rules:x,fieldClassName:h,onRemoved:e.onRemoved,onUploading:e.onUploading,provider:e.provider});case"file":return t.jsxRuntimeExports.jsx(G.default,{...e,required:l,name:d,label:a,rules:x,fieldClassName:h,onRemoved:e.onRemoved,onUploading:e.onUploading,provider:e.provider});case"select":return t.jsxRuntimeExports.jsx(B,{...e,required:l,name:d,label:a,rules:x,fieldClassName:h,form:p,updatable:m,readonly:q,fieldTooltip:f});case"enum":{const{enum:r,radio:i=!1,translation:n,onChange:j,onSearch:g,multiple:c}=e,v=Array.isArray(r)?r:Object.keys(r);return i?t.jsxRuntimeExports.jsx(E.Form.Item,{...e,name:d,required:l,tooltip:f,rules:x,label:a,className:["w-100",h].join(" "),children:t.jsxRuntimeExports.jsx(E.Radio.Group,{...e,onChange:j?o=>{var R;return j((R=o==null?void 0:o.target)==null?void 0:R.value,p)}:void 0,children:v.map(o=>t.jsxRuntimeExports.jsx(E.Radio,{disabled:!m,value:o,children:n?F(n[o]):o},o))})}):t.jsxRuntimeExports.jsx(L,{...e,onChange:j?o=>j(o,p):void 0,className:["w-100",h].join(" "),name:d,items:v,required:l,tooltip:f,rules:x,label:a,disabled:!m,onSearch:g?o=>g(o,p):void 0,allowClear:!0,mode:c?"multiple":void 0,itemBuilder:o=>t.jsxRuntimeExports.jsx(E.Select.Option,{value:o,children:n?F(n[o]):o},o)})}case"checkbox":{const{onChange:r}=e;return t.jsxRuntimeExports.jsx(K,{className:h,rules:x,onChange:r?i=>r(i,p):void 0,label:a,tooltip:f,disabled:!m,name:d})}case"color":return t.jsxRuntimeExports.jsx(M,{...e,type:"color",required:l,name:d,label:a,rules:x,fieldClassName:h,updatable:m,readonly:q,fieldTooltip:f});default:return t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:`${C} Not Implemented`})}}function B(b){const{items:a=[],loading:d,searchOnType:C,onSearch:l,multiple:T,onChange:x,highlightSearch:m,required:q,fieldClassName:h,rules:N,fieldTooltip:f,updatable:e,label:p,name:F,tagRender:r,updatingValue:i,onSet:n,placeholder:j,allowClear:g=!0}=b,c=b.form,[v,o]=y.useState(""),R=E.Form.useWatch(F,c),[S,w]=y.useState(!0);y.useEffect(()=>{n&&S&&R&&(n==null||n(R,a,c),w(!1))},[S,c,a,F,n,R]),y.useEffect(()=>{R&&w(!0)},[R]);const U=y.useCallback(async s=>{o(s),C&&(l==null||l(s,c,i))},[c,l,C,i]);return t.jsxRuntimeExports.jsx(L,{...b,maxTagCount:"responsive",maxTagPlaceholder:s=>t.jsxRuntimeExports.jsxs(Z,{title:t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:s.map(u=>t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[u.label," ",t.jsxRuntimeExports.jsx("br",{})]}))}),children:["+",s==null?void 0:s.length]}),placeholder:j,onSelect:s=>{n==null||n(s==null?void 0:s.key,a,c)},onChange:x?s=>{o(""),x(s,c)}:void 0,mode:T?"multiple":void 0,className:["w-100",h].join(" "),name:F,items:a,required:q,tooltip:f,tagRender:r,rules:N,disabled:!e,label:p,allowClear:g,onSearch:U,loading:d,filterOption:m?(s,u)=>{var k,O,P;try{const A=s.toLowerCase().split(/\s+/),_=((typeof(u==null?void 0:u.children)=="string"?u==null?void 0:u.children:(O=(k=u==null?void 0:u.children)==null?void 0:k.props)==null?void 0:O.textToHighlight)??"").toLowerCase(),D=(((P=u==null?void 0:u.value)==null?void 0:P.toString())??"").toLowerCase();return A.every(I=>_.indexOf(I)>=0||D.indexOf(I)>=0)}catch{return!0}}:void 0,itemBuilder:m?s=>{const u=s.value?String(s.value):void 0;return t.jsxRuntimeExports.jsx(E.Select.Option,{value:s.key,title:u,disabled:s.disabled,children:t.jsxRuntimeExports.jsx(H,{highlightClassName:"highlight-text",searchWords:(v??"").split(" "),autoEscape:!0,textToHighlight:u??""})},s.key)}:s=>t.jsxRuntimeExports.jsx(E.Select.Option,{value:s.key,title:s.value,disabled:s.disabled,children:s.value},s.key)})}function M(b){const{required:a,fieldClassName:d,rules:C,fieldTooltip:l,updatable:T,label:x,name:m}=b;return t.jsxRuntimeExports.jsx(E.Form.Item,{label:x,name:m,required:a,rules:C,tooltip:l,children:t.jsxRuntimeExports.jsx(E.ColorPicker,{disabledAlpha:!0,format:"hex",defaultFormat:"hex",showText:!0,trigger:"click",className:d,disabled:!T,...b.innerProps})})}exports.ColorCrudFieldComponent=M;exports.SelectCrudFieldComponent=B;exports.default=ee;
|