@fonixtree/magic-design 1.0.131 → 1.0.132

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 (167) hide show
  1. package/es/assets/fonts/magic-box-iconfont.css +11 -3
  2. package/es/assets/fonts/magic-box-iconfont.js +1 -1
  3. package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
  4. package/es/assets/fonts/magic-box-iconfont.woff +0 -0
  5. package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
  6. package/es/assets/images/layout-icon/grouped-carousel-layout1.png +0 -0
  7. package/es/assets/images/layout-icon/news-layout1.png +0 -0
  8. package/es/assets/images/layout-icon/search-dito-layout1.png +0 -0
  9. package/es/assets/images/layout-icon/slide-image-layout1.png +0 -0
  10. package/es/assets/less/global.less +1 -0
  11. package/es/composite-comp/common/config-panels/SpacingConfig/index.js +30 -0
  12. package/es/composite-comp/dito/components/GroupedCarousel/defaultJSON.js +313 -0
  13. package/es/composite-comp/dito/components/GroupedCarousel/index.js +86 -0
  14. package/es/composite-comp/dito/components/GroupedCarousel/pc/index.js +194 -0
  15. package/es/composite-comp/dito/components/GroupedCarousel/pc/index.less +65 -0
  16. package/es/composite-comp/dito/components/News/defaultJSON.js +176 -0
  17. package/es/composite-comp/dito/components/News/index.js +84 -0
  18. package/es/composite-comp/dito/components/News/pc/index.js +113 -0
  19. package/es/composite-comp/dito/components/News/pc/index.less +46 -0
  20. package/es/composite-comp/dito/components/SearchBanner/mobile/index.js +0 -10
  21. package/es/composite-comp/dito/components/SearchDITO/defaultJSON.js +215 -0
  22. package/es/composite-comp/dito/components/SearchDITO/index.js +86 -0
  23. package/es/composite-comp/dito/components/SearchDITO/pc/components/VideoItem/index.js +146 -0
  24. package/es/composite-comp/dito/components/SearchDITO/pc/components/VideoItem/index.less +25 -0
  25. package/es/composite-comp/dito/components/SearchDITO/pc/index.js +591 -0
  26. package/es/composite-comp/dito/components/SearchDITO/pc/index.less +162 -0
  27. package/es/composite-comp/dito/components/SlideImage/defaultJSON.js +117 -0
  28. package/es/composite-comp/dito/components/SlideImage/index.js +86 -0
  29. package/es/composite-comp/dito/components/SlideImage/pc/components/CardItem/index.js +96 -0
  30. package/es/composite-comp/dito/components/SlideImage/pc/components/CardItem/index.less +1 -0
  31. package/es/composite-comp/dito/components/SlideImage/pc/components/ParallaxScroll/index.js +140 -0
  32. package/es/composite-comp/dito/components/SlideImage/pc/components/ParallaxScroll/index.less +12 -0
  33. package/es/composite-comp/dito/components/SlideImage/pc/components/SvgMask/imgs/mask.svg +0 -0
  34. package/es/composite-comp/dito/components/SlideImage/pc/components/SvgMask/index.js +88 -0
  35. package/es/composite-comp/dito/components/SlideImage/pc/components/SvgMask/index.less +5 -0
  36. package/es/composite-comp/dito/components/SlideImage/pc/components/VideoItem/index.js +121 -0
  37. package/es/composite-comp/dito/components/SlideImage/pc/components/VideoItem/index.less +20 -0
  38. package/es/composite-comp/dito/components/SlideImage/pc/index.js +26 -0
  39. package/es/composite-comp/dito/components/SlideImage/pc/index.less +1 -0
  40. package/es/composite-comp/dito/config-panels/GroupedCarouselConfig/ConfigGroup/index.js +149 -0
  41. package/es/composite-comp/dito/config-panels/GroupedCarouselConfig/ConfigGroup/index.less +16 -0
  42. package/es/composite-comp/dito/config-panels/GroupedCarouselConfig/ConfigTitle/index.js +93 -0
  43. package/es/composite-comp/dito/config-panels/GroupedCarouselConfig/ConfigTitle/index.less +0 -0
  44. package/es/composite-comp/dito/config-panels/GroupedCarouselConfig/imgs/defaultImg.png +0 -0
  45. package/es/composite-comp/dito/config-panels/GroupedCarouselConfig/index.js +106 -0
  46. package/es/composite-comp/dito/config-panels/NewsConfig/ConfigGroup/index.js +148 -0
  47. package/es/composite-comp/dito/config-panels/NewsConfig/ConfigGroup/index.less +16 -0
  48. package/es/composite-comp/dito/config-panels/NewsConfig/ConfigTitle/index.js +101 -0
  49. package/es/composite-comp/dito/config-panels/NewsConfig/ConfigTitle/index.less +0 -0
  50. package/es/composite-comp/dito/config-panels/NewsConfig/imgs/defaultImg.png +0 -0
  51. package/es/composite-comp/dito/config-panels/NewsConfig/index.js +114 -0
  52. package/es/composite-comp/dito/config-panels/SearchDITOConfig/ConfigContent/index.js +156 -0
  53. package/es/composite-comp/dito/config-panels/SearchDITOConfig/ConfigContent/index.less +7 -0
  54. package/es/composite-comp/dito/config-panels/SearchDITOConfig/ConfigImageGroup/index.js +179 -0
  55. package/es/composite-comp/dito/config-panels/SearchDITOConfig/ConfigImageGroup/index.less +0 -0
  56. package/es/composite-comp/dito/config-panels/SearchDITOConfig/ConfigSetting/index.js +181 -0
  57. package/es/composite-comp/dito/config-panels/SearchDITOConfig/ConfigSetting/index.less +9 -0
  58. package/es/composite-comp/dito/config-panels/SearchDITOConfig/imgs/defaultImg.png +0 -0
  59. package/es/composite-comp/dito/config-panels/SearchDITOConfig/index.js +69 -0
  60. package/es/composite-comp/dito/config-panels/SlideImageConfig/ConfigGroup/index.js +150 -0
  61. package/es/composite-comp/dito/config-panels/SlideImageConfig/ConfigGroup/index.less +16 -0
  62. package/es/composite-comp/dito/config-panels/SlideImageConfig/imgs/defaultImg.png +0 -0
  63. package/es/composite-comp/dito/config-panels/SlideImageConfig/index.js +108 -0
  64. package/es/composite-comp/dito/second-config-panels/GroupedCarouselSecondConfig/index.js +198 -0
  65. package/es/composite-comp/dito/second-config-panels/GroupedCarouselSecondConfig/index.less +0 -0
  66. package/es/composite-comp/dito/second-config-panels/NewsSecondConfig/index.js +133 -0
  67. package/es/composite-comp/dito/second-config-panels/NewsSecondConfig/index.less +8 -0
  68. package/es/composite-comp/dito/second-config-panels/SearchDITOSecondConfig/index.js +357 -0
  69. package/es/composite-comp/dito/second-config-panels/SearchDITOSecondConfig/index.less +79 -0
  70. package/es/composite-comp/dito/second-config-panels/SlideImageSecondConfig/index.js +349 -0
  71. package/es/composite-comp/dito/second-config-panels/SlideImageSecondConfig/index.less +0 -0
  72. package/es/constants/component-types.js +27 -3
  73. package/es/constants/index.js +16 -0
  74. package/es/constants/layout.js +34 -2
  75. package/es/locale/en/en.json +5 -1
  76. package/es/locale/es/es.json +5 -1
  77. package/es/locale/id/id.json +5 -1
  78. package/es/meta-comp/components/Button/editable.js +3 -1
  79. package/es/meta-comp/components/Button/index.js +2 -1
  80. package/es/meta-comp/components/Image/index.js +11 -4
  81. package/es/meta-comp/components/Image/index.less +7 -0
  82. package/es/utils/commonUtil.js +4 -1
  83. package/es/utils/pluginsUtil.js +1 -0
  84. package/lib/assets/fonts/magic-box-iconfont.css +11 -3
  85. package/lib/assets/fonts/magic-box-iconfont.js +1 -1
  86. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  87. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  88. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  89. package/lib/assets/images/layout-icon/grouped-carousel-layout1.png +0 -0
  90. package/lib/assets/images/layout-icon/news-layout1.png +0 -0
  91. package/lib/assets/images/layout-icon/search-dito-layout1.png +0 -0
  92. package/lib/assets/images/layout-icon/slide-image-layout1.png +0 -0
  93. package/lib/assets/less/global.less +1 -0
  94. package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +30 -0
  95. package/lib/composite-comp/dito/components/GroupedCarousel/defaultJSON.js +313 -0
  96. package/lib/composite-comp/dito/components/GroupedCarousel/index.js +86 -0
  97. package/lib/composite-comp/dito/components/GroupedCarousel/pc/index.js +194 -0
  98. package/lib/composite-comp/dito/components/GroupedCarousel/pc/index.less +65 -0
  99. package/lib/composite-comp/dito/components/News/defaultJSON.js +176 -0
  100. package/lib/composite-comp/dito/components/News/index.js +84 -0
  101. package/lib/composite-comp/dito/components/News/pc/index.js +113 -0
  102. package/lib/composite-comp/dito/components/News/pc/index.less +46 -0
  103. package/lib/composite-comp/dito/components/SearchBanner/mobile/index.js +0 -10
  104. package/lib/composite-comp/dito/components/SearchDITO/defaultJSON.js +215 -0
  105. package/lib/composite-comp/dito/components/SearchDITO/index.js +86 -0
  106. package/lib/composite-comp/dito/components/SearchDITO/pc/components/VideoItem/index.js +146 -0
  107. package/lib/composite-comp/dito/components/SearchDITO/pc/components/VideoItem/index.less +25 -0
  108. package/lib/composite-comp/dito/components/SearchDITO/pc/index.js +591 -0
  109. package/lib/composite-comp/dito/components/SearchDITO/pc/index.less +162 -0
  110. package/lib/composite-comp/dito/components/SlideImage/defaultJSON.js +117 -0
  111. package/lib/composite-comp/dito/components/SlideImage/index.js +86 -0
  112. package/lib/composite-comp/dito/components/SlideImage/pc/components/CardItem/index.js +96 -0
  113. package/lib/composite-comp/dito/components/SlideImage/pc/components/CardItem/index.less +1 -0
  114. package/lib/composite-comp/dito/components/SlideImage/pc/components/ParallaxScroll/index.js +140 -0
  115. package/lib/composite-comp/dito/components/SlideImage/pc/components/ParallaxScroll/index.less +12 -0
  116. package/lib/composite-comp/dito/components/SlideImage/pc/components/SvgMask/imgs/mask.svg +0 -0
  117. package/lib/composite-comp/dito/components/SlideImage/pc/components/SvgMask/index.js +88 -0
  118. package/lib/composite-comp/dito/components/SlideImage/pc/components/SvgMask/index.less +5 -0
  119. package/lib/composite-comp/dito/components/SlideImage/pc/components/VideoItem/index.js +121 -0
  120. package/lib/composite-comp/dito/components/SlideImage/pc/components/VideoItem/index.less +20 -0
  121. package/lib/composite-comp/dito/components/SlideImage/pc/index.js +26 -0
  122. package/lib/composite-comp/dito/components/SlideImage/pc/index.less +1 -0
  123. package/lib/composite-comp/dito/config-panels/GroupedCarouselConfig/ConfigGroup/index.js +149 -0
  124. package/lib/composite-comp/dito/config-panels/GroupedCarouselConfig/ConfigGroup/index.less +16 -0
  125. package/lib/composite-comp/dito/config-panels/GroupedCarouselConfig/ConfigTitle/index.js +93 -0
  126. package/lib/composite-comp/dito/config-panels/GroupedCarouselConfig/ConfigTitle/index.less +0 -0
  127. package/lib/composite-comp/dito/config-panels/GroupedCarouselConfig/imgs/defaultImg.png +0 -0
  128. package/lib/composite-comp/dito/config-panels/GroupedCarouselConfig/index.js +106 -0
  129. package/lib/composite-comp/dito/config-panels/NewsConfig/ConfigGroup/index.js +148 -0
  130. package/lib/composite-comp/dito/config-panels/NewsConfig/ConfigGroup/index.less +16 -0
  131. package/lib/composite-comp/dito/config-panels/NewsConfig/ConfigTitle/index.js +101 -0
  132. package/lib/composite-comp/dito/config-panels/NewsConfig/ConfigTitle/index.less +0 -0
  133. package/lib/composite-comp/dito/config-panels/NewsConfig/imgs/defaultImg.png +0 -0
  134. package/lib/composite-comp/dito/config-panels/NewsConfig/index.js +114 -0
  135. package/lib/composite-comp/dito/config-panels/SearchDITOConfig/ConfigContent/index.js +156 -0
  136. package/lib/composite-comp/dito/config-panels/SearchDITOConfig/ConfigContent/index.less +7 -0
  137. package/lib/composite-comp/dito/config-panels/SearchDITOConfig/ConfigImageGroup/index.js +179 -0
  138. package/lib/composite-comp/dito/config-panels/SearchDITOConfig/ConfigImageGroup/index.less +0 -0
  139. package/lib/composite-comp/dito/config-panels/SearchDITOConfig/ConfigSetting/index.js +181 -0
  140. package/lib/composite-comp/dito/config-panels/SearchDITOConfig/ConfigSetting/index.less +9 -0
  141. package/lib/composite-comp/dito/config-panels/SearchDITOConfig/imgs/defaultImg.png +0 -0
  142. package/lib/composite-comp/dito/config-panels/SearchDITOConfig/index.js +69 -0
  143. package/lib/composite-comp/dito/config-panels/SlideImageConfig/ConfigGroup/index.js +150 -0
  144. package/lib/composite-comp/dito/config-panels/SlideImageConfig/ConfigGroup/index.less +16 -0
  145. package/lib/composite-comp/dito/config-panels/SlideImageConfig/imgs/defaultImg.png +0 -0
  146. package/lib/composite-comp/dito/config-panels/SlideImageConfig/index.js +108 -0
  147. package/lib/composite-comp/dito/second-config-panels/GroupedCarouselSecondConfig/index.js +198 -0
  148. package/lib/composite-comp/dito/second-config-panels/GroupedCarouselSecondConfig/index.less +0 -0
  149. package/lib/composite-comp/dito/second-config-panels/NewsSecondConfig/index.js +133 -0
  150. package/lib/composite-comp/dito/second-config-panels/NewsSecondConfig/index.less +8 -0
  151. package/lib/composite-comp/dito/second-config-panels/SearchDITOSecondConfig/index.js +357 -0
  152. package/lib/composite-comp/dito/second-config-panels/SearchDITOSecondConfig/index.less +79 -0
  153. package/lib/composite-comp/dito/second-config-panels/SlideImageSecondConfig/index.js +349 -0
  154. package/lib/composite-comp/dito/second-config-panels/SlideImageSecondConfig/index.less +0 -0
  155. package/lib/constants/component-types.js +27 -3
  156. package/lib/constants/index.js +16 -0
  157. package/lib/constants/layout.js +34 -2
  158. package/lib/locale/en/en.json +5 -1
  159. package/lib/locale/es/es.json +5 -1
  160. package/lib/locale/id/id.json +5 -1
  161. package/lib/meta-comp/components/Button/editable.js +3 -1
  162. package/lib/meta-comp/components/Button/index.js +2 -1
  163. package/lib/meta-comp/components/Image/index.js +11 -4
  164. package/lib/meta-comp/components/Image/index.less +7 -0
  165. package/lib/utils/commonUtil.js +4 -1
  166. package/lib/utils/pluginsUtil.js +1 -0
  167. package/package.json +3 -1
@@ -3,6 +3,7 @@
3
3
  * {
4
4
  box-sizing: border-box;
5
5
  }
6
+
6
7
  body {
7
8
  margin: 0;
8
9
  }
@@ -63,6 +63,8 @@ function (_super) {
63
63
  var _a = this.props,
64
64
  data = _a.data,
65
65
  configCompSpace = _a.configCompSpace,
66
+ configLineSpace = _a.configLineSpace,
67
+ configColumnSpace = _a.configColumnSpace,
66
68
  configWidth = _a.configWidth,
67
69
  fillUpWidth = _a.fillUpWidth;
68
70
  var obj = data[window.magicDesign.device] || {};
@@ -153,11 +155,39 @@ function (_super) {
153
155
  value: {
154
156
  count: obj.marginBottom
155
157
  }
158
+ })), configLineSpace && /*#__PURE__*/_react["default"].createElement(_common.Field, {
159
+ title: (0, _locale.i18n)('LINE_SPACING')
160
+ }, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
161
+ maxVal: 100,
162
+ minVal: 0,
163
+ onChange: function onChange(value) {
164
+ obj.lineSpace = value.count;
165
+
166
+ _this.selfRender();
167
+ },
168
+ value: {
169
+ count: obj.lineSpace
170
+ }
171
+ })), configColumnSpace && /*#__PURE__*/_react["default"].createElement(_common.Field, {
172
+ title: (0, _locale.i18n)('COLUMN_SPACING')
173
+ }, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
174
+ maxVal: 100,
175
+ minVal: 0,
176
+ onChange: function onChange(value) {
177
+ obj.columnSpace = value.count;
178
+
179
+ _this.selfRender();
180
+ },
181
+ value: {
182
+ count: obj.columnSpace
183
+ }
156
184
  })));
157
185
  };
158
186
 
159
187
  SpacingConfig.defaultProps = {
160
188
  configCompSpace: true,
189
+ configLineSpace: false,
190
+ configColumnSpace: false,
161
191
  configWidth: false,
162
192
  fillUpWidth: false,
163
193
  data: {
@@ -0,0 +1,313 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.groupSourceJSON = exports.getDefaultJSON = void 0;
7
+
8
+ var _uuid = require("uuid");
9
+
10
+ var groupSourceJSON = function groupSourceJSON(parentId, text) {
11
+ var groupId = (0, _uuid.v4)();
12
+ return {
13
+ id: groupId,
14
+ parentId: parentId,
15
+ groupName: {
16
+ parentId: groupId,
17
+ id: (0, _uuid.v4)(),
18
+ open: true,
19
+ type: 'BUTTON',
20
+ text: text,
21
+ content: {
22
+ url: '',
23
+ backgroundColor: ''
24
+ },
25
+ buttonText: {
26
+ sizeType: 'Customize font styles',
27
+ fontFamily: 'Open Sans',
28
+ fontWeight: 600,
29
+ pcFontSize: 14,
30
+ fontStyle: 'normal',
31
+ color: '#232F46'
32
+ },
33
+ buttonBorder: {
34
+ open: false,
35
+ borderColor: '',
36
+ borderRadius: 6
37
+ },
38
+ spacing: {
39
+ pc: {
40
+ paddingTop: 0,
41
+ paddingBottom: 0,
42
+ paddingLeft: 0,
43
+ paddingRight: 0
44
+ },
45
+ mobile: {
46
+ paddingTop: 0,
47
+ paddingBottom: 0,
48
+ paddingLeft: 0,
49
+ paddingRight: 0
50
+ }
51
+ },
52
+ buttonIcon: {
53
+ iconUrl: '',
54
+ layout: 'right'
55
+ },
56
+ hover: null
57
+ },
58
+ image: {
59
+ parentId: groupId,
60
+ id: (0, _uuid.v4)(),
61
+ open: true,
62
+ type: 'IMAGE',
63
+ content: {
64
+ h5Name: '',
65
+ pcName: '',
66
+ h5ImgSrc: '',
67
+ pcImgSrc: '',
68
+ clickUrl: ''
69
+ },
70
+ hover: {
71
+ open: false,
72
+ backgroundType: 'enlarge',
73
+ magnification: 1.5,
74
+ pcImgHoverUrl: '',
75
+ h5ImgHoverUrl: ''
76
+ }
77
+ },
78
+ title: {
79
+ parentId: groupId,
80
+ id: (0, _uuid.v4)(),
81
+ open: true,
82
+ type: 'TEXT',
83
+ specialContent: [],
84
+ text: 'title',
85
+ content: {
86
+ sizeType: 'Customize font styles',
87
+ fontFamily: 'Open Sans',
88
+ fontWeight: 700,
89
+ pcFontSize: 29,
90
+ color: '#232F46',
91
+ textAlign: 'center'
92
+ },
93
+ underline: {
94
+ open: false,
95
+ textDecorationColor: '',
96
+ textDecorationStyle: 'solid'
97
+ },
98
+ vertical: {}
99
+ },
100
+ text: {
101
+ parentId: groupId,
102
+ id: (0, _uuid.v4)(),
103
+ open: true,
104
+ type: 'TEXT',
105
+ specialContent: [],
106
+ text: 'text',
107
+ content: {
108
+ sizeType: 'Customize font styles',
109
+ fontFamily: 'Open Sans',
110
+ fontWeight: 600,
111
+ pcFontSize: 14,
112
+ color: '#232F46',
113
+ textAlign: 'center'
114
+ },
115
+ underline: {
116
+ open: false,
117
+ textDecorationColor: '',
118
+ textDecorationStyle: 'solid'
119
+ },
120
+ vertical: {}
121
+ },
122
+ button: {
123
+ parentId: groupId,
124
+ id: (0, _uuid.v4)(),
125
+ open: true,
126
+ type: 'BUTTON',
127
+ text: 'Button',
128
+ content: {
129
+ url: '',
130
+ backgroundColor: '#232F46'
131
+ },
132
+ buttonText: {
133
+ sizeType: 'Customize font styles',
134
+ fontFamily: 'Open Sans',
135
+ fontWeight: 600,
136
+ pcFontSize: 14,
137
+ fontStyle: 'normal',
138
+ color: '#fff'
139
+ },
140
+ buttonBorder: {
141
+ open: true,
142
+ borderColor: '',
143
+ borderRadius: 100
144
+ },
145
+ spacing: {
146
+ pc: {
147
+ paddingTop: 8,
148
+ paddingBottom: 8,
149
+ paddingLeft: 12,
150
+ paddingRight: 12
151
+ },
152
+ mobile: {
153
+ paddingTop: 0,
154
+ paddingBottom: 0,
155
+ paddingLeft: 0,
156
+ paddingRight: 0
157
+ }
158
+ },
159
+ buttonIcon: {
160
+ iconUrl: '',
161
+ layout: 'right'
162
+ },
163
+ hover: null
164
+ },
165
+ secondaryButton: {
166
+ parentId: groupId,
167
+ id: (0, _uuid.v4)(),
168
+ open: true,
169
+ type: 'BUTTON',
170
+ text: 'Secondary Button',
171
+ content: {
172
+ url: '',
173
+ backgroundColor: ''
174
+ },
175
+ buttonText: {
176
+ sizeType: 'Customize font styles',
177
+ fontFamily: 'Open Sans',
178
+ fontWeight: 600,
179
+ pcFontSize: 14,
180
+ fontStyle: 'normal',
181
+ color: '#232F46'
182
+ },
183
+ buttonBorder: {
184
+ open: true,
185
+ borderColor: '',
186
+ borderRadius: 100
187
+ },
188
+ spacing: {
189
+ pc: {
190
+ paddingTop: 8,
191
+ paddingBottom: 8,
192
+ paddingLeft: 0,
193
+ paddingRight: 0
194
+ },
195
+ mobile: {
196
+ paddingTop: 0,
197
+ paddingBottom: 0,
198
+ paddingLeft: 0,
199
+ paddingRight: 0
200
+ }
201
+ },
202
+ buttonIcon: {
203
+ iconUrl: '',
204
+ layout: 'right'
205
+ },
206
+ hover: null
207
+ },
208
+ hover: {
209
+ open: true,
210
+ groupName: {
211
+ parentId: groupId,
212
+ id: (0, _uuid.v4)(),
213
+ open: true,
214
+ type: 'BUTTON',
215
+ text: text,
216
+ content: {
217
+ url: '',
218
+ backgroundColor: ''
219
+ },
220
+ buttonText: {
221
+ sizeType: 'Customize font styles',
222
+ fontFamily: 'Open Sans',
223
+ fontWeight: 700,
224
+ pcFontSize: 14,
225
+ fontStyle: 'normal',
226
+ color: '#232F46'
227
+ },
228
+ buttonBorder: {
229
+ open: false,
230
+ borderColor: '',
231
+ borderRadius: 6
232
+ },
233
+ spacing: {
234
+ pc: {
235
+ paddingTop: 0,
236
+ paddingBottom: 0,
237
+ paddingLeft: 0,
238
+ paddingRight: 0
239
+ },
240
+ mobile: {
241
+ paddingTop: 0,
242
+ paddingBottom: 0,
243
+ paddingLeft: 0,
244
+ paddingRight: 0
245
+ }
246
+ },
247
+ buttonIcon: {
248
+ iconUrl: '',
249
+ layout: 'right'
250
+ },
251
+ hover: null
252
+ }
253
+ }
254
+ };
255
+ };
256
+
257
+ exports.groupSourceJSON = groupSourceJSON;
258
+
259
+ var getDefaultJSON = function getDefaultJSON() {
260
+ var groupId = (0, _uuid.v4)();
261
+ return {
262
+ id: groupId,
263
+ type: 'GROUPED_CAROUSEL',
264
+ title: {
265
+ headline: {
266
+ id: (0, _uuid.v4)(),
267
+ open: true,
268
+ type: 'TEXT',
269
+ specialContent: [],
270
+ text: 'Headline',
271
+ content: {
272
+ sizeType: 'Customize font styles',
273
+ fontFamily: 'Open Sans',
274
+ fontWeight: 700,
275
+ pcFontSize: 29,
276
+ color: '#232F46',
277
+ textAlign: 'center'
278
+ },
279
+ underline: {
280
+ open: false,
281
+ textDecorationColor: '',
282
+ textDecorationStyle: 'solid'
283
+ },
284
+ vertical: {
285
+ open: false,
286
+ lineHeight: 18
287
+ }
288
+ }
289
+ },
290
+ groupSource: [groupSourceJSON(groupId, 'Group Name'), groupSourceJSON(groupId, 'Group Name'), groupSourceJSON(groupId, 'Group Name')],
291
+ spacing: {
292
+ pc: {
293
+ paddingTop: 0,
294
+ paddingBottom: 0,
295
+ paddingLeft: 0,
296
+ paddingRight: 0,
297
+ marginBottom: window.magicDesign.compSpacing * 1.5
298
+ },
299
+ mobile: {
300
+ paddingTop: 0,
301
+ paddingBottom: 0,
302
+ paddingLeft: 0,
303
+ paddingRight: 0,
304
+ marginBottom: window.magicDesign.compSpacing
305
+ }
306
+ },
307
+ customize: {
308
+ layout: 'layout1'
309
+ }
310
+ };
311
+ };
312
+
313
+ exports.getDefaultJSON = getDefaultJSON;
@@ -0,0 +1,86 @@
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 _pc = _interopRequireDefault(require("./pc"));
11
+
12
+ var _defaultJSON = require("./defaultJSON");
13
+
14
+ var _coreUtil = require("../../../../utils/coreUtil");
15
+
16
+ var _compositeDecorator = _interopRequireDefault(require("../../../../decorator/compositeDecorator"));
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 GroupedCarousel =
63
+ /** @class */
64
+ function (_super) {
65
+ __extends(GroupedCarousel, _super);
66
+
67
+ function GroupedCarousel() {
68
+ return _super !== null && _super.apply(this, arguments) || this;
69
+ }
70
+
71
+ GroupedCarousel.prototype.render = function () {
72
+ var nodeData = this.props.nodeData;
73
+ return /*#__PURE__*/_react["default"].createElement("div", null, (0, _coreUtil.isPc)() ? /*#__PURE__*/_react["default"].createElement(_pc["default"], {
74
+ panelProps: nodeData
75
+ }) : null);
76
+ };
77
+
78
+ GroupedCarousel.defaultProps = {};
79
+ GroupedCarousel.type = 'GROUPED_CAROUSEL';
80
+ GroupedCarousel.getDefaultJSON = _defaultJSON.getDefaultJSON;
81
+ GroupedCarousel = __decorate([_compositeDecorator["default"]], GroupedCarousel);
82
+ return GroupedCarousel;
83
+ }(_react.Component);
84
+
85
+ var _default = GroupedCarousel;
86
+ exports["default"] = _default;
@@ -0,0 +1,194 @@
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("antd");
13
+
14
+ var _components = require("../../../../../meta-comp/components");
15
+
16
+ var _mobx = require("../../../../../mobx");
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 GroupedCarouselPc =
47
+ /** @class */
48
+ function (_super) {
49
+ __extends(GroupedCarouselPc, _super);
50
+
51
+ function GroupedCarouselPc() {
52
+ var _this = _super !== null && _super.apply(this, arguments) || this;
53
+
54
+ _this.state = {
55
+ tabIndex: 0
56
+ };
57
+ _this.carouselImgRef = /*#__PURE__*/_react["default"].createRef();
58
+ _this.carouselTextRef = /*#__PURE__*/_react["default"].createRef();
59
+ _this.destroy = null;
60
+
61
+ _this.bannerGoto = function (groupSource) {
62
+ var nextIndex = groupSource.findIndex(function (item) {
63
+ return item.id === _mobx.store.clickedGroup;
64
+ });
65
+ console.log('nextIndex', nextIndex);
66
+
67
+ if (nextIndex != -1 && nextIndex != _this.state.tabIndex) {
68
+ _this.carouselImgRef.current.goTo(nextIndex);
69
+
70
+ _this.carouselTextRef.current.goTo(nextIndex);
71
+ }
72
+ };
73
+
74
+ _this.onTabClick = function (e, index) {
75
+ var tabIndex = _this.state.tabIndex;
76
+ if (tabIndex === index) return;
77
+
78
+ _this.setState({
79
+ tabIndex: index
80
+ });
81
+
82
+ _this.carouselImgRef.current.goTo(index);
83
+
84
+ setTimeout(function () {
85
+ _this.carouselTextRef.current.goTo(index);
86
+ }, 300);
87
+ };
88
+
89
+ return _this;
90
+ }
91
+
92
+ GroupedCarouselPc.prototype.componentDidMount = function () {
93
+ var _this = this;
94
+
95
+ this.destroy = (0, _mobx.autorun)(function () {
96
+ _this.bannerGoto(_this.props.panelProps.groupSource);
97
+ });
98
+ };
99
+
100
+ GroupedCarouselPc.prototype.componentWillReceiveProps = function (nextProps) {
101
+ this.bannerGoto(nextProps.panelProps.groupSource);
102
+ };
103
+
104
+ GroupedCarouselPc.prototype.componentWillUnmount = function () {
105
+ this.destroy();
106
+ };
107
+
108
+ GroupedCarouselPc.prototype.render = function () {
109
+ var _this = this;
110
+
111
+ var panelProps = this.props.panelProps;
112
+ var groupSource = panelProps.groupSource;
113
+ var tabIndex = this.state.tabIndex; // const isDivide = groupSource.length <= 3;
114
+
115
+ return /*#__PURE__*/_react["default"].createElement("div", {
116
+ className: "m-grouped-carousel-pc"
117
+ }, panelProps.title.headline.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
118
+ className: "title",
119
+ data: panelProps.title.headline
120
+ }), /*#__PURE__*/_react["default"].createElement("div", {
121
+ className: "tab-select-wrap"
122
+ }, groupSource.map(function (tab, index) {
123
+ return /*#__PURE__*/_react["default"].createElement("div", {
124
+ key: tab.id,
125
+ className: "tab-title",
126
+ onClick: function onClick(e) {
127
+ _this.onTabClick(e, index);
128
+ }
129
+ }, tab.groupName.open && (tabIndex === index ? /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
130
+ data: tab.hover.groupName,
131
+ onTextInput: function onTextInput(text) {
132
+ tab.groupName.text = text;
133
+ }
134
+ }) : /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
135
+ data: tab.groupName,
136
+ onTextInput: function onTextInput(text) {
137
+ tab.hover.groupName.text = text;
138
+ }
139
+ })));
140
+ })), /*#__PURE__*/_react["default"].createElement("div", {
141
+ className: "tab-content"
142
+ }, /*#__PURE__*/_react["default"].createElement(_antd.Carousel, {
143
+ ref: this.carouselImgRef,
144
+ afterChange: function afterChange(n) {
145
+ return _this.setState({
146
+ tabIndex: n
147
+ });
148
+ },
149
+ autoplay: false,
150
+ autoplaySpeed: 3000,
151
+ className: "carousel-img",
152
+ dots: false
153
+ }, groupSource.map(function (m) {
154
+ return /*#__PURE__*/_react["default"].createElement("div", {
155
+ key: m.image.id
156
+ }, m.image.open && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
157
+ className: "bgImg",
158
+ data: m.image,
159
+ imgCover: true,
160
+ isBackground: true
161
+ }));
162
+ })), /*#__PURE__*/_react["default"].createElement(_antd.Carousel, {
163
+ ref: this.carouselTextRef,
164
+ autoplay: false,
165
+ autoplaySpeed: 1000,
166
+ dots: false
167
+ }, groupSource.map(function (m) {
168
+ return /*#__PURE__*/_react["default"].createElement("div", {
169
+ key: m.id,
170
+ className: "text-wrap"
171
+ }, m.title.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
172
+ className: "title",
173
+ data: m.title
174
+ }), m.text.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
175
+ className: "text",
176
+ data: m.text
177
+ }), /*#__PURE__*/_react["default"].createElement("div", {
178
+ className: "btn-wrap"
179
+ }, m.secondaryButton.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
180
+ data: m.secondaryButton
181
+ }), m.button.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
182
+ data: m.button
183
+ })));
184
+ }))));
185
+ };
186
+
187
+ GroupedCarouselPc.defaultProps = {
188
+ panelProps: {}
189
+ };
190
+ return GroupedCarouselPc;
191
+ }(_react["default"].Component);
192
+
193
+ var _default = GroupedCarouselPc;
194
+ exports["default"] = _default;