@capillarytech/creatives-library 7.10.51 → 7.10.53

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.
@@ -77,7 +77,8 @@ export const SmsTraiCreate = (props) => {
77
77
  const [traiFileMeta, setTraiFileMeta] = useState(null);
78
78
  const [validatedData, setValidatedData] = useState([]);
79
79
  const [files, setFiles] = useState([]);
80
- const [templateRegistrationIndex, setTemplateRegistrationIndex] = useState(null);
80
+ const [templateRegistrationIndex, setTemplateRegistrationIndex] =
81
+ useState(null);
81
82
  const [errorText, setErrorText] = useState('');
82
83
  const [dropZone, setDropZone] = useState(true);
83
84
  const [previewFileIndex, setPreviewFileIndex] = useState(null);
@@ -110,7 +111,10 @@ export const SmsTraiCreate = (props) => {
110
111
  const colCounts = {};
111
112
  const traiFileDataCopy = cloneDeep(traiFileData);
112
113
  //removing last empty row if each cell is empty
113
- if (traiFileDataCopy?.data[traiFileDataCopy?.data?.length - 1]?.every((cell) => !cell)) {
114
+ const removeLastEmptyRow = traiFileDataCopy?.data[
115
+ traiFileDataCopy?.data?.length - 1
116
+ ]?.every((cell) => !cell);
117
+ if (removeLastEmptyRow) {
114
118
  traiFileDataCopy.data.pop();
115
119
  }
116
120
  const fileLen = traiFileDataCopy?.data?.length || 0;
@@ -259,14 +263,27 @@ export const SmsTraiCreate = (props) => {
259
263
  } else if (uploadValidated && duplicateDetailsStatus === FAILURE) {
260
264
  deleteOrCancelCSV();
261
265
  CapNotification.error({ message: duplicateDetailsError || FAILURE });
262
- } else if (uploadValidated && duplicateDetailsStatus === SUCCESS && !isEmpty(validatedData)) {
263
- if (!isEmpty(duplicateDetails) && count > 0 && templateRegistrationIndex !== null) {
266
+ } else if (
267
+ uploadValidated &&
268
+ duplicateDetailsStatus === SUCCESS &&
269
+ !isEmpty(validatedData)
270
+ ) {
271
+ if (
272
+ !isEmpty(duplicateDetails) &&
273
+ count > 0 &&
274
+ templateRegistrationIndex !== null
275
+ ) {
264
276
  const clonedValidatedData = cloneDeep(validatedData);
265
277
  let duplicateTemplateNameCounts = 0;
266
278
  const apiResponseIds = [...new Set(template_ids)];
267
-
279
+
268
280
  for (let i = 1; i < clonedValidatedData.length; i += 1) {
269
- const duplicatePresent = apiResponseIds?.includes(clonedValidatedData[i][templateRegistrationIndex]?.replace(/[“”"'‘’`´]/g, ''));
281
+ const duplicatePresent = apiResponseIds?.includes(
282
+ clonedValidatedData[i][templateRegistrationIndex]?.replace(
283
+ /[“”"'‘’`´]/g,
284
+ '',
285
+ ),
286
+ );
270
287
  if (duplicatePresent) {
271
288
  //if rejection reason for this row is empty, consider as new error
272
289
  if (!clonedValidatedData[i][clonedValidatedData[i]?.length - 1]) {
@@ -291,7 +308,10 @@ export const SmsTraiCreate = (props) => {
291
308
  const selectedFiles = cloneDeep(files);
292
309
  const traiFileDataCopy = cloneDeep(traiFileData);
293
310
  //removing last empty row if each cell is empty
294
- if (traiFileDataCopy?.data[traiFileDataCopy?.data?.length - 1]?.every((cell) => !cell)) {
311
+ const removeLastEmptyRow = traiFileDataCopy?.data[
312
+ traiFileDataCopy?.data?.length - 1
313
+ ]?.every((cell) => !cell);
314
+ if (removeLastEmptyRow) {
295
315
  traiFileDataCopy.data.pop();
296
316
  }
297
317
  //remove capillary rejection reason column if already present on reupload
@@ -340,8 +360,8 @@ export const SmsTraiCreate = (props) => {
340
360
  const headerValidationHandler = (senderIdString) => {
341
361
  //each row must contain atleast 1 header
342
362
  //each header can be either 6 letters or 6 numbers, no mixing
343
- //it cannot contain special characters.
344
- //eg: valid: "123456" "abcdef" invalid: "abc123" "abc$ef" "1234567"
363
+ //it cannot contain special characters except {}
364
+ //eg: valid: "123456" "abcdef" "{123456}" invalid: "abc123" "abc$ef" "1234567"
345
365
  if (senderIdString.length < 6) {
346
366
  return true;
347
367
  }
@@ -349,7 +369,7 @@ export const SmsTraiCreate = (props) => {
349
369
  const numbersOnly = /^\d+$/;
350
370
  let isError = false;
351
371
  senderIdString.split(',').forEach((value) => {
352
- const _value = value.trim();
372
+ const _value = value.trim()?.replace(/[{}]/g, '');
353
373
  if (_value) {
354
374
  if (_value.length !== 6) {
355
375
  isError = true;
@@ -363,6 +383,19 @@ export const SmsTraiCreate = (props) => {
363
383
  return isError;
364
384
  };
365
385
 
386
+ const statusValidationHandler = (columnName, value) => {
387
+ //Approval status should be Approved or Status/Template status should be Active/Registered.
388
+ switch (columnName) {
389
+ case STATUS_ALIASES[0]:
390
+ case STATUS_ALIASES[1]:
391
+ return ![ACTIVE, REGISTERED].includes(value);
392
+ case STATUS_ALIASES[2]:
393
+ return value !== APPROVED;
394
+ default:
395
+ return true;
396
+ }
397
+ };
398
+
366
399
  const templateIdValidation = (templateId) => {
367
400
  let isError = false;
368
401
  const _templateId = templateId?.replace(/[“”"'‘’`´]/g, '');
@@ -389,7 +422,9 @@ export const SmsTraiCreate = (props) => {
389
422
  };
390
423
  }
391
424
  })
392
- ?.filter((obj) => obj && obj.template_name !== '' && obj.template_id !== '');
425
+ ?.filter(
426
+ (obj) => obj && obj.template_name !== '' && obj.template_id !== '',
427
+ );
393
428
  setUploadValidated(true);
394
429
  setValidatedData(transformedResults);
395
430
  setTemplateRegistrationIndex(templateIdIndex);
@@ -458,20 +493,26 @@ export const SmsTraiCreate = (props) => {
458
493
  const errorArray = [];
459
494
  const columnErrorArray = [];
460
495
  let rejectionReasons = '';
461
- let statusErrorIndicator = true;
496
+ let statusErrorIndicator = false;
462
497
  //adding rejection reasons
463
498
  transformedResults[row].forEach((cell, index) => {
464
499
  if (index === headerIndex && headerValidationHandler(cell)) {
465
500
  columnErrorArray.push(
466
501
  `${selectedHeaderAlias.toUpperCase()} is mandatory and each ${selectedHeaderAlias.toUpperCase()} must contain either 6 letters or 6 digits. It cannot contain special characters. `,
467
502
  );
468
- } else if (statusIndexes.includes(index) && [ACTIVE, REGISTERED, APPROVED].includes(cell.toLowerCase())) {
469
- statusErrorIndicator = false;
503
+ } else if (statusIndexes.includes(index) && !statusErrorIndicator) {
504
+ statusErrorIndicator = statusValidationHandler(
505
+ transformedResults[0][index].toLowerCase(),
506
+ cell.toLowerCase(),
507
+ );
470
508
  } else if (index === templateIdIndex && templateIdValidation(cell)) {
471
509
  columnErrorArray.push(
472
510
  `${selectedTemplateIdAlias.toUpperCase()} is mandatory and ${selectedTemplateIdAlias.toUpperCase()} must be numeric.`,
473
511
  );
474
- } else if (!cell && ![headerIndex, templateIdIndex, ...statusIndexes].includes(index)) {
512
+ } else if (
513
+ !cell &&
514
+ ![headerIndex, templateIdIndex, ...statusIndexes].includes(index)
515
+ ) {
475
516
  errorArray.push(`"${transformedResults[0][index]}"`);
476
517
  } else if (index === templateNameIndex && cell) {
477
518
  if (templateNameObj[cell]) {
@@ -485,7 +526,7 @@ export const SmsTraiCreate = (props) => {
485
526
 
486
527
  if (statusErrorIndicator) {
487
528
  columnErrorArray.push(
488
- `Only templates with active/registered/approved status will be created.`,
529
+ `Approval status should be Approved or Status/Template status should be Active/Registered.`,
489
530
  );
490
531
  }
491
532
  if (errorArray.length !== 0) {
@@ -671,7 +712,7 @@ export const SmsTraiCreate = (props) => {
671
712
  obj['unicode-validity'] = true;
672
713
  obj['updated-sms-editor'] = '';
673
714
  obj['var-mapped'] = {};
674
- obj.header = obj.header?.replace(/\s/g, '')?.split(',');
715
+ obj.header = obj.header?.replace(/[\s{}]/g, '')?.split(',');
675
716
  const history = obj;
676
717
  history.tabKey = 1;
677
718
  savedData.push({
@@ -745,7 +786,10 @@ export const SmsTraiCreate = (props) => {
745
786
  {previewFileIndex === null && dropZone && (
746
787
  <>
747
788
  <CapSpin spinning={isFileDropped}>
748
- <Dropzone onDrop={onDrop} onFileDialogCancel={deleteOrCancelCSV}>
789
+ <Dropzone
790
+ onDrop={onDrop}
791
+ onFileDialogCancel={deleteOrCancelCSV}
792
+ >
749
793
  {({ getRootProps, getInputProps }) => (
750
794
  <div {...getRootProps()} className="file-drop-zone">
751
795
  <input {...getInputProps()} />
@@ -789,16 +833,18 @@ export const SmsTraiCreate = (props) => {
789
833
  <CapLabel.CapLabelInline type="label9">
790
834
  {fileMeta.name}
791
835
  </CapLabel.CapLabelInline>
792
- {saveTemplate && <CapLabel.CapLabelInline
793
- type="label1"
794
- className="number-of-records"
795
- >
796
- (
797
- {formatMessage(messages.numberOfRecords, {
798
- value: fileData.data.length - 1,
799
- })}
800
- )
801
- </CapLabel.CapLabelInline>}
836
+ {saveTemplate && (
837
+ <CapLabel.CapLabelInline
838
+ type="label1"
839
+ className="number-of-records"
840
+ >
841
+ (
842
+ {formatMessage(messages.numberOfRecords, {
843
+ value: fileData.data.length - 1,
844
+ })}
845
+ )
846
+ </CapLabel.CapLabelInline>
847
+ )}
802
848
  </CapColumn>
803
849
  {errorText && (
804
850
  <>
@@ -4,7 +4,6 @@
4
4
  *
5
5
  */
6
6
 
7
- export const DEFAULT_ACTION = 'app/SmsTrai/DEFAULT_ACTION';
8
7
  export const CHARLIMIT = 30;
9
8
  export const SMS = 'SMS';
10
9
  export const SMS_TRAI_VAR = '{#var#}';
@@ -19,6 +19,25 @@
19
19
  }
20
20
 
21
21
  .creatives-templates-list {
22
+
23
+ .delete-template-confirm {
24
+ .ant-modal-footer {
25
+ padding: $CAP_SPACE_16 $CAP_SPACE_24 $CAP_SPACE_24 $CAP_SPACE_24;
26
+ }
27
+
28
+ .ant-modal-header {
29
+ padding: $CAP_SPACE_24 $CAP_SPACE_24 $CAP_SPACE_08 $CAP_SPACE_24;
30
+ }
31
+
32
+ .ant-modal-body {
33
+ padding: 0 $CAP_SPACE_24;
34
+ }
35
+
36
+ .ant-modal-close-x {
37
+ padding: $CAP_SPACE_12;
38
+ }
39
+ }
40
+
22
41
  .pagination-container {
23
42
  .FACEBOOK {
24
43
  .ant-card-body {
@@ -524,40 +543,9 @@
524
543
  }
525
544
  }
526
545
 
527
- .whatsapp-card-title {
528
-
529
- .whatsapp-status-container {
530
- margin-top: 12px;
531
- width: 150%;
532
- height: 20px;
533
-
534
- .cap-colored-tag-v2 {
535
- font-weight: normal;
536
- }
537
- }
538
- }
539
-
540
546
  .whatsapp-illustration-desc {
541
547
  font-size: 14px;
542
548
  color: rgba(0, 0, 0, 0.87);
543
549
  margin: 8px 0;
544
550
  white-space: pre-wrap;
545
551
  }
546
-
547
- .delete-template-confirm {
548
- .ant-modal-footer {
549
- padding: $CAP_SPACE_16 $CAP_SPACE_24 $CAP_SPACE_24 $CAP_SPACE_24;
550
- }
551
-
552
- .ant-modal-header {
553
- padding: $CAP_SPACE_24 $CAP_SPACE_24 $CAP_SPACE_08 $CAP_SPACE_24;
554
- }
555
-
556
- .ant-modal-body {
557
- padding: 0 $CAP_SPACE_24;
558
- }
559
-
560
- .ant-modal-close-x {
561
- padding: $CAP_SPACE_12;
562
- }
563
- }
@@ -55,24 +55,18 @@ export function setWeChatAccount(weChatAccount) {
55
55
  weChatAccount,
56
56
  };
57
57
  }
58
-
59
58
  export function setChannelAccount(channel, account) {
60
- switch (channel) {
61
- case LINE: {
62
- return {
63
- type: types.SET_LINE_ACCOUNT,
64
- account,
65
- };
66
- }
67
- case WHATSAPP: {
68
- return {
69
- type: types.SET_WHATSAPP_ACCOUNT,
70
- account,
71
- };
72
- }
73
- default:
74
- return {};
59
+ const channelTypeMapping = {
60
+ LINE: types.SET_LINE_ACCOUNT,
61
+ WHATSAPP: types.SET_WHATSAPP_ACCOUNT,
62
+ };
63
+ if (channelTypeMapping[channel]) {
64
+ return {
65
+ type: channelTypeMapping[channel],
66
+ account,
67
+ };
75
68
  }
69
+ return {};
76
70
  }
77
71
 
78
72
  export function setViberAccount(viberAccount) {
@@ -22,7 +22,31 @@ import find from 'lodash/find';
22
22
  import map from 'lodash/map';
23
23
  import { bindActionCreators } from 'redux';
24
24
  import { Modal, Form} from 'antd';
25
- import {CapMenu, CapDropdown, CapButton, CapInput, CapIcon, CapRadioCard, CapPopover, CapSpin, CapCustomCard, CapRow, CapSlideBox, CapLink, CapHeading, CapNotification, CapIllustration, CapHeader, CapLabel, CapRadio, CapSelectFilter, CapTag, CapTooltip, CapAlert, CapModal } from '@capillarytech/cap-ui-library';
25
+ import {
26
+ CapMenu,
27
+ CapDropdown,
28
+ CapButton,
29
+ CapInput,
30
+ CapIcon,
31
+ CapRadioCard,
32
+ CapPopover,
33
+ CapSpin,
34
+ CapCustomCard,
35
+ CapRow,
36
+ CapSlideBox,
37
+ CapLink,
38
+ CapHeading,
39
+ CapNotification,
40
+ CapIllustration,
41
+ CapHeader,
42
+ CapLabel,
43
+ CapRadio,
44
+ CapSelectFilter,
45
+ CapTag,
46
+ CapTooltip,
47
+ CapAlert,
48
+ CapModal,
49
+ } from '@capillarytech/cap-ui-library';
26
50
  import { makeSelectTemplates, makeSelectTemplatesResponse } from './selectors';
27
51
  import { makeSelectCreate as makeSelectCreateSms} from '../Sms/Create/selectors';
28
52
  import { makeSelectCreate as makeSelectCreateMobilePush } from '../MobilePush/Create/selectors';
@@ -53,6 +77,7 @@ import * as commonUtil from '../../utils/common';
53
77
  import Pagination from '../../v2Components/Pagination';
54
78
  import EmailPreview from '../../v2Components/EmailPreview';
55
79
  import CreativesContainer from '../CreativesContainer';
80
+ import WhatsappStatusContainer from '../../v2Components/WhatsappStatusContainer';
56
81
  import WechatRichmediaTemplatePreview from '../../v2Components/TemplatePreview/WechatRichmediaTemplatePreview';
57
82
  import {
58
83
  CHANNEL_CREATE_TRACK_MAPPING,
@@ -68,7 +93,7 @@ import {
68
93
  STATUS as WHATSAPP_STATUS,
69
94
  WHATSAPP_STATUSES,
70
95
  } from '../Whatsapp/constants';
71
- import { getWhatsappContent, getWhatsappStatusContainer, getWhatsappStatus, getWhatsappCategory } from '../Whatsapp/utils';
96
+ import { getWhatsappContent, getWhatsappStatus, getWhatsappCategory } from '../Whatsapp/utils';
72
97
  import { MOBILE_PUSH, WECHAT, SMS, EMAIL, EBILL, LINE, VIBER, FACEBOOK, WHATSAPP } from '../CreativesContainer/constants';
73
98
 
74
99
  import {CREATIVE} from '../Facebook/constants';
@@ -933,10 +958,10 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
933
958
  }
934
959
  case WHATSAPP:
935
960
  templateData.title = (
936
- <div className="whatsapp-card-title">
937
- <span title={template.name} >{template.name}</span>
938
- {getWhatsappStatusContainer(template)}
939
- </div>
961
+ <CapRow className="whatsapp-card-title">
962
+ <CapLabel>{template.name}</CapLabel>
963
+ <WhatsappStatusContainer template={template} />
964
+ </CapRow>
940
965
  );
941
966
 
942
967
  templateData.content = getWhatsappContent(template);
@@ -2146,16 +2171,13 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
2146
2171
  formatMessage,
2147
2172
  },
2148
2173
  } = this.props;
2149
- switch (channel?.toUpperCase()) {
2150
- case MOBILE_PUSH:
2151
- return formatMessage(messages.mobilepushAccount);
2152
- case WECHAT:
2153
- return formatMessage(messages.wechatAccount);
2154
- case WHATSAPP:
2155
- return formatMessage(messages.whatsappAccount);
2156
- default:
2157
- return '';
2174
+
2175
+ const channelObj = {
2176
+ [MOBILE_PUSH]: 'mobilepushAccount',
2177
+ [WECHAT]: 'wechatAccount',
2178
+ [WHATSAPP]: 'whatsappAccount',
2158
2179
  }
2180
+ return formatMessage(messages[channelObj[channel?.toUpperCase()]]);
2159
2181
  }
2160
2182
 
2161
2183
  showAccountName = () => {
@@ -47,6 +47,7 @@ import {
47
47
  } from './constants';
48
48
  import { DATE_DISPLAY_FORMAT, TIME_DISPLAY_FORMAT } from '../App/constants';
49
49
  import messages from './messages';
50
+ import globalMessages from '../Cap/messages'
50
51
  import withCreatives from '../../hoc/withCreatives';
51
52
  import TemplatePreview from '../../v2Components/TemplatePreview';
52
53
  import TagList from '../TagList';
@@ -540,7 +541,7 @@ export const Whatsapp = (props) => {
540
541
  <CapHeader
541
542
  title={
542
543
  <CapHeading type="h4">
543
- {formatMessage(messages.templateNameLabel)}
544
+ {formatMessage(globalMessages.templateNameLabel)}
544
545
  <CapTooltipWithInfo
545
546
  infoIconProps={{
546
547
  style: { marginLeft: CAP_SPACE_04 },
@@ -560,7 +561,7 @@ export const Whatsapp = (props) => {
560
561
  id={`whatsapp_template_name_input`}
561
562
  onChange={onTemplateNameChange}
562
563
  errorMessage={templateNameError}
563
- placeholder={formatMessage(messages.templateNamePlaceholder)}
564
+ placeholder={formatMessage(globalMessages.templateNamePlaceholder)}
564
565
  defaultValue={templateName || ''}
565
566
  value={templateName || ''}
566
567
  size="default"
@@ -842,7 +843,7 @@ export const Whatsapp = (props) => {
842
843
 
843
844
  return (
844
845
  <CapSpin spinning={spin}>
845
- <CapRow>
846
+ <CapRow className='cap-whatsapp-creatives'>
846
847
  <CapColumn span={14}>
847
848
  {isEditFlow ? editModeContent : createModeContent}
848
849
  <div className="whatsapp-scroll-div" />
@@ -1,56 +1,55 @@
1
- @import '~@capillarytech/cap-ui-library/styles/_variables';
1
+ @import "~@capillarytech/cap-ui-library/styles/_variables";
2
2
 
3
- .whatsapp-render-heading {
4
- margin-top: $CAP_SPACE_16;
5
- margin-bottom: 6px;
6
- }
7
- .whatsapp-template-name-desc {
8
- margin-bottom: 6px;
9
- }
10
- .whatsapp-create-render-unsubscribe-text {
11
- color: $FONT_COLOR_02;
12
- margin: $CAP_SPACE_08 0px $CAP_SPACE_08 16px;
13
- }
14
- .whatsapp-edit-render-unsubscribe-text {
15
- color: $FONT_COLOR_02;
16
- }
17
- .whatsapp-render-message-length {
18
- text-align: right;
19
- }
20
- .whatsapp-create-template-message-input {
21
- background-color: $CAP_G10;
22
- padding-top: $CAP_SPACE_16;
23
- }
24
- .whatsapp-template-message-error {
25
- margin-left: $CAP_SPACE_16;
26
- margin-right: $CAP_SPACE_16;
27
- }
28
- .whatsapp-scroll-div {
29
- margin-bottom: 250px;
30
- }
31
- .whatsapp-category-tag {
32
- margin-left: 8px;
33
- }
34
- .whatsapp-edit-alert-margin {
35
- margin-top: 46px;
36
- }
37
- .whatsapp-edit-template-message-input {
38
- background-color: $CAP_G10;
39
- padding: 0 $CAP_SPACE_16;
40
- }
41
- .whatsapp-edit-template-message-heading {
42
- margin-top: $CAP_SPACE_16;
43
- margin-bottom: $CAP_SPACE_08;
44
- }
45
- .whatsapp-edit-disabled {
46
- cursor: not-allowed;
47
- opacity: 0.4;
48
- }
49
- #whatsapp-create-template-message-input {
50
- margin-left: $CAP_SPACE_16;
51
- margin-right: $CAP_SPACE_16;
52
- width: 95%;
53
- }
54
- #select-whatsapp-category {
55
- width: 100%;
3
+ .cap-whatsapp-creatives {
4
+ .whatsapp-render-heading {
5
+ margin-top: $CAP_SPACE_16;
6
+ margin-bottom: 6px;
7
+ }
8
+ .whatsapp-template-name-desc {
9
+ margin-bottom: 6px;
10
+ }
11
+ .whatsapp-create-render-unsubscribe-text {
12
+ color: $FONT_COLOR_02;
13
+ margin: $CAP_SPACE_08 0px $CAP_SPACE_08 16px;
14
+ }
15
+ .whatsapp-edit-render-unsubscribe-text {
16
+ color: $FONT_COLOR_02;
17
+ }
18
+ .whatsapp-render-message-length {
19
+ text-align: right;
20
+ }
21
+ .whatsapp-create-template-message-input {
22
+ background-color: $CAP_G10;
23
+ padding-top: $CAP_SPACE_16;
24
+ }
25
+ .whatsapp-template-message-error {
26
+ margin-left: $CAP_SPACE_16;
27
+ margin-right: $CAP_SPACE_16;
28
+ }
29
+ .whatsapp-scroll-div {
30
+ margin-bottom: 250px;
31
+ }
32
+ .whatsapp-edit-alert-margin {
33
+ margin-top: 46px;
34
+ }
35
+ .whatsapp-edit-template-message-input {
36
+ background-color: $CAP_G10;
37
+ padding: 0 $CAP_SPACE_16;
38
+ }
39
+ .whatsapp-edit-template-message-heading {
40
+ margin-top: $CAP_SPACE_16;
41
+ margin-bottom: $CAP_SPACE_08;
42
+ }
43
+ .whatsapp-edit-disabled {
44
+ cursor: not-allowed;
45
+ opacity: 0.4;
46
+ }
47
+ #whatsapp-create-template-message-input {
48
+ margin-left: $CAP_SPACE_16;
49
+ margin-right: $CAP_SPACE_16;
50
+ width: 95%;
51
+ }
52
+ #select-whatsapp-category {
53
+ width: 100%;
54
+ }
56
55
  }
@@ -1,19 +1,11 @@
1
1
  import { defineMessages } from 'react-intl';
2
2
  const prefix = `creatives.containersV2.Whatsapp`;
3
3
  export default defineMessages({
4
- templateNameLabel: {
5
- id: `${prefix}.templateNameLabel`,
6
- defaultMessage: 'Template name',
7
- },
8
4
  templateNameDesc: {
9
5
  id: `${prefix}.templateNameDesc`,
10
6
  defaultMessage:
11
7
  'Must be a unique name and can only contain lowercase alphanumeric characters and underscores.',
12
8
  },
13
- templateNamePlaceholder: {
14
- id: `${prefix}.templateNamePlaceholder`,
15
- defaultMessage: 'Enter template name',
16
- },
17
9
  templateNameTooltip: {
18
10
  id: `${prefix}.templateNameTooltip`,
19
11
  defaultMessage: `Tip : Use a name that helps WhatsApp's reviewer understand the purpose of your message, for example "order_delivery" rather than "template_1"`,