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.
- package/dist/Affix/demos/basic.d.ts +2 -0
- package/dist/Affix/index.d.ts +54 -0
- package/dist/Affix/style/index.d.ts +1 -0
- package/dist/Affix/utils.d.ts +15 -0
- package/dist/CardTable/fns/index.d.ts +1 -5
- package/dist/IconFont/index.d.ts +1 -1
- package/dist/LmFilter/{components → baseFilter}/fuzzySearch.d.ts +0 -0
- package/dist/LmFilter/utils.d.ts +1 -0
- package/dist/QuickMenu/demos/basic.d.ts +2 -0
- package/dist/QuickMenu/index.d.ts +14 -0
- package/dist/QuickMenu/style/index.d.ts +1 -0
- package/dist/Tag/demos/ExigencyTag.d.ts +2 -0
- package/dist/Tag/index.d.ts +4 -0
- package/dist/Upload/demos/picture-little.d.ts +3 -0
- package/dist/Upload/index.d.ts +5 -1
- package/dist/_util/domTarget.d.ts +7 -0
- package/dist/_util/throttleByAnimationFrame.d.ts +8 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.umd.js +548 -8
- package/dist/index.umd.min.js +4 -4
- package/es/Affix/index.d.ts +54 -0
- package/es/Affix/index.js +326 -0
- package/es/Affix/style/index.css +505 -0
- package/es/Affix/style/index.d.ts +1 -0
- package/es/Affix/style/index.js +1 -0
- package/es/Affix/utils.d.ts +15 -0
- package/es/Affix/utils.js +83 -0
- package/es/CardTable/fns/index.js +6 -5
- package/es/Descriptions/style/index.css +10 -8
- package/es/IconFont/index.js +3 -2
- package/es/LmFilter/baseFilter/fuzzySearch.js +53 -0
- package/es/LmFilter/baseFilter/index.js +1 -1
- package/es/LmFilter/clearFilter/index.js +3 -1
- package/es/LmFilter/components/CascaderFilter.js +17 -41
- package/es/LmFilter/components/DateFilter.js +12 -20
- package/es/LmFilter/components/DropdownFIlter.js +78 -10
- package/es/LmFilter/components/index.js +56 -13
- package/es/LmFilter/hooks/useDelayedFn.js +8 -6
- package/es/LmFilter/style/style.css +16 -0
- package/es/LmFilter/utils.js +16 -0
- package/es/LmFilter/wrapper/FilterRoot.js +6 -0
- package/es/QuickMenu/index.d.ts +14 -0
- package/es/QuickMenu/index.js +169 -0
- package/es/QuickMenu/style/index.css +560 -0
- package/es/QuickMenu/style/index.d.ts +1 -0
- package/es/QuickMenu/style/index.js +1 -0
- package/es/Tag/index.d.ts +4 -0
- package/es/Tag/index.js +48 -2
- package/es/Tag/style/index.css +4 -1
- package/es/Upload/index.d.ts +5 -1
- package/es/Upload/index.js +7 -2
- package/es/Upload/style/index.css +35 -0
- package/es/_util/domTarget.d.ts +7 -0
- package/es/_util/domTarget.js +20 -0
- package/es/_util/throttleByAnimationFrame.d.ts +8 -0
- package/es/_util/throttleByAnimationFrame.js +58 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/lib/Affix/index.d.ts +54 -0
- package/lib/Affix/index.js +349 -0
- package/lib/Affix/style/index.css +505 -0
- package/lib/Affix/style/index.d.ts +1 -0
- package/lib/Affix/style/index.js +3 -0
- package/lib/Affix/utils.d.ts +15 -0
- package/lib/Affix/utils.js +104 -0
- package/lib/CardTable/fns/index.js +6 -5
- package/lib/Descriptions/style/index.css +10 -8
- package/lib/IconFont/index.js +3 -2
- package/lib/LmFilter/baseFilter/fuzzySearch.js +53 -0
- package/lib/LmFilter/baseFilter/index.js +1 -1
- package/lib/LmFilter/clearFilter/index.js +3 -1
- package/lib/LmFilter/components/CascaderFilter.js +17 -41
- package/lib/LmFilter/components/DateFilter.js +12 -20
- package/lib/LmFilter/components/DropdownFIlter.js +78 -10
- package/lib/LmFilter/components/index.js +56 -13
- package/lib/LmFilter/hooks/useDelayedFn.js +8 -6
- package/lib/LmFilter/style/style.css +16 -0
- package/lib/LmFilter/utils.js +16 -0
- package/lib/LmFilter/wrapper/FilterRoot.js +6 -0
- package/lib/QuickMenu/index.d.ts +14 -0
- package/lib/QuickMenu/index.js +187 -0
- package/lib/QuickMenu/style/index.css +560 -0
- package/lib/QuickMenu/style/index.d.ts +1 -0
- package/lib/QuickMenu/style/index.js +3 -0
- package/lib/Tag/index.d.ts +4 -0
- package/lib/Tag/index.js +48 -1
- package/lib/Tag/style/index.css +4 -1
- package/lib/Upload/index.d.ts +5 -1
- package/lib/Upload/index.js +8 -2
- package/lib/Upload/style/index.css +35 -0
- package/lib/_util/domTarget.d.ts +7 -0
- package/lib/_util/domTarget.js +31 -0
- package/lib/_util/throttleByAnimationFrame.d.ts +8 -0
- package/lib/_util/throttleByAnimationFrame.js +72 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +9 -1
- package/package.json +5 -2
- package/es/LmFilter/components/fuzzySearch.js +0 -37
- 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
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.
|
|
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;
|