mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
[jstree] added missing settings, lint fixes (#38161)
This commit is contained in:
committed by
Andrew Casey
parent
c08e6d8f68
commit
37ff22c40d
2523
types/jstree/index.d.ts
vendored
2523
types/jstree/index.d.ts
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,16 +1,16 @@
|
||||
// gets version of lib
|
||||
var version: string = $.jstree.version;
|
||||
let version: string = $.jstree.version;
|
||||
|
||||
// create new instance
|
||||
var instance1: JSTree = $('div').jstree();
|
||||
let instance1: JSTree = $('div').jstree();
|
||||
|
||||
$('div').jstree('open_node', '#branch');
|
||||
|
||||
// get existing reference
|
||||
var existingReference: JSTree = $.jstree.reference('sds');
|
||||
let existingReference: JSTree = $.jstree.reference('sds');
|
||||
|
||||
// advanced tree creation
|
||||
var advancedTree = $("#briefcasetree").jstree({
|
||||
let advancedTree = $("#briefcasetree").jstree({
|
||||
plugins: ['contextmenu', 'dnd', 'state', 'types', 'unique'],
|
||||
core: {
|
||||
check_callback: true,
|
||||
@@ -65,29 +65,29 @@ var advancedTree = $("#briefcasetree").jstree({
|
||||
}
|
||||
});
|
||||
|
||||
var a = $('a').jstree();
|
||||
let a = $('a').jstree();
|
||||
|
||||
// test search node
|
||||
a.search('test', false, true);
|
||||
|
||||
//test redraw node
|
||||
// test redraw node
|
||||
a.redraw_node($('#node1'), false, false, false);
|
||||
|
||||
//test clear buffer
|
||||
// test clear buffer
|
||||
a.clear_buffer();
|
||||
|
||||
//tree with new unique plugin parameters
|
||||
var treeWithUnique = $('#treeWithUnique').jstree({
|
||||
// tree with new unique plugin parameters
|
||||
let treeWithUnique = $('#treeWithUnique').jstree({
|
||||
unique: {
|
||||
case_sensitive: true,
|
||||
duplicate: (name: string, counter: number): string => {
|
||||
return name + ' ( ' + counter.toString() + ' )';
|
||||
return `${name} ( ${counter.toString()} )`;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// tree with new core properties
|
||||
var treeWithNewCoreProperties = $('#treeWithNewCoreProperties').jstree({
|
||||
let treeWithNewCoreProperties = $('#treeWithNewCoreProperties').jstree({
|
||||
core: {
|
||||
worker: true,
|
||||
force_text: true,
|
||||
@@ -95,15 +95,14 @@ var treeWithNewCoreProperties = $('#treeWithNewCoreProperties').jstree({
|
||||
});
|
||||
|
||||
// tree with new checkbox properties
|
||||
var treeWithNewCheckboxProperties = $('#treeWithNewCheckboxProperties').jstree({
|
||||
let treeWithNewCheckboxProperties = $('#treeWithNewCheckboxProperties').jstree({
|
||||
checkbox: {
|
||||
cascade: '',
|
||||
tie_selection: true
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
var tree = $('a').jstree();
|
||||
let tree = $('a').jstree();
|
||||
tree.move_node('a', 'b', 0, (node: any, new_par: any, pos: any) => { }, true, true);
|
||||
tree.copy_node('a', 'b', 0, (node: any, new_par: any, pos: any) => { }, true, true);
|
||||
|
||||
@@ -111,22 +110,21 @@ tree.copy_node('a', 'b', 0, (node: any, new_par: any, pos: any) => { }, true, tr
|
||||
tree.get_path('nodeId');
|
||||
tree.get_path('nodeId', '/');
|
||||
tree.get_path('nodeId', '/', true);
|
||||
tree.settings.core.data = [];
|
||||
|
||||
|
||||
|
||||
var coreThemes: JSTreeStaticDefaultsCoreThemes = {
|
||||
ellipsis:true
|
||||
let coreThemes: JSTreeStaticDefaultsCoreThemes = {
|
||||
ellipsis: true
|
||||
};
|
||||
|
||||
// tree with new theme elipsis
|
||||
var treeWithNewCoreProperties = $('#treeWithNewEllipsisProperties').jstree({
|
||||
let treeWithNewEllipsisProperties = $('#treeWithNewEllipsisProperties').jstree({
|
||||
core: {
|
||||
themes: coreThemes
|
||||
}
|
||||
});
|
||||
|
||||
var vakata: VakataStatic = $.vakata;
|
||||
let vakata: VakataStatic = $.vakata;
|
||||
|
||||
var testArray: Array<any> = [];
|
||||
let testArray: any[] = [];
|
||||
vakata.attributes(tree.get_node(null), true);
|
||||
var storage = vakata.storage;
|
||||
let storage = vakata.storage;
|
||||
|
||||
@@ -1,80 +1,7 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
"adjacent-overload-signatures": false,
|
||||
"array-type": false,
|
||||
"arrow-return-shorthand": false,
|
||||
"ban-types": false,
|
||||
"callable-types": false,
|
||||
"comment-format": false,
|
||||
"dt-header": false,
|
||||
"npm-naming": false,
|
||||
"eofline": false,
|
||||
"export-just-namespace": false,
|
||||
"import-spacing": false,
|
||||
"interface-name": false,
|
||||
"interface-over-type-literal": false,
|
||||
"jsdoc-format": false,
|
||||
"max-line-length": false,
|
||||
"member-access": false,
|
||||
"new-parens": false,
|
||||
"no-any-union": false,
|
||||
"no-boolean-literal-compare": false,
|
||||
"no-conditional-assignment": false,
|
||||
"no-consecutive-blank-lines": false,
|
||||
"no-construct": false,
|
||||
"no-declare-current-package": false,
|
||||
"no-duplicate-imports": false,
|
||||
"no-duplicate-variable": false,
|
||||
"no-empty-interface": false,
|
||||
"no-for-in-array": false,
|
||||
"no-inferrable-types": false,
|
||||
"no-internal-module": false,
|
||||
"no-irregular-whitespace": false,
|
||||
"no-mergeable-namespace": false,
|
||||
"no-misused-new": false,
|
||||
"no-namespace": false,
|
||||
"no-object-literal-type-assertion": false,
|
||||
"no-padding": false,
|
||||
"no-redundant-jsdoc": false,
|
||||
"no-redundant-jsdoc-2": false,
|
||||
"no-redundant-undefined": false,
|
||||
"no-reference-import": false,
|
||||
"no-relative-import-in-test": false,
|
||||
"no-self-import": false,
|
||||
"no-single-declare-module": false,
|
||||
"no-string-throw": false,
|
||||
"no-unnecessary-callback-wrapper": false,
|
||||
"no-unnecessary-class": false,
|
||||
"no-unnecessary-generics": false,
|
||||
"no-unnecessary-qualifier": false,
|
||||
"no-unnecessary-type-assertion": false,
|
||||
"no-useless-files": false,
|
||||
"no-var-keyword": false,
|
||||
"no-var-requires": false,
|
||||
"no-void-expression": false,
|
||||
"no-trailing-whitespace": false,
|
||||
"object-literal-key-quotes": false,
|
||||
"object-literal-shorthand": false,
|
||||
"one-line": false,
|
||||
"one-variable-per-declaration": false,
|
||||
"only-arrow-functions": false,
|
||||
"prefer-conditional-expression": false,
|
||||
"prefer-const": false,
|
||||
"prefer-declare-function": false,
|
||||
"prefer-for-of": false,
|
||||
"prefer-method-signature": false,
|
||||
"prefer-template": false,
|
||||
"radix": false,
|
||||
"semicolon": false,
|
||||
"space-before-function-paren": false,
|
||||
"space-within-parens": false,
|
||||
"strict-export-declare-modifiers": false,
|
||||
"trim-file": false,
|
||||
"triple-equals": false,
|
||||
"typedef-whitespace": false,
|
||||
"unified-signatures": false,
|
||||
"void-return": false,
|
||||
"whitespace": false
|
||||
"unified-signatures": false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user