@pisell/materials 2.2.112 → 2.2.114
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +2 -2
- package/build/lowcode/view.js +2 -2
- package/es/components/appVersionControl/index.d.ts +4 -0
- package/es/components/auto-resize-text/auto-text-size-standalone.d.ts +20 -0
- package/es/components/auto-resize-text/index.d.ts +6 -0
- package/es/components/batch-editor/index.d.ts +1 -0
- package/es/components/cardPro/index.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.js +7 -2
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +84 -0
- package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +24 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +25 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.js +158 -22
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Upload/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/index.d.ts +14 -14
- package/es/components/dataSourceComponents/hooks/usePlatform.d.ts +5 -0
- package/es/components/date-picker/index.d.ts +0 -1
- package/es/components/drag-sort-tree/TreeItem/index.d.ts +18 -0
- package/es/components/drag-sort-tree/index.d.ts +4 -0
- package/es/components/filter/index.d.ts +1 -0
- package/es/components/iconfont/index.d.ts +8 -0
- package/es/components/keyboard/index.d.ts +22 -0
- package/es/components/login-and-register/index.d.ts +82 -0
- package/es/components/page/index.d.ts +0 -1
- package/es/components/pisell-config-provider/context.d.ts +22 -0
- package/es/components/pisell-config-provider/index.d.ts +13 -0
- package/es/components/pisellAdjustPrice/status.d.ts +32 -0
- package/es/components/pisellAdjustPrice/type.d.ts +22 -0
- package/es/components/pisellCardList/index.d.ts +103 -0
- package/es/components/pisellEmpty/index.d.ts +19 -0
- package/es/components/pisellQRScanner/index.d.ts +24 -0
- package/es/components/pisellText/index.d.ts +8 -0
- package/es/components/pisellToast/squareToast/index.d.ts +15 -0
- package/es/components/pisellToast/squareToast/methods.d.ts +13 -0
- package/es/components/pisellToast/squareToast/renderImperatively.d.ts +29 -0
- package/es/components/pisellToast/squareToast/toast.d.ts +25 -0
- package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +46 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
- package/es/components/productCard/cartSkuCard/locales.d.ts +96 -0
- package/es/components/productCard/components/Action/index.d.ts +3 -0
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/productCard/components/Time/index.d.ts +3 -0
- package/es/components/productCard/locales.d.ts +84 -0
- package/es/components/select/index.d.ts +9 -0
- package/es/components/sortableList/index.d.ts +11 -0
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +7 -0
- package/es/components/table/Actions/component/ExportImport/index.d.ts +7 -0
- package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/es/components/table/Table/SelectField/index.d.ts +0 -1
- package/es/components/table/Table/fields/index.d.ts +2 -3
- package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/fields/text/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/index.d.ts +4 -0
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/serve.d.ts +13 -0
- package/es/components/table/types.d.ts +268 -0
- package/es/components/versionModal/index.d.ts +23 -0
- package/es/components/virtual-keyboard/Amount/themeConfig.d.ts +32 -0
- package/es/components/virtual-keyboard/Amount/types.d.ts +44 -0
- package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +15 -0
- package/es/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
- package/es/components/virtual-keyboard/Number/themeConfig.d.ts +32 -0
- package/es/components/virtual-keyboard/Number/types.d.ts +26 -0
- package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +13 -0
- package/es/components/virtualInput/BaseVirtualInput/index.d.ts +40 -0
- package/es/components/virtualInput/index.d.ts +24 -0
- package/es/components/walletCard/index.d.ts +71 -0
- package/es/locales/en-US.d.ts +307 -0
- package/es/locales/zh-CN.d.ts +302 -0
- package/es/locales/zh-TW.d.ts +302 -0
- package/es/utils/index.d.ts +1 -1
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/appVersionControl/index.d.ts +4 -0
- package/lib/components/auto-resize-text/auto-text-size-standalone.d.ts +20 -0
- package/lib/components/auto-resize-text/index.d.ts +6 -0
- package/lib/components/batch-editor/index.d.ts +1 -0
- package/lib/components/cardPro/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.js +9 -1
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +84 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +24 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +25 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.js +182 -18
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Upload/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/index.d.ts +14 -14
- package/lib/components/dataSourceComponents/hooks/usePlatform.d.ts +5 -0
- package/lib/components/date-picker/index.d.ts +0 -1
- package/lib/components/drag-sort-tree/TreeItem/index.d.ts +18 -0
- package/lib/components/drag-sort-tree/index.d.ts +4 -0
- package/lib/components/filter/index.d.ts +1 -0
- package/lib/components/iconfont/index.d.ts +8 -0
- package/lib/components/keyboard/index.d.ts +22 -0
- package/lib/components/login-and-register/index.d.ts +82 -0
- package/lib/components/page/index.d.ts +0 -1
- package/lib/components/pisell-config-provider/context.d.ts +22 -0
- package/lib/components/pisell-config-provider/index.d.ts +13 -0
- package/lib/components/pisellAdjustPrice/status.d.ts +32 -0
- package/lib/components/pisellAdjustPrice/type.d.ts +22 -0
- package/lib/components/pisellCardList/index.d.ts +103 -0
- package/lib/components/pisellEmpty/index.d.ts +19 -0
- package/lib/components/pisellQRScanner/index.d.ts +24 -0
- package/lib/components/pisellText/index.d.ts +8 -0
- package/lib/components/pisellToast/squareToast/index.d.ts +15 -0
- package/lib/components/pisellToast/squareToast/methods.d.ts +13 -0
- package/lib/components/pisellToast/squareToast/renderImperatively.d.ts +29 -0
- package/lib/components/pisellToast/squareToast/toast.d.ts +25 -0
- package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +46 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
- package/lib/components/productCard/cartSkuCard/locales.d.ts +96 -0
- package/lib/components/productCard/components/Action/index.d.ts +3 -0
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/productCard/components/Time/index.d.ts +3 -0
- package/lib/components/productCard/locales.d.ts +84 -0
- package/lib/components/select/index.d.ts +9 -0
- package/lib/components/sortableList/index.d.ts +11 -0
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +7 -0
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +7 -0
- package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/lib/components/table/Table/SelectField/index.d.ts +0 -1
- package/lib/components/table/Table/fields/index.d.ts +2 -3
- package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/text/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/index.d.ts +4 -0
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/serve.d.ts +13 -0
- package/lib/components/table/types.d.ts +268 -0
- package/lib/components/versionModal/index.d.ts +23 -0
- package/lib/components/virtual-keyboard/Amount/themeConfig.d.ts +32 -0
- package/lib/components/virtual-keyboard/Amount/types.d.ts +44 -0
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +15 -0
- package/lib/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
- package/lib/components/virtual-keyboard/Number/themeConfig.d.ts +32 -0
- package/lib/components/virtual-keyboard/Number/types.d.ts +26 -0
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +13 -0
- package/lib/components/virtualInput/BaseVirtualInput/index.d.ts +40 -0
- package/lib/components/virtualInput/index.d.ts +24 -0
- package/lib/components/walletCard/index.d.ts +71 -0
- package/lib/locales/en-US.d.ts +307 -0
- package/lib/locales/zh-CN.d.ts +302 -0
- package/lib/locales/zh-TW.d.ts +302 -0
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/platform.d.ts +1 -1
- package/package.json +1 -1
|
@@ -195,7 +195,15 @@ var withFormItem = (WrappedComponent, overlayProps) => {
|
|
|
195
195
|
value = `${(originValue == null ? void 0 : originValue.countryCallingCode) || ""}${originValue.phone || ""}`;
|
|
196
196
|
}
|
|
197
197
|
if (!(value == null ? void 0 : value.trim())) {
|
|
198
|
-
|
|
198
|
+
if ((requiredobj == null ? void 0 : requiredobj.required) === false) {
|
|
199
|
+
return Promise.resolve();
|
|
200
|
+
} else if (typeof originValue == "object") {
|
|
201
|
+
return Promise.reject(
|
|
202
|
+
new Error(
|
|
203
|
+
requiredobj.message || (0, import_locales.getText)("pisell-data-source-form-required-message")
|
|
204
|
+
)
|
|
205
|
+
);
|
|
206
|
+
}
|
|
199
207
|
}
|
|
200
208
|
if (typeof originValue !== "string" && (requiredobj == null ? void 0 : requiredobj.required) === false && ((_a2 = originValue == null ? void 0 : originValue.phone) == null ? void 0 : _a2.trim()) === "") {
|
|
201
209
|
return Promise.resolve();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const useDataSourceKey: () => {
|
|
2
|
-
dataSourceKey: string |
|
|
3
|
-
dataSourceKeyRef: import("react").MutableRefObject<string |
|
|
2
|
+
dataSourceKey: string | undefined;
|
|
3
|
+
dataSourceKeyRef: import("react").MutableRefObject<string | undefined>;
|
|
4
4
|
};
|
|
5
5
|
export default useDataSourceKey;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Drawer } from 'antd';
|
|
2
|
+
import { OperationItem } from '../type';
|
|
3
|
+
declare const useDrawerState: (operationContent?: {
|
|
4
|
+
[key: string]: import("react").ReactNode;
|
|
5
|
+
} | undefined) => {
|
|
6
|
+
drawerVisible: boolean;
|
|
7
|
+
setDrawerVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
8
|
+
openDrawer: (item: OperationItem) => void;
|
|
9
|
+
closeDrawer: () => void;
|
|
10
|
+
drawerContent: import("react").ReactNode;
|
|
11
|
+
Container: {
|
|
12
|
+
(props: import("../../../pisellModal").PisellModalProps): JSX.Element;
|
|
13
|
+
confirm: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
14
|
+
destroy: () => void;
|
|
15
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
16
|
+
};
|
|
17
|
+
info: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
18
|
+
destroy: () => void;
|
|
19
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
20
|
+
};
|
|
21
|
+
error: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
22
|
+
destroy: () => void;
|
|
23
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
24
|
+
};
|
|
25
|
+
warn: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => any;
|
|
26
|
+
warning: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
27
|
+
destroy: () => void;
|
|
28
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
29
|
+
};
|
|
30
|
+
success: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
31
|
+
destroy: () => void;
|
|
32
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
33
|
+
};
|
|
34
|
+
Information: (props: import("../../../pisellModal/components/Information").InformationProps) => JSX.Element;
|
|
35
|
+
} | typeof Drawer;
|
|
36
|
+
containerProps: {};
|
|
37
|
+
};
|
|
38
|
+
export default useDrawerState;
|
|
@@ -19,7 +19,7 @@ interface UseTablePropsProps {
|
|
|
19
19
|
*/
|
|
20
20
|
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
21
21
|
currentComponentId: any;
|
|
22
|
-
title:
|
|
22
|
+
title: number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
|
|
23
23
|
pagination: {
|
|
24
24
|
total: number;
|
|
25
25
|
current: number;
|
|
@@ -28,7 +28,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
28
28
|
showSizeChanger: boolean;
|
|
29
29
|
};
|
|
30
30
|
columns: import("./useColumns").Column[];
|
|
31
|
-
subTitle:
|
|
31
|
+
subTitle: number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
|
|
32
32
|
buttons: any[] | null;
|
|
33
33
|
filter: {
|
|
34
34
|
dom: any;
|
|
@@ -54,7 +54,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
54
54
|
width: number;
|
|
55
55
|
align: "center" | "left" | "right";
|
|
56
56
|
fixed: false | "left" | "right";
|
|
57
|
-
type: "
|
|
57
|
+
type: "link" | "button";
|
|
58
58
|
items: OperationItem[];
|
|
59
59
|
} | undefined;
|
|
60
60
|
operationContent?: {
|
|
@@ -72,7 +72,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
72
72
|
useCustomAction: boolean;
|
|
73
73
|
actionType: string;
|
|
74
74
|
openMode: "modal" | "drawer";
|
|
75
|
-
openContentSize: "
|
|
75
|
+
openContentSize: "small" | "large" | "middle";
|
|
76
76
|
openTitle: string;
|
|
77
77
|
key: string;
|
|
78
78
|
} | undefined;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ColumnType } from 'antd/es/table';
|
|
3
|
+
import { LocalSettingsType } from '../../table/types';
|
|
4
|
+
import { DataSourceType } from '../provider/dataSource/DataSourceContext';
|
|
5
|
+
export declare type OperationItem = {
|
|
6
|
+
label?: string;
|
|
7
|
+
openMode: 'modal' | 'drawer' | 'custom';
|
|
8
|
+
openContentSize: 'small' | 'middle' | 'large';
|
|
9
|
+
openTitle: string;
|
|
10
|
+
actionType: 'detail' | 'edit' | 'delete' | 'custom';
|
|
11
|
+
key: string;
|
|
12
|
+
buttonProps?: any;
|
|
13
|
+
onClick?: (record: any) => void;
|
|
14
|
+
afterClose?: () => void;
|
|
15
|
+
};
|
|
16
|
+
export interface DataSourceTableProps {
|
|
17
|
+
__id?: string;
|
|
18
|
+
currentComponentId?: string;
|
|
19
|
+
currentSettingKey?: string;
|
|
20
|
+
title?: string | React.ReactNode | (() => React.ReactNode);
|
|
21
|
+
subTitle?: string | React.ReactNode | (() => React.ReactNode);
|
|
22
|
+
titleButtons?: {
|
|
23
|
+
show: boolean;
|
|
24
|
+
maxCount: number;
|
|
25
|
+
items: OperationItem[];
|
|
26
|
+
};
|
|
27
|
+
tableButtons?: {
|
|
28
|
+
show: boolean;
|
|
29
|
+
maxCount: number;
|
|
30
|
+
items: OperationItem[];
|
|
31
|
+
};
|
|
32
|
+
buttons?: any[];
|
|
33
|
+
operation?: {
|
|
34
|
+
show: boolean;
|
|
35
|
+
title: string;
|
|
36
|
+
width: number;
|
|
37
|
+
align: 'left' | 'center' | 'right';
|
|
38
|
+
fixed: 'left' | 'right' | false;
|
|
39
|
+
type: 'link' | 'button';
|
|
40
|
+
items: OperationItem[];
|
|
41
|
+
};
|
|
42
|
+
operationContent?: {
|
|
43
|
+
[key: string]: React.ReactNode;
|
|
44
|
+
};
|
|
45
|
+
dataSource: DataSourceType;
|
|
46
|
+
columns: ColumnType<any>[];
|
|
47
|
+
filter: any;
|
|
48
|
+
search?: {
|
|
49
|
+
show: boolean;
|
|
50
|
+
placeholder: string;
|
|
51
|
+
};
|
|
52
|
+
__designMode: string;
|
|
53
|
+
componentId: string;
|
|
54
|
+
clickToDetail?: {
|
|
55
|
+
show: boolean;
|
|
56
|
+
useCustomAction: boolean;
|
|
57
|
+
actionType: string;
|
|
58
|
+
openMode: 'modal' | 'drawer';
|
|
59
|
+
openContentSize: 'small' | 'middle' | 'large';
|
|
60
|
+
openTitle: string;
|
|
61
|
+
key: string;
|
|
62
|
+
};
|
|
63
|
+
onRow?: any;
|
|
64
|
+
filterBy?: Record<string, any>;
|
|
65
|
+
sortBy: string;
|
|
66
|
+
tabs?: {
|
|
67
|
+
show: boolean;
|
|
68
|
+
type: string;
|
|
69
|
+
items: {
|
|
70
|
+
name: string;
|
|
71
|
+
filterBy: Record<string, any>;
|
|
72
|
+
sortBy: string;
|
|
73
|
+
}[];
|
|
74
|
+
};
|
|
75
|
+
onValuesChange?: (changedValues: any, values: any) => void;
|
|
76
|
+
extraParams?: {
|
|
77
|
+
list?: Record<string, any>;
|
|
78
|
+
get?: Record<string, any>;
|
|
79
|
+
update?: Record<string, any>;
|
|
80
|
+
create?: Record<string, any>;
|
|
81
|
+
destroy?: Record<string, any>;
|
|
82
|
+
};
|
|
83
|
+
localSettings?: LocalSettingsType;
|
|
84
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 获取nocobase数据列表
|
|
3
|
+
*/
|
|
4
|
+
export declare const getCountryDataList: () => Promise<any>;
|
|
5
|
+
export interface Country {
|
|
6
|
+
id: number;
|
|
7
|
+
name: {
|
|
8
|
+
en: string;
|
|
9
|
+
'zh-CN': string;
|
|
10
|
+
'zh-HK': string;
|
|
11
|
+
original: string;
|
|
12
|
+
};
|
|
13
|
+
code: string;
|
|
14
|
+
calling_code: string;
|
|
15
|
+
currency_code: string;
|
|
16
|
+
sort: number;
|
|
17
|
+
status: string;
|
|
18
|
+
created_at: string;
|
|
19
|
+
updated_at: string;
|
|
20
|
+
prefix: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const useCountries: () => {
|
|
23
|
+
data: Country[];
|
|
24
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 获取nocobase数据列表
|
|
3
|
+
*/
|
|
4
|
+
export declare const getCountryDataList: () => Promise<any>;
|
|
5
|
+
export declare const getShopCountryDataList: (locale?: any) => Promise<any>;
|
|
6
|
+
export interface Country {
|
|
7
|
+
id: number;
|
|
8
|
+
name: {
|
|
9
|
+
en: string;
|
|
10
|
+
'zh-CN': string;
|
|
11
|
+
'zh-HK': string;
|
|
12
|
+
original: string;
|
|
13
|
+
};
|
|
14
|
+
code: string;
|
|
15
|
+
calling_code: string;
|
|
16
|
+
currency_code: string;
|
|
17
|
+
sort: number;
|
|
18
|
+
status: string;
|
|
19
|
+
created_at: string;
|
|
20
|
+
updated_at: string;
|
|
21
|
+
prefix: string;
|
|
22
|
+
}
|
|
23
|
+
export declare const useCountries: () => {
|
|
24
|
+
data: Country[];
|
|
25
|
+
};
|
|
@@ -97,32 +97,196 @@ var useCountries = () => {
|
|
|
97
97
|
}, [isShop]);
|
|
98
98
|
const currentData = (0, import_react.useMemo)(() => {
|
|
99
99
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
100
|
+
let codeList = null;
|
|
100
101
|
if (isShop) {
|
|
101
|
-
|
|
102
|
+
codeList = ((_d = (_c = (_b = (_a = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _a.store) == null ? void 0 : _b.getState()) == null ? void 0 : _c.global) == null ? void 0 : _d.codeList) || shopData;
|
|
103
|
+
} else if (isPc) {
|
|
104
|
+
codeList = (_h = (_g = (_f = (_e = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _e.store) == null ? void 0 : _f.getState()) == null ? void 0 : _g.country) == null ? void 0 : _h.country;
|
|
105
|
+
} else if (isH5) {
|
|
106
|
+
codeList = (_l = (_k = (_j = (_i = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _i.getStore()) == null ? void 0 : _j.getState()) == null ? void 0 : _k.country) == null ? void 0 : _l.country;
|
|
107
|
+
}
|
|
108
|
+
if (isShop || isPc || isH5) {
|
|
109
|
+
codeList = (codeList == null ? void 0 : codeList.length) > 0 ? codeList : defaultData;
|
|
110
|
+
console.log("codeList", codeList);
|
|
111
|
+
return codeList.map((item) => ({
|
|
102
112
|
...item,
|
|
103
113
|
prefix: `+${item.calling_code}`
|
|
104
114
|
}));
|
|
105
|
-
} else if (isPc) {
|
|
106
|
-
const codeList = (_h = (_g = (_f = (_e = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _e.store) == null ? void 0 : _f.getState()) == null ? void 0 : _g.country) == null ? void 0 : _h.country;
|
|
107
|
-
if (codeList) {
|
|
108
|
-
return codeList.map((item) => ({
|
|
109
|
-
...item,
|
|
110
|
-
prefix: `+${item.calling_code}`
|
|
111
|
-
}));
|
|
112
|
-
}
|
|
113
|
-
} else if (isH5) {
|
|
114
|
-
const codeList = (_l = (_k = (_j = (_i = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _i.getStore()) == null ? void 0 : _j.getState()) == null ? void 0 : _k.country) == null ? void 0 : _l.country;
|
|
115
|
-
if (codeList) {
|
|
116
|
-
return codeList.map((item) => ({
|
|
117
|
-
...item,
|
|
118
|
-
prefix: `+${item.calling_code}`
|
|
119
|
-
}));
|
|
120
|
-
}
|
|
121
115
|
}
|
|
122
116
|
return data;
|
|
123
|
-
}, [isShop, data, shopData]);
|
|
117
|
+
}, [isShop, isPc, isH5, data, shopData]);
|
|
124
118
|
return { data: currentData };
|
|
125
119
|
};
|
|
120
|
+
var defaultData = [
|
|
121
|
+
{
|
|
122
|
+
name: "Mexico",
|
|
123
|
+
code: "MX",
|
|
124
|
+
calling_code: "52",
|
|
125
|
+
currency_code: "MXN"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: "美国",
|
|
129
|
+
code: "US",
|
|
130
|
+
calling_code: "1",
|
|
131
|
+
currency_code: "USD"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: "加拿大",
|
|
135
|
+
code: "CA",
|
|
136
|
+
calling_code: "1",
|
|
137
|
+
currency_code: "CAD"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: "澳大利亚",
|
|
141
|
+
code: "AU",
|
|
142
|
+
calling_code: "61",
|
|
143
|
+
currency_code: "AUD"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: "新西兰",
|
|
147
|
+
code: "NZ",
|
|
148
|
+
calling_code: "64",
|
|
149
|
+
currency_code: "NZD"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: "新加坡",
|
|
153
|
+
code: "SG",
|
|
154
|
+
calling_code: "65",
|
|
155
|
+
currency_code: "SGD"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: "香港特别行政区",
|
|
159
|
+
code: "HK",
|
|
160
|
+
calling_code: "852",
|
|
161
|
+
currency_code: "HKD"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: "台湾",
|
|
165
|
+
code: "TW",
|
|
166
|
+
calling_code: "886",
|
|
167
|
+
currency_code: "TWD"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: "中国",
|
|
171
|
+
code: "CN",
|
|
172
|
+
calling_code: "86",
|
|
173
|
+
currency_code: "AUD"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: "日本",
|
|
177
|
+
code: "JP",
|
|
178
|
+
calling_code: "81",
|
|
179
|
+
currency_code: "JPY"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
name: "韩国",
|
|
183
|
+
code: "KR",
|
|
184
|
+
calling_code: "82",
|
|
185
|
+
currency_code: "KRW"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
name: "马来西亚",
|
|
189
|
+
code: "MY",
|
|
190
|
+
calling_code: "60",
|
|
191
|
+
currency_code: "USD"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
name: "英国",
|
|
195
|
+
code: "GB",
|
|
196
|
+
calling_code: "44",
|
|
197
|
+
currency_code: "GBP"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
name: "法国",
|
|
201
|
+
code: "FR",
|
|
202
|
+
calling_code: "33",
|
|
203
|
+
currency_code: "EUR"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
name: "意大利",
|
|
207
|
+
code: "IT",
|
|
208
|
+
calling_code: "39",
|
|
209
|
+
currency_code: "EUR"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
name: "Ireland",
|
|
213
|
+
code: "IE",
|
|
214
|
+
calling_code: "353",
|
|
215
|
+
currency_code: "EUR"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
name: "Netherlands",
|
|
219
|
+
code: "NL",
|
|
220
|
+
calling_code: "31",
|
|
221
|
+
currency_code: "EUR"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
name: "Germany",
|
|
225
|
+
code: "DE",
|
|
226
|
+
calling_code: "49",
|
|
227
|
+
currency_code: "EUR"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: "Spain",
|
|
231
|
+
code: "ES",
|
|
232
|
+
calling_code: "34",
|
|
233
|
+
currency_code: "EUR"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
name: "Finland",
|
|
237
|
+
code: "FI",
|
|
238
|
+
calling_code: "358",
|
|
239
|
+
currency_code: "EUR"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
name: "Hungary",
|
|
243
|
+
code: "HU",
|
|
244
|
+
calling_code: "36",
|
|
245
|
+
currency_code: "HUF"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
name: "Indonesia",
|
|
249
|
+
code: "ID",
|
|
250
|
+
calling_code: "62",
|
|
251
|
+
currency_code: "IDR"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
name: "India",
|
|
255
|
+
code: "IND",
|
|
256
|
+
calling_code: "91",
|
|
257
|
+
currency_code: "INR"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
name: "Nigeria",
|
|
261
|
+
code: "NG",
|
|
262
|
+
calling_code: "234",
|
|
263
|
+
currency_code: "NGN"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
name: "Islamic Republic of Pakistan",
|
|
267
|
+
code: "PAK",
|
|
268
|
+
calling_code: "92",
|
|
269
|
+
currency_code: "PRK"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
name: "Philippines",
|
|
273
|
+
code: "PH",
|
|
274
|
+
calling_code: "63",
|
|
275
|
+
currency_code: "PHP"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
name: "Thailand",
|
|
279
|
+
code: "TH",
|
|
280
|
+
calling_code: "66",
|
|
281
|
+
currency_code: "THB"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
name: "South Africa",
|
|
285
|
+
code: "ZA",
|
|
286
|
+
calling_code: "27",
|
|
287
|
+
currency_code: "ZAR"
|
|
288
|
+
}
|
|
289
|
+
];
|
|
126
290
|
// Annotate the CommonJS export names for ESM import in node:
|
|
127
291
|
0 && (module.exports = {
|
|
128
292
|
getCountryDataList,
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
declare const Subdomain: React.FC<import("antd").InputProps & {
|
|
3
3
|
onChange: (value: string) => void;
|
|
4
4
|
onBlur?: ((e: React.FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
5
|
-
rootDomain: "custom" | "
|
|
5
|
+
rootDomain: "custom" | "saas" | "xzero";
|
|
6
6
|
customDomain?: string | undefined;
|
|
7
7
|
value?: string | undefined;
|
|
8
8
|
tenantId: string;
|
|
@@ -19,7 +19,7 @@ declare const formFieldMap: {
|
|
|
19
19
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
20
20
|
onChange: (value: string) => void;
|
|
21
21
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
22
|
-
rootDomain: "custom" | "
|
|
22
|
+
rootDomain: "custom" | "saas" | "xzero";
|
|
23
23
|
customDomain?: string | undefined;
|
|
24
24
|
value?: string | undefined;
|
|
25
25
|
tenantId: string;
|
|
@@ -59,7 +59,11 @@ declare const formFieldMap: {
|
|
|
59
59
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
60
60
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
61
61
|
};
|
|
62
|
-
declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<
|
|
62
|
+
declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<{}> & {
|
|
63
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
64
|
+
} & {
|
|
65
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
66
|
+
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
63
67
|
JSON: import("react").FC<any>;
|
|
64
68
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
65
69
|
TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
@@ -72,14 +76,18 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
|
|
|
72
76
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
73
77
|
onChange: (value: string) => void;
|
|
74
78
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
75
|
-
rootDomain: "custom" | "
|
|
79
|
+
rootDomain: "custom" | "saas" | "xzero";
|
|
76
80
|
customDomain?: string | undefined;
|
|
77
81
|
value?: string | undefined;
|
|
78
82
|
tenantId: string;
|
|
79
83
|
name?: string | undefined;
|
|
80
84
|
fieldKey?: string | undefined;
|
|
81
85
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
82
|
-
}) |
|
|
86
|
+
}) | (import("react").FC<{}> & {
|
|
87
|
+
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
88
|
+
} & {
|
|
89
|
+
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
90
|
+
}) | ((props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
83
91
|
options?: any;
|
|
84
92
|
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
85
93
|
labelField: string;
|
|
@@ -87,15 +95,7 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
|
|
|
87
95
|
extraParams?: Record<string, any> | undefined;
|
|
88
96
|
} & {
|
|
89
97
|
dataSource?: any;
|
|
90
|
-
}) => JSX.Element) | (import("react").FC<
|
|
91
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
92
|
-
} & {
|
|
93
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
94
|
-
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
|
|
95
|
-
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
96
|
-
} & {
|
|
97
|
-
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
98
|
-
}) | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
98
|
+
}) => JSX.Element) | import("react").FC<any> | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
99
99
|
onChange: (value: string) => void;
|
|
100
|
-
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
100
|
+
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
101
101
|
export { getFieldComponent, formFieldMap };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
import { ValueProps, SortType } from '../types';
|
|
3
|
+
declare type IdType = string | number;
|
|
4
|
+
declare type TreeItemProps = {
|
|
5
|
+
id: string | number;
|
|
6
|
+
key: string | number;
|
|
7
|
+
item: ValueProps | any;
|
|
8
|
+
depth: number;
|
|
9
|
+
lists: any[];
|
|
10
|
+
childrenProps?: SortType;
|
|
11
|
+
sensors?: any;
|
|
12
|
+
expandedKeys?: IdType[];
|
|
13
|
+
setExpandedKeys?: any;
|
|
14
|
+
onSelectKeys?: (ids: IdType) => void;
|
|
15
|
+
onChange?: (value: any[]) => void;
|
|
16
|
+
};
|
|
17
|
+
declare const TreeItem: (props: TreeItemProps) => JSX.Element;
|
|
18
|
+
export default TreeItem;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IconComponentProps } from '@ant-design/icons/es/components/Icon';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface IconFontProps extends IconComponentProps {
|
|
4
|
+
type: string;
|
|
5
|
+
onClick?: React.MouseEventHandler<HTMLSpanElement>;
|
|
6
|
+
}
|
|
7
|
+
declare const IconFont: React.FC<IconFontProps>;
|
|
8
|
+
export default IconFont;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export declare type ItemValue = string | number;
|
|
4
|
+
export interface Item {
|
|
5
|
+
value: ItemValue;
|
|
6
|
+
label: React.ReactNode;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
type: 'text' | 'primary';
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
size?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface KeyboardProps {
|
|
13
|
+
id?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
onChange?: (value?: ItemValue) => void;
|
|
17
|
+
items?: Item[];
|
|
18
|
+
rightItems?: Item[];
|
|
19
|
+
keydown?: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare const _default: React.MemoExoticComponent<(props: KeyboardProps) => JSX.Element>;
|
|
22
|
+
export default _default;
|