@jetlinks-web/components 2.4.12 → 2.4.14
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/es/AMap/Map.js +6 -2
- package/es/ConfigProvider/context.js +3 -0
- package/es/ConfigProvider/index.js +5 -2
- package/es/DragModal/DragModal.js +7 -3
- package/es/EditTable/FormItem.js +1 -1
- package/es/Empty/Empty.js +23 -13
- package/es/FullPage/FullPage.js +1 -1
- package/es/LocaleProvider/index.js +33 -0
- package/es/LocaleReciver/index.js +12 -0
- package/es/ProLayout/PageContainer/index.js +6 -2
- package/es/ProTable/Alert.js +11 -3
- package/es/ProTable/Pagination.js +10 -1
- package/es/ProTable/ProTable.js +8 -8
- package/es/ProTable/setting.js +2 -1
- package/es/RadioButton/RadioButton.js +1 -1
- package/es/Scrollbar/style/index.css +61 -0
- package/es/Scrollbar/style/index.js +1 -0
- package/es/Scrollbar/style/index.less +82 -0
- package/es/Search/Advanced/History.js +10 -6
- package/es/Search/Advanced/SaveHistory.js +15 -11
- package/es/Search/Advanced/index.js +11 -7
- package/es/Search/Item.js +15 -11
- package/es/Search/Search.js +7 -5
- package/es/Search/setting.js +63 -57
- package/es/Search/util.js +4 -4
- package/es/index.js +1 -0
- package/es/locale/en-US.js +77 -0
- package/es/locale/zh-CN.js +77 -0
- package/es/style/index.css +61 -0
- package/es/style/index.less +11 -10
- package/es/style.js +2 -1
- package/lib/AMap/Map.js +6 -2
- package/lib/ConfigProvider/context.js +3 -0
- package/lib/ConfigProvider/index.js +5 -2
- package/lib/DragModal/DragModal.js +7 -3
- package/lib/EditTable/FormItem.js +1 -1
- package/lib/Empty/Empty.js +23 -13
- package/lib/FullPage/FullPage.js +1 -1
- package/lib/LocaleProvider/index.js +33 -0
- package/lib/LocaleReciver/index.js +19 -0
- package/lib/ProLayout/PageContainer/index.js +6 -1
- package/lib/ProTable/Alert.js +11 -3
- package/lib/ProTable/Pagination.js +10 -1
- package/lib/ProTable/ProTable.js +8 -8
- package/lib/ProTable/setting.js +2 -1
- package/lib/RadioButton/RadioButton.js +1 -1
- package/lib/Scrollbar/style/index.css +61 -0
- package/lib/Scrollbar/style/index.js +3 -0
- package/lib/Scrollbar/style/index.less +82 -0
- package/lib/Search/Advanced/History.js +10 -6
- package/lib/Search/Advanced/SaveHistory.js +15 -11
- package/lib/Search/Advanced/index.js +11 -7
- package/lib/Search/Item.js +15 -11
- package/lib/Search/Search.js +7 -5
- package/lib/Search/setting.js +63 -57
- package/lib/Search/util.js +4 -4
- package/lib/index.js +1 -0
- package/lib/locale/en-US.js +83 -0
- package/lib/locale/zh-CN.js +83 -0
- package/lib/style/components.less +1 -0
- package/lib/style/index.css +61 -0
- package/lib/style/index.less +11 -10
- package/lib/style.js +2 -1
- package/package.json +2 -2
package/lib/Search/setting.js
CHANGED
|
@@ -20,64 +20,70 @@ var basicSearch = exports.basicSearch = {
|
|
|
20
20
|
default: 'advanced'
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
var typeOptions = exports.typeOptions =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
23
|
+
var typeOptions = exports.typeOptions = function typeOptions(locale) {
|
|
24
|
+
return [{
|
|
25
|
+
label: locale.setting.or,
|
|
26
|
+
value: 'or'
|
|
27
|
+
}, {
|
|
28
|
+
label: locale.setting.and,
|
|
29
|
+
value: 'and'
|
|
30
|
+
}];
|
|
31
|
+
};
|
|
32
|
+
var TermTypeMap = exports.TermTypeMap = function TermTypeMap(locale) {
|
|
33
|
+
return {
|
|
34
|
+
EQ: {
|
|
35
|
+
label: '=',
|
|
36
|
+
value: 'eq'
|
|
37
|
+
},
|
|
38
|
+
NOT: {
|
|
39
|
+
label: '!=',
|
|
40
|
+
value: 'not'
|
|
41
|
+
},
|
|
42
|
+
LIKE: {
|
|
43
|
+
label: locale.setting.include,
|
|
44
|
+
value: 'like'
|
|
45
|
+
},
|
|
46
|
+
NLIKE: {
|
|
47
|
+
label: locale.setting.exclude,
|
|
48
|
+
value: 'nlike'
|
|
49
|
+
},
|
|
50
|
+
GT: {
|
|
51
|
+
label: '>',
|
|
52
|
+
value: 'gt'
|
|
53
|
+
},
|
|
54
|
+
GTE: {
|
|
55
|
+
label: '>=',
|
|
56
|
+
value: 'gte'
|
|
57
|
+
},
|
|
58
|
+
LT: {
|
|
59
|
+
label: '<',
|
|
60
|
+
value: 'lt'
|
|
61
|
+
},
|
|
62
|
+
LTE: {
|
|
63
|
+
label: '<=',
|
|
64
|
+
value: 'lte'
|
|
65
|
+
},
|
|
66
|
+
IN: {
|
|
67
|
+
label: locale.setting.in,
|
|
68
|
+
value: 'in'
|
|
69
|
+
},
|
|
70
|
+
NIN: {
|
|
71
|
+
label: locale.setting.notIn,
|
|
72
|
+
value: 'nin'
|
|
73
|
+
},
|
|
74
|
+
BTW: {
|
|
75
|
+
label: locale.setting.between,
|
|
76
|
+
value: 'btw'
|
|
77
|
+
},
|
|
78
|
+
NBTW: {
|
|
79
|
+
label: locale.setting.notBetween,
|
|
80
|
+
value: 'nbtw'
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
var termType = exports.termType = function termType(locale) {
|
|
85
|
+
return Object.values(TermTypeMap(locale));
|
|
79
86
|
};
|
|
80
|
-
var termType = exports.termType = Object.values(TermTypeMap);
|
|
81
87
|
var componentType = exports.componentType = {
|
|
82
88
|
input: 'input',
|
|
83
89
|
inputNumber: 'inputNumber',
|
package/lib/Search/util.js
CHANGED
|
@@ -208,12 +208,12 @@ var getTermTypeFn = exports.getTermTypeFn = function getTermTypeFn(type) {
|
|
|
208
208
|
return 'like';
|
|
209
209
|
}
|
|
210
210
|
};
|
|
211
|
-
var getTermTypes = exports.getTermTypes = function getTermTypes(types) {
|
|
212
|
-
return _setting.termType.filter(function (item) {
|
|
211
|
+
var getTermTypes = exports.getTermTypes = function getTermTypes(types, locale) {
|
|
212
|
+
return (0, _setting.termType)(locale).filter(function (item) {
|
|
213
213
|
return types.includes(item.value);
|
|
214
214
|
});
|
|
215
215
|
};
|
|
216
|
-
var getTermOptions = exports.getTermOptions = function getTermOptions(type, column) {
|
|
216
|
+
var getTermOptions = exports.getTermOptions = function getTermOptions(type, column, locale) {
|
|
217
217
|
var keys = [];
|
|
218
218
|
switch (type) {
|
|
219
219
|
case 'select':
|
|
@@ -238,7 +238,7 @@ var getTermOptions = exports.getTermOptions = function getTermOptions(type, colu
|
|
|
238
238
|
// : ['like', 'nlike'];
|
|
239
239
|
break;
|
|
240
240
|
}
|
|
241
|
-
return keys.length ? getTermTypes(keys) : _setting.termType;
|
|
241
|
+
return keys.length ? getTermTypes(keys, locale) : (0, _setting.termType)(locale);
|
|
242
242
|
};
|
|
243
243
|
var termsToValue = exports.termsToValue = function termsToValue(targetItem, searchItems) {
|
|
244
244
|
if (['like', 'nlike'].includes(targetItem.termType) && !!targetItem.value) {
|
package/lib/index.js
CHANGED
|
@@ -25,6 +25,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
25
25
|
/*eslint import/namespace: ['error', { allowComputed: true }]*/
|
|
26
26
|
|
|
27
27
|
var install = exports.install = function install(app) {
|
|
28
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
28
29
|
Object.keys(components).forEach(function (key) {
|
|
29
30
|
var component = components[key];
|
|
30
31
|
if (component.install) {
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _default = exports.default = {
|
|
8
|
+
DragModal: {
|
|
9
|
+
cancel: 'Cancel',
|
|
10
|
+
confirm: 'Confirm'
|
|
11
|
+
},
|
|
12
|
+
Search: {
|
|
13
|
+
search: {
|
|
14
|
+
reset: 'Reset',
|
|
15
|
+
search: 'Search'
|
|
16
|
+
},
|
|
17
|
+
advanced: {
|
|
18
|
+
search: 'Search',
|
|
19
|
+
reset: 'Reset',
|
|
20
|
+
more: 'More',
|
|
21
|
+
saveHistory: {
|
|
22
|
+
searchName: 'search name',
|
|
23
|
+
placeholder: 'Please enter a name',
|
|
24
|
+
ruleName: 'Up to 64 characters',
|
|
25
|
+
save: 'save',
|
|
26
|
+
success: 'Operation successful',
|
|
27
|
+
fail: 'Operation fail'
|
|
28
|
+
},
|
|
29
|
+
history: {
|
|
30
|
+
confirmDelete: 'Confirm Delete?',
|
|
31
|
+
search: 'search'
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
item: {
|
|
35
|
+
firstGroup: 'First',
|
|
36
|
+
secondGroup: 'Second',
|
|
37
|
+
placeholder: 'Please select'
|
|
38
|
+
},
|
|
39
|
+
setting: {
|
|
40
|
+
or: 'Or',
|
|
41
|
+
and: 'And',
|
|
42
|
+
include: 'Include',
|
|
43
|
+
exclude: 'Exclude',
|
|
44
|
+
in: 'In',
|
|
45
|
+
notIn: 'Not in',
|
|
46
|
+
between: 'Between',
|
|
47
|
+
notBetween: 'Not Between'
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
Empty: {
|
|
51
|
+
description: 'No Data'
|
|
52
|
+
},
|
|
53
|
+
ProTable: {
|
|
54
|
+
pagination: {
|
|
55
|
+
total: 'Articles {0} - {1}/Total of {2}'
|
|
56
|
+
},
|
|
57
|
+
alert: {
|
|
58
|
+
cancelChoose: 'Cancel selection',
|
|
59
|
+
selectItem: 'Select {0} items'
|
|
60
|
+
},
|
|
61
|
+
pageContainer: {
|
|
62
|
+
back: 'back'
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
AMap: {
|
|
66
|
+
description: 'Please configure the Amap key for Gaode'
|
|
67
|
+
},
|
|
68
|
+
EditTable: {
|
|
69
|
+
contextMenu: {
|
|
70
|
+
add: 'Add new row',
|
|
71
|
+
copy: 'Copy row',
|
|
72
|
+
paste: 'Paste row',
|
|
73
|
+
detail: 'View details',
|
|
74
|
+
delete: 'delete'
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
ValueItem: {
|
|
78
|
+
placeholder: 'Please enter the link',
|
|
79
|
+
cancel: 'cancel',
|
|
80
|
+
confirm: 'confirm',
|
|
81
|
+
title: 'edit'
|
|
82
|
+
}
|
|
83
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _default = exports.default = {
|
|
8
|
+
DragModal: {
|
|
9
|
+
cancel: '取消',
|
|
10
|
+
confirm: '确定'
|
|
11
|
+
},
|
|
12
|
+
Search: {
|
|
13
|
+
search: {
|
|
14
|
+
reset: '重置',
|
|
15
|
+
search: '搜索'
|
|
16
|
+
},
|
|
17
|
+
advanced: {
|
|
18
|
+
search: '搜索',
|
|
19
|
+
reset: '重置',
|
|
20
|
+
more: '更多筛选',
|
|
21
|
+
saveHistory: {
|
|
22
|
+
searchName: '搜索名称',
|
|
23
|
+
placeholder: '请输入名称',
|
|
24
|
+
ruleName: '最多64个字符',
|
|
25
|
+
save: '保存',
|
|
26
|
+
success: '操作成功',
|
|
27
|
+
fail: '操作失败'
|
|
28
|
+
},
|
|
29
|
+
history: {
|
|
30
|
+
confirmDelete: '确认删除吗?',
|
|
31
|
+
search: '搜索'
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
item: {
|
|
35
|
+
firstGroup: '第一组',
|
|
36
|
+
secondGroup: '第二组',
|
|
37
|
+
placeholder: '请选择'
|
|
38
|
+
},
|
|
39
|
+
setting: {
|
|
40
|
+
or: '或者',
|
|
41
|
+
and: '并且',
|
|
42
|
+
include: '包含',
|
|
43
|
+
exclude: '不包含',
|
|
44
|
+
in: '在...之中',
|
|
45
|
+
notIn: '不在...之中',
|
|
46
|
+
between: '在...之间',
|
|
47
|
+
notBetween: '不在...之间'
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
Empty: {
|
|
51
|
+
description: '暂无数据'
|
|
52
|
+
},
|
|
53
|
+
ProTable: {
|
|
54
|
+
pagination: {
|
|
55
|
+
total: "\u7B2C {0} - {1} \u6761/\u603B\u5171 {2} \u6761"
|
|
56
|
+
},
|
|
57
|
+
alert: {
|
|
58
|
+
cancelChoose: '取消选择',
|
|
59
|
+
selectItem: '已选择 {0} 项'
|
|
60
|
+
},
|
|
61
|
+
pageContainer: {
|
|
62
|
+
back: '返回'
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
AMap: {
|
|
66
|
+
description: '请配置高德地图key'
|
|
67
|
+
},
|
|
68
|
+
EditTable: {
|
|
69
|
+
contextMenu: {
|
|
70
|
+
add: '新增行',
|
|
71
|
+
copy: '复制行',
|
|
72
|
+
paste: '粘贴行',
|
|
73
|
+
detail: '查看详情',
|
|
74
|
+
delete: '删除'
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
ValueItem: {
|
|
78
|
+
placeholder: '请输入链接',
|
|
79
|
+
cancel: '取消',
|
|
80
|
+
confirm: '确定',
|
|
81
|
+
title: '编辑'
|
|
82
|
+
}
|
|
83
|
+
};
|
package/lib/style/index.css
CHANGED
|
@@ -5039,3 +5039,64 @@ span.ant-radio + * {
|
|
|
5039
5039
|
min-height: 50px;
|
|
5040
5040
|
height: 100%;
|
|
5041
5041
|
}
|
|
5042
|
+
.j-scrollbar {
|
|
5043
|
+
overflow: hidden;
|
|
5044
|
+
position: relative;
|
|
5045
|
+
height: 100%;
|
|
5046
|
+
}
|
|
5047
|
+
.j-scrollbar__wrap {
|
|
5048
|
+
overflow: auto;
|
|
5049
|
+
height: 100%;
|
|
5050
|
+
}
|
|
5051
|
+
.j-scrollbar__wrap--hidden-default {
|
|
5052
|
+
scrollbar-width: none;
|
|
5053
|
+
}
|
|
5054
|
+
.j-scrollbar__wrap--hidden-default::-webkit-scrollbar {
|
|
5055
|
+
display: none;
|
|
5056
|
+
}
|
|
5057
|
+
.j-scrollbar__thumb {
|
|
5058
|
+
position: relative;
|
|
5059
|
+
display: block;
|
|
5060
|
+
width: 0;
|
|
5061
|
+
height: 0;
|
|
5062
|
+
cursor: pointer;
|
|
5063
|
+
border-radius: inherit;
|
|
5064
|
+
background-color: #909399;
|
|
5065
|
+
transition: 0.3s background-color;
|
|
5066
|
+
opacity: 0.3;
|
|
5067
|
+
}
|
|
5068
|
+
.j-scrollbar__thumb:hover {
|
|
5069
|
+
background-color: #909399;
|
|
5070
|
+
opacity: 0.5;
|
|
5071
|
+
}
|
|
5072
|
+
.j-scrollbar__bar {
|
|
5073
|
+
position: absolute;
|
|
5074
|
+
right: 2px;
|
|
5075
|
+
bottom: 2px;
|
|
5076
|
+
z-index: 1;
|
|
5077
|
+
border-radius: 4px;
|
|
5078
|
+
}
|
|
5079
|
+
.j-scrollbar__bar--vertical {
|
|
5080
|
+
width: 6px;
|
|
5081
|
+
top: 2px;
|
|
5082
|
+
}
|
|
5083
|
+
.j-scrollbar__bar--vertical > div {
|
|
5084
|
+
width: 100%;
|
|
5085
|
+
}
|
|
5086
|
+
.j-scrollbar__bar--horizontal {
|
|
5087
|
+
height: 6px;
|
|
5088
|
+
left: 2px;
|
|
5089
|
+
}
|
|
5090
|
+
.j-scrollbar__bar--horizontal > div {
|
|
5091
|
+
height: 100%;
|
|
5092
|
+
}
|
|
5093
|
+
.j-scrollbar-fade-enter-active {
|
|
5094
|
+
transition: opacity 340ms ease-out;
|
|
5095
|
+
}
|
|
5096
|
+
.j-scrollbar-fade-leave-active {
|
|
5097
|
+
transition: opacity 120ms ease-out;
|
|
5098
|
+
}
|
|
5099
|
+
.j-scrollbar-fade-enter-from,
|
|
5100
|
+
.j-scrollbar-fade-leave-active {
|
|
5101
|
+
opacity: 0;
|
|
5102
|
+
}
|
package/lib/style/index.less
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
@import '../Ellipsis/style/index.less';
|
|
2
|
-
@import '../CheckButton/style/index.less';
|
|
3
|
-
@import '../ProLayout/style/style.less';
|
|
4
|
-
@import '../ProTable/style/ProTable.less';
|
|
5
|
-
@import '../Search/style/Search.less';
|
|
6
|
-
@import '../Search/style/Item.less';
|
|
7
|
-
@import '../CardSelect/style/index.less';
|
|
8
|
-
@import '../DragModal/style/index.less';
|
|
9
|
-
@import "../EditTable/style/index.less";
|
|
10
|
-
@import "../MonacoEditor/style/index.less";
|
|
1
|
+
@import '../Ellipsis/style/index.less';
|
|
2
|
+
@import '../CheckButton/style/index.less';
|
|
3
|
+
@import '../ProLayout/style/style.less';
|
|
4
|
+
@import '../ProTable/style/ProTable.less';
|
|
5
|
+
@import '../Search/style/Search.less';
|
|
6
|
+
@import '../Search/style/Item.less';
|
|
7
|
+
@import '../CardSelect/style/index.less';
|
|
8
|
+
@import '../DragModal/style/index.less';
|
|
9
|
+
@import "../EditTable/style/index.less";
|
|
10
|
+
@import "../MonacoEditor/style/index.less";
|
|
11
|
+
@import '../Scrollbar/style/index.less';
|
package/lib/style.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetlinks-web/components",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.14",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -152,8 +152,8 @@
|
|
|
152
152
|
"webpack-dev-server": "^4.0.0",
|
|
153
153
|
"webpack-merge": "^5.0.0",
|
|
154
154
|
"webpackbar": "^5.0.2",
|
|
155
|
+
"@jetlinks-web/hooks": "^1.0.21",
|
|
155
156
|
"@jetlinks-web/constants": "^1.0.7",
|
|
156
|
-
"@jetlinks-web/hooks": "^1.0.20",
|
|
157
157
|
"@jetlinks-web/utils": "^1.2.5"
|
|
158
158
|
},
|
|
159
159
|
"publishConfig": {
|