@capillarytech/creatives-library 7.14.15 → 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/config/app.js
CHANGED
|
@@ -16,8 +16,7 @@ const config = {
|
|
|
16
16
|
accountConfig: (strs, accountId) => `${window.location.origin}/org/config/AccountAdd?q=a&channelId=2&accountId=${accountId}&edit=1`,
|
|
17
17
|
},
|
|
18
18
|
development: {
|
|
19
|
-
|
|
20
|
-
api_endpoint: 'http://localhost:2022/arya/api/v1/creatives',
|
|
19
|
+
api_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1/creatives',
|
|
21
20
|
campaigns_api_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/iris/v2/campaigns',
|
|
22
21
|
campaigns_api_org_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/iris/v2/org/campaign',
|
|
23
22
|
auth_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1/auth',
|
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
|
);
|
|
@@ -169,6 +169,8 @@ function CapDocumentUpload(props) {
|
|
|
169
169
|
className="input-div"
|
|
170
170
|
id="fileName"
|
|
171
171
|
type="file"
|
|
172
|
+
//passing event and files to the uploadDocuments function as
|
|
173
|
+
//there are other instance where event is undefined and we have files
|
|
172
174
|
onChange={(e) => uploadDocuments(e, { files: e.target.files })}
|
|
173
175
|
accept={supportedExtensions || ".pdf"}
|
|
174
176
|
/>
|
|
@@ -203,7 +205,6 @@ CapDocumentUpload.propTypes = {
|
|
|
203
205
|
supportedExtensions: PropTypes.any,
|
|
204
206
|
documentSrc: PropTypes.string,
|
|
205
207
|
updateDocumentSrc: PropTypes.func,
|
|
206
|
-
intl: intlShape,
|
|
207
208
|
className: PropTypes.string,
|
|
208
209
|
updateOnReUpload: PropTypes.func,
|
|
209
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;
|