-
-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
156 changed files
with
14,718 additions
and
34,688 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
.DS_Store | ||
.idea | ||
node_modules | ||
coverage | ||
|
||
# local env files | ||
.env.local | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v18.12.1 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"printWidth": 120 | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"recommendations": ["Vue.volar", "orta.vscode-jest"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,17 @@ | ||
{ | ||
"editor.formatOnSave": false, | ||
"extensions.ignoreRecommendations": false, | ||
"editor.detectIndentation": false, | ||
"editor.formatOnSave": true, | ||
"editor.insertSpaces": true, | ||
"editor.tabSize": 2, | ||
"tslint.autoFixOnSave": true | ||
} | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"[javascript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": true, | ||
"source.organizeImports": false, | ||
"source.sortMembers": true | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
export declare function generateID(): string; | ||
export declare function hasClassInTree(element: HTMLElement, className: string): any; | ||
export declare function ensureElementInView(container: HTMLElement, element: HTMLElement): void; | ||
export declare function putContent(el: HTMLElement, currentPosition: string, isOpen: boolean): string; | ||
export declare function debounce(func: (...params: any[]) => void, wait?: number, immediate?: boolean): () => void; | ||
export declare function isValueInArrayOfObjects(selected: any, key: string, value: string): boolean; | ||
export declare function highlight(str: string, search: any, className: string): any; | ||
export declare function kebabCase(str: string): string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,51 @@ | ||
import { Config } from './config'; | ||
import { Select } from './select'; | ||
import { Slim } from './slim'; | ||
import { Data, dataArray, Option } from './data'; | ||
interface Constructor { | ||
import Render from './render'; | ||
import Select from './select'; | ||
import Settings, { SettingsPartial } from './settings'; | ||
import Store, { DataArray, DataArrayPartial, Option, OptionOptional } from './store'; | ||
export * from './helper'; | ||
export * from './settings'; | ||
export * from './select'; | ||
export * from './store'; | ||
export * from './render'; | ||
export { Settings, Select, Store, Render }; | ||
export interface Config { | ||
select: string | Element; | ||
data?: dataArray; | ||
showSearch?: boolean; | ||
searchPlaceholder?: string; | ||
searchText?: string; | ||
searchingText?: string; | ||
searchFocus?: boolean; | ||
searchHighlight?: boolean; | ||
searchFilter?: (opt: Option, search: string) => boolean; | ||
closeOnSelect?: boolean; | ||
showContent?: string; | ||
placeholder?: string; | ||
allowDeselect?: boolean; | ||
allowDeselectOption?: boolean; | ||
hideSelectedOption?: boolean; | ||
deselectLabel?: string; | ||
isEnabled?: boolean; | ||
valuesUseText?: boolean; | ||
showOptionTooltips?: boolean; | ||
selectByGroup?: boolean; | ||
limit?: number; | ||
timeoutDelay?: number; | ||
addToBody?: boolean; | ||
ajax?: (value: string, func: (info: any) => void) => void; | ||
addable?: (value: string) => Option | string; | ||
beforeOnChange?: (info: Option | Option[]) => void | boolean; | ||
onChange?: (info: Option | Option[]) => void; | ||
data?: DataArrayPartial; | ||
settings?: SettingsPartial; | ||
events?: Events; | ||
} | ||
export interface Events { | ||
search?: (searchValue: string, currentData: DataArray) => Promise<DataArrayPartial> | DataArrayPartial; | ||
searchFilter?: (option: Option, search: string) => boolean; | ||
addable?: (value: string) => OptionOptional | string; | ||
beforeChange?: (newVal: Option[], oldVal: Option[]) => boolean | void; | ||
afterChange?: (newVal: Option[]) => void; | ||
beforeOpen?: () => void; | ||
afterOpen?: () => void; | ||
beforeClose?: () => void; | ||
afterClose?: () => void; | ||
error?: (err: Error) => void; | ||
} | ||
export default class SlimSelect { | ||
config: Config; | ||
selectEl: HTMLSelectElement; | ||
settings: Settings; | ||
select: Select; | ||
data: Data; | ||
slim: Slim; | ||
ajax: ((value: string, func: (info: any) => void) => void) | null; | ||
addable: ((value: string) => Option | string) | null; | ||
beforeOnChange: ((info: Option) => void | boolean) | null; | ||
onChange: ((info: Option) => void) | null; | ||
beforeOpen: (() => void) | null; | ||
afterOpen: (() => void) | null; | ||
beforeClose: (() => void) | null; | ||
afterClose: (() => void) | null; | ||
private windowScroll; | ||
constructor(info: Constructor); | ||
validate(info: Constructor): HTMLSelectElement; | ||
selected(): string | string[]; | ||
set(value: string | string[], type?: string, close?: boolean, render?: boolean): void; | ||
setSelected(value: string | string[], type?: string, close?: boolean, render?: boolean): void; | ||
setData(data: dataArray): void; | ||
addData(data: Option): void; | ||
open(): void; | ||
close(): void; | ||
moveContentAbove(): void; | ||
moveContentBelow(): void; | ||
store: Store; | ||
render: Render; | ||
events: Events; | ||
constructor(config: Config); | ||
enable(): void; | ||
disable(): void; | ||
getData(): DataArray; | ||
setData(data: DataArrayPartial): void; | ||
getSelected(): string[]; | ||
setSelected(value: string | string[]): void; | ||
addOption(option: OptionOptional): void; | ||
open(): void; | ||
close(): void; | ||
search(value: string): void; | ||
setSearchText(text: string): void; | ||
render(): void; | ||
destroy(id?: string | null): void; | ||
destroy(): void; | ||
private windowResize; | ||
private windowScroll; | ||
private documentClick; | ||
} | ||
export {}; |
Oops, something went wrong.