@progress/kendo-react-webmcp 15.0.1-develop.3 → 15.0.1-develop.4

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 (78) hide show
  1. package/WebMcpProvider.js +1 -1
  2. package/WebMcpProvider.mjs +84 -80
  3. package/adapters/button.d.ts +1 -1
  4. package/adapters/button.js +1 -1
  5. package/adapters/button.mjs +12 -17
  6. package/adapters/{dashboard.d.ts → checkbox.d.ts} +5 -6
  7. package/adapters/checkbox.js +8 -0
  8. package/adapters/checkbox.mjs +60 -0
  9. package/adapters/dropdowntree.js +1 -1
  10. package/adapters/dropdowntree.mjs +78 -51
  11. package/adapters/editor.d.ts +0 -1
  12. package/adapters/editor.js +1 -1
  13. package/adapters/editor.mjs +38 -46
  14. package/adapters/form.d.ts +1 -0
  15. package/adapters/form.js +3 -3
  16. package/adapters/form.mjs +75 -49
  17. package/adapters/gantt.d.ts +2 -0
  18. package/adapters/gantt.js +1 -1
  19. package/adapters/gantt.mjs +188 -140
  20. package/adapters/grid.d.ts +0 -1
  21. package/adapters/grid.js +1 -1
  22. package/adapters/grid.mjs +52 -60
  23. package/adapters/multicolumncombobox.d.ts +20 -0
  24. package/adapters/multicolumncombobox.js +8 -0
  25. package/adapters/multicolumncombobox.mjs +75 -0
  26. package/adapters/multiselect.d.ts +2 -0
  27. package/adapters/multiselect.js +1 -1
  28. package/adapters/multiselect.mjs +46 -30
  29. package/adapters/notification.js +1 -1
  30. package/adapters/notification.mjs +14 -14
  31. package/adapters/pivotgrid.js +1 -1
  32. package/adapters/pivotgrid.mjs +39 -47
  33. package/adapters/scheduler.js +1 -1
  34. package/adapters/scheduler.mjs +137 -92
  35. package/adapters/spreadsheet.js +1 -1
  36. package/adapters/spreadsheet.mjs +3 -3
  37. package/adapters/switch.js +1 -1
  38. package/adapters/switch.mjs +29 -19
  39. package/adapters/treeview.js +2 -2
  40. package/adapters/treeview.mjs +79 -113
  41. package/adapters/window.d.ts +0 -2
  42. package/adapters/window.js +1 -1
  43. package/adapters/window.mjs +29 -63
  44. package/commands/form.d.ts +4 -1
  45. package/commands/form.js +1 -1
  46. package/commands/form.mjs +11 -7
  47. package/commands/gantt.js +1 -1
  48. package/commands/gantt.mjs +14 -10
  49. package/commands/grid.d.ts +0 -4
  50. package/commands/grid.js +1 -1
  51. package/commands/grid.mjs +18 -24
  52. package/commands/index.d.ts +0 -1
  53. package/commands/pivotgrid.d.ts +0 -4
  54. package/commands/pivotgrid.js +1 -1
  55. package/commands/pivotgrid.mjs +6 -12
  56. package/commands/scheduler.d.ts +10 -0
  57. package/commands/scheduler.js +1 -1
  58. package/commands/scheduler.mjs +16 -4
  59. package/commands/window.d.ts +0 -8
  60. package/commands/window.js +1 -1
  61. package/commands/window.mjs +8 -18
  62. package/dist/cdn/js/kendo-react-webmcp.js +1 -1
  63. package/index.d.mts +2 -1
  64. package/index.d.ts +2 -1
  65. package/index.js +1 -1
  66. package/index.mjs +248 -249
  67. package/package.json +3 -3
  68. package/schemas/gantt.d.ts +4 -0
  69. package/schemas/gantt.js +1 -1
  70. package/schemas/gantt.mjs +93 -8
  71. package/schemas/scheduler.d.ts +2 -0
  72. package/schemas/scheduler.js +1 -1
  73. package/schemas/scheduler.mjs +21 -5
  74. package/adapters/dashboard.js +0 -8
  75. package/adapters/dashboard.mjs +0 -41
  76. package/commands/dashboard.d.ts +0 -19
  77. package/commands/dashboard.js +0 -8
  78. package/commands/dashboard.mjs +0 -21
package/adapters/grid.mjs CHANGED
@@ -6,7 +6,7 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import * as O from "react";
9
- import { getGridToolSchema as Q } from "../commands/grid.mjs";
9
+ import { getGridToolSchema as B } from "../commands/grid.mjs";
10
10
  function C(r, n, e, t, a) {
11
11
  const i = r.current;
12
12
  if (n)
@@ -25,7 +25,7 @@ function C(r, n, e, t, a) {
25
25
  });
26
26
  }
27
27
  }
28
- function Y(r) {
28
+ function Q(r) {
29
29
  const n = [];
30
30
  return O.Children.forEach(r, (e) => {
31
31
  if (O.isValidElement(e) && e.props.field) {
@@ -34,13 +34,13 @@ function Y(r) {
34
34
  }
35
35
  }), n;
36
36
  }
37
- function Z(r, n, e) {
37
+ function Y(r, n, e) {
38
38
  if (!r.field)
39
39
  return { content: [{ type: "text", text: "Missing required argument: field" }], isError: !0 };
40
40
  const t = r.field, a = r.dir || "asc", i = [{ field: t, dir: a }];
41
41
  return C(n, n.current.onSortChange, { sort: i }, { sort: i }, e), { content: [{ type: "text", text: `Sorted by ${t} ${a}.` }] };
42
42
  }
43
- function V(r, n, e, t) {
43
+ function Z(r, n, e, t) {
44
44
  var u, s;
45
45
  if (!r.field || !r.operator)
46
46
  return { content: [{ type: "text", text: "Missing required arguments: field, operator" }], isError: !0 };
@@ -50,14 +50,14 @@ function V(r, n, e, t) {
50
50
  };
51
51
  return C(n, l.onFilterChange, { filter: c }, { filter: c, skip: 0 }, e), { content: [{ type: "text", text: `Filter applied: ${a} ${i} "${o}".` }] };
52
52
  }
53
- function R(r, n, e) {
53
+ function V(r, n, e) {
54
54
  var l;
55
55
  if (!r.field)
56
56
  return { content: [{ type: "text", text: "Missing required argument: field" }], isError: !0 };
57
57
  const t = r.field, a = r.dir || "asc", i = n.current, o = [...(l = i.group) != null ? l : [], { field: t, dir: a }];
58
58
  return C(n, i.onGroupChange, { group: o }, { group: o }, e), { content: [{ type: "text", text: `Grouped by ${t} ${a}.` }] };
59
59
  }
60
- function ee(r, n, e) {
60
+ function R(r, n, e) {
61
61
  var o;
62
62
  const t = Number(r.page);
63
63
  if (!t || t < 1)
@@ -65,7 +65,7 @@ function ee(r, n, e) {
65
65
  const a = (o = n.current.take) != null ? o : 10, i = (t - 1) * a;
66
66
  return C(n, n.current.onPageChange, { page: { skip: i, take: a } }, { skip: i, take: a }, e), { content: [{ type: "text", text: `Navigated to page ${t}.` }] };
67
67
  }
68
- function te(r, n, e) {
68
+ function ee(r, n, e) {
69
69
  const t = Number(r.pageSize);
70
70
  return !t || t < 1 ? { content: [{ type: "text", text: "Invalid page size." }], isError: !0 } : (C(
71
71
  n,
@@ -75,15 +75,15 @@ function te(r, n, e) {
75
75
  e
76
76
  ), { content: [{ type: "text", text: `Page size set to ${t}.` }] });
77
77
  }
78
- function re(r, n, e, t, a) {
78
+ function te(r, n, e, t, a) {
79
79
  const i = e.current;
80
80
  switch (r) {
81
81
  case "GridSort":
82
- return Z(n, e, t);
82
+ return Y(n, e, t);
83
83
  case "GridClearSort":
84
84
  return C(e, i.onSortChange, { sort: [] }, { sort: [] }, t), { content: [{ type: "text", text: "Sorting cleared." }] };
85
85
  case "GridFilter":
86
- return V(n, e, t, a);
86
+ return Z(n, e, t, a);
87
87
  case "GridClearFilter": {
88
88
  const o = { logic: "and", filters: [] };
89
89
  return C(
@@ -95,13 +95,13 @@ function re(r, n, e, t, a) {
95
95
  ), { content: [{ type: "text", text: "All filters cleared." }] };
96
96
  }
97
97
  case "GridGroup":
98
- return R(n, e, t);
98
+ return V(n, e, t);
99
99
  case "GridClearGroup":
100
100
  return C(e, i.onGroupChange, { group: [] }, { group: [] }, t), { content: [{ type: "text", text: "Grouping cleared." }] };
101
101
  case "GridPage":
102
- return ee(n, e, t);
102
+ return R(n, e, t);
103
103
  case "GridPageSize":
104
- return te(n, e, t);
104
+ return ee(n, e, t);
105
105
  default:
106
106
  return null;
107
107
  }
@@ -109,7 +109,7 @@ function re(r, n, e, t, a) {
109
109
  function $(r) {
110
110
  return Array.isArray(r) ? r : r && typeof r == "object" && Array.isArray(r.data) ? r.data : [];
111
111
  }
112
- function ne(r, n, e) {
112
+ function re(r, n, e) {
113
113
  var c, u;
114
114
  if (!r.field || !r.operator)
115
115
  return { content: [{ type: "text", text: "Missing required arguments: field, operator" }], isError: !0 };
@@ -128,7 +128,7 @@ function ne(r, n, e) {
128
128
  content: [{ type: "text", text: `Highlighted rows where ${t} ${a} "${JSON.stringify(i)}".` }]
129
129
  };
130
130
  }
131
- function oe(r, n, e) {
131
+ function ne(r, n, e) {
132
132
  var c, u;
133
133
  if (!r.field || !r.operator)
134
134
  return { content: [{ type: "text", text: "Missing required arguments: field, operator" }], isError: !0 };
@@ -154,7 +154,7 @@ function oe(r, n, e) {
154
154
  content: [{ type: "text", text: `Selected rows where ${t} ${a} "${JSON.stringify(i)}".` }]
155
155
  };
156
156
  }
157
- function ae(r, n, e, t, a) {
157
+ function oe(r, n, e, t, a) {
158
158
  const i = n.id;
159
159
  if (!i)
160
160
  return { content: [{ type: "text", text: "Missing required argument: id" }], isError: !0 };
@@ -204,7 +204,7 @@ function ae(r, n, e, t, a) {
204
204
  return null;
205
205
  }
206
206
  }
207
- function ie(r, n, e, t) {
207
+ function ae(r, n, e, t) {
208
208
  const a = e.current;
209
209
  if (!a.onItemChange)
210
210
  return null;
@@ -231,47 +231,45 @@ function ie(r, n, e, t) {
231
231
  return null;
232
232
  }
233
233
  }
234
- function ce(r, n, e, t, a) {
234
+ function ie(r, n, e, t, a) {
235
235
  switch (r) {
236
236
  case "GridHighlight":
237
- return ne(n, e, t);
237
+ return re(n, e, t);
238
238
  case "GridClearHighlight":
239
239
  return e.current.onHighlightChange && e.current.onHighlightChange({ highlight: {} }), { content: [{ type: "text", text: "Highlights cleared." }] };
240
240
  case "GridSelect":
241
- return oe(n, e, t);
241
+ return ne(n, e, t);
242
242
  case "GridClearSelect":
243
243
  return e.current.onSelectionChange && e.current.onSelectionChange({ select: {}, target: t }), { content: [{ type: "text", text: "Selection cleared." }] };
244
244
  case "GridSelectAll":
245
- return de(e, t);
245
+ return ce(e, t);
246
246
  case "GridDetailExpand":
247
247
  case "GridDetailCollapse":
248
248
  case "GridDetailExpandAll":
249
249
  case "GridDetailCollapseAll":
250
- return le(r, n, e, t);
250
+ return de(r, n, e, t);
251
251
  case "GridGroupExpand":
252
252
  case "GridGroupCollapse":
253
253
  case "GridGroupExpandAll":
254
254
  case "GridGroupCollapseAll":
255
- return ge(r, n, e, t);
255
+ return me(r, n, e, t);
256
256
  case "GridSetAggregates":
257
- return se(n, e, t);
257
+ return ue(n, e, t);
258
258
  case "GridExportPDF":
259
259
  return t != null && t.exportAsPdf && t.exportAsPdf(), { content: [{ type: "text", text: "PDF export triggered." }] };
260
260
  case "GridExportCSV":
261
261
  return t != null && t.saveAsCsv ? t.saveAsCsv().then(() => ({ content: [{ type: "text", text: "CSV export triggered." }] })) : { content: [{ type: "text", text: "CSV export not available." }], isError: !0 };
262
- case "GridExportExcel":
263
- return t != null && t.saveAsExcel && t.saveAsExcel(), { content: [{ type: "text", text: "Excel export triggered." }] };
264
262
  case "GridColumnReorder":
265
263
  case "GridColumnResize":
266
264
  case "GridColumnShow":
267
265
  case "GridColumnHide":
268
266
  case "GridColumnLock":
269
267
  case "GridColumnUnlock":
270
- return ae(r, n, e, t);
268
+ return oe(r, n, e, t);
271
269
  case "GridAdd":
272
270
  case "GridUpdate":
273
271
  case "GridDelete":
274
- return ie(r, n, e, t);
272
+ return ae(r, n, e, t);
275
273
  default:
276
274
  return null;
277
275
  }
@@ -287,7 +285,7 @@ function I(r, n) {
287
285
  }
288
286
  return e;
289
287
  }
290
- function de(r, n) {
288
+ function ce(r, n) {
291
289
  var i, o;
292
290
  const e = r.current;
293
291
  if (!e.onHeaderSelectionChange && !e.onSelectionChange)
@@ -308,7 +306,7 @@ function de(r, n) {
308
306
  }
309
307
  return { content: [{ type: "text", text: "All rows selected." }] };
310
308
  }
311
- function le(r, n, e, t) {
309
+ function de(r, n, e, t) {
312
310
  var l, d;
313
311
  const a = e.current;
314
312
  if (!a.onDetailExpandChange)
@@ -324,12 +322,12 @@ function le(r, n, e, t) {
324
322
  return a.onDetailExpandChange({ detailExpand: {}, target: t }), { content: [{ type: "text", text: "All detail rows collapsed." }] };
325
323
  case "GridDetailExpand":
326
324
  case "GridDetailCollapse":
327
- return ue(r, n, a, t, i, o);
325
+ return le(r, n, a, t, i, o);
328
326
  default:
329
327
  return { content: [{ type: "text", text: `Unknown expand command: ${r}` }], isError: !0 };
330
328
  }
331
329
  }
332
- function ue(r, n, e, t, a, i) {
330
+ function le(r, n, e, t, a, i) {
333
331
  var g;
334
332
  if (!n.field || !n.operator)
335
333
  return {
@@ -370,7 +368,7 @@ function k(r, n, e) {
370
368
  return !1;
371
369
  }
372
370
  }
373
- function se(r, n, e) {
371
+ function ue(r, n, e) {
374
372
  const t = n.current;
375
373
  if (!t.groupable)
376
374
  return {
@@ -388,7 +386,7 @@ function se(r, n, e) {
388
386
  });
389
387
  return C(n, t.onGroupChange, { group: l }, { group: l }, e), { content: [{ type: "text", text: `Aggregate "${i}" added for column "${a}".` }] };
390
388
  }
391
- function pe(r, n) {
389
+ function se(r, n) {
392
390
  const e = [];
393
391
  for (const t of r) {
394
392
  const a = /* @__PURE__ */ new Set();
@@ -399,13 +397,13 @@ function pe(r, n) {
399
397
  }
400
398
  return e;
401
399
  }
402
- function me(r, n, e) {
400
+ function pe(r, n, e) {
403
401
  if (!r.field || r.value == null)
404
402
  return null;
405
403
  const t = r.field, a = r.value, i = typeof a == "string" || typeof a == "number" ? String(a) : JSON.stringify(a);
406
404
  return { updated: n.find((d) => d.field === t && String(d.value) === i) ? n.map((d) => d.field === t && String(d.value) === i ? { ...d, expanded: e } : d) : [...n, { field: t, value: a, expanded: e }], field: t, valueStr: i };
407
405
  }
408
- function ge(r, n, e, t) {
406
+ function me(r, n, e, t) {
409
407
  var i, o, l;
410
408
  const a = e.current;
411
409
  if (!a.groupable)
@@ -418,12 +416,12 @@ function ge(r, n, e, t) {
418
416
  case "GridGroupCollapseAll": {
419
417
  if (!a.group || a.group.length === 0)
420
418
  return { content: [{ type: "text", text: "No active grouping." }], isError: !0 };
421
- const d = (o = (i = t == null ? void 0 : t.getLeafDataItems) == null ? void 0 : i.call(t)) != null ? o : $(a.data), c = pe(a.group, d);
419
+ const d = (o = (i = t == null ? void 0 : t.getLeafDataItems) == null ? void 0 : i.call(t)) != null ? o : $(a.data), c = se(a.group, d);
422
420
  return a.onGroupExpandChange({ groupExpand: c, target: t }), { content: [{ type: "text", text: "All groups collapsed." }] };
423
421
  }
424
422
  case "GridGroupExpand":
425
423
  case "GridGroupCollapse": {
426
- const d = r === "GridGroupExpand", c = me(n, (l = a.groupExpand) != null ? l : [], d);
424
+ const d = r === "GridGroupExpand", c = pe(n, (l = a.groupExpand) != null ? l : [], d);
427
425
  if (!c)
428
426
  return { content: [{ type: "text", text: "Missing required arguments: field, value" }], isError: !0 };
429
427
  a.onGroupExpandChange({ groupExpand: c.updated, target: t });
@@ -434,10 +432,10 @@ function ge(r, n, e, t) {
434
432
  return { content: [{ type: "text", text: `Unknown group expand command: ${r}` }], isError: !0 };
435
433
  }
436
434
  }
437
- const ye = {
435
+ const Ce = {
438
436
  componentSuffix: "grid",
439
437
  createTools(r, n, e, t) {
440
- const a = [], i = (m) => `${e.groupName}_${m}`, o = n.current, l = Y(o.children), d = !!o.onHighlightChange, c = !!o.selectable, u = c && (!!o.onHeaderSelectionChange || !!o.dataItemKey), s = !!o.onDetailExpandChange, p = !!o.groupable && !!o.onGroupExpandChange, g = !!o.pdf, G = !!o.excel, w = !!o.csv, S = !!o.reorderable, J = !!o.resizable, h = !!o.onColumnsStateChange, D = !!o.onItemChange || !!o.editable, _ = [
438
+ const a = [], i = (m) => `${e.groupName}_${m}`, o = n.current, l = Q(o.children), d = !!o.onHighlightChange, c = !!o.selectable, u = c && (!!o.onHeaderSelectionChange || !!o.dataItemKey), s = !!o.onDetailExpandChange, p = !!o.groupable && !!o.onGroupExpandChange, g = !!o.pdf, G = !!o.csv, w = !!o.reorderable, S = !!o.resizable, h = !!o.onColumnsStateChange, D = !!o.onItemChange || !!o.editable, _ = [
441
439
  {
442
440
  name: "sort",
443
441
  description: `Sort the ${e.dataName} grid by a column`,
@@ -580,25 +578,19 @@ const ye = {
580
578
  name: "export_csv",
581
579
  description: `Export the ${e.dataName} grid to CSV`,
582
580
  commandType: "GridExportCSV",
583
- enabled: w
584
- },
585
- {
586
- name: "export_excel",
587
- description: `Export the ${e.dataName} grid to Excel`,
588
- commandType: "GridExportExcel",
589
581
  enabled: G
590
582
  },
591
583
  {
592
584
  name: "reorder_column",
593
585
  description: `Reorder a column in the ${e.dataName} grid`,
594
586
  commandType: "GridColumnReorder",
595
- enabled: S
587
+ enabled: w
596
588
  },
597
589
  {
598
590
  name: "resize_column",
599
591
  description: `Resize a column in the ${e.dataName} grid`,
600
592
  commandType: "GridColumnResize",
601
- enabled: J
593
+ enabled: S
602
594
  },
603
595
  {
604
596
  name: "show_column",
@@ -646,39 +638,39 @@ const ye = {
646
638
  name: "get_data",
647
639
  description: `Read the data currently visible in the ${e.dataName} grid as JSON`,
648
640
  commandType: "GridGetData",
649
- enabled: !0
641
+ enabled: !1
650
642
  }
651
- ], E = n.current.webMcp, T = typeof E == "object" && E !== null && typeof E.tools == "function" ? E.tools : void 0, j = { tname: i, columns: l, data: o.data }, W = T ? T(_, j) : _;
643
+ ], b = n.current.webMcp, T = typeof b == "object" && b !== null && typeof b.tools == "function" ? b.tools : void 0, J = { tname: i, columns: l, data: o.data }, j = T ? T(_, J) : _;
652
644
  let x = null;
653
- const X = async (m, f) => {
645
+ const W = async (m, f) => {
654
646
  var M, q, z, P, F, K, L;
655
- const v = (q = x == null ? void 0 : x.filters) != null ? q : (M = n.current.filter) == null ? void 0 : M.filters, b = re(m, f, n, r, v);
656
- if (b)
647
+ const v = (q = x == null ? void 0 : x.filters) != null ? q : (M = n.current.filter) == null ? void 0 : M.filters, E = te(m, f, n, r, v);
648
+ if (E)
657
649
  return m === "GridFilter" && f.field && f.operator ? x = {
658
650
  logic: "and",
659
651
  filters: [...(F = (P = x == null ? void 0 : x.filters) != null ? P : (z = n.current.filter) == null ? void 0 : z.filters) != null ? F : [], { field: f.field, operator: f.operator, value: f.value }]
660
- } : m === "GridClearFilter" && (x = { logic: "and", filters: [] }), b;
661
- const H = ce(m, f, n, r);
652
+ } : m === "GridClearFilter" && (x = { logic: "and", filters: [] }), E;
653
+ const H = ie(m, f, n, r);
662
654
  if (H)
663
655
  return H;
664
656
  if (m === "GridGetData") {
665
- x && await new Promise((B) => setTimeout(B, 100));
657
+ x && await new Promise((X) => setTimeout(X, 100));
666
658
  const A = 1e3, y = (L = (K = r == null ? void 0 : r.getLeafDataItems) == null ? void 0 : K.call(r)) != null ? L : $(n.current.data), U = Array.isArray(y) && y.length > A ? y.slice(0, A) : y;
667
659
  return { content: [{ type: "text", text: JSON.stringify(U !== y ? { rows: U, truncated: !0, total: y.length } : y) }] };
668
660
  }
669
661
  return { content: [{ type: "text", text: `Unknown command: ${m}` }], isError: !0 };
670
662
  };
671
- for (const m of W) {
663
+ for (const m of j) {
672
664
  if (!m.enabled)
673
665
  continue;
674
- const f = Q(m.commandType, l), v = m.commandType;
666
+ const f = B(m.commandType, l), v = m.commandType;
675
667
  try {
676
668
  a.push(
677
669
  t.registerTool({
678
670
  name: i(m.name),
679
671
  description: m.description,
680
672
  inputSchema: f,
681
- execute: async (b) => X(v, b || {})
673
+ execute: async (E) => W(v, E || {})
682
674
  })
683
675
  );
684
676
  } catch {
@@ -688,5 +680,5 @@ const ye = {
688
680
  }
689
681
  };
690
682
  export {
691
- ye as gridAdapter
683
+ Ce as gridAdapter
692
684
  };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { ToolAdapter } from '../types';
9
+ interface MultiColumnComboBoxAdapterProps {
10
+ data?: unknown[];
11
+ textField?: string;
12
+ opened?: boolean;
13
+ onChange?: (event: unknown) => void;
14
+ onOpen?: (event: unknown) => void;
15
+ onClose?: (event: unknown) => void;
16
+ webMcp?: unknown;
17
+ }
18
+ /** @hidden */
19
+ export declare const multiColumnComboBoxAdapter: ToolAdapter<unknown, MultiColumnComboBoxAdapterProps>;
20
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../commands/multicolumncombobox.js"),B={componentSuffix:"multicolumncombobox",createTools(l,s,n,h){const C=[],g=t=>`${n.groupName}_${t}`,i=s.current,p=!!i.onChange,b=[{name:"open",description:`Open the ${n.dataName} multi-column combo box popup`,commandType:e.MultiColumnComboBoxCommands.Open,enabled:!!i.onOpen},{name:"close",description:`Close the ${n.dataName} multi-column combo box popup`,commandType:e.MultiColumnComboBoxCommands.Close,enabled:!!i.onClose},{name:"set_value",description:`Select an item from the ${n.dataName} multi-column combo box`,commandType:e.MultiColumnComboBoxCommands.SetValue,enabled:p},{name:"clear",description:`Clear the ${n.dataName} multi-column combo box selection`,commandType:e.MultiColumnComboBoxCommands.Clear,enabled:p}],m=s.current.webMcp,d=typeof m=="object"&&m!==null&&typeof m.tools=="function"?m.tools:void 0,f=d?d(b):b,M=async(t,c)=>{const o=s.current;switch(t){case e.MultiColumnComboBoxCommands.Open:return o.onOpen&&o.onOpen({syntheticEvent:null,target:l}),{content:[{type:"text",text:"Multi-column combo box opened."}]};case e.MultiColumnComboBoxCommands.SetValue:{const r=o.data||[],x=o.textField,a=c.value,y=r.find(u=>x&&typeof u=="object"&&u!==null&&u[x]===a?!0:u===a),v=y===void 0?a:y;return o.onChange&&o.onChange({value:v,syntheticEvent:null,target:l}),{content:[{type:"text",text:`Selected "${String(a)}".`}]}}case e.MultiColumnComboBoxCommands.Clear:return o.onChange&&o.onChange({value:null,syntheticEvent:null,target:l}),{content:[{type:"text",text:"Selection cleared."}]};case e.MultiColumnComboBoxCommands.Close:return o.onClose&&o.onClose({syntheticEvent:null,target:l}),{content:[{type:"text",text:"Multi-column combo box closed."}]};default:return{content:[{type:"text",text:`Unknown command: ${t}`}],isError:!0}}};for(const t of f){if(!t.enabled)continue;const c=t.commandType,o=e.getMultiColumnComboBoxToolSchema(c);try{C.push(h.registerTool({name:g(t.name),description:t.description,inputSchema:o,execute:async r=>M(c,r||{})}))}catch{}}return C}};exports.multiColumnComboBoxAdapter=B;
@@ -0,0 +1,75 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { MultiColumnComboBoxCommands as o, getMultiColumnComboBoxToolSchema as T } from "../commands/multicolumncombobox.mjs";
9
+ const $ = {
10
+ componentSuffix: "multicolumncombobox",
11
+ createTools(c, u, n, h) {
12
+ const p = [], f = (t) => `${n.groupName}_${t}`, r = u.current, d = !!r.onChange, b = [
13
+ {
14
+ name: "open",
15
+ description: `Open the ${n.dataName} multi-column combo box popup`,
16
+ commandType: o.Open,
17
+ enabled: !!r.onOpen
18
+ },
19
+ {
20
+ name: "close",
21
+ description: `Close the ${n.dataName} multi-column combo box popup`,
22
+ commandType: o.Close,
23
+ enabled: !!r.onClose
24
+ },
25
+ {
26
+ name: "set_value",
27
+ description: `Select an item from the ${n.dataName} multi-column combo box`,
28
+ commandType: o.SetValue,
29
+ enabled: d
30
+ },
31
+ {
32
+ name: "clear",
33
+ description: `Clear the ${n.dataName} multi-column combo box selection`,
34
+ commandType: o.Clear,
35
+ enabled: d
36
+ }
37
+ ], l = u.current.webMcp, x = typeof l == "object" && l !== null && typeof l.tools == "function" ? l.tools : void 0, g = x ? x(b) : b, v = async (t, a) => {
38
+ const e = u.current;
39
+ switch (t) {
40
+ case o.Open:
41
+ return e.onOpen && e.onOpen({ syntheticEvent: null, target: c }), { content: [{ type: "text", text: "Multi-column combo box opened." }] };
42
+ case o.SetValue: {
43
+ const i = e.data || [], C = e.textField, m = a.value, y = i.find((s) => C && typeof s == "object" && s !== null && s[C] === m ? !0 : s === m), S = y === void 0 ? m : y;
44
+ return e.onChange && e.onChange({ value: S, syntheticEvent: null, target: c }), { content: [{ type: "text", text: `Selected "${String(m)}".` }] };
45
+ }
46
+ case o.Clear:
47
+ return e.onChange && e.onChange({ value: null, syntheticEvent: null, target: c }), { content: [{ type: "text", text: "Selection cleared." }] };
48
+ case o.Close:
49
+ return e.onClose && e.onClose({ syntheticEvent: null, target: c }), { content: [{ type: "text", text: "Multi-column combo box closed." }] };
50
+ default:
51
+ return { content: [{ type: "text", text: `Unknown command: ${t}` }], isError: !0 };
52
+ }
53
+ };
54
+ for (const t of g) {
55
+ if (!t.enabled)
56
+ continue;
57
+ const a = t.commandType, e = T(a);
58
+ try {
59
+ p.push(
60
+ h.registerTool({
61
+ name: f(t.name),
62
+ description: t.description,
63
+ inputSchema: e,
64
+ execute: async (i) => v(a, i || {})
65
+ })
66
+ );
67
+ } catch {
68
+ }
69
+ }
70
+ return p;
71
+ }
72
+ };
73
+ export {
74
+ $ as multiColumnComboBoxAdapter
75
+ };
@@ -12,6 +12,8 @@ interface MultiSelectAdapterProps {
12
12
  textField?: string;
13
13
  dataItemKey?: string;
14
14
  onChange?: (event: Record<string, unknown>) => void;
15
+ onOpen?: (event: unknown) => void;
16
+ onClose?: (event: unknown) => void;
15
17
  webMcp?: unknown;
16
18
  }
17
19
  /** @hidden */
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../commands/multiselect.js");function v(c){return typeof c=="object"&&c!==null}const T={componentSuffix:"multiselect",createTools(c,f,s,h){const y=[],S=t=>`${s.groupName}_${t}`;if(!f.current.onChange)return y;const C=[{name:"add",description:`Add an item to the ${s.dataName} multi-select`,commandType:o.MultiSelectCommands.AddValue,enabled:!0},{name:"remove",description:`Remove an item from the ${s.dataName} multi-select`,commandType:o.MultiSelectCommands.RemoveValue,enabled:!0},{name:"clear",description:`Clear all selections from the ${s.dataName} multi-select`,commandType:o.MultiSelectCommands.Clear,enabled:!0}],u=f.current.webMcp,g=typeof u=="object"&&u!==null&&typeof u.tools=="function"?u.tools:void 0,x=g?g(C):C,b=async(t,m)=>{const e=f.current;switch(t){case o.MultiSelectCommands.AddValue:{const n=e.textField,i=e.dataItemKey,l=e.data||[],a=m.value,d=l.find(p=>v(p)&&(n&&p[n]===a||i&&p[i]===a)?!0:p===a),r=d===void 0?a:d,M=e.value||[];return e.onChange&&e.onChange({value:[...M,r],syntheticEvent:null,target:c}),{content:[{type:"text",text:`Added "${String(a)}".`}]}}case o.MultiSelectCommands.RemoveValue:{const n=e.textField,i=e.dataItemKey,l=m.value,d=(e.value||[]).filter(r=>v(r)&&(n&&r[n]===l||i&&r[i]===l)?!1:r!==l);return e.onChange&&e.onChange({value:d,syntheticEvent:null,target:c}),{content:[{type:"text",text:`Removed "${String(l)}".`}]}}case o.MultiSelectCommands.Clear:return e.onChange&&e.onChange({value:[],syntheticEvent:null,target:c}),{content:[{type:"text",text:"All selections cleared."}]};default:return{content:[{type:"text",text:`Unknown command: ${t}`}],isError:!0}}};for(const t of x){if(!t.enabled)continue;const m=o.getMultiSelectToolSchema(t.commandType),e=t.commandType;try{y.push(h.registerTool({name:S(t.name),description:t.description,inputSchema:m,execute:async n=>b(e,n||{})}))}catch{}}return y}};exports.multiSelectAdapter=T;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../commands/multiselect.js");function x(o){return typeof o=="object"&&o!==null}const $={componentSuffix:"multiselect",createTools(o,y,c,h){const C=[],g=n=>`${c.groupName}_${n}`,f=y.current;if(!f.onChange)return C;const S=[{name:"add",description:`Add an item to the ${c.dataName} multi-select`,commandType:t.MultiSelectCommands.AddValue,enabled:!0},{name:"remove",description:`Remove an item from the ${c.dataName} multi-select`,commandType:t.MultiSelectCommands.RemoveValue,enabled:!0},{name:"clear",description:`Clear all selections from the ${c.dataName} multi-select`,commandType:t.MultiSelectCommands.Clear,enabled:!0},{name:"open",description:`Open the ${c.dataName} multi-select popup`,commandType:t.MultiSelectCommands.Open,enabled:!!f.onOpen},{name:"close",description:`Close the ${c.dataName} multi-select popup`,commandType:t.MultiSelectCommands.Close,enabled:!!f.onClose}],u=y.current.webMcp,v=typeof u=="object"&&u!==null&&typeof u.tools=="function"?u.tools:void 0,M=v?v(S):S,b=async(n,m)=>{const e=y.current;switch(n){case t.MultiSelectCommands.AddValue:{const l=e.textField,i=e.dataItemKey,a=e.data||[],r=m.value,d=a.find(p=>x(p)&&(l&&p[l]===r||i&&p[i]===r)?!0:p===r),s=d===void 0?r:d,T=e.value||[];return e.onChange&&e.onChange({value:[...T,s],syntheticEvent:null,target:o}),{content:[{type:"text",text:`Added "${String(r)}".`}]}}case t.MultiSelectCommands.RemoveValue:{const l=e.textField,i=e.dataItemKey,a=m.value,d=(e.value||[]).filter(s=>x(s)&&(l&&s[l]===a||i&&s[i]===a)?!1:s!==a);return e.onChange&&e.onChange({value:d,syntheticEvent:null,target:o}),{content:[{type:"text",text:`Removed "${String(a)}".`}]}}case t.MultiSelectCommands.Clear:return e.onChange&&e.onChange({value:[],syntheticEvent:null,target:o}),{content:[{type:"text",text:"All selections cleared."}]};case t.MultiSelectCommands.Open:return e.onOpen&&e.onOpen({syntheticEvent:null,target:o}),{content:[{type:"text",text:"Multi-select popup opened."}]};case t.MultiSelectCommands.Close:return e.onClose&&e.onClose({syntheticEvent:null,target:o}),{content:[{type:"text",text:"Multi-select popup closed."}]};default:return{content:[{type:"text",text:`Unknown command: ${n}`}],isError:!0}}};for(const n of M){if(!n.enabled)continue;const m=t.getMultiSelectToolSchema(n.commandType),e=n.commandType;try{C.push(h.registerTool({name:g(n.name),description:n.description,inputSchema:m,execute:async l=>b(e,l||{})}))}catch{}}return C}};exports.multiSelectAdapter=$;
@@ -5,71 +5,87 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { MultiSelectCommands as l, getMultiSelectToolSchema as $ } from "../commands/multiselect.mjs";
9
- function x(o) {
8
+ import { MultiSelectCommands as n, getMultiSelectToolSchema as A } from "../commands/multiselect.mjs";
9
+ function v(o) {
10
10
  return typeof o == "object" && o !== null;
11
11
  }
12
- const k = {
12
+ const E = {
13
13
  componentSuffix: "multiselect",
14
- createTools(o, f, s, g) {
15
- const y = [], C = (t) => `${s.groupName}_${t}`;
16
- if (!f.current.onChange)
17
- return y;
18
- const h = [
14
+ createTools(o, y, a, g) {
15
+ const f = [], b = (t) => `${a.groupName}_${t}`, x = y.current;
16
+ if (!x.onChange)
17
+ return f;
18
+ const C = [
19
19
  {
20
20
  name: "add",
21
- description: `Add an item to the ${s.dataName} multi-select`,
22
- commandType: l.AddValue,
21
+ description: `Add an item to the ${a.dataName} multi-select`,
22
+ commandType: n.AddValue,
23
23
  enabled: !0
24
24
  },
25
25
  {
26
26
  name: "remove",
27
- description: `Remove an item from the ${s.dataName} multi-select`,
28
- commandType: l.RemoveValue,
27
+ description: `Remove an item from the ${a.dataName} multi-select`,
28
+ commandType: n.RemoveValue,
29
29
  enabled: !0
30
30
  },
31
31
  {
32
32
  name: "clear",
33
- description: `Clear all selections from the ${s.dataName} multi-select`,
34
- commandType: l.Clear,
33
+ description: `Clear all selections from the ${a.dataName} multi-select`,
34
+ commandType: n.Clear,
35
35
  enabled: !0
36
+ },
37
+ {
38
+ name: "open",
39
+ description: `Open the ${a.dataName} multi-select popup`,
40
+ commandType: n.Open,
41
+ enabled: !!x.onOpen
42
+ },
43
+ {
44
+ name: "close",
45
+ description: `Close the ${a.dataName} multi-select popup`,
46
+ commandType: n.Close,
47
+ enabled: !!x.onClose
36
48
  }
37
- ], u = f.current.webMcp, v = typeof u == "object" && u !== null && typeof u.tools == "function" ? u.tools : void 0, b = v ? v(h) : h, T = async (t, m) => {
38
- const e = f.current;
49
+ ], u = y.current.webMcp, h = typeof u == "object" && u !== null && typeof u.tools == "function" ? u.tools : void 0, T = h ? h(C) : C, $ = async (t, m) => {
50
+ const e = y.current;
39
51
  switch (t) {
40
- case l.AddValue: {
41
- const n = e.textField, i = e.dataItemKey, r = e.data || [], c = m.value, d = r.find((p) => x(p) && (n && p[n] === c || i && p[i] === c) ? !0 : p === c), a = d === void 0 ? c : d, S = e.value || [];
42
- return e.onChange && e.onChange({ value: [...S, a], syntheticEvent: null, target: o }), { content: [{ type: "text", text: `Added "${String(c)}".` }] };
52
+ case n.AddValue: {
53
+ const c = e.textField, i = e.dataItemKey, l = e.data || [], r = m.value, p = l.find((d) => v(d) && (c && d[c] === r || i && d[i] === r) ? !0 : d === r), s = p === void 0 ? r : p, S = e.value || [];
54
+ return e.onChange && e.onChange({ value: [...S, s], syntheticEvent: null, target: o }), { content: [{ type: "text", text: `Added "${String(r)}".` }] };
43
55
  }
44
- case l.RemoveValue: {
45
- const n = e.textField, i = e.dataItemKey, r = m.value, d = (e.value || []).filter((a) => x(a) && (n && a[n] === r || i && a[i] === r) ? !1 : a !== r);
46
- return e.onChange && e.onChange({ value: d, syntheticEvent: null, target: o }), { content: [{ type: "text", text: `Removed "${String(r)}".` }] };
56
+ case n.RemoveValue: {
57
+ const c = e.textField, i = e.dataItemKey, l = m.value, p = (e.value || []).filter((s) => v(s) && (c && s[c] === l || i && s[i] === l) ? !1 : s !== l);
58
+ return e.onChange && e.onChange({ value: p, syntheticEvent: null, target: o }), { content: [{ type: "text", text: `Removed "${String(l)}".` }] };
47
59
  }
48
- case l.Clear:
60
+ case n.Clear:
49
61
  return e.onChange && e.onChange({ value: [], syntheticEvent: null, target: o }), { content: [{ type: "text", text: "All selections cleared." }] };
62
+ case n.Open:
63
+ return e.onOpen && e.onOpen({ syntheticEvent: null, target: o }), { content: [{ type: "text", text: "Multi-select popup opened." }] };
64
+ case n.Close:
65
+ return e.onClose && e.onClose({ syntheticEvent: null, target: o }), { content: [{ type: "text", text: "Multi-select popup closed." }] };
50
66
  default:
51
67
  return { content: [{ type: "text", text: `Unknown command: ${t}` }], isError: !0 };
52
68
  }
53
69
  };
54
- for (const t of b) {
70
+ for (const t of T) {
55
71
  if (!t.enabled)
56
72
  continue;
57
- const m = $(t.commandType), e = t.commandType;
73
+ const m = A(t.commandType), e = t.commandType;
58
74
  try {
59
- y.push(
75
+ f.push(
60
76
  g.registerTool({
61
- name: C(t.name),
77
+ name: b(t.name),
62
78
  description: t.description,
63
79
  inputSchema: m,
64
- execute: async (n) => T(e, n || {})
80
+ execute: async (c) => $(e, c || {})
65
81
  })
66
82
  );
67
83
  } catch {
68
84
  }
69
85
  }
70
- return y;
86
+ return f;
71
87
  }
72
88
  };
73
89
  export {
74
- k as multiSelectAdapter
90
+ E as multiSelectAdapter
75
91
  };
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../commands/notification.js"),h={componentSuffix:"notification",createTools(l,s,c,u){const r=[],f=t=>`${c.groupName}_${t}`,m=[{name:"show",description:`Show a notification in the ${c.dataName} notification group.`,commandType:o.NotificationCommands.Show,enabled:!0},{name:"dismiss",description:`Dismiss all notifications in the ${c.dataName} notification group.`,commandType:o.NotificationCommands.Dismiss,enabled:!0}],n=s.current.webMcp,d=typeof n=="object"&&n!==null&&typeof n.tools=="function"?n.tools:void 0,p=d?d(m):m,y=async(t,a)=>{var e,i;switch(t){case o.NotificationCommands.Show:return{content:[{type:"text",text:`Notification shown: "${String(a.message)}".`}]};case o.NotificationCommands.Dismiss:return(i=(e=s.current).onClose)==null||i.call(e,{syntheticEvent:null,target:l}),{content:[{type:"text",text:"Notification dismissed."}]};default:return{content:[{type:"text",text:`Unknown command: ${t}`}],isError:!0}}};for(const t of p){if(!t.enabled)continue;const a=o.getNotificationToolSchema(t.commandType),e=t.commandType;try{r.push(u.registerTool({name:f(t.name),description:t.description,inputSchema:a,execute:async i=>y(e,i||{})}))}catch{}}return r}};exports.notificationAdapter=h;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../commands/notification.js"),x={componentSuffix:"notification",createTools(l,r,c,f){const m=[],p=t=>`${c.groupName}_${t}`,u=[{name:"show",description:`Show a notification in the ${c.dataName} notification group.`,commandType:n.NotificationCommands.Show,enabled:!0},{name:"dismiss",description:`Dismiss all notifications in the ${c.dataName} notification group.`,commandType:n.NotificationCommands.Dismiss,enabled:!0}],e=r.current.webMcp,d=typeof e=="object"&&e!==null&&typeof e.tools=="function"?e.tools:void 0,y=d?d(u):u,h=async(t,a)=>{var i,o;switch(t){case n.NotificationCommands.Show:return{content:[{type:"text",text:`Notification shown: "${String(a.message)}".`}]};case n.NotificationCommands.Dismiss:return(o=(i=r.current).onClose)==null||o.call(i,{syntheticEvent:null,target:l}),{content:[{type:"text",text:"Notification dismissed."}]};default:return{content:[{type:"text",text:`Unknown command: ${t}`}],isError:!0}}};for(const t of y){if(!t.enabled)continue;const a=n.getNotificationToolSchema(t.commandType),i=t.commandType,o=t.execute;try{m.push(f.registerTool({name:p(t.name),description:t.description,inputSchema:a,execute:o?async s=>await o(s):async s=>h(i,s||{})}))}catch{}}return m}};exports.notificationAdapter=x;