@capillarytech/creatives-library 2.0.76 → 2.0.77

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 (100) hide show
  1. package/assets/android-message-gui-2.svg +55 -0
  2. package/components/FormBuilder/index.js +7 -2
  3. package/components/SmsPreviewV2/_smsPreviewV2.scss +353 -0
  4. package/components/SmsPreviewV2/index.js +69 -0
  5. package/components/SmsPreviewV2/messages.js +13 -0
  6. package/{containers/WeChat → components/SmsPreviewV2}/tests/index.test.js +2 -2
  7. package/package.json +1 -1
  8. package/v2Containers/CreativesContainer/SlideBoxContent.js +0 -1
  9. package/v2Containers/CreativesContainer/SlideBoxHeader.js +2 -11
  10. package/v2Containers/CreativesContainer/index.js +0 -4
  11. package/v2Containers/CreativesContainer/messages.js +1 -1
  12. package/v2Containers/MobilePush/Edit/index.js +3 -1
  13. package/v2Containers/MobilepushWrapper/index.js +1 -3
  14. package/components/EmailPreview/assets/images/iPad.svg +0 -10
  15. package/components/EmailPreview/assets/images/mobile.png +0 -0
  16. package/components/FormBuilder/test +0 -1845
  17. package/containers/CallTask/_callTask.scss +0 -5
  18. package/containers/CallTask/actions.js +0 -15
  19. package/containers/CallTask/constants.js +0 -7
  20. package/containers/CallTask/index.js +0 -141
  21. package/containers/CallTask/messages.js +0 -21
  22. package/containers/CallTask/reducer.js +0 -23
  23. package/containers/CallTask/sagas.js +0 -11
  24. package/containers/CallTask/selectors.js +0 -25
  25. package/containers/CallTask/tests/actions.test.js +0 -18
  26. package/containers/CallTask/tests/index.test.js +0 -10
  27. package/containers/CallTask/tests/reducer.test.js +0 -9
  28. package/containers/CallTask/tests/sagas.test.js +0 -15
  29. package/containers/CallTask/tests/selectors.test.js +0 -10
  30. package/containers/ChannelTemplates/actions.js +0 -20
  31. package/containers/ChannelTemplates/constants.js +0 -8
  32. package/containers/ChannelTemplates/index.js +0 -48
  33. package/containers/ChannelTemplates/messages.js +0 -13
  34. package/containers/ChannelTemplates/reducer.js +0 -34
  35. package/containers/ChannelTemplates/sagas.js +0 -32
  36. package/containers/ChannelTemplates/selectors.js +0 -25
  37. package/containers/ChannelTemplates/tests/actions.test.js +0 -18
  38. package/containers/ChannelTemplates/tests/index.test.js +0 -10
  39. package/containers/ChannelTemplates/tests/reducer.test.js +0 -9
  40. package/containers/ChannelTemplates/tests/sagas.test.js +0 -15
  41. package/containers/ChannelTemplates/tests/selectors.test.js +0 -10
  42. package/containers/CreativesContainer/SlideBoxContent.js +0 -248
  43. package/containers/CreativesContainer/SlideBoxFooter.js +0 -38
  44. package/containers/CreativesContainer/SlideBoxHeader.js +0 -65
  45. package/containers/CreativesContainer/actions.js +0 -27
  46. package/containers/CreativesContainer/constants.js +0 -13
  47. package/containers/CreativesContainer/index.js +0 -418
  48. package/containers/CreativesContainer/index.scss +0 -27
  49. package/containers/CreativesContainer/messages.js +0 -17
  50. package/containers/CreativesContainer/reducer.js +0 -29
  51. package/containers/CreativesContainer/sagas.js +0 -11
  52. package/containers/CreativesContainer/selectors.js +0 -30
  53. package/containers/CreativesContainer/tests/actions.test.js +0 -18
  54. package/containers/CreativesContainer/tests/index.test.js +0 -10
  55. package/containers/CreativesContainer/tests/reducer.test.js +0 -9
  56. package/containers/CreativesContainer/tests/sagas.test.js +0 -15
  57. package/containers/CreativesContainer/tests/selectors.test.js +0 -10
  58. package/containers/EmailWrapper/actions.js +0 -15
  59. package/containers/EmailWrapper/constants.js +0 -7
  60. package/containers/EmailWrapper/index.js +0 -238
  61. package/containers/EmailWrapper/messages.js +0 -57
  62. package/containers/EmailWrapper/reducer.js +0 -23
  63. package/containers/EmailWrapper/sagas.js +0 -11
  64. package/containers/EmailWrapper/selectors.js +0 -25
  65. package/containers/EmailWrapper/tests/actions.test.js +0 -18
  66. package/containers/EmailWrapper/tests/index.test.js +0 -10
  67. package/containers/EmailWrapper/tests/reducer.test.js +0 -9
  68. package/containers/EmailWrapper/tests/sagas.test.js +0 -15
  69. package/containers/EmailWrapper/tests/selectors.test.js +0 -10
  70. package/containers/MobilePush/commonMethods.js +0 -249
  71. package/containers/MobilePush/eventsMap.js +0 -127
  72. package/containers/MobilePush/initialSchema.js +0 -1739
  73. package/containers/MobilepushWrapper/_mobilepushWrapper.scss +0 -18
  74. package/containers/MobilepushWrapper/index.js +0 -97
  75. package/containers/MobilepushWrapper/messages.js +0 -25
  76. package/containers/MobilepushWrapper/tests/index.test.js +0 -10
  77. package/containers/TemplatesV2/_templatesV2.scss +0 -5
  78. package/containers/TemplatesV2/actions.js +0 -16
  79. package/containers/TemplatesV2/constants.js +0 -10
  80. package/containers/TemplatesV2/index.js +0 -207
  81. package/containers/TemplatesV2/messages.js +0 -29
  82. package/containers/TemplatesV2/selectors.js +0 -25
  83. package/containers/TemplatesV2/tests/actions.test.js +0 -18
  84. package/containers/TemplatesV2/tests/index.test.js +0 -10
  85. package/containers/TemplatesV2/tests/reducer.test.js +0 -9
  86. package/containers/TemplatesV2/tests/sagas.test.js +0 -15
  87. package/containers/TemplatesV2/tests/selectors.test.js +0 -10
  88. package/containers/WeChat/RichmediaTemplates/Create/testschema.js +0 -379
  89. package/containers/WeChat/_wechat.scss +0 -8
  90. package/containers/WeChat/actions.js +0 -52
  91. package/containers/WeChat/constants.js +0 -28
  92. package/containers/WeChat/index.js +0 -1635
  93. package/containers/WeChat/messages.js +0 -73
  94. package/containers/WeChat/reducer.js +0 -74
  95. package/containers/WeChat/sagas.js +0 -86
  96. package/containers/WeChat/selectors.js +0 -25
  97. package/containers/WeChat/tests/actions.test.js +0 -18
  98. package/containers/WeChat/tests/reducer.test.js +0 -9
  99. package/containers/WeChat/tests/sagas.test.js +0 -15
  100. package/containers/WeChat/tests/selectors.test.js +0 -10
@@ -0,0 +1,55 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="360px" height="725px" viewBox="0 0 360 725" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 55.2 (78181) - https://sketchapp.com -->
4
+ <title>Artboard Copy 3</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <g id="Artboard-Copy-3" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
+ <rect id="Rectangle" fill="#FFFFFF" x="0" y="660" width="360" height="65"></rect>
8
+ <g id="Organisms/ui/android/screenshots/wallpaper" transform="translate(120.000000, 0.000000)"></g>
9
+ <g id="Group-5" transform="translate(16.000000, 680.000000)">
10
+ <polygon id="Stroke-1" stroke-opacity="0.0117647061" stroke="#000000" stroke-width="1.33333336e-11" points="0 0 23.999999 0 23.999999 23.999999 0 23.999999"></polygon>
11
+ <polygon id="Fill-3" fill="#7F7F7F" points="18.9999989 12.9999992 12.9999992 12.9999992 12.9999992 18.9999989 10.9999993 18.9999989 10.9999993 12.9999992 4.9999997 12.9999992 4.9999997 10.9999993 10.9999993 10.9999993 10.9999993 4.9999997 12.9999992 4.9999997 12.9999992 10.9999993 18.9999989 10.9999993"></polygon>
12
+ </g>
13
+ <text id="Add-text-to-this-mes" font-family="Roboto-Regular, Roboto" font-size="15" font-weight="normal" letter-spacing="0.3" fill="#959595">
14
+ <tspan x="53" y="697">Add text to this message</tspan>
15
+ </text>
16
+ <g id="Group-5" transform="translate(320.000000, 679.000000)">
17
+ <polygon id="Stroke-1" stroke-opacity="0.0117647061" stroke="#000000" stroke-width="1.33333336e-11" points="0 0 23.999999 0 23.999999 23.999999 0 23.999999"></polygon>
18
+ <polygon id="Fill-3" fill="#757575" points="2.00999988 20.9999987 22.9999986 11.9999993 2.00999988 2.99999982 1.99999988 9.9999994 16.999999 11.9999993 1.99999988 13.9999992"></polygon>
19
+ </g>
20
+ <rect id="Rectangle" stroke="#E6E6E6" fill="#F4F5F7" x="0.5" y="86.5" width="359" height="573"></rect>
21
+ <g id="Group">
22
+ <g id="Toolbar">
23
+ <polygon id="Toolbar-bg" fill="#E51FA3" points="360 0 0 0 0 86 360 86"></polygon>
24
+ <g id="Toolbar-contents" transform="translate(16.000000, 40.000000)">
25
+ <g id="Back">
26
+ <rect id="Bounds" x="0" y="0" width="24" height="24"></rect>
27
+ <polygon id="Shape" fill="#FFFFFF" points="20 11 7.8 11 13.4 5.4 12 4 4 12 12 20 13.4 18.6 7.8 13 20 13"></polygon>
28
+ </g>
29
+ </g>
30
+ </g>
31
+ <g id="Status-bar">
32
+ <rect id="Status-bar-bg" fill="#CF0E8F" x="0" y="0" width="360" height="24"></rect>
33
+ <rect id="bounds" x="242" y="0" width="118" height="24"></rect>
34
+ <g id="battery" transform="translate(337.000000, 4.000000)">
35
+ <polygon id="bounds" points="0 0 16 0 16 16 0 16"></polygon>
36
+ <polygon id="Shape" fill="#FFFFFF" points="9 1.875 9 1 6 1 6 1.875 3 1.875 3 15 12 15 12 1.875"></polygon>
37
+ </g>
38
+ <g id="cellular" transform="translate(317.000000, 4.000000)">
39
+ <polygon id="bounds" points="0 0 16 0 16 16 0 16"></polygon>
40
+ <polygon id="Shape" fill="#FFFFFF" points="0 15 14 15 14 1"></polygon>
41
+ </g>
42
+ <g id="wifi" transform="translate(296.000000, 4.000000)">
43
+ <polygon id="bounds" points="2 0 18 0 18 16 2 16"></polygon>
44
+ <path d="M0.977372085,4.01593123 C3.48821908,2.12256382 6.61301513,1 10,1 C13.3869849,1 16.5117809,2.12256382 19.0226279,4.01593123 L10,15 L0.977372085,4.01593123 Z" id="Shape" fill="#FFFFFF"></path>
45
+ </g>
46
+ </g>
47
+ <g id="Icons-/-Navigation-24px-/-White-/-More" transform="translate(332.000000, 42.000000)">
48
+ <g id="More">
49
+ <rect id="Bounds" x="0" y="0" width="12" height="24"></rect>
50
+ <path d="M6,8 C7.1,8 8,7.1 8,6 C8,4.9 7.1,4 6,4 C4.9,4 4,4.9 4,6 C4,7.1 4.9,8 6,8 L6,8 Z M6,10 C4.9,10 4,10.9 4,12 C4,13.1 4.9,14 6,14 C7.1,14 8,13.1 8,12 C8,10.9 7.1,10 6,10 L6,10 Z M6,16 C4.9,16 4,16.9 4,18 C4,19.1 4.9,20 6,20 C7.1,20 8,19.1 8,18 C8,16.9 7.1,16 6,16 L6,16 Z" id="Shape" fill="#FFFFFF"></path>
51
+ </g>
52
+ </g>
53
+ </g>
54
+ </g>
55
+ </svg>
@@ -1,3 +1,4 @@
1
+ /* eslint-disable no-case-declarations */
1
2
 
2
3
  /**
3
4
  *
@@ -32,6 +33,7 @@ const {CapRadioGroup} = CapRadio;
32
33
  // import { FormattedMessage } from 'react-intl';
33
34
  // import messages from './messages';
34
35
  const isUrl = (str) => {
36
+ // eslint-disable-next-line no-useless-escape
35
37
  const res = str.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g);
36
38
  return res;
37
39
  };
@@ -413,8 +415,11 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
413
415
  }
414
416
  }
415
417
  isValidExternalLink = ({obj, key}) => {
416
- const url = _.get(obj, key);
417
- return (url && url !== "" && isUrl(url));
418
+ if (key in obj) {
419
+ const url = _.get(obj, key);
420
+ return (url && url !== "" && isUrl(url));
421
+ }
422
+ return true;
418
423
  }
419
424
  /* eslint-disable */
420
425
  validateForm(tags, injectedTags, isSave, showMessages) {
@@ -0,0 +1,353 @@
1
+ .shell {
2
+ position: relative;
3
+ -webkit-transform: translate(-50%);
4
+ transform: translate(-50%);
5
+ left: 50%;
6
+ padding: 0 10px;
7
+ width: 450px;
8
+
9
+ .preview-image {
10
+ width: 51%;
11
+ &.sms {
12
+ width: 45%;
13
+ }
14
+ }
15
+
16
+ .msgContainer {
17
+ position: absolute;
18
+ top: 18%;
19
+ left: 28.8%;
20
+ width: 42%;
21
+ height: 336px;
22
+ display: -webkit-box;
23
+ display: -ms-flexbox;
24
+ display: flex;
25
+
26
+ .sms-icon{
27
+ top: 0;
28
+ left: 2px;
29
+ width: 25px;
30
+ position: absolute;
31
+ }
32
+ &.sms{
33
+ height: 290px;
34
+ width: 40%;
35
+ .sms-icon{
36
+ width: 20px;
37
+ left: 14px;
38
+ }
39
+ }
40
+
41
+ .message-pop{
42
+ .unicode-disabled{
43
+ font-size: 16px;
44
+ }
45
+ &.sms {
46
+ max-height: 100%;
47
+ position: absolute;
48
+ // width: initial;
49
+ overflow: auto;
50
+ top: 0;
51
+ left: 17%;
52
+ white-space: pre-wrap;
53
+ word-break: break-word;
54
+ line-height: 14px;
55
+ padding: 0 8px 8px 8px;
56
+ font-size: 10px;
57
+ width: 80%;
58
+ font-family: 'open-sans';
59
+ .message-pop-item{
60
+ padding: 4px;
61
+ background: #3F51B5;
62
+ color: #FFFFFF;
63
+ margin-top: 8px;
64
+ border-radius: 4px;
65
+ min-height: 26px;
66
+ &:first-child{
67
+ margin-top: 0;
68
+ }
69
+ }
70
+ }
71
+ &:not(.sms){
72
+ padding: 4px;
73
+ background: #3F51B5;
74
+ position: absolute;
75
+ // width: initial;
76
+ overflow: auto;
77
+ top: 0;
78
+ left: 17%;
79
+ white-space: pre-wrap;
80
+ word-break: break-word;
81
+ border-radius: 4px;
82
+ max-height: 100%;
83
+ color: #FFFFFF;
84
+ width: 70%;
85
+ min-height: 26px;
86
+ line-height: 14px;
87
+ padding: 8px;
88
+ font-size: 10px;
89
+ font-family: 'open-sans';
90
+ }
91
+ }
92
+ }
93
+ .android-push-message-Container, .iphone-push-message-Container{
94
+ position: absolute;
95
+ top: 11%;
96
+ left: 28.8%;
97
+ width: 42%;
98
+ height: 336px;
99
+ overflow: auto;
100
+ display: -webkit-box;
101
+ display: -ms-flexbox;
102
+ display: flex;
103
+ .message-pop{
104
+ position: absolute;
105
+ // width: initial;
106
+ overflow: auto;
107
+ word-wrap: break-word;
108
+ white-space: pre-wrap;
109
+ border-top-left-radius: 4px;
110
+ border-top-right-radius: 4px;
111
+ max-height: 100%;
112
+ width: 100%;
113
+ min-height: 26px;
114
+ line-height: 15px;
115
+ font-size: 10px;
116
+ .body-image{
117
+ img{
118
+ max-width: 100%;
119
+ max-height: 90px;
120
+ margin: auto;
121
+ display: block;
122
+ }
123
+ }
124
+ }
125
+ }
126
+ .android-push-message-Container{
127
+ .title, .body-text, .body-image, .app-name{
128
+ background-color: #FFFFFF;
129
+ color: #333333;
130
+ }
131
+ .app-name{
132
+ color: #5D5D5D;
133
+ font-weight: 600;
134
+ padding: 8px 8px 4px 8px;
135
+ }
136
+ .title, .body-image{
137
+ padding: 0 8px 0 8px;
138
+
139
+ }
140
+ .body-text{
141
+ padding: 0 8px 4px 8px;
142
+ color: #5a5959;
143
+ }
144
+ .title{
145
+ overflow: hidden;
146
+ white-space: nowrap;
147
+ text-overflow: ellipsis;
148
+ }
149
+ .actions{
150
+ background-color: #EEEEEE;
151
+ height: 32px;
152
+ padding: 4px;
153
+ .action{
154
+ line-height: 24px;
155
+ font-size: 10px;
156
+ font-weight: 600;
157
+ color: #1970DA;
158
+ height: 12px;
159
+ margin-left: 8px;
160
+ }
161
+ }
162
+ }
163
+ .iphone-push-message-Container{
164
+ top: 8%;
165
+ .message-pop{
166
+ border-radius: 4px;
167
+ word-wrap: break-word;
168
+ }
169
+ .title, .body-text, .body-image, .app-name{
170
+ background-color: #FFFFFF;
171
+ color: #333333;
172
+ }
173
+ .body-image{
174
+ padding-top: 8px;
175
+ }
176
+ .title{
177
+ overflow: hidden;
178
+ white-space: nowrap;
179
+ text-overflow: ellipsis;
180
+ }
181
+ .app-name{
182
+ padding: 8px;
183
+ color: #5D5D5D;
184
+ border-bottom: solid 1px #D6D6D6;
185
+ .material-icons{
186
+ font-size: 12px;
187
+ float: right;
188
+ }
189
+ }
190
+ .title, .body-text{
191
+ padding: 4px;
192
+ }
193
+ .title{
194
+ overflow: hidden;
195
+ white-space: nowrap;
196
+ text-overflow: ellipsis;
197
+ }
198
+ .body-text{
199
+ border-bottom-left-radius: 4px;
200
+ border-bottom-right-radius: 4px;
201
+ }
202
+ .actions{
203
+ background-color: #FFFFFF;
204
+ opacity: 0.8;
205
+ height: 32px;
206
+ line-height: 26px;
207
+ margin-top: 4px;
208
+ border-radius: 6px;
209
+ text-align: center;
210
+ padding: 4px;
211
+ .action{
212
+ font-size: 12px;
213
+ font-weight: 600;
214
+ color: #000000;
215
+ text-align: center;
216
+ margin-left: 8px;
217
+ }
218
+ }
219
+ }
220
+ }
221
+
222
+ .align-center {
223
+ text-align: center;
224
+ }
225
+
226
+ .align-left {
227
+ text-align: left;
228
+ }
229
+
230
+ .preview-container{
231
+ .preview-info {
232
+ // font-family: 'proxima-nova';
233
+ font-weight: 600;
234
+ font-size: 16px;
235
+ text-align: center;
236
+ }
237
+ }
238
+
239
+ .preview-container.embedded-preview{
240
+ .preview-image {
241
+ width: 38% !important;
242
+ }
243
+ .message-pop{
244
+ left: 21% !important;
245
+ width: 67% !important;
246
+ }
247
+ .sms-icon{
248
+ left: 12% !important;
249
+ }
250
+ }
251
+
252
+
253
+
254
+ #slidebox-container {
255
+ left: 60vw;
256
+ width: 40vw;
257
+
258
+ .shell {
259
+ position: relative;
260
+ -webkit-transform: translate(-50%);
261
+ transform: translate(-50%);
262
+ left: 50%;
263
+ padding: 0 10px;
264
+ width: initial;
265
+
266
+ .preview-image {
267
+ &.sms{
268
+ width: 45%;
269
+ }
270
+ }
271
+
272
+
273
+ .msgContainer {
274
+ position: absolute;
275
+ top: 14%;
276
+ left: 29%;
277
+ width: 42%;
278
+ height: 275px;
279
+ display: -webkit-box;
280
+ display: -ms-flexbox;
281
+ display: flex;
282
+
283
+ .sms-icon{
284
+ top: 6%;
285
+ left: 2%;
286
+ width: 12%;
287
+ position: absolute;
288
+ }
289
+
290
+ &.sms{
291
+ height: 290px;
292
+ width: 40%;
293
+ top: 16%;
294
+ .sms-icon{
295
+ left: 7%;
296
+ }
297
+ }
298
+ .message-pop{
299
+ &.sms {
300
+ max-height: 100%;
301
+ position: absolute;
302
+ // width: initial;
303
+ overflow: auto;
304
+ top: 6%;
305
+ left: 17%;
306
+ width: 80%;
307
+ white-space: pre-wrap;
308
+ word-break: break-word;
309
+ line-height: 14px;
310
+ padding: 0 8px 8px 8px;
311
+ font-size: 10px;
312
+ font-family: 'open-sans';
313
+ .message-pop-item{
314
+ padding: 8px;
315
+ background: #3F51B5;
316
+ color: #FFFFFF;
317
+ margin-top: 8px;
318
+ border-radius: 4px;
319
+ min-height: 26px;
320
+ &:first-child{
321
+ margin-top: 0;
322
+ }
323
+ }
324
+ }
325
+ &:not(.sms){
326
+ padding: 8px 8px;
327
+ background: #3F51B5;
328
+ position: absolute;
329
+ width: 65%;
330
+ top: 15%;
331
+ left: 19%;
332
+ word-break: break-all;
333
+ border-radius: 6px;
334
+ max-height: 100%;
335
+ overflow: auto;
336
+ color: #FFFFFF;
337
+ line-height: 14px;
338
+ font-family: "open-sans";
339
+ font-size: 10px;
340
+ }
341
+ }
342
+ }
343
+ }
344
+ }
345
+ .app-icon{
346
+ width: 10px;
347
+ height: 10px;
348
+ opacity: 1;
349
+ display: inline-block;
350
+ background-color: #333333;
351
+ margin-right: 4px;
352
+ }
353
+
@@ -0,0 +1,69 @@
1
+ /**
2
+ *
3
+ * SmsPreviewV2
4
+ *
5
+ */
6
+
7
+ import React from 'react';
8
+ // import styled from 'styled-components';
9
+
10
+ import { FormattedMessage } from 'react-intl';
11
+ import messages from './messages';
12
+ import {CapColumn, CapRow, CapHeading} from '@capillarytech/cap-ui-library';
13
+ import androidPhoneImage from '../../assets/android-message-gui-2.svg';
14
+
15
+ class SmsPreviewV2 extends React.Component { // eslint-disable-line react/prefer-stateless-function
16
+ render() {
17
+ let content = [this.props.content];
18
+ const channel = this.props.channel;
19
+ let smsDetails = {};
20
+ if (this.props.content && this.props.charCounterEnabled) {
21
+ smsDetails = updateCharCount(this.props.content, this.props.unicodeEnabled);
22
+ content = [];
23
+ for (let i = 0, limit = 0; i < smsDetails.parts; i += 1, limit += smsDetails.chars_sms) {
24
+ content.push(smsDetails.char_list.slice(limit, smsDetails.chars_sms * (i + 1)));
25
+ }
26
+ if (document.getElementById("msg_count") && this.props.showCount) {
27
+ document.getElementById("msg_count").val = smsDetails.parts;
28
+ }
29
+ }
30
+ const type = this.props.location && this.props.location.query.type ? this.props.location.query.type : '';
31
+ return (
32
+ <CapRow>
33
+ {this.props.showCount && <CapColumn span={16}>
34
+ {channel && channel.toLowerCase() === 'sms' && <CapHeading type="h3">
35
+ <FormattedMessage {...messages.charactersTotal} values={{smsCount: smsDetails.parts, charCount: smsDetails.chars_used}}/>
36
+ {smsDetails.unicode &&
37
+ <FormattedMessage {...messages.smsFormatType}/>
38
+ }
39
+ </CapHeading>}
40
+ </CapColumn>}
41
+ <CapColumn span={this.props.showCount ? 8 : 24}>
42
+ <div className={`preview-container ${type === 'embedded' ? 'embedded-preview' : ''}`}>
43
+ { channel && channel.toLowerCase() === 'sms' &&
44
+ <div className="shell align-center" id="sms-preview">
45
+ <img className="preview-image sms" src={smsBody} alt="Preview is being generated"/>
46
+ <div className="msgContainer sms">
47
+ <img className="sms-icon" src={smsIcon} alt="Sms icon" />
48
+ <div className={"message-pop sms"}>
49
+ {content && content.length && content.map((msg, index) =>
50
+ <CapColumn key={`"message-pop-content-${index}`} className="message-pop-item align-left" style={{ background: '#3F51B5', color: '#ffffff'}}>
51
+ {msg}
52
+ </CapColumn>)
53
+ }
54
+ </div>
55
+ </div>
56
+ </div>
57
+ }
58
+ </div>
59
+ </CapColumn>
60
+ </CapRow>
61
+ );
62
+ }
63
+ }
64
+
65
+ SmsPreviewV2.propTypes = {
66
+
67
+ };
68
+
69
+ export default SmsPreviewV2;
@@ -0,0 +1,13 @@
1
+ /*
2
+ * SmsPreviewV2 Messages
3
+ *
4
+ * This contains all the text for the SmsPreviewV2 component.
5
+ */
6
+ import { defineMessages } from 'react-intl';
7
+
8
+ export default defineMessages({
9
+ header: {
10
+ id: 'app.components.SmsPreviewV2.header',
11
+ defaultMessage: 'This is the SmsPreviewV2 component !',
12
+ },
13
+ });
@@ -1,9 +1,9 @@
1
1
  // import React from 'react';
2
2
  // import { shallow } from 'enzyme';
3
3
 
4
- // import { WeChat } from '../index';
4
+ // import SmsPreviewV2 from '../index';
5
5
 
6
- describe('<WeChat />', () => {
6
+ describe('<SmsPreviewV2 />', () => {
7
7
  it('Expect to have unit tests specified', () => {
8
8
  expect(true).toEqual(false);
9
9
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "2.0.76",
4
+ "version": "2.0.77",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -205,7 +205,6 @@ function SlideBoxContent(props) {
205
205
  route={{ name: 'mobilepush' }}
206
206
  templateData={templateData}
207
207
  showTemplateName={showTemplateName}
208
- getDefaultTags={type}
209
208
  />
210
209
  }
211
210
  {isCreateMPush &&
@@ -8,16 +8,8 @@ import messages from './messages';
8
8
  const PrefixWrapper = styled.div`
9
9
  margin-right: 16px;
10
10
  `;
11
- function getChannelLabel(channel) {
12
- const labels = {
13
- sms: 'SMS',
14
- email: 'Email',
15
- mobilepush: 'Push notification',
16
- };
17
- return labels[channel.toLowerCase()];
18
- }
19
11
  function SlideBoxHeader(props) {
20
- const { slidBoxContent, templateData, onShowTemplates, creativesMode, isFullMode, showPrefix, showTemplateName, channel } = props;
12
+ const { slidBoxContent, templateData, onShowTemplates, creativesMode, isFullMode, showPrefix, showTemplateName } = props;
21
13
  const TemplateName = isFullMode && showTemplateName;
22
14
  return (
23
15
  <div key="creatives-container-slidebox-header-content">
@@ -55,7 +47,7 @@ function SlideBoxHeader(props) {
55
47
  )}
56
48
  {!TemplateName && slidBoxContent === 'createTemplate' && (
57
49
  <CapHeader
58
- title={<FormattedMessage {...messages.createMessageContent} values={{channel: getChannelLabel(channel)}}/>}
50
+ title={<FormattedMessage {...messages.createMessageContent} />}
59
51
  prefix={!isFullMode && showPrefix &&
60
52
  <PrefixWrapper>
61
53
  <CapIcons.backIcon onClick={onShowTemplates} />
@@ -74,6 +66,5 @@ SlideBoxHeader.propTypes = {
74
66
  isFullMode: PropTypes.bool,
75
67
  showPrefix: PropTypes.bool,
76
68
  showTemplateName: PropTypes.func,
77
- channel: PropTypes.string,
78
69
  };
79
70
  export default SlideBoxHeader;
@@ -30,9 +30,6 @@ const SlideBoxWrapper = styled.div`
30
30
  .cap-slide-box-v2-container{
31
31
  .slidebox-header, .slidebox-content-container, .slidebox-footer{
32
32
  padding: 0 32px;
33
- &.has-footer{
34
- overflow-x: hidden;
35
- }
36
33
  }
37
34
  }
38
35
  `;
@@ -387,7 +384,6 @@ class Creatives extends React.Component {
387
384
  header={
388
385
  <SlideBoxHeader
389
386
  key="creatives-container-slidebox-header"
390
- channel={currentChannel}
391
387
  messages={this.props.messages}
392
388
  slidBoxContent={this.state.slidBoxContent}
393
389
  templateData={templateData}
@@ -260,7 +260,7 @@ export default defineMessages({
260
260
  },
261
261
  "createMessageContent": {
262
262
  id: `${scope}.editMessageContent`,
263
- defaultMessage: `New {channel} message`,
263
+ defaultMessage: `New message`,
264
264
  },
265
265
  "creativeTemplatesDesc": {
266
266
  id: `${scope}.creativeTemplatesDesc`,
@@ -1388,7 +1388,9 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
1388
1388
  }
1389
1389
  temp.injectedEvents = {};
1390
1390
  temp.className = temp.className ? temp.className : '';
1391
-
1391
+ if (this.props.location.query.type === 'embedded' && ((temp.type === "tag-list" || temp.type === "div" || temp.type === "icon") && this.props.location.query.module !== "dvs") && (temp.supportedEvents)) {
1392
+ temp.className = `${temp.className} hide`;
1393
+ }
1392
1394
  // if (this.props.location.query.type === 'embedded' && (temp.type === "input" || temp.type === "textarea" || temp.type === "radioGroup") && this.props.location.query.module !== "dvs") {
1393
1395
  // temp.className = `${temp.className} disabled`;
1394
1396
  // temp.disabled = true;
@@ -63,7 +63,7 @@ export class MobilepushWrapper extends React.Component { // eslint-disable-line
63
63
  this.setState({templateName: ev.target.value});
64
64
  }
65
65
  render() {
66
- const {mobilePushCreateMode, step, getFormData, setIsLoadingContent, isGetFormData, query, isFullMode, showTemplateName, type} = this.props;
66
+ const {mobilePushCreateMode, step, getFormData, setIsLoadingContent, isGetFormData, query, isFullMode, showTemplateName} = this.props;
67
67
  const {templateName} = this.state;
68
68
  const isShowMobilepushCreate = !isEmpty(mobilePushCreateMode);
69
69
  return (
@@ -103,7 +103,6 @@ export class MobilepushWrapper extends React.Component { // eslint-disable-line
103
103
  isGetFormData={isGetFormData}
104
104
  showTemplateName={showTemplateName}
105
105
  route={{ name: 'mobilepush' }}
106
- getDefaultTags={type}
107
106
  />
108
107
 
109
108
 
@@ -125,7 +124,6 @@ MobilepushWrapper.propTypes = {
125
124
  query: PropTypes.object,
126
125
  isFullMode: PropTypes.bool,
127
126
  showTemplateName: PropTypes.func,
128
- type: PropTypes.string,
129
127
  };
130
128
 
131
129