@burdenoff/microfe-bigconsole 2026.1029.4 → 2026.1030.1
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/bigconsole/components/dashboard/CreateDashboardDialog.js +450 -413
- package/dist/bigconsole/components/dashboard/QuotaLimitNotice.d.ts +9 -0
- package/dist/bigconsole/components/dashboard/QuotaLimitNotice.js +59 -0
- package/dist/bigconsole/hooks/useDashboardOperations.d.ts +1 -0
- package/dist/bigconsole/hooks/useDashboardOperations.js +1 -2
- package/dist/bigconsole/pages/DashboardsPage.js +391 -390
- package/dist/bigconsole/providers/BigConsoleQuotaProvider.d.ts +13 -0
- package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +55 -49
- package/dist/bigconsole/utils/quota.d.ts +21 -0
- package/dist/bigconsole/utils/quota.js +20 -9
- package/dist/translations/en.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BigConsoleQuotaExhaustedEventDetail } from '../../utils/quota';
|
|
2
|
+
export interface QuotaLimitNoticeProps {
|
|
3
|
+
quota: BigConsoleQuotaExhaustedEventDetail;
|
|
4
|
+
/** Opens the billing page for this quota. Omitted outside the quota provider: no link is shown. */
|
|
5
|
+
onViewBilling?: () => void;
|
|
6
|
+
onDismiss: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const QuotaLimitNotice: import('react').NamedExoticComponent<QuotaLimitNoticeProps>;
|
|
9
|
+
export default QuotaLimitNotice;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { bigConsoleQuotaLimit as e, getBigConsoleQuotaDialogContent as t } from "../../utils/quota.js";
|
|
2
|
+
import { Section as n } from "../common/Section.js";
|
|
3
|
+
import "../common/index.js";
|
|
4
|
+
import { memo as r } from "react";
|
|
5
|
+
import { AlertTriangle as i } from "lucide-react";
|
|
6
|
+
import { Button as a } from "@burdenoff/fe-libs/ui";
|
|
7
|
+
import { useI18n as o } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
8
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
|
+
//#region src/bigconsole/components/dashboard/QuotaLimitNotice.tsx
|
|
10
|
+
var l = r(function({ quota: r, onViewBilling: l, onDismiss: u }) {
|
|
11
|
+
let { t: d } = o(), f = t(r.kind), p = e(r), m = r.kind === "billing-setup";
|
|
12
|
+
return /* @__PURE__ */ s("div", {
|
|
13
|
+
role: "alert",
|
|
14
|
+
"data-testid": "create-dashboard-quota-notice",
|
|
15
|
+
"data-quota-kind": r.kind,
|
|
16
|
+
children: /* @__PURE__ */ c(n, {
|
|
17
|
+
headingLevel: 3,
|
|
18
|
+
emphasis: "standard",
|
|
19
|
+
tone: "warning",
|
|
20
|
+
icon: /* @__PURE__ */ s(i, {
|
|
21
|
+
"aria-hidden": "true",
|
|
22
|
+
className: "h-icon-sm w-icon-sm"
|
|
23
|
+
}),
|
|
24
|
+
title: d(`bigconsole.quota.${r.kind}.title`, f.title),
|
|
25
|
+
description: d(`bigconsole.quota.${r.kind}.message`, f.message),
|
|
26
|
+
children: [p !== null && /* @__PURE__ */ s("p", {
|
|
27
|
+
"data-testid": "create-dashboard-quota-limit",
|
|
28
|
+
style: {
|
|
29
|
+
fontSize: "var(--font-size-body-sm)",
|
|
30
|
+
color: "var(--color-text-secondary)",
|
|
31
|
+
margin: "0 0 var(--space-controlGap) 0"
|
|
32
|
+
},
|
|
33
|
+
children: d("bigconsole.quota.limitDetail", "Your current plan allows {{limit}}.", { limit: p })
|
|
34
|
+
}), /* @__PURE__ */ c("div", {
|
|
35
|
+
style: {
|
|
36
|
+
display: "flex",
|
|
37
|
+
flexWrap: "wrap",
|
|
38
|
+
gap: "var(--space-controlGap)"
|
|
39
|
+
},
|
|
40
|
+
children: [l && /* @__PURE__ */ s(a, {
|
|
41
|
+
type: "button",
|
|
42
|
+
size: "sm",
|
|
43
|
+
onClick: l,
|
|
44
|
+
"data-testid": "create-dashboard-quota-billing",
|
|
45
|
+
children: m ? d("bigconsole.quota.setUpBilling", "Set up billing") : d("bigconsole.quota.viewBilling", "View Billing")
|
|
46
|
+
}), /* @__PURE__ */ s(a, {
|
|
47
|
+
type: "button",
|
|
48
|
+
size: "sm",
|
|
49
|
+
variant: "outline",
|
|
50
|
+
onClick: u,
|
|
51
|
+
"data-testid": "create-dashboard-quota-dismiss",
|
|
52
|
+
children: d("bigconsole.quota.dismiss", "Dismiss")
|
|
53
|
+
})]
|
|
54
|
+
})]
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
//#endregion
|
|
59
|
+
export { l as default };
|
|
@@ -50,6 +50,7 @@ interface DashboardOperationsResult {
|
|
|
50
50
|
currentDashboard: Dashboard | null;
|
|
51
51
|
fetchDashboards: (search?: string) => Promise<void>;
|
|
52
52
|
fetchDashboard: (id: string, options?: FetchDashboardOptions) => Promise<Dashboard | null>;
|
|
53
|
+
/** Resolves `null` when the server answers without a dashboard; rejects on any failure (quota included). */
|
|
53
54
|
createDashboard: (input: CreateDashboardInput) => Promise<Dashboard | null>;
|
|
54
55
|
updateDashboard: (input: UpdateDashboardInput) => Promise<Dashboard | null>;
|
|
55
56
|
deleteDashboard: (id: string) => Promise<boolean>;
|
|
@@ -145,8 +145,7 @@ function b({ skipFetch: g = !1 } = {}) {
|
|
|
145
145
|
}
|
|
146
146
|
return null;
|
|
147
147
|
} catch (e) {
|
|
148
|
-
|
|
149
|
-
return S(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to create dashboard")), null;
|
|
148
|
+
throw l(e) || e instanceof Error ? e : /* @__PURE__ */ Error("Failed to create dashboard");
|
|
150
149
|
} finally {
|
|
151
150
|
b(!1);
|
|
152
151
|
}
|