1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.API_CLIENT_LOAD = 'APICLIENT::LOAD';
|
4 | exports.API_CLIENT_UNLOAD = 'APICLIENT::UNLOAD';
|
5 | exports.REDUCER_LOAD = 'REDUCER::LOAD';
|
6 | exports.REDUCER_LOAD_COMPLETE = 'REDUCER::LOAD_COMPLETE';
|
7 | function apiClientLoad(payload) {
|
8 | return {
|
9 | payload: payload,
|
10 | type: exports.API_CLIENT_LOAD,
|
11 | };
|
12 | }
|
13 | exports.apiClientLoad = apiClientLoad;
|
14 | function apiClientUnload(payload) {
|
15 | return {
|
16 | payload: payload,
|
17 | type: exports.API_CLIENT_UNLOAD,
|
18 | };
|
19 | }
|
20 | exports.apiClientUnload = apiClientUnload;
|
21 |
|
22 |
|
23 |
|
24 |
|
25 | function hostLoadReducer(feature) {
|
26 | return {
|
27 | payload: {
|
28 | feature: feature,
|
29 | },
|
30 | type: exports.REDUCER_LOAD,
|
31 | };
|
32 | }
|
33 | exports.hostLoadReducer = hostLoadReducer;
|
34 |
|
35 |
|
36 |
|
37 |
|
38 | function hostLoadCompleteReducer(feature) {
|
39 | return {
|
40 | payload: {
|
41 | feature: feature,
|
42 | },
|
43 | type: exports.REDUCER_LOAD_COMPLETE,
|
44 | };
|
45 | }
|
46 | exports.hostLoadCompleteReducer = hostLoadCompleteReducer;
|
47 |
|
48 |
|
49 |
|
50 |
|
51 | function isLoadReducerAction(action) {
|
52 | return (action instanceof Object &&
|
53 | action.type === exports.REDUCER_LOAD &&
|
54 | action.payload &&
|
55 | typeof action.payload.feature === 'string');
|
56 | }
|
57 | exports.isLoadReducerAction = isLoadReducerAction;
|
58 |
|
59 |
|
60 |
|
61 |
|
62 | function isLoadReducerCompleteAction(action) {
|
63 | return (action instanceof Object &&
|
64 | action.type === exports.REDUCER_LOAD_COMPLETE &&
|
65 | action.payload &&
|
66 | typeof action.payload.feature === 'string');
|
67 | }
|
68 | exports.isLoadReducerCompleteAction = isLoadReducerCompleteAction;
|