@coveo/headless-react 2.1.1-pre.ae9505929e → 2.1.1-pre.c8bb175820

Sign up to get free protection for your applications and to get access to all the features.
@@ -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 }; // TODO: KIT-3716 - Rename methods to controllers
29
29
  };
30
30
  }
31
31
  export function buildControllerHooks(singletonContext, controllersMap) {
@@ -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,GAAE,CAAC,EACd,CAAC,GAAG,CAAC,CACN,CAAC;QACF,MAAM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W,EACX,QAAQ,GAIR,EAAE,EAAE;QACJ,MAAM,EAAC,QAAQ,EAAC,GAAG,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"}
@@ -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 methods = useMemo(() => {
20
+ const controller = 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, methods };
28
+ return { state, controller };
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,sBAAsB,CAK7B,GAAuD;IAEvD,OAAO,QAAQ,IAAI,GAAG,CAAC;AACzB,CAAC;AAED,SAAS,mBAAmB,CAM1B,gBAEC,EACD,GAAS;IAET,OAAO,GAAG,EAAE;QACV,MAAM,GAAG,GAAG,UAAU,CAAC,gBAAgB,CAAC,GAAG,EAA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,CAAC;IAC9D,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,wBAAwB,CAKtC,gBAEC;IAED,OAAO,CAAC,EACN,WAAW,EACX,QAAQ,GAMR,EAAE,EAAE;QACJ,MAAM,EAAC,QAAQ,EAAC,GAAG,gBAAgB,CAAC,GAAG,EAAE,CAAC;QAC1C,OAAO,KAAC,QAAQ,IAAC,KAAK,EAAE,EAAC,WAAW,EAAC,YAAG,QAAQ,GAAY,CAAC;IAC/D,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,0BAA0B,CAKxC,gBAEC;IAED,OAAO,CAAC,EACN,MAAM,EACN,WAAW,EACX,QAAQ,GAIR,EAAE,EAAE;QACJ,MAAM,EAAC,QAAQ,EAAC,GAAG,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"}
@@ -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
- methods?: Omit<TController, 'state' | 'subscribe'>;
13
+ controller?: 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.1-pre.ae9505929e",
3
+ "version": "2.1.1-pre.c8bb175820",
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.9.0-pre.ae9505929e"
37
+ "@coveo/headless": "3.8.2-pre.c8bb175820"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@coveo/release": "1.0.0",