@thebuoyant-tsdev/mui-ts-library 3.21.0 → 3.24.1
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/README.de.md +17 -6
- package/README.md +17 -6
- package/dist/components/chord-chart/ChordChart.d.ts +1 -1
- package/dist/components/chord-chart/ChordChart.js +66 -65
- package/dist/components/chord-chart/ChordChart.types.d.ts +7 -0
- package/dist/components/circle-packing-chart/CirclePackingChart.d.ts +1 -1
- package/dist/components/circle-packing-chart/CirclePackingChart.js +128 -128
- package/dist/components/circle-packing-chart/CirclePackingChart.types.d.ts +7 -0
- package/dist/components/color-picker/ColorPicker.d.ts +1 -1
- package/dist/components/color-picker/ColorPicker.js +282 -266
- package/dist/components/color-picker/ColorPicker.types.d.ts +3 -1
- package/dist/components/color-picker/colorPickerClasses.d.ts +35 -0
- package/dist/components/color-picker/colorPickerClasses.js +15 -0
- package/dist/components/password-strength-meter/PasswordStrengthBar.d.ts +2 -1
- package/dist/components/password-strength-meter/PasswordStrengthBar.js +3 -1
- package/dist/components/password-strength-meter/PasswordStrengthMeter.js +258 -237
- package/dist/components/password-strength-meter/passwordStrengthMeterClasses.d.ts +40 -0
- package/dist/components/password-strength-meter/passwordStrengthMeterClasses.js +16 -0
- package/dist/components/radial-stacked-bar-chart/RadialStackedBarChart.d.ts +1 -1
- package/dist/components/radial-stacked-bar-chart/RadialStackedBarChart.js +85 -84
- package/dist/components/radial-stacked-bar-chart/RadialStackedBarChart.types.d.ts +8 -0
- package/dist/components/rich-text-editor/RichTextEditorToolbar.js +115 -111
- package/dist/components/sunburst-chart/SunburstChart.d.ts +1 -1
- package/dist/components/sunburst-chart/SunburstChart.js +41 -40
- package/dist/components/sunburst-chart/SunburstChart.types.d.ts +7 -0
- package/dist/components/tag-selection/TagSelection.js +82 -79
- package/dist/components/tag-selection/TagSelectionAutocomplete.js +102 -98
- package/dist/components/tag-selection/TagSelectionChip.js +24 -21
- package/dist/components/tag-selection/TagSelectionSelectedTags.js +44 -38
- package/dist/components/tag-selection/tagSelectionClasses.d.ts +34 -0
- package/dist/components/tag-selection/tagSelectionClasses.js +15 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +31 -27
- package/dist/utils/muiTsClasses.d.ts +7 -0
- package/dist/utils/muiTsClasses.js +9 -0
- package/package.json +1 -1
|
@@ -14,8 +14,8 @@ function te(e, t) {
|
|
|
14
14
|
let n = Math.floor(t / h);
|
|
15
15
|
return n <= 0 ? "" : e.length <= n ? e : n < g ? "" : e.slice(0, n - 1) + "…";
|
|
16
16
|
}
|
|
17
|
-
function ne({ node: e, valueDecimalCount: t, valueDecimalSep: n, valueThousandsSep: r }) {
|
|
18
|
-
let
|
|
17
|
+
function ne({ node: e, valueDecimalCount: t, valueDecimalSep: n, valueThousandsSep: r, valueFormatter: i }) {
|
|
18
|
+
let a = (e.value ?? 0) > 0, o = e.ancestors().map((e) => e.data.name).reverse().join(" › ");
|
|
19
19
|
return /* @__PURE__ */ d(s, {
|
|
20
20
|
sx: { py: .25 },
|
|
21
21
|
children: [
|
|
@@ -27,13 +27,13 @@ function ne({ node: e, valueDecimalCount: t, valueDecimalSep: n, valueThousandsS
|
|
|
27
27
|
},
|
|
28
28
|
children: e.data.name
|
|
29
29
|
}),
|
|
30
|
-
|
|
30
|
+
a && /* @__PURE__ */ u(l, {
|
|
31
31
|
variant: "caption",
|
|
32
32
|
sx: {
|
|
33
33
|
display: "block",
|
|
34
34
|
opacity: .85
|
|
35
35
|
},
|
|
36
|
-
children:
|
|
36
|
+
children: ((e) => i ? i(e) : _(e, t, n, r))(e.value ?? 0)
|
|
37
37
|
}),
|
|
38
38
|
e.depth > 0 && /* @__PURE__ */ u(l, {
|
|
39
39
|
variant: "caption",
|
|
@@ -42,27 +42,27 @@ function ne({ node: e, valueDecimalCount: t, valueDecimalSep: n, valueThousandsS
|
|
|
42
42
|
opacity: .65,
|
|
43
43
|
mt: .25
|
|
44
44
|
},
|
|
45
|
-
children:
|
|
45
|
+
children: o
|
|
46
46
|
})
|
|
47
47
|
]
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
-
function v({ data: l, size: h = 500, showSegmentLabels: g = !0, innerRadius: _ = 0, sortBy: v = "value", chartColors: y, showRootLabel: b = !0, onSegmentClick: x, onZoomChange: S, valueDecimalCount: re = 0, valueDecimalSeparator: ie = ".", valueThousandsSeparator: ae = ",", zoomable: C = !1, duration: w = 750, disabled: T = !1, translation:
|
|
51
|
-
let E = ee(),
|
|
50
|
+
function v({ data: l, size: h = 500, showSegmentLabels: g = !0, innerRadius: _ = 0, sortBy: v = "value", chartColors: y, showRootLabel: b = !0, onSegmentClick: x, onZoomChange: S, valueDecimalCount: re = 0, valueDecimalSeparator: ie = ".", valueThousandsSeparator: ae = ",", valueFormatter: oe, zoomable: C = !1, duration: w = 750, disabled: T = !1, translation: se }) {
|
|
51
|
+
let E = ee(), ce = {
|
|
52
52
|
...e,
|
|
53
|
-
...
|
|
54
|
-
}, D = !l.children?.length && !l.value, O = a(null), [k, A] = o(`-${h / 2} -${h / 2} ${h} ${h}`), [j, M] = o(1),
|
|
53
|
+
...se
|
|
54
|
+
}, D = !l.children?.length && !l.value, O = a(null), [k, A] = o(`-${h / 2} -${h / 2} ${h} ${h}`), [j, M] = o(1), le = i(() => {
|
|
55
55
|
if (j === 1) return k;
|
|
56
56
|
let [e, t, n, r] = k.split(" ").map(Number), i = n / j, a = r / j;
|
|
57
57
|
return `${e + (n - i) / 2} ${t + (r - a) / 2} ${i} ${a}`;
|
|
58
|
-
}, [k, j]), N = h / 2, P = Math.max(0, Math.min(_, Math.max(0, N - 1))), F = Math.max(1, N - P),
|
|
58
|
+
}, [k, j]), N = h / 2, P = Math.max(0, Math.min(_, Math.max(0, N - 1))), F = Math.max(1, N - P), ue = [
|
|
59
59
|
E.palette.primary.main,
|
|
60
60
|
E.palette.secondary.main,
|
|
61
61
|
E.palette.error.main,
|
|
62
62
|
E.palette.warning.main,
|
|
63
63
|
E.palette.success.main,
|
|
64
64
|
E.palette.info.main
|
|
65
|
-
], I = y && y.length > 0 ? y :
|
|
65
|
+
], I = y && y.length > 0 ? y : ue, { root: L, ringThickness: R } = i(() => {
|
|
66
66
|
let e = f.hierarchy(l).sum((e) => e.value ?? 0);
|
|
67
67
|
v === "value" ? e.sort((e, t) => (t.value ?? 0) - (e.value ?? 0)) : e.sort((e, t) => String(e.data.name).localeCompare(String(t.data.name), void 0, {
|
|
68
68
|
numeric: !0,
|
|
@@ -79,22 +79,22 @@ function v({ data: l, size: h = 500, showSegmentLabels: g = !0, innerRadius: _ =
|
|
|
79
79
|
l,
|
|
80
80
|
F,
|
|
81
81
|
v
|
|
82
|
-
]), [z, B] = o(L), [
|
|
82
|
+
]), [z, B] = o(L), [de, fe] = o(L), V = (e) => ({
|
|
83
83
|
x0: e.x0,
|
|
84
84
|
x1: e.x1,
|
|
85
85
|
yShift: e.depth === 0 ? 0 : (e.depth - 1) * R
|
|
86
86
|
}), [H, U] = o(() => V(L)), W = a(H);
|
|
87
|
-
if (
|
|
88
|
-
|
|
87
|
+
if (de !== L) {
|
|
88
|
+
fe(L), B(L);
|
|
89
89
|
let e = V(L);
|
|
90
90
|
W.current = e, U(e);
|
|
91
91
|
}
|
|
92
|
-
let G = i(() => L.children?.map((e) => e.data.name) ?? [L.data.name], [L]),
|
|
92
|
+
let G = i(() => L.children?.map((e) => e.data.name) ?? [L.data.name], [L]), pe = i(() => f.scaleOrdinal().domain(G).range(I), [I, G]), me = (e) => {
|
|
93
93
|
if (e.data.colorConfig?.fill) return e.data.colorConfig.fill;
|
|
94
94
|
let t = e;
|
|
95
95
|
for (; t.depth > 1;) t = t.parent;
|
|
96
|
-
return
|
|
97
|
-
},
|
|
96
|
+
return pe(t.data.name);
|
|
97
|
+
}, he = i(() => f.arc().startAngle((e) => e.x0).endAngle((e) => e.x1).padAngle((e) => Math.min((e.x1 - e.x0) / 2, .005)).padRadius(N / 2).innerRadius((e) => P + e.y0).outerRadius((e) => P + e.y1 - 1), [N, P]), K = t((e) => {
|
|
98
98
|
let t = p / (H.x1 - H.x0);
|
|
99
99
|
return {
|
|
100
100
|
x0: Math.max(0, Math.min(p, (e.x0 - H.x0) * t)),
|
|
@@ -126,10 +126,10 @@ function v({ data: l, size: h = 500, showSegmentLabels: g = !0, innerRadius: _ =
|
|
|
126
126
|
R,
|
|
127
127
|
w
|
|
128
128
|
]);
|
|
129
|
-
let
|
|
129
|
+
let ge = (e) => e.x1 > e.x0 && e.y1 > e.y0, _e = (e) => (P + (e.y0 + e.y1) / 2) * (e.x1 - e.x0) > 12, ve = (e) => {
|
|
130
130
|
let t = (e.x0 + e.x1) / 2 * 180 / Math.PI, n = P + (e.y0 + e.y1) / 2, r = t < 180 ? 0 : 180;
|
|
131
131
|
return `rotate(${t - 90}) translate(${n},0) rotate(${r})`;
|
|
132
|
-
},
|
|
132
|
+
}, ye = t((e) => e.ancestors().includes(z), [z]), q = t((e) => {
|
|
133
133
|
let t = e.ancestors().reverse(), n = e.value ?? 0, r = L.value ?? 0;
|
|
134
134
|
return {
|
|
135
135
|
id: e.data.id,
|
|
@@ -172,7 +172,7 @@ function v({ data: l, size: h = 500, showSegmentLabels: g = !0, innerRadius: _ =
|
|
|
172
172
|
R,
|
|
173
173
|
b
|
|
174
174
|
]);
|
|
175
|
-
let Y = a(null),
|
|
175
|
+
let Y = a(null), be = (e) => {
|
|
176
176
|
Y.current &&= (clearTimeout(Y.current), null), Y.current = setTimeout(() => {
|
|
177
177
|
e(), Y.current = null;
|
|
178
178
|
}, 250);
|
|
@@ -190,22 +190,22 @@ function v({ data: l, size: h = 500, showSegmentLabels: g = !0, innerRadius: _ =
|
|
|
190
190
|
L,
|
|
191
191
|
J
|
|
192
192
|
]);
|
|
193
|
-
let
|
|
193
|
+
let xe = t((e) => {
|
|
194
194
|
if (!C || T || !e.ctrlKey) return;
|
|
195
195
|
e.preventDefault();
|
|
196
196
|
let t = e.deltaY < 0 ? 1.15 : 1 / 1.15;
|
|
197
197
|
M((e) => Math.max(.25, Math.min(8, e * t)));
|
|
198
|
-
}, [C, T]), Z = L.descendants().filter((e) => e.depth > 0),
|
|
198
|
+
}, [C, T]), Z = L.descendants().filter((e) => e.depth > 0), Se = (e) => {
|
|
199
199
|
if (T) return;
|
|
200
200
|
let t = Z[Number(e.currentTarget.getAttribute("data-idx"))];
|
|
201
201
|
if (t) {
|
|
202
202
|
if (e.ctrlKey || e.metaKey) {
|
|
203
|
-
t.children &&
|
|
203
|
+
t.children && be(() => J(t));
|
|
204
204
|
return;
|
|
205
205
|
}
|
|
206
206
|
x?.(q(t), e);
|
|
207
207
|
}
|
|
208
|
-
},
|
|
208
|
+
}, Ce = (e) => {
|
|
209
209
|
T || (e.ctrlKey || e.metaKey) && (X(), J(z.parent ?? L));
|
|
210
210
|
}, Q = (e) => {
|
|
211
211
|
if (!T) {
|
|
@@ -221,7 +221,7 @@ function v({ data: l, size: h = 500, showSegmentLabels: g = !0, innerRadius: _ =
|
|
|
221
221
|
enterNextDelay: 0,
|
|
222
222
|
disableHoverListener: T,
|
|
223
223
|
slotProps: { tooltip: { sx: { maxWidth: 260 } } }
|
|
224
|
-
},
|
|
224
|
+
}, we = E.palette.text.primary, Te = E.typography.fontFamily;
|
|
225
225
|
return /* @__PURE__ */ u(s, {
|
|
226
226
|
sx: {
|
|
227
227
|
display: "inline-flex",
|
|
@@ -232,10 +232,10 @@ function v({ data: l, size: h = 500, showSegmentLabels: g = !0, innerRadius: _ =
|
|
|
232
232
|
children: /* @__PURE__ */ u("svg", {
|
|
233
233
|
width: h,
|
|
234
234
|
height: h,
|
|
235
|
-
viewBox:
|
|
236
|
-
onWheel:
|
|
235
|
+
viewBox: le,
|
|
236
|
+
onWheel: xe,
|
|
237
237
|
style: {
|
|
238
|
-
fontFamily:
|
|
238
|
+
fontFamily: Te ?? "sans-serif",
|
|
239
239
|
overflow: C && j > 1 ? "hidden" : "visible"
|
|
240
240
|
},
|
|
241
241
|
role: "img",
|
|
@@ -248,7 +248,7 @@ function v({ data: l, size: h = 500, showSegmentLabels: g = !0, innerRadius: _ =
|
|
|
248
248
|
dy: "0.35em",
|
|
249
249
|
fontSize: 13,
|
|
250
250
|
fill: E.palette.text.secondary,
|
|
251
|
-
children:
|
|
251
|
+
children: ce.noData
|
|
252
252
|
}),
|
|
253
253
|
P > 0 && /* @__PURE__ */ u(c, {
|
|
254
254
|
...$,
|
|
@@ -265,7 +265,7 @@ function v({ data: l, size: h = 500, showSegmentLabels: g = !0, innerRadius: _ =
|
|
|
265
265
|
})
|
|
266
266
|
}),
|
|
267
267
|
/* @__PURE__ */ u("g", { children: Z.map((e, t) => {
|
|
268
|
-
let n = K(e), r =
|
|
268
|
+
let n = K(e), r = ge(n), i = !!e.children;
|
|
269
269
|
return /* @__PURE__ */ u(c, {
|
|
270
270
|
...$,
|
|
271
271
|
placement: "top",
|
|
@@ -273,34 +273,35 @@ function v({ data: l, size: h = 500, showSegmentLabels: g = !0, innerRadius: _ =
|
|
|
273
273
|
node: e,
|
|
274
274
|
valueDecimalCount: re,
|
|
275
275
|
valueDecimalSep: ie,
|
|
276
|
-
valueThousandsSep: ae
|
|
276
|
+
valueThousandsSep: ae,
|
|
277
|
+
valueFormatter: oe
|
|
277
278
|
}) : "",
|
|
278
279
|
children: /* @__PURE__ */ u("path", {
|
|
279
280
|
"data-idx": t,
|
|
280
|
-
d:
|
|
281
|
-
fill:
|
|
281
|
+
d: he(n) || "",
|
|
282
|
+
fill: me(e),
|
|
282
283
|
fillOpacity: r ? i ? .75 : .5 : 0,
|
|
283
284
|
style: {
|
|
284
285
|
pointerEvents: r && !T ? "auto" : "none",
|
|
285
286
|
cursor: i && !T ? "pointer" : "default",
|
|
286
287
|
transition: "fill-opacity 0.15s"
|
|
287
288
|
},
|
|
288
|
-
onClick:
|
|
289
|
-
onDoubleClick:
|
|
289
|
+
onClick: Se,
|
|
290
|
+
onDoubleClick: Ce
|
|
290
291
|
})
|
|
291
292
|
}, `tt-${e.data.id}-${t}`);
|
|
292
293
|
}) }),
|
|
293
294
|
g && /* @__PURE__ */ u("g", {
|
|
294
295
|
pointerEvents: "none",
|
|
295
296
|
textAnchor: "middle",
|
|
296
|
-
fill:
|
|
297
|
+
fill: we,
|
|
297
298
|
children: Z.map((e, t) => {
|
|
298
|
-
if (!
|
|
299
|
+
if (!ye(e)) return null;
|
|
299
300
|
let n = K(e);
|
|
300
|
-
if (!
|
|
301
|
+
if (!_e(n)) return null;
|
|
301
302
|
let r = (P + (n.y0 + n.y1) / 2) * (n.x1 - n.x0) * .88, i = te(e.data.name, r);
|
|
302
303
|
return i ? /* @__PURE__ */ u("text", {
|
|
303
|
-
transform:
|
|
304
|
+
transform: ve(n),
|
|
304
305
|
dy: "0.35em",
|
|
305
306
|
fontSize: m,
|
|
306
307
|
children: i
|
|
@@ -313,7 +314,7 @@ function v({ data: l, size: h = 500, showSegmentLabels: g = !0, innerRadius: _ =
|
|
|
313
314
|
title: "",
|
|
314
315
|
children: /* @__PURE__ */ u("g", {
|
|
315
316
|
textAnchor: "middle",
|
|
316
|
-
fill:
|
|
317
|
+
fill: we,
|
|
317
318
|
pointerEvents: T ? "none" : "auto",
|
|
318
319
|
onClick: Q,
|
|
319
320
|
style: { cursor: z !== L && !T ? "pointer" : "default" },
|
|
@@ -64,6 +64,13 @@ export type SunburstChartProps = {
|
|
|
64
64
|
valueDecimalSeparator?: string;
|
|
65
65
|
/** Thousands separator for values (default: ',') */
|
|
66
66
|
valueThousandsSeparator?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Custom formatter for numeric values in tooltips. Overrides `valueDecimalCount`,
|
|
69
|
+
* `valueDecimalSeparator`, and `valueThousandsSeparator`.
|
|
70
|
+
* Example: `(v) => \`${v.toLocaleString('de-DE')} MB\``
|
|
71
|
+
* @since 3.22.0
|
|
72
|
+
*/
|
|
73
|
+
valueFormatter?: (value: number) => string;
|
|
67
74
|
/** Enable Ctrl+Scroll zoom — content outside `size` is clipped (default: false) */
|
|
68
75
|
zoomable?: boolean;
|
|
69
76
|
/** Drill-down/out transition duration in ms — set to 0 to disable animation (default: 750) */
|
|
@@ -1,108 +1,111 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { muiTsStateClasses as e } from "../../utils/muiTsClasses.js";
|
|
2
|
+
import { tagSelectionClasses as t } from "./tagSelectionClasses.js";
|
|
3
|
+
import { createTagSelectionStore as n } from "./TagSelection.store.js";
|
|
4
|
+
import { TagSelectionAutocomplete as r } from "./TagSelectionAutocomplete.js";
|
|
5
|
+
import { TagSelectionSelectedTags as i } from "./TagSelectionSelectedTags.js";
|
|
6
|
+
import { DEFAULT_TAG_SELECTION_TRANSLATION as a } from "./TagSelection.types.js";
|
|
7
|
+
import { createContext as o, useContext as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
|
|
8
|
+
import { Box as f, Stack as p } from "@mui/material";
|
|
9
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
10
|
+
import { useStore as g } from "zustand";
|
|
9
11
|
//#region src/components/tag-selection/TagSelection.tsx
|
|
10
|
-
var
|
|
11
|
-
function
|
|
12
|
-
let t =
|
|
12
|
+
var _ = o(null);
|
|
13
|
+
function v(e) {
|
|
14
|
+
let t = s(_);
|
|
13
15
|
if (!t) throw Error("TagSelectionStoreContext is missing.");
|
|
14
|
-
return
|
|
16
|
+
return g(t, e);
|
|
15
17
|
}
|
|
16
|
-
function
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}, [
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
},
|
|
18
|
+
function y({ tags: n, showSelectedTags: a = !0, showSelectedTagsLabel: o = !0, showAutoComplete: s = !0, inputSize: d = "medium", chipSize: g = "small", chipVariant: _ = "filled", disabled: y = !1, loading: b = !1, maxTags: x, allowCreate: S = !1, maxVisibleChips: C, popoverPlacement: w = "bottom", listboxMaxHeight: T, searchDebounceMs: E, serverSideFilter: D = !1, translation: O, onTagSelect: k, onTagDelete: A, onTagsChange: j, onSearchChange: M, onTagCreate: N }) {
|
|
19
|
+
let P = v((e) => e.tags), F = v((e) => e.searchValue), I = v((e) => e.setTags), L = v((e) => e.setSearchValue), R = v((e) => e.selectTag), z = v((e) => e.deleteTag), B = v((e) => e.addTag);
|
|
20
|
+
c(() => {
|
|
21
|
+
I(n);
|
|
22
|
+
}, [n, I]);
|
|
23
|
+
let V = l(() => P.filter((e) => e.selected).sort((e, t) => e.label.localeCompare(t.label)), [P]), H = l(() => P.filter((e) => !e.selected && !e.disabled).sort((e, t) => e.label.localeCompare(t.label)), [P]), U = x !== void 0 && V.length >= x, W = (e) => {
|
|
24
|
+
j && j(e.filter((e) => e.selected), e);
|
|
25
|
+
}, G = (e) => {
|
|
24
26
|
if (e.disabled || e.selected) return;
|
|
25
|
-
|
|
26
|
-
let t =
|
|
27
|
+
R(e.id);
|
|
28
|
+
let t = P.map((t) => t.id === e.id ? {
|
|
27
29
|
...t,
|
|
28
30
|
selected: !0
|
|
29
31
|
} : t), n = t.filter((e) => e.selected), r = t.find((t) => t.id === e.id);
|
|
30
|
-
r &&
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
let t =
|
|
32
|
+
r && k && k(r, n, t), W(t);
|
|
33
|
+
}, K = (e) => {
|
|
34
|
+
z(e.id);
|
|
35
|
+
let t = P.map((t) => t.id === e.id ? {
|
|
34
36
|
...t,
|
|
35
37
|
selected: !1
|
|
36
38
|
} : t), n = t.filter((e) => e.selected), r = t.find((t) => t.id === e.id);
|
|
37
|
-
r &&
|
|
38
|
-
},
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
}, []), /* @__PURE__ */ f
|
|
39
|
+
r && A && A(r, n, t), W(t);
|
|
40
|
+
}, q = u(null);
|
|
41
|
+
return c(() => () => {
|
|
42
|
+
q.current && clearTimeout(q.current);
|
|
43
|
+
}, []), /* @__PURE__ */ m(f, {
|
|
42
44
|
sx: { width: "100%" },
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
45
|
+
className: [t.root, y && e.disabled].filter(Boolean).join(" "),
|
|
46
|
+
children: /* @__PURE__ */ h(p, { children: [a && /* @__PURE__ */ m(i, {
|
|
47
|
+
selectedTags: V,
|
|
48
|
+
translation: O,
|
|
49
|
+
onTagDelete: K,
|
|
50
|
+
showSelectedTagsLabel: o,
|
|
51
|
+
chipSize: g,
|
|
52
|
+
chipVariant: _,
|
|
53
|
+
disabled: y,
|
|
54
|
+
maxVisibleChips: C,
|
|
55
|
+
popoverPlacement: w
|
|
56
|
+
}), s && /* @__PURE__ */ m(r, {
|
|
57
|
+
availableTags: H,
|
|
58
|
+
searchValue: F,
|
|
59
|
+
translation: O,
|
|
57
60
|
onSearchChange: (e) => {
|
|
58
|
-
if (
|
|
59
|
-
if (
|
|
60
|
-
|
|
61
|
+
if (L(e), M) {
|
|
62
|
+
if (q.current &&= (clearTimeout(q.current), null), !E) {
|
|
63
|
+
M(e);
|
|
61
64
|
return;
|
|
62
65
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
+
q.current = setTimeout(() => {
|
|
67
|
+
M(e), q.current = null;
|
|
68
|
+
}, E);
|
|
66
69
|
}
|
|
67
70
|
},
|
|
68
|
-
onTagSelect:
|
|
71
|
+
onTagSelect: G,
|
|
69
72
|
onTagCreate: (e) => {
|
|
70
|
-
|
|
73
|
+
B(e), W([...P, e]), N && N(e);
|
|
71
74
|
},
|
|
72
|
-
inputSize:
|
|
73
|
-
chipSize:
|
|
74
|
-
chipVariant:
|
|
75
|
-
disabled:
|
|
76
|
-
loading:
|
|
77
|
-
isMaxReached:
|
|
78
|
-
allowCreate:
|
|
79
|
-
listboxMaxHeight:
|
|
80
|
-
serverSideFilter:
|
|
75
|
+
inputSize: d,
|
|
76
|
+
chipSize: g,
|
|
77
|
+
chipVariant: _,
|
|
78
|
+
disabled: y,
|
|
79
|
+
loading: b,
|
|
80
|
+
isMaxReached: U,
|
|
81
|
+
allowCreate: S,
|
|
82
|
+
listboxMaxHeight: T,
|
|
83
|
+
serverSideFilter: D
|
|
81
84
|
})] })
|
|
82
85
|
});
|
|
83
86
|
}
|
|
84
|
-
function
|
|
87
|
+
function b({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: r = !0, showAutoComplete: i = !0, translation: o, inputSize: s = "medium", chipSize: c = "small", chipVariant: l = "filled", disabled: u = !1, loading: f = !1, maxTags: p, allowCreate: h = !1, maxVisibleChips: g, popoverPlacement: v = "bottom", listboxMaxHeight: b, searchDebounceMs: x, serverSideFilter: S = !1, onTagSelect: C, onTagDelete: w, onTagsChange: T, onSearchChange: E, onTagCreate: D }) {
|
|
85
88
|
let O = {
|
|
86
|
-
...
|
|
89
|
+
...a,
|
|
87
90
|
...o
|
|
88
|
-
}, [k] =
|
|
89
|
-
return /* @__PURE__ */
|
|
91
|
+
}, [k] = d(() => n(e));
|
|
92
|
+
return /* @__PURE__ */ m(_.Provider, {
|
|
90
93
|
value: k,
|
|
91
|
-
children: /* @__PURE__ */
|
|
92
|
-
tags:
|
|
93
|
-
showSelectedTags:
|
|
94
|
-
showSelectedTagsLabel:
|
|
95
|
-
showAutoComplete:
|
|
94
|
+
children: /* @__PURE__ */ m(y, {
|
|
95
|
+
tags: e,
|
|
96
|
+
showSelectedTags: t,
|
|
97
|
+
showSelectedTagsLabel: r,
|
|
98
|
+
showAutoComplete: i,
|
|
96
99
|
translation: O,
|
|
97
100
|
inputSize: s,
|
|
98
101
|
chipSize: c,
|
|
99
|
-
chipVariant:
|
|
100
|
-
disabled:
|
|
101
|
-
loading:
|
|
102
|
-
maxTags:
|
|
103
|
-
allowCreate:
|
|
104
|
-
maxVisibleChips:
|
|
105
|
-
popoverPlacement:
|
|
102
|
+
chipVariant: l,
|
|
103
|
+
disabled: u,
|
|
104
|
+
loading: f,
|
|
105
|
+
maxTags: p,
|
|
106
|
+
allowCreate: h,
|
|
107
|
+
maxVisibleChips: g,
|
|
108
|
+
popoverPlacement: v,
|
|
106
109
|
listboxMaxHeight: b,
|
|
107
110
|
searchDebounceMs: x,
|
|
108
111
|
serverSideFilter: S,
|
|
@@ -115,4 +118,4 @@ function v({ tags: t, showSelectedTags: n = !0, showSelectedTagsLabel: i = !0, s
|
|
|
115
118
|
});
|
|
116
119
|
}
|
|
117
120
|
//#endregion
|
|
118
|
-
export {
|
|
121
|
+
export { b as TagSelection };
|