flysoft-react-ui 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/form-controls/AutocompleteInput.d.ts +7 -2
- package/dist/components/form-controls/AutocompleteInput.d.ts.map +1 -1
- package/dist/components/form-controls/AutocompleteInput.js +207 -65
- package/dist/components/form-controls/Button.js +1 -1
- package/dist/components/form-controls/Checkbox.d.ts.map +1 -1
- package/dist/components/form-controls/Checkbox.js +1 -1
- package/dist/components/form-controls/SearchSelectInput.d.ts.map +1 -1
- package/dist/components/form-controls/SearchSelectInput.js +7 -7
- package/dist/components/layout/Filter.d.ts +1 -0
- package/dist/components/layout/Filter.d.ts.map +1 -1
- package/dist/components/layout/Filter.js +68 -28
- package/dist/contexts/CrudContext.d.ts +1 -3
- package/dist/contexts/CrudContext.d.ts.map +1 -1
- package/dist/docs/AutocompleteInputDocs.d.ts.map +1 -1
- package/dist/docs/AutocompleteInputDocs.js +10 -1
- package/dist/docs/FilterDocs.d.ts.map +1 -1
- package/dist/docs/FilterDocs.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,12 +8,12 @@ export interface AutocompleteOption {
|
|
|
8
8
|
}
|
|
9
9
|
export interface AutocompleteInputProps<T = AutocompleteOption, K = string> extends Omit<InputProps, "onChange" | "value" | "ref"> {
|
|
10
10
|
options: T[];
|
|
11
|
-
value?: string;
|
|
11
|
+
value?: string | string[];
|
|
12
12
|
/**
|
|
13
13
|
* Valor de texto del input (controlado)
|
|
14
14
|
* Puede ser un ChangeEventHandler (de register) o una función que recibe string (API personalizada)
|
|
15
15
|
*/
|
|
16
|
-
onChange?: React.ChangeEventHandler<HTMLInputElement> | ((value: string) => void);
|
|
16
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement> | ((value: string | string[]) => void);
|
|
17
17
|
/**
|
|
18
18
|
* Callback al seleccionar una opción. Devuelve el item completo (T) y el valor mapeado (K)
|
|
19
19
|
*/
|
|
@@ -40,6 +40,11 @@ export interface AutocompleteInputProps<T = AutocompleteOption, K = string> exte
|
|
|
40
40
|
* Por defecto es false.
|
|
41
41
|
*/
|
|
42
42
|
readOnly?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Si es true, permite seleccionar múltiples opciones usando Checkboxes.
|
|
45
|
+
* El valor será un array con los valores (K) de las opciones seleccionadas.
|
|
46
|
+
*/
|
|
47
|
+
multiple?: boolean;
|
|
43
48
|
}
|
|
44
49
|
export declare const AutocompleteInput: <T = AutocompleteOption, K = string>(props: AutocompleteInputProps<T, K> & {
|
|
45
50
|
ref?: React.ForwardedRef<HTMLInputElement>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteInput.d.ts","sourceRoot":"","sources":["../../../src/components/form-controls/AutocompleteInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"AutocompleteInput.d.ts","sourceRoot":"","sources":["../../../src/components/form-controls/AutocompleteInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAK1C,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,sBAAsB,CAAC,CAAC,GAAG,kBAAkB,EAAE,CAAC,GAAG,MAAM,CACxE,SAAQ,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,GAAG,KAAK,CAAC;IACtD,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EACL,KAAK,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,GAC1C,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,IAAI,CAAC,CAAC;IACzC;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC/C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IACrC;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC;IAChC;;OAEG;IACH,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAChE;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IAC5C;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAw3BD,eAAO,MAAM,iBAAiB,EAA6B,CACzD,CAAC,GAAG,kBAAkB,EACtB,CAAC,GAAG,MAAM,EAEV,KAAK,EAAE,sBAAsB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;IACpC,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC;CAC5C,KACE,KAAK,CAAC,YAAY,CAAC"}
|
|
@@ -4,8 +4,9 @@ import { createPortal } from "react-dom";
|
|
|
4
4
|
import { useFormContext } from "react-hook-form";
|
|
5
5
|
import { Input } from "./Input";
|
|
6
6
|
import { normalizeIconClass } from "../utils/iconUtils";
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
import { Checkbox } from "./Checkbox";
|
|
8
|
+
const AutocompleteInputInner = React.forwardRef(({ options, value, onChange, onSelectOption, noResultsText = "Sin resultados", className = "", getOptionLabel, getOptionValue, getOptionDescription, renderOption, readOnly = false, multiple = false, ...inputProps }, ref) => {
|
|
9
|
+
const [internalValue, setInternalValue] = React.useState(value || (multiple ? [] : ""));
|
|
9
10
|
const [displayValue, setDisplayValue] = React.useState("");
|
|
10
11
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
11
12
|
const [highlightedIndex, setHighlightedIndex] = React.useState(-1);
|
|
@@ -33,9 +34,34 @@ const AutocompleteInputInner = React.forwardRef(({ options, value, onChange, onS
|
|
|
33
34
|
const setValue = formContext?.setValue;
|
|
34
35
|
const inputValue = isRegisterMode
|
|
35
36
|
? displayValue
|
|
36
|
-
: value
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
: (multiple ? displayValue : (typeof value === "string" ? value : (typeof internalValue === "string" ? internalValue : "")));
|
|
38
|
+
const selectedValuesArray = React.useMemo(() => {
|
|
39
|
+
const currentVal = isRegisterMode && hiddenInputRef.current
|
|
40
|
+
? hiddenInputRef.current.value
|
|
41
|
+
: (value !== undefined ? value : internalValue);
|
|
42
|
+
if (Array.isArray(currentVal))
|
|
43
|
+
return currentVal;
|
|
44
|
+
// En modo register, los valores múltiples podrían estar como un string JSON o separados por comas.
|
|
45
|
+
// Si el hiddenInput recibe un array en react-hook-form, su valor puede volverse "[object Object]" o concatenado.
|
|
46
|
+
// Asumiremos que react-hook-form maneja correctamente el array si el value prop es un array.
|
|
47
|
+
// Si recibimos un string:
|
|
48
|
+
if (typeof currentVal === "string") {
|
|
49
|
+
if (!currentVal)
|
|
50
|
+
return [];
|
|
51
|
+
try {
|
|
52
|
+
// Intentar parsear si es JSON
|
|
53
|
+
const parsed = JSON.parse(currentVal);
|
|
54
|
+
if (Array.isArray(parsed))
|
|
55
|
+
return parsed.map(String);
|
|
56
|
+
return [currentVal];
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
// Si no es JSON, asumir es un solo string o separado por comas (no recomendado por conflicto con comas en valores)
|
|
60
|
+
return [currentVal];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return [];
|
|
64
|
+
}, [isRegisterMode, value, internalValue, multiple]);
|
|
39
65
|
const labelGetter = React.useCallback((item) => {
|
|
40
66
|
if (getOptionLabel)
|
|
41
67
|
return getOptionLabel(item);
|
|
@@ -48,6 +74,16 @@ const AutocompleteInputInner = React.forwardRef(({ options, value, onChange, onS
|
|
|
48
74
|
const anyItem = item;
|
|
49
75
|
return anyItem.value ?? undefined;
|
|
50
76
|
}, [getOptionValue]);
|
|
77
|
+
// Calcular el label unificado para multiple
|
|
78
|
+
const getMultipleDisplayValue = React.useCallback((values) => {
|
|
79
|
+
if (!values || values.length === 0)
|
|
80
|
+
return "";
|
|
81
|
+
const labels = values.map((val) => {
|
|
82
|
+
const matchingOption = options.find((option) => String(valueGetter(option)) === String(val));
|
|
83
|
+
return matchingOption ? labelGetter(matchingOption) : String(val);
|
|
84
|
+
});
|
|
85
|
+
return labels.join(", ");
|
|
86
|
+
}, [options, valueGetter, labelGetter]);
|
|
51
87
|
const descriptionGetter = React.useCallback((item) => {
|
|
52
88
|
if (getOptionDescription)
|
|
53
89
|
return getOptionDescription(item);
|
|
@@ -55,7 +91,17 @@ const AutocompleteInputInner = React.forwardRef(({ options, value, onChange, onS
|
|
|
55
91
|
return anyItem.description;
|
|
56
92
|
}, [getOptionDescription]);
|
|
57
93
|
const filteredOptions = React.useMemo(() => {
|
|
58
|
-
|
|
94
|
+
let search = displayValue.trim().toLowerCase();
|
|
95
|
+
// Si es múltiple y no estamos enfocando el input para buscar, no filtramos por displayValue
|
|
96
|
+
// (ya que displayValue contiene los labels de los items seleccionados separados por coma)
|
|
97
|
+
if (multiple) {
|
|
98
|
+
if (document.activeElement !== inputRef.current || displayValue === getMultipleDisplayValue(selectedValuesArray)) {
|
|
99
|
+
search = "";
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
search = inputValue.trim().toLowerCase();
|
|
104
|
+
}
|
|
59
105
|
if (!search)
|
|
60
106
|
return options;
|
|
61
107
|
return options.filter((option) => {
|
|
@@ -71,26 +117,41 @@ const AutocompleteInputInner = React.forwardRef(({ options, value, onChange, onS
|
|
|
71
117
|
const targetInput = hiddenInputRef.current || inputRef.current;
|
|
72
118
|
if (targetInput) {
|
|
73
119
|
const formValue = targetInput.value;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
120
|
+
if (multiple) {
|
|
121
|
+
let parsedValues = [];
|
|
122
|
+
try {
|
|
123
|
+
parsedValues = JSON.parse(formValue);
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
parsedValues = formValue ? [formValue] : [];
|
|
127
|
+
}
|
|
128
|
+
if (Array.isArray(parsedValues)) {
|
|
129
|
+
setDisplayValue(getMultipleDisplayValue(parsedValues));
|
|
130
|
+
return true;
|
|
131
|
+
}
|
|
85
132
|
}
|
|
86
133
|
else {
|
|
87
|
-
|
|
88
|
-
|
|
134
|
+
// Si el valor del formulario coincide con algún getOptionValue, mostrar su label
|
|
135
|
+
const matchingOption = options.find((option) => String(valueGetter(option)) === String(formValue));
|
|
136
|
+
if (matchingOption) {
|
|
137
|
+
const label = labelGetter(matchingOption);
|
|
138
|
+
setDisplayValue(label);
|
|
139
|
+
return true; // Indica que se encontró y sincronizó un valor
|
|
140
|
+
}
|
|
141
|
+
else if (formValue) {
|
|
142
|
+
// Si hay un valor pero no coincide, mostrarlo tal cual (o buscar por label si fuera el caso)
|
|
143
|
+
setDisplayValue(formValue);
|
|
144
|
+
return true;
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
setDisplayValue("");
|
|
148
|
+
return false; // No hay valor aún
|
|
149
|
+
}
|
|
89
150
|
}
|
|
90
151
|
}
|
|
91
152
|
}
|
|
92
153
|
return false;
|
|
93
|
-
}, [isRegisterMode, options, valueGetter, labelGetter]);
|
|
154
|
+
}, [isRegisterMode, options, valueGetter, labelGetter, multiple, getMultipleDisplayValue]);
|
|
94
155
|
// Sincronizar displayValue con el valor del formulario en modo register
|
|
95
156
|
// Usar un intervalo que se ejecute hasta que encuentre el valor o hasta un máximo de intentos
|
|
96
157
|
React.useEffect(() => {
|
|
@@ -103,16 +164,29 @@ const AutocompleteInputInner = React.forwardRef(({ options, value, onChange, onS
|
|
|
103
164
|
if (targetInput) {
|
|
104
165
|
const formValue = targetInput.value;
|
|
105
166
|
if (formValue) {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
167
|
+
if (multiple) {
|
|
168
|
+
let parsedValues = [];
|
|
169
|
+
try {
|
|
170
|
+
parsedValues = JSON.parse(formValue);
|
|
171
|
+
}
|
|
172
|
+
catch {
|
|
173
|
+
parsedValues = [formValue];
|
|
174
|
+
}
|
|
175
|
+
setDisplayValue(getMultipleDisplayValue(parsedValues));
|
|
176
|
+
return true;
|
|
112
177
|
}
|
|
113
178
|
else {
|
|
114
|
-
|
|
115
|
-
|
|
179
|
+
// Hay un valor, intentar sincronizar
|
|
180
|
+
const matchingOption = options.find((option) => String(valueGetter(option)) === String(formValue));
|
|
181
|
+
if (matchingOption) {
|
|
182
|
+
const label = labelGetter(matchingOption);
|
|
183
|
+
setDisplayValue(label);
|
|
184
|
+
return true; // Valor encontrado y sincronizado
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
setDisplayValue(formValue);
|
|
188
|
+
return true; // Valor encontrado pero no coincide con opciones
|
|
189
|
+
}
|
|
116
190
|
}
|
|
117
191
|
}
|
|
118
192
|
}
|
|
@@ -180,16 +254,20 @@ const AutocompleteInputInner = React.forwardRef(({ options, value, onChange, onS
|
|
|
180
254
|
return;
|
|
181
255
|
const newValue = event.target.value;
|
|
182
256
|
if (isRegisterMode) {
|
|
183
|
-
// En modo register, actualizar el displayValue para mostrar lo que el usuario escribe
|
|
184
257
|
setDisplayValue(newValue);
|
|
185
258
|
}
|
|
186
259
|
else {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
setInternalValue(newValue);
|
|
260
|
+
if (multiple) {
|
|
261
|
+
setDisplayValue(newValue);
|
|
190
262
|
}
|
|
191
|
-
|
|
192
|
-
|
|
263
|
+
else {
|
|
264
|
+
// Modo API personalizada para input simple
|
|
265
|
+
if (value === undefined) {
|
|
266
|
+
setInternalValue(newValue);
|
|
267
|
+
}
|
|
268
|
+
if (onChange) {
|
|
269
|
+
onChange(newValue);
|
|
270
|
+
}
|
|
193
271
|
}
|
|
194
272
|
}
|
|
195
273
|
setIsOpen(true);
|
|
@@ -201,38 +279,58 @@ const AutocompleteInputInner = React.forwardRef(({ options, value, onChange, onS
|
|
|
201
279
|
const label = labelGetter(option);
|
|
202
280
|
const selectedValue = valueGetter(option);
|
|
203
281
|
const valueString = String(selectedValue ?? "");
|
|
282
|
+
let newValuesArray = [];
|
|
283
|
+
let newValueToSet = valueString;
|
|
284
|
+
let newLabelToSet = label;
|
|
285
|
+
if (multiple) {
|
|
286
|
+
// Toggle selection
|
|
287
|
+
if (selectedValuesArray.includes(valueString)) {
|
|
288
|
+
newValuesArray = selectedValuesArray.filter(v => v !== valueString);
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
newValuesArray = [...selectedValuesArray, valueString];
|
|
292
|
+
}
|
|
293
|
+
if (!isRegisterMode && value === undefined) {
|
|
294
|
+
setInternalValue(newValuesArray);
|
|
295
|
+
}
|
|
296
|
+
newLabelToSet = getMultipleDisplayValue(newValuesArray);
|
|
297
|
+
setDisplayValue(newLabelToSet);
|
|
298
|
+
// Pass the array to the onChange/register hooks
|
|
299
|
+
newValueToSet = newValuesArray;
|
|
300
|
+
}
|
|
204
301
|
if (isRegisterMode) {
|
|
205
302
|
// En modo register, setear el valor usando setValue o actualizando el input nativo (hidden)
|
|
206
303
|
if (setValue && fieldName) {
|
|
207
|
-
setValue(fieldName,
|
|
304
|
+
setValue(fieldName, newValueToSet, {
|
|
208
305
|
shouldValidate: true,
|
|
209
306
|
shouldDirty: true,
|
|
210
307
|
});
|
|
211
|
-
// Actualizar el input hidden
|
|
308
|
+
// Actualizar el input hidden
|
|
212
309
|
if (hiddenInputRef.current) {
|
|
213
|
-
hiddenInputRef.current.value = valueString;
|
|
310
|
+
hiddenInputRef.current.value = multiple ? JSON.stringify(newValuesArray) : valueString;
|
|
214
311
|
}
|
|
215
|
-
// Actualizar displayValue con el label
|
|
216
|
-
setDisplayValue(
|
|
312
|
+
// Actualizar displayValue con el label
|
|
313
|
+
setDisplayValue(newLabelToSet);
|
|
217
314
|
}
|
|
218
315
|
else {
|
|
219
|
-
// Fallback
|
|
316
|
+
// Fallback
|
|
220
317
|
const targetInput = hiddenInputRef.current || inputRef.current;
|
|
221
318
|
if (targetInput) {
|
|
222
319
|
const nativeInput = targetInput;
|
|
223
320
|
const nativeInputValueSetter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
|
|
321
|
+
const stringObjToSet = multiple ? JSON.stringify(newValuesArray) : valueString;
|
|
224
322
|
if (nativeInputValueSetter) {
|
|
225
|
-
nativeInputValueSetter.call(nativeInput,
|
|
323
|
+
nativeInputValueSetter.call(nativeInput, stringObjToSet);
|
|
226
324
|
}
|
|
227
325
|
else {
|
|
228
|
-
nativeInput.value =
|
|
326
|
+
nativeInput.value = stringObjToSet;
|
|
229
327
|
}
|
|
230
|
-
// Disparar eventos
|
|
328
|
+
// Disparar eventos
|
|
231
329
|
if (onChange) {
|
|
232
330
|
const changeEvent = {
|
|
233
331
|
target: nativeInput,
|
|
234
332
|
currentTarget: nativeInput,
|
|
235
|
-
};
|
|
333
|
+
};
|
|
236
334
|
onChange(changeEvent);
|
|
237
335
|
}
|
|
238
336
|
const inputEvent = new Event("input", {
|
|
@@ -246,19 +344,24 @@ const AutocompleteInputInner = React.forwardRef(({ options, value, onChange, onS
|
|
|
246
344
|
});
|
|
247
345
|
nativeInput.dispatchEvent(changeEventNative);
|
|
248
346
|
}
|
|
249
|
-
|
|
250
|
-
setDisplayValue(label);
|
|
347
|
+
setDisplayValue(newLabelToSet);
|
|
251
348
|
}
|
|
252
349
|
}
|
|
253
350
|
else {
|
|
254
351
|
// Modo API personalizada - comportamiento original
|
|
255
|
-
// Pasar el valor devuelto por getOptionValue, no el label
|
|
256
352
|
if (onChange) {
|
|
257
|
-
|
|
353
|
+
if (multiple) {
|
|
354
|
+
onChange(newValuesArray);
|
|
355
|
+
}
|
|
356
|
+
else {
|
|
357
|
+
onChange(valueString);
|
|
358
|
+
}
|
|
258
359
|
}
|
|
259
360
|
}
|
|
260
361
|
onSelectOption?.(option, selectedValue);
|
|
261
|
-
|
|
362
|
+
if (!multiple) {
|
|
363
|
+
setIsOpen(false);
|
|
364
|
+
}
|
|
262
365
|
};
|
|
263
366
|
const handleKeyDown = (event) => {
|
|
264
367
|
if (readOnly)
|
|
@@ -320,20 +423,32 @@ const AutocompleteInputInner = React.forwardRef(({ options, value, onChange, onS
|
|
|
320
423
|
if (value !== undefined) {
|
|
321
424
|
// Si el value es el resultado de getOptionValue, buscar la opción correspondiente
|
|
322
425
|
// y mostrar su label. Si no se encuentra, mostrar el value tal cual.
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
426
|
+
if (multiple) {
|
|
427
|
+
const arrayVals = Array.isArray(value) ? value : [value];
|
|
428
|
+
setDisplayValue(getMultipleDisplayValue(arrayVals));
|
|
326
429
|
}
|
|
327
430
|
else {
|
|
328
|
-
|
|
431
|
+
const matchingOption = options.find((option) => String(valueGetter(option)) === String(value));
|
|
432
|
+
if (matchingOption) {
|
|
433
|
+
setInternalValue(labelGetter(matchingOption));
|
|
434
|
+
}
|
|
435
|
+
else {
|
|
436
|
+
setInternalValue(value);
|
|
437
|
+
}
|
|
329
438
|
}
|
|
330
439
|
}
|
|
331
440
|
else {
|
|
332
441
|
// Resetear el estado interno cuando value es undefined (por ejemplo, después de un reset)
|
|
333
|
-
|
|
442
|
+
if (multiple) {
|
|
443
|
+
setDisplayValue("");
|
|
444
|
+
setInternalValue([]);
|
|
445
|
+
}
|
|
446
|
+
else {
|
|
447
|
+
setInternalValue("");
|
|
448
|
+
}
|
|
334
449
|
}
|
|
335
450
|
}
|
|
336
|
-
}, [value, options, valueGetter, labelGetter, isRegisterMode]);
|
|
451
|
+
}, [value, options, valueGetter, labelGetter, isRegisterMode, multiple, getMultipleDisplayValue]);
|
|
337
452
|
const showDropdown = !readOnly && isOpen && (filteredOptions.length > 0 || noResultsText);
|
|
338
453
|
// Verificar que estamos en el navegador
|
|
339
454
|
// Inicializar isMounted de forma síncrona si es posible
|
|
@@ -373,6 +488,9 @@ const AutocompleteInputInner = React.forwardRef(({ options, value, onChange, onS
|
|
|
373
488
|
// Detectar si hay un valor seleccionado
|
|
374
489
|
// Un valor está seleccionado si el value coincide con el getOptionValue de alguna opción
|
|
375
490
|
const hasSelectedValue = React.useMemo(() => {
|
|
491
|
+
if (multiple) {
|
|
492
|
+
return selectedValuesArray.length > 0;
|
|
493
|
+
}
|
|
376
494
|
if (isRegisterMode) {
|
|
377
495
|
const targetInput = hiddenInputRef.current || inputRef.current;
|
|
378
496
|
if (targetInput) {
|
|
@@ -387,7 +505,7 @@ const AutocompleteInputInner = React.forwardRef(({ options, value, onChange, onS
|
|
|
387
505
|
return false;
|
|
388
506
|
// Verificar si el value coincide con el getOptionValue de alguna opción
|
|
389
507
|
return options.some((option) => String(valueGetter(option)) === String(value));
|
|
390
|
-
}, [value, options, valueGetter, isRegisterMode]);
|
|
508
|
+
}, [value, options, valueGetter, isRegisterMode, multiple, selectedValuesArray]);
|
|
391
509
|
// Función para limpiar el valor
|
|
392
510
|
const handleClear = React.useCallback((event) => {
|
|
393
511
|
if (readOnly)
|
|
@@ -423,11 +541,22 @@ const AutocompleteInputInner = React.forwardRef(({ options, value, onChange, onS
|
|
|
423
541
|
else {
|
|
424
542
|
// Modo API personalizada
|
|
425
543
|
if (value === undefined) {
|
|
426
|
-
|
|
544
|
+
if (multiple) {
|
|
545
|
+
setInternalValue([]);
|
|
546
|
+
}
|
|
547
|
+
else {
|
|
548
|
+
setInternalValue("");
|
|
549
|
+
}
|
|
427
550
|
}
|
|
428
551
|
if (onChange) {
|
|
429
|
-
|
|
552
|
+
if (multiple) {
|
|
553
|
+
onChange([]);
|
|
554
|
+
}
|
|
555
|
+
else {
|
|
556
|
+
onChange("");
|
|
557
|
+
}
|
|
430
558
|
}
|
|
559
|
+
setDisplayValue("");
|
|
431
560
|
}
|
|
432
561
|
setIsOpen(false);
|
|
433
562
|
// Resetear el flag después de un pequeño delay para permitir que otros eventos se procesen
|
|
@@ -471,11 +600,24 @@ const AutocompleteInputInner = React.forwardRef(({ options, value, onChange, onS
|
|
|
471
600
|
const formValue = node.value;
|
|
472
601
|
if (formValue) {
|
|
473
602
|
const matchingOption = options.find((option) => String(valueGetter(option)) === String(formValue));
|
|
474
|
-
if (
|
|
475
|
-
|
|
603
|
+
if (multiple) {
|
|
604
|
+
try {
|
|
605
|
+
const parsed = JSON.parse(formValue);
|
|
606
|
+
if (Array.isArray(parsed)) {
|
|
607
|
+
setDisplayValue(getMultipleDisplayValue(parsed));
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
catch {
|
|
611
|
+
setDisplayValue(getMultipleDisplayValue([formValue]));
|
|
612
|
+
}
|
|
476
613
|
}
|
|
477
614
|
else {
|
|
478
|
-
|
|
615
|
+
if (matchingOption) {
|
|
616
|
+
setDisplayValue(labelGetter(matchingOption));
|
|
617
|
+
}
|
|
618
|
+
else {
|
|
619
|
+
setDisplayValue(formValue);
|
|
620
|
+
}
|
|
479
621
|
}
|
|
480
622
|
}
|
|
481
623
|
}
|
|
@@ -483,7 +625,7 @@ const AutocompleteInputInner = React.forwardRef(({ options, value, onChange, onS
|
|
|
483
625
|
});
|
|
484
626
|
}
|
|
485
627
|
}
|
|
486
|
-
}, [ref, isRegisterMode, options, valueGetter, labelGetter]);
|
|
628
|
+
}, [ref, isRegisterMode, options, valueGetter, labelGetter, multiple, getMultipleDisplayValue]);
|
|
487
629
|
const setVisibleRef = React.useCallback((node) => {
|
|
488
630
|
inputRef.current = node;
|
|
489
631
|
// En modo NO register, pasamos el ref al input visible
|
|
@@ -498,7 +640,7 @@ const AutocompleteInputInner = React.forwardRef(({ options, value, onChange, onS
|
|
|
498
640
|
}, [ref, isRegisterMode]);
|
|
499
641
|
// Separar propiedades para input visible y hidden
|
|
500
642
|
const { name: nameProp, ...visibleInputProps } = inputProps;
|
|
501
|
-
return (_jsxs("div", { ref: containerRef, className: "relative w-full", children: [isRegisterMode && (_jsx("input", { type: "hidden", name: nameProp, ref: setHiddenRef, defaultValue: value })), _jsx(Input, { ...visibleInputProps, name: isRegisterMode ? undefined : nameProp, ref: setVisibleRef, value: inputValue, onChange: handleChange, onFocus: () => {
|
|
643
|
+
return (_jsxs("div", { ref: containerRef, className: "relative w-full", children: [isRegisterMode && (_jsx("input", { type: "hidden", name: nameProp, ref: setHiddenRef, defaultValue: value })), _jsx(Input, { ...visibleInputProps, name: isRegisterMode ? undefined : nameProp, ref: setVisibleRef, value: multiple ? displayValue : inputValue, onChange: handleChange, onFocus: () => {
|
|
502
644
|
if (!readOnly && !justClearedRef.current) {
|
|
503
645
|
setIsOpen(true);
|
|
504
646
|
}
|
|
@@ -517,7 +659,7 @@ const AutocompleteInputInner = React.forwardRef(({ options, value, onChange, onS
|
|
|
517
659
|
top: `${dropdownPosition.top}px`,
|
|
518
660
|
left: `${dropdownPosition.left}px`,
|
|
519
661
|
minWidth: `${dropdownPosition.width}px`,
|
|
520
|
-
}, children: filteredOptions.length > 0 ? (_jsx("ul", { className: "py-1", children: filteredOptions.map((option, index) => {
|
|
662
|
+
}, children: filteredOptions.length > 0 ? (_jsx("ul", { className: "py-1 list-none pl-0 m-0", children: filteredOptions.map((option, index) => {
|
|
521
663
|
const label = labelGetter(option);
|
|
522
664
|
const description = descriptionGetter(option);
|
|
523
665
|
const anyOption = option;
|
|
@@ -527,7 +669,7 @@ const AutocompleteInputInner = React.forwardRef(({ options, value, onChange, onS
|
|
|
527
669
|
: "text-[var(--color-text-primary)] hover:bg-[var(--color-bg-secondary)]"}`, onMouseDown: (event) => {
|
|
528
670
|
event.preventDefault();
|
|
529
671
|
handleSelect(option);
|
|
530
|
-
}, onMouseEnter: () => setHighlightedIndex(index), children: renderOption ? (renderOption(option)) : (_jsxs(_Fragment, { children: [anyOption.icon && (_jsx("i", { className: `${normalizeIconClass(anyOption.icon)} mt-0.5 text-[var(--color-text-muted)] flex-shrink-0` })), _jsxs("div", { className: "flex flex-col min-w-0", children: [_jsx("span", { className: "font-[var(--font-default)] whitespace-nowrap", children: label }), description !== undefined &&
|
|
672
|
+
}, onMouseEnter: () => setHighlightedIndex(index), children: renderOption ? (renderOption(option)) : (_jsxs(_Fragment, { children: [multiple && (_jsx(Checkbox, { readOnly: true, checked: selectedValuesArray.includes(String(valueGetter(option) ?? "")), className: "mr-2 pointer-events-none" })), anyOption.icon && (_jsx("i", { className: `${normalizeIconClass(anyOption.icon)} mt-0.5 text-[var(--color-text-muted)] flex-shrink-0 mr-2` })), _jsxs("div", { className: "flex flex-col min-w-0", children: [_jsx("span", { className: "font-[var(--font-default)] whitespace-nowrap", children: label }), description !== undefined &&
|
|
531
673
|
description !== null && (_jsx("span", { className: "text-xs text-[var(--color-text-secondary)] break-words", children: description }))] })] })) }, String(valueGetter(option) ?? label ?? index)));
|
|
532
674
|
}) })) : (_jsx("div", { className: "px-3 py-2 text-sm text-[var(--color-text-secondary)]", children: noResultsText })) }), bodyElement));
|
|
533
675
|
})()] }));
|
|
@@ -154,7 +154,7 @@ export const Button = ({ variant = "primary", size = "md", color = "primary", bg
|
|
|
154
154
|
if (!icon)
|
|
155
155
|
return null;
|
|
156
156
|
const iconClasses = size === "sm" ? "w-4 h-4" : size === "md" ? "w-5 h-5" : "w-6 h-6";
|
|
157
|
-
return (_jsx("i", { className: `${normalizeIconClass(icon)} ${iconClasses} ${children ? (iconPosition === "right" ? "ml-2" : "mr-2") : ""}
|
|
157
|
+
return (_jsx("i", { className: `${normalizeIconClass(icon)} ${iconClasses} flex items-center justify-center ${children ? (iconPosition === "right" ? "ml-2" : "mr-2") : ""}` }));
|
|
158
158
|
};
|
|
159
159
|
// Determinar el color del ripple basado en el variant y si hay bg personalizado
|
|
160
160
|
const rippleColor = bg
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/form-controls/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/form-controls/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,aAAc,SAAQ,IAAI,CACzC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAC3C,MAAM,GAAG,MAAM,CAChB;IACC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,QAAQ,wFA0IpB,CAAC"}
|
|
@@ -74,6 +74,6 @@ export const Checkbox = React.forwardRef(({ label, labelPosition = "right", erro
|
|
|
74
74
|
return false;
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
|
-
return (_jsxs("div", {
|
|
77
|
+
return (_jsxs("div", { children: [_jsxs("div", { className: containerClasses, children: [_jsx("input", { ref: ref, type: "checkbox", id: checkboxId, className: checkboxClasses, style: checkboxStyle, readOnly: readOnly, onClick: handleClick, onChange: handleChange, ...props }), label && (_jsx("label", { htmlFor: readOnly ? undefined : checkboxId, className: labelClasses, onClick: handleLabelClick, onMouseDown: handleLabelMouseDown, children: label }))] }), error && (_jsx("p", { className: "mt-1 text-sm text-[var(--color-danger)] font-[var(--font-default)]", children: error }))] }));
|
|
78
78
|
});
|
|
79
79
|
Checkbox.displayName = "Checkbox";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchSelectInput.d.ts","sourceRoot":"","sources":["../../../src/components/form-controls/SearchSelectInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAEf,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAK5D,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AACD,MAAM,WAAW,sBAAsB,CACrC,CAAC,GAAG,kBAAkB,EACtB,CAAC,GAAG,MAAM,CACV,SAAQ,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,GAAG,KAAK,CAAC;IACtD,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;IACvB;;;;OAIG;IACH,QAAQ,CAAC,EACL,CAAC,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,GACxB,KAAK,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IAC/C;;OAEG;IACH,iBAAiB,EAAE,CACjB,IAAI,EAAE,MAAM,KACT,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;IAChD;;;;OAIG;IACH,uBAAuB,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IAC9D;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC/C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IACrC;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC;IAChC;;OAEG;IACH,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAChE;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IAC5C;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;
|
|
1
|
+
{"version":3,"file":"SearchSelectInput.d.ts","sourceRoot":"","sources":["../../../src/components/form-controls/SearchSelectInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAEf,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAK5D,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AACD,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K,CAAC,SAAS,CAAC;IAC5C;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAufD,eAAO,MAAM,iBAAiB,EAA6B,CACzD,CAAC,GAAG,kBAAkB,EACtB,CAAC,GAAG,MAAM,EAEV,KAAK,EAAE,sBAAsB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;IACpC,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC;CAC5C,KACE,KAAK,CAAC,YAAY,CAAC"}
|
|
@@ -246,13 +246,13 @@ const SearchSelectInputInner = React.forwardRef(function SearchSelectInput({ val
|
|
|
246
246
|
e.preventDefault();
|
|
247
247
|
handleSearch(dialogInputText);
|
|
248
248
|
}
|
|
249
|
-
} }) }), _jsx("div", { children: _jsx(Loader, { isLoading: isLoading, children: !hasSearched || options.length > 0 ? (_jsx("ul", { className: "space-y-1 max-h-96 overflow-y-auto
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
249
|
+
} }) }), _jsx("div", { children: _jsx(Loader, { isLoading: isLoading, children: !hasSearched || options.length > 0 ? (_jsx("ul", { className: "space-y-1 max-h-96 overflow-y-auto list-none pl-0 m-0", children: options.map((option, index) => {
|
|
250
|
+
const label = labelGetter(option);
|
|
251
|
+
const description = descriptionGetter(option);
|
|
252
|
+
const anyOption = option;
|
|
253
|
+
return (_jsx("li", { className: "px-3 py-2 cursor-pointer rounded-md flex items-start gap-2 text-sm\r\n text-[var(--color-text-primary)] hover:bg-[var(--color-bg-secondary)] transition-colors", onClick: () => handleSelect(option), children: renderOption ? (renderOption(option)) : (_jsxs(_Fragment, { children: [anyOption.icon && (_jsx("i", { className: `${normalizeIconClass(anyOption.icon)} mt-0.5 text-[var(--color-text-muted)]` })), _jsxs("div", { className: "flex flex-col flex-1", children: [_jsx("span", { className: "font-[var(--font-default)]", children: label }), description !== undefined &&
|
|
254
|
+
description !== null && (_jsx("span", { className: "text-xs text-[var(--color-text-secondary)]", children: description }))] })] })) }, String(valueGetter(option) ?? label ?? index)));
|
|
255
|
+
}) })) : (_jsx("div", { className: "px-3 py-8 text-center text-sm text-[var(--color-text-secondary)]", children: noResultsText })) }) })] }));
|
|
256
256
|
};
|
|
257
257
|
// Detectar si hay un valor seleccionado
|
|
258
258
|
const hasValue = inputText !== "" && inputText !== undefined && inputText !== null;
|
|
@@ -42,6 +42,7 @@ export interface AutocompleteFilterProps<T = AutocompleteOption, K = string> ext
|
|
|
42
42
|
getOptionValue?: (item: T) => K;
|
|
43
43
|
renderOption?: (item: T) => React.ReactNode;
|
|
44
44
|
noResultsText?: string;
|
|
45
|
+
multiple?: boolean;
|
|
45
46
|
}
|
|
46
47
|
export interface SearchFilterProps extends BaseFilterProps {
|
|
47
48
|
filterType: "search";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Filter.d.ts","sourceRoot":"","sources":["../../../src/components/layout/Filter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAQ3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAE7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAI5D,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAGD,UAAU,eAAe;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC/C;;;OAG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