@burdenoff/microfe-bigconsole 2026.805.1 → 2026.805.3

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 (150) hide show
  1. package/dist/bigconsole/AdminRoot.js +21 -16
  2. package/dist/bigconsole/AdminRoot.js.map +1 -1
  3. package/dist/bigconsole/BigConsoleRoot.js +44 -39
  4. package/dist/bigconsole/BigConsoleRoot.js.map +1 -1
  5. package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +109 -113
  6. package/dist/bigconsole/components/builder/inspector/DataBindingSection.js.map +1 -1
  7. package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +115 -113
  8. package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js.map +1 -1
  9. package/dist/bigconsole/components/dashboard/DashboardCanvas.js +71 -62
  10. package/dist/bigconsole/components/dashboard/DashboardCanvas.js.map +1 -1
  11. package/dist/bigconsole/components/dashboard/DashboardToolbar.js +116 -100
  12. package/dist/bigconsole/components/dashboard/DashboardToolbar.js.map +1 -1
  13. package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +56 -54
  14. package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js.map +1 -1
  15. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +126 -125
  16. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js.map +1 -1
  17. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +151 -150
  18. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js.map +1 -1
  19. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +77 -76
  20. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js.map +1 -1
  21. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +97 -96
  22. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js.map +1 -1
  23. package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +172 -191
  24. package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js.map +1 -1
  25. package/dist/bigconsole/components/dashboard/PageTabsManager/PageTabsManager.js +100 -98
  26. package/dist/bigconsole/components/dashboard/PageTabsManager/PageTabsManager.js.map +1 -1
  27. package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js +75 -83
  28. package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js.map +1 -1
  29. package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +151 -154
  30. package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js.map +1 -1
  31. package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +187 -193
  32. package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js.map +1 -1
  33. package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -0
  34. package/dist/bigconsole/components/dashboard/WidgetPalette.js +110 -108
  35. package/dist/bigconsole/components/dashboard/WidgetPalette.js.map +1 -1
  36. package/dist/bigconsole/components/datasink/CacheTTLSelector.js +102 -103
  37. package/dist/bigconsole/components/datasink/CacheTTLSelector.js.map +1 -1
  38. package/dist/bigconsole/components/datasink/DataSinkCard.js +20 -20
  39. package/dist/bigconsole/components/datasink/DataSinkCard.js.map +1 -1
  40. package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +36 -41
  41. package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js.map +1 -1
  42. package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +38 -37
  43. package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js.map +1 -1
  44. package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +113 -117
  45. package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js.map +1 -1
  46. package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +182 -197
  47. package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js.map +1 -1
  48. package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +166 -168
  49. package/dist/bigconsole/components/datasink/RefreshTypeSelector.js.map +1 -1
  50. package/dist/bigconsole/components/parser/DataSinkSelector.js +87 -86
  51. package/dist/bigconsole/components/parser/DataSinkSelector.js.map +1 -1
  52. package/dist/bigconsole/components/parser/ImportParserDialog.js +196 -211
  53. package/dist/bigconsole/components/parser/ImportParserDialog.js.map +1 -1
  54. package/dist/bigconsole/components/parser/ParserSelector.js +130 -128
  55. package/dist/bigconsole/components/parser/ParserSelector.js.map +1 -1
  56. package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +66 -63
  57. package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js.map +1 -1
  58. package/dist/bigconsole/components/preview/AiPreviewPanel.js +95 -91
  59. package/dist/bigconsole/components/preview/AiPreviewPanel.js.map +1 -1
  60. package/dist/bigconsole/components/widgets/ActionConfigDialog.js +243 -230
  61. package/dist/bigconsole/components/widgets/ActionConfigDialog.js.map +1 -1
  62. package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +149 -145
  63. package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js.map +1 -1
  64. package/dist/bigconsole/components/widgets/PropertiesPanel.js +504 -470
  65. package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
  66. package/dist/bigconsole/components/widgets/WidgetMenu.js +87 -76
  67. package/dist/bigconsole/components/widgets/WidgetMenu.js.map +1 -1
  68. package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +44 -47
  69. package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js.map +1 -1
  70. package/dist/bigconsole/components/widgets/chart/ChartConfig.js +143 -142
  71. package/dist/bigconsole/components/widgets/chart/ChartConfig.js.map +1 -1
  72. package/dist/bigconsole/components/widgets/comments/WidgetComments.js +101 -88
  73. package/dist/bigconsole/components/widgets/comments/WidgetComments.js.map +1 -1
  74. package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +135 -134
  75. package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js.map +1 -1
  76. package/dist/bigconsole/components/widgets/form/FormWidget.js +167 -159
  77. package/dist/bigconsole/components/widgets/form/FormWidget.js.map +1 -1
  78. package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +69 -68
  79. package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js.map +1 -1
  80. package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +64 -72
  81. package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js.map +1 -1
  82. package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +60 -59
  83. package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js.map +1 -1
  84. package/dist/bigconsole/components/widgets/list/ListConfig.js +57 -56
  85. package/dist/bigconsole/components/widgets/list/ListConfig.js.map +1 -1
  86. package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +70 -69
  87. package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js.map +1 -1
  88. package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +35 -34
  89. package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js.map +1 -1
  90. package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js +20 -19
  91. package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js.map +1 -1
  92. package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +178 -177
  93. package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js.map +1 -1
  94. package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +76 -75
  95. package/dist/bigconsole/components/widgets/progress/ProgressConfig.js.map +1 -1
  96. package/dist/bigconsole/components/widgets/table/TableConfig.js +183 -168
  97. package/dist/bigconsole/components/widgets/table/TableConfig.js.map +1 -1
  98. package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +187 -180
  99. package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js.map +1 -1
  100. package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js +120 -118
  101. package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js.map +1 -1
  102. package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +40 -38
  103. package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js.map +1 -1
  104. package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +150 -148
  105. package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js.map +1 -1
  106. package/dist/bigconsole/pages/DashboardBuilderPage.js +189 -175
  107. package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
  108. package/dist/bigconsole/pages/DashboardViewPage.js +200 -187
  109. package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
  110. package/dist/bigconsole/pages/DashboardsPage.js +379 -324
  111. package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
  112. package/dist/bigconsole/pages/DataParsersPage.js +185 -178
  113. package/dist/bigconsole/pages/DataParsersPage.js.map +1 -1
  114. package/dist/bigconsole/pages/DataSinkBuilderPage.js +195 -170
  115. package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
  116. package/dist/bigconsole/pages/DataSinkViewPage.js +224 -200
  117. package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
  118. package/dist/bigconsole/pages/DataSinksPage.js +281 -268
  119. package/dist/bigconsole/pages/DataSinksPage.js.map +1 -1
  120. package/dist/bigconsole/pages/DataSourcesPage.js +8 -7
  121. package/dist/bigconsole/pages/DataSourcesPage.js.map +1 -1
  122. package/dist/bigconsole/pages/InsightsPage.js +238 -208
  123. package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
  124. package/dist/bigconsole/pages/ParserBuilderPage.js +480 -413
  125. package/dist/bigconsole/pages/ParserBuilderPage.js.map +1 -1
  126. package/dist/bigconsole/pages/ParserViewPage.js +192 -172
  127. package/dist/bigconsole/pages/ParserViewPage.js.map +1 -1
  128. package/dist/bigconsole/pages/PipelineBuilderPage.js +198 -163
  129. package/dist/bigconsole/pages/PipelineBuilderPage.js.map +1 -1
  130. package/dist/bigconsole/pages/PipelineViewPage.js +138 -133
  131. package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
  132. package/dist/bigconsole/pages/PipelinesPage.js +162 -136
  133. package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
  134. package/dist/bigconsole/pages/SettingsPage.js +177 -172
  135. package/dist/bigconsole/pages/SettingsPage.js.map +1 -1
  136. package/dist/bigconsole/pages/WidgetDemoPage.js +121 -83
  137. package/dist/bigconsole/pages/WidgetDemoPage.js.map +1 -1
  138. package/dist/bigconsole/pages/WorkflowViewPage.js +269 -242
  139. package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
  140. package/dist/bigconsole/pages/WorkflowsPage.js +153 -138
  141. package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
  142. package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +111 -109
  143. package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js.map +1 -1
  144. package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +127 -126
  145. package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js.map +1 -1
  146. package/dist/bigconsole/renderers/adapters/CustomRenderer.js +103 -103
  147. package/dist/bigconsole/renderers/adapters/CustomRenderer.js.map +1 -1
  148. package/dist/constants/permissions.js +83 -0
  149. package/dist/constants/permissions.js.map +1 -0
  150. package/package.json +2 -1
@@ -1,64 +1,74 @@
1
1
  import { useAppNavigate as e } from "../contexts/NavigationContext.js";
2
2
  import "../contexts/index.js";
3
3
  import t from "../hooks/useDashboardOperations.js";
4
- import ee from "../hooks/useDataSinkOperations.js";
5
- import te from "../hooks/useParserOperations.js";
6
- import ne from "../components/datasink/CacheTTLSelector.js";
7
- import { memo as n, useCallback as r, useEffect as i, useMemo as a, useRef as re, useState as o } from "react";
8
- import { useParams as ie } from "react-router";
9
- import { AlertCircle as s, ArrowLeft as ae, CheckCircle2 as oe, ChevronDown as se, ChevronRight as ce, Code as le, Download as ue, Eye as de, FileCode2 as fe, LayoutDashboard as pe, Loader2 as c, Play as l, Save as me, Settings as he, X as ge } from "lucide-react";
10
- import { Button as u, CardContent as _e, CardHeader as ve, CardTitle as ye, GlassCard as be, PagePurpose as xe, Stepper as Se } from "@burdenoff/fe-libs/ui";
4
+ import n from "../hooks/useDataSinkOperations.js";
5
+ import ee from "../hooks/useParserOperations.js";
6
+ import { BIGCONSOLE_PERMISSIONS as r } from "../../constants/permissions.js";
7
+ import te from "../components/datasink/CacheTTLSelector.js";
8
+ import { memo as i, useCallback as a, useEffect as o, useMemo as s, useRef as ne, useState as c } from "react";
9
+ import { useParams as re } from "react-router";
10
+ import { AccessDenied as ie, PermissionButton as ae } from "@burdenoff/fe-libs/shared/components";
11
+ import { usePermissions as oe } from "@burdenoff/fe-libs/shared/providers/shell";
12
+ import { AlertCircle as se, ArrowLeft as ce, CheckCircle2 as le, ChevronDown as ue, ChevronRight as de, Code as fe, Download as pe, Eye as me, FileCode2 as he, LayoutDashboard as ge, Loader2 as l, Play as _e, Save as ve, Settings as ye, X as be } from "lucide-react";
13
+ import { useI18n as xe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
14
+ import { Button as u, CardContent as Se, CardHeader as Ce, CardTitle as we, GlassCard as Te, PagePurpose as Ee, Stepper as De } from "@burdenoff/fe-libs/ui";
11
15
  import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
12
16
  //#region src/bigconsole/pages/ParserBuilderPage.tsx
13
- var m = 25, Ce = "default", we = [
17
+ var m = 25, Oe = "default", ke = [
14
18
  "details",
15
19
  "source",
16
20
  "expression",
17
21
  "review"
18
- ], h = [
19
- {
20
- key: "details",
21
- label: "Details",
22
- description: "Name & scope"
23
- },
24
- {
25
- key: "source",
26
- label: "Source & Type",
27
- description: "Engine & data"
28
- },
29
- {
30
- key: "expression",
31
- label: "Expression & Test",
32
- description: "Transform & verify"
33
- },
34
- {
35
- key: "review",
36
- label: "Cache & Review",
37
- description: "Finish up"
38
- }
39
22
  ];
40
- function Te(e) {
23
+ function Ae(e) {
24
+ return [
25
+ {
26
+ key: "details",
27
+ label: e("bigconsole.parsers.builder.steps.details.label", "Details"),
28
+ description: e("bigconsole.parsers.builder.steps.details.description", "Name & scope")
29
+ },
30
+ {
31
+ key: "source",
32
+ label: e("bigconsole.parsers.builder.steps.source.label", "Source & Type"),
33
+ description: e("bigconsole.parsers.builder.steps.source.description", "Engine & data")
34
+ },
35
+ {
36
+ key: "expression",
37
+ label: e("bigconsole.parsers.builder.steps.expression.label", "Expression & Test"),
38
+ description: e("bigconsole.parsers.builder.steps.expression.description", "Transform & verify")
39
+ },
40
+ {
41
+ key: "review",
42
+ label: e("bigconsole.parsers.builder.steps.review.label", "Cache & Review"),
43
+ description: e("bigconsole.parsers.builder.steps.review.description", "Finish up")
44
+ }
45
+ ];
46
+ }
47
+ function je(e) {
41
48
  return e.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "").substring(0, 64);
42
49
  }
43
- function Ee(e) {
44
- let t = {};
45
- return e.name.trim() ? e.name.length < 2 && (t.name = "Name must be at least 2 characters") : t.name = "Name is required", e.outputKey.trim() ? /^[a-z0-9_]+$/.test(e.outputKey) || (t.outputKey = "Output key can only contain lowercase letters, numbers, and underscores") : t.outputKey = "Output key is required", e.expression.trim() || (t.expression = "Expression is required"), e.inputSinkKey.trim() || (t.inputSinkKey = "Source DataSink is required"), e.ttl != null && e.ttl > 0 && (e.ttl < 30 || e.ttl > 86400) && (t.ttl = "Cache duration must be between 30 and 86400 seconds"), t;
50
+ function Me(e, t) {
51
+ let n = {};
52
+ return e.name.trim() ? e.name.length < 2 && (n.name = t("bigconsole.parsers.builder.validation.nameMinLength", "Name must be at least 2 characters")) : n.name = t("bigconsole.parsers.builder.validation.nameRequired", "Name is required"), e.outputKey.trim() ? /^[a-z0-9_]+$/.test(e.outputKey) || (n.outputKey = t("bigconsole.parsers.builder.validation.outputKeyInvalid", "Output key can only contain lowercase letters, numbers, and underscores")) : n.outputKey = t("bigconsole.parsers.builder.validation.outputKeyRequired", "Output key is required"), e.expression.trim() || (n.expression = t("bigconsole.parsers.builder.validation.expressionRequired", "Expression is required")), e.inputSinkKey.trim() || (n.inputSinkKey = t("bigconsole.parsers.builder.validation.inputSinkRequired", "Source DataSink is required")), e.ttl != null && e.ttl > 0 && (e.ttl < 30 || e.ttl > 86400) && (n.ttl = t("bigconsole.parsers.builder.validation.cacheDurationRange", "Cache duration must be between 30 and 86400 seconds")), n;
53
+ }
54
+ function Ne(e) {
55
+ return {
56
+ jq: {
57
+ name: e("bigconsole.parsers.builder.parserType.jq.name", "JQ"),
58
+ description: e("bigconsole.parsers.builder.parserType.jq.description", "Lightweight JSON processor - fast and efficient for simple transformations"),
59
+ placeholder: ".data | map({name: .name, value: .count})",
60
+ example: e("bigconsole.parsers.builder.parserType.jq.example", ".data | map(.name) - Extract names from data array")
61
+ },
62
+ jsonata: {
63
+ name: e("bigconsole.parsers.builder.parserType.jsonata.name", "JSONata"),
64
+ description: e("bigconsole.parsers.builder.parserType.jsonata.description", "Query and transformation language - supports complex queries and calculations"),
65
+ placeholder: "$sum(data[*].value)",
66
+ example: e("bigconsole.parsers.builder.parserType.jsonata.example", "$sum(data.values) - Calculate sum of values")
67
+ }
68
+ };
46
69
  }
47
- var g = {
48
- jq: {
49
- name: "JQ",
50
- description: "Lightweight JSON processor - fast and efficient for simple transformations",
51
- placeholder: ".data | map({name: .name, value: .count})",
52
- example: ".data | map(.name) - Extract names from data array"
53
- },
54
- jsonata: {
55
- name: "JSONata",
56
- description: "Query and transformation language - supports complex queries and calculations",
57
- placeholder: "$sum(data[*].value)",
58
- example: "$sum(data.values) - Calculate sum of values"
59
- }
60
- }, _ = "w-full px-3 py-2.5 text-sm text-text-primary bg-bg-surface border rounded-md placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-bg transition-all", v = n(function() {
61
- let { parserId: n, consoleId: v } = ie(), De = e(), [y, b] = o(0), [x, Oe] = o(Ce), S = v || x || Ce, C = n !== "new" && !!n, w = !v, [T, E] = o({
70
+ var h = "w-full px-3 py-2.5 text-sm text-text-primary bg-bg-surface border rounded-md placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-bg transition-all", g = i(function() {
71
+ let { parserId: i, consoleId: g } = re(), Pe = e(), { t: _ } = xe(), v = s(() => Ae(_), [_]), y = s(() => Ne(_), [_]), b = v.length, [x, S] = c(0), [C, Fe] = c(Oe), w = g || C || Oe, T = i !== "new" && !!i, { hasPermission: Ie, isLoading: Le } = oe(), Re = Ie(r.PARSER_READ), ze = Ie(T ? r.PARSER_UPDATE : r.PARSER_CREATE), Be = T ? r.PARSER_UPDATE : r.PARSER_CREATE, E = !g, [D, O] = c({
62
72
  name: "",
63
73
  outputKey: "",
64
74
  description: "",
@@ -66,285 +76,297 @@ var g = {
66
76
  expression: "",
67
77
  inputSinkKey: "",
68
78
  ttl: 900
69
- }), [D, O] = o({}), [k, ke] = o(!1), [Ae, je] = o(!1), [Me, Ne] = o(null), [A, j] = o("{\n \"data\": [\n {\"name\": \"Item 1\", \"count\": 10},\n {\"name\": \"Item 2\", \"count\": 20}\n ]\n}"), [M, N] = o(""), [P, F] = o(null), [Pe, Fe] = o(!1), [I, L] = o(null), [R, z] = o(!1), [B, V] = o(null), [Ie, Le] = o(!1), H = re(T.inputSinkKey);
70
- i(() => {
71
- H.current = T.inputSinkKey;
72
- }, [T.inputSinkKey]);
73
- let [U, W] = o(!1), [Re, ze] = o(null), [Be, Ve] = o(!1), [He, G] = o(null), [K, Ue] = o(null), { loading: We, error: Ge, parsers: Ke, fetchParser: qe, createParser: Je, updateParser: Ye, testParserExpression: Xe } = te({
74
- consoleId: S || "",
79
+ }), [k, A] = c({}), [Ve, He] = c(!1), [Ue, We] = c(!1), [Ge, Ke] = c(null), [j, M] = c("{\n \"data\": [\n {\"name\": \"Item 1\", \"count\": 10},\n {\"name\": \"Item 2\", \"count\": 20}\n ]\n}"), [N, P] = c(""), [F, I] = c(null), [qe, Je] = c(!1), [L, R] = c(null), [z, B] = c(!1), [V, H] = c(null), [Ye, Xe] = c(!1), U = ne(D.inputSinkKey);
80
+ o(() => {
81
+ U.current = D.inputSinkKey;
82
+ }, [D.inputSinkKey]);
83
+ let [W, G] = c(!1), [Ze, Qe] = c(null), [$e, et] = c(!1), [tt, K] = c(null), [q, nt] = c(null), { loading: rt, error: it, parsers: at, fetchParser: ot, createParser: st, updateParser: ct, testParserExpression: lt } = ee({
84
+ consoleId: w || "",
75
85
  skipFetch: !0
76
- }), { dataSinks: q, fetchDataSinks: Ze, getDataSinkData: J } = ee({ skipFetch: !0 }), { dashboards: Qe, fetchDashboards: $e, loading: et } = t(), Y = C ? Ke.find((e) => e.id === n) : null;
77
- i(() => {
78
- Ze(), C && n && qe(n), w && $e();
86
+ }), { dataSinks: J, fetchDataSinks: ut, getDataSinkData: Y } = n({ skipFetch: !0 }), { dashboards: dt, fetchDashboards: ft, loading: pt } = t(), X = T ? at.find((e) => e.id === i) : null;
87
+ o(() => {
88
+ ut(), T && i && ot(i), E && ft();
79
89
  }, [
80
- C,
81
- n,
82
- qe,
83
- Ze,
84
- w,
85
- $e
86
- ]), i(() => {
87
- Y && (E({
88
- name: Y.name || "",
89
- outputKey: Y.outputKey || "",
90
- description: Y.description || "",
91
- type: Y.type,
92
- expression: Y.expression || "",
93
- inputSinkKey: Y.inputSinkKey || "",
94
- ttl: Y.ttl ?? null
95
- }), ke(!0), Y.consoleId && Oe(Y.consoleId));
96
- }, [Y]);
97
- let X = a(() => q.find((e) => e.key === T.inputSinkKey)?.name || T.inputSinkKey, [q, T.inputSinkKey]), tt = r((e) => {
90
+ T,
91
+ i,
92
+ ot,
93
+ ut,
94
+ E,
95
+ ft
96
+ ]), o(() => {
97
+ X && (O({
98
+ name: X.name || "",
99
+ outputKey: X.outputKey || "",
100
+ description: X.description || "",
101
+ type: X.type,
102
+ expression: X.expression || "",
103
+ inputSinkKey: X.inputSinkKey || "",
104
+ ttl: X.ttl ?? null
105
+ }), He(!0), X.consoleId && Fe(X.consoleId));
106
+ }, [X]);
107
+ let Z = s(() => J.find((e) => e.key === D.inputSinkKey)?.name || D.inputSinkKey, [J, D.inputSinkKey]), mt = a((e) => {
98
108
  let t = e.target.value;
99
- E((e) => ({
109
+ O((e) => ({
100
110
  ...e,
101
111
  name: t,
102
- outputKey: k ? e.outputKey : Te(t)
103
- })), O((e) => ({
112
+ outputKey: Ve ? e.outputKey : je(t)
113
+ })), A((e) => ({
104
114
  ...e,
105
115
  name: void 0
106
116
  }));
107
- }, [k]), nt = r((e) => {
117
+ }, [Ve]), ht = a((e) => {
108
118
  let t = e.target.value.toLowerCase().replace(/[^a-z0-9_]/g, "");
109
- E((e) => ({
119
+ O((e) => ({
110
120
  ...e,
111
121
  outputKey: t
112
- })), ke(!0), O((e) => ({
122
+ })), He(!0), A((e) => ({
113
123
  ...e,
114
124
  outputKey: void 0
115
125
  }));
116
- }, []), rt = r((e) => {
117
- E((t) => ({
126
+ }, []), gt = a((e) => {
127
+ O((t) => ({
118
128
  ...t,
119
129
  description: e.target.value
120
130
  }));
121
- }, []), it = r((e) => {
122
- E((t) => ({
131
+ }, []), _t = a((e) => {
132
+ O((t) => ({
123
133
  ...t,
124
134
  type: e
125
- })), N(""), F(null);
126
- }, []), at = r((e) => {
127
- E((t) => ({
135
+ })), P(""), I(null);
136
+ }, []), vt = a((e) => {
137
+ O((t) => ({
128
138
  ...t,
129
139
  expression: e.target.value
130
- })), O((e) => ({
140
+ })), A((e) => ({
131
141
  ...e,
132
142
  expression: void 0
133
143
  }));
134
- }, []), ot = r((e) => {
135
- E((t) => ({
144
+ }, []), yt = a((e) => {
145
+ O((t) => ({
136
146
  ...t,
137
147
  inputSinkKey: e.target.value
138
- })), O((e) => ({
148
+ })), A((e) => ({
139
149
  ...e,
140
150
  inputSinkKey: void 0
141
- })), W(!1), ze(null), Ue(null), G(null), R && (j(""), z(!1)), V(null), N(""), F(null), L(null);
142
- }, [R]), st = r((e) => {
143
- E((t) => ({
151
+ })), G(!1), Qe(null), nt(null), K(null), z && (M(""), B(!1)), H(null), P(""), I(null), R(null);
152
+ }, [z]), bt = a((e) => {
153
+ O((t) => ({
144
154
  ...t,
145
155
  ttl: e
146
- })), O((e) => ({
156
+ })), A((e) => ({
147
157
  ...e,
148
158
  ttl: void 0
149
159
  }));
150
- }, []), ct = r((e) => {
151
- Oe(e.target.value);
152
- }, []), lt = r((e) => {
153
- j(e.target.value);
154
- }, []), ut = r(async () => {
155
- let e = T.inputSinkKey;
160
+ }, []), xt = a((e) => {
161
+ Fe(e.target.value);
162
+ }, []), St = a((e) => {
163
+ M(e.target.value);
164
+ }, []), Ct = a(async () => {
165
+ let e = D.inputSinkKey;
156
166
  if (e) {
157
- Le(!0);
167
+ Xe(!0);
158
168
  try {
159
- let t = await J({ key: e }, { limit: m });
160
- if (H.current !== e) return;
161
- t?.raw !== void 0 && t?.raw !== null ? (j(JSON.stringify(t.raw, null, 2)), z(!0), V({
169
+ let t = await Y({ key: e }, { limit: m });
170
+ if (U.current !== e) return;
171
+ t?.raw !== void 0 && t?.raw !== null ? (M(JSON.stringify(t.raw, null, 2)), B(!0), H({
162
172
  total: t.totalCount ?? null,
163
173
  hasMore: t.hasMore ?? null,
164
- sinkName: X
165
- }), N(""), F(null), L(null)) : F("Could not load a sample from the selected DataSink.");
174
+ sinkName: Z
175
+ }), P(""), I(null), R(null)) : I(_("bigconsole.parsers.builder.errors.loadSampleFailed", "Could not load a sample from the selected DataSink."));
166
176
  } catch (t) {
167
- if (H.current !== e) return;
168
- F(t instanceof Error ? t.message : "Failed to load sample data");
177
+ if (U.current !== e) return;
178
+ I(t instanceof Error ? t.message : _("bigconsole.parsers.builder.errors.loadSampleDataFailed", "Failed to load sample data"));
169
179
  } finally {
170
- Le(!1);
180
+ Xe(!1);
171
181
  }
172
182
  }
173
183
  }, [
174
- T.inputSinkKey,
175
- J,
176
- X
177
- ]), dt = r(() => {
178
- j(""), z(!1), V(null), L(null), N(""), F(null);
179
- }, []), ft = r(async () => {
180
- if (U) {
181
- W(!1);
184
+ D.inputSinkKey,
185
+ Y,
186
+ Z,
187
+ _
188
+ ]), wt = a(() => {
189
+ M(""), B(!1), H(null), R(null), P(""), I(null);
190
+ }, []), Tt = a(async () => {
191
+ if (W) {
192
+ G(!1);
182
193
  return;
183
194
  }
184
- if (!T.inputSinkKey) {
185
- G("Please select a source DataSink first");
195
+ if (!D.inputSinkKey) {
196
+ K(_("bigconsole.parsers.builder.errors.selectSourceFirst", "Please select a source DataSink first"));
186
197
  return;
187
198
  }
188
- W(!0), Ve(!0), G(null);
189
- let e = T.inputSinkKey;
199
+ G(!0), et(!0), K(null);
200
+ let e = D.inputSinkKey;
190
201
  try {
191
- let t = await J({ key: e }, { limit: m });
192
- if (H.current !== e) return;
193
- t?.raw !== void 0 && t?.raw !== null ? (ze(t.raw), Ue({
202
+ let t = await Y({ key: e }, { limit: m });
203
+ if (U.current !== e) return;
204
+ t?.raw !== void 0 && t?.raw !== null ? (Qe(t.raw), nt({
194
205
  total: t.totalCount ?? null,
195
206
  hasMore: t.hasMore ?? null,
196
- sinkName: X
197
- })) : G("No data available in selected DataSink");
207
+ sinkName: Z
208
+ })) : K(_("bigconsole.parsers.builder.errors.noDataInSink", "No data available in selected DataSink"));
198
209
  } catch (t) {
199
- if (H.current !== e) return;
200
- G(t instanceof Error ? t.message : "Failed to load data");
210
+ if (U.current !== e) return;
211
+ K(t instanceof Error ? t.message : _("bigconsole.parsers.builder.errors.loadDataFailed", "Failed to load data"));
201
212
  } finally {
202
- Ve(!1);
213
+ et(!1);
203
214
  }
204
215
  }, [
205
- U,
206
- T.inputSinkKey,
207
- J,
208
- X
209
- ]), pt = r(async () => {
210
- if (!T.expression.trim()) {
211
- F("Expression is required");
216
+ W,
217
+ D.inputSinkKey,
218
+ Y,
219
+ Z,
220
+ _
221
+ ]), Et = a(async () => {
222
+ if (!D.expression.trim()) {
223
+ I(_("bigconsole.parsers.builder.validation.expressionRequired", "Expression is required"));
212
224
  return;
213
225
  }
214
226
  let e;
215
- if (R) e = {
216
- type: T.type,
217
- expression: T.expression,
218
- dataSinkKey: T.inputSinkKey,
227
+ if (z) e = {
228
+ type: D.type,
229
+ expression: D.expression,
230
+ dataSinkKey: D.inputSinkKey,
219
231
  sampleLimit: m
220
232
  };
221
233
  else {
222
234
  let t;
223
235
  try {
224
- t = JSON.parse(A);
236
+ t = JSON.parse(j);
225
237
  } catch {
226
- F("Input JSON is not valid JSON");
238
+ I(_("bigconsole.parsers.builder.errors.invalidInputJson", "Input JSON is not valid JSON"));
227
239
  return;
228
240
  }
229
241
  e = {
230
- type: T.type,
231
- expression: T.expression,
242
+ type: D.type,
243
+ expression: D.expression,
232
244
  sampleData: t
233
245
  };
234
246
  }
235
- Fe(!0), F(null), N(""), L(null);
247
+ Je(!0), I(null), P(""), R(null);
236
248
  try {
237
- let t = await Xe(e);
238
- t ? t.success ? (N(JSON.stringify(t.output, null, 2)), t.sampled && L({
249
+ let t = await lt(e);
250
+ t ? t.success ? (P(JSON.stringify(t.output, null, 2)), t.sampled && R({
239
251
  sampledRows: t.sampledRows ?? null,
240
252
  totalRows: t.totalRows ?? null
241
- })) : F(t.error || "Test failed") : F("Test request failed — please try again.");
253
+ })) : I(t.error || _("bigconsole.parsers.builder.errors.testFailed", "Test failed")) : I(_("bigconsole.parsers.builder.errors.testRequestFailed", "Test request failed — please try again."));
242
254
  } catch (e) {
243
- F(e instanceof Error ? e.message : "Test failed");
255
+ I(e instanceof Error ? e.message : _("bigconsole.parsers.builder.errors.testFailed", "Test failed"));
244
256
  } finally {
245
- Fe(!1);
257
+ Je(!1);
246
258
  }
247
259
  }, [
248
- T.type,
249
- T.expression,
250
- T.inputSinkKey,
251
- A,
252
- R,
253
- Xe
254
- ]), Z = r(() => {
255
- De(v ? `/dashboards/${v}/parsers` : "/parsers");
256
- }, [De, v]), mt = r(async () => {
257
- Ne(null);
258
- let e = Ee(T);
260
+ D.type,
261
+ D.expression,
262
+ D.inputSinkKey,
263
+ j,
264
+ z,
265
+ lt,
266
+ _
267
+ ]), Q = a(() => {
268
+ Pe(g ? `/dashboards/${g}/parsers` : "/parsers");
269
+ }, [Pe, g]), Dt = a(async () => {
270
+ Ke(null);
271
+ let e = Me(D, _);
259
272
  if (Object.keys(e).length > 0) {
260
- O(e), e.name || e.outputKey ? b(0) : e.inputSinkKey ? b(1) : e.expression && b(2);
273
+ A(e), e.name || e.outputKey ? S(0) : e.inputSinkKey ? S(1) : e.expression && S(2);
261
274
  return;
262
275
  }
263
- je(!0);
276
+ We(!0);
264
277
  try {
265
- if (C && Y) {
266
- if (!await Ye(Y.id, {
267
- name: T.name,
268
- description: T.description || void 0,
269
- expression: T.expression,
270
- inputSinkKey: T.inputSinkKey,
271
- outputKey: T.outputKey,
272
- ttl: T.ttl
273
- }, Y.version)) throw Error("Failed to update parser");
274
- } else if (!await Je({
275
- consoleId: S || "",
276
- name: T.name,
277
- type: T.type,
278
- expression: T.expression,
279
- inputSinkKey: T.inputSinkKey,
280
- outputKey: T.outputKey,
281
- description: T.description || void 0,
282
- ttl: T.ttl ?? void 0
283
- })) throw Error("Failed to create parser");
284
- Z();
278
+ if (T && X) {
279
+ if (!await ct(X.id, {
280
+ name: D.name,
281
+ description: D.description || void 0,
282
+ expression: D.expression,
283
+ inputSinkKey: D.inputSinkKey,
284
+ outputKey: D.outputKey,
285
+ ttl: D.ttl
286
+ }, X.version)) throw Error(_("bigconsole.parsers.builder.errors.updateFailed", "Failed to update parser"));
287
+ } else if (!await st({
288
+ consoleId: w || "",
289
+ name: D.name,
290
+ type: D.type,
291
+ expression: D.expression,
292
+ inputSinkKey: D.inputSinkKey,
293
+ outputKey: D.outputKey,
294
+ description: D.description || void 0,
295
+ ttl: D.ttl ?? void 0
296
+ })) throw Error(_("bigconsole.parsers.builder.errors.createFailed", "Failed to create parser"));
297
+ Q();
285
298
  } catch (e) {
286
- Ne(e instanceof Error ? e.message : "Failed to save parser");
299
+ Ke(e instanceof Error ? e.message : _("bigconsole.parsers.builder.errors.saveFailed", "Failed to save parser"));
287
300
  } finally {
288
- je(!1);
301
+ We(!1);
289
302
  }
290
303
  }, [
304
+ D,
291
305
  T,
292
- C,
293
- Y,
294
- Je,
295
- Ye,
296
- S,
297
- Z
298
- ]), ht = a(() => T.name.trim().length >= 2 && T.expression.trim().length > 0 && T.inputSinkKey.trim().length > 0 && T.outputKey.trim().length > 0 && /^[a-z0-9_]+$/.test(T.outputKey), [
299
- T.name,
300
- T.expression,
301
- T.inputSinkKey,
302
- T.outputKey
303
- ]), Q = r((e) => {
304
- switch (we[e]) {
305
- case "details": return T.name.trim().length >= 2 && T.outputKey.trim().length > 0 && /^[a-z0-9_]+$/.test(T.outputKey);
306
- case "source": return T.inputSinkKey.trim().length > 0;
307
- case "expression": return T.expression.trim().length > 0;
306
+ X,
307
+ st,
308
+ ct,
309
+ w,
310
+ Q,
311
+ _
312
+ ]), Ot = s(() => D.name.trim().length >= 2 && D.expression.trim().length > 0 && D.inputSinkKey.trim().length > 0 && D.outputKey.trim().length > 0 && /^[a-z0-9_]+$/.test(D.outputKey), [
313
+ D.name,
314
+ D.expression,
315
+ D.inputSinkKey,
316
+ D.outputKey
317
+ ]), $ = a((e) => {
318
+ switch (ke[e]) {
319
+ case "details": return D.name.trim().length >= 2 && D.outputKey.trim().length > 0 && /^[a-z0-9_]+$/.test(D.outputKey);
320
+ case "source": return D.inputSinkKey.trim().length > 0;
321
+ case "expression": return D.expression.trim().length > 0;
308
322
  default: return !0;
309
323
  }
310
324
  }, [
311
- T.name,
312
- T.outputKey,
313
- T.inputSinkKey,
314
- T.expression
315
- ]), gt = r((e) => {
316
- let t = Math.max(0, Math.min(e, h.length - 1));
317
- if (t > y) {
318
- for (let e = y; e < t; e++) if (!Q(e)) return;
325
+ D.name,
326
+ D.outputKey,
327
+ D.inputSinkKey,
328
+ D.expression
329
+ ]), kt = a((e) => {
330
+ let t = Math.max(0, Math.min(e, b - 1));
331
+ if (t > x) {
332
+ for (let e = x; e < t; e++) if (!$(e)) return;
319
333
  }
320
- b(t);
321
- }, [y, Q]), _t = r(() => {
322
- b((e) => Math.min(e + 1, h.length - 1));
323
- }, []), vt = r(() => {
324
- b((e) => Math.max(e - 1, 0));
334
+ S(t);
335
+ }, [
336
+ x,
337
+ $,
338
+ b
339
+ ]), At = a(() => {
340
+ S((e) => Math.min(e + 1, b - 1));
341
+ }, [b]), jt = a(() => {
342
+ S((e) => Math.max(e - 1, 0));
325
343
  }, []);
326
- if (We && C) return /* @__PURE__ */ f("div", {
344
+ if (rt && T || Le) return /* @__PURE__ */ f("div", {
327
345
  className: "flex items-center justify-center min-h-[400px]",
328
- children: /* @__PURE__ */ f(c, { className: "w-8 h-8 text-text-secondary animate-spin" })
346
+ children: /* @__PURE__ */ f(l, { className: "w-8 h-8 text-text-secondary animate-spin" })
347
+ });
348
+ if (T && !Re) return /* @__PURE__ */ f(ie, {
349
+ title: _("bigconsole.parsers.builder.accessDenied.title", "Access Denied"),
350
+ description: _("bigconsole.parsers.builder.accessDenied.description", "You don't have permission to view this parser.")
329
351
  });
330
- if (Ge) return /* @__PURE__ */ f("div", {
352
+ if (it) return /* @__PURE__ */ f("div", {
331
353
  className: "flex items-center justify-center min-h-[400px] p-card-padding",
332
354
  children: /* @__PURE__ */ p("div", {
333
355
  className: "text-center",
334
356
  children: [
335
- /* @__PURE__ */ f(s, { className: "w-12 h-12 text-status-error-text mx-auto mb-4" }),
357
+ /* @__PURE__ */ f(se, { className: "w-12 h-12 text-status-error-text mx-auto mb-4" }),
336
358
  /* @__PURE__ */ f("p", {
337
359
  className: "text-status-error-text text-body-sm font-medium mb-2",
338
- children: "Failed to load Parser"
360
+ children: _("bigconsole.parsers.builder.errors.loadParserFailed", "Failed to load Parser")
339
361
  }),
340
362
  /* @__PURE__ */ f("p", {
341
363
  className: "text-text-tertiary text-body-xs",
342
- children: Ge.message
364
+ children: it.message
343
365
  })
344
366
  ]
345
367
  })
346
368
  });
347
- let $ = g[T.type], yt = y === h.length - 1;
369
+ let Mt = y[D.type], Nt = x === b - 1;
348
370
  return /* @__PURE__ */ f("div", {
349
371
  className: "min-h-screen bg-bg-canvas",
350
372
  children: /* @__PURE__ */ p("div", {
@@ -354,76 +376,74 @@ var g = {
354
376
  className: "mb-6",
355
377
  children: [
356
378
  /* @__PURE__ */ p(u, {
357
- onClick: Z,
379
+ onClick: Q,
358
380
  variant: "ghost",
359
381
  size: "sm",
360
382
  className: "mb-4",
361
- children: [/* @__PURE__ */ f(ae, { className: "w-4 h-4 mr-2" }), "Back to Parsers"]
383
+ children: [/* @__PURE__ */ f(ce, { className: "w-4 h-4 mr-2" }), _("bigconsole.parsers.builder.header.backToParsers", "Back to Parsers")]
362
384
  }),
363
385
  /* @__PURE__ */ f("h1", {
364
386
  className: "text-heading-h1 font-bold text-text-primary",
365
- children: C ? "Edit Parser" : "Create Parser"
387
+ children: T ? _("bigconsole.parsers.builder.header.editTitle", "Edit Parser") : _("bigconsole.parsers.builder.header.createTitle", "Create Parser")
366
388
  }),
367
389
  /* @__PURE__ */ f("p", {
368
390
  className: "text-body-sm text-text-secondary mt-1",
369
- children: "Transform data using JQ or JSONata expressions."
391
+ children: _("bigconsole.parsers.builder.header.subtitle", "Transform data using JQ or JSONata expressions.")
370
392
  })
371
393
  ]
372
394
  }),
373
- /* @__PURE__ */ f(xe, {
395
+ /* @__PURE__ */ f(Ee, {
374
396
  className: "mb-6",
375
- children: "A parser maps raw input into structured fields using a JQ or JSONata expression. Write the expression, run it against a sample to confirm the output, and save it once it produces the shape you need — then reuse it across pipelines to normalise any source."
397
+ children: _("bigconsole.parsers.builder.header.purpose", "A parser maps raw input into structured fields using a JQ or JSONata expression. Write the expression, run it against a sample to confirm the output, and save it once it produces the shape you need — then reuse it across pipelines to normalise any source.")
376
398
  }),
377
399
  /* @__PURE__ */ f("div", {
378
400
  className: "mb-6",
379
- children: /* @__PURE__ */ f(Se, {
380
- steps: h,
381
- active: y,
382
- onStepClick: gt
401
+ children: /* @__PURE__ */ f(De, {
402
+ steps: v,
403
+ active: x,
404
+ onStepClick: kt
383
405
  })
384
406
  }),
385
- Me && /* @__PURE__ */ p("div", {
407
+ Ge && /* @__PURE__ */ p("div", {
386
408
  className: "mb-6 p-4 bg-status-error-bg/10 border border-status-error-border/30 rounded-lg flex items-start gap-3",
387
- children: [/* @__PURE__ */ f(s, { className: "w-5 h-5 text-status-error-text flex-shrink-0 mt-0.5" }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
409
+ children: [/* @__PURE__ */ f(se, { className: "w-5 h-5 text-status-error-text flex-shrink-0 mt-0.5" }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
388
410
  className: "text-sm font-medium text-status-error-text",
389
- children: "Failed to save Parser"
411
+ children: _("bigconsole.parsers.builder.errors.saveParserFailed", "Failed to save Parser")
390
412
  }), /* @__PURE__ */ f("p", {
391
413
  className: "text-xs text-status-error-text/80 mt-1",
392
- children: Me
414
+ children: Ge
393
415
  })] })]
394
416
  }),
395
- /* @__PURE__ */ p(be, {
417
+ /* @__PURE__ */ p(Te, {
396
418
  treatment: "glass",
397
419
  glow: !0,
398
- children: [/* @__PURE__ */ f(ve, {
420
+ children: [/* @__PURE__ */ f(Ce, {
399
421
  className: "pb-4",
400
422
  children: /* @__PURE__ */ p("div", {
401
423
  className: "flex items-center gap-3",
402
424
  children: [/* @__PURE__ */ p("div", {
403
425
  className: "w-8 h-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center",
404
426
  children: [
405
- y === 0 && /* @__PURE__ */ f(fe, { className: "w-4 h-4 text-action-primary-bg" }),
406
- y === 1 && /* @__PURE__ */ f(le, { className: "w-4 h-4 text-action-primary-bg" }),
407
- y === 2 && /* @__PURE__ */ f(l, { className: "w-4 h-4 text-action-primary-bg" }),
408
- y === 3 && /* @__PURE__ */ f(he, { className: "w-4 h-4 text-action-primary-bg" })
427
+ x === 0 && /* @__PURE__ */ f(he, { className: "w-4 h-4 text-action-primary-bg" }),
428
+ x === 1 && /* @__PURE__ */ f(fe, { className: "w-4 h-4 text-action-primary-bg" }),
429
+ x === 2 && /* @__PURE__ */ f(_e, { className: "w-4 h-4 text-action-primary-bg" }),
430
+ x === 3 && /* @__PURE__ */ f(ye, { className: "w-4 h-4 text-action-primary-bg" })
409
431
  ]
410
- }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("p", {
432
+ }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
411
433
  className: "text-xs text-text-tertiary",
412
- children: [
413
- "Step ",
414
- y + 1,
415
- " of ",
416
- h.length
417
- ]
418
- }), /* @__PURE__ */ f(ye, {
434
+ children: _("bigconsole.parsers.builder.header.stepCounter", "Step {{current}} of {{total}}", {
435
+ current: x + 1,
436
+ total: b
437
+ })
438
+ }), /* @__PURE__ */ f(we, {
419
439
  className: "text-base",
420
- children: h[y].label
440
+ children: v[x].label
421
441
  })] })]
422
442
  })
423
- }), /* @__PURE__ */ p(_e, {
443
+ }), /* @__PURE__ */ p(Se, {
424
444
  className: "space-y-5",
425
445
  children: [
426
- y === 0 && /* @__PURE__ */ p("div", {
446
+ x === 0 && /* @__PURE__ */ p("div", {
427
447
  className: "space-y-5",
428
448
  children: [
429
449
  /* @__PURE__ */ p("div", {
@@ -432,113 +452,125 @@ var g = {
432
452
  /* @__PURE__ */ p("label", {
433
453
  htmlFor: "name",
434
454
  className: "block text-sm font-medium text-text-primary mb-2",
435
- children: ["Name ", /* @__PURE__ */ f("span", {
436
- className: "text-status-error-text",
437
- children: "*"
438
- })]
455
+ children: [
456
+ _("bigconsole.parsers.builder.fields.name.label", "Name"),
457
+ " ",
458
+ /* @__PURE__ */ f("span", {
459
+ className: "text-status-error-text",
460
+ children: "*"
461
+ })
462
+ ]
439
463
  }),
440
464
  /* @__PURE__ */ f("input", {
441
465
  id: "name",
442
466
  type: "text",
443
- value: T.name,
444
- onChange: tt,
445
- placeholder: "e.g., User Analytics Parser",
446
- className: `${_} ${D.name ? "border-status-error-border" : "border-border-default"}`
467
+ value: D.name,
468
+ onChange: mt,
469
+ placeholder: _("bigconsole.parsers.builder.fields.name.placeholder", "e.g., User Analytics Parser"),
470
+ className: `${h} ${k.name ? "border-status-error-border" : "border-border-default"}`
447
471
  }),
448
- D.name && /* @__PURE__ */ f("p", {
472
+ k.name && /* @__PURE__ */ f("p", {
449
473
  className: "text-xs text-status-error-text mt-1.5",
450
- children: D.name
474
+ children: k.name
451
475
  })
452
476
  ] }), /* @__PURE__ */ p("div", { children: [
453
477
  /* @__PURE__ */ p("label", {
454
478
  htmlFor: "outputKey",
455
479
  className: "block text-sm font-medium text-text-primary mb-2",
456
- children: ["Output Key ", /* @__PURE__ */ f("span", {
457
- className: "text-status-error-text",
458
- children: "*"
459
- })]
480
+ children: [
481
+ _("bigconsole.parsers.builder.fields.outputKey.label", "Output Key"),
482
+ " ",
483
+ /* @__PURE__ */ f("span", {
484
+ className: "text-status-error-text",
485
+ children: "*"
486
+ })
487
+ ]
460
488
  }),
461
489
  /* @__PURE__ */ f("input", {
462
490
  id: "outputKey",
463
491
  type: "text",
464
- value: T.outputKey,
465
- onChange: nt,
492
+ value: D.outputKey,
493
+ onChange: ht,
466
494
  placeholder: "user_analytics_parser",
467
- disabled: C,
468
- className: `${_} font-mono ${D.outputKey ? "border-status-error-border" : "border-border-default"} disabled:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-60`
495
+ disabled: T,
496
+ className: `${h} font-mono ${k.outputKey ? "border-status-error-border" : "border-border-default"} disabled:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-60`
469
497
  }),
470
- D.outputKey && /* @__PURE__ */ f("p", {
498
+ k.outputKey && /* @__PURE__ */ f("p", {
471
499
  className: "text-xs text-status-error-text mt-1.5",
472
- children: D.outputKey
500
+ children: k.outputKey
473
501
  }),
474
- !C && /* @__PURE__ */ f("p", {
502
+ !T && /* @__PURE__ */ f("p", {
475
503
  className: "text-xs text-text-tertiary mt-1.5",
476
- children: "Auto-generated from name. Customize if needed."
504
+ children: _("bigconsole.parsers.builder.fields.outputKey.helper", "Auto-generated from name. Customize if needed.")
477
505
  })
478
506
  ] })]
479
507
  }),
480
508
  /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
481
509
  htmlFor: "description",
482
510
  className: "block text-sm font-medium text-text-primary mb-2",
483
- children: "Description"
511
+ children: _("bigconsole.parsers.builder.fields.description.label", "Description")
484
512
  }), /* @__PURE__ */ f("textarea", {
485
513
  id: "description",
486
- value: T.description,
487
- onChange: rt,
488
- placeholder: "Describe what this parser does...",
514
+ value: D.description,
515
+ onChange: gt,
516
+ placeholder: _("bigconsole.parsers.builder.fields.description.placeholder", "Describe what this parser does..."),
489
517
  rows: 2,
490
- className: `${_} border-border-default resize-y`
518
+ className: `${h} border-border-default resize-y`
491
519
  })] }),
492
- w && /* @__PURE__ */ p("div", { children: [
520
+ E && /* @__PURE__ */ p("div", { children: [
493
521
  /* @__PURE__ */ f("label", {
494
522
  htmlFor: "dashboard",
495
523
  className: "block text-sm font-medium text-text-primary mb-2",
496
524
  children: /* @__PURE__ */ p("span", {
497
525
  className: "flex items-center gap-2",
498
- children: [/* @__PURE__ */ f(pe, { className: "w-4 h-4" }), "Dashboard Scope"]
526
+ children: [/* @__PURE__ */ f(ge, { className: "w-4 h-4" }), _("bigconsole.parsers.builder.fields.dashboard.label", "Dashboard Scope")]
499
527
  })
500
528
  }),
501
529
  /* @__PURE__ */ p("select", {
502
530
  id: "dashboard",
503
- value: x,
504
- onChange: ct,
505
- disabled: et || C,
506
- className: `${_} border-border-default disabled:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-60`,
531
+ value: C,
532
+ onChange: xt,
533
+ disabled: pt || T,
534
+ className: `${h} border-border-default disabled:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-60`,
507
535
  children: [/* @__PURE__ */ f("option", {
508
536
  value: "default",
509
- children: "Global (available everywhere)"
510
- }), Qe.map((e) => /* @__PURE__ */ f("option", {
537
+ children: _("bigconsole.parsers.builder.fields.dashboard.globalOption", "Global (available everywhere)")
538
+ }), dt.map((e) => /* @__PURE__ */ f("option", {
511
539
  value: e.id,
512
540
  children: e.name
513
541
  }, e.id))]
514
542
  }),
515
543
  /* @__PURE__ */ f("p", {
516
544
  className: "text-xs text-text-tertiary mt-1.5",
517
- children: C ? "Dashboard scope cannot be changed after creation." : x === "default" ? "Global parsers are available across all dashboards." : "This parser will only be available in the selected dashboard."
545
+ children: T ? _("bigconsole.parsers.builder.fields.dashboard.helperLocked", "Dashboard scope cannot be changed after creation.") : C === "default" ? _("bigconsole.parsers.builder.fields.dashboard.helperGlobal", "Global parsers are available across all dashboards.") : _("bigconsole.parsers.builder.fields.dashboard.helperScoped", "This parser will only be available in the selected dashboard.")
518
546
  })
519
547
  ] })
520
548
  ]
521
549
  }),
522
- y === 1 && /* @__PURE__ */ p("div", {
550
+ x === 1 && /* @__PURE__ */ p("div", {
523
551
  className: "space-y-5",
524
552
  children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
525
553
  className: "block text-sm font-medium text-text-primary mb-3",
526
- children: ["Parser Type ", /* @__PURE__ */ f("span", {
527
- className: "text-status-error-text",
528
- children: "*"
529
- })]
554
+ children: [
555
+ _("bigconsole.parsers.builder.fields.parserType.label", "Parser Type"),
556
+ " ",
557
+ /* @__PURE__ */ f("span", {
558
+ className: "text-status-error-text",
559
+ children: "*"
560
+ })
561
+ ]
530
562
  }), /* @__PURE__ */ f("div", {
531
563
  className: "grid gap-2 sm:grid-cols-2",
532
- children: Object.keys(g).map((e) => {
533
- let t = g[e];
564
+ children: Object.keys(y).map((e) => {
565
+ let t = y[e];
534
566
  return /* @__PURE__ */ p("label", {
535
- className: `flex items-start gap-3 p-3 border rounded-md cursor-pointer transition-colors ${T.type === e ? "border-action-primary-bg bg-action-primary-bg/5" : "border-border-default hover:bg-bg-sunken"}`,
567
+ className: `flex items-start gap-3 p-3 border rounded-md cursor-pointer transition-colors ${D.type === e ? "border-action-primary-bg bg-action-primary-bg/5" : "border-border-default hover:bg-bg-sunken"}`,
536
568
  children: [/* @__PURE__ */ f("input", {
537
569
  type: "radio",
538
570
  name: "parserType",
539
571
  value: e,
540
- checked: T.type === e,
541
- onChange: () => it(e),
572
+ checked: D.type === e,
573
+ onChange: () => _t(e),
542
574
  className: "mt-1 w-4 h-4 text-action-primary-bg"
543
575
  }), /* @__PURE__ */ p("span", { children: [/* @__PURE__ */ f("span", {
544
576
  className: "text-sm font-medium text-text-primary",
@@ -553,112 +585,127 @@ var g = {
553
585
  /* @__PURE__ */ p("label", {
554
586
  htmlFor: "inputSinkKey",
555
587
  className: "block text-sm font-medium text-text-primary mb-2",
556
- children: ["Source DataSink ", /* @__PURE__ */ f("span", {
557
- className: "text-status-error-text",
558
- children: "*"
559
- })]
588
+ children: [
589
+ _("bigconsole.parsers.builder.fields.sourceDataSink.label", "Source DataSink"),
590
+ " ",
591
+ /* @__PURE__ */ f("span", {
592
+ className: "text-status-error-text",
593
+ children: "*"
594
+ })
595
+ ]
560
596
  }),
561
597
  /* @__PURE__ */ p("select", {
562
598
  id: "inputSinkKey",
563
- value: T.inputSinkKey,
564
- onChange: ot,
565
- className: `${_} ${D.inputSinkKey ? "border-status-error-border" : "border-border-default"}`,
599
+ value: D.inputSinkKey,
600
+ onChange: yt,
601
+ className: `${h} ${k.inputSinkKey ? "border-status-error-border" : "border-border-default"}`,
566
602
  children: [/* @__PURE__ */ f("option", {
567
603
  value: "",
568
- children: "Select a DataSink..."
569
- }), q.map((e) => /* @__PURE__ */ f("option", {
604
+ children: _("bigconsole.parsers.builder.fields.sourceDataSink.placeholder", "Select a DataSink...")
605
+ }), J.map((e) => /* @__PURE__ */ f("option", {
570
606
  value: e.key,
571
607
  children: e.name || e.key
572
608
  }, e.id))]
573
609
  }),
574
- D.inputSinkKey && /* @__PURE__ */ f("p", {
610
+ k.inputSinkKey && /* @__PURE__ */ f("p", {
575
611
  className: "text-xs text-status-error-text mt-1.5",
576
- children: D.inputSinkKey
612
+ children: k.inputSinkKey
577
613
  }),
578
- q.length === 0 && /* @__PURE__ */ f("p", {
614
+ J.length === 0 && /* @__PURE__ */ f("p", {
579
615
  className: "text-xs text-text-tertiary mt-1.5",
580
- children: "No DataSinks yet — create one first, then return here to build a parser for it."
616
+ children: _("bigconsole.parsers.builder.fields.sourceDataSink.emptyState", "No DataSinks yet — create one first, then return here to build a parser for it.")
581
617
  }),
582
- T.inputSinkKey && /* @__PURE__ */ p("div", {
618
+ D.inputSinkKey && /* @__PURE__ */ p("div", {
583
619
  className: "mt-3",
584
620
  children: [/* @__PURE__ */ p("button", {
585
621
  type: "button",
586
- onClick: ft,
622
+ onClick: Tt,
587
623
  className: "inline-flex items-center gap-2 text-sm text-action-primary-bg hover:text-action-primary-bgHover transition-colors",
588
624
  children: [
589
- f(U ? se : ce, { className: "w-4 h-4" }),
590
- /* @__PURE__ */ f(de, { className: "w-4 h-4" }),
591
- "Show Data Preview"
625
+ f(W ? ue : de, { className: "w-4 h-4" }),
626
+ /* @__PURE__ */ f(me, { className: "w-4 h-4" }),
627
+ _("bigconsole.parsers.builder.dataPreview.toggle", "Show Data Preview")
592
628
  ]
593
- }), U && /* @__PURE__ */ f("div", {
629
+ }), W && /* @__PURE__ */ f("div", {
594
630
  className: "mt-3 border border-border-default rounded-md overflow-hidden",
595
- children: Be ? /* @__PURE__ */ p("div", {
631
+ children: $e ? /* @__PURE__ */ p("div", {
596
632
  className: "p-4 flex items-center justify-center",
597
- children: [/* @__PURE__ */ f(c, { className: "w-5 h-5 text-text-secondary animate-spin" }), /* @__PURE__ */ f("span", {
633
+ children: [/* @__PURE__ */ f(l, { className: "w-5 h-5 text-text-secondary animate-spin" }), /* @__PURE__ */ f("span", {
598
634
  className: "ml-2 text-sm text-text-secondary",
599
- children: "Loading sample…"
635
+ children: _("bigconsole.parsers.builder.dataPreview.loading", "Loading sample…")
600
636
  })]
601
- }) : He ? /* @__PURE__ */ f("div", {
637
+ }) : tt ? /* @__PURE__ */ f("div", {
602
638
  className: "p-4 bg-status-error-bg/5",
603
639
  children: /* @__PURE__ */ f("p", {
604
640
  className: "text-sm text-status-error-text",
605
- children: He
641
+ children: tt
606
642
  })
607
- }) : Re ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("pre", {
643
+ }) : Ze ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("pre", {
608
644
  className: "p-3 text-xs font-mono bg-bg-sunken text-text-primary overflow-auto max-h-48",
609
- children: JSON.stringify(Re, null, 2)
610
- }), K && /* @__PURE__ */ p("p", {
645
+ children: JSON.stringify(Ze, null, 2)
646
+ }), q && /* @__PURE__ */ p("p", {
611
647
  className: "px-3 py-2 text-xs text-text-tertiary border-t border-border-default",
612
648
  children: [
613
- "Previewing a sample",
614
- K.total == null ? "" : ` (first ${Math.min(m, K.total)} of ${K.total} rows)`,
649
+ _("bigconsole.parsers.builder.dataPreview.previewingSample", "Previewing a sample"),
650
+ q.total == null ? "" : _("bigconsole.parsers.builder.dataPreview.rowRange", " (first {{shown}} of {{total}} rows)", {
651
+ shown: Math.min(m, q.total),
652
+ total: q.total
653
+ }),
615
654
  " · ",
616
- K.sinkName
655
+ q.sinkName
617
656
  ]
618
657
  })] }) : /* @__PURE__ */ f("div", {
619
658
  className: "p-4 text-sm text-text-secondary text-center",
620
- children: "No data available"
659
+ children: _("bigconsole.parsers.builder.dataPreview.noData", "No data available")
621
660
  })
622
661
  })]
623
662
  })
624
663
  ] })]
625
664
  }),
626
- y === 2 && /* @__PURE__ */ p("div", {
665
+ x === 2 && /* @__PURE__ */ p("div", {
627
666
  className: "space-y-5",
628
667
  children: [
629
668
  /* @__PURE__ */ p("div", { children: [
630
669
  /* @__PURE__ */ p("label", {
631
670
  htmlFor: "expression",
632
671
  className: "block text-sm font-medium text-text-primary mb-2",
633
- children: ["Expression ", /* @__PURE__ */ f("span", {
634
- className: "text-status-error-text",
635
- children: "*"
636
- })]
672
+ children: [
673
+ _("bigconsole.parsers.builder.fields.expression.label", "Expression"),
674
+ " ",
675
+ /* @__PURE__ */ f("span", {
676
+ className: "text-status-error-text",
677
+ children: "*"
678
+ })
679
+ ]
637
680
  }),
638
681
  /* @__PURE__ */ f("textarea", {
639
682
  id: "expression",
640
- value: T.expression,
641
- onChange: at,
642
- placeholder: $.placeholder,
683
+ value: D.expression,
684
+ onChange: vt,
685
+ placeholder: Mt.placeholder,
643
686
  rows: 8,
644
- className: `${_} font-mono resize-y ${D.expression ? "border-status-error-border" : "border-border-default"}`
687
+ className: `${h} font-mono resize-y ${k.expression ? "border-status-error-border" : "border-border-default"}`
645
688
  }),
646
- D.expression && /* @__PURE__ */ f("p", {
689
+ k.expression && /* @__PURE__ */ f("p", {
647
690
  className: "text-xs text-status-error-text mt-1.5",
648
- children: D.expression
691
+ children: k.expression
649
692
  }),
650
- /* @__PURE__ */ p("p", {
693
+ /* @__PURE__ */ f("p", {
651
694
  className: "text-xs text-text-tertiary mt-1.5",
652
- children: ["Example: ", $.example]
695
+ children: _("bigconsole.parsers.builder.fields.expression.example", "Example: {{example}}", { example: Mt.example })
653
696
  })
654
697
  ] }),
655
- /* @__PURE__ */ f(u, {
656
- type: "button",
657
- onClick: pt,
658
- disabled: Pe || !T.expression.trim(),
659
- variant: "default",
660
- className: "w-full",
661
- children: Pe ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(c, { className: "w-4 h-4 mr-2 animate-spin" }), "Testing..."] }) : /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(l, { className: "w-4 h-4 mr-2" }), "Run Test"] })
698
+ /* @__PURE__ */ f(ae, {
699
+ permission: r.PARSER_TEST,
700
+ deniedBehavior: "disable",
701
+ children: /* @__PURE__ */ f(u, {
702
+ type: "button",
703
+ onClick: Et,
704
+ disabled: qe || !D.expression.trim(),
705
+ variant: "default",
706
+ className: "w-full",
707
+ children: qe ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(l, { className: "w-4 h-4 mr-2 animate-spin" }), _("bigconsole.parsers.builder.actions.testing", "Testing...")] }) : /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(_e, { className: "w-4 h-4 mr-2" }), _("bigconsole.parsers.builder.actions.runTest", "Run Test")] })
708
+ })
662
709
  }),
663
710
  /* @__PURE__ */ p("div", {
664
711
  className: "grid gap-4 md:grid-cols-2",
@@ -667,112 +714,128 @@ var g = {
667
714
  className: "flex items-center justify-between mb-2",
668
715
  children: [/* @__PURE__ */ p("label", {
669
716
  className: "text-sm font-medium text-text-primary",
670
- children: ["Input JSON", /* @__PURE__ */ f("span", {
671
- className: `ml-2 text-[10px] font-semibold uppercase tracking-wide px-2 py-0.5 rounded border align-middle ${R ? "text-action-primary-bg bg-action-primary-bg/10 border-action-primary-bg/30" : "text-text-secondary bg-bg-sunken border-border-default"}`,
672
- children: R ? "Reference mode" : "Sample mode"
717
+ children: [_("bigconsole.parsers.builder.test.inputJsonLabel", "Input JSON"), /* @__PURE__ */ f("span", {
718
+ className: `ml-2 text-[10px] font-semibold uppercase tracking-wide px-2 py-0.5 rounded border align-middle ${z ? "text-action-primary-bg bg-action-primary-bg/10 border-action-primary-bg/30" : "text-text-secondary bg-bg-sunken border-border-default"}`,
719
+ children: z ? _("bigconsole.parsers.builder.test.referenceMode", "Reference mode") : _("bigconsole.parsers.builder.test.sampleMode", "Sample mode")
673
720
  })]
674
721
  }), /* @__PURE__ */ p("div", {
675
722
  className: "flex items-center gap-2",
676
- children: [T.inputSinkKey && !R && /* @__PURE__ */ p("button", {
723
+ children: [D.inputSinkKey && !z && /* @__PURE__ */ p("button", {
677
724
  type: "button",
678
- onClick: ut,
679
- disabled: Ie,
725
+ onClick: Ct,
726
+ disabled: Ye,
680
727
  className: "inline-flex items-center gap-1.5 px-2.5 py-1.5 text-xs font-semibold text-action-primary-bg border border-action-primary-bg rounded-md hover:bg-action-primary-bg/10 transition-colors disabled:opacity-50",
681
- children: [Ie ? /* @__PURE__ */ f(c, { className: "w-3.5 h-3.5 animate-spin" }) : /* @__PURE__ */ f(ue, { className: "w-3.5 h-3.5" }), "Load Sample"]
682
- }), R && /* @__PURE__ */ p("button", {
728
+ children: [Ye ? /* @__PURE__ */ f(l, { className: "w-3.5 h-3.5 animate-spin" }) : /* @__PURE__ */ f(pe, { className: "w-3.5 h-3.5" }), _("bigconsole.parsers.builder.actions.loadSample", "Load Sample")]
729
+ }), z && /* @__PURE__ */ p("button", {
683
730
  type: "button",
684
- onClick: dt,
731
+ onClick: wt,
685
732
  className: "inline-flex items-center gap-1.5 px-2.5 py-1.5 text-xs font-semibold text-text-primary border border-border-default rounded-md hover:bg-bg-sunken transition-colors",
686
- children: [/* @__PURE__ */ f(ge, { className: "w-3.5 h-3.5" }), "Clear"]
733
+ children: [/* @__PURE__ */ f(be, { className: "w-3.5 h-3.5" }), _("bigconsole.parsers.builder.actions.clear", "Clear")]
687
734
  })]
688
735
  })]
689
736
  }),
690
737
  /* @__PURE__ */ f("textarea", {
691
- value: A,
692
- onChange: lt,
693
- readOnly: R,
694
- placeholder: "Type sample JSON to test against it — or Load a sample from the source…",
738
+ value: j,
739
+ onChange: St,
740
+ readOnly: z,
741
+ placeholder: _("bigconsole.parsers.builder.test.inputPlaceholder", "Type sample JSON to test against it — or Load a sample from the source…"),
695
742
  rows: 8,
696
- className: `${_} min-h-[220px] text-xs font-mono leading-relaxed resize-y border-border-default ${R ? "bg-bg-sunken opacity-80 cursor-not-allowed" : ""}`
743
+ className: `${h} min-h-[220px] text-xs font-mono leading-relaxed resize-y border-border-default ${z ? "bg-bg-sunken opacity-80 cursor-not-allowed" : ""}`
697
744
  }),
698
- R && B ? /* @__PURE__ */ p("p", {
745
+ z && V ? /* @__PURE__ */ p("p", {
699
746
  className: "text-xs text-text-tertiary mt-1.5",
700
747
  children: [
701
- "Loaded a small sample",
702
- B.total == null ? "" : ` (first ${Math.min(m, B.total)} of ${B.total} rows)`,
748
+ _("bigconsole.parsers.builder.test.loadedSample", "Loaded a small sample"),
749
+ V.total == null ? "" : _("bigconsole.parsers.builder.dataPreview.rowRange", " (first {{shown}} of {{total}} rows)", {
750
+ shown: Math.min(m, V.total),
751
+ total: V.total
752
+ }),
703
753
  " ",
704
- "from ",
705
- B.sinkName,
706
- " · locked — press Clear to edit."
754
+ _("bigconsole.parsers.builder.test.loadedSampleFrom", "from {{sinkName}} · locked — press Clear to edit.", { sinkName: V.sinkName })
707
755
  ]
708
756
  }) : /* @__PURE__ */ f("p", {
709
757
  className: "text-xs text-text-tertiary mt-1.5",
710
- children: "Type sample JSON to test against it, or Load a sample from the source."
758
+ children: _("bigconsole.parsers.builder.test.inputHelper", "Type sample JSON to test against it, or Load a sample from the source.")
711
759
  })
712
760
  ] }), /* @__PURE__ */ p("div", { children: [
713
761
  /* @__PURE__ */ p("div", {
714
762
  className: "flex items-center justify-between mb-2",
715
763
  children: [/* @__PURE__ */ f("label", {
716
764
  className: "text-sm font-medium text-text-primary",
717
- children: P ? "Error Output" : "Output"
718
- }), (M || P) && (P ? /* @__PURE__ */ p("span", {
765
+ children: F ? _("bigconsole.parsers.builder.test.errorOutputLabel", "Error Output") : _("bigconsole.parsers.builder.test.outputLabel", "Output")
766
+ }), (N || F) && (F ? /* @__PURE__ */ p("span", {
719
767
  className: "text-xs px-2 py-1 bg-status-error-bg/10 text-status-error-text rounded flex items-center gap-1",
720
- children: [/* @__PURE__ */ f(s, { className: "w-3 h-3" }), " Failed"]
768
+ children: [
769
+ /* @__PURE__ */ f(se, { className: "w-3 h-3" }),
770
+ " ",
771
+ _("bigconsole.parsers.builder.test.failed", "Failed")
772
+ ]
721
773
  }) : /* @__PURE__ */ p("span", {
722
774
  className: "text-xs px-2 py-1 bg-status-success-bg/10 text-status-success-text rounded flex items-center gap-1",
723
- children: [/* @__PURE__ */ f(oe, { className: "w-3 h-3" }), " Passed"]
775
+ children: [
776
+ /* @__PURE__ */ f(le, { className: "w-3 h-3" }),
777
+ " ",
778
+ _("bigconsole.parsers.builder.test.passed", "Passed")
779
+ ]
724
780
  }))]
725
781
  }),
726
- M || P ? /* @__PURE__ */ f("pre", {
727
- className: `w-full px-3 py-2.5 text-xs font-mono leading-relaxed border rounded-md overflow-auto min-h-[220px] max-h-[220px] resize-y ${P ? "bg-status-error-bg/5 text-status-error-text border-status-error-border/30" : "bg-status-success-bg/5 text-text-primary border-status-success-border/30"}`,
728
- children: P || M
782
+ N || F ? /* @__PURE__ */ f("pre", {
783
+ className: `w-full px-3 py-2.5 text-xs font-mono leading-relaxed border rounded-md overflow-auto min-h-[220px] max-h-[220px] resize-y ${F ? "bg-status-error-bg/5 text-status-error-text border-status-error-border/30" : "bg-status-success-bg/5 text-text-primary border-status-success-border/30"}`,
784
+ children: F || N
729
785
  }) : /* @__PURE__ */ f("div", {
730
786
  className: "min-h-[220px] p-3 bg-bg-sunken rounded-md border border-border-default",
731
787
  children: /* @__PURE__ */ p("p", {
732
788
  className: "text-xs text-text-secondary leading-relaxed",
733
- children: [/* @__PURE__ */ f("strong", { children: "Tip:" }), " write your expression and click “Run Test” to see the transformation."]
789
+ children: [
790
+ /* @__PURE__ */ f("strong", { children: _("bigconsole.parsers.builder.test.tipLabel", "Tip:") }),
791
+ " ",
792
+ _("bigconsole.parsers.builder.test.tipBody", "write your expression and click “Run Test” to see the transformation.")
793
+ ]
734
794
  })
735
795
  }),
736
- I && !P && /* @__PURE__ */ p("p", {
796
+ L && !F && /* @__PURE__ */ p("p", {
737
797
  className: "text-xs text-text-tertiary mt-1.5",
738
798
  children: [
739
- "Tested a sample",
740
- I.sampledRows != null && I.totalRows != null ? ` (first ${I.sampledRows} of ${I.totalRows} rows)` : "",
741
- "— a saved parser runs over the full source, so results may differ."
799
+ _("bigconsole.parsers.builder.test.testedSample", "Tested a sample"),
800
+ L.sampledRows != null && L.totalRows != null ? _("bigconsole.parsers.builder.dataPreview.rowRange", " (first {{shown}} of {{total}} rows)", {
801
+ shown: L.sampledRows,
802
+ total: L.totalRows
803
+ }) : "",
804
+ _("bigconsole.parsers.builder.test.testedSampleNote", " — a saved parser runs over the full source, so results may differ.")
742
805
  ]
743
806
  })
744
807
  ] })]
745
808
  })
746
809
  ]
747
810
  }),
748
- y === 3 && /* @__PURE__ */ p("div", {
811
+ x === 3 && /* @__PURE__ */ p("div", {
749
812
  className: "space-y-6",
750
813
  children: [/* @__PURE__ */ p("div", { children: [
751
814
  /* @__PURE__ */ f("label", {
752
815
  className: "block text-sm font-medium text-text-primary mb-1",
753
- children: "Cache Duration"
816
+ children: _("bigconsole.parsers.builder.review.cacheDurationLabel", "Cache Duration")
754
817
  }),
755
818
  /* @__PURE__ */ f("p", {
756
819
  className: "text-xs text-text-tertiary mb-3",
757
- children: "How long should data be cached before refreshing?"
820
+ children: _("bigconsole.parsers.builder.review.cacheDurationHelper", "How long should data be cached before refreshing?")
758
821
  }),
759
- /* @__PURE__ */ f(ne, {
760
- value: T.ttl,
761
- onChange: st,
762
- error: D.ttl,
822
+ /* @__PURE__ */ f(te, {
823
+ value: D.ttl,
824
+ onChange: bt,
825
+ error: k.ttl,
763
826
  hideLabel: !0
764
827
  })
765
828
  ] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
766
829
  className: "block text-sm font-medium text-text-primary mb-2",
767
- children: "Review"
830
+ children: _("bigconsole.parsers.builder.review.label", "Review")
768
831
  }), /* @__PURE__ */ f("div", {
769
832
  className: "border border-border-default rounded-lg overflow-hidden",
770
833
  children: [
771
- ["Name", T.name || "—"],
772
- ["Output Key", T.outputKey || "—"],
773
- ["Scope", w ? x === "default" ? "Global" : Qe.find((e) => e.id === x)?.name || x : "Dashboard"],
774
- ["Type", g[T.type].name],
775
- ["Source", X || "—"]
834
+ [_("bigconsole.parsers.builder.review.name", "Name"), D.name || "—"],
835
+ [_("bigconsole.parsers.builder.review.outputKey", "Output Key"), D.outputKey || "—"],
836
+ [_("bigconsole.parsers.builder.review.scope", "Scope"), E ? C === "default" ? _("bigconsole.parsers.builder.review.scopeGlobal", "Global") : dt.find((e) => e.id === C)?.name || C : _("bigconsole.parsers.builder.review.scopeDashboard", "Dashboard")],
837
+ [_("bigconsole.parsers.builder.review.type", "Type"), y[D.type].name],
838
+ [_("bigconsole.parsers.builder.review.source", "Source"), Z || "—"]
776
839
  ].map(([e, t]) => /* @__PURE__ */ p("div", {
777
840
  className: "flex items-center justify-between gap-3 px-4 py-2.5 text-sm border-b border-border-default last:border-b-0",
778
841
  children: [/* @__PURE__ */ f("span", {
@@ -790,28 +853,32 @@ var g = {
790
853
  }),
791
854
  /* @__PURE__ */ p("div", {
792
855
  className: "flex items-center justify-between gap-4 pt-6 mt-6 border-t border-border-default",
793
- children: [y === 0 ? /* @__PURE__ */ f(u, {
856
+ children: [x === 0 ? /* @__PURE__ */ f(u, {
794
857
  type: "button",
795
- onClick: Z,
858
+ onClick: Q,
796
859
  variant: "secondary",
797
- children: "Cancel"
860
+ children: _("bigconsole.parsers.builder.actions.cancel", "Cancel")
798
861
  }) : /* @__PURE__ */ p(u, {
799
862
  type: "button",
800
- onClick: vt,
863
+ onClick: jt,
801
864
  variant: "secondary",
802
- children: [/* @__PURE__ */ f(ae, { className: "w-4 h-4 mr-2" }), "Back"]
803
- }), yt ? /* @__PURE__ */ f(u, {
804
- type: "button",
805
- onClick: mt,
806
- disabled: !ht || Ae,
807
- variant: "default",
808
- children: Ae ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(c, { className: "w-4 h-4 mr-2 animate-spin" }), "Saving..."] }) : /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(me, { className: "w-4 h-4 mr-2" }), C ? "Save Changes" : "Create Parser"] })
865
+ children: [/* @__PURE__ */ f(ce, { className: "w-4 h-4 mr-2" }), _("bigconsole.parsers.builder.actions.back", "Back")]
866
+ }), Nt ? /* @__PURE__ */ f(ae, {
867
+ permission: Be,
868
+ deniedBehavior: "disable",
869
+ children: /* @__PURE__ */ f(u, {
870
+ type: "button",
871
+ onClick: Dt,
872
+ disabled: !Ot || Ue || !ze,
873
+ variant: "default",
874
+ children: Ue ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(l, { className: "w-4 h-4 mr-2 animate-spin" }), _("bigconsole.parsers.builder.actions.saving", "Saving...")] }) : /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(ve, { className: "w-4 h-4 mr-2" }), T ? _("bigconsole.parsers.builder.actions.saveChanges", "Save Changes") : _("bigconsole.parsers.builder.actions.createParser", "Create Parser")] })
875
+ })
809
876
  }) : /* @__PURE__ */ p(u, {
810
877
  type: "button",
811
- onClick: _t,
812
- disabled: !Q(y),
878
+ onClick: At,
879
+ disabled: !$(x),
813
880
  variant: "default",
814
- children: ["Next", /* @__PURE__ */ f(ce, { className: "w-4 h-4 ml-2" })]
881
+ children: [_("bigconsole.parsers.builder.actions.next", "Next"), /* @__PURE__ */ f(de, { className: "w-4 h-4 ml-2" })]
815
882
  })]
816
883
  })
817
884
  ]
@@ -819,6 +886,6 @@ var g = {
819
886
  });
820
887
  });
821
888
  //#endregion
822
- export { v as ParserBuilderPage, v as default };
889
+ export { g as ParserBuilderPage, g as default };
823
890
 
824
891
  //# sourceMappingURL=ParserBuilderPage.js.map