@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
|
@@ -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;
|
|
@@ -20,22 +20,22 @@ import useSetRequest from "../../../../hooks/useSetRequest";
|
|
|
20
20
|
var Option = Select.Option;
|
|
21
21
|
/**
|
|
22
22
|
* 手机号码输入组件
|
|
23
|
-
*
|
|
23
|
+
*
|
|
24
24
|
* 校验规则:
|
|
25
25
|
* 1. AU(+61) 验证规则:
|
|
26
26
|
* - 10位或9位数字
|
|
27
27
|
* - 前两位是04或者第一位是4
|
|
28
28
|
* - 格式示例:0412345678 或 412345678
|
|
29
|
-
*
|
|
29
|
+
*
|
|
30
30
|
* 2. CN(+86) 验证规则:
|
|
31
31
|
* - 11位数字
|
|
32
32
|
* - 第一位必须是1
|
|
33
33
|
* - 格式示例:13812345678
|
|
34
|
-
*
|
|
34
|
+
*
|
|
35
35
|
* 3. 其他国家验证规则:
|
|
36
36
|
* - 15位以内数字
|
|
37
37
|
* - 格式示例:123456789
|
|
38
|
-
*
|
|
38
|
+
*
|
|
39
39
|
* 使用方式:
|
|
40
40
|
* <Mobile
|
|
41
41
|
* name="mobile"
|
|
@@ -65,7 +65,7 @@ var MobileNumberInput = function MobileNumberInput(_ref) {
|
|
|
65
65
|
}
|
|
66
66
|
return propsValue;
|
|
67
67
|
}, [propsValue]);
|
|
68
|
-
var handleChange = function handleChange(prefix, phoneNumber) {
|
|
68
|
+
var handleChange = function handleChange(prefix, phoneNumber, countryCode) {
|
|
69
69
|
if (returnFormat === 'string') {
|
|
70
70
|
// 只有当实际输入的号码部分不为空时,才包含区号
|
|
71
71
|
var newValue = phoneNumber ? "".concat(prefix).concat(phoneNumber) : '';
|
|
@@ -73,7 +73,8 @@ var MobileNumberInput = function MobileNumberInput(_ref) {
|
|
|
73
73
|
} else {
|
|
74
74
|
onChange === null || onChange === void 0 || onChange({
|
|
75
75
|
phone: phoneNumber,
|
|
76
|
-
countryCallingCode: prefix
|
|
76
|
+
countryCallingCode: prefix,
|
|
77
|
+
countryCode: countryCode
|
|
77
78
|
});
|
|
78
79
|
}
|
|
79
80
|
};
|
|
@@ -84,19 +85,29 @@ var MobileNumberInput = function MobileNumberInput(_ref) {
|
|
|
84
85
|
countryCode: 'AU',
|
|
85
86
|
phoneNumber: ''
|
|
86
87
|
};
|
|
87
|
-
var srtValue =
|
|
88
|
+
var srtValue = '';
|
|
88
89
|
if (isString(val)) {
|
|
89
90
|
srtValue = val;
|
|
90
91
|
} else if ('phone' in val) {
|
|
91
|
-
srtValue = "".concat(val.countryCallingCode ||
|
|
92
|
+
srtValue = "".concat(val.countryCallingCode || '').concat(val.phone || '');
|
|
92
93
|
}
|
|
93
|
-
var
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
var matchedContry = null;
|
|
95
|
+
// 如果外部传入了countryCode,则以countryCode为准进行countryCode匹配
|
|
96
|
+
if (!isString(val) && val !== null && val !== void 0 && val.countryCode) {
|
|
97
|
+
matchedContry = countries.find(function (country) {
|
|
98
|
+
return (country === null || country === void 0 ? void 0 : country.code) === (val === null || val === void 0 ? void 0 : val.countryCode);
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
// 如果外部没有传入countryCode或者匹配不到,则以srtValue为准进行prefix匹配
|
|
102
|
+
if (!matchedContry) {
|
|
103
|
+
matchedContry = countries.find(function (country) {
|
|
104
|
+
return srtValue.startsWith(country.prefix);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
if (matchedContry) {
|
|
97
108
|
return {
|
|
98
|
-
countryCode:
|
|
99
|
-
phoneNumber: srtValue.slice(
|
|
109
|
+
countryCode: matchedContry.code,
|
|
110
|
+
phoneNumber: srtValue.slice(matchedContry.prefix.length)
|
|
100
111
|
};
|
|
101
112
|
}
|
|
102
113
|
return {
|
|
@@ -138,9 +149,9 @@ var MobileNumberInput = function MobileNumberInput(_ref) {
|
|
|
138
149
|
var selectedCountry = countries.find(function (c) {
|
|
139
150
|
return c.code === value;
|
|
140
151
|
});
|
|
141
|
-
var prefix = (selectedCountry === null || selectedCountry === void 0 ? void 0 : selectedCountry.prefix) ||
|
|
152
|
+
var prefix = (selectedCountry === null || selectedCountry === void 0 ? void 0 : selectedCountry.prefix) || '';
|
|
142
153
|
// 先更新值
|
|
143
|
-
handleChange(prefix, phoneNumber);
|
|
154
|
+
handleChange(prefix, phoneNumber, selectedCountry === null || selectedCountry === void 0 ? void 0 : selectedCountry.code);
|
|
144
155
|
|
|
145
156
|
// 使用 setTimeout 确保值更新后再触发验证
|
|
146
157
|
setTimeout(function () {
|
|
@@ -160,8 +171,8 @@ var MobileNumberInput = function MobileNumberInput(_ref) {
|
|
|
160
171
|
var selectedCountry = countries.find(function (c) {
|
|
161
172
|
return c.code === countryCode;
|
|
162
173
|
});
|
|
163
|
-
var prefix = (selectedCountry === null || selectedCountry === void 0 ? void 0 : selectedCountry.prefix) ||
|
|
164
|
-
handleChange(prefix, cleanNumber);
|
|
174
|
+
var prefix = (selectedCountry === null || selectedCountry === void 0 ? void 0 : selectedCountry.prefix) || '';
|
|
175
|
+
handleChange(prefix, cleanNumber, selectedCountry === null || selectedCountry === void 0 ? void 0 : selectedCountry.code);
|
|
165
176
|
|
|
166
177
|
// 如果号码为空,只清除校验信息,不重置国家代码
|
|
167
178
|
if (!cleanNumber) {
|
|
@@ -182,19 +193,20 @@ var MobileNumberInput = function MobileNumberInput(_ref) {
|
|
|
182
193
|
return c.code === countryCode;
|
|
183
194
|
});
|
|
184
195
|
if (phoneNumber.length === 0) {
|
|
185
|
-
return
|
|
196
|
+
return '';
|
|
186
197
|
}
|
|
187
|
-
var prefix = (selectedCountry === null || selectedCountry === void 0 ? void 0 : selectedCountry.prefix) ||
|
|
198
|
+
var prefix = (selectedCountry === null || selectedCountry === void 0 ? void 0 : selectedCountry.prefix) || '';
|
|
188
199
|
return "".concat(prefix).concat(phoneNumber);
|
|
189
200
|
}, [countryCode, phoneNumber, countries]);
|
|
190
201
|
var objValue = useMemo(function () {
|
|
191
202
|
var selectedCountry = countries.find(function (c) {
|
|
192
203
|
return c.code === countryCode;
|
|
193
204
|
});
|
|
194
|
-
var prefix = (selectedCountry === null || selectedCountry === void 0 ? void 0 : selectedCountry.prefix) ||
|
|
205
|
+
var prefix = (selectedCountry === null || selectedCountry === void 0 ? void 0 : selectedCountry.prefix) || '';
|
|
195
206
|
return {
|
|
196
|
-
phone: phoneNumber ||
|
|
197
|
-
countryCallingCode: prefix
|
|
207
|
+
phone: phoneNumber || '',
|
|
208
|
+
countryCallingCode: prefix,
|
|
209
|
+
countryCode: countryCode
|
|
198
210
|
};
|
|
199
211
|
}, [countryCode, phoneNumber, countries]);
|
|
200
212
|
var handleBlur = function handleBlur() {
|
|
@@ -10,7 +10,7 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|
|
10
10
|
import { useEffect, useMemo } from 'react';
|
|
11
11
|
import { useRequest } from 'ahooks';
|
|
12
12
|
import { request } from "../../../table/utils";
|
|
13
|
-
import { useIsShop } from "../../hooks/usePlatform";
|
|
13
|
+
import { useIsShop, useIsH5, useIsPc } from "../../hooks/usePlatform";
|
|
14
14
|
import useEngineContext from "../../../../hooks/useEngineContext";
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -27,7 +27,7 @@ export var getCountryDataList = /*#__PURE__*/function () {
|
|
|
27
27
|
isNocobase: true,
|
|
28
28
|
fullResult: true,
|
|
29
29
|
headers: {
|
|
30
|
-
|
|
30
|
+
'x-data-source': 'pisell2'
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
33
|
case 2:
|
|
@@ -50,6 +50,8 @@ export var getCountryDataList = /*#__PURE__*/function () {
|
|
|
50
50
|
}();
|
|
51
51
|
export var useCountries = function useCountries() {
|
|
52
52
|
var isShop = useIsShop();
|
|
53
|
+
var isH5 = useIsH5();
|
|
54
|
+
var isPc = useIsPc();
|
|
53
55
|
var _useEngineContext = useEngineContext(),
|
|
54
56
|
appHelper = _useEngineContext.appHelper;
|
|
55
57
|
var _useRequest = useRequest(getCountryDataList, {
|
|
@@ -78,6 +80,16 @@ export var useCountries = function useCountries() {
|
|
|
78
80
|
});
|
|
79
81
|
});
|
|
80
82
|
}
|
|
83
|
+
} else if (isH5 || isPc) {
|
|
84
|
+
var _appHelper$utils2;
|
|
85
|
+
var _codeList = appHelper === null || appHelper === void 0 || (_appHelper$utils2 = appHelper.utils) === null || _appHelper$utils2 === void 0 || (_appHelper$utils2 = _appHelper$utils2.store) === null || _appHelper$utils2 === void 0 || (_appHelper$utils2 = _appHelper$utils2.getState()) === null || _appHelper$utils2 === void 0 || (_appHelper$utils2 = _appHelper$utils2.country) === null || _appHelper$utils2 === void 0 ? void 0 : _appHelper$utils2.country;
|
|
86
|
+
if (_codeList) {
|
|
87
|
+
return _codeList.map(function (item) {
|
|
88
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
89
|
+
prefix: "+".concat(item.calling_code)
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
}
|
|
81
93
|
}
|
|
82
94
|
return data;
|
|
83
95
|
}, [isShop, data]);
|
|
@@ -29,10 +29,11 @@ var Upload = withFormItem(UploadWithMode, {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
+
return {
|
|
33
|
+
rules: [].concat(_toConsumableArray((others === null || others === void 0 ? void 0 : others.rules) || []), [rule])
|
|
34
|
+
};
|
|
32
35
|
}
|
|
33
|
-
return {
|
|
34
|
-
rules: [].concat(_toConsumableArray((others === null || others === void 0 ? void 0 : others.rules) || []), [rule])
|
|
35
|
-
};
|
|
36
|
+
return {};
|
|
36
37
|
}
|
|
37
38
|
});
|
|
38
39
|
export 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 };
|
|
@@ -9,4 +9,12 @@ var useIsShop = function useIsShop() {
|
|
|
9
9
|
var platform = usePlatform();
|
|
10
10
|
return platform === 'shop';
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
var useIsH5 = function useIsH5() {
|
|
13
|
+
var platform = usePlatform();
|
|
14
|
+
return platform === 'h5';
|
|
15
|
+
};
|
|
16
|
+
var useIsPc = function useIsPc() {
|
|
17
|
+
var platform = usePlatform();
|
|
18
|
+
return platform === 'pc';
|
|
19
|
+
};
|
|
20
|
+
export { usePlatform, useIsShop, useIsH5, useIsPc };
|
|
@@ -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;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const fieldMaps: {
|
|
2
3
|
text: {
|
|
3
4
|
field: {
|
|
@@ -197,12 +198,12 @@ export declare const fieldList: ({
|
|
|
197
198
|
field_icon: string;
|
|
198
199
|
field_name: string;
|
|
199
200
|
field_type: string;
|
|
200
|
-
default_value:
|
|
201
|
+
default_value: string;
|
|
201
202
|
} | {
|
|
202
203
|
field_icon: string;
|
|
203
204
|
field_name: string;
|
|
204
205
|
field_type: string;
|
|
205
|
-
default_value:
|
|
206
|
+
default_value: boolean;
|
|
206
207
|
} | {
|
|
207
208
|
field_icon: string;
|
|
208
209
|
field_name: string;
|