- ✅ Ticket 1.1: Estructura Clean Architecture en backend - ✅ Ticket 1.2: Schemas Zod compartidos - ✅ Ticket 1.3: Refactorización drugs.ts (1362 → 8 archivos modulares) - ✅ Ticket 1.4: Refactorización procedures.ts (3583 → 6 archivos modulares) - ✅ Ticket 1.5: Eliminación de duplicidades (~50 líneas) Cambios principales: - Creada estructura Clean Architecture en backend/src/ - Schemas Zod compartidos en backend/src/shared/schemas/ - Refactorización modular de drugs y procedures - Utilidades genéricas en src/utils/ (filter, validation) - Eliminados scripts obsoletos y documentación antigua - Corregidos errores: QueryClient, import test-error-handling - Build verificado y funcionando correctamente
230 lines
5.6 KiB
TypeScript
230 lines
5.6 KiB
TypeScript
import HTMLElement from '../html-element/HTMLElement.js';
|
|
import * as PropertySymbol from '../../PropertySymbol.js';
|
|
import HTMLFormElement from '../html-form-element/HTMLFormElement.js';
|
|
import ValidityState from '../../validity-state/ValidityState.js';
|
|
import HTMLLabelElement from '../html-label-element/HTMLLabelElement.js';
|
|
import HTMLOptionElement from '../html-option-element/HTMLOptionElement.js';
|
|
import HTMLOptionsCollection from './HTMLOptionsCollection.js';
|
|
import Event from '../../event/Event.js';
|
|
import HTMLCollection from '../element/HTMLCollection.js';
|
|
import NodeList from '../node/NodeList.js';
|
|
import BrowserWindow from '../../window/BrowserWindow.js';
|
|
/**
|
|
* HTML Select Element.
|
|
*
|
|
* Reference:
|
|
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement.
|
|
*/
|
|
export default class HTMLSelectElement extends HTMLElement {
|
|
#private;
|
|
[index: number]: HTMLOptionElement | undefined;
|
|
protected [PropertySymbol.window]: BrowserWindow;
|
|
[PropertySymbol.validationMessage]: string;
|
|
[PropertySymbol.validity]: ValidityState;
|
|
[PropertySymbol.options]: HTMLOptionsCollection | null;
|
|
[PropertySymbol.selectedOptions]: HTMLCollection<HTMLOptionElement> | null;
|
|
[PropertySymbol.selectedIndex]: number;
|
|
[PropertySymbol.proxy]: HTMLSelectElement;
|
|
/**
|
|
* Constructor.
|
|
*/
|
|
constructor();
|
|
get onchange(): ((event: Event) => void) | null;
|
|
set onchange(value: ((event: Event) => void) | null);
|
|
get oninput(): ((event: Event) => void) | null;
|
|
set oninput(value: ((event: Event) => void) | null);
|
|
/**
|
|
* Returns length.
|
|
*
|
|
* @returns Length.
|
|
*/
|
|
get length(): number;
|
|
/**
|
|
* Returns options.
|
|
*
|
|
* @returns Options.
|
|
*/
|
|
get options(): HTMLOptionsCollection;
|
|
/**
|
|
* Returns validation message.
|
|
*
|
|
* @returns Validation message.
|
|
*/
|
|
get validationMessage(): string;
|
|
/**
|
|
* Returns validity.
|
|
*
|
|
* @returns Validity.
|
|
*/
|
|
get validity(): ValidityState;
|
|
/**
|
|
* Returns name.
|
|
*
|
|
* @returns Name.
|
|
*/
|
|
get name(): string;
|
|
/**
|
|
* Sets name.
|
|
*
|
|
* @param name Name.
|
|
*/
|
|
set name(name: string);
|
|
/**
|
|
* Returns disabled.
|
|
*
|
|
* @returns Disabled.
|
|
*/
|
|
get disabled(): boolean;
|
|
/**
|
|
* Sets disabled.
|
|
*
|
|
* @param disabled Disabled.
|
|
*/
|
|
set disabled(disabled: boolean);
|
|
/**
|
|
* Returns multiple.
|
|
*
|
|
* @returns Multiple.
|
|
*/
|
|
get multiple(): boolean;
|
|
/**
|
|
* Sets multiple.
|
|
*
|
|
* @param multiple Multiple.
|
|
*/
|
|
set multiple(multiple: boolean);
|
|
/**
|
|
* Returns autofocus.
|
|
*
|
|
* @returns Autofocus.
|
|
*/
|
|
get autofocus(): boolean;
|
|
/**
|
|
* Sets autofocus.
|
|
*
|
|
* @param autofocus Autofocus.
|
|
*/
|
|
set autofocus(autofocus: boolean);
|
|
/**
|
|
* Returns required.
|
|
*
|
|
* @returns Required.
|
|
*/
|
|
get required(): boolean;
|
|
/**
|
|
* Sets required.
|
|
*
|
|
* @param required Required.
|
|
*/
|
|
set required(required: boolean);
|
|
/**
|
|
* Returns type.
|
|
*
|
|
* @returns type.
|
|
*/
|
|
get type(): string;
|
|
/**
|
|
* Returns value.
|
|
*
|
|
* @returns Value.
|
|
*/
|
|
get value(): string;
|
|
/**
|
|
* Sets value.
|
|
*
|
|
* @param value Value.
|
|
*/
|
|
set value(value: string);
|
|
/**
|
|
* Returns value.
|
|
*
|
|
* @returns Value.
|
|
*/
|
|
get selectedIndex(): number;
|
|
/**
|
|
* Sets value.
|
|
*
|
|
* @param selectedIndex Selected index.
|
|
*/
|
|
set selectedIndex(selectedIndex: number);
|
|
/**
|
|
* Returns selected options.
|
|
*
|
|
* @returns HTMLCollection.
|
|
*/
|
|
get selectedOptions(): HTMLCollection<HTMLOptionElement>;
|
|
/**
|
|
* Returns the associated label elements.
|
|
*
|
|
* @returns Label elements.
|
|
*/
|
|
get labels(): NodeList<HTMLLabelElement>;
|
|
/**
|
|
* Returns the parent form element.
|
|
*
|
|
* @returns Form.
|
|
*/
|
|
get form(): HTMLFormElement | null;
|
|
/**
|
|
* Returns "true" if it will validate.
|
|
*
|
|
* @returns "true" if it will validate.
|
|
*/
|
|
get willValidate(): boolean;
|
|
/**
|
|
* @override
|
|
*/
|
|
get tabIndex(): number;
|
|
/**
|
|
* @override
|
|
*/
|
|
set tabIndex(tabIndex: number);
|
|
/**
|
|
* Returns item from options collection by index.
|
|
*
|
|
* @param index Index.
|
|
*/
|
|
item(index: number): HTMLOptionElement | null;
|
|
/**
|
|
* Adds new option to options collection.
|
|
*
|
|
* @param element HTMLOptionElement to add.
|
|
* @param before HTMLOptionElement or index number.
|
|
*/
|
|
add(element: HTMLOptionElement, before?: number | HTMLOptionElement): void;
|
|
/**
|
|
* Removes indexed element from collection or the select element.
|
|
*
|
|
* @param [index] Index.
|
|
*/
|
|
remove(index?: number): void;
|
|
/**
|
|
* Sets validation message.
|
|
*
|
|
* @param message Message.
|
|
*/
|
|
setCustomValidity(message: string): void;
|
|
/**
|
|
* Checks validity.
|
|
*
|
|
* @returns "true" if the field is valid.
|
|
*/
|
|
checkValidity(): boolean;
|
|
/**
|
|
* Reports validity.
|
|
*
|
|
* @returns "true" if the field is valid.
|
|
*/
|
|
reportValidity(): boolean;
|
|
/**
|
|
* Updates option item.
|
|
*
|
|
* Based on:
|
|
* https://github.com/jsdom/jsdom/blob/master/lib/jsdom/living/nodes/HTMLSelectElement-impl.js
|
|
*
|
|
* @see https://html.spec.whatwg.org/multipage/form-elements.html#selectedness-setting-algorithm
|
|
* @param [selectedOption] Selected option.
|
|
*/
|
|
[PropertySymbol.updateSelectedness](selectedOption?: HTMLOptionElement | null): void;
|
|
}
|
|
//# sourceMappingURL=HTMLSelectElement.d.ts.map
|