@capillarytech/creatives-library 7.7.26 → 7.8.1
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/app.js +1 -5
- package/components/FormBuilder/index.js +2 -2
- package/containers/Email/index.js +3 -8
- package/containers/MobilePush/Create/index.js +2 -2
- package/containers/MobilePush/Edit/index.js +2 -2
- package/containers/WeChat/MapTemplates/index.js +3 -15
- package/package.json +1 -1
- package/services/api.js +5 -20
- package/translations/en.json +2 -113
- package/translations/zh.json +1 -112
- package/utils/gtmTrackers/gtmEvents/creativeDetails.js +2 -6
- package/utils/gtmTrackers/index.js +4 -8
- package/v2Components/CapImageUpload/index.js +8 -14
- package/v2Components/FormBuilder/index.js +1 -10
- package/v2Components/NavigationBar/index.js +29 -63
- package/v2Components/NavigationBar/messages.js +0 -5
- package/v2Containers/App/constants.js +3 -23
- package/v2Containers/Cap/actions.js +2 -2
- package/v2Containers/Cap/constants.js +2 -3
- package/v2Containers/Cap/index.js +18 -18
- package/v2Containers/Cap/messages.js +0 -8
- package/v2Containers/Cap/sagas.js +6 -18
- package/v2Containers/CapFacebookPreview/constants.js +0 -4
- package/v2Containers/CapFacebookPreview/index.js +67 -92
- package/v2Containers/CapFacebookPreview/reducer.js +10 -19
- package/v2Containers/CreativesContainer/SlideBoxContent.js +0 -2
- package/v2Containers/CreativesContainer/index.js +1 -1
- package/v2Containers/Facebook/Advertisement/index.js +2 -2
- package/v2Containers/Facebook/Advertisement/index.scss +1 -1
- package/v2Containers/Facebook/index.js +4 -15
- package/v2Containers/Line/Container/Drawer/index.js +1 -1
- package/v2Containers/MobilePush/Edit/index.js +2 -2
- package/v2Containers/MobilepushWrapper/index.js +1 -1
- package/v2Containers/Templates/_templates.scss +2 -4
- package/v2Containers/Templates/index.js +2 -5
- package/v2Containers/TemplatesV2/index.js +3 -11
- package/v2Containers/WeChat/MapTemplates/index.js +2 -12
|
@@ -30,11 +30,6 @@ import {
|
|
|
30
30
|
CAROUSEL,
|
|
31
31
|
NO_CALL_TO_ACTION,
|
|
32
32
|
} from '../../v2Containers/Facebook/Advertisement/constant';
|
|
33
|
-
import {
|
|
34
|
-
FETCH_PREVIEW_REQUESTED,
|
|
35
|
-
FETCH_PREVIEW_SUCCESS,
|
|
36
|
-
PREVIEW_NOT_REQUESTED,
|
|
37
|
-
} from './constants';
|
|
38
33
|
import './index.scss';
|
|
39
34
|
|
|
40
35
|
export const CapFacebookPreview = (props) => {
|
|
@@ -60,10 +55,7 @@ export const CapFacebookPreview = (props) => {
|
|
|
60
55
|
const [disableAfterPreviewGenerate, setDisableAfterPreviewGenerate] = useState(false);
|
|
61
56
|
const [random, setRandom] = useState(0);
|
|
62
57
|
const {pageAccessToken, pageId} = orgUnitFacebookPageSettingsMap;
|
|
63
|
-
const {previewIframe = "",
|
|
64
|
-
const [previewLoaded, setPreviewLoaded] = useState(false);
|
|
65
|
-
const [isRefreshing, setIsRefreshing] = useState(false);
|
|
66
|
-
let isSpinning = false;
|
|
58
|
+
const {previewIframe = "", isFetchingPreview = false, previewIframeError = ""} = facebookPreviewData;
|
|
67
59
|
const facebookAdOptions = [
|
|
68
60
|
{
|
|
69
61
|
value: "DESKTOP_FEED_STANDARD",
|
|
@@ -292,17 +284,9 @@ export const CapFacebookPreview = (props) => {
|
|
|
292
284
|
};
|
|
293
285
|
|
|
294
286
|
const resetIframe = () => {
|
|
295
|
-
previewLoaded && setPreviewLoaded(false);
|
|
296
|
-
!isRefreshing && setIsRefreshing(true);
|
|
297
287
|
const r = random + 1;
|
|
298
288
|
setRandom(r);
|
|
299
289
|
};
|
|
300
|
-
const unsetLoader = () => {
|
|
301
|
-
setTimeout(function() {
|
|
302
|
-
!previewLoaded && setPreviewLoaded(true);
|
|
303
|
-
isRefreshing && setIsRefreshing(false);
|
|
304
|
-
}.bind(this), 5000);
|
|
305
|
-
}
|
|
306
290
|
const getIframe = (iframe) => {
|
|
307
291
|
const divTag = document.createElement('div');
|
|
308
292
|
divTag.innerHTML = iframe;
|
|
@@ -311,16 +295,13 @@ export const CapFacebookPreview = (props) => {
|
|
|
311
295
|
<iframe
|
|
312
296
|
src={src}
|
|
313
297
|
key={random}
|
|
314
|
-
style={{
|
|
298
|
+
style={{border: "none"}}
|
|
315
299
|
width={"600px"}
|
|
316
300
|
scrolling="no"
|
|
317
301
|
height={"1000px"}
|
|
318
302
|
className="cap-facebook-ad-iframe"
|
|
319
|
-
onLoad={
|
|
320
|
-
unsetLoader()
|
|
321
|
-
}
|
|
322
303
|
/>
|
|
323
|
-
|
|
304
|
+
</>);
|
|
324
305
|
};
|
|
325
306
|
|
|
326
307
|
const showRefreshButton = () => {
|
|
@@ -359,80 +340,74 @@ export const CapFacebookPreview = (props) => {
|
|
|
359
340
|
}
|
|
360
341
|
}, [previewIframeError]);
|
|
361
342
|
return (
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
key={"select-previewBasedonAdPlacement"}
|
|
372
|
-
onChange={onChangeAdPreviewFormat}
|
|
373
|
-
style={{ width: '328px', paddingBottom: 16 }}
|
|
374
|
-
options={adOptions}
|
|
375
|
-
value={adPreviewFormat}
|
|
376
|
-
>
|
|
377
|
-
</CapSelect>
|
|
378
|
-
</div>
|
|
379
|
-
{!hideInfoText && <CapLabel
|
|
380
|
-
type="label1"
|
|
381
|
-
style={{ paddingBottom: 16, textAlign: 'left', width: 392 }}
|
|
343
|
+
<CapSpin spinning={isFetchingPreview}>
|
|
344
|
+
<div style={{display: 'inline-block'}}>
|
|
345
|
+
<CapSelect
|
|
346
|
+
label={formatMessage(messages.previewBasedonAdPlacement)}
|
|
347
|
+
key={"select-previewBasedonAdPlacement"}
|
|
348
|
+
onChange={onChangeAdPreviewFormat}
|
|
349
|
+
style={{width: '328px', paddingBottom: 16 }}
|
|
350
|
+
options={adOptions}
|
|
351
|
+
value={adPreviewFormat}
|
|
382
352
|
>
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
<div className="button-disabled-tooltip-wrapper">
|
|
389
|
-
<CapButton
|
|
390
|
-
type="secondary"
|
|
391
|
-
disabled
|
|
353
|
+
</CapSelect>
|
|
354
|
+
</div>
|
|
355
|
+
{!hideInfoText && <CapLabel
|
|
356
|
+
type="label1"
|
|
357
|
+
style={{paddingBottom: 16, textAlign: 'left', width: 392}}
|
|
392
358
|
>
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
359
|
+
{formatMessage(messages.previewAdDesc)}
|
|
360
|
+
</CapLabel>}
|
|
361
|
+
<div style={{marginBottom: 16}}>
|
|
362
|
+
{(disablePreviewButton || disableAfterPreviewGenerate) ?
|
|
363
|
+
<CapTooltip title={formatMessage(messages.generatePreviewDisableToolTip)}>
|
|
364
|
+
<div className="button-disabled-tooltip-wrapper">
|
|
365
|
+
<CapButton
|
|
366
|
+
type="secondary"
|
|
367
|
+
disabled
|
|
368
|
+
>
|
|
369
|
+
<FormattedMessage {...messages.generatePreview} />
|
|
370
|
+
</CapButton>
|
|
371
|
+
</div>
|
|
372
|
+
</CapTooltip> :
|
|
373
|
+
<CapButton
|
|
405
374
|
type="secondary"
|
|
406
|
-
|
|
407
|
-
>
|
|
408
|
-
{formatMessage(messages.refreshPreview)}
|
|
409
|
-
</CapButton>)}
|
|
410
|
-
</div>
|
|
411
|
-
{isRefreshButton && <div style={{ marginBottom: 16 }}>
|
|
412
|
-
<CapIcon
|
|
413
|
-
type="info"
|
|
414
|
-
svgProps={{
|
|
415
|
-
width: 16,
|
|
416
|
-
height: 16,
|
|
417
|
-
}}
|
|
375
|
+
onClick={generatePreview}
|
|
418
376
|
>
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
</
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
377
|
+
<FormattedMessage {...messages.generatePreview} />
|
|
378
|
+
</CapButton>}
|
|
379
|
+
{isRefreshButton && (<CapButton
|
|
380
|
+
onClick={resetIframe}
|
|
381
|
+
type="secondary"
|
|
382
|
+
style={{marginLeft: 16}}
|
|
383
|
+
>
|
|
384
|
+
{formatMessage(messages.refreshPreview)}
|
|
385
|
+
</CapButton>)}
|
|
386
|
+
</div>
|
|
387
|
+
{isRefreshButton && <div style={{marginBottom: 16}}>
|
|
388
|
+
<CapIcon
|
|
389
|
+
type="info"
|
|
390
|
+
svgProps={{
|
|
391
|
+
width: 16,
|
|
392
|
+
height: 16,
|
|
393
|
+
}}
|
|
394
|
+
>
|
|
395
|
+
</CapIcon>
|
|
396
|
+
<CapLabel.CapLabelInline
|
|
397
|
+
type="label1"
|
|
398
|
+
size="s"
|
|
399
|
+
style={{marginBottom: 16, width: 392}}
|
|
400
|
+
>
|
|
401
|
+
{formatMessage(messages.videoNotePreview)}
|
|
402
|
+
</CapLabel.CapLabelInline>
|
|
403
|
+
</div>}
|
|
404
|
+
{previewIframe === "" ? <CapImage
|
|
405
|
+
src={facebookEmptyPlaceholder}
|
|
406
|
+
alt="default"
|
|
407
|
+
width="316px"
|
|
408
|
+
height="392px"
|
|
409
|
+
/> : getIframe(previewIframe)}
|
|
410
|
+
</CapSpin>
|
|
436
411
|
);
|
|
437
412
|
};
|
|
438
413
|
|
|
@@ -6,38 +6,29 @@
|
|
|
6
6
|
|
|
7
7
|
import { fromJS } from 'immutable';
|
|
8
8
|
import get from 'lodash/get';
|
|
9
|
-
import
|
|
10
|
-
GENERATE_PREVIEW_REQUEST,
|
|
11
|
-
GENERATE_PREVIEW_SUCCESS,
|
|
12
|
-
GENERATE_PREVIEW_FAILURE,
|
|
13
|
-
CLEAR_PREVIEW,
|
|
14
|
-
FETCH_PREVIEW_REQUESTED,
|
|
15
|
-
FETCH_PREVIEW_SUCCESS,
|
|
16
|
-
FETCH_PREVIEW_FAILURE,
|
|
17
|
-
PREVIEW_NOT_REQUESTED,
|
|
18
|
-
} from './constants';
|
|
9
|
+
import * as types from './constants';
|
|
19
10
|
|
|
20
11
|
const initialState = fromJS({
|
|
21
|
-
|
|
12
|
+
isFetchingPreview: false,
|
|
22
13
|
previewIframe: "",
|
|
23
14
|
previewIframeError: "",
|
|
24
15
|
});
|
|
25
16
|
|
|
26
17
|
function capFacebookPreviewReducer(state = initialState, action) {
|
|
27
18
|
switch (action.type) {
|
|
28
|
-
case GENERATE_PREVIEW_REQUEST:
|
|
29
|
-
return state.set('
|
|
19
|
+
case types.GENERATE_PREVIEW_REQUEST:
|
|
20
|
+
return state.set('isFetchingPreview', true)
|
|
30
21
|
.set('previewIframe', "")
|
|
31
22
|
.set("previewIframeError", "");
|
|
32
|
-
case GENERATE_PREVIEW_SUCCESS:
|
|
33
|
-
return state.set('
|
|
23
|
+
case types.GENERATE_PREVIEW_SUCCESS:
|
|
24
|
+
return state.set('isFetchingPreview', false)
|
|
34
25
|
.set('previewIframe', get(action, 'payload.fbPreview[0].body', ""));
|
|
35
|
-
case GENERATE_PREVIEW_FAILURE:
|
|
36
|
-
return state.set('
|
|
26
|
+
case types.GENERATE_PREVIEW_FAILURE:
|
|
27
|
+
return state.set('isFetchingPreview', false)
|
|
37
28
|
.set('previewIframe', "")
|
|
38
29
|
.set("previewIframeError", get(action, 'payload.message', ""));
|
|
39
|
-
case CLEAR_PREVIEW:
|
|
40
|
-
return state.set('
|
|
30
|
+
case types.CLEAR_PREVIEW:
|
|
31
|
+
return state.set('isFetchingPreview', false)
|
|
41
32
|
.set('previewIframe', "")
|
|
42
33
|
.set("previewIframeError", "");
|
|
43
34
|
default:
|
|
@@ -578,7 +578,6 @@ function SlideBoxContent(props) {
|
|
|
578
578
|
templateData={templateData}
|
|
579
579
|
messageDetails={messageDetails}
|
|
580
580
|
cap={cap}
|
|
581
|
-
createNew={onCreateNew}
|
|
582
581
|
onFacebookSubmit={onFacebookSubmit}
|
|
583
582
|
onCreateComplete={onCreateComplete}
|
|
584
583
|
isFullMode={isFullMode}
|
|
@@ -587,7 +586,6 @@ function SlideBoxContent(props) {
|
|
|
587
586
|
}}
|
|
588
587
|
getFormSubscriptionData={getFormData}
|
|
589
588
|
fbAdManager={fbAdManager}
|
|
590
|
-
onSelectTemplate={onSelectTemplate}
|
|
591
589
|
/>
|
|
592
590
|
)
|
|
593
591
|
}
|
|
@@ -91,7 +91,7 @@ class Creatives extends React.Component {
|
|
|
91
91
|
this.setState({ slidBoxContent: 'preview', templateData });
|
|
92
92
|
};
|
|
93
93
|
onEditTemplate = () => {
|
|
94
|
-
this.setState({ slidBoxContent: 'editTemplate', showSlideBox: true
|
|
94
|
+
this.setState({ slidBoxContent: 'editTemplate', showSlideBox: true });
|
|
95
95
|
};
|
|
96
96
|
onCreateNew = (fbAdManager) => {
|
|
97
97
|
const data = { slidBoxContent: 'createTemplate', showSlideBox: true };
|
|
@@ -474,9 +474,9 @@ export const Advertisement = (props) => {
|
|
|
474
474
|
if (webSiteLink === "" || errorMsg.websiteLinkErrorMsg ) {
|
|
475
475
|
flag = true;
|
|
476
476
|
}
|
|
477
|
-
if (
|
|
477
|
+
if (Object.keys(imageData).length === 0 && subType === IMAGE) {
|
|
478
478
|
flag = true;
|
|
479
|
-
} else if (
|
|
479
|
+
} else if (Object.keys(videoData).length === 0 && subType === VIDEO) {
|
|
480
480
|
flag = true;
|
|
481
481
|
}
|
|
482
482
|
subTypes.push(subType);
|
|
@@ -269,11 +269,7 @@ const Facebook = (props) => {
|
|
|
269
269
|
]);
|
|
270
270
|
const query = {type: 'embedded', module: 'library'};
|
|
271
271
|
const location = {pathname: `/FACEBOOK`, search: '', query};
|
|
272
|
-
|
|
273
|
-
// fbAdManager ==cretaives only the case for default startegy and user selected "capillary ad manager"
|
|
274
|
-
// below condition (fbAdManager !==CREATIVE) is for edit fb ad manager from campaign
|
|
275
|
-
//-> select capillary ad manager-> select template
|
|
276
|
-
return ((showTemplateList && fbAdManager !==CREATIVE) ? (
|
|
272
|
+
return (showTemplateList ? (
|
|
277
273
|
<Templates
|
|
278
274
|
key={"FACEBOOK"}
|
|
279
275
|
location={location}
|
|
@@ -284,18 +280,11 @@ const Facebook = (props) => {
|
|
|
284
280
|
onSelectTemplate={onSelectTemplate}
|
|
285
281
|
renderNewCardGrid={renderNewCardGrid}
|
|
286
282
|
handlePeviewTemplate={handlePeviewTemplate}
|
|
287
|
-
fbAdManager={CREATIVE}
|
|
283
|
+
fbAdManager={CREATIVE}
|
|
288
284
|
/>
|
|
289
285
|
) :
|
|
290
|
-
(!isFullMode && (
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
// not fullmode +
|
|
294
|
-
// default strtaegy and not selected "capillary ad manager" from campaign message +
|
|
295
|
-
//edit template && not coming from campaign message where user selected "capillary ad manager" (means edit "fb ad manager" from campaign) &&
|
|
296
|
-
// & also we are not selecting capillary ad manager from campaign
|
|
297
|
-
|
|
298
|
-
(<div className={className}>
|
|
286
|
+
(!isFullMode && (fbAdManager !== CREATIVE && messageStrategy === "DEFAULT" || (templateData?.edit && templateData?.fbContentType !==CREATIVE)) ) ?
|
|
287
|
+
(<div className={className}>
|
|
299
288
|
|
|
300
289
|
<div className="is-scrollable-section" >
|
|
301
290
|
<div className="account-details-wrapper">
|
|
@@ -346,7 +346,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
346
346
|
});
|
|
347
347
|
} else {
|
|
348
348
|
selectedAccount = accounts[0];
|
|
349
|
-
formData['mobilepush-accounts'] =
|
|
349
|
+
formData['mobilepush-accounts'] = accounts[0].id;
|
|
350
350
|
}
|
|
351
351
|
this.props.actions.setWeChatAccount(selectedAccount);
|
|
352
352
|
this.setState({formData, accountsOptions: accounts.map((acc) => ({key: acc.id, label: acc.name, value: acc.id}))});
|
|
@@ -361,7 +361,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
361
361
|
obj.type = 'MOBILEPUSH';
|
|
362
362
|
obj.name = formData['template-name'];
|
|
363
363
|
obj.definition = {
|
|
364
|
-
accountId: selectedWeChatAccount
|
|
364
|
+
accountId: selectedWeChatAccount.id,
|
|
365
365
|
licenseCode: selectedWeChatAccount.sourceAccountIdentifier,
|
|
366
366
|
};
|
|
367
367
|
if (this.props.location.query && this.props.location.query.module !== 'dvs') {
|
|
@@ -45,7 +45,7 @@ export class MobilepushWrapper extends React.Component { // eslint-disable-line
|
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
title: <FormattedMessage {...messages.text}/>,
|
|
48
|
-
content: <WithNoImage height="
|
|
48
|
+
content: <WithNoImage height="124px" width={"224px"}/>,
|
|
49
49
|
value: 'text',
|
|
50
50
|
// onClick: () => {
|
|
51
51
|
// this.emailUploader.current.click();
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
padding: $CAP_SPACE_16 $CAP_SPACE_12;
|
|
33
33
|
|
|
34
34
|
.ant-card-meta-description {
|
|
35
|
-
height:
|
|
35
|
+
height: 250px;
|
|
36
|
+
word-wrap: break-word;
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
39
|
|
|
@@ -40,9 +41,6 @@
|
|
|
40
41
|
.ant-card-body {
|
|
41
42
|
padding: $CAP_SPACE_24 0;
|
|
42
43
|
}
|
|
43
|
-
.ant-card-meta-description {
|
|
44
|
-
height: 250px;
|
|
45
|
-
}
|
|
46
44
|
.ant-card-meta {
|
|
47
45
|
padding: 0;
|
|
48
46
|
}
|
|
@@ -1418,11 +1418,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
1418
1418
|
}
|
|
1419
1419
|
}
|
|
1420
1420
|
if (this.isEnabledInLibraryModule("callSelectFromProps")) {
|
|
1421
|
-
|
|
1422
|
-
if(this.props.fbAdManager){
|
|
1423
|
-
data = this.selectTemplate(id)
|
|
1424
|
-
}
|
|
1425
|
-
this.props.onSelectTemplate(data, this.props.fbAdManager);
|
|
1421
|
+
this.props.onSelectTemplate(this.selectTemplate(id), this.props.fbAdManager);
|
|
1426
1422
|
} else {
|
|
1427
1423
|
timeTracker.startTimer(CHANNEL_EDIT_TRACK_MAPPING[this.state.channel.toLowerCase()]);
|
|
1428
1424
|
if (this.state.channel.toLowerCase() === 'ebill') {
|
|
@@ -1437,6 +1433,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
1437
1433
|
|
|
1438
1434
|
selectTemplate = (id) => find(this.props.TemplatesList, {_id: id})
|
|
1439
1435
|
|
|
1436
|
+
|
|
1440
1437
|
handlePreviewClick(template, modeType) {
|
|
1441
1438
|
this.togglePreview();
|
|
1442
1439
|
const templateInfo = cloneDeep(template);
|
|
@@ -28,7 +28,7 @@ import FTP from '../FTP';
|
|
|
28
28
|
import Gallery from '../Assets/Gallery';
|
|
29
29
|
import withStyles from '../../hoc/withStyles';
|
|
30
30
|
import styles, { CapTabStyle } from './TemplatesV2.style';
|
|
31
|
-
import { CREATIVES_UI_VIEW
|
|
31
|
+
import { CREATIVES_UI_VIEW } from '../App/constants';
|
|
32
32
|
import AccessForbidden from '../../v2Components/AccessForbidden';
|
|
33
33
|
|
|
34
34
|
const {CapCustomCardList} = CapCustomCard;
|
|
@@ -39,9 +39,6 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
|
|
|
39
39
|
constructor(props) {
|
|
40
40
|
super(props);
|
|
41
41
|
let defaultChannel = get(this, 'props.channel') || get(this, 'props.params.channel') || 'sms';
|
|
42
|
-
if (defaultChannel === LOYALTY) {
|
|
43
|
-
defaultChannel = 'sms';
|
|
44
|
-
}
|
|
45
42
|
const {
|
|
46
43
|
intl,
|
|
47
44
|
channelsToHide = [],
|
|
@@ -161,11 +158,7 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
|
|
|
161
158
|
);
|
|
162
159
|
|
|
163
160
|
getFacebookComponent = () => {
|
|
164
|
-
const { messageDetails, cap, onFacebookSubmit,
|
|
165
|
-
messageStrategy,
|
|
166
|
-
showDisabledFBInfo,
|
|
167
|
-
orgUnitId,
|
|
168
|
-
onSelectTemplate } = this.props;
|
|
161
|
+
const { messageDetails, cap, onFacebookSubmit, messageStrategy, showDisabledFBInfo, orgUnitId } = this.props;
|
|
169
162
|
return (
|
|
170
163
|
<Facebook
|
|
171
164
|
{...this.props}
|
|
@@ -175,7 +168,6 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
|
|
|
175
168
|
messageStrategy={messageStrategy}
|
|
176
169
|
showDisabledFBInfo={showDisabledFBInfo}
|
|
177
170
|
orgUnitId={orgUnitId}
|
|
178
|
-
onSelectTemplate={onSelectTemplate}
|
|
179
171
|
/>
|
|
180
172
|
);
|
|
181
173
|
}
|
|
@@ -228,7 +220,7 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
|
|
|
228
220
|
router={this.props.router}
|
|
229
221
|
isFullMode={this.props.isFullMode}
|
|
230
222
|
createNew={this.props.createNew}
|
|
231
|
-
onSelectTemplate={
|
|
223
|
+
onSelectTemplate={this.props.onSelectTemplate}
|
|
232
224
|
renderNewCardGrid={this.getTemplateDataForGrid}
|
|
233
225
|
handlePeviewTemplate={this.props.handlePeviewTemplate}
|
|
234
226
|
messageStrategy={this.props.messageStrategy}
|
|
@@ -666,16 +666,7 @@ export class MapTemplates extends React.Component { // eslint-disable-line react
|
|
|
666
666
|
type: "radioGroup",
|
|
667
667
|
metaType: "text",
|
|
668
668
|
datatype: "string",
|
|
669
|
-
options: [
|
|
670
|
-
{
|
|
671
|
-
value: URL,
|
|
672
|
-
label: intl.formatMessage(messages.redirectOptionURL)
|
|
673
|
-
},
|
|
674
|
-
{
|
|
675
|
-
value: MINI_PROGRAM,
|
|
676
|
-
label: intl.formatMessage(messages.redirectOptionMiniProgram)
|
|
677
|
-
}
|
|
678
|
-
],
|
|
669
|
+
options: [intl.formatMessage(messages.redirectOptionURL), intl.formatMessage(messages.redirectOptionMiniProgram)],
|
|
679
670
|
errorMessage: intl.formatMessage(messages.redirectionOptionError),
|
|
680
671
|
required: true,
|
|
681
672
|
fluid: true,
|
|
@@ -773,8 +764,7 @@ export class MapTemplates extends React.Component { // eslint-disable-line react
|
|
|
773
764
|
if (!isEmpty(weCrmAccounts)) {
|
|
774
765
|
forEach(weCrmAccounts, (account) => {
|
|
775
766
|
if (account.configs && account.configs.is_wecrm_enabled) {
|
|
776
|
-
|
|
777
|
-
options && options.push({
|
|
767
|
+
schema.standalone.sections[0].childSections[1].childSections[0].childSections[0].inputFields[0].options.push({
|
|
778
768
|
key: account.uuid,
|
|
779
769
|
label: account.name,
|
|
780
770
|
value: account.name,
|