linkmore-design 1.0.54 → 1.0.55

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 (99) hide show
  1. package/dist/Affix/demos/basic.d.ts +2 -0
  2. package/dist/Affix/index.d.ts +54 -0
  3. package/dist/Affix/style/index.d.ts +1 -0
  4. package/dist/Affix/utils.d.ts +15 -0
  5. package/dist/CardTable/fns/index.d.ts +1 -5
  6. package/dist/IconFont/index.d.ts +1 -1
  7. package/dist/LmFilter/{components → baseFilter}/fuzzySearch.d.ts +0 -0
  8. package/dist/LmFilter/utils.d.ts +1 -0
  9. package/dist/QuickMenu/demos/basic.d.ts +2 -0
  10. package/dist/QuickMenu/index.d.ts +14 -0
  11. package/dist/QuickMenu/style/index.d.ts +1 -0
  12. package/dist/Tag/demos/ExigencyTag.d.ts +2 -0
  13. package/dist/Tag/index.d.ts +4 -0
  14. package/dist/Upload/demos/picture-little.d.ts +3 -0
  15. package/dist/Upload/index.d.ts +5 -1
  16. package/dist/_util/domTarget.d.ts +7 -0
  17. package/dist/_util/throttleByAnimationFrame.d.ts +8 -0
  18. package/dist/index.d.ts +1 -0
  19. package/dist/index.umd.js +548 -8
  20. package/dist/index.umd.min.js +4 -4
  21. package/es/Affix/index.d.ts +54 -0
  22. package/es/Affix/index.js +326 -0
  23. package/es/Affix/style/index.css +505 -0
  24. package/es/Affix/style/index.d.ts +1 -0
  25. package/es/Affix/style/index.js +1 -0
  26. package/es/Affix/utils.d.ts +15 -0
  27. package/es/Affix/utils.js +83 -0
  28. package/es/CardTable/fns/index.js +6 -5
  29. package/es/Descriptions/style/index.css +10 -8
  30. package/es/IconFont/index.js +3 -2
  31. package/es/LmFilter/baseFilter/fuzzySearch.js +53 -0
  32. package/es/LmFilter/baseFilter/index.js +1 -1
  33. package/es/LmFilter/clearFilter/index.js +3 -1
  34. package/es/LmFilter/components/CascaderFilter.js +17 -41
  35. package/es/LmFilter/components/DateFilter.js +12 -20
  36. package/es/LmFilter/components/DropdownFIlter.js +78 -10
  37. package/es/LmFilter/components/index.js +56 -13
  38. package/es/LmFilter/hooks/useDelayedFn.js +8 -6
  39. package/es/LmFilter/style/style.css +16 -0
  40. package/es/LmFilter/utils.js +16 -0
  41. package/es/LmFilter/wrapper/FilterRoot.js +6 -0
  42. package/es/QuickMenu/index.d.ts +14 -0
  43. package/es/QuickMenu/index.js +169 -0
  44. package/es/QuickMenu/style/index.css +560 -0
  45. package/es/QuickMenu/style/index.d.ts +1 -0
  46. package/es/QuickMenu/style/index.js +1 -0
  47. package/es/Tag/index.d.ts +4 -0
  48. package/es/Tag/index.js +48 -2
  49. package/es/Tag/style/index.css +4 -1
  50. package/es/Upload/index.d.ts +5 -1
  51. package/es/Upload/index.js +7 -2
  52. package/es/Upload/style/index.css +35 -0
  53. package/es/_util/domTarget.d.ts +7 -0
  54. package/es/_util/domTarget.js +20 -0
  55. package/es/_util/throttleByAnimationFrame.d.ts +8 -0
  56. package/es/_util/throttleByAnimationFrame.js +58 -0
  57. package/es/index.d.ts +1 -0
  58. package/es/index.js +2 -1
  59. package/lib/Affix/index.d.ts +54 -0
  60. package/lib/Affix/index.js +349 -0
  61. package/lib/Affix/style/index.css +505 -0
  62. package/lib/Affix/style/index.d.ts +1 -0
  63. package/lib/Affix/style/index.js +3 -0
  64. package/lib/Affix/utils.d.ts +15 -0
  65. package/lib/Affix/utils.js +104 -0
  66. package/lib/CardTable/fns/index.js +6 -5
  67. package/lib/Descriptions/style/index.css +10 -8
  68. package/lib/IconFont/index.js +3 -2
  69. package/lib/LmFilter/baseFilter/fuzzySearch.js +53 -0
  70. package/lib/LmFilter/baseFilter/index.js +1 -1
  71. package/lib/LmFilter/clearFilter/index.js +3 -1
  72. package/lib/LmFilter/components/CascaderFilter.js +17 -41
  73. package/lib/LmFilter/components/DateFilter.js +12 -20
  74. package/lib/LmFilter/components/DropdownFIlter.js +78 -10
  75. package/lib/LmFilter/components/index.js +56 -13
  76. package/lib/LmFilter/hooks/useDelayedFn.js +8 -6
  77. package/lib/LmFilter/style/style.css +16 -0
  78. package/lib/LmFilter/utils.js +16 -0
  79. package/lib/LmFilter/wrapper/FilterRoot.js +6 -0
  80. package/lib/QuickMenu/index.d.ts +14 -0
  81. package/lib/QuickMenu/index.js +187 -0
  82. package/lib/QuickMenu/style/index.css +560 -0
  83. package/lib/QuickMenu/style/index.d.ts +1 -0
  84. package/lib/QuickMenu/style/index.js +3 -0
  85. package/lib/Tag/index.d.ts +4 -0
  86. package/lib/Tag/index.js +48 -1
  87. package/lib/Tag/style/index.css +4 -1
  88. package/lib/Upload/index.d.ts +5 -1
  89. package/lib/Upload/index.js +8 -2
  90. package/lib/Upload/style/index.css +35 -0
  91. package/lib/_util/domTarget.d.ts +7 -0
  92. package/lib/_util/domTarget.js +31 -0
  93. package/lib/_util/throttleByAnimationFrame.d.ts +8 -0
  94. package/lib/_util/throttleByAnimationFrame.js +72 -0
  95. package/lib/index.d.ts +1 -0
  96. package/lib/index.js +9 -1
  97. package/package.json +5 -2
  98. package/es/LmFilter/components/fuzzySearch.js +0 -37
  99. package/lib/LmFilter/components/fuzzySearch.js +0 -37
@@ -503,3 +503,38 @@ html {
503
503
  .card_cell_content:hover .card_cell_body .card_cell_checkbox {
504
504
  opacity: 1;
505
505
  }
506
+ .ant-upload-select-picture-card div {
507
+ margin-top: 8px;
508
+ }
509
+ .little-upload .ant-upload-list-picture-card-container {
510
+ width: 64px;
511
+ height: 64px;
512
+ }
513
+ .little-upload .ant-upload-list-picture-card-container .ant-upload-list-item {
514
+ padding: 0 !important;
515
+ }
516
+ .little-upload .ant-upload-list-picture-card-container .ant-upload-list-item .ant-upload-list-item-thumbnail {
517
+ font-size: 12px;
518
+ }
519
+ .little-upload .ant-upload-list-picture-card-container .ant-upload-list-item .ant-upload-list-item-progress {
520
+ bottom: 5px;
521
+ left: 7px;
522
+ }
523
+ .little-upload .ant-upload-list-picture-card-container .ant-upload-list-item .ant-upload-list-item-name {
524
+ bottom: 5px;
525
+ font-size: 12px;
526
+ }
527
+ .little-upload .ant-upload.ant-upload-select-picture-card {
528
+ width: 64px;
529
+ height: 64px;
530
+ font-size: 12px;
531
+ }
532
+ .little-upload .ant-upload.ant-upload-select-picture-card .anticon svg {
533
+ width: 24px;
534
+ height: 24px;
535
+ margin-top: 8px;
536
+ }
537
+ .little-upload .ant-upload.ant-upload-select-picture-card div {
538
+ margin-top: 0;
539
+ font-size: 12px;
540
+ }
@@ -0,0 +1,7 @@
1
+ import type { MutableRefObject } from 'react';
2
+ export declare const isFunction: (value: unknown) => value is Function;
3
+ declare type TargetValue<T> = T | undefined | null;
4
+ declare type TargetType = HTMLElement | Element | Window | Document;
5
+ export declare type BasicTarget<T extends TargetType = Element> = (() => TargetValue<T>) | TargetValue<T> | MutableRefObject<TargetValue<T>>;
6
+ export declare function getTargetElement<T extends TargetType>(target: BasicTarget<T>, defaultElement?: T): T;
7
+ export {};
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getTargetElement = getTargetElement;
7
+ exports.isFunction = void 0;
8
+
9
+ var isFunction = function isFunction(value) {
10
+ return typeof value === 'function';
11
+ };
12
+
13
+ exports.isFunction = isFunction;
14
+
15
+ function getTargetElement(target, defaultElement) {
16
+ if (!target) {
17
+ return defaultElement;
18
+ }
19
+
20
+ var targetElement;
21
+
22
+ if (isFunction(target)) {
23
+ targetElement = target();
24
+ } else if ('current' in target) {
25
+ targetElement = target.current;
26
+ } else {
27
+ targetElement = target;
28
+ }
29
+
30
+ return targetElement;
31
+ }
@@ -0,0 +1,8 @@
1
+ export declare function throttleByAnimationFrame<T extends unknown[]>(fn: (...args: T) => void): {
2
+ (...args: T): void;
3
+ cancel: () => void;
4
+ };
5
+ export declare function throttleByAnimationFrameDecorator(): (target: any, key: string, descriptor: any) => {
6
+ configurable: boolean;
7
+ get(): any;
8
+ };
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.throttleByAnimationFrame = throttleByAnimationFrame;
9
+ exports.throttleByAnimationFrameDecorator = throttleByAnimationFrameDecorator;
10
+
11
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
12
+
13
+ var _raf = _interopRequireDefault(require("rc-util/lib/raf"));
14
+
15
+ function throttleByAnimationFrame(fn) {
16
+ var requestId;
17
+
18
+ var later = function later(args) {
19
+ return function () {
20
+ requestId = null;
21
+ fn.apply(void 0, (0, _toConsumableArray2.default)(args));
22
+ };
23
+ };
24
+
25
+ var throttled = function throttled() {
26
+ if (requestId == null) {
27
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
28
+ args[_key] = arguments[_key];
29
+ }
30
+
31
+ requestId = (0, _raf.default)(later(args));
32
+ }
33
+ };
34
+
35
+ throttled.cancel = function () {
36
+ _raf.default.cancel(requestId);
37
+
38
+ requestId = null;
39
+ };
40
+
41
+ return throttled;
42
+ }
43
+
44
+ function throttleByAnimationFrameDecorator() {
45
+ return function throttle(target, key, descriptor) {
46
+ var fn = descriptor.value;
47
+ var definingProperty = false;
48
+ return {
49
+ configurable: true,
50
+ get: function get() {
51
+ // In IE11 calling Object.defineProperty has a side-effect of evaluating the
52
+ // getter for the property which is being replaced. This causes infinite
53
+ // recursion and an "Out of stack space" error.
54
+ // eslint-disable-next-line no-prototype-builtins
55
+ if (definingProperty || this === target.prototype || this.hasOwnProperty(key)) {
56
+ /* istanbul ignore next */
57
+ return fn;
58
+ }
59
+
60
+ var boundFn = throttleByAnimationFrame(fn.bind(this));
61
+ definingProperty = true;
62
+ Object.defineProperty(this, key, {
63
+ value: boundFn,
64
+ configurable: true,
65
+ writable: true
66
+ });
67
+ definingProperty = false;
68
+ return boundFn;
69
+ }
70
+ };
71
+ };
72
+ }
package/lib/index.d.ts CHANGED
@@ -48,3 +48,4 @@ export { default as Form } from './Form';
48
48
  export { default as Spin } from './Spin';
49
49
  export { default as LmEditTable } from './LmEditTable';
50
50
  export { default as List } from './List';
51
+ export { default as LMQuickMenu } from './QuickMenu';
package/lib/index.js CHANGED
@@ -131,6 +131,12 @@ Object.defineProperty(exports, "InputNumber", {
131
131
  return _InputNumber.default;
132
132
  }
133
133
  });
134
+ Object.defineProperty(exports, "LMQuickMenu", {
135
+ enumerable: true,
136
+ get: function get() {
137
+ return _QuickMenu.default;
138
+ }
139
+ });
134
140
  Object.defineProperty(exports, "LeftTable", {
135
141
  enumerable: true,
136
142
  get: function get() {
@@ -396,4 +402,6 @@ var _Spin = _interopRequireDefault(require("./Spin"));
396
402
 
397
403
  var _LmEditTable = _interopRequireDefault(require("./LmEditTable"));
398
404
 
399
- var _List = _interopRequireDefault(require("./List"));
405
+ var _List = _interopRequireDefault(require("./List"));
406
+
407
+ var _QuickMenu = _interopRequireDefault(require("./QuickMenu"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linkmore-design",
3
- "version": "1.0.54",
3
+ "version": "1.0.55",
4
4
  "author": {
5
5
  "name": "nowthen",
6
6
  "email": "rnlvwyx@gmail.com"
@@ -63,6 +63,8 @@
63
63
  "classnames": "^2.3.1",
64
64
  "dayjs": "^1.9.7",
65
65
  "immer": "^9.0.15",
66
+ "intersection-observer": "^0.12.2",
67
+ "hex-to-rgba": "^2.0.1",
66
68
  "lodash": "^4.17.21",
67
69
  "react-cookies": "^0.1.1",
68
70
  "react-query": "^3.34.15",
@@ -71,7 +73,8 @@
71
73
  "react-virtual": "^2.10.4",
72
74
  "react-virtualized-auto-sizer": "^1.0.6",
73
75
  "react-window": "^1.8.6",
74
- "readline-sync": "^1.4.10"
76
+ "readline-sync": "^1.4.10",
77
+ "scrollama": "^3.2.0"
75
78
  },
76
79
  "peerDependencies": {
77
80
  "antd": "^4.17.0-alpha.7",
@@ -1,37 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
-
10
- var _react = _interopRequireWildcard(require("react"));
11
-
12
- var _linkmoreDesign = require("linkmore-design");
13
-
14
- var FuzzySearch = function FuzzySearch(_ref) {
15
- var instance = _ref.instance;
16
- var inputRef = (0, _react.useRef)(null);
17
- var state = instance.state,
18
- dispatch = instance.dispatch,
19
- size = instance.size,
20
- placeholder = instance.placeholder;
21
-
22
- var onSearch = function onSearch(val) {// dispatch();
23
- };
24
-
25
- return /*#__PURE__*/_react.default.createElement("div", {
26
- className: "lm_filter_search"
27
- }, /*#__PURE__*/_react.default.createElement(_linkmoreDesign.Input.Search, {
28
- ref: inputRef,
29
- allowClear: true,
30
- size: size,
31
- placeholder: placeholder,
32
- onSearch: onSearch
33
- }));
34
- };
35
-
36
- var _default = FuzzySearch;
37
- exports.default = _default;
@@ -1,37 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
-
10
- var _react = _interopRequireWildcard(require("react"));
11
-
12
- var _linkmoreDesign = require("linkmore-design");
13
-
14
- var FuzzySearch = function FuzzySearch(_ref) {
15
- var instance = _ref.instance;
16
- var inputRef = (0, _react.useRef)(null);
17
- var state = instance.state,
18
- dispatch = instance.dispatch,
19
- size = instance.size,
20
- placeholder = instance.placeholder;
21
-
22
- var onSearch = function onSearch(val) {// dispatch();
23
- };
24
-
25
- return /*#__PURE__*/_react.default.createElement("div", {
26
- className: "lm_filter_search"
27
- }, /*#__PURE__*/_react.default.createElement(_linkmoreDesign.Input.Search, {
28
- ref: inputRef,
29
- allowClear: true,
30
- size: size,
31
- placeholder: placeholder,
32
- onSearch: onSearch
33
- }));
34
- };
35
-
36
- var _default = FuzzySearch;
37
- exports.default = _default;