@capillarytech/creatives-library 8.0.340-beta.0.2 → 8.0.340-beta.0.4
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
package/services/api.js
CHANGED
|
@@ -11,9 +11,6 @@ import getSchema from './getSchema';
|
|
|
11
11
|
import * as API from '../utils/ApiCaller';
|
|
12
12
|
import { addBaseToTemplate, transformCustomFieldsData } from '../utils/commonUtils';
|
|
13
13
|
import { EMAIL, SMS, TRANSACTION } from '../v2Containers/CreativesContainer/constants';
|
|
14
|
-
import localSmsLayoutResponse from '../containers/Sms/Create/localSchema';
|
|
15
|
-
import localEmailLayoutResponse from '../containers/Email/Create/localSchema';
|
|
16
|
-
import localLineLayoutResponse from '../containers/Line/Create/localSchema';
|
|
17
14
|
let API_ENDPOINT = config.development.api_endpoint;
|
|
18
15
|
let EXPORT_API_ENDPOINT = config.development.exports_api_endpoint;
|
|
19
16
|
let CAMPAIGNS_API_ENDPOINT = config.development.campaigns_api_endpoint;
|
|
@@ -440,18 +437,6 @@ export const fetchSchemaForEntity = async ({queryParams}) => {
|
|
|
440
437
|
console.error(err);
|
|
441
438
|
});
|
|
442
439
|
}
|
|
443
|
-
if (
|
|
444
|
-
queryParams.type === 'LAYOUT' &&
|
|
445
|
-
!queryParams.version &&
|
|
446
|
-
['SMS', 'EMAIL', 'LINE'].includes((queryParams.layout || '').toUpperCase())
|
|
447
|
-
) {
|
|
448
|
-
const localByChannel = {
|
|
449
|
-
SMS: localSmsLayoutResponse,
|
|
450
|
-
EMAIL: localEmailLayoutResponse,
|
|
451
|
-
LINE: localLineLayoutResponse,
|
|
452
|
-
};
|
|
453
|
-
return { response: localByChannel[queryParams.layout.toUpperCase()], status: { code: 200 } };
|
|
454
|
-
}
|
|
455
440
|
const url = `${API_ENDPOINT}/meta/${queryParams.type}?query=${JSON.stringify(queryParams)}`;
|
|
456
441
|
const result = await request(url, getAPICallObject('GET'));// request(url, getAPICallObject('GET'));
|
|
457
442
|
const customFields = get(result, 'response.metaEntities.custom', {});
|
|
@@ -636,14 +636,14 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
|
|
|
636
636
|
>
|
|
637
637
|
{channel && channel.toLowerCase() === "sms" && (
|
|
638
638
|
<CapRow>
|
|
639
|
-
<CapRow className="shell-v2 align-center" id="sms-preview">
|
|
639
|
+
<CapRow useLegacy className="shell-v2 align-center" id="sms-preview">
|
|
640
640
|
<CapImage
|
|
641
641
|
className="preview-image sms"
|
|
642
642
|
src={smsMobileAndroid}
|
|
643
643
|
alt={this.props.intl.formatMessage(messages.previewGenerated)}
|
|
644
644
|
/>
|
|
645
|
-
<CapRow className="msg-container sms">
|
|
646
|
-
<CapRow className={"message-pop sms"}>
|
|
645
|
+
<CapRow useLegacy className="msg-container sms">
|
|
646
|
+
<CapRow useLegacy className={"message-pop sms"}>
|
|
647
647
|
{content &&
|
|
648
648
|
content.length &&
|
|
649
649
|
content.map((msg, index) => (
|