@jetlinks-web/components 2.4.13 → 2.4.15

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.
Files changed (60) hide show
  1. package/es/AMap/Map.js +6 -2
  2. package/es/ConfigProvider/context.js +3 -0
  3. package/es/ConfigProvider/index.js +5 -2
  4. package/es/DragModal/DragModal.js +7 -3
  5. package/es/EditTable/FormItem.js +1 -1
  6. package/es/Empty/Empty.js +23 -13
  7. package/es/FullPage/FullPage.js +1 -1
  8. package/es/LocaleProvider/index.js +44 -0
  9. package/es/LocaleReciver/index.js +12 -0
  10. package/es/ProLayout/PageContainer/index.js +6 -2
  11. package/es/ProTable/Alert.js +11 -3
  12. package/es/ProTable/Pagination.js +10 -1
  13. package/es/RadioButton/RadioButton.js +1 -1
  14. package/es/Scrollbar/style/index.css +61 -0
  15. package/es/Scrollbar/style/index.js +1 -0
  16. package/es/Scrollbar/style/index.less +82 -0
  17. package/es/Search/Advanced/History.js +10 -6
  18. package/es/Search/Advanced/SaveHistory.js +15 -11
  19. package/es/Search/Advanced/index.js +11 -7
  20. package/es/Search/Item.js +15 -11
  21. package/es/Search/Search.js +7 -5
  22. package/es/Search/setting.js +63 -57
  23. package/es/Search/util.js +4 -4
  24. package/es/index.js +1 -0
  25. package/es/locale/en-US.js +77 -0
  26. package/es/locale/zh-CN.js +77 -0
  27. package/es/style/index.css +61 -0
  28. package/es/style/index.less +11 -10
  29. package/es/style.js +2 -1
  30. package/lib/AMap/Map.js +6 -2
  31. package/lib/ConfigProvider/context.js +3 -0
  32. package/lib/ConfigProvider/index.js +5 -2
  33. package/lib/DragModal/DragModal.js +7 -3
  34. package/lib/EditTable/FormItem.js +1 -1
  35. package/lib/Empty/Empty.js +23 -13
  36. package/lib/FullPage/FullPage.js +1 -1
  37. package/lib/LocaleProvider/index.js +44 -0
  38. package/lib/LocaleReciver/index.js +19 -0
  39. package/lib/ProLayout/PageContainer/index.js +6 -1
  40. package/lib/ProTable/Alert.js +11 -3
  41. package/lib/ProTable/Pagination.js +10 -1
  42. package/lib/RadioButton/RadioButton.js +1 -1
  43. package/lib/Scrollbar/style/index.css +61 -0
  44. package/lib/Scrollbar/style/index.js +3 -0
  45. package/lib/Scrollbar/style/index.less +82 -0
  46. package/lib/Search/Advanced/History.js +10 -6
  47. package/lib/Search/Advanced/SaveHistory.js +15 -11
  48. package/lib/Search/Advanced/index.js +11 -7
  49. package/lib/Search/Item.js +15 -11
  50. package/lib/Search/Search.js +7 -5
  51. package/lib/Search/setting.js +63 -57
  52. package/lib/Search/util.js +4 -4
  53. package/lib/index.js +1 -0
  54. package/lib/locale/en-US.js +83 -0
  55. package/lib/locale/zh-CN.js +83 -0
  56. package/lib/style/components.less +1 -0
  57. package/lib/style/index.css +61 -0
  58. package/lib/style/index.less +11 -10
  59. package/lib/style.js +2 -1
  60. package/package.json +2 -2
@@ -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
+ };
@@ -4,3 +4,4 @@
4
4
  @import "../EditTable/style/index-pure.less";
5
5
  @import "../Ellipsis/style/index-pure.less";
6
6
  @import "../MonacoEditor/style/index-pure.less";
7
+ @import "../Scrollbar/style/index-pure.less";
@@ -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
+ }
@@ -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
@@ -8,4 +8,5 @@ require("./Search/style");
8
8
  require("./CardSelect/style");
9
9
  require("./DragModal/style");
10
10
  require("./EditTable/style");
11
- require("./MonacoEditor/style");
11
+ require("./MonacoEditor/style");
12
+ require("./Scrollbar/style");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetlinks-web/components",
3
- "version": "2.4.13",
3
+ "version": "2.4.15",
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.20",
156
155
  "@jetlinks-web/constants": "^1.0.7",
156
+ "@jetlinks-web/hooks": "^1.0.21",
157
157
  "@jetlinks-web/utils": "^1.2.5"
158
158
  },
159
159
  "publishConfig": {