@capillarytech/creatives-library 2.0.68 → 2.0.69

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.
@@ -2,15 +2,12 @@ import PropTypes from 'prop-types';
2
2
  import React from 'react';
3
3
  // import styled from 'styled-components';
4
4
  import { Accordion, Icon, Input, Button } from 'semantic-ui-react';
5
- import { Select } from 'antd';
6
5
  import { FormattedMessage } from 'react-intl';
7
6
  import _ from 'lodash';
8
7
  import { Link } from 'react-router';
9
8
  import messages from './messages';
10
9
  import './_sidebar.scss';
11
10
 
12
- const Option = Select.Option;
13
-
14
11
  class Sidebar extends React.Component { // eslint-disable-line react/prefer-stateless-function
15
12
  constructor(props) {
16
13
  super(props);
@@ -28,7 +25,6 @@ class Sidebar extends React.Component { // eslint-disable-line react/prefer-stat
28
25
  this.toggleSideNav = this.toggleSideNav.bind(this);
29
26
  this.getLinkElement = this.getLinkElement.bind(this);
30
27
  this.selectActiveLinkFromUrl = this.selectActiveLinkFromUrl.bind(this);
31
- this.onProductChange = this.onProductChange.bind(this);
32
28
  }
33
29
 
34
30
  componentWillMount() {
@@ -40,12 +36,6 @@ class Sidebar extends React.Component { // eslint-disable-line react/prefer-stat
40
36
  this.setState({ menuItems: nextProp.menuData });
41
37
  }
42
38
 
43
- onProductChange(value) {
44
- const selectedProductIndex = _.findIndex(this.props.productMenuData, {value: value.toLowerCase()});
45
- window.location = this.props.productMenuData[selectedProductIndex].url;
46
- // console.log('On Product selected ', value, selectedProductIndex);
47
- }
48
-
49
39
  getAccordian(content, keyValue) {
50
40
  return (<Accordion key={keyValue}>{content}</Accordion>);
51
41
  }
@@ -184,14 +174,6 @@ class Sidebar extends React.Component { // eslint-disable-line react/prefer-stat
184
174
  const toggle = visible ? 'hide' : '';
185
175
 
186
176
  // const types = [{ text: 'Creatives', value: 'Creatives' }];
187
- const productOptions = [];
188
- if (this.props.productMenuData.length > 1) {
189
- _.forEach(this.props.productMenuData, (product) => {
190
- productOptions.push(
191
- <Option key={product.text} value={product.text}>{product.text}</Option>
192
- );
193
- });
194
- }
195
177
  return (
196
178
  <div className="sidebar-container">
197
179
  <div className={`sidebar sidebar-width ${collapse}`}>
@@ -200,14 +182,6 @@ class Sidebar extends React.Component { // eslint-disable-line react/prefer-stat
200
182
  <a href="" onClick={this.toggleSideNav}><i className="material-icons control-arrow">arrow_back</i></a>
201
183
  </div>
202
184
 
203
- { this.props.productMenuData.length > 1 ?
204
- <Select className="icon product-select-menu" defaultValue={'CAMPAIGNS'} onChange={this.onProductChange}>
205
- {productOptions}
206
- </Select>
207
- :
208
- <div className="module-menu-header">{this.props.productMenuData[0].text}</div>
209
- }
210
-
211
185
  <div className="menu-header">
212
186
  <span className="menu-title"><FormattedMessage {...messages.menuTitle} /> </span>
213
187
  {this.props.actionComponents}
@@ -228,7 +202,6 @@ class Sidebar extends React.Component { // eslint-disable-line react/prefer-stat
228
202
 
229
203
  Sidebar.propTypes = {
230
204
  menuData: PropTypes.array.isRequired,
231
- productMenuData: PropTypes.array.isRequired,
232
205
  actionComponents: PropTypes.oneOfType([PropTypes.element, PropTypes.string]),
233
206
  };
234
207
 
@@ -101,7 +101,7 @@ export class Cap extends React.Component { // eslint-disable-line react/prefer-s
101
101
  }
102
102
 
103
103
  if (nextProps.Global.isLoggedIn && nextProps.Global.isLoggedIn !== this.props.Global.isLoggedIn) {
104
- if (nextProps.Global.orgID !== undefined && !isEqual(nextProps.Global.orgID, this.props.Global.orgID)) {
104
+ if (nextProps.Global.orgID !== undefined && !_.isEqual(nextProps.Global.orgID, this.props.Global.orgID)) {
105
105
  const userGtmData = this.getUserGtmData(nextProps);
106
106
  gtm.push(userGtmData);
107
107
  }
@@ -273,26 +273,6 @@ export class Cap extends React.Component { // eslint-disable-line react/prefer-s
273
273
  ],
274
274
  },
275
275
  ];
276
-
277
- const productMenuData = [
278
- // {
279
- // text: this.props.intl.formatMessage(messages.creatives),
280
- // value: 'Creatives',
281
- // url: '/creatives/ui/',
282
- // },
283
- ];
284
- if (this.props.Global.currentOrgDetails) {
285
- _.forEach(this.props.Global.currentOrgDetails.module_details, (module) => {
286
- if (module.display_order > 0) {
287
- productMenuData.push({
288
- text: (messages[module.name]) ? this.props.intl.formatMessage(messages[module.name]) : module.name,
289
- value: module.name.toLowerCase(),
290
- url: module.url,
291
- });
292
- }
293
- });
294
- }
295
-
296
276
  return (
297
277
  <CapWrapper>
298
278
  <Helmet
@@ -317,7 +297,6 @@ export class Cap extends React.Component { // eslint-disable-line react/prefer-s
317
297
  {loggedIn && type !== 'embedded' && this.props.location.pathname.indexOf('v2') === -1 ? <div id="cap-sidebar" className={'sidebar'}>
318
298
  <Sidebar
319
299
  menuData={menuData}
320
- productMenuData={productMenuData}
321
300
  actionComponents={actionComponents}
322
301
  router={this.props.router}
323
302
  />
@@ -333,10 +333,7 @@ export const response = {
333
333
  autosizeParams: {
334
334
  minRows: 3,
335
335
  },
336
- style: {
337
336
 
338
- paddingLeft: 0,
339
- },
340
337
  order: 1,
341
338
  customComponent: true,
342
339
  supportedEvents: [
@@ -664,10 +661,7 @@ export const response = {
664
661
  fluid: true,
665
662
  styling: "semantic",
666
663
  autosize: true,
667
- style: {
668
664
 
669
- paddingLeft: 0,
670
- },
671
665
  autosizeParams: {
672
666
  minRows: 3,
673
667
  },
@@ -1168,10 +1162,7 @@ export const response = {
1168
1162
  fluid: true,
1169
1163
  styling: "semantic",
1170
1164
  autosize: true,
1171
- style: {
1172
1165
 
1173
- paddingLeft: 0,
1174
- },
1175
1166
  autosizeParams: {
1176
1167
  minRows: 3,
1177
1168
  },
@@ -1546,10 +1537,7 @@ export const response = {
1546
1537
  fluid: true,
1547
1538
  styling: "semantic",
1548
1539
  autosize: true,
1549
- style: {
1550
1540
 
1551
- paddingLeft: 0,
1552
- },
1553
1541
  autosizeParams: {
1554
1542
  minRows: 3,
1555
1543
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "2.0.68",
4
+ "version": "2.0.69",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",