@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,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";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("../../../_virtual/jsx-runtime.cjs"),x=require("antd"),ae=require("../../../_virtual/dayjs.min.cjs"),o=require("react"),ie=require("react-i18next"),le=require("../../locale/hooks/translation-constants.cjs"),re=require("./CrudForm.cjs"),ce=require("./CrudFormWizard.cjs"),ue=require("./import/CrudImportButton.cjs"),de=require("./view/CrudViewer.cjs"),pe=require("../common/button/NewButton.cjs"),me=require("../common/button/PrintButton.cjs"),{useForm:fe}=x.Form;function xe({idField:j="id",onCreate:g,onDelete:O,onHide:T,onUpdate:p,fields:i,data:I,grid:w,isHiding:D,isCreating:R,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:F}=ie.useTranslation(le.TRANSLATION_NAMESPACE),[v,y]=o.useState(!1),[m,E]=o.useState(),[z,S]=o.useState(),[r]=fe(),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&&g&&await g(u),S(void 0),r.resetFields(),y(!1)},[i,r,j,g,p,m,l]),[ee,V]=o.useState(!1),[te,k]=o.useState(!1);o.useEffect(()=>{v?(V(!1),k(!1)):C(void 0)},[v]);const _=o.useCallback(async n=>{V(n),k(!0)},[]),A=o.useCallback(async()=>{k(!0)},[]),[se,M]=o.useState(!1),B=o.useCallback(async(n,u=!0,c=!1)=>{try{M(!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.default(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),S(a),u&&E(n)}finally{M(!1)}},[i,r]),[f,C]=o.useState(),ne=o.useCallback(async n=>{C("clone"),B(n,!1,!0)},[B]);return s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsxs(x.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(pe.NewButton,{onClick:()=>{N?N():(y(n=>!n),C("new"))},className:"flex-1"})}),s.jsxRuntimeExports.jsxs(x.Space,{children:[!!h&&s.jsxRuntimeExports.jsx(me.PrintButton,{className:"float-right",loading:L,onClick:h}),!!q&&s.jsxRuntimeExports.jsx(ue.default,{fields:i,importProps:q})]})]}),s.jsxRuntimeExports.jsx(de.default,{...$,minusHeight:Q,data:I,fields:i,extraAction:K,idField:j,isDeleting:U,loadingData:G,onClickUpdate:p?B:void 0,onHide:T,isHiding:D,onDelete:O,onUpdate:p,onClickClone:X?ne:void 0,paginateProps:W,viewable:H,extraView:Z})]}),s.jsxRuntimeExports.jsx(x.Modal,{width:Y?"100%":void 0,title:F(f??"new"),open:v,confirmLoading:R||b,okText:F("str."+(f==="update"?"update":"save")),cancelText:F("str.cancel"),cancelButtonProps:{disabled:te,hidden:!!l},okButtonProps:{disabled:ee,hidden:!!l},onCancel:async()=>{try{if(f==="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(),S(void 0),E(void 0),y(!1)},onOk:()=>P(),destroyOnClose:!0,children:s.jsxRuntimeExports.jsxs(x.Spin,{spinning:se,children:[!l&&s.jsxRuntimeExports.jsx(re.CrudForm,{purpose:f,fields:i,form:r,formBuilder:J,grid:w,onDeleteFile:A,onUploadFile:_}),l&&s.jsxRuntimeExports.jsx(ce.default,{submitting:R||b,className:"mt-2",onSave:P,updatingValue:z,fields:i,onDeleteFile:A,onUploadFile:_,purpose:f,wizard:l})]})})]})}exports.default=xe;
|
|
@@ -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 { useTranslation as fe } from "react-i18next";
|
|
6
|
+
import { TRANSLATION_NAMESPACE as de } from "../../locale/hooks/translation-constants.js";
|
|
7
|
+
import { CrudForm as ue } from "./CrudForm.js";
|
|
8
|
+
import pe from "./CrudFormWizard.js";
|
|
9
|
+
import ye from "./import/CrudImportButton.js";
|
|
10
|
+
import xe from "./view/CrudViewer.js";
|
|
11
|
+
import { NewButton as Fe } from "../common/button/NewButton.js";
|
|
12
|
+
import { PrintButton as ge } from "../common/button/PrintButton.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 } = fe(de), [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
|
+
Fe,
|
|
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
|
+
ge,
|
|
112
|
+
{
|
|
113
|
+
className: "float-right",
|
|
114
|
+
loading: q,
|
|
115
|
+
onClick: V
|
|
116
|
+
}
|
|
117
|
+
),
|
|
118
|
+
!!P && /* @__PURE__ */ o.jsx(ye, { fields: l, importProps: P })
|
|
119
|
+
] })
|
|
120
|
+
] }),
|
|
121
|
+
/* @__PURE__ */ o.jsx(
|
|
122
|
+
xe,
|
|
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
|
+
ue,
|
|
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
|
+
pe,
|
|
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"),D=require("react-highlight-words"),W=require("react-i18next"),G=require("../../locale/hooks/translation-constants.cjs"),$=require("./FileCrudField.cjs"),z=require("./ImageCrudField.cjs"),J=require("../common/DatePicker/DatePicker.cjs"),K=require("../common/DatePicker/TimePicker.cjs"),Q=require("../common/check-box/CheckBox.cjs"),L=require("../common/select/SelectComponent.cjs"),X=require("../common/text-field/NumberField.cjs"),Y=require("../common/text-field/TextField.cjs"),Z=require("../common/text-field/TextArea.cjs"),V=require("../common/tooltip/TooltipComponent.cjs");function ee(b){const{label:i,name:d,type:f,required:l,hidden:T,rules:x=[],updatable:m=!0,readonly:q=!1,fieldClassName:h,customFormFieldRender:N,fieldTooltip:C,...e}=b,p=E.Form.useFormInstance();y.useEffect(()=>{if(f==="select"){const{items:r=[],onSearch:a,searchOnType:n}=e;!(r!=null&&r.length)&&!n&&(a==null||a(void 0,p,e==null?void 0:e.updatingValue))}},[p,e,f,e==null?void 0:e.updatingValue]);const{t:F}=W.useTranslation(G.TRANSLATION_NAMESPACE);if(q||T)return t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{});if(N)return N(p,b);switch(f){case"text":case"email":case"password":{const{onChange:r,placeholder:a}=e;return t.jsxRuntimeExports.jsx(Y.default,{placeholder:a,disabled:!m,rules:x,required:l,onChange:r?n=>r(n,p):void 0,type:f,name:d,tooltip:C,label:i,className:h,autoComplete:"new-password"})}case"number":{const{onChange:r,placeholder:a,allowMinus:n}=e;return t.jsxRuntimeExports.jsx(X.default,{placeholder:a,disabled:!m,moneyField:!!e.formatted,type:f,onChange:r?j=>r(j,p):void 0,rules:x,autoComplete:"false",required:l,tooltip:C,className:h,min:n?null:void 0,name:d,label:i})}case"date":{const{range:r,disableToday:a,disabledFutureDays:n,disabledPastDays:j,onChange:g,placeholder:c,format:v}=e;return t.jsxRuntimeExports.jsx(J.default,{placeholder:c,required:l,disabled:!m,type:f,format:v,tooltip:C,range:r,name:d,label:i,onChange:g?o=>g(o,p):void 0,className:h,disableToday:a,disabledFutureDays:n,disabledPastDays:j})}case"time":{const{range:r=!1,disableCurrent:a,disabledFuture:n,disabledPast:j,onChange:g,use12Hours:c,format:v,placeholder:o}=e;return t.jsxRuntimeExports.jsx(K.default,{placeholder:o,required:l,format:v,disabled:!m,type:f,tooltip:C,range:r,use12Hours:c,name:d,label:i,onChange:g?R=>g(R,p):void 0,className:h,disableCurrent:a,disabledFuture:n,disabledPast:j})}case"textarea":{const{onChange:r,placeholder:a,rows:n,cols:j}=e;return t.jsxRuntimeExports.jsx(Z.default,{rules:x,placeholder:a,onChange:r?g=>{var c;return r((c=g==null?void 0:g.target)==null?void 0:c.value,p)}:void 0,tooltip:C,required:l,disabled:!m,name:d,label:i,className:h,rows:n,cols:j})}case"image":return t.jsxRuntimeExports.jsx(z.default,{...e,required:l,name:d,label:i,rules:x,fieldClassName:h,onRemoved:e.onRemoved,onUploading:e.onUploading,provider:e.provider});case"file":return t.jsxRuntimeExports.jsx($.default,{...e,required:l,name:d,label:i,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:i,rules:x,fieldClassName:h,form:p,updatable:m,readonly:q,fieldTooltip:C});case"enum":{const{enum:r,radio:a=!1,translation:n,onChange:j,onSearch:g,multiple:c}=e,v=Array.isArray(r)?r:Object.keys(r);return a?t.jsxRuntimeExports.jsx(E.Form.Item,{...e,name:d,required:l,tooltip:C,rules:x,label:i,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.default,{...e,onChange:j?o=>j(o,p):void 0,className:["w-100",h].join(" "),name:d,items:v,required:l,tooltip:C,rules:x,label:i,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(Q.default,{className:h,rules:x,onChange:r?a=>r(a,p):void 0,label:i,tooltip:C,disabled:!m,name:d})}case"color":return t.jsxRuntimeExports.jsx(H,{...e,type:"color",required:l,name:d,label:i,rules:x,fieldClassName:h,updatable:m,readonly:q,fieldTooltip:C});default:return t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:`${f} Not Implemented`})}}function B(b){const{items:i=[],loading:d,searchOnType:f,onSearch:l,multiple:T,onChange:x,highlightSearch:m,required:q,fieldClassName:h,rules:N,fieldTooltip:C,updatable:e,label:p,name:F,tagRender:r,updatingValue:a,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,i,c),w(!1))},[S,c,i,F,n,R]),y.useEffect(()=>{R&&w(!0)},[R]);const M=y.useCallback(async s=>{o(s),f&&(l==null||l(s,c,a))},[c,l,f,a]);return t.jsxRuntimeExports.jsx(L.default,{...b,maxTagCount:"responsive",maxTagPlaceholder:s=>t.jsxRuntimeExports.jsxs(V.default,{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,i,c)},onChange:x?s=>{o(""),x(s,c)}:void 0,mode:T?"multiple":void 0,className:["w-100",h].join(" "),name:F,items:i,required:q,tooltip:C,tagRender:r,rules:N,disabled:!e,label:p,allowClear:g,onSearch:M,loading:d,filterOption:m?(s,u)=>{var k,O,P;try{const A=s.toLowerCase().split(/\s+/),U=((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(),_=(((P=u==null?void 0:u.value)==null?void 0:P.toString())??"").toLowerCase();return A.every(I=>U.indexOf(I)>=0||_.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(D,{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 H(b){const{required:i,fieldClassName:d,rules:f,fieldTooltip:l,updatable:T,label:x,name:m}=b;return t.jsxRuntimeExports.jsx(E.Form.Item,{label:x,name:m,required:i,rules:f,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=H;exports.SelectCrudFieldComponent=B;exports.default=ee;
|