@capillarytech/creatives-library 7.12.68 → 7.12.70

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.12.68",
4
+ "version": "7.12.70",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -63,11 +63,7 @@ export const CapWhatsappCTA = (props) => {
63
63
  [type]: value,
64
64
  };
65
65
  if (type === 'urlType') {
66
- if (value === STATIC_URL) {
67
- clonedCta.url = '';
68
- } else if (value === DYNAMIC_URL) {
69
- clonedCta.url = '{{1}}';
70
- }
66
+ clonedCta.url = '';
71
67
  setUrlError(false);
72
68
  }
73
69
  updateHandler(clonedCta, index);
@@ -390,7 +386,11 @@ export const CapWhatsappCTA = (props) => {
390
386
  id={index}
391
387
  className="whatsapp-cta-url"
392
388
  onChange={(event) => onUrlChange(event, urlType)}
393
- placeholder={formatMessage(messages.ctaWebsitePlaceholder)}
389
+ placeholder={
390
+ urlType === DYNAMIC_URL
391
+ ? formatMessage(messages.ctaDynamicPlaceholder)
392
+ : formatMessage(messages.ctaStaticPlaceholder)
393
+ }
394
394
  value={url}
395
395
  size="large"
396
396
  maxLength={URL_MAX_LENGTH}
@@ -45,7 +45,7 @@
45
45
  }
46
46
 
47
47
  .whatsapp-cta-tag-revert {
48
- margin-left: 100px;
48
+ margin-left: 90px;
49
49
  margin-top: 2px;
50
50
  transform: scaleX(-1);
51
51
  }
@@ -41,10 +41,14 @@ export default defineMessages({
41
41
  id: `${prefix}.ctaWebsiteUrl`,
42
42
  defaultMessage: 'Website URL',
43
43
  },
44
- ctaWebsitePlaceholder: {
45
- id: `${prefix}.ctaWebsitePlaceholder`,
44
+ ctaStaticPlaceholder: {
45
+ id: `${prefix}.ctaStaticPlaceholder`,
46
46
  defaultMessage: 'Enter website URL',
47
47
  },
48
+ ctaDynamicPlaceholder: {
49
+ id: `${prefix}.ctaDynamicPlaceholder`,
50
+ defaultMessage: 'Enter URL, variable is added by default',
51
+ },
48
52
  ctaWebsiteUrlErrorMessage: {
49
53
  id: `${prefix}.ctaWebsiteUrlErrorMessage`,
50
54
  defaultMessage: 'URL is not valid',
@@ -2,9 +2,10 @@ import React from 'react';
2
2
  import styled from 'styled-components';
3
3
  import { FormattedMessage } from 'react-intl';
4
4
  import get from 'lodash/get';
5
- import { CapHeader, CapIcons, CapLabel, CapLink, CapSteps, CapIcon } from '@capillarytech/cap-ui-library';
5
+ import { CapHeader, CapIcons, CapLabel, CapLink, CapSteps, CapIcon, CapHeading } from '@capillarytech/cap-ui-library';
6
6
  import moment from 'moment';
7
7
  import PropTypes from 'prop-types';
8
+ import './index.scss';
8
9
  import messages from './messages';
9
10
  import whatsppMsg from '../Whatsapp/messages';
10
11
  import { LANGUAGE_OPTIONS } from '../Whatsapp/constants';
@@ -83,7 +84,7 @@ export function SlideBoxHeader(props) {
83
84
  {showTemplateNameHeader && templateNameRenderProp()}
84
85
  {slidBoxContent === 'preview' && (
85
86
  <CapHeader
86
- title={templateData.name}
87
+ title={<CapHeading className='slidebox-header-template-name' type="h1">{templateData.name}</CapHeading>}
87
88
  description={<CapLabel type="label3">
88
89
  <FormattedMessage {...messages.lastUpdated} values={{date: moment(templateData.updatedAt).format('DD MMM YYYY'), user: templateData.updatedByName}}/>
89
90
  </CapLabel>}
@@ -102,7 +103,7 @@ export function SlideBoxHeader(props) {
102
103
  {showTemplateName ? (
103
104
  <>
104
105
  {renderData("label1", <FormattedMessage {...globalMessages.templateNameLabel} />)}
105
- {renderData("label2", templateName)}
106
+ <StyledLabel className='whatsapp-rcs-slidebox-template-name' type="label2">{templateName}</StyledLabel>
106
107
  </>
107
108
  ) : ""}
108
109
  {isWhatsappEdit && (
@@ -42,4 +42,19 @@ $classPrefix: add-creatives-section;
42
42
  .slidebox-header div:first-child {
43
43
  width: 100%;
44
44
  }
45
+ }
46
+
47
+ .slidebox-header-template-name{
48
+ max-width: 750px;
49
+ white-space: nowrap;
50
+ overflow: hidden;
51
+ text-overflow: ellipsis;
52
+ }
53
+ .whatsapp-rcs-slidebox-template-name{
54
+ display: inline-block;
55
+ max-width: 450px;
56
+ white-space: nowrap;
57
+ overflow: hidden;
58
+ text-overflow: ellipsis;
59
+ margin-bottom: -3px;
45
60
  }
@@ -69,7 +69,14 @@ exports[`Test SlideBoxHeader container Should render correct component for rcs c
69
69
  </SlideBoxHeader__PrefixWrapper>
70
70
  }
71
71
  size="large"
72
- title="amit123456"
72
+ title={
73
+ <CapHeading
74
+ className="slidebox-header-template-name"
75
+ type="h1"
76
+ >
77
+ amit123456
78
+ </CapHeading>
79
+ }
73
80
  titleClass=""
74
81
  />
75
82
  </div>
@@ -145,6 +152,7 @@ exports[`Test SlideBoxHeader container Should render correct component for whats
145
152
  />
146
153
  </SlideBoxHeader__StyledLabel>
147
154
  <SlideBoxHeader__StyledLabel
155
+ className="whatsapp-rcs-slidebox-template-name"
148
156
  type="label2"
149
157
  >
150
158
  amit123456
@@ -257,7 +265,14 @@ exports[`Test SlideBoxHeader container Should render correct component for whats
257
265
  </SlideBoxHeader__PrefixWrapper>
258
266
  }
259
267
  size="large"
260
- title="creatives_whatsapp6"
268
+ title={
269
+ <CapHeading
270
+ className="slidebox-header-template-name"
271
+ type="h1"
272
+ >
273
+ creatives_whatsapp6
274
+ </CapHeading>
275
+ }
261
276
  titleClass=""
262
277
  />
263
278
  </div>
@@ -1406,13 +1406,15 @@ export const Whatsapp = (props) => {
1406
1406
  }
1407
1407
  placement={'right'}
1408
1408
  >
1409
- <CapButton
1410
- onClick={saveToMessage}
1411
- disabled={isEditDoneDisabled()}
1412
- className="whatsapp-create-btn"
1413
- >
1414
- <FormattedMessage {...globalMessages.done} />
1415
- </CapButton>
1409
+ <div className="button-disabled-tooltip-wrapper">
1410
+ <CapButton
1411
+ onClick={saveToMessage}
1412
+ disabled={isEditDoneDisabled()}
1413
+ className="whatsapp-create-btn"
1414
+ >
1415
+ <FormattedMessage {...globalMessages.done} />
1416
+ </CapButton>
1417
+ </div>
1416
1418
  </CapTooltip>
1417
1419
  )}
1418
1420
  </WhatsappFooter>
@@ -69,6 +69,7 @@
69
69
  margin-bottom: $CAP_SPACE_08;
70
70
  overflow: hidden;
71
71
  text-overflow: ellipsis;
72
+ color: $FONT_COLOR_04;
72
73
  }
73
74
 
74
75
  .whatsapp-edit-disabled {
@@ -153333,51 +153333,51 @@ Click {{unsubscribe}} to unsubscribe",
153333
153333
  title=""
153334
153334
  visible={false}
153335
153335
  >
153336
- <CapButton
153337
- className="whatsapp-create-btn"
153338
- disabled={false}
153339
- isAddBtn={false}
153336
+ <div
153337
+ className="button-disabled-tooltip-wrapper"
153340
153338
  key="trigger"
153341
- onClick={[Function]}
153342
153339
  onMouseEnter={[Function]}
153343
153340
  onMouseLeave={[Function]}
153344
- type="primary"
153345
153341
  >
153346
- <Button
153347
- block={false}
153348
- className="cap-button-v2 whatsapp-create-btn"
153342
+ <CapButton
153343
+ className="whatsapp-create-btn"
153349
153344
  disabled={false}
153350
- ghost={false}
153351
- htmlType="button"
153352
- loading={false}
153345
+ isAddBtn={false}
153353
153346
  onClick={[Function]}
153354
- onMouseEnter={[Function]}
153355
- onMouseLeave={[Function]}
153356
153347
  type="primary"
153357
153348
  >
153358
- <Wave>
153359
- <button
153360
- className="ant-btn cap-button-v2 whatsapp-create-btn ant-btn-primary"
153361
- disabled={false}
153362
- onClick={[Function]}
153363
- onMouseEnter={[Function]}
153364
- onMouseLeave={[Function]}
153365
- type="button"
153366
- >
153367
- <FormattedMessage
153368
- defaultMessage="Done"
153369
- id="creatives.containersV2.done"
153370
- key=".2"
153371
- values={Object {}}
153349
+ <Button
153350
+ block={false}
153351
+ className="cap-button-v2 whatsapp-create-btn"
153352
+ disabled={false}
153353
+ ghost={false}
153354
+ htmlType="button"
153355
+ loading={false}
153356
+ onClick={[Function]}
153357
+ type="primary"
153358
+ >
153359
+ <Wave>
153360
+ <button
153361
+ className="ant-btn cap-button-v2 whatsapp-create-btn ant-btn-primary"
153362
+ disabled={false}
153363
+ onClick={[Function]}
153364
+ type="button"
153372
153365
  >
153373
- <span>
153374
- Done
153375
- </span>
153376
- </FormattedMessage>
153377
- </button>
153378
- </Wave>
153379
- </Button>
153380
- </CapButton>
153366
+ <FormattedMessage
153367
+ defaultMessage="Done"
153368
+ id="creatives.containersV2.done"
153369
+ key=".2"
153370
+ values={Object {}}
153371
+ >
153372
+ <span>
153373
+ Done
153374
+ </span>
153375
+ </FormattedMessage>
153376
+ </button>
153377
+ </Wave>
153378
+ </Button>
153379
+ </CapButton>
153380
+ </div>
153381
153381
  </Trigger>
153382
153382
  </Tooltip>
153383
153383
  </Tooltip>
@@ -164012,51 +164012,51 @@ exports[`Creatives Whatsapp test1/> should render edit mode in various cases 6`]
164012
164012
  showAction={Array []}
164013
164013
  visible={false}
164014
164014
  >
164015
- <CapButton
164016
- className="whatsapp-create-btn"
164017
- disabled={true}
164018
- isAddBtn={false}
164015
+ <div
164016
+ className="button-disabled-tooltip-wrapper"
164019
164017
  key="trigger"
164020
- onClick={[Function]}
164021
164018
  onMouseEnter={[Function]}
164022
164019
  onMouseLeave={[Function]}
164023
- type="primary"
164024
164020
  >
164025
- <Button
164026
- block={false}
164027
- className="cap-button-v2 whatsapp-create-btn"
164021
+ <CapButton
164022
+ className="whatsapp-create-btn"
164028
164023
  disabled={true}
164029
- ghost={false}
164030
- htmlType="button"
164031
- loading={false}
164024
+ isAddBtn={false}
164032
164025
  onClick={[Function]}
164033
- onMouseEnter={[Function]}
164034
- onMouseLeave={[Function]}
164035
164026
  type="primary"
164036
164027
  >
164037
- <Wave>
164038
- <button
164039
- className="ant-btn cap-button-v2 whatsapp-create-btn ant-btn-primary"
164040
- disabled={true}
164041
- onClick={[Function]}
164042
- onMouseEnter={[Function]}
164043
- onMouseLeave={[Function]}
164044
- type="button"
164045
- >
164046
- <FormattedMessage
164047
- defaultMessage="Done"
164048
- id="creatives.containersV2.done"
164049
- key=".2"
164050
- values={Object {}}
164028
+ <Button
164029
+ block={false}
164030
+ className="cap-button-v2 whatsapp-create-btn"
164031
+ disabled={true}
164032
+ ghost={false}
164033
+ htmlType="button"
164034
+ loading={false}
164035
+ onClick={[Function]}
164036
+ type="primary"
164037
+ >
164038
+ <Wave>
164039
+ <button
164040
+ className="ant-btn cap-button-v2 whatsapp-create-btn ant-btn-primary"
164041
+ disabled={true}
164042
+ onClick={[Function]}
164043
+ type="button"
164051
164044
  >
164052
- <span>
164053
- Done
164054
- </span>
164055
- </FormattedMessage>
164056
- </button>
164057
- </Wave>
164058
- </Button>
164059
- </CapButton>
164045
+ <FormattedMessage
164046
+ defaultMessage="Done"
164047
+ id="creatives.containersV2.done"
164048
+ key=".2"
164049
+ values={Object {}}
164050
+ >
164051
+ <span>
164052
+ Done
164053
+ </span>
164054
+ </FormattedMessage>
164055
+ </button>
164056
+ </Wave>
164057
+ </Button>
164058
+ </CapButton>
164059
+ </div>
164060
164060
  </Trigger>
164061
164061
  </Tooltip>
164062
164062
  </Tooltip>