diff --git a/angular-xeditable/angular-xeditable-tests.ts b/angular-xeditable/angular-xeditable-tests.ts new file mode 100644 index 0000000000..9264c47f41 --- /dev/null +++ b/angular-xeditable/angular-xeditable-tests.ts @@ -0,0 +1,15 @@ +/// + +var myApp = angular.module('testModule', ['xeditable']); + +myApp.run(["editableOptions", (editableOptions: angular.xeditable.IEditableOptions) => { + + editableOptions.activate = "select"; + editableOptions.activationEvent = "click"; + editableOptions.blurElem = "ignore"; + editableOptions.blurForm = "submit"; + editableOptions.buttons = "no"; + editableOptions.icon_set = "font-awesome"; + editableOptions.isDisabled = true; + editableOptions.theme = "bs3"; +}]); \ No newline at end of file diff --git a/angular-xeditable/angular-xeditable.d.ts b/angular-xeditable/angular-xeditable.d.ts new file mode 100644 index 0000000000..eaa1296886 --- /dev/null +++ b/angular-xeditable/angular-xeditable.d.ts @@ -0,0 +1,56 @@ +// Type definitions for Angular xEditable 0.2.0 (angular.xeditable module) +// Project: https://vitalets.github.io/angular-xeditable/ +// Definitions by: Joao Monteiro +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare namespace angular.xeditable { + + interface IEditableOptions { + + /** + * Theme. Possible values `bs3`, `bs2`, `default` + */ + theme: string; + + /** + * Icon Set. Possible values `font-awesome`, `default`. + */ + icon_set: string; + + /** + * Whether to show buttons for single editalbe element. + * Possible values `right` (default), `no`. + */ + buttons: string; + + /** + * Default value for `blur` attribute of single editable element. + * Can be `cancel|submit|ignore`. + */ + blurElem: string; + + /** + * Default value for `blur` attribute of editable form. + * Can be `cancel|submit|ignore`. + */ + blurForm: string; + + /** + * How input elements get activated. Possible values: `focus|select|none`. + */ + activate: string; + + /** + * Whether to disable x-editable. Can be overloaded on each element. + */ + isDisabled: boolean; + + /* + * Event, on which the edit mode gets activated. + * Can be any event. + */ + activationEvent: string; + } +}