@capillarytech/creatives-library 7.14.16 → 7.14.17
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
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
CapHeading,
|
|
8
8
|
CapButton,
|
|
9
9
|
} from '@capillarytech/cap-ui-library';
|
|
10
|
-
import { injectIntl, FormattedMessage
|
|
10
|
+
import { injectIntl, FormattedMessage} from 'react-intl';
|
|
11
11
|
import { isEmpty, get } from 'lodash';
|
|
12
12
|
import './index.scss';
|
|
13
13
|
import messages from './messages';
|
|
@@ -15,7 +15,6 @@ import { convertPdfToImages } from '../WhatsappDocumentPreview/index';
|
|
|
15
15
|
|
|
16
16
|
function CapDocumentUpload(props) {
|
|
17
17
|
const {
|
|
18
|
-
intl,
|
|
19
18
|
allowedExtensionsRegex,
|
|
20
19
|
documentSize,
|
|
21
20
|
uploadAsset,
|
|
@@ -97,6 +96,7 @@ function CapDocumentUpload(props) {
|
|
|
97
96
|
const {
|
|
98
97
|
file,
|
|
99
98
|
fileParams,
|
|
99
|
+
type,
|
|
100
100
|
} = data || {};
|
|
101
101
|
const { size } = file || {};
|
|
102
102
|
const { error } = fileParams || {};
|
|
@@ -106,7 +106,7 @@ function CapDocumentUpload(props) {
|
|
|
106
106
|
updateDocErrorMessage('');
|
|
107
107
|
uploadAsset(
|
|
108
108
|
file,
|
|
109
|
-
|
|
109
|
+
type,
|
|
110
110
|
fileParams,
|
|
111
111
|
index,
|
|
112
112
|
);
|
|
@@ -205,7 +205,6 @@ CapDocumentUpload.propTypes = {
|
|
|
205
205
|
supportedExtensions: PropTypes.any,
|
|
206
206
|
documentSrc: PropTypes.string,
|
|
207
207
|
updateDocumentSrc: PropTypes.func,
|
|
208
|
-
intl: intlShape,
|
|
209
208
|
className: PropTypes.string,
|
|
210
209
|
updateOnReUpload: PropTypes.func,
|
|
211
210
|
documentData: PropTypes.object,
|
|
@@ -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;
|