Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@knocklabs/react-core

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@knocklabs/react-core - npm Package Compare versions

Comparing version 0.2.9 to 0.2.10

8

CHANGELOG.md
# Changelog
## 0.2.10
### Patch Changes
- 42ba22c: fix: improve typing for react < 18
- Updated dependencies [42ba22c]
- @knocklabs/client@0.10.2
## 0.2.9

@@ -4,0 +12,0 @@

2

dist/cjs/modules/i18n/context/KnockI18nProvider.js

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),t=require("../languages/index.js"),a=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},n=a(c),o=n.default.createContext(t.locales.en);function l({i18n:e=t.locales.en,...r}){return n.default.createElement(o.Provider,{...r,value:e})}exports.I18nContext=o;exports.KnockI18nProvider=l;
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),t=require("../languages/index.js"),a=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},n=a(c),o=n.default.createContext(t.locales.en),l=({i18n:e=t.locales.en,...r})=>n.default.createElement(o.Provider,{...r,value:e});exports.I18nContext=o;exports.KnockI18nProvider=l;
//# sourceMappingURL=KnockI18nProvider.js.map

@@ -1,2 +0,2 @@

"use strict";const I=require("../context/KnockSlackProvider.js"),d=require("react");require("../../i18n/context/KnockI18nProvider.js");const K=require("swr/infinite"),L=require("../../core/context/KnockProvider.js");require("@knocklabs/client");require("date-fns");const N=n=>n&&typeof n=="object"&&"default"in n?n:{default:n},g=N(K),A=1e3,R=200,M="private_channel,public_channel",S="SLACK_CHANNELS";function z(n,c){return n===0?[S,""]:c&&["",null].includes(c.next_cursor)?null:[S,c.next_cursor]}function T({queryOptions:n}){var h,C;const c=L.useKnockClient(),{knockSlackChannelId:x,tenant:E,connectionStatus:a}=I.useKnockSlackClient(),m=t=>c.slack.getChannels({tenant:E,knockChannelId:x,queryOptions:{...n,cursor:t?t[1]:"",limit:(n==null?void 0:n.limitPerPage)||R,types:(n==null?void 0:n.types)||M}}),{data:e,error:i,isLoading:l,isValidating:s,size:u,setSize:f,mutate:P}=g.default(z,m,{initialSize:0}),r=(e==null?void 0:e.length)||0,k=r===0||e&&((h=e[r])==null?void 0:h.next_cursor)&&((C=e[r])==null?void 0:C.next_cursor)!=="",o=d.useMemo(()=>(e??[]).flatMap(t=>t==null?void 0:t.slack_channels).filter(t=>!!t),[e]),_=(n==null?void 0:n.maxCount)||A;return d.useEffect(()=>{a==="connected"&&!i&&k&&!l&&!s&&o.length<_&&f(u+1)},[o.length,f,u,k,l,s,_,i,a]),{data:o,isLoading:l||s,refetch:()=>P()}}module.exports=T;
"use strict";const I=require("../context/KnockSlackProvider.js"),d=require("react");require("../../i18n/context/KnockI18nProvider.js");const K=require("swr/infinite"),L=require("../../core/context/KnockProvider.js");require("@knocklabs/client");require("date-fns");const N=n=>n&&typeof n=="object"&&"default"in n?n:{default:n},g=N(K),A=1e3,R=200,M="private_channel,public_channel",S="SLACK_CHANNELS";function z(n,c){return n===0?[S,""]:c&&["",null].includes(c.next_cursor)?null:[S,c.next_cursor??""]}function T({queryOptions:n}){var h,C;const c=L.useKnockClient(),{knockSlackChannelId:x,tenant:E,connectionStatus:a}=I.useKnockSlackClient(),m=t=>c.slack.getChannels({tenant:E,knockChannelId:x,queryOptions:{...n,cursor:t?t[1]:"",limit:(n==null?void 0:n.limitPerPage)||R,types:(n==null?void 0:n.types)||M}}),{data:e,error:i,isLoading:l,isValidating:s,size:u,setSize:f,mutate:P}=g.default(z,m,{initialSize:0}),r=(e==null?void 0:e.length)||0,k=r===0||e&&((h=e[r])==null?void 0:h.next_cursor)&&((C=e[r])==null?void 0:C.next_cursor)!=="",o=d.useMemo(()=>(e??[]).flatMap(t=>t==null?void 0:t.slack_channels).filter(t=>!!t),[e]),_=(n==null?void 0:n.maxCount)||A;return d.useEffect(()=>{a==="connected"&&!i&&k&&!l&&!s&&o.length<_&&f(u+1)},[o.length,f,u,k,l,s,_,i,a]),{data:o,isLoading:l||s,refetch:()=>P()}}module.exports=T;
//# sourceMappingURL=useSlackChannels.js.map
import Knock, { AuthenticateOptions, LogLevel } from "@knocklabs/client";
import * as React from "react";
import { PropsWithChildren } from "react";
import { I18nContent } from "../../i18n";

@@ -14,8 +15,7 @@ export interface KnockProviderState {

timeBeforeExpirationInMs?: AuthenticateOptions["timeBeforeExpirationInMs"];
children?: React.ReactElement;
i18n?: I18nContent;
logLevel?: LogLevel;
}
export declare const KnockProvider: React.FC<KnockProviderProps>;
export declare const KnockProvider: React.FC<PropsWithChildren<KnockProviderProps>>;
export declare const useKnockClient: () => Knock;
//# sourceMappingURL=KnockProvider.d.ts.map
import Knock, { Feed, FeedClientOptions, FeedStoreState } from "@knocklabs/client";
import * as React from "react";
import { PropsWithChildren } from "react";
import { UseBoundStore } from "zustand";

@@ -13,8 +14,7 @@ import { ColorMode } from "../../core/constants";

feedId: string;
children?: React.ReactElement;
colorMode?: ColorMode;
defaultFeedOptions?: FeedClientOptions;
}
export declare const KnockFeedProvider: React.FC<KnockFeedProviderProps>;
export declare const KnockFeedProvider: React.FC<PropsWithChildren<KnockFeedProviderProps>>;
export declare const useKnockFeed: () => KnockFeedProviderState;
//# sourceMappingURL=KnockFeedProvider.d.ts.map
import React from "react";
import { FunctionComponent, PropsWithChildren } from "react";
import { I18nContent } from "../languages";
export declare const I18nContext: React.Context<I18nContent>;
interface KnockI18nProviderProps {
export interface KnockI18nProviderProps {
i18n?: I18nContent;
children: JSX.Element | undefined;
}
export declare function KnockI18nProvider({ i18n, ...props }: KnockI18nProviderProps): import("react/jsx-runtime").JSX.Element;
export {};
export declare const KnockI18nProvider: FunctionComponent<PropsWithChildren<KnockI18nProviderProps>>;
//# sourceMappingURL=KnockI18nProvider.d.ts.map
import * as React from "react";
import { PropsWithChildren } from "react";
import { ConnectionStatus } from "../hooks/useSlackConnectionStatus";

@@ -16,6 +17,5 @@ export interface KnockSlackProviderState {

tenant: string;
children?: React.ReactElement;
}
export declare const KnockSlackProvider: React.FC<KnockSlackProviderProps>;
export declare const KnockSlackProvider: React.FC<PropsWithChildren<KnockSlackProviderProps>>;
export declare const useKnockSlackClient: () => KnockSlackProviderState;
//# sourceMappingURL=KnockSlackProvider.d.ts.map

@@ -5,3 +5,3 @@ {

"author": "@knocklabs",
"version": "0.2.9",
"version": "0.2.10",
"license": "MIT",

@@ -52,3 +52,3 @@ "main": "dist/cjs/index.js",

"dependencies": {
"@knocklabs/client": "^0.10.1",
"@knocklabs/client": "^0.10.2",
"date-fns": "^3.3.1",

@@ -55,0 +55,0 @@ "swr": "^2.2.5",

@@ -41,3 +41,3 @@ import { SlackChannelQueryOptions, useKnockSlackClient } from "..";

// Next cursor exists so pass it
return [QUERY_KEY, previousPageData.next_cursor];
return [QUERY_KEY, previousPageData.next_cursor ?? ""];
}

@@ -44,0 +44,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc