@capillarytech/creatives-library 8.0.44 → 8.0.46-alpha.0

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.
Files changed (53) hide show
  1. package/containers/Cap/sagas.js +15 -10
  2. package/containers/Cap/tests/saga.test.js +10 -9
  3. package/containers/Ebill/sagas.js +3 -1
  4. package/containers/Email/sagas.js +3 -1
  5. package/containers/Line/Create/sagas.js +3 -2
  6. package/containers/Line/Edit/sagas.js +1 -1
  7. package/containers/MobilePush/Create/sagas.js +3 -1
  8. package/containers/MobilePush/Edit/sagas.js +3 -1
  9. package/containers/Sms/Create/sagas.js +3 -1
  10. package/containers/Sms/Edit/sagas.js +3 -1
  11. package/containers/Templates/sagas.js +3 -1
  12. package/containers/WeChat/MapTemplates/sagas.js +3 -1
  13. package/hoc/withCreatives.js +2 -3
  14. package/package.json +1 -1
  15. package/services/api.js +18 -22
  16. package/styles/containers/login/_loginPage.scss +2 -1
  17. package/v2Components/Ckeditor/index.js +2 -4
  18. package/v2Components/NavigationBar/index.js +5 -7
  19. package/v2Containers/Assets/Gallery/sagas.js +1 -1
  20. package/v2Containers/BeeEditor/sagas.js +2 -2
  21. package/v2Containers/CallTask/sagas.js +1 -1
  22. package/v2Containers/Cap/index.js +7 -0
  23. package/v2Containers/Cap/sagas.js +9 -5
  24. package/v2Containers/CapFacebookPreview/sagas.js +4 -2
  25. package/v2Containers/CreativesContainer/index.js +155 -111
  26. package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +5 -5
  27. package/v2Containers/Email/sagas.js +4 -2
  28. package/v2Containers/FTP/sagas.js +4 -2
  29. package/v2Containers/Facebook/sagas.js +7 -3
  30. package/v2Containers/InApp/sagas.js +3 -1
  31. package/v2Containers/InApp/tests/sagas.test.js +2 -2
  32. package/v2Containers/LanguageProvider/sagas.js +3 -1
  33. package/v2Containers/Line/Container/index.js +3 -10
  34. package/v2Containers/Line/Container/sagas.js +3 -1
  35. package/v2Containers/MobilePush/Create/index.js +1 -1
  36. package/v2Containers/MobilePush/Create/sagas.js +3 -1
  37. package/v2Containers/MobilePush/Edit/sagas.js +15 -27
  38. package/v2Containers/Rcs/sagas.js +3 -1
  39. package/v2Containers/Sms/Create/sagas.js +3 -1
  40. package/v2Containers/Sms/Edit/index.js +0 -1
  41. package/v2Containers/Sms/Edit/sagas.js +8 -9
  42. package/v2Containers/SmsTrai/Create/sagas.js +3 -1
  43. package/v2Containers/Templates/actions.js +3 -1
  44. package/v2Containers/Templates/index.js +5 -0
  45. package/v2Containers/Templates/reducer.js +6 -6
  46. package/v2Containers/Templates/sagas.js +9 -27
  47. package/v2Containers/TemplatesV2/index.js +0 -8
  48. package/v2Containers/Viber/sagas.js +3 -2
  49. package/v2Containers/WeChat/MapTemplates/sagas.js +14 -23
  50. package/v2Containers/WeChat/RichmediaTemplates/Create/sagas.js +3 -1
  51. package/v2Containers/Whatsapp/sagas.js +3 -1
  52. package/v2Containers/Zalo/index.js +0 -4
  53. package/v2Containers/Zalo/saga.js +1 -1
@@ -1,10 +1,12 @@
1
- import { fork, take, call, put, cancelled, cancel, takeLatest, all } from 'redux-saga/effects';
1
+ import {
2
+ fork, take, call, put, cancelled, takeLatest, all,
3
+ cancel,
4
+ } from 'redux-saga/effects';
2
5
  import { getRedirectionUrl } from '@capillarytech/cap-ui-utils/utils/logoutUtil';
3
6
  // import { normalize } from 'normalizr';
4
7
  import * as Api from '../../services/api';
5
8
  import * as LocalStorage from '../../services/localStorageApi';
6
9
  import * as types from './constants';
7
- import config from '../../config/app';
8
10
  // import {makeSelectOrgId} from './selectors';
9
11
 
10
12
  export function* authorize(user) {
@@ -25,7 +27,7 @@ export function* authorize(user) {
25
27
  }
26
28
  }
27
29
 
28
- function* switchOrg({orgID}) {
30
+ function* switchOrg({ orgID }) {
29
31
  try {
30
32
  LocalStorage.saveItem('orgID', orgID);
31
33
  const res = yield call(Api.changeProxyOrg, orgID);
@@ -58,7 +60,7 @@ export function* logoutFlow() {
58
60
  const redirectUrl = getRedirectionUrl({
59
61
  redirectUri: serverLogout?.redirectUri,
60
62
  });
61
- yield put({type: types.LOGOUT_SUCCESS});
63
+ yield put({ type: types.LOGOUT_SUCCESS });
62
64
  yield call(LocalStorage.clearItem, 'token');
63
65
  yield call(LocalStorage.clearItem, 'orgID');
64
66
  yield call(LocalStorage.clearItem, 'user');
@@ -76,7 +78,7 @@ export function* fetchUserInfo({ callback }) {
76
78
  const userData = result.user;
77
79
  // const orgId = yield select(makeSelectOrgId());
78
80
  // yield put({type: types.GET_ORG_DETAILS_REQUEST, orgId});
79
- const currentOrgDetails = result.currentOrgDetails;
81
+ const { currentOrgDetails } = result;
80
82
  if (!(currentOrgDetails && currentOrgDetails.basic_details && currentOrgDetails.basic_details.base_language && (currentOrgDetails.basic_details.base_language !== "" || currentOrgDetails.basic_details.base_language === null))) {
81
83
  currentOrgDetails.basic_details.base_language = 'en';
82
84
  }
@@ -94,7 +96,9 @@ export function* fetchUserInfo({ callback }) {
94
96
  }
95
97
  yield call(LocalStorage.saveItem, 'orgID', result.currentOrgId);
96
98
  yield call(LocalStorage.saveItem, 'user', userData);
97
- yield put({type: types.GET_USER_DATA_SUCCESS, userData, currentOrgId: result.currentOrgId, currentOrgDetails});
99
+ yield put({
100
+ type: types.GET_USER_DATA_SUCCESS, userData, currentOrgId: result.currentOrgId, currentOrgDetails,
101
+ });
98
102
  } catch (error) {
99
103
  yield call(LocalStorage.clearItem, 'user');
100
104
  yield put({
@@ -106,11 +110,12 @@ export function* fetchUserInfo({ callback }) {
106
110
 
107
111
  export function* fetchSchemaForEntity(queryParams) {
108
112
  try {
109
-
110
113
  const result = yield call(Api.fetchSchemaForEntity, queryParams);
111
-
114
+
112
115
  // const sidebar = result.response.sidebar;
113
- yield put({ type: types.GET_SCHEMA_FOR_ENTITY_SUCCESS, data: result.response, statusCode: result.status ? result.status.code : '', entityType: queryParams.queryParams.type });
116
+ yield put({
117
+ type: types.GET_SCHEMA_FOR_ENTITY_SUCCESS, data: result.response, statusCode: result.status ? result.status.code : '', entityType: queryParams.queryParams.type,
118
+ });
114
119
  } catch (error) {
115
120
  yield put({ type: types.GET_SCHEMA_FOR_ENTITY_FAILURE, error });
116
121
  }
@@ -151,4 +156,4 @@ export function* capSaga() {
151
156
  watchForFetchUserInfo(),
152
157
  watchFetchSchemaForEntity(),
153
158
  ]);
154
- }
159
+ }
@@ -1,9 +1,13 @@
1
1
  import { expectSaga } from 'redux-saga-test-plan';
2
2
  import { throwError } from 'redux-saga-test-plan/providers';
3
3
  import * as matchers from 'redux-saga-test-plan/matchers';
4
- import { authorize, loginFlow } from '../sagas';
4
+ import {
5
+ take, fork, cancel, takeLatest,
6
+ } from 'redux-saga/effects';
7
+ import {
8
+ authorize, loginFlow, logoutFlow, watchForLogoutFlow, capSaga,
9
+ } from '../sagas';
5
10
  import * as api from '../../../services/api';
6
- import { take, fork, cancel, takeLatest } from 'redux-saga/effects';
7
11
  import {
8
12
  LOGIN_REQUEST,
9
13
  LOGIN_FAILURE,
@@ -11,7 +15,7 @@ import {
11
15
  LOGOUT_SUCCESS,
12
16
  LOGOUT_FAILURE,
13
17
  } from '../constants';
14
- import {logoutFlow, watchForLogoutFlow,capSaga } from '../sagas';
18
+
15
19
  const error = new Error('error');
16
20
 
17
21
  describe('capSaga', () => {
@@ -25,13 +29,11 @@ describe('loginFlow', () => {
25
29
  const generator = loginFlow();
26
30
  const user = { username: 'testuser', password: 'password123' };
27
31
  let task;
28
-
29
32
  // First iteration
30
33
  expect(generator.next().value).toEqual(take(LOGIN_REQUEST));
31
34
  expect(generator.next({ user }).value).toEqual(fork(authorize, user));
32
35
  task = generator.next().value; // Assign the task value
33
- try{
34
- const logoutAction = { type: LOGOUT_REQUEST };
36
+ try {
35
37
  const failureAction = { type: LOGIN_FAILURE };
36
38
 
37
39
  expect(generator.next(logoutAction).value).toEqual(cancel(task));
@@ -40,8 +42,7 @@ describe('loginFlow', () => {
40
42
  expect(generator.next(failureAction).value).toEqual(take(LOGIN_REQUEST));
41
43
  expect(generator.next().value).toEqual(fork(authorize, user));
42
44
  expect(generator.next().done).toBe(true);
43
- }
44
- catch{}
45
+ } catch {}
45
46
  });
46
47
  });
47
48
  describe('logoutFlow [Unit Test]', () => {
@@ -115,4 +116,4 @@ describe('logoutFlow [Unit Test]', () => {
115
116
  );
116
117
  });
117
118
  });
118
- });
119
+ });
@@ -1,4 +1,6 @@
1
- import { take, cancel, call, put, takeLatest, all } from 'redux-saga/effects';
1
+ import {
2
+ call, put, takeLatest, all,
3
+ } from 'redux-saga/effects';
2
4
  import * as Api from '../../services/api';
3
5
  import * as types from './constants';
4
6
 
@@ -1,4 +1,6 @@
1
- import { take, cancel, call, put, takeLatest, takeEvery, all } from 'redux-saga/effects';
1
+ import {
2
+ call, put, takeLatest, takeEvery, all,
3
+ } from 'redux-saga/effects';
2
4
  import * as Api from '../../services/api';
3
5
  import * as types from './constants';
4
6
 
@@ -1,6 +1,7 @@
1
1
  // Line Sagas
2
-
3
- import { take, cancel, call, put, takeLatest, all } from 'redux-saga/effects';
2
+ import {
3
+ call, put, takeLatest, all,
4
+ } from 'redux-saga/effects';
4
5
  import * as Api from '../../../services/api';
5
6
  import * as types from './constants';
6
7
 
@@ -1,4 +1,4 @@
1
- import { call, put, takeLatest, take, cancel } from 'redux-saga/effects';
1
+ import { call, put, takeLatest } from 'redux-saga/effects';
2
2
  // import { schema, normalize } from 'normalizr';
3
3
  import * as Api from '../../../services/api';
4
4
  import * as types from './constants';
@@ -1,4 +1,6 @@
1
- import { take, cancel, call, put, takeLatest, all } from 'redux-saga/effects';
1
+ import {
2
+ call, put, takeLatest, all,
3
+ } from 'redux-saga/effects';
2
4
  // import { schema, normalize } from 'normalizr';
3
5
  import * as Api from '../../../services/api';
4
6
  import * as types from './constants';
@@ -1,4 +1,6 @@
1
- import { call, put, takeLatest, take, cancel, all } from 'redux-saga/effects';
1
+ import {
2
+ call, put, takeLatest, all,
3
+ } from 'redux-saga/effects';
2
4
  // import { schema, normalize } from 'normalizr';
3
5
  import * as Api from '../../../services/api';
4
6
  import * as types from './constants';
@@ -1,4 +1,6 @@
1
- import { take, cancel, call, put, takeLatest, all } from 'redux-saga/effects';
1
+ import {
2
+ call, put, takeLatest, all,
3
+ } from 'redux-saga/effects';
2
4
  // import { schema, normalize } from 'normalizr';
3
5
  import * as Api from '../../../services/api';
4
6
  import * as types from './constants';
@@ -1,4 +1,6 @@
1
- import { call, put, takeLatest, take, cancel, all } from 'redux-saga/effects';
1
+ import {
2
+ call, put, takeLatest, all,
3
+ } from 'redux-saga/effects';
2
4
  // import { schema, normalize } from 'normalizr';
3
5
  import * as Api from '../../../services/api';
4
6
  import * as types from './constants';
@@ -1,4 +1,6 @@
1
- import { call, put, takeLatest, take, cancel, all } from 'redux-saga/effects';
1
+ import {
2
+ call, put, takeLatest, all,
3
+ } from 'redux-saga/effects';
2
4
  // import { schema, normalize } from 'normalizr';
3
5
  import * as Api from '../../services/api';
4
6
  import * as types from './constants';
@@ -1,4 +1,6 @@
1
- import { take, call, put, takeLatest, cancel, all } from 'redux-saga/effects';
1
+ import {
2
+ call, put, takeLatest, all,
3
+ } from 'redux-saga/effects';
2
4
  import * as Api from '../../../services/api';
3
5
  import * as types from './constants';
4
6
 
@@ -1,11 +1,10 @@
1
1
  import React, { useEffect } from 'react';
2
2
  import { connect } from 'react-redux';
3
- import { bindActionCreators } from 'redux';
3
+ import { bindActionCreators, compose } from 'redux';
4
4
  import { injectIntl } from 'react-intl';
5
5
  import * as globalActions from '../v2Containers/Cap/actions';
6
6
  import * as creativesContainerActions from '../v2Containers/CreativesContainer/actions';
7
7
  import { UserIsAuthenticated } from '../utils/authWrapper';
8
- import { compose } from 'redux';
9
8
 
10
9
  /**
11
10
  * Higher Order Component to common out creatives channel logic
@@ -19,7 +18,7 @@ export default ({
19
18
  userAuth,
20
19
  sagas = [],
21
20
  reducers = [],
22
- }) => {
21
+ }) => {
23
22
  const CreativesCommon = (props) => {
24
23
  useEffect(() => {
25
24
  const {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "8.0.44",
4
+ "version": "8.0.46-alpha.0",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
package/services/api.js CHANGED
@@ -266,29 +266,25 @@ export const createChannelWiseTemplate = ({ channel, template }) => {
266
266
  };
267
267
 
268
268
 
269
- export const getTemplateDetails = ({id, channel}) => {
269
+ export const getTemplateDetails = async ({id, channel}) => {
270
270
  const url = `${API_ENDPOINT}/templates/v1/${id}/${channel ? channel.toUpperCase() : SMS}`;
271
- const compressedTemplatesData = request(url, getAPICallObject('GET'));
272
- return compressedTemplatesData.then((data) => {
273
- const { response = '' } = data || {};
274
- const decompressData = decompressJsonObject(response);
275
- if (channel?.toUpperCase() === EMAIL) {
276
- return { ...data, response: addBaseToTemplate(decompressData) };
277
- }
278
- return { ...data, response: decompressData };
279
- });
271
+ const compressedTemplatesData = await request(url, getAPICallObject('GET'));
272
+ const {response = ''} = compressedTemplatesData || {};
273
+ const decompressData = decompressJsonObject(response);
274
+ if (channel?.toUpperCase() === EMAIL) {
275
+ return { ...compressedTemplatesData, response: addBaseToTemplate(decompressData) };
276
+ }
277
+ return { ...compressedTemplatesData, response: decompressData};
280
278
  };
281
279
 
282
- export const getAllTemplates = ({channel, queryParams = {}}) => {
280
+ export const getAllTemplates = async ({channel, queryParams = {}}) => {
283
281
  const url = getUrlWithQueryParams({
284
282
  url: `${API_ENDPOINT}/templates/v1/${channel}?`,
285
283
  queryParams,
286
284
  });
287
- const compressedTemplatesData = request(url, getAPICallObject('GET'));
288
- return compressedTemplatesData.then((data) => {
289
- const { response = '' } = data || {};
290
- return { ...data, response: decompressJsonObject(response)};
291
- });
285
+ const compressedTemplatesData = await request(url, getAPICallObject('GET'));
286
+ const {response = ''} = compressedTemplatesData || {};
287
+ return { ...compressedTemplatesData, response: decompressJsonObject(response)};
292
288
  };
293
289
 
294
290
  export const deleteTemplate = ({channel, id}) => {
@@ -535,13 +531,13 @@ export const getS3UrlFileSizes = (data) => {
535
531
  return request(url, getAPICallObject('POST', data));
536
532
  };
537
533
 
538
- export const getTemplateInfoById = ({id, username, oa_id, token, host}) => {
534
+ export const getTemplateInfoById = async ({
535
+ id, username, oa_id, token, host,
536
+ }) => {
539
537
  const url = `${API_ENDPOINT}/templates/v1/${id}/Zalo?username=${username}&oa_id=${oa_id}&token=${token}&host=${host}`;
540
- const compressedTemplatesData = request(url, getAPICallObject('GET'));
541
- return compressedTemplatesData.then((data) => {
542
- const { response = '' } = data || {};
543
- return { ...data, response: decompressJsonObject(response)};
544
- });
538
+ const compressedTemplatesData = await request(url, getAPICallObject('GET'));
539
+ const {response = ''} = compressedTemplatesData || {};
540
+ return { ...compressedTemplatesData, response: decompressJsonObject(response)};
545
541
  };
546
542
 
547
543
  export const getMetaTags = ({previewUrl}) => {
@@ -19,7 +19,8 @@ div#app:first-child {
19
19
  overflow: hidden;
20
20
 
21
21
  .ant-input-affix-wrapper, .login-form-button {
22
- width: 100% !important
22
+ width: 100% !important;
23
+ margin-bottom: 5%;
23
24
  }
24
25
 
25
26
  .login-form-item {
@@ -17,11 +17,9 @@ import { request,getAPICallObject } from '../../services/api';
17
17
  import './style.scss';
18
18
  // import messages from './messages';
19
19
  const loadScript = require('load-script');
20
+ const hostName = window.location.origin.includes('localhost') ? 'https://nightly.intouch.capillarytech.com' : window.location.origin;
21
+ const defaultScriptUrl = `${hostName}/arya/ui/library/ckeditor/ckeditor.js`;
20
22
 
21
- const defaultScriptUrl = `${window.location.origin}/arya/ui/library/ckeditor/ckeditor.js`;
22
- //const defaultScriptUrl = 'https://nightly.intouch.capillarytech.com/arya/ui/library/ckeditor/ckeditor.js';
23
- /*Uncomment the above line to use CKEDITOR in local
24
- */
25
23
  const user = localStorage.getItem('user');
26
24
  let locale = 'en';
27
25
  if (user && JSON.parse(user).lang) {
@@ -8,12 +8,13 @@ import React from 'react';
8
8
  import PropTypes from 'prop-types';
9
9
  import styled from 'styled-components';
10
10
  import { compose } from 'redux';
11
- import injectSaga from '../../utils/injectSaga';
12
- import sagas from './saga';
13
11
  import { loadItem } from 'services/localStorageApi';
14
12
  import { intlShape, injectIntl } from 'react-intl';
15
13
  import { withRouter } from 'react-router-dom';
16
14
  import { get } from 'lodash';
15
+ import CapNavigation from '@capillarytech/cap-ui-library/CapNavigation';
16
+ import injectSaga from '../../utils/injectSaga';
17
+ import sagas from './saga';
17
18
  import messages from './messages';
18
19
  import { LOYALTY } from '../../v2Containers/App/constants';
19
20
  import {
@@ -23,7 +24,6 @@ import {
23
24
  DEFAULT_MODULE,
24
25
  AI_DOCUMENTATION_BOT_DISABLED,
25
26
  } from '../../v2Containers/Cap/constants';
26
- import CapNavigation from '@capillarytech/cap-ui-library/CapNavigation';
27
27
  import configPath from '../../config/path';
28
28
  import * as Api from '../../services/api';
29
29
  import { CapLeftNavigatioOpenCss, CapLeftNavigationCss } from './style';
@@ -118,7 +118,6 @@ export class NavigationBar extends React.Component {
118
118
  ICONS.push(settingsIcon);
119
119
  }
120
120
  return showDocumentationBot ? ICONS.slice(1) : ICONS; // If showDocumentationBot is true, help icon will be replaced by Aira icon on UI
121
-
122
121
  };
123
122
 
124
123
  getDropdownMenu = () => {
@@ -148,12 +147,11 @@ export class NavigationBar extends React.Component {
148
147
  const { location, intl: { formatMessage } } = this.props;
149
148
  const { pathname } = location;
150
149
  const parentModule = pathname.substring(pathname.lastIndexOf('/') + 1);
151
- switch (parentModule) {
150
+ switch (parentModule) {
152
151
  case LOYALTY:
153
152
  return formatMessage(messages.loyaltyProgram);
154
153
  default:
155
154
  return formatMessage(messages.selectedProductDefault)
156
-
157
155
  }
158
156
  }
159
157
 
@@ -236,5 +234,5 @@ NavigationBar.propTypes = {
236
234
  leftNavbarExpandedProp: PropTypes.bool,
237
235
  };
238
236
 
239
- const withSagas = sagas.map(saga => injectSaga(saga));
237
+ const withSagas = sagas.map((saga) => injectSaga(saga));
240
238
  export default compose(...withSagas)(withRouter(injectIntl(NavigationBar)));
@@ -78,4 +78,4 @@ export function* v2GallerySagas() {
78
78
  watchDeleteAssetById(),
79
79
  watchGetUserList(),
80
80
  ]);
81
- }
81
+ }
@@ -27,11 +27,11 @@ function* watchCreateCustomRow() {
27
27
  // All sagas to be loaded
28
28
  export default [
29
29
  watchCreateCustomRow,
30
- watchForMediaGeneration
30
+ watchForMediaGeneration,
31
31
  ];
32
32
 
33
33
  export function* v2BeeEditionSagas() {
34
34
  yield all([
35
35
  watchCreateCustomRow(),
36
36
  ]);
37
- }
37
+ }
@@ -14,4 +14,4 @@ export function* v2CallTaskSagas() {
14
14
  yield all([
15
15
  defaultSaga(),
16
16
  ]);
17
- }
17
+ }
@@ -52,6 +52,8 @@ import { v2RcsSagas } from '../Rcs/sagas';
52
52
  import { v2InAppSagas } from '../InApp/sagas';
53
53
  import { v2ViberSagas } from '../Viber/sagas';
54
54
  import { v2FacebookSagas } from '../Facebook/sagas';
55
+ import { v2ZaloSagas } from '../Zalo/saga';
56
+ import createReducer from '../Line/Container/reducer';
55
57
 
56
58
  const gtm = window.dataLayer || [];
57
59
  const {
@@ -618,7 +620,10 @@ const withWechatMapTemplatesSaga = injectSaga({ key: 'weChatMapTemplate', saga:
618
620
  const withRcsSaga = injectSaga({ key: 'rcs', saga: v2RcsSagas });
619
621
  const withInAppSaga = injectSaga({ key: 'inapp', saga: v2InAppSagas });
620
622
  const withViberSaga = injectSaga({ key: 'viber', saga: v2ViberSagas });
623
+ const withZaloSaga = injectSaga({ key: 'zaloSaga', saga: v2ZaloSagas });
621
624
  const withFacebookSaga = injectSaga({ key: 'facebook', saga: v2FacebookSagas });
625
+ const withLineReducer = injectReducer({ key: 'lineCreate', reducer: createReducer });
626
+
622
627
  export default compose(
623
628
  withSaga,
624
629
  withSmsCreateSaga,
@@ -631,7 +636,9 @@ export default compose(
631
636
  withInAppSaga,
632
637
  withViberSaga,
633
638
  withFacebookSaga,
639
+ withZaloSaga,
634
640
  withReducer,
635
641
  withZaloReducer,
642
+ withLineReducer,
636
643
  withConnect,
637
644
  )(injectIntl(Cap));
@@ -1,4 +1,8 @@
1
- import { fork, take, call, put, cancelled, cancel, takeLatest, all } from 'redux-saga/effects';
1
+ import {
2
+ take, call, put, cancelled, takeLatest, all,
3
+ fork,
4
+ cancel,
5
+ } from 'redux-saga/effects';
2
6
  // import { normalize } from 'normalizr';
3
7
  import * as Api from '../../services/api';
4
8
  import * as LocalStorage from '../../services/localStorageApi';
@@ -9,7 +13,7 @@ import {
9
13
  getTopbarMenuDataValue,
10
14
  getLoyaltyTopbarMenuDataValue,
11
15
  LOYALTY,
12
- } from '../../v2Containers/App/constants';
16
+ } from "../App/constants";
13
17
  // import {makeSelectOrgId} from './selectors';
14
18
 
15
19
  export function* authorize(user) {
@@ -43,7 +47,7 @@ export function* switchOrg({orgID}) {
43
47
  export function* loginFlow() {
44
48
  let condition = true;
45
49
  while (condition) {
46
- const { user } = yield take(types.LOGIN_REQUEST);
50
+ const {user} = yield take(types.LOGIN_REQUEST);
47
51
  const task = yield fork(authorize, user);
48
52
  const action = yield take([types.LOGOUT_REQUEST_V2, types.LOGIN_FAILURE]);
49
53
  if (action.type === types.LOGOUT_REQUEST_V2) {
@@ -260,7 +264,7 @@ export function* capSagaForFetchSchemaForEntity() {
260
264
  yield all([
261
265
  watchFetchSchemaForEntity(),
262
266
  watchLiquidEntity(),
263
- ])
267
+ ]);
264
268
  }
265
269
 
266
270
  export function* v2CapSagas() {
@@ -272,5 +276,5 @@ export function* v2CapSagas() {
272
276
  watchGetTopbarMenuData(),
273
277
  watchForGetVideosConfig(),
274
278
  watchLiquidEntity(),
275
- ])
279
+ ]);
276
280
  }
@@ -1,4 +1,6 @@
1
- import { take, call, put, takeLatest, cancel, all } from 'redux-saga/effects';
1
+ import {
2
+ call, put, takeLatest, all,
3
+ } from 'redux-saga/effects';
2
4
  import * as Api from '../../services/api';
3
5
  import * as type from './constants';
4
6
 
@@ -39,4 +41,4 @@ export function* v2CapFacebookPreviewSagas() {
39
41
  yield all([
40
42
  watchImageFacebookPreview(),
41
43
  ]);
42
- }
44
+ }