@capillarytech/creatives-library 7.17.129 → 7.17.130
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 +7 -7
- package/package.json +1 -1
- package/styles/components/navigation/_leftnav.scss +13 -0
- package/v2Containers/Cap/sagas.js +1 -1
- package/v2Containers/Cap/tests/saga.test.js +12 -1
- package/v2Containers/CreativesContainer/index.js +12 -2
- package/v2Containers/MobilePush/Create/index.js +17 -5
- package/v2Containers/MobilePush/Edit/index.js +15 -4
package/config/app.js
CHANGED
|
@@ -16,13 +16,13 @@ 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
|
-
api_endpoint: 'https://
|
|
20
|
-
campaigns_api_endpoint: 'https://
|
|
21
|
-
campaigns_api_org_endpoint: 'https://
|
|
22
|
-
auth_endpoint: 'https://
|
|
23
|
-
arya_endpoint: 'https://
|
|
24
|
-
subscription_api_endpoint: 'https://
|
|
25
|
-
exports_api_endpoint: 'https://
|
|
19
|
+
api_endpoint: 'https://nightly.intouch.capillarytech.com/arya/api/v1/creatives',
|
|
20
|
+
campaigns_api_endpoint: 'https://nightly.intouch.capillarytech.com/iris/v2/campaigns',
|
|
21
|
+
campaigns_api_org_endpoint: 'https://nightly.intouch.capillarytech.com/iris/v2/org/campaign',
|
|
22
|
+
auth_endpoint: 'https://nightly.intouch.capillarytech.com/arya/api/v1/auth',
|
|
23
|
+
arya_endpoint: 'https://nightly.intouch.capillarytech.com/arya/api/v1',
|
|
24
|
+
subscription_api_endpoint: 'https://nightly.intouch.capillarytech.com/arya/api/v1/org-settings/subscription',
|
|
25
|
+
exports_api_endpoint: 'https://nightly.intouch.capillarytech.com/arya/api/v1/export/data',
|
|
26
26
|
login_url: '/auth/login',
|
|
27
27
|
dashboard_url: '/sms',
|
|
28
28
|
dashboard_url_v2: '/v2',
|
package/package.json
CHANGED
|
@@ -211,3 +211,16 @@
|
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
+
.cap-collapsible-new-nav {
|
|
215
|
+
.l2-quick-link-heading, .l2-item-submodule {
|
|
216
|
+
width: 11.25rem;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.l1-enabled-popover-container .l2-item-submodule {
|
|
221
|
+
width: 11.25rem;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.l1-enabled-popover-container .ant-popover-inner-content .l2-quick-link-container {
|
|
225
|
+
padding: 0.571rem 0.471rem;
|
|
226
|
+
}
|
|
@@ -191,7 +191,7 @@ export function* getSupportVideosConfig({ callback }) {
|
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
function* watchFetchSchemaForEntity() {
|
|
194
|
+
export function* watchFetchSchemaForEntity() {
|
|
195
195
|
yield takeLatest(types.GET_SCHEMA_FOR_ENTITY_REQUEST, fetchSchemaForEntity);
|
|
196
196
|
}
|
|
197
197
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { take, fork, cancel, takeLatest } from 'redux-saga/effects';
|
|
2
2
|
import { expectSaga } from 'redux-saga-test-plan';
|
|
3
3
|
import * as matchers from 'redux-saga-test-plan/matchers';
|
|
4
|
-
import { authorize, loginFlow, fetchSchemaForEntity, getSupportVideosConfig, watchForGetVideosConfig } from '../sagas';
|
|
4
|
+
import { authorize, loginFlow, fetchSchemaForEntity, getSupportVideosConfig, watchForGetVideosConfig, watchFetchSchemaForEntity } from '../sagas';
|
|
5
5
|
import { throwError } from 'redux-saga-test-plan/providers';
|
|
6
6
|
import * as api from '../../../services/api';
|
|
7
7
|
import {
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
GET_SUPPORT_VIDEOS_CONFIG_REQUEST,
|
|
14
14
|
GET_SUPPORT_VIDEOS_CONFIG_SUCCESS,
|
|
15
15
|
GET_SUPPORT_VIDEOS_CONFIG_FAILURE,
|
|
16
|
+
GET_SCHEMA_FOR_ENTITY_REQUEST,
|
|
16
17
|
} from '../constants';
|
|
17
18
|
import { callback, error, error2, videoConfigData } from '../../mockdata';
|
|
18
19
|
|
|
@@ -196,4 +197,14 @@ describe('watchForGetVideosConfig saga', () => {
|
|
|
196
197
|
takeLatest(GET_SUPPORT_VIDEOS_CONFIG_REQUEST, getSupportVideosConfig),
|
|
197
198
|
);
|
|
198
199
|
});
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
describe('watchFetchSchemaForEntity saga', () => {
|
|
203
|
+
|
|
204
|
+
it('test watchFetchSchemaForEntity', () => {
|
|
205
|
+
let generator = watchFetchSchemaForEntity();
|
|
206
|
+
expect(generator.next().value).toEqual(
|
|
207
|
+
takeLatest(GET_SCHEMA_FOR_ENTITY_REQUEST, fetchSchemaForEntity),
|
|
208
|
+
);
|
|
209
|
+
});
|
|
199
210
|
});
|
|
@@ -596,9 +596,19 @@ export class Creatives extends React.Component {
|
|
|
596
596
|
const channelTemplate = template.value;
|
|
597
597
|
templateData.accountId = get(channelTemplate, 'definition.accountId');
|
|
598
598
|
const type = (get(this.props, "messageDetails.type") || '').toLowerCase();
|
|
599
|
+
const sourceType = get(channelTemplate, 'definition.sourceType');
|
|
599
600
|
if (type === LOYALTY) {
|
|
600
|
-
|
|
601
|
-
|
|
601
|
+
if(sourceType === 'MAPP_SDK') {
|
|
602
|
+
templateData.templateId = get(channelTemplate, '_id');
|
|
603
|
+
templateData.licenseCode = get(channelTemplate, 'definition.licenseCode');
|
|
604
|
+
templateData.gatewayId = get(channelTemplate, 'definition.gatewayId');
|
|
605
|
+
templateData.gatewayAccountId = get(channelTemplate, 'definition.gatewayAccountId');
|
|
606
|
+
templateData.sourceType = get(channelTemplate, 'definition.sourceType');
|
|
607
|
+
} else {
|
|
608
|
+
templateData.templateId = get(channelTemplate, '_id');
|
|
609
|
+
templateData.licenseCode = get(channelTemplate, 'definition.licenseCode');
|
|
610
|
+
templateData.sourceType = get(channelTemplate, 'definition.sourceType');
|
|
611
|
+
}
|
|
602
612
|
}
|
|
603
613
|
const androidContent = channel === constants.INAPP ? get(channelTemplate, 'versions.base.content.ANDROID') : get(channelTemplate, 'versions.base.ANDROID');
|
|
604
614
|
if (!isEmpty(androidContent)) {
|
|
@@ -368,11 +368,23 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
368
368
|
};
|
|
369
369
|
obj.type = 'MOBILEPUSH';
|
|
370
370
|
obj.name = formData['template-name'];
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
371
|
+
if(this.props?.Templates?.selectedWeChatAccount?.sourceTypeName === 'MAPP_SDK') {
|
|
372
|
+
obj.definition = {
|
|
373
|
+
accountId: this.props.Templates.selectedWeChatAccount.id,
|
|
374
|
+
licenseCode: this.props.Templates.selectedWeChatAccount.sourceAccountIdentifier,
|
|
375
|
+
gatewayId: this.props.Templates.selectedWeChatAccount.configs.gatewayId,
|
|
376
|
+
gatewayAccountId: this.props.Templates.selectedWeChatAccount.configs.gatewayAccountId,
|
|
377
|
+
mode: this.props.params.mode,
|
|
378
|
+
sourceType: this.props.Templates.selectedWeChatAccount.sourceTypeName,
|
|
379
|
+
};
|
|
380
|
+
} else {
|
|
381
|
+
obj.definition = {
|
|
382
|
+
accountId: this.props.Templates.selectedWeChatAccount.id,
|
|
383
|
+
licenseCode: this.props.Templates.selectedWeChatAccount.sourceAccountIdentifier,
|
|
384
|
+
mode: this.props.params.mode,
|
|
385
|
+
sourceType: this.props.Templates.selectedWeChatAccount.sourceTypeName,
|
|
386
|
+
};
|
|
387
|
+
}
|
|
376
388
|
const android = {};
|
|
377
389
|
Object.keys(formData[0]).forEach((data) => {
|
|
378
390
|
if (!!formData[0][data] && data !== "tabKey") {
|
|
@@ -338,10 +338,21 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
338
338
|
};
|
|
339
339
|
obj.type = 'MOBILEPUSH';
|
|
340
340
|
obj.name = formData['template-name'];
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
341
|
+
if(this.props?.Templates?.selectedWeChatAccount?.sourceTypeName === 'MAPP_SDK') {
|
|
342
|
+
obj.definition = {
|
|
343
|
+
accountId: selectedWeChatAccount.id,
|
|
344
|
+
licenseCode: selectedWeChatAccount.sourceAccountIdentifier,
|
|
345
|
+
gatewayId: selectedWeChatAccount.configs.gatewayId,
|
|
346
|
+
gatewayAccountId: selectedWeChatAccount.configs.gatewayAccountId,
|
|
347
|
+
sourceType: selectedWeChatAccount.sourceTypeName,
|
|
348
|
+
};
|
|
349
|
+
} else {
|
|
350
|
+
obj.definition = {
|
|
351
|
+
accountId: selectedWeChatAccount?.id,
|
|
352
|
+
licenseCode: selectedWeChatAccount.sourceAccountIdentifier,
|
|
353
|
+
sourceType: selectedWeChatAccount.sourceTypeName,
|
|
354
|
+
};
|
|
355
|
+
}
|
|
345
356
|
if (this.props.location.query && this.props.location.query.module !== 'dvs') {
|
|
346
357
|
obj.definition.mode = get(this, 'props.Edit.templateDetails.mode', '') || get(this, 'props.Edit.templateDetails.definition.mode', '');
|
|
347
358
|
}
|