@capillarytech/creatives-library 7.7.3 → 7.7.5

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.7.3",
4
+ "version": "7.7.5",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -182,13 +182,14 @@ export class Cap extends React.Component { // eslint-disable-line react/prefer-s
182
182
  USERNAME : userName,
183
183
  EMAIL : userEmail
184
184
  } = {},
185
- proxyOrgList,
185
+ proxyOrgList =[],
186
186
  isCapUser,
187
- refID
187
+ refID,
188
+ orgName: userOrgName,
188
189
  } = userData;
189
- const {
190
- orgName
191
- } = _.find(proxyOrgList, {orgID});
190
+ const { orgName } = _.find(proxyOrgList, { orgID: orgID }) || {
191
+ orgName: userOrgName,
192
+ };
192
193
  const gtmData = {
193
194
  isCapUser: isCapUser,
194
195
  orgId: orgID,
@@ -46,6 +46,7 @@ export const CapFacebookPreview = (props) => {
46
46
  accessToken,
47
47
  accountId,
48
48
  defaultGeneratePreview,
49
+ hideInfoText = false,
49
50
  } = props;
50
51
  const {
51
52
  formatMessage,
@@ -199,6 +200,7 @@ export const CapFacebookPreview = (props) => {
199
200
  ad_format: adPreviewFormat,
200
201
  },
201
202
  };
203
+ const { webSiteLink= "" } = (previewData || [] )[0] || {};
202
204
  if (selectedAd !== CAROUSEL) {
203
205
  const {
204
206
  imageData = {},
@@ -273,6 +275,7 @@ export const CapFacebookPreview = (props) => {
273
275
  message: primaryText,
274
276
  child_attachments: childData,
275
277
  multi_share_end_card: false,
278
+ "link":webSiteLink,
276
279
  },
277
280
  };
278
281
  facebookPreviewActions.getPreview(data);
@@ -293,8 +296,8 @@ export const CapFacebookPreview = (props) => {
293
296
  src={src}
294
297
  key={random}
295
298
  style={{border: "none"}}
296
- width={"800px"}
297
- scrolling="yes"
299
+ width={"600px"}
300
+ scrolling="no"
298
301
  height={"1000px"}
299
302
  className="cap-facebook-ad-iframe"
300
303
  />
@@ -349,12 +352,12 @@ export const CapFacebookPreview = (props) => {
349
352
  >
350
353
  </CapSelect>
351
354
  </div>
352
- <CapLabel
355
+ {!hideInfoText && <CapLabel
353
356
  type="label1"
354
357
  style={{paddingBottom: 16, textAlign: 'left', width: 392}}
355
358
  >
356
359
  {formatMessage(messages.previewAdDesc)}
357
- </CapLabel>
360
+ </CapLabel>}
358
361
  <div style={{marginBottom: 16}}>
359
362
  {(disablePreviewButton || disableAfterPreviewGenerate) ?
360
363
  <CapTooltip title={formatMessage(messages.generatePreviewDisableToolTip)}>
@@ -420,6 +423,7 @@ CapFacebookPreview.propTypes = {
420
423
  orgUnitFacebookPageSettingsMap: PropTypes.object,
421
424
  accessToken: PropTypes.string,
422
425
  accountId: PropTypes.string,
426
+ hideInfoText:PropTypes.any,
423
427
  };
424
428
 
425
429
  const mapStateToProps = createStructuredSelector({
@@ -1,15 +1,4 @@
1
1
  .cap-facebook-ad-iframe{
2
- -moz-transform: scale(0.75, 0.75);
3
- -webkit-transform: scale(0.75, 0.75);
4
- -o-transform: scale(0.75, 0.75);
5
- -ms-transform: scale(0.75, 0.75);
6
2
  transform: scale(0.75, 0.75);
7
- -moz-transform-origin: top left;
8
- -webkit-transform-origin: top left;
9
- -o-transform-origin: top left;
10
- -ms-transform-origin: top left;
11
3
  transform-origin: top left;
12
- #facebook{
13
- position: absolute;
14
- }
15
4
  }
@@ -73,7 +73,7 @@ export default defineMessages({
73
73
  },
74
74
  instagramStandard: {
75
75
  id: `${messagePrefix}.instagramStandard`,
76
- defaultMessage: 'instagram_standard',
76
+ defaultMessage: 'Instagram standard',
77
77
  },
78
78
  instagramStory: {
79
79
  id: `${messagePrefix}.instagramStory`,
@@ -81,7 +81,7 @@ export default defineMessages({
81
81
  },
82
82
  instagramExploreContextual: {
83
83
  id: `${messagePrefix}.instagramExploreContextual`,
84
- defaultMessage: 'instagram_explore_contextual',
84
+ defaultMessage: 'Instagram explore contextual',
85
85
  },
86
86
  instagramExploreImmersive: {
87
87
  id: `${messagePrefix}.instagramExploreImmersive`,
@@ -235,6 +235,7 @@ class Creatives extends React.Component {
235
235
  creativeType = "",
236
236
  selectedFacebookAccount = {},
237
237
  facebookCreativeList: fbCreativeList = [],
238
+ fbContentType,
238
239
  } = templateData || {};
239
240
  const fBContent = fbCreativeList;
240
241
  const facebookCreativeList = [];
@@ -277,6 +278,7 @@ class Creatives extends React.Component {
277
278
  type: constants.FACEBOOK,
278
279
  edit: true,
279
280
  selectedFacebookAccount,
281
+ fbContentType
280
282
  };
281
283
  } else {
282
284
  creativesTemplateData = {
@@ -837,7 +837,7 @@ export const Advertisement = (props) => {
837
837
  }
838
838
  } else if (status === 'SUCCESS') {
839
839
  Object.keys(data).forEach((obj) => {
840
- if ((orgUnitFacebookPageSettingsMap[data[obj]] || {}).pageAccessToken) {
840
+ if ((orgUnitFacebookPageSettingsMap[data[obj]] || {}).pageAccessToken && data[obj]!== -1) {
841
841
  pageAccessOrgsOptions.push({label: obj, value: data[obj]});
842
842
  }
843
843
  });
@@ -865,7 +865,7 @@ export const Advertisement = (props) => {
865
865
  className={"cap-header-facebook-ad"}
866
866
  />
867
867
  </div>
868
- {isFullMode && <>
868
+ {isFullMode && <>
869
869
  <CapInput
870
870
  id={`fbAd_input`}
871
871
  onChange={onTextTitleChange}
@@ -916,8 +916,10 @@ export const Advertisement = (props) => {
916
916
  className={"cap-header-facebook-ad"}
917
917
  />
918
918
  </div>}
919
- <CapRow className="add-facebook-ad-section" >
920
- {isFullMode && <div className="cap-header-facebook-ad">
919
+ <div className="add-facebook-ad-section">
920
+ <CapRow >
921
+ <CapColumn span={12}>
922
+ {isFullMode && <>
921
923
  <CapHeading
922
924
  type="h2"
923
925
  className="truncate-text"
@@ -935,8 +937,7 @@ export const Advertisement = (props) => {
935
937
  title={<FormattedMessage {...messages.creativesTemplatesEditName}/>}
936
938
  onClick={onClickEditName}
937
939
  />}
938
- </div>}
939
- <CapColumn span={12}>
940
+ </>}
940
941
  {isFullMode && <><CapHeading
941
942
  type="h4"
942
943
  style={{marginBottom: 4}}
@@ -987,6 +988,7 @@ export const Advertisement = (props) => {
987
988
  />
988
989
  </CapColumn>
989
990
  </CapRow>
991
+ </div>
990
992
  <FbAdFooter>
991
993
  <CapButton
992
994
  onClick={onDoneCallback()}
@@ -17,7 +17,7 @@ $classPrefix: add-facebook-ad-section;
17
17
  text-overflow: ellipsis;
18
18
  white-space: nowrap;
19
19
  min-width: 112px;
20
- max-width: 920px;
20
+ max-width: 320px;
21
21
  display: inline-block;
22
22
  }
23
23
  .cap-input-edit-name{
@@ -48,7 +48,7 @@ $classPrefix: add-facebook-ad-section;
48
48
  .cap-custom-image-upload{
49
49
  .dragger-button.re-upload{
50
50
  margin-top: 50px;
51
- top: 0px;
51
+ top: 35px;
52
52
  position: absolute;
53
53
  right: 60px;
54
54
  color: $FONT_COLOR_05;
@@ -182,6 +182,6 @@ export default defineMessages({
182
182
  },
183
183
  facebookDisableinfo: {
184
184
  id: `${messagePrefix}.facebookDisableinfo`,
185
- defaultMessage: 'Please integrate Facebook Ad page ID & username to enable this option.',
185
+ defaultMessage: 'Please integrate Facebook page ID & page name to enable this option.',
186
186
  },
187
187
  });
@@ -1956,8 +1956,8 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
1956
1956
  const { activeMode, channel, wechatFilter, lineFilter } = this.state;
1957
1957
  let showFbAds = false;
1958
1958
  if (channel.toLowerCase() === FACEBOOK_CHANNEL) {
1959
- const campaignSettings = this.props.Templates.campaignSettings;
1960
- if (campaignSettings && isEmpty(campaignSettings?.accountSettings)) {
1959
+ const {campaignSettings, fetchedOrgLevelCampaignSettings} = this?.props?.Templates || {};
1960
+ if (campaignSettings && isEmpty(campaignSettings?.accountSettings) && fetchedOrgLevelCampaignSettings) {
1961
1961
  showFbAds = true;
1962
1962
  } else if (!isEmpty(campaignSettings?.accountSettings)) {
1963
1963
  const fbSetting = get(this.props.Templates, 'campaignSettings.accountSettings.socialAccountSettings.facebookAccountSettings', []);
@@ -9,7 +9,7 @@ import * as types from './constants';
9
9
 
10
10
  const initialState = fromJS({
11
11
  getAllTemplatesInProgress: false,
12
- fetchingOrgLevelCampaignSettings: false,
12
+ fetchedOrgLevelCampaignSettings: true,
13
13
  templates: [],
14
14
  deleteResponse: {},
15
15
  deleteTemplateInProgress: false,
@@ -160,9 +160,9 @@ function templatesReducer(state = initialState, action) {
160
160
  .set('templates', [])
161
161
  .set('weCRMtemplates', fromJS({}));
162
162
  case types.GET_ORG_LEVEL_CAMPAIGN_SETTINGS_REQUEST:
163
- return state.set('fetchingOrgLevelCampaignSettings', true);
163
+ return state.set('fetchedOrgLevelCampaignSettings', false);
164
164
  case types.GET_ORG_LEVEL_CAMPAIGN_SETTINGS_SUCCESS:
165
- return state.set('fetchingOrgLevelCampaignSettings', false).set(
165
+ return state.set('fetchedOrgLevelCampaignSettings', true).set(
166
166
  'campaignSettings',
167
167
  fromJS({
168
168
  ...state.get('campaignSettings'),
@@ -170,7 +170,7 @@ function templatesReducer(state = initialState, action) {
170
170
  }),
171
171
  );
172
172
  case types.GET_ORG_LEVEL_CAMPAIGN_SETTINGS_FAILURE:
173
- return state.set('fetchingOrgLevelCampaignSettings', false);
173
+ return state.set('fetchedOrgLevelCampaignSettings', false);
174
174
  default:
175
175
  return state;
176
176
  }
@@ -68,6 +68,6 @@ export default defineMessages({
68
68
  },
69
69
  facebookDisableinfo: {
70
70
  id: `creatives.containersV2.TemplatesV2.facebookDisableinfo`,
71
- defaultMessage: 'Please integrate Facebook Ad page ID & username to enable this option.',
71
+ defaultMessage: 'Please integrate Facebook page ID & page name to enable this option.',
72
72
  },
73
73
  });