@gen-epix/ui-core-form 4.0.2 → 4.2.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.
- package/dist/_chunks/Autocomplete.js +86 -84
- package/dist/_chunks/Autocomplete.js.map +1 -1
- package/dist/_chunks/DatePicker.js +26 -26
- package/dist/_chunks/FileUpload.js +73 -0
- package/dist/_chunks/FileUpload.js.map +1 -0
- package/dist/_chunks/FormUtil.js +4 -1
- package/dist/_chunks/FormUtil.js.map +1 -1
- package/dist/_chunks/RichTextEditor.js +7658 -4335
- package/dist/_chunks/RichTextEditor.js.map +1 -1
- package/dist/_chunks/TransferList.js +59 -59
- package/dist/_chunks/TransferList.js.map +1 -1
- package/dist/components/fields/Autocomplete/Autocomplete.d.ts +6 -3
- package/dist/components/fields/CheckboxGroup/index.js +14 -14
- package/dist/components/fields/DateRangePicker/index.js +39 -39
- package/dist/components/fields/DateRangePicker/index.js.map +1 -1
- package/dist/components/fields/{UploadButton/UploadButton.d.ts → FileUpload/FileUpload.d.ts} +2 -2
- package/dist/components/fields/FileUpload/index.d.ts +1 -0
- package/dist/components/fields/FileUpload/index.js +2 -0
- package/dist/components/fields/NumberField/index.js +29 -29
- package/dist/components/fields/NumberField/index.js.map +1 -1
- package/dist/components/fields/NumberRangeInput/index.js +34 -34
- package/dist/components/fields/RadioGroup/index.js +7 -7
- package/dist/components/fields/Select/index.js +32 -19
- package/dist/components/fields/Select/index.js.map +1 -1
- package/dist/components/fields/Switch/Switch.d.ts +3 -2
- package/dist/components/fields/Switch/index.js +50 -40
- package/dist/components/fields/Switch/index.js.map +1 -1
- package/dist/components/fields/TextField/index.js +19 -19
- package/dist/components/fields/ToggleButtonGroup/index.js +7 -7
- package/dist/components/helpers/GenericForm/GenericForm.d.ts +1 -1
- package/dist/components/helpers/GenericForm/index.js +42 -32
- package/dist/components/helpers/GenericForm/index.js.map +1 -1
- package/dist/hooks/useIsFormFieldRequiredFromSchema/index.js +5 -4
- package/dist/hooks/useIsFormFieldRequiredFromSchema/index.js.map +1 -1
- package/dist/models/form.d.ts +31 -19
- package/dist/models/form.js.map +1 -1
- package/package.json +84 -81
- package/dist/_chunks/UploadButton.js +0 -91
- package/dist/_chunks/UploadButton.js.map +0 -1
- package/dist/_chunks/index.esm.js +0 -398
- package/dist/_chunks/index.esm.js.map +0 -1
- package/dist/components/fields/UploadButton/index.d.ts +0 -1
- package/dist/components/fields/UploadButton/index.js +0 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as e, t } from "./rolldown-runtime.js";
|
|
2
2
|
import { t as n } from "./FormUtil.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { FormFieldHelperText as r } from "../components/helpers/FormFieldHelperText/index.js";
|
|
4
|
+
import { a as i, d as a, i as o, n as s, o as c, t as l } from "./isObjectLike.js";
|
|
5
|
+
import { useCallback as u, useEffect as d, useId as f, useMemo as p, useRef as m, useState as h } from "react";
|
|
6
|
+
import { Controller as g, useFormContext as _ } from "react-hook-form";
|
|
7
7
|
import { useTranslation as v } from "react-i18next";
|
|
8
8
|
import { Box as y, Button as b, Checkbox as x, FormControl as S, FormHelperText as C, FormLabel as w, List as T, ListItemButton as E, ListItemIcon as D, ListItemText as O, Paper as k, TextField as A, useTheme as j } from "@mui/material";
|
|
9
9
|
import { jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
@@ -51,20 +51,20 @@ var F = /* @__PURE__ */ t(((e, t) => {
|
|
|
51
51
|
}
|
|
52
52
|
t.exports = n;
|
|
53
53
|
})), H = /* @__PURE__ */ t(((e, t) => {
|
|
54
|
-
var n =
|
|
55
|
-
function f(e, t,
|
|
56
|
-
for (var
|
|
54
|
+
var n = c(), r = B(), a = V(), s = F(), l = i(), u = o(), d = Math.min;
|
|
55
|
+
function f(e, t, i) {
|
|
56
|
+
for (var o = i ? a : r, c = e[0].length, f = e.length, p = f, m = Array(f), h = Infinity, g = []; p--;) {
|
|
57
57
|
var _ = e[p];
|
|
58
|
-
p && t && (_ =
|
|
58
|
+
p && t && (_ = s(_, l(t))), h = d(_.length, h), m[p] = !i && (t || c >= 120 && _.length >= 120) ? new n(p && _) : void 0;
|
|
59
59
|
}
|
|
60
60
|
_ = e[0];
|
|
61
61
|
var v = -1, y = m[0];
|
|
62
|
-
outer: for (; ++v <
|
|
62
|
+
outer: for (; ++v < c && g.length < h;) {
|
|
63
63
|
var b = _[v], x = t ? t(b) : b;
|
|
64
|
-
if (b =
|
|
64
|
+
if (b = i || b !== 0 ? b : 0, !(y ? u(y, x) : o(g, x, i))) {
|
|
65
65
|
for (p = f; --p;) {
|
|
66
66
|
var S = m[p];
|
|
67
|
-
if (!(S ?
|
|
67
|
+
if (!(S ? u(S, x) : o(e[p], x, i))) continue outer;
|
|
68
68
|
}
|
|
69
69
|
y && y.push(x), g.push(b);
|
|
70
70
|
}
|
|
@@ -107,7 +107,7 @@ var F = /* @__PURE__ */ t(((e, t) => {
|
|
|
107
107
|
}
|
|
108
108
|
t.exports = n;
|
|
109
109
|
})), q = /* @__PURE__ */ t(((e, t) => {
|
|
110
|
-
var n =
|
|
110
|
+
var n = a();
|
|
111
111
|
t.exports = function() {
|
|
112
112
|
try {
|
|
113
113
|
var e = n(Object, "defineProperty");
|
|
@@ -147,7 +147,7 @@ var F = /* @__PURE__ */ t(((e, t) => {
|
|
|
147
147
|
}
|
|
148
148
|
t.exports = a;
|
|
149
149
|
})), Q = /* @__PURE__ */ t(((e, t) => {
|
|
150
|
-
var n =
|
|
150
|
+
var n = s(), r = l();
|
|
151
151
|
function i(e) {
|
|
152
152
|
return r(e) && n(e);
|
|
153
153
|
}
|
|
@@ -166,27 +166,27 @@ var F = /* @__PURE__ */ t(((e, t) => {
|
|
|
166
166
|
});
|
|
167
167
|
})))(), 1);
|
|
168
168
|
function te(e, t, n, r) {
|
|
169
|
-
var i = this, a =
|
|
170
|
-
|
|
169
|
+
var i = this, a = m(null), o = m(0), s = m(0), c = m(null), l = m([]), u = m(), f = m(), h = m(e), g = m(!0), _ = m(), v = m();
|
|
170
|
+
h.current = e;
|
|
171
171
|
var y = typeof window < "u", b = !t && t !== 0 && y;
|
|
172
172
|
if (typeof e != "function") throw TypeError("Expected a function");
|
|
173
173
|
t = +t || 0;
|
|
174
|
-
var x = !!(n ||= {}).leading, S = !("trailing" in n) || !!n.trailing, C = !!n.flushOnExit && S, w = "maxWait" in n, T = "debounceOnServer" in n && !!n.debounceOnServer, E = w ? Math.max(+n.maxWait || 0, t) : null, D =
|
|
174
|
+
var x = !!(n ||= {}).leading, S = !("trailing" in n) || !!n.trailing, C = !!n.flushOnExit && S, w = "maxWait" in n, T = "debounceOnServer" in n && !!n.debounceOnServer, E = w ? Math.max(+n.maxWait || 0, t) : null, D = p(function() {
|
|
175
175
|
var e = function(e) {
|
|
176
176
|
var t = l.current, n = u.current;
|
|
177
|
-
return l.current = u.current = null, o.current = e, s.current = s.current || e,
|
|
177
|
+
return l.current = u.current = null, o.current = e, s.current = s.current || e, f.current = h.current.apply(n, t);
|
|
178
178
|
}, n = function(e, t) {
|
|
179
179
|
b && cancelAnimationFrame(c.current), c.current = b ? requestAnimationFrame(e) : setTimeout(e, t);
|
|
180
|
-
},
|
|
181
|
-
if (!
|
|
180
|
+
}, d = function(e) {
|
|
181
|
+
if (!g.current) return !1;
|
|
182
182
|
var n = e - a.current;
|
|
183
183
|
return !a.current || n >= t || n < 0 || w && e - o.current >= E;
|
|
184
|
-
},
|
|
185
|
-
return c.current = null, S && l.current ? e(t) : (l.current = u.current = null,
|
|
186
|
-
},
|
|
184
|
+
}, p = function(t) {
|
|
185
|
+
return c.current = null, S && l.current ? e(t) : (l.current = u.current = null, f.current);
|
|
186
|
+
}, m = function e() {
|
|
187
187
|
var r = Date.now();
|
|
188
|
-
if (x && s.current === o.current && D(),
|
|
189
|
-
if (
|
|
188
|
+
if (x && s.current === o.current && D(), d(r)) return p(r);
|
|
189
|
+
if (g.current) {
|
|
190
190
|
var i = t - (r - a.current);
|
|
191
191
|
n(e, w ? Math.min(i, E - (r - o.current)) : i);
|
|
192
192
|
}
|
|
@@ -194,14 +194,14 @@ function te(e, t, n, r) {
|
|
|
194
194
|
r && r({});
|
|
195
195
|
}, O = function() {
|
|
196
196
|
if (y || T) {
|
|
197
|
-
var r, s = Date.now(),
|
|
197
|
+
var r, s = Date.now(), p = d(s);
|
|
198
198
|
if (l.current = [].slice.call(arguments), u.current = i, a.current = s, C && !_.current && (_.current = function() {
|
|
199
199
|
globalThis.document?.visibilityState === "hidden" && v.current.flush();
|
|
200
|
-
}, (r = globalThis.document) == null || r.addEventListener == null || r.addEventListener("visibilitychange", _.current)),
|
|
201
|
-
if (!c.current &&
|
|
202
|
-
if (w) return n(
|
|
200
|
+
}, (r = globalThis.document) == null || r.addEventListener == null || r.addEventListener("visibilitychange", _.current)), p) {
|
|
201
|
+
if (!c.current && g.current) return o.current = a.current, n(m, t), x ? e(a.current) : f.current;
|
|
202
|
+
if (w) return n(m, t), e(a.current);
|
|
203
203
|
}
|
|
204
|
-
return c.current || n(
|
|
204
|
+
return c.current || n(m, t), f.current;
|
|
205
205
|
}
|
|
206
206
|
};
|
|
207
207
|
return O.cancel = function() {
|
|
@@ -210,7 +210,7 @@ function te(e, t, n, r) {
|
|
|
210
210
|
}, O.isPending = function() {
|
|
211
211
|
return !!c.current;
|
|
212
212
|
}, O.flush = function() {
|
|
213
|
-
return c.current ?
|
|
213
|
+
return c.current ? p(Date.now()) : f.current;
|
|
214
214
|
}, O;
|
|
215
215
|
}, [
|
|
216
216
|
x,
|
|
@@ -224,30 +224,30 @@ function te(e, t, n, r) {
|
|
|
224
224
|
T,
|
|
225
225
|
r
|
|
226
226
|
]);
|
|
227
|
-
return v.current = D,
|
|
228
|
-
return
|
|
227
|
+
return v.current = D, d(function() {
|
|
228
|
+
return g.current = !0, function() {
|
|
229
229
|
var e;
|
|
230
|
-
C && v.current.flush(), _.current &&= ((e = globalThis.document) == null || e.removeEventListener == null || e.removeEventListener("visibilitychange", _.current), null),
|
|
230
|
+
C && v.current.flush(), _.current &&= ((e = globalThis.document) == null || e.removeEventListener == null || e.removeEventListener("visibilitychange", _.current), null), g.current = !1;
|
|
231
231
|
};
|
|
232
232
|
}, [C]), D;
|
|
233
233
|
}
|
|
234
234
|
//#endregion
|
|
235
235
|
//#region src/components/fields/TransferList/TransferList.tsx
|
|
236
|
-
var ne = ({ disabled: e, height: t = 500, infoMessage:
|
|
237
|
-
let { t: I } = v(), L = j(), { control: R, formState: { errors: z }, resetField: B } =
|
|
236
|
+
var ne = ({ disabled: e, height: t = 500, infoMessage: i, label: a, loading: o, name: s, onChange: c, options: l, required: d, warningMessage: F }) => {
|
|
237
|
+
let { t: I } = v(), L = j(), { control: R, formState: { errors: z }, resetField: B } = _(), V = n.getFieldErrorMessage(z, s), H = f(), [U, W] = h([]), [G, K] = h(), q = m(null), J = !!V, Y = te((e) => {
|
|
238
238
|
K(e.target.value);
|
|
239
|
-
}, 200, { trailing: !0 }), X =
|
|
240
|
-
|
|
241
|
-
}, [
|
|
239
|
+
}, 200, { trailing: !0 }), X = u((e, t) => {
|
|
240
|
+
d && e === null || (c && c(e), t(e));
|
|
241
|
+
}, [c, d]), Z = p(() => {
|
|
242
242
|
let e = {};
|
|
243
|
-
return
|
|
243
|
+
return l.forEach((t) => {
|
|
244
244
|
e[t.value] = t;
|
|
245
245
|
}), e;
|
|
246
|
-
}, [
|
|
246
|
+
}, [l]), Q = u(({ field: { onBlur: n, onChange: r, ref: i, value: a } }) => {
|
|
247
247
|
i({ focus: () => {
|
|
248
248
|
q?.current?.focus();
|
|
249
249
|
} });
|
|
250
|
-
let o = a,
|
|
250
|
+
let o = a, c = Object.keys(Z).filter((e) => !o.includes(e)), u = Object.keys(Z).filter((e) => o.includes(e)), d = (0, $.default)(U, c), f = (0, $.default)(U, u), p = (e) => () => {
|
|
251
251
|
let t = U.indexOf(e), n = [...U];
|
|
252
252
|
t === -1 ? n.push(e) : n.splice(t, 1), W(n);
|
|
253
253
|
}, m = () => {
|
|
@@ -255,11 +255,11 @@ var ne = ({ disabled: e, height: t = 500, infoMessage: o, label: s, loading: c,
|
|
|
255
255
|
}, h = () => {
|
|
256
256
|
W([]), X([], r);
|
|
257
257
|
}, g = () => {
|
|
258
|
-
W([]), X([...o, ...
|
|
258
|
+
W([]), X([...o, ...d], r);
|
|
259
259
|
}, _ = () => {
|
|
260
260
|
W([]), X(o.filter((e) => !f.includes(e)), r);
|
|
261
261
|
}, v = () => {
|
|
262
|
-
W([]), B(
|
|
262
|
+
W([]), B(s);
|
|
263
263
|
}, S = (n) => /* @__PURE__ */ M(k, {
|
|
264
264
|
elevation: 1,
|
|
265
265
|
square: !0,
|
|
@@ -327,7 +327,7 @@ var ne = ({ disabled: e, height: t = 500, infoMessage: o, label: s, loading: c,
|
|
|
327
327
|
width: "100%"
|
|
328
328
|
},
|
|
329
329
|
children: [
|
|
330
|
-
/* @__PURE__ */ M(y, { children: S(
|
|
330
|
+
/* @__PURE__ */ M(y, { children: S(c) }),
|
|
331
331
|
/* @__PURE__ */ M(y, {
|
|
332
332
|
sx: { height: t },
|
|
333
333
|
children: /* @__PURE__ */ N(y, {
|
|
@@ -340,7 +340,7 @@ var ne = ({ disabled: e, height: t = 500, infoMessage: o, label: s, loading: c,
|
|
|
340
340
|
children: [
|
|
341
341
|
/* @__PURE__ */ M(b, {
|
|
342
342
|
"aria-label": I`move selected right`,
|
|
343
|
-
disabled: e ||
|
|
343
|
+
disabled: e || d.length === 0,
|
|
344
344
|
onClick: g,
|
|
345
345
|
size: "small",
|
|
346
346
|
sx: { my: .5 },
|
|
@@ -358,7 +358,7 @@ var ne = ({ disabled: e, height: t = 500, infoMessage: o, label: s, loading: c,
|
|
|
358
358
|
}),
|
|
359
359
|
/* @__PURE__ */ M(b, {
|
|
360
360
|
"aria-label": I`move all right`,
|
|
361
|
-
disabled: e ||
|
|
361
|
+
disabled: e || c.length === 0,
|
|
362
362
|
onClick: m,
|
|
363
363
|
size: "small",
|
|
364
364
|
sx: {
|
|
@@ -370,7 +370,7 @@ var ne = ({ disabled: e, height: t = 500, infoMessage: o, label: s, loading: c,
|
|
|
370
370
|
}),
|
|
371
371
|
/* @__PURE__ */ M(b, {
|
|
372
372
|
"aria-label": I`move all left`,
|
|
373
|
-
disabled: e ||
|
|
373
|
+
disabled: e || u.length === 0,
|
|
374
374
|
onClick: h,
|
|
375
375
|
size: "small",
|
|
376
376
|
sx: { my: .5 },
|
|
@@ -379,7 +379,7 @@ var ne = ({ disabled: e, height: t = 500, infoMessage: o, label: s, loading: c,
|
|
|
379
379
|
}),
|
|
380
380
|
/* @__PURE__ */ M(b, {
|
|
381
381
|
"aria-label": I`Reset selection`,
|
|
382
|
-
disabled: e ||
|
|
382
|
+
disabled: e || l.length === 0,
|
|
383
383
|
onClick: v,
|
|
384
384
|
size: "small",
|
|
385
385
|
sx: { mt: 4 },
|
|
@@ -398,7 +398,7 @@ var ne = ({ disabled: e, height: t = 500, infoMessage: o, label: s, loading: c,
|
|
|
398
398
|
]
|
|
399
399
|
})
|
|
400
400
|
}),
|
|
401
|
-
/* @__PURE__ */ M(y, { children: S(
|
|
401
|
+
/* @__PURE__ */ M(y, { children: S(u) })
|
|
402
402
|
]
|
|
403
403
|
})]
|
|
404
404
|
});
|
|
@@ -410,36 +410,36 @@ var ne = ({ disabled: e, height: t = 500, infoMessage: o, label: s, loading: c,
|
|
|
410
410
|
Y,
|
|
411
411
|
t,
|
|
412
412
|
e,
|
|
413
|
-
|
|
413
|
+
l.length,
|
|
414
414
|
X,
|
|
415
415
|
B,
|
|
416
|
-
|
|
416
|
+
s,
|
|
417
417
|
G
|
|
418
418
|
]);
|
|
419
419
|
return /* @__PURE__ */ N(S, {
|
|
420
420
|
error: J,
|
|
421
|
-
...P.createAttributes("ToggleButtonGroup", { name:
|
|
421
|
+
...P.createAttributes("ToggleButtonGroup", { name: s }),
|
|
422
422
|
fullWidth: !0,
|
|
423
423
|
sx: { margin: `${L.spacing(2)} 0` },
|
|
424
424
|
children: [
|
|
425
425
|
/* @__PURE__ */ M(w, {
|
|
426
426
|
component: "legend",
|
|
427
|
-
disabled: e ||
|
|
427
|
+
disabled: e || o,
|
|
428
428
|
id: H,
|
|
429
|
-
required:
|
|
430
|
-
children:
|
|
429
|
+
required: d,
|
|
430
|
+
children: a
|
|
431
431
|
}),
|
|
432
|
-
/* @__PURE__ */ M(
|
|
432
|
+
/* @__PURE__ */ M(g, {
|
|
433
433
|
control: R,
|
|
434
434
|
defaultValue: null,
|
|
435
|
-
name:
|
|
435
|
+
name: s,
|
|
436
436
|
render: Q
|
|
437
437
|
}),
|
|
438
438
|
/* @__PURE__ */ M(C, {
|
|
439
439
|
sx: { ml: 0 },
|
|
440
|
-
children: /* @__PURE__ */ M(
|
|
440
|
+
children: /* @__PURE__ */ M(r, {
|
|
441
441
|
errorMessage: V,
|
|
442
|
-
infoMessage:
|
|
442
|
+
infoMessage: i,
|
|
443
443
|
noIndent: !0,
|
|
444
444
|
warningMessage: F
|
|
445
445
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransferList.js","names":["r","n","t"],"sources":["../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arrayMap.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseFindIndex.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsNaN.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_strictIndexOf.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIndexOf.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arrayIncludes.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arrayIncludesWith.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIntersection.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/identity.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_apply.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_overRest.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/constant.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_defineProperty.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseSetToString.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_shortOut.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_setToString.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseRest.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isArrayLikeObject.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_castArrayLikeObject.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/intersection.js","../../../../node_modules/.pnpm/use-debounce@10.1.1_react@19.2.8/node_modules/use-debounce/dist/index.module.js","../../src/components/fields/TransferList/TransferList.tsx"],"sourcesContent":["/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n","/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n","/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = strictIndexOf;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIsNaN = require('./_baseIsNaN'),\n strictIndexOf = require('./_strictIndexOf');\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n","var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n","/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arrayIncludesWith;\n","var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n arrayMap = require('./_arrayMap'),\n baseUnary = require('./_baseUnary'),\n cacheHas = require('./_cacheHas');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\nfunction baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseIntersection;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n","var isArrayLike = require('./isArrayLike'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nmodule.exports = isArrayLikeObject;\n","var isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\nfunction castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n}\n\nmodule.exports = castArrayLikeObject;\n","var arrayMap = require('./_arrayMap'),\n baseIntersection = require('./_baseIntersection'),\n baseRest = require('./_baseRest'),\n castArrayLikeObject = require('./_castArrayLikeObject');\n\n/**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\nvar intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n});\n\nmodule.exports = intersection;\n","import{useRef as r,useMemo as n,useEffect as t,useState as e,useCallback as u}from\"react\";function c(e,u,c,i){var l=this,a=r(null),o=r(0),f=r(0),v=r(null),d=r([]),s=r(),m=r(),h=r(e),g=r(!0),x=r(),E=r();h.current=e;var b=\"undefined\"!=typeof window,p=!u&&0!==u&&b;if(\"function\"!=typeof e)throw new TypeError(\"Expected a function\");u=+u||0;var y=!!(c=c||{}).leading,w=!(\"trailing\"in c)||!!c.trailing,T=!!c.flushOnExit&&w,O=\"maxWait\"in c,F=\"debounceOnServer\"in c&&!!c.debounceOnServer,L=O?Math.max(+c.maxWait||0,u):null,A=n(function(){var r=function(r){var n=d.current,t=s.current;return d.current=s.current=null,o.current=r,f.current=f.current||r,m.current=h.current.apply(t,n)},n=function(r,n){p&&cancelAnimationFrame(v.current),v.current=p?requestAnimationFrame(r):setTimeout(r,n)},t=function(r){if(!g.current)return!1;var n=r-a.current;return!a.current||n>=u||n<0||O&&r-o.current>=L},e=function(n){return v.current=null,w&&d.current?r(n):(d.current=s.current=null,m.current)},c=function r(){var c=Date.now();if(y&&f.current===o.current&&A(),t(c))return e(c);if(g.current){var i=u-(c-a.current),l=O?Math.min(i,L-(c-o.current)):i;n(r,l)}},A=function(){i&&i({})},D=function(){if(b||F){var e,i=Date.now(),f=t(i);if(d.current=[].slice.call(arguments),s.current=l,a.current=i,T&&!x.current&&(x.current=function(){var r;\"hidden\"===(null==(r=globalThis.document)?void 0:r.visibilityState)&&E.current.flush()},null==(e=globalThis.document)||null==e.addEventListener||e.addEventListener(\"visibilitychange\",x.current)),f){if(!v.current&&g.current)return o.current=a.current,n(c,u),y?r(a.current):m.current;if(O)return n(c,u),r(a.current)}return v.current||n(c,u),m.current}};return D.cancel=function(){var r=v.current;r&&(p?cancelAnimationFrame(v.current):clearTimeout(v.current)),o.current=0,d.current=a.current=s.current=v.current=null,r&&i&&i({})},D.isPending=function(){return!!v.current},D.flush=function(){return v.current?e(Date.now()):m.current},D},[y,O,u,L,w,T,p,b,F,i]);return E.current=A,t(function(){return g.current=!0,function(){var r;T&&E.current.flush(),x.current&&(null==(r=globalThis.document)||null==r.removeEventListener||r.removeEventListener(\"visibilitychange\",x.current),x.current=null),g.current=!1}},[T]),A}function i(r,n){return r===n}function l(n,t,l){var a=l&&l.equalityFn||i,o=r(n),f=e({})[1],v=c(u(function(r){o.current=r,f({})},[f]),t,l,f),d=r(n);return a(d.current,n)||(v(n),d.current=n),[o.current,v]}function a(r,n,t){var e=void 0===t?{}:t,u=e.leading,i=e.trailing,l=e.flushOnExit;return c(r,n,{maxWait:n,leading:void 0===u||u,trailing:void 0===i||i,flushOnExit:void 0!==l&&l})}export{l as useDebounce,c as useDebouncedCallback,a as useThrottledCallback};\n//# sourceMappingURL=index.module.js.map\n","import type {\n ChangeEvent,\n ReactElement,\n} from 'react';\nimport {\n useCallback,\n useId,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n Box,\n Button,\n Checkbox,\n FormControl,\n FormHelperText,\n FormLabel,\n List,\n ListItemButton,\n ListItemIcon,\n ListItemText,\n Paper,\n TextField,\n useTheme,\n} from '@mui/material';\nimport {\n Controller,\n useFormContext,\n} from 'react-hook-form';\nimport type {\n FieldValues,\n Path,\n UseControllerReturn,\n} from 'react-hook-form';\nimport intersection from 'lodash/intersection';\nimport { useTranslation } from 'react-i18next';\nimport { useDebouncedCallback } from 'use-debounce';\nimport { TestIdUtil } from '@gen-epix/ui-core/utils/TestIdUtil';\n\nimport type { TransferListOption } from '../../../models/form';\nimport { FormUtil } from '../../../utils/FormUtil';\nimport { FormFieldHelperText } from '../../helpers/FormFieldHelperText';\n\nexport type TransferListProps<TFieldValues extends FieldValues, TName extends Path<TFieldValues> = Path<TFieldValues>> = {\n readonly disabled?: boolean;\n readonly height?: number;\n readonly infoMessage?: string;\n readonly label: string;\n readonly loading?: boolean;\n readonly name: TName;\n readonly onChange?: (value: string) => void;\n readonly options: TransferListOption[];\n readonly required?: boolean;\n readonly warningMessage?: string;\n};\n\nexport const TransferList = <TFieldValues extends FieldValues, TName extends Path<TFieldValues> = Path<TFieldValues>>({\n disabled,\n height = 500,\n infoMessage,\n label,\n loading,\n name,\n onChange: onChangeProp,\n options,\n required,\n warningMessage,\n}: TransferListProps<TFieldValues, TName>): ReactElement => {\n const { t } = useTranslation();\n\n const theme = useTheme();\n const { control, formState: { errors }, resetField } = useFormContext<TFieldValues>();\n const errorMessage = FormUtil.getFieldErrorMessage(errors, name);\n const id = useId();\n const [checked, setChecked] = useState<string[]>([]);\n const [filterValue, setFilterValue] = useState<string>();\n\n const inputRef = useRef<HTMLInputElement>(null);\n const hasError = !!errorMessage;\n\n const onFilterValueChangeDebounced = useDebouncedCallback((event: ChangeEvent<HTMLInputElement>) => {\n setFilterValue(event.target.value);\n }, 200, { trailing: true });\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const internalOnChange = useCallback((value: string[], onChange: (...event: any[]) => void) => {\n if (required && value === null) {\n return;\n }\n if (onChangeProp) {\n onChangeProp(value as TFieldValues[TName]);\n }\n onChange(value);\n }, [onChangeProp, required]);\n\n const mappedOptions = useMemo(() => {\n const map: { [key: string]: TransferListOption } = {};\n options.forEach((option) => {\n map[option.value] = option;\n });\n return map;\n }, [options]);\n\n const renderController = useCallback(({ field: { onBlur, onChange, ref, value } }: UseControllerReturn<TFieldValues, TName>) => {\n ref({\n focus: () => {\n inputRef?.current?.focus();\n },\n });\n const valueItems = value as string[];\n const left: string[] = Object.keys(mappedOptions).filter(option => !valueItems.includes(option));\n const right: string[] = Object.keys(mappedOptions).filter(option => valueItems.includes(option));\n const leftChecked: string[] = intersection(checked, left);\n const rightChecked: string[] = intersection(checked, right);\n\n const handleToggle = (item: string) => () => {\n const currentIndex = checked.indexOf(item);\n const newChecked = [...checked];\n if (currentIndex === -1) {\n newChecked.push(item);\n } else {\n newChecked.splice(currentIndex, 1);\n }\n setChecked(newChecked);\n };\n const onMoveAllRightButtonClick = () => {\n setChecked([]);\n internalOnChange(Object.keys(mappedOptions), onChange);\n };\n const onMoveAllLeftButtonClick = () => {\n setChecked([]);\n internalOnChange([], onChange);\n };\n const onMoveRightButtonClick = () => {\n setChecked([]);\n internalOnChange([...valueItems, ...leftChecked], onChange);\n };\n const onMoveLeftButtonClick = () => {\n setChecked([]);\n internalOnChange(valueItems.filter(x => !rightChecked.includes(x)), onChange);\n };\n\n const onResetButtonClick = () => {\n setChecked([]);\n resetField(name);\n };\n\n const customList = (items: readonly string[]) => (\n <Paper\n elevation={1}\n square\n sx={{\n height,\n overflow: 'auto',\n width: '100%',\n }}\n >\n <List\n component={'div'}\n dense\n role={'list'}\n >\n {items.filter(item => {\n if (!filterValue) {\n return true;\n }\n return mappedOptions[item].label.toLowerCase().includes(filterValue.toLowerCase());\n }).map((item) => {\n const option = mappedOptions[item];\n const labelId = `transfer-list-item-${option.value}-label`;\n return (\n <ListItemButton\n disabled={disabled}\n key={option.value}\n onClick={handleToggle(option.value)}\n role={'listitem'}\n sx={{\n margin: 0,\n padding: `0 0 0 ${theme.spacing(1)}`,\n }}\n >\n <ListItemIcon\n sx={{\n margin: 0,\n minWidth: theme.spacing(4),\n padding: 0,\n }}\n >\n <Checkbox\n checked={checked.indexOf(item) !== -1}\n disabled={disabled}\n slotProps={{\n input: {\n 'aria-labelledby': labelId,\n },\n }}\n sx={{\n margin: 0,\n padding: 0,\n }}\n tabIndex={-1}\n />\n </ListItemIcon>\n <ListItemText\n id={labelId}\n secondary={option.label}\n />\n </ListItemButton>\n );\n })}\n </List>\n </Paper>\n );\n\n return (\n <Box\n onBlur={onBlur}\n sx={{\n display: 'grid',\n gridTemplateRows: 'auto max-content',\n marginTop: theme.spacing(0.5),\n width: '100%',\n }}\n >\n <Box>\n <TextField\n fullWidth\n label={t`Filter`}\n onChange={onFilterValueChangeDebounced}\n size={'small'}\n variant={'outlined'}\n />\n </Box>\n <Box\n sx={{\n display: 'grid',\n gridTemplateColumns: '4fr 1fr 4fr',\n width: '100%',\n }}\n >\n <Box>\n {customList(left)}\n </Box>\n <Box sx={{ height }}>\n <Box\n sx={{\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'column',\n height,\n }}\n >\n\n <Button\n aria-label={t`move selected right`}\n disabled={disabled || leftChecked.length === 0}\n // eslint-disable-next-line @eslint-react/kit/jsx-no-bind\n onClick={onMoveRightButtonClick}\n size={'small'}\n sx={{ my: 0.5 }}\n variant={'outlined'}\n >\n {'>'}\n </Button>\n <Button\n aria-label={t`move selected left`}\n disabled={disabled || rightChecked.length === 0}\n // eslint-disable-next-line @eslint-react/kit/jsx-no-bind\n onClick={onMoveLeftButtonClick}\n size={'small'}\n sx={{ my: 0.5 }}\n variant={'outlined'}\n >\n {'<'}\n </Button>\n <Button\n aria-label={t`move all right`}\n disabled={disabled || left.length === 0}\n // eslint-disable-next-line @eslint-react/kit/jsx-no-bind\n onClick={onMoveAllRightButtonClick}\n size={'small'}\n sx={{ mt: 2, my: 0.5 }}\n variant={'outlined'}\n >\n {'≫'}\n </Button>\n <Button\n aria-label={t`move all left`}\n disabled={disabled || right.length === 0}\n // eslint-disable-next-line @eslint-react/kit/jsx-no-bind\n onClick={onMoveAllLeftButtonClick}\n size={'small'}\n sx={{ my: 0.5 }}\n variant={'outlined'}\n >\n {'≪'}\n </Button>\n <Button\n aria-label={t`Reset selection`}\n disabled={disabled || options.length === 0}\n // eslint-disable-next-line @eslint-react/kit/jsx-no-bind\n onClick={onResetButtonClick}\n size={'small'}\n sx={{ mt: 4 }}\n variant={'outlined'}\n >\n {t`Reset`}\n </Button>\n <Button\n aria-label={t`clear`}\n disabled={disabled}\n // eslint-disable-next-line @eslint-react/kit/jsx-no-bind\n onClick={onMoveAllLeftButtonClick}\n size={'small'}\n sx={{ mt: 0.5 }}\n variant={'outlined'}\n >\n {t`Clear`}\n </Button>\n </Box>\n </Box>\n <Box>\n {customList(right)}\n </Box>\n </Box>\n </Box>\n );\n }, [mappedOptions, checked, theme, t, onFilterValueChangeDebounced, height, disabled, options.length, internalOnChange, resetField, name, filterValue]);\n\n return (\n <FormControl\n error={hasError}\n {...TestIdUtil.createAttributes('ToggleButtonGroup', { name })}\n fullWidth\n sx={{\n margin: `${theme.spacing(2)} 0`,\n }}\n >\n <FormLabel\n component={'legend'}\n disabled={disabled || loading}\n id={id}\n required={required}\n >\n {label}\n </FormLabel>\n <Controller\n control={control}\n defaultValue={null}\n name={name}\n render={renderController}\n />\n <FormHelperText sx={{ ml: 0 }}>\n <FormFieldHelperText\n errorMessage={errorMessage}\n infoMessage={infoMessage}\n noIndent\n warningMessage={warningMessage}\n />\n </FormHelperText>\n </FormControl>\n );\n};\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],"mappings":";;;;;;;;;;;;CASA,SAAS,EAAS,GAAO,GAAU;EAKjC,KAJA,IAAI,IAAQ,IACR,IAAS,KAAS,OAAO,IAAI,EAAM,QACnC,IAAS,MAAM,CAAM,GAElB,EAAE,IAAQ,IACf,EAAO,KAAS,EAAS,EAAM,IAAQ,GAAO,CAAK;EAErD,OAAO;CACT;CAEA,EAAO,UAAU;;CCTjB,SAAS,EAAc,GAAO,GAAW,GAAW,GAAW;EAI7D,KAHA,IAAI,IAAS,EAAM,QACf,IAAQ,KAAa,IAAY,IAAI,KAEjC,IAAY,MAAU,EAAE,IAAQ,IACtC,IAAI,EAAU,EAAM,IAAQ,GAAO,CAAK,GACtC,OAAO;EAGX,OAAO;CACT;CAEA,EAAO,UAAU;;CChBjB,SAAS,EAAU,GAAO;EACxB,OAAO,MAAU;CACnB;CAEA,EAAO,UAAU;;CCDjB,SAAS,EAAc,GAAO,GAAO,GAAW;EA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AAI,EAAE;IAC1B,UAAA,kBAAC,GAAD;KACgB;KACD;KACb,UAAA;KACgB;IACjB,CAAA;GACa,CAAA;EACL;;AAEjB"}
|
|
1
|
+
{"version":3,"file":"TransferList.js","names":["r","n","t"],"sources":["../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arrayMap.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseFindIndex.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsNaN.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_strictIndexOf.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIndexOf.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arrayIncludes.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arrayIncludesWith.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIntersection.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/identity.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_apply.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_overRest.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/constant.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_defineProperty.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseSetToString.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_shortOut.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_setToString.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseRest.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isArrayLikeObject.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_castArrayLikeObject.js","../../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/intersection.js","../../../../node_modules/.pnpm/use-debounce@10.1.1_react@19.3.0/node_modules/use-debounce/dist/index.module.js","../../src/components/fields/TransferList/TransferList.tsx"],"sourcesContent":["/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n","/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n","/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = strictIndexOf;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIsNaN = require('./_baseIsNaN'),\n strictIndexOf = require('./_strictIndexOf');\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n","var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n","/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arrayIncludesWith;\n","var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n arrayMap = require('./_arrayMap'),\n baseUnary = require('./_baseUnary'),\n cacheHas = require('./_cacheHas');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\nfunction baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseIntersection;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n","var isArrayLike = require('./isArrayLike'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nmodule.exports = isArrayLikeObject;\n","var isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\nfunction castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n}\n\nmodule.exports = castArrayLikeObject;\n","var arrayMap = require('./_arrayMap'),\n baseIntersection = require('./_baseIntersection'),\n baseRest = require('./_baseRest'),\n castArrayLikeObject = require('./_castArrayLikeObject');\n\n/**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\nvar intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n});\n\nmodule.exports = intersection;\n","import{useRef as r,useMemo as n,useEffect as t,useState as e,useCallback as u}from\"react\";function c(e,u,c,i){var l=this,a=r(null),o=r(0),f=r(0),v=r(null),d=r([]),s=r(),m=r(),h=r(e),g=r(!0),x=r(),E=r();h.current=e;var b=\"undefined\"!=typeof window,p=!u&&0!==u&&b;if(\"function\"!=typeof e)throw new TypeError(\"Expected a function\");u=+u||0;var y=!!(c=c||{}).leading,w=!(\"trailing\"in c)||!!c.trailing,T=!!c.flushOnExit&&w,O=\"maxWait\"in c,F=\"debounceOnServer\"in c&&!!c.debounceOnServer,L=O?Math.max(+c.maxWait||0,u):null,A=n(function(){var r=function(r){var n=d.current,t=s.current;return d.current=s.current=null,o.current=r,f.current=f.current||r,m.current=h.current.apply(t,n)},n=function(r,n){p&&cancelAnimationFrame(v.current),v.current=p?requestAnimationFrame(r):setTimeout(r,n)},t=function(r){if(!g.current)return!1;var n=r-a.current;return!a.current||n>=u||n<0||O&&r-o.current>=L},e=function(n){return v.current=null,w&&d.current?r(n):(d.current=s.current=null,m.current)},c=function r(){var c=Date.now();if(y&&f.current===o.current&&A(),t(c))return e(c);if(g.current){var i=u-(c-a.current),l=O?Math.min(i,L-(c-o.current)):i;n(r,l)}},A=function(){i&&i({})},D=function(){if(b||F){var e,i=Date.now(),f=t(i);if(d.current=[].slice.call(arguments),s.current=l,a.current=i,T&&!x.current&&(x.current=function(){var r;\"hidden\"===(null==(r=globalThis.document)?void 0:r.visibilityState)&&E.current.flush()},null==(e=globalThis.document)||null==e.addEventListener||e.addEventListener(\"visibilitychange\",x.current)),f){if(!v.current&&g.current)return o.current=a.current,n(c,u),y?r(a.current):m.current;if(O)return n(c,u),r(a.current)}return v.current||n(c,u),m.current}};return D.cancel=function(){var r=v.current;r&&(p?cancelAnimationFrame(v.current):clearTimeout(v.current)),o.current=0,d.current=a.current=s.current=v.current=null,r&&i&&i({})},D.isPending=function(){return!!v.current},D.flush=function(){return v.current?e(Date.now()):m.current},D},[y,O,u,L,w,T,p,b,F,i]);return E.current=A,t(function(){return g.current=!0,function(){var r;T&&E.current.flush(),x.current&&(null==(r=globalThis.document)||null==r.removeEventListener||r.removeEventListener(\"visibilitychange\",x.current),x.current=null),g.current=!1}},[T]),A}function i(r,n){return r===n}function l(n,t,l){var a=l&&l.equalityFn||i,o=r(n),f=e({})[1],v=c(u(function(r){o.current=r,f({})},[f]),t,l,f),d=r(n);return a(d.current,n)||(v(n),d.current=n),[o.current,v]}function a(r,n,t){var e=void 0===t?{}:t,u=e.leading,i=e.trailing,l=e.flushOnExit;return c(r,n,{maxWait:n,leading:void 0===u||u,trailing:void 0===i||i,flushOnExit:void 0!==l&&l})}export{l as useDebounce,c as useDebouncedCallback,a as useThrottledCallback};\n//# sourceMappingURL=index.module.js.map\n","import type {\n ChangeEvent,\n ReactElement,\n} from 'react';\nimport {\n useCallback,\n useId,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n Box,\n Button,\n Checkbox,\n FormControl,\n FormHelperText,\n FormLabel,\n List,\n ListItemButton,\n ListItemIcon,\n ListItemText,\n Paper,\n TextField,\n useTheme,\n} from '@mui/material';\nimport {\n Controller,\n useFormContext,\n} from 'react-hook-form';\nimport type {\n FieldValues,\n Path,\n UseControllerReturn,\n} from 'react-hook-form';\nimport intersection from 'lodash/intersection';\nimport { useTranslation } from 'react-i18next';\nimport { useDebouncedCallback } from 'use-debounce';\nimport { TestIdUtil } from '@gen-epix/ui-core/utils/TestIdUtil';\n\nimport type { TransferListOption } from '../../../models/form';\nimport { FormUtil } from '../../../utils/FormUtil';\nimport { FormFieldHelperText } from '../../helpers/FormFieldHelperText';\n\nexport type TransferListProps<TFieldValues extends FieldValues, TName extends Path<TFieldValues> = Path<TFieldValues>> = {\n readonly disabled?: boolean;\n readonly height?: number;\n readonly infoMessage?: string;\n readonly label: string;\n readonly loading?: boolean;\n readonly name: TName;\n readonly onChange?: (value: string) => void;\n readonly options: TransferListOption[];\n readonly required?: boolean;\n readonly warningMessage?: string;\n};\n\nexport const TransferList = <TFieldValues extends FieldValues, TName extends Path<TFieldValues> = Path<TFieldValues>>({\n disabled,\n height = 500,\n infoMessage,\n label,\n loading,\n name,\n onChange: onChangeProp,\n options,\n required,\n warningMessage,\n}: TransferListProps<TFieldValues, TName>): ReactElement => {\n const { t } = useTranslation();\n\n const theme = useTheme();\n const { control, formState: { errors }, resetField } = useFormContext<TFieldValues>();\n const errorMessage = FormUtil.getFieldErrorMessage(errors, name);\n const id = useId();\n const [checked, setChecked] = useState<string[]>([]);\n const [filterValue, setFilterValue] = useState<string>();\n\n const inputRef = useRef<HTMLInputElement>(null);\n const hasError = !!errorMessage;\n\n const onFilterValueChangeDebounced = useDebouncedCallback((event: ChangeEvent<HTMLInputElement>) => {\n setFilterValue(event.target.value);\n }, 200, { trailing: true });\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const internalOnChange = useCallback((value: string[], onChange: (...event: any[]) => void) => {\n if (required && value === null) {\n return;\n }\n if (onChangeProp) {\n onChangeProp(value as TFieldValues[TName]);\n }\n onChange(value);\n }, [onChangeProp, required]);\n\n const mappedOptions = useMemo(() => {\n const map: { [key: string]: TransferListOption } = {};\n options.forEach((option) => {\n map[option.value] = option;\n });\n return map;\n }, [options]);\n\n const renderController = useCallback(({ field: { onBlur, onChange, ref, value } }: UseControllerReturn<TFieldValues, TName>) => {\n ref({\n focus: () => {\n inputRef?.current?.focus();\n },\n });\n const valueItems = value as string[];\n const left: string[] = Object.keys(mappedOptions).filter(option => !valueItems.includes(option));\n const right: string[] = Object.keys(mappedOptions).filter(option => valueItems.includes(option));\n const leftChecked: string[] = intersection(checked, left);\n const rightChecked: string[] = intersection(checked, right);\n\n const handleToggle = (item: string) => () => {\n const currentIndex = checked.indexOf(item);\n const newChecked = [...checked];\n if (currentIndex === -1) {\n newChecked.push(item);\n } else {\n newChecked.splice(currentIndex, 1);\n }\n setChecked(newChecked);\n };\n const onMoveAllRightButtonClick = () => {\n setChecked([]);\n internalOnChange(Object.keys(mappedOptions), onChange);\n };\n const onMoveAllLeftButtonClick = () => {\n setChecked([]);\n internalOnChange([], onChange);\n };\n const onMoveRightButtonClick = () => {\n setChecked([]);\n internalOnChange([...valueItems, ...leftChecked], onChange);\n };\n const onMoveLeftButtonClick = () => {\n setChecked([]);\n internalOnChange(valueItems.filter(x => !rightChecked.includes(x)), onChange);\n };\n\n const onResetButtonClick = () => {\n setChecked([]);\n resetField(name);\n };\n\n const customList = (items: readonly string[]) => (\n <Paper\n elevation={1}\n square\n sx={{\n height,\n overflow: 'auto',\n width: '100%',\n }}\n >\n <List\n component={'div'}\n dense\n role={'list'}\n >\n {items.filter(item => {\n if (!filterValue) {\n return true;\n }\n return mappedOptions[item].label.toLowerCase().includes(filterValue.toLowerCase());\n }).map((item) => {\n const option = mappedOptions[item];\n const labelId = `transfer-list-item-${option.value}-label`;\n return (\n <ListItemButton\n disabled={disabled}\n key={option.value}\n onClick={handleToggle(option.value)}\n role={'listitem'}\n sx={{\n margin: 0,\n padding: `0 0 0 ${theme.spacing(1)}`,\n }}\n >\n <ListItemIcon\n sx={{\n margin: 0,\n minWidth: theme.spacing(4),\n padding: 0,\n }}\n >\n <Checkbox\n checked={checked.indexOf(item) !== -1}\n disabled={disabled}\n slotProps={{\n input: {\n 'aria-labelledby': labelId,\n },\n }}\n sx={{\n margin: 0,\n padding: 0,\n }}\n tabIndex={-1}\n />\n </ListItemIcon>\n <ListItemText\n id={labelId}\n secondary={option.label}\n />\n </ListItemButton>\n );\n })}\n </List>\n </Paper>\n );\n\n return (\n <Box\n onBlur={onBlur}\n sx={{\n display: 'grid',\n gridTemplateRows: 'auto max-content',\n marginTop: theme.spacing(0.5),\n width: '100%',\n }}\n >\n <Box>\n <TextField\n fullWidth\n label={t`Filter`}\n onChange={onFilterValueChangeDebounced}\n size={'small'}\n variant={'outlined'}\n />\n </Box>\n <Box\n sx={{\n display: 'grid',\n gridTemplateColumns: '4fr 1fr 4fr',\n width: '100%',\n }}\n >\n <Box>\n {customList(left)}\n </Box>\n <Box sx={{ height }}>\n <Box\n sx={{\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'column',\n height,\n }}\n >\n\n <Button\n aria-label={t`move selected right`}\n disabled={disabled || leftChecked.length === 0}\n // eslint-disable-next-line @eslint-react/kit/jsx-no-bind\n onClick={onMoveRightButtonClick}\n size={'small'}\n sx={{ my: 0.5 }}\n variant={'outlined'}\n >\n {'>'}\n </Button>\n <Button\n aria-label={t`move selected left`}\n disabled={disabled || rightChecked.length === 0}\n // eslint-disable-next-line @eslint-react/kit/jsx-no-bind\n onClick={onMoveLeftButtonClick}\n size={'small'}\n sx={{ my: 0.5 }}\n variant={'outlined'}\n >\n {'<'}\n </Button>\n <Button\n aria-label={t`move all right`}\n disabled={disabled || left.length === 0}\n // eslint-disable-next-line @eslint-react/kit/jsx-no-bind\n onClick={onMoveAllRightButtonClick}\n size={'small'}\n sx={{ mt: 2, my: 0.5 }}\n variant={'outlined'}\n >\n {'≫'}\n </Button>\n <Button\n aria-label={t`move all left`}\n disabled={disabled || right.length === 0}\n // eslint-disable-next-line @eslint-react/kit/jsx-no-bind\n onClick={onMoveAllLeftButtonClick}\n size={'small'}\n sx={{ my: 0.5 }}\n variant={'outlined'}\n >\n {'≪'}\n </Button>\n <Button\n aria-label={t`Reset selection`}\n disabled={disabled || options.length === 0}\n // eslint-disable-next-line @eslint-react/kit/jsx-no-bind\n onClick={onResetButtonClick}\n size={'small'}\n sx={{ mt: 4 }}\n variant={'outlined'}\n >\n {t`Reset`}\n </Button>\n <Button\n aria-label={t`clear`}\n disabled={disabled}\n // eslint-disable-next-line @eslint-react/kit/jsx-no-bind\n onClick={onMoveAllLeftButtonClick}\n size={'small'}\n sx={{ mt: 0.5 }}\n variant={'outlined'}\n >\n {t`Clear`}\n </Button>\n </Box>\n </Box>\n <Box>\n {customList(right)}\n </Box>\n </Box>\n </Box>\n );\n }, [mappedOptions, checked, theme, t, onFilterValueChangeDebounced, height, disabled, options.length, internalOnChange, resetField, name, filterValue]);\n\n return (\n <FormControl\n error={hasError}\n {...TestIdUtil.createAttributes('ToggleButtonGroup', { name })}\n fullWidth\n sx={{\n margin: `${theme.spacing(2)} 0`,\n }}\n >\n <FormLabel\n component={'legend'}\n disabled={disabled || loading}\n id={id}\n required={required}\n >\n {label}\n </FormLabel>\n <Controller\n control={control}\n defaultValue={null}\n name={name}\n render={renderController}\n />\n <FormHelperText sx={{ ml: 0 }}>\n <FormFieldHelperText\n errorMessage={errorMessage}\n infoMessage={infoMessage}\n noIndent\n warningMessage={warningMessage}\n />\n </FormH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;SACE,cAAY,CAAC;SACH;SAEV,SAAS;SACT,MAAM;SACN,IAAI,EAAE,IAAI,GAAI;SACd,SAAS;SAER,UAAA,CAAC;QACI,CAAA;OACL;;KACF,CAAA;KACL,kBAAC,GAAD,EAAA,UACG,EAAW,CAAK,EACd,CAAA;IACF;GACF,CAAA,CAAA;;CAET,GAAG;EAAC;EAAe;EAAS;EAAO;EAAG;EAA8B;EAAQ;EAAU,EAAQ;EAAQ;EAAkB;EAAY;EAAM;CAAW,CAAC;CAEtJ,OACE,kBAAC,GAAD;EACE,OAAO;EACP,GAAI,EAAW,iBAAiB,qBAAqB,EAAE,QAAK,CAAC;EAC7D,WAAA;EACA,IAAI,EACF,QAAQ,GAAG,EAAM,QAAQ,CAAC,EAAE,IAC9B;EANF,UAAA;GAQE,kBAAC,GAAD;IACE,WAAW;IACX,UAAU,KAAY;IAClB;IACM;IAET,UAAA;GACQ,CAAA;GACX,kBAAC,GAAD;IACW;IACT,cAAc;IACR;IACN,QAAQ;GACT,CAAA;GACD,kBAAC,GAAD;IAAgB,IAAI,EAAE,IAAI,EAAE;IAC1B,UAAA,kBAAC,GAAD;KACgB;KACD;KACb,UAAA;KACgB;IACjB,CAAA;GACa,CAAA;EACL;;AAEjB"}
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { AutocompleteValue } from '@mui/material';
|
|
2
|
+
import { AutocompleteValue, TextFieldVariants } from '@mui/material';
|
|
3
3
|
import { FieldValues, Path } from 'react-hook-form';
|
|
4
4
|
import { AutoCompleteOption } from '../../../models/form';
|
|
5
|
+
export type AutocompleteChangeValue<TFieldValues extends FieldValues, TName extends Path<TFieldValues>, TMultiple extends boolean> = TMultiple extends true ? TFieldValues[TName] : AutocompleteValue<TFieldValues[TName], false, false, false>;
|
|
5
6
|
export type AutocompleteProps<TFieldValues extends FieldValues, TName extends Path<TFieldValues>, TMultiple extends boolean> = {
|
|
6
7
|
readonly disabled?: boolean;
|
|
7
8
|
readonly groupValues?: boolean;
|
|
9
|
+
readonly hideSelectAll?: boolean;
|
|
8
10
|
readonly infoMessage?: string;
|
|
9
11
|
readonly label: string;
|
|
10
12
|
readonly loading?: boolean;
|
|
11
13
|
readonly multiple?: TMultiple;
|
|
12
14
|
readonly name: TName;
|
|
13
|
-
readonly onChange?: (value:
|
|
15
|
+
readonly onChange?: (value: AutocompleteChangeValue<TFieldValues, TName, TMultiple>) => void;
|
|
14
16
|
readonly options: AutoCompleteOption[];
|
|
15
17
|
readonly required?: boolean;
|
|
16
18
|
readonly shouldSortOptions?: boolean;
|
|
19
|
+
readonly textFieldVariant?: TextFieldVariants;
|
|
17
20
|
readonly warningMessage?: string;
|
|
18
21
|
};
|
|
19
|
-
export declare const Autocomplete: <TFieldValues extends FieldValues, TName extends Path<TFieldValues> = Path<TFieldValues>, TMultiple extends boolean = false>({ disabled, groupValues, infoMessage, label, loading, multiple, name, onChange: onChangeProp, options, required, shouldSortOptions, warningMessage, }: AutocompleteProps<TFieldValues, TName, TMultiple>) => ReactElement;
|
|
22
|
+
export declare const Autocomplete: <TFieldValues extends FieldValues, TName extends Path<TFieldValues> = Path<TFieldValues>, TMultiple extends boolean = false>({ disabled, groupValues, hideSelectAll, infoMessage, label, loading, multiple, name, onChange: onChangeProp, options, required, shouldSortOptions, textFieldVariant, warningMessage, }: AutocompleteProps<TFieldValues, TName, TMultiple>) => ReactElement;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as e } from "../../../_chunks/FormUtil.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { FormFieldHelperText as t } from "../../helpers/FormFieldHelperText/index.js";
|
|
3
|
+
import { FormFieldLoadingIndicator as n } from "../../helpers/FormFieldLoadingIndicator/index.js";
|
|
4
|
+
import { useCallback as r, useId as i, useRef as a } from "react";
|
|
5
|
+
import { Controller as o, useFormContext as s } from "react-hook-form";
|
|
6
6
|
import { useTranslation as c } from "react-i18next";
|
|
7
7
|
import { Checkbox as l, FormControl as u, FormControlLabel as d, FormGroup as f, FormHelperText as p, FormLabel as m, IconButton as h } from "@mui/material";
|
|
8
8
|
import g from "@mui/icons-material/Clear";
|
|
@@ -10,15 +10,15 @@ import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
|
10
10
|
import { TestIdUtil as y } from "@gen-epix/ui-core/utils/TestIdUtil";
|
|
11
11
|
//#region src/components/fields/CheckboxGroup/CheckboxGroup.tsx
|
|
12
12
|
var b = ({ disabled: b, infoMessage: x, label: S, loading: C, name: w, onChange: T, options: E, required: D, row: O, warningMessage: k }) => {
|
|
13
|
-
let { t: A } = c(), j =
|
|
13
|
+
let { t: A } = c(), j = i(), { control: M, formState: { errors: N } } = s(), P = e.getFieldErrorMessage(N, w), F = a(null), I = !!P, L = r((e, t, n) => (r, i) => {
|
|
14
14
|
let a = n.filter((e) => e !== t);
|
|
15
15
|
i && a.push(t), T && T(a), e(a);
|
|
16
|
-
}, [T]), R =
|
|
17
|
-
|
|
16
|
+
}, [T]), R = r(({ field: { onBlur: e, onChange: r, ref: i, value: a } }) => {
|
|
17
|
+
i({ focus: () => {
|
|
18
18
|
F?.current?.focus();
|
|
19
19
|
} });
|
|
20
20
|
let o = () => {
|
|
21
|
-
|
|
21
|
+
r([]);
|
|
22
22
|
};
|
|
23
23
|
return /* @__PURE__ */ v(u, {
|
|
24
24
|
component: "fieldset",
|
|
@@ -55,7 +55,7 @@ var b = ({ disabled: b, infoMessage: x, label: S, loading: C, name: w, onChange:
|
|
|
55
55
|
"aria-labelledby": j,
|
|
56
56
|
onBlur: e,
|
|
57
57
|
row: O,
|
|
58
|
-
children: E.map((e,
|
|
58
|
+
children: E.map((e, t) => /* @__PURE__ */ _(d, {
|
|
59
59
|
...y.createAttributes("CheckboxGroup-option", {
|
|
60
60
|
label: e.label,
|
|
61
61
|
value: e.value.toString()
|
|
@@ -64,19 +64,19 @@ var b = ({ disabled: b, infoMessage: x, label: S, loading: C, name: w, onChange:
|
|
|
64
64
|
control: /* @__PURE__ */ _(l, {
|
|
65
65
|
slotProps: { input: {
|
|
66
66
|
name: `${w}-${e.value.toString()}`,
|
|
67
|
-
ref:
|
|
67
|
+
ref: t === 0 ? F : void 0
|
|
68
68
|
} },
|
|
69
69
|
sx: { padding: "0 9px" }
|
|
70
70
|
}),
|
|
71
71
|
disabled: C || b,
|
|
72
72
|
label: e.label,
|
|
73
|
-
onChange: L(
|
|
73
|
+
onChange: L(r, e.value, a)
|
|
74
74
|
}, e.value.toString()))
|
|
75
75
|
}),
|
|
76
|
-
!!C && /* @__PURE__ */ _(
|
|
76
|
+
!!C && /* @__PURE__ */ _(n, { inline: !0 }),
|
|
77
77
|
/* @__PURE__ */ _(p, {
|
|
78
78
|
sx: { ml: 0 },
|
|
79
|
-
children: /* @__PURE__ */ _(
|
|
79
|
+
children: /* @__PURE__ */ _(t, {
|
|
80
80
|
errorMessage: P,
|
|
81
81
|
infoMessage: x,
|
|
82
82
|
noIndent: !0,
|
|
@@ -101,7 +101,7 @@ var b = ({ disabled: b, infoMessage: x, label: S, loading: C, name: w, onChange:
|
|
|
101
101
|
k,
|
|
102
102
|
L
|
|
103
103
|
]);
|
|
104
|
-
return /* @__PURE__ */ _(
|
|
104
|
+
return /* @__PURE__ */ _(o, {
|
|
105
105
|
control: M,
|
|
106
106
|
defaultValue: null,
|
|
107
107
|
name: w,
|