linkmore-design 1.0.10 → 1.0.13

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 (95) hide show
  1. package/dist/index.umd.js +4359 -1032
  2. package/dist/index.umd.min.js +6 -6
  3. package/es/Button/style/style.css +32 -31
  4. package/es/ButtonTags/style/style.css +3 -0
  5. package/es/Card/index.d.ts +2 -0
  6. package/es/Card/index.js +17 -0
  7. package/es/Card/style/index.css +495 -0
  8. package/es/Card/style/index.d.ts +1 -0
  9. package/es/Card/style/index.js +1 -0
  10. package/es/{CheckBox → Checkbox}/index.js +0 -0
  11. package/es/{CheckBox → Checkbox}/style/index.js +0 -0
  12. package/es/{CheckBox → Checkbox}/style/style.css +0 -0
  13. package/es/CkFilter/components/filterTypes.js +41 -31
  14. package/es/CkFilter/filter.js +1 -1
  15. package/es/CkFilter/style/style.css +5 -2
  16. package/es/CustomerService/style/style.css +3 -0
  17. package/es/Drawer/style/index.css +6 -0
  18. package/es/Dropdown/style/index.css +3 -0
  19. package/es/EditTable/style/style.css +3 -0
  20. package/es/Filter/Popover.js +2 -2
  21. package/es/Filter/style/style.css +3 -0
  22. package/es/IconFont/index.js +1 -1
  23. package/es/IconSelect/iconJson.json +2935 -0
  24. package/es/IconSelect/index.js +115 -0
  25. package/{lib/CheckBox → es/IconSelect}/style/index.js +0 -0
  26. package/es/IconSelect/style/style.css +25 -0
  27. package/es/Input/style/style.css +3 -0
  28. package/es/InputNumber/style/index.css +3 -0
  29. package/es/LeftTable/index.js +5 -3
  30. package/es/LeftTable/style/style.css +41 -10
  31. package/es/Modal/index.js +7 -3
  32. package/es/Modal/style/index.css +7 -0
  33. package/es/Notification/index.d.ts +7 -0
  34. package/es/Notification/index.js +12 -0
  35. package/es/Notification/style/index.css +495 -0
  36. package/es/Notification/style/index.d.ts +1 -0
  37. package/es/Notification/style/index.js +1 -0
  38. package/es/Pagination/style/index.css +3 -0
  39. package/es/PopTable/style/style.css +3 -1
  40. package/es/ProTable/ImgList/body.js +5 -5
  41. package/es/ProTable/Table.js +5 -4
  42. package/es/ProTable/style/style.css +11 -2
  43. package/es/Select/index.d.ts +1 -1
  44. package/es/Select/style/index.css +3 -0
  45. package/es/Space/style/index.css +3 -0
  46. package/es/index.js +36 -4
  47. package/es/styles/main.css +3 -0
  48. package/es/styles/resetAntd.css +3 -0
  49. package/lib/Button/style/style.css +32 -31
  50. package/lib/ButtonTags/style/style.css +3 -0
  51. package/lib/Card/index.d.ts +2 -0
  52. package/lib/Card/index.js +29 -0
  53. package/lib/Card/style/index.css +495 -0
  54. package/lib/Card/style/index.d.ts +1 -0
  55. package/lib/Card/style/index.js +3 -0
  56. package/lib/{CheckBox → Checkbox}/index.js +0 -0
  57. package/lib/Checkbox/style/index.js +3 -0
  58. package/lib/{CheckBox → Checkbox}/style/style.css +0 -0
  59. package/lib/CkFilter/components/filterTypes.js +41 -31
  60. package/lib/CkFilter/filter.js +1 -1
  61. package/lib/CkFilter/style/style.css +5 -2
  62. package/lib/CustomerService/style/style.css +3 -0
  63. package/lib/Drawer/style/index.css +6 -0
  64. package/lib/Dropdown/style/index.css +3 -0
  65. package/lib/EditTable/style/style.css +3 -0
  66. package/lib/Filter/Popover.js +2 -2
  67. package/lib/Filter/style/style.css +3 -0
  68. package/lib/IconFont/index.js +1 -1
  69. package/lib/IconSelect/iconJson.json +2935 -0
  70. package/lib/IconSelect/index.js +115 -0
  71. package/lib/IconSelect/style/index.js +3 -0
  72. package/lib/IconSelect/style/style.css +25 -0
  73. package/lib/Input/style/style.css +3 -0
  74. package/lib/InputNumber/style/index.css +3 -0
  75. package/lib/LeftTable/index.js +5 -3
  76. package/lib/LeftTable/style/style.css +41 -10
  77. package/lib/Modal/index.js +7 -3
  78. package/lib/Modal/style/index.css +7 -0
  79. package/lib/Notification/index.d.ts +7 -0
  80. package/lib/Notification/index.js +25 -0
  81. package/lib/Notification/style/index.css +495 -0
  82. package/lib/Notification/style/index.d.ts +1 -0
  83. package/lib/Notification/style/index.js +3 -0
  84. package/lib/Pagination/style/index.css +3 -0
  85. package/lib/PopTable/style/style.css +3 -1
  86. package/lib/ProTable/ImgList/body.js +5 -5
  87. package/lib/ProTable/Table.js +5 -4
  88. package/lib/ProTable/style/style.css +11 -2
  89. package/lib/Select/index.d.ts +1 -1
  90. package/lib/Select/style/index.css +3 -0
  91. package/lib/Space/style/index.css +3 -0
  92. package/lib/index.js +36 -4
  93. package/lib/styles/main.css +3 -0
  94. package/lib/styles/resetAntd.css +3 -0
  95. package/package.json +1 -1
@@ -281,12 +281,12 @@ var CheckboxFilter = function CheckboxFilter(_ref8) {
281
281
  filters = _ref8$filters === void 0 ? [] : _ref8$filters,
282
282
  getFilterValue = _ref8.getFilterValue,
283
283
  setFilterValue = _ref8.setFilterValue;
284
- var inputRef = (0, _react.useRef)(null);
284
+ var inputRef = (0, _react.useRef)(null); // 选中的数据项: ['', '', ...];
285
285
 
286
286
  var _useState5 = (0, _react.useState)(getFilterValue || []),
287
287
  _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
288
288
  checkedValues = _useState6[0],
289
- setCheckedValues = _useState6[1]; // 搜索后的筛选项
289
+ setCheckedValues = _useState6[1]; // 搜索后的筛选项:[{value: '', ... }, ...]
290
290
 
291
291
 
292
292
  var _useState7 = (0, _react.useState)(filters),
@@ -297,20 +297,29 @@ var CheckboxFilter = function CheckboxFilter(_ref8) {
297
297
 
298
298
  var isSearch = (0, _react.useMemo)(function () {
299
299
  return filters.length > 8;
300
- }, [filters.length]); // 是否半选
301
-
302
- var indeterminate = (0, _react.useMemo)(function () {
303
- return checkedValues.length && checkedValues.length < filters.length;
304
- }, [checkedValues.length, filters.length]); // 是否全选
300
+ }, [filters.length]); // 是否全选: 选中的数据大于等于筛选后的数据 && 筛选后的数据全部存在于选中的数据中
305
301
 
306
302
  var checkAll = (0, _react.useMemo)(function () {
307
- return checkedValues.length === filters.length;
308
- }, [checkedValues.length, filters.length]); // 全选事件
303
+ var isLen = checkedValues.length >= options.length;
304
+ return isLen && options.every(function (_ref9) {
305
+ var value = _ref9.value;
306
+ return checkedValues.includes(value);
307
+ });
308
+ }, [checkedValues.length, options]); // 是否半选: 存在选中的数据 && 未全选
309
+
310
+ var indeterminate = (0, _react.useMemo)(function () {
311
+ return checkedValues.length && !checkAll;
312
+ }, [checkedValues.length, checkAll]); // 全选事件
309
313
 
310
314
  var onCheckAllChange = function onCheckAllChange() {
311
- var nValue = checkAll ? [] : filters.map(function (v) {
315
+ var nValue = checkAll ? checkedValues.filter(function (v) {
316
+ return !options.some(function (_ref10) {
317
+ var value = _ref10.value;
318
+ return v === value;
319
+ });
320
+ }) : Array.from(new Set([].concat((0, _toConsumableArray2.default)(checkedValues), (0, _toConsumableArray2.default)(options.map(function (v) {
312
321
  return v.value;
313
- });
322
+ })))));
314
323
  setCheckedValues(nValue);
315
324
  }; // 搜索
316
325
 
@@ -329,7 +338,7 @@ var CheckboxFilter = function CheckboxFilter(_ref8) {
329
338
 
330
339
  var handleReset = function handleReset() {
331
340
  if (inputRef.current) {
332
- inputRef.current.state.value = '';
341
+ inputRef.current.input.value = '';
333
342
  }
334
343
 
335
344
  setFilterValue(undefined);
@@ -376,9 +385,9 @@ var CheckboxFilter = function CheckboxFilter(_ref8) {
376
385
  }, /*#__PURE__*/_react.default.createElement(_VirtualList.default, {
377
386
  options: options,
378
387
  className: "filter_list"
379
- }, function (_ref9) {
380
- var item = _ref9.item,
381
- resetProps = (0, _objectWithoutProperties2.default)(_ref9, _excluded4);
388
+ }, function (_ref11) {
389
+ var item = _ref11.item,
390
+ resetProps = (0, _objectWithoutProperties2.default)(_ref11, _excluded4);
382
391
  return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, resetProps, {
383
392
  className: (0, _classnames.default)('filter_item', {
384
393
  checked: checkedValues.includes(item.value)
@@ -395,19 +404,20 @@ var CheckboxFilter = function CheckboxFilter(_ref8) {
395
404
  }, "\u6682\u65E0\u6570\u636E")), isSearch && /*#__PURE__*/_react.default.createElement("div", {
396
405
  className: "filter_footer"
397
406
  }, /*#__PURE__*/_react.default.createElement("div", {
398
- className: "footer_save",
399
- onClick: handleSure
400
- }, "\u786E\u5B9A"), /*#__PURE__*/_react.default.createElement("div", {
401
407
  className: "footer_clear",
402
408
  onClick: handleReset
403
- }, "\u6E05\u7A7A")));
409
+ }, "\u6E05\u7A7A"), /*#__PURE__*/_react.default.createElement(_linkmoreDesign.Button, {
410
+ type: "primary",
411
+ size: "small",
412
+ onClick: handleSure
413
+ }, "\u786E\u5B9A")));
404
414
  }; // 更多筛选
405
415
 
406
416
 
407
- var MoreFilter = function MoreFilter(_ref10) {
408
- var filters = _ref10.filters,
409
- getFilterValue = _ref10.getFilterValue,
410
- setFilterValue = _ref10.setFilterValue;
417
+ var MoreFilter = function MoreFilter(_ref12) {
418
+ var filters = _ref12.filters,
419
+ getFilterValue = _ref12.getFilterValue,
420
+ setFilterValue = _ref12.setFilterValue;
411
421
  // 选中的数据
412
422
  var checkedValues = (0, _react.useMemo)(function () {
413
423
  return getFilterValue;
@@ -473,9 +483,9 @@ var MoreFilter = function MoreFilter(_ref10) {
473
483
  }, /*#__PURE__*/_react.default.createElement(_VirtualList.default, {
474
484
  options: options,
475
485
  className: "filter_list"
476
- }, function (_ref11) {
477
- var item = _ref11.item,
478
- resetProps = (0, _objectWithoutProperties2.default)(_ref11, _excluded5);
486
+ }, function (_ref13) {
487
+ var item = _ref13.item,
488
+ resetProps = (0, _objectWithoutProperties2.default)(_ref13, _excluded5);
479
489
  return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, resetProps, {
480
490
  className: "filter_item",
481
491
  onClick: function onClick(e) {
@@ -497,11 +507,11 @@ var MoreFilter = function MoreFilter(_ref10) {
497
507
  }; // 日期范围选择器
498
508
 
499
509
 
500
- var DatePickerFilter = function DatePickerFilter(_ref12) {
501
- var getFilterValue = _ref12.getFilterValue,
502
- setFilterValue = _ref12.setFilterValue,
503
- props = _ref12.props,
504
- dateType = _ref12.dateType;
510
+ var DatePickerFilter = function DatePickerFilter(_ref14) {
511
+ var getFilterValue = _ref14.getFilterValue,
512
+ setFilterValue = _ref14.setFilterValue,
513
+ props = _ref14.props,
514
+ dateType = _ref14.dateType;
505
515
  console.log(dateType, '--dateType'); // 对日期格式的转换, 日期组件仅接收moment格式
506
516
 
507
517
  var value = (0, _react.useMemo)(function () {
@@ -54,7 +54,7 @@ var Filter = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
54
54
  filterValues = _props$filterValues === void 0 ? {} : _props$filterValues,
55
55
  hasCustom = props.custom,
56
56
  hasLevelGroup = props.levelGroup;
57
- var isMore = (data === null || data === void 0 ? void 0 : data.length) > 5;
57
+ var isMore = (data === null || data === void 0 ? void 0 : data.length) > 3;
58
58
  var visileData = data.filter(function (v) {
59
59
  v.fixed && (0, _utils.getIsHas)(v === null || v === void 0 ? void 0 : v.value) && (filterValues[v.field] = v.value);
60
60
  return v.fixed;
@@ -71,6 +71,9 @@
71
71
  padding: var(--gap);
72
72
  line-height: 1;
73
73
  }
74
+ .ant-notification-notice .ant-notification-notice-content .ant-notification-notice-message {
75
+ font-weight: 500;
76
+ }
74
77
  @font-face {
75
78
  font-family: 'iconfont';
76
79
  /* Project id 2966019 */
@@ -727,8 +730,8 @@ html {
727
730
  display: flex;
728
731
  align-items: center;
729
732
  justify-content: center;
730
- font-size: 14px;
731
- min-height: 60px;
733
+ font-size: 12px;
734
+ min-height: 40px;
732
735
  color: #666;
733
736
  padding: 0 8px;
734
737
  }
@@ -71,6 +71,9 @@
71
71
  padding: var(--gap);
72
72
  line-height: 1;
73
73
  }
74
+ .ant-notification-notice .ant-notification-notice-content .ant-notification-notice-message {
75
+ font-weight: 500;
76
+ }
74
77
  @font-face {
75
78
  font-family: 'iconfont';
76
79
  /* Project id 2966019 */
@@ -71,6 +71,9 @@
71
71
  padding: var(--gap);
72
72
  line-height: 1;
73
73
  }
74
+ .ant-notification-notice .ant-notification-notice-content .ant-notification-notice-message {
75
+ font-weight: 500;
76
+ }
74
77
  @font-face {
75
78
  font-family: 'iconfont';
76
79
  /* Project id 2966019 */
@@ -494,3 +497,6 @@ html {
494
497
  height: 48px;
495
498
  padding: 0 24px !important;
496
499
  }
500
+ .lm_drawer.ant-drawer .ant-drawer-content .ant-drawer-header .ant-drawer-title {
501
+ font-weight: 500;
502
+ }
@@ -71,6 +71,9 @@
71
71
  padding: var(--gap);
72
72
  line-height: 1;
73
73
  }
74
+ .ant-notification-notice .ant-notification-notice-content .ant-notification-notice-message {
75
+ font-weight: 500;
76
+ }
74
77
  @font-face {
75
78
  font-family: 'iconfont';
76
79
  /* Project id 2966019 */
@@ -71,6 +71,9 @@
71
71
  padding: var(--gap);
72
72
  line-height: 1;
73
73
  }
74
+ .ant-notification-notice .ant-notification-notice-content .ant-notification-notice-message {
75
+ font-weight: 500;
76
+ }
74
77
  @font-face {
75
78
  font-family: 'iconfont';
76
79
  /* Project id 2966019 */
@@ -23,10 +23,10 @@ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/
23
23
 
24
24
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
25
25
 
26
- var _react = _interopRequireWildcard(require("react"));
27
-
28
26
  var _icons = require("@ant-design/icons");
29
27
 
28
+ var _react = _interopRequireWildcard(require("react"));
29
+
30
30
  var _components = require("./components");
31
31
 
32
32
  var _popContext = _interopRequireDefault(require("./popContext"));
@@ -71,6 +71,9 @@
71
71
  padding: var(--gap);
72
72
  line-height: 1;
73
73
  }
74
+ .ant-notification-notice .ant-notification-notice-content .ant-notification-notice-message {
75
+ font-weight: 500;
76
+ }
74
77
  @font-face {
75
78
  font-family: 'iconfont';
76
79
  /* Project id 2966019 */
@@ -8,7 +8,7 @@ exports.default = void 0;
8
8
  var _icons = require("@ant-design/icons");
9
9
 
10
10
  var IconFont = (0, _icons.createFromIconfontCN)({
11
- scriptUrl: '//at.alicdn.com/t/font_2966019_r2sjvddyblq.js' // 在 iconfont.cn 上生成
11
+ scriptUrl: '//at.alicdn.com/t/font_2966019_8aij0300kjo.js' // 在 iconfont.cn 上生成
12
12
 
13
13
  });
14
14
  var _default = IconFont;