diff --git a/acc-wizard/acc-wizard-tests.ts b/acc-wizard/acc-wizard-tests.ts new file mode 100644 index 0000000000..9cf089b44a --- /dev/null +++ b/acc-wizard/acc-wizard-tests.ts @@ -0,0 +1,36 @@ +/// +/// + +/** + * @summary Test for "accwizard" without options. + */ +function testBasic() { + $('#test').accwizard(); +} + +/** + * @summary Test for "accwizard" with options. + */ +function testWithOptions() { + var options: AccWizardOptions = { + addButtons: true, + sidebar: '.acc-wizard-sidebar', + activeClass: 'acc-wizard-active', + completedClass: 'acc-wizard-completed', + todoClass: 'acc-wizard-todo', + stepClass: 'acc-wizard-step', + nextText: 'Next Step', + backText: 'Go Back', + nextType: 'submit', + backType: 'reset', + nextClasses: 'btn btn-primary', + backClasses: 'btn', + autoScrolling: true, + onNext: function() {}, + onBack: function() {}, + onInit: function() {}, + onDestroy: function() {} + }; + + $('#test').accwizard(options); +} \ No newline at end of file diff --git a/acc-wizard/acc-wizard.d.ts b/acc-wizard/acc-wizard.d.ts new file mode 100644 index 0000000000..5eb81a11c7 --- /dev/null +++ b/acc-wizard/acc-wizard.d.ts @@ -0,0 +1,101 @@ +// Type definitions for acc-wizard +// Project: https://github.com/sathomas/acc-wizard +// Definitions by: Cyril Schumacher +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +interface AccWizardOptions { + /** + * @summary Add next/prev buttons to panels. + * @type {boolean} + */ + addButtons: boolean; + + /** + * @summary Selector for task sidebar. + * @type {string} + */ + sidebar: string; + + /** + * @summary Class to indicate the active task in sidebar. + * @type {string} + */ + activeClass: string; + + /** + * @summary Class to indicate task is complete. + * @type {string} + */ + completedClass: string; + + /** + * @summary Class to indicate task is still pending. + * @type {string} + */ + todoClass: string; + + /** + * @summary Class for step buttons within panels. + * @type {string} + */ + stepClass: string; + + /** + * @summary Text for next button. + * @type {string} + */ + nextText: string; + + /** + * @summary Text for back button + * @type {string} + */ + backType: string; + + /** + * @summary Class(es) for next button. + * @type {string} + */ + nextClasses: string; + + /** + * @summary Class(es) for back button. + * @type {string} + */ + backClasses: string; + + /** + * @summary Auto-scrolling. + * @type {boolean} + */ + autoScrolling: boolean; + + /** + * @summary Function to call on next step. + */ + onNext: Function; + + /** + * @summary Function to call on back up. + */ + onBack: Function; + + /** + * @summary A chance to hook initialization. + */ + onInit: Function; + + /** + * @summary A chance to hook destruction. + */ + onDestroy: Function; +} + +/** + * @summary Interface for "acc-wizard" JQuery plugin. + * @author Cyril Schumacher + * @version 1.0 + */ +interface JQuery { + accwizard(options?: AccWizardOptions): void; +} \ No newline at end of file diff --git a/acc-wizard/acc-wizard.ts.tscparams b/acc-wizard/acc-wizard.ts.tscparams new file mode 100644 index 0000000000..934bc29ef2 --- /dev/null +++ b/acc-wizard/acc-wizard.ts.tscparams @@ -0,0 +1 @@ +--noImplicitAny \ No newline at end of file diff --git a/iban/iban-tests.ts b/iban/iban-tests.ts new file mode 100644 index 0000000000..f33faeebd0 --- /dev/null +++ b/iban/iban-tests.ts @@ -0,0 +1,53 @@ +/// + +/** + * @summary Test for "electronicFormat" method. + */ +function testElectronicFormat() { + var iban: string = 'BE68539007547034'; + var format: string = IBAN.electronicFormat(iban); +} + +/** + * @summary Test for "fromBBAN" method. + */ +function testFromBBAN() { + var countryCode: string = 'fr'; + var bban: string = 'BBBBBGGGGGCCCCCCCCCCCKK'; + var iban: string = IBAN.fromBBAN(countryCode, bban); +} + +/** + * @summary Test for "isValid" method. + */ +function testIsValid() { + var iban: string = 'BE68539007547034'; + var valid: boolean = IBAN.isValid(iban); +} + +/** + * @summary Test for "isValidBBAN" method. + */ +function testIsValidBBAN() { + var countryCode: string = 'fr'; + var bban: string = 'BBBBBGGGGGCCCCCCCCCCCKK'; + var valid: boolean = IBAN.isValidBBAN(countryCode, bban); +} + +/** + * @summary Test for "printFormat" method. + */ +function testPrintFormat() { + var iban: string = 'BE68539007547034'; + var separator: string[] = ['fr']; + var format: string = IBAN.printFormat(iban, separator); +} + +/** + * @summary Test for "toBBAN" method. + */ +function testToBBAN() { + var iban: string = 'BE68539007547034'; + var separator: string[] = ['-']; + var bban: string = IBAN.toBBAN(iban, separator); +} \ No newline at end of file diff --git a/iban/iban.d.ts b/iban/iban.d.ts new file mode 100644 index 0000000000..b39f5908ce --- /dev/null +++ b/iban/iban.d.ts @@ -0,0 +1,60 @@ +// Type definitions for iban.js 0.0.5 +// Project: https://github.com/arhs/iban.js/ +// Definitions by: Cyril Schumacher +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module ARHS { + /** + * @summary Interface for {@link IBAN} object. + * @author Cyril Schumacher + * @version 1.0 + */ + interface IBANStatic { + /** + * @summary Returns the IBAN in a electronic format. + * @param {string} iban The IBAN to convert. + * @param {string} The IBAN in electronic format. + */ + electronicFormat(iban: string): string; + + /** + * @summary Convert the passed BBAN to an IBAN for this country specification. + * @param {string} countryCode The country of the BBAN. + * @param {string} bban The BBAN to convert to IBAN. + * @returns {string} The IBAN. + */ + fromBBAN(countryCode: string, bban: string): string; + + /** + * @summary Check if the passed iban is valid according to this specification. + * @param {string} iban The iban to validate. + * @returns {boolean} True if valid, false otherwise. + */ + isValid(iban: string): boolean; + + /** + * @summary Check of the passed BBAN is valid. + * @param {string} countryCode The country of the BBAN. + * @param {string} bban The BBAN to validate. + * @returns {boolean} True if valid, false otherwise. + */ + isValidBBAN(countryCode: string, bban: string): boolean; + + /** + * @summary Returns the IBAN in a print format. + * @param {string} iban The IBAN to convert. + * @param {string} The IBAN in print format. + */ + printFormat(iban: string, separator: string[]): string; + + /** + * @summary Convert the passed IBAN to a country-specific BBAN. + * @param {string} iban The IBAN to convert. + * @param {string[]} Separator the separator to use between BBAN blocks. + * @returns {string} The BBAN + */ + toBBAN(iban: string, separator: string[]): string; + } +} + +declare var IBAN: ARHS.IBANStatic; \ No newline at end of file diff --git a/iban/iban.ts.tscparams b/iban/iban.ts.tscparams new file mode 100644 index 0000000000..934bc29ef2 --- /dev/null +++ b/iban/iban.ts.tscparams @@ -0,0 +1 @@ +--noImplicitAny \ No newline at end of file diff --git a/jquery.dropotron/jquery.dropotron-tests.ts b/jquery.dropotron/jquery.dropotron-tests.ts new file mode 100644 index 0000000000..6b55c6d584 --- /dev/null +++ b/jquery.dropotron/jquery.dropotron-tests.ts @@ -0,0 +1,42 @@ +/// +/// + +/** + * @summary Test for "dropotron" without configurations. + */ +function testDropotron() { + var foo: JQuery = $('#main-nav > ul'); + foo.dropotron(); +} + +/** + * @summary Test for "dropotron" with configurations. + */ +function testDropotronConfiguration() { + var config: DropotronConfiguration = { + selectorParent: null, + baseZIndex: 1000, + menuClass: 'dropotron', + expandMode: 'hover', + hoverDelay: 150, + hideDelay: 250, + openerClass: 'opener', + openerActiveClass: 'active', + submenuClassPrefix: 'level-', + mode: 'fade', + speed: 'fast', + easing: 'swing', + alignment: 'left', + offsetX: 0, + offsetY: 0, + globalOffsetY: 0, + IEOffsetX: 0, + IEOffsetY: 0, + noOpenerFade: true, + detach: true, + cloneOnDetach: true + }; + + var foo: JQuery = $('#main-nav > ul'); + foo.dropotron(config); +} \ No newline at end of file diff --git a/jquery.dropotron/jquery.dropotron.d.ts b/jquery.dropotron/jquery.dropotron.d.ts new file mode 100644 index 0000000000..2b7d2090ee --- /dev/null +++ b/jquery.dropotron/jquery.dropotron.d.ts @@ -0,0 +1,160 @@ +// Type definitions for jquery.dropotron 1.4.3 +// Project: https://github.com/n33/jquery.dropotron +// Definitions by: Cyril Schumacher +// Definitions: https://github.com/borisyankov/DefinitelyTyped/ + +/** + * @summary Interface for "dropotron" configurations. + * @author Cyril Schumacher + * @version 1.0 + */ +interface DropotronConfiguration { + + /** + * @summary Alignment ("left", "center", "right"). + * @type {string} + */ + alignment: string; + + /** + * @summary Base Z-Index. + * @type {number} + */ + baseZIndex: number; + + /** + * @summary If true and detach = true, leave original menu intact. + * @type {boolean} + */ + cloneOnDetach: boolean; + + /** + * @summary Detach second level menus (prevents parent style bleed). + * @type {boolean} + */ + detach: boolean; + + /** + * @summary Easing mode ("swing", "linear"). + * @type {string} + */ + easing: string; + + /** + * @summary IE Offset X. + * @type {number} + */ + IEOffsetX: number; + + /** + * @summary IE Offset Y. + * @type {number} + */ + IEOffsetY: number; + + /** + * @summary Expansion mode ("hover" or "click"). + * @type {string} + */ + expandMode: string; + + /** + * @summary Global offset Y. + * @type {number} + */ + globalOffsetY: number; + + /** + * @summary Hide delay (in ms; 0 disables). + * @type {number} + */ + hideDelay: number; + + /** + * @summary Hover delay (in ms). + * @type {number} + */ + hoverDelay: number; + + /** + * @summary Menu class (assigned to every
    ). + * @type {string} + */ + menuClass: string; + + /** + * @summary Menu mode ("instant", "fade", "slide", "zoom"). + * @type {string} + */ + mode: string; + + /** + * @summary If true and mode = "fade", prevents top-level opener fade. + * @type {boolean} + */ + noOpenerFade: boolean; + + /** + * @summary Submenu offset X. + * @type {number} + */ + offsetX: number; + + /** + * @summary Submenu offset Y. + * @type {number} + */ + offsetY: number; + + /** + * @summary Active opener class. + * @type {string} + */ + openerActiveClass: string; + + /** + * @summary Opener class. + * @type {string} + */ + openerClass: string; + + /** + * @summary Parent jQuery object. + * @type {JQuery} + */ + selectorParent: JQuery; + + /** + * @summary Menu speed ("fast", "slow", or ms). + * @type {string} + */ + speed: string; + + /** + * @summary Submenu class prefix. + * @type {string} + */ + submenuClassPrefix: string; +} + +/** + * @summary Interface for "dropotron". + * @author Cyril Schumacher + * @version 1.0 + */ +interface Dropotron { + /** + * @summary Adds multilevel dropdown menus to jQuery. + * @param {DropotronConfiguration} config Optional. Configuration. + */ + (config?: DropotronConfiguration): void; +} + +/** + * @summary Interface for "JQuery". + * @author Cyril Schumacher + * @version 1.0 + */ +interface JQuery { + dropotron: Dropotron; +} \ No newline at end of file diff --git a/jquery.dropotron/jquery.dropotron.ts.tscparams b/jquery.dropotron/jquery.dropotron.ts.tscparams new file mode 100644 index 0000000000..934bc29ef2 --- /dev/null +++ b/jquery.dropotron/jquery.dropotron.ts.tscparams @@ -0,0 +1 @@ +--noImplicitAny \ No newline at end of file