@devtron-labs/devtron-fe-common-lib 1.5.2-beta-1 → 1.5.2-beta-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.
Files changed (38) hide show
  1. package/dist/@code-editor-BUYzZERD.js +18136 -0
  2. package/dist/{@code-editor-ZZG6aOfw.js → @common-rjsf-C8ECaBh9.js} +7862 -7080
  3. package/dist/{@framer-motion-CdgdF0KV.js → @framer-motion-kiKkrflf.js} +70 -70
  4. package/dist/{@react-dates-CtQV2TLr.js → @react-dates-CYDS4B1O.js} +14 -14
  5. package/dist/{@react-select-Cn3OpC9h.js → @react-select-DO6kTltA.js} +1 -1
  6. package/dist/{@react-virtualized-sticky-tree-CVJYfMx0.js → @react-virtualized-sticky-tree-CUw0C6F9.js} +1 -1
  7. package/dist/@vendor-Dh1o-c9o.js +41567 -0
  8. package/dist/Common/ClipboardButton/index.d.ts +1 -0
  9. package/dist/Common/CodeEditor/CodeEditor.components.d.ts +6 -0
  10. package/dist/Common/CodeEditor/CodeEditor.context.d.ts +3 -0
  11. package/dist/Common/CodeEditor/CodeEditor.d.ts +9 -3
  12. package/dist/Common/CodeEditor/CodeEditor.reducer.d.ts +3 -47
  13. package/dist/Common/CodeEditor/CodeEditor.theme.d.ts +2 -0
  14. package/dist/Common/CodeEditor/Extensions/findAndReplace.d.ts +2 -0
  15. package/dist/Common/CodeEditor/Extensions/index.d.ts +3 -0
  16. package/dist/Common/CodeEditor/Extensions/readOnlyTooltip.d.ts +2 -0
  17. package/dist/Common/CodeEditor/Extensions/yamlParseErrorLint.d.ts +1 -0
  18. package/dist/Common/CodeEditor/index.d.ts +1 -1
  19. package/dist/Common/CodeEditor/types.d.ts +64 -76
  20. package/dist/Common/CodeEditor/utils.d.ts +9 -3
  21. package/dist/Shared/Components/Button/constants.d.ts +3 -2
  22. package/dist/Shared/Components/Button/utils.d.ts +1 -1
  23. package/dist/Shared/Components/Collapse/Collapse.d.ts +0 -1
  24. package/dist/Shared/constants.d.ts +1 -0
  25. package/dist/Shared/types.d.ts +3 -0
  26. package/dist/assets/@common-rjsf.css +1 -1
  27. package/dist/assets/ic-match-case.702186fe.svg +3 -0
  28. package/dist/assets/ic-match-word.991dea5a.svg +3 -0
  29. package/dist/assets/ic-replace-all-text.4c69aea8.svg +6 -0
  30. package/dist/assets/ic-replace-text.47c57097.svg +7 -0
  31. package/dist/index.js +406 -409
  32. package/package.json +10 -7
  33. package/dist/@common-rjsf-DO7kJLDu.js +0 -516
  34. package/dist/@monaco-editor-CVagbUeH.js +0 -138960
  35. package/dist/@vendor-CwAQS8iU.js +0 -21782
  36. package/dist/assets/@code-editor.css +0 -1
  37. package/dist/assets/@monaco-editor.css +0 -1
  38. package/dist/assets/codicon.ecfbfe4b.ttf +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "1.5.2-beta-1",
3
+ "version": "1.5.2-beta-2",
4
4
  "description": "Supporting common component library",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -43,6 +43,7 @@
43
43
  "@tippyjs/react": "^4.2.0",
44
44
  "@typeform/embed-react": "2.20.0",
45
45
  "@types/dompurify": "^3.0.5",
46
+ "@types/json-schema": "^7.0.15",
46
47
  "@types/react": "17.0.39",
47
48
  "@types/react-dom": "17.0.13",
48
49
  "@types/react-router-dom": "^5.3.3",
@@ -60,10 +61,9 @@
60
61
  "eslint-plugin-react-hooks": "^4.6.0",
61
62
  "glob": "^10.3.3",
62
63
  "husky": "^7.0.4",
64
+ "json-schema": "^0.4.0",
63
65
  "lint-staged": "^12.5.0",
64
66
  "moment": "^2.29.4",
65
- "monaco-editor": "0.44.0",
66
- "monaco-yaml": "5.1.1",
67
67
  "prettier": "^3.1.1",
68
68
  "react-ga4": "^1.4.1",
69
69
  "react-toastify": "9.1.3",
@@ -95,17 +95,23 @@
95
95
  "yaml": "^2.4.1"
96
96
  },
97
97
  "dependencies": {
98
+ "@codemirror/lang-json": "6.0.1",
99
+ "@codemirror/lang-yaml": "6.1.2",
100
+ "@codemirror/legacy-modes": "6.4.2",
98
101
  "@types/react-dates": "^21.8.6",
102
+ "@uiw/codemirror-theme-github": "^4.23.7",
103
+ "@uiw/react-codemirror": "4.23.7",
99
104
  "ansi_up": "^5.2.1",
105
+ "codemirror-json-schema": "0.8.0",
100
106
  "dayjs": "^1.11.13",
101
107
  "fast-json-patch": "^3.1.1",
102
108
  "framer-motion": "^6.5.1",
103
109
  "jsonpath-plus": "^10.0.0",
104
110
  "marked": "^13.0.3",
105
111
  "nanoid": "^3.3.8",
112
+ "react-codemirror-merge": "4.23.6",
106
113
  "react-dates": "^21.8.0",
107
114
  "react-diff-viewer-continued": "^3.4.0",
108
- "react-monaco-editor": "^0.54.0",
109
115
  "react-virtualized-sticky-tree": "^3.0.0-beta18",
110
116
  "sass": "^1.69.7",
111
117
  "tslib": "2.7.0"
@@ -116,9 +122,6 @@
116
122
  "react": "^17.0.2",
117
123
  "react-dom": "^17.0.2"
118
124
  },
119
- "react-monaco-editor": {
120
- "monaco-editor": "0.44.0"
121
- },
122
125
  "vite-plugin-svgr": {
123
126
  "vite": "5.4.11"
124
127
  },
@@ -1,516 +0,0 @@
1
- import { j as t, J as $ } from "./@vendor-CwAQS8iU.js";
2
- import A, { forwardRef as E } from "react";
3
- import L, { getDefaultRegistry as D } from "@rjsf/core";
4
- import H from "@rjsf/validator-ajv8";
5
- import { T as v, c as U, a as k, i as J, b as w, d as S } from "./@code-editor-ZZG6aOfw.js";
6
- import M, { components as B } from "react-select";
7
- import { ReactComponent as W } from "./assets/ic-chevron-down.fc70d7a7.svg";
8
- import { getUiOptions as C, getTemplate as I, getSubmitButtonOptions as V, ADDITIONAL_PROPERTY_FLAG as P, errorId as q, englishStringTranslator as K, TranslatableString as Y, titleId as z, canExpand as G, deepEquals as Q } from "@rjsf/utils";
9
- import { ReactComponent as X } from "./assets/ic-add.cfaa779b.svg";
10
- import { ReactComponent as Z } from "./assets/ic-cross.01e03666.svg";
11
- import { ReactComponent as ee } from "./assets/ic-warning.10bcf8bd.svg";
12
- import './assets/@common-rjsf.css';const T = {
13
- SELECT: "Please select an option",
14
- INPUT: "Please enter an input",
15
- OBJECT_KEY: "Please enter a value for the key"
16
- }, te = "Key not available", Ae = {
17
- "ui:submitButtonOptions": {
18
- norender: !0
19
- }
20
- }, g = ({
21
- showLabel: n,
22
- label: e,
23
- required: s,
24
- children: a,
25
- id: r,
26
- rawDescription: o,
27
- shouldAlignCenter: i = !0
28
- }) => /* @__PURE__ */ t.jsxs(
29
- "div",
30
- {
31
- className: n ? `display-grid dc__gap-12 rjsf-form-template__field ${i ? "flex-align-center" : ""}` : "",
32
- children: [
33
- n && /* @__PURE__ */ t.jsxs("label", { className: "cn-7 fs-13 lh-20 fw-4 flexbox mb-0", htmlFor: r, children: [
34
- /* @__PURE__ */ t.jsx(v, { alwaysShowTippyOnHover: !!o, content: o, children: /* @__PURE__ */ t.jsx("span", { className: `dc__ellipsis-right ${o ? "text-underline-dashed-300" : ""}`, children: e || te }) }),
35
- s && /* @__PURE__ */ t.jsx("span", { className: "cr-5", children: " *" })
36
- ] }),
37
- a
38
- ]
39
- }
40
- ), F = ({ label: n, canAdd: e, onAddClick: s, disabled: a, readonly: r, uiSchema: o, registry: i }) => {
41
- const {
42
- ButtonTemplates: { AddButton: c }
43
- } = i.templates;
44
- return e && /* @__PURE__ */ t.jsx(
45
- c,
46
- {
47
- label: n,
48
- onClick: s,
49
- disabled: a || r,
50
- uiSchema: o,
51
- registry: i
52
- }
53
- );
54
- }, ne = ({
55
- canAdd: n,
56
- className: e,
57
- disabled: s,
58
- idSchema: a,
59
- uiSchema: r,
60
- items: o,
61
- onAddClick: i,
62
- readonly: c,
63
- registry: l,
64
- required: d,
65
- title: f
66
- }) => {
67
- const p = C(r), h = I("ArrayFieldItemTemplate", l, p), m = p.title || f;
68
- return /* @__PURE__ */ t.jsx("fieldset", { className: e, id: a.$id, children: o.length ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
69
- o.map(({ key: _, ...x }, j) => {
70
- const u = {
71
- ...x.children,
72
- props: {
73
- ...x.children.props
74
- }
75
- };
76
- return /* @__PURE__ */ t.jsx(h, { ...x, children: u }, _);
77
- }),
78
- /* @__PURE__ */ t.jsx(
79
- F,
80
- {
81
- label: m,
82
- canAdd: n,
83
- onAddClick: i,
84
- disabled: s,
85
- readonly: c,
86
- uiSchema: r,
87
- registry: l
88
- }
89
- )
90
- ] }) : /* @__PURE__ */ t.jsx(g, { label: m, required: d, showLabel: !0, id: a.$id, children: /* @__PURE__ */ t.jsx(
91
- F,
92
- {
93
- label: m,
94
- canAdd: n,
95
- onAddClick: i,
96
- disabled: s,
97
- readonly: c,
98
- uiSchema: r,
99
- registry: l
100
- }
101
- ) }) });
102
- }, se = ({
103
- children: n,
104
- disabled: e,
105
- hasToolbar: s,
106
- hasRemove: a,
107
- index: r,
108
- onDropIndexClick: o,
109
- readonly: i,
110
- registry: c,
111
- uiSchema: l
112
- }) => {
113
- const { RemoveButton: d } = c.templates.ButtonTemplates;
114
- return /* @__PURE__ */ t.jsxs("div", { className: "dc__position-rel display-grid rjsf-form-template__array-field-item flex-align-center", children: [
115
- n,
116
- /* @__PURE__ */ t.jsx("div", { className: "dc__position-abs remove-btn__container", style: { right: "-28px", top: "9px" }, children: s && a && /* @__PURE__ */ t.jsx(
117
- d,
118
- {
119
- disabled: e || i,
120
- onClick: o(r),
121
- uiSchema: l,
122
- registry: c
123
- }
124
- ) })
125
- ] });
126
- }, {
127
- templates: { BaseInputTemplate: ae }
128
- } = D(), re = ({ placeholder: n, ...e }) => /* @__PURE__ */ t.jsx(
129
- ae,
130
- {
131
- placeholder: n || T.INPUT,
132
- ...e,
133
- className: "form__input cn-9 fs-13 lh-20 fw-4"
134
- }
135
- ), R = ({
136
- label: n,
137
- icon: e,
138
- iconType: s,
139
- registry: a,
140
- uiSchema: r,
141
- ...o
142
- }) => {
143
- const i = `Add ${n}`;
144
- return /* @__PURE__ */ t.jsx("div", { className: "flexbox flex-justify-start", children: /* @__PURE__ */ t.jsxs(
145
- "button",
146
- {
147
- ...o,
148
- type: "button",
149
- className: "dc__outline-none-imp p-0 dc__transparent flex dc__gap-4 cursor dc__mxw-250",
150
- title: "Add",
151
- children: [
152
- /* @__PURE__ */ t.jsx(X, { className: "icon-dim-16 fcb-5" }),
153
- /* @__PURE__ */ t.jsx(v, { placement: "right", content: i, children: /* @__PURE__ */ t.jsx("span", { className: "cb-5 fs-13 lh-34 dc__truncate", children: i }) })
154
- ]
155
- }
156
- ) });
157
- }, oe = ({ icon: n, iconType: e, registry: s, uiSchema: a, ...r }) => /* @__PURE__ */ t.jsx("button", { ...r, type: "button", className: "dc__outline-none-imp p-0 dc__transparent flex cursor", title: "Remove", children: /* @__PURE__ */ t.jsx(Z, { className: "icon-dim-16 fcn-6" }) }), ie = ({ uiSchema: n }) => {
158
- const { submitText: e, norender: s, props: a = {} } = V(n);
159
- return s ? null : /* @__PURE__ */ t.jsx("div", { className: "flexbox flex-justify-end", children: /* @__PURE__ */ t.jsx("button", { type: "submit", ...a, className: `cta ${a.className || ""}`, children: e }) });
160
- }, N = ({
161
- id: n,
162
- title: e,
163
- required: s,
164
- description: a
165
- }) => /* @__PURE__ */ t.jsxs("legend", { className: "fs-13 fw-6 cn-9 lh-20 dc__no-border pb-9 mb-0", id: n, children: [
166
- /* @__PURE__ */ t.jsx(v, { alwaysShowTippyOnHover: !!a, content: a, children: /* @__PURE__ */ t.jsx("span", { className: `${a ? "text-underline-dashed-300" : ""}`, children: e }) }),
167
- s && /* @__PURE__ */ t.jsx("span", { className: "cr-5", children: " *" })
168
- ] }), le = (n) => {
169
- const {
170
- id: e,
171
- label: s,
172
- children: a,
173
- errors: r,
174
- hidden: o,
175
- required: i,
176
- displayLabel: c,
177
- registry: l,
178
- uiSchema: d,
179
- classNames: f,
180
- schema: p,
181
- rawDescription: h
182
- } = n, m = C(d), _ = I(
183
- "WrapIfAdditionalTemplate",
184
- l,
185
- m
186
- ), x = P in p, j = (c || p.type === "boolean") && !x, u = p.type === "array";
187
- return o ? /* @__PURE__ */ t.jsx("div", { className: "hidden", children: a }) : (
188
- // NOTE: need to override the margins of default rjsf css
189
- /* @__PURE__ */ t.jsxs("div", { className: `${f} mb-0`, children: [
190
- u && /* @__PURE__ */ t.jsx(
191
- N,
192
- {
193
- id: e,
194
- title: s,
195
- required: i,
196
- registry: l,
197
- uiSchema: d,
198
- schema: p,
199
- description: h
200
- }
201
- ),
202
- /* @__PURE__ */ t.jsx(
203
- g,
204
- {
205
- label: s,
206
- showLabel: j,
207
- id: e,
208
- required: i,
209
- rawDescription: h,
210
- children: /* @__PURE__ */ t.jsx(_, { ...n, children: a })
211
- }
212
- ),
213
- r
214
- ] })
215
- );
216
- }, ce = ({ errors: n = [], idSchema: e }) => {
217
- const s = q(e);
218
- return n.length > 0 && /* @__PURE__ */ t.jsx("span", { className: "display-grid rjsf-form-template__field--error dc__gap-12", id: s, children: n.filter((a) => !!a).map((a, r) => /* @__PURE__ */ t.jsxs(A.Fragment, { children: [
219
- /* @__PURE__ */ t.jsx("span", {}),
220
- /* @__PURE__ */ t.jsxs("span", { className: "form__error", children: [
221
- /* @__PURE__ */ t.jsx(ee, { className: "form__icon form__icon--error" }),
222
- a
223
- ] })
224
- ] }, r)) });
225
- }, de = (n, e) => {
226
- switch (n) {
227
- case Y.NewStringDefault:
228
- return "";
229
- default:
230
- return K(n, e);
231
- }
232
- }, Ee = (n) => {
233
- try {
234
- const e = new URL(n).origin === window.location.origin;
235
- return {
236
- href: n,
237
- target: e ? "_self" : "_blank",
238
- rel: e ? void 0 : "external noreferrer",
239
- url: n
240
- };
241
- } catch {
242
- return {
243
- href: n,
244
- target: "_blank",
245
- url: `${n} (Invalid URL)`
246
- };
247
- }
248
- }, Le = (n) => {
249
- const e = typeof n;
250
- switch (e) {
251
- case "boolean":
252
- case "string":
253
- case "number":
254
- return e;
255
- case "object":
256
- return Array.isArray(n) ? "array" : n === null ? "null" : e;
257
- default:
258
- return "null";
259
- }
260
- }, y = (n) => {
261
- if (!n)
262
- return "";
263
- const e = n.trim();
264
- return e.match(/^\w+(\/\w+)*$/g) ? `/${e}` : e.match(/^\w+(\.\w+)*$/g) ? `/${e.replaceAll(/\./g, "/")}` : e;
265
- }, O = {
266
- value: !1,
267
- path: ""
268
- }, pe = (n) => {
269
- if (!n)
270
- return null;
271
- const e = structuredClone(n);
272
- return typeof e == "string" ? {
273
- value: !0,
274
- path: y(e)
275
- } : typeof e != "object" ? structuredClone(O) : Object.hasOwn(e, "condition") && "condition" in e && Object.hasOwn(e, "value") && "value" in e ? {
276
- value: e.condition,
277
- path: y(e.value)
278
- } : Object.hasOwn(e, "value") && "value" in e && Object.hasOwn(e, "path") && "path" in e ? {
279
- value: e.value,
280
- path: y(e.path)
281
- } : structuredClone(O);
282
- }, me = ({
283
- disabled: n,
284
- formData: e,
285
- idSchema: s,
286
- onAddClick: a,
287
- properties: r,
288
- readonly: o,
289
- registry: i,
290
- required: c,
291
- schema: l,
292
- title: d,
293
- uiSchema: f,
294
- formContext: p
295
- }) => {
296
- const h = !!l.additionalProperties, m = G(l, f, e) && /* @__PURE__ */ t.jsx(
297
- R,
298
- {
299
- label: d,
300
- className: "object-property-expand",
301
- onClick: a(l),
302
- disabled: n || o,
303
- uiSchema: f,
304
- registry: i
305
- }
306
- ), _ = r.filter((x) => {
307
- const j = l.properties?.[x.name]?.hidden;
308
- if (!j)
309
- return !0;
310
- try {
311
- const u = pe(j);
312
- if (!u.path)
313
- throw new Error("Empty path property of hidden descriptor field");
314
- if (!u.path.match(/^\/\w+(\/\w+)*$/g))
315
- throw new Error("Provided path is not a valid JSON pointer");
316
- const b = $({
317
- path: U(u.path),
318
- json: p
319
- })?.[0];
320
- return !(b === void 0 || Q(u.value, b));
321
- } catch {
322
- return !0;
323
- }
324
- }).sort((x) => l.properties?.[x.name]?.type === "boolean" ? -1 : 1).map((x) => x.content);
325
- return h ? r.length ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
326
- /* @__PURE__ */ t.jsx(
327
- g,
328
- {
329
- label: d,
330
- required: c,
331
- showLabel: !0,
332
- id: s.$id,
333
- shouldAlignCenter: !1,
334
- children: /* @__PURE__ */ t.jsx("div", { children: _ })
335
- }
336
- ),
337
- m
338
- ] }) : /* @__PURE__ */ t.jsx(g, { label: d, required: c, showLabel: !0, id: s.$id, children: m }) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
339
- _,
340
- m
341
- ] });
342
- }, ue = (n) => {
343
- const { idSchema: e, registry: s, required: a, schema: r, title: o, uiSchema: i, description: c } = n, l = !!r.additionalProperties, d = o && !l;
344
- return /* @__PURE__ */ t.jsxs("fieldset", { id: e.$id, children: [
345
- d && /* @__PURE__ */ t.jsx(
346
- N,
347
- {
348
- id: z(e),
349
- title: o,
350
- required: a,
351
- schema: r,
352
- uiSchema: i,
353
- registry: s,
354
- description: c
355
- }
356
- ),
357
- /* @__PURE__ */ t.jsx(
358
- "div",
359
- {
360
- className: `${r.properties && !l && e.$id !== "root" ? "dc__border-left pl-12" : ""} ${e.$id === "root" ? "dc__separated-flexbox dc__separated-flexbox--vertical" : "flexbox-col dc__gap-8"}`,
361
- children: /* @__PURE__ */ t.jsx(me, { ...n })
362
- }
363
- )
364
- ] });
365
- }, he = ({
366
- id: n,
367
- disabled: e,
368
- label: s,
369
- onKeyChange: a,
370
- onDropPropertyClick: r,
371
- readonly: o,
372
- schema: i,
373
- children: c,
374
- uiSchema: l,
375
- registry: d
376
- }) => {
377
- const { templates: f } = d, { RemoveButton: p } = f.ButtonTemplates, h = P in i;
378
- return /* @__PURE__ */ t.jsx(t.Fragment, { children: h ? /* @__PURE__ */ t.jsxs("div", { className: "dc__position-rel rjsf-form-template__additional-fields display-grid dc__gap-8 flex-align-center", children: [
379
- /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
380
- "input",
381
- {
382
- type: "text",
383
- className: "form__input cn-9 fs-13 lh-20 fw-4",
384
- id: `${n}-key`,
385
- onBlur: (m) => a(m.target.value),
386
- placeholder: T.OBJECT_KEY,
387
- defaultValue: s
388
- }
389
- ) }),
390
- /* @__PURE__ */ t.jsx("div", { children: c }),
391
- /* @__PURE__ */ t.jsx("div", { className: "dc__position-abs remove-btn__container", style: { right: "-28px", top: "9px" }, children: /* @__PURE__ */ t.jsx(
392
- p,
393
- {
394
- disabled: e || o,
395
- onClick: r(s),
396
- uiSchema: l,
397
- registry: d
398
- }
399
- ) })
400
- ] }) : c });
401
- }, fe = ({
402
- id: n,
403
- onChange: e,
404
- value: s,
405
- required: a,
406
- disabled: r,
407
- readonly: o,
408
- autofocus: i,
409
- onBlur: c,
410
- onFocus: l
411
- }) => {
412
- const d = (p, h) => {
413
- const { id: m, checked: _ } = p.target;
414
- h === "blur" ? c(m, _) : h === "focus" && l(m, _);
415
- }, f = J(s) ? !1 : s;
416
- return /* @__PURE__ */ t.jsxs("div", { children: [
417
- /* @__PURE__ */ t.jsx(
418
- k,
419
- {
420
- selected: f,
421
- onSelect: e,
422
- id: n,
423
- name: n,
424
- required: a,
425
- disabled: r || o,
426
- autoFocus: i,
427
- rootClassName: "w-32 mb-0 dc__height-inherit",
428
- onBlur: (p) => d(p, "blur"),
429
- onFocus: (p) => d(p, "focus")
430
- }
431
- ),
432
- /* @__PURE__ */ t.jsx("span", { className: "dc__capitalize ml-8", children: f.toString() })
433
- ] });
434
- }, xe = ({ children: n, ...e }) => /* @__PURE__ */ t.jsx(B.MenuList, { ...e, children: Array.isArray(n) ? n.slice(0, 20) : n }), je = (n) => /* @__PURE__ */ t.jsx(B.DropdownIndicator, { ...n, children: /* @__PURE__ */ t.jsx(W, { className: "icon-dim-20 icon-n5", "data-testid": "overview-project-edit-dropdown" }) }), _e = (n) => {
435
- const {
436
- id: e,
437
- multiple: s = !1,
438
- options: a,
439
- value: r,
440
- disabled: o,
441
- readonly: i,
442
- autofocus: c = !1,
443
- onChange: l,
444
- onBlur: d,
445
- onFocus: f,
446
- placeholder: p
447
- } = n, { enumOptions: h = [] } = a, m = s ? [] : "", _ = (j) => {
448
- l(s ? j.map((u) => u.value) : j.value);
449
- }, x = (j) => s ? h.filter((u) => j.some((b) => S(b, u.value))) : h.find((u) => S(j, u.value));
450
- return /* @__PURE__ */ t.jsx(
451
- M,
452
- {
453
- id: e,
454
- name: e,
455
- isMulti: s,
456
- value: typeof r > "u" ? m : x(r),
457
- autoFocus: c,
458
- onChange: _,
459
- options: h,
460
- onBlur: () => d(e, r),
461
- onFocus: () => f(e, r),
462
- placeholder: p || T.SELECT,
463
- isDisabled: o || i,
464
- styles: {
465
- ...w,
466
- control: (j, u) => ({
467
- ...w.control(j, u),
468
- height: "36px"
469
- })
470
- },
471
- components: {
472
- IndicatorSeparator: null,
473
- DropdownIndicator: je,
474
- MenuList: xe
475
- },
476
- menuPlacement: "auto"
477
- }
478
- );
479
- }, be = {
480
- CheckboxWidget: fe,
481
- SelectWidget: _e
482
- }, ge = {
483
- ArrayFieldItemTemplate: se,
484
- ArrayFieldTemplate: ne,
485
- BaseInputTemplate: re,
486
- ButtonTemplates: { AddButton: R, RemoveButton: oe, SubmitButton: ie },
487
- FieldTemplate: le,
488
- FieldErrorTemplate: ce,
489
- ObjectFieldTemplate: ue,
490
- TitleFieldTemplate: N,
491
- WrapIfAdditionalTemplate: he
492
- }, ye = L, ve = H, De = E((n, e) => /* @__PURE__ */ t.jsx(
493
- ye,
494
- {
495
- noHtml5Validate: !0,
496
- showErrorList: !1,
497
- autoComplete: "off",
498
- ...n,
499
- className: `rjsf-form-template__container ${n.className || ""}`,
500
- validator: ve,
501
- templates: {
502
- ...ge,
503
- ...n.templates
504
- },
505
- formContext: n.formData,
506
- widgets: { ...be, ...n.widgets },
507
- translateString: de,
508
- ref: e
509
- }
510
- ));
511
- export {
512
- Ae as H,
513
- De as R,
514
- Ee as a,
515
- Le as g
516
- };