@burdenoff/microfe-bigconsole 2026.805.2 → 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 (134) hide show
  1. package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +109 -113
  2. package/dist/bigconsole/components/builder/inspector/DataBindingSection.js.map +1 -1
  3. package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +115 -113
  4. package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js.map +1 -1
  5. package/dist/bigconsole/components/dashboard/DashboardCanvas.js +71 -62
  6. package/dist/bigconsole/components/dashboard/DashboardCanvas.js.map +1 -1
  7. package/dist/bigconsole/components/dashboard/DashboardToolbar.js +90 -89
  8. package/dist/bigconsole/components/dashboard/DashboardToolbar.js.map +1 -1
  9. package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +56 -54
  10. package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js.map +1 -1
  11. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +126 -125
  12. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js.map +1 -1
  13. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +151 -150
  14. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js.map +1 -1
  15. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +77 -76
  16. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js.map +1 -1
  17. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +97 -96
  18. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js.map +1 -1
  19. package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +172 -191
  20. package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js.map +1 -1
  21. package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js +75 -83
  22. package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js.map +1 -1
  23. package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +151 -154
  24. package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js.map +1 -1
  25. package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +181 -190
  26. package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js.map +1 -1
  27. package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -0
  28. package/dist/bigconsole/components/dashboard/WidgetPalette.js +110 -108
  29. package/dist/bigconsole/components/dashboard/WidgetPalette.js.map +1 -1
  30. package/dist/bigconsole/components/datasink/CacheTTLSelector.js +102 -103
  31. package/dist/bigconsole/components/datasink/CacheTTLSelector.js.map +1 -1
  32. package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +36 -41
  33. package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js.map +1 -1
  34. package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +38 -37
  35. package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js.map +1 -1
  36. package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +113 -117
  37. package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js.map +1 -1
  38. package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +182 -197
  39. package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js.map +1 -1
  40. package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +166 -168
  41. package/dist/bigconsole/components/datasink/RefreshTypeSelector.js.map +1 -1
  42. package/dist/bigconsole/components/parser/DataSinkSelector.js +87 -86
  43. package/dist/bigconsole/components/parser/DataSinkSelector.js.map +1 -1
  44. package/dist/bigconsole/components/parser/ImportParserDialog.js +196 -211
  45. package/dist/bigconsole/components/parser/ImportParserDialog.js.map +1 -1
  46. package/dist/bigconsole/components/parser/ParserSelector.js +130 -128
  47. package/dist/bigconsole/components/parser/ParserSelector.js.map +1 -1
  48. package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +66 -63
  49. package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js.map +1 -1
  50. package/dist/bigconsole/components/preview/AiPreviewPanel.js +95 -91
  51. package/dist/bigconsole/components/preview/AiPreviewPanel.js.map +1 -1
  52. package/dist/bigconsole/components/widgets/ActionConfigDialog.js +222 -215
  53. package/dist/bigconsole/components/widgets/ActionConfigDialog.js.map +1 -1
  54. package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +149 -145
  55. package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js.map +1 -1
  56. package/dist/bigconsole/components/widgets/PropertiesPanel.js +504 -470
  57. package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
  58. package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +44 -47
  59. package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js.map +1 -1
  60. package/dist/bigconsole/components/widgets/chart/ChartConfig.js +143 -142
  61. package/dist/bigconsole/components/widgets/chart/ChartConfig.js.map +1 -1
  62. package/dist/bigconsole/components/widgets/comments/WidgetComments.js +101 -88
  63. package/dist/bigconsole/components/widgets/comments/WidgetComments.js.map +1 -1
  64. package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +135 -134
  65. package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js.map +1 -1
  66. package/dist/bigconsole/components/widgets/form/FormWidget.js +167 -159
  67. package/dist/bigconsole/components/widgets/form/FormWidget.js.map +1 -1
  68. package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +69 -68
  69. package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js.map +1 -1
  70. package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +64 -72
  71. package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js.map +1 -1
  72. package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +60 -59
  73. package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js.map +1 -1
  74. package/dist/bigconsole/components/widgets/list/ListConfig.js +57 -56
  75. package/dist/bigconsole/components/widgets/list/ListConfig.js.map +1 -1
  76. package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +70 -69
  77. package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js.map +1 -1
  78. package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +35 -34
  79. package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js.map +1 -1
  80. package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js +20 -19
  81. package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js.map +1 -1
  82. package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +178 -177
  83. package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js.map +1 -1
  84. package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +76 -75
  85. package/dist/bigconsole/components/widgets/progress/ProgressConfig.js.map +1 -1
  86. package/dist/bigconsole/components/widgets/table/TableConfig.js +183 -168
  87. package/dist/bigconsole/components/widgets/table/TableConfig.js.map +1 -1
  88. package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +187 -180
  89. package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js.map +1 -1
  90. package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +40 -38
  91. package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js.map +1 -1
  92. package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +150 -148
  93. package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js.map +1 -1
  94. package/dist/bigconsole/pages/DashboardBuilderPage.js +181 -176
  95. package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
  96. package/dist/bigconsole/pages/DashboardViewPage.js +196 -192
  97. package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
  98. package/dist/bigconsole/pages/DashboardsPage.js +223 -219
  99. package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
  100. package/dist/bigconsole/pages/DataParsersPage.js +167 -170
  101. package/dist/bigconsole/pages/DataParsersPage.js.map +1 -1
  102. package/dist/bigconsole/pages/DataSinkBuilderPage.js +204 -189
  103. package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
  104. package/dist/bigconsole/pages/DataSinkViewPage.js +175 -169
  105. package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
  106. package/dist/bigconsole/pages/DataSourcesPage.js +8 -7
  107. package/dist/bigconsole/pages/DataSourcesPage.js.map +1 -1
  108. package/dist/bigconsole/pages/InsightsPage.js +238 -208
  109. package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
  110. package/dist/bigconsole/pages/ParserBuilderPage.js +464 -412
  111. package/dist/bigconsole/pages/ParserBuilderPage.js.map +1 -1
  112. package/dist/bigconsole/pages/ParserViewPage.js +92 -90
  113. package/dist/bigconsole/pages/ParserViewPage.js.map +1 -1
  114. package/dist/bigconsole/pages/PipelineBuilderPage.js +221 -194
  115. package/dist/bigconsole/pages/PipelineBuilderPage.js.map +1 -1
  116. package/dist/bigconsole/pages/PipelineViewPage.js +181 -184
  117. package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
  118. package/dist/bigconsole/pages/PipelinesPage.js +128 -127
  119. package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
  120. package/dist/bigconsole/pages/SettingsPage.js +177 -172
  121. package/dist/bigconsole/pages/SettingsPage.js.map +1 -1
  122. package/dist/bigconsole/pages/WidgetDemoPage.js +121 -83
  123. package/dist/bigconsole/pages/WidgetDemoPage.js.map +1 -1
  124. package/dist/bigconsole/pages/WorkflowViewPage.js +199 -193
  125. package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
  126. package/dist/bigconsole/pages/WorkflowsPage.js +129 -128
  127. package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
  128. package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +111 -109
  129. package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js.map +1 -1
  130. package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +127 -126
  131. package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js.map +1 -1
  132. package/dist/bigconsole/renderers/adapters/CustomRenderer.js +103 -103
  133. package/dist/bigconsole/renderers/adapters/CustomRenderer.js.map +1 -1
  134. package/package.json +2 -1
@@ -1,258 +1,259 @@
1
1
  import e, { memo as t, useCallback as n, useMemo as r } from "react";
2
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
2
+ import { useI18n as i } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
3
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
3
4
  //#region src/bigconsole/renderers/adapters/BlockKitRenderer.tsx
4
- function o(t) {
5
+ function s(t) {
5
6
  if (!t) return null;
6
7
  if (typeof t == "string") return t;
7
8
  if (t.type === "mrkdwn") {
8
- let n = t.text || "", r = [], a = n, o = 0;
9
- for (; a.length > 0;) {
10
- let t = a.match(/^\*([^*]+)\*/);
9
+ let n = t.text || "", r = [], i = n, o = 0;
10
+ for (; i.length > 0;) {
11
+ let t = i.match(/^\*([^*]+)\*/);
11
12
  if (t) {
12
- r.push(/* @__PURE__ */ i("strong", { children: t[1] }, o++)), a = a.slice(t[0].length);
13
+ r.push(/* @__PURE__ */ a("strong", { children: t[1] }, o++)), i = i.slice(t[0].length);
13
14
  continue;
14
15
  }
15
- let n = a.match(/^_([^_]+)_/);
16
+ let n = i.match(/^_([^_]+)_/);
16
17
  if (n) {
17
- r.push(/* @__PURE__ */ i("em", { children: n[1] }, o++)), a = a.slice(n[0].length);
18
+ r.push(/* @__PURE__ */ a("em", { children: n[1] }, o++)), i = i.slice(n[0].length);
18
19
  continue;
19
20
  }
20
- let s = a.match(/^~([^~]+)~/);
21
+ let s = i.match(/^~([^~]+)~/);
21
22
  if (s) {
22
- r.push(/* @__PURE__ */ i("del", { children: s[1] }, o++)), a = a.slice(s[0].length);
23
+ r.push(/* @__PURE__ */ a("del", { children: s[1] }, o++)), i = i.slice(s[0].length);
23
24
  continue;
24
25
  }
25
- let c = a.match(/^`([^`]+)`/);
26
+ let c = i.match(/^`([^`]+)`/);
26
27
  if (c) {
27
- r.push(/* @__PURE__ */ i("code", {
28
+ r.push(/* @__PURE__ */ a("code", {
28
29
  className: "bg-bg-sunken px-1 rounded text-sm",
29
30
  children: c[1]
30
- }, o++)), a = a.slice(c[0].length);
31
+ }, o++)), i = i.slice(c[0].length);
31
32
  continue;
32
33
  }
33
- let l = a.match(/^<([^|>]+)\|([^>]+)>/);
34
+ let l = i.match(/^<([^|>]+)\|([^>]+)>/);
34
35
  if (l) {
35
- r.push(/* @__PURE__ */ i("a", {
36
+ r.push(/* @__PURE__ */ a("a", {
36
37
  href: l[1],
37
38
  className: "text-blue-600 dark:text-blue-400 underline",
38
39
  target: "_blank",
39
40
  rel: "noopener noreferrer",
40
41
  children: l[2]
41
- }, o++)), a = a.slice(l[0].length);
42
+ }, o++)), i = i.slice(l[0].length);
42
43
  continue;
43
44
  }
44
- let u = a.match(/^<([^|>]+)>/);
45
+ let u = i.match(/^<([^|>]+)>/);
45
46
  if (u) {
46
- r.push(/* @__PURE__ */ i("a", {
47
+ r.push(/* @__PURE__ */ a("a", {
47
48
  href: u[1],
48
49
  className: "text-blue-600 dark:text-blue-400 underline",
49
50
  target: "_blank",
50
51
  rel: "noopener noreferrer",
51
52
  children: u[1]
52
- }, o++)), a = a.slice(u[0].length);
53
+ }, o++)), i = i.slice(u[0].length);
53
54
  continue;
54
55
  }
55
- let d = a.match(/^[^*_~`<]+/);
56
+ let d = i.match(/^[^*_~`<]+/);
56
57
  if (d) {
57
- r.push(/* @__PURE__ */ i(e.Fragment, { children: d[0] }, o++)), a = a.slice(d[0].length);
58
+ r.push(/* @__PURE__ */ a(e.Fragment, { children: d[0] }, o++)), i = i.slice(d[0].length);
58
59
  continue;
59
60
  }
60
- r.push(/* @__PURE__ */ i(e.Fragment, { children: a[0] }, o++)), a = a.slice(1);
61
+ r.push(/* @__PURE__ */ a(e.Fragment, { children: i[0] }, o++)), i = i.slice(1);
61
62
  }
62
- return /* @__PURE__ */ i("span", { children: r });
63
+ return /* @__PURE__ */ a("span", { children: r });
63
64
  }
64
65
  return t.text;
65
66
  }
66
- function s(e) {
67
+ function c(e) {
67
68
  switch (e) {
68
69
  case "primary": return "bg-status-success-bg hover:bg-status-success-bg/90 text-white transition-colors";
69
70
  case "danger": return "bg-status-error-bg hover:bg-status-error-bg/90 text-white transition-colors";
70
71
  default: return "bg-bg-sunken hover:bg-bg-sunken/80 text-primary transition-colors";
71
72
  }
72
73
  }
73
- function c(e, t) {
74
+ function l(e, t) {
74
75
  if (e == null) return e;
75
76
  if (typeof e == "string") return e.replace(/\$\{([^}]+)\}/g, (e, n) => {
76
- let r = l(t, n.trim());
77
+ let r = u(t, n.trim());
77
78
  return r === void 0 ? "" : String(r);
78
79
  });
79
- if (Array.isArray(e)) return e.map((e) => c(e, t));
80
+ if (Array.isArray(e)) return e.map((e) => l(e, t));
80
81
  if (typeof e == "object") {
81
82
  let n = {};
82
- for (let [r, i] of Object.entries(e)) n[r] = c(i, t);
83
+ for (let [r, i] of Object.entries(e)) n[r] = l(i, t);
83
84
  return n;
84
85
  }
85
86
  return e;
86
87
  }
87
- function l(e, t) {
88
+ function u(e, t) {
88
89
  let n = t.split("."), r = e;
89
90
  for (let e of n) if (r && typeof r == "object" && e in r) r = r[e];
90
91
  else return;
91
92
  return r;
92
93
  }
93
- var u = t(function({ block: e, index: t, onAction: n }) {
94
+ var d = t(function({ block: e, index: t, onAction: n }) {
94
95
  switch (e.type) {
95
- case "header": return /* @__PURE__ */ i("div", {
96
+ case "header": return /* @__PURE__ */ a("div", {
96
97
  className: "py-2",
97
- children: /* @__PURE__ */ i("h2", {
98
+ children: /* @__PURE__ */ a("h2", {
98
99
  className: "text-lg font-bold text-primary",
99
- children: o(e.text)
100
+ children: s(e.text)
100
101
  })
101
102
  });
102
- case "section": return /* @__PURE__ */ a("div", {
103
+ case "section": return /* @__PURE__ */ o("div", {
103
104
  className: "py-2 flex items-start gap-4",
104
- children: [/* @__PURE__ */ a("div", {
105
+ children: [/* @__PURE__ */ o("div", {
105
106
  className: "flex-1",
106
- children: [e.text && /* @__PURE__ */ i("p", {
107
+ children: [e.text && /* @__PURE__ */ a("p", {
107
108
  className: "text-primary",
108
- children: o(e.text)
109
- }), e.fields && e.fields.length > 0 && /* @__PURE__ */ i("div", {
109
+ children: s(e.text)
110
+ }), e.fields && e.fields.length > 0 && /* @__PURE__ */ a("div", {
110
111
  className: "grid grid-cols-2 gap-2 mt-2",
111
- children: e.fields.map((e, t) => /* @__PURE__ */ i("div", {
112
+ children: e.fields.map((e, t) => /* @__PURE__ */ a("div", {
112
113
  className: "text-sm",
113
- children: o(e)
114
+ children: s(e)
114
115
  }, t))
115
116
  })]
116
- }), e.accessory && /* @__PURE__ */ i("div", {
117
+ }), e.accessory && /* @__PURE__ */ a("div", {
117
118
  className: "flex-shrink-0",
118
- children: /* @__PURE__ */ i(d, {
119
+ children: /* @__PURE__ */ a(f, {
119
120
  accessory: e.accessory,
120
121
  onAction: n
121
122
  })
122
123
  })]
123
124
  });
124
- case "divider": return /* @__PURE__ */ i("hr", { className: "my-2 border-default" });
125
- case "image": return /* @__PURE__ */ a("div", {
125
+ case "divider": return /* @__PURE__ */ a("hr", { className: "my-2 border-default" });
126
+ case "image": return /* @__PURE__ */ o("div", {
126
127
  className: "py-2",
127
- children: [e.title && /* @__PURE__ */ i("p", {
128
+ children: [e.title && /* @__PURE__ */ a("p", {
128
129
  className: "text-sm text-secondary mb-1",
129
- children: o(e.title)
130
- }), /* @__PURE__ */ i("img", {
130
+ children: s(e.title)
131
+ }), /* @__PURE__ */ a("img", {
131
132
  src: e.image_url,
132
133
  alt: e.alt_text || "",
133
134
  className: "max-w-full h-auto rounded"
134
135
  })]
135
136
  });
136
- case "context": return /* @__PURE__ */ i("div", {
137
+ case "context": return /* @__PURE__ */ a("div", {
137
138
  className: "py-1 flex items-center gap-2 flex-wrap text-sm text-secondary",
138
- children: e.elements?.map((e, t) => /* @__PURE__ */ i("span", { children: e.type === "image" ? /* @__PURE__ */ i("img", {
139
+ children: e.elements?.map((e, t) => /* @__PURE__ */ a("span", { children: e.type === "image" ? /* @__PURE__ */ a("img", {
139
140
  src: e.image_url,
140
141
  alt: e.alt_text || "",
141
142
  className: "w-5 h-5 rounded inline-block"
142
- }) : o(e.text) }, t))
143
+ }) : s(e.text) }, t))
143
144
  });
144
- case "actions": return /* @__PURE__ */ i("div", {
145
+ case "actions": return /* @__PURE__ */ a("div", {
145
146
  className: "py-2 flex gap-2 flex-wrap",
146
- children: e.elements?.map((e, t) => /* @__PURE__ */ i(f, {
147
+ children: e.elements?.map((e, t) => /* @__PURE__ */ a(p, {
147
148
  element: e,
148
149
  onAction: n
149
150
  }, t))
150
151
  });
151
- case "input": return /* @__PURE__ */ a("div", {
152
+ case "input": return /* @__PURE__ */ o("div", {
152
153
  className: "py-2",
153
- children: [e.label ? /* @__PURE__ */ i("label", {
154
+ children: [e.label ? /* @__PURE__ */ a("label", {
154
155
  className: "block text-sm font-medium text-secondary mb-1",
155
- children: o(e.label)
156
- }) : null, /* @__PURE__ */ i("input", {
156
+ children: s(e.label)
157
+ }) : null, /* @__PURE__ */ a("input", {
157
158
  type: "text",
158
159
  className: "w-full px-3 py-2 border border-default rounded-md bg-surface text-primary transition-colors focus:ring-2 focus:ring-primary/20",
159
160
  placeholder: (() => {
160
161
  let t = e.element;
161
- return t?.placeholder ? o(t.placeholder) : "";
162
+ return t?.placeholder ? s(t.placeholder) : "";
162
163
  })()
163
164
  })]
164
165
  });
165
- case "rich_text": return /* @__PURE__ */ i("div", {
166
+ case "rich_text": return /* @__PURE__ */ a("div", {
166
167
  className: "py-2 text-primary",
167
- children: e.elements?.map((e, t) => /* @__PURE__ */ i("span", { children: o(e.text) }, t))
168
+ children: e.elements?.map((e, t) => /* @__PURE__ */ a("span", { children: s(e.text) }, t))
168
169
  });
169
170
  default: return null;
170
171
  }
171
- }), d = t(function({ accessory: e, onAction: t }) {
172
+ }), f = t(function({ accessory: e, onAction: t }) {
172
173
  switch (e.type) {
173
- case "image": return /* @__PURE__ */ i("img", {
174
+ case "image": return /* @__PURE__ */ a("img", {
174
175
  src: e.image_url,
175
176
  alt: e.alt_text || "",
176
177
  className: "w-12 h-12 rounded object-cover"
177
178
  });
178
- case "button": return /* @__PURE__ */ i("button", {
179
+ case "button": return /* @__PURE__ */ a("button", {
179
180
  type: "button",
180
181
  onClick: () => t?.(e.action_id || "", e.value),
181
- className: `px-3 py-1.5 text-sm font-medium rounded ${s(e.style)}`,
182
- children: o(e.text)
182
+ className: `px-3 py-1.5 text-sm font-medium rounded ${c(e.style)}`,
183
+ children: s(e.text)
183
184
  });
184
- case "overflow": return /* @__PURE__ */ i("button", {
185
+ case "overflow": return /* @__PURE__ */ a("button", {
185
186
  type: "button",
186
187
  className: "p-1 text-secondary hover:text-primary transition-colors",
187
- children: /* @__PURE__ */ i("svg", {
188
+ children: /* @__PURE__ */ a("svg", {
188
189
  className: "w-5 h-5",
189
190
  fill: "currentColor",
190
191
  viewBox: "0 0 20 20",
191
- children: /* @__PURE__ */ i("path", { d: "M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z" })
192
+ children: /* @__PURE__ */ a("path", { d: "M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z" })
192
193
  })
193
194
  });
194
195
  default: return null;
195
196
  }
196
- }), f = t(function({ element: e, onAction: t }) {
197
+ }), p = t(function({ element: e, onAction: t }) {
197
198
  let r = n(() => {
198
199
  e.action_id && t?.(e.action_id, e.value), e.url && window.open(e.url, "_blank");
199
200
  }, [e, t]);
200
201
  switch (e.type) {
201
- case "button": return /* @__PURE__ */ i("button", {
202
+ case "button": return /* @__PURE__ */ a("button", {
202
203
  type: "button",
203
204
  onClick: r,
204
- className: `px-4 py-2 text-sm font-medium rounded ${s(e.style)}`,
205
- children: o(e.text)
205
+ className: `px-4 py-2 text-sm font-medium rounded ${c(e.style)}`,
206
+ children: s(e.text)
206
207
  });
207
- case "static_select": return /* @__PURE__ */ a("select", {
208
+ case "static_select": return /* @__PURE__ */ o("select", {
208
209
  className: "px-3 py-2 text-sm border border-default rounded bg-surface text-primary transition-colors focus:ring-2 focus:ring-primary/20",
209
210
  onChange: (n) => t?.(e.action_id || "", n.target.value),
210
- children: [e.placeholder ? /* @__PURE__ */ i("option", {
211
+ children: [e.placeholder ? /* @__PURE__ */ a("option", {
211
212
  value: "",
212
- children: o(e.placeholder)
213
- }) : null, e.options?.map((e, t) => /* @__PURE__ */ i("option", {
213
+ children: s(e.placeholder)
214
+ }) : null, e.options?.map((e, t) => /* @__PURE__ */ a("option", {
214
215
  value: e.value,
215
- children: o(e.text)
216
+ children: s(e.text)
216
217
  }, t))]
217
218
  });
218
- case "datepicker": return /* @__PURE__ */ i("input", {
219
+ case "datepicker": return /* @__PURE__ */ a("input", {
219
220
  type: "date",
220
221
  className: "px-3 py-2 text-sm border border-default rounded bg-surface text-primary transition-colors focus:ring-2 focus:ring-primary/20",
221
222
  onChange: (n) => t?.(e.action_id || "", n.target.value)
222
223
  });
223
- case "checkboxes": return /* @__PURE__ */ i("div", {
224
+ case "checkboxes": return /* @__PURE__ */ a("div", {
224
225
  className: "space-y-1",
225
- children: e.options?.map((n, r) => /* @__PURE__ */ a("label", {
226
+ children: e.options?.map((n, r) => /* @__PURE__ */ o("label", {
226
227
  className: "flex items-center gap-2 text-sm",
227
- children: [/* @__PURE__ */ i("input", {
228
+ children: [/* @__PURE__ */ a("input", {
228
229
  type: "checkbox",
229
230
  className: "rounded border-default transition-colors",
230
231
  onChange: (r) => t?.(e.action_id || "", n.value, { checked: r.target.checked })
231
- }), o(n.text)]
232
+ }), s(n.text)]
232
233
  }, r))
233
234
  });
234
- case "radio_buttons": return /* @__PURE__ */ i("div", {
235
+ case "radio_buttons": return /* @__PURE__ */ a("div", {
235
236
  className: "space-y-1",
236
- children: e.options?.map((n, r) => /* @__PURE__ */ a("label", {
237
+ children: e.options?.map((n, r) => /* @__PURE__ */ o("label", {
237
238
  className: "flex items-center gap-2 text-sm",
238
- children: [/* @__PURE__ */ i("input", {
239
+ children: [/* @__PURE__ */ a("input", {
239
240
  type: "radio",
240
241
  name: e.action_id,
241
242
  className: "border-default transition-colors",
242
243
  onChange: () => t?.(e.action_id || "", n.value)
243
- }), o(n.text)]
244
+ }), s(n.text)]
244
245
  }, r))
245
246
  });
246
247
  default: return null;
247
248
  }
248
249
  });
249
- function p(e) {
250
+ function m(e) {
250
251
  let t = [];
251
252
  for (let [n, r] of Object.entries(e)) if (r != null) if (Array.isArray(r)) t.push({
252
253
  type: "header",
253
254
  text: {
254
255
  type: "plain_text",
255
- text: m(n),
256
+ text: h(n),
256
257
  emoji: !0
257
258
  }
258
259
  }), r.forEach((e, n) => {
@@ -260,7 +261,7 @@ function p(e) {
260
261
  let n = [];
261
262
  for (let [t, r] of Object.entries(e)) r != null && n.push({
262
263
  type: "mrkdwn",
263
- text: `*${m(t)}:*\n${h(r)}`
264
+ text: `*${h(t)}:*\n${g(r)}`
264
265
  });
265
266
  n.length > 0 && t.push({
266
267
  type: "section",
@@ -270,7 +271,7 @@ function p(e) {
270
271
  type: "section",
271
272
  text: {
272
273
  type: "mrkdwn",
273
- text: `${n + 1}. ${h(e)}`
274
+ text: `${n + 1}. ${g(e)}`
274
275
  }
275
276
  });
276
277
  n < r.length - 1 && t.push({ type: "divider" });
@@ -280,14 +281,14 @@ function p(e) {
280
281
  type: "header",
281
282
  text: {
282
283
  type: "plain_text",
283
- text: m(n),
284
+ text: h(n),
284
285
  emoji: !0
285
286
  }
286
287
  });
287
288
  let e = [];
288
289
  for (let [t, n] of Object.entries(r)) n != null && e.push({
289
290
  type: "mrkdwn",
290
- text: `*${m(t)}:*\n${h(n)}`
291
+ text: `*${h(t)}:*\n${g(n)}`
291
292
  });
292
293
  e.length > 0 && t.push({
293
294
  type: "section",
@@ -297,88 +298,88 @@ function p(e) {
297
298
  type: "section",
298
299
  text: {
299
300
  type: "mrkdwn",
300
- text: `*${m(n)}:* ${h(r)}`
301
+ text: `*${h(n)}:* ${g(r)}`
301
302
  }
302
303
  });
303
304
  return t;
304
305
  }
305
- function m(e) {
306
+ function h(e) {
306
307
  return e.replace(/_/g, " ").replace(/([A-Z])/g, " $1").replace(/^./, (e) => e.toUpperCase()).trim();
307
308
  }
308
- function h(e) {
309
+ function g(e) {
309
310
  return e == null ? "-" : typeof e == "boolean" ? e ? "Yes" : "No" : typeof e == "object" ? JSON.stringify(e) : String(e);
310
311
  }
311
- var g = t(function({ widget: e, data: t, template: o, isLoading: s, error: l, onDrilldown: d, onAction: f }) {
312
- let m = r(() => {
313
- if (o && "blocks" in o) return c(o, t);
312
+ var _ = t(function({ widget: e, data: t, template: s, isLoading: c, error: u, onDrilldown: f, onAction: p }) {
313
+ let { t: h } = i(), g = r(() => {
314
+ if (s && "blocks" in s) return l(s, t);
314
315
  if (t && "blocks" in t) return t;
315
316
  if (t && Object.keys(t).length > 0) {
316
- let e = p(t);
317
+ let e = m(t);
317
318
  if (e.length > 0) return { blocks: e };
318
319
  }
319
- if (o) {
320
- let e = c(o, t);
320
+ if (s) {
321
+ let e = l(s, t);
321
322
  if (e?.blocks?.length) return e;
322
323
  }
323
324
  return null;
324
- }, [o, t]), h = n((e, t, n) => {
325
- f && f(e, {
325
+ }, [s, t]), _ = n((e, t, n) => {
326
+ p && p(e, {
326
327
  value: t,
327
328
  ...n
328
329
  });
329
- }, [f]);
330
- return s ? /* @__PURE__ */ i("div", {
330
+ }, [p]);
331
+ return c ? /* @__PURE__ */ a("div", {
331
332
  className: "flex items-center justify-center h-full p-4 animate-in fade-in duration-200",
332
- children: /* @__PURE__ */ a("div", {
333
+ children: /* @__PURE__ */ o("div", {
333
334
  className: "animate-pulse space-y-2 w-full",
334
335
  children: [
335
- /* @__PURE__ */ i("div", { className: "h-4 bg-bg-sunken rounded w-3/4" }),
336
- /* @__PURE__ */ i("div", { className: "h-4 bg-bg-sunken rounded w-1/2" }),
337
- /* @__PURE__ */ i("div", { className: "h-4 bg-bg-sunken rounded w-5/6" })
336
+ /* @__PURE__ */ a("div", { className: "h-4 bg-bg-sunken rounded w-3/4" }),
337
+ /* @__PURE__ */ a("div", { className: "h-4 bg-bg-sunken rounded w-1/2" }),
338
+ /* @__PURE__ */ a("div", { className: "h-4 bg-bg-sunken rounded w-5/6" })
338
339
  ]
339
340
  })
340
- }) : l ? /* @__PURE__ */ i("div", {
341
+ }) : u ? /* @__PURE__ */ a("div", {
341
342
  className: "flex items-center justify-center h-full p-4 text-red-600 dark:text-red-400",
342
- children: /* @__PURE__ */ a("div", {
343
+ children: /* @__PURE__ */ o("div", {
343
344
  className: "text-center",
344
- children: [/* @__PURE__ */ i("p", {
345
+ children: [/* @__PURE__ */ a("p", {
345
346
  className: "font-medium",
346
- children: "Error rendering blocks"
347
- }), /* @__PURE__ */ i("p", {
347
+ children: h("bigconsole.widget.renderer.blockKit.errorRendering", "Error rendering blocks")
348
+ }), /* @__PURE__ */ a("p", {
348
349
  className: "text-sm mt-1",
349
- children: l
350
+ children: u
350
351
  })]
351
352
  })
352
- }) : m?.blocks?.length ? /* @__PURE__ */ a("div", {
353
+ }) : g?.blocks?.length ? /* @__PURE__ */ o("div", {
353
354
  className: "flex flex-col h-full p-4 bg-surface",
354
- children: [m.blocks.map((e, t) => /* @__PURE__ */ i(u, {
355
+ children: [g.blocks.map((e, t) => /* @__PURE__ */ a(d, {
355
356
  block: e,
356
357
  index: t,
357
- onAction: h
358
- }, t)), m.attachments?.map((e, t) => /* @__PURE__ */ a("div", {
358
+ onAction: _
359
+ }, t)), g.attachments?.map((e, t) => /* @__PURE__ */ o("div", {
359
360
  className: "mt-4 border-l-4 pl-3",
360
361
  style: { borderLeftColor: e.color || "var(--color-border)" },
361
- children: [e.blocks?.map((e, t) => /* @__PURE__ */ i(u, {
362
+ children: [e.blocks?.map((e, t) => /* @__PURE__ */ a(d, {
362
363
  block: e,
363
364
  index: t,
364
- onAction: h
365
- }, t)), e.fallback && !e.blocks && /* @__PURE__ */ i("p", {
365
+ onAction: _
366
+ }, t)), e.fallback && !e.blocks && /* @__PURE__ */ a("p", {
366
367
  className: "text-sm text-secondary",
367
368
  children: e.fallback
368
369
  })]
369
370
  }, `attachment-${t}`))]
370
- }) : /* @__PURE__ */ i("div", {
371
+ }) : /* @__PURE__ */ a("div", {
371
372
  className: "flex items-center justify-center h-full p-4 text-secondary animate-in fade-in duration-200",
372
- children: /* @__PURE__ */ a("div", {
373
+ children: /* @__PURE__ */ o("div", {
373
374
  className: "text-center",
374
- children: [/* @__PURE__ */ i("p", { children: "No content to display" }), /* @__PURE__ */ i("p", {
375
+ children: [/* @__PURE__ */ a("p", { children: h("bigconsole.widget.renderer.blockKit.noContent", "No content to display") }), /* @__PURE__ */ a("p", {
375
376
  className: "text-sm mt-1",
376
- children: "Configure blocks or provide data"
377
+ children: h("bigconsole.widget.renderer.blockKit.configureBlocks", "Configure blocks or provide data")
377
378
  })]
378
379
  })
379
380
  });
380
381
  });
381
382
  //#endregion
382
- export { g as default };
383
+ export { _ as default };
383
384
 
384
385
  //# sourceMappingURL=BlockKitRenderer.js.map