/** * Dual Multi Select * * This class is the main class for the Dual Multi Select library. * It initializes and manages various modules that handle various responsibilities. * * Additional documentation on the modules can be found in their respective files, however here is an overview of the core modules: * - SkeletonBuilder: Creates the skeleton html of the DualMultiSelect element. * - EventHandler: Handles any click events on the DualMultiSelect element and enacts the necessary changes to the original select element. * - SyncManager: Keeps the DualMultiSelect element in sync with the original select element. */ declare class DualMultiSelect { private readonly selectElement; private readonly options; private skeletonBuilder; private dynamicDataHandler; private syncManager; private eventHandler; private modules; private moduleInitializers; dualMultiSelectElement: HTMLElement; constructor(selectElement: HTMLSelectElement, options?: DualMultiSelectOptions); private validateSelectElement; private initializeCoreModules; /** * Initializes any additional modules that are required to support the provided options. */ private initializeRelevantOptionalModules; /** * Fetches a module by name. * If the module has not been initialized yet, it will be initialized. */ private getModule; /** * Fetches a subset of the options object based on the provided keys. * Will not return any options that are not present in the original options object. */ private getFilteredOptions; setData(data: UniversalOptionData): void; getData(): UniversalOptionData; destroy(): void; } export default DualMultiSelect; declare type DualMultiSelectOptions = { data?: UniversalOptionData; } & Options & Options_2 & Options_3; declare interface OptGroupElementData { label: string; children: OptionElementData[]; } declare interface OptionElementData { text: string; value?: string; selected?: boolean; disabled?: boolean; hidden?: boolean; } declare interface Options { stackLists?: boolean; stickyHeaders?: boolean; } declare interface Options_2 { searchBar?: boolean | SearchFunction; selectableHeader?: HTMLElement | string | null; selectedHeader?: HTMLElement | string | null; } declare interface Options_3 { selectableOptionGroups?: boolean; } declare type SearchFunction = (searchQuery: string, optionData: OptionElementData, optGroupData: OptGroupElementData | null) => boolean; declare type UniversalOptionData = (OptGroupElementData | OptionElementData)[]; export { }