@trackunit/iris-app-runtime-core-api 1.7.120 → 1.7.125

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/iris-app-runtime-core-api",
3
- "version": "1.7.120",
3
+ "version": "1.7.125",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -8,8 +8,8 @@
8
8
  },
9
9
  "dependencies": {
10
10
  "@graphql-typed-document-node/core": "^3.2.0",
11
- "@trackunit/shared-utils": "1.9.110",
12
- "@trackunit/geo-json-utils": "1.7.110"
11
+ "@trackunit/shared-utils": "1.9.115",
12
+ "@trackunit/geo-json-utils": "1.7.115"
13
13
  },
14
14
  "module": "./index.esm.js",
15
15
  "main": "./index.cjs.js",
@@ -7,7 +7,7 @@ export interface ConfirmationDialogProps {
7
7
  /**
8
8
  * The content to show in the modal.
9
9
  */
10
- message: string | React.ReactNode;
10
+ message: string;
11
11
  /**
12
12
  * The type of the primary action button.
13
13
  * For actions like delete, the primary action button should be primary-danger.
@@ -1,37 +1,20 @@
1
1
  export type ToastColors = "info" | "warning" | "danger" | "success";
2
- export type ToastAction = {
3
- label: string;
4
- onClick?: () => void;
5
- loading?: boolean;
6
- };
7
- export interface Toast {
2
+ /**
3
+ * Serializable toast which is used for sending through penpal
4
+ */
5
+ export interface SimpleToast {
8
6
  id?: string;
9
7
  intent: ToastColors;
10
8
  title: string;
11
9
  description?: string;
12
10
  behavior?: "timed" | "persistent";
13
- link?: {
14
- label: string;
15
- onClick: (event: React.MouseEventHandler<HTMLButtonElement>) => void;
16
- };
17
- primaryAction?: ToastAction;
18
- secondaryAction?: ToastAction;
19
- duration?: number;
20
- isLoading?: boolean;
21
- }
22
- /**
23
- * Serializable toast which is used for sending through penpal
24
- */
25
- export interface PublicToast extends Omit<Toast, "primaryAction" | "secondaryAction"> {
26
11
  primaryAction?: string;
27
12
  secondaryAction?: string;
28
- }
29
- export interface IToastContext {
30
- addToast: (toast: Toast) => Promise<void | "primaryAction" | "secondaryAction">;
31
- removeToast: (id: string) => Promise<void>;
32
- setIsManifestError?: React.Dispatch<React.SetStateAction<boolean>>;
13
+ link?: string;
14
+ duration?: number;
15
+ isLoading?: boolean;
33
16
  }
34
17
  export interface ToastRuntimeApi {
35
- addToast: (toast: PublicToast) => Promise<void | "primaryAction" | "secondaryAction">;
18
+ addToast: (toast: SimpleToast) => Promise<void | "primaryAction" | "secondaryAction" | "link">;
36
19
  removeToast: (id: string) => Promise<void>;
37
20
  }