@coveo/headless-react 2.1.0 → 2.1.1-pre.9f39543af1
Sign up to get free protection for your applications and to get access to all the features.
package/dist/ssr/common.js
CHANGED
@@ -25,7 +25,7 @@ function buildControllerHook(singletonContext, key) {
|
|
25
25
|
const { state: _, subscribe: __, ...remainder } = controller;
|
26
26
|
return mapObject(remainder, (member) => typeof member === 'function' ? member.bind(controller) : member);
|
27
27
|
}, [ctx]);
|
28
|
-
return { state, methods };
|
28
|
+
return { state, methods };
|
29
29
|
};
|
30
30
|
}
|
31
31
|
export function buildControllerHooks(singletonContext, controllersMap) {
|
package/dist/ssr/common.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/ssr/common.tsx"],"names":[],"mappings":";AAQA,OAAO,EACL,UAAU,EACV,WAAW,EACX,OAAO,GAGR,MAAM,OAAO,CAAC;AACf,OAAO,EAAC,oBAAoB,EAAC,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAC,0BAA0B,EAAC,MAAM,cAAc,CAAC;AACxD,OAAO,EAAkB,UAAU,EAAE,SAAS,EAAC,MAAM,aAAa,CAAC;AAQnE,SAAS,sBAAsB,CAI7B,GAAwC;IAExC,OAAO,QAAQ,IAAI,GAAG,CAAC;AACzB,CAAC;AAED,SAAS,mBAAmB,CAK1B,gBAEC,EACD,GAAS;IAET,OAAO,GAAG,EAAE;QACV,MAAM,GAAG,GAAG,UAAU,CAAC,gBAAgB,CAAC,GAAG,EAAE,CAAC,CAAC;QAC/C,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;YACjB,MAAM,IAAI,0BAA0B,EAAE,CAAC;QACzC,CAAC;QACD,MAAM,SAAS,GAAG,WAAW,CAC3B,CAAC,QAAoB,EAAE,EAAE,CACvB,sBAAsB,CAAC,GAAG,CAAC;YACzB,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC;YAC1C,CAAC,CAAC,GAAG,EAAE,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,gBAAgB,CAAC,GAAG,EAAE,CAAC;QAC1C,OAAO,KAAC,QAAQ,IAAC,KAAK,EAAE,EAAC,MAAM,EAAE,WAAW,EAAC,YAAG,QAAQ,GAAY,CAAC;IACvE,CAAC,CAAC;AACJ,CAAC"}
|
@@ -22,7 +22,7 @@ export declare function defineCommerceEngine<TControllers extends ControllerDefi
|
|
22
22
|
fetchStaticState: import("@coveo/headless/ssr-commerce").FetchStaticState<CommerceEngine, import("@coveo/headless/ssr-commerce").InferControllersMapFromDefinition<TControllers, SolutionType.listing>, import("redux").UnknownAction, import("@coveo/headless/ssr-commerce").InferControllerStaticStateMapFromDefinitionsWithSolutionType<TControllers, SolutionType.listing>, import("@coveo/headless/ssr-commerce").InferControllerPropsMapFromDefinitions<TControllers>>;
|
23
23
|
hydrateStaticState: import("@coveo/headless/ssr-commerce").HydrateStaticState<CommerceEngine, import("@coveo/headless/ssr-commerce").InferControllersMapFromDefinition<TControllers, SolutionType.listing>, import("redux").UnknownAction, import("@coveo/headless/ssr-commerce").InferControllerPropsMapFromDefinitions<TControllers>>;
|
24
24
|
build: import("@coveo/headless/ssr-commerce").Build<CommerceEngine, CommerceEngineOptions, import("@coveo/headless/ssr-commerce").InferControllersMapFromDefinition<TControllers, SolutionType.listing>, import("@coveo/headless/ssr-commerce").InferControllerPropsMapFromDefinitions<TControllers>>;
|
25
|
-
setNavigatorContextProvider: (navigatorContextProvider: import("@coveo/headless/ssr").NavigatorContextProvider) => void;
|
25
|
+
setNavigatorContextProvider: (navigatorContextProvider: import("@coveo/headless/ssr-commerce").NavigatorContextProvider) => void;
|
26
26
|
};
|
27
27
|
searchEngineDefinition: {
|
28
28
|
StaticStateProvider: ({ controllers, children, }: React.PropsWithChildren<{
|
@@ -35,7 +35,7 @@ export declare function defineCommerceEngine<TControllers extends ControllerDefi
|
|
35
35
|
fetchStaticState: import("@coveo/headless/ssr-commerce").FetchStaticState<CommerceEngine, import("@coveo/headless/ssr-commerce").InferControllersMapFromDefinition<TControllers, SolutionType.search>, import("redux").UnknownAction, import("@coveo/headless/ssr-commerce").InferControllerStaticStateMapFromDefinitionsWithSolutionType<TControllers, SolutionType.search>, import("@coveo/headless/ssr-commerce").InferControllerPropsMapFromDefinitions<TControllers>>;
|
36
36
|
hydrateStaticState: import("@coveo/headless/ssr-commerce").HydrateStaticState<CommerceEngine, import("@coveo/headless/ssr-commerce").InferControllersMapFromDefinition<TControllers, SolutionType.search>, import("redux").UnknownAction, import("@coveo/headless/ssr-commerce").InferControllerPropsMapFromDefinitions<TControllers>>;
|
37
37
|
build: import("@coveo/headless/ssr-commerce").Build<CommerceEngine, CommerceEngineOptions, import("@coveo/headless/ssr-commerce").InferControllersMapFromDefinition<TControllers, SolutionType.search>, import("@coveo/headless/ssr-commerce").InferControllerPropsMapFromDefinitions<TControllers>>;
|
38
|
-
setNavigatorContextProvider: (navigatorContextProvider: import("@coveo/headless/ssr").NavigatorContextProvider) => void;
|
38
|
+
setNavigatorContextProvider: (navigatorContextProvider: import("@coveo/headless/ssr-commerce").NavigatorContextProvider) => void;
|
39
39
|
};
|
40
40
|
standaloneEngineDefinition: {
|
41
41
|
StaticStateProvider: ({ controllers, children, }: React.PropsWithChildren<{
|
@@ -48,6 +48,6 @@ export declare function defineCommerceEngine<TControllers extends ControllerDefi
|
|
48
48
|
fetchStaticState: import("@coveo/headless/ssr-commerce").FetchStaticState<CommerceEngine, import("@coveo/headless/ssr-commerce").InferControllersMapFromDefinition<TControllers, SolutionType.standalone>, import("redux").UnknownAction, import("@coveo/headless/ssr-commerce").InferControllerStaticStateMapFromDefinitionsWithSolutionType<TControllers, SolutionType.standalone>, import("@coveo/headless/ssr-commerce").InferControllerPropsMapFromDefinitions<TControllers>>;
|
49
49
|
hydrateStaticState: import("@coveo/headless/ssr-commerce").HydrateStaticState<CommerceEngine, import("@coveo/headless/ssr-commerce").InferControllersMapFromDefinition<TControllers, SolutionType.standalone>, import("redux").UnknownAction, import("@coveo/headless/ssr-commerce").InferControllerPropsMapFromDefinitions<TControllers>>;
|
50
50
|
build: import("@coveo/headless/ssr-commerce").Build<CommerceEngine, CommerceEngineOptions, import("@coveo/headless/ssr-commerce").InferControllersMapFromDefinition<TControllers, SolutionType.standalone>, import("@coveo/headless/ssr-commerce").InferControllerPropsMapFromDefinitions<TControllers>>;
|
51
|
-
setNavigatorContextProvider: (navigatorContextProvider: import("@coveo/headless/ssr").NavigatorContextProvider) => void;
|
51
|
+
setNavigatorContextProvider: (navigatorContextProvider: import("@coveo/headless/ssr-commerce").NavigatorContextProvider) => void;
|
52
52
|
};
|
53
53
|
};
|
@@ -17,7 +17,7 @@ function buildControllerHook(singletonContext, key) {
|
|
17
17
|
: () => { }, [ctx]);
|
18
18
|
const getStaticState = useCallback(() => ctx.controllers[key].state, [ctx]);
|
19
19
|
const state = useSyncMemoizedStore(subscribe, getStaticState);
|
20
|
-
const
|
20
|
+
const methods = useMemo(() => {
|
21
21
|
if (!isHydratedStateContext(ctx)) {
|
22
22
|
return undefined;
|
23
23
|
}
|
@@ -25,7 +25,7 @@ function buildControllerHook(singletonContext, key) {
|
|
25
25
|
const { state: _, subscribe: __, ...remainder } = controller;
|
26
26
|
return mapObject(remainder, (member) => typeof member === 'function' ? member.bind(controller) : member);
|
27
27
|
}, [ctx, key]);
|
28
|
-
return { state,
|
28
|
+
return { state, methods };
|
29
29
|
};
|
30
30
|
}
|
31
31
|
export function buildControllerHooks(singletonContext, controllersMap) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/ssr-commerce/common.tsx"],"names":[],"mappings":";AASA,OAAO,EACL,UAAU,EACV,WAAW,EACX,OAAO,GAGR,MAAM,OAAO,CAAC;AACf,OAAO,EAAC,oBAAoB,EAAC,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAC,0BAA0B,EAAC,MAAM,cAAc,CAAC;AACxD,OAAO,EAAkB,UAAU,EAAE,SAAS,EAAC,MAAM,aAAa,CAAC;AAQnE,SAAS,sBAA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AC1C,OAAO,KAAC,QAAQ,IAAC,KAAK,EAAE,EAAC,MAAM,EAAE,WAAW,EAAC,YAAG,QAAQ,GAAY,CAAC;IACvE,CAAC,CAAC;AACJ,CAAC"}
|
@@ -10,7 +10,7 @@ export type ContextHydratedState<TEngine extends CoreEngineNext, TControllers ex
|
|
10
10
|
export type ContextState<TEngine extends CoreEngineNext, TControllers extends ControllerDefinitionsMap<TEngine, Controller>, TSolutionType extends SolutionType> = ContextStaticState<TEngine, TControllers, TSolutionType> | ContextHydratedState<TEngine, TControllers, TSolutionType>;
|
11
11
|
export type ControllerHook<TController extends Controller> = () => {
|
12
12
|
state: TController['state'];
|
13
|
-
|
13
|
+
methods?: Omit<TController, 'state' | 'subscribe'>;
|
14
14
|
};
|
15
15
|
export type InferControllerHooksMapFromDefinition<TControllers extends ControllerDefinitionsMap<CoreEngineNext, Controller>> = {
|
16
16
|
[K in keyof TControllers as `use${Capitalize<K extends string ? K : never>}`]: ControllerHook<InferControllerFromDefinition<TControllers[K]>>;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@coveo/headless-react",
|
3
|
-
"version": "2.1.
|
3
|
+
"version": "2.1.1-pre.9f39543af1",
|
4
4
|
"description": "React utilities for SSR (Server Side Rendering) with headless",
|
5
5
|
"homepage": "https://docs.coveo.com/en/headless/latest/",
|
6
6
|
"repository": {
|
@@ -34,7 +34,7 @@
|
|
34
34
|
"promote:npm:latest": "npm run-script -w=@coveo/release promote-npm-prod"
|
35
35
|
},
|
36
36
|
"dependencies": {
|
37
|
-
"@coveo/headless": "3.
|
37
|
+
"@coveo/headless": "3.9.0-pre.9f39543af1"
|
38
38
|
},
|
39
39
|
"devDependencies": {
|
40
40
|
"@coveo/release": "1.0.0",
|