@capillarytech/creatives-library 7.7.4 → 7.7.6
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 +1 -1
- package/v2Containers/CapFacebookPreview/index.js +4 -2
- package/v2Containers/CreativesContainer/index.js +3 -0
- package/v2Containers/Facebook/Advertisement/index.js +7 -5
- package/v2Containers/Facebook/Advertisement/index.scss +2 -2
- package/v2Containers/Facebook/index.js +1 -1
- package/v2Containers/Facebook/messages.js +1 -1
- package/v2Containers/Templates/index.js +2 -2
- package/v2Containers/Templates/reducer.js +4 -4
- package/v2Containers/TemplatesV2/messages.js +1 -1
package/package.json
CHANGED
|
@@ -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,
|
|
@@ -351,12 +352,12 @@ export const CapFacebookPreview = (props) => {
|
|
|
351
352
|
>
|
|
352
353
|
</CapSelect>
|
|
353
354
|
</div>
|
|
354
|
-
<CapLabel
|
|
355
|
+
{!hideInfoText && <CapLabel
|
|
355
356
|
type="label1"
|
|
356
357
|
style={{paddingBottom: 16, textAlign: 'left', width: 392}}
|
|
357
358
|
>
|
|
358
359
|
{formatMessage(messages.previewAdDesc)}
|
|
359
|
-
</CapLabel>
|
|
360
|
+
</CapLabel>}
|
|
360
361
|
<div style={{marginBottom: 16}}>
|
|
361
362
|
{(disablePreviewButton || disableAfterPreviewGenerate) ?
|
|
362
363
|
<CapTooltip title={formatMessage(messages.generatePreviewDisableToolTip)}>
|
|
@@ -422,6 +423,7 @@ CapFacebookPreview.propTypes = {
|
|
|
422
423
|
orgUnitFacebookPageSettingsMap: PropTypes.object,
|
|
423
424
|
accessToken: PropTypes.string,
|
|
424
425
|
accountId: PropTypes.string,
|
|
426
|
+
hideInfoText:PropTypes.any,
|
|
425
427
|
};
|
|
426
428
|
|
|
427
429
|
const mapStateToProps = createStructuredSelector({
|
|
@@ -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,12 +278,14 @@ 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 = {
|
|
283
285
|
selectedMarketingObjective: templateData.selectedMarketingObjective,
|
|
284
286
|
edit: true,
|
|
285
287
|
type: channel,
|
|
288
|
+
fbContentType: templateData.fbContentType
|
|
286
289
|
};
|
|
287
290
|
}
|
|
288
291
|
break;
|
|
@@ -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
|
-
<
|
|
920
|
-
|
|
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
|
-
|
|
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:
|
|
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:
|
|
51
|
+
top: 35px;
|
|
52
52
|
position: absolute;
|
|
53
53
|
right: 60px;
|
|
54
54
|
color: $FONT_COLOR_05;
|
|
@@ -283,7 +283,7 @@ const Facebook = (props) => {
|
|
|
283
283
|
fbAdManager={CREATIVE}
|
|
284
284
|
/>
|
|
285
285
|
) :
|
|
286
|
-
(!isFullMode && fbAdManager !== CREATIVE && messageStrategy === "DEFAULT" ) ?
|
|
286
|
+
(!isFullMode && (fbAdManager !== CREATIVE && messageStrategy === "DEFAULT" || (templateData?.edit && templateData?.fbContentType !=="CREATIVE")) ) ?
|
|
287
287
|
(<div className={className}>
|
|
288
288
|
|
|
289
289
|
<div className="is-scrollable-section" >
|
|
@@ -182,6 +182,6 @@ export default defineMessages({
|
|
|
182
182
|
},
|
|
183
183
|
facebookDisableinfo: {
|
|
184
184
|
id: `${messagePrefix}.facebookDisableinfo`,
|
|
185
|
-
defaultMessage: 'Please integrate Facebook
|
|
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
|
|
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
|
-
|
|
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('
|
|
163
|
+
return state.set('fetchedOrgLevelCampaignSettings', false);
|
|
164
164
|
case types.GET_ORG_LEVEL_CAMPAIGN_SETTINGS_SUCCESS:
|
|
165
|
-
return state.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('
|
|
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
|
|
71
|
+
defaultMessage: 'Please integrate Facebook page ID & page name to enable this option.',
|
|
72
72
|
},
|
|
73
73
|
});
|