mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
parent
500da47fe5
commit
069ae6d491
55
types/vue2-editor/index.d.ts
vendored
Normal file
55
types/vue2-editor/index.d.ts
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
// Type definitions for vue-tel-input 2.6
|
||||
// Project: https://github.com/davidroyer/vue2-editor/#readme
|
||||
// Definitions by: Komang Suryadana <https://github.com/suryadana>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
import { VueConstructor } from 'vue';
|
||||
import { DirectiveOptions } from 'vue/types/options';
|
||||
|
||||
export default VueEditor;
|
||||
export const VueEditor: VueEditorConstructor;
|
||||
|
||||
export interface VueEditorProps {
|
||||
id: string;
|
||||
placeholder: string;
|
||||
value: string;
|
||||
disabled: boolean;
|
||||
editorToolbar: any[];
|
||||
editorOptions: any;
|
||||
useCustomImageHandler: any;
|
||||
useMarkdownShortcuts: boolean;
|
||||
}
|
||||
|
||||
export interface VueEditorData {
|
||||
quill: any;
|
||||
}
|
||||
|
||||
export interface VueEditorWatch {
|
||||
value: (val: any) => void;
|
||||
disabled: (status: boolean) => void;
|
||||
}
|
||||
|
||||
export interface VueEditorMethods {
|
||||
initializeEditor: () => void;
|
||||
setupQuillEditor: () => void;
|
||||
setModules: () => void;
|
||||
prepareEditorConfig: (editorConfig: any) => void;
|
||||
registerPrototypes: () => void;
|
||||
registerEditorEventListeners: () => void;
|
||||
listenForEditorEvent: (type: any) => void;
|
||||
handleInitialContent: () => void;
|
||||
handleSelectionChange: (range: any, oldRange: any) => void;
|
||||
handleTextChange: () => void;
|
||||
checkForCustomImageHandler: () => void;
|
||||
setupCustomImageHandler: () => void;
|
||||
customImageHandler: (image: any, callback: any) => void;
|
||||
emitImageInfo: ($event: Event) => void;
|
||||
}
|
||||
|
||||
export interface VueEditorConstructor extends VueConstructor {
|
||||
props: VueEditorProps;
|
||||
data: () => VueEditorData;
|
||||
watch: VueEditorWatch;
|
||||
methods: VueEditorMethods;
|
||||
}
|
||||
6
types/vue2-editor/package.json
Normal file
6
types/vue2-editor/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"vue": ">=2.0.0"
|
||||
}
|
||||
}
|
||||
24
types/vue2-editor/tsconfig.json
Normal file
24
types/vue2-editor/tsconfig.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"vue2-editor-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/vue2-editor/tslint.json
Normal file
1
types/vue2-editor/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
37
types/vue2-editor/vue2-editor-tests.ts
Normal file
37
types/vue2-editor/vue2-editor-tests.ts
Normal file
@ -0,0 +1,37 @@
|
||||
import Vue from 'vue';
|
||||
import { VueEditor } from 'vue2-editor';
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
phone: "",
|
||||
bindProps: {
|
||||
defaultCountry: "",
|
||||
disabledFetchingCountry: false,
|
||||
disabled: false,
|
||||
disabledFormatting: false,
|
||||
placeholder: "Enter a phone number",
|
||||
required: false,
|
||||
enabledCountryCode: false,
|
||||
enabledFlags: true,
|
||||
preferredCountries: ["AU", "BR"],
|
||||
onlyCountries: [],
|
||||
ignoredCountries: [],
|
||||
autocomplete: "off",
|
||||
name: "telephone",
|
||||
maxLen: 25,
|
||||
wrapperClasses: "",
|
||||
inputClasses: "",
|
||||
dropdownOptions: {
|
||||
disabledDialCode: false
|
||||
},
|
||||
inputOptions: {
|
||||
showDialCode: false
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
VueEditor,
|
||||
},
|
||||
template: `<vue-editor v-model="content"></vue-editor>`
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user