@titaui/pc 1.12.48-beta.2 → 1.12.48-beta.3

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.
Files changed (40) hide show
  1. package/lib/components/attachments-preview/index.css +5 -0
  2. package/lib/components/dynamic/constant.js +5 -1
  3. package/lib/components/dynamic/dynamic-item/components/okr-progress/index.css +44 -2
  4. package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +24 -6
  5. package/lib/components/dynamic/dynamic-item/components/summary-header/index.css +10 -0
  6. package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +61 -60
  7. package/lib/components/dynamic/dynamic-item/components/summary-header/request-api.js +9 -3
  8. package/lib/components/dynamic/dynamic-item/components/task-progress/index.css +91 -45
  9. package/lib/components/dynamic/dynamic-item/components/task-progress/index.js +22 -8
  10. package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.css +13 -0
  11. package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.js +5 -3
  12. package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.css +2 -2
  13. package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.css +44 -2
  14. package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +25 -7
  15. package/lib/components/dynamic/dynamic-item/dynamic-new-report/util.js +1 -1
  16. package/lib/components/dynamic/dynamic-item/index.css +1 -1
  17. package/lib/components/guide-tip/index.css +1 -1
  18. package/lib/components/guide-tip/index.js +15 -27
  19. package/lib/components/menus/components/menu-tree/tree-node/menu-item.js +5 -1
  20. package/lib/components/menus/export-modules/demo-menus/menus.js +5 -4
  21. package/lib/components/menus/export-modules/summary-menus/depart-menus/index.js +8 -3
  22. package/lib/components/menus/export-modules/summary-menus/index.js +1 -1
  23. package/lib/components/menus/export-modules/summary-menus/menus.js +57 -7
  24. package/lib/components/menus/export-modules/summary-menus/summary-front-menus.js +28 -6
  25. package/lib/components/menus/request-apis.js +15 -1
  26. package/lib/components/nav-top/components/app-center/images/new.svg +30 -0
  27. package/lib/components/nav-top/components/app-center/index.css +20 -1
  28. package/lib/components/nav-top/components/app-center/index.js +9 -1
  29. package/lib/components/nav-top/components/menu/index.css +11 -0
  30. package/lib/components/nav-top/components/menu/index.js +46 -54
  31. package/lib/components/nav-top/index.css +5 -0
  32. package/lib/components/nav-top/index.js +57 -20
  33. package/lib/components/okr-flow/okr-map/index.js +3 -1
  34. package/lib/components/picker/range-picker/components/picker-trigger/index.css +2 -3
  35. package/lib/components/picker/range-picker/components/picker-trigger/index.js +2 -2
  36. package/lib/components/rate/index.css +1 -1
  37. package/lib/components/rate/index.js +29 -2
  38. package/lib/utils/auth.js +5 -0
  39. package/lib/utils/open-data.js +1 -1
  40. package/package.json +2 -2
@@ -21,6 +21,10 @@ var _conditionRender = _interopRequireDefault(require("../../../../components/co
21
21
 
22
22
  var _useGlobalValue3 = _interopRequireDefault(require("../../useGlobalValue"));
23
23
 
24
+ var _guideTip = _interopRequireDefault(require("../../../guide-tip"));
25
+
26
+ var _getLocale = require("../../../../utils/getLocale");
27
+
24
28
  var _new = _interopRequireDefault(require("./img/new.svg"));
25
29
 
26
30
  require("./index.css");
@@ -45,7 +49,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
45
49
 
46
50
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
47
51
 
48
- var prefix = "titaui-nav-top-menu";
52
+ var prefix = 'titaui-nav-top-menu';
49
53
  var popupAlign = {
50
54
  offset: [0, 5],
51
55
  overflow: {
@@ -54,15 +58,7 @@ var popupAlign = {
54
58
  },
55
59
  targetOffset: [0, 0]
56
60
  };
57
- var NewFeatureGuidePopupAlign = {
58
- offset: [104, -5],
59
- overflow: {
60
- adjustX: true,
61
- adjustY: true
62
- },
63
- targetOffset: [0, 0]
64
- };
65
- var NEWMENUS = "#/interview";
61
+ var NEWMENUS = '#summary/my';
66
62
 
67
63
  var Menu = function Menu(_ref) {
68
64
  var menus = _ref.menus,
@@ -70,8 +66,8 @@ var Menu = function Menu(_ref) {
70
66
 
71
67
  var _useState = (0, _react.useState)(false),
72
68
  _useState2 = _slicedToArray(_useState, 2),
73
- isKnow = _useState2[0],
74
- setIsKonw = _useState2[1];
69
+ guideVisible = _useState2[0],
70
+ setGuideVisible = _useState2[1];
75
71
 
76
72
  var _useState3 = (0, _react.useState)(false),
77
73
  _useState4 = _slicedToArray(_useState3, 2),
@@ -83,7 +79,7 @@ var Menu = function Menu(_ref) {
83
79
  feedNum = _useGlobalValue2[0];
84
80
 
85
81
  var containerRef = (0, _react.useRef)();
86
- var apiPath = (0, _bsGlobal.getBSGlobal)("apiPath");
82
+ var apiPath = (0, _bsGlobal.getBSGlobal)('apiPath');
87
83
  var userId = (0, _bsGlobal.getUserInfo)().Id;
88
84
 
89
85
  var handlePopupVisibleChange = function handlePopupVisibleChange(visible) {
@@ -92,52 +88,37 @@ var Menu = function Menu(_ref) {
92
88
 
93
89
  var handleTracker = function handleTracker(menu) {
94
90
  if (window.titaTracker) {
95
- window.titaTracker("action").record({
91
+ window.titaTracker('action').record({
96
92
  actionName: "\u5BFC\u822A\u83DC\u5355__".concat(menu.title),
97
- actionGroup: "导航菜单",
98
- productName: "导航菜单"
93
+ actionGroup: '导航菜单',
94
+ productName: '导航菜单'
99
95
  });
100
96
  }
101
97
 
102
- if (menu.code === "dynamic" && feedNum > 0) {
98
+ if (menu.code === 'dynamic' && feedNum > 0) {
103
99
  window.location.reload();
104
100
  }
105
101
  };
106
102
 
107
- var handleClick = function handleClick() {
108
- setIsKonw(true);
109
- localStorage.setItem("isNewMenuItem__".concat(userId), "".concat(userId));
103
+ var handleClickClose = function handleClickClose() {
104
+ setGuideVisible(false);
105
+ localStorage.setItem("isKnowNewSummary__".concat(userId), "".concat(userId));
110
106
  };
111
107
 
112
108
  (0, _react.useEffect)(function () {
113
- var cacheIsKnow = localStorage.getItem("isNewMenuItem__".concat(userId));
109
+ var cacheIsKnow = localStorage.getItem("isKnowNewSummary__".concat(userId));
114
110
 
115
111
  if (cacheIsKnow) {
116
- setIsKonw(true);
112
+ setGuideVisible(false);
113
+ } else {
114
+ setGuideVisible(true);
117
115
  }
118
116
  }, []);
119
117
 
120
- var popup = /*#__PURE__*/_react["default"].createElement("div", {
121
- className: "".concat(prefix, "__tips")
122
- }, /*#__PURE__*/_react["default"].createElement("div", {
123
- className: (0, _classnames["default"])("".concat(prefix, "__tips-box"), _defineProperty({}, "".concat(prefix, "__tips-hide"), isKnow))
124
- }, /*#__PURE__*/_react["default"].createElement("div", {
125
- className: "".concat(prefix, "__tips-box-head")
126
- }, /*#__PURE__*/_react["default"].createElement("h2", {
127
- className: "".concat(prefix, "__tips-box-title")
128
- }, "1 : 1 \u9762\u8C08\uFF08\u4E00\u5BF9\u4E00\u9762\u8C08\uFF09\u4E0A\u7EBF\u5566\uFF01"), /*#__PURE__*/_react["default"].createElement("p", {
129
- className: "".concat(prefix, "__tips-box-content")
130
- }, "\u52A9\u529B\u7ECF\u7406\u548C\u4E0B\u7EA7\u8FDB\u884C\u6301\u7EED\u6C9F\u901A\uFF0C\u4E3A\u4E0D\u540C\u573A\u666F\u63D0\u4F9B\u4E30\u5BCC\u7684\u6C9F\u901A\u6A21\u677F\uFF0C\u5373\u523B\u4E86\u89E3\uFF0CGo~")), /*#__PURE__*/_react["default"].createElement("div", {
131
- className: "".concat(prefix, "__tips-box-ok"),
132
- onClick: handleClick
133
- }, "\u597D\u54D2")), /*#__PURE__*/_react["default"].createElement("div", {
134
- className: (0, _classnames["default"])("".concat(prefix, "__tips-triangle"), _defineProperty({}, "".concat(prefix, "__tips-hide"), isKnow))
135
- }));
136
-
137
118
  var renderRawItem = function renderRawItem(menu) {
138
119
  var href = menu.href;
139
120
 
140
- if (menu.title === "Learning" || menu.code === "learning") {
121
+ if (menu.title === 'Learning' || menu.code === 'learning') {
141
122
  href = "".concat(apiPath, "/").concat(href);
142
123
  }
143
124
 
@@ -145,27 +126,38 @@ var Menu = function Menu(_ref) {
145
126
  component: "span"
146
127
  }, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
147
128
  condition: menu.id
148
- }, /*#__PURE__*/_react["default"].createElement(_popup["default"], {
149
- popupVisible: !isKnow,
150
- popup: menu.href === NEWMENUS ? popup : null,
151
- mask: false,
152
- action: ["focus"],
153
- popupAlign: NewFeatureGuidePopupAlign,
154
- zIndex: 1000
155
- }, /*#__PURE__*/_react["default"].createElement("a", {
129
+ }, menu.href === NEWMENUS && /*#__PURE__*/_react["default"].createElement(_guideTip["default"], {
130
+ visible: guideVisible,
131
+ classnames: "".concat(prefix, "__guide"),
132
+ type: "button",
133
+ content: /*#__PURE__*/_react["default"].createElement("span", {
134
+ className: "".concat(prefix, "__guide-content")
135
+ }, (0, _getLocale.getLocale)('Rep_NewS_SuyUgraOKR')),
136
+ popupAlign: {
137
+ offset: [0, 140]
138
+ },
139
+ onClickClose: handleClickClose
140
+ }, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("a", {
156
141
  className: (0, _classnames["default"])("".concat(prefix, "__menu-show"), _defineProperty({}, "".concat(prefix, "__menu-show--active"), activeMenuId === menu.id)),
157
142
  href: href,
158
143
  target: "_self",
159
144
  onClick: function onClick() {
160
145
  return handleTracker(menu);
161
146
  }
162
- }, menu.title, menu.href === "#dynamic" && feedNum > 0 && /*#__PURE__*/_react["default"].createElement("div", {
163
- className: (0, _classnames["default"])("".concat(prefix, "__menu--hasNum"), _defineProperty({}, "".concat(prefix, "__menu--hasNum-active"), activeMenuId === menu.id && menu.href === "#dynamic"))
164
- }, feedNum > 100 ? "99+" : feedNum), menu.href === NEWMENUS && /*#__PURE__*/_react["default"].createElement("img", {
147
+ }, menu.title, /*#__PURE__*/_react["default"].createElement("img", {
165
148
  src: _new["default"],
166
149
  alt: "",
167
150
  className: "".concat(prefix, "__tips-new")
168
- })))));
151
+ })))), menu.href !== NEWMENUS && /*#__PURE__*/_react["default"].createElement("a", {
152
+ className: (0, _classnames["default"])("".concat(prefix, "__menu-show"), _defineProperty({}, "".concat(prefix, "__menu-show--active"), activeMenuId === menu.id)),
153
+ href: href,
154
+ target: "_self",
155
+ onClick: function onClick() {
156
+ return handleTracker(menu);
157
+ }
158
+ }, menu.title, menu.href === '#dynamic' && feedNum > 0 && /*#__PURE__*/_react["default"].createElement("div", {
159
+ className: (0, _classnames["default"])("".concat(prefix, "__menu--hasNum"), _defineProperty({}, "".concat(prefix, "__menu--hasNum-active"), activeMenuId === menu.id && menu.href === '#dynamic'))
160
+ }, feedNum > 100 ? '99+' : feedNum))));
169
161
  };
170
162
 
171
163
  var renderRest = function renderRest(items) {
@@ -179,7 +171,7 @@ var Menu = function Menu(_ref) {
179
171
  }, items.map(function (menu) {
180
172
  var href = menu.href;
181
173
 
182
- if (menu.title === "Learning" || menu.code === "learning") {
174
+ if (menu.title === 'Learning' || menu.code === 'learning') {
183
175
  href = "".concat(apiPath, "/").concat(href);
184
176
  }
185
177
 
@@ -200,7 +192,7 @@ var Menu = function Menu(_ref) {
200
192
  popupPlacement: "bottomLeft",
201
193
  popupAlign: popupAlign
202
194
  }, /*#__PURE__*/_react["default"].createElement("span", {
203
- className: (0, _classnames["default"])("tu-icon-diot", "".concat(prefix, "__more-icon"), _defineProperty({}, "".concat(prefix, "__more-icon--active"), isActiveHideMeun))
195
+ className: (0, _classnames["default"])('tu-icon-diot', "".concat(prefix, "__more-icon"), _defineProperty({}, "".concat(prefix, "__more-icon--active"), isActiveHideMeun))
204
196
  }));
205
197
  };
206
198
 
@@ -170,6 +170,11 @@
170
170
  color: #ffffff;
171
171
  }
172
172
 
173
+ .titaui-nav-top__app-guide-content {
174
+ color: #fff;
175
+ margin-bottom: 8px;
176
+ }
177
+
173
178
  .titaui-nav-top-no-shadow {
174
179
  box-shadow: none;
175
180
  }
@@ -21,6 +21,8 @@ var _appCenter = _interopRequireDefault(require("./components/app-center"));
21
21
 
22
22
  var _userOwnMenu = _interopRequireDefault(require("./components/user-own-menu"));
23
23
 
24
+ var _guideTip = _interopRequireDefault(require("../guide-tip"));
25
+
24
26
  var _menu = _interopRequireDefault(require("./components/menu"));
25
27
 
26
28
  var _userMessage = _interopRequireDefault(require("./components/user-message"));
@@ -56,11 +58,11 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
56
58
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
57
59
 
58
60
  var Logo = (0, _utils.getLogo)();
59
- var newNavigation = (0, _bsGlobal.getBSGlobal)('newNavigation') || [];
61
+ var newNavigation = (0, _bsGlobal.getBSGlobal)("newNavigation") || [];
60
62
  var hasOKRApp = newNavigation.find(function (item) {
61
63
  return item.appId === 113;
62
64
  });
63
- var preCls = 'titaui-nav-top';
65
+ var preCls = "titaui-nav-top";
64
66
 
65
67
  var NavTop = function NavTop() {
66
68
  var _classNames4;
@@ -75,7 +77,7 @@ var NavTop = function NavTop() {
75
77
  menu = _useState2[0],
76
78
  setMenu = _useState2[1];
77
79
 
78
- var versionInfo = (0, _bsGlobal.getBSGlobal)('tenantAuthentication');
80
+ var versionInfo = (0, _bsGlobal.getBSGlobal)("tenantAuthentication");
79
81
 
80
82
  var _useState3 = (0, _react.useState)(-1),
81
83
  _useState4 = _slicedToArray(_useState3, 2),
@@ -87,25 +89,30 @@ var NavTop = function NavTop() {
87
89
  appCenterVisible = _useState6[0],
88
90
  setAppCenterVisible = _useState6[1];
89
91
 
92
+ var _useState7 = (0, _react.useState)(false),
93
+ _useState8 = _slicedToArray(_useState7, 2),
94
+ summaryGuideVisible = _useState8[0],
95
+ setSummaryGuideVisible = _useState8[1];
96
+
90
97
  var ua = navigator.userAgent.toLowerCase();
91
- var showWxInvite = (0, _bsGlobal.getTenantInfo)().mainCorpId && ua.indexOf('micromessenger') !== -1;
98
+ var showWxInvite = (0, _bsGlobal.getTenantInfo)().mainCorpId && ua.indexOf("micromessenger") !== -1;
92
99
  var openWxInvite = (0, _react.useCallback)(function () {
93
100
  if (window.WeixinJSBridge !== undefined) {
94
- window.WeixinJSBridge.invoke('selectPrivilegedContact', {
101
+ window.WeixinJSBridge.invoke("selectPrivilegedContact", {
95
102
  fromDepartmentId: -1,
96
103
  // 必填,表示打开的通讯录从指定的部门开始展示,-1表示自己所在部门开始, 0表示从最上层开始
97
- mode: 'multi',
104
+ mode: "multi",
98
105
  // 必填,选择模式,single表示单选,multi表示多选
99
106
  selectedContextContact: 0 // 是否勾选当前环境的参与者。例如在群+号聊天附件栏打开,默认勾选当前群成员。
100
107
 
101
108
  }, function (res) {
102
- if (res.err_msg === 'selectPrivilegedContact:ok') {
103
- var selectedTicket = res.result.selectedTicket.replace(/['"]/g, ''); // 已选的集合Ticket
109
+ if (res.err_msg === "selectPrivilegedContact:ok") {
110
+ var selectedTicket = res.result.selectedTicket.replace(/['"]/g, ""); // 已选的集合Ticket
104
111
 
105
- (0, _request.rpost)('v1')("wx/send/templateMessage?selectedTickets=".concat(selectedTicket)).then(function () {
106
- _toast["default"].Success('邀请成功');
112
+ (0, _request.rpost)("v1")("wx/send/templateMessage?selectedTickets=".concat(selectedTicket)).then(function () {
113
+ _toast["default"].Success("邀请成功");
107
114
  })["catch"](function () {
108
- _toast["default"].Error('邀请失败');
115
+ _toast["default"].Error("邀请失败");
109
116
  });
110
117
  } else {// console.log(res);
111
118
  }
@@ -115,16 +122,16 @@ var NavTop = function NavTop() {
115
122
 
116
123
  var handleHashChange = function handleHashChange() {
117
124
  setAppCenterVisible(false);
118
- var hash = window.location.hash.split('?')[0] || '';
125
+ var hash = window.location.hash.split("?")[0] || "";
119
126
 
120
127
  if (hash) {
121
128
  var activeMenu = menu.find(function (item) {
122
129
  var _item$href$split, _item$href$split$;
123
130
 
124
- return hash.includes((_item$href$split = item.href.split('#')) === null || _item$href$split === void 0 ? void 0 : (_item$href$split$ = _item$href$split[1]) === null || _item$href$split$ === void 0 ? void 0 : _item$href$split$.split('?')[0]);
131
+ return hash.includes((_item$href$split = item.href.split("#")) === null || _item$href$split === void 0 ? void 0 : (_item$href$split$ = _item$href$split[1]) === null || _item$href$split$ === void 0 ? void 0 : _item$href$split$.split("?")[0]);
125
132
  });
126
133
 
127
- if (hash.includes('homepage')) {
134
+ if (hash.includes("homepage")) {
128
135
  setActiveMenuId(99999);
129
136
  return;
130
137
  }
@@ -139,11 +146,31 @@ var NavTop = function NavTop() {
139
146
 
140
147
  (0, _react.useEffect)(function () {
141
148
  handleHashChange();
142
- window.addEventListener('hashchange', handleHashChange);
149
+ window.addEventListener("hashchange", handleHashChange);
143
150
  return function () {
144
- window.removeEventListener('hashchange', handleHashChange);
151
+ window.removeEventListener("hashchange", handleHashChange);
145
152
  };
146
153
  }, [menu]);
154
+ (0, _react.useEffect)(function () {
155
+ var cacheIsKonw = localStorage.getItem("NewAppCenterGuide_".concat(window.BSGlobal.loginUserInfo.Id));
156
+
157
+ if (cacheIsKonw) {
158
+ setSummaryGuideVisible(false);
159
+ } else {
160
+ setSummaryGuideVisible(true);
161
+ }
162
+ }, []);
163
+
164
+ var handleCloseSummaryGuide = function handleCloseSummaryGuide() {
165
+ setSummaryGuideVisible(false);
166
+ var loginUserId = BSGlobal.loginUserInfo.Id;
167
+ var cacheIsKonw = localStorage.getItem("NewAppCenterGuide_".concat(loginUserId));
168
+
169
+ if (!cacheIsKonw) {
170
+ localStorage.setItem("NewAppCenterGuide_".concat(loginUserId), "".concat(loginUserId));
171
+ }
172
+ };
173
+
147
174
  return /*#__PURE__*/_react["default"].createElement("div", {
148
175
  className: (0, _classnames["default"])(preCls, _defineProperty({}, "".concat(preCls, "--position"), appCenterVisible), _defineProperty({}, "".concat(preCls, "-no-shadow"), appCenterVisible))
149
176
  }, /*#__PURE__*/_react["default"].createElement("a", {
@@ -153,12 +180,22 @@ var NavTop = function NavTop() {
153
180
  alt: "logo",
154
181
  src: Logo,
155
182
  className: "".concat(preCls, "__left-logo")
156
- })), isUseNewMenu && /*#__PURE__*/_react["default"].createElement("span", {
157
- className: (0, _classnames["default"])("".concat(preCls, "__left-app-center"), 'document-mouse-event-ignore', _defineProperty({}, "".concat(preCls, "__left-app-center--active"), appCenterVisible)),
183
+ })), isUseNewMenu && /*#__PURE__*/_react["default"].createElement(_guideTip["default"], {
184
+ visible: summaryGuideVisible,
185
+ content: /*#__PURE__*/_react["default"].createElement("span", {
186
+ className: "".concat(preCls, "__app-guide-content")
187
+ }, "\uD83D\uDC46\u70B9\u51FB\u8FD9\u91CC\u53D1\u73B0\u66F4\u591A\u5E94\u7528"),
188
+ type: "button",
189
+ popupPlacement: "bottom",
190
+ classnames: "".concat(preCls, "__app-guide"),
191
+ onClickClose: handleCloseSummaryGuide,
192
+ width: 197
193
+ }, /*#__PURE__*/_react["default"].createElement("span", {
194
+ className: (0, _classnames["default"])("".concat(preCls, "__left-app-center"), "document-mouse-event-ignore", _defineProperty({}, "".concat(preCls, "__left-app-center--active"), appCenterVisible)),
158
195
  onClick: function onClick() {
159
196
  return setAppCenterVisible(!appCenterVisible);
160
197
  }
161
- }), /*#__PURE__*/_react["default"].createElement("div", {
198
+ })), /*#__PURE__*/_react["default"].createElement("div", {
162
199
  className: (0, _classnames["default"])("".concat(preCls, "__line"))
163
200
  }), /*#__PURE__*/_react["default"].createElement("div", {
164
201
  className: (0, _classnames["default"])("".concat(preCls, "__middle"))
@@ -177,7 +214,7 @@ var NavTop = function NavTop() {
177
214
  className: "".concat(preCls, "__invite"),
178
215
  onClick: openWxInvite
179
216
  }, /*#__PURE__*/_react["default"].createElement("i", {
180
- className: (0, _classnames["default"])('tu-icon-add-people', "".concat(preCls, "__invite-icon"))
217
+ className: (0, _classnames["default"])("tu-icon-add-people", "".concat(preCls, "__invite-icon"))
181
218
  })), /*#__PURE__*/_react["default"].createElement("div", {
182
219
  className: "".concat(preCls, "__msg")
183
220
  }, /*#__PURE__*/_react["default"].createElement(_userMessage["default"], null)), versionInfo.Version === 1 && /*#__PURE__*/_react["default"].createElement("div", {
@@ -173,9 +173,11 @@ var OkrMap = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
173
173
  };
174
174
 
175
175
  var closeOkrDrawer = function closeOkrDrawer() {
176
+ var _window, _window$parent, _window$parent$docume, _window$parent$docume2;
177
+
176
178
  var mousedown = document.createEvent('MouseEvents');
177
179
  mousedown.initMouseEvent('mousedown', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
178
- window.parent.document.body.dispatchEvent(mousedown); // drawerWrapper.close()
180
+ (_window = window) === null || _window === void 0 ? void 0 : (_window$parent = _window.parent) === null || _window$parent === void 0 ? void 0 : (_window$parent$docume = _window$parent.document) === null || _window$parent$docume === void 0 ? void 0 : (_window$parent$docume2 = _window$parent$docume.body) === null || _window$parent$docume2 === void 0 ? void 0 : _window$parent$docume2.dispatchEvent(mousedown); // drawerWrapper.close()
179
181
  };
180
182
 
181
183
  return /*#__PURE__*/_react["default"].createElement(_context.CommonContext.Provider, {
@@ -28,12 +28,11 @@
28
28
  align-items: center;
29
29
  }
30
30
 
31
- .tita-ui__picker-ranges-trigger__date-divide {
31
+ .tita-ui__picker-ranges-trigger__date-connector {
32
32
  width: 8px;
33
- height: 1px;
34
33
  margin: 0 8px;
35
34
  border-radius: 2px;
36
- background: #3f4755;
35
+ text-align: center;
37
36
  }
38
37
 
39
38
  .tita-ui__picker-ranges-trigger__selected-date {
@@ -86,8 +86,8 @@ var RangePickerTrigger = function RangePickerTrigger(props) {
86
86
  }, startDate && /*#__PURE__*/_react["default"].createElement("p", {
87
87
  className: (0, _classnames["default"])("".concat(_utils.PickerRangeTriggerClass, "__selected-date"))
88
88
  }, startDate), endDate && /*#__PURE__*/_react["default"].createElement("div", {
89
- className: (0, _classnames["default"])("".concat(_utils.PickerRangeTriggerClass, "__date-divide"))
90
- }), endDate && /*#__PURE__*/_react["default"].createElement("p", {
89
+ className: (0, _classnames["default"])("".concat(_utils.PickerRangeTriggerClass, "__date-connector"))
90
+ }, "~"), endDate && /*#__PURE__*/_react["default"].createElement("p", {
91
91
  className: (0, _classnames["default"])("".concat(_utils.PickerRangeTriggerClass, "__selected-date"))
92
92
  }, endDate), !viewDateEnable && placeholder), /*#__PURE__*/_react["default"].createElement("div", {
93
93
  className: (0, _classnames["default"])("".concat(_utils.PickerRangeTriggerClass, "__operation"))
@@ -30,7 +30,7 @@
30
30
  margin: 0;
31
31
  padding: 0;
32
32
  display: inline-block;
33
- margin-right: 8px;
33
+ margin-right: 4px;
34
34
  position: relative;
35
35
  transition: all 0.3s;
36
36
  color: #dfe3ea;
@@ -1,11 +1,13 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
6
8
  exports["default"] = void 0;
7
9
 
8
- var _react = _interopRequireDefault(require("react"));
10
+ var _react = _interopRequireWildcard(require("react"));
9
11
 
10
12
  var _rcRate = _interopRequireDefault(require("rc-rate"));
11
13
 
@@ -15,8 +17,24 @@ var _excluded = ["character", "defaultValue", "count", "allowHalf", "onChange",
15
17
 
16
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
19
 
20
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
+
22
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
+
18
24
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
25
 
26
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
27
+
28
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
29
+
30
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
31
+
32
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
33
+
34
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
35
+
36
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
37
+
20
38
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
21
39
 
22
40
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -38,9 +56,18 @@ var Rate = function Rate(props) {
38
56
  disabled = _props$disabled === void 0 ? false : _props$disabled,
39
57
  restProps = _objectWithoutProperties(props, _excluded);
40
58
 
59
+ var _useState = (0, _react.useState)(defaultValue),
60
+ _useState2 = _slicedToArray(_useState, 2),
61
+ value = _useState2[0],
62
+ setValue = _useState2[1];
63
+
64
+ (0, _react.useEffect)(function () {
65
+ setValue(defaultValue);
66
+ }, [defaultValue]);
41
67
  return /*#__PURE__*/_react["default"].createElement(_rcRate["default"], _extends({
42
68
  character: character,
43
- defaultValue: defaultValue,
69
+ value: value,
70
+ defaultValue: value,
44
71
  count: count,
45
72
  allowHalf: allowHalf,
46
73
  onChange: onChange,
package/lib/utils/auth.js CHANGED
@@ -67,6 +67,11 @@ var BaseAuth = /*#__PURE__*/function () {
67
67
  value: function isDepartmentLeader() {
68
68
  return !this.loginUserInfor.IsBoss && this.loginUserInfor.IsLeader;
69
69
  }
70
+ }, {
71
+ key: "isHrbp",
72
+ value: function isHrbp() {
73
+ return !this.loginUserInfor.IsBoss && this.loginUserInfor.IsHrbp;
74
+ }
70
75
  }, {
71
76
  key: "isPlanDailyManager",
72
77
  value: function isPlanDailyManager() {
@@ -112,7 +112,7 @@ function openData(p) {
112
112
  var ref = (0, _react.useRef)(null);
113
113
  (0, _react.useEffect)(function () {
114
114
  //@ts-ignore
115
- window.WWOpenData && window.WWOpenData.bind(ref.current);
115
+ (window.WWOpenData && window.WWOpenData || window.top.WWOpenData).bind(ref.current);
116
116
  if (!p.id) return;
117
117
  var openId = getOpenId(p.id, p.type);
118
118
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.12.48-beta.2",
3
+ "version": "1.12.48-beta.3",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
@@ -78,7 +78,7 @@
78
78
  "@titaui/rc-trigger": "5.2.5",
79
79
  "@titaui/react-flow-renderer": "9.5.4",
80
80
  "@titaui/request": "^1.0.1",
81
- "@titaui/rich-editor": "0.1.53",
81
+ "@titaui/rich-editor": "0.1.56",
82
82
  "@titaui/toast": "1.0.0",
83
83
  "@types/color": "3.0.3",
84
84
  "@types/prosemirror-commands": "1.0.4",