@trackunit/react-core-contexts-api 0.0.45 → 0.0.48

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 CHANGED
@@ -3,12 +3,12 @@ The `@trackunit/react-core-contexts-api` package is a small package containing r
3
3
 
4
4
  Trackunit Iris Apps are used by external developers to integrate custom functionality into [the Trackunit Manager platform](https://www.trackunit.com/services/manager/).
5
5
 
6
- For a full guide on Iris App Development, please visit our [Developer Hub](https://developers.trackunit.com/)
6
+ For more info and a full guide on Iris App SDK Development, please visit our [Developer Hub](https://developers.trackunit.com/).
7
7
  ## Basic Usage
8
8
  This package is not meant for isolated usage but is a part of the [`@trackunit/iris-app`](https://www.npmjs.com/package/@trackunit/iris-app) package.
9
9
 
10
10
  ## Trackunit
11
- This package was developed by Trackunit ApS.
11
+ This package was developed by Trackunit ApS.
12
12
  Trackunit is the leading SaaS-based IoT solution for the construction industry, offering an ecosystem of hardware, fleet management software & telematics.
13
13
 
14
14
  ![The Trackunit logo](https://trackunit.com/wp-content/uploads/2022/03/top-logo.svg)
package/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from "./currentUserContext";
2
2
  export * from "./developerSettingsContext";
3
3
  export * from "./environmentContext";
4
+ export * from "./toastContext";
4
5
  export * from "./tokenContext";
5
6
  export * from "./userSubscriptionContext";
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@trackunit/react-core-contexts-api",
3
- "version": "0.0.45",
3
+ "version": "0.0.48",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
- "license": "MIT",
5
+ "license": "UNLICENSED",
6
6
  "module": "./index.js",
7
7
  "main": "./index.js",
8
8
  "type": "module",
@@ -0,0 +1,21 @@
1
+ /// <reference types="react" />
2
+ export declare type AlertIntent = "info" | "warning" | "danger" | "success";
3
+ export declare type AlertAction = {
4
+ label: string;
5
+ onClick: () => void;
6
+ loading?: boolean;
7
+ };
8
+ export interface Toast {
9
+ dedupeKey?: string;
10
+ intent: AlertIntent;
11
+ title: string;
12
+ description?: string;
13
+ primaryAction?: AlertAction;
14
+ secondaryAction?: AlertAction;
15
+ duration?: number;
16
+ }
17
+ export declare type AddToast = (toast: Toast) => void;
18
+ export interface IToastContext {
19
+ addToast: AddToast;
20
+ setIsManifestError?: React.Dispatch<React.SetStateAction<boolean>>;
21
+ }