linkmore-design 1.0.58 → 1.0.59
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/Form/container.d.ts +8 -0
- package/dist/Form/demos/responsive.d.ts +2 -0
- package/dist/Form/index.d.ts +3 -0
- package/dist/LmFilter/customFilter/index.d.ts +3 -1
- package/dist/LmFilter/filterFns/index.d.ts +4 -1
- package/dist/index.umd.js +104 -14
- package/dist/index.umd.min.js +2 -2
- package/es/Form/container.d.ts +8 -0
- package/es/Form/container.js +97 -0
- package/es/Form/index.d.ts +3 -0
- package/es/Form/index.js +13 -1
- package/es/Form/style/index.css +35 -0
- package/es/LmFilter/baseFilter/index.js +2 -1
- package/es/LmFilter/complexFilter/drawer.js +19 -4
- package/es/LmFilter/components/CascaderFilter.js +17 -4
- package/es/LmFilter/components/DateFilter.js +3 -7
- package/es/LmFilter/components/DropdownFIlter.js +12 -4
- package/es/LmFilter/customFilter/index.js +3 -2
- package/es/LmFilter/filterFns/index.js +51 -11
- package/es/LmFilter/wrapper/Filter.js +6 -3
- package/es/LmFilter/wrapper/FilterRoot.js +28 -8
- package/lib/Form/container.d.ts +8 -0
- package/lib/Form/container.js +112 -0
- package/lib/Form/index.d.ts +3 -0
- package/lib/Form/index.js +14 -1
- package/lib/Form/style/index.css +35 -0
- package/lib/LmFilter/baseFilter/index.js +2 -1
- package/lib/LmFilter/complexFilter/drawer.js +19 -4
- package/lib/LmFilter/components/CascaderFilter.js +17 -4
- package/lib/LmFilter/components/DateFilter.js +3 -7
- package/lib/LmFilter/components/DropdownFIlter.js +12 -4
- package/lib/LmFilter/customFilter/index.js +3 -2
- package/lib/LmFilter/filterFns/index.js +51 -11
- package/lib/LmFilter/wrapper/Filter.js +6 -3
- package/lib/LmFilter/wrapper/FilterRoot.js +28 -8
- package/package.json +1 -1
package/dist/Form/index.d.ts
CHANGED
|
@@ -3,6 +3,9 @@ import { Form as AntdForm, FormInstance, FormProps, List } from 'antd';
|
|
|
3
3
|
import useFormInstance from 'antd/lib/form/hooks/useFormInstance';
|
|
4
4
|
import { FormProvider } from 'antd/lib/form/context';
|
|
5
5
|
import { useForm, useWatch } from 'antd/lib/form/Form';
|
|
6
|
+
export interface LmFormProps extends FormProps {
|
|
7
|
+
responsive?: Boolean;
|
|
8
|
+
}
|
|
6
9
|
declare const Reform: <Values = any>(props: FormProps<Values> & {
|
|
7
10
|
children?: React.ReactNode;
|
|
8
11
|
} & {
|
|
@@ -4,9 +4,12 @@ declare function CoreOptions({ state, dispatch, props }: {
|
|
|
4
4
|
dispatch: any;
|
|
5
5
|
props: any;
|
|
6
6
|
}): {
|
|
7
|
-
|
|
7
|
+
getState: () => any;
|
|
8
|
+
getBasicFilter: () => any;
|
|
8
9
|
getFilterValue: ({ field, type }: {
|
|
9
10
|
field: any;
|
|
10
11
|
type: any;
|
|
11
12
|
}) => any;
|
|
13
|
+
setFilterValue: (item: any, field: any) => void;
|
|
14
|
+
setLocalization: (localization?: any) => void;
|
|
12
15
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -88380,13 +88380,103 @@
|
|
|
88380
88380
|
}, props));
|
|
88381
88381
|
};
|
|
88382
88382
|
|
|
88383
|
-
var _excluded$1r = ["children", "className"];
|
|
88383
|
+
var _excluded$1r = ["children", "className", "responsive"];
|
|
88384
|
+
var prefixCls$c = 'lm_container';
|
|
88385
|
+
|
|
88386
|
+
var LMContainer = function LMContainer(props) {
|
|
88387
|
+
var children = props.children,
|
|
88388
|
+
className = props.className,
|
|
88389
|
+
responsive = props.responsive,
|
|
88390
|
+
others = _objectWithoutProperties(props, _excluded$1r);
|
|
88391
|
+
|
|
88392
|
+
var _useState = React.useState({
|
|
88393
|
+
width: '100%',
|
|
88394
|
+
height: '100%'
|
|
88395
|
+
}),
|
|
88396
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
88397
|
+
containerSize = _useState2[0],
|
|
88398
|
+
setContainerSize = _useState2[1];
|
|
88399
|
+
|
|
88400
|
+
var containerWrapRef = React.useRef(null);
|
|
88401
|
+
var throttleSize = React.useCallback(function () {
|
|
88402
|
+
var width = containerSize.width,
|
|
88403
|
+
height = containerSize.height;
|
|
88404
|
+
var responsiveCls = responsive && width !== '100%' ? 'responsive' : '';
|
|
88405
|
+
var lm_col = '';
|
|
88406
|
+
|
|
88407
|
+
if (responsiveCls) {
|
|
88408
|
+
if (parseInt(width) < 990) {
|
|
88409
|
+
lm_col = 'lm_col_3';
|
|
88410
|
+
} else if (parseInt(width) < 1390) {
|
|
88411
|
+
lm_col = 'lm_col_4';
|
|
88412
|
+
} else {
|
|
88413
|
+
lm_col = 'lm_col_5';
|
|
88414
|
+
}
|
|
88415
|
+
}
|
|
88416
|
+
|
|
88417
|
+
var classes = classnames(className, prefixCls$c, responsiveCls, lm_col);
|
|
88418
|
+
return /*#__PURE__*/React__default['default'].createElement("div", _objectSpread(_objectSpread({
|
|
88419
|
+
ref: containerWrapRef,
|
|
88420
|
+
className: classes
|
|
88421
|
+
}, others), {}, {
|
|
88422
|
+
style: {
|
|
88423
|
+
width: width,
|
|
88424
|
+
height: height
|
|
88425
|
+
}
|
|
88426
|
+
}), children);
|
|
88427
|
+
}, [containerSize, props]);
|
|
88428
|
+
|
|
88429
|
+
var changeSize = function changeSize() {
|
|
88430
|
+
var _containerWrapRef$cur;
|
|
88431
|
+
|
|
88432
|
+
var _ref = ((_containerWrapRef$cur = containerWrapRef.current) === null || _containerWrapRef$cur === void 0 ? void 0 : _containerWrapRef$cur.getBoundingClientRect()) || {},
|
|
88433
|
+
_ref$width = _ref.width,
|
|
88434
|
+
width = _ref$width === void 0 ? '100%' : _ref$width;
|
|
88435
|
+
|
|
88436
|
+
setContainerSize({
|
|
88437
|
+
width: width,
|
|
88438
|
+
height: '100%'
|
|
88439
|
+
});
|
|
88440
|
+
};
|
|
88441
|
+
|
|
88442
|
+
var handResize = lodash.throttle(changeSize, 600);
|
|
88443
|
+
React.useEffect(function () {
|
|
88444
|
+
setTimeout(function () {
|
|
88445
|
+
changeSize();
|
|
88446
|
+
}, 100);
|
|
88447
|
+
window.addEventListener('resize', handResize);
|
|
88448
|
+
return function () {
|
|
88449
|
+
window.removeEventListener('resize', handResize);
|
|
88450
|
+
};
|
|
88451
|
+
}, []);
|
|
88452
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
88453
|
+
className: "lm_container_wrapper",
|
|
88454
|
+
ref: containerWrapRef,
|
|
88455
|
+
style: {
|
|
88456
|
+
width: '100%',
|
|
88457
|
+
height: '100%'
|
|
88458
|
+
}
|
|
88459
|
+
}, throttleSize());
|
|
88460
|
+
};
|
|
88461
|
+
|
|
88462
|
+
var _excluded$1s = ["children", "className", "responsive"];
|
|
88384
88463
|
var classNamePrefix = 'lm_form';
|
|
88385
88464
|
|
|
88386
88465
|
var LMForm = function LMForm(props, ref) {
|
|
88387
88466
|
var children = props.children,
|
|
88388
88467
|
className = props.className,
|
|
88389
|
-
|
|
88468
|
+
responsive = props.responsive,
|
|
88469
|
+
restProps = _objectWithoutProperties(props, _excluded$1s);
|
|
88470
|
+
|
|
88471
|
+
if (responsive) {
|
|
88472
|
+
return /*#__PURE__*/React__default['default'].createElement(LMContainer, {
|
|
88473
|
+
responsive: true
|
|
88474
|
+
}, /*#__PURE__*/React__default['default'].createElement(_Form__default['default'], _objectSpread({
|
|
88475
|
+
ref: ref,
|
|
88476
|
+
className: classnames(classNamePrefix, className),
|
|
88477
|
+
colon: false
|
|
88478
|
+
}, restProps), children));
|
|
88479
|
+
}
|
|
88390
88480
|
|
|
88391
88481
|
return /*#__PURE__*/React__default['default'].createElement(_Form__default['default'], _objectSpread({
|
|
88392
88482
|
ref: ref,
|
|
@@ -88453,13 +88543,13 @@
|
|
|
88453
88543
|
}, children);
|
|
88454
88544
|
};
|
|
88455
88545
|
|
|
88456
|
-
var _excluded$
|
|
88546
|
+
var _excluded$1t = ["data-row-key", "children", "className"];
|
|
88457
88547
|
|
|
88458
88548
|
var SortableItem$1 = function SortableItem(props) {
|
|
88459
88549
|
var key = props['data-row-key'],
|
|
88460
88550
|
children = props.children,
|
|
88461
88551
|
className = props.className,
|
|
88462
|
-
resetField = _objectWithoutProperties(props, _excluded$
|
|
88552
|
+
resetField = _objectWithoutProperties(props, _excluded$1t);
|
|
88463
88553
|
|
|
88464
88554
|
var _useSortable = useSortable({
|
|
88465
88555
|
id: key
|
|
@@ -88499,7 +88589,7 @@
|
|
|
88499
88589
|
}));
|
|
88500
88590
|
};
|
|
88501
88591
|
|
|
88502
|
-
var _excluded$
|
|
88592
|
+
var _excluded$1u = ["index"],
|
|
88503
88593
|
_excluded2$n = ["index"],
|
|
88504
88594
|
_excluded3$7 = ["value", "onChange"],
|
|
88505
88595
|
_excluded4$3 = ["record", "rowKey", "isEdit", "col", "handleTableRowDelete", "handleTableRowAdd", "getLength", "isHoverEdit", "editEnum", "valueType", "children", "handleSave", "handleAdd", "handleDelete", "itemProps", "setValid", "reWriteOriginSource"],
|
|
@@ -88510,7 +88600,7 @@
|
|
|
88510
88600
|
|
|
88511
88601
|
var EditableRow$1 = function EditableRow(_ref) {
|
|
88512
88602
|
var index = _ref.index,
|
|
88513
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
88603
|
+
props = _objectWithoutProperties(_ref, _excluded$1u);
|
|
88514
88604
|
|
|
88515
88605
|
var _Form$useForm = _Form__default['default'].useForm(),
|
|
88516
88606
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
@@ -89348,7 +89438,7 @@
|
|
|
89348
89438
|
return targetElement;
|
|
89349
89439
|
}
|
|
89350
89440
|
|
|
89351
|
-
var prefixCls$
|
|
89441
|
+
var prefixCls$d = 'lm_quick_menu';
|
|
89352
89442
|
|
|
89353
89443
|
var LMQuickMenu = function LMQuickMenu(props) {
|
|
89354
89444
|
var className = props.className,
|
|
@@ -89482,7 +89572,7 @@
|
|
|
89482
89572
|
};
|
|
89483
89573
|
}, []);
|
|
89484
89574
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
89485
|
-
className: classnames(prefixCls$
|
|
89575
|
+
className: classnames(prefixCls$d),
|
|
89486
89576
|
onMouseEnter: function onMouseEnter() {
|
|
89487
89577
|
if (scrollTimeOut.current) {
|
|
89488
89578
|
clearTimeout(scrollTimeOut.current);
|
|
@@ -95834,11 +95924,11 @@
|
|
|
95834
95924
|
});
|
|
95835
95925
|
MobilePopupInner.displayName = 'MobilePopupInner';
|
|
95836
95926
|
|
|
95837
|
-
var _excluded$
|
|
95927
|
+
var _excluded$1v = ["visible", "mobile"];
|
|
95838
95928
|
var Popup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
95839
95929
|
var visible = _ref.visible,
|
|
95840
95930
|
mobile = _ref.mobile,
|
|
95841
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
95931
|
+
props = _objectWithoutProperties$1(_ref, _excluded$1v);
|
|
95842
95932
|
|
|
95843
95933
|
var _useState = React.useState(visible),
|
|
95844
95934
|
_useState2 = _slicedToArray$1(_useState, 2),
|
|
@@ -98886,7 +98976,7 @@
|
|
|
98886
98976
|
}
|
|
98887
98977
|
}
|
|
98888
98978
|
|
|
98889
|
-
var _excluded$
|
|
98979
|
+
var _excluded$1w = ["prefixCls", "getPopupContainer", "className", "placement", "size", "disabled", "bordered", "placeholder", "status"];
|
|
98890
98980
|
function generateRangePicker(generateConfig) {
|
|
98891
98981
|
var RangePicker$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
98892
98982
|
var customizePrefixCls = props.prefixCls,
|
|
@@ -98899,7 +98989,7 @@
|
|
|
98899
98989
|
bordered = _props$bordered === void 0 ? true : _props$bordered,
|
|
98900
98990
|
placeholder = props.placeholder,
|
|
98901
98991
|
customStatus = props.status,
|
|
98902
|
-
restProps = _objectWithoutProperties(props, _excluded$
|
|
98992
|
+
restProps = _objectWithoutProperties(props, _excluded$1w);
|
|
98903
98993
|
|
|
98904
98994
|
var innerRef = React.useRef(null);
|
|
98905
98995
|
|
|
@@ -99011,7 +99101,7 @@
|
|
|
99011
99101
|
|
|
99012
99102
|
var warning$5 = warning$4;
|
|
99013
99103
|
|
|
99014
|
-
var _excluded$
|
|
99104
|
+
var _excluded$1x = ["prefixCls", "getPopupContainer", "className", "size", "bordered", "placement", "placeholder", "disabled", "status"];
|
|
99015
99105
|
function generatePicker(generateConfig) {
|
|
99016
99106
|
function getPicker(picker, displayName) {
|
|
99017
99107
|
var Picker$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
@@ -99025,7 +99115,7 @@
|
|
|
99025
99115
|
placeholder = props.placeholder,
|
|
99026
99116
|
customDisabled = props.disabled,
|
|
99027
99117
|
customStatus = props.status,
|
|
99028
|
-
restProps = _objectWithoutProperties(props, _excluded$
|
|
99118
|
+
restProps = _objectWithoutProperties(props, _excluded$1x);
|
|
99029
99119
|
|
|
99030
99120
|
console.log(restProps, '---restProps');
|
|
99031
99121
|
warning$5(picker !== 'quarter', displayName, "DatePicker.".concat(displayName, " is legacy usage. Please use DatePicker[picker='").concat(picker, "'] directly."));
|