@burdenoff/microfe-bigconsole 2026.1118.10 → 2026.1119.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/asof/AsOfBanner.d.ts +3 -0
- package/dist/bigconsole/asof/AsOfBanner.js +38 -0
- package/dist/bigconsole/asof/AsOfControl.d.ts +4 -0
- package/dist/bigconsole/asof/AsOfControl.js +96 -0
- package/dist/bigconsole/asof/AsOfProvider.d.ts +24 -0
- package/dist/bigconsole/asof/AsOfProvider.js +76 -0
- package/dist/bigconsole/asof/asOfMessage.d.ts +12 -0
- package/dist/bigconsole/asof/asOfMessage.js +12 -0
- package/dist/bigconsole/asof/asOfParam.d.ts +48 -0
- package/dist/bigconsole/asof/asOfParam.js +34 -0
- package/dist/bigconsole/asof/index.d.ts +7 -0
- package/dist/bigconsole/asof/index.js +6 -0
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +142 -138
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +97 -92
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +78 -74
- package/dist/bigconsole/components/widgets/WidgetMenu.js +98 -96
- package/dist/bigconsole/components/widgets/WidgetWrapper.js +345 -306
- package/dist/bigconsole/hooks/useFilterFieldValues.js +52 -22
- package/dist/bigconsole/hooks/useWidgetData.d.ts +7 -0
- package/dist/bigconsole/hooks/useWidgetData.js +53 -43
- package/dist/bigconsole/pages/DashboardViewPage.d.ts +7 -1
- package/dist/bigconsole/pages/DashboardViewPage.js +300 -278
- package/dist/bigconsole/pages/index.d.ts +1 -1
- package/dist/bigconsole/types/index.d.ts +13 -0
- package/dist/bigconsole/utils/widgetDisplayData.d.ts +6 -0
- package/dist/bigconsole/utils/widgetDisplayData.js +4 -0
- package/dist/generated/wspace-operations.d.ts +47 -0
- package/dist/generated/wspace-operations.js +261 -16
- package/dist/generated/wspace-types.d.ts +78 -0
- package/package.json +1 -1
|
@@ -3,195 +3,200 @@ import { useDashboardStore as t } from "../../store/dashboardStore.js";
|
|
|
3
3
|
import "../../store/index.js";
|
|
4
4
|
import { Section as n } from "../common/Section.js";
|
|
5
5
|
import { BIGCONSOLE_PERMISSIONS as r } from "../../../constants/permissions.js";
|
|
6
|
+
import { useAsOf as i } from "../../asof/AsOfProvider.js";
|
|
7
|
+
import { AsOfControl as ee } from "../../asof/AsOfControl.js";
|
|
6
8
|
import "../common/index.js";
|
|
7
|
-
import { SavedViewsDropdown as i } from "./SavedViewsDropdown/SavedViewsDropdown.js";
|
|
8
9
|
import "./SavedViewsDropdown/index.js";
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
10
|
+
import { SavedViewsDropdown as a } from "./SavedViewsDropdown/SavedViewsDropdown.js";
|
|
11
|
+
import "../../asof/index.js";
|
|
12
|
+
import { memo as o, useCallback as s } from "react";
|
|
13
|
+
import { PermissionButton as c } from "@burdenoff/fe-libs/shared/components";
|
|
14
|
+
import { usePermissions as l } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
15
|
+
import { Clipboard as u, ClipboardCheck as d, Download as te, Eye as f, FileText as p, Image as m, Minus as h, PanelLeft as g, PanelLeftClose as _, Pencil as v, Plus as y, RotateCcw as b, Save as x, Share2 as S, Store as C } from "lucide-react";
|
|
16
|
+
import { Button as w, Spinner as T, Tooltip as E, TooltipContent as D, TooltipProvider as ne, TooltipTrigger as O } from "@burdenoff/fe-libs/ui";
|
|
17
|
+
import { useI18n as k } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
18
|
+
import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
16
19
|
// src/bigconsole/components/dashboard/DashboardToolbar.tsx
|
|
17
|
-
var
|
|
18
|
-
let { hasPermission:
|
|
19
|
-
$ &&
|
|
20
|
-
}, [$,
|
|
21
|
-
return /* @__PURE__ */
|
|
20
|
+
var N = o(function({ dashboardId: o, title: N, onAddWidget: P, onTogglePalette: F, isPaletteOpen: I = !1, onPaste: L, onSave: R, isSaving: z = !1, onReview: B, onExport: V, onPublishTemplate: H, onExportImage: U, onExportPdf: W, isExportingImage: G = !1, onShare: K }) {
|
|
21
|
+
let { hasPermission: re } = l(), { t: q } = k(), J = t((e) => e.viewMode === "edit"), Y = t((e) => e.toggleViewMode), { asOf: X } = i(), Z = t((e) => e.zoomLevel), Q = t((e) => e.setZoomLevel), $ = !!e((e) => e.clipboardWidgetId), ie = s(() => {
|
|
22
|
+
$ && L && L();
|
|
23
|
+
}, [$, L]);
|
|
24
|
+
return /* @__PURE__ */ j(ne, { children: /* @__PURE__ */ M(n, {
|
|
22
25
|
emphasis: "bare",
|
|
23
26
|
padding: "none",
|
|
24
|
-
"aria-label":
|
|
27
|
+
"aria-label": N ? `Board toolbar — ${N}` : "Board toolbar",
|
|
25
28
|
"data-testid": "dashboard-toolbar",
|
|
26
29
|
className: "flex-shrink-0 border-b border-[var(--color-border-subtle)] bg-bg-surface px-4 py-2",
|
|
27
30
|
bodyClassName: "flex flex-wrap items-center justify-between gap-x-4 gap-y-2",
|
|
28
31
|
children: [
|
|
29
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ j("div", {
|
|
30
33
|
className: "flex min-w-0 items-center gap-4",
|
|
31
|
-
children:
|
|
34
|
+
children: o && /* @__PURE__ */ j(a, { dashboardId: o })
|
|
32
35
|
}),
|
|
33
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ M("div", {
|
|
34
37
|
role: "group",
|
|
35
38
|
"aria-label": "Zoom",
|
|
36
39
|
className: "flex min-w-0 items-center gap-1 border-l border-[var(--color-border-subtle)] pl-4",
|
|
37
40
|
children: [
|
|
38
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ M(E, { children: [/* @__PURE__ */ j(O, {
|
|
39
42
|
asChild: !0,
|
|
40
|
-
children: /* @__PURE__ */
|
|
43
|
+
children: /* @__PURE__ */ j(w, {
|
|
41
44
|
variant: "ghost",
|
|
42
45
|
size: "icon-sm",
|
|
43
46
|
onClick: () => Q(Math.max(50, Z - 10)),
|
|
44
47
|
disabled: Z <= 50,
|
|
45
|
-
children: /* @__PURE__ */
|
|
48
|
+
children: /* @__PURE__ */ j(h, { className: "size-4" })
|
|
46
49
|
})
|
|
47
|
-
}), /* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */
|
|
50
|
+
}), /* @__PURE__ */ j(D, { children: q("bigconsole.dashboards.toolbar.zoomOut", "Zoom out") })] }),
|
|
51
|
+
/* @__PURE__ */ M("span", {
|
|
49
52
|
className: "text-sm text-text-secondary w-12 text-center",
|
|
50
53
|
children: [Z, "%"]
|
|
51
54
|
}),
|
|
52
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ M(E, { children: [/* @__PURE__ */ j(O, {
|
|
53
56
|
asChild: !0,
|
|
54
|
-
children: /* @__PURE__ */
|
|
57
|
+
children: /* @__PURE__ */ j(w, {
|
|
55
58
|
variant: "ghost",
|
|
56
59
|
size: "icon-sm",
|
|
57
60
|
onClick: () => Q(Math.min(200, Z + 10)),
|
|
58
61
|
disabled: Z >= 200,
|
|
59
|
-
children: /* @__PURE__ */
|
|
62
|
+
children: /* @__PURE__ */ j(y, { className: "size-4" })
|
|
60
63
|
})
|
|
61
|
-
}), /* @__PURE__ */
|
|
62
|
-
/* @__PURE__ */
|
|
64
|
+
}), /* @__PURE__ */ j(D, { children: q("bigconsole.dashboards.toolbar.zoomIn", "Zoom in") })] }),
|
|
65
|
+
/* @__PURE__ */ M(E, { children: [/* @__PURE__ */ j(O, {
|
|
63
66
|
asChild: !0,
|
|
64
|
-
children: /* @__PURE__ */
|
|
67
|
+
children: /* @__PURE__ */ M(w, {
|
|
65
68
|
variant: "ghost",
|
|
66
69
|
size: "sm",
|
|
67
70
|
onClick: () => Q(100),
|
|
68
|
-
children: [/* @__PURE__ */
|
|
71
|
+
children: [/* @__PURE__ */ j(b, { className: "size-3.5 mr-1" }), q("bigconsole.dashboards.toolbar.reset", "Reset")]
|
|
69
72
|
})
|
|
70
|
-
}), /* @__PURE__ */
|
|
73
|
+
}), /* @__PURE__ */ j(D, { children: q("bigconsole.dashboards.toolbar.resetZoomTooltip", "Reset zoom to 100%") })] })
|
|
71
74
|
]
|
|
72
75
|
}),
|
|
73
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ M("div", {
|
|
74
77
|
role: "group",
|
|
75
78
|
"aria-label": "Board actions",
|
|
76
79
|
className: "flex min-w-0 flex-wrap items-center justify-end gap-2 border-l border-[var(--color-border-subtle)] pl-4",
|
|
77
80
|
children: [
|
|
78
|
-
|
|
79
|
-
|
|
81
|
+
!J && /* @__PURE__ */ j(ee, {}),
|
|
82
|
+
J && /* @__PURE__ */ M(A, { children: [
|
|
83
|
+
F && /* @__PURE__ */ M(E, { children: [/* @__PURE__ */ j(O, {
|
|
80
84
|
asChild: !0,
|
|
81
|
-
children: /* @__PURE__ */
|
|
82
|
-
variant:
|
|
85
|
+
children: /* @__PURE__ */ M(w, {
|
|
86
|
+
variant: I ? "secondary" : "outline",
|
|
83
87
|
size: "sm",
|
|
84
|
-
onClick:
|
|
85
|
-
children: [
|
|
88
|
+
onClick: F,
|
|
89
|
+
children: [j(I ? _ : g, { className: "size-4" }), q("bigconsole.dashboards.toolbar.widgets", "Widgets")]
|
|
86
90
|
})
|
|
87
|
-
}), /* @__PURE__ */
|
|
88
|
-
/* @__PURE__ */
|
|
91
|
+
}), /* @__PURE__ */ j(D, { children: I ? q("bigconsole.dashboards.toolbar.hidePalette", "Hide widget palette") : q("bigconsole.dashboards.toolbar.showPalette", "Show widget palette for drag & drop") })] }),
|
|
92
|
+
/* @__PURE__ */ M(E, { children: [/* @__PURE__ */ j(O, {
|
|
89
93
|
asChild: !0,
|
|
90
|
-
children: /* @__PURE__ */
|
|
94
|
+
children: /* @__PURE__ */ M(w, {
|
|
91
95
|
variant: "ghost",
|
|
92
96
|
size: "sm",
|
|
93
|
-
onClick:
|
|
97
|
+
onClick: ie,
|
|
94
98
|
disabled: !$,
|
|
95
|
-
children: [/* @__PURE__ */
|
|
99
|
+
children: [/* @__PURE__ */ j(u, { className: "size-4" }), q("bigconsole.dashboards.toolbar.paste", "Paste")]
|
|
96
100
|
})
|
|
97
|
-
}), /* @__PURE__ */
|
|
98
|
-
/* @__PURE__ */
|
|
101
|
+
}), /* @__PURE__ */ j(D, { children: q("bigconsole.dashboards.toolbar.pasteTooltip", "Paste widget from clipboard") })] }),
|
|
102
|
+
/* @__PURE__ */ j(c, {
|
|
99
103
|
permission: r.WIDGET_CREATE,
|
|
100
104
|
deniedBehavior: "hide",
|
|
101
|
-
children: /* @__PURE__ */
|
|
105
|
+
children: /* @__PURE__ */ M(w, {
|
|
102
106
|
size: "sm",
|
|
103
|
-
onClick:
|
|
104
|
-
children: [/* @__PURE__ */
|
|
107
|
+
onClick: P,
|
|
108
|
+
children: [/* @__PURE__ */ j(y, { className: "size-4" }), q("bigconsole.dashboards.toolbar.addWidget", "Add Widget")]
|
|
105
109
|
})
|
|
106
110
|
})
|
|
107
111
|
] }),
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
variant:
|
|
112
|
+
/* @__PURE__ */ j(w, {
|
|
113
|
+
variant: J ? "secondary" : "outline",
|
|
110
114
|
size: "sm",
|
|
111
|
-
onClick:
|
|
112
|
-
|
|
115
|
+
onClick: Y,
|
|
116
|
+
disabled: !J && !!X,
|
|
117
|
+
children: J ? /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j(f, { className: "size-4" }), q("bigconsole.dashboards.toolbar.preview", "Preview")] }) : /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j(v, { className: "size-4" }), q("bigconsole.dashboards.toolbar.edit", "Edit")] })
|
|
113
118
|
}),
|
|
114
|
-
|
|
119
|
+
R && /* @__PURE__ */ j(w, {
|
|
115
120
|
variant: "outline",
|
|
116
121
|
size: "sm",
|
|
117
|
-
onClick:
|
|
118
|
-
disabled:
|
|
119
|
-
children:
|
|
122
|
+
onClick: R,
|
|
123
|
+
disabled: z,
|
|
124
|
+
children: z ? /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j(T, { className: "size-4" }), q("bigconsole.dashboards.toolbar.saving", "Saving...")] }) : /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j(x, { className: "size-4" }), q("bigconsole.dashboards.toolbar.save", "Save")] })
|
|
120
125
|
}),
|
|
121
|
-
|
|
126
|
+
K && /* @__PURE__ */ j(c, {
|
|
122
127
|
permission: r.DASHBOARD_SHARE,
|
|
123
128
|
deniedBehavior: "hide",
|
|
124
|
-
children: /* @__PURE__ */
|
|
129
|
+
children: /* @__PURE__ */ M(E, { children: [/* @__PURE__ */ j(O, {
|
|
125
130
|
asChild: !0,
|
|
126
|
-
children: /* @__PURE__ */
|
|
131
|
+
children: /* @__PURE__ */ M(w, {
|
|
127
132
|
variant: "outline",
|
|
128
133
|
size: "sm",
|
|
129
|
-
onClick:
|
|
130
|
-
children: [/* @__PURE__ */
|
|
134
|
+
onClick: K,
|
|
135
|
+
children: [/* @__PURE__ */ j(S, { className: "size-4" }), q("bigconsole.dashboards.toolbar.share", "Share")]
|
|
131
136
|
})
|
|
132
|
-
}), /* @__PURE__ */
|
|
137
|
+
}), /* @__PURE__ */ j(D, { children: q("bigconsole.dashboards.toolbar.shareTooltip", "Share dashboard with others") })] })
|
|
133
138
|
}),
|
|
134
|
-
|
|
139
|
+
H && /* @__PURE__ */ j(c, {
|
|
135
140
|
permission: r.DASHBOARD_PUBLISH,
|
|
136
141
|
deniedBehavior: "hide",
|
|
137
|
-
children: /* @__PURE__ */
|
|
142
|
+
children: /* @__PURE__ */ M(E, { children: [/* @__PURE__ */ j(O, {
|
|
138
143
|
asChild: !0,
|
|
139
|
-
children: /* @__PURE__ */
|
|
144
|
+
children: /* @__PURE__ */ M(w, {
|
|
140
145
|
variant: "outline",
|
|
141
146
|
size: "sm",
|
|
142
|
-
onClick:
|
|
143
|
-
children: [/* @__PURE__ */
|
|
147
|
+
onClick: H,
|
|
148
|
+
children: [/* @__PURE__ */ j(C, { className: "size-4" }), /* @__PURE__ */ j("span", {
|
|
144
149
|
className: "hidden sm:inline",
|
|
145
|
-
children:
|
|
150
|
+
children: q("bigconsole.dashboards.toolbar.publish", "Publish")
|
|
146
151
|
})]
|
|
147
152
|
})
|
|
148
|
-
}), /* @__PURE__ */
|
|
153
|
+
}), /* @__PURE__ */ j(D, { children: q("bigconsole.dashboards.toolbar.publishTooltip", "Publish this dashboard as a reusable template") })] })
|
|
149
154
|
}),
|
|
150
|
-
|
|
155
|
+
B && /* @__PURE__ */ M(E, { children: [/* @__PURE__ */ j(O, {
|
|
151
156
|
asChild: !0,
|
|
152
|
-
children: /* @__PURE__ */
|
|
157
|
+
children: /* @__PURE__ */ M(w, {
|
|
153
158
|
variant: "outline",
|
|
154
159
|
size: "sm",
|
|
155
|
-
onClick:
|
|
160
|
+
onClick: B,
|
|
156
161
|
"data-testid": "dashboard-review-button",
|
|
157
|
-
children: [/* @__PURE__ */
|
|
162
|
+
children: [/* @__PURE__ */ j(d, { className: "size-4" }), /* @__PURE__ */ j("span", {
|
|
158
163
|
className: "hidden sm:inline",
|
|
159
|
-
children:
|
|
164
|
+
children: q("bigconsole.dashboards.toolbar.review", "Review")
|
|
160
165
|
})]
|
|
161
166
|
})
|
|
162
|
-
}), /* @__PURE__ */
|
|
163
|
-
|
|
167
|
+
}), /* @__PURE__ */ j(D, { children: q("bigconsole.dashboards.toolbar.reviewTooltip", "Check charts for misleading axes, colour-only meaning and unclear titles") })] }),
|
|
168
|
+
V && /* @__PURE__ */ M(E, { children: [/* @__PURE__ */ j(O, {
|
|
164
169
|
asChild: !0,
|
|
165
|
-
children: /* @__PURE__ */
|
|
170
|
+
children: /* @__PURE__ */ M(w, {
|
|
166
171
|
variant: "outline",
|
|
167
172
|
size: "sm",
|
|
168
|
-
onClick:
|
|
169
|
-
children: [/* @__PURE__ */
|
|
173
|
+
onClick: V,
|
|
174
|
+
children: [/* @__PURE__ */ j(te, { className: "size-4" }), q("bigconsole.dashboards.toolbar.export", "Export")]
|
|
170
175
|
})
|
|
171
|
-
}), /* @__PURE__ */
|
|
172
|
-
|
|
176
|
+
}), /* @__PURE__ */ j(D, { children: q("bigconsole.dashboards.toolbar.exportTooltip", "Export dashboard to JSON") })] }),
|
|
177
|
+
U && /* @__PURE__ */ M(E, { children: [/* @__PURE__ */ j(O, {
|
|
173
178
|
asChild: !0,
|
|
174
|
-
children: /* @__PURE__ */
|
|
179
|
+
children: /* @__PURE__ */ j(w, {
|
|
175
180
|
variant: "outline",
|
|
176
181
|
size: "icon-sm",
|
|
177
|
-
onClick:
|
|
178
|
-
disabled:
|
|
179
|
-
children:
|
|
182
|
+
onClick: U,
|
|
183
|
+
disabled: G,
|
|
184
|
+
children: j(G ? T : m, { className: "size-4" })
|
|
180
185
|
})
|
|
181
|
-
}), /* @__PURE__ */
|
|
182
|
-
|
|
186
|
+
}), /* @__PURE__ */ j(D, { children: q("bigconsole.dashboards.toolbar.exportPngTooltip", "Export board as PNG image") })] }),
|
|
187
|
+
W && /* @__PURE__ */ M(E, { children: [/* @__PURE__ */ j(O, {
|
|
183
188
|
asChild: !0,
|
|
184
|
-
children: /* @__PURE__ */
|
|
189
|
+
children: /* @__PURE__ */ j(w, {
|
|
185
190
|
variant: "outline",
|
|
186
191
|
size: "icon-sm",
|
|
187
|
-
onClick:
|
|
188
|
-
disabled:
|
|
189
|
-
children: /* @__PURE__ */
|
|
192
|
+
onClick: W,
|
|
193
|
+
disabled: G,
|
|
194
|
+
children: /* @__PURE__ */ j(p, { className: "size-4" })
|
|
190
195
|
})
|
|
191
|
-
}), /* @__PURE__ */
|
|
196
|
+
}), /* @__PURE__ */ j(D, { children: q("bigconsole.dashboards.toolbar.exportPdfTooltip", "Export board as PDF") })] })
|
|
192
197
|
]
|
|
193
198
|
})
|
|
194
199
|
]
|
|
195
200
|
}) });
|
|
196
201
|
});
|
|
197
|
-
export {
|
|
202
|
+
export { N as DashboardToolbar, N as default };
|