@kingteza/crud-component 1.0.25 → 1.0.26
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/README.md +89 -0
- package/package.json +4 -6
- package/App.d.ts +0 -2
- package/components/common/DatePicker/DatePicker.cjs +0 -1
- package/components/common/DatePicker/DatePicker.d.ts +0 -37
- package/components/common/DatePicker/DatePicker.js +0 -88
- package/components/common/DatePicker/TimePicker.cjs +0 -1
- package/components/common/DatePicker/TimePicker.d.ts +0 -34
- package/components/common/DatePicker/TimePicker.js +0 -78
- package/components/common/DatePicker/index.d.ts +0 -3
- package/components/common/appearance/Hider.cjs +0 -1
- package/components/common/appearance/Hider.d.ts +0 -6
- package/components/common/appearance/Hider.js +0 -5
- package/components/common/appearance/index.d.ts +0 -0
- package/components/common/button/Button.cjs +0 -1
- package/components/common/button/Button.d.ts +0 -12
- package/components/common/button/Button.js +0 -79
- package/components/common/button/CloneButtonTable.cjs +0 -1
- package/components/common/button/CloneButtonTable.d.ts +0 -6
- package/components/common/button/CloneButtonTable.js +0 -20
- package/components/common/button/DeleteButtonTable.cjs +0 -1
- package/components/common/button/DeleteButtonTable.d.ts +0 -13
- package/components/common/button/DeleteButtonTable.js +0 -68
- package/components/common/button/ExportButton.cjs +0 -1
- package/components/common/button/ExportButton.d.ts +0 -4
- package/components/common/button/ExportButton.js +0 -27
- package/components/common/button/HideButtonTable.cjs +0 -1
- package/components/common/button/HideButtonTable.d.ts +0 -13
- package/components/common/button/HideButtonTable.js +0 -68
- package/components/common/button/ImportButton.cjs +0 -1
- package/components/common/button/ImportButton.d.ts +0 -9
- package/components/common/button/ImportButton.js +0 -56
- package/components/common/button/NewButton.cjs +0 -1
- package/components/common/button/NewButton.d.ts +0 -12
- package/components/common/button/NewButton.js +0 -24
- package/components/common/button/PrintButton.cjs +0 -1
- package/components/common/button/PrintButton.d.ts +0 -12
- package/components/common/button/PrintButton.js +0 -26
- package/components/common/button/RefreshButton.cjs +0 -1
- package/components/common/button/RefreshButton.d.ts +0 -11
- package/components/common/button/RefreshButton.js +0 -24
- package/components/common/button/UnHideButton.cjs +0 -1
- package/components/common/button/UnHideButton.d.ts +0 -14
- package/components/common/button/UnHideButton.js +0 -70
- package/components/common/button/UpdateButtonTable.cjs +0 -1
- package/components/common/button/UpdateButtonTable.d.ts +0 -6
- package/components/common/button/UpdateButtonTable.js +0 -20
- package/components/common/button/ViewButtonTable.cjs +0 -1
- package/components/common/button/ViewButtonTable.d.ts +0 -6
- package/components/common/button/ViewButtonTable.js +0 -20
- package/components/common/button/index.d.ts +0 -14
- package/components/common/check-box/CheckBox.cjs +0 -1
- package/components/common/check-box/CheckBox.d.ts +0 -9
- package/components/common/check-box/CheckBox.js +0 -40
- package/components/common/check-box/index.d.ts +0 -2
- package/components/common/description/DescList.cjs +0 -1
- package/components/common/description/DescList.d.ts +0 -18
- package/components/common/description/DescList.js +0 -16
- package/components/common/description/DescriptionComponent.d.ts +0 -7
- package/components/common/description/index.d.ts +0 -3
- package/components/common/index.d.ts +0 -22
- package/components/common/layout/VerticalSpace.cjs +0 -1
- package/components/common/layout/VerticalSpace.d.ts +0 -5
- package/components/common/layout/VerticalSpace.js +0 -6
- package/components/common/layout/index.d.ts +0 -2
- package/components/common/loading/LoadingIndicator.cjs +0 -1
- package/components/common/loading/LoadingIndicator.d.ts +0 -6
- package/components/common/loading/LoadingIndicator.js +0 -24
- package/components/common/loading/index.d.ts +0 -2
- package/components/common/picker/ImagePicker.cjs +0 -1
- package/components/common/picker/ImagePicker.d.ts +0 -56
- package/components/common/picker/ImagePicker.js +0 -282
- package/components/common/picker/index.d.ts +0 -2
- package/components/common/radio/RadioGroupComponent.cjs +0 -1
- package/components/common/radio/RadioGroupComponent.d.ts +0 -18
- package/components/common/radio/RadioGroupComponent.js +0 -19
- package/components/common/radio/index.d.ts +0 -2
- package/components/common/report/SelectFieldInReport.cjs +0 -1
- package/components/common/report/SelectFieldInReport.d.ts +0 -16
- package/components/common/report/SelectFieldInReport.js +0 -30
- package/components/common/report/index.d.ts +0 -3
- package/components/common/select/CustomSelectOption.cjs +0 -1
- package/components/common/select/CustomSelectOption.d.ts +0 -7
- package/components/common/select/CustomSelectOption.js +0 -13
- package/components/common/select/SelectComponent.cjs +0 -1
- package/components/common/select/SelectComponent.d.ts +0 -21
- package/components/common/select/SelectComponent.js +0 -89
- package/components/common/select/index.d.ts +0 -3
- package/components/common/show-more/index.cjs +0 -1
- package/components/common/show-more/index.d.ts +0 -4
- package/components/common/show-more/index.js +0 -8
- package/components/common/tab/TabViewWithRoute.cjs +0 -1
- package/components/common/tab/TabViewWithRoute.d.ts +0 -13
- package/components/common/tab/TabViewWithRoute.js +0 -38
- package/components/common/tab/index.d.ts +0 -2
- package/components/common/table/index.d.ts +0 -3
- package/components/common/table/table.cjs +0 -1
- package/components/common/table/table.d.ts +0 -19
- package/components/common/table/table.js +0 -40
- package/components/common/tag/StatusTag.cjs +0 -1
- package/components/common/tag/StatusTag.d.ts +0 -14
- package/components/common/tag/StatusTag.js +0 -30
- package/components/common/tag/index.d.ts +0 -2
- package/components/common/text/index.cjs +0 -1
- package/components/common/text/index.d.ts +0 -3
- package/components/common/text/index.js +0 -5
- package/components/common/text/title/TitleWithHeadTitle.d.ts +0 -7
- package/components/common/text/title/index.cjs +0 -1
- package/components/common/text/title/index.d.ts +0 -1
- package/components/common/text/title/index.js +0 -5
- package/components/common/text-field/NumberField.cjs +0 -1
- package/components/common/text-field/NumberField.d.ts +0 -13
- package/components/common/text-field/NumberField.js +0 -83
- package/components/common/text-field/PhoneNumberField.cjs +0 -1
- package/components/common/text-field/PhoneNumberField.d.ts +0 -4
- package/components/common/text-field/PhoneNumberField.js +0 -18
- package/components/common/text-field/TextArea.cjs +0 -1
- package/components/common/text-field/TextArea.d.ts +0 -17
- package/components/common/text-field/TextArea.js +0 -47
- package/components/common/text-field/TextField.cjs +0 -1
- package/components/common/text-field/TextField.d.ts +0 -27
- package/components/common/text-field/TextField.js +0 -73
- package/components/common/text-field/index.d.ts +0 -5
- package/components/common/tooltip/TooltipComponent.cjs +0 -1
- package/components/common/tooltip/TooltipComponent.d.ts +0 -5
- package/components/common/tooltip/TooltipComponent.js +0 -9
- package/components/common/tooltip/index.d.ts +0 -2
- package/components/common/wizard/WizardResult.cjs +0 -1
- package/components/common/wizard/WizardResult.d.ts +0 -16
- package/components/common/wizard/WizardResult.js +0 -60
- package/components/common/wizard/WizardViewForm.cjs +0 -1
- package/components/common/wizard/WizardViewForm.d.ts +0 -24
- package/components/common/wizard/WizardViewForm.js +0 -74
- package/components/common/wizard/index.d.ts +0 -3
- package/components/crud/CrudComponent.cjs +0 -1
- package/components/crud/CrudComponent.d.ts +0 -237
- package/components/crud/CrudComponent.js +0 -210
- package/components/crud/CrudField.cjs +0 -1
- package/components/crud/CrudField.d.ts +0 -4
- package/components/crud/CrudField.js +0 -459
- package/components/crud/CrudForm.cjs +0 -1
- package/components/crud/CrudForm.d.ts +0 -14
- package/components/crud/CrudForm.js +0 -91
- package/components/crud/CrudFormWizard.cjs +0 -1
- package/components/crud/CrudFormWizard.d.ts +0 -14
- package/components/crud/CrudFormWizard.js +0 -140
- package/components/crud/CrudReportComponent.cjs +0 -4
- package/components/crud/CrudReportComponent.d.ts +0 -44
- package/components/crud/CrudReportComponent.js +0 -255
- package/components/crud/CrudSearchComponent.cjs +0 -1
- package/components/crud/CrudSearchComponent.d.ts +0 -21
- package/components/crud/CrudSearchComponent.js +0 -95
- package/components/crud/FileCrudField.cjs +0 -1
- package/components/crud/FileCrudField.d.ts +0 -25
- package/components/crud/FileCrudField.js +0 -220
- package/components/crud/ImageCrudField.cjs +0 -1
- package/components/crud/ImageCrudField.d.ts +0 -38
- package/components/crud/ImageCrudField.js +0 -113
- package/components/crud/import/CrudImportButton.cjs +0 -1
- package/components/crud/import/CrudImportButton.d.ts +0 -3
- package/components/crud/import/CrudImportButton.js +0 -31
- package/components/crud/import/CrudImportComponent.cjs +0 -2
- package/components/crud/import/CrudImportComponent.d.ts +0 -14
- package/components/crud/import/CrudImportComponent.js +0 -223
- package/components/crud/index.d.ts +0 -15
- package/components/crud/view/CrudDecListView.cjs +0 -1
- package/components/crud/view/CrudDecListView.d.ts +0 -14
- package/components/crud/view/CrudDecListView.js +0 -42
- package/components/crud/view/CrudViewer.cjs +0 -1
- package/components/crud/view/CrudViewer.d.ts +0 -43
- package/components/crud/view/CrudViewer.js +0 -217
- package/components/crud/view/CrudViewerUtil.cjs +0 -1
- package/components/crud/view/CrudViewerUtil.d.ts +0 -2
- package/components/crud/view/CrudViewerUtil.js +0 -57
- package/components/crud/view/index.d.ts +0 -5
- package/index.cjs +0 -1
- package/index.d.ts +0 -4
- package/index.js +0 -32
- package/locale/hooks/translation-constants.cjs +0 -1
- package/locale/hooks/translation-constants.d.ts +0 -1
- package/locale/hooks/translation-constants.js +0 -4
- package/locale/index.cjs +0 -1
- package/locale/index.d.ts +0 -74
- package/locale/index.js +0 -37
- package/locale/translations/en.cjs +0 -1
- package/locale/translations/en.d.ts +0 -58
- package/locale/translations/en.js +0 -60
- package/main.d.ts +0 -0
- package/util/DateUtil.cjs +0 -1
- package/util/DateUtil.d.ts +0 -7
- package/util/DateUtil.js +0 -6
- package/util/ImageUtil.cjs +0 -1
- package/util/ImageUtil.d.ts +0 -14
- package/util/ImageUtil.js +0 -63
- package/util/NumberUtil.cjs +0 -1
- package/util/NumberUtil.d.ts +0 -17
- package/util/NumberUtil.js +0 -60
- package/util/ValidationUtil.cjs +0 -1
- package/util/ValidationUtil.d.ts +0 -14
- package/util/ValidationUtil.js +0 -60
- package/util/index.cjs +0 -1
- package/util/index.d.ts +0 -4
- package/util/index.js +0 -10
- package/vite-env.d.ts +0 -1
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ButtonType } from 'antd/es/button';
|
|
2
|
-
interface Props<T> {
|
|
3
|
-
value: T;
|
|
4
|
-
onClick: (value: T) => Promise<void>;
|
|
5
|
-
text?: string;
|
|
6
|
-
loading?: boolean;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
type?: ButtonType;
|
|
9
|
-
block?: boolean;
|
|
10
|
-
shouldConfirm?: boolean;
|
|
11
|
-
}
|
|
12
|
-
declare function HideButtonTable<T>({ shouldConfirm, block, value, loading, onClick, text, disabled, type, }: Props<T>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export default HideButtonTable;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { DownCircleOutlined as p } from "@ant-design/icons";
|
|
3
|
-
import { Popconfirm as T } from "antd";
|
|
4
|
-
import { useMemo as g, useState as x, useEffect as A, useCallback as _ } from "react";
|
|
5
|
-
import { useTranslation as k } from "react-i18next";
|
|
6
|
-
import { TRANSLATION_NAMESPACE as E } from "../../../locale/hooks/translation-constants.js";
|
|
7
|
-
import d from "./Button.js";
|
|
8
|
-
function M({
|
|
9
|
-
shouldConfirm: C = !0,
|
|
10
|
-
block: n,
|
|
11
|
-
value: i,
|
|
12
|
-
loading: a,
|
|
13
|
-
onClick: s,
|
|
14
|
-
text: l,
|
|
15
|
-
disabled: f,
|
|
16
|
-
type: m = "link"
|
|
17
|
-
}) {
|
|
18
|
-
const { t } = k(E), r = g(() => l ?? t("str.hide"), [l, t]), [u, e] = x(!1);
|
|
19
|
-
A(() => {
|
|
20
|
-
e(a ?? !1);
|
|
21
|
-
}, [a]);
|
|
22
|
-
const c = _(
|
|
23
|
-
async () => {
|
|
24
|
-
try {
|
|
25
|
-
e(!0), await s(i);
|
|
26
|
-
} finally {
|
|
27
|
-
e(!1);
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
[s, i]
|
|
31
|
-
);
|
|
32
|
-
return C ? /* @__PURE__ */ o(
|
|
33
|
-
T,
|
|
34
|
-
{
|
|
35
|
-
title: t("qus.doYouWantToHide"),
|
|
36
|
-
okText: r.toUpperCase(),
|
|
37
|
-
cancelText: t("str.no").toUpperCase(),
|
|
38
|
-
onConfirm: c,
|
|
39
|
-
children: /* @__PURE__ */ o(
|
|
40
|
-
d,
|
|
41
|
-
{
|
|
42
|
-
tooltip: r,
|
|
43
|
-
icon: /* @__PURE__ */ o(p, {}),
|
|
44
|
-
disabled: f,
|
|
45
|
-
loading: u,
|
|
46
|
-
type: m,
|
|
47
|
-
danger: !0,
|
|
48
|
-
block: n
|
|
49
|
-
}
|
|
50
|
-
)
|
|
51
|
-
}
|
|
52
|
-
) : /* @__PURE__ */ o(
|
|
53
|
-
d,
|
|
54
|
-
{
|
|
55
|
-
tooltip: r,
|
|
56
|
-
icon: /* @__PURE__ */ o(p, {}),
|
|
57
|
-
disabled: f,
|
|
58
|
-
loading: u,
|
|
59
|
-
type: m,
|
|
60
|
-
danger: !0,
|
|
61
|
-
block: n,
|
|
62
|
-
onClick: c
|
|
63
|
-
}
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
export {
|
|
67
|
-
M as default
|
|
68
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),k=require("@ant-design/icons"),n=require("react"),q=require("react-i18next"),x=require("../../../locale/hooks/translation-constants.cjs"),C=require("./Button.cjs");function S({onClick:o,children:c,accept:u,className:a,disabled:l,type:f="link"}){const[d,i]=n.useState(!1),{t:p}=q.useTranslation(x.TRANSLATION_NAMESPACE),e=n.useRef(null),y=n.useCallback(()=>{m(t=>t+1),e.current&&setTimeout(()=>{var t;(t=e==null?void 0:e.current)==null||t.click()},10)},[]),[g,m]=n.useState(0),j=n.useCallback(async t=>{i(!0);const r=t.target.files[0];r&&await o(r),i(!1)},[o]);return s.jsxs("div",{className:a,children:[s.jsx("input",{type:"file",style:{display:"none"},ref:e,onChange:j,accept:u},g),s.jsx(C,{loading:d,type:f,disabled:l,onClick:y,icon:s.jsx(k.ImportOutlined,{}),tooltip:p("str.import"),children:c})]})}exports.ImportButton=S;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BaseButtonProps } from 'antd/es/button/button';
|
|
2
|
-
import { PropsWithChildren } from 'react';
|
|
3
|
-
export declare function ImportButton({ onClick, children, accept, className, disabled, type, }: PropsWithChildren<{
|
|
4
|
-
className?: string;
|
|
5
|
-
accept?: string;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
onClick: (file: File) => Promise<any>;
|
|
8
|
-
type?: BaseButtonProps["type"];
|
|
9
|
-
}>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { jsxs as A, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { ImportOutlined as T } from "@ant-design/icons";
|
|
3
|
-
import { useState as s, useRef as h, useCallback as l } from "react";
|
|
4
|
-
import { useTranslation as x } from "react-i18next";
|
|
5
|
-
import { TRANSLATION_NAMESPACE as N } from "../../../locale/hooks/translation-constants.js";
|
|
6
|
-
import S from "./Button.js";
|
|
7
|
-
function _({
|
|
8
|
-
onClick: e,
|
|
9
|
-
children: c,
|
|
10
|
-
accept: m,
|
|
11
|
-
className: a,
|
|
12
|
-
disabled: f,
|
|
13
|
-
type: p = "link"
|
|
14
|
-
}) {
|
|
15
|
-
const [u, i] = s(!1), { t: d } = x(N), o = h(null), y = l(() => {
|
|
16
|
-
k((t) => t + 1), o.current && setTimeout(() => {
|
|
17
|
-
var t;
|
|
18
|
-
(t = o == null ? void 0 : o.current) == null || t.click();
|
|
19
|
-
}, 10);
|
|
20
|
-
}, []), [g, k] = s(0), C = l(
|
|
21
|
-
async (t) => {
|
|
22
|
-
i(!0);
|
|
23
|
-
const r = t.target.files[0];
|
|
24
|
-
r && await e(r), i(!1);
|
|
25
|
-
},
|
|
26
|
-
[e]
|
|
27
|
-
);
|
|
28
|
-
return /* @__PURE__ */ A("div", { className: a, children: [
|
|
29
|
-
/* @__PURE__ */ n(
|
|
30
|
-
"input",
|
|
31
|
-
{
|
|
32
|
-
type: "file",
|
|
33
|
-
style: { display: "none" },
|
|
34
|
-
ref: o,
|
|
35
|
-
onChange: C,
|
|
36
|
-
accept: m
|
|
37
|
-
},
|
|
38
|
-
g
|
|
39
|
-
),
|
|
40
|
-
/* @__PURE__ */ n(
|
|
41
|
-
S,
|
|
42
|
-
{
|
|
43
|
-
loading: u,
|
|
44
|
-
type: p,
|
|
45
|
-
disabled: f,
|
|
46
|
-
onClick: y,
|
|
47
|
-
icon: /* @__PURE__ */ n(T, {}),
|
|
48
|
-
tooltip: d("str.import"),
|
|
49
|
-
children: c
|
|
50
|
-
}
|
|
51
|
-
)
|
|
52
|
-
] });
|
|
53
|
-
}
|
|
54
|
-
export {
|
|
55
|
-
_ as ImportButton
|
|
56
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("@ant-design/icons"),l=require("react-i18next"),q=require("./Button.cjs"),N=require("../../../locale/hooks/translation-constants.cjs"),d=({size:n,block:r,className:s,type:o="primary",onClick:t,title:u,to:i})=>{const{t:c}=l.useTranslation(N.TRANSLATION_NAMESPACE);return e.jsx(q,{type:o,className:s,to:i,block:r,size:n,onClick:t&&(()=>t(!0)),icon:e.jsx(a.PlusOutlined,{}),children:u??c("str.new")})};exports.NewButton=d;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { SizeType } from 'antd/es/config-provider/SizeContext';
|
|
2
|
-
import { ButtonType } from 'antd/lib/button';
|
|
3
|
-
import { FC } from 'react';
|
|
4
|
-
export declare const NewButton: FC<{
|
|
5
|
-
to?: string;
|
|
6
|
-
onClick?: (value: boolean) => void;
|
|
7
|
-
title?: string;
|
|
8
|
-
type?: ButtonType;
|
|
9
|
-
block?: boolean;
|
|
10
|
-
className?: string;
|
|
11
|
-
size?: SizeType;
|
|
12
|
-
}>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { PlusOutlined as u } from "@ant-design/icons";
|
|
3
|
-
import { useTranslation as f } from "react-i18next";
|
|
4
|
-
import c from "./Button.js";
|
|
5
|
-
import { TRANSLATION_NAMESPACE as l } from "../../../locale/hooks/translation-constants.js";
|
|
6
|
-
const w = ({ size: t, block: n, className: m, type: i = "primary", onClick: o, title: e, to: p }) => {
|
|
7
|
-
const { t: s } = f(l);
|
|
8
|
-
return /* @__PURE__ */ r(
|
|
9
|
-
c,
|
|
10
|
-
{
|
|
11
|
-
type: i,
|
|
12
|
-
className: m,
|
|
13
|
-
to: p,
|
|
14
|
-
block: n,
|
|
15
|
-
size: t,
|
|
16
|
-
onClick: o && (() => o(!0)),
|
|
17
|
-
icon: /* @__PURE__ */ r(u, {}),
|
|
18
|
-
children: e ?? s("str.new")
|
|
19
|
-
}
|
|
20
|
-
);
|
|
21
|
-
};
|
|
22
|
-
export {
|
|
23
|
-
w as NewButton
|
|
24
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),p=require("@ant-design/icons"),q=require("react-i18next"),P=require("./Button.cjs"),d=require("../../../locale/hooks/translation-constants.cjs"),j=({disabled:e,loading:i,block:o,className:s,type:u="primary",onClick:c,title:a,to:l})=>{const{t:n}=q.useTranslation(d.TRANSLATION_NAMESPACE),t=a??n("str.print");return r.jsx(P,{type:u,className:s,to:l,loading:i,disabled:e,block:o,onClick:c,tooltip:t!=null&&t.trim()?"":n("str.print"),icon:r.jsx(p.PrinterOutlined,{}),children:t})};exports.PrintButton=j;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ButtonType } from 'antd/lib/button';
|
|
2
|
-
import { FC } from 'react';
|
|
3
|
-
export declare const PrintButton: FC<{
|
|
4
|
-
to?: string;
|
|
5
|
-
loading?: boolean;
|
|
6
|
-
onClick?: () => void;
|
|
7
|
-
title?: string;
|
|
8
|
-
type?: ButtonType;
|
|
9
|
-
block?: boolean;
|
|
10
|
-
className?: string;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
}>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { PrinterOutlined as u } from "@ant-design/icons";
|
|
3
|
-
import { useTranslation as A } from "react-i18next";
|
|
4
|
-
import a from "./Button.js";
|
|
5
|
-
import { TRANSLATION_NAMESPACE as l } from "../../../locale/hooks/translation-constants.js";
|
|
6
|
-
const B = ({ disabled: n, loading: i, block: m, className: p, type: s = "primary", onClick: e, title: c, to: f }) => {
|
|
7
|
-
const { t } = A(l), r = c ?? t("str.print");
|
|
8
|
-
return /* @__PURE__ */ o(
|
|
9
|
-
a,
|
|
10
|
-
{
|
|
11
|
-
type: s,
|
|
12
|
-
className: p,
|
|
13
|
-
to: f,
|
|
14
|
-
loading: i,
|
|
15
|
-
disabled: n,
|
|
16
|
-
block: m,
|
|
17
|
-
onClick: e,
|
|
18
|
-
tooltip: r != null && r.trim() ? "" : t("str.print"),
|
|
19
|
-
icon: /* @__PURE__ */ o(u, {}),
|
|
20
|
-
children: r
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
};
|
|
24
|
-
export {
|
|
25
|
-
B as PrintButton
|
|
26
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),a=require("@ant-design/icons"),l=require("react-i18next"),d=require("../../../locale/hooks/translation-constants.cjs"),q=require("./Button.cjs"),R=({disabled:r,block:n,className:s,type:o="primary",onClick:e,title:i,to:u})=>{const{t:c}=l.useTranslation(d.TRANSLATION_NAMESPACE);return t.jsx(q,{type:o,disabled:r,className:s,to:u,block:n,onClick:e&&(()=>e(!0)),icon:t.jsx(a.ReloadOutlined,{}),children:i??c("str.refresh")})};exports.RefreshButton=R;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ButtonType } from 'antd/lib/button';
|
|
2
|
-
import { FC } from 'react';
|
|
3
|
-
export declare const RefreshButton: FC<{
|
|
4
|
-
to?: string;
|
|
5
|
-
onClick?: (value: boolean) => void;
|
|
6
|
-
title?: string;
|
|
7
|
-
type?: ButtonType;
|
|
8
|
-
block?: boolean;
|
|
9
|
-
className?: string;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
}>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { ReloadOutlined as f } from "@ant-design/icons";
|
|
3
|
-
import { useTranslation as u } from "react-i18next";
|
|
4
|
-
import { TRANSLATION_NAMESPACE as a } from "../../../locale/hooks/translation-constants.js";
|
|
5
|
-
import c from "./Button.js";
|
|
6
|
-
const R = ({ disabled: t, block: e, className: m, type: n = "primary", onClick: r, title: i, to: p }) => {
|
|
7
|
-
const { t: s } = u(a);
|
|
8
|
-
return /* @__PURE__ */ o(
|
|
9
|
-
c,
|
|
10
|
-
{
|
|
11
|
-
type: n,
|
|
12
|
-
disabled: t,
|
|
13
|
-
className: m,
|
|
14
|
-
to: p,
|
|
15
|
-
block: e,
|
|
16
|
-
onClick: r && (() => r(!0)),
|
|
17
|
-
icon: /* @__PURE__ */ o(f, {}),
|
|
18
|
-
children: i ?? s("str.refresh")
|
|
19
|
-
}
|
|
20
|
-
);
|
|
21
|
-
};
|
|
22
|
-
export {
|
|
23
|
-
R as RefreshButton
|
|
24
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),p=require("@ant-design/icons"),T=require("antd"),n=require("react"),g=require("react-i18next"),C=require("./Button.cjs"),U=require("../../../locale/hooks/translation-constants.cjs");function m({shouldConfirm:q=!0,block:s,value:i,loading:c,onClick:u,text:a,disabled:l,type:d="link",hidden:j}){const{t:e}=g.useTranslation(U.TRANSLATION_NAMESPACE),o=n.useMemo(()=>a??e("str.unhide"),[a,e]),[f,r]=n.useState(!1);n.useEffect(()=>{r(c??!1)},[c]);const x=n.useCallback(async()=>{try{r(!0),await u(i)}finally{r(!1)}},[u,i]);return q?t.jsx(T.Popconfirm,{title:e("qus.doYouWantToHide"),okText:o.toUpperCase(),cancelText:e("str.no").toUpperCase(),onConfirm:x,children:t.jsx(C,{tooltip:o,icon:t.jsx(p.UpCircleOutlined,{}),disabled:l,loading:f,type:d,danger:!0,hidden:j,block:s})}):t.jsx(C,{tooltip:o,icon:t.jsx(p.UpCircleOutlined,{}),disabled:l,loading:f,type:d,danger:!0,block:s,onClick:x})}module.exports=m;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ButtonType } from 'antd/es/button';
|
|
2
|
-
interface Props<T> {
|
|
3
|
-
value: T;
|
|
4
|
-
onClick: (value: T) => Promise<void>;
|
|
5
|
-
text?: string;
|
|
6
|
-
loading?: boolean;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
type?: ButtonType;
|
|
9
|
-
block?: boolean;
|
|
10
|
-
shouldConfirm?: boolean;
|
|
11
|
-
hidden?: boolean;
|
|
12
|
-
}
|
|
13
|
-
declare function UnHideButton<T>({ shouldConfirm, block, value, loading, onClick, text, disabled, type, hidden }: Props<T>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export default UnHideButton;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { UpCircleOutlined as c } from "@ant-design/icons";
|
|
3
|
-
import { Popconfirm as g } from "antd";
|
|
4
|
-
import { useMemo as x, useState as A, useEffect as U, useCallback as _ } from "react";
|
|
5
|
-
import { useTranslation as k } from "react-i18next";
|
|
6
|
-
import d from "./Button.js";
|
|
7
|
-
import { TRANSLATION_NAMESPACE as E } from "../../../locale/hooks/translation-constants.js";
|
|
8
|
-
function O({
|
|
9
|
-
shouldConfirm: C = !0,
|
|
10
|
-
block: e,
|
|
11
|
-
value: i,
|
|
12
|
-
loading: a,
|
|
13
|
-
onClick: s,
|
|
14
|
-
text: f,
|
|
15
|
-
disabled: l,
|
|
16
|
-
type: m = "link",
|
|
17
|
-
hidden: T
|
|
18
|
-
}) {
|
|
19
|
-
const { t } = k(E), n = x(() => f ?? t("str.unhide"), [f, t]), [u, r] = A(!1);
|
|
20
|
-
U(() => {
|
|
21
|
-
r(a ?? !1);
|
|
22
|
-
}, [a]);
|
|
23
|
-
const p = _(
|
|
24
|
-
async () => {
|
|
25
|
-
try {
|
|
26
|
-
r(!0), await s(i);
|
|
27
|
-
} finally {
|
|
28
|
-
r(!1);
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
[s, i]
|
|
32
|
-
);
|
|
33
|
-
return C ? /* @__PURE__ */ o(
|
|
34
|
-
g,
|
|
35
|
-
{
|
|
36
|
-
title: t("qus.doYouWantToHide"),
|
|
37
|
-
okText: n.toUpperCase(),
|
|
38
|
-
cancelText: t("str.no").toUpperCase(),
|
|
39
|
-
onConfirm: p,
|
|
40
|
-
children: /* @__PURE__ */ o(
|
|
41
|
-
d,
|
|
42
|
-
{
|
|
43
|
-
tooltip: n,
|
|
44
|
-
icon: /* @__PURE__ */ o(c, {}),
|
|
45
|
-
disabled: l,
|
|
46
|
-
loading: u,
|
|
47
|
-
type: m,
|
|
48
|
-
danger: !0,
|
|
49
|
-
hidden: T,
|
|
50
|
-
block: e
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
}
|
|
54
|
-
) : /* @__PURE__ */ o(
|
|
55
|
-
d,
|
|
56
|
-
{
|
|
57
|
-
tooltip: n,
|
|
58
|
-
icon: /* @__PURE__ */ o(c, {}),
|
|
59
|
-
disabled: l,
|
|
60
|
-
loading: u,
|
|
61
|
-
type: m,
|
|
62
|
-
danger: !0,
|
|
63
|
-
block: e,
|
|
64
|
-
onClick: p
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
export {
|
|
69
|
-
O as default
|
|
70
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),o=require("@ant-design/icons"),r=require("react-i18next"),i=require("./Button.cjs"),u=require("../../../locale/hooks/translation-constants.cjs");function c({value:n,onClick:e}){const{t:s}=r.useTranslation(u.TRANSLATION_NAMESPACE);return t.jsx(i,{tooltip:s("str.update"),type:"link",onClick:()=>e(n),icon:t.jsx(o.EditOutlined,{})})}module.exports=c;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { EditOutlined as i } from "@ant-design/icons";
|
|
3
|
-
import { useTranslation as m } from "react-i18next";
|
|
4
|
-
import p from "./Button.js";
|
|
5
|
-
import { TRANSLATION_NAMESPACE as e } from "../../../locale/hooks/translation-constants.js";
|
|
6
|
-
function d({ value: o, onClick: r }) {
|
|
7
|
-
const { t: n } = m(e);
|
|
8
|
-
return /* @__PURE__ */ t(
|
|
9
|
-
p,
|
|
10
|
-
{
|
|
11
|
-
tooltip: n("str.update"),
|
|
12
|
-
type: "link",
|
|
13
|
-
onClick: () => r(o),
|
|
14
|
-
icon: /* @__PURE__ */ t(i, {})
|
|
15
|
-
}
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
export {
|
|
19
|
-
d as default
|
|
20
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),i=require("@ant-design/icons"),o=require("react-i18next"),r=require("./Button.cjs"),u=require("../../../locale/hooks/translation-constants.cjs");function c({value:n,onClick:e}){const{t:s}=o.useTranslation(u.TRANSLATION_NAMESPACE);return t.jsx(r,{type:"link",onClick:()=>e(n),icon:t.jsx(i.EyeOutlined,{}),tooltip:s("str.view")})}module.exports=c;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { EyeOutlined as n } from "@ant-design/icons";
|
|
3
|
-
import { useTranslation as e } from "react-i18next";
|
|
4
|
-
import m from "./Button.js";
|
|
5
|
-
import { TRANSLATION_NAMESPACE as p } from "../../../locale/hooks/translation-constants.js";
|
|
6
|
-
function c({ value: t, onClick: r }) {
|
|
7
|
-
const { t: i } = e(p);
|
|
8
|
-
return /* @__PURE__ */ o(
|
|
9
|
-
m,
|
|
10
|
-
{
|
|
11
|
-
type: "link",
|
|
12
|
-
onClick: () => r(t),
|
|
13
|
-
icon: /* @__PURE__ */ o(n, {}),
|
|
14
|
-
tooltip: i("str.view")
|
|
15
|
-
}
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
export {
|
|
19
|
-
c as default
|
|
20
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { default as ButtonComponent, ButtonComponentProps } from './Button';
|
|
2
|
-
import { default as CloneButtonTable } from './CloneButtonTable';
|
|
3
|
-
import { default as DeleteButtonTable } from './DeleteButtonTable';
|
|
4
|
-
import { ExportButton } from './ExportButton';
|
|
5
|
-
import { default as HideButtonTable } from './HideButtonTable';
|
|
6
|
-
import { ImportButton } from './ImportButton';
|
|
7
|
-
import { NewButton } from './NewButton';
|
|
8
|
-
import { PrintButton } from './PrintButton';
|
|
9
|
-
import { RefreshButton } from './RefreshButton';
|
|
10
|
-
import { default as UnHideButton } from './UnHideButton';
|
|
11
|
-
import { default as UpdateButtonTable } from './UpdateButtonTable';
|
|
12
|
-
import { default as ViewButtonTable } from './ViewButtonTable';
|
|
13
|
-
export { ButtonComponent, CloneButtonTable, DeleteButtonTable, ExportButton, HideButtonTable, ImportButton, NewButton, PrintButton, RefreshButton, UnHideButton, UpdateButtonTable, ViewButtonTable, };
|
|
14
|
-
export type { ButtonComponentProps };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),s=require("antd"),m=s.Form.Item,x=({onChange:e,label:d,initialValue:c=!1,disabled:n,switch:t=!1,...h})=>r.jsxs(m,{...h,valuePropName:"checked",initialValue:c,label:t?d:void 0,children:[!!t&&r.jsx(s.Switch,{disabled:n,defaultChecked:c,onChange:e&&(o=>e(o))}),!t&&r.jsx(s.Checkbox,{disabled:n,defaultChecked:c,onChange:e&&(o=>e(o.target.checked)),children:d})]});module.exports=x;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FormItemProps } from 'antd';
|
|
2
|
-
import { FC } from 'react';
|
|
3
|
-
interface Props extends FormItemProps {
|
|
4
|
-
onChange?: (evt: boolean) => void;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
switch?: boolean;
|
|
7
|
-
}
|
|
8
|
-
declare const CheckBoxComponent: FC<Props>;
|
|
9
|
-
export default CheckBoxComponent;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { jsxs as h, jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import { Form as k, Switch as s, Checkbox as p } from "antd";
|
|
3
|
-
const x = k.Item, C = ({
|
|
4
|
-
onChange: e,
|
|
5
|
-
label: t,
|
|
6
|
-
initialValue: o = !1,
|
|
7
|
-
disabled: m,
|
|
8
|
-
switch: r = !1,
|
|
9
|
-
...f
|
|
10
|
-
}) => /* @__PURE__ */ h(
|
|
11
|
-
x,
|
|
12
|
-
{
|
|
13
|
-
...f,
|
|
14
|
-
valuePropName: "checked",
|
|
15
|
-
initialValue: o,
|
|
16
|
-
label: r ? t : void 0,
|
|
17
|
-
children: [
|
|
18
|
-
!!r && /* @__PURE__ */ d(
|
|
19
|
-
s,
|
|
20
|
-
{
|
|
21
|
-
disabled: m,
|
|
22
|
-
defaultChecked: o,
|
|
23
|
-
onChange: e && ((c) => e(c))
|
|
24
|
-
}
|
|
25
|
-
),
|
|
26
|
-
!r && /* @__PURE__ */ d(
|
|
27
|
-
p,
|
|
28
|
-
{
|
|
29
|
-
disabled: m,
|
|
30
|
-
defaultChecked: o,
|
|
31
|
-
onChange: e && ((c) => e(c.target.checked)),
|
|
32
|
-
children: t
|
|
33
|
-
}
|
|
34
|
-
)
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
);
|
|
38
|
-
export {
|
|
39
|
-
C as default
|
|
40
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const n=require("react/jsx-runtime"),o=require("antd"),u=require("react"),a=require("../../../util/NumberUtil.cjs"),l=o.Descriptions.Item,m=({list:r,keepEmptyValues:s,...i})=>{const c=u.useMemo(()=>{const t=s?r:r.filter(e=>e&&!!e.value);return t.forEach(e=>{!e.noFormatting&&!isNaN(e.value)&&(e.value=a.default.toMoney(e.value))}),t},[s,r]);return n.jsx(o.Descriptions,{...i,children:c.map(({label:t,value:e})=>n.jsx(l,{label:t,children:e},t))})};module.exports=m;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { DescriptionsProps } from 'antd/lib/descriptions';
|
|
2
|
-
import { default as React, FC } from 'react';
|
|
3
|
-
export type DescPropsNullable = {
|
|
4
|
-
label?: string | React.ReactElement;
|
|
5
|
-
value?: any;
|
|
6
|
-
noFormatting?: boolean;
|
|
7
|
-
};
|
|
8
|
-
export type DescProps = {
|
|
9
|
-
label?: string;
|
|
10
|
-
value: any;
|
|
11
|
-
noFormatting?: boolean;
|
|
12
|
-
};
|
|
13
|
-
export interface DescListProps extends DescriptionsProps {
|
|
14
|
-
list: (DescPropsNullable | null | undefined | boolean)[];
|
|
15
|
-
keepEmptyValues?: boolean;
|
|
16
|
-
}
|
|
17
|
-
declare const DescList: FC<DescListProps>;
|
|
18
|
-
export default DescList;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { Descriptions as n } from "antd";
|
|
3
|
-
import { useMemo as c } from "react";
|
|
4
|
-
import a from "../../../util/NumberUtil.js";
|
|
5
|
-
const u = n.Item, h = ({ list: t, keepEmptyValues: e, ...m }) => {
|
|
6
|
-
const s = c(() => {
|
|
7
|
-
const r = e ? t : t.filter((o) => o && !!o.value);
|
|
8
|
-
return r.forEach((o) => {
|
|
9
|
-
!o.noFormatting && !isNaN(o.value) && (o.value = a.toMoney(o.value));
|
|
10
|
-
}), r;
|
|
11
|
-
}, [e, t]);
|
|
12
|
-
return /* @__PURE__ */ i(n, { ...m, children: s.map(({ label: r, value: o }) => /* @__PURE__ */ i(u, { label: r, children: o }, r)) });
|
|
13
|
-
};
|
|
14
|
-
export {
|
|
15
|
-
h as default
|
|
16
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export { DatePickerComponent, TimePickerComponent } from './DatePicker';
|
|
2
|
-
export { ButtonComponent, ButtonComponent as Button, CloneButtonTable, DeleteButtonTable, ExportButton, HideButtonTable, ImportButton, NewButton, PrintButton, RefreshButton, UnHideButton, UpdateButtonTable, ViewButtonTable, } from './button';
|
|
3
|
-
export { CheckBoxComponent } from './check-box';
|
|
4
|
-
export { DescList } from './description';
|
|
5
|
-
export type { DescPropsNullable } from './description';
|
|
6
|
-
export { default as VerticalSpace } from './layout/VerticalSpace';
|
|
7
|
-
export { LoadingIndicator } from './loading';
|
|
8
|
-
export { ImagePicker } from './picker';
|
|
9
|
-
export { RadioGroupComponent } from './radio';
|
|
10
|
-
export { SelectFieldInReport } from './report';
|
|
11
|
-
export type { ReportSelectFieldItems } from './report';
|
|
12
|
-
export { SelectComponent, CustomSelectOption } from './select';
|
|
13
|
-
export { TabViewWithRoute } from './tab';
|
|
14
|
-
export { TableComponent } from './table';
|
|
15
|
-
export { StatusTag } from './tag';
|
|
16
|
-
export { Title } from './text';
|
|
17
|
-
export { Text } from './text';
|
|
18
|
-
export { ShowMore } from './show-more';
|
|
19
|
-
export { PhoneField, TextField, TextAreaComponent, NumberTextField, } from './text-field';
|
|
20
|
-
export { TooltipComponent } from './tooltip';
|
|
21
|
-
export { WizardResult } from './wizard';
|
|
22
|
-
export { WizardViewForm } from './wizard';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),c=require("antd"),s=({children:e,className:t=""})=>r.jsx(c.Space,{direction:"vertical",className:[t,"w-100"].join(" "),children:e});module.exports=s;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),r=require("antd"),o=require("react-i18next"),i=require("../button/Button.cjs"),c=require("../../../locale/hooks/translation-constants.cjs"),u=({loading:s,children:n,error:a})=>{const{t:e}=o.useTranslation(c.TRANSLATION_NAMESPACE);return t.jsx(r.Skeleton,{loading:s,paragraph:!0,className:"h-100",children:a?t.jsx(r.Result,{status:"404",title:404,subTitle:e("err.notFound"),className:"",extra:t.jsx(i,{to:-1,type:"primary",children:e("str.goBack")})}):n})};module.exports=u;
|