@capillarytech/creatives-library 7.7.11 → 7.7.12

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.
@@ -10,7 +10,7 @@ import { connect } from 'react-redux';
10
10
  import { injectIntl, intlShape, FormattedMessage } from 'react-intl';
11
11
  import { createStructuredSelector } from 'reselect';
12
12
  import { bindActionCreators } from 'redux';
13
- import { CapTab, CapCustomCard, CapButton, CapHeader, CapSpin, CapIcon, CapTooltip } from '@capillarytech/cap-ui-library';
13
+ import { CapTab, CapCustomCard, CapButton, CapHeader, CapSpin, CapIcon } from '@capillarytech/cap-ui-library';
14
14
  import { find, get } from 'lodash';
15
15
  import isEmpty from 'lodash/isEmpty';
16
16
  import Helmet from 'react-helmet';
@@ -45,7 +45,6 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
45
45
  channelsToDisable = [],
46
46
  isFullMode,
47
47
  onChannelChange,
48
- showDisabledFBInfo,
49
48
  } = props;
50
49
 
51
50
  const defaultPanes = {
@@ -81,15 +80,6 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
81
80
  if (channelsToDisable.includes(pane.key)) {
82
81
  // eslint-disable-next-line no-param-reassign
83
82
  pane.disabled = true;
84
- if (pane.key === 'facebook' && showDisabledFBInfo) {
85
- pane.tab = (<CapTooltip
86
- title={
87
- intl.formatMessage(messages.facebookDisableinfo)
88
- }
89
- >
90
- {intl.formatMessage(messages.facebook)}
91
- </CapTooltip>);
92
- }
93
83
  }
94
84
  return pane;
95
85
  });
@@ -158,16 +148,13 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
158
148
  );
159
149
 
160
150
  getFacebookComponent = () => {
161
- const { messageDetails, cap, onFacebookSubmit, messageStrategy, showDisabledFBInfo, orgUnitId } = this.props;
151
+ const { messageDetails, cap, onFacebookSubmit, isFullMode } = this.props;
162
152
  return (
163
153
  <Facebook
164
154
  {...this.props}
165
155
  messageDetails={messageDetails}
166
156
  cap={cap}
167
157
  onFacebookSubmit={onFacebookSubmit}
168
- messageStrategy={messageStrategy}
169
- showDisabledFBInfo={showDisabledFBInfo}
170
- orgUnitId={orgUnitId}
171
158
  />
172
159
  );
173
160
  }
@@ -191,21 +178,19 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
191
178
  getTemplatesComponent(channel) {
192
179
  // const templates = this.props.Templates[`${channel}Templates`];
193
180
  let query = {};
194
- const {isFullMode, messageStrategy} = this.props;
195
- if (!isFullMode) {
181
+ if (!this.props.isFullMode) {
196
182
  query = {type: 'embedded', module: 'library'};
197
183
  switch (channel) {
198
184
  case 'line':
199
185
  return this.getLineComponent();
200
186
  case 'ftp':
201
187
  return this.getFTPComponent();
188
+ case 'facebook':
189
+ return this.getFacebookComponent();
202
190
  default:
203
191
  break;
204
192
  }
205
193
  }
206
- if (messageStrategy !== "X_ENGAGE" && channel === 'facebook' && !isFullMode) {
207
- return this.getFacebookComponent();
208
- }
209
194
  const location = {pathname: `/${channel}`, search: '', query};
210
195
  switch (channel) {
211
196
  case 'call_task':
@@ -220,10 +205,9 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
220
205
  router={this.props.router}
221
206
  isFullMode={this.props.isFullMode}
222
207
  createNew={this.props.createNew}
223
- onSelectTemplate={this.props.onSelectTemplate}
208
+ onSelectTemplate={(id) => this.props.onSelectTemplate(this.selectTemplate(id))}
224
209
  renderNewCardGrid={this.getTemplateDataForGrid}
225
210
  handlePeviewTemplate={this.props.handlePeviewTemplate}
226
- messageStrategy={this.props.messageStrategy}
227
211
  />);
228
212
  }
229
213
  }
@@ -303,7 +287,6 @@ TemplatesV2.propTypes = {
303
287
  cap: PropTypes.object,
304
288
  authData: PropTypes.object,
305
289
  FTPMode: PropTypes.string,
306
- messageStrategy: PropTypes.string,
307
290
  };
308
291
 
309
292
  TemplatesV2.defaultProps = {
@@ -66,8 +66,4 @@ export default defineMessages({
66
66
  id: 'creatives.containersV2.TemplatesV2.line',
67
67
  defaultMessage: 'Line',
68
68
  },
69
- facebookDisableinfo: {
70
- id: `creatives.containersV2.TemplatesV2.facebookDisableinfo`,
71
- defaultMessage: 'Please integrate Facebook page ID & page name to enable this option.',
72
- },
73
69
  });
@@ -1,4 +0,0 @@
1
- .cap-facebook-ad-iframe{
2
- transform: scale(0.75, 0.75);
3
- transform-origin: top left;
4
- }