@zengenti/contensis-react-base 3.0.2-beta.30 → 3.0.2-beta.32
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-eefb5b8f.js → App-21a7d836.js} +29 -61
- package/cjs/App-21a7d836.js.map +1 -0
- package/cjs/{ContensisDeliveryApi-e2b3ce60.js → ContensisDeliveryApi-c079b03a.js} +35 -68
- package/cjs/ContensisDeliveryApi-c079b03a.js.map +1 -0
- package/cjs/{RouteLoader-85bee645.js → RouteLoader-7f0d107a.js} +5 -9
- package/cjs/RouteLoader-7f0d107a.js.map +1 -0
- package/cjs/{ToJs-29de3c36.js → ToJs-6e9cfa69.js} +2 -2
- package/cjs/ToJs-6e9cfa69.js.map +1 -0
- package/cjs/_commonjsHelpers-b3309d7b.js +11 -0
- package/cjs/_commonjsHelpers-b3309d7b.js.map +1 -0
- package/cjs/client.js +11 -15
- package/cjs/client.js.map +1 -1
- package/cjs/contensis-react-base.js +350 -28
- package/cjs/contensis-react-base.js.map +1 -1
- package/cjs/forms.js +3057 -1046
- package/cjs/forms.js.map +1 -1
- package/cjs/{ChangePassword.container-7306be55.js → login-2a6b5be0.js} +84 -247
- package/cjs/login-2a6b5be0.js.map +1 -0
- package/cjs/redux.js +3 -3
- package/cjs/routing.js +3 -5
- package/cjs/routing.js.map +1 -1
- package/cjs/{selectors-a6eac513.js → selectors-bcca60f4.js} +9 -5
- package/cjs/selectors-bcca60f4.js.map +1 -0
- package/cjs/user.js +159 -34
- package/cjs/user.js.map +1 -1
- package/cjs/util.js +3 -7
- package/cjs/util.js.map +1 -1
- package/cjs/{version-9edb5540.js → version-4077e706.js} +2 -2
- package/cjs/{version-9edb5540.js.map → version-4077e706.js.map} +1 -1
- package/cjs/{version-d3b5fbde.js → version-fe28099e.js} +3 -3
- package/cjs/{version-d3b5fbde.js.map → version-fe28099e.js.map} +1 -1
- package/esm/{App-2db3d689.js → App-2af18a99.js} +24 -55
- package/esm/App-2af18a99.js.map +1 -0
- package/esm/{ContensisDeliveryApi-50b8fd7c.js → ContensisDeliveryApi-5660ee0e.js} +36 -67
- package/esm/ContensisDeliveryApi-5660ee0e.js.map +1 -0
- package/esm/{RouteLoader-3e77f6a4.js → RouteLoader-6eac364e.js} +5 -9
- package/esm/RouteLoader-6eac364e.js.map +1 -0
- package/esm/{ToJs-e533a70a.js → ToJs-9b30636a.js} +2 -2
- package/esm/ToJs-9b30636a.js.map +1 -0
- package/esm/_commonjsHelpers-1789f0cf.js +8 -0
- package/esm/_commonjsHelpers-1789f0cf.js.map +1 -0
- package/esm/client.js +12 -16
- package/esm/client.js.map +1 -1
- package/esm/contensis-react-base.js +350 -27
- package/esm/contensis-react-base.js.map +1 -1
- package/esm/forms.js +3058 -1047
- package/esm/forms.js.map +1 -1
- package/esm/{ChangePassword.container-54b4011d.js → login-71ff3fcb.js} +78 -230
- package/esm/login-71ff3fcb.js.map +1 -0
- package/esm/redux.js +6 -6
- package/esm/routing.js +3 -5
- package/esm/routing.js.map +1 -1
- package/esm/{selectors-5061d7c8.js → selectors-74de49a3.js} +10 -5
- package/esm/selectors-74de49a3.js.map +1 -0
- package/esm/user.js +151 -22
- package/esm/user.js.map +1 -1
- package/esm/util.js +3 -5
- package/esm/util.js.map +1 -1
- package/esm/{version-7550d14d.js → version-b15807c5.js} +3 -3
- package/esm/{version-7550d14d.js.map → version-b15807c5.js.map} +1 -1
- package/esm/{version-1ef42ad1.js → version-ef107106.js} +2 -2
- package/esm/{version-1ef42ad1.js.map → version-ef107106.js.map} +1 -1
- package/models/client/client.d.ts +1 -1
- package/models/config.d.ts +4 -4
- package/models/redux/appstate.d.ts +1 -1
- package/models/routing/redux/actions.d.ts +6 -10
- package/models/routing/redux/selectors.d.ts +3 -3
- package/models/routing/redux/types.d.ts +1 -0
- package/models/routing/routes.d.ts +17 -20
- package/models/search/models/Queries.d.ts +10 -8
- package/models/search/models/Search.d.ts +24 -24
- package/models/search/models/SearchActions.d.ts +33 -33
- package/models/search/models/SearchState.d.ts +11 -11
- package/models/search/models/SearchUtil.d.ts +1 -1
- package/models/search/models/WithSearch.d.ts +1 -1
- package/models/search/redux/actions.d.ts +4 -4
- package/models/search/redux/selectors.d.ts +27 -27
- package/models/search/redux/util.d.ts +1 -1
- package/models/search/search/expressions.d.ts +4 -4
- package/models/search/search/util.d.ts +2 -2
- package/models/search/transformations/state-to-queryparams.mapper.d.ts +1 -1
- package/models/server/features/linkdepth-api/LinkDepthSearchService.d.ts +1 -1
- package/models/server/features/linkdepth-api/search.d.ts +2 -2
- package/models/server/internalServer.d.ts +5 -7
- package/models/server/util/bundles.d.ts +2 -2
- package/models/server/util/handleExceptions.d.ts +1 -1
- package/models/testImmer/redux/reducer.d.ts +1 -1
- package/models/user/components/Login.d.ts +3 -2
- package/models/user/containers/ChangePassword.container.d.ts +2 -2
- package/models/user/containers/ForgotPassword.container.d.ts +2 -2
- package/models/user/containers/Login.container.d.ts +2 -2
- package/models/user/containers/Registration.container.d.ts +2 -2
- package/models/user/hocs/withLogin.d.ts +11 -5
- package/models/user/hocs/withRegistration.d.ts +8 -2
- package/models/user/redux/actions.d.ts +2 -2
- package/models/user/redux/sagas/login.d.ts +8 -9
- package/models/user/redux/selectors.d.ts +4 -4
- package/models/user/util/CookieHelper.class.d.ts +3 -15
- package/models/user/util/LoginHelper.class.d.ts +23 -27
- package/models/util/ContensisDeliveryApi.d.ts +14 -21
- package/models/util/ToJs.d.ts +1 -1
- package/models/util/index.d.ts +1 -1
- package/models/util/json-mapper.d.ts +1 -1
- package/package.json +10 -9
- package/cjs/App-eefb5b8f.js.map +0 -1
- package/cjs/ChangePassword.container-7306be55.js.map +0 -1
- package/cjs/ContensisDeliveryApi-e2b3ce60.js.map +0 -1
- package/cjs/CookieConstants-000427db.js +0 -10
- package/cjs/CookieConstants-000427db.js.map +0 -1
- package/cjs/CookieHelper.class-daeb09dd.js +0 -52
- package/cjs/CookieHelper.class-daeb09dd.js.map +0 -1
- package/cjs/RouteLoader-85bee645.js.map +0 -1
- package/cjs/ToJs-29de3c36.js.map +0 -1
- package/cjs/selectors-a6eac513.js.map +0 -1
- package/esm/App-2db3d689.js.map +0 -1
- package/esm/ChangePassword.container-54b4011d.js.map +0 -1
- package/esm/ContensisDeliveryApi-50b8fd7c.js.map +0 -1
- package/esm/CookieConstants-3d3b6531.js +0 -6
- package/esm/CookieConstants-3d3b6531.js.map +0 -1
- package/esm/CookieHelper.class-4d6ee27b.js +0 -49
- package/esm/CookieHelper.class-4d6ee27b.js.map +0 -1
- package/esm/RouteLoader-3e77f6a4.js.map +0 -1
- package/esm/ToJs-e533a70a.js.map +0 -1
- package/esm/selectors-5061d7c8.js.map +0 -1
- package/models/user/util/CookieConstants.d.ts +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-1ef42ad1.js","sources":["../src/redux/types/navigation.js","../src/redux/reducers/navigation.ts","../src/util/merge.ts","../src/routing/redux/reducers.ts","../src/redux/types/version.js","../src/redux/reducers/version.ts","../src/redux/store/routerMiddleware.js","../src/redux/store/store.ts","../src/redux/selectors/version.js"],"sourcesContent":["const ACTION_PREFIX = '@NAVIGATION/';\nexport const GET_NODE_TREE = `${ACTION_PREFIX}_GET_NODE_TREE`;\nexport const SET_NODE_TREE = `${ACTION_PREFIX}_SET_NODE_TREE`;\nexport const GET_NODE_TREE_ERROR = `${ACTION_PREFIX}_GET_NODE_TREE_ERROR`;\n","import { Draft, produce } from 'immer';\nimport { SET_NODE_TREE, GET_NODE_TREE_ERROR } from '~/redux/types/navigation';\n\nconst initialState = {\n root: null,\n error: {\n isError: false,\n message: null,\n },\n isReady: false,\n};\n\nexport default produce((state: Draft<any>, action) => {\n switch (action.type) {\n case SET_NODE_TREE: {\n state.root = action.nodes;\n state.isReady = true;\n return;\n }\n case GET_NODE_TREE_ERROR: {\n state.error.isError = true;\n state.error.message = action.error || 'Unknown error occurred';\n return;\n }\n default:\n return;\n }\n}, initialState);\n","import merge from 'deepmerge';\n\nexport const combineMerge = (target: any, source: any, options: any) => {\n const destination = target.slice();\n\n source.forEach((item: any, index: any) => {\n if (typeof destination[index] === 'undefined') {\n destination[index] = options.cloneUnlessOtherwiseSpecified(item, options);\n } else if (options.isMergeableObject(item)) {\n destination[index] = merge(target[index], item, options);\n } else if (target.indexOf(item) === -1) {\n destination.push(item);\n }\n });\n return destination;\n};\n","import { Draft, produce } from 'immer';\nimport merge from 'deepmerge';\n\nimport {\n SET_ENTRY,\n SET_NAVIGATION_PATH,\n SET_ANCESTORS,\n SET_TARGET_PROJECT,\n SET_ROUTE,\n SET_SIBLINGS,\n SET_SURROGATE_KEYS,\n UPDATE_LOADING_STATE,\n} from './types';\nimport { combineMerge } from '~/util/merge';\n\nconst initialState = {\n canonicalPath: null,\n currentHostname: null,\n currentPath: '/',\n currentNode: {},\n currentNodeAncestors: [],\n currentProject: 'unknown',\n entryID: null,\n entry: null,\n error: undefined,\n isError: false,\n isLoading: false,\n location: {},\n mappedEntry: null,\n notFound: false,\n staticRoute: null,\n statusCode: 200,\n};\n\nexport default produce((state: Draft<any>, action) => {\n switch (action.type) {\n case SET_ANCESTORS: {\n state.currentNodeAncestors = action.ancestors;\n return;\n }\n case SET_ENTRY: {\n const {\n entry,\n error,\n mappedEntry,\n node = {},\n isError = false,\n isLoading = false,\n notFound = false,\n statusCode,\n currentPath,\n } = action;\n\n let defaultStatus = 200;\n if (notFound === true && isError === false) defaultStatus = 404;\n else if (isError === true) defaultStatus = statusCode || 500;\n\n if (!entry) {\n state.entryID = null;\n state.entry = null;\n state.error = error;\n state.mappedEntry = null;\n state.isError = isError;\n state.isLoading = isLoading;\n state.notFound = notFound;\n state.statusCode = statusCode || defaultStatus;\n state.canonicalPath = currentPath;\n } else {\n state.entryID = action.id;\n state.entry = entry;\n state.error = error;\n state.isError = isError;\n state.isLoading = isLoading;\n state.notFound = notFound;\n state.statusCode = statusCode || defaultStatus;\n state.canonicalPath = entry.sys.uri || currentPath;\n\n if (mappedEntry && Object.keys(mappedEntry).length > 0) {\n state.mappedEntry = mappedEntry;\n state.entry = { sys: entry.sys };\n }\n }\n\n if (!node) {\n state.currentNode = null;\n } else {\n // On Set Node, we reset all dependants.\n state.currentNode = node;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { entry, ...nodeWithoutEntry } = node; // We have the entry stored elsewhere, so lets not keep it twice.\n state.currentNode = nodeWithoutEntry;\n }\n\n return;\n }\n case UPDATE_LOADING_STATE: {\n state.isLoading = action.isLoading;\n return;\n }\n case SET_NAVIGATION_PATH: {\n let staticRoute = {} as any;\n if (action.staticRoute) {\n staticRoute = { ...action.staticRoute };\n }\n if (action.path) {\n // Don't run a path update on initial load as we allready should have it in redux\n const entryUri = state?.entry?.sys?.uri;\n if (entryUri !== action.path) {\n state.currentPath = action.path;\n state.location = action.location;\n state.staticRoute = {\n ...staticRoute,\n route: { ...staticRoute.route, component: null },\n };\n state.isLoading = typeof window !== 'undefined';\n } else {\n state.location = action.location;\n state.staticRoute = {\n ...staticRoute,\n route: { ...staticRoute.route, component: null },\n };\n }\n }\n return;\n }\n case SET_ROUTE: {\n state.nextPath = action.path;\n return;\n }\n case SET_SIBLINGS: {\n // Can be null in some cases like the homepage.\n let currentNodeSiblingParent = null;\n if (action.siblings && action.siblings.length > 0) {\n currentNodeSiblingParent = action.siblings[0].parentId;\n }\n\n state.currentNodeSiblings = action.siblings;\n state.currentNodeSiblingsParent = currentNodeSiblingParent;\n return;\n }\n case SET_SURROGATE_KEYS: {\n // console.info(`SET_SURROGATE_KEYS: '${action.url}' keys: ${action.keys}`);\n state.surrogateKeys = merge(\n state.surrogateKeys,\n (action.keys || '').split(' '),\n { arrayMerge: combineMerge }\n );\n return;\n }\n case SET_TARGET_PROJECT: {\n state.currentProject = action.project;\n state.allowedGroups = action.allowedGroups;\n state.currentHostname = action.hostname;\n return;\n }\n default:\n return state;\n }\n}, initialState);\n","const VERSION_PREFIX = '@VERSION/';\nexport const SET_VERSION = `${VERSION_PREFIX}SET_VERSION`;\nexport const SET_VERSION_STATUS = `${VERSION_PREFIX}SET_VERSION_STATUS`;\n","import { Draft, produce } from 'immer';\nimport { SET_VERSION, SET_VERSION_STATUS } from '~/redux/types/version';\n\nconst initialState = {\n commitRef: null,\n buildNo: null,\n contensisVersionStatus: null as 'latest' | 'published' | null,\n};\n\nexport default produce((state: Draft<any>, action) => {\n switch (action.type) {\n case SET_VERSION_STATUS: {\n state.contensisVersionStatus = action.status;\n return;\n }\n case SET_VERSION: {\n state.commitRef = action.commitRef;\n state.buildNo = action.buildNo;\n return;\n }\n default:\n return;\n }\n}, initialState);\n","/**\n * This middleware captures 'CALL_HISTORY_METHOD' actions to redirect to the\n * provided history object. This will prevent these actions from reaching your\n * reducer or any middleware that comes after this one.\n */\n/* eslint-disable no-unused-vars */\nconst routerMiddleware = history => store => next => action => {\n if (action.type !== 'CALL_HISTORY_METHOD') {\n return next(action);\n }\n\n const {\n payload: { method, args },\n } = action;\n history[method](...args);\n};\n\nexport default routerMiddleware;\n","import {\n applyMiddleware,\n combineReducers,\n compose,\n createStore,\n Action,\n Store,\n StoreEnhancer,\n} from 'redux';\nimport thunkMiddleware from 'redux-thunk';\nimport createSagaMiddleware, { END } from 'redux-saga';\nimport { createInjectorsEnhancer } from 'redux-injectors';\n\n// Core reducers\nimport NavigationReducer from '../reducers/navigation';\nimport RoutingReducer from '~/routing/redux/reducers';\nimport UserReducer from '~/user/redux/reducers';\nimport VersionReducer from '../reducers/version';\nimport routerMiddleware from './routerMiddleware';\nimport { AppState } from '../appstate';\nimport { History, MemoryHistory } from 'history';\nimport { StateType } from '~/config';\n\nexport let reduxStore;\n\n/* eslint-disable no-underscore-dangle */\ndeclare let window: Window &\n typeof globalThis & {\n __REDUX_DEVTOOLS_EXTENSION__: any;\n };\n\nexport default async (\n featureReducers: any,\n initialState: AppState,\n history: History | MemoryHistory,\n stateType: StateType\n) => {\n let reduxDevToolsMiddleware = f => f;\n\n if (typeof window != 'undefined') {\n reduxDevToolsMiddleware = window.__REDUX_DEVTOOLS_EXTENSION__\n ? window.__REDUX_DEVTOOLS_EXTENSION__()\n : f => f;\n }\n\n const sagaMiddleware = createSagaMiddleware();\n\n const reducers = {\n navigation: NavigationReducer,\n routing: RoutingReducer,\n user: UserReducer,\n version: VersionReducer,\n ...featureReducers,\n };\n\n // Reassign the combiner and fromJS functions when\n // stateType is 'immutable' with dynamic imports\n let combiner = combineReducers;\n let fromJS: any = (obj: any) => obj;\n globalThis.STATE_TYPE = stateType;\n\n if (stateType === 'immutable') {\n globalThis.immutable = await import(\n /* webpackChunkName: \"immutable\" */ 'immutable'\n );\n\n fromJS = (\n await import(/* webpackChunkName: \"from-js\" */ '~/util/fromJSLeaveImmer')\n ).default;\n\n combiner = (\n await import(/* webpackChunkName: \"redux-immutable\" */ 'redux-immutable')\n ).combineReducers;\n }\n\n const createReducer = (injectedReducers = {}) => {\n const rootReducer = combiner<AppState>({\n ...injectedReducers,\n // other non-injected reducers go here\n ...reducers,\n });\n\n return rootReducer;\n };\n\n const store = (initialState: AppState) => {\n const runSaga = sagaMiddleware.run;\n\n const middleware: StoreEnhancer<\n {\n dispatch: unknown;\n },\n unknown\n > = compose(\n applyMiddleware(\n thunkMiddleware,\n sagaMiddleware,\n routerMiddleware(history)\n ),\n createInjectorsEnhancer({\n createReducer,\n runSaga,\n }),\n reduxDevToolsMiddleware\n );\n\n const store: Store<AppState, Action<any>> & {\n runSaga?: typeof runSaga;\n close?: () => void;\n } = createStore<AppState, Action<any>, unknown, unknown>(\n createReducer(),\n initialState,\n middleware\n );\n\n store.runSaga = runSaga;\n store.close = () => store.dispatch(END);\n\n return store;\n };\n\n reduxStore = store(fromJS(initialState));\n return reduxStore;\n};\n","import { getImmutableOrJS as getIn } from '~/redux/util';\n\nexport const selectCommitRef = state => getIn(state, ['version', 'commitRef']);\n\nexport const selectBuildNumber = state => getIn(state, ['version', 'buildNo']);\n\nexport const selectVersionStatus = state =>\n getIn(state, ['version', 'contensisVersionStatus']);\n"],"names":["ACTION_PREFIX","GET_NODE_TREE","SET_NODE_TREE","GET_NODE_TREE_ERROR","initialState","root","error","isError","message","isReady","produce","state","action","type","nodes","combineMerge","target","source","options","destination","slice","forEach","item","index","cloneUnlessOtherwiseSpecified","isMergeableObject","merge","indexOf","push","canonicalPath","currentHostname","currentPath","currentNode","currentNodeAncestors","currentProject","entryID","entry","undefined","isLoading","location","mappedEntry","notFound","staticRoute","statusCode","SET_ANCESTORS","ancestors","SET_ENTRY","node","defaultStatus","id","sys","uri","Object","keys","length","nodeWithoutEntry","UPDATE_LOADING_STATE","SET_NAVIGATION_PATH","path","_state$entry","_state$entry$sys","entryUri","route","component","window","SET_ROUTE","nextPath","SET_SIBLINGS","currentNodeSiblingParent","siblings","parentId","currentNodeSiblings","currentNodeSiblingsParent","SET_SURROGATE_KEYS","surrogateKeys","split","arrayMerge","SET_TARGET_PROJECT","project","allowedGroups","hostname","VERSION_PREFIX","SET_VERSION","SET_VERSION_STATUS","commitRef","buildNo","contensisVersionStatus","status","routerMiddleware","history","store","next","payload","method","args","reduxStore","featureReducers","stateType","reduxDevToolsMiddleware","f","__REDUX_DEVTOOLS_EXTENSION__","sagaMiddleware","createSagaMiddleware","reducers","navigation","NavigationReducer","routing","RoutingReducer","user","UserReducer","version","VersionReducer","combiner","combineReducers","fromJS","obj","globalThis","STATE_TYPE","immutable","default","createReducer","injectedReducers","rootReducer","runSaga","run","middleware","compose","applyMiddleware","thunkMiddleware","createInjectorsEnhancer","createStore","close","dispatch","END","selectCommitRef","getIn","selectBuildNumber","selectVersionStatus"],"mappings":";;;;;;;;;AAAA,MAAMA,aAAa,GAAG,cAAc,CAAA;AACvBC,MAAAA,aAAa,GAAI,CAAA,EAAED,aAAc,CAAe,cAAA,EAAA;AAChDE,MAAAA,aAAa,GAAI,CAAA,EAAEF,aAAc,CAAe,cAAA,EAAA;AAChDG,MAAAA,mBAAmB,GAAI,CAAA,EAAEH,aAAc,CAAqB,oBAAA;;;;;;;;;ACAzE,MAAMI,cAAY,G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AED,MAAMR,KAGL,GAAGwC,aAAW,CACbV,aAAa,EAAE,EACfpH,YAAY,EACZyH,UAAU,CACX,CAAA;IAEDnC,KAAK,CAACiC,OAAO,GAAGA,OAAO,CAAA;IACvBjC,KAAK,CAACyC,KAAK,GAAG,MAAMzC,KAAK,CAAC0C,QAAQ,CAACC,GAAG,CAAC,CAAA;AAEvC,IAAA,OAAO3C,KAAK,CAAA;GACb,CAAA;AAEDK,EAAAA,UAAU,GAAGL,KAAK,CAACwB,MAAM,CAAC9G,YAAY,CAAC,CAAC,CAAA;AACxC,EAAA,OAAO2F,UAAU,CAAA;AACnB,CAAC;;ACzHYuC,MAAAA,eAAe,GAAG3H,KAAK,IAAI4H,gBAAK,CAAC5H,KAAK,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC,EAAC;AAEjE6H,MAAAA,iBAAiB,GAAG7H,KAAK,IAAI4H,gBAAK,CAAC5H,KAAK,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,EAAC;AAEjE8H,MAAAA,mBAAmB,GAAG9H,KAAK,IACtC4H,gBAAK,CAAC5H,KAAK,EAAE,CAAC,SAAS,EAAE,wBAAwB,CAAC;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"version-ef107106.js","sources":["../src/redux/types/navigation.js","../src/redux/reducers/navigation.ts","../src/util/merge.ts","../src/routing/redux/reducers.ts","../src/redux/types/version.js","../src/redux/reducers/version.ts","../src/redux/store/routerMiddleware.js","../src/redux/store/store.ts","../src/redux/selectors/version.js"],"sourcesContent":["const ACTION_PREFIX = '@NAVIGATION/';\nexport const GET_NODE_TREE = `${ACTION_PREFIX}_GET_NODE_TREE`;\nexport const SET_NODE_TREE = `${ACTION_PREFIX}_SET_NODE_TREE`;\nexport const GET_NODE_TREE_ERROR = `${ACTION_PREFIX}_GET_NODE_TREE_ERROR`;\n","import { Draft, produce } from 'immer';\nimport { SET_NODE_TREE, GET_NODE_TREE_ERROR } from '~/redux/types/navigation';\n\nconst initialState = {\n root: null,\n error: {\n isError: false,\n message: null,\n },\n isReady: false,\n};\n\nexport default produce((state: Draft<any>, action) => {\n switch (action.type) {\n case SET_NODE_TREE: {\n state.root = action.nodes;\n state.isReady = true;\n return;\n }\n case GET_NODE_TREE_ERROR: {\n state.error.isError = true;\n state.error.message = action.error || 'Unknown error occurred';\n return;\n }\n default:\n return;\n }\n}, initialState);\n","import merge from 'deepmerge';\n\nexport const combineMerge = (target: any, source: any, options: any) => {\n const destination = target.slice();\n\n source.forEach((item: any, index: any) => {\n if (typeof destination[index] === 'undefined') {\n destination[index] = options.cloneUnlessOtherwiseSpecified(item, options);\n } else if (options.isMergeableObject(item)) {\n destination[index] = merge(target[index], item, options);\n } else if (target.indexOf(item) === -1) {\n destination.push(item);\n }\n });\n return destination;\n};\n","import { Draft, produce } from 'immer';\nimport merge from 'deepmerge';\n\nimport {\n SET_ENTRY,\n SET_NAVIGATION_PATH,\n SET_ANCESTORS,\n SET_TARGET_PROJECT,\n SET_ROUTE,\n SET_SIBLINGS,\n SET_SURROGATE_KEYS,\n UPDATE_LOADING_STATE,\n} from './types';\nimport { combineMerge } from '~/util/merge';\n\nconst initialState = {\n canonicalPath: null,\n currentHostname: null,\n currentPath: '/',\n currentNode: {},\n currentNodeAncestors: [],\n currentProject: 'unknown',\n entryID: null,\n entry: null,\n error: undefined,\n isError: false,\n isLoading: false,\n location: {},\n mappedEntry: null,\n notFound: false,\n staticRoute: null,\n statusCode: 200,\n};\n\nexport default produce((state: Draft<any>, action) => {\n switch (action.type) {\n case SET_ANCESTORS: {\n state.currentNodeAncestors = action.ancestors;\n return;\n }\n case SET_ENTRY: {\n const {\n entry,\n error,\n mappedEntry,\n node = {},\n isError = false,\n isLoading = false,\n notFound = false,\n statusCode,\n currentPath,\n } = action;\n\n let defaultStatus = 200;\n if (notFound === true && isError === false) defaultStatus = 404;\n else if (isError === true) defaultStatus = statusCode || 500;\n\n if (!entry) {\n state.entryID = null;\n state.entry = null;\n state.error = error;\n state.mappedEntry = null;\n state.isError = isError;\n state.isLoading = isLoading;\n state.notFound = notFound;\n state.statusCode = statusCode || defaultStatus;\n state.canonicalPath = currentPath;\n } else {\n state.entryID = action.id;\n state.entry = entry;\n state.error = error;\n state.isError = isError;\n state.isLoading = isLoading;\n state.notFound = notFound;\n state.statusCode = statusCode || defaultStatus;\n state.canonicalPath = entry.sys.uri || currentPath;\n\n if (mappedEntry && Object.keys(mappedEntry).length > 0) {\n state.mappedEntry = mappedEntry;\n state.entry = { sys: entry.sys };\n }\n }\n\n if (!node) {\n state.currentNode = null;\n } else {\n // On Set Node, we reset all dependants.\n state.currentNode = node;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { entry, ...nodeWithoutEntry } = node; // We have the entry stored elsewhere, so lets not keep it twice.\n state.currentNode = nodeWithoutEntry;\n }\n\n return;\n }\n case UPDATE_LOADING_STATE: {\n state.isLoading = action.isLoading;\n return;\n }\n case SET_NAVIGATION_PATH: {\n let staticRoute = {} as any;\n if (action.staticRoute) {\n staticRoute = { ...action.staticRoute };\n }\n if (action.path) {\n // Don't run a path update on initial load as we allready should have it in redux\n const entryUri = state?.entry?.sys?.uri;\n if (entryUri !== action.path) {\n state.currentPath = action.path;\n state.location = action.location;\n state.staticRoute = {\n ...staticRoute,\n route: { ...staticRoute.route, component: null },\n };\n state.isLoading = typeof window !== 'undefined';\n } else {\n state.location = action.location;\n state.staticRoute = {\n ...staticRoute,\n route: { ...staticRoute.route, component: null },\n };\n }\n }\n return;\n }\n case SET_ROUTE: {\n state.nextPath = action.path;\n return;\n }\n case SET_SIBLINGS: {\n // Can be null in some cases like the homepage.\n let currentNodeSiblingParent = null;\n if (action.siblings && action.siblings.length > 0) {\n currentNodeSiblingParent = action.siblings[0].parentId;\n }\n\n state.currentNodeSiblings = action.siblings;\n state.currentNodeSiblingsParent = currentNodeSiblingParent;\n return;\n }\n case SET_SURROGATE_KEYS: {\n // console.info(`SET_SURROGATE_KEYS: '${action.url}' keys: ${action.keys}`);\n state.surrogateKeys = merge(\n state.surrogateKeys,\n (action.keys || '').split(' '),\n { arrayMerge: combineMerge }\n );\n return;\n }\n case SET_TARGET_PROJECT: {\n state.currentProject = action.project;\n state.allowedGroups = action.allowedGroups;\n state.currentHostname = action.hostname;\n return;\n }\n default:\n return state;\n }\n}, initialState);\n","const VERSION_PREFIX = '@VERSION/';\nexport const SET_VERSION = `${VERSION_PREFIX}SET_VERSION`;\nexport const SET_VERSION_STATUS = `${VERSION_PREFIX}SET_VERSION_STATUS`;\n","import { Draft, produce } from 'immer';\nimport { SET_VERSION, SET_VERSION_STATUS } from '~/redux/types/version';\n\nconst initialState = {\n commitRef: null,\n buildNo: null,\n contensisVersionStatus: null as 'latest' | 'published' | null,\n};\n\nexport default produce((state: Draft<any>, action) => {\n switch (action.type) {\n case SET_VERSION_STATUS: {\n state.contensisVersionStatus = action.status;\n return;\n }\n case SET_VERSION: {\n state.commitRef = action.commitRef;\n state.buildNo = action.buildNo;\n return;\n }\n default:\n return;\n }\n}, initialState);\n","/**\n * This middleware captures 'CALL_HISTORY_METHOD' actions to redirect to the\n * provided history object. This will prevent these actions from reaching your\n * reducer or any middleware that comes after this one.\n */\n/* eslint-disable no-unused-vars */\nconst routerMiddleware = history => store => next => action => {\n if (action.type !== 'CALL_HISTORY_METHOD') {\n return next(action);\n }\n\n const {\n payload: { method, args },\n } = action;\n history[method](...args);\n};\n\nexport default routerMiddleware;\n","import {\n applyMiddleware,\n combineReducers,\n compose,\n createStore,\n Action,\n Store,\n StoreEnhancer,\n} from 'redux';\nimport thunkMiddleware from 'redux-thunk';\nimport createSagaMiddleware, { END } from 'redux-saga';\nimport { createInjectorsEnhancer } from 'redux-injectors';\n\n// Core reducers\nimport NavigationReducer from '../reducers/navigation';\nimport RoutingReducer from '~/routing/redux/reducers';\nimport UserReducer from '~/user/redux/reducers';\nimport VersionReducer from '../reducers/version';\nimport routerMiddleware from './routerMiddleware';\nimport { AppState } from '../appstate';\nimport { History, MemoryHistory } from 'history';\nimport { StateType } from '~/config';\n\nexport let reduxStore;\n\n/* eslint-disable no-underscore-dangle */\ndeclare let window: Window &\n typeof globalThis & {\n __REDUX_DEVTOOLS_EXTENSION__: any;\n };\n\nexport default async (\n featureReducers: any,\n initialState: AppState,\n history: History | MemoryHistory,\n stateType: StateType\n) => {\n let reduxDevToolsMiddleware = f => f;\n\n if (typeof window != 'undefined') {\n reduxDevToolsMiddleware = window.__REDUX_DEVTOOLS_EXTENSION__\n ? window.__REDUX_DEVTOOLS_EXTENSION__()\n : f => f;\n }\n\n const sagaMiddleware = createSagaMiddleware();\n\n const reducers = {\n navigation: NavigationReducer,\n routing: RoutingReducer,\n user: UserReducer,\n version: VersionReducer,\n ...featureReducers,\n };\n\n // Reassign the combiner and fromJS functions when\n // stateType is 'immutable' with dynamic imports\n let combiner = combineReducers;\n let fromJS: any = (obj: any) => obj;\n globalThis.STATE_TYPE = stateType;\n\n if (stateType === 'immutable') {\n globalThis.immutable = await import(\n /* webpackChunkName: \"immutable\" */ 'immutable'\n );\n\n fromJS = (\n await import(/* webpackChunkName: \"from-js\" */ '~/util/fromJSLeaveImmer')\n ).default;\n\n combiner = (\n await import(/* webpackChunkName: \"redux-immutable\" */ 'redux-immutable')\n ).combineReducers;\n }\n\n const createReducer = (injectedReducers = {}) => {\n const rootReducer = combiner<AppState>({\n ...injectedReducers,\n // other non-injected reducers go here\n ...reducers,\n });\n\n return rootReducer;\n };\n\n const store = (initialState: AppState) => {\n const runSaga = sagaMiddleware.run;\n\n const middleware: StoreEnhancer<\n {\n dispatch: unknown;\n },\n unknown\n > = compose(\n applyMiddleware(\n thunkMiddleware,\n sagaMiddleware,\n routerMiddleware(history)\n ),\n createInjectorsEnhancer({\n createReducer,\n runSaga,\n }),\n reduxDevToolsMiddleware\n );\n\n const store: Store<AppState, Action<any>> & {\n runSaga?: typeof runSaga;\n close?: () => void;\n } = createStore<AppState, Action<any>, unknown, unknown>(\n createReducer(),\n initialState,\n middleware\n );\n\n store.runSaga = runSaga;\n store.close = () => store.dispatch(END);\n\n return store;\n };\n\n reduxStore = store(fromJS(initialState));\n return reduxStore;\n};\n","import { getImmutableOrJS as getIn } from '~/redux/util';\n\nexport const selectCommitRef = state => getIn(state, ['version', 'commitRef']);\n\nexport const selectBuildNumber = state => getIn(state, ['version', 'buildNo']);\n\nexport const selectVersionStatus = state =>\n getIn(state, ['version', 'contensisVersionStatus']);\n"],"names":["ACTION_PREFIX","GET_NODE_TREE","SET_NODE_TREE","GET_NODE_TREE_ERROR","initialState","root","error","isError","message","isReady","produce","state","action","type","nodes","combineMerge","target","source","options","destination","slice","forEach","item","index","cloneUnlessOtherwiseSpecified","isMergeableObject","merge","indexOf","push","canonicalPath","currentHostname","currentPath","currentNode","currentNodeAncestors","currentProject","entryID","entry","undefined","isLoading","location","mappedEntry","notFound","staticRoute","statusCode","SET_ANCESTORS","ancestors","SET_ENTRY","node","defaultStatus","id","sys","uri","Object","keys","length","nodeWithoutEntry","UPDATE_LOADING_STATE","SET_NAVIGATION_PATH","path","_state$entry","_state$entry$sys","entryUri","route","component","window","SET_ROUTE","nextPath","SET_SIBLINGS","currentNodeSiblingParent","siblings","parentId","currentNodeSiblings","currentNodeSiblingsParent","SET_SURROGATE_KEYS","surrogateKeys","split","arrayMerge","SET_TARGET_PROJECT","project","allowedGroups","hostname","VERSION_PREFIX","SET_VERSION","SET_VERSION_STATUS","commitRef","buildNo","contensisVersionStatus","status","routerMiddleware","history","store","next","payload","method","args","reduxStore","featureReducers","stateType","reduxDevToolsMiddleware","f","__REDUX_DEVTOOLS_EXTENSION__","sagaMiddleware","createSagaMiddleware","reducers","navigation","NavigationReducer","routing","RoutingReducer","user","UserReducer","version","VersionReducer","combiner","combineReducers","fromJS","obj","globalThis","STATE_TYPE","immutable","default","createReducer","injectedReducers","rootReducer","runSaga","run","middleware","compose","applyMiddleware","thunkMiddleware","createInjectorsEnhancer","createStore","close","dispatch","END","selectCommitRef","getIn","selectBuildNumber","selectVersionStatus"],"mappings":";;;;;;;;;AAAA,M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OAAO,GAAGtB,cAAc,CAACuB,GAAG,CAAA;AAElC,IAAA,MAAMC,UAKL,GAAGC,OAAO,CACTC,eAAe,CACbC,eAAe,EACf3B,cAAc,EACdb,gBAAgB,CAACC,OAAO,CAAC,CAC1B,EACDwC,uBAAuB,CAAC;MACtBT,aAAa;AACbG,MAAAA,OAAAA;KACD,CAAC,EACFzB,uBAAuB,CACxB,CAAA;IAED,MAAMR,KAGL,GAAGwC,aAAW,CACbV,aAAa,EAAE,EACfpH,YAAY,EACZyH,UAAU,CACX,CAAA;IAEDnC,KAAK,CAACiC,OAAO,GAAGA,OAAO,CAAA;IACvBjC,KAAK,CAACyC,KAAK,GAAG,MAAMzC,KAAK,CAAC0C,QAAQ,CAACC,GAAG,CAAC,CAAA;AAEvC,IAAA,OAAO3C,KAAK,CAAA;GACb,CAAA;AAEDK,EAAAA,UAAU,GAAGL,KAAK,CAACwB,MAAM,CAAC9G,YAAY,CAAC,CAAC,CAAA;AACxC,EAAA,OAAO2F,UAAU,CAAA;AACnB,CAAC;;ACzHYuC,MAAAA,eAAe,GAAG3H,KAAK,IAAI4H,gBAAK,CAAC5H,KAAK,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC,EAAC;AAEjE6H,MAAAA,iBAAiB,GAAG7H,KAAK,IAAI4H,gBAAK,CAAC5H,KAAK,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,EAAC;AAEjE8H,MAAAA,mBAAmB,GAAG9H,KAAK,IACtC4H,gBAAK,CAAC5H,KAAK,EAAE,CAAC,SAAS,EAAE,wBAAwB,CAAC;;;;;;;;;;;"}
|
package/models/config.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AppRoutes, WithEvents } from './routing/routes';
|
|
2
2
|
import handleResponse from './server/features/response-handler';
|
|
3
|
-
export type StateType = 'immutable' | 'js';
|
|
4
|
-
export type AppConfig = {
|
|
3
|
+
export declare type StateType = 'immutable' | 'js';
|
|
4
|
+
export declare type AppConfig = {
|
|
5
5
|
stateType?: StateType;
|
|
6
6
|
routes: AppRoutes;
|
|
7
7
|
withReducers: {
|
|
@@ -10,11 +10,11 @@ export type AppConfig = {
|
|
|
10
10
|
withSagas: any[];
|
|
11
11
|
withEvents: WithEvents;
|
|
12
12
|
};
|
|
13
|
-
export type ServerConfig = AppConfig & {
|
|
13
|
+
export declare type ServerConfig = AppConfig & {
|
|
14
14
|
appRootPath?: string;
|
|
15
15
|
disableSsrRedux?: boolean;
|
|
16
16
|
handleResponses?: typeof handleResponse;
|
|
17
|
-
handleExceptions?: boolean
|
|
17
|
+
handleExceptions?: boolean;
|
|
18
18
|
reverseProxyPaths?: string[];
|
|
19
19
|
packagejson: any;
|
|
20
20
|
proxyDeliveryApi?: boolean;
|
|
@@ -3,7 +3,7 @@ import { Entry, Node } from 'contensis-delivery-api/lib/models';
|
|
|
3
3
|
import { Group, User } from 'contensis-management-api/lib/models';
|
|
4
4
|
import { MatchedRoute } from 'react-router-config';
|
|
5
5
|
import { StaticRoute } from "../routing/routes";
|
|
6
|
-
export type AppState = {
|
|
6
|
+
export declare type AppState = {
|
|
7
7
|
navigation: {
|
|
8
8
|
root: Node | null;
|
|
9
9
|
isError: boolean;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const setCurrentProject: (project: string, allowedGroups: any, hostname: string) => any;
|
|
8
|
-
export declare const setRoute: (path: string, state?: any) => any;
|
|
9
|
-
export declare const setRouteEntry: (entry: Entry) => any;
|
|
10
|
-
export declare const setSurrogateKeys: (keys: string, url: string) => any;
|
|
1
|
+
export declare const setNotFound: (notFound: any) => any;
|
|
2
|
+
export declare const setNavigationPath: (path: any, location: any, staticRoute: any, withEvents: any, statePath: any, routes: any) => any;
|
|
3
|
+
export declare const setCurrentProject: (project: any, allowedGroups: any, hostname: any) => any;
|
|
4
|
+
export declare const setRoute: (path: any, state: any) => any;
|
|
5
|
+
export declare const setRouteEntry: (entry: any) => any;
|
|
6
|
+
export declare const setSurrogateKeys: (keys: any, url: any) => any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StateType } from "../../config";
|
|
2
2
|
import { AppState } from "../../redux/appstate";
|
|
3
|
-
export declare const selectRouteEntry: (state: AppState, returnType?: StateType) => any;
|
|
4
|
-
export declare const selectMappedEntry: (state: AppState, returnType?: StateType) => any;
|
|
3
|
+
export declare const selectRouteEntry: (state: AppState, returnType?: StateType | undefined) => any;
|
|
4
|
+
export declare const selectMappedEntry: (state: AppState, returnType?: StateType | undefined) => any;
|
|
5
5
|
export declare const selectSurrogateKeys: (state: AppState) => any;
|
|
6
6
|
export declare const selectCurrentHostname: (state: AppState) => any;
|
|
7
7
|
export declare const selectCurrentTreeID: (state: AppState) => any;
|
|
@@ -20,7 +20,7 @@ export declare const selectCurrentProject: (state: AppState) => any;
|
|
|
20
20
|
export declare const selectIsNotFound: (state: AppState) => any;
|
|
21
21
|
export declare const selectCurrentAncestors: (state: AppState) => any;
|
|
22
22
|
export declare const selectCurrentSiblings: (state: AppState) => any;
|
|
23
|
-
export declare const selectCurrentNode: (state: AppState, returnType?: StateType) => any;
|
|
23
|
+
export declare const selectCurrentNode: (state: AppState, returnType?: StateType | undefined) => any;
|
|
24
24
|
export declare const selectCurrentChildren: (state: any) => any;
|
|
25
25
|
export declare const selectBreadcrumb: (state: AppState) => any[];
|
|
26
26
|
export declare const selectRouteErrorMessage: (state: AppState) => any;
|
|
@@ -5,6 +5,7 @@ export declare const SET_ANCESTORS: string;
|
|
|
5
5
|
export declare const SET_SIBLINGS: string;
|
|
6
6
|
export declare const SET_ENTRY_ID: string;
|
|
7
7
|
export declare const SET_SURROGATE_KEYS: string;
|
|
8
|
+
export declare const SET_NAVIGATION_NOT_FOUND: string;
|
|
8
9
|
export declare const SET_NAVIGATION_PATH: string;
|
|
9
10
|
export declare const SET_TARGET_PROJECT: string;
|
|
10
11
|
export declare const SET_ROUTE: string;
|
|
@@ -2,21 +2,20 @@ import { MatchedRoute, RouteConfig } from 'react-router-config';
|
|
|
2
2
|
import { Entry, Node } from 'contensis-delivery-api/lib/models';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { AppState } from "../redux/appstate";
|
|
5
|
-
|
|
6
|
-
type
|
|
7
|
-
export type RouteNode = Node & {
|
|
5
|
+
declare type RouteComponent<Props> = React.ComponentType<Props>;
|
|
6
|
+
export declare type RouteNode = Node & {
|
|
8
7
|
ancestors: Node[];
|
|
9
8
|
children: Node[];
|
|
10
9
|
};
|
|
11
|
-
export type AppRoutes = {
|
|
10
|
+
export declare type AppRoutes = {
|
|
12
11
|
ContentTypeMappings: ContentTypeMapping[];
|
|
13
12
|
StaticRoutes: StaticRoute[];
|
|
14
13
|
};
|
|
15
|
-
export type AppRootProps = {
|
|
14
|
+
export declare type AppRootProps = {
|
|
16
15
|
routes: AppRoutes;
|
|
17
16
|
withEvents: WithEvents;
|
|
18
17
|
};
|
|
19
|
-
export type RouteComponentProps<P = any> = {
|
|
18
|
+
export declare type RouteComponentProps<P = any> = {
|
|
20
19
|
[key: string]: any;
|
|
21
20
|
projectId?: string;
|
|
22
21
|
contentTypeId?: string;
|
|
@@ -24,23 +23,23 @@ export type RouteComponentProps<P = any> = {
|
|
|
24
23
|
mappedEntry?: P;
|
|
25
24
|
isLoggedIn?: boolean;
|
|
26
25
|
};
|
|
27
|
-
export type RouteLoaderProps = {
|
|
26
|
+
export declare type RouteLoaderProps = {
|
|
28
27
|
loadingComponent?: React.ComponentType;
|
|
29
28
|
notFoundComponent?: React.ComponentType;
|
|
30
29
|
trailingSlashRedirectCode?: 301 | 302;
|
|
31
30
|
};
|
|
32
|
-
export type EntryMapper = (<MappedProps>(node: RouteNode, state?: AppState) => MappedProps | unknown) | (<MappedProps>(node: RouteNode, state?: AppState) => Promise<MappedProps | unknown>);
|
|
33
|
-
export type ReduxInjector = () => Promise<{
|
|
31
|
+
export declare type EntryMapper = (<MappedProps>(node: RouteNode, state?: AppState) => MappedProps | unknown) | (<MappedProps>(node: RouteNode, state?: AppState) => Promise<MappedProps | unknown>);
|
|
32
|
+
export declare type ReduxInjector = () => Promise<{
|
|
34
33
|
key: string;
|
|
35
34
|
reducer: any;
|
|
36
35
|
saga: any;
|
|
37
36
|
}>;
|
|
38
|
-
type UserGroupRequisite = {
|
|
37
|
+
declare type UserGroupRequisite = {
|
|
39
38
|
id?: string;
|
|
40
39
|
name?: string;
|
|
41
40
|
};
|
|
42
|
-
export type RequireLogin = boolean | UserGroupRequisite[];
|
|
43
|
-
export type ContentTypeMapping = {
|
|
41
|
+
export declare type RequireLogin = boolean | UserGroupRequisite[];
|
|
42
|
+
export declare type ContentTypeMapping = {
|
|
44
43
|
contentTypeID: string;
|
|
45
44
|
component: RouteComponent<RouteComponentProps>;
|
|
46
45
|
entryMapper?: EntryMapper;
|
|
@@ -60,7 +59,7 @@ export type ContentTypeMapping = {
|
|
|
60
59
|
};
|
|
61
60
|
requireLogin?: RequireLogin;
|
|
62
61
|
};
|
|
63
|
-
export type StaticRoute = Omit<RouteConfig, 'component'> & {
|
|
62
|
+
export declare type StaticRoute = Omit<RouteConfig, 'component'> & {
|
|
64
63
|
component: RouteComponent<RouteComponentProps>;
|
|
65
64
|
fetchNode?: boolean | {
|
|
66
65
|
/**
|
|
@@ -80,8 +79,7 @@ export type StaticRoute = Omit<RouteConfig, 'component'> & {
|
|
|
80
79
|
ssr?: boolean;
|
|
81
80
|
ssrOnly?: boolean;
|
|
82
81
|
};
|
|
83
|
-
export type OnRouteLoadArgs = {
|
|
84
|
-
cookies: CookieHelper;
|
|
82
|
+
export declare type OnRouteLoadArgs = {
|
|
85
83
|
location: {
|
|
86
84
|
pathname: string;
|
|
87
85
|
search: string;
|
|
@@ -92,8 +90,7 @@ export type OnRouteLoadArgs = {
|
|
|
92
90
|
staticRoute: MatchedRoute<any, StaticRoute>;
|
|
93
91
|
statePath: string;
|
|
94
92
|
};
|
|
95
|
-
export type OnRouteLoadedArgs = {
|
|
96
|
-
cookies: CookieHelper;
|
|
93
|
+
export declare type OnRouteLoadedArgs = {
|
|
97
94
|
entry: Entry | any;
|
|
98
95
|
location: {
|
|
99
96
|
pathname: string;
|
|
@@ -104,7 +101,7 @@ export type OnRouteLoadedArgs = {
|
|
|
104
101
|
path: string;
|
|
105
102
|
staticRoute: MatchedRoute<any, StaticRoute>;
|
|
106
103
|
};
|
|
107
|
-
export type RouteLoadOptions = {
|
|
104
|
+
export declare type RouteLoadOptions = {
|
|
108
105
|
customNavigation?: boolean | {
|
|
109
106
|
ancestors: boolean | number;
|
|
110
107
|
children: boolean | number;
|
|
@@ -117,10 +114,10 @@ export type RouteLoadOptions = {
|
|
|
117
114
|
preventScrollTop?: boolean;
|
|
118
115
|
refetchNode?: true;
|
|
119
116
|
};
|
|
120
|
-
export type RouteLoadedOptions = {
|
|
117
|
+
export declare type RouteLoadedOptions = {
|
|
121
118
|
requireLogin?: RequireLogin;
|
|
122
119
|
};
|
|
123
|
-
export type WithEvents = {
|
|
120
|
+
export declare type WithEvents = {
|
|
124
121
|
onRouteLoad: (args: OnRouteLoadArgs) => Generator<void | RouteLoadOptions>;
|
|
125
122
|
onRouteLoaded: (args: OnRouteLoadedArgs) => Generator<void | RouteLoadedOptions>;
|
|
126
123
|
};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Query } from 'contensis-core-api';
|
|
2
|
+
import { VersionStatus } from 'contensis-core-api/lib/models';
|
|
3
|
+
import { Operators } from 'contensis-delivery-api/lib/entries/query';
|
|
2
4
|
import { CustomWhereClause, FeaturedResults, WeightedSearchField } from './Search';
|
|
3
|
-
export type FieldOperators = Exclude<keyof Operators, 'and' | 'or' | 'not'>;
|
|
4
|
-
export type LogicOperators = 'and' | 'or' | 'not';
|
|
5
|
-
export type FilterExpression = {
|
|
5
|
+
export declare type FieldOperators = Exclude<keyof Operators, 'and' | 'or' | 'not'>;
|
|
6
|
+
export declare type LogicOperators = 'and' | 'or' | 'not';
|
|
7
|
+
export declare type FilterExpression = {
|
|
6
8
|
key: string;
|
|
7
9
|
values: string[];
|
|
8
10
|
fieldOperator: FieldOperators;
|
|
9
11
|
logicOperator: LogicOperators;
|
|
10
12
|
};
|
|
11
|
-
export type SearchQueryOptions = {
|
|
13
|
+
export declare type SearchQueryOptions = {
|
|
12
14
|
assetTypes: string[];
|
|
13
15
|
contentTypeIds: string[];
|
|
14
16
|
customWhere: any;
|
|
@@ -29,7 +31,7 @@ export type SearchQueryOptions = {
|
|
|
29
31
|
webpageTemplates: string[];
|
|
30
32
|
weightedSearchFields: WeightedSearchField[];
|
|
31
33
|
};
|
|
32
|
-
export type QueryParams = SearchQueryOptions & {
|
|
34
|
+
export declare type QueryParams = SearchQueryOptions & {
|
|
33
35
|
env: string;
|
|
34
36
|
internalPageIndex: number;
|
|
35
37
|
internalPaging: boolean;
|
|
@@ -42,5 +44,5 @@ export type QueryParams = SearchQueryOptions & {
|
|
|
42
44
|
[key: string]: string;
|
|
43
45
|
};
|
|
44
46
|
};
|
|
45
|
-
export type SearchQuery = ({ contentTypeIds, customWhere, dynamicOrderBy, excludeIds, featuredResults, fields, filters, fuzzySearch, languages, pageSize, pageIndex, omitDefaultSearchFields, orderBy, searchTerm, versionStatus, webpageTemplates, weightedSearchFields, }: SearchQueryOptions, isFeatured?: boolean) => Query;
|
|
46
|
-
export type FilterQuery = (contentTypeIds: string[], versionStatus: VersionStatus, customWhere?: CustomWhereClause) => Query;
|
|
47
|
+
export declare type SearchQuery = ({ contentTypeIds, customWhere, dynamicOrderBy, excludeIds, featuredResults, fields, filters, fuzzySearch, languages, pageSize, pageIndex, omitDefaultSearchFields, orderBy, searchTerm, versionStatus, webpageTemplates, weightedSearchFields, }: SearchQueryOptions, isFeatured?: boolean) => Query;
|
|
48
|
+
export declare type FilterQuery = (contentTypeIds: string[], versionStatus: VersionStatus, customWhere?: CustomWhereClause) => Query;
|
|
@@ -3,7 +3,7 @@ import MappingTemplate from 'jsonpath-mapper/dist/models/Template';
|
|
|
3
3
|
import { Context } from './Enums';
|
|
4
4
|
import { FieldOperators, LogicOperators } from './Queries';
|
|
5
5
|
import { AppState } from './SearchState';
|
|
6
|
-
export type Tab = {
|
|
6
|
+
export declare type Tab = {
|
|
7
7
|
/** The facet to render as default */
|
|
8
8
|
defaultFacet?: string;
|
|
9
9
|
/** The zero-based incrementing id assigned to the tab */
|
|
@@ -13,11 +13,11 @@ export type Tab = {
|
|
|
13
13
|
/** The facet to render the total results count as default */
|
|
14
14
|
totalCount?: string;
|
|
15
15
|
};
|
|
16
|
-
export type CustomApi = {
|
|
16
|
+
export declare type CustomApi = {
|
|
17
17
|
/** The uri of the REST API implementing a simple GET request */
|
|
18
18
|
uri: string;
|
|
19
19
|
};
|
|
20
|
-
export type Listing = {
|
|
20
|
+
export declare type Listing = {
|
|
21
21
|
/** Display title */
|
|
22
22
|
title?: string;
|
|
23
23
|
/** Experimental: use a custom API to retrieve search results */
|
|
@@ -34,7 +34,7 @@ export type Listing = {
|
|
|
34
34
|
/** Display title */
|
|
35
35
|
title?: string;
|
|
36
36
|
};
|
|
37
|
-
export type SearchFacet = {
|
|
37
|
+
export declare type SearchFacet = {
|
|
38
38
|
/** The first facet to be shown if no facet is supplied via a route parameter [default false] */
|
|
39
39
|
isDefault?: boolean;
|
|
40
40
|
/** Set to true to temporarily disable the facet [default false] */
|
|
@@ -42,10 +42,10 @@ export type SearchFacet = {
|
|
|
42
42
|
/** The id of the tab the facet applies to. Use 0 for default or the id assigned to the tab */
|
|
43
43
|
tabId?: number;
|
|
44
44
|
} & Listing;
|
|
45
|
-
export type SearchFilters = {
|
|
45
|
+
export declare type SearchFilters = {
|
|
46
46
|
[key: string]: SearchFilter;
|
|
47
47
|
};
|
|
48
|
-
export type SearchFilter = {
|
|
48
|
+
export declare type SearchFilter = {
|
|
49
49
|
/** The content type id we will dynamically load entries from and load into state under the items[] */
|
|
50
50
|
contentTypeId?: string | string[];
|
|
51
51
|
/** An array of CustomWhereClause to include in the search query when dynamically loading entries via the contentTypeId key */
|
|
@@ -71,7 +71,7 @@ export type SearchFilter = {
|
|
|
71
71
|
/** The title to render next to the filter */
|
|
72
72
|
title: string;
|
|
73
73
|
};
|
|
74
|
-
export type FilterItem = {
|
|
74
|
+
export declare type FilterItem = {
|
|
75
75
|
/** Whether the filter is in a selected state */
|
|
76
76
|
isSelected?: boolean;
|
|
77
77
|
/** This will usually be the entry id or the taxonomy key */
|
|
@@ -81,7 +81,7 @@ export type FilterItem = {
|
|
|
81
81
|
/** The title to render next to the filter item */
|
|
82
82
|
title: string;
|
|
83
83
|
};
|
|
84
|
-
export type FeaturedResults = {
|
|
84
|
+
export declare type FeaturedResults = {
|
|
85
85
|
/** If the featured results are flagged with a certain field value, specify the fieldId containing the flagged value */
|
|
86
86
|
fieldId?: string | string[];
|
|
87
87
|
/** If the featured results are flagged with a certain field value, specify the value in the flagged fieldId */
|
|
@@ -91,7 +91,7 @@ export type FeaturedResults = {
|
|
|
91
91
|
/** The number of featured results to retrieve */
|
|
92
92
|
count?: number;
|
|
93
93
|
};
|
|
94
|
-
export type SearchQueryParams = {
|
|
94
|
+
export declare type SearchQueryParams = {
|
|
95
95
|
/** An array of assetTypes to search over (sys.dataFormat == 'asset'); Prefix an entry with a "!" to exclude that asset type from the search */
|
|
96
96
|
assetTypes?: string[];
|
|
97
97
|
/** An array of contentTypeIds to search over (sys.dataFormat == 'entry'); Prefix an entry with a "!" to exclude that content type from the search */
|
|
@@ -125,7 +125,7 @@ export type SearchQueryParams = {
|
|
|
125
125
|
/** An array of WeightedSearchField to include in the search query */
|
|
126
126
|
weightedSearchFields?: WeightedSearchField[];
|
|
127
127
|
};
|
|
128
|
-
export type WhereClause = {
|
|
128
|
+
export declare type WhereClause = {
|
|
129
129
|
/** The field we wish to query */
|
|
130
130
|
field: string;
|
|
131
131
|
/** The value we want to evaluate with the chosen operator */
|
|
@@ -134,14 +134,14 @@ export type WhereClause = {
|
|
|
134
134
|
/**
|
|
135
135
|
* N.B. This shares syntax with adding where operators to a search query when using the Delivery API via HTTP, and should be used sparingly for exceptional cases where the standard query falls short
|
|
136
136
|
*/
|
|
137
|
-
export type CustomWhereClause = (WhereClause | {
|
|
137
|
+
export declare type CustomWhereClause = (WhereClause | {
|
|
138
138
|
not: WhereClause;
|
|
139
139
|
} | {
|
|
140
140
|
and: WhereClause[];
|
|
141
141
|
} | {
|
|
142
142
|
or: WhereClause[];
|
|
143
143
|
})[];
|
|
144
|
-
export type WeightedSearchField = {
|
|
144
|
+
export declare type WeightedSearchField = {
|
|
145
145
|
/** The id of the field to query against */
|
|
146
146
|
fieldId: string;
|
|
147
147
|
/** The weighting applied to the field */
|
|
@@ -152,7 +152,7 @@ export type WeightedSearchField = {
|
|
|
152
152
|
*
|
|
153
153
|
* You need to provide a search configuration to the reducer so the initialState for your search can be set, this tells the package what you need your search to do, and where to get its data from.
|
|
154
154
|
*/
|
|
155
|
-
export type SearchConfig = {
|
|
155
|
+
export declare type SearchConfig = {
|
|
156
156
|
/** An object with a key for each facet that is required for the search */
|
|
157
157
|
facets: {
|
|
158
158
|
[key: string]: SearchFacet;
|
|
@@ -168,7 +168,7 @@ export type SearchConfig = {
|
|
|
168
168
|
/** An Array of Tabs */
|
|
169
169
|
tabs: Tab[];
|
|
170
170
|
};
|
|
171
|
-
export type ConfigTypes = {
|
|
171
|
+
export declare type ConfigTypes = {
|
|
172
172
|
[key: string]: SearchFacet;
|
|
173
173
|
} | {
|
|
174
174
|
[key: string]: Listing;
|
|
@@ -176,15 +176,15 @@ export type ConfigTypes = {
|
|
|
176
176
|
/**
|
|
177
177
|
* Type your mapper for mapping API responses (entries) into usable props for your components to render
|
|
178
178
|
*/
|
|
179
|
-
export type SearchResultsMapper<Target = any, Source = Entry> = (entries: Source[], facet?: string, context?: Context, state?: AppState) => Target[];
|
|
179
|
+
export declare type SearchResultsMapper<Target = any, Source = Entry> = (entries: Source[], facet?: string, context?: Context, state?: AppState) => Target[];
|
|
180
180
|
/**
|
|
181
181
|
* Type your custom filter item mapping function with this to ensure correctly typed FilterItems are returned to work with search functions
|
|
182
182
|
*/
|
|
183
|
-
export type FilterItemsMapper<T = Entry> = (entries: T[]) => FilterItem[];
|
|
183
|
+
export declare type FilterItemsMapper<T = Entry> = (entries: T[]) => FilterItem[];
|
|
184
184
|
/**
|
|
185
185
|
* The uri object type we need to return from the Navigate mapper after any search action has been called
|
|
186
186
|
*/
|
|
187
|
-
export type NavigateUri = {
|
|
187
|
+
export declare type NavigateUri = {
|
|
188
188
|
path: string;
|
|
189
189
|
search: string;
|
|
190
190
|
hash: string;
|
|
@@ -192,11 +192,11 @@ export type NavigateUri = {
|
|
|
192
192
|
/**
|
|
193
193
|
* Type your jsonpath-mapper mapping template with this to map your next search uri to your custom uri structure after calling any search action
|
|
194
194
|
*/
|
|
195
|
-
export type SearchUriMapping = MappingTemplate<SearchStateParams>;
|
|
195
|
+
export declare type SearchUriMapping = MappingTemplate<SearchStateParams>;
|
|
196
196
|
/**
|
|
197
197
|
* Type the argument passed to the Navigate mapper, this provides the relevant keys and data available to manipulate and return the next uri after any search action has been called
|
|
198
198
|
*/
|
|
199
|
-
export type SearchStateParams = {
|
|
199
|
+
export declare type SearchStateParams = {
|
|
200
200
|
state: AppState;
|
|
201
201
|
facet?: string;
|
|
202
202
|
orderBy?: string;
|
|
@@ -205,15 +205,15 @@ export type SearchStateParams = {
|
|
|
205
205
|
term?: string;
|
|
206
206
|
};
|
|
207
207
|
/** Type your Navigate mapper with this, the Navigate mapper is called after any search action has been called and is required to return the next uri to be parsed by your project's route configuration and provide the right uri parameters to drive the next search query and resulting state */
|
|
208
|
-
export type NavigateMapper = ({ state, facet, orderBy, pageIndex, pageSize, term, }: SearchStateParams) => NavigateUri;
|
|
208
|
+
export declare type NavigateMapper = ({ state, facet, orderBy, pageIndex, pageSize, term, }: SearchStateParams) => NavigateUri;
|
|
209
209
|
/** Type your Results Info mapper with this, remember "resultsInfo" prop is a custom object you define yourself - you can provide any keys you wish, conveying detailed messaging or UX tweaks to cover all kinds of scenarios based on data in the search state at that time */
|
|
210
|
-
export type ResultsInfoMapper<T = any> = (state: AppState) => T;
|
|
210
|
+
export declare type ResultsInfoMapper<T = any> = (state: AppState) => T;
|
|
211
211
|
/** Experimental**: If you are trying to use the custom API feature you can add specific keys to the resultant querystring that for the custom API GET request */
|
|
212
|
-
export type CustomApiParamsMapper = (queryParams: SearchQueryParams) => {
|
|
212
|
+
export declare type CustomApiParamsMapper = (queryParams: SearchQueryParams) => {
|
|
213
213
|
[key: string]: string;
|
|
214
214
|
};
|
|
215
215
|
/** Type your Mappers object with this type to provide a accurate, type-safe "mapper" argument to your search implementation */
|
|
216
|
-
export type Mappers = {
|
|
216
|
+
export declare type Mappers = {
|
|
217
217
|
customApi?: CustomApiParamsMapper;
|
|
218
218
|
results: SearchResultsMapper;
|
|
219
219
|
filterItems?: FilterItemsMapper;
|
|
@@ -221,4 +221,4 @@ export type Mappers = {
|
|
|
221
221
|
resultsInfo?: ResultsInfoMapper;
|
|
222
222
|
};
|
|
223
223
|
/** SearchTransformations is just an alias for Mappers object / argument */
|
|
224
|
-
export type SearchTransformations = Mappers;
|
|
224
|
+
export declare type SearchTransformations = Mappers;
|