@metaboliccode-dev/widget 0.2.78 → 0.2.79
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
CHANGED
|
@@ -4651,25 +4651,25 @@ function Ft() {
|
|
|
4651
4651
|
}
|
|
4652
4652
|
const A1 = xS.Provider;
|
|
4653
4653
|
function LS({ label: A = "Export All Reports" }) {
|
|
4654
|
-
const { onExportReports: p } = Ft(), [
|
|
4655
|
-
return
|
|
4654
|
+
const { onExportReports: p, exportReportsDisabled: l = !1 } = Ft(), [S, q] = E(!1), a = p;
|
|
4655
|
+
return a ? /* @__PURE__ */ U(
|
|
4656
4656
|
X,
|
|
4657
4657
|
{
|
|
4658
4658
|
type: "button",
|
|
4659
4659
|
variant: "default",
|
|
4660
4660
|
className: xp,
|
|
4661
4661
|
onClick: async () => {
|
|
4662
|
-
if (!l)
|
|
4662
|
+
if (!(S || l))
|
|
4663
4663
|
try {
|
|
4664
|
-
|
|
4664
|
+
q(!0), await a();
|
|
4665
4665
|
} finally {
|
|
4666
|
-
|
|
4666
|
+
q(!1);
|
|
4667
4667
|
}
|
|
4668
4668
|
},
|
|
4669
|
-
disabled: l,
|
|
4669
|
+
disabled: S || l,
|
|
4670
4670
|
children: [
|
|
4671
4671
|
/* @__PURE__ */ t(Lt, { className: "size-4 shrink-0" }),
|
|
4672
|
-
|
|
4672
|
+
S ? "Exporting..." : A
|
|
4673
4673
|
]
|
|
4674
4674
|
}
|
|
4675
4675
|
) : null;
|
|
@@ -11067,8 +11067,8 @@ function Hq({
|
|
|
11067
11067
|
),
|
|
11068
11068
|
[S, w.availableReportPages]
|
|
11069
11069
|
), JA = L(async () => {
|
|
11070
|
-
Lc() || await w.resolvedExportReports();
|
|
11071
|
-
}, [w.resolvedExportReports]), oA = Q(
|
|
11070
|
+
S !== "full" || Lc() || await w.resolvedExportReports();
|
|
11071
|
+
}, [S, w.resolvedExportReports]), oA = Q(
|
|
11072
11072
|
() => new Set(nA.filter((qA) => qA.disabled).map((qA) => qA.id)),
|
|
11073
11073
|
[nA]
|
|
11074
11074
|
);
|
|
@@ -11142,9 +11142,10 @@ function Hq({
|
|
|
11142
11142
|
), N = Q(
|
|
11143
11143
|
() => ({
|
|
11144
11144
|
onExportReports: JA,
|
|
11145
|
+
exportReportsDisabled: S !== "full",
|
|
11145
11146
|
onNavigateToNavItem: OA
|
|
11146
11147
|
}),
|
|
11147
|
-
[OA, JA]
|
|
11148
|
+
[OA, JA, S]
|
|
11148
11149
|
);
|
|
11149
11150
|
return /* @__PURE__ */ t(Nr, { value: w.reportPagesApiBaseUrl, children: /* @__PURE__ */ t(A1, { value: N, children: /* @__PURE__ */ t(kn, { value: A == null ? void 0 : A.suggestedProducts, children: /* @__PURE__ */ t(
|
|
11150
11151
|
Jc,
|