@devtron-labs/devtron-fe-common-lib 4.0.5 → 4.0.6
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/dist/index.js +16 -14
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -18632,22 +18632,24 @@ var VE = class {
|
|
|
18632
18632
|
]
|
|
18633
18633
|
})
|
|
18634
18634
|
}), vD = ({ apiPromise: e, fileName: t, triggerElementConfig: n, disabled: r, modalConfig: i, headers: a, downloadRequestId: o }) => {
|
|
18635
|
-
let s = q(null), c = q(
|
|
18635
|
+
let s = q(null), c = q(null), [l, u] = J([]), [d, f] = J(null), [p, m] = J(!1), [h, g] = J(null), [_, v] = J(!1), y = async () => {
|
|
18636
18636
|
if (!r) try {
|
|
18637
|
-
m(!0), g(null), u(await e({ signal: c.current.signal })),
|
|
18637
|
+
m(!0), g(null), u(await e({ signal: c.current.signal })), v(!0);
|
|
18638
18638
|
} catch (e) {
|
|
18639
18639
|
Mr(e) || (Ga(e), g(e));
|
|
18640
18640
|
} finally {
|
|
18641
18641
|
c.current = new AbortController(), m(!1);
|
|
18642
18642
|
}
|
|
18643
|
-
},
|
|
18644
|
-
i?.hideDialog || f(i ? "custom" : "default"), (!i || i.hideDialog) && await
|
|
18643
|
+
}, b = async () => {
|
|
18644
|
+
i?.hideDialog || f(i ? "custom" : "default"), (!i || i.hideDialog) && await y();
|
|
18645
18645
|
};
|
|
18646
|
-
return G(() => () => {
|
|
18647
|
-
c.current
|
|
18648
|
-
}, []), G(() => {
|
|
18649
|
-
ai(o) ||
|
|
18650
|
-
}, [o]),
|
|
18646
|
+
return G(() => (c.current = new AbortController(), () => {
|
|
18647
|
+
c.current?.abort();
|
|
18648
|
+
}), []), G(() => {
|
|
18649
|
+
ai(o) || b();
|
|
18650
|
+
}, [o]), G(() => {
|
|
18651
|
+
_ && (s.current?.link?.click(), v(!1));
|
|
18652
|
+
}, [_]), /* @__PURE__ */ (0, Y.jsxs)("div", { children: [
|
|
18651
18653
|
!n || n.showOnlyIcon ? /* @__PURE__ */ (0, Y.jsx)(N, {
|
|
18652
18654
|
...n?.showOnlyIcon ? {
|
|
18653
18655
|
icon: /* @__PURE__ */ (0, Y.jsx)(I, {
|
|
@@ -18663,7 +18665,7 @@ var VE = class {
|
|
|
18663
18665
|
color: null
|
|
18664
18666
|
})
|
|
18665
18667
|
},
|
|
18666
|
-
onClick:
|
|
18668
|
+
onClick: b,
|
|
18667
18669
|
size: V.medium,
|
|
18668
18670
|
variant: R.secondary,
|
|
18669
18671
|
dataTestId: "export-csv-button",
|
|
@@ -18673,11 +18675,11 @@ var VE = class {
|
|
|
18673
18675
|
tooltipProps: { content: "Nothing to export" }
|
|
18674
18676
|
}) : n.buttonProps ? /* @__PURE__ */ (0, Y.jsx)(N, {
|
|
18675
18677
|
...n.buttonProps,
|
|
18676
|
-
onClick:
|
|
18678
|
+
onClick: b
|
|
18677
18679
|
}) : n.customButton ? /* @__PURE__ */ (0, Y.jsx)("button", {
|
|
18678
18680
|
"data-testid": "export-csv-button",
|
|
18679
18681
|
type: "button",
|
|
18680
|
-
onClick:
|
|
18682
|
+
onClick: b,
|
|
18681
18683
|
disabled: r,
|
|
18682
18684
|
className: `dc__transparent ${n.customButton.className}`,
|
|
18683
18685
|
children: n.customButton.content
|
|
@@ -18694,11 +18696,11 @@ var VE = class {
|
|
|
18694
18696
|
f(null);
|
|
18695
18697
|
return;
|
|
18696
18698
|
}
|
|
18697
|
-
f("default"), await
|
|
18699
|
+
f("default"), await y();
|
|
18698
18700
|
}) : /* @__PURE__ */ (0, Y.jsx)(_D, {
|
|
18699
18701
|
exportDataError: h,
|
|
18700
18702
|
isLoading: p,
|
|
18701
|
-
initiateDownload:
|
|
18703
|
+
initiateDownload: y,
|
|
18702
18704
|
handleCancelRequest: () => {
|
|
18703
18705
|
c.current.abort(), c.current = new AbortController(), f(null), m(!1);
|
|
18704
18706
|
}
|