@zengenti/contensis-react-base 3.0.0-beta.6 → 3.0.0-beta.60
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/README.md +4 -4
- package/cjs/{App-3324f784.js → App-36c7bf3a.js} +124 -140
- package/cjs/App-36c7bf3a.js.map +1 -0
- package/cjs/{RouteLoader-c7957b14.js → RouteLoader-ece762dc.js} +31 -23
- package/cjs/RouteLoader-ece762dc.js.map +1 -0
- package/cjs/ToJs-09204afd.js +129 -0
- package/cjs/ToJs-09204afd.js.map +1 -0
- package/cjs/VersionInfo-df35c917.js +181 -0
- package/cjs/VersionInfo-df35c917.js.map +1 -0
- package/cjs/{actions-a24bf46e.js → actions-6b9ef168.js} +5 -4
- package/cjs/actions-6b9ef168.js.map +1 -0
- package/cjs/client.js +16 -21
- package/cjs/client.js.map +1 -1
- package/cjs/contensis-react-base.js +3583 -38
- package/cjs/contensis-react-base.js.map +1 -1
- package/cjs/forms.js +4114 -195
- package/cjs/forms.js.map +1 -1
- package/cjs/{fromJSLeaveImmer-c00d597f.js → fromJSLeaveImmer-e74c673c.js} +2 -16
- package/cjs/fromJSLeaveImmer-e74c673c.js.map +1 -0
- package/cjs/{login-c810cc4c.js → login-d67b82aa.js} +92 -55
- package/cjs/login-d67b82aa.js.map +1 -0
- package/cjs/{reducers-fde41d6b.js → reducers-3a4f8971.js} +26 -25
- package/cjs/reducers-3a4f8971.js.map +1 -0
- package/cjs/redux.js +6 -5
- package/cjs/redux.js.map +1 -1
- package/cjs/routing.js +5 -4
- package/cjs/routing.js.map +1 -1
- package/cjs/sagas-8cf21563.js +2038 -0
- package/cjs/sagas-8cf21563.js.map +1 -0
- package/cjs/search.js +280 -1907
- package/cjs/search.js.map +1 -1
- package/cjs/{selectors-0ec95076.js → selectors-2c1b1183.js} +7 -3
- package/cjs/selectors-2c1b1183.js.map +1 -0
- package/cjs/user.js +21 -12
- package/cjs/user.js.map +1 -1
- package/cjs/util.js +55 -212
- package/cjs/util.js.map +1 -1
- package/cjs/{version-4f0f5fa6.js → version-ca4173a8.js} +28 -20
- package/cjs/version-ca4173a8.js.map +1 -0
- package/cjs/{version-085d203d.js → version-dcfdafd9.js} +5 -5
- package/cjs/version-dcfdafd9.js.map +1 -0
- package/esm/{App-1b05ab11.js → App-61bf1832.js} +124 -141
- package/esm/App-61bf1832.js.map +1 -0
- package/esm/{RouteLoader-e5f0e8cb.js → RouteLoader-7749ad3f.js} +31 -23
- package/esm/RouteLoader-7749ad3f.js.map +1 -0
- package/esm/ToJs-2627ce21.js +99 -0
- package/esm/ToJs-2627ce21.js.map +1 -0
- package/esm/VersionInfo-add96cdb.js +172 -0
- package/esm/VersionInfo-add96cdb.js.map +1 -0
- package/esm/{actions-927d9698.js → actions-5437f43d.js} +5 -4
- package/esm/actions-5437f43d.js.map +1 -0
- package/esm/client.js +17 -22
- package/esm/client.js.map +1 -1
- package/esm/contensis-react-base.js +3581 -37
- package/esm/contensis-react-base.js.map +1 -1
- package/esm/forms.js +4114 -198
- package/esm/forms.js.map +1 -1
- package/esm/{fromJSLeaveImmer-392af4e3.js → fromJSLeaveImmer-0114ffcf.js} +2 -16
- package/esm/fromJSLeaveImmer-0114ffcf.js.map +1 -0
- package/esm/{login-f8ba3aeb.js → login-f6dfbe1b.js} +92 -55
- package/esm/login-f6dfbe1b.js.map +1 -0
- package/esm/{reducers-d6c0edb1.js → reducers-8e5d6232.js} +26 -25
- package/esm/reducers-8e5d6232.js.map +1 -0
- package/esm/redux.js +8 -7
- package/esm/redux.js.map +1 -1
- package/esm/routing.js +5 -4
- package/esm/routing.js.map +1 -1
- package/esm/sagas-a22fc54a.js +1952 -0
- package/esm/sagas-a22fc54a.js.map +1 -0
- package/esm/search.js +240 -1848
- package/esm/search.js.map +1 -1
- package/esm/{selectors-b98d5c76.js → selectors-65f0f31c.js} +7 -4
- package/esm/selectors-65f0f31c.js.map +1 -0
- package/esm/user.js +23 -14
- package/esm/user.js.map +1 -1
- package/esm/util.js +54 -209
- package/esm/util.js.map +1 -1
- package/esm/{version-16aa83eb.js → version-1d46bde8.js} +27 -20
- package/esm/version-1d46bde8.js.map +1 -0
- package/esm/version-696796d7.js +15 -0
- package/esm/version-696796d7.js.map +1 -0
- package/models/app/pages/VersionInfo/components/VersionInfo.d.ts +1 -1
- package/models/forms/index.d.ts +2 -0
- package/models/index.d.ts +1 -0
- package/models/redux/appstate.d.ts +5 -10
- package/models/redux/selectors/navigation.d.ts +2 -1
- package/models/routing/components/RouteLoader.d.ts +2 -19
- package/models/routing/redux/actions.d.ts +1 -1
- package/models/routing/redux/selectors.d.ts +1 -1
- package/models/routing/routes.d.ts +3 -2
- package/models/routing/util/expressions.d.ts +3 -2
- package/models/routing/util/queries.d.ts +1 -1
- package/models/search/containers/withListing.d.ts +1 -1
- package/models/search/containers/withSearch.d.ts +1 -1
- package/models/search/hooks/useFacets.hook.d.ts +3 -0
- package/models/search/hooks/useListing.hook.d.ts +3 -0
- package/models/search/hooks/useMinilist.hook.d.ts +2 -9
- package/models/search/index.d.ts +4 -1
- package/models/search/models/Queries.d.ts +8 -5
- package/models/search/models/Search.d.ts +60 -28
- package/models/search/models/SearchActions.d.ts +4 -3
- package/models/search/models/SearchProps.d.ts +52 -7
- package/models/search/models/SearchState.d.ts +5 -1
- package/models/search/models/index.d.ts +3 -1
- package/models/search/redux/actions.d.ts +2 -1
- package/models/search/redux/reducers.d.ts +230 -314
- package/models/search/redux/sagas.d.ts +5 -5
- package/models/search/redux/selectors.d.ts +19 -22
- package/models/search/search/ContensisDeliveryApi.d.ts +1 -0
- package/models/search/search/expressions.d.ts +3 -6
- package/models/search/{redux → search}/queries.d.ts +0 -0
- package/models/search/transformations/entry-to-filteritem.mapper.d.ts +2 -1
- package/models/search/transformations/filter-to-filterexpression.mapper.d.ts +6 -0
- package/models/search/transformations/filters-to-filterexpressions.mapper.d.ts +3 -0
- package/models/search/transformations/index.d.ts +3 -0
- package/models/search/transformations/queryParams-to-customapi.mapper.d.ts +3 -0
- package/models/search/transformations/state-to-searchuri.d.ts +2 -13
- package/models/server/features/linkdepth-api/api.d.ts +12 -0
- package/models/server/features/linkdepth-api/events-api.config.d.ts +37 -0
- package/models/server/middleware/bundleManipulation.d.ts +2 -1
- package/models/server/util/headers.d.ts +3 -2
- package/models/user/components/Login.d.ts +1 -2
- package/models/user/components/LoginForm.d.ts +1 -2
- package/models/user/hocs/withLogin.d.ts +4 -2
- package/models/user/hocs/withRegistration.d.ts +4 -2
- package/models/user/hooks/useChangePassword.d.ts +5 -5
- package/models/user/hooks/useForgotPassword.d.ts +6 -6
- package/models/user/hooks/useLogin.d.ts +9 -45
- package/models/user/hooks/useRegistration.d.ts +4 -4
- package/models/user/redux/reducers.d.ts +4 -5
- package/models/user/redux/sagas/login.d.ts +11 -8
- package/models/user/redux/selectors.d.ts +33 -71
- package/models/user/util/LoginHelper.class.d.ts +4 -3
- package/models/util/ContensisDeliveryApi.d.ts +1 -3
- package/models/util/json-mapper.d.ts +9 -3
- package/models/util/merge.d.ts +1 -0
- package/package-lock.json +2690 -3400
- package/package.json +60 -55
- package/cjs/App-3324f784.js.map +0 -1
- package/cjs/RouteLoader-c7957b14.js.map +0 -1
- package/cjs/ToJs-a38fa20e.js +0 -230
- package/cjs/ToJs-a38fa20e.js.map +0 -1
- package/cjs/actions-a24bf46e.js.map +0 -1
- package/cjs/fromJSLeaveImmer-c00d597f.js.map +0 -1
- package/cjs/login-c810cc4c.js.map +0 -1
- package/cjs/reducers-fde41d6b.js.map +0 -1
- package/cjs/selectors-0ec95076.js.map +0 -1
- package/cjs/version-085d203d.js.map +0 -1
- package/cjs/version-4f0f5fa6.js.map +0 -1
- package/esm/App-1b05ab11.js.map +0 -1
- package/esm/RouteLoader-e5f0e8cb.js.map +0 -1
- package/esm/ToJs-879a5a85.js +0 -199
- package/esm/ToJs-879a5a85.js.map +0 -1
- package/esm/actions-927d9698.js.map +0 -1
- package/esm/fromJSLeaveImmer-392af4e3.js.map +0 -1
- package/esm/login-f8ba3aeb.js.map +0 -1
- package/esm/reducers-d6c0edb1.js.map +0 -1
- package/esm/selectors-b98d5c76.js.map +0 -1
- package/esm/version-16aa83eb.js.map +0 -1
- package/esm/version-3833e8b5.js +0 -15
- package/esm/version-3833e8b5.js.map +0 -1
- package/models/search/transformations/filters-to-filterexpression.d.ts +0 -1
- package/models/search/transformations/filters-to-filterexpression.mapper.d.ts +0 -2
- package/models/server/features/caching/cacheHashing.d.ts +0 -1
|
@@ -47,7 +47,10 @@ function queryParams(search) {
|
|
|
47
47
|
|
|
48
48
|
const selectRouteEntry = (state, returnType) => getImmutableOrJS(state, ['routing', 'entry'], {}, returnType);
|
|
49
49
|
const selectMappedEntry = (state, returnType) => getImmutableOrJS(state, ['routing', 'mappedEntry'], null, returnType);
|
|
50
|
-
const
|
|
50
|
+
const selectSurrogateKeys = state => {
|
|
51
|
+
const keys = getImmutableOrJS(state, ['routing', 'surrogateKeys'], [], 'js');
|
|
52
|
+
return keys.join(' ');
|
|
53
|
+
};
|
|
51
54
|
const selectCurrentHostname = state => getImmutableOrJS(state, ['routing', 'currentHostname']);
|
|
52
55
|
const selectCurrentTreeID = state => getImmutableOrJS(state, ['routing', 'currentHostname']);
|
|
53
56
|
const selectRouteEntryEntryId = state => getImmutableOrJS(state, ['routing', 'entry', 'sys', 'id'], null);
|
|
@@ -91,7 +94,7 @@ var routing = /*#__PURE__*/Object.freeze({
|
|
|
91
94
|
__proto__: null,
|
|
92
95
|
selectRouteEntry: selectRouteEntry,
|
|
93
96
|
selectMappedEntry: selectMappedEntry,
|
|
94
|
-
|
|
97
|
+
selectSurrogateKeys: selectSurrogateKeys,
|
|
95
98
|
selectCurrentHostname: selectCurrentHostname,
|
|
96
99
|
selectCurrentTreeID: selectCurrentTreeID,
|
|
97
100
|
selectRouteEntryEntryId: selectRouteEntryEntryId,
|
|
@@ -138,4 +141,5 @@ exports.selectRouteErrorMessage = selectRouteErrorMessage;
|
|
|
138
141
|
exports.selectRouteIsError = selectRouteIsError;
|
|
139
142
|
exports.selectRouteLoading = selectRouteLoading;
|
|
140
143
|
exports.selectRouteStatusCode = selectRouteStatusCode;
|
|
141
|
-
|
|
144
|
+
exports.selectSurrogateKeys = selectSurrogateKeys;
|
|
145
|
+
//# sourceMappingURL=selectors-2c1b1183.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectors-2c1b1183.js","sources":["../src/redux/util.ts","../src/util/navigation.js","../src/routing/redux/selectors.ts"],"sourcesContent":["import { jpath } from '~/util/json-mapper';\n\nexport const action = (type: string, payload: any = {}) => ({\n type,\n ...payload,\n});\n\nexport const getJS = <S extends Record<string, unknown>, T extends keyof S>(\n state: S,\n stateKey: T\n) => {\n if (\n 'get' in state &&\n typeof state.get === 'function' &&\n 'toJS' in state &&\n typeof state.toJS === 'function'\n ) {\n return state.get(stateKey) as S[T];\n }\n return state[stateKey];\n};\n\nexport const getImmutableOrJS = <\n S extends Record<string, unknown>,\n T extends keyof S | any\n>(\n state: S,\n stateKey: T | T[],\n fallbackValue?: any,\n returnType: 'immutable' | 'js' = globalThis.STATE_TYPE\n) => {\n // Find a fromJS function from global that is dynamically loaded in createStore\n // or replace with a stub function for non-immutable gets\n const fromJS =\n returnType === 'immutable'\n ? globalThis.immutable?.fromJSOrdered || globalThis.immutable?.fromJS\n : v => v;\n\n if (\n state &&\n 'get' in state &&\n typeof state.get === 'function' &&\n 'getIn' in state &&\n typeof state.getIn === 'function' &&\n 'toJS' in state &&\n typeof state.toJS === 'function'\n ) {\n if (Array.isArray(stateKey))\n return fromJS(state.getIn(stateKey, fallbackValue));\n return fromJS(state.get(stateKey, fallbackValue)) as S[T | any];\n }\n\n if (Array.isArray(stateKey) && state && typeof state === 'object') {\n const result = jpath(stateKey.join('.'), state);\n if (typeof result === 'undefined') return fallbackValue;\n return result;\n }\n\n const result =\n state && typeof state === 'object' ? state[stateKey as string] : undefined;\n if (typeof result === 'undefined') return fallbackValue;\n return result;\n};\n","import queryString from 'query-string';\n\nexport function queryParams(search) {\n return queryString.parse(\n typeof window != 'undefined' ? window.location.search : search\n );\n}\nexport const routeParams = staticRoute =>\n staticRoute && staticRoute.match ? staticRoute.match.params : {};\n\nexport const buildUrl = (route, params) => {\n const qs = queryString.stringify(params);\n const path = qs ? `${route}?${qs}` : route;\n return path;\n};\n\nexport const clientHostname = () =>\n `${window.location.protocol}//${window.location.hostname}:${window.location.port}`;\n","import { Entry } from 'contensis-delivery-api/lib/models';\nimport { StateType } from '~/config';\nimport { AppState } from '~/redux/appstate';\nimport { getImmutableOrJS as getIn } from '~/redux/util';\nimport { queryParams } from '~/util/navigation';\n\nexport const selectRouteEntry = (state: AppState, returnType?: StateType) =>\n getIn(state, ['routing', 'entry'], {} as Entry, returnType);\n\nexport const selectMappedEntry = (state: AppState, returnType?: StateType) =>\n getIn(state, ['routing', 'mappedEntry'], null, returnType);\n\nexport const selectSurrogateKeys = (state: AppState) => {\n const keys = getIn(state, ['routing', 'surrogateKeys'], [], 'js');\n return keys.join(' ');\n};\nexport const selectCurrentHostname = (state: AppState) =>\n getIn(state, ['routing', 'currentHostname']);\n\nexport const selectCurrentTreeID = (state: AppState) =>\n getIn(state, ['routing', 'currentHostname']);\n\nexport const selectRouteEntryEntryId = (state: AppState) =>\n getIn(state, ['routing', 'entry', 'sys', 'id'], null);\n\nexport const selectRouteEntryContentTypeId = (state: AppState) => {\n const entry = selectRouteEntry(state);\n return getIn(entry, ['sys', 'contentTypeId'], null);\n};\n\nexport const selectRouteEntryLanguage = (state: AppState) => {\n const entry = selectRouteEntry(state);\n return getIn(entry, ['sys', 'language'], null);\n};\n\nexport const selectRouteEntrySlug = (state: AppState) => {\n const entry = selectRouteEntry(state);\n return getIn(entry, ['sys', 'slug'], null);\n};\n\nexport const selectRouteEntryID = (state: AppState) =>\n getIn(state, ['routing', 'entryID']);\n\nexport const selectCurrentPath = (state: AppState) =>\n getIn(state, ['routing', 'currentPath']);\nexport const selectCurrentLocation = (state: AppState) =>\n getIn(state, ['routing', 'location']);\nexport const selectCurrentSearch = (state: AppState) =>\n getIn(state, ['routing', 'location', 'search']);\nexport const selectCurrentHash = (state: AppState) =>\n getIn(state, ['routing', 'location', 'hash']);\nexport const selectQueryStringAsObject = (state: AppState) =>\n queryParams(selectCurrentSearch(state));\nexport const selectCurrentProject = (state: AppState) =>\n getIn(state, ['routing', 'currentProject']);\nexport const selectIsNotFound = (state: AppState) =>\n getIn(state, ['routing', 'notFound']);\nexport const selectCurrentAncestors = (state: AppState) =>\n getIn(state, ['routing', 'currentNodeAncestors'], []);\nexport const selectCurrentSiblings = (state: AppState) =>\n getIn(state, ['routing', 'currentNodeSiblings'], []);\nexport const selectCurrentNode = (state: AppState, returnType?: StateType) =>\n getIn(state, ['routing', 'currentNode'], null, returnType);\nexport const selectCurrentChildren = state =>\n getIn(state, ['routing', 'currentNode', 'children'], []);\n\nexport const selectBreadcrumb = (state: AppState) => {\n return selectCurrentAncestors(state).push(selectCurrentNode(state));\n};\nexport const selectRouteErrorMessage = (state: AppState) => {\n const error = getIn(state, ['routing', 'error']);\n return getIn(error, ['data', 'message'], getIn(error, 'statusText'));\n};\nexport const selectRouteIsError = (state: AppState) =>\n getIn(state, ['routing', 'isError']);\nexport const selectRouteLoading = (state: AppState) =>\n getIn(state, ['routing', 'isLoading']);\nexport const selectRouteStatusCode = (state: AppState) =>\n getIn(state, ['routing', 'statusCode']);\nexport const selectStaticRoute = (state: AppState) =>\n getIn(state, ['routing', 'staticRoute']);\n"],"names":["action","type","payload","getJS","state","stateKey","get","toJS","getImmutableOrJS","fallbackValue","returnType","globalThis","STATE_TYPE","fromJS","immutable","fromJSOrdered","v","getIn","Array","isArray","result","jpath","join","undefined","queryParams","search","queryString","parse","window","location","selectRouteEntry","selectMappedEntry","selectSurrogateKeys","keys","selectCurrentHostname","selectCurrentTreeID","selectRouteEntryEntryId","selectRouteEntryContentTypeId","entry","selectRouteEntryLanguage","selectRouteEntrySlug","selectRouteEntryID","selectCurrentPath","selectCurrentLocation","selectCurrentSearch","selectCurrentHash","selectQueryStringAsObject","selectCurrentProject","selectIsNotFound","selectCurrentAncestors","selectCurrentSiblings","selectCurrentNode","selectCurrentChildren","selectBreadcrumb","push","selectRouteErrorMessage","error","selectRouteIsError","selectRouteLoading","selectRouteStatusCode","selectStaticRoute"],"mappings":";;;;;;;;;AAEO,MAAMA,MAAM,GAAG,CAACC,IAAD,EAAeC,OAAY,GAAG,EAA9B,MAAsC;AAC1DD,EAAAA,IAD0D;AAE1D,EAAGC,GAAAA,OAAAA;AAFuD,CAAtC,EAAf;MAKMC,KAAK,GAAG,CACnBC,KADmB,EAEnBC,QAFmB,KAGhB;AACH,EAAA,IACE,SAASD,KAAT,IACA,OAAOA,KAAK,CAACE,GAAb,KAAqB,UADrB,IAEA,MAAUF,IAAAA,KAFV,IAGA,OAAOA,KAAK,CAACG,IAAb,KAAsB,UAJxB,EAKE;AACA,IAAA,OAAOH,KAAK,CAACE,GAAN,CAAUD,QAAV,CAAP,CAAA;AACD,GAAA;;AACD,EAAOD,OAAAA,KAAK,CAACC,QAAD,CAAZ,CAAA;AACD,EAbM;AAeMG,MAAAA,gBAAgB,GAAG,CAI9BJ,KAJ8B,EAK9BC,QAL8B,EAM9BI,aAN8B,EAO9BC,UAA8B,GAAGC,UAAU,CAACC,UAPd,KAQ3B;AAAA,EAAA,IAAA,qBAAA,EAAA,sBAAA,CAAA;;AACH;AACA;AACA,EAAMC,MAAAA,MAAM,GACVH,UAAU,KAAK,WAAf,GACI,CAAA,CAAA,qBAAA,GAAAC,UAAU,CAACG,SAAX,MAAA,IAAA,IAAA,qBAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,qBAAA,CAAsBC,aAAtB,MAAuCJ,CAAAA,sBAAAA,GAAAA,UAAU,CAACG,SAAlD,MAAuC,IAAA,IAAA,sBAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,sBAAA,CAAsBD,MAA7D,CADJ,GAEIG,CAAC,IAAIA,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AAY,SAAZ,CAAR,EADA;AAEMsD,MAAAA,kBAAkB,GAAItD,KAAD,IAChCa,gBAAK,CAACb,KAAD,EAAQ,CAAC,SAAD,EAAY,WAAZ,CAAR,EADA;AAEMuD,MAAAA,qBAAqB,GAAIvD,KAAD,IACnCa,gBAAK,CAACb,KAAD,EAAQ,CAAC,SAAD,EAAY,YAAZ,CAAR,EADA;AAEA,MAAMwD,iBAAiB,GAAIxD,KAAD,IAC/Ba,gBAAK,CAACb,KAAD,EAAQ,CAAC,SAAD,EAAY,aAAZ,CAAR,CADA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/cjs/user.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var login = require('./login-
|
|
5
|
+
var login = require('./login-d67b82aa.js');
|
|
6
6
|
var reactRedux = require('react-redux');
|
|
7
|
-
var selectors = require('./selectors-
|
|
8
|
-
var reducers = require('./reducers-
|
|
9
|
-
var ToJs = require('./ToJs-
|
|
7
|
+
var selectors = require('./selectors-2c1b1183.js');
|
|
8
|
+
var reducers = require('./reducers-3a4f8971.js');
|
|
9
|
+
var ToJs = require('./ToJs-09204afd.js');
|
|
10
10
|
require('@redux-saga/core/effects');
|
|
11
|
-
require('./actions-
|
|
11
|
+
require('./actions-6b9ef168.js');
|
|
12
12
|
require('jsonpath-mapper');
|
|
13
13
|
require('await-to-js');
|
|
14
14
|
require('js-cookie');
|
|
@@ -55,13 +55,18 @@ const useLogin = () => {
|
|
|
55
55
|
return {
|
|
56
56
|
loginUser: (username, password) => dispatch(loginUser(username, password)),
|
|
57
57
|
logoutUser: redirectPath => dispatch(logoutUser(redirectPath)),
|
|
58
|
-
authenticationError: select(ToJs.selectUserAuthenticationError),
|
|
59
|
-
authenticationErrorMessage: select(ToJs.selectUserAuthenticationErrorMessage),
|
|
60
|
-
error: select(ToJs.selectUserError),
|
|
61
58
|
errorMessage: select(ToJs.selectUserErrorMessage),
|
|
62
59
|
isAuthenticated: select(ToJs.selectUserIsAuthenticated),
|
|
60
|
+
isAuthenticationError: select(ToJs.selectUserIsAuthenticationError),
|
|
61
|
+
isError: select(ToJs.selectUserIsError),
|
|
63
62
|
isLoading: select(ToJs.selectUserIsLoading),
|
|
64
|
-
user: select(ToJs.selectUser)
|
|
63
|
+
user: select(ToJs.selectUser),
|
|
64
|
+
// DEPRECATED: authenticationError is deprecated use isAuthenticationError instead
|
|
65
|
+
authenticationError: select(ToJs.selectUserIsAuthenticationError),
|
|
66
|
+
// DEPRECATED: authenticationErrorMessage is deprecated use errorMessage instead
|
|
67
|
+
authenticationErrorMessage: select(ToJs.selectUserErrorMessage),
|
|
68
|
+
// DEPRECATED: error is deprecated use isError instead
|
|
69
|
+
error: select(ToJs.selectUserIsError)
|
|
65
70
|
};
|
|
66
71
|
};
|
|
67
72
|
|
|
@@ -159,11 +164,15 @@ const getDisplayName$1 = WrappedComponent => {
|
|
|
159
164
|
const withLogin = WrappedComponent => {
|
|
160
165
|
const mapStateToProps = state => {
|
|
161
166
|
return {
|
|
162
|
-
authenticationError: ToJs.selectUserAuthenticationError(state),
|
|
163
|
-
error: ToJs.selectUserError(state),
|
|
164
167
|
isAuthenticated: ToJs.selectUserIsAuthenticated(state),
|
|
168
|
+
isAuthenticationError: ToJs.selectUserIsAuthenticationError(state),
|
|
169
|
+
isError: ToJs.selectUserIsError(state),
|
|
165
170
|
isLoading: ToJs.selectUserIsLoading(state),
|
|
166
|
-
user: ToJs.selectUser(state)
|
|
171
|
+
user: ToJs.selectUser(state),
|
|
172
|
+
// DEPRECATED: authenticationError is deprecated use isAuthenticationError instead
|
|
173
|
+
authenticationError: ToJs.selectUserIsAuthenticationError(state),
|
|
174
|
+
// DEPRECATED: error is deprecated use isError instead
|
|
175
|
+
error: ToJs.selectUserIsError(state)
|
|
167
176
|
};
|
|
168
177
|
};
|
|
169
178
|
|
package/cjs/user.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.js","sources":["../src/user/redux/actions.js","../src/user/hooks/useLogin.js","../src/user/containers/Login.container.js","../src/user/hooks/useRegistration.js","../src/user/containers/Registration.container.js","../src/user/hooks/useForgotPassword.js","../src/user/containers/ForgotPassword.container.js","../src/user/hooks/useChangePassword.js","../src/user/containers/ChangePassword.container.js","../src/user/hocs/withLogin.js","../src/user/hocs/withRegistration.js"],"sourcesContent":["import { action } from '~/redux/util';\nimport {\n CHANGE_USER_PASSWORD,\n LOGIN_USER,\n LOGOUT_USER,\n REGISTER_USER,\n REQUEST_USER_PASSWORD_RESET,\n RESET_USER_PASSWORD,\n} from './types';\n\nexport const loginUser = (username, password) =>\n action(LOGIN_USER, { username, password });\n\nexport const logoutUser = redirectPath => action(LOGOUT_USER, { redirectPath });\n\nexport const registerUser = (user, mappers) =>\n action(REGISTER_USER, {\n user,\n mappers,\n });\n\nexport const requestPasswordReset = userEmailObject =>\n action(REQUEST_USER_PASSWORD_RESET, { userEmailObject });\n\nexport const resetPassword = resetPasswordObject =>\n action(RESET_USER_PASSWORD, { resetPasswordObject });\n\nexport const changePassword = (userId, currentPassword, newPassword) =>\n action(CHANGE_USER_PASSWORD, { userId, currentPassword, newPassword });\n","import { useDispatch, useSelector } from 'react-redux';\nimport { loginUser, logoutUser } from '../redux/actions';\nimport {\n selectUser,\n selectUserAuthenticationError,\n selectUserAuthenticationErrorMessage,\n selectUserError,\n selectUserErrorMessage,\n selectUserIsAuthenticated,\n selectUserIsLoading,\n} from '../redux/selectors';\n\nconst useLogin = () => {\n const dispatch = useDispatch();\n const select = useSelector;\n\n return {\n loginUser: (username, password) => dispatch(loginUser(username, password)),\n logoutUser: redirectPath => dispatch(logoutUser(redirectPath)),\n authenticationError: select(selectUserAuthenticationError),\n authenticationErrorMessage: select(selectUserAuthenticationErrorMessage),\n error: select(selectUserError),\n errorMessage: select(selectUserErrorMessage),\n isAuthenticated: select(selectUserIsAuthenticated),\n isLoading: select(selectUserIsLoading),\n user: select(selectUser),\n };\n};\n\nexport default useLogin;\n","import useLogin from '../hooks/useLogin';\nimport { toJS } from '~/util/ToJs';\n\nconst LoginContainer = ({ children, ...props }) => {\n const userProps = useLogin(props);\n return children(userProps);\n};\n\nLoginContainer.propTypes = {};\n\nexport default toJS(LoginContainer);\n","import { useDispatch, useSelector } from 'react-redux';\nimport { registerUser } from '../redux/actions';\nimport {\n selectUserRegistration,\n selectUserRegistrationError,\n selectUserRegistrationIsLoading,\n selectUserRegistrationIsSuccess,\n} from '../redux/selectors';\n\nconst useRegistration = () => {\n const dispatch = useDispatch();\n const select = useSelector;\n\n return {\n registerUser: (user, mappers) => dispatch(registerUser(user, mappers)),\n error: select(selectUserRegistrationError),\n isLoading: select(selectUserRegistrationIsLoading),\n isSuccess: select(selectUserRegistrationIsSuccess),\n user: select(selectUserRegistration),\n };\n};\n\nexport default useRegistration;\n","import useRegistration from '../hooks/useRegistration';\nimport { toJS } from '~/util/ToJs';\n\nconst RegistrationContainer = ({ children, ...props }) => {\n const userProps = useRegistration(props);\n return children(userProps);\n};\n\nRegistrationContainer.propTypes = {};\n\nexport default toJS(RegistrationContainer);\n","import { useDispatch, useSelector } from 'react-redux';\nimport { requestPasswordReset, resetPassword } from '../redux/actions';\nimport {\n selectPasswordResetRequestError,\n selectPasswordResetRequestSending,\n selectPasswordResetRequestSent,\n selectResetPasswordSending,\n selectResetPasswordSent,\n selectResetPasswordError,\n} from '../redux/selectors';\nimport { selectCurrentSearch } from '~/routing/redux/selectors';\n\nconst useForgotPassword = () => {\n const dispatch = useDispatch();\n const select = useSelector;\n\n return {\n isLoading: select(selectPasswordResetRequestSending),\n isSuccess: select(selectPasswordResetRequestSent),\n error: select(selectPasswordResetRequestError),\n requestPasswordReset: userEmailObject =>\n dispatch(requestPasswordReset(userEmailObject)),\n\n setNewPassword: {\n queryString: select(selectCurrentSearch),\n isLoading: select(selectResetPasswordSending),\n isSuccess: select(selectResetPasswordSent),\n error: select(selectResetPasswordError),\n submit: resetPasswordObject =>\n dispatch(resetPassword(resetPasswordObject)),\n },\n };\n};\n\nexport default useForgotPassword;\n","import useForgotPassword from '../hooks/useForgotPassword';\nimport { toJS } from '~/util/ToJs';\n\nconst ForgotPasswordContainer = ({ children, ...props }) => {\n const userProps = useForgotPassword(props);\n return children(userProps);\n};\n\nForgotPasswordContainer.propTypes = {};\n\nexport default toJS(ForgotPasswordContainer);\n","import { useDispatch, useSelector } from 'react-redux';\nimport { changePassword } from '../redux/actions';\nimport {\n selectChangePasswordSending,\n selectChangePasswordSent,\n selectChangePasswordError,\n selectUserIsAuthenticated,\n selectUserGuid,\n} from '../redux/selectors';\n\nconst useChangePassword = () => {\n const dispatch = useDispatch();\n const select = useSelector;\n\n return {\n isLoading: select(selectChangePasswordSending),\n isSuccess: select(selectChangePasswordSent),\n userId: select(selectUserGuid),\n isLoggedIn: select(selectUserIsAuthenticated),\n error: select(selectChangePasswordError),\n changePassword: (userId, currentPassword, newPassword) =>\n dispatch(changePassword(userId, currentPassword, newPassword)),\n };\n};\n\nexport default useChangePassword;\n","import useChangePassword from '../hooks/useChangePassword';\nimport { toJS } from '~/util/ToJs';\n\nconst ChangePasswordContainer = ({ children, ...props }) => {\n const userProps = useChangePassword(props);\n return children(userProps);\n};\n\nChangePasswordContainer.propTypes = {};\n\nexport default toJS(ChangePasswordContainer);\n","import { connect } from 'react-redux';\nimport { loginUser, logoutUser } from '../redux/actions';\nimport {\n selectUser,\n selectUserAuthenticationError,\n selectUserError,\n selectUserIsAuthenticated,\n selectUserIsLoading,\n} from '../redux/selectors';\nimport { toJS } from '~/util/ToJs';\n\nconst getDisplayName = WrappedComponent => {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n};\n\nconst withLogin = WrappedComponent => {\n const mapStateToProps = state => {\n return {\n authenticationError: selectUserAuthenticationError(state),\n error: selectUserError(state),\n isAuthenticated: selectUserIsAuthenticated(state),\n isLoading: selectUserIsLoading(state),\n user: selectUser(state),\n };\n };\n\n const mapDispatchToProps = {\n loginUser,\n logoutUser,\n };\n\n const ConnectedComponent = connect(\n mapStateToProps,\n mapDispatchToProps\n )(toJS(WrappedComponent));\n\n ConnectedComponent.displayName = `${getDisplayName(WrappedComponent)}`;\n\n return ConnectedComponent;\n};\n\nexport default withLogin;\n","import { connect } from 'react-redux';\nimport { registerUser } from '../redux/actions';\nimport {\n selectUserRegistration,\n selectUserRegistrationError,\n selectUserRegistrationIsLoading,\n selectUserRegistrationIsSuccess,\n} from '../redux/selectors';\nimport { toJS } from '~/util/ToJs';\n\nconst getDisplayName = WrappedComponent => {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n};\n\nconst withRegistration = WrappedComponent => {\n const mapStateToProps = state => {\n return {\n error: selectUserRegistrationError(state),\n isLoading: selectUserRegistrationIsLoading(state),\n isSuccess: selectUserRegistrationIsSuccess(state),\n user: selectUserRegistration(state),\n };\n };\n\n const mapDispatchToProps = {\n registerUser,\n };\n\n const ConnectedComponent = connect(\n mapStateToProps,\n mapDispatchToProps\n )(toJS(WrappedComponent));\n\n ConnectedComponent.displayName = `${getDisplayName(WrappedComponent)}`;\n\n return ConnectedComponent;\n};\n\nexport default withRegistration;\n"],"names":["loginUser","username","password","action","LOGIN_USER","logoutUser","redirectPath","LOGOUT_USER","registerUser","user","mappers","REGISTER_USER","requestPasswordReset","userEmailObject","REQUEST_USER_PASSWORD_RESET","resetPassword","resetPasswordObject","RESET_USER_PASSWORD","changePassword","userId","currentPassword","newPassword","CHANGE_USER_PASSWORD","useLogin","dispatch","useDispatch","select","useSelector","authenticationError","selectUserAuthenticationError","authenticationErrorMessage","selectUserAuthenticationErrorMessage","error","selectUserError","errorMessage","selectUserErrorMessage","isAuthenticated","selectUserIsAuthenticated","isLoading","selectUserIsLoading","selectUser","LoginContainer","children","props","userProps","propTypes","toJS","useRegistration","selectUserRegistrationError","selectUserRegistrationIsLoading","isSuccess","selectUserRegistrationIsSuccess","selectUserRegistration","RegistrationContainer","useForgotPassword","selectPasswordResetRequestSending","selectPasswordResetRequestSent","selectPasswordResetRequestError","setNewPassword","queryString","selectCurrentSearch","selectResetPasswordSending","selectResetPasswordSent","selectResetPasswordError","submit","ForgotPasswordContainer","useChangePassword","selectChangePasswordSending","selectChangePasswordSent","selectUserGuid","isLoggedIn","selectChangePasswordError","ChangePasswordContainer","getDisplayName","WrappedComponent","displayName","name","withLogin","mapStateToProps","state","mapDispatchToProps","ConnectedComponent","connect","withRegistration"],"mappings":";;;;;;;;;;;;;;;;;;AAUO,MAAMA,SAAS,GAAG,CAACC,QAAD,EAAWC,QAAX,KACvBC,gBAAM,CAACC,mBAAD,EAAa;AAAEH,EAAAA,QAAF;AAAYC,EAAAA;AAAZ,CAAb,CADD;AAGA,MAAMG,UAAU,GAAGC,YAAY,IAAIH,gBAAM,CAACI,oBAAD,EAAc;AAAED,EAAAA;AAAF,CAAd,CAAzC;AAEA,MAAME,YAAY,GAAG,CAACC,IAAD,EAAOC,OAAP,KAC1BP,gBAAM,CAACQ,sBAAD,EAAgB;AACpBF,EAAAA,IADoB;AAEpBC,EAAAA;AAFoB,CAAhB,CADD;AAMA,MAAME,oBAAoB,GAAGC,eAAe,IACjDV,gBAAM,CAACW,oCAAD,EAA8B;AAAED,EAAAA;AAAF,CAA9B,CADD;AAGA,MAAME,aAAa,GAAGC,mBAAmB,IAC9Cb,gBAAM,CAACc,4BAAD,EAAsB;AAAED,EAAAA;AAAF,CAAtB,CADD;AAGA,MAAME,cAAc,GAAG,CAACC,MAAD,EAASC,eAAT,EAA0BC,WAA1B,KAC5BlB,gBAAM,CAACmB,6BAAD,EAAuB;AAAEH,EAAAA,MAAF;AAAUC,EAAAA,eAAV;AAA2BC,EAAAA;AAA3B,CAAvB,CADD;;;;;;;;;;;;MCfDE,QAAQ,GAAG,MAAM;AACrB,QAAMC,QAAQ,GAAGC,sBAAW,EAA5B;AACA,QAAMC,MAAM,GAAGC,sBAAf;AAEA,SAAO;AAC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AAA,kBAAkB,CAACN,WAAnB,GAAkC,GAAEF,cAAc,CAACC,gBAAD,CAAmB,EAArE;AAEA,SAAOO,kBAAP;AACD;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"user.js","sources":["../src/user/redux/actions.js","../src/user/hooks/useLogin.js","../src/user/containers/Login.container.js","../src/user/hooks/useRegistration.js","../src/user/containers/Registration.container.js","../src/user/hooks/useForgotPassword.js","../src/user/containers/ForgotPassword.container.js","../src/user/hooks/useChangePassword.js","../src/user/containers/ChangePassword.container.js","../src/user/hocs/withLogin.js","../src/user/hocs/withRegistration.js"],"sourcesContent":["import { action } from '~/redux/util';\nimport {\n CHANGE_USER_PASSWORD,\n LOGIN_USER,\n LOGOUT_USER,\n REGISTER_USER,\n REQUEST_USER_PASSWORD_RESET,\n RESET_USER_PASSWORD,\n} from './types';\n\nexport const loginUser = (username, password) =>\n action(LOGIN_USER, { username, password });\n\nexport const logoutUser = redirectPath => action(LOGOUT_USER, { redirectPath });\n\nexport const registerUser = (user, mappers) =>\n action(REGISTER_USER, {\n user,\n mappers,\n });\n\nexport const requestPasswordReset = userEmailObject =>\n action(REQUEST_USER_PASSWORD_RESET, { userEmailObject });\n\nexport const resetPassword = resetPasswordObject =>\n action(RESET_USER_PASSWORD, { resetPasswordObject });\n\nexport const changePassword = (userId, currentPassword, newPassword) =>\n action(CHANGE_USER_PASSWORD, { userId, currentPassword, newPassword });\n","import { useDispatch, useSelector } from 'react-redux';\nimport { loginUser, logoutUser } from '../redux/actions';\nimport {\n selectUser,\n selectUserIsAuthenticationError,\n selectUserIsError,\n selectUserErrorMessage,\n selectUserIsAuthenticated,\n selectUserIsLoading,\n} from '../redux/selectors';\n\nconst useLogin = () => {\n const dispatch = useDispatch();\n const select = useSelector;\n\n return {\n loginUser: (username, password) => dispatch(loginUser(username, password)),\n logoutUser: redirectPath => dispatch(logoutUser(redirectPath)),\n errorMessage: select(selectUserErrorMessage),\n isAuthenticated: select(selectUserIsAuthenticated),\n isAuthenticationError: select(selectUserIsAuthenticationError),\n isError: select(selectUserIsError),\n isLoading: select(selectUserIsLoading),\n user: select(selectUser),\n // DEPRECATED: authenticationError is deprecated use isAuthenticationError instead\n authenticationError: select(selectUserIsAuthenticationError),\n // DEPRECATED: authenticationErrorMessage is deprecated use errorMessage instead\n authenticationErrorMessage: select(selectUserErrorMessage),\n // DEPRECATED: error is deprecated use isError instead\n error: select(selectUserIsError),\n };\n};\n\nexport default useLogin;\n","import useLogin from '../hooks/useLogin';\nimport { toJS } from '~/util/ToJs';\n\nconst LoginContainer = ({ children, ...props }) => {\n const userProps = useLogin(props);\n return children(userProps);\n};\n\nLoginContainer.propTypes = {};\n\nexport default toJS(LoginContainer);\n","import { useDispatch, useSelector } from 'react-redux';\nimport { registerUser } from '../redux/actions';\nimport {\n selectUserRegistration,\n selectUserRegistrationError,\n selectUserRegistrationIsLoading,\n selectUserRegistrationIsSuccess,\n} from '../redux/selectors';\n\nconst useRegistration = () => {\n const dispatch = useDispatch();\n const select = useSelector;\n\n return {\n registerUser: (user, mappers) => dispatch(registerUser(user, mappers)),\n error: select(selectUserRegistrationError),\n isLoading: select(selectUserRegistrationIsLoading),\n isSuccess: select(selectUserRegistrationIsSuccess),\n user: select(selectUserRegistration),\n };\n};\n\nexport default useRegistration;\n","import useRegistration from '../hooks/useRegistration';\nimport { toJS } from '~/util/ToJs';\n\nconst RegistrationContainer = ({ children, ...props }) => {\n const userProps = useRegistration(props);\n return children(userProps);\n};\n\nRegistrationContainer.propTypes = {};\n\nexport default toJS(RegistrationContainer);\n","import { useDispatch, useSelector } from 'react-redux';\nimport { requestPasswordReset, resetPassword } from '../redux/actions';\nimport {\n selectPasswordResetRequestError,\n selectPasswordResetRequestSending,\n selectPasswordResetRequestSent,\n selectResetPasswordSending,\n selectResetPasswordSent,\n selectResetPasswordError,\n} from '../redux/selectors';\nimport { selectCurrentSearch } from '~/routing/redux/selectors';\n\nconst useForgotPassword = () => {\n const dispatch = useDispatch();\n const select = useSelector;\n\n return {\n isLoading: select(selectPasswordResetRequestSending),\n isSuccess: select(selectPasswordResetRequestSent),\n error: select(selectPasswordResetRequestError),\n requestPasswordReset: userEmailObject =>\n dispatch(requestPasswordReset(userEmailObject)),\n\n setNewPassword: {\n queryString: select(selectCurrentSearch),\n isLoading: select(selectResetPasswordSending),\n isSuccess: select(selectResetPasswordSent),\n error: select(selectResetPasswordError),\n submit: resetPasswordObject =>\n dispatch(resetPassword(resetPasswordObject)),\n },\n };\n};\n\nexport default useForgotPassword;\n","import useForgotPassword from '../hooks/useForgotPassword';\nimport { toJS } from '~/util/ToJs';\n\nconst ForgotPasswordContainer = ({ children, ...props }) => {\n const userProps = useForgotPassword(props);\n return children(userProps);\n};\n\nForgotPasswordContainer.propTypes = {};\n\nexport default toJS(ForgotPasswordContainer);\n","import { useDispatch, useSelector } from 'react-redux';\nimport { changePassword } from '../redux/actions';\nimport {\n selectChangePasswordSending,\n selectChangePasswordSent,\n selectChangePasswordError,\n selectUserIsAuthenticated,\n selectUserGuid,\n} from '../redux/selectors';\n\nconst useChangePassword = () => {\n const dispatch = useDispatch();\n const select = useSelector;\n\n return {\n isLoading: select(selectChangePasswordSending),\n isSuccess: select(selectChangePasswordSent),\n userId: select(selectUserGuid),\n isLoggedIn: select(selectUserIsAuthenticated),\n error: select(selectChangePasswordError),\n changePassword: (userId, currentPassword, newPassword) =>\n dispatch(changePassword(userId, currentPassword, newPassword)),\n };\n};\n\nexport default useChangePassword;\n","import useChangePassword from '../hooks/useChangePassword';\nimport { toJS } from '~/util/ToJs';\n\nconst ChangePasswordContainer = ({ children, ...props }) => {\n const userProps = useChangePassword(props);\n return children(userProps);\n};\n\nChangePasswordContainer.propTypes = {};\n\nexport default toJS(ChangePasswordContainer);\n","import { connect } from 'react-redux';\nimport { loginUser, logoutUser } from '../redux/actions';\nimport {\n selectUser,\n selectUserIsAuthenticationError,\n selectUserIsError,\n selectUserIsAuthenticated,\n selectUserIsLoading,\n} from '../redux/selectors';\nimport { toJS } from '~/util/ToJs';\n\nconst getDisplayName = WrappedComponent => {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n};\n\nconst withLogin = WrappedComponent => {\n const mapStateToProps = state => {\n return {\n isAuthenticated: selectUserIsAuthenticated(state),\n isAuthenticationError: selectUserIsAuthenticationError(state),\n isError: selectUserIsError(state),\n isLoading: selectUserIsLoading(state),\n user: selectUser(state),\n // DEPRECATED: authenticationError is deprecated use isAuthenticationError instead\n authenticationError: selectUserIsAuthenticationError(state),\n // DEPRECATED: error is deprecated use isError instead\n error: selectUserIsError(state),\n };\n };\n\n const mapDispatchToProps = {\n loginUser,\n logoutUser,\n };\n\n const ConnectedComponent = connect(\n mapStateToProps,\n mapDispatchToProps\n )(toJS(WrappedComponent));\n\n ConnectedComponent.displayName = `${getDisplayName(WrappedComponent)}`;\n\n return ConnectedComponent;\n};\n\nexport default withLogin;\n","import { connect } from 'react-redux';\nimport { registerUser } from '../redux/actions';\nimport {\n selectUserRegistration,\n selectUserRegistrationError,\n selectUserRegistrationIsLoading,\n selectUserRegistrationIsSuccess,\n} from '../redux/selectors';\nimport { toJS } from '~/util/ToJs';\n\nconst getDisplayName = WrappedComponent => {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n};\n\nconst withRegistration = WrappedComponent => {\n const mapStateToProps = state => {\n return {\n error: selectUserRegistrationError(state),\n isLoading: selectUserRegistrationIsLoading(state),\n isSuccess: selectUserRegistrationIsSuccess(state),\n user: selectUserRegistration(state),\n };\n };\n\n const mapDispatchToProps = {\n registerUser,\n };\n\n const ConnectedComponent = connect(\n mapStateToProps,\n mapDispatchToProps\n )(toJS(WrappedComponent));\n\n ConnectedComponent.displayName = `${getDisplayName(WrappedComponent)}`;\n\n return ConnectedComponent;\n};\n\nexport default withRegistration;\n"],"names":["loginUser","username","password","action","LOGIN_USER","logoutUser","redirectPath","LOGOUT_USER","registerUser","user","mappers","REGISTER_USER","requestPasswordReset","userEmailObject","REQUEST_USER_PASSWORD_RESET","resetPassword","resetPasswordObject","RESET_USER_PASSWORD","changePassword","userId","currentPassword","newPassword","CHANGE_USER_PASSWORD","useLogin","dispatch","useDispatch","select","useSelector","errorMessage","selectUserErrorMessage","isAuthenticated","selectUserIsAuthenticated","isAuthenticationError","selectUserIsAuthenticationError","isError","selectUserIsError","isLoading","selectUserIsLoading","selectUser","authenticationError","authenticationErrorMessage","error","LoginContainer","children","props","userProps","propTypes","toJS","useRegistration","selectUserRegistrationError","selectUserRegistrationIsLoading","isSuccess","selectUserRegistrationIsSuccess","selectUserRegistration","RegistrationContainer","useForgotPassword","selectPasswordResetRequestSending","selectPasswordResetRequestSent","selectPasswordResetRequestError","setNewPassword","queryString","selectCurrentSearch","selectResetPasswordSending","selectResetPasswordSent","selectResetPasswordError","submit","ForgotPasswordContainer","useChangePassword","selectChangePasswordSending","selectChangePasswordSent","selectUserGuid","isLoggedIn","selectChangePasswordError","ChangePasswordContainer","getDisplayName","WrappedComponent","displayName","name","withLogin","mapStateToProps","state","mapDispatchToProps","ConnectedComponent","connect","withRegistration"],"mappings":";;;;;;;;;;;;;;;;;;AAUO,MAAMA,SAAS,GAAG,CAACC,QAAD,EAAWC,QAAX,KACvBC,gBAAM,CAACC,mBAAD,EAAa;AAAEH,EAAAA,QAAF;AAAYC,EAAAA,QAAAA;AAAZ,CAAb,CADD,CAAA;AAGA,MAAMG,UAAU,GAAGC,YAAY,IAAIH,gBAAM,CAACI,oBAAD,EAAc;AAAED,EAAAA,YAAAA;AAAF,CAAd,CAAzC,CAAA;AAEA,MAAME,YAAY,GAAG,CAACC,IAAD,EAAOC,OAAP,KAC1BP,gBAAM,CAACQ,sBAAD,EAAgB;AACpBF,EAAAA,IADoB;AAEpBC,EAAAA,OAAAA;AAFoB,CAAhB,CADD,CAAA;AAMA,MAAME,oBAAoB,GAAGC,eAAe,IACjDV,gBAAM,CAACW,oCAAD,EAA8B;AAAED,EAAAA,eAAAA;AAAF,CAA9B,CADD,CAAA;AAGA,MAAME,aAA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AP,CAGzBlC,SAAI,CAAC4B,gBAAD,CAHqB,CAA3B,CAAA;AAKAO,EAAAA,kBAAkB,CAACN,WAAnB,GAAkC,GAAEF,cAAc,CAACC,gBAAD,CAAmB,CAArE,CAAA,CAAA;AAEA,EAAA,OAAOO,kBAAP,CAAA;AACD;;;;;;;;;;;;;;;;;;;;;"}
|
package/cjs/util.js
CHANGED
|
@@ -2,19 +2,52 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var VersionInfo = require('./VersionInfo-df35c917.js');
|
|
5
6
|
var mapJson = require('jsonpath-mapper');
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var version = require('./version-085d203d.js');
|
|
10
|
-
var styled = require('styled-components');
|
|
7
|
+
require('react');
|
|
8
|
+
require('react-redux');
|
|
9
|
+
require('./selectors-2c1b1183.js');
|
|
11
10
|
require('query-string');
|
|
11
|
+
require('./version-dcfdafd9.js');
|
|
12
|
+
require('styled-components');
|
|
12
13
|
|
|
13
14
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
15
|
|
|
15
16
|
var mapJson__default = /*#__PURE__*/_interopDefaultLegacy(mapJson);
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
|
|
18
|
+
const stringifyStrings = obj => {
|
|
19
|
+
const returnObj = Array.isArray(obj) ? [] : {};
|
|
20
|
+
Object.entries(obj).forEach(([key, value]) => {
|
|
21
|
+
switch (typeof value) {
|
|
22
|
+
case 'string':
|
|
23
|
+
returnObj[key] = JSON.stringify(value);
|
|
24
|
+
break;
|
|
25
|
+
|
|
26
|
+
case 'object':
|
|
27
|
+
returnObj[key] = stringifyStrings(value);
|
|
28
|
+
break;
|
|
29
|
+
|
|
30
|
+
default:
|
|
31
|
+
returnObj[key] = value;
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
return returnObj;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
var stringifyStrings_1 = stringifyStrings;
|
|
39
|
+
|
|
40
|
+
const url = (alias, project) => {
|
|
41
|
+
const projectAndAlias = project && project.toLowerCase() !== 'website' ? `${project.toLowerCase()}-${alias}` : alias;
|
|
42
|
+
return {
|
|
43
|
+
api: `https://api-${alias}.cloud.contensis.com`,
|
|
44
|
+
cms: `https://cms-${alias}.cloud.contensis.com`,
|
|
45
|
+
liveWeb: `https://live-${projectAndAlias}.cloud.contensis.com`,
|
|
46
|
+
previewWeb: `https://preview-${projectAndAlias}.cloud.contensis.com`,
|
|
47
|
+
iisWeb: `https://iis-live-${projectAndAlias}.cloud.contensis.com`,
|
|
48
|
+
iisPreviewWeb: `https://iis-preview-${projectAndAlias}.cloud.contensis.com`
|
|
49
|
+
};
|
|
50
|
+
};
|
|
18
51
|
|
|
19
52
|
/**
|
|
20
53
|
*
|
|
@@ -90,18 +123,25 @@ const mapComposer = (composer, mappers) => Array.isArray(composer) ? composer.ma
|
|
|
90
123
|
_type: composerItem.type,
|
|
91
124
|
_index: index
|
|
92
125
|
}; // Add fields and $root item into the composer item source object
|
|
93
|
-
// for use inside each item mapping
|
|
126
|
+
// for use inside each item mapping, for arrays we inject the added fields
|
|
127
|
+
// into the first array item. This is useful if we require any of
|
|
128
|
+
// composerItem.type, composerItem index/position and composer $root
|
|
129
|
+
// in scope to influence any composer item's mapping logic
|
|
94
130
|
|
|
95
|
-
const sourceObject = itemValue &&
|
|
96
|
-
...
|
|
131
|
+
const sourceObject = itemValue && Array.isArray(itemValue) ? itemValue.map((iv, idx) => idx !== 0 ? iv : typeof iv === 'object' ? { ...addedFields,
|
|
132
|
+
...iv,
|
|
133
|
+
$root: composer
|
|
134
|
+
} : iv) : typeof itemValue === 'object' ? { ...addedFields,
|
|
135
|
+
...itemValue,
|
|
97
136
|
$root: composer
|
|
98
|
-
} : itemValue || {};
|
|
137
|
+
} : itemValue || {}; // Apply the composer item mapping
|
|
138
|
+
|
|
99
139
|
const mappedFields = mapJson__default["default"](sourceObject, mapper); // Add the extra fields in with the return object
|
|
100
140
|
|
|
101
141
|
return mappedFields && typeof mappedFields === 'object' ? { ...mappedFields,
|
|
102
142
|
...addedFields
|
|
103
143
|
} : mappedFields;
|
|
104
|
-
} else return;
|
|
144
|
+
} else return {};
|
|
105
145
|
}) : composer || [];
|
|
106
146
|
/**
|
|
107
147
|
* useComposerMapper hook to take a composer field from Delivery API along
|
|
@@ -123,207 +163,12 @@ const useComposerMapper = (composer = [], mappers) => mapComposer(composer, mapp
|
|
|
123
163
|
*/
|
|
124
164
|
|
|
125
165
|
const entryMapper = mapping => (node, state) => mapJson__default["default"]({ ...node,
|
|
126
|
-
...node.entry,
|
|
166
|
+
...(node.entry || {}),
|
|
127
167
|
state
|
|
128
168
|
}, mapping);
|
|
129
169
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
surrogateControl = '3600'
|
|
133
|
-
}, method = 'header') => {
|
|
134
|
-
if (cacheControl) response[method]('Cache-Control', cacheControl);
|
|
135
|
-
if (surrogateControl) response[method]('Surrogate-Control', `max-age=${surrogateControl.toString()}`);
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
const stringifyStrings = obj => {
|
|
139
|
-
const returnObj = Array.isArray(obj) ? [] : {};
|
|
140
|
-
Object.entries(obj).forEach(([key, value]) => {
|
|
141
|
-
switch (typeof value) {
|
|
142
|
-
case 'string':
|
|
143
|
-
returnObj[key] = JSON.stringify(value);
|
|
144
|
-
break;
|
|
145
|
-
|
|
146
|
-
case 'object':
|
|
147
|
-
returnObj[key] = stringifyStrings(value);
|
|
148
|
-
break;
|
|
149
|
-
|
|
150
|
-
default:
|
|
151
|
-
returnObj[key] = value;
|
|
152
|
-
break;
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
return returnObj;
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
var stringifyStrings_1 = stringifyStrings;
|
|
159
|
-
|
|
160
|
-
const url = (alias, project) => {
|
|
161
|
-
const projectAndAlias = project && project.toLowerCase() !== 'website' ? `${project.toLowerCase()}-${alias}` : alias;
|
|
162
|
-
return {
|
|
163
|
-
api: `https://api-${alias}.cloud.contensis.com`,
|
|
164
|
-
cms: `https://cms-${alias}.cloud.contensis.com`,
|
|
165
|
-
liveWeb: `https://live-${projectAndAlias}.cloud.contensis.com`,
|
|
166
|
-
previewWeb: `https://preview-${projectAndAlias}.cloud.contensis.com`,
|
|
167
|
-
iisWeb: `https://iis-live-${projectAndAlias}.cloud.contensis.com`,
|
|
168
|
-
iisPreviewWeb: `https://iis-preview-${projectAndAlias}.cloud.contensis.com`
|
|
169
|
-
};
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
const context = typeof window != 'undefined' ? window : global;
|
|
173
|
-
const isDev = process.env.NODE_ENV === 'development';
|
|
174
|
-
|
|
175
|
-
const pj = () => isDev ? PACKAGE_JSON
|
|
176
|
-
/* global PACKAGE_JSON */
|
|
177
|
-
: context.PACKAGE_JSON || {
|
|
178
|
-
name: 'packagejson not found',
|
|
179
|
-
repository: ''
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
const versionInfoProps = {
|
|
183
|
-
packageDetail: () => {
|
|
184
|
-
const pkg = pj();
|
|
185
|
-
return {
|
|
186
|
-
name: pkg.name,
|
|
187
|
-
version: pkg.version,
|
|
188
|
-
repository: pkg.repository
|
|
189
|
-
};
|
|
190
|
-
},
|
|
191
|
-
uris: {
|
|
192
|
-
gitRepo: () => pj().repository,
|
|
193
|
-
commit: state => {
|
|
194
|
-
const commitRef = version.selectCommitRef(state);
|
|
195
|
-
return `${pj().repository}/commit/${commitRef ? commitRef : ''}`;
|
|
196
|
-
},
|
|
197
|
-
pipeline: state => {
|
|
198
|
-
const buildNumber = version.selectBuildNumber(state);
|
|
199
|
-
return `${pj().repository}/${pj().repository.includes('github.com') ? 'actions/runs' : 'pipelines'}/${buildNumber ? buildNumber : ''}`;
|
|
200
|
-
}
|
|
201
|
-
},
|
|
202
|
-
zenPackageVersions: () => [...(Object.entries(pj().devDependencies || {}).filter(([pkg]) => pkg.includes('zengenti') || pkg.includes('contensis')) || []), ...(Object.entries(pj().dependencies || {}).filter(([pkg]) => pkg.includes('zengenti') || pkg.includes('contensis')) || [])],
|
|
203
|
-
deliveryApi: () => JSON.parse(JSON.stringify(DELIVERY_API_CONFIG
|
|
204
|
-
/* global DELIVERY_API_CONFIG */
|
|
205
|
-
)),
|
|
206
|
-
devEnv: () => typeof DEV_ENV !== 'undefined'
|
|
207
|
-
/* global DEV_ENV */
|
|
208
|
-
? DEV_ENV : null,
|
|
209
|
-
disableSsrRedux: () => isDev ? DISABLE_SSR_REDUX
|
|
210
|
-
/* global DISABLE_SSR_REDUX*/
|
|
211
|
-
: context.DISABLE_SSR_REDUX || false,
|
|
212
|
-
nodeEnv: () => process.env.NODE_ENV || 'production',
|
|
213
|
-
packagejson: () => pj() || {},
|
|
214
|
-
projects: () => isDev ? PROJECTS
|
|
215
|
-
/* global PROJECTS */
|
|
216
|
-
: context.PROJECTS,
|
|
217
|
-
proxyDeliveryApi: () => isDev ? PROXY_DELIVERY_API
|
|
218
|
-
/* global PROXY_DELIVERY_API */
|
|
219
|
-
: context.PROXY_DELIVERY_API || false,
|
|
220
|
-
publicUri: () => isDev ? PUBLIC_URI
|
|
221
|
-
/* global PUBLIC_URI */
|
|
222
|
-
: context.PUBLIC_URI || null,
|
|
223
|
-
project: state => selectors.selectCurrentProject(state),
|
|
224
|
-
reverseProxyPaths: () => isDev ? REVERSE_PROXY_PATHS
|
|
225
|
-
/* global REVERSE_PROXY_PATHS */
|
|
226
|
-
: context.REVERSE_PROXY_PATHS || {},
|
|
227
|
-
servers: () => isDev ? SERVERS
|
|
228
|
-
/* global SERVERS */
|
|
229
|
-
: context.SERVERS,
|
|
230
|
-
version: {
|
|
231
|
-
buildNumber: state => version.selectBuildNumber(state),
|
|
232
|
-
commitRef: state => version.selectCommitRef(state),
|
|
233
|
-
contensisVersionStatus: state => version.selectVersionStatus(state)
|
|
234
|
-
}
|
|
235
|
-
};
|
|
236
|
-
|
|
237
|
-
const mapStateToVersionInfo = state => {
|
|
238
|
-
const mappedProps = mapJson__default["default"](state, versionInfoProps);
|
|
239
|
-
return mappedProps;
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
const VersionInfoStyledTable = styled__default["default"].table.withConfig({
|
|
243
|
-
displayName: "VersionInfostyled__VersionInfoStyledTable",
|
|
244
|
-
componentId: "sc-ogujr7-0"
|
|
245
|
-
})(["font-family:'Source Sans Pro',Helvetica,Arial,sans-serif;font-size:1.6rem;line-height:1.5rem;border-bottom:4px solid #8892bf;border-collapse:separate;margin:0 auto;width:80%;th{text-align:left;background-color:#c4c9df;border-bottom:#8892bf 2px solid;border-bottom-color:#8892bf;border-top:20px solid #fff;}td{border-bottom:1px solid #eee;}td,th{padding:0.5rem 0.75rem;vertical-align:top;}.left{width:25%;}tr th{border-right:hidden;border-spacing:0 15px;}.green{background-color:#9c9;border-bottom:1px solid #696;}.red{background-color:#c99;border-bottom:1px solid #966;}.small{font-size:100%;line-height:2.4rem;}"]);
|
|
246
|
-
|
|
247
|
-
const VersionInfo = ({
|
|
248
|
-
deliveryApi,
|
|
249
|
-
devEnv,
|
|
250
|
-
disableSsrRedux,
|
|
251
|
-
nodeEnv,
|
|
252
|
-
packageDetail,
|
|
253
|
-
project,
|
|
254
|
-
projects,
|
|
255
|
-
proxyDeliveryApi,
|
|
256
|
-
publicUri,
|
|
257
|
-
reverseProxyPaths,
|
|
258
|
-
servers,
|
|
259
|
-
uris,
|
|
260
|
-
version,
|
|
261
|
-
zenPackageVersions
|
|
262
|
-
}) => {
|
|
263
|
-
return /*#__PURE__*/React__default["default"].createElement(VersionInfoStyledTable, null, /*#__PURE__*/React__default["default"].createElement("thead", null, /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", {
|
|
264
|
-
colSpan: 2
|
|
265
|
-
}, /*#__PURE__*/React__default["default"].createElement("h1", null, /*#__PURE__*/React__default["default"].createElement("a", {
|
|
266
|
-
href: "/"
|
|
267
|
-
}, "Version Information"))))), /*#__PURE__*/React__default["default"].createElement("tbody", null, /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("th", {
|
|
268
|
-
colSpan: 2
|
|
269
|
-
}, "Package detail")), /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", {
|
|
270
|
-
className: "left"
|
|
271
|
-
}, "Name"), /*#__PURE__*/React__default["default"].createElement("td", null, packageDetail.name)), /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", {
|
|
272
|
-
className: "left"
|
|
273
|
-
}, "Version"), /*#__PURE__*/React__default["default"].createElement("td", null, packageDetail.version)), /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("th", {
|
|
274
|
-
colSpan: 2
|
|
275
|
-
}, "Version info (state)")), /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", null, "Git repo url: "), /*#__PURE__*/React__default["default"].createElement("td", null, /*#__PURE__*/React__default["default"].createElement("a", {
|
|
276
|
-
href: packageDetail.repository,
|
|
277
|
-
target: "_blank",
|
|
278
|
-
rel: "noopener noreferrer"
|
|
279
|
-
}, packageDetail.repository))), /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", null, "Pipeline: "), /*#__PURE__*/React__default["default"].createElement("td", null, /*#__PURE__*/React__default["default"].createElement("a", {
|
|
280
|
-
href: uris.pipeline,
|
|
281
|
-
target: "_blank",
|
|
282
|
-
rel: "noopener noreferrer"
|
|
283
|
-
}, version.buildNumber))), /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", null, "Commit: "), /*#__PURE__*/React__default["default"].createElement("td", null, /*#__PURE__*/React__default["default"].createElement("a", {
|
|
284
|
-
href: uris.commit,
|
|
285
|
-
target: "_blank",
|
|
286
|
-
rel: "noopener noreferrer"
|
|
287
|
-
}, version.commitRef))), /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", null, "Project"), /*#__PURE__*/React__default["default"].createElement("td", {
|
|
288
|
-
className: project === 'unknown' ? 'red' : ''
|
|
289
|
-
}, project)), /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", null, "Contensis version status: "), /*#__PURE__*/React__default["default"].createElement("td", {
|
|
290
|
-
className: version.contensisVersionStatus === 'published' ? 'green' : 'red'
|
|
291
|
-
}, version.contensisVersionStatus)), /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("th", {
|
|
292
|
-
colSpan: 2
|
|
293
|
-
}, "Build configuration")), /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", null, "Environment"), /*#__PURE__*/React__default["default"].createElement("td", null, servers.alias)), /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", null, "Public uri"), /*#__PURE__*/React__default["default"].createElement("td", null, publicUri)), /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", null, "Zengenti packages"), /*#__PURE__*/React__default["default"].createElement("td", null, zenPackageVersions.map(([pkg, ver], idx) => /*#__PURE__*/React__default["default"].createElement("div", {
|
|
294
|
-
key: idx
|
|
295
|
-
}, pkg, ": ", ver)))), /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", null, "Servers"), /*#__PURE__*/React__default["default"].createElement("td", {
|
|
296
|
-
className: "small"
|
|
297
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", null, "web: ", servers.web), /*#__PURE__*/React__default["default"].createElement("div", null, "preview: ", servers.previewWeb), /*#__PURE__*/React__default["default"].createElement("div", null, "api: ", servers.api), /*#__PURE__*/React__default["default"].createElement("div", null, "cms: ", servers.cms), /*#__PURE__*/React__default["default"].createElement("div", null, "iis: ", servers.iis), /*#__PURE__*/React__default["default"].createElement("div", null, "iis preview: ", servers.previewIis))), /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", null, "Reverse proxy paths"), /*#__PURE__*/React__default["default"].createElement("td", null, Object.entries(reverseProxyPaths).map(([, path], key) => /*#__PURE__*/React__default["default"].createElement("span", {
|
|
298
|
-
key: key
|
|
299
|
-
}, "[ ", path, " ] ")))), /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", null, "Projects"), /*#__PURE__*/React__default["default"].createElement("td", null, Object.entries(projects).map(([, project], key) => /*#__PURE__*/React__default["default"].createElement("div", {
|
|
300
|
-
key: key
|
|
301
|
-
}, "[ ", project.id, ": ", project.publicUri, " ]")))), /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", null, "Delivery API"), /*#__PURE__*/React__default["default"].createElement("td", {
|
|
302
|
-
className: "small"
|
|
303
|
-
}, /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
304
|
-
style: {
|
|
305
|
-
margin: 0,
|
|
306
|
-
padding: 0
|
|
307
|
-
}
|
|
308
|
-
}, Object.entries(deliveryApi).map(([key, value], idx) => {
|
|
309
|
-
if (typeof value === 'object') return null;
|
|
310
|
-
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
311
|
-
key: idx,
|
|
312
|
-
style: {
|
|
313
|
-
listStyleType: 'none'
|
|
314
|
-
}
|
|
315
|
-
}, key, ": ", /*#__PURE__*/React__default["default"].createElement("span", null, value));
|
|
316
|
-
})))), /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", null, "Proxy Delivery API requests"), /*#__PURE__*/React__default["default"].createElement("td", {
|
|
317
|
-
className: proxyDeliveryApi ? 'green' : 'red'
|
|
318
|
-
}, proxyDeliveryApi.toString())), /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", null, "Disable SSR inline-redux"), /*#__PURE__*/React__default["default"].createElement("td", null, disableSsrRedux.toString())), /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", null, "NODE_ENV"), /*#__PURE__*/React__default["default"].createElement("td", {
|
|
319
|
-
className: nodeEnv === 'production' ? 'green' : 'red'
|
|
320
|
-
}, nodeEnv.toString())), devEnv && /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", null, "process.env"), /*#__PURE__*/React__default["default"].createElement("td", null, Object.entries(devEnv).map(([k, v], key) => /*#__PURE__*/React__default["default"].createElement("div", {
|
|
321
|
-
key: key
|
|
322
|
-
}, "[ ", k, ": ", v, " ]"))))));
|
|
323
|
-
};
|
|
324
|
-
|
|
325
|
-
var VersionInfo$1 = reactRedux.connect(mapStateToVersionInfo)(VersionInfo);
|
|
326
|
-
|
|
170
|
+
exports.VersionInfo = VersionInfo.VersionInfo;
|
|
171
|
+
exports.setCachingHeaders = VersionInfo.setCachingHeaders;
|
|
327
172
|
Object.defineProperty(exports, 'jpath', {
|
|
328
173
|
enumerable: true,
|
|
329
174
|
get: function () { return mapJson.jpath; }
|
|
@@ -332,11 +177,9 @@ Object.defineProperty(exports, 'mapJson', {
|
|
|
332
177
|
enumerable: true,
|
|
333
178
|
get: function () { return mapJson__default["default"]; }
|
|
334
179
|
});
|
|
335
|
-
exports.VersionInfo = VersionInfo$1;
|
|
336
180
|
exports.entryMapper = entryMapper;
|
|
337
181
|
exports.mapComposer = mapComposer;
|
|
338
182
|
exports.mapEntries = mapEntries;
|
|
339
|
-
exports.setCachingHeaders = setCachingHeaders;
|
|
340
183
|
exports.stringifyStrings = stringifyStrings_1;
|
|
341
184
|
exports.urls = url;
|
|
342
185
|
exports.useComposerMapper = useComposerMapper;
|