linkmore-design 1.1.10 → 1.1.12
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/Button/demos/type.d.ts +2 -0
- package/dist/Cascader/demos/formItem.d.ts +2 -0
- package/dist/CustomTableOption/index.d.ts +1 -0
- package/dist/CustomTableOption/locale/en_US.d.ts +19 -0
- package/dist/CustomTableOption/locale/zh_CN.d.ts +19 -0
- package/dist/LmEditTable/demos/priceTable.d.ts +2 -0
- package/dist/LmEditTable/util.d.ts +1 -0
- package/dist/LmFilter/demos/filterControl.d.ts +2 -0
- package/dist/Locale/default.d.ts +4 -1
- package/dist/Locale/zh_CN.d.ts +4 -1
- package/dist/Modal/demos/locale.d.ts +2 -0
- package/dist/Modal/locale.d.ts +7 -0
- package/dist/Select/demos/formItem.d.ts +2 -0
- package/dist/Select/index.d.ts +1 -0
- package/dist/TreeSelect/demos/formItem.d.ts +2 -0
- package/dist/TreeSelect/index.d.ts +8 -3
- package/dist/base.css +1 -0
- package/dist/index.umd.js +394 -206
- package/dist/index.umd.min.js +6 -6
- package/dist/variables.css +45 -12
- package/es/Affix/style/index.css +1 -0
- package/es/Alert/style/index.css +1 -0
- package/es/Approval/style/index.css +1 -0
- package/es/AutoComplete/style/index.css +1 -0
- package/es/Avatar/style/index.css +1 -0
- package/es/Badge/style/index.css +1 -0
- package/es/Breadcrumb/style/index.css +1 -0
- package/es/Button/style/index.css +4 -1
- package/es/Button/style/variables.css +4 -1
- package/es/ButtonTags/style/index.css +1 -0
- package/es/Calendar/style/index.css +1 -0
- package/es/Card/style/index.css +1 -0
- package/es/CardTable/style/index.css +7 -9
- package/es/CardTable/style/variables.css +7 -9
- package/es/Carousel/style/index.css +1 -0
- package/es/Cascader/style/index.css +1 -0
- package/es/Col/style/index.css +1 -0
- package/es/Collapse/style/index.css +1 -0
- package/es/Comment/style/index.css +1 -0
- package/es/CustomTableOption/cardSort.js +21 -16
- package/es/CustomTableOption/columnsSort.js +16 -16
- package/es/CustomTableOption/filterSort.js +11 -11
- package/es/CustomTableOption/index.d.ts +1 -0
- package/es/CustomTableOption/index.js +45 -17
- package/es/CustomTableOption/locale/en_US.d.ts +19 -0
- package/es/CustomTableOption/locale/en_US.js +19 -0
- package/es/CustomTableOption/locale/zh_CN.d.ts +19 -0
- package/es/CustomTableOption/locale/zh_CN.js +19 -0
- package/es/CustomTableOption/style/index.css +5 -0
- package/es/CustomTableOption/style/variables.css +4 -0
- package/es/CustomerService/style/index.css +1 -0
- package/es/DatePicker/style/index.css +1 -0
- package/es/Descriptions/style/index.css +1 -0
- package/es/Divider/style/index.css +1 -0
- package/es/Drawer/style/index.css +1 -0
- package/es/Dropdown/style/index.css +3 -2
- package/es/Dropdown/style/variables.css +2 -2
- package/es/EditTable/style/index.css +1 -0
- package/es/Empty/style/index.css +1 -0
- package/es/Filter/style/index.css +1 -0
- package/es/Form/style/index.css +1 -0
- package/es/FullScreen/style/index.css +1 -0
- package/es/Grid/style/index.css +1 -0
- package/es/Icon/style/index.css +1 -0
- package/es/Image/style/index.css +1 -0
- package/es/Input/style/index.css +1 -0
- package/es/InputNumber/style/index.css +1 -0
- package/es/Layout/style/index.css +1 -0
- package/es/LeftTable/index.js +3 -1
- package/es/LeftTable/style/index.css +1 -0
- package/es/List/style/index.css +1 -0
- package/es/LmEditTable/EditTable.js +102 -98
- package/es/LmEditTable/style/index.css +23 -0
- package/es/LmEditTable/style/variables.css +22 -0
- package/es/LmEditTable/util.d.ts +1 -0
- package/es/LmEditTable/util.js +27 -0
- package/es/LmSelect/style/index.css +1 -0
- package/es/LmTable/style/index.css +1 -0
- package/es/Locale/default.d.ts +4 -1
- package/es/Locale/default.js +3 -1
- package/es/Locale/zh_CN.d.ts +4 -1
- package/es/Locale/zh_CN.js +3 -1
- package/es/Mentions/style/index.css +1 -0
- package/es/Menu/style/index.css +1 -0
- package/es/Modal/index.js +18 -14
- package/es/Modal/locale.d.ts +7 -0
- package/es/Modal/locale.js +12 -0
- package/es/Modal/style/index.css +1 -0
- package/es/PageHeader/style/index.css +1 -0
- package/es/Pagination/style/index.css +1 -0
- package/es/Popconfirm/style/index.css +1 -0
- package/es/Popover/style/index.css +1 -0
- package/es/Progress/style/index.css +1 -0
- package/es/QuickMenu/style/index.css +6 -0
- package/es/QuickMenu/style/variables.css +5 -0
- package/es/Rate/style/index.css +1 -0
- package/es/Result/style/index.css +1 -0
- package/es/Row/style/index.css +1 -0
- package/es/Segmented/style/index.css +1 -0
- package/es/Select/index.d.ts +1 -0
- package/es/Select/index.js +38 -4
- package/es/Select/style/index.css +1 -0
- package/es/Skeleton/style/index.css +1 -0
- package/es/Slider/style/index.css +1 -0
- package/es/Space/style/index.css +1 -0
- package/es/Spin/style/index.css +1 -0
- package/es/Statistic/style/index.css +1 -0
- package/es/Steps/style/index.css +1 -0
- package/es/Switch/style/index.css +1 -0
- package/es/Table/style/index.css +1 -0
- package/es/Tabs/style/index.css +1 -0
- package/es/Tag/style/index.css +1 -0
- package/es/TimePicker/style/index.css +1 -0
- package/es/Timeline/style/index.css +1 -0
- package/es/Tooltip/style/index.css +1 -0
- package/es/Transfer/style/index.css +1 -0
- package/es/Tree/style/index.css +1 -0
- package/es/TreeSelect/index.d.ts +8 -3
- package/es/TreeSelect/index.js +74 -1
- package/es/TreeSelect/style/index.css +1 -0
- package/es/Typography/style/index.css +1 -0
- package/es/Upload/style/index.css +1 -0
- package/es/locale-provider/style/index.css +1 -0
- package/es/message/style/index.css +1 -0
- package/es/notification/style/index.css +1 -0
- package/es/styles/main.css +1 -0
- package/es/styles/variables.css +45 -12
- package/lib/Affix/style/index.css +1 -0
- package/lib/Alert/style/index.css +1 -0
- package/lib/Approval/style/index.css +1 -0
- package/lib/AutoComplete/style/index.css +1 -0
- package/lib/Avatar/style/index.css +1 -0
- package/lib/Badge/style/index.css +1 -0
- package/lib/Breadcrumb/style/index.css +1 -0
- package/lib/Button/style/index.css +4 -1
- package/lib/Button/style/variables.css +4 -1
- package/lib/ButtonTags/style/index.css +1 -0
- package/lib/Calendar/style/index.css +1 -0
- package/lib/Card/style/index.css +1 -0
- package/lib/CardTable/style/index.css +7 -9
- package/lib/CardTable/style/variables.css +7 -9
- package/lib/Carousel/style/index.css +1 -0
- package/lib/Cascader/style/index.css +1 -0
- package/lib/Col/style/index.css +1 -0
- package/lib/Collapse/style/index.css +1 -0
- package/lib/Comment/style/index.css +1 -0
- package/lib/CustomTableOption/cardSort.js +20 -15
- package/lib/CustomTableOption/columnsSort.js +16 -16
- package/lib/CustomTableOption/filterSort.js +11 -11
- package/lib/CustomTableOption/index.d.ts +1 -0
- package/lib/CustomTableOption/index.js +45 -16
- package/lib/CustomTableOption/locale/en_US.d.ts +19 -0
- package/lib/CustomTableOption/locale/en_US.js +26 -0
- package/lib/CustomTableOption/locale/zh_CN.d.ts +19 -0
- package/lib/CustomTableOption/locale/zh_CN.js +26 -0
- package/lib/CustomTableOption/style/index.css +5 -0
- package/lib/CustomTableOption/style/variables.css +4 -0
- package/lib/CustomerService/style/index.css +1 -0
- package/lib/DatePicker/style/index.css +1 -0
- package/lib/Descriptions/style/index.css +1 -0
- package/lib/Divider/style/index.css +1 -0
- package/lib/Drawer/style/index.css +1 -0
- package/lib/Dropdown/style/index.css +3 -2
- package/lib/Dropdown/style/variables.css +2 -2
- package/lib/EditTable/style/index.css +1 -0
- package/lib/Empty/style/index.css +1 -0
- package/lib/Filter/style/index.css +1 -0
- package/lib/Form/style/index.css +1 -0
- package/lib/FullScreen/style/index.css +1 -0
- package/lib/Grid/style/index.css +1 -0
- package/lib/Icon/style/index.css +1 -0
- package/lib/Image/style/index.css +1 -0
- package/lib/Input/style/index.css +1 -0
- package/lib/InputNumber/style/index.css +1 -0
- package/lib/Layout/style/index.css +1 -0
- package/lib/LeftTable/index.js +3 -1
- package/lib/LeftTable/style/index.css +1 -0
- package/lib/List/style/index.css +1 -0
- package/lib/LmEditTable/EditTable.js +101 -96
- package/lib/LmEditTable/style/index.css +23 -0
- package/lib/LmEditTable/style/variables.css +22 -0
- package/lib/LmEditTable/util.d.ts +1 -0
- package/lib/LmEditTable/util.js +30 -0
- package/lib/LmSelect/style/index.css +1 -0
- package/lib/LmTable/style/index.css +1 -0
- package/lib/Locale/default.d.ts +4 -1
- package/lib/Locale/default.js +4 -1
- package/lib/Locale/zh_CN.d.ts +4 -1
- package/lib/Locale/zh_CN.js +4 -1
- package/lib/Mentions/style/index.css +1 -0
- package/lib/Menu/style/index.css +1 -0
- package/lib/Modal/index.js +22 -14
- package/lib/Modal/locale.d.ts +7 -0
- package/lib/Modal/locale.js +25 -0
- package/lib/Modal/style/index.css +1 -0
- package/lib/PageHeader/style/index.css +1 -0
- package/lib/Pagination/style/index.css +1 -0
- package/lib/Popconfirm/style/index.css +1 -0
- package/lib/Popover/style/index.css +1 -0
- package/lib/Progress/style/index.css +1 -0
- package/lib/QuickMenu/style/index.css +6 -0
- package/lib/QuickMenu/style/variables.css +5 -0
- package/lib/Rate/style/index.css +1 -0
- package/lib/Result/style/index.css +1 -0
- package/lib/Row/style/index.css +1 -0
- package/lib/Segmented/style/index.css +1 -0
- package/lib/Select/index.d.ts +1 -0
- package/lib/Select/index.js +37 -3
- package/lib/Select/style/index.css +1 -0
- package/lib/Skeleton/style/index.css +1 -0
- package/lib/Slider/style/index.css +1 -0
- package/lib/Space/style/index.css +1 -0
- package/lib/Spin/style/index.css +1 -0
- package/lib/Statistic/style/index.css +1 -0
- package/lib/Steps/style/index.css +1 -0
- package/lib/Switch/style/index.css +1 -0
- package/lib/Table/style/index.css +1 -0
- package/lib/Tabs/style/index.css +1 -0
- package/lib/Tag/style/index.css +1 -0
- package/lib/TimePicker/style/index.css +1 -0
- package/lib/Timeline/style/index.css +1 -0
- package/lib/Tooltip/style/index.css +1 -0
- package/lib/Transfer/style/index.css +1 -0
- package/lib/Tree/style/index.css +1 -0
- package/lib/TreeSelect/index.d.ts +8 -3
- package/lib/TreeSelect/index.js +78 -1
- package/lib/TreeSelect/style/index.css +1 -0
- package/lib/Typography/style/index.css +1 -0
- package/lib/Upload/style/index.css +1 -0
- package/lib/locale-provider/style/index.css +1 -0
- package/lib/message/style/index.css +1 -0
- package/lib/notification/style/index.css +1 -0
- package/lib/styles/main.css +1 -0
- package/lib/styles/variables.css +45 -12
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -10496,6 +10496,25 @@
|
|
|
10496
10496
|
|
|
10497
10497
|
var Pagination = /*@__PURE__*/getDefaultExportFromCjs(en_US);
|
|
10498
10498
|
|
|
10499
|
+
var locale$3 = {
|
|
10500
|
+
lang: {
|
|
10501
|
+
setting: 'Personalization Settings',
|
|
10502
|
+
cancel: 'Cancel',
|
|
10503
|
+
confirm: 'Confirm',
|
|
10504
|
+
filterSetting: 'Filter Setting',
|
|
10505
|
+
columnsSetting: 'Columns Setting',
|
|
10506
|
+
cardSetting: 'Card Setting',
|
|
10507
|
+
other: 'Other',
|
|
10508
|
+
listStyle: 'List Style',
|
|
10509
|
+
isSaveSetting: 'Is Save Setting',
|
|
10510
|
+
selectAll: 'selectAll',
|
|
10511
|
+
reset: 'Reset',
|
|
10512
|
+
fixedInLeft: 'Fixed Left',
|
|
10513
|
+
noFixed: 'No Fixed',
|
|
10514
|
+
fixedInRight: 'Fixed Right'
|
|
10515
|
+
}
|
|
10516
|
+
};
|
|
10517
|
+
|
|
10499
10518
|
/* eslint-disable no-template-curly-in-string */
|
|
10500
10519
|
var typeTemplate$2 = '${label} is not a valid ${type}';
|
|
10501
10520
|
var localeValues$1 = {
|
|
@@ -10621,7 +10640,8 @@
|
|
|
10621
10640
|
},
|
|
10622
10641
|
Image: {
|
|
10623
10642
|
preview: 'Preview'
|
|
10624
|
-
}
|
|
10643
|
+
},
|
|
10644
|
+
CustomTableOption: locale$3
|
|
10625
10645
|
};
|
|
10626
10646
|
|
|
10627
10647
|
var LocaleReceiver$1 = /*#__PURE__*/function (_React$Component) {
|
|
@@ -58962,7 +58982,7 @@
|
|
|
58962
58982
|
// If passed a locale key, it will set the locale for this
|
|
58963
58983
|
// instance. Otherwise, it will return the locale configuration
|
|
58964
58984
|
// variables for this instance.
|
|
58965
|
-
function locale$
|
|
58985
|
+
function locale$4(key) {
|
|
58966
58986
|
var newLocaleData;
|
|
58967
58987
|
|
|
58968
58988
|
if (key === undefined) {
|
|
@@ -59842,7 +59862,7 @@
|
|
|
59842
59862
|
proto.isSameOrBefore = isSameOrBefore;
|
|
59843
59863
|
proto.isValid = isValid$2;
|
|
59844
59864
|
proto.lang = lang;
|
|
59845
|
-
proto.locale = locale$
|
|
59865
|
+
proto.locale = locale$4;
|
|
59846
59866
|
proto.localeData = localeData;
|
|
59847
59867
|
proto.max = prototypeMax;
|
|
59848
59868
|
proto.min = prototypeMin;
|
|
@@ -60538,7 +60558,7 @@
|
|
|
60538
60558
|
proto$2.toISOString = toISOString$1;
|
|
60539
60559
|
proto$2.toString = toISOString$1;
|
|
60540
60560
|
proto$2.toJSON = toISOString$1;
|
|
60541
|
-
proto$2.locale = locale$
|
|
60561
|
+
proto$2.locale = locale$4;
|
|
60542
60562
|
proto$2.localeData = localeData;
|
|
60543
60563
|
|
|
60544
60564
|
proto$2.toIsoString = deprecate(
|
|
@@ -189562,7 +189582,9 @@
|
|
|
189562
189582
|
className: useToggle ? "lm_grid_tree ".concat(modeTypeCls) : "lm_grid_tree grid_toggle ".concat(modeTypeCls)
|
|
189563
189583
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
189564
189584
|
className: "grid_tree_title",
|
|
189565
|
-
onClick:
|
|
189585
|
+
onClick: function onClick(e) {
|
|
189586
|
+
onHeaderClick && onHeaderClick(e);
|
|
189587
|
+
}
|
|
189566
189588
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
189567
189589
|
className: "grid_tree_title_left"
|
|
189568
189590
|
}, /*#__PURE__*/React__default['default'].createElement("span", null, useTree.title)), treeType && /*#__PURE__*/React__default['default'].createElement(Index$9, {
|
|
@@ -189912,7 +189934,7 @@
|
|
|
189912
189934
|
};
|
|
189913
189935
|
}
|
|
189914
189936
|
|
|
189915
|
-
var locale$
|
|
189937
|
+
var locale$5 = {
|
|
189916
189938
|
locale: 'zh_CN',
|
|
189917
189939
|
today: '今天',
|
|
189918
189940
|
now: '此刻',
|
|
@@ -189941,12 +189963,12 @@
|
|
|
189941
189963
|
nextCentury: '下一世纪'
|
|
189942
189964
|
};
|
|
189943
189965
|
|
|
189944
|
-
var locale$
|
|
189966
|
+
var locale$6 = {
|
|
189945
189967
|
placeholder: '请选择时间',
|
|
189946
189968
|
rangePlaceholder: ['开始时间', '结束时间']
|
|
189947
189969
|
};
|
|
189948
189970
|
|
|
189949
|
-
var locale$
|
|
189971
|
+
var locale$7 = {
|
|
189950
189972
|
lang: _extends({
|
|
189951
189973
|
placeholder: '请选择日期',
|
|
189952
189974
|
yearPlaceholder: '请选择年份',
|
|
@@ -189958,20 +189980,20 @@
|
|
|
189958
189980
|
rangeMonthPlaceholder: ['开始月份', '结束月份'],
|
|
189959
189981
|
rangeQuarterPlaceholder: ['开始季度', '结束季度'],
|
|
189960
189982
|
rangeWeekPlaceholder: ['开始周', '结束周']
|
|
189961
|
-
}, locale$
|
|
189962
|
-
timePickerLocale: _extends({}, locale$
|
|
189983
|
+
}, locale$5),
|
|
189984
|
+
timePickerLocale: _extends({}, locale$6)
|
|
189963
189985
|
}; // should add whitespace between char in Button
|
|
189964
189986
|
|
|
189965
|
-
locale$
|
|
189987
|
+
locale$7.lang.ok = '确定'; // All settings at:
|
|
189966
189988
|
|
|
189967
189989
|
/* eslint-disable no-template-curly-in-string */
|
|
189968
189990
|
var typeTemplate$3 = '${label}不是一个有效的${type}';
|
|
189969
189991
|
var localeValues$2 = {
|
|
189970
189992
|
locale: 'zh-cn',
|
|
189971
189993
|
Pagination: Pagination$1,
|
|
189972
|
-
DatePicker: locale$
|
|
189973
|
-
TimePicker: locale$
|
|
189974
|
-
Calendar: locale$
|
|
189994
|
+
DatePicker: locale$7,
|
|
189995
|
+
TimePicker: locale$6,
|
|
189996
|
+
Calendar: locale$7,
|
|
189975
189997
|
// locales for all components
|
|
189976
189998
|
global: {
|
|
189977
189999
|
placeholder: '请选择'
|
|
@@ -287926,7 +287948,12 @@
|
|
|
287926
287948
|
}));
|
|
287927
287949
|
};
|
|
287928
287950
|
|
|
287929
|
-
var
|
|
287951
|
+
var runtimeLocale$1 = _objectSpread({}, localeValues$1.Modal);
|
|
287952
|
+
function getConfirmLocale$1() {
|
|
287953
|
+
return runtimeLocale$1;
|
|
287954
|
+
}
|
|
287955
|
+
|
|
287956
|
+
var _excluded$2e = ["wrapClassName", "size", "onOk", "onCancel", "visible", "open"];
|
|
287930
287957
|
var prefixCls$5 = 'lm_modal';
|
|
287931
287958
|
|
|
287932
287959
|
var CLMModal = function CLMModal(props) {
|
|
@@ -287935,34 +287962,36 @@
|
|
|
287935
287962
|
size = _props$size === void 0 ? 'default' : _props$size,
|
|
287936
287963
|
onOk = props.onOk,
|
|
287937
287964
|
onCancel = props.onCancel,
|
|
287938
|
-
_props$okText = props.okText,
|
|
287939
|
-
okText = _props$okText === void 0 ? '确定' : _props$okText,
|
|
287940
|
-
_props$cancelText = props.cancelText,
|
|
287941
|
-
cancelText = _props$cancelText === void 0 ? '取消' : _props$cancelText,
|
|
287942
287965
|
visible = props.visible,
|
|
287943
287966
|
open = props.open,
|
|
287944
287967
|
other = _objectWithoutProperties$1(props, _excluded$2e);
|
|
287945
287968
|
|
|
287946
287969
|
var defaultFooterSize = React__default['default'].useContext(SizeContext$1) || 'middle';
|
|
287947
|
-
|
|
287948
|
-
|
|
287949
|
-
|
|
287950
|
-
|
|
287970
|
+
var defaultFooter = /*#__PURE__*/React__default['default'].createElement(LocaleReceiver$1, {
|
|
287971
|
+
componentName: "Modal",
|
|
287972
|
+
defaultLocale: getConfirmLocale$1()
|
|
287973
|
+
}, function (contextLocale) {
|
|
287974
|
+
var okText = props.okText,
|
|
287975
|
+
cancelText = props.cancelText;
|
|
287976
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(LMButton, _objectSpread({
|
|
287951
287977
|
onClick: onCancel,
|
|
287952
287978
|
key: 'canncel_button',
|
|
287953
287979
|
size: defaultFooterSize
|
|
287954
|
-
}, cancelText), /*#__PURE__*/React__default['default'].createElement(LMButton, {
|
|
287980
|
+
}, props.cancelButtonProps), cancelText || contextLocale.cancelText), /*#__PURE__*/React__default['default'].createElement(LMButton, _objectSpread({
|
|
287955
287981
|
type: "primary",
|
|
287956
287982
|
onClick: onOk,
|
|
287957
287983
|
key: 'ok_button',
|
|
287958
287984
|
size: defaultFooterSize
|
|
287959
|
-
}, okText)
|
|
287985
|
+
}, props.okButtonProps), okText !== null && okText !== void 0 ? okText : contextLocale.okText));
|
|
287986
|
+
});
|
|
287987
|
+
return /*#__PURE__*/React__default['default'].createElement(Modal$1, _objectSpread(_objectSpread({
|
|
287988
|
+
wrapClassName: classnames(wrapClassName, prefixCls$5),
|
|
287989
|
+
width: size === 'default' ? 552 : 416,
|
|
287990
|
+
footer: defaultFooter
|
|
287960
287991
|
}, other), {}, {
|
|
287961
287992
|
onOk: onOk,
|
|
287962
287993
|
onCancel: onCancel,
|
|
287963
|
-
|
|
287964
|
-
visible: visible || open,
|
|
287965
|
-
cancelText: cancelText
|
|
287994
|
+
visible: visible || open
|
|
287966
287995
|
}));
|
|
287967
287996
|
};
|
|
287968
287997
|
|
|
@@ -288070,20 +288099,54 @@
|
|
|
288070
288099
|
|
|
288071
288100
|
LMRadio.Button = Radio$1.Button;
|
|
288072
288101
|
|
|
288073
|
-
var _excluded$2h = ["children", "className", "size", "dropdownClassName"];
|
|
288102
|
+
var _excluded$2h = ["children", "className", "size", "dropdownClassName", "options", "value", "defaultLabel"];
|
|
288074
288103
|
var prefixCls$7 = 'lm_select';
|
|
288075
288104
|
var CLMSelect$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
288076
288105
|
var children = props.children,
|
|
288077
288106
|
className = props.className,
|
|
288078
288107
|
customizeSize = props.size,
|
|
288079
288108
|
dropdownClassName = props.dropdownClassName,
|
|
288109
|
+
options = props.options,
|
|
288110
|
+
value = props.value,
|
|
288111
|
+
defaultLabel = props.defaultLabel,
|
|
288080
288112
|
others = _objectWithoutProperties$1(props, _excluded$2h);
|
|
288081
288113
|
|
|
288082
|
-
var size = customizeSize || React__default['default'].useContext(SizeContext$1) || 'middle';
|
|
288114
|
+
var size = customizeSize || React__default['default'].useContext(SizeContext$1) || 'middle'; // 当前值是否存于选项中
|
|
288115
|
+
|
|
288116
|
+
var hasOption = React.useMemo(function () {
|
|
288117
|
+
var flag = false;
|
|
288118
|
+
|
|
288119
|
+
if (children) {
|
|
288120
|
+
React__default['default'].Children.forEach(children, function (child) {
|
|
288121
|
+
if ( /*#__PURE__*/React__default['default'].isValidElement(child)) {
|
|
288122
|
+
var childValue = child.props.value;
|
|
288123
|
+
|
|
288124
|
+
if (!flag) {
|
|
288125
|
+
flag = childValue === value;
|
|
288126
|
+
}
|
|
288127
|
+
}
|
|
288128
|
+
});
|
|
288129
|
+
}
|
|
288130
|
+
|
|
288131
|
+
if (options) {
|
|
288132
|
+
flag = !!options.some(function (v) {
|
|
288133
|
+
return v.value === value;
|
|
288134
|
+
});
|
|
288135
|
+
}
|
|
288136
|
+
|
|
288137
|
+
return flag;
|
|
288138
|
+
}, [children, value, options]); // 重组value: 传入value但找不到options项时,展示默认label
|
|
288139
|
+
|
|
288140
|
+
var resetValue = React.useMemo(function () {
|
|
288141
|
+
if (value && !hasOption) return defaultLabel !== null && defaultLabel !== void 0 ? defaultLabel : value;
|
|
288142
|
+
return value;
|
|
288143
|
+
}, [value, hasOption]);
|
|
288083
288144
|
return /*#__PURE__*/React__default['default'].createElement(Select$2, _objectSpread(_objectSpread({
|
|
288084
288145
|
className: classnames(className, prefixCls$7),
|
|
288085
288146
|
size: size,
|
|
288086
|
-
ref: ref
|
|
288147
|
+
ref: ref,
|
|
288148
|
+
value: resetValue,
|
|
288149
|
+
options: options
|
|
288087
288150
|
}, others), {}, {
|
|
288088
288151
|
dropdownClassName: classnames('lm_select_dropdown', dropdownClassName)
|
|
288089
288152
|
}), children);
|
|
@@ -292945,10 +293008,10 @@
|
|
|
292945
293008
|
};
|
|
292946
293009
|
return /*#__PURE__*/React__default['default'].createElement("div", _objectSpread({
|
|
292947
293010
|
ref: setNodeRef,
|
|
292948
|
-
className:
|
|
293011
|
+
className: "lm_custom_item",
|
|
292949
293012
|
style: style
|
|
292950
293013
|
}, attributes), /*#__PURE__*/React__default['default'].createElement(LMCheckBox, {
|
|
292951
|
-
checked: ((_props$item = props.item) === null || _props$item === void 0 ? void 0 : _props$item.show)
|
|
293014
|
+
checked: ((_props$item = props.item) === null || _props$item === void 0 ? void 0 : _props$item.show) !== false,
|
|
292952
293015
|
onChange: function onChange(e) {
|
|
292953
293016
|
return props.toggleShow(e.target.checked, props.id);
|
|
292954
293017
|
},
|
|
@@ -292975,7 +293038,7 @@
|
|
|
292975
293038
|
props.addFiexd(props.id, 'right');
|
|
292976
293039
|
}
|
|
292977
293040
|
})), /*#__PURE__*/React__default['default'].createElement(HolderOutlined$2, _objectSpread(_objectSpread({}, listeners), {}, {
|
|
292978
|
-
className:
|
|
293041
|
+
className: "lm_custom_icon sort_item",
|
|
292979
293042
|
style: {
|
|
292980
293043
|
color: 'var(--tip-text-color)'
|
|
292981
293044
|
}
|
|
@@ -293028,7 +293091,7 @@
|
|
|
293028
293091
|
var order = (_colStateValue$item$d = colStateValue[item.dataIndex]) === null || _colStateValue$item$d === void 0 ? void 0 : _colStateValue$item$d.order;
|
|
293029
293092
|
item.fixed = ((_colStateValue$item$d2 = colStateValue[item.dataIndex]) === null || _colStateValue$item$d2 === void 0 ? void 0 : _colStateValue$item$d2.fixed) || undefined;
|
|
293030
293093
|
item.order = [undefined, null].includes(order) ? index : order;
|
|
293031
|
-
item.show = ((_colStateValue$item$d3 = colStateValue[item.dataIndex]) === null || _colStateValue$item$d3 === void 0 ? void 0 : _colStateValue$item$d3.show)
|
|
293094
|
+
item.show = ((_colStateValue$item$d3 = colStateValue[item.dataIndex]) === null || _colStateValue$item$d3 === void 0 ? void 0 : _colStateValue$item$d3.show) !== false;
|
|
293032
293095
|
}
|
|
293033
293096
|
});
|
|
293034
293097
|
var leftSortItem = [];
|
|
@@ -293054,7 +293117,7 @@
|
|
|
293054
293117
|
return item.show !== false;
|
|
293055
293118
|
});
|
|
293056
293119
|
return {
|
|
293057
|
-
indeterminate: (showLength === null || showLength === void 0 ? void 0 : showLength.length) && showLength.length !== localColumns.length
|
|
293120
|
+
indeterminate: !!((showLength === null || showLength === void 0 ? void 0 : showLength.length) && showLength.length !== localColumns.length),
|
|
293058
293121
|
checkAll: showLength.length === localColumns.length
|
|
293059
293122
|
};
|
|
293060
293123
|
}, [localColumns]);
|
|
@@ -293122,7 +293185,7 @@
|
|
|
293122
293185
|
var resultColumns = localColumns.map(function (item) {
|
|
293123
293186
|
if (item.dataIndex === id) {
|
|
293124
293187
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
293125
|
-
show: item.show === false
|
|
293188
|
+
show: item.show === false
|
|
293126
293189
|
});
|
|
293127
293190
|
}
|
|
293128
293191
|
|
|
@@ -293151,7 +293214,7 @@
|
|
|
293151
293214
|
var onCheckAllChange = function onCheckAllChange() {
|
|
293152
293215
|
var resultColumns = localColumns.map(function (item) {
|
|
293153
293216
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
293154
|
-
show: isCheckAll.checkAll
|
|
293217
|
+
show: !isCheckAll.checkAll
|
|
293155
293218
|
});
|
|
293156
293219
|
});
|
|
293157
293220
|
setLocalColumns(resultColumns);
|
|
@@ -293168,15 +293231,15 @@
|
|
|
293168
293231
|
obj[item.dataIndex] = {};
|
|
293169
293232
|
|
|
293170
293233
|
if (![undefined, null].includes(item.order)) {
|
|
293171
|
-
obj[item.dataIndex]
|
|
293234
|
+
obj[item.dataIndex].order = item.order;
|
|
293172
293235
|
}
|
|
293173
293236
|
|
|
293174
293237
|
if (![undefined, null].includes(item.show)) {
|
|
293175
|
-
obj[item.dataIndex]
|
|
293238
|
+
obj[item.dataIndex].show = item.show;
|
|
293176
293239
|
}
|
|
293177
293240
|
|
|
293178
293241
|
if (![undefined, null].includes(item.fixed)) {
|
|
293179
|
-
obj[item.dataIndex]
|
|
293242
|
+
obj[item.dataIndex].fixed = item.fixed;
|
|
293180
293243
|
}
|
|
293181
293244
|
});
|
|
293182
293245
|
return obj;
|
|
@@ -293184,9 +293247,9 @@
|
|
|
293184
293247
|
};
|
|
293185
293248
|
});
|
|
293186
293249
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
293187
|
-
className:
|
|
293250
|
+
className: "lm_custom_option_columns"
|
|
293188
293251
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
293189
|
-
className:
|
|
293252
|
+
className: "global_search"
|
|
293190
293253
|
}, /*#__PURE__*/React__default['default'].createElement(Search$1, {
|
|
293191
293254
|
value: searchIngValue,
|
|
293192
293255
|
onChange: function onChange(e) {
|
|
@@ -293194,7 +293257,7 @@
|
|
|
293194
293257
|
},
|
|
293195
293258
|
onSearch: handleSearch
|
|
293196
293259
|
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
293197
|
-
className:
|
|
293260
|
+
className: "global_setting"
|
|
293198
293261
|
}, /*#__PURE__*/React__default['default'].createElement(LMCheckBox, {
|
|
293199
293262
|
indeterminate: isCheckAll.indeterminate,
|
|
293200
293263
|
onChange: onCheckAllChange,
|
|
@@ -293204,7 +293267,7 @@
|
|
|
293204
293267
|
return setLocalColumns(columns);
|
|
293205
293268
|
}
|
|
293206
293269
|
}, "\u91CD\u7F6E")), !!((_sortMenu$leftSortIte = sortMenu.leftSortItem) === null || _sortMenu$leftSortIte === void 0 ? void 0 : _sortMenu$leftSortIte.length) && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("label", {
|
|
293207
|
-
className:
|
|
293270
|
+
className: "fixed_title"
|
|
293208
293271
|
}, "\u56FA\u5B9A\u5728\u5DE6\u4FA7"), /*#__PURE__*/React__default['default'].createElement(DndContext, {
|
|
293209
293272
|
sensors: leftSensors,
|
|
293210
293273
|
collisionDetection: closestCenter,
|
|
@@ -293223,7 +293286,7 @@
|
|
|
293223
293286
|
id: item.dataIndex
|
|
293224
293287
|
});
|
|
293225
293288
|
})))), !!((_sortMenu$items = sortMenu.items) === null || _sortMenu$items === void 0 ? void 0 : _sortMenu$items.length) && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("label", {
|
|
293226
|
-
className:
|
|
293289
|
+
className: "fixed_title"
|
|
293227
293290
|
}, " \u4E0D\u56FA\u5B9A "), /*#__PURE__*/React__default['default'].createElement(DndContext, {
|
|
293228
293291
|
sensors: sensors,
|
|
293229
293292
|
collisionDetection: closestCenter,
|
|
@@ -293242,7 +293305,7 @@
|
|
|
293242
293305
|
id: item.dataIndex
|
|
293243
293306
|
});
|
|
293244
293307
|
})))), !!((_sortMenu$rigthSortIt = sortMenu.rigthSortItem) === null || _sortMenu$rigthSortIt === void 0 ? void 0 : _sortMenu$rigthSortIt.length) && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("label", {
|
|
293245
|
-
className:
|
|
293308
|
+
className: "fixed_title"
|
|
293246
293309
|
}, "\u56FA\u5B9A\u5728\u53F3\u4FA7"), /*#__PURE__*/React__default['default'].createElement(DndContext, {
|
|
293247
293310
|
sensors: rightSensors,
|
|
293248
293311
|
collisionDetection: closestCenter,
|
|
@@ -293284,16 +293347,16 @@
|
|
|
293284
293347
|
};
|
|
293285
293348
|
return /*#__PURE__*/React__default['default'].createElement("div", _objectSpread({
|
|
293286
293349
|
ref: setNodeRef,
|
|
293287
|
-
className:
|
|
293350
|
+
className: "lm_custom_item",
|
|
293288
293351
|
style: style
|
|
293289
293352
|
}, attributes), /*#__PURE__*/React__default['default'].createElement(LMCheckBox, {
|
|
293290
|
-
checked: ((_props$item = props.item) === null || _props$item === void 0 ? void 0 : _props$item.show)
|
|
293353
|
+
checked: (props === null || props === void 0 ? void 0 : (_props$item = props.item) === null || _props$item === void 0 ? void 0 : _props$item.show) !== false,
|
|
293291
293354
|
onChange: function onChange(e) {
|
|
293292
|
-
return props.toggleShow(e.target.checked, props.id);
|
|
293355
|
+
return props === null || props === void 0 ? void 0 : props.toggleShow(e.target.checked, props === null || props === void 0 ? void 0 : props.id);
|
|
293293
293356
|
},
|
|
293294
293357
|
className: "filter_item-content"
|
|
293295
|
-
}, (_props$item2 = props.item) === null || _props$item2 === void 0 ? void 0 : _props$item2.title), /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(HolderOutlined$2, _objectSpread(_objectSpread({}, listeners), {}, {
|
|
293296
|
-
className:
|
|
293358
|
+
}, props === null || props === void 0 ? void 0 : (_props$item2 = props.item) === null || _props$item2 === void 0 ? void 0 : _props$item2.title), /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(HolderOutlined$2, _objectSpread(_objectSpread({}, listeners), {}, {
|
|
293359
|
+
className: "lm_custom_icon sort_item"
|
|
293297
293360
|
}))));
|
|
293298
293361
|
};
|
|
293299
293362
|
/** order show */
|
|
@@ -293303,7 +293366,8 @@
|
|
|
293303
293366
|
var _ref$card = _ref.card,
|
|
293304
293367
|
card = _ref$card === void 0 ? [] : _ref$card,
|
|
293305
293368
|
_ref$cardStateValue = _ref.cardStateValue,
|
|
293306
|
-
cardStateValue = _ref$cardStateValue === void 0 ? {} : _ref$cardStateValue
|
|
293369
|
+
cardStateValue = _ref$cardStateValue === void 0 ? {} : _ref$cardStateValue,
|
|
293370
|
+
showPromptNum = _ref.showPromptNum;
|
|
293307
293371
|
|
|
293308
293372
|
var _useState = React.useState([]),
|
|
293309
293373
|
_useState2 = _slicedToArray$1(_useState, 2),
|
|
@@ -293347,7 +293411,7 @@
|
|
|
293347
293411
|
return item.show !== false;
|
|
293348
293412
|
});
|
|
293349
293413
|
return {
|
|
293350
|
-
indeterminate: (showLength === null || showLength === void 0 ? void 0 : showLength.length) && showLength.length !== localCard.length
|
|
293414
|
+
indeterminate: !!((showLength === null || showLength === void 0 ? void 0 : showLength.length) && showLength.length !== localCard.length),
|
|
293351
293415
|
checkAll: showLength.length === localCard.length
|
|
293352
293416
|
};
|
|
293353
293417
|
}, [localCard]);
|
|
@@ -293393,7 +293457,7 @@
|
|
|
293393
293457
|
var resultColumns = localCard.map(function (item) {
|
|
293394
293458
|
if (item.dataIndex === id) {
|
|
293395
293459
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
293396
|
-
show: item.show === false
|
|
293460
|
+
show: item.show === false
|
|
293397
293461
|
});
|
|
293398
293462
|
}
|
|
293399
293463
|
|
|
@@ -293407,7 +293471,7 @@
|
|
|
293407
293471
|
var onCheckAllChange = function onCheckAllChange() {
|
|
293408
293472
|
var resultColumns = localCard.map(function (item) {
|
|
293409
293473
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
293410
|
-
show: isCheckAll.checkAll
|
|
293474
|
+
show: !isCheckAll.checkAll
|
|
293411
293475
|
});
|
|
293412
293476
|
});
|
|
293413
293477
|
setLocalCard(resultColumns);
|
|
@@ -293424,11 +293488,11 @@
|
|
|
293424
293488
|
obj[item.dataIndex] = {};
|
|
293425
293489
|
|
|
293426
293490
|
if (![undefined, null].includes(item.order)) {
|
|
293427
|
-
obj[item.dataIndex]
|
|
293491
|
+
obj[item.dataIndex].order = item.order;
|
|
293428
293492
|
}
|
|
293429
293493
|
|
|
293430
293494
|
if (![undefined, null].includes(item.show)) {
|
|
293431
|
-
obj[item.dataIndex]
|
|
293495
|
+
obj[item.dataIndex].show = item.show;
|
|
293432
293496
|
}
|
|
293433
293497
|
});
|
|
293434
293498
|
return obj;
|
|
@@ -293436,17 +293500,21 @@
|
|
|
293436
293500
|
};
|
|
293437
293501
|
});
|
|
293438
293502
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
293439
|
-
className:
|
|
293503
|
+
className: "lm_custom_option_columns"
|
|
293440
293504
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
293441
|
-
className:
|
|
293505
|
+
className: "global_search"
|
|
293442
293506
|
}, /*#__PURE__*/React__default['default'].createElement(Search$2, {
|
|
293443
293507
|
value: searchIngValue,
|
|
293444
293508
|
onChange: function onChange(e) {
|
|
293445
293509
|
return setSearchIngValue(e.target.value);
|
|
293446
293510
|
},
|
|
293447
293511
|
onSearch: handleSearch
|
|
293448
|
-
})), /*#__PURE__*/React__default['default'].createElement("
|
|
293449
|
-
className:
|
|
293512
|
+
})), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
293513
|
+
className: "card_prompt"
|
|
293514
|
+
}, /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
293515
|
+
type: "lmweb-warning-circle"
|
|
293516
|
+
}), " \u5361\u7247\u5B57\u6BB5\u5EFA\u8BAE\u6700\u591A\u663E\u793A", showPromptNum || 10, "\u4E2A\u4E3A\u4F18"), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
293517
|
+
className: "global_setting"
|
|
293450
293518
|
}, /*#__PURE__*/React__default['default'].createElement(LMCheckBox, {
|
|
293451
293519
|
indeterminate: isCheckAll.indeterminate,
|
|
293452
293520
|
onChange: onCheckAllChange,
|
|
@@ -293495,16 +293563,16 @@
|
|
|
293495
293563
|
};
|
|
293496
293564
|
return /*#__PURE__*/React__default['default'].createElement("div", _objectSpread({
|
|
293497
293565
|
ref: setNodeRef,
|
|
293498
|
-
className:
|
|
293566
|
+
className: "lm_custom_item",
|
|
293499
293567
|
style: style
|
|
293500
293568
|
}, attributes), /*#__PURE__*/React__default['default'].createElement(LMCheckBox, {
|
|
293501
|
-
checked: ((_props$item = props.item) === null || _props$item === void 0 ? void 0 : _props$item.show)
|
|
293569
|
+
checked: ((_props$item = props.item) === null || _props$item === void 0 ? void 0 : _props$item.show) !== false,
|
|
293502
293570
|
onChange: function onChange(e) {
|
|
293503
293571
|
return props.toggleShow(e.target.checked, props.id);
|
|
293504
293572
|
},
|
|
293505
293573
|
className: "filter_item-content"
|
|
293506
293574
|
}, (_props$item2 = props.item) === null || _props$item2 === void 0 ? void 0 : _props$item2.title), /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(HolderOutlined$2, _objectSpread(_objectSpread({}, listeners), {}, {
|
|
293507
|
-
className:
|
|
293575
|
+
className: "lm_custom_icon sort_item"
|
|
293508
293576
|
}))));
|
|
293509
293577
|
};
|
|
293510
293578
|
/** order show fixed */
|
|
@@ -293558,7 +293626,7 @@
|
|
|
293558
293626
|
return item.show !== false;
|
|
293559
293627
|
});
|
|
293560
293628
|
return {
|
|
293561
|
-
indeterminate: (showLength === null || showLength === void 0 ? void 0 : showLength.length) && showLength.length !== localFilter.length
|
|
293629
|
+
indeterminate: !!((showLength === null || showLength === void 0 ? void 0 : showLength.length) && showLength.length !== localFilter.length),
|
|
293562
293630
|
checkAll: showLength.length === localFilter.length
|
|
293563
293631
|
};
|
|
293564
293632
|
}, [localFilter]);
|
|
@@ -293604,7 +293672,7 @@
|
|
|
293604
293672
|
var resultColumns = localFilter.map(function (item) {
|
|
293605
293673
|
if (item.field === id) {
|
|
293606
293674
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
293607
|
-
show: item.show === false
|
|
293675
|
+
show: item.show === false
|
|
293608
293676
|
});
|
|
293609
293677
|
}
|
|
293610
293678
|
|
|
@@ -293618,7 +293686,7 @@
|
|
|
293618
293686
|
var onCheckAllChange = function onCheckAllChange() {
|
|
293619
293687
|
var resultColumns = localFilter.map(function (item) {
|
|
293620
293688
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
293621
|
-
show: isCheckAll.checkAll
|
|
293689
|
+
show: !isCheckAll.checkAll
|
|
293622
293690
|
});
|
|
293623
293691
|
});
|
|
293624
293692
|
console.log(resultColumns, 'resultColumns');
|
|
@@ -293636,11 +293704,11 @@
|
|
|
293636
293704
|
obj[item.field] = {};
|
|
293637
293705
|
|
|
293638
293706
|
if (![undefined, null].includes(item.order)) {
|
|
293639
|
-
obj[item.field]
|
|
293707
|
+
obj[item.field].order = item.order;
|
|
293640
293708
|
}
|
|
293641
293709
|
|
|
293642
293710
|
if (![undefined, null].includes(item.show)) {
|
|
293643
|
-
obj[item.field]
|
|
293711
|
+
obj[item.field].show = item.show;
|
|
293644
293712
|
}
|
|
293645
293713
|
});
|
|
293646
293714
|
return obj;
|
|
@@ -293648,9 +293716,9 @@
|
|
|
293648
293716
|
};
|
|
293649
293717
|
});
|
|
293650
293718
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
293651
|
-
className:
|
|
293719
|
+
className: "lm_custom_option_columns"
|
|
293652
293720
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
293653
|
-
className:
|
|
293721
|
+
className: "global_search"
|
|
293654
293722
|
}, /*#__PURE__*/React__default['default'].createElement(Search$3, {
|
|
293655
293723
|
value: searchIngValue,
|
|
293656
293724
|
onChange: function onChange(e) {
|
|
@@ -293658,7 +293726,7 @@
|
|
|
293658
293726
|
},
|
|
293659
293727
|
onSearch: handleSearch
|
|
293660
293728
|
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
293661
|
-
className:
|
|
293729
|
+
className: "global_setting"
|
|
293662
293730
|
}, /*#__PURE__*/React__default['default'].createElement(LMCheckBox, {
|
|
293663
293731
|
indeterminate: isCheckAll.indeterminate,
|
|
293664
293732
|
onChange: onCheckAllChange,
|
|
@@ -293702,7 +293770,7 @@
|
|
|
293702
293770
|
}];
|
|
293703
293771
|
var prefixCls$9 = 'lm_custom-table-option';
|
|
293704
293772
|
var LMCustomTableOption = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
293705
|
-
var _lmOptions$filter, _lmOptions$columns, _lmOptions$card;
|
|
293773
|
+
var _lmOptions$filter, _lmOptions$columns, _lmOptions$card, _props$recommendNumOb2;
|
|
293706
293774
|
|
|
293707
293775
|
var className = props.className,
|
|
293708
293776
|
_props$tooltip = props.tooltip,
|
|
@@ -293748,7 +293816,7 @@
|
|
|
293748
293816
|
/** 提交按钮 */
|
|
293749
293817
|
|
|
293750
293818
|
var onOk = function onOk() {
|
|
293751
|
-
var _columnsRef$current, _columnsRef$current2, _filterRef$current, _filterRef$current2, _cardRef$current, _cardRef$current2, _props$
|
|
293819
|
+
var _columnsRef$current, _columnsRef$current2, _filterRef$current, _filterRef$current2, _cardRef$current, _cardRef$current2, _props$recommendNumOb;
|
|
293752
293820
|
|
|
293753
293821
|
/** tableInfo */
|
|
293754
293822
|
var columnsData = (_columnsRef$current = columnsRef.current) === null || _columnsRef$current === void 0 ? void 0 : _columnsRef$current.getColumns();
|
|
@@ -293759,19 +293827,47 @@
|
|
|
293759
293827
|
var filterStateValue = (_filterRef$current2 = filterRef.current) === null || _filterRef$current2 === void 0 ? void 0 : _filterRef$current2.getFilterStateValue();
|
|
293760
293828
|
var cardData = ((_cardRef$current = cardRef.current) === null || _cardRef$current === void 0 ? void 0 : _cardRef$current.getLocalFilter()) || [];
|
|
293761
293829
|
var cardStateValue = ((_cardRef$current2 = cardRef.current) === null || _cardRef$current2 === void 0 ? void 0 : _cardRef$current2.getFilterStateValue()) || {};
|
|
293762
|
-
|
|
293763
|
-
(_props$
|
|
293764
|
-
|
|
293765
|
-
|
|
293766
|
-
|
|
293767
|
-
|
|
293768
|
-
|
|
293769
|
-
|
|
293770
|
-
|
|
293771
|
-
|
|
293772
|
-
|
|
293773
|
-
|
|
293774
|
-
|
|
293830
|
+
|
|
293831
|
+
if (cardData.length > (((_props$recommendNumOb = props.recommendNumObj) === null || _props$recommendNumOb === void 0 ? void 0 : _props$recommendNumOb.card) || 10)) {
|
|
293832
|
+
LMModal.confirm({
|
|
293833
|
+
title: '当前选择的卡片字段数量会导致卡片高度过高,是否继续?',
|
|
293834
|
+
icon: /*#__PURE__*/React__default['default'].createElement(ExclamationCircleOutlined$2, null),
|
|
293835
|
+
content: '',
|
|
293836
|
+
okText: '确认',
|
|
293837
|
+
cancelText: '取消',
|
|
293838
|
+
onOk: function onOk() {
|
|
293839
|
+
var _props$onSave;
|
|
293840
|
+
|
|
293841
|
+
(_props$onSave = props.onSave) === null || _props$onSave === void 0 ? void 0 : _props$onSave.call(props, Object.assign({
|
|
293842
|
+
columnsData: columnsData,
|
|
293843
|
+
ColStateValue: ColStateValue,
|
|
293844
|
+
filterData: filterData,
|
|
293845
|
+
filterStateValue: filterStateValue,
|
|
293846
|
+
size: lmOptions.size,
|
|
293847
|
+
saveSetting: saveSetting
|
|
293848
|
+
}, lmOptions.card.length ? {
|
|
293849
|
+
cardData: cardData,
|
|
293850
|
+
cardStateValue: cardStateValue
|
|
293851
|
+
} : {}));
|
|
293852
|
+
setVisible(false);
|
|
293853
|
+
}
|
|
293854
|
+
});
|
|
293855
|
+
} else {
|
|
293856
|
+
var _props$onSave2;
|
|
293857
|
+
|
|
293858
|
+
(_props$onSave2 = props.onSave) === null || _props$onSave2 === void 0 ? void 0 : _props$onSave2.call(props, Object.assign({
|
|
293859
|
+
columnsData: columnsData,
|
|
293860
|
+
ColStateValue: ColStateValue,
|
|
293861
|
+
filterData: filterData,
|
|
293862
|
+
filterStateValue: filterStateValue,
|
|
293863
|
+
size: lmOptions.size,
|
|
293864
|
+
saveSetting: saveSetting
|
|
293865
|
+
}, lmOptions.card.length ? {
|
|
293866
|
+
cardData: cardData,
|
|
293867
|
+
cardStateValue: cardStateValue
|
|
293868
|
+
} : {}));
|
|
293869
|
+
setVisible(false);
|
|
293870
|
+
}
|
|
293775
293871
|
};
|
|
293776
293872
|
|
|
293777
293873
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(Tooltip$2, _objectSpread({}, tooltip), /*#__PURE__*/React__default['default'].createElement(LMButton, {
|
|
@@ -293818,7 +293914,8 @@
|
|
|
293818
293914
|
forceRender: true
|
|
293819
293915
|
}, /*#__PURE__*/React__default['default'].createElement(FilterSort, {
|
|
293820
293916
|
ref: cardRef,
|
|
293821
|
-
card: lmOptions.card
|
|
293917
|
+
card: lmOptions.card,
|
|
293918
|
+
showPromptNum: ((_props$recommendNumOb2 = props.recommendNumObj) === null || _props$recommendNumOb2 === void 0 ? void 0 : _props$recommendNumOb2.card) || 10
|
|
293822
293919
|
})), /*#__PURE__*/React__default['default'].createElement(TabPane$4, {
|
|
293823
293920
|
tab: "\u5176\u4ED6",
|
|
293824
293921
|
key: "3",
|
|
@@ -311986,6 +312083,32 @@
|
|
|
311986
312083
|
|
|
311987
312084
|
return ['Collapse row', 'Expand row'].includes(children === null || children === void 0 ? void 0 : (_children$ = children[0]) === null || _children$ === void 0 ? void 0 : (_children$$props = _children$.props) === null || _children$$props === void 0 ? void 0 : (_children$$props$chil = _children$$props.children) === null || _children$$props$chil === void 0 ? void 0 : (_children$$props$chil2 = _children$$props$chil[1]) === null || _children$$props$chil2 === void 0 ? void 0 : (_children$$props$chil3 = _children$$props$chil2.props) === null || _children$$props$chil3 === void 0 ? void 0 : _children$$props$chil3['aria-label']);
|
|
311988
312085
|
}
|
|
312086
|
+
function checkRowKeyByDataSource(dataSource, rowKey) {
|
|
312087
|
+
var addRowKey = function addRowKey(children, pkey) {
|
|
312088
|
+
return children === null || children === void 0 ? void 0 : children.map(function (item, index) {
|
|
312089
|
+
if (item.children) {
|
|
312090
|
+
var _objectSpread2;
|
|
312091
|
+
|
|
312092
|
+
var rchildren = addRowKey(item.children, "".concat(pkey, "_").concat(index + 1));
|
|
312093
|
+
return _objectSpread(_objectSpread({}, item), {}, (_objectSpread2 = {}, _defineProperty$1(_objectSpread2, rowKey, item[rowKey] || "".concat(pkey, "_").concat(index + 1)), _defineProperty$1(_objectSpread2, "children", rchildren), _objectSpread2));
|
|
312094
|
+
}
|
|
312095
|
+
|
|
312096
|
+
return _objectSpread(_objectSpread({}, item), {}, _defineProperty$1({}, rowKey, item[rowKey] || "".concat(pkey, "_").concat(index + 1)));
|
|
312097
|
+
});
|
|
312098
|
+
};
|
|
312099
|
+
|
|
312100
|
+
var res = dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (v, idx) {
|
|
312101
|
+
if (v.children) {
|
|
312102
|
+
var _objectSpread4;
|
|
312103
|
+
|
|
312104
|
+
var rchildren = addRowKey(v.children, v[rowKey] || "v".concat(idx + 1));
|
|
312105
|
+
return _objectSpread(_objectSpread({}, v), {}, (_objectSpread4 = {}, _defineProperty$1(_objectSpread4, rowKey, v[rowKey] || "v".concat(idx + 1)), _defineProperty$1(_objectSpread4, "children", rchildren), _objectSpread4));
|
|
312106
|
+
}
|
|
312107
|
+
|
|
312108
|
+
return _objectSpread(_objectSpread({}, v), {}, _defineProperty$1({}, rowKey, v[rowKey] || "v".concat(idx + 1)));
|
|
312109
|
+
});
|
|
312110
|
+
return res;
|
|
312111
|
+
}
|
|
311989
312112
|
|
|
311990
312113
|
var _excluded$2S = ["index"],
|
|
311991
312114
|
_excluded2$I = ["index"],
|
|
@@ -312164,11 +312287,21 @@
|
|
|
312164
312287
|
options = _ref4$options === void 0 ? ['add', 'delete'] : _ref4$options,
|
|
312165
312288
|
getLength = _ref4.getLength,
|
|
312166
312289
|
quickOpetateClearAll = _ref4.quickOpetateClearAll;
|
|
312290
|
+
|
|
312291
|
+
var appendChildren = function appendChildren() {
|
|
312292
|
+
handleAdd === null || handleAdd === void 0 ? void 0 : handleAdd(record, true);
|
|
312293
|
+
};
|
|
312294
|
+
|
|
312295
|
+
var appendAdd = function appendAdd() {
|
|
312296
|
+
handleAdd === null || handleAdd === void 0 ? void 0 : handleAdd(record);
|
|
312297
|
+
};
|
|
312298
|
+
|
|
312167
312299
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
312168
312300
|
style: {
|
|
312169
312301
|
display: 'flex',
|
|
312170
312302
|
alignItems: 'center',
|
|
312171
|
-
justifyContent: '
|
|
312303
|
+
justifyContent: 'flex-start',
|
|
312304
|
+
marginLeft: '-4px'
|
|
312172
312305
|
}
|
|
312173
312306
|
}, options.includes('delete') && /*#__PURE__*/React__default['default'].createElement(LMButton, {
|
|
312174
312307
|
type: "link",
|
|
@@ -312183,7 +312316,27 @@
|
|
|
312183
312316
|
onClick: function onClick() {
|
|
312184
312317
|
return handleDelete(record[rowKey]);
|
|
312185
312318
|
}
|
|
312186
|
-
}), options.includes('add') && /*#__PURE__*/React__default['default'].createElement(
|
|
312319
|
+
}), (options === null || options === void 0 ? void 0 : options.includes('add')) && (options === null || options === void 0 ? void 0 : options.includes('addInChildren')) ? /*#__PURE__*/React__default['default'].createElement(Popover$1, {
|
|
312320
|
+
placement: "bottom",
|
|
312321
|
+
overlayClassName: 'lm_table_append_add_popover',
|
|
312322
|
+
open: open,
|
|
312323
|
+
title: null,
|
|
312324
|
+
content: /*#__PURE__*/React__default['default'].createElement("ul", null, /*#__PURE__*/React__default['default'].createElement("li", {
|
|
312325
|
+
onClick: appendAdd
|
|
312326
|
+
}, "\u6DFB\u52A0\u5E73\u7EA7"), /*#__PURE__*/React__default['default'].createElement("li", {
|
|
312327
|
+
onClick: appendChildren
|
|
312328
|
+
}, "\u6DFB\u52A0\u5B50\u7EA7")),
|
|
312329
|
+
trigger: "hover"
|
|
312330
|
+
}, /*#__PURE__*/React__default['default'].createElement(LMButton, {
|
|
312331
|
+
type: "link",
|
|
312332
|
+
size: "small",
|
|
312333
|
+
icon: /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
312334
|
+
type: "lmweb-plus-circle-fill",
|
|
312335
|
+
style: {
|
|
312336
|
+
fontSize: 16
|
|
312337
|
+
}
|
|
312338
|
+
})
|
|
312339
|
+
})) : /*#__PURE__*/React__default['default'].createElement(LMButton, {
|
|
312187
312340
|
type: "link",
|
|
312188
312341
|
size: "small",
|
|
312189
312342
|
icon: /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
@@ -312193,7 +312346,7 @@
|
|
|
312193
312346
|
}
|
|
312194
312347
|
}),
|
|
312195
312348
|
onClick: function onClick() {
|
|
312196
|
-
return handleAdd(record);
|
|
312349
|
+
return handleAdd(record, (options === null || options === void 0 ? void 0 : options.includes('addInChildren')) ? true : false);
|
|
312197
312350
|
}
|
|
312198
312351
|
}));
|
|
312199
312352
|
}; // const isValidValue = (verifyValue) => {
|
|
@@ -312613,35 +312766,39 @@
|
|
|
312613
312766
|
recordCreatorProps = props.recordCreatorProps,
|
|
312614
312767
|
_props$shouldUpdate = props.shouldUpdate,
|
|
312615
312768
|
shouldUpdate = _props$shouldUpdate === void 0 ? false : _props$shouldUpdate,
|
|
312616
|
-
resetProps = _objectWithoutProperties$1(props, _excluded6);
|
|
312769
|
+
resetProps = _objectWithoutProperties$1(props, _excluded6); // const [dataSource, setDataSource] = useState([]);
|
|
312770
|
+
|
|
312771
|
+
|
|
312772
|
+
var _useControllableValue = useControllableValue({
|
|
312773
|
+
value: checkRowKeyByDataSource(props.value, _rowKey),
|
|
312774
|
+
onChange: props.onChange
|
|
312775
|
+
}),
|
|
312776
|
+
_useControllableValue2 = _slicedToArray$1(_useControllableValue, 2),
|
|
312777
|
+
dataSource = _useControllableValue2[0],
|
|
312778
|
+
setDataSource = _useControllableValue2[1]; // const [count, setCount] = useState(0);
|
|
312617
312779
|
|
|
312618
|
-
var _useState5 = React.useState([]),
|
|
312619
|
-
_useState6 = _slicedToArray$1(_useState5, 2),
|
|
312620
|
-
dataSource = _useState6[0],
|
|
312621
|
-
setDataSource = _useState6[1]; // const [count, setCount] = useState(0);
|
|
312622
312780
|
|
|
312781
|
+
var _useState5 = React.useState({}),
|
|
312782
|
+
_useState6 = _slicedToArray$1(_useState5, 2),
|
|
312783
|
+
_valid = _useState6[0],
|
|
312784
|
+
setValid = _useState6[1];
|
|
312623
312785
|
|
|
312624
|
-
var _useState7 = React.useState(
|
|
312786
|
+
var _useState7 = React.useState([]),
|
|
312625
312787
|
_useState8 = _slicedToArray$1(_useState7, 2),
|
|
312626
|
-
|
|
312627
|
-
|
|
312788
|
+
localRowSelectList = _useState8[0],
|
|
312789
|
+
setLocalRowSelectList = _useState8[1];
|
|
312628
312790
|
|
|
312629
312791
|
var _useState9 = React.useState([]),
|
|
312630
312792
|
_useState10 = _slicedToArray$1(_useState9, 2),
|
|
312631
|
-
|
|
312632
|
-
|
|
312633
|
-
|
|
312634
|
-
var _useState11 = React.useState([]),
|
|
312635
|
-
_useState12 = _slicedToArray$1(_useState11, 2),
|
|
312636
|
-
sortEditTable = _useState12[0],
|
|
312637
|
-
setCallBackFalg = _useState12[1];
|
|
312793
|
+
sortEditTable = _useState10[0],
|
|
312794
|
+
setCallBackFalg = _useState10[1];
|
|
312638
312795
|
/** 当前展开的列 */
|
|
312639
312796
|
|
|
312640
312797
|
|
|
312641
|
-
var
|
|
312642
|
-
|
|
312643
|
-
expandedRowKeys =
|
|
312644
|
-
setExpandedRowKeys =
|
|
312798
|
+
var _useState11 = React.useState([]),
|
|
312799
|
+
_useState12 = _slicedToArray$1(_useState11, 2),
|
|
312800
|
+
expandedRowKeys = _useState12[0],
|
|
312801
|
+
setExpandedRowKeys = _useState12[1];
|
|
312645
312802
|
|
|
312646
312803
|
var dataSourceRef = React.useRef([]);
|
|
312647
312804
|
var sortDataSorceRef = React.useRef([]);
|
|
@@ -312656,12 +312813,7 @@
|
|
|
312656
312813
|
var newIndex = cloneArr.findIndex(function (v) {
|
|
312657
312814
|
return v[_rowKey] === over;
|
|
312658
312815
|
});
|
|
312659
|
-
|
|
312660
|
-
if (onChange) {
|
|
312661
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(arrayMove(cloneArr, oldIndex, newIndex));
|
|
312662
|
-
} else {
|
|
312663
|
-
setDataSource(arrayMove(cloneArr, oldIndex, newIndex));
|
|
312664
|
-
}
|
|
312816
|
+
setDataSource(arrayMove(cloneArr, oldIndex, newIndex));
|
|
312665
312817
|
};
|
|
312666
312818
|
|
|
312667
312819
|
var onColSortEnd = function onColSortEnd(active, over) {
|
|
@@ -312684,8 +312836,9 @@
|
|
|
312684
312836
|
var handleDelete = function handleDelete(key) {
|
|
312685
312837
|
var nValue = dataSource.filter(function (item) {
|
|
312686
312838
|
return item[_rowKey] !== key;
|
|
312687
|
-
});
|
|
312688
|
-
|
|
312839
|
+
}); // onChange?.(nValue)
|
|
312840
|
+
|
|
312841
|
+
setDataSource(nValue);
|
|
312689
312842
|
};
|
|
312690
312843
|
/** 点击添加按钮添加 */
|
|
312691
312844
|
|
|
@@ -312697,12 +312850,12 @@
|
|
|
312697
312850
|
var res = fn(dataSourceRef.current, function (draft) {
|
|
312698
312851
|
draft.push(_objectSpread(_defineProperty$1({}, _rowKey, "".concat(Date.now())), addDataInfo || {}));
|
|
312699
312852
|
});
|
|
312700
|
-
setDataSource(res);
|
|
312701
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(res);
|
|
312853
|
+
setDataSource(res); // onChange?.(res)
|
|
312702
312854
|
};
|
|
312703
312855
|
|
|
312704
312856
|
React.useEffect(function () {
|
|
312705
312857
|
dataSourceRef.current = dataSource;
|
|
312858
|
+
deepDataSourceRef.current = deepDataSourcePreKeys(dataSource, _rowKey);
|
|
312706
312859
|
|
|
312707
312860
|
if (sortOpen) {
|
|
312708
312861
|
var _sortDataSorceRef$cur;
|
|
@@ -312809,12 +312962,7 @@
|
|
|
312809
312962
|
}
|
|
312810
312963
|
}
|
|
312811
312964
|
});
|
|
312812
|
-
|
|
312813
|
-
if (onChange) {
|
|
312814
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(res);
|
|
312815
|
-
} else {
|
|
312816
|
-
setDataSource(res);
|
|
312817
|
-
}
|
|
312965
|
+
setDataSource(res);
|
|
312818
312966
|
};
|
|
312819
312967
|
|
|
312820
312968
|
var reWriteOriginSource = function reWriteOriginSource(rowKey, rowValue, dataIndex, nextValue) {
|
|
@@ -312855,12 +313003,7 @@
|
|
|
312855
313003
|
};
|
|
312856
313004
|
|
|
312857
313005
|
var res = filter(dataSource, key);
|
|
312858
|
-
|
|
312859
|
-
if (onChange) {
|
|
312860
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(res);
|
|
312861
|
-
} else {
|
|
312862
|
-
setDataSource(res);
|
|
312863
|
-
}
|
|
313006
|
+
setDataSource(res);
|
|
312864
313007
|
} else {
|
|
312865
313008
|
var _dataSourceRef$curren;
|
|
312866
313009
|
|
|
@@ -312878,17 +313021,13 @@
|
|
|
312878
313021
|
}
|
|
312879
313022
|
});
|
|
312880
313023
|
|
|
312881
|
-
|
|
312882
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_res);
|
|
312883
|
-
} else {
|
|
312884
|
-
setDataSource(_res);
|
|
312885
|
-
}
|
|
313024
|
+
setDataSource(_res);
|
|
312886
313025
|
}
|
|
312887
313026
|
};
|
|
312888
313027
|
/** 快捷添加 */
|
|
312889
313028
|
|
|
312890
313029
|
|
|
312891
|
-
var handleTableRowAdd = function handleTableRowAdd(record) {
|
|
313030
|
+
var handleTableRowAdd = function handleTableRowAdd(record, isAppendInChindren) {
|
|
312892
313031
|
var _deepDataSourceRef$cu5, _deepDataSourceRef$cu6;
|
|
312893
313032
|
|
|
312894
313033
|
var preKeys = deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : (_deepDataSourceRef$cu5 = deepDataSourceRef.current) === null || _deepDataSourceRef$cu5 === void 0 ? void 0 : (_deepDataSourceRef$cu6 = _deepDataSourceRef$cu5[record[_rowKey]]) === null || _deepDataSourceRef$cu6 === void 0 ? void 0 : _deepDataSourceRef$cu6.preKeys;
|
|
@@ -312898,7 +313037,19 @@
|
|
|
312898
313037
|
children === null || children === void 0 ? void 0 : children.forEach(function (item, index) {
|
|
312899
313038
|
if (preKeys === null || preKeys === void 0 ? void 0 : preKeys.includes(item[_rowKey])) {
|
|
312900
313039
|
if (item[_rowKey] === record[_rowKey]) {
|
|
312901
|
-
|
|
313040
|
+
if (isAppendInChindren) {
|
|
313041
|
+
if (item === null || item === void 0 ? void 0 : item.children) {
|
|
313042
|
+
var _item$children;
|
|
313043
|
+
|
|
313044
|
+
item === null || item === void 0 ? void 0 : (_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.push(_defineProperty$1({}, _rowKey, "".concat(Date.now())));
|
|
313045
|
+
} else {
|
|
313046
|
+
item.children = [_defineProperty$1({}, _rowKey, "".concat(Date.now()))];
|
|
313047
|
+
}
|
|
313048
|
+
|
|
313049
|
+
!expandedRowKeys.includes(item[_rowKey]) && setExpandedRowKeys([].concat(_toConsumableArray$1(expandedRowKeys), [item[_rowKey]]));
|
|
313050
|
+
} else {
|
|
313051
|
+
children.splice(index + 1, 0, _defineProperty$1({}, _rowKey, "".concat(Date.now())));
|
|
313052
|
+
}
|
|
312902
313053
|
} else if (item.children) {
|
|
312903
313054
|
deeps(item.children);
|
|
312904
313055
|
}
|
|
@@ -312913,16 +313064,25 @@
|
|
|
312913
313064
|
});
|
|
312914
313065
|
|
|
312915
313066
|
if (index !== -1) {
|
|
312916
|
-
|
|
313067
|
+
if (isAppendInChindren) {
|
|
313068
|
+
var _draft$index$children, _draft$index, _draft$index2;
|
|
313069
|
+
|
|
313070
|
+
if ((_draft$index$children = draft[index].children) === null || _draft$index$children === void 0 ? void 0 : _draft$index$children.length) {
|
|
313071
|
+
var _draft$index$children2;
|
|
313072
|
+
|
|
313073
|
+
(_draft$index$children2 = draft[index].children) === null || _draft$index$children2 === void 0 ? void 0 : _draft$index$children2.push(_defineProperty$1({}, _rowKey, "".concat(Date.now())));
|
|
313074
|
+
} else {
|
|
313075
|
+
draft[index].children = [_defineProperty$1({}, _rowKey, "".concat(Date.now()))];
|
|
313076
|
+
}
|
|
313077
|
+
|
|
313078
|
+
!expandedRowKeys.includes((_draft$index = draft[index]) === null || _draft$index === void 0 ? void 0 : _draft$index[_rowKey]) && setExpandedRowKeys([].concat(_toConsumableArray$1(expandedRowKeys), [(_draft$index2 = draft[index]) === null || _draft$index2 === void 0 ? void 0 : _draft$index2[_rowKey]]));
|
|
313079
|
+
} else {
|
|
313080
|
+
draft.splice(index + 1, 0, _defineProperty$1({}, _rowKey, "".concat(Date.now())));
|
|
313081
|
+
}
|
|
312917
313082
|
}
|
|
312918
313083
|
}
|
|
312919
313084
|
});
|
|
312920
|
-
|
|
312921
|
-
if (onChange) {
|
|
312922
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(res);
|
|
312923
|
-
} else {
|
|
312924
|
-
setDataSource(res);
|
|
312925
|
-
}
|
|
313085
|
+
setDataSource(res);
|
|
312926
313086
|
};
|
|
312927
313087
|
|
|
312928
313088
|
var handleCopy = function handleCopy(key, value) {
|
|
@@ -312931,12 +313091,7 @@
|
|
|
312931
313091
|
return item[key] = value;
|
|
312932
313092
|
});
|
|
312933
313093
|
});
|
|
312934
|
-
|
|
312935
|
-
if (onChange) {
|
|
312936
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(res);
|
|
312937
|
-
} else {
|
|
312938
|
-
setDataSource(res);
|
|
312939
|
-
}
|
|
313094
|
+
setDataSource(res);
|
|
312940
313095
|
};
|
|
312941
313096
|
/** 判断columne中有没有带optionOnly参数 */
|
|
312942
313097
|
|
|
@@ -312960,9 +313115,9 @@
|
|
|
312960
313115
|
|
|
312961
313116
|
var DisableOptions = React.useMemo(function () {
|
|
312962
313117
|
var newColumns = columns === null || columns === void 0 ? void 0 : columns.map(function (item) {
|
|
312963
|
-
var
|
|
312964
|
-
optionOnly =
|
|
312965
|
-
options =
|
|
313118
|
+
var _ref8 = item.componentProps || {},
|
|
313119
|
+
optionOnly = _ref8.optionOnly,
|
|
313120
|
+
options = _ref8.options;
|
|
312966
313121
|
|
|
312967
313122
|
if (optionOnly && options) {
|
|
312968
313123
|
var dataIndex = item.dataIndex;
|
|
@@ -313011,6 +313166,7 @@
|
|
|
313011
313166
|
width: 68,
|
|
313012
313167
|
fixed: 'right',
|
|
313013
313168
|
editable: 'lm_edit_opetate',
|
|
313169
|
+
className: 'lm_edit_opetate',
|
|
313014
313170
|
componentProps: {
|
|
313015
313171
|
options: Array.isArray(useQuickOpetate) ? useQuickOpetate : ['add', 'delete']
|
|
313016
313172
|
}
|
|
@@ -313054,7 +313210,7 @@
|
|
|
313054
313210
|
editable = col.editable,
|
|
313055
313211
|
relevanceCols = col.relevanceCols;
|
|
313056
313212
|
|
|
313057
|
-
if ((col === null || col === void 0 ? void 0 : col.fixed) || hasDisableOptions && hasDisableOptions.includes(dataIndex) || ((_col$componentProps2 = col.componentProps) === null || _col$componentProps2 === void 0 ? void 0 : _col$componentProps2.options) || editable === 'render' || !!relevanceCols || !!shouldUpdate) {
|
|
313213
|
+
if ((col === null || col === void 0 ? void 0 : col.fixed) || hasDisableOptions && hasDisableOptions.includes(dataIndex) || ((_col$componentProps2 = col.componentProps) === null || _col$componentProps2 === void 0 ? void 0 : _col$componentProps2.options) || editable === 'render' || !!relevanceCols || !!shouldUpdate || !!record.children) {
|
|
313058
313214
|
return true;
|
|
313059
313215
|
}
|
|
313060
313216
|
|
|
@@ -313102,10 +313258,10 @@
|
|
|
313102
313258
|
});
|
|
313103
313259
|
return res;
|
|
313104
313260
|
}, [columns, isAdd, sortOpen, useQuickOpetate, sortEditTable, dataSource, _toConsumableArray$1(memoOptions)]);
|
|
313105
|
-
var DraggableContainer = React.useCallback(function (
|
|
313261
|
+
var DraggableContainer = React.useCallback(function (_ref9) {
|
|
313106
313262
|
var _dataSourceRef$curren2;
|
|
313107
313263
|
|
|
313108
|
-
var props = _extends$2({},
|
|
313264
|
+
var props = _extends$2({}, _ref9);
|
|
313109
313265
|
|
|
313110
313266
|
return /*#__PURE__*/React__default['default'].createElement(DndContainer$1, {
|
|
313111
313267
|
move: onSortEnd
|
|
@@ -313115,10 +313271,10 @@
|
|
|
313115
313271
|
})
|
|
313116
313272
|
}, /*#__PURE__*/React__default['default'].createElement("tbody", _objectSpread({}, props))));
|
|
313117
313273
|
}, [sortEditTable]);
|
|
313118
|
-
var colDraggableContainer = React.useCallback(function (
|
|
313274
|
+
var colDraggableContainer = React.useCallback(function (_ref10) {
|
|
313119
313275
|
var _React$Children;
|
|
313120
313276
|
|
|
313121
|
-
var props = _extends$2({},
|
|
313277
|
+
var props = _extends$2({}, _ref10);
|
|
313122
313278
|
|
|
313123
313279
|
return /*#__PURE__*/React__default['default'].createElement("tr", null, (_React$Children = React__default['default'].Children) === null || _React$Children === void 0 ? void 0 : _React$Children.map(props.children, function (child) {
|
|
313124
313280
|
var _child$props, _child$props$column;
|
|
@@ -313160,34 +313316,6 @@
|
|
|
313160
313316
|
components: component
|
|
313161
313317
|
}, resetProps);
|
|
313162
313318
|
}, [resultColumns, dataSource, sortOpen, colSortOpen, size]);
|
|
313163
|
-
React.useEffect(function () {
|
|
313164
|
-
// setDataSource(defaultData?.map((v, idx) => ({ ...v, [rowKey]: v[rowKey] || `v${idx + 1}` })))
|
|
313165
|
-
var addRowKey = function addRowKey(children, pkey) {
|
|
313166
|
-
return children === null || children === void 0 ? void 0 : children.map(function (item, index) {
|
|
313167
|
-
if (item.children) {
|
|
313168
|
-
var _objectSpread6;
|
|
313169
|
-
|
|
313170
|
-
var rchildren = addRowKey(item.children, "".concat(pkey, "_").concat(index + 1));
|
|
313171
|
-
return _objectSpread(_objectSpread({}, item), {}, (_objectSpread6 = {}, _defineProperty$1(_objectSpread6, _rowKey, item[_rowKey] || "".concat(pkey, "_").concat(index + 1)), _defineProperty$1(_objectSpread6, "children", rchildren), _objectSpread6));
|
|
313172
|
-
}
|
|
313173
|
-
|
|
313174
|
-
return _objectSpread(_objectSpread({}, item), {}, _defineProperty$1({}, _rowKey, item[_rowKey] || "".concat(pkey, "_").concat(index + 1)));
|
|
313175
|
-
});
|
|
313176
|
-
};
|
|
313177
|
-
|
|
313178
|
-
var res = defaultData === null || defaultData === void 0 ? void 0 : defaultData.map(function (v, idx) {
|
|
313179
|
-
if (v.children) {
|
|
313180
|
-
var _objectSpread8;
|
|
313181
|
-
|
|
313182
|
-
var rchildren = addRowKey(v.children, v[_rowKey] || "v".concat(idx + 1));
|
|
313183
|
-
return _objectSpread(_objectSpread({}, v), {}, (_objectSpread8 = {}, _defineProperty$1(_objectSpread8, _rowKey, v[_rowKey] || "v".concat(idx + 1)), _defineProperty$1(_objectSpread8, "children", rchildren), _objectSpread8));
|
|
313184
|
-
}
|
|
313185
|
-
|
|
313186
|
-
return _objectSpread(_objectSpread({}, v), {}, _defineProperty$1({}, _rowKey, v[_rowKey] || "v".concat(idx + 1)));
|
|
313187
|
-
});
|
|
313188
|
-
deepDataSourceRef.current = deepDataSourcePreKeys(res, _rowKey);
|
|
313189
|
-
setDataSource(res);
|
|
313190
|
-
}, [defaultData]);
|
|
313191
313319
|
React.useImperativeHandle(ref, function () {
|
|
313192
313320
|
return {
|
|
313193
313321
|
setRow: handleSave,
|
|
@@ -316292,6 +316420,66 @@
|
|
|
316292
316420
|
RefAutoComplete$1.Option = Option;
|
|
316293
316421
|
RefAutoComplete$1.AntdAutoComplete = RefAutoComplete;
|
|
316294
316422
|
|
|
316423
|
+
var _excluded$30 = ["children", "treeData", "value", "defaultLabel"];
|
|
316424
|
+
var CLMTreeSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
316425
|
+
var children = props.children,
|
|
316426
|
+
treeData = props.treeData,
|
|
316427
|
+
value = props.value,
|
|
316428
|
+
defaultLabel = props.defaultLabel,
|
|
316429
|
+
resetProps = _objectWithoutProperties$1(props, _excluded$30);
|
|
316430
|
+
|
|
316431
|
+
var deepChildren = React.useCallback(function (arr) {
|
|
316432
|
+
var flag = false;
|
|
316433
|
+
React__default['default'].Children.forEach(arr, function (child) {
|
|
316434
|
+
if ( /*#__PURE__*/React__default['default'].isValidElement(child)) {
|
|
316435
|
+
var _child$props = child.props,
|
|
316436
|
+
childValue = _child$props.value,
|
|
316437
|
+
childChildren = _child$props.children;
|
|
316438
|
+
|
|
316439
|
+
if (!flag) {
|
|
316440
|
+
if (childValue === value) {
|
|
316441
|
+
flag = true;
|
|
316442
|
+
} else if (childChildren) {
|
|
316443
|
+
flag = deepChildren(childChildren);
|
|
316444
|
+
}
|
|
316445
|
+
}
|
|
316446
|
+
}
|
|
316447
|
+
});
|
|
316448
|
+
return flag;
|
|
316449
|
+
}, [value]);
|
|
316450
|
+
var hasOption = React.useMemo(function () {
|
|
316451
|
+
var flag = false;
|
|
316452
|
+
|
|
316453
|
+
if (children) {
|
|
316454
|
+
flag = deepChildren(children);
|
|
316455
|
+
}
|
|
316456
|
+
|
|
316457
|
+
if (treeData) {
|
|
316458
|
+
var deepFind = function deepFind(arr) {
|
|
316459
|
+
return arr.some(function (v) {
|
|
316460
|
+
if (v.value === value) return true;
|
|
316461
|
+
return v.children && deepFind(v.children);
|
|
316462
|
+
});
|
|
316463
|
+
};
|
|
316464
|
+
|
|
316465
|
+
flag = deepFind(treeData);
|
|
316466
|
+
}
|
|
316467
|
+
|
|
316468
|
+
return flag;
|
|
316469
|
+
}, [children, value, deepChildren]); // 重组value: 传入value但找不到options项时,展示默认label
|
|
316470
|
+
|
|
316471
|
+
var resetValue = React.useMemo(function () {
|
|
316472
|
+
if (value && !hasOption) return defaultLabel !== null && defaultLabel !== void 0 ? defaultLabel : value;
|
|
316473
|
+
return value;
|
|
316474
|
+
}, [value, hasOption]);
|
|
316475
|
+
return /*#__PURE__*/React__default['default'].createElement(TreeSelect$1, _objectSpread({
|
|
316476
|
+
ref: ref,
|
|
316477
|
+
value: resetValue
|
|
316478
|
+
}, resetProps), children);
|
|
316479
|
+
});
|
|
316480
|
+
var LMTreeSelect = CLMTreeSelect;
|
|
316481
|
+
LMTreeSelect.TreeNode = TreeSelect$1.TreeNode;
|
|
316482
|
+
|
|
316295
316483
|
function getDataOrAriaProps$2(props) {
|
|
316296
316484
|
return Object.keys(props).reduce(function (prev, key) {
|
|
316297
316485
|
if ((key.startsWith('data-') || key.startsWith('aria-') || key === 'role') && !key.startsWith('data-__')) {
|
|
@@ -316363,7 +316551,7 @@
|
|
|
316363
316551
|
return ErrorBoundary;
|
|
316364
316552
|
}(React.Component);
|
|
316365
316553
|
|
|
316366
|
-
var _excluded$
|
|
316554
|
+
var _excluded$31 = ["description", "prefixCls", "message", "banner", "className", "style", "onMouseEnter", "onMouseLeave", "onClick", "afterClose", "showIcon", "closable", "closeText", "closeIcon", "action", "duration"];
|
|
316367
316555
|
var iconMapFilled$1 = {
|
|
316368
316556
|
success: CheckCircleFilled$2,
|
|
316369
316557
|
info: InfoCircleFilled$2,
|
|
@@ -316436,7 +316624,7 @@
|
|
|
316436
316624
|
closeIcon = _ref$closeIcon === void 0 ? /*#__PURE__*/React.createElement(CloseOutlined$2, null) : _ref$closeIcon,
|
|
316437
316625
|
action = _ref.action,
|
|
316438
316626
|
duration = _ref.duration,
|
|
316439
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
316627
|
+
props = _objectWithoutProperties$1(_ref, _excluded$31);
|
|
316440
316628
|
|
|
316441
316629
|
var _React$useState = React.useState(false),
|
|
316442
316630
|
_React$useState2 = _slicedToArray$1(_React$useState, 2),
|
|
@@ -316866,7 +317054,7 @@
|
|
|
316866
317054
|
};
|
|
316867
317055
|
};
|
|
316868
317056
|
|
|
316869
|
-
var _excluded$
|
|
317057
|
+
var _excluded$32 = ["className", "onUrge", "onDeleteComment"];
|
|
316870
317058
|
var prefixCls$c = 'lm_approval';
|
|
316871
317059
|
var colors = ['#36BCF1', '#AE86DC', '#8BD248', '#F5A173'];
|
|
316872
317060
|
var cacheColorMap = new Map();
|
|
@@ -317274,7 +317462,7 @@
|
|
|
317274
317462
|
onUrge = _props$onUrge === void 0 ? function () {} : _props$onUrge,
|
|
317275
317463
|
_props$onDeleteCommen2 = props.onDeleteComment,
|
|
317276
317464
|
onDeleteComment = _props$onDeleteCommen2 === void 0 ? function () {} : _props$onDeleteCommen2,
|
|
317277
|
-
others = _objectWithoutProperties$1(props, _excluded$
|
|
317465
|
+
others = _objectWithoutProperties$1(props, _excluded$32);
|
|
317278
317466
|
|
|
317279
317467
|
var _useState = React.useState(false),
|
|
317280
317468
|
_useState2 = _slicedToArray$1(_useState, 2),
|
|
@@ -319065,7 +319253,7 @@
|
|
|
319065
319253
|
return nodes;
|
|
319066
319254
|
}
|
|
319067
319255
|
|
|
319068
|
-
var _excluded$
|
|
319256
|
+
var _excluded$33 = ["defaultExpandAll", "defaultExpandParent", "defaultExpandedKeys"],
|
|
319069
319257
|
_excluded2$J = ["prefixCls", "className"];
|
|
319070
319258
|
var ConfigContext$6 = ConfigProvider$1.ConfigContext;
|
|
319071
319259
|
|
|
@@ -319090,7 +319278,7 @@
|
|
|
319090
319278
|
var defaultExpandAll = _ref2.defaultExpandAll,
|
|
319091
319279
|
defaultExpandParent = _ref2.defaultExpandParent,
|
|
319092
319280
|
defaultExpandedKeys = _ref2.defaultExpandedKeys,
|
|
319093
|
-
props = _objectWithoutProperties$1(_ref2, _excluded$
|
|
319281
|
+
props = _objectWithoutProperties$1(_ref2, _excluded$33);
|
|
319094
319282
|
|
|
319095
319283
|
// Shift click usage
|
|
319096
319284
|
var lastSelectedKey = React.useRef();
|
|
@@ -319588,11 +319776,11 @@
|
|
|
319588
319776
|
blockNode: false
|
|
319589
319777
|
};
|
|
319590
319778
|
|
|
319591
|
-
var _excluded$
|
|
319779
|
+
var _excluded$34 = ["className"];
|
|
319592
319780
|
var prefixCls$d = 'lm_tree';
|
|
319593
319781
|
var LmTree = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
319594
319782
|
var className = props.className,
|
|
319595
|
-
rest = _objectWithoutProperties$1(props, _excluded$
|
|
319783
|
+
rest = _objectWithoutProperties$1(props, _excluded$34);
|
|
319596
319784
|
|
|
319597
319785
|
return /*#__PURE__*/React__default['default'].createElement(Tree$2, _objectSpread(_objectSpread({
|
|
319598
319786
|
ref: ref
|
|
@@ -320651,7 +320839,7 @@
|
|
|
320651
320839
|
}, unitNodes);
|
|
320652
320840
|
}
|
|
320653
320841
|
|
|
320654
|
-
var _excluded$
|
|
320842
|
+
var _excluded$35 = ["prefixCls", "count", "className", "motionClassName", "style", "title", "show", "component", "children"];
|
|
320655
320843
|
|
|
320656
320844
|
var ScrollNumber$1 = function ScrollNumber(_ref) {
|
|
320657
320845
|
var customizePrefixCls = _ref.prefixCls,
|
|
@@ -320664,7 +320852,7 @@
|
|
|
320664
320852
|
_ref$component = _ref.component,
|
|
320665
320853
|
component = _ref$component === void 0 ? 'sup' : _ref$component,
|
|
320666
320854
|
children = _ref.children,
|
|
320667
|
-
restProps = _objectWithoutProperties$1(_ref, _excluded$
|
|
320855
|
+
restProps = _objectWithoutProperties$1(_ref, _excluded$35);
|
|
320668
320856
|
|
|
320669
320857
|
var _React$useContext = React.useContext(ConfigContext$1),
|
|
320670
320858
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
@@ -320714,7 +320902,7 @@
|
|
|
320714
320902
|
return /*#__PURE__*/React.createElement(component, newProps, numberNodes);
|
|
320715
320903
|
};
|
|
320716
320904
|
|
|
320717
|
-
var _excluded$
|
|
320905
|
+
var _excluded$36 = ["prefixCls", "scrollNumberPrefixCls", "children", "status", "text", "color", "count", "overflowCount", "dot", "size", "title", "offset", "style", "className", "showZero"];
|
|
320718
320906
|
|
|
320719
320907
|
var Badge$1 = function Badge(_ref) {
|
|
320720
320908
|
var _classNames, _classNames2;
|
|
@@ -320739,7 +320927,7 @@
|
|
|
320739
320927
|
className = _ref.className,
|
|
320740
320928
|
_ref$showZero = _ref.showZero,
|
|
320741
320929
|
showZero = _ref$showZero === void 0 ? false : _ref$showZero,
|
|
320742
|
-
restProps = _objectWithoutProperties$1(_ref, _excluded$
|
|
320930
|
+
restProps = _objectWithoutProperties$1(_ref, _excluded$36);
|
|
320743
320931
|
|
|
320744
320932
|
var _React$useContext = React.useContext(ConfigContext$1),
|
|
320745
320933
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
@@ -320874,7 +321062,7 @@
|
|
|
320874
321062
|
|
|
320875
321063
|
Badge$1.Ribbon = Ribbon$1;
|
|
320876
321064
|
|
|
320877
|
-
var _excluded$
|
|
321065
|
+
var _excluded$37 = ["prefixCls", "type", "orientation", "orientationMargin", "className", "children", "dashed", "plain"];
|
|
320878
321066
|
|
|
320879
321067
|
var Divider$5 = function Divider(props) {
|
|
320880
321068
|
var _classNames;
|
|
@@ -320893,7 +321081,7 @@
|
|
|
320893
321081
|
children = props.children,
|
|
320894
321082
|
dashed = props.dashed,
|
|
320895
321083
|
plain = props.plain,
|
|
320896
|
-
restProps = _objectWithoutProperties$1(props, _excluded$
|
|
321084
|
+
restProps = _objectWithoutProperties$1(props, _excluded$37);
|
|
320897
321085
|
|
|
320898
321086
|
var prefixCls = getPrefixCls('divider', customizePrefixCls);
|
|
320899
321087
|
var orientationPrefix = orientation.length > 0 ? "-".concat(orientation) : orientation;
|
|
@@ -323409,14 +323597,14 @@
|
|
|
323409
323597
|
|
|
323410
323598
|
var Body$1 = /*#__PURE__*/React__default['default'].memo(Index$b);
|
|
323411
323599
|
|
|
323412
|
-
var _excluded$
|
|
323600
|
+
var _excluded$38 = ["value", "onChange", "leftIcon", "rightIcon"];
|
|
323413
323601
|
|
|
323414
323602
|
var ResetSlider = function ResetSlider(_ref) {
|
|
323415
323603
|
var value = _ref.value,
|
|
323416
323604
|
_onChange = _ref.onChange,
|
|
323417
323605
|
leftIcon = _ref.leftIcon,
|
|
323418
323606
|
rightIcon = _ref.rightIcon,
|
|
323419
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
323607
|
+
props = _objectWithoutProperties$1(_ref, _excluded$38);
|
|
323420
323608
|
|
|
323421
323609
|
// 减
|
|
323422
323610
|
var decrement = function decrement() {
|
|
@@ -324196,7 +324384,7 @@
|
|
|
324196
324384
|
exports.Tooltip = Tooltip$4;
|
|
324197
324385
|
exports.Transfer = Transfer;
|
|
324198
324386
|
exports.Tree = LmTree;
|
|
324199
|
-
exports.TreeSelect =
|
|
324387
|
+
exports.TreeSelect = LMTreeSelect;
|
|
324200
324388
|
exports.Typography = Typography$3;
|
|
324201
324389
|
exports.Upload = LMUpload;
|
|
324202
324390
|
exports.UploadOss = UploadOss;
|