@burdenoff/microfe-bigconsole 2026.1029.3 → 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.
@@ -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 };
@@ -2,7 +2,7 @@ import "../../generated/global-operations.js";
2
2
  import { gql as e } from "@apollo/client";
3
3
  //#region src/bigconsole/graphql/storeTemplates.ts
4
4
  var t = e`
5
- mutation ImportDashboardTemplate($input: ImportDashboardTemplateInput!) {
5
+ mutation ImportDashboardTemplate($input: BigConsoleImportDashboardTemplateInput!) {
6
6
  importDashboardTemplate(input: $input) {
7
7
  success
8
8
  errorMessage
@@ -1,9 +1,10 @@
1
1
  import { GetLegacyWidgetTypesDocument as e, GetWidgetTypesDocument as t } from "../../generated/wspace-operations.js";
2
2
  //#region src/bigconsole/graphql/widgetCapabilities.ts
3
- function n(e) {
4
- return e instanceof Error && e.message.includes("Cannot query field \"federationType\" on type \"WidgetTypeInfo\"");
3
+ var n = /Cannot query field "federationType" on type "(?:BigConsole)?WidgetTypeInfo"/;
4
+ function r(e) {
5
+ return e instanceof Error && n.test(e.message);
5
6
  }
6
- async function r(r, i) {
7
+ async function i(n, i) {
7
8
  let a = {
8
9
  fetchPolicy: "no-cache",
9
10
  errorPolicy: "none",
@@ -14,15 +15,15 @@ async function r(r, i) {
14
15
  }
15
16
  };
16
17
  try {
17
- let e = await r.query({
18
+ let e = await n.query({
18
19
  query: t,
19
20
  ...a
20
21
  });
21
22
  if (!e.data) throw Error("Widget catalog response is missing.");
22
23
  return e.data;
23
24
  } catch (t) {
24
- if (!n(t)) throw t;
25
- let i = await r.query({
25
+ if (!r(t)) throw t;
26
+ let i = await n.query({
26
27
  query: e,
27
28
  ...a
28
29
  });
@@ -34,4 +35,4 @@ async function r(r, i) {
34
35
  }
35
36
  }
36
37
  //#endregion
37
- export { r as loadNativeWidgetCatalog };
38
+ export { i as loadNativeWidgetCatalog };
@@ -1,8 +1,8 @@
1
- import { DashboardEmbedTheme } from '../../generated/wspace-types';
1
+ import { BigConsoleDashboardEmbedTheme } from '../../generated/wspace-types';
2
2
  import { EmbedThemeMode } from '../components/embed/types';
3
3
  export type EmbedPolicyStatus = 'DRAFT' | 'ACTIVE' | 'NEEDS_REVIEW' | 'BROKEN' | 'REVOKED' | 'EXPIRED';
4
4
  /**
5
- * Owner-facing color mode (BOFF-5735); maps to the backend {@link DashboardEmbedTheme}
5
+ * Owner-facing color mode (BOFF-5735); maps to the backend {@link BigConsoleDashboardEmbedTheme}
6
6
  * enum. Same shape as the render-model's {@link EmbedThemeMode} — aliased to avoid a
7
7
  * duplicate union.
8
8
  */
@@ -28,7 +28,7 @@ export interface DashboardEmbedPolicy {
28
28
  expiresAt?: string | null;
29
29
  sessionTtlSeconds: number;
30
30
  contentReviewState: string;
31
- presentationTheme: DashboardEmbedTheme;
31
+ presentationTheme: BigConsoleDashboardEmbedTheme;
32
32
  showDashboardTitle: boolean;
33
33
  activePublicationId?: string | null;
34
34
  locatorPublicId?: string | null;
@@ -1,5 +1,5 @@
1
1
  import { CreateDashboardEmbedPolicyDocument as e, ListDashboardEmbedPoliciesDocument as t, PublishDashboardEmbedPolicyDocument as n, RevokeDashboardEmbedPolicyDocument as r, RotateDashboardEmbedPolicyDocument as i, UpdateDashboardEmbedPolicyDocument as a } from "../../generated/wspace-operations.js";
2
- import { DashboardEmbedTheme as o } from "../../generated/wspace-types.js";
2
+ import { BigConsoleDashboardEmbedTheme as o } from "../../generated/wspace-types.js";
3
3
  import { useCallback as s, useState as c } from "react";
4
4
  import { useApolloClient as l } from "@apollo/client/react";
5
5
  //#region src/bigconsole/hooks/useDashboardEmbedPolicy.ts
@@ -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
  }
@@ -37,7 +37,7 @@ function c(c, l = {}) {
37
37
  let n = t?.refreshWidgetData;
38
38
  n && e.modify({
39
39
  id: e.identify({
40
- __typename: "Widget",
40
+ __typename: "BigConsoleWidget",
41
41
  id: c
42
42
  }),
43
43
  fields: {