@capillarytech/creatives-library 7.10.29 → 7.10.30

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.10.29",
4
+ "version": "7.10.30",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -100,9 +100,9 @@ const LINE_FILTERS = {
100
100
 
101
101
  const SMS_FILTERS = {
102
102
  ALL: 'all',
103
- PROMOTIONAL: 'promotional',
104
- SERVICE_EXPLICIT: 'service-explicit',
105
- SERVICE_IMPLICIT: 'service-implicit',
103
+ PROMOTIONAL: 'promo',
104
+ SERVICE_EXPLICIT: 'explicit',
105
+ SERVICE_IMPLICIT: 'implicit',
106
106
  };
107
107
 
108
108
  export class Templates extends React.Component { // eslint-disable-line react/prefer-stateless-function
@@ -586,7 +586,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
586
586
  moment.locale(locale);
587
587
  };
588
588
  getAllTemplates = ({params, getNextPage, resetPage}, resetTemplates) => {
589
- let queryParams = params;
589
+ let queryParams = params || {};
590
590
  let page = this.state.page;
591
591
  const { activeMode } = this.state;
592
592
  if (activeMode === ACCOUNT_SELECTION_MODE) {
@@ -659,7 +659,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
659
659
  if (SMS_FILTERS.ALL === smsFilter) {
660
660
  return templates;
661
661
  }
662
- return templates.filter((template) => template.versions.base.type.toLowerCase() === smsFilter);
662
+ return templates.filter((template) => template.versions.base.type?.toLowerCase()?.includes(smsFilter));
663
663
  }
664
664
 
665
665
  getTemplateDataForGrid = ({templates, handlers, filterContent, channel, isLoading, loadingTip}) => {