@titaui/pc 1.9.143 → 1.9.146
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/book-demo/components/pc/components/content/index.js +7 -6
- package/lib/components/book-demo/components/pc/index.js +12 -3
- package/lib/components/book-demo/constant.js +6 -12
- package/lib/components/menus/export-modules/demo-menus/index.js +2 -2
- package/lib/components/menus/export-modules/demo-menus/menu-highlight.js +9 -3
- package/lib/components/nav-top/constant.js +2 -26
- package/lib/components/nav-top/utils.js +0 -8
- package/lib/utils/format-time.js +6 -4
- package/package.json +1 -1
|
@@ -192,9 +192,10 @@ var BookDemoPCContent = function BookDemoPCContent(_ref) {
|
|
|
192
192
|
localStorage.setItem("isSubmitted", "1");
|
|
193
193
|
var trickerContent = _constant.trackerInfo[type];
|
|
194
194
|
|
|
195
|
-
if (window.titaTracker) {
|
|
195
|
+
if (window.titaTracker && !localStorage.getItem("titaccc")) {
|
|
196
196
|
window.titaTracker("action").record(_objectSpread({
|
|
197
|
-
actionName: "
|
|
197
|
+
actionName: "提交预约演示",
|
|
198
|
+
productName: "预约演示"
|
|
198
199
|
}, trickerContent));
|
|
199
200
|
}
|
|
200
201
|
} else {
|
|
@@ -304,11 +305,11 @@ var BookDemoPCContent = function BookDemoPCContent(_ref) {
|
|
|
304
305
|
}));
|
|
305
306
|
var trickerContent = _constant.trackerInfo[type];
|
|
306
307
|
|
|
307
|
-
if (window.titaTracker) {
|
|
308
|
+
if (window.titaTracker && !localStorage.getItem("titaccc")) {
|
|
308
309
|
window.titaTracker("action").record({
|
|
309
|
-
actionName: "
|
|
310
|
-
|
|
311
|
-
|
|
310
|
+
actionName: "点开预约演示",
|
|
311
|
+
productName: "预约演示",
|
|
312
|
+
actionGroup: trickerContent.actionGroup
|
|
312
313
|
});
|
|
313
314
|
}
|
|
314
315
|
}, []);
|
|
@@ -75,8 +75,9 @@ var BookDemoPC = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
75
75
|
|
|
76
76
|
if (window.titaTracker) {
|
|
77
77
|
window.titaTracker("action").record({
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
productName: "预约演示",
|
|
79
|
+
actionGroup: "取消预约演示",
|
|
80
|
+
actionName: "\u53D6\u6D88\u9884\u7EA6\u6F14\u793A:\u586B\u5199\u60C5\u51B5\uFF1A".concat(content)
|
|
80
81
|
});
|
|
81
82
|
}
|
|
82
83
|
|
|
@@ -87,6 +88,14 @@ var BookDemoPC = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
87
88
|
}
|
|
88
89
|
};
|
|
89
90
|
|
|
91
|
+
var handleSuccessCloseBookDemo = function handleSuccessCloseBookDemo() {
|
|
92
|
+
setDialogVisible(false);
|
|
93
|
+
|
|
94
|
+
if (visibleChange) {
|
|
95
|
+
visibleChange(false);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
90
99
|
var handleChangeData = function handleChangeData(result) {
|
|
91
100
|
setData(result);
|
|
92
101
|
};
|
|
@@ -153,7 +162,7 @@ var BookDemoPC = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
153
162
|
onChange: handleChangeData,
|
|
154
163
|
source: source,
|
|
155
164
|
type: type,
|
|
156
|
-
onSubmitSuccess:
|
|
165
|
+
onSubmitSuccess: handleSuccessCloseBookDemo
|
|
157
166
|
}));
|
|
158
167
|
});
|
|
159
168
|
BookDemoPC.defaultProps = {
|
|
@@ -771,23 +771,17 @@ var bookTypeInfo = (_bookTypeInfo = {}, _defineProperty(_bookTypeInfo, _interfac
|
|
|
771
771
|
}), _bookTypeInfo);
|
|
772
772
|
exports.bookTypeInfo = bookTypeInfo;
|
|
773
773
|
var trackerInfo = (_trackerInfo = {}, _defineProperty(_trackerInfo, _interface.EDemoType.Learning, {
|
|
774
|
-
actionGroup: "
|
|
775
|
-
productName: "Learning-申请演示"
|
|
774
|
+
actionGroup: "Learning-预约"
|
|
776
775
|
}), _defineProperty(_trackerInfo, _interface.EDemoType.OfficalSiteOKR, {
|
|
777
|
-
actionGroup: "
|
|
778
|
-
productName: "OKR-申请演示"
|
|
776
|
+
actionGroup: "官网OKR-预约"
|
|
779
777
|
}), _defineProperty(_trackerInfo, _interface.EDemoType.OfficalSitePerformance, {
|
|
780
|
-
actionGroup: "
|
|
781
|
-
productName: "Performance-申请演示"
|
|
778
|
+
actionGroup: "官网Performance-预约演示"
|
|
782
779
|
}), _defineProperty(_trackerInfo, _interface.EDemoType.TryOKR, {
|
|
783
|
-
actionGroup: "
|
|
784
|
-
productName: "系统内-申请OKR演示"
|
|
780
|
+
actionGroup: "系统内-OKR预约演示"
|
|
785
781
|
}), _defineProperty(_trackerInfo, _interface.EDemoType.TryPerformance, {
|
|
786
|
-
actionGroup: "
|
|
787
|
-
productName: "系统内-申请绩效宝演示"
|
|
782
|
+
actionGroup: "系统内-绩效宝预约演示"
|
|
788
783
|
}), _defineProperty(_trackerInfo, _interface.EDemoType.UniversalBookDemo, {
|
|
789
|
-
actionGroup: "
|
|
790
|
-
productName: "申请演示"
|
|
784
|
+
actionGroup: "预约演示"
|
|
791
785
|
}), _trackerInfo);
|
|
792
786
|
exports.trackerInfo = trackerInfo;
|
|
793
787
|
var DemoTypeTextMap = (_DemoTypeTextMap = {}, _defineProperty(_DemoTypeTextMap, _interface.EDemoType.Learning, "learning"), _defineProperty(_DemoTypeTextMap, _interface.EDemoType.OfficalSiteOKR, "OKR官网"), _defineProperty(_DemoTypeTextMap, _interface.EDemoType.OfficalSitePerformance, "考核官网"), _defineProperty(_DemoTypeTextMap, _interface.EDemoType.TryOKR, "OKR试用版"), _defineProperty(_DemoTypeTextMap, _interface.EDemoType.TryPerformance, "绩效版"), _defineProperty(_DemoTypeTextMap, _interface.EDemoType.UniversalBookDemo, "旗舰版"), _DemoTypeTextMap);
|
|
@@ -95,11 +95,11 @@ var DemoMenus = function DemoMenus(props) {
|
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
(0, _react.useEffect)(function () {
|
|
98
|
-
var menuHighlight = new _menuHighlight["default"](history);
|
|
98
|
+
var menuHighlight = new _menuHighlight["default"](history, isManager);
|
|
99
99
|
menuHighlight.highlight(function (menu) {
|
|
100
100
|
return setSelectedMenuKeys([menu]);
|
|
101
101
|
});
|
|
102
|
-
}, [history.location.pathname, history.location.search]);
|
|
102
|
+
}, [history.location.pathname, history.location.search, isManager]);
|
|
103
103
|
|
|
104
104
|
var onSelectHandler = function onSelectHandler(selectedKyes, _ref) {
|
|
105
105
|
var node = _ref.node;
|
|
@@ -14,11 +14,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
14
14
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
15
15
|
|
|
16
16
|
var _default = /*#__PURE__*/function () {
|
|
17
|
-
function _default(history) {
|
|
17
|
+
function _default(history, isManager) {
|
|
18
18
|
_classCallCheck(this, _default);
|
|
19
19
|
|
|
20
20
|
this.history = null;
|
|
21
21
|
this.history = history;
|
|
22
|
+
this.isManager = isManager;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
_createClass(_default, [{
|
|
@@ -32,7 +33,12 @@ var _default = /*#__PURE__*/function () {
|
|
|
32
33
|
var _this$history$locatio = this.history.location,
|
|
33
34
|
pathname = _this$history$locatio.pathname,
|
|
34
35
|
search = _this$history$locatio.search;
|
|
35
|
-
|
|
36
|
+
|
|
37
|
+
if (this.isManager === 1) {
|
|
38
|
+
return pathname.match(/demofree/) && (!search || search.match(/selected[\s]*?=[\s]*?unassigned/));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return pathname.match(/demofree/) && search.match(/selected[\s]*?=[\s]*?unassigned/);
|
|
36
42
|
}
|
|
37
43
|
}, {
|
|
38
44
|
key: "isAssigned",
|
|
@@ -40,7 +46,7 @@ var _default = /*#__PURE__*/function () {
|
|
|
40
46
|
var _this$history$locatio2 = this.history.location,
|
|
41
47
|
pathname = _this$history$locatio2.pathname,
|
|
42
48
|
search = _this$history$locatio2.search;
|
|
43
|
-
return pathname.match(/demofree/) && search.match(/selected[\s]*?=[\s]*?assigned/);
|
|
49
|
+
return pathname.match(/demofree/) && (!search || search.match(/selected[\s]*?=[\s]*?assigned/));
|
|
44
50
|
}
|
|
45
51
|
}, {
|
|
46
52
|
key: "isReserved",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.userId = exports.tm = exports.popupAlignPhoto = exports.getVersionTextMap = exports.apiServer =
|
|
6
|
+
exports.userId = exports.tm = exports.popupAlignPhoto = exports.getVersionTextMap = exports.apiServer = void 0;
|
|
7
7
|
|
|
8
8
|
var _getLocale = require("../../utils/getLocale");
|
|
9
9
|
|
|
@@ -35,28 +35,4 @@ var getVersionTextMap = function getVersionTextMap() {
|
|
|
35
35
|
return _ref = {}, _defineProperty(_ref, _constant.Versions.Standard, (0, _getLocale.getLocale)("Sw_ProEdit")), _defineProperty(_ref, _constant.Versions.WeixinAssess, (0, _getLocale.getLocale)("Sw_PerEdit")), _defineProperty(_ref, _constant.Versions.Professional, (0, _getLocale.getLocale)("Sw_OKREdit")), _defineProperty(_ref, _constant.Versions.Flagship, (0, _getLocale.getLocale)("Sw_Flagship")), _ref;
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
-
exports.getVersionTextMap = getVersionTextMap;
|
|
39
|
-
var DEMO_FREE_MENU_CONFIG = {
|
|
40
|
-
DataSource: null,
|
|
41
|
-
appCode: null,
|
|
42
|
-
appId: 119,
|
|
43
|
-
children: [],
|
|
44
|
-
code: "",
|
|
45
|
-
color: "#F28D49",
|
|
46
|
-
defaultExpand: false,
|
|
47
|
-
domain: "",
|
|
48
|
-
groupId: 0,
|
|
49
|
-
href: "#demofree/list",
|
|
50
|
-
iconName: "",
|
|
51
|
-
id: 99998,
|
|
52
|
-
labelName: null,
|
|
53
|
-
menuPoint: null,
|
|
54
|
-
orderId: 2000,
|
|
55
|
-
originUrl: null,
|
|
56
|
-
signUrl: "",
|
|
57
|
-
status: 0,
|
|
58
|
-
tenantId: 0,
|
|
59
|
-
title: "预约演示",
|
|
60
|
-
type: "hash"
|
|
61
|
-
};
|
|
62
|
-
exports.DEMO_FREE_MENU_CONFIG = DEMO_FREE_MENU_CONFIG;
|
|
38
|
+
exports.getVersionTextMap = getVersionTextMap;
|
|
@@ -9,8 +9,6 @@ var _bsGlobal = require("../../utils/bs-global");
|
|
|
9
9
|
|
|
10
10
|
var _logoWhite = _interopRequireDefault(require("./images/logo-white.png"));
|
|
11
11
|
|
|
12
|
-
var _constant = require("./constant");
|
|
13
|
-
|
|
14
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
13
|
|
|
16
14
|
var getMenus = function getMenus() {
|
|
@@ -19,12 +17,6 @@ var getMenus = function getMenus() {
|
|
|
19
17
|
navs.sort(function (pre, next) {
|
|
20
18
|
return pre.orderId - next.orderId;
|
|
21
19
|
});
|
|
22
|
-
var isTita = (0, _bsGlobal.getTenantInfo)().Id === 352728;
|
|
23
|
-
|
|
24
|
-
if (isTita) {
|
|
25
|
-
navs = navs.concat(_constant.DEMO_FREE_MENU_CONFIG);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
20
|
return navs;
|
|
29
21
|
};
|
|
30
22
|
|
package/lib/utils/format-time.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.timeFormat = exports.showWeekLastDay = exports.showWeekFirstDay = exports.showNextWeekFirstDay = exports.showNextMonthFirstDay = exports.showMonthLastDay = exports.showMonthFirstDay = exports.getTimeString = exports.getNextDayOfYear = exports.getFirstDayOfYear = void 0;
|
|
6
|
+
exports.timeFormat = exports.showWeekLastDay = exports.showWeekFirstDay = exports.showNextWeekFirstDay = exports.showNextMonthFirstDay = exports.showMonthLastDay = exports.showMonthFirstDay = exports.getTimeString = exports.getNextDayOfYear = exports.getFirstDayOfYear = exports["default"] = void 0;
|
|
7
7
|
|
|
8
8
|
var _constant = require("./constant");
|
|
9
9
|
|
|
@@ -44,11 +44,11 @@ var getTimeString = function getTimeString(time, nowTime) {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
if (secondDiff < 60 * 60 * 24 * 2 && nowDate - 1 === timeDate) {
|
|
47
|
-
return "".concat((0, _getLocale.getLocale)("OKR_MyO_Pr_Text_Yesterday"), " ", "".concat(timeHours, ":").concat(timeMinutes));
|
|
47
|
+
return "".concat((0, _getLocale.getLocale)("OKR_MyO_Pr_Text_Yesterday"), " ", "".concat(timeHours < 10 ? "0".concat(timeHours) : timeHours, ":").concat(timeMinutes < 10 ? "0".concat(timeMinutes) : timeMinutes));
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
if (secondDiff < 60 * 60 * 24 * 3 && nowDate - 2 === timeDate) {
|
|
51
|
-
return "".concat((0, _getLocale.getLocale)("Mood_2daysago"), " ", "".concat(timeHours, ":").concat(timeMinutes));
|
|
51
|
+
return "".concat((0, _getLocale.getLocale)("Mood_2daysago"), " ", "".concat(timeHours < 10 ? "0".concat(timeHours) : timeHours, ":").concat(timeMinutes < 10 ? "0".concat(timeMinutes) : timeMinutes));
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
if (timeYear === nowYear) {
|
|
@@ -166,4 +166,6 @@ var showNextMonthFirstDay = function showNextMonthFirstDay() {
|
|
|
166
166
|
return "".concat(MonthFirstDay.getFullYear(), "/").concat(M, "/").concat(MonthFirstDay.getDate(), " 0:0:0");
|
|
167
167
|
};
|
|
168
168
|
|
|
169
|
-
exports.showNextMonthFirstDay = showNextMonthFirstDay;
|
|
169
|
+
exports.showNextMonthFirstDay = showNextMonthFirstDay;
|
|
170
|
+
var _default = getTimeString;
|
|
171
|
+
exports["default"] = _default;
|