@ethisyscore/plugin-ui 1.75.0 → 1.77.0

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.
@@ -1,8 +1,223 @@
1
- import { FormControl, InputLabel, FilledInput, InputAdornment, IconButton, Box, Alert, AlertTitle, Typography, Stack, Chip, Button, CircularProgress } from '@mui/material';
1
+ import { FormControl, InputLabel, FilledInput, InputAdornment, IconButton, Box, Alert, AlertTitle, Typography, Stack, DialogTitle, DialogContent, Divider, Button, Chip, Collapse, DialogActions, CircularProgress, Dialog as Dialog$1 } from '@mui/material';
2
2
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
3
  import { memo, useState, useId, useRef, useEffect, useCallback } from 'react';
4
4
 
5
5
  // src/components/ui/index.ts
6
+ function Dialog(props) {
7
+ return /* @__PURE__ */ jsx(Dialog$1, { disableScrollLock: true, disableRestoreFocus: true, ...props });
8
+ }
9
+ function NiBinEmpty({ className, variant = "outlined", size = "medium" }) {
10
+ const iconSize = sizeHelper(size);
11
+ const iconStrokeWidth = strokeSizeHelper(iconSize);
12
+ if (variant === "outlined") {
13
+ return /* @__PURE__ */ jsxs(
14
+ "svg",
15
+ {
16
+ width: iconSize,
17
+ height: iconSize,
18
+ className,
19
+ viewBox: "0 0 24 24",
20
+ fill: "none",
21
+ xmlns: "http://www.w3.org/2000/svg",
22
+ children: [
23
+ /* @__PURE__ */ jsx(
24
+ "path",
25
+ {
26
+ d: "M6 6L5.48806 9.58357C5.16413 11.8511 5.14395 14.1516 5.42806 16.4245L5.51601 17.1281C5.80316 19.4253 7.56538 21.2609 9.84894 21.6415V21.6415C11.2732 21.8789 12.7268 21.8789 14.1511 21.6415V21.6415C16.4346 21.2609 18.1968 19.4253 18.484 17.1281L18.5719 16.4245C18.856 14.1516 18.8359 11.8511 18.5119 9.58357L18 6",
27
+ stroke: "currentColor",
28
+ strokeWidth: iconStrokeWidth,
29
+ strokeLinecap: "round"
30
+ }
31
+ ),
32
+ /* @__PURE__ */ jsx(
33
+ "path",
34
+ {
35
+ d: "M15 5L14.9062 4.43717C14.7408 3.4451 14.6582 2.94906 14.3711 2.60286C14.2462 2.45218 14.0957 2.32469 13.9265 2.22623C13.5378 2 13.035 2 12.0292 2L11.9708 2C10.965 2 10.4622 2 10.0735 2.22623C9.90431 2.32469 9.75381 2.45219 9.62888 2.60286C9.34182 2.94906 9.25915 3.4451 9.09381 4.43717L9 5",
36
+ stroke: "currentColor",
37
+ strokeWidth: iconStrokeWidth,
38
+ strokeLinecap: "round",
39
+ strokeLinejoin: "round"
40
+ }
41
+ ),
42
+ /* @__PURE__ */ jsx(
43
+ "path",
44
+ {
45
+ d: "M20 6L18.2017 5.77522C14.0833 5.26041 9.91673 5.26041 5.79826 5.77522L4 6",
46
+ stroke: "currentColor",
47
+ strokeWidth: iconStrokeWidth,
48
+ strokeLinecap: "round"
49
+ }
50
+ )
51
+ ]
52
+ }
53
+ );
54
+ } else {
55
+ return /* @__PURE__ */ jsxs(
56
+ "svg",
57
+ {
58
+ width: iconSize,
59
+ height: iconSize,
60
+ className,
61
+ viewBox: "0 0 24 24",
62
+ fill: "none",
63
+ xmlns: "http://www.w3.org/2000/svg",
64
+ children: [
65
+ /* @__PURE__ */ jsx(
66
+ "path",
67
+ {
68
+ d: "M9.74018 5.12304C9.6721 5.53152 9.28536 5.80813 8.8769 5.74023C8.46843 5.67215 8.19181 5.28541 8.25971 4.87695L8.35444 4.31347C8.43472 3.83178 8.50246 3.41913 8.59077 3.08593C8.68246 2.74003 8.81179 2.41337 9.0517 2.12402C9.23282 1.90562 9.45102 1.72085 9.69623 1.57812C10.0211 1.38906 10.3644 1.31483 10.7206 1.28125C11.0639 1.24892 11.4822 1.25 11.9706 1.25L12.0292 1.25C12.5177 1.25 12.936 1.24892 13.2792 1.28125C13.6355 1.31483 13.9788 1.38906 14.3037 1.57812C14.5489 1.72085 14.7671 1.90562 14.9482 2.12402C15.1881 2.41337 15.3174 2.74003 15.4091 3.08593C15.4974 3.41913 15.5652 3.83177 15.6455 4.31347L15.7402 4.87695L15.749 4.95312C15.7732 5.33241 15.506 5.6764 15.123 5.74023C14.74 5.80389 14.3763 5.56494 14.2763 5.19824L14.2597 5.12304L14.166 4.56054C14.081 4.05049 14.025 3.71896 13.9589 3.46972C13.8964 3.23378 13.8409 3.13889 13.7939 3.08203C13.7252 2.99916 13.6418 2.92817 13.5488 2.87402C13.4849 2.83695 13.3818 2.79831 13.1386 2.77539C12.8819 2.75121 12.5462 2.75 12.0292 2.75L11.9706 2.75C11.4537 2.75 11.1179 2.75121 10.8613 2.77539C10.6181 2.79831 10.515 2.83695 10.4511 2.87402C10.3581 2.92817 10.2747 2.99916 10.206 3.08203C10.1589 3.13889 10.1035 3.23378 10.041 3.46972C9.97489 3.71896 9.91894 4.05049 9.83393 4.56054L9.74018 5.12304Z",
69
+ fill: "currentColor"
70
+ }
71
+ ),
72
+ /* @__PURE__ */ jsx(
73
+ "path",
74
+ {
75
+ fillRule: "evenodd",
76
+ clipRule: "evenodd",
77
+ d: "M5.94819 5.00114C9.96612 4.51861 14.0279 4.51807 18.0459 5.00016C18.1288 5.01011 18.212 5.02008 18.2949 5.03043L20.0927 5.25504L20.1689 5.26872C20.5391 5.35382 20.792 5.70788 20.7441 6.09293C20.6958 6.47814 20.3633 6.75806 19.9834 6.74918L19.9072 6.7443L18.8447 6.61051L19.2548 9.4777C19.5881 11.8107 19.6086 14.1783 19.3164 16.5168L19.2285 17.2209C18.9001 19.8471 16.8851 21.9459 14.2744 22.381C12.7685 22.632 11.2314 22.632 9.72554 22.381C7.11486 21.9458 5.09978 19.8471 4.77144 17.2209L4.68355 16.5168C4.39132 14.1783 4.41185 11.8107 4.74507 9.4777L5.15425 6.61051L4.09273 6.7443L4.01655 6.74918C3.63657 6.75805 3.30414 6.47813 3.25581 6.09293C3.20471 5.68211 3.49633 5.30642 3.90718 5.25504L5.70503 5.03043C5.78598 5.02032 5.86721 5.01086 5.94819 5.00114Z",
78
+ fill: "currentColor"
79
+ }
80
+ )
81
+ ]
82
+ }
83
+ );
84
+ }
85
+ }
86
+ function NiCheck({ className, variant = "outlined", size = "medium" }) {
87
+ const iconSize = sizeHelper(size);
88
+ const iconStrokeWidth = strokeSizeHelper(iconSize);
89
+ if (variant === "outlined") {
90
+ return /* @__PURE__ */ jsx(
91
+ "svg",
92
+ {
93
+ width: iconSize,
94
+ height: iconSize,
95
+ className,
96
+ viewBox: "0 0 24 24",
97
+ fill: "none",
98
+ xmlns: "http://www.w3.org/2000/svg",
99
+ children: /* @__PURE__ */ jsx(
100
+ "path",
101
+ {
102
+ d: "M18 7.81836L11.0125 15.7798C10.8216 15.9974 10.4864 16.0079 10.2822 15.8026L6.5 12.0002",
103
+ stroke: "currentColor",
104
+ strokeWidth: iconStrokeWidth,
105
+ strokeLinecap: "round"
106
+ }
107
+ )
108
+ }
109
+ );
110
+ } else {
111
+ return /* @__PURE__ */ jsx(
112
+ "svg",
113
+ {
114
+ width: iconSize,
115
+ height: iconSize,
116
+ className,
117
+ viewBox: "0 0 24 24",
118
+ fill: "none",
119
+ xmlns: "http://www.w3.org/2000/svg",
120
+ children: /* @__PURE__ */ jsx(
121
+ "path",
122
+ {
123
+ d: "M18.4951 7.25492C18.7867 7.51112 18.8318 7.9435 18.6113 8.25297L18.5634 8.31352L11.5761 16.2745C11.0989 16.8182 10.2613 16.8446 9.75095 16.3321L5.96774 12.5293L5.91696 12.4717C5.67772 12.1766 5.69574 11.7426 5.97067 11.4688C6.26435 11.1767 6.74009 11.178 7.0322 11.4717L10.6259 15.083L17.4365 7.32328L17.4902 7.26859C17.7685 7.00989 18.2033 6.99884 18.4951 7.25492Z",
124
+ fill: "currentColor"
125
+ }
126
+ )
127
+ }
128
+ );
129
+ }
130
+ }
131
+ function NiChevronDownSmall({ className, variant = "outlined", size = "medium" }) {
132
+ const iconSize = sizeHelper(size);
133
+ const iconStrokeWidth = strokeSizeHelper(iconSize);
134
+ if (variant === "outlined") {
135
+ return /* @__PURE__ */ jsx(
136
+ "svg",
137
+ {
138
+ width: iconSize,
139
+ height: iconSize,
140
+ className,
141
+ viewBox: "0 0 24 24",
142
+ fill: "none",
143
+ xmlns: "http://www.w3.org/2000/svg",
144
+ children: /* @__PURE__ */ jsx(
145
+ "path",
146
+ {
147
+ d: "M8 10L11.1515 13.1515C11.6201 13.6201 12.3799 13.6201 12.8485 13.1515L16 10",
148
+ stroke: "currentColor",
149
+ strokeWidth: iconStrokeWidth,
150
+ strokeLinecap: "round"
151
+ }
152
+ )
153
+ }
154
+ );
155
+ } else {
156
+ return /* @__PURE__ */ jsx(
157
+ "svg",
158
+ {
159
+ width: iconSize,
160
+ height: iconSize,
161
+ className,
162
+ viewBox: "0 0 24 24",
163
+ fill: "none",
164
+ xmlns: "http://www.w3.org/2000/svg",
165
+ children: /* @__PURE__ */ jsx(
166
+ "path",
167
+ {
168
+ d: "M7.46967 9.46967C7.17678 9.76256 7.17678 10.2373 7.46967 10.5302L10.621 13.6816C11.3826 14.4431 12.6173 14.4431 13.3788 13.6816L16.5302 10.5302C16.8231 10.2373 16.8231 9.76256 16.5302 9.46967C16.2373 9.17678 15.7626 9.17678 15.4697 9.46967L12.3183 12.621C12.1426 12.7968 11.8573 12.7968 11.6816 12.621L8.53022 9.46967C8.23732 9.17678 7.76256 9.17678 7.46967 9.46967Z",
169
+ fill: "currentColor"
170
+ }
171
+ )
172
+ }
173
+ );
174
+ }
175
+ }
176
+ function NiChevronUpSmall({ className, variant = "outlined", size = "medium" }) {
177
+ const iconSize = sizeHelper(size);
178
+ const iconStrokeWidth = strokeSizeHelper(iconSize);
179
+ if (variant === "outlined") {
180
+ return /* @__PURE__ */ jsx(
181
+ "svg",
182
+ {
183
+ width: iconSize,
184
+ height: iconSize,
185
+ className,
186
+ viewBox: "0 0 24 24",
187
+ fill: "none",
188
+ xmlns: "http://www.w3.org/2000/svg",
189
+ children: /* @__PURE__ */ jsx(
190
+ "path",
191
+ {
192
+ d: "M16 14L12.8485 10.8485C12.3799 10.3799 11.6201 10.3799 11.1515 10.8485L8 14",
193
+ stroke: "currentColor",
194
+ strokeWidth: iconStrokeWidth,
195
+ strokeLinecap: "round"
196
+ }
197
+ )
198
+ }
199
+ );
200
+ } else {
201
+ return /* @__PURE__ */ jsx(
202
+ "svg",
203
+ {
204
+ width: iconSize,
205
+ height: iconSize,
206
+ className,
207
+ viewBox: "0 0 24 24",
208
+ fill: "none",
209
+ xmlns: "http://www.w3.org/2000/svg",
210
+ children: /* @__PURE__ */ jsx(
211
+ "path",
212
+ {
213
+ d: "M16.5303 14.5303C16.8232 14.2374 16.8232 13.7627 16.5303 13.4698L13.379 10.3184C12.6174 9.55689 11.3827 9.55689 10.6212 10.3184L7.46978 13.4698C7.17689 13.7627 7.17689 14.2374 7.46978 14.5303C7.76268 14.8232 8.23744 14.8232 8.53033 14.5303L11.6817 11.379C11.8574 11.2032 12.1427 11.2032 12.3184 11.379L15.4698 14.5303C15.7627 14.8232 16.2374 14.8232 16.5303 14.5303Z",
214
+ fill: "currentColor"
215
+ }
216
+ )
217
+ }
218
+ );
219
+ }
220
+ }
6
221
  function NiCross({ className, variant = "outlined", size = "medium" }) {
7
222
  const iconSize = sizeHelper(size);
8
223
  const iconStrokeWidth = strokeSizeHelper(iconSize);
@@ -28,7 +243,267 @@ function NiCross({ className, variant = "outlined", size = "medium" }) {
28
243
  }
29
244
  );
30
245
  } else {
31
- return /* @__PURE__ */ jsx(
246
+ return /* @__PURE__ */ jsx(
247
+ "svg",
248
+ {
249
+ width: iconSize,
250
+ height: iconSize,
251
+ className,
252
+ viewBox: "0 0 24 24",
253
+ fill: "none",
254
+ xmlns: "http://www.w3.org/2000/svg",
255
+ children: /* @__PURE__ */ jsx(
256
+ "path",
257
+ {
258
+ d: "M15.4698 7.46963C15.7626 7.17684 16.2374 7.17684 16.5303 7.46963C16.8232 7.7625 16.8231 8.23728 16.5303 8.53018L13.0606 11.9999L16.5303 15.4696C16.8232 15.7625 16.8231 16.2373 16.5303 16.5302C16.2557 16.8048 15.821 16.8223 15.5264 16.5819L15.4698 16.5302L12 13.0604L8.53032 16.5302C8.23743 16.8231 7.76267 16.8231 7.46977 16.5302C7.17697 16.2373 7.17691 15.7625 7.46977 15.4696L10.9395 11.9999L7.46977 8.53018L7.41801 8.47354C7.1778 8.17898 7.19527 7.74421 7.46977 7.46963C7.76264 7.17676 8.23742 7.17682 8.53032 7.46963L12 10.9394L15.4698 7.46963Z",
259
+ fill: "currentColor"
260
+ }
261
+ )
262
+ }
263
+ );
264
+ }
265
+ }
266
+ function NiExclamationHexagon({
267
+ className,
268
+ variant = "outlined",
269
+ size = "medium",
270
+ oneTone = false
271
+ }) {
272
+ const iconSize = sizeHelper(size);
273
+ const iconStrokeWidth = strokeSizeHelper(iconSize);
274
+ if (variant === "outlined") {
275
+ return /* @__PURE__ */ jsxs(
276
+ "svg",
277
+ {
278
+ width: iconSize,
279
+ height: iconSize,
280
+ className,
281
+ viewBox: "0 0 24 24",
282
+ fill: "none",
283
+ xmlns: "http://www.w3.org/2000/svg",
284
+ children: [
285
+ /* @__PURE__ */ jsx(
286
+ "path",
287
+ {
288
+ d: "M2.43719 13.4575C2.15201 12.5069 2.15199 11.4936 2.43715 10.543L2.52265 10.258C3.16817 8.10616 4.22224 6.09886 5.62723 4.34584V4.34584C6.32329 3.47736 7.30701 2.88645 8.40067 2.67987L8.52188 2.65698C10.8203 2.22283 13.1797 2.22283 15.4781 2.65698L15.5993 2.67987C16.693 2.88645 17.6767 3.47737 18.3728 4.34588V4.34588C19.7778 6.09887 20.8318 8.10614 21.4774 10.2579L21.5628 10.5427C21.848 11.4933 21.848 12.5067 21.5628 13.4573L21.4774 13.7421C20.8318 15.8939 19.7778 17.9011 18.3728 19.6541V19.6541C17.6767 20.5226 16.693 21.1135 15.5993 21.3201L15.4781 21.343C13.1797 21.7772 10.8203 21.7772 8.52187 21.343L8.40075 21.3201C7.30704 21.1135 6.32327 20.5226 5.62718 19.6541V19.6541C4.22222 17.9011 3.16815 15.8939 2.52259 13.7421L2.43719 13.4575Z",
289
+ stroke: "currentColor",
290
+ strokeWidth: iconStrokeWidth
291
+ }
292
+ ),
293
+ /* @__PURE__ */ jsx(
294
+ "path",
295
+ {
296
+ opacity: oneTone ? 1 : 0.6,
297
+ d: "M12 8V13",
298
+ stroke: "currentColor",
299
+ strokeWidth: iconStrokeWidth,
300
+ strokeLinecap: "round"
301
+ }
302
+ ),
303
+ /* @__PURE__ */ jsx(
304
+ "path",
305
+ {
306
+ opacity: oneTone ? 1 : 0.6,
307
+ d: "M12 15.5V16",
308
+ stroke: "currentColor",
309
+ strokeWidth: iconStrokeWidth,
310
+ strokeLinecap: "round"
311
+ }
312
+ )
313
+ ]
314
+ }
315
+ );
316
+ } else {
317
+ return /* @__PURE__ */ jsxs(
318
+ "svg",
319
+ {
320
+ width: iconSize,
321
+ height: iconSize,
322
+ className,
323
+ viewBox: "0 0 24 24",
324
+ fill: "none",
325
+ xmlns: "http://www.w3.org/2000/svg",
326
+ children: [
327
+ /* @__PURE__ */ jsx(
328
+ "path",
329
+ {
330
+ fillRule: "evenodd",
331
+ clipRule: "evenodd",
332
+ d: "M8.38258 1.92059C10.7727 1.46912 13.2268 1.46924 15.617 1.92059L15.739 1.94305C17.0082 2.18287 18.1499 2.86991 18.9578 3.87762C20.4228 5.70553 21.5228 7.79896 22.1961 10.0427L22.281 10.3278C22.6083 11.4187 22.6082 12.5826 22.281 13.6735L22.1961 13.9577C21.5229 16.2016 20.4229 18.2956 18.9578 20.1237C18.1499 21.1316 17.0083 21.8174 15.739 22.0573L15.6179 22.0807C13.2277 22.5321 10.7728 22.5322 8.38258 22.0807L8.26148 22.0573C6.99216 21.8174 5.84965 21.1317 5.04176 20.1237C3.57682 18.2957 2.47761 16.2015 1.80445 13.9577L1.71852 13.6735C1.39142 12.5826 1.39129 11.4187 1.71852 10.3278L1.80445 10.0427C2.47762 7.79905 3.57688 5.70548 5.04176 3.87762C5.8497 2.86971 6.99217 2.18286 8.26148 1.94305L8.38258 1.92059ZM11.9998 14.7507C11.5857 14.7508 11.2498 15.0865 11.2498 15.5007V16.0007C11.2499 16.4146 11.5858 16.7505 11.9998 16.7507C12.4139 16.7507 12.7496 16.4147 12.7498 16.0007V15.5007C12.7498 15.0865 12.414 14.7507 11.9998 14.7507ZM11.9998 7.25067C11.5857 7.25082 11.2498 7.58655 11.2498 8.00067V13.0007C11.2499 13.4146 11.5858 13.7505 11.9998 13.7507C12.4139 13.7507 12.7496 13.4147 12.7498 13.0007V8.00067C12.7498 7.58645 12.414 7.25067 11.9998 7.25067Z",
333
+ fill: "currentColor"
334
+ }
335
+ ),
336
+ /* @__PURE__ */ jsx(
337
+ "path",
338
+ {
339
+ opacity: oneTone ? 0 : 0.4,
340
+ d: "M12 14.75C12.4142 14.75 12.75 15.0858 12.75 15.5V16C12.75 16.4142 12.4142 16.75 12 16.75C11.5858 16.75 11.25 16.4142 11.25 16V15.5C11.25 15.0858 11.5858 14.75 12 14.75Z",
341
+ fill: "currentColor"
342
+ }
343
+ ),
344
+ /* @__PURE__ */ jsx(
345
+ "path",
346
+ {
347
+ opacity: oneTone ? 0 : 0.4,
348
+ d: "M12 7.25C12.4142 7.25 12.75 7.58579 12.75 8V13C12.75 13.4142 12.4142 13.75 12 13.75C11.5858 13.75 11.25 13.4142 11.25 13V8C11.25 7.58579 11.5858 7.25 12 7.25Z",
349
+ fill: "currentColor"
350
+ }
351
+ )
352
+ ]
353
+ }
354
+ );
355
+ }
356
+ }
357
+ function NiPlus({ className, variant = "outlined", size = "medium" }) {
358
+ const iconSize = sizeHelper(size);
359
+ const iconStrokeWidth = strokeSizeHelper(iconSize);
360
+ if (variant === "outlined") {
361
+ return /* @__PURE__ */ jsx(
362
+ "svg",
363
+ {
364
+ width: iconSize,
365
+ height: iconSize,
366
+ className,
367
+ viewBox: "0 0 24 24",
368
+ fill: "none",
369
+ xmlns: "http://www.w3.org/2000/svg",
370
+ children: /* @__PURE__ */ jsx(
371
+ "path",
372
+ {
373
+ d: "M7.00002 12.0005H16.9998M12.0006 7L12.0006 16.9998",
374
+ stroke: "currentColor",
375
+ strokeWidth: iconStrokeWidth,
376
+ strokeLinecap: "round"
377
+ }
378
+ )
379
+ }
380
+ );
381
+ } else {
382
+ return /* @__PURE__ */ jsx(
383
+ "svg",
384
+ {
385
+ width: iconSize,
386
+ height: iconSize,
387
+ className,
388
+ viewBox: "0 0 24 24",
389
+ fill: "none",
390
+ xmlns: "http://www.w3.org/2000/svg",
391
+ children: /* @__PURE__ */ jsx(
392
+ "path",
393
+ {
394
+ d: "M11.251 17L11.251 12.751H7.00003C6.58598 12.751 6.25028 12.415 6.25003 12.001C6.25003 11.5868 6.58581 11.251 7.00002 11.251H11.251L11.251 7C11.251 6.58579 11.5868 6.25 12.001 6.25C12.415 6.25019 12.751 6.58591 12.751 7L12.751 11.251H17L17.0762 11.2539C17.4546 11.2921 17.75 11.6125 17.75 12.001C17.7498 12.3892 17.4544 12.7088 17.0762 12.7471L17 12.751H12.751L12.751 17C12.7509 17.414 12.415 17.7498 12.001 17.75C11.5869 17.75 11.2512 17.4141 11.251 17Z",
395
+ fill: "currentColor"
396
+ }
397
+ )
398
+ }
399
+ );
400
+ }
401
+ }
402
+ function NiSearch({
403
+ className,
404
+ variant = "outlined",
405
+ size = "medium",
406
+ oneTone = false
407
+ }) {
408
+ const iconSize = sizeHelper(size);
409
+ const iconStrokeWidth = strokeSizeHelper(iconSize);
410
+ if (variant === "outlined") {
411
+ return /* @__PURE__ */ jsxs(
412
+ "svg",
413
+ {
414
+ width: iconSize,
415
+ height: iconSize,
416
+ className,
417
+ viewBox: "0 0 24 24",
418
+ fill: "none",
419
+ xmlns: "http://www.w3.org/2000/svg",
420
+ children: [
421
+ /* @__PURE__ */ jsx(
422
+ "path",
423
+ {
424
+ opacity: oneTone ? 1 : 0.6,
425
+ d: "M22 22L18.5 18.5",
426
+ stroke: "currentColor",
427
+ strokeWidth: iconStrokeWidth,
428
+ strokeLinecap: "round"
429
+ }
430
+ ),
431
+ /* @__PURE__ */ jsx("circle", { cx: "11.5", cy: "11.5", r: "9.5", stroke: "currentColor", strokeWidth: iconStrokeWidth })
432
+ ]
433
+ }
434
+ );
435
+ } else {
436
+ return /* @__PURE__ */ jsxs(
437
+ "svg",
438
+ {
439
+ width: iconSize,
440
+ height: iconSize,
441
+ className,
442
+ viewBox: "0 0 24 24",
443
+ fill: "none",
444
+ xmlns: "http://www.w3.org/2000/svg",
445
+ children: [
446
+ /* @__PURE__ */ jsx(
447
+ "path",
448
+ {
449
+ opacity: oneTone ? 1 : 0.4,
450
+ d: "M19.0303 17.9697C18.7374 17.6768 18.2627 17.6768 17.9698 17.9697C17.6769 18.2626 17.6769 18.7373 17.9698 19.0302L21.4698 22.5302C21.7627 22.8231 22.2374 22.8231 22.5303 22.5302C22.8232 22.2373 22.8232 21.7626 22.5303 21.4697L19.0303 17.9697Z",
451
+ fill: "currentColor"
452
+ }
453
+ ),
454
+ /* @__PURE__ */ jsx(
455
+ "path",
456
+ {
457
+ d: "M11.5 1.25C17.1609 1.25 21.75 5.83908 21.75 11.5C21.75 17.1609 17.1609 21.75 11.5 21.75C5.83908 21.75 1.25 17.1609 1.25 11.5C1.25 5.83908 5.83908 1.25 11.5 1.25Z",
458
+ fill: "currentColor"
459
+ }
460
+ )
461
+ ]
462
+ }
463
+ );
464
+ }
465
+ }
466
+ function NiSettings({
467
+ className,
468
+ variant = "outlined",
469
+ size = "medium",
470
+ oneTone = false
471
+ }) {
472
+ const iconSize = sizeHelper(size);
473
+ const iconStrokeWidth = strokeSizeHelper(iconSize);
474
+ if (variant === "outlined") {
475
+ return /* @__PURE__ */ jsxs(
476
+ "svg",
477
+ {
478
+ width: iconSize,
479
+ height: iconSize,
480
+ className,
481
+ viewBox: "0 0 24 24",
482
+ fill: "none",
483
+ xmlns: "http://www.w3.org/2000/svg",
484
+ children: [
485
+ /* @__PURE__ */ jsx(
486
+ "path",
487
+ {
488
+ d: "M19.3712 11.1182L20.3235 10.3478C21.0169 9.78681 21.2876 8.85332 21.0018 8.00845C20.7764 7.34225 20.4214 6.72728 19.9571 6.19901C19.3683 5.52905 18.4246 5.2967 17.5921 5.61673L16.4487 6.05624L16.3289 6.1025C15.7233 6.33735 15.0468 5.96142 14.9455 5.31981L14.7317 3.96598C14.5926 3.08499 13.9195 2.38385 13.0449 2.20894C12.3553 2.07101 11.6452 2.07101 10.9555 2.20894C10.081 2.38385 9.40786 3.08499 9.26876 3.96598L9.05497 5.31996C8.95366 5.96157 8.27712 6.3375 7.6715 6.10265L7.55132 6.05624L6.40797 5.61673C5.57546 5.2967 4.63171 5.52905 4.04293 6.19901C3.57867 6.72728 3.22362 7.34225 2.99825 8.00845C2.71244 8.85332 2.98309 9.7868 3.6765 10.3478L4.6288 11.1182L4.7128 11.186C5.22952 11.6019 5.22952 12.3968 4.7128 12.8127L4.62904 12.8803L3.67673 13.6507C2.98332 14.2117 2.71267 15.1452 2.99848 15.9901C3.22385 16.6563 3.5789 17.2712 4.04316 17.7995C4.63194 18.4695 5.57568 18.7018 6.4082 18.3818L7.55154 17.9423L7.67131 17.896C8.27692 17.6612 8.95346 18.0371 9.05476 18.6787L9.26876 20.034C9.40786 20.915 10.081 21.6161 10.9555 21.7911C11.6452 21.929 12.3553 21.929 13.0449 21.7911C13.9195 21.6161 14.5926 20.915 14.7317 20.034L14.9457 18.6789C15.047 18.0373 15.7235 17.6613 16.3291 17.8962L16.4485 17.9423L17.5918 18.3818C18.4243 18.7018 19.3681 18.4695 19.9569 17.7995C20.4211 17.2712 20.7762 16.6563 21.0016 15.9901C21.2874 15.1452 21.0167 14.2117 20.3233 13.6507L19.371 12.8803L19.2872 12.8127C18.7705 12.3968 18.7705 11.6019 19.2872 11.186L19.3712 11.1182Z",
489
+ stroke: "currentColor",
490
+ strokeWidth: iconStrokeWidth
491
+ }
492
+ ),
493
+ /* @__PURE__ */ jsx(
494
+ "path",
495
+ {
496
+ opacity: oneTone ? 1 : 0.6,
497
+ d: "M11.0137 14.8356C10.0655 14.6776 9.32242 13.9345 9.16438 12.9863V12.9863C9.05555 12.3333 9.05555 11.6667 9.16438 11.0137V11.0137C9.32242 10.0655 10.0655 9.32242 11.0137 9.16438V9.16438C11.6667 9.05555 12.3333 9.05555 12.9863 9.16438V9.16438C13.9345 9.32242 14.6776 10.0655 14.8356 11.0137V11.0137C14.9445 11.6667 14.9445 12.3333 14.8356 12.9863V12.9863C14.6776 13.9345 13.9345 14.6776 12.9863 14.8356V14.8356C12.3333 14.9445 11.6667 14.9445 11.0137 14.8356V14.8356Z",
498
+ stroke: "currentColor",
499
+ strokeWidth: iconStrokeWidth
500
+ }
501
+ )
502
+ ]
503
+ }
504
+ );
505
+ } else {
506
+ return /* @__PURE__ */ jsxs(
32
507
  "svg",
33
508
  {
34
509
  width: iconSize,
@@ -37,18 +512,30 @@ function NiCross({ className, variant = "outlined", size = "medium" }) {
37
512
  viewBox: "0 0 24 24",
38
513
  fill: "none",
39
514
  xmlns: "http://www.w3.org/2000/svg",
40
- children: /* @__PURE__ */ jsx(
41
- "path",
42
- {
43
- d: "M15.4698 7.46963C15.7626 7.17684 16.2374 7.17684 16.5303 7.46963C16.8232 7.7625 16.8231 8.23728 16.5303 8.53018L13.0606 11.9999L16.5303 15.4696C16.8232 15.7625 16.8231 16.2373 16.5303 16.5302C16.2557 16.8048 15.821 16.8223 15.5264 16.5819L15.4698 16.5302L12 13.0604L8.53032 16.5302C8.23743 16.8231 7.76267 16.8231 7.46977 16.5302C7.17697 16.2373 7.17691 15.7625 7.46977 15.4696L10.9395 11.9999L7.46977 8.53018L7.41801 8.47354C7.1778 8.17898 7.19527 7.74421 7.46977 7.46963C7.76264 7.17676 8.23742 7.17682 8.53032 7.46963L12 10.9394L15.4698 7.46963Z",
44
- fill: "currentColor"
45
- }
46
- )
515
+ children: [
516
+ /* @__PURE__ */ jsx(
517
+ "path",
518
+ {
519
+ fillRule: "evenodd",
520
+ clipRule: "evenodd",
521
+ d: "M10.8077 1.4739C11.5943 1.31662 12.405 1.31667 13.1915 1.4739C14.3736 1.71051 15.2836 2.6581 15.4718 3.8489L15.6857 5.20339C15.7102 5.35695 15.8828 5.47062 16.0568 5.40359L16.0577 5.40261L16.1779 5.35671L17.3224 4.91726C18.4478 4.48471 19.7237 4.79879 20.5197 5.70437C21.0492 6.30697 21.454 7.00892 21.7111 7.76882C22.0973 8.911 21.7315 10.1726 20.7941 10.9309L19.8419 11.7014L19.8409 11.7024L19.757 11.7698C19.6316 11.8711 19.615 12.0585 19.7091 12.1809L19.757 12.2288L19.8409 12.2971L20.7941 13.0677C21.7316 13.8261 22.0975 15.0885 21.7111 16.2307C21.454 16.9906 21.0492 17.6926 20.5197 18.2952C19.7236 19.2007 18.4468 19.5149 17.3214 19.0823L16.1788 18.6428L16.1779 18.6419L16.0577 18.596C15.8836 18.5289 15.71 18.6424 15.6857 18.7962L15.4718 20.1516C15.2836 21.3423 14.3736 22.29 13.1915 22.5266C12.405 22.6839 11.5942 22.6839 10.8077 22.5266C9.62572 22.29 8.71569 21.3423 8.52747 20.1516L8.31263 18.7962C8.28832 18.6422 8.11592 18.5283 7.94153 18.596L7.82044 18.6419L7.81946 18.6428L6.67689 19.0823C5.55148 19.5147 4.27454 19.2008 3.47864 18.2952C2.94913 17.6926 2.54431 16.9906 2.28724 16.2307C1.9009 15.0886 2.26705 13.8261 3.20423 13.0677L4.15638 12.2971L4.24134 12.2298C4.38509 12.114 4.3851 11.8865 4.24134 11.7708L4.15735 11.7024L4.15638 11.7014L3.20423 10.9309C2.26711 10.1726 1.9012 8.91081 2.28724 7.76882C2.54426 7.00904 2.94923 6.30691 3.47864 5.70437C4.27453 4.79875 5.5505 4.48491 6.67591 4.91726L7.81946 5.35671L7.94056 5.40359C8.11483 5.47117 8.2891 5.35719 8.3136 5.20339L8.52747 3.8489C8.71565 2.65819 9.62571 1.71055 10.8077 1.4739ZM13.1085 8.42507C12.3742 8.30279 11.624 8.30273 10.8898 8.42507C9.6257 8.63598 8.63466 9.62675 8.42396 10.8909C8.30163 11.6252 8.30162 12.3753 8.42396 13.1096C8.63485 14.3735 9.62587 15.3646 10.8898 15.5755C11.624 15.6978 12.3743 15.6977 13.1085 15.5755C14.3725 15.3647 15.3634 14.3736 15.5743 13.1096C15.6967 12.3753 15.6967 11.6253 15.5743 10.8909C15.3636 9.62676 14.3726 8.63594 13.1085 8.42507Z",
522
+ fill: "currentColor"
523
+ }
524
+ ),
525
+ /* @__PURE__ */ jsx(
526
+ "path",
527
+ {
528
+ opacity: oneTone ? 0 : 0.4,
529
+ d: "M10.8896 8.42477C11.624 8.30237 12.374 8.30247 13.1084 8.42477C14.3727 8.63548 15.3634 9.62631 15.5742 10.8906C15.6966 11.6251 15.6966 12.3749 15.5742 13.1093C15.3633 14.3735 14.3726 15.3645 13.1084 15.5752C12.374 15.6975 11.624 15.6976 10.8896 15.5752C9.62559 15.3643 8.63456 14.3734 8.4238 13.1093C8.30145 12.3749 8.30144 11.625 8.4238 10.8906C8.6345 9.62644 9.62554 8.63567 10.8896 8.42477Z",
530
+ fill: "currentColor"
531
+ }
532
+ )
533
+ ]
47
534
  }
48
535
  );
49
536
  }
50
537
  }
51
- function NiSearch({
538
+ function NiSparkle({
52
539
  className,
53
540
  variant = "outlined",
54
541
  size = "medium",
@@ -67,17 +554,104 @@ function NiSearch({
67
554
  fill: "none",
68
555
  xmlns: "http://www.w3.org/2000/svg",
69
556
  children: [
557
+ /* @__PURE__ */ jsx(
558
+ "path",
559
+ {
560
+ d: "M6.13877 21.1589C5.53267 21.6384 4.70914 21.7467 4.0009 21.4375L3.91854 21.4015C3.3298 21.1445 2.86544 20.6666 2.62532 20.0708V20.0708C2.35103 19.3902 2.46997 18.6056 2.92524 18.0301V18.0301C4.54952 15.9767 6.45457 14.0719 8.50948 12.4496V12.4496C9.07277 12.0049 9.83517 11.8842 10.5055 12.1406V12.1406C11.1311 12.3798 11.6311 12.8652 11.8887 13.4834L11.9228 13.5652C12.2139 14.2639 12.1036 15.0654 11.6346 15.6595V15.6595C10.0253 17.6979 8.17566 19.5477 6.13877 21.1589V21.1589Z",
561
+ stroke: "currentColor",
562
+ strokeWidth: iconStrokeWidth
563
+ }
564
+ ),
70
565
  /* @__PURE__ */ jsx(
71
566
  "path",
72
567
  {
73
568
  opacity: oneTone ? 1 : 0.6,
74
- d: "M22 22L18.5 18.5",
569
+ d: "M21 12V12C19.753 11.3705 18.2824 11.3649 17.0306 11.9848L17 12",
75
570
  stroke: "currentColor",
76
571
  strokeWidth: iconStrokeWidth,
77
572
  strokeLinecap: "round"
78
573
  }
79
574
  ),
80
- /* @__PURE__ */ jsx("circle", { cx: "11.5", cy: "11.5", r: "9.5", stroke: "currentColor", strokeWidth: iconStrokeWidth })
575
+ /* @__PURE__ */ jsx(
576
+ "path",
577
+ {
578
+ opacity: oneTone ? 1 : 0.6,
579
+ d: "M18 16.9998V16.9998C18 15.8956 17.1045 15.0004 16.0003 15.0003V15.0003",
580
+ stroke: "currentColor",
581
+ strokeWidth: iconStrokeWidth,
582
+ strokeLinecap: "round"
583
+ }
584
+ ),
585
+ /* @__PURE__ */ jsx(
586
+ "path",
587
+ {
588
+ opacity: oneTone ? 1 : 0.6,
589
+ d: "M7.00065 5.99954V5.99954C8.10482 5.99951 8.99998 6.89498 9.00006 7.99916V7.99916",
590
+ stroke: "currentColor",
591
+ strokeWidth: iconStrokeWidth,
592
+ strokeLinecap: "round"
593
+ }
594
+ ),
595
+ /* @__PURE__ */ jsx(
596
+ "path",
597
+ {
598
+ opacity: oneTone ? 1 : 0.6,
599
+ d: "M12 6.9809V6.9809C12.6295 5.73389 12.6351 4.2633 12.0152 3.01152L12 2.9809",
600
+ stroke: "currentColor",
601
+ strokeWidth: iconStrokeWidth,
602
+ strokeLinecap: "round"
603
+ }
604
+ ),
605
+ /* @__PURE__ */ jsx(
606
+ "path",
607
+ {
608
+ opacity: oneTone ? 1 : 0.6,
609
+ d: "M14.5 9.49997L13.9999 10.0001",
610
+ stroke: "currentColor",
611
+ strokeWidth: iconStrokeWidth,
612
+ strokeLinecap: "round"
613
+ }
614
+ ),
615
+ /* @__PURE__ */ jsx(
616
+ "path",
617
+ {
618
+ opacity: oneTone ? 1 : 0.6,
619
+ d: "M20.5 3.5L20 4",
620
+ stroke: "currentColor",
621
+ strokeWidth: iconStrokeWidth,
622
+ strokeLinecap: "round"
623
+ }
624
+ ),
625
+ /* @__PURE__ */ jsx(
626
+ "path",
627
+ {
628
+ opacity: oneTone ? 1 : 0.6,
629
+ d: "M17.5 6.5L17 7",
630
+ stroke: "currentColor",
631
+ strokeWidth: iconStrokeWidth,
632
+ strokeLinecap: "round"
633
+ }
634
+ ),
635
+ /* @__PURE__ */ jsx(
636
+ "path",
637
+ {
638
+ opacity: oneTone ? 1 : 0.6,
639
+ d: "M17 3L16.5 3.5",
640
+ stroke: "currentColor",
641
+ strokeWidth: iconStrokeWidth,
642
+ strokeLinecap: "round"
643
+ }
644
+ ),
645
+ /* @__PURE__ */ jsx(
646
+ "path",
647
+ {
648
+ opacity: oneTone ? 1 : 0.6,
649
+ d: "M21 7L20.5 7.5",
650
+ stroke: "currentColor",
651
+ strokeWidth: iconStrokeWidth,
652
+ strokeLinecap: "round"
653
+ }
654
+ )
81
655
  ]
82
656
  }
83
657
  );
@@ -92,18 +666,82 @@ function NiSearch({
92
666
  fill: "none",
93
667
  xmlns: "http://www.w3.org/2000/svg",
94
668
  children: [
669
+ /* @__PURE__ */ jsx(
670
+ "path",
671
+ {
672
+ d: "M8.04457 11.861C8.81251 11.2548 9.85282 11.0883 10.7731 11.4401C11.5905 11.7526 12.244 12.3872 12.5807 13.195L12.6149 13.277C13.0104 14.2266 12.8605 15.3161 12.2233 16.1237C10.5778 18.208 8.68645 20.0995 6.60414 21.7467C5.78186 22.3972 4.66406 22.5451 3.70082 22.1247L3.61781 22.0885C2.84936 21.7528 2.24284 21.129 1.92934 20.3512C1.55283 19.4165 1.71725 18.347 2.33656 17.5641C3.99682 15.4654 5.94386 13.5195 8.04457 11.861Z",
673
+ fill: "currentColor"
674
+ }
675
+ ),
95
676
  /* @__PURE__ */ jsx(
96
677
  "path",
97
678
  {
98
679
  opacity: oneTone ? 1 : 0.4,
99
- d: "M19.0303 17.9697C18.7374 17.6768 18.2627 17.6768 17.9698 17.9697C17.6769 18.2626 17.6769 18.7373 17.9698 19.0302L21.4698 22.5302C21.7627 22.8231 22.2374 22.8231 22.5303 22.5302C22.8232 22.2373 22.8232 21.7626 22.5303 21.4697L19.0303 17.9697Z",
680
+ d: "M16 14.2505C17.5181 14.2508 18.749 15.482 18.749 17.0005C18.7489 17.4146 18.4132 17.7505 17.999 17.7505C17.5852 17.7501 17.2501 17.4144 17.25 17.0005C17.25 16.3107 16.6901 15.7507 16 15.7505C15.5859 15.7503 15.25 15.4146 15.25 15.0005C15.2502 14.5865 15.586 14.2507 16 14.2505Z",
100
681
  fill: "currentColor"
101
682
  }
102
683
  ),
103
684
  /* @__PURE__ */ jsx(
104
685
  "path",
105
686
  {
106
- d: "M11.5 1.25C17.1609 1.25 21.75 5.83908 21.75 11.5C21.75 17.1609 17.1609 21.75 11.5 21.75C5.83908 21.75 1.25 17.1609 1.25 11.5C1.25 5.83908 5.83908 1.25 11.5 1.25Z",
687
+ opacity: oneTone ? 1 : 0.4,
688
+ d: "M16.6982 11.313C18.0699 10.6338 19.6664 10.5965 21.0615 11.2007L21.3389 11.3296L21.4043 11.3687C21.7248 11.5733 21.8449 11.9917 21.6699 12.3384C21.4949 12.6849 21.0872 12.8368 20.7324 12.7007L20.6621 12.6704L20.4658 12.5777C19.4741 12.1481 18.3394 12.1741 17.3643 12.6568L17.333 12.6714L17.2627 12.7017C16.9067 12.8352 16.5005 12.6806 16.3281 12.3325C16.1445 11.9614 16.2968 11.5115 16.668 11.3277L16.6982 11.313Z",
689
+ fill: "currentColor"
690
+ }
691
+ ),
692
+ /* @__PURE__ */ jsx(
693
+ "path",
694
+ {
695
+ opacity: oneTone ? 1 : 0.4,
696
+ d: "M13.9697 8.97024C14.2626 8.67734 14.7374 8.67736 15.0303 8.97024C15.323 9.26314 15.3231 9.73794 15.0303 10.0308L14.5303 10.5308C14.2374 10.8236 13.7626 10.8235 13.4697 10.5308C13.1769 10.2379 13.1769 9.76314 13.4697 9.47024L13.9697 8.97024Z",
697
+ fill: "currentColor"
698
+ }
699
+ ),
700
+ /* @__PURE__ */ jsx(
701
+ "path",
702
+ {
703
+ opacity: oneTone ? 1 : 0.4,
704
+ d: "M7.00098 5.25051C8.42437 5.25061 9.59428 6.33237 9.73535 7.71829L9.75 7.99954L9.74707 8.07668C9.70856 8.45454 9.38893 8.74921 9.00098 8.74954C8.61276 8.74957 8.29347 8.45472 8.25488 8.07668L8.25098 7.99954L8.24414 7.87161C8.17995 7.24166 7.64745 6.75058 7.00098 6.75051C6.58696 6.75046 6.25122 6.41449 6.25098 6.00051C6.25096 5.58636 6.58685 5.25063 7.00098 5.25051Z",
705
+ fill: "currentColor"
706
+ }
707
+ ),
708
+ /* @__PURE__ */ jsx(
709
+ "path",
710
+ {
711
+ opacity: oneTone ? 1 : 0.4,
712
+ d: "M20.4697 6.47024C20.7626 6.17735 21.2374 6.17735 21.5303 6.47024C21.823 6.76314 21.8231 7.23794 21.5303 7.53079L21.0303 8.03079L20.9727 8.08254C20.6781 8.32229 20.2442 8.30506 19.9697 8.03079C19.6769 7.73792 19.6769 7.26314 19.9697 6.97024L20.4697 6.47024Z",
713
+ fill: "currentColor"
714
+ }
715
+ ),
716
+ /* @__PURE__ */ jsx(
717
+ "path",
718
+ {
719
+ opacity: oneTone ? 1 : 0.4,
720
+ d: "M16.9697 5.97024C17.2626 5.67735 17.7374 5.67735 18.0303 5.97024C18.323 6.26314 18.3231 6.73794 18.0303 7.03079L17.5303 7.53079L17.4727 7.58254C17.1781 7.82229 16.7442 7.80506 16.4697 7.53079C16.1769 7.23792 16.1769 6.76314 16.4697 6.47024L16.9697 5.97024Z",
721
+ fill: "currentColor"
722
+ }
723
+ ),
724
+ /* @__PURE__ */ jsx(
725
+ "path",
726
+ {
727
+ opacity: oneTone ? 1 : 0.4,
728
+ d: "M11.667 2.30813C12.0381 2.12449 12.4881 2.27784 12.6719 2.64895L12.6875 2.67922C13.3666 4.05093 13.4031 5.64736 12.7988 7.04251L12.6689 7.3179L12.6318 7.38528C12.4273 7.70555 12.0087 7.82557 11.6621 7.6509C11.3155 7.4759 11.1637 7.06828 11.2998 6.7134L11.3301 6.64309L11.4219 6.4468C11.8515 5.45508 11.8254 4.32034 11.3428 3.34524L11.3281 3.31399L11.2979 3.24368C11.1643 2.88766 11.3189 2.48051 11.667 2.30813Z",
729
+ fill: "currentColor"
730
+ }
731
+ ),
732
+ /* @__PURE__ */ jsx(
733
+ "path",
734
+ {
735
+ opacity: oneTone ? 1 : 0.4,
736
+ d: "M19.9697 2.97024C20.2626 2.67735 20.7374 2.67735 21.0303 2.97024C21.323 3.26314 21.3231 3.73794 21.0303 4.03079L20.5303 4.53079C20.2374 4.82355 19.7626 4.82351 19.4697 4.53079C19.1769 4.23792 19.1769 3.76314 19.4697 3.47024L19.9697 2.97024Z",
737
+ fill: "currentColor"
738
+ }
739
+ ),
740
+ /* @__PURE__ */ jsx(
741
+ "path",
742
+ {
743
+ opacity: oneTone ? 1 : 0.4,
744
+ d: "M16.4697 2.47024C16.7626 2.17735 17.2374 2.17735 17.5303 2.47024C17.823 2.76314 17.8231 3.23794 17.5303 3.53079L17.0303 4.03079L16.9727 4.08254C16.6781 4.32229 16.2442 4.30506 15.9697 4.03079C15.6769 3.73792 15.6769 3.26314 15.9697 2.97024L16.4697 2.47024Z",
107
745
  fill: "currentColor"
108
746
  }
109
747
  )
@@ -291,6 +929,441 @@ function MappingCompletenessBanner({
291
929
  ] })
292
930
  ] });
293
931
  }
932
+ function ConnectorMappingTranslationEditorView({
933
+ open,
934
+ operationLabel,
935
+ toolName,
936
+ // Renamed + coalesced below rather than defaulted here: a default parameter only covers
937
+ // `undefined`, and callers pass `null` for an operation with no canonical schema. The six usages
938
+ // further down all call .length / .map directly, so before these props were typed honestly this
939
+ // was an unguarded TypeError waiting on any unmapped operation.
940
+ canonicalRequestFields: canonicalRequestFieldsProp,
941
+ canonicalResponseFields: canonicalResponseFieldsProp,
942
+ requestFieldMap,
943
+ responseFieldPaths,
944
+ staticRequestFields,
945
+ onSave,
946
+ onCancel,
947
+ onTestMapping,
948
+ onSuggestTranslation
949
+ }) {
950
+ const canonicalRequestFields = canonicalRequestFieldsProp ?? [];
951
+ const canonicalResponseFields = canonicalResponseFieldsProp ?? [];
952
+ const [requestValues, setRequestValues] = useState(() => ({
953
+ ...requestFieldMap ?? {}
954
+ }));
955
+ const [responseValues, setResponseValues] = useState(() => ({
956
+ ...responseFieldPaths ?? {}
957
+ }));
958
+ const staticRowIdRef = useRef(0);
959
+ const [staticRows, setStaticRows] = useState(
960
+ () => Object.entries(staticRequestFields ?? {}).map(([key, value]) => ({
961
+ id: staticRowIdRef.current++,
962
+ key,
963
+ value
964
+ }))
965
+ );
966
+ const [sampleArgs, setSampleArgs] = useState(() => ({}));
967
+ const [testResult, setTestResult] = useState(null);
968
+ const [isTesting, setIsTesting] = useState(false);
969
+ const [rawJsonExpanded, setRawJsonExpanded] = useState(false);
970
+ const [suggestionError, setSuggestionError] = useState(null);
971
+ const [isSuggesting, setIsSuggesting] = useState(false);
972
+ const handleRequestChange = (canonicalName, value) => {
973
+ setRequestValues((prev) => ({ ...prev, [canonicalName]: value }));
974
+ };
975
+ const handleResponseChange = (canonicalName, value) => {
976
+ setResponseValues((prev) => ({ ...prev, [canonicalName]: value }));
977
+ };
978
+ const handleStaticChange = (index, patch) => {
979
+ setStaticRows((prev) => prev.map((row, i) => i === index ? { ...row, ...patch } : row));
980
+ };
981
+ const handleAddStaticRow = () => {
982
+ setStaticRows((prev) => [...prev, { id: staticRowIdRef.current++, key: "", value: "" }]);
983
+ };
984
+ const handleRemoveStaticRow = (index) => {
985
+ setStaticRows((prev) => prev.filter((_, i) => i !== index));
986
+ };
987
+ const handleSave = () => {
988
+ const requestMap = stripEmpty(requestValues);
989
+ const responseMap = stripEmpty(responseValues);
990
+ const staticMap = staticRowsToMap(staticRows);
991
+ onSave(
992
+ Object.keys(requestMap).length === 0 ? null : requestMap,
993
+ Object.keys(responseMap).length === 0 ? null : responseMap,
994
+ Object.keys(staticMap).length === 0 ? null : staticMap
995
+ );
996
+ };
997
+ const handleTest = async () => {
998
+ if (!onTestMapping) return;
999
+ setIsTesting(true);
1000
+ setTestResult(null);
1001
+ try {
1002
+ const requestMap = stripEmpty(requestValues);
1003
+ const responseMap = stripEmpty(responseValues);
1004
+ const staticMap = staticRowsToMap(staticRows);
1005
+ const request = {
1006
+ sampleArgs: Object.fromEntries(
1007
+ Object.entries(sampleArgs).filter(([, v]) => v.trim().length > 0)
1008
+ ),
1009
+ requestFieldMap: Object.keys(requestMap).length === 0 ? null : requestMap,
1010
+ responseFieldPaths: Object.keys(responseMap).length === 0 ? null : responseMap,
1011
+ staticRequestFields: Object.keys(staticMap).length === 0 ? null : staticMap
1012
+ };
1013
+ const result = await onTestMapping(request);
1014
+ setTestResult(result);
1015
+ } catch {
1016
+ setTestResult({
1017
+ success: false,
1018
+ error: "An unexpected error occurred while running the test.",
1019
+ rawResponseJson: null,
1020
+ extractedFields: []
1021
+ });
1022
+ } finally {
1023
+ setIsTesting(false);
1024
+ }
1025
+ };
1026
+ const handleSuggest = async () => {
1027
+ if (!onSuggestTranslation) return;
1028
+ setIsSuggesting(true);
1029
+ setSuggestionError(null);
1030
+ try {
1031
+ const collectedSampleArgs = Object.fromEntries(
1032
+ Object.entries(sampleArgs).filter(([, v]) => v.trim().length > 0)
1033
+ );
1034
+ const result = await onSuggestTranslation(collectedSampleArgs);
1035
+ if (result.success) {
1036
+ setRequestValues((prev) => ({ ...prev, ...result.requestFieldMap }));
1037
+ setResponseValues((prev) => ({ ...prev, ...result.responseFieldPaths }));
1038
+ } else {
1039
+ setSuggestionError(result.error ?? "Auto-configure failed.");
1040
+ }
1041
+ } catch {
1042
+ setSuggestionError("An unexpected error occurred during auto-configure.");
1043
+ } finally {
1044
+ setIsSuggesting(false);
1045
+ }
1046
+ };
1047
+ return /* @__PURE__ */ jsxs(Dialog, { open, onClose: onCancel, maxWidth: "md", fullWidth: true, children: [
1048
+ /* @__PURE__ */ jsxs(DialogTitle, { children: [
1049
+ "Configure Field Translation \u2014 ",
1050
+ operationLabel
1051
+ ] }),
1052
+ /* @__PURE__ */ jsx(DialogContent, { children: /* @__PURE__ */ jsxs(Box, { className: "flex flex-col gap-2 pt-2", children: [
1053
+ /* @__PURE__ */ jsxs(Typography, { variant: "body2", className: "text-text-secondary", children: [
1054
+ "Mapping operation ",
1055
+ /* @__PURE__ */ jsx("strong", { children: operationLabel }),
1056
+ " to tool ",
1057
+ /* @__PURE__ */ jsx("strong", { children: toolName }),
1058
+ ". Leave a field blank to pass the canonical name through unchanged (identity translation)."
1059
+ ] }),
1060
+ /* @__PURE__ */ jsxs(
1061
+ Box,
1062
+ {
1063
+ className: "pt-3",
1064
+ sx: { display: "grid", gridTemplateColumns: { xs: "1fr", md: "1fr 1fr" }, gap: 5 },
1065
+ children: [
1066
+ /* @__PURE__ */ jsxs(Box, { children: [
1067
+ /* @__PURE__ */ jsx(Typography, { variant: "h6", component: "h2", className: "mb-3", children: "Request fields" }),
1068
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-text-secondary mb-2 block", children: "Map each canonical request field to the tool's actual input field name." }),
1069
+ canonicalRequestFields.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-text-disabled italic", children: "No request fields declared." }) : /* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-3", children: canonicalRequestFields.map((field) => /* @__PURE__ */ jsx(
1070
+ FieldRow,
1071
+ {
1072
+ field,
1073
+ value: requestValues[field.name] ?? "",
1074
+ onChange: (v) => handleRequestChange(field.name, v),
1075
+ placeholder: "Same as canonical",
1076
+ inputLabel: "Tool field name"
1077
+ },
1078
+ field.name
1079
+ )) })
1080
+ ] }),
1081
+ /* @__PURE__ */ jsxs(Box, { children: [
1082
+ /* @__PURE__ */ jsx(Typography, { variant: "h6", component: "h2", className: "mb-3", children: "Response fields" }),
1083
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-text-secondary mb-2 block", children: "Map each canonical response field to a JSON path against the tool's response." }),
1084
+ canonicalResponseFields.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-text-disabled italic", children: "No response fields declared." }) : /* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-3", children: canonicalResponseFields.map((field) => /* @__PURE__ */ jsx(
1085
+ FieldRow,
1086
+ {
1087
+ field,
1088
+ value: responseValues[field.name] ?? "",
1089
+ onChange: (v) => handleResponseChange(field.name, v),
1090
+ placeholder: 'e.g. "$.content" or "$.contents[0].text"',
1091
+ inputLabel: "JSON path"
1092
+ },
1093
+ field.name
1094
+ )) })
1095
+ ] })
1096
+ ]
1097
+ }
1098
+ ),
1099
+ /* @__PURE__ */ jsx(Divider, { className: "my-4" }),
1100
+ /* @__PURE__ */ jsx(Typography, { variant: "h6", component: "h2", className: "mb-2", children: "Static request parameters" }),
1101
+ /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-text-secondary mb-3 block", children: [
1102
+ "Constant values sent with every call, regardless of the canonical input \u2014 e.g. a consolidated tool's ",
1103
+ /* @__PURE__ */ jsx("code", { children: "method" }),
1104
+ " discriminator (",
1105
+ /* @__PURE__ */ jsx("code", { children: "method" }),
1106
+ " \u2192",
1107
+ " ",
1108
+ /* @__PURE__ */ jsx("code", { children: "get" }),
1109
+ "). These are injected after the mapped request fields."
1110
+ ] }),
1111
+ staticRows.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-text-disabled italic mb-3", children: "No static parameters configured." }) : /* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-3 mb-3", children: staticRows.map((row, index) => /* @__PURE__ */ jsxs(Box, { className: "flex flex-row items-start gap-3", children: [
1112
+ /* @__PURE__ */ jsxs(
1113
+ FormControl,
1114
+ {
1115
+ variant: "filled",
1116
+ size: "medium",
1117
+ className: "surface mb-0",
1118
+ sx: { width: 240, flexShrink: 0 },
1119
+ children: [
1120
+ /* @__PURE__ */ jsx(InputLabel, { children: "Tool field name" }),
1121
+ /* @__PURE__ */ jsx(
1122
+ FilledInput,
1123
+ {
1124
+ value: row.key,
1125
+ onChange: (e) => handleStaticChange(index, { key: e.target.value }),
1126
+ placeholder: "e.g. method"
1127
+ }
1128
+ )
1129
+ ]
1130
+ }
1131
+ ),
1132
+ /* @__PURE__ */ jsxs(FormControl, { variant: "filled", size: "medium", className: "surface mb-0 flex-1", children: [
1133
+ /* @__PURE__ */ jsx(InputLabel, { children: "Constant value" }),
1134
+ /* @__PURE__ */ jsx(
1135
+ FilledInput,
1136
+ {
1137
+ value: row.value,
1138
+ onChange: (e) => handleStaticChange(index, { value: e.target.value }),
1139
+ placeholder: "e.g. get"
1140
+ }
1141
+ )
1142
+ ] }),
1143
+ /* @__PURE__ */ jsx(
1144
+ IconButton,
1145
+ {
1146
+ "aria-label": "Remove static parameter",
1147
+ color: "inherit",
1148
+ onClick: () => handleRemoveStaticRow(index),
1149
+ sx: { mt: 1 },
1150
+ children: /* @__PURE__ */ jsx(NiBinEmpty, { size: "small" })
1151
+ }
1152
+ )
1153
+ ] }, row.id)) }),
1154
+ /* @__PURE__ */ jsx(
1155
+ Button,
1156
+ {
1157
+ variant: "outlined",
1158
+ color: "grey",
1159
+ size: "small",
1160
+ onClick: handleAddStaticRow,
1161
+ startIcon: /* @__PURE__ */ jsx(NiPlus, { size: "small" }),
1162
+ sx: { alignSelf: "flex-start" },
1163
+ children: "Add parameter"
1164
+ }
1165
+ ),
1166
+ (onTestMapping || onSuggestTranslation) && /* @__PURE__ */ jsxs(Fragment, { children: [
1167
+ /* @__PURE__ */ jsx(Divider, { className: "my-4" }),
1168
+ /* @__PURE__ */ jsx(Typography, { variant: "h6", component: "h2", className: "mb-2", children: "Test with sample inputs" }),
1169
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-text-secondary mb-3 block", children: 'Enter sample values for each request field, then click "Test mapping" to see what each response field extracts from the live tool response.' }),
1170
+ canonicalRequestFields.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-text-disabled italic mb-3", children: "No request fields \u2014 nothing to sample." }) : /* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-3 mb-4", children: canonicalRequestFields.map((field) => /* @__PURE__ */ jsxs(Box, { className: "flex flex-row items-start gap-3", children: [
1171
+ /* @__PURE__ */ jsxs(Box, { className: "flex flex-col gap-1", sx: { width: 200, flexShrink: 0 }, children: [
1172
+ /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1.5", children: [
1173
+ /* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "break-all", children: field.name }),
1174
+ field.isRequired && /* @__PURE__ */ jsx(Chip, { label: "Required", size: "small", color: "primary", variant: "outlined" })
1175
+ ] }),
1176
+ /* @__PURE__ */ jsx(
1177
+ Chip,
1178
+ {
1179
+ label: field.kind,
1180
+ size: "small",
1181
+ variant: "outlined",
1182
+ sx: { alignSelf: "flex-start" }
1183
+ }
1184
+ )
1185
+ ] }),
1186
+ /* @__PURE__ */ jsxs(FormControl, { variant: "filled", size: "medium", className: "surface mb-0 flex-1", children: [
1187
+ /* @__PURE__ */ jsx(InputLabel, { children: "Sample value" }),
1188
+ /* @__PURE__ */ jsx(
1189
+ FilledInput,
1190
+ {
1191
+ value: sampleArgs[field.name] ?? "",
1192
+ onChange: (e) => setSampleArgs((prev) => ({ ...prev, [field.name]: e.target.value })),
1193
+ placeholder: "e.g. my-value"
1194
+ }
1195
+ )
1196
+ ] })
1197
+ ] }, field.name)) }),
1198
+ /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-3", children: [
1199
+ onSuggestTranslation && /* @__PURE__ */ jsx(
1200
+ Button,
1201
+ {
1202
+ variant: "contained",
1203
+ color: "primary",
1204
+ onClick: handleSuggest,
1205
+ disabled: isSuggesting || isTesting,
1206
+ startIcon: isSuggesting ? void 0 : /* @__PURE__ */ jsx(NiSparkle, { size: "small" }),
1207
+ "data-testid": "suggest-translation-button",
1208
+ children: isSuggesting ? "Configuring\u2026" : "Auto-configure"
1209
+ }
1210
+ ),
1211
+ onTestMapping && /* @__PURE__ */ jsx(
1212
+ Button,
1213
+ {
1214
+ variant: "outlined",
1215
+ color: "primary",
1216
+ onClick: handleTest,
1217
+ disabled: isTesting || isSuggesting,
1218
+ startIcon: isTesting ? void 0 : /* @__PURE__ */ jsx(NiSettings, { size: "small" }),
1219
+ "data-testid": "test-mapping-button",
1220
+ children: isTesting ? "Testing\u2026" : "Test mapping"
1221
+ }
1222
+ )
1223
+ ] }),
1224
+ suggestionError && /* @__PURE__ */ jsx(Box, { className: "mt-3", children: /* @__PURE__ */ jsxs(Alert, { severity: "error", children: [
1225
+ /* @__PURE__ */ jsx(AlertTitle, { children: "Auto-configure failed" }),
1226
+ suggestionError
1227
+ ] }) }),
1228
+ testResult && /* @__PURE__ */ jsx(Box, { className: "mt-4 flex flex-col gap-3", children: !testResult.success ? /* @__PURE__ */ jsxs(Alert, { severity: "error", children: [
1229
+ /* @__PURE__ */ jsx(AlertTitle, { children: "Test failed" }),
1230
+ testResult.error ?? "The tool call failed without reporting a reason."
1231
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
1232
+ testResult.extractedFields.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-text-secondary italic", children: "No response fields to show." }) : /* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-2", children: testResult.extractedFields.map((ef) => /* @__PURE__ */ jsxs(
1233
+ Box,
1234
+ {
1235
+ className: "flex items-center gap-3 rounded p-2",
1236
+ sx: { backgroundColor: "action.hover" },
1237
+ children: [
1238
+ /* @__PURE__ */ jsx(Typography, { variant: "subtitle2", sx: { minWidth: 140, flexShrink: 0 }, children: ef.canonicalField }),
1239
+ /* @__PURE__ */ jsx(
1240
+ Typography,
1241
+ {
1242
+ variant: "body2",
1243
+ className: "text-text-secondary flex-1 truncate",
1244
+ sx: { fontFamily: "monospace" },
1245
+ title: ef.value ?? void 0,
1246
+ children: ef.value != null ? ef.value.length > 60 ? `${ef.value.slice(0, 60)}\u2026` : ef.value : "\u2014"
1247
+ }
1248
+ ),
1249
+ ef.present && !ef.looksBase64 && /* @__PURE__ */ jsx(
1250
+ Chip,
1251
+ {
1252
+ icon: /* @__PURE__ */ jsx(NiCheck, { size: "small" }),
1253
+ label: "extracted",
1254
+ size: "small",
1255
+ color: "success",
1256
+ variant: "outlined"
1257
+ }
1258
+ ),
1259
+ ef.present && ef.looksBase64 && /* @__PURE__ */ jsx(
1260
+ Chip,
1261
+ {
1262
+ icon: /* @__PURE__ */ jsx(NiSettings, { size: "small" }),
1263
+ label: 'looks base64 \u2014 prefix path with "base64:"',
1264
+ size: "small",
1265
+ color: "warning",
1266
+ variant: "outlined"
1267
+ }
1268
+ ),
1269
+ !ef.present && /* @__PURE__ */ jsx(
1270
+ Chip,
1271
+ {
1272
+ icon: /* @__PURE__ */ jsx(NiExclamationHexagon, { size: "small" }),
1273
+ label: "no value \u2014 adjust the JSON path",
1274
+ size: "small",
1275
+ color: "warning",
1276
+ variant: "outlined"
1277
+ }
1278
+ )
1279
+ ]
1280
+ },
1281
+ ef.canonicalField
1282
+ )) }),
1283
+ testResult.rawResponseJson && /* @__PURE__ */ jsxs(Box, { className: "mt-2", children: [
1284
+ /* @__PURE__ */ jsx(
1285
+ Button,
1286
+ {
1287
+ variant: "text",
1288
+ color: "grey",
1289
+ size: "small",
1290
+ onClick: () => setRawJsonExpanded((v) => !v),
1291
+ endIcon: rawJsonExpanded ? /* @__PURE__ */ jsx(NiChevronUpSmall, { size: "small" }) : /* @__PURE__ */ jsx(NiChevronDownSmall, { size: "small" }),
1292
+ children: rawJsonExpanded ? "Hide raw response" : "Show raw response"
1293
+ }
1294
+ ),
1295
+ /* @__PURE__ */ jsx(Collapse, { in: rawJsonExpanded, children: /* @__PURE__ */ jsx(
1296
+ Box,
1297
+ {
1298
+ component: "pre",
1299
+ className: "mt-2 overflow-auto rounded p-3 text-xs",
1300
+ sx: {
1301
+ maxHeight: 240,
1302
+ backgroundColor: "action.hover",
1303
+ fontFamily: "monospace"
1304
+ },
1305
+ children: testResult.rawResponseJson
1306
+ }
1307
+ ) })
1308
+ ] })
1309
+ ] }) })
1310
+ ] })
1311
+ ] }) }),
1312
+ /* @__PURE__ */ jsxs(DialogActions, { className: "px-6 pb-4 pt-2", children: [
1313
+ /* @__PURE__ */ jsx(Button, { variant: "outlined", color: "grey", onClick: onCancel, children: "Cancel" }),
1314
+ /* @__PURE__ */ jsx(
1315
+ Button,
1316
+ {
1317
+ variant: "contained",
1318
+ color: "primary",
1319
+ onClick: handleSave,
1320
+ "data-testid": "save-translation-button",
1321
+ children: "Save"
1322
+ }
1323
+ )
1324
+ ] })
1325
+ ] });
1326
+ }
1327
+ function FieldRow({ field, value, onChange, placeholder, inputLabel }) {
1328
+ return /* @__PURE__ */ jsxs(Box, { className: "flex flex-row items-start gap-3", children: [
1329
+ /* @__PURE__ */ jsxs(Box, { className: "flex flex-col gap-1", sx: { width: 200, flexShrink: 0 }, children: [
1330
+ /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1.5", children: [
1331
+ /* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "break-all", children: field.name }),
1332
+ field.isRequired && /* @__PURE__ */ jsx(Chip, { label: "Required", size: "small", color: "primary", variant: "outlined" })
1333
+ ] }),
1334
+ /* @__PURE__ */ jsx(Chip, { label: field.kind, size: "small", variant: "outlined", sx: { alignSelf: "flex-start" } })
1335
+ ] }),
1336
+ /* @__PURE__ */ jsxs(FormControl, { variant: "filled", size: "medium", className: "surface mb-0 flex-1", children: [
1337
+ /* @__PURE__ */ jsx(InputLabel, { children: inputLabel }),
1338
+ /* @__PURE__ */ jsx(
1339
+ FilledInput,
1340
+ {
1341
+ value,
1342
+ onChange: (e) => onChange(e.target.value),
1343
+ placeholder
1344
+ }
1345
+ )
1346
+ ] })
1347
+ ] });
1348
+ }
1349
+ function stripEmpty(values) {
1350
+ const out = {};
1351
+ for (const [key, value] of Object.entries(values)) {
1352
+ if (value.trim().length > 0) {
1353
+ out[key] = value.trim();
1354
+ }
1355
+ }
1356
+ return out;
1357
+ }
1358
+ function staticRowsToMap(rows) {
1359
+ const out = {};
1360
+ for (const { key, value } of rows) {
1361
+ if (key.trim().length > 0) {
1362
+ out[key.trim()] = value;
1363
+ }
1364
+ }
1365
+ return out;
1366
+ }
294
1367
 
295
1368
  // src/components/connectors/mappingQueryKeys.ts
296
1369
  var CONNECTOR_MAPPINGS_ROOT = "connector-mappings";
@@ -301,6 +1374,6 @@ function connectorMappingCompletenessQueryKey(connectorId, moduleKey) {
301
1374
  return [...connectorMappingsQueryKey(connectorId, moduleKey), "completeness"];
302
1375
  }
303
1376
 
304
- export { MappingCompletenessBanner, connectorMappingCompletenessQueryKey, connectorMappingsQueryKey, selectIncompleteOperations, selectMappingReadiness, selectOptionalIncompleteOperations, selectRequiredIncompleteOperations };
1377
+ export { ConnectorMappingTranslationEditorView, MappingCompletenessBanner, connectorMappingCompletenessQueryKey, connectorMappingsQueryKey, selectIncompleteOperations, selectMappingReadiness, selectOptionalIncompleteOperations, selectRequiredIncompleteOperations };
305
1378
  //# sourceMappingURL=index.js.map
306
1379
  //# sourceMappingURL=index.js.map