Skip to content

Commit f6b54f7

Browse files
committed
Compile JS files
1 parent 63653f0 commit f6b54f7

17 files changed

+1056
-1266
lines changed

public/assets/scripts/choices.js

Lines changed: 173 additions & 209 deletions
Large diffs are not rendered by default.

public/assets/scripts/choices.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/assets/scripts/choices.mjs

Lines changed: 173 additions & 209 deletions
Large diffs are not rendered by default.

public/assets/scripts/choices.search-basic.js

Lines changed: 173 additions & 209 deletions
Large diffs are not rendered by default.

public/assets/scripts/choices.search-basic.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/assets/scripts/choices.search-basic.mjs

Lines changed: 173 additions & 209 deletions
Large diffs are not rendered by default.

public/assets/scripts/choices.search-prefix.js

Lines changed: 173 additions & 209 deletions
Large diffs are not rendered by default.

public/assets/scripts/choices.search-prefix.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/assets/scripts/choices.search-prefix.mjs

Lines changed: 173 additions & 209 deletions
Large diffs are not rendered by default.

public/types/src/scripts/components/list.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ export default class List {
55
constructor({ element }: {
66
element: HTMLElement;
77
});
8-
clear(): void;
98
prepend(node: Element | DocumentFragment): void;
109
scrollToTop(): void;
1110
scrollToChildElement(element: HTMLElement, direction: 1 | -1): void;
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
export declare const TEXT_TYPE: HTMLInputElement['type'];
2-
export declare const SELECT_ONE_TYPE: HTMLSelectElement['type'];
3-
export declare const SELECT_MULTIPLE_TYPE: HTMLSelectElement['type'];
41
export declare const SCROLLING_SPEED: number;

public/types/src/scripts/interfaces/action-type.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Types } from './types';
12
export declare const ActionType: {
23
readonly ADD_CHOICE: "ADD_CHOICE";
34
readonly REMOVE_CHOICE: "REMOVE_CHOICE";
@@ -9,4 +10,4 @@ export declare const ActionType: {
910
readonly REMOVE_ITEM: "REMOVE_ITEM";
1011
readonly HIGHLIGHT_ITEM: "HIGHLIGHT_ITEM";
1112
};
12-
export type ActionTypes = (typeof ActionType)[keyof typeof ActionType];
13+
export type ActionTypes = Types.ValueOf<typeof ActionType>;

public/types/src/scripts/interfaces/event-type.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Types } from './types';
12
export declare const EventType: {
23
readonly showDropdown: "showDropdown";
34
readonly hideDropdown: "hideDropdown";
@@ -10,4 +11,4 @@ export declare const EventType: {
1011
readonly highlightChoice: "highlightChoice";
1112
readonly unhighlightItem: "unhighlightItem";
1213
};
13-
export type EventTypes = (typeof EventType)[keyof typeof EventType];
14+
export type EventTypes = Types.ValueOf<typeof EventType>;

public/types/src/scripts/interfaces/options.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ export interface Options {
429429
*
430430
* @default 'auto';
431431
*/
432-
renderSelectedChoices: 'auto' | 'always';
432+
renderSelectedChoices: 'auto' | 'always' | boolean;
433433
/**
434434
* The text that is shown whilst choices are being populated via AJAX.
435435
*
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
export type PassedElementType = 'text' | 'select-one' | 'select-multiple';
1+
import { Types } from './types';
2+
export declare const PassedElementTypes: {
3+
readonly Text: "text";
4+
readonly SelectOne: "select-one";
5+
readonly SelectMultiple: "select-multiple";
6+
};
7+
export type PassedElementType = Types.ValueOf<typeof PassedElementTypes>;

public/types/src/scripts/interfaces/templates.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ import { StringPreEscaped } from './string-pre-escaped';
33
import { ChoiceFull } from './choice-full';
44
import { GroupFull } from './group-full';
55
import { Options } from './options';
6+
import { Types } from './types';
67
export type TemplateOptions = Pick<Options, 'classNames' | 'allowHTML' | 'removeItemButtonAlignLeft' | 'removeItemIconText' | 'removeItemLabelText' | 'searchEnabled' | 'labelId'>;
78
export declare const NoticeTypes: {
89
readonly noChoices: "no-choices";
910
readonly noResults: "no-results";
1011
readonly addChoice: "add-choice";
1112
readonly generic: "";
1213
};
13-
export type NoticeType = (typeof NoticeTypes)[keyof typeof NoticeTypes];
14+
export type NoticeType = Types.ValueOf<typeof NoticeTypes>;
1415
export interface Templates {
1516
containerOuter(options: TemplateOptions, dir: HTMLElement['dir'], isSelectElement: boolean, isSelectOneElement: boolean, searchEnabled: boolean, passedElementType: PassedElementType, labelId: string): HTMLDivElement;
1617
containerInner({ classNames: { containerInner } }: TemplateOptions): HTMLDivElement;

public/types/src/scripts/interfaces/types.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ export declare namespace Types {
1212
value?: StringUntrusted | string;
1313
label?: StringUntrusted | string;
1414
}
15+
type ValueOf<T extends object> = T[keyof T];
1516
}

0 commit comments

Comments
 (0)