@capillarytech/creatives-library 7.17.172 → 7.17.173

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.17.172",
4
+ "version": "7.17.173",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -21,6 +21,7 @@ import messages from './messages';
21
21
  import * as actions from './actions';
22
22
  import * as templateActions from '../Templates/actions';
23
23
  import Templates from '../Templates';
24
+ import * as commonUtil from '../../utils/common';
24
25
  import CallTask from '../CallTask';
25
26
  import Facebook from '../Facebook';
26
27
  import Viber from '../Viber';
@@ -60,7 +61,6 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
60
61
  sms: {content: <></>, tab: intl.formatMessage(messages.sms), key: 'sms'},
61
62
  rcs: { content: <></>, tab: intl.formatMessage(messages.rcs), key: RCS },
62
63
  email: {content: <></>, tab: intl.formatMessage(messages.email), key: 'email'},
63
- weChat: {content: <></>, tab: intl.formatMessage(messages.wechat), key: 'wechat'},
64
64
  //'wechat': {content: this.getTemplatesComponent('wechat'), tab: 'Wechat', key: 'wechat'},
65
65
  mPush: {content: <></>, tab: intl.formatMessage(messages.pushNotification), key: 'mobilepush'},
66
66
  inApp: { content: <div></div>, tab: intl.formatMessage(messages.inapp), key: INAPP },
@@ -70,6 +70,15 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
70
70
  whatsapp: { content: <></>, tab: intl.formatMessage(messages.whatsapp), key: WHATSAPP },
71
71
  zalo: { content: <div></div>, tab: intl.formatMessage(messages.zalo), key: ZALO },
72
72
  };
73
+ //Hiding we chat for all orgs across UI for now and enabling it based on feature 'ENABLE_WECHAT'
74
+
75
+ if (commonUtil.hasWechatFeatureEnabled()) {
76
+ defaultPanes.weChat = {
77
+ content: <></>,
78
+ tab: intl.formatMessage(messages.wechat),
79
+ key: 'wechat',
80
+ };
81
+ }
73
82
  let filteredPanes = Object.keys(defaultPanes)
74
83
  .filter((key) => !channelsToHide.includes(key)).reduce((obj = [], key) => {
75
84
  obj.push(defaultPanes[key]);
@@ -153,7 +162,7 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
153
162
  if (queryItems.channel === WHATSAPP) {
154
163
  this.channelChange(WHATSAPP);
155
164
  }
156
- if(this.props?.isFullMode){
165
+ if (this.props?.isFullMode) {
157
166
  this.props.templateActions.getCdnTransformationConfig();
158
167
  }
159
168
  }
@@ -91,7 +91,8 @@ describe("Test TemplatesV2", () => {
91
91
  expect(getByText('Email')).toBeInTheDocument();
92
92
  expect(getByText('Push notification')).toBeInTheDocument();
93
93
  expect(getByText('Line')).toBeInTheDocument();
94
- expect(getByText('Wechat')).toBeInTheDocument();
94
+ //commented for removing wechat in tab
95
+ // expect(getByText('Wechat')).toBeInTheDocument();
95
96
  expect(getByText('Viber')).toBeInTheDocument();
96
97
  expect(getByText('Facebook')).toBeInTheDocument();
97
98
  expect(getByText('WhatsApp')).toBeInTheDocument();