@capillarytech/creatives-library 8.0.187 → 8.0.188

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": "8.0.187",
4
+ "version": "8.0.188",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -1044,7 +1044,6 @@ export class Creatives extends React.Component {
1044
1044
  }
1045
1045
  break;
1046
1046
  case constants.RCS: {
1047
- console.log("in creatives container .js");
1048
1047
  if (template.value) {
1049
1048
  const { name = "", versions = {} } = {
1050
1049
  } = template.value || {};
@@ -1055,14 +1054,12 @@ export class Creatives extends React.Component {
1055
1054
  cardType = "",
1056
1055
  cardSettings = {},
1057
1056
  } = get(versions, 'base.content.RCS.rcsContent',{});
1058
- console.log("versions--->", versions);
1059
1057
  const rcsContent = {
1060
1058
  contentType,
1061
1059
  cardType,
1062
1060
  cardSettings,
1063
1061
  cardContent,
1064
1062
  };
1065
- console.log("rcsContent--->", rcsContent);
1066
1063
  templateData = {
1067
1064
  channel,
1068
1065
  creativeName: name,
@@ -1085,7 +1082,6 @@ export class Creatives extends React.Component {
1085
1082
  default:
1086
1083
  break;
1087
1084
  }
1088
- console.log("templateData--->", templateData);
1089
1085
  return templateData;
1090
1086
  };
1091
1087
 
@@ -1945,7 +1945,6 @@ const splitTemplateVarString = (str) => {
1945
1945
 
1946
1946
 
1947
1947
  const onEditRcs = () => {
1948
- console.log("onEditRcs");
1949
1948
  const payload = createPayload();
1950
1949
  const formDataParams = {
1951
1950
  value: payload,
@@ -2016,20 +2015,15 @@ const splitTemplateVarString = (str) => {
2016
2015
  }
2017
2016
 
2018
2017
  if (isMediaTypeText && templateDesc.trim() === '') {
2019
- console.log("isMediaTypeText", isMediaTypeText);
2020
- console.log("templateDesc", templateDesc);
2021
- console.log("disabled becuase template desc is empty");
2022
2018
  return true;
2023
2019
 
2024
2020
  }
2025
2021
  if (isMediaTypeImage && (rcsImageSrc === '' || templateTitle === '' || templateDesc === '' )) {
2026
- console.log("disabled becuase template desc and title are empty");
2027
2022
  return true;
2028
2023
  }
2029
2024
 
2030
2025
  if (isMediaTypeVideo && (rcsVideoSrc.videoSrc === '' || rcsThumbnailSrc === '' || templateTitle === '' || templateDesc === '' )) {
2031
- console.log("disabled becuase template desc and title and thumbnail are empty");
2032
- return true;
2026
+ return true;
2033
2027
  }
2034
2028
  if (buttonType.includes(CTA)) {
2035
2029
 
@@ -2037,12 +2031,10 @@ const splitTemplateVarString = (str) => {
2037
2031
  suggestion.text && suggestion.url && !suggestionError
2038
2032
  );
2039
2033
  if (!hasValidButtons) {
2040
- console.log("disabled becuase no valid buttons");
2041
2034
  return true;
2042
2035
  }
2043
2036
  }
2044
2037
  if (templateDescError || templateTitleError || fallbackMessageError) {
2045
- console.log("disabled becuase template desc or fallback message has error");
2046
2038
  return true;
2047
2039
  }
2048
2040
  return false;
@@ -2090,15 +2082,12 @@ const splitTemplateVarString = (str) => {
2090
2082
  }
2091
2083
  }
2092
2084
  if (isMediaTypeText && templateDesc.trim() === '') {
2093
- console.log('disabled becuase template desc is empty');
2094
2085
  return true;
2095
2086
  }
2096
2087
  if (isMediaTypeImage && rcsImageSrc === '') {
2097
- console.log('disabled becuase image src is empty');
2098
2088
  return true;
2099
2089
  }
2100
2090
  if(isMediaTypeVideo && (rcsThumbnailSrc === '' || rcsVideoSrc.videoSrc === '')) {
2101
- console.log('disabled becuase thumbnail src or video src is empty');
2102
2091
  return true;
2103
2092
  }
2104
2093
 
@@ -2107,7 +2096,6 @@ const splitTemplateVarString = (str) => {
2107
2096
  suggestion.text && suggestion.url && !suggestionError
2108
2097
  );
2109
2098
  if (!hasValidButtons) {
2110
- console.log('disabled becuase no valid buttons');
2111
2099
  return true;
2112
2100
  }
2113
2101
  }
@@ -94,7 +94,6 @@
94
94
  margin-top: 1.25rem;
95
95
  }
96
96
  .rcs-template-title-input {
97
- padding-right: 10%;
98
97
  .rcs-edit-disabled {
99
98
  cursor: not-allowed;
100
99
  opacity: 0.5;
@@ -183,8 +183,7 @@ describe('Creatives rcs test/>', () => {
183
183
  renderHelper({});
184
184
  // Test that title field is NOT present for text_message template type (default)
185
185
  let titleInput = renderedComponent.find('.rcs-template-title-input');
186
- expect(titleInput).toHaveLength(0); // Should not exist for text_message
187
- console.log('titleInput test', titleInput);
186
+ expect(titleInput).toHaveLength(0);
188
187
  expect(renderedComponent).toMatchSnapshot();
189
188
 
190
189
  // Change to rich_card template type to make title field visible
@@ -32,8 +32,6 @@ export const getTemplateStatusType = (templateStatus) => {
32
32
  };
33
33
 
34
34
  export const getRCSContent = (template) => {
35
- console.log("template", template);
36
-
37
35
  const renderRcsSuggestionsPreview = (rcsSuggestions) => {
38
36
  const renderArray = [];
39
37
  rcsSuggestions.forEach((suggestion) => {
@@ -1117,8 +1117,6 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
1117
1117
  filterRcsTemplates = (templates) => {
1118
1118
  let { selectedRcsStatus } = this.state;
1119
1119
  selectedRcsStatus = !this.props.isFullMode ? RCS_STATUSES.approved : '';
1120
- console.log('selectedRcsStatus', selectedRcsStatus);
1121
- console.log('templates', templates);
1122
1120
  if (selectedRcsStatus) {
1123
1121
  return templates?.filter((template) => template?.versions?.base?.content?.RCS?.rcsContent?.cardContent[0]?.Status === selectedRcsStatus);
1124
1122
  }