@capillarytech/creatives-library 6.9.0 → 6.9.1

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": "6.9.0",
4
+ "version": "6.9.1",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -5,7 +5,6 @@
5
5
  */
6
6
  import React, { useEffect, useState, useRef, useCallback } from 'react';
7
7
  import PropTypes from 'prop-types';
8
- import get from 'lodash/get';
9
8
  import { injectIntl, intlShape, FormattedMessage } from 'react-intl';
10
9
  import TagList from '../../v2Containers/TagList';
11
10
  import
@@ -17,6 +16,7 @@ import
17
16
  }
18
17
  from '@capillarytech/cap-ui-library';
19
18
  import messages from './messages';
19
+ import './index.scss';
20
20
 
21
21
  function BeeEditor(props) {
22
22
  const {
@@ -72,7 +72,7 @@ function BeeEditor(props) {
72
72
  resolve({
73
73
  type: 'custom',
74
74
  label: UNSUBSCRIBE,
75
- link: `<a href='{{${UNSUBSCRIBE}}}'>unsubscribe</a>`,
75
+ link: `{{${UNSUBSCRIBE}}}`,
76
76
  });
77
77
  },
78
78
  },
@@ -241,7 +241,13 @@ function BeeEditor(props) {
241
241
  selectedOfferDetails={selectedOfferDetails}
242
242
  visibleTaglist={visibleTaglist}
243
243
  hidePopover
244
- modalProps={{onCancel: onCancelTagList, style: { left: 200, top: 250 }}}
244
+ modalProps={
245
+ {
246
+ onCancel: onCancelTagList,
247
+ style: { left: 200, top: 250 },
248
+ className: "bee-editor-tag-list"
249
+ }
250
+ }
245
251
  onContextChange={onContextChange}
246
252
  />
247
253
  <CapModal
@@ -0,0 +1,11 @@
1
+ .cap-modal-v2.bee-editor-tag-list {
2
+ .ant-modal-content {
3
+ .ant-modal-body {
4
+ padding-top: 20px;
5
+ padding-bottom: 10px;
6
+ }
7
+ .ant-modal-footer {
8
+ display: none;
9
+ }
10
+ }
11
+ }
@@ -9,8 +9,8 @@
9
9
 
10
10
  #emailPreivew-container {
11
11
  position: relative;
12
- left: 20vw;
13
- width: 80vw;
12
+ left: 18vw;
13
+ width: 82vw;
14
14
  height: 100vh;
15
15
  background: rgba(255,255,255,1);
16
16
  // padding: 0 24px 0 24px;
@@ -2791,7 +2791,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
2791
2791
  show={this.state.showImageSelectionBox}
2792
2792
  handleClose={this.handleImagePreviewClose}
2793
2793
  isLoading={this.props.Email.fetchingAllAssets}
2794
- size="size-l"
2794
+ size="size-xl"
2795
2795
  />
2796
2796
  {/* <div id="bee-plugin-container" style={{ height: '600px'}}></div> */}
2797
2797
  {this.state.showConfirmationModal && this.renderConfirmationModal()}
@@ -380,7 +380,7 @@ export const response = {
380
380
  styling: "semantic",
381
381
  order: 3,
382
382
  width: 2,
383
- offset: 1,
383
+ offset: 4,
384
384
  fluid: false,
385
385
  onlyDisplay: true,
386
386
  submitAction: "onTabOptionSelect",
@@ -214,6 +214,7 @@ export class EmailWrapper extends React.Component { // eslint-disable-line react
214
214
  value={templateName}
215
215
  labelPosition="top"
216
216
  size="default"
217
+ style={{ width: '68%'}}
217
218
  />
218
219
  }
219
220
  <CardContainer>
@@ -1510,12 +1510,23 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
1510
1510
 
1511
1511
 
1512
1512
  isLoading = () => {
1513
- const lineLoader = (this.props.Templates.getAllTemplatesInProgress && this.state.channel.toLowerCase() === 'line');
1514
- const smsLoader = (this.props.Templates.getAllTemplatesInProgress && this.state.channel.toLowerCase() === 'sms');
1515
- const wechatLoader = (((this.state.selectedAccount !== '' && this.props.Templates.getAllTemplatesInProgress) || (this.props.Templates.fetchingWeCrmAccounts)) && this.state.channel.toLowerCase() === 'wechat');
1516
- const mobilePushLoader = (((this.props.Templates.getAllTemplatesInProgress) || (this.props.Templates.fetchingWeCrmAccounts)) && this.state.channel.toLowerCase() === 'mobilepush');
1517
- const emailLoader = ((this.props.Templates.getAllTemplatesInProgress || this.props.Templates.sendingFile) && this.state.channel.toLowerCase() === 'email');
1518
- const ebillLoader = ((this.props.Templates.getAllTemplatesInProgress || this.props.Templates.sendingFile) && this.state.channel.toLowerCase() === 'ebill');
1513
+ const { EmailCreate, Templates } = this.props;
1514
+ const {
1515
+ getAllTemplatesInProgress,
1516
+ deleteTemplateInProgress,
1517
+ fetchingWeCrmAccounts,
1518
+ sendingFile,
1519
+ } = Templates;
1520
+ const lineLoader = (getAllTemplatesInProgress && this.state.channel.toLowerCase() === 'line');
1521
+ const smsLoader = (getAllTemplatesInProgress && this.state.channel.toLowerCase() === 'sms');
1522
+ const wechatLoader = (((this.state.selectedAccount !== '' && getAllTemplatesInProgress) || (fetchingWeCrmAccounts)) && this.state.channel.toLowerCase() === 'wechat');
1523
+ const mobilePushLoader = (((getAllTemplatesInProgress) || (fetchingWeCrmAccounts)) && this.state.channel.toLowerCase() === 'mobilepush');
1524
+ const emailLoader = (
1525
+ (getAllTemplatesInProgress ||
1526
+ sendingFile ||
1527
+ deleteTemplateInProgress ||
1528
+ EmailCreate.duplicateTemplateInProgress) && this.state.channel.toLowerCase() === 'email');
1529
+ const ebillLoader = ((getAllTemplatesInProgress || sendingFile) && this.state.channel.toLowerCase() === 'ebill');
1519
1530
  const isLoading = ((wechatLoader !== undefined) ? wechatLoader : false) ||
1520
1531
  (smsLoader !== undefined ? smsLoader : false) ||
1521
1532
  (emailLoader !== undefined ? emailLoader : false) ||
@@ -1827,7 +1838,19 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
1827
1838
  const creativesParams = this.getCreativesParams();
1828
1839
  const templates = this.props.TemplatesList || [];
1829
1840
  const {route} = this.props;
1830
- const loadingTip = (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);
1841
+ const loadingTipMap = {
1842
+ sendingFile: 'uploadingFile',
1843
+ deleteTemplateInProgress: 'deletingTemplate',
1844
+ duplicateTemplateInProgress: 'duplicatingTemplate',
1845
+ };
1846
+ const { sendingFile, deleteTemplateInProgress } = this.props.Templates;
1847
+ const loadingTipIntl =
1848
+ ((['email', 'ebill'].includes(this.state.channel.toLowerCase() === 'email')) && sendingFile && 'sendingFile') ||
1849
+ (deleteTemplateInProgress && 'deletingTemplate') ||
1850
+ (this.props.EmailCreate.duplicateTemplateInProgress && 'duplicatingTemplate');
1851
+
1852
+ const loadingTip = messages[loadingTipIntl] ? this.props.intl.formatMessage(messages[loadingTipIntl]) : this.props.intl.formatMessage(messages.gettingAllTemplates);
1853
+
1831
1854
  return (
1832
1855
  <>
1833
1856
  {activeMode === ACCOUNT_CHANGE_MODE && this.renderAccountSelection()}
@@ -350,4 +350,12 @@ export default defineMessages({
350
350
  id: `${scope}.richMediaTemplates`,
351
351
  defaultMessage: 'Rich media templates',
352
352
  },
353
+ deletingTemplate: {
354
+ id: `${scope}.deletingTemplate`,
355
+ defaultMessage: 'Deleting template...',
356
+ },
357
+ duplicatingTemplate: {
358
+ id: `${scope}.duplicatingTemplate`,
359
+ defaultMessage: 'Duplicating template...'
360
+ },
353
361
  });