@devtron-labs/devtron-fe-common-lib 1.17.0-pre-0 → 1.17.0-pre-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,595 @@
1
+ import { j as n, at as y, av as k, au as M } from "./@vendor-DbxoIktR.js";
2
+ import W, { forwardRef as J, useMemo as P } from "react";
3
+ import V, { getDefaultRegistry as K } from "@rjsf/core";
4
+ import { T as N, j as w, c as v, b as F, S as q, i as Y, a as G, d as C, e as z } from "./@code-editor-BiT2cP4P.js";
5
+ import { getUiOptions as I, getTemplate as D, getSubmitButtonOptions as Q, ADDITIONAL_PROPERTY_FLAG as B, errorId as X, englishStringTranslator as Z, TranslatableString as ee, titleId as te, canExpand as ne, deepEquals as re } from "@rjsf/utils";
6
+ import { ReactComponent as se } from "./assets/ic-add.cfaa779b.svg";
7
+ import { ReactComponent as ae } from "./assets/ic-warning.ecf7ff97.svg";
8
+ import { ReactComponent as oe } from "./assets/ic-cross.01e03666.svg";
9
+ import './assets/@common-rjsf.css';const S = {
10
+ SELECT: "Please select an option",
11
+ INPUT: "Please enter an input",
12
+ OBJECT_KEY: "Please enter a value for the key"
13
+ }, le = "Key not available", Ue = {
14
+ "ui:submitButtonOptions": {
15
+ norender: !0
16
+ }
17
+ }, $ = "rjsf-form-select-portal-target", ie = ({
18
+ children: e,
19
+ disabled: t,
20
+ hasToolbar: s,
21
+ hasRemove: r,
22
+ index: a,
23
+ onDropIndexClick: i,
24
+ readonly: l,
25
+ registry: o,
26
+ uiSchema: c
27
+ }) => {
28
+ const { RemoveButton: d } = o.templates.ButtonTemplates;
29
+ return /* @__PURE__ */ n.jsxs("div", { className: "dc__position-rel display-grid rjsf-form-template__array-field-item flex-align-center", children: [
30
+ e,
31
+ /* @__PURE__ */ n.jsx("div", { className: "dc__position-abs remove-btn__container", style: { right: "-28px", top: "9px" }, children: s && r && /* @__PURE__ */ n.jsx(
32
+ d,
33
+ {
34
+ disabled: t || l,
35
+ onClick: i(a),
36
+ uiSchema: c,
37
+ registry: o
38
+ }
39
+ ) })
40
+ ] });
41
+ }, T = ({
42
+ showLabel: e,
43
+ label: t,
44
+ required: s,
45
+ children: r,
46
+ id: a,
47
+ rawDescription: i,
48
+ shouldAlignCenter: l = !0
49
+ }) => /* @__PURE__ */ n.jsxs(
50
+ "div",
51
+ {
52
+ className: e ? `display-grid dc__gap-12 rjsf-form-template__field ${l ? "" : "rjsf-form-template__field--align-top"}` : "",
53
+ children: [
54
+ e && /* @__PURE__ */ n.jsxs("label", { className: "cn-7 fs-13 lh-20 fw-4 flexbox mb-0", htmlFor: a, children: [
55
+ /* @__PURE__ */ n.jsx(N, { alwaysShowTippyOnHover: !!i, content: i, children: /* @__PURE__ */ n.jsx("span", { className: `dc__ellipsis-right ${i ? "text-underline-dashed-300" : ""}`, children: t || le }) }),
56
+ s && /* @__PURE__ */ n.jsx("span", { className: "cr-5", children: " *" })
57
+ ] }),
58
+ r
59
+ ]
60
+ }
61
+ ), E = ({ label: e, canAdd: t, onAddClick: s, disabled: r, readonly: a, uiSchema: i, registry: l }) => {
62
+ const {
63
+ ButtonTemplates: { AddButton: o }
64
+ } = l.templates;
65
+ return t && /* @__PURE__ */ n.jsx(
66
+ o,
67
+ {
68
+ label: e,
69
+ onClick: s,
70
+ disabled: r || a,
71
+ uiSchema: i,
72
+ registry: l
73
+ }
74
+ );
75
+ }, ce = ({
76
+ canAdd: e,
77
+ className: t,
78
+ disabled: s,
79
+ idSchema: r,
80
+ uiSchema: a,
81
+ items: i,
82
+ onAddClick: l,
83
+ readonly: o,
84
+ registry: c,
85
+ required: d,
86
+ title: _
87
+ }) => {
88
+ const u = I(a), f = D("ArrayFieldItemTemplate", c, u), m = u.title || _;
89
+ return /* @__PURE__ */ n.jsx("fieldset", { className: t, id: r.$id, children: i.length ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
90
+ i.map(({ key: j, ...h }, x) => {
91
+ const p = {
92
+ ...h.children,
93
+ props: {
94
+ ...h.children.props
95
+ }
96
+ };
97
+ return /* @__PURE__ */ n.jsx(f, { ...h, children: p }, j);
98
+ }),
99
+ /* @__PURE__ */ n.jsx(
100
+ E,
101
+ {
102
+ label: m,
103
+ canAdd: e,
104
+ onAddClick: l,
105
+ disabled: s,
106
+ readonly: o,
107
+ uiSchema: a,
108
+ registry: c
109
+ }
110
+ )
111
+ ] }) : /* @__PURE__ */ n.jsx(T, { label: m, required: d, showLabel: !0, id: r.$id, children: /* @__PURE__ */ n.jsx(
112
+ E,
113
+ {
114
+ label: m,
115
+ canAdd: e,
116
+ onAddClick: l,
117
+ disabled: s,
118
+ readonly: o,
119
+ uiSchema: a,
120
+ registry: c
121
+ }
122
+ ) }) });
123
+ }, {
124
+ templates: { BaseInputTemplate: de }
125
+ } = K(), ue = ({ placeholder: e, ...t }) => /* @__PURE__ */ n.jsx(
126
+ de,
127
+ {
128
+ placeholder: e || S.INPUT,
129
+ ...t,
130
+ className: "form__input cn-9 fs-13 lh-20 fw-4"
131
+ }
132
+ ), L = ({
133
+ label: e,
134
+ icon: t,
135
+ iconType: s,
136
+ registry: r,
137
+ uiSchema: a,
138
+ ...i
139
+ }) => {
140
+ const l = `Add ${e}`;
141
+ return /* @__PURE__ */ n.jsx("div", { className: "flexbox flex-justify-start", children: /* @__PURE__ */ n.jsxs(
142
+ "button",
143
+ {
144
+ ...i,
145
+ type: "button",
146
+ className: "dc__outline-none-imp p-0 dc__transparent flex dc__gap-4 cursor dc__mxw-250",
147
+ title: "Add",
148
+ children: [
149
+ /* @__PURE__ */ n.jsx(se, { className: "icon-dim-16 fcb-5" }),
150
+ /* @__PURE__ */ n.jsx(N, { placement: "right", content: l, children: /* @__PURE__ */ n.jsx("span", { className: "cb-5 fs-13 lh-34 dc__truncate", children: l }) })
151
+ ]
152
+ }
153
+ ) });
154
+ }, me = ({ icon: e, iconType: t, registry: s, uiSchema: r, ...a }) => /* @__PURE__ */ n.jsx("button", { ...a, type: "button", className: "dc__outline-none-imp p-0 dc__transparent flex cursor", title: "Remove", children: /* @__PURE__ */ n.jsx(oe, { className: "icon-dim-16 fcn-6" }) }), pe = ({ uiSchema: e }) => {
155
+ const { submitText: t, norender: s, props: r = {} } = Q(e);
156
+ return s ? null : /* @__PURE__ */ n.jsx("div", { className: "flexbox flex-justify-end", children: /* @__PURE__ */ n.jsx("button", { type: "submit", ...r, className: `cta ${r.className || ""}`, children: t }) });
157
+ }, O = ({
158
+ id: e,
159
+ title: t,
160
+ required: s,
161
+ description: r
162
+ }) => /* @__PURE__ */ n.jsxs("legend", { className: "fs-13 fw-6 cn-9 lh-20 dc__no-border pb-9 mb-0", id: e, children: [
163
+ /* @__PURE__ */ n.jsx(N, { alwaysShowTippyOnHover: !!r, content: r, children: /* @__PURE__ */ n.jsx("span", { className: `${r ? "text-underline-dashed-300" : ""}`, children: t }) }),
164
+ s && /* @__PURE__ */ n.jsx("span", { className: "cr-5", children: " *" })
165
+ ] }), fe = (e) => {
166
+ const {
167
+ id: t,
168
+ label: s,
169
+ children: r,
170
+ errors: a,
171
+ hidden: i,
172
+ required: l,
173
+ displayLabel: o,
174
+ registry: c,
175
+ uiSchema: d,
176
+ classNames: _,
177
+ schema: u,
178
+ rawDescription: f
179
+ } = e, m = I(d), j = D(
180
+ "WrapIfAdditionalTemplate",
181
+ c,
182
+ m
183
+ ), h = B in u, x = (o || u.type === "boolean") && !h, p = u.type === "array";
184
+ return i ? /* @__PURE__ */ n.jsx("div", { className: "hidden", children: r }) : (
185
+ // NOTE: need to override the margins of default rjsf css
186
+ /* @__PURE__ */ n.jsxs("div", { className: `${_} mb-0`, children: [
187
+ p && /* @__PURE__ */ n.jsx(
188
+ O,
189
+ {
190
+ id: t,
191
+ title: s,
192
+ required: l,
193
+ registry: c,
194
+ uiSchema: d,
195
+ schema: u,
196
+ description: f
197
+ }
198
+ ),
199
+ /* @__PURE__ */ n.jsx(
200
+ T,
201
+ {
202
+ label: s,
203
+ showLabel: x,
204
+ id: t,
205
+ required: l,
206
+ rawDescription: f,
207
+ children: /* @__PURE__ */ n.jsx(j, { ...e, children: r })
208
+ }
209
+ ),
210
+ a
211
+ ] })
212
+ );
213
+ }, he = ({ errors: e = [], idSchema: t }) => {
214
+ const s = X(t);
215
+ return e.length > 0 && /* @__PURE__ */ n.jsx("span", { className: "display-grid rjsf-form-template__field--error dc__gap-12", id: s, children: e.filter((r) => !!r).map((r, a) => /* @__PURE__ */ n.jsxs(W.Fragment, { children: [
216
+ /* @__PURE__ */ n.jsx("span", {}),
217
+ /* @__PURE__ */ n.jsxs("span", { className: "form__error", children: [
218
+ /* @__PURE__ */ n.jsx(ae, { className: "form__icon form__icon--error" }),
219
+ r
220
+ ] })
221
+ ] }, a)) });
222
+ }, xe = (e, t) => {
223
+ switch (e) {
224
+ case ee.NewStringDefault:
225
+ return "";
226
+ default:
227
+ return Z(e, t);
228
+ }
229
+ }, He = (e) => {
230
+ try {
231
+ const t = new URL(e).origin === window.location.origin;
232
+ return {
233
+ href: e,
234
+ target: t ? "_self" : "_blank",
235
+ rel: t ? void 0 : "external noreferrer",
236
+ url: e
237
+ };
238
+ } catch {
239
+ return {
240
+ href: e,
241
+ target: "_blank",
242
+ url: `${e} (Invalid URL)`
243
+ };
244
+ }
245
+ }, ke = (e) => {
246
+ const t = typeof e;
247
+ switch (t) {
248
+ case "boolean":
249
+ case "string":
250
+ case "number":
251
+ return t;
252
+ case "object":
253
+ return Array.isArray(e) ? "array" : e === null ? "null" : t;
254
+ default:
255
+ return "null";
256
+ }
257
+ }, b = (e) => {
258
+ if (!e)
259
+ return "";
260
+ const t = e.trim(), r = (/^\/.+$/g.test(t) ? t : `/${t}`).replaceAll(/\./g, "/");
261
+ return /(\/(([^/~])|(~[01]))*)/g.test(r) ? r : "";
262
+ }, R = {
263
+ value: !1,
264
+ path: ""
265
+ }, _e = (e) => {
266
+ if (!e)
267
+ return null;
268
+ const t = structuredClone(e);
269
+ return typeof t == "string" ? {
270
+ value: !0,
271
+ path: b(t)
272
+ } : typeof t != "object" ? structuredClone(R) : Object.hasOwn(t, "condition") && "condition" in t && Object.hasOwn(t, "value") && "value" in t ? {
273
+ value: t.condition,
274
+ path: b(t.value)
275
+ } : Object.hasOwn(t, "value") && "value" in t && Object.hasOwn(t, "path") && "path" in t ? {
276
+ value: t.value,
277
+ path: b(t.path)
278
+ } : structuredClone(R);
279
+ }, U = (e, t, s) => {
280
+ e && (e.type === "object" && e.properties && typeof e.properties == "object" && Object.entries(e.properties).forEach(([r, a]) => {
281
+ U(a, `${t}/${r}`, s);
282
+ }), (e.type === "boolean" || e.type === "string" || e.type === "number" || e.type === "integer") && (s[t] = b(e.updatePath ?? t)));
283
+ }, je = (e) => {
284
+ const t = {};
285
+ return U(e, "", t), t;
286
+ }, H = (e, t, s) => {
287
+ if (t >= s.length)
288
+ return e;
289
+ const r = s[t];
290
+ if (t === s.length - 1) {
291
+ const a = structuredClone(e);
292
+ return delete a[r], a;
293
+ }
294
+ if (e[r] && (e[r] = H(e[r], t + 1, s)), Object.keys(e[r] ?? {}).length === 0) {
295
+ const a = structuredClone(e);
296
+ return delete a[r], a;
297
+ }
298
+ return e;
299
+ }, ge = (e, t) => {
300
+ if (!e || typeof e != "object" || Array.isArray(e))
301
+ throw new Error("Invalid object");
302
+ if (!t || !t.startsWith("/"))
303
+ throw new Error("Invalid path");
304
+ const s = t.split("/").slice(1);
305
+ return H(e, 0, s);
306
+ }, A = ({
307
+ formState: e,
308
+ formData: t,
309
+ schemaPathToUpdatePathMap: s
310
+ }) => {
311
+ let r = structuredClone(e);
312
+ return r && (Object.entries(s).forEach(([a, i]) => {
313
+ if (a === i || !i)
314
+ return;
315
+ const l = y({
316
+ json: t,
317
+ path: v(a),
318
+ resultType: "value",
319
+ wrap: !1
320
+ });
321
+ l === void 0 ? r = ge(r, a) : r = w([F(a, l), r]);
322
+ const o = y({
323
+ json: e,
324
+ path: v(a),
325
+ resultType: "value",
326
+ wrap: !1
327
+ });
328
+ o !== void 0 && (r = w([F(i, o), r]));
329
+ }), t && r ? k(t, M(t, r), !1, !1).newDocument : r);
330
+ }, be = ({ formData: e, schemaPathToUpdatePathMap: t }) => w([
331
+ ...Object.entries(t).map(([s, r]) => {
332
+ if (s === r || !r)
333
+ return {};
334
+ const a = y({
335
+ json: e,
336
+ path: v(r),
337
+ resultType: "value",
338
+ wrap: !1
339
+ });
340
+ return a === void 0 ? {} : F(s, a);
341
+ }),
342
+ structuredClone(e)
343
+ ]), ye = ({
344
+ disabled: e,
345
+ formData: t,
346
+ idSchema: s,
347
+ onAddClick: r,
348
+ properties: a,
349
+ readonly: i,
350
+ registry: l,
351
+ required: o,
352
+ schema: c,
353
+ title: d,
354
+ uiSchema: _,
355
+ formContext: u
356
+ }) => {
357
+ const f = !!c.additionalProperties, m = ne(c, _, t) && /* @__PURE__ */ n.jsx(
358
+ L,
359
+ {
360
+ label: d,
361
+ className: "object-property-expand",
362
+ onClick: r(c),
363
+ disabled: e || i,
364
+ uiSchema: _,
365
+ registry: l
366
+ }
367
+ ), j = a.filter((h) => {
368
+ const x = c.properties?.[h.name]?.hidden;
369
+ if (!x)
370
+ return !0;
371
+ try {
372
+ const p = _e(x);
373
+ if (!p.path)
374
+ throw new Error("Empty path property of hidden descriptor field");
375
+ const g = y({
376
+ path: v(p.path),
377
+ json: u,
378
+ resultType: "value",
379
+ wrap: !1
380
+ });
381
+ return !(g === void 0 || re(p.value, g));
382
+ } catch {
383
+ return !0;
384
+ }
385
+ }).map((h) => h.content);
386
+ return f ? a.length ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
387
+ /* @__PURE__ */ n.jsx(
388
+ T,
389
+ {
390
+ label: d,
391
+ required: o,
392
+ showLabel: !0,
393
+ id: s.$id,
394
+ shouldAlignCenter: !1,
395
+ children: /* @__PURE__ */ n.jsx("div", { children: j })
396
+ }
397
+ ),
398
+ m
399
+ ] }) : /* @__PURE__ */ n.jsx(T, { label: d, required: o, showLabel: !0, id: s.$id, children: m }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
400
+ j,
401
+ m
402
+ ] });
403
+ }, ve = (e) => {
404
+ const { idSchema: t, registry: s, required: r, schema: a, title: i, uiSchema: l, description: o } = e, c = !!a.additionalProperties, d = i && !c;
405
+ return /* @__PURE__ */ n.jsxs("fieldset", { id: t.$id, children: [
406
+ d && /* @__PURE__ */ n.jsx(
407
+ O,
408
+ {
409
+ id: te(t),
410
+ title: i,
411
+ required: r,
412
+ schema: a,
413
+ uiSchema: l,
414
+ registry: s,
415
+ description: o
416
+ }
417
+ ),
418
+ /* @__PURE__ */ n.jsx(
419
+ "div",
420
+ {
421
+ className: `${a.properties && !c && t.$id !== "root" ? "dc__border-left pl-12" : ""} ${t.$id === "root" ? "dc__separated-flexbox dc__separated-flexbox--vertical" : "flexbox-col dc__gap-8"}`,
422
+ children: /* @__PURE__ */ n.jsx(ye, { ...e })
423
+ }
424
+ )
425
+ ] });
426
+ }, Te = ({
427
+ id: e,
428
+ disabled: t,
429
+ label: s,
430
+ onKeyChange: r,
431
+ onDropPropertyClick: a,
432
+ readonly: i,
433
+ schema: l,
434
+ children: o,
435
+ uiSchema: c,
436
+ registry: d
437
+ }) => {
438
+ const { templates: _ } = d, { RemoveButton: u } = _.ButtonTemplates, f = B in l;
439
+ return /* @__PURE__ */ n.jsx(n.Fragment, { children: f ? /* @__PURE__ */ n.jsxs("div", { className: "dc__position-rel rjsf-form-template__additional-fields display-grid dc__gap-8 flex-align-center", children: [
440
+ /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(
441
+ "input",
442
+ {
443
+ type: "text",
444
+ className: "form__input cn-9 fs-13 lh-20 fw-4",
445
+ id: `${e}-key`,
446
+ onBlur: (m) => r(m.target.value),
447
+ placeholder: S.OBJECT_KEY,
448
+ defaultValue: s
449
+ }
450
+ ) }),
451
+ /* @__PURE__ */ n.jsx("div", { children: o }),
452
+ /* @__PURE__ */ n.jsx("div", { className: "dc__position-abs remove-btn__container", style: { right: "-28px", top: "9px" }, children: /* @__PURE__ */ n.jsx(
453
+ u,
454
+ {
455
+ disabled: t || i,
456
+ onClick: a(s),
457
+ uiSchema: c,
458
+ registry: d
459
+ }
460
+ ) })
461
+ ] }) : o });
462
+ }, we = ({
463
+ id: e,
464
+ onChange: t,
465
+ value: s,
466
+ disabled: r,
467
+ readonly: a,
468
+ autofocus: i
469
+ }) => {
470
+ const l = Y(s) ? !1 : s, o = () => {
471
+ t(!l);
472
+ };
473
+ return /* @__PURE__ */ n.jsxs("div", { className: "flexbox dc__align-items-center dc__gap-8", children: [
474
+ /* @__PURE__ */ n.jsx(
475
+ q,
476
+ {
477
+ name: e,
478
+ ariaLabel: e,
479
+ onChange: o,
480
+ isChecked: l,
481
+ autoFocus: i,
482
+ isDisabled: r || a
483
+ }
484
+ ),
485
+ /* @__PURE__ */ n.jsx("span", { className: "dc__capitalize", children: l.toString() })
486
+ ] });
487
+ }, Fe = (e) => {
488
+ const {
489
+ id: t,
490
+ multiple: s = !1,
491
+ options: r,
492
+ value: a,
493
+ disabled: i,
494
+ readonly: l,
495
+ autofocus: o = !1,
496
+ onChange: c,
497
+ onBlur: d,
498
+ onFocus: _,
499
+ placeholder: u
500
+ } = e, { enumOptions: f = [] } = r, m = s ? [] : null, j = (x) => {
501
+ c(s ? x.map((p) => p.value) : x.value);
502
+ }, h = (x) => s ? f.filter((p) => x.some((g) => C(g, p.value))) : f.find((p) => C(x, p.value));
503
+ return /* @__PURE__ */ n.jsx(
504
+ G,
505
+ {
506
+ inputId: `devtron-rjsf-select__${t}`,
507
+ name: t,
508
+ isMulti: s,
509
+ value: typeof a > "u" ? m : h(a),
510
+ autoFocus: o,
511
+ onChange: j,
512
+ options: f,
513
+ onBlur: () => d(t, a),
514
+ onFocus: () => _(t, a),
515
+ placeholder: u || S.SELECT,
516
+ isDisabled: i || l,
517
+ menuPortalTarget: document.getElementById($),
518
+ menuPosition: "fixed"
519
+ }
520
+ );
521
+ }, Ne = {
522
+ CheckboxWidget: we,
523
+ SelectWidget: Fe
524
+ }, Se = {
525
+ ArrayFieldItemTemplate: ie,
526
+ ArrayFieldTemplate: ce,
527
+ BaseInputTemplate: ue,
528
+ ButtonTemplates: { AddButton: L, RemoveButton: me, SubmitButton: pe },
529
+ FieldTemplate: fe,
530
+ FieldErrorTemplate: he,
531
+ ObjectFieldTemplate: ve,
532
+ TitleFieldTemplate: O,
533
+ WrapIfAdditionalTemplate: Te
534
+ }, Oe = V, Pe = z, Me = J((e, t) => {
535
+ const { schemaPathToUpdatePathMap: s, isUpdatePathKeywordPresent: r } = P(() => {
536
+ const o = je(e.schema);
537
+ return {
538
+ schemaPathToUpdatePathMap: o,
539
+ isUpdatePathKeywordPresent: Object.entries(o).some(([c, d]) => c !== d)
540
+ };
541
+ }, [e.schema]), a = P(() => r ? be({ formData: e.formData ?? {}, schemaPathToUpdatePathMap: s }) : e.formData, [e.formData, s, r]), i = (o) => {
542
+ if (!e.onChange)
543
+ return;
544
+ const c = A({
545
+ formState: o.formData,
546
+ formData: e.formData,
547
+ schemaPathToUpdatePathMap: s
548
+ });
549
+ e.onChange({ ...o, formData: c });
550
+ }, l = (o, c) => {
551
+ if (!e.onSubmit)
552
+ return;
553
+ const d = A({
554
+ formState: o.formData,
555
+ formData: e.formData,
556
+ schemaPathToUpdatePathMap: s
557
+ });
558
+ e.onSubmit?.({ ...o, formData: d }, c);
559
+ };
560
+ return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
561
+ /* @__PURE__ */ n.jsx(
562
+ Oe,
563
+ {
564
+ noHtml5Validate: !0,
565
+ showErrorList: !1,
566
+ autoComplete: "off",
567
+ ...e,
568
+ formData: a,
569
+ ...r ? {
570
+ onChange: i,
571
+ onSubmit: l
572
+ } : {},
573
+ className: `rjsf-form-template__container ${e.className || ""}`,
574
+ validator: Pe,
575
+ templates: {
576
+ ...Se,
577
+ ...e.templates
578
+ },
579
+ formContext: a,
580
+ widgets: { ...Ne, ...e.widgets },
581
+ translateString: xe,
582
+ ref: t
583
+ }
584
+ ),
585
+ /* @__PURE__ */ n.jsx("div", { id: $ })
586
+ ] });
587
+ });
588
+ export {
589
+ Ue as H,
590
+ Me as R,
591
+ He as a,
592
+ je as b,
593
+ b as c,
594
+ ke as g
595
+ };
@@ -9,3 +9,4 @@ export declare const HIDE_SUBMIT_BUTTON_UI_SCHEMA: {
9
9
  norender: boolean;
10
10
  };
11
11
  };
12
+ export declare const RJSF_FORM_SELECT_PORTAL_TARGET_ID = "rjsf-form-select-portal-target";
@@ -2,6 +2,7 @@ import { IconBaseProps } from './types';
2
2
  export declare const iconMap: {
3
3
  'ic-73strings': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
4
4
  'ic-aborted': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
5
+ 'ic-activity': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
5
6
  'ic-add': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
6
7
  'ic-amazon-eks': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
7
8
  'ic-apica': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -92,6 +93,7 @@ export declare const iconMap: {
92
93
  'ic-flask': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
93
94
  'ic-folder-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
94
95
  'ic-folder-user': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
96
+ 'ic-folder': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
95
97
  'ic-gavel': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
96
98
  'ic-gear': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
97
99
  'ic-gift-gradient': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -147,6 +149,7 @@ export declare const iconMap: {
147
149
  'ic-mobile': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
148
150
  'ic-monitoring': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
149
151
  'ic-more-vertical': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
152
+ 'ic-namespace': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
150
153
  'ic-new': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
151
154
  'ic-node-script': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
152
155
  'ic-oidc': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -0,0 +1,2 @@
1
+ import { GroupedFilterSelectPickerProps } from './type';
2
+ export declare const GroupedFilterSelectPicker: <T extends string | number>({ id, filterSelectPickerPropsMap, isFilterApplied, ...restProps }: GroupedFilterSelectPickerProps<T>) => JSX.Element;
@@ -133,5 +133,5 @@ import { SelectPickerProps } from './type';
133
133
  * />
134
134
  * ```
135
135
  */
136
- declare const SelectPicker: <OptionValue, IsMulti extends boolean>({ error, icon, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, optionListError, reloadOptionList, menuPosition, variant, disableDescriptionEllipsis, multiSelectProps, isMulti, name, classNamePrefix, shouldRenderCustomOptions, isSearchable, selectRef: refFromConsumer, shouldMenuAlignRight, fullWidth, customSelectedOptionsCount, menuListFooterConfig, isCreatable, onCreateOption, closeMenuOnSelect, shouldShowNoOptionsMessage, shouldRenderTextArea, onKeyDown, shouldHideMenu, warningText, layout, ariaLabel, borderConfig, borderRadiusConfig, labelTippyCustomizedConfig, labelTooltipConfig, hideFormFieldInfo, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
136
+ declare const SelectPicker: <OptionValue, IsMulti extends boolean>({ error, icon, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, optionListError, reloadOptionList, menuPosition, variant, disableDescriptionEllipsis, multiSelectProps, isMulti, name, classNamePrefix, shouldRenderCustomOptions, isSearchable, selectRef: refFromConsumer, shouldMenuAlignRight, fullWidth, customSelectedOptionsCount, menuListFooterConfig, isCreatable, onCreateOption, closeMenuOnSelect, shouldShowNoOptionsMessage, shouldRenderTextArea, onKeyDown, shouldHideMenu, warningText, layout, ariaLabel, borderConfig, borderRadiusConfig, labelTippyCustomizedConfig, labelTooltipConfig, hideFormFieldInfo, autoFocus, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
137
137
  export default SelectPicker;
@@ -1,5 +1,6 @@
1
1
  export { ValueContainerWithLoadingShimmer } from './common';
2
2
  export { default as FilterSelectPicker } from './FilterSelectPicker';
3
+ export * from './GroupedFilterSelectPicker';
3
4
  export { default as SelectPicker } from './SelectPicker.component';
4
5
  export * from './SelectPickerTextArea.component';
5
6
  export * from './type';
@@ -6,6 +6,7 @@ import { ServerErrors } from '../../../Common/ServerError';
6
6
  import { TooltipProps } from '../../../Common/Tooltip';
7
7
  import { OptionType } from '../../../Common/Types';
8
8
  import { ComponentSizeType } from '../../constants';
9
+ import { ActionMenuProps } from '../ActionMenu';
9
10
  import { ButtonComponentType, ButtonProps, ButtonVariantType } from '../Button';
10
11
  import { FormFieldWrapperProps } from '../FormFieldWrapper/types';
11
12
  export interface SelectPickerOptionType<OptionValue = string | number> extends OptionType<OptionValue, ReactNode> {
@@ -100,7 +101,7 @@ export declare enum SelectPickerVariantType {
100
101
  BORDER_LESS = "border-less",
101
102
  COMPACT = "compact"
102
103
  }
103
- export type SelectPickerProps<OptionValue = number | string, IsMulti extends boolean = false> = Pick<SelectProps<OptionValue, IsMulti>, 'name' | 'classNamePrefix' | 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder' | 'menuPosition' | 'getOptionLabel' | 'getOptionValue' | 'isOptionSelected' | 'menuIsOpen' | 'onMenuOpen' | 'onMenuClose' | 'autoFocus' | 'onBlur' | 'onKeyDown' | 'formatOptionLabel' | 'onInputChange' | 'inputValue' | 'filterOption' | 'noOptionsMessage' | 'defaultMenuIsOpen'> & Partial<Pick<SelectProps<OptionValue, IsMulti>, 'shouldRenderCustomOptions' | 'renderCustomOptions' | 'icon' | 'showSelectedOptionIcon' | 'renderOptionsFooter' | 'shouldRenderTextArea'>> & Required<Pick<SelectProps<OptionValue, IsMulti>, 'inputId'>> & Partial<Pick<CreatableProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>, 'onCreateOption' | 'formatCreateLabel' | 'menuPortalTarget'>> & Omit<FormFieldWrapperProps, 'children'> & {
104
+ export type SelectPickerProps<OptionValue = number | string, IsMulti extends boolean = false> = Pick<SelectProps<OptionValue, IsMulti>, 'name' | 'classNamePrefix' | 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder' | 'menuPosition' | 'getOptionLabel' | 'getOptionValue' | 'isOptionSelected' | 'menuIsOpen' | 'onMenuOpen' | 'onMenuClose' | 'autoFocus' | 'onBlur' | 'onKeyDown' | 'formatOptionLabel' | 'onInputChange' | 'inputValue' | 'filterOption' | 'noOptionsMessage' | 'defaultMenuIsOpen' | 'onFocus'> & Partial<Pick<SelectProps<OptionValue, IsMulti>, 'shouldRenderCustomOptions' | 'renderCustomOptions' | 'icon' | 'showSelectedOptionIcon' | 'renderOptionsFooter' | 'shouldRenderTextArea'>> & Required<Pick<SelectProps<OptionValue, IsMulti>, 'inputId'>> & Partial<Pick<CreatableProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>, 'onCreateOption' | 'formatCreateLabel' | 'menuPortalTarget'>> & Omit<FormFieldWrapperProps, 'children'> & {
104
105
  /**
105
106
  * Config for the footer at the bottom of menu list. It is sticky by default
106
107
  *
@@ -215,9 +216,13 @@ export type SelectPickerProps<OptionValue = number | string, IsMulti extends boo
215
216
  export type SelectPickerGroupHeadingProps<OptionValue> = GroupHeadingProps<SelectPickerOptionType<OptionValue>> & {
216
217
  isGroupHeadingSelectable: boolean;
217
218
  };
218
- export interface FilterSelectPickerProps extends Required<Pick<SelectPickerProps<number | string, true>, 'options' | 'isDisabled' | 'placeholder' | 'isLoading'>>, Pick<SelectPickerProps<number | string, true>, 'selectRef' | 'inputId' | 'menuPosition' | 'autoFocus' | 'shouldMenuAlignRight' | 'optionListError' | 'reloadOptionList' | 'getOptionValue' | 'isOptionDisabled'> {
219
+ export interface FilterSelectPickerProps extends Required<Pick<SelectPickerProps<number | string, true>, 'options' | 'isDisabled' | 'placeholder' | 'isLoading'>>, Pick<SelectPickerProps<number | string, true>, 'selectRef' | 'inputId' | 'menuPosition' | 'autoFocus' | 'shouldMenuAlignRight' | 'optionListError' | 'reloadOptionList' | 'getOptionValue' | 'isOptionDisabled' | 'onMenuClose' | 'menuIsOpen' | 'onKeyDown'> {
219
220
  appliedFilterOptions: SelectPickerOptionType[];
220
221
  handleApplyFilter: (filtersToApply: SelectPickerOptionType<number | string>[]) => void;
221
222
  }
222
223
  export type SelectPickerTextAreaProps = Omit<SelectPickerProps<string, false>, 'selectRef' | 'inputValue' | 'onInputChange' | 'controlShouldRenderValue' | 'onKeyDown' | 'onCreateOption' | 'shouldRenderTextArea'> & Pick<ResizableTagTextAreaProps, 'maxHeight' | 'minHeight' | 'refVar' | 'dependentRefs'>;
224
+ export interface GroupedFilterSelectPickerProps<T extends string | number = string | number> extends Omit<ActionMenuProps<T>, 'onClick' | 'disableDescriptionEllipsis' | 'children' | 'buttonProps' | 'isSearchable'> {
225
+ isFilterApplied?: boolean;
226
+ filterSelectPickerPropsMap: Record<T, Omit<FilterSelectPickerProps, 'autoFocus' | 'menuIsOpen' | 'onMenuClose' | 'onKeyDown'>>;
227
+ }
223
228
  export {};