@fonixtree/magic-design 2.0.198 → 2.0.202

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 (139) hide show
  1. package/es/assets/fonts/Montserrat-Bold.ttf +0 -0
  2. package/es/assets/fonts/Montserrat-Medium.ttf +0 -0
  3. package/es/assets/fonts/Montserrat-Regular.ttf +0 -0
  4. package/es/assets/fonts/Montserrat-SemiBold.ttf +0 -0
  5. package/es/assets/fonts/magic-box-iconfont.css +14 -6
  6. package/es/assets/fonts/magic-box-iconfont.js +1 -1
  7. package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
  8. package/es/assets/fonts/magic-box-iconfont.woff +0 -0
  9. package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
  10. package/es/assets/images/base64/index.js +8 -2
  11. package/es/common/ColorPickerInput/index.less +2 -0
  12. package/es/common/ErrorBoundary/index.js +90 -0
  13. package/es/common/FontStyles/index.less +1 -1
  14. package/es/common/index.js +8 -0
  15. package/es/composite-comp/common/components/ImageLabel/index.js +2 -2
  16. package/es/composite-comp/common/components/ImageLabel/index.less +23 -7
  17. package/es/composite-comp/common/components/ProductItem/index.js +34 -24
  18. package/es/composite-comp/common/components/ProductItem/index.less +10 -15
  19. package/es/composite-comp/common/config-panels/BackgroundConfig/index.js +65 -3
  20. package/es/composite-comp/dito/components/Bargain/defaultJSON.js +24 -0
  21. package/es/composite-comp/dito/components/FlashDeal/defaultJSON.js +24 -0
  22. package/es/composite-comp/dito/components/FlashDeal/mobile/index.less +9 -1
  23. package/es/composite-comp/dito/components/GroupBuy/defaultJSON.js +24 -0
  24. package/es/composite-comp/dito/components/GroupBuy/mobile/index.js +8 -5
  25. package/es/composite-comp/dito/components/PersonalInformation/defaultJSON.js +19 -0
  26. package/es/composite-comp/dito/components/PersonalInformation/mobile/images/avatar.png +0 -0
  27. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.js +12 -6
  28. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.less +8 -1
  29. package/es/composite-comp/dito/components/Recommend/defaultJSON.js +55 -1
  30. package/es/composite-comp/dito/components/Recommend/mobile/imgs/card.png +0 -0
  31. package/es/composite-comp/dito/components/Recommend/mobile/index.js +47 -6
  32. package/es/composite-comp/dito/components/Recommend/mobile/index.less +24 -1
  33. package/es/composite-comp/dito/components/SearchBanner/defaultJSON.js +234 -0
  34. package/es/composite-comp/dito/components/SearchBanner/imgs/defaultImg.png +0 -0
  35. package/es/composite-comp/dito/components/SearchBanner/imgs/pcDefImg1.png +0 -0
  36. package/es/composite-comp/dito/components/SearchBanner/index.js +108 -0
  37. package/es/composite-comp/dito/components/SearchBanner/mobile/index.js +301 -0
  38. package/es/composite-comp/dito/components/SearchBanner/mobile/index.less +108 -0
  39. package/es/composite-comp/dito/components/SignBoard/mobile/index.js +1 -1
  40. package/es/composite-comp/dito/config-panels/BargainConfig/FlashDealConfigContent/index.js +7 -0
  41. package/es/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.js +7 -0
  42. package/es/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.js +7 -0
  43. package/es/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigDecoration/index.js +91 -0
  44. package/es/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigDecoration/index.less +9 -0
  45. package/es/composite-comp/dito/config-panels/PersonalInformationConfig/index.js +10 -2
  46. package/es/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigContent/index.js +17 -1
  47. package/es/composite-comp/dito/config-panels/RecommendConfig/index.js +1 -0
  48. package/es/composite-comp/dito/config-panels/SearchBannerConfig/ConfigContent/index.js +197 -0
  49. package/es/composite-comp/dito/config-panels/SearchBannerConfig/ConfigContent/index.less +7 -0
  50. package/es/composite-comp/dito/config-panels/SearchBannerConfig/ConfigImageGroup/index.js +148 -0
  51. package/es/composite-comp/dito/config-panels/SearchBannerConfig/ConfigImageGroup/index.less +0 -0
  52. package/es/composite-comp/dito/config-panels/SearchBannerConfig/ConfigSetting/index.js +226 -0
  53. package/es/composite-comp/dito/config-panels/SearchBannerConfig/ConfigSetting/index.less +9 -0
  54. package/es/composite-comp/dito/config-panels/SearchBannerConfig/imgs/defaultImg.png +0 -0
  55. package/es/composite-comp/dito/config-panels/SearchBannerConfig/index.js +65 -0
  56. package/es/composite-comp/dito/second-config-panels/SearchBannerSecondConfig/index.js +98 -0
  57. package/es/composite-comp/nuri/components/AffiliateRecommend/mobile/index.js +1 -1
  58. package/es/composite-comp/nuri/components/AffiliateRecommend/mobile/index.less +15 -15
  59. package/es/composite-comp/public/components/Stores/mobile/StoreItem/index.js +7 -2
  60. package/es/composite-comp/public/components/Stores/mobile/index.less +3 -0
  61. package/es/constants/component-types.js +9 -3
  62. package/es/constants/index.js +4 -0
  63. package/es/core/Designer/ConfigPanel/index.js +1 -0
  64. package/es/core/Designer/index.js +2 -2
  65. package/es/decorator/compositeDecorator.js +9 -3
  66. package/es/locale/ar/ar.json +7 -0
  67. package/es/locale/en/en.json +7 -0
  68. package/es/locale/es/es.json +7 -0
  69. package/es/locale/mn/mn.json +4 -0
  70. package/lib/assets/fonts/Montserrat-Bold.ttf +0 -0
  71. package/lib/assets/fonts/Montserrat-Medium.ttf +0 -0
  72. package/lib/assets/fonts/Montserrat-Regular.ttf +0 -0
  73. package/lib/assets/fonts/Montserrat-SemiBold.ttf +0 -0
  74. package/lib/assets/fonts/magic-box-iconfont.css +14 -6
  75. package/lib/assets/fonts/magic-box-iconfont.js +1 -1
  76. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  77. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  78. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  79. package/lib/assets/images/base64/index.js +8 -2
  80. package/lib/common/ColorPickerInput/index.less +2 -0
  81. package/lib/common/ErrorBoundary/index.js +90 -0
  82. package/lib/common/FontStyles/index.less +1 -1
  83. package/lib/common/index.js +8 -0
  84. package/lib/composite-comp/common/components/ImageLabel/index.js +2 -2
  85. package/lib/composite-comp/common/components/ImageLabel/index.less +23 -7
  86. package/lib/composite-comp/common/components/ProductItem/index.js +34 -24
  87. package/lib/composite-comp/common/components/ProductItem/index.less +10 -15
  88. package/lib/composite-comp/common/config-panels/BackgroundConfig/index.js +65 -3
  89. package/lib/composite-comp/dito/components/Bargain/defaultJSON.js +24 -0
  90. package/lib/composite-comp/dito/components/FlashDeal/defaultJSON.js +24 -0
  91. package/lib/composite-comp/dito/components/FlashDeal/mobile/index.less +9 -1
  92. package/lib/composite-comp/dito/components/GroupBuy/defaultJSON.js +24 -0
  93. package/lib/composite-comp/dito/components/GroupBuy/mobile/index.js +8 -5
  94. package/lib/composite-comp/dito/components/PersonalInformation/defaultJSON.js +19 -0
  95. package/lib/composite-comp/dito/components/PersonalInformation/mobile/images/avatar.png +0 -0
  96. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.js +12 -6
  97. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.less +8 -1
  98. package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +55 -1
  99. package/lib/composite-comp/dito/components/Recommend/mobile/imgs/card.png +0 -0
  100. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +47 -6
  101. package/lib/composite-comp/dito/components/Recommend/mobile/index.less +24 -1
  102. package/lib/composite-comp/dito/components/SearchBanner/defaultJSON.js +234 -0
  103. package/lib/composite-comp/dito/components/SearchBanner/imgs/defaultImg.png +0 -0
  104. package/lib/composite-comp/dito/components/SearchBanner/imgs/pcDefImg1.png +0 -0
  105. package/lib/composite-comp/dito/components/SearchBanner/index.js +108 -0
  106. package/lib/composite-comp/dito/components/SearchBanner/mobile/index.js +301 -0
  107. package/lib/composite-comp/dito/components/SearchBanner/mobile/index.less +108 -0
  108. package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +1 -1
  109. package/lib/composite-comp/dito/config-panels/BargainConfig/FlashDealConfigContent/index.js +7 -0
  110. package/lib/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.js +7 -0
  111. package/lib/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.js +7 -0
  112. package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigDecoration/index.js +91 -0
  113. package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigDecoration/index.less +9 -0
  114. package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/index.js +10 -2
  115. package/lib/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigContent/index.js +17 -1
  116. package/lib/composite-comp/dito/config-panels/RecommendConfig/index.js +1 -0
  117. package/lib/composite-comp/dito/config-panels/SearchBannerConfig/ConfigContent/index.js +197 -0
  118. package/lib/composite-comp/dito/config-panels/SearchBannerConfig/ConfigContent/index.less +7 -0
  119. package/lib/composite-comp/dito/config-panels/SearchBannerConfig/ConfigImageGroup/index.js +148 -0
  120. package/lib/composite-comp/dito/config-panels/SearchBannerConfig/ConfigImageGroup/index.less +0 -0
  121. package/lib/composite-comp/dito/config-panels/SearchBannerConfig/ConfigSetting/index.js +226 -0
  122. package/lib/composite-comp/dito/config-panels/SearchBannerConfig/ConfigSetting/index.less +9 -0
  123. package/lib/composite-comp/dito/config-panels/SearchBannerConfig/imgs/defaultImg.png +0 -0
  124. package/lib/composite-comp/dito/config-panels/SearchBannerConfig/index.js +65 -0
  125. package/lib/composite-comp/dito/second-config-panels/SearchBannerSecondConfig/index.js +98 -0
  126. package/lib/composite-comp/nuri/components/AffiliateRecommend/mobile/index.js +1 -1
  127. package/lib/composite-comp/nuri/components/AffiliateRecommend/mobile/index.less +15 -15
  128. package/lib/composite-comp/public/components/Stores/mobile/StoreItem/index.js +7 -2
  129. package/lib/composite-comp/public/components/Stores/mobile/index.less +3 -0
  130. package/lib/constants/component-types.js +9 -3
  131. package/lib/constants/index.js +4 -0
  132. package/lib/core/Designer/ConfigPanel/index.js +1 -0
  133. package/lib/core/Designer/index.js +2 -2
  134. package/lib/decorator/compositeDecorator.js +9 -3
  135. package/lib/locale/ar/ar.json +7 -0
  136. package/lib/locale/en/en.json +7 -0
  137. package/lib/locale/es/es.json +7 -0
  138. package/lib/locale/mn/mn.json +4 -0
  139. package/package.json +1 -1
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = Config;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _ConfigImageGroup = _interopRequireDefault(require("./ConfigImageGroup"));
11
+
12
+ var _ConfigContent = _interopRequireDefault(require("./ConfigContent"));
13
+
14
+ var _ConfigSetting = _interopRequireDefault(require("./ConfigSetting"));
15
+
16
+ var _Collapse = _interopRequireDefault(require("../../../../common/Collapse"));
17
+
18
+ var _SpacingConfig = _interopRequireDefault(require("../../../common/config-panels/SpacingConfig"));
19
+
20
+ var _BackgroundConfig = _interopRequireDefault(require("../../../common/config-panels/BackgroundConfig"));
21
+
22
+ var _locale = require("../../../../locale");
23
+
24
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
+
26
+ function Config(props) {
27
+ var data = props.data;
28
+ return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
29
+ divider: "bold",
30
+ headerSize: "large",
31
+ source: [{
32
+ key: '1',
33
+ name: (0, _locale.i18n)('CONTENT'),
34
+ value: /*#__PURE__*/_react["default"].createElement(_ConfigContent["default"], {
35
+ panelProps: data.content
36
+ })
37
+ }, {
38
+ key: '2',
39
+ name: (0, _locale.i18n)('GROUP'),
40
+ value: /*#__PURE__*/_react["default"].createElement(_ConfigImageGroup["default"], {
41
+ id: data.id,
42
+ source: data.groupSource
43
+ })
44
+ }, {
45
+ key: '3',
46
+ name: (0, _locale.i18n)('SETTING'),
47
+ value: /*#__PURE__*/_react["default"].createElement(_ConfigSetting["default"], {
48
+ setting: data.setting
49
+ })
50
+ }, {
51
+ key: '4',
52
+ name: (0, _locale.i18n)('SPACING'),
53
+ value: /*#__PURE__*/_react["default"].createElement(_SpacingConfig["default"], {
54
+ data: data.spacing
55
+ })
56
+ }, {
57
+ key: '5',
58
+ name: (0, _locale.i18n)('BACKGROUND'),
59
+ value: /*#__PURE__*/_react["default"].createElement(_BackgroundConfig["default"], {
60
+ data: data.background
61
+ })
62
+ }],
63
+ type: "triangle"
64
+ }));
65
+ }
@@ -0,0 +1,98 @@
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 _coreUtil = require("../../../../utils/coreUtil");
11
+
12
+ var _Collapse = _interopRequireDefault(require("../../../../common/Collapse"));
13
+
14
+ var _ImageConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/ImageConfig"));
15
+
16
+ var _locale = require("../../../../locale");
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
+
20
+ var __extends = void 0 && (void 0).__extends || function () {
21
+ var _extendStatics = function extendStatics(d, b) {
22
+ _extendStatics = Object.setPrototypeOf || {
23
+ __proto__: []
24
+ } instanceof Array && function (d, b) {
25
+ d.__proto__ = b;
26
+ } || function (d, b) {
27
+ for (var p in b) {
28
+ if (b.hasOwnProperty(p)) d[p] = b[p];
29
+ }
30
+ };
31
+
32
+ return _extendStatics(d, b);
33
+ };
34
+
35
+ return function (d, b) {
36
+ _extendStatics(d, b);
37
+
38
+ function __() {
39
+ this.constructor = d;
40
+ }
41
+
42
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
43
+ };
44
+ }();
45
+
46
+ var SearchBannerSecondConfig =
47
+ /** @class */
48
+ function (_super) {
49
+ __extends(SearchBannerSecondConfig, _super);
50
+
51
+ function SearchBannerSecondConfig() {
52
+ var _this = _super !== null && _super.apply(this, arguments) || this;
53
+
54
+ _this.state = {};
55
+ return _this;
56
+ }
57
+
58
+ SearchBannerSecondConfig.prototype.render = function () {
59
+ var panelProps = this.props.panelProps;
60
+
61
+ var getConfig = function getConfig() {
62
+ return /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
63
+ headerSize: "middle",
64
+ onRefresh: function onRefresh() {
65
+ return (0, _coreUtil.renderPreview)();
66
+ },
67
+ source: [{
68
+ key: panelProps.image.id,
69
+ name: (0, _locale.i18n)('IMAGE'),
70
+ value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
71
+ data: panelProps.image
72
+ }),
73
+ metaOption: panelProps.image
74
+ }]
75
+ });
76
+ };
77
+
78
+ return /*#__PURE__*/_react["default"].createElement("div", {
79
+ className: "search_banner_second_conf_wrap"
80
+ }, /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
81
+ divider: "bold",
82
+ headerSize: "large",
83
+ source: [{
84
+ key: '1',
85
+ name: (0, _locale.i18n)('CONTENT'),
86
+ value: getConfig()
87
+ }]
88
+ }));
89
+ };
90
+
91
+ SearchBannerSecondConfig.defaultProps = {
92
+ panelProps: {}
93
+ };
94
+ return SearchBannerSecondConfig;
95
+ }(_react["default"].Component);
96
+
97
+ var _default = SearchBannerSecondConfig;
98
+ exports["default"] = _default;
@@ -553,7 +553,7 @@ function (_super) {
553
553
  if (layout === 'layout1' && contentWidth) imgHeight = (contentWidth - 12) / 2;
554
554
  if (layout === 'layout3' && contentWidth) imgHeight = (contentWidth - 12 * 2) / 3;
555
555
  return /*#__PURE__*/_react["default"].createElement("div", {
556
- className: "m-recommend-mobile recommend_" + panelProps.id
556
+ className: "m-affiliate-recommend-mobile recommend_" + panelProps.id
557
557
  }, !hideTabs && /*#__PURE__*/_react["default"].createElement("div", {
558
558
  className: "tab-select-wrap"
559
559
  }, groupSource.map(function (tab, index) {
@@ -1,16 +1,16 @@
1
- .m-recommend-mobile {
1
+ .m-affiliate-recommend-mobile {
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  }
5
- .m-recommend-mobile .cylon-tabs-nav-operations {
5
+ .m-affiliate-recommend-mobile .cylon-tabs-nav-operations {
6
6
  display: none !important;
7
7
  }
8
- .m-recommend-mobile ::-webkit-scrollbar {
8
+ .m-affiliate-recommend-mobile ::-webkit-scrollbar {
9
9
  width: 0;
10
10
  height: 0;
11
11
  display: none;
12
12
  }
13
- .m-recommend-mobile .tab-select-wrap {
13
+ .m-affiliate-recommend-mobile .tab-select-wrap {
14
14
  display: flex;
15
15
  align-items: center;
16
16
  height: 1rem;
@@ -19,7 +19,7 @@
19
19
  position: relative;
20
20
  margin-bottom: 0.3rem;
21
21
  }
22
- .m-recommend-mobile .tab-select-wrap .tabTitle {
22
+ .m-affiliate-recommend-mobile .tab-select-wrap .tabTitle {
23
23
  display: flex;
24
24
  align-items: center;
25
25
  text-align: center;
@@ -30,12 +30,12 @@
30
30
  white-space: nowrap;
31
31
  flex-direction: column;
32
32
  }
33
- .m-recommend-mobile .tab-select-wrap .tabTitle img {
33
+ .m-affiliate-recommend-mobile .tab-select-wrap .tabTitle img {
34
34
  height: 0.4rem;
35
35
  width: 0.4rem;
36
36
  margin-bottom: 0.04rem;
37
37
  }
38
- .m-recommend-mobile .tab-select-wrap .active-line {
38
+ .m-affiliate-recommend-mobile .tab-select-wrap .active-line {
39
39
  position: absolute;
40
40
  bottom: 0;
41
41
  width: 4rem;
@@ -44,11 +44,11 @@
44
44
  transition: 0.2s all linear;
45
45
  border-radius: 0.03rem;
46
46
  }
47
- .m-recommend-mobile .macyContainer {
47
+ .m-affiliate-recommend-mobile .macyContainer {
48
48
  display: flex;
49
49
  margin: 0 0.32rem;
50
50
  }
51
- .m-recommend-mobile .scrollContainer {
51
+ .m-affiliate-recommend-mobile .scrollContainer {
52
52
  display: flex;
53
53
  flex-direction: row;
54
54
  align-items: center;
@@ -56,26 +56,26 @@
56
56
  overflow-x: auto;
57
57
  padding-bottom: 0.3rem;
58
58
  }
59
- .m-recommend-mobile .scrollContainer.pl_140 {
59
+ .m-affiliate-recommend-mobile .scrollContainer.pl_140 {
60
60
  padding-left: 2.8rem;
61
61
  }
62
- .m-recommend-mobile .scrollContainer .scrollProductList {
62
+ .m-affiliate-recommend-mobile .scrollContainer .scrollProductList {
63
63
  display: flex;
64
64
  flex-direction: row;
65
65
  align-items: flex-start;
66
66
  }
67
- .m-recommend-mobile .scrollContainer .scrollProductList .productCard {
67
+ .m-affiliate-recommend-mobile .scrollContainer .scrollProductList .productCard {
68
68
  margin-right: 0.24rem;
69
69
  }
70
- .m-recommend-mobile .scrollContainer .scrollProductListRow {
70
+ .m-affiliate-recommend-mobile .scrollContainer .scrollProductListRow {
71
71
  display: flex;
72
72
  flex-direction: row;
73
73
  align-items: flex-start;
74
74
  }
75
- .m-recommend-mobile .scrollContainer .scrollProductListRow .productCardRow {
75
+ .m-affiliate-recommend-mobile .scrollContainer .scrollProductListRow .productCardRow {
76
76
  margin-right: 0.16rem;
77
77
  }
78
- .m-recommend-mobile .btnSeeAll {
78
+ .m-affiliate-recommend-mobile .btnSeeAll {
79
79
  display: block;
80
80
  width: fit-content;
81
81
  min-width: 1.6rem;
@@ -93,6 +93,11 @@ function (_super) {
93
93
  var _this = _super !== null && _super.apply(this, arguments) || this;
94
94
 
95
95
  _this.state = {};
96
+
97
+ _this.formatDistance = function (val) {
98
+ return (Number(val) / 1000).toFixed(2).replace(/(\.0+|0+)$/, '');
99
+ };
100
+
96
101
  return _this;
97
102
  }
98
103
 
@@ -172,7 +177,7 @@ function (_super) {
172
177
  }), distance.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
173
178
  className: "distance",
174
179
  data: __assign(__assign({}, distance), {
175
- text: (data.distance || 0) + " " + (0, _locale.i18n)('KM')
180
+ text: this.formatDistance(data.distance) + " " + (0, _locale.i18n)('KM')
176
181
  }),
177
182
  readonly: true
178
183
  })))) : /*#__PURE__*/_react["default"].createElement("div", _extends({
@@ -244,7 +249,7 @@ function (_super) {
244
249
  }), distance.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
245
250
  className: "distance",
246
251
  data: __assign(__assign({}, distance), {
247
- text: (data.distance || 0) + " " + (0, _locale.i18n)('KM')
252
+ text: this.formatDistance(data.distance) + " " + (0, _locale.i18n)('KM')
248
253
  }),
249
254
  readonly: true
250
255
  })))));
@@ -31,3 +31,6 @@
31
31
  margin-right: 0;
32
32
  margin-left: 0.32rem;
33
33
  }
34
+ .m-stores-mobile.reversed-layout .m-store-item-wrap .content-wrap .score {
35
+ margin-left: 0;
36
+ }
@@ -59,6 +59,8 @@ var _CommonFunctions = _interopRequireDefault(require("../composite-comp/dito/co
59
59
 
60
60
  var _Bargain = _interopRequireDefault(require("../composite-comp/dito/components/Bargain"));
61
61
 
62
+ var _SearchBanner = _interopRequireDefault(require("../composite-comp/dito/components/SearchBanner"));
63
+
62
64
  var _MonpayRecommend = _interopRequireDefault(require("../composite-comp/monpay/components/MonpayRecommend"));
63
65
 
64
66
  var _MonpayFlashDeal = _interopRequireDefault(require("../composite-comp/monpay/components/MonpayFlashDeal"));
@@ -131,6 +133,8 @@ var _CommonFunctionsConfig = _interopRequireDefault(require("../composite-comp/d
131
133
 
132
134
  var _BargainConfig = _interopRequireDefault(require("../composite-comp/dito/config-panels/BargainConfig"));
133
135
 
136
+ var _SearchBannerConfig = _interopRequireDefault(require("../composite-comp/dito/config-panels/SearchBannerConfig"));
137
+
134
138
  var _MonpayRecommendConfig = _interopRequireDefault(require("../composite-comp/monpay/config-panels/MonpayRecommendConfig"));
135
139
 
136
140
  var _MonpayFlashDealConfig = _interopRequireDefault(require("../composite-comp/monpay/config-panels/MonpayFlashDealConfig"));
@@ -187,6 +191,8 @@ var _OrdersSecondConfig = _interopRequireDefault(require("../composite-comp/dito
187
191
 
188
192
  var _CommonFunctionsSecondConfig = _interopRequireDefault(require("../composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig"));
189
193
 
194
+ var _SearchBannerSecondConfig = _interopRequireDefault(require("../composite-comp/dito/second-config-panels/SearchBannerSecondConfig"));
195
+
190
196
  var _MonpayRecommendSecondConfig = _interopRequireDefault(require("../composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig"));
191
197
 
192
198
  var _WalletSecondConfig = _interopRequireDefault(require("../composite-comp/public/second-config-panels/WalletSecondConfig"));
@@ -199,17 +205,17 @@ var _a, _b, _c; // 组件
199
205
  /**
200
206
  * 渲染组件索引
201
207
  */
202
- var componentMap = (_a = {}, _a[_Banner["default"].type] = _Banner["default"], _a[_Video["default"].type] = _Video["default"], _a[_Text["default"].type] = _Text["default"], _a[_FlashDeal["default"].type] = _FlashDeal["default"], _a[_MonpayFlashDeal["default"].type] = _MonpayFlashDeal["default"], _a[_GroupBuy["default"].type] = _GroupBuy["default"], _a[_SearchBar["default"].type] = _SearchBar["default"], _a[_SignBoard["default"].type] = _SignBoard["default"], _a[_MenuNavigation["default"].type] = _MenuNavigation["default"], _a[_HeadNavigation["default"].type] = _HeadNavigation["default"], _a[_PersonalInformation["default"].type] = _PersonalInformation["default"], _a[_Orders["default"].type] = _Orders["default"], _a[_CommonFunctions["default"].type] = _CommonFunctions["default"], _a[_ImageText["default"].type] = _ImageText["default"], _a[_Recommend["default"].type] = _Recommend["default"], _a[_AffiliateRecommend["default"].type] = _AffiliateRecommend["default"], _a[_MonpayRecommend["default"].type] = _MonpayRecommend["default"], _a[_InterestProducts["default"].type] = _InterestProducts["default"], _a[_Bundle["default"].type] = _Bundle["default"], _a[_MerchantSales["default"].type] = _MerchantSales["default"], _a[_MobileNavigation["default"].type] = _MobileNavigation["default"], _a[_PcNavigation["default"].type] = _PcNavigation["default"], _a[_Divider["default"].type] = _Divider["default"], _a[_ImageGallery["default"].type] = _ImageGallery["default"], _a[_Newsletter["default"].type] = _Newsletter["default"], _a[_Carousel["default"].type] = _Carousel["default"], _a[_Button["default"].type] = _Button["default"], _a[_Tag["default"].type] = _Tag["default"], _a[_WalletAshita["default"].type] = _WalletAshita["default"], _a[_WalletNuri["default"].type] = _WalletNuri["default"], _a[_Wallet["default"].type] = _Wallet["default"], _a[_CustomCode["default"].type] = _CustomCode["default"], _a[_Location["default"].type] = _Location["default"], _a[_Stores["default"].type] = _Stores["default"], _a[_Bargain["default"].type] = _Bargain["default"], _a[_MonpaySignBoard["default"].type] = _MonpaySignBoard["default"], _a);
208
+ var componentMap = (_a = {}, _a[_Banner["default"].type] = _Banner["default"], _a[_Video["default"].type] = _Video["default"], _a[_Text["default"].type] = _Text["default"], _a[_FlashDeal["default"].type] = _FlashDeal["default"], _a[_MonpayFlashDeal["default"].type] = _MonpayFlashDeal["default"], _a[_GroupBuy["default"].type] = _GroupBuy["default"], _a[_SearchBar["default"].type] = _SearchBar["default"], _a[_SignBoard["default"].type] = _SignBoard["default"], _a[_MenuNavigation["default"].type] = _MenuNavigation["default"], _a[_HeadNavigation["default"].type] = _HeadNavigation["default"], _a[_PersonalInformation["default"].type] = _PersonalInformation["default"], _a[_Orders["default"].type] = _Orders["default"], _a[_CommonFunctions["default"].type] = _CommonFunctions["default"], _a[_ImageText["default"].type] = _ImageText["default"], _a[_Recommend["default"].type] = _Recommend["default"], _a[_AffiliateRecommend["default"].type] = _AffiliateRecommend["default"], _a[_MonpayRecommend["default"].type] = _MonpayRecommend["default"], _a[_InterestProducts["default"].type] = _InterestProducts["default"], _a[_Bundle["default"].type] = _Bundle["default"], _a[_MerchantSales["default"].type] = _MerchantSales["default"], _a[_MobileNavigation["default"].type] = _MobileNavigation["default"], _a[_PcNavigation["default"].type] = _PcNavigation["default"], _a[_Divider["default"].type] = _Divider["default"], _a[_ImageGallery["default"].type] = _ImageGallery["default"], _a[_Newsletter["default"].type] = _Newsletter["default"], _a[_Carousel["default"].type] = _Carousel["default"], _a[_Button["default"].type] = _Button["default"], _a[_Tag["default"].type] = _Tag["default"], _a[_WalletAshita["default"].type] = _WalletAshita["default"], _a[_WalletNuri["default"].type] = _WalletNuri["default"], _a[_Wallet["default"].type] = _Wallet["default"], _a[_CustomCode["default"].type] = _CustomCode["default"], _a[_Location["default"].type] = _Location["default"], _a[_Stores["default"].type] = _Stores["default"], _a[_Bargain["default"].type] = _Bargain["default"], _a[_MonpaySignBoard["default"].type] = _MonpaySignBoard["default"], _a[_SearchBanner["default"].type] = _SearchBanner["default"], _a);
203
209
  /**
204
210
  * 一级配置面板索引
205
211
  */
206
212
 
207
213
  exports.componentMap = componentMap;
208
- var configPanelMap = (_b = {}, _b[_Banner["default"].type] = _BannerConfig["default"], _b[_Video["default"].type] = _VideoConfig["default"], _b[_Text["default"].type] = _TextCompConfig["default"], _b[_FlashDeal["default"].type] = _FlashDealConfig["default"], _b[_MonpayFlashDeal["default"].type] = _MonpayFlashDealConfig["default"], _b[_GroupBuy["default"].type] = _GroupBuyConfig["default"], _b[_SearchBar["default"].type] = _SearchBarConfig["default"], _b[_SignBoard["default"].type] = _SignBoardConfig["default"], _b[_MenuNavigation["default"].type] = _MenuNavigationConfig["default"], _b[_HeadNavigation["default"].type] = _HeadNavigationConfig["default"], _b[_PersonalInformation["default"].type] = _PersonalInformationConfig["default"], _b[_Orders["default"].type] = _OrdersConfig["default"], _b[_CommonFunctions["default"].type] = _CommonFunctionsConfig["default"], _b[_ImageText["default"].type] = _ImageTextConfig["default"], _b[_Recommend["default"].type] = _RecommendConfig["default"], _b[_AffiliateRecommend["default"].type] = _AffiliateRecommendConfig["default"], _b[_MonpayRecommend["default"].type] = _MonpayRecommendConfig["default"], _b[_InterestProducts["default"].type] = _InterestProductsConfig["default"], _b[_Bundle["default"].type] = _BundleConfig["default"], _b[_MerchantSales["default"].type] = _MerchantSalesConfig["default"], _b[_MobileNavigation["default"].type] = _MobileNavigationConfig["default"], _b[_PcNavigation["default"].type] = _PcNavigationConfig["default"], _b[_Divider["default"].type] = _DividerConfig["default"], _b[_ImageGallery["default"].type] = _ImageGalleryConfig["default"], _b[_Newsletter["default"].type] = _NewsletterConfig["default"], _b[_Carousel["default"].type] = _CarouselConfig["default"], _b[_Button["default"].type] = _ButtonCompConfig["default"], _b[_Tag["default"].type] = _TagCompConfig["default"], _b[_WalletAshita["default"].type] = _WalletAshitaConfig["default"], _b[_WalletNuri["default"].type] = _WalletNuriConfig["default"], _b[_Wallet["default"].type] = _WalletConfig["default"], _b[_CustomCode["default"].type] = _CustomCodeConfig["default"], _b[_Location["default"].type] = _LocationConfig["default"], _b[_Stores["default"].type] = _StoresConfig["default"], _b[_Bargain["default"].type] = _BargainConfig["default"], _b[_MonpaySignBoard["default"].type] = _MonpaySignBoardConfig["default"], _b);
214
+ var configPanelMap = (_b = {}, _b[_Banner["default"].type] = _BannerConfig["default"], _b[_Video["default"].type] = _VideoConfig["default"], _b[_Text["default"].type] = _TextCompConfig["default"], _b[_FlashDeal["default"].type] = _FlashDealConfig["default"], _b[_MonpayFlashDeal["default"].type] = _MonpayFlashDealConfig["default"], _b[_GroupBuy["default"].type] = _GroupBuyConfig["default"], _b[_SearchBar["default"].type] = _SearchBarConfig["default"], _b[_SignBoard["default"].type] = _SignBoardConfig["default"], _b[_MenuNavigation["default"].type] = _MenuNavigationConfig["default"], _b[_HeadNavigation["default"].type] = _HeadNavigationConfig["default"], _b[_PersonalInformation["default"].type] = _PersonalInformationConfig["default"], _b[_Orders["default"].type] = _OrdersConfig["default"], _b[_CommonFunctions["default"].type] = _CommonFunctionsConfig["default"], _b[_ImageText["default"].type] = _ImageTextConfig["default"], _b[_Recommend["default"].type] = _RecommendConfig["default"], _b[_AffiliateRecommend["default"].type] = _AffiliateRecommendConfig["default"], _b[_MonpayRecommend["default"].type] = _MonpayRecommendConfig["default"], _b[_InterestProducts["default"].type] = _InterestProductsConfig["default"], _b[_Bundle["default"].type] = _BundleConfig["default"], _b[_MerchantSales["default"].type] = _MerchantSalesConfig["default"], _b[_MobileNavigation["default"].type] = _MobileNavigationConfig["default"], _b[_PcNavigation["default"].type] = _PcNavigationConfig["default"], _b[_Divider["default"].type] = _DividerConfig["default"], _b[_ImageGallery["default"].type] = _ImageGalleryConfig["default"], _b[_Newsletter["default"].type] = _NewsletterConfig["default"], _b[_Carousel["default"].type] = _CarouselConfig["default"], _b[_Button["default"].type] = _ButtonCompConfig["default"], _b[_Tag["default"].type] = _TagCompConfig["default"], _b[_WalletAshita["default"].type] = _WalletAshitaConfig["default"], _b[_WalletNuri["default"].type] = _WalletNuriConfig["default"], _b[_Wallet["default"].type] = _WalletConfig["default"], _b[_CustomCode["default"].type] = _CustomCodeConfig["default"], _b[_Location["default"].type] = _LocationConfig["default"], _b[_Stores["default"].type] = _StoresConfig["default"], _b[_Bargain["default"].type] = _BargainConfig["default"], _b[_MonpaySignBoard["default"].type] = _MonpaySignBoardConfig["default"], _b[_SearchBanner["default"].type] = _SearchBannerConfig["default"], _b);
209
215
  /**
210
216
  * 二级配置面板索引
211
217
  */
212
218
 
213
219
  exports.configPanelMap = configPanelMap;
214
- var secondConfigPanelMap = (_c = {}, _c[_Banner["default"].type] = _BannerSecondConfig["default"], _c[_Video["default"].type] = _VideoSecondConfig["default"], _c[_Text["default"].type] = _TextSecondConfig["default"], _c[_ImageText["default"].type] = _ImageTextSecondConfig["default"], _c[_Recommend["default"].type] = _RecommendSecondConfig["default"], _c[_AffiliateRecommend["default"].type] = _AffiliateRecommendSecondConfig["default"], _c[_MonpayRecommend["default"].type] = _MonpayRecommendSecondConfig["default"], _c[_MobileNavigation["default"].type] = _MobileNavigationSecondConfig["default"], _c[_PcNavigation["default"].type] = _PcNavigationSecondConfig["default"], _c[_MenuNavigation["default"].type] = _MenuNavigationSecondConfig["default"], _c[_HeadNavigation["default"].type] = _HeadNavigationSecondConfig["default"], _c[_PersonalInformation["default"].type] = _PersonalInformationSecondConfig["default"], _c[_Orders["default"].type] = _OrdersSecondConfig["default"], _c[_CommonFunctions["default"].type] = _CommonFunctionsSecondConfig["default"], _c[_Carousel["default"].type] = _CarouselSecondConfig["default"], _c[_ImageGallery["default"].type] = _ImageGallerySecondConfig["default"], _c[_Tag["default"].type] = _TagSecondConfig["default"], _c[_Button["default"].type] = _ButtonSecondConfig["default"], _c[_WalletAshita["default"].type] = _WalletAshitaSecondConfig["default"], _c[_WalletNuri["default"].type] = _WalletNuriSecondConfig["default"], _c[_Wallet["default"].type] = _WalletSecondConfig["default"], _c);
220
+ var secondConfigPanelMap = (_c = {}, _c[_Banner["default"].type] = _BannerSecondConfig["default"], _c[_Video["default"].type] = _VideoSecondConfig["default"], _c[_Text["default"].type] = _TextSecondConfig["default"], _c[_ImageText["default"].type] = _ImageTextSecondConfig["default"], _c[_Recommend["default"].type] = _RecommendSecondConfig["default"], _c[_AffiliateRecommend["default"].type] = _AffiliateRecommendSecondConfig["default"], _c[_MonpayRecommend["default"].type] = _MonpayRecommendSecondConfig["default"], _c[_MobileNavigation["default"].type] = _MobileNavigationSecondConfig["default"], _c[_PcNavigation["default"].type] = _PcNavigationSecondConfig["default"], _c[_MenuNavigation["default"].type] = _MenuNavigationSecondConfig["default"], _c[_HeadNavigation["default"].type] = _HeadNavigationSecondConfig["default"], _c[_PersonalInformation["default"].type] = _PersonalInformationSecondConfig["default"], _c[_Orders["default"].type] = _OrdersSecondConfig["default"], _c[_CommonFunctions["default"].type] = _CommonFunctionsSecondConfig["default"], _c[_Carousel["default"].type] = _CarouselSecondConfig["default"], _c[_ImageGallery["default"].type] = _ImageGallerySecondConfig["default"], _c[_Tag["default"].type] = _TagSecondConfig["default"], _c[_Button["default"].type] = _ButtonSecondConfig["default"], _c[_WalletAshita["default"].type] = _WalletAshitaSecondConfig["default"], _c[_WalletNuri["default"].type] = _WalletNuriSecondConfig["default"], _c[_Wallet["default"].type] = _WalletSecondConfig["default"], _c[_SearchBanner["default"].type] = _SearchBannerSecondConfig["default"], _c);
215
221
  exports.secondConfigPanelMap = secondConfigPanelMap;
@@ -350,6 +350,10 @@ var compInfoMap = {
350
350
  COMMON_FUNCTIONS: {
351
351
  name: 'Common Functions',
352
352
  icon: 'icon-function'
353
+ },
354
+ SEARCH_BANNER: {
355
+ name: 'Search Banner',
356
+ icon: 'icon-carousel'
353
357
  }
354
358
  };
355
359
  /**
@@ -82,6 +82,7 @@ var getSecondConfigName = function getSecondConfigName(selectedNode, clickedGrou
82
82
  switch (selectedNode.type) {
83
83
  case 'IMAGE_GALLERY':
84
84
  case 'BANNER':
85
+ case 'SEARCH_BANNER':
85
86
  groupName = ''; // if (!groupName) {
86
87
  // groupName = isPc() ? panelProps.image?.content?.pcName : panelProps.image?.content?.h5Name;
87
88
  // }
@@ -388,6 +388,8 @@ function (_super) {
388
388
 
389
389
  _this.closeConfigPanel();
390
390
 
391
+ window.magicDesign.device = device;
392
+
391
393
  _this.setState(__assign(__assign({}, _this.state), {
392
394
  device: device
393
395
  }));
@@ -397,8 +399,6 @@ function (_super) {
397
399
  _mobx.store.setState({
398
400
  clickedFloor: ''
399
401
  });
400
-
401
- window.magicDesign.device = device;
402
402
  };
403
403
 
404
404
  _this.onAdd = function () {
@@ -17,6 +17,8 @@ var _commonUtil = require("../utils/commonUtil");
17
17
 
18
18
  var _storeUtil = require("../utils/storeUtil");
19
19
 
20
+ var _common = require("../common");
21
+
20
22
  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); }
21
23
 
22
24
  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; }
@@ -90,7 +92,9 @@ function compositeDecorator(WrappedComponent) {
90
92
 
91
93
  _this.switchLanguage = function (value) {
92
94
  // const lang = 'ar';
93
- (0, _storeUtil.setStore)(_constants.STORAGE_KEY.LOCALE, value); // 实时更新问题待优化;
95
+ (0, _storeUtil.setStore)(_constants.STORAGE_KEY.LOCALE, value);
96
+
97
+ _this.setState({});
94
98
  };
95
99
 
96
100
  _this.getUserAddress = function (value) {
@@ -300,7 +304,7 @@ function compositeDecorator(WrappedComponent) {
300
304
  };
301
305
 
302
306
  Wrapper.prototype.render = function () {
303
- var _a;
307
+ var _a, _b;
304
308
 
305
309
  var nodeData = this.props.nodeData;
306
310
  var clickedFloor = this.state.clickedFloor;
@@ -317,7 +321,9 @@ function compositeDecorator(WrappedComponent) {
317
321
  style: floorNameStyle
318
322
  }, (_a = _constants.compInfoMap[nodeData.type]) === null || _a === void 0 ? void 0 : _a.name)), /*#__PURE__*/_react["default"].createElement("div", {
319
323
  style: (0, _commonUtil.pxToRem)(this.getWrapStyle())
320
- }, /*#__PURE__*/_react["default"].createElement(WrappedComponent, this.props)));
324
+ }, /*#__PURE__*/_react["default"].createElement(_common.ErrorBoundary, {
325
+ name: (_b = _constants.compInfoMap[nodeData.type]) === null || _b === void 0 ? void 0 : _b.name
326
+ }, /*#__PURE__*/_react["default"].createElement(WrappedComponent, this.props))));
321
327
  };
322
328
 
323
329
  Wrapper.getDefaultJSON = WrappedComponent.getDefaultJSON;
@@ -1,4 +1,11 @@
1
1
  {
2
+ "CHATBOT_ICON": "Chatbot icon",
3
+ "FESTIVAL_DECORATION": "Festival Decoration",
4
+ "PRICE_REDUCTION": "Price Reduction",
5
+ "PRODUCT_LABEL": "Product Label",
6
+ "LABELS": "Labels",
7
+ "TAB_BACKGROUND": "Tab Background",
8
+ "PRODUCT_BACKGROUND": "Product Background",
2
9
  "KM": "km",
3
10
  "MINS": "mins",
4
11
  "NEW": "New",
@@ -1,4 +1,11 @@
1
1
  {
2
+ "CHATBOT_ICON": "Chatbot icon",
3
+ "FESTIVAL_DECORATION": "Festival Decoration",
4
+ "PRICE_REDUCTION": "Price Reduction",
5
+ "PRODUCT_LABEL": "Product Label",
6
+ "LABELS": "Labels",
7
+ "TAB_BACKGROUND": "Tab Background",
8
+ "PRODUCT_BACKGROUND": "Product Background",
2
9
  "KM": "km",
3
10
  "MINS": "mins",
4
11
  "NEW": "New",
@@ -1,4 +1,11 @@
1
1
  {
2
+ "CHATBOT_ICON": "Chatbot icon",
3
+ "FESTIVAL_DECORATION": "Festival Decoration",
4
+ "PRICE_REDUCTION": "Price Reduction",
5
+ "PRODUCT_LABEL": "Product Label",
6
+ "LABELS": "Labels",
7
+ "TAB_BACKGROUND": "Tab Background",
8
+ "PRODUCT_BACKGROUND": "Product Background",
2
9
  "KM": "km",
3
10
  "MINS": "mins",
4
11
  "NEW": "New",
@@ -1,4 +1,8 @@
1
1
  {
2
+ "PRODUCT_LABEL": "Product Label",
3
+ "LABELS": "Labels",
4
+ "TAB_BACKGROUND": "Tab Background",
5
+ "PRODUCT_BACKGROUND": "Product Background",
2
6
  "KM": "km",
3
7
  "MINS": "mins",
4
8
  "NEW": "New",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "2.0.198",
4
+ "version": "2.0.202",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",