@aloudata/aloudata-design 2.11.0 → 2.12.1
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/dist/ColorPicker/index.js +8 -4
- package/dist/ConfigProvider/defaultRenderEmpty.js +4 -2
- package/dist/ConfigProvider/index.js +9 -1
- package/dist/DataPreviewTable/components/Body/Error.js +6 -2
- package/dist/DataPreviewTable/index.js +6 -2
- package/dist/DatePicker/index.d.ts +10 -10
- package/dist/DoubleCircleIcon/index.d.ts +1 -1
- package/dist/Dropdown/index.d.ts +9 -0
- package/dist/Dropdown/index.js +6 -3
- package/dist/Empty/index.js +5 -1
- package/dist/HighlightText/index.js +2 -1
- package/dist/InputSearch/index.js +6 -2
- package/dist/List/Item.js +2 -1
- package/dist/MemberPicker/components/MemberSelection.js +6 -2
- package/dist/MemberPicker/components/MultipleOption.js +6 -2
- package/dist/MemberPicker/components/Panel.js +8 -4
- package/dist/MemberPicker/components/PanelWrapper.d.ts +1 -1
- package/dist/MemberPicker/components/PanelWrapper.js +10 -6
- package/dist/MemberPicker/components/SelectedMemberTags.js +6 -2
- package/dist/MemberPicker/components/SelectorFooter.js +7 -3
- package/dist/MemberPicker/components/SingleOption.js +6 -2
- package/dist/MemberPicker/components/UserGroupSelection.js +7 -3
- package/dist/MemberPicker/index.js +35 -31
- package/dist/Modal/index.js +17 -23
- package/dist/OverflowCount/style/index.less +1 -0
- package/dist/Radio/components/Group/index.d.ts +1 -1
- package/dist/Select/index.js +6 -2
- package/dist/Steps/matchMedia.mock.d.ts +1 -0
- package/dist/Steps/matchMedia.mock.js +7 -6
- package/dist/Table/components/ErrorBoundary.d.ts +1 -0
- package/dist/Table/components/ErrorBoundary.js +8 -3
- package/dist/Table/components/Footer/index.js +9 -5
- package/dist/Table/helper.d.ts +1 -1
- package/dist/Tree/Tree.js +9 -5
- package/dist/ald.min.css +1 -1
- package/dist/locale/default.d.ts +59 -2
- package/dist/locale/default.js +18 -2
- package/dist/locale/en_US.d.ts +49 -2
- package/dist/locale/en_US.js +41 -121
- package/dist/locale/zh_CN.d.ts +49 -2
- package/dist/locale/zh_CN.js +41 -120
- package/dist/message/index.js +3 -1
- package/dist/notification/index.js +10 -7
- package/package.json +7 -1
- package/dist/Modal/locale.d.ts +0 -7
- package/dist/Modal/locale.js +0 -18
- package/dist/locale-provider/LocaleReceiver.d.ts +0 -4
- package/dist/locale-provider/LocaleReceiver.js +0 -3
- package/dist/locale-provider/context.d.ts +0 -7
- package/dist/locale-provider/context.js +0 -3
- package/dist/locale-provider/default.d.ts +0 -2
- package/dist/locale-provider/default.js +0 -2
- package/dist/locale-provider/en_US.d.ts +0 -2
- package/dist/locale-provider/en_US.js +0 -2
- package/dist/locale-provider/index.d.ts +0 -65
- package/dist/locale-provider/index.js +0 -80
- package/dist/locale-provider/style/index.d.ts +0 -1
- package/dist/locale-provider/style/index.js +0 -1
- package/dist/locale-provider/style/index.less +0 -2
- package/dist/locale-provider/zh_CN.d.ts +0 -2
- package/dist/locale-provider/zh_CN.js +0 -2
package/dist/locale/default.d.ts
CHANGED
|
@@ -1,2 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Locale } from 'antd/lib/locale';
|
|
3
|
+
export declare enum ELangType {
|
|
4
|
+
ZH_CN = "zh-cn",
|
|
5
|
+
EN = "en"
|
|
6
|
+
}
|
|
7
|
+
export declare const defaultLocale: {
|
|
8
|
+
locale: ELangType;
|
|
9
|
+
};
|
|
10
|
+
export declare const LocaleContext: import("react").Context<Locale>;
|
|
11
|
+
export declare function getTranslator(lang?: string): {
|
|
12
|
+
Empty: {
|
|
13
|
+
noContentFound: string;
|
|
14
|
+
};
|
|
15
|
+
ColorPicker: {
|
|
16
|
+
default: string;
|
|
17
|
+
standardColor: string;
|
|
18
|
+
recentlyUsed: string;
|
|
19
|
+
};
|
|
20
|
+
DataPreviewTable: {
|
|
21
|
+
dataLoadFailed: string;
|
|
22
|
+
loadFailed: string;
|
|
23
|
+
};
|
|
24
|
+
InputSearch: {
|
|
25
|
+
search: string;
|
|
26
|
+
};
|
|
27
|
+
MemberPicker: {
|
|
28
|
+
select: string;
|
|
29
|
+
pleaseConfigGetUserByKeywordsMethod: string;
|
|
30
|
+
pleaseConfigGetUserByIdsMethod: string;
|
|
31
|
+
noData: string;
|
|
32
|
+
subLevel: string;
|
|
33
|
+
users: string;
|
|
34
|
+
userGroups: string;
|
|
35
|
+
selectedTotal: (total: number) => string;
|
|
36
|
+
cancel: string;
|
|
37
|
+
confirm: string;
|
|
38
|
+
};
|
|
39
|
+
Modal: {
|
|
40
|
+
cancel: string;
|
|
41
|
+
sure: string;
|
|
42
|
+
};
|
|
43
|
+
Select: {
|
|
44
|
+
noSearchResult: string;
|
|
45
|
+
all: string;
|
|
46
|
+
};
|
|
47
|
+
Tree: {
|
|
48
|
+
expand: string;
|
|
49
|
+
};
|
|
50
|
+
Table: {
|
|
51
|
+
cancelSelect: string;
|
|
52
|
+
selected: string;
|
|
53
|
+
item: string;
|
|
54
|
+
selectAll: string;
|
|
55
|
+
};
|
|
56
|
+
ErrorBoundary: {
|
|
57
|
+
happenedError: string;
|
|
58
|
+
};
|
|
59
|
+
};
|
package/dist/locale/default.js
CHANGED
|
@@ -1,2 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
import en from "./en_US";
|
|
3
|
+
import zhCN from "./zh_CN";
|
|
4
|
+
export var ELangType = /*#__PURE__*/function (ELangType) {
|
|
5
|
+
ELangType["ZH_CN"] = "zh-cn";
|
|
6
|
+
ELangType["EN"] = "en";
|
|
7
|
+
return ELangType;
|
|
8
|
+
}({});
|
|
9
|
+
export var defaultLocale = {
|
|
10
|
+
locale: ELangType.EN
|
|
11
|
+
};
|
|
12
|
+
export var LocaleContext = /*#__PURE__*/createContext(defaultLocale);
|
|
13
|
+
export function getTranslator(lang) {
|
|
14
|
+
if (lang === ELangType.ZH_CN) {
|
|
15
|
+
return zhCN;
|
|
16
|
+
}
|
|
17
|
+
return en;
|
|
18
|
+
}
|
package/dist/locale/en_US.d.ts
CHANGED
|
@@ -1,3 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare const localeValues: {
|
|
2
|
+
Empty: {
|
|
3
|
+
noContentFound: string;
|
|
4
|
+
};
|
|
5
|
+
ColorPicker: {
|
|
6
|
+
default: string;
|
|
7
|
+
standardColor: string;
|
|
8
|
+
recentlyUsed: string;
|
|
9
|
+
};
|
|
10
|
+
DataPreviewTable: {
|
|
11
|
+
dataLoadFailed: string;
|
|
12
|
+
loadFailed: string;
|
|
13
|
+
};
|
|
14
|
+
InputSearch: {
|
|
15
|
+
search: string;
|
|
16
|
+
};
|
|
17
|
+
MemberPicker: {
|
|
18
|
+
select: string;
|
|
19
|
+
pleaseConfigGetUserByKeywordsMethod: string;
|
|
20
|
+
pleaseConfigGetUserByIdsMethod: string;
|
|
21
|
+
noData: string;
|
|
22
|
+
subLevel: string;
|
|
23
|
+
users: string;
|
|
24
|
+
userGroups: string;
|
|
25
|
+
selectedTotal: (total: number) => string;
|
|
26
|
+
cancel: string;
|
|
27
|
+
confirm: string;
|
|
28
|
+
};
|
|
29
|
+
Modal: {
|
|
30
|
+
cancel: string;
|
|
31
|
+
sure: string;
|
|
32
|
+
};
|
|
33
|
+
Select: {
|
|
34
|
+
noSearchResult: string;
|
|
35
|
+
all: string;
|
|
36
|
+
};
|
|
37
|
+
Tree: {
|
|
38
|
+
expand: string;
|
|
39
|
+
};
|
|
40
|
+
Table: {
|
|
41
|
+
cancelSelect: string;
|
|
42
|
+
selected: string;
|
|
43
|
+
item: string;
|
|
44
|
+
selectAll: string;
|
|
45
|
+
};
|
|
46
|
+
ErrorBoundary: {
|
|
47
|
+
happenedError: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
3
50
|
export default localeValues;
|
package/dist/locale/en_US.js
CHANGED
|
@@ -1,132 +1,52 @@
|
|
|
1
|
-
/* eslint-disable no-template-curly-in-string */
|
|
2
|
-
import Calendar from 'antd/lib/calendar/locale/en_US';
|
|
3
|
-
import DatePicker from 'antd/lib/date-picker/locale/en_US';
|
|
4
|
-
import TimePicker from 'antd/lib/time-picker/locale/en_US';
|
|
5
|
-
import Pagination from 'rc-pagination/lib/locale/en_US';
|
|
6
|
-
var typeTemplate = '${label} is not a valid ${type}';
|
|
7
1
|
var localeValues = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
2
|
+
Empty: {
|
|
3
|
+
noContentFound: 'No Content Found'
|
|
4
|
+
},
|
|
5
|
+
ColorPicker: {
|
|
6
|
+
default: 'Default',
|
|
7
|
+
standardColor: 'Standard Color',
|
|
8
|
+
recentlyUsed: 'Recently Used'
|
|
9
|
+
},
|
|
10
|
+
DataPreviewTable: {
|
|
11
|
+
dataLoadFailed: 'Data loading failed',
|
|
12
|
+
loadFailed: 'Loading failed'
|
|
13
|
+
},
|
|
14
|
+
InputSearch: {
|
|
15
|
+
search: 'Search'
|
|
16
|
+
},
|
|
17
|
+
MemberPicker: {
|
|
18
|
+
select: 'Select',
|
|
19
|
+
pleaseConfigGetUserByKeywordsMethod: 'Please configure the getUsersByKeywords method in ConfigProvider',
|
|
20
|
+
pleaseConfigGetUserByIdsMethod: 'Please configure the getUsersByIds method in ConfigProvider',
|
|
21
|
+
noData: 'No Data',
|
|
22
|
+
subLevel: 'Sub-level',
|
|
23
|
+
users: 'Users',
|
|
24
|
+
userGroups: 'User Groups',
|
|
25
|
+
selectedTotal: function selectedTotal(total) {
|
|
26
|
+
return "Selected ".concat(total);
|
|
27
|
+
},
|
|
28
|
+
cancel: 'Cancel',
|
|
29
|
+
confirm: 'Confirm'
|
|
34
30
|
},
|
|
35
31
|
Modal: {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
justOkText: 'OK'
|
|
39
|
-
},
|
|
40
|
-
Popconfirm: {
|
|
41
|
-
okText: 'OK',
|
|
42
|
-
cancelText: 'Cancel'
|
|
43
|
-
},
|
|
44
|
-
Transfer: {
|
|
45
|
-
titles: ['', ''],
|
|
46
|
-
searchPlaceholder: 'Search here',
|
|
47
|
-
itemUnit: 'item',
|
|
48
|
-
itemsUnit: 'items',
|
|
49
|
-
remove: 'Remove',
|
|
50
|
-
selectCurrent: 'Select current page',
|
|
51
|
-
removeCurrent: 'Remove current page',
|
|
52
|
-
selectAll: 'Select all data',
|
|
53
|
-
removeAll: 'Remove all data',
|
|
54
|
-
selectInvert: 'Invert current page'
|
|
32
|
+
cancel: 'Cancel',
|
|
33
|
+
sure: 'Ok'
|
|
55
34
|
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
uploadError: 'Upload error',
|
|
60
|
-
previewFile: 'Preview file',
|
|
61
|
-
downloadFile: 'Download file'
|
|
35
|
+
Select: {
|
|
36
|
+
noSearchResult: 'No search results',
|
|
37
|
+
all: 'All'
|
|
62
38
|
},
|
|
63
|
-
|
|
64
|
-
description: 'No Data'
|
|
65
|
-
},
|
|
66
|
-
Icon: {
|
|
67
|
-
icon: 'icon'
|
|
68
|
-
},
|
|
69
|
-
Text: {
|
|
70
|
-
edit: 'Edit',
|
|
71
|
-
copy: 'Copy',
|
|
72
|
-
copied: 'Copied',
|
|
39
|
+
Tree: {
|
|
73
40
|
expand: 'Expand'
|
|
74
41
|
},
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
defaultValidateMessages: {
|
|
81
|
-
default: 'Field validation error for ${label}',
|
|
82
|
-
required: 'Please enter ${label}',
|
|
83
|
-
enum: '${label} must be one of [${enum}]',
|
|
84
|
-
whitespace: '${label} cannot be a blank character',
|
|
85
|
-
date: {
|
|
86
|
-
format: '${label} date format is invalid',
|
|
87
|
-
parse: '${label} cannot be converted to a date',
|
|
88
|
-
invalid: '${label} is an invalid date'
|
|
89
|
-
},
|
|
90
|
-
types: {
|
|
91
|
-
string: typeTemplate,
|
|
92
|
-
method: typeTemplate,
|
|
93
|
-
array: typeTemplate,
|
|
94
|
-
object: typeTemplate,
|
|
95
|
-
number: typeTemplate,
|
|
96
|
-
date: typeTemplate,
|
|
97
|
-
boolean: typeTemplate,
|
|
98
|
-
integer: typeTemplate,
|
|
99
|
-
float: typeTemplate,
|
|
100
|
-
regexp: typeTemplate,
|
|
101
|
-
email: typeTemplate,
|
|
102
|
-
url: typeTemplate,
|
|
103
|
-
hex: typeTemplate
|
|
104
|
-
},
|
|
105
|
-
string: {
|
|
106
|
-
len: '${label} must be ${len} characters',
|
|
107
|
-
min: '${label} must be at least ${min} characters',
|
|
108
|
-
max: '${label} must be up to ${max} characters',
|
|
109
|
-
range: '${label} must be between ${min}-${max} characters'
|
|
110
|
-
},
|
|
111
|
-
number: {
|
|
112
|
-
len: '${label} must be equal to ${len}',
|
|
113
|
-
min: '${label} must be minimum ${min}',
|
|
114
|
-
max: '${label} must be maximum ${max}',
|
|
115
|
-
range: '${label} must be between ${min}-${max}'
|
|
116
|
-
},
|
|
117
|
-
array: {
|
|
118
|
-
len: 'Must be ${len} ${label}',
|
|
119
|
-
min: 'At least ${min} ${label}',
|
|
120
|
-
max: 'At most ${max} ${label}',
|
|
121
|
-
range: 'The amount of ${label} must be between ${min}-${max}'
|
|
122
|
-
},
|
|
123
|
-
pattern: {
|
|
124
|
-
mismatch: '${label} does not match the pattern ${pattern}'
|
|
125
|
-
}
|
|
126
|
-
}
|
|
42
|
+
Table: {
|
|
43
|
+
cancelSelect: 'Cancel Selection',
|
|
44
|
+
selected: 'Selected ',
|
|
45
|
+
item: ' items',
|
|
46
|
+
selectAll: 'Select All'
|
|
127
47
|
},
|
|
128
|
-
|
|
129
|
-
|
|
48
|
+
ErrorBoundary: {
|
|
49
|
+
happenedError: 'An error occurred'
|
|
130
50
|
}
|
|
131
51
|
};
|
|
132
52
|
export default localeValues;
|
package/dist/locale/zh_CN.d.ts
CHANGED
|
@@ -1,3 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare const localeValues: {
|
|
2
|
+
Empty: {
|
|
3
|
+
noContentFound: string;
|
|
4
|
+
};
|
|
5
|
+
ColorPicker: {
|
|
6
|
+
default: string;
|
|
7
|
+
standardColor: string;
|
|
8
|
+
recentlyUsed: string;
|
|
9
|
+
};
|
|
10
|
+
DataPreviewTable: {
|
|
11
|
+
dataLoadFailed: string;
|
|
12
|
+
loadFailed: string;
|
|
13
|
+
};
|
|
14
|
+
InputSearch: {
|
|
15
|
+
search: string;
|
|
16
|
+
};
|
|
17
|
+
MemberPicker: {
|
|
18
|
+
select: string;
|
|
19
|
+
pleaseConfigGetUserByKeywordsMethod: string;
|
|
20
|
+
pleaseConfigGetUserByIdsMethod: string;
|
|
21
|
+
noData: string;
|
|
22
|
+
subLevel: string;
|
|
23
|
+
users: string;
|
|
24
|
+
userGroups: string;
|
|
25
|
+
selectedTotal: (total: number) => string;
|
|
26
|
+
cancel: string;
|
|
27
|
+
confirm: string;
|
|
28
|
+
};
|
|
29
|
+
Modal: {
|
|
30
|
+
cancel: string;
|
|
31
|
+
sure: string;
|
|
32
|
+
};
|
|
33
|
+
Select: {
|
|
34
|
+
noSearchResult: string;
|
|
35
|
+
all: string;
|
|
36
|
+
};
|
|
37
|
+
Tree: {
|
|
38
|
+
expand: string;
|
|
39
|
+
};
|
|
40
|
+
Table: {
|
|
41
|
+
cancelSelect: string;
|
|
42
|
+
selected: string;
|
|
43
|
+
item: string;
|
|
44
|
+
selectAll: string;
|
|
45
|
+
};
|
|
46
|
+
ErrorBoundary: {
|
|
47
|
+
happenedError: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
3
50
|
export default localeValues;
|
package/dist/locale/zh_CN.js
CHANGED
|
@@ -1,131 +1,52 @@
|
|
|
1
|
-
/* eslint-disable no-template-curly-in-string */
|
|
2
|
-
import Calendar from 'antd/lib/calendar/locale/zh_CN';
|
|
3
|
-
import DatePicker from 'antd/lib/date-picker/locale/zh_CN';
|
|
4
|
-
import TimePicker from 'antd/lib/time-picker/locale/zh_CN';
|
|
5
|
-
import Pagination from 'rc-pagination/lib/locale/zh_CN';
|
|
6
|
-
var typeTemplate = '${label}不是一个有效的${type}';
|
|
7
1
|
var localeValues = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
2
|
+
Empty: {
|
|
3
|
+
noContentFound: '未找到内容'
|
|
4
|
+
},
|
|
5
|
+
ColorPicker: {
|
|
6
|
+
default: '默认',
|
|
7
|
+
standardColor: '标准色',
|
|
8
|
+
recentlyUsed: '最近使用'
|
|
9
|
+
},
|
|
10
|
+
DataPreviewTable: {
|
|
11
|
+
dataLoadFailed: '数据加载失败',
|
|
12
|
+
loadFailed: '加载失败'
|
|
13
|
+
},
|
|
14
|
+
InputSearch: {
|
|
15
|
+
search: '搜索'
|
|
16
|
+
},
|
|
17
|
+
MemberPicker: {
|
|
18
|
+
select: '选择',
|
|
19
|
+
pleaseConfigGetUserByKeywordsMethod: '请在ConfigProvider中配置getUsersByKeywords方法',
|
|
20
|
+
pleaseConfigGetUserByIdsMethod: '请在ConfigProvider中配置getUsersByIds方法',
|
|
21
|
+
noData: '无数据',
|
|
22
|
+
subLevel: '下级',
|
|
23
|
+
users: '用户',
|
|
24
|
+
userGroups: '用户组',
|
|
25
|
+
selectedTotal: function selectedTotal(total) {
|
|
26
|
+
return "\u5DF2\u9009 ".concat(total);
|
|
27
|
+
},
|
|
28
|
+
cancel: '取消',
|
|
29
|
+
confirm: '确认'
|
|
34
30
|
},
|
|
35
31
|
Modal: {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
justOkText: '知道了'
|
|
39
|
-
},
|
|
40
|
-
Popconfirm: {
|
|
41
|
-
cancelText: '取消',
|
|
42
|
-
okText: '确定'
|
|
43
|
-
},
|
|
44
|
-
Transfer: {
|
|
45
|
-
searchPlaceholder: '请输入搜索内容',
|
|
46
|
-
itemUnit: '项',
|
|
47
|
-
itemsUnit: '项',
|
|
48
|
-
remove: '删除',
|
|
49
|
-
selectCurrent: '全选当页',
|
|
50
|
-
removeCurrent: '删除当页',
|
|
51
|
-
selectAll: '全选所有',
|
|
52
|
-
removeAll: '删除全部',
|
|
53
|
-
selectInvert: '反选当页'
|
|
32
|
+
cancel: '取消',
|
|
33
|
+
sure: '确定'
|
|
54
34
|
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
uploadError: '上传错误',
|
|
59
|
-
previewFile: '预览文件',
|
|
60
|
-
downloadFile: '下载文件'
|
|
35
|
+
Select: {
|
|
36
|
+
noSearchResult: '无搜索结果',
|
|
37
|
+
all: '全部'
|
|
61
38
|
},
|
|
62
|
-
|
|
63
|
-
description: '暂无数据'
|
|
64
|
-
},
|
|
65
|
-
Icon: {
|
|
66
|
-
icon: '图标'
|
|
67
|
-
},
|
|
68
|
-
Text: {
|
|
69
|
-
edit: '编辑',
|
|
70
|
-
copy: '复制',
|
|
71
|
-
copied: '复制成功',
|
|
39
|
+
Tree: {
|
|
72
40
|
expand: '展开'
|
|
73
41
|
},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
defaultValidateMessages: {
|
|
80
|
-
default: '字段验证错误${label}',
|
|
81
|
-
required: '请输入${label}',
|
|
82
|
-
enum: '${label}必须是其中一个[${enum}]',
|
|
83
|
-
whitespace: '${label}不能为空字符',
|
|
84
|
-
date: {
|
|
85
|
-
format: '${label}日期格式无效',
|
|
86
|
-
parse: '${label}不能转换为日期',
|
|
87
|
-
invalid: '${label}是一个无效日期'
|
|
88
|
-
},
|
|
89
|
-
types: {
|
|
90
|
-
string: typeTemplate,
|
|
91
|
-
method: typeTemplate,
|
|
92
|
-
array: typeTemplate,
|
|
93
|
-
object: typeTemplate,
|
|
94
|
-
number: typeTemplate,
|
|
95
|
-
date: typeTemplate,
|
|
96
|
-
boolean: typeTemplate,
|
|
97
|
-
integer: typeTemplate,
|
|
98
|
-
float: typeTemplate,
|
|
99
|
-
regexp: typeTemplate,
|
|
100
|
-
email: typeTemplate,
|
|
101
|
-
url: typeTemplate,
|
|
102
|
-
hex: typeTemplate
|
|
103
|
-
},
|
|
104
|
-
string: {
|
|
105
|
-
len: '${label}须为${len}个字符',
|
|
106
|
-
min: '${label}最少${min}个字符',
|
|
107
|
-
max: '${label}最多${max}个字符',
|
|
108
|
-
range: '${label}须在${min}-${max}字符之间'
|
|
109
|
-
},
|
|
110
|
-
number: {
|
|
111
|
-
len: '${label}必须等于${len}',
|
|
112
|
-
min: '${label}最小值为${min}',
|
|
113
|
-
max: '${label}最大值为${max}',
|
|
114
|
-
range: '${label}须在${min}-${max}之间'
|
|
115
|
-
},
|
|
116
|
-
array: {
|
|
117
|
-
len: '须为${len}个${label}',
|
|
118
|
-
min: '最少${min}个${label}',
|
|
119
|
-
max: '最多${max}个${label}',
|
|
120
|
-
range: '${label}数量须在${min}-${max}之间'
|
|
121
|
-
},
|
|
122
|
-
pattern: {
|
|
123
|
-
mismatch: '${label}与模式不匹配${pattern}'
|
|
124
|
-
}
|
|
125
|
-
}
|
|
42
|
+
Table: {
|
|
43
|
+
cancelSelect: '取消选择',
|
|
44
|
+
selected: '已选',
|
|
45
|
+
item: '个',
|
|
46
|
+
selectAll: '全选'
|
|
126
47
|
},
|
|
127
|
-
|
|
128
|
-
|
|
48
|
+
ErrorBoundary: {
|
|
49
|
+
happenedError: '发生了错误'
|
|
129
50
|
}
|
|
130
51
|
};
|
|
131
52
|
export default localeValues;
|
package/dist/message/index.js
CHANGED
|
@@ -41,8 +41,10 @@ var defaultOptions = {
|
|
|
41
41
|
containerId: 'message-container',
|
|
42
42
|
icon: function icon() {
|
|
43
43
|
return null;
|
|
44
|
-
}
|
|
44
|
+
},
|
|
45
|
+
pauseOnFocusLoss: false // 窗口失焦后不会暂停计时器
|
|
45
46
|
};
|
|
47
|
+
|
|
46
48
|
var getMessage = function getMessage(message, type) {
|
|
47
49
|
return /*#__PURE__*/React.createElement("div", {
|
|
48
50
|
className: "ald-message-content"
|
|
@@ -19,19 +19,22 @@ var closeX = /*#__PURE__*/React.createElement(CloseLLine, {
|
|
|
19
19
|
size: 20,
|
|
20
20
|
color: "#6B7280"
|
|
21
21
|
});
|
|
22
|
+
var DEFAULT_DURATION_TIME = 4500;
|
|
22
23
|
var defaultOptions = {
|
|
23
24
|
closeButton: closeX,
|
|
24
25
|
pauseOnHover: true,
|
|
25
26
|
transition: Slide,
|
|
26
27
|
position: 'top-center',
|
|
27
|
-
autoClose:
|
|
28
|
+
autoClose: DEFAULT_DURATION_TIME,
|
|
28
29
|
hideProgressBar: true,
|
|
29
30
|
closeOnClick: true,
|
|
30
31
|
draggable: false,
|
|
31
32
|
progress: undefined,
|
|
32
33
|
theme: 'light',
|
|
33
|
-
containerId: 'notification-container'
|
|
34
|
+
containerId: 'notification-container',
|
|
35
|
+
pauseOnFocusLoss: false // 窗口失焦后不会暂停计时器
|
|
34
36
|
};
|
|
37
|
+
|
|
35
38
|
var iconMap = {
|
|
36
39
|
info: /*#__PURE__*/React.createElement("div", {
|
|
37
40
|
className: "ald-notification-notice-icon"
|
|
@@ -97,7 +100,7 @@ var notification = {
|
|
|
97
100
|
}, description)), _objectSpread(_objectSpread({
|
|
98
101
|
icon: false
|
|
99
102
|
}, defaultOptions), {}, {
|
|
100
|
-
autoClose: duration ? duration * 1000 :
|
|
103
|
+
autoClose: duration ? duration * 1000 : DEFAULT_DURATION_TIME,
|
|
101
104
|
position: getPosition(placement),
|
|
102
105
|
className: classNames('ald-notification', className)
|
|
103
106
|
}, restConfig));
|
|
@@ -124,7 +127,7 @@ var notification = {
|
|
|
124
127
|
return iconMap.success;
|
|
125
128
|
}
|
|
126
129
|
}, defaultOptions), {}, {
|
|
127
|
-
autoClose: duration ? duration * 1000 :
|
|
130
|
+
autoClose: duration ? duration * 1000 : DEFAULT_DURATION_TIME,
|
|
128
131
|
position: getPosition(placement),
|
|
129
132
|
className: classNames('ald-notification', className)
|
|
130
133
|
}, restConfig));
|
|
@@ -151,7 +154,7 @@ var notification = {
|
|
|
151
154
|
return iconMap.error;
|
|
152
155
|
}
|
|
153
156
|
}, defaultOptions), {}, {
|
|
154
|
-
autoClose: duration ? duration * 1000 :
|
|
157
|
+
autoClose: duration ? duration * 1000 : DEFAULT_DURATION_TIME,
|
|
155
158
|
position: getPosition(placement),
|
|
156
159
|
className: classNames('ald-notification', className)
|
|
157
160
|
}, restConfig));
|
|
@@ -178,7 +181,7 @@ var notification = {
|
|
|
178
181
|
return iconMap.info;
|
|
179
182
|
}
|
|
180
183
|
}, defaultOptions), {}, {
|
|
181
|
-
autoClose: duration ? duration * 1000 :
|
|
184
|
+
autoClose: duration ? duration * 1000 : DEFAULT_DURATION_TIME,
|
|
182
185
|
position: getPosition(placement),
|
|
183
186
|
className: classNames('ald-notification', className)
|
|
184
187
|
}, restConfig));
|
|
@@ -205,7 +208,7 @@ var notification = {
|
|
|
205
208
|
return iconMap.warning;
|
|
206
209
|
}
|
|
207
210
|
}, defaultOptions), {}, {
|
|
208
|
-
autoClose: duration ? duration * 1000 :
|
|
211
|
+
autoClose: duration ? duration * 1000 : DEFAULT_DURATION_TIME,
|
|
209
212
|
position: getPosition(placement),
|
|
210
213
|
className: classNames('ald-notification', className)
|
|
211
214
|
}, restConfig));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aloudata/aloudata-design",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.12.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
"build:minCss": "webpack --mode=production --node-env=production",
|
|
14
14
|
"build:watch": "father dev",
|
|
15
15
|
"cmt": "npx zx ./scripts/createComponentTemplate.mjs",
|
|
16
|
+
"coverage": "sh scripts/coverage.sh",
|
|
17
|
+
"coverage:CI": "export DEVOPS_ENV=CI && sh ./scripts/coverage.sh",
|
|
18
|
+
"coverage:shell": "vitest run --coverage.enabled",
|
|
16
19
|
"dev": "npm run gen:icon && npm run gen:vars && dumi dev",
|
|
17
20
|
"docs:build": "dumi build",
|
|
18
21
|
"doctor": "father doctor",
|
|
@@ -64,6 +67,7 @@
|
|
|
64
67
|
"ahooks": "^3.7.8",
|
|
65
68
|
"antd": "5.4.3",
|
|
66
69
|
"compare-func": "^2.0.0",
|
|
70
|
+
"eslint-plugin-i18n": "^2.3.1",
|
|
67
71
|
"immer": "^10.0.3",
|
|
68
72
|
"memoize-one": "^6.0.0",
|
|
69
73
|
"rc-menu": "^9.8.0",
|
|
@@ -88,6 +92,8 @@
|
|
|
88
92
|
"@types/jest": "^29.4.0",
|
|
89
93
|
"@types/lodash": "^4.14.191",
|
|
90
94
|
"@umijs/lint": "^4.0.0",
|
|
95
|
+
"@vitest/coverage-istanbul": "^0.31.1",
|
|
96
|
+
"@vitest/coverage-v8": "^1.0.4",
|
|
91
97
|
"@webpack-cli/generators": "^3.0.7",
|
|
92
98
|
"autoprefixer": "^10.4.16",
|
|
93
99
|
"babel-jest": "^29.4.2",
|
package/dist/Modal/locale.d.ts
DELETED