-
Notifications
You must be signed in to change notification settings - Fork 1
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
2 changed files
with
43 additions
and
44 deletions.
There are no files selected for viewing
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,60 +1,59 @@ | ||
// Generated by dts-bundle v0.7.3 | ||
|
||
export const DATA_LINK = "data-dependent-data-link"; | ||
export const DATA_PARENT_LISTENER = "data-has-dependent-listener"; | ||
export const DATA_PARENTS = "data-parents"; | ||
export const DATA_SELECT_BOX = "data-dependent-select-box"; | ||
export const EVENT_LOADED = "dependentSelectBoxLoaded"; | ||
export const EVENT_LOADING = "dependentSelectBoxLoading"; | ||
export const DATA_LINK = 'data-dependent-data-link'; | ||
export const DATA_PARENT_LISTENER = 'data-has-dependent-listener'; | ||
export const DATA_PARENTS = 'data-parents'; | ||
export const DATA_SELECT_BOX = 'data-dependent-select-box'; | ||
export const EVENT_LOADED = 'dependentSelectBoxLoaded'; | ||
export const EVENT_LOADING = 'dependentSelectBoxLoading'; | ||
export const SELECT_BOX_SELECTOR: string; | ||
|
||
class DependentSelectBox { | ||
constructor(naja: Naja); | ||
init: () => void; | ||
constructor(naja: Naja); | ||
init: () => void; | ||
} | ||
export default DependentSelectBox; | ||
|
||
class NajaExtension { | ||
constructor(naja: Naja, ...optionalArguments: any); | ||
constructor(naja: Naja, ...optionalArguments: any); | ||
} | ||
|
||
export interface NajaDefaultOptions { | ||
selector: { name: string; query: string }; | ||
selector: { name: string; query: string }; | ||
} | ||
|
||
export interface Naja { | ||
readonly addEventListener: (event: string, callback: Function) => void; | ||
defaultOptions: NajaDefaultOptions; | ||
readonly fireEvent: (event: string, args: any) => void; | ||
formsHandler: { | ||
netteForms: { | ||
readonly validateForm: ( | ||
form: HTMLFormElement, | ||
checkOnly?: boolean, | ||
) => boolean; | ||
}; | ||
}; | ||
readonly initialize: (defaultOptions: NajaDefaultOptions | void) => void; | ||
readonly makeRequest: <T extends Object>( | ||
method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE', | ||
url: string, | ||
data: null | string | number | [] | Object | ArrayBuffer | Blob | FormData, | ||
options: Object | null, | ||
) => Promise<T>; | ||
readonly registerExtension: ( | ||
extension: typeof NajaExtension, | ||
...optionalArguments: any | ||
) => void; | ||
readonly snippetHandler: { | ||
addEventListener: ( | ||
event: string, | ||
callback: (event: { snippet: Node }) => void, | ||
) => any; | ||
}; | ||
readonly uiHandler: { | ||
readonly clickElement: (element: HTMLElement) => void; | ||
selector: string; | ||
readonly submitForm: (form: HTMLFormElement) => void; | ||
readonly addEventListener: (event: string, callback: Function) => void; | ||
defaultOptions: NajaDefaultOptions; | ||
readonly fireEvent: (event: string, args: any) => void; | ||
formsHandler: { | ||
netteForms: { | ||
readonly validateForm: ( | ||
form: HTMLFormElement, | ||
checkOnly?: boolean, | ||
) => boolean; | ||
}; | ||
}; | ||
readonly initialize: (defaultOptions: NajaDefaultOptions | void) => void; | ||
readonly makeRequest: <T extends Object>( | ||
method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE', | ||
url: string, | ||
data: null | string | number | [] | Object | ArrayBuffer | Blob | FormData, | ||
options: Object | null, | ||
) => Promise<T>; | ||
readonly registerExtension: ( | ||
extension: typeof NajaExtension, | ||
...optionalArguments: any | ||
) => void; | ||
readonly snippetHandler: { | ||
addEventListener: ( | ||
event: string, | ||
callback: (event: { snippet: Node }) => void, | ||
) => any; | ||
}; | ||
readonly uiHandler: { | ||
readonly clickElement: (element: HTMLElement) => void; | ||
selector: string; | ||
readonly submitForm: (form: HTMLFormElement) => void; | ||
}; | ||
} | ||
|
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