@burdenoff/microfe-bigconsole 2026.1011.10 → 2026.1012.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 (161) hide show
  1. package/README.md +19 -0
  2. package/dist/bigconsole/BigConsoleRoot.js +88 -82
  3. package/dist/bigconsole/BigConsoleRoutes.js +163 -136
  4. package/dist/bigconsole/assistant/assistantProduct.js +1 -4
  5. package/dist/bigconsole/assistant/pageContext.d.ts +0 -14
  6. package/dist/bigconsole/assistant/pageContext.js +1 -6
  7. package/dist/bigconsole/assistant/recordAdapters.js +26 -27
  8. package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +31 -31
  9. package/dist/bigconsole/components/common/index.d.ts +0 -1
  10. package/dist/bigconsole/components/common/index.js +0 -1
  11. package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +44 -44
  12. package/dist/bigconsole/components/dashboard/DashboardCanvas.js +36 -36
  13. package/dist/bigconsole/components/dashboard/DashboardToolbar.js +59 -59
  14. package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +58 -57
  15. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +30 -30
  16. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +41 -41
  17. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +34 -34
  18. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +34 -34
  19. package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +110 -110
  20. package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js +21 -21
  21. package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +46 -46
  22. package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +164 -173
  23. package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +101 -101
  24. package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js +31 -31
  25. package/dist/bigconsole/components/dashboard/TemplateLayoutPreview.js +15 -15
  26. package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -1
  27. package/dist/bigconsole/components/dashboard/WidgetPalette.js +165 -163
  28. package/dist/bigconsole/components/datasink/AlertExecutionHistory.js +37 -37
  29. package/dist/bigconsole/components/datasink/AlertRuleEditor.js +66 -66
  30. package/dist/bigconsole/components/datasink/CacheTTLSelector.js +35 -35
  31. package/dist/bigconsole/components/datasink/DataSinkCard.js +50 -51
  32. package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +18 -18
  33. package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +20 -20
  34. package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +47 -47
  35. package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +91 -91
  36. package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +35 -35
  37. package/dist/bigconsole/components/parser/DataSinkSelector.js +40 -40
  38. package/dist/bigconsole/components/parser/ImportParserDialog.js +120 -120
  39. package/dist/bigconsole/components/parser/ParserSelector.js +51 -51
  40. package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +10 -10
  41. package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +76 -77
  42. package/dist/bigconsole/components/preview/AiPreviewPanel.js +95 -96
  43. package/dist/bigconsole/components/widgets/ActionConfigDialog.js +4 -4
  44. package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +93 -93
  45. package/dist/bigconsole/components/widgets/PropertiesPanel.js +499 -507
  46. package/dist/bigconsole/components/widgets/WidgetRegistry.js +0 -1
  47. package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +4 -4
  48. package/dist/bigconsole/components/widgets/chart/ChartConfig.js +48 -48
  49. package/dist/bigconsole/components/widgets/comments/WidgetComments.js +46 -46
  50. package/dist/bigconsole/components/widgets/custom/CustomWidget.js +73 -131
  51. package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +61 -61
  52. package/dist/bigconsole/components/widgets/form/FormWidget.js +36 -36
  53. package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +42 -42
  54. package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +25 -25
  55. package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.d.ts +28 -9
  56. package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.js +115 -42
  57. package/dist/bigconsole/components/widgets/iframe-widget/framePolicy.d.ts +20 -0
  58. package/dist/bigconsole/components/widgets/iframe-widget/framePolicy.js +10 -0
  59. package/dist/bigconsole/components/widgets/iframe-widget/index.d.ts +2 -1
  60. package/dist/bigconsole/components/widgets/iframe-widget/index.js +3 -2
  61. package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +4 -4
  62. package/dist/bigconsole/components/widgets/list/ListConfig.js +30 -30
  63. package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +38 -38
  64. package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +9 -9
  65. package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js +9 -9
  66. package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +49 -49
  67. package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +39 -39
  68. package/dist/bigconsole/components/widgets/table/TableConfig.js +73 -73
  69. package/dist/bigconsole/components/widgets/text-widget/TextWidget.js +110 -27
  70. package/dist/bigconsole/components/widgets/text-widget/textData.d.ts +6 -0
  71. package/dist/bigconsole/components/widgets/text-widget/textData.js +17 -14
  72. package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +64 -64
  73. package/dist/bigconsole/components/workflow/WorkflowOpenGuard.js +15 -15
  74. package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +15 -15
  75. package/dist/bigconsole/context/BigConsoleContext.d.ts +10 -0
  76. package/dist/bigconsole/context/BigConsoleContext.js +47 -30
  77. package/dist/bigconsole/context/index.d.ts +1 -1
  78. package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +58 -49
  79. package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +74 -72
  80. package/dist/bigconsole/customWidget/proposalPreview.d.ts +5 -0
  81. package/dist/bigconsole/customWidget/proposalPreview.js +31 -0
  82. package/dist/bigconsole/hooks/useDataSinkAlerts.d.ts +0 -23
  83. package/dist/bigconsole/hooks/useDataSinkAlerts.js +113 -138
  84. package/dist/bigconsole/hooks/useDataSinkOperations.d.ts +7 -0
  85. package/dist/bigconsole/hooks/useDataSinkOperations.js +109 -98
  86. package/dist/bigconsole/hooks/useDataSinkSubscription.js +0 -1
  87. package/dist/bigconsole/hooks/useDrilldown.js +68 -67
  88. package/dist/bigconsole/hooks/useExportDataSink.js +1 -1
  89. package/dist/bigconsole/hooks/useGlobalFilters.js +3 -3
  90. package/dist/bigconsole/hooks/useImportDataSink.js +102 -90
  91. package/dist/bigconsole/pages/AdminPage.js +130 -130
  92. package/dist/bigconsole/pages/DashboardBuilderPage.js +60 -72
  93. package/dist/bigconsole/pages/DashboardViewPage.js +235 -258
  94. package/dist/bigconsole/pages/DashboardsPage.js +221 -269
  95. package/dist/bigconsole/pages/DataParsersPage.js +157 -180
  96. package/dist/bigconsole/pages/DataSinkAlertsPage.js +55 -62
  97. package/dist/bigconsole/pages/DataSinkBuilderPage.js +318 -295
  98. package/dist/bigconsole/pages/DataSinkViewPage.js +256 -255
  99. package/dist/bigconsole/pages/DataSinksPage.js +216 -251
  100. package/dist/bigconsole/pages/DataSourcesPage.js +5 -5
  101. package/dist/bigconsole/pages/InsightsPage.js +265 -279
  102. package/dist/bigconsole/pages/OverviewPage.js +47 -47
  103. package/dist/bigconsole/pages/ParserBuilderPage.js +213 -229
  104. package/dist/bigconsole/pages/ParserViewPage.js +97 -97
  105. package/dist/bigconsole/pages/PipelineBuilderPage.js +214 -256
  106. package/dist/bigconsole/pages/PipelineViewPage.js +146 -146
  107. package/dist/bigconsole/pages/PipelinesPage.js +88 -107
  108. package/dist/bigconsole/pages/SettingsPage.js +173 -179
  109. package/dist/bigconsole/pages/WidgetDemoPage.js +42 -42
  110. package/dist/bigconsole/pages/WorkflowViewPage.js +1 -1
  111. package/dist/bigconsole/pages/WorkflowsPage.js +141 -141
  112. package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +12 -12
  113. package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +235 -122
  114. package/dist/bigconsole/renderers/adapters/BlockKitRenderer.d.ts +6 -1
  115. package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +151 -151
  116. package/dist/bigconsole/renderers/adapters/CustomRenderer.js +46 -46
  117. package/dist/bigconsole/renderers/adapters/adaptiveCardContent.d.ts +29 -0
  118. package/dist/bigconsole/renderers/adapters/adaptiveCardContent.js +51 -0
  119. package/dist/bigconsole/store/widgetStore.d.ts +0 -12
  120. package/dist/bigconsole/store/widgetStore.js +1 -3
  121. package/dist/bigconsole/types/index.d.ts +17 -2
  122. package/dist/bigconsole/utils/backendError.d.ts +0 -18
  123. package/dist/bigconsole/utils/dataSinkPayload.d.ts +48 -0
  124. package/dist/bigconsole/utils/dataSinkPayload.js +38 -0
  125. package/dist/bigconsole/utils/index.d.ts +2 -0
  126. package/dist/bigconsole/utils/safeUrl.d.ts +79 -0
  127. package/dist/bigconsole/utils/safeUrl.js +93 -0
  128. package/dist/bigconsole/utils/sanitizeHtml.d.ts +16 -0
  129. package/dist/bigconsole/utils/sanitizeHtml.js +67 -0
  130. package/dist/bigconsole/workflowOpen.js +14 -15
  131. package/dist/generated/wspace-operations.d.ts +138 -8
  132. package/dist/generated/wspace-operations.js +281 -240
  133. package/dist/node_modules/dompurify/dist/purify.es.js +800 -0
  134. package/package.json +9 -5
  135. package/dist/bigconsole/assistant/displayCopy.d.ts +0 -32
  136. package/dist/bigconsole/assistant/pageControls.d.ts +0 -81
  137. package/dist/bigconsole/assistant/pageControls.js +0 -169
  138. package/dist/bigconsole/assistant/previewControl.d.ts +0 -16
  139. package/dist/bigconsole/assistant/previewControl.js +0 -10
  140. package/dist/bigconsole/assistant/usePreviewControl.d.ts +0 -2
  141. package/dist/bigconsole/assistant/usePreviewControl.js +0 -20
  142. package/dist/bigconsole/components/common/SortBySelect.d.ts +0 -11
  143. package/dist/bigconsole/components/common/SortBySelect.js +0 -29
  144. package/dist/bigconsole/constants/backendErrors.js +0 -94
  145. package/dist/bigconsole/hooks/useDashboardLayoutBaseline.d.ts +0 -14
  146. package/dist/bigconsole/hooks/useDashboardLayoutBaseline.js +0 -32
  147. package/dist/bigconsole/utils/backendError.js +0 -42
  148. package/dist/bigconsole/utils/dashboardList.d.ts +0 -28
  149. package/dist/bigconsole/utils/dashboardList.js +0 -15
  150. package/dist/bigconsole/utils/dataSinkList.d.ts +0 -15
  151. package/dist/bigconsole/utils/dataSinkList.js +0 -15
  152. package/dist/bigconsole/utils/formDirty.d.ts +0 -82
  153. package/dist/bigconsole/utils/formDirty.js +0 -21
  154. package/dist/bigconsole/utils/insightsDraft.d.ts +0 -29
  155. package/dist/bigconsole/utils/insightsDraft.js +0 -8
  156. package/dist/bigconsole/utils/layoutBaseline.d.ts +0 -130
  157. package/dist/bigconsole/utils/layoutBaseline.js +0 -96
  158. package/dist/bigconsole/utils/listSort.d.ts +0 -80
  159. package/dist/bigconsole/utils/listSort.js +0 -85
  160. package/dist/bigconsole/utils/widgetFormDirty.d.ts +0 -16
  161. package/dist/bigconsole/utils/widgetFormDirty.js +0 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-bigconsole",
3
- "version": "2026.1011.10",
3
+ "version": "2026.1012.1",
4
4
  "description": "BigConsole - AI-powered analytics and dashboard platform",
5
5
  "type": "module",
6
6
  "files": [
@@ -28,7 +28,7 @@
28
28
  "types": "./dist/index.d.ts",
29
29
  "scripts": {
30
30
  "dev": "vite",
31
- "build": "tsc && bash scripts/build-limits.sh --gate vite build",
31
+ "build": "tsc && MFE_DTS=1 bash scripts/build-limits.sh --gate vite build",
32
32
  "codegen": "graphql-codegen --project wspace && graphql-codegen --project global",
33
33
  "i18n:bundle": "bun run scripts/build-i18n-bundle.ts",
34
34
  "lint": "eslint .",
@@ -49,9 +49,12 @@
49
49
  "switch:check": "bun scripts/deps-mode.ts check",
50
50
  "prepare": "lefthook install || true"
51
51
  },
52
+ "dependencies": {
53
+ "dompurify": "^3.4.15"
54
+ },
52
55
  "peerDependencies": {
53
56
  "@apollo/client": "^4.0.11",
54
- "@burdenoff/fe-libs": "2026.1011.4",
57
+ "@burdenoff/fe-libs": "2026.1005.2",
55
58
  "@burdenoff/fluidgrids-fe-sdk": "2026.731.4",
56
59
  "@iconify/react": "^6.0.2",
57
60
  "@monaco-editor/react": "^4.7.0",
@@ -86,7 +89,7 @@
86
89
  "zustand": "^5.0.3"
87
90
  },
88
91
  "devDependencies": {
89
- "@burdenoff/fe-libs": "2026.1011.4",
92
+ "@burdenoff/fe-libs": "2026.1005.2",
90
93
  "@burdenoff/fluidgrids-fe-sdk": "2026.731.4",
91
94
  "@eslint/js": "^10.0.1",
92
95
  "@graphql-codegen/add": "^5.0.0",
@@ -114,6 +117,7 @@
114
117
  "eslint-plugin-react": "^7.37.5",
115
118
  "eslint-plugin-react-hooks": "^7.0.1",
116
119
  "globals": "^17.3.0",
120
+ "jsdom": "^26.1.0",
117
121
  "lefthook": "^2.1.1",
118
122
  "postcss": "^8.4.49",
119
123
  "prettier": "3.9.5",
@@ -130,7 +134,7 @@
130
134
  "overrides": {
131
135
  "lodash": ">=4.17.21",
132
136
  "lodash-es": ">=4.17.21",
133
- "dompurify": ">=3.3.4",
137
+ "dompurify": "^3.4.15",
134
138
  "fast-xml-parser": ">=4.5.5",
135
139
  "@xmldom/xmldom": ">=0.8.12",
136
140
  "swiper": ">=12.1.2",
@@ -1,32 +0,0 @@
1
- import { AssistantModeConfig } from '@burdenoff/fe-libs/shared/assistant/conversation';
2
-
3
- /** Keys longer than this get a hash suffix instead of the full slug (as fe-libs). */
4
- export declare const MAX_COPY_SLUG_LENGTH = 64;
5
- /**
6
- * lower-camel ASCII of an English string, accents folded and every
7
- * non-alphanumeric run a word break: `"What can I do on this screen?"` →
8
- * `whatCanIDoOnThisScreen`. A slug over {@link MAX_COPY_SLUG_LENGTH} keeps a
9
- * readable prefix plus a hash of the whole English.
10
- *
11
- * ★ The same function as fe-libs' `assistantCopySlug` (PR-I18N,
12
- * `shared/assistant/productCopy.ts`), which derives the keys it looks up at
13
- * display time. Replace this copy with the fe-libs import once that ships.
14
- *
15
- * @throws when nothing ASCII-alphanumeric is left — fe-libs shows such copy as
16
- * passed, so a key for it could never be asked for.
17
- */
18
- export declare function assistantCopySlug(english: string): string;
19
- /** The part of a mode whose copy this module keys. */
20
- export type AssistantModeDisplaySource = Pick<AssistantModeConfig, 'id' | 'description' | 'suggestions'>;
21
- /**
22
- * Relative key → English for each mode's description and suggestion chips, and
23
- * for each page label.
24
- *
25
- * @throws when two different English strings would share a key.
26
- */
27
- export declare function assistantDisplayCopy(args: {
28
- modes: readonly AssistantModeDisplaySource[];
29
- pageLabels: readonly string[];
30
- }): Record<string, string>;
31
- /** BigConsole's display copy as FULL keys (`bigconsole.assistant.…`), for the seed bundle. */
32
- export declare function bigconsoleAssistantDisplaySeedCopy(): Record<string, string>;
@@ -1,81 +0,0 @@
1
- import { PageControlsAdapter } from '@burdenoff/fe-libs/shared/assistant/appControls/types';
2
- import { ListSortValue, SortTr } from '../utils/listSort';
3
-
4
- export type Tr = SortTr;
5
- export interface Opt<V extends string> {
6
- value: V;
7
- label: string;
8
- }
9
- /**
10
- * The page's sort menu as an adapter `sort`: Name and Last updated, each both
11
- * ways. `value` `default` (a page's untouched order) reports no current sort.
12
- */
13
- export declare function listSortOf(input: {
14
- tr: Tr;
15
- value: ListSortValue;
16
- set: (value: ListSortValue) => void;
17
- }): NonNullable<PageControlsAdapter['sort']>;
18
- export interface DashboardsListInput {
19
- tr: Tr;
20
- /** The categories present in the data (the user's own words). */
21
- categories: readonly string[];
22
- /** The statuses present in the data, labelled as the page labels them. */
23
- statuses: readonly Opt<string>[];
24
- category: string;
25
- status: string;
26
- setCategory: (value: string) => void;
27
- setStatus: (value: string) => void;
28
- setSearch: (query: string) => void;
29
- sort: ListSortValue;
30
- setSort: (value: ListSortValue) => void;
31
- }
32
- export declare function dashboardsListControls(i: DashboardsListInput): PageControlsAdapter;
33
- export type SetupStateValue = 'all' | 'in_progress' | 'completed';
34
- export type DataSinkStatusValue = 'ready' | 'error' | 'stale' | 'refreshing';
35
- export interface DataSinksListInput {
36
- tr: Tr;
37
- setupStateOptions: readonly Opt<SetupStateValue>[];
38
- setupState: SetupStateValue;
39
- setSetupState: (value: SetupStateValue) => void;
40
- status: DataSinkStatusValue | null;
41
- setStatus: (value: DataSinkStatusValue | null) => void;
42
- active: boolean | null;
43
- setActive: (value: boolean | null) => void;
44
- setSearch: (query: string) => void;
45
- sort: ListSortValue;
46
- setSort: (value: ListSortValue) => void;
47
- }
48
- export declare function dataSinksListControls(i: DataSinksListInput): PageControlsAdapter;
49
- export interface ParsersListInput {
50
- tr: Tr;
51
- typeOptions: readonly Opt<string>[];
52
- statusOptions: readonly Opt<string>[];
53
- type: string;
54
- status: string;
55
- setType: (value: string) => void;
56
- setStatus: (value: string) => void;
57
- setSearch: (query: string) => void;
58
- }
59
- export declare function parsersListControls(i: ParsersListInput): PageControlsAdapter;
60
- export interface PipelinesListInput {
61
- tr: Tr;
62
- statusOptions: readonly Opt<string>[];
63
- status: string;
64
- setStatus: (value: string) => void;
65
- setSearch: (query: string) => void;
66
- }
67
- export declare function pipelinesListControls(i: PipelinesListInput): PageControlsAdapter;
68
- export interface DashboardPageTabsInput {
69
- /** The dashboard's own name (user data), said back as the page. */
70
- dashboardName: string;
71
- tabs: readonly {
72
- id: string;
73
- label: string;
74
- }[];
75
- /** The page now shown. */
76
- current: string | null;
77
- /** The toolbar's own handler (pushes `?page=`). */
78
- select: (id: string) => void;
79
- }
80
- /** Null when the dashboard has no pages to switch between. */
81
- export declare function dashboardPageTabs(i: DashboardPageTabsInput): PageControlsAdapter | null;
@@ -1,169 +0,0 @@
1
- import { LIST_SORT_COPY as e } from "../utils/listSort.js";
2
- import { enumFilter as t, filtersOf as n, searchOf as r, sortOf as i, tabsOf as a } from "@burdenoff/fe-libs/shared/assistant/appControls/pageAdapters";
3
- //#region src/bigconsole/assistant/pageControls.ts
4
- var o = (e) => e.filter.options().length > 0;
5
- function s(t) {
6
- return i({
7
- fields: [{
8
- id: "name",
9
- label: t.tr(e.fieldName.key, e.fieldName.en),
10
- asc: "name-asc",
11
- desc: "name-desc"
12
- }, {
13
- id: "updated",
14
- label: t.tr(e.fieldUpdated.key, e.fieldUpdated.en),
15
- asc: "updated-asc",
16
- desc: "updated-desc"
17
- }],
18
- value: t.value,
19
- set: t.set
20
- });
21
- }
22
- function c(e, t, i, a) {
23
- let s = t.filter(o);
24
- return {
25
- page: e,
26
- ...s.length > 0 ? { filters: n(s) } : {},
27
- ...a ? { sort: a } : {},
28
- search: r(i)
29
- };
30
- }
31
- function l(e) {
32
- let n = t({
33
- id: "category",
34
- label: e.tr("bigconsole.dashboards.filters.category", "Category"),
35
- options: [{
36
- value: "",
37
- label: e.tr("bigconsole.dashboards.filters.allCategories", "All categories")
38
- }, ...e.categories.map((e) => ({
39
- value: e,
40
- label: e
41
- }))],
42
- neutral: "",
43
- value: e.category,
44
- set: e.setCategory
45
- }), r = t({
46
- id: "status",
47
- label: e.tr("bigconsole.dashboards.filters.status", "Status"),
48
- options: [{
49
- value: "",
50
- label: e.tr("bigconsole.dashboards.filters.allStatuses", "All statuses")
51
- }, ...e.statuses],
52
- neutral: "",
53
- value: e.status,
54
- set: e.setStatus
55
- });
56
- return c(e.tr("bigconsole.dashboards.title", "Dashboards"), [n, r], e.setSearch, s({
57
- tr: e.tr,
58
- value: e.sort,
59
- set: e.setSort
60
- }));
61
- }
62
- function u(e) {
63
- let n = t({
64
- id: "setupState",
65
- label: e.tr("bigconsole.dataSinks.filters.setupState.label", "Setup state"),
66
- options: e.setupStateOptions,
67
- neutral: "all",
68
- value: e.setupState,
69
- set: e.setSetupState
70
- }), r = t({
71
- id: "status",
72
- label: e.tr("bigconsole.dataSinks.table.status", "Status"),
73
- options: [
74
- {
75
- value: "all",
76
- label: e.tr("bigconsole.dataSinks.filters.status.all", "All Statuses")
77
- },
78
- {
79
- value: "ready",
80
- label: e.tr("bigconsole.dataSinks.filters.status.ready", "Ready")
81
- },
82
- {
83
- value: "error",
84
- label: e.tr("bigconsole.dataSinks.filters.status.error", "Error")
85
- },
86
- {
87
- value: "stale",
88
- label: e.tr("bigconsole.dataSinks.filters.status.stale", "Stale")
89
- },
90
- {
91
- value: "refreshing",
92
- label: e.tr("bigconsole.dataSinks.filters.status.refreshing", "Refreshing")
93
- }
94
- ],
95
- neutral: "all",
96
- value: e.status ?? "all",
97
- set: (t) => e.setStatus(t === "all" ? null : t)
98
- }), i = t({
99
- id: "active",
100
- label: e.tr("bigconsole.dataSinks.table.active", "Active"),
101
- options: [
102
- {
103
- value: "all",
104
- label: e.tr("bigconsole.dataSinks.filters.active.all", "All")
105
- },
106
- {
107
- value: "true",
108
- label: e.tr("bigconsole.dataSinks.filters.active.active", "Active")
109
- },
110
- {
111
- value: "false",
112
- label: e.tr("bigconsole.dataSinks.filters.active.inactive", "Inactive")
113
- }
114
- ],
115
- neutral: "all",
116
- value: e.active === null ? "all" : e.active ? "true" : "false",
117
- set: (t) => e.setActive(t === "all" ? null : t === "true")
118
- });
119
- return c(e.tr("bigconsole.dataSinks.title", "Data Sinks"), [
120
- n,
121
- r,
122
- i
123
- ], e.setSearch, s({
124
- tr: e.tr,
125
- value: e.sort,
126
- set: e.setSort
127
- }));
128
- }
129
- function d(e) {
130
- let n = t({
131
- id: "type",
132
- label: e.tr("bigconsole.parsers.view.type", "Type"),
133
- options: e.typeOptions,
134
- neutral: "all",
135
- value: e.type,
136
- set: e.setType
137
- }), r = t({
138
- id: "status",
139
- label: e.tr("bigconsole.parsers.view.status", "Status"),
140
- options: e.statusOptions,
141
- neutral: "all",
142
- value: e.status,
143
- set: e.setStatus
144
- });
145
- return c(e.tr("bigconsole.parsers.list.title", "Data Parsers"), [n, r], e.setSearch, void 0);
146
- }
147
- function f(e) {
148
- let n = t({
149
- id: "status",
150
- label: e.tr("bigconsole.pipelines.view.detailStatus", "Status"),
151
- options: e.statusOptions,
152
- neutral: "all",
153
- value: e.status,
154
- set: e.setStatus
155
- });
156
- return c(e.tr("bigconsole.pipelines.list.heading", "Pipelines"), [n], e.setSearch, void 0);
157
- }
158
- function p(e) {
159
- return e.tabs.length === 0 || e.current === null ? null : {
160
- page: e.dashboardName,
161
- tabs: a({
162
- items: e.tabs,
163
- value: e.current,
164
- set: e.select
165
- })
166
- };
167
- }
168
- //#endregion
169
- export { p as dashboardPageTabs, l as dashboardsListControls, u as dataSinksListControls, d as parsersListControls, f as pipelinesListControls };
@@ -1,16 +0,0 @@
1
- import { PreviewControl } from '@burdenoff/fe-libs/shared/assistant/appControls/types';
2
-
3
- /** What the control needs from the run store. `isOpen` is read FRESH on every call. */
4
- export interface PreviewRunPort {
5
- hasRun: boolean;
6
- isOpen: () => boolean;
7
- open: () => void;
8
- close: () => void;
9
- }
10
- /**
11
- * Null without a run: no Preview button is on screen then, so "open the AI
12
- * preview" goes to the model. Drawn on the page beside the assistant, so the
13
- * surface is "page" (Voice may open it). Open and close are SET: `already`
14
- * when it is in the state asked for.
15
- */
16
- export declare function previewControlOf(run: PreviewRunPort): PreviewControl | null;
@@ -1,10 +0,0 @@
1
- //#region src/bigconsole/assistant/previewControl.ts
2
- function e(e) {
3
- return e.hasRun ? {
4
- surface: "page",
5
- run: () => e.isOpen() ? { status: "already" } : (e.open(), { status: "done" }),
6
- close: () => e.isOpen() ? (e.close(), { status: "done" }) : { status: "already" }
7
- } : null;
8
- }
9
- //#endregion
10
- export { e as previewControlOf };
@@ -1,2 +0,0 @@
1
- /** Call it BEFORE any early `return null` in the surface. */
2
- export declare function useBigConsolePreviewControl(): void;
@@ -1,20 +0,0 @@
1
- import { useAssistantRunStore as e } from "./assistantRunStore.js";
2
- import { previewControlOf as t } from "./previewControl.js";
3
- import { useMemo as n } from "react";
4
- import { useAssistantControl as r } from "@burdenoff/fe-libs/shared/assistant/appControls/useAssistantControl";
5
- //#region src/bigconsole/assistant/usePreviewControl.ts
6
- function i() {
7
- let i = e((e) => e.hasRun), a = e((e) => e.openPreview), o = e((e) => e.closePreview);
8
- r("assistant.preview", n(() => t({
9
- hasRun: i,
10
- isOpen: () => e.getState().previewOpen,
11
- open: a,
12
- close: o
13
- }), [
14
- i,
15
- a,
16
- o
17
- ]));
18
- }
19
- //#endregion
20
- export { i as useBigConsolePreviewControl };
@@ -1,11 +0,0 @@
1
- import { FC } from 'react';
2
- import { ListSortOption, ListSortValue } from '../../utils/listSort';
3
-
4
- export interface SortBySelectProps {
5
- /** The visible label, already translated ("Sort by"). */
6
- label: string;
7
- value: ListSortValue;
8
- options: readonly ListSortOption[];
9
- onChange: (value: ListSortValue) => void;
10
- }
11
- export declare const SortBySelect: FC<SortBySelectProps>;
@@ -1,29 +0,0 @@
1
- import { memo as e } from "react";
2
- import { Select as t, SelectContent as n, SelectItem as r, SelectTrigger as i, SelectValue as a } from "@burdenoff/fe-libs/ui";
3
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
4
- //#region src/bigconsole/components/common/SortBySelect.tsx
5
- var c = (e, t) => t.some((t) => t.value === e), l = e(function({ label: e, value: l, options: u, onChange: d }) {
6
- return /* @__PURE__ */ s("div", {
7
- className: "flex min-w-0 items-center gap-control-gap",
8
- "data-testid": "sort-by",
9
- children: [/* @__PURE__ */ o("span", {
10
- className: "shrink-0 text-sm text-text-muted",
11
- children: e
12
- }), /* @__PURE__ */ s(t, {
13
- value: l,
14
- onValueChange: (e) => {
15
- c(e, u) && d(e);
16
- },
17
- children: [/* @__PURE__ */ o(i, {
18
- "aria-label": e,
19
- style: { width: "min(100%, 210px)" },
20
- children: /* @__PURE__ */ o(a, {})
21
- }), /* @__PURE__ */ o(n, { children: u.map((e) => /* @__PURE__ */ o(r, {
22
- value: e.value,
23
- children: e.label
24
- }, e.value)) })]
25
- })]
26
- });
27
- });
28
- //#endregion
29
- export { l as SortBySelect };
@@ -1,94 +0,0 @@
1
- //#region src/bigconsole/constants/backendErrors.ts
2
- var e = {
3
- DASHBOARD_NOT_FOUND: "That dashboard could not be found.",
4
- DASHBOARD_NOT_FOUND_AFTER_CREATE: "The dashboard was created but could not be loaded. Refresh and try again.",
5
- DASHBOARD_ARCHIVED_CANNOT_PUBLISH: "An archived dashboard cannot be published. Restore it first.",
6
- DASHBOARD_INVALID_STATUS_TRANSITION: "That status change is not allowed for this dashboard.",
7
- SOURCE_DASHBOARD_NOT_FOUND: "The source dashboard could not be found.",
8
- DASHBOARD_IMPORT_INVALID_JSON: "The import file is not valid JSON.",
9
- DASHBOARD_IMPORT_MISSING_DATA: "The import file is missing its dashboard data.",
10
- DASHBOARD_LOCALE_REQUIRED: "A locale is required.",
11
- DASHBOARD_NAME_REQUIRED: "A name is required.",
12
- DASHBOARD_THRESHOLD_REQUIRED: "A threshold is required for the threshold method.",
13
- DASHBOARD_VERSION_NOT_FOUND: "That dashboard version could not be found.",
14
- DASHBOARD_COMMENT_BODY_REQUIRED: "A comment cannot be empty.",
15
- DASHBOARD_PARENT_COMMENT_NOT_FOUND: "The comment you are replying to could not be found.",
16
- DASHBOARD_COMMENT_NOT_FOUND: "That comment could not be found.",
17
- RLS_POLICY_NOT_FOUND: "That row-level-security policy could not be found.",
18
- RLS_POLICY_NOT_FOUND_IN_WORKSPACE: "That row-level-security policy is not in this workspace.",
19
- TEMPLATE_NOT_FOUND: "That template could not be found.",
20
- TEMPLATE_NOT_ACTIVE: "That template is not active.",
21
- TEMPLATE_RATING_OUT_OF_RANGE: "Rating must be between 1 and 5.",
22
- PAGE_NOT_FOUND: "That page could not be found.",
23
- PAGE_NOT_FOUND_IN_DASHBOARD: "That page is not part of this dashboard.",
24
- FILTER_PRESET_NOT_FOUND: "That filter preset could not be found.",
25
- FILTER_PRESET_UPDATE_FORBIDDEN: "You don't have permission to update this preset.",
26
- FILTER_PRESET_DELETE_FORBIDDEN: "You don't have permission to delete this preset.",
27
- PARENT_FILTER_NOT_FOUND: "The parent filter could not be found.",
28
- PARENT_FILTER_DASHBOARD_MISMATCH: "The parent filter must belong to the same dashboard.",
29
- FILTER_CASCADE_DEPTH_EXCEEDED: "The filter cascade is too deep (maximum 5 levels).",
30
- FILTER_NOT_FOUND: "That filter could not be found.",
31
- FILTER_CIRCULAR_DEPENDENCY: "That change would create a circular filter dependency.",
32
- FILTER_NOT_FOUND_IN_DASHBOARD: "That filter is not part of this dashboard.",
33
- SHARE_NOT_FOUND: "That share could not be found.",
34
- VIEW_NOT_FOUND: "That view could not be found.",
35
- GENERATION_EMPTY_COMPLETION: "The AI returned an empty result. Try again.",
36
- GENERATION_NOT_AUTHORIZED: "You don't have permission to use this generation.",
37
- PROMPT_TOO_LONG: "Your prompt is too long (maximum 5000 characters).",
38
- TOO_MANY_WIDGETS: "Cannot generate more than 50 widgets.",
39
- GRID_COLUMNS_OUT_OF_RANGE: "Grid columns must be between 1 and 24.",
40
- AUTO_CREATE_DISABLED: "Auto-create is disabled. Create the dashboard after generation completes.",
41
- GENERATION_NOT_FOUND: "That generation could not be found.",
42
- GENERATION_NO_SPEC: "That generation does not have a spec yet.",
43
- GENERATION_NOT_FOUND_OR_NO_SPEC: "That generation could not be found or has no spec yet.",
44
- WIDGET_INDEX_OUT_OF_BOUNDS: "That widget index is out of bounds.",
45
- WIDGET_NOT_FOUND: "That widget could not be found.",
46
- WIDGETS_NOT_FOUND: "One or more widgets could not be found.",
47
- TARGET_PAGE_NOT_FOUND: "The target page could not be found.",
48
- DRILLDOWN_ALREADY_EXISTS: "A drilldown already exists for this widget.",
49
- DATA_SOURCE_HTTP_ERROR: "The data source returned an error.",
50
- DATA_SOURCE_GRAPHQL_ERROR: "The GraphQL data source returned an error.",
51
- WIDGET_ACTION_NOT_FOUND: "That action could not be found.",
52
- WIDGET_ACTION_NOT_FOUND_IN_WIDGET: "That action is not part of this widget.",
53
- EVENT_WEBHOOK_MAPPING_NOT_FOUND: "That webhook mapping could not be found.",
54
- EVENT_LOG_NOT_FOUND: "That event could not be found.",
55
- EVENT_NOT_IN_FAILED_STATUS: "Only failed events can be retried.",
56
- EVENT_LOG_MISSING_WIDGET_ID: "This event has no widget and cannot be retried.",
57
- NO_ACTIVE_WEBHOOK_MAPPINGS: "No active webhook mappings were found for this event.",
58
- WIDGET_NOT_ASSOCIATED_WITH_DASHBOARD: "That widget is not associated with a dashboard.",
59
- WIDGET_TYPE_NOT_REGISTERED: "That widget type is not registered. Register it before installing.",
60
- INVALID_PUBLISH_TYPE: "That publish type is not valid.",
61
- INVALID_REGISTRABLE_PUBLISH_TYPE: "That publish type cannot be registered.",
62
- INVALID_WIDGET_RENDERER: "That widget renderer is not valid.",
63
- INVALID_WIDGET_CONFIG_STATUS: "That widget status is not valid.",
64
- WORKFLOW_WORKSPACE_ID_REQUIRED: "A workspace is required.",
65
- WORKFLOW_WORKSPACE_AND_ACTOR_ID_REQUIRED: "A workspace and an actor are required.",
66
- WORKFLOW_EXECUTION_TRIGGER_FAILED: "The workflow could not be triggered. Try again.",
67
- WORKFLOW_GATEWAY_GRAPHQL_ERROR: "The workflow service returned an error.",
68
- WORKFLOW_NOT_FOUND: "That workflow could not be found.",
69
- WORKFLOW_KEY_EXISTS: "A workflow with that key already exists in this workspace.",
70
- INVALID_INITIAL_WORKFLOW_STATUS: "That workflow status cannot be used when creating a workflow.",
71
- EXTERNAL_WORKFLOW_CREATE_FAILED: "The workflow could not be created in the workflow builder. Retry, or create the definition first and link it.",
72
- DATASINK_LINK_NOT_FOUND: "That DataSink link could not be found.",
73
- VERSION_MISMATCH: "This record was changed elsewhere. Reload and try again.",
74
- PARSER_NOT_FOUND: "That parser could not be found.",
75
- PARSER_VERSION_MISMATCH: "This parser was changed elsewhere. Reload and try again.",
76
- PARSER_TYPE_UNSUPPORTED: "Unsupported parser type. Only 'jq' and 'jsonata' are supported.",
77
- PARSER_EXPRESSION_INVALID: "The parser expression is invalid.",
78
- PARSER_DATASINK_NOT_FOUND: "The parser’s source DataSink could not be found.",
79
- PIPELINE_ACTOR_REQUIRED: "A workspace and an actor are required.",
80
- PIPELINE_STAGE_NO_PARSER: "A pipeline stage has no expression or parser.",
81
- DATASINK_NOT_FOUND: "That data sink could not be found.",
82
- E_PIPELINE_NOT_FOUND: "That pipeline could not be found.",
83
- E_PIPELINE_STAGE_NOT_FOUND: "That pipeline stage could not be found.",
84
- E_PIPELINE_EXECUTION: "The pipeline execution failed.",
85
- E_PIPELINE_VERSION_MISMATCH: "This pipeline was changed elsewhere. Reload and try again.",
86
- E_PIPELINE_INACTIVE: "That pipeline is not active.",
87
- E_PIPELINE_EXECUTION_NOT_FOUND: "That pipeline execution could not be found.",
88
- E_PIPELINE_NAME_EXISTS: "A pipeline with that name already exists for this console.",
89
- E_PIPELINE_DUPLICATE_OUTPUT_KEY: "Each pipeline stage must have a unique output key.",
90
- E_PIPELINE_VALIDATION_ERROR: "The pipeline input is not valid.",
91
- BAD_USER_INPUT: "The request is not valid."
92
- };
93
- //#endregion
94
- export { e as BACKEND_ERROR_MESSAGES };
@@ -1,14 +0,0 @@
1
- import { LayoutItem } from '../utils/layoutBaseline';
2
-
3
- export interface DashboardLayoutBaseline {
4
- /** The board's positions differ from the last loaded or saved ones, because a person placed something. */
5
- dirty: boolean;
6
- /**
7
- * Re-take the baseline after the positions reached the server. `sent` is exactly
8
- * what was sent; `editRevisionAtSave` is `layoutEditRevision` read BEFORE the
9
- * request began, so a placement made while it was in flight stays dirty.
10
- * Call it on success only: a failed save must leave the layout dirty.
11
- */
12
- markSaved: (sent: ReadonlyArray<LayoutItem>, editRevisionAtSave: number) => void;
13
- }
14
- export declare function useDashboardLayoutBaseline(dashboardId: string | undefined): DashboardLayoutBaseline;
@@ -1,32 +0,0 @@
1
- import { useWidgetStore as e } from "../store/widgetStore.js";
2
- import "../store/index.js";
3
- import { INITIAL_LAYOUT_BASELINE as t, isLayoutBaselineDirty as n, layoutFromWidgets as r, normaliseLayout as i, reduceLayoutBaseline as a } from "../utils/layoutBaseline.js";
4
- import { useCallback as o, useEffect as s, useMemo as c, useReducer as l, useState as u } from "react";
5
- //#region src/bigconsole/hooks/useDashboardLayoutBaseline.ts
6
- function d(d) {
7
- let f = e((e) => e.widgets), p = e((e) => e.layoutEditRevision), [m, h] = l(a, t), g = c(() => r(f.values()), [f]), [_, v] = u(d);
8
- _ !== d && (v(d), h({ type: "reset" })), s(() => {
9
- h({
10
- type: "observe",
11
- layout: g,
12
- editRevision: p
13
- });
14
- }, [
15
- d,
16
- g,
17
- p
18
- ]);
19
- let y = o((e, t) => {
20
- h({
21
- type: "saved",
22
- layout: i(e),
23
- editRevision: t
24
- });
25
- }, []);
26
- return {
27
- dirty: n(m, g),
28
- markSaved: y
29
- };
30
- }
31
- //#endregion
32
- export { d as useDashboardLayoutBaseline };
@@ -1,42 +0,0 @@
1
- //#region src/bigconsole/utils/backendError.ts
2
- function e(e) {
3
- return typeof e == "object" && !!e;
4
- }
5
- var t = 4;
6
- function n(t) {
7
- return Array.isArray(t) ? t.flatMap((t) => {
8
- let n = e(t) && e(t.extensions) ? t.extensions.code : void 0;
9
- return typeof n == "string" && n.length > 0 ? [n] : [];
10
- }) : [];
11
- }
12
- function r(t) {
13
- if (typeof t != "string" || t.length === 0) return [];
14
- try {
15
- let r = JSON.parse(t);
16
- return e(r) ? n(r.errors) : [];
17
- } catch {
18
- return [];
19
- }
20
- }
21
- function i(i) {
22
- let a = /* @__PURE__ */ new Set(), o = (i, s) => {
23
- if (!e(i) || s > t || a.has(i)) return [];
24
- a.add(i);
25
- let c = e(i.extensions) ? i.extensions.code : void 0;
26
- return [
27
- ...n(i.errors),
28
- ...n(i.graphQLErrors),
29
- ...e(i.result) ? n(i.result.errors) : [],
30
- ...r(i.bodyText),
31
- ...typeof c == "string" && c.length > 0 ? [c] : [],
32
- ...o(i.cause, s + 1),
33
- ...o(i.error, s + 1)
34
- ];
35
- };
36
- return [...new Set(o(i, 0))];
37
- }
38
- function a(e, t) {
39
- return i(e).some((e) => t.has(e));
40
- }
41
- //#endregion
42
- export { i as graphQLErrorCodes, a as hasGraphQLErrorCode };
@@ -1,28 +0,0 @@
1
- import { ListSortValue } from './listSort';
2
-
3
- export interface DashboardRow {
4
- name: string;
5
- description?: string | null;
6
- category?: string | null;
7
- status?: string;
8
- updatedAt: string;
9
- }
10
- export interface DashboardListQuery {
11
- search: string;
12
- /** '' = all categories. */
13
- category: string;
14
- /** '' = all statuses. */
15
- status: string;
16
- sort: ListSortValue;
17
- /** 1-based. */
18
- page: number;
19
- pageSize: number;
20
- }
21
- export interface DashboardListResult<T> {
22
- /** Every row that passes search and filters, in the chosen order. */
23
- filtered: T[];
24
- totalPages: number;
25
- /** The rows on `page` (clamped to the available pages). */
26
- pageItems: T[];
27
- }
28
- export declare function selectDashboards<T extends DashboardRow>(dashboards: readonly T[], query: DashboardListQuery): DashboardListResult<T>;
@@ -1,15 +0,0 @@
1
- import { sortList as e } from "./listSort.js";
2
- //#region src/bigconsole/utils/dashboardList.ts
3
- function t(t, n) {
4
- let r = n.search.toLowerCase(), i = e(t.filter((e) => (!n.category || e.category === n.category) && (!n.status || e.status === n.status) && (e.name.toLowerCase().includes(r) || e.description?.toLowerCase().includes(r))), n.sort, {
5
- name: (e) => e.name,
6
- updatedAt: (e) => e.updatedAt
7
- }), a = Math.max(1, Math.ceil(i.length / n.pageSize)), o = (Math.min(Math.max(1, n.page), a) - 1) * n.pageSize;
8
- return {
9
- filtered: i,
10
- totalPages: a,
11
- pageItems: i.slice(o, o + n.pageSize)
12
- };
13
- }
14
- //#endregion
15
- export { t as selectDashboards };