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 27, 2024
1 parent 63653f0 commit f6b54f7
Show file tree
Hide file tree
Showing 17 changed files with 1,056 additions and 1,266 deletions.
382 changes: 173 additions & 209 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.

382 changes: 173 additions & 209 deletions public/assets/scripts/choices.mjs

Large diffs are not rendered by default.

382 changes: 173 additions & 209 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.

382 changes: 173 additions & 209 deletions public/assets/scripts/choices.search-basic.mjs

Large diffs are not rendered by default.

382 changes: 173 additions & 209 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.

382 changes: 173 additions & 209 deletions public/assets/scripts/choices.search-prefix.mjs

Large diffs are not rendered by default.

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 @@ -5,7 +5,6 @@ export default class List {
constructor({ element }: {
element: HTMLElement;
});
clear(): void;
prepend(node: Element | DocumentFragment): void;
scrollToTop(): void;
scrollToChildElement(element: HTMLElement, direction: 1 | -1): void;
Expand Down
3 changes: 0 additions & 3 deletions public/types/src/scripts/constants.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
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: number;
3 changes: 2 additions & 1 deletion public/types/src/scripts/interfaces/action-type.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Types } from './types';
export declare const ActionType: {
readonly ADD_CHOICE: "ADD_CHOICE";
readonly REMOVE_CHOICE: "REMOVE_CHOICE";
Expand All @@ -9,4 +10,4 @@ export declare const ActionType: {
readonly REMOVE_ITEM: "REMOVE_ITEM";
readonly HIGHLIGHT_ITEM: "HIGHLIGHT_ITEM";
};
export type ActionTypes = (typeof ActionType)[keyof typeof ActionType];
export type ActionTypes = Types.ValueOf<typeof ActionType>;
3 changes: 2 additions & 1 deletion public/types/src/scripts/interfaces/event-type.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Types } from './types';
export declare const EventType: {
readonly showDropdown: "showDropdown";
readonly hideDropdown: "hideDropdown";
Expand All @@ -10,4 +11,4 @@ export declare const EventType: {
readonly highlightChoice: "highlightChoice";
readonly unhighlightItem: "unhighlightItem";
};
export type EventTypes = (typeof EventType)[keyof typeof EventType];
export type EventTypes = Types.ValueOf<typeof EventType>;
2 changes: 1 addition & 1 deletion public/types/src/scripts/interfaces/options.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ export interface Options {
*
* @default 'auto';
*/
renderSelectedChoices: 'auto' | 'always';
renderSelectedChoices: 'auto' | 'always' | boolean;
/**
* The text that is shown whilst choices are being populated via AJAX.
*
Expand Down
8 changes: 7 additions & 1 deletion public/types/src/scripts/interfaces/passed-element-type.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
export type PassedElementType = 'text' | 'select-one' | 'select-multiple';
import { Types } from './types';
export declare const PassedElementTypes: {
readonly Text: "text";
readonly SelectOne: "select-one";
readonly SelectMultiple: "select-multiple";
};
export type PassedElementType = Types.ValueOf<typeof PassedElementTypes>;
3 changes: 2 additions & 1 deletion public/types/src/scripts/interfaces/templates.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ import { StringPreEscaped } from './string-pre-escaped';
import { ChoiceFull } from './choice-full';
import { GroupFull } from './group-full';
import { Options } from './options';
import { Types } from './types';
export type TemplateOptions = Pick<Options, 'classNames' | 'allowHTML' | 'removeItemButtonAlignLeft' | 'removeItemIconText' | 'removeItemLabelText' | 'searchEnabled' | 'labelId'>;
export declare const NoticeTypes: {
readonly noChoices: "no-choices";
readonly noResults: "no-results";
readonly addChoice: "add-choice";
readonly generic: "";
};
export type NoticeType = (typeof NoticeTypes)[keyof typeof NoticeTypes];
export type NoticeType = Types.ValueOf<typeof NoticeTypes>;
export interface Templates {
containerOuter(options: TemplateOptions, dir: HTMLElement['dir'], isSelectElement: boolean, isSelectOneElement: boolean, searchEnabled: boolean, passedElementType: PassedElementType, labelId: string): HTMLDivElement;
containerInner({ classNames: { containerInner } }: TemplateOptions): HTMLDivElement;
Expand Down
1 change: 1 addition & 0 deletions public/types/src/scripts/interfaces/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export declare namespace Types {
value?: StringUntrusted | string;
label?: StringUntrusted | string;
}
type ValueOf<T extends object> = T[keyof T];
}

0 comments on commit f6b54f7

Please sign in to comment.