@trackunit/iris-app-runtime-core 1.8.120 → 1.8.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/index.cjs.js +2 -12
- package/index.esm.js +2 -12
- package/package.json +2 -2
- package/src/ToastRuntime.d.ts +2 -2
package/index.cjs.js
CHANGED
|
@@ -561,21 +561,11 @@ const TimeRangeRuntime = {
|
|
|
561
561
|
const ToastRuntime = {
|
|
562
562
|
async addToast(toast) {
|
|
563
563
|
const api = await getHostConnector();
|
|
564
|
-
|
|
565
|
-
...toast,
|
|
566
|
-
primaryAction: toast.primaryAction?.label,
|
|
567
|
-
secondaryAction: toast.secondaryAction?.label,
|
|
568
|
-
});
|
|
569
|
-
switch (response) {
|
|
570
|
-
case "primaryAction":
|
|
571
|
-
case "secondaryAction":
|
|
572
|
-
toast[response]?.onClick?.();
|
|
573
|
-
break;
|
|
574
|
-
}
|
|
564
|
+
return await api.addToast(toast);
|
|
575
565
|
},
|
|
576
566
|
async removeToast(id) {
|
|
577
567
|
const api = await getHostConnector();
|
|
578
|
-
await api.removeToast(id);
|
|
568
|
+
return await api.removeToast(id);
|
|
579
569
|
},
|
|
580
570
|
};
|
|
581
571
|
|
package/index.esm.js
CHANGED
|
@@ -559,21 +559,11 @@ const TimeRangeRuntime = {
|
|
|
559
559
|
const ToastRuntime = {
|
|
560
560
|
async addToast(toast) {
|
|
561
561
|
const api = await getHostConnector();
|
|
562
|
-
|
|
563
|
-
...toast,
|
|
564
|
-
primaryAction: toast.primaryAction?.label,
|
|
565
|
-
secondaryAction: toast.secondaryAction?.label,
|
|
566
|
-
});
|
|
567
|
-
switch (response) {
|
|
568
|
-
case "primaryAction":
|
|
569
|
-
case "secondaryAction":
|
|
570
|
-
toast[response]?.onClick?.();
|
|
571
|
-
break;
|
|
572
|
-
}
|
|
562
|
+
return await api.addToast(toast);
|
|
573
563
|
},
|
|
574
564
|
async removeToast(id) {
|
|
575
565
|
const api = await getHostConnector();
|
|
576
|
-
await api.removeToast(id);
|
|
566
|
+
return await api.removeToast(id);
|
|
577
567
|
},
|
|
578
568
|
};
|
|
579
569
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/iris-app-runtime-core",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.125",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"penpal": "^6.2.2",
|
|
11
|
-
"@trackunit/iris-app-runtime-core-api": "1.7.
|
|
11
|
+
"@trackunit/iris-app-runtime-core-api": "1.7.125"
|
|
12
12
|
},
|
|
13
13
|
"module": "./index.esm.js",
|
|
14
14
|
"main": "./index.cjs.js",
|
package/src/ToastRuntime.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SimpleToast } from "@trackunit/iris-app-runtime-core-api";
|
|
2
2
|
export declare const ToastRuntime: {
|
|
3
|
-
addToast(toast:
|
|
3
|
+
addToast(toast: SimpleToast): Promise<void | "primaryAction" | "secondaryAction" | "link">;
|
|
4
4
|
removeToast(id: string): Promise<void>;
|
|
5
5
|
};
|