@capillarytech/creatives-library 3.6.8 → 3.6.10

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 (29) hide show
  1. package/components/TemplatePreview/WechatRichmediaTemplatePreview/index.js +8 -7
  2. package/components/TemplatePreview/_templatePreview.scss +21 -280
  3. package/components/TemplatePreview/index.js +20 -180
  4. package/components/TemplatePreview/messages.js +0 -16
  5. package/package.json +1 -1
  6. package/v2Components/FormBuilder/index.js +6 -15
  7. package/v2Components/MobilePushPreviewV2/index.js +32 -40
  8. package/v2Components/MobilePushPreviewV2/messages.js +8 -0
  9. package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/_wechatRichmediaTemplatePrev.scss +0 -64
  10. package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/index.js +19 -101
  11. package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/messages.js +0 -12
  12. package/v2Components/TemplatePreview/_templatePreview.scss +4 -13
  13. package/v2Components/TemplatePreview/assets/images/WECHAT_5x.png +0 -0
  14. package/v2Components/TemplatePreview/index.js +20 -147
  15. package/v2Components/TemplatePreview/messages.js +0 -8
  16. package/v2Containers/CreativesContainer/SlideBoxContent.js +2 -15
  17. package/v2Containers/CreativesContainer/SlideBoxHeader.js +1 -1
  18. package/v2Containers/CreativesContainer/index.js +1 -3
  19. package/v2Containers/CreativesContainer/messages.js +2 -2
  20. package/v2Containers/Email/_email.scss +1 -7
  21. package/v2Containers/Email/index.js +13 -39
  22. package/v2Containers/Email/messages.js +0 -4
  23. package/v2Containers/EmailWrapper/index.js +0 -4
  24. package/v2Containers/MobilePush/Create/index.js +0 -5
  25. package/v2Containers/MobilePush/Edit/index.js +0 -5
  26. package/v2Containers/MobilepushWrapper/index.js +1 -4
  27. package/v2Containers/Sms/Create/index.js +1 -2
  28. package/v2Containers/Sms/Edit/index.js +0 -2
  29. package/v2Containers/Templates/index.js +8 -5
@@ -7,13 +7,14 @@
7
7
  import PropTypes from 'prop-types';
8
8
 
9
9
  import React from 'react';
10
- import { CapRow, CapColumn, CapButton, CapImage } from '@capillarytech/cap-react-ui-library/';
10
+ import { CapRow, CapColumn, CapButton } from '@capillarytech/cap-react-ui-library/';
11
11
  import { FormattedMessage } from 'react-intl';
12
12
  import _ from 'lodash';
13
13
  import SlideBox from '../../SlideBox';
14
14
  import './_wechatRichmediaTemplatePrev.scss';
15
15
  import messages from './messages';
16
- const wechatBody = require('../assets/images/wechat_mobile_android.svg');
16
+
17
+ const wechatBody = require('./../assets/images/WECHAT_5x.png');
17
18
 
18
19
  class WechatRichmediaTemplatePreview extends React.PureComponent { // eslint-disable-line react/prefer-stateless-function
19
20
  preparePreviewData = (mediaList) => {
@@ -24,7 +25,7 @@ class WechatRichmediaTemplatePreview extends React.PureComponent { // eslint-dis
24
25
  returnObj.push(
25
26
  <div style={{ width: "100%", height: 116, position: "relative" }}>
26
27
  <CapRow>
27
- <CapImage alt="default" width="100%" height="110px" src={contentData.image_url} />
28
+ <img alt="default" width="100%" height="110px" src={contentData.image_url} />
28
29
  <div className="preview-overflow-wrap-fields" style={{ position: "absolute", bottom: "5%", left: "5%" }}>{contentData.title ? contentData.title : ""}</div>
29
30
  </CapRow>
30
31
  {Object.keys(mediaList).length === 1 ?
@@ -43,7 +44,7 @@ class WechatRichmediaTemplatePreview extends React.PureComponent { // eslint-dis
43
44
  {contentData.title}
44
45
  </CapColumn>
45
46
  <CapColumn style={{ float: "right" }}>
46
- <CapImage alt="default" width="60px" height="60px" src={contentData.image_url} style={{ "padding-right": "10%", "float": "left" }}/>
47
+ <img alt="default" width="60px" height="60px" src={contentData.image_url} style={{ "padding-right": "10%", "float": "left" }}/>
47
48
  </CapColumn>
48
49
  </CapRow>
49
50
  );
@@ -59,7 +60,7 @@ class WechatRichmediaTemplatePreview extends React.PureComponent { // eslint-dis
59
60
  returnObj.push(
60
61
  <div style={{ width: "100%", height: 116, position: "relative" }}>
61
62
  <CapRow>
62
- <CapImage alt="default" width="100%" height="110px" src={contentData.image_url} />
63
+ <img alt="default" width="100%" height="110px" src={contentData.image_url} />
63
64
  <div className="preview-overflow-wrap-fields" style={{ position: "absolute", bottom: "5%", left: "10%", width: "auto" }}>{contentData.title ? contentData.title : ""}</div>
64
65
  </CapRow>
65
66
  {Object.keys(mediaList).length === 1 ?
@@ -78,7 +79,7 @@ class WechatRichmediaTemplatePreview extends React.PureComponent { // eslint-dis
78
79
  {contentData.title}
79
80
  </CapColumn>
80
81
  <CapColumn style={{ float: "right" }}>
81
- <CapImage alt="default" width="60px" height="60px" src={contentData.image_url}/>
82
+ <img alt="default" width="60px" height="60px" src={contentData.image_url}/>
82
83
  </CapColumn>
83
84
  </CapRow>
84
85
  );
@@ -100,7 +101,7 @@ class WechatRichmediaTemplatePreview extends React.PureComponent { // eslint-dis
100
101
  content={
101
102
  <div className={`preview-container ${this.props.type === 'embedded' ? 'embedded-preview' : ''}`}>
102
103
  <div className="shell align-center" id="sms-preview">
103
- <CapImage className="preview-image" src={wechatBody} alt="Preview is being generated"/>
104
+ <img className="preview-image" src={wechatBody} alt="Preview is being generated"/>
104
105
  <div className={this.props.type === 'embedded' ? "wechatMsgContainerOutbound" : "wechatMsgContainer"}>
105
106
  <div className={this.props.type === 'embedded' ? "overflow-handle-preview-outbound" : "overflow-handle-preview"}>{this.preparePreviewData(this.props.content)}
106
107
  </div>
@@ -1,262 +1,3 @@
1
- @import "~@capillarytech/cap-ui-library/styles/_variables.scss";
2
-
3
- .shell-lock-screen-ios{
4
- display: flex;
5
- flex-wrap: nowrap;
6
- .lock-screen-preview{
7
- margin: 0 20px 0 auto;
8
- .action-text-reply{
9
- position: absolute;
10
- left: 34%;
11
- top: 59%;
12
- color: #3861ca;
13
- font-weight: $FONT_WEIGHT_MEDIUM;
14
- }
15
- .action-text-cancel{
16
- position: absolute;
17
- left: 33.5%;
18
- top: 66%;
19
- color: #3861ca;
20
- font-weight: $FONT_WEIGHT_MEDIUM;
21
- }
22
- }
23
- .main-screen-preview{
24
- margin: 0 auto 0 20px;
25
- }
26
- .lock-screen-preview .lock-msgContainer{
27
- position: absolute;
28
- top: 40%;
29
- left: 25.9%;
30
- width: 21.5%;
31
- height: 60px;
32
- display: -webkit-box;
33
- display: -ms-flexbox;
34
- display: flex;
35
- overflow: hidden;
36
- &.wechat{
37
- width: 20.5%;
38
- left: 25.5%;
39
- }
40
- .sender-id-text{
41
- position: absolute;
42
- top: 16%;
43
- font-size: $FONT_SIZE_VS;
44
- left: 11%;
45
- font-weight: $FONT_WEIGHT_MEDIUM;
46
- }
47
- .message-text-container{
48
- width: 176px;
49
- left: 11%;
50
- top: 50%;
51
- position: absolute;
52
- text-align: left;
53
- text-overflow: ellipsis;
54
- }
55
- }
56
- .main-screen-preview .msgContainer{
57
- position: absolute;
58
- top: 30%;
59
- left: 53%;
60
- width: 42%;
61
- height: 336px;
62
- display: -webkit-box;
63
- display: -ms-flexbox;
64
- display: flex;
65
-
66
- .sms-icon{
67
- top: 0;
68
- left: 2px;
69
- width: 25px;
70
- position: absolute;
71
- }
72
- &.sms{
73
- height: 290px;
74
- width: 21%;
75
- .sms-icon{
76
- width: 20px;
77
- left: 14px;
78
- }
79
- }
80
-
81
- .message-pop{
82
- .unicode-disabled{
83
- font-size: $FONT_SIZE_L;
84
- }
85
- &.sms {
86
- max-height: 100%;
87
- position: absolute;
88
- // width: initial;
89
- overflow: auto;
90
- top: 0;
91
- white-space: pre-wrap;
92
- word-break: break-word;
93
- line-height: 14px;
94
- padding: 0 8px 8px 8px;
95
- font-size: $FONT_SIZE_VS;
96
- width: 100%;
97
- font-family: 'open-sans';
98
- .message-pop-item{
99
- padding: 4px;
100
- background: #3F51B5;
101
- color: $CAP_WHITE;
102
- margin-top: 8px;
103
- border-radius: 4px;
104
- min-height: 26px;
105
- &:first-child{
106
- margin-top: 0;
107
- }
108
- }
109
- }
110
- &.wechat{
111
- padding: 4px;
112
- background: #3F51B5;
113
- position: absolute;
114
- // width: initial;
115
- overflow: auto;
116
- top: 0;
117
- left: 2%;
118
- white-space: pre-wrap;
119
- word-break: break-word;
120
- border-radius: 4px;
121
- max-height: 100%;
122
- color: #FFFFFF;
123
- width: 45%;
124
- min-height: 26px;
125
- line-height: 14px;
126
- padding: 8px;
127
- font-size: $FONT_SIZE_VS;
128
- font-family: 'open-sans';
129
- }
130
- }
131
- }
132
- }
133
-
134
- .shell-lock-screen-android{
135
- display: flex;
136
- flex-wrap: nowrap;
137
- .lock-screen-preview{
138
- margin: 0 20px 0 auto;
139
- .action-text{
140
- position: absolute;
141
- left: 27.5%;
142
- top: 54%;
143
- font-size: $FONT_SIZE_VS;
144
- color: #3861ca;
145
- font-weight: $FONT_WEIGHT_MEDIUM;
146
- }
147
- }
148
- .main-screen-preview{
149
- margin: 0 auto 0 20px;
150
- }
151
- .lock-screen-preview .lock-msgContainer{
152
- position: absolute;
153
- top: 43%;
154
- left: 25.9%;
155
- width: 21.5%;
156
- height: 52px;
157
- display: -webkit-box;
158
- display: -ms-flexbox;
159
- display: flex;
160
- overflow: hidden;
161
- &.wechat{
162
- width: 20.5%;
163
- left: 25.5%;
164
- }
165
- .sender-id-text{
166
- position: absolute;
167
- top: 14%;
168
- font-size: 10px;
169
- left: 9%;
170
- font-weight: $FONT_WEIGHT_MEDIUM;
171
- }
172
- .message-text-container{
173
- width: 176px;
174
- left: 9%;
175
- top: 43%;
176
- position: absolute;
177
- text-align: left;
178
- text-overflow: ellipsis;
179
- }
180
- }
181
-
182
- .main-screen-preview .msgContainer{
183
- position: absolute;
184
- top: 30%;
185
- left: 53%;
186
- width: 42%;
187
- height: 336px;
188
- display: -webkit-box;
189
- display: -ms-flexbox;
190
- display: flex;
191
-
192
- .sms-icon{
193
- top: 0;
194
- left: 2px;
195
- width: 25px;
196
- position: absolute;
197
- }
198
- &.sms{
199
- height: 290px;
200
- width: 21%;
201
- .sms-icon{
202
- width: 20px;
203
- left: 14px;
204
- }
205
- }
206
-
207
- .message-pop{
208
- .unicode-disabled{
209
- font-size: $FONT_SIZE_L;
210
- }
211
- &.sms {
212
- max-height: 100%;
213
- position: absolute;
214
- // width: initial;
215
- overflow: auto;
216
- top: 0;
217
- white-space: pre-wrap;
218
- word-break: break-word;
219
- line-height: 14px;
220
- padding: 0 8px 8px 8px;
221
- font-size: $FONT_SIZE_VS;
222
- width: 100%;
223
- font-family: 'open-sans';
224
- .message-pop-item{
225
- padding: 4px;
226
- background: #3F51B5;
227
- color: $CAP_WHITE;
228
- margin-top: 8px;
229
- border-radius: 4px;
230
- min-height: 26px;
231
- &:first-child{
232
- margin-top: 0;
233
- }
234
- }
235
- }
236
- &:not(.sms){
237
- padding: 4px;
238
- background: #3F51B5;
239
- position: absolute;
240
- // width: initial;
241
- overflow: auto;
242
- top: 14px;
243
- left: 2%;
244
- white-space: pre-wrap;
245
- word-break: break-word;
246
- border-radius: 4px;
247
- max-height: 100%;
248
- color: $CAP_WHITE;
249
- width: 45%;
250
- min-height: 26px;
251
- line-height: 14px;
252
- padding: 8px;
253
- font-size: $FONT_SIZE_VS;
254
- font-family: 'open-sans';
255
- }
256
- }
257
- }
258
- }
259
-
260
1
  .shell {
261
2
  position: relative;
262
3
  -webkit-transform: translate(-50%);
@@ -299,26 +40,26 @@
299
40
 
300
41
  .message-pop{
301
42
  .unicode-disabled{
302
- font-size: $FONT_SIZE_L;
43
+ font-size: 16px;
303
44
  }
304
45
  &.sms {
305
46
  max-height: 100%;
306
47
  position: absolute;
307
48
  // width: initial;
308
49
  overflow: auto;
309
- top: 4px;
310
- left: 3%;
50
+ top: 0;
51
+ left: 17%;
311
52
  white-space: pre-wrap;
312
53
  word-break: break-word;
313
54
  line-height: 14px;
314
55
  padding: 0 8px 8px 8px;
315
- font-size: $FONT_SIZE_VS;
316
- width: 100%;
56
+ font-size: 10px;
57
+ width: 80%;
317
58
  font-family: 'open-sans';
318
59
  .message-pop-item{
319
60
  padding: 4px;
320
61
  background: #3F51B5;
321
- color: $CAP_WHITE;
62
+ color: #FFFFFF;
322
63
  margin-top: 8px;
323
64
  border-radius: 4px;
324
65
  min-height: 26px;
@@ -333,14 +74,14 @@
333
74
  position: absolute;
334
75
  // width: initial;
335
76
  overflow: auto;
336
- top: 4px;
337
- left: 0;
77
+ top: 0;
78
+ left: 17%;
338
79
  white-space: pre-wrap;
339
80
  word-break: break-word;
340
81
  border-radius: 4px;
341
82
  max-height: 100%;
342
83
  color: #FFFFFF;
343
- width: 100%;
84
+ width: 70%;
344
85
  min-height: 26px;
345
86
  line-height: 14px;
346
87
  padding: 8px;
@@ -371,7 +112,7 @@
371
112
  width: 100%;
372
113
  min-height: 26px;
373
114
  line-height: 15px;
374
- font-size: $FONT_SIZE_VS;
115
+ font-size: 10px;
375
116
  .body-image{
376
117
  img{
377
118
  max-width: 100%;
@@ -384,7 +125,7 @@
384
125
  }
385
126
  .android-push-message-Container{
386
127
  .title, .body-text, .body-image, .app-name{
387
- background-color: $CAP_WHITE;
128
+ background-color: #FFFFFF;
388
129
  color: #333333;
389
130
  }
390
131
  .app-name{
@@ -411,7 +152,7 @@
411
152
  padding: 4px;
412
153
  .action{
413
154
  line-height: 24px;
414
- font-size: $FONT_SIZE_VS;
155
+ font-size: 10px;
415
156
  font-weight: 600;
416
157
  color: #1970DA;
417
158
  height: 12px;
@@ -426,7 +167,7 @@
426
167
  word-wrap: break-word;
427
168
  }
428
169
  .title, .body-text, .body-image, .app-name{
429
- background-color: $CAP_WHITE;
170
+ background-color: #FFFFFF;
430
171
  color: #333333;
431
172
  }
432
173
  .body-image{
@@ -442,7 +183,7 @@
442
183
  color: #5D5D5D;
443
184
  border-bottom: solid 1px #D6D6D6;
444
185
  .material-icons{
445
- font-size: $FONT_SIZE_S;
186
+ font-size: 12px;
446
187
  float: right;
447
188
  }
448
189
  }
@@ -531,8 +272,8 @@
531
272
 
532
273
  .msgContainer {
533
274
  position: absolute;
534
- top: 20%;
535
- left: 23%;
275
+ top: 14%;
276
+ left: 29%;
536
277
  width: 42%;
537
278
  height: 275px;
538
279
  display: -webkit-box;
@@ -562,17 +303,17 @@
562
303
  overflow: auto;
563
304
  top: 6%;
564
305
  left: 17%;
565
- width: 100%;
306
+ width: 80%;
566
307
  white-space: pre-wrap;
567
308
  word-break: break-word;
568
309
  line-height: 14px;
569
310
  padding: 0 8px 8px 8px;
570
- font-size: $FONT_SIZE_VS;
311
+ font-size: 10px;
571
312
  font-family: 'open-sans';
572
313
  .message-pop-item{
573
314
  padding: 8px;
574
315
  background: #3F51B5;
575
- color: $CAP_WHITE;
316
+ color: #FFFFFF;
576
317
  margin-top: 8px;
577
318
  border-radius: 4px;
578
319
  min-height: 26px;
@@ -595,7 +336,7 @@
595
336
  color: #FFFFFF;
596
337
  line-height: 14px;
597
338
  font-family: "open-sans";
598
- font-size: $FONT_SIZE_VS;
339
+ font-size: 10px;
599
340
  }
600
341
  }
601
342
  }
@@ -608,4 +349,4 @@
608
349
  display: inline-block;
609
350
  background-color: #333333;
610
351
  margin-right: 4px;
611
- }
352
+ }