@burdenoff/microfe-bigconsole 2026.1123.7 → 2026.1124.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/AsOfControl.js +2 -2
- package/dist/bigconsole/components/dashboard/DashboardCommentsDrawer.js +107 -106
- package/dist/bigconsole/components/dashboard/DashboardGalleryCard.d.ts +34 -0
- package/dist/bigconsole/components/dashboard/DashboardGalleryCard.js +123 -0
- package/dist/bigconsole/components/dashboard/DashboardReviewDialog.js +1 -1
- package/dist/bigconsole/components/dashboard/DashboardStatusPill.js +19 -35
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +119 -116
- package/dist/bigconsole/components/dashboard/LiveCanvasToggle.js +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.d.ts +0 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +172 -170
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +210 -208
- package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js +97 -97
- package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -0
- package/dist/bigconsole/components/datasink/AlertExecutionHistory.js +92 -92
- package/dist/bigconsole/components/datasink/AlertRuleEditor.js +149 -149
- package/dist/bigconsole/components/datasink/AnomalyDetectorPanel.js +54 -54
- package/dist/bigconsole/components/datasink/DataSinkStatusBadge.js +30 -37
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +4 -4
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +130 -129
- package/dist/bigconsole/components/datasink/SetupStateBadge.js +24 -33
- package/dist/bigconsole/components/datasink/SinkWorkflowLinkForm.js +38 -38
- package/dist/bigconsole/components/explore/CreateQueryWidget.js +57 -56
- package/dist/bigconsole/components/explore/SqlDraftEditor.js +140 -140
- package/dist/bigconsole/components/explore/VisualBuilder.js +85 -84
- package/dist/bigconsole/components/explore/queryAccess/GrantsPanel.js +168 -167
- package/dist/bigconsole/components/explore/queryAccess/QueryAccessAdmin.js +2 -2
- package/dist/bigconsole/components/explore/queryAccess/RelationEditor.js +118 -117
- package/dist/bigconsole/components/insights/BoardLintPanel.js +2 -2
- package/dist/bigconsole/components/insights/OutlierSpottingDialog.js +123 -123
- package/dist/bigconsole/components/kpi-change/KpiChangePanel.js +2 -2
- package/dist/bigconsole/components/narrative/NarrativePanel.js +1 -1
- package/dist/bigconsole/components/overview/DataHealthCard.js +3 -0
- package/dist/bigconsole/components/overview/RecentDashboardsPanel.js +3 -0
- package/dist/bigconsole/components/parser/ParserStatusBadge.js +25 -28
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +23 -22
- package/dist/bigconsole/components/pipeline/PipelineStatusBadge.js +15 -26
- package/dist/bigconsole/components/reconcile/KpiReconcileDialog.js +24 -24
- package/dist/bigconsole/components/settings/WidgetCatalogSection.js +1 -1
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +188 -187
- package/dist/bigconsole/components/widgets/FilterNotAppliedNotice.js +1 -1
- package/dist/bigconsole/components/widgets/UnsupportedDataSourceNotice.js +1 -1
- package/dist/bigconsole/components/widgets/WidgetCompareView.js +3 -1
- package/dist/bigconsole/components/widgets/WidgetHeader.js +1 -1
- package/dist/bigconsole/components/widgets/advanced/AdvancedWidgetConfig.js +45 -44
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js +151 -147
- package/dist/bigconsole/components/widgets/chart/ReferenceLinesEditor.js +48 -47
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js +1 -1
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +139 -138
- package/dist/bigconsole/components/widgets/form/FormWidget.js +149 -148
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +80 -77
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +58 -56
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +75 -73
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +86 -85
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +80 -77
- package/dist/bigconsole/components/widgets/retention/RetentionView.js +1 -1
- package/dist/bigconsole/components/widgets/table/TableConfig.js +214 -211
- package/dist/bigconsole/components/widgets/table/TablePagination.js +59 -58
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +140 -138
- package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js +74 -66
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +48 -48
- package/dist/bigconsole/components/workflow/WorkflowStatusBadge.js +28 -37
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +69 -69
- package/dist/bigconsole/hooks/useDashboardListQuery.d.ts +22 -0
- package/dist/bigconsole/hooks/useDashboardListQuery.js +39 -0
- package/dist/bigconsole/pages/AdminPage.js +147 -146
- package/dist/bigconsole/pages/DashboardViewPage.js +2 -0
- package/dist/bigconsole/pages/DashboardsPage.js +638 -855
- package/dist/bigconsole/pages/DataParsersPage.js +5 -0
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +4 -1
- package/dist/bigconsole/pages/DataSinkViewPage.js +263 -261
- package/dist/bigconsole/pages/DataSinksPage.js +210 -186
- package/dist/bigconsole/pages/InsightsPage.js +386 -383
- package/dist/bigconsole/pages/ParserBuilderPage.js +413 -413
- package/dist/bigconsole/pages/ParserViewPage.js +2 -0
- package/dist/bigconsole/pages/PipelineBuilderPage.js +279 -276
- package/dist/bigconsole/pages/PipelineViewPage.js +3 -0
- package/dist/bigconsole/pages/PipelinesPage.js +198 -165
- package/dist/bigconsole/pages/SettingsPage.js +160 -160
- package/dist/bigconsole/pages/WidgetDemoPage.js +2 -0
- package/dist/bigconsole/pages/WorkflowViewPage.js +5 -0
- package/dist/bigconsole/pages/WorkflowsPage.js +144 -123
- package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +1 -1
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +123 -122
- package/dist/bigconsole/utils/dashboardGallery.d.ts +84 -0
- package/dist/bigconsole/utils/dashboardGallery.js +93 -0
- package/dist/bigconsole/utils/statusTone.d.ts +17 -0
- package/dist/bigconsole/utils/statusTone.js +44 -0
- package/package.json +4 -4
|
@@ -3,10 +3,11 @@ import { useQueryAccessMutations as t, useQueryGrants as n, useWorkspaceMemberDi
|
|
|
3
3
|
import { QUERY_ACCESS_LIMITS as i, grantInput as a, grantToDraft as o, validateGrantDraft as s } from "../../../utils/queryAccess.js";
|
|
4
4
|
import { ErrorLine as c, buttonClass as l, cellClass as u, dangerButtonClass as d, headerCellClass as f, hintClass as p, inputClass as m, labelClass as h, primaryButtonClass as g, useProblemText as _, useQueryAccessErrorText as v } from "./shared.js";
|
|
5
5
|
import { useId as y, useMemo as b, useState as x } from "react";
|
|
6
|
-
import {
|
|
6
|
+
import { ThemedSelect as S } from "@burdenoff/fe-libs/ui";
|
|
7
|
+
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
7
8
|
// src/bigconsole/components/explore/queryAccess/GrantsPanel.tsx
|
|
8
|
-
var
|
|
9
|
-
let m = e(), h = v(), _ = y(),
|
|
9
|
+
var T = ({ workspaceId: i, sinkName: a, relation: o, onClose: s }) => {
|
|
10
|
+
let m = e(), h = v(), _ = y(), S = n(i, o.dataSinkId), T = r(i, !0), { revokeGrant: D } = t(i), [O, k] = x(null), [A, j] = x(null), [M, N] = x(null), [P, F] = x(null), I = b(() => new Map((T.data ?? []).map((e) => [e.userId, e])), [T.data]), L = (e) => o.fields.find((t) => t.id === e)?.name ?? e, R = (e) => {
|
|
10
11
|
let t = I.get(e);
|
|
11
12
|
return t ? t.email ? `${t.displayName} (${t.email})` : t.displayName : e;
|
|
12
13
|
}, z = (e) => e.allRows ? m("bigconsole.queryAccess.grants.allRows", "All rows") : e.rowFilter ? m("bigconsole.queryAccess.grants.filterSummary", "{{field}} in {{values}}", {
|
|
@@ -22,30 +23,30 @@ var w = ({ workspaceId: i, sinkName: a, relation: o, onClose: s }) => {
|
|
|
22
23
|
},
|
|
23
24
|
onError: (e) => N(h(e))
|
|
24
25
|
});
|
|
25
|
-
}, H = new Set((
|
|
26
|
-
return /* @__PURE__ */
|
|
26
|
+
}, H = new Set((S.data ?? []).map((e) => e.actorId));
|
|
27
|
+
return /* @__PURE__ */ w("section", {
|
|
27
28
|
"aria-labelledby": _,
|
|
28
29
|
"data-testid": "bigconsole-query-grants",
|
|
29
30
|
className: "rounded-card border border-border-seam bg-bg-canvas p-4",
|
|
30
31
|
children: [
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ w("div", {
|
|
32
33
|
className: "mb-3 flex items-start justify-between gap-2",
|
|
33
|
-
children: [/* @__PURE__ */
|
|
34
|
+
children: [/* @__PURE__ */ w("div", {
|
|
34
35
|
className: "min-w-0 flex-1",
|
|
35
|
-
children: [/* @__PURE__ */
|
|
36
|
+
children: [/* @__PURE__ */ C("h3", {
|
|
36
37
|
id: _,
|
|
37
38
|
className: "text-body-md font-semibold text-text-primary",
|
|
38
39
|
children: m("bigconsole.queryAccess.grants.title", "Grants on {{relation}} ({{sink}})", {
|
|
39
40
|
relation: o.name,
|
|
40
41
|
sink: a
|
|
41
42
|
})
|
|
42
|
-
}), /* @__PURE__ */
|
|
43
|
+
}), /* @__PURE__ */ C("p", {
|
|
43
44
|
className: p,
|
|
44
45
|
children: m("bigconsole.queryAccess.grants.hint", "A grant gives one workspace member SQL and Explore access to this relation. Fields a grant does not list are omitted from that member’s schema. The member also needs Data Sink read permission.")
|
|
45
46
|
})]
|
|
46
|
-
}), /* @__PURE__ */
|
|
47
|
+
}), /* @__PURE__ */ w("div", {
|
|
47
48
|
className: "flex shrink-0 gap-2",
|
|
48
|
-
children: [/* @__PURE__ */
|
|
49
|
+
children: [/* @__PURE__ */ C("button", {
|
|
49
50
|
type: "button",
|
|
50
51
|
className: g,
|
|
51
52
|
disabled: O?.mode === "new",
|
|
@@ -53,7 +54,7 @@ var w = ({ workspaceId: i, sinkName: a, relation: o, onClose: s }) => {
|
|
|
53
54
|
N(null), F(null), k({ mode: "new" });
|
|
54
55
|
},
|
|
55
56
|
children: m("bigconsole.queryAccess.grants.add", "Add grant")
|
|
56
|
-
}), /* @__PURE__ */
|
|
57
|
+
}), /* @__PURE__ */ C("button", {
|
|
57
58
|
type: "button",
|
|
58
59
|
className: l,
|
|
59
60
|
onClick: s,
|
|
@@ -61,107 +62,107 @@ var w = ({ workspaceId: i, sinkName: a, relation: o, onClose: s }) => {
|
|
|
61
62
|
})]
|
|
62
63
|
})]
|
|
63
64
|
}),
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ w("div", {
|
|
65
66
|
className: "flex flex-col gap-2",
|
|
66
|
-
children: [P && /* @__PURE__ */
|
|
67
|
+
children: [P && /* @__PURE__ */ C("p", {
|
|
67
68
|
role: "status",
|
|
68
69
|
className: "text-body-sm text-status-success-text",
|
|
69
70
|
children: P
|
|
70
|
-
}), /* @__PURE__ */
|
|
71
|
+
}), /* @__PURE__ */ C(c, { message: M })]
|
|
71
72
|
}),
|
|
72
|
-
|
|
73
|
+
S.error ? /* @__PURE__ */ w("div", {
|
|
73
74
|
role: "alert",
|
|
74
75
|
className: "flex flex-wrap items-center gap-2 text-body-sm text-status-error-text",
|
|
75
|
-
children: [/* @__PURE__ */
|
|
76
|
+
children: [/* @__PURE__ */ w("span", { children: [
|
|
76
77
|
m("bigconsole.queryAccess.grants.loadFailed", "The grants could not be loaded."),
|
|
77
78
|
" ",
|
|
78
|
-
h(
|
|
79
|
-
] }), /* @__PURE__ */
|
|
79
|
+
h(S.error)
|
|
80
|
+
] }), /* @__PURE__ */ C("button", {
|
|
80
81
|
type: "button",
|
|
81
82
|
className: l,
|
|
82
|
-
onClick: () => void
|
|
83
|
+
onClick: () => void S.refetch(),
|
|
83
84
|
children: m("bigconsole.queryAccess.retry", "Retry")
|
|
84
85
|
})]
|
|
85
|
-
}) :
|
|
86
|
+
}) : S.isPending ? /* @__PURE__ */ C("p", {
|
|
86
87
|
role: "status",
|
|
87
88
|
className: "text-body-sm text-text-muted",
|
|
88
89
|
children: m("bigconsole.queryAccess.grants.loading", "Loading grants…")
|
|
89
|
-
}) :
|
|
90
|
+
}) : S.data.length === 0 ? /* @__PURE__ */ C("p", {
|
|
90
91
|
className: "text-body-sm text-text-muted",
|
|
91
92
|
children: m("bigconsole.queryAccess.grants.empty", "Nobody has access to this relation yet.")
|
|
92
|
-
}) : /* @__PURE__ */
|
|
93
|
+
}) : /* @__PURE__ */ C("div", {
|
|
93
94
|
className: "overflow-x-auto",
|
|
94
|
-
children: /* @__PURE__ */
|
|
95
|
+
children: /* @__PURE__ */ w("table", {
|
|
95
96
|
className: "w-full min-w-[720px] border-collapse",
|
|
96
97
|
"data-testid": "bigconsole-query-grant-list",
|
|
97
|
-
children: [/* @__PURE__ */
|
|
98
|
+
children: [/* @__PURE__ */ C("thead", { children: /* @__PURE__ */ w("tr", {
|
|
98
99
|
className: "border-b border-border-seam",
|
|
99
100
|
children: [
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ C("th", {
|
|
101
102
|
scope: "col",
|
|
102
103
|
className: f,
|
|
103
104
|
children: m("bigconsole.queryAccess.grants.member", "Member")
|
|
104
105
|
}),
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ C("th", {
|
|
106
107
|
scope: "col",
|
|
107
108
|
className: f,
|
|
108
109
|
children: m("bigconsole.queryAccess.grants.rows", "Rows")
|
|
109
110
|
}),
|
|
110
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ C("th", {
|
|
111
112
|
scope: "col",
|
|
112
113
|
className: f,
|
|
113
114
|
children: m("bigconsole.queryAccess.grants.fields", "Visible fields")
|
|
114
115
|
}),
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ C("th", {
|
|
116
117
|
scope: "col",
|
|
117
118
|
className: f,
|
|
118
|
-
children: /* @__PURE__ */
|
|
119
|
+
children: /* @__PURE__ */ C("span", {
|
|
119
120
|
className: "sr-only",
|
|
120
121
|
children: m("bigconsole.queryAccess.columns.actions", "Actions")
|
|
121
122
|
})
|
|
122
123
|
})
|
|
123
124
|
]
|
|
124
|
-
}) }), /* @__PURE__ */
|
|
125
|
+
}) }), /* @__PURE__ */ C("tbody", { children: S.data.map((e) => {
|
|
125
126
|
let t = R(e.actorId);
|
|
126
|
-
return /* @__PURE__ */
|
|
127
|
+
return /* @__PURE__ */ w("tr", {
|
|
127
128
|
"data-actor-id": e.actorId,
|
|
128
129
|
className: "border-b border-border-seam last:border-b-0",
|
|
129
130
|
children: [
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ w("td", {
|
|
131
132
|
className: u,
|
|
132
|
-
children: [/* @__PURE__ */
|
|
133
|
+
children: [/* @__PURE__ */ C("div", {
|
|
133
134
|
className: "text-text-primary",
|
|
134
135
|
children: t
|
|
135
|
-
}), !e.valid && /* @__PURE__ */
|
|
136
|
+
}), !e.valid && /* @__PURE__ */ C("div", {
|
|
136
137
|
className: "mt-1 text-xs text-[var(--color-status-warning-text)]",
|
|
137
138
|
children: m("bigconsole.queryAccess.grants.invalid", "The query reader would refuse this grant. Edit and save it to repair it.")
|
|
138
139
|
})]
|
|
139
140
|
}),
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ C("td", {
|
|
141
142
|
className: `${u} text-text-secondary`,
|
|
142
143
|
children: z(e)
|
|
143
144
|
}),
|
|
144
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ C("td", {
|
|
145
146
|
className: `${u} text-text-secondary`,
|
|
146
147
|
children: B(e) || "—"
|
|
147
148
|
}),
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ C("td", {
|
|
149
150
|
className: `${u} text-right`,
|
|
150
|
-
children: A === e.actorId ? /* @__PURE__ */
|
|
151
|
+
children: A === e.actorId ? /* @__PURE__ */ w("div", {
|
|
151
152
|
className: "flex flex-col items-end gap-2",
|
|
152
153
|
role: "group",
|
|
153
|
-
children: [/* @__PURE__ */
|
|
154
|
+
children: [/* @__PURE__ */ C("span", {
|
|
154
155
|
className: "text-body-sm text-text-primary",
|
|
155
156
|
children: m("bigconsole.queryAccess.grants.revokeConfirm", "Revoke access for {{member}}?", { member: t })
|
|
156
|
-
}), /* @__PURE__ */
|
|
157
|
+
}), /* @__PURE__ */ w("div", {
|
|
157
158
|
className: "flex gap-2",
|
|
158
|
-
children: [/* @__PURE__ */
|
|
159
|
+
children: [/* @__PURE__ */ C("button", {
|
|
159
160
|
type: "button",
|
|
160
161
|
className: d,
|
|
161
162
|
disabled: D.isPending,
|
|
162
163
|
onClick: () => V(e),
|
|
163
164
|
children: D.isPending ? m("bigconsole.queryAccess.grants.revoking", "Revoking…") : m("bigconsole.queryAccess.grants.revoke", "Revoke")
|
|
164
|
-
}), /* @__PURE__ */
|
|
165
|
+
}), /* @__PURE__ */ C("button", {
|
|
165
166
|
type: "button",
|
|
166
167
|
className: l,
|
|
167
168
|
disabled: D.isPending,
|
|
@@ -169,9 +170,9 @@ var w = ({ workspaceId: i, sinkName: a, relation: o, onClose: s }) => {
|
|
|
169
170
|
children: m("bigconsole.queryAccess.cancel", "Cancel")
|
|
170
171
|
})]
|
|
171
172
|
})]
|
|
172
|
-
}) : /* @__PURE__ */
|
|
173
|
+
}) : /* @__PURE__ */ w("div", {
|
|
173
174
|
className: "flex justify-end gap-2",
|
|
174
|
-
children: [/* @__PURE__ */
|
|
175
|
+
children: [/* @__PURE__ */ C("button", {
|
|
175
176
|
type: "button",
|
|
176
177
|
className: l,
|
|
177
178
|
"aria-label": `${m("bigconsole.queryAccess.grants.edit", "Edit")} ${t}`,
|
|
@@ -182,7 +183,7 @@ var w = ({ workspaceId: i, sinkName: a, relation: o, onClose: s }) => {
|
|
|
182
183
|
});
|
|
183
184
|
},
|
|
184
185
|
children: m("bigconsole.queryAccess.grants.edit", "Edit")
|
|
185
|
-
}), /* @__PURE__ */
|
|
186
|
+
}), /* @__PURE__ */ C("button", {
|
|
186
187
|
type: "button",
|
|
187
188
|
className: d,
|
|
188
189
|
"aria-label": `${m("bigconsole.queryAccess.grants.revoke", "Revoke")} ${t}`,
|
|
@@ -198,13 +199,13 @@ var w = ({ workspaceId: i, sinkName: a, relation: o, onClose: s }) => {
|
|
|
198
199
|
}) })]
|
|
199
200
|
})
|
|
200
201
|
}),
|
|
201
|
-
O && /* @__PURE__ */
|
|
202
|
+
O && /* @__PURE__ */ C(E, {
|
|
202
203
|
workspaceId: i,
|
|
203
204
|
relation: o,
|
|
204
205
|
grant: O.mode === "edit" ? O.grant : void 0,
|
|
205
|
-
members:
|
|
206
|
-
membersLoading:
|
|
207
|
-
membersError:
|
|
206
|
+
members: T.data ?? [],
|
|
207
|
+
membersLoading: T.isPending,
|
|
208
|
+
membersError: T.error ? h(T.error) : null,
|
|
208
209
|
alreadyGranted: H,
|
|
209
210
|
memberLabel: R,
|
|
210
211
|
onCancel: () => k(null),
|
|
@@ -214,229 +215,229 @@ var w = ({ workspaceId: i, sinkName: a, relation: o, onClose: s }) => {
|
|
|
214
215
|
}, O.mode === "edit" ? `edit-${O.grant.actorId}` : "new")
|
|
215
216
|
]
|
|
216
217
|
});
|
|
217
|
-
},
|
|
218
|
-
let
|
|
219
|
-
let e =
|
|
220
|
-
return f.filter((t) => !
|
|
218
|
+
}, E = ({ workspaceId: n, relation: r, grant: d, members: f, membersLoading: T, membersError: E, alreadyGranted: D, memberLabel: O, onCancel: k, onSaved: A }) => {
|
|
219
|
+
let j = e(), M = v(), N = _(), { setGrant: P } = t(n), F = y(), I = y(), L = y(), R = y(), z = y(), [B, V] = x(() => o(d, r.fields)), [H, U] = x(""), [W, G] = x(null), K = b(() => {
|
|
220
|
+
let e = H.trim().toLowerCase();
|
|
221
|
+
return f.filter((t) => !D.has(t.userId) && (!e || t.displayName.toLowerCase().includes(e) || (t.email ?? "").toLowerCase().includes(e)));
|
|
221
222
|
}, [
|
|
222
223
|
f,
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
]),
|
|
224
|
+
D,
|
|
225
|
+
H
|
|
226
|
+
]), q = r.fields.find((e) => e.id === B.filterFieldId), J = (e, t) => V((n) => ({
|
|
226
227
|
...n,
|
|
227
228
|
decisions: {
|
|
228
229
|
...n.decisions,
|
|
229
230
|
[e]: t
|
|
230
231
|
}
|
|
231
|
-
})),
|
|
232
|
-
|
|
233
|
-
let e = s(
|
|
234
|
-
e ?
|
|
232
|
+
})), Y = () => {
|
|
233
|
+
G(null);
|
|
234
|
+
let e = s(B, r.fields);
|
|
235
|
+
e ? G(N(e)) : P.mutate({
|
|
235
236
|
dataSinkId: r.dataSinkId,
|
|
236
|
-
input: a(
|
|
237
|
+
input: a(B, r.fields)
|
|
237
238
|
}, {
|
|
238
|
-
onSuccess:
|
|
239
|
-
onError: (e) =>
|
|
239
|
+
onSuccess: A,
|
|
240
|
+
onError: (e) => G(M(e))
|
|
240
241
|
});
|
|
241
|
-
},
|
|
242
|
-
return /* @__PURE__ */
|
|
242
|
+
}, X = (e) => e === "READ" ? j("bigconsole.queryAccess.grant.read", "Read") : e === "REDACT" ? j("bigconsole.queryAccess.grant.redact", "Redacted") : j("bigconsole.queryAccess.grant.omit", "Omitted");
|
|
243
|
+
return /* @__PURE__ */ w("div", {
|
|
243
244
|
role: "group",
|
|
244
|
-
"aria-labelledby":
|
|
245
|
+
"aria-labelledby": F,
|
|
245
246
|
"data-testid": "bigconsole-query-grant-editor",
|
|
246
247
|
className: "mt-4 rounded-card border border-border-seam bg-bg-surface p-4",
|
|
247
248
|
children: [
|
|
248
|
-
/* @__PURE__ */
|
|
249
|
-
id:
|
|
249
|
+
/* @__PURE__ */ C("h4", {
|
|
250
|
+
id: F,
|
|
250
251
|
className: "mb-3 text-body-md font-semibold text-text-primary",
|
|
251
|
-
children: d ?
|
|
252
|
+
children: d ? j("bigconsole.queryAccess.grant.editTitle", "Edit access for {{member}}", { member: O(d.actorId) }) : j("bigconsole.queryAccess.grant.newTitle", "New grant")
|
|
252
253
|
}),
|
|
253
|
-
!d && /* @__PURE__ */
|
|
254
|
+
!d && /* @__PURE__ */ w("fieldset", {
|
|
254
255
|
className: "mb-4 max-w-xl",
|
|
255
|
-
children: [/* @__PURE__ */
|
|
256
|
+
children: [/* @__PURE__ */ C("legend", {
|
|
256
257
|
className: "block text-body-sm font-medium text-text-primary",
|
|
257
|
-
children:
|
|
258
|
-
}),
|
|
258
|
+
children: j("bigconsole.queryAccess.grant.member", "Workspace member")
|
|
259
|
+
}), E ? /* @__PURE__ */ w("p", {
|
|
259
260
|
role: "alert",
|
|
260
261
|
className: "text-body-sm text-status-error-text",
|
|
261
262
|
children: [
|
|
262
|
-
|
|
263
|
+
j("bigconsole.queryAccess.grant.membersFailed", "Workspace members could not be loaded."),
|
|
263
264
|
" ",
|
|
264
|
-
|
|
265
|
+
E
|
|
265
266
|
]
|
|
266
|
-
}) :
|
|
267
|
+
}) : T ? /* @__PURE__ */ C("p", {
|
|
267
268
|
role: "status",
|
|
268
269
|
className: "text-body-sm text-text-muted",
|
|
269
|
-
children:
|
|
270
|
-
}) : /* @__PURE__ */
|
|
270
|
+
children: j("bigconsole.queryAccess.grant.membersLoading", "Loading workspace members…")
|
|
271
|
+
}) : /* @__PURE__ */ w("div", {
|
|
271
272
|
className: "flex flex-col gap-2",
|
|
272
273
|
children: [
|
|
273
|
-
/* @__PURE__ */
|
|
274
|
-
htmlFor:
|
|
274
|
+
/* @__PURE__ */ C("label", {
|
|
275
|
+
htmlFor: I,
|
|
275
276
|
className: "sr-only",
|
|
276
|
-
children:
|
|
277
|
+
children: j("bigconsole.queryAccess.grant.searchMembers", "Search members")
|
|
277
278
|
}),
|
|
278
|
-
/* @__PURE__ */
|
|
279
|
-
id:
|
|
279
|
+
/* @__PURE__ */ C("input", {
|
|
280
|
+
id: I,
|
|
280
281
|
type: "search",
|
|
281
282
|
className: m,
|
|
282
|
-
placeholder:
|
|
283
|
-
value:
|
|
284
|
-
onChange: (e) =>
|
|
283
|
+
placeholder: j("bigconsole.queryAccess.grant.searchMembers", "Search members"),
|
|
284
|
+
value: H,
|
|
285
|
+
onChange: (e) => U(e.target.value)
|
|
285
286
|
}),
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
-
htmlFor:
|
|
287
|
+
/* @__PURE__ */ C("label", {
|
|
288
|
+
htmlFor: L,
|
|
288
289
|
className: "sr-only",
|
|
289
|
-
children:
|
|
290
|
+
children: j("bigconsole.queryAccess.grant.member", "Workspace member")
|
|
290
291
|
}),
|
|
291
|
-
/* @__PURE__ */
|
|
292
|
-
id:
|
|
292
|
+
/* @__PURE__ */ w(S, {
|
|
293
|
+
id: L,
|
|
293
294
|
className: m,
|
|
294
|
-
value:
|
|
295
|
-
onChange: (e) =>
|
|
295
|
+
value: B.actorId,
|
|
296
|
+
onChange: (e) => V((t) => ({
|
|
296
297
|
...t,
|
|
297
298
|
actorId: e.target.value
|
|
298
299
|
})),
|
|
299
|
-
children: [/* @__PURE__ */
|
|
300
|
+
children: [/* @__PURE__ */ C("option", {
|
|
300
301
|
value: "",
|
|
301
|
-
children:
|
|
302
|
-
}),
|
|
302
|
+
children: j("bigconsole.queryAccess.grant.chooseMember", "Choose a member")
|
|
303
|
+
}), K.map((e) => /* @__PURE__ */ C("option", {
|
|
303
304
|
value: e.userId,
|
|
304
305
|
children: e.email ? `${e.displayName} (${e.email})` : e.displayName
|
|
305
306
|
}, e.userId))]
|
|
306
307
|
}),
|
|
307
|
-
|
|
308
|
+
K.length === 0 && /* @__PURE__ */ C("p", {
|
|
308
309
|
className: "text-xs text-text-muted",
|
|
309
|
-
children:
|
|
310
|
+
children: j("bigconsole.queryAccess.grant.noCandidates", "No other active members match. Members who already have a grant are edited from the list.")
|
|
310
311
|
})
|
|
311
312
|
]
|
|
312
313
|
})]
|
|
313
314
|
}),
|
|
314
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ w("fieldset", {
|
|
315
316
|
className: "mb-4",
|
|
316
|
-
children: [/* @__PURE__ */
|
|
317
|
+
children: [/* @__PURE__ */ C("legend", {
|
|
317
318
|
className: h,
|
|
318
|
-
children:
|
|
319
|
-
}), /* @__PURE__ */
|
|
319
|
+
children: j("bigconsole.queryAccess.grant.rows", "Rows")
|
|
320
|
+
}), /* @__PURE__ */ w("div", {
|
|
320
321
|
className: "mt-1 flex flex-col gap-2",
|
|
321
322
|
children: [
|
|
322
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ w("label", {
|
|
323
324
|
className: "flex items-center gap-2 text-body-sm text-text-primary",
|
|
324
|
-
children: [/* @__PURE__ */
|
|
325
|
+
children: [/* @__PURE__ */ C("input", {
|
|
325
326
|
type: "radio",
|
|
326
|
-
name: `${
|
|
327
|
-
checked:
|
|
328
|
-
onChange: () =>
|
|
327
|
+
name: `${F}-rows`,
|
|
328
|
+
checked: B.rows === "all",
|
|
329
|
+
onChange: () => V((e) => ({
|
|
329
330
|
...e,
|
|
330
331
|
rows: "all"
|
|
331
332
|
}))
|
|
332
|
-
}),
|
|
333
|
+
}), j("bigconsole.queryAccess.grant.allRows", "All rows")]
|
|
333
334
|
}),
|
|
334
|
-
/* @__PURE__ */
|
|
335
|
+
/* @__PURE__ */ w("label", {
|
|
335
336
|
className: "flex items-center gap-2 text-body-sm text-text-primary",
|
|
336
|
-
children: [/* @__PURE__ */
|
|
337
|
+
children: [/* @__PURE__ */ C("input", {
|
|
337
338
|
type: "radio",
|
|
338
|
-
name: `${
|
|
339
|
-
checked:
|
|
340
|
-
onChange: () =>
|
|
339
|
+
name: `${F}-rows`,
|
|
340
|
+
checked: B.rows === "filter",
|
|
341
|
+
onChange: () => V((e) => ({
|
|
341
342
|
...e,
|
|
342
343
|
rows: "filter"
|
|
343
344
|
}))
|
|
344
|
-
}),
|
|
345
|
+
}), j("bigconsole.queryAccess.grant.filteredRows", "Only rows where a field has one of these values")]
|
|
345
346
|
}),
|
|
346
|
-
|
|
347
|
+
B.rows === "filter" && /* @__PURE__ */ w("div", {
|
|
347
348
|
className: "ml-6 grid max-w-xl gap-2",
|
|
348
|
-
children: [/* @__PURE__ */
|
|
349
|
-
/* @__PURE__ */
|
|
350
|
-
htmlFor:
|
|
349
|
+
children: [/* @__PURE__ */ w("div", { children: [
|
|
350
|
+
/* @__PURE__ */ C("label", {
|
|
351
|
+
htmlFor: R,
|
|
351
352
|
className: "block text-body-sm font-medium text-text-primary",
|
|
352
|
-
children:
|
|
353
|
+
children: j("bigconsole.queryAccess.grant.filterField", "Filter field")
|
|
353
354
|
}),
|
|
354
|
-
/* @__PURE__ */ S
|
|
355
|
-
id:
|
|
355
|
+
/* @__PURE__ */ C(S, {
|
|
356
|
+
id: R,
|
|
356
357
|
className: m,
|
|
357
|
-
value:
|
|
358
|
-
onChange: (e) =>
|
|
358
|
+
value: B.filterFieldId,
|
|
359
|
+
onChange: (e) => V((t) => ({
|
|
359
360
|
...t,
|
|
360
361
|
filterFieldId: e.target.value
|
|
361
362
|
})),
|
|
362
|
-
children: r.fields.map((e) => /* @__PURE__ */
|
|
363
|
+
children: r.fields.map((e) => /* @__PURE__ */ C("option", {
|
|
363
364
|
value: e.id,
|
|
364
365
|
children: `${e.name} (${e.type})`
|
|
365
366
|
}, e.id))
|
|
366
367
|
}),
|
|
367
|
-
/* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ C("p", {
|
|
368
369
|
className: "text-xs text-text-muted",
|
|
369
|
-
children:
|
|
370
|
+
children: j("bigconsole.queryAccess.grant.filterFieldHint", "The filter field does not have to be visible to the member.")
|
|
370
371
|
})
|
|
371
|
-
] }), /* @__PURE__ */
|
|
372
|
-
/* @__PURE__ */
|
|
373
|
-
htmlFor:
|
|
372
|
+
] }), /* @__PURE__ */ w("div", { children: [
|
|
373
|
+
/* @__PURE__ */ C("label", {
|
|
374
|
+
htmlFor: z,
|
|
374
375
|
className: "block text-body-sm font-medium text-text-primary",
|
|
375
|
-
children:
|
|
376
|
+
children: j("bigconsole.queryAccess.grant.filterValues", "Admitted values, one per line")
|
|
376
377
|
}),
|
|
377
|
-
/* @__PURE__ */
|
|
378
|
-
id:
|
|
378
|
+
/* @__PURE__ */ C("textarea", {
|
|
379
|
+
id: z,
|
|
379
380
|
className: `${m} font-mono`,
|
|
380
381
|
rows: 4,
|
|
381
382
|
spellCheck: !1,
|
|
382
|
-
value:
|
|
383
|
-
onChange: (e) =>
|
|
383
|
+
value: B.filterValues,
|
|
384
|
+
onChange: (e) => V((t) => ({
|
|
384
385
|
...t,
|
|
385
386
|
filterValues: e.target.value
|
|
386
387
|
}))
|
|
387
388
|
}),
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ C("p", {
|
|
389
390
|
className: "text-xs text-text-muted",
|
|
390
|
-
children:
|
|
391
|
+
children: q?.type === "BOOLEAN" ? j("bigconsole.queryAccess.grant.booleanHint", "Use true or false.") : j("bigconsole.queryAccess.grant.valuesHint", "Values must fit the field type. Up to {{max}} values; an empty list admits no rows.", { max: i.rowValues })
|
|
391
392
|
})
|
|
392
393
|
] })]
|
|
393
394
|
})
|
|
394
395
|
]
|
|
395
396
|
})]
|
|
396
397
|
}),
|
|
397
|
-
/* @__PURE__ */
|
|
398
|
+
/* @__PURE__ */ w("fieldset", {
|
|
398
399
|
className: "mb-4",
|
|
399
400
|
children: [
|
|
400
|
-
/* @__PURE__ */
|
|
401
|
+
/* @__PURE__ */ C("legend", {
|
|
401
402
|
className: h,
|
|
402
|
-
children:
|
|
403
|
+
children: j("bigconsole.queryAccess.grant.fields", "Field access")
|
|
403
404
|
}),
|
|
404
|
-
/* @__PURE__ */
|
|
405
|
+
/* @__PURE__ */ C("p", {
|
|
405
406
|
className: p,
|
|
406
|
-
children:
|
|
407
|
+
children: j("bigconsole.queryAccess.grant.fieldsHint", "Read follows the sink’s own masking rules. Redacted shows the column with every value as [redacted]. Omitted fields stay outside the member’s schema.")
|
|
407
408
|
}),
|
|
408
|
-
/* @__PURE__ */
|
|
409
|
+
/* @__PURE__ */ C("div", {
|
|
409
410
|
className: "mt-2 overflow-x-auto",
|
|
410
|
-
children: /* @__PURE__ */
|
|
411
|
+
children: /* @__PURE__ */ C("table", {
|
|
411
412
|
className: "w-full min-w-[480px] border-collapse",
|
|
412
|
-
children: /* @__PURE__ */
|
|
413
|
+
children: /* @__PURE__ */ C("tbody", { children: r.fields.map((e) => /* @__PURE__ */ w("tr", {
|
|
413
414
|
className: "border-b border-border-seam last:border-b-0",
|
|
414
|
-
children: [/* @__PURE__ */
|
|
415
|
+
children: [/* @__PURE__ */ w("th", {
|
|
415
416
|
scope: "row",
|
|
416
417
|
className: `${u} font-mono font-normal text-text-primary`,
|
|
417
|
-
children: [e.name, /* @__PURE__ */
|
|
418
|
+
children: [e.name, /* @__PURE__ */ C("span", {
|
|
418
419
|
className: "ml-2 text-xs text-text-muted",
|
|
419
420
|
children: e.type
|
|
420
421
|
})]
|
|
421
|
-
}), /* @__PURE__ */
|
|
422
|
+
}), /* @__PURE__ */ C("td", {
|
|
422
423
|
className: u,
|
|
423
|
-
children: /* @__PURE__ */
|
|
424
|
+
children: /* @__PURE__ */ C("div", {
|
|
424
425
|
className: "flex flex-wrap gap-3",
|
|
425
426
|
role: "radiogroup",
|
|
426
|
-
"aria-label":
|
|
427
|
+
"aria-label": j("bigconsole.queryAccess.grant.accessFor", "Access to {{field}}", { field: e.name }),
|
|
427
428
|
children: [
|
|
428
429
|
"READ",
|
|
429
430
|
"REDACT",
|
|
430
431
|
"OMIT"
|
|
431
|
-
].map((t) => /* @__PURE__ */
|
|
432
|
+
].map((t) => /* @__PURE__ */ w("label", {
|
|
432
433
|
className: "flex items-center gap-1 text-body-sm text-text-primary",
|
|
433
|
-
children: [/* @__PURE__ */
|
|
434
|
+
children: [/* @__PURE__ */ C("input", {
|
|
434
435
|
type: "radio",
|
|
435
|
-
name: `${
|
|
436
|
+
name: `${F}-field-${e.id}`,
|
|
436
437
|
value: t,
|
|
437
|
-
checked: (
|
|
438
|
-
onChange: () =>
|
|
439
|
-
}),
|
|
438
|
+
checked: (B.decisions[e.id] ?? "OMIT") === t,
|
|
439
|
+
onChange: () => J(e.id, t)
|
|
440
|
+
}), X(t)]
|
|
440
441
|
}, t))
|
|
441
442
|
})
|
|
442
443
|
})]
|
|
@@ -445,26 +446,26 @@ var w = ({ workspaceId: i, sinkName: a, relation: o, onClose: s }) => {
|
|
|
445
446
|
})
|
|
446
447
|
]
|
|
447
448
|
}),
|
|
448
|
-
/* @__PURE__ */
|
|
449
|
+
/* @__PURE__ */ w("div", {
|
|
449
450
|
className: "flex flex-col gap-2",
|
|
450
|
-
children: [/* @__PURE__ */
|
|
451
|
+
children: [/* @__PURE__ */ C(c, { message: W }), /* @__PURE__ */ w("div", {
|
|
451
452
|
className: "flex gap-2",
|
|
452
|
-
children: [/* @__PURE__ */
|
|
453
|
+
children: [/* @__PURE__ */ C("button", {
|
|
453
454
|
type: "button",
|
|
454
455
|
className: g,
|
|
455
|
-
disabled:
|
|
456
|
-
onClick:
|
|
457
|
-
children:
|
|
458
|
-
}), /* @__PURE__ */
|
|
456
|
+
disabled: P.isPending,
|
|
457
|
+
onClick: Y,
|
|
458
|
+
children: P.isPending ? j("bigconsole.queryAccess.saving", "Saving…") : j("bigconsole.queryAccess.grant.save", "Save grant")
|
|
459
|
+
}), /* @__PURE__ */ C("button", {
|
|
459
460
|
type: "button",
|
|
460
461
|
className: l,
|
|
461
|
-
disabled:
|
|
462
|
-
onClick:
|
|
463
|
-
children:
|
|
462
|
+
disabled: P.isPending,
|
|
463
|
+
onClick: k,
|
|
464
|
+
children: j("bigconsole.queryAccess.cancel", "Cancel")
|
|
464
465
|
})]
|
|
465
466
|
})]
|
|
466
467
|
})
|
|
467
468
|
]
|
|
468
469
|
});
|
|
469
470
|
};
|
|
470
|
-
export {
|
|
471
|
+
export { T as GrantsPanel };
|
|
@@ -12,10 +12,10 @@ var y = ({ workspaceId: y }) => {
|
|
|
12
12
|
className: "text-text-muted",
|
|
13
13
|
children: b("bigconsole.queryAccess.status.unregistered", "Not registered")
|
|
14
14
|
}) : e.status === "invalid" ? /* @__PURE__ */ _("span", {
|
|
15
|
-
className: "rounded-pill
|
|
15
|
+
className: "rounded-pill border border-[var(--color-status-warning-border)] bg-[var(--color-status-warning-bgSubtle)] text-[var(--color-status-warning-text)] px-2 py-0.5 text-xs",
|
|
16
16
|
children: b("bigconsole.queryAccess.status.invalid", "Needs repair")
|
|
17
17
|
}) : /* @__PURE__ */ _("span", {
|
|
18
|
-
className: "rounded-pill bg-status-success-
|
|
18
|
+
className: "rounded-pill border border-[var(--color-status-success-border)] bg-[var(--color-status-success-bgSubtle)] text-[var(--color-status-success-text)] px-2 py-0.5 text-xs",
|
|
19
19
|
children: b("bigconsole.queryAccess.status.registered", "Registered")
|
|
20
20
|
}), L = (e) => {
|
|
21
21
|
A(null), M(null), w.mutate({ dataSinkId: e.sink.id }, {
|