@capillarytech/creatives-library 6.15.1 → 6.16.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.
- package/app.js +3 -3
- package/containers/Templates/index.js +0 -3
- package/package.json +2 -2
- package/v2Containers/Email/index.js +1 -1
- package/v2Containers/FTP/_FTP.scss +103 -0
- package/v2Containers/FTP/actions.js +7 -0
- package/v2Containers/FTP/constants.js +3 -0
- package/v2Containers/FTP/index.js +509 -0
- package/v2Containers/FTP/messages.js +60 -0
- package/v2Containers/FTP/reducer.js +32 -0
- package/v2Containers/FTP/sagas.js +26 -0
- package/v2Containers/FTP/selectors.js +20 -0
- package/v2Containers/FTP/temp.js +11838 -0
- package/v2Containers/Line/Create/_lineCreate.scss +0 -64
- package/v2Containers/Line/Create/actions.js +0 -94
- package/v2Containers/Line/Create/constants.js +0 -43
- package/v2Containers/Line/Create/index.js +0 -1112
- package/v2Containers/Line/Create/initialSchema.js +0 -378
- package/v2Containers/Line/Create/messages.js +0 -229
- package/v2Containers/Line/Create/reducer.js +0 -99
- package/v2Containers/Line/Create/sagas.js +0 -113
- package/v2Containers/Line/Create/selectors.js +0 -30
- package/v2Containers/Line/CreateWrapper/constants.js +0 -2
- package/v2Containers/Line/CreateWrapper/index.js +0 -117
- package/v2Containers/Line/CreateWrapper/messages.js +0 -55
- package/v2Containers/Line/Edit/_lineEdit.scss +0 -23
- package/v2Containers/Line/Edit/actions.js +0 -79
- package/v2Containers/Line/Edit/constants.js +0 -27
- package/v2Containers/Line/Edit/index.js +0 -1051
- package/v2Containers/Line/Edit/messages.js +0 -173
- package/v2Containers/Line/Edit/reducer.js +0 -83
- package/v2Containers/Line/Edit/sagas.js +0 -81
- package/v2Containers/Line/Edit/selectors.js +0 -29
- package/v2Containers/Line/Edit/tests/actions.test.js +0 -18
- package/v2Containers/Line/Edit/tests/index.test.js +0 -10
- package/v2Containers/Line/Edit/tests/reducer.test.js +0 -9
- package/v2Containers/Line/Edit/tests/sagas.test.js +0 -15
- package/v2Containers/Line/Edit/tests/selectors.test.js +0 -10
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl';
|
|
2
|
+
|
|
3
|
+
export default defineMessages({
|
|
4
|
+
ftpServerDesc: {
|
|
5
|
+
id: 'creatives.containersV2.FTP.ftpServerDesc',
|
|
6
|
+
defaultMessage: 'Select the FTP server to send the message data. To add another FTP location, ',
|
|
7
|
+
},
|
|
8
|
+
ftpServer: {
|
|
9
|
+
id: 'creatives.containersV2.FTP.ftpServer',
|
|
10
|
+
defaultMessage: 'FTP Server',
|
|
11
|
+
},
|
|
12
|
+
configureCsv: {
|
|
13
|
+
id: 'creatives.containersV2.FTP.configureCsv',
|
|
14
|
+
defaultMessage: 'Configure CSV',
|
|
15
|
+
},
|
|
16
|
+
addColumn: {
|
|
17
|
+
id: 'creatives.containersV2.FTP.addColumn',
|
|
18
|
+
defaultMessage: 'Add column',
|
|
19
|
+
},
|
|
20
|
+
selectTag: {
|
|
21
|
+
id: 'creatives.containersV2.FTP.selectTag',
|
|
22
|
+
defaultMessage: 'Select tag',
|
|
23
|
+
},
|
|
24
|
+
done: {
|
|
25
|
+
id: 'creatives.containersV2.FTP.done',
|
|
26
|
+
defaultMessage: 'Done',
|
|
27
|
+
},
|
|
28
|
+
customerID: {
|
|
29
|
+
id: 'creatives.containersV2.FTP.customerID',
|
|
30
|
+
defaultMessage: 'Customer ID',
|
|
31
|
+
},
|
|
32
|
+
change: {
|
|
33
|
+
id: 'creatives.containersV2.FTP.change',
|
|
34
|
+
defaultMessage: 'Change',
|
|
35
|
+
},
|
|
36
|
+
manageFTPSettings: {
|
|
37
|
+
id: 'creatives.containersV2.FTP.manageFTPSettings',
|
|
38
|
+
defaultMessage: 'manage FTP settings',
|
|
39
|
+
},
|
|
40
|
+
addLabel: {
|
|
41
|
+
id: 'creatives.containersV2.FTP.addLabel',
|
|
42
|
+
defaultMessage: 'Add Labels',
|
|
43
|
+
},
|
|
44
|
+
messageHeader: {
|
|
45
|
+
id: 'creatives.containersV2.FTP.messageHeader',
|
|
46
|
+
defaultMessage: 'Message',
|
|
47
|
+
},
|
|
48
|
+
messageContent: {
|
|
49
|
+
id: 'creatives.containersV2.FTP.messageContent',
|
|
50
|
+
defaultMessage: 'Message Content',
|
|
51
|
+
},
|
|
52
|
+
optional: {
|
|
53
|
+
id: 'creatives.containersV2.FTP.optional',
|
|
54
|
+
defaultMessage: '(optional)',
|
|
55
|
+
},
|
|
56
|
+
dataPreview: {
|
|
57
|
+
id: 'creatives.containersV2.FTP.dataPreview',
|
|
58
|
+
defaultMessage: 'Data Preview',
|
|
59
|
+
},
|
|
60
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { fromJS } from 'immutable';
|
|
2
|
+
import * as types from './constants';
|
|
3
|
+
|
|
4
|
+
const initialState = fromJS({
|
|
5
|
+
getFTPServersInProgress: false,
|
|
6
|
+
FTPServers: [],
|
|
7
|
+
getFTPServersError: false,
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
function createReducer(state = initialState, action) {
|
|
11
|
+
switch (action.type) {
|
|
12
|
+
case types.GET_FTP_SERVERS_REQUEST:
|
|
13
|
+
return state
|
|
14
|
+
.set('getFTPServersInProgress', true)
|
|
15
|
+
.set('FTPServers', [])
|
|
16
|
+
.set('getFTPServersInProgress', true);
|
|
17
|
+
case types.GET_FTP_SERVERS_SUCCESS:
|
|
18
|
+
return state
|
|
19
|
+
.set('getFTPServersInProgress', false)
|
|
20
|
+
.set('FTPServers', action.data)
|
|
21
|
+
.set('getFTPServersInProgress', false);
|
|
22
|
+
case types.GET_FTP_SERVERS_FAILURE:
|
|
23
|
+
return state
|
|
24
|
+
.set('getFTPServersInProgress', false)
|
|
25
|
+
.set('FTPServers', [])
|
|
26
|
+
.set('getFTPServersInProgress', true);
|
|
27
|
+
default:
|
|
28
|
+
return state;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export default createReducer;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { take, cancel, call, put, takeLatest } from 'redux-saga/effects';
|
|
2
|
+
import { LOCATION_CHANGE } from 'react-router-redux';
|
|
3
|
+
import * as Api from '../../services/api';
|
|
4
|
+
import * as types from './constants';
|
|
5
|
+
|
|
6
|
+
// Individual exports for testing
|
|
7
|
+
export function* getFTPServers() {
|
|
8
|
+
try {
|
|
9
|
+
const result = yield call(Api.getFTPServers);
|
|
10
|
+
yield put({ type: types.GET_FTP_SERVERS_SUCCESS, data: result.response });
|
|
11
|
+
} catch (error) {
|
|
12
|
+
yield put({ type: types.GET_FTP_SERVERS_FAILURE, error });
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
function* watchGetFTPServers() {
|
|
18
|
+
const watcher = yield takeLatest(types.GET_FTP_SERVERS_REQUEST, getFTPServers);
|
|
19
|
+
yield take(LOCATION_CHANGE);
|
|
20
|
+
yield cancel(watcher);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// All sagas to be loaded
|
|
24
|
+
export default [
|
|
25
|
+
watchGetFTPServers,
|
|
26
|
+
];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createSelector } from 'reselect';
|
|
2
|
+
import { fromJS } from 'immutable';
|
|
3
|
+
|
|
4
|
+
const selectFTPMessageCreateDomain = () => (state) => state.get('FTP') || fromJS({});
|
|
5
|
+
const selectCapDomain = (state) => state.get('cap');
|
|
6
|
+
|
|
7
|
+
const makeSelectFTP = () => createSelector(
|
|
8
|
+
selectFTPMessageCreateDomain(),
|
|
9
|
+
(substate = fromJS({})) => substate.toJS()
|
|
10
|
+
);
|
|
11
|
+
const makeSelectMetaEntities = () => createSelector(
|
|
12
|
+
selectCapDomain,
|
|
13
|
+
(globalState = fromJS({})) => globalState.get('metaEntities')
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
makeSelectFTP,
|
|
19
|
+
makeSelectMetaEntities,
|
|
20
|
+
};
|