@capillarytech/creatives-library 7.17.37-alpha.1 → 7.17.37-alpha.2

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": "7.17.37-alpha.1",
4
+ "version": "7.17.37-alpha.2",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -321,7 +321,7 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
321
321
  trigger="click"
322
322
  placement={translationLang === "ja-JP" && channel === 'EMAIL' ? "bottom" : "rightTop"}
323
323
  >
324
- <CapButton isAddBtn type="flat">{label || ''}</CapButton>
324
+ <CapButton disabled={this?.props?.disabled} isAddBtn type="flat">{label || ''}</CapButton>
325
325
  </CapPopover>
326
326
  }
327
327
  <CapModal
@@ -358,6 +358,7 @@ CapTagList.propTypes = {
358
358
  disableTagsDetails: PropTypes.object,
359
359
  currentOrgDetails: PropTypes.object,
360
360
  channel: PropTypes.string,
361
+ disabled: PropTypes.bool
361
362
  };
362
363
 
363
364
  CapTagList.defaultValue = {
@@ -213,7 +213,7 @@ export function SlideBoxContent(props) {
213
213
  isEmailPreview = slidBoxContent === 'preview' && channel === constants.EMAIL;
214
214
  isMpushPreview = slidBoxContent === 'preview' && channel === constants.MOBILE_PUSH;
215
215
  isEditFTP = isEdit && [constants.NO_COMMUNICATION, constants.FTP].includes(channel);
216
- isEditZalo = isEdit && channel === constants.ZALO
216
+ isEditZalo = isEdit && channel === constants.ZALO;
217
217
  }
218
218
  const isDltEnabled = commonUtil.isTraiDLTEnable(isFullMode, smsRegister);
219
219
  const hasJPLocaleHideFeatureEnabled = commonUtil?.hasJPLocaleHideFeatureEnabled();
@@ -510,11 +510,12 @@ export function SlideBoxContent(props) {
510
510
  {
511
511
  isEditZalo &&
512
512
  <Zalo
513
- templateData={templateData}
514
- location={creativesLocationProps}
515
- selectedOfferDetails={selectedOfferDetails}
516
- getDefaultTags={type}
517
- channel={channel}
513
+ templateData={templateData}
514
+ location={creativesLocationProps}
515
+ selectedOfferDetails={selectedOfferDetails}
516
+ getDefaultTags={type}
517
+ channel={channel}
518
+ isFullMode={isFullMode}
518
519
  />
519
520
  }
520
521
  {
@@ -260,6 +260,7 @@ export class TagList extends React.Component { // eslint-disable-line react/pref
260
260
  modalProps={this.props.modalProps}
261
261
  currentOrgDetails={this.props.currentOrgDetails}
262
262
  channel={this.props.channel}
263
+ disabled={this.props.disabled}
263
264
  />
264
265
  </div>
265
266
  );
@@ -286,6 +287,7 @@ TagList.propTypes = {
286
287
  modalProps: PropTypes.any,
287
288
  currentOrgDetails: PropTypes.object,
288
289
  channel: PropTypes.string,
290
+ disabled: PropTypes.bool
289
291
  };
290
292
 
291
293
  const mapStateToProps = createStructuredSelector({
@@ -4,7 +4,7 @@ import { injectIntl } from "react-intl";
4
4
  import { createStructuredSelector } from "reselect";
5
5
  import { bindActionCreators } from "redux";
6
6
  import { get } from "lodash";
7
- import styled from 'styled-components';
7
+ import styled from "styled-components";
8
8
  import {
9
9
  CapSpin,
10
10
  CapRow,
@@ -21,7 +21,7 @@ import {
21
21
  CAP_SPACE_24,
22
22
  CAP_SPACE_32,
23
23
  CAP_WHITE,
24
- } from '@capillarytech/cap-ui-library/styled/variables';
24
+ } from "@capillarytech/cap-ui-library/styled/variables";
25
25
  import messages from "./messages";
26
26
  import withCreatives from "../../hoc/withCreatives";
27
27
  import {
@@ -48,7 +48,6 @@ import { makeSelectMetaEntities, setInjectedTags } from "../Cap/selectors";
48
48
  import * as globalActions from "../Cap/actions";
49
49
  import { validateTags } from "../../utils/tagValidations";
50
50
 
51
-
52
51
  export const Zalo = ({
53
52
  intl,
54
53
  actions,
@@ -61,13 +60,16 @@ export const Zalo = ({
61
60
  injectedTags,
62
61
  selectedOfferDetails,
63
62
  template,
63
+ isFullMode,
64
64
  }) => {
65
65
  const { formatMessage } = intl;
66
66
  const [zaloTemplateListParams, setZaloTemplateListParams] = useState([]);
67
67
  const [templatePreviewUrl, setTemplatePreviewUrl] = useState("");
68
68
  const [tags, updateTags] = useState([]);
69
69
  const [textAreaId, updateTextAreaId] = useState("");
70
- const [templateStatus, setZaloTemplateStatus] = useState(ZALO_STATUSES.ENABLE);
70
+ const [templateStatus, setZaloTemplateStatus] = useState(
71
+ ZALO_STATUSES.ENABLE
72
+ );
71
73
 
72
74
  const ZaloFooter = styled.div`
73
75
  background-color: ${CAP_WHITE};
@@ -256,6 +258,7 @@ export const Zalo = ({
256
258
  value={value || ""}
257
259
  size="default"
258
260
  onFocus={() => setTextAreaId(name)}
261
+ disabled={isFullMode}
259
262
  />
260
263
  );
261
264
  };
@@ -311,6 +314,7 @@ export const Zalo = ({
311
314
  onContextChange={handleOnTagsContextChange}
312
315
  injectedTags={injectedTags || {}}
313
316
  selectedOfferDetails={selectedOfferDetails}
317
+ disabled={isFullMode}
314
318
  />
315
319
  }
316
320
  />
@@ -340,26 +344,28 @@ export const Zalo = ({
340
344
  </CapRow>
341
345
  </CapRow>
342
346
  </CapColumn>
343
- <CapColumn type="flex" span={10} className="zalo-preview-container">
344
- <CapRow>
345
- <CapLabel className="preview-head">
346
- {formatMessage(messages.previewHead)}
347
- </CapLabel>
348
- </CapRow>
349
- <CapRow>
350
- <CapLabel className="preview-text">
351
- {formatMessage(messages.previewText)}
352
- </CapLabel>
353
- </CapRow>
354
- <CapRow>
355
- <CapLabel
356
- data-testid="preview-link-button"
357
- onClick={handlePreview}
358
- className="preview-link"
359
- >
360
- {formatMessage(messages.openPreview)}{" "}
361
- <CapIcon type="open-in-new-light"></CapIcon>
362
- </CapLabel>
347
+ <CapColumn span={10}>
348
+ <CapRow className="zalo-preview-container">
349
+ <CapRow>
350
+ <CapLabel className="preview-head">
351
+ {formatMessage(messages.previewHead)}
352
+ </CapLabel>
353
+ </CapRow>
354
+ <CapRow>
355
+ <CapLabel className="preview-text">
356
+ {formatMessage(messages.previewText)}
357
+ </CapLabel>
358
+ </CapRow>
359
+ <CapRow>
360
+ <CapLabel
361
+ data-testid="preview-link-button"
362
+ onClick={handlePreview}
363
+ className="preview-link"
364
+ >
365
+ {formatMessage(messages.openPreview)}{" "}
366
+ <CapIcon type="open-in-new-light"></CapIcon>
367
+ </CapLabel>
368
+ </CapRow>
363
369
  </CapRow>
364
370
  </CapColumn>
365
371
  </CapRow>
@@ -42,11 +42,10 @@
42
42
  }
43
43
 
44
44
  .zalo-preview-container {
45
- text-align: center;
46
45
  position: fixed;
47
- right: 0;
48
- padding-left: 194px;
49
- padding-right: 116px;
46
+ text-align: center;
47
+ padding-left: 72px;
48
+ padding-right: 110px;
50
49
 
51
50
  .preview-head {
52
51
  font-weight: 500;