@kingteza/crud-component 1.0.66 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +21 -11
- package/release.config.cjs +27 -0
- package/App.d.ts +0 -151
- package/Play.d.ts +0 -2
- package/common/appearance/Hider.cjs.js +0 -1
- package/common/appearance/Hider.d.ts +0 -6
- package/common/appearance/Hider.es.js +0 -5
- package/common/appearance/index.d.ts +0 -1
- package/common/button/Button.cjs.js +0 -1
- package/common/button/Button.d.ts +0 -11
- package/common/button/Button.es.js +0 -57
- package/common/button/CloneButtonTable.cjs.js +0 -1
- package/common/button/CloneButtonTable.d.ts +0 -6
- package/common/button/CloneButtonTable.es.js +0 -19
- package/common/button/DeleteButtonTable.cjs.js +0 -1
- package/common/button/DeleteButtonTable.d.ts +0 -13
- package/common/button/DeleteButtonTable.es.js +0 -64
- package/common/button/ExportButton.cjs.js +0 -1
- package/common/button/ExportButton.d.ts +0 -4
- package/common/button/ExportButton.es.js +0 -26
- package/common/button/HideButtonTable.cjs.js +0 -1
- package/common/button/HideButtonTable.d.ts +0 -13
- package/common/button/HideButtonTable.es.js +0 -67
- package/common/button/ImportButton.cjs.js +0 -1
- package/common/button/ImportButton.d.ts +0 -9
- package/common/button/ImportButton.es.js +0 -55
- package/common/button/NewButton.cjs.js +0 -1
- package/common/button/NewButton.d.ts +0 -12
- package/common/button/NewButton.es.js +0 -23
- package/common/button/PrintButton.cjs.js +0 -1
- package/common/button/PrintButton.d.ts +0 -12
- package/common/button/PrintButton.es.js +0 -25
- package/common/button/RefreshButton.cjs.js +0 -1
- package/common/button/RefreshButton.d.ts +0 -11
- package/common/button/RefreshButton.es.js +0 -23
- package/common/button/UnHideButton.cjs.js +0 -1
- package/common/button/UnHideButton.d.ts +0 -14
- package/common/button/UnHideButton.es.js +0 -69
- package/common/button/UpdateButtonTable.cjs.js +0 -1
- package/common/button/UpdateButtonTable.d.ts +0 -6
- package/common/button/UpdateButtonTable.es.js +0 -19
- package/common/button/ViewButtonTable.cjs.js +0 -1
- package/common/button/ViewButtonTable.d.ts +0 -6
- package/common/button/ViewButtonTable.es.js +0 -19
- package/common/button/index.d.ts +0 -14
- package/common/check-box/CheckBox.cjs.js +0 -1
- package/common/check-box/CheckBox.d.ts +0 -9
- package/common/check-box/CheckBox.es.js +0 -40
- package/common/check-box/index.d.ts +0 -2
- package/common/date-picker/DatePicker.cjs.js +0 -1
- package/common/date-picker/DatePicker.d.ts +0 -37
- package/common/date-picker/DatePicker.es.js +0 -87
- package/common/date-picker/TimePicker.cjs.js +0 -1
- package/common/date-picker/TimePicker.d.ts +0 -34
- package/common/date-picker/TimePicker.es.js +0 -77
- package/common/date-picker/index.d.ts +0 -3
- package/common/description/DescList.cjs.js +0 -1
- package/common/description/DescList.d.ts +0 -18
- package/common/description/DescList.es.js +0 -16
- package/common/description/DescriptionComponent.d.ts +0 -7
- package/common/description/index.d.ts +0 -3
- package/common/icon/KIcon.cjs.js +0 -1
- package/common/icon/KIcon.d.ts +0 -9
- package/common/icon/KIcon.es.js +0 -11
- package/common/index.cjs.js +0 -1
- package/common/index.d.ts +0 -20
- package/common/index.es.js +0 -78
- package/common/layout/VerticalSpace.cjs.js +0 -1
- package/common/layout/VerticalSpace.d.ts +0 -5
- package/common/layout/VerticalSpace.es.js +0 -6
- package/common/layout/index.d.ts +0 -2
- package/common/loading/LoadingIndicator.cjs.js +0 -1
- package/common/loading/LoadingIndicator.d.ts +0 -6
- package/common/loading/LoadingIndicator.es.js +0 -23
- package/common/loading/index.d.ts +0 -2
- package/common/picker/ImagePicker.cjs.js +0 -1
- package/common/picker/ImagePicker.d.ts +0 -56
- package/common/picker/ImagePicker.es.js +0 -320
- package/common/picker/index.d.ts +0 -2
- package/common/radio/RadioGroupComponent.cjs.js +0 -1
- package/common/radio/RadioGroupComponent.d.ts +0 -18
- package/common/radio/RadioGroupComponent.es.js +0 -19
- package/common/radio/index.d.ts +0 -2
- package/common/report/SelectFieldInReport.cjs.js +0 -1
- package/common/report/SelectFieldInReport.d.ts +0 -16
- package/common/report/SelectFieldInReport.es.js +0 -30
- package/common/report/index.d.ts +0 -3
- package/common/rich/index.cjs.js +0 -1
- package/common/rich/index.d.ts +0 -10
- package/common/rich/index.es.js +0 -66
- package/common/select/CustomSelectOption.cjs.js +0 -1
- package/common/select/CustomSelectOption.d.ts +0 -7
- package/common/select/CustomSelectOption.es.js +0 -13
- package/common/select/SelectComponent.cjs.js +0 -1
- package/common/select/SelectComponent.d.ts +0 -21
- package/common/select/SelectComponent.es.js +0 -85
- package/common/select/index.d.ts +0 -3
- package/common/show-more/index.cjs.js +0 -1
- package/common/show-more/index.d.ts +0 -4
- package/common/show-more/index.es.js +0 -8
- package/common/tab/TabViewWithRoute.cjs.js +0 -1
- package/common/tab/TabViewWithRoute.d.ts +0 -13
- package/common/tab/TabViewWithRoute.es.js +0 -38
- package/common/tab/index.d.ts +0 -2
- package/common/table/index.d.ts +0 -3
- package/common/table/table.cjs.js +0 -1
- package/common/table/table.d.ts +0 -19
- package/common/table/table.es.js +0 -40
- package/common/tag/StatusTag.cjs.js +0 -1
- package/common/tag/StatusTag.d.ts +0 -14
- package/common/tag/StatusTag.es.js +0 -29
- package/common/tag/index.d.ts +0 -2
- package/common/text/index.cjs.js +0 -1
- package/common/text/index.d.ts +0 -3
- package/common/text/index.es.js +0 -5
- package/common/text/title/TitleWithHeadTitle.d.ts +0 -7
- package/common/text/title/index.cjs.js +0 -1
- package/common/text/title/index.d.ts +0 -1
- package/common/text/title/index.es.js +0 -5
- package/common/text-field/NumberField.cjs.js +0 -1
- package/common/text-field/NumberField.d.ts +0 -13
- package/common/text-field/NumberField.es.js +0 -82
- package/common/text-field/PhoneNumberField.cjs.js +0 -1
- package/common/text-field/PhoneNumberField.d.ts +0 -4
- package/common/text-field/PhoneNumberField.es.js +0 -18
- package/common/text-field/TextArea.cjs.js +0 -1
- package/common/text-field/TextArea.d.ts +0 -17
- package/common/text-field/TextArea.es.js +0 -46
- package/common/text-field/TextField.cjs.js +0 -1
- package/common/text-field/TextField.d.ts +0 -27
- package/common/text-field/TextField.es.js +0 -72
- package/common/text-field/index.d.ts +0 -5
- package/common/tooltip/TooltipComponent.cjs.js +0 -1
- package/common/tooltip/TooltipComponent.d.ts +0 -5
- package/common/tooltip/TooltipComponent.es.js +0 -9
- package/common/tooltip/index.d.ts +0 -2
- package/common/wizard/WizardResult.cjs.js +0 -1
- package/common/wizard/WizardResult.d.ts +0 -16
- package/common/wizard/WizardResult.es.js +0 -58
- package/common/wizard/WizardViewForm.cjs.js +0 -1
- package/common/wizard/WizardViewForm.d.ts +0 -24
- package/common/wizard/WizardViewForm.es.js +0 -74
- package/common/wizard/index.d.ts +0 -3
- package/crud/CrudComponent.cjs.js +0 -1
- package/crud/CrudComponent.d.ts +0 -244
- package/crud/CrudComponent.es.js +0 -123
- package/crud/CrudField.cjs.js +0 -1
- package/crud/CrudField.d.ts +0 -4
- package/crud/CrudField.es.js +0 -449
- package/crud/CrudForm.cjs.js +0 -1
- package/crud/CrudForm.d.ts +0 -14
- package/crud/CrudForm.es.js +0 -103
- package/crud/CrudFormWizard.cjs.js +0 -1
- package/crud/CrudFormWizard.d.ts +0 -14
- package/crud/CrudFormWizard.es.js +0 -140
- package/crud/CrudReportComponent.cjs.js +0 -4
- package/crud/CrudReportComponent.d.ts +0 -44
- package/crud/CrudReportComponent.es.js +0 -255
- package/crud/CrudSearchComponent.cjs.js +0 -1
- package/crud/CrudSearchComponent.d.ts +0 -21
- package/crud/CrudSearchComponent.es.js +0 -96
- package/crud/CrudTextAreaComponent.cjs.js +0 -1
- package/crud/CrudTextAreaComponent.d.ts +0 -22
- package/crud/CrudTextAreaComponent.es.js +0 -52
- package/crud/FileCrudField.cjs.js +0 -1
- package/crud/FileCrudField.d.ts +0 -25
- package/crud/FileCrudField.es.js +0 -219
- package/crud/ImageCrudField.cjs.js +0 -1
- package/crud/ImageCrudField.d.ts +0 -38
- package/crud/ImageCrudField.es.js +0 -113
- package/crud/actions/index.cjs.js +0 -1
- package/crud/actions/index.d.ts +0 -26
- package/crud/actions/index.es.js +0 -88
- package/crud/import/CrudImportButton.cjs.js +0 -1
- package/crud/import/CrudImportButton.d.ts +0 -3
- package/crud/import/CrudImportButton.es.js +0 -30
- package/crud/import/CrudImportComponent.cjs.js +0 -2
- package/crud/import/CrudImportComponent.d.ts +0 -14
- package/crud/import/CrudImportComponent.es.js +0 -222
- package/crud/index.d.ts +0 -23
- package/crud/modal/index.cjs.js +0 -1
- package/crud/modal/index.d.ts +0 -24
- package/crud/modal/index.es.js +0 -146
- package/crud/view/CrudDecListView.cjs.js +0 -1
- package/crud/view/CrudDecListView.d.ts +0 -15
- package/crud/view/CrudDecListView.es.js +0 -57
- package/crud/view/CrudViewer.cjs.js +0 -1
- package/crud/view/CrudViewer.d.ts +0 -43
- package/crud/view/CrudViewer.es.js +0 -304
- package/crud/view/CrudViewerUtil.cjs.js +0 -1
- package/crud/view/CrudViewerUtil.d.ts +0 -2
- package/crud/view/CrudViewerUtil.es.js +0 -98
- package/crud/view/index.d.ts +0 -5
- package/hooks/NavigatorHooks.cjs.js +0 -1
- package/hooks/NavigatorHooks.d.ts +0 -1
- package/hooks/NavigatorHooks.es.js +0 -9
- package/icons/FlipHIcon.cjs.js +0 -1
- package/icons/FlipHIcon.d.ts +0 -3
- package/icons/FlipHIcon.es.js +0 -28
- package/icons/FlipVIcon.cjs.js +0 -1
- package/icons/FlipVIcon.d.ts +0 -3
- package/icons/FlipVIcon.es.js +0 -28
- package/index.cjs.js +0 -1
- package/index.d.ts +0 -4
- package/index.es.js +0 -46
- package/locale/hooks/translation-constants.cjs.js +0 -1
- package/locale/hooks/translation-constants.d.ts +0 -1
- package/locale/hooks/translation-constants.es.js +0 -4
- package/locale/index.cjs.js +0 -1
- package/locale/index.d.ts +0 -85
- package/locale/index.es.js +0 -57
- package/locale/translations/en.cjs.js +0 -1
- package/locale/translations/en.d.ts +0 -63
- package/locale/translations/en.es.js +0 -65
- package/main.d.ts +0 -0
- package/types/DialogComponentProp.d.ts +0 -8
- package/types/Id.d.ts +0 -10
- package/util/CrudUtil.cjs.js +0 -1
- package/util/CrudUtil.d.ts +0 -5
- package/util/CrudUtil.es.js +0 -8
- package/util/DateUtil.cjs.js +0 -1
- package/util/DateUtil.d.ts +0 -7
- package/util/DateUtil.es.js +0 -18
- package/util/ImageUtil.cjs.js +0 -1
- package/util/ImageUtil.d.ts +0 -14
- package/util/ImageUtil.es.js +0 -63
- package/util/NumberUtil.cjs.js +0 -1
- package/util/NumberUtil.d.ts +0 -17
- package/util/NumberUtil.es.js +0 -60
- package/util/ValidationUtil.cjs.js +0 -1
- package/util/ValidationUtil.d.ts +0 -14
- package/util/ValidationUtil.es.js +0 -63
- package/util/index.cjs.js +0 -1
- package/util/index.d.ts +0 -4
- package/util/index.es.js +0 -10
- package/vite-env.d.ts +0 -1
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { Form as f, Select as m } from "antd";
|
|
3
|
-
import { useState as F, useEffect as S } from "react";
|
|
4
|
-
import b from "../select/SelectComponent.es.js";
|
|
5
|
-
const k = ({ className: n, onSelect: p, label: u, required: a, name: l, mode: o, items: e }) => {
|
|
6
|
-
const r = f.useFormInstance(), [c, d] = F(!0);
|
|
7
|
-
return S(() => {
|
|
8
|
-
if (e && c) {
|
|
9
|
-
const t = e.filter((i) => i.alreadySelected).map((i) => i.id);
|
|
10
|
-
r == null || r.setFieldsValue({
|
|
11
|
-
[l]: o === "multiple" ? t : t == null ? void 0 : t[0]
|
|
12
|
-
}), d(!1);
|
|
13
|
-
}
|
|
14
|
-
}, [c, r, e, o, l]), /* @__PURE__ */ s(
|
|
15
|
-
b,
|
|
16
|
-
{
|
|
17
|
-
required: a,
|
|
18
|
-
label: u,
|
|
19
|
-
mode: o,
|
|
20
|
-
className: n,
|
|
21
|
-
name: l,
|
|
22
|
-
onSelect: p,
|
|
23
|
-
items: e,
|
|
24
|
-
itemBuilder: (t) => /* @__PURE__ */ s(m.Option, { value: t.id, disabled: t.lock, children: t.label }, t.id)
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
};
|
|
28
|
-
export {
|
|
29
|
-
k as SelectFieldInReport
|
|
30
|
-
};
|
package/common/report/index.d.ts
DELETED
package/common/rich/index.cjs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var g=Object.create;var p=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,F=Object.prototype.hasOwnProperty;var w=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of V(t))!F.call(e,o)&&o!==r&&p(e,o,{get:()=>t[o],enumerable:!(s=q(t,o))||s.enumerable});return e};var R=(e,t,r)=>(r=e!=null?g(j(e)):{},w(t||!e||!e.__esModule?p(r,"default",{value:e,enumerable:!0}):r,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime");;/* empty css */;/* empty css */const h=require("antd"),c=require("react"),y=require("../../util/ValidationUtil.cjs.js"),E=c.lazy(async()=>{const{default:e}=await import("react-quill");return{default:t=>a.jsx(e,{...t})}}),S=({name:e,label:t,required:r,rules:s=[],disabled:o})=>{const n=h.Form.useFormInstance(),[u,d]=c.useState(""),f={toolbar:[["bold","italic","underline","strike","blockquote"],[{list:"ordered"},{list:"bullet"}],["link"],["clean"]]},b=["bold","italic","underline","strike","blockquote","list","bullet","link"];c.useEffect(()=>{const i=n.getFieldValue(e);i&&i!=="<p></p>"&&i!=="<p><br></p>"&&d(i)},[n,e]);const l=h.Form.useWatch(e,n);c.useEffect(()=>{l!==u&&d(!l||l==="<p></p>"||l==="<p><br></p>"?"":l)},[l,u]);const k=i=>{d(i);const x=!i||i==="<p></p>"||i.trim()==="<p><br></p>"?void 0:i;n.setFieldValue(e,x),n.validateFields([e]).catch(()=>{})},m=c.useMemo(()=>r?[...s,...y.required(t??"")]:s,[r,s,t]);return a.jsx(h.Form.Item,{name:e,label:t,rules:m,children:a.jsx(c.Suspense,{fallback:a.jsx("div",{children:"Loading editor..."}),children:a.jsx(E,{readOnly:o,value:u,onChange:k,theme:"snow",className:"bg-white dark:!bg-[#141414] dark:text-white dark:!fill-white",modules:f,formats:b})})})};exports.RichTextEditor=S;
|
package/common/rich/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Rule } from 'antd/es/form';
|
|
2
|
-
import { FC } from 'react';
|
|
3
|
-
export interface RichTextEditorProps {
|
|
4
|
-
label?: string;
|
|
5
|
-
name: string;
|
|
6
|
-
required?: boolean;
|
|
7
|
-
rules?: Rule[];
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare const RichTextEditor: FC<RichTextEditorProps>;
|
package/common/rich/index.es.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
/* empty css */
|
|
3
|
-
/* empty css */
|
|
4
|
-
import { Form as a } from "antd";
|
|
5
|
-
import V, { useState as g, useEffect as u, useMemo as w, Suspense as F } from "react";
|
|
6
|
-
import x from "../../util/ValidationUtil.es.js";
|
|
7
|
-
const R = V.lazy(async () => {
|
|
8
|
-
const { default: e } = await import("react-quill");
|
|
9
|
-
return { default: (o) => /* @__PURE__ */ l(e, { ...o }) };
|
|
10
|
-
}), S = ({
|
|
11
|
-
name: e,
|
|
12
|
-
label: o,
|
|
13
|
-
required: d,
|
|
14
|
-
rules: c = [],
|
|
15
|
-
disabled: p
|
|
16
|
-
}) => {
|
|
17
|
-
const r = a.useFormInstance(), [n, s] = g(""), m = {
|
|
18
|
-
toolbar: [
|
|
19
|
-
["bold", "italic", "underline", "strike", "blockquote"],
|
|
20
|
-
[{ list: "ordered" }, { list: "bullet" }],
|
|
21
|
-
["link"],
|
|
22
|
-
["clean"]
|
|
23
|
-
]
|
|
24
|
-
}, f = [
|
|
25
|
-
"bold",
|
|
26
|
-
"italic",
|
|
27
|
-
"underline",
|
|
28
|
-
"strike",
|
|
29
|
-
"blockquote",
|
|
30
|
-
"list",
|
|
31
|
-
"bullet",
|
|
32
|
-
"link"
|
|
33
|
-
];
|
|
34
|
-
u(() => {
|
|
35
|
-
const t = r.getFieldValue(e);
|
|
36
|
-
t && t !== "<p></p>" && t !== "<p><br></p>" && s(t);
|
|
37
|
-
}, [r, e]);
|
|
38
|
-
const i = a.useWatch(e, r);
|
|
39
|
-
u(() => {
|
|
40
|
-
i !== n && s(!i || i === "<p></p>" || i === "<p><br></p>" ? "" : i);
|
|
41
|
-
}, [i, n]);
|
|
42
|
-
const h = (t) => {
|
|
43
|
-
s(t);
|
|
44
|
-
const k = !t || t === "<p></p>" || t.trim() === "<p><br></p>" ? void 0 : t;
|
|
45
|
-
r.setFieldValue(e, k), r.validateFields([e]).catch(() => {
|
|
46
|
-
});
|
|
47
|
-
}, b = w(
|
|
48
|
-
() => d ? [...c, ...x.required(o ?? "")] : c,
|
|
49
|
-
[d, c, o]
|
|
50
|
-
);
|
|
51
|
-
return /* @__PURE__ */ l(a.Item, { name: e, label: o, rules: b, children: /* @__PURE__ */ l(F, { fallback: /* @__PURE__ */ l("div", { children: "Loading editor..." }), children: /* @__PURE__ */ l(
|
|
52
|
-
R,
|
|
53
|
-
{
|
|
54
|
-
readOnly: p,
|
|
55
|
-
value: n,
|
|
56
|
-
onChange: h,
|
|
57
|
-
theme: "snow",
|
|
58
|
-
className: "bg-white dark:!bg-[#141414] dark:text-white dark:!fill-white",
|
|
59
|
-
modules: m,
|
|
60
|
-
formats: f
|
|
61
|
-
}
|
|
62
|
-
) }) });
|
|
63
|
-
};
|
|
64
|
-
export {
|
|
65
|
-
S as RichTextEditor
|
|
66
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),s=require("antd"),n=s.List.Item.Meta,r=s.List.Item,o=({title:e,description:i,children:c})=>t.jsxs(r,{className:"",children:[t.jsx("div",{children:t.jsx(n,{title:e,description:i})}),t.jsx("div",{className:"float-right",children:c})]});module.exports=o;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { List as e } from "antd";
|
|
3
|
-
const a = e.Item.Meta, i = e.Item, n = ({
|
|
4
|
-
title: s,
|
|
5
|
-
description: o,
|
|
6
|
-
children: m
|
|
7
|
-
}) => /* @__PURE__ */ r(i, { className: "", children: [
|
|
8
|
-
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(a, { title: s, description: o }) }),
|
|
9
|
-
/* @__PURE__ */ t("div", { className: "float-right", children: m })
|
|
10
|
-
] });
|
|
11
|
-
export {
|
|
12
|
-
n as default
|
|
13
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const n=require("react/jsx-runtime"),l=require("antd"),O=require("react"),V=require("../../locale/index.cjs.js"),B=require("../tooltip/TooltipComponent.cjs.js"),D=require("../../util/ValidationUtil.cjs.js");function E({label:a,rules:S=[],required:h,placeholder:x,notSearch:L,children:f,readOnly:s,items:o,dropdownRender:p,itemBuilder:q,loading:m,showLoadingInEmptyIndicator:T,nameFieldInArray:u="name",innerRef:_,tooltip:b,filterOption:N,tagRender:R,...r}){const{t:P}=V.useTranslationLib(),k=O.useCallback(e=>{const t=typeof e=="string"||typeof e=="number"?e:e==null?void 0:e.id,c=typeof e=="string"||typeof e=="number"?e:e==null?void 0:e[u];return n.jsx("option",{value:t,children:n.jsx("div",{dangerouslySetInnerHTML:{__html:c}})},t)},[u]),F=a??x??"";return n.jsx(l.ConfigProvider,{renderEmpty:T&&m?()=>n.jsx(l.Spin,{}):void 0,children:n.jsx(B,{title:b,children:n.jsx(l.Form.Item,{label:a,name:r.name,help:r.help,className:r.className,required:h,rules:[...S,...h?D.required(F):[]],children:n.jsx(l.Select,{ref:_,loading:m,open:s?!1:void 0,onChange:!s&&r.onChange,allowClear:!s&&r.allowClear,showSearch:!L,className:`max-width ${s?"readOnly":""}`,...r,tagRender:R,placeholder:x??a,filterOption:N??((e,t)=>{var c,g,C,j;try{const i=(C=(g=(c=t==null?void 0:t.children)==null?void 0:c.props)==null?void 0:g.dangerouslySetInnerHTML)==null?void 0:C.__html,H=e.toLowerCase().split(/\s+/),y=(t==null?void 0:t.children)??"",w=typeof y=="string"?y.toLowerCase():typeof i=="string"?i.toLowerCase():"",I=(((j=t==null?void 0:t.value)==null?void 0:j.toString())??"").toLowerCase(),M=w.replace(/\s/g,"");return H.every(d=>w.indexOf(d)>=0||I.indexOf(d)>=0||M.indexOf(d)>=0)}catch(i){return console.log(i),!0}}),popupRender:p,children:f===null?void 0:f??(o?o==null?void 0:o.map(q??k):n.jsx(n.Fragment,{}))})})})})}module.exports=E;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { FormItemProps, SelectProps } from 'antd';
|
|
2
|
-
import { RefSelectProps } from 'antd/lib/select';
|
|
3
|
-
import { ReactElement } from 'react';
|
|
4
|
-
export type SelectTagRenderProps = SelectProps["tagRender"];
|
|
5
|
-
interface SelectComponentProps<T> extends SelectProps<any>, FormItemProps<any> {
|
|
6
|
-
children?: any[] | null;
|
|
7
|
-
required?: boolean;
|
|
8
|
-
notSearch?: boolean;
|
|
9
|
-
readOnly?: boolean;
|
|
10
|
-
status?: any;
|
|
11
|
-
nameFieldInArray?: string;
|
|
12
|
-
items?: T[];
|
|
13
|
-
showLoadingInEmptyIndicator?: boolean;
|
|
14
|
-
itemBuilder?: (t: T) => ReactElement;
|
|
15
|
-
dropdownRender?: (menu: ReactElement) => ReactElement;
|
|
16
|
-
innerRef?: React.Ref<RefSelectProps>;
|
|
17
|
-
filterOption?: SelectProps["filterOption"];
|
|
18
|
-
tagRender?: SelectTagRenderProps;
|
|
19
|
-
}
|
|
20
|
-
declare function SelectComponent<T = any>({ label, rules, required, placeholder, notSearch, children, readOnly, items, dropdownRender, itemBuilder, loading, showLoadingInEmptyIndicator, nameFieldInArray, innerRef, tooltip, filterOption, tagRender, ...props }: Readonly<SelectComponentProps<T>>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export default SelectComponent;
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { jsx as t, Fragment as j } from "react/jsx-runtime";
|
|
2
|
-
import { ConfigProvider as B, Form as D, Select as E, Spin as P } from "antd";
|
|
3
|
-
import { useCallback as R } from "react";
|
|
4
|
-
import { useTranslationLib as U } from "../../locale/index.es.js";
|
|
5
|
-
import W from "../tooltip/TooltipComponent.es.js";
|
|
6
|
-
import $ from "../../util/ValidationUtil.es.js";
|
|
7
|
-
function Y({
|
|
8
|
-
label: m,
|
|
9
|
-
rules: S = [],
|
|
10
|
-
required: f,
|
|
11
|
-
placeholder: a,
|
|
12
|
-
notSearch: L,
|
|
13
|
-
children: d,
|
|
14
|
-
readOnly: o,
|
|
15
|
-
items: s,
|
|
16
|
-
dropdownRender: u,
|
|
17
|
-
itemBuilder: T,
|
|
18
|
-
loading: h,
|
|
19
|
-
showLoadingInEmptyIndicator: _,
|
|
20
|
-
nameFieldInArray: g = "name",
|
|
21
|
-
innerRef: b,
|
|
22
|
-
tooltip: N,
|
|
23
|
-
filterOption: k,
|
|
24
|
-
tagRender: F,
|
|
25
|
-
...n
|
|
26
|
-
}) {
|
|
27
|
-
const { t: q } = U(), H = R(
|
|
28
|
-
(e) => {
|
|
29
|
-
const r = typeof e == "string" || typeof e == "number" ? e : e == null ? void 0 : e.id, c = typeof e == "string" || typeof e == "number" ? e : e == null ? void 0 : e[g];
|
|
30
|
-
return /* @__PURE__ */ t("option", { value: r, children: /* @__PURE__ */ t("div", { dangerouslySetInnerHTML: { __html: c } }) }, r);
|
|
31
|
-
},
|
|
32
|
-
[g]
|
|
33
|
-
), I = m ?? a ?? "";
|
|
34
|
-
return /* @__PURE__ */ t(
|
|
35
|
-
B,
|
|
36
|
-
{
|
|
37
|
-
renderEmpty: _ && h ? () => /* @__PURE__ */ t(P, {}) : void 0,
|
|
38
|
-
children: /* @__PURE__ */ t(W, { title: N, children: /* @__PURE__ */ t(
|
|
39
|
-
D.Item,
|
|
40
|
-
{
|
|
41
|
-
label: m,
|
|
42
|
-
name: n.name,
|
|
43
|
-
help: n.help,
|
|
44
|
-
className: n.className,
|
|
45
|
-
required: f,
|
|
46
|
-
rules: [
|
|
47
|
-
...S,
|
|
48
|
-
...f ? $.required(I) : []
|
|
49
|
-
],
|
|
50
|
-
children: /* @__PURE__ */ t(
|
|
51
|
-
E,
|
|
52
|
-
{
|
|
53
|
-
ref: b,
|
|
54
|
-
loading: h,
|
|
55
|
-
open: o ? !1 : void 0,
|
|
56
|
-
onChange: !o && n.onChange,
|
|
57
|
-
allowClear: !o && n.allowClear,
|
|
58
|
-
showSearch: !L,
|
|
59
|
-
className: `max-width ${o ? "readOnly" : ""}`,
|
|
60
|
-
...n,
|
|
61
|
-
tagRender: F,
|
|
62
|
-
placeholder: a ?? m,
|
|
63
|
-
filterOption: k ?? ((e, r) => {
|
|
64
|
-
var c, p, C, y;
|
|
65
|
-
try {
|
|
66
|
-
const i = (C = (p = (c = r == null ? void 0 : r.children) == null ? void 0 : c.props) == null ? void 0 : p.dangerouslySetInnerHTML) == null ? void 0 : C.__html, M = e.toLowerCase().split(/\s+/), w = (r == null ? void 0 : r.children) ?? "", x = typeof w == "string" ? w.toLowerCase() : typeof i == "string" ? i.toLowerCase() : "", O = (((y = r == null ? void 0 : r.value) == null ? void 0 : y.toString()) ?? "").toLowerCase(), V = x.replace(/\s/g, "");
|
|
67
|
-
return M.every(
|
|
68
|
-
(l) => x.indexOf(l) >= 0 || O.indexOf(l) >= 0 || V.indexOf(l) >= 0
|
|
69
|
-
);
|
|
70
|
-
} catch (i) {
|
|
71
|
-
return console.log(i), !0;
|
|
72
|
-
}
|
|
73
|
-
}),
|
|
74
|
-
popupRender: u,
|
|
75
|
-
children: d === null ? void 0 : d ?? (s ? s == null ? void 0 : s.map(T ?? H) : /* @__PURE__ */ t(j, {}))
|
|
76
|
-
}
|
|
77
|
-
)
|
|
78
|
-
}
|
|
79
|
-
) })
|
|
80
|
-
}
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
export {
|
|
84
|
-
Y as default
|
|
85
|
-
};
|
package/common/select/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),o=require("react-show-more-text");;/* empty css */const e=r=>t.jsx(o,{...r});exports.ShowMore=e;exports.default=e;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),n=require("antd"),i=require("react"),u=require("react-router-dom"),T=require("../../hooks/NavigatorHooks.cjs.js"),y=require("../../context/WindowDimension.cjs.js"),{Content:S}=n.Layout,v=({positionOfRoute:a,initialKey:o="*",tabs:l,className:d="",mode:h="default"})=>{const[b,m]=i.useState(o),e=T.useNavigateOptional(),p=t=>{e==null||e(t)},r=u.useLocation();i.useEffect(()=>{const t=r.pathname.split("/")[a];m(t??""),t||e==null||e(o,{replace:!0})},[o,r.pathname,e,a]);const{isDesktop:x}=y(),c=h==="side"&&x,f=c?"left":"top",j=c?"d-flex h-100":"";return s.jsxs("div",{className:`${d} ${j}`,children:[s.jsx(n.Tabs,{type:"card",tabPosition:f,activeKey:b,onChange:p,children:l.map(({key:t,label:q})=>s.jsx(n.Tabs.TabPane,{tab:q},t))}),s.jsx(S,{className:`max-height ${c?"overflow-auto":""}`,children:s.jsx(u.Outlet,{})})]})};exports.TabViewWithRoute=v;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
interface TabViewWithRouteProps {
|
|
3
|
-
initialKey?: string;
|
|
4
|
-
positionOfRoute: number;
|
|
5
|
-
className?: string;
|
|
6
|
-
tabs: {
|
|
7
|
-
label: React.ReactNode;
|
|
8
|
-
key: string;
|
|
9
|
-
}[];
|
|
10
|
-
mode?: 'side' | 'default';
|
|
11
|
-
}
|
|
12
|
-
export declare const TabViewWithRoute: React.FC<TabViewWithRouteProps>;
|
|
13
|
-
export {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { jsxs as x, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { Tabs as a, Layout as y } from "antd";
|
|
3
|
-
import { useState as S, useEffect as w } from "react";
|
|
4
|
-
import { useLocation as N, Outlet as P } from "react-router-dom";
|
|
5
|
-
import { useNavigateOptional as T } from "../../hooks/NavigatorHooks.es.js";
|
|
6
|
-
import $ from "../../context/WindowDimension.es.js";
|
|
7
|
-
const { Content: j } = y, E = ({
|
|
8
|
-
positionOfRoute: r,
|
|
9
|
-
initialKey: s = "*",
|
|
10
|
-
tabs: i,
|
|
11
|
-
className: m = "",
|
|
12
|
-
mode: l = "default"
|
|
13
|
-
}) => {
|
|
14
|
-
const [p, u] = S(s), t = T(), f = (o) => {
|
|
15
|
-
t == null || t(o);
|
|
16
|
-
}, n = N();
|
|
17
|
-
w(() => {
|
|
18
|
-
const o = n.pathname.split("/")[r];
|
|
19
|
-
u(o ?? ""), o || t == null || t(s, { replace: !0 });
|
|
20
|
-
}, [s, n.pathname, t, r]);
|
|
21
|
-
const { isDesktop: d } = $(), c = l === "side" && d, h = c ? "left" : "top";
|
|
22
|
-
return /* @__PURE__ */ x("div", { className: `${m} ${c ? "d-flex h-100" : ""}`, children: [
|
|
23
|
-
/* @__PURE__ */ e(
|
|
24
|
-
a,
|
|
25
|
-
{
|
|
26
|
-
type: "card",
|
|
27
|
-
tabPosition: h,
|
|
28
|
-
activeKey: p,
|
|
29
|
-
onChange: f,
|
|
30
|
-
children: i.map(({ key: o, label: b }) => /* @__PURE__ */ e(a.TabPane, { tab: b }, o))
|
|
31
|
-
}
|
|
32
|
-
),
|
|
33
|
-
/* @__PURE__ */ e(j, { className: `max-height ${c ? "overflow-auto" : ""}`, children: /* @__PURE__ */ e(P, {}) })
|
|
34
|
-
] });
|
|
35
|
-
};
|
|
36
|
-
export {
|
|
37
|
-
E as TabViewWithRoute
|
|
38
|
-
};
|
package/common/tab/index.d.ts
DELETED
package/common/table/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const a=require("react/jsx-runtime"),c=require("antd"),l=require("react");function d({minusHeight:h,onRow:g,count:m=1,onPageSizeChanged:f,pagination:e=!1,rowKey:s="id",columns:t,className:o,scroll:n,...i}){const r=l.useMemo(()=>t.filter(u=>!u.hidden),[t]);return a.jsx(c.Table,{className:`custom-scroll ${o}`,style:{width:"100%"},columns:r,rowKey:s,...i,scroll:n||{x:!0},pagination:e&&{...e,hideOnSinglePage:!0,showSizeChanger:!1}})}module.exports=d;
|
package/common/table/table.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ColumnsType, TableProps } from 'antd/lib/table';
|
|
2
|
-
import { default as React } from 'react';
|
|
3
|
-
export type TableComponentColumnProp<T> = {
|
|
4
|
-
dataIndex?: keyof T;
|
|
5
|
-
render?: (value: any, record: T, index: number) => React.ReactNode;
|
|
6
|
-
hidden?: boolean;
|
|
7
|
-
title?: any;
|
|
8
|
-
align?: 'right' | 'left' | 'center';
|
|
9
|
-
width?: number | string;
|
|
10
|
-
}[] & ColumnsType<T>;
|
|
11
|
-
export interface TableComponentProps<T> extends TableProps<T> {
|
|
12
|
-
minusHeight?: number;
|
|
13
|
-
count?: number;
|
|
14
|
-
dataSource?: T[];
|
|
15
|
-
columns: TableComponentColumnProp<T>;
|
|
16
|
-
onPageSizeChanged?: (page: number, pageSize: number) => void;
|
|
17
|
-
}
|
|
18
|
-
declare function TableComponent<T>({ minusHeight, onRow, count, onPageSizeChanged, pagination, rowKey, columns, className, scroll, ...props }: TableComponentProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export default TableComponent;
|
package/common/table/table.es.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { Table as m } from "antd";
|
|
3
|
-
import { useMemo as u } from "react";
|
|
4
|
-
function x({
|
|
5
|
-
minusHeight: f,
|
|
6
|
-
onRow: c,
|
|
7
|
-
count: d = 1,
|
|
8
|
-
onPageSizeChanged: h,
|
|
9
|
-
pagination: e = !1,
|
|
10
|
-
rowKey: n = "id",
|
|
11
|
-
columns: o,
|
|
12
|
-
className: i,
|
|
13
|
-
scroll: t,
|
|
14
|
-
...r
|
|
15
|
-
}) {
|
|
16
|
-
const s = u(() => o.filter((a) => !a.hidden), [o]);
|
|
17
|
-
return /* @__PURE__ */ l(
|
|
18
|
-
m,
|
|
19
|
-
{
|
|
20
|
-
className: `custom-scroll ${i}`,
|
|
21
|
-
style: { width: "100%" },
|
|
22
|
-
columns: s,
|
|
23
|
-
rowKey: n,
|
|
24
|
-
...r,
|
|
25
|
-
scroll: t || {
|
|
26
|
-
// y: `calc(100vh - ${minusHeight ?? 0}px)`,
|
|
27
|
-
x: !0
|
|
28
|
-
// scrollToFirstRowOnChange: true,
|
|
29
|
-
},
|
|
30
|
-
pagination: e && {
|
|
31
|
-
...e,
|
|
32
|
-
hideOnSinglePage: !0,
|
|
33
|
-
showSizeChanger: !1
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
export {
|
|
39
|
-
x as default
|
|
40
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const x=require("react/jsx-runtime"),d=require("antd"),u=require("../../locale/index.cjs.js"),q=({onClick:n,clickable:o,colorFunction:e,translation:i,value:s})=>{var r;const t=e==null?void 0:e(s),{t:c}=u.useTranslationLib(),p=d.Tag;return x.jsx(p,{onClick:n,color:t==null?void 0:t.color,icon:t==null?void 0:t.icon,style:{color:t==null?void 0:t.text,cursor:o?"pointer":void 0},children:(r=c(i[s]))==null?void 0:r.toUpperCase()})};module.exports=q;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { FC, ReactElement } from 'react';
|
|
2
|
-
type StatusTagProps = {
|
|
3
|
-
translation: any;
|
|
4
|
-
value: string;
|
|
5
|
-
clickable?: boolean;
|
|
6
|
-
onClick?: () => void;
|
|
7
|
-
colorFunction?: (val: any) => {
|
|
8
|
-
color?: string;
|
|
9
|
-
text?: string;
|
|
10
|
-
icon?: ReactElement;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
declare const StatusTag: FC<StatusTagProps>;
|
|
14
|
-
export default StatusTag;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { Tag as f } from "antd";
|
|
3
|
-
import { useTranslationLib as c } from "../../locale/index.es.js";
|
|
4
|
-
const a = ({
|
|
5
|
-
onClick: e,
|
|
6
|
-
clickable: p,
|
|
7
|
-
colorFunction: o,
|
|
8
|
-
translation: m,
|
|
9
|
-
value: r
|
|
10
|
-
}) => {
|
|
11
|
-
var s;
|
|
12
|
-
const t = o == null ? void 0 : o(r), { t: n } = c();
|
|
13
|
-
return /* @__PURE__ */ i(
|
|
14
|
-
f,
|
|
15
|
-
{
|
|
16
|
-
onClick: e,
|
|
17
|
-
color: t == null ? void 0 : t.color,
|
|
18
|
-
icon: t == null ? void 0 : t.icon,
|
|
19
|
-
style: {
|
|
20
|
-
color: t == null ? void 0 : t.text,
|
|
21
|
-
cursor: p ? "pointer" : void 0
|
|
22
|
-
},
|
|
23
|
-
children: (s = n(m[r])) == null ? void 0 : s.toUpperCase()
|
|
24
|
-
}
|
|
25
|
-
);
|
|
26
|
-
};
|
|
27
|
-
export {
|
|
28
|
-
a as default
|
|
29
|
-
};
|
package/common/tag/index.d.ts
DELETED
package/common/text/index.cjs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("antd"),{Text:t}=e.Typography;exports.Text=t;
|
package/common/text/index.d.ts
DELETED
package/common/text/index.es.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("antd"),{Title:t}=e.Typography;exports.Title=t;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const Title: import('react').ForwardRefExoticComponent<import('antd/es/typography/Title').TitleProps & import('react').RefAttributes<HTMLElement>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const i=require("react/jsx-runtime"),a=require("antd"),m=require("react"),L=require("../../locale/index.cjs.js"),M=require("../tooltip/TooltipComponent.cjs.js"),P=require("./TextField.cjs.js"),k=m.forwardRef(function({type:y,required:o,label:t,rules:c=[],placeholder:r,onEnter:x,form:f,nextFocus:q,min:d,moneyField:n,addonAfter:j,minLength:T,defaultValue:$,pattern:g,disabled:l,readOnly:I,onChange:N,value:R,max:h,addonBefore:w,size:B,isInt:u=!1,tooltip:E,...F},b){const{t:p}=L.useTranslationLib(),C=m.useMemo(()=>[...c,{required:o,message:`${t??r??""} ${p("err.validation.required")}`}],[c,t,r,p,o]);return i.jsx(M,{title:E,children:i.jsx(a.Form.Item,{...F,label:t,rules:C,children:i.jsx(a.InputNumber,{ref:b,disabled:l,defaultValue:$,value:R,readOnly:I,addonBefore:w,minLength:T,addonAfter:j,step:u?1:void 0,pattern:u?"d*":g,onChange:N,onPressEnter:e=>P.onEnterInternalTextField(e,q,f,x),className:"max-width",min:d===null?void 0:d??0,max:h,type:n?void 0:"number",size:B,formatter:n?e=>{if(e.includes(".")){const s=`${e}`.split(".");return s[0]=s[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),s.join(".")}else return`${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,",")}:void 0,parser:n?e=>e==null?void 0:e.replace(/\$\s?|(,*)/g,""):void 0,placeholder:r??t})})})});module.exports=k;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { TextFieldProps } from './TextField';
|
|
3
|
-
interface NumberTextFieldProps extends TextFieldProps {
|
|
4
|
-
moneyField?: boolean;
|
|
5
|
-
addonAfter?: ReactNode;
|
|
6
|
-
minLength?: number;
|
|
7
|
-
isInt?: boolean;
|
|
8
|
-
max?: number;
|
|
9
|
-
pattern?: string;
|
|
10
|
-
min?: number | null;
|
|
11
|
-
}
|
|
12
|
-
declare const NumberTextField: import('react').ForwardRefExoticComponent<NumberTextFieldProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
13
|
-
export default NumberTextField;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { Form as L, InputNumber as M } from "antd";
|
|
3
|
-
import { forwardRef as P, useMemo as R } from "react";
|
|
4
|
-
import { useTranslationLib as k } from "../../locale/index.es.js";
|
|
5
|
-
import q from "../tooltip/TooltipComponent.es.js";
|
|
6
|
-
import { onEnterInternalTextField as v } from "./TextField.es.js";
|
|
7
|
-
const O = P(
|
|
8
|
-
function({
|
|
9
|
-
// eslint-disable-next-line no-unused-vars
|
|
10
|
-
type: z,
|
|
11
|
-
required: s,
|
|
12
|
-
label: t,
|
|
13
|
-
rules: m = [],
|
|
14
|
-
placeholder: o,
|
|
15
|
-
onEnter: c,
|
|
16
|
-
form: a,
|
|
17
|
-
nextFocus: u,
|
|
18
|
-
min: p,
|
|
19
|
-
moneyField: e,
|
|
20
|
-
addonAfter: x,
|
|
21
|
-
minLength: $,
|
|
22
|
-
defaultValue: g,
|
|
23
|
-
pattern: l,
|
|
24
|
-
disabled: T,
|
|
25
|
-
readOnly: I,
|
|
26
|
-
onChange: N,
|
|
27
|
-
value: h,
|
|
28
|
-
max: j,
|
|
29
|
-
addonBefore: w,
|
|
30
|
-
size: B,
|
|
31
|
-
isInt: d = !1,
|
|
32
|
-
tooltip: E,
|
|
33
|
-
...b
|
|
34
|
-
}, C) {
|
|
35
|
-
const { t: f } = k(), F = R(
|
|
36
|
-
() => [
|
|
37
|
-
...m,
|
|
38
|
-
{
|
|
39
|
-
required: s,
|
|
40
|
-
message: `${t ?? o ?? ""} ${f(
|
|
41
|
-
"err.validation.required"
|
|
42
|
-
)}`
|
|
43
|
-
}
|
|
44
|
-
],
|
|
45
|
-
[m, t, o, f, s]
|
|
46
|
-
);
|
|
47
|
-
return /* @__PURE__ */ i(q, { title: E, children: /* @__PURE__ */ i(L.Item, { ...b, label: t, rules: F, children: /* @__PURE__ */ i(
|
|
48
|
-
M,
|
|
49
|
-
{
|
|
50
|
-
ref: C,
|
|
51
|
-
disabled: T,
|
|
52
|
-
defaultValue: g,
|
|
53
|
-
value: h,
|
|
54
|
-
readOnly: I,
|
|
55
|
-
addonBefore: w,
|
|
56
|
-
minLength: $,
|
|
57
|
-
addonAfter: x,
|
|
58
|
-
step: d ? 1 : void 0,
|
|
59
|
-
pattern: d ? "d*" : l,
|
|
60
|
-
onChange: N,
|
|
61
|
-
onPressEnter: (r) => v(r, u, a, c),
|
|
62
|
-
className: "max-width",
|
|
63
|
-
min: p === null ? void 0 : p ?? 0,
|
|
64
|
-
max: j,
|
|
65
|
-
type: e ? void 0 : "number",
|
|
66
|
-
size: B,
|
|
67
|
-
formatter: e ? (r) => {
|
|
68
|
-
if (r.includes(".")) {
|
|
69
|
-
const n = `${r}`.split(".");
|
|
70
|
-
return n[0] = n[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), n.join(".");
|
|
71
|
-
} else
|
|
72
|
-
return `${r}`.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
73
|
-
} : void 0,
|
|
74
|
-
parser: e ? (r) => r == null ? void 0 : r.replace(/\$\s?|(,*)/g, "") : void 0,
|
|
75
|
-
placeholder: o ?? t
|
|
76
|
-
}
|
|
77
|
-
) }) });
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
export {
|
|
81
|
-
O as default
|
|
82
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),i=require("../../util/ValidationUtil.cjs.js"),l=require("./TextField.cjs.js"),r=e=>t.jsx(l.default,{...e,rules:[...e.rules??[],...i.phoneValidation(e.label??e.placeholder??"")]});module.exports=r;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import t from "../../util/ValidationUtil.es.js";
|
|
3
|
-
import i from "./TextField.es.js";
|
|
4
|
-
const m = (e) => /* @__PURE__ */ l(
|
|
5
|
-
i,
|
|
6
|
-
{
|
|
7
|
-
...e,
|
|
8
|
-
rules: [
|
|
9
|
-
...e.rules ?? [],
|
|
10
|
-
...t.phoneValidation(
|
|
11
|
-
e.label ?? e.placeholder ?? ""
|
|
12
|
-
)
|
|
13
|
-
]
|
|
14
|
-
}
|
|
15
|
-
);
|
|
16
|
-
export {
|
|
17
|
-
m as default
|
|
18
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react/jsx-runtime"),i=require("antd"),T=require("../../locale/index.cjs.js"),d=(n,e,t,r)=>{var s;e&&t&&(n.preventDefault(),(s=t==null?void 0:t.getFieldInstance(e))==null||s.focus()),r&&r(n)},F=({required:n,label:e,rules:t=[],placeholder:r,onEnter:s,nextFocus:l,className:u,...o})=>{const{t:c}=T.useTranslationLib(),x=i.Form.useFormInstance();return a.jsx(i.Form.Item,{...o,className:u,label:e,rules:[...t,{required:n,message:`${e} ${c("err.validation.required")}`}],children:a.jsx(i.Input.TextArea,{...o,className:u,onPressEnter:I=>d(I,l,x,s),placeholder:r??e})})};exports.default=F;exports.onEnterInternalTextField=d;
|