@titaui/pc 1.15.25-beta.5 → 1.15.25-beta.6

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.
@@ -47,7 +47,7 @@ var _bsGlobal = require("../../../../utils/bs-global");
47
47
 
48
48
  require("./index.css");
49
49
 
50
- var _excluded = ["data"];
50
+ var _excluded = ["data", "isFold"];
51
51
 
52
52
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
53
53
 
@@ -91,6 +91,8 @@ var DynamicReply = function DynamicReply(_ref) {
91
91
  var _classNames;
92
92
 
93
93
  var data = _ref.data,
94
+ _ref$isFold = _ref.isFold,
95
+ isFold = _ref$isFold === void 0 ? true : _ref$isFold,
94
96
  restProps = _objectWithoutProperties(_ref, _excluded);
95
97
 
96
98
  var feedId = data.feedId,
@@ -283,6 +285,8 @@ var DynamicReply = function DynamicReply(_ref) {
283
285
  }
284
286
 
285
287
  var handleInView = function handleInView(inview) {
288
+ if (!isFold) return;
289
+
286
290
  if (inview) {
287
291
  window.titaTracker('planAction').record({
288
292
  actionName: '查看日报',
@@ -29,7 +29,7 @@ var _getLocale = require("../../../../utils/getLocale");
29
29
 
30
30
  require("./index.css");
31
31
 
32
- var _excluded = ["data"];
32
+ var _excluded = ["data", "isFold"];
33
33
 
34
34
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
35
35
 
@@ -58,6 +58,8 @@ var prefix = 'titaui-dynamic-report-item';
58
58
 
59
59
  var DynamicReply = function DynamicReply(_ref) {
60
60
  var data = _ref.data,
61
+ _ref$isFold = _ref.isFold,
62
+ isFold = _ref$isFold === void 0 ? true : _ref$isFold,
61
63
  restProps = _objectWithoutProperties(_ref, _excluded);
62
64
 
63
65
  var submitState = data.submitState,
@@ -163,6 +165,8 @@ var DynamicReply = function DynamicReply(_ref) {
163
165
  }
164
166
 
165
167
  var handleInView = function handleInView(inview) {
168
+ if (!isFold) return;
169
+
166
170
  if (inview) {
167
171
  window.titaTracker('planAction').record({
168
172
  actionName: '查看日报',
@@ -314,11 +314,13 @@ var DynamicItem = function DynamicItem(_ref) {
314
314
  return /*#__PURE__*/_react["default"].createElement(_dynamicNewReport["default"], _extends({
315
315
  data: data,
316
316
  onDeleteFeed: onDeleteFeed,
317
- curAtUser: curAtUser
317
+ curAtUser: curAtUser,
318
+ isFold: isFold
318
319
  }, restProps));
319
320
  }
320
321
 
321
322
  return /*#__PURE__*/_react["default"].createElement(_dynamicReport["default"], _extends({
323
+ isFold: isFold,
322
324
  data: data,
323
325
  onDeleteFeed: onDeleteFeed
324
326
  }, restProps));
@@ -400,7 +402,7 @@ var DynamicItem = function DynamicItem(_ref) {
400
402
  default:
401
403
  return null;
402
404
  }
403
- }, [data, curAtUser]);
405
+ }, [data, curAtUser, isFold]);
404
406
 
405
407
  var renderUpvoteCount = function renderUpvoteCount(type, count) {
406
408
  if (count === 0) {
@@ -0,0 +1,16 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="10px" height="10px" viewBox="0 0 10 10" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>canceled</title>
4
+ <defs>
5
+ <filter color-interpolation-filters="auto" id="filter-1">
6
+ <feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 1.000000 0"></feColorMatrix>
7
+ </filter>
8
+ </defs>
9
+ <g id="线性" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
10
+ <g id="canceled" transform="translate(-2.000000, -2.000000)" filter="url(#filter-1)">
11
+ <g>
12
+ <path d="M10.7368897,2.44585438 C10.9646956,2.21804854 11.3340418,2.21804854 11.5618476,2.44585438 C11.7896535,2.67366021 11.7896535,3.04300645 11.5618476,3.27081229 L11.5618476,3.27081229 L7.82,7.012 L11.5203914,10.7123106 C11.7481972,10.9401164 11.7481972,11.3094627 11.5203914,11.5372685 C11.2925856,11.7650743 10.9232393,11.7650743 10.6954335,11.5372685 L6.995,7.837 L3.31226851,11.5203914 C3.10977444,11.7228855 2.79544597,11.7453848 2.5680998,11.5878894 L2.4873106,11.5203914 C2.25950476,11.2925856 2.25950476,10.9232393 2.4873106,10.6954335 L2.4873106,10.6954335 L6.17,7.012 L2.44585438,3.2876894 C2.21804854,3.05988356 2.21804854,2.69053732 2.44585438,2.46273149 C2.67366021,2.23492565 3.04300645,2.23492565 3.27081229,2.46273149 L6.995,6.187 Z" id="形状结合" fill="#444444"></path>
13
+ </g>
14
+ </g>
15
+ </g>
16
+ </svg>
@@ -0,0 +1,16 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="34px" height="34px" viewBox="0 0 34 34" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>编组 27</title>
4
+ <g id="到期时间页面优化" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
5
+ <g id="合作客户---已过期" transform="translate(-424.000000, -362.000000)">
6
+ <g id="编组-27备份-2" transform="translate(390.000000, 167.000000)">
7
+ <g id="编组-27" transform="translate(34.000000, 195.000000)">
8
+ <rect id="矩形" fill-opacity="0" fill="#FFFFFF" x="0" y="0" width="34" height="34"></rect>
9
+ <text id="😭" font-family="AppleColorEmoji, Apple Color Emoji" font-size="28" font-weight="normal" line-spacing="28" fill="#141C28">
10
+ <tspan x="3" y="31.2419314">😭</tspan>
11
+ </text>
12
+ </g>
13
+ </g>
14
+ </g>
15
+ </g>
16
+ </svg>
@@ -0,0 +1,112 @@
1
+ .titaui-expiration-reminder {
2
+ width: 420px;
3
+ min-height: 430px;
4
+ max-height: 466px;
5
+ margin: 0 auto;
6
+ padding-top: 195px;
7
+ border-radius: 40px;
8
+ background-color: #ffffff;
9
+ background-image: url("./img/reminder.png");
10
+ background-size: 100% 160px;
11
+ background-repeat: no-repeat;
12
+ box-sizing: border-box;
13
+ }
14
+
15
+ .titaui-expiration-reminder__close {
16
+ width: 32px;
17
+ height: 32px;
18
+ background-image: url("./img/close.png");
19
+ background-size: 100%;
20
+ background-repeat: no-repeat;
21
+ cursor: pointer;
22
+ position: absolute;
23
+ top: 0;
24
+ right: -42px;
25
+ }
26
+
27
+ .titaui-expiration-reminder__contact {
28
+ font-size: 12px;
29
+ line-height: 18px;
30
+ color: #89919F;
31
+ }
32
+
33
+ .titaui-expiration-reminder__contact-number::selection {
34
+ background-color: #2879ff;
35
+ color: #ffffff;
36
+ }
37
+
38
+ .titaui-expiration-reminder__description {
39
+ margin: 24px 0 28px;
40
+ font-size: 18px;
41
+ line-height: 36px;
42
+ color: #141C28;
43
+ text-align: center;
44
+ }
45
+
46
+ .titaui-expiration-reminder__description .titaui-text-btn {
47
+ font-size: 18px;
48
+ line-height: 36px;
49
+ }
50
+
51
+ .titaui-expiration-reminder__footer {
52
+ text-align: center;
53
+ }
54
+
55
+ .titaui-expiration-reminder__footer .titaui-rect-btn {
56
+ width: 356px;
57
+ height: 52px;
58
+ margin: 0 auto 10px;
59
+ font-size: 18px;
60
+ line-height: 24px;
61
+ border-radius: 26px;
62
+ }
63
+
64
+ .titaui-expiration-reminder__qrcode {
65
+ padding-top: 74px;
66
+ background-image: none;
67
+ text-align: center;
68
+ position: relative;
69
+ }
70
+
71
+ .titaui-expiration-reminder__qrcode-title {
72
+ font-size: 26px;
73
+ font-weight: 600;
74
+ line-height: 40px;
75
+ color: #141C28;
76
+ }
77
+
78
+ .titaui-expiration-reminder__qrcode-subtitle {
79
+ margin-top: 8px;
80
+ font-size: 18px;
81
+ line-height: 24px;
82
+ color: #89919F;
83
+ }
84
+
85
+ .titaui-expiration-reminder__qrcode-img {
86
+ margin-top: 28px;
87
+ }
88
+
89
+ .titaui-expiration-reminder__qrcode .titaui-text-btn {
90
+ position: absolute;
91
+ top: 28px;
92
+ left: 32px;
93
+ }
94
+
95
+ .titaui-expiration-reminder__remain-day {
96
+ font-size: 36px;
97
+ color: #2879ff;
98
+ }
99
+
100
+ .titaui-expiration-reminder__title {
101
+ font-size: 28px;
102
+ font-weight: 600;
103
+ line-height: 34px;
104
+ color: #141C28;
105
+ text-align: center;
106
+ }
107
+
108
+ .titaui-expiration-reminder__title img {
109
+ position: relative;
110
+ top: -4px;
111
+ left: -4px;
112
+ }
@@ -0,0 +1,304 @@
1
+ "use strict";
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
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _axios = _interopRequireDefault(require("axios"));
13
+
14
+ var _copyToClipboard = _interopRequireDefault(require("copy-to-clipboard"));
15
+
16
+ var _selectionRanges = require("selection-ranges");
17
+
18
+ var _bsGlobal = require("../../utils/bs-global");
19
+
20
+ var _errorLevel = _interopRequireDefault(require("../../utils/error-level"));
21
+
22
+ var _bookDemo = _interopRequireDefault(require("../book-demo"));
23
+
24
+ var _button = _interopRequireDefault(require("../button"));
25
+
26
+ var _dialog = _interopRequireDefault(require("../dialog"));
27
+
28
+ var _errorBoundary = _interopRequireDefault(require("../error-boundary"));
29
+
30
+ var _mirroring = _interopRequireDefault(require("../mirroring"));
31
+
32
+ var _toast = _interopRequireDefault(require("../toast"));
33
+
34
+ var _emoji = _interopRequireDefault(require("./img/emoji.svg"));
35
+
36
+ var _qrcodeTrial = _interopRequireDefault(require("./img/qrcode-trial.png"));
37
+
38
+ var _qrcodeOfficial = _interopRequireDefault(require("./img/qrcode-official.png"));
39
+
40
+ var _utils = require("./utils");
41
+
42
+ require("./index.css");
43
+
44
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
45
+
46
+ 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); }
47
+
48
+ 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; }
49
+
50
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
51
+
52
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
53
+
54
+ 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."); }
55
+
56
+ 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); }
57
+
58
+ 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; }
59
+
60
+ 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; }
61
+
62
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
63
+
64
+ var prefixCls = 'titaui-expiration-reminder';
65
+
66
+ var ExpirationReminder = function ExpirationReminder() {
67
+ var _trialVersion, _officialVersion;
68
+
69
+ var _getBSGlobal = (0, _bsGlobal.getBSGlobal)('tenantAuthentication'),
70
+ Day = _getBSGlobal.Day,
71
+ ExpireType = _getBSGlobal.ExpireType,
72
+ Version = _getBSGlobal.Version;
73
+
74
+ var deadLineRemind = (0, _bsGlobal.getBSGlobal)('deadLineRemind');
75
+ var reminderEnable = ExpireType === _utils.ApplicationState.Expired || ExpireType === _utils.ApplicationState.WillExpire && deadLineRemind;
76
+ var appVersion = Version === _utils.ApplicationVersion.Trial ? 'trialVersion' : 'officialVersion';
77
+
78
+ var _useState = (0, _react.useState)(),
79
+ _useState2 = _slicedToArray(_useState, 2),
80
+ mirrorSwitch = _useState2[0],
81
+ setMirrorSwitch = _useState2[1];
82
+
83
+ var _useState3 = (0, _react.useState)(reminderEnable),
84
+ _useState4 = _slicedToArray(_useState3, 2),
85
+ visible = _useState4[0],
86
+ setVisible = _useState4[1];
87
+
88
+ var bookDemoRef = (0, _react.useRef)();
89
+ var telRef = (0, _react.useRef)();
90
+
91
+ var deleteCache = function deleteCache() {
92
+ var UserId = (0, _bsGlobal.getUserInfo)().Id; // eslint-disable-next-line no-restricted-globals
93
+
94
+ var url = "".concat(location.origin, "/").concat(UserId, "/CacheDeleteHome");
95
+
96
+ _axios["default"].get(url)["finally"](function () {
97
+ return setVisible(false);
98
+ });
99
+ };
100
+
101
+ var showBookDemo = function showBookDemo() {
102
+ var _bookDemoRef$current;
103
+
104
+ deleteCache();
105
+ bookDemoRef === null || bookDemoRef === void 0 ? void 0 : (_bookDemoRef$current = bookDemoRef.current) === null || _bookDemoRef$current === void 0 ? void 0 : _bookDemoRef$current.show();
106
+
107
+ if (window.titaTracker) {
108
+ window.titaTracker('action').record({
109
+ actionName: '申请演示',
110
+ actionGroup: '试用版-申请演示',
111
+ productName: '系统内-申请演示'
112
+ });
113
+ }
114
+ };
115
+
116
+ var onBookDemoVisibleChange = function onBookDemoVisibleChange(visibility) {
117
+ if (!visibility && ExpireType === _utils.ApplicationState.Expired) {
118
+ setMirrorSwitch(undefined);
119
+ setVisible(true);
120
+ }
121
+ };
122
+
123
+ var onCopy = function onCopy() {
124
+ (0, _selectionRanges.setRange)(telRef.current, {
125
+ start: 0,
126
+ end: _utils.ContactNumber.length
127
+ });
128
+ (0, _copyToClipboard["default"])(_utils.ContactNumber);
129
+
130
+ _toast["default"].Success('复制成功');
131
+ }; // useEffect(() => {
132
+ // document.addEventListener('keydown', (e) => {
133
+ // e.preventDefault()
134
+ // })
135
+ // document.addEventListener('contextmenu', (e) => {
136
+ // e.preventDefault()
137
+ // })
138
+ // })
139
+
140
+
141
+ var reminderInfo = {
142
+ trialVersion: (_trialVersion = {}, _defineProperty(_trialVersion, _utils.ApplicationState.Normal, {
143
+ closeEnable: true,
144
+ height: 466,
145
+ qrcodeSize: 240,
146
+ title: null,
147
+ content: null
148
+ }), _defineProperty(_trialVersion, _utils.ApplicationState.WillExpire, {
149
+ closeEnable: true,
150
+ height: 466,
151
+ qrcodeSize: 240,
152
+ title: /*#__PURE__*/_react["default"].createElement("h2", {
153
+ className: "".concat(prefixCls, "__title")
154
+ }, "\u60A8\u7684 Tita \u8BD5\u7528\u671F\u8FD8\u5269\u4F59", /*#__PURE__*/_react["default"].createElement("span", {
155
+ className: "".concat(prefixCls, "__remain-day")
156
+ }, " ", Day, " "), "\u5929"),
157
+ content: /*#__PURE__*/_react["default"].createElement("div", {
158
+ className: "".concat(prefixCls, "__description")
159
+ }, /*#__PURE__*/_react["default"].createElement("p", null, "\u52A0\u901F\u719F\u6089\u4EA7\u54C1 \u9884\u7EA6\u4EA7\u54C1\u6F14\u793A"), /*#__PURE__*/_react["default"].createElement("p", null, /*#__PURE__*/_react["default"].createElement("span", null, "\u5347\u7EA7\u4E3A\u4ED8\u8D39\u7248"), /*#__PURE__*/_react["default"].createElement(_button["default"].Text, {
160
+ onClick: function onClick() {
161
+ return setMirrorSwitch('on');
162
+ },
163
+ type: "primary",
164
+ text: " \u8054\u7CFB\u987E\u95EE "
165
+ }), /*#__PURE__*/_react["default"].createElement("span", null, "\u7D22\u53D6\u4F18\u60E0~")))
166
+ }), _defineProperty(_trialVersion, _utils.ApplicationState.Expired, {
167
+ closeEnable: false,
168
+ height: 466,
169
+ qrcodeSize: 240,
170
+ title: /*#__PURE__*/_react["default"].createElement("h2", {
171
+ className: "".concat(prefixCls, "__title")
172
+ }, /*#__PURE__*/_react["default"].createElement("img", {
173
+ src: _emoji["default"],
174
+ alt: "Emoji"
175
+ }), "\u60A8\u7684 Tita \u8BD5\u7528\u5DF2\u5230\u671F"),
176
+ content: /*#__PURE__*/_react["default"].createElement("div", {
177
+ className: "".concat(prefixCls, "__description")
178
+ }, /*#__PURE__*/_react["default"].createElement("p", null, "\u4F7F\u7528 Tita\uFF0C\u91CA\u653E35%+\u7684\u7BA1\u7406\u7CBE\u529B"), /*#__PURE__*/_react["default"].createElement("p", null, /*#__PURE__*/_react["default"].createElement("span", null, "\u7EE7\u7EED\u4F7F\u7528"), /*#__PURE__*/_react["default"].createElement(_button["default"].Text, {
179
+ onClick: function onClick() {
180
+ return setMirrorSwitch('on');
181
+ },
182
+ type: "primary",
183
+ text: " \u8054\u7CFB\u987E\u95EE"
184
+ })))
185
+ }), _defineProperty(_trialVersion, "button", /*#__PURE__*/_react["default"].createElement(_button["default"].Rect, {
186
+ onClick: showBookDemo,
187
+ type: "primary"
188
+ }, "\u9884\u7EA6\u6F14\u793A")), _defineProperty(_trialVersion, "qrCode", _qrcodeTrial["default"]), _trialVersion),
189
+ officialVersion: (_officialVersion = {}, _defineProperty(_officialVersion, _utils.ApplicationState.Normal, {
190
+ height: 466,
191
+ qrcodeSize: 240,
192
+ title: null,
193
+ content: null,
194
+ closeEnable: true
195
+ }), _defineProperty(_officialVersion, _utils.ApplicationState.WillExpire, {
196
+ closeEnable: true,
197
+ height: 430,
198
+ qrcodeSize: 210,
199
+ title: /*#__PURE__*/_react["default"].createElement("h2", {
200
+ className: "".concat(prefixCls, "__title")
201
+ }, "\u60A8\u7684 Tita \u4F7F\u7528\u671F\u8FD8\u5269\u4F59", /*#__PURE__*/_react["default"].createElement("span", {
202
+ className: "".concat(prefixCls, "__remain-day")
203
+ }, " ", Day, " "), "\u5929"),
204
+ content: /*#__PURE__*/_react["default"].createElement("div", {
205
+ className: "".concat(prefixCls, "__description")
206
+ }, /*#__PURE__*/_react["default"].createElement("p", null, "\u7EED\u8D39\u670D\u52A1 \u8054\u7CFB\u987E\u95EE"))
207
+ }), _defineProperty(_officialVersion, _utils.ApplicationState.Expired, {
208
+ closeEnable: false,
209
+ height: 466,
210
+ qrcodeSize: 240,
211
+ title: /*#__PURE__*/_react["default"].createElement("h2", {
212
+ className: "".concat(prefixCls, "__title")
213
+ }, /*#__PURE__*/_react["default"].createElement("img", {
214
+ src: _emoji["default"],
215
+ alt: "Emoji"
216
+ }), "\u60A8\u7684 Tita \u7CFB\u7EDF\u4F7F\u7528\u5DF2\u5230\u671F"),
217
+ content: /*#__PURE__*/_react["default"].createElement("div", {
218
+ className: "".concat(prefixCls, "__description")
219
+ }, /*#__PURE__*/_react["default"].createElement("p", null, "\u9519\u8FC7\u4E86\u4E00\u5927\u6CE2\u4EA7\u54C1\u5347\u7EA7\u54E6~"), /*#__PURE__*/_react["default"].createElement("p", null, "\u4E86\u89E3 Tita \u65B0\u529F\u80FD \u9884\u7EA6\u987E\u95EE\u6F14\u793A"))
220
+ }), _defineProperty(_officialVersion, "button", /*#__PURE__*/_react["default"].createElement(_button["default"].Rect, {
221
+ onClick: function onClick() {
222
+ return setMirrorSwitch('on');
223
+ },
224
+ type: "primary"
225
+ }, "\u8054\u7CFB\u5BA2\u670D")), _defineProperty(_officialVersion, "qrCode", _qrcodeOfficial["default"]), _officialVersion)
226
+ };
227
+ var modalRender = (0, _react.useCallback)(function () {
228
+ if (!reminderEnable) return null;
229
+ var _reminderInfo$appVers = reminderInfo[appVersion],
230
+ button = _reminderInfo$appVers.button,
231
+ qrCode = _reminderInfo$appVers.qrCode;
232
+ var _reminderInfo$appVers2 = reminderInfo[appVersion][ExpireType],
233
+ closeEnable = _reminderInfo$appVers2.closeEnable,
234
+ content = _reminderInfo$appVers2.content,
235
+ height = _reminderInfo$appVers2.height,
236
+ qrcodeSize = _reminderInfo$appVers2.qrcodeSize,
237
+ title = _reminderInfo$appVers2.title;
238
+ return /*#__PURE__*/_react["default"].createElement(_mirroring["default"], {
239
+ mirrorSwitch: mirrorSwitch,
240
+ style: {
241
+ width: 420,
242
+ height: height,
243
+ margin: '0 auto'
244
+ }
245
+ }, /*#__PURE__*/_react["default"].createElement("div", {
246
+ className: prefixCls,
247
+ style: {
248
+ height: height
249
+ }
250
+ }, title, content, /*#__PURE__*/_react["default"].createElement("div", {
251
+ className: "".concat(prefixCls, "__footer")
252
+ }, /*#__PURE__*/_react["default"].createElement("p", null, button), /*#__PURE__*/_react["default"].createElement("p", {
253
+ className: "".concat(prefixCls, "__contact"),
254
+ onClick: onCopy
255
+ }, "\u8054\u7CFB\u7535\u8BDD:", /*#__PURE__*/_react["default"].createElement("span", {
256
+ className: "".concat(prefixCls, "__contact-number"),
257
+ ref: telRef
258
+ }, _utils.ContactNumber))), closeEnable && /*#__PURE__*/_react["default"].createElement("div", {
259
+ className: "".concat(prefixCls, "__close"),
260
+ onClick: deleteCache
261
+ }), /*#__PURE__*/_react["default"].createElement(_errorBoundary["default"], {
262
+ errorLevel: _errorLevel["default"].P0,
263
+ errorTag: "\u7533\u8BF7\u9884\u7EA6\u6F14\u793A\u5F02\u5E38"
264
+ }, /*#__PURE__*/_react["default"].createElement(_bookDemo["default"].BookDemoPC, {
265
+ ref: bookDemoRef,
266
+ type: (0, _utils.getBookDemoVersion)(),
267
+ visible: false,
268
+ visibleChange: onBookDemoVisibleChange
269
+ }))), /*#__PURE__*/_react["default"].createElement("div", {
270
+ className: "".concat(prefixCls, " ").concat(prefixCls, "__qrcode"),
271
+ style: {
272
+ height: height
273
+ }
274
+ }, /*#__PURE__*/_react["default"].createElement(_button["default"].Text, {
275
+ icon: "tu-icon-fanhui",
276
+ text: "\u8FD4\u56DE",
277
+ type: "primary",
278
+ onClick: function onClick() {
279
+ return setMirrorSwitch('off');
280
+ }
281
+ }), /*#__PURE__*/_react["default"].createElement("h2", {
282
+ className: "".concat(prefixCls, "__qrcode-title")
283
+ }, "\u5FAE\u4FE1/\u4F01\u4E1A\u5FAE\u4FE1\u626B\u4E00\u626B"), /*#__PURE__*/_react["default"].createElement("h3", {
284
+ className: "".concat(prefixCls, "__qrcode-subtitle")
285
+ }, "\u4E13\u5C5E\u5BA2\u670D\u4E3A\u4F60\u63D0\u4F9B\u54A8\u8BE2\u670D\u52A1"), /*#__PURE__*/_react["default"].createElement("img", {
286
+ className: "".concat(prefixCls, "__qrcode-img"),
287
+ src: qrCode,
288
+ alt: "\u5FAE\u4FE1/\u4F01\u4E1A\u5FAE\u4FE1\u626B\u4E00\u626B",
289
+ width: qrcodeSize,
290
+ height: qrcodeSize
291
+ })));
292
+ }, [mirrorSwitch]);
293
+ return /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
294
+ modalRender: modalRender,
295
+ noCloseIcon: true,
296
+ noFooter: true,
297
+ noHeadLine: true,
298
+ visible: visible
299
+ });
300
+ };
301
+
302
+ var _default = /*#__PURE__*/(0, _react.memo)(ExpirationReminder);
303
+
304
+ exports["default"] = _default;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getBookDemoVersion = exports.ContactNumber = exports.ApplicationVersion = exports.ApplicationState = void 0;
7
+
8
+ var _bsGlobal = require("../../utils/bs-global");
9
+
10
+ var _interface = require("../help-card/interface");
11
+
12
+ var _bookDemo = _interopRequireDefault(require("../book-demo"));
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
+
16
+ // eslint-disable-next-line import/no-unresolved
17
+ // eslint-disable-next-line import/no-unresolved
18
+ var ContactNumber = '400-650-3180'; // eslint-disable-next-line no-shadow
19
+
20
+ exports.ContactNumber = ContactNumber;
21
+ var ApplicationState; // eslint-disable-next-line no-shadow
22
+
23
+ exports.ApplicationState = ApplicationState;
24
+
25
+ (function (ApplicationState) {
26
+ ApplicationState[ApplicationState["Normal"] = 0] = "Normal";
27
+ ApplicationState[ApplicationState["WillExpire"] = 1] = "WillExpire";
28
+ ApplicationState[ApplicationState["Expired"] = 2] = "Expired";
29
+ })(ApplicationState || (exports.ApplicationState = ApplicationState = {}));
30
+
31
+ var ApplicationVersion;
32
+ exports.ApplicationVersion = ApplicationVersion;
33
+
34
+ (function (ApplicationVersion) {
35
+ ApplicationVersion[ApplicationVersion["Trial"] = 1] = "Trial";
36
+ ApplicationVersion[ApplicationVersion["PM"] = 2] = "PM";
37
+ ApplicationVersion[ApplicationVersion["Personal"] = 3] = "Personal";
38
+ ApplicationVersion[ApplicationVersion["Flagship"] = 6] = "Flagship";
39
+ ApplicationVersion[ApplicationVersion["Performance"] = 8] = "Performance";
40
+ ApplicationVersion[ApplicationVersion["OKRsE"] = 9] = "OKRsE";
41
+ ApplicationVersion[ApplicationVersion["OKR"] = 10] = "OKR";
42
+ })(ApplicationVersion || (exports.ApplicationVersion = ApplicationVersion = {}));
43
+
44
+ var getBookDemoVersion = function getBookDemoVersion() {
45
+ var menuVersion = (0, _bsGlobal.getBSGlobal)('tenantAuthentication').MenuVersion;
46
+
47
+ if (menuVersion === _interface.ETrialVersion.OKR) {
48
+ return _bookDemo["default"].DemoType.TryOKR;
49
+ }
50
+
51
+ if (menuVersion === _interface.ETrialVersion.Performance) {
52
+ return _bookDemo["default"].DemoType.TryPerformance;
53
+ }
54
+
55
+ return _bookDemo["default"].DemoType.UniversalBookDemo;
56
+ };
57
+
58
+ exports.getBookDemoVersion = getBookDemoVersion;
@@ -0,0 +1,67 @@
1
+ .titaui-mirroring {
2
+ transform: translateZ(0);
3
+ backface-visibility: hidden;
4
+ transform-style: preserve-3d;
5
+ position: relative;
6
+ }
7
+
8
+ .titaui-mirroring__item {
9
+ backface-visibility: hidden;
10
+ position: absolute;
11
+ top: 0;
12
+ left: 0;
13
+ }
14
+
15
+ .titaui-mirroring__item:first-child {
16
+ z-index: 2;
17
+ }
18
+
19
+ .titaui-mirroring__item--hidden {
20
+ animation: hidden 0.5s linear forwards;
21
+ }
22
+
23
+ .titaui-mirroring__item--visible {
24
+ animation: visible 0.5s linear forwards;
25
+ }
26
+
27
+ @keyframes hidden {
28
+ 0% {
29
+ transform: rotateY(0);
30
+ opacity: 1;
31
+ }
32
+
33
+ 30% {
34
+ transform: rotateY(60deg);
35
+ }
36
+
37
+ 70% {
38
+ transform: rotateY(120deg);
39
+ }
40
+
41
+ 100% {
42
+ transform: rotateY(180deg);
43
+ opacity: 0;
44
+ visibility: hidden;
45
+ }
46
+ }
47
+
48
+ @keyframes visible {
49
+ 0% {
50
+ transform: rotateY(-180deg);
51
+ opacity: 0;
52
+ }
53
+
54
+ 30% {
55
+ transform: rotateY(-120deg);
56
+ }
57
+
58
+ 70% {
59
+ transform: rotateY(-60deg);
60
+ }
61
+
62
+ 100% {
63
+ transform: rotateY(0);
64
+ opacity: 1;
65
+ visibility: visible;
66
+ }
67
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _classnames = _interopRequireDefault(require("classnames"));
11
+
12
+ require("./index.css");
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
+
16
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
17
+
18
+ var prefixCls = 'titaui-mirroring';
19
+
20
+ var Mirroring = function Mirroring(props) {
21
+ var _classNames, _classNames2;
22
+
23
+ var _props$className = props.className,
24
+ className = _props$className === void 0 ? '' : _props$className,
25
+ children = props.children,
26
+ mirrorSwitch = props.mirrorSwitch,
27
+ style = props.style;
28
+ return /*#__PURE__*/_react["default"].createElement("div", {
29
+ className: (0, _classnames["default"])(prefixCls, className),
30
+ style: style
31
+ }, /*#__PURE__*/_react["default"].createElement("div", {
32
+ className: (0, _classnames["default"])("".concat(prefixCls, "__item"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "__item--visible"), mirrorSwitch === 'off'), _defineProperty(_classNames, "".concat(prefixCls, "__item--hidden"), mirrorSwitch === 'on'), _classNames))
33
+ }, children[0]), /*#__PURE__*/_react["default"].createElement("div", {
34
+ className: (0, _classnames["default"])("".concat(prefixCls, "__item"), (_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefixCls, "__item--visible"), mirrorSwitch === 'on'), _defineProperty(_classNames2, "".concat(prefixCls, "__item--hidden"), mirrorSwitch === 'off'), _classNames2))
35
+ }, children[1]));
36
+ };
37
+
38
+ var _default = Mirroring;
39
+ exports["default"] = _default;
@@ -123,7 +123,7 @@ var AppCenter = function AppCenter(props) {
123
123
  return app.id === currentAppId;
124
124
  })) === null || _apps$find === void 0 ? void 0 : _apps$find.children) || [];
125
125
  var navigations = (0, _utils.getMenus)();
126
- console.log(currentAppId);
126
+ console.log(currentAppId, 'currentAppId');
127
127
  localStorage.setItem("LocalCurrentAppId_".concat(userId), currentAppId.toString());
128
128
  var dynamic = navigations.filter(function (item) {
129
129
  return item.code === 'dynamic';
@@ -131,17 +131,16 @@ var AppCenter = function AppCenter(props) {
131
131
  setMenu([].concat(_toConsumableArray(dynamic), _toConsumableArray(menus)));
132
132
 
133
133
  if (init) {
134
- if (menus[0]) {
135
- window.location.href = menus[0].href;
136
- } else {
137
- var _dynamic$;
134
+ var _menus$, _menus$2;
138
135
 
139
- var _dynamic = navigations.filter(function (item) {
140
- return item.code === 'dynamic';
141
- });
136
+ if (((_menus$ = menus[0]) === null || _menus$ === void 0 ? void 0 : _menus$.code) === "learning") {
137
+ var _dynamic$;
142
138
 
143
- window.location.href = (_dynamic$ = _dynamic[0]) === null || _dynamic$ === void 0 ? void 0 : _dynamic$.href;
139
+ window.location.href = (_dynamic$ = dynamic[0]) === null || _dynamic$ === void 0 ? void 0 : _dynamic$.href;
140
+ return;
144
141
  }
142
+
143
+ window.location.href = (_menus$2 = menus[0]) === null || _menus$2 === void 0 ? void 0 : _menus$2.href;
145
144
  }
146
145
 
147
146
  closeAppCenter();
@@ -186,13 +185,60 @@ var AppCenter = function AppCenter(props) {
186
185
  }
187
186
  };
188
187
 
189
- var handleOpenQuickMenu = function handleOpenQuickMenu() {
190
- var quickMenuId = 23859;
191
- localStorage.setItem("LocalCurrentAppId_".concat(userId), quickMenuId.toString());
192
- setTimeout(function () {
193
- setCurrentAppId(quickMenuId);
194
- location.reload();
195
- }, 500);
188
+ var handleOkQuickMenu = function handleOkQuickMenu(newQuickMenu) {
189
+ var _dynamic$2, _newQuickMenu$;
190
+
191
+ var navigations = (0, _utils.getMenus)();
192
+ var dynamic = navigations.filter(function (item) {
193
+ return item.code === 'dynamic';
194
+ });
195
+ var quickMenu = navigations.find(function (item) {
196
+ return item.code === 'quick';
197
+ });
198
+ var dynamicHref = (_dynamic$2 = dynamic[0]) === null || _dynamic$2 === void 0 ? void 0 : _dynamic$2.href;
199
+
200
+ if (currentAppId !== quickMenu.id) {
201
+ location.href = dynamicHref;
202
+ }
203
+
204
+ setMenu([].concat(_toConsumableArray(dynamic), _toConsumableArray(newQuickMenu)));
205
+ setCurrentAppId(quickMenu.id);
206
+
207
+ if (((_newQuickMenu$ = newQuickMenu[0]) === null || _newQuickMenu$ === void 0 ? void 0 : _newQuickMenu$.code) === "learning") {
208
+ var _dynamic$3;
209
+
210
+ window.location.href = (_dynamic$3 = dynamic[0]) === null || _dynamic$3 === void 0 ? void 0 : _dynamic$3.href;
211
+ return;
212
+ }
213
+
214
+ var hash = window.location.hash.split('?')[0] || '';
215
+
216
+ if (hash) {
217
+ var isUseNewMenu = window.BSGlobal.isUseNewMenu;
218
+ var activeMenu; //用来判断当前路由是否包含在修改后的常用菜单中
219
+
220
+ if (!isUseNewMenu) {
221
+ // 老版本的menu
222
+ activeMenu = newQuickMenu.find(function (item) {
223
+ var _item$href$split, _item$href$split$, _item$href$split$$spl, _item$href$split$$spl2, _item$href$split$$spl3, _item$href$split2, _item$href$split2$, _item$href$split2$$sp, _item$href$split2$$sp2, _item$href$split2$$sp3;
224
+
225
+ return hash.includes(item.href.startsWith("#/") ? (_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$$spl = _item$href$split$.split('?')) === null || _item$href$split$$spl === void 0 ? void 0 : (_item$href$split$$spl2 = _item$href$split$$spl[0]) === null || _item$href$split$$spl2 === void 0 ? void 0 : (_item$href$split$$spl3 = _item$href$split$$spl2.split('/')) === null || _item$href$split$$spl3 === void 0 ? void 0 : _item$href$split$$spl3[0] : (_item$href$split2 = item.href.split('#')) === null || _item$href$split2 === void 0 ? void 0 : (_item$href$split2$ = _item$href$split2[1]) === null || _item$href$split2$ === void 0 ? void 0 : (_item$href$split2$$sp = _item$href$split2$.split('?')) === null || _item$href$split2$$sp === void 0 ? void 0 : (_item$href$split2$$sp2 = _item$href$split2$$sp[0]) === null || _item$href$split2$$sp2 === void 0 ? void 0 : (_item$href$split2$$sp3 = _item$href$split2$$sp2.split('/')) === null || _item$href$split2$$sp3 === void 0 ? void 0 : _item$href$split2$$sp3[0]);
226
+ });
227
+ } else {
228
+ //新版本menu
229
+ activeMenu = newQuickMenu.find(function (item) {
230
+ var _item$href$split3, _item$href$split3$, _item$href$split3$$sp, _item$href$split4, _item$href$split4$, _item$href$split4$$sp;
231
+
232
+ return hash.includes(item.href.startsWith("#/") ? (_item$href$split3 = item.href.split('#/')) === null || _item$href$split3 === void 0 ? void 0 : (_item$href$split3$ = _item$href$split3[1]) === null || _item$href$split3$ === void 0 ? void 0 : (_item$href$split3$$sp = _item$href$split3$.split('?')) === null || _item$href$split3$$sp === void 0 ? void 0 : _item$href$split3$$sp[0] : (_item$href$split4 = item.href.split('#')) === null || _item$href$split4 === void 0 ? void 0 : (_item$href$split4$ = _item$href$split4[1]) === null || _item$href$split4$ === void 0 ? void 0 : (_item$href$split4$$sp = _item$href$split4$.split('?')) === null || _item$href$split4$$sp === void 0 ? void 0 : _item$href$split4$$sp[0]);
233
+ });
234
+ }
235
+
236
+ if (!activeMenu) {
237
+ var _newQuickMenu$2;
238
+
239
+ window.location.href = (_newQuickMenu$2 = newQuickMenu[0]) === null || _newQuickMenu$2 === void 0 ? void 0 : _newQuickMenu$2.href;
240
+ }
241
+ }
196
242
  };
197
243
 
198
244
  var handleSetting = function handleSetting(e) {
@@ -211,7 +257,7 @@ var AppCenter = function AppCenter(props) {
211
257
  autoClosable: true
212
258
  }, /*#__PURE__*/_react["default"].createElement(_quickEntrance["default"], {
213
259
  ref: QuickEntranceDialogRef,
214
- handleOpenQuickMenu: handleOpenQuickMenu
260
+ handleOkQuickMenu: handleOkQuickMenu
215
261
  }), /*#__PURE__*/_react["default"].createElement("div", {
216
262
  className: precls
217
263
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -242,20 +242,16 @@ var NavTop = function NavTop() {
242
242
  if (!_isUseNewMenu) {
243
243
  // 老版本的menu
244
244
  activeMenu = menu.find(function (item) {
245
- var _item$href$split, _item$href$split$, _item$href$split$$spl, _item$href$split$$spl2, _item$href$split$$spl3;
245
+ var _item$href$split, _item$href$split$, _item$href$split$$spl, _item$href$split$$spl2, _item$href$split$$spl3, _item$href$split2, _item$href$split2$, _item$href$split2$$sp, _item$href$split2$$sp2, _item$href$split2$$sp3;
246
246
 
247
- 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$$spl = _item$href$split$.split('?')) === null || _item$href$split$$spl === void 0 ? void 0 : (_item$href$split$$spl2 = _item$href$split$$spl[0]) === null || _item$href$split$$spl2 === void 0 ? void 0 : (_item$href$split$$spl3 = _item$href$split$$spl2.split('/')) === null || _item$href$split$$spl3 === void 0 ? void 0 : _item$href$split$$spl3[0]);
247
+ return hash.includes(item.href.startsWith("#/") ? (_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$$spl = _item$href$split$.split('?')) === null || _item$href$split$$spl === void 0 ? void 0 : (_item$href$split$$spl2 = _item$href$split$$spl[0]) === null || _item$href$split$$spl2 === void 0 ? void 0 : (_item$href$split$$spl3 = _item$href$split$$spl2.split('/')) === null || _item$href$split$$spl3 === void 0 ? void 0 : _item$href$split$$spl3[0] : (_item$href$split2 = item.href.split('#')) === null || _item$href$split2 === void 0 ? void 0 : (_item$href$split2$ = _item$href$split2[1]) === null || _item$href$split2$ === void 0 ? void 0 : (_item$href$split2$$sp = _item$href$split2$.split('?')) === null || _item$href$split2$$sp === void 0 ? void 0 : (_item$href$split2$$sp2 = _item$href$split2$$sp[0]) === null || _item$href$split2$$sp2 === void 0 ? void 0 : (_item$href$split2$$sp3 = _item$href$split2$$sp2.split('/')) === null || _item$href$split2$$sp3 === void 0 ? void 0 : _item$href$split2$$sp3[0]);
248
248
  });
249
249
  } else {
250
250
  //新版本menu
251
251
  activeMenu = menu.find(function (item) {
252
- var _item$href$split2, _item$href$split2$, _item$href$split2$$sp;
252
+ var _item$href$split3, _item$href$split3$, _item$href$split3$$sp, _item$href$split4, _item$href$split4$, _item$href$split4$$sp;
253
253
 
254
- return hash.includes((_item$href$split2 = item.href.split('#')) === null || _item$href$split2 === void 0 ? void 0 : (_item$href$split2$ = _item$href$split2[1]) === null || _item$href$split2$ === void 0 ? void 0 : (_item$href$split2$$sp = _item$href$split2$.split('?')) === null || _item$href$split2$$sp === void 0 ? void 0 : _item$href$split2$$sp[0]);
255
- }) || menu.find(function (item) {
256
- var _item$href$split3, _item$href$split3$, _item$href$split3$$sp, _item$href$split3$$sp2, _item$href$split3$$sp3;
257
-
258
- return hash.includes((_item$href$split3 = item.href.split('#')) === null || _item$href$split3 === void 0 ? void 0 : (_item$href$split3$ = _item$href$split3[1]) === null || _item$href$split3$ === void 0 ? void 0 : (_item$href$split3$$sp = _item$href$split3$.split('?')) === null || _item$href$split3$$sp === void 0 ? void 0 : (_item$href$split3$$sp2 = _item$href$split3$$sp[0]) === null || _item$href$split3$$sp2 === void 0 ? void 0 : (_item$href$split3$$sp3 = _item$href$split3$$sp2.split('/')) === null || _item$href$split3$$sp3 === void 0 ? void 0 : _item$href$split3$$sp3[0]);
254
+ return hash.includes(item.href.startsWith("#/") ? (_item$href$split3 = item.href.split('#/')) === null || _item$href$split3 === void 0 ? void 0 : (_item$href$split3$ = _item$href$split3[1]) === null || _item$href$split3$ === void 0 ? void 0 : (_item$href$split3$$sp = _item$href$split3$.split('?')) === null || _item$href$split3$$sp === void 0 ? void 0 : _item$href$split3$$sp[0] : (_item$href$split4 = item.href.split('#')) === null || _item$href$split4 === void 0 ? void 0 : (_item$href$split4$ = _item$href$split4[1]) === null || _item$href$split4$ === void 0 ? void 0 : (_item$href$split4$$sp = _item$href$split4$.split('?')) === null || _item$href$split4$$sp === void 0 ? void 0 : _item$href$split4$$sp[0]);
259
255
  });
260
256
  }
261
257
 
@@ -97,9 +97,9 @@
97
97
  }
98
98
 
99
99
  .titaui-quick-entrance-dialog__content__left__item__menu-two__checkbox {
100
- display: inline-block;
101
- padding-top: 10px;
102
- padding-right: 6px;
100
+ display: flex;
101
+ justify-content: center;
102
+ align-items: center;
103
103
  }
104
104
 
105
105
  .titaui-quick-entrance-dialog__content__right {
@@ -55,7 +55,7 @@ var preCls = 'titaui-quick-entrance-dialog';
55
55
  var QuickEntranceDialog = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
56
56
  var _props$visible = props.visible,
57
57
  visible = _props$visible === void 0 ? false : _props$visible,
58
- handleOpenQuickMenu = props.handleOpenQuickMenu;
58
+ handleOkQuickMenu = props.handleOkQuickMenu;
59
59
 
60
60
  var _useState = (0, _react.useState)(visible),
61
61
  _useState2 = _slicedToArray(_useState, 2),
@@ -103,7 +103,7 @@ var QuickEntranceDialog = /*#__PURE__*/(0, _react.forwardRef)(function (props, r
103
103
 
104
104
  setEntranceList(quickMenuChildren);
105
105
  }
106
- }, []);
106
+ }, [dialogVisible]);
107
107
 
108
108
  var handleOnOk = function handleOnOk() {
109
109
  var menuIdArr = [];
@@ -111,9 +111,47 @@ var QuickEntranceDialog = /*#__PURE__*/(0, _react.forwardRef)(function (props, r
111
111
  menuIdArr.push(item.id);
112
112
  });
113
113
  var menuIds = menuIdArr.join(',');
114
- (0, _requestApi.setHomeQuick)(menuIds);
114
+ (0, _requestApi.setHomeQuick)(menuIds).then(function (res) {
115
+ if (res.Code === 1) {
116
+ var newQuickMenu = getNewQuickMenu(menuIdArr);
117
+ updateNewNavigation(newQuickMenu);
118
+ handleOkQuickMenu && handleOkQuickMenu(newQuickMenu);
119
+ }
120
+ });
115
121
  hideDialog();
116
- handleOpenQuickMenu && handleOpenQuickMenu();
122
+ };
123
+
124
+ var updateNewNavigation = function updateNewNavigation(newQuickMenu) {
125
+ //更新BSGlobal上的newNavigation
126
+ var newNavigation = window.BSGlobal.newNavigation.filter(function (item) {
127
+ if (item.code === 'quick') {
128
+ item.children = newQuickMenu;
129
+ }
130
+
131
+ return item;
132
+ });
133
+ window.BSGlobal.newNavigation = newNavigation;
134
+ };
135
+
136
+ var getNewQuickMenu = function getNewQuickMenu(menuIdArr) {
137
+ //得到新的快捷菜单数组。
138
+ var childArr = [];
139
+ var newQuickMenu = [];
140
+ newNavigation.forEach(function (element) {
141
+ if (element.children.length > 0 && element.code !== 'quick') {
142
+ childArr = [].concat(_toConsumableArray(childArr), _toConsumableArray(element.children));
143
+ }
144
+ });
145
+ menuIdArr.forEach(function (id) {
146
+ var findInChildArrItem = childArr.find(function (item) {
147
+ return item.id === id;
148
+ });
149
+
150
+ if (findInChildArrItem) {
151
+ newQuickMenu.push(findInChildArrItem);
152
+ }
153
+ });
154
+ return newQuickMenu;
117
155
  };
118
156
 
119
157
  var handleOnCancel = function handleOnCancel() {
@@ -158,7 +196,7 @@ var QuickEntranceDialog = /*#__PURE__*/(0, _react.forwardRef)(function (props, r
158
196
  return true;
159
197
  };
160
198
 
161
- var isCheckedById = function isCheckedById(id, appId) {
199
+ var isCheckedById = function isCheckedById(id, title) {
162
200
  var index = entrancelist.findIndex(function (item) {
163
201
  return item.id === id;
164
202
  });
@@ -171,6 +209,7 @@ var QuickEntranceDialog = /*#__PURE__*/(0, _react.forwardRef)(function (props, r
171
209
  };
172
210
 
173
211
  var handleClickMenuTwoItem = function handleClickMenuTwoItem(item) {
212
+ //点击二级菜单选项,更新已选数据
174
213
  var findItem = entrancelist.find(function (i) {
175
214
  return i.id === item.id;
176
215
  });
@@ -248,7 +287,7 @@ var QuickEntranceDialog = /*#__PURE__*/(0, _react.forwardRef)(function (props, r
248
287
  className: "".concat(preCls, "__content__left__item__menu-two__checkbox")
249
288
  }, /*#__PURE__*/_react["default"].createElement(_checkbox["default"], {
250
289
  checked: function checked() {
251
- return isCheckedById(i.id, i.appId);
290
+ return isCheckedById(i.id, i.title);
252
291
  }
253
292
  })));
254
293
  }));
package/lib/index.js CHANGED
@@ -171,6 +171,12 @@ Object.defineProperty(exports, "ErrorBoundary", {
171
171
  return _errorBoundary["default"];
172
172
  }
173
173
  });
174
+ Object.defineProperty(exports, "ExpirationReminder", {
175
+ enumerable: true,
176
+ get: function get() {
177
+ return _expirationReminder["default"];
178
+ }
179
+ });
174
180
  Object.defineProperty(exports, "FileList", {
175
181
  enumerable: true,
176
182
  get: function get() {
@@ -748,6 +754,8 @@ var _ereportList = _interopRequireDefault(require("./components/ereport-list"));
748
754
 
749
755
  var _errorBoundary = _interopRequireDefault(require("./components/error-boundary"));
750
756
 
757
+ var _expirationReminder = _interopRequireDefault(require("./components/expiration-reminder"));
758
+
751
759
  var _errorLevel = _interopRequireDefault(require("./utils/error-level"));
752
760
 
753
761
  var _formatTime = _interopRequireDefault(require("./utils/format-time"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.15.25-beta.5",
3
+ "version": "1.15.25-beta.6",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
@@ -44,6 +44,7 @@
44
44
  "babel-plugin-module-resolver": "4.1.0",
45
45
  "babel-plugin-transform-class-properties": "6.24.1",
46
46
  "babel-plugin-transform-function-bind": "6.22.0",
47
+ "copy-to-clipboard": "^3.3.1",
47
48
  "cross-env": "7.0.2",
48
49
  "del": "6.0.0",
49
50
  "eslint": "8.7.0",
@@ -69,6 +70,7 @@
69
70
  "lint-staged": "12.2.0",
70
71
  "pretty-quick": "3.1.3",
71
72
  "sass-resources-loader": "2.2.1",
73
+ "selection-ranges": "3.0.3",
72
74
  "typescript": "4.5.4"
73
75
  },
74
76
  "dependencies": {