@bit-sun/business-component 2.1.13 → 2.1.15
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/index.esm.js +16 -19
- package/dist/index.js +16 -19
- package/package.json +1 -1
- package/src/components/Business/columnSettingTable/columnSetting.tsx +1 -0
- package/src/components/Business/columnSettingTable/index.tsx +1 -1
- package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +1 -1
- package/src/components/Business/moreTreeTable/index.tsx +52 -52
package/dist/index.esm.js
CHANGED
|
@@ -14234,7 +14234,7 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
14234
14234
|
var columnConfig = _this.getConfigFromlocalstorage();
|
|
14235
14235
|
|
|
14236
14236
|
var initialDataSourceData = columnConfig.length ? datasource.map(function (item) {
|
|
14237
|
-
var _showColumnItem$, _inner
|
|
14237
|
+
var _inner$, _showColumnItem$, _inner$2;
|
|
14238
14238
|
|
|
14239
14239
|
var inner = columnConfig.filter(function (innerItem) {
|
|
14240
14240
|
return innerItem.dataIndex && innerItem.dataIndex === item.dataIndex || innerItem.key && innerItem.key === item.key;
|
|
@@ -14243,8 +14243,9 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
14243
14243
|
return inneritem.dataIndex && inneritem.dataIndex === item.dataIndex || inneritem.key && inneritem.key === item.key;
|
|
14244
14244
|
});
|
|
14245
14245
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
14246
|
+
fixed: inner.length ? (_inner$ = inner[0]) === null || _inner$ === void 0 ? void 0 : _inner$.fixed : item === null || item === void 0 ? void 0 : item.fixed,
|
|
14246
14247
|
key: item.key || item.dataIndex,
|
|
14247
|
-
width: ((_showColumnItem$ = showColumnItem[0]) === null || _showColumnItem$ === void 0 ? void 0 : _showColumnItem$.width) || ((_inner$ = inner[0]) === null || _inner$ === void 0 ? void 0 : _inner
|
|
14248
|
+
width: ((_showColumnItem$ = showColumnItem[0]) === null || _showColumnItem$ === void 0 ? void 0 : _showColumnItem$.width) || ((_inner$2 = inner[0]) === null || _inner$2 === void 0 ? void 0 : _inner$2.width) || item.width,
|
|
14248
14249
|
hidden: columnConfig.length && !inner.length
|
|
14249
14250
|
});
|
|
14250
14251
|
}) : _toConsumableArray(datasource);
|
|
@@ -14979,7 +14980,7 @@ var ColumnSettingSulaTable = /*#__PURE__*/function (_React$Component) {
|
|
|
14979
14980
|
fixed: true
|
|
14980
14981
|
}, /*#__PURE__*/React.createElement(Table.Summary.Row, null, _toConsumableArray(summaryRow).map(function (item, index) {
|
|
14981
14982
|
return /*#__PURE__*/React.createElement(Table.Summary.Cell, {
|
|
14982
|
-
index:
|
|
14983
|
+
index: index
|
|
14983
14984
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
14984
14985
|
type: "danger"
|
|
14985
14986
|
}, summaryInitial.filter(function (inner) {
|
|
@@ -15267,7 +15268,7 @@ var ColumnSettingTable = /*#__PURE__*/function (_React$Component) {
|
|
|
15267
15268
|
fixed: true
|
|
15268
15269
|
}, /*#__PURE__*/React.createElement(Table.Summary.Row, null, _toConsumableArray(summaryRow).map(function (item, index) {
|
|
15269
15270
|
return /*#__PURE__*/React.createElement(Table.Summary.Cell, {
|
|
15270
|
-
index:
|
|
15271
|
+
index: index
|
|
15271
15272
|
}, /*#__PURE__*/React.createElement(Text$1, {
|
|
15272
15273
|
type: "danger"
|
|
15273
15274
|
}, summaryInitial.filter(function (inner) {
|
|
@@ -21267,25 +21268,13 @@ var index$7 = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
21267
21268
|
colSpan: innerItem && innerItem.rowSpan
|
|
21268
21269
|
}, innerItem && innerItem.title);
|
|
21269
21270
|
}));
|
|
21270
|
-
}))), /*#__PURE__*/React.createElement("
|
|
21271
|
-
style: {
|
|
21272
|
-
position: 'absolute',
|
|
21273
|
-
left: "".concat(config.colHeaderWidth, "px"),
|
|
21274
|
-
minWidth: rightAreaWidth,
|
|
21275
|
-
zIndex: 0,
|
|
21276
|
-
top: 0
|
|
21277
|
-
}
|
|
21278
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
21279
|
-
style: {
|
|
21280
|
-
position: 'relative'
|
|
21281
|
-
}
|
|
21282
|
-
}, /*#__PURE__*/React.createElement("table", {
|
|
21271
|
+
}))), /*#__PURE__*/React.createElement("table", {
|
|
21283
21272
|
className: " ".concat('editTable__block', " ", 'table_border_style'),
|
|
21284
21273
|
style: {
|
|
21285
21274
|
width: '100%',
|
|
21286
21275
|
top: 0,
|
|
21287
21276
|
left: "".concat(config.colHeaderWidth, "px"),
|
|
21288
|
-
position: '
|
|
21277
|
+
position: 'absolute',
|
|
21289
21278
|
display: config.tableType === 'col-header-table' ? 'none' : ''
|
|
21290
21279
|
}
|
|
21291
21280
|
}, /*#__PURE__*/React.createElement("colgroup", null, config.rowLastData.map(function (row) {
|
|
@@ -21307,7 +21296,15 @@ var index$7 = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
21307
21296
|
colSpan: innerItem && innerItem.colSpan
|
|
21308
21297
|
}, innerItem && innerItem.title);
|
|
21309
21298
|
}));
|
|
21310
|
-
})))
|
|
21299
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
21300
|
+
style: {
|
|
21301
|
+
position: 'absolute',
|
|
21302
|
+
left: "".concat(config.colHeaderWidth, "px"),
|
|
21303
|
+
top: "".concat(config.colHeaderToTop, "px"),
|
|
21304
|
+
minWidth: rightAreaWidth,
|
|
21305
|
+
zIndex: 0
|
|
21306
|
+
}
|
|
21307
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
21311
21308
|
style: {
|
|
21312
21309
|
width: '100%',
|
|
21313
21310
|
position: 'relative'
|
package/dist/index.js
CHANGED
|
@@ -14248,7 +14248,7 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
14248
14248
|
var columnConfig = _this.getConfigFromlocalstorage();
|
|
14249
14249
|
|
|
14250
14250
|
var initialDataSourceData = columnConfig.length ? datasource.map(function (item) {
|
|
14251
|
-
var _showColumnItem$, _inner
|
|
14251
|
+
var _inner$, _showColumnItem$, _inner$2;
|
|
14252
14252
|
|
|
14253
14253
|
var inner = columnConfig.filter(function (innerItem) {
|
|
14254
14254
|
return innerItem.dataIndex && innerItem.dataIndex === item.dataIndex || innerItem.key && innerItem.key === item.key;
|
|
@@ -14257,8 +14257,9 @@ var SortableTable = /*#__PURE__*/function (_React$Component) {
|
|
|
14257
14257
|
return inneritem.dataIndex && inneritem.dataIndex === item.dataIndex || inneritem.key && inneritem.key === item.key;
|
|
14258
14258
|
});
|
|
14259
14259
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
14260
|
+
fixed: inner.length ? (_inner$ = inner[0]) === null || _inner$ === void 0 ? void 0 : _inner$.fixed : item === null || item === void 0 ? void 0 : item.fixed,
|
|
14260
14261
|
key: item.key || item.dataIndex,
|
|
14261
|
-
width: ((_showColumnItem$ = showColumnItem[0]) === null || _showColumnItem$ === void 0 ? void 0 : _showColumnItem$.width) || ((_inner$ = inner[0]) === null || _inner$ === void 0 ? void 0 : _inner
|
|
14262
|
+
width: ((_showColumnItem$ = showColumnItem[0]) === null || _showColumnItem$ === void 0 ? void 0 : _showColumnItem$.width) || ((_inner$2 = inner[0]) === null || _inner$2 === void 0 ? void 0 : _inner$2.width) || item.width,
|
|
14262
14263
|
hidden: columnConfig.length && !inner.length
|
|
14263
14264
|
});
|
|
14264
14265
|
}) : _toConsumableArray(datasource);
|
|
@@ -14993,7 +14994,7 @@ var ColumnSettingSulaTable = /*#__PURE__*/function (_React$Component) {
|
|
|
14993
14994
|
fixed: true
|
|
14994
14995
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Table.Summary.Row, null, _toConsumableArray(summaryRow).map(function (item, index) {
|
|
14995
14996
|
return /*#__PURE__*/React__default['default'].createElement(antd.Table.Summary.Cell, {
|
|
14996
|
-
index:
|
|
14997
|
+
index: index
|
|
14997
14998
|
}, /*#__PURE__*/React__default['default'].createElement(Text, {
|
|
14998
14999
|
type: "danger"
|
|
14999
15000
|
}, summaryInitial.filter(function (inner) {
|
|
@@ -15281,7 +15282,7 @@ var ColumnSettingTable = /*#__PURE__*/function (_React$Component) {
|
|
|
15281
15282
|
fixed: true
|
|
15282
15283
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Table.Summary.Row, null, _toConsumableArray(summaryRow).map(function (item, index) {
|
|
15283
15284
|
return /*#__PURE__*/React__default['default'].createElement(antd.Table.Summary.Cell, {
|
|
15284
|
-
index:
|
|
15285
|
+
index: index
|
|
15285
15286
|
}, /*#__PURE__*/React__default['default'].createElement(Text$1, {
|
|
15286
15287
|
type: "danger"
|
|
15287
15288
|
}, summaryInitial.filter(function (inner) {
|
|
@@ -21281,25 +21282,13 @@ var index$7 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
21281
21282
|
colSpan: innerItem && innerItem.rowSpan
|
|
21282
21283
|
}, innerItem && innerItem.title);
|
|
21283
21284
|
}));
|
|
21284
|
-
}))), /*#__PURE__*/React__default['default'].createElement("
|
|
21285
|
-
style: {
|
|
21286
|
-
position: 'absolute',
|
|
21287
|
-
left: "".concat(config.colHeaderWidth, "px"),
|
|
21288
|
-
minWidth: rightAreaWidth,
|
|
21289
|
-
zIndex: 0,
|
|
21290
|
-
top: 0
|
|
21291
|
-
}
|
|
21292
|
-
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
21293
|
-
style: {
|
|
21294
|
-
position: 'relative'
|
|
21295
|
-
}
|
|
21296
|
-
}, /*#__PURE__*/React__default['default'].createElement("table", {
|
|
21285
|
+
}))), /*#__PURE__*/React__default['default'].createElement("table", {
|
|
21297
21286
|
className: " ".concat('editTable__block', " ", 'table_border_style'),
|
|
21298
21287
|
style: {
|
|
21299
21288
|
width: '100%',
|
|
21300
21289
|
top: 0,
|
|
21301
21290
|
left: "".concat(config.colHeaderWidth, "px"),
|
|
21302
|
-
position: '
|
|
21291
|
+
position: 'absolute',
|
|
21303
21292
|
display: config.tableType === 'col-header-table' ? 'none' : ''
|
|
21304
21293
|
}
|
|
21305
21294
|
}, /*#__PURE__*/React__default['default'].createElement("colgroup", null, config.rowLastData.map(function (row) {
|
|
@@ -21321,7 +21310,15 @@ var index$7 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
21321
21310
|
colSpan: innerItem && innerItem.colSpan
|
|
21322
21311
|
}, innerItem && innerItem.title);
|
|
21323
21312
|
}));
|
|
21324
|
-
})))
|
|
21313
|
+
}))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
21314
|
+
style: {
|
|
21315
|
+
position: 'absolute',
|
|
21316
|
+
left: "".concat(config.colHeaderWidth, "px"),
|
|
21317
|
+
top: "".concat(config.colHeaderToTop, "px"),
|
|
21318
|
+
minWidth: rightAreaWidth,
|
|
21319
|
+
zIndex: 0
|
|
21320
|
+
}
|
|
21321
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
21325
21322
|
style: {
|
|
21326
21323
|
width: '100%',
|
|
21327
21324
|
position: 'relative'
|
package/package.json
CHANGED
|
@@ -119,6 +119,7 @@ class SortableTable extends React.Component<SortTableProps> {
|
|
|
119
119
|
let showColumnItem = showColumns.filter((inneritem:any) => ((inneritem.dataIndex && inneritem.dataIndex === item.dataIndex) || (inneritem.key && inneritem.key === item.key)))
|
|
120
120
|
return {
|
|
121
121
|
...item,
|
|
122
|
+
fixed: inner.length ? inner[0]?.fixed : item?.fixed,
|
|
122
123
|
key: item.key || item.dataIndex,
|
|
123
124
|
width: showColumnItem[0]?.width || inner[0]?.width || item.width,
|
|
124
125
|
hidden: columnConfig.length && !inner.length,
|
|
@@ -77,7 +77,7 @@ export default class ColumnSettingTable extends React.Component {
|
|
|
77
77
|
{
|
|
78
78
|
[...summaryRow].map((item: any, index: number) => {
|
|
79
79
|
return (
|
|
80
|
-
<Table.Summary.Cell index={
|
|
80
|
+
<Table.Summary.Cell index={index}>
|
|
81
81
|
<Text type="danger">
|
|
82
82
|
{
|
|
83
83
|
summaryInitial.filter((inner: any) => inner.key === item.dataIndex || inner.key === item.key).length ?
|
|
@@ -83,7 +83,7 @@ export default class ColumnSettingSulaTable extends React.Component {
|
|
|
83
83
|
{
|
|
84
84
|
[...summaryRow].map((item: any, index: number) => {
|
|
85
85
|
return (
|
|
86
|
-
<Table.Summary.Cell index={
|
|
86
|
+
<Table.Summary.Cell index={index}>
|
|
87
87
|
<Text type="danger">
|
|
88
88
|
{
|
|
89
89
|
summaryInitial.filter((inner: any) => inner.key === item.dataIndex || inner.key === item.key).length ?
|
|
@@ -163,67 +163,67 @@ export default forwardRef((props, ref) => {
|
|
|
163
163
|
})}
|
|
164
164
|
</tbody>
|
|
165
165
|
</table>
|
|
166
|
-
|
|
166
|
+
<table
|
|
167
|
+
className={` ${'editTable__block'} ${'table_border_style'}`}
|
|
168
|
+
style={{
|
|
169
|
+
width: '100%',
|
|
170
|
+
top: 0,
|
|
171
|
+
left: `${config.colHeaderWidth}px`,
|
|
172
|
+
position: 'absolute',
|
|
173
|
+
display: config.tableType === 'col-header-table' ? 'none' : ''
|
|
174
|
+
}}
|
|
175
|
+
>
|
|
176
|
+
<colgroup>
|
|
177
|
+
{
|
|
178
|
+
config.rowLastData.map(row => {
|
|
179
|
+
return (<col width={row.width ? `${row.width}px` : '100px'} />)
|
|
180
|
+
})
|
|
181
|
+
}
|
|
182
|
+
</colgroup>
|
|
183
|
+
<tbody>
|
|
184
|
+
{
|
|
185
|
+
config.rowHeader.map((item) => {
|
|
186
|
+
return (
|
|
187
|
+
<tr>
|
|
188
|
+
{
|
|
189
|
+
item.map((innerItem) => {
|
|
190
|
+
if (!innerItem) return null;
|
|
191
|
+
return (
|
|
192
|
+
<td
|
|
193
|
+
style={{
|
|
194
|
+
height: '40px',
|
|
195
|
+
background: '#f7f8fb',
|
|
196
|
+
color: '#000000',
|
|
197
|
+
fontWeight: 500,
|
|
198
|
+
width: innerItem.width ? `${innerItem.width}px` : '100px',
|
|
199
|
+
}}
|
|
200
|
+
rowSpan={innerItem && innerItem.rowSpan}
|
|
201
|
+
colSpan={innerItem && innerItem.colSpan}
|
|
202
|
+
>
|
|
203
|
+
{innerItem && innerItem.title}
|
|
204
|
+
</td>
|
|
205
|
+
)
|
|
206
|
+
})
|
|
207
|
+
}
|
|
208
|
+
</tr>
|
|
209
|
+
)
|
|
210
|
+
})
|
|
211
|
+
}
|
|
212
|
+
</tbody>
|
|
213
|
+
</table>
|
|
167
214
|
<div
|
|
168
215
|
style={{
|
|
169
216
|
position: 'absolute',
|
|
170
217
|
left: `${config.colHeaderWidth}px`,
|
|
218
|
+
top: `${config.colHeaderToTop}px`,
|
|
171
219
|
minWidth: rightAreaWidth,
|
|
172
220
|
zIndex: 0,
|
|
173
|
-
top: 0
|
|
174
221
|
}}
|
|
175
222
|
>
|
|
176
223
|
{/* --------------------------------------横向表头---------------------------------------- */}
|
|
177
|
-
<div style={{position: 'relative'}}>
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
style={{
|
|
181
|
-
width: '100%',
|
|
182
|
-
top: 0,
|
|
183
|
-
left: `${config.colHeaderWidth}px`,
|
|
184
|
-
position: 'sticky',
|
|
185
|
-
display: config.tableType === 'col-header-table' ? 'none' : ''
|
|
186
|
-
}}
|
|
187
|
-
>
|
|
188
|
-
<colgroup>
|
|
189
|
-
{
|
|
190
|
-
config.rowLastData.map(row => {
|
|
191
|
-
return (<col width={row.width ? `${row.width}px` : '100px'} />)
|
|
192
|
-
})
|
|
193
|
-
}
|
|
194
|
-
</colgroup>
|
|
195
|
-
<tbody>
|
|
196
|
-
{
|
|
197
|
-
config.rowHeader.map((item) => {
|
|
198
|
-
return (
|
|
199
|
-
<tr>
|
|
200
|
-
{
|
|
201
|
-
item.map((innerItem) => {
|
|
202
|
-
if (!innerItem) return null;
|
|
203
|
-
return (
|
|
204
|
-
<td
|
|
205
|
-
style={{
|
|
206
|
-
height: '40px',
|
|
207
|
-
background: '#f7f8fb',
|
|
208
|
-
color: '#000000',
|
|
209
|
-
fontWeight: 500,
|
|
210
|
-
width: innerItem.width ? `${innerItem.width}px` : '100px',
|
|
211
|
-
}}
|
|
212
|
-
rowSpan={innerItem && innerItem.rowSpan}
|
|
213
|
-
colSpan={innerItem && innerItem.colSpan}
|
|
214
|
-
>
|
|
215
|
-
{innerItem && innerItem.title}
|
|
216
|
-
</td>
|
|
217
|
-
)
|
|
218
|
-
})
|
|
219
|
-
}
|
|
220
|
-
</tr>
|
|
221
|
-
)
|
|
222
|
-
})
|
|
223
|
-
}
|
|
224
|
-
</tbody>
|
|
225
|
-
</table>
|
|
226
|
-
</div>
|
|
224
|
+
{/* <div style={{position: 'relative'}}>
|
|
225
|
+
|
|
226
|
+
</div> */}
|
|
227
227
|
<div
|
|
228
228
|
style={{
|
|
229
229
|
width: '100%',
|