@capillarytech/creatives-library 7.17.21 → 7.17.22

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.21",
4
+ "version": "7.17.22",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -25,7 +25,7 @@ import {
25
25
  JAPANESE_HELP_TEXT,
26
26
  TAG_TRANSLATION_DOC,
27
27
  } from "../../containers/TagList/constants";
28
- import { HIDE_ENGAGEMENT_CHANNELS } from '../../v2Containers/App/constants';
28
+ import { HIDE_FOR_JP_LOCALE } from '../../v2Containers/App/constants';
29
29
  import { hidingDateTagsForJpLocale } from '../../v2Containers/TagList/utils';
30
30
 
31
31
 
@@ -165,7 +165,7 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
165
165
  renderTags(tags, searchString = '') {
166
166
  const { disableRelatedTags, childTagsToDisable, parentTagstoDisable, showCardsRelatedTags } = this?.props?.disableTagsDetails;
167
167
  const { accessibleFeatures = [] } = this?.props?.currentOrgDetails || {};
168
- const hideDateTagsForJpLocale = accessibleFeatures.includes(HIDE_ENGAGEMENT_CHANNELS);
168
+ const hideDateTagsForJpLocale = accessibleFeatures.includes(HIDE_FOR_JP_LOCALE);
169
169
  const list = [];
170
170
  const loyaltyAttrDisableText = <FormattedMessage {...messages.loyaltyAttributeDisable} />;
171
171
  let clonedTags = _.cloneDeep(tags);
@@ -54,7 +54,7 @@ export const LINE = 'line';
54
54
  export const EMAIL = 'email';
55
55
  export const ASSETS = 'assets';
56
56
 
57
- export const HIDE_ENGAGEMENT_CHANNELS = 'HIDE_ENGAGEMENT_CHANNELS';
57
+ export const HIDE_FOR_JP_LOCALE = 'HIDE_FOR_JP_LOCALE';
58
58
 
59
59
  export const TRACK_EDIT_SMS = 'editSms';
60
60
  export const TRACK_EDIT_EMAIL = 'editEmail';
@@ -76,13 +76,15 @@ function BeeEditor(props) {
76
76
  'en': 'en',
77
77
  'zh-cn': 'zh',
78
78
  'zh': 'zh',
79
+ 'jp': 'jp',
80
+ 'ja-JP': 'ja-JP',
79
81
  };
80
82
  const user = localStorage.getItem('user');
81
83
  let locale = 'en';
82
84
  if (user && JSON.parse(user).lang) {
83
85
  locale = JSON.parse(user).lang;
84
86
  }
85
- const defaultFormattedUrl = locale !== DEFAULT_LOCALE && ['zh-cn', 'zh'].includes(locale)
87
+ const defaultFormattedUrl = locale !== DEFAULT_LOCALE && ['zh-cn', 'zh', 'jp', 'ja-JP'].includes(locale)
86
88
  ? `${API_ENDPOINT}/common/getBEECustomLangunage?langid=${MAPPED_LOCALE[locale]}`
87
89
  : "";
88
90
  useEffect(() => {
@@ -29,7 +29,7 @@ import FTP from '../FTP';
29
29
  import Gallery from '../Assets/Gallery';
30
30
  import withStyles from '../../hoc/withStyles';
31
31
  import styles, { CapTabStyle } from './TemplatesV2.style';
32
- import { CREATIVES_UI_VIEW, LOYALTY, WHATSAPP, RCS, LINE, EMAIL, ASSETS, HIDE_ENGAGEMENT_CHANNELS } from '../App/constants';
32
+ import { CREATIVES_UI_VIEW, LOYALTY, WHATSAPP, RCS, LINE, EMAIL, ASSETS, HIDE_FOR_JP_LOCALE } from '../App/constants';
33
33
  import AccessForbidden from '../../v2Components/AccessForbidden';
34
34
  import { getObjFromQueryParams } from '../../utils/v2common';
35
35
  import { selectCurrentOrgDetails } from "../../v2Containers/Cap/selectors";
@@ -119,8 +119,8 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
119
119
  const { accessibleFeatures = [] } = currentOrgDetails || {};
120
120
  // This data will be available when it will be accessed in library mode
121
121
  const { currentOrgDetails: { accessibleFeatures: libModeAccessibleFeatures = [] } = {} } = cap || {};
122
- const hideEngagementChannel = accessibleFeatures.includes(HIDE_ENGAGEMENT_CHANNELS) || libModeAccessibleFeatures.includes(HIDE_ENGAGEMENT_CHANNELS);
123
- // Show only line and email channel content with both channel tabs if the HIDE_ENGAGEMENT_CHANNELS feature is enabled;
122
+ const hideEngagementChannel = accessibleFeatures.includes(HIDE_FOR_JP_LOCALE) || libModeAccessibleFeatures.includes(HIDE_FOR_JP_LOCALE);
123
+ // Show only line and email channel content with both channel tabs if the HIDE_FOR_JP_LOCALE feature is enabled;
124
124
  filteredPanes = hideEngagementChannel ? filteredPanes?.filter((pane) => [EMAIL, LINE, ASSETS].includes(pane?.key) && pane) : filteredPanes;
125
125
  defaultChannel = hideEngagementChannel ? EMAIL : defaultChannel;
126
126
 
@@ -599,7 +599,7 @@ export const authData = {
599
599
  "ENABLE_PRODUCT_SUPPORT_VIDEOS",
600
600
  "ENABLE_RANDOM_COUPON_CODE",
601
601
  "HIDE_DEFAULT_EMAIL_TEMPLATES",
602
- "HIDE_ENGAGEMENT_CHANNELS",
602
+ "HIDE_FOR_JP_LOCALE",
603
603
  ],
604
604
  org_loyalty_v2_status: true,
605
605
  module_details: [
@@ -680,6 +680,6 @@ export const currentOrgDetails = {
680
680
  "JOURNEY_UI",
681
681
  "LOYALTY_PROMOTION_ENABLED",
682
682
  "HIDE_DEFAULT_EMAIL_TEMPLATES",
683
- "HIDE_ENGAGEMENT_CHANNELS",
683
+ "HIDE_FOR_JP_LOCALE",
684
684
  ],
685
685
  };