@trackunit/iris-app-runtime-core 0.3.202 → 0.3.206
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 +8 -14
- package/index.esm.js +8 -14
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -404,25 +404,19 @@ const ThemeCssRuntime = {
|
|
|
404
404
|
|
|
405
405
|
const ToastRuntime = {
|
|
406
406
|
async addToast(toast) {
|
|
407
|
-
var _a, _b;
|
|
407
|
+
var _a, _b, _c, _d;
|
|
408
408
|
const api = await getHostConnector();
|
|
409
|
-
|
|
410
|
-
.addToast({
|
|
409
|
+
const response = await api.addToast({
|
|
411
410
|
...toast,
|
|
412
411
|
primaryAction: (_a = toast.primaryAction) === null || _a === void 0 ? void 0 : _a.label,
|
|
413
412
|
secondaryAction: (_b = toast.secondaryAction) === null || _b === void 0 ? void 0 : _b.label,
|
|
414
|
-
})
|
|
415
|
-
.then(res => {
|
|
416
|
-
var _a, _b, _c, _d;
|
|
417
|
-
switch (res) {
|
|
418
|
-
case "primaryAction":
|
|
419
|
-
(_b = (_a = toast.primaryAction) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
420
|
-
break;
|
|
421
|
-
case "secondaryAction":
|
|
422
|
-
(_d = (_c = toast.secondaryAction) === null || _c === void 0 ? void 0 : _c.onClick) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
423
|
-
break;
|
|
424
|
-
}
|
|
425
413
|
});
|
|
414
|
+
switch (response) {
|
|
415
|
+
case "primaryAction":
|
|
416
|
+
case "secondaryAction":
|
|
417
|
+
(_d = (_c = toast[response]) === null || _c === void 0 ? void 0 : _c.onClick) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
418
|
+
break;
|
|
419
|
+
}
|
|
426
420
|
},
|
|
427
421
|
};
|
|
428
422
|
|
package/index.esm.js
CHANGED
|
@@ -402,25 +402,19 @@ const ThemeCssRuntime = {
|
|
|
402
402
|
|
|
403
403
|
const ToastRuntime = {
|
|
404
404
|
async addToast(toast) {
|
|
405
|
-
var _a, _b;
|
|
405
|
+
var _a, _b, _c, _d;
|
|
406
406
|
const api = await getHostConnector();
|
|
407
|
-
|
|
408
|
-
.addToast({
|
|
407
|
+
const response = await api.addToast({
|
|
409
408
|
...toast,
|
|
410
409
|
primaryAction: (_a = toast.primaryAction) === null || _a === void 0 ? void 0 : _a.label,
|
|
411
410
|
secondaryAction: (_b = toast.secondaryAction) === null || _b === void 0 ? void 0 : _b.label,
|
|
412
|
-
})
|
|
413
|
-
.then(res => {
|
|
414
|
-
var _a, _b, _c, _d;
|
|
415
|
-
switch (res) {
|
|
416
|
-
case "primaryAction":
|
|
417
|
-
(_b = (_a = toast.primaryAction) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
418
|
-
break;
|
|
419
|
-
case "secondaryAction":
|
|
420
|
-
(_d = (_c = toast.secondaryAction) === null || _c === void 0 ? void 0 : _c.onClick) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
421
|
-
break;
|
|
422
|
-
}
|
|
423
411
|
});
|
|
412
|
+
switch (response) {
|
|
413
|
+
case "primaryAction":
|
|
414
|
+
case "secondaryAction":
|
|
415
|
+
(_d = (_c = toast[response]) === null || _c === void 0 ? void 0 : _c.onClick) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
416
|
+
break;
|
|
417
|
+
}
|
|
424
418
|
},
|
|
425
419
|
};
|
|
426
420
|
|