@capillarytech/creatives-library 8.0.46 → 8.0.48-alpha.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.
|
@@ -69,7 +69,7 @@ class Sidebar extends React.Component { // eslint-disable-line react/prefer-stat
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
selectActiveLinkFromUrl(props) {
|
|
72
|
-
const activeRouteName = this.props
|
|
72
|
+
const activeRouteName = this.props?.history?.location?.pathname?.split('/')[1];
|
|
73
73
|
let selectedItem = '';
|
|
74
74
|
let selectedIndex = -1;
|
|
75
75
|
_.forEach(props.menuData, (menuItem, menuIndex) => {
|
package/containers/Cap/index.js
CHANGED
|
@@ -32,6 +32,7 @@ import { CREATIVES_UI_VIEW } from '../../v2Containers/App/constants';
|
|
|
32
32
|
import AccessForbidden from '../../v2Components/AccessForbidden';
|
|
33
33
|
import reducer from './reducer';
|
|
34
34
|
import RenderRoute from '../../v2Components/RenderRoute';
|
|
35
|
+
import { EMBEDDED } from '../../v2Containers/SmsTrai/Edit/constants';
|
|
35
36
|
|
|
36
37
|
const gtm = window.dataLayer || [];
|
|
37
38
|
|
|
@@ -71,7 +72,7 @@ export class Cap extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
71
72
|
gtm.push({ ...userGtmData, event: 'userAuthenticated' });
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
|
-
if (!_.isEmpty(this.props
|
|
75
|
+
if (!_.isEmpty(this.props?.Global?.orgID)) {
|
|
75
76
|
gtm.push({ orgId: this.props.Global.orgID });
|
|
76
77
|
}
|
|
77
78
|
if (this.props.Global.isLoggedIn) {
|
|
@@ -173,7 +174,7 @@ export class Cap extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
173
174
|
const { user: userData } = props.Global;
|
|
174
175
|
const userName = userData.attributes.USERNAME;
|
|
175
176
|
const userEmail = userData.attributes.EMAIL;
|
|
176
|
-
const orgObj = _.find(userData
|
|
177
|
+
const orgObj = _.find(userData?.proxyOrgList, { orgID: props?.Global?.orgID });
|
|
177
178
|
const gtmData = {
|
|
178
179
|
orgId: props.Global.orgID,
|
|
179
180
|
orgName: orgObj && orgObj.orgName,
|
|
@@ -295,7 +296,7 @@ export class Cap extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
295
296
|
const { isCreativesAccessible } = this.state;
|
|
296
297
|
return (
|
|
297
298
|
<CapWrapper>
|
|
298
|
-
{this.props
|
|
299
|
+
{this.props?.loader?.localeLoading || this.props?.Global?.fetching_userdata ?
|
|
299
300
|
<div className="cap-loader-box">
|
|
300
301
|
<img
|
|
301
302
|
className="loader-image"
|
|
@@ -311,7 +312,7 @@ export class Cap extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
311
312
|
]}
|
|
312
313
|
/>
|
|
313
314
|
<div className="wrapper">
|
|
314
|
-
{loggedIn && type !==
|
|
315
|
+
{loggedIn && type !== EMBEDDED ?
|
|
315
316
|
<TopBar
|
|
316
317
|
proxyOrgList={proxyOrgList}
|
|
317
318
|
userName={userName}
|
package/package.json
CHANGED
|
@@ -587,6 +587,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
587
587
|
}
|
|
588
588
|
|
|
589
589
|
onChange = (evt) => {
|
|
590
|
+
const {isFullMode, showTemplateName} = this.props;
|
|
590
591
|
const formData = _.cloneDeep(this.state.formData);
|
|
591
592
|
|
|
592
593
|
//if (evt.editor.name.indexOf('editor') === -1) {
|
|
@@ -609,7 +610,9 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
609
610
|
}
|
|
610
611
|
|
|
611
612
|
this.setState({formData, content: evt.editor.getData()}, () => {
|
|
612
|
-
|
|
613
|
+
if (isFullMode && showTemplateName) {
|
|
614
|
+
showTemplateName({formData, onFormDataChange: this.onFormDataChange});
|
|
615
|
+
}
|
|
613
616
|
});
|
|
614
617
|
}
|
|
615
618
|
}
|