@trackunit/react-core-hooks 0.0.1-alpha-afcc978985.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 +15 -0
- package/developerSettings/DeveloperSettingsProvider.d.ts +10 -0
- package/environment/EnvironmentContextProvider.d.ts +9 -0
- package/index.d.ts +10 -0
- package/index.js +2168 -0
- package/package.json +18 -0
- package/runtimes/navigation/index.d.ts +1 -0
- package/runtimes/navigation/useDeeplink.d.ts +4 -0
- package/runtimes/navigation/useURLSynchronization.d.ts +5 -0
- package/runtimes/useAssetRuntime.d.ts +10 -0
- package/runtimes/useCustomFieldRuntime.d.ts +10 -0
- package/runtimes/useRestRuntime.d.ts +10 -0
- package/subscription/UserSubscriptionProvider.d.ts +9 -0
- package/test/config/jest.setup.d.ts +1 -0
- package/toast/ToastProvider.d.ts +8 -0
- package/token/TokenProvider.d.ts +9 -0
- package/user/CurrentUserProvider.d.ts +9 -0
package/package.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@trackunit/react-core-hooks",
|
|
3
|
+
"version": "0.0.1-alpha-afcc978985.0",
|
|
4
|
+
"repository": "https://github.com/Trackunit/manager",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
|
+
"module": "./index.js",
|
|
7
|
+
"main": "./index.js",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"types": "./index.d.ts",
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@trackunit/react-core-contexts-api": "0.0.1-alpha-afcc978985.0",
|
|
12
|
+
"launchdarkly-react-client-sdk": "^2.27.0",
|
|
13
|
+
"react": "17.0.2",
|
|
14
|
+
"@trackunit/iris-app-runtime-core": "0.0.1-alpha-afcc978985.0",
|
|
15
|
+
"react-router-dom": "6.4.1"
|
|
16
|
+
},
|
|
17
|
+
"peerDependencies": {}
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./useURLSynchronization";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IAssetRuntime } from "@trackunit/iris-app-runtime-core";
|
|
2
|
+
interface UseAssetRuntime extends IAssetRuntime {
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* A hook to expose asset runtime for React components
|
|
6
|
+
*
|
|
7
|
+
* @returns {UseAssetRuntime} assetRuntime
|
|
8
|
+
*/
|
|
9
|
+
export declare const useAssetRuntime: () => UseAssetRuntime;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ICustomFieldRuntime } from "@trackunit/iris-app-runtime-core";
|
|
2
|
+
interface UseCustomFieldRuntime extends ICustomFieldRuntime {
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* A hook to expose custom field runtime methods
|
|
6
|
+
*
|
|
7
|
+
* @returns {UseCustomFieldRuntime} CustomFieldRuntime
|
|
8
|
+
*/
|
|
9
|
+
export declare const useCustomFieldRuntime: () => UseCustomFieldRuntime;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IRestRuntime } from "@trackunit/iris-app-runtime-core";
|
|
2
|
+
interface UseRestRuntime extends IRestRuntime {
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* A hook to expose rest runtime to be used in React components
|
|
6
|
+
*
|
|
7
|
+
* @returns {UseRestRuntime} a RestRuntime
|
|
8
|
+
*/
|
|
9
|
+
export declare const useRestRuntime: () => UseRestRuntime;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IUserSubscriptionContext } from "@trackunit/react-core-contexts-api";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
interface IProps {
|
|
4
|
+
value: IUserSubscriptionContext;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const UserSubscriptionProvider: (props: IProps) => JSX.Element;
|
|
8
|
+
export declare const useUserSubscription: () => IUserSubscriptionContext;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IToastContext } from "@trackunit/react-core-contexts-api";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export interface ContextProviderProps {
|
|
4
|
+
value: IToastContext;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const ToastProvider: (props: ContextProviderProps) => JSX.Element;
|
|
8
|
+
export declare const useToast: () => IToastContext;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ITokenContext } from "@trackunit/react-core-contexts-api";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export declare const useToken: () => ITokenContext;
|
|
4
|
+
interface IProps {
|
|
5
|
+
value: ITokenContext;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const TokenProvider: (props: IProps) => JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ICurrentUserContext } from "@trackunit/react-core-contexts-api";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
interface Props {
|
|
4
|
+
value: ICurrentUserContext;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const CurrentUserProvider: (props: Props) => JSX.Element;
|
|
8
|
+
export declare const useCurrentUser: () => ICurrentUserContext;
|
|
9
|
+
export {};
|