@zengenti/contensis-react-base 4.0.0-beta.2 → 4.0.0-beta.3
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/LICENSE +7 -0
- package/README.md +18 -478
- package/cjs/{App-b56aca04.js → App-BNcmM8rN.js} +215 -234
- package/cjs/App-BNcmM8rN.js.map +1 -0
- package/cjs/{ChangePassword.container-ae35785e.js → ChangePassword.container-642SYfpS.js} +209 -286
- package/cjs/ChangePassword.container-642SYfpS.js.map +1 -0
- package/cjs/CookieHelper.class-BoY5TrIi.js +562 -0
- package/cjs/CookieHelper.class-BoY5TrIi.js.map +1 -0
- package/cjs/{RouteLoader-c06dccd5.js → RouteLoader-DvyYYyIE.js} +55 -68
- package/cjs/RouteLoader-DvyYYyIE.js.map +1 -0
- package/cjs/{ContensisDeliveryApi-4fcf049d.js → SSRContext-D66GKlH7.js} +165 -119
- package/cjs/SSRContext-D66GKlH7.js.map +1 -0
- package/cjs/{ToJs-a8d8f3f0.js → ToJs-C9jwV7YB.js} +26 -80
- package/cjs/ToJs-C9jwV7YB.js.map +1 -0
- package/cjs/{_commonjsHelpers-b3309d7b.js → _commonjsHelpers-BJu3ubxk.js} +1 -1
- package/cjs/_commonjsHelpers-BJu3ubxk.js.map +1 -0
- package/cjs/client.js +67 -65
- package/cjs/client.js.map +1 -1
- package/cjs/contensis-react-base.js +386 -3293
- package/cjs/contensis-react-base.js.map +1 -1
- package/cjs/{fromJSLeaveImmer-e74c673c.js → fromJSLeaveImmer-Blvlk4t2.js} +3 -7
- package/{esm/fromJSLeaveImmer-0114ffcf.js.map → cjs/fromJSLeaveImmer-Blvlk4t2.js.map} +1 -1
- package/cjs/redux.js +18 -19
- package/cjs/redux.js.map +1 -1
- package/cjs/routing.js +13 -6
- package/cjs/routing.js.map +1 -1
- package/cjs/sagas-CbZhaRNd.js +6010 -0
- package/cjs/sagas-CbZhaRNd.js.map +1 -0
- package/cjs/search.js +105 -305
- package/cjs/search.js.map +1 -1
- package/cjs/selectors-wCs5fHD4.js +460 -0
- package/cjs/selectors-wCs5fHD4.js.map +1 -0
- package/cjs/{version-34d91f68.js → store-CADDS7cV.js} +44 -111
- package/cjs/store-CADDS7cV.js.map +1 -0
- package/cjs/{urls-6fcaf4c6.js → urls-DVIwGZmd.js} +1 -1
- package/{esm/urls-eac9a747.js.map → cjs/urls-DVIwGZmd.js.map} +1 -1
- package/cjs/user.js +12 -20
- package/cjs/user.js.map +1 -1
- package/cjs/util.js +108 -115
- package/cjs/util.js.map +1 -1
- package/cjs/{version-a410c88e.js → version-ASZx0NDG.js} +19 -22
- package/{esm/version-9f29becb.js.map → cjs/version-ASZx0NDG.js.map} +1 -1
- package/cjs/version-CM-bJ62L.js +20 -0
- package/cjs/version-CM-bJ62L.js.map +1 -0
- package/esm/{App-83107d7e.js → App-CfIZbvU9.js} +176 -195
- package/esm/App-CfIZbvU9.js.map +1 -0
- package/esm/{ChangePassword.container-76fd5e9b.js → ChangePassword.container-Q7bElOVz.js} +191 -250
- package/esm/ChangePassword.container-Q7bElOVz.js.map +1 -0
- package/esm/CookieHelper.class-DzleKOOc.js +555 -0
- package/esm/CookieHelper.class-DzleKOOc.js.map +1 -0
- package/esm/{RouteLoader-29fd689a.js → RouteLoader-qJA3UqTM.js} +40 -53
- package/esm/RouteLoader-qJA3UqTM.js.map +1 -0
- package/esm/{ContensisDeliveryApi-fe57a037.js → SSRContext-C743Oeli.js} +159 -120
- package/esm/SSRContext-C743Oeli.js.map +1 -0
- package/esm/{ToJs-df57f31d.js → ToJs-CpPNdcXS.js} +24 -77
- package/esm/ToJs-CpPNdcXS.js.map +1 -0
- package/esm/{_commonjsHelpers-1789f0cf.js → _commonjsHelpers-BFTU3MAI.js} +1 -1
- package/esm/_commonjsHelpers-BFTU3MAI.js.map +1 -0
- package/esm/client.js +55 -53
- package/esm/client.js.map +1 -1
- package/esm/contensis-react-base.js +317 -3222
- package/esm/contensis-react-base.js.map +1 -1
- package/esm/{fromJSLeaveImmer-0114ffcf.js → fromJSLeaveImmer-C_YACmOf.js} +2 -6
- package/{cjs/fromJSLeaveImmer-e74c673c.js.map → esm/fromJSLeaveImmer-C_YACmOf.js.map} +1 -1
- package/esm/redux.js +9 -8
- package/esm/redux.js.map +1 -1
- package/esm/routing.js +13 -4
- package/esm/routing.js.map +1 -1
- package/esm/sagas-xJU-zOpn.js +5916 -0
- package/esm/sagas-xJU-zOpn.js.map +1 -0
- package/esm/search.js +113 -311
- package/esm/search.js.map +1 -1
- package/esm/selectors-CBdCY0u3.js +396 -0
- package/esm/selectors-CBdCY0u3.js.map +1 -0
- package/esm/{version-3d9911e2.js → store-uQZKjfA8.js} +36 -81
- package/esm/store-uQZKjfA8.js.map +1 -0
- package/esm/{urls-eac9a747.js → urls-DfCisos-.js} +1 -1
- package/{cjs/urls-6fcaf4c6.js.map → esm/urls-DfCisos-.js.map} +1 -1
- package/esm/user.js +7 -13
- package/esm/user.js.map +1 -1
- package/esm/util.js +66 -74
- package/esm/util.js.map +1 -1
- package/esm/{version-9f29becb.js → version-B9nPx4IF.js} +6 -9
- package/{cjs/version-a410c88e.js.map → esm/version-B9nPx4IF.js.map} +1 -1
- package/esm/version-D773TD9j.js +15 -0
- package/esm/version-D773TD9j.js.map +1 -0
- package/models/app/App.d.ts +1 -1
- package/models/app/pages/VersionInfo/components/VersionInfo.d.ts +1 -1
- package/models/app/pages/VersionInfo/components/VersionInfo.styled.d.ts +2 -1
- package/models/client/client.d.ts +1 -1
- package/models/index.d.ts +1 -2
- package/models/models/AppRouteProps.d.ts +11 -0
- package/models/models/ContentTypeMapping.d.ts +89 -0
- package/models/models/EntryMapper.d.ts +3 -0
- package/models/models/GetRouteActionArgs.d.ts +15 -0
- package/models/models/MatchedRoute.d.ts +4 -0
- package/models/models/ReduxInjector.d.ts +5 -0
- package/models/models/RequireLogin.d.ts +6 -0
- package/models/models/RouteComponent.d.ts +4 -0
- package/models/models/RouteComponentProps.d.ts +9 -0
- package/models/models/RouteLoaderProps.d.ts +9 -0
- package/models/models/RouteNode.d.ts +5 -0
- package/models/models/SSRContext.d.ts +11 -0
- package/models/models/StaticRoute.d.ts +60 -0
- package/models/models/WithEvents.d.ts +58 -0
- package/models/models/config/AppConfig.d.ts +12 -0
- package/models/{config.d.ts → models/config/ServerConfig.d.ts} +3 -12
- package/models/models/config/StateType.d.ts +1 -0
- package/models/models/config/index.d.ts +3 -0
- package/models/models/index.d.ts +16 -0
- package/models/redux/actions/index.d.ts +2 -2
- package/models/redux/sagas/navigation.d.ts +1 -3
- package/models/redux/selectors/index.d.ts +2 -2
- package/models/redux/store/injectors.d.ts +16 -4
- package/models/redux/store/store.d.ts +10 -4
- package/models/redux/types/index.d.ts +2 -2
- package/models/redux/types/navigation.d.ts +3 -3
- package/models/redux/types/version.d.ts +2 -2
- package/models/routing/components/Redirect.d.ts +1 -1
- package/models/routing/components/RouteLoader.d.ts +1 -1
- package/models/routing/components/StaticRouteLoader.d.ts +1 -1
- package/models/routing/components/Status.d.ts +1 -1
- package/models/routing/redux/actions.d.ts +3 -4
- package/models/routing/redux/selectors.d.ts +2 -2
- package/models/routing/redux/types.d.ts +11 -11
- package/models/routing/routes.d.ts +1 -1
- package/models/routing/util/find-contenttype-mapping.d.ts +1 -1
- package/models/routing/util/queries.d.ts +2 -2
- package/models/search/models/Queries.d.ts +4 -2
- package/models/search/models/Search.d.ts +8 -1
- package/models/search/models/SearchActions.d.ts +3 -2
- package/models/search/models/SearchState.d.ts +5 -1
- package/models/search/redux/reducers.d.ts +2 -257
- package/models/search/redux/schema.d.ts +1 -1
- package/models/search/redux/selectors.d.ts +5 -5
- package/models/search/search/ContensisDeliveryApi.d.ts +2 -2
- package/models/search/search/ToJs.d.ts +1 -1
- package/models/search/search/expressions.d.ts +3 -3
- package/models/search/search/util.d.ts +17 -2
- package/models/search/transformations/searchresult-to-state.mapper.d.ts +1 -2
- package/models/server/features/caching/cacheDuration.schema.d.ts +1 -0
- package/models/server/features/linkdepth-api/search.d.ts +1 -1
- package/models/server/features/static-assets/index.d.ts +1 -1
- package/models/server/internalServer.d.ts +1 -1
- package/models/server/util/bundles.d.ts +1 -1
- package/models/server/util/headers.d.ts +1 -1
- package/models/server/webApp.d.ts +1 -1
- package/models/user/components/Login.d.ts +1 -1
- package/models/user/components/LoginForm.d.ts +6 -6
- package/models/user/components/LogoutForm.d.ts +4 -4
- package/models/user/components.styled/Login.styled.d.ts +1 -1
- package/models/user/components.styled/LoginForm.styled.d.ts +1 -1
- package/models/user/hocs/withLogin.d.ts +4 -4
- package/models/user/hooks/useLogin.d.ts +4 -4
- package/models/user/redux/actions.d.ts +7 -6
- package/models/user/redux/sagas/index.d.ts +1 -1
- package/models/user/redux/sagas/login.d.ts +5 -17
- package/models/user/redux/selectors.d.ts +1 -2
- package/models/user/redux/types.d.ts +21 -21
- package/models/user/state.d.ts +12 -0
- package/models/user/transformations/mapClientCredentials.d.ts +3 -1
- package/models/user/util/ContensisManagementApi.d.ts +10 -9
- package/models/user/util/CookieConstants.d.ts +1 -0
- package/models/user/util/CookieHelper.class.d.ts +8 -4
- package/models/user/util/LoginHelper.class.d.ts +25 -37
- package/models/user/util/OidcUserManager.d.ts +1 -1
- package/models/user/util/matchGroups.d.ts +1 -1
- package/models/util/CachedDeliveryApi.d.ts +11 -10
- package/models/util/ContensisDeliveryApi.d.ts +11 -7
- package/models/util/SSRContext.d.ts +29 -0
- package/models/util/index.d.ts +1 -0
- package/models/util/json-mapper.d.ts +4 -5
- package/package.json +71 -92
- package/cjs/App-b56aca04.js.map +0 -1
- package/cjs/ChangePassword.container-ae35785e.js.map +0 -1
- package/cjs/ContensisDeliveryApi-4fcf049d.js.map +0 -1
- package/cjs/CookieConstants-000427db.js +0 -10
- package/cjs/CookieConstants-000427db.js.map +0 -1
- package/cjs/RouteLoader-c06dccd5.js.map +0 -1
- package/cjs/ToJs-a8d8f3f0.js.map +0 -1
- package/cjs/_commonjsHelpers-b3309d7b.js.map +0 -1
- package/cjs/forms.js +0 -5998
- package/cjs/forms.js.map +0 -1
- package/cjs/reducers-73a03ef4.js +0 -257
- package/cjs/reducers-73a03ef4.js.map +0 -1
- package/cjs/sagas-570f23ba.js +0 -2175
- package/cjs/sagas-570f23ba.js.map +0 -1
- package/cjs/selectors-14caa813.js +0 -228
- package/cjs/selectors-14caa813.js.map +0 -1
- package/cjs/version-34d91f68.js.map +0 -1
- package/esm/App-83107d7e.js.map +0 -1
- package/esm/ChangePassword.container-76fd5e9b.js.map +0 -1
- package/esm/ContensisDeliveryApi-fe57a037.js.map +0 -1
- package/esm/CookieConstants-3d3b6531.js +0 -6
- package/esm/CookieConstants-3d3b6531.js.map +0 -1
- package/esm/RouteLoader-29fd689a.js.map +0 -1
- package/esm/ToJs-df57f31d.js.map +0 -1
- package/esm/_commonjsHelpers-1789f0cf.js.map +0 -1
- package/esm/forms.js +0 -5984
- package/esm/forms.js.map +0 -1
- package/esm/reducers-aa8cef1e.js +0 -234
- package/esm/reducers-aa8cef1e.js.map +0 -1
- package/esm/sagas-07e82e18.js +0 -2083
- package/esm/sagas-07e82e18.js.map +0 -1
- package/esm/selectors-691caf02.js +0 -186
- package/esm/selectors-691caf02.js.map +0 -1
- package/esm/version-3d9911e2.js.map +0 -1
- package/models/forms/index.d.ts +0 -1
- /package/models/{redux/appstate.d.ts → models/AppState.d.ts} +0 -0
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var history$1 = require('history');
|
|
4
4
|
var effects = require('@redux-saga/core/effects');
|
|
5
5
|
var log = require('loglevel');
|
|
6
|
-
var
|
|
7
|
-
var version = require('./version-
|
|
8
|
-
var version$1 = require('./version-a410c88e.js');
|
|
9
|
-
var selectors = require('./selectors-14caa813.js');
|
|
6
|
+
var store = require('./store-CADDS7cV.js');
|
|
7
|
+
var version = require('./version-ASZx0NDG.js');
|
|
10
8
|
var to = require('await-to-js');
|
|
11
|
-
var
|
|
9
|
+
var selectors = require('./selectors-wCs5fHD4.js');
|
|
10
|
+
var version$1 = require('./version-CM-bJ62L.js');
|
|
11
|
+
var ChangePassword_container = require('./ChangePassword.container-642SYfpS.js');
|
|
12
12
|
var React = require('react');
|
|
13
13
|
require('react-cookie');
|
|
14
14
|
require('react-redux');
|
|
15
15
|
require('jsonpath-mapper');
|
|
16
|
-
var reducers = require('./reducers-73a03ef4.js');
|
|
17
16
|
var contensisDeliveryApi = require('contensis-delivery-api');
|
|
18
|
-
var ToJs = require('./ToJs-
|
|
17
|
+
var ToJs = require('./ToJs-C9jwV7YB.js');
|
|
19
18
|
require('query-string');
|
|
20
19
|
require('react-router-dom');
|
|
21
|
-
var RouteLoader = require('./RouteLoader-
|
|
20
|
+
var RouteLoader = require('./RouteLoader-DvyYYyIE.js');
|
|
22
21
|
|
|
23
|
-
function
|
|
22
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
24
23
|
|
|
25
24
|
function _interopNamespace(e) {
|
|
26
25
|
if (e && e.__esModule) return e;
|
|
@@ -36,69 +35,60 @@ function _interopNamespace(e) {
|
|
|
36
35
|
}
|
|
37
36
|
});
|
|
38
37
|
}
|
|
39
|
-
n
|
|
38
|
+
n.default = e;
|
|
40
39
|
return Object.freeze(n);
|
|
41
40
|
}
|
|
42
41
|
|
|
43
42
|
var log__namespace = /*#__PURE__*/_interopNamespace(log);
|
|
44
|
-
var to__default = /*#__PURE__*/
|
|
45
|
-
var React__default = /*#__PURE__*/
|
|
43
|
+
var to__default = /*#__PURE__*/_interopDefault(to);
|
|
44
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
46
45
|
|
|
47
|
-
|
|
46
|
+
// Create a history depending on the environment
|
|
47
|
+
const selectedHistory = typeof window !== 'undefined' ? history$1.createBrowserHistory : history$1.createMemoryHistory;
|
|
48
48
|
const history = (options = {}) => selectedHistory(options);
|
|
49
49
|
const browserHistory = selectedHistory();
|
|
50
50
|
|
|
51
|
-
const navigationSagas = [effects.takeEvery(
|
|
51
|
+
const navigationSagas = [effects.takeEvery(store.GET_NODE_TREE, ensureNodeTreeSaga)];
|
|
52
52
|
function* ensureNodeTreeSaga(action) {
|
|
53
|
+
const {
|
|
54
|
+
api,
|
|
55
|
+
language,
|
|
56
|
+
project,
|
|
57
|
+
versionStatus,
|
|
58
|
+
treeDepth
|
|
59
|
+
} = action;
|
|
53
60
|
const state = yield effects.select();
|
|
54
|
-
|
|
55
61
|
try {
|
|
56
|
-
if (!version
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
language: action.language
|
|
62
|
-
});
|
|
63
|
-
|
|
62
|
+
if (!version.hasNavigationTree(state)) {
|
|
63
|
+
const nodes = yield api.getRootNode({
|
|
64
|
+
depth: treeDepth || 0,
|
|
65
|
+
language
|
|
66
|
+
}, versionStatus, project);
|
|
64
67
|
if (nodes) {
|
|
65
68
|
yield effects.put({
|
|
66
|
-
type:
|
|
69
|
+
type: store.SET_NODE_TREE,
|
|
67
70
|
nodes
|
|
68
71
|
});
|
|
69
72
|
} else {
|
|
70
73
|
yield effects.put({
|
|
71
|
-
type:
|
|
74
|
+
type: store.GET_NODE_TREE_ERROR
|
|
72
75
|
});
|
|
73
76
|
}
|
|
74
77
|
}
|
|
75
78
|
} catch (ex) {
|
|
76
79
|
log__namespace.error(...['Error running ensureNodeTreeSaga:', ex]);
|
|
77
80
|
yield effects.put({
|
|
78
|
-
type:
|
|
81
|
+
type: store.GET_NODE_TREE_ERROR,
|
|
79
82
|
error: ex.toString()
|
|
80
83
|
});
|
|
81
84
|
}
|
|
82
85
|
}
|
|
83
86
|
|
|
84
87
|
const sys = {
|
|
85
|
-
contentTypeId: 'sys.contentTypeId',
|
|
86
|
-
dataFormat: 'sys.dataFormat',
|
|
87
|
-
filename: 'sys.properties.filename',
|
|
88
|
-
id: 'sys.id',
|
|
89
|
-
includeInSearch: 'sys.metadata.includeInSearch',
|
|
90
|
-
slug: 'sys.slug',
|
|
91
|
-
uri: 'sys.uri',
|
|
92
88
|
versionStatus: 'sys.versionStatus'
|
|
93
89
|
};
|
|
94
90
|
const Fields = {
|
|
95
|
-
|
|
96
|
-
entryDescription: 'entryDescription',
|
|
97
|
-
keywords: 'keywords',
|
|
98
|
-
sys,
|
|
99
|
-
contentTypeId: 'sys.contentTypeId',
|
|
100
|
-
wildcard: '*'
|
|
101
|
-
};
|
|
91
|
+
sys};
|
|
102
92
|
|
|
103
93
|
const fieldExpression = (field, value, operator = 'equalTo', weight = null) => {
|
|
104
94
|
if (!field || !value) return [];
|
|
@@ -107,21 +97,21 @@ const fieldExpression = (field, value, operator = 'equalTo', weight = null) => {
|
|
|
107
97
|
const defaultExpressions = versionStatus => {
|
|
108
98
|
return [contensisDeliveryApi.Op.equalTo(Fields.sys.versionStatus, versionStatus)];
|
|
109
99
|
};
|
|
110
|
-
|
|
111
100
|
const equalToOrIn = (field, arr, operator = 'equalTo') => arr.length === 0 ? [] : arr.length === 1 ? [contensisDeliveryApi.Op[operator](field, arr[0])] : [contensisDeliveryApi.Op.in(field, ...arr)];
|
|
112
101
|
|
|
113
|
-
const routeEntryByFieldsQuery = (id, language = 'en-GB', fields = [], versionStatus = 'published') => {
|
|
114
|
-
const query = new contensisDeliveryApi.Query(...[...fieldExpression('sys.id', id), ...fieldExpression('sys.language', language), ...defaultExpressions(versionStatus)]);
|
|
102
|
+
const routeEntryByFieldsQuery = (id, language = 'en-GB', contentTypeId = '', fields = [], fieldLinkDepths, versionStatus = 'published') => {
|
|
103
|
+
const query = new contensisDeliveryApi.Query(...[...fieldExpression('sys.id', id), ...fieldExpression('sys.language', language), ...(contentTypeId ? fieldExpression('sys.contentTypeId', contentTypeId) : fieldExpression('sys.dataFormat', 'entry')), ...defaultExpressions(versionStatus)]);
|
|
115
104
|
query.fields = fields;
|
|
105
|
+
query.fieldLinkDepths = fieldLinkDepths;
|
|
116
106
|
return query;
|
|
117
107
|
};
|
|
118
108
|
|
|
119
109
|
const routingSagas = [effects.takeEvery(selectors.SET_NAVIGATION_PATH, getRouteSaga), effects.takeEvery(selectors.SET_ROUTE, setRouteSaga)];
|
|
110
|
+
|
|
120
111
|
/**
|
|
121
112
|
* To navigate / push a specific route via redux middleware
|
|
122
113
|
* @param {path, state} action
|
|
123
114
|
*/
|
|
124
|
-
|
|
125
115
|
function* setRouteSaga(action) {
|
|
126
116
|
yield effects.put({
|
|
127
117
|
type: 'CALL_HISTORY_METHOD',
|
|
@@ -131,87 +121,97 @@ function* setRouteSaga(action) {
|
|
|
131
121
|
}
|
|
132
122
|
});
|
|
133
123
|
}
|
|
134
|
-
|
|
135
124
|
function* getRouteSaga(action) {
|
|
136
125
|
let entry = null;
|
|
137
|
-
|
|
138
126
|
try {
|
|
139
|
-
var _staticRoute$route, _staticRoute$
|
|
140
|
-
|
|
127
|
+
var _staticRoute$route, _staticRoute$route2, _staticRoute$route3, _staticRoute$route4, _appsays, _appsays2, _appsays3, _pathNode3, _pathNode4;
|
|
141
128
|
const {
|
|
142
129
|
withEvents,
|
|
143
130
|
routes: {
|
|
144
131
|
ContentTypeMappings = {}
|
|
145
132
|
} = {},
|
|
146
133
|
staticRoute,
|
|
147
|
-
|
|
134
|
+
// get api instance from ssr context that is connected to the specific request in ssr
|
|
135
|
+
ssr: {
|
|
136
|
+
api
|
|
137
|
+
}
|
|
148
138
|
} = action;
|
|
149
|
-
const api = ContensisDeliveryApi.cachedSearchWithCookies(cookies.raw); // Inject redux { key, reducer, saga } provided by staticRoute
|
|
150
139
|
|
|
151
|
-
|
|
140
|
+
// Inject redux { key, reducer, saga } provided by staticRoute
|
|
141
|
+
if (staticRoute && staticRoute.route.injectRedux) yield effects.call(reduxInjectorSaga, staticRoute.route.injectRedux);
|
|
152
142
|
|
|
143
|
+
// Variables we will pass to setRouteEntry
|
|
153
144
|
let pathNode = null,
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
let contentTypeMapping = {};
|
|
158
|
-
// calls to withEvents.onRouteLoad and onRouteLoaded
|
|
145
|
+
ancestors = null,
|
|
146
|
+
children = [],
|
|
147
|
+
siblings = null;
|
|
148
|
+
let contentTypeMapping = {};
|
|
159
149
|
|
|
150
|
+
// These variables are the return values from
|
|
151
|
+
// calls to withEvents.onRouteLoad and onRouteLoaded
|
|
160
152
|
let appsays,
|
|
161
|
-
|
|
162
|
-
|
|
153
|
+
requireLogin = false;
|
|
163
154
|
if (withEvents && withEvents.onRouteLoad) {
|
|
164
155
|
appsays = yield withEvents.onRouteLoad(action);
|
|
165
156
|
}
|
|
166
157
|
|
|
167
|
-
|
|
168
|
-
|
|
158
|
+
// We could improve this further with a reusable mapper
|
|
159
|
+
// function to return these params given a static route
|
|
160
|
+
// or matching a content type mapping we could call at various points
|
|
161
|
+
// enabling us to mix and match and prioritise inputs if there are multiple
|
|
162
|
+
let linkDepth = staticRoute === null || staticRoute === void 0 || (_staticRoute$route = staticRoute.route) === null || _staticRoute$route === void 0 || (_staticRoute$route = _staticRoute$route.fetchNode) === null || _staticRoute$route === void 0 ? void 0 : _staticRoute$route.linkDepth;
|
|
163
|
+
let fields = staticRoute === null || staticRoute === void 0 || (_staticRoute$route2 = staticRoute.route) === null || _staticRoute$route2 === void 0 || (_staticRoute$route2 = _staticRoute$route2.fetchNode) === null || _staticRoute$route2 === void 0 ? void 0 : _staticRoute$route2.fields;
|
|
164
|
+
let fieldLinkDepths = staticRoute === null || staticRoute === void 0 || (_staticRoute$route3 = staticRoute.route) === null || _staticRoute$route3 === void 0 || (_staticRoute$route3 = _staticRoute$route3.fetchNode) === null || _staticRoute$route3 === void 0 ? void 0 : _staticRoute$route3.fieldLinkDepths;
|
|
165
|
+
let entryMapper = staticRoute === null || staticRoute === void 0 || (_staticRoute$route4 = staticRoute.route) === null || _staticRoute$route4 === void 0 || (_staticRoute$route4 = _staticRoute$route4.fetchNode) === null || _staticRoute$route4 === void 0 ? void 0 : _staticRoute$route4.entryMapper;
|
|
169
166
|
const entryLinkDepth = appsays && appsays.entryLinkDepth !== undefined ? appsays.entryLinkDepth : 2;
|
|
170
|
-
const
|
|
167
|
+
const entryFieldLinkDepths = (_appsays = appsays) === null || _appsays === void 0 ? void 0 : _appsays.entryFieldLinkDepths;
|
|
168
|
+
const setStaticRouteLimits = typeof linkDepth !== 'undefined' || fields || fieldLinkDepths;
|
|
169
|
+
const setContentTypeLimits = !!ContentTypeMappings.find(ct => ct.fields || ct.linkDepth || ct.nodeOptions || ct.fieldLinkDepths);
|
|
171
170
|
const state = yield effects.select();
|
|
172
171
|
const routeEntry = selectors.selectRouteEntry(state, 'js');
|
|
173
172
|
const routeNode = selectors.selectCurrentNode(state, 'js');
|
|
174
173
|
const currentPath = action.path; //selectCurrentPath(state);
|
|
175
|
-
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
|
|
174
|
+
const deliveryApiStatus = version$1.selectVersionStatus(state);
|
|
175
|
+
const project = selectors.selectCurrentProject(state);
|
|
176
|
+
// const isHome = currentPath === '/';
|
|
179
177
|
const isPreview = currentPath && currentPath.startsWith('/preview/');
|
|
180
178
|
const defaultLang = appsays && appsays.defaultLang || 'en-GB';
|
|
181
|
-
|
|
182
|
-
|
|
179
|
+
if (!isPreview && ((_appsays2 = appsays) !== null && _appsays2 !== void 0 && _appsays2.customRouting || staticRoute && !staticRoute.route.fetchNode || routeEntry && action.statePath === action.path && ((_appsays3 = appsays) === null || _appsays3 === void 0 ? void 0 : _appsays3.refetchNode) !== true)) {
|
|
180
|
+
var _staticRoute$route5;
|
|
183
181
|
// To prevent erroneous 404s and wasted network calls, this covers
|
|
184
182
|
// - appsays customRouting and does SET_ENTRY etc. via the consuming app
|
|
185
183
|
// - all staticRoutes (where custom 'route.fetchNode' attribute is falsey)
|
|
186
184
|
// - standard Contensis SiteView Routing where we already have that entry in state
|
|
187
|
-
if (routeEntry && (!staticRoute || staticRoute
|
|
188
|
-
pathNode = {
|
|
185
|
+
if (routeEntry && (!staticRoute || staticRoute !== null && staticRoute !== void 0 && (_staticRoute$route5 = staticRoute.route) !== null && _staticRoute$route5 !== void 0 && _staticRoute$route5.fetchNode)) {
|
|
186
|
+
pathNode = {
|
|
187
|
+
...routeNode,
|
|
189
188
|
entry: null
|
|
190
189
|
};
|
|
191
|
-
pathNode.entry = entry = routeEntry;
|
|
190
|
+
pathNode.entry = entry = routeEntry;
|
|
191
|
+
//Do nothing, the entry is allready the right one.
|
|
192
192
|
// yield put({
|
|
193
193
|
// type: SET_ENTRY,
|
|
194
194
|
// entry,
|
|
195
195
|
// node: routeNode,
|
|
196
196
|
// isLoading: false,
|
|
197
197
|
// });
|
|
198
|
-
|
|
199
198
|
yield effects.put({
|
|
200
199
|
type: selectors.UPDATE_LOADING_STATE,
|
|
201
200
|
isLoading: false
|
|
202
201
|
});
|
|
203
202
|
} else yield effects.call(setRouteEntry, currentPath, routeEntry, yield effects.select(selectors.selectCurrentNode), yield effects.select(selectors.selectCurrentAncestors), yield effects.select(selectors.selectCurrentSiblings));
|
|
204
203
|
} else {
|
|
204
|
+
var _staticRoute$route6;
|
|
205
205
|
// Handle preview routes
|
|
206
206
|
if (isPreview) {
|
|
207
207
|
let splitPath = currentPath.split('/');
|
|
208
208
|
let entryGuid = splitPath[2];
|
|
209
209
|
let language = defaultLang;
|
|
210
|
-
|
|
211
210
|
if (splitPath.length >= 3) {
|
|
212
211
|
//set lang key if available in the path, else use default lang
|
|
213
212
|
//assumes preview url on content type is: http://preview.ALIAS.contensis.cloud/preview/{GUID}/{LANG}
|
|
214
|
-
if (splitPath.length == 4) language = splitPath[3];
|
|
213
|
+
if (splitPath.length == 4) language = splitPath[3];
|
|
214
|
+
// According to product dev we cannot use Node API
|
|
215
215
|
// for previewing entries as it gives a response of []
|
|
216
216
|
// -- apparently it is not correct to request latest content
|
|
217
217
|
// with Node API
|
|
@@ -221,7 +221,6 @@ function* getRouteSaga(action) {
|
|
|
221
221
|
language,
|
|
222
222
|
linkDepth: entryLinkDepth
|
|
223
223
|
});
|
|
224
|
-
|
|
225
224
|
if (previewEntry) {
|
|
226
225
|
pathNode = {
|
|
227
226
|
entry: previewEntry
|
|
@@ -232,29 +231,30 @@ function* getRouteSaga(action) {
|
|
|
232
231
|
}
|
|
233
232
|
}
|
|
234
233
|
} else {
|
|
235
|
-
var _pathNode,
|
|
236
|
-
|
|
234
|
+
var _pathNode, _pathNode2;
|
|
237
235
|
// Handle all other routes
|
|
238
236
|
let nodeError = undefined;
|
|
239
|
-
|
|
237
|
+
// Resolve a stub of route node if we are setting limits in content type mappings
|
|
238
|
+
// Resolve the complete entry with the node if we are setting limits in a static route
|
|
239
|
+
[nodeError, pathNode] = yield to__default.default(api.getNode({
|
|
240
240
|
depth: 0,
|
|
241
241
|
path: currentPath,
|
|
242
|
-
entryFields: setContentTypeLimits ? ['sys.contentTypeId', 'sys.id'] :
|
|
243
|
-
entryLinkDepth:
|
|
242
|
+
entryFields: setStaticRouteLimits ? fields || '*' : setContentTypeLimits ? ['sys.contentTypeId', 'sys.id'] : '*',
|
|
243
|
+
entryLinkDepth: setStaticRouteLimits && typeof linkDepth !== 'undefined' ? linkDepth : entryLinkDepth || 0,
|
|
244
|
+
entryFieldLinkDepths: setStaticRouteLimits ? fieldLinkDepths : setContentTypeLimits ? undefined : entryFieldLinkDepths,
|
|
244
245
|
language: defaultLang,
|
|
245
246
|
versionStatus: deliveryApiStatus
|
|
246
247
|
}, project));
|
|
247
|
-
|
|
248
248
|
if (nodeError) {
|
|
249
249
|
if ([401, 403].includes(nodeError.status)) {
|
|
250
250
|
// Capture specific auth errors with the delivery api
|
|
251
251
|
// and fire the user down the handleRequiresLoginSaga
|
|
252
252
|
// If auth was successful via a refreshToken we need to reload the page
|
|
253
253
|
// to run this getRouteSaga again with the security token cookie
|
|
254
|
-
const userLoggedIn = yield effects.call(ChangePassword_container.handleRequiresLoginSaga, {
|
|
254
|
+
const userLoggedIn = yield effects.call(ChangePassword_container.handleRequiresLoginSaga, {
|
|
255
|
+
...action,
|
|
255
256
|
requireLogin: true
|
|
256
257
|
});
|
|
257
|
-
|
|
258
258
|
if (userLoggedIn && nodeError.status === 401) {
|
|
259
259
|
// Reload the route so we can re-run the routing request now the
|
|
260
260
|
// authentication cookies are written
|
|
@@ -273,31 +273,41 @@ function* getRouteSaga(action) {
|
|
|
273
273
|
entry
|
|
274
274
|
} = pathNode || {});
|
|
275
275
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
276
|
+
// Try resolve a content type mapping
|
|
277
|
+
if ((_pathNode = pathNode) !== null && _pathNode !== void 0 && (_pathNode = _pathNode.entry) !== null && _pathNode !== void 0 && (_pathNode = _pathNode.sys) !== null && _pathNode !== void 0 && _pathNode.id && pathNode.entry.sys.contentTypeId) {
|
|
279
278
|
// Get fields[] and linkDepth from ContentTypeMapping to get the entry data
|
|
280
279
|
// and current node's ordinates at a specified depth with specified fields
|
|
281
|
-
contentTypeMapping = ChangePassword_container.findContentTypeMapping(ContentTypeMappings, pathNode.entry.sys.contentTypeId)
|
|
282
|
-
|
|
280
|
+
contentTypeMapping = ChangePassword_container.findContentTypeMapping(ContentTypeMappings, pathNode.entry.sys.contentTypeId);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// Run a second search query if we aren't setting limits from a static route
|
|
284
|
+
// but we are setting limits from a content type mapping, now we have a handle
|
|
285
|
+
// on a contentTypeId from the resolve node, we can apply the right limits when
|
|
286
|
+
// fetching the entry
|
|
287
|
+
if (!setStaticRouteLimits && setContentTypeLimits && (_pathNode2 = pathNode) !== null && _pathNode2 !== void 0 && (_pathNode2 = _pathNode2.entry) !== null && _pathNode2 !== void 0 && (_pathNode2 = _pathNode2.sys) !== null && _pathNode2 !== void 0 && _pathNode2.id) {
|
|
288
|
+
var _payload$items;
|
|
289
|
+
// Now we have a handle on a content type mapping we can
|
|
290
|
+
// reassign the query limiting variables if we haven't
|
|
291
|
+
// already set them in a static route
|
|
292
|
+
if (!setStaticRouteLimits) ({
|
|
293
|
+
fieldLinkDepths,
|
|
283
294
|
fields,
|
|
284
295
|
linkDepth
|
|
285
|
-
} = contentTypeMapping;
|
|
286
|
-
const query = routeEntryByFieldsQuery(pathNode.entry.sys.id, pathNode.entry.sys.language, fields, deliveryApiStatus);
|
|
296
|
+
} = contentTypeMapping || {});
|
|
297
|
+
const query = routeEntryByFieldsQuery(pathNode.entry.sys.id, pathNode.entry.sys.language, pathNode.entry.sys.contentTypeId, fields, fieldLinkDepths, deliveryApiStatus);
|
|
287
298
|
const payload = yield api.search(query, typeof linkDepth !== 'undefined' ? linkDepth : entryLinkDepth || 0, project);
|
|
288
|
-
|
|
289
|
-
if ((payload === null || payload === void 0 ? void 0 : (_payload$items = payload.items) === null || _payload$items === void 0 ? void 0 : _payload$items.length) > 0) {
|
|
299
|
+
if ((payload === null || payload === void 0 || (_payload$items = payload.items) === null || _payload$items === void 0 ? void 0 : _payload$items.length) > 0) {
|
|
290
300
|
pathNode.entry = entry = payload.items[0];
|
|
291
301
|
}
|
|
292
302
|
}
|
|
293
|
-
}
|
|
294
|
-
// siblings or entire node tree
|
|
295
|
-
|
|
303
|
+
}
|
|
296
304
|
|
|
305
|
+
// make calls to fetch node ancestors, children,
|
|
306
|
+
// siblings or entire node tree
|
|
297
307
|
[ancestors, children, siblings] = yield effects.call(resolveCurrentNodeOrdinates, {
|
|
298
308
|
api,
|
|
299
309
|
appsays,
|
|
300
|
-
contentTypeMapping,
|
|
310
|
+
contentTypeMapping: contentTypeMapping || (staticRoute === null || staticRoute === void 0 || (_staticRoute$route6 = staticRoute.route) === null || _staticRoute$route6 === void 0 ? void 0 : _staticRoute$route6.fetchNode) || {},
|
|
301
311
|
language: defaultLang,
|
|
302
312
|
path: currentPath,
|
|
303
313
|
pathNode,
|
|
@@ -306,39 +316,36 @@ function* getRouteSaga(action) {
|
|
|
306
316
|
});
|
|
307
317
|
if (children) pathNode.children = children;
|
|
308
318
|
}
|
|
319
|
+
const resolvedContentTypeMapping = ChangePassword_container.findContentTypeMapping(ContentTypeMappings, (_pathNode3 = pathNode) === null || _pathNode3 === void 0 || (_pathNode3 = _pathNode3.entry) === null || _pathNode3 === void 0 || (_pathNode3 = _pathNode3.sys) === null || _pathNode3 === void 0 ? void 0 : _pathNode3.contentTypeId) || {};
|
|
309
320
|
|
|
310
|
-
|
|
311
|
-
|
|
321
|
+
// Inject redux { key, reducer, saga } provided by ContentTypeMapping
|
|
312
322
|
if (resolvedContentTypeMapping.injectRedux) yield effects.call(reduxInjectorSaga, resolvedContentTypeMapping.injectRedux);
|
|
313
|
-
|
|
314
323
|
if (withEvents && withEvents.onRouteLoaded) {
|
|
315
324
|
// Check if the app has provided a requireLogin boolean flag or groups array
|
|
316
325
|
// in addition to checking if requireLogin is set in the route definition
|
|
317
326
|
({
|
|
318
327
|
requireLogin
|
|
319
|
-
} = (yield withEvents.onRouteLoaded({
|
|
328
|
+
} = (yield withEvents.onRouteLoaded({
|
|
329
|
+
...action,
|
|
320
330
|
entry
|
|
321
331
|
})) || {});
|
|
322
332
|
}
|
|
323
|
-
|
|
324
333
|
if (requireLogin !== false) {
|
|
325
334
|
// Do not call the login feature saga if requireLogin is false
|
|
326
|
-
yield effects.call(ChangePassword_container.handleRequiresLoginSaga, {
|
|
335
|
+
yield effects.call(ChangePassword_container.handleRequiresLoginSaga, {
|
|
336
|
+
...action,
|
|
327
337
|
entry,
|
|
328
338
|
requireLogin
|
|
329
339
|
});
|
|
330
340
|
}
|
|
331
|
-
|
|
332
341
|
if (!appsays || !appsays.preventScrollTop) {
|
|
333
342
|
// Scroll into View
|
|
334
343
|
if (typeof window !== 'undefined') window.scrollTo(0, 0);
|
|
335
344
|
}
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
var _staticRoute$route3, _staticRoute$route3$f, _appsays;
|
|
339
|
-
|
|
345
|
+
if ((_pathNode4 = pathNode) !== null && _pathNode4 !== void 0 && (_pathNode4 = _pathNode4.entry) !== null && _pathNode4 !== void 0 && (_pathNode4 = _pathNode4.sys) !== null && _pathNode4 !== void 0 && _pathNode4.id) {
|
|
346
|
+
var _appsays4;
|
|
340
347
|
entry = pathNode.entry;
|
|
341
|
-
yield effects.call(setRouteEntry, currentPath, entry, pathNode, ancestors, siblings,
|
|
348
|
+
yield effects.call(setRouteEntry, currentPath, entry, pathNode, ancestors, siblings, entryMapper || resolvedContentTypeMapping.entryMapper, false, (_appsays4 = appsays) === null || _appsays4 === void 0 ? void 0 : _appsays4.refetchNode);
|
|
342
349
|
} else {
|
|
343
350
|
if (staticRoute) yield effects.call(setRouteEntry, currentPath, null, pathNode, ancestors, siblings);else yield effects.call(do404);
|
|
344
351
|
}
|
|
@@ -347,29 +354,30 @@ function* getRouteSaga(action) {
|
|
|
347
354
|
yield effects.call(do500, e);
|
|
348
355
|
}
|
|
349
356
|
}
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
}
|
|
361
|
-
const apiCall = [() => null, () => null, () => null, () => null];
|
|
357
|
+
function* resolveCurrentNodeOrdinates(action) {
|
|
358
|
+
const {
|
|
359
|
+
api,
|
|
360
|
+
appsays,
|
|
361
|
+
contentTypeMapping,
|
|
362
|
+
language,
|
|
363
|
+
path,
|
|
364
|
+
pathNode,
|
|
365
|
+
project,
|
|
366
|
+
versionStatus
|
|
367
|
+
} = action;
|
|
368
|
+
const apiCall = [() => null, () => null, () => null, () => null];
|
|
369
|
+
|
|
370
|
+
// if appsays customNavigation: true, we will set doNavigation to false
|
|
362
371
|
// if appsays customNavigation: { ... }, we will set doNavigation to the customNavigation object and check for child elements
|
|
363
372
|
// if appsays nothing we will set doNavigation to true and continue to do navigation calls
|
|
364
|
-
|
|
365
373
|
const doNavigation = !appsays || ((appsays === null || appsays === void 0 ? void 0 : appsays.customNavigation) === true ? false : (appsays === null || appsays === void 0 ? void 0 : appsays.customNavigation) || true);
|
|
366
374
|
const {
|
|
367
375
|
entryLinkDepth = 0,
|
|
376
|
+
fieldLinkDepths,
|
|
368
377
|
fields,
|
|
369
378
|
linkDepth,
|
|
370
379
|
nodeOptions = {}
|
|
371
380
|
} = contentTypeMapping;
|
|
372
|
-
|
|
373
381
|
if (pathNode && pathNode.id) {
|
|
374
382
|
if (doNavigation === true || doNavigation.ancestors) {
|
|
375
383
|
apiCall[0] = function* getAncestors() {
|
|
@@ -385,17 +393,15 @@ function* resolveCurrentNodeOrdinates({
|
|
|
385
393
|
}
|
|
386
394
|
};
|
|
387
395
|
}
|
|
388
|
-
|
|
389
396
|
const childrenDepth = doNavigation === true || doNavigation.children === true ? 1 : doNavigation && doNavigation.children || 0;
|
|
390
|
-
|
|
391
397
|
if (typeof (nodeOptions === null || nodeOptions === void 0 ? void 0 : nodeOptions.children) === 'undefined' && childrenDepth > 0 || nodeOptions.children) {
|
|
392
|
-
const childrenOptions = typeof nodeOptions.children === 'boolean' ? {} : nodeOptions.children;
|
|
393
|
-
|
|
398
|
+
const childrenOptions = !nodeOptions.children || typeof nodeOptions.children === 'boolean' ? {} : nodeOptions.children;
|
|
394
399
|
apiCall[1] = function* getChildren() {
|
|
395
400
|
try {
|
|
396
401
|
return yield api.getNode({
|
|
397
402
|
depth: childrenOptions.depth !== undefined ? childrenOptions.depth : childrenDepth,
|
|
398
403
|
path,
|
|
404
|
+
entryFieldLinkDepths: childrenOptions.fieldLinkDepths || fieldLinkDepths,
|
|
399
405
|
entryFields: childrenOptions.fields || fields || undefined,
|
|
400
406
|
entryLinkDepth: typeof childrenOptions.linkDepth !== 'undefined' ? childrenOptions.linkDepth : typeof linkDepth !== 'undefined' ? linkDepth : entryLinkDepth,
|
|
401
407
|
language,
|
|
@@ -407,16 +413,15 @@ function* resolveCurrentNodeOrdinates({
|
|
|
407
413
|
}
|
|
408
414
|
};
|
|
409
415
|
}
|
|
410
|
-
|
|
411
416
|
if (typeof (nodeOptions === null || nodeOptions === void 0 ? void 0 : nodeOptions.siblings) === 'undefined' && doNavigation.siblings || nodeOptions.siblings) {
|
|
412
417
|
apiCall[2] = function* getSiblings() {
|
|
413
418
|
try {
|
|
414
|
-
var _nodeOptions$siblings, _nodeOptions$siblings2;
|
|
415
|
-
|
|
419
|
+
var _nodeOptions$siblings, _nodeOptions$siblings2, _nodeOptions$siblings3;
|
|
416
420
|
return yield api.getSiblings({
|
|
417
421
|
id: pathNode.id,
|
|
418
|
-
|
|
419
|
-
|
|
422
|
+
entryFieldLinkDepths: (nodeOptions === null || nodeOptions === void 0 || (_nodeOptions$siblings = nodeOptions.siblings) === null || _nodeOptions$siblings === void 0 ? void 0 : _nodeOptions$siblings.fieldLinkDepths) || fieldLinkDepths,
|
|
423
|
+
entryFields: (nodeOptions === null || nodeOptions === void 0 || (_nodeOptions$siblings2 = nodeOptions.siblings) === null || _nodeOptions$siblings2 === void 0 ? void 0 : _nodeOptions$siblings2.fields) || fields || undefined,
|
|
424
|
+
entryLinkDepth: typeof (nodeOptions === null || nodeOptions === void 0 || (_nodeOptions$siblings3 = nodeOptions.siblings) === null || _nodeOptions$siblings3 === void 0 ? void 0 : _nodeOptions$siblings3.linkDepth) !== 'undefined' ? nodeOptions.siblings.linkDepth : typeof linkDepth !== 'undefined' ? linkDepth : entryLinkDepth,
|
|
420
425
|
includeInMenu: true,
|
|
421
426
|
language,
|
|
422
427
|
versionStatus
|
|
@@ -428,20 +433,18 @@ function* resolveCurrentNodeOrdinates({
|
|
|
428
433
|
};
|
|
429
434
|
}
|
|
430
435
|
}
|
|
431
|
-
|
|
432
|
-
const isTreeLoaded = yield effects.select(version$1.hasNavigationTree);
|
|
436
|
+
const isTreeLoaded = yield effects.select(version.hasNavigationTree);
|
|
433
437
|
if (!isTreeLoaded && (doNavigation === true || doNavigation.tree)) apiCall[3] = function* getNodeTree() {
|
|
434
438
|
const treeDepth = doNavigation === true || !doNavigation.tree || doNavigation.tree === true ? 2 : doNavigation.tree;
|
|
435
|
-
|
|
436
439
|
if (typeof window !== 'undefined') {
|
|
437
440
|
return yield effects.put({
|
|
438
|
-
type:
|
|
439
|
-
|
|
441
|
+
type: store.GET_NODE_TREE,
|
|
442
|
+
...action,
|
|
440
443
|
treeDepth
|
|
441
444
|
});
|
|
442
445
|
} else {
|
|
443
446
|
return yield effects.call(ensureNodeTreeSaga, {
|
|
444
|
-
|
|
447
|
+
...action,
|
|
445
448
|
treeDepth
|
|
446
449
|
});
|
|
447
450
|
}
|
|
@@ -450,15 +453,16 @@ function* resolveCurrentNodeOrdinates({
|
|
|
450
453
|
const [ancestors, nodeWithChildren, siblings] = yield effects.all([loadAncestors(), loadChildren(), loadSiblings(), loadTree()]);
|
|
451
454
|
return [ancestors, nodeWithChildren === null || nodeWithChildren === void 0 ? void 0 : nodeWithChildren.children, siblings];
|
|
452
455
|
}
|
|
453
|
-
|
|
454
456
|
function* setRouteEntry(currentPath, entry, node, ancestors, siblings, entryMapper, notFound = false, remapEntry = false) {
|
|
455
|
-
const entrySys = entry && entry.sys || {};
|
|
456
|
-
// an updated entry id in client-side navigation
|
|
457
|
+
const entrySys = entry && entry.sys || {};
|
|
457
458
|
|
|
459
|
+
// Update a window global to provide the preview toolbar
|
|
460
|
+
// an updated entry id in client-side navigation
|
|
458
461
|
if (typeof window !== 'undefined') window.ContensisEntryId = entrySys.id;
|
|
459
462
|
const currentEntryId = yield effects.select(selectors.selectRouteEntryEntryId);
|
|
460
463
|
const currentEntryLang = yield effects.select(selectors.selectRouteEntryLanguage);
|
|
461
|
-
const mappedEntry = currentEntryId === entrySys.id && currentEntryLang === entrySys.language && remapEntry === false ? (yield effects.select(selectors.selectMappedEntry, 'js')) || {} : yield mapRouteEntry(entryMapper, {
|
|
464
|
+
const mappedEntry = !entryMapper ? null : currentEntryId === entrySys.id && currentEntryLang === entrySys.language && remapEntry === false ? (yield effects.select(selectors.selectMappedEntry, 'js')) || {} : yield mapRouteEntry(entryMapper, {
|
|
465
|
+
...node,
|
|
462
466
|
entry,
|
|
463
467
|
ancestors,
|
|
464
468
|
siblings
|
|
@@ -479,7 +483,6 @@ function* setRouteEntry(currentPath, entry, node, ancestors, siblings, entryMapp
|
|
|
479
483
|
siblings
|
|
480
484
|
})]);
|
|
481
485
|
}
|
|
482
|
-
|
|
483
486
|
function* mapRouteEntry(entryMapper, node) {
|
|
484
487
|
try {
|
|
485
488
|
if (typeof entryMapper === 'function') {
|
|
@@ -489,11 +492,10 @@ function* mapRouteEntry(entryMapper, node) {
|
|
|
489
492
|
}
|
|
490
493
|
} catch (e) {
|
|
491
494
|
log__namespace.error(...['Error running entryMapper:', e, e.stack]);
|
|
495
|
+
throw e;
|
|
492
496
|
}
|
|
493
|
-
|
|
494
497
|
return;
|
|
495
498
|
}
|
|
496
|
-
|
|
497
499
|
function* do404() {
|
|
498
500
|
yield effects.call(clientReloadHitServer);
|
|
499
501
|
yield effects.put({
|
|
@@ -503,17 +505,16 @@ function* do404() {
|
|
|
503
505
|
notFound: true
|
|
504
506
|
});
|
|
505
507
|
}
|
|
506
|
-
|
|
507
508
|
function* clientReloadHitServer() {
|
|
508
|
-
const stateEntry = yield effects.select(selectors.selectRouteEntry);
|
|
509
|
+
const stateEntry = yield effects.select(selectors.selectRouteEntry);
|
|
510
|
+
|
|
511
|
+
// If in client and there is a stateEntry.sys field reload the page,
|
|
509
512
|
// on the 2nd load stateEntry.sys should be null at this point,
|
|
510
513
|
// we do not wish to reload again and get stuck in an infinite reloading loop
|
|
511
|
-
|
|
512
514
|
if (typeof window !== 'undefined' && (stateEntry !== null && stateEntry !== void 0 && stateEntry.sys || null)) {
|
|
513
515
|
window.location.reload();
|
|
514
516
|
}
|
|
515
517
|
}
|
|
516
|
-
|
|
517
518
|
function* do500(error) {
|
|
518
519
|
yield effects.put({
|
|
519
520
|
type: selectors.SET_ENTRY,
|
|
@@ -525,7 +526,6 @@ function* do500(error) {
|
|
|
525
526
|
statusCode: error && error.status ? error.status : 500
|
|
526
527
|
});
|
|
527
528
|
}
|
|
528
|
-
|
|
529
529
|
function* reduxInjectorSaga(injectorFn) {
|
|
530
530
|
if (typeof injectorFn === 'function') {
|
|
531
531
|
const {
|
|
@@ -533,7 +533,7 @@ function* reduxInjectorSaga(injectorFn) {
|
|
|
533
533
|
reducer,
|
|
534
534
|
saga
|
|
535
535
|
} = yield injectorFn();
|
|
536
|
-
version
|
|
536
|
+
version.injectRedux({
|
|
537
537
|
key,
|
|
538
538
|
reducer,
|
|
539
539
|
saga
|
|
@@ -541,20 +541,19 @@ function* reduxInjectorSaga(injectorFn) {
|
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
543
|
|
|
544
|
-
const registerSagas = [effects.takeEvery(
|
|
545
|
-
|
|
544
|
+
const registerSagas = [effects.takeEvery(selectors.REGISTER_USER, registerSaga), effects.takeEvery(selectors.REGISTER_USER_SUCCESS, redirectSaga)];
|
|
546
545
|
function* registerSaga({
|
|
547
546
|
user,
|
|
548
547
|
mappers
|
|
549
548
|
}) {
|
|
550
|
-
let requestBody = user;
|
|
549
|
+
let requestBody = user;
|
|
550
|
+
// Allow use of request mapper to take a user object
|
|
551
551
|
// of any format and return the payload for the api request
|
|
552
|
-
|
|
553
552
|
if (mappers && mappers.request && typeof mappers.request === 'function') {
|
|
554
553
|
requestBody = yield mappers.request(user);
|
|
555
|
-
}
|
|
556
|
-
|
|
554
|
+
}
|
|
557
555
|
|
|
556
|
+
// Make POST call to register API
|
|
558
557
|
const response = yield fetch('/account/register', {
|
|
559
558
|
method: 'POST',
|
|
560
559
|
headers: {
|
|
@@ -563,27 +562,24 @@ function* registerSaga({
|
|
|
563
562
|
},
|
|
564
563
|
body: JSON.stringify(requestBody)
|
|
565
564
|
});
|
|
566
|
-
|
|
567
565
|
if (response.ok) {
|
|
568
566
|
let mappedResponse;
|
|
569
567
|
const [, responseBody] = yield to.to(response.json());
|
|
570
|
-
|
|
571
568
|
if (responseBody) {
|
|
572
569
|
// Allow use of response mapper to convert the successful user object
|
|
573
570
|
// from the api response body into a user object of any format
|
|
574
571
|
if (mappers && mappers.response && typeof mappers.response === 'function') {
|
|
575
572
|
mappedResponse = yield mappers.response(responseBody);
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
|
|
573
|
+
}
|
|
574
|
+
// Update user object with mappedResponse or responseBody
|
|
579
575
|
yield effects.put({
|
|
580
|
-
type:
|
|
576
|
+
type: selectors.REGISTER_USER_SUCCESS,
|
|
581
577
|
user: mappedResponse || responseBody
|
|
582
578
|
});
|
|
583
579
|
} else {
|
|
584
580
|
// OK response but unable to parse the response body
|
|
585
581
|
yield effects.put({
|
|
586
|
-
type:
|
|
582
|
+
type: selectors.REGISTER_USER_FAILED,
|
|
587
583
|
error: {
|
|
588
584
|
message: 'Unable to parse the created user from the register service response'
|
|
589
585
|
}
|
|
@@ -594,25 +590,24 @@ function* registerSaga({
|
|
|
594
590
|
// or status codes echoed from the responses received from
|
|
595
591
|
// management api when registering the user
|
|
596
592
|
const [, errorResponse] = yield to.to(response.json());
|
|
597
|
-
const error = errorResponse && errorResponse.error || errorResponse || {};
|
|
598
|
-
|
|
593
|
+
const error = errorResponse && errorResponse.error || errorResponse || {};
|
|
594
|
+
// Get something meaningful from the response if there is no message in the body
|
|
599
595
|
if (!error.message) {
|
|
600
596
|
error.message = `Registration service: ${response.statusText}`;
|
|
601
597
|
error.status = response.status;
|
|
602
598
|
}
|
|
603
|
-
|
|
604
599
|
yield effects.put({
|
|
605
|
-
type:
|
|
600
|
+
type: selectors.REGISTER_USER_FAILED,
|
|
606
601
|
error
|
|
607
602
|
});
|
|
608
603
|
}
|
|
609
604
|
}
|
|
610
|
-
|
|
611
605
|
function* redirectSaga() {
|
|
612
606
|
// Check if querystring contains a redirect_uri
|
|
613
607
|
const currentQs = selectors.queryParams(yield effects.select(selectors.selectCurrentSearch));
|
|
614
|
-
const redirectUri = currentQs.redirect_uri || currentQs.redirect;
|
|
608
|
+
const redirectUri = currentQs.redirect_uri || currentQs.redirect;
|
|
615
609
|
|
|
610
|
+
// We must use redux based navigation to preserve the registration state
|
|
616
611
|
if (redirectUri) yield effects.put(selectors.setRoute(redirectUri));
|
|
617
612
|
}
|
|
618
613
|
|
|
@@ -630,36 +625,36 @@ const BASE_OPTIONS = {
|
|
|
630
625
|
};
|
|
631
626
|
class UserHelper {
|
|
632
627
|
static async GetUsersEnvironments(securityToken) {
|
|
633
|
-
const options = {
|
|
628
|
+
const options = {
|
|
629
|
+
...BASE_OPTIONS,
|
|
634
630
|
headers: {
|
|
635
631
|
'x-security-token': securityToken
|
|
636
632
|
}
|
|
637
633
|
};
|
|
638
634
|
return await UserHelper.get(USER_ENVS_URL, options);
|
|
639
635
|
}
|
|
640
|
-
|
|
641
636
|
static async ResendUserVerification(userEmail) {
|
|
642
|
-
const options = {
|
|
637
|
+
const options = {
|
|
638
|
+
...BASE_OPTIONS
|
|
643
639
|
};
|
|
644
640
|
return await UserHelper.get(`/${USER_RESEND_VERIFICATION_URI}?user=${userEmail}`, options);
|
|
645
641
|
}
|
|
646
|
-
|
|
647
642
|
static async RequestPasswordReset(userEmailObject) {
|
|
648
|
-
const options = {
|
|
643
|
+
const options = {
|
|
644
|
+
...BASE_OPTIONS,
|
|
649
645
|
body: JSON.stringify(userEmailObject)
|
|
650
646
|
};
|
|
651
647
|
options.method = 'POST';
|
|
652
648
|
return await UserHelper.get(`/${USER_REQUEST_PASSWORD_RESET_URI}`, options);
|
|
653
649
|
}
|
|
654
|
-
|
|
655
650
|
static async ResetPassword(resetPasswordObject) {
|
|
656
|
-
const options = {
|
|
651
|
+
const options = {
|
|
652
|
+
...BASE_OPTIONS,
|
|
657
653
|
body: JSON.stringify(resetPasswordObject)
|
|
658
654
|
};
|
|
659
655
|
options.method = 'POST';
|
|
660
656
|
return await UserHelper.get(`/${USER_RESET_PASSWORD_URI}`, options);
|
|
661
657
|
}
|
|
662
|
-
|
|
663
658
|
static async get(url, options = BASE_OPTIONS) {
|
|
664
659
|
try {
|
|
665
660
|
const responseBody = await api(url, options);
|
|
@@ -672,9 +667,7 @@ class UserHelper {
|
|
|
672
667
|
};
|
|
673
668
|
}
|
|
674
669
|
}
|
|
675
|
-
|
|
676
670
|
}
|
|
677
|
-
|
|
678
671
|
async function api(url, options) {
|
|
679
672
|
return fetch(url, options).then(async response => {
|
|
680
673
|
return response.json().then(data => data);
|
|
@@ -683,103 +676,96 @@ async function api(url, options) {
|
|
|
683
676
|
});
|
|
684
677
|
}
|
|
685
678
|
|
|
686
|
-
const resetPasswordSagas = [effects.takeEvery(
|
|
687
|
-
|
|
679
|
+
const resetPasswordSagas = [effects.takeEvery(selectors.REQUEST_USER_PASSWORD_RESET, requestPasswordResetSaga), effects.takeEvery(selectors.RESET_USER_PASSWORD, resetPasswordSaga), effects.takeEvery(selectors.CHANGE_USER_PASSWORD, changePasswordSaga)];
|
|
688
680
|
function* requestPasswordResetSaga(action) {
|
|
689
681
|
const userEmailObject = action.userEmailObject;
|
|
690
682
|
yield effects.put({
|
|
691
|
-
type:
|
|
683
|
+
type: selectors.REQUEST_USER_PASSWORD_RESET_SENDING
|
|
692
684
|
});
|
|
693
|
-
|
|
694
685
|
if (userEmailObject && userEmailObject.userEmail) {
|
|
695
686
|
try {
|
|
696
687
|
const passwordResetRequestResponse = yield UserHelper.RequestPasswordReset(userEmailObject);
|
|
697
|
-
|
|
698
688
|
if (passwordResetRequestResponse) {
|
|
699
689
|
if (!passwordResetRequestResponse.error) {
|
|
700
690
|
yield effects.put({
|
|
701
|
-
type:
|
|
691
|
+
type: selectors.REQUEST_USER_PASSWORD_RESET_SUCCESS
|
|
702
692
|
});
|
|
703
693
|
} else {
|
|
704
694
|
yield effects.put({
|
|
705
|
-
type:
|
|
695
|
+
type: selectors.REQUEST_USER_PASSWORD_RESET_ERROR,
|
|
706
696
|
error: passwordResetRequestResponse.error.message
|
|
707
697
|
});
|
|
708
698
|
}
|
|
709
699
|
} else {
|
|
710
700
|
yield effects.put({
|
|
711
|
-
type:
|
|
701
|
+
type: selectors.REQUEST_USER_PASSWORD_RESET_ERROR,
|
|
712
702
|
error: 'No response from server'
|
|
713
703
|
});
|
|
714
704
|
}
|
|
715
705
|
} catch (error) {
|
|
716
706
|
yield effects.put({
|
|
717
|
-
type:
|
|
707
|
+
type: selectors.REQUEST_USER_PASSWORD_RESET_ERROR,
|
|
718
708
|
error: error && error.toString()
|
|
719
709
|
});
|
|
720
710
|
}
|
|
721
711
|
} else {
|
|
722
712
|
yield effects.put({
|
|
723
|
-
type:
|
|
713
|
+
type: selectors.REQUEST_USER_PASSWORD_RESET_ERROR,
|
|
724
714
|
error: 'Invalid object'
|
|
725
715
|
});
|
|
726
716
|
}
|
|
727
717
|
}
|
|
728
|
-
|
|
729
718
|
function* resetPasswordSaga(action) {
|
|
730
719
|
const resetPasswordObject = action.resetPasswordObject;
|
|
731
720
|
yield effects.put({
|
|
732
|
-
type:
|
|
721
|
+
type: selectors.RESET_USER_PASSWORD_SENDING
|
|
733
722
|
});
|
|
734
|
-
|
|
735
723
|
if (resetPasswordObject.token && resetPasswordObject.password) {
|
|
736
724
|
try {
|
|
737
725
|
const resetPasswordResponse = yield UserHelper.ResetPassword(resetPasswordObject);
|
|
738
|
-
|
|
739
726
|
if (resetPasswordResponse) {
|
|
740
727
|
if (!resetPasswordResponse.error) {
|
|
741
728
|
yield effects.put({
|
|
742
|
-
type:
|
|
729
|
+
type: selectors.RESET_USER_PASSWORD_SUCCESS
|
|
743
730
|
});
|
|
744
731
|
} else {
|
|
745
732
|
const error = resetPasswordResponse.error.data && resetPasswordResponse.error.data.length > 0 && resetPasswordResponse.error.data[0].message || resetPasswordResponse.error.message;
|
|
746
733
|
yield effects.put({
|
|
747
|
-
type:
|
|
734
|
+
type: selectors.RESET_USER_PASSWORD_ERROR,
|
|
748
735
|
error
|
|
749
736
|
});
|
|
750
737
|
}
|
|
751
738
|
} else {
|
|
752
739
|
yield effects.put({
|
|
753
|
-
type:
|
|
740
|
+
type: selectors.RESET_USER_PASSWORD_ERROR,
|
|
754
741
|
error: 'No response from server'
|
|
755
742
|
});
|
|
756
743
|
}
|
|
757
744
|
} catch (error) {
|
|
758
745
|
yield effects.put({
|
|
759
|
-
type:
|
|
746
|
+
type: selectors.RESET_USER_PASSWORD_ERROR,
|
|
760
747
|
error: error && error.toString()
|
|
761
748
|
});
|
|
762
749
|
}
|
|
763
750
|
} else {
|
|
764
751
|
yield effects.put({
|
|
765
|
-
type:
|
|
752
|
+
type: selectors.RESET_USER_PASSWORD_ERROR,
|
|
766
753
|
error: 'Invalid object'
|
|
767
754
|
});
|
|
768
755
|
}
|
|
769
|
-
}
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
// userId
|
|
770
759
|
// existingPassword
|
|
771
760
|
// newPassword
|
|
772
|
-
|
|
773
|
-
|
|
774
761
|
function* changePasswordSaga(action) {
|
|
775
762
|
if (!action || !action.userId || !action.currentPassword || !action.newPassword) {
|
|
776
763
|
yield effects.put({
|
|
777
|
-
type:
|
|
764
|
+
type: selectors.CHANGE_USER_PASSWORD_ERROR,
|
|
778
765
|
error: 'Invalid action object sent to changePassword saga'
|
|
779
766
|
});
|
|
780
767
|
return;
|
|
781
768
|
}
|
|
782
|
-
|
|
783
769
|
try {
|
|
784
770
|
const changePasswordObject = {
|
|
785
771
|
userId: action.userId,
|
|
@@ -787,34 +773,33 @@ function* changePasswordSaga(action) {
|
|
|
787
773
|
new: action.newPassword
|
|
788
774
|
};
|
|
789
775
|
yield effects.put({
|
|
790
|
-
type:
|
|
776
|
+
type: selectors.CHANGE_USER_PASSWORD_SENDING
|
|
791
777
|
});
|
|
792
778
|
const clientCredentials = yield effects.select(ToJs.selectClientCredentials, 'js');
|
|
793
|
-
const client = yield ChangePassword_container.getManagementApiClient({
|
|
779
|
+
const client = yield ChangePassword_container.getManagementApiClient({
|
|
780
|
+
...clientCredentials
|
|
794
781
|
});
|
|
795
782
|
const [err, res] = yield to.to(client.security.users.updatePassword(changePasswordObject));
|
|
796
|
-
|
|
797
783
|
if (err) {
|
|
798
|
-
var _err$data, _err$
|
|
799
|
-
|
|
800
|
-
const error = (err === null || err === void 0 ? void 0 : (_err$data = err.data) === null || _err$data === void 0 ? void 0 : (_err$data$data = _err$data.data) === null || _err$data$data === void 0 ? void 0 : _err$data$data.length) > 0 && err.data.data[0].message || (err === null || err === void 0 ? void 0 : (_err$data2 = err.data) === null || _err$data2 === void 0 ? void 0 : _err$data2.message);
|
|
784
|
+
var _err$data, _err$data2;
|
|
785
|
+
const error = (err === null || err === void 0 || (_err$data = err.data) === null || _err$data === void 0 || (_err$data = _err$data.data) === null || _err$data === void 0 ? void 0 : _err$data.length) > 0 && err.data.data[0].message || (err === null || err === void 0 || (_err$data2 = err.data) === null || _err$data2 === void 0 ? void 0 : _err$data2.message);
|
|
801
786
|
yield effects.put({
|
|
802
|
-
type:
|
|
787
|
+
type: selectors.CHANGE_USER_PASSWORD_ERROR,
|
|
803
788
|
error
|
|
804
789
|
});
|
|
805
790
|
return;
|
|
806
|
-
}
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
// // eslint-disable-next-line no-console
|
|
807
794
|
// console.log(changePasswordObject);
|
|
808
795
|
// // eslint-disable-next-line no-console
|
|
809
796
|
// console.log(userCredentialsObject);
|
|
810
|
-
|
|
811
|
-
|
|
812
797
|
yield effects.put({
|
|
813
|
-
type:
|
|
798
|
+
type: selectors.CHANGE_USER_PASSWORD_SUCCESS
|
|
814
799
|
});
|
|
815
800
|
} catch (error) {
|
|
816
801
|
yield effects.put({
|
|
817
|
-
type:
|
|
802
|
+
type: selectors.CHANGE_USER_PASSWORD_ERROR,
|
|
818
803
|
error: error && error.toString()
|
|
819
804
|
});
|
|
820
805
|
}
|
|
@@ -830,35 +815,32 @@ function rootSaga (featureSagas = []) {
|
|
|
830
815
|
};
|
|
831
816
|
}
|
|
832
817
|
|
|
833
|
-
const servers = SERVERS;
|
|
834
|
-
/* global SERVERS */
|
|
835
|
-
|
|
818
|
+
const servers = SERVERS; /* global SERVERS */
|
|
836
819
|
const alias = servers.alias.toLowerCase();
|
|
837
|
-
const publicUri = PUBLIC_URI;
|
|
838
|
-
/* global
|
|
820
|
+
const publicUri = PUBLIC_URI; /* global PUBLIC_URI */
|
|
821
|
+
const projects = PROJECTS; /* global PROJECTS */
|
|
839
822
|
|
|
840
|
-
const projects = PROJECTS;
|
|
841
|
-
/* global PROJECTS */
|
|
842
823
|
// return a projectId via the request hostname
|
|
843
|
-
|
|
844
824
|
const pickProject = (hostname, query) => {
|
|
845
825
|
// if localhost we can only infer via a querystring, and take your word for it
|
|
846
826
|
if (hostname == 'localhost') {
|
|
847
827
|
return query && query.p || projects[0].id;
|
|
848
|
-
}
|
|
849
|
-
|
|
828
|
+
}
|
|
850
829
|
|
|
830
|
+
// if hostname is the actual public uri we can return the first project from the list
|
|
851
831
|
if (hostname == publicUri) {
|
|
852
832
|
return projects[0].id;
|
|
853
833
|
}
|
|
834
|
+
let project = 'unknown';
|
|
854
835
|
|
|
855
|
-
|
|
836
|
+
// // go through all the defined projects
|
|
856
837
|
// Object.entries(projects).map(([, p]) => {
|
|
838
|
+
const p = projects[0];
|
|
857
839
|
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
if (hostname.includes(p.publicUri)) project = p.id; // the url structure is different for website (we don't prefix)
|
|
840
|
+
// check if we're accessing via the project's public uri
|
|
841
|
+
if (hostname.includes(p.publicUri)) project = p.id;
|
|
861
842
|
|
|
843
|
+
// the url structure is different for website (we don't prefix)
|
|
862
844
|
if (p.id.startsWith('website')) {
|
|
863
845
|
// check for internal and external hostnames
|
|
864
846
|
// we check live and preview distinctly so our rule does not clash with
|
|
@@ -867,14 +849,13 @@ const pickProject = (hostname, query) => {
|
|
|
867
849
|
} else {
|
|
868
850
|
// check for internal and external hostnames, prefixed with the projectId
|
|
869
851
|
if (hostname.includes(`${p.id.toLowerCase()}-${alias}.cloud.contensis.com`) || hostname.includes(`${p.id.toLowerCase()}.${alias}.contensis.cloud`)) project = p.id;
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
|
|
852
|
+
}
|
|
853
|
+
// });
|
|
873
854
|
return project === 'unknown' ? p.id : project;
|
|
874
855
|
};
|
|
875
856
|
|
|
876
857
|
const AppRoot = props => {
|
|
877
|
-
return /*#__PURE__*/React__default
|
|
858
|
+
return /*#__PURE__*/React__default.default.createElement(RouteLoader.RouteLoader, props);
|
|
878
859
|
};
|
|
879
860
|
|
|
880
861
|
exports.AppRoot = AppRoot;
|
|
@@ -882,4 +863,4 @@ exports.browserHistory = browserHistory;
|
|
|
882
863
|
exports.history = history;
|
|
883
864
|
exports.pickProject = pickProject;
|
|
884
865
|
exports.rootSaga = rootSaga;
|
|
885
|
-
//# sourceMappingURL=App-
|
|
866
|
+
//# sourceMappingURL=App-BNcmM8rN.js.map
|