@capillarytech/creatives-library 3.4.4 → 3.4.5
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 +0 -2
- package/index.js +0 -6
- package/initialState.js +0 -3
- package/package.json +1 -2
- package/routes.js +1 -6
- package/services/api.js +9 -25
- package/translations/en.json +0 -56
- package/translations/zh.json +0 -56
- package/v2Components/NavigationBar/index.js +10 -5
- package/v2Components/NavigationBar/messages.js +0 -28
- package/v2Containers/App/constants.js +0 -30
- package/v2Containers/Cap/index.js +0 -5
- package/v2Containers/CreativesContainer/SlideBoxContent.js +0 -18
- package/v2Containers/CreativesContainer/constants.js +0 -1
- package/v2Containers/CreativesContainer/index.js +1 -10
- package/v2Containers/Email/index.js +1 -9
- package/v2Containers/Email/messages.js +0 -8
- package/v2Containers/EmailWrapper/index.js +1 -15
- package/v2Containers/MobilePush/Create/index.js +0 -8
- package/v2Containers/MobilePush/Edit/index.js +0 -8
- package/v2Containers/Sms/Create/index.js +1 -6
- package/v2Containers/Sms/Edit/index.js +1 -6
- package/v2Containers/Templates/index.js +3 -9
- package/v2Containers/TemplatesV2/index.js +22 -53
- package/v2Containers/TemplatesV2/messages.js +0 -4
- package/v2Containers/WeChat/MapTemplates/index.js +1 -9
- package/v2Containers/WeChat/RichmediaTemplates/Create/index.js +2 -9
- package/v2Components/MarketingObjective/MarketingObjective.style.js +0 -73
- package/v2Components/MarketingObjective/index.js +0 -107
- package/v2Components/MarketingObjective/messages.js +0 -23
- package/v2Containers/Facebook/Facebook.style.js +0 -75
- package/v2Containers/Facebook/actions.js +0 -13
- package/v2Containers/Facebook/constants.js +0 -25
- package/v2Containers/Facebook/index.js +0 -358
- package/v2Containers/Facebook/messages.js +0 -167
- package/v2Containers/Facebook/reducer.js +0 -31
- package/v2Containers/Facebook/sagas.js +0 -41
- package/v2Containers/Facebook/selectors.js +0 -20
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { take, call, put, takeLatest, cancel } from 'redux-saga/effects';
|
|
2
|
-
import { LOCATION_CHANGE } from 'react-router-redux';
|
|
3
|
-
import * as Api from '../../services/api';
|
|
4
|
-
import {
|
|
5
|
-
GET_MARKETING_OBJECTIVES,
|
|
6
|
-
SET_MARKETING_OBJECTIVES_SUCCESS,
|
|
7
|
-
SET_MARKETING_OBJECTIVES_FAILURE,
|
|
8
|
-
} from './constants';
|
|
9
|
-
|
|
10
|
-
export function* fetchMarketingObjectives() {
|
|
11
|
-
try {
|
|
12
|
-
const response = yield call(Api.getMarketingObjectives, 'FACEBOOK');
|
|
13
|
-
const { errors, data } = response;
|
|
14
|
-
if (errors && errors.length) {
|
|
15
|
-
yield put({
|
|
16
|
-
type: SET_MARKETING_OBJECTIVES_FAILURE,
|
|
17
|
-
payload: errors,
|
|
18
|
-
});
|
|
19
|
-
} else {
|
|
20
|
-
yield put({
|
|
21
|
-
type: SET_MARKETING_OBJECTIVES_SUCCESS,
|
|
22
|
-
payload: data,
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
} catch (error) {
|
|
26
|
-
yield put({
|
|
27
|
-
type: SET_MARKETING_OBJECTIVES_FAILURE,
|
|
28
|
-
payload: error,
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function* watchFetchMarketingObjective() {
|
|
34
|
-
const watcher = yield takeLatest(GET_MARKETING_OBJECTIVES, fetchMarketingObjectives);
|
|
35
|
-
yield take(LOCATION_CHANGE);
|
|
36
|
-
yield cancel(watcher);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export default [
|
|
40
|
-
watchFetchMarketingObjective,
|
|
41
|
-
];
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { createSelector } from 'reselect';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Direct selector to the facebook state domain
|
|
5
|
-
*/
|
|
6
|
-
const selectFacebookDomain = () => (state) => state.get('facebook');
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Other specific selectors
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Default selector used by Facebook
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
export const makeSelectMarketingObjectiveList = () => createSelector(
|
|
18
|
-
selectFacebookDomain(),
|
|
19
|
-
(substate) => substate && substate.get('marketinObjectivesData'),
|
|
20
|
-
);
|