@titaui/pc 1.11.27 → 1.11.30
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/avatar/text-avatar/index.css +7 -0
- package/lib/components/avatar/text-avatar/index.js +32 -7
- package/lib/components/button/icon-btn/index.js +17 -8
- package/lib/components/button/rect-btn/index.js +7 -7
- package/lib/components/change-okr-modal/Item.js +14 -14
- package/lib/components/drawer/index.js +4 -4
- package/lib/components/drop-selector/index.js +25 -10
- package/lib/components/dynamic/constant.js +33 -32
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +9 -9
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-interview/img/wifi.svg +24 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.css +51 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.js +50 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/interview-content.js +65 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/img/wifi.svg +24 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.css +61 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.js +61 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/interview-content.js +69 -0
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +5 -5
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +6 -6
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +10 -10
- package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +13 -13
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +9 -9
- package/lib/components/dynamic/dynamic-item/index.js +50 -32
- package/lib/components/dynamic/dynamic-list/index.js +4 -4
- package/lib/components/e-priority/index.js +8 -8
- package/lib/components/eReport/eReportShare/index.js +11 -11
- package/lib/components/form/form-fields/date/index.css +24 -0
- package/lib/components/form/form-fields/date/index.js +102 -0
- package/lib/components/form/form-fields/input/index.js +10 -10
- package/lib/components/form/form-fields/user/index.css +23 -3
- package/lib/components/form/form-fields/user/index.js +18 -8
- package/lib/components/form/form-fields/user/user-input.js +15 -6
- package/lib/components/form/index.js +10 -3
- package/lib/components/grid-layout/sub-employee-okr/person-okr.js +5 -5
- package/lib/components/icon-button-list/index.js +3 -3
- package/lib/components/img-viewer/index.css +3 -3
- package/lib/components/img-viewer/index.js +11 -11
- package/lib/components/menus/components/menu-tree/images/interview-menu/my-interview.svg +16 -0
- package/lib/components/menus/components/menu-tree/images/interview-menu/template.svg +16 -0
- package/lib/components/menus/components/menu-tree/images/interview-menu/todo.svg +16 -0
- package/lib/components/menus/components/menu-tree/index.css +4 -2
- package/lib/components/menus/components/menu-tree/tree-node/index.css +85 -1
- package/lib/components/menus/export-modules/interview-menus/constant.js +30 -0
- package/lib/components/menus/export-modules/interview-menus/handle-highlight.js +63 -0
- package/lib/components/menus/export-modules/interview-menus/index.css +7 -0
- package/lib/components/menus/export-modules/interview-menus/index.js +128 -0
- package/lib/components/menus/index.js +11 -5
- package/lib/components/nav-top/components/menu/index.js +14 -14
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +25 -19
- package/lib/components/nav-top/components/user-message/components/remind/remind-item.js +48 -10
- package/lib/components/nav-top/components/user-message/constant.js +1 -0
- package/lib/components/nav-top/components/user-message/hrMessage.js +22 -19
- package/lib/components/nav-top/components/user-message/index.js +23 -20
- package/lib/components/nav-top/request.apis.js +3 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-priority-dropdown.js +7 -7
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +3 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/range-picker-pop.js +10 -0
- package/lib/components/okr-detail/detail-header/actions.js +23 -23
- package/lib/components/okr-detail/index.js +19 -19
- package/lib/components/okr-detail/okr-list/index.js +5 -3
- package/lib/components/okr-flow/child-node/index.css +6 -6
- package/lib/components/okr-flow/child-node/work-node.js +21 -21
- package/lib/components/okr-flow/export-modal/index.js +37 -19
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +14 -14
- package/lib/components/okr-flow/okr-map/index.js +5 -5
- package/lib/components/okr-flow/request-apis.js +4 -4
- package/lib/components/okr-flow/root-node/index.js +25 -24
- package/lib/components/okr-flow/utils/index.js +5 -5
- package/lib/components/okr-flow/utils/tree-handler.js +17 -17
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +30 -30
- package/lib/components/pagination/index.css +3 -3
- package/lib/components/pagination/select.css +58 -23
- package/lib/components/period-selector/index.css +3 -3
- package/lib/components/period-selector/index.js +11 -11
- package/lib/components/picker/components/panels/date-panel/date-body.js +118 -0
- package/lib/components/picker/components/panels/date-panel/date-head.js +87 -0
- package/lib/components/picker/components/panels/date-panel/index.css +14 -0
- package/lib/components/picker/components/panels/date-panel/index.js +49 -0
- package/lib/components/picker/components/panels/month-panel/index.css +27 -0
- package/lib/components/picker/components/panels/month-panel/index.js +63 -0
- package/lib/components/picker/components/panels/month-panel/month-body.js +89 -0
- package/lib/components/picker/components/panels/month-panel/month-head.js +47 -0
- package/lib/components/picker/components/panels/panel-body/index.js +53 -0
- package/lib/components/picker/components/panels/panel-head/index.js +48 -0
- package/lib/components/picker/components/panels/year-panel/index.css +23 -0
- package/lib/components/picker/components/panels/year-panel/index.js +65 -0
- package/lib/components/picker/components/panels/year-panel/year-body.js +92 -0
- package/lib/components/picker/components/panels/year-panel/year-head.js +35 -0
- package/lib/components/picker/components/picker-trigger/index.css +57 -0
- package/lib/components/picker/components/picker-trigger/index.js +94 -0
- package/lib/components/picker/context.js +15 -0
- package/lib/components/picker/index.css +121 -0
- package/lib/components/picker/index.js +13 -0
- package/lib/components/picker/picker-panels.js +182 -0
- package/lib/components/picker/picker.js +132 -0
- package/lib/components/picker/type.js +5 -0
- package/lib/components/picker/utils.js +28 -0
- package/lib/components/popup/index.js +4 -4
- package/lib/components/radio/index.css +9 -9
- package/lib/components/scrollbar/scroll-mask/index.js +1 -1
- package/lib/components/superset-charts/utils/axios.js +5 -5
- package/lib/components/survey-model/index.css +18 -18
- package/lib/components/survey-model/instance.js +1 -1
- package/lib/components/task-tree/helper.js +61 -0
- package/lib/components/task-tree/images/P1.svg +15 -0
- package/lib/components/task-tree/images/P2.svg +15 -0
- package/lib/components/task-tree/images/P3.svg +15 -0
- package/lib/components/task-tree/images/P4.svg +15 -0
- package/lib/components/task-tree/images/P5.svg +15 -0
- package/lib/components/task-tree/images/arrow.svg +9 -0
- package/lib/components/task-tree/images/empty-131.png +0 -0
- package/lib/components/task-tree/images/followed.svg +33 -0
- package/lib/components/task-tree/images/nice.svg +108 -0
- package/lib/components/task-tree/images/struc12.png +0 -0
- package/lib/components/task-tree/images/struc2.png +0 -0
- package/lib/components/task-tree/images/xialat-s.svg +13 -0
- package/lib/components/task-tree/index.js +22 -0
- package/lib/components/task-tree/mock.js +944 -0
- package/lib/components/task-tree/precls.js +8 -0
- package/lib/components/task-tree/request-apis.js +88 -0
- package/lib/components/task-tree/task-item-node/constant.js +45 -0
- package/lib/components/task-tree/task-item-node/e-empty.js +29 -0
- package/lib/components/task-tree/task-item-node/e-project.js +212 -0
- package/lib/components/task-tree/task-item-node/e-status-dropdown.js +94 -0
- package/lib/components/task-tree/task-item-node/e-task.js +426 -0
- package/lib/components/task-tree/task-item-node/get-process-color.js +62 -0
- package/lib/components/task-tree/task-item-node/index.css +289 -0
- package/lib/components/task-tree/task-item-node/task-node-render.js +43 -0
- package/lib/components/task-tree/task-tree.css +16 -0
- package/lib/components/task-tree/task-tree.js +49 -0
- package/lib/components/time-picker/index.css +123 -0
- package/lib/components/time-picker/index.js +13 -0
- package/lib/components/time-picker/time-picker-selector.js +138 -0
- package/lib/components/time-picker/time-picker.js +336 -0
- package/lib/components/time-picker/timer-picker-input.js +96 -0
- package/lib/components/time-picker/utils.js +52 -0
- package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.css +1 -0
- package/lib/components-v1/radio/radio.js +3 -3
- package/lib/components-v1/radio/style/index.css +8 -8
- package/lib/pages/aha2021/index.js +5 -1
- package/lib/pages/okr-map/export-modules/okr-map/header/index.js +24 -24
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +31 -31
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.css +2 -2
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.js +11 -11
- package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +8 -8
- package/lib/pages/okr-map/number-select/index.js +2 -2
- package/lib/utils/auth.js +6 -6
- package/lib/utils/bs-global.js +12 -12
- package/lib/utils/hooks.js +72 -0
- package/lib/utils/open-data.js +26 -26
- package/package.json +5 -2
- package/.eslintignore +0 -3
- package/.eslintrc.js +0 -223
- package/.husky/pre-commit +0 -4
- package/.prettierignore +0 -31
- package/.prettierrc.js +0 -90
- package/.vscode/settings.json +0 -5
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
|
|
59
59
|
.titaui-okr-flow--node__kr {
|
|
60
60
|
border: 1px solid rgba(90, 216, 166, 0.5);
|
|
61
|
-
background: #
|
|
61
|
+
background: #eefbf6;
|
|
62
62
|
height: 96px;
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
flex: 1;
|
|
99
99
|
font-size: 13px;
|
|
100
100
|
font-weight: 400;
|
|
101
|
-
color: #
|
|
101
|
+
color: #3f4755;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
.titaui-okr-flow--node-kr-progress {
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
line-height: 24px;
|
|
203
203
|
font-size: 12px;
|
|
204
204
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
205
|
-
color: #
|
|
205
|
+
color: #6f7886;
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
.titaui-okr-flow--node-weight:before {
|
|
@@ -224,7 +224,7 @@
|
|
|
224
224
|
align-items: center;
|
|
225
225
|
font-size: 12px;
|
|
226
226
|
line-height: 24px;
|
|
227
|
-
color: #
|
|
227
|
+
color: #6f7886;
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
.titaui-okr-flow--node-progress .t-c-progress-circle {
|
|
@@ -413,7 +413,7 @@
|
|
|
413
413
|
}
|
|
414
414
|
|
|
415
415
|
.titaui-okr-flow__dark .titaui-okr-flow--node-status__normal {
|
|
416
|
-
color: #
|
|
416
|
+
color: #1fa7ff;
|
|
417
417
|
background: #3b4e6e;
|
|
418
418
|
}
|
|
419
419
|
|
|
@@ -432,7 +432,7 @@
|
|
|
432
432
|
}
|
|
433
433
|
|
|
434
434
|
.titaui-okr-flow__dark .titaui-okr-flow--node-kr-status__normal {
|
|
435
|
-
color: #
|
|
435
|
+
color: #1fa7ff;
|
|
436
436
|
background: #3b4e6e;
|
|
437
437
|
}
|
|
438
438
|
|
|
@@ -65,7 +65,7 @@ function WorkNode(_ref) {
|
|
|
65
65
|
darkTheme = _ref.darkTheme;
|
|
66
66
|
var workId = data.workId,
|
|
67
67
|
_data$workName = data.workName,
|
|
68
|
-
workName = _data$workName === void 0 ?
|
|
68
|
+
workName = _data$workName === void 0 ? '' : _data$workName,
|
|
69
69
|
okrType = data.okrType,
|
|
70
70
|
departmentId = data.departmentId,
|
|
71
71
|
departmentName = data.departmentName,
|
|
@@ -101,7 +101,7 @@ function WorkNode(_ref) {
|
|
|
101
101
|
|
|
102
102
|
var getOkrTypeMap = function getOkrTypeMap() {
|
|
103
103
|
return {
|
|
104
|
-
1: (0, _getLocale.getLocale)(
|
|
104
|
+
1: (0, _getLocale.getLocale)('OKR_MyO_Pop_Individual'),
|
|
105
105
|
// 2: <OpenDepartmentName id={departmentId} name={departmentName} />,
|
|
106
106
|
2: /*#__PURE__*/_react["default"].createElement("img", {
|
|
107
107
|
src: darkTheme ? whiteImg : departUrl,
|
|
@@ -110,8 +110,8 @@ function WorkNode(_ref) {
|
|
|
110
110
|
},
|
|
111
111
|
width: imgWidth
|
|
112
112
|
}),
|
|
113
|
-
3: (0, _getLocale.getLocale)(
|
|
114
|
-
4: groupName || (0, _getLocale.getLocale)(
|
|
113
|
+
3: (0, _getLocale.getLocale)('OKR_MyO_Pop_Company'),
|
|
114
|
+
4: groupName || (0, _getLocale.getLocale)('OKR_MyO_Text_Team')
|
|
115
115
|
};
|
|
116
116
|
};
|
|
117
117
|
|
|
@@ -122,7 +122,7 @@ function WorkNode(_ref) {
|
|
|
122
122
|
while (1) {
|
|
123
123
|
switch (_context.prev = _context.next) {
|
|
124
124
|
case 0:
|
|
125
|
-
name = departmentName ||
|
|
125
|
+
name = departmentName || '默认部门';
|
|
126
126
|
|
|
127
127
|
if (!(0, _bsGlobal.isWx)()) {
|
|
128
128
|
_context.next = 5;
|
|
@@ -133,15 +133,15 @@ function WorkNode(_ref) {
|
|
|
133
133
|
return (0, _openDataPainter.getOpenData)({
|
|
134
134
|
id: departmentId,
|
|
135
135
|
name: departmentName,
|
|
136
|
-
type:
|
|
136
|
+
type: 'departmentName'
|
|
137
137
|
});
|
|
138
138
|
|
|
139
139
|
case 4:
|
|
140
140
|
name = _context.sent;
|
|
141
141
|
|
|
142
142
|
case 5:
|
|
143
|
-
getCanvasImg(
|
|
144
|
-
getCanvasImg(
|
|
143
|
+
getCanvasImg('white', name);
|
|
144
|
+
getCanvasImg('dark', name);
|
|
145
145
|
|
|
146
146
|
case 7:
|
|
147
147
|
case "end":
|
|
@@ -157,11 +157,11 @@ function WorkNode(_ref) {
|
|
|
157
157
|
}();
|
|
158
158
|
|
|
159
159
|
var getCanvasImg = function getCanvasImg() {
|
|
160
|
-
var theme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] :
|
|
160
|
+
var theme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'white';
|
|
161
161
|
var name = arguments.length > 1 ? arguments[1] : undefined;
|
|
162
|
-
var canvas = document.createElement(
|
|
163
|
-
var ctx = canvas.getContext(
|
|
164
|
-
var font =
|
|
162
|
+
var canvas = document.createElement('canvas');
|
|
163
|
+
var ctx = canvas.getContext('2d');
|
|
164
|
+
var font = 'normal 12px/24px -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei';
|
|
165
165
|
ctx.font = font; // const fitStr = fittingString(ctx, name, 92);
|
|
166
166
|
|
|
167
167
|
var _ctx$measureText = ctx.measureText(name),
|
|
@@ -170,11 +170,11 @@ function WorkNode(_ref) {
|
|
|
170
170
|
var actualWidth = Math.min(width, 92);
|
|
171
171
|
(0, _openDataPainter.setSize)(canvas, ctx, actualWidth, 24);
|
|
172
172
|
setImgWidth(actualWidth);
|
|
173
|
-
ctx.textBaseline =
|
|
173
|
+
ctx.textBaseline = 'middle';
|
|
174
174
|
ctx.font = font;
|
|
175
|
-
ctx.fillStyle = theme ==
|
|
175
|
+
ctx.fillStyle = theme == 'white' ? '#FFFFFF' : '#6f7886';
|
|
176
176
|
ctx.fillText(name, 0, 12);
|
|
177
|
-
theme ==
|
|
177
|
+
theme == 'white' ? setWhiteImg(canvas.toDataURL()) : setDepartUrl(canvas.toDataURL());
|
|
178
178
|
};
|
|
179
179
|
|
|
180
180
|
(0, _react.useEffect)(function () {
|
|
@@ -184,13 +184,13 @@ function WorkNode(_ref) {
|
|
|
184
184
|
}, []);
|
|
185
185
|
|
|
186
186
|
var openODetail = function openODetail(id) {
|
|
187
|
-
_drawerManager["default"].open(
|
|
187
|
+
_drawerManager["default"].open('okrDetail', {
|
|
188
188
|
okrId: workId
|
|
189
189
|
});
|
|
190
190
|
};
|
|
191
191
|
|
|
192
192
|
var openKr = function openKr(id) {
|
|
193
|
-
_drawerManager["default"].open(
|
|
193
|
+
_drawerManager["default"].open('krDetail', {
|
|
194
194
|
krId: id
|
|
195
195
|
});
|
|
196
196
|
};
|
|
@@ -206,7 +206,7 @@ function WorkNode(_ref) {
|
|
|
206
206
|
|
|
207
207
|
switch (cycleTypeCopy) {
|
|
208
208
|
case 0:
|
|
209
|
-
return (0, _getLocale.getLocale)(
|
|
209
|
+
return (0, _getLocale.getLocale)('Mod_Customization');
|
|
210
210
|
|
|
211
211
|
case 1:
|
|
212
212
|
return "".concat(annualNum, "\u5E74");
|
|
@@ -221,15 +221,15 @@ function WorkNode(_ref) {
|
|
|
221
221
|
return "".concat(yqmnum, "-").concat((yqmnum + 1) % 12 || 12, "\u6708");
|
|
222
222
|
|
|
223
223
|
case 5:
|
|
224
|
-
return "".concat(yqmnum == 1 ?
|
|
224
|
+
return "".concat(yqmnum == 1 ? '上' : '下', "\u534A\u5E74");
|
|
225
225
|
|
|
226
226
|
case -1:
|
|
227
|
-
return KrIndex ? "KR".concat(KrIndex) :
|
|
227
|
+
return KrIndex ? "KR".concat(KrIndex) : 'KR';
|
|
228
228
|
}
|
|
229
229
|
}; // 1:正常 2:有风险 3:过期 4:完成 5:过期完成 ,
|
|
230
230
|
|
|
231
231
|
|
|
232
|
-
var riskLevelSuffix = [
|
|
232
|
+
var riskLevelSuffix = ['normal', 'normal', 'risk', 'expired', 'complete', 'complete_over', 'normal'];
|
|
233
233
|
if (!MapOkrVisible) return /*#__PURE__*/_react["default"].createElement("div", {
|
|
234
234
|
className: (0, _classnames["default"])("".concat(_precls["default"], "--node"), "".concat(_precls["default"], "--node__private"))
|
|
235
235
|
});
|
|
@@ -87,7 +87,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
87
87
|
mapInstance = _useState2[0],
|
|
88
88
|
setMapInstance = _useState2[1];
|
|
89
89
|
|
|
90
|
-
var _useState3 = (0, _react.useState)(
|
|
90
|
+
var _useState3 = (0, _react.useState)('none'),
|
|
91
91
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
92
92
|
bgColor = _useState4[0],
|
|
93
93
|
setBgColor = _useState4[1];
|
|
@@ -123,12 +123,12 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
123
123
|
while (1) {
|
|
124
124
|
switch (_context.prev = _context.next) {
|
|
125
125
|
case 0:
|
|
126
|
-
okrMapRef = document.querySelector(
|
|
126
|
+
okrMapRef = document.querySelector('.titaui-okr-flow__export') || document.createElement('div');
|
|
127
127
|
width = okrMapRef.clientWidth; // 获取dom 宽度
|
|
128
128
|
|
|
129
129
|
height = okrMapRef.clientHeight; // 获取dom 高度
|
|
130
130
|
|
|
131
|
-
canvas = document.createElement(
|
|
131
|
+
canvas = document.createElement('canvas'); // 创建一个canvas节点
|
|
132
132
|
|
|
133
133
|
scale = 20; // 定义任意放大倍数 支持小数
|
|
134
134
|
|
|
@@ -155,6 +155,8 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
155
155
|
};
|
|
156
156
|
_context.next = 12;
|
|
157
157
|
return (0, _html2canvas["default"])(okrMapRef, opts).then(function (result) {
|
|
158
|
+
var _window, _window$BSGlobal, _window$BSGlobal$logi, _window2, _window2$BSGlobal, _window2$BSGlobal$ten;
|
|
159
|
+
|
|
158
160
|
if ((0, _bsGlobal.isWx)() && window.WWOpenData) {
|
|
159
161
|
if (window.WWOpenData.enableCanvasSharing) {
|
|
160
162
|
window.WWOpenData.enableCanvasSharing();
|
|
@@ -165,36 +167,52 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
165
167
|
}
|
|
166
168
|
}
|
|
167
169
|
|
|
168
|
-
var
|
|
170
|
+
var userId = (_window = window) === null || _window === void 0 ? void 0 : (_window$BSGlobal = _window.BSGlobal) === null || _window$BSGlobal === void 0 ? void 0 : (_window$BSGlobal$logi = _window$BSGlobal.loginUserInfo) === null || _window$BSGlobal$logi === void 0 ? void 0 : _window$BSGlobal$logi.Id;
|
|
171
|
+
var telentId = (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$BSGlobal = _window2.BSGlobal) === null || _window2$BSGlobal === void 0 ? void 0 : (_window2$BSGlobal$ten = _window2$BSGlobal.tenantInfo) === null || _window2$BSGlobal$ten === void 0 ? void 0 : _window2$BSGlobal$ten.Id;
|
|
172
|
+
var imgUrl = result.toDataURL('image/png'); // 得到图片的base64编码数据
|
|
173
|
+
// @ts-ignore
|
|
169
174
|
|
|
170
175
|
// 得到图片的base64编码数据
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
176
|
+
// @ts-ignore
|
|
177
|
+
window.titaTracker && window.titaTracker("action").record({
|
|
178
|
+
actionName: userId + '租户:' + telentId + '我得到了图片' + imgUrl,
|
|
179
|
+
actionGroup: 'okr地图图片',
|
|
180
|
+
productName: 'okr地图导出'
|
|
181
|
+
});
|
|
182
|
+
(0, _requestApis.getBase64DownloadUrl)(imgUrl.split(',')[1]).then(function (url) {
|
|
183
|
+
var image = new Image(); // @ts-ignore
|
|
184
|
+
|
|
185
|
+
// @ts-ignore
|
|
186
|
+
window.titaTracker && window.titaTracker("action").record({
|
|
187
|
+
actionName: userId + '租户:' + telentId + '我获得了地址' + url.Data.obj,
|
|
188
|
+
actionGroup: 'okr地图接口',
|
|
189
|
+
productName: 'okr地图导出'
|
|
190
|
+
});
|
|
191
|
+
image.setAttribute('crossOrigin', 'anonymous');
|
|
174
192
|
|
|
175
193
|
image.onload = function () {
|
|
176
194
|
if (!url.Data.obj) {
|
|
177
|
-
_toast["default"].Error(
|
|
195
|
+
_toast["default"].Error('导出失败,请稍后重试', {
|
|
178
196
|
canClose: false
|
|
179
197
|
});
|
|
180
198
|
}
|
|
181
199
|
|
|
182
|
-
var a = document.createElement(
|
|
200
|
+
var a = document.createElement('a'); // 生成一个a元素
|
|
183
201
|
|
|
184
202
|
// 生成一个a元素
|
|
185
|
-
var event = new MouseEvent(
|
|
203
|
+
var event = new MouseEvent('click'); // 创建一个单击事件
|
|
186
204
|
|
|
187
205
|
// 创建一个单击事件
|
|
188
|
-
a.download =
|
|
206
|
+
a.download = 'okr地图'; // 设置图片名称
|
|
189
207
|
|
|
190
208
|
// 设置图片名称
|
|
191
|
-
a.href = url.Data.obj; // 将生成的URL设置为a
|
|
209
|
+
a.href = url.Data.obj; // 将生成的URL设置为a
|
|
192
210
|
|
|
193
|
-
// 将生成的URL设置为a
|
|
211
|
+
// 将生成的URL设置为a
|
|
194
212
|
a.dispatchEvent(event); // 触发a的单击事件
|
|
195
213
|
|
|
196
214
|
// 触发a的单击事件
|
|
197
|
-
_toast["default"].Success(
|
|
215
|
+
_toast["default"].Success('导出成功');
|
|
198
216
|
|
|
199
217
|
setIsExport(false);
|
|
200
218
|
|
|
@@ -228,7 +246,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
228
246
|
|
|
229
247
|
var confirmHandler = function confirmHandler() {
|
|
230
248
|
if (isExport) {
|
|
231
|
-
_toast["default"].Warning(
|
|
249
|
+
_toast["default"].Warning('正在导出中', {
|
|
232
250
|
canClose: true
|
|
233
251
|
});
|
|
234
252
|
|
|
@@ -244,7 +262,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
244
262
|
};
|
|
245
263
|
|
|
246
264
|
var colorChangeHandler = function colorChangeHandler(colors) {
|
|
247
|
-
setBgColor(colors ? colors.color :
|
|
265
|
+
setBgColor(colors ? colors.color : 'none');
|
|
248
266
|
};
|
|
249
267
|
|
|
250
268
|
var NodeDebug = function NodeDebug() {
|
|
@@ -261,7 +279,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
261
279
|
};
|
|
262
280
|
|
|
263
281
|
return /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
|
|
264
|
-
title: (0, _getLocale.getLocale)(
|
|
282
|
+
title: (0, _getLocale.getLocale)('OKR_Ali_Exportmap'),
|
|
265
283
|
noFooterLine: true,
|
|
266
284
|
visible: visible,
|
|
267
285
|
width: "1000px",
|
|
@@ -277,7 +295,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
277
295
|
style: {
|
|
278
296
|
marginRight: 10
|
|
279
297
|
}
|
|
280
|
-
}, (0, _getLocale.getLocale)(
|
|
298
|
+
}, (0, _getLocale.getLocale)('OKR_Ali_Selectbackground')), /*#__PURE__*/_react["default"].createElement(_rcColorPicker["default"], {
|
|
281
299
|
animation: "slide-up",
|
|
282
300
|
color: "#FFFFFF",
|
|
283
301
|
onChange: colorChangeHandler,
|
|
@@ -308,7 +326,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
308
326
|
paneMoveable: false,
|
|
309
327
|
style: {
|
|
310
328
|
height: 600,
|
|
311
|
-
width:
|
|
329
|
+
width: '100%',
|
|
312
330
|
background: bgColor
|
|
313
331
|
}
|
|
314
332
|
}, /*#__PURE__*/_react["default"].createElement(NodeDebug, null)))))));
|
|
@@ -72,7 +72,7 @@ function OkrSearchPanel(props, ref) {
|
|
|
72
72
|
_props$rootId = props.rootId,
|
|
73
73
|
rootId = _props$rootId === void 0 ? 0 : _props$rootId,
|
|
74
74
|
_props$rootName = props.rootName,
|
|
75
|
-
rootName = _props$rootName === void 0 ?
|
|
75
|
+
rootName = _props$rootName === void 0 ? '' : _props$rootName,
|
|
76
76
|
_props$avatar = props.avatar,
|
|
77
77
|
avatar = _props$avatar === void 0 ? {} : _props$avatar,
|
|
78
78
|
direction = props.direction,
|
|
@@ -80,7 +80,7 @@ function OkrSearchPanel(props, ref) {
|
|
|
80
80
|
yqmNum = props.yqmNum,
|
|
81
81
|
annualNum = props.annualNum,
|
|
82
82
|
_props$okrType = props.okrType,
|
|
83
|
-
okrType = _props$okrType === void 0 ?
|
|
83
|
+
okrType = _props$okrType === void 0 ? '' : _props$okrType,
|
|
84
84
|
_props$openLevel = props.openLevel,
|
|
85
85
|
openLevel = _props$openLevel === void 0 ? 2 : _props$openLevel,
|
|
86
86
|
_props$showkr = props.showkr,
|
|
@@ -127,12 +127,12 @@ function OkrSearchPanel(props, ref) {
|
|
|
127
127
|
cycleType: cycleType,
|
|
128
128
|
yqmNum: yqmNum,
|
|
129
129
|
annualNum: annualNum,
|
|
130
|
-
userIds: searchType ==
|
|
131
|
-
departmentIds: searchType ==
|
|
132
|
-
groupIds: searchType ==
|
|
130
|
+
userIds: searchType == 'user' ? rootId : '',
|
|
131
|
+
departmentIds: searchType == 'depart' ? rootId : '',
|
|
132
|
+
groupIds: searchType == 'group' ? rootId : '',
|
|
133
133
|
orderType: 2,
|
|
134
134
|
// 排序
|
|
135
|
-
okrType: _config.OkrTypeSetting ? searchType ==
|
|
135
|
+
okrType: _config.OkrTypeSetting ? searchType == 'user' ? '' : okrType : '',
|
|
136
136
|
status: 0
|
|
137
137
|
});
|
|
138
138
|
|
|
@@ -168,7 +168,7 @@ function OkrSearchPanel(props, ref) {
|
|
|
168
168
|
subTreeNodes = (0, _treeHandler.buildTreeNodes)(allNodes, openLevel, showkr);
|
|
169
169
|
setTreeNodes({
|
|
170
170
|
id: 0,
|
|
171
|
-
modelType:
|
|
171
|
+
modelType: 'root',
|
|
172
172
|
data: _defineProperty({
|
|
173
173
|
searchType: searchType,
|
|
174
174
|
rootName: rootName,
|
|
@@ -217,9 +217,9 @@ function OkrSearchPanel(props, ref) {
|
|
|
217
217
|
id = node.id, modelType = node.modelType, data = node.data;
|
|
218
218
|
_context2.next = 3;
|
|
219
219
|
return (0, _requestApis.expandNode)({
|
|
220
|
-
krId: modelType ==
|
|
221
|
-
okrId: modelType ==
|
|
222
|
-
okrIdParent: modelType ==
|
|
220
|
+
krId: modelType == 'kr' ? id : 0,
|
|
221
|
+
okrId: modelType == 'kr' ? data.workId : id,
|
|
222
|
+
okrIdParent: modelType == 'work' ? data.parentId : data.workId,
|
|
223
223
|
childRoot: false,
|
|
224
224
|
showCardKr: showCardKr ? 1 : 0
|
|
225
225
|
});
|
|
@@ -269,12 +269,12 @@ function OkrSearchPanel(props, ref) {
|
|
|
269
269
|
id = node.id, modelType = node.modelType, data = node.data;
|
|
270
270
|
_context3.next = 3;
|
|
271
271
|
return (0, _requestApis.expandNode)({
|
|
272
|
-
krId: modelType ==
|
|
273
|
-
okrId: modelType ==
|
|
272
|
+
krId: modelType == 'kr' ? id : 0,
|
|
273
|
+
okrId: modelType == 'work' ? id : data.workId,
|
|
274
274
|
okrIdParent: 0,
|
|
275
275
|
childRoot: true,
|
|
276
276
|
showCardKr: showCardKr ? 1 : 0,
|
|
277
|
-
currentOkrRole: modelType ==
|
|
277
|
+
currentOkrRole: modelType == 'kr' ? data.mapkrVisible : data.MapOkrVisible
|
|
278
278
|
});
|
|
279
279
|
|
|
280
280
|
case 3:
|
|
@@ -325,7 +325,7 @@ function OkrSearchPanel(props, ref) {
|
|
|
325
325
|
break;
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
-
_toast["default"].Warning(
|
|
328
|
+
_toast["default"].Warning('暂无OKR');
|
|
329
329
|
|
|
330
330
|
return _context4.abrupt("return");
|
|
331
331
|
|
|
@@ -63,7 +63,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
63
63
|
|
|
64
64
|
var OkrMap = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
65
65
|
var _props$direction = props.direction,
|
|
66
|
-
direction = _props$direction === void 0 ?
|
|
66
|
+
direction = _props$direction === void 0 ? 'horizontal' : _props$direction,
|
|
67
67
|
_props$darkTheme = props.darkTheme,
|
|
68
68
|
darkTheme = _props$darkTheme === void 0 ? false : _props$darkTheme,
|
|
69
69
|
_props$showkr = props.showkr,
|
|
@@ -91,7 +91,7 @@ var OkrMap = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
91
91
|
var _element$data = element.data,
|
|
92
92
|
data = _element$data === void 0 ? {} : _element$data,
|
|
93
93
|
type = element.type;
|
|
94
|
-
if (type ==
|
|
94
|
+
if (type == 'default' || type == 'RootNode' || (data === null || data === void 0 ? void 0 : data.modelType) == 'work') return;
|
|
95
95
|
onNodeClick & onNodeClick(data);
|
|
96
96
|
};
|
|
97
97
|
|
|
@@ -100,7 +100,7 @@ var OkrMap = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
100
100
|
var containerWidth = document.body.clientWidth - 180 - 320;
|
|
101
101
|
var rootNode = virtualElements[0];
|
|
102
102
|
|
|
103
|
-
if (direction ==
|
|
103
|
+
if (direction == 'horizontal') {
|
|
104
104
|
var targetY = containerHeight / 2;
|
|
105
105
|
return [-160, targetY - rootNode.position.y];
|
|
106
106
|
}
|
|
@@ -173,8 +173,8 @@ var OkrMap = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
173
173
|
};
|
|
174
174
|
|
|
175
175
|
var closeOkrDrawer = function closeOkrDrawer() {
|
|
176
|
-
var mousedown = document.createEvent(
|
|
177
|
-
mousedown.initMouseEvent(
|
|
176
|
+
var mousedown = document.createEvent('MouseEvents');
|
|
177
|
+
mousedown.initMouseEvent('mousedown', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
|
|
178
178
|
window.parent.document.body.dispatchEvent(mousedown); // drawerWrapper.close()
|
|
179
179
|
};
|
|
180
180
|
|
|
@@ -27,8 +27,8 @@ var userId = window.BSGlobal && window.BSGlobal.loginUserInfo.Id || 0;
|
|
|
27
27
|
exports.userId = userId;
|
|
28
28
|
|
|
29
29
|
var requestDomain = function requestDomain() {
|
|
30
|
-
if (!window.location.hostname.match(/dev/)) return
|
|
31
|
-
return
|
|
30
|
+
if (!window.location.hostname.match(/dev/)) return '';
|
|
31
|
+
return 'https://www.tita.gift';
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
var checkTenantOkrExist = /*#__PURE__*/function () {
|
|
@@ -70,9 +70,9 @@ exports.searchOkrs = searchOkrs;
|
|
|
70
70
|
|
|
71
71
|
var expandNode = function expandNode(params) {
|
|
72
72
|
var _params$okrId = params.okrId,
|
|
73
|
-
okrId = _params$okrId === void 0 ?
|
|
73
|
+
okrId = _params$okrId === void 0 ? '' : _params$okrId,
|
|
74
74
|
_params$krId = params.krId,
|
|
75
|
-
krId = _params$krId === void 0 ?
|
|
75
|
+
krId = _params$krId === void 0 ? '' : _params$krId,
|
|
76
76
|
_params$childRoot = params.childRoot,
|
|
77
77
|
childRoot = _params$childRoot === void 0 ? true : _params$childRoot,
|
|
78
78
|
_params$okrIdParent = params.okrIdParent,
|
|
@@ -50,19 +50,19 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
50
50
|
function RootNode(props) {
|
|
51
51
|
var _props$data = props.data,
|
|
52
52
|
_props$data$rootName = _props$data.rootName,
|
|
53
|
-
rootName = _props$data$rootName === void 0 ?
|
|
53
|
+
rootName = _props$data$rootName === void 0 ? '' : _props$data$rootName,
|
|
54
54
|
_props$data$rootId = _props$data.rootId,
|
|
55
55
|
rootId = _props$data$rootId === void 0 ? 0 : _props$data$rootId,
|
|
56
56
|
_props$data$avatar = _props$data.avatar,
|
|
57
57
|
avatar = _props$data$avatar === void 0 ? {} : _props$data$avatar,
|
|
58
58
|
searchType = _props$data.searchType;
|
|
59
59
|
|
|
60
|
-
var _useState = (0, _react.useState)(
|
|
60
|
+
var _useState = (0, _react.useState)(''),
|
|
61
61
|
_useState2 = _slicedToArray(_useState, 2),
|
|
62
62
|
normalRootImg = _useState2[0],
|
|
63
63
|
setNormalRootImg = _useState2[1];
|
|
64
64
|
|
|
65
|
-
var _useState3 = (0, _react.useState)(
|
|
65
|
+
var _useState3 = (0, _react.useState)(''),
|
|
66
66
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
67
67
|
whiteRootImg = _useState4[0],
|
|
68
68
|
setWhiteImg = _useState4[1];
|
|
@@ -80,19 +80,19 @@ function RootNode(props) {
|
|
|
80
80
|
darkTheme = context.darkTheme;
|
|
81
81
|
|
|
82
82
|
var getRootIcon = function getRootIcon() {
|
|
83
|
-
if (searchType ==
|
|
83
|
+
if (searchType == 'company') {
|
|
84
84
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
85
85
|
className: (0, _classnames["default"])("".concat(_precls["default"], "--root-node-icon__company"))
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
if (searchType ==
|
|
89
|
+
if (searchType == 'user') {
|
|
90
90
|
if (hasAvatar) {
|
|
91
91
|
return /*#__PURE__*/_react["default"].createElement("img", {
|
|
92
92
|
src: avatar.big ? avatar.big : avatar.small,
|
|
93
93
|
width: 24,
|
|
94
94
|
style: {
|
|
95
|
-
borderRadius:
|
|
95
|
+
borderRadius: '50%'
|
|
96
96
|
}
|
|
97
97
|
});
|
|
98
98
|
}
|
|
@@ -118,7 +118,7 @@ function RootNode(props) {
|
|
|
118
118
|
})));
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
if (searchType ==
|
|
121
|
+
if (searchType == 'depart') {
|
|
122
122
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
123
123
|
className: (0, _classnames["default"])("".concat(_precls["default"], "--root-node-icon__normal"))
|
|
124
124
|
}, rootName[0]);
|
|
@@ -147,15 +147,15 @@ function RootNode(props) {
|
|
|
147
147
|
return (0, _openDataPainter.getOpenData)({
|
|
148
148
|
id: rootId,
|
|
149
149
|
name: rootName,
|
|
150
|
-
type: searchType ==
|
|
150
|
+
type: searchType == 'user' ? 'userName' : 'departmentName'
|
|
151
151
|
});
|
|
152
152
|
|
|
153
153
|
case 4:
|
|
154
154
|
wxRootName = _context.sent;
|
|
155
155
|
|
|
156
156
|
case 5:
|
|
157
|
-
generalCanvas(
|
|
158
|
-
generalCanvas(
|
|
157
|
+
generalCanvas('normal', wxRootName);
|
|
158
|
+
generalCanvas('white', wxRootName);
|
|
159
159
|
|
|
160
160
|
case 7:
|
|
161
161
|
case "end":
|
|
@@ -171,11 +171,11 @@ function RootNode(props) {
|
|
|
171
171
|
}();
|
|
172
172
|
|
|
173
173
|
var generalCanvas = function generalCanvas() {
|
|
174
|
-
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] :
|
|
174
|
+
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'normal';
|
|
175
175
|
var rootName = arguments.length > 1 ? arguments[1] : undefined;
|
|
176
|
-
var canvas = document.createElement(
|
|
177
|
-
var font =
|
|
178
|
-
var ctx = canvas.getContext(
|
|
176
|
+
var canvas = document.createElement('canvas');
|
|
177
|
+
var font = 'normal 14px/24px Arial,Verdana,Helvetica Neue,Helvetica,sans-serif,PingFang SC,Microsoft YaHei';
|
|
178
|
+
var ctx = canvas.getContext('2d');
|
|
179
179
|
ctx.font = font; // const fitStr = fittingString(ctx, rootName, 268);
|
|
180
180
|
|
|
181
181
|
var _ctx$measureText = ctx.measureText(rootName),
|
|
@@ -185,41 +185,42 @@ function RootNode(props) {
|
|
|
185
185
|
(0, _openDataPainter.setSize)(canvas, ctx, actualWidth, 24); // 设置画布尺寸
|
|
186
186
|
|
|
187
187
|
setImgWidth(actualWidth);
|
|
188
|
-
ctx.textBaseline =
|
|
188
|
+
ctx.textBaseline = 'middle';
|
|
189
189
|
ctx.font = font;
|
|
190
|
-
ctx.fillStyle = type ==
|
|
190
|
+
ctx.fillStyle = type == 'normal' ? '#6f7886' : '#FFFFFF';
|
|
191
191
|
ctx.fillText(rootName, 0, 12);
|
|
192
|
-
type ==
|
|
192
|
+
type == 'normal' ? setNormalRootImg(canvas.toDataURL()) : setWhiteImg(canvas.toDataURL());
|
|
193
193
|
};
|
|
194
194
|
|
|
195
195
|
(0, _react.useEffect)(function () {
|
|
196
|
-
|
|
196
|
+
;
|
|
197
|
+
(searchType == 'user' || searchType == 'depart') && rootName.length && getRootName();
|
|
197
198
|
}, [rootName, rootId]);
|
|
198
199
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
199
200
|
className: (0, _classnames["default"])("".concat(_precls["default"], "--root-node-wrapper"), "".concat(_precls["default"], "--root-node-wrapper__").concat(direction))
|
|
200
201
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
201
202
|
className: (0, _classnames["default"])("".concat(_precls["default"], "--root-node"))
|
|
202
|
-
}, getRootIcon(), searchType !==
|
|
203
|
+
}, getRootIcon(), searchType !== 'user' && searchType !== 'depart' && /*#__PURE__*/_react["default"].createElement("span", {
|
|
203
204
|
className: (0, _classnames["default"])("".concat(_precls["default"], "--root-node-text"))
|
|
204
|
-
}, rootName), (searchType ==
|
|
205
|
+
}, rootName), (searchType == 'user' || searchType == 'depart') && /*#__PURE__*/_react["default"].createElement("img", {
|
|
205
206
|
src: darkTheme ? whiteRootImg : normalRootImg,
|
|
206
207
|
style: {
|
|
207
208
|
maxWidth: 268,
|
|
208
209
|
marginLeft: 4
|
|
209
210
|
},
|
|
210
211
|
width: imgWidth
|
|
211
|
-
})), direction ===
|
|
212
|
+
})), direction === 'horizontal' && /*#__PURE__*/_react["default"].createElement(_reactFlowRenderer.Handle, {
|
|
212
213
|
type: "source",
|
|
213
214
|
position: "right",
|
|
214
215
|
style: {
|
|
215
|
-
visibility:
|
|
216
|
+
visibility: 'hidden',
|
|
216
217
|
right: 0
|
|
217
218
|
}
|
|
218
|
-
}), direction ===
|
|
219
|
+
}), direction === 'vertical' && /*#__PURE__*/_react["default"].createElement(_reactFlowRenderer.Handle, {
|
|
219
220
|
type: "source",
|
|
220
221
|
position: "bottom",
|
|
221
222
|
style: {
|
|
222
|
-
visibility:
|
|
223
|
+
visibility: 'hidden',
|
|
223
224
|
bottom: 0
|
|
224
225
|
}
|
|
225
226
|
}));
|
|
@@ -28,12 +28,12 @@ var nodeTypes = {
|
|
|
28
28
|
exports.nodeTypes = nodeTypes;
|
|
29
29
|
|
|
30
30
|
var getLayoutedElements = function getLayoutedElements(elements) {
|
|
31
|
-
var direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] :
|
|
32
|
-
var isHorizontal = direction ===
|
|
31
|
+
var direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'horizontal';
|
|
32
|
+
var isHorizontal = direction === 'horizontal'; // const g = new dagre.graphlib.Graph({compound: true });
|
|
33
33
|
|
|
34
34
|
var g = new _dagre["default"].graphlib.Graph();
|
|
35
35
|
g.setGraph({
|
|
36
|
-
rankdir: isHorizontal ?
|
|
36
|
+
rankdir: isHorizontal ? 'LR' : 'TB',
|
|
37
37
|
nodesep: 12,
|
|
38
38
|
ranksep: 80
|
|
39
39
|
});
|
|
@@ -66,8 +66,8 @@ var getLayoutedElements = function getLayoutedElements(elements) {
|
|
|
66
66
|
if ((0, _reactFlowRenderer.isNode)(element)) {
|
|
67
67
|
var node = g.node(element.id);
|
|
68
68
|
return _objectSpread(_objectSpread({}, element), {}, {
|
|
69
|
-
targetPosition: isHorizontal ?
|
|
70
|
-
sourcePosition: isHorizontal ?
|
|
69
|
+
targetPosition: isHorizontal ? 'left' : 'top',
|
|
70
|
+
sourcePosition: isHorizontal ? 'right' : 'bottom',
|
|
71
71
|
position: {
|
|
72
72
|
x: node ? (node === null || node === void 0 ? void 0 : node.x) - (node === null || node === void 0 ? void 0 : node.width) / 2 : 0,
|
|
73
73
|
y: node ? (node === null || node === void 0 ? void 0 : node.y) - (node === null || node === void 0 ? void 0 : node.height) / 2 : 0
|