@capillarytech/creatives-library 9.2.1-alpha.sprint-cap-214249.42 → 9.2.1
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/AppRoot.js +4 -7
- package/constants/unified.js +1 -0
- package/package.json +1 -1
- package/utils/beePluginLoader.js +106 -0
- package/utils/common.js +6 -0
- package/utils/createMobilePushPayload.js +51 -56
- package/utils/tests/beePluginLoader.test.js +199 -0
- package/utils/tests/createMobilePushPayload.test.js +10 -162
- package/v2Components/CapMpushCTA/index.js +57 -47
- package/v2Components/CapMpushCTA/index.scss +5 -43
- package/v2Components/CommonTestAndPreview/UnifiedPreview/MobilePushPreviewContent.js +8 -11
- package/v2Components/CommonTestAndPreview/UnifiedPreview/_unifiedPreview.scss +1 -13
- package/v2Components/CommonTestAndPreview/constants.js +0 -2
- package/v2Components/CommonTestAndPreview/index.js +10 -48
- package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/MobilePushPreviewContent.test.js +5 -83
- package/v2Components/CommonTestAndPreview/tests/index.test.js +0 -86
- package/v2Components/TemplatePreview/_templatePreview.scss +2 -12
- package/v2Components/TemplatePreview/index.js +12 -14
- package/v2Components/TemplatePreview/tests/index.test.js +0 -69
- package/v2Containers/BeeEditor/index.js +49 -22
- package/v2Containers/BeeEditor/index.scss +12 -0
- package/v2Containers/BeeEditor/messages.js +8 -0
- package/v2Containers/BeeEditor/test/index.test.js +78 -0
- package/v2Containers/BeePopupEditor/index.js +22 -11
- package/v2Containers/CreativesContainer/SlideBoxContent.js +9 -5
- package/v2Containers/CreativesContainer/index.js +1 -2
- package/v2Containers/CreativesContainer/tests/SlideBoxContent.test.js +0 -43
- package/v2Containers/Email/index.js +2 -2
- package/v2Containers/EmailWrapper/hooks/useEmailWrapper.js +25 -23
- package/v2Containers/MobilePushNew/components/CtaButtons.js +47 -52
- package/v2Containers/MobilePushNew/components/MediaUploaders.js +222 -314
- package/v2Containers/MobilePushNew/components/PlatformContentFields.js +130 -161
- package/v2Containers/MobilePushNew/components/tests/CtaButtons.test.js +208 -30
- package/v2Containers/MobilePushNew/components/tests/MediaUploaders.test.js +123 -484
- package/v2Containers/MobilePushNew/components/tests/PlatformContentFields.test.js +46 -152
- package/v2Containers/MobilePushNew/constants.js +0 -12
- package/v2Containers/MobilePushNew/hooks/tests/usePlatformSync.test.js +1 -63
- package/v2Containers/MobilePushNew/hooks/tests/useUpload.test.js +0 -78
- package/v2Containers/MobilePushNew/hooks/usePlatformSync.js +1 -40
- package/v2Containers/MobilePushNew/hooks/useUpload.js +46 -42
- package/v2Containers/MobilePushNew/index.js +273 -503
- package/v2Containers/MobilePushNew/index.scss +4 -215
- package/v2Containers/MobilePushNew/messages.js +6 -106
- package/v2Containers/MobilePushNew/tests/index.test.js +1 -482
- package/v2Containers/MobilePushNew/tests/utils.test.js +0 -122
- package/v2Containers/MobilePushNew/utils.js +0 -107
- package/v2Containers/Templates/_templates.scss +2 -10
- package/v2Containers/Templates/index.js +81 -83
- package/v2Containers/Templates/tests/index.test.js +0 -68
- package/v2Components/CapMpushCTA/tests/index.test.js +0 -150
- package/v2Containers/MobilePushNew/components/TapLinkActions.js +0 -76
|
@@ -22,95 +22,13 @@
|
|
|
22
22
|
min-height: 37.5rem;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
// Same as the old editor's form column: the form scrolls, the phone beside it stays put
|
|
26
|
-
.mobile-push-container .content-section {
|
|
27
|
-
height: 70vh;
|
|
28
|
-
overflow-y: auto;
|
|
29
|
-
overflow-x: hidden;
|
|
30
|
-
// Right: room for the scrollbar. Left: the scroll box clips the checkbox's -3px margin and
|
|
31
|
-
// input focus outlines, so pad them back in without shifting the form.
|
|
32
|
-
padding-right: $CAP_SPACE_16;
|
|
33
|
-
padding-left: $CAP_SPACE_04;
|
|
34
|
-
margin-left: -$CAP_SPACE_04;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// Editor phone preview, matched to the Preview and Test phone.
|
|
38
|
-
// TemplatePreview sets `position: unset` on this shell, so the card was placed against a
|
|
39
|
-
// wider ancestor and spilled out of the phone; re-anchor it to the phone image.
|
|
40
|
-
.mobile-push-container .preview-section #mobilepush-preview.shell-v2 {
|
|
41
|
-
position: relative;
|
|
42
|
-
width: 100%;
|
|
43
|
-
max-width: 26.786rem;
|
|
44
|
-
padding: 0;
|
|
45
|
-
|
|
46
|
-
.preview-image {
|
|
47
|
-
width: 100%;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.android-push-message-Container,
|
|
51
|
-
.iphone-push-message-Container {
|
|
52
|
-
left: 4%;
|
|
53
|
-
width: 92%;
|
|
54
|
-
|
|
55
|
-
.message-pop {
|
|
56
|
-
padding: $CAP_SPACE_08;
|
|
57
|
-
border-radius: $CAP_SPACE_08;
|
|
58
|
-
background: $CAP_WHITE;
|
|
59
|
-
line-height: normal;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.app-header {
|
|
63
|
-
align-items: center;
|
|
64
|
-
flex-wrap: nowrap;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.app-header-left {
|
|
68
|
-
flex: 1 1 auto;
|
|
69
|
-
flex-wrap: nowrap;
|
|
70
|
-
min-width: 0;
|
|
71
|
-
|
|
72
|
-
.app-icon {
|
|
73
|
-
flex: none;
|
|
74
|
-
width: $CAP_SPACE_20;
|
|
75
|
-
height: $CAP_SPACE_20;
|
|
76
|
-
background-color: $CAP_COLOR_16;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.title {
|
|
81
|
-
max-width: none;
|
|
82
|
-
min-width: 0;
|
|
83
|
-
font-size: $FONT_SIZE_M;
|
|
84
|
-
font-weight: 600;
|
|
85
|
-
color: $FONT_COLOR_01;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.app-header-right {
|
|
89
|
-
flex: none;
|
|
90
|
-
flex-wrap: nowrap;
|
|
91
|
-
margin-left: $CAP_SPACE_08;
|
|
92
|
-
gap: $CAP_SPACE_04;
|
|
93
|
-
font-size: $FONT_SIZE_VS;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.body-text {
|
|
97
|
-
padding-left: 2.785rem;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// Fixed 18.75rem image + left margin is wider than the card on narrow columns
|
|
101
|
-
.body-image img {
|
|
102
|
-
max-width: calc(100% - 1.571rem);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
25
|
.form-section {
|
|
108
26
|
padding: $CAP_SPACE_24;
|
|
109
27
|
background: #fff;
|
|
110
28
|
border-radius: $CAP_SPACE_08;
|
|
111
29
|
}
|
|
112
30
|
|
|
113
|
-
.
|
|
31
|
+
.creative-name-section {
|
|
114
32
|
margin-bottom: $CAP_SPACE_24;
|
|
115
33
|
}
|
|
116
34
|
|
|
@@ -126,11 +44,6 @@
|
|
|
126
44
|
display: flex;
|
|
127
45
|
align-items: center;
|
|
128
46
|
gap: 8px;
|
|
129
|
-
|
|
130
|
-
// antd adds its own end-margin to icons inside tabs, on top of the gap
|
|
131
|
-
.anticon {
|
|
132
|
-
margin-inline-end: 0;
|
|
133
|
-
}
|
|
134
47
|
}
|
|
135
48
|
|
|
136
49
|
.android-icon,
|
|
@@ -146,16 +59,6 @@
|
|
|
146
59
|
margin-top: $CAP_SPACE_12;
|
|
147
60
|
}
|
|
148
61
|
|
|
149
|
-
// Line up with the inputs' right edge, past the form column's scrollbar padding
|
|
150
|
-
.mobile-push-container .same-content-checkbox {
|
|
151
|
-
right: $CAP_SPACE_16;
|
|
152
|
-
|
|
153
|
-
// antd's 8px label padding plus the library's 4px title padding left a wide gap after the box
|
|
154
|
-
.ant-checkbox-label {
|
|
155
|
-
padding-inline-start: $CAP_SPACE_04;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
62
|
.input-section {
|
|
160
63
|
display: flex;
|
|
161
64
|
flex-direction: column;
|
|
@@ -173,21 +76,11 @@
|
|
|
173
76
|
gap: $CAP_SPACE_08;
|
|
174
77
|
}
|
|
175
78
|
|
|
176
|
-
.creatives-mpush-title {
|
|
177
|
-
margin-bottom: $CAP_SPACE_24;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
79
|
.mpush-title-main,
|
|
181
80
|
.mpush-message-main {
|
|
182
81
|
display: flex;
|
|
183
82
|
align-items: center;
|
|
184
83
|
justify-content: space-between;
|
|
185
|
-
|
|
186
|
-
// Shrink the full-height "Add labels" button so the label sits close to its input
|
|
187
|
-
.cap-button-v2.flat-btn {
|
|
188
|
-
height: auto;
|
|
189
|
-
padding: 0;
|
|
190
|
-
}
|
|
191
84
|
}
|
|
192
85
|
|
|
193
86
|
.mpush-title,
|
|
@@ -310,88 +203,9 @@
|
|
|
310
203
|
padding-left: 0.625rem;
|
|
311
204
|
}
|
|
312
205
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
// Heading with "(Optional)" beside it
|
|
317
|
-
.mpush-section-heading {
|
|
318
|
-
margin-bottom: 0;
|
|
319
|
-
|
|
320
|
-
.optional-text {
|
|
321
|
-
margin-left: $CAP_SPACE_08;
|
|
322
|
-
padding: 0;
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
.creatives-mpush-actions {
|
|
327
|
-
.mpush-tap-description {
|
|
328
|
-
display: block;
|
|
329
|
-
color: $FONT_COLOR_02;
|
|
330
|
-
font-size: $FONT_SIZE_M;
|
|
331
|
-
font-weight: $FONT_WEIGHT_REGULAR;
|
|
332
|
-
margin: $CAP_SPACE_04 0 $CAP_SPACE_20;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
.mpush-tap-help {
|
|
336
|
-
margin: $CAP_SPACE_08 0 0;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
.mpush-tap-label {
|
|
340
|
-
display: block;
|
|
341
|
-
color: $FONT_COLOR_01;
|
|
342
|
-
font-weight: $FONT_WEIGHT_MEDIUM;
|
|
343
|
-
margin-bottom: $CAP_SPACE_08;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
.mpush-tap-link {
|
|
347
|
-
min-width: 0;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
// Same height as the "When tapped, open" label (h4 line height), so the URL input lines up with
|
|
351
|
-
// the dropdown; the taller "Add labels" trigger is centred in the row instead of stretching it
|
|
352
|
-
.mpush-tap-link-header {
|
|
353
|
-
height: 1.449rem;
|
|
354
|
-
margin-bottom: $CAP_SPACE_08;
|
|
355
|
-
|
|
356
|
-
.mpush-tap-label {
|
|
357
|
-
margin-bottom: 0;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
// Shrink the full-height "Add labels" button so the label row stays compact
|
|
361
|
-
.cap-button-v2.flat-btn {
|
|
362
|
-
height: auto;
|
|
363
|
-
padding: 0;
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
.mpush-tap-deep-link-keys {
|
|
368
|
-
margin-top: $CAP_SPACE_16;
|
|
369
|
-
|
|
370
|
-
// One label + input per key, spaced as a pair so each label reads with its own input
|
|
371
|
-
.mpush-deep-link-key {
|
|
372
|
-
margin-top: $CAP_SPACE_12;
|
|
373
|
-
|
|
374
|
-
.deep-link-keys-value {
|
|
375
|
-
display: block;
|
|
376
|
-
margin-bottom: $CAP_SPACE_08;
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
// Save / Delete under an open tap link, spaced like the button form's
|
|
382
|
-
.mpush-tap-save-delete-btn {
|
|
383
|
-
margin-top: $CAP_SPACE_16;
|
|
384
|
-
gap: $CAP_SPACE_08;
|
|
385
|
-
|
|
386
|
-
.button-disabled-tooltip-wrapper {
|
|
387
|
-
margin-top: 0;
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
.mpush-cta-buttons .mpush-section-heading {
|
|
393
|
-
margin-bottom: $CAP_SPACE_04;
|
|
394
|
-
}
|
|
206
|
+
.action-on-click-checkbox {
|
|
207
|
+
margin-left: -3px;
|
|
208
|
+
margin-top: $CAP_SPACE_02;
|
|
395
209
|
}
|
|
396
210
|
|
|
397
211
|
.action-description {
|
|
@@ -430,13 +244,6 @@
|
|
|
430
244
|
margin: 0;
|
|
431
245
|
}
|
|
432
246
|
|
|
433
|
-
// Shared wrapper has margin-top for another context; keep "+" in line with the tabs (as in RCS)
|
|
434
|
-
.button-disabled-tooltip-wrapper {
|
|
435
|
-
display: inline-flex;
|
|
436
|
-
align-items: center;
|
|
437
|
-
margin-top: 0;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
247
|
.cap-divider-v2 {
|
|
441
248
|
height: 1.5rem;
|
|
442
249
|
margin-bottom: 0.499rem;
|
|
@@ -473,12 +280,6 @@
|
|
|
473
280
|
}
|
|
474
281
|
}
|
|
475
282
|
|
|
476
|
-
// Pin Reupload inside the image box's right edge, independent of the column width
|
|
477
|
-
.mobile-push-container .cap-custom-image-upload .dragger-button.re-upload {
|
|
478
|
-
left: 100%;
|
|
479
|
-
transform: translateX(calc(-100% - #{$CAP_SPACE_08}));
|
|
480
|
-
}
|
|
481
|
-
|
|
482
283
|
.mobile-push-carousel-card {
|
|
483
284
|
.ant-card-head {
|
|
484
285
|
border-bottom: none;
|
|
@@ -535,18 +336,6 @@
|
|
|
535
336
|
margin-bottom: $CAP_SPACE_12;
|
|
536
337
|
}
|
|
537
338
|
|
|
538
|
-
// Sticky footer matching the slidebox footer height, so Save stays reachable while scrolling
|
|
539
|
-
.mpush-save-section {
|
|
540
|
-
margin-bottom: 0;
|
|
541
|
-
position: sticky;
|
|
542
|
-
bottom: 0;
|
|
543
|
-
z-index: 2;
|
|
544
|
-
align-items: center;
|
|
545
|
-
height: 6.286rem;
|
|
546
|
-
background: $CAP_WHITE;
|
|
547
|
-
border-top: 1px solid $CAP_G07;
|
|
548
|
-
}
|
|
549
|
-
|
|
550
339
|
.mpush-media-type {
|
|
551
340
|
margin-bottom: $CAP_SPACE_08;
|
|
552
341
|
}
|
|
@@ -195,113 +195,13 @@ export default defineMessages({
|
|
|
195
195
|
id: `${scope}.validationLoadingMessage`,
|
|
196
196
|
defaultMessage: 'Please wait while we validate the template',
|
|
197
197
|
},
|
|
198
|
-
|
|
199
|
-
id: `${scope}.
|
|
200
|
-
defaultMessage: '
|
|
198
|
+
androidValidationError: {
|
|
199
|
+
id: `${scope}.androidValidationError`,
|
|
200
|
+
defaultMessage: 'Please fill in title and message for Android',
|
|
201
201
|
},
|
|
202
|
-
|
|
203
|
-
id: `${scope}.
|
|
204
|
-
defaultMessage: '
|
|
205
|
-
},
|
|
206
|
-
androidOnly: {
|
|
207
|
-
id: `${scope}.androidOnly`,
|
|
208
|
-
defaultMessage: 'Android only',
|
|
209
|
-
},
|
|
210
|
-
iosOnly: {
|
|
211
|
-
id: `${scope}.iosOnly`,
|
|
212
|
-
defaultMessage: 'iOS only',
|
|
213
|
-
},
|
|
214
|
-
removePlatformContent: {
|
|
215
|
-
id: `${scope}.removePlatformContent`,
|
|
216
|
-
defaultMessage: 'Remove {platform} content?',
|
|
217
|
-
},
|
|
218
|
-
removeContent: {
|
|
219
|
-
id: `${scope}.removeContent`,
|
|
220
|
-
defaultMessage: 'Remove content',
|
|
221
|
-
},
|
|
222
|
-
notificationTap: {
|
|
223
|
-
id: `${scope}.notificationTap`,
|
|
224
|
-
defaultMessage: 'Notification tap',
|
|
225
|
-
},
|
|
226
|
-
notificationTapDescription: {
|
|
227
|
-
id: `${scope}.notificationTapDescription`,
|
|
228
|
-
defaultMessage: 'What happens when someone taps the notification itself.',
|
|
229
|
-
},
|
|
230
|
-
whenTappedOpen: {
|
|
231
|
-
id: `${scope}.whenTappedOpen`,
|
|
232
|
-
defaultMessage: 'When tapped, open',
|
|
233
|
-
},
|
|
234
|
-
tapActionApp: {
|
|
235
|
-
id: `${scope}.tapActionApp`,
|
|
236
|
-
defaultMessage: 'App (default)',
|
|
237
|
-
},
|
|
238
|
-
tapActionAppHelp: {
|
|
239
|
-
id: `${scope}.tapActionAppHelp`,
|
|
240
|
-
defaultMessage: 'Opens your app. Choose a link to send people to a specific page instead.',
|
|
241
|
-
},
|
|
242
|
-
deepLinkRequired: {
|
|
243
|
-
id: `${scope}.deepLinkRequired`,
|
|
244
|
-
defaultMessage: 'Select a deep link',
|
|
245
|
-
},
|
|
246
|
-
completeCardToAdd: {
|
|
247
|
-
id: `${scope}.completeCardToAdd`,
|
|
248
|
-
defaultMessage: 'Please set-up the first card before creating the next ones',
|
|
249
|
-
},
|
|
250
|
-
tapLinkSaveDisabled: {
|
|
251
|
-
id: `${scope}.tapLinkSaveDisabled`,
|
|
252
|
-
defaultMessage: 'Please complete the above fields to enable Save',
|
|
253
|
-
},
|
|
254
|
-
saveTapLinkFirst: {
|
|
255
|
-
id: `${scope}.saveTapLinkFirst`,
|
|
256
|
-
defaultMessage: 'Save or delete the open tap link before saving the template',
|
|
257
|
-
},
|
|
258
|
-
carouselMaxCardTooltip: {
|
|
259
|
-
id: `${scope}.carouselMaxCardTooltip`,
|
|
260
|
-
defaultMessage: 'Mobile push carousel cannot contain more than {max} content cards.',
|
|
261
|
-
},
|
|
262
|
-
cardTap: {
|
|
263
|
-
id: `${scope}.cardTap`,
|
|
264
|
-
defaultMessage: 'Card tap',
|
|
265
|
-
},
|
|
266
|
-
cardTapDescription: {
|
|
267
|
-
id: `${scope}.cardTapDescription`,
|
|
268
|
-
defaultMessage: 'What happens when someone taps this card.',
|
|
269
|
-
},
|
|
270
|
-
cardTapAppHelp: {
|
|
271
|
-
id: `${scope}.cardTapAppHelp`,
|
|
272
|
-
defaultMessage: 'Opens your app. Choose a link to send people to a specific page from this card instead.',
|
|
273
|
-
},
|
|
274
|
-
tapActionDeepLink: {
|
|
275
|
-
id: `${scope}.tapActionDeepLink`,
|
|
276
|
-
defaultMessage: 'Deep link',
|
|
277
|
-
},
|
|
278
|
-
tapActionExternalLink: {
|
|
279
|
-
id: `${scope}.tapActionExternalLink`,
|
|
280
|
-
defaultMessage: 'External link',
|
|
281
|
-
},
|
|
282
|
-
url: {
|
|
283
|
-
id: `${scope}.url`,
|
|
284
|
-
defaultMessage: 'URL',
|
|
285
|
-
},
|
|
286
|
-
enterUrl: {
|
|
287
|
-
id: `${scope}.enterUrl`,
|
|
288
|
-
defaultMessage: 'Enter URL',
|
|
289
|
-
},
|
|
290
|
-
urlNotValid: {
|
|
291
|
-
id: `${scope}.urlNotValid`,
|
|
292
|
-
defaultMessage: 'URL is not valid',
|
|
293
|
-
},
|
|
294
|
-
replacePlatformContent: {
|
|
295
|
-
id: `${scope}.replacePlatformContent`,
|
|
296
|
-
defaultMessage: 'Replace {platform} content?',
|
|
297
|
-
},
|
|
298
|
-
replacePlatformContentBody: {
|
|
299
|
-
id: `${scope}.replacePlatformContentBody`,
|
|
300
|
-
defaultMessage: 'The {platform} title, message, media and buttons will be replaced with the {source} content.',
|
|
301
|
-
},
|
|
302
|
-
replace: {
|
|
303
|
-
id: `${scope}.replace`,
|
|
304
|
-
defaultMessage: 'Replace',
|
|
202
|
+
iosValidationError: {
|
|
203
|
+
id: `${scope}.iosValidationError`,
|
|
204
|
+
defaultMessage: 'Please fill in title and message for iOS',
|
|
305
205
|
},
|
|
306
206
|
carouselMediaType: {
|
|
307
207
|
id: `${scope}.carouselMediaType`,
|