@capillarytech/creatives-library 8.0.129 → 8.0.130

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 (76) hide show
  1. package/containers/App/constants.js +0 -1
  2. package/containers/Templates/constants.js +10 -1
  3. package/containers/Templates/index.js +45 -45
  4. package/package.json +1 -1
  5. package/services/api.js +9 -7
  6. package/services/tests/haptic-api.test.js +387 -0
  7. package/tests/integration/TemplateCreation/TemplateCreation.integration.test.js +3 -8
  8. package/tests/integration/TemplateCreation/api-response.js +0 -5
  9. package/tests/integration/TemplateCreation/msw-handler.js +63 -42
  10. package/utils/common.js +0 -7
  11. package/utils/commonUtils.js +6 -2
  12. package/utils/tests/vendorDataTransformers.test.js +512 -0
  13. package/utils/vendorDataTransformers.js +108 -0
  14. package/v2Components/CapDocumentUpload/index.js +2 -2
  15. package/v2Components/CapImageUpload/index.js +46 -59
  16. package/v2Components/CapInAppCTA/index.js +0 -1
  17. package/v2Components/CapTagList/index.js +120 -177
  18. package/v2Components/CapVideoUpload/constants.js +0 -3
  19. package/v2Components/CapVideoUpload/index.js +110 -167
  20. package/v2Components/CapVideoUpload/messages.js +0 -16
  21. package/v2Components/Carousel/index.js +13 -15
  22. package/v2Components/ErrorInfoNote/style.scss +0 -1
  23. package/v2Components/MobilePushPreviewV2/index.js +5 -37
  24. package/v2Components/TemplatePreview/_templatePreview.scss +72 -114
  25. package/v2Components/TemplatePreview/index.js +50 -178
  26. package/v2Components/TemplatePreview/messages.js +0 -4
  27. package/v2Containers/CreativesContainer/SlideBoxContent.js +62 -127
  28. package/v2Containers/CreativesContainer/index.js +136 -191
  29. package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +22 -0
  30. package/v2Containers/InApp/constants.js +0 -1
  31. package/v2Containers/InApp/index.js +13 -13
  32. package/v2Containers/MobilePush/Create/index.js +0 -1
  33. package/v2Containers/MobilePush/commonMethods.js +14 -7
  34. package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +5 -5
  35. package/v2Containers/TagList/index.js +10 -56
  36. package/v2Containers/Templates/_templates.scss +1 -101
  37. package/v2Containers/Templates/index.js +41 -151
  38. package/v2Containers/Templates/messages.js +0 -8
  39. package/v2Containers/Templates/sagas.js +0 -2
  40. package/v2Containers/Whatsapp/constants.js +32 -1
  41. package/v2Containers/Whatsapp/index.js +104 -25
  42. package/v2Containers/Whatsapp/tests/haptic.test.js +405 -0
  43. package/utils/createPayload.js +0 -405
  44. package/utils/tests/createPayload.test.js +0 -785
  45. package/v2Components/CapMpushCTA/constants.js +0 -25
  46. package/v2Components/CapMpushCTA/index.js +0 -402
  47. package/v2Components/CapMpushCTA/index.scss +0 -95
  48. package/v2Components/CapMpushCTA/messages.js +0 -101
  49. package/v2Components/TemplatePreview/assets/images/Android _ With date and time.svg +0 -29
  50. package/v2Components/TemplatePreview/assets/images/android.svg +0 -9
  51. package/v2Components/TemplatePreview/assets/images/iOS _ With date and time.svg +0 -26
  52. package/v2Components/TemplatePreview/assets/images/ios.svg +0 -9
  53. package/v2Containers/MobilePushNew/actions.js +0 -116
  54. package/v2Containers/MobilePushNew/components/CtaButtons.js +0 -181
  55. package/v2Containers/MobilePushNew/components/MediaUploaders.js +0 -834
  56. package/v2Containers/MobilePushNew/components/PlatformContentFields.js +0 -345
  57. package/v2Containers/MobilePushNew/components/index.js +0 -5
  58. package/v2Containers/MobilePushNew/components/tests/CtaButtons.test.js +0 -798
  59. package/v2Containers/MobilePushNew/components/tests/MediaUploaders.test.js +0 -2114
  60. package/v2Containers/MobilePushNew/components/tests/PlatformContentFields.test.js +0 -343
  61. package/v2Containers/MobilePushNew/constants.js +0 -115
  62. package/v2Containers/MobilePushNew/hooks/tests/usePlatformSync.test.js +0 -1299
  63. package/v2Containers/MobilePushNew/hooks/tests/useUpload.test.js +0 -1223
  64. package/v2Containers/MobilePushNew/hooks/usePlatformSync.js +0 -246
  65. package/v2Containers/MobilePushNew/hooks/useUpload.js +0 -726
  66. package/v2Containers/MobilePushNew/index.js +0 -3412
  67. package/v2Containers/MobilePushNew/index.scss +0 -308
  68. package/v2Containers/MobilePushNew/messages.js +0 -242
  69. package/v2Containers/MobilePushNew/reducer.js +0 -160
  70. package/v2Containers/MobilePushNew/sagas.js +0 -198
  71. package/v2Containers/MobilePushNew/selectors.js +0 -55
  72. package/v2Containers/MobilePushNew/tests/reducer.test.js +0 -741
  73. package/v2Containers/MobilePushNew/tests/sagas.test.js +0 -863
  74. package/v2Containers/MobilePushNew/tests/selectors.test.js +0 -425
  75. package/v2Containers/MobilePushNew/tests/utils.test.js +0 -322
  76. package/v2Containers/MobilePushNew/utils.js +0 -33
@@ -1,25 +0,0 @@
1
- import React from 'react';
2
- import { FormattedMessage } from 'react-intl';
3
- import messages from './messages';
4
-
5
- export const DEEP_LINK = 'DEEP_LINK';
6
- export const EXTERNAL_URL = 'EXTERNAL_URL';
7
- export const WEBSITE = 'WEBSITE';
8
-
9
- export const CTA_OPTIONS = [
10
- {
11
- key: DEEP_LINK,
12
- value: DEEP_LINK,
13
- label: <FormattedMessage {...messages.ctaLinkTypeDeep} />,
14
- tooltipLabel: <FormattedMessage {...messages.ctaOptionDisabledTooltipDeepLink} />,
15
- },
16
- {
17
- key: EXTERNAL_URL,
18
- value: EXTERNAL_URL,
19
- label: <FormattedMessage {...messages.ctaLinkTypeExternal} />,
20
- tooltipLabel: <FormattedMessage {...messages.ctaOptionDisabledTooltipExternalLink} />,
21
- },
22
- ];
23
-
24
- export const BTN_MAX_LENGTH = 20;
25
- export const URL_MAX_LENGTH = 2000;
@@ -1,402 +0,0 @@
1
- import React, { useState, useEffect, useRef } from "react";
2
- import { injectIntl } from "react-intl";
3
- import "react-phone-input-2/lib/style.css";
4
- import cloneDeep from "lodash/cloneDeep";
5
- import CapHeading from "@capillarytech/cap-ui-library/CapHeading";
6
- import CapColumn from "@capillarytech/cap-ui-library/CapColumn";
7
- import CapInput from "@capillarytech/cap-ui-library/CapInput";
8
- import CapButton from "@capillarytech/cap-ui-library/CapButton";
9
- import CapRow from "@capillarytech/cap-ui-library/CapRow";
10
- import CapLabel from "@capillarytech/cap-ui-library/CapLabel";
11
- import CapIcon from "@capillarytech/cap-ui-library/CapIcon";
12
- import CapTooltip from "@capillarytech/cap-ui-library/CapTooltip";
13
- import CapSelect from "@capillarytech/cap-ui-library/CapSelect";
14
- import CapTag from '@capillarytech/cap-ui-library/CapTag';
15
- import globalMessages from "../../v2Containers/Cap/messages";
16
- import inAppMsg from "../../v2Containers/InApp/messages";
17
- import messages from "./messages";
18
- import './index.scss';
19
- import {
20
- isUrl,
21
- isValidText,
22
- } from "../../v2Containers/Line/Container/Wrapper/utils";
23
- import {
24
- BTN_MAX_LENGTH,
25
- DEEP_LINK,
26
- EXTERNAL_URL,
27
- CTA_OPTIONS,
28
- URL_MAX_LENGTH,
29
- } from "./constants";
30
- import { PRIMARY } from "../../v2Containers/MobilePushNew/constants";
31
-
32
- export const CapMpushCTA = (props) => {
33
- const {
34
- intl,
35
- ctaData = [],
36
- updateHandler,
37
- deleteHandler,
38
- deepLink,
39
- buttonType,
40
- } = props;
41
- const { formatMessage } = intl;
42
-
43
- const [urlError, setUrlError] = useState(false);
44
- const [buttonError, setButtonError] = useState(false);
45
- const [deepLinkKeysError, setDeepLinkKeysError] = useState(false);
46
- const [ctaDeepLinkValue, setCtaDeepLinkValue] = useState(ctaData[0]?.url || "");
47
- const [ctaDeepLinkKeysValue, setCtaDeepLinkKeysValue] = useState(ctaData[0]?.deepLinkKeys || []);
48
- const [localUrlValues, setLocalUrlValues] = useState({});
49
- // Track which URLs have been manually cleared to prevent restoration
50
- const clearedUrlsRef = useRef(new Set());
51
- const selectedDeepLink = deepLink?.find((link) => link?.value === ctaData[0]?.url);
52
- const deepLinkKeysFromSelection = selectedDeepLink?.keys;
53
-
54
- // Handle deep link keys value - could be array or string
55
- let deepLinkKeysArray = [];
56
- if (Array.isArray(ctaDeepLinkKeysValue)) {
57
- deepLinkKeysArray = ctaDeepLinkKeysValue;
58
- } else if (ctaDeepLinkKeysValue) {
59
- deepLinkKeysArray = [ctaDeepLinkKeysValue];
60
- }
61
-
62
- let deepLinkKeysFromSelectionArray = [];
63
- if (Array.isArray(deepLinkKeysFromSelection)) {
64
- deepLinkKeysFromSelectionArray = deepLinkKeysFromSelection;
65
- } else if (deepLinkKeysFromSelection) {
66
- deepLinkKeysFromSelectionArray = [deepLinkKeysFromSelection];
67
- }
68
-
69
- useEffect(() => {
70
- const urlValues = {};
71
- ctaData.forEach((cta) => {
72
- if (cta && typeof cta.index !== 'undefined') {
73
- // Don't restore URLs that have been manually cleared
74
- const wasManuallyCleared = clearedUrlsRef.current.has(cta.index);
75
- urlValues[cta.index] = wasManuallyCleared ? '' : (cta.url || '');
76
-
77
-
78
- }
79
- });
80
- setLocalUrlValues(urlValues);
81
- }, [ctaData]);
82
-
83
- const updateHelper = (type, value, index) => {
84
- let clonedCta = cloneDeep(ctaData[index]);
85
- clonedCta = {
86
- ...clonedCta,
87
- [type]: value,
88
- };
89
-
90
- if (type === 'url') {
91
- setLocalUrlValues(prev => ({
92
- ...prev,
93
- [index]: value
94
- }));
95
- }
96
-
97
- updateHandler(clonedCta, index);
98
- };
99
-
100
- const renderLength = (len, max) => (
101
- <CapHeading
102
- type="label1"
103
- className="inapp-render-btn-length"
104
- >
105
- {formatMessage(inAppMsg.templateMessageLength, {
106
- currentLength: len,
107
- maxLength: max,
108
- })}
109
- </CapHeading>
110
- );
111
-
112
-
113
- const onButtonTextChange = ({ target }) => {
114
- const { value, id } = target;
115
- let errorMessage = "";
116
- if (!isValidText(value)) {
117
- errorMessage = formatMessage(messages.ctaButtonErrorMessage);
118
- }
119
- setButtonError(errorMessage);
120
- updateHelper("text", value, id);
121
- };
122
-
123
- const onUrlTypeChange = (value, index) => {
124
- // Mark this URL as manually cleared to prevent restoration
125
- clearedUrlsRef.current.add(index);
126
-
127
- // Clear the URL field when switching between link types
128
- updateHelper('url', '', index);
129
-
130
- // Immediately clear the local URL state for this button
131
- setLocalUrlValues(prev => ({
132
- ...prev,
133
- [index]: ''
134
- }));
135
-
136
- // Also clear the local deep link state
137
- setCtaDeepLinkValue('');
138
- // Clear any URL errors
139
- setUrlError(false);
140
- // Update the URL type
141
- updateHelper('urlType', value, index);
142
- };
143
-
144
- const onUrlChange = ({ target }) => {
145
- const { value, dataset } = target;
146
- const index = parseInt(dataset.index, 10);
147
-
148
- // If user is typing a new URL, remove from cleared set
149
- if (value && value.trim() !== '') {
150
- clearedUrlsRef.current.delete(index);
151
- }
152
-
153
- let errorMessage = false;
154
- if (!isUrl(value)) {
155
- errorMessage = formatMessage(messages.ctaWebsiteUrlErrorMessage);
156
- }
157
- setUrlError(errorMessage);
158
-
159
- // Update local state immediately for instant UI feedback
160
- setLocalUrlValues(prev => ({
161
- ...prev,
162
- [index]: value
163
- }));
164
-
165
- updateHelper('url', value, index);
166
- };
167
-
168
- const onDeepLinkSelect = (value, index) => {
169
- setCtaDeepLinkValue(value);
170
- let errorMessage = false;
171
- if (!isUrl(value)) {
172
- errorMessage = formatMessage(messages.ctaWebsiteUrlErrorMessage);
173
- }
174
- setUrlError(errorMessage);
175
- updateHelper('url', value, index);
176
- };
177
-
178
- const onDeepLinkKeysChange = ({ target }) => {
179
- const { value, dataset } = target;
180
- const index = parseInt(dataset.index, 10);
181
- // Parse comma-separated values into array
182
- const keysArray = value.split(',').map((key) => key.trim()).filter((key) => key.length > 0);
183
- setCtaDeepLinkKeysValue(keysArray);
184
- setDeepLinkKeysError(keysArray.length === 0);
185
- updateHelper('deepLinkKeys', keysArray, index);
186
- };
187
-
188
- const ctaSaveDisabled = (index) => {
189
- const { urlType, text, url } = ctaData[index] || {};
190
- if (text === "" || buttonError) {
191
- return true;
192
- } else if (urlType === DEEP_LINK && (ctaDeepLinkValue === "" || urlError)) {
193
- return true;
194
- } else if (urlType === DEEP_LINK && ctaDeepLinkValue && deepLinkKeysFromSelectionArray.length > 0 && (!Array.isArray(ctaDeepLinkKeysValue) || ctaDeepLinkKeysValue.length === 0 || deepLinkKeysError)) {
195
- return true;
196
- } else if (urlType === EXTERNAL_URL && (url === "" || urlError)) {
197
- return true;
198
- }
199
- };
200
-
201
- const isSavedCta = (index, saved) => {
202
- updateHelper("isSaved", saved, index);
203
- };
204
-
205
- const renderedContent = () => {
206
- const renderArray = [];
207
- const filteredCtaData = ctaData?.filter((cta) => {
208
- if (buttonType === PRIMARY) {
209
- return cta.index === 0;
210
- } else {
211
- return cta.index === 1;
212
- }
213
- });
214
-
215
- filteredCtaData?.forEach((cta) => {
216
- const { index, text, url, urlType, isSaved } = cta || {};
217
- if (isSaved) {
218
- renderArray.push(
219
- <CapRow
220
- className="cap-inapp-saved-cta"
221
- align="middle"
222
- type="flex"
223
- >
224
- <CapRow className="inapp-cta-row">
225
- <CapColumn>
226
- <CapIcon size="s" type={'launch'} className="btn-icon" />
227
- </CapColumn>
228
- <CapColumn className="btn-text">
229
- <CapLabel type="label2" className="inapp-saved-cta-button-text">
230
- {text}
231
- </CapLabel>
232
- </CapColumn>
233
- </CapRow>
234
- <CapColumn >
235
- {urlType === DEEP_LINK ?
236
- <CapTag className="cta-type-label">{formatMessage(messages.urlDeepLink)}</CapTag>
237
- : <CapTag className="cta-type-label">{formatMessage(messages.urlExternalLink)}</CapTag>}
238
- </CapColumn>
239
- <CapColumn>
240
- {urlType === DEEP_LINK ? selectedDeepLink?.label : ''}
241
- </CapColumn>
242
- <CapColumn>
243
- {urlType === DEEP_LINK && deepLinkKeysFromSelectionArray.length > 0 && (ctaData[index]?.deepLinkKeys || selectedDeepLink?.keys) ? (
244
- <CapLabel type="label2" className="inapp-saved-cta-deep-link-keys">
245
- {(() => {
246
- const keys = selectedDeepLink?.keys || ctaData[index].deepLinkKeys;
247
- if (Array.isArray(keys)) {
248
- return keys.join(', ');
249
- }
250
- return keys;
251
- })()}
252
- </CapLabel>
253
- ) : ''}
254
- </CapColumn>
255
- {(
256
- <CapRow className="cta-action-grp">
257
- <CapColumn
258
- className="inapp-saved-cta-edit-icon"
259
- onClick={() => isSavedCta(index, false)}
260
- >
261
- <CapIcon size="s" type="edit" className="cta-action" />
262
- </CapColumn>
263
- <CapColumn onClick={() => deleteHandler(index)} className="cta-del-icon">
264
- <CapIcon size="s" type="delete" className="cta-action" ariaLabel="delete-cta-icon" />
265
- </CapColumn>
266
- </CapRow>
267
- )}
268
- </CapRow>
269
- );
270
- } else {
271
- renderArray.push(
272
- <CapRow
273
- className="cap-inapp-cta"
274
- id={`cap-inapp-cta-${index}`}
275
- >
276
- <CapColumn>
277
- <CapHeading type="h4" className="cta-label">
278
- {buttonType === PRIMARY ? formatMessage(messages.ctaButtonText) : formatMessage(messages.ctaButtonTextSecondary)}
279
- </CapHeading>
280
- <CapInput
281
- id={index}
282
- onChange={onButtonTextChange}
283
- placeholder={formatMessage(messages.ctaButtonTextPlaceholder)}
284
- value={text}
285
- maxLength={BTN_MAX_LENGTH}
286
- errorMessage={buttonError}
287
- />
288
- {renderLength(text.length, BTN_MAX_LENGTH)}
289
- </CapColumn>
290
- <CapColumn className="inapp-cta-buttons">
291
- <CapRow style={{ width: '30%', marginRight: '10px' }}>
292
- <CapHeading type="h4" className="cta-label">
293
- {formatMessage(messages.ctaType)}
294
- </CapHeading>
295
- <CapSelect.CapCustomSelect
296
- id="inapp-cta-type"
297
- key="mpush-cta-type"
298
- options={CTA_OPTIONS || []}
299
- onChange={(value) => onUrlTypeChange(value, index)}
300
- value={urlType}
301
- />
302
- </CapRow>
303
- {urlType === DEEP_LINK && (
304
- <CapRow style={{ width: '70%' }}>
305
- <CapHeading type="h4">
306
- {formatMessage(messages.urlDeepLink)}
307
- </CapHeading>
308
- <CapSelect.CapCustomSelect
309
- id="inapp-deep-link-type"
310
- key="mpush-deep-link-type"
311
- placeholder={formatMessage(messages.ctaDeepLinkOptionsPlaceholder)}
312
- options={deepLink || []}
313
- onChange={(value) => onDeepLinkSelect(value, index)}
314
- value={ctaDeepLinkValue}
315
- />
316
- </CapRow>
317
- )}
318
- {urlType === EXTERNAL_URL && (
319
- <CapRow style={{ width: '70%' }}>
320
- <CapHeading type="h4">
321
- {formatMessage(messages.urlExternalLink)}
322
- </CapHeading>
323
- <CapInput
324
- id="inapp-cta-external-link"
325
- className="inapp-cta-external-link"
326
- onChange={onUrlChange}
327
- placeholder={formatMessage(messages.ctaExternalLinkPlaceholder)}
328
- value={localUrlValues[index] || ''}
329
- size="large"
330
- maxLength={URL_MAX_LENGTH}
331
- errorMessage={urlError}
332
- data-index={index}
333
- />
334
- </CapRow>
335
- )}
336
- </CapColumn>
337
- {urlType === DEEP_LINK && ctaDeepLinkValue && deepLinkKeysFromSelectionArray.length > 0 && (
338
- <CapRow style={{ marginTop: '10px' }}>
339
- <CapHeading type="h4">
340
- {formatMessage(messages.deepLinkKeys)}
341
- </CapHeading>
342
- <CapLabel type="label2" className="cta-deep-link-keys-value">
343
- {(() => {
344
- if (deepLinkKeysFromSelectionArray.length > 0) {
345
- return deepLinkKeysFromSelectionArray.join(', ');
346
- }
347
- if (deepLinkKeysArray.length > 0) {
348
- return deepLinkKeysArray.join(', ');
349
- }
350
- return "No value set";
351
- })()}
352
- </CapLabel>
353
- <CapInput
354
- id="inapp-deep-link-keys"
355
- className="inapp-deep-link-keys"
356
- onChange={onDeepLinkKeysChange}
357
- placeholder={formatMessage(messages.deepLinkKeysPlaceholder, { key: deepLinkKeysFromSelectionArray.join(', ') || 'deep link keys' })}
358
- value={Array.isArray(ctaDeepLinkKeysValue) ? ctaDeepLinkKeysValue.join(', ') : (ctaDeepLinkKeysValue || '')}
359
- size="large"
360
- data-index={index}
361
- errorMessage={deepLinkKeysError ? formatMessage(messages.deepLinkKeysRequired) : ""}
362
- />
363
- </CapRow>
364
- )}
365
- <CapRow className="inapp-cta-save-delete-btn">
366
- <CapTooltip
367
- title={
368
- ctaSaveDisabled(index)
369
- ? formatMessage(messages.ctaSaveDisabled)
370
- : ""
371
- }
372
- placement={"bottom"}
373
- >
374
- <div className="button-disabled-tooltip-wrapper">
375
- <CapButton
376
- onClick={() => isSavedCta(index, true)}
377
- disabled={ctaSaveDisabled(index)}
378
- className="inapp-cta-save-btn"
379
- >
380
- {formatMessage(globalMessages.save)}
381
- </CapButton>
382
- </div>
383
- </CapTooltip>
384
- <CapButton
385
- onClick={() => deleteHandler(index)}
386
- className="inapp-cta-delete-btn"
387
- type="secondary"
388
- >
389
- {formatMessage(globalMessages.delete)}
390
- </CapButton>
391
- </CapRow>
392
- </CapRow>
393
- );
394
- }
395
- });
396
- return renderArray;
397
- };
398
-
399
- return renderedContent();
400
- };
401
-
402
- export default injectIntl(CapMpushCTA);
@@ -1,95 +0,0 @@
1
- @import '~@capillarytech/cap-ui-library/styles/_variables.scss';
2
-
3
- .cap-inapp-cta {
4
- margin-top: $CAP_SPACE_16;
5
- margin-left: 1.6rem;
6
- padding: $CAP_SPACE_16 $CAP_SPACE_24;
7
- border: 1px solid $CAP_G06;
8
- border-radius: $CAP_SPACE_04;
9
-
10
- .inapp-cta-buttons {
11
- margin-top: $CAP_SPACE_12;
12
- display: flex;
13
- flex-direction: row;
14
- align-items: flex-end;
15
- justify-content: space-between;
16
-
17
- .inapp-render-btn-length {
18
- margin-top: $CAP_SPACE_12;
19
- width: 90%;
20
- margin-left: 52%;
21
- margin-bottom: $CAP_SPACE_12;
22
- }
23
- }
24
-
25
- #inapp-deep-link-type {
26
- width: 100%;
27
- margin-top: $CAP_SPACE_12;
28
- }
29
-
30
- .inapp-cta-external-link {
31
- margin-top: $CAP_SPACE_12;
32
- }
33
-
34
- .inapp-cta-save-delete-btn {
35
- margin-top: $CAP_SPACE_16;
36
-
37
- .inapp-cta-save-btn {
38
- margin-right: $CAP_SPACE_04;
39
- }
40
- .inapp-cta-delete-btn {
41
- margin-left: $CAP_SPACE_04;
42
- }
43
- }
44
-
45
- }
46
-
47
- .cap-inapp-saved-cta {
48
- border: solid 1px $CAP_G06;
49
- margin-left: $CAP_SPACE_20;
50
- display: flex;
51
- justify-content: space-between;
52
- padding: $CAP_SPACE_08 $CAP_SPACE_12;
53
- border-radius: $CAP_SPACE_04;
54
- margin-top: $CAP_SPACE_12;
55
- height: $CAP_SPACE_40;
56
-
57
- .inapp-saved-cta-button-text {
58
- font-weight: 500;
59
- padding-left: $CAP_SPACE_16;
60
- }
61
-
62
- .inapp-saved-cta-edit-icon {
63
- margin-left: 4.286rem;
64
- }
65
- }
66
- .cta-label {
67
- margin-bottom: $CAP_SPACE_08;
68
- }
69
- .cta-type-label {
70
- border-radius: 1rem;
71
- background-color: $CAP_G08;
72
- width: $CAP_SPACE_80;
73
- height: $CAP_SPACE_24 !important;
74
- align-items: center;
75
- justify-content: center;
76
- }
77
- .cta-action {
78
- cursor: pointer;
79
- }
80
- .inapp-cta-row {
81
- display: flex;
82
- align-items: center;
83
- }
84
- .cta-action-grp {
85
- display: flex;
86
- }
87
- .cta-del-icon {
88
- padding-left: 1rem;
89
- }
90
- .btn-text {
91
- margin-left: $CAP_SPACE_08;
92
- }
93
- .btn-icon {
94
- color: $CAP_G06;
95
- }
@@ -1,101 +0,0 @@
1
- import { defineMessages } from 'react-intl';
2
- const prefix = `creatives.componentsV2.CapMpushCTA`;
3
- export default defineMessages({
4
- ctaType: {
5
- id: `${prefix}.ctaType`,
6
- defaultMessage: 'Type of link',
7
- },
8
- urlDeepLink: {
9
- id: `${prefix}.urlDeepLink`,
10
- defaultMessage: 'Deep link',
11
- },
12
- deepLinkKeys: {
13
- id: `${prefix}.deepLinkKeys`,
14
- defaultMessage: 'Deep Link Keys',
15
- },
16
- deepLinkKeysPlaceholder: {
17
- id: `${prefix}.deepLinkKeysPlaceholder`,
18
- defaultMessage: 'Please input {key}',
19
- },
20
- deepLinkKeysRequired: {
21
- id: `${prefix}.deepLinkKeysRequired`,
22
- defaultMessage: 'Value cannot be empty.',
23
- },
24
- urlExternalLink: {
25
- id: `${prefix}.urlExternalLink`,
26
- defaultMessage: 'External link',
27
- },
28
- ctaButtonText: {
29
- id: `${prefix}.ctaButtonText`,
30
- defaultMessage: 'Primary button text',
31
- },
32
- ctaButtonTextSecondary: {
33
- id: `${prefix}.ctaButtonTextSecondary`,
34
- defaultMessage: 'Secondary button text',
35
- },
36
- ctaDeepLinkOptionsPlaceholder: {
37
- id: `${prefix}.ctaDeepLinkOptionsPlaceholder`,
38
- defaultMessage: 'Select deep link',
39
- },
40
- ctaExternalLinkPlaceholder: {
41
- id: `${prefix}.ctaExternalLinkPlaceholder`,
42
- defaultMessage: 'Enter the external link',
43
- },
44
- ctaButtonTextPlaceholder: {
45
- id: `${prefix}.ctaButtonTextPlaceholder`,
46
- defaultMessage: 'Enter button text',
47
- },
48
- ctaWebsiteType: {
49
- id: `${prefix}.ctaWebsiteType`,
50
- defaultMessage: 'URL Type',
51
- },
52
- ctaLinkTypeDeep: {
53
- id: `${prefix}.ctaLinkTypeDeep`,
54
- defaultMessage: 'Deep link',
55
- },
56
- ctaLinkTypeExternal: {
57
- id: `${prefix}.ctaLinkTypeExternal`,
58
- defaultMessage: 'External link',
59
- },
60
- ctaWebsiteUrl: {
61
- id: `${prefix}.ctaWebsiteUrl`,
62
- defaultMessage: 'Website URL',
63
- },
64
- ctaStaticPlaceholder: {
65
- id: `${prefix}.ctaStaticPlaceholder`,
66
- defaultMessage: 'Enter website URL',
67
- },
68
- ctaWebsiteUrlErrorMessage: {
69
- id: `${prefix}.ctaWebsiteUrlErrorMessage`,
70
- defaultMessage: 'URL is not valid',
71
- },
72
- ctaButtonErrorMessage: {
73
- id: `${prefix}.ctaButtonErrorMessage`,
74
- defaultMessage: "Newlines, Emojis, or Special characters are not allowed",
75
- },
76
- ctaSaveDisabled: {
77
- id: `${prefix}.ctaSaveDisabled`,
78
- defaultMessage: 'Please complete the above fields to enable button',
79
- },
80
- ctaButtonTextTooltip: {
81
- id: `${prefix}.ctaButtonTextTooltip`,
82
- defaultMessage:
83
- 'Use this to name the button. We would recommend not to use special characters for the button text.',
84
- },
85
- ctaOptionDisabledTooltipDeepLink: {
86
- id: `${prefix}.ctaOptionDisabledTooltipDeepLink`,
87
- defaultMessage: 'A page within the mobile app',
88
- },
89
- ctaOptionDisabledTooltipExternalLink: {
90
- id: `${prefix}.ctaOptionDisabledTooltipExternalLink`,
91
- defaultMessage: 'An external web page',
92
- },
93
- staticUrlWithVarErrorMessage: {
94
- id: `${prefix}.staticUrlWithVarErrorMessage`,
95
- defaultMessage: 'Button with url type as static cannot contain variables',
96
- },
97
- useTwoBracketsOnly: {
98
- id: `${prefix}.useTwoBracketsOnly`,
99
- defaultMessage: 'Use two brackets on each side to declare a variable',
100
- },
101
- });
@@ -1,29 +0,0 @@
1
- <svg width="380" height="632" viewBox="0 0 380 632" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <mask id="mask0_195_164721" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="380" height="632">
3
- <rect width="380" height="632" fill="#D9D9D9"/>
4
- </mask>
5
- <g mask="url(#mask0_195_164721)">
6
- <path d="M377.084 179.127H378.056C379.129 179.127 380 180.192 380 181.506V299.612C380 300.925 379.129 301.99 378.056 301.99H377.084V179.127Z" fill="#DFE2E7"/>
7
- <path d="M377.084 368.589H378.056C379.129 368.589 380 369.654 380 370.967V430.512C380 431.826 379.129 432.891 378.056 432.891H377.084V368.589Z" fill="#DFE2E7"/>
8
- <path d="M0 100.357C0 55.6747 0 33.3334 10.7113 18.516C12.2323 16.4119 13.8909 14.4523 15.6717 12.6553C28.213 0 47.1224 0 84.9412 0H292.143C329.962 0 348.871 0 361.413 12.6553C363.194 14.4523 364.852 16.4119 366.373 18.516C377.084 33.3334 377.084 55.6747 377.084 100.357V884.843C377.084 929.525 377.084 951.867 366.373 966.684C364.852 968.788 363.194 970.748 361.413 972.545C348.871 985.2 329.962 985.2 292.143 985.2H84.9412C47.1224 985.2 28.213 985.2 15.6717 972.545C13.8909 970.748 12.2323 968.788 10.7113 966.684C0 951.867 0 929.525 0 884.843V100.357Z" fill="#DFE2E7"/>
9
- <path d="M1.94336 92.8361C1.94336 55.2748 1.94336 36.4942 10.4977 23.6736C12.4375 20.7665 14.6606 18.1399 17.1212 15.8481C27.9723 5.74121 43.868 5.74121 75.6595 5.74121H301.424C333.216 5.74121 349.111 5.74121 359.962 15.8481C362.423 18.1399 364.646 20.7665 366.586 23.6736C375.14 36.4942 375.14 55.2748 375.14 92.8361V892.364C375.14 929.925 375.14 948.706 366.586 961.526C364.646 964.433 362.423 967.06 359.962 969.352C349.111 979.459 333.216 979.459 301.424 979.459H75.6595C43.868 979.459 27.9723 979.459 17.1212 969.352C14.6606 967.06 12.4375 964.433 10.4977 961.526C1.94336 948.706 1.94336 929.925 1.94336 892.364V92.8361Z" fill="#EBECF0"/>
10
- <rect x="8" y="17.5557" width="363" height="943.6" rx="36" fill="#EBECF0"/>
11
- <path d="M8 51C8 31.1177 24.1177 15 44 15H335C354.882 15 371 31.1177 371 51V59H8V51Z" fill="#F4F5F7"/>
12
- <text fill="#2C2C2C" xml:space="preserve" style="white-space: pre" font-family="Roboto" font-size="14" letter-spacing="0em"><tspan x="32" y="43.7852">2:29</tspan></text>
13
- <path d="M285.717 35.3538C285.671 35.3973 285.616 35.4319 285.555 35.4554C285.494 35.479 285.429 35.4911 285.364 35.4911C285.298 35.4911 285.233 35.479 285.172 35.4554C285.112 35.4319 285.056 35.3973 285.01 35.3538L282.889 33.3651C282.796 33.2771 282.744 33.1581 282.744 33.0343C282.745 32.9105 282.798 32.7918 282.891 32.7042C282.984 32.6167 283.111 32.5673 283.243 32.5669C283.375 32.5666 283.502 32.6152 283.596 32.7022L285.717 34.6909C285.764 34.7344 285.8 34.7861 285.826 34.843C285.851 34.8998 285.864 34.9608 285.864 35.0224C285.864 35.0839 285.851 35.1449 285.826 35.2017C285.8 35.2586 285.764 35.3103 285.717 35.3538ZM275.111 32.7022C275.017 32.6143 274.89 32.5649 274.757 32.5649C274.624 32.5649 274.497 32.6143 274.404 32.7022L272.282 34.6909C272.188 34.7788 272.136 34.898 272.136 35.0224C272.136 35.1467 272.188 35.2659 272.282 35.3538C272.376 35.4417 272.503 35.4911 272.636 35.4911C272.768 35.4911 272.896 35.4417 272.989 35.3538L275.111 33.3651C275.157 33.3216 275.194 33.2699 275.219 33.2131C275.244 33.1562 275.257 33.0952 275.257 33.0337C275.257 32.9721 275.244 32.9112 275.219 32.8543C275.194 32.7974 275.157 32.7457 275.111 32.7022V32.7022ZM284.998 38.8561C284.999 38.9039 285 38.9518 285 38.9999C285 39.0479 284.999 39.0958 284.998 39.1437C284.998 39.15 284.997 39.1563 284.997 39.1625C284.996 39.2045 284.994 39.2465 284.992 39.2885L284.992 39.2928C284.914 40.6815 284.291 41.9941 283.242 42.9774C282.194 43.9606 280.793 44.5449 279.312 44.6173L279.308 44.6175C279.263 44.6197 279.218 44.6212 279.173 44.6223C279.167 44.6225 279.16 44.6229 279.153 44.6231C279.102 44.6242 279.051 44.6248 279 44.6249C278.949 44.6249 278.897 44.6243 278.846 44.6231C278.84 44.6229 278.833 44.6225 278.826 44.6223C278.781 44.6212 278.737 44.6196 278.692 44.6175L278.687 44.6173C277.206 44.5449 275.806 43.9607 274.757 42.9774C273.708 41.9941 273.085 40.6815 273.008 39.2928L273.008 39.2884C273.005 39.2465 273.004 39.2045 273.002 39.1625C273.002 39.1563 273.002 39.15 273.002 39.1437C273 39.0958 273 39.0479 273 38.9999C273 38.9518 273 38.9039 273.002 38.8561C273.002 38.8498 273.002 38.8435 273.002 38.8372C273.004 38.7951 273.005 38.7532 273.008 38.7112L273.008 38.707C273.085 37.3183 273.708 36.0057 274.757 35.0224C275.806 34.0391 277.206 33.4549 278.687 33.3824L278.692 33.3822C278.737 33.3801 278.781 33.3785 278.826 33.3774C278.833 33.3772 278.84 33.3769 278.846 33.3767C278.897 33.3755 278.948 33.3749 279 33.3749C279.051 33.3749 279.102 33.3755 279.153 33.3767C279.16 33.3769 279.167 33.3772 279.173 33.3774C279.218 33.3786 279.263 33.3801 279.308 33.3822L279.312 33.3824C280.793 33.4549 282.194 34.0391 283.242 35.0224C284.291 36.0056 284.914 37.3183 284.992 38.707L284.992 38.7113C284.994 38.7532 284.996 38.7951 284.997 38.8372C284.997 38.8435 284.998 38.8498 284.998 38.8561H284.998ZM283 38.9999C283 38.8755 282.947 38.7563 282.853 38.6684C282.759 38.5805 282.632 38.5311 282.5 38.5311H279.5V35.7186C279.5 35.5943 279.447 35.4751 279.353 35.3872C279.259 35.2993 279.132 35.2499 279 35.2499C278.867 35.2499 278.74 35.2993 278.646 35.3872C278.552 35.4751 278.5 35.5943 278.5 35.7186V38.9999C278.5 39.1242 278.552 39.2434 278.646 39.3313C278.74 39.4192 278.867 39.4686 279 39.4686H282.5C282.632 39.4686 282.759 39.4192 282.853 39.3313C282.947 39.2434 283 39.1242 283 38.9999Z" fill="#2C2C2C"/>
14
- <path d="M300 41.8C299.817 41.8008 299.636 41.8377 299.468 41.9085C299.299 41.9793 299.146 42.0827 299.017 42.2127C298.888 42.3427 298.786 42.4968 298.717 42.6662C298.648 42.8356 298.613 43.017 298.614 43.2C298.614 43.9728 299.235 44.6 300 44.6C300.183 44.5991 300.364 44.5622 300.533 44.4913C300.702 44.4205 300.855 44.3171 300.983 44.1871C301.112 44.0571 301.214 43.903 301.283 43.7336C301.352 43.5643 301.387 43.383 301.386 43.2C301.386 42.4265 300.766 41.8 300 41.8ZM297.06 40.2306L298.04 41.2204C298.296 40.9607 298.602 40.7544 298.938 40.6136C299.275 40.4728 299.636 40.4003 300.001 40.4003C300.365 40.4003 300.727 40.4728 301.063 40.6136C301.4 40.7544 301.705 40.9607 301.961 41.2204L302.94 40.2306C302.556 39.841 302.099 39.5317 301.594 39.3205C301.089 39.1093 300.547 39.0006 300 39.0006C299.453 39.0006 298.912 39.1093 298.407 39.3205C297.902 39.5317 297.444 39.841 297.06 40.2306ZM295.1 38.2496L296.08 39.2394C296.592 38.7201 297.203 38.3077 297.876 38.0262C298.548 37.7447 299.271 37.5997 300 37.5997C300.729 37.5997 301.452 37.7447 302.124 38.0262C302.797 38.3077 303.408 38.7201 303.92 39.2394L304.9 38.2496C304.26 37.6004 303.497 37.0848 302.656 36.733C301.815 36.3811 300.912 36.1999 300 36.1999C299.089 36.1999 298.186 36.3811 297.345 36.733C296.503 37.0848 295.741 37.6004 295.1 38.2496V38.2496ZM293.14 36.27L294.12 37.2598C294.888 36.4806 295.803 35.8619 296.813 35.4395C297.822 35.0172 298.906 34.7997 300 34.7997C301.094 34.7997 302.178 35.0172 303.187 35.4395C304.197 35.8619 305.112 36.4806 305.88 37.2598L306.86 36.27C305.964 35.3609 304.896 34.6391 303.718 34.1463C302.541 33.6536 301.277 33.3999 300 33.3999C298.723 33.3999 297.459 33.6536 296.282 34.1463C295.104 34.6391 294.036 35.3609 293.14 36.27V36.27Z" fill="#2C2C2C"/>
15
- <path d="M313.5 42.75H314.84V45H313.5V42.75Z" fill="#2C2C2C"/>
16
- <path d="M316.382 40.25H317.722V45H316.382V40.25Z" fill="#2C2C2C"/>
17
- <path d="M319.264 37.75H320.604V44.9998H319.264V37.75Z" fill="#2C2C2C"/>
18
- <path d="M322.145 35.25H323.485V44.9998H322.145V35.25Z" fill="#2C2C2C"/>
19
- <path d="M325.026 33H326.367V45H325.026V33Z" fill="#2C2C2C"/>
20
- <path d="M343.611 45.5834H336.329C335.928 45.5834 335.601 45.2777 335.601 44.9042V33.3584C335.601 32.9848 335.928 32.6792 336.329 32.6792H343.611C344.011 32.6792 344.339 32.9848 344.339 33.3584V44.9042C344.339 45.2777 344.011 45.5834 343.611 45.5834Z" fill="#CFD8DC"/>
21
- <path d="M341.426 35.0562H338.514C338.295 35.0562 338.149 34.9204 338.149 34.7167V32.3396C338.149 32.1358 338.295 32 338.514 32H341.426C341.645 32 341.791 32.1358 341.791 32.3396V34.7167C341.791 34.9204 341.645 35.0562 341.426 35.0562Z" fill="#CFD8DC"/>
22
- <path d="M343.611 45.5834H336.329C335.928 45.5834 335.601 45.2778 335.601 44.9042V38.4521H344.339V44.9042C344.339 45.2778 344.011 45.5834 343.611 45.5834Z" fill="#6B6B6B"/>
23
- <text fill="#091E42" xml:space="preserve" style="white-space: pre" font-family="Roboto" font-size="28" font-weight="600" letter-spacing="0px"><tspan x="136.5" y="146.57">2:29 PM</tspan></text>
24
- <text fill="#5E6C84" xml:space="preserve" style="white-space: pre" font-family="Roboto" font-size="12" letter-spacing="0px"><tspan x="161.598" y="171.102">Fri, 12 Dec</tspan></text>
25
- <path fill-rule="evenodd" clip-rule="evenodd" d="M188.527 47.0783C193.95 47.0783 198.346 41.9374 198.346 35.5958C198.346 29.2542 193.95 24.1133 188.527 24.1133C183.104 24.1133 178.708 29.2542 178.708 35.5958C178.708 41.9374 183.104 47.0783 188.527 47.0783Z" fill="#DFE2E7"/>
26
- <path fill-rule="evenodd" clip-rule="evenodd" d="M188.528 42.7726C191.917 42.7726 194.665 39.5595 194.665 35.596C194.665 31.6325 191.917 28.4194 188.528 28.4194C185.138 28.4194 182.391 31.6325 182.391 35.596C182.391 39.5595 185.138 42.7726 188.528 42.7726Z" fill="#B3BAC5"/>
27
- <path opacity="0.4" fill-rule="evenodd" clip-rule="evenodd" d="M188.527 34.1607C189.205 34.1607 189.755 33.5181 189.755 32.7254C189.755 31.9327 189.205 31.29 188.527 31.29C187.849 31.29 187.3 31.9327 187.3 32.7254C187.3 33.5181 187.849 34.1607 188.527 34.1607Z" fill="#DFE2E7"/>
28
- </g>
29
- </svg>