@burdenoff/microfe-bigconsole 2026.1103.3 → 2026.1103.4

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.
@@ -1,55 +1,67 @@
1
1
  import e from "../store/drilldownStore.js";
2
- import { SECTION_FOCUS_RING as t } from "./common/sectionStyles.js";
2
+ import { GlobalFilterFieldsFragmentDoc as t } from "../../generated/wspace-operations.js";
3
+ import { SECTION_FOCUS_RING as n } from "./common/sectionStyles.js";
3
4
  import "./common/index.js";
4
- import { getVisibleDrilldownParams as n } from "../utils/drilldownParams.js";
5
- import { memo as r, useCallback as i, useRef as a } from "react";
6
- import { ResponsiveDialog as o, ResponsiveDialogContent as s, ResponsiveDialogDescription as c, ResponsiveDialogTitle as l } from "@burdenoff/fe-libs/ui";
7
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
5
+ import { getDrilldownParamSummary as r } from "../utils/drilldownParams.js";
6
+ import { memo as i, useCallback as a, useContext as o, useRef as s } from "react";
7
+ import { ResponsiveDialog as c, ResponsiveDialogContent as l, ResponsiveDialogDescription as u, ResponsiveDialogTitle as d } from "@burdenoff/fe-libs/ui";
8
+ import { useI18n as f } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
9
+ import { getApolloContext as p } from "@apollo/client/react";
10
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
8
11
  //#region src/bigconsole/components/DrilldownModal.tsx
9
- var f = r(function({ renderDashboard: r, onClose: f }) {
10
- let m = a(null), h = e((e) => e.isOpen), g = e((e) => e.dashboardId), _ = e((e) => e.params), v = e((e) => e.history), y = e((e) => e.closeModal), b = e((e) => e.popDrilldown), x = i(() => {
11
- y(), f?.();
12
- }, [y, f]), S = i(() => {
13
- b();
14
- }, [b]);
15
- return !h || !g ? null : /* @__PURE__ */ u(o, {
16
- open: h,
12
+ var g = i(function({ renderDashboard: i, onClose: g }) {
13
+ let { t: v } = f(), { client: y } = o(p()), b = s(null), x = e((e) => e.isOpen), S = e((e) => e.dashboardId), C = e((e) => e.params), w = e((e) => e.history), T = e((e) => e.closeModal), E = e((e) => e.popDrilldown), D = a(() => {
14
+ T(), g?.();
15
+ }, [T, g]), O = a(() => {
16
+ E();
17
+ }, [E]);
18
+ if (!x || !S) return null;
19
+ let k = r(C, (e) => y?.cache.readFragment({
20
+ id: y.cache.identify({
21
+ __typename: "BigConsoleGlobalFilter",
22
+ id: e
23
+ }),
24
+ fragment: t,
25
+ returnPartialData: !0
26
+ }));
27
+ return /* @__PURE__ */ m(c, {
28
+ open: x,
17
29
  onOpenChange: (e) => {
18
- e || x();
30
+ e || D();
19
31
  },
20
- children: /* @__PURE__ */ d(s, {
32
+ children: /* @__PURE__ */ h(l, {
21
33
  showCloseButton: !1,
22
34
  onOpenAutoFocus: () => {
23
35
  let e = document.activeElement;
24
- e instanceof HTMLElement && e !== document.body && !e.closest("[role=\"dialog\"]") && (m.current = e);
36
+ e instanceof HTMLElement && e !== document.body && !e.closest("[role=\"dialog\"]") && (b.current = e);
25
37
  },
26
38
  onCloseAutoFocus: (e) => {
27
- e.preventDefault(), m.current?.isConnected && m.current.focus();
39
+ e.preventDefault(), b.current?.isConnected && b.current.focus();
28
40
  },
29
41
  className: "flex w-full md:w-[calc(100%-2rem)] max-w-5xl flex-col gap-0 overflow-hidden rounded-card bg-bg-surface p-0 sm:max-w-5xl",
30
42
  style: { maxHeight: "calc(100dvh - 2rem)" },
31
43
  children: [
32
- /* @__PURE__ */ u(c, {
44
+ /* @__PURE__ */ m(u, {
33
45
  className: "sr-only",
34
46
  children: "Explore the linked dashboard and return to the previous drilldown level."
35
47
  }),
36
- /* @__PURE__ */ d("div", {
48
+ /* @__PURE__ */ h("div", {
37
49
  className: "flex flex-shrink-0 flex-wrap items-center justify-between gap-control-gap border-b border-[var(--color-border-subtle)] px-4 py-3",
38
- children: [/* @__PURE__ */ d("div", {
50
+ children: [/* @__PURE__ */ h("div", {
39
51
  className: "flex min-w-0 items-center gap-3",
40
52
  children: [
41
- v.length > 0 && /* @__PURE__ */ u("button", {
53
+ w.length > 0 && /* @__PURE__ */ m("button", {
42
54
  type: "button",
43
- onClick: S,
55
+ onClick: O,
44
56
  className: "flex h-control-md w-[var(--size-controlHeight-md)] shrink-0 items-center justify-center rounded-button motion-safe:transition-colors hover:bg-bg-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
45
57
  title: "Go back",
46
58
  "aria-label": "Go back",
47
- children: /* @__PURE__ */ u("svg", {
59
+ children: /* @__PURE__ */ m("svg", {
48
60
  className: "w-5 h-5 text-text-secondary",
49
61
  fill: "none",
50
62
  stroke: "currentColor",
51
63
  viewBox: "0 0 24 24",
52
- children: /* @__PURE__ */ u("path", {
64
+ children: /* @__PURE__ */ m("path", {
53
65
  strokeLinecap: "round",
54
66
  strokeLinejoin: "round",
55
67
  strokeWidth: 2,
@@ -57,33 +69,33 @@ var f = r(function({ renderDashboard: r, onClose: f }) {
57
69
  })
58
70
  })
59
71
  }),
60
- /* @__PURE__ */ u(l, {
72
+ /* @__PURE__ */ m(d, {
61
73
  className: "truncate text-sm font-semibold text-text-primary",
62
74
  children: "Drilldown View"
63
75
  }),
64
- v.length > 0 && /* @__PURE__ */ d("span", {
76
+ w.length > 0 && /* @__PURE__ */ h("span", {
65
77
  className: "text-xs text-text-muted",
66
78
  children: [
67
79
  "(",
68
- v.length + 1,
80
+ w.length + 1,
69
81
  " level",
70
- v.length > 0 ? "s" : "",
82
+ w.length > 0 ? "s" : "",
71
83
  " deep)"
72
84
  ]
73
85
  })
74
86
  ]
75
- }), /* @__PURE__ */ u("button", {
87
+ }), /* @__PURE__ */ m("button", {
76
88
  type: "button",
77
- onClick: x,
78
- className: `flex h-control-md w-[var(--size-controlHeight-md)] shrink-0 items-center justify-center rounded-button motion-safe:transition-colors hover:bg-bg-sunken ${t}`,
89
+ onClick: D,
90
+ className: `flex h-control-md w-[var(--size-controlHeight-md)] shrink-0 items-center justify-center rounded-button motion-safe:transition-colors hover:bg-bg-sunken ${n}`,
79
91
  title: "Close (Esc)",
80
92
  "aria-label": "Close drilldown",
81
- children: /* @__PURE__ */ u("svg", {
93
+ children: /* @__PURE__ */ m("svg", {
82
94
  className: "w-5 h-5 text-text-secondary",
83
95
  fill: "none",
84
96
  stroke: "currentColor",
85
97
  viewBox: "0 0 24 24",
86
- children: /* @__PURE__ */ u("path", {
98
+ children: /* @__PURE__ */ m("path", {
87
99
  strokeLinecap: "round",
88
100
  strokeLinejoin: "round",
89
101
  strokeWidth: 2,
@@ -92,30 +104,29 @@ var f = r(function({ renderDashboard: r, onClose: f }) {
92
104
  })
93
105
  })]
94
106
  }),
95
- /* @__PURE__ */ u("div", {
107
+ /* @__PURE__ */ m("div", {
96
108
  className: "min-h-0 flex-1 overflow-y-auto bg-bg-sunken p-4",
97
- children: r ? r(g, _) : /* @__PURE__ */ u(p, {})
109
+ children: i ? i(S, C) : /* @__PURE__ */ m(_, {})
98
110
  }),
99
- /* @__PURE__ */ u("div", {
111
+ /* @__PURE__ */ m("div", {
100
112
  className: "flex-shrink-0 border-t border-[var(--color-border-subtle)] px-4 py-2",
101
- children: /* @__PURE__ */ d("div", {
113
+ children: /* @__PURE__ */ h("div", {
102
114
  className: "flex flex-wrap items-center justify-between gap-x-4 gap-y-1 text-xs text-text-muted",
103
- children: [/* @__PURE__ */ d("span", { children: [
104
- "Parameters:",
105
- " ",
106
- n(_).map(([e]) => e).join(", ") || "None"
107
- ] }), /* @__PURE__ */ u("span", { children: "Press Esc to close" })]
115
+ children: [/* @__PURE__ */ m("span", {
116
+ className: "min-w-0 break-words",
117
+ children: v("bigconsole.drilldown.parameters", "Parameters: {{parameters}}", { parameters: k || v("bigconsole.drilldown.noParameters", "None") })
118
+ }), /* @__PURE__ */ m("span", { children: "Press Esc to close" })]
108
119
  })
109
120
  })
110
121
  ]
111
122
  })
112
123
  });
113
124
  });
114
- function p() {
115
- return /* @__PURE__ */ u("div", {
125
+ function _() {
126
+ return /* @__PURE__ */ m("div", {
116
127
  className: "flex items-center justify-center h-full text-sm text-text-secondary",
117
128
  children: "Unable to load drilldown content. Please try again."
118
129
  });
119
130
  }
120
131
  //#endregion
121
- export { f as DrilldownModal, f as default };
132
+ export { g as DrilldownModal, g as default };
@@ -1,2 +1,8 @@
1
1
  /** Display only meaningful context; the original drilldown parameters remain unchanged. */
2
2
  export declare function getVisibleDrilldownParams(params: Record<string, unknown>): Array<[string, unknown]>;
3
+ export interface DrilldownFilterLabel {
4
+ name?: string;
5
+ config?: Record<string, unknown>;
6
+ }
7
+ /** Resolve display metadata only; never rewrite filter IDs or values used by widgets. */
8
+ export declare function getDrilldownParamSummary(params: Record<string, unknown>, readFilter?: (id: string) => DrilldownFilterLabel | null | undefined): string;
@@ -2,5 +2,23 @@
2
2
  function e(e) {
3
3
  return Object.entries(e).filter(([e, t]) => e.startsWith("__") || t == null ? !1 : typeof t == "string" ? t.trim().length > 0 : !Array.isArray(t) || t.length > 0);
4
4
  }
5
+ function t(e, n) {
6
+ if (Array.isArray(e)) return e.map((e) => t(e, n)).join(", ");
7
+ if (typeof e == "object" && e) {
8
+ let r = e;
9
+ return typeof r.label == "string" ? r.label : "value" in r ? t(r.value, n) : JSON.stringify(e);
10
+ }
11
+ if (Array.isArray(n)) {
12
+ let t = n.find((t) => t && typeof t == "object" && t.value === e && typeof t.label == "string");
13
+ if (t) return t.label;
14
+ }
15
+ return String(e);
16
+ }
17
+ function n(n, r = () => void 0) {
18
+ return e(n).map(([e, n]) => {
19
+ let i = r(e);
20
+ return `${i?.name || e}: ${t(n, i?.config?.options)}`;
21
+ }).join("; ");
22
+ }
5
23
  //#endregion
6
- export { e as getVisibleDrilldownParams };
24
+ export { n as getDrilldownParamSummary, e as getVisibleDrilldownParams };