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