@capillarytech/creatives-library 3.9.4 → 3.9.7
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/components/TemplatePreview/WechatRichmediaTemplatePreview/index.js +1 -1
- package/components/TemplatePreview/_templatePreview.scss +6 -1
- package/components/TemplatePreview/index.js +1 -1
- package/package.json +2 -2
- package/v2Components/TemplatePreview/_templatePreview.scss +9 -0
- package/v2Components/TemplatePreview/index.js +1 -1
- package/v2Containers/CreativesContainer/index.js +2 -1
- package/v2Containers/Line/Create/index.js +10 -8
|
@@ -14,7 +14,7 @@ import _ from 'lodash';
|
|
|
14
14
|
import SlideBox from '../../SlideBox';
|
|
15
15
|
import './_wechatRichmediaTemplatePrev.scss';
|
|
16
16
|
import messages from './messages';
|
|
17
|
-
const wechatBody = require('
|
|
17
|
+
const wechatBody = require('../assets/images/wechat_mobile_android.svg');
|
|
18
18
|
|
|
19
19
|
class WechatRichmediaTemplatePreview extends React.PureComponent { // eslint-disable-line react/prefer-stateless-function
|
|
20
20
|
preparePreviewData = (mediaList) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import '~@capillarytech/cap-ui-library/styles/_variables.scss';
|
|
2
2
|
|
|
3
3
|
.shell-lock-screen-ios{
|
|
4
4
|
display: flex;
|
|
@@ -296,6 +296,11 @@
|
|
|
296
296
|
left: 14px;
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
+
&.line-preview {
|
|
300
|
+
.message-pop {
|
|
301
|
+
margin-top: -6px;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
299
304
|
|
|
300
305
|
.message-pop{
|
|
301
306
|
.unicode-disabled{
|
|
@@ -291,7 +291,7 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
|
|
|
291
291
|
channel && channel.toLowerCase() === 'line' ? (
|
|
292
292
|
<div className="shell align-center" id="sms-preview">
|
|
293
293
|
<CapImage className="preview-image" src={wechatBody} alt={this.props.intl.formatMessage(messages.previewGenerated)}/>
|
|
294
|
-
<div className="msgContainer">
|
|
294
|
+
<div className="msgContainer line-preview">
|
|
295
295
|
<div className="sms-icon" style={{ width: '25px', height: '25px', background: '#2E89DF' }}></div>
|
|
296
296
|
<div className="message-pop align-left" style={{ background: '#ffffff', color: '#333333' }}>
|
|
297
297
|
{ (content && content.bodyImage) ? <CapImage src={content.bodyImage} alt="ddd" style={{maxWidth: '100%'}}/> : '' }
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capillarytech/creatives-library",
|
|
3
3
|
"author": "meharaj",
|
|
4
|
-
"version": "3.9.
|
|
4
|
+
"version": "3.9.7",
|
|
5
5
|
"description": "Capillary creatives ui",
|
|
6
6
|
"main": "./index.js",
|
|
7
7
|
"module": "./index.es.js",
|
|
@@ -30,4 +30,4 @@
|
|
|
30
30
|
"styled-components": "^3.2.1",
|
|
31
31
|
"whatwg-fetch": "2.0.1"
|
|
32
32
|
}
|
|
33
|
-
}
|
|
33
|
+
}
|
|
@@ -281,7 +281,7 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
|
|
|
281
281
|
channel && channel.toLowerCase() === 'line' ? (
|
|
282
282
|
<div className="shell-v2 align-center" id="sms-preview">
|
|
283
283
|
<CapImage className="preview-image" src={wechatBodyNew} alt={this.props.intl.formatMessage(messages.previewGenerated)}/>
|
|
284
|
-
<div className="msgContainer">
|
|
284
|
+
<div className="msgContainer line-preview">
|
|
285
285
|
<div className="sms-icon" style={{ left: 10, borderRadius: '50%', width: '20px', height: '20px', background: '#2E89DF' }}></div>
|
|
286
286
|
<div className="message-pop align-left" style={{ background: '#ffffff', color: '#333333' }}>
|
|
287
287
|
{
|
|
@@ -216,7 +216,7 @@ class Creatives extends React.Component {
|
|
|
216
216
|
break;
|
|
217
217
|
}
|
|
218
218
|
case constants.LINE: {
|
|
219
|
-
const { messageBody } = templateData;
|
|
219
|
+
const { messageBody= '{}', isDefault } = templateData;
|
|
220
220
|
const {
|
|
221
221
|
messages,
|
|
222
222
|
to,
|
|
@@ -226,6 +226,7 @@ class Creatives extends React.Component {
|
|
|
226
226
|
} = JSON.parse(messageBody);
|
|
227
227
|
creativesTemplateData = {
|
|
228
228
|
type: constants.LINE,
|
|
229
|
+
isDefault,
|
|
229
230
|
edit: true,
|
|
230
231
|
definition: {
|
|
231
232
|
mode: type,
|
|
@@ -168,7 +168,7 @@ export class Line extends Component {
|
|
|
168
168
|
type: 'TAG',
|
|
169
169
|
context:
|
|
170
170
|
this.props.location.query.type === 'embedded'
|
|
171
|
-
?
|
|
171
|
+
? 'outbound'
|
|
172
172
|
: 'default',
|
|
173
173
|
embedded:
|
|
174
174
|
this.props.location.query.type === 'embedded'
|
|
@@ -287,7 +287,7 @@ export class Line extends Component {
|
|
|
287
287
|
|
|
288
288
|
setEditState = (data) => {
|
|
289
289
|
const { formData: previousFormData } = this.state;
|
|
290
|
-
const { text, originalContentUrl, imagePreview, image } = get(data, "versions.base.content.messages[0]");
|
|
290
|
+
const { text, originalContentUrl, imagePreview, image } = get(data, "versions.base.content.messages[0]", {});
|
|
291
291
|
const retrievedData = {
|
|
292
292
|
...previousFormData[0],
|
|
293
293
|
};
|
|
@@ -974,18 +974,20 @@ export class Line extends Component {
|
|
|
974
974
|
createTemplateInProgress,
|
|
975
975
|
assetUploading,
|
|
976
976
|
} = {},
|
|
977
|
-
templateData
|
|
978
|
-
edit,
|
|
979
|
-
mode,
|
|
980
|
-
orgId,
|
|
981
|
-
} = {},
|
|
977
|
+
templateData,
|
|
982
978
|
params: {
|
|
983
979
|
id,
|
|
984
980
|
} = {},
|
|
985
981
|
} = this.props;
|
|
982
|
+
const {
|
|
983
|
+
edit,
|
|
984
|
+
mode,
|
|
985
|
+
orgId,
|
|
986
|
+
isDefault,
|
|
987
|
+
} = templateData || {};
|
|
986
988
|
let loading = createTemplateInProgress || false;
|
|
987
989
|
loading = !!assetUploading;
|
|
988
|
-
if (edit || mode === 'edit' || (orgId && id)) {
|
|
990
|
+
if (!isDefault && (edit || mode === 'edit' || (orgId && id))) {
|
|
989
991
|
const {
|
|
990
992
|
base: {
|
|
991
993
|
'message-editor': msgEditor,
|