@titaui/pc 1.9.144 → 1.9.147

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.
@@ -192,7 +192,7 @@ 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
197
  actionName: "提交预约演示",
198
198
  productName: "预约演示"
@@ -305,7 +305,7 @@ var BookDemoPCContent = function BookDemoPCContent(_ref) {
305
305
  }));
306
306
  var trickerContent = _constant.trackerInfo[type];
307
307
 
308
- if (window.titaTracker) {
308
+ if (window.titaTracker && !localStorage.getItem("titaccc")) {
309
309
  window.titaTracker("action").record({
310
310
  actionName: "点开预约演示",
311
311
  productName: "预约演示",
@@ -73,10 +73,11 @@ var BookDemoPC = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
73
73
  });
74
74
  content += "source: ".concat(source || Source);
75
75
 
76
- if (window.titaTracker) {
76
+ if (window.titaTracker && !localStorage.getItem("titaccc")) {
77
77
  window.titaTracker("action").record({
78
- actionGroup: "申请演示__取消提交",
79
- actionName: "\u586B\u5199\u60C5\u51B5\uFF1A".concat(content)
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: handleCloseBookDemo
165
+ onSubmitSuccess: handleSuccessCloseBookDemo
157
166
  }));
158
167
  });
159
168
  BookDemoPC.defaultProps = {
@@ -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
- return pathname.match(/demofree/) && (!search || search.match(/selected[\s]*?=[\s]*?unassigned/));
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 = exports.DEMO_FREE_MENU_CONFIG = void 0;
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
 
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.9.144",
3
+ "version": "1.9.147",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",