@capillarytech/creatives-library 2.0.61 → 2.0.63
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 -1
- package/assets/NoImage1.js +50 -0
- package/assets/WithImage1.js +57 -0
- package/components/FormBuilder/_formBuilder.scss +8 -3
- package/components/FormBuilder/index.js +94 -64
- package/components/PreviewSideBar/_previewsidebar.scss +1 -1
- package/components/TemplatePreview/_templatePreview.scss +1 -1
- package/containers/CreativesContainer/SlideBoxContent.js +1 -1
- package/containers/CreativesContainer/index.js +1 -1
- package/containers/MobilePush/Create/_mobilePushCreate.scss +13 -0
- package/containers/MobilePush/Create/actions.js +6 -0
- package/containers/MobilePush/Create/constants.js +1 -0
- package/containers/MobilePush/Create/index.js +626 -1128
- package/containers/MobilePush/Create/messages.js +5 -1
- package/containers/MobilePush/Create/reducer.js +2 -0
- package/containers/MobilePush/Create/selectors.js +3 -3
- package/containers/MobilePush/Edit/_mobilePushCreate.scss +10 -0
- package/containers/MobilePush/Edit/index.js +375 -1106
- package/containers/MobilePush/Edit/messages.js +4 -0
- package/containers/MobilePush/Edit/reducer.js +2 -1
- package/containers/MobilePush/Edit/selectors.js +3 -1
- package/containers/MobilePush/commonMethods.js +249 -0
- package/containers/MobilePush/eventsMap.js +127 -0
- package/containers/MobilePush/initialSchema.js +1751 -0
- package/containers/MobilepushWrapper/_mobilepushWrapper.scss +18 -0
- package/containers/MobilepushWrapper/index.js +7 -4
- package/containers/Sms/Create/_smsCreate.scss +1 -1
- package/containers/TemplatesV2/index.js +7 -8
- package/global-styles.js +1 -0
- package/index.html +2 -0
- package/package.json +1 -1
- package/services/api.js +3 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.mobilepush-wrapper {
|
|
2
|
+
.ant-card-body {
|
|
3
|
+
padding: unset;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.ant-radio-group.cap-radioCard-v2 {
|
|
7
|
+
.ant-radio-button-wrapper{
|
|
8
|
+
width: 258px;
|
|
9
|
+
height: 258px;
|
|
10
|
+
}
|
|
11
|
+
.radio-card-header {
|
|
12
|
+
margin-top: 8px;
|
|
13
|
+
margin-left: 16px;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
}
|
|
@@ -10,15 +10,17 @@ import { FormattedMessage } from 'react-intl';
|
|
|
10
10
|
import {CapRadioCard, CapHeader} from '@capillarytech/cap-ui-library';
|
|
11
11
|
import {isEmpty} from 'lodash';
|
|
12
12
|
import MobilepushCreate from '../MobilePush/Create';
|
|
13
|
+
import WithImage from '../../assets/WithImage1';
|
|
14
|
+
import WithNoImage from '../../assets/NoImage1';
|
|
13
15
|
import messages from './messages';
|
|
14
|
-
|
|
16
|
+
import './_mobilepushWrapper.scss';
|
|
15
17
|
export class MobilepushWrapper extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
16
18
|
constructor(props) {
|
|
17
19
|
super(props);
|
|
18
20
|
this.modes = [
|
|
19
21
|
{
|
|
20
22
|
title: <FormattedMessage {...messages.text}/>,
|
|
21
|
-
content: <
|
|
23
|
+
content: <WithNoImage height="124px" width={"248px"}/>,
|
|
22
24
|
value: 'text',
|
|
23
25
|
// onClick: () => {
|
|
24
26
|
// this.emailUploader.current.click();
|
|
@@ -26,7 +28,7 @@ export class MobilepushWrapper extends React.Component { // eslint-disable-line
|
|
|
26
28
|
},
|
|
27
29
|
{
|
|
28
30
|
title: <FormattedMessage {...messages.image}/>,
|
|
29
|
-
content: <
|
|
31
|
+
content: <WithImage height="248px" width={"248px"}/>,
|
|
30
32
|
value: 'image',
|
|
31
33
|
},
|
|
32
34
|
];
|
|
@@ -38,12 +40,13 @@ export class MobilepushWrapper extends React.Component { // eslint-disable-line
|
|
|
38
40
|
const {mobilePushCreateMode, step, getFormData, setIsLoadingContent, isGetFormData, query} = this.props;
|
|
39
41
|
const isShowMobilepushCreate = !isEmpty(mobilePushCreateMode);
|
|
40
42
|
return (
|
|
41
|
-
<div>
|
|
43
|
+
<div className="mobilepush-wrapper">
|
|
42
44
|
{step === "modeSelection" ?
|
|
43
45
|
<div>
|
|
44
46
|
<CapHeader size="small" title={<FormattedMessage {...messages.createMode}/>}/>
|
|
45
47
|
<CapRadioCard
|
|
46
48
|
panes={this.modes}
|
|
49
|
+
cardHeight={"286px"}
|
|
47
50
|
onChange={this.onChange}
|
|
48
51
|
selected={mobilePushCreateMode}
|
|
49
52
|
/>
|
|
@@ -50,14 +50,16 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
|
|
|
50
50
|
constructor(props) {
|
|
51
51
|
super(props);
|
|
52
52
|
const defaultChannel = get(this, 'props.channel') || get(this, 'props.params.channel') || 'sms';
|
|
53
|
-
const
|
|
53
|
+
const defaultPanes = [
|
|
54
54
|
{content: <div></div>, tab: 'Sms', key: 'sms'},
|
|
55
55
|
{content: <div></div>, tab: 'Email', key: 'email'},
|
|
56
|
-
{content: <div></div>, tab: 'Call Task', key: 'calltask'},
|
|
57
56
|
// {content: this.getTemplatesComponent('wechat'), tab: 'Wechat', key: 'wechat'},
|
|
58
57
|
{content: <div></div>, tab: 'Mpush', key: 'mobilepush'},
|
|
59
58
|
];
|
|
60
|
-
|
|
59
|
+
if (!props.isFullMode) {
|
|
60
|
+
defaultPanes.push({content: <div></div>, tab: 'Call Task', key: 'call_task'});
|
|
61
|
+
}
|
|
62
|
+
const panes = this.setChannelContent(defaultChannel, defaultPanes);
|
|
61
63
|
this.state = {
|
|
62
64
|
selectedChannel: defaultChannel,
|
|
63
65
|
panes,
|
|
@@ -105,7 +107,7 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
|
|
|
105
107
|
if (!this.props.isFullMode) {
|
|
106
108
|
query = {type: 'embedded', module: 'library'};
|
|
107
109
|
}
|
|
108
|
-
return (channel === '
|
|
110
|
+
return (channel === 'call_task' ?
|
|
109
111
|
this.getCallTaskComponent() :
|
|
110
112
|
<Templates
|
|
111
113
|
key={channel}
|
|
@@ -124,13 +126,10 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
|
|
|
124
126
|
const panes = argsPanes.map((p) => {
|
|
125
127
|
const pane = p;
|
|
126
128
|
if (pane.key === selectedChannel) {
|
|
127
|
-
let channel =
|
|
129
|
+
let channel = selectedChannel;
|
|
128
130
|
if (channel === "mpush") {
|
|
129
131
|
channel = "mobilepush";
|
|
130
132
|
}
|
|
131
|
-
if (channel === 'call task') {
|
|
132
|
-
channel = "calltask";
|
|
133
|
-
}
|
|
134
133
|
pane.content = this.getTemplatesComponent(channel);
|
|
135
134
|
return pane;
|
|
136
135
|
}
|
package/global-styles.js
CHANGED
package/index.html
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
<meta name="mobile-web-app-capable" content="yes">
|
|
10
10
|
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
|
11
11
|
<script src="https://use.typekit.net/ifw1ntv.js"></script>
|
|
12
|
+
<!-- Roboto Font -->
|
|
13
|
+
<link href="https://fonts.googleapis.com/css?family=Roboto:400,500" rel="stylesheet">
|
|
12
14
|
<!-- Google Tag Manager -->
|
|
13
15
|
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
|
14
16
|
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
package/package.json
CHANGED
package/services/api.js
CHANGED
|
@@ -257,6 +257,9 @@ export const getUserList = () => {
|
|
|
257
257
|
};
|
|
258
258
|
|
|
259
259
|
export const fetchSchemaForEntity = ({queryParams}) => {
|
|
260
|
+
if (queryParams.version === "v2" && queryParams.type === "LAYOUT" && queryParams.layout === "MOBILEPUSH") {
|
|
261
|
+
return import('../containers/MobilePush/initialSchema').then((layout) => layout);
|
|
262
|
+
}
|
|
260
263
|
const url = `${API_ENDPOINT}/meta/${queryParams.type}?query=${JSON.stringify(queryParams)}`;
|
|
261
264
|
return request(url, getAPICallObject('GET'));// request(url, getAPICallObject('GET'));
|
|
262
265
|
};
|