@capillarytech/creatives-library 7.12.19 → 7.12.21
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.
|
|
4
|
+
"version": "7.12.21",
|
|
5
5
|
"description": "Capillary creatives ui",
|
|
6
6
|
"main": "./index.js",
|
|
7
7
|
"module": "./index.es.js",
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
"@capillarytech/cap-ui-utils": "1.4.2",
|
|
19
19
|
"@mailupinc/bee-plugin": "^1.2.0",
|
|
20
20
|
"babel-cli": "^6.26.0",
|
|
21
|
-
"babel-node": "0.0.1-security",
|
|
22
21
|
"chalk": "1.1.3",
|
|
23
22
|
"flow": "^0.2.3",
|
|
24
23
|
"git": "^0.1.5",
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { injectIntl, intlShape, FormattedMessage } from 'react-intl';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} from '@capillarytech/cap-ui-library';
|
|
4
|
+
|
|
5
|
+
import CapRow from '@capillarytech/cap-ui-library/CapRow';
|
|
6
|
+
import CapHeading from '@capillarytech/cap-ui-library/CapHeading';
|
|
7
|
+
import CapInput from '@capillarytech/cap-ui-library/CapInput';
|
|
8
|
+
import CapDivider from '@capillarytech/cap-ui-library/CapDivider';
|
|
9
|
+
import CapButton from '@capillarytech/cap-ui-library/CapButton';
|
|
10
|
+
import CapTooltip from '@capillarytech/cap-ui-library/CapTooltip';
|
|
11
|
+
import CapLabel from '@capillarytech/cap-ui-library/CapLabel';
|
|
13
12
|
|
|
14
13
|
import { isUrl } from '../../v2Containers/Line/Container/Wrapper/utils';
|
|
15
14
|
import globalMessages from '../../v2Containers/Cap/messages';
|
|
@@ -45,7 +44,7 @@ const CapActionButton = (props) => {
|
|
|
45
44
|
setButtonLink(val);
|
|
46
45
|
let errorMessage = false;
|
|
47
46
|
if (!isUrl(val)) {
|
|
48
|
-
errorMessage = formatMessage(messages.
|
|
47
|
+
errorMessage = formatMessage(messages.inValidUrlErrorMessage);
|
|
49
48
|
} else {
|
|
50
49
|
updateButtonChange([{
|
|
51
50
|
type,
|
|
@@ -98,8 +97,7 @@ const CapActionButton = (props) => {
|
|
|
98
97
|
title={formatMessage(globalMessages.comingSoonTooltip)}
|
|
99
98
|
>
|
|
100
99
|
<CapButton
|
|
101
|
-
type="flat"
|
|
102
|
-
cursor: "not-allowed"}} isAddBtn>
|
|
100
|
+
type="flat" className="disabled-button" isAddBtn>
|
|
103
101
|
{formatMessage(messages.addButton)}
|
|
104
102
|
</CapButton>
|
|
105
103
|
</CapTooltip>
|
|
@@ -22,8 +22,8 @@ export default defineMessages({
|
|
|
22
22
|
id: `${prefix}.addButton`,
|
|
23
23
|
defaultMessage: 'Add button',
|
|
24
24
|
},
|
|
25
|
-
|
|
26
|
-
id: `${prefix}.
|
|
25
|
+
inValidUrlErrorMessage: {
|
|
26
|
+
id: `${prefix}.inValidUrlErrorMessage`,
|
|
27
27
|
defaultMessage: 'Button URL is not valid',
|
|
28
28
|
},
|
|
29
29
|
});
|
|
@@ -176,9 +176,9 @@ export const Rcs = (props) => {
|
|
|
176
176
|
const rcsButtonTypeOptions = [
|
|
177
177
|
{
|
|
178
178
|
label: <>
|
|
179
|
-
<div
|
|
179
|
+
<div className="rcs-button">
|
|
180
180
|
<CapHeading type="h4"><FormattedMessage {...messages.templateCTAButton} /></CapHeading>
|
|
181
|
-
<CapLabel type="label3"
|
|
181
|
+
<CapLabel type="label3" className="rcs-button-label">
|
|
182
182
|
<FormattedMessage {...messages.templateCTAButtonDesc} />
|
|
183
183
|
</CapLabel>
|
|
184
184
|
</div>
|
|
@@ -196,11 +196,11 @@ export const Rcs = (props) => {
|
|
|
196
196
|
placement="topLeft"
|
|
197
197
|
title={<FormattedMessage {...globalMessages.comingSoonTooltip} />}
|
|
198
198
|
>
|
|
199
|
-
<div
|
|
199
|
+
<div className="rcs-button disabled-button">
|
|
200
200
|
<CapHeading type="h4" disabled>
|
|
201
201
|
<FormattedMessage {...messages.templateQRButton} />
|
|
202
202
|
</CapHeading>
|
|
203
|
-
<CapLabel type="label3"
|
|
203
|
+
<CapLabel type="label3" className="rcs-button-label" disabled>
|
|
204
204
|
<FormattedMessage {...messages.templateQRButtonDesc} />
|
|
205
205
|
</CapLabel>
|
|
206
206
|
</div>
|
|
@@ -236,6 +236,7 @@ export const Rcs = (props) => {
|
|
|
236
236
|
mediaType = RCS_MEDIA_TYPES.NONE,
|
|
237
237
|
title = '',
|
|
238
238
|
description = '',
|
|
239
|
+
suggestions: rcsSuggestions = [],
|
|
239
240
|
} = cardContent[0] || {};
|
|
240
241
|
const { message, templateConfigs = {} } = smsFallBackContent;
|
|
241
242
|
setTemplateName(name);
|
|
@@ -245,6 +246,11 @@ export const Rcs = (props) => {
|
|
|
245
246
|
setTemplateDesc(description);
|
|
246
247
|
setFallbackMessage(message);
|
|
247
248
|
setEditFlow(true);
|
|
249
|
+
if (rcsSuggestions.length > 0) {
|
|
250
|
+
setSuggestions(rcsSuggestions);
|
|
251
|
+
setButtonType(["CTA"]);
|
|
252
|
+
}
|
|
253
|
+
|
|
248
254
|
// for DLT Fallback message
|
|
249
255
|
if (isDltEnabled) {
|
|
250
256
|
const {
|
|
@@ -449,6 +455,7 @@ export const Rcs = (props) => {
|
|
|
449
455
|
};
|
|
450
456
|
const onChangeButtonTypes = (val) => {
|
|
451
457
|
setButtonType(val[0]);
|
|
458
|
+
setSuggestions([]);
|
|
452
459
|
};
|
|
453
460
|
const renderTextComponent = (
|
|
454
461
|
<>
|
|
@@ -14,6 +14,15 @@
|
|
|
14
14
|
color: $FONT_COLOR_03;
|
|
15
15
|
font-weight: normal;
|
|
16
16
|
}
|
|
17
|
+
.rcs-button{
|
|
18
|
+
display: inline-grid;
|
|
19
|
+
}
|
|
20
|
+
.rcs-button-label{
|
|
21
|
+
margin-bottom: 17px;
|
|
22
|
+
}
|
|
23
|
+
.disabled-button{
|
|
24
|
+
opacity: 0.5;
|
|
25
|
+
}
|
|
17
26
|
.rcs-radio > label.ant-radio-wrapper {
|
|
18
27
|
margin-right: 50px;
|
|
19
28
|
}
|