@hellocoop/react 1.1.0 → 2.0.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.
@@ -1 +1 @@
1
- {"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../src/logout.tsx"],"names":[],"mappings":"AAeA,eAAO,MAAM,cAAc,WAAW,OAAO,MAAM,EAAE,GAAG,CAAC,WAAuB,CAAA;AAEhF,wBAAgB,MAAM,CAAC,MAAM,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAEhD"}
1
+ {"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../src/logout.tsx"],"names":[],"mappings":"AAeA,eAAO,MAAM,cAAc,WAAW,OAAO,MAAM,EAAE,GAAG,CAAC,WAA4B,CAAA;AAErF,wBAAgB,MAAM,CAAC,MAAM,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAEhD"}
package/dist/logout.js CHANGED
@@ -12,7 +12,7 @@ const makeLogoutRoute = (params) => {
12
12
  return logoutRoute.pathname + logoutRoute.search;
13
13
  };
14
14
  const loginRoute = new URL(provider_1.routeConfig.login, "https://example.com"); // hack so we can use URL()
15
- const getLogOutRoute = (params) => provider_1.routeConfig.logout;
15
+ const getLogOutRoute = (params) => makeLogoutRoute(params);
16
16
  exports.getLogOutRoute = getLogOutRoute;
17
17
  function logOut(params) {
18
18
  if (typeof window !== 'undefined')
@@ -5,7 +5,7 @@ export type RouteConfig = {
5
5
  logout: string;
6
6
  };
7
7
  export declare const routeConfig: RouteConfig;
8
- declare const HelloProvider: ({ children, auth, config }: any) => React.JSX.Element;
8
+ declare const HelloProvider: ({ children, status, config }: any) => React.JSX.Element;
9
9
  declare const useHelloProviderContext: () => undefined;
10
10
  export { HelloProvider, useHelloProviderContext };
11
11
  //# sourceMappingURL=provider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAA;AAExD,MAAM,MAAM,WAAW,GAAG;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACjB,CAAA;AACD,eAAO,MAAM,WAAW,EAAE,WAIzB,CAAA;AAKD,QAAA,MAAM,aAAa,+BAAgC,GAAG,sBASrD,CAAA;AAED,QAAA,MAAM,uBAAuB,iBAE5B,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,CAAA"}
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAA;AAExD,MAAM,MAAM,WAAW,GAAG;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACjB,CAAA;AACD,eAAO,MAAM,WAAW,EAAE,WAIzB,CAAA;AAKD,QAAA,MAAM,aAAa,iCAAkC,GAAG,sBASvD,CAAA;AAED,QAAA,MAAM,uBAAuB,iBAE5B,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,CAAA"}
package/dist/provider.js CHANGED
@@ -31,14 +31,14 @@ exports.routeConfig = {
31
31
  logout: '/api/hellocoop?logout=true',
32
32
  };
33
33
  const HelloContext = (0, react_1.createContext)(undefined);
34
- const HelloProvider = ({ children, auth, config }) => {
34
+ const HelloProvider = ({ children, status, config }) => {
35
35
  if (config === null || config === void 0 ? void 0 : config.login)
36
36
  exports.routeConfig.login = config.login;
37
37
  if (config === null || config === void 0 ? void 0 : config.auth)
38
38
  exports.routeConfig.auth = config.auth;
39
39
  if (config === null || config === void 0 ? void 0 : config.logout)
40
40
  exports.routeConfig.logout = config.logout;
41
- return (react_1.default.createElement(HelloContext.Provider, { value: auth }, children));
41
+ return (react_1.default.createElement(HelloContext.Provider, { value: status }, children));
42
42
  };
43
43
  exports.HelloProvider = HelloProvider;
44
44
  const useHelloProviderContext = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hellocoop/react",
3
- "version": "1.1.0",
3
+ "version": "2.0.0",
4
4
  "description": "React SDK for Hellō https://hello.dev",
5
5
  "repository": {
6
6
  "type": "git",