@zengenti/contensis-react-base 4.0.0-beta.9 → 4.0.1-beta.0
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 +14 -1
- package/cjs/{App-vZrUfVgQ.js → App-Bg1MzW4V.js} +593 -110
- package/cjs/App-Bg1MzW4V.js.map +1 -0
- package/cjs/{ChangePassword.container-ECjEXixF.js → ChangePassword.container-C4Du3Wb1.js} +57 -50
- package/cjs/ChangePassword.container-C4Du3Wb1.js.map +1 -0
- package/cjs/{SSRContext-DVj_QAC1.js → ContensisDeliveryApi-MfcvdfDR.js} +32 -74
- package/cjs/ContensisDeliveryApi-MfcvdfDR.js.map +1 -0
- package/cjs/CookieConstants-DfPiWCRZ.js +12 -0
- package/cjs/CookieConstants-DfPiWCRZ.js.map +1 -0
- package/{esm/CookieHelper.class-FTURFpz3.js → cjs/CookieHelper.class-Det3qfdU.js} +4 -6
- package/cjs/CookieHelper.class-Det3qfdU.js.map +1 -0
- package/cjs/{RouteLoader-D5Yg7EB5.js → RouteLoader-DJeM8cym.js} +17 -9
- package/cjs/RouteLoader-DJeM8cym.js.map +1 -0
- package/cjs/SSRContext-tMufQDHY.js +116 -0
- package/cjs/SSRContext-tMufQDHY.js.map +1 -0
- package/cjs/ToJs-BsWqWjdm.js +23 -0
- package/cjs/ToJs-BsWqWjdm.js.map +1 -0
- package/cjs/{VersionInfo-B_dKCubg.js → VersionInfo-zFPsvS8q.js} +3 -25
- package/cjs/VersionInfo-zFPsvS8q.js.map +1 -0
- package/cjs/client.js +63 -65
- package/cjs/client.js.map +1 -1
- package/cjs/contensis-react-base.js +208 -119
- package/cjs/contensis-react-base.js.map +1 -1
- package/cjs/i18n.js +75 -0
- package/cjs/i18n.js.map +1 -0
- package/cjs/{ToJs-C9jwV7YB.js → matchGroups-dqONU-vY.js} +2 -22
- package/cjs/matchGroups-dqONU-vY.js.map +1 -0
- package/cjs/redux.js +8 -6
- package/cjs/redux.js.map +1 -1
- package/cjs/routing.js +15 -7
- package/cjs/routing.js.map +1 -1
- package/cjs/{sagas-BVX4Ps1e.js → sagas-BCy9u6zA.js} +523 -375
- package/cjs/sagas-BCy9u6zA.js.map +1 -0
- package/cjs/search.js +54 -29
- package/cjs/search.js.map +1 -1
- package/cjs/{selectors-wCs5fHD4.js → selectors-BrxJ8-F8.js} +27 -6
- package/cjs/selectors-BrxJ8-F8.js.map +1 -0
- package/cjs/selectors-DAQR0uZa.js +18 -0
- package/cjs/selectors-DAQR0uZa.js.map +1 -0
- package/cjs/slice-5xJMH24n.js +69 -0
- package/cjs/slice-5xJMH24n.js.map +1 -0
- package/cjs/{store-D07FOXvM.js → store-B7SJs5Hf.js} +64 -5
- package/cjs/store-B7SJs5Hf.js.map +1 -0
- package/cjs/urls-DGZlAs0y.js +25 -0
- package/cjs/urls-DGZlAs0y.js.map +1 -0
- package/cjs/user.js +20 -17
- package/cjs/user.js.map +1 -1
- package/cjs/util-eOjxDjxF.js +148 -0
- package/cjs/util-eOjxDjxF.js.map +1 -0
- package/cjs/util.js +80 -22
- package/cjs/util.js.map +1 -1
- package/cjs/{version-CM-bJ62L.js → version-rFG9Y6_B.js} +2 -2
- package/cjs/{version-CM-bJ62L.js.map → version-rFG9Y6_B.js.map} +1 -1
- package/cjs/{version-B7XFkBhY.js → version-yjHMrfVz.js} +15 -16
- package/cjs/version-yjHMrfVz.js.map +1 -0
- package/esm/{App-DLZweVSp.js → App-Bplaqueq.js} +554 -72
- package/esm/App-Bplaqueq.js.map +1 -0
- package/esm/{ChangePassword.container-BgzIy8dA.js → ChangePassword.container-CUBtn82K.js} +19 -13
- package/esm/ChangePassword.container-CUBtn82K.js.map +1 -0
- package/esm/{SSRContext-BE8ElZ3X.js → ContensisDeliveryApi-LWYXevZ1.js} +30 -67
- package/esm/ContensisDeliveryApi-LWYXevZ1.js.map +1 -0
- package/esm/CookieConstants-DEmbwzYr.js +7 -0
- package/esm/CookieConstants-DEmbwzYr.js.map +1 -0
- package/{cjs/CookieHelper.class-C3Eqoze9.js → esm/CookieHelper.class-C6rTRl_1.js} +2 -14
- package/esm/CookieHelper.class-C6rTRl_1.js.map +1 -0
- package/esm/{RouteLoader-xeQBXywk.js → RouteLoader-CzrlySZf.js} +14 -6
- package/esm/RouteLoader-CzrlySZf.js.map +1 -0
- package/esm/SSRContext-Bxtg1KGv.js +106 -0
- package/esm/SSRContext-Bxtg1KGv.js.map +1 -0
- package/esm/ToJs-BnRRHk6f.js +17 -0
- package/esm/ToJs-BnRRHk6f.js.map +1 -0
- package/esm/{VersionInfo-Cno7K0OA.js → VersionInfo-By2ZCZOh.js} +4 -24
- package/esm/VersionInfo-By2ZCZOh.js.map +1 -0
- package/esm/client.js +63 -64
- package/esm/client.js.map +1 -1
- package/esm/contensis-react-base.js +201 -114
- package/esm/contensis-react-base.js.map +1 -1
- package/esm/i18n.js +64 -0
- package/esm/i18n.js.map +1 -0
- package/esm/{ToJs-CNzfvyxJ.js → matchGroups-_w8BwzCC.js} +3 -18
- package/esm/matchGroups-_w8BwzCC.js.map +1 -0
- package/esm/redux.js +11 -8
- package/esm/redux.js.map +1 -1
- package/esm/routing.js +14 -7
- package/esm/routing.js.map +1 -1
- package/esm/{sagas-JI51CS37.js → sagas-Fr9yRduO.js} +511 -362
- package/esm/sagas-Fr9yRduO.js.map +1 -0
- package/esm/search.js +73 -47
- package/esm/search.js.map +1 -1
- package/esm/{selectors-DO2ocdOp.js → selectors-8ROQrTd7.js} +25 -7
- package/esm/selectors-8ROQrTd7.js.map +1 -0
- package/esm/selectors-DcmvOeX2.js +10 -0
- package/esm/selectors-DcmvOeX2.js.map +1 -0
- package/esm/slice-C6JLQik8.js +63 -0
- package/esm/slice-C6JLQik8.js.map +1 -0
- package/esm/{store-3u0RzHZ0.js → store-B4IrBYHm.js} +64 -6
- package/esm/store-B4IrBYHm.js.map +1 -0
- package/esm/urls-tLxo_skx.js +22 -0
- package/esm/urls-tLxo_skx.js.map +1 -0
- package/esm/user.js +9 -6
- package/esm/user.js.map +1 -1
- package/esm/util-Bl2u6LpY.js +136 -0
- package/esm/util-Bl2u6LpY.js.map +1 -0
- package/esm/util.js +58 -14
- package/esm/util.js.map +1 -1
- package/esm/{version-wnf-TITV.js → version-BQAL8sQO.js} +2 -2
- package/esm/{version-wnf-TITV.js.map → version-BQAL8sQO.js.map} +1 -1
- package/esm/{version-BlsI7hX2.js → version-CA9Mdm3A.js} +16 -16
- package/esm/version-CA9Mdm3A.js.map +1 -0
- package/i18n/package.json +5 -0
- package/models/app/pages/VersionInfo/components/VersionInfo.d.ts +1 -1
- package/models/app/pages/VersionInfo/components/VersionInfo.styled.d.ts +1 -2
- package/models/i18n/index.d.ts +5 -0
- package/models/i18n/redux/sagas.d.ts +19 -0
- package/models/i18n/redux/selectors.d.ts +11 -0
- package/models/i18n/redux/slice.d.ts +198 -0
- package/models/i18n/routes.d.ts +8 -0
- package/models/i18n/useI18n.hook.d.ts +20 -0
- package/models/index.d.ts +1 -0
- package/models/models/AppState.d.ts +2 -0
- package/models/models/ContentTypeMapping.d.ts +6 -1
- package/models/models/EntryMapper.d.ts +2 -1
- package/models/models/Locales.d.ts +11 -0
- package/models/models/MatchedRoute.d.ts +5 -1
- package/models/models/RouteComponent.d.ts +0 -1
- package/models/models/RouteNode.d.ts +4 -2
- package/models/models/SSRContext.d.ts +4 -4
- package/models/models/StaticRoute.d.ts +12 -1
- package/models/models/WithEvents.d.ts +8 -0
- package/models/models/config/AppConfig.d.ts +2 -0
- package/models/models/config/I18n.d.ts +38 -0
- package/models/models/config/ServerConfig.d.ts +14 -0
- package/models/redux/index.d.ts +2 -1
- package/models/redux/sagas/index.d.ts +3 -1
- package/models/redux/sagas/injector.d.ts +13 -0
- package/models/redux/store/injectors/index.d.ts +26 -0
- package/models/redux/store/injectors/inject.d.ts +24 -0
- package/models/redux/store/injectors/util.d.ts +2 -0
- package/models/redux/store/store.d.ts +13 -4
- package/models/redux/util.d.ts +1 -1
- package/models/routing/components/RouteLoader.d.ts +3 -3
- package/models/routing/httpContext.d.ts +0 -1
- package/models/routing/index.d.ts +1 -0
- package/models/routing/redux/actions.d.ts +1 -1
- package/models/routing/redux/invokeSearch.d.ts +22 -0
- package/models/routing/redux/selectors.d.ts +47 -4
- package/models/routing/util/expressions.d.ts +1 -1
- package/models/routing/util/find-contenttype-mapping.d.ts +3 -1
- package/models/search/containers/withListing.d.ts +1 -1
- package/models/search/containers/withSearch.d.ts +1 -1
- package/models/search/models/Queries.d.ts +3 -5
- package/models/search/models/Search.d.ts +43 -13
- package/models/search/models/SearchActions.d.ts +61 -18
- package/models/search/models/SearchProps.d.ts +11 -10
- package/models/search/models/SearchState.d.ts +23 -2
- package/models/search/models/SearchUtil.d.ts +3 -3
- package/models/search/redux/getIn.d.ts +2 -2
- package/models/search/redux/reducers.d.ts +3 -4
- package/models/search/redux/sagas.d.ts +13 -14
- package/models/search/redux/schema.d.ts +3 -3
- package/models/search/redux/selectors.d.ts +64 -42
- package/models/search/redux/util.d.ts +10 -1
- package/models/search/search/ContensisDeliveryApi.d.ts +6 -26
- package/models/search/search/expressions.d.ts +6 -4
- package/models/search/search/util.d.ts +9 -7
- package/models/search/transformations/state-to-queryparams.mapper.d.ts +1 -1
- package/models/server/features/linkdepth-api/search.d.ts +1 -1
- package/models/server/features/response-handler/render-stream.d.ts +2 -4
- package/models/server/features/static-assets/index.d.ts +4 -3
- package/models/server/internalServer.d.ts +1 -2
- package/models/server/middleware/subsiteDebug.d.ts +11 -0
- package/models/server/root.d.ts +3 -0
- package/models/server/util/bundles.d.ts +9 -9
- package/models/server/util/jsx.d.ts +2 -14
- package/models/user/components.styled/Login.styled.d.ts +1 -1
- package/models/user/components.styled/LoginForm.styled.d.ts +1 -1
- package/models/user/hocs/withRegistration.d.ts +1 -1
- package/models/util/CachedDeliveryApi.d.ts +8 -2
- package/models/util/ContensisDeliveryApi.d.ts +2 -4
- package/models/util/NoSSR.d.ts +6 -0
- package/models/util/SSRContext.d.ts +3 -19
- package/models/util/donotuse_useHistory.d.ts +6 -0
- package/models/util/errors.d.ts +16 -0
- package/models/util/index.d.ts +7 -2
- package/models/util/subsite.d.ts +12 -0
- package/models/util/urls.d.ts +1 -2
- package/models/util/useIsClient.d.ts +6 -0
- package/package.json +37 -39
- package/cjs/App-vZrUfVgQ.js.map +0 -1
- package/cjs/ChangePassword.container-ECjEXixF.js.map +0 -1
- package/cjs/CookieHelper.class-C3Eqoze9.js.map +0 -1
- package/cjs/RouteLoader-D5Yg7EB5.js.map +0 -1
- package/cjs/SSRContext-DVj_QAC1.js.map +0 -1
- package/cjs/ToJs-C9jwV7YB.js.map +0 -1
- package/cjs/VersionInfo-B_dKCubg.js.map +0 -1
- package/cjs/sagas-BVX4Ps1e.js.map +0 -1
- package/cjs/selectors-wCs5fHD4.js.map +0 -1
- package/cjs/store-D07FOXvM.js.map +0 -1
- package/cjs/version-B7XFkBhY.js.map +0 -1
- package/esm/App-DLZweVSp.js.map +0 -1
- package/esm/ChangePassword.container-BgzIy8dA.js.map +0 -1
- package/esm/CookieHelper.class-FTURFpz3.js.map +0 -1
- package/esm/RouteLoader-xeQBXywk.js.map +0 -1
- package/esm/SSRContext-BE8ElZ3X.js.map +0 -1
- package/esm/ToJs-CNzfvyxJ.js.map +0 -1
- package/esm/VersionInfo-Cno7K0OA.js.map +0 -1
- package/esm/sagas-JI51CS37.js.map +0 -1
- package/esm/selectors-DO2ocdOp.js.map +0 -1
- package/esm/store-3u0RzHZ0.js.map +0 -1
- package/esm/version-BlsI7hX2.js.map +0 -1
- package/models/redux/store/injectors.d.ts +0 -31
- package/models/search/search/ToJs.d.ts +0 -4
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
import { Context } from '../models/Enums';
|
|
2
2
|
import { QueryParams as QueryParams2 } from '../models/Queries';
|
|
3
3
|
import { CustomApi, SearchQueryParams } from '../models/Search';
|
|
4
|
-
import { AppState, Facet, Facets, Filters, Paging, SelectedFilters, Tab } from '../models/SearchState';
|
|
4
|
+
import { AppState, Composition, Facet, Facets, Filters, Paging, SearchState, SelectedFilters, Tab } from '../models/SearchState';
|
|
5
5
|
type StateType = 'immutable' | 'js';
|
|
6
|
-
|
|
7
|
-
export declare const
|
|
6
|
+
type ContextType = keyof typeof Context;
|
|
7
|
+
export declare const getSearchContext: (state: AppState) => ContextType;
|
|
8
|
+
export declare const getCurrent: (state: AppState, context?: ContextType) => string;
|
|
8
9
|
export declare const getCurrentFacet: (state: AppState) => string;
|
|
9
10
|
export declare const getCurrentListing: (state: AppState) => string;
|
|
10
11
|
export declare const getCurrentTab: (state: AppState) => number;
|
|
12
|
+
export declare const getCurrentComposition: (state: AppState) => string;
|
|
13
|
+
/** A localised version of `getCurrent` selector */
|
|
14
|
+
export declare const getLocalisedCurrent: (state: AppState, language?: string, context?: ContextType) => string;
|
|
15
|
+
export declare const getLocalisedFacetKey: (state: AppState, facet?: string, language?: string, context?: ContextType) => string | undefined;
|
|
16
|
+
export declare const getCurrentFromLocalised: (state: AppState, alias: string, language?: string, context?: ContextType) => {
|
|
17
|
+
facet: string;
|
|
18
|
+
language: string;
|
|
19
|
+
} | null;
|
|
11
20
|
export declare const getFacets: (state: AppState, returnType?: StateType) => Facets;
|
|
12
21
|
export declare const getTabFacets: (state: AppState) => {
|
|
13
22
|
[k: string]: Facet;
|
|
14
23
|
};
|
|
24
|
+
export declare const getCompositionFacets: (state: AppState, composition?: string) => Facets;
|
|
15
25
|
export declare const getFacetTitles: (state: AppState) => {
|
|
16
26
|
isSelected: boolean;
|
|
17
27
|
key: string;
|
|
@@ -20,41 +30,54 @@ export declare const getFacetTitles: (state: AppState) => {
|
|
|
20
30
|
}[];
|
|
21
31
|
export declare const getFacet: (state: AppState, facetName?: string, context?: Context | string, returnType?: StateType) => Facet;
|
|
22
32
|
export declare const getListing: (state: AppState, listing?: string) => Facet;
|
|
23
|
-
export declare const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export declare const
|
|
29
|
-
export declare const
|
|
30
|
-
export declare const
|
|
33
|
+
export declare const getComposition: (state: AppState, composition?: string) => Composition & {
|
|
34
|
+
listings?: Facets;
|
|
35
|
+
facets?: Facets;
|
|
36
|
+
};
|
|
37
|
+
/** Return filter state for the current (or provided) facet */
|
|
38
|
+
export declare const getFilters: (state: AppState, facet: string, context?: ContextType, returnType?: StateType) => Filters;
|
|
39
|
+
export declare const getLocalisedFilterKey: (state: AppState, key: string, language: string | undefined, facet: string, context?: ContextType) => string;
|
|
40
|
+
export declare const getFilterKeyFromLocalised: (state: AppState, key: string, language: string | undefined, facet: string, context?: ContextType) => string;
|
|
41
|
+
/** Return filter state for the current (or provided) facet, excluding filters configured as `renderable: false` */
|
|
42
|
+
export declare const getRenderableFilters: (state: AppState, facet?: string, context?: ContextType) => Filters;
|
|
43
|
+
export declare const getFiltersToLoad: (state: AppState, facet: string, context?: ContextType, returnType?: StateType) => string[];
|
|
44
|
+
/** Return keyed object for all filters in the current facet with all selected values for each filter */
|
|
45
|
+
export declare const getSelectedFilters: (state: AppState, facet?: string, context?: ContextType, returnType?: StateType) => SelectedFilters;
|
|
46
|
+
/** Return keyed object for all _renderable_ filters in the current facet with all selected values for each filter */
|
|
47
|
+
export declare const getRenderableSelectedFilters: (state: AppState, facet?: string, context?: ContextType) => SelectedFilters;
|
|
48
|
+
/** A localised version of `getRenderableSelectedFilters` selector */
|
|
49
|
+
export declare const getLocalisedRenderableSelectedFilters: (state: AppState, facet?: string, context?: ContextType) => SelectedFilters;
|
|
50
|
+
export declare const getResults: (state: AppState, current?: string, context?: ContextType, returnType?: StateType) => any[];
|
|
51
|
+
export declare const getResultsInfo: (state: AppState, current?: string, context?: ContextType) => any;
|
|
52
|
+
export declare const getIsInternalPaging: (state: AppState, current: string, context?: ContextType) => boolean;
|
|
53
|
+
export declare const getIsLoaded: (state: AppState, context?: ContextType, facet?: string) => boolean;
|
|
54
|
+
export declare const getIsLoading: (state: AppState, context?: ContextType, facet?: string) => boolean;
|
|
31
55
|
export declare const getIsSsr: (state: AppState) => boolean;
|
|
32
|
-
export declare const getFeaturedResults: (state: AppState, current?: string, context?:
|
|
33
|
-
export declare const getPaging: (state: AppState, current?: string, context?:
|
|
34
|
-
export declare const getPageIndex: (state: AppState, current?: string, context?:
|
|
35
|
-
export declare const getPageSize: (state: AppState, current?: string, context?:
|
|
36
|
-
export declare const getPrevPageIndex: (state: AppState, current?: string, context?:
|
|
37
|
-
export declare const getPageIsLoading: (state: AppState, current?: string, context?:
|
|
38
|
-
export declare const getPagesLoaded: (state: AppState, current?: string, context?:
|
|
39
|
-
export declare const getTotalCount: (state: AppState, current?: string, context?:
|
|
56
|
+
export declare const getFeaturedResults: (state: AppState, current?: string, context?: ContextType, returnType?: StateType) => any[];
|
|
57
|
+
export declare const getPaging: (state: AppState, current?: string, context?: ContextType, returnType?: StateType) => Paging;
|
|
58
|
+
export declare const getPageIndex: (state: AppState, current?: string, context?: ContextType) => number;
|
|
59
|
+
export declare const getPageSize: (state: AppState, current?: string, context?: ContextType) => number;
|
|
60
|
+
export declare const getPrevPageIndex: (state: AppState, current?: string, context?: ContextType) => number;
|
|
61
|
+
export declare const getPageIsLoading: (state: AppState, current?: string, context?: ContextType) => boolean;
|
|
62
|
+
export declare const getPagesLoaded: (state: AppState, current?: string, context?: ContextType) => number[];
|
|
63
|
+
export declare const getTotalCount: (state: AppState, current?: string, context?: ContextType) => number;
|
|
40
64
|
export declare const getSearchTerm: (state: AppState) => string;
|
|
41
65
|
export declare const getSearchTabs: (state: AppState, returnType?: StateType) => Tab[];
|
|
42
|
-
export declare const
|
|
43
|
-
export declare const
|
|
66
|
+
export declare const getSearchCompositions: (state: AppState) => SearchState["compositions"];
|
|
67
|
+
export declare const getQueryParams: (state: AppState, current?: string, context?: ContextType) => Record<string, any>;
|
|
68
|
+
export declare const getQueryParameter: <K extends keyof SearchQueryParams, K2 extends keyof QueryParams2>({ state, facet, context, }: {
|
|
44
69
|
state: AppState;
|
|
45
70
|
facet?: string;
|
|
46
|
-
context?:
|
|
71
|
+
context?: ContextType;
|
|
47
72
|
}, key: K | K2, ifnull?: any) => SearchQueryParams[K] | QueryParams2[K2];
|
|
48
|
-
export declare const getCustomApi: (state: AppState, current: string, context?:
|
|
49
|
-
export declare const getCustomEnv: (state: AppState, current: string, context?: Context) => any;
|
|
73
|
+
export declare const getCustomApi: (state: AppState, current: string, context?: ContextType, returnType?: StateType) => CustomApi;
|
|
50
74
|
export declare const getTabsAndFacets: (state: AppState, returnType?: StateType) => any;
|
|
51
75
|
export declare const getSearchTotalCount: (state: AppState) => number;
|
|
52
76
|
export declare const getFacetsTotalCount: (state: AppState) => number;
|
|
53
77
|
export declare const selectFacets: {
|
|
54
78
|
getCurrent: (state: AppState) => string;
|
|
55
79
|
getCurrentTab: (state: AppState) => number;
|
|
56
|
-
getCustomApi: (state: AppState, current: string, context?:
|
|
57
|
-
getCustomEnv: (state: AppState, current: string, context?: Context) => any;
|
|
80
|
+
getCustomApi: (state: AppState, current: string, context?: ContextType, returnType?: StateType) => CustomApi;
|
|
58
81
|
getFacet: (state: AppState, facetName?: string, context?: Context | string, returnType?: StateType) => Facet;
|
|
59
82
|
getFacetTitles: (state: AppState) => {
|
|
60
83
|
isSelected: boolean;
|
|
@@ -64,31 +87,32 @@ export declare const selectFacets: {
|
|
|
64
87
|
}[];
|
|
65
88
|
getFacets: (state: AppState, returnType?: StateType) => Facets;
|
|
66
89
|
getFacetsTotalCount: (state: AppState) => number;
|
|
67
|
-
getFeaturedResults: (state: AppState, current?: string, context?:
|
|
68
|
-
getFilters: (state: AppState, facet: string, context?:
|
|
69
|
-
getFiltersToLoad: (state: AppState, facet: string, context?:
|
|
70
|
-
getIsLoaded: (state: AppState, context?:
|
|
71
|
-
getIsLoading: (state: AppState, context?:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
90
|
+
getFeaturedResults: (state: AppState, current?: string, context?: ContextType, returnType?: StateType) => any[];
|
|
91
|
+
getFilters: (state: AppState, facet: string, context?: ContextType, returnType?: StateType) => Filters;
|
|
92
|
+
getFiltersToLoad: (state: AppState, facet: string, context?: ContextType, returnType?: StateType) => string[];
|
|
93
|
+
getIsLoaded: (state: AppState, context?: ContextType, facet?: string) => boolean;
|
|
94
|
+
getIsLoading: (state: AppState, context?: ContextType, facet?: string) => boolean;
|
|
95
|
+
getLocalisedCurrent: (state: AppState) => string;
|
|
96
|
+
getPageIndex: (state: AppState, current?: string, context?: ContextType) => number;
|
|
97
|
+
getPageIsLoading: (state: AppState, current?: string, context?: ContextType) => boolean;
|
|
98
|
+
getPagesLoaded: (state: AppState, current?: string, context?: ContextType) => number[];
|
|
99
|
+
getPaging: (state: AppState, current?: string, context?: ContextType, returnType?: StateType) => Paging;
|
|
76
100
|
getQueryParams: (state: AppState, facet: string) => Record<string, any>;
|
|
77
101
|
getQueryParameter: ({ state, facet }: {
|
|
78
102
|
state: AppState;
|
|
79
103
|
facet?: string;
|
|
80
104
|
}, key: keyof SearchQueryParams | keyof QueryParams2, ifnull: any) => any;
|
|
81
|
-
getRenderableFilters: (state: AppState, facet?: string, context?:
|
|
82
|
-
getResults: (state: AppState, current?: string, context?:
|
|
105
|
+
getRenderableFilters: (state: AppState, facet?: string, context?: ContextType) => Filters;
|
|
106
|
+
getResults: (state: AppState, current?: string, context?: ContextType, returnType?: StateType) => any[];
|
|
83
107
|
getTabFacets: (state: AppState) => {
|
|
84
108
|
[k: string]: Facet;
|
|
85
109
|
};
|
|
86
110
|
getTabsAndFacets: (state: AppState, returnType?: StateType) => any;
|
|
87
|
-
getTotalCount: (state: AppState, current?: string, context?:
|
|
111
|
+
getTotalCount: (state: AppState, current?: string, context?: ContextType) => number;
|
|
88
112
|
getSearchTabs: (state: AppState, returnType?: StateType) => Tab[];
|
|
89
113
|
getSearchTerm: (state: AppState) => string;
|
|
90
114
|
getSearchTotalCount: (state: AppState) => number;
|
|
91
|
-
getSelectedFilters: (state: AppState, facet?: string, context?:
|
|
115
|
+
getSelectedFilters: (state: AppState, facet?: string, context?: ContextType, returnType?: StateType) => SelectedFilters;
|
|
92
116
|
};
|
|
93
117
|
export declare const selectListing: {
|
|
94
118
|
getCurrent: (state: AppState) => string;
|
|
@@ -96,6 +120,7 @@ export declare const selectListing: {
|
|
|
96
120
|
getFilters: (state: AppState, listing?: string) => Filters;
|
|
97
121
|
getFiltersToLoad: (state: AppState, listing?: string) => string[];
|
|
98
122
|
getListing: (state: AppState, listing?: string) => Facet;
|
|
123
|
+
getLocalisedCurrent: (state: AppState) => string;
|
|
99
124
|
getIsLoaded: (state: AppState) => boolean;
|
|
100
125
|
getIsLoading: (state: AppState) => boolean;
|
|
101
126
|
getPageIndex: (state: AppState, listing?: string) => number;
|
|
@@ -113,7 +138,4 @@ export declare const selectListing: {
|
|
|
113
138
|
getTotalCount: (state: AppState, listing?: string) => number;
|
|
114
139
|
getSelectedFilters: (state: AppState, listing?: string) => SelectedFilters;
|
|
115
140
|
};
|
|
116
|
-
export declare const selectCurrentPath: (state: AppState) => any;
|
|
117
|
-
export declare const selectCurrentProject: (state: AppState) => any;
|
|
118
|
-
export declare const selectVersionStatus: (state: AppState) => any;
|
|
119
141
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SearchQueryOptions } from '../models/Queries';
|
|
2
2
|
import { AppState } from '../models/SearchState';
|
|
3
|
-
import { EnsureSearchAction, SetSearchEntriesAction } from '../models/SearchActions';
|
|
3
|
+
import { EnsureSearchAction, SearchParams, SetSearchEntriesAction } from '../models/SearchActions';
|
|
4
4
|
/**
|
|
5
5
|
* 1, Generates all the parameters required to run the search query.
|
|
6
6
|
* 2, Tells us if we should run the search.
|
|
@@ -15,6 +15,14 @@ export declare const generateQueryParams: (action: EnsureSearchAction | SetSearc
|
|
|
15
15
|
* @param state
|
|
16
16
|
*/
|
|
17
17
|
export declare const runSearch: (action: EnsureSearchAction | SetSearchEntriesAction, state: AppState, queryParams: SearchQueryOptions) => boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Patch mutates original params argument to decode certain
|
|
20
|
+
* url encoded params which can creep into urls and cause a
|
|
21
|
+
* flash of different content when hydrating from SSR
|
|
22
|
+
* @param params SearchParams
|
|
23
|
+
* @returns SearchParams
|
|
24
|
+
*/
|
|
25
|
+
export declare const sanitiseParams: (params?: SearchParams) => SearchParams | undefined;
|
|
18
26
|
/**
|
|
19
27
|
* This will tell us if filter parameters have been
|
|
20
28
|
* changed by some external event such as a route change
|
|
@@ -22,5 +30,6 @@ export declare const runSearch: (action: EnsureSearchAction | SetSearchEntriesAc
|
|
|
22
30
|
* @returns true or false
|
|
23
31
|
*/
|
|
24
32
|
export declare const filterParamsChanged: (action: EnsureSearchAction | SetSearchEntriesAction, state?: AppState) => boolean;
|
|
33
|
+
export declare const languageChanged: (action: EnsureSearchAction | SetSearchEntriesAction) => boolean;
|
|
25
34
|
export declare const debugExecuteSearch: (action: EnsureSearchAction | SetSearchEntriesAction, state: AppState) => void;
|
|
26
35
|
export declare const scrollTo: (scrollToElement: string) => void;
|
|
@@ -1,33 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
export const cachedSearch: CachedSearch;
|
|
6
|
-
declare class DeliveryApi {
|
|
7
|
-
search(query: any, linkDepth: any, project: any, env: any): Promise<import("contensis-core-api").PagedList<import("contensis-delivery-api").Entry>>;
|
|
8
|
-
getClient(deliveryApiStatus: string | undefined, project: any, env: any): Client;
|
|
9
|
-
getEntry(id: any, linkDepth: number | undefined, deliveryApiStatus: string | undefined, project: any, env: any): Promise<import("contensis-delivery-api").Entry>;
|
|
10
|
-
}
|
|
11
|
-
declare class CachedSearch {
|
|
1
|
+
/** @deprecated Taxonomy is deprecated in Contensis, code remains
|
|
2
|
+
* to support any legacy implementations using Taxonomy in their search */
|
|
3
|
+
export const cachedTaxonomyLookup: CachedTaxonomyLookup;
|
|
4
|
+
declare class CachedTaxonomyLookup {
|
|
12
5
|
cache: LruCache;
|
|
13
6
|
taxonomyLookup: {};
|
|
14
|
-
search(query: any, linkDepth: any, project: any, env: any): any;
|
|
15
7
|
getTaxonomyNodeByPath(path: any, project: any, env: any): any;
|
|
16
8
|
request(key: any, execute: any): any;
|
|
17
9
|
extendTaxonomyNode(node: any): any;
|
|
18
10
|
getTaxonomyId(node: any): any;
|
|
19
|
-
fetch(uri: any, opts?: {}): any;
|
|
20
|
-
}
|
|
21
|
-
import { Client } from 'contensis-delivery-api';
|
|
22
|
-
declare class LruCache {
|
|
23
|
-
constructor(limit?: number);
|
|
24
|
-
map: {};
|
|
25
|
-
head: any;
|
|
26
|
-
tail: any;
|
|
27
|
-
limit: number;
|
|
28
|
-
size: number;
|
|
29
|
-
get(key: any): any;
|
|
30
|
-
set(key: any, value: any): void;
|
|
31
|
-
setHead(node: any): void;
|
|
32
|
-
remove(key: any): void;
|
|
33
11
|
}
|
|
12
|
+
import { LruCache } from "../../util/LruCache";
|
|
13
|
+
export {};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { ContensisQueryOrderBy, IExpression,
|
|
1
|
+
import { ContensisQueryOrderBy, IExpression, VersionStatus } from 'contensis-core-api';
|
|
2
2
|
import { CustomWhereClause, WeightedSearchField } from '../models/Search';
|
|
3
3
|
import { FieldOperators, FilterExpression } from '../models/Queries';
|
|
4
4
|
export declare const fieldExpression: (field: string | string[], value: any, operator?: FieldOperators, weight?: number, fuzzySearch?: boolean) => IExpression[];
|
|
5
|
-
export declare const contentTypeIdExpression: (contentTypeIds: string[], webpageTemplates?: string[], assetTypes?: string[]) =>
|
|
5
|
+
export declare const contentTypeIdExpression: (contentTypeIds: string[], webpageTemplates?: string[], assetTypes?: string[]) => IExpression[];
|
|
6
6
|
export declare const filterExpressions: (filters: FilterExpression[], isOptional?: boolean) => IExpression[];
|
|
7
|
-
|
|
7
|
+
/** @deprecated since v4 - contentTypeIdExpression produces a simpler more efficient query
|
|
8
|
+
* now and negates the need for supplying `sys.dataFormat` with `sys.contentTypeId` */
|
|
9
|
+
export declare const dataFormatExpression: (contentTypeIds: string[], dataFormat?: string) => import("contensis-core-api").ILogicalExpression[];
|
|
8
10
|
export declare const featuredResultsExpression: ({ contentTypeId, fieldId, fieldValue, }?: {
|
|
9
11
|
contentTypeId?: string | string[];
|
|
10
12
|
fieldId?: string | string[];
|
|
@@ -14,7 +16,7 @@ export declare const languagesExpression: (languages: string[]) => IExpression[]
|
|
|
14
16
|
export declare const includeInSearchExpressions: (webpageTemplates: string[], includeInSearchFields: string[]) => IExpression[];
|
|
15
17
|
export declare const defaultExpressions: (versionStatus: VersionStatus) => IExpression[];
|
|
16
18
|
export declare const includeIdsExpression: (includeIds: string[]) => IExpression[];
|
|
17
|
-
export declare const excludeIdsExpression: (excludeIds: string[]) => ILogicalExpression[];
|
|
19
|
+
export declare const excludeIdsExpression: (excludeIds: string[]) => import("contensis-core-api").ILogicalExpression[];
|
|
18
20
|
export declare const orderByExpression: (orderBy: string[]) => ContensisQueryOrderBy;
|
|
19
21
|
/**
|
|
20
22
|
* Accept HTTP style objects and map them to
|
|
@@ -2,6 +2,8 @@ import { Entry } from 'contensis-delivery-api/lib/models';
|
|
|
2
2
|
import { PagedList, Query } from 'contensis-core-api';
|
|
3
3
|
import { CustomApi } from '../models/Search';
|
|
4
4
|
import { TimedSearchResponse } from '../models/SearchUtil';
|
|
5
|
+
import { SearchParams } from '../models/SearchActions';
|
|
6
|
+
import { CachedSearch } from "../../util/ContensisDeliveryApi";
|
|
5
7
|
export declare function fixFreeTextForElastic(s: string): string;
|
|
6
8
|
/** `convertKeyForAggregation` and `parseKeyForAggregation` exists to prevent an
|
|
7
9
|
* auto-generated aggregation using a reserved keyword because Elasticsearch has a list of
|
|
@@ -17,16 +19,16 @@ export declare function fixFreeTextForElastic(s: string): string;
|
|
|
17
19
|
*/
|
|
18
20
|
export declare const convertKeyForAggregation: (key: string) => string;
|
|
19
21
|
export declare const parseKeyForAggregation: (key: string) => string;
|
|
20
|
-
export declare const
|
|
21
|
-
export declare const timedSearch: (query: Query, linkDepth?: number, projectId?: string,
|
|
22
|
+
export declare const cleanseFieldIdForAggregation: (fieldId: string) => string;
|
|
23
|
+
export declare const timedSearch: (query: Query, linkDepth?: number, projectId?: string, ssr?: {
|
|
24
|
+
api: CachedSearch;
|
|
25
|
+
}) => Promise<null | TimedSearchResponse>;
|
|
22
26
|
export declare const getItemsFromResult: (result?: {
|
|
23
27
|
duration: number;
|
|
24
28
|
payload: PagedList<Entry> | any[];
|
|
25
29
|
}) => Entry[];
|
|
26
30
|
export declare const extractQuotedPhrases: (searchTerm: string) => string[];
|
|
27
|
-
export declare const buildUrl: (route: string, params:
|
|
28
|
-
[key: string]: string;
|
|
29
|
-
}) => string;
|
|
31
|
+
export declare const buildUrl: (route: string, params: SearchParams) => string;
|
|
30
32
|
/**
|
|
31
33
|
* Returns all params from the current route query string or static route
|
|
32
34
|
* Supply static route argument if reading parameters from the route path
|
|
@@ -41,8 +43,8 @@ export declare const routeParams: (staticRoute?: any, location?: {
|
|
|
41
43
|
search: string;
|
|
42
44
|
hash?: string;
|
|
43
45
|
}) => any;
|
|
44
|
-
export declare const callCustomApi: <T>(customApi: CustomApi, filters: {
|
|
45
|
-
|
|
46
|
+
export declare const callCustomApi: <T>(customApi: CustomApi, filters: SearchParams, ssr?: {
|
|
47
|
+
api: CachedSearch;
|
|
46
48
|
}) => Promise<T>;
|
|
47
49
|
export declare const removeEmptyAttributes: (obj: any) => any;
|
|
48
50
|
export declare const toArray: (obj: string | null, seperator?: string) => string[] | null;
|
|
@@ -3,7 +3,7 @@ import { AppState } from '../models/SearchState';
|
|
|
3
3
|
import { Context } from '../models/Enums';
|
|
4
4
|
import { EnsureSearchAction, SetSearchEntriesAction } from '../models/SearchActions';
|
|
5
5
|
type QueryParamsMapperParams = {
|
|
6
|
-
context: Context;
|
|
6
|
+
context: keyof typeof Context | Context;
|
|
7
7
|
facet: string;
|
|
8
8
|
action: EnsureSearchAction | SetSearchEntriesAction;
|
|
9
9
|
state: AppState;
|
|
@@ -14,7 +14,7 @@ type SearchQueryArgs = WithOptional<SearchQueryOptions & {
|
|
|
14
14
|
*/
|
|
15
15
|
export declare const searchQuery: ({ assetTypes, contentTypeIds, customWhere, fields, filters, idFilters, sharedFilters, pageSize, pageIndex, orderBy, searchTerm, versionStatus, webpageTemplates, weightedSearchFields, }: SearchQueryArgs) => Query;
|
|
16
16
|
export declare const appendSearchQueryFilters: (query: Query, idFilters: FilterExpression[]) => void;
|
|
17
|
-
export declare const finalQuery: ({ assetTypes, contentTypeIds, fields, filters, idFilters, sharedFilters, pageSize, pageIndex, orderBy, searchTerm, versionStatus, webpageTemplates, weightedSearchFields, }: SearchQueryArgs, children: Omit<SearchQueryArgs,
|
|
17
|
+
export declare const finalQuery: ({ assetTypes, contentTypeIds, fields, filters, idFilters, sharedFilters, pageSize, pageIndex, orderBy, searchTerm, versionStatus, webpageTemplates, weightedSearchFields, }: SearchQueryArgs, children: Omit<SearchQueryArgs, "pageSize" | "pageIndex" | "versionStatus">[]) => Query;
|
|
18
18
|
/**
|
|
19
19
|
* Create a filter expression from a provided filters configuration object
|
|
20
20
|
* and populate them based on the presence of that key in params, filter
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { Response } from 'express';
|
|
1
|
+
import { Request, Response } from 'express';
|
|
3
2
|
import { ReactNode } from 'react';
|
|
4
3
|
import { Transform, Writable } from 'stream';
|
|
5
4
|
import { ServerStyleSheet } from 'styled-components';
|
|
@@ -11,7 +10,7 @@ import { ServerStyleSheet } from 'styled-components';
|
|
|
11
10
|
* @param response the express Response object
|
|
12
11
|
* @param stream all chunks are piped to this stream to add additional style elements to each streamed chunk
|
|
13
12
|
*/
|
|
14
|
-
export declare const renderStream: (getContextHtml: (isFinal?: boolean) => string, jsx: ReactNode, response: Response, stream: Writable) => void;
|
|
13
|
+
export declare const renderStream: (getContextHtml: (isFinal?: boolean) => string, jsx: ReactNode, request: Request, response: Response, stream: Writable) => void;
|
|
15
14
|
/**
|
|
16
15
|
* Generate and add styled-components CSS to the streamed
|
|
17
16
|
* chunks of rendered HTML via renderToPipeableStream
|
|
@@ -23,4 +22,3 @@ export declare const renderStream: (getContextHtml: (isFinal?: boolean) => strin
|
|
|
23
22
|
* @returns Transform Stream
|
|
24
23
|
*/
|
|
25
24
|
export declare const styledComponentsStream: (sheet: ServerStyleSheet) => Transform;
|
|
26
|
-
export declare const renderToString: () => void;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import express from 'express';
|
|
2
|
+
declare const staticAssets: (app: express.Express, { appRootPath, scripts, startupScriptFilename, staticFolderPath, staticRoutePath, staticRoutePaths, }: {
|
|
2
3
|
appRootPath?: string | undefined;
|
|
3
4
|
scripts?: {
|
|
4
5
|
attributes?: {
|
|
5
6
|
[key: string]: string;
|
|
6
|
-
}
|
|
7
|
-
startup?: string
|
|
7
|
+
};
|
|
8
|
+
startup?: string;
|
|
8
9
|
} | undefined;
|
|
9
10
|
startupScriptFilename?: string | undefined;
|
|
10
11
|
staticFolderPath?: string | undefined;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import 'isomorphic-fetch';
|
|
3
2
|
import { Express } from 'express';
|
|
4
3
|
import http from 'http';
|
|
@@ -9,7 +8,7 @@ type Exporting = {
|
|
|
9
8
|
app: Express;
|
|
10
9
|
apiProxy: typeof deliveryProxy;
|
|
11
10
|
server: http.Server;
|
|
12
|
-
start: (ReactApp: React.ComponentType<any>, config: ServerConfig, ServerFeatures: (app: Express) => void) => void;
|
|
11
|
+
start: (ReactApp: React.ComponentType<any>, config: ServerConfig, ServerFeatures: (app: Express) => void | null | undefined) => void;
|
|
13
12
|
};
|
|
14
13
|
declare const _default: Exporting;
|
|
15
14
|
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RequestHandler } from 'express';
|
|
2
|
+
/**
|
|
3
|
+
* Development proxy for Subsite PoC
|
|
4
|
+
* Catch all routes before they hit CRB handlers
|
|
5
|
+
* and rewrite them to include the subsite base path,
|
|
6
|
+
* this allows us to run the subsite in a subfolder in development
|
|
7
|
+
* In production we will handle this with a path rewrite in the Cloud Dashboard site configuration,
|
|
8
|
+
* @param subsitePath the content base path we will rewrite to
|
|
9
|
+
* @param exceptions an array of path prefixes to ignore when rewriting, useful for ignoring assets that do not live in the subsite base path
|
|
10
|
+
*/
|
|
11
|
+
export declare const subsiteDebugMiddleware: (subsitePath: string, exceptions?: string[]) => RequestHandler;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ChunkExtractor } from '@loadable/server';
|
|
2
2
|
import { ServerConfig } from "../../models";
|
|
3
3
|
export declare const loadableBundleData: ({ stats, templates }: ServerConfig, staticRoutePath: string, build?: string) => {
|
|
4
|
-
stats?: string | null
|
|
4
|
+
stats?: string | null;
|
|
5
5
|
templates?: {
|
|
6
6
|
templateHTML: string;
|
|
7
7
|
templateHTMLStatic: string;
|
|
8
8
|
templateHTMLFragment: string;
|
|
9
|
-
} | null
|
|
9
|
+
} | null;
|
|
10
10
|
};
|
|
11
11
|
type LoadableChunkExtractors = {
|
|
12
12
|
legacy?: ChunkExtractor;
|
|
@@ -16,29 +16,29 @@ type LoadableChunkExtractors = {
|
|
|
16
16
|
export declare const loadableChunkExtractors: () => LoadableChunkExtractors;
|
|
17
17
|
export declare const getBundleData: (config: ServerConfig, staticRoutePath: string) => {
|
|
18
18
|
default: {
|
|
19
|
-
stats?: string | null
|
|
19
|
+
stats?: string | null;
|
|
20
20
|
templates?: {
|
|
21
21
|
templateHTML: string;
|
|
22
22
|
templateHTMLStatic: string;
|
|
23
23
|
templateHTMLFragment: string;
|
|
24
|
-
} | null
|
|
24
|
+
} | null;
|
|
25
25
|
};
|
|
26
26
|
legacy: {
|
|
27
|
-
stats?: string | null
|
|
27
|
+
stats?: string | null;
|
|
28
28
|
templates?: {
|
|
29
29
|
templateHTML: string;
|
|
30
30
|
templateHTMLStatic: string;
|
|
31
31
|
templateHTMLFragment: string;
|
|
32
|
-
} | null
|
|
32
|
+
} | null;
|
|
33
33
|
};
|
|
34
34
|
modern: {
|
|
35
|
-
stats?: string | null
|
|
35
|
+
stats?: string | null;
|
|
36
36
|
templates?: {
|
|
37
37
|
templateHTML: string;
|
|
38
38
|
templateHTMLStatic: string;
|
|
39
39
|
templateHTMLFragment: string;
|
|
40
|
-
} | null
|
|
40
|
+
} | null;
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
|
-
export declare const getBundleTags: (loadableExtractor: LoadableChunkExtractors, scripts: ServerConfig[
|
|
43
|
+
export declare const getBundleTags: (loadableExtractor: LoadableChunkExtractors, scripts: ServerConfig["scripts"], staticRoutePath?: string) => string;
|
|
44
44
|
export {};
|
|
@@ -13,13 +13,14 @@ import { HttpContextValues } from "../../routing/httpContext";
|
|
|
13
13
|
* @param { providers, props, ssrAssets }
|
|
14
14
|
* @returns the final JSX to render decorated with all Provider and App props
|
|
15
15
|
*/
|
|
16
|
-
export declare const ssrJsxProducer: (ReactApp: React.ComponentType<any>, { providers, props,
|
|
16
|
+
export declare const ssrJsxProducer: (ReactApp: React.ComponentType<any>, { providers, props, }: {
|
|
17
17
|
/** Providers enrich the JSX */
|
|
18
18
|
providers: {
|
|
19
19
|
loadable: {
|
|
20
20
|
extractor: ChunkExtractor;
|
|
21
21
|
};
|
|
22
22
|
cookies?: Cookies;
|
|
23
|
+
helmet: Record<string, unknown>;
|
|
23
24
|
redux: typeof reduxStore;
|
|
24
25
|
httpContext: HttpContextValues;
|
|
25
26
|
router: {
|
|
@@ -39,17 +40,4 @@ export declare const ssrJsxProducer: (ReactApp: React.ComponentType<any>, { prov
|
|
|
39
40
|
routes: AppRoutes;
|
|
40
41
|
withEvents: WithEvents;
|
|
41
42
|
};
|
|
42
|
-
/**
|
|
43
|
-
* SSR Assets are passed in here when they become available
|
|
44
|
-
* allowing the ReactApp to control the render for the
|
|
45
|
-
* entire HTML document
|
|
46
|
-
*/
|
|
47
|
-
ssrAssets?: {
|
|
48
|
-
bundleTags?: string;
|
|
49
|
-
htmlAttributes?: string;
|
|
50
|
-
metadata?: string;
|
|
51
|
-
serializedState?: string;
|
|
52
|
-
styleTags?: string;
|
|
53
|
-
title?: string;
|
|
54
|
-
};
|
|
55
43
|
}) => React.JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export default LoginStyled;
|
|
2
|
-
declare const LoginStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never
|
|
2
|
+
declare const LoginStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export default LoginFormStyled;
|
|
2
|
-
declare const LoginFormStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never
|
|
2
|
+
declare const LoginFormStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
@@ -5,5 +5,5 @@ declare function withRegistration(WrappedComponent: any): import("react-redux").
|
|
|
5
5
|
[x: string]: any;
|
|
6
6
|
[x: number]: any;
|
|
7
7
|
context?: import("react").Context<import("react-redux").ReactReduxContextValue<any, import("../../../node_modules/redux").UnknownAction> | null> | undefined;
|
|
8
|
-
store?: import("../../../node_modules/redux").Store
|
|
8
|
+
store?: import("../../../node_modules/redux").Store | undefined;
|
|
9
9
|
}>;
|
|
@@ -4,7 +4,7 @@ import { INodeOperations, NodeGetRootOptions } from 'contensis-delivery-api/lib/
|
|
|
4
4
|
import { DeliveryApi, SSRContext } from './ContensisDeliveryApi';
|
|
5
5
|
import { LruCache } from './LruCache';
|
|
6
6
|
import { CookieObject } from "../user/util/CookieConstants";
|
|
7
|
-
declare class CachedSearch {
|
|
7
|
+
export declare class CachedSearch {
|
|
8
8
|
cache: LruCache;
|
|
9
9
|
cookies?: CookieObject;
|
|
10
10
|
ssr?: SSRContext;
|
|
@@ -20,7 +20,13 @@ declare class CachedSearch {
|
|
|
20
20
|
getChildren(options: Parameters<INodeOperations['getChildren']>[0], project?: string): Promise<import("contensis-delivery-api").Node<import("contensis-delivery-api").Entry>[]>;
|
|
21
21
|
getSiblings(options: Parameters<INodeOperations['getSiblings']>[0], project?: string): Promise<import("contensis-delivery-api").Node<import("contensis-delivery-api").Entry>[]>;
|
|
22
22
|
request<T extends () => Promise<any>>(key: string, execute: T): ReturnType<T>;
|
|
23
|
+
/** Use the cached API for fetch requests */
|
|
24
|
+
fetch(uri: RequestInfo, opts?: RequestInit): Promise<Response>;
|
|
23
25
|
}
|
|
24
26
|
export declare const cachedSearch: CachedSearch;
|
|
27
|
+
/** Create a cached search instance attached to the current environment
|
|
28
|
+
* SSR context and connected to your environment via global variable
|
|
29
|
+
* `DELIVERY_API_CONFIG` */
|
|
30
|
+
export declare const cachedSearchWithContext: (ssr?: SSRContext) => CachedSearch;
|
|
31
|
+
/** @deprecated Use cachedSearchWithContext instead */
|
|
25
32
|
export declare const cachedSearchWithCookies: (ssr?: SSRContext) => CachedSearch;
|
|
26
|
-
export {};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { VersionStatus } from 'contensis-core-api';
|
|
3
|
-
import { Client, Query } from 'contensis-delivery-api';
|
|
4
|
-
import { Config } from 'contensis-delivery-api/lib/models';
|
|
2
|
+
import { Client, Config, Query } from 'contensis-delivery-api';
|
|
5
3
|
import { CookieObject } from "../user/util/CookieConstants";
|
|
6
4
|
import { Request } from 'express';
|
|
7
5
|
import { IncomingHttpHeaders } from 'http';
|
|
@@ -13,7 +11,7 @@ export declare class DeliveryApi {
|
|
|
13
11
|
ssr?: SSRContext;
|
|
14
12
|
constructor(ssr?: SSRContext);
|
|
15
13
|
getClientSideVersionStatus: () => any;
|
|
16
|
-
getServerSideVersionStatus: (request: Request) =>
|
|
14
|
+
getServerSideVersionStatus: (request: Request) => "published" | "latest" | undefined;
|
|
17
15
|
getVersionStatusFromHeaders: (headers: IncomingHttpHeaders) => string | string[] | null;
|
|
18
16
|
getVersionStatusFromHostname: (currentHostname: string) => "published" | "latest";
|
|
19
17
|
search: (query: Query, linkDepth?: number, project?: string) => Promise<import("contensis-core-api").PagedSearchList<import("contensis-delivery-api").Entry>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Request, Response } from 'express';
|
|
2
2
|
import React, { PropsWithChildren } from 'react';
|
|
3
|
-
import { SSRAccessMethod,
|
|
3
|
+
import { SSRAccessMethod, SSRContext as SSRContextType } from "../models";
|
|
4
4
|
/**
|
|
5
5
|
* SSRContextProvider allows us to hold and access request-scoped references
|
|
6
6
|
* throughout the component tree
|
|
@@ -8,11 +8,10 @@ import { SSRAccessMethod, SSRAssets, SSRContext as SSRContextType } from "../mod
|
|
|
8
8
|
* adding this in client side allows consumers to write universal code and use
|
|
9
9
|
* the same helpers and request-scoped refs for api, cookies and redux dispatcher
|
|
10
10
|
* as in SSR */
|
|
11
|
-
export declare const SSRContextProvider: ({ accessMethod, children, request, response,
|
|
11
|
+
export declare const SSRContextProvider: ({ accessMethod, children, request, response, }: PropsWithChildren<{
|
|
12
12
|
accessMethod?: SSRAccessMethod;
|
|
13
13
|
request?: Request;
|
|
14
14
|
response?: Response;
|
|
15
|
-
ssrAssets?: SSRAssets;
|
|
16
15
|
}>) => React.JSX.Element;
|
|
17
16
|
/**
|
|
18
17
|
* Server side usage provides access to request-scoped references throughout the component tree
|
|
@@ -22,19 +21,4 @@ export declare const SSRContextProvider: ({ accessMethod, children, request, res
|
|
|
22
21
|
* @returns SSRContextType
|
|
23
22
|
*/
|
|
24
23
|
export declare const useSSRContext: () => SSRContextType;
|
|
25
|
-
export declare const useDeliveryApi: () =>
|
|
26
|
-
cache: import("./LruCache").LruCache;
|
|
27
|
-
cookies?: import("../user/util/CookieConstants").CookieObject | undefined;
|
|
28
|
-
ssr?: import("./ContensisDeliveryApi").SSRContext | undefined;
|
|
29
|
-
getClient(versionStatus?: import("contensis-core-api").VersionStatus | undefined, project?: string | undefined): import("contensis-delivery-api").Client;
|
|
30
|
-
search(query: import("contensis-core-api").Query, linkDepth?: number, project?: string | undefined): Promise<import("contensis-core-api").PagedSearchList<import("contensis-delivery-api").Entry>>;
|
|
31
|
-
searchUsingPost(query: import("contensis-core-api").Query, linkDepth?: number, project?: string): any;
|
|
32
|
-
get(id: string, linkDepth?: number, versionStatus?: import("contensis-core-api").VersionStatus, project?: string | undefined, fields?: string[] | undefined): Promise<import("contensis-delivery-api").Entry>;
|
|
33
|
-
getContentType(id: string, project?: string | undefined): Promise<import("contensis-core-api").ContentType>;
|
|
34
|
-
getRootNode(options: import("contensis-delivery-api").NodeGetRootOptions, versionStatus?: import("contensis-core-api").VersionStatus, project?: string | undefined): Promise<import("contensis-delivery-api").Node<import("contensis-delivery-api").Entry>>;
|
|
35
|
-
getNode(options: string | import("contensis-delivery-api").NodeGetByIdOptions | import("contensis-delivery-api").NodeGetByPathOptions, project?: string | undefined): Promise<import("contensis-delivery-api").Node<import("contensis-delivery-api").Entry>>;
|
|
36
|
-
getAncestors(options: string | import("contensis-delivery-api").Node<import("contensis-delivery-api").Entry> | import("contensis-delivery-api").NodeGetAncestorsOptions, project?: string | undefined): Promise<import("contensis-delivery-api").Node<import("contensis-delivery-api").Entry>[]>;
|
|
37
|
-
getChildren(options: string | import("contensis-delivery-api").Node<import("contensis-delivery-api").Entry> | import("contensis-delivery-api").NodeGetChildrenOptions, project?: string | undefined): Promise<import("contensis-delivery-api").Node<import("contensis-delivery-api").Entry>[]>;
|
|
38
|
-
getSiblings(options: string | import("contensis-delivery-api").Node<import("contensis-delivery-api").Entry> | import("contensis-delivery-api").NodeGetSiblingOptions, project?: string | undefined): Promise<import("contensis-delivery-api").Node<import("contensis-delivery-api").Entry>[]>;
|
|
39
|
-
request<T extends () => Promise<any>>(key: string, execute: T): ReturnType<T>;
|
|
40
|
-
};
|
|
24
|
+
export declare const useDeliveryApi: () => import("./CachedDeliveryApi").CachedSearch;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** @deprecated ponyfill for useHistory hook in react-router v5 removed in v6 */
|
|
2
|
+
export declare const useHistory: () => {
|
|
3
|
+
push: import("react-router-dom").NavigateFunction;
|
|
4
|
+
replace: import("react-router-dom").NavigateFunction;
|
|
5
|
+
location: import("react-router-dom").Location<any>;
|
|
6
|
+
};
|