@capillarytech/creatives-library 2.0.78 → 2.0.80

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 (93) hide show
  1. package/components/CardGrid/index.js +1 -0
  2. package/components/FormBuilder/index.js +2 -2
  3. package/containers/Line/Create/index.js +1 -1
  4. package/containers/MobilePush/Create/selectors.js +1 -1
  5. package/containers/MobilePush/Edit/selectors.js +1 -1
  6. package/containers/Templates/index.js +18 -14
  7. package/containers/WeChat/actions.js +0 -6
  8. package/containers/WeChat/index.js +13 -31
  9. package/index.js +4 -3
  10. package/package.json +1 -1
  11. package/routes.js +4 -4
  12. package/v2Containers/MobilePush/Create/_mobilePushCreate.scss +10 -1
  13. package/v2Containers/MobilePush/Create/index.js +6 -4
  14. package/v2Containers/MobilePush/Create/messages.js +8 -0
  15. package/v2Containers/MobilePush/Create/selectors.js +2 -1
  16. package/v2Containers/MobilePush/Edit/_mobilePushCreate.scss +10 -0
  17. package/v2Containers/MobilePush/Edit/selectors.js +2 -1
  18. package/v2Containers/MobilePush/initialSchema.js +146 -132
  19. package/v2Containers/Templates/index.js +3 -1
  20. package/v2Containers/WeChat/MapTemplates/index.js +5 -5
  21. package/components/FormBuilder/test +0 -1845
  22. package/containers/CallTask/_callTask.scss +0 -5
  23. package/containers/CallTask/actions.js +0 -15
  24. package/containers/CallTask/constants.js +0 -7
  25. package/containers/CallTask/index.js +0 -141
  26. package/containers/CallTask/messages.js +0 -21
  27. package/containers/CallTask/reducer.js +0 -23
  28. package/containers/CallTask/sagas.js +0 -11
  29. package/containers/CallTask/selectors.js +0 -25
  30. package/containers/CallTask/tests/actions.test.js +0 -18
  31. package/containers/CallTask/tests/index.test.js +0 -10
  32. package/containers/CallTask/tests/reducer.test.js +0 -9
  33. package/containers/CallTask/tests/sagas.test.js +0 -15
  34. package/containers/CallTask/tests/selectors.test.js +0 -10
  35. package/containers/ChannelTemplates/actions.js +0 -20
  36. package/containers/ChannelTemplates/constants.js +0 -8
  37. package/containers/ChannelTemplates/index.js +0 -48
  38. package/containers/ChannelTemplates/messages.js +0 -13
  39. package/containers/ChannelTemplates/reducer.js +0 -34
  40. package/containers/ChannelTemplates/sagas.js +0 -32
  41. package/containers/ChannelTemplates/selectors.js +0 -25
  42. package/containers/ChannelTemplates/tests/actions.test.js +0 -18
  43. package/containers/ChannelTemplates/tests/index.test.js +0 -10
  44. package/containers/ChannelTemplates/tests/reducer.test.js +0 -9
  45. package/containers/ChannelTemplates/tests/sagas.test.js +0 -15
  46. package/containers/ChannelTemplates/tests/selectors.test.js +0 -10
  47. package/containers/CreativesContainer/SlideBoxContent.js +0 -248
  48. package/containers/CreativesContainer/SlideBoxFooter.js +0 -38
  49. package/containers/CreativesContainer/SlideBoxHeader.js +0 -65
  50. package/containers/CreativesContainer/actions.js +0 -27
  51. package/containers/CreativesContainer/constants.js +0 -13
  52. package/containers/CreativesContainer/index.js +0 -418
  53. package/containers/CreativesContainer/index.scss +0 -27
  54. package/containers/CreativesContainer/messages.js +0 -17
  55. package/containers/CreativesContainer/reducer.js +0 -29
  56. package/containers/CreativesContainer/sagas.js +0 -11
  57. package/containers/CreativesContainer/selectors.js +0 -30
  58. package/containers/CreativesContainer/tests/actions.test.js +0 -18
  59. package/containers/CreativesContainer/tests/index.test.js +0 -10
  60. package/containers/CreativesContainer/tests/reducer.test.js +0 -9
  61. package/containers/CreativesContainer/tests/sagas.test.js +0 -15
  62. package/containers/CreativesContainer/tests/selectors.test.js +0 -10
  63. package/containers/EmailWrapper/actions.js +0 -15
  64. package/containers/EmailWrapper/constants.js +0 -7
  65. package/containers/EmailWrapper/index.js +0 -238
  66. package/containers/EmailWrapper/messages.js +0 -57
  67. package/containers/EmailWrapper/reducer.js +0 -23
  68. package/containers/EmailWrapper/sagas.js +0 -11
  69. package/containers/EmailWrapper/selectors.js +0 -25
  70. package/containers/EmailWrapper/tests/actions.test.js +0 -18
  71. package/containers/EmailWrapper/tests/index.test.js +0 -10
  72. package/containers/EmailWrapper/tests/reducer.test.js +0 -9
  73. package/containers/EmailWrapper/tests/sagas.test.js +0 -15
  74. package/containers/EmailWrapper/tests/selectors.test.js +0 -10
  75. package/containers/MobilePush/commonMethods.js +0 -249
  76. package/containers/MobilePush/eventsMap.js +0 -127
  77. package/containers/MobilePush/initialSchema.js +0 -1739
  78. package/containers/MobilepushWrapper/_mobilepushWrapper.scss +0 -18
  79. package/containers/MobilepushWrapper/index.js +0 -97
  80. package/containers/MobilepushWrapper/messages.js +0 -25
  81. package/containers/MobilepushWrapper/tests/index.test.js +0 -10
  82. package/containers/TemplatesV2/_templatesV2.scss +0 -5
  83. package/containers/TemplatesV2/actions.js +0 -16
  84. package/containers/TemplatesV2/constants.js +0 -10
  85. package/containers/TemplatesV2/index.js +0 -207
  86. package/containers/TemplatesV2/messages.js +0 -29
  87. package/containers/TemplatesV2/selectors.js +0 -25
  88. package/containers/TemplatesV2/tests/actions.test.js +0 -18
  89. package/containers/TemplatesV2/tests/index.test.js +0 -10
  90. package/containers/TemplatesV2/tests/reducer.test.js +0 -9
  91. package/containers/TemplatesV2/tests/sagas.test.js +0 -15
  92. package/containers/TemplatesV2/tests/selectors.test.js +0 -10
  93. package/containers/WeChat/RichmediaTemplates/Create/testschema.js +0 -379
@@ -71,6 +71,7 @@ CardGrid.defaultProps = {
71
71
  gutterSize: 16,
72
72
  colNumber: 4,
73
73
  className: '',
74
+ isLoading: false,
74
75
  };
75
76
 
76
77
  export default CardGrid;
@@ -432,7 +432,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
432
432
  if (this.props.schema.channel === 'SMS') {
433
433
 
434
434
  for (let count = 0; count < this.state.tabCount; count += 1) {
435
- if (_.isEmpty(errorData[count]) && this.props.isNewVersionFlow) {
435
+ if (_.isEmpty(errorData[count])) {
436
436
  return;
437
437
  }
438
438
  const index = count + 1;
@@ -2079,7 +2079,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
2079
2079
  const fileParams = {
2080
2080
  width: this.width,
2081
2081
  height: this.height,
2082
- error: file.size / (1e+6) > 5,
2082
+ error: file.size / (1e+6) > 3,
2083
2083
  };
2084
2084
  this.callChildEvent({file, type: 'image', fileParams}, val, val.submitAction);
2085
2085
  };
@@ -679,7 +679,7 @@ export class Line extends Component {
679
679
  console.log("schema line", schema);
680
680
  if (this.props.location.query.type === 'embedded' && this.props.location.query.module === 'loyalty') {
681
681
  schema.standalone.sections.splice(0, 1);
682
- } else if (this.props.location.query.type === 'embedded' && typeof this.props.location.query.mode !== 'undefined') {
682
+ } else if (this.props.location.query.type === 'embedded' && typeof this.props.location.query.module !== 'undefined') {
683
683
  delete schema.standalone;
684
684
  } else {
685
685
  schema.standalone.sections.splice(1, 1);
@@ -3,7 +3,7 @@ import { createSelector } from 'reselect';
3
3
  /**
4
4
  * Direct selector to the create state domain
5
5
  */
6
- const selectPushMessageCreateDomain = () => (state) => state.get('create');
6
+ const selectPushMessageCreateDomain = () => (state) => state.get('mobileCreate');
7
7
 
8
8
  /**
9
9
  * Other specific selectors
@@ -3,7 +3,7 @@ import { createSelector } from 'reselect';
3
3
  /**
4
4
  * Direct selector to the create state domain
5
5
  */
6
- const selectMobilePushEditDomain = () => (state) => state.get('edit');
6
+ const selectMobilePushEditDomain = () => (state) => state.get('mobileEdit');
7
7
 
8
8
  /**
9
9
  * Other specific selectors
@@ -1240,6 +1240,21 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
1240
1240
  }
1241
1241
  }
1242
1242
 
1243
+ isLoading = () => {
1244
+ const lineLoader = (this.props.Templates.getAllTemplatesInProgress && this.state.channel.toLowerCase() === 'line');
1245
+ const smsLoader = (this.props.Templates.getAllTemplatesInProgress && this.state.channel.toLowerCase() === 'sms');
1246
+ const wechatLoader = (((this.state.selectedAccount !== '' && this.props.Templates.getAllTemplatesInProgress) || (this.props.Templates.fetchingWeCrmAccounts)) && this.state.channel.toLowerCase() === 'wechat');
1247
+ const mobilePushLoader = (((this.props.Templates.getAllTemplatesInProgress) || (this.props.Templates.fetchingWeCrmAccounts)) && this.state.channel.toLowerCase() === 'mobilepush');
1248
+ const emailLoader = ((this.props.Templates.getAllTemplatesInProgress || this.props.Templates.sendingFile) && this.state.channel.toLowerCase() === 'email');
1249
+ const ebillLoader = ((this.props.Templates.getAllTemplatesInProgress || this.props.Templates.sendingFile) && this.state.channel.toLowerCase() === 'ebill');
1250
+ const isLoading = ((wechatLoader !== undefined) ? wechatLoader : false) ||
1251
+ (smsLoader !== undefined ? smsLoader : false) ||
1252
+ (emailLoader !== undefined ? emailLoader : false) ||
1253
+ (ebillLoader !== undefined ? ebillLoader : false) ||
1254
+ (mobilePushLoader !== undefined ? mobilePushLoader : false) ||
1255
+ (lineLoader !== undefined ? lineLoader : false);
1256
+ return isLoading;
1257
+ }
1243
1258
  renderDeleteConfirmationModal = () => {
1244
1259
  const modal =
1245
1260
  (<Modal
@@ -1259,6 +1274,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
1259
1274
  return modal;
1260
1275
  };
1261
1276
 
1277
+
1262
1278
  renderEmailPreviewModal() {
1263
1279
  const slideboxContent = (
1264
1280
  <div style={{height: "75vh", width: '55vw'}}>
@@ -1276,7 +1292,6 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
1276
1292
  />
1277
1293
  );
1278
1294
  }
1279
-
1280
1295
  render() {
1281
1296
  let pageHeaderText = '';
1282
1297
  const moduleName = this.props.location.query.module;
@@ -1492,18 +1507,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
1492
1507
  }
1493
1508
  }
1494
1509
 
1495
- const lineLoader = (this.props.Templates.getAllTemplatesInProgress && this.state.channel.toLowerCase() === 'line');
1496
- const smsLoader = (this.props.Templates.getAllTemplatesInProgress && this.state.channel.toLowerCase() === 'sms');
1497
- const wechatLoader = (((this.state.selectedAccount !== '' && this.props.Templates.getAllTemplatesInProgress) || (this.props.Templates.fetchingWeCrmAccounts)) && this.state.channel.toLowerCase() === 'wechat');
1498
- const mobilePushLoader = (((this.props.Templates.getAllTemplatesInProgress) || (this.props.Templates.fetchingWeCrmAccounts)) && this.state.channel.toLowerCase() === 'mobilepush');
1499
- const emailLoader = ((this.props.Templates.getAllTemplatesInProgress || this.props.Templates.sendingFile) && this.state.channel.toLowerCase() === 'email');
1500
- const ebillLoader = ((this.props.Templates.getAllTemplatesInProgress || this.props.Templates.sendingFile) && this.state.channel.toLowerCase() === 'ebill');
1501
- const isLoading = ((wechatLoader !== undefined) ? wechatLoader : false) ||
1502
- (smsLoader !== undefined ? smsLoader : false) ||
1503
- (emailLoader !== undefined ? emailLoader : false) ||
1504
- (ebillLoader !== undefined ? ebillLoader : false) ||
1505
- (mobilePushLoader !== undefined ? mobilePushLoader : false) ||
1506
- (lineLoader !== undefined ? lineLoader : false);
1510
+
1507
1511
  let previewHeader = this.props.intl.formatMessage(messages.preview);
1508
1512
  // const previewHeader = (this.state.channel.toLowerCase() === 'email' ? <h3>{this.props.intl.formatMessage(messages.emailPreview)}</h3> : <h3>{this.props.intl.formatMessage(messages.ebillPreview)}</h3>);
1509
1513
  if (this.state.channel.toLowerCase() === 'email' || this.state.channel.toLowerCase() === 'ebill') {
@@ -1538,7 +1542,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
1538
1542
  <div>
1539
1543
  <Spin
1540
1544
  tip={(this.props.Templates.sendingFile && (this.state.channel.toLowerCase() === 'email' || this.state.channel.toLowerCase() === 'ebill')) ? this.props.intl.formatMessage(messages.uploadingFile) : this.props.intl.formatMessage(messages.gettingAllTemplates)}
1541
- spinning={isLoading}
1545
+ spinning={this.isLoading()}
1542
1546
  >
1543
1547
  <input type="file" id="filename" style={{ display: 'none'}} accept=".zip, .html, .htm" onChange={(event) => this.handleFileUpload(event, {files: event.target.files})} />
1544
1548
  <Row>
@@ -44,9 +44,3 @@ export function getTemplateDetails(id) {
44
44
  type: types.GET_TEMPLATE_DETAILS_REQUEST, id,
45
45
  };
46
46
  }
47
- export function setTemplateDetails(templateDetails) {
48
- return {
49
- type: types.GET_TEMPLATE_DETAILS_SUCCESS,
50
- data: templateDetails,
51
- };
52
- }
@@ -4,14 +4,13 @@
4
4
  *
5
5
  */
6
6
 
7
- import PropTypes from 'prop-types';
8
-
9
- import React from 'react';
7
+ import React, { PropTypes } from 'react';
10
8
  import { connect } from 'react-redux';
11
9
  import { bindActionCreators } from 'redux';
12
10
  import Helmet from 'react-helmet';
13
11
  import { injectIntl, intlShape } from 'react-intl';
14
12
  import { createStructuredSelector } from 'reselect';
13
+ // import { CapButton, CapSelect } from '@capillarytech/cap-react-ui-library';
15
14
  import { Row, Col, Spin } from 'antd';
16
15
  import _ from 'lodash';
17
16
  import { makeSelectTemplates } from '../Templates/selectors';
@@ -22,12 +21,10 @@ import * as actions from './actions';
22
21
  import FormBuilder from '../../components/FormBuilder';
23
22
  import { UserIsAuthenticated } from '../../utils/authWrapper';
24
23
  import * as globalActions from '../../containers/Cap/actions';
25
- import * as templateActions from '../../containers/Templates/actions';
26
24
  import {getMessageObject} from '../../utils/messageUtils';
27
25
  // import SlideBox from '../../components/SlideBox';
28
26
  // import PageHeader from '../../components/PageHeader';
29
27
  import './_wechat.scss';
30
- import callNativeEvent from '../../utils/callNativeEvent';
31
28
 
32
29
  // const Option = Select.Option;
33
30
 
@@ -404,7 +401,6 @@ export class WeChat extends React.Component { // eslint-disable-line react/prefe
404
401
  sortBy: 'Most Recent',
405
402
  wecrmId: this.props.Templates.selectedWeChatAccount.configs.wecrm_app_id,
406
403
  wecrmToken: this.props.Templates.selectedWeChatAccount.configs.wecrm_token,
407
- originalId: this.props.Templates.selectedWeChatAccount.sourceAccountIdentifier,
408
404
  };
409
405
  this.props.actions.getDefaultWeChatTemplates('wechat', params);
410
406
  } else {
@@ -437,7 +433,7 @@ export class WeChat extends React.Component { // eslint-disable-line react/prefe
437
433
  }
438
434
 
439
435
  componentWillReceiveProps(nextProps) {
440
- if (nextProps.isGetFormData) {
436
+ if (nextProps.location.query.module === 'library' && nextProps.isGetFormData) {
441
437
  this.getFormData();
442
438
  }
443
439
  console.log('MetaEntity nextprops ', nextProps.metaEntities);
@@ -485,7 +481,7 @@ export class WeChat extends React.Component { // eslint-disable-line react/prefe
485
481
  this.setState({isEdit: true});
486
482
  }
487
483
  if (this.state.isEdit && _.isEmpty(this.state.editTemplateData) && !_.isEmpty(nextProps.WeChat.weChatTemplates)) {
488
- const templateIndex = _.findIndex(nextProps.WeChat.weChatTemplates, {_id: nextProps.params.id});
484
+ const templateIndex = _.findIndex(nextProps.WeChat.weChatTemplates, {"_id": nextProps.params.id});
489
485
  this.setState({editTemplateData: nextProps.WeChat.weChatTemplates[templateIndex]}, () => {
490
486
  if (_.isEmpty(this.state.baseSchema)) {
491
487
  this.setState({ baseSchema: _.cloneDeep(this.state.schema)}, () => {
@@ -545,7 +541,6 @@ export class WeChat extends React.Component { // eslint-disable-line react/prefe
545
541
  sortBy: 'Most Recent',
546
542
  wecrmId: nextProps.WeChat.selectedWeChatAccount.configs.wecrm_app_id,
547
543
  wecrmToken: nextProps.WeChat.selectedWeChatAccount.configs.wecrm_token,
548
- originalId: nextProps.WeChat.selectedWeChatAccount.sourceAccountIdentifier,
549
544
  };
550
545
  this.props.actions.getDefaultWeChatTemplates('wechat', params);
551
546
  }
@@ -602,11 +597,11 @@ export class WeChat extends React.Component { // eslint-disable-line react/prefe
602
597
  componentWillUnmount() {
603
598
  console.log('removed listener create');
604
599
  window.removeEventListener("message", this.handleFrameTasks);
605
- this.props.templateActions.resetTemplate();
606
600
  this.resetState();
607
601
  }
608
602
 
609
603
  onFormDataChange(formData) {
604
+ console.log('Form Data Change ', formData);
610
605
  let selectedWechatTemplateIndex = -1;
611
606
  let selectedTemplate = {};
612
607
  let selectedTemplateData = {};
@@ -645,7 +640,6 @@ export class WeChat extends React.Component { // eslint-disable-line react/prefe
645
640
  selectedWechatTemplateIndex = _.findIndex(this.props.WeChat.weChatDefaultTemplate, {template_id: formData['wechat-template']});
646
641
  selectedTemplate = this.props.WeChat.weChatDefaultTemplate[selectedWechatTemplateIndex];
647
642
  }
648
-
649
643
  if (!_.isEqual(formData['wechat-template'], this.state.formData['wechat-template'])) {
650
644
  this.updateSchema = true;
651
645
  }
@@ -698,8 +692,8 @@ export class WeChat extends React.Component { // eslint-disable-line react/prefe
698
692
  console.log('posting final result', this.state.formData, this.state.editTemplateData);
699
693
  const selectedWeChatAccount = (!_.isEmpty(this.props.Templates.selectedWeChatAccount) ? this.props.Templates.selectedWeChatAccount : this.props.WeChat.selectedWeChatAccount);
700
694
  const data = {
701
- template_id: this.state.editTemplateData.versions.base.template_id,
702
- Title: this.state.editTemplateData.versions.base.Title,
695
+ "template_id": this.state.editTemplateData.versions.base.template_id,
696
+ "Title": this.state.editTemplateData.versions.base.Title,
703
697
  Tag: [],
704
698
  url: this.state.formData['is-internal-url'] ? this.maskTemplateUrl(this.state.formData['template-link']) : this.state.formData['template-link'],
705
699
  TopColor: "#000000",
@@ -710,7 +704,6 @@ export class WeChat extends React.Component { // eslint-disable-line react/prefe
710
704
  content: this.state.editTemplateData.versions.base.content,
711
705
  isInternalUrl: this.state.formData['is-internal-url'],
712
706
  creative_template_id: this.state.editTemplateData._id,
713
- touser: "{{wechat_open_id}}",
714
707
  };
715
708
  _.forEach(this.state.selectedTemplateTags, (templateTag) => {
716
709
  const tagName = templateTag.substr(0, templateTag.indexOf('.'));
@@ -1153,15 +1146,10 @@ export class WeChat extends React.Component { // eslint-disable-line react/prefe
1153
1146
 
1154
1147
  setTemplateOptions(weChatData) {
1155
1148
  console.log('Set Templates ', weChatData);
1156
- //const {schema, baseSchema} = this.state;
1157
- const schema = _.cloneDeep(this.state.schema);
1158
- const baseSchema = _.cloneDeep(this.state.baseSchema);
1149
+ const {schema, baseSchema} = this.state;
1150
+ // const schema = _.cloneDeep(this.state.schema);
1151
+ // const baseSchema = _.cloneDeep(this.state.baseSchema);
1159
1152
  const baseSchemaTemplateOptionEmpty = (!_.isEmpty(baseSchema) && _.isEmpty(baseSchema.standalone.sections[0].childSections[1].childSections[0].childSections[0].inputFields[1].options));
1160
- schema.standalone.sections[0].childSections[1].childSections[0].childSections[0].inputFields[1].options = [];
1161
- if (!_.isEmpty(baseSchema)) {
1162
- baseSchema.standalone.sections[0].childSections[1].childSections[0].childSections[0].inputFields[1].options = [];
1163
-
1164
- }
1165
1153
  _.forEach(weChatData, (template) => {
1166
1154
  schema.standalone.sections[0].childSections[1].childSections[0].childSections[0].inputFields[1].options.push({
1167
1155
  key: (template.versions) ? template.versions.base.template_id : template.template_id,
@@ -1296,7 +1284,7 @@ export class WeChat extends React.Component { // eslint-disable-line react/prefe
1296
1284
  myField.value += myValue;
1297
1285
  }
1298
1286
  const event = new Event('input', { bubbles: true });
1299
- callNativeEvent({field, value: myField.value, event});
1287
+ myField.dispatchEvent(event);
1300
1288
  }
1301
1289
 
1302
1290
  internalUrlChecked() {
@@ -1558,10 +1546,6 @@ export class WeChat extends React.Component { // eslint-disable-line react/prefe
1558
1546
  // value: 'Test3',
1559
1547
  // },
1560
1548
  // ];
1561
- let tags = this.props.metaEntities && this.props.metaEntities.tags ? this.props.metaEntities.tags.standard : [];
1562
- if (this.props.supportedTags) {
1563
- tags = this.props.supportedTags;
1564
- }
1565
1549
  return (
1566
1550
  <Spin
1567
1551
  tip={this.props.intl.formatMessage(messages.gettingTemplateData)}
@@ -1570,6 +1554,7 @@ export class WeChat extends React.Component { // eslint-disable-line react/prefe
1570
1554
  <Helmet
1571
1555
  title="WeChat"
1572
1556
  />
1557
+ {/* <CapSelect options={options} /> */}
1573
1558
  <Row className="wechat-container">
1574
1559
  <Col>
1575
1560
  <FormBuilder
@@ -1583,7 +1568,7 @@ export class WeChat extends React.Component { // eslint-disable-line react/prefe
1583
1568
  formData={_.cloneDeep(this.state.formData)}
1584
1569
  onFormValidityChange={this.setFormValidity}
1585
1570
  location= {this.props.location}
1586
- tags={tags}
1571
+ tags={this.props.metaEntities && this.props.metaEntities.tags ? this.props.metaEntities.tags.standard : []}
1587
1572
  tagModule={this.props.getDefaultTags}
1588
1573
  injectedTags={this.state.injectedTags ? this.state.injectedTags : {}}
1589
1574
  isEdit={this.state.isEdit}
@@ -1614,8 +1599,6 @@ WeChat.propTypes = {
1614
1599
  isGetFormData: PropTypes.bool,
1615
1600
  getLibraryFormData: PropTypes.func,
1616
1601
  getDefaultTags: PropTypes.string,
1617
- templateData: PropTypes.object,
1618
- templateActions: PropTypes.object,
1619
1602
  };
1620
1603
 
1621
1604
  const mapStateToProps = createStructuredSelector({
@@ -1628,7 +1611,6 @@ function mapDispatchToProps(dispatch) {
1628
1611
  return {
1629
1612
  actions: bindActionCreators(actions, dispatch),
1630
1613
  globalActions: bindActionCreators(globalActions, dispatch),
1631
- templateActions: bindActionCreators(templateActions, dispatch),
1632
1614
  };
1633
1615
  }
1634
1616
 
package/index.js CHANGED
@@ -23,9 +23,9 @@ import CallTask from './v2Containers/CallTask/index';
23
23
  import callTaskReducer from './v2Containers/CallTask/reducer';
24
24
  import callTaskSaga from './v2Containers/CallTask/sagas';
25
25
 
26
- import WeChat from './containers/WeChat/MapTemplates';
27
- import wechatReduce from './containers/WeChat/MapTemplates/reducer';
28
- import wechatSaga from './containers/WeChat/MapTemplates/sagas';
26
+ import WeChat from './v2Containers/WeChat/MapTemplates';
27
+ import wechatReduce from './v2Containers/WeChat/MapTemplates/reducer';
28
+ import wechatSaga from './v2Containers/WeChat/MapTemplates/sagas';
29
29
 
30
30
  import MobilepushCreate from './v2Containers/MobilePush/Create';
31
31
  import mobilepushCreateReducer from './v2Containers/MobilePush/Create/reducer';
@@ -96,4 +96,5 @@ export { CapContainer,
96
96
  MobilePushEditContainer,
97
97
  TemplatesV2Container,
98
98
  CreativesContainer,
99
+ WeChat,
99
100
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "2.0.78",
4
+ "version": "2.0.80",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
package/routes.js CHANGED
@@ -612,10 +612,10 @@ export default function createRoutes(store) {
612
612
  import('v2Containers/Email/sagas'),
613
613
  import('v2Containers/CallTask/reducer'),
614
614
  import('v2Containers/CallTask/sagas'),
615
- import('v2Containers/Mobilepush/Create/sagas'),
616
- import('v2Containers/Mobilepush/Create/reducer'),
617
- import('v2Containers/Mobilepush/Edit/sagas'),
618
- import('v2Containers/Mobilepush/Edit/reducer'),
615
+ import('v2Containers/MobilePush/Create/sagas'),
616
+ import('v2Containers/MobilePush/Create/reducer'),
617
+ import('v2Containers/MobilePush/Edit/sagas'),
618
+ import('v2Containers/MobilePush/Edit/reducer'),
619
619
  import('v2Containers/Assets/Gallery/reducer'),
620
620
  import('v2Containers/Assets/Gallery/sagas'),
621
621
  ]);
@@ -35,7 +35,16 @@
35
35
  }
36
36
  }
37
37
  }
38
-
38
+ .tag-container{
39
+ .ant-col{
40
+ button{
41
+ float: right;
42
+ top: 8px;
43
+ z-index: 100;
44
+ padding: unset !important;;
45
+ }
46
+ }
47
+ }
39
48
 
40
49
 
41
50
  }
@@ -14,7 +14,7 @@ import {get, set, filter, isEmpty, map, forEach, uniqueId, cloneDeep, isEqual, f
14
14
  import { createStructuredSelector } from 'reselect';
15
15
  import { injectIntl, intlShape, FormattedMessage } from 'react-intl';
16
16
  import styled from 'styled-components';
17
- import { CapSlideBox, CapHeader, CapTable, CapLink, CapRow, CapColumn, CapIcons, CapSpin} from '@capillarytech/cap-ui-library';
17
+ import { CapSlideBox, CapHeader, CapTable, CapLink, CapRow, CapColumn, CapIcons, CapSpin, CapNotification } from '@capillarytech/cap-ui-library';
18
18
  import { makeSelectCreate, makeSelectCreateResponse, makeSelectIosCta } from './selectors';
19
19
  import { makeSelectMetaEntities, setInjectedTags } from '../../Cap/selectors';
20
20
  import * as globalActions from '../../../containers/Cap/actions';
@@ -1260,8 +1260,11 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
1260
1260
  };
1261
1261
  uploadImage = (data) => {
1262
1262
  if (data.fileParams.error) {
1263
- const message = getMessageObject('error', this.props.intl.formatMessage(messages["File size cannot be more than 5mb"]), true);
1264
- this.props.globalActions.addMessageToQueue(message);
1263
+ CapNotification.error({
1264
+ message: this.props.intl.formatMessage(messages.uploadImageSizeErrorTitle),
1265
+ description: this.props.intl.formatMessage(messages.uploadImageSizeErrorDescription),
1266
+ duration: 2,
1267
+ });
1265
1268
  } else {
1266
1269
  const name = data.file.name.split('.');
1267
1270
  const blob = data.file.slice(0, -1, 'image');
@@ -1351,7 +1354,6 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
1351
1354
  };
1352
1355
  saveFormData = (formData) => {
1353
1356
  const obj = this.getTransformedData(formData);
1354
-
1355
1357
  this.props.actions.createTemplate(obj);
1356
1358
  };
1357
1359
  deleteSecondaryCtaIos = (callback) => {
@@ -238,4 +238,12 @@ export default defineMessages({
238
238
  id: 'app.containers.MobilePush.Create.mobilePush',
239
239
  defaultMessage: 'Select action buttons',
240
240
  },
241
+ "uploadImageSizeErrorTitle": {
242
+ id: 'app.containers.MobilePush.Create.uploadImageSizeErrorTitle',
243
+ defaultMessage: 'File size error',
244
+ },
245
+ "uploadImageSizeErrorDescription": {
246
+ id: 'app.containers.MobilePush.Create.uploadImageSizeErrorDescription',
247
+ defaultMessage: 'File size cannot be more than 3mb',
248
+ },
241
249
  });
@@ -1,9 +1,10 @@
1
1
  import { createSelector } from 'reselect';
2
+ import { fromJS } from 'immutable';
2
3
 
3
4
  /**
4
5
  * Direct selector to the create state domain
5
6
  */
6
- const selectPushMessageCreateDomain = () => (state) => state.get('mobileCreate');
7
+ const selectPushMessageCreateDomain = () => (state) => state.get('mobileCreate') || fromJS({});
7
8
  /**
8
9
  * Other specific selectors
9
10
  */
@@ -34,5 +34,15 @@
34
34
  }
35
35
  }
36
36
  }
37
+ .tag-container{
38
+ .ant-col{
39
+ button{
40
+ float: right;
41
+ top: 8px;
42
+ z-index: 100;
43
+ padding: unset !important;;
44
+ }
45
+ }
46
+ }
37
47
 
38
48
  }
@@ -1,9 +1,10 @@
1
1
  import { createSelector } from 'reselect';
2
+ import { fromJS } from 'immutable';
2
3
 
3
4
  /**
4
5
  * Direct selector to the create state domain
5
6
  */
6
- const selectMobilePushEditDomain = () => (state) => state.get('mobileEdit'); // reducer injected as mobileEdit in library mode.
7
+ const selectMobilePushEditDomain = () => (state) => state.get('mobileEdit') || fromJS({}); // reducer injected as mobileEdit in library mode.
7
8
 
8
9
 
9
10
  /**