@fonixtree/magic-design 0.0.37 → 0.0.38

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 (96) hide show
  1. package/README.md +320 -0
  2. package/es/assets/fonts/magic-box-iconfont.css +11 -3
  3. package/es/assets/fonts/magic-box-iconfont.css.bak +11 -3
  4. package/es/assets/fonts/magic-box-iconfont.js +1 -1
  5. package/es/assets/fonts/magic-box-iconfont.js.bak +1 -1
  6. package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
  7. package/es/assets/fonts/magic-box-iconfont.woff +0 -0
  8. package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
  9. package/es/assets/images/layout-icon/layout-navigation-newline.png +0 -0
  10. package/es/assets/images/layout-icon/layout-navigation-tile.png +0 -0
  11. package/es/common/FontStyles/index.js +25 -6
  12. package/es/common/ProductSource/index.less +2 -0
  13. package/es/composite-comp/common/components/ProductItem/index.js +23 -5
  14. package/es/composite-comp/common/components/ProductItem/index.less +46 -11
  15. package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +21 -4
  16. package/es/composite-comp/dito/components/FlashDeal/mobile/index.less +6 -0
  17. package/es/composite-comp/dito/components/MobileNavigation/defaultJSON.js +94 -0
  18. package/es/composite-comp/dito/components/MobileNavigation/index.js +84 -0
  19. package/es/composite-comp/dito/components/MobileNavigation/mobile/index.js +129 -0
  20. package/es/composite-comp/dito/components/MobileNavigation/mobile/index.less +292 -0
  21. package/es/composite-comp/dito/components/Recommend/defaultJSON.js +95 -15
  22. package/es/composite-comp/dito/components/Recommend/index.js +10 -1
  23. package/es/composite-comp/dito/components/Recommend/mobile/index.js +208 -77
  24. package/es/composite-comp/dito/components/Recommend/mobile/index.less +28 -27
  25. package/es/composite-comp/dito/components/Recommend/pc/imgs/defImg1.png +0 -0
  26. package/es/composite-comp/dito/components/Recommend/pc/imgs/defImg2.png +0 -0
  27. package/es/composite-comp/dito/components/Recommend/pc/imgs/defImg3.png +0 -0
  28. package/es/composite-comp/dito/components/Recommend/pc/index.js +661 -0
  29. package/es/composite-comp/dito/components/Recommend/pc/index.less +80 -0
  30. package/es/composite-comp/dito/components/SearchBar/mobile/index.js +187 -4
  31. package/es/composite-comp/dito/components/SearchBar/mobile/index.less +20 -20
  32. package/es/composite-comp/dito/config-panels/MobileNavigationConfig/MobileNavigationConfigGroup/index.js +126 -0
  33. package/es/composite-comp/dito/config-panels/MobileNavigationConfig/index.js +184 -0
  34. package/es/composite-comp/dito/config-panels/RecommendConfig/index.js +115 -44
  35. package/es/composite-comp/dito/second-config-panels/MobileNavigationSecondConfig/index.js +111 -0
  36. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +1 -3
  37. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +89 -59
  38. package/es/constants/component-types.js +9 -3
  39. package/es/constants/index.js +5 -1
  40. package/es/constants/layout.js +31 -3
  41. package/es/core/Designer/ConfigPanel/index.js +5 -1
  42. package/es/locale/en/en.json +8 -1
  43. package/es/locale/es/es.json +12 -4
  44. package/es/locale/id/id.json +8 -1
  45. package/es/meta-comp/components/Button/index.less +1 -0
  46. package/es/meta-comp/components/Image/image/defalut-img.png +0 -0
  47. package/es/meta-comp/config-panels/TextConfig/index.js +1 -0
  48. package/lib/assets/fonts/magic-box-iconfont.css +11 -3
  49. package/lib/assets/fonts/magic-box-iconfont.css.bak +11 -3
  50. package/lib/assets/fonts/magic-box-iconfont.js +1 -1
  51. package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -1
  52. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  53. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  54. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  55. package/lib/assets/images/layout-icon/layout-navigation-newline.png +0 -0
  56. package/lib/assets/images/layout-icon/layout-navigation-tile.png +0 -0
  57. package/lib/common/FontStyles/index.js +25 -6
  58. package/lib/common/ProductSource/index.less +2 -0
  59. package/lib/composite-comp/common/components/ProductItem/index.js +23 -5
  60. package/lib/composite-comp/common/components/ProductItem/index.less +46 -11
  61. package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +21 -4
  62. package/lib/composite-comp/dito/components/FlashDeal/mobile/index.less +6 -0
  63. package/lib/composite-comp/dito/components/MobileNavigation/defaultJSON.js +94 -0
  64. package/lib/composite-comp/dito/components/MobileNavigation/index.js +84 -0
  65. package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.js +129 -0
  66. package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.less +292 -0
  67. package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +95 -15
  68. package/lib/composite-comp/dito/components/Recommend/index.js +10 -1
  69. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +208 -77
  70. package/lib/composite-comp/dito/components/Recommend/mobile/index.less +28 -27
  71. package/lib/composite-comp/dito/components/Recommend/pc/imgs/defImg1.png +0 -0
  72. package/lib/composite-comp/dito/components/Recommend/pc/imgs/defImg2.png +0 -0
  73. package/lib/composite-comp/dito/components/Recommend/pc/imgs/defImg3.png +0 -0
  74. package/lib/composite-comp/dito/components/Recommend/pc/index.js +661 -0
  75. package/lib/composite-comp/dito/components/Recommend/pc/index.less +80 -0
  76. package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +187 -4
  77. package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +20 -20
  78. package/lib/composite-comp/dito/config-panels/MobileNavigationConfig/MobileNavigationConfigGroup/index.js +126 -0
  79. package/lib/composite-comp/dito/config-panels/MobileNavigationConfig/index.js +184 -0
  80. package/lib/composite-comp/dito/config-panels/RecommendConfig/index.js +115 -44
  81. package/lib/composite-comp/dito/second-config-panels/MobileNavigationSecondConfig/index.js +111 -0
  82. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +1 -3
  83. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +89 -59
  84. package/lib/constants/component-types.js +9 -3
  85. package/lib/constants/index.js +5 -1
  86. package/lib/constants/layout.js +31 -3
  87. package/lib/core/Designer/ConfigPanel/index.js +5 -1
  88. package/lib/locale/en/en.json +8 -1
  89. package/lib/locale/es/es.json +12 -4
  90. package/lib/locale/id/id.json +8 -1
  91. package/lib/meta-comp/components/Button/index.less +1 -0
  92. package/lib/meta-comp/components/Image/image/defalut-img.png +0 -0
  93. package/lib/meta-comp/config-panels/TextConfig/index.js +1 -0
  94. package/package.json +86 -1
  95. package/es/composite-comp/dito/config-panels/RecommendConfig/imgs/layout1.png +0 -0
  96. package/lib/composite-comp/dito/config-panels/RecommendConfig/imgs/layout1.png +0 -0
package/README.md ADDED
@@ -0,0 +1,320 @@
1
+ # 快捷指令使用
2
+
3
+ ## 1、发布 -- npm run pub
4
+
5
+ ## 2、新增国际化 -- npm run cl "Hello world"
6
+
7
+ ## 3、更新iconfont -- npm run iconfont
8
+
9
+
10
+ # 设计器二期
11
+
12
+ ## 1、基本概念
13
+
14
+ ### 1.1、元组件:构成复合组件的最小单位
15
+
16
+ Text、Image、Button、Divider、Video 等
17
+
18
+ ### 1.2、复合组件:由若干个元组件构成的一个大组件
19
+
20
+ Text、Banner、Image Gallery、Image and Text、Carousel、Reward、Newsletter 等
21
+
22
+ ### 1.3、业务公共组件:项目中复用的公共组件
23
+
24
+ 所有的公共组件需要开放 value 和 onChange Api(除 Button、Iconfont)
25
+
26
+ Button、Iconfont、AlignSelecter、Collapse、ColorPicker、ImagePicker、LayoutSelecter、Slider、UrlPicker
27
+
28
+ ## 2、元组件
29
+
30
+ ### 2.1
31
+
32
+ 元组件类型:
33
+
34
+ TEXT、IMAGE、BUTTON、DIVIDER、VIDEO
35
+
36
+ 元组件报文格式:
37
+
38
+ ```json
39
+ {
40
+ id:'xxxx' //元组件key
41
+ type: 'TYPE', //元组件类型
42
+ style:{
43
+ fontFamily:'xxx', //字体
44
+ ...css //属性名称尽量使用标准css名称
45
+ },
46
+ hoverStyle:{
47
+
48
+ }
49
+ }
50
+ ```
51
+
52
+ 动态设置 hover 效果
53
+
54
+ onMouseEnter={e => { e.target.style.color = 'red'; }}
55
+
56
+ onMouseLeave={e => { e.target.style.color = 'white'; }}
57
+
58
+ 文本可编辑
59
+
60
+ contenteditable="true"
61
+
62
+ ### 2.2 、元组件报文
63
+
64
+ #### Text
65
+
66
+ ```json
67
+ {
68
+ id:'xxxx' //元组件key
69
+ type: 'TYPE', //元组件类型
70
+ content:'this is text',
71
+ style:{
72
+ fontFamily:'xxx', //字体
73
+ fontSize: '14px',
74
+ width: '200px',
75
+ ...css
76
+ }
77
+ }
78
+ ```
79
+
80
+ #### Image
81
+
82
+ ```json
83
+ {
84
+ id:'xxxx' //元组件key
85
+ type: 'IMAGE', //元组件类型
86
+ name:'123.png',
87
+ src:'../image.png', //图片地址
88
+ url:'www.baidu.com', //图片跳转地址
89
+ style:{
90
+ width: '200px',
91
+ ...css
92
+ },
93
+ hoverStyle:{ //hover 类型为new时保存src,类型为enlarge时保存scale
94
+ scale: '2',
95
+ src:'../image1.png',
96
+ }
97
+ }
98
+ ```
99
+
100
+ #### Button
101
+
102
+ ```json
103
+ {
104
+ id:'xxxx' //元组件key
105
+ type: 'BUTTON', //元组件类型
106
+ name:'Submit',
107
+ url: 'www.baidu.com',
108
+ style:{
109
+ buttonIconSrc:'../img.png',
110
+ buttonIconPlace: 'left',
111
+ color:'#FEFEFE',
112
+ border: '1px solid red',
113
+ borderRadius:'10px',
114
+ fontFamily:'xxx', //字体
115
+ fontSize: '14px',
116
+ ...css
117
+ },
118
+ hoverStyle {
119
+ color:'#FEFEFE',
120
+ border: '1px solid red',
121
+ fontFamily:'xxx', //字体
122
+ fontSize: '14px',
123
+ ...css
124
+ }
125
+ }
126
+ ```
127
+
128
+ ## 2、复合组件
129
+
130
+ ### 2.1
131
+
132
+ 元组件类型:
133
+
134
+ TEXT、BANNER、IMAGE_GALLERT、IMAGE_TEXT、CAROUSEL、REWARD、NEWSLETTER
135
+
136
+ 复合组件报文格式:
137
+
138
+ ```json
139
+ {
140
+ id:'xxxx' //复合组件key
141
+ type: 'TYPE', //复合组件类型
142
+ setting:{ //开关类型的配置及属性配置放在这里
143
+ autoplays: 3, //3秒轮播
144
+ },
145
+ groupSource:[], //元组件集合组数据放在这里
146
+ metas:{
147
+ title:{
148
+ open:false,
149
+ type:'IMAGE'
150
+ ...metaCompJson
151
+ },
152
+ subTitle:{
153
+ open:false,
154
+ type:'IMAGE'
155
+ ...metaCompJson
156
+ }
157
+ },
158
+ customize:{
159
+ layout:'',
160
+ background:{
161
+
162
+ }
163
+ }
164
+ }
165
+ ```
166
+
167
+ #### Text
168
+
169
+ ```js
170
+ {
171
+ id: 'xxxx', //复合组件key
172
+ type: 'TEXT', //复合组件类型
173
+ setting:{
174
+ layout:'left', // 模块布局 left/center/right ,每一个layout可能都是一个不同的组件
175
+ title:{
176
+ type:'TEXT'
177
+ ...metaCompJson
178
+ },
179
+ subtitle:{
180
+ type:'TEXT'
181
+ ...metaCompJson
182
+ },
183
+ },
184
+ source:[
185
+ { //此处可以抽出业务组件
186
+ title:{
187
+ type:'TEXT'
188
+ ...metaCompJson
189
+ },
190
+ content:{
191
+ type:'TEXT'
192
+ ...metaCompJson
193
+ }
194
+ }
195
+ ],
196
+ style:{
197
+ align:'left', //文本布局 left/center/right
198
+ backgroundColor: 'red',
199
+ backgroundImage:'../image.png'
200
+ }
201
+ }
202
+ ```
203
+
204
+ #### Banner
205
+
206
+ modifySetting
207
+
208
+ ```json
209
+ {
210
+ "comositeId": "1111",
211
+
212
+ "value": {
213
+ "autoplays": 4
214
+ }
215
+ }
216
+ ```
217
+
218
+ ```json
219
+ {
220
+ id: 'xxxx',
221
+ type: 'BANNER',
222
+ setting:{
223
+ open:false
224
+ autoplays: 3, //3秒轮播
225
+ arrows:{ // 滚动箭头
226
+ open:false,
227
+ color:'red',
228
+ size:'',
229
+ hoverSize:'',
230
+ hoverColor:'green',
231
+ },
232
+ dots:{ //面板指示点
233
+ open:false,
234
+ color: 'red',
235
+ size:'',
236
+ hoverSize:''
237
+ hoverColor:'green',
238
+ },
239
+ },
240
+ groupSource:[
241
+ { //此处可以作为一个业务组件
242
+ id:'xxxxx',
243
+ image:{
244
+ open:false,
245
+ type:'IMAGE'
246
+ ...metaCompJson
247
+ },
248
+ title:{
249
+ open:false,
250
+ type:'TEXT',
251
+ ...metaCompJson
252
+ },
253
+ content:{
254
+ open:false,
255
+ type:'TEXT',
256
+ ...metaCompJson
257
+ },
258
+ button:{
259
+ type:'BUTTON',
260
+ ...metaCompJson
261
+ },
262
+ secondaryButton:{
263
+ type:'BUTTON',
264
+ ...metaCompJson
265
+ },
266
+ layout:'center',
267
+ align:'left',
268
+ //文本布局 left/center/right
269
+ }
270
+ ]
271
+ }
272
+ ```
273
+
274
+ #### Image Gallery
275
+
276
+ ```json
277
+
278
+ ```
279
+
280
+ #### Image and Text
281
+
282
+ ```json
283
+ {
284
+ id:'xxxx'
285
+ type: 'IMAGE_TEXT',
286
+ setting:{
287
+ layout:'left',
288
+ title:{},
289
+ subtitle:{},
290
+ button:{},
291
+ secondaryButton:{}
292
+ },
293
+ source:[
294
+
295
+ ],
296
+ style:{
297
+ align:'left',
298
+ backgroundColor:'red',
299
+ backgroundImage:'./img.png'
300
+ }
301
+ }
302
+ ```
303
+
304
+ 疑问:
305
+
306
+ Text 元组件
307
+
308
+ 文字链接配置好之后,怎么删除
309
+
310
+ 链接配置的规则,按单词还是字符
311
+
312
+ image 元组件
313
+
314
+ 属性控制进度条和输入框是否要限制最大最小值
315
+
316
+ button 元组件
317
+
318
+ 是否需要 icon 的 hover 效果
319
+
320
+ banner 中的 text Align 放在元组件里?
@@ -1,8 +1,8 @@
1
1
  @font-face {
2
2
  font-family: "magic-box-iconfont"; /* Project id 3317752 */
3
- src: url('magic-box-iconfont.woff2?t=1662098163638') format('woff2'),
4
- url('magic-box-iconfont.woff?t=1662098163638') format('woff'),
5
- url('magic-box-iconfont.ttf?t=1662098163638') format('truetype');
3
+ src: url('magic-box-iconfont.woff2?t=1663899948530') format('woff2'),
4
+ url('magic-box-iconfont.woff?t=1663899948530') format('woff'),
5
+ url('magic-box-iconfont.ttf?t=1663899948530') format('truetype');
6
6
  }
7
7
 
8
8
  .magic-box-iconfont {
@@ -13,6 +13,14 @@
13
13
  -moz-osx-font-smoothing: grayscale;
14
14
  }
15
15
 
16
+ .magic-box-icon-bg-color:before {
17
+ content: "\e63f";
18
+ }
19
+
20
+ .magic-box-icon-Mobile:before {
21
+ content: "\e63e";
22
+ }
23
+
16
24
  .magic-box-icon-newsletter:before {
17
25
  content: "\e62e";
18
26
  }
@@ -1,8 +1,8 @@
1
1
  @font-face {
2
2
  font-family: "magic-box-iconfont"; /* Project id 3317752 */
3
- src: url('magic-box-iconfont.woff2?t=1662098163638') format('woff2'),
4
- url('magic-box-iconfont.woff?t=1662098163638') format('woff'),
5
- url('magic-box-iconfont.ttf?t=1662098163638') format('truetype');
3
+ src: url('magic-box-iconfont.woff2?t=1663899948530') format('woff2'),
4
+ url('magic-box-iconfont.woff?t=1663899948530') format('woff'),
5
+ url('magic-box-iconfont.ttf?t=1663899948530') format('truetype');
6
6
  }
7
7
 
8
8
  .magic-box-iconfont {
@@ -13,6 +13,14 @@
13
13
  -moz-osx-font-smoothing: grayscale;
14
14
  }
15
15
 
16
+ .icon-bg-color:before {
17
+ content: "\e63f";
18
+ }
19
+
20
+ .icon-Mobile:before {
21
+ content: "\e63e";
22
+ }
23
+
16
24
  .icon-newsletter:before {
17
25
  content: "\e62e";
18
26
  }