@capillarytech/creatives-library 8.0.360-beta.0.1 → 9.0.0

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.
@@ -59,7 +59,6 @@ export const EMAIL_UNSUBSCRIBE_TAG_MANDATORY = 'EMAIL_UNSUBSCRIBE_TAG_MANDATORY'
59
59
  export const ENABLE_AI_SUGGESTIONS = 'ENABLE_AI_SUGGESTIONS';
60
60
  export const AI_CONTENT_BOT_DISABLED = 'AI_CONTENT_BOT_DISABLED';
61
61
  export const AI_DOCUMENTATION_BOT_ENABLED = 'AI_DOCUMENTATION_BOT_ENABLED';
62
- export const ENABLE_NEW_LEFT_NAVIGATION = 'ENABLE_NEW_LEFT_NAVIGATION';
63
62
  export const ENABLE_PRODUCT_SUPPORT_VIDEOS = 'ENABLE_PRODUCT_SUPPORT_VIDEOS';
64
63
  export const SUPPORT_ENGAGEMENT_MODULE = 'SUPPORT_ENGAGEMENT_MODULE';
65
64
  export const EMBEDDED = 'embedded';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "8.0.360-beta.0.1",
4
+ "version": "9.0.0",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -21,7 +21,6 @@ import { LOYALTY } from '../../v2Containers/App/constants';
21
21
  import {
22
22
  HELP_URL,
23
23
  LOYALTY_HELP_URL,
24
- ENABLE_NEW_LEFT_NAVIGATION,
25
24
  DEFAULT_MODULE,
26
25
  AI_DOCUMENTATION_BOT_DISABLED,
27
26
  } from '../../v2Containers/Cap/constants';
@@ -68,23 +67,11 @@ export class NavigationBar extends React.Component {
68
67
  return {
69
68
  selectedProduct: formatMessage(messages.loyaltyProgram),
70
69
  helpUrl: LOYALTY_HELP_URL,
71
- settingsIcon: {
72
- iconType: 'settings',
73
- key: 'settings',
74
- placement: 'bottomRight',
75
- className: 'navigation-setting-icon',
76
- toolTip: formatMessage(messages.loyaltyCreativeSettings),
77
- },
78
70
  };
79
71
  default:
80
72
  return {
81
73
  selectedProduct: formatMessage(messages.selectedProductDefault),
82
74
  helpUrl: HELP_URL,
83
- settingsIcon: {
84
- iconType: 'settings',
85
- key: 'settings',
86
- onClickHandler: this.onSettingsIconClick,
87
- },
88
75
  };
89
76
  }
90
77
  }
@@ -96,16 +83,6 @@ export class NavigationBar extends React.Component {
96
83
  }
97
84
  };
98
85
 
99
- onSettingsIconClick = () => {
100
- const { settingsUrl } = this.props;
101
- if (settingsUrl) {
102
- const stateObj = {
103
- page: "settings",
104
- };
105
- window.history.pushState(stateObj, 'Settings', window.location.replace(settingsUrl));
106
- }
107
- };
108
-
109
86
  onHelpIconClick = () => {
110
87
  const { helpUrl } = this.state;
111
88
  if (helpUrl) {
@@ -113,8 +90,7 @@ export class NavigationBar extends React.Component {
113
90
  }
114
91
  };
115
92
 
116
- getTopbarIcons = (showDocumentationBot = false, isLatestLeftNavigationEnabled = false) => {
117
- const { settingsIcon } = this.state;
93
+ getTopbarIcons = (showDocumentationBot = false) => {
118
94
  const ICONS = [
119
95
  {
120
96
  iconType: 'help',
@@ -122,9 +98,6 @@ export class NavigationBar extends React.Component {
122
98
  onClickHandler: this.onHelpIconClick,
123
99
  },
124
100
  ];
125
- if (!isLatestLeftNavigationEnabled) {
126
- ICONS.push(settingsIcon);
127
- }
128
101
  return showDocumentationBot ? ICONS.slice(1) : ICONS; // If showDocumentationBot is true, help icon will be replaced by Aira icon on UI
129
102
  };
130
103
 
@@ -177,17 +150,8 @@ export class NavigationBar extends React.Component {
177
150
  const showDocumentationBot = !accessibleDocFeatures.includes(AI_DOCUMENTATION_BOT_DISABLED);
178
151
 
179
152
  const dropdownMenuProps = this.getDropdownMenu();
180
- const {
181
- currentOrgDetails: {
182
- accessibleFeatures = [],
183
- } = {},
184
- } = userData || {};
185
- const isLatestLeftNavigationEnabled = accessibleFeatures?.includes(
186
- ENABLE_NEW_LEFT_NAVIGATION,
187
- );
188
- const topbarIcons = this.getTopbarIcons(showDocumentationBot, isLatestLeftNavigationEnabled);
189
- const topbarMenuDataModified = isLatestLeftNavigationEnabled ? [] : topbarMenuData;
190
- const headerOverideCss = isLatestLeftNavigationEnabled && (leftNavbarExpandedProp ? CapLeftNavigatioOpenCss : CapLeftNavigationCss);
153
+ const topbarIcons = this.getTopbarIcons(showDocumentationBot);
154
+ const headerOverideCss = leftNavbarExpandedProp ? CapLeftNavigatioOpenCss : CapLeftNavigationCss;
191
155
  return (
192
156
  <CapNavigation
193
157
  className="creatives-main-container"
@@ -195,7 +159,7 @@ export class NavigationBar extends React.Component {
195
159
  userData={userData}
196
160
  loadStorageItem={loadItem}
197
161
  changeOrgEntity={this.handleOrgChange}
198
- topbarMenuData={topbarMenuDataModified}
162
+ topbarMenuData={topbarMenuData}
199
163
  topbarSelectedMenuData={[DEFAULT_MODULE]}
200
164
  dropdownMenuProps={dropdownMenuProps}
201
165
  topbarIcons={topbarIcons}
@@ -204,7 +168,7 @@ export class NavigationBar extends React.Component {
204
168
  defaultSelectedProduct={this.productSelection()}
205
169
  skipStateForStorage
206
170
  selectOrganization={intl.formatMessage(messages.selectOrganization)}
207
- isLatestLeftNavigationEnabled={isLatestLeftNavigationEnabled}
171
+ isLatestLeftNavigationEnabled
208
172
  history={history}
209
173
  publicPath={configPath.publicPath}
210
174
  getNavigationConfigApi={Api.getNavigationConfigApi}
@@ -232,7 +196,6 @@ NavigationBar.propTypes = {
232
196
  topbarMenuData: PropTypes.array,
233
197
  logout: PropTypes.func,
234
198
  changeOrg: PropTypes.func,
235
- settingsUrl: PropTypes.string,
236
199
  children: PropTypes.node,
237
200
  orgSettingsUrl: PropTypes.string,
238
201
  intl: intlShape.isRequired,
@@ -65,9 +65,5 @@ export default defineMessages({
65
65
  "selectOrganization": {
66
66
  id: `${scope}.selectOrganization`,
67
67
  defaultMessage: 'Select organization',
68
- },
69
- "loyaltyCreativeSettings": {
70
- id: `${scope}.loyaltyCreativeSettings`,
71
- defaultMessage: 'There are no settings for creatives within Loyalty+. Channel-related settings are available within organisation settings',
72
68
  }
73
69
  });
@@ -0,0 +1,7 @@
1
+ @import '~@capillarytech/cap-ui-library/styles/_variables';
2
+
3
+ .action-container {
4
+ .upload-image-gallery {
5
+ margin-bottom: -$CAP_SPACE_16;
6
+ }
7
+ }
@@ -42,7 +42,6 @@ export const ENABLE_AI_SUGGESTIONS = 'ENABLE_AI_SUGGESTIONS';
42
42
  export const AI_CONTENT_BOT_DISABLED = 'AI_CONTENT_BOT_DISABLED';
43
43
  export const AI_DOCUMENTATION_BOT_ENABLED = 'AI_DOCUMENTATION_BOT_ENABLED';
44
44
  export const ERROR_IN_FETCHING_TAGS = 'Error in fetching tags';
45
- export const ENABLE_NEW_LEFT_NAVIGATION = 'ENABLE_NEW_LEFT_NAVIGATION';
46
45
  export const AI_DOCUMENTATION_BOT_DISABLED = 'AI_DOCUMENTATION_BOT_DISABLED';
47
46
 
48
47
  export const GET_SUPPORT_VIDEOS_CONFIG_REQUEST =
@@ -18,20 +18,18 @@ import * as locationActions from '../LanguageProvider/actions';
18
18
  import * as appActions from '../App/actions';
19
19
  import config from '../../config/app';
20
20
  import NavigationBar from '../../v2Components/NavigationBar';
21
- import { engagePlusPublicPath, publicPath } from '../../config/path';
21
+ import { publicPath } from '../../config/path';
22
22
  import { GTM_TRACKING_ID, CREATIVES_UI_VIEW, FAILURE } from '../App/constants';
23
23
  import { makeSelectLocale } from '../../v2Containers/LanguageProvider/selectors';
24
24
  import CapSupportVideosWrapper from '@capillarytech/cap-ui-library/CapSupportVideosWrapper';
25
25
  import { replaceDynamicAndCompare } from '@capillarytech/cap-ui-library/CapSupportVideosWrapper/utils';
26
26
  import {
27
27
  ORG_SETTINGS_URL,
28
- CAMPAIGN_SETTINGS_URL,
29
28
  ORG_REFRESH_SEC,
30
29
  ORG_CHANGED,
31
30
  REQUEST,
32
31
  DEFAULT,
33
32
  ENABLE_PRODUCT_SUPPORT_VIDEOS,
34
- ENABLE_NEW_LEFT_NAVIGATION,
35
33
  } from './constants';
36
34
  import './_cap.scss';
37
35
  import { Switch } from 'react-router';
@@ -79,12 +77,12 @@ GA.initialize({ accessKey: GTM_TRACKING_ID, trackUIError: true, trackLoadPerform
79
77
  const MainWrapper = styled.div`
80
78
  position: relative;
81
79
  min-height: calc(100vh - 5.29rem);
82
- top: ${(props) => (props.isLatestLeftNavigationEnabled ? '1.72rem' : '5.29rem')};
80
+ top: 4.72rem;
83
81
  `;
84
82
 
85
83
  const ContentWrapper = styled.div`
86
84
  && {
87
- margin-left: ${(props) => (props.isLatestLeftNavigationEnabled ? (props.leftNavbarExpanded ? '17rem' : '4.475rem') : 0)};
85
+ margin-left: ${(props) => (props.leftNavbarExpanded ? '17rem' : '4.475rem')};
88
86
  }
89
87
  `;
90
88
 
@@ -501,9 +499,6 @@ export class Cap extends React.Component { // eslint-disable-line react/prefer-s
501
499
  const type = this.props.location.query.type;
502
500
  const toastMessages = this.props.Global.messages;
503
501
  const { isCreativesAccessible, showOrgChangeModal, showRefreshModal } = this.state;
504
- const isLatestLeftNavigationEnabled = currentOrgDetails?.accessibleFeatures?.includes(
505
- ENABLE_NEW_LEFT_NAVIGATION,
506
- );
507
502
  return (
508
503
  <CapWrapper>
509
504
  { this.props.loader.localeLoading || this.props.Global.fetching_userdata ?
@@ -533,7 +528,6 @@ export class Cap extends React.Component { // eslint-disable-line react/prefer-s
533
528
  changeOrg={this.changeOrg}
534
529
  isCreativesAccessible={isCreativesAccessible}
535
530
  logout={this.logout}
536
- settingsUrl={`${engagePlusPublicPath}${CAMPAIGN_SETTINGS_URL}`}
537
531
  orgSettingsUrl={ORG_SETTINGS_URL}
538
532
  loggedIn={isLoggedIn}
539
533
  topbarMenuData={topbarMenuDataOptions}
@@ -542,11 +536,10 @@ export class Cap extends React.Component { // eslint-disable-line react/prefer-s
542
536
  handleLeftNavBarExpanded={this.handleLeftNavBarExpanded}
543
537
  leftNavbarExpandedProp={this.state.leftNavbarExpanded}
544
538
  />) : ''}
545
- <MainWrapper isLatestLeftNavigationEnabled={isLatestLeftNavigationEnabled} className="main">
539
+ <MainWrapper className="main">
546
540
 
547
541
  <ContentWrapper
548
542
  className={`main-content ${this.state.leftNavbarExpanded ? "contet-width-collapse" : "content-width-expanded"}`}
549
- isLatestLeftNavigationEnabled={isLatestLeftNavigationEnabled}
550
543
  leftNavbarExpanded={this.state.leftNavbarExpanded}
551
544
  >
552
545
  <Switch>
@@ -616,7 +616,7 @@ export const Viber = (props) => {
616
616
  </CapColumn>
617
617
  </div>
618
618
  ) : (
619
- <CapRow className="cta-section-saved">
619
+ <CapRow type='flex' align="middle" className="cta-section-saved">
620
620
  <CapLabel type="label4" className="cta-text">
621
621
  {ctaData?.buttonText}
622
622
  </CapLabel>
@@ -75,7 +75,7 @@
75
75
 
76
76
  .whatsapp-edit-template-message-input {
77
77
  background-color: $CAP_G10;
78
- padding: 0 $CAP_SPACE_16 $CAP_SPACE_16 $CAP_SPACE_16 ;
78
+ padding: $CAP_SPACE_16 ;
79
79
  width: 100%;
80
80
  flex-direction: column;
81
81
  align-items: start;
@@ -2402,7 +2402,6 @@ export default {
2402
2402
  "ENABLE_AB_TESTING_BLOCK",
2403
2403
  "POINTS_BUDGETING_UX_ENHANCEMENTS",
2404
2404
  "HOSPITALITY_BASED_SCOPE",
2405
- "ENABLE_NEW_LEFT_NAVIGATION",
2406
2405
  "ENABLE_CUSTOMER_BARCODE_TAG",
2407
2406
  "BADGES_UI_ENABLED",
2408
2407
  "ENABLE_FTP_CONNECTOR",