@capillarytech/creatives-library 3.0.5 → 3.0.7

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 (73) hide show
  1. package/components/FormBuilder/index.js +15 -15
  2. package/containers/Dashboard/index.js +5 -0
  3. package/containers/Email/index.js +5 -4
  4. package/containers/Line/Create/index.js +3 -3
  5. package/containers/MobilePush/Edit/index.js +2 -2
  6. package/containers/WeChat/MapTemplates/index.js +64 -58
  7. package/containers/WeChat/RichmediaTemplates/Create/index.js +3 -3
  8. package/index.html +3 -0
  9. package/package.json +1 -1
  10. package/routes.js +1 -3
  11. package/v2Components/FormBuilder/index.js +12 -18
  12. package/v2Components/NavigationBar/index.js +7 -4
  13. package/v2Components/NavigationBar/messages.js +6 -2
  14. package/v2Containers/Cap/index.js +2 -1
  15. package/v2Containers/CreativesContainer/SlideBoxContent.js +9 -2
  16. package/v2Containers/CreativesContainer/index.js +4 -1
  17. package/v2Containers/Email/index.js +27 -42
  18. package/v2Containers/Email/initialSchema.js +2 -58
  19. package/v2Containers/Email/messages.js +4 -0
  20. package/v2Containers/Email/sagas.js +0 -2
  21. package/v2Containers/MobilePush/Create/actions.js +2 -2
  22. package/v2Containers/MobilePush/Create/index.js +17 -16
  23. package/v2Containers/MobilePush/Create/messages.js +1 -1
  24. package/v2Containers/MobilePush/Create/sagas.js +3 -0
  25. package/v2Containers/MobilePush/Edit/index.js +13 -7
  26. package/v2Containers/MobilePush/initialSchema.js +3 -0
  27. package/v2Containers/MobilepushWrapper/index.js +3 -1
  28. package/v2Containers/Templates/index.js +14 -11
  29. package/v2Containers/TemplatesV2/index.js +21 -12
  30. package/assets/android-message-gui-2.svg +0 -55
  31. package/components/CallTaskPreview/_callTaskPreview.scss +0 -17
  32. package/components/CallTaskPreview/images/Footer.png +0 -0
  33. package/components/CallTaskPreview/images/Header.png +0 -0
  34. package/components/CallTaskPreview/index.js +0 -37
  35. package/components/CallTaskPreview/messages.js +0 -13
  36. package/components/CallTaskPreview/tests/index.test.js +0 -15
  37. package/components/CmsTemplatesComponent/index.js +0 -33
  38. package/components/CmsTemplatesComponent/messages.js +0 -17
  39. package/components/CmsTemplatesComponent/tests/index.test.js +0 -10
  40. package/components/EmailMobilePreview/index.js +0 -129
  41. package/components/EmailMobilePreview/index.scss +0 -55
  42. package/components/EmailPreviewV2/_emailPreviewV2.scss +0 -69
  43. package/components/EmailPreviewV2/index.js +0 -132
  44. package/components/EmailPreviewV2/messages.js +0 -41
  45. package/components/EmailPreviewV2/tests/index.test.js +0 -10
  46. package/components/MobilePushPreviewV2/index.js +0 -120
  47. package/components/MobilePushPreviewV2/messages.js +0 -13
  48. package/components/MobilePushPreviewV2/tests/index.test.js +0 -10
  49. package/components/NewCallTask/_newCallTask.scss +0 -9
  50. package/components/NewCallTask/index.js +0 -152
  51. package/components/NewCallTask/messages.js +0 -29
  52. package/components/NewCallTask/tests/index.test.js +0 -10
  53. package/components/SmsPreviewV2/_smsPreviewV2.scss +0 -353
  54. package/components/SmsPreviewV2/index.js +0 -69
  55. package/components/SmsPreviewV2/messages.js +0 -13
  56. package/components/SmsPreviewV2/tests/index.test.js +0 -10
  57. package/v2Components/DateFilter/index.js +0 -349
  58. package/v2Components/DateFilter/messages.js +0 -17
  59. package/v2Components/DateFilter/tests/index.test.js +0 -15
  60. package/v2Components/DateRange/index.js +0 -113
  61. package/v2Components/DateRange/messages.js +0 -13
  62. package/v2Components/DateRange/tests/index.test.js +0 -10
  63. package/v2Components/PageHeader/_pageHeader.scss +0 -22
  64. package/v2Components/PageHeader/index.js +0 -37
  65. package/v2Components/PageHeader/messages.js +0 -13
  66. package/v2Components/PageHeader/tests/index.test.js +0 -10
  67. package/v2Components/Sidebar/_sidebar.scss +0 -115
  68. package/v2Components/Sidebar/index.js +0 -208
  69. package/v2Components/Sidebar/messages.js +0 -21
  70. package/v2Components/Sidebar/tests/index.test.js +0 -10
  71. package/v2Components/SmsEditor/index.js +0 -55
  72. package/v2Components/SmsEditor/tests/index.test.js +0 -10
  73. package/v2Components/TopBar/_topbar.scss +0 -46
@@ -1,353 +0,0 @@
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
-
@@ -1,69 +0,0 @@
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;
@@ -1,13 +0,0 @@
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,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import SmsPreviewV2 from '../index';
5
-
6
- describe('<SmsPreviewV2 />', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(false);
9
- });
10
- });