@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.
Files changed (32) hide show
  1. package/app.js +1 -1
  2. package/assets/NoImage1.js +50 -0
  3. package/assets/WithImage1.js +57 -0
  4. package/components/FormBuilder/_formBuilder.scss +8 -3
  5. package/components/FormBuilder/index.js +94 -64
  6. package/components/PreviewSideBar/_previewsidebar.scss +1 -1
  7. package/components/TemplatePreview/_templatePreview.scss +1 -1
  8. package/containers/CreativesContainer/SlideBoxContent.js +1 -1
  9. package/containers/CreativesContainer/index.js +1 -1
  10. package/containers/MobilePush/Create/_mobilePushCreate.scss +13 -0
  11. package/containers/MobilePush/Create/actions.js +6 -0
  12. package/containers/MobilePush/Create/constants.js +1 -0
  13. package/containers/MobilePush/Create/index.js +626 -1128
  14. package/containers/MobilePush/Create/messages.js +5 -1
  15. package/containers/MobilePush/Create/reducer.js +2 -0
  16. package/containers/MobilePush/Create/selectors.js +3 -3
  17. package/containers/MobilePush/Edit/_mobilePushCreate.scss +10 -0
  18. package/containers/MobilePush/Edit/index.js +375 -1106
  19. package/containers/MobilePush/Edit/messages.js +4 -0
  20. package/containers/MobilePush/Edit/reducer.js +2 -1
  21. package/containers/MobilePush/Edit/selectors.js +3 -1
  22. package/containers/MobilePush/commonMethods.js +249 -0
  23. package/containers/MobilePush/eventsMap.js +127 -0
  24. package/containers/MobilePush/initialSchema.js +1751 -0
  25. package/containers/MobilepushWrapper/_mobilepushWrapper.scss +18 -0
  26. package/containers/MobilepushWrapper/index.js +7 -4
  27. package/containers/Sms/Create/_smsCreate.scss +1 -1
  28. package/containers/TemplatesV2/index.js +7 -8
  29. package/global-styles.js +1 -0
  30. package/index.html +2 -0
  31. package/package.json +1 -1
  32. 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: <FormattedMessage {...messages.text}/>,
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: <FormattedMessage {...messages.image}/>,
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
  />
@@ -11,7 +11,7 @@
11
11
 
12
12
  #template-name.ant-input{
13
13
  font-size: 20px !important;
14
- font-family: proxima-nova, sans-serif;
14
+ // font-family: proxima-nova, sans-serif;
15
15
  font-style: normal;
16
16
  font-weight: 600;
17
17
  }
@@ -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 deafaultPanes = [
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
- const panes = this.setChannelContent(defaultChannel, deafaultPanes);
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 === 'calltask' ?
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 = pane.tab.toLowerCase();
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
@@ -6,6 +6,7 @@ injectGlobal`
6
6
  body {
7
7
  height: 100%;
8
8
  width: 100%;
9
+ font-family: 'Roboto', open-sans, sans-serif !important;
9
10
  }
10
11
 
11
12
  #app {
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "2.0.61",
4
+ "version": "2.0.63",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
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
  };