@zengenti/contensis-react-base 3.2.2-beta.0 → 3.2.2-beta.10
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/cjs/{App-99dbd33c.js → App-D2_FqsUD.js} +34 -34
- package/cjs/App-D2_FqsUD.js.map +1 -0
- package/cjs/{ChangePassword.container-98448cf3.js → ChangePassword.container-DrO8p-7S.js} +17 -34
- package/cjs/{ChangePassword.container-98448cf3.js.map → ChangePassword.container-DrO8p-7S.js.map} +1 -1
- package/cjs/{CookieHelper.class-34994aa1.js → CookieHelper.class-CNL3lC5D.js} +239 -145
- package/cjs/CookieHelper.class-CNL3lC5D.js.map +1 -0
- package/cjs/{RouteLoader-bf91b09e.js → RouteLoader-BrUuhdcK.js} +14 -14
- package/cjs/{RouteLoader-bf91b09e.js.map → RouteLoader-BrUuhdcK.js.map} +1 -1
- package/cjs/{SSRContext-5360635c.js → SSRContext-CmXDzwPL.js} +46 -20
- package/cjs/SSRContext-CmXDzwPL.js.map +1 -0
- package/cjs/{ToJs-7f965106.js → ToJs-C9jwV7YB.js} +25 -24
- package/cjs/{ToJs-7f965106.js.map → ToJs-C9jwV7YB.js.map} +1 -1
- package/cjs/{_commonjsHelpers-b3309d7b.js → _commonjsHelpers-BJu3ubxk.js} +1 -1
- package/cjs/_commonjsHelpers-BJu3ubxk.js.map +1 -0
- package/cjs/client.js +16 -16
- package/cjs/client.js.map +1 -1
- package/cjs/contensis-react-base.js +178 -185
- package/cjs/contensis-react-base.js.map +1 -1
- package/cjs/forms.js +2478 -2482
- package/cjs/forms.js.map +1 -1
- package/cjs/{fromJSLeaveImmer-7c363211.js → fromJSLeaveImmer-Drk6JyYs.js} +2 -2
- package/{esm/fromJSLeaveImmer-e2dacd63.js.map → cjs/fromJSLeaveImmer-Drk6JyYs.js.map} +1 -1
- package/cjs/redux.js +5 -7
- package/cjs/redux.js.map +1 -1
- package/cjs/routing.js +6 -8
- package/cjs/routing.js.map +1 -1
- package/cjs/{sagas-497c6e94.js → sagas-DFdRjqSX.js} +54 -56
- package/cjs/{sagas-497c6e94.js.map → sagas-DFdRjqSX.js.map} +1 -1
- package/cjs/search.js +24 -23
- package/cjs/search.js.map +1 -1
- package/cjs/{selectors-e3f1fd85.js → selectors-wCs5fHD4.js} +43 -44
- package/{esm/selectors-d2bdfe22.js.map → cjs/selectors-wCs5fHD4.js.map} +1 -1
- package/cjs/{store-665c229b.js → store-D8dJBaFw.js} +16 -34
- package/cjs/{store-665c229b.js.map → store-D8dJBaFw.js.map} +1 -1
- package/cjs/{urls-6fcaf4c6.js → urls-DVIwGZmd.js} +1 -1
- package/cjs/{urls-6fcaf4c6.js.map → urls-DVIwGZmd.js.map} +1 -1
- package/cjs/user.js +7 -9
- package/cjs/user.js.map +1 -1
- package/cjs/util.js +46 -46
- package/cjs/util.js.map +1 -1
- package/cjs/{version-7b43af3e.js → version-CM-bJ62L.js} +3 -3
- package/cjs/{version-7b43af3e.js.map → version-CM-bJ62L.js.map} +1 -1
- package/cjs/{version-3b05d6c8.js → version-DSW6Roy9.js} +5 -5
- package/cjs/{version-3b05d6c8.js.map → version-DSW6Roy9.js.map} +1 -1
- package/esm/{App-d7d8f594.js → App-BE7fh-wb.js} +28 -28
- package/esm/App-BE7fh-wb.js.map +1 -0
- package/esm/{ChangePassword.container-ab6cc22d.js → ChangePassword.container-6fQXhkzW.js} +14 -13
- package/esm/{ChangePassword.container-ab6cc22d.js.map → ChangePassword.container-6fQXhkzW.js.map} +1 -1
- package/esm/{CookieHelper.class-6d649751.js → CookieHelper.class-DqJ_o1jL.js} +239 -145
- package/esm/CookieHelper.class-DqJ_o1jL.js.map +1 -0
- package/esm/{RouteLoader-be1b907d.js → RouteLoader-BNKfOnU8.js} +5 -5
- package/esm/{RouteLoader-be1b907d.js.map → RouteLoader-BNKfOnU8.js.map} +1 -1
- package/esm/{SSRContext-42cc028d.js → SSRContext-BoisoiyV.js} +43 -17
- package/esm/SSRContext-BoisoiyV.js.map +1 -0
- package/esm/{ToJs-67b34be1.js → ToJs-B4MH53fx.js} +23 -22
- package/esm/{ToJs-67b34be1.js.map → ToJs-B4MH53fx.js.map} +1 -1
- package/esm/{_commonjsHelpers-1789f0cf.js → _commonjsHelpers-BFTU3MAI.js} +1 -1
- package/esm/_commonjsHelpers-BFTU3MAI.js.map +1 -0
- package/esm/client.js +11 -11
- package/esm/client.js.map +1 -1
- package/esm/contensis-react-base.js +136 -143
- package/esm/contensis-react-base.js.map +1 -1
- package/esm/forms.js +2224 -2226
- package/esm/forms.js.map +1 -1
- package/esm/{fromJSLeaveImmer-e2dacd63.js → fromJSLeaveImmer-DfnbPBKC.js} +1 -1
- package/{cjs/fromJSLeaveImmer-7c363211.js.map → esm/fromJSLeaveImmer-DfnbPBKC.js.map} +1 -1
- package/esm/redux.js +8 -8
- package/esm/routing.js +6 -6
- package/esm/{sagas-b654d1a6.js → sagas-waBQR0Ek.js} +43 -45
- package/esm/{sagas-b654d1a6.js.map → sagas-waBQR0Ek.js.map} +1 -1
- package/esm/search.js +14 -11
- package/esm/search.js.map +1 -1
- package/esm/{selectors-d2bdfe22.js → selectors-BRzliwbK.js} +41 -41
- package/{cjs/selectors-e3f1fd85.js.map → esm/selectors-BRzliwbK.js.map} +1 -1
- package/esm/{store-f524c50d.js → store-Cr0lmZNr.js} +12 -12
- package/esm/{store-f524c50d.js.map → store-Cr0lmZNr.js.map} +1 -1
- package/esm/{urls-eac9a747.js → urls-DfCisos-.js} +1 -1
- package/esm/{urls-eac9a747.js.map → urls-DfCisos-.js.map} +1 -1
- package/esm/user.js +6 -6
- package/esm/user.js.map +1 -1
- package/esm/util.js +10 -8
- package/esm/util.js.map +1 -1
- package/esm/{version-7f50b694.js → version-78jjDnHU.js} +3 -3
- package/esm/{version-7f50b694.js.map → version-78jjDnHU.js.map} +1 -1
- package/esm/{version-dcc28b32.js → version-CB7rIyoF.js} +6 -6
- package/esm/{version-dcc28b32.js.map → version-CB7rIyoF.js.map} +1 -1
- package/models/models/ContentTypeMapping.d.ts +60 -0
- package/models/models/StaticRoute.d.ts +29 -0
- package/models/models/WithEvents.d.ts +29 -0
- package/models/routing/util/queries.d.ts +1 -1
- package/models/user/util/CookieHelper.class.d.ts +2 -1
- package/package.json +23 -34
- package/cjs/App-99dbd33c.js.map +0 -1
- package/cjs/CookieHelper.class-34994aa1.js.map +0 -1
- package/cjs/SSRContext-5360635c.js.map +0 -1
- package/cjs/_commonjsHelpers-b3309d7b.js.map +0 -1
- package/esm/App-d7d8f594.js.map +0 -1
- package/esm/CookieHelper.class-6d649751.js.map +0 -1
- package/esm/SSRContext-42cc028d.js.map +0 -1
- package/esm/_commonjsHelpers-1789f0cf.js.map +0 -1
|
@@ -3,23 +3,23 @@
|
|
|
3
3
|
var history$1 = require('history');
|
|
4
4
|
var effects = require('@redux-saga/core/effects');
|
|
5
5
|
var log = require('loglevel');
|
|
6
|
-
var store = require('./store-
|
|
7
|
-
var version = require('./version-
|
|
6
|
+
var store = require('./store-D8dJBaFw.js');
|
|
7
|
+
var version = require('./version-DSW6Roy9.js');
|
|
8
8
|
var to = require('await-to-js');
|
|
9
|
-
var selectors = require('./selectors-
|
|
10
|
-
var version$1 = require('./version-
|
|
11
|
-
var ChangePassword_container = require('./ChangePassword.container-
|
|
9
|
+
var selectors = require('./selectors-wCs5fHD4.js');
|
|
10
|
+
var version$1 = require('./version-CM-bJ62L.js');
|
|
11
|
+
var ChangePassword_container = require('./ChangePassword.container-DrO8p-7S.js');
|
|
12
12
|
var React = require('react');
|
|
13
13
|
require('react-cookie');
|
|
14
14
|
require('react-redux');
|
|
15
15
|
require('jsonpath-mapper');
|
|
16
16
|
var contensisDeliveryApi = require('contensis-delivery-api');
|
|
17
|
-
var ToJs = require('./ToJs-
|
|
17
|
+
var ToJs = require('./ToJs-C9jwV7YB.js');
|
|
18
18
|
require('react-hot-loader');
|
|
19
19
|
require('query-string');
|
|
20
|
-
var RouteLoader = require('./RouteLoader-
|
|
20
|
+
var RouteLoader = require('./RouteLoader-BrUuhdcK.js');
|
|
21
21
|
|
|
22
|
-
function
|
|
22
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
23
23
|
|
|
24
24
|
function _interopNamespace(e) {
|
|
25
25
|
if (e && e.__esModule) return e;
|
|
@@ -35,13 +35,13 @@ function _interopNamespace(e) {
|
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
n
|
|
38
|
+
n.default = e;
|
|
39
39
|
return Object.freeze(n);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
var log__namespace = /*#__PURE__*/_interopNamespace(log);
|
|
43
|
-
var to__default = /*#__PURE__*/
|
|
44
|
-
var React__default = /*#__PURE__*/
|
|
43
|
+
var to__default = /*#__PURE__*/_interopDefault(to);
|
|
44
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
45
45
|
|
|
46
46
|
// Create a history depending on the environment
|
|
47
47
|
const selectedHistory = typeof window !== 'undefined' ? history$1.createBrowserHistory : history$1.createMemoryHistory;
|
|
@@ -112,8 +112,8 @@ const defaultExpressions = versionStatus => {
|
|
|
112
112
|
};
|
|
113
113
|
const equalToOrIn = (field, arr, operator = 'equalTo') => arr.length === 0 ? [] : arr.length === 1 ? [contensisDeliveryApi.Op[operator](field, arr[0])] : [contensisDeliveryApi.Op.in(field, ...arr)];
|
|
114
114
|
|
|
115
|
-
const routeEntryByFieldsQuery = (id, language = 'en-GB', fields = [], fieldLinkDepths, versionStatus = 'published') => {
|
|
116
|
-
const query = new contensisDeliveryApi.Query(...[...fieldExpression('sys.id', id), ...fieldExpression('sys.language', language), ...defaultExpressions(versionStatus)]);
|
|
115
|
+
const routeEntryByFieldsQuery = (id, language = 'en-GB', contentTypeId = '', fields = [], fieldLinkDepths, versionStatus = 'published') => {
|
|
116
|
+
const query = new contensisDeliveryApi.Query(...[...fieldExpression('sys.id', id), ...fieldExpression('sys.language', language), ...(contentTypeId ? fieldExpression('sys.contentTypeId', contentTypeId) : fieldExpression('sys.dataFormat', 'entry')), ...defaultExpressions(versionStatus)]);
|
|
117
117
|
query.fields = fields;
|
|
118
118
|
query.fieldLinkDepths = fieldLinkDepths;
|
|
119
119
|
return query;
|
|
@@ -137,7 +137,7 @@ function* setRouteSaga(action) {
|
|
|
137
137
|
function* getRouteSaga(action) {
|
|
138
138
|
let entry = null;
|
|
139
139
|
try {
|
|
140
|
-
var _staticRoute$route, _staticRoute$
|
|
140
|
+
var _staticRoute$route, _staticRoute$route2, _staticRoute$route3, _appsays, _appsays2, _appsays3, _pathNode2, _pathNode3;
|
|
141
141
|
const {
|
|
142
142
|
withEvents,
|
|
143
143
|
routes: {
|
|
@@ -167,9 +167,9 @@ function* getRouteSaga(action) {
|
|
|
167
167
|
if (withEvents && withEvents.onRouteLoad) {
|
|
168
168
|
appsays = yield withEvents.onRouteLoad(action);
|
|
169
169
|
}
|
|
170
|
-
const staticRouteLinkDepth = staticRoute === null || staticRoute === void 0
|
|
171
|
-
const staticRouteFields = staticRoute === null || staticRoute === void 0
|
|
172
|
-
const staticRouteFieldLinkDepths = staticRoute === null || staticRoute === void 0
|
|
170
|
+
const staticRouteLinkDepth = staticRoute === null || staticRoute === void 0 || (_staticRoute$route = staticRoute.route) === null || _staticRoute$route === void 0 || (_staticRoute$route = _staticRoute$route.params) === null || _staticRoute$route === void 0 ? void 0 : _staticRoute$route.linkDepth;
|
|
171
|
+
const staticRouteFields = staticRoute === null || staticRoute === void 0 || (_staticRoute$route2 = staticRoute.route) === null || _staticRoute$route2 === void 0 || (_staticRoute$route2 = _staticRoute$route2.params) === null || _staticRoute$route2 === void 0 ? void 0 : _staticRoute$route2.fields;
|
|
172
|
+
const staticRouteFieldLinkDepths = staticRoute === null || staticRoute === void 0 || (_staticRoute$route3 = staticRoute.route) === null || _staticRoute$route3 === void 0 || (_staticRoute$route3 = _staticRoute$route3.params) === null || _staticRoute$route3 === void 0 ? void 0 : _staticRoute$route3.fieldLinkDepths;
|
|
173
173
|
const entryLinkDepth = appsays && appsays.entryLinkDepth !== undefined ? appsays.entryLinkDepth : 2;
|
|
174
174
|
const entryFieldLinkDepths = (_appsays = appsays) === null || _appsays === void 0 ? void 0 : _appsays.entryFieldLinkDepths;
|
|
175
175
|
const setContentTypeLimits = (typeof staticRouteLinkDepth === 'undefined' || !staticRouteFields) && !!ContentTypeMappings.find(ct => ct.fields || ct.linkDepth || ct.nodeOptions || ct.fieldLinkDepths);
|
|
@@ -236,10 +236,10 @@ function* getRouteSaga(action) {
|
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
} else {
|
|
239
|
-
var _pathNode
|
|
239
|
+
var _pathNode;
|
|
240
240
|
// Handle all other routes
|
|
241
241
|
let nodeError = undefined;
|
|
242
|
-
[nodeError, pathNode] = yield to__default
|
|
242
|
+
[nodeError, pathNode] = yield to__default.default(api.getNode({
|
|
243
243
|
depth: 0,
|
|
244
244
|
path: currentPath,
|
|
245
245
|
entryFields: staticRouteFields || (setContentTypeLimits ? ['sys.contentTypeId', 'sys.id'] : '*'),
|
|
@@ -275,7 +275,7 @@ function* getRouteSaga(action) {
|
|
|
275
275
|
} else ({
|
|
276
276
|
entry
|
|
277
277
|
} = pathNode || {});
|
|
278
|
-
if (setContentTypeLimits && (_pathNode = pathNode) !== null && _pathNode !== void 0 && (_pathNode
|
|
278
|
+
if (setContentTypeLimits && (_pathNode = pathNode) !== null && _pathNode !== void 0 && (_pathNode = _pathNode.entry) !== null && _pathNode !== void 0 && (_pathNode = _pathNode.sys) !== null && _pathNode !== void 0 && _pathNode.id) {
|
|
279
279
|
var _payload$items;
|
|
280
280
|
// Get fields[] and linkDepth from ContentTypeMapping to get the entry data
|
|
281
281
|
// and current node's ordinates at a specified depth with specified fields
|
|
@@ -285,9 +285,9 @@ function* getRouteSaga(action) {
|
|
|
285
285
|
fields,
|
|
286
286
|
linkDepth
|
|
287
287
|
} = contentTypeMapping;
|
|
288
|
-
const query = routeEntryByFieldsQuery(pathNode.entry.sys.id, pathNode.entry.sys.language, fields, fieldLinkDepths, deliveryApiStatus);
|
|
288
|
+
const query = routeEntryByFieldsQuery(pathNode.entry.sys.id, pathNode.entry.sys.language, pathNode.entry.sys.contentTypeId, fields, fieldLinkDepths, deliveryApiStatus);
|
|
289
289
|
const payload = yield api.search(query, typeof linkDepth !== 'undefined' ? linkDepth : entryLinkDepth || 0, project);
|
|
290
|
-
if ((payload === null || payload === void 0
|
|
290
|
+
if ((payload === null || payload === void 0 || (_payload$items = payload.items) === null || _payload$items === void 0 ? void 0 : _payload$items.length) > 0) {
|
|
291
291
|
pathNode.entry = entry = payload.items[0];
|
|
292
292
|
}
|
|
293
293
|
}
|
|
@@ -307,7 +307,7 @@ function* getRouteSaga(action) {
|
|
|
307
307
|
});
|
|
308
308
|
if (children) pathNode.children = children;
|
|
309
309
|
}
|
|
310
|
-
const resolvedContentTypeMapping = ChangePassword_container.findContentTypeMapping(ContentTypeMappings, (_pathNode2 = pathNode) === null || _pathNode2 === void 0
|
|
310
|
+
const resolvedContentTypeMapping = ChangePassword_container.findContentTypeMapping(ContentTypeMappings, (_pathNode2 = pathNode) === null || _pathNode2 === void 0 || (_pathNode2 = _pathNode2.entry) === null || _pathNode2 === void 0 || (_pathNode2 = _pathNode2.sys) === null || _pathNode2 === void 0 ? void 0 : _pathNode2.contentTypeId) || {};
|
|
311
311
|
|
|
312
312
|
// Inject redux { key, reducer, saga } provided by ContentTypeMapping
|
|
313
313
|
if (resolvedContentTypeMapping.injectRedux) yield effects.call(reduxInjectorSaga, resolvedContentTypeMapping.injectRedux);
|
|
@@ -333,10 +333,10 @@ function* getRouteSaga(action) {
|
|
|
333
333
|
// Scroll into View
|
|
334
334
|
if (typeof window !== 'undefined') window.scrollTo(0, 0);
|
|
335
335
|
}
|
|
336
|
-
if ((_pathNode3 = pathNode) !== null && _pathNode3 !== void 0 && (_pathNode3
|
|
337
|
-
var _staticRoute$route5,
|
|
336
|
+
if ((_pathNode3 = pathNode) !== null && _pathNode3 !== void 0 && (_pathNode3 = _pathNode3.entry) !== null && _pathNode3 !== void 0 && (_pathNode3 = _pathNode3.sys) !== null && _pathNode3 !== void 0 && _pathNode3.id) {
|
|
337
|
+
var _staticRoute$route5, _appsays4;
|
|
338
338
|
entry = pathNode.entry;
|
|
339
|
-
yield effects.call(setRouteEntry, currentPath, entry, pathNode, ancestors, siblings, (staticRoute === null || staticRoute === void 0
|
|
339
|
+
yield effects.call(setRouteEntry, currentPath, entry, pathNode, ancestors, siblings, (staticRoute === null || staticRoute === void 0 || (_staticRoute$route5 = staticRoute.route) === null || _staticRoute$route5 === void 0 || (_staticRoute$route5 = _staticRoute$route5.fetchNode) === null || _staticRoute$route5 === void 0 ? void 0 : _staticRoute$route5.entryMapper) || resolvedContentTypeMapping.entryMapper, false, (_appsays4 = appsays) === null || _appsays4 === void 0 ? void 0 : _appsays4.refetchNode);
|
|
340
340
|
} else {
|
|
341
341
|
if (staticRoute) yield effects.call(setRouteEntry, currentPath, null, pathNode, ancestors, siblings);else yield effects.call(do404);
|
|
342
342
|
}
|
|
@@ -410,9 +410,9 @@ function* resolveCurrentNodeOrdinates(action) {
|
|
|
410
410
|
var _nodeOptions$siblings, _nodeOptions$siblings2, _nodeOptions$siblings3;
|
|
411
411
|
return yield api.getSiblings({
|
|
412
412
|
id: pathNode.id,
|
|
413
|
-
entryFieldLinkDepths: (nodeOptions === null || nodeOptions === void 0
|
|
414
|
-
entryFields: (nodeOptions === null || nodeOptions === void 0
|
|
415
|
-
entryLinkDepth: typeof (nodeOptions === null || nodeOptions === void 0
|
|
413
|
+
entryFieldLinkDepths: (nodeOptions === null || nodeOptions === void 0 || (_nodeOptions$siblings = nodeOptions.siblings) === null || _nodeOptions$siblings === void 0 ? void 0 : _nodeOptions$siblings.fieldLinkDepths) || fieldLinkDepths,
|
|
414
|
+
entryFields: (nodeOptions === null || nodeOptions === void 0 || (_nodeOptions$siblings2 = nodeOptions.siblings) === null || _nodeOptions$siblings2 === void 0 ? void 0 : _nodeOptions$siblings2.fields) || fields || undefined,
|
|
415
|
+
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,
|
|
416
416
|
includeInMenu: true,
|
|
417
417
|
language,
|
|
418
418
|
versionStatus
|
|
@@ -452,7 +452,7 @@ function* setRouteEntry(currentPath, entry, node, ancestors, siblings, entryMapp
|
|
|
452
452
|
if (typeof window !== 'undefined') window.ContensisEntryId = entrySys.id;
|
|
453
453
|
const currentEntryId = yield effects.select(selectors.selectRouteEntryEntryId);
|
|
454
454
|
const currentEntryLang = yield effects.select(selectors.selectRouteEntryLanguage);
|
|
455
|
-
const mappedEntry = currentEntryId === entrySys.id && currentEntryLang === entrySys.language && remapEntry === false ? (yield effects.select(selectors.selectMappedEntry, 'js')) || {} : yield mapRouteEntry(entryMapper, {
|
|
455
|
+
const mappedEntry = !entryMapper ? null : currentEntryId === entrySys.id && currentEntryLang === entrySys.language && remapEntry === false ? (yield effects.select(selectors.selectMappedEntry, 'js')) || {} : yield mapRouteEntry(entryMapper, {
|
|
456
456
|
...node,
|
|
457
457
|
entry,
|
|
458
458
|
ancestors,
|
|
@@ -771,8 +771,8 @@ function* changePasswordSaga(action) {
|
|
|
771
771
|
});
|
|
772
772
|
const [err, res] = yield to.to(client.security.users.updatePassword(changePasswordObject));
|
|
773
773
|
if (err) {
|
|
774
|
-
var _err$data, _err$
|
|
775
|
-
const error = (err === null || err === void 0
|
|
774
|
+
var _err$data, _err$data2;
|
|
775
|
+
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);
|
|
776
776
|
yield effects.put({
|
|
777
777
|
type: selectors.CHANGE_USER_PASSWORD_ERROR,
|
|
778
778
|
error
|
|
@@ -845,7 +845,7 @@ const pickProject = (hostname, query) => {
|
|
|
845
845
|
};
|
|
846
846
|
|
|
847
847
|
const AppRoot = props => {
|
|
848
|
-
return /*#__PURE__*/React__default
|
|
848
|
+
return /*#__PURE__*/React__default.default.createElement(RouteLoader.RouteLoader, props);
|
|
849
849
|
};
|
|
850
850
|
|
|
851
851
|
exports.AppRoot = AppRoot;
|
|
@@ -853,4 +853,4 @@ exports.browserHistory = browserHistory;
|
|
|
853
853
|
exports.history = history;
|
|
854
854
|
exports.pickProject = pickProject;
|
|
855
855
|
exports.rootSaga = rootSaga;
|
|
856
|
-
//# sourceMappingURL=App-
|
|
856
|
+
//# sourceMappingURL=App-D2_FqsUD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"App-D2_FqsUD.js","sources":["../src/redux/store/history.js","../src/redux/sagas/navigation.js","../src/util/schema.ts","../src/routing/util/expressions.ts","../src/routing/util/queries.ts","../src/routing/redux/sagas.js","../src/user/redux/sagas/register.js","../src/user/util/userHelper.js","../src/user/redux/sagas/resetPassword.js","../src/user/redux/sagas/index.ts","../src/redux/sagas/index.js","../src/util/pickProject.js","../src/app/App.tsx"],"sourcesContent":["import { createBrowserHistory, createMemoryHistory } from 'history';\n\n// Create a history depending on the environment\nconst selectedHistory =\n typeof window !== 'undefined' ? createBrowserHistory : createMemoryHistory;\n\nexport const history = (options = {}) => selectedHistory(options);\nexport const browserHistory = selectedHistory();\n","import { takeEvery, put, select } from 'redux-saga/effects';\nimport * as log from 'loglevel';\n\nimport {\n GET_NODE_TREE,\n SET_NODE_TREE,\n GET_NODE_TREE_ERROR,\n} from '~/redux/types/navigation';\nimport { hasNavigationTree } from '~/redux/selectors/navigation';\n\nexport const navigationSagas = [takeEvery(GET_NODE_TREE, ensureNodeTreeSaga)];\n\nexport function* ensureNodeTreeSaga(action) {\n const { api, language, project, versionStatus, treeDepth } = action;\n const state = yield select();\n try {\n if (!hasNavigationTree(state)) {\n const nodes = yield api.getRootNode(\n {\n depth: treeDepth || 0,\n language,\n },\n versionStatus,\n project\n );\n if (nodes) {\n yield put({ type: SET_NODE_TREE, nodes });\n } else {\n yield put({ type: GET_NODE_TREE_ERROR });\n }\n }\n } catch (ex) {\n log.error(...['Error running ensureNodeTreeSaga:', ex]);\n yield put({ type: GET_NODE_TREE_ERROR, error: ex.toString() });\n }\n}\n","export const DataFormats = {\n entry: 'entry',\n webpage: 'webpage',\n};\n\nconst sys = {\n contentTypeId: 'sys.contentTypeId',\n dataFormat: 'sys.dataFormat',\n filename: 'sys.properties.filename',\n id: 'sys.id',\n includeInSearch: 'sys.metadata.includeInSearch',\n slug: 'sys.slug',\n uri: 'sys.uri',\n versionStatus: 'sys.versionStatus',\n};\n\nexport const Fields = {\n entryTitle: 'entryTitle',\n entryDescription: 'entryDescription',\n keywords: 'keywords',\n sys,\n contentTypeId: 'sys.contentTypeId',\n wildcard: '*',\n};\n\nexport const VersionStatus = {\n published: 'published',\n latest: 'latest',\n};\n","import { IExpression } from 'contensis-core-api';\nimport { Op } from 'contensis-delivery-api';\nimport { Fields } from '~/util/schema';\n\nexport const fieldExpression = (\n field: string,\n value: string | string[],\n operator = 'equalTo',\n weight = null\n) => {\n if (!field || !value) return [];\n if (Array.isArray(value)) return equalToOrIn(field, value, operator);\n else\n return !weight\n ? [Op[operator](field, value)]\n : [Op[operator](field, value).weight(weight)];\n};\n\nexport const defaultExpressions = (\n versionStatus: 'published' | 'latest'\n): IExpression[] => {\n return [Op.equalTo(Fields.sys.versionStatus, versionStatus)];\n};\n\nconst equalToOrIn = (field: string, arr: string[], operator = 'equalTo') =>\n arr.length === 0\n ? []\n : arr.length === 1\n ? [Op[operator](field, arr[0])]\n : [Op.in(field, ...arr)];\n","import { FieldLinkDepths, VersionStatus } from 'contensis-core-api';\nimport { Query } from 'contensis-delivery-api';\nimport { fieldExpression, defaultExpressions } from './expressions';\n\nexport const routeEntryByFieldsQuery = (\n id: string,\n language = 'en-GB',\n contentTypeId = '',\n fields: string[] = [],\n fieldLinkDepths: FieldLinkDepths,\n versionStatus: VersionStatus = 'published'\n) => {\n const query = new Query(\n ...[\n ...fieldExpression('sys.id', id),\n ...fieldExpression('sys.language', language),\n ...(contentTypeId\n ? fieldExpression('sys.contentTypeId', contentTypeId)\n : fieldExpression('sys.dataFormat', 'entry')),\n ...defaultExpressions(versionStatus),\n ]\n );\n query.fields = fields;\n query.fieldLinkDepths = fieldLinkDepths;\n return query;\n};\n","import to from 'await-to-js';\nimport * as log from 'loglevel';\nimport { takeEvery, put, select, call, all } from 'redux-saga/effects';\n\nimport {\n SET_ENTRY,\n SET_ANCESTORS,\n SET_NAVIGATION_PATH,\n SET_ROUTE,\n SET_SIBLINGS,\n UPDATE_LOADING_STATE,\n} from './types';\nimport { GET_NODE_TREE } from '~/redux/types/navigation';\nimport {\n selectCurrentAncestors,\n selectCurrentNode,\n selectCurrentProject,\n selectCurrentSiblings,\n selectMappedEntry,\n selectRouteEntry,\n selectRouteEntryEntryId,\n selectRouteEntryLanguage,\n} from './selectors';\nimport { hasNavigationTree } from '~/redux/selectors/navigation';\nimport { selectVersionStatus } from '~/redux/selectors/version';\nimport { handleRequiresLoginSaga } from '~/user/redux/sagas/login';\nimport { ensureNodeTreeSaga } from '~/redux/sagas/navigation';\nimport { injectRedux as reduxInjector } from '~/redux/store/injectors';\n\nimport { LoginHelper } from '~/user';\nimport { findContentTypeMapping } from '../util/find-contenttype-mapping';\nimport { routeEntryByFieldsQuery } from '../util/queries';\n\nexport const routingSagas = [\n takeEvery(SET_NAVIGATION_PATH, getRouteSaga),\n takeEvery(SET_ROUTE, setRouteSaga),\n];\n\n/**\n * To navigate / push a specific route via redux middleware\n * @param {path, state} action\n */\nfunction* setRouteSaga(action) {\n yield put({\n type: 'CALL_HISTORY_METHOD',\n payload: {\n method: 'push',\n args: [action.path, action.state],\n },\n });\n}\n\nfunction* getRouteSaga(action) {\n let entry = null;\n try {\n const {\n withEvents,\n routes: { ContentTypeMappings = {} } = {},\n staticRoute,\n // get api instance from ssr context that is connected to the specific request in ssr\n ssr: { api },\n } = action;\n\n // Inject redux { key, reducer, saga } provided by staticRoute\n if (staticRoute && staticRoute.route.injectRedux)\n yield call(reduxInjectorSaga, staticRoute.route.injectRedux);\n\n // Variables we will pass to setRouteEntry\n let pathNode = null,\n ancestors = null,\n children = [],\n siblings = null;\n\n let contentTypeMapping = {};\n\n // These variables are the return values from\n // calls to withEvents.onRouteLoad and onRouteLoaded\n let appsays,\n requireLogin = false;\n\n if (withEvents && withEvents.onRouteLoad) {\n appsays = yield withEvents.onRouteLoad(action);\n }\n\n const staticRouteLinkDepth = staticRoute?.route?.params?.linkDepth;\n const staticRouteFields = staticRoute?.route?.params?.fields;\n const staticRouteFieldLinkDepths =\n staticRoute?.route?.params?.fieldLinkDepths;\n const entryLinkDepth =\n appsays && appsays.entryLinkDepth !== undefined\n ? appsays.entryLinkDepth\n : 2;\n const entryFieldLinkDepths = appsays?.entryFieldLinkDepths;\n const setContentTypeLimits =\n (typeof staticRouteLinkDepth === 'undefined' || !staticRouteFields) &&\n !!ContentTypeMappings.find(\n ct => ct.fields || ct.linkDepth || ct.nodeOptions || ct.fieldLinkDepths\n );\n\n const state = yield select();\n const routeEntry = selectRouteEntry(state, 'js');\n const routeNode = selectCurrentNode(state, 'js');\n const currentPath = action.path; //selectCurrentPath(state);\n const deliveryApiStatus = selectVersionStatus(state);\n const project = selectCurrentProject(state);\n // const isHome = currentPath === '/';\n const isPreview = currentPath && currentPath.startsWith('/preview/');\n const defaultLang = (appsays && appsays.defaultLang) || 'en-GB';\n\n if (\n !isPreview &&\n (appsays?.customRouting ||\n (staticRoute && !staticRoute.route.fetchNode) ||\n (routeEntry &&\n action.statePath === action.path &&\n appsays?.refetchNode !== true))\n ) {\n // To prevent erroneous 404s and wasted network calls, this covers\n // - appsays customRouting and does SET_ENTRY etc. via the consuming app\n // - all staticRoutes (where custom 'route.fetchNode' attribute is falsey)\n // - standard Contensis SiteView Routing where we already have that entry in state\n if (routeEntry && (!staticRoute || staticRoute?.route?.fetchNode)) {\n pathNode = { ...routeNode, entry: null };\n pathNode.entry = entry = routeEntry;\n //Do nothing, the entry is allready the right one.\n // yield put({\n // type: SET_ENTRY,\n // entry,\n // node: routeNode,\n // isLoading: false,\n // });\n yield put({\n type: UPDATE_LOADING_STATE,\n isLoading: false,\n });\n } else\n yield call(\n setRouteEntry,\n currentPath,\n routeEntry,\n yield select(selectCurrentNode),\n yield select(selectCurrentAncestors),\n yield select(selectCurrentSiblings)\n );\n } else {\n // Handle preview routes\n if (isPreview) {\n let splitPath = currentPath.split('/');\n let entryGuid = splitPath[2];\n let language = defaultLang;\n if (splitPath.length >= 3) {\n //set lang key if available in the path, else use default lang\n //assumes preview url on content type is: http://preview.ALIAS.contensis.cloud/preview/{GUID}/{LANG}\n if (splitPath.length == 4) language = splitPath[3];\n // According to product dev we cannot use Node API\n // for previewing entries as it gives a response of []\n // -- apparently it is not correct to request latest content\n // with Node API\n\n let previewEntry = yield api\n .getClient(deliveryApiStatus, project)\n .entries.get({\n id: entryGuid,\n language,\n linkDepth: entryLinkDepth,\n });\n if (previewEntry) {\n pathNode = { entry: previewEntry };\n ({ entry } = pathNode || {});\n }\n }\n } else {\n // Handle all other routes\n let nodeError = undefined;\n [nodeError, pathNode] = yield to(\n api.getNode(\n {\n depth: 0,\n path: currentPath,\n entryFields:\n staticRouteFields ||\n (setContentTypeLimits ? ['sys.contentTypeId', 'sys.id'] : '*'),\n entryLinkDepth:\n typeof staticRouteLinkDepth !== 'undefined'\n ? staticRouteLinkDepth\n : entryLinkDepth || 0,\n entryFieldLinkDepths:\n staticRouteFieldLinkDepths ||\n (!setContentTypeLimits ? entryFieldLinkDepths : undefined),\n language: defaultLang,\n versionStatus: deliveryApiStatus,\n },\n project\n )\n );\n if (nodeError) {\n if ([401, 403].includes(nodeError.status)) {\n // Capture specific auth errors with the delivery api\n // and fire the user down the handleRequiresLoginSaga\n // If auth was successful via a refreshToken we need to reload the page\n // to run this getRouteSaga again with the security token cookie\n const userLoggedIn = yield call(handleRequiresLoginSaga, {\n ...action,\n requireLogin: true,\n });\n if (userLoggedIn && nodeError.status === 401) {\n // Reload the route so we can re-run the routing request now the\n // authentication cookies are written\n return yield call(setRouteSaga, { path: currentPath });\n } else if (userLoggedIn && nodeError.status === 403) {\n return yield call(setRouteSaga, {\n path: LoginHelper.GetAccessDeniedRoute(currentPath),\n });\n } else {\n return yield call(do500, nodeError);\n }\n } else throw nodeError;\n } else ({ entry } = pathNode || {});\n\n if (setContentTypeLimits && pathNode?.entry?.sys?.id) {\n // Get fields[] and linkDepth from ContentTypeMapping to get the entry data\n // and current node's ordinates at a specified depth with specified fields\n contentTypeMapping =\n findContentTypeMapping(\n ContentTypeMappings,\n pathNode.entry.sys.contentTypeId\n ) || {};\n const { fieldLinkDepths, fields, linkDepth } = contentTypeMapping;\n const query = routeEntryByFieldsQuery(\n pathNode.entry.sys.id,\n pathNode.entry.sys.language,\n pathNode.entry.sys.contentTypeId,\n fields,\n fieldLinkDepths,\n deliveryApiStatus\n );\n const payload = yield api.search(\n query,\n typeof linkDepth !== 'undefined' ? linkDepth : entryLinkDepth || 0,\n project\n );\n if (payload?.items?.length > 0) {\n pathNode.entry = entry = payload.items[0];\n }\n }\n }\n\n // make calls to fetch node ancestors, children,\n // siblings or entire node tree\n [ancestors, children, siblings] = yield call(\n resolveCurrentNodeOrdinates,\n {\n api,\n appsays,\n contentTypeMapping,\n language: defaultLang,\n path: currentPath,\n pathNode,\n project,\n versionStatus: deliveryApiStatus,\n }\n );\n\n if (children) pathNode.children = children;\n }\n\n const resolvedContentTypeMapping =\n findContentTypeMapping(\n ContentTypeMappings,\n pathNode?.entry?.sys?.contentTypeId\n ) || {};\n\n // Inject redux { key, reducer, saga } provided by ContentTypeMapping\n if (resolvedContentTypeMapping.injectRedux)\n yield call(reduxInjectorSaga, resolvedContentTypeMapping.injectRedux);\n\n if (withEvents && withEvents.onRouteLoaded) {\n // Check if the app has provided a requireLogin boolean flag or groups array\n // in addition to checking if requireLogin is set in the route definition\n ({ requireLogin } =\n (yield withEvents.onRouteLoaded({ ...action, entry })) || {});\n }\n\n if (requireLogin !== false) {\n // Do not call the login feature saga if requireLogin is false\n yield call(handleRequiresLoginSaga, {\n ...action,\n entry,\n requireLogin,\n });\n }\n\n if (!appsays || !appsays.preventScrollTop) {\n // Scroll into View\n if (typeof window !== 'undefined') window.scrollTo(0, 0);\n }\n\n if (pathNode?.entry?.sys?.id) {\n entry = pathNode.entry;\n\n yield call(\n setRouteEntry,\n currentPath,\n entry,\n pathNode,\n ancestors,\n siblings,\n staticRoute?.route?.fetchNode?.entryMapper ||\n resolvedContentTypeMapping.entryMapper,\n false,\n appsays?.refetchNode\n );\n } else {\n if (staticRoute)\n yield call(\n setRouteEntry,\n currentPath,\n null,\n pathNode,\n ancestors,\n siblings\n );\n else yield call(do404);\n }\n } catch (e) {\n log.error(...['Error running route saga:', e, e.stack]);\n yield call(do500, e);\n }\n}\n\nfunction* resolveCurrentNodeOrdinates(action) {\n const {\n api,\n appsays,\n contentTypeMapping,\n language,\n path,\n pathNode,\n project,\n versionStatus,\n } = action;\n const apiCall = [() => null, () => null, () => null, () => null];\n\n // if appsays customNavigation: true, we will set doNavigation to false\n // if appsays customNavigation: { ... }, we will set doNavigation to the customNavigation object and check for child elements\n // if appsays nothing we will set doNavigation to true and continue to do navigation calls\n const doNavigation =\n !appsays ||\n (appsays?.customNavigation === true\n ? false\n : appsays?.customNavigation || true);\n\n const {\n entryLinkDepth = 0,\n fieldLinkDepths,\n fields,\n linkDepth,\n nodeOptions = {},\n } = contentTypeMapping;\n\n if (pathNode && pathNode.id) {\n if (doNavigation === true || doNavigation.ancestors) {\n apiCall[0] = function* getAncestors() {\n try {\n return yield api.getAncestors(\n {\n id: pathNode.id,\n language,\n versionStatus,\n },\n project\n );\n } catch (ex) {\n log.info('Problem fetching ancestors', ex);\n return [];\n }\n };\n }\n\n const childrenDepth =\n doNavigation === true || doNavigation.children === true\n ? 1\n : (doNavigation && doNavigation.children) || 0;\n\n if (\n (typeof nodeOptions?.children === 'undefined' && childrenDepth > 0) ||\n nodeOptions.children\n ) {\n const childrenOptions =\n !nodeOptions.children || typeof nodeOptions.children === 'boolean'\n ? {}\n : nodeOptions.children;\n apiCall[1] = function* getChildren() {\n try {\n return yield api.getNode(\n {\n depth:\n childrenOptions.depth !== undefined\n ? childrenOptions.depth\n : childrenDepth,\n path,\n entryFieldLinkDepths:\n childrenOptions.fieldLinkDepths || fieldLinkDepths,\n entryFields: childrenOptions.fields || fields || undefined,\n entryLinkDepth:\n typeof childrenOptions.linkDepth !== 'undefined'\n ? childrenOptions.linkDepth\n : typeof linkDepth !== 'undefined'\n ? linkDepth\n : entryLinkDepth,\n language,\n versionStatus,\n },\n project\n );\n } catch (ex) {\n log.info('Problem fetching children', ex);\n return [];\n }\n };\n }\n\n if (\n (typeof nodeOptions?.siblings === 'undefined' && doNavigation.siblings) ||\n nodeOptions.siblings\n ) {\n apiCall[2] = function* getSiblings() {\n try {\n return yield api.getSiblings(\n {\n id: pathNode.id,\n entryFieldLinkDepths:\n nodeOptions?.siblings?.fieldLinkDepths || fieldLinkDepths,\n entryFields: nodeOptions?.siblings?.fields || fields || undefined,\n entryLinkDepth:\n typeof nodeOptions?.siblings?.linkDepth !== 'undefined'\n ? nodeOptions.siblings.linkDepth\n : typeof linkDepth !== 'undefined'\n ? linkDepth\n : entryLinkDepth,\n includeInMenu: true,\n language,\n versionStatus,\n },\n project\n );\n } catch (ex) {\n log.info('Problem fetching siblings', ex);\n return [];\n }\n };\n }\n }\n\n const isTreeLoaded = yield select(hasNavigationTree);\n if (!isTreeLoaded && (doNavigation === true || doNavigation.tree))\n apiCall[3] = function* getNodeTree() {\n const treeDepth =\n doNavigation === true ||\n !doNavigation.tree ||\n doNavigation.tree === true\n ? 2\n : doNavigation.tree;\n\n if (typeof window !== 'undefined') {\n return yield put({\n type: GET_NODE_TREE,\n ...action,\n treeDepth,\n });\n } else {\n return yield call(ensureNodeTreeSaga, { ...action, treeDepth });\n }\n };\n\n const [loadAncestors, loadChildren, loadSiblings, loadTree] = apiCall;\n const [ancestors, nodeWithChildren, siblings] = yield all([\n loadAncestors(),\n loadChildren(),\n loadSiblings(),\n loadTree(),\n ]);\n return [ancestors, nodeWithChildren?.children, siblings];\n}\n\nfunction* setRouteEntry(\n currentPath,\n entry,\n node,\n ancestors,\n siblings,\n entryMapper,\n notFound = false,\n remapEntry = false\n) {\n const entrySys = (entry && entry.sys) || {};\n\n // Update a window global to provide the preview toolbar\n // an updated entry id in client-side navigation\n if (typeof window !== 'undefined') window.ContensisEntryId = entrySys.id;\n\n const currentEntryId = yield select(selectRouteEntryEntryId);\n const currentEntryLang = yield select(selectRouteEntryLanguage);\n const mappedEntry = !entryMapper\n ? null\n : currentEntryId === entrySys.id &&\n currentEntryLang === entrySys.language &&\n remapEntry === false\n ? (yield select(selectMappedEntry, 'js')) || {}\n : yield mapRouteEntry(entryMapper, {\n ...node,\n entry,\n ancestors,\n siblings,\n });\n\n yield all([\n put({\n type: SET_ENTRY,\n id: entrySys.id,\n currentPath,\n entry,\n mappedEntry,\n node,\n notFound,\n }),\n ancestors &&\n put({\n type: SET_ANCESTORS,\n ancestors,\n }),\n siblings &&\n put({\n type: SET_SIBLINGS,\n siblings,\n }),\n ]);\n}\n\nfunction* mapRouteEntry(entryMapper, node) {\n try {\n if (typeof entryMapper === 'function') {\n const state = yield select();\n const mappedEntry = yield call(entryMapper, node, state);\n return mappedEntry;\n }\n } catch (e) {\n log.error(...['Error running entryMapper:', e, e.stack]);\n }\n return;\n}\n\nfunction* do404() {\n yield call(clientReloadHitServer);\n yield put({\n type: SET_ENTRY,\n id: null,\n entry: null,\n notFound: true,\n });\n}\n\nfunction* clientReloadHitServer() {\n const stateEntry = yield select(selectRouteEntry);\n\n // If in client and there is a stateEntry.sys field reload the page,\n // on the 2nd load stateEntry.sys should be null at this point,\n // we do not wish to reload again and get stuck in an infinite reloading loop\n if (typeof window !== 'undefined' && (stateEntry?.sys || null)) {\n window.location.reload();\n }\n}\n\nfunction* do500(error) {\n yield put({\n type: SET_ENTRY,\n id: null,\n entry: null,\n notFound: true,\n isError: true,\n error,\n statusCode: error && error.status ? error.status : 500,\n });\n}\n\nfunction* reduxInjectorSaga(injectorFn) {\n if (typeof injectorFn === 'function') {\n const { key, reducer, saga } = yield injectorFn();\n reduxInjector({ key, reducer, saga });\n }\n}\n","import { to } from 'await-to-js';\nimport { put, select, takeEvery } from 'redux-saga/effects';\nimport { setRoute } from '~/routing/redux/actions';\nimport { selectCurrentSearch } from '~/routing/redux/selectors';\nimport { queryParams } from '~/util/navigation';\nimport {\n REGISTER_USER,\n REGISTER_USER_SUCCESS,\n REGISTER_USER_FAILED,\n} from '../types';\n\nexport const registerSagas = [\n takeEvery(REGISTER_USER, registerSaga),\n takeEvery(REGISTER_USER_SUCCESS, redirectSaga),\n];\n\nfunction* registerSaga({ user, mappers }) {\n let requestBody = user;\n // Allow use of request mapper to take a user object\n // of any format and return the payload for the api request\n if (mappers && mappers.request && typeof mappers.request === 'function') {\n requestBody = yield mappers.request(user);\n }\n\n // Make POST call to register API\n const response = yield fetch('/account/register', {\n method: 'POST',\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(requestBody),\n });\n\n if (response.ok) {\n let mappedResponse;\n const [, responseBody] = yield to(response.json());\n if (responseBody) {\n // Allow use of response mapper to convert the successful user object\n // from the api response body into a user object of any format\n if (\n mappers &&\n mappers.response &&\n typeof mappers.response === 'function'\n ) {\n mappedResponse = yield mappers.response(responseBody);\n }\n // Update user object with mappedResponse or responseBody\n yield put({\n type: REGISTER_USER_SUCCESS,\n user: mappedResponse || responseBody,\n });\n } else {\n // OK response but unable to parse the response body\n yield put({\n type: REGISTER_USER_FAILED,\n error: {\n message:\n 'Unable to parse the created user from the register service response',\n },\n });\n }\n } else {\n // Not OK responses, these can be due to service availability\n // or status codes echoed from the responses received from\n // management api when registering the user\n const [, errorResponse] = yield to(response.json());\n const error = (errorResponse && errorResponse.error) || errorResponse || {};\n // Get something meaningful from the response if there is no message in the body\n if (!error.message) {\n error.message = `Registration service: ${response.statusText}`;\n error.status = response.status;\n }\n yield put({\n type: REGISTER_USER_FAILED,\n error,\n });\n }\n}\n\nfunction* redirectSaga() {\n // Check if querystring contains a redirect_uri\n const currentQs = queryParams(yield select(selectCurrentSearch));\n const redirectUri = currentQs.redirect_uri || currentQs.redirect;\n\n // We must use redux based navigation to preserve the registration state\n if (redirectUri) yield put(setRoute(redirectUri));\n}\n","const PAP_URL = 'https://pap.zengenti.com';\n\nconst USER_ENVS_URI = 'my-environments';\nconst USER_RESEND_VERIFICATION_URI = 'account/verify/resend';\nconst USER_REQUEST_PASSWORD_RESET_URI = 'account/reset';\nconst USER_RESET_PASSWORD_URI = 'account/reset/password';\n\nconst USER_ENVS_URL = `${PAP_URL}/${USER_ENVS_URI}`;\n\nconst BASE_OPTIONS = {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' },\n};\n\nexport class UserHelper {\n static async GetUsersEnvironments(securityToken) {\n const options = {\n ...BASE_OPTIONS,\n headers: {\n 'x-security-token': securityToken,\n },\n };\n return await UserHelper.get(USER_ENVS_URL, options);\n }\n static async ResendUserVerification(userEmail) {\n const options = {\n ...BASE_OPTIONS,\n };\n return await UserHelper.get(\n `/${USER_RESEND_VERIFICATION_URI}?user=${userEmail}`,\n options\n );\n }\n static async RequestPasswordReset(userEmailObject) {\n const options = {\n ...BASE_OPTIONS,\n body: JSON.stringify(userEmailObject),\n };\n options.method = 'POST';\n\n return await UserHelper.get(`/${USER_REQUEST_PASSWORD_RESET_URI}`, options);\n }\n static async ResetPassword(resetPasswordObject) {\n const options = {\n ...BASE_OPTIONS,\n body: JSON.stringify(resetPasswordObject),\n };\n options.method = 'POST';\n\n return await UserHelper.get(`/${USER_RESET_PASSWORD_URI}`, options);\n }\n\n static async get(url, options = BASE_OPTIONS) {\n try {\n const responseBody = await api(url, options);\n return responseBody;\n } catch (err) {\n return { error: { message: err.message } };\n }\n }\n}\n\nasync function api(url, options) {\n return fetch(url, options)\n .then(async response => {\n return response.json().then(data => data);\n })\n .catch(error => {\n throw error;\n });\n}\n","import { put, takeEvery, select } from 'redux-saga/effects';\nimport { to } from 'await-to-js';\nimport { getManagementApiClient } from '~/user/util/ContensisManagementApi';\nimport { UserHelper } from '~/user/util/userHelper';\nimport { selectClientCredentials } from '../selectors';\nimport {\n REQUEST_USER_PASSWORD_RESET,\n RESET_USER_PASSWORD,\n REQUEST_USER_PASSWORD_RESET_ERROR,\n REQUEST_USER_PASSWORD_RESET_SENDING,\n REQUEST_USER_PASSWORD_RESET_SUCCESS,\n RESET_USER_PASSWORD_ERROR,\n RESET_USER_PASSWORD_SENDING,\n RESET_USER_PASSWORD_SUCCESS,\n CHANGE_USER_PASSWORD,\n CHANGE_USER_PASSWORD_SENDING,\n CHANGE_USER_PASSWORD_SUCCESS,\n CHANGE_USER_PASSWORD_ERROR,\n} from '../types';\n\nexport const resetPasswordSagas = [\n takeEvery(REQUEST_USER_PASSWORD_RESET, requestPasswordResetSaga),\n takeEvery(RESET_USER_PASSWORD, resetPasswordSaga),\n takeEvery(CHANGE_USER_PASSWORD, changePasswordSaga),\n];\n\nfunction* requestPasswordResetSaga(action) {\n const userEmailObject = action.userEmailObject;\n yield put({\n type: REQUEST_USER_PASSWORD_RESET_SENDING,\n });\n if (userEmailObject && userEmailObject.userEmail) {\n try {\n const passwordResetRequestResponse =\n yield UserHelper.RequestPasswordReset(userEmailObject);\n\n if (passwordResetRequestResponse) {\n if (!passwordResetRequestResponse.error) {\n yield put({\n type: REQUEST_USER_PASSWORD_RESET_SUCCESS,\n });\n } else {\n yield put({\n type: REQUEST_USER_PASSWORD_RESET_ERROR,\n error: passwordResetRequestResponse.error.message,\n });\n }\n } else {\n yield put({\n type: REQUEST_USER_PASSWORD_RESET_ERROR,\n error: 'No response from server',\n });\n }\n } catch (error) {\n yield put({\n type: REQUEST_USER_PASSWORD_RESET_ERROR,\n error: error && error.toString(),\n });\n }\n } else {\n yield put({\n type: REQUEST_USER_PASSWORD_RESET_ERROR,\n error: 'Invalid object',\n });\n }\n}\n\nfunction* resetPasswordSaga(action) {\n const resetPasswordObject = action.resetPasswordObject;\n\n yield put({\n type: RESET_USER_PASSWORD_SENDING,\n });\n if (resetPasswordObject.token && resetPasswordObject.password) {\n try {\n const resetPasswordResponse = yield UserHelper.ResetPassword(\n resetPasswordObject\n );\n\n if (resetPasswordResponse) {\n if (!resetPasswordResponse.error) {\n yield put({\n type: RESET_USER_PASSWORD_SUCCESS,\n });\n } else {\n const error =\n (resetPasswordResponse.error.data &&\n resetPasswordResponse.error.data.length > 0 &&\n resetPasswordResponse.error.data[0].message) ||\n resetPasswordResponse.error.message;\n yield put({\n type: RESET_USER_PASSWORD_ERROR,\n error,\n });\n }\n } else {\n yield put({\n type: RESET_USER_PASSWORD_ERROR,\n error: 'No response from server',\n });\n }\n } catch (error) {\n yield put({\n type: RESET_USER_PASSWORD_ERROR,\n error: error && error.toString(),\n });\n }\n } else {\n yield put({\n type: RESET_USER_PASSWORD_ERROR,\n error: 'Invalid object',\n });\n }\n}\n\n// userId\n// existingPassword\n// newPassword\nfunction* changePasswordSaga(action) {\n if (\n !action ||\n !action.userId ||\n !action.currentPassword ||\n !action.newPassword\n ) {\n yield put({\n type: CHANGE_USER_PASSWORD_ERROR,\n error: 'Invalid action object sent to changePassword saga',\n });\n return;\n }\n\n try {\n const changePasswordObject = {\n userId: action.userId,\n existing: action.currentPassword,\n new: action.newPassword,\n };\n\n yield put({\n type: CHANGE_USER_PASSWORD_SENDING,\n });\n const clientCredentials = yield select(selectClientCredentials, 'js');\n const client = yield getManagementApiClient({ ...clientCredentials });\n\n const [err, res] = yield to(\n client.security.users.updatePassword(changePasswordObject)\n );\n\n if (err) {\n const error =\n (err?.data?.data?.length > 0 && err.data.data[0].message) ||\n err?.data?.message;\n yield put({\n type: CHANGE_USER_PASSWORD_ERROR,\n error,\n });\n return;\n }\n\n // // eslint-disable-next-line no-console\n // console.log(changePasswordObject);\n // // eslint-disable-next-line no-console\n // console.log(userCredentialsObject);\n yield put({\n type: CHANGE_USER_PASSWORD_SUCCESS,\n });\n } catch (error) {\n yield put({\n type: CHANGE_USER_PASSWORD_ERROR,\n error: error && error.toString(),\n });\n }\n}\n","import { loginSagas } from './login';\nimport { registerSagas } from './register';\nimport { resetPasswordSagas } from './resetPassword';\n\nexport const userSagas = [\n ...loginSagas,\n ...registerSagas,\n ...resetPasswordSagas,\n];\n","// index.js\nimport { all } from 'redux-saga/effects';\nimport { navigationSagas } from './navigation';\nimport { routingSagas } from '~/routing/redux/sagas';\nimport { userSagas } from '~/user/redux/sagas';\n\nexport default function (featureSagas = []) {\n return function* rootSaga() {\n const subSagas = [...routingSagas, ...navigationSagas, ...userSagas];\n yield all([...subSagas, ...featureSagas]);\n };\n}\n","const servers = SERVERS; /* global SERVERS */\nconst alias = servers.alias.toLowerCase();\nconst publicUri = PUBLIC_URI; /* global PUBLIC_URI */\nconst projects = PROJECTS; /* global PROJECTS */\n\n// return a projectId via the request hostname\nconst pickProject = (hostname, query) => {\n // if localhost we can only infer via a querystring, and take your word for it\n if (hostname == 'localhost') {\n return (query && query.p) || projects[0].id;\n }\n\n // if hostname is the actual public uri we can return the first project from the list\n if (hostname == publicUri) {\n return projects[0].id;\n }\n\n let project = 'unknown';\n\n // // go through all the defined projects\n // Object.entries(projects).map(([, p]) => {\n const p = projects[0];\n\n // check if we're accessing via the project's public uri\n if (hostname.includes(p.publicUri)) project = p.id;\n\n // the url structure is different for website (we don't prefix)\n if (p.id.startsWith('website')) {\n // check for internal and external hostnames\n // we check live and preview distinctly so our rule does not clash with\n // hostnames that use a project prefix\n if (\n hostname.includes(`live-${alias}.cloud.contensis.com`) ||\n hostname.includes(`live.${alias}.contensis.cloud`) ||\n hostname.includes(`preview-${alias}.cloud.contensis.com`) ||\n hostname.includes(`preview.${alias}.contensis.cloud`)\n )\n project = p.id;\n } else {\n // check for internal and external hostnames, prefixed with the projectId\n if (\n hostname.includes(`${p.id.toLowerCase()}-${alias}.cloud.contensis.com`) ||\n hostname.includes(`${p.id.toLowerCase()}.${alias}.contensis.cloud`)\n )\n project = p.id;\n }\n // });\n return project === 'unknown' ? p.id : project;\n};\n\nexport default pickProject;\n","import React from 'react';\nimport { hot } from 'react-hot-loader';\nimport { AppRootProps } from '~/models';\nimport { RouteLoader } from '../routing';\n\nconst AppRoot = (props: AppRootProps) => {\n return <RouteLoader {...props} />;\n};\n\nexport default hot(module)(AppRoot);\n"],"names":["selectedHistory","window","createBrowserHistory","createMemoryHistory","history","options","browserHistory","navigationSagas","takeEvery","GET_NODE_TREE","ensureNodeTreeSaga","action","api","language","project","versionStatus","treeDepth","state","select","hasNavigationTree","nodes","getRootNode","depth","put","type","SET_NODE_TREE","GET_NODE_TREE_ERROR","ex","log","error","toString","sys","contentTypeId","dataFormat","filename","id","includeInSearch","slug","uri","Fields","entryTitle","entryDescription","keywords","wildcard","fieldExpression","field","value","operator","weight","Array","isArray","equalToOrIn","Op","defaultExpressions","equalTo","arr","length","in","routeEntryByFieldsQuery","fields","fieldLinkDepths","query","Query","routingSagas","SET_NAVIGATION_PATH","getRouteSaga","SET_ROUTE","setRouteSaga","payload","method","args","path","entry","_staticRoute$route","_staticRoute$route2","_staticRoute$route3","_appsays","_appsays2","_appsays3","_pathNode2","_pathNode3","withEvents","routes","ContentTypeMappings","staticRoute","ssr","route","injectRedux","call","reduxInjectorSaga","pathNode","ancestors","children","siblings","contentTypeMapping","appsays","requireLogin","onRouteLoad","staticRouteLinkDepth","params","linkDepth","staticRouteFields","staticRouteFieldLinkDepths","entryLinkDepth","undefined","entryFieldLinkDepths","setContentTypeLimits","find","ct","nodeOptions","routeEntry","selectRouteEntry","routeNode","selectCurrentNode","currentPath","deliveryApiStatus","selectVersionStatus","selectCurrentProject","isPreview","startsWith","defaultLang","customRouting","fetchNode","statePath","refetchNode","_staticRoute$route4","UPDATE_LOADING_STATE","isLoading","setRouteEntry","selectCurrentAncestors","selectCurrentSiblings","splitPath","split","entryGuid","previewEntry","getClient","entries","get","_pathNode","nodeError","to","getNode","entryFields","includes","status","userLoggedIn","handleRequiresLoginSaga","LoginHelper","GetAccessDeniedRoute","do500","_payload$items","findContentTypeMapping","search","items","resolveCurrentNodeOrdinates","resolvedContentTypeMapping","onRouteLoaded","preventScrollTop","scrollTo","_staticRoute$route5","_appsays4","entryMapper","do404","e","stack","apiCall","doNavigation","customNavigation","getAncestors","info","childrenDepth","childrenOptions","getChildren","getSiblings","_nodeOptions$siblings","_nodeOptions$siblings2","_nodeOptions$siblings3","includeInMenu","isTreeLoaded","tree","getNodeTree","loadAncestors","loadChildren","loadSiblings","loadTree","nodeWithChildren","all","node","notFound","remapEntry","entrySys","ContensisEntryId","currentEntryId","selectRouteEntryEntryId","currentEntryLang","selectRouteEntryLanguage","mappedEntry","selectMappedEntry","mapRouteEntry","SET_ENTRY","SET_ANCESTORS","SET_SIBLINGS","clientReloadHitServer","stateEntry","location","reload","isError","statusCode","injectorFn","key","reducer","saga","reduxInjector","registerSagas","REGISTER_USER","registerSaga","REGISTER_USER_SUCCESS","redirectSaga","user","mappers","requestBody","request","response","fetch","headers","Accept","body","JSON","stringify","ok","mappedResponse","responseBody","json","REGISTER_USER_FAILED","message","errorResponse","statusText","currentQs","queryParams","selectCurrentSearch","redirectUri","redirect_uri","redirect","setRoute","PAP_URL","USER_ENVS_URI","USER_RESEND_VERIFICATION_URI","USER_REQUEST_PASSWORD_RESET_URI","USER_RESET_PASSWORD_URI","USER_ENVS_URL","BASE_OPTIONS","UserHelper","GetUsersEnvironments","securityToken","ResendUserVerification","userEmail","RequestPasswordReset","userEmailObject","ResetPassword","resetPasswordObject","url","err","then","data","catch","resetPasswordSagas","REQUEST_USER_PASSWORD_RESET","requestPasswordResetSaga","RESET_USER_PASSWORD","resetPasswordSaga","CHANGE_USER_PASSWORD","changePasswordSaga","REQUEST_USER_PASSWORD_RESET_SENDING","passwordResetRequestResponse","REQUEST_USER_PASSWORD_RESET_SUCCESS","REQUEST_USER_PASSWORD_RESET_ERROR","RESET_USER_PASSWORD_SENDING","token","password","resetPasswordResponse","RESET_USER_PASSWORD_SUCCESS","RESET_USER_PASSWORD_ERROR","userId","currentPassword","newPassword","CHANGE_USER_PASSWORD_ERROR","changePasswordObject","existing","new","CHANGE_USER_PASSWORD_SENDING","clientCredentials","selectClientCredentials","client","getManagementApiClient","res","security","users","updatePassword","_err$data","_err$data2","CHANGE_USER_PASSWORD_SUCCESS","userSagas","loginSagas","featureSagas","rootSaga","subSagas","servers","SERVERS","alias","toLowerCase","publicUri","PUBLIC_URI","projects","PROJECTS","pickProject","hostname","p","AppRoot","props","React","createElement","RouteLoader"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA,MAAMA,eAAe,GACnB,OAAOC,MAAM,KAAK,WAAW,GAAGC,8BAAoB,GAAGC,6BAAmB,CAAA;AAE/DC,MAAAA,OAAO,GAAGA,CAACC,OAAO,GAAG,EAAE,KAAKL,eAAe,CAACK,OAAO,EAAC;AACpDC,MAAAA,cAAc,GAAGN,eAAe;;ACGtC,MAAMO,eAAe,GAAG,CAACC,iBAAS,CAACC,mBAAa,EAAEC,kBAAkB,CAAC,CAAC,CAAA;AAEtE,UAAUA,kBAAkBA,CAACC,MAAM,EAAE;EAC1C,MAAM;IAAEC,GAAG;IAAEC,QAAQ;IAAEC,OAAO;IAAEC,aAAa;AAAEC,IAAAA,SAAAA;AAAU,GAAC,GAAGL,MAAM,CAAA;AACnE,EAAA,MAAMM,KAAK,GAAG,MAAMC,cAAM,EAAE,CAAA;EAC5B,IAAI;AACF,IAAA,IAAI,CAACC,yBAAiB,CAACF,KAAK,CAAC,EAAE;AAC7B,MAAA,MAAMG,KAAK,GAAG,MAAMR,GAAG,CAACS,WAAW,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ACvEO,QAAQ,CAAC5K,QAAQ,CAAC,GAAG6K,CAAC,CAACzR,EAAE,CAACkR,WAAW,EAAE,CAAID,CAAAA,EAAAA,KAAK,kBAAkB,CAAC,EAEnEtS,OAAO,GAAG8S,CAAC,CAACzR,EAAE,CAAA;AAClB,GAAA;AACA;EACA,OAAOrB,OAAO,KAAK,SAAS,GAAG8S,CAAC,CAACzR,EAAE,GAAGrB,OAAO,CAAA;AAC/C;;AC3CM+S,MAAAA,OAAO,GAAIC,KAAmB,IAAK;AACvC,EAAA,oBAAOC,sBAAA,CAAAC,aAAA,CAACC,uBAAW,EAAKH,KAAQ,CAAC,CAAA;AACnC;;;;;;;;"}
|
|
@@ -1,35 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var effects = require('@redux-saga/core/effects');
|
|
4
|
-
var selectors = require('./selectors-
|
|
5
|
-
var ToJs = require('./ToJs-
|
|
4
|
+
var selectors = require('./selectors-wCs5fHD4.js');
|
|
5
|
+
var ToJs = require('./ToJs-C9jwV7YB.js');
|
|
6
6
|
var mapJson = require('jsonpath-mapper');
|
|
7
7
|
var to = require('await-to-js');
|
|
8
|
-
var CookieHelper_class = require('./CookieHelper.class-
|
|
8
|
+
var CookieHelper_class = require('./CookieHelper.class-CNL3lC5D.js');
|
|
9
9
|
var reactCookie = require('react-cookie');
|
|
10
10
|
var reactRedux = require('react-redux');
|
|
11
11
|
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
function _interopNamespace(e) {
|
|
15
|
-
if (e && e.__esModule) return e;
|
|
16
|
-
var n = Object.create(null);
|
|
17
|
-
if (e) {
|
|
18
|
-
Object.keys(e).forEach(function (k) {
|
|
19
|
-
if (k !== 'default') {
|
|
20
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
21
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () { return e[k]; }
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
n["default"] = e;
|
|
29
|
-
return Object.freeze(n);
|
|
30
|
-
}
|
|
12
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
31
13
|
|
|
32
|
-
var mapJson__default = /*#__PURE__*/
|
|
14
|
+
var mapJson__default = /*#__PURE__*/_interopDefault(mapJson);
|
|
33
15
|
|
|
34
16
|
const findContentTypeMapping = (ContentTypeMappings, contentTypeId) => ContentTypeMappings.find(ct => ct.contentTypeID === contentTypeId);
|
|
35
17
|
|
|
@@ -44,7 +26,7 @@ const clientCredentials = {
|
|
|
44
26
|
}) => refreshTokenExpiryDate.toISOString(),
|
|
45
27
|
contensisClassicToken: 'contensisClassicToken'
|
|
46
28
|
};
|
|
47
|
-
var mapClientCredentials =
|
|
29
|
+
var mapClientCredentials = obj => mapJson__default.default(obj, clientCredentials);
|
|
48
30
|
|
|
49
31
|
const getManagementApiClient = async ({
|
|
50
32
|
bearerToken,
|
|
@@ -77,11 +59,11 @@ const getManagementApiClient = async ({
|
|
|
77
59
|
}
|
|
78
60
|
let {
|
|
79
61
|
Client
|
|
80
|
-
} = await
|
|
62
|
+
} = await import('contensis-management-api');
|
|
81
63
|
if (typeof window === 'undefined') {
|
|
82
64
|
const {
|
|
83
65
|
UniversalClient
|
|
84
|
-
} = await
|
|
66
|
+
} = await import('contensis-management-api');
|
|
85
67
|
Client = UniversalClient;
|
|
86
68
|
}
|
|
87
69
|
const client = Client.create({
|
|
@@ -115,7 +97,7 @@ const createUserManager = async config => {
|
|
|
115
97
|
try {
|
|
116
98
|
const {
|
|
117
99
|
UserManager
|
|
118
|
-
} = await
|
|
100
|
+
} = await import(/* webpackChunkName: "oidcclient" */'oidc-client');
|
|
119
101
|
return new UserManager(config);
|
|
120
102
|
} catch (e) {
|
|
121
103
|
console.error('Exception in createUserManager: ', e);
|
|
@@ -123,10 +105,10 @@ const createUserManager = async config => {
|
|
|
123
105
|
} else return;
|
|
124
106
|
};
|
|
125
107
|
|
|
108
|
+
var _LoginHelper;
|
|
126
109
|
const context = typeof window != 'undefined' ? window : global;
|
|
127
110
|
class LoginHelper {
|
|
128
111
|
constructor(cookies) {
|
|
129
|
-
this.cookies = void 0;
|
|
130
112
|
this.cookies = cookies || new CookieHelper_class.CookieHelper();
|
|
131
113
|
}
|
|
132
114
|
static ClientRedirectToHome(location) {
|
|
@@ -170,7 +152,7 @@ class LoginHelper {
|
|
|
170
152
|
}
|
|
171
153
|
static async WsFedLogin(redirectUri) {
|
|
172
154
|
const userManager = await createUserManager(userManagerConfig);
|
|
173
|
-
userManager === null || userManager === void 0
|
|
155
|
+
userManager === null || userManager === void 0 || userManager.signinRedirect({
|
|
174
156
|
scope: 'openid',
|
|
175
157
|
response_type: 'id_token',
|
|
176
158
|
redirect_uri: redirectUri || window.location.toString()
|
|
@@ -384,11 +366,12 @@ class LoginHelper {
|
|
|
384
366
|
}
|
|
385
367
|
}
|
|
386
368
|
}
|
|
369
|
+
_LoginHelper = LoginHelper;
|
|
387
370
|
LoginHelper.CMS_URL = SERVERS.cms /* global SERVERS */;
|
|
388
371
|
LoginHelper.WSFED_LOGIN = process.env.NODE_ENV === 'development' ? WSFED_LOGIN === 'true' /* global WSFED_LOGIN */ : context.WSFED_LOGIN === 'true';
|
|
389
372
|
LoginHelper.LOGIN_ROUTE = '/account/login';
|
|
390
373
|
LoginHelper.ACCESS_DENIED_ROUTE = '/account/access-denied';
|
|
391
|
-
LoginHelper.withCookies = cookieHelper => new
|
|
374
|
+
LoginHelper.withCookies = cookieHelper => new _LoginHelper(cookieHelper);
|
|
392
375
|
LoginHelper.GetUserDetails = async client => {
|
|
393
376
|
const [userError, user] = await to.to(client.security.users.getCurrent());
|
|
394
377
|
if (user && user.id) {
|
|
@@ -435,7 +418,7 @@ function* handleRequiresLoginSaga(action) {
|
|
|
435
418
|
} = staticRoute && staticRoute.route || {};
|
|
436
419
|
const {
|
|
437
420
|
requireLogin: authContentType
|
|
438
|
-
} = entry && findContentTypeMapping(ContentTypeMappings, entry === null || entry === void 0
|
|
421
|
+
} = entry && findContentTypeMapping(ContentTypeMappings, entry === null || entry === void 0 || (_entry$sys = entry.sys) === null || _entry$sys === void 0 ? void 0 : _entry$sys.contentTypeId) || {};
|
|
439
422
|
|
|
440
423
|
// If requireLogin, authRoute or authContentType has been specified as an
|
|
441
424
|
// array of groups we can merge all the arrays and match on any group supplied
|
|
@@ -628,12 +611,12 @@ const changePassword = (userId, currentPassword, newPassword) => selectors.actio
|
|
|
628
611
|
|
|
629
612
|
var actions = /*#__PURE__*/Object.freeze({
|
|
630
613
|
__proto__: null,
|
|
614
|
+
changePassword: changePassword,
|
|
631
615
|
loginUser: loginUser,
|
|
632
616
|
logoutUser: logoutUser,
|
|
633
617
|
registerUser: registerUser,
|
|
634
618
|
requestPasswordReset: requestPasswordReset,
|
|
635
|
-
resetPassword: resetPassword
|
|
636
|
-
changePassword: changePassword
|
|
619
|
+
resetPassword: resetPassword
|
|
637
620
|
});
|
|
638
621
|
|
|
639
622
|
const useLogin = () => {
|
|
@@ -759,4 +742,4 @@ exports.useChangePassword = useChangePassword;
|
|
|
759
742
|
exports.useForgotPassword = useForgotPassword;
|
|
760
743
|
exports.useLogin = useLogin;
|
|
761
744
|
exports.useRegistration = useRegistration;
|
|
762
|
-
//# sourceMappingURL=ChangePassword.container-
|
|
745
|
+
//# sourceMappingURL=ChangePassword.container-DrO8p-7S.js.map
|