@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.
- package/components/TemplatePreview/WechatRichmediaTemplatePreview/index.js +8 -7
- package/components/TemplatePreview/_templatePreview.scss +21 -280
- package/components/TemplatePreview/index.js +20 -180
- package/components/TemplatePreview/messages.js +0 -16
- package/package.json +1 -1
- package/v2Components/FormBuilder/index.js +6 -15
- package/v2Components/MobilePushPreviewV2/index.js +32 -40
- package/v2Components/MobilePushPreviewV2/messages.js +8 -0
- package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/_wechatRichmediaTemplatePrev.scss +0 -64
- package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/index.js +19 -101
- package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/messages.js +0 -12
- package/v2Components/TemplatePreview/_templatePreview.scss +4 -13
- package/v2Components/TemplatePreview/assets/images/WECHAT_5x.png +0 -0
- package/v2Components/TemplatePreview/index.js +20 -147
- package/v2Components/TemplatePreview/messages.js +0 -8
- package/v2Containers/CreativesContainer/SlideBoxContent.js +2 -15
- package/v2Containers/CreativesContainer/SlideBoxHeader.js +1 -1
- package/v2Containers/CreativesContainer/index.js +1 -3
- package/v2Containers/CreativesContainer/messages.js +2 -2
- package/v2Containers/Email/_email.scss +1 -7
- package/v2Containers/Email/index.js +13 -39
- package/v2Containers/Email/messages.js +0 -4
- package/v2Containers/EmailWrapper/index.js +0 -4
- package/v2Containers/MobilePush/Create/index.js +0 -5
- package/v2Containers/MobilePush/Edit/index.js +0 -5
- package/v2Containers/MobilepushWrapper/index.js +1 -4
- package/v2Containers/Sms/Create/index.js +1 -2
- package/v2Containers/Sms/Edit/index.js +0 -2
- 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
|
|
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
|
-
|
|
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
|
-
<
|
|
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
|
-
<
|
|
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
|
-
<
|
|
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
|
-
<
|
|
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
|
-
<
|
|
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:
|
|
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:
|
|
310
|
-
left:
|
|
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:
|
|
316
|
-
width:
|
|
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:
|
|
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:
|
|
337
|
-
left:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
535
|
-
left:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
+
}
|