@burdenoff/microfe-bigconsole 2026.1010.12 → 2026.1012.1

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