@burdenoff/microfe-bigconsole 2026.1029.4 → 2026.1030.2

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.
@@ -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 };
@@ -1,4 +1,4 @@
1
- import { ActionStyle as ApiActionStyle, ActionType as ApiActionType, HttpMethod as ApiHttpMethod } from '../../generated/wspace-types';
1
+ import { BigConsoleWidgetActionStyle as ApiActionStyle, BigConsoleWidgetActionType as ApiActionType, BigConsoleWidgetHttpMethod as ApiHttpMethod } from '../../generated/wspace-types';
2
2
  import { ActionStyle, ActionType } from '../types';
3
3
  export declare function apiHttpMethod(value: `${ApiHttpMethod}`): ApiHttpMethod;
4
4
  export declare function apiActionType(value: ActionType): ApiActionType;
@@ -1,4 +1,4 @@
1
- import { ActionStyle as e, ActionType as t, HttpMethod as n } from "../../generated/wspace-types.js";
1
+ import { BigConsoleWidgetActionStyle as e, BigConsoleWidgetActionType as t, BigConsoleWidgetHttpMethod as n } from "../../generated/wspace-types.js";
2
2
  //#region src/bigconsole/hooks/mutationInputEnums.ts
3
3
  function r(e) {
4
4
  switch (e) {
@@ -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
- if (l(e)) throw e;
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
  }
@@ -1,6 +1,6 @@
1
1
  import { ListEventLogsDocument as e, RetryEventDeliveryDocument as t } from "../../generated/wspace-operations.js";
2
2
  import { useQueryLifecycle as n } from "./useQueryLifecycle.js";
3
- import { EventStatus as r } from "../../generated/wspace-types.js";
3
+ import { BigConsoleWidgetEventStatus as r } from "../../generated/wspace-types.js";
4
4
  import { useCallback as i, useMemo as a, useRef as o, useState as s } from "react";
5
5
  import { useMutation as c, useQuery as l } from "@apollo/client/react";
6
6
  //#region src/bigconsole/hooks/useEventLogs.ts
@@ -1,6 +1,6 @@
1
1
  import { CreateWidgetActionDocument as e, DeleteWidgetActionDocument as t, GetWidgetActionsDocument as n, ReorderWidgetActionsDocument as r, UpdateWidgetActionDocument as i } from "../../generated/wspace-operations.js";
2
2
  import { useQueryLifecycle as a } from "./useQueryLifecycle.js";
3
- import { ActionType as o } from "../../generated/wspace-types.js";
3
+ import { BigConsoleWidgetActionType as o } from "../../generated/wspace-types.js";
4
4
  import { apiActionStyle as s, apiActionType as c } from "./mutationInputEnums.js";
5
5
  import { useCallback as l, useMemo as u, useState as d } from "react";
6
6
  import { useMutation as f, useQuery as p } from "@apollo/client/react";