@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,8 +1,9 @@
1
1
  import e from "../../../hooks/useEventWebhooks.js";
2
2
  import { memo as t, useCallback as n, useState as r } from "react";
3
- import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
3
+ import { useI18n as i } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
4
+ import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
4
5
  //#region src/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.tsx
5
- var s = {
6
+ var c = {
6
7
  container: {
7
8
  padding: "16px",
8
9
  backgroundColor: "var(--color-bg-surface)",
@@ -202,299 +203,305 @@ var s = {
202
203
  color: "var(--color-text-placeholder)",
203
204
  marginTop: "4px"
204
205
  }
205
- }, c = t(function({ webhook: e, dashboardId: t, widgetId: n, onSave: i, onCancel: c, loading: l }) {
206
- let [u, d] = r(e?.eventPattern || "widget:*:clicked"), [f, p] = r(e?.webhookUrl || ""), [m, h] = r(e?.method || "POST"), [g, _] = r(e?.headers ? JSON.stringify(e.headers, null, 2) : "");
207
- return /* @__PURE__ */ o("form", {
208
- style: s.form,
206
+ }, l = t(function({ webhook: e, dashboardId: t, widgetId: n, onSave: a, onCancel: l, loading: u }) {
207
+ let { t: d } = i(), [f, p] = r(e?.eventPattern || "widget:*:clicked"), [m, h] = r(e?.webhookUrl || ""), [g, _] = r(e?.method || "POST"), [v, y] = r(e?.headers ? JSON.stringify(e.headers, null, 2) : "");
208
+ return /* @__PURE__ */ s("form", {
209
+ style: c.form,
209
210
  onSubmit: async (r) => {
210
211
  r.preventDefault();
211
- let a;
212
- if (g.trim()) try {
213
- a = JSON.parse(g);
212
+ let i;
213
+ if (v.trim()) try {
214
+ i = JSON.parse(v);
214
215
  } catch {
215
- alert("Invalid JSON in headers field");
216
+ alert(d("bigconsole.widget.webhookConfig.invalidJson", "Invalid JSON in headers field"));
216
217
  return;
217
218
  }
218
- e ? await i({
219
+ e ? await a({
219
220
  id: e.id,
220
- eventPattern: u,
221
- webhookUrl: f,
222
- method: m,
223
- headers: a || null
224
- }) : await i({
221
+ eventPattern: f,
222
+ webhookUrl: m,
223
+ method: g,
224
+ headers: i || null
225
+ }) : await a({
225
226
  dashboardId: t,
226
227
  widgetId: n,
227
- eventPattern: u,
228
- webhookUrl: f,
229
- method: m,
230
- headers: a
228
+ eventPattern: f,
229
+ webhookUrl: m,
230
+ method: g,
231
+ headers: i
231
232
  });
232
233
  },
233
234
  children: [
234
- /* @__PURE__ */ o("div", {
235
- style: s.formGroup,
235
+ /* @__PURE__ */ s("div", {
236
+ style: c.formGroup,
236
237
  children: [
237
- /* @__PURE__ */ a("label", {
238
- style: s.label,
239
- children: "Event Pattern *"
238
+ /* @__PURE__ */ o("label", {
239
+ style: c.label,
240
+ children: d("bigconsole.widget.webhookConfig.eventPatternLabel", "Event Pattern *")
240
241
  }),
241
- /* @__PURE__ */ a("input", {
242
+ /* @__PURE__ */ o("input", {
242
243
  type: "text",
243
- value: u,
244
- onChange: (e) => d(e.target.value),
244
+ value: f,
245
+ onChange: (e) => p(e.target.value),
245
246
  placeholder: "widget:*:clicked",
246
- style: s.input,
247
+ style: c.input,
247
248
  required: !0
248
249
  }),
249
- /* @__PURE__ */ a("p", {
250
- style: s.helpText,
251
- children: "Use * as wildcard. Examples: widget:*:clicked, *:submit, button:save:*"
250
+ /* @__PURE__ */ o("p", {
251
+ style: c.helpText,
252
+ children: d("bigconsole.widget.webhookConfig.eventPatternHelp", "Use * as wildcard. Examples: widget:*:clicked, *:submit, button:save:*")
252
253
  })
253
254
  ]
254
255
  }),
255
- /* @__PURE__ */ o("div", {
256
- style: s.formGroup,
257
- children: [/* @__PURE__ */ a("label", {
258
- style: s.label,
259
- children: "Webhook URL *"
260
- }), /* @__PURE__ */ a("input", {
256
+ /* @__PURE__ */ s("div", {
257
+ style: c.formGroup,
258
+ children: [/* @__PURE__ */ o("label", {
259
+ style: c.label,
260
+ children: d("bigconsole.widget.webhookConfig.webhookUrlLabel", "Webhook URL *")
261
+ }), /* @__PURE__ */ o("input", {
261
262
  type: "url",
262
- value: f,
263
- onChange: (e) => p(e.target.value),
263
+ value: m,
264
+ onChange: (e) => h(e.target.value),
264
265
  placeholder: "https://your-api.com/webhooks/bigconsole",
265
- style: s.input,
266
+ style: c.input,
266
267
  required: !0
267
268
  })]
268
269
  }),
269
- /* @__PURE__ */ o("div", {
270
- style: s.formGroup,
271
- children: [/* @__PURE__ */ a("label", {
272
- style: s.label,
273
- children: "HTTP Method"
274
- }), /* @__PURE__ */ o("select", {
275
- value: m,
276
- onChange: (e) => h(e.target.value),
277
- style: s.select,
270
+ /* @__PURE__ */ s("div", {
271
+ style: c.formGroup,
272
+ children: [/* @__PURE__ */ o("label", {
273
+ style: c.label,
274
+ children: d("bigconsole.widget.webhookConfig.httpMethodLabel", "HTTP Method")
275
+ }), /* @__PURE__ */ s("select", {
276
+ value: g,
277
+ onChange: (e) => _(e.target.value),
278
+ style: c.select,
278
279
  children: [
279
- /* @__PURE__ */ a("option", {
280
+ /* @__PURE__ */ o("option", {
280
281
  value: "POST",
281
282
  children: "POST"
282
283
  }),
283
- /* @__PURE__ */ a("option", {
284
+ /* @__PURE__ */ o("option", {
284
285
  value: "PUT",
285
286
  children: "PUT"
286
287
  }),
287
- /* @__PURE__ */ a("option", {
288
+ /* @__PURE__ */ o("option", {
288
289
  value: "PATCH",
289
290
  children: "PATCH"
290
291
  }),
291
- /* @__PURE__ */ a("option", {
292
+ /* @__PURE__ */ o("option", {
292
293
  value: "GET",
293
294
  children: "GET"
294
295
  }),
295
- /* @__PURE__ */ a("option", {
296
+ /* @__PURE__ */ o("option", {
296
297
  value: "DELETE",
297
298
  children: "DELETE"
298
299
  })
299
300
  ]
300
301
  })]
301
302
  }),
302
- /* @__PURE__ */ o("div", {
303
- style: s.formGroup,
304
- children: [/* @__PURE__ */ a("label", {
305
- style: s.label,
306
- children: "Custom Headers (JSON)"
307
- }), /* @__PURE__ */ a("textarea", {
308
- value: g,
309
- onChange: (e) => _(e.target.value),
303
+ /* @__PURE__ */ s("div", {
304
+ style: c.formGroup,
305
+ children: [/* @__PURE__ */ o("label", {
306
+ style: c.label,
307
+ children: d("bigconsole.widget.webhookConfig.customHeadersLabel", "Custom Headers (JSON)")
308
+ }), /* @__PURE__ */ o("textarea", {
309
+ value: v,
310
+ onChange: (e) => y(e.target.value),
310
311
  placeholder: "{\n \"Authorization\": \"Bearer your-token\"\n}",
311
- style: s.textarea
312
+ style: c.textarea
312
313
  })]
313
314
  }),
314
- /* @__PURE__ */ o("div", {
315
- style: s.formActions,
316
- children: [/* @__PURE__ */ a("button", {
315
+ /* @__PURE__ */ s("div", {
316
+ style: c.formActions,
317
+ children: [/* @__PURE__ */ o("button", {
317
318
  type: "button",
318
- onClick: c,
319
- style: s.cancelButton,
320
- children: "Cancel"
321
- }), /* @__PURE__ */ a("button", {
319
+ onClick: l,
320
+ style: c.cancelButton,
321
+ children: d("bigconsole.widget.webhookConfig.cancel", "Cancel")
322
+ }), /* @__PURE__ */ o("button", {
322
323
  type: "submit",
323
- disabled: l,
324
- style: s.saveButton,
325
- children: l ? "Saving..." : e ? "Update Webhook" : "Create Webhook"
324
+ disabled: u,
325
+ style: c.saveButton,
326
+ children: u ? d("bigconsole.widget.webhookConfig.saving", "Saving...") : e ? d("bigconsole.widget.webhookConfig.updateWebhook", "Update Webhook") : d("bigconsole.widget.webhookConfig.createWebhook", "Create Webhook")
326
327
  })]
327
328
  })
328
329
  ]
329
330
  });
330
- }), l = t(function({ webhook: e, onEdit: t, onDelete: n, onToggle: r, onTest: c, testResult: l, testing: u }) {
331
- return /* @__PURE__ */ o("div", {
332
- style: s.webhookCard,
331
+ }), u = t(function({ webhook: e, onEdit: t, onDelete: n, onToggle: r, onTest: l, testResult: u, testing: d }) {
332
+ let { t: f } = i();
333
+ return /* @__PURE__ */ s("div", {
334
+ style: c.webhookCard,
333
335
  children: [
334
- /* @__PURE__ */ a("div", {
335
- style: s.webhookHeader,
336
- children: /* @__PURE__ */ o("div", {
337
- style: s.webhookTitle,
336
+ /* @__PURE__ */ o("div", {
337
+ style: c.webhookHeader,
338
+ children: /* @__PURE__ */ s("div", {
339
+ style: c.webhookTitle,
338
340
  children: [
339
- /* @__PURE__ */ a("span", {
341
+ /* @__PURE__ */ o("span", {
340
342
  style: { fontSize: "16px" },
341
343
  children: "📡"
342
344
  }),
343
- /* @__PURE__ */ a("span", {
344
- style: s.webhookName,
345
+ /* @__PURE__ */ o("span", {
346
+ style: c.webhookName,
345
347
  children: e.eventPattern
346
348
  }),
347
- /* @__PURE__ */ a("span", {
349
+ /* @__PURE__ */ o("span", {
348
350
  style: {
349
- ...s.statusBadge,
350
- ...e.isActive ? s.activeBadge : s.inactiveBadge
351
+ ...c.statusBadge,
352
+ ...e.isActive ? c.activeBadge : c.inactiveBadge
351
353
  },
352
- children: e.isActive ? "Active" : "Inactive"
354
+ children: e.isActive ? f("bigconsole.widget.webhookConfig.active", "Active") : f("bigconsole.widget.webhookConfig.inactive", "Inactive")
353
355
  })
354
356
  ]
355
357
  })
356
358
  }),
357
- /* @__PURE__ */ o("div", {
358
- style: s.webhookDetails,
359
- children: ["Method: ", /* @__PURE__ */ a("strong", { children: e.method })]
359
+ /* @__PURE__ */ s("div", {
360
+ style: c.webhookDetails,
361
+ children: [
362
+ f("bigconsole.widget.webhookConfig.methodLabel", "Method:"),
363
+ " ",
364
+ /* @__PURE__ */ o("strong", { children: e.method })
365
+ ]
360
366
  }),
361
- /* @__PURE__ */ a("div", {
362
- style: s.webhookUrl,
367
+ /* @__PURE__ */ o("div", {
368
+ style: c.webhookUrl,
363
369
  children: e.webhookUrl
364
370
  }),
365
- l && /* @__PURE__ */ a("div", {
371
+ u && /* @__PURE__ */ o("div", {
366
372
  style: {
367
- ...s.testResult,
368
- ...l.success ? s.testSuccess : s.testFailure
373
+ ...c.testResult,
374
+ ...u.success ? c.testSuccess : c.testFailure
369
375
  },
370
- children: l.success ? /* @__PURE__ */ o(i, { children: [
371
- "✅ Test successful! Status: ",
372
- l.statusCode,
373
- ", Latency: ",
374
- l.latencyMs,
375
- "ms"
376
- ] }) : /* @__PURE__ */ o(i, { children: ["❌ Test failed: ", l.errorMessage || "Unknown error"] })
376
+ children: u.success ? /* @__PURE__ */ o(a, { children: f("bigconsole.widget.webhookConfig.testSuccess", "✅ Test successful! Status: {{statusCode}}, Latency: {{latencyMs}}ms", {
377
+ statusCode: u.statusCode ?? "",
378
+ latencyMs: u.latencyMs ?? ""
379
+ }) }) : /* @__PURE__ */ o(a, { children: f("bigconsole.widget.webhookConfig.testFailure", "❌ Test failed: {{error}}", { error: u.errorMessage || f("bigconsole.widget.webhookConfig.unknownError", "Unknown error") }) })
377
380
  }),
378
- /* @__PURE__ */ o("div", {
379
- style: s.webhookActions,
381
+ /* @__PURE__ */ s("div", {
382
+ style: c.webhookActions,
380
383
  children: [
381
- /* @__PURE__ */ a("button", {
384
+ /* @__PURE__ */ o("button", {
382
385
  onClick: t,
383
386
  style: {
384
- ...s.actionButton,
385
- ...s.editButton
387
+ ...c.actionButton,
388
+ ...c.editButton
386
389
  },
387
- children: "Edit"
390
+ children: f("bigconsole.widget.webhookConfig.edit", "Edit")
388
391
  }),
389
- /* @__PURE__ */ a("button", {
390
- onClick: c,
391
- disabled: u,
392
+ /* @__PURE__ */ o("button", {
393
+ onClick: l,
394
+ disabled: d,
392
395
  style: {
393
- ...s.actionButton,
394
- ...s.testButton
396
+ ...c.actionButton,
397
+ ...c.testButton
395
398
  },
396
- children: u ? "Testing..." : "Test"
399
+ children: d ? f("bigconsole.widget.webhookConfig.testing", "Testing...") : f("bigconsole.widget.webhookConfig.test", "Test")
397
400
  }),
398
- /* @__PURE__ */ a("button", {
401
+ /* @__PURE__ */ o("button", {
399
402
  onClick: r,
400
403
  style: {
401
- ...s.actionButton,
402
- ...s.toggleButton
404
+ ...c.actionButton,
405
+ ...c.toggleButton
403
406
  },
404
- children: e.isActive ? "Disable" : "Enable"
407
+ children: e.isActive ? f("bigconsole.widget.webhookConfig.disable", "Disable") : f("bigconsole.widget.webhookConfig.enable", "Enable")
405
408
  }),
406
- /* @__PURE__ */ a("button", {
409
+ /* @__PURE__ */ o("button", {
407
410
  onClick: n,
408
411
  style: {
409
- ...s.actionButton,
410
- ...s.deleteButton
412
+ ...c.actionButton,
413
+ ...c.deleteButton
411
414
  },
412
- children: "Delete"
415
+ children: f("bigconsole.widget.webhookConfig.delete", "Delete")
413
416
  })
414
417
  ]
415
418
  })
416
419
  ]
417
420
  });
418
- }), u = t(function({ dashboardId: t, widgetId: i, onWebhookCreated: u, onWebhookDeleted: d }) {
419
- let [f, p] = r(!1), [m, h] = r(null), [g, _] = r({}), [v, y] = r(null), { webhooks: b, loading: x, createWebhook: S, updateWebhook: C, deleteWebhook: w, toggleWebhook: T, testWebhook: E } = e({
421
+ }), d = t(function({ dashboardId: t, widgetId: a, onWebhookCreated: d, onWebhookDeleted: f }) {
422
+ let { t: p } = i(), [m, h] = r(!1), [g, _] = r(null), [v, y] = r({}), [b, x] = r(null), { webhooks: S, loading: C, createWebhook: w, updateWebhook: T, deleteWebhook: E, toggleWebhook: D, testWebhook: O } = e({
420
423
  dashboardId: t,
421
- widgetId: i
422
- }), D = n(async (e) => {
423
- if ("id" in e) await C(e) && (h(null), p(!1));
424
+ widgetId: a
425
+ }), k = n(async (e) => {
426
+ if ("id" in e) await T(e) && (_(null), h(!1));
424
427
  else {
425
- let t = await S(e);
426
- t && (p(!1), u?.(t));
428
+ let t = await w(e);
429
+ t && (h(!1), d?.(t));
427
430
  }
428
431
  }, [
429
- S,
430
- C,
431
- u
432
- ]), O = n(async (e) => {
433
- confirm("Are you sure you want to delete this webhook?") && await w(e) && d?.(e);
434
- }, [w, d]), k = n(async (e) => {
435
- await T(e.id, !e.isActive);
436
- }, [T]), A = n(async (e) => {
437
- y(e);
438
- let t = await E(e);
439
- _((n) => ({
432
+ w,
433
+ T,
434
+ d
435
+ ]), A = n(async (e) => {
436
+ confirm(p("bigconsole.widget.webhookConfig.deleteConfirm", "Are you sure you want to delete this webhook?")) && await E(e) && f?.(e);
437
+ }, [
438
+ E,
439
+ f,
440
+ p
441
+ ]), j = n(async (e) => {
442
+ await D(e.id, !e.isActive);
443
+ }, [D]), M = n(async (e) => {
444
+ x(e);
445
+ let t = await O(e);
446
+ y((n) => ({
440
447
  ...n,
441
448
  [e]: t
442
- })), y(null);
443
- }, [E]), j = n((e) => {
444
- h(e), p(!0);
445
- }, []), M = n(() => {
446
- p(!1), h(null);
449
+ })), x(null);
450
+ }, [O]), N = n((e) => {
451
+ _(e), h(!0);
452
+ }, []), P = n(() => {
453
+ h(!1), _(null);
447
454
  }, []);
448
- return /* @__PURE__ */ o("div", {
449
- style: s.container,
455
+ return /* @__PURE__ */ s("div", {
456
+ style: c.container,
450
457
  children: [
451
- /* @__PURE__ */ o("div", {
452
- style: s.header,
453
- children: [/* @__PURE__ */ a("h3", {
454
- style: s.title,
455
- children: "Webhook Configuration"
456
- }), !f && /* @__PURE__ */ a("button", {
457
- onClick: () => p(!0),
458
- style: s.addButton,
459
- children: "+ Add Webhook"
458
+ /* @__PURE__ */ s("div", {
459
+ style: c.header,
460
+ children: [/* @__PURE__ */ o("h3", {
461
+ style: c.title,
462
+ children: p("bigconsole.widget.webhookConfig.title", "Webhook Configuration")
463
+ }), !m && /* @__PURE__ */ o("button", {
464
+ onClick: () => h(!0),
465
+ style: c.addButton,
466
+ children: p("bigconsole.widget.webhookConfig.addWebhook", "+ Add Webhook")
460
467
  })]
461
468
  }),
462
- f && /* @__PURE__ */ a(c, {
463
- webhook: m || void 0,
469
+ m && /* @__PURE__ */ o(l, {
470
+ webhook: g || void 0,
464
471
  dashboardId: t,
465
- widgetId: i,
466
- onSave: D,
467
- onCancel: M,
468
- loading: x
472
+ widgetId: a,
473
+ onSave: k,
474
+ onCancel: P,
475
+ loading: C
469
476
  }),
470
- x && b.length === 0 ? /* @__PURE__ */ a("div", {
471
- style: s.emptyState,
472
- children: "Loading..."
473
- }) : b.length === 0 ? /* @__PURE__ */ o("div", {
474
- style: s.emptyState,
475
- children: [/* @__PURE__ */ a("p", { children: "No webhooks configured" }), /* @__PURE__ */ a("p", {
477
+ C && S.length === 0 ? /* @__PURE__ */ o("div", {
478
+ style: c.emptyState,
479
+ children: p("bigconsole.widget.webhookConfig.loading", "Loading...")
480
+ }) : S.length === 0 ? /* @__PURE__ */ s("div", {
481
+ style: c.emptyState,
482
+ children: [/* @__PURE__ */ o("p", { children: p("bigconsole.widget.webhookConfig.noWebhooks", "No webhooks configured") }), /* @__PURE__ */ o("p", {
476
483
  style: {
477
484
  fontSize: "13px",
478
485
  marginTop: "8px"
479
486
  },
480
- children: "Add a webhook to receive events when actions are triggered."
487
+ children: p("bigconsole.widget.webhookConfig.noWebhooksHelp", "Add a webhook to receive events when actions are triggered.")
481
488
  })]
482
- }) : /* @__PURE__ */ a("div", {
483
- style: s.webhookList,
484
- children: b.map((e) => /* @__PURE__ */ a(l, {
489
+ }) : /* @__PURE__ */ o("div", {
490
+ style: c.webhookList,
491
+ children: S.map((e) => /* @__PURE__ */ o(u, {
485
492
  webhook: e,
486
- onEdit: () => j(e),
487
- onDelete: () => O(e.id),
488
- onToggle: () => k(e),
489
- onTest: () => A(e.id),
490
- testResult: g[e.id],
491
- testing: v === e.id
493
+ onEdit: () => N(e),
494
+ onDelete: () => A(e.id),
495
+ onToggle: () => j(e),
496
+ onTest: () => M(e.id),
497
+ testResult: v[e.id],
498
+ testing: b === e.id
492
499
  }, e.id))
493
500
  })
494
501
  ]
495
502
  });
496
503
  });
497
504
  //#endregion
498
- export { u as default };
505
+ export { d as default };
499
506
 
500
507
  //# sourceMappingURL=WebhookConfigPanel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WebhookConfigPanel.js","names":[],"sources":["../../../../../src/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.tsx"],"sourcesContent":["/**\n * WebhookConfigPanel Component (v2.0)\n *\n * Panel for managing event webhook mappings.\n * Allows creating, editing, testing, and deleting webhooks.\n */\n\nimport React, { memo, useState, useCallback } from 'react';\nimport {\n useEventWebhooks,\n type HttpMethod,\n type EventWebhookMapping,\n type CreateEventWebhookMappingInput,\n type UpdateEventWebhookMappingInput,\n type WebhookTestResult,\n} from '../../../hooks/useEventWebhooks';\n\n// ============================================================================\n// Types\n// ============================================================================\n\nexport interface WebhookConfigPanelProps {\n /** Dashboard ID for webhook scope */\n dashboardId?: string;\n /** Widget ID for webhook scope */\n widgetId?: string;\n /** Callback when webhook is created */\n onWebhookCreated?: (webhook: EventWebhookMapping) => void;\n /** Callback when webhook is deleted */\n onWebhookDeleted?: (id: string) => void;\n}\n\n// ============================================================================\n// Styles\n// ============================================================================\n\nconst styles = {\n container: {\n padding: '16px',\n backgroundColor: 'var(--color-bg-surface)',\n borderRadius: '8px',\n } as React.CSSProperties,\n header: {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n marginBottom: '16px',\n } as React.CSSProperties,\n title: {\n fontSize: '16px',\n fontWeight: 600,\n color: 'var(--color-text-primary)',\n margin: 0,\n } as React.CSSProperties,\n addButton: {\n padding: '8px 16px',\n backgroundColor: 'var(--color-action-primary-bg)',\n color: 'var(--color-text-inverse)',\n border: 'none',\n borderRadius: '6px',\n fontSize: '14px',\n fontWeight: 500,\n cursor: 'pointer',\n } as React.CSSProperties,\n webhookList: {\n display: 'flex',\n flexDirection: 'column',\n gap: '12px',\n } as React.CSSProperties,\n webhookCard: {\n padding: '16px',\n backgroundColor: 'var(--color-bg-subtle)',\n borderRadius: '8px',\n border: '1px solid var(--color-border-subtle)',\n } as React.CSSProperties,\n webhookHeader: {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'flex-start',\n marginBottom: '8px',\n } as React.CSSProperties,\n webhookTitle: {\n display: 'flex',\n alignItems: 'center',\n gap: '8px',\n } as React.CSSProperties,\n webhookName: {\n fontSize: '14px',\n fontWeight: 600,\n color: 'var(--color-text-primary)',\n } as React.CSSProperties,\n statusBadge: {\n padding: '2px 8px',\n borderRadius: '12px',\n fontSize: '12px',\n fontWeight: 500,\n } as React.CSSProperties,\n activeBadge: {\n backgroundColor: 'var(--color-status-success-bgSubtle)',\n color: 'var(--color-status-success-text)',\n } as React.CSSProperties,\n inactiveBadge: {\n backgroundColor: 'var(--color-status-warning-bgSubtle)',\n color: 'var(--color-status-warning-text)',\n } as React.CSSProperties,\n webhookDetails: {\n fontSize: '13px',\n color: 'var(--color-text-muted)',\n marginBottom: '4px',\n } as React.CSSProperties,\n webhookUrl: {\n fontSize: '12px',\n color: 'var(--color-text-placeholder)',\n fontFamily: 'monospace',\n wordBreak: 'break-all',\n } as React.CSSProperties,\n webhookActions: {\n display: 'flex',\n gap: '8px',\n marginTop: '12px',\n } as React.CSSProperties,\n actionButton: {\n padding: '6px 12px',\n fontSize: '12px',\n fontWeight: 500,\n borderRadius: '4px',\n border: 'none',\n cursor: 'pointer',\n } as React.CSSProperties,\n editButton: {\n backgroundColor: 'var(--color-bg-sunken)',\n color: 'var(--color-text-primary)',\n } as React.CSSProperties,\n testButton: {\n backgroundColor: 'var(--color-status-info-bgSubtle)',\n color: 'var(--color-status-info-text)',\n } as React.CSSProperties,\n deleteButton: {\n backgroundColor: 'var(--color-status-error-bgSubtle)',\n color: 'var(--color-status-error-text)',\n } as React.CSSProperties,\n toggleButton: {\n backgroundColor: 'var(--color-bg-sunken)',\n color: 'var(--color-text-muted)',\n } as React.CSSProperties,\n emptyState: {\n textAlign: 'center',\n padding: '32px',\n color: 'var(--color-text-placeholder)',\n } as React.CSSProperties,\n form: {\n padding: '16px',\n backgroundColor: 'var(--color-bg-subtle)',\n borderRadius: '8px',\n marginBottom: '16px',\n } as React.CSSProperties,\n formGroup: {\n marginBottom: '12px',\n } as React.CSSProperties,\n label: {\n display: 'block',\n fontSize: '13px',\n fontWeight: 500,\n color: 'var(--color-text-primary)',\n marginBottom: '4px',\n } as React.CSSProperties,\n input: {\n width: '100%',\n padding: '8px 12px',\n fontSize: '14px',\n border: '1px solid var(--color-border-default)',\n borderRadius: '6px',\n boxSizing: 'border-box',\n } as React.CSSProperties,\n select: {\n width: '100%',\n padding: '8px 12px',\n fontSize: '14px',\n border: '1px solid var(--color-border-default)',\n borderRadius: '6px',\n boxSizing: 'border-box',\n backgroundColor: 'var(--color-bg-surface)',\n } as React.CSSProperties,\n textarea: {\n width: '100%',\n padding: '8px 12px',\n fontSize: '14px',\n border: '1px solid var(--color-border-default)',\n borderRadius: '6px',\n boxSizing: 'border-box',\n fontFamily: 'monospace',\n minHeight: '80px',\n resize: 'vertical',\n } as React.CSSProperties,\n formActions: {\n display: 'flex',\n gap: '8px',\n justifyContent: 'flex-end',\n marginTop: '16px',\n } as React.CSSProperties,\n cancelButton: {\n padding: '8px 16px',\n backgroundColor: 'var(--color-bg-sunken)',\n color: 'var(--color-text-primary)',\n border: 'none',\n borderRadius: '6px',\n fontSize: '14px',\n cursor: 'pointer',\n } as React.CSSProperties,\n saveButton: {\n padding: '8px 16px',\n backgroundColor: 'var(--color-action-primary-bg)',\n color: 'var(--color-text-inverse)',\n border: 'none',\n borderRadius: '6px',\n fontSize: '14px',\n fontWeight: 500,\n cursor: 'pointer',\n } as React.CSSProperties,\n testResult: {\n marginTop: '12px',\n padding: '12px',\n borderRadius: '6px',\n fontSize: '13px',\n } as React.CSSProperties,\n testSuccess: {\n backgroundColor: 'var(--color-status-success-bgSubtle)',\n color: 'var(--color-status-success-text)',\n } as React.CSSProperties,\n testFailure: {\n backgroundColor: 'var(--color-status-error-bgSubtle)',\n color: 'var(--color-status-error-text)',\n } as React.CSSProperties,\n helpText: {\n fontSize: '12px',\n color: 'var(--color-text-placeholder)',\n marginTop: '4px',\n } as React.CSSProperties,\n};\n\n// ============================================================================\n// Webhook Form Component\n// ============================================================================\n\ninterface WebhookFormProps {\n webhook?: EventWebhookMapping;\n dashboardId?: string;\n widgetId?: string;\n onSave: (data: CreateEventWebhookMappingInput | UpdateEventWebhookMappingInput) => Promise<void>;\n onCancel: () => void;\n loading?: boolean;\n}\n\nconst WebhookForm: React.FC<WebhookFormProps> = memo(function WebhookForm({\n webhook,\n dashboardId,\n widgetId,\n onSave,\n onCancel,\n loading,\n}) {\n const [eventPattern, setEventPattern] = useState(webhook?.eventPattern || 'widget:*:clicked');\n const [webhookUrl, setWebhookUrl] = useState(webhook?.webhookUrl || '');\n const [method, setMethod] = useState(webhook?.method || 'POST');\n const [headers, setHeaders] = useState(webhook?.headers ? JSON.stringify(webhook.headers, null, 2) : '');\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n\n let parsedHeaders: Record<string, string> | undefined;\n if (headers.trim()) {\n try {\n parsedHeaders = JSON.parse(headers);\n } catch {\n alert('Invalid JSON in headers field');\n return;\n }\n }\n\n if (webhook) {\n // Update\n await onSave({\n id: webhook.id,\n eventPattern,\n webhookUrl,\n method: method as 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE',\n headers: parsedHeaders || null,\n });\n } else {\n // Create\n await onSave({\n dashboardId,\n widgetId,\n eventPattern,\n webhookUrl,\n method: method as 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE',\n headers: parsedHeaders,\n });\n }\n };\n\n return (\n <form style={styles.form} onSubmit={handleSubmit}>\n <div style={styles.formGroup}>\n <label style={styles.label}>Event Pattern *</label>\n <input\n type=\"text\"\n value={eventPattern}\n onChange={(e) => setEventPattern(e.target.value)}\n placeholder=\"widget:*:clicked\"\n style={styles.input}\n required\n />\n <p style={styles.helpText}>Use * as wildcard. Examples: widget:*:clicked, *:submit, button:save:*</p>\n </div>\n\n <div style={styles.formGroup}>\n <label style={styles.label}>Webhook URL *</label>\n <input\n type=\"url\"\n value={webhookUrl}\n onChange={(e) => setWebhookUrl(e.target.value)}\n placeholder=\"https://your-api.com/webhooks/bigconsole\"\n style={styles.input}\n required\n />\n </div>\n\n <div style={styles.formGroup}>\n <label style={styles.label}>HTTP Method</label>\n <select value={method} onChange={(e) => setMethod(e.target.value as HttpMethod)} style={styles.select}>\n <option value=\"POST\">POST</option>\n <option value=\"PUT\">PUT</option>\n <option value=\"PATCH\">PATCH</option>\n <option value=\"GET\">GET</option>\n <option value=\"DELETE\">DELETE</option>\n </select>\n </div>\n\n <div style={styles.formGroup}>\n <label style={styles.label}>Custom Headers (JSON)</label>\n <textarea\n value={headers}\n onChange={(e) => setHeaders(e.target.value)}\n placeholder={'{\\n \"Authorization\": \"Bearer your-token\"\\n}'}\n style={styles.textarea as React.CSSProperties}\n />\n </div>\n\n <div style={styles.formActions}>\n <button type=\"button\" onClick={onCancel} style={styles.cancelButton}>\n Cancel\n </button>\n <button type=\"submit\" disabled={loading} style={styles.saveButton}>\n {loading ? 'Saving...' : webhook ? 'Update Webhook' : 'Create Webhook'}\n </button>\n </div>\n </form>\n );\n});\n\n// ============================================================================\n// Webhook Card Component\n// ============================================================================\n\ninterface WebhookCardProps {\n webhook: EventWebhookMapping;\n onEdit: () => void;\n onDelete: () => void;\n onToggle: () => void;\n onTest: () => void;\n testResult?: WebhookTestResult | null;\n testing?: boolean;\n}\n\nconst WebhookCard: React.FC<WebhookCardProps> = memo(function WebhookCard({\n webhook,\n onEdit,\n onDelete,\n onToggle,\n onTest,\n testResult,\n testing,\n}) {\n return (\n <div style={styles.webhookCard}>\n <div style={styles.webhookHeader}>\n <div style={styles.webhookTitle}>\n <span style={{ fontSize: '16px' }}>📡</span>\n <span style={styles.webhookName}>{webhook.eventPattern}</span>\n <span\n style={{\n ...styles.statusBadge,\n ...(webhook.isActive ? styles.activeBadge : styles.inactiveBadge),\n }}\n >\n {webhook.isActive ? 'Active' : 'Inactive'}\n </span>\n </div>\n </div>\n\n <div style={styles.webhookDetails}>\n Method: <strong>{webhook.method}</strong>\n </div>\n <div style={styles.webhookUrl}>{webhook.webhookUrl}</div>\n\n {testResult && (\n <div\n style={{\n ...styles.testResult,\n ...(testResult.success ? styles.testSuccess : styles.testFailure),\n }}\n >\n {testResult.success ? (\n <>\n ✅ Test successful! Status: {testResult.statusCode}, Latency: {testResult.latencyMs}ms\n </>\n ) : (\n <>❌ Test failed: {testResult.errorMessage || 'Unknown error'}</>\n )}\n </div>\n )}\n\n <div style={styles.webhookActions}>\n <button onClick={onEdit} style={{ ...styles.actionButton, ...styles.editButton }}>\n Edit\n </button>\n <button onClick={onTest} disabled={testing} style={{ ...styles.actionButton, ...styles.testButton }}>\n {testing ? 'Testing...' : 'Test'}\n </button>\n <button onClick={onToggle} style={{ ...styles.actionButton, ...styles.toggleButton }}>\n {webhook.isActive ? 'Disable' : 'Enable'}\n </button>\n <button onClick={onDelete} style={{ ...styles.actionButton, ...styles.deleteButton }}>\n Delete\n </button>\n </div>\n </div>\n );\n});\n\n// ============================================================================\n// Main Component\n// ============================================================================\n\nexport const WebhookConfigPanel: React.FC<WebhookConfigPanelProps> = memo(function WebhookConfigPanel({\n dashboardId,\n widgetId,\n onWebhookCreated,\n onWebhookDeleted,\n}) {\n const [showForm, setShowForm] = useState(false);\n const [editingWebhook, setEditingWebhook] = useState<EventWebhookMapping | null>(null);\n const [testResults, setTestResults] = useState<Record<string, WebhookTestResult | null>>({});\n const [testingId, setTestingId] = useState<string | null>(null);\n\n const { webhooks, loading, createWebhook, updateWebhook, deleteWebhook, toggleWebhook, testWebhook } =\n useEventWebhooks({ dashboardId, widgetId });\n\n const handleSave = useCallback(\n async (data: CreateEventWebhookMappingInput | UpdateEventWebhookMappingInput) => {\n if ('id' in data) {\n const result = await updateWebhook(data);\n if (result) {\n setEditingWebhook(null);\n setShowForm(false);\n }\n } else {\n const result = await createWebhook(data);\n if (result) {\n setShowForm(false);\n onWebhookCreated?.(result);\n }\n }\n },\n [createWebhook, updateWebhook, onWebhookCreated]\n );\n\n const handleDelete = useCallback(\n async (id: string) => {\n if (confirm('Are you sure you want to delete this webhook?')) {\n const success = await deleteWebhook(id);\n if (success) {\n onWebhookDeleted?.(id);\n }\n }\n },\n [deleteWebhook, onWebhookDeleted]\n );\n\n const handleToggle = useCallback(\n async (webhook: EventWebhookMapping) => {\n await toggleWebhook(webhook.id, !webhook.isActive);\n },\n [toggleWebhook]\n );\n\n const handleTest = useCallback(\n async (id: string) => {\n setTestingId(id);\n const result = await testWebhook(id);\n setTestResults((prev) => ({ ...prev, [id]: result }));\n setTestingId(null);\n },\n [testWebhook]\n );\n\n const handleEdit = useCallback((webhook: EventWebhookMapping) => {\n setEditingWebhook(webhook);\n setShowForm(true);\n }, []);\n\n const handleCancel = useCallback(() => {\n setShowForm(false);\n setEditingWebhook(null);\n }, []);\n\n return (\n <div style={styles.container}>\n <div style={styles.header}>\n <h3 style={styles.title}>Webhook Configuration</h3>\n {!showForm && (\n <button onClick={() => setShowForm(true)} style={styles.addButton}>\n + Add Webhook\n </button>\n )}\n </div>\n\n {showForm && (\n <WebhookForm\n webhook={editingWebhook || undefined}\n dashboardId={dashboardId}\n widgetId={widgetId}\n onSave={handleSave}\n onCancel={handleCancel}\n loading={loading}\n />\n )}\n\n {loading && webhooks.length === 0 ? (\n <div style={styles.emptyState}>Loading...</div>\n ) : webhooks.length === 0 ? (\n <div style={styles.emptyState}>\n <p>No webhooks configured</p>\n <p style={{ fontSize: '13px', marginTop: '8px' }}>\n Add a webhook to receive events when actions are triggered.\n </p>\n </div>\n ) : (\n <div style={styles.webhookList as React.CSSProperties}>\n {webhooks.map((webhook) => (\n <WebhookCard\n key={webhook.id}\n webhook={webhook}\n onEdit={() => handleEdit(webhook)}\n onDelete={() => handleDelete(webhook.id)}\n onToggle={() => handleToggle(webhook)}\n onTest={() => handleTest(webhook.id)}\n testResult={testResults[webhook.id]}\n testing={testingId === webhook.id}\n />\n ))}\n </div>\n )}\n </div>\n );\n});\n\nexport default WebhookConfigPanel;\n"],"mappings":";;;;AAoCA,IAAM,IAAS;CACb,WAAW;EACT,SA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AAG,0BAA0B,CAAA,EAC7B,kBAAC,KAAD;KAAG,OAAO;MAAE,UAAU;MAAQ,WAAW;MAAO;eAAE;KAE9C,CAAA,CACA;QAEN,kBAAC,OAAD;IAAK,OAAO,EAAO;cAChB,EAAS,KAAK,MACb,kBAAC,GAAD;KAEW;KACT,cAAc,EAAW,EAAQ;KACjC,gBAAgB,EAAa,EAAQ,GAAG;KACxC,gBAAgB,EAAa,EAAQ;KACrC,cAAc,EAAW,EAAQ,GAAG;KACpC,YAAY,EAAY,EAAQ;KAChC,SAAS,MAAc,EAAQ;KAC/B,EARK,EAAQ,GAQb,CACF;IACE,CAAA;GAEJ;;EAER"}
1
+ {"version":3,"file":"WebhookConfigPanel.js","names":[],"sources":["../../../../../src/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.tsx"],"sourcesContent":["/**\n * WebhookConfigPanel Component (v2.0)\n *\n * Panel for managing event webhook mappings.\n * Allows creating, editing, testing, and deleting webhooks.\n */\n\nimport React, { memo, useState, useCallback } from 'react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n useEventWebhooks,\n type HttpMethod,\n type EventWebhookMapping,\n type CreateEventWebhookMappingInput,\n type UpdateEventWebhookMappingInput,\n type WebhookTestResult,\n} from '../../../hooks/useEventWebhooks';\n\n// ============================================================================\n// Types\n// ============================================================================\n\nexport interface WebhookConfigPanelProps {\n /** Dashboard ID for webhook scope */\n dashboardId?: string;\n /** Widget ID for webhook scope */\n widgetId?: string;\n /** Callback when webhook is created */\n onWebhookCreated?: (webhook: EventWebhookMapping) => void;\n /** Callback when webhook is deleted */\n onWebhookDeleted?: (id: string) => void;\n}\n\n// ============================================================================\n// Styles\n// ============================================================================\n\nconst styles = {\n container: {\n padding: '16px',\n backgroundColor: 'var(--color-bg-surface)',\n borderRadius: '8px',\n } as React.CSSProperties,\n header: {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n marginBottom: '16px',\n } as React.CSSProperties,\n title: {\n fontSize: '16px',\n fontWeight: 600,\n color: 'var(--color-text-primary)',\n margin: 0,\n } as React.CSSProperties,\n addButton: {\n padding: '8px 16px',\n backgroundColor: 'var(--color-action-primary-bg)',\n color: 'var(--color-text-inverse)',\n border: 'none',\n borderRadius: '6px',\n fontSize: '14px',\n fontWeight: 500,\n cursor: 'pointer',\n } as React.CSSProperties,\n webhookList: {\n display: 'flex',\n flexDirection: 'column',\n gap: '12px',\n } as React.CSSProperties,\n webhookCard: {\n padding: '16px',\n backgroundColor: 'var(--color-bg-subtle)',\n borderRadius: '8px',\n border: '1px solid var(--color-border-subtle)',\n } as React.CSSProperties,\n webhookHeader: {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'flex-start',\n marginBottom: '8px',\n } as React.CSSProperties,\n webhookTitle: {\n display: 'flex',\n alignItems: 'center',\n gap: '8px',\n } as React.CSSProperties,\n webhookName: {\n fontSize: '14px',\n fontWeight: 600,\n color: 'var(--color-text-primary)',\n } as React.CSSProperties,\n statusBadge: {\n padding: '2px 8px',\n borderRadius: '12px',\n fontSize: '12px',\n fontWeight: 500,\n } as React.CSSProperties,\n activeBadge: {\n backgroundColor: 'var(--color-status-success-bgSubtle)',\n color: 'var(--color-status-success-text)',\n } as React.CSSProperties,\n inactiveBadge: {\n backgroundColor: 'var(--color-status-warning-bgSubtle)',\n color: 'var(--color-status-warning-text)',\n } as React.CSSProperties,\n webhookDetails: {\n fontSize: '13px',\n color: 'var(--color-text-muted)',\n marginBottom: '4px',\n } as React.CSSProperties,\n webhookUrl: {\n fontSize: '12px',\n color: 'var(--color-text-placeholder)',\n fontFamily: 'monospace',\n wordBreak: 'break-all',\n } as React.CSSProperties,\n webhookActions: {\n display: 'flex',\n gap: '8px',\n marginTop: '12px',\n } as React.CSSProperties,\n actionButton: {\n padding: '6px 12px',\n fontSize: '12px',\n fontWeight: 500,\n borderRadius: '4px',\n border: 'none',\n cursor: 'pointer',\n } as React.CSSProperties,\n editButton: {\n backgroundColor: 'var(--color-bg-sunken)',\n color: 'var(--color-text-primary)',\n } as React.CSSProperties,\n testButton: {\n backgroundColor: 'var(--color-status-info-bgSubtle)',\n color: 'var(--color-status-info-text)',\n } as React.CSSProperties,\n deleteButton: {\n backgroundColor: 'var(--color-status-error-bgSubtle)',\n color: 'var(--color-status-error-text)',\n } as React.CSSProperties,\n toggleButton: {\n backgroundColor: 'var(--color-bg-sunken)',\n color: 'var(--color-text-muted)',\n } as React.CSSProperties,\n emptyState: {\n textAlign: 'center',\n padding: '32px',\n color: 'var(--color-text-placeholder)',\n } as React.CSSProperties,\n form: {\n padding: '16px',\n backgroundColor: 'var(--color-bg-subtle)',\n borderRadius: '8px',\n marginBottom: '16px',\n } as React.CSSProperties,\n formGroup: {\n marginBottom: '12px',\n } as React.CSSProperties,\n label: {\n display: 'block',\n fontSize: '13px',\n fontWeight: 500,\n color: 'var(--color-text-primary)',\n marginBottom: '4px',\n } as React.CSSProperties,\n input: {\n width: '100%',\n padding: '8px 12px',\n fontSize: '14px',\n border: '1px solid var(--color-border-default)',\n borderRadius: '6px',\n boxSizing: 'border-box',\n } as React.CSSProperties,\n select: {\n width: '100%',\n padding: '8px 12px',\n fontSize: '14px',\n border: '1px solid var(--color-border-default)',\n borderRadius: '6px',\n boxSizing: 'border-box',\n backgroundColor: 'var(--color-bg-surface)',\n } as React.CSSProperties,\n textarea: {\n width: '100%',\n padding: '8px 12px',\n fontSize: '14px',\n border: '1px solid var(--color-border-default)',\n borderRadius: '6px',\n boxSizing: 'border-box',\n fontFamily: 'monospace',\n minHeight: '80px',\n resize: 'vertical',\n } as React.CSSProperties,\n formActions: {\n display: 'flex',\n gap: '8px',\n justifyContent: 'flex-end',\n marginTop: '16px',\n } as React.CSSProperties,\n cancelButton: {\n padding: '8px 16px',\n backgroundColor: 'var(--color-bg-sunken)',\n color: 'var(--color-text-primary)',\n border: 'none',\n borderRadius: '6px',\n fontSize: '14px',\n cursor: 'pointer',\n } as React.CSSProperties,\n saveButton: {\n padding: '8px 16px',\n backgroundColor: 'var(--color-action-primary-bg)',\n color: 'var(--color-text-inverse)',\n border: 'none',\n borderRadius: '6px',\n fontSize: '14px',\n fontWeight: 500,\n cursor: 'pointer',\n } as React.CSSProperties,\n testResult: {\n marginTop: '12px',\n padding: '12px',\n borderRadius: '6px',\n fontSize: '13px',\n } as React.CSSProperties,\n testSuccess: {\n backgroundColor: 'var(--color-status-success-bgSubtle)',\n color: 'var(--color-status-success-text)',\n } as React.CSSProperties,\n testFailure: {\n backgroundColor: 'var(--color-status-error-bgSubtle)',\n color: 'var(--color-status-error-text)',\n } as React.CSSProperties,\n helpText: {\n fontSize: '12px',\n color: 'var(--color-text-placeholder)',\n marginTop: '4px',\n } as React.CSSProperties,\n};\n\n// ============================================================================\n// Webhook Form Component\n// ============================================================================\n\ninterface WebhookFormProps {\n webhook?: EventWebhookMapping;\n dashboardId?: string;\n widgetId?: string;\n onSave: (data: CreateEventWebhookMappingInput | UpdateEventWebhookMappingInput) => Promise<void>;\n onCancel: () => void;\n loading?: boolean;\n}\n\nconst WebhookForm: React.FC<WebhookFormProps> = memo(function WebhookForm({\n webhook,\n dashboardId,\n widgetId,\n onSave,\n onCancel,\n loading,\n}) {\n const { t } = useI18n();\n const [eventPattern, setEventPattern] = useState(webhook?.eventPattern || 'widget:*:clicked');\n const [webhookUrl, setWebhookUrl] = useState(webhook?.webhookUrl || '');\n const [method, setMethod] = useState(webhook?.method || 'POST');\n const [headers, setHeaders] = useState(webhook?.headers ? JSON.stringify(webhook.headers, null, 2) : '');\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n\n let parsedHeaders: Record<string, string> | undefined;\n if (headers.trim()) {\n try {\n parsedHeaders = JSON.parse(headers);\n } catch {\n alert(t('bigconsole.widget.webhookConfig.invalidJson', 'Invalid JSON in headers field'));\n return;\n }\n }\n\n if (webhook) {\n // Update\n await onSave({\n id: webhook.id,\n eventPattern,\n webhookUrl,\n method: method as 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE',\n headers: parsedHeaders || null,\n });\n } else {\n // Create\n await onSave({\n dashboardId,\n widgetId,\n eventPattern,\n webhookUrl,\n method: method as 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE',\n headers: parsedHeaders,\n });\n }\n };\n\n return (\n <form style={styles.form} onSubmit={handleSubmit}>\n <div style={styles.formGroup}>\n <label style={styles.label}>{t('bigconsole.widget.webhookConfig.eventPatternLabel', 'Event Pattern *')}</label>\n <input\n type=\"text\"\n value={eventPattern}\n onChange={(e) => setEventPattern(e.target.value)}\n placeholder=\"widget:*:clicked\"\n style={styles.input}\n required\n />\n <p style={styles.helpText}>\n {t(\n 'bigconsole.widget.webhookConfig.eventPatternHelp',\n 'Use * as wildcard. Examples: widget:*:clicked, *:submit, button:save:*'\n )}\n </p>\n </div>\n\n <div style={styles.formGroup}>\n <label style={styles.label}>{t('bigconsole.widget.webhookConfig.webhookUrlLabel', 'Webhook URL *')}</label>\n <input\n type=\"url\"\n value={webhookUrl}\n onChange={(e) => setWebhookUrl(e.target.value)}\n placeholder=\"https://your-api.com/webhooks/bigconsole\"\n style={styles.input}\n required\n />\n </div>\n\n <div style={styles.formGroup}>\n <label style={styles.label}>{t('bigconsole.widget.webhookConfig.httpMethodLabel', 'HTTP Method')}</label>\n <select value={method} onChange={(e) => setMethod(e.target.value as HttpMethod)} style={styles.select}>\n <option value=\"POST\">POST</option>\n <option value=\"PUT\">PUT</option>\n <option value=\"PATCH\">PATCH</option>\n <option value=\"GET\">GET</option>\n <option value=\"DELETE\">DELETE</option>\n </select>\n </div>\n\n <div style={styles.formGroup}>\n <label style={styles.label}>\n {t('bigconsole.widget.webhookConfig.customHeadersLabel', 'Custom Headers (JSON)')}\n </label>\n <textarea\n value={headers}\n onChange={(e) => setHeaders(e.target.value)}\n placeholder={'{\\n \"Authorization\": \"Bearer your-token\"\\n}'}\n style={styles.textarea as React.CSSProperties}\n />\n </div>\n\n <div style={styles.formActions}>\n <button type=\"button\" onClick={onCancel} style={styles.cancelButton}>\n {t('bigconsole.widget.webhookConfig.cancel', 'Cancel')}\n </button>\n <button type=\"submit\" disabled={loading} style={styles.saveButton}>\n {loading\n ? t('bigconsole.widget.webhookConfig.saving', 'Saving...')\n : webhook\n ? t('bigconsole.widget.webhookConfig.updateWebhook', 'Update Webhook')\n : t('bigconsole.widget.webhookConfig.createWebhook', 'Create Webhook')}\n </button>\n </div>\n </form>\n );\n});\n\n// ============================================================================\n// Webhook Card Component\n// ============================================================================\n\ninterface WebhookCardProps {\n webhook: EventWebhookMapping;\n onEdit: () => void;\n onDelete: () => void;\n onToggle: () => void;\n onTest: () => void;\n testResult?: WebhookTestResult | null;\n testing?: boolean;\n}\n\nconst WebhookCard: React.FC<WebhookCardProps> = memo(function WebhookCard({\n webhook,\n onEdit,\n onDelete,\n onToggle,\n onTest,\n testResult,\n testing,\n}) {\n const { t } = useI18n();\n return (\n <div style={styles.webhookCard}>\n <div style={styles.webhookHeader}>\n <div style={styles.webhookTitle}>\n <span style={{ fontSize: '16px' }}>📡</span>\n <span style={styles.webhookName}>{webhook.eventPattern}</span>\n <span\n style={{\n ...styles.statusBadge,\n ...(webhook.isActive ? styles.activeBadge : styles.inactiveBadge),\n }}\n >\n {webhook.isActive\n ? t('bigconsole.widget.webhookConfig.active', 'Active')\n : t('bigconsole.widget.webhookConfig.inactive', 'Inactive')}\n </span>\n </div>\n </div>\n\n <div style={styles.webhookDetails}>\n {t('bigconsole.widget.webhookConfig.methodLabel', 'Method:')} <strong>{webhook.method}</strong>\n </div>\n <div style={styles.webhookUrl}>{webhook.webhookUrl}</div>\n\n {testResult && (\n <div\n style={{\n ...styles.testResult,\n ...(testResult.success ? styles.testSuccess : styles.testFailure),\n }}\n >\n {testResult.success ? (\n <>\n {t(\n 'bigconsole.widget.webhookConfig.testSuccess',\n '✅ Test successful! Status: {{statusCode}}, Latency: {{latencyMs}}ms',\n { statusCode: testResult.statusCode ?? '', latencyMs: testResult.latencyMs ?? '' }\n )}\n </>\n ) : (\n <>\n {t('bigconsole.widget.webhookConfig.testFailure', '❌ Test failed: {{error}}', {\n error: testResult.errorMessage || t('bigconsole.widget.webhookConfig.unknownError', 'Unknown error'),\n })}\n </>\n )}\n </div>\n )}\n\n <div style={styles.webhookActions}>\n <button onClick={onEdit} style={{ ...styles.actionButton, ...styles.editButton }}>\n {t('bigconsole.widget.webhookConfig.edit', 'Edit')}\n </button>\n <button onClick={onTest} disabled={testing} style={{ ...styles.actionButton, ...styles.testButton }}>\n {testing\n ? t('bigconsole.widget.webhookConfig.testing', 'Testing...')\n : t('bigconsole.widget.webhookConfig.test', 'Test')}\n </button>\n <button onClick={onToggle} style={{ ...styles.actionButton, ...styles.toggleButton }}>\n {webhook.isActive\n ? t('bigconsole.widget.webhookConfig.disable', 'Disable')\n : t('bigconsole.widget.webhookConfig.enable', 'Enable')}\n </button>\n <button onClick={onDelete} style={{ ...styles.actionButton, ...styles.deleteButton }}>\n {t('bigconsole.widget.webhookConfig.delete', 'Delete')}\n </button>\n </div>\n </div>\n );\n});\n\n// ============================================================================\n// Main Component\n// ============================================================================\n\nexport const WebhookConfigPanel: React.FC<WebhookConfigPanelProps> = memo(function WebhookConfigPanel({\n dashboardId,\n widgetId,\n onWebhookCreated,\n onWebhookDeleted,\n}) {\n const { t } = useI18n();\n const [showForm, setShowForm] = useState(false);\n const [editingWebhook, setEditingWebhook] = useState<EventWebhookMapping | null>(null);\n const [testResults, setTestResults] = useState<Record<string, WebhookTestResult | null>>({});\n const [testingId, setTestingId] = useState<string | null>(null);\n\n const { webhooks, loading, createWebhook, updateWebhook, deleteWebhook, toggleWebhook, testWebhook } =\n useEventWebhooks({ dashboardId, widgetId });\n\n const handleSave = useCallback(\n async (data: CreateEventWebhookMappingInput | UpdateEventWebhookMappingInput) => {\n if ('id' in data) {\n const result = await updateWebhook(data);\n if (result) {\n setEditingWebhook(null);\n setShowForm(false);\n }\n } else {\n const result = await createWebhook(data);\n if (result) {\n setShowForm(false);\n onWebhookCreated?.(result);\n }\n }\n },\n [createWebhook, updateWebhook, onWebhookCreated]\n );\n\n const handleDelete = useCallback(\n async (id: string) => {\n if (\n confirm(t('bigconsole.widget.webhookConfig.deleteConfirm', 'Are you sure you want to delete this webhook?'))\n ) {\n const success = await deleteWebhook(id);\n if (success) {\n onWebhookDeleted?.(id);\n }\n }\n },\n [deleteWebhook, onWebhookDeleted, t]\n );\n\n const handleToggle = useCallback(\n async (webhook: EventWebhookMapping) => {\n await toggleWebhook(webhook.id, !webhook.isActive);\n },\n [toggleWebhook]\n );\n\n const handleTest = useCallback(\n async (id: string) => {\n setTestingId(id);\n const result = await testWebhook(id);\n setTestResults((prev) => ({ ...prev, [id]: result }));\n setTestingId(null);\n },\n [testWebhook]\n );\n\n const handleEdit = useCallback((webhook: EventWebhookMapping) => {\n setEditingWebhook(webhook);\n setShowForm(true);\n }, []);\n\n const handleCancel = useCallback(() => {\n setShowForm(false);\n setEditingWebhook(null);\n }, []);\n\n return (\n <div style={styles.container}>\n <div style={styles.header}>\n <h3 style={styles.title}>{t('bigconsole.widget.webhookConfig.title', 'Webhook Configuration')}</h3>\n {!showForm && (\n <button onClick={() => setShowForm(true)} style={styles.addButton}>\n {t('bigconsole.widget.webhookConfig.addWebhook', '+ Add Webhook')}\n </button>\n )}\n </div>\n\n {showForm && (\n <WebhookForm\n webhook={editingWebhook || undefined}\n dashboardId={dashboardId}\n widgetId={widgetId}\n onSave={handleSave}\n onCancel={handleCancel}\n loading={loading}\n />\n )}\n\n {loading && webhooks.length === 0 ? (\n <div style={styles.emptyState}>{t('bigconsole.widget.webhookConfig.loading', 'Loading...')}</div>\n ) : webhooks.length === 0 ? (\n <div style={styles.emptyState}>\n <p>{t('bigconsole.widget.webhookConfig.noWebhooks', 'No webhooks configured')}</p>\n <p style={{ fontSize: '13px', marginTop: '8px' }}>\n {t(\n 'bigconsole.widget.webhookConfig.noWebhooksHelp',\n 'Add a webhook to receive events when actions are triggered.'\n )}\n </p>\n </div>\n ) : (\n <div style={styles.webhookList as React.CSSProperties}>\n {webhooks.map((webhook) => (\n <WebhookCard\n key={webhook.id}\n webhook={webhook}\n onEdit={() => handleEdit(webhook)}\n onDelete={() => handleDelete(webhook.id)}\n onToggle={() => handleToggle(webhook)}\n onTest={() => handleTest(webhook.id)}\n testResult={testResults[webhook.id]}\n testing={testingId === webhook.id}\n />\n ))}\n </div>\n )}\n </div>\n );\n});\n\nexport default WebhookConfigPanel;\n"],"mappings":";;;;;AAqCA,IAAM,IAAS;CACb,WAAW;EACT,SAAS;EACT,iBAAiB;EACjB,cAAc;EACf;CACD,QAAQ;EACN,SAAS;EACT,gBAAgB;EAChB,YAAY;EACZ,cAAc;EACf;CACD,OAAO;EACL,UAAU;EACV,YAAY;EACZ,OAAO;EACP,QAAQ;EACT;CACD,WAAW;EACT,SAAS;EACT,iBAAiB;EACjB,OAAO;EACP,QAAQ;EACR,cAAc;EACd,UAAU;EACV,YAAY;EACZ,QAAQ;EACT;CACD,aAAa;EACX,SAAS;EACT,eAAe;EACf,KAAK;EACN;CACD,aAAa;EACX,SAAS;EACT,iBAAiB;EACjB,cAAc;EACd,QAAQ;EACT;CACD,eAAe;EACb,SAAS;EACT,gBAAgB;EAChB,YAAY;EACZ,cAAc;EACf;CACD,cAAc;EACZ,SAAS;EACT,YAAY;EACZ,KAAK;EACN;CACD,aAAa;EACX,UAAU;EACV,YAAY;EACZ,OAAO;EACR;CACD,aAAa;EACX,SAAS;EACT,cAAc;EACd,UAAU;EACV,YAAY;EACb;CACD,aAAa;EACX,iBAAiB;EACjB,OAAO;EACR;CACD,eAAe;EACb,iBAAiB;EACjB,OAAO;EACR;CACD,gBAAgB;EACd,UAAU;EACV,OAAO;EACP,cAAc;EACf;CACD,YAAY;EACV,UAAU;EACV,OAAO;EACP,YAAY;EACZ,WAAW;EACZ;CACD,gBAAgB;EACd,SAAS;EACT,KAAK;EACL,WAAW;EACZ;CACD,cAAc;EACZ,SAAS;EACT,UAAU;EACV,YAAY;EACZ,cAAc;EACd,QAAQ;EAC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