@pisell/materials 1.0.786 → 1.0.788
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/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +2 -2
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +2 -2
- package/es/components/Pagination/index.d.ts +1 -1
- package/es/components/appVersionControl/index.d.ts +1 -0
- package/es/components/colorPicker/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +10 -10
- package/es/components/drag-sort-tree/index.d.ts +1 -0
- 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/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/productCard/components/Time/components/SelectHolder/index.less +1 -3
- package/es/components/productCard/components/Time/components/SelectResource/index.d.ts +1 -0
- package/es/components/productCard/components/Time/components/SelectResource/index.js +3 -2
- package/es/components/productCard/components/Time/index.d.ts +1 -0
- package/es/components/productCard/locales.d.ts +3 -0
- package/es/components/productCard/locales.js +9 -0
- package/es/components/productCard/utils.js +12 -2
- package/es/components/table/Actions/component/ExportImport/index.d.ts +1 -0
- package/es/components/table/Table/SelectField/index.d.ts +0 -1
- package/es/components/table/Table/tableConfig/summary/index.d.ts +0 -1
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/Pagination/index.d.ts +1 -1
- package/lib/components/appVersionControl/index.d.ts +1 -0
- package/lib/components/colorPicker/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +10 -10
- package/lib/components/drag-sort-tree/index.d.ts +1 -0
- 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/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/productCard/components/Time/components/SelectHolder/index.less +1 -3
- package/lib/components/productCard/components/Time/components/SelectResource/index.d.ts +1 -0
- package/lib/components/productCard/components/Time/components/SelectResource/index.js +25 -19
- package/lib/components/productCard/components/Time/index.d.ts +1 -0
- package/lib/components/productCard/locales.d.ts +3 -0
- package/lib/components/productCard/locales.js +6 -3
- package/lib/components/productCard/utils.js +12 -3
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +1 -0
- package/lib/components/table/Table/SelectField/index.d.ts +0 -1
- package/lib/components/table/Table/tableConfig/summary/index.d.ts +0 -1
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/utils/platform.d.ts +1 -1
- package/package.json +3 -3
|
@@ -5,7 +5,7 @@ export declare const paginationConfig: {
|
|
|
5
5
|
className: string;
|
|
6
6
|
defaultCurrent: number;
|
|
7
7
|
showTotal: (total: number, range: [number, number]) => string;
|
|
8
|
-
itemRender: (page: number, type: "
|
|
8
|
+
itemRender: (page: number, type: "next" | "page" | "prev" | "jump-prev" | "jump-next", element: React.ReactNode) => React.ReactNode;
|
|
9
9
|
responsive: boolean;
|
|
10
10
|
size: string;
|
|
11
11
|
};
|
|
@@ -43,7 +43,7 @@ export declare const withDataSource: <P extends unknown>(WrappedComponent: React
|
|
|
43
43
|
}) => JSX.Element;
|
|
44
44
|
export declare const withOptions: <P extends unknown>(WrappedComponent: React.ComponentType<P>) => (props: P & {
|
|
45
45
|
options?: any;
|
|
46
|
-
optionSourceType?: "
|
|
46
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
47
47
|
labelField: string;
|
|
48
48
|
valueField: string;
|
|
49
49
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -70,7 +70,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
70
70
|
useCustomAction: boolean;
|
|
71
71
|
actionType: string;
|
|
72
72
|
openMode: "modal" | "drawer";
|
|
73
|
-
openContentSize: "small" | "
|
|
73
|
+
openContentSize: "small" | "middle" | "large";
|
|
74
74
|
openTitle: string;
|
|
75
75
|
key: string;
|
|
76
76
|
} | undefined;
|
|
@@ -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;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare const SelectWithDataSource: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps & {
|
|
3
3
|
options?: any;
|
|
4
|
-
optionSourceType?: "
|
|
4
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
5
5
|
labelField: string;
|
|
6
6
|
valueField: string;
|
|
7
7
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -20,7 +20,7 @@ declare const formFieldMap: {
|
|
|
20
20
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
21
21
|
onChange: (value: string) => void;
|
|
22
22
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
23
|
-
rootDomain: "custom" | "
|
|
23
|
+
rootDomain: "custom" | "saas" | "xzero";
|
|
24
24
|
customDomain?: string | undefined;
|
|
25
25
|
value?: string | undefined;
|
|
26
26
|
tenantId: string;
|
|
@@ -35,7 +35,7 @@ declare const formFieldMap: {
|
|
|
35
35
|
};
|
|
36
36
|
FormItemSelect: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
37
37
|
options?: any;
|
|
38
|
-
optionSourceType?: "
|
|
38
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
39
39
|
labelField: string;
|
|
40
40
|
valueField: string;
|
|
41
41
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -60,11 +60,13 @@ declare const formFieldMap: {
|
|
|
60
60
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
61
61
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
62
62
|
};
|
|
63
|
-
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<import("./
|
|
63
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
64
64
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
65
65
|
} & {
|
|
66
66
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
67
|
-
}) | 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> |
|
|
67
|
+
}) | 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("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & 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").InputProps & {
|
|
68
|
+
onChange: (value: string) => void;
|
|
69
|
+
} & 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("./Input/type").InputProps> & {
|
|
68
70
|
JSON: import("react").FC<any>;
|
|
69
71
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
70
72
|
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>;
|
|
@@ -77,26 +79,24 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
77
79
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
78
80
|
onChange: (value: string) => void;
|
|
79
81
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
80
|
-
rootDomain: "custom" | "
|
|
82
|
+
rootDomain: "custom" | "saas" | "xzero";
|
|
81
83
|
customDomain?: string | undefined;
|
|
82
84
|
value?: string | undefined;
|
|
83
85
|
tenantId: string;
|
|
84
86
|
name?: string | undefined;
|
|
85
87
|
fieldKey?: string | undefined;
|
|
86
88
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
87
|
-
}) | (import("react").FC<{}> & {
|
|
89
|
+
}) | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
88
90
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
89
91
|
} & {
|
|
90
92
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
91
93
|
}) | ((props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
92
94
|
options?: any;
|
|
93
|
-
optionSourceType?: "
|
|
95
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
94
96
|
labelField: string;
|
|
95
97
|
valueField: string;
|
|
96
98
|
extraParams?: Record<string, any> | undefined;
|
|
97
99
|
} & {
|
|
98
100
|
dataSource?: any;
|
|
99
|
-
}) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./
|
|
100
|
-
onChange: (value: string) => void;
|
|
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
|
+
}) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | 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>;
|
|
102
102
|
export { getFieldComponent, formFieldMap };
|
|
@@ -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) => string | number;
|
|
@@ -12,7 +12,7 @@ import React, { useCallback, useEffect, useState, useMemo } from 'react';
|
|
|
12
12
|
import AlertTriangle from '@pisell/icon/es/AlertTriangle';
|
|
13
13
|
import { locales } from '@pisell/utils';
|
|
14
14
|
import { Select } from 'antd';
|
|
15
|
-
import { isArr } from
|
|
15
|
+
import { isArr } from '@pisell/utils';
|
|
16
16
|
import "./index.less";
|
|
17
17
|
var SelectResource = function SelectResource(_ref) {
|
|
18
18
|
var lists = _ref.lists,
|
|
@@ -110,7 +110,8 @@ var SelectResource = function SelectResource(_ref) {
|
|
|
110
110
|
overflow: 'hidden'
|
|
111
111
|
},
|
|
112
112
|
value: selectedValue,
|
|
113
|
-
onChange: handleChange
|
|
113
|
+
onChange: handleChange,
|
|
114
|
+
placeholder: locales.getText('pisell2.product.card.add.holder.placeholder')('')
|
|
114
115
|
}, renderOptions()), isError ? /*#__PURE__*/React.createElement("div", {
|
|
115
116
|
className: "pisell-lowcode-product-select-resource-error"
|
|
116
117
|
}, locales.getText('pisell2.product.card.add.holder.placeholder')(resourceErrorText)) : null);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import './index.less';
|
|
2
3
|
declare const Time: ({ item, isShowHolder, onLike, isShowChangeResource, changeResource, changeHolder, isShowChangeHolder, holderMode, onAddHolder, isShowAddHolderButton, onClearHolder, onClearResource, }: any) => JSX.Element | null;
|
|
3
4
|
export default Time;
|
|
@@ -15,6 +15,7 @@ declare const _default: {
|
|
|
15
15
|
'pisell2.product.card.view-less': string;
|
|
16
16
|
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
17
17
|
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
18
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
18
19
|
};
|
|
19
20
|
'zh-CN': {
|
|
20
21
|
'pisell2.product.card.day': (val: number) => string;
|
|
@@ -32,6 +33,7 @@ declare const _default: {
|
|
|
32
33
|
'pisell2.product.card.view-less': string;
|
|
33
34
|
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
34
35
|
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
36
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
35
37
|
};
|
|
36
38
|
'zh-HK': {
|
|
37
39
|
'pisell2.product.card.day': (val: number) => string;
|
|
@@ -49,6 +51,7 @@ declare const _default: {
|
|
|
49
51
|
'pisell2.product.card.view-less': string;
|
|
50
52
|
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
51
53
|
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
54
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
52
55
|
};
|
|
53
56
|
};
|
|
54
57
|
export default _default;
|
|
@@ -24,6 +24,9 @@ export default {
|
|
|
24
24
|
},
|
|
25
25
|
'pisell2.product.card.add.holder.placeholder': function pisell2ProductCardAddHolderPlaceholder(val) {
|
|
26
26
|
return "Please select ".concat(val || '');
|
|
27
|
+
},
|
|
28
|
+
'pisell2.product.card.hour.minute': function pisell2ProductCardHourMinute(hour, minute) {
|
|
29
|
+
return "".concat(hour > 0 ? "".concat(hour, "h ") : '').concat(minute > 0 ? "".concat(minute, "min") : '');
|
|
27
30
|
}
|
|
28
31
|
},
|
|
29
32
|
'zh-CN': {
|
|
@@ -51,6 +54,9 @@ export default {
|
|
|
51
54
|
},
|
|
52
55
|
'pisell2.product.card.add.holder.placeholder': function pisell2ProductCardAddHolderPlaceholder(val) {
|
|
53
56
|
return "\u8BF7\u9009\u62E9".concat(val || '');
|
|
57
|
+
},
|
|
58
|
+
'pisell2.product.card.hour.minute': function pisell2ProductCardHourMinute(hour, minute) {
|
|
59
|
+
return "".concat(hour > 0 ? "".concat(hour, "\u5C0F\u65F6") : '').concat(minute > 0 ? "".concat(minute, "\u5206\u949F") : '');
|
|
54
60
|
}
|
|
55
61
|
},
|
|
56
62
|
'zh-HK': {
|
|
@@ -78,6 +84,9 @@ export default {
|
|
|
78
84
|
},
|
|
79
85
|
'pisell2.product.card.add.holder.placeholder': function pisell2ProductCardAddHolderPlaceholder(val) {
|
|
80
86
|
return "\u8ACB\u9078\u64C7".concat(val || '');
|
|
87
|
+
},
|
|
88
|
+
'pisell2.product.card.hour.minute': function pisell2ProductCardHourMinute(hour, minute) {
|
|
89
|
+
return "".concat(hour > 0 ? "".concat(hour, "\u5C0F\u6642") : '').concat(minute > 0 ? "".concat(minute, "\u5206\u9418") : '');
|
|
81
90
|
}
|
|
82
91
|
}
|
|
83
92
|
};
|
|
@@ -99,8 +99,18 @@ export var getServiceTime = function getServiceTime(item, currentDate) {
|
|
|
99
99
|
var startDateTime = "".concat(startDate.format('YYYY-MM-DD'), " ").concat(startTime);
|
|
100
100
|
var endDateTime = "".concat(endDate.format('YYYY-MM-DD'), " ").concat(endTime);
|
|
101
101
|
var _duration = dayjs(endDateTime).diff(dayjs(startDateTime), item === null || item === void 0 ? void 0 : item.duration_type);
|
|
102
|
-
var
|
|
103
|
-
|
|
102
|
+
var durationText = '';
|
|
103
|
+
if ((item === null || item === void 0 ? void 0 : item.duration_type) === 'minutes') {
|
|
104
|
+
// 转为小时+分钟
|
|
105
|
+
var hours = Math.floor(_duration / 60);
|
|
106
|
+
var minutes = _duration % 60;
|
|
107
|
+
durationText = locales.getText('pisell2.product.card.hour.minute')(hours, minutes);
|
|
108
|
+
} else if ((item === null || item === void 0 ? void 0 : item.duration_type) === 'days') {
|
|
109
|
+
durationText = locales.getText('pisell2.product.card.day')(_duration);
|
|
110
|
+
} else {
|
|
111
|
+
durationText = "".concat(_duration);
|
|
112
|
+
}
|
|
113
|
+
return "".concat(dateTime, " (").concat(durationText, ")");
|
|
104
114
|
}
|
|
105
115
|
var _format = isEn ? 'ddd, DD/MM/YYYY' : 'YYYY-MM-DD,ddd';
|
|
106
116
|
|
|
@@ -167,7 +167,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
|
|
|
167
167
|
sort?: SortType | undefined;
|
|
168
168
|
mode: "" | "localStorage" | "remote";
|
|
169
169
|
currentViewMode: ModeType;
|
|
170
|
-
}) => ("
|
|
170
|
+
}) => ("order_by" | "group_by" | "column_setting" | "gallery_setting" | "filter_setting" | "view_mode")[];
|
|
171
171
|
export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
|
|
172
172
|
export declare const stringify: (obj: Record<string, any>) => string;
|
|
173
173
|
export {};
|
package/es/utils/platform.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const isMobile: () =>
|
|
1
|
+
export declare const isMobile: () => boolean;
|
|
@@ -5,7 +5,7 @@ export declare const paginationConfig: {
|
|
|
5
5
|
className: string;
|
|
6
6
|
defaultCurrent: number;
|
|
7
7
|
showTotal: (total: number, range: [number, number]) => string;
|
|
8
|
-
itemRender: (page: number, type: "
|
|
8
|
+
itemRender: (page: number, type: "next" | "page" | "prev" | "jump-prev" | "jump-next", element: React.ReactNode) => React.ReactNode;
|
|
9
9
|
responsive: boolean;
|
|
10
10
|
size: string;
|
|
11
11
|
};
|
|
@@ -43,7 +43,7 @@ export declare const withDataSource: <P extends unknown>(WrappedComponent: React
|
|
|
43
43
|
}) => JSX.Element;
|
|
44
44
|
export declare const withOptions: <P extends unknown>(WrappedComponent: React.ComponentType<P>) => (props: P & {
|
|
45
45
|
options?: any;
|
|
46
|
-
optionSourceType?: "
|
|
46
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
47
47
|
labelField: string;
|
|
48
48
|
valueField: string;
|
|
49
49
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -70,7 +70,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
70
70
|
useCustomAction: boolean;
|
|
71
71
|
actionType: string;
|
|
72
72
|
openMode: "modal" | "drawer";
|
|
73
|
-
openContentSize: "small" | "
|
|
73
|
+
openContentSize: "small" | "middle" | "large";
|
|
74
74
|
openTitle: string;
|
|
75
75
|
key: string;
|
|
76
76
|
} | undefined;
|
|
@@ -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;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare const SelectWithDataSource: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps & {
|
|
3
3
|
options?: any;
|
|
4
|
-
optionSourceType?: "
|
|
4
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
5
5
|
labelField: string;
|
|
6
6
|
valueField: string;
|
|
7
7
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -20,7 +20,7 @@ declare const formFieldMap: {
|
|
|
20
20
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
21
21
|
onChange: (value: string) => void;
|
|
22
22
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
23
|
-
rootDomain: "custom" | "
|
|
23
|
+
rootDomain: "custom" | "saas" | "xzero";
|
|
24
24
|
customDomain?: string | undefined;
|
|
25
25
|
value?: string | undefined;
|
|
26
26
|
tenantId: string;
|
|
@@ -35,7 +35,7 @@ declare const formFieldMap: {
|
|
|
35
35
|
};
|
|
36
36
|
FormItemSelect: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
37
37
|
options?: any;
|
|
38
|
-
optionSourceType?: "
|
|
38
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
39
39
|
labelField: string;
|
|
40
40
|
valueField: string;
|
|
41
41
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -60,11 +60,13 @@ declare const formFieldMap: {
|
|
|
60
60
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
61
61
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
62
62
|
};
|
|
63
|
-
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<import("./
|
|
63
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
64
64
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
65
65
|
} & {
|
|
66
66
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
67
|
-
}) | 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> |
|
|
67
|
+
}) | 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("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & 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").InputProps & {
|
|
68
|
+
onChange: (value: string) => void;
|
|
69
|
+
} & 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("./Input/type").InputProps> & {
|
|
68
70
|
JSON: import("react").FC<any>;
|
|
69
71
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
70
72
|
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>;
|
|
@@ -77,26 +79,24 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
77
79
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
78
80
|
onChange: (value: string) => void;
|
|
79
81
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
80
|
-
rootDomain: "custom" | "
|
|
82
|
+
rootDomain: "custom" | "saas" | "xzero";
|
|
81
83
|
customDomain?: string | undefined;
|
|
82
84
|
value?: string | undefined;
|
|
83
85
|
tenantId: string;
|
|
84
86
|
name?: string | undefined;
|
|
85
87
|
fieldKey?: string | undefined;
|
|
86
88
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
87
|
-
}) | (import("react").FC<{}> & {
|
|
89
|
+
}) | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
88
90
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
89
91
|
} & {
|
|
90
92
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
91
93
|
}) | ((props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
92
94
|
options?: any;
|
|
93
|
-
optionSourceType?: "
|
|
95
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
94
96
|
labelField: string;
|
|
95
97
|
valueField: string;
|
|
96
98
|
extraParams?: Record<string, any> | undefined;
|
|
97
99
|
} & {
|
|
98
100
|
dataSource?: any;
|
|
99
|
-
}) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./
|
|
100
|
-
onChange: (value: string) => void;
|
|
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
|
+
}) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | 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>;
|
|
102
102
|
export { getFieldComponent, formFieldMap };
|
|
@@ -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) => string | number;
|
|
@@ -67,25 +67,28 @@ var SelectResource = ({
|
|
|
67
67
|
return /* @__PURE__ */ import_react.default.createElement(import_antd.Select.Option, { value: d.id, key: d.id, ...d || {} }, /* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px" } }, /* @__PURE__ */ import_react.default.createElement("span", null, d["label"]), (d == null ? void 0 : d.isError) ? /* @__PURE__ */ import_react.default.createElement(import_AlertTriangle.default, { style: { color: "#b42318", cursor: "pointer" } }) : null));
|
|
68
68
|
});
|
|
69
69
|
}, [lists]);
|
|
70
|
-
const handleChange = (0, import_react.useCallback)(
|
|
71
|
-
|
|
72
|
-
if (
|
|
73
|
-
|
|
70
|
+
const handleChange = (0, import_react.useCallback)(
|
|
71
|
+
(val) => {
|
|
72
|
+
if (["multiple", "tags"].includes(resourceMode) && maxLength) {
|
|
73
|
+
if (value && value.length >= maxLength && val.length > value.length) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
74
76
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
77
|
+
setSelectedValue(val);
|
|
78
|
+
if (props.isParallelResource) {
|
|
79
|
+
const valueArray = (0, import_utils2.isArr)(val) ? val : [val];
|
|
80
|
+
return onChange({
|
|
81
|
+
value: valueArray,
|
|
82
|
+
options: valueArray.map((v) => resourceMap[v]),
|
|
83
|
+
resourceMode,
|
|
84
|
+
props
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
const item = resourceMap[val];
|
|
88
|
+
onChange(item);
|
|
89
|
+
},
|
|
90
|
+
[resourceMode, maxLength, value, onChange, props, resourceMap]
|
|
91
|
+
);
|
|
89
92
|
const isError = (0, import_react.useMemo)(() => {
|
|
90
93
|
if (!selectedValue && isErrorResource) return true;
|
|
91
94
|
}, [selectedValue, isErrorResource]);
|
|
@@ -105,7 +108,10 @@ var SelectResource = ({
|
|
|
105
108
|
onClick: (e) => e.stopPropagation(),
|
|
106
109
|
style: { flex: 1, overflow: "hidden" },
|
|
107
110
|
value: selectedValue,
|
|
108
|
-
onChange: handleChange
|
|
111
|
+
onChange: handleChange,
|
|
112
|
+
placeholder: import_utils.locales.getText(
|
|
113
|
+
"pisell2.product.card.add.holder.placeholder"
|
|
114
|
+
)("")
|
|
109
115
|
},
|
|
110
116
|
renderOptions()
|
|
111
117
|
),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import './index.less';
|
|
2
3
|
declare const Time: ({ item, isShowHolder, onLike, isShowChangeResource, changeResource, changeHolder, isShowChangeHolder, holderMode, onAddHolder, isShowAddHolderButton, onClearHolder, onClearResource, }: any) => JSX.Element | null;
|
|
3
4
|
export default Time;
|