@burdenoff/microfe-bigconsole 2026.1012.4 → 2026.1012.5
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/BigConsoleRoutes.js +149 -140
- package/dist/bigconsole/assistant/assistantProduct.js +4 -1
- package/dist/bigconsole/assistant/displayCopy.d.ts +32 -0
- package/dist/bigconsole/assistant/pageContext.d.ts +14 -0
- package/dist/bigconsole/assistant/pageContext.js +6 -1
- package/dist/bigconsole/assistant/pageControls.d.ts +81 -0
- package/dist/bigconsole/assistant/pageControls.js +169 -0
- package/dist/bigconsole/assistant/previewControl.d.ts +16 -0
- package/dist/bigconsole/assistant/previewControl.js +10 -0
- package/dist/bigconsole/assistant/recordAdapters.js +27 -26
- package/dist/bigconsole/assistant/usePreviewControl.d.ts +2 -0
- package/dist/bigconsole/assistant/usePreviewControl.js +20 -0
- package/dist/bigconsole/components/builder/inspector/AppearanceSection.js +9 -9
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +31 -31
- package/dist/bigconsole/components/common/SortBySelect.d.ts +11 -0
- package/dist/bigconsole/components/common/SortBySelect.js +29 -0
- package/dist/bigconsole/components/common/index.d.ts +1 -0
- package/dist/bigconsole/components/common/index.js +1 -0
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +44 -44
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +36 -36
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +59 -59
- package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +15 -15
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +30 -30
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +41 -41
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +34 -34
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +34 -34
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +153 -153
- package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js +21 -21
- package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +46 -46
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +134 -134
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +101 -101
- package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js +31 -31
- package/dist/bigconsole/components/dashboard/TemplateLayoutPreview.js +15 -15
- package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -1
- package/dist/bigconsole/components/dashboard/WidgetPalette.js +46 -46
- package/dist/bigconsole/components/datasink/AlertExecutionHistory.js +37 -37
- package/dist/bigconsole/components/datasink/AlertRuleEditor.js +66 -66
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js +35 -35
- package/dist/bigconsole/components/datasink/DataSinkCard.js +51 -50
- package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +18 -18
- package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +20 -20
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +47 -47
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +91 -91
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +35 -35
- package/dist/bigconsole/components/parser/DataSinkSelector.js +40 -40
- package/dist/bigconsole/components/parser/ImportParserDialog.js +120 -120
- package/dist/bigconsole/components/parser/ParserSelector.js +51 -51
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +10 -10
- package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +77 -76
- package/dist/bigconsole/components/preview/AiPreviewPanel.js +96 -95
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js +4 -4
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +93 -93
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +507 -499
- package/dist/bigconsole/components/widgets/advanced/AdvancedWidgetConfig.js +14 -14
- package/dist/bigconsole/components/widgets/advanced/AdvancedWidgets.js +68 -67
- package/dist/bigconsole/components/widgets/advanced/boxPlotDescription.d.ts +7 -0
- package/dist/bigconsole/components/widgets/advanced/boxPlotDescription.js +12 -0
- package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +4 -4
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js +48 -48
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js +46 -46
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +61 -61
- package/dist/bigconsole/components/widgets/form/FormWidget.js +36 -36
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +42 -42
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +25 -25
- package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +4 -4
- package/dist/bigconsole/components/widgets/list/ListConfig.js +30 -30
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +38 -38
- package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +9 -9
- package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js +9 -9
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +49 -49
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +39 -39
- package/dist/bigconsole/components/widgets/table/TableConfig.js +73 -73
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +64 -64
- package/dist/bigconsole/components/workflow/WorkflowOpenGuard.js +15 -15
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +15 -15
- package/dist/bigconsole/constants/backendErrors.js +94 -0
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +10 -10
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +67 -67
- package/dist/bigconsole/hooks/useDashboardLayoutBaseline.d.ts +14 -0
- package/dist/bigconsole/hooks/useDashboardLayoutBaseline.js +32 -0
- package/dist/bigconsole/hooks/useDataSinkAlerts.d.ts +23 -0
- package/dist/bigconsole/hooks/useDataSinkAlerts.js +138 -113
- package/dist/bigconsole/hooks/useDrilldown.js +3 -3
- package/dist/bigconsole/hooks/useGlobalFilters.js +3 -3
- package/dist/bigconsole/pages/AdminPage.js +130 -130
- package/dist/bigconsole/pages/DashboardBuilderPage.js +72 -60
- package/dist/bigconsole/pages/DashboardViewPage.js +244 -221
- package/dist/bigconsole/pages/DashboardsPage.js +269 -221
- package/dist/bigconsole/pages/DataParsersPage.js +180 -157
- package/dist/bigconsole/pages/DataSinkAlertsPage.js +62 -55
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +252 -234
- package/dist/bigconsole/pages/DataSinkViewPage.js +1 -1
- package/dist/bigconsole/pages/DataSinksPage.js +335 -299
- package/dist/bigconsole/pages/DataSourcesPage.js +5 -5
- package/dist/bigconsole/pages/InsightsPage.js +279 -265
- package/dist/bigconsole/pages/OverviewPage.js +47 -47
- package/dist/bigconsole/pages/ParserBuilderPage.js +229 -213
- package/dist/bigconsole/pages/ParserViewPage.js +97 -97
- package/dist/bigconsole/pages/PipelineBuilderPage.js +256 -214
- package/dist/bigconsole/pages/PipelineViewPage.js +146 -146
- package/dist/bigconsole/pages/PipelinesPage.js +107 -88
- package/dist/bigconsole/pages/SettingsPage.js +179 -173
- package/dist/bigconsole/pages/WidgetDemoPage.js +42 -42
- package/dist/bigconsole/pages/WorkflowViewPage.js +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +141 -141
- package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +12 -12
- package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +34 -34
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +69 -69
- package/dist/bigconsole/renderers/adapters/CustomRenderer.js +46 -46
- package/dist/bigconsole/store/widgetStore.d.ts +12 -0
- package/dist/bigconsole/store/widgetStore.js +3 -1
- package/dist/bigconsole/utils/backendError.d.ts +18 -0
- package/dist/bigconsole/utils/backendError.js +42 -0
- package/dist/bigconsole/utils/dashboardList.d.ts +28 -0
- package/dist/bigconsole/utils/dashboardList.js +15 -0
- package/dist/bigconsole/utils/dataSinkList.d.ts +15 -0
- package/dist/bigconsole/utils/dataSinkList.js +15 -0
- package/dist/bigconsole/utils/formDirty.d.ts +82 -0
- package/dist/bigconsole/utils/formDirty.js +21 -0
- package/dist/bigconsole/utils/insightsDraft.d.ts +29 -0
- package/dist/bigconsole/utils/insightsDraft.js +8 -0
- package/dist/bigconsole/utils/layoutBaseline.d.ts +130 -0
- package/dist/bigconsole/utils/layoutBaseline.js +96 -0
- package/dist/bigconsole/utils/listSort.d.ts +80 -0
- package/dist/bigconsole/utils/listSort.js +85 -0
- package/dist/bigconsole/utils/widgetFormDirty.d.ts +16 -0
- package/dist/bigconsole/utils/widgetFormDirty.js +13 -0
- package/dist/bigconsole/workflowOpen.js +15 -14
- package/package.json +3 -3
|
@@ -4,8 +4,8 @@ import t from "../../../hooks/useWidgetOperations.js";
|
|
|
4
4
|
import "../../../hooks/index.js";
|
|
5
5
|
import { memo as n, useCallback as r, useMemo as i, useState as a } from "react";
|
|
6
6
|
import { ChevronDown as o, ChevronRight as s, GripVertical as c, Settings as l } from "lucide-react";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { useI18n as u } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
8
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
9
9
|
//#region src/bigconsole/components/widgets/pivot-table/PivotTableWidget.tsx
|
|
10
10
|
var p = [
|
|
11
11
|
"sum",
|
|
@@ -80,7 +80,7 @@ function _(e, t, n, r) {
|
|
|
80
80
|
return a;
|
|
81
81
|
}
|
|
82
82
|
var v = n(function({ widget: n, data: c = [], onDrilldown: p }) {
|
|
83
|
-
let { t: m } =
|
|
83
|
+
let { t: m } = u(), v = i(() => Array.isArray(c) ? c : [], [c]), y = i(() => {
|
|
84
84
|
let e = {
|
|
85
85
|
rows: [],
|
|
86
86
|
columns: [],
|
|
@@ -212,35 +212,35 @@ var v = n(function({ widget: n, data: c = [], onDrilldown: p }) {
|
|
|
212
212
|
let i = [], a = e.children.size > 0, c = N.has(n), l = O[r - 1];
|
|
213
213
|
if (r > 0) {
|
|
214
214
|
let l = _(v, k, A, t);
|
|
215
|
-
i.push(/* @__PURE__ */
|
|
215
|
+
i.push(/* @__PURE__ */ f("tr", {
|
|
216
216
|
className: "hover:bg-bg-sunken/50 transition-colors",
|
|
217
217
|
children: [
|
|
218
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ d("td", {
|
|
219
219
|
className: "sticky left-0 bg-bg-surface border-r border-border-default px-3 py-2 font-medium text-sm",
|
|
220
220
|
style: { paddingLeft: `${r * 16 + 8}px` },
|
|
221
|
-
children: /* @__PURE__ */
|
|
221
|
+
children: /* @__PURE__ */ f("div", {
|
|
222
222
|
className: "flex items-center gap-1",
|
|
223
223
|
children: [
|
|
224
|
-
y.expandable && a && /* @__PURE__ */
|
|
224
|
+
y.expandable && a && /* @__PURE__ */ d("button", {
|
|
225
225
|
type: "button",
|
|
226
226
|
onClick: () => U(n),
|
|
227
227
|
className: "p-0.5 hover:bg-bg-sunken rounded",
|
|
228
|
-
children:
|
|
228
|
+
children: d(c ? o : s, { className: "w-4 h-4 text-text-secondary" })
|
|
229
229
|
}),
|
|
230
|
-
!a && y.expandable && /* @__PURE__ */
|
|
231
|
-
/* @__PURE__ */
|
|
230
|
+
!a && y.expandable && /* @__PURE__ */ d("span", { className: "w-5" }),
|
|
231
|
+
/* @__PURE__ */ d("span", { children: e.key })
|
|
232
232
|
]
|
|
233
233
|
})
|
|
234
234
|
}),
|
|
235
235
|
I.map((e) => {
|
|
236
236
|
let n = l.get(e) || {};
|
|
237
|
-
return A.map((r) => /* @__PURE__ */
|
|
237
|
+
return A.map((r) => /* @__PURE__ */ d("td", {
|
|
238
238
|
className: "px-3 py-2 text-sm text-right tabular-nums cursor-pointer hover:bg-action-primary-bg/10",
|
|
239
239
|
onClick: () => W(t, e),
|
|
240
240
|
children: H(n[r.field] || 0)
|
|
241
241
|
}, `${e}-${r.field}`));
|
|
242
242
|
}),
|
|
243
|
-
y.showRowTotals && A.map((t) => /* @__PURE__ */
|
|
243
|
+
y.showRowTotals && A.map((t) => /* @__PURE__ */ d("td", {
|
|
244
244
|
className: "px-3 py-2 text-sm text-right tabular-nums font-medium bg-bg-sunken/30",
|
|
245
245
|
children: H(e.values[t.field] || 0)
|
|
246
246
|
}, `total-${t.field}`))
|
|
@@ -270,87 +270,87 @@ var v = n(function({ widget: n, data: c = [], onDrilldown: p }) {
|
|
|
270
270
|
W,
|
|
271
271
|
U
|
|
272
272
|
]), K = O.length > 0 || A.length > 0;
|
|
273
|
-
return v.length === 0 ? /* @__PURE__ */
|
|
273
|
+
return v.length === 0 ? /* @__PURE__ */ f("div", {
|
|
274
274
|
className: "flex flex-col items-center justify-center h-full p-8 text-text-secondary",
|
|
275
275
|
children: [
|
|
276
|
-
/* @__PURE__ */
|
|
277
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ d(l, { className: "w-12 h-12 mb-4 opacity-50" }),
|
|
277
|
+
/* @__PURE__ */ d("p", {
|
|
278
278
|
className: "text-sm",
|
|
279
279
|
children: m("bigconsole.widget.pivotTable.noData", "No data available")
|
|
280
280
|
}),
|
|
281
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ d("p", {
|
|
282
282
|
className: "text-xs mt-1",
|
|
283
283
|
children: m("bigconsole.widget.pivotTable.noDataHint", "Configure data source to populate pivot table")
|
|
284
284
|
})
|
|
285
285
|
]
|
|
286
|
-
}) : /* @__PURE__ */
|
|
286
|
+
}) : /* @__PURE__ */ f("div", {
|
|
287
287
|
className: "flex flex-col h-full overflow-hidden",
|
|
288
|
-
children: [x && /* @__PURE__ */
|
|
288
|
+
children: [x && /* @__PURE__ */ d(b, {
|
|
289
289
|
rowFields: O,
|
|
290
290
|
columnFields: k,
|
|
291
291
|
valueFields: A,
|
|
292
292
|
availableFields: z,
|
|
293
293
|
onMoveField: B,
|
|
294
294
|
onChangeAggregation: V
|
|
295
|
-
}), K ? /* @__PURE__ */
|
|
295
|
+
}), K ? /* @__PURE__ */ d("div", {
|
|
296
296
|
className: "flex-1 overflow-auto",
|
|
297
|
-
children: /* @__PURE__ */
|
|
297
|
+
children: /* @__PURE__ */ f("table", {
|
|
298
298
|
className: "w-full border-collapse",
|
|
299
299
|
children: [
|
|
300
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ f("thead", {
|
|
301
301
|
className: "sticky top-0 z-10",
|
|
302
|
-
children: [/* @__PURE__ */
|
|
302
|
+
children: [/* @__PURE__ */ f("tr", {
|
|
303
303
|
className: "bg-bg-sunken",
|
|
304
304
|
children: [
|
|
305
|
-
/* @__PURE__ */
|
|
305
|
+
/* @__PURE__ */ d("th", {
|
|
306
306
|
className: "sticky left-0 bg-bg-sunken border-r border-b border-border-default px-3 py-2 text-left text-xs font-semibold uppercase tracking-wider text-text-secondary",
|
|
307
307
|
children: O.length > 0 ? O.map((e) => e.replace(/_/g, " ")).join(" / ") : m("bigconsole.widget.pivotTable.valuesHeader", "Values")
|
|
308
308
|
}),
|
|
309
|
-
I.map((e) => /* @__PURE__ */
|
|
309
|
+
I.map((e) => /* @__PURE__ */ d("th", {
|
|
310
310
|
colSpan: A.length || 1,
|
|
311
311
|
className: "border-b border-border-default px-3 py-2 text-center text-xs font-semibold uppercase tracking-wider text-text-secondary",
|
|
312
312
|
children: e
|
|
313
313
|
}, e)),
|
|
314
|
-
y.showRowTotals && /* @__PURE__ */
|
|
314
|
+
y.showRowTotals && /* @__PURE__ */ d("th", {
|
|
315
315
|
colSpan: A.length || 1,
|
|
316
316
|
className: "border-b border-border-default px-3 py-2 text-center text-xs font-semibold uppercase tracking-wider text-text-secondary bg-bg-sunken/50",
|
|
317
317
|
children: m("bigconsole.widget.pivotTable.total", "Total")
|
|
318
318
|
})
|
|
319
319
|
]
|
|
320
|
-
}), A.length > 1 && /* @__PURE__ */
|
|
320
|
+
}), A.length > 1 && /* @__PURE__ */ f("tr", {
|
|
321
321
|
className: "bg-bg-surface",
|
|
322
322
|
children: [
|
|
323
|
-
/* @__PURE__ */
|
|
324
|
-
I.map((e) => A.map((t) => /* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ d("th", { className: "sticky left-0 bg-bg-surface border-r border-b border-border-default" }),
|
|
324
|
+
I.map((e) => A.map((t) => /* @__PURE__ */ d("th", {
|
|
325
325
|
className: "border-b border-border-default px-3 py-1 text-center text-xs text-text-secondary",
|
|
326
326
|
children: t.label || t.field.replace(/_/g, " ")
|
|
327
327
|
}, `${e}-${t.field}`))),
|
|
328
|
-
y.showRowTotals && A.map((e) => /* @__PURE__ */
|
|
328
|
+
y.showRowTotals && A.map((e) => /* @__PURE__ */ d("th", {
|
|
329
329
|
className: "border-b border-border-default px-3 py-1 text-center text-xs text-text-secondary bg-bg-sunken/30",
|
|
330
330
|
children: e.label || e.field.replace(/_/g, " ")
|
|
331
331
|
}, `total-${e.field}`))
|
|
332
332
|
]
|
|
333
333
|
})]
|
|
334
334
|
}),
|
|
335
|
-
/* @__PURE__ */
|
|
335
|
+
/* @__PURE__ */ d("tbody", {
|
|
336
336
|
className: "divide-y divide-border-default",
|
|
337
337
|
children: G(F, {}, "root", 0)
|
|
338
338
|
}),
|
|
339
|
-
y.showColumnTotals && /* @__PURE__ */
|
|
339
|
+
y.showColumnTotals && /* @__PURE__ */ d("tfoot", { children: /* @__PURE__ */ f("tr", {
|
|
340
340
|
className: "bg-bg-sunken/50 font-medium",
|
|
341
341
|
children: [
|
|
342
|
-
/* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ d("td", {
|
|
343
343
|
className: "sticky left-0 bg-bg-sunken/50 border-r border-t border-border-default px-3 py-2 text-sm",
|
|
344
344
|
children: m("bigconsole.widget.pivotTable.total", "Total")
|
|
345
345
|
}),
|
|
346
346
|
I.map((e) => {
|
|
347
347
|
let t = L?.get(e) || {};
|
|
348
|
-
return A.map((n) => /* @__PURE__ */
|
|
348
|
+
return A.map((n) => /* @__PURE__ */ d("td", {
|
|
349
349
|
className: "border-t border-border-default px-3 py-2 text-sm text-right tabular-nums",
|
|
350
350
|
children: H(t[n.field] || 0)
|
|
351
351
|
}, `footer-${e}-${n.field}`));
|
|
352
352
|
}),
|
|
353
|
-
y.showRowTotals && y.showGrandTotal && A.map((e) => /* @__PURE__ */
|
|
353
|
+
y.showRowTotals && y.showGrandTotal && A.map((e) => /* @__PURE__ */ d("td", {
|
|
354
354
|
className: "border-t border-border-default px-3 py-2 text-sm text-right tabular-nums font-bold bg-bg-sunken",
|
|
355
355
|
children: H(F.values[e.field] || 0)
|
|
356
356
|
}, `grand-${e.field}`))
|
|
@@ -358,15 +358,15 @@ var v = n(function({ widget: n, data: c = [], onDrilldown: p }) {
|
|
|
358
358
|
}) })
|
|
359
359
|
]
|
|
360
360
|
})
|
|
361
|
-
}) : /* @__PURE__ */
|
|
361
|
+
}) : /* @__PURE__ */ f("div", {
|
|
362
362
|
className: "flex flex-col items-center justify-center flex-1 p-8 text-text-secondary",
|
|
363
363
|
children: [
|
|
364
|
-
/* @__PURE__ */
|
|
365
|
-
/* @__PURE__ */
|
|
364
|
+
/* @__PURE__ */ d(l, { className: "w-12 h-12 mb-4 opacity-50" }),
|
|
365
|
+
/* @__PURE__ */ d("p", {
|
|
366
366
|
className: "text-sm",
|
|
367
367
|
children: m("bigconsole.widget.pivotTable.configureTitle", "Configure Pivot Table")
|
|
368
368
|
}),
|
|
369
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ d("p", {
|
|
370
370
|
className: "text-xs mt-1",
|
|
371
371
|
children: x ? m("bigconsole.widget.pivotTable.configureHintEdit", "Drag fields into the Rows and Values zones above") : m("bigconsole.widget.pivotTable.configureHintView", "Add row fields and value fields in widget settings")
|
|
372
372
|
})
|
|
@@ -374,14 +374,14 @@ var v = n(function({ widget: n, data: c = [], onDrilldown: p }) {
|
|
|
374
374
|
})]
|
|
375
375
|
});
|
|
376
376
|
}), y = "application/x-pivot-field", b = ({ rowFields: e, columnFields: t, valueFields: n, availableFields: r, onMoveField: i, onChangeAggregation: o }) => {
|
|
377
|
-
let { t: s } =
|
|
377
|
+
let { t: s } = u(), [l, m] = a(null), h = (e) => (t) => {
|
|
378
378
|
t.preventDefault(), t.stopPropagation(), m(null);
|
|
379
379
|
let n = t.dataTransfer.getData(y) || t.dataTransfer.getData("text/plain");
|
|
380
380
|
if (n) try {
|
|
381
381
|
let { field: t, from: r } = JSON.parse(n);
|
|
382
382
|
t && i(t, r, e);
|
|
383
383
|
} catch {}
|
|
384
|
-
}, g = (e, t, n) => /* @__PURE__ */
|
|
384
|
+
}, g = (e, t, n) => /* @__PURE__ */ f("span", {
|
|
385
385
|
draggable: !0,
|
|
386
386
|
onDragStart: (n) => {
|
|
387
387
|
let r = JSON.stringify({
|
|
@@ -392,45 +392,45 @@ var v = n(function({ widget: n, data: c = [], onDrilldown: p }) {
|
|
|
392
392
|
},
|
|
393
393
|
className: "inline-flex items-center gap-1 px-2 py-1 rounded-md bg-bg-surface border border-border-default text-xs text-text-primary cursor-grab",
|
|
394
394
|
children: [
|
|
395
|
-
/* @__PURE__ */
|
|
395
|
+
/* @__PURE__ */ d(c, {
|
|
396
396
|
className: "w-3 h-3 text-text-muted",
|
|
397
397
|
"aria-hidden": "true"
|
|
398
398
|
}),
|
|
399
|
-
/* @__PURE__ */
|
|
400
|
-
n && /* @__PURE__ */
|
|
399
|
+
/* @__PURE__ */ d("span", { children: (n?.label || e).replace(/_/g, " ") }),
|
|
400
|
+
n && /* @__PURE__ */ d("select", {
|
|
401
401
|
value: n.aggregation,
|
|
402
402
|
onChange: (t) => o(e, t.target.value),
|
|
403
403
|
onClick: (e) => e.stopPropagation(),
|
|
404
404
|
"aria-label": s("bigconsole.widget.pivotTable.aggregationForField", "Aggregation for {{field}}", { field: e }),
|
|
405
405
|
className: "ml-1 bg-bg-sunken text-text-secondary rounded px-1 py-0.5 text-[10px] uppercase",
|
|
406
|
-
children: p.map((e) => /* @__PURE__ */
|
|
406
|
+
children: p.map((e) => /* @__PURE__ */ d("option", {
|
|
407
407
|
value: e,
|
|
408
408
|
children: e
|
|
409
409
|
}, e))
|
|
410
410
|
})
|
|
411
411
|
]
|
|
412
|
-
}, e), _ = (e, t, n) => /* @__PURE__ */
|
|
412
|
+
}, e), _ = (e, t, n) => /* @__PURE__ */ f("div", {
|
|
413
413
|
onDragOver: (e) => {
|
|
414
414
|
e.preventDefault(), e.stopPropagation(), e.dataTransfer.dropEffect = "move", l !== t && m(t);
|
|
415
415
|
},
|
|
416
416
|
onDragLeave: () => m((e) => e === t ? null : e),
|
|
417
417
|
onDrop: h(t),
|
|
418
418
|
className: `flex-1 min-w-[8rem] rounded-md border p-2 transition-colors ${l === t ? "border-action-primary-bg bg-action-primary-bg/5" : "border-border-default bg-bg-sunken/30"}`,
|
|
419
|
-
children: [/* @__PURE__ */
|
|
419
|
+
children: [/* @__PURE__ */ d("div", {
|
|
420
420
|
className: "text-[10px] font-semibold uppercase tracking-wider text-text-muted mb-1.5",
|
|
421
421
|
children: e
|
|
422
|
-
}), /* @__PURE__ */
|
|
422
|
+
}), /* @__PURE__ */ d("div", {
|
|
423
423
|
className: "flex flex-wrap gap-1.5 min-h-[1.75rem]",
|
|
424
424
|
children: n
|
|
425
425
|
})]
|
|
426
426
|
});
|
|
427
|
-
return /* @__PURE__ */
|
|
427
|
+
return /* @__PURE__ */ f("div", {
|
|
428
428
|
className: "flex flex-wrap gap-2 p-2 border-b border-border-default bg-bg-surface",
|
|
429
429
|
children: [
|
|
430
430
|
_(s("bigconsole.widget.pivotTable.zoneRows", "Rows"), "rows", e.map((e) => g(e, "rows"))),
|
|
431
431
|
_(s("bigconsole.widget.pivotTable.zoneColumns", "Columns"), "columns", t.map((e) => g(e, "columns"))),
|
|
432
432
|
_(s("bigconsole.widget.pivotTable.zoneValues", "Values"), "values", n.map((e) => g(e.field, "values", e))),
|
|
433
|
-
_(s("bigconsole.widget.pivotTable.zoneAvailable", "Available"), "available", r.length > 0 ? r.map((e) => g(e, "available")) : /* @__PURE__ */
|
|
433
|
+
_(s("bigconsole.widget.pivotTable.zoneAvailable", "Available"), "available", r.length > 0 ? r.map((e) => g(e, "available")) : /* @__PURE__ */ d("span", {
|
|
434
434
|
className: "text-[11px] text-text-muted italic",
|
|
435
435
|
children: s("bigconsole.widget.pivotTable.allFieldsInUse", "All fields in use")
|
|
436
436
|
}))
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { memo as e, useCallback as t } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useI18n as n } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
3
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
4
|
//#region src/bigconsole/components/widgets/progress/ProgressConfig.tsx
|
|
5
5
|
var a = e(function({ config: e, onChange: a }) {
|
|
6
|
-
let { t: o } =
|
|
6
|
+
let { t: o } = n(), s = t((t, n) => {
|
|
7
7
|
a({
|
|
8
8
|
...e,
|
|
9
9
|
[t]: n
|
|
@@ -23,22 +23,22 @@ var a = e(function({ config: e, onChange: a }) {
|
|
|
23
23
|
}, [e.milestones, s]), u = t((t) => {
|
|
24
24
|
s("milestones", (e.milestones || []).filter((e, n) => n !== t));
|
|
25
25
|
}, [e.milestones, s]);
|
|
26
|
-
return /* @__PURE__ */
|
|
26
|
+
return /* @__PURE__ */ i("div", {
|
|
27
27
|
className: "min-w-0 space-y-form-gap",
|
|
28
28
|
children: [
|
|
29
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("label", {
|
|
30
30
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
31
31
|
children: o("bigconsole.widget.config.progress.maxValueLabel", "Maximum Value")
|
|
32
|
-
}), /* @__PURE__ */
|
|
32
|
+
}), /* @__PURE__ */ r("input", {
|
|
33
33
|
type: "number",
|
|
34
34
|
value: e.max ?? 100,
|
|
35
35
|
onChange: (e) => s("max", Number(e.target.value)),
|
|
36
36
|
className: "\n w-full px-3 py-2\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n "
|
|
37
37
|
})] }),
|
|
38
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("label", {
|
|
39
39
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
40
40
|
children: o("bigconsole.widget.config.progress.barHeightLabel", "Bar Height (px)")
|
|
41
|
-
}), /* @__PURE__ */
|
|
41
|
+
}), /* @__PURE__ */ r("input", {
|
|
42
42
|
type: "number",
|
|
43
43
|
value: e.barHeight ?? 12,
|
|
44
44
|
onChange: (e) => s("barHeight", Number(e.target.value)),
|
|
@@ -46,75 +46,75 @@ var a = e(function({ config: e, onChange: a }) {
|
|
|
46
46
|
max: 32,
|
|
47
47
|
className: "\n w-full px-3 py-2\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n "
|
|
48
48
|
})] }),
|
|
49
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("label", {
|
|
50
50
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
51
51
|
children: o("bigconsole.widget.config.progress.valueFormatLabel", "Value Format")
|
|
52
|
-
}), /* @__PURE__ */
|
|
52
|
+
}), /* @__PURE__ */ i("select", {
|
|
53
53
|
value: e.format || "number",
|
|
54
54
|
onChange: (e) => s("format", e.target.value),
|
|
55
55
|
className: "\n w-full px-3 py-2\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n ",
|
|
56
56
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ r("option", {
|
|
58
58
|
value: "number",
|
|
59
59
|
children: o("bigconsole.widget.config.progress.format.number", "Number")
|
|
60
60
|
}),
|
|
61
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ r("option", {
|
|
62
62
|
value: "currency",
|
|
63
63
|
children: o("bigconsole.widget.config.progress.format.currency", "Currency")
|
|
64
64
|
}),
|
|
65
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ r("option", {
|
|
66
66
|
value: "compact",
|
|
67
67
|
children: o("bigconsole.widget.config.progress.format.compact", "Compact (1K, 1M)")
|
|
68
68
|
})
|
|
69
69
|
]
|
|
70
70
|
})] }),
|
|
71
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("label", {
|
|
72
72
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
73
73
|
children: o("bigconsole.widget.config.progress.colorModeLabel", "Color Mode")
|
|
74
|
-
}), /* @__PURE__ */
|
|
74
|
+
}), /* @__PURE__ */ i("select", {
|
|
75
75
|
value: e.colorMode || "default",
|
|
76
76
|
onChange: (e) => s("colorMode", e.target.value),
|
|
77
77
|
className: "\n w-full px-3 py-2\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n ",
|
|
78
78
|
children: [
|
|
79
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ r("option", {
|
|
80
80
|
value: "default",
|
|
81
81
|
children: o("bigconsole.widget.config.progress.colorMode.default", "Default (Blue)")
|
|
82
82
|
}),
|
|
83
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ r("option", {
|
|
84
84
|
value: "dynamic",
|
|
85
85
|
children: o("bigconsole.widget.config.progress.colorMode.dynamic", "Dynamic (based on progress)")
|
|
86
86
|
}),
|
|
87
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ r("option", {
|
|
88
88
|
value: "success",
|
|
89
89
|
children: o("bigconsole.widget.config.progress.colorMode.success", "Success (Green)")
|
|
90
90
|
}),
|
|
91
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ r("option", {
|
|
92
92
|
value: "warning",
|
|
93
93
|
children: o("bigconsole.widget.config.progress.colorMode.warning", "Warning (Yellow)")
|
|
94
94
|
}),
|
|
95
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ r("option", {
|
|
96
96
|
value: "error",
|
|
97
97
|
children: o("bigconsole.widget.config.progress.colorMode.error", "Error (Red)")
|
|
98
98
|
})
|
|
99
99
|
]
|
|
100
100
|
})] }),
|
|
101
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ i("div", { children: [/* @__PURE__ */ i("div", {
|
|
102
102
|
className: "flex items-center justify-between mb-2",
|
|
103
|
-
children: [/* @__PURE__ */
|
|
103
|
+
children: [/* @__PURE__ */ r("label", {
|
|
104
104
|
className: "text-sm font-medium text-text-primary",
|
|
105
105
|
children: o("bigconsole.widget.config.progress.milestonesLabel", "Milestones")
|
|
106
|
-
}), /* @__PURE__ */
|
|
106
|
+
}), /* @__PURE__ */ r("button", {
|
|
107
107
|
type: "button",
|
|
108
108
|
onClick: l,
|
|
109
109
|
className: "\n text-sm text-action-primary-bg\n hover:text-action-primary-bgHover\n ",
|
|
110
110
|
children: o("bigconsole.widget.config.progress.addMilestone", "+ Add Milestone")
|
|
111
111
|
})]
|
|
112
|
-
}), /* @__PURE__ */
|
|
112
|
+
}), /* @__PURE__ */ i("div", {
|
|
113
113
|
className: "space-y-2",
|
|
114
|
-
children: [(e.milestones || []).map((e, t) => /* @__PURE__ */
|
|
114
|
+
children: [(e.milestones || []).map((e, t) => /* @__PURE__ */ i("div", {
|
|
115
115
|
className: "\n flex items-center gap-2\n p-2\n bg-bg-sunken\n rounded-md\n ",
|
|
116
116
|
children: [
|
|
117
|
-
/* @__PURE__ */
|
|
117
|
+
/* @__PURE__ */ r("input", {
|
|
118
118
|
type: "number",
|
|
119
119
|
value: e.position,
|
|
120
120
|
onChange: (e) => c(t, "position", Number(e.target.value)),
|
|
@@ -123,23 +123,23 @@ var a = e(function({ config: e, onChange: a }) {
|
|
|
123
123
|
className: "\n w-20 px-2 py-1\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n ",
|
|
124
124
|
placeholder: "%"
|
|
125
125
|
}),
|
|
126
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ r("input", {
|
|
127
127
|
type: "text",
|
|
128
128
|
value: e.label || "",
|
|
129
129
|
onChange: (e) => c(t, "label", e.target.value),
|
|
130
130
|
className: "\n flex-1 px-2 py-1\n text-sm text-text-primary\n bg-bg-surface\n border border-border-default\n rounded-md\n focus:outline-none focus:ring-2 focus:ring-action-primary-bg\n ",
|
|
131
131
|
placeholder: o("bigconsole.widget.config.progress.milestoneLabelPlaceholder", "Label (optional)")
|
|
132
132
|
}),
|
|
133
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ r("button", {
|
|
134
134
|
type: "button",
|
|
135
135
|
onClick: () => u(t),
|
|
136
136
|
className: "text-status-error-text hover:text-status-error-text/80 p-1",
|
|
137
|
-
children: /* @__PURE__ */
|
|
137
|
+
children: /* @__PURE__ */ r("svg", {
|
|
138
138
|
className: "w-4 h-4",
|
|
139
139
|
fill: "none",
|
|
140
140
|
stroke: "currentColor",
|
|
141
141
|
viewBox: "0 0 24 24",
|
|
142
|
-
children: /* @__PURE__ */
|
|
142
|
+
children: /* @__PURE__ */ r("path", {
|
|
143
143
|
strokeLinecap: "round",
|
|
144
144
|
strokeLinejoin: "round",
|
|
145
145
|
strokeWidth: 2,
|
|
@@ -148,40 +148,40 @@ var a = e(function({ config: e, onChange: a }) {
|
|
|
148
148
|
})
|
|
149
149
|
})
|
|
150
150
|
]
|
|
151
|
-
}, t)), (!e.milestones || e.milestones.length === 0) && /* @__PURE__ */
|
|
151
|
+
}, t)), (!e.milestones || e.milestones.length === 0) && /* @__PURE__ */ r("p", {
|
|
152
152
|
className: "text-sm text-text-secondary text-center py-2",
|
|
153
153
|
children: o("bigconsole.widget.config.progress.noMilestones", "No milestones configured")
|
|
154
154
|
})]
|
|
155
155
|
})] }),
|
|
156
|
-
/* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ i("div", {
|
|
157
157
|
role: "group",
|
|
158
158
|
"aria-label": "Display options",
|
|
159
159
|
className: "space-y-3 border-t border-[var(--color-border-subtle)] pt-form-gap",
|
|
160
160
|
children: [
|
|
161
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ r("p", {
|
|
162
162
|
className: "text-xs font-bold uppercase tracking-wider text-text-secondary",
|
|
163
163
|
children: "Display options"
|
|
164
164
|
}),
|
|
165
|
-
/* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ i("label", {
|
|
166
166
|
className: "flex items-center gap-3",
|
|
167
|
-
children: [/* @__PURE__ */
|
|
167
|
+
children: [/* @__PURE__ */ r("input", {
|
|
168
168
|
type: "checkbox",
|
|
169
169
|
checked: e.showPercentage !== !1,
|
|
170
170
|
onChange: (e) => s("showPercentage", e.target.checked),
|
|
171
171
|
className: "\n w-4 h-4\n text-action-primary-bg\n bg-bg-surface\n border-border-default\n rounded\n focus:ring-action-primary-bg\n "
|
|
172
|
-
}), /* @__PURE__ */
|
|
172
|
+
}), /* @__PURE__ */ r("span", {
|
|
173
173
|
className: "text-sm text-text-primary",
|
|
174
174
|
children: o("bigconsole.widget.config.progress.showPercentage", "Show percentage labels")
|
|
175
175
|
})]
|
|
176
176
|
}),
|
|
177
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ i("label", {
|
|
178
178
|
className: "flex items-center gap-3",
|
|
179
|
-
children: [/* @__PURE__ */
|
|
179
|
+
children: [/* @__PURE__ */ r("input", {
|
|
180
180
|
type: "checkbox",
|
|
181
181
|
checked: e.showMax !== !1,
|
|
182
182
|
onChange: (e) => s("showMax", e.target.checked),
|
|
183
183
|
className: "\n w-4 h-4\n text-action-primary-bg\n bg-bg-surface\n border-border-default\n rounded\n focus:ring-action-primary-bg\n "
|
|
184
|
-
}), /* @__PURE__ */
|
|
184
|
+
}), /* @__PURE__ */ r("span", {
|
|
185
185
|
className: "text-sm text-text-primary",
|
|
186
186
|
children: o("bigconsole.widget.config.progress.showMax", "Show maximum value")
|
|
187
187
|
})]
|