@fonixtree/magic-design 2.0.31 → 2.0.33

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 (133) hide show
  1. package/es/assets/less/modal.less +1 -1
  2. package/es/common/LinkModal/FilteredProductModal/index.js +7 -3
  3. package/es/common/LinkModal/FilteredProductModal/index.less +1 -1
  4. package/es/common/LinkModal/index.js +1 -1
  5. package/es/common/ProductModal/index.js +23 -30
  6. package/es/composite-comp/bol/components/Banner/mobile/index.js +6 -0
  7. package/es/composite-comp/bol/components/Video/defaultJSON.js +24 -0
  8. package/es/composite-comp/bol/config-panels/TagCompConfig/imgs/layout1.png +0 -0
  9. package/es/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +0 -1
  10. package/es/composite-comp/common/components/ProductItem/index.js +8 -4
  11. package/es/composite-comp/common/components/ProductItem/index.less +30 -15
  12. package/es/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
  13. package/es/composite-comp/dito/components/Recommend/mobile/index.js +14 -2
  14. package/es/composite-comp/dito/components/SignBoard/defaultJSON.js +41 -37
  15. package/es/composite-comp/dito/components/SignBoard/mobile/index.js +33 -28
  16. package/es/composite-comp/dito/components/SignBoard/mobile/index.less +0 -14
  17. package/es/composite-comp/dito/components/SignBoard/pc/index.js +8 -11
  18. package/es/composite-comp/dito/config-panels/SignBoardConfig/SignBoardConfigContent/index.js +9 -47
  19. package/es/composite-comp/dito/config-panels/SignBoardConfig/index.js +9 -2
  20. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +3 -3
  21. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +14 -2
  22. package/es/core/Designer/LeftTitle/index.js +1 -1
  23. package/es/core/Designer/ToolBarModal/index.js +16 -4
  24. package/es/core/Designer/index.js +3 -0
  25. package/es/core/Renderer/index.js +4 -12
  26. package/es/decorator/index.js +24 -1
  27. package/es/locale/en/en.json +1 -1
  28. package/es/locale/es/es.json +1 -1
  29. package/es/locale/id/id.json +1 -1
  30. package/es/meta-comp/components/Button/index.js +7 -0
  31. package/es/meta-comp/components/Text/formats/fontStyle.js +58 -0
  32. package/es/meta-comp/components/Text/index.js +9 -0
  33. package/es/meta-comp/config-panels/ButtonConfig/index.js +30 -28
  34. package/es/utils/commonUtil.js +17 -3
  35. package/es/utils/currencyUtil.js +29 -10
  36. package/lib/assets/less/modal.less +1 -1
  37. package/lib/common/LinkModal/FilteredProductModal/index.js +7 -3
  38. package/lib/common/LinkModal/FilteredProductModal/index.less +1 -1
  39. package/lib/common/LinkModal/index.js +1 -1
  40. package/lib/common/ProductModal/index.js +23 -30
  41. package/lib/composite-comp/bol/components/Banner/mobile/index.js +6 -0
  42. package/lib/composite-comp/bol/components/Video/defaultJSON.js +24 -0
  43. package/lib/composite-comp/bol/config-panels/TagCompConfig/imgs/layout1.png +0 -0
  44. package/lib/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +0 -1
  45. package/lib/composite-comp/common/components/ProductItem/index.js +8 -4
  46. package/lib/composite-comp/common/components/ProductItem/index.less +30 -15
  47. package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
  48. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +14 -2
  49. package/lib/composite-comp/dito/components/SignBoard/defaultJSON.js +41 -37
  50. package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +33 -28
  51. package/lib/composite-comp/dito/components/SignBoard/mobile/index.less +0 -14
  52. package/lib/composite-comp/dito/components/SignBoard/pc/index.js +8 -11
  53. package/lib/composite-comp/dito/config-panels/SignBoardConfig/SignBoardConfigContent/index.js +9 -47
  54. package/lib/composite-comp/dito/config-panels/SignBoardConfig/index.js +9 -2
  55. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +3 -3
  56. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +14 -2
  57. package/lib/core/Designer/LeftTitle/index.js +1 -1
  58. package/lib/core/Designer/ToolBarModal/index.js +16 -4
  59. package/lib/core/Designer/index.js +3 -0
  60. package/lib/core/Renderer/index.js +4 -12
  61. package/lib/decorator/index.js +24 -1
  62. package/lib/locale/en/en.json +1 -1
  63. package/lib/locale/es/es.json +1 -1
  64. package/lib/locale/id/id.json +1 -1
  65. package/lib/meta-comp/components/Button/index.js +7 -0
  66. package/lib/meta-comp/components/Text/formats/fontStyle.js +58 -0
  67. package/lib/meta-comp/components/Text/index.js +9 -0
  68. package/lib/meta-comp/config-panels/ButtonConfig/index.js +30 -28
  69. package/lib/utils/commonUtil.js +17 -3
  70. package/lib/utils/currencyUtil.js +29 -10
  71. package/package.json +1 -1
  72. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js +0 -99
  73. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less +0 -54
  74. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +0 -27
  75. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +0 -27
  76. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +0 -27
  77. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.js +0 -96
  78. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.less +0 -26
  79. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.js +0 -101
  80. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.less +0 -26
  81. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +0 -99
  82. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.less +0 -39
  83. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.js +0 -93
  84. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.less +0 -26
  85. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BackgroundSVG.js +0 -27
  86. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BoldSVG.js +0 -29
  87. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/FontColorSVG.js +0 -49
  88. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/ItalicSVG.js +0 -29
  89. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/LinkSVG.js +0 -26
  90. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/OrderSVG.js +0 -27
  91. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/StrikeSVG.js +0 -31
  92. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnderlineSVG.js +0 -34
  93. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnorderSVG.js +0 -41
  94. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/index.js +0 -136
  95. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/index.less +0 -25
  96. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/type.js +0 -1
  97. package/es/core/Designer/TextEditModal/ToolBar/index.js +0 -219
  98. package/es/core/Designer/TextEditModal/ToolBar/index.less +0 -19
  99. package/es/core/Designer/TextEditModal/index.js +0 -100
  100. package/es/core/Designer/TextEditModal/index.less +0 -4
  101. package/es/core/Designer/TextEditModal_old/index.js +0 -142
  102. package/es/core/Designer/TextEditModal_old/index.less +0 -25
  103. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js +0 -99
  104. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less +0 -54
  105. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +0 -27
  106. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +0 -27
  107. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +0 -27
  108. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.js +0 -96
  109. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.less +0 -26
  110. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.js +0 -101
  111. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.less +0 -26
  112. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +0 -99
  113. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.less +0 -39
  114. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.js +0 -93
  115. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.less +0 -26
  116. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BackgroundSVG.js +0 -27
  117. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BoldSVG.js +0 -29
  118. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/FontColorSVG.js +0 -49
  119. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/ItalicSVG.js +0 -29
  120. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/LinkSVG.js +0 -26
  121. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/OrderSVG.js +0 -27
  122. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/StrikeSVG.js +0 -31
  123. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnderlineSVG.js +0 -34
  124. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnorderSVG.js +0 -41
  125. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/index.js +0 -136
  126. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/index.less +0 -25
  127. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/type.js +0 -1
  128. package/lib/core/Designer/TextEditModal/ToolBar/index.js +0 -219
  129. package/lib/core/Designer/TextEditModal/ToolBar/index.less +0 -19
  130. package/lib/core/Designer/TextEditModal/index.js +0 -100
  131. package/lib/core/Designer/TextEditModal/index.less +0 -4
  132. package/lib/core/Designer/TextEditModal_old/index.js +0 -142
  133. package/lib/core/Designer/TextEditModal_old/index.less +0 -25
@@ -13,8 +13,6 @@ var _antd = require("antd");
13
13
 
14
14
  var _common = require("../../../../../common");
15
15
 
16
- var _storeLogo = _interopRequireDefault(require("../imgs/storeLogo.png"));
17
-
18
16
  var _coreUtil = require("../../../../../utils/coreUtil");
19
17
 
20
18
  var _star = _interopRequireDefault(require("../imgs/star.svg"));
@@ -23,6 +21,8 @@ var _commonUtil = require("../../../../../utils/commonUtil");
23
21
 
24
22
  var _locale = require("../../../../../locale");
25
23
 
24
+ var _components = require("../../../../../meta-comp/components");
25
+
26
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
27
 
28
28
  var __extends = void 0 && (void 0).__extends || function () {
@@ -210,10 +210,9 @@ function (_super) {
210
210
 
211
211
  _this.getStoreInfo = function () {
212
212
  return __awaiter(_this, void 0, void 0, function () {
213
- var storeId, _a, res, isFollow;
214
-
215
- return __generator(this, function (_b) {
216
- switch (_b.label) {
213
+ var storeId, storeDetailInfo;
214
+ return __generator(this, function (_a) {
215
+ switch (_a.label) {
217
216
  case 0:
218
217
  storeId = window.magicDesign.storeId;
219
218
  if (!storeId) return [3
@@ -221,17 +220,15 @@ function (_super) {
221
220
  , 2];
222
221
  return [4
223
222
  /*yield*/
224
- , Promise.all([(0, _commonUtil.commonFetch)("/designer/v1/h5/store/detail/" + storeId, {}, 'GET'), (0, _commonUtil.commonFetch)('/designer/v1/h5/collection/store/check', {
225
- storeId: storeId
226
- })])];
223
+ , (0, _commonUtil.commonFetch)("/designer/v1/h5/store/detail/" + storeId, {}, 'GET')];
227
224
 
228
225
  case 1:
229
- _a = _b.sent(), res = _a[0], isFollow = _a[1];
226
+ storeDetailInfo = _a.sent();
230
227
  this.setState({
231
- storeInfo: res,
232
- isFollow: isFollow == 'Y'
228
+ storeInfo: storeDetailInfo,
229
+ isFollow: storeDetailInfo.userHasFollowed == 'Y'
233
230
  });
234
- _b.label = 2;
231
+ _a.label = 2;
235
232
 
236
233
  case 2:
237
234
  return [2
@@ -320,8 +317,8 @@ function (_super) {
320
317
  action: 'operation',
321
318
  params: {
322
319
  type: 'CHAT',
323
- storeId: storeInfo.storeId,
324
- sysAccount: storeInfo.sysAccount
320
+ storeId: storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeId,
321
+ sysAccount: storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.sysAccount
325
322
  }
326
323
  };
327
324
  window.magicDesign.handleAction(params);
@@ -335,14 +332,16 @@ function (_super) {
335
332
  };
336
333
 
337
334
  SignBoardMobile.prototype.render = function () {
338
- var _this = this; // const { data } = this.props;
339
- // console.log('--SignBoard', data);
335
+ var _this = this;
336
+
337
+ var _a, _b;
340
338
 
339
+ var data = this.props.data; // console.log('--SignBoard', data);
341
340
 
342
- var _a = this.state,
343
- storeInfo = _a.storeInfo,
344
- isFollow = _a.isFollow,
345
- inputVal = _a.inputVal;
341
+ var _c = this.state,
342
+ storeInfo = _c.storeInfo,
343
+ isFollow = _c.isFollow,
344
+ inputVal = _c.inputVal;
346
345
  return /*#__PURE__*/_react["default"].createElement("div", {
347
346
  className: "m-sign-board-bar"
348
347
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -367,12 +366,18 @@ function (_super) {
367
366
  type: "icon-search2"
368
367
  }))), /*#__PURE__*/_react["default"].createElement("div", {
369
368
  className: "store-info-wrap"
370
- }, /*#__PURE__*/_react["default"].createElement("img", {
371
- className: "store-logo",
372
- src: (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeLogoUrl) || _storeLogo["default"]
369
+ }, data.content && ((_a = data.content.logo) === null || _a === void 0 ? void 0 : _a.open) && /*#__PURE__*/_react["default"].createElement("div", {
370
+ className: "logo"
371
+ }, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
372
+ data: data.content.logo,
373
+ style: {
374
+ height: 44,
375
+ width: 44
376
+ }
377
+ })), data.content && ((_b = data.content.title) === null || _b === void 0 ? void 0 : _b.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
378
+ className: "card-text",
379
+ data: data.content.title
373
380
  }), /*#__PURE__*/_react["default"].createElement("div", {
374
- className: "store-name"
375
- }, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeName) || 'Compraqui'), /*#__PURE__*/_react["default"].createElement("div", {
376
381
  onClick: this.clickCollect
377
382
  }, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
378
383
  color: isFollow ? '#F1600F' : '#333333',
@@ -382,12 +387,12 @@ function (_super) {
382
387
  className: "store-info-wrap"
383
388
  }, /*#__PURE__*/_react["default"].createElement("div", {
384
389
  className: "number"
385
- }, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeEvalValue) ? Number(storeInfo.storeEvalValue / 100).toFixed(1) : '5', " "), /*#__PURE__*/_react["default"].createElement("img", {
390
+ }, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeEvalValue) ? Number(storeInfo.storeEvalValue / 100).toFixed(1) : '5。0', " "), /*#__PURE__*/_react["default"].createElement("img", {
386
391
  alt: "star",
387
392
  src: _star["default"]
388
393
  })), /*#__PURE__*/_react["default"].createElement("div", {
389
394
  className: "number"
390
- }, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.userCollectionNum) || '1000+', " "), " ", (0, _locale.i18n)('FOLLOWERS')), (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.hasCustomerService) === 'Y' && /*#__PURE__*/_react["default"].createElement("div", {
395
+ }, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.userCollectionNum) || 0, " "), " ", (0, _locale.i18n)('FOLLOWERS')), (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.hasCustomerService) === 'Y' && /*#__PURE__*/_react["default"].createElement("div", {
391
396
  className: "chat-btn",
392
397
  onClick: this.toChat
393
398
  }, (0, _locale.i18n)('CHAT'))));
@@ -62,17 +62,3 @@
62
62
  text-transform: uppercase;
63
63
  color: #333333;
64
64
  }
65
- .m-sign-board-bar .store-info-wrap .store-logo {
66
- width: 0.88rem;
67
- height: 0.88rem;
68
- border-radius: 50%;
69
- }
70
- .m-sign-board-bar .store-info-wrap .store-name {
71
- flex: 1;
72
- margin-left: 0.24rem;
73
- font-weight: 500;
74
- font-size: 0.32rem;
75
- line-height: 0.4rem;
76
- color: #070707;
77
- font-family: 'Montserrat';
78
- }
@@ -212,10 +212,9 @@ function (_super) {
212
212
 
213
213
  _this.getStoreInfo = function () {
214
214
  return __awaiter(_this, void 0, void 0, function () {
215
- var storeId, _a, res, isFollow;
216
-
217
- return __generator(this, function (_b) {
218
- switch (_b.label) {
215
+ var storeId, storeDetailInfo;
216
+ return __generator(this, function (_a) {
217
+ switch (_a.label) {
219
218
  case 0:
220
219
  storeId = window.magicDesign.storeId;
221
220
  if (!storeId) return [3
@@ -223,17 +222,15 @@ function (_super) {
223
222
  , 2];
224
223
  return [4
225
224
  /*yield*/
226
- , Promise.all([(0, _commonUtil.commonFetch)("/designer/v1/h5/store/detail/" + storeId, {}, 'GET'), (0, _commonUtil.commonFetch)('/designer/v1/h5/collection/store/check', {
227
- storeId: storeId
228
- })])];
225
+ , (0, _commonUtil.commonFetch)("/designer/v1/h5/store/detail/" + storeId, {}, 'GET')];
229
226
 
230
227
  case 1:
231
- _a = _b.sent(), res = _a[0], isFollow = _a[1];
228
+ storeDetailInfo = _a.sent();
232
229
  this.setState({
233
- storeInfo: res,
234
- isFollow: isFollow == 'Y'
230
+ storeInfo: storeDetailInfo,
231
+ isFollow: storeDetailInfo.userHasFollowed == 'Y'
235
232
  });
236
- _b.label = 2;
233
+ _a.label = 2;
237
234
 
238
235
  case 2:
239
236
  return [2
@@ -15,6 +15,8 @@ var _ImageConfig = _interopRequireDefault(require("../../../../../meta-comp/conf
15
15
 
16
16
  var _coreUtil = require("../../../../../utils/coreUtil");
17
17
 
18
+ var _TextConfig = _interopRequireDefault(require("../../../../../meta-comp/config-panels/TextConfig"));
19
+
18
20
  var _locale = require("../../../../../locale");
19
21
 
20
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -67,11 +69,9 @@ function (_super) {
67
69
  }
68
70
 
69
71
  SignBoardConfigContent.prototype.render = function () {
70
- var _this = this;
71
-
72
72
  var panelProps = this.props.panelProps;
73
73
  var source = [{
74
- key: 'search1',
74
+ key: 'logo',
75
75
  name: (0, _locale.i18n)('LOGO'),
76
76
  value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
77
77
  data: panelProps.logo
@@ -79,50 +79,12 @@ function (_super) {
79
79
  metaOption: panelProps.logo,
80
80
  toggleType: 'switch'
81
81
  }, {
82
- key: 'search2',
83
- name: (0, _locale.i18n)('SEARCH_BOX'),
84
- value: /*#__PURE__*/_react["default"].createElement(_common.Field, {
85
- style: {
86
- marginTop: 20
87
- },
88
- title: (0, _locale.i18n)('COLOR')
89
- }, /*#__PURE__*/_react["default"].createElement(_common.ColorPickerInput, {
90
- colorType: "rgba",
91
- onChange: function onChange(v) {
92
- if ((0, _coreUtil.isPc)()) {
93
- panelProps.box.color.pc = v;
94
- } else {
95
- panelProps.box.color.mobile = v;
96
- }
97
-
98
- _this.selfRender();
99
- },
100
- value: (0, _coreUtil.isPc)() ? panelProps.box.color.pc : panelProps.box.color.mobile
101
- })),
102
- metaOption: panelProps.box,
103
- toggleType: 'switch'
104
- }, {
105
- key: 'search3',
106
- name: (0, _locale.i18n)('ICON'),
107
- value: /*#__PURE__*/_react["default"].createElement(_common.Field, {
108
- style: {
109
- marginTop: 20
110
- },
111
- title: (0, _locale.i18n)('COLOR')
112
- }, /*#__PURE__*/_react["default"].createElement(_common.ColorPickerInput, {
113
- colorType: "rgba",
114
- onChange: function onChange(v) {
115
- if ((0, _coreUtil.isPc)()) {
116
- panelProps.icon.color.pc = v;
117
- } else {
118
- panelProps.icon.color.mobile = v;
119
- }
120
-
121
- _this.selfRender();
122
- },
123
- value: (0, _coreUtil.isPc)() ? panelProps.icon.color.pc : panelProps.icon.color.mobile
124
- })),
125
- metaOption: panelProps.icon,
82
+ key: 'title',
83
+ name: (0, _locale.i18n)('TITLE'),
84
+ value: /*#__PURE__*/_react["default"].createElement(_TextConfig["default"], {
85
+ data: panelProps.title
86
+ }),
87
+ metaOption: panelProps.title,
126
88
  toggleType: 'switch'
127
89
  }];
128
90
  return /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
@@ -7,6 +7,8 @@ exports["default"] = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
+ var _SignBoardConfigContent = _interopRequireDefault(require("./SignBoardConfigContent"));
11
+
10
12
  var _locale = require("../../../../locale");
11
13
 
12
14
  var _common = require("../../../../common");
@@ -57,8 +59,13 @@ function (_super) {
57
59
  return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
58
60
  divider: "bold",
59
61
  headerSize: "large",
60
- source: [// { key: 'signBoard1', name: i18n('CONTENT'), value: <SignBoardConfigContent panelProps={data.content} /> },
61
- {
62
+ source: [{
63
+ key: 'signBoard1',
64
+ name: (0, _locale.i18n)('CONTENT'),
65
+ value: /*#__PURE__*/_react["default"].createElement(_SignBoardConfigContent["default"], {
66
+ panelProps: data.content
67
+ })
68
+ }, {
62
69
  key: 'signBoard4',
63
70
  name: (0, _locale.i18n)('SPACING'),
64
71
  value: /*#__PURE__*/_react["default"].createElement(_SpacingConfig["default"], {
@@ -228,8 +228,8 @@ function (_super) {
228
228
  this.setState({
229
229
  intelligentType: type,
230
230
  intelligentValue: []
231
- });
232
- this.getTypeData(type);
231
+ }); // this.getTypeData(type);
232
+
233
233
  this.props.onChange({
234
234
  intelligentType: type,
235
235
  intelligentValue: []
@@ -255,7 +255,7 @@ function (_super) {
255
255
  ];
256
256
  return [4
257
257
  /*yield*/
258
- , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offercatgs/list")];
258
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/offercatgs/list")];
259
259
 
260
260
  case 1:
261
261
  res = _a.sent();
@@ -81,6 +81,18 @@ function (_super) {
81
81
 
82
82
  _this.state = {};
83
83
 
84
+ _this.hasSource = function (type) {
85
+ if (!window.systemParams || !window.systemParams.recommendSource) {
86
+ return true;
87
+ }
88
+
89
+ if (window.systemParams.recommendSource && window.systemParams.recommendSource.includes(type)) {
90
+ return true;
91
+ }
92
+
93
+ return false;
94
+ };
95
+
84
96
  _this.getContentPanel = function () {
85
97
  var panelProps = _this.props.panelProps;
86
98
 
@@ -95,9 +107,9 @@ function (_super) {
95
107
  _this.selfRender();
96
108
  },
97
109
  value: panelProps.sourceType
98
- }, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
110
+ }, _this.hasSource('P') && /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
99
111
  value: "select"
100
- }, (0, _locale.i18n)('SELECT_PRODUCT')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
112
+ }, (0, _locale.i18n)('SELECT_PRODUCT')), _this.hasSource('A') && /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
101
113
  value: "recommend"
102
114
  }, (0, _locale.i18n)('AI_RECOMMENDATION')))), /*#__PURE__*/_react["default"].createElement("div", {
103
115
  className: "greyBg"
@@ -57,7 +57,7 @@ function (_super) {
57
57
  };
58
58
 
59
59
  LeftTitle.defaultProps = {
60
- title: '邮件模板'
60
+ title: 'Email Template'
61
61
  };
62
62
  return LeftTitle;
63
63
  }(_react["default"].Component);
@@ -146,18 +146,30 @@ function (_super) {
146
146
  _this.props.quillRef.format('font', value);
147
147
  } else if (type == 'font-weight') {
148
148
  _this.props.quillRef.format('font-weight', value);
149
+ } else if (type == 'font-style') {
150
+ _this.props.quillRef.format('font-style', 'italic' === quillFormat['font-style'] ? '' : 'italic');
149
151
  } else if (type == 'font-family') {
150
152
  _this.props.quillRef.format('font-family', value);
151
153
  } else if (type == 'text-decoration-style') {
154
+ _this.props.quillRef.format('underline', true);
155
+
152
156
  _this.props.quillRef.format('text-decoration-style', value);
153
157
  } else if (type == 'bullet') {
154
158
  _this.props.quillRef.format('list-style-type', value);
155
159
 
156
- _this.props.quillRef.format('list', 'bullet');
160
+ if (value === quillFormat['list-style-type']) {
161
+ _this.props.quillRef.format('list', '');
162
+ } else {
163
+ _this.props.quillRef.format('list', 'bullet');
164
+ }
157
165
  } else if (type == 'ordered') {
158
166
  _this.props.quillRef.format('list-style-type', value);
159
167
 
160
- _this.props.quillRef.format('list', 'ordered');
168
+ if (value === quillFormat['list-style-type']) {
169
+ _this.props.quillRef.format('list', '');
170
+ } else {
171
+ _this.props.quillRef.format('list', 'ordered');
172
+ }
161
173
  } else if (type == 'text-decoration-color') {
162
174
  if (value) {
163
175
  _this.props.quillRef.format('underline', true);
@@ -269,9 +281,9 @@ function (_super) {
269
281
  }, /*#__PURE__*/_react["default"].createElement("div", {
270
282
  className: "tool-item"
271
283
  }, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
272
- active: quillFormat['italic'],
284
+ active: quillFormat['font-style'] === 'italic',
273
285
  onChange: function onChange() {
274
- _this.onToolBtnClick('italic');
286
+ _this.onToolBtnClick('font-style');
275
287
  },
276
288
  type: "italic"
277
289
  })), /*#__PURE__*/_react["default"].createElement("div", {
@@ -510,6 +510,9 @@ function (_super) {
510
510
  break;
511
511
 
512
512
  case _constants.quickMenuCode.SAVE:
513
+ /** 如果保存则重置为mobile,同一移动端截图 #10504010 */
514
+ _this.onSwitchDevice(_constants.deviceTypeMap.PHONE);
515
+
513
516
  onSave(handleParams);
514
517
  break;
515
518
 
@@ -78,18 +78,9 @@ var Renderer = function Renderer(props) {
78
78
  };
79
79
 
80
80
  (0, _react.useEffect)(function () {
81
- // const data = await fishFetch('/h5/ga/mediaid', {}, 'GET');
82
- (0, _commonUtil.importAsync)('https://www.googletagmanager.com/gtag/js?id=G-7B9GSSLVX3', 'js').then(function () {
83
- window.dataLayer = window.dataLayer || [];
84
-
85
- function gtag() {
86
- dataLayer.push(arguments);
87
- }
88
-
89
- gtag('js', new Date());
90
- gtag('config', 'G-7B9GSSLVX3');
91
- window.gtag = gtag;
92
- });
81
+ console.log('----pageData change', pageData);
82
+ }, [pageData]);
83
+ (0, _react.useEffect)(function () {
93
84
  setTimeout(function () {
94
85
  var _a;
95
86
 
@@ -103,6 +94,7 @@ var Renderer = function Renderer(props) {
103
94
  className: "render_wrap",
104
95
  magic_design: "",
105
96
  style: {
97
+ height: '100%',
106
98
  background: pageBackground,
107
99
  overflow: 'auto'
108
100
  }
@@ -27,6 +27,7 @@ Object.defineProperty(exports, "metaDecorator", {
27
27
  return _metaDecorator["default"];
28
28
  }
29
29
  });
30
+ exports.shouldUpdate = shouldUpdate;
30
31
  Object.defineProperty(exports, "updateConfigDecorator", {
31
32
  enumerable: true,
32
33
  get: function get() {
@@ -42,4 +43,26 @@ var _updateConfigDecorator = _interopRequireDefault(require("./updateConfigDecor
42
43
 
43
44
  var _lazyLoadDecorator = require("./lazyLoadDecorator");
44
45
 
45
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
46
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
47
+
48
+ /* eslint-disable @typescript-eslint/no-unused-expressions */
49
+
50
+ /** props 和 state 改变时才会render */
51
+ function shouldUpdate() {
52
+ return function (target, name, descriptor) {
53
+ var fn = descriptor.value;
54
+
55
+ descriptor.value = function (nextProps, nextState) {
56
+ var nowPropsJson = JSON.stringify(nextProps);
57
+ var nowStateJson = JSON.stringify(nextState);
58
+ var should1 = nowPropsJson != this.preProps;
59
+ var should2 = nowStateJson != this.preState;
60
+ this.preProps = nowPropsJson;
61
+ this.preState = nowStateJson;
62
+ var result = should1 || should2;
63
+ return result && fn.apply(this, {
64
+ nextProps: nextProps
65
+ });
66
+ };
67
+ };
68
+ }
@@ -54,7 +54,7 @@
54
54
  "ADD_CLICKABLE_AREA": "Add Clickable Area",
55
55
  "ADD_AREA": "Add Area",
56
56
  "CLICKABLE_AREA": "Clickable Area",
57
- "VOUCHER_SUCCESS": "Voucher received successfully!",
57
+ "VOUCHER_SUCCESS": "Coupon received successfully!",
58
58
  "NAVIGATION_NAME": "Navigation Name",
59
59
  "ADD_NAVIGATION": "Add Navigation",
60
60
  "SAVE": "Save",
@@ -54,7 +54,7 @@
54
54
  "ADD_CLICKABLE_AREA": "Add Clickable Area",
55
55
  "ADD_AREA": "Add Area",
56
56
  "CLICKABLE_AREA": "Clickable Area",
57
- "VOUCHER_SUCCESS": "Voucher received successfully!",
57
+ "VOUCHER_SUCCESS": "Coupon received successfully!",
58
58
  "NAVIGATION_NAME": "Navigation Name",
59
59
  "ADD_NAVIGATION": "Add Navigation",
60
60
  "SAVE": "Guardar",
@@ -54,7 +54,7 @@
54
54
  "ADD_CLICKABLE_AREA": "Add Clickable Area",
55
55
  "ADD_AREA": "Add Area",
56
56
  "CLICKABLE_AREA": "Clickable Area",
57
- "VOUCHER_SUCCESS": "Voucher received successfully!",
57
+ "VOUCHER_SUCCESS": "Coupon received successfully!",
58
58
  "NAVIGATION_NAME": "Navigation Name",
59
59
  "ADD_NAVIGATION": "Add Navigation",
60
60
  "SAVE": "Save",
@@ -93,6 +93,10 @@ function (_super) {
93
93
  return _this;
94
94
  }
95
95
 
96
+ Button.prototype.shouldComponentUpdate = function () {
97
+ return true;
98
+ };
99
+
96
100
  Button.prototype.render = function () {
97
101
  var _this = this;
98
102
 
@@ -168,6 +172,9 @@ function (_super) {
168
172
  className: '',
169
173
  readonly: false
170
174
  };
175
+
176
+ __decorate([(0, _decorator.shouldUpdate)()], Button.prototype, "shouldComponentUpdate", null);
177
+
171
178
  Button = __decorate([_decorator.metaDecorator], Button);
172
179
  return Button;
173
180
  }(_react.Component);
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.FontStyleAttributor = exports.FontStyle = void 0;
7
+
8
+ var _quill = _interopRequireDefault(require("quill"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+
12
+ var __extends = void 0 && (void 0).__extends || function () {
13
+ var _extendStatics = function extendStatics(d, b) {
14
+ _extendStatics = Object.setPrototypeOf || {
15
+ __proto__: []
16
+ } instanceof Array && function (d, b) {
17
+ d.__proto__ = b;
18
+ } || function (d, b) {
19
+ for (var p in b) {
20
+ if (b.hasOwnProperty(p)) d[p] = b[p];
21
+ }
22
+ };
23
+
24
+ return _extendStatics(d, b);
25
+ };
26
+
27
+ return function (d, b) {
28
+ _extendStatics(d, b);
29
+
30
+ function __() {
31
+ this.constructor = d;
32
+ }
33
+
34
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
35
+ };
36
+ }();
37
+
38
+ var Parchment = _quill["default"]["import"]('parchment');
39
+
40
+ var FontStyleAttributor =
41
+ /** @class */
42
+ function (_super) {
43
+ __extends(FontStyleAttributor, _super);
44
+
45
+ function FontStyleAttributor() {
46
+ return _super !== null && _super.apply(this, arguments) || this;
47
+ }
48
+
49
+ return FontStyleAttributor;
50
+ }(Parchment.Attributor.Style);
51
+
52
+ exports.FontStyleAttributor = FontStyleAttributor;
53
+ var FontStyle = new FontStyleAttributor('font-style', 'font-style', {
54
+ scope: Parchment.Scope.INLINE
55
+ });
56
+ exports.FontStyle = FontStyle;
57
+
58
+ _quill["default"].register('formats/font-style', FontStyle, true);
@@ -17,6 +17,8 @@ require("./formats/fontFamily");
17
17
 
18
18
  require("./formats/textDecorationColor");
19
19
 
20
+ require("./formats/fontStyle");
21
+
20
22
  require("./formats/listStyleTypeStyle");
21
23
 
22
24
  require("./formats/textDecorationStyle");
@@ -203,6 +205,10 @@ function (_super) {
203
205
  });
204
206
  };
205
207
 
208
+ Text.prototype.shouldComponentUpdate = function () {
209
+ return true;
210
+ };
211
+
206
212
  Text.prototype.render = function () {
207
213
  var _a = this.props,
208
214
  data = _a.data,
@@ -272,6 +278,9 @@ function (_super) {
272
278
  readonly: false,
273
279
  onTextInput: function onTextInput() {}
274
280
  };
281
+
282
+ __decorate([(0, _decorator.shouldUpdate)()], Text.prototype, "shouldComponentUpdate", null);
283
+
275
284
  Text = __decorate([_decorator.metaDecorator], Text);
276
285
  return Text;
277
286
  }(_react["default"].Component);