@capillarytech/creatives-library 7.14.16 → 7.14.18
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 +1 -1
- package/v2Components/CapDocumentUpload/index.js +5 -5
- package/v2Components/CapDocumentUpload/index.scss +1 -1
- package/v2Components/CapVideoUpload/index.scss +2 -2
- package/v2Containers/Whatsapp/index.scss +8 -8
- package/v2Containers/Whatsapp/styles.scss +6 -6
- package/v2Containers/Whatsapp/utils.js +4 -4
package/package.json
CHANGED
|
@@ -7,15 +7,15 @@ import {
|
|
|
7
7
|
CapHeading,
|
|
8
8
|
CapButton,
|
|
9
9
|
} from '@capillarytech/cap-ui-library';
|
|
10
|
-
import { injectIntl, FormattedMessage
|
|
11
|
-
import
|
|
10
|
+
import { injectIntl, FormattedMessage} from 'react-intl';
|
|
11
|
+
import get from 'lodash/get';
|
|
12
|
+
import isEmpty from 'lodash/isEmpty';
|
|
12
13
|
import './index.scss';
|
|
13
14
|
import messages from './messages';
|
|
14
15
|
import { convertPdfToImages } from '../WhatsappDocumentPreview/index';
|
|
15
16
|
|
|
16
17
|
function CapDocumentUpload(props) {
|
|
17
18
|
const {
|
|
18
|
-
intl,
|
|
19
19
|
allowedExtensionsRegex,
|
|
20
20
|
documentSize,
|
|
21
21
|
uploadAsset,
|
|
@@ -97,6 +97,7 @@ function CapDocumentUpload(props) {
|
|
|
97
97
|
const {
|
|
98
98
|
file,
|
|
99
99
|
fileParams,
|
|
100
|
+
type,
|
|
100
101
|
} = data || {};
|
|
101
102
|
const { size } = file || {};
|
|
102
103
|
const { error } = fileParams || {};
|
|
@@ -106,7 +107,7 @@ function CapDocumentUpload(props) {
|
|
|
106
107
|
updateDocErrorMessage('');
|
|
107
108
|
uploadAsset(
|
|
108
109
|
file,
|
|
109
|
-
|
|
110
|
+
type,
|
|
110
111
|
fileParams,
|
|
111
112
|
index,
|
|
112
113
|
);
|
|
@@ -205,7 +206,6 @@ CapDocumentUpload.propTypes = {
|
|
|
205
206
|
supportedExtensions: PropTypes.any,
|
|
206
207
|
documentSrc: PropTypes.string,
|
|
207
208
|
updateDocumentSrc: PropTypes.func,
|
|
208
|
-
intl: intlShape,
|
|
209
209
|
className: PropTypes.string,
|
|
210
210
|
updateOnReUpload: PropTypes.func,
|
|
211
211
|
documentData: PropTypes.object,
|
|
@@ -42,12 +42,12 @@ $classPrefix: cap-custom-video-upload;
|
|
|
42
42
|
.video-panel-wp {
|
|
43
43
|
display: flex;
|
|
44
44
|
justify-content: center;
|
|
45
|
-
margin:
|
|
45
|
+
margin: $CAP_SPACE_04;
|
|
46
46
|
}
|
|
47
47
|
.video-panel-wp {
|
|
48
48
|
display: flex;
|
|
49
49
|
justify-content: center;
|
|
50
|
-
margin:
|
|
50
|
+
margin: $CAP_SPACE_04;
|
|
51
51
|
}
|
|
52
52
|
.video-panel {
|
|
53
53
|
display: flex;
|
|
@@ -7,17 +7,17 @@
|
|
|
7
7
|
|
|
8
8
|
.whatsapp-render-heading {
|
|
9
9
|
margin-top: $CAP_SPACE_16;
|
|
10
|
-
margin-bottom:
|
|
10
|
+
margin-bottom: $CAP_SPACE_06;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.whatsapp-template-name-desc {
|
|
14
|
-
margin-bottom:
|
|
14
|
+
margin-bottom: $CAP_SPACE_06;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.whatsapp-unsubscribe-checkbox {
|
|
18
18
|
.ant-checkbox-inner {
|
|
19
|
-
height:
|
|
20
|
-
width:
|
|
19
|
+
height: $CAP_SPACE_16;
|
|
20
|
+
width: $CAP_SPACE_16;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -101,12 +101,12 @@
|
|
|
101
101
|
|
|
102
102
|
.whatsapp-button-none {
|
|
103
103
|
display: inline-grid;
|
|
104
|
-
margin-top:
|
|
104
|
+
margin-top: $CAP_SPACE_16;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
.whatsapp-button-cta {
|
|
108
108
|
display: inline-grid;
|
|
109
|
-
margin-top:
|
|
109
|
+
margin-top: $CAP_SPACE_24;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
.whatsapp-button-quick-reply {
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
margin-left: 8px;
|
|
118
118
|
color: $FONT_COLOR_03;
|
|
119
119
|
font-weight: normal;
|
|
120
|
-
font-size:
|
|
120
|
+
font-size: $CAP_SPACE_12;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
.whatsapp-media-radio>label.ant-radio-wrapper {
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
.cap-custom-video-upload {
|
|
136
|
-
padding-top:
|
|
136
|
+
padding-top: $CAP_SPACE_20;
|
|
137
137
|
.dragger-button.re-upload {
|
|
138
138
|
top: -175px;
|
|
139
139
|
position: relative;
|
|
@@ -13,18 +13,18 @@
|
|
|
13
13
|
background-color: $CAP_G09;
|
|
14
14
|
display: flex;
|
|
15
15
|
.cap-image-v2 {
|
|
16
|
-
margin:
|
|
17
|
-
width:
|
|
18
|
-
height:
|
|
16
|
+
margin: $CAP_SPACE_06 $CAP_SPACE_04;
|
|
17
|
+
width: $CAP_SPACE_32;
|
|
18
|
+
height: $CAP_SPACE_32;
|
|
19
19
|
}
|
|
20
20
|
.pdf-info {
|
|
21
|
-
margin:
|
|
21
|
+
margin: $CAP_SPACE_08 $CAP_SPACE_04;
|
|
22
22
|
max-width: 114px;
|
|
23
23
|
.pdf-info-sec {
|
|
24
24
|
color: $CAP_G04;
|
|
25
|
-
font-size:
|
|
25
|
+
font-size: $CAP_SPACE_08;
|
|
26
26
|
font-weight: 400;
|
|
27
|
-
line-height:
|
|
27
|
+
line-height: $CAP_SPACE_12;
|
|
28
28
|
}
|
|
29
29
|
.pdf-name-div {
|
|
30
30
|
display: flex;
|
|
@@ -88,16 +88,16 @@ export const getWhatsappContent = (template, isPreview) => {
|
|
|
88
88
|
'{{unsubscribe}}',
|
|
89
89
|
);
|
|
90
90
|
}
|
|
91
|
-
|
|
91
|
+
const mediaParams = {};
|
|
92
92
|
switch (mediaType) {
|
|
93
93
|
case WHATSAPP_MEDIA_TYPES.IMAGE:
|
|
94
|
-
mediaParams =
|
|
94
|
+
mediaParams.whatsappImageSrc = imageUrl;
|
|
95
95
|
break;
|
|
96
96
|
case WHATSAPP_MEDIA_TYPES.VIDEO:
|
|
97
|
-
mediaParams =
|
|
97
|
+
mediaParams.whatsappVideoPreviewImg = videoPreviewImg;
|
|
98
98
|
break;
|
|
99
99
|
case WHATSAPP_MEDIA_TYPES.DOCUMENT:
|
|
100
|
-
mediaParams =
|
|
100
|
+
mediaParams.docPreview = getWhatsappDocPreview(whatsappDocParams);
|
|
101
101
|
break;
|
|
102
102
|
default:
|
|
103
103
|
break;
|