Skip to content

Commit

Permalink
Compile js files
Browse files Browse the repository at this point in the history
  • Loading branch information
Xon committed Aug 16, 2024
1 parent 7252844 commit 1e9d0db
Show file tree
Hide file tree
Showing 19 changed files with 2,537 additions and 3,020 deletions.
672 changes: 333 additions & 339 deletions public/assets/scripts/choices.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/assets/scripts/choices.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/assets/scripts/choices.min.mjs

Large diffs are not rendered by default.

963 changes: 434 additions & 529 deletions public/assets/scripts/choices.mjs

Large diffs are not rendered by default.

963 changes: 434 additions & 529 deletions public/assets/scripts/choices.search-basic.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/assets/scripts/choices.search-basic.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/assets/scripts/choices.search-basic.min.mjs

Large diffs are not rendered by default.

963 changes: 434 additions & 529 deletions public/assets/scripts/choices.search-basic.mjs

Large diffs are not rendered by default.

974 changes: 437 additions & 537 deletions public/assets/scripts/choices.search-prefix.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/assets/scripts/choices.search-prefix.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/assets/scripts/choices.search-prefix.min.mjs

Large diffs are not rendered by default.

974 changes: 437 additions & 537 deletions public/assets/scripts/choices.search-prefix.mjs

Large diffs are not rendered by default.

22 changes: 15 additions & 7 deletions public/types/src/scripts/choices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ import { ChoiceFull } from './interfaces/choice-full';
import { GroupFull } from './interfaces/group-full';
import { PassedElementType } from './interfaces';
import { EventChoice } from './interfaces/event-choice';
import { Templates } from './interfaces/templates';
import { NoticeType, Templates } from './interfaces/templates';
import { Searcher } from './interfaces/search';
import { StringUntrusted } from './interfaces/string-untrusted';
import { StringPreEscaped } from './interfaces/string-pre-escaped';
/**
* Choices
* @author Josh Johnson<[email protected]>
Expand Down Expand Up @@ -58,6 +60,10 @@ declare class Choices {
_presetChoices: (ChoiceFull | GroupFull)[];
_initialItems: string[];
_searcher: Searcher<ChoiceFull>;
_notice?: {
type: NoticeType;
text: StringUntrusted | StringPreEscaped | string;
};
constructor(element?: string | Element | HTMLInputElement | HTMLSelectElement, userConfig?: Partial<Options>);
init(): void;
destroy(): void;
Expand Down Expand Up @@ -151,26 +157,28 @@ declare class Choices {
_createGroupsFragment(groups: GroupFull[], choices: ChoiceFull[], fragment?: DocumentFragment): DocumentFragment;
_createChoicesFragment(choices: ChoiceFull[], fragment?: DocumentFragment, withinGroup?: boolean): DocumentFragment;
_createItemsFragment(items: InputChoice[], fragment?: DocumentFragment): DocumentFragment;
_displayNotice(text: StringUntrusted | StringPreEscaped | string, type: NoticeType, openDropdown?: boolean): void;
_clearNotice(): void;
_renderNotice(): void;
_getChoiceForOutput(choice?: ChoiceFull, keyCode?: number): EventChoice | undefined;
_triggerChange(value: any): void;
_handleButtonAction(items: ChoiceFull[], element?: HTMLElement): void;
_handleItemAction(items: InputChoice[], element?: HTMLElement, hasShiftKey?: boolean): void;
_handleChoiceAction(items: ChoiceFull[], element?: HTMLElement): boolean;
_handleButtonAction(element?: HTMLElement): void;
_handleItemAction(element?: HTMLElement, hasShiftKey?: boolean): void;
_handleChoiceAction(element?: HTMLElement): boolean;
_handleBackspace(items: ChoiceFull[]): void;
_loadChoices(): void;
_handleLoadingState(setLoading?: boolean): void;
_handleSearch(value?: string): void;
_canAddItem(items: InputChoice[], value: string): Notice;
_canAddItem(value: string): Notice;
_searchChoices(value: string): number | null;
_stopSearch(): void;
_addEventListeners(): void;
_removeEventListeners(): void;
_onKeyDown(event: KeyboardEvent): void;
_onKeyUp(): void;
_onInput(): void;
_displayAddItemNotice(canAddItem: Notice): void;
_onSelectKey(event: KeyboardEvent, hasItems: boolean): void;
_onEnterKey(event: KeyboardEvent, items: ChoiceFull[], hasActiveDropdown: boolean): void;
_onEnterKey(event: KeyboardEvent, hasActiveDropdown: boolean): void;
_onEscapeKey(event: KeyboardEvent, hasActiveDropdown: boolean): void;
_onDirectionKey(event: KeyboardEvent, hasActiveDropdown: boolean): void;
_onDeleteKey(event: KeyboardEvent, items: ChoiceFull[], hasFocusedInput: boolean): void;
Expand Down
1 change: 0 additions & 1 deletion public/types/src/scripts/components/container.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export default class Container {
removeActiveDescendant(): void;
open(dropdownPos: number): void;
close(): void;
focus(): void;
addFocusState(): void;
removeFocusState(): void;
enable(): void;
Expand Down
1 change: 0 additions & 1 deletion public/types/src/scripts/components/list.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export default class List {
clear(): void;
prepend(node: Element | DocumentFragment): void;
append(node: Element | DocumentFragment): void;
hasChildren(): boolean;
scrollToTop(): void;
scrollToChildElement(element: HTMLElement, direction: 1 | -1): void;
_scrollDown(scrollPos: number, strength: number, destination: number): void;
Expand Down
2 changes: 1 addition & 1 deletion public/types/src/scripts/constants.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export declare const TEXT_TYPE: HTMLInputElement['type'];
export declare const SELECT_ONE_TYPE: HTMLSelectElement['type'];
export declare const SELECT_MULTIPLE_TYPE: HTMLSelectElement['type'];
export declare const SCROLLING_SPEED: 4;
export declare const SCROLLING_SPEED: number;
4 changes: 3 additions & 1 deletion public/types/src/scripts/interfaces/class-names.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ export interface ClassNames {
flippedState: string | Array<string>;
/** @default ['is-loading'] */
loadingState: string | Array<string>;
/** @default ['choices__item', 'choices__item--selectable', 'add-choice'] */
/** @default ['choices__notice'] */
notice: string | Array<string>;
/** @default ['choices__item--selectable', 'add-choice'] */
addChoice: string | Array<string>;
/** @default ['has-no-results'] */
noResults: string | Array<string>;
Expand Down
2 changes: 1 addition & 1 deletion public/types/src/scripts/lib/choice-input.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import { InputGroup } from '../interfaces/input-group';
import { GroupFull } from '../interfaces/group-full';
import { ChoiceFull } from '../interfaces/choice-full';
type MappedInputTypeToChoiceType<T extends string | InputChoice | InputGroup> = T extends InputGroup ? GroupFull : ChoiceFull;
export declare const stringToHtmlClass: (input: any) => string[] | undefined;
export declare const stringToHtmlClass: (input: string | string[] | undefined) => string[] | undefined;
export declare const mapInputToChoice: <T extends string | InputChoice | InputGroup>(value: T, allowGroup: boolean) => MappedInputTypeToChoiceType<T>;
export {};
4 changes: 2 additions & 2 deletions public/types/src/scripts/store/store.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { StateChangeSet, State } from '../interfaces/state';
import { ChoiceFull } from '../interfaces/choice-full';
import { GroupFull } from '../interfaces/group-full';
export default class Store implements IStore {
_store: State;
_state: State;
_listeners: StoreListener[];
_txn: number;
_outstandingChanges?: StateChangeSet;
_changeSet?: StateChangeSet;
get defaultState(): State;
changeSet(init: boolean): StateChangeSet;
reset(): void;
Expand Down

0 comments on commit 1e9d0db

Please sign in to comment.