@pisell/materials 1.0.952 → 1.0.954
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/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +9 -9
- package/build/lowcode/render/default/view.js +21 -21
- package/build/lowcode/view.js +22 -22
- package/es/components/auto-complete-number/index.d.ts +0 -1
- package/es/components/badge/index.d.ts +0 -1
- package/es/components/batch-editor/fields/index.d.ts +0 -1
- package/es/components/calendar/index.d.ts +0 -1
- package/es/components/classicLayout/index.d.ts +0 -1
- package/es/components/colorPicker/index.d.ts +0 -1
- package/es/components/config-provider/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +2 -1
- package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.js +35 -23
- package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Input.Mobile/serve.js +14 -2
- package/es/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Upload/index.js +4 -3
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +9 -8
- package/es/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -1
- package/es/components/dataSourceComponents/hooks/usePlatform.js +9 -1
- package/es/components/date-picker/index.d.ts +1 -0
- package/es/components/dropdown/index.d.ts +0 -1
- package/es/components/filter/components/items/index.d.ts +0 -1
- package/es/components/filter/components/items/text/Editor/index.d.ts +0 -1
- package/es/components/filter/components/items/text/Preview/index.d.ts +0 -1
- package/es/components/filter/components/items/text/index.d.ts +0 -1
- package/es/components/iconfont/index.d.ts +8 -0
- package/es/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +0 -1
- package/es/components/pisellCard/index.d.ts +0 -1
- package/es/components/pisellDatePicker/index.d.ts +0 -1
- package/es/components/pisellInput/index.d.ts +0 -1
- package/es/components/pisellModal/components/IpadModal/index.d.ts +1 -0
- package/es/components/pisellModal/components/MobileModal/index.d.ts +1 -0
- package/es/components/pisellModal/components/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -1
- package/es/components/productCard/components/Divider/index.d.ts +0 -1
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/productCard/components/Time/components/Like/index.d.ts +0 -1
- package/es/components/segmented/index.d.ts +0 -1
- package/es/components/skeleton/index.d.ts +0 -1
- package/es/components/slider/index.d.ts +0 -1
- package/es/components/sort/components/InlineMenu/index.d.ts +0 -1
- package/es/components/table/Actions/component/Group/PopoverContent.d.ts +1 -0
- package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/es/components/table/Summary/index.d.ts +0 -1
- package/es/components/table/Table/fields/date/index.d.ts +1 -0
- package/es/components/table/Table/fields/image/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/image/index.d.ts +1 -0
- package/es/components/table/Table/fields/index.d.ts +3 -2
- package/es/components/table/Table/fields/link/index.d.ts +1 -0
- package/es/components/table/Table/fields/number/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/number/index.d.ts +1 -0
- package/es/components/table/Table/fields/numberRange/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/es/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/pSwitch/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/pSwitch/index.d.ts +1 -0
- package/es/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/search/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/search/index.d.ts +1 -0
- 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/text/index.d.ts +1 -0
- package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/tableConfig/summary/index.d.ts +0 -1
- package/es/components/table/TableFilter/SortIcon.d.ts +0 -1
- package/es/components/time-picker/index.d.ts +0 -1
- package/es/components/upload/index.d.ts +0 -1
- package/es/components/versionSelect/index.d.ts +0 -1
- package/es/components/walletCard/Guest/index.d.ts +0 -1
- package/es/components/walletCard/Guide/index.d.ts +0 -1
- package/es/utils/index.d.ts +1 -1
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/auto-complete-number/index.d.ts +0 -1
- package/lib/components/badge/index.d.ts +0 -1
- package/lib/components/batch-editor/fields/index.d.ts +0 -1
- package/lib/components/calendar/index.d.ts +0 -1
- package/lib/components/classicLayout/index.d.ts +0 -1
- package/lib/components/colorPicker/index.d.ts +0 -1
- package/lib/components/config-provider/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +2 -1
- package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.js +33 -16
- package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.js +21 -7
- package/lib/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Upload/index.js +2 -1
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +9 -8
- package/lib/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -1
- package/lib/components/dataSourceComponents/hooks/usePlatform.js +12 -0
- package/lib/components/date-picker/index.d.ts +1 -0
- package/lib/components/dropdown/index.d.ts +0 -1
- package/lib/components/filter/components/items/index.d.ts +0 -1
- package/lib/components/filter/components/items/text/Editor/index.d.ts +0 -1
- package/lib/components/filter/components/items/text/Preview/index.d.ts +0 -1
- package/lib/components/filter/components/items/text/index.d.ts +0 -1
- package/lib/components/iconfont/index.d.ts +8 -0
- package/lib/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +0 -1
- package/lib/components/pisellCard/index.d.ts +0 -1
- package/lib/components/pisellDatePicker/index.d.ts +0 -1
- package/lib/components/pisellInput/index.d.ts +0 -1
- package/lib/components/pisellModal/components/IpadModal/index.d.ts +1 -0
- package/lib/components/pisellModal/components/MobileModal/index.d.ts +1 -0
- package/lib/components/pisellModal/components/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -1
- package/lib/components/productCard/components/Divider/index.d.ts +0 -1
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/productCard/components/Time/components/Like/index.d.ts +0 -1
- package/lib/components/segmented/index.d.ts +0 -1
- package/lib/components/skeleton/index.d.ts +0 -1
- package/lib/components/slider/index.d.ts +0 -1
- package/lib/components/sort/components/InlineMenu/index.d.ts +0 -1
- package/lib/components/table/Actions/component/Group/PopoverContent.d.ts +1 -0
- package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/lib/components/table/Summary/index.d.ts +0 -1
- package/lib/components/table/Table/fields/date/index.d.ts +1 -0
- package/lib/components/table/Table/fields/image/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/image/index.d.ts +1 -0
- package/lib/components/table/Table/fields/index.d.ts +3 -2
- package/lib/components/table/Table/fields/link/index.d.ts +1 -0
- package/lib/components/table/Table/fields/number/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/number/index.d.ts +1 -0
- package/lib/components/table/Table/fields/numberRange/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/pSwitch/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/pSwitch/index.d.ts +1 -0
- package/lib/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/search/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/search/index.d.ts +1 -0
- 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/text/index.d.ts +1 -0
- package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/tableConfig/summary/index.d.ts +0 -1
- package/lib/components/table/TableFilter/SortIcon.d.ts +0 -1
- package/lib/components/time-picker/index.d.ts +0 -1
- package/lib/components/upload/index.d.ts +0 -1
- package/lib/components/versionSelect/index.d.ts +0 -1
- package/lib/components/walletCard/Guest/index.d.ts +0 -1
- package/lib/components/walletCard/Guide/index.d.ts +0 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/platform.d.ts +1 -1
- package/package.json +3 -3
package/es/utils/index.d.ts
CHANGED
package/es/utils/platform.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const isMobile: () =>
|
|
1
|
+
export declare const isMobile: () => any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const useDataSourceKey: () => {
|
|
2
|
-
dataSourceKey: string | undefined;
|
|
3
|
-
dataSourceKeyRef: import("react").MutableRefObject<string | undefined>;
|
|
2
|
+
dataSourceKey: string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined;
|
|
3
|
+
dataSourceKeyRef: import("react").MutableRefObject<string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined>;
|
|
4
4
|
};
|
|
5
5
|
export default useDataSourceKey;
|
|
@@ -19,7 +19,7 @@ interface UseTablePropsProps {
|
|
|
19
19
|
*/
|
|
20
20
|
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
21
21
|
currentComponentId: any;
|
|
22
|
-
title: number | boolean | React.ReactFragment | JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
22
|
+
title: string | number | boolean | React.ReactFragment | JSX.Element | (() => 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: number | boolean | React.ReactFragment | JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
31
|
+
subTitle: string | number | boolean | React.ReactFragment | JSX.Element | (() => 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: "button" | "link";
|
|
58
58
|
items: OperationItem[];
|
|
59
59
|
} | undefined;
|
|
60
60
|
operationContent?: {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { InputProps } from 'antd';
|
|
3
|
-
import { ModeType } from
|
|
3
|
+
import { ModeType } from '../../dataSourceForm/type';
|
|
4
4
|
declare type PhoneValue = string | {
|
|
5
5
|
phone: string;
|
|
6
6
|
countryCallingCode: string;
|
|
7
|
+
countryCode?: string;
|
|
7
8
|
};
|
|
8
9
|
export interface PhoneInputProps extends Omit<InputProps, 'value' | 'onChange'> {
|
|
9
10
|
renderMode: ModeType;
|
|
@@ -42,7 +42,13 @@ var import_utils2 = require("../../dataSourceForm/utils");
|
|
|
42
42
|
var import_useTranslationOriginal = __toESM(require("../../../../hooks/useTranslationOriginal"));
|
|
43
43
|
var import_useSetRequest = __toESM(require("../../../../hooks/useSetRequest"));
|
|
44
44
|
var { Option } = import_select.default;
|
|
45
|
-
var MobileNumberInput = ({
|
|
45
|
+
var MobileNumberInput = ({
|
|
46
|
+
value: propsValue,
|
|
47
|
+
onChange,
|
|
48
|
+
disabled,
|
|
49
|
+
returnFormat = "string",
|
|
50
|
+
...props
|
|
51
|
+
}) => {
|
|
46
52
|
(0, import_useSetRequest.default)();
|
|
47
53
|
const { data: countries = [] } = (0, import_serve.useCountries)();
|
|
48
54
|
const translationOriginal = (0, import_useTranslationOriginal.default)();
|
|
@@ -52,14 +58,15 @@ var MobileNumberInput = ({ value: propsValue, onChange, disabled, returnFormat =
|
|
|
52
58
|
}
|
|
53
59
|
return propsValue;
|
|
54
60
|
}, [propsValue]);
|
|
55
|
-
const handleChange = (prefix, phoneNumber2) => {
|
|
61
|
+
const handleChange = (prefix, phoneNumber2, countryCode2) => {
|
|
56
62
|
if (returnFormat === "string") {
|
|
57
63
|
const newValue = phoneNumber2 ? `${prefix}${phoneNumber2}` : "";
|
|
58
64
|
onChange == null ? void 0 : onChange(newValue);
|
|
59
65
|
} else {
|
|
60
66
|
onChange == null ? void 0 : onChange({
|
|
61
67
|
phone: phoneNumber2,
|
|
62
|
-
countryCallingCode: prefix
|
|
68
|
+
countryCallingCode: prefix,
|
|
69
|
+
countryCode: countryCode2
|
|
63
70
|
});
|
|
64
71
|
}
|
|
65
72
|
};
|
|
@@ -71,13 +78,21 @@ var MobileNumberInput = ({ value: propsValue, onChange, disabled, returnFormat =
|
|
|
71
78
|
} else if ("phone" in val) {
|
|
72
79
|
srtValue = `${val.countryCallingCode || ""}${val.phone || ""}`;
|
|
73
80
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
81
|
+
let matchedContry = null;
|
|
82
|
+
if (!(0, import_utils.isString)(val) && (val == null ? void 0 : val.countryCode)) {
|
|
83
|
+
matchedContry = countries.find(
|
|
84
|
+
(country) => (country == null ? void 0 : country.code) === (val == null ? void 0 : val.countryCode)
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
if (!matchedContry) {
|
|
88
|
+
matchedContry = countries.find(
|
|
89
|
+
(country) => srtValue.startsWith(country.prefix)
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
if (matchedContry) {
|
|
78
93
|
return {
|
|
79
|
-
countryCode:
|
|
80
|
-
phoneNumber: srtValue.slice(
|
|
94
|
+
countryCode: matchedContry.code,
|
|
95
|
+
phoneNumber: srtValue.slice(matchedContry.prefix.length)
|
|
81
96
|
};
|
|
82
97
|
}
|
|
83
98
|
return {
|
|
@@ -102,11 +117,9 @@ var MobileNumberInput = ({ value: propsValue, onChange, disabled, returnFormat =
|
|
|
102
117
|
}, [value, countries]);
|
|
103
118
|
const handleCountryChange = (value2) => {
|
|
104
119
|
setCountryCode(value2);
|
|
105
|
-
const selectedCountry = countries.find(
|
|
106
|
-
(c) => c.code === value2
|
|
107
|
-
);
|
|
120
|
+
const selectedCountry = countries.find((c) => c.code === value2);
|
|
108
121
|
const prefix = (selectedCountry == null ? void 0 : selectedCountry.prefix) || "";
|
|
109
|
-
handleChange(prefix, phoneNumber);
|
|
122
|
+
handleChange(prefix, phoneNumber, selectedCountry == null ? void 0 : selectedCountry.code);
|
|
110
123
|
setTimeout(() => {
|
|
111
124
|
const formInstance = props.form;
|
|
112
125
|
const fieldName = props.fieldKey;
|
|
@@ -122,7 +135,7 @@ var MobileNumberInput = ({ value: propsValue, onChange, disabled, returnFormat =
|
|
|
122
135
|
(c) => c.code === countryCode
|
|
123
136
|
);
|
|
124
137
|
const prefix = (selectedCountry == null ? void 0 : selectedCountry.prefix) || "";
|
|
125
|
-
handleChange(prefix, cleanNumber);
|
|
138
|
+
handleChange(prefix, cleanNumber, selectedCountry == null ? void 0 : selectedCountry.code);
|
|
126
139
|
if (!cleanNumber) {
|
|
127
140
|
const formInstance = props.form;
|
|
128
141
|
const fieldName = props.fieldKey;
|
|
@@ -156,7 +169,8 @@ var MobileNumberInput = ({ value: propsValue, onChange, disabled, returnFormat =
|
|
|
156
169
|
const prefix = (selectedCountry == null ? void 0 : selectedCountry.prefix) || "";
|
|
157
170
|
return {
|
|
158
171
|
phone: phoneNumber || "",
|
|
159
|
-
countryCallingCode: prefix
|
|
172
|
+
countryCallingCode: prefix,
|
|
173
|
+
countryCode
|
|
160
174
|
};
|
|
161
175
|
}, [countryCode, phoneNumber, countries]);
|
|
162
176
|
const handleBlur = () => {
|
|
@@ -198,5 +212,8 @@ var MobileNumberInput = ({ value: propsValue, onChange, disabled, returnFormat =
|
|
|
198
212
|
}
|
|
199
213
|
));
|
|
200
214
|
};
|
|
201
|
-
var MobileNumberInputWithMode = (0, import_utils2.withMode)(
|
|
215
|
+
var MobileNumberInputWithMode = (0, import_utils2.withMode)(
|
|
216
|
+
MobileNumberInput,
|
|
217
|
+
import_ReadPretty.default
|
|
218
|
+
);
|
|
202
219
|
var WithMode_default = MobileNumberInputWithMode;
|
|
@@ -39,13 +39,17 @@ var import_utils = require("../../../table/utils");
|
|
|
39
39
|
var import_usePlatform = require("../../hooks/usePlatform");
|
|
40
40
|
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
41
41
|
var getCountryDataList = async () => {
|
|
42
|
-
const { data } = await import_utils.request.getRequest().get(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
const { data } = await import_utils.request.getRequest().get(
|
|
43
|
+
`/country:list`,
|
|
44
|
+
{},
|
|
45
|
+
{
|
|
46
|
+
isNocobase: true,
|
|
47
|
+
fullResult: true,
|
|
48
|
+
headers: {
|
|
49
|
+
"x-data-source": "pisell2"
|
|
50
|
+
}
|
|
47
51
|
}
|
|
48
|
-
|
|
52
|
+
);
|
|
49
53
|
return data.map((item) => ({
|
|
50
54
|
...item,
|
|
51
55
|
prefix: `+${item.calling_code}`
|
|
@@ -53,6 +57,8 @@ var getCountryDataList = async () => {
|
|
|
53
57
|
};
|
|
54
58
|
var useCountries = () => {
|
|
55
59
|
const isShop = (0, import_usePlatform.useIsShop)();
|
|
60
|
+
const isH5 = (0, import_usePlatform.useIsH5)();
|
|
61
|
+
const isPc = (0, import_usePlatform.useIsPc)();
|
|
56
62
|
const { appHelper } = (0, import_useEngineContext.default)();
|
|
57
63
|
const { data, run } = (0, import_ahooks.useRequest)(getCountryDataList, {
|
|
58
64
|
cacheKey: "phone-countries",
|
|
@@ -68,7 +74,7 @@ var useCountries = () => {
|
|
|
68
74
|
}
|
|
69
75
|
}, [isShop]);
|
|
70
76
|
const currentData = (0, import_react.useMemo)(() => {
|
|
71
|
-
var _a, _b, _c, _d;
|
|
77
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
72
78
|
if (isShop) {
|
|
73
79
|
const 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;
|
|
74
80
|
if (codeList) {
|
|
@@ -77,6 +83,14 @@ var useCountries = () => {
|
|
|
77
83
|
prefix: `+${item.calling_code}`
|
|
78
84
|
}));
|
|
79
85
|
}
|
|
86
|
+
} else if (isH5 || isPc) {
|
|
87
|
+
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;
|
|
88
|
+
if (codeList) {
|
|
89
|
+
return codeList.map((item) => ({
|
|
90
|
+
...item,
|
|
91
|
+
prefix: `+${item.calling_code}`
|
|
92
|
+
}));
|
|
93
|
+
}
|
|
80
94
|
}
|
|
81
95
|
return data;
|
|
82
96
|
}, [isShop, data]);
|
|
@@ -55,8 +55,9 @@ var Upload = (0, import_utils.withFormItem)(import_WithMode.default, {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
|
+
return { rules: [...(others == null ? void 0 : others.rules) || [], rule] };
|
|
58
59
|
}
|
|
59
|
-
return {
|
|
60
|
+
return {};
|
|
60
61
|
}
|
|
61
62
|
});
|
|
62
63
|
var Upload_default = Upload;
|
|
@@ -15,4 +15,4 @@ export declare const getFileMetadataParams: (file: RcFile & {
|
|
|
15
15
|
metadata?: MediaMetadata;
|
|
16
16
|
}) => Record<string, any>;
|
|
17
17
|
export declare const isValueEqual: (value: any, fileListValue: any) => boolean;
|
|
18
|
-
export declare const getBaseTime: (size: number) =>
|
|
18
|
+
export declare const getBaseTime: (size: number) => 2000 | 1000 | 4000 | 8000;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
declare const formFieldMap: {
|
|
2
3
|
FormItemCheckbox: import("react").FC<{}> & {
|
|
3
4
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -59,11 +60,7 @@ declare const formFieldMap: {
|
|
|
59
60
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
60
61
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
61
62
|
};
|
|
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
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
67
64
|
JSON: import("react").FC<any>;
|
|
68
65
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
69
66
|
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>;
|
|
@@ -83,7 +80,11 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
|
|
|
83
80
|
name?: string | undefined;
|
|
84
81
|
fieldKey?: string | undefined;
|
|
85
82
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
86
|
-
}) | (import("react").FC<{}> & {
|
|
83
|
+
}) | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
|
|
84
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
85
|
+
} & {
|
|
86
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
87
|
+
}) | 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<{}> & {
|
|
87
88
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
88
89
|
} & {
|
|
89
90
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -95,7 +96,7 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
|
|
|
95
96
|
extraParams?: Record<string, any> | undefined;
|
|
96
97
|
} & {
|
|
97
98
|
dataSource?: any;
|
|
98
|
-
}) => JSX.Element) | import("react").FC<
|
|
99
|
+
}) => JSX.Element) | 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
100
|
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> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./
|
|
101
|
+
} & 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("./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
102
|
export { getFieldComponent, formFieldMap };
|
|
@@ -29,6 +29,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
// src/components/dataSourceComponents/hooks/usePlatform.ts
|
|
30
30
|
var usePlatform_exports = {};
|
|
31
31
|
__export(usePlatform_exports, {
|
|
32
|
+
useIsH5: () => useIsH5,
|
|
33
|
+
useIsPc: () => useIsPc,
|
|
32
34
|
useIsShop: () => useIsShop,
|
|
33
35
|
usePlatform: () => usePlatform
|
|
34
36
|
});
|
|
@@ -44,8 +46,18 @@ var useIsShop = () => {
|
|
|
44
46
|
const platform = usePlatform();
|
|
45
47
|
return platform === "shop";
|
|
46
48
|
};
|
|
49
|
+
var useIsH5 = () => {
|
|
50
|
+
const platform = usePlatform();
|
|
51
|
+
return platform === "h5";
|
|
52
|
+
};
|
|
53
|
+
var useIsPc = () => {
|
|
54
|
+
const platform = usePlatform();
|
|
55
|
+
return platform === "pc";
|
|
56
|
+
};
|
|
47
57
|
// Annotate the CommonJS export names for ESM import in node:
|
|
48
58
|
0 && (module.exports = {
|
|
59
|
+
useIsH5,
|
|
60
|
+
useIsPc,
|
|
49
61
|
useIsShop,
|
|
50
62
|
usePlatform
|
|
51
63
|
});
|
|
@@ -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;
|
|
@@ -17,4 +17,4 @@ export declare const minusSign: (item: any, type?: string) => "" | "-";
|
|
|
17
17
|
* @Author: WangHan
|
|
18
18
|
* @Date: 2024-11-22 10:58
|
|
19
19
|
*/
|
|
20
|
-
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) =>
|
|
20
|
+
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
|
|
@@ -17,4 +17,4 @@ export declare const minusSign: (item: any, type?: string) => "" | "-";
|
|
|
17
17
|
* @Author: WangHan
|
|
18
18
|
* @Date: 2024-11-22 10:58
|
|
19
19
|
*/
|
|
20
|
-
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) =>
|
|
20
|
+
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
|