@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,108 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireWildcard(require("react"));
9
+
10
+ var _mobile = _interopRequireDefault(require("./mobile"));
11
+
12
+ var _defaultJSON = require("./defaultJSON");
13
+
14
+ var _compositeDecorator = _interopRequireDefault(require("../../../../decorator/compositeDecorator"));
15
+
16
+ var _decorator = require("../../../../decorator");
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
+
20
+ 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
+
22
+ 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; }
23
+
24
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
25
+
26
+ var __extends = void 0 && (void 0).__extends || function () {
27
+ var _extendStatics = function extendStatics(d, b) {
28
+ _extendStatics = Object.setPrototypeOf || {
29
+ __proto__: []
30
+ } instanceof Array && function (d, b) {
31
+ d.__proto__ = b;
32
+ } || function (d, b) {
33
+ for (var p in b) {
34
+ if (b.hasOwnProperty(p)) d[p] = b[p];
35
+ }
36
+ };
37
+
38
+ return _extendStatics(d, b);
39
+ };
40
+
41
+ return function (d, b) {
42
+ _extendStatics(d, b);
43
+
44
+ function __() {
45
+ this.constructor = d;
46
+ }
47
+
48
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
49
+ };
50
+ }();
51
+
52
+ var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
53
+ var c = arguments.length,
54
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
55
+ d;
56
+ if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
57
+ if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
58
+ }
59
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
60
+ };
61
+
62
+ var SearchBanner =
63
+ /** @class */
64
+ function (_super) {
65
+ __extends(SearchBanner, _super);
66
+
67
+ function SearchBanner() {
68
+ var _this = _super !== null && _super.apply(this, arguments) || this;
69
+
70
+ _this.state = {
71
+ lazyShow: false
72
+ };
73
+ _this.searchBannerRef = /*#__PURE__*/_react["default"].createRef();
74
+ _this.intersectionObserver = null;
75
+ return _this;
76
+ }
77
+
78
+ SearchBanner.prototype.componentDidMount = function () {};
79
+
80
+ SearchBanner.prototype.componentWillUnmount = function () {};
81
+
82
+ SearchBanner.prototype.render = function () {
83
+ var nodeData = this.props.nodeData;
84
+ var lazyShow = this.state.lazyShow;
85
+ return /*#__PURE__*/_react["default"].createElement("div", {
86
+ ref: this.searchBannerRef,
87
+ style: {
88
+ height: lazyShow ? 'auto' : 300
89
+ }
90
+ }, lazyShow && (window.magicDesign.device === 'pc' ? null : /*#__PURE__*/_react["default"].createElement(_mobile["default"], {
91
+ data: nodeData
92
+ })));
93
+ };
94
+
95
+ SearchBanner.defaultProps = {};
96
+ SearchBanner.type = 'SEARCH_BANNER';
97
+ SearchBanner.getDefaultJSON = _defaultJSON.getDefaultJSON;
98
+
99
+ __decorate([(0, _decorator.lazy)('searchBannerRef')], SearchBanner.prototype, "componentDidMount", null);
100
+
101
+ __decorate([_decorator.lazyDestroy], SearchBanner.prototype, "componentWillUnmount", null);
102
+
103
+ SearchBanner = __decorate([_compositeDecorator["default"]], SearchBanner);
104
+ return SearchBanner;
105
+ }(_react.Component);
106
+
107
+ var _default = SearchBanner;
108
+ exports["default"] = _default;
@@ -0,0 +1,301 @@
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
+ require("./index.less");
11
+
12
+ var _antd = require("antd4");
13
+
14
+ var _classnames = _interopRequireDefault(require("classnames"));
15
+
16
+ var _common = require("../../../../../common");
17
+
18
+ var _commonUtil = require("../../../../../utils/commonUtil");
19
+
20
+ var _components = require("../../../../../meta-comp/components");
21
+
22
+ var _Text = require("../../../../../meta-comp/components/Text");
23
+
24
+ require("slick-carousel/slick/slick.css");
25
+
26
+ require("slick-carousel/slick/slick-theme.css");
27
+
28
+ var _ConfigPanel = require("../../../../../core/Designer/ConfigPanel");
29
+
30
+ var _coreUtil = require("../../../../../utils/coreUtil");
31
+
32
+ var _mobx = require("../../../../../mobx");
33
+
34
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
35
+
36
+ var __extends = void 0 && (void 0).__extends || function () {
37
+ var _extendStatics = function extendStatics(d, b) {
38
+ _extendStatics = Object.setPrototypeOf || {
39
+ __proto__: []
40
+ } instanceof Array && function (d, b) {
41
+ d.__proto__ = b;
42
+ } || function (d, b) {
43
+ for (var p in b) {
44
+ if (b.hasOwnProperty(p)) d[p] = b[p];
45
+ }
46
+ };
47
+
48
+ return _extendStatics(d, b);
49
+ };
50
+
51
+ return function (d, b) {
52
+ _extendStatics(d, b);
53
+
54
+ function __() {
55
+ this.constructor = d;
56
+ }
57
+
58
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
59
+ };
60
+ }();
61
+
62
+ var __assign = void 0 && (void 0).__assign || function () {
63
+ __assign = Object.assign || function (t) {
64
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
65
+ s = arguments[i];
66
+
67
+ for (var p in s) {
68
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
69
+ }
70
+ }
71
+
72
+ return t;
73
+ };
74
+
75
+ return __assign.apply(this, arguments);
76
+ };
77
+
78
+ var SearchBannerMobile =
79
+ /** @class */
80
+ function (_super) {
81
+ __extends(SearchBannerMobile, _super);
82
+
83
+ function SearchBannerMobile() {
84
+ var _this = _super !== null && _super.apply(this, arguments) || this;
85
+
86
+ _this.state = {
87
+ carouseIndex: 0
88
+ };
89
+ _this.carouselRef = /*#__PURE__*/_react["default"].createRef();
90
+ _this.destroy = null;
91
+
92
+ _this.bannerGoto = function (groupSource) {
93
+ var nextIndex = groupSource.findIndex(function (item) {
94
+ return item.id === _mobx.store.clickedGroup;
95
+ });
96
+
97
+ if (nextIndex != -1 && nextIndex != _this.state.carouseIndex) {
98
+ _this.carouselRef.current.goTo(nextIndex);
99
+ }
100
+ };
101
+
102
+ _this.bannerGoto = function (groupSource) {
103
+ var nextIndex = groupSource.findIndex(function (item) {
104
+ return item.id === _mobx.store.clickedGroup;
105
+ });
106
+
107
+ if (nextIndex != -1 && nextIndex != _this.state.carouseIndex) {
108
+ _this.carouselRef.current.goTo(nextIndex);
109
+ }
110
+ }; // padding用统一设置
111
+
112
+
113
+ _this.getBackgroundStyle = function (item) {
114
+ var wrapStyle = {}; // 背景
115
+
116
+ if (item.background) {
117
+ if (item.background.bgType === 'color') {
118
+ wrapStyle.backgroundColor = item.background.color;
119
+ wrapStyle.opacity = item.background.opacity ? item.background.opacity : 1;
120
+ } else {
121
+ wrapStyle.backgroundImage = "url(" + item.background.image + ")";
122
+ wrapStyle.backgroundPosition = 'center';
123
+ wrapStyle.backgroundSize = 'cover';
124
+ }
125
+ }
126
+
127
+ return __assign({}, wrapStyle);
128
+ };
129
+
130
+ return _this;
131
+ }
132
+
133
+ SearchBannerMobile.prototype.componentDidMount = function () {
134
+ var _this = this;
135
+
136
+ this.destroy = (0, _mobx.autorun)(function () {
137
+ _this.bannerGoto(_this.props.data.groupSource);
138
+ });
139
+ };
140
+
141
+ SearchBannerMobile.prototype.componentWillReceiveProps = function (nextProps) {
142
+ this.bannerGoto(nextProps.data.groupSource);
143
+ };
144
+
145
+ SearchBannerMobile.prototype.componentWillUnmount = function () {
146
+ this.destroy();
147
+ };
148
+
149
+ SearchBannerMobile.prototype.render = function () {
150
+ var _this = this;
151
+
152
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
153
+
154
+ var data = this.props.data;
155
+ var GAData = (0, _commonUtil.getGAData)(data);
156
+ var _q = this.state,
157
+ value = _q.value,
158
+ carouseIndex = _q.carouseIndex;
159
+
160
+ var style = __assign({}, (0, _Text.contentStyle)(((_a = data.content.keyword) === null || _a === void 0 ? void 0 : _a.content) || {}));
161
+
162
+ Reflect.deleteProperty(style, 'width');
163
+
164
+ var _placeholder = ((_b = data.content.placeholder) === null || _b === void 0 ? void 0 : _b.open) ? (_c = data.content.placeholder) === null || _c === void 0 ? void 0 : _c.text : '';
165
+
166
+ var autoplay = data.setting.autoplay.open;
167
+ /** 设计器模式下 如果选中特定group 自动播放关闭 */
168
+
169
+ if ((0, _coreUtil.isDesignMode)() && _mobx.store.clickedGroup) {
170
+ autoplay = false;
171
+ }
172
+
173
+ return /*#__PURE__*/_react["default"].createElement("div", {
174
+ className: "m-search-banner-mobile"
175
+ }, /*#__PURE__*/_react["default"].createElement("div", {
176
+ className: "search-bar"
177
+ }, /*#__PURE__*/_react["default"].createElement("div", {
178
+ className: "right"
179
+ }, data.content && ((_d = data.content.box) === null || _d === void 0 ? void 0 : _d.open) && /*#__PURE__*/_react["default"].createElement("div", {
180
+ className: "search-input-wrap",
181
+ onClick: function onClick() {
182
+ return (0, _coreUtil.clickUrl)('/search-page', {
183
+ searchValue: value
184
+ });
185
+ },
186
+ style: {
187
+ borderColor: (_f = (_e = data.content.box) === null || _e === void 0 ? void 0 : _e.color) === null || _f === void 0 ? void 0 : _f.mobile,
188
+ backgroundColor: (_h = (_g = data.content.box) === null || _g === void 0 ? void 0 : _g.backgroundColor) === null || _h === void 0 ? void 0 : _h.mobile
189
+ }
190
+ }, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
191
+ color: (_k = (_j = data.content.box) === null || _j === void 0 ? void 0 : _j.color) === null || _k === void 0 ? void 0 : _k.mobile,
192
+ size: (0, _commonUtil.convertToRem)(24),
193
+ type: "icon-search2"
194
+ }), /*#__PURE__*/_react["default"].createElement(_antd.Input, {
195
+ className: "search-input",
196
+ onBlur: this.onBlur,
197
+ onChange: this.onChange,
198
+ onFocus: this.onFocus,
199
+ placeholder: _placeholder,
200
+ readOnly: true,
201
+ style: (0, _commonUtil.pxToRem)(style),
202
+ type: "text",
203
+ value: value
204
+ })), data.content && ((_l = data.content.cartIcon) === null || _l === void 0 ? void 0 : _l.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
205
+ className: "right-icon",
206
+ data: data.content.cartIcon
207
+ }), data.content && ((_m = data.content.chatbotIcon) === null || _m === void 0 ? void 0 : _m.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
208
+ className: "right-icon",
209
+ data: data.content.chatbotIcon
210
+ }), data.content && ((_o = data.content.messageIcon) === null || _o === void 0 ? void 0 : _o.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
211
+ className: "right-icon",
212
+ data: data.content.messageIcon
213
+ })), data.content && ((_p = data.content.logo) === null || _p === void 0 ? void 0 : _p.open) && /*#__PURE__*/_react["default"].createElement("div", {
214
+ className: "logo",
215
+ onClick: function onClick() {
216
+ var _a, _b;
217
+ /** PTO 定制GA */
218
+
219
+
220
+ if (window.magicDesign.pushGA) {
221
+ window.magicDesign.pushGA({}, 'select_promotion', {
222
+ event_section: 'Search',
223
+ promotion_name: (_b = (_a = data.content.logo) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.h5Name
224
+ });
225
+ }
226
+ }
227
+ }, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
228
+ data: data.content.logo,
229
+ style: {
230
+ height: 20
231
+ }
232
+ }))), /*#__PURE__*/_react["default"].createElement(_antd.Carousel, {
233
+ ref: this.carouselRef,
234
+ afterChange: function afterChange(n) {
235
+ return _this.setState({
236
+ carouseIndex: n
237
+ });
238
+ },
239
+ autoplay: autoplay,
240
+ autoplaySpeed: data.setting.autoplay.interval * 1000,
241
+ dots: false
242
+ }, data.groupSource.map(function (item) {
243
+ return /*#__PURE__*/_react["default"].createElement("div", {
244
+ key: item.id
245
+ }, /*#__PURE__*/_react["default"].createElement("div", {
246
+ style: _this.getBackgroundStyle(item)
247
+ }, /*#__PURE__*/_react["default"].createElement("div", {
248
+ className: "carouselItem",
249
+ onClick: function onClick() {
250
+ /** PTO 定制GA */
251
+ if (window.magicDesign.pushGA) {
252
+ window.magicDesign.pushGA({}, 'select_promotion', {
253
+ event_section: 'Search_Banner',
254
+ promotion_name: item.image.content.h5ImgSrc ? item.image.content.h5Name : i18n('BANNER_GROUP_NAME')
255
+ });
256
+ }
257
+ }
258
+ }, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
259
+ data: item.image,
260
+ GAData: __assign(__assign({}, GAData), {
261
+ groupId: item.id,
262
+ groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
263
+ }),
264
+ isBackground: true,
265
+ style: {
266
+ width: '100%'
267
+ }
268
+ }))));
269
+ })), data.setting.dots.open && /*#__PURE__*/_react["default"].createElement("div", {
270
+ className: "swiper-ban"
271
+ }, data.groupSource.length > 1 && data.groupSource.map(function (item, i) {
272
+ return /*#__PURE__*/_react["default"].createElement("div", {
273
+ key: (item === null || item === void 0 ? void 0 : item.id) || i,
274
+ className: (0, _classnames["default"])('ban', {
275
+ active: i == carouseIndex,
276
+ isCircle: data.setting.dots.layout === 'layout1'
277
+ }),
278
+ onClick: function onClick() {
279
+ var _a;
280
+
281
+ return (_a = _this.carouselRef.current) === null || _a === void 0 ? void 0 : _a.goTo(i);
282
+ },
283
+ style: (0, _commonUtil.pxToRem)({
284
+ backgroundColor: i == carouseIndex ? data.setting.dots.hoverColor.mobile : data.setting.dots.color.mobile,
285
+ fontSize: i == carouseIndex ? data.setting.dots.hoverSize.mobile : data.setting.dots.size.mobile
286
+ })
287
+ });
288
+ })));
289
+ };
290
+
291
+ SearchBannerMobile.defaultProps = {
292
+ data: {
293
+ setting: {},
294
+ groupSource: []
295
+ }
296
+ };
297
+ return SearchBannerMobile;
298
+ }(_react["default"].Component);
299
+
300
+ var _default = SearchBannerMobile;
301
+ exports["default"] = _default;
@@ -0,0 +1,108 @@
1
+ .m-search-banner-mobile {
2
+ position: relative;
3
+ width: 100%;
4
+ }
5
+ .m-search-banner-mobile .search-bar {
6
+ height: 0.96rem;
7
+ padding: 0.2rem 0.32rem;
8
+ display: flex;
9
+ flex-direction: row-reverse;
10
+ align-items: center;
11
+ justify-content: space-between;
12
+ width: 100%;
13
+ position: absolute;
14
+ z-index: 2;
15
+ }
16
+ .m-search-banner-mobile .search-bar .right {
17
+ display: flex;
18
+ flex: 1;
19
+ align-items: center;
20
+ justify-content: space-between;
21
+ }
22
+ .m-search-banner-mobile .search-bar .right .search-input-wrap {
23
+ flex: 1;
24
+ background: transparent;
25
+ border-radius: 0.4rem;
26
+ border: 0.02rem solid #fff;
27
+ padding: 0.08rem 0.2rem;
28
+ height: 0.56rem;
29
+ text-align: right;
30
+ display: flex;
31
+ justify-content: space-between;
32
+ }
33
+ .m-search-banner-mobile .search-bar .right .search-input-wrap .search-input {
34
+ background-color: transparent;
35
+ border: none;
36
+ height: 100%;
37
+ width: 100%;
38
+ padding: 0;
39
+ box-shadow: none;
40
+ font-family: 'Open Sans';
41
+ font-style: normal;
42
+ font-weight: 400;
43
+ font-size: 0.28rem;
44
+ outline: none;
45
+ }
46
+ .m-search-banner-mobile .search-bar .right .right-icon {
47
+ margin-left: 0.2rem;
48
+ display: inline-block;
49
+ width: 0.5rem;
50
+ height: 0.5rem;
51
+ }
52
+ .m-search-banner-mobile .search-bar .logo {
53
+ margin-right: 0.3rem;
54
+ }
55
+ .m-search-banner-mobile .search-bar .logo img {
56
+ width: auto;
57
+ }
58
+ .m-search-banner-mobile .carouselItem {
59
+ position: relative;
60
+ display: flex;
61
+ }
62
+ .m-search-banner-mobile .carouselItem .carouseContent {
63
+ padding: 0 0.56rem;
64
+ position: absolute;
65
+ z-index: 2;
66
+ display: flex;
67
+ flex-direction: column;
68
+ margin-bottom: auto;
69
+ }
70
+ .m-search-banner-mobile .carouselItem .title {
71
+ margin-bottom: 0.16rem;
72
+ }
73
+ .m-search-banner-mobile .carouselItem .sub-title {
74
+ margin-bottom: 0.4rem;
75
+ }
76
+ .m-search-banner-mobile .carouselItem .btn-wrap {
77
+ display: flex;
78
+ align-items: center;
79
+ justify-content: flex-start;
80
+ }
81
+ .m-search-banner-mobile .carouselItem .btn-wrap .btn {
82
+ margin-right: 0.24rem;
83
+ }
84
+ .m-search-banner-mobile .swiper-ban {
85
+ position: absolute;
86
+ width: 100%;
87
+ bottom: 0.2rem;
88
+ display: flex;
89
+ align-items: center;
90
+ justify-content: center;
91
+ }
92
+ .m-search-banner-mobile .swiper-ban .ban {
93
+ font-size: 0.32rem;
94
+ width: 1em;
95
+ height: 0.25em;
96
+ background: #FFF;
97
+ cursor: inherit;
98
+ margin-right: 0.16rem;
99
+ transition: all 0.5s;
100
+ }
101
+ .m-search-banner-mobile .swiper-ban .ban.active {
102
+ opacity: 1;
103
+ }
104
+ .m-search-banner-mobile .swiper-ban .ban.isCircle {
105
+ width: 1em;
106
+ height: 1em;
107
+ border-radius: 50%;
108
+ }
@@ -381,7 +381,7 @@ function (_super) {
381
381
  }), /*#__PURE__*/_react["default"].createElement("div", {
382
382
  onClick: this.clickCollect
383
383
  }, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
384
- color: isFollow ? '#F1600F' : '#333333',
384
+ color: isFollow ? '#ce1126' : '#333333',
385
385
  size: (0, _commonUtil.convertToRem)(24),
386
386
  type: isFollow ? 'icon-HeartStraight_fill' : 'icon-HeartStraight'
387
387
  }))), /*#__PURE__*/_react["default"].createElement("div", {
@@ -120,6 +120,13 @@ function (_super) {
120
120
  data: panelProps.salesPrice
121
121
  }),
122
122
  metaOption: panelProps.salesPrice
123
+ }, {
124
+ key: '5',
125
+ name: (0, _locale.i18n)('PRICE_REDUCTION'),
126
+ value: /*#__PURE__*/_react["default"].createElement(_TextConfig["default"], {
127
+ data: panelProps.discountLabel
128
+ }),
129
+ metaOption: panelProps.discountLabel
123
130
  }],
124
131
  type: "switch"
125
132
  }), /*#__PURE__*/_react["default"].createElement("div", {
@@ -120,6 +120,13 @@ function (_super) {
120
120
  data: panelProps.salesPrice
121
121
  }),
122
122
  metaOption: panelProps.salesPrice
123
+ }, {
124
+ key: '5',
125
+ name: (0, _locale.i18n)('PRICE_REDUCTION'),
126
+ value: /*#__PURE__*/_react["default"].createElement(_TextConfig["default"], {
127
+ data: panelProps.discountLabel
128
+ }),
129
+ metaOption: panelProps.discountLabel
123
130
  }],
124
131
  type: "switch"
125
132
  }), /*#__PURE__*/_react["default"].createElement("div", {
@@ -120,6 +120,13 @@ function (_super) {
120
120
  data: panelProps.salesPrice
121
121
  }),
122
122
  metaOption: panelProps.salesPrice
123
+ }, {
124
+ key: '5',
125
+ name: (0, _locale.i18n)('PRICE_REDUCTION'),
126
+ value: /*#__PURE__*/_react["default"].createElement(_TextConfig["default"], {
127
+ data: panelProps.discountLabel
128
+ }),
129
+ metaOption: panelProps.discountLabel
123
130
  }],
124
131
  type: "switch"
125
132
  }), /*#__PURE__*/_react["default"].createElement("div", {
@@ -0,0 +1,91 @@
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 _common = require("../../../../../common");
11
+
12
+ require("./index.less");
13
+
14
+ var _coreUtil = require("../../../../../utils/coreUtil");
15
+
16
+ var _ImageConfig = _interopRequireDefault(require("../../../../../meta-comp/config-panels/ImageConfig"));
17
+
18
+ var _locale = require("../../../../../locale");
19
+
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
+
22
+ var __extends = void 0 && (void 0).__extends || function () {
23
+ var _extendStatics = function extendStatics(d, b) {
24
+ _extendStatics = Object.setPrototypeOf || {
25
+ __proto__: []
26
+ } instanceof Array && function (d, b) {
27
+ d.__proto__ = b;
28
+ } || function (d, b) {
29
+ for (var p in b) {
30
+ if (b.hasOwnProperty(p)) d[p] = b[p];
31
+ }
32
+ };
33
+
34
+ return _extendStatics(d, b);
35
+ };
36
+
37
+ return function (d, b) {
38
+ _extendStatics(d, b);
39
+
40
+ function __() {
41
+ this.constructor = d;
42
+ }
43
+
44
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
45
+ };
46
+ }();
47
+
48
+ var ConfigDecoration =
49
+ /** @class */
50
+ function (_super) {
51
+ __extends(ConfigDecoration, _super);
52
+
53
+ function ConfigDecoration() {
54
+ var _this = _super !== null && _super.apply(this, arguments) || this;
55
+
56
+ _this.reRender = function () {
57
+ (0, _coreUtil.renderPreview)();
58
+
59
+ _this.setState({});
60
+ };
61
+
62
+ return _this;
63
+ }
64
+
65
+ ConfigDecoration.prototype.render = function () {
66
+ var data = this.props.data;
67
+ return /*#__PURE__*/_react["default"].createElement("div", {
68
+ className: "config_decoration"
69
+ }, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
70
+ headerSize: "middle",
71
+ onRefresh: this.reRender,
72
+ source: [{
73
+ key: data.id,
74
+ name: (0, _locale.i18n)('FESTIVAL_DECORATION'),
75
+ value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
76
+ data: data
77
+ }),
78
+ metaOption: data
79
+ }],
80
+ type: "switch"
81
+ }));
82
+ };
83
+
84
+ ConfigDecoration.defaultProps = {
85
+ data: {}
86
+ };
87
+ return ConfigDecoration;
88
+ }(_react["default"].Component);
89
+
90
+ var _default = ConfigDecoration;
91
+ exports["default"] = _default;
@@ -0,0 +1,9 @@
1
+ .carousel_setting {
2
+
3
+ .collapse_wrap {
4
+ .header_wrap {
5
+ font-weight: 600 !important;
6
+ }
7
+ }
8
+
9
+ }