@fonixtree/magic-design 2.0.108 → 2.0.110

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 (75) hide show
  1. package/es/assets/fonts/magic-box-iconfont.css +22 -10
  2. package/es/assets/fonts/magic-box-iconfont.css.bak +71 -7
  3. package/es/assets/fonts/magic-box-iconfont.js +1 -1
  4. package/es/assets/fonts/magic-box-iconfont.js.bak +1 -1
  5. package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
  6. package/es/assets/fonts/magic-box-iconfont.woff +0 -0
  7. package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
  8. package/es/common/ImageModal/index.js +52 -50
  9. package/es/common/LinkModal/AffiliateProductTable/index.js +1 -1
  10. package/es/common/LinkModal/AffiliateStore/index.js +1 -1
  11. package/es/common/LinkModal/BundleCampaign/index.js +1 -1
  12. package/es/common/LinkModal/CatgTable/index.js +1 -1
  13. package/es/common/LinkModal/CouponTable/index.js +1 -1
  14. package/es/common/LinkModal/CustomTable/index.js +2 -2
  15. package/es/common/LinkModal/FilteredProductModal/index.js +2 -2
  16. package/es/common/LinkModal/FunctionTable/index.js +1 -1
  17. package/es/common/LinkModal/MiniAppApi/index.js +1 -1
  18. package/es/common/LinkModal/MiniAppTable/index.js +2 -2
  19. package/es/common/LinkModal/ProductDetailPage/index.js +9 -3
  20. package/es/common/LinkModal/SelectVideoModal/index.js +2 -1
  21. package/es/common/LinkModal/ShareUrl/index.js +1 -1
  22. package/es/common/LinkModal/StoreCatgTable/index.js +1 -1
  23. package/es/common/LinkModal/StoreTable/index.js +1 -1
  24. package/es/common/LinkModal/index.js +1 -1
  25. package/es/common/VideoUpload/index.js +1 -0
  26. package/es/composite-comp/dito/components/Orders/mobile/index.js +8 -6
  27. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.js +8 -6
  28. package/es/composite-comp/monpay/components/InterestProducts/mobile/index.js +11 -6
  29. package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.js +5 -2
  30. package/es/constants/index.js +21 -4
  31. package/es/core/Designer/QuickMenuBar/index.js +59 -10
  32. package/es/core/Designer/index.js +21 -3
  33. package/es/core/SelectUrl/index.js +0 -1
  34. package/es/utils/androidUtil.js +5 -2
  35. package/es/utils/commonUtil.js +2 -2
  36. package/es/utils/coreUtil.js +12 -2
  37. package/lib/assets/fonts/magic-box-iconfont.css +22 -10
  38. package/lib/assets/fonts/magic-box-iconfont.css.bak +71 -7
  39. package/lib/assets/fonts/magic-box-iconfont.js +1 -1
  40. package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -1
  41. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  42. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  43. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  44. package/lib/common/ImageModal/index.js +52 -50
  45. package/lib/common/LinkModal/AffiliateProductTable/index.js +1 -1
  46. package/lib/common/LinkModal/AffiliateStore/index.js +1 -1
  47. package/lib/common/LinkModal/BundleCampaign/index.js +1 -1
  48. package/lib/common/LinkModal/CatgTable/index.js +1 -1
  49. package/lib/common/LinkModal/CouponTable/index.js +1 -1
  50. package/lib/common/LinkModal/CustomTable/index.js +2 -2
  51. package/lib/common/LinkModal/FilteredProductModal/index.js +2 -2
  52. package/lib/common/LinkModal/FunctionTable/index.js +1 -1
  53. package/lib/common/LinkModal/MiniAppApi/index.js +1 -1
  54. package/lib/common/LinkModal/MiniAppTable/index.js +2 -2
  55. package/lib/common/LinkModal/ProductDetailPage/index.js +9 -3
  56. package/lib/common/LinkModal/SelectVideoModal/index.js +2 -1
  57. package/lib/common/LinkModal/ShareUrl/index.js +1 -1
  58. package/lib/common/LinkModal/StoreCatgTable/index.js +1 -1
  59. package/lib/common/LinkModal/StoreTable/index.js +1 -1
  60. package/lib/common/LinkModal/index.js +1 -1
  61. package/lib/common/VideoUpload/index.js +1 -0
  62. package/lib/composite-comp/dito/components/Orders/mobile/index.js +8 -6
  63. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.js +8 -6
  64. package/lib/composite-comp/monpay/components/InterestProducts/mobile/index.js +11 -6
  65. package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.js +5 -2
  66. package/lib/constants/index.js +21 -4
  67. package/lib/core/Designer/QuickMenuBar/index.js +59 -10
  68. package/lib/core/Designer/index.js +21 -3
  69. package/lib/core/SelectUrl/index.js +0 -1
  70. package/lib/utils/androidUtil.js +5 -2
  71. package/lib/utils/commonUtil.js +2 -2
  72. package/lib/utils/coreUtil.js +12 -2
  73. package/package.json +2 -1
  74. package/es/assets/fonts/.DS_Store +0 -0
  75. package/lib/assets/fonts/.DS_Store +0 -0
@@ -21,6 +21,8 @@ var _Iconfont = _interopRequireDefault(require("../../../common/Iconfont"));
21
21
 
22
22
  var _constants = require("../../../constants");
23
23
 
24
+ var _coreUtil = require("../../../utils/coreUtil");
25
+
24
26
  var _locale = require("../../../locale");
25
27
 
26
28
  require("./index.less");
@@ -103,6 +105,34 @@ function (_super) {
103
105
  _this.onBtnClick(e);
104
106
 
105
107
  e.stopPropagation();
108
+ }; // 未开启自动审核,Draft 和 Rejected 状态下展示审核记录按钮
109
+
110
+
111
+ _this.isShowReviewRecord = function () {
112
+ return !(0, _coreUtil.isAutoAudit)() && [_constants.pageStateMap.REJECTED, _constants.pageStateMap.DRAFT].includes(_this.props.pageState);
113
+ };
114
+
115
+ _this.isShowPublish = function () {
116
+ return (0, _coreUtil.isAutoAudit)() && _this.props.pageState === _constants.pageStateMap.DRAFT || !(0, _coreUtil.isAutoAudit)() && _this.props.pageState === _constants.pageStateMap.ACTIVE;
117
+ }; // 审核失败和未审核状态展示 To Review 按钮
118
+
119
+
120
+ _this.isShowToReview = function () {
121
+ return !(0, _coreUtil.isAutoAudit)() && [_constants.pageStateMap.REJECTED, _constants.pageStateMap.DRAFT].includes(_this.props.pageState);
122
+ }; // 提交审核状态展示 Cancel 按钮
123
+
124
+
125
+ _this.isShowCancelReview = function () {
126
+ return _this.props.pageState === _constants.pageStateMap.PENDING;
127
+ }; // 草稿状态展示设置模版按钮
128
+
129
+
130
+ _this.isShowSetTemplate = function () {
131
+ return _constants.pageStateMap.DRAFT === _this.props.pageState;
132
+ };
133
+
134
+ _this.isShowSave = function () {
135
+ return !(0, _coreUtil.isAutoAudit)() && [_constants.pageStateMap.REJECTED, _constants.pageStateMap.DRAFT].includes(_this.props.pageState);
106
136
  };
107
137
 
108
138
  return _this;
@@ -183,28 +213,39 @@ function (_super) {
183
213
  type: "light"
184
214
  }, (0, _locale.i18n)('SAVE'))) : /*#__PURE__*/_react["default"].createElement("div", {
185
215
  className: "menu_right"
186
- }, window.magicDesign.templateType === _constants.tempTypeMap.PAGE && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
187
- "data-code": _constants.quickMenuCode.SET_AS_TEMPLATE,
216
+ }, this.isShowReviewRecord() && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
217
+ "data-code": _constants.quickMenuCode.REVIEW_RECORD,
218
+ icon: "icon-clock",
188
219
  onClick: this.onBtnClick,
189
- type: "text"
190
- }, (0, _locale.i18n)('SET_AS_TEMPLATE')), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
220
+ title: "Review Record",
221
+ type: "icon"
222
+ }), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
191
223
  "data-code": _constants.quickMenuCode.PREVIEW,
192
- onClick: this.onBtnClick
193
- }, (0, _locale.i18n)('PREVIEW')), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
224
+ icon: "icon-eye1",
225
+ onClick: this.onBtnClick,
226
+ title: "Preview",
227
+ type: "icon"
228
+ }), this.isShowSave() && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
194
229
  "data-code": _constants.quickMenuCode.SAVE,
195
230
  disabled: window.magicDesign.readOnly,
231
+ icon: "icon-save",
196
232
  onClick: this.onBtnClick,
197
233
  tip: "The page is in use. Please copy or create a new page",
234
+ title: "Save",
235
+ type: "icon"
236
+ }), this.isShowSetTemplate() && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
237
+ "data-code": _constants.quickMenuCode.SET_AS_TEMPLATE,
238
+ onClick: this.onBtnClick,
198
239
  type: "light"
199
- }, (0, _locale.i18n)('SAVE')), /*#__PURE__*/_react["default"].createElement("div", {
240
+ }, (0, _locale.i18n)('SET_AS_TEMPLATE')), /*#__PURE__*/_react["default"].createElement("div", {
200
241
  className: "publish_wrap"
201
- }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
242
+ }, this.isShowPublish() && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
202
243
  "data-code": _constants.quickMenuCode.PUBLISH,
203
244
  disabled: window.magicDesign.readOnly,
204
245
  onClick: this.onBtnClick,
205
246
  tip: "The page is in use. Please copy or create a new page",
206
247
  type: "primary"
207
- }, (0, _locale.i18n)('PUBLISH_NOW'), window.magicDesign.templateType === 'Page' && /*#__PURE__*/_react["default"].createElement(_antd.Dropdown, {
248
+ }, (0, _locale.i18n)('PUBLISH_NOW'), window.magicDesign.templateType === _constants.tempTypeMap.PAGE && /*#__PURE__*/_react["default"].createElement(_antd.Dropdown, {
208
249
  getPopupContainer: function getPopupContainer() {
209
250
  return document.querySelector('.publish_wrap');
210
251
  },
@@ -226,7 +267,15 @@ function (_super) {
226
267
  padding: '8px 3px 8px 6px'
227
268
  },
228
269
  type: "icon-outlined-down"
229
- }))))));
270
+ }))), this.isShowToReview() && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
271
+ "data-code": _constants.quickMenuCode.TO_REVIEW,
272
+ onClick: this.onBtnClick,
273
+ type: "primary"
274
+ }, "To Review"), this.isShowCancelReview() && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
275
+ "data-code": _constants.quickMenuCode.CANCEL_REVIEW,
276
+ onClick: this.onBtnClick,
277
+ type: "primary"
278
+ }, "Cancel"))));
230
279
  };
231
280
 
232
281
  return QuickMenuBar;
@@ -262,12 +262,14 @@ window.magicDesign = {
262
262
  };
263
263
 
264
264
  var setDesignConfig = function setDesignConfig(data) {
265
- window.magicDesign = __assign(__assign(__assign({}, window.magicDesign), data), {
265
+ window.magicDesign = __assign(__assign(__assign(__assign({}, window.magicDesign), {
266
+ autoAudit: true
267
+ }), data), {
266
268
  designMode: true,
267
269
  compWidth: Number(data.compWidth),
268
270
  compSpacing: Number(data.compSpacing),
269
271
  MBaseUrl: data.MBaseUrl || 'operation/v1',
270
- partyType: _constants.partyTypeMap[data.MBaseUrl] || 'P'
272
+ partyType: _constants.baseUrlMap[data.MBaseUrl] || 'P'
271
273
  });
272
274
  };
273
275
 
@@ -469,7 +471,10 @@ function (_super) {
469
471
  onSave = _a.onSave,
470
472
  onPreviews = _a.onPreviews,
471
473
  onPush = _a.onPush,
472
- onSetAsTemp = _a.onSetAsTemp;
474
+ onSetAsTemp = _a.onSetAsTemp,
475
+ onToReview = _a.onToReview,
476
+ onCancelReview = _a.onCancelReview,
477
+ onReviewRecord = _a.onReviewRecord;
473
478
  var _b = _this.state,
474
479
  device = _b.device,
475
480
  MPageData = _b.MPageData;
@@ -546,6 +551,18 @@ function (_super) {
546
551
  _this.onSwitchDevice(_constants.deviceTypeMap.PHONE);
547
552
 
548
553
  break;
554
+
555
+ case _constants.quickMenuCode.TO_REVIEW:
556
+ onToReview(handleParams);
557
+ break;
558
+
559
+ case _constants.quickMenuCode.CANCEL_REVIEW:
560
+ onCancelReview();
561
+ break;
562
+
563
+ case _constants.quickMenuCode.REVIEW_RECORD:
564
+ onReviewRecord();
565
+ break;
549
566
  }
550
567
  };
551
568
 
@@ -601,6 +618,7 @@ function (_super) {
601
618
 
602
619
  _this.renderHeader = function () {
603
620
  return /*#__PURE__*/_react["default"].createElement(_QuickMenuBar["default"], {
621
+ auditState: _this.props.auditState,
604
622
  device: _this.state.device,
605
623
  language: _this.props.language,
606
624
  onBtnClick: _this.onQuickMenuClick,
@@ -14,7 +14,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
14
14
  function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
15
15
 
16
16
  var SelectUrl = function SelectUrl(props) {
17
- console.log(props, 'props');
18
17
  var fishFetch = props.fishFetch,
19
18
  config = props.config,
20
19
  modalConfig = props.modalConfig;
@@ -23,6 +23,9 @@ var browserVersion = function browserVersion() {
23
23
  qq: u.match(/\sQQ/i) == ' qq',
24
24
  isApp: u.indexOf('app/CYLON-APP') > -1,
25
25
  isNuriApp: u.indexOf('app/NURI-APP') > -1,
26
+ isDitoApp: u.indexOf('mydito') > -1,
27
+ ditoAndroidApp: u.indexOf('mydito') > -1 && (u.indexOf('Android') > -1 || u.indexOf('Adr') > -1),
28
+ ditoIosApp: u.indexOf('mydito') > -1 && !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
26
29
  isAshitaApp: u.indexOf('app/ASHITA-APP') > -1
27
30
  };
28
31
  };
@@ -136,9 +139,9 @@ var sendToApp = function sendToApp(params) {
136
139
  exports.sendToApp = sendToApp;
137
140
 
138
141
  var goToLoginApp = function goToLoginApp() {
139
- if (browserVersion().androidApp) {
142
+ if (browserVersion().ditoAndroidApp) {
140
143
  window.dito.goToLogin();
141
- } else if (browserVersion().iosApp) {
144
+ } else if (browserVersion().ditoIosApp) {
142
145
  window.dito.goToLogin();
143
146
  }
144
147
  };
@@ -372,8 +372,8 @@ var checkLogin = function checkLogin(isLead, redirectUrl, replaceFlag) {
372
372
 
373
373
  if (!isLogin()) {
374
374
  if (isLead) {
375
- if ((0, _androidUtil.browserVersion)().isApp) {
376
- goToLoginApp();
375
+ if ((0, _androidUtil.browserVersion)().isDitoApp) {
376
+ (0, _androidUtil.goToLoginApp)();
377
377
  } else {
378
378
  var _a = window.location,
379
379
  pathname = _a.pathname,
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.setMagicDesign = exports.renderPreview = exports.isPc = exports.isDesignMode = exports.isActiveFloor = exports.getVideoCover = exports.copyNode = exports.clickUrl = void 0;
6
+ exports.setMagicDesign = exports.renderPreview = exports.isPc = exports.isDesignMode = exports.isAutoAudit = exports.isActiveFloor = exports.getVideoCover = exports.copyNode = exports.clickUrl = void 0;
7
7
 
8
8
  var _uuid = require("uuid");
9
9
 
@@ -444,5 +444,15 @@ var copyNode = function copyNode(value, parentId) {
444
444
  });
445
445
  return newNode;
446
446
  };
447
+ /**
448
+ * 是否开启自动审核
449
+ */
447
450
 
448
- exports.copyNode = copyNode;
451
+
452
+ exports.copyNode = copyNode;
453
+
454
+ var isAutoAudit = function isAutoAudit() {
455
+ return window.systemParams.autoAudit !== 'false' || window.partyType === _constants.partyTypeMap.PLATFORM;
456
+ };
457
+
458
+ exports.isAutoAudit = isAutoAudit;
@@ -1,9 +1,8 @@
1
1
  @font-face {
2
- font-family: "magic-box-iconfont";
3
- /* Project id 3317752 */
4
- src: url('magic-box-iconfont.woff2?t=1716443961517') format('woff2'),
5
- url('magic-box-iconfont.woff?t=1716443961517') format('woff'),
6
- url('magic-box-iconfont.ttf?t=1716443961517') format('truetype');
2
+ font-family: "magic-box-iconfont"; /* Project id 3317752 */
3
+ src: url('magic-box-iconfont.woff2?t=1716881585254') format('woff2'),
4
+ url('magic-box-iconfont.woff?t=1716881585254') format('woff'),
5
+ url('magic-box-iconfont.ttf?t=1716881585254') format('truetype');
7
6
  }
8
7
 
9
8
  .magic-box-iconfont {
@@ -14,6 +13,22 @@
14
13
  -moz-osx-font-smoothing: grayscale;
15
14
  }
16
15
 
16
+ .magic-box-icon-save:before {
17
+ content: "\e646";
18
+ }
19
+
20
+ .magic-box-icon-eye1:before {
21
+ content: "\e647";
22
+ }
23
+
24
+ .magic-box-icon-clock:before {
25
+ content: "\e648";
26
+ }
27
+
28
+ .magic-box-icon-select2:before {
29
+ content: "\e67a";
30
+ }
31
+
17
32
  .magic-box-icon-list-sort:before {
18
33
  content: "\e645";
19
34
  }
@@ -126,10 +141,6 @@
126
141
  content: "\e671";
127
142
  }
128
143
 
129
- .magic-box-icon-select2:before {
130
- content: "\e67a";
131
- }
132
-
133
144
  .magic-box-icon-b-play-02:before {
134
145
  content: "\e672";
135
146
  }
@@ -572,4 +583,5 @@
572
583
 
573
584
  .magic-box-icon-image:before {
574
585
  content: "\e608";
575
- }
586
+ }
587
+
@@ -1,8 +1,8 @@
1
1
  @font-face {
2
2
  font-family: "magic-box-iconfont"; /* Project id 3317752 */
3
- src: url('magic-box-iconfont.woff2?t=1704245006151') format('woff2'),
4
- url('magic-box-iconfont.woff?t=1704245006151') format('woff'),
5
- url('magic-box-iconfont.ttf?t=1704245006151') format('truetype');
3
+ src: url('magic-box-iconfont.woff2?t=1716881585254') format('woff2'),
4
+ url('magic-box-iconfont.woff?t=1716881585254') format('woff'),
5
+ url('magic-box-iconfont.ttf?t=1716881585254') format('truetype');
6
6
  }
7
7
 
8
8
  .magic-box-iconfont {
@@ -13,6 +13,74 @@
13
13
  -moz-osx-font-smoothing: grayscale;
14
14
  }
15
15
 
16
+ .icon-save:before {
17
+ content: "\e646";
18
+ }
19
+
20
+ .icon-eye1:before {
21
+ content: "\e647";
22
+ }
23
+
24
+ .icon-clock:before {
25
+ content: "\e648";
26
+ }
27
+
28
+ .icon-select2:before {
29
+ content: "\e67a";
30
+ }
31
+
32
+ .icon-list-sort:before {
33
+ content: "\e645";
34
+ }
35
+
36
+ .icon-check:before {
37
+ content: "\e644";
38
+ }
39
+
40
+ .icon-sale:before {
41
+ content: "\e78b";
42
+ }
43
+
44
+ .icon-bundle:before {
45
+ content: "\e6cb";
46
+ }
47
+
48
+ .icon-interests:before {
49
+ content: "\e829";
50
+ }
51
+
52
+ .icon-group-users:before {
53
+ content: "\e60a";
54
+ }
55
+
56
+ .icon-group-buy:before {
57
+ content: "\e643";
58
+ }
59
+
60
+ .icon-orders:before {
61
+ content: "\e64c";
62
+ }
63
+
64
+ .icon-function:before {
65
+ content: "\e6d1";
66
+ }
67
+
68
+ .icon-messages:before {
69
+ content: "\e600";
70
+ }
71
+
72
+ .icon-set:before {
73
+ content: "\e601";
74
+ }
75
+
76
+ .icon-cards_fill:before {
77
+ content: "\e7a6";
78
+ }
79
+
80
+ .icon-account:before {
81
+ content: "\e655";
82
+ }
83
+
16
84
  .icon-anchor:before {
17
85
  content: "\e642";
18
86
  }
@@ -73,10 +141,6 @@
73
141
  content: "\e671";
74
142
  }
75
143
 
76
- .icon-select2:before {
77
- content: "\e67a";
78
- }
79
-
80
144
  .icon-b-play-02:before {
81
145
  content: "\e672";
82
146
  }