@capillarytech/creatives-library 7.13.18 → 7.13.19

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "7.13.18",
4
+ "version": "7.13.19",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -887,8 +887,8 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
887
887
  const cardDataList = filteredTemplates && filteredTemplates.length ? map(filteredTemplates, (template) => {
888
888
  const templateData =
889
889
  {
890
- key: `${currentChannel}-card-${template.name}`,
891
- title: <span title={template.name} >{template.name}</span>,
890
+ key: `${currentChannel}-card-${template?.name}`,
891
+ title: <span title={template?.name} >{template?.name}</span>,
892
892
  extra: [
893
893
  <CapIcon
894
894
  className={`view-${channelLowerCase}`}
@@ -1070,7 +1070,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
1070
1070
  const { whatsappImageSrc = '', templateMsg} = getWhatsappContent(template);
1071
1071
  templateData.title = (
1072
1072
  <CapRow>
1073
- <CapLabel className="whatsapp-rcs-template-name">{template.name}</CapLabel>
1073
+ <CapLabel className="whatsapp-rcs-template-name">{template?.name}</CapLabel>
1074
1074
  <WhatsappStatusContainer template={template} />
1075
1075
  </CapRow>
1076
1076
  );
@@ -1094,7 +1094,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
1094
1094
  break;
1095
1095
  }
1096
1096
  case RCS: {
1097
- templateData.title = <CapLabel className="whatsapp-rcs-template-name">{template.name}</CapLabel>;
1097
+ templateData.title = <CapLabel className="whatsapp-rcs-template-name">{template?.name}</CapLabel>;
1098
1098
  templateData.content = getRCSContent(template);
1099
1099
  break;
1100
1100
  }
@@ -1610,7 +1610,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
1610
1610
 
1611
1611
  duplicateTemplate(template) {
1612
1612
  const duplicateObj = cloneDeep(template);
1613
- duplicateObj.name = `Copy of ${template.name} ${moment().format('MM-DD-YYYY HH:mm:ss')}`;
1613
+ duplicateObj.name = `Copy of ${template?.name} ${moment().format('MM-DD-YYYY HH:mm:ss')}`;
1614
1614
  delete duplicateObj._id;
1615
1615
 
1616
1616
  if (this.state.channel.toLowerCase() === "mobilepush") {
@@ -1953,7 +1953,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
1953
1953
  <div className="card-title">
1954
1954
  <span className="template-name" style={{ fontWeight: `${this.state.channel.toLowerCase() === 'wechat' ? '400' : '600'}` }}>
1955
1955
  { template && template.versions && template.versions.history && template.versions.history.length > 1 && this.state.channel.toLowerCase() !== 'mobilepush' && <i style={{fontSize: '16px', margin: '0 8px 0 0', verticalAlign: 'middle'}} className="material-icons">filter_none</i>}
1956
- {template.name}
1956
+ {template?.name}
1957
1957
  </span>
1958
1958
  {this.props.location.query.type !== 'embedded' && <CapPopover
1959
1959
  trigger="click"