@titaui/pc 1.16.8 → 1.16.9-beta.1
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/lib/components/dynamic/dynamic-item/dynamic-new-report/index.css +8 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +3 -1
- package/lib/components/okr-excel-create/components-new/kr-weight/index.js +5 -1
- package/lib/components/okr-excel-create/components-new/okr-align/index.css +1 -0
- package/lib/components/okr-excel-create/components-new/okr-principal/index.css +4 -1
- package/lib/components/okr-excel-create/components-new/okr-visibility/index.css +12 -2
- package/lib/components/okr-excel-create/components-new/okr-visibility/index.js +12 -10
- package/lib/components/okr-excel-create/index.css +18 -3
- package/lib/components/okr-excel-create/index.js +10 -8
- package/lib/components/table-excel-v2/index.css +68 -2
- package/lib/components/table-excel-v2/index.js +115 -21
- package/lib/pages/okr-map/utils.js +23 -4
- package/package.json +1 -1
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
opacity: 1;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
.titaui-dynamic-new-report-item .rich-editor__table-wrapper {
|
|
14
|
+
padding: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
13
17
|
.titaui-dynamic-new-report-item__content {
|
|
14
18
|
margin-left: 80px;
|
|
15
19
|
line-height: 24px;
|
|
@@ -114,6 +118,10 @@
|
|
|
114
118
|
min-height: auto;
|
|
115
119
|
}
|
|
116
120
|
|
|
121
|
+
.titaui-dynamic-new-report-item__richTitle {
|
|
122
|
+
margin-bottom: 12px;
|
|
123
|
+
}
|
|
124
|
+
|
|
117
125
|
@keyframes dynamicQuickOperationRubberBand {
|
|
118
126
|
0% {
|
|
119
127
|
-webkit-transform: scaleX(1);
|
|
@@ -207,7 +207,9 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
207
207
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, ((item === null || item === void 0 ? void 0 : item.richContent) || !(0, _util.isEmptyImage)(item === null || item === void 0 ? void 0 : item.richContent)) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
208
208
|
className: "".concat(prefix, "__work"),
|
|
209
209
|
key: item.richContent || Math.random()
|
|
210
|
-
},
|
|
210
|
+
}, /*#__PURE__*/_react["default"].createElement("p", {
|
|
211
|
+
className: "".concat(prefix, "__richTitle")
|
|
212
|
+
}, item.title), /*#__PURE__*/_react["default"].createElement(_richEditor["default"], {
|
|
211
213
|
plugins: templateRichPlugins({}, edit, delAble, undefined, newTaskLine)
|
|
212
214
|
}, /*#__PURE__*/_react["default"].createElement(_richEditor.EditorComponent, {
|
|
213
215
|
editable: false,
|
|
@@ -215,7 +215,11 @@ var krWeightRenderer = function krWeightRenderer(update) {
|
|
|
215
215
|
return isLast ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
216
216
|
overlay: (0, _getLocale.getLocale)('OKR_ComAll_SKRChweight'),
|
|
217
217
|
placement: "top"
|
|
218
|
-
}, /*#__PURE__*/_react["default"].createElement("div",
|
|
218
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
219
|
+
style: {
|
|
220
|
+
height: '100%'
|
|
221
|
+
}
|
|
222
|
+
}, /*#__PURE__*/_react["default"].createElement(KRWeight, {
|
|
219
223
|
value: (data && data.krWeight || 0).toFixed(1),
|
|
220
224
|
onChange: handleEditKRWeight,
|
|
221
225
|
disabled: isLast,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
.tita-okr-excel-create-visibility {
|
|
2
|
-
position: absolute;
|
|
3
2
|
left: 0;
|
|
4
3
|
top: 0;
|
|
5
4
|
width: 100%;
|
|
@@ -9,7 +8,6 @@
|
|
|
9
8
|
|
|
10
9
|
.tita-okr-excel-create-visibility__content {
|
|
11
10
|
box-sizing: border-box;
|
|
12
|
-
padding: 0 12px;
|
|
13
11
|
width: 100%;
|
|
14
12
|
height: 100%;
|
|
15
13
|
display: flex;
|
|
@@ -24,6 +22,18 @@
|
|
|
24
22
|
padding: 2px 6px;
|
|
25
23
|
}
|
|
26
24
|
|
|
25
|
+
.tita-okr-excel-create-visibility__item {
|
|
26
|
+
border-radius: 12px;
|
|
27
|
+
font-size: 14px;
|
|
28
|
+
color: #141c28;
|
|
29
|
+
line-height: 18px;
|
|
30
|
+
padding: 2px 6px;
|
|
31
|
+
display: inline-block;
|
|
32
|
+
margin-bottom: 2px;
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
margin-right: 4px;
|
|
35
|
+
}
|
|
36
|
+
|
|
27
37
|
.tita-okr-excel-create-visibility__selector {
|
|
28
38
|
background: #ffffff;
|
|
29
39
|
box-shadow: 0px 4px 12px 0px rgba(127, 145, 180, 0.2);
|
|
@@ -72,6 +72,8 @@ var VisibilityColorMap = {
|
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
var Visibility = function Visibility(_ref) {
|
|
75
|
+
var _visiableLimitState$u, _visiableLimitState$u2;
|
|
76
|
+
|
|
75
77
|
var visibility = _ref.visibility,
|
|
76
78
|
visiableLimit = _ref.visiableLimit,
|
|
77
79
|
onChangeVisiableLimit = _ref.onChangeVisiableLimit;
|
|
@@ -131,7 +133,6 @@ var Visibility = function Visibility(_ref) {
|
|
|
131
133
|
oldSelect.current = data.value;
|
|
132
134
|
|
|
133
135
|
if (onChangeVisiableLimit) {
|
|
134
|
-
console.log('data.value', data.value);
|
|
135
136
|
onChangeVisiableLimit(data.value);
|
|
136
137
|
} // @ts-ignore
|
|
137
138
|
|
|
@@ -145,15 +146,16 @@ var Visibility = function Visibility(_ref) {
|
|
|
145
146
|
if (visiableLimitState) {
|
|
146
147
|
if (visiableLimitState.users && visiableLimitState.users.length > 0) {
|
|
147
148
|
visiableLimitState.users.forEach(function (item, index) {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
149
|
+
result.push( /*#__PURE__*/_react["default"].createElement("span", {
|
|
150
|
+
className: "".concat(prefix, "__item"),
|
|
151
|
+
style: {
|
|
152
|
+
background: VisibilityColorMap[visibilityState]
|
|
153
|
+
}
|
|
154
|
+
}, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
153
155
|
name: item.name,
|
|
154
156
|
id: item.userId,
|
|
155
157
|
type: 'userName'
|
|
156
|
-
}));
|
|
158
|
+
})));
|
|
157
159
|
});
|
|
158
160
|
}
|
|
159
161
|
|
|
@@ -198,11 +200,11 @@ var Visibility = function Visibility(_ref) {
|
|
|
198
200
|
ref: popRef
|
|
199
201
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
200
202
|
className: "".concat(prefix, "__content")
|
|
201
|
-
}, /*#__PURE__*/_react["default"].createElement("
|
|
203
|
+
}, visiableLimitState !== null && visiableLimitState !== void 0 && (_visiableLimitState$u = visiableLimitState.users) !== null && _visiableLimitState$u !== void 0 && _visiableLimitState$u.length ? /*#__PURE__*/_react["default"].createElement("p", null, renderText) : /*#__PURE__*/_react["default"].createElement("p", {
|
|
202
204
|
className: "".concat(prefix, "__content-text"),
|
|
203
|
-
style: {
|
|
205
|
+
style: !(visiableLimitState !== null && visiableLimitState !== void 0 && (_visiableLimitState$u2 = visiableLimitState.users) !== null && _visiableLimitState$u2 !== void 0 && _visiableLimitState$u2.length) ? {
|
|
204
206
|
background: VisibilityColorMap[visibilityState]
|
|
205
|
-
}
|
|
207
|
+
} : {}
|
|
206
208
|
}, renderText))), /*#__PURE__*/_react["default"].createElement(_index["default"], {
|
|
207
209
|
popupAlign: {
|
|
208
210
|
offset: [-550, -100],
|
|
@@ -11,9 +11,16 @@
|
|
|
11
11
|
display: none;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
.tita-okr-excel-create__table-content {
|
|
15
|
+
display: flex;
|
|
16
|
+
width: max-content;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
}
|
|
19
|
+
|
|
14
20
|
.tita-okr-excel-create__add-o {
|
|
15
21
|
box-sizing: border-box;
|
|
16
22
|
height: 40px;
|
|
23
|
+
width: 100%;
|
|
17
24
|
padding: 0 12px;
|
|
18
25
|
display: flex;
|
|
19
26
|
align-items: center;
|
|
@@ -23,16 +30,24 @@
|
|
|
23
30
|
color: #6F7886;
|
|
24
31
|
line-height: 22px;
|
|
25
32
|
cursor: pointer;
|
|
33
|
+
border-top: 1px solid #e2e2e2;
|
|
26
34
|
border-bottom: 1px solid #e2e2e2;
|
|
27
|
-
border-
|
|
35
|
+
border-right: 1px solid #e2e2e2;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.tita-okr-excel-create__add-o > div {
|
|
39
|
+
position: sticky;
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
left: 12px;
|
|
28
43
|
}
|
|
29
44
|
|
|
30
|
-
.tita-okr-excel-create__add-o > * + * {
|
|
45
|
+
.tita-okr-excel-create__add-o > div > * + * {
|
|
31
46
|
margin-left: 4px;
|
|
32
47
|
}
|
|
33
48
|
|
|
34
49
|
.tita-okr-excel-create__table-excel-v2 {
|
|
35
|
-
border-radius: 12px
|
|
50
|
+
border-radius: 12px;
|
|
36
51
|
}
|
|
37
52
|
|
|
38
53
|
.tita-okr-excel-create .cell-span {
|
|
@@ -337,20 +337,22 @@ var OKRExcelCreate = function OKRExcelCreate(_ref3) {
|
|
|
337
337
|
// </PopupSelect> */}
|
|
338
338
|
|
|
339
339
|
|
|
340
|
-
console.log('hiddenRemoveIcon', hiddenRemoveIcon);
|
|
341
340
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
342
341
|
className: "".concat(className)
|
|
343
342
|
}, /*#__PURE__*/_react["default"].createElement(_tableExcelV["default"], {
|
|
344
343
|
className: (0, _classnames["default"])("".concat(preCls, "__table-excel-v2 ").concat(tableClassName), _defineProperty({}, "".concat(preCls, "--disabled-remove"), hiddenRemoveIcon)),
|
|
345
344
|
rowKey: "uuid",
|
|
345
|
+
fixedHeader: true,
|
|
346
|
+
pinned: [1, 0],
|
|
346
347
|
columns: columnsOption,
|
|
347
|
-
dataSource: excelTableData
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
348
|
+
dataSource: excelTableData,
|
|
349
|
+
rowLastNode: /*#__PURE__*/_react["default"].createElement("div", {
|
|
350
|
+
onClick: onAddOHandler,
|
|
351
|
+
className: "".concat(preCls, "__add-o")
|
|
352
|
+
}, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("i", {
|
|
353
|
+
className: "tu-icon-add1"
|
|
354
|
+
}), /*#__PURE__*/_react["default"].createElement("p", null, (0, _getLocale.getLocale)(isMax ? 'OKR_ComAll_Supports50' : 'OKR_ComAll_AddObjective'))))
|
|
355
|
+
}));
|
|
354
356
|
};
|
|
355
357
|
|
|
356
358
|
var _default = OKRExcelCreate;
|
|
@@ -2,11 +2,34 @@
|
|
|
2
2
|
position: relative;
|
|
3
3
|
box-shadow: 0 0 0 1px #e2e2e2;
|
|
4
4
|
background-color: #fff;
|
|
5
|
-
overflow
|
|
5
|
+
overflow: auto;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.titaui-table-excel-v2__main {
|
|
9
|
+
width: max-content;
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.titaui-table-excel-v2--header-fixed .titaui-table-excel-v2__header {
|
|
15
|
+
position: sticky;
|
|
16
|
+
top: 0;
|
|
6
17
|
}
|
|
7
18
|
|
|
8
19
|
.titaui-table-excel-v2__header {
|
|
9
20
|
display: flex;
|
|
21
|
+
z-index: 3;
|
|
22
|
+
width: max-content;
|
|
23
|
+
transition: box-shadow .3s;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.titaui-table-excel-v2__header--shadow {
|
|
27
|
+
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.titaui-table-excel-v2__header--fixed {
|
|
31
|
+
position: absolute;
|
|
32
|
+
top: 0;
|
|
10
33
|
}
|
|
11
34
|
|
|
12
35
|
.titaui-table-excel-v2__header__drag-size-bar {
|
|
@@ -14,7 +37,7 @@
|
|
|
14
37
|
right: -2px;
|
|
15
38
|
height: 100%;
|
|
16
39
|
width: 5px;
|
|
17
|
-
z-index:
|
|
40
|
+
z-index: 4;
|
|
18
41
|
cursor: col-resize;
|
|
19
42
|
}
|
|
20
43
|
|
|
@@ -26,10 +49,13 @@
|
|
|
26
49
|
min-height: 40px;
|
|
27
50
|
padding: 0 12px;
|
|
28
51
|
color: #89919F;
|
|
52
|
+
background-color: #fff;
|
|
29
53
|
font-size: 12px;
|
|
30
54
|
font-weight: 600;
|
|
31
55
|
box-sizing: border-box;
|
|
32
56
|
transition: background-color .3s;
|
|
57
|
+
white-space: nowrap;
|
|
58
|
+
text-overflow: ellipsis;
|
|
33
59
|
}
|
|
34
60
|
|
|
35
61
|
.titaui-table-excel-v2__header__item--aligin-left {
|
|
@@ -48,6 +74,44 @@
|
|
|
48
74
|
background-color: #f2f2f2;
|
|
49
75
|
}
|
|
50
76
|
|
|
77
|
+
.titaui-table-excel-v2__isPinned::after {
|
|
78
|
+
content: '';
|
|
79
|
+
position: absolute;
|
|
80
|
+
width: 10px;
|
|
81
|
+
height: 100%;
|
|
82
|
+
transition: box-shadow .3s;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.titaui-table-excel-v2__isPinned--left::after {
|
|
86
|
+
content: '';
|
|
87
|
+
position: absolute;
|
|
88
|
+
transform: translate(100%);
|
|
89
|
+
width: 10px;
|
|
90
|
+
height: 100%;
|
|
91
|
+
transition: box-shadow .3s;
|
|
92
|
+
top: 0;
|
|
93
|
+
right: 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.titaui-table-excel-v2__isPinned--right::after {
|
|
97
|
+
content: '';
|
|
98
|
+
position: absolute;
|
|
99
|
+
transform: translate(-100%);
|
|
100
|
+
width: 10px;
|
|
101
|
+
height: 100%;
|
|
102
|
+
transition: box-shadow .3s;
|
|
103
|
+
top: 0;
|
|
104
|
+
left: 0;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.titaui-table-excel-v2__isPinned--left-shadow {
|
|
108
|
+
border-right: 0 !important;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.titaui-table-excel-v2__isPinned--left-shadow::after, .titaui-table-excel-v2__isPinned--right-shadow::after {
|
|
112
|
+
box-shadow: inset 10px 0 8px -8px #00000026;
|
|
113
|
+
}
|
|
114
|
+
|
|
51
115
|
.titaui-table-excel-v2__childs {
|
|
52
116
|
display: flex;
|
|
53
117
|
flex-direction: column;
|
|
@@ -59,6 +123,7 @@
|
|
|
59
123
|
|
|
60
124
|
.titaui-table-excel-v2__row {
|
|
61
125
|
display: flex;
|
|
126
|
+
z-index: 1;
|
|
62
127
|
}
|
|
63
128
|
|
|
64
129
|
.titaui-table-excel-v2__box {
|
|
@@ -68,6 +133,7 @@
|
|
|
68
133
|
box-sizing: border-box;
|
|
69
134
|
flex-shrink: 0;
|
|
70
135
|
background-color: #fff;
|
|
136
|
+
min-width: 24px;
|
|
71
137
|
}
|
|
72
138
|
|
|
73
139
|
.titaui-table-excel-v2__box-content {
|
|
@@ -13,6 +13,8 @@ var _web = require("@react-spring/web");
|
|
|
13
13
|
|
|
14
14
|
var _react2 = require("@use-gesture/react");
|
|
15
15
|
|
|
16
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
|
+
|
|
16
18
|
var _orderBy = _interopRequireDefault(require("lodash/orderBy"));
|
|
17
19
|
|
|
18
20
|
var _get = _interopRequireDefault(require("lodash/get"));
|
|
@@ -21,8 +23,6 @@ var _array = require("../../utils/array");
|
|
|
21
23
|
|
|
22
24
|
require("./index.css");
|
|
23
25
|
|
|
24
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
25
|
-
|
|
26
26
|
var _excluded = ["render"];
|
|
27
27
|
|
|
28
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -137,6 +137,56 @@ var findColumnIndex = function findColumnIndex(columns, columnKey) {
|
|
|
137
137
|
});
|
|
138
138
|
};
|
|
139
139
|
|
|
140
|
+
var getPinnedLeft = function getPinnedLeft(currentIndex, columns) {
|
|
141
|
+
return columns.slice(0, currentIndex).reduce(function (pre, cur) {
|
|
142
|
+
return pre + cur.width;
|
|
143
|
+
}, 0);
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
var getPinnedRight = function getPinnedRight(currentIndex, columns) {
|
|
147
|
+
return columns.slice(currentIndex).reduce(function (pre, cur) {
|
|
148
|
+
return pre + cur.width;
|
|
149
|
+
}, 0);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
var getPinnedOption = function getPinnedOption(columns, currentIndex, pinned) {
|
|
153
|
+
if (!pinned) return {
|
|
154
|
+
isPinned: false,
|
|
155
|
+
pinnedStyle: {}
|
|
156
|
+
};
|
|
157
|
+
var columnsLength = columns.length;
|
|
158
|
+
var leftIndex = pinned[0] - 1;
|
|
159
|
+
var rightIndex = columnsLength - ((pinned[1] || 0) - 1);
|
|
160
|
+
var result = {
|
|
161
|
+
isPinned: true,
|
|
162
|
+
pinnedStyle: {},
|
|
163
|
+
pinnedIndex: [leftIndex, rightIndex]
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
if (currentIndex <= leftIndex) {
|
|
167
|
+
result.pinnedStyle = {
|
|
168
|
+
position: 'sticky',
|
|
169
|
+
left: getPinnedLeft(currentIndex, columns),
|
|
170
|
+
zIndex: 2
|
|
171
|
+
};
|
|
172
|
+
return result;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if (currentIndex >= rightIndex) {
|
|
176
|
+
result.pinnedStyle = {
|
|
177
|
+
position: 'sticky',
|
|
178
|
+
right: getPinnedRight(currentIndex, columns),
|
|
179
|
+
zIndex: 2
|
|
180
|
+
};
|
|
181
|
+
return result;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
return {
|
|
185
|
+
isPinned: false,
|
|
186
|
+
pinnedStyle: {}
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
|
|
140
190
|
var log = function log(title, columns) {// console.log(title)
|
|
141
191
|
// console.table(
|
|
142
192
|
// cloneDeep(
|
|
@@ -179,7 +229,12 @@ var TableExcelV2 = function TableExcelV2(_ref6) {
|
|
|
179
229
|
style = _ref6.style,
|
|
180
230
|
columns = _ref6.columns,
|
|
181
231
|
dataSource = _ref6.dataSource,
|
|
182
|
-
rowKey = _ref6.rowKey
|
|
232
|
+
rowKey = _ref6.rowKey,
|
|
233
|
+
_ref6$fixedHeader = _ref6.fixedHeader,
|
|
234
|
+
fixedHeader = _ref6$fixedHeader === void 0 ? false : _ref6$fixedHeader,
|
|
235
|
+
footer = _ref6.footer,
|
|
236
|
+
rowLastNode = _ref6.rowLastNode,
|
|
237
|
+
pinned = _ref6.pinned;
|
|
183
238
|
|
|
184
239
|
var _useState = (0, _react.useState)([]),
|
|
185
240
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -191,6 +246,21 @@ var TableExcelV2 = function TableExcelV2(_ref6) {
|
|
|
191
246
|
_columns = _useState4[0],
|
|
192
247
|
setColumns = _useState4[1];
|
|
193
248
|
|
|
249
|
+
var _useState5 = (0, _react.useState)(false),
|
|
250
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
251
|
+
showHeaderShadow = _useState6[0],
|
|
252
|
+
setShowHeaderShadow = _useState6[1];
|
|
253
|
+
|
|
254
|
+
var _useState7 = (0, _react.useState)(false),
|
|
255
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
256
|
+
showPinnedLeftShadow = _useState8[0],
|
|
257
|
+
setShowPinnedLeftShadow = _useState8[1];
|
|
258
|
+
|
|
259
|
+
var _useState9 = (0, _react.useState)(false),
|
|
260
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
261
|
+
showPinnedRightShadow = _useState10[0],
|
|
262
|
+
setShowPinnedRightShadow = _useState10[1];
|
|
263
|
+
|
|
194
264
|
(0, _react.useEffect)(function () {
|
|
195
265
|
log('_columns update', _columns);
|
|
196
266
|
}, [_columns]);
|
|
@@ -235,13 +305,13 @@ var TableExcelV2 = function TableExcelV2(_ref6) {
|
|
|
235
305
|
positions = _useSprings2[0],
|
|
236
306
|
api = _useSprings2[1];
|
|
237
307
|
|
|
238
|
-
var
|
|
308
|
+
var _useState11 = (0, _react.useState)({
|
|
239
309
|
colIdx: -1,
|
|
240
310
|
down: false
|
|
241
311
|
}),
|
|
242
|
-
|
|
243
|
-
moveInfo =
|
|
244
|
-
setMoveInfo =
|
|
312
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
313
|
+
moveInfo = _useState12[0],
|
|
314
|
+
setMoveInfo = _useState12[1];
|
|
245
315
|
|
|
246
316
|
var offsetCenterWidth = (0, _react.useRef)({
|
|
247
317
|
// 永远是正值
|
|
@@ -425,6 +495,8 @@ var TableExcelV2 = function TableExcelV2(_ref6) {
|
|
|
425
495
|
parentColNum = _ref13$parentColNum === void 0 ? 0 : _ref13$parentColNum;
|
|
426
496
|
if (!renderColumns[currentLevel - 1]) return;
|
|
427
497
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, renderColumns[currentLevel - 1].map(function (columnOption, colIdx) {
|
|
498
|
+
var _classNames;
|
|
499
|
+
|
|
428
500
|
var render = columnOption.render,
|
|
429
501
|
dataIndex = columnOption.dataIndex,
|
|
430
502
|
renderFill = columnOption.renderFill,
|
|
@@ -441,14 +513,20 @@ var TableExcelV2 = function TableExcelV2(_ref6) {
|
|
|
441
513
|
});
|
|
442
514
|
|
|
443
515
|
var index = parentColNum + colIdx;
|
|
516
|
+
|
|
517
|
+
var _getPinnedOption = getPinnedOption(_columns, index, pinned),
|
|
518
|
+
pinnedStyle = _getPinnedOption.pinnedStyle,
|
|
519
|
+
pinnedIndex = _getPinnedOption.pinnedIndex,
|
|
520
|
+
isPinned = _getPinnedOption.isPinned;
|
|
521
|
+
|
|
444
522
|
return /*#__PURE__*/_react["default"].createElement(_web.animated.div, {
|
|
445
523
|
key: dataIndex,
|
|
446
|
-
className: "".concat(preCls, "__box"),
|
|
447
|
-
style: _objectSpread({
|
|
524
|
+
className: (0, _classnames["default"])("".concat(preCls, "__box"), (_classNames = {}, _defineProperty(_classNames, "".concat(preCls, "__isPinned--left"), isPinned && index === pinnedIndex[0]), _defineProperty(_classNames, "".concat(preCls, "__isPinned--right"), isPinned && index === pinnedIndex[1]), _defineProperty(_classNames, "".concat(preCls, "__isPinned--left-shadow"), isPinned && showPinnedLeftShadow && index === pinnedIndex[0]), _defineProperty(_classNames, "".concat(preCls, "__isPinned--right-shadow"), isPinned && showPinnedRightShadow && index === pinnedIndex[1]), _classNames)),
|
|
525
|
+
style: _objectSpread(_objectSpread({
|
|
448
526
|
width: colSizes[index].width,
|
|
449
527
|
zIndex: moveInfo.colIdx === index ? 2 : undefined,
|
|
450
528
|
borderLeft: moveInfo.colIdx === index && moveInfo.down && '1px solid #e2e2e2' || undefined
|
|
451
|
-
}, positions[index])
|
|
529
|
+
}, pinnedStyle), positions[index])
|
|
452
530
|
}, renderFill && content, !renderFill && /*#__PURE__*/_react["default"].createElement("div", {
|
|
453
531
|
className: (0, _classnames["default"])("".concat(preCls, "__box-content"), "".concat(preCls, "__box-content--aligin-").concat(align))
|
|
454
532
|
}, content));
|
|
@@ -456,33 +534,49 @@ var TableExcelV2 = function TableExcelV2(_ref6) {
|
|
|
456
534
|
className: "".concat(preCls, "__childs")
|
|
457
535
|
}, data.childs && !!data.childs.length ? renderChilds(data.childs, currentLevel, rootData, rootIdx, parentColNum + renderColumns[currentLevel - 1].length) : /*#__PURE__*/_react["default"].createElement(_web.animated.div, {
|
|
458
536
|
className: "".concat(preCls, "__box"),
|
|
459
|
-
style: _objectSpread({
|
|
537
|
+
style: _objectSpread(_objectSpread({
|
|
460
538
|
width: colSizes[parentColNum + 1].width,
|
|
461
539
|
zIndex: moveInfo.colIdx === parentColNum + 1 ? 2 : undefined,
|
|
462
540
|
borderLeft: moveInfo.colIdx === parentColNum + 1 && moveInfo.down && '1px solid #e2e2e2' || undefined
|
|
463
|
-
}, positions[parentColNum + 1])
|
|
541
|
+
}, getPinnedOption(_columns, parentColNum + 1, pinned).pinnedStyle), positions[parentColNum + 1])
|
|
464
542
|
})));
|
|
465
|
-
}, [renderColumns, moveInfo]);
|
|
543
|
+
}, [renderColumns, moveInfo, showPinnedLeftShadow]);
|
|
544
|
+
var onScrollContentHandler = (0, _react.useCallback)(function (e) {
|
|
545
|
+
setShowHeaderShadow(e.target.scrollTop > 0);
|
|
546
|
+
setShowPinnedLeftShadow(e.target.scrollLeft > 0);
|
|
547
|
+
}, []);
|
|
466
548
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
467
|
-
className: "".concat(preCls, " ").concat(className),
|
|
468
|
-
style: style
|
|
549
|
+
className: (0, _classnames["default"])("".concat(preCls, " ").concat(className), _defineProperty({}, "".concat(preCls, "--header-fixed"), fixedHeader)),
|
|
550
|
+
style: style,
|
|
551
|
+
onScroll: onScrollContentHandler
|
|
552
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
553
|
+
className: "".concat(preCls, "__main")
|
|
469
554
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
470
|
-
className: "".concat(preCls, "__header")
|
|
555
|
+
className: (0, _classnames["default"])("".concat(preCls, "__header"), _defineProperty({}, "".concat(preCls, "__header--shadow"), showHeaderShadow))
|
|
471
556
|
}, _columns.map(function (_ref14, i) {
|
|
557
|
+
var _classNames4;
|
|
558
|
+
|
|
472
559
|
var title = _ref14.title,
|
|
473
560
|
_ref14$align = _ref14.align,
|
|
474
561
|
align = _ref14$align === void 0 ? 'left' : _ref14$align,
|
|
475
562
|
key = _ref14.key;
|
|
563
|
+
|
|
564
|
+
var _getPinnedOption2 = getPinnedOption(_columns, i, pinned),
|
|
565
|
+
pinnedStyle = _getPinnedOption2.pinnedStyle,
|
|
566
|
+
isPinned = _getPinnedOption2.isPinned,
|
|
567
|
+
pinnedIndex = _getPinnedOption2.pinnedIndex;
|
|
568
|
+
|
|
476
569
|
return /*#__PURE__*/_react["default"].createElement(_web.animated.div, {
|
|
477
570
|
key: key,
|
|
478
|
-
className: (0, _classnames["default"])("".concat(preCls, "__header__item"), "".concat(preCls, "__header__item--aligin-").concat(align)) // {...moveColBind({ colIndex: i })}
|
|
571
|
+
className: (0, _classnames["default"])("".concat(preCls, "__header__item"), "".concat(preCls, "__header__item--aligin-").concat(align), (_classNames4 = {}, _defineProperty(_classNames4, "".concat(preCls, "__isPinned--left"), isPinned && i === pinnedIndex[0]), _defineProperty(_classNames4, "".concat(preCls, "__isPinned--right"), isPinned && i === pinnedIndex[1]), _defineProperty(_classNames4, "".concat(preCls, "__isPinned--left-shadow"), isPinned && showPinnedLeftShadow && i === pinnedIndex[0]), _defineProperty(_classNames4, "".concat(preCls, "__isPinned--right-shadow"), isPinned && showPinnedRightShadow && i === pinnedIndex[1]), _classNames4)) // {...moveColBind({ colIndex: i })}
|
|
479
572
|
,
|
|
480
|
-
style: {
|
|
573
|
+
style: _objectSpread(_objectSpread({
|
|
481
574
|
width: colSizes[i].width,
|
|
482
575
|
x: positions[i].x,
|
|
483
|
-
zIndex: moveInfo.colIdx === i ? 2 : 1
|
|
576
|
+
zIndex: moveInfo.colIdx === i ? 2 : 1
|
|
577
|
+
}, pinnedStyle), {}, {
|
|
484
578
|
borderRight: _columns[i].next === null && '1px solid #e2e2e2' || undefined
|
|
485
|
-
}
|
|
579
|
+
})
|
|
486
580
|
}, /*#__PURE__*/_react["default"].createElement("div", _extends({}, resizeColBind(i), {
|
|
487
581
|
className: "".concat(preCls, "__header__drag-size-bar")
|
|
488
582
|
})), title);
|
|
@@ -497,7 +591,7 @@ var TableExcelV2 = function TableExcelV2(_ref6) {
|
|
|
497
591
|
rootData: data,
|
|
498
592
|
rootIdx: rowIdx
|
|
499
593
|
}));
|
|
500
|
-
}));
|
|
594
|
+
}), rowLastNode));
|
|
501
595
|
};
|
|
502
596
|
|
|
503
597
|
var _default = /*#__PURE__*/_react["default"].memo(TableExcelV2);
|
|
@@ -12,8 +12,18 @@ var _getBSGlobal2, _getBSGlobal3;
|
|
|
12
12
|
var openFullscreen = function openFullscreen() {
|
|
13
13
|
// 隐藏侧边栏和头部
|
|
14
14
|
// if (!getBSGlobal("tenantInfo")?.isNewIndex) {
|
|
15
|
-
document.querySelector(".tu-page-nav")
|
|
16
|
-
|
|
15
|
+
if (document.querySelector(".tu-page-nav")) {
|
|
16
|
+
document.querySelector(".tu-page-nav").style.display = "none";
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (document.querySelector(".tu-page-header")) {
|
|
20
|
+
document.querySelector(".tu-page-header").style.display = "none";
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (document.querySelector('.titaui-nav-top__version')) {
|
|
24
|
+
document.querySelector(".titaui-nav-top__version").style.display = "none";
|
|
25
|
+
} // }
|
|
26
|
+
|
|
17
27
|
};
|
|
18
28
|
|
|
19
29
|
exports.openFullscreen = openFullscreen;
|
|
@@ -22,8 +32,17 @@ var closeFullscreen = function closeFullscreen() {
|
|
|
22
32
|
var _getBSGlobal;
|
|
23
33
|
|
|
24
34
|
if (!((_getBSGlobal = getBSGlobal("tenantInfo")) !== null && _getBSGlobal !== void 0 && _getBSGlobal.isNewIndex)) {
|
|
25
|
-
document.querySelector(".tu-page-nav")
|
|
26
|
-
|
|
35
|
+
if (document.querySelector(".tu-page-nav")) {
|
|
36
|
+
document.querySelector(".tu-page-nav").style.display = "block";
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (document.querySelector(".tu-page-header")) {
|
|
40
|
+
document.querySelector(".tu-page-header").style.display = "block";
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (document.querySelector('.titaui-nav-top__version')) {
|
|
45
|
+
document.querySelector(".titaui-nav-top__version").style.display = "block";
|
|
27
46
|
}
|
|
28
47
|
};
|
|
29
48
|
|