@burdenoff/microfe-bigconsole 2026.710.3 → 2026.711.2

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.
@@ -11,7 +11,7 @@ import ee from "./WidgetTypeSelector.js";
11
11
  import te from "../parser/DataSinkSelector.js";
12
12
  import ne from "../parser/ParserSelector.js";
13
13
  import { memo as c, useCallback as l, useEffect as re, useMemo as ie, useState as u } from "react";
14
- import { Code as ae, CreditCard as d, ExternalLink as f, Layout as p, MessageSquare as oe } from "lucide-react";
14
+ import { Code as ae, CreditCard as oe, ExternalLink as d, Layout as f, MessageSquare as p } from "lucide-react";
15
15
  import { Button as m, Card as se, CardDescription as ce, CardHeader as le, CardTitle as ue, Dialog as de, DialogContent as fe, DialogDescription as pe, DialogFooter as me, DialogHeader as he, DialogTitle as ge, Input as h, Label as g, Tabs as _e, TabsContent as _, TabsList as ve, TabsTrigger as ye, Textarea as v } from "@burdenoff/fe-libs/ui";
16
16
  import { Fragment as be, jsx as y, jsxs as b } from "react/jsx-runtime";
17
17
  //#region src/bigconsole/components/widgets/WidgetConfigDialog.tsx
@@ -34,26 +34,26 @@ var x = [
34
34
  "kanban",
35
35
  "timeline",
36
36
  "custom"
37
- ], S = [
37
+ ], xe = [
38
38
  {
39
39
  type: "BIGCONSOLE",
40
40
  name: "BigConsole Native",
41
41
  description: "Full-featured native widgets with all configuration options",
42
- icon: p,
42
+ icon: f,
43
43
  supportedTypes: x
44
44
  },
45
45
  {
46
46
  type: "ADAPTIVE_CARD",
47
47
  name: "Microsoft Adaptive Cards",
48
48
  description: "Use Microsoft Adaptive Cards format for Teams/Outlook integration",
49
- icon: d,
49
+ icon: oe,
50
50
  supportedTypes: x
51
51
  },
52
52
  {
53
53
  type: "BLOCKKIT",
54
54
  name: "Slack Block Kit",
55
55
  description: "Use Slack Block Kit format for Slack integration",
56
- icon: oe,
56
+ icon: p,
57
57
  supportedTypes: x
58
58
  },
59
59
  {
@@ -63,7 +63,7 @@ var x = [
63
63
  icon: ae,
64
64
  supportedTypes: x
65
65
  }
66
- ], xe = [
66
+ ], Se = [
67
67
  {
68
68
  id: "ac-simple-text",
69
69
  name: "Simple Text Card",
@@ -158,7 +158,7 @@ var x = [
158
158
  }
159
159
  }
160
160
  ];
161
- function Se(e) {
161
+ function Ce(e) {
162
162
  switch (e) {
163
163
  case "metric_card":
164
164
  case "kpi_card_comparison": return a;
@@ -172,14 +172,14 @@ function Se(e) {
172
172
  default: return null;
173
173
  }
174
174
  }
175
- var Ce = c(function({ renderer: e, template: t, onChange: n }) {
175
+ var we = c(function({ renderer: e, template: t, onChange: n }) {
176
176
  let [r, i] = u(null), [a, o] = u(() => {
177
177
  try {
178
178
  return t && typeof t == "object" ? JSON.stringify(t, null, 2) : "";
179
179
  } catch {
180
180
  return "";
181
181
  }
182
- }), s = ie(() => xe.filter((t) => t.renderer === e), [e]), ee = l((e) => {
182
+ }), s = ie(() => Se.filter((t) => t.renderer === e), [e]), ee = l((e) => {
183
183
  o(e);
184
184
  try {
185
185
  e.trim() && n(JSON.parse(e)), i(null);
@@ -254,7 +254,7 @@ var Ce = c(function({ renderer: e, template: t, onChange: n }) {
254
254
  href: "https://adaptivecards.io/designer/",
255
255
  target: "_blank",
256
256
  rel: "noopener noreferrer",
257
- children: [/* @__PURE__ */ y(f, { className: "size-3.5" }), "Designer"]
257
+ children: [/* @__PURE__ */ y(d, { className: "size-3.5" }), "Designer"]
258
258
  })
259
259
  }),
260
260
  e === "BLOCKKIT" && /* @__PURE__ */ y(m, {
@@ -265,20 +265,20 @@ var Ce = c(function({ renderer: e, template: t, onChange: n }) {
265
265
  href: "https://app.slack.com/block-kit-builder",
266
266
  target: "_blank",
267
267
  rel: "noopener noreferrer",
268
- children: [/* @__PURE__ */ y(f, { className: "size-3.5" }), "Builder"]
268
+ children: [/* @__PURE__ */ y(d, { className: "size-3.5" }), "Builder"]
269
269
  })
270
270
  })
271
271
  ]
272
272
  })
273
273
  ]
274
274
  });
275
- }), C = c(function({ isOpen: n, widget: r, preselectedType: i, preselectedDefinition: a, onClose: o, onSave: s, dashboardId: c, installedWidgets: ae }) {
276
- let d = !r, [f, p] = u(d ? i ? "general" : "type" : "general"), oe = e((e) => e.dataSinks), [x, C] = u(r?.type || i), [w, T] = u(r?.title || ""), [we, E] = u(r?.description || ""), [Te, D] = u(r?.refreshInterval ?? void 0), [O, k] = u(r?.config || {}), [A, j] = u(r?.renderer || "BIGCONSOLE"), [M, N] = u(r?.template || null), [P, F] = u(r?.config?.dataSourceType || "MOCK"), [I, L] = u(r?.config?.dataSinkKey || ""), [Ee, R] = u(r?.parserId || ""), [De, z] = u(r?.config?.endpointUrl || ""), [B, V] = u(r?.config?.httpMethod || "GET"), [H, U] = u(r?.config?.headers || ""), [W, G] = u(r?.config?.authType || "none"), [Oe, K] = u(r?.config?.authValue || ""), [ke, q] = u(r?.config?.requestBody || ""), [J, Y] = u(r?.config?.dataPath || ""), [Ae, X] = u(r?.config?.graphqlEndpoint || ""), [je, Z] = u(r?.config?.graphqlQuery || ""), [Me, Q] = u(r?.config?.graphqlVariables || ""), Ne = ie(() => x ? S.filter((e) => e.supportedTypes.includes(x)) : S, [x]);
275
+ }), S = c(function({ isOpen: n, widget: r, preselectedType: i, preselectedDefinition: a, onClose: o, onSave: s, dashboardId: c, installedWidgets: ae, definitions: oe }) {
276
+ let d = !r, [f, p] = u(d ? i ? "general" : "type" : "general"), x = e((e) => e.dataSinks), [S, C] = u(r?.type || i), [w, T] = u(r?.title || ""), [Te, E] = u(r?.description || ""), [Ee, D] = u(r?.refreshInterval ?? void 0), [O, k] = u(r?.config || {}), [A, j] = u(r?.renderer || "BIGCONSOLE"), [M, N] = u(r?.template || null), [P, F] = u(r?.config?.dataSourceType || "MOCK"), [I, L] = u(r?.config?.dataSinkKey || ""), [De, R] = u(r?.parserId || ""), [Oe, z] = u(r?.config?.endpointUrl || ""), [B, V] = u(r?.config?.httpMethod || "GET"), [H, U] = u(r?.config?.headers || ""), [W, G] = u(r?.config?.authType || "none"), [ke, K] = u(r?.config?.authValue || ""), [Ae, q] = u(r?.config?.requestBody || ""), [J, Y] = u(r?.config?.dataPath || ""), [je, X] = u(r?.config?.graphqlEndpoint || ""), [Me, Z] = u(r?.config?.graphqlQuery || ""), [Ne, Q] = u(r?.config?.graphqlVariables || ""), Pe = ie(() => S ? xe.filter((e) => e.supportedTypes.includes(S)) : xe, [S]);
277
277
  re(() => {
278
- x && !Ne.find((e) => e.type === A) && (j("BIGCONSOLE"), N(null));
278
+ S && !Pe.find((e) => e.type === A) && (j("BIGCONSOLE"), N(null));
279
279
  }, [
280
- x,
281
- Ne,
280
+ S,
281
+ Pe,
282
282
  A
283
283
  ]), re(() => {
284
284
  if (r) {
@@ -295,47 +295,47 @@ var Ce = c(function({ renderer: e, template: t, onChange: n }) {
295
295
  a,
296
296
  n
297
297
  ]);
298
- let Pe = l((e, n) => {
298
+ let Fe = l((e, n) => {
299
299
  C(e);
300
300
  let r = n || t(e);
301
301
  r && (T(r.name), k(r.defaultConfig || {}), r.category === "Installed" && j("CUSTOM"));
302
- }, []), Fe = l((e) => {
302
+ }, []), Ie = l((e) => {
303
303
  if (j(e), e === "BIGCONSOLE") N(null);
304
304
  else {
305
- let t = xe.find((t) => t.renderer === e);
305
+ let t = Se.find((t) => t.renderer === e);
306
306
  N(t ? t.template : {});
307
307
  }
308
- }, []), Ie = l(() => {
309
- if (!x) return;
308
+ }, []), Le = l(() => {
309
+ if (!S) return;
310
310
  let e;
311
311
  if (I) {
312
- for (let t of oe.values()) if (t.key === I) {
312
+ for (let t of x.values()) if (t.key === I) {
313
313
  e = t.id;
314
314
  break;
315
315
  }
316
316
  }
317
317
  s({
318
- type: x,
318
+ type: S,
319
319
  title: w,
320
- description: we || void 0,
321
- refreshInterval: Te,
320
+ description: Te || void 0,
321
+ refreshInterval: Ee,
322
322
  config: {
323
323
  ...O,
324
324
  dataSourceType: P,
325
325
  dataSinkKey: I || void 0,
326
326
  ...P === "REST_API" ? {
327
- endpointUrl: De || void 0,
327
+ endpointUrl: Oe || void 0,
328
328
  httpMethod: B || "GET",
329
329
  headers: H || void 0,
330
330
  authType: W || "none",
331
- authValue: Oe || void 0,
332
- requestBody: ke || void 0,
331
+ authValue: ke || void 0,
332
+ requestBody: Ae || void 0,
333
333
  dataPath: J || void 0
334
334
  } : {},
335
335
  ...P === "GRAPHQL" ? {
336
- graphqlEndpoint: Ae || void 0,
337
- graphqlQuery: je || void 0,
338
- graphqlVariables: Me || void 0,
336
+ graphqlEndpoint: je || void 0,
337
+ graphqlQuery: Me || void 0,
338
+ graphqlVariables: Ne || void 0,
339
339
  headers: H || void 0,
340
340
  dataPath: J || void 0
341
341
  } : {}
@@ -343,33 +343,33 @@ var Ce = c(function({ renderer: e, template: t, onChange: n }) {
343
343
  renderer: A,
344
344
  template: A === "BIGCONSOLE" ? void 0 : M,
345
345
  dataSinkId: e || void 0,
346
- parserId: Ee || void 0
346
+ parserId: De || void 0
347
347
  }), o();
348
348
  }, [
349
- x,
349
+ S,
350
350
  w,
351
- we,
352
351
  Te,
352
+ Ee,
353
353
  O,
354
354
  A,
355
355
  M,
356
356
  P,
357
357
  I,
358
- oe,
359
- Ee,
358
+ x,
360
359
  De,
360
+ Oe,
361
361
  B,
362
362
  H,
363
363
  W,
364
- Oe,
365
364
  ke,
366
- J,
367
365
  Ae,
366
+ J,
368
367
  je,
369
368
  Me,
369
+ Ne,
370
370
  s,
371
371
  o
372
- ]), Le = x ? t(x) : null, Re = x ? Se(x) : null, ze = A !== "BIGCONSOLE", Be = A === "BIGCONSOLE" && Re, $ = ie(() => [
372
+ ]), Re = S ? t(S) : null, ze = S ? Ce(S) : null, Be = A !== "BIGCONSOLE", Ve = A === "BIGCONSOLE" && ze, $ = ie(() => [
373
373
  {
374
374
  id: "type",
375
375
  label: "Type",
@@ -383,7 +383,7 @@ var Ce = c(function({ renderer: e, template: t, onChange: n }) {
383
383
  {
384
384
  id: "renderer",
385
385
  label: "Template",
386
- show: ze
386
+ show: Be
387
387
  },
388
388
  {
389
389
  id: "config",
@@ -392,7 +392,7 @@ var Ce = c(function({ renderer: e, template: t, onChange: n }) {
392
392
  }
393
393
  ].filter((e) => e.show), [
394
394
  d,
395
- ze,
395
+ Be,
396
396
  !0
397
397
  ]);
398
398
  return /* @__PURE__ */ y(de, {
@@ -419,9 +419,9 @@ var Ce = c(function({ renderer: e, template: t, onChange: n }) {
419
419
  children: d ? "Add Widget" : "Edit Widget"
420
420
  }), /* @__PURE__ */ y(pe, {
421
421
  className: "text-xs",
422
- children: Le ? /* @__PURE__ */ b(be, { children: [Le.name, A !== "BIGCONSOLE" && /* @__PURE__ */ y("span", {
422
+ children: Re ? /* @__PURE__ */ b(be, { children: [Re.name, A !== "BIGCONSOLE" && /* @__PURE__ */ y("span", {
423
423
  className: "ml-2 px-1.5 py-0.5 text-xs bg-action-primary-bg/10 text-primary rounded",
424
- children: S.find((e) => e.type === A)?.name
424
+ children: xe.find((e) => e.type === A)?.name
425
425
  })] }) : "Configure the widget data source, appearance, and actions."
426
426
  })]
427
427
  }),
@@ -445,7 +445,7 @@ var Ce = c(function({ renderer: e, template: t, onChange: n }) {
445
445
  },
446
446
  children: $.map((e) => /* @__PURE__ */ y(ye, {
447
447
  value: e.id,
448
- disabled: e.id !== "type" && !x,
448
+ disabled: e.id !== "type" && !S,
449
449
  style: {
450
450
  fontSize: "12px",
451
451
  padding: "4px 12px"
@@ -470,13 +470,14 @@ var Ce = c(function({ renderer: e, template: t, onChange: n }) {
470
470
  overflow: "hidden"
471
471
  },
472
472
  children: /* @__PURE__ */ y(ee, {
473
- selectedType: x,
473
+ selectedType: S,
474
474
  selectedRenderer: A,
475
475
  onSelect: (e, t) => {
476
- Pe(e, t), p("general");
476
+ Fe(e, t), p("general");
477
477
  },
478
- onRendererSelect: Fe,
479
- installedWidgets: ae
478
+ onRendererSelect: Ie,
479
+ installedWidgets: ae,
480
+ definitions: oe
480
481
  })
481
482
  }),
482
483
  /* @__PURE__ */ y(_, {
@@ -510,7 +511,7 @@ var Ce = c(function({ renderer: e, template: t, onChange: n }) {
510
511
  children: "Description (optional)"
511
512
  }), /* @__PURE__ */ y(v, {
512
513
  id: "description",
513
- value: we,
514
+ value: Te,
514
515
  onChange: (e) => E(e.target.value),
515
516
  placeholder: "Brief description of this widget",
516
517
  rows: 2
@@ -520,11 +521,11 @@ var Ce = c(function({ renderer: e, template: t, onChange: n }) {
520
521
  className: "space-y-2",
521
522
  children: [/* @__PURE__ */ y(g, { children: "Renderer" }), /* @__PURE__ */ y("div", {
522
523
  className: "grid grid-cols-2 gap-2",
523
- children: Ne.map((e) => {
524
+ children: Pe.map((e) => {
524
525
  let t = e.icon;
525
526
  return /* @__PURE__ */ y(se, {
526
527
  className: `cursor-pointer transition-colors ${A === e.type ? "border-primary bg-action-primary-bg/5" : "hover:border-primary/50"}`,
527
- onClick: () => Fe(e.type),
528
+ onClick: () => Ie(e.type),
528
529
  children: /* @__PURE__ */ y(le, {
529
530
  className: "p-3",
530
531
  children: /* @__PURE__ */ b("div", {
@@ -556,7 +557,7 @@ var Ce = c(function({ renderer: e, template: t, onChange: n }) {
556
557
  }), /* @__PURE__ */ y(h, {
557
558
  id: "refresh",
558
559
  type: "number",
559
- value: Te || "",
560
+ value: Ee || "",
560
561
  onChange: (e) => D(e.target.value ? Number(e.target.value) : void 0),
561
562
  min: 0,
562
563
  placeholder: "No auto-refresh"
@@ -574,7 +575,7 @@ var Ce = c(function({ renderer: e, template: t, onChange: n }) {
574
575
  padding: "12px 16px",
575
576
  minHeight: "300px"
576
577
  },
577
- children: /* @__PURE__ */ y(Ce, {
578
+ children: /* @__PURE__ */ y(we, {
578
579
  renderer: A,
579
580
  template: M,
580
581
  onChange: N
@@ -645,7 +646,7 @@ var Ce = c(function({ renderer: e, template: t, onChange: n }) {
645
646
  /* @__PURE__ */ b("div", {
646
647
  className: "space-y-2",
647
648
  children: [/* @__PURE__ */ y(g, { children: "Endpoint URL *" }), /* @__PURE__ */ y(h, {
648
- value: De,
649
+ value: Oe,
649
650
  onChange: (e) => z(e.target.value),
650
651
  placeholder: "https://api.example.com/data"
651
652
  })]
@@ -716,7 +717,7 @@ var Ce = c(function({ renderer: e, template: t, onChange: n }) {
716
717
  className: "space-y-2",
717
718
  children: [/* @__PURE__ */ y(g, { children: W === "basic" ? "Credentials (user:pass)" : "Token/Key" }), /* @__PURE__ */ y(h, {
718
719
  type: "password",
719
- value: Oe,
720
+ value: ke,
720
721
  onChange: (e) => K(e.target.value),
721
722
  placeholder: W === "basic" ? "username:password" : "Enter token or API key"
722
723
  })]
@@ -724,7 +725,7 @@ var Ce = c(function({ renderer: e, template: t, onChange: n }) {
724
725
  (B === "POST" || B === "PUT") && /* @__PURE__ */ b("div", {
725
726
  className: "space-y-2",
726
727
  children: [/* @__PURE__ */ y(g, { children: "Request Body (JSON)" }), /* @__PURE__ */ y(v, {
727
- value: ke,
728
+ value: Ae,
728
729
  onChange: (e) => q(e.target.value),
729
730
  rows: 3,
730
731
  placeholder: "{\"key\": \"value\"}",
@@ -754,7 +755,7 @@ var Ce = c(function({ renderer: e, template: t, onChange: n }) {
754
755
  /* @__PURE__ */ b("div", {
755
756
  className: "space-y-2",
756
757
  children: [/* @__PURE__ */ y(g, { children: "GraphQL Endpoint *" }), /* @__PURE__ */ y(h, {
757
- value: Ae,
758
+ value: je,
758
759
  onChange: (e) => X(e.target.value),
759
760
  placeholder: "https://api.example.com/graphql"
760
761
  })]
@@ -762,7 +763,7 @@ var Ce = c(function({ renderer: e, template: t, onChange: n }) {
762
763
  /* @__PURE__ */ b("div", {
763
764
  className: "space-y-2",
764
765
  children: [/* @__PURE__ */ y(g, { children: "Query *" }), /* @__PURE__ */ y(v, {
765
- value: je,
766
+ value: Me,
766
767
  onChange: (e) => Z(e.target.value),
767
768
  rows: 5,
768
769
  placeholder: "query GetData($limit: Int) {\n items(limit: $limit) {\n id\n name\n }\n}",
@@ -772,7 +773,7 @@ var Ce = c(function({ renderer: e, template: t, onChange: n }) {
772
773
  /* @__PURE__ */ b("div", {
773
774
  className: "space-y-2",
774
775
  children: [/* @__PURE__ */ y(g, { children: "Variables (JSON, optional)" }), /* @__PURE__ */ y(v, {
775
- value: Me,
776
+ value: Ne,
776
777
  onChange: (e) => Q(e.target.value),
777
778
  rows: 2,
778
779
  placeholder: "{\"limit\": 10}",
@@ -815,7 +816,7 @@ var Ce = c(function({ renderer: e, template: t, onChange: n }) {
815
816
  }),
816
817
  /* @__PURE__ */ y(ne, {
817
818
  consoleId: c,
818
- value: Ee || null,
819
+ value: De || null,
819
820
  onChange: (e) => R(e || ""),
820
821
  filterInputSinkKey: P === "DATASINK" ? I : void 0,
821
822
  filterStatus: void 0,
@@ -828,7 +829,7 @@ var Ce = c(function({ renderer: e, template: t, onChange: n }) {
828
829
  ]
829
830
  })
830
831
  ]
831
- }), Be && Re && /* @__PURE__ */ y(Re, {
832
+ }), Ve && ze && /* @__PURE__ */ y(ze, {
832
833
  config: O,
833
834
  onChange: k
834
835
  })]
@@ -856,7 +857,7 @@ var Ce = c(function({ renderer: e, template: t, onChange: n }) {
856
857
  children: f === $[0]?.id ? "Cancel" : "Back"
857
858
  }), /* @__PURE__ */ b("div", {
858
859
  className: "flex gap-2",
859
- children: [f !== $[$.length - 1]?.id && x && /* @__PURE__ */ y(m, {
860
+ children: [f !== $[$.length - 1]?.id && S && /* @__PURE__ */ y(m, {
860
861
  variant: "outline",
861
862
  size: "sm",
862
863
  onClick: () => {
@@ -866,8 +867,8 @@ var Ce = c(function({ renderer: e, template: t, onChange: n }) {
866
867
  children: "Next"
867
868
  }), /* @__PURE__ */ y(m, {
868
869
  size: "sm",
869
- onClick: Ie,
870
- disabled: !x || !w.trim() || A !== "BIGCONSOLE" && !M,
870
+ onClick: Le,
871
+ disabled: !S || !w.trim() || A !== "BIGCONSOLE" && !M,
871
872
  children: d ? "Add Widget" : "Save"
872
873
  })]
873
874
  })]
@@ -877,6 +878,6 @@ var Ce = c(function({ renderer: e, template: t, onChange: n }) {
877
878
  });
878
879
  });
879
880
  //#endregion
880
- export { C as default };
881
+ export { S as default };
881
882
 
882
883
  //# sourceMappingURL=WidgetConfigDialog.js.map