@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.
Files changed (30) hide show
  1. package/dist/bigconsole/asof/AsOfBanner.d.ts +3 -0
  2. package/dist/bigconsole/asof/AsOfBanner.js +38 -0
  3. package/dist/bigconsole/asof/AsOfControl.d.ts +4 -0
  4. package/dist/bigconsole/asof/AsOfControl.js +96 -0
  5. package/dist/bigconsole/asof/AsOfProvider.d.ts +24 -0
  6. package/dist/bigconsole/asof/AsOfProvider.js +76 -0
  7. package/dist/bigconsole/asof/asOfMessage.d.ts +12 -0
  8. package/dist/bigconsole/asof/asOfMessage.js +12 -0
  9. package/dist/bigconsole/asof/asOfParam.d.ts +48 -0
  10. package/dist/bigconsole/asof/asOfParam.js +34 -0
  11. package/dist/bigconsole/asof/index.d.ts +7 -0
  12. package/dist/bigconsole/asof/index.js +6 -0
  13. package/dist/bigconsole/components/dashboard/DashboardCanvas.js +142 -138
  14. package/dist/bigconsole/components/dashboard/DashboardToolbar.js +97 -92
  15. package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +78 -74
  16. package/dist/bigconsole/components/widgets/WidgetMenu.js +98 -96
  17. package/dist/bigconsole/components/widgets/WidgetWrapper.js +345 -306
  18. package/dist/bigconsole/hooks/useFilterFieldValues.js +52 -22
  19. package/dist/bigconsole/hooks/useWidgetData.d.ts +7 -0
  20. package/dist/bigconsole/hooks/useWidgetData.js +53 -43
  21. package/dist/bigconsole/pages/DashboardViewPage.d.ts +7 -1
  22. package/dist/bigconsole/pages/DashboardViewPage.js +300 -278
  23. package/dist/bigconsole/pages/index.d.ts +1 -1
  24. package/dist/bigconsole/types/index.d.ts +13 -0
  25. package/dist/bigconsole/utils/widgetDisplayData.d.ts +6 -0
  26. package/dist/bigconsole/utils/widgetDisplayData.js +4 -0
  27. package/dist/generated/wspace-operations.d.ts +47 -0
  28. package/dist/generated/wspace-operations.js +261 -16
  29. package/dist/generated/wspace-types.d.ts +78 -0
  30. package/package.json +1 -1
@@ -2,11 +2,14 @@ import "../../../hooks/index.js";
2
2
  import e from "../../../hooks/useBigConsoleAnalytics.js";
3
3
  import t from "../../../hooks/useDashboardSharing.js";
4
4
  import { EmbedTab as n } from "./EmbedTab.js";
5
- import { useShareRecipients as r } from "../../../hooks/useShareRecipients.js";
6
- import { useBigConsole as i, useBigConsoleBasePath as a } from "../../../context/BigConsoleContext.js";
5
+ import { AS_OF_PARAM as r, formatAsOf as i } from "../../../asof/asOfParam.js";
6
+ import { useAsOf as ee } from "../../../asof/AsOfProvider.js";
7
+ import { useShareRecipients as te } from "../../../hooks/useShareRecipients.js";
8
+ import { useBigConsole as a, useBigConsoleBasePath as ne } from "../../../context/BigConsoleContext.js";
9
+ import "../../../asof/index.js";
7
10
  import { useCallback as o, useEffect as s, useRef as c, useState as l } from "react";
8
- import { ResponsiveDialog as ee, ResponsiveDialogContent as u, ResponsiveDialogDescription as te, ResponsiveDialogTitle as ne } from "@burdenoff/fe-libs/ui";
9
- import { useI18n as d } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
11
+ import { ResponsiveDialog as u, ResponsiveDialogContent as re, ResponsiveDialogDescription as d, ResponsiveDialogTitle as ie } from "@burdenoff/fe-libs/ui";
12
+ import { useI18n as ae } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
10
13
  import { jsx as f, jsxs as p } from "react/jsx-runtime";
11
14
  import { formatDistanceToNow as m } from "date-fns";
12
15
  // src/bigconsole/components/dashboard/ShareDialog/ShareDialog.tsx
@@ -48,29 +51,29 @@ var h = {
48
51
  description: "Can edit widgets, layout, and share"
49
52
  }];
50
53
  function v(e) {
51
- let { workspaceId: t, currentUser: n } = i(), r = c(null);
54
+ let { workspaceId: t, currentUser: n } = a(), r = c(null);
52
55
  return /* @__PURE__ */ f(y, {
53
56
  ...e,
54
57
  returnFocusRef: r
55
58
  }, `${n?.id ?? ""}|${t ?? ""}|${e.dashboardId}`);
56
59
  }
57
- function y({ dashboardId: i, dashboardName: c, isOpen: m, onClose: v, visibility: y, onVisibilityChange: b, canChangeVisibility: S = !0, returnFocusRef: C }) {
58
- let { t: w } = d(), { shares: T, loading: E, error: re, fetchShares: D, shareWithUser: O, shareWithGroup: k, updateShare: A, revokeShare: j, revokeAllShares: M } = t(), N = e(), [P, F] = l(""), [I, L] = l(null), [R, z] = l("VIEW"), [B, ie] = l(""), [V, H] = l(!1), [U, W] = l("people"), [G, K] = l(!1), [q, J] = l(null), [Y, X] = l(null), Z = r(m, P), Q = a();
60
+ function y({ dashboardId: a, dashboardName: c, isOpen: m, onClose: v, visibility: y, onVisibilityChange: b, canChangeVisibility: S = !0, returnFocusRef: C }) {
61
+ let { t: w } = ae(), { shares: T, loading: E, error: oe, fetchShares: D, shareWithUser: O, shareWithGroup: k, updateShare: A, revokeShare: j, revokeAllShares: M } = t(), N = e(), [P, F] = l(""), [I, L] = l(null), [R, se] = l("VIEW"), [z, ce] = l(""), [B, V] = l(!1), [H, U] = l("people"), [W, G] = l(!1), [K, q] = l(null), [J, Y] = l(null), X = te(m, P), Z = ee().asOf?.getTime() ?? null, Q = ne();
59
62
  s(() => {
60
63
  let e = !1;
61
64
  return Promise.resolve().then(() => {
62
- e || (L(null), F(""), X(null));
65
+ e || (L(null), F(""), Y(null));
63
66
  }), () => {
64
67
  e = !0;
65
68
  };
66
69
  }, [
67
- Z.owner,
68
- i,
70
+ X.owner,
71
+ a,
69
72
  m
70
73
  ]), s(() => {
71
- if (m && i) {
72
- D(i);
73
- let e = new URL(`${Q}/dashboards/${encodeURIComponent(i)}`, window.location.origin), t = new URLSearchParams(window.location.search);
74
+ if (m && a) {
75
+ D(a);
76
+ let e = new URL(`${Q}/dashboards/${encodeURIComponent(a)}`, window.location.origin), t = new URLSearchParams(window.location.search);
74
77
  for (let n of [
75
78
  "org",
76
79
  "workspace",
@@ -80,71 +83,72 @@ function y({ dashboardId: i, dashboardName: c, isOpen: m, onClose: v, visibility
80
83
  let r = t.get(n);
81
84
  r && e.searchParams.set(n, r);
82
85
  }
83
- Z.workspaceId && e.searchParams.set("workspace", Z.workspaceId), ie(e.toString());
86
+ X.workspaceId && e.searchParams.set("workspace", X.workspaceId), Z !== null && e.searchParams.set(r, i(new Date(Z))), ce(e.toString());
84
87
  }
85
88
  }, [
86
89
  m,
87
- i,
90
+ a,
88
91
  D,
89
92
  Q,
90
- Z.workspaceId
93
+ X.workspaceId,
94
+ Z
91
95
  ]);
92
- let ae = o(async () => {
93
- if (!I || E || I.workspaceId !== Z.workspaceId) return;
94
- X(null), N("bigconsole.dashboard.share_clicked", {
95
- dashboardId: i,
96
+ let le = o(async () => {
97
+ if (!I || E || I.workspaceId !== X.workspaceId) return;
98
+ Y(null), N("bigconsole.dashboard.share_clicked", {
99
+ dashboardId: a,
96
100
  permission: R,
97
101
  recipientType: I.type
98
102
  });
99
103
  let e = null;
100
- I.type === "USER" ? e = await O(i, I.id, R) : I.type === "GROUP" && (e = await k(i, I.id, R)), e && N("bigconsole.dashboard.shared", {
101
- dashboardId: i,
104
+ I.type === "USER" ? e = await O(a, I.id, R) : I.type === "GROUP" && (e = await k(a, I.id, R)), e && N("bigconsole.dashboard.shared", {
105
+ dashboardId: a,
102
106
  permission: R,
103
107
  recipientType: I.type
104
- }), e ? (L(null), F("")) : X(w("bigconsole.share.error.grantFailed", "Access could not be granted. Review the recipient and try again."));
108
+ }), e ? (L(null), F("")) : Y(w("bigconsole.share.error.grantFailed", "Access could not be granted. Review the recipient and try again."));
105
109
  }, [
106
- Z.workspaceId,
110
+ X.workspaceId,
107
111
  w,
108
112
  E,
109
- i,
113
+ a,
110
114
  N,
111
115
  I,
112
116
  R,
113
117
  k,
114
118
  O
115
- ]), oe = o(async (e, t) => {
119
+ ]), ue = o(async (e, t) => {
116
120
  await A({
117
121
  id: e,
118
122
  permission: t
119
123
  });
120
- }, [A]), se = o(async (e) => {
124
+ }, [A]), de = o(async (e) => {
121
125
  window.confirm("Are you sure you want to revoke this access?") && await j(e);
122
- }, [j]), ce = o(async () => {
123
- window.confirm("Are you sure you want to revoke all shared access?") && await M(i);
124
- }, [i, M]), le = o(async (e) => {
126
+ }, [j]), fe = o(async () => {
127
+ window.confirm("Are you sure you want to revoke all shared access?") && await M(a);
128
+ }, [a, M]), pe = o(async (e) => {
125
129
  if (b && e !== y) {
126
- J(null), K(!0);
130
+ q(null), G(!0);
127
131
  try {
128
132
  await b(e);
129
133
  } catch (e) {
130
- J(e instanceof Error ? e.message : "Could not update general access.");
134
+ q(e instanceof Error ? e.message : "Could not update general access.");
131
135
  } finally {
132
- K(!1);
136
+ G(!1);
133
137
  }
134
138
  }
135
- }, [b, y]), ue = o(async () => {
139
+ }, [b, y]), me = o(async () => {
136
140
  try {
137
- await navigator.clipboard.writeText(B), H(!0), setTimeout(() => H(!1), 2e3);
141
+ await navigator.clipboard.writeText(z), V(!0), setTimeout(() => V(!1), 2e3);
138
142
  } catch {
139
- X(w("bigconsole.share.error.copyFailed", "The link could not be copied. Select the link and copy it manually."));
143
+ Y(w("bigconsole.share.error.copyFailed", "The link could not be copied. Select the link and copy it manually."));
140
144
  }
141
- }, [B, w]), $ = Z.results;
142
- return m ? /* @__PURE__ */ f(ee, {
145
+ }, [z, w]), $ = X.results;
146
+ return m ? /* @__PURE__ */ f(u, {
143
147
  open: m,
144
148
  onOpenChange: (e) => {
145
149
  e || v();
146
150
  },
147
- children: /* @__PURE__ */ p(u, {
151
+ children: /* @__PURE__ */ p(re, {
148
152
  showCloseButton: !1,
149
153
  "data-testid": "share-dialog",
150
154
  className: "flex w-full flex-col gap-0 overflow-hidden rounded-card p-0 sm:w-[calc(100%-2rem)] sm:max-w-[520px]",
@@ -172,7 +176,7 @@ function y({ dashboardId: i, dashboardName: c, isOpen: m, onClose: v, visibility
172
176
  justifyContent: "space-between",
173
177
  backgroundColor: h.bgPrimary
174
178
  },
175
- children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f(ne, {
179
+ children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f(ie, {
176
180
  style: {
177
181
  margin: 0,
178
182
  fontSize: "18px",
@@ -180,7 +184,7 @@ function y({ dashboardId: i, dashboardName: c, isOpen: m, onClose: v, visibility
180
184
  color: h.textPrimary
181
185
  },
182
186
  children: "Share Dashboard"
183
- }), /* @__PURE__ */ f(te, {
187
+ }), /* @__PURE__ */ f(d, {
184
188
  style: {
185
189
  margin: "4px 0 0",
186
190
  fontSize: "13px",
@@ -217,14 +221,14 @@ function y({ dashboardId: i, dashboardName: c, isOpen: m, onClose: v, visibility
217
221
  children: ["people", "embed"].map((e) => /* @__PURE__ */ f("button", {
218
222
  type: "button",
219
223
  role: "tab",
220
- "aria-selected": U === e,
221
- onClick: () => W(e),
224
+ "aria-selected": H === e,
225
+ onClick: () => U(e),
222
226
  style: {
223
227
  padding: "10px 12px",
224
228
  background: "none",
225
229
  border: "none",
226
- borderBottom: `2px solid ${U === e ? h.actionPrimaryBg : "transparent"}`,
227
- color: U === e ? h.textPrimary : h.textSecondary,
230
+ borderBottom: `2px solid ${H === e ? h.actionPrimaryBg : "transparent"}`,
231
+ color: H === e ? h.textPrimary : h.textSecondary,
228
232
  fontSize: "13px",
229
233
  fontWeight: 600,
230
234
  cursor: "pointer"
@@ -232,15 +236,15 @@ function y({ dashboardId: i, dashboardName: c, isOpen: m, onClose: v, visibility
232
236
  children: e === "people" ? "People" : "Publish to web"
233
237
  }, e))
234
238
  }),
235
- U === "embed" && /* @__PURE__ */ f("div", {
239
+ H === "embed" && /* @__PURE__ */ f("div", {
236
240
  className: "min-h-0 flex-1 overflow-y-auto",
237
241
  style: { backgroundColor: h.bgPrimary },
238
242
  children: /* @__PURE__ */ f(n, {
239
- dashboardId: i,
243
+ dashboardId: a,
240
244
  colors: h
241
245
  })
242
246
  }),
243
- U === "people" && /* @__PURE__ */ p("div", {
247
+ H === "people" && /* @__PURE__ */ p("div", {
244
248
  className: "flex min-h-0 flex-1 flex-col gap-section-gap overflow-y-auto p-card-padding",
245
249
  style: { backgroundColor: h.bgPrimary },
246
250
  children: [
@@ -264,8 +268,8 @@ function y({ dashboardId: i, dashboardName: c, isOpen: m, onClose: v, visibility
264
268
  "aria-label": "General access",
265
269
  "data-testid": "share-visibility",
266
270
  value: y,
267
- disabled: !S || G,
268
- onChange: (e) => void le(e.target.value),
271
+ disabled: !S || W,
272
+ onChange: (e) => void pe(e.target.value),
269
273
  style: {
270
274
  padding: "10px 12px",
271
275
  border: `1px solid ${h.borderDefault}`,
@@ -273,8 +277,8 @@ function y({ dashboardId: i, dashboardName: c, isOpen: m, onClose: v, visibility
273
277
  fontSize: "13px",
274
278
  backgroundColor: h.bgPrimary,
275
279
  color: h.textPrimary,
276
- cursor: !S || G ? "not-allowed" : "pointer",
277
- opacity: !S || G ? .6 : 1
280
+ cursor: !S || W ? "not-allowed" : "pointer",
281
+ opacity: !S || W ? .6 : 1
278
282
  },
279
283
  children: g.map((e) => /* @__PURE__ */ f("option", {
280
284
  value: e.value,
@@ -296,13 +300,13 @@ function y({ dashboardId: i, dashboardName: c, isOpen: m, onClose: v, visibility
296
300
  },
297
301
  children: "You don't have permission to change general access."
298
302
  }),
299
- q && /* @__PURE__ */ f("p", {
303
+ K && /* @__PURE__ */ f("p", {
300
304
  style: {
301
305
  margin: "6px 0 0",
302
306
  fontSize: "11px",
303
307
  color: h.statusErrorText
304
308
  },
305
- children: q
309
+ children: K
306
310
  })
307
311
  ]
308
312
  }),
@@ -321,7 +325,7 @@ function y({ dashboardId: i, dashboardName: c, isOpen: m, onClose: v, visibility
321
325
  },
322
326
  children: [/* @__PURE__ */ f("input", {
323
327
  type: "text",
324
- value: B,
328
+ value: z,
325
329
  readOnly: !0,
326
330
  style: {
327
331
  flex: 1,
@@ -333,10 +337,10 @@ function y({ dashboardId: i, dashboardName: c, isOpen: m, onClose: v, visibility
333
337
  color: h.textPrimary
334
338
  }
335
339
  }), /* @__PURE__ */ f("button", {
336
- onClick: ue,
340
+ onClick: me,
337
341
  style: {
338
342
  padding: "10px 16px",
339
- backgroundColor: V ? h.statusSuccessBg : h.actionPrimaryBg,
343
+ backgroundColor: B ? h.statusSuccessBg : h.actionPrimaryBg,
340
344
  color: "var(--color-action-primary-text)",
341
345
  border: "none",
342
346
  borderRadius: "6px",
@@ -345,14 +349,14 @@ function y({ dashboardId: i, dashboardName: c, isOpen: m, onClose: v, visibility
345
349
  fontWeight: 500,
346
350
  minWidth: "80px"
347
351
  },
348
- children: V ? "Copied!" : "Copy"
352
+ children: B ? "Copied!" : "Copy"
349
353
  })]
350
354
  })]
351
355
  }),
352
- (re || Y) && /* @__PURE__ */ f("p", {
356
+ (oe || J) && /* @__PURE__ */ f("p", {
353
357
  role: "alert",
354
358
  style: { color: h.statusErrorText },
355
- children: Y || w("bigconsole.share.error.loadFailed", "Dashboard access could not be loaded or updated. Try again.")
359
+ children: J || w("bigconsole.share.error.loadFailed", "Dashboard access could not be loaded or updated. Try again.")
356
360
  }),
357
361
  /* @__PURE__ */ p("section", {
358
362
  "aria-labelledby": "share-invite-heading",
@@ -371,29 +375,29 @@ function y({ dashboardId: i, dashboardName: c, isOpen: m, onClose: v, visibility
371
375
  },
372
376
  children: w("bigconsole.share.directory.scopeHint", "Only members and groups from the current workspace are listed.")
373
377
  }),
374
- Z.loading && /* @__PURE__ */ f("p", {
378
+ X.loading && /* @__PURE__ */ f("p", {
375
379
  role: "status",
376
380
  children: w("bigconsole.share.directory.loading", "Loading workspace recipients…")
377
381
  }),
378
- Z.error && /* @__PURE__ */ p("div", {
382
+ X.error && /* @__PURE__ */ p("div", {
379
383
  role: "alert",
380
384
  children: [/* @__PURE__ */ f("p", { children: w("bigconsole.share.directory.loadFailed", "The workspace directory could not be loaded. Your access may not allow directory lookup.") }), /* @__PURE__ */ f("button", {
381
385
  type: "button",
382
- onClick: Z.retry,
386
+ onClick: X.retry,
383
387
  children: w("bigconsole.share.directory.retry", "Retry directory")
384
388
  })]
385
389
  }),
386
- P && !I && !Z.loading && !Z.error && $.length === 0 && /* @__PURE__ */ f("p", {
390
+ P && !I && !X.loading && !X.error && $.length === 0 && /* @__PURE__ */ f("p", {
387
391
  role: "status",
388
392
  children: w("bigconsole.share.directory.empty", "No matching workspace members or groups.")
389
393
  }),
390
- Z.hasMoreMembers && /* @__PURE__ */ f("button", {
394
+ X.hasMoreMembers && /* @__PURE__ */ f("button", {
391
395
  type: "button",
392
- disabled: Z.loading,
393
- onClick: Z.loadMoreMembers,
396
+ disabled: X.loading,
397
+ onClick: X.loadMoreMembers,
394
398
  children: w("bigconsole.share.directory.loadMore", "Load more workspace members")
395
399
  }),
396
- Z.hasMoreGroups && /* @__PURE__ */ f("p", { children: w("bigconsole.share.directory.moreGroups", "More groups match. Narrow your search to find a specific group.") }),
400
+ X.hasMoreGroups && /* @__PURE__ */ f("p", { children: w("bigconsole.share.directory.moreGroups", "More groups match. Narrow your search to find a specific group.") }),
397
401
  /* @__PURE__ */ p("div", {
398
402
  style: {
399
403
  display: "flex",
@@ -483,7 +487,7 @@ function y({ dashboardId: i, dashboardName: c, isOpen: m, onClose: v, visibility
483
487
  /* @__PURE__ */ f("select", {
484
488
  "aria-label": w("bigconsole.share.permissionLabel", "Access permission"),
485
489
  value: R,
486
- onChange: (e) => z(e.target.value),
490
+ onChange: (e) => se(e.target.value),
487
491
  style: {
488
492
  padding: "10px 12px",
489
493
  border: `1px solid ${h.borderDefault}`,
@@ -498,8 +502,8 @@ function y({ dashboardId: i, dashboardName: c, isOpen: m, onClose: v, visibility
498
502
  }, e.value))
499
503
  }),
500
504
  /* @__PURE__ */ f("button", {
501
- onClick: ae,
502
- disabled: !I || E || I.workspaceId !== Z.workspaceId,
505
+ onClick: le,
506
+ disabled: !I || E || I.workspaceId !== X.workspaceId,
503
507
  style: {
504
508
  padding: "10px 16px",
505
509
  backgroundColor: I ? h.actionPrimaryBg : h.bgTertiary,
@@ -537,7 +541,7 @@ function y({ dashboardId: i, dashboardName: c, isOpen: m, onClose: v, visibility
537
541
  ")"
538
542
  ]
539
543
  }), T.length > 0 && /* @__PURE__ */ f("button", {
540
- onClick: ce,
544
+ onClick: fe,
541
545
  style: {
542
546
  padding: "4px 8px",
543
547
  backgroundColor: "transparent",
@@ -568,8 +572,8 @@ function y({ dashboardId: i, dashboardName: c, isOpen: m, onClose: v, visibility
568
572
  },
569
573
  children: T.map((e) => /* @__PURE__ */ f(x, {
570
574
  share: e,
571
- onUpdatePermission: oe,
572
- onRevoke: se,
575
+ onUpdatePermission: ue,
576
+ onRevoke: de,
573
577
  colors: h
574
578
  }, e.id))
575
579
  })]