@capillarytech/creatives-library 3.6.5 → 3.6.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "3.6.5",
4
+ "version": "3.6.7",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -251,6 +251,7 @@ export class Gallery extends React.Component { // eslint-disable-line react/pref
251
251
  }
252
252
  }
253
253
  getIllustrationProps={
254
+ buttonClassName: 'upload-image-gallery',
254
255
  buttonLabel: <FormattedMessage {...messages.upload} />,
255
256
  onClick: (e) => this.openFileDialog(e),
256
257
  illustrationImage: imageGalleryIllustration,
@@ -317,6 +318,7 @@ export class Gallery extends React.Component { // eslint-disable-line react/pref
317
318
  title: <span title={template.name} >{template.name}</span>,
318
319
  extra: [
319
320
  <CapIcon
321
+ className="view-gallery"
320
322
  style={{marginRight: '16px'}}
321
323
  type="eye"
322
324
  onClick={() => { this.openPreviewMode(template); }}
@@ -324,7 +326,7 @@ export class Gallery extends React.Component { // eslint-disable-line react/pref
324
326
  <CapDropdown
325
327
  overlay={
326
328
  <CapMenu>
327
- <CapMenu.Item onClick={() => this.deleteAsset(template)}>
329
+ <CapMenu.Item className="delete-gallery" onClick={() => this.deleteAsset(template)}>
328
330
  <FormattedMessage {...messages.delete} />
329
331
  </CapMenu.Item>
330
332
  </CapMenu>
@@ -429,7 +431,7 @@ export class Gallery extends React.Component { // eslint-disable-line react/pref
429
431
  <div style={{ textAlign: 'right', marginTop: '16px', width: '50%'}}>
430
432
  <form encType="multipart/form-data" id="myForm">
431
433
  <input style={{ display: 'none'}} id="fileName" type="file" onChange={(e) => this.uploadImages(e, {files: e.target.files})} accept="image/*" multiple/>
432
- <CapButton type={this.props.location.query.type !== 'embedded' ? 'primary' : 'secondary'} onClick={(e) => this.openFileDialog(e)} style={{float: 'right'}}>
434
+ <CapButton className="upload-image-gallery" type={this.props.location.query.type !== 'embedded' ? 'primary' : 'secondary'} onClick={(e) => this.openFileDialog(e)} style={{float: 'right'}}>
433
435
  <FormattedMessage {...messages.upload} />
434
436
  </CapButton>
435
437
  </form>
@@ -70,7 +70,7 @@ function SlideBoxContent(props) {
70
70
  weChatMaptemplateStep,
71
71
  onWeChatMaptemplateStepChange,
72
72
  onTestContentClicked,
73
- onPreviewContentClicked
73
+ onPreviewContentClicked,
74
74
  onFacebookSubmit,
75
75
  } = props;
76
76
  const type = messageDetails.type.toLowerCase(); // type is context in get tags values : outbound | dvs | referral | loyalty | coupons
@@ -559,21 +559,23 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
559
559
  title: <span title={template.name} >{template.name}</span>,
560
560
  extra: [
561
561
  <CapIcon
562
+ className={`view-${this.state.channel.toLowerCase()}`}
562
563
  style={{marginRight: '16px'}}
563
564
  type="eye"
564
565
  onClick={() => { if (this.props.isFullMode) { handlers.handlePreviewClick(template); } else { this.props.handlePeviewTemplate(template); } }}
565
566
  />,
566
567
  ],
567
- hoverOption: <CapButton onClick={(e) => handlers.handleEditClick(e, template)}>{this.props.intl.formatMessage(this.props.isFullMode ? messages.creativesTemplatesEdit : messages.selectButton)}</CapButton>,
568
+ hoverOption: <CapButton className={this.props.isFullMode ? `edit-${this.state.channel.toLowerCase()}` : `select-${this.state.channel.toLowerCase()}`} onClick={(e) => handlers.handleEditClick(e, template)}>{this.props.intl.formatMessage(this.props.isFullMode ? messages.creativesTemplatesEdit : messages.selectButton)}</CapButton>,
568
569
  };
569
570
  if (this.props.isFullMode) {
570
571
  templateData.extra.push(<CapDropdown
571
572
  overlay={
572
573
  <CapMenu>
573
- {this.state.channel.toUpperCase() !== WECHAT && <CapMenu.Item onClick={() => this.duplicateTemplate(template)}>
574
+ {this.state.channel.toUpperCase() !== WECHAT && <CapMenu.Item className={`duplicate-${this.state.channel.toLowerCase()}`} onClick={() => this.duplicateTemplate(template)}>
574
575
  <FormattedMessage {...messages.duplicateButton} />
575
576
  </CapMenu.Item>}
576
577
  <CapMenu.Item
578
+ className={this.state.channel.toUpperCase() === WECHAT && !template.definition ? `unmap-${this.state.channel.toLowerCase()}` : `delete-${this.state.channel.toLowerCase()}`}
577
579
  onClick={() => this.deleteTemplate(template)}
578
580
  >
579
581
  {this.state.channel.toUpperCase() === WECHAT && !template.definition ? <FormattedMessage {...messages.unMapButton} /> : <FormattedMessage {...messages.deleteButton} />}
@@ -1683,8 +1685,10 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
1683
1685
  </CapLabel></CapRadio.Button>
1684
1686
  </CapRadio.CapRadioGroup>
1685
1687
  }
1688
+
1686
1689
  <div style={{display: "flex", justifyContent: "space-between", alignItems: 'center'}}>
1687
1690
  {isfilterContentVisisble && !isWechatEmbedded && <CapButton
1691
+ className={`create-new-${this.state.channel.toLowerCase()}`}
1688
1692
  type={"primary"}
1689
1693
  disabled={this.isCreateDisabled()}
1690
1694
  style={{marginLeft: '8px'}}
@@ -1,63 +0,0 @@
1
- import { defineMessages } from 'react-intl';
2
- export default defineMessages({
3
- "sms": {
4
- id: 'reon.components.Cap.sms',
5
- defaultMessage: 'SMS',
6
- },
7
- "wechat": {
8
- id: 'reon.components.Cap.wechat',
9
- defaultMessage: 'WeChat',
10
- },
11
- "gallery": {
12
- id: 'reon.components.Cap.gallery',
13
- defaultMessage: 'Gallery',
14
- },
15
- "creativesDashboard": {
16
- id: 'reon.components.Cap.creativesDashboard',
17
- defaultMessage: 'Creatives',
18
- },
19
- "creatives": {
20
- id: 'reon.components.Cap.creatives',
21
- defaultMessage: 'Creatives',
22
- },
23
- "campaigns": {
24
- id: 'reon.components.Cap.campaigns',
25
- defaultMessage: 'Campaigns',
26
- },
27
- "loyalty": {
28
- id: 'reon.components.Cap.loyalty',
29
- defaultMessage: 'Loyalty',
30
- },
31
- "member care": {
32
- id: 'reon.components.Cap.memberCare',
33
- defaultMessage: 'Member Care',
34
- },
35
- "workbench": {
36
- id: 'reon.components.Cap.Workbench',
37
- defaultMessage: 'WorkBench',
38
- },
39
- "store care": {
40
- id: 'reon.components.Cap.storeCare',
41
- defaultMessage: 'Store Care',
42
- },
43
- "store performance": {
44
- id: 'reon.components.Cap.storePerformance',
45
- defaultMessage: 'Store Performance',
46
- },
47
- "email": {
48
- id: 'reon.components.Cap.email',
49
- defaultMessage: 'Email',
50
- },
51
- "ebill": {
52
- id: 'reon.components.Cap.ebill',
53
- defaultMessage: 'Ebill',
54
- },
55
- "campaignsDashboard": {
56
- id: 'reon.components.campaignsDashboard',
57
- defaultMessage: 'Campaigns',
58
- },
59
- "campaignsHome": {
60
- id: 'reon.components.campaignsHome',
61
- defaultMessage: "Campaigns Home",
62
- },
63
- });
@@ -1,46 +0,0 @@
1
- /**
2
- *
3
- * Header
4
- *
5
- */
6
-
7
- import PropTypes from 'prop-types';
8
-
9
- import React from 'react';
10
- // import styled from 'styled-components';
11
- import { FormattedMessage } from 'react-intl';
12
-
13
- import { CapRow, CapColumn, CapInput, CapButton } from '@capillarytech/cap-ui-library';
14
- import messages from './messages';
15
-
16
-
17
- function Header(props) {
18
- return (
19
- <div>
20
- <CapRow className="template-form-header">
21
- <CapColumn span={10}>
22
- <CapInput id="template-name" placeholder="Enter template name*" defaultValue={props.templateName} type="input" onChange={props.templateNameHandler}/>
23
- </CapColumn>
24
- <CapColumn span={2} offset={8}>
25
- <CapButton id="preview-button" type="cancel" onClick={props.previewHandler}> <FormattedMessage {...messages.preview} /> </CapButton>
26
- </CapColumn>
27
- <CapColumn span={2}>
28
- <CapButton id="cancel-button" type="cancel" onClick={props.cancelHandler}> <FormattedMessage {...messages.cancel} /> </CapButton>
29
- </CapColumn>
30
- <CapColumn span={2}>
31
- <CapButton id="save-button" type="primary" onClick={props.saveHandler}> <FormattedMessage {...messages.save} /> </CapButton>
32
- </CapColumn>
33
- </CapRow>
34
- </div>
35
- );
36
- }
37
-
38
- Header.propTypes = {
39
- templateNameHandler: PropTypes.func,
40
- previewHandler: PropTypes.func,
41
- cancelHandler: PropTypes.func,
42
- saveHandler: PropTypes.func,
43
- templateName: PropTypes.string,
44
- };
45
-
46
- export default Header;
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import Header from '../index';
5
-
6
- describe('<Header />', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(false);
9
- });
10
- });
@@ -1,5 +0,0 @@
1
- .cap-tab-v2-wrapper{
2
- .ant-tabs-tabpane {
3
- border: none;
4
- }
5
- }